From dd50133dc17a44402ad4c2689b00d575c3fbf8ee Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 9 Jan 2023 15:44:43 -0600 Subject: [PATCH 1/4] added icons Signed-off-by: Matt Bruce --- VDSSample.xcodeproj/project.pbxproj | 4 + .../ViewControllers/IconViewController.swift | 105 ++++++++++++++++++ .../ViewControllers/MenuViewController.swift | 1 + 3 files changed, 110 insertions(+) create mode 100644 VDSSample/ViewControllers/IconViewController.swift diff --git a/VDSSample.xcodeproj/project.pbxproj b/VDSSample.xcodeproj/project.pbxproj index 6704630..f65a12b 100644 --- a/VDSSample.xcodeproj/project.pbxproj +++ b/VDSSample.xcodeproj/project.pbxproj @@ -59,6 +59,7 @@ EA89205128B68307006B9984 /* TextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA89205028B68307006B9984 /* TextField.swift */; }; EA978EC2291AC62200ACC883 /* VDS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA978EC1291AC62200ACC883 /* VDS.framework */; }; EA978EC3291AC62200ACC883 /* VDS.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA978EC1291AC62200ACC883 /* VDS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + EA985C01296CC21C00F2FF2E /* IconViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C00296CC21C00F2FF2E /* IconViewController.swift */; }; EAA5EEAD28EB6924003B3210 /* TextEntryFieldViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA5EEAC28EB6924003B3210 /* TextEntryFieldViewController.swift */; }; EAB1D2C928AAAA1D00DAE764 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D2C828AAAA1D00DAE764 /* BaseViewController.swift */; }; EAB1D2D428AC409F00DAE764 /* LabelViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */; }; @@ -125,6 +126,7 @@ EA89204D28B67332006B9984 /* CheckBoxGroupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckBoxGroupViewController.swift; sourceTree = ""; }; EA89205028B68307006B9984 /* TextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = ""; }; EA978EC1291AC62200ACC883 /* VDS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = VDS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EA985C00296CC21C00F2FF2E /* IconViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IconViewController.swift; sourceTree = ""; }; EAA5EEAC28EB6924003B3210 /* TextEntryFieldViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextEntryFieldViewController.swift; sourceTree = ""; }; EAB1D2C828AAAA1D00DAE764 /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelViewController.swift; sourceTree = ""; }; @@ -252,6 +254,7 @@ 5FC35BE828D5235A004EBEAC /* ButtonViewController.swift */, EA89204D28B67332006B9984 /* CheckBoxGroupViewController.swift */, EAF7F09B2899B92400B287F5 /* CheckboxViewController.swift */, + EA985C00296CC21C00F2FF2E /* IconViewController.swift */, EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */, EA89201828B56DF5006B9984 /* RadioBoxGroupViewController.swift */, EAF7F11928A14A0E00B287F5 /* RadioButtonViewController.swift */, @@ -433,6 +436,7 @@ EA89204E28B67332006B9984 /* CheckBoxGroupViewController.swift in Sources */, EAA5EEAD28EB6924003B3210 /* TextEntryFieldViewController.swift in Sources */, EA89204928B66CE2006B9984 /* KeyboardFrameChangeListening.swift in Sources */, + EA985C01296CC21C00F2FF2E /* IconViewController.swift in Sources */, EAC9258029119FC400091998 /* TextLinkViewController.swift in Sources */, EAB1D2D428AC409F00DAE764 /* LabelViewController.swift in Sources */, EA89204B28B66CE2006B9984 /* ScrollViewKeyboardAvoider.swift in Sources */, diff --git a/VDSSample/ViewControllers/IconViewController.swift b/VDSSample/ViewControllers/IconViewController.swift new file mode 100644 index 0000000..a104368 --- /dev/null +++ b/VDSSample/ViewControllers/IconViewController.swift @@ -0,0 +1,105 @@ +// +// IconViewController.swift +// VDSSample +// +// Created by Matt Bruce on 1/9/23. +// + +import Foundation +import UIKit +import VDS +import Combine + +class IconViewController: BaseViewController { + + lazy var colorPickerSelectorView = { + PickerSelectorView(title: "", + picker: self.picker, + items: IconColor.allCases) + }() + + lazy var categoryPickerSelectorView = { + PickerSelectorView(title: "", + picker: self.picker, + items: IconCategory.allCases.sorted{ $0.rawValue < $1.rawValue }) + }() + + lazy var namePickerSelectorView = { + PickerSelectorView(title: "", + picker: self.picker, + items: []) + }() + + lazy var sizePickerSelectorView = { + PickerSelectorView(title: "", + picker: self.picker, + items: IconSize.allCases) + }() + + var icon = Icon() + + override func viewDidLoad() { + super.viewDidLoad() + addContentTopView(view: .makeWrapper(for: icon)) + setupForm() + setupPicker() + setupModel() + } + + func setupForm(){ + addFormRow(label: "Surface", view: surfacePickerSelectorView) + addFormRow(label: "Size", view: sizePickerSelectorView) + addFormRow(label: "Color", view: colorPickerSelectorView) + addFormRow(label: "Category", view: categoryPickerSelectorView) + addFormRow(label: "Name", view: namePickerSelectorView) + } + + func setupModel() { + let name = IconName.accessibility + icon.color = .black + icon.name = name + + //setup UI + surfacePickerSelectorView.text = icon.surface.rawValue + sizePickerSelectorView.text = icon.size.rawValue + colorPickerSelectorView.text = icon.color.rawValue + category = .accessibility + namePickerSelectorView.text = name.rawValue + } + + private var category: IconCategory = .accessibility { + didSet { + categoryPickerSelectorView.text = category.rawValue + let icons = category.icons.sorted{ $0.rawValue < $1.rawValue } + namePickerSelectorView.items = icons + if let first = icons.first { + namePickerSelectorView.text = first.rawValue + icon.name = first + } + } + } + + func setupPicker(){ + + surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in + self?.icon.surface = item + self?.contentTopView.backgroundColor = item.color + } + + categoryPickerSelectorView.onPickerDidSelect = { [weak self] item in + self?.category = item + } + + sizePickerSelectorView.onPickerDidSelect = { [weak self] item in + self?.icon.size = item + } + + colorPickerSelectorView.onPickerDidSelect = { [weak self] item in + self?.icon.color = item + } + + namePickerSelectorView.onPickerDidSelect = { [weak self] item in + self?.icon.name = item + } + } +} diff --git a/VDSSample/ViewControllers/MenuViewController.swift b/VDSSample/ViewControllers/MenuViewController.swift index d4333b0..def5b64 100644 --- a/VDSSample/ViewControllers/MenuViewController.swift +++ b/VDSSample/ViewControllers/MenuViewController.swift @@ -76,6 +76,7 @@ class MenuViewController: UITableViewController { MenuComponent(title: "ButtonGroup", completed: true, viewController: ButtonGroupViewController.self), MenuComponent(title: "Checkbox", completed: true, viewController: CheckboxViewController.self), MenuComponent(title: "CheckboxGroup", completed: true, viewController: CheckboxGroupViewController.self), + MenuComponent(title: "Icon", completed: true, viewController: IconViewController.self), MenuComponent(title: "Label", completed: true, viewController: LabelViewController.self), MenuComponent(title: "RadioBoxGroup", completed: true, viewController: RadioBoxGroupViewController.self), MenuComponent(title: "RadioButtonGroup", completed: true, viewController: RadioButtonViewController.self), From 92d5f0342bc5fd93b0c1b2b8d762b6019d748e12 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 10 Jan 2023 13:15:12 -0600 Subject: [PATCH 2/4] updated to include bundle icons added extension for IconName registered bundle Signed-off-by: Matt Bruce --- VDSSample.xcodeproj/project.pbxproj | 29 + VDSSample/AppDelegate.swift | 5 + VDSSample/Extensions/IconName.swift | 557 ++++++++++++++++++ .../ViewControllers/IconViewController.swift | 27 +- 4 files changed, 592 insertions(+), 26 deletions(-) create mode 100644 VDSSample/Extensions/IconName.swift diff --git a/VDSSample.xcodeproj/project.pbxproj b/VDSSample.xcodeproj/project.pbxproj index f65a12b..797aeeb 100644 --- a/VDSSample.xcodeproj/project.pbxproj +++ b/VDSSample.xcodeproj/project.pbxproj @@ -60,6 +60,9 @@ EA978EC2291AC62200ACC883 /* VDS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA978EC1291AC62200ACC883 /* VDS.framework */; }; EA978EC3291AC62200ACC883 /* VDS.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EA978EC1291AC62200ACC883 /* VDS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; EA985C01296CC21C00F2FF2E /* IconViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C00296CC21C00F2FF2E /* IconViewController.swift */; }; + EA985C19296CC73D00F2FF2E /* VDSIcons.bundle in Embed PlugIns */ = {isa = PBXBuildFile; fileRef = EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + EA985C1B296CC74A00F2FF2E /* VDSIcons.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */; }; + EA985C20296DECF600F2FF2E /* IconName.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C1F296DECF600F2FF2E /* IconName.swift */; }; EAA5EEAD28EB6924003B3210 /* TextEntryFieldViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA5EEAC28EB6924003B3210 /* TextEntryFieldViewController.swift */; }; EAB1D2C928AAAA1D00DAE764 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D2C828AAAA1D00DAE764 /* BaseViewController.swift */; }; EAB1D2D428AC409F00DAE764 /* LabelViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */; }; @@ -95,6 +98,17 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + EA985C1A296CC73D00F2FF2E /* Embed PlugIns */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + EA985C19296CC73D00F2FF2E /* VDSIcons.bundle in Embed PlugIns */, + ); + name = "Embed PlugIns"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -127,6 +141,8 @@ EA89205028B68307006B9984 /* TextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = ""; }; EA978EC1291AC62200ACC883 /* VDS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = VDS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; EA985C00296CC21C00F2FF2E /* IconViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IconViewController.swift; sourceTree = ""; }; + EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = VDSIcons.bundle; path = SharedFrameworks/VDSIcons.bundle; sourceTree = ""; }; + EA985C1F296DECF600F2FF2E /* IconName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconName.swift; sourceTree = ""; }; EAA5EEAC28EB6924003B3210 /* TextEntryFieldViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextEntryFieldViewController.swift; sourceTree = ""; }; EAB1D2C828AAAA1D00DAE764 /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelViewController.swift; sourceTree = ""; }; @@ -180,6 +196,7 @@ isa = PBXGroup; children = ( EAF7F0C3289DA24F00B287F5 /* Supporting Files */, + EA985C1E296DECEA00F2FF2E /* Extensions */, EAF7F07E28996A0700B287F5 /* Protocols */, EA89204F28B682F4006B9984 /* Classes */, EAF7F07F28996A1900B287F5 /* ViewControllers */, @@ -193,6 +210,7 @@ EA3C3BB8289968A0000CA526 /* Frameworks */ = { isa = PBXGroup; children = ( + EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */, EA978EC1291AC62200ACC883 /* VDS.framework */, EAF7F0DC289DB0B400B287F5 /* VDSColorTokens.xcframework */, EAF7F0DB289DB0B400B287F5 /* VDSFormControlsTokens.xcframework */, @@ -224,6 +242,14 @@ path = Classes; sourceTree = ""; }; + EA985C1E296DECEA00F2FF2E /* Extensions */ = { + isa = PBXGroup; + children = ( + EA985C1F296DECF600F2FF2E /* IconName.swift */, + ); + path = Extensions; + sourceTree = ""; + }; EAF7F0792899698800B287F5 /* Resources */ = { isa = PBXGroup; children = ( @@ -300,6 +326,7 @@ EA3C3B96289966EF000CA526 /* Frameworks */, EA3C3B97289966EF000CA526 /* Resources */, EA3C3BC2289968A0000CA526 /* Embed Frameworks */, + EA985C1A296CC73D00F2FF2E /* Embed PlugIns */, ); buildRules = ( ); @@ -356,6 +383,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + EA985C1B296CC74A00F2FF2E /* VDSIcons.bundle in Resources */, EA3C3BA9289966F1000CA526 /* LaunchScreen.storyboard in Resources */, EAF7F07D2899698800B287F5 /* Assets.xcassets in Resources */, EA3C3BA4289966EF000CA526 /* Main.storyboard in Resources */, @@ -435,6 +463,7 @@ EAF7F09C2899B92400B287F5 /* CheckboxViewController.swift in Sources */, EA89204E28B67332006B9984 /* CheckBoxGroupViewController.swift in Sources */, EAA5EEAD28EB6924003B3210 /* TextEntryFieldViewController.swift in Sources */, + EA985C20296DECF600F2FF2E /* IconName.swift in Sources */, EA89204928B66CE2006B9984 /* KeyboardFrameChangeListening.swift in Sources */, EA985C01296CC21C00F2FF2E /* IconViewController.swift in Sources */, EAC9258029119FC400091998 /* TextLinkViewController.swift in Sources */, diff --git a/VDSSample/AppDelegate.swift b/VDSSample/AppDelegate.swift index 8f1ac5b..dd74f2e 100644 --- a/VDSSample/AppDelegate.swift +++ b/VDSSample/AppDelegate.swift @@ -6,6 +6,7 @@ // import UIKit +import VDS @main class AppDelegate: UIResponder, UIApplicationDelegate { @@ -14,6 +15,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. + if let resourcePath = Bundle.main.path(forResource: "VDSIcons", ofType: "bundle") { + BundleManager.register(resourcePath) + } + return true } diff --git a/VDSSample/Extensions/IconName.swift b/VDSSample/Extensions/IconName.swift new file mode 100644 index 0000000..6d98811 --- /dev/null +++ b/VDSSample/Extensions/IconName.swift @@ -0,0 +1,557 @@ +// +// IconName.swift +// VDSSample +// +// Created by Matt Bruce on 1/10/23. +// + +import Foundation +import VDS + +extension IconName { + //accessibility + static let accessibility = IconName(name: "accessibility") + static let americanSignLanguage = IconName(name: "american-sign-language") + static let assistedListeningSystems = IconName(name: "assisted-listening-systems") + static let audioDescription = IconName(name: "audio-description") + static let blind = IconName(name: "blind") + static let braille = IconName(name: "braille") + static let brightness = IconName(name: "brightness") + static let closedCaptioning = IconName(name: "closed-captioning") + static let closedCaptioningFill = IconName(name: "closed-captioning-fill") + static let cognitiveDisability = IconName(name: "cognitive-disability") + static let deaf = IconName(name: "deaf") + static let internationalSymbolOfAccess = IconName(name: "international-symbol-of-access") + static let openCaptioning = IconName(name: "open-captioning") + static let phoneVolume = IconName(name: "phone-volume") + static let teletype = IconName(name: "teletype") + static let textToSpeech = IconName(name: "text-to-speech") + + //b2b + static let assetTracking = IconName(name: "asset-tracking") + static let businessContinuity = IconName(name: "business-continuity") + static let conditionBasedMaintenance = IconName(name: "condition-based-maintenance") + static let conditionBasedWrench = IconName(name: "condition-based-wrench") + static let constructionHammer = IconName(name: "construction-hammer") + static let constructionTruck = IconName(name: "construction-truck") + static let digitalSignageCar = IconName(name: "digital-signage-car") + static let digitalSignage = IconName(name: "digital-signage") + static let droneCamera = IconName(name: "drone-camera") + static let educationCurriculum = IconName(name: "education-curriculum") + static let education = IconName(name: "education") + static let electricPower = IconName(name: "electric-power") + static let electricUtility = IconName(name: "electric-utility") + static let energyScience = IconName(name: "energy-science") + static let energyUtilities = IconName(name: "energy-utilities") + static let enterprise = IconName(name: "enterprise") + static let federalDefense = IconName(name: "federal-defense") + static let financial = IconName(name: "financial") + static let fleetTracking = IconName(name: "fleet-tracking") + static let fleet = IconName(name: "fleet") + static let gas = IconName(name: "gas") + static let government = IconName(name: "government") + static let group = IconName(name: "group") + static let growth = IconName(name: "growth") + static let hackers = IconName(name: "hackers") + static let healthcareCorporate = IconName(name: "healthcare-corporate") + static let healthcareGeneral = IconName(name: "healthcare-general") + static let healthcareWorker = IconName(name: "healthcare-worker") + static let ideasSolutions = IconName(name: "ideas-solutions") + static let inclusivity = IconName(name: "inclusivity") + static let industry = IconName(name: "industry") + static let insurance = IconName(name: "insurance") + static let intelligentTracking = IconName(name: "intelligent-tracking") + static let internetOfThings = IconName(name: "internet-of-things") + static let joinCall = IconName(name: "join-call") + static let k12Education = IconName(name: "k12-education") + static let laptopAntivirus = IconName(name: "laptop-antivirus") + static let laptopControls = IconName(name: "laptop-controls") + static let laptopGpsTracking = IconName(name: "laptop-gps-tracking") + static let laptopSettings = IconName(name: "laptop-settings") + static let laptopTrends = IconName(name: "laptop-trends") + static let laptopWireless = IconName(name: "laptop-wireless") + static let law = IconName(name: "law") + static let lmr = IconName(name: "lmr") + static let loyaltyRetention = IconName(name: "loyalty-retention") + static let manufacturing = IconName(name: "manufacturing") + static let mediaEntertainment = IconName(name: "media-entertainment") + static let mediumBusiness = IconName(name: "medium-business") + static let mobileCommandCenter = IconName(name: "mobile-command-center") + static let mobileKioskInfo = IconName(name: "mobile-kiosk-info") + static let mobileKioskWireless = IconName(name: "mobile-kiosk-wireless") + static let mobileRetail = IconName(name: "mobile-retail") + static let mobileSearch = IconName(name: "mobile-search") + static let mobileWorkforceManagement = IconName(name: "mobile-workforce-management") + static let network = IconName(name: "network") + static let networkAttachedStorage = IconName(name: "network-attached-storage") + static let officePhoneSystem = IconName(name: "office-phone-system") + static let oilIndustry = IconName(name: "oil-industry") + static let operationalTransformation = IconName(name: "operational-transformation") + static let pharmaceutical = IconName(name: "pharmaceutical") + static let pharmacy = IconName(name: "pharmacy") + static let planner = IconName(name: "planner") + static let powerUtility = IconName(name: "power-utility") + static let professionalServices = IconName(name: "professional-services") + static let qualityAssurance = IconName(name: "quality-assurance") + static let realEstate = IconName(name: "real-estate") + static let regulatoryCompliance = IconName(name: "regulatory-compliance") + static let retail = IconName(name: "retail") + static let security = IconName(name: "security") + static let securitySolution = IconName(name: "security-solution") + static let smarthouse = IconName(name: "smarthouse") + static let socialMedia = IconName(name: "social-media") + static let software = IconName(name: "software") + static let solarPower = IconName(name: "solar-power") + static let solutions = IconName(name: "solutions") + static let supplyChain = IconName(name: "supply-chain") + static let systemIntegration = IconName(name: "system-integration") + static let telecommunications = IconName(name: "telecommunications") + static let telemedicine = IconName(name: "telemedicine") + static let telemetry = IconName(name: "telemetry") + static let thermodynamics = IconName(name: "thermodynamics") + static let trends = IconName(name: "trends") + static let utilityWorker = IconName(name: "utility-worker") + static let vehicleTracking = IconName(name: "vehicle-tracking") + static let warehouseManagement = IconName(name: "warehouse-management") + static let waterIndustry = IconName(name: "water-industry") + static let wellness = IconName(name: "wellness") + + //directional + static let upCaret = IconName(name: "up-caret") + static let closeAlt = IconName(name: "close-alt") + static let close = IconName(name: "close") + static let downArrow = IconName(name: "down-arrow") + static let downCaret = IconName(name: "down-caret") + static let evenMoreFlexibility = IconName(name: "even-more-flexibility") + static let flexibilityRectangles = IconName(name: "flexibility-rectangles") + static let flexibility = IconName(name: "flexibility") + static let gateway = IconName(name: "gateway") + static let leftArrow = IconName(name: "left-arrow") + static let leftCaret = IconName(name: "left-caret") + static let minus = IconName(name: "minus") + static let moreFlexibility = IconName(name: "more-flexibility") + static let noOff = IconName(name: "no-off") + static let no = IconName(name: "no") + static let plus = IconName(name: "plus") + static let rightArrow = IconName(name: "right-arrow") + static let rightCaret = IconName(name: "right-caret") + static let swipeLeft = IconName(name: "swipe-left") + static let swipeRight = IconName(name: "swipe-right") + static let swipe = IconName(name: "swipe") + static let `switch` = IconName(name: "switch") + static let upArrow = IconName(name: "up-arrow") + + //international + static let internationalLongDistance = IconName(name: "international-long-distance") + static let international = IconName(name: "international") + static let travelPass = IconName(name: "travel-pass") + static let tripPlanner = IconName(name: "trip-planner") + + //navigational + static let advancedSettings = IconName(name: "advanced-settings") + static let agentChat = IconName(name: "agent-chat") + static let bookmark = IconName(name: "bookmark") + static let chat = IconName(name: "chat") + static let filterOff = IconName(name: "filter-off") + static let filter = IconName(name: "filter") + static let list = IconName(name: "list") + static let lockClosed = IconName(name: "lock-closed") + static let lockOpen = IconName(name: "lock-open") + static let logout = IconName(name: "logout") + static let menu = IconName(name: "menu") + static let moreHorizontal = IconName(name: "more-horizontal") + static let myAccount = IconName(name: "my-account") + static let realTimeTracking = IconName(name: "real-time-tracking") + static let search = IconName(name: "search") + static let settings = IconName(name: "settings") + static let supportDrawer = IconName(name: "support-drawer") + static let support = IconName(name: "support") + static let userRegistration = IconName(name: "user-registration") + + //nofication_feedback + static let alertNotification = IconName(name: "alert-notification") + static let checkmarkAlt = IconName(name: "checkmark-alt") + static let checkmark = IconName(name: "checkmark") + static let clock = IconName(name: "clock") + static let error = IconName(name: "error") + static let feedback = IconName(name: "feedback") + static let loader = IconName(name: "loader") + static let notification = IconName(name: "notification") + static let notificationsOff = IconName(name: "notifications-off") + static let notifyMe = IconName(name: "notify-me") + static let pushNotification = IconName(name: "push-notification") + static let remindMe = IconName(name: "remind-me") + static let reminder = IconName(name: "reminder") + static let securityAlert = IconName(name: "security-alert") + static let securityCheck = IconName(name: "security-check") + static let securityKeyhole = IconName(name: "security-keyhole") + static let securityWireless = IconName(name: "security-wireless") + static let snooze = IconName(name: "snooze") + static let speedMonitoring = IconName(name: "speed-monitoring") + static let starOff = IconName(name: "star-off") + static let star = IconName(name: "star") + static let sync = IconName(name: "sync") + static let timer = IconName(name: "timer") + static let warning = IconName(name: "warning") + + //objects_industry + static let ctr = IconName(name: "ctr") + static let passenger = IconName(name: "passenger") + static let tvContent = IconName(name: "tv-content") + static let urlTransparency = IconName(name: "url-transparency") + static let adaptiveSpeaker = IconName(name: "adaptive-speaker") + static let adTechStack = IconName(name: "ad-tech-stack") + static let agricultureLeaves = IconName(name: "agriculture-leaves") + static let agricultureTractor = IconName(name: "agriculture-tractor") + static let agricultureVineyard = IconName(name: "agriculture-vineyard") + static let airport = IconName(name: "airport") + static let airConditioner = IconName(name: "air-conditioner") + static let audienceTargetedSearch = IconName(name: "audience-targeted-search") + static let award = IconName(name: "award") + static let babyMonitor = IconName(name: "baby-monitor") + static let bestPractices = IconName(name: "best-practices") + static let bid = IconName(name: "bid") + static let bot = IconName(name: "bot") + static let cellTower = IconName(name: "cell-tower") + static let cloudDocument = IconName(name: "cloud-document") + static let coffee = IconName(name: "coffee") + static let coin = IconName(name: "coin") + static let complianceDocument = IconName(name: "compliance-document") + static let conversion = IconName(name: "conversion") + static let countDown = IconName(name: "count-down") + static let crossDeviceTargeting = IconName(name: "cross-device-targeting") + static let crossDevice = IconName(name: "cross-device") + static let customAudience = IconName(name: "custom-audience") + static let digitalContent = IconName(name: "digital-content") + static let dining = IconName(name: "dining") + static let display = IconName(name: "display") + static let domainTargeting = IconName(name: "domain-targeting") + static let doorbell = IconName(name: "doorbell") + static let driver = IconName(name: "driver") + static let euro = IconName(name: "euro") + static let expense = IconName(name: "expense") + static let faceCovering = IconName(name: "face-covering") + static let fineArt = IconName(name: "fine-art") + static let flag = IconName(name: "flag") + static let flurry = IconName(name: "flurry") + static let fridge = IconName(name: "fridge") + static let gaming = IconName(name: "gaming") + static let geofence = IconName(name: "geofence") + static let home = IconName(name: "home") + static let identityGraph = IconName(name: "identity-graph") + static let impressionVideo = IconName(name: "impression-video") + static let inferredIdentity = IconName(name: "inferred-identity") + static let irobot = IconName(name: "irobot") + static let ironingBoard = IconName(name: "ironing-board") + static let kidsStroller = IconName(name: "kids-stroller") + static let levers = IconName(name: "levers") + static let mobilePlusTv = IconName(name: "mobile-plus-tv") + static let mobileRetargeting = IconName(name: "mobile-retargeting") + static let motionDetector = IconName(name: "motion-detector") + static let multipleDocuments = IconName(name: "multiple-documents") + static let music = IconName(name: "music") + static let nativeVideo = IconName(name: "native-video") + static let native = IconName(name: "native") + static let onGoCar = IconName(name: "on-go-car") + static let packBackpack = IconName(name: "pack-backpack") + static let packLuggage = IconName(name: "pack-luggage") + static let packPurse = IconName(name: "pack-purse") + static let petsCollar = IconName(name: "pets-collar") + static let realTime = IconName(name: "real-time") + static let research = IconName(name: "research") + static let retailStore = IconName(name: "retail-store") + static let retargeting = IconName(name: "retargeting") + static let schoolNotebook = IconName(name: "school-notebook") + static let singleDocument = IconName(name: "single-document") + static let smartFamilyChildAddressBook = IconName(name: "smart-family-child-address-book") + static let smartScooter = IconName(name: "smart-scooter") + static let smokeDetector = IconName(name: "smoke-detector") + static let solarPanel = IconName(name: "solar-panel") + static let sportsBike = IconName(name: "sports-bike") + static let sportsSkis = IconName(name: "sports-skis") + static let sportsSoccer = IconName(name: "sports-soccer") + static let sportsTennis = IconName(name: "sports-tennis") + static let stadiumAlt = IconName(name: "stadium-alt") + static let stadiumFlag = IconName(name: "stadium-flag") + static let thermostatTech = IconName(name: "thermostat-tech") + static let ticket = IconName(name: "ticket") + static let tradingDeck = IconName(name: "trading-deck") + static let traffic = IconName(name: "traffic") + static let travelKeys = IconName(name: "travel-keys") + static let trumpet = IconName(name: "trumpet") + static let unification = IconName(name: "unification") + static let visibility = IconName(name: "visibility") + static let weights = IconName(name: "weights") + static let yield = IconName(name: "yield") + + //orders_pricing + static let addToFavorite = IconName(name: "add-to-favorite") + static let addedToFavorite = IconName(name: "added-to-favorite") + static let billDown = IconName(name: "bill-down") + static let billUp = IconName(name: "bill-up") + static let camera = IconName(name: "camera") + static let creditCard = IconName(name: "credit-card") + static let gift = IconName(name: "gift") + static let inStorePickup = IconName(name: "in-store-pickup") + static let noFee = IconName(name: "no-fee") + static let oneYear = IconName(name: "one-year") + static let orders = IconName(name: "orders") + static let outOfStock = IconName(name: "out-of-stock") + static let reoccuringPayment = IconName(name: "reoccuring-payment") + static let reservations = IconName(name: "reservations") + static let returns = IconName(name: "returns") + static let rewards = IconName(name: "rewards") + static let shipping = IconName(name: "shipping") + static let shoppingBag = IconName(name: "shopping-bag") + static let shopping = IconName(name: "shopping") + static let tag = IconName(name: "tag") + static let taxes = IconName(name: "taxes") + + //other + static let growthOpportunities = IconName(name: "growth-opportunities") + static let noSmoking = IconName(name: "no-smoking") + static let socialDistancing = IconName(name: "social-distancing") + + //plans_other + static let battery = IconName(name: "battery") + static let bonusData = IconName(name: "bonus-data") + static let bringYourOwnDevice = IconName(name: "bring-your-own-device") + static let callerId = IconName(name: "caller-id") + static let carryoverData = IconName(name: "carryover-data") + static let compass = IconName(name: "compass") + static let connect = IconName(name: "connect") + static let dataBoost = IconName(name: "data-boost") + static let deviceProtection = IconName(name: "device-protection") + static let devicesAddons = IconName(name: "devices-addons") + static let embeddedSound = IconName(name: "embedded-sound") + static let findMyRemote = IconName(name: "find-my-remote") + static let giftedData = IconName(name: "gifted-data") + static let homeInternet = IconName(name: "home-internet") + static let internetDevices = IconName(name: "internet-devices") + static let largePlan = IconName(name: "large-plan") + static let mediumPlan = IconName(name: "medium-plan") + static let mobileApps = IconName(name: "mobile-apps") + static let mobileHotspot = IconName(name: "mobile-hotspot") + static let multipleDeviceProtection = IconName(name: "multiple-device-protection") + static let multipleDevices = IconName(name: "multiple-devices") + static let nationWide = IconName(name: "nation-wide") + static let phoneAlt = IconName(name: "phone-alt") + static let purchaseData = IconName(name: "purchase-data") + static let router = IconName(name: "router") + static let simCard = IconName(name: "sim-card") + static let smallPlan = IconName(name: "small-plan") + static let smartAssistant = IconName(name: "smart-assistant") + static let sound = IconName(name: "sound") + static let tablet = IconName(name: "tablet") + static let techLaptop = IconName(name: "tech-laptop") + static let techPhone = IconName(name: "tech-phone") + static let totalMobileProtection = IconName(name: "total-mobile-protection") + static let unlimitedPlan = IconName(name: "unlimited-plan") + static let uplink = IconName(name: "uplink") + static let videoOnTablet = IconName(name: "video-on-tablet") + static let waterResistant = IconName(name: "water-resistant") + static let wearable = IconName(name: "wearable") + + //social + static let at = IconName(name: "at") + static let facebook = IconName(name: "facebook") + static let instagram = IconName(name: "instagram") + static let twitter = IconName(name: "twitter") + static let youtube = IconName(name: "youtube") + + //utilities + static let ThreeDAd = IconName(name: "3d-ad") + static let ar = IconName(name: "ar") + static let addFolder = IconName(name: "add-folder") + static let addUser = IconName(name: "add-user") + static let analytics = IconName(name: "analytics") + static let announcement = IconName(name: "announcement") + static let archive = IconName(name: "archive") + static let artboard = IconName(name: "artboard") + static let attach = IconName(name: "attach") + static let awareness = IconName(name: "awareness") + static let barcode = IconName(name: "barcode") + static let bluetooth = IconName(name: "bluetooth") + static let boxOpen = IconName(name: "box-open") + static let calendar = IconName(name: "calendar") + static let calibrate = IconName(name: "calibrate") + static let callDisconnected = IconName(name: "call-disconnected") + static let cleanSurface = IconName(name: "clean-surface") + static let cloudAlt = IconName(name: "cloud-alt") + static let cloud = IconName(name: "cloud") + static let comparison = IconName(name: "comparison") + static let compose = IconName(name: "compose") + static let connectParts = IconName(name: "connect-parts") + static let consultativeTransfer = IconName(name: "consultative-transfer") + static let convergence = IconName(name: "convergence") + static let crop = IconName(name: "crop") + static let cta = IconName(name: "cta") + static let customize = IconName(name: "customize") + static let data = IconName(name: "data") + static let decrease = IconName(name: "decrease") + static let deviceActivity = IconName(name: "device-activity") + static let directCarrierBilling = IconName(name: "direct-carrier-billing") + static let directory = IconName(name: "directory") + static let displayUtilities = IconName(name: "display-utilities") + static let distribution = IconName(name: "distribution") + static let download = IconName(name: "download") + static let dragAndDrop = IconName(name: "drag-and-drop") + static let dropShipment = IconName(name: "drop-shipment") + static let duplicate = IconName(name: "duplicate") + static let edit = IconName(name: "edit") + static let email = IconName(name: "email") + static let emergencyContact = IconName(name: "emergency-contact") + static let emoji = IconName(name: "emoji") + static let externalLink = IconName(name: "external-link") + static let fallDetected = IconName(name: "fall-detected") + static let favorite = IconName(name: "favorite") + static let fax = IconName(name: "fax") + static let fingerprintSensor = IconName(name: "fingerprint-sensor") + static let fire = IconName(name: "fire") + static let fitToZone = IconName(name: "fit-to-zone") + static let flipCamera = IconName(name: "flip-camera") + static let forwardedCall = IconName(name: "forwarded-call") + static let fullscreen = IconName(name: "fullscreen") + static let getHelp = IconName(name: "get-help") + static let gridView = IconName(name: "grid-view") + static let history = IconName(name: "history") + static let humidity = IconName(name: "humidity") + static let incomingCall = IconName(name: "incoming-call") + static let increase = IconName(name: "increase") + static let info = IconName(name: "info") + static let inventory = IconName(name: "inventory") + static let invitationAccepted = IconName(name: "invitation-accepted") + static let invitationExpired = IconName(name: "invitation-expired") + static let invitationRejected = IconName(name: "invitation-rejected") + static let landscape = IconName(name: "landscape") + static let light = IconName(name: "light") + static let link = IconName(name: "link") + static let location = IconName(name: "location") + static let locationPin = IconName(name: "location-pin") + static let mapView = IconName(name: "map-view") + static let masonryView = IconName(name: "masonry-view") + static let maximize = IconName(name: "maximize") + static let mergeCalls = IconName(name: "merge-calls") + static let microphoneAlt = IconName(name: "microphone-alt") + static let microphone = IconName(name: "microphone") + static let missedCall = IconName(name: "missed-call") + static let moveTo = IconName(name: "move-to") + static let multicast = IconName(name: "multicast") + static let mute = IconName(name: "mute") + static let networkConnection = IconName(name: "network-connection") + static let news = IconName(name: "news") + static let next = IconName(name: "next") + static let nfcTag = IconName(name: "nfc-tag") + static let night = IconName(name: "night") + static let noVideo = IconName(name: "no-video") + static let onDemand = IconName(name: "on-demand") + static let outgoingCall = IconName(name: "outgoing-call") + static let paperFreeBilling = IconName(name: "paper-free-billing") + static let pauseInternet = IconName(name: "pause-internet") + static let pause = IconName(name: "pause") + static let peelSticker = IconName(name: "peel-sticker") + static let photo = IconName(name: "photo") + static let platform = IconName(name: "platform") + static let playAlt = IconName(name: "play-alt") + static let playWith = IconName(name: "play-with") + static let play = IconName(name: "play") + static let portrait = IconName(name: "portrait") + static let pressure = IconName(name: "pressure") + static let previous = IconName(name: "previous") + static let print = IconName(name: "print") + static let question = IconName(name: "question") + static let recycle = IconName(name: "recycle") + static let removeItem = IconName(name: "remove-item") + static let replaceAPhoto = IconName(name: "replace-a-photo") + static let reply = IconName(name: "reply") + static let ringing = IconName(name: "ringing") + static let ringtone = IconName(name: "ringtone") + static let riskMonitor = IconName(name: "risk-monitor") + static let rss = IconName(name: "rss") + static let satelliteOff = IconName(name: "satellite-off") + static let satellite = IconName(name: "satellite") + static let save = IconName(name: "save") + static let scaleAlt = IconName(name: "scale-alt") + static let scale = IconName(name: "scale") + static let sendMessage = IconName(name: "send-message") + static let setFallbackImage = IconName(name: "set-fallback-image") + static let setGalleryImage = IconName(name: "set-gallery-image") + static let share = IconName(name: "share") + static let shock = IconName(name: "shock") + static let signalBroadcast = IconName(name: "signal-broadcast") + static let speakerMute = IconName(name: "speaker-mute") + static let speakerPhone = IconName(name: "speaker-phone") + static let speed = IconName(name: "speed") + static let stakeholder = IconName(name: "stakeholder") + static let steps = IconName(name: "steps") + static let stop = IconName(name: "stop") + static let stopAlt = IconName(name: "stop-alt") + static let survey = IconName(name: "survey") + static let talking = IconName(name: "talking") + static let teamLeader = IconName(name: "team-leader") + static let temperature = IconName(name: "temperature") + static let template = IconName(name: "template") + static let theme = IconName(name: "theme") + static let thumbsDown = IconName(name: "thumbs-down") + static let thumbsUp = IconName(name: "thumbs-up") + static let tiles = IconName(name: "tiles") + static let tilt = IconName(name: "tilt") + static let tools = IconName(name: "tools") + static let trash = IconName(name: "trash") + static let turnonOff = IconName(name: "turnon-off") + static let tv = IconName(name: "tv") + static let upload = IconName(name: "upload") + static let userSettings = IconName(name: "user-settings") + static let vibration = IconName(name: "vibration") + static let video = IconName(name: "video") + static let volume = IconName(name: "volume") + static let volunteer = IconName(name: "volunteer") + static let virtualReality = IconName(name: "virtual-reality") + static let voiceHd = IconName(name: "voice-hd") + static let voiceMail = IconName(name: "voice-mail") + static let weather = IconName(name: "weather") + static let whiteBlackList = IconName(name: "white-black-list") + static let wifi = IconName(name: "wifi") + static let zoomIn = IconName(name: "zoom-in") + static let zoomOut = IconName(name: "zoom-out") +} + +extension IconName { + static let all: [IconName] = [ + //accessibility + .accessibility, .americanSignLanguage, .assistedListeningSystems, .audioDescription, .blind, .braille, .brightness, .closedCaptioning, .closedCaptioningFill, .cognitiveDisability, .deaf, .internationalSymbolOfAccess, .openCaptioning, .phoneVolume, .teletype, .textToSpeech, + + //b2b: + .assetTracking, .businessContinuity, .conditionBasedMaintenance, .conditionBasedWrench, .constructionHammer, .constructionTruck, .digitalSignageCar, .digitalSignage, .droneCamera, .educationCurriculum, .education, .electricPower, .electricUtility, .energyScience, .energyUtilities, .enterprise, .federalDefense, .financial, .fleetTracking, .fleet, .gas, .government, .group, .growth, .hackers, .healthcareCorporate, .healthcareGeneral, .healthcareWorker, .ideasSolutions, .inclusivity, .industry, .insurance, .intelligentTracking, .internetOfThings, .joinCall, .k12Education, .laptopAntivirus, .laptopControls, .laptopGpsTracking, .laptopSettings, .laptopTrends, .laptopWireless, .law, .lmr, .loyaltyRetention, .manufacturing, .mediaEntertainment, .mediumBusiness, .mobileCommandCenter, .mobileKioskInfo, .mobileKioskWireless, .mobileRetail, .mobileSearch, .mobileWorkforceManagement, .network, .networkAttachedStorage, .officePhoneSystem, .oilIndustry, .operationalTransformation, .pharmaceutical, .pharmacy, .planner, .powerUtility, .professionalServices, .qualityAssurance, .realEstate, .regulatoryCompliance, .research, .retail, .security, .securitySolution, .smarthouse, .socialMedia, .software, .solarPower, .solutions, .supplyChain, .systemIntegration, .telecommunications, .telemedicine, .telemetry, .thermodynamics, .trends, .utilityWorker, .vehicleTracking, .warehouseManagement, .waterIndustry, .wellness, + + //directional: + .closeAlt, .close, .downArrow, .downCaret, .evenMoreFlexibility, .flexibilityRectangles, .flexibility, .gateway, .leftArrow, .leftCaret, .minus, .moreFlexibility, .noOff, .no, .plus, .rightArrow, .rightCaret, .swipeLeft, .swipeRight, .swipe, .switch, .upArrow, .upCaret, + + //international: + .internationalLongDistance, .international, .travelPass, .tripPlanner, + + //navigational + .advancedSettings, .agentChat, .bookmark, .chat, .filterOff, .filter, .list, .lockClosed, .lockOpen, .logout, .menu, .moreHorizontal, .myAccount, .realTimeTracking, .search, .settings, .supportDrawer, .support, .userRegistration, + + //notification_feedback: + .alertNotification, .checkmarkAlt, .checkmark, .clock, .error, .feedback, .loader, .notification, .notificationsOff, .notifyMe, .pushNotification, .remindMe, .reminder, .securityAlert, .securityCheck, .securityKeyhole, .securityWireless, .snooze, .speedMonitoring, .starOff, .star, .sync, .timer, .warning, + + //objects_industry: + .ctr, .passenger, .tvContent, .urlTransparency, .adaptiveSpeaker, .adTechStack, .agricultureLeaves, .agricultureTractor, .agricultureVineyard, .airport, .airConditioner, .audienceTargetedSearch, .award, .babyMonitor, .bestPractices, .bid, .bot, .cellTower, .cloudDocument, .coffee, .coin, .complianceDocument, .conversion, .countDown, .crossDeviceTargeting, .crossDevice, .customAudience, .digitalContent, .dining, .display, .domainTargeting, .doorbell, .driver, .euro, .expense, .faceCovering, .fineArt, .flag, .flurry, .fridge, .gaming, .geofence, .home, .identityGraph, .impressionVideo, .inferredIdentity, .irobot, .ironingBoard, .kidsStroller, .levers, .mobilePlusTv, .mobileRetargeting, .motionDetector, .multipleDocuments, .music, .nativeVideo, .native, .onGoCar, .packBackpack, .packLuggage, .packPurse, .petsCollar, .realTime, .research, .retailStore, .retargeting, .schoolNotebook, .singleDocument, .smartFamilyChildAddressBook, .smartScooter, .smokeDetector, .solarPanel, .sportsBike, .sportsSkis, .sportsSoccer, .sportsTennis, .stadiumAlt, .stadiumFlag, .thermostatTech, .ticket, .tradingDeck, .traffic, .travelKeys, .trumpet, .unification, .unification, .visibility, .weights, .yield, + + //orders_pricing: + .addToFavorite, .addedToFavorite, .billDown, .billUp, .camera, .creditCard, .gift, .inStorePickup, .noFee, .oneYear, .orders, .outOfStock, .reoccuringPayment, .reservations, .returns, .rewards, .shipping, .shoppingBag, .shopping, .tag, .taxes, + + //other: + .growthOpportunities, .noSmoking, .socialDistancing, + + //plans_devices: + .battery, .bonusData, .bringYourOwnDevice, .callerId, .carryoverData, .compass, .connect, .dataBoost, .deviceProtection, .devicesAddons, .embeddedSound, .findMyRemote, .giftedData, .homeInternet, .internetDevices, .largePlan, .mediumPlan, .mobileApps, .mobileHotspot, .multipleDeviceProtection, .multipleDevices, .nationWide, .phoneAlt, .purchaseData, .router, .simCard, .smallPlan, .smartAssistant, .sound, .tablet, .techLaptop, .techPhone , .totalMobileProtection, .unlimitedPlan, .uplink, .videoOnTablet, .waterResistant, .wearable, + + //social: + .at, .facebook, .instagram, .twitter, .youtube, + + //utilities: + .ThreeDAd , .ar , .addFolder , .addUser , .analytics , .announcement , .archive , .artboard , .attach , .awareness , .barcode , .bluetooth , .boxOpen , .calendar , .calibrate , .callDisconnected , .cleanSurface , .cloudAlt , .cloud , .comparison , .compose , .connectParts , .consultativeTransfer , .convergence , .crop , .cta , .customize , .data , .decrease , .deviceActivity , .directCarrierBilling , .directory , .displayUtilities , .distribution , .download , .dragAndDrop , .dropShipment , .duplicate , .edit , .email , .emergencyContact , .emoji , .externalLink , .fallDetected , .favorite , .fax , .fingerprintSensor , .fire , .fitToZone , .flipCamera , .forwardedCall , .fullscreen , .getHelp , .gridView , .history , .humidity , .incomingCall , .increase , .info , .inventory , .invitationAccepted , .invitationExpired , .invitationRejected , .landscape , .light , .link , .location , .locationPin , .mapView , .masonryView , .maximize , .mergeCalls , .microphoneAlt , .microphone , .missedCall , .moveTo , .multicast , .mute , .networkConnection , .news , .next , .nfcTag , .night , .noVideo , .onDemand , .outgoingCall , .paperFreeBilling , .pauseInternet , .pause , .peelSticker , .photo , .platform , .playAlt , .playWith , .play , .portrait , .pressure , .previous , .print , .question , .recycle , .removeItem , .replaceAPhoto , .reply , .ringing , .ringtone , .riskMonitor , .rss , .satelliteOff , .satellite , .save , .scaleAlt , .scale , .sendMessage , .setFallbackImage , .setGalleryImage , .share , .shock , .signalBroadcast , .speakerMute , .speakerPhone , .speed , .stakeholder , .steps , .stop , .stopAlt , .survey , .talking , .teamLeader , .temperature , .template , .theme , .thumbsDown , .thumbsUp , .tiles , .tilt , .tools , .trash , .turnonOff , .tv , .upload , .userSettings , .vibration , .video , .volume , .volunteer , .virtualReality , .voiceHd , .voiceMail , .weather , .whiteBlackList , .wifi , .zoomIn , .zoomOut + ] +} diff --git a/VDSSample/ViewControllers/IconViewController.swift b/VDSSample/ViewControllers/IconViewController.swift index a104368..63a0acd 100644 --- a/VDSSample/ViewControllers/IconViewController.swift +++ b/VDSSample/ViewControllers/IconViewController.swift @@ -17,17 +17,11 @@ class IconViewController: BaseViewController { picker: self.picker, items: IconColor.allCases) }() - - lazy var categoryPickerSelectorView = { - PickerSelectorView(title: "", - picker: self.picker, - items: IconCategory.allCases.sorted{ $0.rawValue < $1.rawValue }) - }() lazy var namePickerSelectorView = { PickerSelectorView(title: "", picker: self.picker, - items: []) + items: IconName.all.sorted{ $0.rawValue < $1.rawValue }) }() lazy var sizePickerSelectorView = { @@ -50,7 +44,6 @@ class IconViewController: BaseViewController { addFormRow(label: "Surface", view: surfacePickerSelectorView) addFormRow(label: "Size", view: sizePickerSelectorView) addFormRow(label: "Color", view: colorPickerSelectorView) - addFormRow(label: "Category", view: categoryPickerSelectorView) addFormRow(label: "Name", view: namePickerSelectorView) } @@ -63,22 +56,8 @@ class IconViewController: BaseViewController { surfacePickerSelectorView.text = icon.surface.rawValue sizePickerSelectorView.text = icon.size.rawValue colorPickerSelectorView.text = icon.color.rawValue - category = .accessibility namePickerSelectorView.text = name.rawValue } - - private var category: IconCategory = .accessibility { - didSet { - categoryPickerSelectorView.text = category.rawValue - let icons = category.icons.sorted{ $0.rawValue < $1.rawValue } - namePickerSelectorView.items = icons - if let first = icons.first { - namePickerSelectorView.text = first.rawValue - icon.name = first - } - } - } - func setupPicker(){ surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in @@ -86,10 +65,6 @@ class IconViewController: BaseViewController { self?.contentTopView.backgroundColor = item.color } - categoryPickerSelectorView.onPickerDidSelect = { [weak self] item in - self?.category = item - } - sizePickerSelectorView.onPickerDidSelect = { [weak self] item in self?.icon.size = item } From 56b3954f8403ca3a0684fd827e14302c8fb13021 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 10 Jan 2023 13:25:16 -0600 Subject: [PATCH 3/4] refactored textfield Signed-off-by: Matt Bruce --- VDSSample.xcodeproj/project.pbxproj | 10 +++++----- ...Controller.swift => InputFieldViewController.swift} | 4 ++-- VDSSample/ViewControllers/MenuViewController.swift | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) rename VDSSample/ViewControllers/{TextEntryFieldViewController.swift => InputFieldViewController.swift} (98%) diff --git a/VDSSample.xcodeproj/project.pbxproj b/VDSSample.xcodeproj/project.pbxproj index 797aeeb..d3d6633 100644 --- a/VDSSample.xcodeproj/project.pbxproj +++ b/VDSSample.xcodeproj/project.pbxproj @@ -63,7 +63,7 @@ EA985C19296CC73D00F2FF2E /* VDSIcons.bundle in Embed PlugIns */ = {isa = PBXBuildFile; fileRef = EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; EA985C1B296CC74A00F2FF2E /* VDSIcons.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */; }; EA985C20296DECF600F2FF2E /* IconName.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C1F296DECF600F2FF2E /* IconName.swift */; }; - EAA5EEAD28EB6924003B3210 /* TextEntryFieldViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA5EEAC28EB6924003B3210 /* TextEntryFieldViewController.swift */; }; + EAA5EEAD28EB6924003B3210 /* InputFieldViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */; }; EAB1D2C928AAAA1D00DAE764 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D2C828AAAA1D00DAE764 /* BaseViewController.swift */; }; EAB1D2D428AC409F00DAE764 /* LabelViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */; }; EAB5FEEF2927E28400998C17 /* ButtonGroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB5FEEE2927E28400998C17 /* ButtonGroupViewController.swift */; }; @@ -143,7 +143,7 @@ EA985C00296CC21C00F2FF2E /* IconViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IconViewController.swift; sourceTree = ""; }; EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = VDSIcons.bundle; path = SharedFrameworks/VDSIcons.bundle; sourceTree = ""; }; EA985C1F296DECF600F2FF2E /* IconName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconName.swift; sourceTree = ""; }; - EAA5EEAC28EB6924003B3210 /* TextEntryFieldViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextEntryFieldViewController.swift; sourceTree = ""; }; + EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputFieldViewController.swift; sourceTree = ""; }; EAB1D2C828AAAA1D00DAE764 /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelViewController.swift; sourceTree = ""; }; EAB5FEEE2927E28400998C17 /* ButtonGroupViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonGroupViewController.swift; sourceTree = ""; }; @@ -281,12 +281,12 @@ EA89204D28B67332006B9984 /* CheckBoxGroupViewController.swift */, EAF7F09B2899B92400B287F5 /* CheckboxViewController.swift */, EA985C00296CC21C00F2FF2E /* IconViewController.swift */, + EAC9257F29119FC400091998 /* TextLinkViewController.swift */, EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */, EA89201828B56DF5006B9984 /* RadioBoxGroupViewController.swift */, EAF7F11928A14A0E00B287F5 /* RadioButtonViewController.swift */, EA84F76128BE4AE500D67ABC /* RadioSwatchGroupViewController.swift */, - EAA5EEAC28EB6924003B3210 /* TextEntryFieldViewController.swift */, - EAC9257F29119FC400091998 /* TextLinkViewController.swift */, + EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */, EA0FC2C02912DC5500DF80B4 /* TextLinkCaretViewController.swift */, EA5E304F294D11540082B959 /* TileContainerViewController.swift */, EA5E305B295111050082B959 /* TiletViewController.swift */, @@ -462,7 +462,7 @@ EA0FC2C12912DC5500DF80B4 /* TextLinkCaretViewController.swift in Sources */, EAF7F09C2899B92400B287F5 /* CheckboxViewController.swift in Sources */, EA89204E28B67332006B9984 /* CheckBoxGroupViewController.swift in Sources */, - EAA5EEAD28EB6924003B3210 /* TextEntryFieldViewController.swift in Sources */, + EAA5EEAD28EB6924003B3210 /* InputFieldViewController.swift in Sources */, EA985C20296DECF600F2FF2E /* IconName.swift in Sources */, EA89204928B66CE2006B9984 /* KeyboardFrameChangeListening.swift in Sources */, EA985C01296CC21C00F2FF2E /* IconViewController.swift in Sources */, diff --git a/VDSSample/ViewControllers/TextEntryFieldViewController.swift b/VDSSample/ViewControllers/InputFieldViewController.swift similarity index 98% rename from VDSSample/ViewControllers/TextEntryFieldViewController.swift rename to VDSSample/ViewControllers/InputFieldViewController.swift index 1b289eb..006573d 100644 --- a/VDSSample/ViewControllers/TextEntryFieldViewController.swift +++ b/VDSSample/ViewControllers/InputFieldViewController.swift @@ -11,7 +11,7 @@ import VDS import VDSColorTokens import Combine -class TextEntryFieldViewController: BaseViewController { +class InputFieldViewController: BaseViewController { lazy var helperTextPlacementPickerSelectorView = { PickerSelectorView(title: "", @@ -31,7 +31,7 @@ class TextEntryFieldViewController: BaseViewController { var tooltipTitleTextField = TextField() var tooltipContentTextField = TextField() - var textEntryField = TextEntryField() + var textEntryField = InputField() override func viewDidLoad() { super.viewDidLoad() diff --git a/VDSSample/ViewControllers/MenuViewController.swift b/VDSSample/ViewControllers/MenuViewController.swift index def5b64..7bb2a86 100644 --- a/VDSSample/ViewControllers/MenuViewController.swift +++ b/VDSSample/ViewControllers/MenuViewController.swift @@ -77,11 +77,11 @@ class MenuViewController: UITableViewController { MenuComponent(title: "Checkbox", completed: true, viewController: CheckboxViewController.self), MenuComponent(title: "CheckboxGroup", completed: true, viewController: CheckboxGroupViewController.self), MenuComponent(title: "Icon", completed: true, viewController: IconViewController.self), + MenuComponent(title: "InputField", completed: false, viewController: InputFieldViewController.self), MenuComponent(title: "Label", completed: true, viewController: LabelViewController.self), MenuComponent(title: "RadioBoxGroup", completed: true, viewController: RadioBoxGroupViewController.self), MenuComponent(title: "RadioButtonGroup", completed: true, viewController: RadioButtonViewController.self), MenuComponent(title: "RadioSwatchGroup", completed: true, viewController: RadioSwatchGroupViewController.self), - MenuComponent(title: "TextEntryField", completed: false, viewController: TextEntryFieldViewController.self), MenuComponent(title: "TextLink", completed: true, viewController: TextLinkViewController.self), MenuComponent(title: "TextLinkCaret", completed: true, viewController: TextLinkCaretViewController.self), MenuComponent(title: "TileContainer", completed: false, viewController: TileContainerViewController.self), From c1af6729f22fb1f6dd01b72c626ca478572e4d6a Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 10 Jan 2023 16:53:29 -0600 Subject: [PATCH 4/4] added textArea Signed-off-by: Matt Bruce --- VDSSample.xcodeproj/project.pbxproj | 6 +- .../ViewControllers/MenuViewController.swift | 1 + .../TextAreaViewController.swift | 150 ++++++++++++++++++ 3 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 VDSSample/ViewControllers/TextAreaViewController.swift diff --git a/VDSSample.xcodeproj/project.pbxproj b/VDSSample.xcodeproj/project.pbxproj index d3d6633..9c10ca5 100644 --- a/VDSSample.xcodeproj/project.pbxproj +++ b/VDSSample.xcodeproj/project.pbxproj @@ -63,6 +63,7 @@ EA985C19296CC73D00F2FF2E /* VDSIcons.bundle in Embed PlugIns */ = {isa = PBXBuildFile; fileRef = EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; EA985C1B296CC74A00F2FF2E /* VDSIcons.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */; }; EA985C20296DECF600F2FF2E /* IconName.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C1F296DECF600F2FF2E /* IconName.swift */; }; + EA985C25296E06EA00F2FF2E /* TextAreaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C24296E06EA00F2FF2E /* TextAreaViewController.swift */; }; EAA5EEAD28EB6924003B3210 /* InputFieldViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */; }; EAB1D2C928AAAA1D00DAE764 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D2C828AAAA1D00DAE764 /* BaseViewController.swift */; }; EAB1D2D428AC409F00DAE764 /* LabelViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */; }; @@ -143,6 +144,7 @@ EA985C00296CC21C00F2FF2E /* IconViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IconViewController.swift; sourceTree = ""; }; EA985C14296CC5EE00F2FF2E /* VDSIcons.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = VDSIcons.bundle; path = SharedFrameworks/VDSIcons.bundle; sourceTree = ""; }; EA985C1F296DECF600F2FF2E /* IconName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconName.swift; sourceTree = ""; }; + EA985C24296E06EA00F2FF2E /* TextAreaViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextAreaViewController.swift; sourceTree = ""; }; EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InputFieldViewController.swift; sourceTree = ""; }; EAB1D2C828AAAA1D00DAE764 /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelViewController.swift; sourceTree = ""; }; @@ -281,12 +283,13 @@ EA89204D28B67332006B9984 /* CheckBoxGroupViewController.swift */, EAF7F09B2899B92400B287F5 /* CheckboxViewController.swift */, EA985C00296CC21C00F2FF2E /* IconViewController.swift */, + EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */, EAC9257F29119FC400091998 /* TextLinkViewController.swift */, EAB1D2D328AC409F00DAE764 /* LabelViewController.swift */, EA89201828B56DF5006B9984 /* RadioBoxGroupViewController.swift */, EAF7F11928A14A0E00B287F5 /* RadioButtonViewController.swift */, EA84F76128BE4AE500D67ABC /* RadioSwatchGroupViewController.swift */, - EAA5EEAC28EB6924003B3210 /* InputFieldViewController.swift */, + EA985C24296E06EA00F2FF2E /* TextAreaViewController.swift */, EA0FC2C02912DC5500DF80B4 /* TextLinkCaretViewController.swift */, EA5E304F294D11540082B959 /* TileContainerViewController.swift */, EA5E305B295111050082B959 /* TiletViewController.swift */, @@ -463,6 +466,7 @@ EAF7F09C2899B92400B287F5 /* CheckboxViewController.swift in Sources */, EA89204E28B67332006B9984 /* CheckBoxGroupViewController.swift in Sources */, EAA5EEAD28EB6924003B3210 /* InputFieldViewController.swift in Sources */, + EA985C25296E06EA00F2FF2E /* TextAreaViewController.swift in Sources */, EA985C20296DECF600F2FF2E /* IconName.swift in Sources */, EA89204928B66CE2006B9984 /* KeyboardFrameChangeListening.swift in Sources */, EA985C01296CC21C00F2FF2E /* IconViewController.swift in Sources */, diff --git a/VDSSample/ViewControllers/MenuViewController.swift b/VDSSample/ViewControllers/MenuViewController.swift index 7bb2a86..ae0283c 100644 --- a/VDSSample/ViewControllers/MenuViewController.swift +++ b/VDSSample/ViewControllers/MenuViewController.swift @@ -82,6 +82,7 @@ class MenuViewController: UITableViewController { MenuComponent(title: "RadioBoxGroup", completed: true, viewController: RadioBoxGroupViewController.self), MenuComponent(title: "RadioButtonGroup", completed: true, viewController: RadioButtonViewController.self), MenuComponent(title: "RadioSwatchGroup", completed: true, viewController: RadioSwatchGroupViewController.self), + MenuComponent(title: "TextArea", completed: false, viewController: TextAreaViewController.self), MenuComponent(title: "TextLink", completed: true, viewController: TextLinkViewController.self), MenuComponent(title: "TextLinkCaret", completed: true, viewController: TextLinkCaretViewController.self), MenuComponent(title: "TileContainer", completed: false, viewController: TileContainerViewController.self), diff --git a/VDSSample/ViewControllers/TextAreaViewController.swift b/VDSSample/ViewControllers/TextAreaViewController.swift new file mode 100644 index 0000000..ce59263 --- /dev/null +++ b/VDSSample/ViewControllers/TextAreaViewController.swift @@ -0,0 +1,150 @@ +// +// TextAreaViewController.swift +// VDSSample +// +// Created by Matt Bruce on 1/10/23. +// + +import Foundation +import Foundation +import UIKit +import VDS +import VDSColorTokens +import Combine + +class TextAreaViewController: BaseViewController { + + var disabledSwitch = Toggle() + var requiredSwitch = Toggle() + var labelTextField = TextField() + var errorTextField = TextField() + var helperTextField = TextField() + var widthTextField = NumericField() + var showErrorSwitch = Toggle() + var tooltipTitleTextField = TextField() + var tooltipContentTextField = TextField() + + var textArea = TextArea() + + override func viewDidLoad() { + super.viewDidLoad() + addContentTopView(view: textArea) + setupForm() + setupPicker() + setupModel() + } + + override func allTextFields() -> [TextField]? { [labelTextField, errorTextField, helperTextField, widthTextField, tooltipTitleTextField, tooltipContentTextField] } + + func setupForm(){ + addFormRow(label: "Disabled", view: .makeWrapper(for: disabledSwitch)) + addFormRow(label: "Required", view: .makeWrapper(for: requiredSwitch)) + addFormRow(label: "Surface", view: surfacePickerSelectorView) + addFormRow(label: "Label Text", view: labelTextField) + addFormRow(label: "Helper Text", view: helperTextField) + addFormRow(label: "Error", view: .makeWrapper(for: showErrorSwitch)) + addFormRow(label: "Error Text", view: errorTextField) + addFormRow(label: "Width", view: widthTextField) + addFormRow(label: "ToolTip Title", view: tooltipTitleTextField) + addFormRow(label: "ToolTip Content", view: tooltipContentTextField) + + requiredSwitch + .publisher(for: .valueChanged) + .sink { [weak self] sender in + self?.textArea.required = sender.isOn + }.store(in: &subscribers) + + showErrorSwitch + .publisher(for: .valueChanged) + .sink { [weak self] sender in + guard let self else { return } + self.textArea.showError = sender.isOn + if self.textArea.showError != sender.isOn { + self.showErrorSwitch.isOn = self.textArea.showError + } + }.store(in: &subscribers) + + disabledSwitch + .publisher(for: .valueChanged) + .sink { [weak self] sender in + self?.textArea.disabled = sender.isOn + }.store(in: &subscribers) + + labelTextField + .textPublisher + .sink { [weak self] text in + self?.textArea.labelText = text + }.store(in: &subscribers) + + helperTextField + .textPublisher + .sink { [weak self] text in + self?.textArea.helperText = text + }.store(in: &subscribers) + + errorTextField + .textPublisher + .sink { [weak self] text in + self?.textArea.errorText = text + }.store(in: &subscribers) + + widthTextField + .textPublisher + .sink { [weak self] width in + guard let width = Float(width) else { return } + self?.textArea.width = CGFloat(width) + }.store(in: &subscribers) + + tooltipTitleTextField + .textPublisher + .sink { [weak self] text in + self?.textArea.tooltipTitle = text + }.store(in: &subscribers) + + tooltipContentTextField + .textPublisher + .sink { [weak self] text in + self?.textArea.tooltipContent = text + }.store(in: &subscribers) + + } + + func setupModel() { + textArea.width = 328 + textArea.labelText = "Street Address" + textArea.helperText = "For example: 123 Verizon St" + textArea.errorText = "Enter a valid address." + textArea.tooltipTitle = "Check the formatting of your address" + textArea.tooltipContent = "House/Building number then street name" + + textArea + .publisher(for: .valueChanged) + .sink { textArea in + if let text = textArea.value { + print("text entry: \(text)") + } else { + print("text entry: null") + } + }.store(in: &subscribers) + + //setup UI + surfacePickerSelectorView.text = textArea.surface.rawValue + disabledSwitch.isOn = textArea.disabled + requiredSwitch.isOn = textArea.required + labelTextField.text = textArea.labelText + helperTextField.text = textArea.helperText + showErrorSwitch.isOn = textArea.showError + errorTextField.text = textArea.errorText + tooltipTitleTextField.text = textArea.tooltipTitle + tooltipContentTextField.text = textArea.tooltipContent + } + + //Picker + func setupPicker(){ + surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in + self?.textArea.surface = item + self?.contentTopView.backgroundColor = item.color + } + } +} +