@lion/ui 0.16.1 → 0.17.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 +5 -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/src/utils/makeMatchingTextBold.js +3 -1
- package/components/combobox/test/lion-combobox.test.js +105 -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/LionInputDatepicker.js +6 -2
- package/components/input-datepicker/src/localizeNamespaceLoader.js +1 -0
- package/components/input-datepicker/test/lion-input-datepicker.test.js +17 -2
- package/components/input-datepicker/translations/bg.js +1 -1
- package/components/input-datepicker/translations/cs.js +1 -1
- package/components/input-datepicker/translations/de.js +1 -1
- package/components/input-datepicker/translations/en.js +1 -1
- package/components/input-datepicker/translations/es.js +1 -1
- package/components/input-datepicker/translations/fr.js +1 -1
- package/components/input-datepicker/translations/hu.js +1 -1
- package/components/input-datepicker/translations/it.js +1 -1
- package/components/input-datepicker/translations/nl.js +1 -1
- package/components/input-datepicker/translations/pl.js +1 -1
- package/components/input-datepicker/translations/ro.js +1 -1
- package/components/input-datepicker/translations/ru.js +1 -1
- package/components/input-datepicker/translations/sk.js +1 -1
- package/components/input-datepicker/translations/tr.js +1 -1
- package/components/input-datepicker/translations/uk.js +1 -1
- package/components/input-datepicker/translations/zh.js +1 -1
- package/components/input-stepper/src/LionInputStepper.js +15 -7
- package/components/input-stepper/test-suites/lion-input-stepper.suite.js +28 -4
- 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 +796 -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/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 +422 -0
- package/components/navigation-bar/src/types.js +41 -0
- package/components/overlays/NEXT.md +49 -0
- package/components/overlays/src/OverlayController.js +249 -150
- package/components/overlays/src/OverlayMixin.js +76 -12
- package/components/overlays/src/OverlaysManager.js +98 -0
- package/components/overlays/src/overlayShadowDomStyle.js +2 -2
- package/components/overlays/src/utils/adopt-styles.js +2 -1
- 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 +120 -7
- 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 +25 -4
- package/components/select-rich/test/lion-select-rich.test.js +3 -0
- package/custom-elements.json +12950 -2486
- 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/combobox/src/utils/makeMatchingTextBold.d.ts.map +1 -1
- 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/LionInputDatepicker.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts.map +1 -1
- package/dist-types/components/input-stepper/src/LionInputStepper.d.ts +4 -2
- package/dist-types/components/input-stepper/src/LionInputStepper.d.ts.map +1 -1
- package/dist-types/components/input-stepper/test-suites/lion-input-stepper.suite.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/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 +10 -20
- package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayMixin.d.ts +3 -0
- package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlaysManager.d.ts +31 -0
- package/dist-types/components/overlays/src/OverlaysManager.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 +11 -2
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +12 -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/exports/types/overlays.d.ts +1 -0
- package/dist-types/exports/types/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/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/index.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-datepicker/use-cases.md +16 -1
- 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/api-table.md +1 -1
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/api-table.md +2 -2
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-stepper/use-cases.md +26 -0
- 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 +216 -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 +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 +18 -18
- 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/interaction-states.md +0 -1
- 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/localize/text.md +1 -1
- package/docs/fundamentals/systems/overlays/api-table.md +92 -45
- 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 +14 -0
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -2
- 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 +6 -0
- package/exports/navigation-bar.js +1 -0
- package/exports/overlays.js +6 -0
- package/exports/types/overlays.ts +1 -0
- package/menu.js +6 -0
- package/navigation-bar.js +1 -0
- package/overlays.js +6 -0
- package/package.json +1 -1
|
@@ -87,9 +87,9 @@ if (!customElements.get('dummy-slider')) {
|
|
|
87
87
|
}
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Custom Fields can be created in just a few steps. All you need is an interaction element (like for instance a slider, a listbox or a combobox) and connect it to the [LionField](https://github.com/ing-bank/lion/blob/
|
|
90
|
+
Custom Fields can be created in just a few steps. All you need is an interaction element (like for instance a slider, a listbox or a combobox) and connect it to the [LionField](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/input/overview.md).
|
|
91
91
|
|
|
92
|
-
> In case you want to extend a native element, follow [Extend a native Input](https://github.com/ing-bank/lion/blob/
|
|
92
|
+
> In case you want to extend a native element, follow [Extend a native Input](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/extend-a-native-input.md).
|
|
93
93
|
|
|
94
94
|
## A) an interaction element
|
|
95
95
|
|
|
@@ -138,7 +138,7 @@ export const createAnInteractiveElement = () => {
|
|
|
138
138
|
## B) your LionField extension
|
|
139
139
|
|
|
140
140
|
Now we want to integrate the slider in our form system to enrich the user interface, get
|
|
141
|
-
validation support and all other [benefits of LionField](https://github.com/ing-bank/lion/blob/
|
|
141
|
+
validation support and all other [benefits of LionField](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/input/overview.md).
|
|
142
142
|
We start by creating a component `<slider-field>` that extends from `LionField`.
|
|
143
143
|
Then we follow the steps below:
|
|
144
144
|
|
|
@@ -151,7 +151,7 @@ Then we follow the steps below:
|
|
|
151
151
|
|
|
152
152
|
The `user-input-changed` event is listened to by the FormatMixin: it should be regarded as the
|
|
153
153
|
equivalent of the `input` event of the platform, but for custom built interaction elements.
|
|
154
|
-
You now synchronized [modelValue](https://github.com/ing-bank/lion/blob/
|
|
154
|
+
You now synchronized [modelValue](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/systems/form/model-value.md), which can be regarded as
|
|
155
155
|
the glue to integrate all other functionality like parsing/formatting/serializing, validating,
|
|
156
156
|
tracking interaction states etc.
|
|
157
157
|
|
|
@@ -159,7 +159,7 @@ Then we follow the steps below:
|
|
|
159
159
|
> because those properties will lose their reactivity (they won't be considered anymore in the
|
|
160
160
|
> update loop of LitElement).
|
|
161
161
|
> Whenever a .modelValue/.formattedValue/.serializedValue needs to be computed, use
|
|
162
|
-
> [parser/formatter/serializer](https://github.com/ing-bank/lion/blob/
|
|
162
|
+
> [parser/formatter/serializer](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/systems/form/formatting-and-parsing.md)
|
|
163
163
|
|
|
164
164
|
Implement with the following code:
|
|
165
165
|
|
|
@@ -39,7 +39,7 @@ Large or complex forms might need to be split up into multiple files. This compo
|
|
|
39
39
|
|
|
40
40
|
In the latter case: make sure that your components don't have a shadow root. This can be achieved by rendering into Light DOM. The form registration mechanism relies on light dom by design: as soon as you do start to use shadow roots, you will notice that your form components won't register themselves anymore to their parents.
|
|
41
41
|
|
|
42
|
-
> Today, rendering to light dom is the only way to [stay accessible](https://github.com/ing-bank/lion/blob/
|
|
42
|
+
> Today, rendering to light dom is the only way to [stay accessible](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/rationales/accessibility.md#shadow-roots-and-accessibility).
|
|
43
43
|
|
|
44
44
|
### Example of a component that renders into Light DOM
|
|
45
45
|
|
|
@@ -86,7 +86,7 @@ Extending form components is not recommended for Application Developers: it shou
|
|
|
86
86
|
This team will add the styling and default configuration needed to make it fit the particular Design System.
|
|
87
87
|
|
|
88
88
|
With the toolbox provided by the team that creates your Design System, you should be able to build all your forms. Only if you have a really good reason, look into
|
|
89
|
-
[exceptional cases](https://github.com/ing-bank/lion/blob/
|
|
89
|
+
[exceptional cases](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/#exceptional-cases) below.
|
|
90
90
|
|
|
91
91
|
### Exceptional cases
|
|
92
92
|
|
|
@@ -94,8 +94,8 @@ If the form component you need is still missing, you have two options:
|
|
|
94
94
|
|
|
95
95
|
- is it a generic primitive that should be part of Lion? Request it in [Lion discussions](https://github.com/ing-bank/lion/discussions)
|
|
96
96
|
- is it a non generic component that is unique to your app?
|
|
97
|
-
- follow [create a custom field](https://github.com/ing-bank/lion/blob/
|
|
98
|
-
- follow [extend a native input](https://github.com/ing-bank/lion/blob/
|
|
97
|
+
- follow [create a custom field](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/create-a-custom-field.md)
|
|
98
|
+
- follow [extend a native input](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/extend-a-native-input.md)
|
|
99
99
|
|
|
100
100
|
It's also possible to extend other components, like LionListbox or LionCombobox. You need to be aware that you're building on top of protected apis.
|
|
101
101
|
Changing/overriding functionality is only recommended if the source code in `form-core` is fully understood.
|
|
@@ -23,9 +23,9 @@ import '../../fundamentals/systems/form/assets/h-output.js';
|
|
|
23
23
|
loadDefaultFeedbackMessages();
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Input fields can be created by extending [LionInput](https://github.com/ing-bank/lion/blob/
|
|
26
|
+
Input fields can be created by extending [LionInput](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/input/overview.md).
|
|
27
27
|
|
|
28
|
-
> In case you want to wrap a custom form element, follow [Create a custom Field](https://github.com/ing-bank/lion/blob/
|
|
28
|
+
> In case you want to wrap a custom form element, follow [Create a custom Field](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/create-a-custom-field.md).
|
|
29
29
|
|
|
30
30
|
For this tutorial, we create an input that wraps native `input[type=datetime-local]`.
|
|
31
31
|
This is as simple as adding a type:
|
|
@@ -9,3 +9,17 @@ eleventyNavigation:
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# How To
|
|
12
|
+
|
|
13
|
+
Welcome to the How To section. Here you'll find practical, step-by-step guides for common tasks when working with Lion Web Components.
|
|
14
|
+
|
|
15
|
+
Whether you're just getting started with Lion, building your first form, extending existing components, or creating custom fields, this section provides clear instructions and best practices to help you succeed. Each guide is designed to walk you through the process with real-world examples and code samples.
|
|
16
|
+
|
|
17
|
+
**Browse the guides below to:**
|
|
18
|
+
|
|
19
|
+
- Set up your development environment and get started with Lion
|
|
20
|
+
- Learn how to create accessible and well-structured forms
|
|
21
|
+
- Discover how to extend native input components
|
|
22
|
+
- Build custom form fields tailored to your needs
|
|
23
|
+
- Follow proven patterns and best practices used by the Lion community
|
|
24
|
+
|
|
25
|
+
If you can't find what you're looking for, check out our [Fundamentals](../../fundamentals/) section for deeper conceptual knowledge, or visit our [Components](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components) documentation for detailed API references.
|
package/docs/guides/index.md
CHANGED
|
@@ -22,9 +22,9 @@ Developers consuming our web components inside an application (not extending the
|
|
|
22
22
|
`Application Developers` are only allowed to interact with `public` properties and methods.
|
|
23
23
|
Can be abbreviated as `AD`. Sometimes also called `Consuming Developer`.
|
|
24
24
|
|
|
25
|
-
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/
|
|
26
|
-
- [Styling](https://github.com/ing-bank/lion/blob/
|
|
27
|
-
- [Scoped Elements](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/definitions-and-terms.md)
|
|
26
|
+
- [Styling](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/styling.md)
|
|
27
|
+
- [Scoped Elements](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/scoped-elements.md)
|
|
28
28
|
|
|
29
29
|
## Extending Developer
|
|
30
30
|
|
|
@@ -32,13 +32,13 @@ Developers extending our web components, for instance: `class MaterialInput exte
|
|
|
32
32
|
|
|
33
33
|
Especially for subclassers we have some extra documentation:
|
|
34
34
|
|
|
35
|
-
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/
|
|
36
|
-
- [Extend documentation](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/subclasser-apis.md)
|
|
36
|
+
- [Extend documentation](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/blog/extending-documentation.md)
|
|
37
37
|
|
|
38
38
|
## How To
|
|
39
39
|
|
|
40
40
|
Next to that we have some specific "How To" documentations.
|
|
41
41
|
|
|
42
|
-
- [Get started](https://github.com/ing-bank/lion/blob/
|
|
43
|
-
- [Create a custom field](https://github.com/ing-bank/lion/blob/
|
|
44
|
-
- [Extend a native input](https://github.com/ing-bank/lion/blob/
|
|
42
|
+
- [Get started](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/get-started.md)
|
|
43
|
+
- [Create a custom field](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/create-a-custom-field.md)
|
|
44
|
+
- [Extend a native input](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/extend-a-native-input.md)
|
|
@@ -22,9 +22,9 @@ Developers consuming our web components inside an application (not extending the
|
|
|
22
22
|
`Application Developers` are only allowed to interact with `public` properties and methods.
|
|
23
23
|
Can be abbreviated as `AD`. Sometimes also called `Consuming Developer`.
|
|
24
24
|
|
|
25
|
-
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/
|
|
26
|
-
- [Styling](https://github.com/ing-bank/lion/blob/
|
|
27
|
-
- [Scoped Elements](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/definitions-and-terms.md)
|
|
26
|
+
- [Styling](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/styling.md)
|
|
27
|
+
- [Scoped Elements](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/scoped-elements.md)
|
|
28
28
|
|
|
29
29
|
## Extending Developer
|
|
30
30
|
|
|
@@ -32,5 +32,5 @@ Developers extending our web components, for instance: `class MaterialInput exte
|
|
|
32
32
|
|
|
33
33
|
Especially for subclassers we have some extra documentation:
|
|
34
34
|
|
|
35
|
-
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/
|
|
36
|
-
- [Extend documentation](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/subclasser-apis.md)
|
|
36
|
+
- [Extend documentation](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/blog/extending-documentation.md)
|
|
@@ -23,7 +23,6 @@ Functional styling can be divided into defaults for `basic layout` and `accessib
|
|
|
23
23
|
Examples for both categories can be found below:
|
|
24
24
|
|
|
25
25
|
- Basic layout examples:
|
|
26
|
-
|
|
27
26
|
- A dropdown menu has `position: absolute;`.
|
|
28
27
|
- A lion-button might behave as an `display: inline-block;` element.
|
|
29
28
|
- A suffix attached to an input is horizontally positioned (instead of vertically stacked).
|
|
@@ -31,7 +30,7 @@ Examples for both categories can be found below:
|
|
|
31
30
|
- Accessibility examples:
|
|
32
31
|
- Content (for instance a caption in a table) can be `visually hidden`: it will be
|
|
33
32
|
readable by screen readers, but invisible for end users.
|
|
34
|
-
- When an html table is used, we allow [subclassers](https://github.com/ing-bank/lion/blob/
|
|
33
|
+
- When an html table is used, we allow [subclassers](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/subclasser-apis.md) to override the display property (`table-cell`) to `flex`. By putting the proper accessible roles (`role="cell"`) in the markup, we guarantee our markup stays accessible.
|
|
35
34
|
|
|
36
35
|
Although Lion components try to stay as unbiased as possible with regard to styling, defaults will be needed. In these cases we try to follow the platform as much as possible. If the platform doesn't provide defaults, the largest common denominator across existing UI systems is taken as a lead.
|
|
37
36
|
|
package/exports/collapsible.js
CHANGED
package/exports/menu.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { LionMenu } from '../components/menu/src/LionMenu.js';
|
|
2
|
+
export { LionMenuOverlay } from '../components/menu/src/LionMenuOverlay.js';
|
|
3
|
+
export { LionTree } from '../components/menu/src/LionTree.js';
|
|
4
|
+
export { LionToolbar } from '../components/menu/src/LionToolbar.js';
|
|
5
|
+
export { LionItem, LionMenuitem } from '../components/menu/src/InteractiveListMixin.js';
|
|
6
|
+
export { LionMenuHybrid } from '../components/menu/src/LionMenuHybrid.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LionNavigationBar } from '../components/navigation-bar/src/LionNavigationBar.js';
|
package/exports/overlays.js
CHANGED
|
@@ -8,6 +8,8 @@ export { withBottomSheetConfig } from '../components/overlays/src/configurations
|
|
|
8
8
|
export { withModalDialogConfig } from '../components/overlays/src/configurations/withModalDialogConfig.js';
|
|
9
9
|
export { withDropdownConfig } from '../components/overlays/src/configurations/withDropdownConfig.js';
|
|
10
10
|
export { withTooltipConfig } from '../components/overlays/src/configurations/withTooltipConfig.js';
|
|
11
|
+
export { withClickInteraction } from '../components/overlays/src/configurations/visibility-trigger-partials/withClickInteraction.js';
|
|
12
|
+
export { withHoverInteraction } from '../components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.js';
|
|
11
13
|
|
|
12
14
|
export { deepContains } from '../components/overlays/src/utils/deep-contains.js';
|
|
13
15
|
// re-export via this entrypoint for backwards compatibility
|
|
@@ -19,3 +21,7 @@ export {
|
|
|
19
21
|
} from '../components/overlays/src/utils/inert-siblings.js';
|
|
20
22
|
|
|
21
23
|
export { overlays } from '../components/overlays/src/singleton.js';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @typedef {import('../components/overlays/types/OverlayConfig.js').OverlayConfig} OverlayConfig
|
|
27
|
+
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { OverlayConfig } from '../../components/overlays/types/OverlayConfig.js';
|
|
2
|
+
export { OverlayPhase } from '../../components/overlays/types/OverlayConfig.js';
|
|
2
3
|
export { ViewportConfig } from '../../components/overlays/types/OverlayConfig.js';
|
|
3
4
|
export { ViewportPlacement } from '../../components/overlays/types/OverlayConfig.js';
|
|
4
5
|
export { DefineOverlayConfig } from '../../components/overlays/types/OverlayMixinTypes.js';
|
package/menu.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { LionMenu } from './components/menu/src/LionMenu.js';
|
|
2
|
+
export { LionMenuOverlay } from './components/menu/src/LionMenuOverlay.js';
|
|
3
|
+
export { LionTree } from './components/menu/src/LionTree.js';
|
|
4
|
+
export { LionToolbar } from './components/menu/src/LionToolbar.js';
|
|
5
|
+
export { LionItem, LionMenuitem } from './components/menu/src/InteractiveListMixin.js';
|
|
6
|
+
export { LionMenuHybrid } from './components/menu/src/LionMenuHybrid.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LionNavigationBar } from './components/navigation-bar/src/LionNavigationBar.js';
|
package/overlays.js
CHANGED
|
@@ -6,6 +6,8 @@ export { withBottomSheetConfig } from './components/overlays/src/configurations/
|
|
|
6
6
|
export { withModalDialogConfig } from './components/overlays/src/configurations/withModalDialogConfig.js';
|
|
7
7
|
export { withDropdownConfig } from './components/overlays/src/configurations/withDropdownConfig.js';
|
|
8
8
|
export { withTooltipConfig } from './components/overlays/src/configurations/withTooltipConfig.js';
|
|
9
|
+
export { withClickInteraction } from './components/overlays/src/configurations/visibility-trigger-partials/withClickInteraction.js';
|
|
10
|
+
export { withHoverInteraction } from './components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.js';
|
|
9
11
|
export { deepContains } from './components/overlays/src/utils/deep-contains.js';
|
|
10
12
|
// re-export via this entrypoint for backwards compatibility
|
|
11
13
|
export { getDeepActiveElement } from './components/core/src/getDeepActiveElement.js';
|
|
@@ -15,3 +17,7 @@ export {
|
|
|
15
17
|
setSiblingsInert,
|
|
16
18
|
} from './components/overlays/src/utils/inert-siblings.js';
|
|
17
19
|
export { overlays } from './components/overlays/src/singleton.js';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {import('../components/overlays/types/OverlayConfig.js').OverlayConfig} OverlayConfig
|
|
23
|
+
*/
|