formatted

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-08-30 16:57:15 -05:00
parent 508ff47d99
commit 794f68a67f
25 changed files with 112 additions and 112 deletions

View File

@ -55,7 +55,7 @@ open class SelectorBase: Control, SelectorControlable {
} }
} }
open var size = CGSize(width: 20, height: 20) { didSet { setNeedsUpdate() }} open var size = CGSize(width: 20, height: 20) { didSet { setNeedsUpdate() } }
var _showError: Bool = false var _showError: Bool = false
/// Whether not to show the error. /// Whether not to show the error.
@ -82,11 +82,11 @@ open class SelectorBase: Control, SelectorControlable {
} }
} }
open var backgroundColorConfiguration = ControlColorConfiguration() { didSet { setNeedsUpdate() }} open var backgroundColorConfiguration = ControlColorConfiguration() { didSet { setNeedsUpdate() } }
open var borderColorConfiguration = ControlColorConfiguration() { didSet { setNeedsUpdate() }} open var borderColorConfiguration = ControlColorConfiguration() { didSet { setNeedsUpdate() } }
open var selectorColorConfiguration = ControlColorConfiguration() { didSet { setNeedsUpdate() }} open var selectorColorConfiguration = ControlColorConfiguration() { didSet { setNeedsUpdate() } }
/// The natural size for the receiving view, considering only properties of the view itself. /// The natural size for the receiving view, considering only properties of the view itself.
open override var intrinsicContentSize: CGSize { size } open override var intrinsicContentSize: CGSize { size }

View File

