From a223d26d5a8ca8d749ef0b9f32f9a0443620b98d Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Wed, 30 Mar 2022 19:15:04 +0530 Subject: [PATCH 01/13] changes to Carousel Bars Component --- .../CarouselIndicator/BarsIndicatorView.swift | 8 +++++++- .../CarouselIndicator/CarouselIndicator.swift | 15 ++++++++++++--- .../CarouselIndicatorModel.swift | 3 ++- MVMCoreUI/Categories/UIColor+Extension.swift | 9 +++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift index 381b8112..cecc1841 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift @@ -20,6 +20,8 @@ open class BarsIndicatorView: CarouselIndicator { static let width: CGFloat = 24 static let selectedHeight: CGFloat = 4 static let unselectedHeight: CGFloat = 1 + static let selectedCornerRadius: CGFloat = 2 + static let unselectedCornerRadius: CGFloat = 0.5 var constraint: NSLayoutConstraint? @@ -52,7 +54,7 @@ open class BarsIndicatorView: CarouselIndicator { stackView.axis = .horizontal stackView.alignment = .bottom stackView.distribution = .equalSpacing - stackView.spacing = 6 + stackView.spacing = 4 return stackView }() @@ -189,6 +191,7 @@ open class BarsIndicatorView: CarouselIndicator { let bar = IndicatorBar() setAccessibilityLabel(view: bar, index: index) bar.backgroundColor = isEnabled ? (index == currentIndex ? currentIndicatorColor : indicatorColor) : disabledIndicatorColor + bar.layer.cornerRadius = index == currentIndex ? BarsIndicatorView.IndicatorBar.selectedCornerRadius : BarsIndicatorView.IndicatorBar.unselectedCornerRadius let barHeight = index == currentIndex ? BarsIndicatorView.IndicatorBar.selectedHeight : BarsIndicatorView.IndicatorBar.unselectedHeight let heightConstraint = bar.heightAnchor.constraint(equalToConstant: barHeight) heightConstraint.isActive = true @@ -251,6 +254,7 @@ open class BarsIndicatorView: CarouselIndicator { barReferences.forEach { $0.backgroundColor = isEnabled ? indicatorColor : disabledIndicatorColor $0.constraint?.constant = IndicatorBar.unselectedHeight + $0.layer.cornerRadius = IndicatorBar.unselectedCornerRadius } balanceBarCount(numberOfPages - barReferences.count) @@ -260,8 +264,10 @@ open class BarsIndicatorView: CarouselIndicator { let expression = { [self] in barReferences[previousIndex].backgroundColor = isEnabled ? indicatorColor : disabledIndicatorColor barReferences[previousIndex].constraint?.constant = IndicatorBar.unselectedHeight + barReferences[previousIndex].layer.cornerRadius = IndicatorBar.unselectedCornerRadius barReferences[newIndex].backgroundColor = isEnabled ? currentIndicatorColor : disabledIndicatorColor barReferences[newIndex].constraint?.constant = IndicatorBar.selectedHeight + barReferences[newIndex].layer.cornerRadius = IndicatorBar.selectedCornerRadius layoutIfNeeded() } diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift index 6a82ef80..01a14f7f 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift @@ -71,8 +71,17 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { } public var disabledIndicatorColor: UIColor { - get { carouselIndicatorModel?.disabledIndicatorColor.uiColor ?? .mvmCoolGray3 } - set { carouselIndicatorModel?.disabledIndicatorColor = Color(uiColor: newValue) } + get { + guard let model = carouselIndicatorModel else { return .mvmGray44 } + return model.inverted ? model.disabledIndicatorColor_inverted.uiColor : model.disabledIndicatorColor.uiColor + } + set { + if let model = carouselIndicatorModel, model.inverted { + model.disabledIndicatorColor_inverted = Color(uiColor: newValue) + } else { + carouselIndicatorModel?.disabledIndicatorColor = Color(uiColor: newValue) + } + } } public var indicatorColor: UIColor { @@ -202,7 +211,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { previousIndex = 0 indicatorColor = model.inverted ? model.indicatorColor_inverted.uiColor : model.indicatorColor.uiColor - disabledIndicatorColor = model.disabledIndicatorColor.uiColor + disabledIndicatorColor = model.inverted ? model.disabledIndicatorColor_inverted.uiColor : model.disabledIndicatorColor.uiColor currentIndex = model.currentIndex isEnabled = model.enabled diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift index 9b211857..a3c7c14b 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift @@ -30,7 +30,8 @@ open class CarouselIndicatorModel: CarouselPagingModelProtocol, MoleculeModelPro /// Set true to make the accessibility value as "Slide #currentPage of #totalPage", otherwise will be "Page #currentPage of #totalPage", default is false public var accessibilityHasSlidesInsteadOfPage: Bool = false public var enabled: Bool = true - public var disabledIndicatorColor: Color = Color(uiColor: .mvmCoolGray3) + public var disabledIndicatorColor: Color = Color(uiColor: .mvmGray44) + public var disabledIndicatorColor_inverted: Color = Color(uiColor: .mvmGray65) public var indicatorColor: Color = Color(uiColor: .mvmBlack) public var indicatorColor_inverted: Color = Color(uiColor: .mvmWhite) public var position: CGFloat? diff --git a/MVMCoreUI/Categories/UIColor+Extension.swift b/MVMCoreUI/Categories/UIColor+Extension.swift index 78363630..3c4c11ba 100644 --- a/MVMCoreUI/Categories/UIColor+Extension.swift +++ b/MVMCoreUI/Categories/UIColor+Extension.swift @@ -52,6 +52,8 @@ extension UIColor { "coolGray3": (.mvmCoolGray3, "#D8DADA"), "coolGray6": (.mvmCoolGray6, "#747676"), "coolGray10": (.mvmCoolGray10, "#333333"), + "gray44": (.mvmGray44, "#6F7171"), + "gray65": (.mvmGray65, "#A7A7A7"), "upGold1": (.vzupGold1, "#F9D542"), "upGold2": (.vzupGold2, "#F4CA53"), "upGold3": (.vzupGold3, "#CC9B2D")] @@ -197,6 +199,13 @@ extension UIColor { /// HEX: #333333 public static let mvmCoolGray10 = UIColor.assetColor(named: "coolGray10") + /// HEX: #6F7171 + public static let mvmGray44 = UIColor.assetColor(named: "gray44") + + /// HEX: #A7A7A7 + public static let mvmGray65 = UIColor.assetColor(named: "gray65") + + //-------------------------------------------------- // MARK: - VZ UP Brand //-------------------------------------------------- From 3a31acfe63c71391ac7df8d8fa4c63f68b174ae1 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Tue, 5 Apr 2022 20:54:56 +0530 Subject: [PATCH 02/13] adding color sets --- .../Categories/colors.xcassets/Contents.json | 6 +++--- .../gray44.colorset/Contents.json | 20 +++++++++++++++++++ .../gray65.colorset/Contents.json | 20 +++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 MVMCoreUI/Categories/colors.xcassets/gray44.colorset/Contents.json create mode 100644 MVMCoreUI/Categories/colors.xcassets/gray65.colorset/Contents.json diff --git a/MVMCoreUI/Categories/colors.xcassets/Contents.json b/MVMCoreUI/Categories/colors.xcassets/Contents.json index da4a164c..73c00596 100644 --- a/MVMCoreUI/Categories/colors.xcassets/Contents.json +++ b/MVMCoreUI/Categories/colors.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/MVMCoreUI/Categories/colors.xcassets/gray44.colorset/Contents.json b/MVMCoreUI/Categories/colors.xcassets/gray44.colorset/Contents.json new file mode 100644 index 00000000..296ef27c --- /dev/null +++ b/MVMCoreUI/Categories/colors.xcassets/gray44.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x71", + "green" : "0x71", + "red" : "0x6F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MVMCoreUI/Categories/colors.xcassets/gray65.colorset/Contents.json b/MVMCoreUI/Categories/colors.xcassets/gray65.colorset/Contents.json new file mode 100644 index 00000000..aefc9ce0 --- /dev/null +++ b/MVMCoreUI/Categories/colors.xcassets/gray65.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xA7", + "green" : "0xA7", + "red" : "0xA7" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} From dd8c808fa623cc979eff89aedb30ed612acf5f2c Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Tue, 12 Apr 2022 05:06:36 +0530 Subject: [PATCH 03/13] using colors from the VDS colors library. --- .../CarouselIndicator/CarouselIndicator.swift | 4 ++-- .../CarouselIndicatorModel.swift | 6 +++--- MVMCoreUI/Categories/UIColor+Extension.swift | 11 +--------- .../gray44.colorset/Contents.json | 20 ------------------- .../gray65.colorset/Contents.json | 20 ------------------- 5 files changed, 6 insertions(+), 55 deletions(-) delete mode 100644 MVMCoreUI/Categories/colors.xcassets/gray44.colorset/Contents.json delete mode 100644 MVMCoreUI/Categories/colors.xcassets/gray65.colorset/Contents.json diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift index 01a14f7f..bbfedf19 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift @@ -5,7 +5,7 @@ // Created by Kevin Christiano on 1/30/20. // Copyright © 2020 Verizon Wireless. All rights reserved. // - +import VDSColorTokens open class CarouselIndicator: Control, CarouselPageControlProtocol { //-------------------------------------------------- @@ -72,7 +72,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { public var disabledIndicatorColor: UIColor { get { - guard let model = carouselIndicatorModel else { return .mvmGray44 } + guard let model = carouselIndicatorModel else { return VDSColor.paletteGray44 } return model.inverted ? model.disabledIndicatorColor_inverted.uiColor : model.disabledIndicatorColor.uiColor } set { diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift index a3c7c14b..3a3d3cc3 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift @@ -7,7 +7,7 @@ // import Foundation - +import VDSColorTokens open class CarouselIndicatorModel: CarouselPagingModelProtocol, MoleculeModelProtocol, EnableableModelProtocol { //-------------------------------------------------- @@ -30,8 +30,8 @@ open class CarouselIndicatorModel: CarouselPagingModelProtocol, MoleculeModelPro /// Set true to make the accessibility value as "Slide #currentPage of #totalPage", otherwise will be "Page #currentPage of #totalPage", default is false public var accessibilityHasSlidesInsteadOfPage: Bool = false public var enabled: Bool = true - public var disabledIndicatorColor: Color = Color(uiColor: .mvmGray44) - public var disabledIndicatorColor_inverted: Color = Color(uiColor: .mvmGray65) + public var disabledIndicatorColor: Color = Color(uiColor: VDSColor.paletteGray44) + public var disabledIndicatorColor_inverted: Color = Color(uiColor: VDSColor.paletteGray65) public var indicatorColor: Color = Color(uiColor: .mvmBlack) public var indicatorColor_inverted: Color = Color(uiColor: .mvmWhite) public var position: CGFloat? diff --git a/MVMCoreUI/Categories/UIColor+Extension.swift b/MVMCoreUI/Categories/UIColor+Extension.swift index 3c4c11ba..ca763ac5 100644 --- a/MVMCoreUI/Categories/UIColor+Extension.swift +++ b/MVMCoreUI/Categories/UIColor+Extension.swift @@ -52,8 +52,6 @@ extension UIColor { "coolGray3": (.mvmCoolGray3, "#D8DADA"), "coolGray6": (.mvmCoolGray6, "#747676"), "coolGray10": (.mvmCoolGray10, "#333333"), - "gray44": (.mvmGray44, "#6F7171"), - "gray65": (.mvmGray65, "#A7A7A7"), "upGold1": (.vzupGold1, "#F9D542"), "upGold2": (.vzupGold2, "#F4CA53"), "upGold3": (.vzupGold3, "#CC9B2D")] @@ -188,7 +186,7 @@ extension UIColor { //-------------------------------------------------- /// HEX: #F6F6F6 - @objc public static let mvmCoolGray1 = UIColor.assetColor(named: "coolGray1") + public static let mvmCoolGray1 = UIColor.assetColor(named: "coolGray1") /// HEX: #D8DADA public static let mvmCoolGray3 = UIColor.assetColor(named: "coolGray3") @@ -199,13 +197,6 @@ extension UIColor { /// HEX: #333333 public static let mvmCoolGray10 = UIColor.assetColor(named: "coolGray10") - /// HEX: #6F7171 - public static let mvmGray44 = UIColor.assetColor(named: "gray44") - - /// HEX: #A7A7A7 - public static let mvmGray65 = UIColor.assetColor(named: "gray65") - - //-------------------------------------------------- // MARK: - VZ UP Brand //-------------------------------------------------- diff --git a/MVMCoreUI/Categories/colors.xcassets/gray44.colorset/Contents.json b/MVMCoreUI/Categories/colors.xcassets/gray44.colorset/Contents.json deleted file mode 100644 index 296ef27c..00000000 --- a/MVMCoreUI/Categories/colors.xcassets/gray44.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x71", - "green" : "0x71", - "red" : "0x6F" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/MVMCoreUI/Categories/colors.xcassets/gray65.colorset/Contents.json b/MVMCoreUI/Categories/colors.xcassets/gray65.colorset/Contents.json deleted file mode 100644 index aefc9ce0..00000000 --- a/MVMCoreUI/Categories/colors.xcassets/gray65.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xA7", - "green" : "0xA7", - "red" : "0xA7" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} From 7d38ed346611df4fda1706245a4b82f23f00a0a7 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Tue, 12 Apr 2022 05:11:30 +0530 Subject: [PATCH 04/13] added missing as is --- MVMCoreUI/Categories/UIColor+Extension.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCoreUI/Categories/UIColor+Extension.swift b/MVMCoreUI/Categories/UIColor+Extension.swift index ca763ac5..78363630 100644 --- a/MVMCoreUI/Categories/UIColor+Extension.swift +++ b/MVMCoreUI/Categories/UIColor+Extension.swift @@ -186,7 +186,7 @@ extension UIColor { //-------------------------------------------------- /// HEX: #F6F6F6 - public static let mvmCoolGray1 = UIColor.assetColor(named: "coolGray1") + @objc public static let mvmCoolGray1 = UIColor.assetColor(named: "coolGray1") /// HEX: #D8DADA public static let mvmCoolGray3 = UIColor.assetColor(named: "coolGray3") From f21c59d6c363da7c2b7f9d059a33f2efb6a3db9f Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Wed, 13 Apr 2022 15:02:45 +0530 Subject: [PATCH 05/13] disabledIndicatorColor get called to set value --- .../Atoms/Views/CarouselIndicator/CarouselIndicator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift index bbfedf19..fa647ad1 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift @@ -211,7 +211,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { previousIndex = 0 indicatorColor = model.inverted ? model.indicatorColor_inverted.uiColor : model.indicatorColor.uiColor - disabledIndicatorColor = model.inverted ? model.disabledIndicatorColor_inverted.uiColor : model.disabledIndicatorColor.uiColor + disabledIndicatorColor = model.disabledIndicatorColor.uiColor currentIndex = model.currentIndex isEnabled = model.enabled From 781f3d6d7c966924b7970e6c3d52c10c40d791c6 Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Mon, 18 Apr 2022 16:40:56 +0530 Subject: [PATCH 06/13] Fix for navigation bar style update from webpage js bridge call --- .../Protocols/ModelProtocols/NavigationItemModelProtocol.swift | 1 + .../NavigationController/UINavigationController+Extension.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Protocols/ModelProtocols/NavigationItemModelProtocol.swift b/MVMCoreUI/Atomic/Protocols/ModelProtocols/NavigationItemModelProtocol.swift index b9fb111a..5148130d 100644 --- a/MVMCoreUI/Atomic/Protocols/ModelProtocols/NavigationItemModelProtocol.swift +++ b/MVMCoreUI/Atomic/Protocols/ModelProtocols/NavigationItemModelProtocol.swift @@ -21,4 +21,5 @@ public protocol NavigationItemModelProtocol { var additionalRightButtons: [(NavigationButtonModelProtocol & MoleculeModelProtocol)]? { get set } var titleView: MoleculeModelProtocol? { get set } var titleOffset: UIOffset? { get } + var style: NavigationItemStyle? { get set } } diff --git a/MVMCoreUI/Containers/NavigationController/UINavigationController+Extension.swift b/MVMCoreUI/Containers/NavigationController/UINavigationController+Extension.swift index ea5003f4..405fbbab 100644 --- a/MVMCoreUI/Containers/NavigationController/UINavigationController+Extension.swift +++ b/MVMCoreUI/Containers/NavigationController/UINavigationController+Extension.swift @@ -71,7 +71,7 @@ public extension UINavigationController { let tint = model.tintColor.uiColor navigationBar.tintColor = tint - let appearance = UINavigationBarAppearance() + let appearance = navigationBar.standardAppearance appearance.configureWithOpaqueBackground() appearance.titleTextAttributes = [NSAttributedString.Key.font: font, NSAttributedString.Key.foregroundColor: tint]; From afacedda9b6d4658493fbbf62ee9be231b375c05 Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Wed, 20 Apr 2022 18:40:21 +0530 Subject: [PATCH 07/13] Refresh navigation bar, after updating navigation model received from JS call --- .../Containers/NavigationController/NavigationController.swift | 3 +++ .../UINavigationController+Extension.swift | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Containers/NavigationController/NavigationController.swift b/MVMCoreUI/Containers/NavigationController/NavigationController.swift index 644dee73..b1f54e57 100644 --- a/MVMCoreUI/Containers/NavigationController/NavigationController.swift +++ b/MVMCoreUI/Containers/NavigationController/NavigationController.swift @@ -74,6 +74,9 @@ extension NavigationController: MVMCoreViewManagerProtocol { let model = getNavigationModel(from: viewController) { setNavigationItem(with: model, for: topViewController) setNavigationBarUI(with: model) + + navigationBar.setNeedsLayout() + navigationBar.layoutIfNeeded() } manager?.newDataReceived?(in: viewController) } diff --git a/MVMCoreUI/Containers/NavigationController/UINavigationController+Extension.swift b/MVMCoreUI/Containers/NavigationController/UINavigationController+Extension.swift index 405fbbab..ea5003f4 100644 --- a/MVMCoreUI/Containers/NavigationController/UINavigationController+Extension.swift +++ b/MVMCoreUI/Containers/NavigationController/UINavigationController+Extension.swift @@ -71,7 +71,7 @@ public extension UINavigationController { let tint = model.tintColor.uiColor navigationBar.tintColor = tint - let appearance = navigationBar.standardAppearance + let appearance = UINavigationBarAppearance() appearance.configureWithOpaqueBackground() appearance.titleTextAttributes = [NSAttributedString.Key.font: font, NSAttributedString.Key.foregroundColor: tint]; From 9cdf267a21d41a88163f0b447cb5ff9e8bdc9db4 Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Wed, 20 Apr 2022 18:44:01 +0530 Subject: [PATCH 08/13] Removing style parameter from navigation model protocol --- .../Protocols/ModelProtocols/NavigationItemModelProtocol.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Protocols/ModelProtocols/NavigationItemModelProtocol.swift b/MVMCoreUI/Atomic/Protocols/ModelProtocols/NavigationItemModelProtocol.swift index 5148130d..b9fb111a 100644 --- a/MVMCoreUI/Atomic/Protocols/ModelProtocols/NavigationItemModelProtocol.swift +++ b/MVMCoreUI/Atomic/Protocols/ModelProtocols/NavigationItemModelProtocol.swift @@ -21,5 +21,4 @@ public protocol NavigationItemModelProtocol { var additionalRightButtons: [(NavigationButtonModelProtocol & MoleculeModelProtocol)]? { get set } var titleView: MoleculeModelProtocol? { get set } var titleOffset: UIOffset? { get } - var style: NavigationItemStyle? { get set } } From e8b97c6f4da576700ccdb379a4ed13f0c0a1b3f2 Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Wed, 20 Apr 2022 19:52:15 +0530 Subject: [PATCH 09/13] Updating navigation layout on display --- .../Containers/NavigationController/NavigationController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MVMCoreUI/Containers/NavigationController/NavigationController.swift b/MVMCoreUI/Containers/NavigationController/NavigationController.swift index b1f54e57..9b4b332a 100644 --- a/MVMCoreUI/Containers/NavigationController/NavigationController.swift +++ b/MVMCoreUI/Containers/NavigationController/NavigationController.swift @@ -87,6 +87,9 @@ extension NavigationController: MVMCoreViewManagerProtocol { let model = getNavigationModel(from: viewController) { setNavigationItem(with: model, for: topViewController) setNavigationBarUI(with: model) + + navigationBar.setNeedsLayout() + navigationBar.layoutIfNeeded() } manager?.willDisplay?(viewController) } From 05fb8cf5edda0ad840a7720d7c494ef16a296287 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Wed, 20 Apr 2022 21:01:07 +0530 Subject: [PATCH 10/13] moving to VDSColors for all colors --- .../Atoms/Views/CarouselIndicator/CarouselIndicator.swift | 2 +- .../Views/CarouselIndicator/CarouselIndicatorModel.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift index fa647ad1..2b20cda1 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift @@ -86,7 +86,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { public var indicatorColor: UIColor { get { - guard let model = carouselIndicatorModel else { return .mvmBlack } + guard let model = carouselIndicatorModel else { return VDSColor.paletteBlack} return model.inverted ? model.indicatorColor_inverted.uiColor : model.indicatorColor.uiColor } set { diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift index 3a3d3cc3..3d6eac76 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift @@ -32,8 +32,8 @@ open class CarouselIndicatorModel: CarouselPagingModelProtocol, MoleculeModelPro public var enabled: Bool = true public var disabledIndicatorColor: Color = Color(uiColor: VDSColor.paletteGray44) public var disabledIndicatorColor_inverted: Color = Color(uiColor: VDSColor.paletteGray65) - public var indicatorColor: Color = Color(uiColor: .mvmBlack) - public var indicatorColor_inverted: Color = Color(uiColor: .mvmWhite) + public var indicatorColor: Color = Color(uiColor: VDSColor.paletteBlack) + public var indicatorColor_inverted: Color = Color(uiColor: VDSColor.paletteWhite) public var position: CGFloat? /// Allows sendActions() to trigger even if index is already at min/max index. From 4d407d43774e31e5d7a0d749c3634605cac98ea6 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Thu, 21 Apr 2022 01:29:34 +0530 Subject: [PATCH 11/13] colors to use token name itself instead of token alias. --- .../Atoms/Views/CarouselIndicator/CarouselIndicator.swift | 2 +- .../Views/CarouselIndicator/CarouselIndicatorModel.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift index 2b20cda1..f37a608d 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift @@ -86,7 +86,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { public var indicatorColor: UIColor { get { - guard let model = carouselIndicatorModel else { return VDSColor.paletteBlack} + guard let model = carouselIndicatorModel else { return VDSColor.elementsPrimaryOnlight} return model.inverted ? model.indicatorColor_inverted.uiColor : model.indicatorColor.uiColor } set { diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift index 3d6eac76..7a98e382 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift @@ -32,8 +32,8 @@ open class CarouselIndicatorModel: CarouselPagingModelProtocol, MoleculeModelPro public var enabled: Bool = true public var disabledIndicatorColor: Color = Color(uiColor: VDSColor.paletteGray44) public var disabledIndicatorColor_inverted: Color = Color(uiColor: VDSColor.paletteGray65) - public var indicatorColor: Color = Color(uiColor: VDSColor.paletteBlack) - public var indicatorColor_inverted: Color = Color(uiColor: VDSColor.paletteWhite) + public var indicatorColor: Color = Color(uiColor: VDSColor.elementsPrimaryOnlight) + public var indicatorColor_inverted: Color = Color(uiColor: VDSColor.elementsPrimaryOndark) public var position: CGFloat? /// Allows sendActions() to trigger even if index is already at min/max index. From 1e60db2fc47bd34d911e23b6e89c3a0d0ca51ed7 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Thu, 21 Apr 2022 01:34:40 +0530 Subject: [PATCH 12/13] uses token name instead of alias. --- .../Atoms/Views/CarouselIndicator/CarouselIndicator.swift | 2 +- .../Views/CarouselIndicator/CarouselIndicatorModel.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift index f37a608d..1d7808bd 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift @@ -72,7 +72,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { public var disabledIndicatorColor: UIColor { get { - guard let model = carouselIndicatorModel else { return VDSColor.paletteGray44 } + guard let model = carouselIndicatorModel else { return VDSColor.elementsSecondaryOnlight } return model.inverted ? model.disabledIndicatorColor_inverted.uiColor : model.disabledIndicatorColor.uiColor } set { diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift index 7a98e382..164bb306 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift @@ -30,8 +30,8 @@ open class CarouselIndicatorModel: CarouselPagingModelProtocol, MoleculeModelPro /// Set true to make the accessibility value as "Slide #currentPage of #totalPage", otherwise will be "Page #currentPage of #totalPage", default is false public var accessibilityHasSlidesInsteadOfPage: Bool = false public var enabled: Bool = true - public var disabledIndicatorColor: Color = Color(uiColor: VDSColor.paletteGray44) - public var disabledIndicatorColor_inverted: Color = Color(uiColor: VDSColor.paletteGray65) + public var disabledIndicatorColor: Color = Color(uiColor: VDSColor.elementsSecondaryOnlight) + public var disabledIndicatorColor_inverted: Color = Color(uiColor: VDSColor.elementsSecondaryOndark) public var indicatorColor: Color = Color(uiColor: VDSColor.elementsPrimaryOnlight) public var indicatorColor_inverted: Color = Color(uiColor: VDSColor.elementsPrimaryOndark) public var position: CGFloat? From 05f96d1a015a032424fcb2fbedd79275edd709c3 Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Mon, 25 Apr 2022 20:28:22 +0530 Subject: [PATCH 13/13] Supporting Standard/thin style in Line atom --- MVMCoreUI/Atomic/Atoms/Views/LineModel.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/LineModel.swift b/MVMCoreUI/Atomic/Atoms/Views/LineModel.swift index b5b562eb..cc9e7333 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/LineModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/LineModel.swift @@ -32,6 +32,8 @@ import VDSColorTokens The style of the line: - secondary (1 height, silver) - primary (1 height, black) + - standard (1 height, silver) - deprecated + - thin (1 height, black) - deprecated - medium (2 height, black) - heavy (4 height, black) - none (hidden) @@ -39,6 +41,8 @@ import VDSColorTokens public enum Style: String, Codable { case secondary case primary + case standard + case thin case medium case heavy case none @@ -59,10 +63,10 @@ import VDSColorTokens get { if let backgroundColor = _backgroundColor { return backgroundColor } if inverted { - if type == .secondary { return Color(uiColor: VDSColor.paletteGray20) } + if type == .secondary || type == .standard { return Color(uiColor: VDSColor.paletteGray20) } return Color(uiColor: VDSColor.elementsPrimaryOndark) } - if type == .secondary { return Color(uiColor: VDSColor.paletteGray85) } + if type == .secondary || type == .standard { return Color(uiColor: VDSColor.paletteGray85) } return Color(uiColor: VDSColor.elementsPrimaryOnlight) } set {