@lion/ui 0.4.1 → 0.5.0
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 +5 -3
- package/components/calendar/test-helpers/DayObject.js +2 -2
- package/components/combobox/src/LionCombobox.js +82 -29
- package/components/combobox/test/lion-combobox-integrations.test.js +5 -0
- package/components/combobox/test/lion-combobox.test.js +318 -23
- package/components/combobox/test-helpers/combobox-helpers.js +19 -22
- package/components/drawer/src/LionDrawer.js +1 -0
- package/components/form-core/src/FocusMixin.js +2 -0
- package/components/form-core/src/FormControlMixin.js +1 -1
- package/components/form-core/src/choice-group/ChoiceGroupMixin.js +1 -0
- package/components/form-core/src/choice-group/CustomChoiceGroupMixin.js +173 -0
- package/components/form-core/src/utils/getAriaElementsInRightDomOrder.js +7 -14
- package/components/form-core/src/validate/validators/Required.js +2 -2
- package/components/form-core/test/choice-group/CustomChoiceGroupMixin.integrations.test.js +55 -0
- package/components/form-core/test/choice-group/CustomChoiceGroupMixin.test.js +16 -0
- package/components/form-core/test/utils/getAriaElementsInRightDomOrder.test.js +0 -25
- package/components/form-core/test/validate/StringValidators.test.js +1 -1
- package/components/form-core/test-helpers/ExampleValidators.js +1 -3
- package/components/form-core/test-suites/FormRegistrationMixins.suite.js +2 -0
- package/components/form-core/test-suites/NativeTextFieldMixin.suite.js +4 -4
- package/components/form-core/test-suites/ValidateMixin.suite.js +27 -0
- package/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.js +11 -2
- package/components/form-core/test-suites/choice-group/ChoiceGroupMixin.suite.js +1 -0
- package/components/form-core/test-suites/choice-group/CustomChoiceGroupMixin.suite.js +265 -0
- package/components/form-core/types/choice-group/ChoiceGroupMixinTypes.ts +1 -1
- package/components/form-core/types/choice-group/CustomChoiceGroupMixinTypes.ts +30 -0
- package/components/form-core/types/choice-group/index.ts +1 -0
- package/components/helpers/src/SbActionLogger.js +1 -0
- package/components/icon/src/LionIcon.js +1 -9
- package/components/icon/test/lion-icon.test.js +2 -0
- package/components/input-amount/src/LionInputAmount.js +5 -2
- package/components/input-amount/test/lion-input-amount.test.js +21 -0
- package/components/input-range/test/lion-input-range.test.js +12 -6
- package/components/listbox/src/LionOptions.js +5 -5
- package/components/listbox/src/ListboxMixin.js +1 -16
- package/components/listbox/test/lion-options.test.js +1 -1
- package/components/listbox/test-suites/ListboxMixin.suite.js +1 -1
- package/components/localize/src/date/getMonthNames.js +3 -0
- package/components/localize/src/date/utils/forceDotsForNlnl.js +11 -0
- package/components/localize/src/number/utils/normalize-format-number-to-parts/forceAddGroupSeparators.js +3 -1
- package/components/localize/src/number/utils/normalize-format-number-to-parts/forceSymbols.js +2 -0
- package/components/localize/src/number/utils/normalize-format-number-to-parts/normalizeIntl.js +1 -0
- package/components/localize/test/date/getMonthNames.test.js +1 -0
- package/components/localize/test-helpers/fake-imports.js +1 -0
- package/components/overlays/src/utils/adopt-styles.js +1 -1
- package/components/radio-group/src/LionRadioGroup.js +1 -1
- package/components/radio-group/test/lion-radio-group.test.js +29 -0
- package/components/select/test/lion-select.test.js +1 -1
- package/components/switch/src/LionSwitchButton.js +1 -5
- package/components/tabs/src/LionTabs.js +7 -7
- package/components/textarea/src/LionTextarea.js +1 -1
- package/custom-elements.json +103314 -61972
- package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
- package/dist-types/components/combobox/src/LionCombobox.d.ts +13 -8
- package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
- package/dist-types/components/combobox/test-helpers/combobox-helpers.d.ts.map +1 -1
- package/dist-types/components/drawer/src/LionDrawer.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/choice-group/ChoiceGroupMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/choice-group/CustomChoiceGroupMixin.d.ts +4 -0
- package/dist-types/components/form-core/src/choice-group/CustomChoiceGroupMixin.d.ts.map +1 -0
- package/dist-types/components/form-core/src/utils/getAriaElementsInRightDomOrder.d.ts +5 -5
- package/dist-types/components/form-core/src/utils/getAriaElementsInRightDomOrder.d.ts.map +1 -1
- package/dist-types/components/form-core/test/choice-group/CustomChoiceGroupMixin.integrations.test.d.ts +2 -0
- package/dist-types/components/form-core/test/choice-group/CustomChoiceGroupMixin.integrations.test.d.ts.map +1 -0
- package/dist-types/components/form-core/test/choice-group/CustomChoiceGroupMixin.test.d.ts +6 -0
- package/dist-types/components/form-core/test/choice-group/CustomChoiceGroupMixin.test.d.ts.map +1 -0
- package/dist-types/components/form-core/test-helpers/ExampleValidators.d.ts +0 -1
- package/dist-types/components/form-core/test-helpers/ExampleValidators.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/FormRegistrationMixins.suite.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/test-suites/choice-group/ChoiceGroupMixin.suite.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/choice-group/CustomChoiceGroupMixin.suite.d.ts +14 -0
- package/dist-types/components/form-core/test-suites/choice-group/CustomChoiceGroupMixin.suite.d.ts.map +1 -0
- package/dist-types/components/form-core/types/choice-group/ChoiceGroupMixinTypes.d.ts +1 -1
- package/dist-types/components/form-core/types/choice-group/ChoiceGroupMixinTypes.d.ts.map +1 -1
- package/dist-types/components/form-core/types/choice-group/CustomChoiceGroupMixinTypes.d.ts +18 -0
- package/dist-types/components/form-core/types/choice-group/CustomChoiceGroupMixinTypes.d.ts.map +1 -0
- package/dist-types/components/form-core/types/choice-group/index.d.ts +1 -0
- package/dist-types/components/form-core/types/choice-group/index.d.ts.map +1 -1
- package/dist-types/components/helpers/src/SbActionLogger.d.ts.map +1 -1
- package/dist-types/components/icon/src/LionIcon.d.ts +0 -9
- package/dist-types/components/icon/src/LionIcon.d.ts.map +1 -1
- package/dist-types/components/input-amount/src/LionInputAmount.d.ts +2 -2
- package/dist-types/components/input-amount/src/LionInputAmount.d.ts.map +1 -1
- package/dist-types/components/listbox/src/LionOptions.d.ts +0 -5
- package/dist-types/components/listbox/src/LionOptions.d.ts.map +1 -1
- package/dist-types/components/listbox/src/ListboxMixin.d.ts.map +1 -1
- package/dist-types/components/localize/src/date/getMonthNames.d.ts.map +1 -1
- package/dist-types/components/localize/src/date/utils/forceDotsForNlnl.d.ts +5 -0
- package/dist-types/components/localize/src/date/utils/forceDotsForNlnl.d.ts.map +1 -0
- package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceAddGroupSeparators.d.ts.map +1 -1
- package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceSymbols.d.ts.map +1 -1
- package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/normalizeIntl.d.ts.map +1 -1
- package/dist-types/components/localize/test-helpers/fake-imports.d.ts.map +1 -1
- package/dist-types/components/switch/src/LionSwitchButton.d.ts +0 -5
- package/dist-types/components/switch/src/LionSwitchButton.d.ts.map +1 -1
- package/dist-types/components/tabs/src/LionTabs.d.ts.map +1 -1
- package/dist-types/exports/types/form-core.d.ts +1 -1
- package/dist-types/exports/types/form-core.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/assets/CustomCollapsible.js +4 -0
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/src/demo-selection-display.js +8 -35
- package/docs/components/combobox/use-cases.md +24 -1
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/fieldset/overview.md +5 -5
- package/docs/components/form/overview.md +3 -3
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/overview.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/overview.md +1 -1
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select-rich/use-cases.md +1 -1
- package/docs/components/steps/overview.md +2 -4
- package/docs/components/tabs/examples.md +1 -1
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
- 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 +3 -3
- package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
- package/docs/fundamentals/systems/core/overview.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 +18 -2
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/configuration.md +3 -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/example-complex/overlayCompatibility.js +1 -2
- 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/exports/types/form-core.ts +5 -1
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ For a Mono Repository
|
|
|
31
31
|
```md
|
|
32
32
|
# My Pkg
|
|
33
33
|
|
|
34
|
-
[=> See Source <=](https://github.com/ing-bank/lion/blob/
|
|
34
|
+
[=> See Source <=](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/docs/deep/dir/overview.md)
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
## CLI flags
|
|
@@ -61,7 +61,7 @@ Bring the `overview.md` in a docs folder along.
|
|
|
61
61
|
👉 `packages/[my-package]/docs/overview.md`
|
|
62
62
|
|
|
63
63
|
```md
|
|
64
|
-
[=> See Source <=](https://github.com/ing-bank/lion/blob/
|
|
64
|
+
[=> See Source <=](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/docs/deep/dir/overview.md)
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
Add a `use-cases.md`
|
|
@@ -69,7 +69,7 @@ Add a `use-cases.md`
|
|
|
69
69
|
👉 `packages/[my-package]/docs/use-cases.md`
|
|
70
70
|
|
|
71
71
|
```md
|
|
72
|
-
[=> See Source <=](https://github.com/ing-bank/lion/blob/
|
|
72
|
+
[=> See Source <=](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/docs/deep/dir/use-cases.md)
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
So you will end up with something like this in your package.
|
|
@@ -7,7 +7,7 @@ To do this automatically you can use this preset for [rocket](https://rocket.mod
|
|
|
7
7
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
|
-
- Import lion documentation and adjust it using [remark-extend](https://github.com/ing-bank/lion/blob/
|
|
10
|
+
- Import lion documentation and adjust it using [remark-extend](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/node-tools/remark-extend/overview.md)
|
|
11
11
|
- Renames named imports and all it's usage
|
|
12
12
|
- Adjusts import paths
|
|
13
13
|
- Replace tags in template literals
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
|
|
39
39
|
## Reusing documentation
|
|
40
40
|
|
|
41
|
-
To take an existing documentation you can "import" it using [remark-extend](https://github.com/ing-bank/lion/blob/
|
|
41
|
+
To take an existing documentation you can "import" it using [remark-extend](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/node-tools/remark-extend/overview.md).
|
|
42
42
|
|
|
43
43
|
As an example you can create `docs/components/tabs/overview.md`.
|
|
44
44
|
|
|
@@ -10,8 +10,8 @@ More on this topic can be found in the online panel discussion [Web Components,
|
|
|
10
10
|
|
|
11
11
|
## Shadow roots and accessibility
|
|
12
12
|
|
|
13
|
-
Since our components and applications consist of multiple shadow roots that need to be able to reference each other,
|
|
14
|
-
A practical example: all form
|
|
13
|
+
Since our components and applications consist of multiple shadow roots that need to be able to reference each other, architecting accessible components takes extra strategy and planning.
|
|
14
|
+
A practical example: all form controls inside a fieldset need to be able to lay accessible id relations to their parent (the fieldset). In other words, id relations should be cross component (which usually means cross shadow root). Scenarios like these require consistent architecture, allowing all form components to be interoperable. In general, light dom needs to be leveraged until a solution for cross root aria is available. For a deeper understanding of the topic, be sure to view these [slides about cross root aria](https://github.com/home/runner/work/lion/lion/_merged_assets/_static/crossRootAriaLion.pdf).
|
|
15
15
|
|
|
16
16
|
## Some details about the form system
|
|
17
17
|
|
|
@@ -25,4 +25,4 @@ Internally, we delegate all intricacies involved in managing light dom to SlotMi
|
|
|
25
25
|
SlotMixin automatically mediates between light dom provided by the user ('public slots') and light dom provided by the component author ('private slots').
|
|
26
26
|
Also, SlotMixin allows to hook into the reactive update loop of LitElement (automatically rerendering on property changes) and it automatically respects
|
|
27
27
|
the scoped registry belonging to the shadow root.
|
|
28
|
-
More details about SlotMixin can be found in the [SlotMixin documentation](https://github.com/ing-bank/lion/blob/
|
|
28
|
+
More details about SlotMixin can be found in the [SlotMixin documentation](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/core/SlotMixin.md)
|
|
@@ -145,4 +145,4 @@ This will make sure that the slot provided by the user always takes precedence a
|
|
|
145
145
|
|
|
146
146
|
### Default slot
|
|
147
147
|
|
|
148
|
-
As can be seen in the example of [SlotFunctionResults](https://github.com/ing-bank/lion/blob/
|
|
148
|
+
As can be seen in the example of [SlotFunctionResults](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/core/#slotfunctionresults), '' can be used to add content to the default slot
|
|
@@ -15,7 +15,7 @@ import { LitElement, html, render } from 'lit-element';
|
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
|
-
- [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/
|
|
18
|
+
- [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/core/#deduping-of-mixins)
|
|
19
19
|
- Mixin to handle disabled (DisabledMixin)
|
|
20
20
|
- Mixin to handle disabled AND tabIndex (DisabledWithTabIndexMixin)
|
|
21
21
|
- Mixin to manage auto-generated needed slot elements in light dom (SlotMixin)
|
|
@@ -23,7 +23,7 @@ Our fields can automatically format/parse/serialize user input or an input set i
|
|
|
23
23
|
|
|
24
24
|
Below are some concrete examples of implementations of formatters and parsers mimicking a (basic) amount input.
|
|
25
25
|
|
|
26
|
-
> For an actual amount input, check out [lion-input-amount](https://github.com/ing-bank/lion/blob/
|
|
26
|
+
> For an actual amount input, check out [lion-input-amount](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input-amount/overview.md).
|
|
27
27
|
> This comes with its own formatter, parser, serializer.
|
|
28
28
|
|
|
29
29
|
### Parsers & modelValue
|
|
@@ -230,16 +230,16 @@ Below we show three flow diagrams to show the flow of formatting, serializing an
|
|
|
230
230
|
|
|
231
231
|
Where a user changes the input with their keyboard:
|
|
232
232
|
|
|
233
|
-

|
|
234
234
|
|
|
235
235
|
### Unparseable flow
|
|
236
236
|
|
|
237
237
|
Where a user sets the input to something that is not parseable by the parser:
|
|
238
238
|
|
|
239
|
-

|
|
240
240
|
|
|
241
241
|
### Imperative / programmatic flow
|
|
242
242
|
|
|
243
243
|
Where the developer sets the modelValue of the input programmatically:
|
|
244
244
|
|
|
245
|
-

|
|
@@ -21,7 +21,7 @@ level, via:
|
|
|
21
21
|
> Internal/private concepts like viewValue, formattedValue, serializedValue are therefore not
|
|
22
22
|
> recommended as a means of interaction.
|
|
23
23
|
|
|
24
|
-
For more information about parsing and the Unparseable type, see [Formatting and Parsing](https://github.com/ing-bank/lion/blob/
|
|
24
|
+
For more information about parsing and the Unparseable type, see [Formatting and Parsing](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/formatting-and-parsing.md)
|
|
25
25
|
|
|
26
26
|
### Event meta
|
|
27
27
|
|
|
@@ -20,9 +20,9 @@ Fields (think of an input, textarea, select) are the actual form controls the en
|
|
|
20
20
|
|
|
21
21
|
On top of this, they feature:
|
|
22
22
|
|
|
23
|
-
- [formatting/parsing/serializing](https://github.com/ing-bank/lion/blob/
|
|
24
|
-
- Advanced [validation](https://github.com/ing-bank/lion/blob/
|
|
25
|
-
- Creation of advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
- [formatting/parsing/serializing](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/formatting-and-parsing.md) of view values.
|
|
24
|
+
- Advanced [validation](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/validate.md) possibilities.
|
|
25
|
+
- Creation of advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/interaction-states.md).
|
|
26
26
|
- Provision of labels and help texts in an easy, declarative manner.
|
|
27
27
|
- Accessibility out of the box.
|
|
28
28
|
- Advanced styling possibilities: map your own Design System to the internal HTML structure.
|
|
@@ -31,33 +31,33 @@ On top of this, they feature:
|
|
|
31
31
|
|
|
32
32
|
### Platform fields (wrappers)
|
|
33
33
|
|
|
34
|
-
- [LionInput](https://github.com/ing-bank/lion/blob/
|
|
35
|
-
- [LionTextarea](https://github.com/ing-bank/lion/blob/
|
|
36
|
-
- [LionSelect](https://github.com/ing-bank/lion/blob/
|
|
34
|
+
- [LionInput](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input/overview.md), a wrapper for `<input>`.
|
|
35
|
+
- [LionTextarea](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/textarea/overview.md), a wrapper for `<textarea>`.
|
|
36
|
+
- [LionSelect](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/select/overview.md), a wrapper for `<select>`.
|
|
37
37
|
|
|
38
38
|
### Custom fields (wrappers)
|
|
39
39
|
|
|
40
|
-
Whenever a native form control doesn't exist or is not sufficient, a [custom form field](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
Whenever a native form control doesn't exist or is not sufficient, a [custom form field](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/how-to/create-a-custom-field.md) should be created. One could think of components like:
|
|
41
41
|
|
|
42
|
-
- [LionCombobox](https://github.com/ing-bank/lion/blob/
|
|
43
|
-
- [LionDate](https://github.com/ing-bank/lion/blob/
|
|
44
|
-
- [LionDatepicker](https://github.com/ing-bank/lion/blob/
|
|
45
|
-
- [LionListbox](https://github.com/ing-bank/lion/blob/
|
|
46
|
-
- [LionInputAmount](https://github.com/ing-bank/lion/blob/
|
|
47
|
-
- [LionInputEmail](https://github.com/ing-bank/lion/blob/
|
|
48
|
-
- [LionInputIban](https://github.com/ing-bank/lion/blob/
|
|
49
|
-
- [LionInputRange](https://github.com/ing-bank/lion/blob/
|
|
50
|
-
- [LionInputStepper](https://github.com/ing-bank/lion/blob/
|
|
51
|
-
- [LionSelectRich](https://github.com/ing-bank/lion/blob/
|
|
42
|
+
- [LionCombobox](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/combobox/overview.md), a custom implementation of a combobox.
|
|
43
|
+
- [LionDate](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input-date/overview.md), an alternative for `<input type="date">`.
|
|
44
|
+
- [LionDatepicker](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input-datepicker/overview.md), an alternative for `<input type="date">` including a calendar dropdown.
|
|
45
|
+
- [LionListbox](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/listbox/overview.md), a custom implementation of a listbox.
|
|
46
|
+
- [LionInputAmount](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input-amount/overview.md), an alternative for `<input type="number">` special for amounts.
|
|
47
|
+
- [LionInputEmail](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input-email/overview.md), an alternative for `<input type="email">`.
|
|
48
|
+
- [LionInputIban](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input-iban/overview.md), an ING specific for an input with IBAN numbers.
|
|
49
|
+
- [LionInputRange](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input-range/overview.md), an alternative for `<input type="range">`.
|
|
50
|
+
- [LionInputStepper](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input-stepper/overview.md), an alternative for `<input type="number">`.
|
|
51
|
+
- [LionSelectRich](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/select-rich/overview.md), an alternative for `<select>` with multiline options.
|
|
52
52
|
|
|
53
53
|
### Choice Input Fields
|
|
54
54
|
|
|
55
55
|
For form controls which return a `checked-state` you can use the `lion-choice-input` mixin. It is used in:
|
|
56
56
|
|
|
57
|
-
- [LionCheckbox](https://github.com/ing-bank/lion/blob/
|
|
57
|
+
- [LionCheckbox](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/checkbox-group/overview.md), a wrapper for `<input type="checkbox">`.
|
|
58
58
|
- LionOption, an alternative for `<option>`.
|
|
59
|
-
- [LionRadio](https://github.com/ing-bank/lion/blob/
|
|
60
|
-
- [LionSwitch](https://github.com/ing-bank/lion/blob/
|
|
59
|
+
- [LionRadio](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/radio-group/overview.md), a wrapper for `<input type="radio">`.
|
|
60
|
+
- [LionSwitch](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/switch/overview.md), a custom implementation of a switch.
|
|
61
61
|
|
|
62
62
|
Which contains the following features:
|
|
63
63
|
|
|
@@ -69,14 +69,14 @@ Which contains the following features:
|
|
|
69
69
|
|
|
70
70
|
Fieldsets are groups of fields. They can be considered fields on their own as well, since they partly share the normalized API via `FormControlMixin`. Fieldsets are the basis for:
|
|
71
71
|
|
|
72
|
-
- [LionFieldset](https://github.com/ing-bank/lion/blob/
|
|
73
|
-
- [LionForm](https://github.com/ing-bank/lion/blob/
|
|
74
|
-
- [LionCheckboxGroup](https://github.com/ing-bank/lion/blob/
|
|
75
|
-
- [LionRadioGroup](https://github.com/ing-bank/lion/blob/
|
|
72
|
+
- [LionFieldset](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/fieldset/overview.md), a wrapper around multiple input fields or other fieldsets.
|
|
73
|
+
- [LionForm](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/form/overview.md), enhances the functionality of the native `<form>` component.
|
|
74
|
+
- [LionCheckboxGroup](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/checkbox-group/overview.md), a wrapper component for multiple checkboxes.
|
|
75
|
+
- [LionRadioGroup](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/radio-group/overview.md), a wrapper component for multiple radio inputs.
|
|
76
76
|
|
|
77
77
|
## Other Resources
|
|
78
78
|
|
|
79
|
-
- [Model Value](https://github.com/ing-bank/lion/blob/
|
|
80
|
-
- [Formatting and parsing](https://github.com/ing-bank/lion/blob/
|
|
81
|
-
- [Interaction states](https://github.com/ing-bank/lion/blob/
|
|
82
|
-
- [Validation System](https://github.com/ing-bank/lion/blob/
|
|
79
|
+
- [Model Value](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/model-value.md)
|
|
80
|
+
- [Formatting and parsing](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/formatting-and-parsing.md)
|
|
81
|
+
- [Interaction states](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/interaction-states.md)
|
|
82
|
+
- [Validation System](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/validate.md)
|
|
@@ -58,7 +58,7 @@ Validation happens on every change of `modelValue`. A change in modelValue can b
|
|
|
58
58
|
|
|
59
59
|
## When validation feedback will be shown
|
|
60
60
|
|
|
61
|
-
Although validation happens realtime under the hood, displaying validity feedback in realtime may not always lead to the desired User Experience. Together with [interaction states](https://github.com/ing-bank/lion/blob/
|
|
61
|
+
Although validation happens realtime under the hood, displaying validity feedback in realtime may not always lead to the desired User Experience. Together with [interaction states](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/interaction-states.md),
|
|
62
62
|
validity states can determine whether a validation message should be shown along the input field.
|
|
63
63
|
|
|
64
64
|
## Assessing field validation state programmatically
|
|
@@ -346,7 +346,7 @@ export const emailValidator = () => html`
|
|
|
346
346
|
`;
|
|
347
347
|
```
|
|
348
348
|
|
|
349
|
-
### Override
|
|
349
|
+
### Override default messages with custom text
|
|
350
350
|
|
|
351
351
|
To get default validation messages you need to import and call the `loadDefaultFeedbackMessages` function once in your application.
|
|
352
352
|
|
|
@@ -374,6 +374,22 @@ export const defaultMessages = () => html`
|
|
|
374
374
|
`;
|
|
375
375
|
```
|
|
376
376
|
|
|
377
|
+
### Override default messages with custom HTML
|
|
378
|
+
|
|
379
|
+
Similarly to overriding the default messages with a custom text it is possible to override the messages with a custom HTML.
|
|
380
|
+
|
|
381
|
+
```js preview-story
|
|
382
|
+
export const defaultMessagesWithCustomHtml = () => html`
|
|
383
|
+
<lion-input
|
|
384
|
+
.validators="${[
|
|
385
|
+
new EqualsLength(4, { getMessage: () => html`<div><b>Note</b> 4 chars please...</div>` }),
|
|
386
|
+
]}"
|
|
387
|
+
.modelValue="${'123'}"
|
|
388
|
+
label="Custom message for validator instance"
|
|
389
|
+
></lion-input>
|
|
390
|
+
`;
|
|
391
|
+
```
|
|
392
|
+
|
|
377
393
|
### Override fieldName
|
|
378
394
|
|
|
379
395
|
In the scenario that the default messages are correct, but you only want to change the `fieldName`, this can both be done for a single specific validator or for all at once.
|
|
@@ -9,15 +9,15 @@ In it's simplest form it is a function that returns the translated text for a na
|
|
|
9
9
|
- Formatting of numbers, amounts
|
|
10
10
|
- Formatting of dates
|
|
11
11
|
|
|
12
|
-
Further examples and a more in depth description can be found at the [Use Cases Page](https://github.com/ing-bank/lion/blob/
|
|
12
|
+
Further examples and a more in depth description can be found at the [Use Cases Page](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/localize/use-cases.md).
|
|
13
13
|
|
|
14
14
|
## Content
|
|
15
15
|
|
|
16
16
|
| Feature | Description |
|
|
17
17
|
| ---------------------------------------- | --------------------------------------------- |
|
|
18
|
-
| [Translate Text](https://github.com/ing-bank/lion/blob/
|
|
19
|
-
| [Format Numbers](https://github.com/ing-bank/lion/blob/
|
|
20
|
-
| [Format Dates](https://github.com/ing-bank/lion/blob/
|
|
18
|
+
| [Translate Text](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/localize/text.md) | Load and translate text in multiple languages |
|
|
19
|
+
| [Format Numbers](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/localize/numbers.md) | Format numbers in multiple languages |
|
|
20
|
+
| [Format Dates](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/localize/dates.md) | Format dates in multiple languages |
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { html } from '@mdjs/mdjs-preview';
|
|
5
5
|
import './assets/demo-el-using-overlaymixin.mjs';
|
|
6
6
|
import './assets/applyDemoOverlayStyles.mjs';
|
|
7
|
+
import { withDropdownConfig, withTooltipConfig } from '@lion/ui/overlays.js';
|
|
7
8
|
```
|
|
8
9
|
|
|
9
10
|
The `OverlayController` has many configuration options.
|
|
@@ -68,7 +69,7 @@ export const placementGlobal = () => {
|
|
|
68
69
|
|
|
69
70
|
## isTooltip (placementMode: 'local')
|
|
70
71
|
|
|
71
|
-
As specified in the [overlay rationale](https://github.com/ing-bank/lion/blob/
|
|
72
|
+
As specified in the [overlay rationale](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/overlays/rationale.md) there are only two official types of overlays: dialogs and tooltips. And their main differences are:
|
|
72
73
|
|
|
73
74
|
- Dialogs have a modal option, tooltips don’t
|
|
74
75
|
- Dialogs have interactive content, tooltips don’t
|
|
@@ -373,7 +374,7 @@ Features:
|
|
|
373
374
|
|
|
374
375
|
> Popper strictly is scoped on positioning. **It does not change the dimensions of the content node nor the invoker node**.
|
|
375
376
|
> This also means that if you use the arrow feature, you are in charge of styling it properly, use the data-popper-placement attribute for this.
|
|
376
|
-
> An example implementation can be found in [lion-tooltip](https://github.com/ing-bank/lion/blob/
|
|
377
|
+
> An example implementation can be found in [lion-tooltip](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/tooltip/overview.md), where an arrow is set by default.
|
|
377
378
|
|
|
378
379
|
To override the default options we set for local mode, you add a `popperConfig` object to the config passed to the OverlayController.
|
|
379
380
|
Here's a succinct overview of some often used popper properties:
|
|
@@ -6,7 +6,7 @@ Manages their position on the screen relative to other elements, including other
|
|
|
6
6
|
|
|
7
7
|
Its purpose is to make it easy to use our Overlay System declaratively. It can be easily extended where needed, to override event listeners and more.
|
|
8
8
|
|
|
9
|
-
See [lion-dialog](../../../components/dialog/overview.md) and [lion-tooltip](https://github.com/ing-bank/lion/blob/
|
|
9
|
+
See [lion-dialog](../../../components/dialog/overview.md) and [lion-tooltip](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/tooltip/overview.md) for example Web Component implementations using the Overlay System.
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
@@ -18,9 +18,9 @@ See [lion-dialog](../../../components/dialog/overview.md) and [lion-tooltip](htt
|
|
|
18
18
|
- lion-overlay web component:
|
|
19
19
|
- Show content when clicking the invoker
|
|
20
20
|
- Have a `.config` object to set or update the OverlayController's configuration
|
|
21
|
-
- [**OverlaysManager**](https://github.com/ing-bank/lion/blob/
|
|
22
|
-
- [**OverlayController**](https://github.com/ing-bank/lion/blob/
|
|
23
|
-
- [**OverlayMixin**](https://github.com/ing-bank/lion/blob/
|
|
21
|
+
- [**OverlaysManager**](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/overlays/use-cases.md#overlaysmanager), a global repository keeping track of all different types of overlays
|
|
22
|
+
- [**OverlayController**](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/overlays/use-cases.md#overlaycontroller), a single controller class for handling overlays
|
|
23
|
+
- [**OverlayMixin**](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/overlays/use-cases.md#overlaymixin), a mixin that can be used to create webcomponents that use the OverlayController under the hood
|
|
24
24
|
|
|
25
25
|
Usually you will use `lion-dialog` (or `lion-tooltip` if this makes more sense).
|
|
26
26
|
|
|
@@ -110,4 +110,4 @@ class MyOverlayComponent extends OverlayMixin(LitElement) {
|
|
|
110
110
|
|
|
111
111
|
## Rationales
|
|
112
112
|
|
|
113
|
-
Please check the [system rationals](https://github.com/ing-bank/lion/blob/
|
|
113
|
+
Please check the [system rationals](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/overlays/rationale.md) folder, where we go more in-depth.
|
|
@@ -21,7 +21,7 @@ The overlay system allows to create different types of overlays like dialogs, to
|
|
|
21
21
|
It's designed to be highly flexible, while still delivering sensible defaults.
|
|
22
22
|
On top of this, the system was built having accessibility in mind.
|
|
23
23
|
|
|
24
|
-
For a detailed rationale, please consult [Rationale](https://github.com/ing-bank/lion/blob/
|
|
24
|
+
For a detailed rationale, please consult [Rationale](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/overlays/rationale.md).
|
|
25
25
|
|
|
26
26
|
```js preview-story
|
|
27
27
|
export const main = () => html`
|
|
@@ -67,7 +67,7 @@ Global refers to overlays where the content is positioned in a global root node
|
|
|
67
67
|
|
|
68
68
|
Overlays can be configured in many ways to suit your needs. We go in-depth into each option in the Overlay System - Configuration chapter.
|
|
69
69
|
|
|
70
|
-
We also export a few [preset configuration objects](https://github.com/ing-bank/lion/blob/
|
|
70
|
+
We also export a few [preset configuration objects](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/overlays/configuration.md).
|
|
71
71
|
|
|
72
72
|
- withModalDialogConfig
|
|
73
73
|
- withDropdownConfig
|
|
@@ -9,7 +9,7 @@ Therefore, they may not have the same quality standards as our other packages.
|
|
|
9
9
|
|
|
10
10
|
| Package | Description |
|
|
11
11
|
| -------------------------------------- | ----------------------- |
|
|
12
|
-
| [sb-action-logger](https://github.com/ing-bank/lion/blob/
|
|
12
|
+
| [sb-action-logger](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/tools/helpers/action-logger.md) | Storybook action logger |
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { OverlaysManager } from 'overlays';
|
|
1
|
+
import { OverlaysManager, OverlaysManager as OverlaysManager2 } from 'overlays';
|
|
2
2
|
import { singletonManager } from 'singleton-manager';
|
|
3
|
-
import { OverlaysManager as OverlaysManager2 } from './node_modules/page-b/node_modules/overlays/index.js';
|
|
4
3
|
|
|
5
4
|
let compatibleManager1;
|
|
6
5
|
let compatibleManager2;
|
|
@@ -9,7 +9,7 @@ Primarily useful if two major version of a package with a singleton is used.
|
|
|
9
9
|
npm i --save singleton-manager
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
⚠️ You need to make SURE that only ONE version of `singleton-manager` is installed. For how see [Non Goals](https://github.com/ing-bank/lion/blob/
|
|
12
|
+
⚠️ You need to make SURE that only ONE version of `singleton-manager` is installed. For how see [Non Goals](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/tools/singleton-manager/#non-goals).
|
|
13
13
|
|
|
14
14
|
### Example Singleton Users
|
|
15
15
|
|
|
@@ -159,7 +159,7 @@ Steps to reproduce:
|
|
|
159
159
|
1. Page A click on block
|
|
160
160
|
2. Page B => "Blocked: false" (even when hitting the refresh button)
|
|
161
161
|
|
|
162
|
-
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/
|
|
162
|
+
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/tools/singleton-manager/example-fail/index.md). <br>
|
|
163
163
|
➡️ See [the code](https://github.com/ing-bank/lion/tree/master/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js).
|
|
164
164
|
|
|
165
165
|
---
|
|
@@ -202,7 +202,7 @@ See it in action
|
|
|
202
202
|
npm run start:singleton
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/
|
|
205
|
+
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/tools/singleton-manager/example-success/index.md). <br>
|
|
206
206
|
➡️ See [the code](https://github.com/ing-bank/lion/tree/master/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js).
|
|
207
207
|
|
|
208
208
|
---
|
|
@@ -243,7 +243,7 @@ See it in action
|
|
|
243
243
|
npm run start:singleton-complex
|
|
244
244
|
```
|
|
245
245
|
|
|
246
|
-
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/
|
|
246
|
+
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/tools/singleton-manager/example-complex/index.md). <br>
|
|
247
247
|
➡️ See [the code](https://github.com/ing-bank/lion/tree/master/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js).
|
|
248
248
|
|
|
249
249
|
---
|
|
@@ -75,9 +75,9 @@ if (!customElements.get('dummy-slider')) {
|
|
|
75
75
|
}
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
Custom Fields can be created in just a few steps. All you need is an interaction element (like for instance a slider, a listbox or a combobox) and connect it to the [LionField](https://github.com/ing-bank/lion/blob/
|
|
78
|
+
Custom Fields can be created in just a few steps. All you need is an interaction element (like for instance a slider, a listbox or a combobox) and connect it to the [LionField](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input/overview.md).
|
|
79
79
|
|
|
80
|
-
> In case you want to extend a native element, follow [Extend a native Input](https://github.com/ing-bank/lion/blob/
|
|
80
|
+
> In case you want to extend a native element, follow [Extend a native Input](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/how-to/extend-a-native-input.md).
|
|
81
81
|
|
|
82
82
|
## A) an interaction element
|
|
83
83
|
|
|
@@ -126,7 +126,7 @@ export const createAnInteractiveElement = () => {
|
|
|
126
126
|
## B) your LionField extension
|
|
127
127
|
|
|
128
128
|
Now we want to integrate the slider in our form system to enrich the user interface, get
|
|
129
|
-
validation support and all other [benefits of LionField](https://github.com/ing-bank/lion/blob/
|
|
129
|
+
validation support and all other [benefits of LionField](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input/overview.md).
|
|
130
130
|
We start by creating a component `<slider-field>` that extends from `LionField`.
|
|
131
131
|
Then we follow the steps below:
|
|
132
132
|
|
|
@@ -139,7 +139,7 @@ Then we follow the steps below:
|
|
|
139
139
|
|
|
140
140
|
The `user-input-changed` event is listened to by the FormatMixin: it should be regarded as the
|
|
141
141
|
equivalent of the `input` event of the platform, but for custom built interaction elements.
|
|
142
|
-
You now synchronized [modelValue](https://github.com/ing-bank/lion/blob/
|
|
142
|
+
You now synchronized [modelValue](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/model-value.md), which can be regarded as
|
|
143
143
|
the glue to integrate all other functionality like parsing/formatting/serializing, validating,
|
|
144
144
|
tracking interaction states etc.
|
|
145
145
|
|
|
@@ -147,7 +147,7 @@ Then we follow the steps below:
|
|
|
147
147
|
> because those properties will loose their reactivity (they won't be considered anymore in the
|
|
148
148
|
> update loop of LitElement).
|
|
149
149
|
> Whenever a .modelValue/.formattedValue/.serializedValue needs to be computed, use
|
|
150
|
-
> [parser/formatter/serializer](https://github.com/ing-bank/lion/blob/
|
|
150
|
+
> [parser/formatter/serializer](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/systems/form/formatting-and-parsing.md)
|
|
151
151
|
|
|
152
152
|
Implement with the following code:
|
|
153
153
|
|
|
@@ -63,7 +63,7 @@ class MyForm extends LitElement {
|
|
|
63
63
|
}
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
> Today, rendering to light dom is the only way to [stay accessible](https://github.com/ing-bank/lion/blob/
|
|
66
|
+
> Today, rendering to light dom is the only way to [stay accessible](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/fundamentals/rationales/accessibility.md#shadow-roots-and-accessibility).
|
|
67
67
|
|
|
68
68
|
The registration mechanism relies on light dom by design: as soon as you do start to use shadow roots, you will notice that your form components won't register themselves anymore to their parents.
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@ Extending form components is not recommended for Application Developers: it shou
|
|
|
73
73
|
This team will add the styling and default configuration needed to make it fit the particular Design System.
|
|
74
74
|
|
|
75
75
|
With the toolbox provided by the team that creates your Design System, you should be able to build all your forms. Only if you have a really good reason, look into
|
|
76
|
-
[exceptional cases](https://github.com/ing-bank/lion/blob/
|
|
76
|
+
[exceptional cases](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/how-to/#exceptional-cases) below.
|
|
77
77
|
|
|
78
78
|
### Exceptional cases
|
|
79
79
|
|
|
@@ -81,8 +81,8 @@ If the form component you need is still missing, you have two options:
|
|
|
81
81
|
|
|
82
82
|
- is it a generic primitive that should be part of Lion? Request it in [Lion discussions](https://github.com/ing-bank/lion/discussions)
|
|
83
83
|
- is it a non generic component that is unique to your app?
|
|
84
|
-
- follow [create a custom field](https://github.com/ing-bank/lion/blob/
|
|
85
|
-
- follow [extend a native input](https://github.com/ing-bank/lion/blob/
|
|
84
|
+
- follow [create a custom field](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/how-to/create-a-custom-field.md)
|
|
85
|
+
- follow [extend a native input](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/how-to/extend-a-native-input.md)
|
|
86
86
|
|
|
87
87
|
It's also possible to extend other components, like LionListbox or LionCombobox. You need to be aware that you're building on top of protected apis.
|
|
88
88
|
Changing/overriding functionality is only recommended if the source code in `form-core` is fully understood.
|
|
@@ -11,9 +11,9 @@ import '../../fundamentals/systems/form/assets/h-output.js';
|
|
|
11
11
|
loadDefaultFeedbackMessages();
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Input fields can be created by extending [LionInput](https://github.com/ing-bank/lion/blob/
|
|
14
|
+
Input fields can be created by extending [LionInput](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/components/input/overview.md).
|
|
15
15
|
|
|
16
|
-
> In case you want to wrap a custom form element, follow [Create a custom Field](https://github.com/ing-bank/lion/blob/
|
|
16
|
+
> In case you want to wrap a custom form element, follow [Create a custom Field](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/how-to/create-a-custom-field.md).
|
|
17
17
|
|
|
18
18
|
For this tutorial, we create an input that wraps native `input[type=datetime-local]`.
|
|
19
19
|
This is as simple as adding a type:
|
package/docs/guides/index.md
CHANGED
|
@@ -12,9 +12,9 @@ Developers consuming our web components inside an application (not extending the
|
|
|
12
12
|
`Application Developers` are only allowed to interact with `public` properties and methods.
|
|
13
13
|
Can be abbreviated as `AD`. Sometimes also called `Consuming Developer`.
|
|
14
14
|
|
|
15
|
-
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/
|
|
16
|
-
- [Styling](https://github.com/ing-bank/lion/blob/
|
|
17
|
-
- [Scoped Elements](https://github.com/ing-bank/lion/blob/
|
|
15
|
+
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/principles/definitions-and-terms.md)
|
|
16
|
+
- [Styling](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/principles/styling.md)
|
|
17
|
+
- [Scoped Elements](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/principles/scoped-elements.md)
|
|
18
18
|
|
|
19
19
|
## Extending Developer
|
|
20
20
|
|
|
@@ -22,13 +22,13 @@ Developers extending our web components, for instance: `class MaterialInput exte
|
|
|
22
22
|
|
|
23
23
|
Especially for subclassers we have some extra documentation:
|
|
24
24
|
|
|
25
|
-
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/
|
|
26
|
-
- [Extend documentation](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/principles/subclasser-apis.md)
|
|
26
|
+
- [Extend documentation](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/blog/extending-documentation.md)
|
|
27
27
|
|
|
28
28
|
## How To
|
|
29
29
|
|
|
30
30
|
Next to that we have some specific "How To" documentations.
|
|
31
31
|
|
|
32
|
-
- [Get started](https://github.com/ing-bank/lion/blob/
|
|
33
|
-
- [Create a custom field](https://github.com/ing-bank/lion/blob/
|
|
34
|
-
- [Extend a native input](https://github.com/ing-bank/lion/blob/
|
|
32
|
+
- [Get started](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/how-to/get-started.md)
|
|
33
|
+
- [Create a custom field](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/how-to/create-a-custom-field.md)
|
|
34
|
+
- [Extend a native input](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/how-to/extend-a-native-input.md)
|
|
@@ -12,9 +12,9 @@ Developers consuming our web components inside an application (not extending the
|
|
|
12
12
|
`Application Developers` are only allowed to interact with `public` properties and methods.
|
|
13
13
|
Can be abbreviated as `AD`. Sometimes also called `Consuming Developer`.
|
|
14
14
|
|
|
15
|
-
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/
|
|
16
|
-
- [Styling](https://github.com/ing-bank/lion/blob/
|
|
17
|
-
- [Scoped Elements](https://github.com/ing-bank/lion/blob/
|
|
15
|
+
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/principles/definitions-and-terms.md)
|
|
16
|
+
- [Styling](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/principles/styling.md)
|
|
17
|
+
- [Scoped Elements](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/principles/scoped-elements.md)
|
|
18
18
|
|
|
19
19
|
## Extending Developer
|
|
20
20
|
|
|
@@ -22,5 +22,5 @@ Developers extending our web components, for instance: `class MaterialInput exte
|
|
|
22
22
|
|
|
23
23
|
Especially for subclassers we have some extra documentation:
|
|
24
24
|
|
|
25
|
-
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/
|
|
26
|
-
- [Extend documentation](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/principles/subclasser-apis.md)
|
|
26
|
+
- [Extend documentation](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/blog/extending-documentation.md)
|
|
@@ -19,7 +19,7 @@ Examples for both categories can be found below:
|
|
|
19
19
|
- Accessibility examples:
|
|
20
20
|
- Content (for instance a caption in a table) can be `visually hidden`: it will be
|
|
21
21
|
readable by screen readers, but invisible for end users.
|
|
22
|
-
- When an html table is used, we allow [subclassers](https://github.com/ing-bank/lion/blob/
|
|
22
|
+
- When an html table is used, we allow [subclassers](https://github.com/ing-bank/lion/blob/64a1b65c989892adfbabaccd892a0af043e35b3b/docs/guides/principles/subclasser-apis.md) to override the display property (`table-cell`) to `flex`. By putting the proper accessible roles (`role="cell"`) in the markup, we guarantee our markup stays accessible.
|
|
23
23
|
|
|
24
24
|
Although Lion components try to stay as unbiased as possible with regard to styling, defaults will be needed. In these cases we try to follow the platform as much as possible. If the platform doesn't provide defaults, the largest common denominator across existing UI systems is taken as a lead.
|
|
25
25
|
|
|
@@ -14,4 +14,8 @@ export { FormRegistrarHost } from '../../components/form-core/types/registration
|
|
|
14
14
|
export { ElementWithParentFormGroup } from '../../components/form-core/types/registration/FormRegistrarMixinTypes.js';
|
|
15
15
|
export { FormRegistrarPortalHost } from '../../components/form-core/types/registration/FormRegistrarPortalMixinTypes.js';
|
|
16
16
|
export { SyncUpdatableHost } from '../../components/form-core/types/utils/SyncUpdatableMixinTypes.js';
|
|
17
|
-
export {
|
|
17
|
+
export {
|
|
18
|
+
ValidateHost,
|
|
19
|
+
ValidationType,
|
|
20
|
+
FeedbackMessage,
|
|
21
|
+
} from '../../components/form-core/types/validate/ValidateMixinTypes.js';
|