CXTDT-563194 - Dropdown Select - missing transparentBackground option
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
fab109b59b
commit
cbf5645959
@ -101,6 +101,14 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable {
|
|||||||
/// This is set by a local method.
|
/// This is set by a local method.
|
||||||
internal var bottomContainerView: UIView!
|
internal var bottomContainerView: UIView!
|
||||||
|
|
||||||
|
internal var containerBackgroundColor: UIColor {
|
||||||
|
if showError || hasInternalError {
|
||||||
|
return backgroundColorConfiguration.getColor(self)
|
||||||
|
} else {
|
||||||
|
return transparentBackground ? .clear : backgroundColorConfiguration.getColor(self)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Constraints
|
// MARK: - Constraints
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -441,7 +449,7 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal func updateContainerView() {
|
internal func updateContainerView() {
|
||||||
containerView.backgroundColor = backgroundColorConfiguration.getColor(self)
|
containerView.backgroundColor = containerBackgroundColor
|
||||||
containerView.layer.borderColor = borderColorConfiguration.getColor(self).cgColor
|
containerView.layer.borderColor = borderColorConfiguration.getColor(self).cgColor
|
||||||
containerView.layer.borderWidth = VDSFormControls.borderWidth
|
containerView.layer.borderWidth = VDSFormControls.borderWidth
|
||||||
containerView.layer.cornerRadius = VDSFormControls.borderRadius
|
containerView.layer.cornerRadius = VDSFormControls.borderRadius
|
||||||
|
|||||||
@ -34,6 +34,14 @@ open class InputField: EntryFieldBase {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Private Properties
|
// MARK: - Private Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
internal override var containerBackgroundColor: UIColor {
|
||||||
|
if showSuccess {
|
||||||
|
return backgroundColorConfiguration.getColor(self)
|
||||||
|
} else {
|
||||||
|
return super.containerBackgroundColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal override var minWidth: CGFloat { fieldType.handler().minWidth }
|
internal override var minWidth: CGFloat { fieldType.handler().minWidth }
|
||||||
internal override var maxWidth: CGFloat {
|
internal override var maxWidth: CGFloat {
|
||||||
let frameWidth = frame.size.width
|
let frameWidth = frame.size.width
|
||||||
|
|||||||
@ -163,9 +163,6 @@ open class TextArea: EntryFieldBase {
|
|||||||
|
|
||||||
textViewHeightConstraint = textView.heightAnchor.constraint(greaterThanOrEqualToConstant: containerSize.height)
|
textViewHeightConstraint = textView.heightAnchor.constraint(greaterThanOrEqualToConstant: containerSize.height)
|
||||||
textViewHeightConstraint?.isActive = true
|
textViewHeightConstraint?.isActive = true
|
||||||
backgroundColorConfiguration.setSurfaceColors(VDSColor.feedbackSuccessBackgroundOnlight, VDSColor.feedbackSuccessBackgroundOndark, forState: .success)
|
|
||||||
borderColorConfiguration.setSurfaceColors(VDSColor.feedbackSuccessOnlight, VDSColor.feedbackSuccessOndark, forState: .success)
|
|
||||||
borderColorConfiguration.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .focused)
|
|
||||||
characterCounterLabel.textColorConfiguration = primaryColorConfiguration.eraseToAnyColorable()
|
characterCounterLabel.textColorConfiguration = primaryColorConfiguration.eraseToAnyColorable()
|
||||||
bottomContainerStackView.spacing = VDSLayout.space2X
|
bottomContainerStackView.spacing = VDSLayout.space2X
|
||||||
|
|
||||||
@ -190,11 +187,7 @@ open class TextArea: EntryFieldBase {
|
|||||||
textViewHeightConstraint?.constant = minHeight.value
|
textViewHeightConstraint?.constant = minHeight.value
|
||||||
|
|
||||||
characterCounterLabel.text = getCharacterCounterText()
|
characterCounterLabel.text = getCharacterCounterText()
|
||||||
|
|
||||||
statusIcon.color = iconColorConfiguration.getColor(self)
|
|
||||||
containerView.layer.borderColor = isReadOnly ? readOnlyBorderColorConfiguration.getColor(self).cgColor : borderColorConfiguration.getColor(self).cgColor
|
|
||||||
textView.isEditable = !isEnabled || isReadOnly ? false : true
|
textView.isEditable = !isEnabled || isReadOnly ? false : true
|
||||||
textView.backgroundColor = backgroundColorConfiguration.getColor(self)
|
|
||||||
textView.tintColor = iconColorConfiguration.getColor(self)
|
textView.tintColor = iconColorConfiguration.getColor(self)
|
||||||
characterCounterLabel.surface = surface
|
characterCounterLabel.surface = surface
|
||||||
highlightCharacterOverflow()
|
highlightCharacterOverflow()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user