diff --git a/VDS/Classes/Control.swift b/VDS/Classes/Control.swift index cba0078d..4da338c3 100644 --- a/VDS/Classes/Control.swift +++ b/VDS/Classes/Control.swift @@ -10,7 +10,7 @@ import UIKit import Combine @objc(VDSControl) -open class Control: UIControl, Handlerable, ViewProtocol, Resettable { +open class Control: UIControl, Handlerable, ViewProtocol, Resettable, UserInfoable { //-------------------------------------------------- // MARK: - Combine Properties @@ -23,6 +23,8 @@ open class Control: UIControl, Handlerable, ViewProtocol, Resettable { //-------------------------------------------------- private var initialSetupPerformed = false + open var userInfo = [String: Primitive]() + open var surface: Surface = .light { didSet { didChange() } } open var disabled: Bool = false { didSet { isEnabled = !disabled } } diff --git a/VDS/Classes/View.swift b/VDS/Classes/View.swift index 1671b377..c00a5887 100644 --- a/VDS/Classes/View.swift +++ b/VDS/Classes/View.swift @@ -11,7 +11,7 @@ import Combine @objc(VDSView) -open class View: UIView, Handlerable, ViewProtocol, Resettable { +open class View: UIView, Handlerable, ViewProtocol, Resettable, UserInfoable { //-------------------------------------------------- // MARK: - Combine Properties @@ -24,6 +24,8 @@ open class View: UIView, Handlerable, ViewProtocol, Resettable { //-------------------------------------------------- private var initialSetupPerformed = false + open var userInfo = [String: Primitive]() + open var surface: Surface = .light { didSet { didChange() }} open var disabled: Bool = false { didSet { isEnabled = !disabled } } diff --git a/VDS/Components/Buttons/Button/ButtonBase.swift b/VDS/Components/Buttons/Button/ButtonBase.swift index 0314a04f..890b8f9c 100644 --- a/VDS/Components/Buttons/Button/ButtonBase.swift +++ b/VDS/Components/Buttons/Button/ButtonBase.swift @@ -18,7 +18,7 @@ public protocol Buttonable: UIControl, Surfaceable, Disabling { } @objc(VDSButtonBase) -open class ButtonBase: UIButton, Buttonable, Handlerable, ViewProtocol, Resettable { +open class ButtonBase: UIButton, Buttonable, Handlerable, ViewProtocol, Resettable, UserInfoable { //-------------------------------------------------- // MARK: - Configuration Properties //-------------------------------------------------- @@ -48,6 +48,8 @@ open class ButtonBase: UIButton, Buttonable, Handlerable, ViewProtocol, Resettab open var disabled: Bool = false { didSet { isEnabled = !disabled } } + open var userInfo = [String: Primitive]() + var isHighlightAnimating = false open override var isHighlighted: Bool { didSet { diff --git a/VDS/Components/Label/Label.swift b/VDS/Components/Label/Label.swift index fca57836..2a4aefd4 100644 --- a/VDS/Components/Label/Label.swift +++ b/VDS/Components/Label/Label.swift @@ -11,7 +11,7 @@ import VDSColorTokens import Combine @objc(VDSLabel) -public class Label: UILabel, Handlerable, ViewProtocol, Resettable { +public class Label: UILabel, Handlerable, ViewProtocol, Resettable, UserInfoable { //-------------------------------------------------- // MARK: - Combine Properties @@ -37,6 +37,8 @@ public class Label: UILabel, Handlerable, ViewProtocol, Resettable { open var textPosition: TextPosition = .left { didSet { didChange() }} + open var userInfo = [String: Primitive]() + open override var isEnabled: Bool { get { !disabled } set {