added high level description to components.
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
3219788569
commit
affdf8176f
@ -27,6 +27,7 @@ public protocol SelectorControlable: Control, Changeable {
|
||||
var selectorColorConfiguration: ControlColorConfiguration { get set }
|
||||
}
|
||||
|
||||
/// Base Class used to build out a Selector control.
|
||||
open class SelectorBase: Control, SelectorControlable {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Initializers
|
||||
|
||||
@ -11,7 +11,7 @@ import Combine
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
|
||||
/// Generic Control used to build out a SelectorControlable control.
|
||||
/// Base Class used to build out a SelectorControlable control.
|
||||
open class SelectorItemBase<Selector: SelectorControlable>: Control, Errorable, Changeable, FormFieldable {
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -9,6 +9,9 @@ import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
|
||||
/// 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
|
||||
/// exists in a group when there are several actions that can be performed.
|
||||
@objc(VDSButtonIcon)
|
||||
open class ButtonIcon: Control {
|
||||
|
||||
|
||||
@ -10,6 +10,9 @@ import UIKit
|
||||
import VDSColorTokens
|
||||
import Combine
|
||||
|
||||
/// An icon is a graphical element that conveys information at a glance. It helps orient
|
||||
/// a customer, explain functionality and draw attention to interactive elements. Icons
|
||||
/// should have a functional purpose and should never be used for decoration.
|
||||
@objc(VDSIcon)
|
||||
open class Icon: View {
|
||||
|
||||
|
||||
@ -10,6 +10,8 @@ import UIKit
|
||||
import VDSColorTokens
|
||||
import Combine
|
||||
|
||||
/// Label is a standard view used to draw text with applying Typography through ``TextStyle`` as well
|
||||
/// as other attributes using any implemetation of ``LabelAttributeModel``.
|
||||
@objc(VDSLabel)
|
||||
open class Label: UILabel, ViewProtocol, UserInfoable {
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
|
||||
/// A line visually separates content sections or elements in lists, tables and layouts to indicate content hierarchy.
|
||||
@objc(VDSLine)
|
||||
open class Line: View {
|
||||
|
||||
|
||||
@ -10,8 +10,8 @@ import UIKit
|
||||
import VDSColorTokens
|
||||
|
||||
|
||||
@objc(VDSLoader)
|
||||
/// 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.
|
||||
@objc(VDSLoader)
|
||||
open class Loader: View {
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -10,8 +10,11 @@ import UIKit
|
||||
import VDSColorTokens
|
||||
import Combine
|
||||
|
||||
/// Notifications are prominent, attention-getting banners that provide information
|
||||
/// in context. There are four types: information, success, warning and error; each
|
||||
/// with different color and content. They may be screen-specific, flow-specific or
|
||||
/// experience-wide.
|
||||
@objc(VDSNotification)
|
||||
/// A VDS Component that will render a view with information
|
||||
open class Notification: View {
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -8,6 +8,9 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
/// Radio boxes are single-select components through which a customer indicates a choice.
|
||||
/// They're stylized ``RadioButtons`` that must always be paired with one or more ``RadioBoxItem``
|
||||
/// in a radio box group. Use radio boxes to display choices like device storage.
|
||||
@objc(VDSRadioBoxGroup)
|
||||
open class RadioBoxGroup: SelectorGroupBase<RadioBoxItem>, SelectorGroupSingleSelect {
|
||||
|
||||
|
||||
@ -11,6 +11,8 @@ import Combine
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
|
||||
/// Radio boxes are single-select components through which a customer indicates a choice
|
||||
/// that are used within a ``RadioBoxGroup``.
|
||||
@objc(VDSRadioBoxItem)
|
||||
open class RadioBoxItem: Control, Changeable, FormFieldable {
|
||||
|
||||
|
||||
@ -11,6 +11,9 @@ import Combine
|
||||
import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
|
||||
/// 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``.
|
||||
/// Use radio buttons to display choices like delivery method.
|
||||
@objc(VDSRadioButton)
|
||||
open class RadioButton: SelectorBase {
|
||||
|
||||
|
||||
@ -8,6 +8,9 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
/// Radio buttons items are single-select components through which a customer indicates a choice.
|
||||
/// They must always be paired with one or more other ``RadioButtonItem`` within a radio button group.
|
||||
/// Use radio buttons to display choices like delivery method.
|
||||
@objc(VDSRadioButtonGroup)
|
||||
open class RadioButtonGroup: SelectorGroupBase<RadioButtonItem>, SelectorGroupSingleSelect {
|
||||
|
||||
|
||||
@ -8,6 +8,9 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
/// Radio buttons items are single-select components through which a customer indicates a choice.
|
||||
/// They must always be paired with one or more other radio button items within a ``RadioButtonGroup``.
|
||||
/// Use radio buttons to display choices like delivery method.
|
||||
@objc(VDSRadioButtonItem)
|
||||
open class RadioButtonItem: SelectorItemBase<RadioButton> {
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import Combine
|
||||
|
||||
/// Base Class used to build out a Input controls.
|
||||
@objc(VDSEntryField)
|
||||
open class EntryFieldBase: Control, Changeable {
|
||||
|
||||
|
||||
@ -11,6 +11,9 @@ import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import Combine
|
||||
|
||||
/// An input field is an input wherein a customer enters information. They typically appear in forms.
|
||||
/// Specialized input fields capture credit card numbers, inline actions, passwords, phone numbers,
|
||||
/// dates and security codes in their correct formats.
|
||||
@objc(VDSInputField)
|
||||
open class InputField: EntryFieldBase, UITextFieldDelegate {
|
||||
|
||||
|
||||
@ -12,6 +12,8 @@ import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import Combine
|
||||
|
||||
/// A text area is an input wherein a customer enters long-form information.
|
||||
/// Use a text area when you want customers to enter text that’s longer than a single line.
|
||||
@objc(VDSTextArea)
|
||||
open class TextArea: EntryFieldBase {
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -11,6 +11,10 @@ import VDSColorTokens
|
||||
import UIKit
|
||||
import Combine
|
||||
|
||||
/// Tilelet can be configured with a background image and limited text to
|
||||
/// support quick scanning and engagement. A Tilelet is fully clickable and
|
||||
/// while it can include an arrow CTA, it does not require one in order to
|
||||
/// function.
|
||||
@objc(VDSTilelet)
|
||||
open class Tilelet: TileContainer {
|
||||
|
||||
|
||||
@ -10,6 +10,8 @@ import UIKit
|
||||
import VDSColorTokens
|
||||
import Combine
|
||||
|
||||
/// Title Lockup ensures the readability of words on the screen
|
||||
/// with approved built in text size configurations.
|
||||
@objc(VDSTitleLockup)
|
||||
open class TitleLockup: View {
|
||||
|
||||
|
||||
@ -10,6 +10,8 @@ import UIKit
|
||||
import VDSColorTokens
|
||||
import Combine
|
||||
|
||||
/// A toggle is a control that lets customers instantly turn on
|
||||
/// or turn off a single option, setting or function.
|
||||
@objc(VDSToggle)
|
||||
open class Toggle: Control, Changeable {
|
||||
|
||||
|
||||
@ -9,14 +9,9 @@ import Foundation
|
||||
import UIKit
|
||||
import VDSColorTokens
|
||||
import Combine
|
||||
/**
|
||||
A custom implementation of Apple's UISwitch.
|
||||
|
||||
By default this class begins in the off state.
|
||||
|
||||
Container: The background of the toggle control.
|
||||
Knob: The circular indicator that slides on the container.
|
||||
*/
|
||||
|
||||
/// A toggle is a control that lets customers instantly turn on
|
||||
/// or turn off a single option, setting or function.
|
||||
@objc(VDSToggleView)
|
||||
open class ToggleView: Control, Changeable {
|
||||
|
||||
|
||||
@ -11,6 +11,9 @@ import VDSColorTokens
|
||||
import VDSFormControlsTokens
|
||||
import Combine
|
||||
|
||||
/// A tooltip is an overlay that clarifies another component or content
|
||||
/// element. It is triggered when a customer hovers, clicks or taps
|
||||
/// the tooltip icon.
|
||||
@objc(VDSTooltip)
|
||||
open class Tooltip: Control, TooltipLaunchable {
|
||||
|
||||
|
||||
@ -9,6 +9,8 @@ import Foundation
|
||||
import UIKit
|
||||
import Combine
|
||||
|
||||
/// A trailing tooltip is view that contains a label that has a tooltip overlay
|
||||
/// applied at the last character of the text.
|
||||
@objc(VDSTrailingTooltipLabel)
|
||||
open class TrailingTooltipLabel: View, TooltipLaunchable {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user