@lion/ui 0.11.4 → 0.11.5
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/calendar/src/LionCalendar.js +3 -0
- package/components/calendar/translations/tr.js +11 -0
- package/components/form-core/src/localizeNamespaceLoader.js +4 -0
- package/components/form-core/src/validate/ValidateMixin.js +6 -6
- package/components/form-core/test-suites/ValidateMixin.suite.js +116 -1
- package/components/form-core/translations/tr-TR.js +5 -0
- package/components/form-core/translations/tr.js +6 -0
- package/components/input-datepicker/src/localizeNamespaceLoader.js +7 -1
- package/components/input-datepicker/translations/tr-TR.js +5 -0
- package/components/input-datepicker/translations/tr.js +3 -0
- package/components/input-file/src/LionInputFile.js +39 -11
- package/components/input-file/src/LionSelectedFileList.js +0 -1
- package/components/input-file/test/lion-input-file.test.js +98 -4
- package/components/input-file/translations/bg.js +1 -1
- package/components/input-file/translations/cs.js +1 -1
- package/components/input-file/translations/de.js +6 -1
- package/components/input-file/translations/en.js +6 -2
- package/components/input-file/translations/es.js +1 -1
- package/components/input-file/translations/fr.js +1 -1
- package/components/input-file/translations/hu.js +1 -1
- package/components/input-file/translations/it.js +1 -1
- package/components/input-file/translations/nl.js +6 -1
- package/components/input-file/translations/pl.js +1 -1
- package/components/input-file/translations/ro.js +1 -1
- package/components/input-file/translations/ru.js +7 -3
- package/components/input-file/translations/sk.js +1 -1
- package/components/input-file/translations/uk.js +1 -1
- package/components/input-file/translations/zh.js +1 -1
- package/components/input-stepper/src/LionInputStepper.js +19 -3
- package/components/input-stepper/test/lion-input-stepper.test.js +94 -0
- package/components/overlays/translations/tr-TR.js +5 -0
- package/components/overlays/translations/tr.js +4 -0
- package/components/pagination/src/LionPagination.js +2 -0
- package/components/pagination/translations/tr.js +6 -0
- package/components/validate-messages/src/getLocalizedMessage.js +4 -0
- package/components/validate-messages/translations/tr-TR.js +13 -0
- package/components/validate-messages/translations/tr.js +56 -0
- package/custom-elements.json +49 -38
- package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
- package/dist-types/components/calendar/translations/tr.d.ts +11 -0
- package/dist-types/components/calendar/translations/tr.d.ts.map +1 -0
- package/dist-types/components/form-core/src/localizeNamespaceLoader.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/translations/tr-TR.d.ts +8 -0
- package/dist-types/components/form-core/translations/tr-TR.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/tr.d.ts +8 -0
- package/dist-types/components/form-core/translations/tr.d.ts.map +1 -0
- package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/translations/tr-TR.d.ts +5 -0
- package/dist-types/components/input-datepicker/translations/tr-TR.d.ts.map +1 -0
- package/dist-types/components/input-datepicker/translations/tr.d.ts +5 -0
- package/dist-types/components/input-datepicker/translations/tr.d.ts.map +1 -0
- package/dist-types/components/input-file/src/LionInputFile.d.ts +1 -0
- package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -1
- package/dist-types/components/input-file/src/LionSelectedFileList.d.ts.map +1 -1
- package/dist-types/components/input-file/src/localizeNamespaceLoader.d.ts +1 -1
- package/dist-types/components/input-file/src/localizeNamespaceLoader.d.ts.map +1 -1
- package/dist-types/components/input-file/test/lion-input-file.test.d.ts.map +1 -1
- package/dist-types/components/input-file/translations/de-DE.d.ts +5 -0
- package/dist-types/components/input-file/translations/de.d.ts +5 -0
- package/dist-types/components/input-file/translations/en-AU.d.ts +5 -1
- package/dist-types/components/input-file/translations/en-GB.d.ts +5 -1
- package/dist-types/components/input-file/translations/en-PH.d.ts +5 -1
- package/dist-types/components/input-file/translations/en-US.d.ts +5 -1
- package/dist-types/components/input-file/translations/en.d.ts +5 -1
- package/dist-types/components/input-file/translations/nl-BE.d.ts +5 -0
- package/dist-types/components/input-file/translations/nl-NL.d.ts +5 -0
- package/dist-types/components/input-file/translations/nl.d.ts +5 -0
- package/dist-types/components/input-file/translations/ru-RU.d.ts +5 -1
- package/dist-types/components/input-file/translations/ru.d.ts +5 -1
- package/dist-types/components/input-stepper/src/LionInputStepper.d.ts.map +1 -1
- package/dist-types/components/overlays/translations/tr-TR.d.ts +6 -0
- package/dist-types/components/overlays/translations/tr-TR.d.ts.map +1 -0
- package/dist-types/components/overlays/translations/tr.d.ts +6 -0
- package/dist-types/components/overlays/translations/tr.d.ts.map +1 -0
- package/dist-types/components/pagination/src/LionPagination.d.ts.map +1 -1
- package/dist-types/components/pagination/translations/tr.d.ts +8 -0
- package/dist-types/components/pagination/translations/tr.d.ts.map +1 -0
- package/dist-types/components/validate-messages/src/getLocalizedMessage.d.ts.map +1 -1
- package/dist-types/components/validate-messages/translations/tr-TR.d.ts +55 -0
- package/dist-types/components/validate-messages/translations/tr-TR.d.ts.map +1 -0
- package/dist-types/components/validate-messages/translations/tr.d.ts +73 -0
- package/dist-types/components/validate-messages/translations/tr.d.ts.map +1 -0
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/api-table.md +3 -3
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/api-table.md +1 -1
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/fieldset/api-table.md +1 -1
- 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 +1 -1
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input-amount/api-table.md +1 -1
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/api-table.md +1 -1
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/api-table.md +1 -1
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/api-table.md +1 -1
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/api-table.md +3 -2
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/api-table.md +1 -1
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/api-table.md +1 -1
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/api-table.md +1 -1
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-stepper/use-cases.md +16 -0
- package/docs/components/input-tel/api-table.md +1 -1
- 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 +1 -1
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/listbox/api-table.md +1 -1
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/radio-group/api-table.md +2 -2
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/api-table.md +1 -1
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/api-table.md +1 -1
- package/docs/components/select-rich/use-cases.md +1 -1
- package/docs/components/switch/api-table.md +1 -1
- package/docs/components/tabs/examples.md +1 -1
- package/docs/components/textarea/api-table.md +1 -1
- 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 +1 -1
- 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/validate.md +2 -2
- 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 +1 -1
|
@@ -54,7 +54,7 @@ eleventyNavigation:
|
|
|
54
54
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | ValidateMixin |
|
|
55
55
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | ValidateMixin |
|
|
56
56
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\` | FormatMixin |
|
|
57
|
-
| `_allValidators` | protected | `Validator[]`
|
|
57
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | ValidateMixin |
|
|
58
58
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | FormControlMixin |
|
|
59
59
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | FormControlMixin |
|
|
60
60
|
| `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | LionField |
|
|
@@ -227,7 +227,7 @@ eleventyNavigation:
|
|
|
227
227
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | ValidateMixin |
|
|
228
228
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | ValidateMixin |
|
|
229
229
|
| `value` | public | `string` | `''` | | FormGroupMixin |
|
|
230
|
-
| `_allValidators` | protected | `Validator[]`
|
|
230
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | ValidateMixin |
|
|
231
231
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | FormControlMixin |
|
|
232
232
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | FormControlMixin |
|
|
233
233
|
| `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | ValidateMixin |
|
|
@@ -399,7 +399,7 @@ eleventyNavigation:
|
|
|
399
399
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | ValidateMixin |
|
|
400
400
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | ValidateMixin |
|
|
401
401
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\` | FormatMixin |
|
|
402
|
-
| `_allValidators` | protected | `Validator[]`
|
|
402
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | ValidateMixin |
|
|
403
403
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | FormControlMixin |
|
|
404
404
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | FormControlMixin |
|
|
405
405
|
| `_checkboxGroupNode` | protected | | | | |
|
|
@@ -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/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/fieldset/overview.md),
|
|
39
39
|
it has all the features a fieldset has.
|
|
40
40
|
|
|
41
41
|
## Installation
|
|
@@ -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/af6e47e4b585228632c5444fdd525c92c8ffb770/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
|
|
|
@@ -63,7 +63,7 @@ eleventyNavigation:
|
|
|
63
63
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | ValidateMixin |
|
|
64
64
|
| `value` | public | | | We define the value getter/setter below as also defined in LionField (via FormatMixin).
Since FormatMixin is meant for Formgroups/ChoiceGroup it's not applied on Combobox;
Combobox is somewhat of a hybrid between a ChoiceGroup and LionField, therefore we copy over
some of the LionField members to align with its interface.

The view value. Will be delegated to \`.\_inputNode.value\` | |
|
|
65
65
|
| `_activeDescendantOwnerNode` | protected | `HTMLElement` | | | ListboxMixin |
|
|
66
|
-
| `_allValidators` | protected | `Validator[]`
|
|
66
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | ValidateMixin |
|
|
67
67
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | FormControlMixin |
|
|
68
68
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | FormControlMixin |
|
|
69
69
|
| `_ariaVersion` | protected | `'1.1'\|'1.0'` | | For optimal support, we allow aria v1.1 on newer browsers | |
|
|
@@ -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/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/combobox/extensions.md)
|
|
50
50
|
|
|
51
51
|
## Features
|
|
52
52
|
|
|
@@ -469,4 +469,4 @@ export const complexObjectChoiceValue = () =>
|
|
|
469
469
|
## Listbox compatibility
|
|
470
470
|
|
|
471
471
|
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/
|
|
472
|
+
See the [listbox documentation](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/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`.
|
|
@@ -44,7 +44,7 @@ eleventyNavigation:
|
|
|
44
44
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | ValidateMixin |
|
|
45
45
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | ValidateMixin |
|
|
46
46
|
| `value` | public | `string` | `''` | | FormGroupMixin |
|
|
47
|
-
| `_allValidators` | protected | `Validator[]`
|
|
47
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | ValidateMixin |
|
|
48
48
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | FormControlMixin |
|
|
49
49
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | FormControlMixin |
|
|
50
50
|
| `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | 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/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/form/overview.md)
|
|
36
|
+
- [checkbox-group](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/checkbox-group/overview.md)
|
|
37
|
+
- [radio-group](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/fundamentals/systems/form/interaction-states.md)
|
|
47
|
+
- Can have [validate](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/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`
|
|
@@ -53,7 +53,7 @@ eleventyNavigation:
|
|
|
53
53
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | LionField |
|
|
54
54
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | LionField |
|
|
55
55
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`

Note: Overrides the implementation from FormatMixin | LionField |
|
|
56
|
-
| `_allValidators` | protected | `Validator[]`
|
|
56
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
|
|
57
57
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
|
|
58
58
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
|
|
59
59
|
| `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | 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/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/fundamentals/systems/form/validate.md).
|
|
39
39
|
|
|
40
40
|
## Installation
|
|
41
41
|
|
|
@@ -57,7 +57,7 @@ eleventyNavigation:
|
|
|
57
57
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | LionField |
|
|
58
58
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | LionField |
|
|
59
59
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`

Note: Overrides the implementation from FormatMixin | LionField |
|
|
60
|
-
| `_allValidators` | protected | `Validator[]`
|
|
60
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
|
|
61
61
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
|
|
62
62
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
|
|
63
63
|
| `_currencyDisplayNodeSlot` | protected | `string` | `'after'` | The slot to put the currency display node in. Can be 'prefix', 'suffix', 'before' and 'after'.
Default will be 'after'. | |
|
|
@@ -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/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/input/overview.md)
|
|
40
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
46
46
|
- IsNumber (default)
|
|
47
47
|
- MinNumber
|
|
48
48
|
- MaxNumber
|
|
@@ -55,7 +55,7 @@ eleventyNavigation:
|
|
|
55
55
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | LionField |
|
|
56
56
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | LionField |
|
|
57
57
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`

