@lion/ui 0.17.0 → 0.18.0-menu-system.1
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/collapsible.js +1 -0
- package/components/button/src/LionButton.js +4 -0
- package/components/button/test-suites/LionButton.suite.js +1 -0
- package/components/calendar/src/LionCalendar.js +2 -0
- package/components/collapsible/src/DisclosureMixin.js +313 -0
- package/components/collapsible/types/DisclosureMixinTypes.ts +48 -0
- package/components/combobox/test/lion-combobox.test.js +1 -0
- package/components/form-core/src/form-group/FormGroupMixin.js +7 -0
- package/components/form-core/src/registration/FormRegistrarMixin.js +11 -0
- package/components/form-core/test/FormControlMixin.test.js +1 -0
- package/components/form-core/test/validate/Validator.test.js +2 -0
- package/components/form-core/test-suites/ValidateMixin.suite.js +2 -0
- package/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.js +1 -0
- package/components/input-datepicker/src/localizeNamespaceLoader.js +1 -0
- package/components/input-datepicker/test/lion-input-datepicker.test.js +5 -6
- package/components/localize/test/date/formatDate.test.js +1 -0
- package/components/menu/CHANGELOG.md +37 -0
- package/components/menu/README.md +335 -0
- package/components/menu/index.js +2 -0
- package/components/menu/lion-menu-overlay.js +3 -0
- package/components/menu/lion-menu.js +3 -0
- package/components/menu/lion-spinbutton.js +3 -0
- package/components/menu/lion-toolbar.js +3 -0
- package/components/menu/lion-tree.js +3 -0
- package/components/menu/package.json +46 -0
- package/components/menu/requirements.temp.md +12 -0
- package/components/menu/src/InteractiveListMixin.js +805 -0
- package/components/menu/src/LionMenu.js +250 -0
- package/components/menu/src/LionMenuHybrid.js +46 -0
- package/components/menu/src/LionMenuOverlay.js +155 -0
- package/components/menu/src/LionSpinbutton.js +213 -0
- package/components/menu/src/LionToolbar.js +94 -0
- package/components/menu/src/LionTree.js +52 -0
- package/components/menu/src/MoreButtonMenuMixin.js +297 -0
- package/components/menu/src/MultiLevelListMixin.js +274 -0
- package/components/menu/src/utils/isInView.js +26 -0
- package/components/menu/src/utils/listItemInteractions.js +104 -0
- package/components/menu/src/utils/uuid.js +3 -0
- package/components/menu/test/lion-menu.test.js +3 -0
- package/components/menu/test-suites/InteractiveListMixin.suite.js +142 -0
- package/components/menu/types/InteractiveListMixinTypes.d.ts +82 -0
- package/components/navigation-bar/README.md +1 -0
- package/components/navigation-bar/src/LionNavigationBar.js +439 -0
- package/components/navigation-bar/src/types.js +41 -0
- package/components/overlays/NEXT.md +49 -0
- package/components/overlays/src/OverlayController.js +244 -111
- package/components/overlays/src/OverlayMixin.js +58 -11
- package/components/overlays/src/OverlaysManager.js +2 -2
- package/components/overlays/src/utils/adopt-styles.js +3 -2
- package/components/overlays/src/utils/get-focusable-elements.js +4 -0
- package/components/overlays/src/utils/is-equal-config.js +10 -6
- package/components/overlays/test/OverlayController.test.js +5 -3
- package/components/overlays/test/utils-tests/is-equal-config.test.js +1 -1
- package/components/overlays/test-suites/OverlayMixin.suite.js +8 -8
- package/components/overlays/types/OverlayConfig.ts +16 -5
- package/components/select-rich/test/lion-select-rich.test.js +3 -0
- package/custom-elements.json +32144 -19531
- package/dist-types/components/button/src/LionButton.d.ts +1 -0
- package/dist-types/components/button/src/LionButton.d.ts.map +1 -1
- package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
- package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
- package/dist-types/components/collapsible/src/DisclosureMixin.d.ts +3 -0
- package/dist-types/components/collapsible/src/DisclosureMixin.d.ts.map +1 -0
- package/dist-types/components/collapsible/types/DisclosureMixinTypes.d.ts +24 -0
- package/dist-types/components/collapsible/types/DisclosureMixinTypes.d.ts.map +1 -0
- package/dist-types/components/dialog/src/LionDialog.d.ts +3 -1
- package/dist-types/components/dialog/src/LionDialog.d.ts.map +1 -1
- package/dist-types/components/form-core/src/form-group/FormGroupMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/registration/FormRegistrarMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/ValidateMixin.suite.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts.map +1 -1
- package/dist-types/components/menu/index.d.ts +3 -0
- package/dist-types/components/menu/index.d.ts.map +1 -0
- package/dist-types/components/menu/lion-menu-overlay.d.ts +2 -0
- package/dist-types/components/menu/lion-menu-overlay.d.ts.map +1 -0
- package/dist-types/components/menu/lion-menu.d.ts +2 -0
- package/dist-types/components/menu/lion-menu.d.ts.map +1 -0
- package/dist-types/components/menu/lion-spinbutton.d.ts +2 -0
- package/dist-types/components/menu/lion-spinbutton.d.ts.map +1 -0
- package/dist-types/components/menu/lion-toolbar.d.ts +2 -0
- package/dist-types/components/menu/lion-toolbar.d.ts.map +1 -0
- package/dist-types/components/menu/lion-tree.d.ts +2 -0
- package/dist-types/components/menu/lion-tree.d.ts.map +1 -0
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts +611 -0
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionMenu.d.ts +563 -0
- package/dist-types/components/menu/src/LionMenu.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionMenuHybrid.d.ts +19 -0
- package/dist-types/components/menu/src/LionMenuHybrid.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionMenuOverlay.d.ts +1007 -0
- package/dist-types/components/menu/src/LionMenuOverlay.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionSpinbutton.d.ts +58 -0
- package/dist-types/components/menu/src/LionSpinbutton.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionToolbar.d.ts +8 -0
- package/dist-types/components/menu/src/LionToolbar.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionTree.d.ts +445 -0
- package/dist-types/components/menu/src/LionTree.d.ts.map +1 -0
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts +31 -0
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts +493 -0
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/isInView.d.ts +9 -0
- package/dist-types/components/menu/src/utils/isInView.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts +42 -0
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/uuid.d.ts +2 -0
- package/dist-types/components/menu/src/utils/uuid.d.ts.map +1 -0
- package/dist-types/components/menu/test/lion-menu.test.d.ts +2 -0
- package/dist-types/components/menu/test/lion-menu.test.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts +13 -0
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts.map +1 -0
- package/dist-types/components/navigation-bar/src/LionNavigationBar.d.ts +238 -0
- package/dist-types/components/navigation-bar/src/LionNavigationBar.d.ts.map +1 -0
- package/dist-types/components/navigation-bar/src/types.d.ts +85 -0
- package/dist-types/components/navigation-bar/src/types.d.ts.map +1 -0
- package/dist-types/components/overlays/src/OverlayController.d.ts +9 -13
- 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/get-focusable-elements.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/OverlayConfig.d.ts +10 -2
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +8 -2
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/exports/define/lion-item.d.ts +2 -0
- package/dist-types/exports/define/lion-item.d.ts.map +1 -0
- package/dist-types/exports/define/lion-menu-overlay.d.ts +2 -0
- package/dist-types/exports/define/lion-menu-overlay.d.ts.map +1 -0
- package/dist-types/exports/define/lion-menu.d.ts +2 -0
- package/dist-types/exports/define/lion-menu.d.ts.map +1 -0
- package/dist-types/exports/define/lion-navigation-bar.d.ts +2 -0
- package/dist-types/exports/define/lion-navigation-bar.d.ts.map +1 -0
- package/dist-types/exports/define/lion-toolbar.d.ts +2 -0
- package/dist-types/exports/define/lion-toolbar.d.ts.map +1 -0
- package/dist-types/exports/define/lion-tree.d.ts +2 -0
- package/dist-types/exports/define/lion-tree.d.ts.map +1 -0
- package/dist-types/exports/menu.d.ts +7 -0
- package/dist-types/exports/menu.d.ts.map +1 -0
- package/dist-types/exports/navigation-bar.d.ts +2 -0
- package/dist-types/exports/navigation-bar.d.ts.map +1 -0
- package/dist-types/exports/overlays.d.ts +3 -0
- 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 +21 -8
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/api-table.md +31 -6
- 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 +21 -4
- 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/menu/api-table.md +450 -0
- package/docs/components/menu/applyMenuDemoStyles.js +173 -0
- package/docs/components/menu/extensions.md +235 -0
- package/docs/components/menu/index.md +13 -0
- package/docs/components/menu/overview.md +422 -0
- 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 +21 -5
- 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 +36 -11
- 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 +34 -34
- 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/collapsible.js +1 -0
- package/exports/define/lion-item.js +3 -0
- package/exports/define/lion-menu-overlay.js +3 -0
- package/exports/define/lion-menu.js +3 -0
- package/exports/define/lion-navigation-bar.js +3 -0
- package/exports/define/lion-toolbar.js +3 -0
- package/exports/define/lion-tree.js +3 -0
- package/exports/menu.js +7 -0
- package/exports/navigation-bar.js +1 -0
- package/exports/overlays.js +6 -0
- package/menu.js +7 -0
- package/navigation-bar.js +1 -0
- package/overlays.js +6 -0
- package/package.json +1 -1
|
@@ -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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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
|
|
|
@@ -23,6 +23,7 @@ eleventyNavigation:
|
|
|
23
23
|
| `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. | |
|
|
24
24
|
| `autofocus` | public | `boolean` | `false` | | FocusMixin |
|
|
25
25
|
| `checkedIndex` | public | `number \| number[]` | | | ListboxMixin |
|
|
26
|
+
| `config` | public | `Partial<OverlayConfig>` | `{}` | Configure the many options of the \`OverlayController\` | OverlayMixin |
|
|
26
27
|
| `customChoices` | public | | | Custom elements are all missing elements that have no corresponding element, independent if enabled or not. | CustomChoiceGroupMixin |
|
|
27
28
|
| `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.
A date input for instance, always needs the isDate validator. | ValidateMixin |
|
|
28
29
|
| `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | InteractionStateMixin |
|
|
@@ -44,6 +45,7 @@ eleventyNavigation:
|
|
|
44
45
|
| `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' | |
|
|
45
46
|
| `modelValue` | public | `object` | | | FormControlMixin |
|
|
46
47
|
| `multipleChoice` | public | `boolean` | `false` | When false (default), modelValue and serializedValue will reflect the
currently selected choice (usually a string). When true, modelValue will and
serializedValue will be an array of strings. | ChoiceGroupMixin |
|
|
48
|
+
| `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 |
|
|
47
49
|
| `operationMode` | public | `OperationMode` | | Types of input interaction of the FormControl (for instance 'enter'\|'select'\|'upload') | ValidateMixin |
|
|
48
50
|
| `orientation` | public | `string` | `'vertical'` | Informs screen reader and affects keyboard navigation.
By default 'vertical' | ListboxMixin |
|
|
49
51
|
| `prefilled` | public | `boolean` | `false` | True when user has left non-empty field or input is prefilled.
The name must be seen from the point of view of the input field:
once the user enters the input field, the value is non-empty. | InteractionStateMixin |
|
|
@@ -84,9 +86,11 @@ eleventyNavigation:
|
|
|
84
86
|
| `_listboxSlot` | protected | `HTMLElement` | | | ListboxMixin |
|
|
85
87
|
| `_noTypeAhead` | public | `boolean` | `true` | When false, a user can type on which the focus will jump to the matching option | ListboxMixin |
|
|
86
88
|
| `_oldModelValue` | protected | `string \| string[] \| undefined` | `undefined` | | ListboxMixin |
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
89
|
+
| `_overlayBackdropNode` | protected | | | | OverlayMixin |
|
|
90
|
+
| `_overlayContentNode` | protected | | | | OverlayMixin |
|
|
91
|
+
| `_overlayContentWrapperNode` | protected | | | | OverlayMixin |
|
|
92
|
+
| `_overlayInvokerNode` | protected | | | | OverlayMixin |
|
|
93
|
+
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
|
|
90
94
|
| `_repropagationRole` | public | `'child'\|'choice-group'\|'fieldset'` | `'choice-group'` | Based on the role, details of handling model-value-changed repropagation differ. | FormControlMixin |
|
|
91
95
|
| `_requestedToBeDisabled` | protected | `boolean` | `false` | | DisabledMixin |
|
|
92
96
|
| `_scrollTargetNode` | protected | `HTMLElement` | | | ListboxMixin |
|
|
@@ -105,25 +109,30 @@ eleventyNavigation:
|
|
|
105
109
|
| `blur` | public | Calls \`blur()\` on focusable element within | | | FocusMixin |
|
|
106
110
|
| `clear` | public | | | | ChoiceGroupMixin |
|
|
107
111
|
| `click` | public | | | | DisabledMixin |
|
|
112
|
+
| `close` | public | Hides the overlay | | | OverlayMixin |
|
|
108
113
|
| `feedbackCondition` | public | Allows the Application Developer to specify when a feedback message should be shown | `type: string, meta: object, currentCondition: ((type: string, meta: object) => boolean)` | `boolean` | ValidateMixin |
|
|
109
114
|
| `focus` | public | Calls \`focus()\` on focusable element within | | | FocusMixin |
|
|
110
115
|
| `initInteractionState` | public | Evaluations performed on connectedCallback.
This method is public, so it can be called at a later moment (when we need to wait for
registering children for instance) as well.
Since this method will be called twice in last mentioned scenario, it must stay idempotent. | | | InteractionStateMixin |
|
|
111
116
|
| `isRegisteredFormElement` | public | | `el: ElementWithParentFormGroup` | | FormRegistrarMixin |
|
|
112
117
|
| `makeRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
113
118
|
| `matchCondition` | public | When the preconfigurable \`match-mode\` conditions are not sufficient,
one can define a custom matching function. | `option: LionOption, textboxValue: string` | | |
|
|
119
|
+
| `open` | public | Shows the overlay | | | OverlayMixin |
|
|
114
120
|
| `parser` | public | Converts viewValue to modelValue | `value: string\|string[]` | `*` | CustomChoiceGroupMixin |
|
|
115
121
|
| `removeFormElement` | public | | `child: FormControlHost` | | FormRegistrarMixin |
|
|
116
122
|
| `removeFromAriaDescribedBy` | public | Allows to remove element references from aria-describedby attribute. | `element: HTMLElement` | | FormControlMixin |
|
|
117
123
|
| `removeFromAriaLabelledBy` | public | Allows to remove element references from aria-labelledby attribute. | `element: HTMLElement` | | FormControlMixin |
|
|
124
|
+
| `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 |
|
|
118
125
|
| `reset` | public | | | | ListboxMixin |
|
|
119
126
|
| `resetInteractionState` | public | Resets touched and dirty, and recomputes prefilled | | | InteractionStateMixin |
|
|
120
127
|
| `retractRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
121
128
|
| `setCheckedIndex` | public | If an array is passed for multiple-choice, it will check the indexes in array, and uncheck the rest
If a number is passed, the item with the passed index is checked without unchecking others
For single choice, \_\_onChildCheckedChanged we ensure that we uncheck siblings | `index: number\|number[]` | | ListboxMixin |
|
|
129
|
+
| `toggle` | public | Toggles the overlay | | | OverlayMixin |
|
|
122
130
|
| `validate` | public | Triggered by:
 \- modelValue change
 \- change in the 'validators' array
 \- change in the config of an individual Validator

Three situations are handled:
- a1) the FormControl is empty: further execution is halted. When the Required Validator
(being mutually exclusive to the other Validators) is applied, it will end up in the
validation result (as the only Validator, since further execution was halted).
- a2) there are synchronous Validators: this is the most common flow. When modelValue hasn't
changed since last async results were generated, 'sync results' are merged with the
'async results'.
- a3) there are asynchronous Validators: for instance when server side evaluation is needed.
Executions are scheduled and awaited and the 'async results' are merged with the
'sync results'.

- b) there are MetaValidators. After steps a1, a2, or a3 are finished, the holistic
MetaValidators (evaluating the total result of the 'regular' (a1, a2 and a3) validators)
will be run...

Situations a2 and a3 are not mutually exclusive and can be triggered within one \`validate()\`
call. Situation b will occur after every call. | `{ clearCurrentResult = false }, opts: { clearCurrentResult?: boolean }` | | ValidateMixin |
|
|
123
131
|
| `_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. | | | |
|
|
124
132
|
| `_checkSingleChoiceElements` | protected | | `ev: CustomEvent & {target:FormControl}` | | ChoiceGroupMixin |
|
|
125
133
|
| `_completeRegistration` | protected | Resolves the registrationComplete promise. Subclassers can delay if needed | | | FormRegistrarMixin |
|
|
126
|
-
| `
|
|
134
|
+
| `_defineOverlay` | protected | | `{ contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfig` | `OverlayController` | OverlayMixin |
|
|
135
|
+
| `_defineOverlayConfig` | protected | | | `OverlayConfig` | OverlayMixin |
|
|
127
136
|
| `_dispatchInitialModelValueChangedEvent` | protected | | | | FormControlMixin |
|
|
128
137
|
| `_enhanceLightDomA11y` | protected | | | | FormControlMixin |
|
|
129
138
|
| `_enhanceLightDomA11yForAdditionalSlots` | protected | Enhances additional slots(prefix, suffix, before, after) defined by developer.

When boolean attribute data-label or data-description is found,
the slot element will be connected to the input via aria-labelledby or aria-describedby | `additionalSlots: string[]` | | FormControlMixin |
|
|
@@ -150,6 +159,7 @@ eleventyNavigation:
|
|
|
150
159
|
| `_inputGroupSuffixTemplate` | protected | | | `TemplateResult \| nothing` | FormControlMixin |
|
|
151
160
|
| `_inputGroupTemplate` | protected | | | `TemplateResult` | FormControlMixin |
|
|
152
161
|
| `_isEmpty` | protected | Used for Required validation and computation of interaction states | `modelValue: any` | `boolean` | FormControlMixin |
|
|
162
|
+
| `_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 |
|
|
153
163
|
| `_iStateOnLeave` | protected | Sets touched value to true and reevaluates prefilled state.
When false, on next interaction, user will start with a clean state. | | | InteractionStateMixin |
|
|
154
164
|
| `_iStateOnValueChange` | protected | Sets dirty value and validates when already touched or invalid | | | InteractionStateMixin |
|
|
155
165
|
| `_labelTemplate` | protected | | | `TemplateResult` | FormControlMixin |
|
|
@@ -175,17 +185,18 @@ eleventyNavigation:
|
|
|
175
185
|
| `_resetListboxOptions` | protected | | | | |
|
|
176
186
|
| `_scrollIntoView` | protected | | `el: HTMLElement, scrollTargetEl: HTMLElement` | | ListboxMixin |
|
|
177
187
|
| `_setCheckedElements` | protected | | `value: string \| any[], check: Function` | | ChoiceGroupMixin |
|
|
188
|
+
| `_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 |
|
|
178
189
|
| `_setTextboxValue` | protected | | `v: string` | | |
|
|
179
190
|
| `_setupListboxNode` | protected | | | | ListboxMixin |
|
|
180
|
-
| `_setupOpenCloseListeners` | protected | | | |
|
|
181
|
-
| `_setupOverlayCtrl` | protected | | | |
|
|
191
|
+
| `_setupOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
192
|
+
| `_setupOverlayCtrl` | protected | | | | OverlayMixin |
|
|
182
193
|
| `_showFeedbackConditionFor` | protected | Default feedbackCondition condition, used by Subclassers, that will be used when
\`feedbackCondition()\` is not overridden by Application Developer.
Show the validity feedback when returning true, don't show when false | `type: string, meta: InteractionStates` | | ValidateMixin |
|
|
183
194
|
| `_showOverlayCondition` | protected | | `{ lastKey }, options: { currentValue?: string, lastKey?: string }` | `boolean` | |
|
|
184
195
|
| `_syncToTextboxCondition` | protected | | `modelValue: string\|string[], oldModelValue: string\|string[], { phase }, config: {phase?:string}` | | |
|
|
185
196
|
| `_syncToTextboxMultiple` | protected | | `modelValue: string[], oldModelValue: string[]` | | |
|
|
186
197
|
| `_teardownListboxNode` | protected | | | | ListboxMixin |
|
|
187
|
-
| `_teardownOpenCloseListeners` | protected | | | |
|
|
188
|
-
| `_teardownOverlayCtrl` | protected | | | |
|
|
198
|
+
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
199
|
+
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
|
|
189
200
|
| `_textboxOnClick` | protected | | `ev: FocusEvent` | | |
|
|
190
201
|
| `_textboxOnInput` | protected | | `ev: Event` | | |
|
|
191
202
|
| `_textboxOnKeydown` | protected | | `ev: KeyboardEvent` | | |
|
|
@@ -200,6 +211,7 @@ eleventyNavigation:
|
|
|
200
211
|
|
|
201
212
|
| Name | Type | Description | Inherited From |
|
|
202
213
|
| ------------------------------ | ------------- | -------------------------------------------------------- | --------------------- |
|
|
214
|
+
| `opened-changed` | `CustomEvent` | | OverlayMixin |
|
|
203
215
|
| `model-value-changed` | `CustomEvent` | | FormControlMixin |
|
|
204
216
|
| `form-element-name-changed` | `CustomEvent` | | FormControlMixin |
|
|
205
217
|
| `focus` | `Event` | | FocusMixin |
|
|
@@ -223,6 +235,7 @@ eleventyNavigation:
|
|
|
223
235
|
| `requireOptionMatch` | requireOptionMatch | |
|
|
224
236
|
| `allow-custom-choice` | allowCustomChoice | CustomChoiceGroupMixin |
|
|
225
237
|
| `__shouldAutocompleteNextUpdate` | \_\_shouldAutocompleteNextUpdate | |
|
|
238
|
+
| `opened` | opened | OverlayMixin |
|
|
226
239
|
| `modelValue` | modelValue | CustomChoiceGroupMixin |
|
|
227
240
|
| `multiple-choice` | multipleChoice | ChoiceGroupMixin |
|
|
228
241
|
| `orientation` | orientation | ListboxMixin |
|
|
@@ -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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/docs/components/listbox/overview.md) for more information.
|
|
@@ -16,20 +16,45 @@ eleventyNavigation:
|
|
|
16
16
|
|
|
17
17
|
### Fields
|
|
18
18
|
|
|
19
|
-
| Name
|
|
20
|
-
|
|
|
21
|
-
| `
|
|
19
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
20
|
+
| ---------------------------- | --------- | ------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
21
|
+
| `config` | public | `Partial<OverlayConfig>` | `{}` | Configure the many options of the \`OverlayController\` | OverlayMixin |
|
|
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 | | | | OverlayMixin |
|
|
28
|
+
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
|
|
22
29
|
|
|
23
30
|
### Methods
|
|
24
31
|
|
|
25
|
-
| Name
|
|
26
|
-
|
|
|
27
|
-
| `
|
|
32
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
33
|
+
| ---------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------- | -------------- |
|
|
34
|
+
| `close` | public | Hides the overlay | | | OverlayMixin |
|
|
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
|
+
| `_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 |
|
|
41
|
+
| `_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 |
|
|
42
|
+
| `_setupOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
43
|
+
| `_setupOverlayCtrl` | protected | | | | OverlayMixin |
|
|
44
|
+
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
45
|
+
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
|
|
46
|
+
|
|
47
|
+
### Events
|
|
48
|
+
|
|
49
|
+
| Name | Type | Description | Inherited From |
|
|
50
|
+
| ---------------- | ------------- | ----------- | -------------- |
|
|
51
|
+
| `opened-changed` | `CustomEvent` | | OverlayMixin |
|
|
28
52
|
|
|
29
53
|
### Attributes
|
|
30
54
|
|
|
31
55
|
| Name | Field | Inherited From |
|
|
32
56
|
| ----------------- | ------------- | -------------- |
|
|
33
57
|
| `is-alert-dialog` | isAlertDialog | |
|
|
58
|
+
| `opened` | opened | OverlayMixin |
|
|
34
59
|
|
|
35
60
|
<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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/docs/components/form/overview.md)
|
|
36
|
+
- [checkbox-group](https://github.com/ing-bank/lion/blob/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/docs/components/checkbox-group/overview.md)
|
|
37
|
+
- [radio-group](https://github.com/ing-bank/lion/blob/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/docs/fundamentals/systems/form/interaction-states.md)
|
|
47
|
+
- Can have [validate](https://github.com/ing-bank/lion/blob/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/docs/components/input/overview.md)
|
|
40
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/docs/components/input/overview.md)
|
|
32
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
36
36
|
- IsDate (default)
|
|
37
37
|
- MinDate
|
|
38
38
|
- MaxDate
|