@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
|
@@ -31,11 +31,11 @@ import '@lion/ui/define/lion-checkbox.js';
|
|
|
31
31
|
</lion-checkbox-group>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
> Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/
|
|
34
|
+
> Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/form/overview.md)'s serialization result.
|
|
35
35
|
|
|
36
36
|
## Features
|
|
37
37
|
|
|
38
|
-
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/
|
|
38
|
+
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/fieldset/overview.md),
|
|
39
39
|
it has all the features a fieldset has.
|
|
40
40
|
|
|
41
41
|
## Installation
|
|
@@ -34,7 +34,7 @@ export const main = () => html`
|
|
|
34
34
|
## Features
|
|
35
35
|
|
|
36
36
|
- Use `opened` attribute or `toggle()` method to render default open.
|
|
37
|
-
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/
|
|
37
|
+
- `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/button/overview.md) or native `button` with custom styling.
|
|
38
38
|
- Observe the state with the help of `@opened-changed` event.
|
|
39
39
|
- `show()` and `hide()` are helper methods to hide or show the content from outside.
|
|
40
40
|
|
|
@@ -20,10 +20,8 @@ eleventyNavigation:
|
|
|
20
20
|
| ---------------------------- | --------- | ---------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
21
21
|
| `allowCustomChoice` | public | `boolean` | | | |
|
|
22
22
|
| `autocomplete` | public | `'none'\|'list'\|'inline'\|'both'` | `'both'` | When "list", will filter listbox suggestions based on textbox value.
When "both", an inline completion string will be added to the textbox as well. | |
|
|
23
|
-
| `config` | public | `Partial<OverlayConfig>` | `{}` | Configure the many options of the \`OverlayController\` | OverlayMixin |
|
|
24
23
|
| `matchMode` | public | `'begin'\|'all'` | `'all'` | When typing in the textbox, will by default be set on 'begin',
only matching the beginning part in suggestion list.
=> 'a' will match 'apple' from \['apple', 'pear', 'citrus'].
When set to 'all', will match middle of the word as well
=> 'a' will match 'apple' and 'pear' | |
|
|
25
24
|
| `modelValue` | public | | | | |
|
|
26
|
-
| `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 |
|
|
27
25
|
| `requireOptionMatch` | public | `boolean` | `true` | If set to false, the value is allowed to not match any of the options.
We set the default to true for backwards compatibility | |
|
|
28
26
|
| `rotateKeyboardNavigation` | public | `boolean` | `true` | | |
|
|
29
27
|
| `selectionFollowsFocus` | public | `boolean` | `true` | | |
|
|
@@ -39,66 +37,55 @@ eleventyNavigation:
|
|
|
39
37
|
| `_listboxNode` | protected | | | | |
|
|
40
38
|
| `_listboxReceivesNoFocus` | protected | `boolean` | `true` | | |
|
|
41
39
|
| `_noTypeAhead` | protected | `boolean` | `true` | | |
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `_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 |
|
|
46
|
-
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
|
|
40
|
+
| `_overlayContentNode` | protected | | | | |
|
|
41
|
+
| `_overlayInvokerNode` | protected | | | | |
|
|
42
|
+
| `_overlayReferenceNode` | protected | | | | |
|
|
47
43
|
| `_selectionDisplayNode` | protected | `SelectionDisplay \| null` | | | |
|
|
48
44
|
|
|
49
45
|
### Methods
|
|
50
46
|
|
|
51
|
-
| Name
|
|
52
|
-
|
|
|
53
|
-
| `clear`
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `_syncToTextboxCondition` | protected | | `modelValue: string\|string[], oldModelValue: string\|string[], { phase }, config: {phase?:string}` | | |
|
|
88
|
-
| `_syncToTextboxMultiple` | protected | | `modelValue: string[], oldModelValue: string[]` | | |
|
|
89
|
-
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
90
|
-
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
|
|
91
|
-
| `_textboxOnClick` | protected | | `ev: FocusEvent` | | |
|
|
92
|
-
| `_textboxOnInput` | protected | | `ev: Event` | | |
|
|
93
|
-
| `_textboxOnKeydown` | protected | | `ev: KeyboardEvent` | | |
|
|
94
|
-
| `_unhighlightMatchedOption` | protected | | `option: Element` | | |
|
|
47
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
48
|
+
| ----------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------- | -------------- |
|
|
49
|
+
| `clear` | public | | | | |
|
|
50
|
+
| `matchCondition` | public | When the preconfigurable \`match-mode\` conditions are not sufficient,
one can define a custom matching function. | `option: LionOption, textboxValue: string` | | |
|
|
51
|
+
| `parser` | public | Converts viewValue to modelValue | `value: string\|string[]` | `*` | |
|
|
52
|
+
| `reset` | public | | | | |
|
|
53
|
+
| `_autoSelectCondition` | protected | When this condition is false, an end user will have to manually select a suggested
option from the list (by default when autocomplete is 'none' or 'list').
For autocomplete 'both' or 'inline', it will automatically select on a match. | | | |
|
|
54
|
+
| `_defineOverlayConfig` | protected | | | | |
|
|
55
|
+
| `_enhanceLightDomClasses` | protected | | | | |
|
|
56
|
+
| `_getTextboxValueFromOption` | protected | Return the value to be used for the input value | `option: LionOption` | `string` | |
|
|
57
|
+
| `_groupTwoTemplate` | protected | | | | |
|
|
58
|
+
| `_handleAutocompletion` | protected | Handles autocompletion. This entails:
- list: shows a list on keydown character press
- filter: filters list of potential matches according to matchmode or provided matchCondition
- focus: automatically focuses closest match (makes it the activedescendant)
- check: automatically checks/selects closest match when selection-follows-focus is enabled
(this is the default configuration)
- complete: completes the textbox value inline (the 'missing characters' will be added as
selected text) | | | |
|
|
59
|
+
| `_highlightMatchedOption` | protected | | `option: Element, matchingString: string` | | |
|
|
60
|
+
| `_inputGroupInputTemplate` | protected | | | | |
|
|
61
|
+
| `_listboxOnClick` | protected | | `ev: MouseEvent` | | |
|
|
62
|
+
| `_listboxOnKeyDown` | protected | | `ev: KeyboardEvent` | | |
|
|
63
|
+
| `_onFilterMatch` | protected | | `option: LionOption & {__originalInnerHTML?:string}, matchingString: string` | | |
|
|
64
|
+
| `_onFilterUnmatch` | protected | | `option: LionOption & {__originalInnerHTML?:string}, curValue: string, prevValue: string` | | |
|
|
65
|
+
| `_onKeyUp` | protected | | `ev: KeyboardEvent` | | |
|
|
66
|
+
| `_onListboxContentChanged` | protected | | | | |
|
|
67
|
+
| `_overlayListboxTemplate` | protected | | | | |
|
|
68
|
+
| `_repropagationCondition` | protected | | `target: FormControlHost` | | |
|
|
69
|
+
| `_resetListboxOptions` | protected | | | | |
|
|
70
|
+
| `_setTextboxValue` | protected | | `v: string` | | |
|
|
71
|
+
| `_setupListboxNode` | protected | | | | |
|
|
72
|
+
| `_setupOpenCloseListeners` | protected | | | | |
|
|
73
|
+
| `_setupOverlayCtrl` | protected | | | | |
|
|
74
|
+
| `_showOverlayCondition` | protected | | `{ lastKey }, options: { currentValue?: string, lastKey?: string }` | `boolean` | |
|
|
75
|
+
| `_syncToTextboxCondition` | protected | | `modelValue: string\|string[], oldModelValue: string\|string[], { phase }, config: {phase?:string}` | | |
|
|
76
|
+
| `_syncToTextboxMultiple` | protected | | `modelValue: string[], oldModelValue: string[]` | | |
|
|
77
|
+
| `_teardownOpenCloseListeners` | protected | | | | |
|
|
78
|
+
| `_teardownOverlayCtrl` | protected | | | | |
|
|
79
|
+
| `_textboxOnClick` | protected | | `ev: FocusEvent` | | |
|
|
80
|
+
| `_textboxOnInput` | protected | | `ev: Event` | | |
|
|
81
|
+
| `_textboxOnKeydown` | protected | | `ev: KeyboardEvent` | | |
|
|
82
|
+
| `_unhighlightMatchedOption` | protected | | `option: Element` | | |
|
|
95
83
|
|
|
96
84
|
### Events
|
|
97
85
|
|
|
98
86
|
| Name | Type | Description | Inherited From |
|
|
99
87
|
| --------------------- | ------------- | ----------- | -------------- |
|
|
100
88
|
| `model-value-changed` | `CustomEvent` | | |
|
|
101
|
-
| `opened-changed` | `CustomEvent` | | OverlayMixin |
|
|
102
89
|
|
|
103
90
|
### Attributes
|
|
104
91
|
|
|
@@ -110,7 +97,6 @@ eleventyNavigation:
|
|
|
110
97
|
| `requireOptionMatch` | requireOptionMatch | |
|
|
111
98
|
| `allow-custom-choice` | allowCustomChoice | |
|
|
112
99
|
| `__shouldAutocompleteNextUpdate` | \_\_shouldAutocompleteNextUpdate | |
|
|
113
|
-
| `opened` | opened | OverlayMixin |
|
|
114
100
|
|
|
115
101
|
### Slots
|
|
116
102
|
|
|
@@ -46,7 +46,7 @@ export const main = () => html`
|
|
|
46
46
|
`;
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
[...show more](https://github.com/ing-bank/lion/blob/
|
|
49
|
+
[...show more](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/combobox/extensions.md)
|
|
50
50
|
|
|
51
51
|
## Features
|
|
52
52
|
|
|
@@ -558,4 +558,4 @@ export const complexObjectChoiceValue = () =>
|
|
|
558
558
|
## Listbox compatibility
|
|
559
559
|
|
|
560
560
|
All configurations that can be applied to `lion-listbox`, can be applied to `lion-combobox` as well.
|
|
561
|
-
See the [listbox documentation](https://github.com/ing-bank/lion/blob/
|
|
561
|
+
See the [listbox documentation](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/listbox/overview.md) for more information.
|
|
@@ -16,46 +16,20 @@ eleventyNavigation:
|
|
|
16
16
|
|
|
17
17
|
### Fields
|
|
18
18
|
|
|
19
|
-
| Name
|
|
20
|
-
|
|
|
21
|
-
| `
|
|
22
|
-
| `isAlertDialog` | public | `boolean` | `false` | | |
|
|
23
|
-
| `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 |
|
|
24
|
-
| `_overlayBackdropNode` | protected | | | | OverlayMixin |
|
|
25
|
-
| `_overlayContentNode` | protected | | | | OverlayMixin |
|
|
26
|
-
| `_overlayContentWrapperNode` | protected | | | | OverlayMixin |
|
|
27
|
-
| `_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 |
|
|
28
|
-
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
|
|
19
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
20
|
+
| --------------- | ------- | --------- | ------- | ----------- | -------------- |
|
|
21
|
+
| `isAlertDialog` | public | `boolean` | `false` | | |
|
|
29
22
|
|
|
30
23
|
### Methods
|
|
31
24
|
|
|
32
|
-
| Name
|
|
33
|
-
|
|
|
34
|
-
| `
|
|
35
|
-
| `open` | public | Shows the overlay | | | OverlayMixin |
|
|
36
|
-
| `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 |
|
|
37
|
-
| `toggle` | public | Toggles the overlay | | | OverlayMixin |
|
|
38
|
-
| `_defineOverlay` | protected | | `{ contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfig` | `OverlayController` | OverlayMixin |
|
|
39
|
-
| `_defineOverlayConfig` | protected | | | `OverlayConfig` | OverlayMixin |
|
|
40
|
-
| `_getInvokerNode` | protected | | | `Element\|null` | OverlayMixin |
|
|
41
|
-
| `_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 |
|
|
42
|
-
| `_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 |
|
|
43
|
-
| `_setupOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
44
|
-
| `_setupOverlayCtrl` | protected | | | | OverlayMixin |
|
|
45
|
-
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
46
|
-
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
|
|
47
|
-
|
|
48
|
-
### Events
|
|
49
|
-
|
|
50
|
-
| Name | Type | Description | Inherited From |
|
|
51
|
-
| ---------------- | ------------- | ----------- | -------------- |
|
|
52
|
-
| `opened-changed` | `CustomEvent` | | OverlayMixin |
|
|
25
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
26
|
+
| ---------------------- | --------- | ----------- | ---------- | ------ | -------------- |
|
|
27
|
+
| `_defineOverlayConfig` | protected | | | | |
|
|
53
28
|
|
|
54
29
|
### Attributes
|
|
55
30
|
|
|
56
31
|
| Name | Field | Inherited From |
|
|
57
32
|
| ----------------- | ------------- | -------------- |
|
|
58
33
|
| `is-alert-dialog` | isAlertDialog | |
|
|
59
|
-
| `opened` | opened | OverlayMixin |
|
|
60
34
|
|
|
61
35
|
<hr/>
|
|
@@ -66,6 +66,6 @@ import '@lion/ui/define/lion-dialog.js';
|
|
|
66
66
|
## Changing the configuration
|
|
67
67
|
|
|
68
68
|
You can use the `.config` property on the dialog to change the configuration.
|
|
69
|
-
The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/
|
|
69
|
+
The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/overlays/configuration.md).
|
|
70
70
|
|
|
71
71
|
The `config` property uses a setter to merge the passed configuration with the current, so you only **overwrite what you pass** when updating `config`.
|
|
@@ -32,9 +32,9 @@ export const main = () => html`
|
|
|
32
32
|
|
|
33
33
|
We have three specific fieldset implementations:
|
|
34
34
|
|
|
35
|
-
- [form](https://github.com/ing-bank/lion/blob/
|
|
36
|
-
- [checkbox-group](https://github.com/ing-bank/lion/blob/
|
|
37
|
-
- [radio-group](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- [form](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/form/overview.md)
|
|
36
|
+
- [checkbox-group](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/checkbox-group/overview.md)
|
|
37
|
+
- [radio-group](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/radio-group/overview.md)
|
|
38
38
|
|
|
39
39
|
A native fieldset element should always have a legend-element for a11y purposes.
|
|
40
40
|
However, our fieldset element is not native and should not have a legend-element.
|
|
@@ -43,8 +43,8 @@ Our fieldset instead has a label attribute or you can add a label with a div- or
|
|
|
43
43
|
## Features
|
|
44
44
|
|
|
45
45
|
- Easy retrieval of form data based on field names
|
|
46
|
-
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
47
|
-
- Can have [validate](https://github.com/ing-bank/lion/blob/
|
|
46
|
+
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/interaction-states.md)
|
|
47
|
+
- Can have [validate](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/validate.md) on fieldset level and shows the validation feedback below the fieldset
|
|
48
48
|
- Can disable input fields on fieldset level
|
|
49
49
|
- Accessible out of the box
|
|
50
50
|
|
|
@@ -20,7 +20,7 @@ import '@lion/ui/define/lion-form.js';
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
A web component that enhances the functionality of the native `form` component.
|
|
23
|
-
It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/overview.md).
|
|
24
24
|
|
|
25
25
|
```js preview-story
|
|
26
26
|
export const main = () => {
|
|
@@ -49,11 +49,11 @@ export const main = () => {
|
|
|
49
49
|
- Data synchronization with models
|
|
50
50
|
- Easy retrieval of form data based on field names
|
|
51
51
|
- Advanced validation possibilities
|
|
52
|
-
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/
|
|
52
|
+
- Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/interaction-states.md)
|
|
53
53
|
- Registration mechanism for form controls
|
|
54
54
|
- Accessible out of the box
|
|
55
55
|
|
|
56
|
-
For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/
|
|
56
|
+
For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/overview.md).
|
|
57
57
|
|
|
58
58
|
## Installation
|
|
59
59
|
|
|
@@ -26,7 +26,7 @@ import '@lion/ui/define/lion-form.js';
|
|
|
26
26
|
To submit a form, use a regular `<button>` (or `<lion-button-submit>`) somewhere inside the native `<form>`. Then, add a `submit` handler on the `<lion-form>`. You can use this event to do your own (pre-)submit logic, like getting the serialized form data and sending it to a backend API.
|
|
27
27
|
|
|
28
28
|
Another example is checking if the form has errors, and focusing the first field with a validation error.
|
|
29
|
-
To learn more about form validation, please take a look at [validate](https://github.com/ing-bank/lion/blob/
|
|
29
|
+
To learn more about form validation, please take a look at [validate](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/validate.md).
|
|
30
30
|
|
|
31
31
|
To fire a submit from JavaScript, select the `<lion-form>` element and call `.submit()`.
|
|
32
32
|
|
|
@@ -128,7 +128,7 @@ export const prefilledData = () => {
|
|
|
128
128
|
};
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
Learn more about [formatting and parsing](https://github.com/ing-bank/lion/blob/
|
|
131
|
+
Learn more about [formatting and parsing](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/formatting-and-parsing.md).
|
|
132
132
|
|
|
133
133
|
## Sub forms
|
|
134
134
|
|
|
@@ -25,7 +25,7 @@ import '@lion/ui/define/lion-icon.js';
|
|
|
25
25
|
## Icon sets
|
|
26
26
|
|
|
27
27
|
Icons are displayed using icon sets. These are collections of icons, lazily loaded on demand for performance.
|
|
28
|
-
See the [system documentation](https://github.com/ing-bank/lion/blob/
|
|
28
|
+
See the [system documentation](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/icon/overview.md) to learn more about icon sets.
|
|
29
29
|
|
|
30
30
|
```js preview-story
|
|
31
31
|
export const iconSets = () => html`
|
|
@@ -35,7 +35,7 @@ export const main = () => html`<lion-input label="First Name"></lion-input>`;
|
|
|
35
35
|
- **before**: does not have an active use case yet, but the option is in place.
|
|
36
36
|
- **after**: can be used to show a currency or percentage.
|
|
37
37
|
- Delegates attributes like `type`, `disabled`, `placeholder` and `readonly` to the native input.
|
|
38
|
-
- Can make use of [validation](https://github.com/ing-bank/lion/blob/
|
|
38
|
+
- Can make use of [validation](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/validate.md).
|
|
39
39
|
|
|
40
40
|
## Installation
|
|
41
41
|
|
|
@@ -36,13 +36,13 @@ export const main = () => {
|
|
|
36
36
|
|
|
37
37
|
## Features
|
|
38
38
|
|
|
39
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
40
|
-
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/
|
|
39
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input/overview.md)
|
|
40
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
41
41
|
- Option to show currency as a suffix
|
|
42
42
|
- Option to override locale to change the formatting and parsing
|
|
43
43
|
- Option to provide additional format options overrides
|
|
44
44
|
- Default label in different languages
|
|
45
|
-
- Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/
|
|
45
|
+
- Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
46
46
|
- IsNumber (default)
|
|
47
47
|
- MinNumber
|
|
48
48
|
- MaxNumber
|
|
@@ -28,11 +28,11 @@ import '@lion/ui/define/lion-input-date.js';
|
|
|
28
28
|
|
|
29
29
|
## Features
|
|
30
30
|
|
|
31
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
32
|
-
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/
|
|
31
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input/overview.md)
|
|
32
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
|
|
33
33
|
- Option to override locale to change the formatting and parsing
|
|
34
34
|
- Default label in different languages
|
|
35
|
-
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
36
36
|
- IsDate (default)
|
|
37
37
|
- MinDate
|
|
38
38
|
- MaxDate
|