Note: Overrides the implementation from FormatMixin | LionField |
|
|
58
|
-
| `_allValidators` | protected | `Validator[]`
|
|
58
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
|
|
59
59
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
|
|
60
60
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
|
|
61
61
|
| `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | 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/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/input/overview.md)
|
|
32
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/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/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
36
36
|
- IsDate (default)
|
|
37
37
|
- MinDate
|
|
38
38
|
- MaxDate
|
|
@@ -59,7 +59,7 @@ eleventyNavigation:
|
|
|
59
59
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | LionField |
|
|
60
60
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | LionField |
|
|
61
61
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`

Note: Overrides the implementation from FormatMixin | LionField |
|
|
62
|
-
| `_allValidators` | protected | `Validator[]`
|
|
62
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
|
|
63
63
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
|
|
64
64
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
|
|
65
65
|
| `_arrowNode` | protected | | | | ArrowMixin |
|
|
@@ -14,7 +14,7 @@ eleventyNavigation:
|
|
|
14
14
|
|
|
15
15
|
A web component based on the date text input field. Its purpose is to provide a way for users to fill in a date with a datepicker.
|
|
16
16
|
For an input field with a big range, such as `birthday-input`, a datepicker is not the best choice due to the high variance between possible inputs.
|
|
17
|
-
We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/
|
|
17
|
+
We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/input-date/overview.md) for this.
|
|
18
18
|
|
|
19
19
|
```js script
|
|
20
20
|
import { html } from '@mdjs/mdjs-preview';
|
|
@@ -30,11 +30,11 @@ export const main = () => {
|
|
|
30
30
|
## Features
|
|
31
31
|
|
|
32
32
|
- Input field with a datepicker to help to choose a date
|
|
33
|
-
- Based on our [input-date](https://github.com/ing-bank/lion/blob/
|
|
34
|
-
- Makes use of our [calendar](https://github.com/ing-bank/lion/blob/
|
|
35
|
-
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/
|
|
33
|
+
- Based on our [input-date](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/input-date/overview.md)
|
|
34
|
+
- Makes use of our [calendar](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/calendar/overview.md) inside the datepicker
|
|
35
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
|
|
36
36
|
- Option to overwrite locale to change the formatting and parsing
|
|
37
|
-
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/
|
|
37
|
+
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
38
38
|
- IsDate (default)
|
|
39
39
|
- MinDate
|
|
40
40
|
- MaxDate
|
|
@@ -53,7 +53,7 @@ eleventyNavigation:
|
|
|
53
53
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | LionField |
|
|
54
54
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | LionField |
|
|
55
55
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`