@ -91,13 +91,13 @@ open class SelectorItemBase<Selector: SelectorControlable>: Control, Errorable,
/// Generic Object used to allow the user to 'Select'. /// Generic Object used to allow the user to 'Select'.
open var selectorView = Selector() open var selectorView = Selector()
open override var isSelected: Bool { didSet { setNeedsUpdate() }} open override var isSelected: Bool { didSet { setNeedsUpdate() } }
/// Text shown in the label. /// Text shown in the label.
open var labelText: String? { didSet { setNeedsUpdate() }} open var labelText: String? { didSet { setNeedsUpdate() } }
/// Array of LabelAttributeModel objects used in rendering the labelText. /// Array of LabelAttributeModel objects used in rendering the labelText.
open var labelTextAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() }} open var labelTextAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() } }
/// Instead of use labelText and labelTextAttirbutes, this is a fully baked NSAttributedString with both text and attributes. /// Instead of use labelText and labelTextAttirbutes, this is a fully baked NSAttributedString with both text and attributes.
open var labelAttributedText: NSAttributedString? { open var labelAttributedText: NSAttributedString? {
@ -109,10 +109,10 @@ open class SelectorItemBase<Selector: SelectorControlable>: Control, Errorable,
} }
/// Text shown in the childLabel. /// Text shown in the childLabel.
open var childText: String? { didSet { setNeedsUpdate() }} open var childText: String? { didSet { setNeedsUpdate() } }
/// Array of LabelAttributeModel objects used in rendering the childText. /// Array of LabelAttributeModel objects used in rendering the childText.
open var childTextAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() }} open var childTextAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() } }
/// Instead of use childText and childTextAttirbutes, this is a fully baked NSAttributedString with both text and attributes. /// Instead of use childText and childTextAttirbutes, this is a fully baked NSAttributedString with both text and attributes.
open var childAttributedText: NSAttributedString? { open var childAttributedText: NSAttributedString? {
@ -146,11 +146,11 @@ open class SelectorItemBase<Selector: SelectorControlable>: Control, Errorable,
} }
} }
open var errorText: String? { didSet { setNeedsUpdate() }} open var errorText: String? { didSet { setNeedsUpdate() } }
open var inputId: String? { didSet { setNeedsUpdate() }} open var inputId: String? { didSet { setNeedsUpdate() } }
open var value: AnyHashable? { didSet { setNeedsUpdate() }} open var value: AnyHashable? { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Overrides // MARK: - Overrides

View File

@ -169,46 +169,46 @@ open class BadgeIndicator: View {
/// This will render the badges fill color based on the available options. /// This will render the badges fill color based on the available options.
/// When used in conjunction with the surface prop, this fill color will change its tint automatically based on a light or dark surface. /// When used in conjunction with the surface prop, this fill color will change its tint automatically based on a light or dark surface.
open var fillColor: FillColor = .red { didSet { setNeedsUpdate() }} open var fillColor: FillColor = .red { didSet { setNeedsUpdate() } }
/// Badge Number that will be shown if you are using Kind.numbered. /// Badge Number that will be shown if you are using Kind.numbered.
open var number: Int? { didSet { setNeedsUpdate() }} open var number: Int? { didSet { setNeedsUpdate() } }
/// Type of Badge Indicator, simple is a dot, whereas numbered shows a number. /// Type of Badge Indicator, simple is a dot, whereas numbered shows a number.
open var kind: Kind = .simple { didSet { setNeedsUpdate() }} open var kind: Kind = .simple { didSet { setNeedsUpdate() } }
/// Character that is always at the begging. Accepts any character and if unaffected by maximumDigits. /// Character that is always at the begging. Accepts any character and if unaffected by maximumDigits.
open var leadingCharacter: String? { didSet { setNeedsUpdate() }} open var leadingCharacter: String? { didSet { setNeedsUpdate() } }
/// Accepts any text or character. It is unaffected by maximumDigits. /// Accepts any text or character. It is unaffected by maximumDigits.
open var trailingText: String? { didSet { setNeedsUpdate() }} open var trailingText: String? { didSet { setNeedsUpdate() } }
/// Determines the size of the Badge Indicator as well as the textStyle and padding used. /// Determines the size of the Badge Indicator as well as the textStyle and padding used.
open var size: Size = .xxlarge { didSet { setNeedsUpdate() }} open var size: Size = .xxlarge { didSet { setNeedsUpdate() } }
/// Pixel size of the dot when the kind is set to simple. /// Pixel size of the dot when the kind is set to simple.
open var dotSize: CGFloat? { didSet { setNeedsUpdate() }} open var dotSize: CGFloat? { didSet { setNeedsUpdate() } }
/// Sets the padding at the top/bottom of the label. /// Sets the padding at the top/bottom of the label.
open var verticalPadding: CGFloat? { didSet { setNeedsUpdate() }} open var verticalPadding: CGFloat? { didSet { setNeedsUpdate() } }
/// Sets the padding at the left/right of the label. /// Sets the padding at the left/right of the label.
open var horitonalPadding: CGFloat? { didSet { setNeedsUpdate() }} open var horitonalPadding: CGFloat? { didSet { setNeedsUpdate() } }
/// Hides the dot when you are in Kind.simple mode. /// Hides the dot when you are in Kind.simple mode.
open var hideDot: Bool = false { didSet { setNeedsUpdate() }} open var hideDot: Bool = false { didSet { setNeedsUpdate() } }
/// Will not show the border. /// Will not show the border.
open var hideBorder: Bool = false { didSet { setNeedsUpdate() }} open var hideBorder: Bool = false { didSet { setNeedsUpdate() } }
/// When in Kind.numbered this is the amount of digits that will show up when the user adds a number. /// When in Kind.numbered this is the amount of digits that will show up when the user adds a number.
open var maximumDigits: MaximumDigits = .two { didSet { setNeedsUpdate() }} open var maximumDigits: MaximumDigits = .two { didSet { setNeedsUpdate() } }
/// The Container's width. /// The Container's width.
open var width: CGFloat? { didSet { setNeedsUpdate() }} open var width: CGFloat? { didSet { setNeedsUpdate() } }
/// The Container's height. /// The Container's height.
open var height: CGFloat? { didSet { setNeedsUpdate() }} open var height: CGFloat? { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Private Properties // MARK: - Private Properties

View File

@ -52,10 +52,10 @@ open class Button: ButtonBase, Useable, Buttonable {
open override var availableSizes: [ButtonSize] { [.large, .small] } open override var availableSizes: [ButtonSize] { [.large, .small] }
/// The ButtonSize for ths Button. /// The ButtonSize for ths Button.
open var size: ButtonSize = .large { didSet { setNeedsUpdate() }} open var size: ButtonSize = .large { didSet { setNeedsUpdate() } }
/// The Use for this Button. /// The Use for this Button.
open var use: Use = .primary { didSet { setNeedsUpdate() }} open var use: Use = .primary { didSet { setNeedsUpdate() } }
private var _width: CGFloat? = nil private var _width: CGFloat? = nil

View File

@ -78,7 +78,7 @@ open class ButtonBase: UIButton, ViewProtocol, UserInfoable, Clickable {
/// The ButtonSize available to this type of Buttonable. /// The ButtonSize available to this type of Buttonable.
open var availableSizes: [ButtonSize] { [] } open var availableSizes: [ButtonSize] { [] }
open var surface: Surface = .light { didSet { setNeedsUpdate() }} open var surface: Surface = .light { didSet { setNeedsUpdate() } }
/// Text that will be used in the titleLabel. /// Text that will be used in the titleLabel.
open var text: String? { didSet { setNeedsUpdate() } } open var text: String? { didSet { setNeedsUpdate() } }
@ -93,7 +93,7 @@ open class ButtonBase: UIButton, ViewProtocol, UserInfoable, Clickable {
open var textColor: UIColor { .black } open var textColor: UIColor { .black }
/// Will determine if a scaled font should be used for the titleLabel font. /// Will determine if a scaled font should be used for the titleLabel font.
open var useScaledFont: Bool = false { didSet { setNeedsUpdate() }} open var useScaledFont: Bool = false { didSet { setNeedsUpdate() } }
open var userInfo = [String: Primitive]() open var userInfo = [String: Primitive]()

View File

@ -57,10 +57,10 @@ open class ButtonGroup: View {
open var rowQuantity: Int { UIDevice.isIPad ? rowQuantityTablet : rowQuantityPhone } open var rowQuantity: Int { UIDevice.isIPad ? rowQuantityTablet : rowQuantityPhone }
/// If provided, aligns TextLink/TextLinkCaret alignment when rowQuantity is set one. /// If provided, aligns TextLink/TextLinkCaret alignment when rowQuantity is set one.
open var alignment: Alignment = .center { didSet { setNeedsUpdate() }} open var alignment: Alignment = .center { didSet { setNeedsUpdate() } }
/// Array of Buttonable Views that are shown in the group. /// Array of Buttonable Views that are shown in the group.
open var buttons: [Buttonable] = [] { didSet { setNeedsUpdate() }} open var buttons: [Buttonable] = [] { didSet { setNeedsUpdate() } }
private var _childWidth: ChildWidth? private var _childWidth: ChildWidth?

View File

@ -46,7 +46,7 @@ open class TextLink: ButtonBase, Buttonable {
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Public Properties // MARK: - Public Properties
//-------------------------------------------------- //--------------------------------------------------
open var size: ButtonSize = .large { didSet { setNeedsUpdate() }} open var size: ButtonSize = .large { didSet { setNeedsUpdate() } }
/// The ButtonSize available to this type of Buttonable. /// The ButtonSize available to this type of Buttonable.
open override var availableSizes: [ButtonSize] { [.large, .small] } open override var availableSizes: [ButtonSize] { [.large, .small] }

View File

@ -35,7 +35,7 @@ open class Checkbox: SelectorBase {
// MARK: - Public Properties // MARK: - Public Properties
//-------------------------------------------------- //--------------------------------------------------
/// Whether or not there is animation when the checkbox changes state from non-selected to a selected state. /// Whether or not there is animation when the checkbox changes state from non-selected to a selected state.
open var isAnimated: Bool = false { didSet { setNeedsUpdate() }} open var isAnimated: Bool = false { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Overrides // MARK: - Overrides

View File

@ -31,7 +31,7 @@ open class CheckboxItem: SelectorItemBase<Checkbox> {
// MARK: - Public Properties // MARK: - Public Properties
//-------------------------------------------------- //--------------------------------------------------
/// Whether or not there is animation when the checkbox changes state from non-selected to a selected state. /// Whether or not there is animation when the checkbox changes state from non-selected to a selected state.
open var isAnimated: Bool = false { didSet { setNeedsUpdate() }} open var isAnimated: Bool = false { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Overrides // MARK: - Overrides

View File

@ -97,7 +97,7 @@ open class ButtonIcon: Control {
open var size: Size = .large { didSet { setNeedsUpdate() } } open var size: Size = .large { didSet { setNeedsUpdate() } }
/// Sets the size of button icon and icon. /// Sets the size of button icon and icon.
open var customSize: Int? { didSet { setNeedsUpdate() }} open var customSize: Int? { didSet { setNeedsUpdate() } }
/// If provided, the button icon will have a box shadow. /// If provided, the button icon will have a box shadow.
open var floating: Bool = false { didSet { setNeedsUpdate() } } open var floating: Bool = false { didSet { setNeedsUpdate() } }

View File

@ -60,13 +60,13 @@ open class Icon: View {
} }
/// Size of the icon. /// Size of the icon.
open var size: Size = .medium { didSet { setNeedsUpdate() }} open var size: Size = .medium { didSet { setNeedsUpdate() } }
/// This will be used to render the icon with corresponding name. /// This will be used to render the icon with corresponding name.
open var name: Name? { didSet { setNeedsUpdate() }} open var name: Name? { didSet { setNeedsUpdate() } }
/// A custom size of the icon. /// A custom size of the icon.
open var customSize: Int? { didSet { setNeedsUpdate() }} open var customSize: Int? { didSet { setNeedsUpdate() } }
/// The natural size for the receiving view, considering only properties of the view itself. /// The natural size for the receiving view, considering only properties of the view itself.
open override var intrinsicContentSize: CGSize { open override var intrinsicContentSize: CGSize {

View File

@ -121,13 +121,13 @@ open class Notification: View {
} }
/// Text that will go into the titleLabel. /// Text that will go into the titleLabel.
open var title: String = "" { didSet{setNeedsUpdate()}} open var title: String = "" { didSet { setNeedsUpdate()}}
/// Text that will go into the subTitleLabel. /// Text that will go into the subTitleLabel.
open var subTitle: String? { didSet{setNeedsUpdate()}} open var subTitle: String? { didSet { setNeedsUpdate()}}
/// Button model representing the primaryButton. /// Button model representing the primaryButton.
open var primaryButtonModel: ButtonModel? { didSet{setNeedsUpdate()}} open var primaryButtonModel: ButtonModel? { didSet { setNeedsUpdate()}}
/// Button used for the primary action. /// Button used for the primary action.
open var primaryButton = Button().with { open var primaryButton = Button().with {
@ -136,7 +136,7 @@ open class Notification: View {
} }
/// Button model representing the secondaryButton. /// Button model representing the secondaryButton.
open var secondaryButtonModel: ButtonModel? { didSet{setNeedsUpdate()}} open var secondaryButtonModel: ButtonModel? { didSet { setNeedsUpdate()}}
/// Button used for the secondary action. /// Button used for the secondary action.
open var secondaryButton = Button().with { open var secondaryButton = Button().with {
@ -160,10 +160,10 @@ open class Notification: View {
} }
/// If true, will hide the close button. /// If true, will hide the close button.
open var hideCloseButton: Bool = false { didSet{setNeedsUpdate()}} open var hideCloseButton: Bool = false { didSet { setNeedsUpdate()}}
/// Add this attribute determine your type of Notification. /// Add this attribute determine your type of Notification.
open var style: Style = .info { didSet{setNeedsUpdate()}} open var style: Style = .info { didSet { setNeedsUpdate()}}
var _layout: Layout = .vertical var _layout: Layout = .vertical

View File

@ -92,10 +92,10 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
} }
/// If provided, the RadioBox text will be rendered. /// If provided, the RadioBox text will be rendered.
open var text: String? { didSet { setNeedsUpdate() }} open var text: String? { didSet { setNeedsUpdate() } }
/// Array of LabelAttributeModel objects used in rendering the text. /// Array of LabelAttributeModel objects used in rendering the text.
open var textAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() }} open var textAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() } }
/// If provided, the RadioBox textAttributedText will be rendered. /// If provided, the RadioBox textAttributedText will be rendered.
open var textAttributedText: NSAttributedString? { open var textAttributedText: NSAttributedString? {
@ -107,10 +107,10 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
} }
/// If provided, the RadioBox subtext will be rendered. /// If provided, the RadioBox subtext will be rendered.
open var subText: String? { didSet { setNeedsUpdate() }} open var subText: String? { didSet { setNeedsUpdate() } }
/// Array of LabelAttributeModel objects used in rendering the subText. /// Array of LabelAttributeModel objects used in rendering the subText.
open var subTextAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() }} open var subTextAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() } }
/// If provided, the RadioBox subTextAttributedText will be rendered. /// If provided, the RadioBox subTextAttributedText will be rendered.
open var subTextAttributedText: NSAttributedString? { open var subTextAttributedText: NSAttributedString? {
@ -122,10 +122,10 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
} }
/// If provided, the RadioBox subtextRight will be rendered. /// If provided, the RadioBox subtextRight will be rendered.
open var subTextRight: String? { didSet { setNeedsUpdate() }} open var subTextRight: String? { didSet { setNeedsUpdate() } }
/// Array of LabelAttributeModel objects used in rendering the subTextRight. /// Array of LabelAttributeModel objects used in rendering the subTextRight.
open var subTextRightAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() }} open var subTextRightAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() } }
/// If provided, the RadioBox subTextRightAttributedText will be rendered. /// If provided, the RadioBox subTextRightAttributedText will be rendered.
open var subTextRightAttributedText: NSAttributedString? { open var subTextRightAttributedText: NSAttributedString? {
@ -137,11 +137,11 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
} }
/// If provided, the radio box will be rendered to show the option with a strikethrough. /// If provided, the radio box will be rendered to show the option with a strikethrough.
open var strikethrough: Bool = false { didSet { setNeedsUpdate() }} open var strikethrough: Bool = false { didSet { setNeedsUpdate() } }
open var inputId: String? { didSet { setNeedsUpdate() }} open var inputId: String? { didSet { setNeedsUpdate() } }
open var value: AnyHashable? { didSet { setNeedsUpdate() }} open var value: AnyHashable? { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Configuration Properties // MARK: - Configuration Properties

View File

@ -129,12 +129,12 @@ open class EntryFieldBase: Control, Changeable {
$0.size = .small $0.size = .small
} }
open var labelText: String? { didSet { setNeedsUpdate() }} open var labelText: String? { didSet { setNeedsUpdate() } }
open var helperText: String? { didSet { setNeedsUpdate() }} open var helperText: String? { didSet { setNeedsUpdate() } }
/// Whether not to show the error. /// Whether not to show the error.
open var showError: Bool = false { didSet { setNeedsUpdate() }} open var showError: Bool = false { didSet { setNeedsUpdate() } }
/// Override UIControl state to add the .error state if showError is true. /// Override UIControl state to add the .error state if showError is true.
open override var state: UIControl.State { open override var state: UIControl.State {
@ -147,29 +147,29 @@ open class EntryFieldBase: Control, Changeable {
} }
} }
open var errorText: String? { didSet { setNeedsUpdate() }} open var errorText: String? { didSet { setNeedsUpdate() } }
open var tooltipTitle: String? { didSet { setNeedsUpdate() }} open var tooltipTitle: String? { didSet { setNeedsUpdate() } }
open var tooltipContent: String? { didSet { setNeedsUpdate() }} open var tooltipContent: String? { didSet { setNeedsUpdate() } }
open var tooltipContentView: UIView? { didSet { setNeedsUpdate() }} open var tooltipContentView: UIView? { didSet { setNeedsUpdate() } }
open var transparentBackground: Bool = false { didSet { setNeedsUpdate() }} open var transparentBackground: Bool = false { didSet { setNeedsUpdate() } }
open var width: CGFloat? { didSet { setNeedsUpdate() }} open var width: CGFloat? { didSet { setNeedsUpdate() } }
open var maxLength: Int? { didSet { setNeedsUpdate() }} open var maxLength: Int? { didSet { setNeedsUpdate() } }
open var inputId: String? { didSet { setNeedsUpdate() }} open var inputId: String? { didSet { setNeedsUpdate() } }
open var value: AnyHashable? { didSet { setNeedsUpdate() }} open var value: AnyHashable? { didSet { setNeedsUpdate() } }
open var defaultValue: AnyHashable? { didSet { setNeedsUpdate() }} open var defaultValue: AnyHashable? { didSet { setNeedsUpdate() } }
open var required: Bool = false { didSet { setNeedsUpdate() }} open var required: Bool = false { didSet { setNeedsUpdate() } }
open var readOnly: Bool = false { didSet { setNeedsUpdate() }} open var readOnly: Bool = false { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Constraints // MARK: - Constraints

View File

@ -76,7 +76,7 @@ open class InputField: EntryFieldBase, UITextFieldDelegate {
}.eraseToAnyColorable() }.eraseToAnyColorable()
/// Representing the type of input. /// Representing the type of input.
open var fieldType: FieldType = .text { didSet { setNeedsUpdate() }} open var fieldType: FieldType = .text { didSet { setNeedsUpdate() } }
var _showError: Bool = false var _showError: Bool = false
/// Whether not to show the error. /// Whether not to show the error.
@ -113,10 +113,10 @@ open class InputField: EntryFieldBase, UITextFieldDelegate {
} }
} }
/// If given, this will be shown if showSuccess if true. /// If given, this will be shown if showSuccess if true.
open var successText: String? { didSet { setNeedsUpdate() }} open var successText: String? { didSet { setNeedsUpdate() } }
/// Determines the placement of the helper text. /// Determines the placement of the helper text.
open var helperTextPlacement: HelperTextPlacement = .bottom { didSet { setNeedsUpdate() }} open var helperTextPlacement: HelperTextPlacement = .bottom { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Overrides // MARK: - Overrides

View File

@ -63,7 +63,7 @@ open class TextArea: EntryFieldBase {
open var textViewTextColorConfiguration: AnyColorable = ViewColorConfiguration().with { open var textViewTextColorConfiguration: AnyColorable = ViewColorConfiguration().with {
$0.setSurfaceColors(VDSColor.interactiveDisabledOnlight, VDSColor.interactiveDisabledOndark, forDisabled: true) $0.setSurfaceColors(VDSColor.interactiveDisabledOnlight, VDSColor.interactiveDisabledOndark, forDisabled: true)
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forDisabled: false) $0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forDisabled: false)
}.eraseToAnyColorable() { didSet { setNeedsUpdate() }} }.eraseToAnyColorable() { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Overrides // MARK: - Overrides

View File

@ -90,7 +90,7 @@ open class TileContainer: Control {
// MARK: - Public Properties // MARK: - Public Properties
//-------------------------------------------------- //--------------------------------------------------
/// This takes an image source url and applies it as a background image. /// This takes an image source url and applies it as a background image.
open var backgroundImage: UIImage? { didSet{ setNeedsUpdate() } } open var backgroundImage: UIImage? { didSet { setNeedsUpdate() } }
/// This is the container in which views will be pinned. /// This is the container in which views will be pinned.
open var containerView = View().with { open var containerView = View().with {
@ -103,16 +103,16 @@ open class TileContainer: Control {
} }
/// This controls the aspect ratio for the component. /// This controls the aspect ratio for the component.
open var aspectRatio: AspectRatio = .ratio1x1 { didSet{ setNeedsUpdate() } } open var aspectRatio: AspectRatio = .ratio1x1 { didSet { setNeedsUpdate() } }
/// Sets the background color for the component. /// Sets the background color for the component.
open var color: BackgroundColor = .white { didSet{ setNeedsUpdate() } } open var color: BackgroundColor = .white { didSet { setNeedsUpdate() } }
/// Sets the inside padding for the component /// Sets the inside padding for the component
open var padding: Padding = .padding4X { didSet{ setNeedsUpdate() } } open var padding: Padding = .padding4X { didSet { setNeedsUpdate() } }
/// Applies a background color if backgroundImage prop fails or has trouble loading. /// Applies a background color if backgroundImage prop fails or has trouble loading.
open var imageFallbackColor: Surface = .light { didSet{ setNeedsUpdate() } } open var imageFallbackColor: Surface = .light { didSet { setNeedsUpdate() } }
private var _width: CGFloat? private var _width: CGFloat?
/// Sets the width for the component. Accepts a pixel value. /// Sets the width for the component. Accepts a pixel value.
@ -143,10 +143,10 @@ open class TileContainer: Control {
} }
/// If true, a border is rendered around the container. /// If true, a border is rendered around the container.
open var showBorder: Bool = false { didSet{ setNeedsUpdate() } } open var showBorder: Bool = false { didSet { setNeedsUpdate() } }
/// Determines if there is a drop shadow or not. /// Determines if there is a drop shadow or not.
open var showDropShadows: Bool = false { didSet{ setNeedsUpdate() } } open var showDropShadows: Bool = false { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Constraints // MARK: - Constraints

View File

@ -165,16 +165,16 @@ open class Tilelet: TileContainer {
} }
/// Determines where the text aligns vertically. /// Determines where the text aligns vertically.
open var textPostion: TextPosition = .top { didSet { setNeedsUpdate() }} open var textPostion: TextPosition = .top { didSet { setNeedsUpdate() } }
/// If set, this is used to render the badge. /// If set, this is used to render the badge.
open var badgeModel: BadgeModel? { didSet { setNeedsUpdate() }} open var badgeModel: BadgeModel? { didSet { setNeedsUpdate() } }
/// If set, this is used to render the titleLabel of the TitleLockup. /// If set, this is used to render the titleLabel of the TitleLockup.
open var titleModel: TitleModel? { didSet { setNeedsUpdate() }} open var titleModel: TitleModel? { didSet { setNeedsUpdate() } }
/// If set, this is used to render the subTitleLabel of the TitleLockup. /// If set, this is used to render the subTitleLabel of the TitleLockup.
open var subTitleModel: SubTitleModel? { didSet { setNeedsUpdate() }} open var subTitleModel: SubTitleModel? { didSet { setNeedsUpdate() } }
//only 1 Icon can be active //only 1 Icon can be active
private var _descriptiveIconModel: DescriptiveIcon? private var _descriptiveIconModel: DescriptiveIcon?

View File

@ -68,7 +68,7 @@ open class TitleLockup: View {
// MARK: - Public Properties // MARK: - Public Properties
//-------------------------------------------------- //--------------------------------------------------
/// Aligns TitleLockup's subcomponent's text /// Aligns TitleLockup's subcomponent's text
open var textAlignment: TextAlignment = .left { didSet { setNeedsUpdate() }} open var textAlignment: TextAlignment = .left { didSet { setNeedsUpdate() } }
//first row //first row
/// Label used to render the eyebrow model. /// Label used to render the eyebrow model.
@ -77,7 +77,7 @@ open class TitleLockup: View {
} }
/// Model used in rendering the eyebrow label. /// Model used in rendering the eyebrow label.
open var eyebrowModel: EyebrowModel? { didSet { setNeedsUpdate() }} open var eyebrowModel: EyebrowModel? { didSet { setNeedsUpdate() } }
//second row //second row
/// Label used to render the title model. /// Label used to render the title model.
@ -86,7 +86,7 @@ open class TitleLockup: View {
} }
/// Model used in rendering the title label. /// Model used in rendering the title label.
open var titleModel: TitleModel? { didSet { setNeedsUpdate() }} open var titleModel: TitleModel? { didSet { setNeedsUpdate() } }
//third row //third row
/// Label used to render the subtitle model. /// Label used to render the subtitle model.
@ -95,7 +95,7 @@ open class TitleLockup: View {
} }
/// Model used in rendering the subtitle label. /// Model used in rendering the subtitle label.
open var subTitleModel: SubTitleModel? { didSet { setNeedsUpdate() }} open var subTitleModel: SubTitleModel? { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Configuration Properties // MARK: - Configuration Properties

View File

@ -127,32 +127,32 @@ open class Toggle: Control, Changeable, FormFieldable {
} }
/// If set to true, the toggle view will include animation between state changes. /// If set to true, the toggle view will include animation between state changes.
open var isAnimated: Bool = true { didSet { setNeedsUpdate() }} open var isAnimated: Bool = true { didSet { setNeedsUpdate() } }
/// If set to true, displays text either to the right or left of the toggle. /// If set to true, displays text either to the right or left of the toggle.
open var showText: Bool = false { didSet { setNeedsUpdate() }} open var showText: Bool = false { didSet { setNeedsUpdate() } }
/// Text that will be shown in the status text when isOn is true /// Text that will be shown in the status text when isOn is true
open var onText: String = "On" { didSet { setNeedsUpdate() }} open var onText: String = "On" { didSet { setNeedsUpdate() } }
/// Text that will be shown in the status text when isOn is false /// Text that will be shown in the status text when isOn is false
open var offText: String = "Off" { didSet { setNeedsUpdate() }} open var offText: String = "Off" { didSet { setNeedsUpdate() } }
/// Returns the correct text status based on the isOn state and correlates with onText or offText. /// Returns the correct text status based on the isOn state and correlates with onText or offText.
open var statusText: String { isOn ? onText : offText } open var statusText: String { isOn ? onText : offText }
/// Changes the font size of the status text. /// Changes the font size of the status text.
open var textSize: TextSize = .small { didSet { setNeedsUpdate() }} open var textSize: TextSize = .small { didSet { setNeedsUpdate() } }
/// Changes the font weight of the status text. /// Changes the font weight of the status text.
open var textWeight: TextWeight = .regular { didSet { setNeedsUpdate() }} open var textWeight: TextWeight = .regular { didSet { setNeedsUpdate() } }
/// Positions status text to either the right or left of toggle. /// Positions status text to either the right or left of toggle.
open var textPosition: TextPosition = .left { didSet { setNeedsUpdate() }} open var textPosition: TextPosition = .left { didSet { setNeedsUpdate() } }
open var inputId: String? { didSet { setNeedsUpdate() }} open var inputId: String? { didSet { setNeedsUpdate() } }
open var value: AnyHashable? { didSet { setNeedsUpdate() }} open var value: AnyHashable? { didSet { setNeedsUpdate() } }
/// The natural size for the receiving view, considering only properties of the view itself. /// The natural size for the receiving view, considering only properties of the view itself.
open override var intrinsicContentSize: CGSize { open override var intrinsicContentSize: CGSize {

View File

@ -64,11 +64,11 @@ open class ToggleView: Control, Changeable, FormFieldable {
} }
} }
/// If set to true, the toggle view will include animation between state changes. /// If set to true, the toggle view will include animation between state changes.
open var isAnimated: Bool = true { didSet { setNeedsUpdate() }} open var isAnimated: Bool = true { didSet { setNeedsUpdate() } }
open var inputId: String? { didSet { setNeedsUpdate() }} open var inputId: String? { didSet { setNeedsUpdate() } }
open var value: AnyHashable? { didSet { setNeedsUpdate() }} open var value: AnyHashable? { didSet { setNeedsUpdate() } }
/// The natural size for the receiving view, considering only properties of the view itself. /// The natural size for the receiving view, considering only properties of the view itself.
open override var intrinsicContentSize: CGSize { toggleSize } open override var intrinsicContentSize: CGSize { toggleSize }

