vds_ios/VDS/Components/TextFields/TextEntryField/TextEntryFieldModel.swift
Matt Bruce 68868a35ed first cut of entry fields
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2022-10-03 15:28:18 -05:00

50 lines
1.2 KiB
Swift

//
// TextEntryFieldModel.swift
// VDS
//
// Created by Matt Bruce on 10/3/22.
//
import Foundation
public enum TextEntryFieldType: String, CaseIterable {
case text, number, calendar, inlineAction, password, creditCard, tel, date, securityCode
}
public protocol TextEntryFieldModel: EntryFieldModel {
var type: TextEntryFieldType { get set }
}
public struct DefaultTextEntryField: TextEntryFieldModel {
public var id = UUID()
public var inputId: String?
public var type: TextEntryFieldType = .text
public var value: AnyHashable?
public var defaultVaue: AnyHashable?
public var required: Bool = false
public var readOnly: Bool = false
public var labelText: String?
public var helperText: String?
public var helperTextPlacement: HelperTextPlacement = .bottom
public var showError: Bool = false
public var errorText: String?
public var showSuccess: Bool = false
public var successText: String?
public var transparentBackground: Bool = false
public var width: CGFloat?
public var maxLength: Int?
public var surface: Surface = .light
public var disabled: Bool = false
public init() { }
}