Note: Overrides the implementation from FormatMixin | LionField |
|
|
56
|
-
| `_allValidators` | protected | `Validator[]`
|
|
56
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
|
|
57
57
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
|
|
58
58
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
|
|
59
59
|
| `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | LionField |
|
|
@@ -27,8 +27,8 @@ export const main = () => {
|
|
|
27
27
|
|
|
28
28
|
## Features
|
|
29
29
|
|
|
30
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
31
|
-
- Makes use of email [validators](https://github.com/ing-bank/lion/blob/
|
|
30
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/input/overview.md)
|
|
31
|
+
- Makes use of email [validators](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
32
32
|
- IsEmail (default)
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
@@ -42,7 +42,7 @@ eleventyNavigation:
|
|
|
42
42
|
| `accept` | public | `string` | `''` | | |
|
|
43
43
|
| `allowCrossRootRegistration` | public | `boolean` | `false` | To encourage accessibility best practices, \`form-element-register\` events
do not pierce through shadow roots. This forces the developer to create form groups and fieldsets that automatically allow the creation of accessible relationships in the same dom tree.
Use this option if you know what you're doing. It will then be possible to nest FormControls
inside shadow dom. See https\://lion.js.org/fundamentals/rationales/accessibility/#shadow-roots-and-accessibility | LionField |
|
|
44
44
|
| `autofocus` | public | `boolean` | `false` | | LionField |
|
|
45
|
-
| `buttonLabel` | public | `string` |
|
|
45
|
+
| `buttonLabel` | public | `string` | `''` | The label of the button | |
|
|
46
46
|
| `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.
A date input for instance, always needs the isDate validator. | LionField |
|
|
47
47
|
| `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | LionField |
|
|
48
48
|
| `disabled` | public | `boolean` | `false` | | LionField |
|
|
@@ -79,7 +79,7 @@ eleventyNavigation:
|
|
|
79
79
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | LionField |
|
|
80
80
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\` | LionField |
|
|
81
81
|
| `_acceptCriteria` | protected | | | | |
|
|
82
|
-
| `_allValidators` | protected | `Validator[]`
|
|
82
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
|
|
83
83
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
|
|
84
84
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
|
|
85
85
|
| `_buttonNode` | protected | | | | |
|
|
@@ -88,6 +88,7 @@ eleventyNavigation:
|
|
|
88
88
|
| `_fileListNode` | protected | `LionSelectedFileList` | | | |
|
|
89
89
|
| `_focusableNode` | protected | `HTMLElement` | | The focusable element:
could be an input, textarea, select, button or any other element with tabindex > -1 | LionField |
|
|
90
90
|
| `_helpTextNode` | protected | | | Element where help text will be rendered to | LionField |
|
|
91
|
+
| `_initialButtonLabel` | protected | `string` | `''` | | |
|
|
91
92
|
| `_inputId` | protected | `string` | | Unique id that can be used in all light dom | LionField |
|
|
92
93
|
| `_inputNode` | protected | `HTMLInputElement` | | The interactive (form) element. Can be a native element like input/textarea/select or
an element with tabindex > -1 | LionField |
|
|
93
94
|
| `_isDragAndDropSupported` | protected | | | | |
|
|
@@ -27,7 +27,7 @@ export const main = () => {
|
|
|
27
27
|
|
|
28
28
|
## Features
|
|
29
29
|
|
|
30
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
30
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/input/overview.md)
|
|
31
31
|
- Default labels and validation messages in different languages
|
|
32
32
|
- Options for multi file upload and drop-zone.
|
|
33
33
|
|
|
@@ -55,7 +55,7 @@ eleventyNavigation:
|
|
|
55
55
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | LionField |
|
|
56
56
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | LionField |
|
|
57
57
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`

