@lion/ui 0.0.8 → 0.0.10
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/core/src/SlotMixin.js +2 -1
- package/components/dialog/test/lion-dialog.test.js +3 -7
- package/components/form-integrations/test/form-group-methods.test.js +6 -4
- package/components/form-integrations/test/form-integrations.test.js +10 -5
- package/components/form-integrations/test/helpers/umbrella-form.js +10 -0
- package/components/form-integrations/test/model-value-consistency.test.js +29 -20
- package/components/input-datepicker/src/LionInputDatepicker.js +64 -100
- package/components/input-datepicker/src/localizeNamespaceLoader.js +188 -0
- package/components/input-datepicker/test/lion-input-datepicker.test.js +15 -20
- package/components/input-datepicker/test-helpers/DatepickerInputObject.js +3 -3
- package/components/input-tel/src/parsers.js +1 -1
- package/components/listbox/test-suites/ListboxMixin.suite.js +3 -3
- package/components/localize/test/number/formatNumber.test.js +2 -6
- package/components/overlays/src/OverlayController.js +236 -289
- package/components/overlays/src/OverlayMixin.js +17 -18
- package/components/overlays/src/OverlaysManager.js +28 -53
- package/components/overlays/src/overlayDocumentStyle.js +24 -0
- package/components/overlays/src/overlayShadowDomStyle.js +138 -0
- package/components/overlays/src/singleton.js +3 -1
- package/components/overlays/test/ArrowMixin.test.js +0 -1
- package/components/overlays/test/OverlayController.test.js +306 -273
- package/components/overlays/test/OverlaysManager.test.js +23 -32
- package/components/overlays/test/global-positioning.test.js +4 -15
- package/components/overlays/test/local-positioning.test.js +65 -38
- package/components/overlays/test-suites/OverlayMixin.suite.js +18 -26
- package/components/overlays/types/OverlayConfig.ts +32 -11
- package/components/overlays/types/OverlayMixinTypes.ts +2 -2
- package/components/select-rich/src/LionSelectInvoker.js +2 -3
- package/components/select-rich/src/LionSelectRich.js +22 -20
- package/components/select-rich/test/lion-select-rich.test.js +5 -7
- package/components/validate-messages/src/loadDefaultFeedbackMessages.js +2 -181
- package/components/validate-messages/src/loadDefaultFeedbackMessagesNoSideEffects.js +194 -0
- package/components/validate-messages/test/loadDefaultFeedbackMessages.test.js +1 -18
- package/components/validate-messages/test/loadDefaultFeedbackMessagesNoSideEffects.js +49 -0
- package/custom-elements.json +370 -362
- package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
- package/dist-types/components/form-integrations/test/helpers/umbrella-form.d.ts +4 -0
- package/dist-types/components/form-integrations/test/helpers/umbrella-form.d.ts.map +1 -1
- package/dist-types/components/form-integrations/test/model-value-consistency.test.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +3 -3
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts +4 -0
- package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts.map +1 -0
- package/dist-types/components/overlays/src/OverlayController.d.ts +46 -101
- package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlaysManager.d.ts +0 -7
- package/dist-types/components/overlays/src/OverlaysManager.d.ts.map +1 -1
- package/dist-types/components/overlays/src/overlayDocumentStyle.d.ts +2 -0
- package/dist-types/components/overlays/src/overlayDocumentStyle.d.ts.map +1 -0
- package/dist-types/components/overlays/src/overlayShadowDomStyle.d.ts +2 -0
- package/dist-types/components/overlays/src/overlayShadowDomStyle.d.ts.map +1 -0
- package/dist-types/components/overlays/src/singleton.d.ts +2 -1
- package/dist-types/components/overlays/src/singleton.d.ts.map +1 -1
- package/dist-types/components/overlays/test-suites/OverlayMixin.suite.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayConfig.d.ts +14 -10
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts +2 -2
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectInvoker.d.ts +3 -27
- package/dist-types/components/select-rich/src/LionSelectInvoker.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/components/select-rich/test/lion-select-rich.test.d.ts.map +1 -1
- package/dist-types/components/validate-messages/src/loadDefaultFeedbackMessages.d.ts +3 -0
- package/dist-types/components/validate-messages/src/loadDefaultFeedbackMessages.d.ts.map +1 -1
- package/dist-types/components/validate-messages/src/loadDefaultFeedbackMessagesNoSideEffects.d.ts +10 -0
- package/dist-types/components/validate-messages/src/loadDefaultFeedbackMessagesNoSideEffects.d.ts.map +1 -0
- package/dist-types/components/validate-messages/test/loadDefaultFeedbackMessages.test.d.ts.map +1 -1
- package/dist-types/components/validate-messages/test/loadDefaultFeedbackMessagesNoSideEffects.d.ts +2 -0
- package/dist-types/components/validate-messages/test/loadDefaultFeedbackMessagesNoSideEffects.d.ts.map +1 -0
- package/dist-types/exports/input-datepicker.d.ts +0 -1
- package/dist-types/exports/overlays.d.ts +0 -1
- package/dist-types/exports/types/overlays.d.ts +1 -0
- package/dist-types/exports/types/overlays.d.ts.map +1 -1
- package/dist-types/exports/validate-messages-no-side-effects.d.ts +2 -0
- package/dist-types/exports/validate-messages-no-side-effects.d.ts.map +1 -0
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.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 +5 -9
- package/docs/components/dialog/use-cases.md +43 -87
- 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-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/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/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/use-cases.md +4 -0
- package/docs/fundamentals/systems/form/validate.md +1 -1
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/assets/{applyDemoOverlayStyles.js → applyDemoOverlayStyles.mjs} +2 -1
- package/docs/fundamentals/systems/overlays/assets/demo-el-using-overlaymixin.mjs +119 -0
- package/docs/fundamentals/systems/overlays/assets/{demo-overlay-backdrop.js → demo-overlay-backdrop.mjs} +3 -4
- package/docs/fundamentals/systems/overlays/assets/demo-overlay-positioning.mjs +537 -0
- package/docs/fundamentals/systems/overlays/assets/umbrella-form.js +9 -2
- package/docs/fundamentals/systems/overlays/configuration.md +56 -54
- package/docs/fundamentals/systems/overlays/overview.md +5 -5
- package/docs/fundamentals/systems/overlays/use-cases.md +83 -77
- 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 +6 -6
- package/docs/guides/how-to/extend-a-native-input.md +3 -3
- 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/input-datepicker.js +0 -1
- package/exports/overlays.js +0 -1
- package/exports/types/overlays.ts +1 -0
- package/exports/validate-messages-no-side-effects.js +1 -0
- package/package.json +2 -1
- package/components/input-datepicker/src/LionCalendarOverlayFrame.js +0 -125
- package/components/overlays/src/globalOverlaysStyle.js +0 -139
- package/dist-types/components/input-datepicker/src/LionCalendarOverlayFrame.d.ts +0 -10
- package/dist-types/components/input-datepicker/src/LionCalendarOverlayFrame.d.ts.map +0 -1
- package/dist-types/components/overlays/src/globalOverlaysStyle.d.ts +0 -2
- package/dist-types/components/overlays/src/globalOverlaysStyle.d.ts.map +0 -1
- package/dist-types/exports/define/lion-calendar-overlay-frame.d.ts +0 -2
- package/dist-types/exports/define/lion-calendar-overlay-frame.d.ts.map +0 -1
- package/docs/fundamentals/systems/overlays/assets/demo-overlay-system.js +0 -42
- package/docs/fundamentals/systems/overlays/form-integration.md +0 -65
- package/docs/fundamentals/systems/overlays/scope.md +0 -176
- package/exports/define/lion-calendar-overlay-frame.js +0 -3
|
@@ -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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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
|
|
|
@@ -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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/fundamentals/systems/form/formatting-and-parsing.md) of view values.
|
|
24
|
+
- Advanced [validation](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/fundamentals/systems/form/validate.md) possibilities.
|
|
25
|
+
- Creation of advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/input/overview.md), a wrapper for `<input>`.
|
|
35
|
+
- [LionTextarea](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/textarea/overview.md), a wrapper for `<textarea>`.
|
|
36
|
+
- [LionSelect](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/combobox/overview.md), a custom implementation of a combobox.
|
|
43
|
+
- [LionDate](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/input-date/overview.md), an alternative for `<input type="date">`.
|
|
44
|
+
- [LionDatepicker](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/listbox/overview.md), a custom implementation of a listbox.
|
|
46
|
+
- [LionInputAmount](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/input-amount/overview.md), an alternative for `<input type="number">` special for amounts.
|
|
47
|
+
- [LionInputEmail](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/input-email/overview.md), an alternative for `<input type="email">`.
|
|
48
|
+
- [LionInputIban](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/input-iban/overview.md), an ING specific for an input with IBAN numbers.
|
|
49
|
+
- [LionInputRange](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/input-range/overview.md), an alternative for `<input type="range">`.
|
|
50
|
+
- [LionInputStepper](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/input-stepper/overview.md), an alternative for `<input type="number">`.
|
|
51
|
+
- [LionSelectRich](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/radio-group/overview.md), a wrapper for `<input type="radio">`.
|
|
60
|
+
- [LionSwitch](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/fieldset/overview.md), a wrapper around multiple input fields or other fieldsets.
|
|
73
|
+
- [LionForm](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/form/overview.md), enhances the functionality of the native `<form>` component.
|
|
74
|
+
- [LionCheckboxGroup](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/components/checkbox-group/overview.md), a wrapper component for multiple checkboxes.
|
|
75
|
+
- [LionRadioGroup](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/fundamentals/systems/form/model-value.md)
|
|
80
|
+
- [Formatting and parsing](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/fundamentals/systems/form/formatting-and-parsing.md)
|
|
81
|
+
- [Interaction states](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/fundamentals/systems/form/interaction-states.md)
|
|
82
|
+
- [Validation System](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/fundamentals/systems/form/validate.md)
|
|
@@ -7,7 +7,9 @@ For usage and installation please see the appropriate packages.
|
|
|
7
7
|
import { html } from '@mdjs/mdjs-preview';
|
|
8
8
|
import '@lion/ui/define/lion-button.js';
|
|
9
9
|
import '@lion/ui/define/lion-checkbox-group.js';
|
|
10
|
+
import '@lion/ui/define/lion-checkbox.js';
|
|
10
11
|
import '@lion/ui/define/lion-combobox.js';
|
|
12
|
+
import '@lion/ui/define/lion-option.js';
|
|
11
13
|
import '@lion/ui/define/lion-fieldset.js';
|
|
12
14
|
import '@lion/ui/define/lion-form.js';
|
|
13
15
|
import '@lion/ui/define/lion-input-amount.js';
|
|
@@ -15,12 +17,14 @@ import '@lion/ui/define/lion-input-date.js';
|
|
|
15
17
|
import '@lion/ui/define/lion-input-datepicker.js';
|
|
16
18
|
import '@lion/ui/define/lion-input-email.js';
|
|
17
19
|
import '@lion/ui/define/lion-input-tel.js';
|
|
20
|
+
import '@lion/ui/define/lion-input-tel-dropdown.js';
|
|
18
21
|
import '@lion/ui/define/lion-input-iban.js';
|
|
19
22
|
import '@lion/ui/define/lion-input-range.js';
|
|
20
23
|
import '@lion/ui/define/lion-input-stepper.js';
|
|
21
24
|
import '@lion/ui/define/lion-input.js';
|
|
22
25
|
import '@lion/ui/define/lion-listbox.js';
|
|
23
26
|
import '@lion/ui/define/lion-radio-group.js';
|
|
27
|
+
import '@lion/ui/define/lion-radio.js';
|
|
24
28
|
import '@lion/ui/define/lion-select.js';
|
|
25
29
|
import '@lion/ui/define/lion-select-rich.js';
|
|
26
30
|
import '@lion/ui/define/lion-switch.js';
|
|
@@ -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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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
|
|
@@ -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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/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/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/fundamentals/systems/localize/text.md) | Load and translate text in multiple languages |
|
|
19
|
+
| [Format Numbers](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/fundamentals/systems/localize/numbers.md) | Format numbers in multiple languages |
|
|
20
|
+
| [Format Dates](https://github.com/ing-bank/lion/blob/9b61aac7a106832dd1596bf30ef4ff4dcbfc894f/docs/fundamentals/systems/localize/dates.md) | Format dates in multiple languages |
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import { css } from 'lit';
|
|
2
3
|
|
|
3
4
|
const applyDemoOverlayStyles = () => {
|
|
@@ -14,7 +15,7 @@ const applyDemoOverlayStyles = () => {
|
|
|
14
15
|
`;
|
|
15
16
|
|
|
16
17
|
const styleTag = document.createElement('style');
|
|
17
|
-
styleTag.setAttribute('data-demo-
|
|
18
|
+
styleTag.setAttribute('data-demo-overlays', '');
|
|
18
19
|
styleTag.textContent = demoOverlaysStyle.cssText;
|
|
19
20
|
document.head.appendChild(styleTag);
|
|
20
21
|
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* eslint-disable max-classes-per-file */
|
|
2
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
|
+
import { html, LitElement, css } from 'lit';
|
|
4
|
+
import { OverlayMixin } from '@lion/ui/overlays.js';
|
|
5
|
+
import { LionButton } from '@lion/ui/button.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {import('@lion/ui/types/overlays.js').OverlayConfig} OverlayConfig
|
|
9
|
+
*/
|
|
10
|
+
class DemoElUsingOverlayMixin extends OverlayMixin(LitElement) {
|
|
11
|
+
// eslint-disable-next-line class-methods-use-this
|
|
12
|
+
_defineOverlayConfig() {
|
|
13
|
+
return /** @type {OverlayConfig} */ ({
|
|
14
|
+
placementMode: 'global',
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
_setupOpenCloseListeners() {
|
|
19
|
+
super._setupOpenCloseListeners();
|
|
20
|
+
|
|
21
|
+
if (this._overlayInvokerNode) {
|
|
22
|
+
this._overlayInvokerNode.addEventListener('click', this.toggle);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_teardownOpenCloseListeners() {
|
|
27
|
+
super._teardownOpenCloseListeners();
|
|
28
|
+
|
|
29
|
+
if (this._overlayInvokerNode) {
|
|
30
|
+
this._overlayInvokerNode.removeEventListener('click', this.toggle);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
render() {
|
|
35
|
+
return html`
|
|
36
|
+
<slot name="invoker"></slot>
|
|
37
|
+
<slot name="backdrop"></slot>
|
|
38
|
+
<slot name="content"></slot>
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
customElements.define('demo-el-using-overlaymixin', DemoElUsingOverlayMixin);
|
|
43
|
+
|
|
44
|
+
class DemoOverlay extends OverlayMixin(LitElement) {
|
|
45
|
+
static get styles() {
|
|
46
|
+
return [
|
|
47
|
+
css`
|
|
48
|
+
::slotted([slot='content']) {
|
|
49
|
+
background-color: #333;
|
|
50
|
+
color: white;
|
|
51
|
+
padding: 8px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.close-button {
|
|
55
|
+
background: none;
|
|
56
|
+
border: none;
|
|
57
|
+
color: white;
|
|
58
|
+
font-weight: bold;
|
|
59
|
+
font-size: 16px;
|
|
60
|
+
padding: 4px;
|
|
61
|
+
}
|
|
62
|
+
`,
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// eslint-disable-next-line class-methods-use-this
|
|
67
|
+
_defineOverlayConfig() {
|
|
68
|
+
return /** @type {OverlayConfig} */ ({
|
|
69
|
+
placementMode: 'global',
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
_setupOpenCloseListeners() {
|
|
74
|
+
super._setupOpenCloseListeners();
|
|
75
|
+
|
|
76
|
+
if (this._overlayInvokerNode) {
|
|
77
|
+
this._overlayInvokerNode.addEventListener('click', this.toggle);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
_teardownOpenCloseListeners() {
|
|
82
|
+
super._teardownOpenCloseListeners();
|
|
83
|
+
|
|
84
|
+
if (this._overlayInvokerNode) {
|
|
85
|
+
this._overlayInvokerNode.removeEventListener('click', this.toggle);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
render() {
|
|
90
|
+
return html`
|
|
91
|
+
<slot name="invoker"></slot>
|
|
92
|
+
<slot name="backdrop"></slot>
|
|
93
|
+
<div id="overlay-content-node-wrapper">
|
|
94
|
+
<slot name="content"></slot>
|
|
95
|
+
</div>
|
|
96
|
+
`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
customElements.define('demo-overlay', DemoOverlay);
|
|
100
|
+
|
|
101
|
+
class DemoCloseButton extends LionButton {
|
|
102
|
+
static get styles() {
|
|
103
|
+
return [
|
|
104
|
+
css`
|
|
105
|
+
::host {
|
|
106
|
+
background: none;
|
|
107
|
+
}
|
|
108
|
+
`,
|
|
109
|
+
];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
connectedCallback() {
|
|
113
|
+
super.connectedCallback();
|
|
114
|
+
|
|
115
|
+
this.innerText = '⨯';
|
|
116
|
+
this.setAttribute('aria-label', 'Close');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
customElements.define('demo-close-button', DemoCloseButton);
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
2
|
import { css, LitElement } from 'lit';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
|
-
* @typedef {import('
|
|
5
|
+
* @typedef {import('@lion/ui/types/overlays.js').OverlayConfig} OverlayConfig
|
|
5
6
|
*/
|
|
6
7
|
class DemoOverlayBackdrop extends LitElement {
|
|
7
8
|
static get styles() {
|
|
8
9
|
return css`
|
|
9
10
|
:host {
|
|
10
|
-
position: fixed;
|
|
11
11
|
top: 0;
|
|
12
12
|
left: 0;
|
|
13
13
|
width: 100%;
|
|
14
14
|
height: 100%;
|
|
15
|
-
z-index: 1;
|
|
16
15
|
background-color: grey;
|
|
17
16
|
opacity: 0.3;
|
|
18
|
-
|
|
17
|
+
position: fixed;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
:host(.local-overlays__backdrop--visible) {
|