@lion/ui 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/src/LionAccordion.js +3 -2
- package/components/button/src/LionButton.js +6 -10
- package/components/button/src/LionButtonReset.js +2 -0
- package/components/button/src/LionButtonSubmit.js +2 -0
- package/components/button/test-suites/LionButton.suite.js +0 -14
- package/components/checkbox-group/src/LionCheckbox.js +3 -0
- package/components/checkbox-group/src/LionCheckboxGroup.js +2 -0
- package/components/checkbox-group/src/LionCheckboxIndeterminate.js +3 -0
- package/components/collapsible/src/LionCollapsible.js +4 -1
- package/components/combobox/src/LionCombobox.js +31 -8
- package/components/combobox/test/lion-combobox.test.js +206 -57
- package/components/dialog/src/LionDialog.js +3 -0
- package/components/drawer/src/LionDrawer.js +9 -0
- package/components/fieldset/src/LionFieldset.js +1 -1
- package/components/form/src/LionForm.js +0 -1
- package/components/form-core/src/FocusMixin.js +1 -0
- package/components/form-core/src/FormControlMixin.js +33 -18
- package/components/form-core/src/FormatMixin.js +1 -1
- package/components/form-core/src/validate/LionValidationFeedback.js +8 -10
- package/components/form-core/src/validate/ValidateMixin.js +40 -4
- package/components/form-core/test/FormControlMixin.test.js +68 -0
- package/components/form-core/test/validate/lion-validation-feedback.test.js +0 -22
- package/components/form-core/test-suites/ValidateMixin.suite.js +19 -3
- package/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.js +119 -0
- package/components/form-core/types/validate/validate.ts +1 -0
- package/components/icon/src/LionIcon.js +2 -0
- package/components/input-file/src/LionInputFile.js +9 -0
- package/components/input-tel/src/LionInputTel.js +3 -0
- package/components/input-tel-dropdown/src/LionInputTelDropdown.js +2 -0
- package/components/listbox/src/LionListbox.js +2 -0
- package/components/overlays/src/OverlayController.js +32 -5
- package/components/overlays/src/OverlayMixin.js +5 -0
- package/components/overlays/src/configurations/withDropdownConfig.js +0 -1
- package/components/overlays/src/configurations/withTooltipConfig.js +0 -1
- package/components/overlays/test/OverlayController.test.js +16 -4
- package/components/overlays/test-suites/OverlayMixin.suite.js +71 -0
- package/components/progress-indicator/src/LionProgressIndicator.js +4 -0
- package/components/radio-group/src/LionRadioGroup.js +3 -1
- package/components/select/src/LionSelect.js +4 -0
- package/components/select-rich/src/LionSelectInvoker.js +2 -0
- package/components/select-rich/src/LionSelectRich.js +2 -0
- package/components/steps/src/LionStep.js +0 -1
- package/components/steps/src/LionSteps.js +0 -1
- package/components/switch/src/LionSwitch.js +3 -0
- package/components/switch/src/LionSwitchButton.js +5 -0
- package/components/tabs/src/LionTabs.js +8 -0
- package/custom-elements.json +1271 -406
- package/dist-types/components/accordion/src/LionAccordion.d.ts +3 -2
- package/dist-types/components/accordion/src/LionAccordion.d.ts.map +1 -1
- package/dist-types/components/button/src/LionButton.d.ts +2 -1
- package/dist-types/components/button/src/LionButton.d.ts.map +1 -1
- package/dist-types/components/button/src/LionButtonReset.d.ts +2 -0
- package/dist-types/components/button/src/LionButtonReset.d.ts.map +1 -1
- package/dist-types/components/button/src/LionButtonSubmit.d.ts +2 -0
- package/dist-types/components/button/src/LionButtonSubmit.d.ts.map +1 -1
- package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
- package/dist-types/components/checkbox-group/src/LionCheckbox.d.ts +3 -0
- package/dist-types/components/checkbox-group/src/LionCheckbox.d.ts.map +1 -1
- package/dist-types/components/checkbox-group/src/LionCheckboxGroup.d.ts +2 -0
- package/dist-types/components/checkbox-group/src/LionCheckboxGroup.d.ts.map +1 -1
- package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts +3 -0
- package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts.map +1 -1
- package/dist-types/components/collapsible/src/LionCollapsible.d.ts +3 -1
- package/dist-types/components/collapsible/src/LionCollapsible.d.ts.map +1 -1
- package/dist-types/components/combobox/src/LionCombobox.d.ts +5 -0
- package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
- package/dist-types/components/core/src/ScopedElementsMixin.d.ts.map +1 -1
- package/dist-types/components/dialog/src/LionDialog.d.ts +3 -0
- package/dist-types/components/dialog/src/LionDialog.d.ts.map +1 -1
- package/dist-types/components/drawer/src/LionDrawer.d.ts +9 -0
- package/dist-types/components/drawer/src/LionDrawer.d.ts.map +1 -1
- package/dist-types/components/fieldset/src/LionFieldset.d.ts +1 -1
- package/dist-types/components/form/src/LionForm.d.ts.map +1 -1
- package/dist-types/components/form-core/src/FocusMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/FormControlMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/validate/LionValidationFeedback.d.ts +4 -3
- package/dist-types/components/form-core/src/validate/LionValidationFeedback.d.ts.map +1 -1
- package/dist-types/components/form-core/src/validate/ValidateMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/ValidateMixin.suite.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.d.ts.map +1 -1
- package/dist-types/components/form-core/types/validate/validate.d.ts +1 -0
- package/dist-types/components/form-core/types/validate/validate.d.ts.map +1 -1
- package/dist-types/components/icon/src/LionIcon.d.ts +2 -0
- package/dist-types/components/icon/src/LionIcon.d.ts.map +1 -1
- package/dist-types/components/input-file/src/LionInputFile.d.ts +9 -0
- package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -1
- package/dist-types/components/input-tel/src/LionInputTel.d.ts +3 -0
- package/dist-types/components/input-tel/src/LionInputTel.d.ts.map +1 -1
- package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts +2 -0
- package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts.map +1 -1
- package/dist-types/components/listbox/src/LionListbox.d.ts +2 -0
- package/dist-types/components/listbox/src/LionListbox.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayMixin.d.ts +4 -0
- package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
- package/dist-types/components/overlays/src/configurations/withDropdownConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/src/configurations/withTooltipConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/test/OverlayController.test.d.ts.map +1 -1
- package/dist-types/components/overlays/test-suites/OverlayMixin.suite.d.ts.map +1 -1
- package/dist-types/components/progress-indicator/src/LionProgressIndicator.d.ts +3 -0
- package/dist-types/components/progress-indicator/src/LionProgressIndicator.d.ts.map +1 -1
- package/dist-types/components/radio-group/src/LionRadioGroup.d.ts +3 -1
- package/dist-types/components/radio-group/src/LionRadioGroup.d.ts.map +1 -1
- package/dist-types/components/select/src/LionSelect.d.ts +3 -0
- package/dist-types/components/select/src/LionSelect.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectInvoker.d.ts +2 -0
- package/dist-types/components/select-rich/src/LionSelectInvoker.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +3 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/components/steps/src/LionStep.d.ts +0 -1
- package/dist-types/components/steps/src/LionStep.d.ts.map +1 -1
- package/dist-types/components/steps/src/LionSteps.d.ts +0 -1
- package/dist-types/components/steps/src/LionSteps.d.ts.map +1 -1
- package/dist-types/components/switch/src/LionSwitch.d.ts +3 -0
- package/dist-types/components/switch/src/LionSwitch.d.ts.map +1 -1
- package/dist-types/components/switch/src/LionSwitchButton.d.ts +5 -0
- package/dist-types/components/switch/src/LionSwitchButton.d.ts.map +1 -1
- package/dist-types/components/tabs/src/LionTabs.d.ts +8 -0
- package/dist-types/components/tabs/src/LionTabs.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/accordion/api-table.md +8 -0
- package/docs/components/button/api-table.md +0 -3
- package/docs/components/checkbox-group/api-table.md +6 -6
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/api-table.md +7 -0
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/api-table.md +9 -2
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +90 -1
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/drawer/api-table.md +8 -0
- package/docs/components/fieldset/api-table.md +2 -2
- package/docs/components/fieldset/overview.md +5 -5
- package/docs/components/form/overview.md +3 -3
- package/docs/components/form/use-cases.md +2 -2
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/api-table.md +2 -2
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input-amount/api-table.md +2 -2
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/api-table.md +2 -2
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/api-table.md +2 -2
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/api-table.md +2 -2
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/api-table.md +9 -2
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/api-table.md +2 -2
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/api-table.md +2 -2
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/api-table.md +2 -2
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-tel/api-table.md +2 -2
- package/docs/components/input-tel/overview.md +1 -1
- package/docs/components/input-tel/use-cases.md +6 -6
- package/docs/components/input-tel-dropdown/api-table.md +2 -2
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/listbox/api-table.md +2 -2
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/radio-group/api-table.md +4 -4
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/api-table.md +2 -2
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/api-table.md +2 -3
- package/docs/components/select-rich/use-cases.md +1 -1
- package/docs/components/switch/api-table.md +2 -2
- package/docs/components/tabs/api-table.md +7 -0
- package/docs/components/tabs/examples.md +1 -1
- package/docs/components/textarea/api-table.md +2 -2
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
- package/docs/fundamentals/rationales/accessibility.md +1 -1
- package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
- package/docs/fundamentals/systems/core/overview.md +1 -1
- package/docs/fundamentals/systems/form/api-table.md +2 -2
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
- package/docs/fundamentals/systems/form/model-value.md +1 -1
- package/docs/fundamentals/systems/form/overview.md +28 -28
- package/docs/fundamentals/systems/form/styling.md +3 -20
- package/docs/fundamentals/systems/form/validate.md +19 -3
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/configuration.md +2 -2
- package/docs/fundamentals/systems/overlays/overview.md +5 -5
- package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
- package/docs/fundamentals/tools/helpers/overview.md +1 -1
- package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
- package/docs/guides/how-to/create-a-custom-field.md +5 -5
- package/docs/guides/how-to/create-a-form.md +4 -4
- package/docs/guides/how-to/extend-a-native-input.md +2 -2
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -1
- package/package.json +3 -3
|
@@ -42,4 +42,12 @@ eleventyNavigation:
|
|
|
42
42
|
| `expanded` | expanded | |
|
|
43
43
|
| `exclusive` | exclusive | |
|
|
44
44
|
|
|
45
|
+
### Slots
|
|
46
|
+
|
|
47
|
+
| Name | Description |
|
|
48
|
+
| ------------ | ------------------------------------------------------------------ |
|
|
49
|
+
| `invoker` | The invoker element for the accordion |
|
|
50
|
+
| `content` | The content element for the accordion |
|
|
51
|
+
| `_accordion` | The slot for the accordion, used to rearrange invokers and content |
|
|
52
|
+
|
|
45
53
|
<hr/>
|
|
@@ -22,7 +22,6 @@ eleventyNavigation:
|
|
|
22
22
|
| `disabled` | public | `boolean` | `false` | | DisabledMixin |
|
|
23
23
|
| `tabIndex` | public | `number` | | | DisabledWithTabIndexMixin |
|
|
24
24
|
| `type` | public | `string` | `'button'` | | |
|
|
25
|
-
| `_buttonId` | protected | | | | |
|
|
26
25
|
| `_requestedToBeDisabled` | protected | `boolean` | `false` | | DisabledMixin |
|
|
27
26
|
|
|
28
27
|
### Methods
|
|
@@ -55,7 +54,6 @@ eleventyNavigation:
|
|
|
55
54
|
| `disabled` | public | `boolean` | `false` | | LionButton |
|
|
56
55
|
| `tabIndex` | public | `number` | | | LionButton |
|
|
57
56
|
| `type` | public | `string` | `'reset'` | | LionButton |
|
|
58
|
-
| `_buttonId` | protected | | | | LionButton |
|
|
59
57
|
| `_requestedToBeDisabled` | protected | `boolean` | `false` | | LionButton |
|
|
60
58
|
|
|
61
59
|
### Methods
|
|
@@ -90,7 +88,6 @@ eleventyNavigation:
|
|
|
90
88
|
| `disabled` | public | `boolean` | `false` | | LionButton |
|
|
91
89
|
| `tabIndex` | public | `number` | | | LionButton |
|
|
92
90
|
| `type` | public | `string` | `'submit'` | | LionButton |
|
|
93
|
-
| `_buttonId` | protected | | | | LionButton |
|
|
94
91
|
| `_nativeButtonNode` | protected | `HTMLButtonElement\|null` | | | |
|
|
95
92
|
| `_requestedToBeDisabled` | protected | `boolean` | `false` | | LionButton |
|
|
96
93
|
|
|
@@ -34,9 +34,9 @@ eleventyNavigation:
|
|
|
34
34
|
| `formatOptions` | public | | `({ mode: 'auto' })` | Configuration object that will be available inside the formatter function | FormatMixin |
|
|
35
35
|
| `formattedValue` | public | `string\|undefined` | `undefined` | The view value is the result of the formatter function (when available).
The result will be stored in the native \_inputNode (usually an input\[type=text]).

