diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index 02e8d284..c17e971e 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 */; }; @@ -246,6 +246,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 = ""; }; @@ -420,7 +421,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - EA21C5DB2B600EDE00CFC139 /* VDSTokens.xcframework in Frameworks */, + AF1CEFE42BEA736A0001F9A5 /* VDSCoreTokens.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -636,6 +637,7 @@ EA33618D288B1C0C0071C351 /* Frameworks */ = { isa = PBXGroup; children = ( + AF1CEFE32BEA736A0001F9A5 /* VDSCoreTokens.xcframework */, EA21C5DA2B600EDD00CFC139 /* VDSTokens.xcframework */, ); name = Frameworks; @@ -1521,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; @@ -1559,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; diff --git a/VDS/BaseClasses/Selector/SelectorBase.swift b/VDS/BaseClasses/Selector/SelectorBase.swift index 809cb4aa..f8c9650d 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 d2632a9d..184f8e07 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 46d54fb5..cee8d9c2 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, Groupable { 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 463e5df8..740538d1 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 f9dc98fb..a538f943 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 263a4cba..08e58e60 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 41940a52..b5256497 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 9dd60781..a8443f58 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/Calendar/Calendar.swift b/VDS/Components/Calendar/Calendar.swift index 04446252..cd1c783b 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. @@ -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) @@ -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 d66522d0..607eac76 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 { @@ -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 var isEnabled = false private lazy var shapeLayer = CAShapeLayer() private var surface: Surface = .light private let selectedTextColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsPrimaryInverseOnlight, VDSColor.elementsPrimaryInverseOndark) @@ -120,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. @@ -155,26 +171,18 @@ 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 + return isEnabled } func disableLabel(with surface: Surface) { - numberLabel.isEnabled = false + isEnabled = false numberLabel.textColor = disabledTextColorConfiguration.getColor(surface) layer.backgroundColor = disabledBackgroundColor.getColor(surface).cgColor } @@ -183,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 } } } @@ -194,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 } } @@ -204,7 +212,7 @@ final class CalendarDateViewCell: UICollectionViewCell { disableLabel(with: surface) showActiveDates(with: displayDate, activeDates: activeDates, inactiveDates: inactiveDates) } else { - numberLabel.isEnabled = true + isEnabled = true } } @@ -213,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) } } @@ -223,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) } } @@ -233,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) } } diff --git a/VDS/Components/Calendar/CalendarFooterReusableView.swift b/VDS/Components/Calendar/CalendarFooterReusableView.swift index bdab58b5..020655ea 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 { @@ -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/Components/Calendar/CalendarHeaderReusableView.swift b/VDS/Components/Calendar/CalendarHeaderReusableView.swift index f9c8395d..218f5471 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 { @@ -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/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 43b8890d..242e193e 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/DatePicker/DatePicker.swift b/VDS/Components/DatePicker/DatePicker.swift index c514001a..fdc6e05f 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. @@ -101,13 +101,11 @@ open class DatePicker: EntryFieldBase, DatePickerViewControllerDelegate, UIPopov open override func setup() { super.setup() - fieldStackView.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 } @@ -142,14 +140,7 @@ open class DatePicker: EntryFieldBase, DatePickerViewControllerDelegate, UIPopov selectedDateLabel.isEnabled = isEnabled calendarIcon.color = iconColorConfiguration.getColor(self) } - - open override func updateAccessibility() { - super.updateAccessibility() - fieldStackView.accessibilityLabel = "Date Picker, \(accessibilityLabelText)" - fieldStackView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." - fieldStackView.accessibilityValue = value - } - + /// Resets to default settings. open override func reset() { super.reset() @@ -182,7 +173,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 e001d130..1496f392 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. @@ -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 } @@ -131,7 +133,6 @@ open class DropdownSelect: EntryFieldBase { open override func setup() { super.setup() - fieldStackView.isAccessibilityElement = true inlineDisplayLabel.isAccessibilityElement = true dropdownField.width(0) @@ -276,57 +277,11 @@ open class DropdownSelect: EntryFieldBase { statusIcon.color = iconColorConfiguration.getColor(self) } - open override func updateAccessibility() { - super.updateAccessibility() - fieldStackView.accessibilityLabel = "Dropdown Select, \(accessibilityLabelText)" - fieldStackView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." - fieldStackView.accessibilityValue = value - } - - open override var accessibilityElements: [Any]? { - get { - var elements = [Any]() - elements.append(contentsOf: [titleLabel, fieldStackView]) - - 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() setNeedsUpdate() - UIAccessibility.post(notification: .layoutChanged, argument: fieldStackView) - } - - 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() + UIAccessibility.post(notification: .layoutChanged, argument: containerView) } } @@ -337,8 +292,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/Icon/ButtonIcon/ButtonIcon.swift b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift index 5ba6a9fe..64ce0da5 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. @@ -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() diff --git a/VDS/Components/Icon/Icon.swift b/VDS/Components/Icon/Icon.swift index e5069f8f..ac4a5818 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 6af40d3d..c3943d64 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 6b03d103..0c5b4725 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 09947fc6..8c995ca1 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 @@ -206,7 +206,7 @@ open class Label: UILabel, ViewProtocol, UserInfoable { }.store(in: &subscribers) backgroundColor = .clear numberOfLines = 0 - lineBreakMode = .byWordWrapping + lineBreakMode = .byTruncatingTail translatesAutoresizingMaskIntoConstraints = false accessibilityCustomActions = [] isAccessibilityElement = true 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 b1010176..5f180b71 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 b555a9b6..8ca46b26 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/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 { diff --git a/VDS/Components/Tabs/Tab.swift b/VDS/Components/Tabs/Tab.swift index 2dddef93..3b22c8f5 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 ddef2ad6..4c463900 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) @@ -267,6 +267,8 @@ open class Tabs: View { } } } + accessibilityElements = tabViews + setNeedsUpdate() scrollToSelectedIndex(animated: false) } diff --git a/VDS/Components/TextFields/EntryFieldBase.swift b/VDS/Components/TextFields/EntryFieldBase.swift index f56f78a2..4e7422ee 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. @@ -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 @@ -95,6 +97,7 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { internal var containerView: UIView = { return UIView().with { $0.translatesAutoresizingMaskIntoConstraints = false + $0.isAccessibilityElement = true } }() @@ -243,7 +246,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 +259,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 //-------------------------------------------------- @@ -360,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 @@ -447,6 +472,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/FieldTypes/CreditCard.swift b/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift index bc3a289a..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: 12) - let formattedMaskSection = String.format(maskedSection, indices: cardType.separatorIndices(rawNumber.count), with: " ") - return formattedMaskSection + " " + lastFourDigits + let maskedSection = String(repeating: "•", count: number.count - lastFourDigits.count) + let formattedMaskSection = String.format(maskedSection + lastFourDigits, indices: cardType.separatorIndices(rawNumber.count), with: " ") + return formattedMaskSection } } } diff --git a/VDS/Components/TextFields/InputField/FieldTypes/FieldType.swift b/VDS/Components/TextFields/InputField/FieldTypes/FieldType.swift index f16f8c51..b3c2a92b 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 d651058c..065eb27a 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/TextFields/InputField/InputField.swift b/VDS/Components/TextFields/InputField/InputField.swift index a160420a..c2f779d4 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. @@ -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,6 +104,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,6 +184,8 @@ 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() + accessibilityHintText = "Double tap to edit" + textField.heightAnchor.constraint(equalToConstant: 20).isActive = true textField.delegate = self bottomContainerStackView.insertArrangedSubview(successLabel, at: 0) @@ -227,13 +232,7 @@ open class InputField: EntryFieldBase { textField.isEnabled = isEnabled textField.isUserInteractionEnabled = isEnabled && !isReadOnly } - - open override func updateAccessibility() { - super.updateAccessibility() - textField.accessibilityLabel = accessibilityLabelText - textField.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." - } - + open override func updateErrorLabel() { super.updateErrorLabel() @@ -264,7 +263,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 { @@ -283,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 { @@ -311,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/InputField/TextField.swift b/VDS/Components/TextFields/InputField/TextField.swift index f05b6c95..da109148 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 { diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index b0d858df..a487dc53 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. @@ -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 = { @@ -42,14 +44,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 +103,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 +141,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() - fieldStackView.pinToSuperView(.uniform(VDSFormControls.spaceInset)) - - textView.isScrollEnabled = true - textView.autocorrectionType = .no + + accessibilityHintText = "Double tap to edit" //events textView @@ -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) @@ -192,13 +195,7 @@ open class TextArea: EntryFieldBase { characterCounterLabel.surface = surface highlightCharacterOverflow() } - - open override func updateAccessibility() { - super.updateAccessibility() - textView.accessibilityLabel = accessibilityLabelText - textView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." - } - + override func updateRules() { super.updateRules() @@ -222,46 +219,7 @@ open class TextArea: EntryFieldBase { stackView.addArrangedSubview(characterCounterLabel) return stackView } - - open override var accessibilityElements: [Any]? { - get { - var elements = [Any]() - elements.append(contentsOf: [titleLabel, textView]) - - 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 - } - - 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 //-------------------------------------------------- diff --git a/VDS/Components/TextFields/TextArea/TextView.swift b/VDS/Components/TextFields/TextArea/TextView.swift index 2fe19cb5..6c9e92ab 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, Errorable { diff --git a/VDS/Components/TileContainer/TileContainer.swift b/VDS/Components/TileContainer/TileContainer.swift index a2f20ffe..d600f5dd 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 @@ -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 } diff --git a/VDS/Components/Tilelet/Tilelet.swift b/VDS/Components/Tilelet/Tilelet.swift index c49542b2..95acf895 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/Tilelet/TileletIconModels.swift b/VDS/Components/Tilelet/TileletIconModels.swift index b9b0a181..58057942 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 { diff --git a/VDS/Components/TitleLockup/TitleLockup.swift b/VDS/Components/TitleLockup/TitleLockup.swift index a54982c5..af699b5c 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/TitleLockup/TitleLockupTextColor.swift b/VDS/Components/TitleLockup/TitleLockupTextColor.swift index 56638b0e..c3c0b703 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 { 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 a9ee3714..1a6e192d 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 9b165f64..c0d69b59 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 { @@ -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,15 +156,15 @@ extension UIColor { case badgesBackgroundWhiteOndark case badgesBackgroundBlackOnlight case badgesBackgroundBlackOndark - + /// 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+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 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/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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 615f10df..cd4712b2 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,19 +1,37 @@ +1.0.67 +---------------- +- 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-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 ---------------- - 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 ---------------- 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