refactored atoms with style changes
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
ddb15e72f3
commit
28c15efba5
@ -19,6 +19,7 @@ import UIKit
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
public private(set) var titleLabel: FormLabel = {
|
public private(set) var titleLabel: FormLabel = {
|
||||||
let label = FormLabel()
|
let label = FormLabel()
|
||||||
|
label.setFontStyle(.RegularMicro)
|
||||||
label.setContentCompressionResistancePriority(.required, for: .vertical)
|
label.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
return label
|
return label
|
||||||
}()
|
}()
|
||||||
@ -28,6 +29,7 @@ import UIKit
|
|||||||
/// Provides contextual information on the TextField.
|
/// Provides contextual information on the TextField.
|
||||||
public private(set) var feedbackLabel: FormLabel = {
|
public private(set) var feedbackLabel: FormLabel = {
|
||||||
let label = FormLabel()
|
let label = FormLabel()
|
||||||
|
label.setFontStyle(.RegularMicro)
|
||||||
label.setContentCompressionResistancePriority(.required, for: .vertical)
|
label.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
return label
|
return label
|
||||||
}()
|
}()
|
||||||
@ -276,15 +278,13 @@ import UIKit
|
|||||||
|
|
||||||
backgroundColor = .clear
|
backgroundColor = .clear
|
||||||
isAccessibilityElement = false
|
isAccessibilityElement = false
|
||||||
titleLabel.font = Styler.Font.RegularMicro.getFont()
|
titleLabel.setFontStyle(.RegularMicro)
|
||||||
titleLabel.textColor = .mvmBlack
|
feedbackLabel.setFontStyle(.RegularMicro)
|
||||||
feedbackLabel.font = Styler.Font.RegularMicro.getFont()
|
errorLabel.setFontStyle(.RegularMicro)
|
||||||
feedbackLabel.textColor = .mvmBlack
|
titleLabel.text = nil
|
||||||
errorLabel.font = Styler.Font.RegularMicro.getFont()
|
feedbackLabel.text = nil
|
||||||
errorLabel.textColor = .mvmBlack
|
|
||||||
errorLabel.text = nil
|
errorLabel.text = nil
|
||||||
entryFieldContainer.disableAllBorders = false
|
entryFieldContainer.disableAllBorders = false
|
||||||
feedbackLabel.text = nil
|
|
||||||
entryFieldContainer.reset()
|
entryFieldContainer.reset()
|
||||||
entryFieldModel?.updateUI = nil
|
entryFieldModel?.updateUI = nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,10 +10,6 @@ import Foundation
|
|||||||
|
|
||||||
/// Subclass of label that helps with different states
|
/// Subclass of label that helps with different states
|
||||||
public class FormLabel: Label {
|
public class FormLabel: Label {
|
||||||
//properties used in setting label
|
|
||||||
private var delegateObject: MVMCoreUIDelegateObject?
|
|
||||||
private var additionalData: [AnyHashable: Any]?
|
|
||||||
|
|
||||||
//models that drive the label UI
|
//models that drive the label UI
|
||||||
private var formModel: FormLabelModel!
|
private var formModel: FormLabelModel!
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import Foundation
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Outlets
|
// MARK: - Outlets
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
public let planLabel = Label()
|
public let planLabel = Label(fontStyle: .BoldFeatureXLarge)
|
||||||
public let headline = Label(fontStyle: .BoldTitleLarge)
|
public let headline = Label(fontStyle: .BoldTitleLarge)
|
||||||
public let subHeadline = Label(fontStyle: .RegularTitleLarge)
|
public let subHeadline = Label(fontStyle: .RegularTitleLarge)
|
||||||
public let body = Label(fontStyle: .RegularBodySmall)
|
public let body = Label(fontStyle: .RegularBodySmall)
|
||||||
@ -33,8 +33,6 @@ import Foundation
|
|||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
open override func setupView() {
|
open override func setupView() {
|
||||||
super.setupView()
|
super.setupView()
|
||||||
planLabel.font = MFStyler.getMVA3FontSize(96, bold: true)
|
|
||||||
planLabel.standardFontSize = 96
|
|
||||||
addSubview(stack)
|
addSubview(stack)
|
||||||
planLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
|
planLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||||
planLabel.setContentHuggingPriority(.defaultHigh, for: .vertical)
|
planLabel.setContentHuggingPriority(.defaultHigh, for: .vertical)
|
||||||
@ -94,8 +92,7 @@ import Foundation
|
|||||||
open override func reset() {
|
open override func reset() {
|
||||||
super.reset()
|
super.reset()
|
||||||
stack.reset()
|
stack.reset()
|
||||||
planLabel.font = MFStyler.getMVA3FontSize(96, bold: true)
|
planLabel.setFontStyle(.BoldFeatureXLarge)
|
||||||
planLabel.standardFontSize = 96
|
|
||||||
headline.setFontStyle(.BoldTitleLarge)
|
headline.setFontStyle(.BoldTitleLarge)
|
||||||
subHeadline.setFontStyle(.RegularTitleLarge)
|
subHeadline.setFontStyle(.RegularTitleLarge)
|
||||||
body.setFontStyle(.RegularBodySmall)
|
body.setFontStyle(.RegularBodySmall)
|
||||||
|
|||||||
@ -76,8 +76,8 @@ import UIKit
|
|||||||
|
|
||||||
private func setDefaultState() {
|
private func setDefaultState() {
|
||||||
|
|
||||||
headlineBodyButton.headlineBody.headlineLabel.font = MFStyler.fontBoldTitleMedium()
|
headlineBodyButton.headlineBody.headlineLabel.setFontStyle(.BoldTitleMedium)
|
||||||
headlineBodyButton.headlineBody.messageLabel.font = MFStyler.fontRegularMicro()
|
headlineBodyButton.headlineBody.messageLabel.setFontStyle(.RegularMicro)
|
||||||
imageLoader.imageView.contentMode = .scaleAspectFit
|
imageLoader.imageView.contentMode = .scaleAspectFit
|
||||||
imageLoader.addSizeConstraintsForAspectRatio = true
|
imageLoader.addSizeConstraintsForAspectRatio = true
|
||||||
buttonHeaderPadding = PaddingTwo
|
buttonHeaderPadding = PaddingTwo
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import UIKit
|
|||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
public let label = Label(fontStyle: .BoldBodySmall)
|
public let label = Label().with { $0.font = Styler.Font.BoldFeatureXLarge.getFont() }
|
||||||
public let toggle = Toggle()
|
public let toggle = Toggle()
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -62,8 +62,8 @@
|
|||||||
|
|
||||||
private func defaultState() {
|
private func defaultState() {
|
||||||
|
|
||||||
headlineBody.headlineLabel.font = Styler.Font.BoldTitleMedium.getFont()
|
headlineBody.headlineLabel.setFontStyle(.BoldTitleMedium)
|
||||||
headlineBody.messageLabel.font = Styler.Font.RegularMicro.getFont()
|
headlineBody.messageLabel.setFontStyle(.RegularMicro)
|
||||||
button.use = .secondary
|
button.use = .secondary
|
||||||
button.isHidden = false
|
button.isHidden = false
|
||||||
buttonHeadlinePadding = PaddingTwo
|
buttonHeadlinePadding = PaddingTwo
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user