Note: Overrides the implementation from FormatMixin | LionField |
|
|
58
|
-
| `_allValidators` | protected | `Validator[]`
|
|
58
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
|
|
59
59
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
|
|
60
60
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
|
|
61
61
|
| `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | LionField |
|
|
@@ -28,9 +28,9 @@ export const main = () => {
|
|
|
28
28
|
|
|
29
29
|
## Features
|
|
30
30
|
|
|
31
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
31
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/input/overview.md)
|
|
32
32
|
- Default label in different languages
|
|
33
|
-
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/
|
|
33
|
+
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
34
34
|
- IsIBAN (default)
|
|
35
35
|
- IsCountryIBAN
|
|
36
36
|
- Parses IBANs automatically
|
|
@@ -60,7 +60,7 @@ eleventyNavigation:
|
|
|
60
60
|
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | LionField |
|
|
61
61
|
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | LionField |
|
|
62
62
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`

Note: Overrides the implementation from FormatMixin | LionField |
|
|
63
|
-
| `_allValidators` | protected | `Validator[]`
|
|
63
|
+
| `_allValidators` | protected | `(Validator \| MetaValidator)[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
|
|
64
64
|
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
|
|
65
65
|
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
|
|
66
66
|
| `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | LionField |
|
|
@@ -25,11 +25,11 @@ import '@lion/ui/define/lion-input-range.js';
|
|
|
25
25
|
|
|
26
26
|
## Features
|
|
27
27
|
|
|
28
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
28
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/components/input/overview.md).
|
|
29
29
|
- Shows `modelValue` and `unit` above the range input.
|
|
30
30
|
- Shows `min` and `max` value after the range input.
|
|
31
31
|
- Can hide the `min` and `max` value via `no-min-max-labels`.
|
|
32
|
-
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/
|
|
32
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/af6e47e4b585228632c5444fdd525c92c8ffb770/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|