View File

@ -66,22 +66,22 @@ open class Tooltip: Control, TooltipLaunchable {
} }
/// Will render the text for Close button for tooltip dialog when on mobile devices /// Will render the text for Close button for tooltip dialog when on mobile devices
open var closeButtonText: String = "Close" { didSet { setNeedsUpdate() }} open var closeButtonText: String = "Close" { didSet { setNeedsUpdate() } }
/// Will render icon in brand colors. /// Will render icon in brand colors.
open var fillColor: FillColor = .primary { didSet { setNeedsUpdate() }} open var fillColor: FillColor = .primary { didSet { setNeedsUpdate() } }
/// Size of the icon /// Size of the icon
open var size: Size = .medium { didSet { setNeedsUpdate() }} open var size: Size = .medium { didSet { setNeedsUpdate() } }
/// Text rendered for the title of the tooltip /// Text rendered for the title of the tooltip
open var title: String? { didSet { setNeedsUpdate() }} open var title: String? { didSet { setNeedsUpdate() } }
/// Text rendered for the content of the tooltip /// Text rendered for the content of the tooltip
open var content: String? { didSet { setNeedsUpdate() }} open var content: String? { didSet { setNeedsUpdate() } }
/// UIView rendered for the content area of the tooltip /// UIView rendered for the content area of the tooltip
open var contentView: UIView? { didSet { setNeedsUpdate() }} open var contentView: UIView? { didSet { setNeedsUpdate() } }
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Configuration // MARK: - Configuration

