@lion/ui 0.21.1-menu-system.0 → 0.22.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/button/src/LionButton.js +0 -4
- package/components/form/test/lion-form.test.js +4 -3
- package/components/form-core/src/form-group/FormGroupMixin.js +37 -0
- package/components/form-core/test-suites/form-group/FormGroupMixin.suite.js +25 -0
- package/components/input-amount-dropdown/src/LionInputAmountDropdown.js +2 -2
- package/components/input-amount-dropdown/test/lion-input-amount-dropdown-integrations.test.js +12 -3
- package/components/input-amount-dropdown/test-suites/LionInputAmountDropdown.suite.js +10 -3
- package/components/overlays/src/OverlayController.js +111 -296
- package/components/overlays/src/OverlayMixin.js +17 -76
- package/components/overlays/src/utils/adopt-styles.js +1 -1
- package/components/overlays/src/utils/is-equal-config.js +6 -15
- package/components/overlays/test/OverlayController.test.js +24 -144
- package/components/overlays/test-suites/OverlayMixin.suite.js +8 -8
- package/components/overlays/types/ArrowMixinTypes.ts +3 -1
- package/components/overlays/types/OverlayConfig.ts +5 -20
- package/components/overlays/types/OverlayMixinTypes.ts +0 -2
- package/custom-elements.json +6260 -13587
- package/dist-types/components/button/src/LionButton.d.ts +0 -1
- package/dist-types/components/button/src/LionButton.d.ts.map +1 -1
- package/dist-types/components/combobox/src/LionCombobox.d.ts +1 -1
- package/dist-types/components/dialog/src/LionDialog.d.ts +2 -6
- package/dist-types/components/dialog/src/LionDialog.d.ts.map +1 -1
- package/dist-types/components/form-core/src/form-group/FormGroupMixin.d.ts +1 -0
- package/dist-types/components/form-core/src/form-group/FormGroupMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/form-group/FormGroupMixin.suite.d.ts.map +1 -1
- package/dist-types/components/input-amount-dropdown/test-suites/LionInputAmountDropdown.suite.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +1 -1
- package/dist-types/components/overlays/src/OverlayController.d.ts +5 -22
- 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/utils/is-equal-config.d.ts.map +1 -1
- package/dist-types/components/overlays/types/ArrowMixinTypes.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayConfig.d.ts +2 -12
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts +0 -1
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +2 -6
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/components/tooltip/src/LionTooltip.d.ts +1 -1
- package/dist-types/exports/overlays.d.ts +0 -6
- package/dist-types/exports/overlays.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/overview.md +1 -1
- package/docs/components/combobox/api-table.md +39 -53
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/api-table.md +6 -32
- 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/form/use-cases.md +2 -2
- 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/api-table.md +45 -63
- 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/listbox/use-cases.md +1 -1
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/api-table.md +33 -50
- package/docs/components/select-rich/use-cases.md +2 -2
- package/docs/components/tabs/examples.md +1 -1
- package/docs/components/tooltip/api-table.md +7 -33
- 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/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/api-table.md +43 -46
- 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/how-to/index.md +1 -1
- 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/overlays.js +0 -6
- package/overlays.js +0 -6
- package/package.json +6 -2
- package/vscode.css-custom-data.json +5 -0
- package/vscode.html-custom-data.json +789 -0
- package/web-types.json +2016 -0
- package/components/menu/CHANGELOG.md +0 -37
- package/components/menu/README.md +0 -334
- package/components/menu/index.js +0 -2
- package/components/menu/lion-menu.js +0 -3
- package/components/menu/package.json +0 -46
- package/components/menu/requirements.temp.md +0 -12
- package/components/menu/src/InteractiveListMixin.js +0 -840
- package/components/menu/src/LionMenu.js +0 -421
- package/components/menu/src/MoreButtonMenuMixin.js +0 -278
- package/components/menu/src/MultiLevelListMixin.js +0 -305
- package/components/menu/src/utils/isInView.js +0 -26
- package/components/menu/src/utils/listItemInteractions.js +0 -124
- package/components/menu/test/InteractiveListMixin.test.js +0 -3
- package/components/menu/test/MoreButtonMenuMixin.test.js +0 -4
- package/components/menu/test/MultiLevelListMixin.test.js +0 -3
- package/components/menu/test/lion-menu-interactions.test.js +0 -3
- package/components/menu/test/lion-menu.test.js +0 -14
- package/components/menu/test-helpers/mimicKeyPress.js +0 -9
- package/components/menu/test-suites/InteractiveListMixin.suite.js +0 -454
- package/components/menu/test-suites/LionMenu.suite.js +0 -114
- package/components/menu/test-suites/LionMenuInteractions.suite.js +0 -583
- package/components/menu/test-suites/MoreButtonMenuMixin.suite.js +0 -372
- package/components/menu/test-suites/MultiLevelListMixin.suite.js +0 -303
- package/components/menu/types/InteractiveListMixinTypes.d.ts +0 -84
- package/components/overlays/NEXT.md +0 -49
- package/dist-types/components/menu/index.d.ts +0 -3
- package/dist-types/components/menu/index.d.ts.map +0 -1
- package/dist-types/components/menu/lion-menu.d.ts +0 -2
- package/dist-types/components/menu/lion-menu.d.ts.map +0 -1
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts +0 -39
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts.map +0 -1
- package/dist-types/components/menu/src/utils/isInView.d.ts +0 -9
- package/dist-types/components/menu/src/utils/isInView.d.ts.map +0 -1
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts +0 -48
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts.map +0 -1
- package/dist-types/components/menu/test/InteractiveListMixin.test.d.ts +0 -2
- package/dist-types/components/menu/test/InteractiveListMixin.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/MoreButtonMenuMixin.test.d.ts +0 -2
- package/dist-types/components/menu/test/MoreButtonMenuMixin.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/MultiLevelListMixin.test.d.ts +0 -2
- package/dist-types/components/menu/test/MultiLevelListMixin.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/lion-menu-interactions.test.d.ts +0 -2
- package/dist-types/components/menu/test/lion-menu-interactions.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/lion-menu.test.d.ts +0 -2
- package/dist-types/components/menu/test/lion-menu.test.d.ts.map +0 -1
- package/dist-types/components/menu/test-helpers/mimicKeyPress.d.ts +0 -7
- package/dist-types/components/menu/test-helpers/mimicKeyPress.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts +0 -11
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts +0 -9
- package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/LionMenuInteractions.suite.d.ts +0 -5
- package/dist-types/components/menu/test-suites/LionMenuInteractions.suite.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts +0 -11
- package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts +0 -11
- package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts.map +0 -1
- package/dist-types/exports/define/lion-item.d.ts +0 -2
- package/dist-types/exports/define/lion-item.d.ts.map +0 -1
- package/dist-types/exports/define/lion-menu.d.ts +0 -2
- package/dist-types/exports/define/lion-menu.d.ts.map +0 -1
- package/dist-types/exports/menu-test-suites.d.ts +0 -4
- package/dist-types/exports/menu-test-suites.d.ts.map +0 -1
- package/dist-types/exports/menu.d.ts +0 -3
- package/dist-types/exports/menu.d.ts.map +0 -1
- package/docs/components/menu/api-table.md +0 -121
- package/docs/components/menu/applyMenuDemoStyles.js +0 -173
- package/docs/components/menu/extensions.md +0 -262
- package/docs/components/menu/index.md +0 -13
- package/docs/components/menu/overview.md +0 -422
- package/docs/components/menu/src/DemoNavigationBar.js +0 -441
- package/docs/components/menu/src/DemoSpinButton.js +0 -215
- package/docs/components/menu/src/DemoToolbar.js +0 -101
- package/docs/components/menu/src/DemoTree.js +0 -55
- package/docs/components/menu/src/navigation-bar-types.js +0 -41
- package/docs/components/menu/use-cases.md +0 -74
- package/exports/define/lion-item.js +0 -3
- package/exports/define/lion-menu.js +0 -3
- package/exports/menu-test-suites.js +0 -4
- package/exports/menu.js +0 -3
- package/menu-test-suites.js +0 -4
- package/menu.js +0 -3
|
@@ -29,7 +29,7 @@ You can set the full `modelValue` for each option, which includes the checked pr
|
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Note, when rendering with the help of the `cache` function imported from `lit/directives/cache.js`, setting model by
|
|
32
|
-
the `modelValue` property is not fully supported. Consider setting the model by the `choiceValue` property instead. See [Setting model by `choiceValue` property](https://github.com/ing-bank/lion/blob/
|
|
32
|
+
the `modelValue` property is not fully supported. Consider setting the model by the `choiceValue` property instead. See [Setting model by `choiceValue` property](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/select-rich/#setting-model-by-the-choicevalue-property) for more details.
|
|
33
33
|
|
|
34
34
|
### Setting model by the `choiceValue` property
|
|
35
35
|
|
|
@@ -328,7 +328,7 @@ LionSelectRich will give it acces to:
|
|
|
328
328
|
- LionSelectRich itself, via `.hostElement`
|
|
329
329
|
|
|
330
330
|
Code of an advanced custom invoker is shown below (this is the code for the
|
|
331
|
-
invoker used in [IntlSelectRich](https://github.com/ing-bank/lion/blob/
|
|
331
|
+
invoker used in [IntlSelectRich](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/select-rich/examples.md)).
|
|
332
332
|
The invoker is usually added in the invoker slot of the LionSelectRich subclass.
|
|
333
333
|
However, it would also be possible for an application developer to provide the invoker
|
|
334
334
|
by putting it in light dom:
|
|
@@ -21,7 +21,7 @@ import './src/lea-tab-panel.js';
|
|
|
21
21
|
|
|
22
22
|
## Lea Tabs
|
|
23
23
|
|
|
24
|
-
Learn how to create the `lea tabs` in our ["introducing lion" blogpost](https://github.com/ing-bank/lion/blob/
|
|
24
|
+
Learn how to create the `lea tabs` in our ["introducing lion" blogpost](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/blog/ing-open-sources-lion.md).
|
|
25
25
|
|
|
26
26
|
```js preview-story
|
|
27
27
|
export const main = () => html`
|
|
@@ -16,47 +16,21 @@ eleventyNavigation:
|
|
|
16
16
|
|
|
17
17
|
### Fields
|
|
18
18
|
|
|
19
|
-
| Name
|
|
20
|
-
|
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `invokerRelation` | public | `'label'\|'description'` | `'description'` | Decides whether the tooltip invoker text should be considered a description
(sets aria-describedby) or a label (sets aria-labelledby). | |
|
|
24
|
-
| `opened` | public | `boolean` | `false` | If you add the opened attribute a dialog will be opened on page load. The invoker can be left out
in case the user does not need to be able to reopen the dialog. | OverlayMixin |
|
|
25
|
-
| `_overlayBackdropNode` | protected | | | | OverlayMixin |
|
|
26
|
-
| `_overlayContentNode` | protected | | | | OverlayMixin |
|
|
27
|
-
| `_overlayContentWrapperNode` | protected | | | | OverlayMixin |
|
|
28
|
-
| `_overlayInvokerNode` | protected | | | The node that opens/closes this overlay.

Resolved in a stable, declarative way (independent of the exact DOM order)
by looking, in order, for:
1\. a child with \`\[slot="invoker"]\`
2\. any element in the same root that opts in via \`\[data-invoker]\` and
 references this host by id (\`for="\<id>"\`)
3\. a preceding sibling that opts in via \`\[data-invoker]\` | OverlayMixin |
|
|
29
|
-
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
|
|
19
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
20
|
+
| ----------------- | ------- | ------------------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
|
|
21
|
+
| `hasArrow` | public | `boolean` | `false` | Whether an arrow should be displayed | |
|
|
22
|
+
| `invokerRelation` | public | `'label'\|'description'` | `'description'` | Decides whether the tooltip invoker text should be considered a description
(sets aria-describedby) or a label (sets aria-labelledby). | |
|
|
30
23
|
|
|
31
24
|
### Methods
|
|
32
25
|
|
|
33
|
-
| Name
|
|
34
|
-
|
|
|
35
|
-
| `
|
|
36
|
-
| `open` | public | Shows the overlay | | | OverlayMixin |
|
|
37
|
-
| `repositionOverlay` | public | Sometimes it's needed to recompute Popper position of an overlay, for instance when we have
an opened combobox and the surrounding context changes (the space consumed by the textbox
increases vertically) | | | OverlayMixin |
|
|
38
|
-
| `toggle` | public | Toggles the overlay | | | OverlayMixin |
|
|
39
|
-
| `_defineOverlay` | protected | | `{ contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfig` | `OverlayController` | OverlayMixin |
|
|
40
|
-
| `_defineOverlayConfig` | protected | | | `OverlayConfig` | OverlayMixin |
|
|
41
|
-
| `_getInvokerNode` | protected | | | `Element\|null` | OverlayMixin |
|
|
42
|
-
| `_isPermanentlyDisconnected` | protected | When we're moving around in dom, disconnectedCallback gets called.
Before we decide to teardown, let's wait to see if we were not just moving nodes around. | | `Promise<boolean>` | OverlayMixin |
|
|
43
|
-
| `_setOpenedWithoutPropertyEffects` | protected | When the opened state is changed by an Application Developer,cthe OverlayController is
requested to show/hide. It might happen that this request is not honoured
(intercepted in before-hide for instance), so that we need to sync the controller state
to this webcomponent again, preventing eternal loops. | `newOpened: boolean` | | OverlayMixin |
|
|
44
|
-
| `_setupOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
45
|
-
| `_setupOverlayCtrl` | protected | | | | OverlayMixin |
|
|
46
|
-
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
47
|
-
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
|
|
48
|
-
|
|
49
|
-
### Events
|
|
50
|
-
|
|
51
|
-
| Name | Type | Description | Inherited From |
|
|
52
|
-
| ---------------- | ------------- | ----------- | -------------- |
|
|
53
|
-
| `opened-changed` | `CustomEvent` | | OverlayMixin |
|
|
26
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
27
|
+
| ---------------------- | --------- | ----------- | ---------- | ------ | -------------- |
|
|
28
|
+
| `_defineOverlayConfig` | protected | | | | |
|
|
54
29
|
|
|
55
30
|
### Attributes
|
|
56
31
|
|
|
57
32
|
| Name | Field | Inherited From |
|
|
58
33
|
| ------------------ | --------------- | -------------- |
|
|
59
34
|
| `invoker-relation` | invokerRelation | |
|
|
60
|
-
| `opened` | opened | OverlayMixin |
|
|
61
35
|
|
|
62
36
|
<hr/>
|
|
@@ -9,11 +9,11 @@ Here you find more details about what we offer.
|
|
|
9
9
|
|
|
10
10
|
Let's see what each section describes.
|
|
11
11
|
|
|
12
|
-
1. [Systems](https://github.com/ing-bank/lion/blob/
|
|
12
|
+
1. [Systems](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/core/overview.md) <br>
|
|
13
13
|
These are the fundamental systems that power all of our components.
|
|
14
|
-
2. [Tools](https://github.com/ing-bank/lion/blob/
|
|
14
|
+
2. [Tools](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/tools/helpers/overview.md) <br>
|
|
15
15
|
Frontend Tools useful for web development but are not visual and therefore are not components.
|
|
16
|
-
3. [Node Tools](https://github.com/ing-bank/lion/blob/
|
|
16
|
+
3. [Node Tools](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md) <br>
|
|
17
17
|
Node tools to analyse the code and for extending the documentation.
|
|
18
|
-
4. [Rationales](https://github.com/ing-bank/lion/blob/
|
|
18
|
+
4. [Rationales](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/rationales/side-effects.md) <br>
|
|
19
19
|
The reasoning behind some of our decisions.
|
|
@@ -44,7 +44,7 @@ For a Mono Repository
|
|
|
44
44
|
```md
|
|
45
45
|
# My Pkg
|
|
46
46
|
|
|
47
|
-
[=> See Source <=](https://github.com/ing-bank/lion/blob/
|
|
47
|
+
[=> See Source <=](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/docs/deep/dir/overview.md)
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## CLI flags
|
|
@@ -74,7 +74,7 @@ Bring the `overview.md` in a docs folder along.
|
|
|
74
74
|
👉 `packages/[my-package]/docs/overview.md`
|
|
75
75
|
|
|
76
76
|
```md
|
|
77
|
-
[=> See Source <=](https://github.com/ing-bank/lion/blob/
|
|
77
|
+
[=> See Source <=](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/docs/deep/dir/overview.md)
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
Add a `use-cases.md`
|
|
@@ -82,7 +82,7 @@ Add a `use-cases.md`
|
|
|
82
82
|
👉 `packages/[my-package]/docs/use-cases.md`
|
|
83
83
|
|
|
84
84
|
```md
|
|
85
|
-
[=> See Source <=](https://github.com/ing-bank/lion/blob/
|
|
85
|
+
[=> See Source <=](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/docs/deep/dir/use-cases.md)
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
So you will end up with something like this in your package.
|
|
@@ -20,7 +20,7 @@ To do this automatically you can use this preset for [rocket](https://rocket.mod
|
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
|
|
23
|
-
- Import lion documentation and adjust it using [remark-extend](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
- Import lion documentation and adjust it using [remark-extend](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/node-tools/remark-extend/overview.md)
|
|
24
24
|
- Renames named imports and all it's usage
|
|
25
25
|
- Adjusts import paths
|
|
26
26
|
- Replace tags in template literals
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
|
|
52
52
|
## Reusing documentation
|
|
53
53
|
|
|
54
|
-
To take an existing documentation you can "import" it using [remark-extend](https://github.com/ing-bank/lion/blob/
|
|
54
|
+
To take an existing documentation you can "import" it using [remark-extend](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/node-tools/remark-extend/overview.md).
|
|
55
55
|
|
|
56
56
|
As an example you can create `docs/components/tabs/overview.md`.
|
|
57
57
|
|
|
@@ -37,4 +37,4 @@ Internally, we delegate all intricacies involved in managing light dom to SlotMi
|
|
|
37
37
|
SlotMixin automatically mediates between light dom provided by the user ('public slots') and light dom provided by the component author ('private slots').
|
|
38
38
|
Also, SlotMixin allows to hook into the reactive update loop of LitElement (automatically rerendering on property changes) and it automatically respects
|
|
39
39
|
the scoped registry belonging to the shadow root.
|
|
40
|
-
More details about SlotMixin can be found in the [SlotMixin documentation](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
More details about SlotMixin can be found in the [SlotMixin documentation](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/core/SlotMixin.md)
|
|
@@ -165,4 +165,4 @@ This will make sure that the slot provided by the user always takes precedence a
|
|
|
165
165
|
|
|
166
166
|
### Default slot
|
|
167
167
|
|
|
168
|
-
As can be seen in the example of [SlotFunctionResults](https://github.com/ing-bank/lion/blob/
|
|
168
|
+
As can be seen in the example of [SlotFunctionResults](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/core/#slotfunctionresults), '' can be used to add content to the default slot
|
|
@@ -28,7 +28,7 @@ import { LitElement, html, render } from 'lit-element';
|
|
|
28
28
|
|
|
29
29
|
## Features
|
|
30
30
|
|
|
31
|
-
- [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/
|
|
31
|
+
- [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/core/#deduping-of-mixins)
|
|
32
32
|
- Mixin to handle disabled (DisabledMixin)
|
|
33
33
|
- Mixin to handle disabled AND tabIndex (DisabledWithTabIndexMixin)
|
|
34
34
|
- Mixin to manage auto-generated needed slot elements in light dom (SlotMixin)
|
|
@@ -36,7 +36,7 @@ Our fields can automatically format/parse/serialize user input or an input set i
|
|
|
36
36
|
|
|
37
37
|
Below are some concrete examples of implementations of formatters and parsers mimicking a (basic) amount input.
|
|
38
38
|
|
|
39
|
-
> For an actual amount input, check out [lion-input-amount](https://github.com/ing-bank/lion/blob/
|
|
39
|
+
> For an actual amount input, check out [lion-input-amount](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input-amount/overview.md).
|
|
40
40
|
> This comes with its own formatter, parser, serializer.
|
|
41
41
|
|
|
42
42
|
### Parsers & modelValue
|
|
@@ -243,16 +243,16 @@ Below we show three flow diagrams to show the flow of formatting, serializing an
|
|
|
243
243
|
|
|
244
244
|
Where a user changes the input with their keyboard:
|
|
245
245
|
|
|
246
|
-

|
|
247
247
|
|
|
248
248
|
### Unparseable flow
|
|
249
249
|
|
|
250
250
|
Where a user sets the input to something that is not parseable by the parser:
|
|
251
251
|
|
|
252
|
-

|
|
253
253
|
|
|
254
254
|
### Imperative / programmatic flow
|
|
255
255
|
|
|
256
256
|
Where the developer sets the modelValue of the input programmatically:
|
|
257
257
|
|
|
258
|
-

|
|
@@ -34,7 +34,7 @@ level, via:
|
|
|
34
34
|
> Internal/private concepts like viewValue, formattedValue, serializedValue are therefore not
|
|
35
35
|
> recommended as a means of interaction.
|
|
36
36
|
|
|
37
|
-
For more information about parsing and the Unparseable type, see [Formatting and Parsing](https://github.com/ing-bank/lion/blob/
|
|
37
|
+
For more information about parsing and the Unparseable type, see [Formatting and Parsing](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/formatting-and-parsing.md)
|
|
38
38
|
|
|
39
39
|
### Event meta
|
|
40
40
|
|
|
@@ -33,9 +33,9 @@ Fields (think of an input, textarea, select) are the actual form controls the en
|
|
|
33
33
|
|
|
34
34
|
On top of this, they feature:
|
|
35
35
|
|
|
36
|
-
- [formatting/parsing/serializing](https://github.com/ing-bank/lion/blob/
|
|
37
|
-
- Advanced [validation](https://github.com/ing-bank/lion/blob/
|
|
38
|
-
- Creation of advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
36
|
+
- [formatting/parsing/serializing](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/formatting-and-parsing.md) of view values.
|
|
37
|
+
- Advanced [validation](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/validate.md) possibilities.
|
|
38
|
+
- Creation of advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/interaction-states.md).
|
|
39
39
|
- Provision of labels and help texts in an easy, declarative manner.
|
|
40
40
|
- Accessibility out of the box.
|
|
41
41
|
- Advanced styling possibilities: map your own Design System to the internal HTML structure.
|
|
@@ -44,33 +44,33 @@ On top of this, they feature:
|
|
|
44
44
|
|
|
45
45
|
### Platform fields (wrappers)
|
|
46
46
|
|
|
47
|
-
- [LionInput](https://github.com/ing-bank/lion/blob/
|
|
48
|
-
- [LionTextarea](https://github.com/ing-bank/lion/blob/
|
|
49
|
-
- [LionSelect](https://github.com/ing-bank/lion/blob/
|
|
47
|
+
- [LionInput](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input/overview.md), a wrapper for `<input>`.
|
|
48
|
+
- [LionTextarea](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/textarea/overview.md), a wrapper for `<textarea>`.
|
|
49
|
+
- [LionSelect](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/select/overview.md), a wrapper for `<select>`.
|
|
50
50
|
|
|
51
51
|
### Custom fields (wrappers)
|
|
52
52
|
|
|
53
|
-
Whenever a native form control doesn't exist or is not sufficient, a [custom form field](https://github.com/ing-bank/lion/blob/
|
|
53
|
+
Whenever a native form control doesn't exist or is not sufficient, a [custom form field](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/guides/how-to/create-a-custom-field.md) should be created. One could think of components like:
|
|
54
54
|
|
|
55
|
-
- [LionCombobox](https://github.com/ing-bank/lion/blob/
|
|
56
|
-
- [LionDate](https://github.com/ing-bank/lion/blob/
|
|
57
|
-
- [LionDatepicker](https://github.com/ing-bank/lion/blob/
|
|
58
|
-
- [LionListbox](https://github.com/ing-bank/lion/blob/
|
|
59
|
-
- [LionInputAmount](https://github.com/ing-bank/lion/blob/
|
|
60
|
-
- [LionInputEmail](https://github.com/ing-bank/lion/blob/
|
|
61
|
-
- [LionInputIban](https://github.com/ing-bank/lion/blob/
|
|
62
|
-
- [LionInputRange](https://github.com/ing-bank/lion/blob/
|
|
63
|
-
- [LionInputStepper](https://github.com/ing-bank/lion/blob/
|
|
64
|
-
- [LionSelectRich](https://github.com/ing-bank/lion/blob/
|
|
55
|
+
- [LionCombobox](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/combobox/overview.md), a custom implementation of a combobox.
|
|
56
|
+
- [LionDate](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input-date/overview.md), an alternative for `<input type="date">`.
|
|
57
|
+
- [LionDatepicker](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input-datepicker/overview.md), an alternative for `<input type="date">` including a calendar dropdown.
|
|
58
|
+
- [LionListbox](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/listbox/overview.md), a custom implementation of a listbox.
|
|
59
|
+
- [LionInputAmount](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input-amount/overview.md), an alternative for `<input type="number">` special for amounts.
|
|
60
|
+
- [LionInputEmail](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input-email/overview.md), an alternative for `<input type="email">`.
|
|
61
|
+
- [LionInputIban](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input-iban/overview.md), an ING specific for an input with IBAN numbers.
|
|
62
|
+
- [LionInputRange](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input-range/overview.md), an alternative for `<input type="range">`.
|
|
63
|
+
- [LionInputStepper](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input-stepper/overview.md), an alternative for `<input type="number">`.
|
|
64
|
+
- [LionSelectRich](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/select-rich/overview.md), an alternative for `<select>` with multiline options.
|
|
65
65
|
|
|
66
66
|
### Choice Input Fields
|
|
67
67
|
|
|
68
68
|
For form controls which return a `checked-state` you can use the `lion-choice-input` mixin. It is used in:
|
|
69
69
|
|
|
70
|
-
- [LionCheckbox](https://github.com/ing-bank/lion/blob/
|
|
70
|
+
- [LionCheckbox](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/checkbox-group/overview.md), a wrapper for `<input type="checkbox">`.
|
|
71
71
|
- LionOption, an alternative for `<option>`.
|
|
72
|
-
- [LionRadio](https://github.com/ing-bank/lion/blob/
|
|
73
|
-
- [LionSwitch](https://github.com/ing-bank/lion/blob/
|
|
72
|
+
- [LionRadio](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/radio-group/overview.md), a wrapper for `<input type="radio">`.
|
|
73
|
+
- [LionSwitch](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/switch/overview.md), a custom implementation of a switch.
|
|
74
74
|
|
|
75
75
|
Which contains the following features:
|
|
76
76
|
|
|
@@ -82,14 +82,14 @@ Which contains the following features:
|
|
|
82
82
|
|
|
83
83
|
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:
|
|
84
84
|
|
|
85
|
-
- [LionFieldset](https://github.com/ing-bank/lion/blob/
|
|
86
|
-
- [LionForm](https://github.com/ing-bank/lion/blob/
|
|
87
|
-
- [LionCheckboxGroup](https://github.com/ing-bank/lion/blob/
|
|
88
|
-
- [LionRadioGroup](https://github.com/ing-bank/lion/blob/
|
|
85
|
+
- [LionFieldset](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/fieldset/overview.md), a wrapper around multiple input fields or other fieldsets.
|
|
86
|
+
- [LionForm](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/form/overview.md), enhances the functionality of the native `<form>` component.
|
|
87
|
+
- [LionCheckboxGroup](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/checkbox-group/overview.md), a wrapper component for multiple checkboxes.
|
|
88
|
+
- [LionRadioGroup](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/radio-group/overview.md), a wrapper component for multiple radio inputs.
|
|
89
89
|
|
|
90
90
|
## Other Resources
|
|
91
91
|
|
|
92
|
-
- [Model Value](https://github.com/ing-bank/lion/blob/
|
|
93
|
-
- [Formatting and parsing](https://github.com/ing-bank/lion/blob/
|
|
94
|
-
- [Interaction states](https://github.com/ing-bank/lion/blob/
|
|
95
|
-
- [Validation System](https://github.com/ing-bank/lion/blob/
|
|
92
|
+
- [Model Value](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/model-value.md)
|
|
93
|
+
- [Formatting and parsing](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/formatting-and-parsing.md)
|
|
94
|
+
- [Interaction states](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/interaction-states.md)
|
|
95
|
+
- [Validation System](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/validate.md)
|
|
@@ -70,7 +70,7 @@ Validation happens on every change of `modelValue`. A change in modelValue can b
|
|
|
70
70
|
|
|
71
71
|
## When validation feedback will be shown
|
|
72
72
|
|
|
73
|
-
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/
|
|
73
|
+
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/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/interaction-states.md),
|
|
74
74
|
validity states can determine whether a validation message should be shown along the input field.
|
|
75
75
|
|
|
76
76
|
## Assessing field validation state programmatically
|
|
@@ -245,7 +245,7 @@ export const requiredValidator = () => html`
|
|
|
245
245
|
`;
|
|
246
246
|
```
|
|
247
247
|
|
|
248
|
-
The default `Required` validation message is "Please, enter a(n) {fieldName}". In which the "fieldName" can be provided separately via the `fieldName` attribute, with a fallback to the label. See [override fieldname](https://github.com/ing-bank/lion/blob/
|
|
248
|
+
The default `Required` validation message is "Please, enter a(n) {fieldName}". In which the "fieldName" can be provided separately via the `fieldName` attribute, with a fallback to the label. See [override fieldname](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/#override-fieldname) for more information.
|
|
249
249
|
|
|
250
250
|
Specific required messages for a select and file-upload are created.
|
|
251
251
|
|
|
@@ -22,15 +22,15 @@ In it's simplest form it is a function that returns the translated text for a na
|
|
|
22
22
|
- Formatting of numbers, amounts
|
|
23
23
|
- Formatting of dates
|
|
24
24
|
|
|
25
|
-
Further examples and a more in depth description can be found at the [Use Cases Page](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
Further examples and a more in depth description can be found at the [Use Cases Page](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/localize/use-cases.md).
|
|
26
26
|
|
|
27
27
|
## Content
|
|
28
28
|
|
|
29
29
|
| Feature | Description |
|
|
30
30
|
| ---------------------------------------- | --------------------------------------------- |
|
|
31
|
-
| [Translate Text](https://github.com/ing-bank/lion/blob/
|
|
32
|
-
| [Format Numbers](https://github.com/ing-bank/lion/blob/
|
|
33
|
-
| [Format Dates](https://github.com/ing-bank/lion/blob/
|
|
31
|
+
| [Translate Text](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/localize/text.md) | Load and translate text in multiple languages |
|
|
32
|
+
| [Format Numbers](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/localize/numbers.md) | Format numbers in multiple languages |
|
|
33
|
+
| [Format Dates](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/localize/dates.md) | Format dates in multiple languages |
|
|
34
34
|
|
|
35
35
|
## Installation
|
|
36
36
|
|