@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
|
@@ -66,6 +66,7 @@ eleventyNavigation:
|
|
|
66
66
|
| `activeIndex` | public | | | | LionListbox |
|
|
67
67
|
| `autofocus` | public | `boolean` | `false` | | LionListbox |
|
|
68
68
|
| `checkedIndex` | public | `number \| number[]` | | | LionListbox |
|
|
69
|
+
| `config` | public | `Partial<OverlayConfig>` | `{}` | Configure the many options of the \`OverlayController\` | OverlayMixin |
|
|
69
70
|
| `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.
A date input for instance, always needs the isDate validator. | LionListbox |
|
|
70
71
|
| `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | LionListbox |
|
|
71
72
|
| `disabled` | public | `boolean` | `false` | | LionListbox |
|
|
@@ -87,6 +88,7 @@ eleventyNavigation:
|
|
|
87
88
|
| `modelValue` | public | | | | LionListbox |
|
|
88
89
|
| `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. | LionListbox |
|
|
89
90
|
| `navigateWithinInvoker` | public | `Boolean` | `false` | When invoker has focus, up and down arrow keys changes active state of listbox,
without opening overlay. | |
|
|
91
|
+
| `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 |
|
|
90
92
|
| `operationMode` | public | `OperationMode` | | Types of input interaction of the FormControl (for instance 'enter'\|'select'\|'upload') | LionListbox |
|
|
91
93
|
| `orientation` | public | `string` | `'vertical'` | Informs screen reader and affects keyboard navigation.
By default 'vertical' | LionListbox |
|
|
92
94
|
| `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. | LionListbox |
|
|
@@ -125,8 +127,11 @@ eleventyNavigation:
|
|
|
125
127
|
| `_listboxSlot` | protected | `HTMLElement` | | | LionListbox |
|
|
126
128
|
| `_noTypeAhead` | public | `boolean` | `false` | When false, a user can type on which the focus will jump to the matching option | LionListbox |
|
|
127
129
|
| `_oldModelValue` | protected | `string \| string[] \| undefined` | `undefined` | | LionListbox |
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
+
| `_overlayBackdropNode` | protected | | | | OverlayMixin |
|
|
131
|
+
| `_overlayContentNode` | protected | | | | OverlayMixin |
|
|
132
|
+
| `_overlayContentWrapperNode` | protected | | | | OverlayMixin |
|
|
133
|
+
| `_overlayInvokerNode` | protected | | | | OverlayMixin |
|
|
134
|
+
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
|
|
130
135
|
| `_repropagationRole` | public | `'child'\|'choice-group'\|'fieldset'` | `'choice-group'` | Based on the role, details of handling model-value-changed repropagation differ. | LionListbox |
|
|
131
136
|
| `_requestedToBeDisabled` | protected | `boolean` | `false` | | LionListbox |
|
|
132
137
|
| `_scrollTargetNode` | protected | `HTMLElement` | | | LionListbox |
|
|
@@ -145,6 +150,7 @@ eleventyNavigation:
|
|
|
145
150
|
| `blur` | public | Calls \`blur()\` on focusable element within | | | LionListbox |
|
|
146
151
|
| `clear` | public | | | | LionListbox |
|
|
147
152
|
| `click` | public | | | | LionListbox |
|
|
153
|
+
| `close` | public | Hides the overlay | | | OverlayMixin |
|
|
148
154
|
| `createScopedElement` | public | | `tagName` | | LionListbox |
|
|
149
155
|
| `defineScopedElement` | public | Defines a scoped element. | `tagName: string, classToBeRegistered: typeof HTMLElement` | | LionListbox |
|
|
150
156
|
| `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` | LionListbox |
|
|
@@ -152,20 +158,24 @@ eleventyNavigation:
|
|
|
152
158
|
| `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. | | | LionListbox |
|
|
153
159
|
| `isRegisteredFormElement` | public | | `el: ElementWithParentFormGroup` | | LionListbox |
|
|
154
160
|
| `makeRequestToBeDisabled` | public | | | | LionListbox |
|
|
161
|
+
| `open` | public | Shows the overlay | | | OverlayMixin |
|
|
155
162
|
| `removeFormElement` | public | | `child: FormRegisteringHost` | | LionListbox |
|
|
156
163
|
| `removeFromAriaDescribedBy` | public | Allows to remove element references from aria-describedby attribute. | `element: HTMLElement` | | LionListbox |
|
|
157
164
|
| `removeFromAriaLabelledBy` | public | Allows to remove element references from aria-labelledby attribute. | `element: HTMLElement` | | LionListbox |
|
|
165
|
+
| `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 |
|
|
158
166
|
| `reset` | public | | | | LionListbox |
|
|
159
167
|
| `resetInteractionState` | public | Resets touched and dirty, and recomputes prefilled | | | LionListbox |
|
|
160
168
|
| `retractRequestToBeDisabled` | public | | | | LionListbox |
|
|
161
169
|
| `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[]` | | LionListbox |
|
|
170
|
+
| `toggle` | public | Toggles the overlay | | | OverlayMixin |
|
|
162
171
|
| `updateSync` | public | An abstraction that has the exact same api as \`requestUpdate\`, but taking
into account:
- \[member order independence]\(https\://github.com/webcomponents/gold-standard/wiki/Member-Order-Independence)
- property effects start when all (light) dom has initialized (on firstUpdated)
- property effects don't interrupt the first meaningful paint
- compatible with propertyAccessor.\`hasChanged\`: no manual checks needed or accidentally
run property effects / events when no change happened
effects when values didn't change
All code previously present in requestUpdate can be placed in this method. | `name: string, oldValue: ?` | | LionListbox |
|
|
163
172
|
| `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 }` | | LionListbox |
|
|
164
173
|
| `_alignInvokerWidth` | protected | Align invoker width with content width
Make sure display is not set to "none" while calculating the content width | | | |
|
|
165
174
|
| `_checkSingleChoiceElements` | protected | | `ev: CustomEvent & {target:FormControl}` | | LionListbox |
|
|
166
175
|
| `_completeRegistration` | protected | Resolves the registrationComplete promise. Subclassers can delay if needed | | | LionListbox |
|
|
167
176
|
| `_connectSlotMixin` | protected | | | | LionListbox |
|
|
168
|
-
| `
|
|
177
|
+
| `_defineOverlay` | protected | | `{ contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfig` | `OverlayController` | OverlayMixin |
|
|
178
|
+
| `_defineOverlayConfig` | protected | | | `OverlayConfig` | OverlayMixin |
|
|
169
179
|
| `_dispatchInitialModelValueChangedEvent` | protected | | | | LionListbox |
|
|
170
180
|
| `_enhanceLightDomA11y` | protected | | | | LionListbox |
|
|
171
181
|
| `_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[]` | | LionListbox |
|
|
@@ -189,6 +199,7 @@ eleventyNavigation:
|
|
|
189
199
|
| `_inputGroupSuffixTemplate` | protected | | | `TemplateResult \| nothing` | LionListbox |
|
|
190
200
|
| `_inputGroupTemplate` | protected | | | `TemplateResult` | LionListbox |
|
|
191
201
|
| `_isEmpty` | protected | Used for Required validation and computation of interaction states | `modelValue: any` | `boolean` | LionListbox |
|
|
202
|
+
| `_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 |
|
|
192
203
|
| `_isPrivateSlot` | protected | | `slotName: string` | `boolean` | LionListbox |
|
|
193
204
|
| `_iStateOnLeave` | protected | Sets touched value to true and reevaluates prefilled state.
When false, on next interaction, user will start with a clean state. | | | LionListbox |
|
|
194
205
|
| `_iStateOnValueChange` | protected | Sets dirty value and validates when already touched or invalid | | | LionListbox |
|
|
@@ -212,11 +223,14 @@ eleventyNavigation:
|
|
|
212
223
|
| `_repropagationCondition` | protected | Based on provided target, this condition determines whether received model-value-changed
event should be repropagated | `target: FormControlHost` | | LionListbox |
|
|
213
224
|
| `_scrollIntoView` | protected | | `el: HTMLElement, scrollTargetEl: HTMLElement` | | LionListbox |
|
|
214
225
|
| `_setCheckedElements` | protected | | `value: string \| any[], check: Function` | | LionListbox |
|
|
226
|
+
| `_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 |
|
|
215
227
|
| `_setupListboxNode` | protected | | | | LionListbox |
|
|
216
|
-
| `
|
|
228
|
+
| `_setupOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
229
|
+
| `_setupOverlayCtrl` | protected | | | | OverlayMixin |
|
|
217
230
|
| `_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` | | LionListbox |
|
|
218
231
|
| `_teardownListboxNode` | protected | | | | LionListbox |
|
|
219
|
-
| `
|
|
232
|
+
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
233
|
+
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
|
|
220
234
|
| `_throwWhenInvalidChildModelValue` | protected | | `child: FormControl` | | LionListbox |
|
|
221
235
|
| `_triggerInitialModelValueChangedEvent` | protected | | | | LionListbox |
|
|
222
236
|
| `_uncheckChildren` | protected | | `exclude: LionOption\|LionOption[]` | | LionListbox |
|
|
@@ -228,6 +242,7 @@ eleventyNavigation:
|
|
|
228
242
|
| Name | Type | Description | Inherited From |
|
|
229
243
|
| ------------------------------ | ------------- | -------------------------------------------------------- | -------------- |
|
|
230
244
|
| `blur` | `Event` | | LionListbox |
|
|
245
|
+
| `opened-changed` | `CustomEvent` | | OverlayMixin |
|
|
231
246
|
| `model-value-changed` | `CustomEvent` | | LionListbox |
|
|
232
247
|
| `form-element-name-changed` | `CustomEvent` | | LionListbox |
|
|
233
248
|
| `focus` | `Event` | | LionListbox |
|
|
@@ -247,6 +262,7 @@ eleventyNavigation:
|
|
|
247
262
|
| `navigate-within-invoker` | navigateWithinInvoker | |
|
|
248
263
|
| `interaction-mode` | interactionMode | |
|
|
249
264
|
| `single-option` | singleOption | |
|
|
265
|
+
| `opened` | opened | OverlayMixin |
|
|
250
266
|
| `orientation` | orientation | LionListbox |
|
|
251
267
|
| `selection-follows-focus` | selectionFollowsFocus | LionListbox |
|
|
252
268
|
| `rotate-keyboard-navigation` | rotateKeyboardNavigation | LionListbox |
|
|
@@ -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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/docs/blog/ing-open-sources-lion.md).
|
|
25
25
|
|
|
26
26
|
```js preview-story
|
|
27
27
|
export const main = () => html`
|
|
@@ -16,20 +16,44 @@ eleventyNavigation:
|
|
|
16
16
|
|
|
17
17
|
### Fields
|
|
18
18
|
|
|
19
|
-
| Name
|
|
20
|
-
|
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
19
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
20
|
+
| ---------------------------- | --------- | ------------------------ | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
21
|
+
| `config` | public | `Partial<OverlayConfig>` | `{}` | Configure the many options of the \`OverlayController\` | OverlayMixin |
|
|
22
|
+
| `hasArrow` | public | `boolean` | `false` | Whether an arrow should be displayed | ArrowMixin |
|
|
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
|
+
| `_arrowNode` | protected | | | | ArrowMixin |
|
|
26
|
+
| `_overlayBackdropNode` | protected | | | | OverlayMixin |
|
|
27
|
+
| `_overlayContentNode` | protected | | | | OverlayMixin |
|
|
28
|
+
| `_overlayContentWrapperNode` | protected | | | | OverlayMixin |
|
|
29
|
+
| `_overlayInvokerNode` | protected | | | | OverlayMixin |
|
|
30
|
+
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
|
|
24
31
|
|
|
25
32
|
### Methods
|
|
26
33
|
|
|
27
|
-
| Name
|
|
28
|
-
|
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
34
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
35
|
+
| ---------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------ | -------------- |
|
|
36
|
+
| `close` | public | Hides the overlay | | | OverlayMixin |
|
|
37
|
+
| `open` | public | Shows the overlay | | | OverlayMixin |
|
|
38
|
+
| `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 |
|
|
39
|
+
| `toggle` | public | Toggles the overlay | | | OverlayMixin |
|
|
40
|
+
| `_arrowNodeTemplate` | protected | | | | ArrowMixin |
|
|
41
|
+
| `_arrowTemplate` | protected | | | | ArrowMixin |
|
|
42
|
+
| `_defineOverlay` | protected | | `{ contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfig` | `OverlayController` | OverlayMixin |
|
|
43
|
+
| `_defineOverlayConfig` | protected | Overrides arrow and keepTogether modifier to be enabled,
and adds onCreate and onUpdate hooks to sync from popper state | | `OverlayConfig` | OverlayMixin |
|
|
44
|
+
| `_getPopperArrowConfig` | protected | | `popperConfigToExtendFrom: Partial<PopperOptions>` | `Partial<PopperOptions>` | ArrowMixin |
|
|
45
|
+
| `_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 |
|
|
46
|
+
| `_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 |
|
|
47
|
+
| `_setupOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
48
|
+
| `_setupOverlayCtrl` | protected | | | | OverlayMixin |
|
|
49
|
+
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
50
|
+
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
|
|
51
|
+
|
|
52
|
+
### Events
|
|
53
|
+
|
|
54
|
+
| Name | Type | Description | Inherited From |
|
|
55
|
+
| ---------------- | ------------- | ----------- | -------------- |
|
|
56
|
+
| `opened-changed` | `CustomEvent` | | OverlayMixin |
|
|
33
57
|
|
|
34
58
|
### Attributes
|
|
35
59
|
|
|
@@ -37,5 +61,6 @@ eleventyNavigation:
|
|
|
37
61
|
| ------------------ | --------------- | -------------- |
|
|
38
62
|
| `invoker-relation` | invokerRelation | |
|
|
39
63
|
| `has-arrow` | hasArrow | ArrowMixin |
|
|
64
|
+
| `opened` | opened | OverlayMixin |
|
|
40
65
|
|
|
41
66
|
<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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/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/027d3fd8518e6c6bc37b9414685ad7e12c67db7d/docs/fundamentals/systems/form/formatting-and-parsing.md)
|
|
38
38
|
|
|
39
39
|
### Event meta
|
|
40
40
|
|