View File

@ -54,13 +54,13 @@ open class TooltipDialog: View, UIScrollViewDelegate {
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Public Properties // MARK: - Public Properties
//-------------------------------------------------- //--------------------------------------------------
open var titleText: String? { didSet { setNeedsUpdate() }} open var titleText: String? { didSet { setNeedsUpdate() } }
open var titleLabel = Label().with { label in open var titleLabel = Label().with { label in
label.isAccessibilityElement = true label.isAccessibilityElement = true
label.textStyle = .boldTitleMedium label.textStyle = .boldTitleMedium
} }
open var contentText: String? { didSet { setNeedsUpdate() }} open var contentText: String? { didSet { setNeedsUpdate() } }
open var contentLabel = Label().with { label in open var contentLabel = Label().with { label in
label.isAccessibilityElement = true label.isAccessibilityElement = true
label.textStyle = .bodyLarge label.textStyle = .bodyLarge
@ -68,7 +68,7 @@ open class TooltipDialog: View, UIScrollViewDelegate {
open var contentView: UIView? = nil open var contentView: UIView? = nil
open var closeButtonText: String = "Close" { didSet { setNeedsUpdate() }} open var closeButtonText: String = "Close" { didSet { setNeedsUpdate() } }
open lazy var closeButton: UIButton = { open lazy var closeButton: UIButton = {
let button = UIButton(type: .system) let button = UIButton(type: .system)

View File

@ -41,7 +41,7 @@ open class TrailingTooltipLabel: View, TooltipLaunchable {
open var label = Label() open var label = Label()
/// Text used to render the label. /// Text used to render the label.
open var labelText: String? { didSet { setNeedsUpdate() }} open var labelText: String? { didSet { setNeedsUpdate() } }
/// Attributes used to render the label. /// Attributes used to render the label.
open var labelAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() } } open var labelAttributes: [any LabelAttributeModel]? { didSet { setNeedsUpdate() } }
@ -55,7 +55,7 @@ open class TrailingTooltipLabel: View, TooltipLaunchable {
/// Color configuration set for the label. /// Color configuration set for the label.
public lazy var textColorConfiguration: AnyColorable = { public lazy var textColorConfiguration: AnyColorable = {
label.textColorConfiguration label.textColorConfiguration
}() { didSet { setNeedsUpdate() }} }() { didSet { setNeedsUpdate() } }
/// Will render the text for Close button for tooltip dialog when on mobile devices /// Will render the text for Close button for tooltip dialog when on mobile devices
open var tooltipCloseButtonText: String = "Close" { didSet { setNeedsUpdate() } } open var tooltipCloseButtonText: String = "Close" { didSet { setNeedsUpdate() } }

View File

@ -43,7 +43,7 @@ extension NSLayoutConstraint {
public var heightConstraint: NSLayoutConstraint? public var heightConstraint: NSLayoutConstraint?
public var isActive: Bool = false { public var isActive: Bool = false {
didSet{ didSet {
topConstraint?.isActive = isActive topConstraint?.isActive = isActive
bottomConstraint?.isActive = isActive bottomConstraint?.isActive = isActive
leadingConstraint?.isActive = isActive leadingConstraint?.isActive = isActive