marked private/internal subcomponents to open
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
508d02e7b9
commit
ef1ca0f6ab
@ -22,9 +22,9 @@ public class Badge: View, Accessable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Private Properties
|
// MARK: - Public Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
private var label = Label().with {
|
open var label = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.adjustsFontSizeToFitWidth = false
|
$0.adjustsFontSizeToFitWidth = false
|
||||||
$0.lineBreakMode = .byTruncatingTail
|
$0.lineBreakMode = .byTruncatingTail
|
||||||
@ -32,9 +32,6 @@ public class Badge: View, Accessable {
|
|||||||
$0.textStyle = .boldBodySmall
|
$0.textStyle = .boldBodySmall
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
|
||||||
// MARK: - Public Properties
|
|
||||||
//--------------------------------------------------
|
|
||||||
open var fillColor: FillColor = .red { didSet { didChange() }}
|
open var fillColor: FillColor = .red { didSet { didChange() }}
|
||||||
|
|
||||||
open var text: String = "" { didSet { didChange() }}
|
open var text: String = "" { didSet { didChange() }}
|
||||||
|
|||||||
@ -73,28 +73,28 @@ open class CheckboxBase: Control, Accessable, DataTrackable, Errorable {
|
|||||||
$0.axis = .vertical
|
$0.axis = .vertical
|
||||||
}
|
}
|
||||||
|
|
||||||
private var label = Label().with {
|
//--------------------------------------------------
|
||||||
|
// MARK: - Public Properties
|
||||||
|
//--------------------------------------------------
|
||||||
|
open var label = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.textPosition = .left
|
$0.textPosition = .left
|
||||||
$0.textStyle = .boldBodyLarge
|
$0.textStyle = .boldBodyLarge
|
||||||
}
|
}
|
||||||
|
|
||||||
private var childLabel = Label().with {
|
open var childLabel = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.textPosition = .left
|
$0.textPosition = .left
|
||||||
$0.textStyle = .bodyLarge
|
$0.textStyle = .bodyLarge
|
||||||
}
|
}
|
||||||
|
|
||||||
private var errorLabel = Label().with {
|
open var errorLabel = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.textPosition = .left
|
$0.textPosition = .left
|
||||||
$0.textStyle = .bodyMedium
|
$0.textStyle = .bodyMedium
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
open var selectorView = UIView().with {
|
||||||
// MARK: - Public Properties
|
|
||||||
//--------------------------------------------------
|
|
||||||
public var selectorView = UIView().with {
|
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,15 +19,15 @@ public class Icon: View {
|
|||||||
private var widthConstraint: NSLayoutConstraint?
|
private var widthConstraint: NSLayoutConstraint?
|
||||||
private var heightConstraint: NSLayoutConstraint?
|
private var heightConstraint: NSLayoutConstraint?
|
||||||
|
|
||||||
private var imageView = UIImageView().with {
|
//--------------------------------------------------
|
||||||
|
// MARK: - Public Properties
|
||||||
|
//--------------------------------------------------
|
||||||
|
open var imageView = UIImageView().with {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
$0.contentMode = .scaleAspectFill
|
$0.contentMode = .scaleAspectFill
|
||||||
$0.clipsToBounds = true
|
$0.clipsToBounds = true
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
|
||||||
// MARK: - Public Properties
|
|
||||||
//--------------------------------------------------
|
|
||||||
open var color: Color = .black { didSet { didChange() }}
|
open var color: Color = .black { didSet { didChange() }}
|
||||||
open var size: Size = .medium { didSet { didChange() }}
|
open var size: Size = .medium { didSet { didChange() }}
|
||||||
open var name: Name? { didSet { didChange() }}
|
open var name: Name? { didSet { didChange() }}
|
||||||
|
|||||||
@ -67,27 +67,27 @@ open class RadioBoxBase: Control, Accessable, DataTrackable{
|
|||||||
$0.isHidden = false
|
$0.isHidden = false
|
||||||
}
|
}
|
||||||
|
|
||||||
private var textLabel = Label().with {
|
//--------------------------------------------------
|
||||||
|
// MARK: - Public Properties
|
||||||
|
//--------------------------------------------------
|
||||||
|
open var textLabel = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.textPosition = .left
|
$0.textPosition = .left
|
||||||
$0.textStyle = .boldBodyLarge
|
$0.textStyle = .boldBodyLarge
|
||||||
}
|
}
|
||||||
|
|
||||||
private var subTextLabel = Label().with {
|
open var subTextLabel = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.textPosition = .left
|
$0.textPosition = .left
|
||||||
$0.textStyle = .bodyLarge
|
$0.textStyle = .bodyLarge
|
||||||
}
|
}
|
||||||
|
|
||||||
private var subTextRightLabel = Label().with {
|
open var subTextRightLabel = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.textPosition = .right
|
$0.textPosition = .right
|
||||||
$0.textStyle = .bodyLarge
|
$0.textStyle = .bodyLarge
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
|
||||||
// MARK: - Public Properties
|
|
||||||
//--------------------------------------------------
|
|
||||||
public var selectorView = UIView().with {
|
public var selectorView = UIView().with {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,27 +80,27 @@ open class RadioButtonBase: Control, Accessable, DataTrackable, Errorable {
|
|||||||
$0.axis = .vertical
|
$0.axis = .vertical
|
||||||
}
|
}
|
||||||
|
|
||||||
private var label = Label().with {
|
//--------------------------------------------------
|
||||||
|
// MARK: - Public Properties
|
||||||
|
//--------------------------------------------------
|
||||||
|
open var label = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.textPosition = .left
|
$0.textPosition = .left
|
||||||
$0.textStyle = .boldBodyLarge
|
$0.textStyle = .boldBodyLarge
|
||||||
}
|
}
|
||||||
|
|
||||||
private var childLabel = Label().with {
|
open var childLabel = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.textPosition = .left
|
$0.textPosition = .left
|
||||||
$0.textStyle = .bodyLarge
|
$0.textStyle = .bodyLarge
|
||||||
}
|
}
|
||||||
|
|
||||||
private var errorLabel = Label().with {
|
open var errorLabel = Label().with {
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
$0.textPosition = .left
|
$0.textPosition = .left
|
||||||
$0.textStyle = .bodyMedium
|
$0.textStyle = .bodyMedium
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
|
||||||
// MARK: - Public Properties
|
|
||||||
//--------------------------------------------------
|
|
||||||
public var selectorView = UIView().with {
|
public var selectorView = UIView().with {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,26 +45,7 @@ open class EntryField: Control, Accessable {
|
|||||||
$0.distribution = .fill
|
$0.distribution = .fill
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
internal var titleLabel = Label().with {
|
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
|
||||||
$0.attributes = []
|
|
||||||
$0.textPosition = .left
|
|
||||||
$0.textStyle = .bodySmall
|
|
||||||
}
|
|
||||||
|
|
||||||
internal var errorLabel = Label().with {
|
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
|
||||||
$0.textPosition = .left
|
|
||||||
$0.textStyle = .bodySmall
|
|
||||||
}
|
|
||||||
|
|
||||||
internal var helperLabel = Label().with {
|
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
|
||||||
$0.textPosition = .left
|
|
||||||
$0.textStyle = .bodySmall
|
|
||||||
}
|
|
||||||
|
|
||||||
internal var containerView: UIView = {
|
internal var containerView: UIView = {
|
||||||
return UIView().with {
|
return UIView().with {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
@ -85,13 +66,7 @@ open class EntryField: Control, Accessable {
|
|||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
||||||
internal var tooltipView: UIView?
|
|
||||||
internal var icon: Icon = Icon().with {
|
|
||||||
$0.size = .small
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Configuration Properties
|
// MARK: - Configuration Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -123,6 +98,30 @@ open class EntryField: Control, Accessable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Public Properties
|
// MARK: - Public Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
open var titleLabel = Label().with {
|
||||||
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
|
$0.attributes = []
|
||||||
|
$0.textPosition = .left
|
||||||
|
$0.textStyle = .bodySmall
|
||||||
|
}
|
||||||
|
|
||||||
|
open var errorLabel = Label().with {
|
||||||
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
|
$0.textPosition = .left
|
||||||
|
$0.textStyle = .bodySmall
|
||||||
|
}
|
||||||
|
|
||||||
|
open var helperLabel = Label().with {
|
||||||
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
|
$0.textPosition = .left
|
||||||
|
$0.textStyle = .bodySmall
|
||||||
|
}
|
||||||
|
|
||||||
|
open var tooltipView: UIView?
|
||||||
|
open var icon: Icon = Icon().with {
|
||||||
|
$0.size = .small
|
||||||
|
}
|
||||||
|
|
||||||
open var labelText: String? { didSet { didChange() }}
|
open var labelText: String? { didSet { didChange() }}
|
||||||
|
|
||||||
open var helperText: String? { didSet { didChange() }}
|
open var helperText: String? { didSet { didChange() }}
|
||||||
|
|||||||
@ -50,8 +50,20 @@ open class Tilelet: TileContainer {
|
|||||||
private var titleLockupContainerView = UIView().with {
|
private var titleLockupContainerView = UIView().with {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
}
|
}
|
||||||
|
|
||||||
private var titleLockup = TitleLockup().with {
|
private var badgeContainerView = UIView().with {
|
||||||
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
}
|
||||||
|
|
||||||
|
private let iconContainerView = UIView().with {
|
||||||
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
$0.backgroundColor = .clear
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Public Properties
|
||||||
|
//--------------------------------------------------
|
||||||
|
open var titleLockup = TitleLockup().with {
|
||||||
let configs = [
|
let configs = [
|
||||||
TextStyle.DeviceSpacingConfig([.titleSmall, .boldTitleSmall],
|
TextStyle.DeviceSpacingConfig([.titleSmall, .boldTitleSmall],
|
||||||
neighboring: [
|
neighboring: [
|
||||||
@ -113,28 +125,16 @@ open class Tilelet: TileContainer {
|
|||||||
$0.bottomTextStyleSpacingConfig = TextStyle.SpacingConfig(configs: configs)
|
$0.bottomTextStyleSpacingConfig = TextStyle.SpacingConfig(configs: configs)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var badgeContainerView = UIView().with {
|
open var badge = Badge().with {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
|
||||||
}
|
|
||||||
|
|
||||||
private var badge = Badge().with {
|
|
||||||
$0.fillColor = .red
|
$0.fillColor = .red
|
||||||
}
|
}
|
||||||
|
|
||||||
private let iconContainerView = UIView().with {
|
open var descriptiveIcon = Icon()
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
|
||||||
$0.backgroundColor = .clear
|
|
||||||
}
|
|
||||||
|
|
||||||
private var descriptiveIcon = Icon()
|
open var directionalIcon = Icon().with {
|
||||||
private var directionalIcon = Icon().with {
|
|
||||||
$0.name = .rightArrow
|
$0.name = .rightArrow
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
|
||||||
// MARK: - Public Properties
|
|
||||||
//--------------------------------------------------
|
|
||||||
//style
|
|
||||||
private var _textWidth: CGFloat?
|
private var _textWidth: CGFloat?
|
||||||
open var textWidth: CGFloat? {
|
open var textWidth: CGFloat? {
|
||||||
get { _textWidth }
|
get { _textWidth }
|
||||||
|
|||||||
@ -68,11 +68,7 @@ open class ToggleBase: Control, Accessable, DataTrackable {
|
|||||||
$0.axis = .horizontal
|
$0.axis = .horizontal
|
||||||
$0.distribution = .fill
|
$0.distribution = .fill
|
||||||
}
|
}
|
||||||
|
|
||||||
private var label = Label().with {
|
|
||||||
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
|
||||||
}
|
|
||||||
|
|
||||||
private var toggleView = UIView().with {
|
private var toggleView = UIView().with {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
}
|
}
|
||||||
@ -121,6 +117,10 @@ open class ToggleBase: Control, Accessable, DataTrackable {
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Public Properties
|
// MARK: - Public Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
open var label = Label().with {
|
||||||
|
$0.setContentCompressionResistancePriority(.required, for: .vertical)
|
||||||
|
}
|
||||||
|
|
||||||
open var isOn: Bool {
|
open var isOn: Bool {
|
||||||
get { isSelected }
|
get { isSelected }
|
||||||
set {
|
set {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user