118 lines
4.6 KiB
Swift
118 lines
4.6 KiB
Swift
//
|
|
// DecodableDefaults+VDS.swift
|
|
// JSONCreator
|
|
//
|
|
// Created by Matt Bruce on 7/28/22.
|
|
// Copyright © 2022 Verizon Wireless. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import VDS
|
|
import MVMCore
|
|
|
|
//MARK: - Decodable Defaults
|
|
extension VDSFontCategory {
|
|
public enum DefaultFeature: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontCategory { .feature }
|
|
}
|
|
public enum DefaultTitle: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontCategory { .title }
|
|
}
|
|
public enum DefaultBody: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontCategory { .body }
|
|
}
|
|
public enum DefaultMicro: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontCategory { .micro }
|
|
}
|
|
}
|
|
|
|
extension VDSFontSize {
|
|
public enum Default2XLarge: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontSize { .xxlarge }
|
|
}
|
|
public enum DefaultXLarge: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontSize { .xlarge }
|
|
}
|
|
public enum DefaultLarge: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontSize { .large }
|
|
}
|
|
public enum DefaultMedium: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontSize { .medium }
|
|
}
|
|
public enum DefaultSmall: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontSize { .small }
|
|
}
|
|
public enum DefaultXSmall: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontSize { .xsmall }
|
|
}
|
|
}
|
|
|
|
extension VDSTextPosition {
|
|
public enum DefaultLeft: DecodableDefault.Source {
|
|
public static var defaultValue: VDSTextPosition { .left }
|
|
}
|
|
public enum DefaultRight: DecodableDefault.Source {
|
|
public static var defaultValue: VDSTextPosition { .right }
|
|
}
|
|
public enum DefaultCenter: DecodableDefault.Source {
|
|
public static var defaultValue: VDSTextPosition { .center }
|
|
}
|
|
}
|
|
|
|
extension VDSFontWeight {
|
|
public enum DefaultBold: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontWeight { .bold }
|
|
}
|
|
public enum DefaultRegular: DecodableDefault.Source {
|
|
public static var defaultValue: VDSFontWeight { .regular }
|
|
}
|
|
}
|
|
|
|
extension VDSToggle {
|
|
public enum DefaultOffText: DecodableDefault.Source {
|
|
public static var defaultValue: String { "Off" }
|
|
}
|
|
public enum DefaultOnText: DecodableDefault.Source {
|
|
public static var defaultValue: String { "On" }
|
|
}
|
|
}
|
|
|
|
extension Surface {
|
|
public enum DefaultLight: DecodableDefault.Source {
|
|
public static var defaultValue: Surface { .light }
|
|
}
|
|
public enum DefaultDark: DecodableDefault.Source {
|
|
public static var defaultValue: Surface { .dark }
|
|
}
|
|
}
|
|
|
|
extension DecodableDefault {
|
|
|
|
public struct Surface {
|
|
public typealias Light = DecodableDefault.Wrapper<VDS.Surface.DefaultLight>
|
|
public typealias Dark = DecodableDefault.Wrapper<VDS.Surface.DefaultDark>
|
|
}
|
|
|
|
public struct VDSTypography {
|
|
public typealias FontCategoryFeature = DecodableDefault.Wrapper<VDSFontCategory.DefaultFeature>
|
|
public typealias FontCategoryTitle = DecodableDefault.Wrapper<VDSFontCategory.DefaultTitle>
|
|
public typealias FontCategoryBody = DecodableDefault.Wrapper<VDSFontCategory.DefaultBody>
|
|
public typealias FontCategoryMicro = DecodableDefault.Wrapper<VDSFontCategory.DefaultMicro>
|
|
public typealias FontWeightBold = DecodableDefault.Wrapper<VDSFontWeight.DefaultBold>
|
|
public typealias FontWeightRegular = DecodableDefault.Wrapper<VDSFontWeight.DefaultRegular>
|
|
public typealias FontSize2XLarge = DecodableDefault.Wrapper<VDSFontSize.Default2XLarge>
|
|
public typealias FontSizeXLarge = DecodableDefault.Wrapper<VDSFontSize.DefaultXLarge>
|
|
public typealias FontSizeLarge = DecodableDefault.Wrapper<VDSFontSize.DefaultLarge>
|
|
public typealias FontSizeMedium = DecodableDefault.Wrapper<VDSFontSize.DefaultMedium>
|
|
public typealias FontSizeSmall = DecodableDefault.Wrapper<VDSFontSize.DefaultSmall>
|
|
public typealias FontSizeXSmall = DecodableDefault.Wrapper<VDSFontSize.DefaultXSmall>
|
|
public typealias TextPositionLeft = DecodableDefault.Wrapper<VDSTextPosition.DefaultLeft>
|
|
public typealias TextPositionRight = DecodableDefault.Wrapper<VDSTextPosition.DefaultRight>
|
|
public typealias TextPositionCenter = DecodableDefault.Wrapper<VDSTextPosition.DefaultCenter>
|
|
}
|
|
// public struct VDSToggle {
|
|
// public typealias OffText = DecodableDefault.Wrapper<VDS.VDSToggle.DefaultOffText>
|
|
// public typealias OnText = DecodableDefault.Wrapper<VDS.VDSToggle.DefaultOnText>
|
|
// }
|
|
}
|