diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index b103afc6..b583c220 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -1369,7 +1369,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 57; + CURRENT_PROJECT_VERSION = 58; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1406,7 +1406,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 57; + CURRENT_PROJECT_VERSION = 58; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; diff --git a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift index 738881e3..37e50b08 100644 --- a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift +++ b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift @@ -432,6 +432,7 @@ open class ButtonIcon: Control, Changeable, FormFieldable { icon.color = color icon.size = size.value icon.customSize = customSize + icon.isEnabled = isEnabled } else { icon.reset() } @@ -502,7 +503,6 @@ open class ButtonIcon: Control, Changeable, FormFieldable { badgeIndicator.isHidden = true return } - badgeIndicator.surface = surface badgeIndicator.kind = badgeIndicatorModel.kind badgeIndicator.fillColor = badgeIndicatorModel.fillColor @@ -538,11 +538,6 @@ open class ButtonIcon: Control, Changeable, FormFieldable { } } - /// Used to update any Accessibility properties. - open override func updateAccessibility() { - super.updateAccessibility() - setAccessibilityLabel(for: [icon, badgeIndicator.label]) - } } // MARK: AppleGuidelinesTouchable diff --git a/VDS/Components/Notification/Notification.swift b/VDS/Components/Notification/Notification.swift index 7dd36b4c..7ed25962 100644 --- a/VDS/Components/Notification/Notification.swift +++ b/VDS/Components/Notification/Notification.swift @@ -39,18 +39,32 @@ open class Notification: View { public enum Style: String, CaseIterable { case info, success, warning, error - func iconName() -> Icon.Name { + var iconName: Icon.Name { switch self { case .info: - return .infoBold + .infoBold case .success: - return .checkmarkAltBold + .checkmarkAltBold case .warning: - return .warningBold + .warningBold case .error: - return .errorBold + .errorBold } } + + var accessibilityText: String { + switch self { + case .info: + "Information Message" + case .success: + "Success Message" + case .warning: + "Warning Message" + case .error: + "Catastrophic Warning Alert" + } + } + } //-------------------------------------------------- @@ -309,8 +323,9 @@ open class Notification: View { //-------------------------------------------------- private func updateIcons() { let iconColor = surface == .dark ? VDSColor.paletteWhite : VDSColor.paletteBlack - typeIcon.name = style.iconName() + typeIcon.name = style.iconName typeIcon.color = iconColor + typeIcon.accessibilityLabel = style.accessibilityText closeButton.color = iconColor closeButton.isHidden = hideCloseButton } diff --git a/VDS/Components/RadioBox/RadioBoxItem.swift b/VDS/Components/RadioBox/RadioBoxItem.swift index cfeb54e6..ef9ee4fa 100644 --- a/VDS/Components/RadioBox/RadioBoxItem.swift +++ b/VDS/Components/RadioBox/RadioBoxItem.swift @@ -34,16 +34,10 @@ open class RadioBoxItem: Control, Changeable, FormFieldable { //-------------------------------------------------- // MARK: - Private Properties //-------------------------------------------------- - private var mainStackView = UIStackView().with { - $0.translatesAutoresizingMaskIntoConstraints = false - $0.alignment = .top - $0.axis = .vertical - $0.spacing = 0 - } - private var selectorStackView = UIStackView().with { $0.translatesAutoresizingMaskIntoConstraints = false $0.alignment = .top + $0.distribution = .fill $0.axis = .horizontal $0.spacing = 12 } @@ -160,6 +154,7 @@ open class RadioBoxItem: Control, Changeable, FormFieldable { $0.setSurfaceColors(VDSColor.interactiveDisabledOnlight, VDSColor.interactiveDisabledOndark, forState: .disabled) $0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .selected) $0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .highlighted) + $0.setSurfaceColors(VDSColor.interactiveDisabledOnlight, VDSColor.interactiveDisabledOndark, forState: [.selected, .disabled]) } //-------------------------------------------------- @@ -182,10 +177,8 @@ open class RadioBoxItem: Control, Changeable, FormFieldable { addSubview(selectorView) selectorView.isUserInteractionEnabled = false - selectorView.addSubview(mainStackView) - - mainStackView.addArrangedSubview(selectorStackView) - + selectorView.addSubview(selectorStackView) + selectorStackView.addArrangedSubview(selectorLeftLabelStackView) selectorStackView.addArrangedSubview(subTextRightLabel) selectorLeftLabelStackView.addArrangedSubview(textLabel) @@ -197,7 +190,7 @@ open class RadioBoxItem: Control, Changeable, FormFieldable { .pinTrailing(0, .defaultHigh) .pinBottom(0, .defaultHigh) - mainStackView.pinToSuperView(.uniform(16)) + selectorStackView.pinToSuperView(.uniform(16)) } /// Resets to default settings. @@ -323,7 +316,7 @@ open class RadioBoxItem: Control, Changeable, FormFieldable { //get the colors let backgroundColor = backgroundColorConfiguration.getColor(self) let borderColor = borderColorConfiguration.getColor(self) - let borderWidth = isSelected || isHighlighted ? selectorBorderWidthSelected : selectorBorderWidth + let borderWidth = (isSelected || isHighlighted) && isEnabled ? selectorBorderWidthSelected : selectorBorderWidth selectorView.backgroundColor = backgroundColor selectorView.layer.borderColor = borderColor.cgColor diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 94d304a7..c62a7946 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,10 @@ +1.0.58 +---------------- +- CXTDT-542341 - RadioButtonItem - disabled state color/borderWidth +- CXTDT-542333 - RadioButtonItem - padding fix +- CXTDT-542295 - ButtonIcon - Disabled state +- ONEAPP-6360 - Notification - Accessiblity issues + 1.0.57 ---------------- - CXTDT-540077 - BadgeIndicator Font