removed old frameworks to add the 1 primary VDSTokens
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
22f156d461
commit
d98b08d26e
@ -18,8 +18,4 @@ if [ ! -d $FRAMEWORKS_DIR ]; then
|
||||
mkdir -p $FRAMEWORKS_DIR
|
||||
fi
|
||||
|
||||
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDSColorTokens.xcframework" GVJV_VDS_Maven/@vds-tokens/ios/VDSColorTokens.2.0.0.xcframework.zip
|
||||
|
||||
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDSFormControlsTokens.xcframework" GVJV_VDS_Maven/@vds-tokens/ios/VDSFormControlsTokens.1.0.7.xcframework.zip
|
||||
|
||||
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDSTypographyTokens.xcframework" GVJV_VDS_Maven/@vds-tokens/ios/VDSTypographyTokens.2.0.0.xcframework.zip
|
||||
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDSTokens.xcframework" GVJV_VDS_Maven/@vds-tokens/ios/VDSTokens.1.0.1-alpha.0.xcframework.zip
|
||||
|
||||
@ -22,9 +22,9 @@
|
||||
EA0D1C3D2A6AD57600E5C127 /* Typography+Enums.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0D1C3C2A6AD57600E5C127 /* Typography+Enums.swift */; };
|
||||
EA0D1C3F2A6AD5E200E5C127 /* Typography+ContentSizeCategory.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0D1C3E2A6AD5E200E5C127 /* Typography+ContentSizeCategory.swift */; };
|
||||
EA0D1C412A6AD61C00E5C127 /* Typography+Additional.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0D1C402A6AD61C00E5C127 /* Typography+Additional.swift */; };
|
||||
EA0D1C432A6AD70900E5C127 /* VDSTypography.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA0D1C422A6AD70900E5C127 /* VDSTypography.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 */; };
|
||||
EA336171288B19200071C351 /* VDS.docc in Sources */ = {isa = PBXBuildFile; fileRef = EA336170288B19200071C351 /* VDS.docc */; };
|
||||
@ -83,15 +83,11 @@
|
||||
EA985C1D296CD13600F2FF2E /* BundleManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C1C296CD13600F2FF2E /* BundleManager.swift */; };
|
||||
EA985C23296E033A00F2FF2E /* TextArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C22296E033A00F2FF2E /* TextArea.swift */; };
|
||||
EA985C2D296F03FE00F2FF2E /* TileletIconModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C2C296F03FE00F2FF2E /* TileletIconModels.swift */; };
|
||||
EA985C672970C21600F2FF2E /* VDSLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C662970C21600F2FF2E /* VDSLayout.swift */; };
|
||||
EA985C692971B90B00F2FF2E /* IconSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C682971B90B00F2FF2E /* IconSize.swift */; };
|
||||
EA985C7D297DAED300F2FF2E /* Primitive.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA985C7C297DAED300F2FF2E /* Primitive.swift */; };
|
||||
EAA5EEB528ECBFB4003B3210 /* ImageLabelAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA5EEB428ECBFB4003B3210 /* ImageLabelAttribute.swift */; };
|
||||
EAA5EEB928ECD24B003B3210 /* Icons.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EAA5EEB828ECD24B003B3210 /* Icons.xcassets */; };
|
||||
EAA5EEE428F5B855003B3210 /* VerizonNHGDS-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = EAA5EEE328F5B855003B3210 /* VerizonNHGDS-Light.otf */; };
|
||||
EAA5EEEF28F5C908003B3210 /* VDSTypographyTokens.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAA5EEEC28F5C908003B3210 /* VDSTypographyTokens.xcframework */; };
|
||||
EAA5EEF128F5C909003B3210 /* VDSColorTokens.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAA5EEED28F5C908003B3210 /* VDSColorTokens.xcframework */; };
|
||||
EAA5EEF328F5C909003B3210 /* VDSFormControlsTokens.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAA5EEEE28F5C908003B3210 /* VDSFormControlsTokens.xcframework */; };
|
||||
EAA7456C2AB23E2000C1841F /* TooltipModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA7456B2AB23E2000C1841F /* TooltipModel.swift */; };
|
||||
EAB1D29C28A5618900DAE764 /* RadioButtonGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D29B28A5618900DAE764 /* RadioButtonGroup.swift */; };
|
||||
EAB1D2CD28ABE76100DAE764 /* Withable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB1D2CC28ABE76000DAE764 /* Withable.swift */; };
|
||||
@ -183,9 +179,9 @@
|
||||
EA0D1C3C2A6AD57600E5C127 /* Typography+Enums.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Typography+Enums.swift"; sourceTree = "<group>"; };
|
||||
EA0D1C3E2A6AD5E200E5C127 /* Typography+ContentSizeCategory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Typography+ContentSizeCategory.swift"; sourceTree = "<group>"; };
|
||||
EA0D1C402A6AD61C00E5C127 /* Typography+Additional.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Typography+Additional.swift"; sourceTree = "<group>"; };
|
||||
EA0D1C422A6AD70900E5C127 /* VDSTypography.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VDSTypography.swift; sourceTree = "<group>"; };
|
||||
EA0D1C442A6AD73000E5C127 /* RawRepresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RawRepresentable.swift; sourceTree = "<group>"; };
|
||||
EA0FC2C52914222900DF80B4 /* ButtonGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonGroup.swift; sourceTree = "<group>"; };
|
||||
EA21C5DA2B600EDD00CFC139 /* VDSTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSTokens.xcframework; path = ../SharedFrameworks/VDSTokens.xcframework; sourceTree = "<group>"; };
|
||||
EA297A5429FB07760031ED56 /* TooltipLabelAttribute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TooltipLabelAttribute.swift; sourceTree = "<group>"; };
|
||||
EA297A5629FB0A360031ED56 /* AppleGuidelinesTouchable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppleGuidelinesTouchable.swift; sourceTree = "<group>"; };
|
||||
EA33616C288B19200071C351 /* VDS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = VDS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@ -245,16 +241,12 @@
|
||||
EA985C1C296CD13600F2FF2E /* BundleManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BundleManager.swift; sourceTree = "<group>"; };
|
||||
EA985C22296E033A00F2FF2E /* TextArea.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextArea.swift; sourceTree = "<group>"; };
|
||||
EA985C2C296F03FE00F2FF2E /* TileletIconModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TileletIconModels.swift; sourceTree = "<group>"; };
|
||||
EA985C662970C21600F2FF2E /* VDSLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VDSLayout.swift; sourceTree = "<group>"; };
|
||||
EA985C682971B90B00F2FF2E /* IconSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconSize.swift; sourceTree = "<group>"; };
|
||||
EA985C7C297DAED300F2FF2E /* Primitive.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Primitive.swift; sourceTree = "<group>"; };
|
||||
EAA5EEB428ECBFB4003B3210 /* ImageLabelAttribute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageLabelAttribute.swift; sourceTree = "<group>"; };
|
||||
EAA5EEB828ECD24B003B3210 /* Icons.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Icons.xcassets; sourceTree = "<group>"; };
|
||||
EAA5EEDF28F49DB3003B3210 /* Colorable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colorable.swift; sourceTree = "<group>"; };
|
||||
EAA5EEE328F5B855003B3210 /* VerizonNHGDS-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "VerizonNHGDS-Light.otf"; sourceTree = "<group>"; };
|
||||
EAA5EEEC28F5C908003B3210 /* VDSTypographyTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSTypographyTokens.xcframework; path = ../SharedFrameworks/VDSTypographyTokens.xcframework; sourceTree = "<group>"; };
|
||||
EAA5EEED28F5C908003B3210 /* VDSColorTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSColorTokens.xcframework; path = ../SharedFrameworks/VDSColorTokens.xcframework; sourceTree = "<group>"; };
|
||||
EAA5EEEE28F5C908003B3210 /* VDSFormControlsTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSFormControlsTokens.xcframework; path = ../SharedFrameworks/VDSFormControlsTokens.xcframework; sourceTree = "<group>"; };
|
||||
EAA7456B2AB23E2000C1841F /* TooltipModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TooltipModel.swift; sourceTree = "<group>"; };
|
||||
EAB1D29B28A5618900DAE764 /* RadioButtonGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadioButtonGroup.swift; sourceTree = "<group>"; };
|
||||
EAB1D2CC28ABE76000DAE764 /* Withable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Withable.swift; sourceTree = "<group>"; };
|
||||
@ -325,9 +317,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EAA5EEF328F5C909003B3210 /* VDSFormControlsTokens.xcframework in Frameworks */,
|
||||
EAA5EEEF28F5C908003B3210 /* VDSTypographyTokens.xcframework in Frameworks */,
|
||||
EAA5EEF128F5C909003B3210 /* VDSColorTokens.xcframework in Frameworks */,
|
||||
EA21C5DB2B600EDE00CFC139 /* VDSTokens.xcframework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -462,9 +452,7 @@
|
||||
EA33618D288B1C0C0071C351 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EAA5EEED28F5C908003B3210 /* VDSColorTokens.xcframework */,
|
||||
EAA5EEEE28F5C908003B3210 /* VDSFormControlsTokens.xcframework */,
|
||||
EAA5EEEC28F5C908003B3210 /* VDSTypographyTokens.xcframework */,
|
||||
EA21C5DA2B600EDD00CFC139 /* VDSTokens.xcframework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@ -522,8 +510,6 @@
|
||||
EAB5FED329267EB300998C17 /* UIView+NSLayoutConstraint.swift */,
|
||||
EAD062A62A3B67770015965D /* UIView+CALayer.swift */,
|
||||
EAB5FF0029424ACB00998C17 /* UIControl.swift */,
|
||||
EA985C662970C21600F2FF2E /* VDSLayout.swift */,
|
||||
EA0D1C422A6AD70900E5C127 /* VDSTypography.swift */,
|
||||
);
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
@ -971,7 +957,6 @@
|
||||
EA89200428AECF4B006B9984 /* UITextField+Publisher.swift in Sources */,
|
||||
EA0D1C3F2A6AD5E200E5C127 /* Typography+ContentSizeCategory.swift in Sources */,
|
||||
EA5F86C82A1BD99100BC83E4 /* TabModel.swift in Sources */,
|
||||
EA0D1C432A6AD70900E5C127 /* VDSTypography.swift in Sources */,
|
||||
EA297A5729FB0A360031ED56 /* AppleGuidelinesTouchable.swift in Sources */,
|
||||
EA3361C328902D960071C351 /* Toggle.swift in Sources */,
|
||||
EAF7F0A0289AB7EC00B287F5 /* View.swift in Sources */,
|
||||
@ -1073,7 +1058,6 @@
|
||||
EAB2376829E9992800AABE9A /* TooltipAlertViewController.swift in Sources */,
|
||||
EA33623E2892EE950071C351 /* UIDevice.swift in Sources */,
|
||||
EA985C692971B90B00F2FF2E /* IconSize.swift in Sources */,
|
||||
EA985C672970C21600F2FF2E /* VDSLayout.swift in Sources */,
|
||||
EA3362302891EB4A0071C351 /* Font.swift in Sources */,
|
||||
EAF7F0AD289B142900B287F5 /* StrikeThroughLabelAttribute.swift in Sources */,
|
||||
EAB5FEF12927F4AA00998C17 /* SelfSizingCollectionView.swift in Sources */,
|
||||
|
||||
@ -6,9 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
|
||||
public protocol SelectorControlable: Control, Changeable {
|
||||
/// Whether not to show the error.
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
import VDSTokens
|
||||
|
||||
public protocol SelectorGroup {
|
||||
associatedtype SelectorItemType: Control
|
||||
@ -49,7 +50,7 @@ open class SelectorGroupBase<SelectorItemType: Control>: Control, SelectorGroup,
|
||||
$0.alignment = .fill
|
||||
$0.distribution = .fill
|
||||
$0.axis = .vertical
|
||||
$0.spacing = VDSLayout.Spacing.space3X.value
|
||||
$0.spacing = VDSLayout.space3X
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
@ -8,8 +8,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
|
||||
/// Base Class used to build out a SelectorControlable control.
|
||||
open class SelectorItemBase<Selector: SelectorControlable>: Control, Errorable, Changeable, FormFieldable {
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// A badge is a visual label used to convey status or highlight supplemental information.
|
||||
@ -86,20 +85,20 @@ open class Badge: View {
|
||||
//--------------------------------------------------
|
||||
private var minWidth: CGFloat = 23.0
|
||||
private var labelInset: UIEdgeInsets = .init(top: 2,
|
||||
left: VDSLayout.Spacing.space1X.value,
|
||||
left: VDSLayout.space1X,
|
||||
bottom: 2,
|
||||
right: VDSLayout.Spacing.space1X.value)
|
||||
right: VDSLayout.space1X)
|
||||
|
||||
/// ColorConfiguration that is mapped to the 'fillColor' for the surface.
|
||||
private var backgroundColorConfiguration: AnyColorable = {
|
||||
let config = KeyedColorConfiguration<Badge, FillColor>(keyPath: \.fillColor)
|
||||
config.setSurfaceColors(VDSColor.backgroundBrandhighlight, VDSColor.backgroundBrandhighlight, forKey: .red)
|
||||
config.setSurfaceColors(VDSColor.paletteYellow53, VDSColor.paletteYellow53, forKey: .yellow)
|
||||
config.setSurfaceColors(VDSColor.paletteGreen26, VDSColor.paletteGreen36, forKey: .green)
|
||||
config.setSurfaceColors(VDSColor.paletteOrange41, VDSColor.paletteOrange58, forKey: .orange)
|
||||
config.setSurfaceColors(VDSColor.paletteBlue38, VDSColor.paletteBlue46, forKey: .blue)
|
||||
config.setSurfaceColors(VDSColor.backgroundPrimaryDark, VDSColor.backgroundPrimaryDark, forKey: .black)
|
||||
config.setSurfaceColors(VDSColor.backgroundPrimaryLight, VDSColor.backgroundPrimaryLight, forKey: .white)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundRedOnlight, VDSColor.badgesBackgroundRedOndark, forKey: .red)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundYellowOnlight, VDSColor.badgesBackgroundYellowOndark, forKey: .yellow)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundGreenOnlight, VDSColor.badgesBackgroundGreenOndark, forKey: .green)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundOrangeOnlight, VDSColor.badgesBackgroundOrangeOndark, forKey: .orange)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundBlueOnlight, VDSColor.badgesBackgroundBlueOndark, forKey: .blue)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundBlackOnlight, VDSColor.badgesBackgroundBlackOndark, forKey: .black)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundWhiteOnlight, VDSColor.badgesBackgroundWhiteOndark, forKey: .white)
|
||||
return config.eraseToAnyColorable()
|
||||
}()
|
||||
|
||||
|
||||
@ -7,10 +7,8 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
import VDSTypographyTokens
|
||||
|
||||
/// A badge indicator is a visual label used to convey status or highlight supplemental information.
|
||||
@objc(VDSBadgeIndicator)
|
||||
@ -36,7 +34,7 @@ open class BadgeIndicator: View {
|
||||
//--------------------------------------------------
|
||||
/// Enum used to describe the primary color for the view.
|
||||
public enum FillColor: String, CaseIterable {
|
||||
case red, yellow, green, orange, blue, gray, grayLowContrast, black, white
|
||||
case red, yellow, green, orange, blue, grayHighContrast, grayLowContrast, black, white
|
||||
}
|
||||
|
||||
/// Enum used to describe the kind of BadgeIndicator.
|
||||
@ -115,12 +113,12 @@ open class BadgeIndicator: View {
|
||||
|
||||
//EdgeInsets for the label.
|
||||
public var edgeInset: UIEdgeInsets {
|
||||
var horizontalPadding: CGFloat = VDSLayout.Spacing.space1X.value
|
||||
var horizontalPadding: CGFloat = VDSLayout.space1X
|
||||
let verticalPadding: CGFloat = 0
|
||||
|
||||
switch self {
|
||||
case .xxlarge:
|
||||
horizontalPadding = VDSLayout.Spacing.space2X.value
|
||||
horizontalPadding = VDSLayout.space2X
|
||||
case .xlarge, .large,.medium:
|
||||
horizontalPadding = 6.0
|
||||
case .small:
|
||||
@ -248,15 +246,15 @@ open class BadgeIndicator: View {
|
||||
|
||||
private var backgroundColorConfiguration: AnyColorable = {
|
||||
let config = KeyedColorConfiguration<BadgeIndicator, FillColor>(keyPath: \.fillColor)
|
||||
config.setSurfaceColors(VDSColor.backgroundBrandhighlight, VDSColor.backgroundBrandhighlight, forKey: .red)
|
||||
config.setSurfaceColors(VDSColor.paletteYellow62, VDSColor.paletteYellow62, forKey: .yellow)
|
||||
config.setSurfaceColors(VDSColor.paletteGreen26, VDSColor.paletteGreen36, forKey: .green)
|
||||
config.setSurfaceColors(VDSColor.paletteOrange41, VDSColor.paletteOrange58, forKey: .orange)
|
||||
config.setSurfaceColors(VDSColor.paletteBlue38, VDSColor.paletteBlue46, forKey: .blue)
|
||||
config.setSurfaceColors(VDSColor.paletteGray44, VDSColor.paletteGray65, forKey: .gray)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundRedOnlight, VDSColor.badgesBackgroundRedOndark, forKey: .red)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundYellowOnlight, VDSColor.badgesBackgroundYellowOndark, forKey: .yellow)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundGreenOnlight, VDSColor.badgesBackgroundGreenOndark, forKey: .green)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundOrangeOnlight, VDSColor.badgesBackgroundOrangeOndark, forKey: .orange)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundBlueOnlight, VDSColor.badgesBackgroundBlueOndark, forKey: .blue)
|
||||
config.setSurfaceColors(VDSColor.paletteGray44, VDSColor.paletteGray65, forKey: .grayHighContrast)
|
||||
config.setSurfaceColors(VDSColor.paletteGray85, VDSColor.paletteGray20, forKey: .grayLowContrast)
|
||||
config.setSurfaceColors(VDSColor.backgroundPrimaryDark, VDSColor.backgroundPrimaryDark, forKey: .black)
|
||||
config.setSurfaceColors(VDSColor.backgroundPrimaryLight, VDSColor.backgroundPrimaryLight, forKey: .white)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundBlackOnlight, VDSColor.badgesBackgroundBlackOndark, forKey: .black)
|
||||
config.setSurfaceColors(VDSColor.badgesBackgroundWhiteOnlight, VDSColor.badgesBackgroundWhiteOndark, forKey: .white)
|
||||
return config.eraseToAnyColorable()
|
||||
}()
|
||||
|
||||
@ -397,7 +395,7 @@ open class BadgeIndicator: View {
|
||||
|
||||
switch fillColor {
|
||||
|
||||
case .red, .black, .gray, .grayLowContrast:
|
||||
case .red, .black, .grayHighContrast, .grayLowContrast:
|
||||
textColorConfiguration.setSurfaceColors(VDSColor.elementsPrimaryOndark, VDSColor.elementsPrimaryOndark, forDisabled: false)
|
||||
textColorConfiguration.setSurfaceColors(VDSColor.elementsPrimaryOndark, VDSColor.elementsPrimaryOndark, forDisabled: true)
|
||||
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
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``.
|
||||
@ -241,7 +240,7 @@ open class Button: ButtonBase, Useable {
|
||||
|
||||
let bgColor = backgroundColorConfiguration.getColor(self)
|
||||
let borderColor = borderColorConfiguration.getColor(self)
|
||||
let borderWidth = use == .secondary ? VDSFormControls.widthBorder : 0.0
|
||||
let borderWidth = use == .secondary ? VDSFormControls.borderWidth : 0.0
|
||||
let cornerRadius = size.cornerRadius
|
||||
let edgeInsets = size.edgeInsets
|
||||
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// Base class used for UIButton type classes.
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
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.
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
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,
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// A text link caret is an interactive element that always brings a customer to another page. It's used for navigation,
|
||||
|
||||
@ -8,8 +8,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
|
||||
/// Checkboxes are a multi-select component through which a customer indicates a choice. This is also used within
|
||||
/// ``CheckboxItem`` and ``CheckboxGroup``
|
||||
@ -87,7 +86,7 @@ open class Checkbox: SelectorBase {
|
||||
}
|
||||
|
||||
layer.cornerRadius = 2.0
|
||||
layer.borderWidth = VDSFormControls.widthBorder
|
||||
layer.borderWidth = VDSFormControls.borderWidth
|
||||
|
||||
if shapeLayer == nil {
|
||||
let bounds = bounds
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSTokens
|
||||
|
||||
/// 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``
|
||||
@ -78,7 +79,7 @@ open class CheckboxGroup: SelectorGroupBase<CheckboxItem>, SelectorGroupMultiSel
|
||||
/// 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()
|
||||
mainStackView.spacing = VDSLayout.Spacing.space6X.value
|
||||
mainStackView.spacing = VDSLayout.space6X
|
||||
}
|
||||
|
||||
public override func didSelect(_ selectedControl: CheckboxItem) {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
/// A button icon is an interactive element that visually communicates the action it triggers via an icon.
|
||||
/// It usually represents a supplementary or utilitarian action. A button icon can stand alone, but often
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// An icon is a graphical element that conveys information at a glance. It helps orient
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
extension Icon {
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
public class TooltipLabelAttribute: ActionLabelAttributeModel, TooltipLaunchable {
|
||||
public var id = UUID()
|
||||
@ -57,7 +57,7 @@ public class TooltipLabelAttribute: ActionLabelAttributeModel, TooltipLaunchable
|
||||
frame: frame,
|
||||
tintColor: imageTintColor)
|
||||
|
||||
let spacer = NSAttributedString.spacer(for: VDSLayout.Spacing.space1X.value)
|
||||
let spacer = NSAttributedString.spacer(for: VDSLayout.space1X)
|
||||
|
||||
guard let tooltip = try? tooltipAttribute.getAttachment() else { return }
|
||||
attributedString.append(spacer)
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// Label is a standard view used to draw text with applying Typography through ``TextStyle`` as well
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
/// A line visually separates content sections or elements in lists, tables and layouts to indicate content hierarchy.
|
||||
@objc(VDSLine)
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
|
||||
/// 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.
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
/// ViewController to show the Loader, this will be presented using the LoaderLaunchable Protocl.
|
||||
open class LoaderViewController: UIViewController, Surfaceable {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// Notifications are prominent, attention-getting banners that provide information
|
||||
@ -65,7 +65,7 @@ open class Notification: View {
|
||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||
$0.alignment = .top
|
||||
$0.axis = .horizontal
|
||||
$0.spacing = VDSLayout.Spacing.space2X.value
|
||||
$0.spacing = VDSLayout.space2X
|
||||
}
|
||||
|
||||
private var labelsView = UIStackView().with {
|
||||
@ -79,7 +79,7 @@ open class Notification: View {
|
||||
$0.alignment = .top
|
||||
$0.distribution = .fillEqually
|
||||
$0.axis = .vertical
|
||||
$0.spacing = VDSLayout.Spacing.space2X.value
|
||||
$0.spacing = VDSLayout.space2X
|
||||
}
|
||||
|
||||
internal var onCloseSubscriber: AnyCancellable?
|
||||
@ -196,15 +196,15 @@ open class Notification: View {
|
||||
}
|
||||
|
||||
private var edgeSpacing: CGFloat {
|
||||
return UIDevice.isIPad ? VDSLayout.Spacing.space5X.value : VDSLayout.Spacing.space4X.value
|
||||
return UIDevice.isIPad ? VDSLayout.space5X : VDSLayout.space4X
|
||||
}
|
||||
|
||||
private var minViewHeight: CGFloat {
|
||||
return UIDevice.isIPad ? VDSLayout.Spacing.space16X.value : VDSLayout.Spacing.space12X.value
|
||||
return UIDevice.isIPad ? VDSLayout.space16X : VDSLayout.space12X
|
||||
}
|
||||
|
||||
private var minContentHeight: CGFloat {
|
||||
return UIDevice.isIPad ? VDSLayout.Spacing.space5X.value : VDSLayout.Spacing.space4X.value
|
||||
return UIDevice.isIPad ? VDSLayout.space5X : VDSLayout.space4X
|
||||
}
|
||||
|
||||
private var minViewWidth: CGFloat {
|
||||
@ -347,7 +347,7 @@ open class Notification: View {
|
||||
labelsView.setCustomSpacing(0, after: subTitleLabel)
|
||||
buttonGroup.removeFromSuperview()
|
||||
} else {
|
||||
labelsView.setCustomSpacing(VDSLayout.Spacing.space3X.value, after: subTitleLabel)
|
||||
labelsView.setCustomSpacing(VDSLayout.space3X, after: subTitleLabel)
|
||||
|
||||
buttonGroup.buttons = buttons
|
||||
labelButtonView.axis = layout == .vertical ? .vertical : .horizontal
|
||||
|
||||
@ -8,8 +8,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
|
||||
/// Radio boxes are single-select components through which a customer indicates a choice
|
||||
/// that are used within a ``RadioBoxGroup``.
|
||||
@ -146,10 +145,10 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Configuration Properties
|
||||
//--------------------------------------------------
|
||||
private var strikeThroughLineThickness: CGFloat = VDSFormControls.widthBorder
|
||||
private var selectorCornerRadius: CGFloat = VDSFormControls.borderradius
|
||||
private var selectorBorderWidthSelected: CGFloat = VDSFormControls.widthBorder + VDSFormControls.widthBorder
|
||||
private var selectorBorderWidth: CGFloat = VDSFormControls.widthBorder
|
||||
private var strikeThroughLineThickness: CGFloat = VDSFormControls.borderWidth
|
||||
private var selectorCornerRadius: CGFloat = VDSFormControls.borderRadius
|
||||
private var selectorBorderWidthSelected: CGFloat = VDSFormControls.borderWidth + VDSFormControls.borderWidth
|
||||
private var selectorBorderWidth: CGFloat = VDSFormControls.borderWidth
|
||||
|
||||
private var backgroundColorConfiguration = ControlColorConfiguration().with {
|
||||
$0.setSurfaceColors(VDSFormControlsColor.backgroundOnlight, VDSFormControlsColor.backgroundOndark, forState: .normal)
|
||||
|
||||
@ -8,8 +8,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
|
||||
/// 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``.
|
||||
@ -91,7 +90,7 @@ open class RadioButton: SelectorBase {
|
||||
self.backgroundColor = backgroundColor
|
||||
layer.borderColor = borderColor.cgColor
|
||||
layer.cornerRadius = bounds.width * 0.5
|
||||
layer.borderWidth = VDSFormControls.widthBorder
|
||||
layer.borderWidth = VDSFormControls.borderWidth
|
||||
|
||||
if shapeLayer == nil {
|
||||
let selectedBounds = selectorSize
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import VDSColorTokens
|
||||
import UIKit
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
extension Tabs {
|
||||
@ -104,14 +105,14 @@ extension Tabs {
|
||||
|
||||
private var leadingSpace: CGFloat {
|
||||
guard orientation == .vertical else { return 0 }
|
||||
return VDSLayout.Spacing.space4X.value
|
||||
return VDSLayout.space4X
|
||||
}
|
||||
|
||||
private var otherSpace: CGFloat {
|
||||
if orientation == .horizontal {
|
||||
return size == .medium ? VDSLayout.Spacing.space3X.value : VDSLayout.Spacing.space4X.value
|
||||
return size == .medium ? VDSLayout.space3X : VDSLayout.space4X
|
||||
} else {
|
||||
return VDSLayout.Spacing.space2X.value
|
||||
return VDSLayout.space2X
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
/// 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)
|
||||
@ -147,9 +147,9 @@ open class Tabs: View {
|
||||
private var stackViewSpacing: CGFloat {
|
||||
switch orientation {
|
||||
case .vertical:
|
||||
return size == .medium ? VDSLayout.Spacing.space4X.value : VDSLayout.Spacing.space6X.value
|
||||
return size == .medium ? VDSLayout.space4X : VDSLayout.space6X
|
||||
case .horizontal:
|
||||
return size == .medium ? VDSLayout.Spacing.space6X.value : VDSLayout.Spacing.space8X.value
|
||||
return size == .medium ? VDSLayout.space6X : VDSLayout.space8X
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// Base Class used to build out a Input controls.
|
||||
@ -256,8 +255,8 @@ open class EntryFieldBase: Control, Changeable {
|
||||
|
||||
containerView.backgroundColor = backgroundColorConfiguration.getColor(self)
|
||||
containerView.layer.borderColor = borderColorConfiguration.getColor(self).cgColor
|
||||
containerView.layer.borderWidth = VDSFormControls.widthBorder
|
||||
containerView.layer.cornerRadius = VDSFormControls.borderradius
|
||||
containerView.layer.borderWidth = VDSFormControls.borderWidth
|
||||
containerView.layer.cornerRadius = VDSFormControls.borderRadius
|
||||
|
||||
updateTitleLabel()
|
||||
updateErrorLabel()
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// An input field is an input wherein a customer enters information. They typically appear in forms.
|
||||
|
||||
@ -8,8 +8,7 @@
|
||||
import Foundation
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// A text area is an input wherein a customer enters long-form information.
|
||||
|
||||
@ -6,8 +6,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
import UIKit
|
||||
|
||||
@objc(VDSTileContainer)
|
||||
@ -50,15 +49,15 @@ open class TileContainer: Control {
|
||||
public var value: CGFloat {
|
||||
switch self {
|
||||
case .padding2X:
|
||||
return VDSLayout.Spacing.space2X.value
|
||||
return VDSLayout.space2X
|
||||
case .padding4X:
|
||||
return VDSLayout.Spacing.space4X.value
|
||||
return VDSLayout.space4X
|
||||
case .padding6X:
|
||||
return VDSLayout.Spacing.space6X.value
|
||||
return VDSLayout.space6X
|
||||
case .padding8X:
|
||||
return VDSLayout.Spacing.space8X.value
|
||||
return VDSLayout.space8X
|
||||
case .padding12X:
|
||||
return VDSLayout.Spacing.space12X.value
|
||||
return VDSLayout.space12X
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -162,7 +161,7 @@ open class TileContainer: Control {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Configuration
|
||||
//--------------------------------------------------
|
||||
private let cornerRadius = VDSFormControls.borderradius * 2
|
||||
private let cornerRadius = VDSFormControls.borderRadius * 2
|
||||
|
||||
private var backgroundColorConfiguration = BackgroundColorConfiguration()
|
||||
|
||||
@ -264,7 +263,7 @@ open class TileContainer: Control {
|
||||
}
|
||||
|
||||
layer.borderColor = borderColorConfiguration.getColor(self).cgColor
|
||||
layer.borderWidth = showBorder ? VDSFormControls.widthBorder : 0
|
||||
layer.borderWidth = showBorder ? VDSFormControls.borderWidth : 0
|
||||
|
||||
containerTopConstraint?.constant = padding.value
|
||||
containerLeadingConstraint?.constant = padding.value
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import Foundation
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
import UIKit
|
||||
import Combine
|
||||
|
||||
@ -86,43 +86,43 @@ open class Tilelet: TileContainer {
|
||||
titleStandardStyles: [.titleSmall],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodySmall, .bodyMedium],
|
||||
topSpacing: VDSLayout.Spacing.space2X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space2X.value)
|
||||
topSpacing: VDSLayout.space2X,
|
||||
bottomSpacing: VDSLayout.space2X)
|
||||
]),
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.titleMedium, .titleLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodySmall, .bodyMedium, .bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space2X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space2X.value)
|
||||
topSpacing: VDSLayout.space2X,
|
||||
bottomSpacing: VDSLayout.space2X)
|
||||
]),
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.titleXLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyLarge, .bodySmall, .bodyMedium, .titleMedium],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space3X.value)
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space3X)
|
||||
]),
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.titleSmall, .titleMedium],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodySmall, .bodyMedium, .bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space2X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space2X.value)
|
||||
topSpacing: VDSLayout.space2X,
|
||||
bottomSpacing: VDSLayout.space2X)
|
||||
]),
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.titleLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyLarge, .bodySmall, .bodyMedium, .titleSmall],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space3X.value)
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space3X)
|
||||
]),
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.titleXLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.titleMedium, .bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space4X.value)
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space4X)
|
||||
])
|
||||
])
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// Title Lockup ensures the readability of words on the screen
|
||||
@ -102,156 +102,156 @@ open class TitleLockup: View {
|
||||
titleStandardStyles: [.bodySmall],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodySmall],
|
||||
topSpacing: VDSLayout.Spacing.space1X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space1X.value)
|
||||
topSpacing: VDSLayout.space1X,
|
||||
bottomSpacing: VDSLayout.space1X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.bodyMedium],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyMedium],
|
||||
topSpacing: VDSLayout.Spacing.space1X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space1X.value)
|
||||
topSpacing: VDSLayout.space1X,
|
||||
bottomSpacing: VDSLayout.space1X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.bodyLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space1X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space1X.value)
|
||||
topSpacing: VDSLayout.space1X,
|
||||
bottomSpacing: VDSLayout.space1X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.titleSmall],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodySmall, .bodyMedium, .bodyLarge, .titleSmall],
|
||||
topSpacing: VDSLayout.Spacing.space2X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space2X.value)
|
||||
topSpacing: VDSLayout.space2X,
|
||||
bottomSpacing: VDSLayout.space2X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.titleMedium],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodySmall, .bodyMedium, .bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space2X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space2X.value)
|
||||
topSpacing: VDSLayout.space2X,
|
||||
bottomSpacing: VDSLayout.space2X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.titleLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyLarge, .bodySmall, .bodyMedium, .titleSmall],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space3X.value)
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space3X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.titleXLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.titleMedium, .bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space4X.value)
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space4X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.title2XLarge, .featureXSmall],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space6X.value),
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space6X),
|
||||
|
||||
.init(otherStandardStyles: [.titleMedium, .titleLarge],
|
||||
topSpacing: VDSLayout.Spacing.space4X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space6X.value),
|
||||
topSpacing: VDSLayout.space4X,
|
||||
bottomSpacing: VDSLayout.space6X),
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPad,
|
||||
titleStandardStyles: [.featureSmall, .featureMedium],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.titleLarge, .titleMedium],
|
||||
topSpacing: VDSLayout.Spacing.space4X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space6X.value),
|
||||
topSpacing: VDSLayout.space4X,
|
||||
bottomSpacing: VDSLayout.space6X),
|
||||
|
||||
.init(otherStandardStyles: [.bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space6X.value),
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space6X),
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.bodySmall],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodySmall],
|
||||
topSpacing: VDSLayout.Spacing.space1X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space1X.value)
|
||||
topSpacing: VDSLayout.space1X,
|
||||
bottomSpacing: VDSLayout.space1X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.bodyMedium],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyMedium],
|
||||
topSpacing: VDSLayout.Spacing.space1X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space1X.value)
|
||||
topSpacing: VDSLayout.space1X,
|
||||
bottomSpacing: VDSLayout.space1X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.bodyLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space1X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space1X.value)
|
||||
topSpacing: VDSLayout.space1X,
|
||||
bottomSpacing: VDSLayout.space1X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.titleSmall],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodySmall, .bodyMedium],
|
||||
topSpacing: VDSLayout.Spacing.space2X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space2X.value)
|
||||
topSpacing: VDSLayout.space2X,
|
||||
bottomSpacing: VDSLayout.space2X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.titleMedium, .titleLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodySmall, .bodyMedium, .bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space2X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space2X.value)
|
||||
topSpacing: VDSLayout.space2X,
|
||||
bottomSpacing: VDSLayout.space2X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.titleXLarge],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyLarge, .bodySmall, .bodyMedium, .titleMedium],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space3X.value)
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space3X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.title2XLarge, .featureXSmall],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.bodyLarge, .bodyMedium, .titleMedium],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space4X.value)
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space4X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.featureSmall],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.titleLarge, .bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space4X.value)
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space4X)
|
||||
]),
|
||||
|
||||
.init(deviceType: .iPhone,
|
||||
titleStandardStyles: [.featureMedium],
|
||||
spacingConfigurations: [
|
||||
.init(otherStandardStyles: [.titleLarge, .titleXLarge],
|
||||
topSpacing: VDSLayout.Spacing.space4X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space6X.value),
|
||||
topSpacing: VDSLayout.space4X,
|
||||
bottomSpacing: VDSLayout.space6X),
|
||||
|
||||
.init(otherStandardStyles: [.bodyLarge],
|
||||
topSpacing: VDSLayout.Spacing.space3X.value,
|
||||
bottomSpacing: VDSLayout.Spacing.space6X.value)
|
||||
topSpacing: VDSLayout.space3X,
|
||||
bottomSpacing: VDSLayout.space6X)
|
||||
]),
|
||||
])
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSTokens
|
||||
|
||||
extension TitleLockup {
|
||||
|
||||
@ -93,7 +94,7 @@ extension TitleLockup {
|
||||
}
|
||||
//get the config against the other style or return defaults
|
||||
guard let styleSpacing = spacingConfigurations.first(where: {realOtherStyle.isWithin($0.otherStandardStyles)}) else {
|
||||
return (realOtherStyle, VDSLayout.Spacing.space2X.value, VDSLayout.Spacing.space2X.value)
|
||||
return (realOtherStyle, VDSLayout.space2X, VDSLayout.space2X)
|
||||
}
|
||||
return (realOtherStyle, styleSpacing.topSpacing, styleSpacing.bottomSpacing)
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// A toggle is a control that lets customers instantly turn on
|
||||
@ -59,7 +59,7 @@ open class Toggle: Control, Changeable, FormFieldable {
|
||||
// MARK: - Configuration
|
||||
//--------------------------------------------------
|
||||
private let toggleContainerSize = CGSize(width: 52, height: 44)
|
||||
private let spacingBetween = VDSLayout.Spacing.space3X.value
|
||||
private let spacingBetween = VDSLayout.space3X
|
||||
|
||||
/// TextStyle used to render the label.
|
||||
private var textStyle: TextStyle {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// A toggle is a control that lets customers instantly turn on
|
||||
|
||||
@ -7,8 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
import Combine
|
||||
|
||||
/// A tooltip is an overlay that clarifies another component or content
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
open class TooltipAlertViewController: UIViewController, Surfaceable {
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
open class TooltipDialog: View, UIScrollViewDelegate {
|
||||
|
||||
@ -48,7 +48,7 @@ open class TooltipDialog: View, UIScrollViewDelegate {
|
||||
|
||||
lazy var primaryAccessibilityElement = UIAccessibilityElement(accessibilityContainer: self).with {
|
||||
$0.accessibilityLabel = "Modal"
|
||||
$0.accessibilityFrameInContainerSpace = .init(origin: .zero, size: .init(width: fullWidth, height: VDSLayout.Spacing.space1X.value))
|
||||
$0.accessibilityFrameInContainerSpace = .init(origin: .zero, size: .init(width: fullWidth, height: VDSLayout.space1X))
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -83,7 +83,7 @@ open class TooltipDialog: View, UIScrollViewDelegate {
|
||||
private var fullWidth: CGFloat = 296
|
||||
private var minHeight: CGFloat = 96.0
|
||||
private var maxHeight: CGFloat = 312.0
|
||||
private let containerViewInset = VDSLayout.Spacing.space4X.value
|
||||
private let containerViewInset = VDSLayout.space4X
|
||||
|
||||
private let backgroundColorConfiguration = SurfaceColorConfiguration(VDSColor.backgroundPrimaryLight, VDSColor.backgroundPrimaryDark)
|
||||
private let closeButtonTextColorConfiguration = SurfaceColorConfiguration(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark)
|
||||
@ -113,7 +113,7 @@ open class TooltipDialog: View, UIScrollViewDelegate {
|
||||
widthAnchor.constraint(equalToConstant: fullWidth),
|
||||
|
||||
// Constraints for the scroll view
|
||||
scrollView.topAnchor.constraint(equalTo: topAnchor, constant: VDSLayout.Spacing.space4X.value),
|
||||
scrollView.topAnchor.constraint(equalTo: topAnchor, constant: VDSLayout.space4X),
|
||||
scrollView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
||||
scrollView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
||||
scrollView.bottomAnchor.constraint(equalTo: line.topAnchor),
|
||||
@ -180,7 +180,7 @@ open class TooltipDialog: View, UIScrollViewDelegate {
|
||||
}
|
||||
|
||||
if addedTitle && addedContent {
|
||||
contentStackView.setCustomSpacing(VDSLayout.Spacing.space1X.value, after: titleLabel)
|
||||
contentStackView.setCustomSpacing(VDSLayout.space1X, after: titleLabel)
|
||||
}
|
||||
|
||||
let closeButtonTextColor = closeButtonTextColorConfiguration.getColor(self)
|
||||
|
||||
@ -6,13 +6,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
import UIKit
|
||||
|
||||
extension VDSColor {
|
||||
public static let paletteYellow62 = UIColor(hexString: "#FED60E")
|
||||
}
|
||||
|
||||
extension UIColor {
|
||||
/// Since VDSColorTokens is just a Class with Static Properties, this is an Enum for each property of that class for each of use within the VDS Library
|
||||
public enum VDSColor: String, CaseIterable {
|
||||
@ -35,7 +31,6 @@ extension UIColor {
|
||||
case paletteYellow94
|
||||
case paletteYellow87
|
||||
case paletteYellow74
|
||||
case paletteYellow62
|
||||
case paletteYellow53
|
||||
case paletteYellow39
|
||||
case paletteYellow20
|
||||
@ -66,6 +61,8 @@ extension UIColor {
|
||||
case palettePurple20
|
||||
case backgroundPrimaryLight
|
||||
case backgroundPrimaryDark
|
||||
case backgroundPrimaryInverseLight
|
||||
case backgroundPrimaryInverseDark
|
||||
case backgroundSecondaryLight
|
||||
case backgroundSecondaryDark
|
||||
case backgroundBrandhighlight
|
||||
@ -97,20 +94,66 @@ extension UIColor {
|
||||
case interactiveScrolltrackOndark
|
||||
case elementsPrimaryOnlight
|
||||
case elementsPrimaryOndark
|
||||
case elementsPrimaryInverseOnlight
|
||||
case elementsPrimaryInverseOndark
|
||||
case elementsSecondaryOnlight
|
||||
case elementsSecondaryOndark
|
||||
case elementsBrandhighlight
|
||||
case elementsLowcontrastOnlight
|
||||
case elementsLowcontrastOndark
|
||||
case datavizOrange200
|
||||
case datavizOrange300
|
||||
case datavizOrange400
|
||||
case datavizOrange600
|
||||
case datavizOrange900
|
||||
case datavizYellow200
|
||||
case datavizYellow300
|
||||
case datavizYellow400
|
||||
case datavizYellow600
|
||||
case datavizYellow900
|
||||
case datavizBlue200
|
||||
case datavizBlue300
|
||||
case datavizBlue400
|
||||
case datavizBlue600
|
||||
case datavizBlue900
|
||||
case datavizGreen200
|
||||
case datavizGreen300
|
||||
case datavizGreen400
|
||||
case datavizGreen600
|
||||
case datavizGreen900
|
||||
case datavizPink200
|
||||
case datavizPink300
|
||||
case datavizPink400
|
||||
case datavizPink600
|
||||
case datavizPink900
|
||||
case datavizPurple200
|
||||
case datavizPurple300
|
||||
case datavizPurple400
|
||||
case datavizPurple600
|
||||
case datavizPurple900
|
||||
case badgesBackgroundRedOnlight
|
||||
case badgesBackgroundRedOndark
|
||||
case badgesBackgroundOrangeOnlight
|
||||
case badgesBackgroundOrangeOndark
|
||||
case badgesBackgroundGreenOnlight
|
||||
case badgesBackgroundGreenOndark
|
||||
case badgesBackgroundBlueOnlight
|
||||
case badgesBackgroundBlueOndark
|
||||
case badgesBackgroundYellowOnlight
|
||||
case badgesBackgroundYellowOndark
|
||||
case badgesBackgroundWhiteOnlight
|
||||
case badgesBackgroundWhiteOndark
|
||||
case badgesBackgroundBlackOnlight
|
||||
case badgesBackgroundBlackOndark
|
||||
|
||||
/// Map each color name to its corresponding UIColor object.
|
||||
public var uiColor: UIColor {
|
||||
do {
|
||||
let color = try VDSColorTokens.VDSColor.getTokenByString(tokenName: "VDSColor.\(rawValue)")
|
||||
let color = try VDSTokens.VDSColor.getTokenByString(tokenName: "VDSColor.\(rawValue)")
|
||||
return color
|
||||
} catch {
|
||||
print(error)
|
||||
return VDSColorTokens.VDSColor.paletteBlack
|
||||
return VDSTokens.VDSColor.paletteBlack
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
extension UIColor {
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Debug Borders
|
||||
@ -27,7 +27,7 @@ extension UIView {
|
||||
borderLayer.name = "debugAreaLayer"
|
||||
borderLayer.frame = bounds
|
||||
borderLayer.bounds = bounds
|
||||
borderLayer.borderWidth = VDSFormControls.widthBorder
|
||||
borderLayer.borderWidth = VDSFormControls.borderWidth
|
||||
borderLayer.borderColor = color.cgColor
|
||||
layer.addSublayer(borderLayer)
|
||||
|
||||
@ -41,7 +41,7 @@ extension UIView {
|
||||
touchLayer.path = touchableAreaPath.cgPath
|
||||
touchLayer.strokeColor = color.cgColor
|
||||
touchLayer.fillColor = UIColor.clear.cgColor
|
||||
touchLayer.lineWidth = VDSFormControls.widthBorder
|
||||
touchLayer.lineWidth = VDSFormControls.borderWidth
|
||||
touchLayer.opacity = 1.0
|
||||
touchLayer.name = "debugTouchableAreaLayer"
|
||||
touchLayer.zPosition = 100
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
|
||||
extension UIView {
|
||||
public func constraint(with identifier: String) -> NSLayoutConstraint? {
|
||||
|
||||
@ -1,53 +0,0 @@
|
||||
//
|
||||
// VDSLayout.swift
|
||||
// VDS
|
||||
//
|
||||
// Created by Matt Bruce on 1/12/23.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Represents constants used that deal with layout.
|
||||
public struct VDSLayout {
|
||||
/// Enum used to describe the spacing constants.
|
||||
public enum Spacing: String, CaseIterable {
|
||||
case space1X
|
||||
case space2X
|
||||
case space3X
|
||||
case space4X
|
||||
case space5X
|
||||
case space6X
|
||||
case space8X
|
||||
case space12X
|
||||
case space16X
|
||||
case space24X
|
||||
case space32X
|
||||
|
||||
public var value: CGFloat {
|
||||
switch self {
|
||||
case .space1X:
|
||||
return 4
|
||||
case .space2X:
|
||||
return 8
|
||||
case .space3X:
|
||||
return 12
|
||||
case .space4X:
|
||||
return 16
|
||||
case .space5X:
|
||||
return 20
|
||||
case .space6X:
|
||||
return 24
|
||||
case .space8X:
|
||||
return 32
|
||||
case .space12X:
|
||||
return 48
|
||||
case .space16X:
|
||||
return 64
|
||||
case .space24X:
|
||||
return 96
|
||||
case .space32X:
|
||||
return 128
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
//
|
||||
// VDSTypography.swift
|
||||
// VDS
|
||||
//
|
||||
// Created by Matt Bruce on 7/21/23.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import VDSTypographyTokens
|
||||
|
||||
extension VDSTypography {
|
||||
public static let letterSpacingSemiWide: CGFloat = 0.25
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSFormControlsTokens
|
||||
import VDSTokens
|
||||
|
||||
public protocol LayoutConstraintable {
|
||||
var superview: UIView? { get }
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
/// 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 {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import VDSTokens
|
||||
|
||||
/// Enum to describe types of use.
|
||||
public enum Use: String, Equatable {
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import VDSTypographyTokens
|
||||
import UIKit
|
||||
import VDSTokens
|
||||
|
||||
//MARK: Definitions
|
||||
extension TextStyle {
|
||||
@ -23,7 +24,7 @@ extension TextStyle {
|
||||
fontFace: .dsLight,
|
||||
pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature144 : VDSTypography.fontSizeFeature96,
|
||||
lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature136 : VDSTypography.lineHeightFeature88,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiWide,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiwide,
|
||||
edgeInsets: .bottom(UIDevice.isIPad ? -6: -4))
|
||||
|
||||
public static let boldFeatureLarge = TextStyle(rawValue: "boldFeatureLarge",
|
||||
@ -36,7 +37,7 @@ extension TextStyle {
|
||||
fontFace: .dsLight,
|
||||
pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature128 : VDSTypography.fontSizeFeature80,
|
||||
lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature120 : VDSTypography.lineHeightFeature76,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiWide,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiwide,
|
||||
edgeInsets: .bottom(UIDevice.isIPad ? -6: -2))
|
||||
|
||||
public static let boldFeatureMedium = TextStyle(rawValue: "boldFeatureMedium",
|
||||
@ -49,7 +50,7 @@ extension TextStyle {
|
||||
fontFace: .dsLight,
|
||||
pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature96 : VDSTypography.fontSizeFeature64,
|
||||
lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature88 : VDSTypography.lineHeightFeature64,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiWide,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiwide,
|
||||
edgeInsets: .bottom(UIDevice.isIPad ? -4: -2))
|
||||
|
||||
public static let boldFeatureSmall = TextStyle(rawValue: "boldFeatureSmall",
|
||||
@ -62,7 +63,7 @@ extension TextStyle {
|
||||
fontFace: .dsLight,
|
||||
pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature80 : VDSTypography.fontSizeFeature48,
|
||||
lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature76 : VDSTypography.lineHeightFeature48,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiWide,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiwide,
|
||||
edgeInsets: .bottom(UIDevice.isIPad ? -2: 0))
|
||||
|
||||
public static let boldFeatureXSmall = TextStyle(rawValue: "boldFeatureXSmall",
|
||||
@ -75,7 +76,7 @@ extension TextStyle {
|
||||
fontFace: .dsLight,
|
||||
pointSize: UIDevice.isIPad ? VDSTypography.fontSizeFeature64 : VDSTypography.fontSizeFeature40,
|
||||
lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightFeature64 : VDSTypography.lineHeightFeature40,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiWide,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiwide,
|
||||
edgeInsets: .bottom(UIDevice.isIPad ? -2: 0))
|
||||
|
||||
public static let boldTitle2XLarge = TextStyle(rawValue: "boldTitle2XLarge",
|
||||
@ -88,7 +89,7 @@ extension TextStyle {
|
||||
fontFace: .dsLight,
|
||||
pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle64 : VDSTypography.fontSizeTitle40,
|
||||
lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle64 : VDSTypography.lineHeightTitle40,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiWide,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiwide,
|
||||
edgeInsets: .bottom(UIDevice.isIPad ? -2: 0))
|
||||
|
||||
public static let boldTitleXLarge = TextStyle(rawValue: "boldTitleXLarge",
|
||||
@ -100,7 +101,7 @@ extension TextStyle {
|
||||
fontFace: .dsLight,
|
||||
pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle48 : VDSTypography.fontSizeTitle32,
|
||||
lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle48 : VDSTypography.lineHeightTitle36,
|
||||
letterSpacing: VDSTypography.letterSpacingSemiWide)
|
||||
letterSpacing: VDSTypography.letterSpacingSemiwide)
|
||||
|
||||
public static let boldTitleLarge = TextStyle(rawValue: "boldTitleLarge",
|
||||
fontFace: .edsBold,
|
||||
@ -111,7 +112,7 @@ extension TextStyle {
|
||||
fontFace: UIDevice.isIPad ? .dsLight : .edsRegular,
|
||||
pointSize: UIDevice.isIPad ? VDSTypography.fontSizeTitle32 : VDSTypography.fontSizeTitle24,
|
||||
lineHeight: UIDevice.isIPad ? VDSTypography.lineHeightTitle36 : VDSTypography.lineHeightTitle28,
|
||||
letterSpacing: UIDevice.isIPad ? VDSTypography.letterSpacingSemiWide : 0)
|
||||
letterSpacing: UIDevice.isIPad ? VDSTypography.letterSpacingSemiwide : 0)
|
||||
|
||||
public static let boldTitleMedium = TextStyle(rawValue: "boldTitleMedium",
|
||||
fontFace: .edsBold,
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
import VDSTypographyTokens
|
||||
import VDSTokens
|
||||
|
||||
//MARK: Alignments
|
||||
extension TextStyle {
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import VDSTypographyTokens
|
||||
import UIKit
|
||||
import VDSTokens
|
||||
|
||||
|
||||
/// This is the Definition that will determine how the Text is drawn
|
||||
|
||||
Loading…
Reference in New Issue
Block a user