Examples:
- For a date input, this would be '20/01/1999' (dependent on locale).
- For a number input, this could be '1,234.56' (a String representation of modelValue
1234.56) | FormatMixin |
|
|
36
36
|
| `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this
array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).
Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on
\`.feedbackCondition()\`.

For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can
be useful for subtle visual feedback on keyup, like a red/green border around an input. | ValidateMixin |
|
|
37
|
-
| `helpText` | public | `string` |
|
|
37
|
+
| `helpText` | public | `string` | | The helpt text for the input node.
When no light dom defined via \[slot=help-text], this value will be used | FormControlMixin |
|
|
38
38
|
| `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.
Creates attribute \[is-pending] as a styling hook | ValidateMixin |
|
|
39
|
-
| `label` | public | `string` |
|
|
39
|
+
| `label` | public | `string` | | The label text for the input node.
When no light dom defined via \[slot=label], this value will be used. | FormControlMixin |
|
|
40
40
|
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | FormControlMixin |
|
|
41
41
|
| `modelValue` | public | `{value:string\|any,checked:boolean}` | `{ value: '', checked: false }` | Whereas 'normal' \`.modelValue\`s usually store a complex/typed version
of a view value, choice inputs have a slightly different approach.
In order to remain their Single Source of Truth characteristic, choice inputs
store both the value and 'checkedness', in the format { value: 'x', checked: true }
Different from the platform, this also allows to serialize the 'non checkedness',
allowing to restore form state easily and inform the server about unchecked options. | FormControlMixin |
|
|
42
42
|
| `name` | public | `string` | `''` | The name the element will be registered with to the .formElements collection
of the parent. Also, it serves as the key of key/value pairs in
 modelValue/serializedValue objects | FormRegisteringMixin |
|
|
@@ -209,10 +209,10 @@ eleventyNavigation:
|
|
|
209
209
|
| `formattedValue` | public | | | Object keyed by formElements names, containing formElements' formattedValues | FormGroupMixin |
|
|
210
210
|
| `formElements` | public | `FormControlsCollection` | `new FormControlsCollection()` | Closely mimics the natively supported HTMLFormControlsCollection. It can be accessed
both like an array and an object (based on control/element names). | FormRegistrarMixin |
|
|
211
211
|
| `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this
array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).
Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on
\`.feedbackCondition()\`.

For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can
be useful for subtle visual feedback on keyup, like a red/green border around an input. | ValidateMixin |
|
|
212
|
-
| `helpText` | public | `string` |
|
|
212
|
+
| `helpText` | public | `string` | | The helpt text for the input node.
When no light dom defined via \[slot=help-text], this value will be used | FormControlMixin |
|
|
213
213
|
| `initComplete` | public | `Promise<any>` | `new Promise((resolve, reject) => { this.__resolveInitComplete = resolve; this.__rejectInitComplete = reject; })` | initComplete resolves after all pending initialization logic
(for instance \`\<form-group .serializedValue=${{ child1: 'a', child2: 'b' }}>\`)
is executed | FormRegistrarMixin |
|
|
214
214
|
| `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.
Creates attribute \[is-pending] as a styling hook | ValidateMixin |
|
|
215
|
-
| `label` | public | `string` |
|
|
215
|
+
| `label` | public | `string` | | The label text for the input node.
When no light dom defined via \[slot=label], this value will be used. | FormControlMixin |
|
|
216
216
|
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | FormControlMixin |
|
|
217
217
|
| `modelValue` | public | | | Object keyed by formElements names, containing formElements' modelValues | FormControlMixin |
|
|
218
218
|
| `multipleChoice` | public | `boolean` | `true` | When false (default), modelValue and serializedValue will reflect the
currently selected choice (usually a string). When true, modelValue will and
serializedValue will be an array of strings. | ChoiceGroupMixin |
|
|
@@ -377,10 +377,10 @@ eleventyNavigation:
|
|
|
377
377
|
| `formatOptions` | public | | `({ mode: 'auto' })` | Configuration object that will be available inside the formatter function | FormatMixin |
|
|
378
378
|
| `formattedValue` | public | `string\|undefined` | `undefined` | The view value is the result of the formatter function (when available).
The result will be stored in the native \_inputNode (usually an input\[type=text]).

