From a04ccd9bf55d06957724f3f10d6002fb4442ea88 Mon Sep 17 00:00:00 2001 From: Scott Pfeil Date: Tue, 7 May 2024 10:44:53 -0400 Subject: [PATCH 01/31] Digital ACT191 story ONEAPP-7847 - Updating the VDS tokens library --- VDS.xcodeproj/project.pbxproj | 6 ++++-- VDS/BaseClasses/Selector/SelectorBase.swift | 2 +- VDS/BaseClasses/Selector/SelectorGroupBase.swift | 2 +- VDS/BaseClasses/Selector/SelectorItemBase.swift | 2 +- VDS/Components/Badge/Badge.swift | 2 +- VDS/Components/BadgeIndicator/BadgeIndicator.swift | 2 +- VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift | 2 +- VDS/Components/Breadcrumbs/BreadcrumbItem.swift | 2 +- VDS/Components/Breadcrumbs/Breadcrumbs.swift | 2 +- VDS/Components/Buttons/Button/Button.swift | 2 +- VDS/Components/Buttons/ButtonBase.swift | 2 +- VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift | 2 +- VDS/Components/Buttons/TextLink/TextLink.swift | 2 +- VDS/Components/Buttons/TextLinkCaret/TextLinkCaret.swift | 2 +- VDS/Components/CarouselScrollbar/CarouselScrollbar.swift | 2 +- VDS/Components/Checkbox/Checkbox.swift | 2 +- VDS/Components/Checkbox/CheckboxGroup.swift | 2 +- VDS/Components/DropdownSelect/DropdownSelect.swift | 2 +- VDS/Components/Icon/ButtonIcon/ButtonIcon.swift | 2 +- VDS/Components/Icon/Icon.swift | 2 +- VDS/Components/Icon/IconName.swift | 2 +- VDS/Components/Label/Attributes/TooltipLabelAttribute.swift | 2 +- VDS/Components/Label/Label.swift | 2 +- VDS/Components/Line/Line.swift | 2 +- VDS/Components/Loader/Loader.swift | 2 +- VDS/Components/Loader/LoaderViewController.swift | 2 +- VDS/Components/Notification/Notification.swift | 2 +- VDS/Components/Pagination/Pagination.swift | 2 +- VDS/Components/Pagination/PaginationButton.swift | 2 +- VDS/Components/Pagination/PaginationCellItem.swift | 2 +- VDS/Components/Pagination/PaginationFlowLayout.swift | 2 +- VDS/Components/RadioBox/RadioBoxItem.swift | 2 +- VDS/Components/RadioButton/RadioButton.swift | 2 +- VDS/Components/Tabs/Tab.swift | 2 +- VDS/Components/Tabs/Tabs.swift | 2 +- VDS/Components/TextFields/EntryFieldBase.swift | 2 +- VDS/Components/TextFields/InputField/InputField.swift | 2 +- VDS/Components/TextFields/TextArea/TextArea.swift | 2 +- VDS/Components/TextFields/TextArea/TextView.swift | 2 +- VDS/Components/TileContainer/TileContainer.swift | 2 +- VDS/Components/Tilelet/Tilelet.swift | 2 +- VDS/Components/TitleLockup/TitleLockup.swift | 2 +- .../TitleLockup/TitleLockupStyleConfiguration.swift | 2 +- VDS/Components/Toggle/Toggle.swift | 2 +- VDS/Components/Toggle/ToggleView.swift | 2 +- VDS/Components/Tooltip/Tooltip.swift | 2 +- VDS/Components/Tooltip/TooltipAlertViewController.swift | 2 +- VDS/Components/Tooltip/TooltipDialog.swift | 2 +- VDS/Extensions/UIColor+VDSColor.swift | 6 +++--- VDS/Extensions/UIColor.swift | 2 +- VDS/Extensions/UIView+CALayer.swift | 2 +- VDS/Extensions/UIView+NSLayoutConstraint.swift | 2 +- VDS/Protocols/LayoutConstraintable.swift | 2 +- VDS/Protocols/Surfaceable.swift | 2 +- VDS/Protocols/Useable.swift | 2 +- VDS/Typography/Typogprahy+Styles.swift | 2 +- VDS/Typography/Typography+Additional.swift | 2 +- VDS/Typography/Typography+Base.swift | 2 +- 58 files changed, 63 insertions(+), 61 deletions(-) diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index cd08241d..15310b9e 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -39,6 +39,7 @@ 71FC86E02B973AE500700965 /* DropShadowConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71FC86DF2B973AE500700965 /* DropShadowConfiguration.swift */; }; 71FC86E22B97483000700965 /* Clamping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71FC86E12B97483000700965 /* Clamping.swift */; }; 71FC86E42B9841AC00700965 /* PaginationFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71FC86E32B9841AC00700965 /* PaginationFlowLayout.swift */; }; + AF1CEFE42BEA736A0001F9A5 /* VDSCoreTokens.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF1CEFE32BEA736A0001F9A5 /* VDSCoreTokens.xcframework */; }; EA0B18022A9E236900F2D0CD /* SelectorGroupBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0B18012A9E236900F2D0CD /* SelectorGroupBase.swift */; }; EA0B18052A9E2D2D00F2D0CD /* SelectorBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0B18032A9E2D2D00F2D0CD /* SelectorBase.swift */; }; EA0B18062A9E2D2D00F2D0CD /* SelectorItemBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0B18042A9E2D2D00F2D0CD /* SelectorItemBase.swift */; }; @@ -51,7 +52,6 @@ EA0D1C412A6AD61C00E5C127 /* Typography+Additional.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0D1C402A6AD61C00E5C127 /* Typography+Additional.swift */; }; EA0D1C452A6AD73000E5C127 /* RawRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0D1C442A6AD73000E5C127 /* RawRepresentable.swift */; }; EA0FC2C62914222900DF80B4 /* ButtonGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0FC2C52914222900DF80B4 /* ButtonGroup.swift */; }; - EA21C5DB2B600EDE00CFC139 /* VDSTokens.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA21C5DA2B600EDD00CFC139 /* VDSTokens.xcframework */; }; EA297A5529FB07760031ED56 /* TooltipLabelAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA297A5429FB07760031ED56 /* TooltipLabelAttribute.swift */; }; EA297A5729FB0A360031ED56 /* AppleGuidelinesTouchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA297A5629FB0A360031ED56 /* AppleGuidelinesTouchable.swift */; }; EA2DC9B02BE175BA004F58C5 /* RequiredRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA2DC9AF2BE175BA004F58C5 /* RequiredRule.swift */; }; @@ -232,6 +232,7 @@ 71FC86DF2B973AE500700965 /* DropShadowConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropShadowConfiguration.swift; sourceTree = ""; }; 71FC86E12B97483000700965 /* Clamping.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Clamping.swift; sourceTree = ""; }; 71FC86E32B9841AC00700965 /* PaginationFlowLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginationFlowLayout.swift; sourceTree = ""; }; + AF1CEFE32BEA736A0001F9A5 /* VDSCoreTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSCoreTokens.xcframework; path = ../SharedFrameworks/VDSCoreTokens.xcframework; sourceTree = ""; }; EA0B18012A9E236900F2D0CD /* SelectorGroupBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectorGroupBase.swift; sourceTree = ""; }; EA0B18032A9E2D2D00F2D0CD /* SelectorBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectorBase.swift; sourceTree = ""; }; EA0B18042A9E2D2D00F2D0CD /* SelectorItemBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectorItemBase.swift; sourceTree = ""; }; @@ -389,7 +390,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - EA21C5DB2B600EDE00CFC139 /* VDSTokens.xcframework in Frameworks */, + AF1CEFE42BEA736A0001F9A5 /* VDSCoreTokens.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -578,6 +579,7 @@ EA33618D288B1C0C0071C351 /* Frameworks */ = { isa = PBXGroup; children = ( + AF1CEFE32BEA736A0001F9A5 /* VDSCoreTokens.xcframework */, EA21C5DA2B600EDD00CFC139 /* VDSTokens.xcframework */, ); name = Frameworks; diff --git a/VDS/BaseClasses/Selector/SelectorBase.swift b/VDS/BaseClasses/Selector/SelectorBase.swift index 0b29f4e2..4ea3ebd3 100644 --- a/VDS/BaseClasses/Selector/SelectorBase.swift +++ b/VDS/BaseClasses/Selector/SelectorBase.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens public protocol SelectorControlable: Control, Changeable { /// Whether not to show the error. diff --git a/VDS/BaseClasses/Selector/SelectorGroupBase.swift b/VDS/BaseClasses/Selector/SelectorGroupBase.swift index 1639ab86..c34f07da 100644 --- a/VDS/BaseClasses/Selector/SelectorGroupBase.swift +++ b/VDS/BaseClasses/Selector/SelectorGroupBase.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens public protocol SelectorGroup { associatedtype SelectorItemType: Control diff --git a/VDS/BaseClasses/Selector/SelectorItemBase.swift b/VDS/BaseClasses/Selector/SelectorItemBase.swift index 3dd31dda..1f2db58a 100644 --- a/VDS/BaseClasses/Selector/SelectorItemBase.swift +++ b/VDS/BaseClasses/Selector/SelectorItemBase.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens /// Base Class used to build out a SelectorControlable control. open class SelectorItemBase: Control, Errorable, Changeable { diff --git a/VDS/Components/Badge/Badge.swift b/VDS/Components/Badge/Badge.swift index 7e8ca443..43f702fa 100644 --- a/VDS/Components/Badge/Badge.swift +++ b/VDS/Components/Badge/Badge.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A badge is a visual label used to convey status or highlight supplemental information. diff --git a/VDS/Components/BadgeIndicator/BadgeIndicator.swift b/VDS/Components/BadgeIndicator/BadgeIndicator.swift index a327270d..72250fc4 100644 --- a/VDS/Components/BadgeIndicator/BadgeIndicator.swift +++ b/VDS/Components/BadgeIndicator/BadgeIndicator.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A badge indicator is a visual label used to convey status or highlight supplemental information. diff --git a/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift b/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift index 424ebcf3..836a3c2e 100644 --- a/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift +++ b/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift @@ -6,7 +6,7 @@ // import UIKit -import VDSTokens +import VDSCoreTokens ///This is customised view for Breadcrumb cell item final class BreadcrumbCellItem: UICollectionViewCell { diff --git a/VDS/Components/Breadcrumbs/BreadcrumbItem.swift b/VDS/Components/Breadcrumbs/BreadcrumbItem.swift index f12d9646..b2fcbe23 100644 --- a/VDS/Components/Breadcrumbs/BreadcrumbItem.swift +++ b/VDS/Components/Breadcrumbs/BreadcrumbItem.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A Breadcrumb Item contains href(link) and selected flag. diff --git a/VDS/Components/Breadcrumbs/Breadcrumbs.swift b/VDS/Components/Breadcrumbs/Breadcrumbs.swift index 7c88e18a..3fdd6d43 100644 --- a/VDS/Components/Breadcrumbs/Breadcrumbs.swift +++ b/VDS/Components/Breadcrumbs/Breadcrumbs.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A Breadcrumbs contains BreadcrumbItems. diff --git a/VDS/Components/Buttons/Button/Button.swift b/VDS/Components/Buttons/Button/Button.swift index 7efb16da..f4147f54 100644 --- a/VDS/Components/Buttons/Button/Button.swift +++ b/VDS/Components/Buttons/Button/Button.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A button is an interactive element that triggers an action. Buttons are prominent and attention-getting, with more visual emphasis than any of the Text Link components. For this reason, buttons are best suited for critical and driving actions. This class can be used within a ``ButtonGroup``. diff --git a/VDS/Components/Buttons/ButtonBase.swift b/VDS/Components/Buttons/ButtonBase.swift index 80010ee5..b3b5f38d 100644 --- a/VDS/Components/Buttons/ButtonBase.swift +++ b/VDS/Components/Buttons/ButtonBase.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// Base class used for UIButton type classes. diff --git a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift index d9026280..124a7fba 100644 --- a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift +++ b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A button group contains combinations of related CTAs including ``Button``, ``TextLink``, and ``TextLinkCaret``. This group component controls a combination's orientation, spacing, size and allowable size pairings. diff --git a/VDS/Components/Buttons/TextLink/TextLink.swift b/VDS/Components/Buttons/TextLink/TextLink.swift index 9cff288c..e0aac99c 100644 --- a/VDS/Components/Buttons/TextLink/TextLink.swift +++ b/VDS/Components/Buttons/TextLink/TextLink.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A text link is an interactive element that navigates a customer to pages within an experience, like a “Bill details” page, or triggers a secondary action, diff --git a/VDS/Components/Buttons/TextLinkCaret/TextLinkCaret.swift b/VDS/Components/Buttons/TextLinkCaret/TextLinkCaret.swift index 52ad9b82..83d057c1 100644 --- a/VDS/Components/Buttons/TextLinkCaret/TextLinkCaret.swift +++ b/VDS/Components/Buttons/TextLinkCaret/TextLinkCaret.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A text link caret is an interactive element that always brings a customer to another page. It's used for navigation, diff --git a/VDS/Components/CarouselScrollbar/CarouselScrollbar.swift b/VDS/Components/CarouselScrollbar/CarouselScrollbar.swift index 00e810d3..b4213f32 100644 --- a/VDS/Components/CarouselScrollbar/CarouselScrollbar.swift +++ b/VDS/Components/CarouselScrollbar/CarouselScrollbar.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A carousel scrollbar is a control that allows to navigate between items in a carousel. diff --git a/VDS/Components/Checkbox/Checkbox.swift b/VDS/Components/Checkbox/Checkbox.swift index 550b6db1..a999e74a 100644 --- a/VDS/Components/Checkbox/Checkbox.swift +++ b/VDS/Components/Checkbox/Checkbox.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens /// Checkboxes are a multi-select component through which a customer indicates a choice. This is also used within /// ``CheckboxItem`` and ``CheckboxGroup`` diff --git a/VDS/Components/Checkbox/CheckboxGroup.swift b/VDS/Components/Checkbox/CheckboxGroup.swift index 1df8d9cd..f7b7e2ef 100644 --- a/VDS/Components/Checkbox/CheckboxGroup.swift +++ b/VDS/Components/Checkbox/CheckboxGroup.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens /// When the choice has multiple options, use a checkbox group. For example, use a checkbox group when /// asking a customer which attributes they would like to filter their search by. This uses ``CheckboxItem`` diff --git a/VDS/Components/DropdownSelect/DropdownSelect.swift b/VDS/Components/DropdownSelect/DropdownSelect.swift index e86b3792..b1b705af 100644 --- a/VDS/Components/DropdownSelect/DropdownSelect.swift +++ b/VDS/Components/DropdownSelect/DropdownSelect.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A dropdown select is an expandable menu of predefined options that allows a customer to make a single selection. diff --git a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift index b97a1fac..ae18735d 100644 --- a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift +++ b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A button icon is an interactive element that visually communicates the action it triggers via an icon. diff --git a/VDS/Components/Icon/Icon.swift b/VDS/Components/Icon/Icon.swift index 09c1ffec..644d9775 100644 --- a/VDS/Components/Icon/Icon.swift +++ b/VDS/Components/Icon/Icon.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// An icon is a graphical element that conveys information at a glance. It helps orient diff --git a/VDS/Components/Icon/IconName.swift b/VDS/Components/Icon/IconName.swift index 3a17f686..116c9de6 100644 --- a/VDS/Components/Icon/IconName.swift +++ b/VDS/Components/Icon/IconName.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens extension Icon { diff --git a/VDS/Components/Label/Attributes/TooltipLabelAttribute.swift b/VDS/Components/Label/Attributes/TooltipLabelAttribute.swift index 20666b10..0be1e58f 100644 --- a/VDS/Components/Label/Attributes/TooltipLabelAttribute.swift +++ b/VDS/Components/Label/Attributes/TooltipLabelAttribute.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens public class TooltipLabelAttribute: ActionLabelAttributeModel, TooltipLaunchable { public var id = UUID() diff --git a/VDS/Components/Label/Label.swift b/VDS/Components/Label/Label.swift index febb12ca..57847ee6 100644 --- a/VDS/Components/Label/Label.swift +++ b/VDS/Components/Label/Label.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// Label is a standard view used to draw text with applying Typography through ``TextStyle`` as well diff --git a/VDS/Components/Line/Line.swift b/VDS/Components/Line/Line.swift index 0706bc1f..e6edae70 100644 --- a/VDS/Components/Line/Line.swift +++ b/VDS/Components/Line/Line.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens /// A line visually separates content sections or elements in lists, tables and layouts to indicate content hierarchy. @objc(VDSLine) diff --git a/VDS/Components/Loader/Loader.swift b/VDS/Components/Loader/Loader.swift index fb2f5371..13ceeb43 100644 --- a/VDS/Components/Loader/Loader.swift +++ b/VDS/Components/Loader/Loader.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens /// A loader is an indicator that uses animation to show customers that there is an indefinite amount of wait time while a task is ongoing, e.g. a page is loading, a form is being submitted. The component disappears when the task is complete. diff --git a/VDS/Components/Loader/LoaderViewController.swift b/VDS/Components/Loader/LoaderViewController.swift index 126c7903..65639c18 100644 --- a/VDS/Components/Loader/LoaderViewController.swift +++ b/VDS/Components/Loader/LoaderViewController.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens /// ViewController to show the Loader, this will be presented using the LoaderLaunchable Protocl. open class LoaderViewController: UIViewController, Surfaceable { diff --git a/VDS/Components/Notification/Notification.swift b/VDS/Components/Notification/Notification.swift index bd4df763..24cfa758 100644 --- a/VDS/Components/Notification/Notification.swift +++ b/VDS/Components/Notification/Notification.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// Notifications are prominent, attention-getting banners that provide information diff --git a/VDS/Components/Pagination/Pagination.swift b/VDS/Components/Pagination/Pagination.swift index d3c0298a..13478d85 100644 --- a/VDS/Components/Pagination/Pagination.swift +++ b/VDS/Components/Pagination/Pagination.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine ///Pagination is a control that enables customers to navigate multiple pages of content by selecting either a specific page or the next or previous set of four pages. diff --git a/VDS/Components/Pagination/PaginationButton.swift b/VDS/Components/Pagination/PaginationButton.swift index 10745931..05ef64ee 100644 --- a/VDS/Components/Pagination/PaginationButton.swift +++ b/VDS/Components/Pagination/PaginationButton.swift @@ -6,7 +6,7 @@ // import UIKit -import VDSTokens +import VDSCoreTokens ///This is customised button for Pagination view @objc(PaginationButton) diff --git a/VDS/Components/Pagination/PaginationCellItem.swift b/VDS/Components/Pagination/PaginationCellItem.swift index c2a1551b..4e9b3795 100644 --- a/VDS/Components/Pagination/PaginationCellItem.swift +++ b/VDS/Components/Pagination/PaginationCellItem.swift @@ -6,7 +6,7 @@ // import UIKit -import VDSTokens +import VDSCoreTokens ///This is customised view for Pagination cell item final class PaginationCellItem: UICollectionViewCell { diff --git a/VDS/Components/Pagination/PaginationFlowLayout.swift b/VDS/Components/Pagination/PaginationFlowLayout.swift index 07d25193..ca91b586 100644 --- a/VDS/Components/Pagination/PaginationFlowLayout.swift +++ b/VDS/Components/Pagination/PaginationFlowLayout.swift @@ -6,7 +6,7 @@ // import Foundation -import VDSTokens +import VDSCoreTokens import UIKit ///Customised flow layout for Pagination view diff --git a/VDS/Components/RadioBox/RadioBoxItem.swift b/VDS/Components/RadioBox/RadioBoxItem.swift index 1a9d613f..212ebd99 100644 --- a/VDS/Components/RadioBox/RadioBoxItem.swift +++ b/VDS/Components/RadioBox/RadioBoxItem.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens /// Radio boxes are single-select components through which a customer indicates a choice /// that are used within a ``RadioBoxGroup``. diff --git a/VDS/Components/RadioButton/RadioButton.swift b/VDS/Components/RadioButton/RadioButton.swift index 960d0348..36a2cedf 100644 --- a/VDS/Components/RadioButton/RadioButton.swift +++ b/VDS/Components/RadioButton/RadioButton.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens /// Radio buttons are single-select components through which a customer indicates a choice. /// They must always be paired with one or more ``RadioButtonItem`` within a ``RadioButtonGroup``. diff --git a/VDS/Components/Tabs/Tab.swift b/VDS/Components/Tabs/Tab.swift index e96e20d6..476f5ea7 100644 --- a/VDS/Components/Tabs/Tab.swift +++ b/VDS/Components/Tabs/Tab.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine extension Tabs { diff --git a/VDS/Components/Tabs/Tabs.swift b/VDS/Components/Tabs/Tabs.swift index 225b3f98..1810f612 100644 --- a/VDS/Components/Tabs/Tabs.swift +++ b/VDS/Components/Tabs/Tabs.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens /// Tabs are organizational components that group content and allow customers to navigate its display. Use them to separate content when the content is related but doesn’t need to be compared. @objc(VDSTabs) diff --git a/VDS/Components/TextFields/EntryFieldBase.swift b/VDS/Components/TextFields/EntryFieldBase.swift index 644a8de1..5cdda6b5 100644 --- a/VDS/Components/TextFields/EntryFieldBase.swift +++ b/VDS/Components/TextFields/EntryFieldBase.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// Base Class used to build out a Input controls. diff --git a/VDS/Components/TextFields/InputField/InputField.swift b/VDS/Components/TextFields/InputField/InputField.swift index 640538fe..54687a1a 100644 --- a/VDS/Components/TextFields/InputField/InputField.swift +++ b/VDS/Components/TextFields/InputField/InputField.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// An input field is an input wherein a customer enters information. They typically appear in forms. diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index 7229c4a9..a9003aa1 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A text area is an input wherein a customer enters long-form information. diff --git a/VDS/Components/TextFields/TextArea/TextView.swift b/VDS/Components/TextFields/TextArea/TextView.swift index c35b4a80..f0e9f199 100644 --- a/VDS/Components/TextFields/TextArea/TextView.swift +++ b/VDS/Components/TextFields/TextArea/TextView.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens @objc(VDSTextView) open class TextView: UITextView, ViewProtocol { diff --git a/VDS/Components/TileContainer/TileContainer.swift b/VDS/Components/TileContainer/TileContainer.swift index b4b62ab1..97ed0f4f 100644 --- a/VDS/Components/TileContainer/TileContainer.swift +++ b/VDS/Components/TileContainer/TileContainer.swift @@ -6,7 +6,7 @@ // import Foundation -import VDSTokens +import VDSCoreTokens import UIKit import Combine diff --git a/VDS/Components/Tilelet/Tilelet.swift b/VDS/Components/Tilelet/Tilelet.swift index fe9fe7f1..45271a81 100644 --- a/VDS/Components/Tilelet/Tilelet.swift +++ b/VDS/Components/Tilelet/Tilelet.swift @@ -7,7 +7,7 @@ import Foundation import Foundation -import VDSTokens +import VDSCoreTokens import UIKit import Combine diff --git a/VDS/Components/TitleLockup/TitleLockup.swift b/VDS/Components/TitleLockup/TitleLockup.swift index c0c3b0b5..79562726 100644 --- a/VDS/Components/TitleLockup/TitleLockup.swift +++ b/VDS/Components/TitleLockup/TitleLockup.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// Title Lockup ensures the readability of words on the screen diff --git a/VDS/Components/TitleLockup/TitleLockupStyleConfiguration.swift b/VDS/Components/TitleLockup/TitleLockupStyleConfiguration.swift index a8fe9160..1d4ea10c 100644 --- a/VDS/Components/TitleLockup/TitleLockupStyleConfiguration.swift +++ b/VDS/Components/TitleLockup/TitleLockupStyleConfiguration.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens extension TitleLockup { diff --git a/VDS/Components/Toggle/Toggle.swift b/VDS/Components/Toggle/Toggle.swift index 812d47d0..6518e8db 100644 --- a/VDS/Components/Toggle/Toggle.swift +++ b/VDS/Components/Toggle/Toggle.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A toggle is a control that lets customers instantly turn on diff --git a/VDS/Components/Toggle/ToggleView.swift b/VDS/Components/Toggle/ToggleView.swift index 230e9c82..4889ed40 100644 --- a/VDS/Components/Toggle/ToggleView.swift +++ b/VDS/Components/Toggle/ToggleView.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A toggle is a control that lets customers instantly turn on diff --git a/VDS/Components/Tooltip/Tooltip.swift b/VDS/Components/Tooltip/Tooltip.swift index 0225e229..0875ee64 100644 --- a/VDS/Components/Tooltip/Tooltip.swift +++ b/VDS/Components/Tooltip/Tooltip.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A tooltip is an overlay that clarifies another component or content diff --git a/VDS/Components/Tooltip/TooltipAlertViewController.swift b/VDS/Components/Tooltip/TooltipAlertViewController.swift index 4c88b55e..043f07f4 100644 --- a/VDS/Components/Tooltip/TooltipAlertViewController.swift +++ b/VDS/Components/Tooltip/TooltipAlertViewController.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens open class TooltipAlertViewController: UIViewController, Surfaceable { diff --git a/VDS/Components/Tooltip/TooltipDialog.swift b/VDS/Components/Tooltip/TooltipDialog.swift index 9822baae..487596cf 100644 --- a/VDS/Components/Tooltip/TooltipDialog.swift +++ b/VDS/Components/Tooltip/TooltipDialog.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens open class TooltipDialog: View, UIScrollViewDelegate { diff --git a/VDS/Extensions/UIColor+VDSColor.swift b/VDS/Extensions/UIColor+VDSColor.swift index c622db33..e0254f99 100644 --- a/VDS/Extensions/UIColor+VDSColor.swift +++ b/VDS/Extensions/UIColor+VDSColor.swift @@ -6,7 +6,7 @@ // import Foundation -import VDSTokens +import VDSCoreTokens import UIKit extension UIColor { @@ -149,11 +149,11 @@ extension UIColor { /// Map each color name to its corresponding UIColor object. public var uiColor: UIColor { do { - let color = try VDSTokens.VDSColor.getTokenByString(tokenName: "VDSColor.\(rawValue)") + let color = try VDSCoreTokens.VDSColor.getTokenByString(tokenName: "VDSColor.\(rawValue)") return color } catch { print(error) - return VDSTokens.VDSColor.paletteBlack + return VDSCoreTokens.VDSColor.paletteBlack } } } diff --git a/VDS/Extensions/UIColor.swift b/VDS/Extensions/UIColor.swift index 8814832b..aad6e180 100644 --- a/VDS/Extensions/UIColor.swift +++ b/VDS/Extensions/UIColor.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens extension UIColor { //-------------------------------------------------- diff --git a/VDS/Extensions/UIView+CALayer.swift b/VDS/Extensions/UIView+CALayer.swift index 18c19e49..3c1db6a5 100644 --- a/VDS/Extensions/UIView+CALayer.swift +++ b/VDS/Extensions/UIView+CALayer.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens //-------------------------------------------------- // MARK: - Debug Borders diff --git a/VDS/Extensions/UIView+NSLayoutConstraint.swift b/VDS/Extensions/UIView+NSLayoutConstraint.swift index 563c6ca1..900135e1 100644 --- a/VDS/Extensions/UIView+NSLayoutConstraint.swift +++ b/VDS/Extensions/UIView+NSLayoutConstraint.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens extension UIView { public func constraint(with identifier: String) -> NSLayoutConstraint? { diff --git a/VDS/Protocols/LayoutConstraintable.swift b/VDS/Protocols/LayoutConstraintable.swift index 9bec05a1..3e40885b 100644 --- a/VDS/Protocols/LayoutConstraintable.swift +++ b/VDS/Protocols/LayoutConstraintable.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens public protocol LayoutConstraintable { var superview: UIView? { get } diff --git a/VDS/Protocols/Surfaceable.swift b/VDS/Protocols/Surfaceable.swift index 0ad804d6..b62c9b59 100644 --- a/VDS/Protocols/Surfaceable.swift +++ b/VDS/Protocols/Surfaceable.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens /// The background tint that the component will be placed on. This will automatically adjust other elements as needed and takes "light" or "dark" public enum Surface: String, Equatable { diff --git a/VDS/Protocols/Useable.swift b/VDS/Protocols/Useable.swift index 6fe9471e..5e127f9b 100644 --- a/VDS/Protocols/Useable.swift +++ b/VDS/Protocols/Useable.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens /// Enum to describe types of use. public enum Use: String, Equatable { diff --git a/VDS/Typography/Typogprahy+Styles.swift b/VDS/Typography/Typogprahy+Styles.swift index 6c784242..f2f572a8 100644 --- a/VDS/Typography/Typogprahy+Styles.swift +++ b/VDS/Typography/Typogprahy+Styles.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens //MARK: Definitions extension TextStyle { diff --git a/VDS/Typography/Typography+Additional.swift b/VDS/Typography/Typography+Additional.swift index 427af98b..39943682 100644 --- a/VDS/Typography/Typography+Additional.swift +++ b/VDS/Typography/Typography+Additional.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens //MARK: Alignments extension TextStyle { diff --git a/VDS/Typography/Typography+Base.swift b/VDS/Typography/Typography+Base.swift index 2209ea98..ce745be7 100644 --- a/VDS/Typography/Typography+Base.swift +++ b/VDS/Typography/Typography+Base.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens /// This is the Definition that will determine how the Text is drawn From c6b98b2ff6d31bef1c266759c967e489e71927ca Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 7 May 2024 14:14:54 -0500 Subject: [PATCH 02/31] updated to new tokens package Signed-off-by: Matt Bruce --- VDS/Components/TitleLockup/TitleLockupTextColor.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/TitleLockup/TitleLockupTextColor.swift b/VDS/Components/TitleLockup/TitleLockupTextColor.swift index c0760b6f..7ce56952 100644 --- a/VDS/Components/TitleLockup/TitleLockupTextColor.swift +++ b/VDS/Components/TitleLockup/TitleLockupTextColor.swift @@ -6,7 +6,7 @@ // import Foundation -import VDSTokens +import VDSCoreTokens import UIKit extension TitleLockup { From 757783deb245aa402f974cd8fa891caecc1fa0b1 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 7 May 2024 14:20:14 -0500 Subject: [PATCH 03/31] new colors Signed-off-by: Matt Bruce --- VDS/Extensions/UIColor+VDSColor.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/VDS/Extensions/UIColor+VDSColor.swift b/VDS/Extensions/UIColor+VDSColor.swift index cbcf7ae7..c0d69b59 100644 --- a/VDS/Extensions/UIColor+VDSColor.swift +++ b/VDS/Extensions/UIColor+VDSColor.swift @@ -47,6 +47,7 @@ extension UIColor { case paletteGreen61 case paletteGreen36 case paletteGreen26 + case paletteGreen22 case paletteGreen15 case paletteGreen10 case palettePink87 @@ -59,6 +60,16 @@ extension UIColor { case palettePurple60 case palettePurple39 case palettePurple20 + case paletteMonarchred + case paletteStone + case paletteNeonyellow + case paletteCoral + case paletteWarmgray95 + case paletteWarmgray84 + case paletteWarmgray64 + case paletteWarmgray41 + case paletteWarmgray20 + case paletteWarmgray11 case backgroundPrimaryLight case backgroundPrimaryDark case backgroundPrimaryInverseLight @@ -145,7 +156,7 @@ extension UIColor { case badgesBackgroundWhiteOndark case badgesBackgroundBlackOnlight case badgesBackgroundBlackOndark - + /// Map each color name to its corresponding UIColor object. public var uiColor: UIColor { do { From 9c0f055307ff8c10c24a9dcb30ee94d37487da7a Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 7 May 2024 14:20:14 -0500 Subject: [PATCH 04/31] updated corner radius for TileContainer Signed-off-by: Matt Bruce --- VDS/Components/TileContainer/TileContainer.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/TileContainer/TileContainer.swift b/VDS/Components/TileContainer/TileContainer.swift index a50489e1..eafa36b0 100644 --- a/VDS/Components/TileContainer/TileContainer.swift +++ b/VDS/Components/TileContainer/TileContainer.swift @@ -187,7 +187,7 @@ open class TileContainerBase: Control where Padding //-------------------------------------------------- // MARK: - Configuration //-------------------------------------------------- - private let cornerRadius = VDSFormControls.borderRadius * 2 + private let cornerRadius = VDSLayout.shapeCornerradiusTiles internal var backgroundColorConfiguration = BackgroundColorConfiguration() private let dropShadowConfiguration = DropShadowConfiguration().with { $0.shadowColorConfiguration = SurfaceColorConfiguration().with { From 6c5dcf6238e8a6c47a2bdb61bb49de9faddd0f55 Mon Sep 17 00:00:00 2001 From: Scott Pfeil Date: Mon, 20 May 2024 15:31:48 -0400 Subject: [PATCH 05/31] Digital ACT191 story ONEAPP-7459 - Update VDS framework --- VDS/Components/Calendar/Calendar.swift | 2 +- VDS/Components/Calendar/CalendarDateViewCell.swift | 2 +- VDS/Components/Calendar/CalendarFooterReusableView.swift | 2 +- VDS/Components/Calendar/CalendarHeaderReusableView.swift | 2 +- VDS/Components/DatePicker/DatePicker.swift | 2 +- VDS/Components/TextFields/InputField/FieldTypes/FieldType.swift | 2 +- .../TextFields/InputField/FieldTypes/SecurityCode.swift | 2 +- VDS/Components/Tilelet/TileletIconModels.swift | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/VDS/Components/Calendar/Calendar.swift b/VDS/Components/Calendar/Calendar.swift index fd3e3452..27d9b011 100644 --- a/VDS/Components/Calendar/Calendar.swift +++ b/VDS/Components/Calendar/Calendar.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A calendar is a monthly view that lets customers select a single date. diff --git a/VDS/Components/Calendar/CalendarDateViewCell.swift b/VDS/Components/Calendar/CalendarDateViewCell.swift index d66522d0..4b6f400d 100644 --- a/VDS/Components/Calendar/CalendarDateViewCell.swift +++ b/VDS/Components/Calendar/CalendarDateViewCell.swift @@ -6,7 +6,7 @@ // import UIKit -import VDSTokens +import VDSCoreTokens final class CalendarDateViewCell: UICollectionViewCell { diff --git a/VDS/Components/Calendar/CalendarFooterReusableView.swift b/VDS/Components/Calendar/CalendarFooterReusableView.swift index 9547084f..a34eb763 100644 --- a/VDS/Components/Calendar/CalendarFooterReusableView.swift +++ b/VDS/Components/Calendar/CalendarFooterReusableView.swift @@ -6,7 +6,7 @@ // import UIKit -import VDSTokens +import VDSCoreTokens /// Footer view to show indicators data. class CalendarFooterReusableView: UICollectionReusableView { diff --git a/VDS/Components/Calendar/CalendarHeaderReusableView.swift b/VDS/Components/Calendar/CalendarHeaderReusableView.swift index d0f7f247..908833ec 100644 --- a/VDS/Components/Calendar/CalendarHeaderReusableView.swift +++ b/VDS/Components/Calendar/CalendarHeaderReusableView.swift @@ -6,7 +6,7 @@ // import UIKit -import VDSTokens +import VDSCoreTokens /// Header view to display month and year along with days of week. class CalendarHeaderReusableView: UICollectionReusableView { diff --git a/VDS/Components/DatePicker/DatePicker.swift b/VDS/Components/DatePicker/DatePicker.swift index ff9fbb06..42477151 100644 --- a/VDS/Components/DatePicker/DatePicker.swift +++ b/VDS/Components/DatePicker/DatePicker.swift @@ -1,6 +1,6 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens import Combine /// A dropdown select is an expandable menu of predefined options that allows a customer to make a single selection. diff --git a/VDS/Components/TextFields/InputField/FieldTypes/FieldType.swift b/VDS/Components/TextFields/InputField/FieldTypes/FieldType.swift index ebecb17d..3862afb9 100644 --- a/VDS/Components/TextFields/InputField/FieldTypes/FieldType.swift +++ b/VDS/Components/TextFields/InputField/FieldTypes/FieldType.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens extension InputField { diff --git a/VDS/Components/TextFields/InputField/FieldTypes/SecurityCode.swift b/VDS/Components/TextFields/InputField/FieldTypes/SecurityCode.swift index cf60eb9a..b8883881 100644 --- a/VDS/Components/TextFields/InputField/FieldTypes/SecurityCode.swift +++ b/VDS/Components/TextFields/InputField/FieldTypes/SecurityCode.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens extension InputField { diff --git a/VDS/Components/Tilelet/TileletIconModels.swift b/VDS/Components/Tilelet/TileletIconModels.swift index 788a2155..fb0ed729 100644 --- a/VDS/Components/Tilelet/TileletIconModels.swift +++ b/VDS/Components/Tilelet/TileletIconModels.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens extension Tilelet { From ea60bd142ddc90389fa9902d170a15e15c1a4a92 Mon Sep 17 00:00:00 2001 From: "Hedden, Kyle Matthew" Date: Thu, 30 May 2024 18:38:35 -0400 Subject: [PATCH 06/31] Digital PCT265 defect DE307-545: Adjust line truncation to use ellipsis for cases where the numberOfLines is limited. --- VDS/Components/Label/Label.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/Label/Label.swift b/VDS/Components/Label/Label.swift index 9e4dd18e..b3130abe 100644 --- a/VDS/Components/Label/Label.swift +++ b/VDS/Components/Label/Label.swift @@ -204,7 +204,7 @@ open class Label: UILabel, ViewProtocol, UserInfoable { }.store(in: &subscribers) backgroundColor = .clear numberOfLines = 0 - lineBreakMode = .byWordWrapping + lineBreakMode = .byTruncatingTail translatesAutoresizingMaskIntoConstraints = false accessibilityCustomActions = [] isAccessibilityElement = true From c2f053dec85293ceaed827723b78df745dc7413d Mon Sep 17 00:00:00 2001 From: Scott Pfeil Date: Wed, 5 Jun 2024 12:49:47 -0400 Subject: [PATCH 07/31] Update to proper framework name --- VDS/Components/TextFields/InputField/TextField.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/TextFields/InputField/TextField.swift b/VDS/Components/TextFields/InputField/TextField.swift index b054741d..eff54f33 100644 --- a/VDS/Components/TextFields/InputField/TextField.swift +++ b/VDS/Components/TextFields/InputField/TextField.swift @@ -8,7 +8,7 @@ import Foundation import UIKit import Combine -import VDSTokens +import VDSCoreTokens @objc(VDSTextField) open class TextField: UITextField, ViewProtocol, Errorable { From 575a68bf98c2d3a3567835e07138b5f8975b38b0 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 7 Jun 2024 13:14:41 -0500 Subject: [PATCH 08/31] updated to VDSCoreTokens Signed-off-by: Matt Bruce --- VDS/Components/Table/Table.swift | 2 +- VDS/Components/Table/TableCellItem.swift | 2 +- VDS/Components/Table/TableFlowLayout.swift | 2 +- VDS/Components/Table/TableItemModel.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VDS/Components/Table/Table.swift b/VDS/Components/Table/Table.swift index 97452db9..8ce5f462 100644 --- a/VDS/Components/Table/Table.swift +++ b/VDS/Components/Table/Table.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens ///Table is view composed of rows and columns, which takes any view into each cell and resizes based on the highest cell height. @objc(VDSTable) diff --git a/VDS/Components/Table/TableCellItem.swift b/VDS/Components/Table/TableCellItem.swift index 88b6c2d0..23d2df74 100644 --- a/VDS/Components/Table/TableCellItem.swift +++ b/VDS/Components/Table/TableCellItem.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens final class TableCellItem: UICollectionViewCell { diff --git a/VDS/Components/Table/TableFlowLayout.swift b/VDS/Components/Table/TableFlowLayout.swift index 2e447187..3513099d 100644 --- a/VDS/Components/Table/TableFlowLayout.swift +++ b/VDS/Components/Table/TableFlowLayout.swift @@ -6,7 +6,7 @@ // import UIKit -import VDSTokens +import VDSCoreTokens protocol TableCollectionViewLayoutDataDelegate: AnyObject { func collectionView(_ collectionView: UICollectionView, dataForItemAt indexPath: IndexPath) -> TableItemModel diff --git a/VDS/Components/Table/TableItemModel.swift b/VDS/Components/Table/TableItemModel.swift index bd299d1b..47a8e3f2 100644 --- a/VDS/Components/Table/TableItemModel.swift +++ b/VDS/Components/Table/TableItemModel.swift @@ -7,7 +7,7 @@ import Foundation import UIKit -import VDSTokens +import VDSCoreTokens /// Model that represent the content of each cell of Table component public struct TableItemModel { From 19b102348c6833c5246c2031b24122caa89248cd Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 7 Jun 2024 13:33:24 -0500 Subject: [PATCH 09/31] updated release notes for missed tickets Signed-off-by: Matt Bruce --- VDS/SupportingFiles/ReleaseNotes.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 615f10df..87084f51 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,19 +1,25 @@ 1.0.66 ---------------- - ONEAPP-6325 - Table - Development finished -- CXTDT-565087 - InputField - Text - OnDark colors -- CXTDT-565112 - InputField - Credit Card icons -- CXTDT-565117 - InputField - Overflow not clipped -- CXTDT-565105 - InputField - Date - Typeover text not working -- CXTDT-565115 - InputField - CreditCard - China UnionPay does not allow longer numbers -- CXTDT-560823 – TextArea – Accessibility Labels/Error/ReadyOnly/Disabled -- CXTDT-553663 - DropdownSelect – Accessibility - CXTDT-544662 - Breadcrumbs - Text Wrapping - CXTDT-568398 - Calendar - Saturday missing (on smaller screen size devices) - CXTDT-568402 - Calendar - Extra row (on smaller screen size devices) - CXTDT-568409 - Calendar - Width control missing - CXTDT-568419 - Calendar - When hideContainerBorder=true, corner radius disappears - CXTDT-568413 - Calendar - Missing option for Transparent Background +- CXTDT-553663 - DropdownSelect – Accessibility +- CXTDT-565796 - DropdownSelect – Accessibility +- CXTDT-560458 - DropdownSelect - Accessibility +- CXTDT-565087 - InputField - Text - OnDark colors +- CXTDT-565112 - InputField - Credit Card icons +- CXTDT-565117 - InputField - Overflow not clipped +- CXTDT-565105 - InputField - Date - Typeover text not working +- CXTDT-565106 - InputField - CreditCard - Incorrect generic card icon color +- CXTDT-565115 - InputField - CreditCard - China UnionPay does not allow longer numbers +- CXTDT-560823 – TextArea – Accessibility Labels/Error/ReadyOnly/Disabled +- CXTDT-552060 - TextArea - Placeholder text +- CXTDT-565164 – TileContainer – Voiceover reads extra text “Accessible” +- CXTDT-552834 – TileContainer – Voice over is not rendering the information present within the tile container when it receives focus in clickable state. 1.0.65 ---------------- From 15b7e9be62e298a9f45dabc93c461043d67f3611 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 7 Jun 2024 17:19:51 -0500 Subject: [PATCH 10/31] fixed bug in the masked number for credit card. Signed-off-by: Matt Bruce --- .../TextFields/InputField/FieldTypes/CreditCard.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift b/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift index bc3a289a..b0e8a165 100644 --- a/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift +++ b/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift @@ -254,7 +254,7 @@ extension InputField { let rawNumber = number.filter { $0.isNumber } guard rawNumber.count == cardType.maxLength else { return formatCreditCardNumber(cardType, number: number) } let lastFourDigits = rawNumber.suffix(4) - let maskedSection = String(repeating: "•", count: 12) + let maskedSection = String(repeating: "•", count: number.count - lastFourDigits.count) let formattedMaskSection = String.format(maskedSection, indices: cardType.separatorIndices(rawNumber.count), with: " ") return formattedMaskSection + " " + lastFourDigits } From 557bf7d3733f7f4ecb3f0eb824c8663b65c338b7 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 7 Jun 2024 17:40:15 -0500 Subject: [PATCH 11/31] bug to fix issue of the timing of the value being set Signed-off-by: Matt Bruce --- .../InputField/FieldTypes/CreditCard.swift | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift b/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift index b0e8a165..ed457446 100644 --- a/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift +++ b/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift @@ -216,9 +216,12 @@ extension InputField { return false } + // Set the value to the rawNumber, if you don't the onChange will trigger + value = rawNumber + // Set the formatted text textField.text = formattedNumber - + // Calculate the new cursor position if let newPosition = textField.cursorPosition(range: range, replacementString: string, @@ -227,9 +230,6 @@ extension InputField { textField.selectedTextRange = textField.textRange(from: newPosition, to: newPosition) } - // if all passes, then set the number1 - value = rawNumber - // Prevent the default behavior return false } @@ -252,11 +252,20 @@ extension InputField { internal func maskCreditCardNumber(_ cardType: CreditCardType, number: String) -> String { // Mask the first 12 characters if the length is 16 let rawNumber = number.filter { $0.isNumber } - guard rawNumber.count == cardType.maxLength else { return formatCreditCardNumber(cardType, number: number) } + let count = rawNumber.count + let min = cardType.minLength + let max = cardType.maxLength + var shouldFormat: Bool = false + if min == max { + shouldFormat = true + } else { + shouldFormat = count >= min && count <= max + } + guard shouldFormat else { return formatCreditCardNumber(cardType, number: number) } let lastFourDigits = rawNumber.suffix(4) let maskedSection = String(repeating: "•", count: number.count - lastFourDigits.count) - let formattedMaskSection = String.format(maskedSection, indices: cardType.separatorIndices(rawNumber.count), with: " ") - return formattedMaskSection + " " + lastFourDigits + let formattedMaskSection = String.format(maskedSection + lastFourDigits, indices: cardType.separatorIndices(rawNumber.count), with: " ") + return formattedMaskSection } } } From 40129d8ce9723c6b43bb94ecdc0788fca9f2f1fe Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 11 Jun 2024 11:04:46 -0500 Subject: [PATCH 12/31] CXTDT-553663 - DropdownSelect - Accessibility - has popup Signed-off-by: Matt Bruce --- VDS/Components/DropdownSelect/DropdownSelect.swift | 2 +- VDS/SupportingFiles/ReleaseNotes.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VDS/Components/DropdownSelect/DropdownSelect.swift b/VDS/Components/DropdownSelect/DropdownSelect.swift index e001d130..ae07d616 100644 --- a/VDS/Components/DropdownSelect/DropdownSelect.swift +++ b/VDS/Components/DropdownSelect/DropdownSelect.swift @@ -279,7 +279,7 @@ open class DropdownSelect: EntryFieldBase { open override func updateAccessibility() { super.updateAccessibility() fieldStackView.accessibilityLabel = "Dropdown Select, \(accessibilityLabelText)" - fieldStackView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." + fieldStackView.accessibilityHint = isReadOnly || !isEnabled ? "" : "has popup, Double tap to open." fieldStackView.accessibilityValue = value } diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 87084f51..326146fb 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,7 @@ +1.0.67 +---------------- +- CXTDT-553663 - DropdownSelect - Accessibility - has popup + 1.0.66 ---------------- - ONEAPP-6325 - Table - Development finished From c4b77dfc6383df11db2641aa8113ee52ed5df337 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 12 Jun 2024 15:13:47 -0500 Subject: [PATCH 13/31] added custom - container size - icon size - badgeIndicator Offset Signed-off-by: Matt Bruce --- .../Icon/ButtonIcon/ButtonIcon.swift | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift index 5ba6a9fe..1b18f4ce 100644 --- a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift +++ b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift @@ -143,10 +143,7 @@ open class ButtonIcon: Control, Changeable { /// Sets the size of button icon and icon. open var size: Size = .large { didSet { setNeedsUpdate() } } - - /// Sets the size of button icon and icon. - open var customSize: Int? { didSet { setNeedsUpdate() } } - + /// If provided, the button icon will have a box shadow. open var floating: Bool = false { didSet { setNeedsUpdate() } } @@ -169,10 +166,20 @@ open class ButtonIcon: Control, Changeable { setNeedsUpdate() } } - + /// Used to move the icon inside the button in both x and y axis. open var iconOffset: CGPoint = .init(x: 0, y: 0) { didSet { setNeedsUpdate() } } + + /// Sets a custom size of button icon container. + open var customContainerSize: Int? { didSet { setNeedsUpdate() } } + + /// Sets a custom size of the icon. + open var customIconSize: Int? { didSet { setNeedsUpdate() } } + + /// Sets a custom badgeIndicator offset + open var customBadgeIndicatorOffset: CGPoint? { didSet { setNeedsUpdate() } } + //-------------------------------------------------- // MARK: - Configuration //-------------------------------------------------- @@ -444,8 +451,11 @@ open class ButtonIcon: Control, Changeable { icon.name = currentIconName let color = iconColorConfiguration.getColor(self) icon.color = color - icon.size = iconSize - icon.customSize = customSize + if let customIconSize { + icon.customSize = customIconSize + } else { + icon.size = iconSize + } icon.isEnabled = isEnabled } else { icon.reset() @@ -480,8 +490,8 @@ open class ButtonIcon: Control, Changeable { //updating current container size var iconLayoutSize = size.containerSize - if let customSize { - iconLayoutSize = CGFloat(customSize) + if let customContainerSize { + iconLayoutSize = CGFloat(customContainerSize) } // check to see if this is fitToIcon if fitToIcon && kind == .ghost { @@ -503,10 +513,11 @@ open class ButtonIcon: Control, Changeable { layer.borderWidth = 0 } - badgeIndicatorCenterXConstraint?.constant = badgeIndicatorOffset.x + badgeIndicatorDefaultSize.width/2 - badgeIndicatorCenterYConstraint?.constant = badgeIndicatorOffset.y + badgeIndicatorDefaultSize.height/2 - badgeIndicatorLeadingConstraint?.constant = badgeIndicatorOffset.x - badgeIndicatorTrailingConstraint?.constant = badgeIndicatorOffset.x + badgeIndicatorDefaultSize.width + let offSet = customBadgeIndicatorOffset ?? badgeIndicatorOffset + badgeIndicatorCenterXConstraint?.constant = offSet.x + badgeIndicatorDefaultSize.width/2 + badgeIndicatorCenterYConstraint?.constant = offSet.y + badgeIndicatorDefaultSize.height/2 + badgeIndicatorLeadingConstraint?.constant = offSet.x + badgeIndicatorTrailingConstraint?.constant = offSet.x + badgeIndicatorDefaultSize.width if showBadgeIndicator { updateExpandDirectionalConstraints() From f0d0c5638c6dd25a22907139e0a97ba7caad245d Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 13 Jun 2024 13:08:45 -0500 Subject: [PATCH 14/31] don't traverse a view's subviews if the view in question is accessibleElement. Signed-off-by: Matt Bruce --- VDS/Extensions/UIView+Accessibility.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VDS/Extensions/UIView+Accessibility.swift b/VDS/Extensions/UIView+Accessibility.swift index 8710032f..ee247175 100644 --- a/VDS/Extensions/UIView+Accessibility.swift +++ b/VDS/Extensions/UIView+Accessibility.swift @@ -56,8 +56,9 @@ extension UIView { for subview in view.subviews { if subview.isAccessibilityElement && subview.isVisibleOnScreen { elements.append(subview) + } else { + elements.append(contentsOf: gatherAccessibilityElements(from: subview)) } - elements.append(contentsOf: gatherAccessibilityElements(from: subview)) } return elements From a4f08f4923b8748592f1ecffd6304d4ca6062e82 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 13 Jun 2024 13:10:04 -0500 Subject: [PATCH 15/31] set accessibleElements Signed-off-by: Matt Bruce --- VDS/Components/Tabs/Tabs.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VDS/Components/Tabs/Tabs.swift b/VDS/Components/Tabs/Tabs.swift index 90d766eb..4c463900 100644 --- a/VDS/Components/Tabs/Tabs.swift +++ b/VDS/Components/Tabs/Tabs.swift @@ -267,6 +267,8 @@ open class Tabs: View { } } } + accessibilityElements = tabViews + setNeedsUpdate() scrollToSelectedIndex(animated: false) } From c02f355847feb9a8170cbd1c44ef2e61d3829614 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 13 Jun 2024 13:22:30 -0500 Subject: [PATCH 16/31] updated icons Signed-off-by: Matt Bruce --- .../discover.imageset/Contents.json | 2 +- .../discover.imageset/Discover-02.svg | 1 + .../CreditCard/discover.imageset/discover.svg | 49 ------------------ .../CreditCard/jcb.imageset/Contents.json | 2 +- .../jcb.imageset/jcb-emblem-logo.svg | 1 + .../CreditCard/jcb.imageset/jcb.svg | 51 ------------------- 6 files changed, 4 insertions(+), 102 deletions(-) create mode 100644 VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/Discover-02.svg delete mode 100644 VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/discover.svg create mode 100644 VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/jcb-emblem-logo.svg delete mode 100644 VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/jcb.svg diff --git a/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/Contents.json b/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/Contents.json index 28cfbca3..d8a92d8d 100644 --- a/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/Contents.json +++ b/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "discover.svg", + "filename" : "Discover-02.svg", "idiom" : "universal" } ], diff --git a/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/Discover-02.svg b/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/Discover-02.svg new file mode 100644 index 00000000..ea75afb4 --- /dev/null +++ b/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/Discover-02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/discover.svg b/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/discover.svg deleted file mode 100644 index a056ab58..00000000 --- a/VDS/SupportingFiles/Icons.xcassets/CreditCard/discover.imageset/discover.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/Contents.json b/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/Contents.json index 8a4c248a..c4aba6fe 100644 --- a/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/Contents.json +++ b/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "jcb.svg", + "filename" : "jcb-emblem-logo.svg", "idiom" : "universal" } ], diff --git a/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/jcb-emblem-logo.svg b/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/jcb-emblem-logo.svg new file mode 100644 index 00000000..4b8f6dd9 --- /dev/null +++ b/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/jcb-emblem-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/jcb.svg b/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/jcb.svg deleted file mode 100644 index ab197f4b..00000000 --- a/VDS/SupportingFiles/Icons.xcassets/CreditCard/jcb.imageset/jcb.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 0f27e8298782030d98a89b57859073ea7203b201 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 08:47:45 -0500 Subject: [PATCH 17/31] removed duplicate code from base class Signed-off-by: Matt Bruce --- VDS/Components/TextFields/TextArea/TextArea.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index b0d858df..87f9a81d 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -137,7 +137,6 @@ open class TextArea: EntryFieldBase { /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. open override func setup() { super.setup() - fieldStackView.pinToSuperView(.uniform(VDSFormControls.spaceInset)) textView.isScrollEnabled = true textView.autocorrectionType = .no From 9871324c8e876619623af505dac12059fb977f20 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 09:05:22 -0500 Subject: [PATCH 18/31] first cut of accessibility update Signed-off-by: Matt Bruce --- VDS/Components/DatePicker/DatePicker.swift | 38 ++++++++++++++----- .../DropdownSelect/DropdownSelect.swift | 14 +++---- .../TextFields/InputField/InputField.swift | 10 +++-- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/VDS/Components/DatePicker/DatePicker.swift b/VDS/Components/DatePicker/DatePicker.swift index 7645cce5..1bd987fd 100644 --- a/VDS/Components/DatePicker/DatePicker.swift +++ b/VDS/Components/DatePicker/DatePicker.swift @@ -100,16 +100,14 @@ open class DatePicker: EntryFieldBase, DatePickerViewControllerDelegate, UIPopov /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. open override func setup() { super.setup() - - fieldStackView.isAccessibilityElement = true - fieldStackView.accessibilityLabel = "Date Picker" - fieldStackView.accessibilityHint = "Double Tap to open" + + containerView.isAccessibilityElement = true // setting color config selectedDateLabel.textColorConfiguration = primaryColorConfiguration.eraseToAnyColorable() // tap gesture - fieldStackView + containerView .publisher(for: UITapGestureRecognizer()) .sink { [weak self] _ in guard let self else { return } @@ -147,9 +145,31 @@ open class DatePicker: EntryFieldBase, DatePickerViewControllerDelegate, UIPopov open override func updateAccessibility() { super.updateAccessibility() - fieldStackView.accessibilityLabel = "Date Picker, \(accessibilityLabelText)" - fieldStackView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." - fieldStackView.accessibilityValue = value + containerView.accessibilityLabel = "Date Picker, \(accessibilityLabelText)" + containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." + containerView.accessibilityValue = value + } + + open override var accessibilityElements: [Any]? { + get { + var elements = [Any]() + elements.append(contentsOf: [titleLabel, containerView]) + + if showError { + elements.append(statusIcon) + if let errorText, !errorText.isEmpty { + elements.append(errorLabel) + } + } + + if let helperText, !helperText.isEmpty { + elements.append(helperLabel) + } + + return elements + } + + set { super.accessibilityElements = newValue } } /// Resets to default settings. @@ -184,7 +204,7 @@ open class DatePicker: EntryFieldBase, DatePickerViewControllerDelegate, UIPopov controller.dismiss(animated: true) { [weak self] in guard let self else { return } self.sendActions(for: .valueChanged) - UIAccessibility.post(notification: .layoutChanged, argument: self.fieldStackView) + UIAccessibility.post(notification: .layoutChanged, argument: self.containerView) } } diff --git a/VDS/Components/DropdownSelect/DropdownSelect.swift b/VDS/Components/DropdownSelect/DropdownSelect.swift index ae07d616..e825e024 100644 --- a/VDS/Components/DropdownSelect/DropdownSelect.swift +++ b/VDS/Components/DropdownSelect/DropdownSelect.swift @@ -131,7 +131,7 @@ open class DropdownSelect: EntryFieldBase { open override func setup() { super.setup() - fieldStackView.isAccessibilityElement = true + containerView.isAccessibilityElement = true inlineDisplayLabel.isAccessibilityElement = true dropdownField.width(0) @@ -278,15 +278,15 @@ open class DropdownSelect: EntryFieldBase { open override func updateAccessibility() { super.updateAccessibility() - fieldStackView.accessibilityLabel = "Dropdown Select, \(accessibilityLabelText)" - fieldStackView.accessibilityHint = isReadOnly || !isEnabled ? "" : "has popup, Double tap to open." - fieldStackView.accessibilityValue = value + containerView.accessibilityLabel = "Dropdown Select, \(accessibilityLabelText)" + containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : "has popup, Double tap to open." + containerView.accessibilityValue = value } open override var accessibilityElements: [Any]? { get { var elements = [Any]() - elements.append(contentsOf: [titleLabel, fieldStackView]) + elements.append(contentsOf: [titleLabel, containerView]) if showError { elements.append(statusIcon) @@ -310,7 +310,7 @@ open class DropdownSelect: EntryFieldBase { optionsPicker.isHidden = true dropdownField.resignFirstResponder() setNeedsUpdate() - UIAccessibility.post(notification: .layoutChanged, argument: fieldStackView) + UIAccessibility.post(notification: .layoutChanged, argument: containerView) } open override var canBecomeFirstResponder: Bool { @@ -337,8 +337,8 @@ extension DropdownSelect: UIPickerViewDelegate, UIPickerViewDataSource { internal func launchPicker() { if optionsPicker.isHidden { - UIAccessibility.post(notification: .layoutChanged, argument: optionsPicker) dropdownField.becomeFirstResponder() + UIAccessibility.post(notification: .layoutChanged, argument: optionsPicker) } else { dropdownField.resignFirstResponder() } diff --git a/VDS/Components/TextFields/InputField/InputField.swift b/VDS/Components/TextFields/InputField/InputField.swift index a160420a..54286fa9 100644 --- a/VDS/Components/TextFields/InputField/InputField.swift +++ b/VDS/Components/TextFields/InputField/InputField.swift @@ -181,6 +181,9 @@ open class InputField: EntryFieldBase { /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. open override func setup() { super.setup() + containerView.isAccessibilityElement = true + textField.isAccessibilityElement = false + textField.heightAnchor.constraint(equalToConstant: 20).isActive = true textField.delegate = self bottomContainerStackView.insertArrangedSubview(successLabel, at: 0) @@ -230,8 +233,9 @@ open class InputField: EntryFieldBase { open override func updateAccessibility() { super.updateAccessibility() - textField.accessibilityLabel = accessibilityLabelText - textField.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." + containerView.accessibilityLabel = "Input Field, \(accessibilityLabelText)" + containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to edit." + containerView.accessibilityValue = value } open override func updateErrorLabel() { @@ -264,7 +268,7 @@ open class InputField: EntryFieldBase { open override var accessibilityElements: [Any]? { get { var elements = [Any]() - elements.append(contentsOf: [titleLabel, textField]) + elements.append(contentsOf: [titleLabel, containerView]) if showError { elements.append(statusIcon) if let errorText, !errorText.isEmpty { From b8326faa161848132331665c15bad99dc966930a Mon Sep 17 00:00:00 2001 From: vasavk Date: Fri, 14 Jun 2024 21:17:48 +0530 Subject: [PATCH 19/31] Digital ACT-191 CXTDT-568463 defect: Calendar - On long press, hover randomizes --- VDS/Components/Calendar/Calendar.swift | 48 ++++++++----------- .../Calendar/CalendarDateViewCell.swift | 33 ++++++++----- VDS/SupportingFiles/ReleaseNotes.txt | 2 +- 3 files changed, 40 insertions(+), 43 deletions(-) diff --git a/VDS/Components/Calendar/Calendar.swift b/VDS/Components/Calendar/Calendar.swift index 2b0ba57b..3dbf0ba1 100644 --- a/VDS/Components/Calendar/Calendar.swift +++ b/VDS/Components/Calendar/Calendar.swift @@ -201,7 +201,7 @@ open class CalendarBase: Control, Changeable { } } updateViewConstraints() - } + } func updateViewConstraints() { collectionView.reloadData() @@ -331,38 +331,28 @@ extension CalendarBase: UICollectionViewDelegate, UICollectionViewDataSource, UI } } - - public func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool { - if let cell = collectionView.cellForItem(at: indexPath) as? CalendarDateViewCell { - let isEnabled: Bool = cell.isDateEnabled() - if isEnabled { - cell.activeModeStart() - } - } - return true - } - public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { // reload selected index, if it is in enabled state. if let cell = collectionView.cellForItem(at: indexPath) as? CalendarDateViewCell { - let isEnabled: Bool = cell.isDateEnabled() - if isEnabled { - cell.activeModeEnd() - - // Callback to pass selected date if it is enabled only. - selectedDate = dates[indexPath.row] - sendActions(for: .valueChanged) - displayDate = selectedDate - - var reloadIndexPaths = [indexPath] - - // If an cell is already selected, then it needs to be deselected. - // Add its index path to the array of index paths to be reloaded. - if let deselectIndexPath = selectedIndexPath { - reloadIndexPaths.append(deselectIndexPath) + let hasDate: Bool = cell.hasText() + if hasDate { + let isEnabled: Bool = cell.isDateEnabled() + if isEnabled { + // Callback to pass selected date if it is enabled only. + selectedDate = dates[indexPath.row] + sendActions(for: .valueChanged) + displayDate = selectedDate + + var reloadIndexPaths = [indexPath] + + // If an cell is already selected, then it needs to be deselected. + // Add its index path to the array of index paths to be reloaded. + if let deselectIndexPath = selectedIndexPath { + reloadIndexPaths.append(deselectIndexPath) + } + + collectionView.reloadItems(at: reloadIndexPaths) } - - collectionView.reloadItems(at: reloadIndexPaths) } } } diff --git a/VDS/Components/Calendar/CalendarDateViewCell.swift b/VDS/Components/Calendar/CalendarDateViewCell.swift index 4b6f400d..ee2f01c9 100644 --- a/VDS/Components/Calendar/CalendarDateViewCell.swift +++ b/VDS/Components/Calendar/CalendarDateViewCell.swift @@ -41,6 +41,21 @@ final class CalendarDateViewCell: UICollectionViewCell { $0.textStyle = .bodySmall } + override var isHighlighted: Bool { + didSet{ + if self.isHighlighted && hasText() && isDateEnabled() { + self.contentView.layer.borderColor = activeBorderColorConfiguration.getColor(surface).cgColor + self.contentView.layer.borderWidth = VDSFormControls.borderWidth + self.contentView.layer.cornerRadius = VDSFormControls.borderRadius + + } else { + self.contentView.layer.borderColor = nil + self.contentView.layer.borderWidth = 0 + self.contentView.layer.cornerRadius = 0 + } + } + } + private lazy var shapeLayer = CAShapeLayer() private var surface: Surface = .light private let selectedTextColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsPrimaryInverseOnlight, VDSColor.elementsPrimaryInverseOndark) @@ -155,24 +170,16 @@ final class CalendarDateViewCell: UICollectionViewCell { numberLabel.textStyle = .bodySmall } } - + + func hasText() -> Bool { + return !numberLabel.text.isEmpty + } + // returns cell enabled state. func isDateEnabled() -> Bool { return numberLabel.isEnabled } - func activeModeStart() { - numberLabel.layer.borderColor = activeBorderColorConfiguration.getColor(surface).cgColor - numberLabel.layer.borderWidth = VDSFormControls.borderWidth - numberLabel.layer.cornerRadius = VDSFormControls.borderRadius - } - - func activeModeEnd() { - numberLabel.layer.borderColor = nil - numberLabel.layer.borderWidth = 0 - numberLabel.layer.cornerRadius = 0 - } - func disableLabel(with surface: Surface) { numberLabel.isEnabled = false numberLabel.textColor = disabledTextColorConfiguration.getColor(surface) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 326146fb..a3772a7b 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,6 +1,6 @@ 1.0.67 ---------------- -- CXTDT-553663 - DropdownSelect - Accessibility - has popup +- CXTDT-568463 - Calendar - On long press, hover randomizes 1.0.66 ---------------- From 4119a6c1806e350439139e20e4e7ef3f0ce1ee9f Mon Sep 17 00:00:00 2001 From: vasavk Date: Fri, 14 Jun 2024 21:20:11 +0530 Subject: [PATCH 20/31] Using internal enabled var for cell instead of label enabled state --- .../Calendar/CalendarDateViewCell.swift | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/VDS/Components/Calendar/CalendarDateViewCell.swift b/VDS/Components/Calendar/CalendarDateViewCell.swift index ee2f01c9..607eac76 100644 --- a/VDS/Components/Calendar/CalendarDateViewCell.swift +++ b/VDS/Components/Calendar/CalendarDateViewCell.swift @@ -47,7 +47,6 @@ final class CalendarDateViewCell: UICollectionViewCell { self.contentView.layer.borderColor = activeBorderColorConfiguration.getColor(surface).cgColor self.contentView.layer.borderWidth = VDSFormControls.borderWidth self.contentView.layer.cornerRadius = VDSFormControls.borderRadius - } else { self.contentView.layer.borderColor = nil self.contentView.layer.borderWidth = 0 @@ -56,6 +55,7 @@ final class CalendarDateViewCell: UICollectionViewCell { } } + private var isEnabled = false private lazy var shapeLayer = CAShapeLayer() private var surface: Surface = .light private let selectedTextColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsPrimaryInverseOnlight, VDSColor.elementsPrimaryInverseOndark) @@ -135,20 +135,21 @@ final class CalendarDateViewCell: UICollectionViewCell { } } - // update text color, bg color, corner radius. - if numberLabel.text == selectedDate.getDay() - && selectedDate.monthInt == displayDate.monthInt - && selectedDate.yearInt == displayDate.yearInt - && numberLabel.isEnabled { - - numberLabel.textColor = selectedTextColorConfiguration.getColor(surface) - layer.backgroundColor = selectedBackgroundColor.getColor(surface).cgColor - layer.cornerRadius = VDSFormControls.borderRadius - - } else { - numberLabel.textColor = unselectedTextColorConfiguration.getColor(surface) - layer.backgroundColor = nil - layer.cornerRadius = 0 + // Set selected/unselected state text color, bg color, corner radius if cell is in enabled state. + if isEnabled { + if numberLabel.text == selectedDate.getDay() + && selectedDate.monthInt == displayDate.monthInt + && selectedDate.yearInt == displayDate.yearInt { + + numberLabel.textColor = selectedTextColorConfiguration.getColor(surface) + layer.backgroundColor = selectedBackgroundColor.getColor(surface).cgColor + layer.cornerRadius = VDSFormControls.borderRadius + + } else { + numberLabel.textColor = unselectedTextColorConfiguration.getColor(surface) + layer.backgroundColor = nil + layer.cornerRadius = 0 + } } // add indicators. @@ -177,11 +178,11 @@ final class CalendarDateViewCell: UICollectionViewCell { // returns cell enabled state. func isDateEnabled() -> Bool { - return numberLabel.isEnabled + return isEnabled } func disableLabel(with surface: Surface) { - numberLabel.isEnabled = false + isEnabled = false numberLabel.textColor = disabledTextColorConfiguration.getColor(surface) layer.backgroundColor = disabledBackgroundColor.getColor(surface).cgColor } @@ -190,7 +191,7 @@ final class CalendarDateViewCell: UICollectionViewCell { for x in 0...activeDates.count-1 { if activeDates[x].monthInt == displayDate.monthInt && activeDates[x].yearInt == displayDate.yearInt { if let day:Int = Int(numberLabel.text), day == activeDates[x].dayInt { - numberLabel.isEnabled = true + isEnabled = true } } } @@ -201,7 +202,7 @@ final class CalendarDateViewCell: UICollectionViewCell { if activeDates.count > 0 && inactiveDates.count == 0 { showActiveDates(with: displayDate, activeDates: activeDates, inactiveDates: inactiveDates) } else { - numberLabel.isEnabled = true + isEnabled = true } } @@ -211,7 +212,7 @@ final class CalendarDateViewCell: UICollectionViewCell { disableLabel(with: surface) showActiveDates(with: displayDate, activeDates: activeDates, inactiveDates: inactiveDates) } else { - numberLabel.isEnabled = true + isEnabled = true } } @@ -220,7 +221,7 @@ final class CalendarDateViewCell: UICollectionViewCell { if let day = Int(numberLabel.text), day < minDate.dayInt { disableLabel(with: surface) } else { - numberLabel.isEnabled = false + isEnabled = false handleActiveDates(with: displayDate, activeDates: activeDates, inactiveDates: inactiveDates) } } @@ -230,7 +231,7 @@ final class CalendarDateViewCell: UICollectionViewCell { if let day = Int(numberLabel.text), day > maxDate.dayInt { disableLabel(with: surface) } else { - numberLabel.isEnabled = false + isEnabled = false handleActiveDates(with: displayDate, activeDates: activeDates, inactiveDates: inactiveDates) } } @@ -240,7 +241,7 @@ final class CalendarDateViewCell: UICollectionViewCell { if let day = Int(numberLabel.text), day < minDate.dayInt || day > maxDate.dayInt { disableLabel(with: surface) } else { - numberLabel.isEnabled = false + isEnabled = false handleActiveDates(with: displayDate, activeDates: activeDates, inactiveDates: inactiveDates) } } From ed356299b5048248e3c6be38b1cad675eb63bf0b Mon Sep 17 00:00:00 2001 From: vasavk Date: Fri, 14 Jun 2024 21:21:26 +0530 Subject: [PATCH 21/31] Fixed issue observed: fetching days with wrong date if display date exceeds min/max date --- VDS/Components/Calendar/Calendar.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/Calendar/Calendar.swift b/VDS/Components/Calendar/Calendar.swift index 3dbf0ba1..cd1c783b 100644 --- a/VDS/Components/Calendar/Calendar.swift +++ b/VDS/Components/Calendar/Calendar.swift @@ -160,7 +160,7 @@ open class CalendarBase: Control, Changeable { if (minDate <= maxDate) { // Check if current date falls between min & max dates. let fallsBetween = displayDate.isBetweeen(date: minDate, andDate: maxDate) - displayDate = fallsBetween ? displayDate : minDate + displayDate = fallsBetween ? displayDate : (displayDate.monthInt == minDate.monthInt) ? minDate : maxDate fetchDates(with: displayDate) } containerView.backgroundColor = transparentBackground ? .clear : backgroundColorConfiguration.getColor(self) From c9c3b54484f526f34b63abfff6c64ac6fee8f7c8 Mon Sep 17 00:00:00 2001 From: vasavk Date: Fri, 14 Jun 2024 21:24:53 +0530 Subject: [PATCH 22/31] updated missed note. --- VDS/SupportingFiles/ReleaseNotes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index a3772a7b..5014b345 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,5 +1,6 @@ 1.0.67 ---------------- +- CXTDT-553663 - DropdownSelect - Accessibility - has popup - CXTDT-568463 - Calendar - On long press, hover randomizes 1.0.66 From bec994e2d486d05f9aedabfbc1e39bceebe30e40 Mon Sep 17 00:00:00 2001 From: vasavk Date: Fri, 14 Jun 2024 21:33:02 +0530 Subject: [PATCH 23/31] Digital ACT-191 CXTDT-568412 defect: Calendar - Incorrect side nav icon size --- VDS/Components/Calendar/CalendarHeaderReusableView.swift | 8 ++++---- VDS/SupportingFiles/ReleaseNotes.txt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VDS/Components/Calendar/CalendarHeaderReusableView.swift b/VDS/Components/Calendar/CalendarHeaderReusableView.swift index d3da2dca..218f5471 100644 --- a/VDS/Components/Calendar/CalendarHeaderReusableView.swift +++ b/VDS/Components/Calendar/CalendarHeaderReusableView.swift @@ -68,16 +68,16 @@ class CalendarHeaderReusableView: UICollectionReusableView { $0.kind = .ghost $0.iconName = .leftCaret $0.iconOffset = .init(x: -2, y: 0) - $0.icon.size = .small - $0.size = .small + $0.customContainerSize = 40 + $0.icon.customSize = 16 } internal var nextButton = ButtonIcon().with { $0.kind = .ghost $0.iconName = .rightCaret $0.iconOffset = .init(x: 2, y: 0) - $0.icon.size = .small - $0.size = .small + $0.customContainerSize = 40 + $0.icon.customSize = 16 } internal var headerTitle = Label().with { diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 5014b345..e89bb500 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -2,6 +2,7 @@ ---------------- - CXTDT-553663 - DropdownSelect - Accessibility - has popup - CXTDT-568463 - Calendar - On long press, hover randomizes +- CXTDT-568412 - Calendar - Incorrect side nav icon size 1.0.66 ---------------- From c1f2aa65919d28b1cf7c046ea86828432173040b Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 11:33:59 -0500 Subject: [PATCH 24/31] refactored textarea Signed-off-by: Matt Bruce --- VDS/Components/TextFields/TextArea/TextArea.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index 90e797a4..79e7b825 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -137,7 +137,8 @@ open class TextArea: EntryFieldBase { /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. open override func setup() { super.setup() - + containerView.isAccessibilityElement = true + textView.isAccessibilityElement = false textView.isScrollEnabled = true textView.autocorrectionType = .no @@ -194,8 +195,9 @@ open class TextArea: EntryFieldBase { open override func updateAccessibility() { super.updateAccessibility() - textView.accessibilityLabel = accessibilityLabelText - textView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." + containerView.accessibilityLabel = "\(Self.self), \(accessibilityLabelText)" + containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." + containerView.accessibilityValue = value } override func updateRules() { @@ -225,7 +227,7 @@ open class TextArea: EntryFieldBase { open override var accessibilityElements: [Any]? { get { var elements = [Any]() - elements.append(contentsOf: [titleLabel, textView]) + elements.append(contentsOf: [titleLabel, containerView]) if showError { elements.append(statusIcon) From 69cdae83749b60f0debced661db3cc0134c13365 Mon Sep 17 00:00:00 2001 From: vasavk Date: Fri, 14 Jun 2024 22:04:25 +0530 Subject: [PATCH 25/31] Digital ACT-191 CXTDT-568422 defect: Calendar - DarkMode Legend icon fill using Light mode color --- VDS/Components/Calendar/CalendarFooterReusableView.swift | 4 ++-- VDS/SupportingFiles/ReleaseNotes.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VDS/Components/Calendar/CalendarFooterReusableView.swift b/VDS/Components/Calendar/CalendarFooterReusableView.swift index 263cd83e..020655ea 100644 --- a/VDS/Components/Calendar/CalendarFooterReusableView.swift +++ b/VDS/Components/Calendar/CalendarFooterReusableView.swift @@ -224,7 +224,7 @@ private class LegendCollectionViewCell: UICollectionViewCell { title.text = text title.textColor = textColorConfiguration.getColor(surface) - legendIndicator.backgroundColor = drawSemiCircle ? .clear : (clearFullcircle ? .clear : color) + legendIndicator.backgroundColor = drawSemiCircle ? .clear : (clearFullcircle ? .clear : indicatorColorConfiguration.getColor(surface)) legendIndicator.layer.borderColor = indicatorColorConfiguration.getColor(surface).cgColor self.layoutIfNeeded() @@ -239,7 +239,7 @@ private class LegendCollectionViewCell: UICollectionViewCell { path.addArc(withCenter: center, radius: center.x, startAngle: 2 * .pi, endAngle: .pi, clockwise: true) path.close() shapeLayer.path = path.cgPath - shapeLayer.fillColor = color.cgColor + shapeLayer.fillColor = indicatorColorConfiguration.getColor(surface).cgColor guard legendIndicator.layer.sublayers?.contains(shapeLayer) ?? true else { return } legendIndicator.layer.addSublayer(shapeLayer) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index e89bb500..8a038e51 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -3,6 +3,7 @@ - CXTDT-553663 - DropdownSelect - Accessibility - has popup - CXTDT-568463 - Calendar - On long press, hover randomizes - CXTDT-568412 - Calendar - Incorrect side nav icon size +- CXTDT-568422 - Calendar - DarkMode Legend icon fill using Light mode color 1.0.66 ---------------- From 652088bbb186e44da1c8f180f6c662339ef5fbdc Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 12:31:21 -0500 Subject: [PATCH 26/31] refactored to base class and removed more duplicate code Signed-off-by: Matt Bruce --- VDS/Components/DatePicker/DatePicker.swift | 33 +----------- .../DropdownSelect/DropdownSelect.swift | 31 ------------ .../TextFields/EntryFieldBase.swift | 38 +++++++++++++- .../TextFields/InputField/InputField.swift | 13 ++--- .../TextFields/TextArea/TextArea.swift | 50 ++++--------------- 5 files changed, 51 insertions(+), 114 deletions(-) diff --git a/VDS/Components/DatePicker/DatePicker.swift b/VDS/Components/DatePicker/DatePicker.swift index 1040a82c..fdc6e05f 100644 --- a/VDS/Components/DatePicker/DatePicker.swift +++ b/VDS/Components/DatePicker/DatePicker.swift @@ -100,8 +100,6 @@ open class DatePicker: EntryFieldBase, DatePickerViewControllerDelegate, UIPopov /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. open override func setup() { super.setup() - - containerView.isAccessibilityElement = true // setting color config selectedDateLabel.textColorConfiguration = primaryColorConfiguration.eraseToAnyColorable() @@ -142,36 +140,7 @@ open class DatePicker: EntryFieldBase, DatePickerViewControllerDelegate, UIPopov selectedDateLabel.isEnabled = isEnabled calendarIcon.color = iconColorConfiguration.getColor(self) } - - open override func updateAccessibility() { - super.updateAccessibility() - containerView.accessibilityLabel = "Date Picker, \(accessibilityLabelText)" - containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." - containerView.accessibilityValue = value - } - - open override var accessibilityElements: [Any]? { - get { - var elements = [Any]() - elements.append(contentsOf: [titleLabel, containerView]) - - if showError { - elements.append(statusIcon) - if let errorText, !errorText.isEmpty { - elements.append(errorLabel) - } - } - - if let helperText, !helperText.isEmpty { - elements.append(helperLabel) - } - - return elements - } - - set { super.accessibilityElements = newValue } - } - + /// Resets to default settings. open override func reset() { super.reset() diff --git a/VDS/Components/DropdownSelect/DropdownSelect.swift b/VDS/Components/DropdownSelect/DropdownSelect.swift index 37ec7984..4b9026f1 100644 --- a/VDS/Components/DropdownSelect/DropdownSelect.swift +++ b/VDS/Components/DropdownSelect/DropdownSelect.swift @@ -131,7 +131,6 @@ open class DropdownSelect: EntryFieldBase { open override func setup() { super.setup() - containerView.isAccessibilityElement = true inlineDisplayLabel.isAccessibilityElement = true dropdownField.width(0) @@ -276,36 +275,6 @@ open class DropdownSelect: EntryFieldBase { statusIcon.color = iconColorConfiguration.getColor(self) } - open override func updateAccessibility() { - super.updateAccessibility() - containerView.accessibilityLabel = "Dropdown Select, \(accessibilityLabelText)" - containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : "has popup, Double tap to open." - containerView.accessibilityValue = value - } - - open override var accessibilityElements: [Any]? { - get { - var elements = [Any]() - elements.append(contentsOf: [titleLabel, containerView]) - - if showError { - elements.append(statusIcon) - if let errorText, !errorText.isEmpty { - elements.append(errorLabel) - } - } - - if let helperText, !helperText.isEmpty { - elements.append(helperLabel) - } - - return elements - } - - set { super.accessibilityElements = newValue } - } - - @objc open func pickerDoneClicked() { optionsPicker.isHidden = true dropdownField.resignFirstResponder() diff --git a/VDS/Components/TextFields/EntryFieldBase.swift b/VDS/Components/TextFields/EntryFieldBase.swift index 2111a7f0..493aff0f 100644 --- a/VDS/Components/TextFields/EntryFieldBase.swift +++ b/VDS/Components/TextFields/EntryFieldBase.swift @@ -95,6 +95,7 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { internal var containerView: UIView = { return UIView().with { $0.translatesAutoresizingMaskIntoConstraints = false + $0.isAccessibilityElement = true } }() @@ -243,7 +244,8 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { open var accessibilityLabelText: String { var accessibilityLabels = [String]() - if let text = titleLabel.text { + + if let text = titleLabel.text?.trimmingCharacters(in: .whitespaces) { accessibilityLabels.append(text) } if isReadOnly { @@ -255,9 +257,14 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { if let errorText, showError { accessibilityLabels.append("error, \(errorText)") } + + accessibilityLabels.append("\(Self.self)") + return accessibilityLabels.joined(separator: ", ") } + open var accessibilityHintText: String = "Double tap to open" + //-------------------------------------------------- // MARK: - Overrides //-------------------------------------------------- @@ -447,6 +454,35 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { } } + open override func updateAccessibility() { + super.updateAccessibility() + containerView.accessibilityLabel = accessibilityLabelText + containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : accessibilityHintText + containerView.accessibilityValue = value + } + + open override var accessibilityElements: [Any]? { + get { + var elements = [Any]() + elements.append(contentsOf: [titleLabel, containerView]) + + if showError { + elements.append(statusIcon) + if let errorText, !errorText.isEmpty { + elements.append(errorLabel) + } + } + + if let helperText, !helperText.isEmpty { + elements.append(helperLabel) + } + + return elements + } + + set { super.accessibilityElements = newValue } + } + //-------------------------------------------------- // MARK: - Private Methods //-------------------------------------------------- diff --git a/VDS/Components/TextFields/InputField/InputField.swift b/VDS/Components/TextFields/InputField/InputField.swift index 9635cb5f..e3336b76 100644 --- a/VDS/Components/TextFields/InputField/InputField.swift +++ b/VDS/Components/TextFields/InputField/InputField.swift @@ -102,6 +102,7 @@ open class InputField: EntryFieldBase { open var textField = TextField().with { $0.translatesAutoresizingMaskIntoConstraints = false $0.textStyle = TextStyle.bodyLarge + $0.isAccessibilityElement = false } /// Color configuration for the textField. @@ -181,8 +182,7 @@ open class InputField: EntryFieldBase { /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. open override func setup() { super.setup() - containerView.isAccessibilityElement = true - textField.isAccessibilityElement = false + accessibilityHintText = "Double tap to edit" textField.heightAnchor.constraint(equalToConstant: 20).isActive = true textField.delegate = self @@ -230,14 +230,7 @@ open class InputField: EntryFieldBase { textField.isEnabled = isEnabled textField.isUserInteractionEnabled = isEnabled && !isReadOnly } - - open override func updateAccessibility() { - super.updateAccessibility() - containerView.accessibilityLabel = "Input Field, \(accessibilityLabelText)" - containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to edit." - containerView.accessibilityValue = value - } - + open override func updateErrorLabel() { super.updateErrorLabel() diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index 79e7b825..12fbc228 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -42,14 +42,14 @@ open class TextArea: EntryFieldBase { $0.spacing = VDSLayout.space3X } }() - + open var characterCounterLabel = Label().with { $0.setContentCompressionResistancePriority(.required, for: .vertical) $0.textStyle = .bodySmall $0.textAlignment = .right $0.numberOfLines = 1 } - + open var minHeight: Height = .twoX { didSet { setNeedsUpdate() } } //-------------------------------------------------- @@ -101,13 +101,15 @@ open class TextArea: EntryFieldBase { open override var value: String? { return textView.text } - + /// UITextView shown in the TextArea. open var textView = TextView().with { $0.translatesAutoresizingMaskIntoConstraints = false $0.sizeToFit() - $0.isScrollEnabled = false + $0.isAccessibilityElement = false + $0.isScrollEnabled = true $0.textContainerInset = .zero + $0.autocorrectionType = .no $0.textContainer.lineFragmentPadding = 0 } @@ -137,10 +139,8 @@ open class TextArea: EntryFieldBase { /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. open override func setup() { super.setup() - containerView.isAccessibilityElement = true - textView.isAccessibilityElement = false - textView.isScrollEnabled = true - textView.autocorrectionType = .no + + accessibilityHintText = "Double tap to edit" //events textView @@ -192,14 +192,7 @@ open class TextArea: EntryFieldBase { characterCounterLabel.surface = surface highlightCharacterOverflow() } - - open override func updateAccessibility() { - super.updateAccessibility() - containerView.accessibilityLabel = "\(Self.self), \(accessibilityLabelText)" - containerView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." - containerView.accessibilityValue = value - } - + override func updateRules() { super.updateRules() @@ -223,30 +216,7 @@ open class TextArea: EntryFieldBase { stackView.addArrangedSubview(characterCounterLabel) return stackView } - - open override var accessibilityElements: [Any]? { - get { - var elements = [Any]() - elements.append(contentsOf: [titleLabel, containerView]) - - if showError { - elements.append(statusIcon) - if let errorText, !errorText.isEmpty { - elements.append(errorLabel) - } - } - - if let helperText, !helperText.isEmpty { - elements.append(helperLabel) - } - - return elements - } - - set { super.accessibilityElements = newValue } - } - - + open override var canBecomeFirstResponder: Bool { return textView.canBecomeFirstResponder } From e8f225cdc310d78a094f347fedbcb37988393180 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 12:59:13 -0500 Subject: [PATCH 27/31] refactored responder property Signed-off-by: Matt Bruce --- .../DropdownSelect/DropdownSelect.swift | 18 ++-------------- .../TextFields/EntryFieldBase.swift | 18 ++++++++++++++++ .../TextFields/InputField/InputField.swift | 21 ++++--------------- .../TextFields/TextArea/TextArea.swift | 19 +++-------------- 4 files changed, 27 insertions(+), 49 deletions(-) diff --git a/VDS/Components/DropdownSelect/DropdownSelect.swift b/VDS/Components/DropdownSelect/DropdownSelect.swift index 4b9026f1..1496f392 100644 --- a/VDS/Components/DropdownSelect/DropdownSelect.swift +++ b/VDS/Components/DropdownSelect/DropdownSelect.swift @@ -66,6 +66,8 @@ open class DropdownSelect: EntryFieldBase { //-------------------------------------------------- // MARK: - Private Properties //-------------------------------------------------- + internal override var responder: UIResponder? { dropdownField } + internal var minWidthDefault = 66.0 internal var minWidthInlineLabel = 102.0 internal override var minWidth: CGFloat { showInlineLabel ? minWidthInlineLabel : minWidthDefault } @@ -281,22 +283,6 @@ open class DropdownSelect: EntryFieldBase { setNeedsUpdate() UIAccessibility.post(notification: .layoutChanged, argument: containerView) } - - open override var canBecomeFirstResponder: Bool { - return dropdownField.canBecomeFirstResponder - } - - open override func becomeFirstResponder() -> Bool { - return dropdownField.becomeFirstResponder() - } - - open override var canResignFirstResponder: Bool { - return dropdownField.canResignFirstResponder - } - - open override func resignFirstResponder() -> Bool { - return dropdownField.resignFirstResponder() - } } //-------------------------------------------------- diff --git a/VDS/Components/TextFields/EntryFieldBase.swift b/VDS/Components/TextFields/EntryFieldBase.swift index 493aff0f..4e7422ee 100644 --- a/VDS/Components/TextFields/EntryFieldBase.swift +++ b/VDS/Components/TextFields/EntryFieldBase.swift @@ -40,6 +40,8 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { //-------------------------------------------------- // MARK: - Private Properties //-------------------------------------------------- + internal var responder: UIResponder? { return nil } + internal let mainStackView = UIStackView().with { $0.axis = .vertical $0.alignment = .fill @@ -367,6 +369,22 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { isReadOnly = false onChange = nil } + + open override var canBecomeFirstResponder: Bool { + responder?.canBecomeFirstResponder ?? super.canBecomeFirstResponder + } + + open override func becomeFirstResponder() -> Bool { + responder?.becomeFirstResponder() ?? super.becomeFirstResponder() + } + + open override var canResignFirstResponder: Bool { + responder?.canResignFirstResponder ?? super.canResignFirstResponder + } + + open override func resignFirstResponder() -> Bool { + responder?.resignFirstResponder() ?? super.resignFirstResponder() + } //-------------------------------------------------- // MARK: - Public Methods diff --git a/VDS/Components/TextFields/InputField/InputField.swift b/VDS/Components/TextFields/InputField/InputField.swift index e3336b76..c2f779d4 100644 --- a/VDS/Components/TextFields/InputField/InputField.swift +++ b/VDS/Components/TextFields/InputField/InputField.swift @@ -34,6 +34,8 @@ open class InputField: EntryFieldBase { //-------------------------------------------------- // MARK: - Private Properties //-------------------------------------------------- + internal override var responder: UIResponder? { textField } + internal override var containerBackgroundColor: UIColor { if showSuccess { return backgroundColorConfiguration.getColor(self) @@ -102,7 +104,7 @@ open class InputField: EntryFieldBase { open var textField = TextField().with { $0.translatesAutoresizingMaskIntoConstraints = false $0.textStyle = TextStyle.bodyLarge - $0.isAccessibilityElement = false + $0.isAccessibilityElement = false } /// Color configuration for the textField. @@ -280,22 +282,6 @@ open class InputField: EntryFieldBase { set { super.accessibilityElements = newValue } } - - open override var canBecomeFirstResponder: Bool { - return textField.canBecomeFirstResponder - } - - open override func becomeFirstResponder() -> Bool { - return textField.becomeFirstResponder() - } - - open override var canResignFirstResponder: Bool { - return textField.canResignFirstResponder - } - - open override func resignFirstResponder() -> Bool { - return textField.resignFirstResponder() - } } extension InputField: UITextFieldDelegate { @@ -308,6 +294,7 @@ extension InputField: UITextFieldDelegate { public func textFieldDidEndEditing(_ textField: UITextField) { fieldType.handler().textFieldDidEndEditing(self, textField: textField) validate() + UIAccessibility.post(notification: .layoutChanged, argument: self.containerView) } public func textFieldDidChangeSelection(_ textField: UITextField) { diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index 12fbc228..a487dc53 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -32,6 +32,8 @@ open class TextArea: EntryFieldBase { //-------------------------------------------------- // MARK: - Private Properties //-------------------------------------------------- + internal override var responder: UIResponder? { textView } + internal var textViewHeightConstraint: NSLayoutConstraint? internal var inputFieldStackView: UIStackView = { @@ -159,6 +161,7 @@ open class TextArea: EntryFieldBase { .publisher(for: .editingDidEnd) .sink { [weak self] _ in self?.validate() + UIAccessibility.post(notification: .layoutChanged, argument: self?.containerView) }.store(in: &subscribers) textViewHeightConstraint = textView.heightAnchor.constraint(greaterThanOrEqualToConstant: containerSize.height) @@ -217,22 +220,6 @@ open class TextArea: EntryFieldBase { return stackView } - open override var canBecomeFirstResponder: Bool { - return textView.canBecomeFirstResponder - } - - open override func becomeFirstResponder() -> Bool { - return textView.becomeFirstResponder() - } - - open override var canResignFirstResponder: Bool { - return textView.canResignFirstResponder - } - - open override func resignFirstResponder() -> Bool { - return textView.resignFirstResponder() - } - //-------------------------------------------------- // MARK: - Private Methods //-------------------------------------------------- From a2a06f3870fb657c37c57d490e2a7f0f269e65f1 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 15:45:04 -0500 Subject: [PATCH 28/31] added token to enum Signed-off-by: Matt Bruce --- VDS/Components/TileContainer/TileContainer.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VDS/Components/TileContainer/TileContainer.swift b/VDS/Components/TileContainer/TileContainer.swift index dc3c936e..d600f5dd 100644 --- a/VDS/Components/TileContainer/TileContainer.swift +++ b/VDS/Components/TileContainer/TileContainer.swift @@ -69,6 +69,7 @@ open class TileContainerBase: Control where Padding case secondary case white case black + case token(UIColor.VDSColor) case custom(UIColor) private var reflectedValue: String { String(reflecting: self) } @@ -484,6 +485,8 @@ extension TileContainerBase { return whiteColorConfig.getColor(object.surface) case .black: return blackColorConfig.getColor(object.surface) + case .token(let vdsColor): + return vdsColor.uiColor case .custom(let color): return color } From c697c4a4374440efe8fc38ebf43e7959ee361d41 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 16:11:18 -0500 Subject: [PATCH 29/31] updated release notes Signed-off-by: Matt Bruce --- VDS/SupportingFiles/ReleaseNotes.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 8a038e51..69b826f9 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -4,6 +4,9 @@ - CXTDT-568463 - Calendar - On long press, hover randomizes - CXTDT-568412 - Calendar - Incorrect side nav icon size - CXTDT-568422 - Calendar - DarkMode Legend icon fill using Light mode color +- CXTDT-560823 - TextArea - Accessibility +- CXTDT-560458 - Dropdown/TextArea - Different voiceover +- CXTDT-546821 - TextArea - Accessibility 1.0.66 ---------------- From f08fe00a25fe4419205411a58b42cd1381d59702 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 16:14:06 -0500 Subject: [PATCH 30/31] updated release notes with close issues Signed-off-by: Matt Bruce --- VDS/SupportingFiles/ReleaseNotes.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 69b826f9..cd4712b2 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,12 +1,14 @@ 1.0.67 ---------------- -- CXTDT-553663 - DropdownSelect - Accessibility - has popup - CXTDT-568463 - Calendar - On long press, hover randomizes - CXTDT-568412 - Calendar - Incorrect side nav icon size - CXTDT-568422 - Calendar - DarkMode Legend icon fill using Light mode color -- CXTDT-560823 - TextArea - Accessibility +- CXTDT-553663 - DropdownSelect - Accessibility - has popup +- CXTDT-565796 - DropdownSelect - Accessibility - CXTDT-560458 - Dropdown/TextArea - Different voiceover +- CXTDT-565106 - InputField - CreditCard - Icons - CXTDT-546821 - TextArea - Accessibility +- CXTDT-560823 - TextArea - Accessibility 1.0.66 ---------------- From 001c11a1d6c5e7cccaabecc7692a720da02b5879 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 14 Jun 2024 16:17:18 -0500 Subject: [PATCH 31/31] updated version Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index fdfe2b15..c17e971e 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -1523,7 +1523,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 66; + CURRENT_PROJECT_VERSION = 67; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1561,7 +1561,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 66; + CURRENT_PROJECT_VERSION = 67; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1;