@lion/ui 0.24.0 → 0.25.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/README.md +1 -1
- package/components/input-tel/test/parsers.test.js +87 -0
- package/components/input-tel/test-helpers/mockPhoneUtilManager.js +14 -3
- package/components/listbox/src/LionListbox.js +1 -1
- package/components/overlays/src/OverlayController.js +7 -2
- package/components/overlays/src/OverlayMixin.js +3 -6
- package/components/overlays/test/OverlayController.test.js +31 -0
- package/components/overlays/test/invoker-compatibility.test.js +37 -0
- package/components/select-rich/src/LionSelectRich.js +2 -1
- package/custom-elements.json +38 -29
- package/dist-types/components/input-tel/test-helpers/mockPhoneUtilManager.d.ts +5 -0
- package/dist-types/components/input-tel/test-helpers/mockPhoneUtilManager.d.ts.map +1 -1
- package/dist-types/components/listbox/src/LionListbox.d.ts +2 -2
- package/dist-types/components/listbox/src/LionListbox.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayController.d.ts +3 -1
- 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/test/invoker-compatibility.test.d.ts +3 -0
- package/dist-types/components/overlays/test/invoker-compatibility.test.d.ts.map +1 -0
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +5 -4
- package/dist-types/components/select-rich/src/LionSelectRich.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 +1 -1
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/overview.md +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/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/api-table.md +4 -4
- 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 +1 -1
- package/docs/components/select-rich/use-cases.md +2 -2
- package/docs/components/tabs/examples.md +1 -1
- 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 +1 -1
- 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/package.json +8 -7
- package/vscode.html-custom-data.json +5 -5
- package/web-types.json +1 -1
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
"name": "lion-combobox",
|
|
107
|
-
"description": "LionCombobox: implements the wai-aria combobox design pattern and integrates it as a Lion\nFormControl\n\n\n---\n\n\n\n\n### **Events:**\n - **model-value-changed** - undefined\n- **opened-changed** - undefined\n\n### **Methods:**\n - **close()** - Hides the overlay\n- **matchCondition(option: _LionOption_, textboxValue: _string_)** - When the preconfigurable `match-mode` conditions are not sufficient,\none can define a custom matching function.\n- **open()** - Shows the overlay\n- **parser(value: _string|string[]_): _*_** - Converts viewValue to modelValue\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **toggle()** - Toggles the overlay\n- **_autoSelectCondition()** - When this condition is false, an end user will have to manually select a suggested\noption from the list (by default when autocomplete is 'none' or 'list').\nFor autocomplete 'both' or 'inline', it will automatically select on a match.\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element
|
|
107
|
+
"description": "LionCombobox: implements the wai-aria combobox design pattern and integrates it as a Lion\nFormControl\n\n\n---\n\n\n\n\n### **Events:**\n - **model-value-changed** - undefined\n- **opened-changed** - undefined\n\n### **Methods:**\n - **close()** - Hides the overlay\n- **matchCondition(option: _LionOption_, textboxValue: _string_)** - When the preconfigurable `match-mode` conditions are not sufficient,\none can define a custom matching function.\n- **open()** - Shows the overlay\n- **parser(value: _string|string[]_): _*_** - Converts viewValue to modelValue\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **toggle()** - Toggles the overlay\n- **_autoSelectCondition()** - When this condition is false, an end user will have to manually select a suggested\noption from the list (by default when autocomplete is 'none' or 'list').\nFor autocomplete 'both' or 'inline', it will automatically select on a match.\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element|null|undefined_): _Element|null_** - Returns the element that can actually receive focus inside the passed\ninvoker (wrapper) element: the element itself when it is focusable,\notherwise the first focusable descendant. Custom invokers without a\nfocusable light DOM descendant remain click targets themselves.\n- **_getTextboxValueFromOption(option: _LionOption_): _string_** - Return the value to be used for the input value\n- **_handleAutocompletion()** - Handles autocompletion. This entails:\n- list: shows a list on keydown character press\n- filter: filters list of potential matches according to matchmode or provided matchCondition\n- focus: automatically focuses closest match (makes it the activedescendant)\n- check: automatically checks/selects closest match when selection-follows-focus is enabled\n(this is the default configuration)\n- complete: completes the textbox value inline (the 'missing characters' will be added as\nselected text)\n- **_isPermanentlyDisconnected(): _Promise<boolean>_** - When we're moving around in dom, disconnectedCallback gets called.\nBefore we decide to teardown, let's wait to see if we were not just moving nodes around.\n- **_setOpenedWithoutPropertyEffects(newOpened: _boolean_)** - When the opened state is changed by an Application Developer,cthe OverlayController is\nrequested to show/hide. It might happen that this request is not honoured\n(intercepted in before-hide for instance), so that we need to sync the controller state\nto this webcomponent again, preventing eternal loops.\n\n### **Slots:**\n - **listbox** - The listbox element for the combobox, e.g. <lion-options>\n- **selection-display** - The selection display element for the combobox, e.g. <lion-selection-display>",
|
|
108
108
|
"attributes": [
|
|
109
109
|
{
|
|
110
110
|
"name": "autocomplete",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
"name": "lion-dialog",
|
|
146
|
-
"description": "\n\n\n---\n\n\n\n\n### **Events:**\n - **opened-changed** - undefined\n\n### **Methods:**\n - **close()** - Hides the overlay\n- **open()** - Shows the overlay\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **toggle()** - Toggles the overlay\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element
|
|
146
|
+
"description": "\n\n\n---\n\n\n\n\n### **Events:**\n - **opened-changed** - undefined\n\n### **Methods:**\n - **close()** - Hides the overlay\n- **open()** - Shows the overlay\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **toggle()** - Toggles the overlay\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element|null|undefined_): _Element|null_** - Returns the element that can actually receive focus inside the passed\ninvoker (wrapper) element: the element itself when it is focusable,\notherwise the first focusable descendant. Custom invokers without a\nfocusable light DOM descendant remain click targets themselves.\n- **_isPermanentlyDisconnected(): _Promise<boolean>_** - When we're moving around in dom, disconnectedCallback gets called.\nBefore we decide to teardown, let's wait to see if we were not just moving nodes around.\n- **_setOpenedWithoutPropertyEffects(newOpened: _boolean_)** - When the opened state is changed by an Application Developer,cthe OverlayController is\nrequested to show/hide. It might happen that this request is not honoured\n(intercepted in before-hide for instance), so that we need to sync the controller state\nto this webcomponent again, preventing eternal loops.",
|
|
147
147
|
"attributes": [
|
|
148
148
|
{ "name": "is-alert-dialog", "values": [] },
|
|
149
149
|
{
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
},
|
|
354
354
|
{
|
|
355
355
|
"name": "lion-input-datepicker",
|
|
356
|
-
"description": "\n\n\n---\n\n\n\n\n### **Events:**\n - **opened-changed** - undefined\n- **user-input-changed** - undefined\n\n### **Methods:**\n - **clear()** - Clears modelValue.\nInteraction states are not cleared (use resetInteractionState for this)\n- **close()** - Hides the overlay\n- **open()** - Shows the overlay\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **reset()** - Resets modelValue to initial value.\nInteraction states are cleared\n- **toggle()** - Toggles the overlay\n- **_calendarTemplate()** - Subclassers can replace this with their custom extension of\nLionCalendar, like `<my-calendar id=\"calendar\"></my-calendar>`\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element
|
|
356
|
+
"description": "\n\n\n---\n\n\n\n\n### **Events:**\n - **opened-changed** - undefined\n- **user-input-changed** - undefined\n\n### **Methods:**\n - **clear()** - Clears modelValue.\nInteraction states are not cleared (use resetInteractionState for this)\n- **close()** - Hides the overlay\n- **open()** - Shows the overlay\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **reset()** - Resets modelValue to initial value.\nInteraction states are cleared\n- **toggle()** - Toggles the overlay\n- **_calendarTemplate()** - Subclassers can replace this with their custom extension of\nLionCalendar, like `<my-calendar id=\"calendar\"></my-calendar>`\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element|null|undefined_): _Element|null_** - Returns the element that can actually receive focus inside the passed\ninvoker (wrapper) element: the element itself when it is focusable,\notherwise the first focusable descendant. Custom invokers without a\nfocusable light DOM descendant remain click targets themselves.\n- **_invokerIconTemplate()** - Subclassers can replace this with their custom extension invoker icon\n- **_invokerTemplate()** - Subclassers can replace this with their custom extension invoker,\nlike `<my-button><calendar-icon></calendar-icon></my-button>`\n- **_isPermanentlyDisconnected(): _Promise<boolean>_** - When we're moving around in dom, disconnectedCallback gets called.\nBefore we decide to teardown, let's wait to see if we were not just moving nodes around.\n- **_onCalendarOverlayOpened()** - Lifecycle callback for subclassers\n- **_onCalendarUserSelectedChanged({ target: { selectedDate } }, opts: _{ target: { selectedDate: Date }}_)** - Triggered when a user selects a date from the calendar overlay\n- **_onChange(ev: _Event=_)** - Dispatches custom bubble event\n- **_onValidatorUpdated(e: _Event|CustomEvent_, metaData: _{validator: Validator}_)** - Responsible for listening param change event and\nsync the calendar dates with the updated validator params\n- **_overlayTemplate()** - Defining this overlay as a templates from OverlayMixin\nthis is our source to give as .contentNode to OverlayController.\nImportant: do not change the name of this method.\n- **_setOpenedWithoutPropertyEffects(newOpened: _boolean_)** - When the opened state is changed by an Application Developer,cthe OverlayController is\nrequested to show/hide. It might happen that this request is not honoured\n(intercepted in before-hide for instance), so that we need to sync the controller state\nto this webcomponent again, preventing eternal loops.",
|
|
357
357
|
"attributes": [
|
|
358
358
|
{
|
|
359
359
|
"name": "calendar-heading",
|
|
@@ -676,7 +676,7 @@
|
|
|
676
676
|
},
|
|
677
677
|
{
|
|
678
678
|
"name": "lion-field-with-select",
|
|
679
|
-
"description": "LionSelectRich: wraps the <lion-listbox> element\n\n\n---\n\n\n\n\n### **Events:**\n - **blur** - undefined\n- **opened-changed** - undefined\n\n### **Methods:**\n - **close()** - Hides the overlay\n- **open()** - Shows the overlay\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **toggle()** - Toggles the overlay\n- **_alignInvokerWidth()** - Align invoker width with content width\nMake sure display is not set to \"none\" while calculating the content width\n- **_getCheckedElements()** - In the select disabled options are still going to a possible value for example\nwhen prefilling or programmatically setting it.\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element
|
|
679
|
+
"description": "LionSelectRich: wraps the <lion-listbox> element\n\n\n---\n\n\n\n\n### **Events:**\n - **blur** - undefined\n- **opened-changed** - undefined\n\n### **Methods:**\n - **close()** - Hides the overlay\n- **open()** - Shows the overlay\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **toggle()** - Toggles the overlay\n- **_alignInvokerWidth()** - Align invoker width with content width\nMake sure display is not set to \"none\" while calculating the content width\n- **_getCheckedElements()** - In the select disabled options are still going to a possible value for example\nwhen prefilling or programmatically setting it.\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element|null|undefined_): _Element|null_** - Returns the element that can actually receive focus inside the passed\ninvoker (wrapper) element: the element itself when it is focusable,\notherwise the first focusable descendant. Custom invokers without a\nfocusable light DOM descendant remain click targets themselves.\n- **_isPermanentlyDisconnected(): _Promise<boolean>_** - When we're moving around in dom, disconnectedCallback gets called.\nBefore we decide to teardown, let's wait to see if we were not just moving nodes around.\n- **_noDefaultSelectedInheritsWidth()** - With no selected element, we should override the inheritsReferenceWidth in most cases.\nBy default, we will set it to 'min', and then set it back to what it was initially when\nsomething is selected.\nAs a subclasser you can override this behavior.\n- **_setOpenedWithoutPropertyEffects(newOpened: _boolean_)** - When the opened state is changed by an Application Developer,cthe OverlayController is\nrequested to show/hide. It might happen that this request is not honoured\n(intercepted in before-hide for instance), so that we need to sync the controller state\nto this webcomponent again, preventing eternal loops.",
|
|
680
680
|
"attributes": [
|
|
681
681
|
{
|
|
682
682
|
"name": "navigate-within-invoker",
|
|
@@ -826,7 +826,7 @@
|
|
|
826
826
|
},
|
|
827
827
|
{
|
|
828
828
|
"name": "lion-tooltip",
|
|
829
|
-
"description": "\n\n\n---\n\n\n\n\n### **Events:**\n - **opened-changed** - undefined\n\n### **Methods:**\n - **close()** - Hides the overlay\n- **open()** - Shows the overlay\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **toggle()** - Toggles the overlay\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element
|
|
829
|
+
"description": "\n\n\n---\n\n\n\n\n### **Events:**\n - **opened-changed** - undefined\n\n### **Methods:**\n - **close()** - Hides the overlay\n- **open()** - Shows the overlay\n- **repositionOverlay()** - Sometimes it's needed to recompute Popper position of an overlay, for instance when we have\nan opened combobox and the surrounding context changes (the space consumed by the textbox\nincreases vertically)\n- **toggle()** - Toggles the overlay\n- **_getFocusableInvokerEl(focusableElOrWrapper: _Element|null|undefined_): _Element|null_** - Returns the element that can actually receive focus inside the passed\ninvoker (wrapper) element: the element itself when it is focusable,\notherwise the first focusable descendant. Custom invokers without a\nfocusable light DOM descendant remain click targets themselves.\n- **_isPermanentlyDisconnected(): _Promise<boolean>_** - When we're moving around in dom, disconnectedCallback gets called.\nBefore we decide to teardown, let's wait to see if we were not just moving nodes around.\n- **_setOpenedWithoutPropertyEffects(newOpened: _boolean_)** - When the opened state is changed by an Application Developer,cthe OverlayController is\nrequested to show/hide. It might happen that this request is not honoured\n(intercepted in before-hide for instance), so that we need to sync the controller state\nto this webcomponent again, preventing eternal loops.",
|
|
830
830
|
"attributes": [
|
|
831
831
|
{
|
|
832
832
|
"name": "invoker-relation",
|
package/web-types.json
CHANGED