Examples:
- For a date input, this would be '20/01/1999' (dependent on locale).
- For a number input, this could be '1,234.56' (a String representation of modelValue
1234.56) | FormatMixin |
|
|
379
379
|
| `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this
array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).
Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on
\`.feedbackCondition()\`.

For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can
be useful for subtle visual feedback on keyup, like a red/green border around an input. | ValidateMixin |
|
|
380
|
-
| `helpText` | public | `string` |
|
|
380
|
+
| `helpText` | public | `string` | | The helpt text for the input node.
When no light dom defined via \[slot=help-text], this value will be used | FormControlMixin |
|
|
381
381
|
| `indeterminate` | public | `boolean` | `false` | Indeterminate state of the checkbox | |
|
|
382
382
|
| `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.
Creates attribute \[is-pending] as a styling hook | ValidateMixin |
|
|
383
|
-
| `label` | public | `string` |
|
|
383
|
+
| `label` | public | `string` | | The label text for the input node.
When no light dom defined via \[slot=label], this value will be used. | FormControlMixin |
|
|
384
384
|
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | FormControlMixin |
|
|
385
385
|
| `mixedState` | public | `boolean` | `false` | | |
|
|
386
386
|
| `modelValue` | public | `{value:string\|any,checked:boolean}` | `{ value: '', checked: false }` | Whereas 'normal' \`.modelValue\`s usually store a complex/typed version
of a view value, choice inputs have a slightly different approach.
In order to remain their Single Source of Truth characteristic, choice inputs
store both the value and 'checkedness', in the format { value: 'x', checked: true }
Different from the platform, this also allows to serialize the 'non checkedness',
allowing to restore form state easily and inform the server about unchecked options. | FormControlMixin |
|
|
@@ -31,11 +31,11 @@ import '@lion/ui/define/lion-checkbox.js';
|
|
|
31
31
|
</lion-checkbox-group>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
> Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/
|
|
34
|
+
> Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/form/overview.md)'s serialization result.
|
|
35
35
|
|
|
36
36
|
## Features
|
|
37
37
|
|
|
38
|
-
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/
|
|
38
|
+
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/fieldset/overview.md),
|
|
39
39
|
it has all the features a fieldset has.
|
|
40
40
|
|
|
41
41
|
## Installation
|
|
@@ -45,4 +45,11 @@ eleventyNavigation:
|
|
|
45
45
|
| -------- | ------ | -------------- |
|
|
46
46
|
| `opened` | opened | |
|
|
47
47
|
|
|
48
|
+
### Slots
|
|
49
|
+
|
|
50
|
+
| Name | Description |
|
|
51
|
+
| --------- | --------------------------------------- |
|
|
52
|
+
| `invoker` | The invoker element for the collapsible |
|
|
53
|
+
| `content` | The content element for the collapsible |
|
|
54
|
+
|
|
48
55
|
<hr/>
|
|
@@ -34,7 +34,7 @@ export const main = () => html`
|
|
|
34
34
|
## Features
|
|
35
35
|
|
|
36
36
|
- Use `opened` attribute or `toggle()` method to render default open.
|
|
37
|
-
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/
|
|
37
|
+
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/button/overview.md) or native `button` with custom styling.
|
|
38
38
|
- Observe the state with the help of `@opened-changed` event.
|
|
39
39
|
- `show()` and `hide()` are helper methods to hide or show the content from outside.
|
|
40
40
|
|
|
@@ -37,10 +37,10 @@ eleventyNavigation:
|
|
|
37
37
|
| `formElements` | public | `FormControlsCollection` | `new FormControlsCollection()` | Closely mimics the natively supported HTMLFormControlsCollection. It can be accessed
both like an array and an object (based on control/element names). | FormRegistrarMixin |
|
|
38
38
|
| `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this
array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).
Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on
\`.feedbackCondition()\`.

For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can
be useful for subtle visual feedback on keyup, like a red/green border around an input. | ValidateMixin |
|
|
39
39
|
| `hasNoDefaultSelected` | public | `boolean` | `false` | When setting this to true, on initial render, no option will be selected.
It is advisable to override \`\_noSelectionTemplate\` method in the select-invoker
to render some kind of placeholder initially | ListboxMixin |
|
|
40
|
-
| `helpText` | public | `string` |
|
|
40
|
+
| `helpText` | public | `string` | | The helpt text for the input node.
When no light dom defined via \[slot=help-text], this value will be used | FormControlMixin |
|
|
41
41
|
| `initComplete` | public | `Promise<any>` | `new Promise((resolve, reject) => { this.__resolveInitComplete = resolve; this.__rejectInitComplete = reject; })` | initComplete resolves after all pending initialization logic
(for instance \`\<form-group .serializedValue=${{ child1: 'a', child2: 'b' }}>\`)
is executed | FormRegistrarMixin |
|
|
42
42
|
| `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.
Creates attribute \[is-pending] as a styling hook | ValidateMixin |
|
|
43
|
-
| `label` | public | `string` |
|
|
43
|
+
| `label` | public | `string` | | The label text for the input node.
When no light dom defined via \[slot=label], this value will be used. | FormControlMixin |
|
|
44
44
|
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | FormControlMixin |
|
|
45
45
|
| `matchMode` | public | `'begin'\|'all'` | `'all'` | When typing in the textbox, will by default be set on 'begin',
only matching the beginning part in suggestion list.
=> 'a' will match 'apple' from \['apple', 'pear', 'citrus'].
When set to 'all', will match middle of the word as well
=> 'a' will match 'apple' and 'pear' | |
|
|
46
46
|
| `modelValue` | public | `object` | | | FormControlMixin |
|
|
@@ -258,4 +258,11 @@ eleventyNavigation:
|
|
|
258
258
|
| `is-pending` | isPending | ValidateMixin |
|
|
259
259
|
| `disabled` | disabled | DisabledMixin |
|
|
260
260
|
|
|
261
|
+
### Slots
|
|
262
|
+
|
|
263
|
+
| Name | Description |
|
|
264
|
+
| ------------------- | ------------------------------------------------------------------------------ |
|
|
265
|
+
| `listbox` | The listbox element for the combobox, e.g. \<lion-options> |
|
|
266
|
+
| `selection-display` | The selection display element for the combobox, e.g. \<lion-selection-display> |
|
|
267
|
+
|
|
261
268
|
<hr/>
|
|
@@ -46,7 +46,7 @@ export const main = () => html`
|
|
|
46
46
|
`;
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
[...show more](https://github.com/ing-bank/lion/blob/
|
|
49
|
+
[...show more](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/combobox/extensions.md)
|
|
50
50
|
|
|
51
51
|
## Features
|
|
52
52
|
|
|
@@ -29,6 +29,7 @@ import { LitElement, html, repeat } from '@mdjs/mdjs-preview';
|
|
|
29
29
|
import { listboxData, listboxComplexData } from '../listbox/src/listboxData.js';
|
|
30
30
|
import { LionCombobox } from '@lion/ui/combobox.js';
|
|
31
31
|
import { Required } from '@lion/ui/form-core.js';
|
|
32
|
+
import '@lion/ui/define/lion-button.js';
|
|
32
33
|
import '@lion/ui/define/lion-combobox.js';
|
|
33
34
|
import '@lion/ui/define/lion-option.js';
|
|
34
35
|
import './src/demo-selection-display.js';
|
|
@@ -176,6 +177,94 @@ export const customMatchCondition = () => html`
|
|
|
176
177
|
`;
|
|
177
178
|
```
|
|
178
179
|
|
|
180
|
+
## Disabled option
|
|
181
|
+
|
|
182
|
+
```js preview-story
|
|
183
|
+
class DemoDisabledState extends LitElement {
|
|
184
|
+
static get properties() {
|
|
185
|
+
return { disabled: { type: Boolean } };
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
constructor() {
|
|
189
|
+
super();
|
|
190
|
+
/** @type {string[]} */
|
|
191
|
+
this.disabled = true;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
get combobox() {
|
|
195
|
+
return /** @type {LionCombobox} */ (this.shadowRoot?.querySelector('#combobox'));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @param {InputEvent & {target: HTMLInputElement}} e
|
|
200
|
+
*/
|
|
201
|
+
toggleDisabled(e) {
|
|
202
|
+
this.disabled = !this.disabled;
|
|
203
|
+
this.requestUpdate();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
render() {
|
|
207
|
+
return html`
|
|
208
|
+
<lion-button @click=${this.toggleDisabled}>Toggle disabled</lion-button> Disabled state:
|
|
209
|
+
${this.disabled}
|
|
210
|
+
<lion-combobox name="search" label="Search" ?disabled=${this.disabled}>
|
|
211
|
+
${lazyRender(
|
|
212
|
+
listboxData.map(
|
|
213
|
+
entry => html` <lion-option .choiceValue="${entry}">${entry}</lion-option> `,
|
|
214
|
+
),
|
|
215
|
+
)}
|
|
216
|
+
</lion-combobox>
|
|
217
|
+
`;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
customElements.define('demo-disabled-state', DemoDisabledState);
|
|
221
|
+
export const disabledState = () => html`<demo-disabled-state></demo-disabled-state>`;
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Readonly option
|
|
225
|
+
|
|
226
|
+
```js preview-story
|
|
227
|
+
class DemoReadonlyState extends LitElement {
|
|
228
|
+
static get properties() {
|
|
229
|
+
return { readOnly: { type: Boolean } };
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
constructor() {
|
|
233
|
+
super();
|
|
234
|
+
/** @type {string[]} */
|
|
235
|
+
this.readOnly = true;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
get combobox() {
|
|
239
|
+
return /** @type {LionCombobox} */ (this.shadowRoot?.querySelector('#combobox'));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @param {InputEvent & {target: HTMLInputElement}} e
|
|
244
|
+
*/
|
|
245
|
+
toggleReadonly(e) {
|
|
246
|
+
this.readOnly = !this.readOnly;
|
|
247
|
+
this.requestUpdate();
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
render() {
|
|
251
|
+
return html`
|
|
252
|
+
<lion-button @click=${this.toggleReadonly}>Toggle readonly</lion-button> ReadOnly state:
|
|
253
|
+
${this.readOnly}
|
|
254
|
+
<lion-combobox name="search" label="Search" ?readOnly=${this.readOnly}>
|
|
255
|
+
${lazyRender(
|
|
256
|
+
listboxData.map(
|
|
257
|
+
entry => html` <lion-option .choiceValue="${entry}">${entry}</lion-option> `,
|
|
258
|
+
),
|
|
259
|
+
)}
|
|
260
|
+
</lion-combobox>
|
|
261
|
+
`;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
customElements.define('demo-readonly-state', DemoReadonlyState);
|
|
265
|
+
export const readonlyState = () => html`<demo-readonly-state></demo-readonly-state>`;
|
|
266
|
+
```
|
|
267
|
+
|
|
179
268
|
## Options
|
|
180
269
|
|
|
181
270
|
```js preview-story
|
|
@@ -469,4 +558,4 @@ export const complexObjectChoiceValue = () =>
|
|
|
469
558
|
## Listbox compatibility
|
|
470
559
|
|
|
471
560
|
All configurations that can be applied to `lion-listbox`, can be applied to `lion-combobox` as well.
|
|
472
|
-
See the [listbox documentation](https://github.com/ing-bank/lion/blob/
|
|
561
|
+
See the [listbox documentation](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/listbox/overview.md) for more information.
|
|
@@ -66,6 +66,6 @@ import '@lion/ui/define/lion-dialog.js';
|
|
|
66
66
|
## Changing the configuration
|
|
67
67
|
|
|
68
68
|
You can use the `.config` property on the dialog to change the configuration.
|
|
69
|
-
The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/
|
|
69
|
+
The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/overlays/configuration.md).
|
|
70
70
|
|
|
71
71
|
The `config` property uses a setter to merge the passed configuration with the current, so you only **overwrite what you pass** when updating `config`.
|
|
@@ -53,4 +53,12 @@ eleventyNavigation:
|
|
|
53
53
|
| `opened` | opened | LionCollapsible |
|
|
54
54
|
| `position` | position | |
|
|
55
55
|
|
|
56
|
+
### Slots
|
|
57
|
+
|
|
58
|
+
| Name | Description |
|
|
59
|
+
| ---------- | ----------------------------------- |
|
|
60
|
+
| `invoker` | The invoker element for the drawer |
|
|
61
|
+
| `content` | The content element for the drawer |
|
|
62
|
+
| `headline` | The headline element for the drawer |
|
|
63
|
+
|
|
56
64
|
<hr/>
|
|
@@ -27,10 +27,10 @@ eleventyNavigation:
|
|
|
27
27
|
| `formattedValue` | public | | | Object keyed by formElements names, containing formElements' formattedValues | FormGroupMixin |
|
|
28
28
|
| `formElements` | public | `FormControlsCollection` | `new FormControlsCollection()` | Closely mimics the natively supported HTMLFormControlsCollection. It can be accessed
both like an array and an object (based on control/element names). | FormRegistrarMixin |
|
|
29
29
|
| `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this
array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).
Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on
\`.feedbackCondition()\`.

For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can
be useful for subtle visual feedback on keyup, like a red/green border around an input. | ValidateMixin |
|
|
30
|
-
| `helpText` | public | `string` |
|
|
30
|
+
| `helpText` | public | `string` | | The helpt text for the input node.
When no light dom defined via \[slot=help-text], this value will be used | FormControlMixin |
|
|
31
31
|
| `initComplete` | public | `Promise<any>` | `new Promise((resolve, reject) => { this.__resolveInitComplete = resolve; this.__rejectInitComplete = reject; })` | initComplete resolves after all pending initialization logic
(for instance \`\<form-group .serializedValue=${{ child1: 'a', child2: 'b' }}>\`)
is executed | FormRegistrarMixin |
|
|
32
32
|
| `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.
Creates attribute \[is-pending] as a styling hook | ValidateMixin |
|
|
33
|
-
| `label` | public | `string` |
|
|
33
|
+
| `label` | public | `string` | | The label text for the input node.
When no light dom defined via \[slot=label], this value will be used. | FormControlMixin |
|
|
34
34
|
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | FormControlMixin |
|
|
35
35
|
| `modelValue` | public | | | Object keyed by formElements names, containing formElements' modelValues | FormControlMixin |
|
|
36
36
|
| `operationMode` | public | `OperationMode` | | Types of input interaction of the FormControl (for instance 'enter'\|'select'\|'upload') | ValidateMixin |
|
|
@@ -32,9 +32,9 @@ export const main = () => html`
|
|
|
32
32
|
|
|
33
33
|
We have three specific fieldset implementations:
|
|
34
34
|
|
|
35
|
-
- [form](https://github.com/ing-bank/lion/blob/
|
|
36
|
-
- [checkbox-group](https://github.com/ing-bank/lion/blob/
|
|
37
|
-
- [radio-group](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- [form](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/form/overview.md)
|
|
36
|
+
- [checkbox-group](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/checkbox-group/overview.md)
|
|
37
|
+
- [radio-group](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/radio-group/overview.md)
|
|
38
38
|
|
|
39
39
|
A native fieldset element should always have a legend-element for a11y purposes.
|
|
40
40
|
However, our fieldset element is not native and should not have a legend-element.
|
|
@@ -43,8 +43,8 @@ Our fieldset instead has a label attribute or you can add a label with a div- or
|
|
|
43
43
|
## Features
|
|
44
44
|
|
|
45
45
|
- Easy retrieval of form data based on field names
|
|
46
|
-
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
47
|
-
- Can have [validate](https://github.com/ing-bank/lion/blob/
|
|
46
|
+
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/interaction-states.md)
|
|
47
|
+
- Can have [validate](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/validate.md) on fieldset level and shows the validation feedback below the fieldset
|
|
48
48
|
- Can disable input fields on fieldset level
|
|
49
49
|
- Accessible out of the box
|
|
50
50
|
|
|
@@ -20,7 +20,7 @@ import '@lion/ui/define/lion-form.js';
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
A web component that enhances the functionality of the native `form` component.
|
|
23
|
-
It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/overview.md).
|
|
24
24
|
|
|
25
25
|
```js preview-story
|
|
26
26
|
export const main = () => {
|
|
@@ -49,11 +49,11 @@ export const main = () => {
|
|
|
49
49
|
- Data synchronization with models
|
|
50
50
|
- Easy retrieval of form data based on field names
|
|
51
51
|
- Advanced validation possibilities
|
|
52
|
-
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
52
|
+
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/interaction-states.md)
|
|
53
53
|
- Registration mechanism for form controls
|
|
54
54
|
- Accessible out of the box
|
|
55
55
|
|
|
56
|
-
For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/
|
|
56
|
+
For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/overview.md).
|
|
57
57
|
|
|
58
58
|
## Installation
|
|
59
59
|
|
|
@@ -26,7 +26,7 @@ import '@lion/ui/define/lion-form.js';
|
|
|
26
26
|
To submit a form, use a regular `<button>` (or `<lion-button-submit>`) somewhere inside the native `<form>`. Then, add a `submit` handler on the `<lion-form>`. You can use this event to do your own (pre-)submit logic, like getting the serialized form data and sending it to a backend API.
|
|
27
27
|
|
|
28
28
|
Another example is checking if the form has errors, and focusing the first field with a validation error.
|
|
29
|
-
To learn more about form validation, please take a look at [validate](https://github.com/ing-bank/lion/blob/
|
|
29
|
+
To learn more about form validation, please take a look at [validate](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/validate.md).
|
|
30
30
|
|
|
31
31
|
To fire a submit from JavaScript, select the `<lion-form>` element and call `.submit()`.
|
|
32
32
|
|
|
@@ -128,7 +128,7 @@ export const prefilledData = () => {
|
|
|
128
128
|
};
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
Learn more about [formatting and parsing](https://github.com/ing-bank/lion/blob/
|
|
131
|
+
Learn more about [formatting and parsing](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/formatting-and-parsing.md).
|
|
132
132
|
|
|
133
133
|
## Sub forms
|
|
134
134
|
|
|
@@ -38,7 +38,7 @@ icons.addIconResolver('lion', (iconset, name) => {
|
|
|
38
38
|
## Icon sets
|
|
39
39
|
|
|
40
40
|
Icons are displayed using icon sets. These are collections of icons, lazily loaded on demand for performance.
|
|
41
|
-
See the [system documentation](https://github.com/ing-bank/lion/blob/
|
|
41
|
+
See the [system documentation](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/icon/overview.md) to learn more about icon sets.
|
|
42
42
|
|
|
43
43
|
```js preview-story
|
|
44
44
|
export const iconSets = () => html`
|
|
@@ -32,9 +32,9 @@ eleventyNavigation:
|
|
|
32
32
|
| `formatOptions` | public | | `({ mode: 'auto' })` | Configuration object that will be available inside the formatter function | LionField |
|
|
33
33
|
| `formattedValue` | public | `string\|undefined` | `undefined` | The view value is the result of the formatter function (when available).
The result will be stored in the native \_inputNode (usually an input\[type=text]).

Examples:
- For a date input, this would be '20/01/1999' (dependent on locale).
- For a number input, this could be '1,234.56' (a String representation of modelValue
1234.56) | LionField |
|
|
34
34
|
| `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this
array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).
Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on
\`.feedbackCondition()\`.

For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can
be useful for subtle visual feedback on keyup, like a red/green border around an input. | LionField |
|
|
35
|
-
| `helpText` | public | `string` |
|
|
35
|
+
| `helpText` | public | `string` | | The helpt text for the input node.
When no light dom defined via \[slot=help-text], this value will be used | LionField |
|
|
36
36
|
| `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.
Creates attribute \[is-pending] as a styling hook | LionField |
|
|
37
|
-
| `label` | public | `string` |
|
|
37
|
+
| `label` | public | `string` | | The label text for the input node.
When no light dom defined via \[slot=label], this value will be used. | LionField |
|
|
38
38
|
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | LionField |
|
|
39
39
|
| `modelValue` | public | | | | LionField |
|
|
40
40
|
| `name` | public | `string` | `''` | The name the element will be registered with to the .formElements collection
of the parent. Also, it serves as the key of key/value pairs in
 modelValue/serializedValue objects | LionField |
|
|
@@ -35,7 +35,7 @@ export const main = () => html`<lion-input label="First Name"></lion-input>`;
|
|
|
35
35
|
- **before**: does not have an active use case yet, but the option is in place.
|
|
36
36
|
- **after**: can be used to show a currency or percentage.
|
|
37
37
|
- Delegates attributes like `type`, `disabled`, `placeholder` and `readonly` to the native input.
|
|
38
|
-
- Can make use of [validation](https://github.com/ing-bank/lion/blob/
|
|
38
|
+
- Can make use of [validation](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/validate.md).
|
|
39
39
|
|
|
40
40
|
## Installation
|
|
41
41
|
|
|
@@ -34,9 +34,9 @@ eleventyNavigation:
|
|
|
34
34
|
| `formattedValue` | public | `string\|undefined` | `undefined` | The view value is the result of the formatter function (when available).
The result will be stored in the native \_inputNode (usually an input\[type=text]).

Examples:
- For a date input, this would be '20/01/1999' (dependent on locale).
- For a number input, this could be '1,234.56' (a String representation of modelValue
1234.56) | LionField |
|
|
35
35
|
| `formatter` | public | | `formatAmount` | Converts modelValue to formattedValue (formattedValue will be synced with
\`.\_inputNode.value\`)
For instance, a Date object to a localized date. | LionField |
|
|
36
36
|
| `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this
array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).
Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on
\`.feedbackCondition()\`.

For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can
be useful for subtle visual feedback on keyup, like a red/green border around an input. | LionField |
|
|
37
|
-
| `helpText` | public | `string` |
|
|
37
|
+
| `helpText` | public | `string` | | The helpt text for the input node.
When no light dom defined via \[slot=help-text], this value will be used | LionField |
|
|
38
38
|
| `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.
Creates attribute \[is-pending] as a styling hook | LionField |
|
|
39
|
-
| `label` | public | `string` |
|
|
39
|
+
| `label` | public | `string` | | The label text for the input node.
When no light dom defined via \[slot=label], this value will be used. | LionField |
|
|
40
40
|
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | LionField |
|
|
41
41
|
| `locale` | public | `string \| undefined` | `undefined` | | |
|
|
42
42
|
| `modelValue` | public | | | | LionField |
|
|
@@ -36,13 +36,13 @@ export const main = () => {
|
|
|
36
36
|
|
|
37
37
|
## Features
|
|
38
38
|
|
|
39
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
40
|
-
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/
|
|
39
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/input/overview.md)
|
|
40
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
41
41
|
- Option to show currency as a suffix
|
|
42
42
|
- Option to override locale to change the formatting and parsing
|
|
43
43
|
- Option to provide additional format options overrides
|
|
44
44
|
- Default label in different languages
|
|
45
|
-
- Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/
|
|
45
|
+
- Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
46
46
|
- IsNumber (default)
|
|
47
47
|
- MinNumber
|
|
48
48
|
- MaxNumber
|
|
@@ -33,9 +33,9 @@ eleventyNavigation:
|
|
|
33
33
|
| `formattedValue` | public | `string\|undefined` | `undefined` | The view value is the result of the formatter function (when available).
The result will be stored in the native \_inputNode (usually an input\[type=text]).

Examples:
- For a date input, this would be '20/01/1999' (dependent on locale).
- For a number input, this could be '1,234.56' (a String representation of modelValue
1234.56) | LionField |
|
|
34
34
|
| `formatter` | public | | `formatDate` | Converts modelValue to formattedValue (formattedValue will be synced with
\`.\_inputNode.value\`)
For instance, a Date object to a localized date. | LionField |
|
|
35
35
|
| `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this
array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).
Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on
\`.feedbackCondition()\`.

For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can
be useful for subtle visual feedback on keyup, like a red/green border around an input. | LionField |
|
|
36
|
-
| `helpText` | public | `string` |
|
|
36
|
+
| `helpText` | public | `string` | | The helpt text for the input node.
When no light dom defined via \[slot=help-text], this value will be used | LionField |
|
|
37
37
|
| `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.
Creates attribute \[is-pending] as a styling hook | LionField |
|
|
38
|
-
| `label` | public | `string` |
|
|
38
|
+
| `label` | public | `string` | | The label text for the input node.
When no light dom defined via \[slot=label], this value will be used. | LionField |
|
|
39
39
|
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | LionField |
|
|
40
40
|
| `modelValue` | public | | | | LionField |
|
|
41
41
|
| `name` | public | `string` | `''` | The name the element will be registered with to the .formElements collection
of the parent. Also, it serves as the key of key/value pairs in
 modelValue/serializedValue objects | LionField |
|
|
@@ -28,11 +28,11 @@ import '@lion/ui/define/lion-input-date.js';
|
|
|
28
28
|
|
|
29
29
|
## Features
|
|
30
30
|
|
|
31
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
32
|
-
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/
|
|
31
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/components/input/overview.md)
|
|
32
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
|
|
33
33
|
- Option to override locale to change the formatting and parsing
|
|
34
34
|
- Default label in different languages
|
|
35
|
-
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/5f1d7166273cc724458c0239822cd454e16253fa/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
36
36
|
- IsDate (default)
|
|
37
37
|
- MinDate
|
|
38
38
|
- MaxDate
|