-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#264] Add component checkbox #447
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
#264) Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
) Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Tokens library version v0.5.0 Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
9fe0d4b
to
3eb7f25
Compare
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
|
||
// MARK: - Checkbox Configuration Model | ||
|
||
/// The model shared between `CheckboxPageConfiguration` view and `SwitchPageComponent` view. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ The model shared between CheckboxConfiguration
view and CheckboxPage
view.
didSet { updateCode() } | ||
} | ||
|
||
@Published var labelContent: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renouer en labelTextContent
override init() { | ||
status = .enabled | ||
selectorState = .selected | ||
layout = .selectorOnly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange to have helperText and other options with switchonly selected
} | ||
} | ||
|
||
// MARK: - Switch Demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkbox Demo
HStack(alignment: .center) { | ||
Spacer() | ||
OUDSCheckbox(state: $model.selectorState, | ||
isError: model.isError && model.status == CheckboxConfigurationModel.DesignToolboxCheckboxStatus.enabled, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reduire CheckboxConfigurationModel.DesignToolboxCheckboxStatus.enabled, .enabled
/// isError: true, | ||
/// divider: true) | ||
/// ``` | ||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ajouter une exemple du disable
et indiquer ce qui est interdit en complément du warning dans la description
/// - Parameters: | ||
/// - state: A binding to a property that determines wether the selector is ticked, unticked or preticked. | ||
/// - isError: True if the look and feel of the component must reflect an error state, default set to `false` | ||
/// - isReadOnly: True if component is in read only, i.e. not really disabled but user cannot interact with it yet, default set to `false` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ajouter un warning si disbaled avec error et/ou readonly
|
||
extension Bundle { | ||
|
||
/// The OUDS bundle, useful to find resources | ||
public static let OUDSComponents = Bundle.module | ||
|
||
/// Loads thefirst preferred localization from main Bundle or if not defined the english one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loads the first p....
// A leading checkbox with a label | ||
OUDSCheckbox(state: $state, label: "Hello world") | ||
|
||
// A trailing checkbox with a label, an helper text, an icon, a divider and is about an error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ajouter le inverse pour être conforme au commentaire
@@ -20,7 +20,7 @@ import OUDSTokensSemantic | |||
|
|||
extension OrangeThemeCheckRadioComponentTokensProvider: CheckRadioComponentTokens { | |||
@objc open var checkRadioSizeMaxHeightAssetsContainer: SizeSemanticToken { DimensionRawTokens.dimension1200 } | |||
@objc open var checkRadioSizeMaxHeightSelectorOnly: SizeSemanticToken { DimensionRawTokens.dimension600 } | |||
@objc open var checkRadioSizeMaxHeightSelectorOnly: SizeSemanticToken { DimensionRawTokens.dimension600 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supprimer l'espace
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
Related issues
#264
Description
Add checkbox component
Motivation & Context
Types of change
Previews
Checklist
Contribution
Accessibility
Design
Development
Documentation
Checklist (for Core Team only)