From bdbc63e677b5e825b0b10857c3ae948099d8a1d4 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 5 Jun 2023 10:59:24 -0500 Subject: [PATCH] refactored name to ReadioBoxItem Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 8 ++++---- VDS/Components/RadioBox/RadioBoxGroup.swift | 8 ++++---- .../RadioBox/{RadioBox.swift => RadioBoxItem.swift} | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) rename VDS/Components/RadioBox/{RadioBox.swift => RadioBoxItem.swift} (99%) diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index 26d8ae24..80db9b43 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -57,7 +57,7 @@ EA8141102A127066004F60D2 /* UIColor+VDSColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA81410F2A127066004F60D2 /* UIColor+VDSColor.swift */; }; EA89200428AECF4B006B9984 /* UITextField+Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89200328AECF4B006B9984 /* UITextField+Publisher.swift */; }; EA89200628B526D6006B9984 /* CheckboxGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89200528B526D6006B9984 /* CheckboxGroup.swift */; }; - EA89201328B568D8006B9984 /* RadioBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89201228B568D8006B9984 /* RadioBox.swift */; }; + EA89201328B568D8006B9984 /* RadioBoxItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89201228B568D8006B9984 /* RadioBoxItem.swift */; }; EA89201528B56CF4006B9984 /* RadioBoxGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89201428B56CF4006B9984 /* RadioBoxGroup.swift */; }; EA978EC5291D6AFE00ACC883 /* AnyLabelAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA978EC4291D6AFE00ACC883 /* AnyLabelAttribute.swift */; }; EA985BE629688F6A00F2FF2E /* TileletBadgeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985BE529688F6A00F2FF2E /* TileletBadgeModel.swift */; }; @@ -188,7 +188,7 @@ EA81410F2A127066004F60D2 /* UIColor+VDSColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+VDSColor.swift"; sourceTree = ""; }; EA89200328AECF4B006B9984 /* UITextField+Publisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Publisher.swift"; sourceTree = ""; }; EA89200528B526D6006B9984 /* CheckboxGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckboxGroup.swift; sourceTree = ""; }; - EA89201228B568D8006B9984 /* RadioBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioBox.swift; sourceTree = ""; }; + EA89201228B568D8006B9984 /* RadioBoxItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioBoxItem.swift; sourceTree = ""; }; EA89201428B56CF4006B9984 /* RadioBoxGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioBoxGroup.swift; sourceTree = ""; }; EA978EC4291D6AFE00ACC883 /* AnyLabelAttribute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyLabelAttribute.swift; sourceTree = ""; }; EA985BE529688F6A00F2FF2E /* TileletBadgeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TileletBadgeModel.swift; sourceTree = ""; }; @@ -590,7 +590,7 @@ EA89200B28B530F0006B9984 /* RadioBox */ = { isa = PBXGroup; children = ( - EA89201228B568D8006B9984 /* RadioBox.swift */, + EA89201228B568D8006B9984 /* RadioBoxItem.swift */, EA89201428B56CF4006B9984 /* RadioBoxGroup.swift */, ); path = RadioBox; @@ -848,7 +848,7 @@ EA297A5729FB0A360031ED56 /* AppleGuidlinesTouchable.swift in Sources */, EA3361C328902D960071C351 /* Toggle.swift in Sources */, EAF7F0A0289AB7EC00B287F5 /* View.swift in Sources */, - EA89201328B568D8006B9984 /* RadioBox.swift in Sources */, + EA89201328B568D8006B9984 /* RadioBoxItem.swift in Sources */, EAC9258C2911C9DE00091998 /* InputField.swift in Sources */, EA3362402892EF6C0071C351 /* Label.swift in Sources */, EAB2376229E9880400AABE9A /* TrailingTooltipLabel.swift in Sources */, diff --git a/VDS/Components/RadioBox/RadioBoxGroup.swift b/VDS/Components/RadioBox/RadioBoxGroup.swift index 9c39bf19..3196de93 100644 --- a/VDS/Components/RadioBox/RadioBoxGroup.swift +++ b/VDS/Components/RadioBox/RadioBoxGroup.swift @@ -9,12 +9,12 @@ import Foundation import UIKit @objc(VDSRadioBoxGroup) -open class RadioBoxGroup: SelectorGroupSelectedHandlerBase { +open class RadioBoxGroup: SelectorGroupSelectedHandlerBase { //-------------------------------------------------- // MARK: - Public Properties //-------------------------------------------------- - public override var selectorViews: [RadioBox] { + public override var selectorViews: [RadioBoxItem] { willSet { mainStackView.arrangedSubviews.forEach { $0.removeFromSuperview() } } @@ -33,7 +33,7 @@ open class RadioBoxGroup: SelectorGroupSelectedHandlerBase { didSet { if let selectorModels { selectorViews = selectorModels.map { model in - return RadioBox().with { + return RadioBoxItem().with { $0.accessibilityLabel = model.accessibileText $0.text = model.text $0.textAttributes = model.textAttributes @@ -96,7 +96,7 @@ open class RadioBoxGroup: SelectorGroupSelectedHandlerBase { }.store(in: &subscribers) } - open override func didSelect(_ selectedControl: RadioBox) { + open override func didSelect(_ selectedControl: RadioBoxItem) { let oldSelectedControl = selectorViews.filter { $0.isSelected == true }.first oldSelectedControl?.toggle() selectedControl.toggle() diff --git a/VDS/Components/RadioBox/RadioBox.swift b/VDS/Components/RadioBox/RadioBoxItem.swift similarity index 99% rename from VDS/Components/RadioBox/RadioBox.swift rename to VDS/Components/RadioBox/RadioBoxItem.swift index 0584079d..66d40542 100644 --- a/VDS/Components/RadioBox/RadioBox.swift +++ b/VDS/Components/RadioBox/RadioBoxItem.swift @@ -11,8 +11,8 @@ import Combine import VDSColorTokens import VDSFormControlsTokens -@objc(VDSRadioBox) -open class RadioBox: Control, Changeable { +@objc(VDSRadioBoxItem) +open class RadioBoxItem: Control, Changeable { //-------------------------------------------------- // MARK: - Initializers