diff --git a/VDS/Components/Label/Label.swift b/VDS/Components/Label/Label.swift index c4405146..5c93cfdb 100644 --- a/VDS/Components/Label/Label.swift +++ b/VDS/Components/Label/Label.swift @@ -10,12 +10,14 @@ import UIKit import VDSColorTokens import Combine -open class Label: UILabel, ModelHandlerable, Initable, Resettable { +public class Label:LabelBase{} + +open class LabelBase: UILabel, ModelHandlerable, Initable, Resettable { //-------------------------------------------------- // MARK: - Combine Properties //-------------------------------------------------- - @Published public var model: LabelModel = DefaultLabelModel() + @Published public var model: LabelModel = ModelType() private var cancellable: AnyCancellable? //-------------------------------------------------- @@ -123,6 +125,15 @@ open class Label: UILabel, ModelHandlerable, Initable, Resettable { //-------------------------------------------------- // MARK: - Private Functions //-------------------------------------------------- + private var textColorHelper: ModelSingleColorHelper = { + let helper = ModelSingleColorHelper() + helper.disabled.lightColor = VDSColor.elementsSecondaryOnlight + helper.disabled.darkColor = VDSColor.elementsSecondaryOndark + helper.enabled.lightColor = VDSColor.elementsPrimaryOnlight + helper.enabled.darkColor = VDSColor.elementsPrimaryOndark + return helper + } () + private func getTextColor(for disabled: Bool, surface: Surface) -> UIColor { if disabled { if surface == .light { diff --git a/VDS/Extensions/UITapGestureRecognizer.swift b/VDS/Extensions/UITapGestureRecognizer.swift index 8cdf8d08..cf4121ba 100644 --- a/VDS/Extensions/UITapGestureRecognizer.swift +++ b/VDS/Extensions/UITapGestureRecognizer.swift @@ -10,7 +10,7 @@ import UIKit extension UITapGestureRecognizer { - public func didTapAttributedTextInLabel(_ label: Label, inRange targetRange: NSRange) -> Bool { + public func didTapAttributedTextInLabel(_ label: UILabel, inRange targetRange: NSRange) -> Bool { guard let abstractContainer = label.abstractTextContainer() else { return false } let textContainer = abstractContainer.0