Merge branch 'feature/tilet' of https://gitlab.verizon.com/BPHV_MIPS/vds_ios.git into feature/tilet
This commit is contained in:
commit
b8ae2ec647
@ -10,7 +10,7 @@ import UIKit
|
|||||||
import VDSColorTokens
|
import VDSColorTokens
|
||||||
import Combine
|
import Combine
|
||||||
|
|
||||||
public enum IconSize: String, CaseIterable {
|
public enum IconSize: String, CaseIterable, Codable {
|
||||||
case xsmall
|
case xsmall
|
||||||
case small
|
case small
|
||||||
case medium
|
case medium
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import Foundation
|
|||||||
import UIKit
|
import UIKit
|
||||||
import VDSColorTokens
|
import VDSColorTokens
|
||||||
|
|
||||||
public struct IconName: RawRepresentable {
|
public struct IconName: RawRepresentable, Codable {
|
||||||
public typealias RawValue = String
|
public typealias RawValue = String
|
||||||
public var rawValue: String
|
public var rawValue: String
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TiletBadgeModel {
|
public struct TiletBadgeModel: Codable {
|
||||||
public var text: String = ""
|
public var text: String = ""
|
||||||
public var fillColor: BadgeFillColor
|
public var fillColor: BadgeFillColor
|
||||||
public var surface: Surface
|
public var surface: Surface
|
||||||
|
|||||||
@ -8,10 +8,10 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
public struct TiletDescriptiveIcon {
|
public struct TiletDescriptiveIcon: Codable {
|
||||||
public var name: IconName
|
public var name: IconName = .multipleDocuments
|
||||||
public var size: IconSize
|
public var size: IconSize = .medium
|
||||||
public var surface: Surface
|
public var surface: Surface = .dark
|
||||||
|
|
||||||
public init(name: IconName = .multipleDocuments, size: IconSize, surface: Surface) {
|
public init(name: IconName = .multipleDocuments, size: IconSize, surface: Surface) {
|
||||||
self.name = name
|
self.name = name
|
||||||
@ -20,9 +20,9 @@ public struct TiletDescriptiveIcon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct TiletDirectionalIcon {
|
public struct TiletDirectionalIcon: Codable {
|
||||||
public var size: IconSize
|
public var size: IconSize = .medium
|
||||||
public var surface: Surface
|
public var surface: Surface = .dark
|
||||||
|
|
||||||
public init(size: IconSize, surface: Surface) {
|
public init(size: IconSize, surface: Surface) {
|
||||||
self.size = size
|
self.size = size
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TiletSubTitleModel {
|
public struct TiletSubTitleModel: Codable {
|
||||||
public enum SubTitleTypographicalStyle: String, Codable, EnumSubset {
|
public enum SubTitleTypographicalStyle: String, Codable, EnumSubset {
|
||||||
case BodyLarge
|
case BodyLarge
|
||||||
case BoldBodyLarge
|
case BoldBodyLarge
|
||||||
@ -20,9 +20,8 @@ public struct TiletSubTitleModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public var text: String = ""
|
public var text: String = ""
|
||||||
public var textAttributes: [any LabelAttributeModel]?
|
public var typographicalStyle: SubTitleTypographicalStyle = .BodySmall
|
||||||
public var typographicalStyle: SubTitleTypographicalStyle
|
public var textColor: Use = .primary
|
||||||
public var textColor: Use
|
|
||||||
|
|
||||||
public init(text: String,
|
public init(text: String,
|
||||||
textColor: Use = .primary,
|
textColor: Use = .primary,
|
||||||
@ -30,13 +29,12 @@ public struct TiletSubTitleModel {
|
|||||||
typographicalStyle: SubTitleTypographicalStyle = .BodySmall) {
|
typographicalStyle: SubTitleTypographicalStyle = .BodySmall) {
|
||||||
self.text = text
|
self.text = text
|
||||||
self.textColor = textColor
|
self.textColor = textColor
|
||||||
self.textAttributes = textAttributes
|
|
||||||
self.typographicalStyle = typographicalStyle
|
self.typographicalStyle = typographicalStyle
|
||||||
}
|
}
|
||||||
|
|
||||||
public func toTitleLockupSubTitleModel() -> TitleLockupSubTitleModel {
|
public func toTitleLockupSubTitleModel() -> TitleLockupSubTitleModel {
|
||||||
TitleLockupSubTitleModel(text: text,
|
TitleLockupSubTitleModel(text: text,
|
||||||
textColor: textColor,
|
textColor: textColor,
|
||||||
textAttributes: textAttributes)
|
textAttributes: nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public struct TiletTitleModel {
|
public struct TiletTitleModel: Codable {
|
||||||
public enum TitleTypographicalStyle: String, EnumSubset {
|
public enum TitleTypographicalStyle: String, EnumSubset, Codable {
|
||||||
case TitleXLarge
|
case TitleXLarge
|
||||||
case BoldTitleXLarge
|
case BoldTitleXLarge
|
||||||
case TitleLarge
|
case TitleLarge
|
||||||
@ -22,18 +22,17 @@ public struct TiletTitleModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public var text: String = ""
|
public var text: String = ""
|
||||||
public var textAttributes: [any LabelAttributeModel]?
|
public var typographicalStyle: TitleTypographicalStyle = .BoldTitleSmall
|
||||||
public var typographicalStyle: TitleTypographicalStyle
|
|
||||||
|
|
||||||
public init(text: String,
|
public init(text: String,
|
||||||
textAttributes: [any LabelAttributeModel]? = nil,
|
|
||||||
typographicalStyle: TitleTypographicalStyle = .BoldTitleSmall) {
|
typographicalStyle: TitleTypographicalStyle = .BoldTitleSmall) {
|
||||||
self.text = text
|
self.text = text
|
||||||
self.textAttributes = textAttributes
|
|
||||||
self.typographicalStyle = typographicalStyle
|
self.typographicalStyle = typographicalStyle
|
||||||
}
|
}
|
||||||
|
|
||||||
public func toTitleLockupTitleModel() -> TitleLockupTitleModel {
|
public func toTitleLockupTitleModel() -> TitleLockupTitleModel {
|
||||||
TitleLockupTitleModel(text: text, textAttributes: textAttributes, typographicalStyle: typographicalStyle.value)
|
TitleLockupTitleModel(text: text,
|
||||||
|
textAttributes: nil,
|
||||||
|
typographicalStyle: typographicalStyle.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user