@lion/ui 0.11.1 → 0.11.2
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 +2 -2
- package/components/combobox/test/lion-combobox.test.js +75 -1
- package/components/localize/src/date/parseDate.js +6 -1
- package/components/localize/src/date/utils/checkYearFormat.js +8 -0
- package/components/localize/test/date/parseDate.test.js +6 -0
- package/custom-elements.json +63 -30
- package/dist-types/components/localize/src/date/parseDate.d.ts.map +1 -1
- package/dist-types/components/localize/src/date/utils/checkYearFormat.d.ts +7 -0
- package/dist-types/components/localize/src/date/utils/checkYearFormat.d.ts.map +1 -0
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/accordion/api-table.md +13 -1
- package/docs/components/accordion/index.md +10 -0
- package/docs/components/accordion/overview.md +13 -1
- package/docs/components/accordion/reference.md +13 -1
- package/docs/components/accordion/use-cases.md +13 -1
- package/docs/components/button/api-table.md +13 -1
- package/docs/components/button/examples.md +13 -1
- package/docs/components/button/extensions.md +13 -1
- package/docs/components/button/index.md +11 -1
- package/docs/components/button/overview.md +13 -1
- package/docs/components/button/use-cases.md +13 -1
- package/docs/components/calendar/api-table.md +13 -1
- package/docs/components/calendar/index.md +11 -1
- package/docs/components/calendar/overview.md +13 -1
- package/docs/components/calendar/use-cases.md +13 -1
- package/docs/components/checkbox-group/api-table.md +13 -1
- package/docs/components/checkbox-group/index.md +11 -1
- package/docs/components/checkbox-group/overview.md +15 -3
- package/docs/components/checkbox-group/use-cases.md +13 -1
- package/docs/components/collapsible/api-table.md +13 -1
- package/docs/components/collapsible/examples.md +13 -1
- package/docs/components/collapsible/index.md +11 -1
- package/docs/components/collapsible/overview.md +14 -2
- package/docs/components/collapsible/use-cases.md +13 -1
- package/docs/components/combobox/api-table.md +13 -1
- package/docs/components/combobox/extensions.md +13 -1
- package/docs/components/combobox/index.md +11 -1
- package/docs/components/combobox/overview.md +14 -2
- package/docs/components/combobox/use-cases.md +14 -2
- package/docs/components/dialog/api-table.md +13 -1
- package/docs/components/dialog/index.md +11 -1
- package/docs/components/dialog/overview.md +14 -2
- package/docs/components/dialog/use-cases.md +13 -1
- package/docs/components/drawer/api-table.md +13 -1
- package/docs/components/drawer/index.md +11 -1
- package/docs/components/drawer/overview.md +13 -1
- package/docs/components/drawer/use-cases.md +13 -1
- package/docs/components/fieldset/api-table.md +13 -1
- package/docs/components/fieldset/index.md +11 -1
- package/docs/components/fieldset/overview.md +18 -6
- package/docs/components/fieldset/use-cases.md +13 -1
- package/docs/components/form/api-table.md +12 -1
- package/docs/components/form/index.md +11 -1
- package/docs/components/form/overview.md +16 -4
- package/docs/components/form/use-cases.md +15 -3
- package/docs/components/icon/api-table.md +13 -1
- package/docs/components/icon/index.md +11 -1
- package/docs/components/icon/overview.md +13 -1
- package/docs/components/icon/use-cases.md +14 -2
- package/docs/components/index.md +11 -1
- package/docs/components/input/api-table.md +13 -1
- package/docs/components/input/index.md +11 -1
- package/docs/components/input/overview.md +14 -2
- package/docs/components/input/use-cases.md +13 -1
- package/docs/components/input-amount/api-table.md +13 -1
- package/docs/components/input-amount/index.md +11 -1
- package/docs/components/input-amount/overview.md +16 -4
- package/docs/components/input-amount/use-cases.md +13 -1
- package/docs/components/input-date/api-table.md +13 -1
- package/docs/components/input-date/index.md +11 -1
- package/docs/components/input-date/overview.md +16 -4
- package/docs/components/input-date/use-cases.md +13 -1
- package/docs/components/input-datepicker/api-table.md +13 -1
- package/docs/components/input-datepicker/index.md +11 -1
- package/docs/components/input-datepicker/overview.md +18 -6
- package/docs/components/input-datepicker/use-cases.md +13 -1
- package/docs/components/input-email/api-table.md +13 -1
- package/docs/components/input-email/index.md +11 -1
- package/docs/components/input-email/overview.md +15 -3
- package/docs/components/input-email/use-cases.md +13 -1
- package/docs/components/input-file/api-table.md +13 -1
- package/docs/components/input-file/index.md +11 -1
- package/docs/components/input-file/overview.md +14 -2
- package/docs/components/input-file/use-cases.md +13 -1
- package/docs/components/input-iban/api-table.md +13 -1
- package/docs/components/input-iban/index.md +11 -1
- package/docs/components/input-iban/overview.md +15 -3
- package/docs/components/input-iban/use-cases.md +13 -1
- package/docs/components/input-range/api-table.md +13 -1
- package/docs/components/input-range/index.md +11 -1
- package/docs/components/input-range/overview.md +15 -3
- package/docs/components/input-range/use-cases.md +13 -1
- package/docs/components/input-stepper/api-table.md +13 -1
- package/docs/components/input-stepper/index.md +11 -1
- package/docs/components/input-stepper/overview.md +14 -2
- package/docs/components/input-stepper/use-cases.md +13 -1
- package/docs/components/input-tel/api-table.md +13 -1
- package/docs/components/input-tel/index.md +11 -1
- package/docs/components/input-tel/overview.md +14 -2
- package/docs/components/input-tel/use-cases.md +19 -7
- package/docs/components/input-tel-dropdown/api-table.md +13 -1
- package/docs/components/input-tel-dropdown/extensions.md +13 -1
- package/docs/components/input-tel-dropdown/index.md +11 -1
- package/docs/components/input-tel-dropdown/overview.md +14 -2
- package/docs/components/input-tel-dropdown/use-cases.md +13 -1
- package/docs/components/listbox/api-table.md +13 -1
- package/docs/components/listbox/index.md +11 -1
- package/docs/components/listbox/overview.md +13 -1
- package/docs/components/listbox/use-cases.md +14 -2
- package/docs/components/pagination/api-table.md +13 -1
- package/docs/components/pagination/index.md +11 -1
- package/docs/components/pagination/overview.md +13 -1
- package/docs/components/pagination/use-cases.md +13 -1
- package/docs/components/progress-indicator/api-table.md +13 -1
- package/docs/components/progress-indicator/examples.md +13 -1
- package/docs/components/progress-indicator/index.md +11 -1
- package/docs/components/progress-indicator/overview.md +13 -1
- package/docs/components/radio-group/api-table.md +13 -1
- package/docs/components/radio-group/index.md +11 -1
- package/docs/components/radio-group/overview.md +16 -4
- package/docs/components/radio-group/use-cases.md +13 -1
- package/docs/components/select/api-table.md +13 -1
- package/docs/components/select/index.md +11 -1
- package/docs/components/select/overview.md +13 -1
- package/docs/components/select/use-cases.md +14 -2
- package/docs/components/select-rich/api-table.md +13 -1
- package/docs/components/select-rich/examples.md +13 -1
- package/docs/components/select-rich/index.md +11 -1
- package/docs/components/select-rich/overview.md +13 -1
- package/docs/components/select-rich/use-cases.md +14 -2
- package/docs/components/steps/api-table.md +13 -1
- package/docs/components/steps/index.md +11 -1
- package/docs/components/steps/overview.md +13 -1
- package/docs/components/steps/use-cases.md +13 -1
- package/docs/components/switch/api-table.md +13 -1
- package/docs/components/switch/index.md +11 -1
- package/docs/components/switch/overview.md +13 -1
- package/docs/components/switch/reference.md +13 -1
- package/docs/components/switch/use-cases.md +13 -1
- package/docs/components/tabs/api-table.md +13 -1
- package/docs/components/tabs/examples.md +14 -2
- package/docs/components/tabs/index.md +11 -1
- package/docs/components/tabs/overview.md +13 -1
- package/docs/components/tabs/use-cases.md +13 -1
- package/docs/components/textarea/api-table.md +13 -1
- package/docs/components/textarea/index.md +11 -1
- package/docs/components/textarea/overview.md +13 -1
- package/docs/components/textarea/use-cases.md +13 -1
- package/docs/components/tooltip/api-table.md +13 -1
- package/docs/components/tooltip/examples.md +13 -1
- package/docs/components/tooltip/index.md +11 -1
- package/docs/components/tooltip/overview.md +13 -1
- package/docs/components/tooltip/use-cases.md +13 -1
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/babel-plugin-extend-docs/index.md +12 -0
- package/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md +13 -0
- package/docs/fundamentals/node-tools/index.md +10 -0
- package/docs/fundamentals/node-tools/providence-analytics/index.md +12 -0
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +13 -0
- package/docs/fundamentals/node-tools/publish-docs/index.md +12 -0
- package/docs/fundamentals/node-tools/publish-docs/overview.md +16 -3
- package/docs/fundamentals/node-tools/remark-extend/index.md +12 -0
- package/docs/fundamentals/node-tools/remark-extend/overview.md +13 -0
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/index.md +12 -0
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +15 -2
- package/docs/fundamentals/rationales/TypeScript.md +12 -0
- package/docs/fundamentals/rationales/accessibility.md +13 -1
- package/docs/fundamentals/rationales/index.md +10 -0
- package/docs/fundamentals/rationales/side-effects.md +12 -0
- package/docs/fundamentals/rationales/versioning.md +12 -0
- package/docs/fundamentals/systems/core/SlotMixin.md +14 -1
- package/docs/fundamentals/systems/core/api-table.md +14 -1
- package/docs/fundamentals/systems/core/index.md +12 -0
- package/docs/fundamentals/systems/core/overview.md +14 -1
- package/docs/fundamentals/systems/form/api-table.md +14 -1
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +17 -4
- package/docs/fundamentals/systems/form/index.md +12 -0
- package/docs/fundamentals/systems/form/interaction-states.md +13 -0
- package/docs/fundamentals/systems/form/model-value.md +14 -1
- package/docs/fundamentals/systems/form/overview.md +41 -28
- package/docs/fundamentals/systems/form/styling.md +13 -0
- package/docs/fundamentals/systems/form/use-cases.md +13 -0
- package/docs/fundamentals/systems/form/validate.md +15 -2
- package/docs/fundamentals/systems/icon/index.md +12 -0
- package/docs/fundamentals/systems/icon/overview.md +13 -0
- package/docs/fundamentals/systems/index.md +10 -0
- package/docs/fundamentals/systems/localize/api-table.md +14 -1
- package/docs/fundamentals/systems/localize/dates.md +13 -0
- package/docs/fundamentals/systems/localize/index.md +12 -0
- package/docs/fundamentals/systems/localize/numbers.md +13 -0
- package/docs/fundamentals/systems/localize/overview.md +17 -4
- package/docs/fundamentals/systems/localize/rationale.md +13 -0
- package/docs/fundamentals/systems/localize/text.md +13 -0
- package/docs/fundamentals/systems/localize/use-cases.md +13 -0
- package/docs/fundamentals/systems/overlays/_configuration-positioning.md +11 -0
- package/docs/fundamentals/systems/overlays/_edge-cases.md +10 -0
- package/docs/fundamentals/systems/overlays/api-table.md +14 -1
- package/docs/fundamentals/systems/overlays/configuration.md +15 -2
- package/docs/fundamentals/systems/overlays/index.md +12 -0
- package/docs/fundamentals/systems/overlays/overview.md +18 -5
- package/docs/fundamentals/systems/overlays/rationale.md +13 -0
- package/docs/fundamentals/systems/overlays/use-cases.md +15 -2
- package/docs/fundamentals/tools/ajax/index.md +12 -0
- package/docs/fundamentals/tools/ajax/overview.md +13 -0
- package/docs/fundamentals/tools/ajax/use-cases.md +13 -0
- package/docs/fundamentals/tools/helpers/action-logger.md +13 -0
- package/docs/fundamentals/tools/helpers/index.md +12 -0
- package/docs/fundamentals/tools/helpers/overview.md +14 -1
- package/docs/fundamentals/tools/index.md +10 -0
- package/docs/fundamentals/tools/singleton-manager/example-complex/index.md +13 -0
- package/docs/fundamentals/tools/singleton-manager/example-fail/index.md +13 -0
- package/docs/fundamentals/tools/singleton-manager/example-success/index.md +13 -0
- package/docs/fundamentals/tools/singleton-manager/index.md +12 -0
- package/docs/fundamentals/tools/singleton-manager/overview.md +17 -4
- package/docs/guides/how-to/create-a-custom-field.md +18 -6
- package/docs/guides/how-to/create-a-form.md +17 -5
- package/docs/guides/how-to/extend-a-native-input.md +15 -3
- package/docs/guides/how-to/get-started.md +13 -1
- package/docs/guides/how-to/index.md +11 -1
- package/docs/guides/index.md +19 -9
- package/docs/guides/principles/definitions-and-terms.md +13 -1
- package/docs/guides/principles/index.md +16 -6
- package/docs/guides/principles/scoped-elements.md +13 -1
- package/docs/guides/principles/styling.md +14 -2
- package/docs/guides/principles/subclasser-apis.md +13 -1
- package/package.json +1 -1
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Overview
|
|
4
|
+
- Overlays
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Overlays: Overview'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Systems >> Overlays >> Overview
|
|
9
|
+
title: Overview
|
|
10
|
+
order: 10
|
|
11
|
+
parent: Systems >> Overlays
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Systems >> Overlays >> Overview ||10
|
|
2
15
|
|
|
3
16
|
Supports different types of overlays like dialogs, toasts, tooltips, dropdown, etc.
|
|
@@ -6,7 +19,7 @@ Manages their position on the screen relative to other elements, including other
|
|
|
6
19
|
|
|
7
20
|
Its purpose is to make it easy to use our Overlay System declaratively. It can be easily extended where needed, to override event listeners and more.
|
|
8
21
|
|
|
9
|
-
See [lion-dialog](../../../components/dialog/overview.md) and [lion-tooltip](https://github.com/ing-bank/lion/blob/
|
|
22
|
+
See [lion-dialog](../../../components/dialog/overview.md) and [lion-tooltip](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/components/tooltip/overview.md) for example Web Component implementations using the Overlay System.
|
|
10
23
|
|
|
11
24
|
## Features
|
|
12
25
|
|
|
@@ -18,9 +31,9 @@ See [lion-dialog](../../../components/dialog/overview.md) and [lion-tooltip](htt
|
|
|
18
31
|
- lion-overlay web component:
|
|
19
32
|
- Show content when clicking the invoker
|
|
20
33
|
- Have a `.config` object to set or update the OverlayController's configuration
|
|
21
|
-
- [**OverlaysManager**](https://github.com/ing-bank/lion/blob/
|
|
22
|
-
- [**OverlayController**](https://github.com/ing-bank/lion/blob/
|
|
23
|
-
- [**OverlayMixin**](https://github.com/ing-bank/lion/blob/
|
|
34
|
+
- [**OverlaysManager**](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/overlays/use-cases.md#overlaysmanager), a global repository keeping track of all different types of overlays
|
|
35
|
+
- [**OverlayController**](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/overlays/use-cases.md#overlaycontroller), a single controller class for handling overlays
|
|
36
|
+
- [**OverlayMixin**](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/overlays/use-cases.md#overlaymixin), a mixin that can be used to create webcomponents that use the OverlayController under the hood
|
|
24
37
|
|
|
25
38
|
Usually you will use `lion-dialog` (or `lion-tooltip` if this makes more sense).
|
|
26
39
|
|
|
@@ -110,4 +123,4 @@ class MyOverlayComponent extends OverlayMixin(LitElement) {
|
|
|
110
123
|
|
|
111
124
|
## Rationales
|
|
112
125
|
|
|
113
|
-
Please check the [system rationals](https://github.com/ing-bank/lion/blob/
|
|
126
|
+
Please check the [system rationals](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/overlays/rationale.md) folder, where we go more in-depth.
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Rationale
|
|
4
|
+
- Overlays
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Overlays: Rationale'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Systems >> Overlays >> Rationale
|
|
9
|
+
title: Rationale
|
|
10
|
+
order: 30
|
|
11
|
+
parent: Systems >> Overlays
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Systems >> Overlays >> Rationale ||30
|
|
2
15
|
|
|
3
16
|
This page describes the goal and duties of the overlay system, mainly by identifying all different
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Use Cases
|
|
4
|
+
- Overlays
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Overlays: Use Cases'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Systems >> Overlays >> Use Cases
|
|
9
|
+
title: Use Cases
|
|
10
|
+
order: 20
|
|
11
|
+
parent: Systems >> Overlays
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Systems >> Overlays >> Use Cases ||20
|
|
2
15
|
|
|
3
16
|
```js script
|
|
@@ -21,7 +34,7 @@ The overlay system allows to create different types of overlays like dialogs, to
|
|
|
21
34
|
It's designed to be highly flexible, while still delivering sensible defaults.
|
|
22
35
|
On top of this, the system was built having accessibility in mind.
|
|
23
36
|
|
|
24
|
-
For a detailed rationale, please consult [Rationale](https://github.com/ing-bank/lion/blob/
|
|
37
|
+
For a detailed rationale, please consult [Rationale](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/overlays/rationale.md).
|
|
25
38
|
|
|
26
39
|
```js preview-story
|
|
27
40
|
export const main = () => html`
|
|
@@ -69,7 +82,7 @@ Global refers to overlays where the content is positioned in a global root node
|
|
|
69
82
|
|
|
70
83
|
Overlays can be configured in many ways to suit your needs. We go in-depth into each option in the Overlay System - Configuration chapter.
|
|
71
84
|
|
|
72
|
-
We also export a few [preset configuration objects](https://github.com/ing-bank/lion/blob/
|
|
85
|
+
We also export a few [preset configuration objects](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/overlays/configuration.md).
|
|
73
86
|
|
|
74
87
|
- withModalDialogConfig
|
|
75
88
|
- withDropdownConfig
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Overview
|
|
4
|
+
- Ajax
|
|
5
|
+
- Tools
|
|
6
|
+
title: 'Ajax: Overview'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Tools >> Ajax >> Overview
|
|
9
|
+
title: Overview
|
|
10
|
+
order: 10
|
|
11
|
+
parent: Tools >> Ajax
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Tools >> Ajax >> Overview ||10
|
|
2
15
|
|
|
3
16
|
`Ajax` is a small wrapper around `fetch` which:
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Use Cases
|
|
4
|
+
- Ajax
|
|
5
|
+
- Tools
|
|
6
|
+
title: 'Ajax: Use Cases'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Tools >> Ajax >> Use Cases
|
|
9
|
+
title: Use Cases
|
|
10
|
+
order: 20
|
|
11
|
+
parent: Tools >> Ajax
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Tools >> Ajax >> Use Cases ||20
|
|
2
15
|
|
|
3
16
|
```js script
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Action Logger
|
|
4
|
+
- Helpers
|
|
5
|
+
- Tools
|
|
6
|
+
title: 'Helpers: Action Logger'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Tools >> Helpers >> Action Logger
|
|
9
|
+
title: Action Logger
|
|
10
|
+
order: 20
|
|
11
|
+
parent: Tools >> Helpers
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Tools >> Helpers >> Action Logger ||20
|
|
2
15
|
|
|
3
16
|
A visual element to show action logs in demos `sb-action-logger`
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Overview
|
|
4
|
+
- Helpers
|
|
5
|
+
- Tools
|
|
6
|
+
title: 'Helpers: Overview'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Tools >> Helpers >> Overview
|
|
9
|
+
title: Overview
|
|
10
|
+
order: 10
|
|
11
|
+
parent: Tools >> Helpers
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Tools >> Helpers >> Overview ||10
|
|
2
15
|
|
|
3
16
|
A helpers package that contains several helpers that are used inside lion but can be used outside as well.
|
|
@@ -9,7 +22,7 @@ Therefore, they may not have the same quality standards as our other packages.
|
|
|
9
22
|
|
|
10
23
|
| Package | Description |
|
|
11
24
|
| -------------------------------------- | ----------------------- |
|
|
12
|
-
| [sb-action-logger](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
| [sb-action-logger](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/tools/helpers/action-logger.md) | Storybook action logger |
|
|
13
26
|
|
|
14
27
|
## Installation
|
|
15
28
|
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Example Complex
|
|
4
|
+
- Singleton Manager
|
|
5
|
+
- Tools
|
|
6
|
+
title: 'Singleton Manager: Example Complex'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Tools >> Singleton Manager >> Example Complex
|
|
9
|
+
title: Example Complex
|
|
10
|
+
order: 40
|
|
11
|
+
parent: Tools >> Singleton Manager
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Tools >> Singleton Manager >> Example Complex ||40
|
|
2
15
|
|
|
3
16
|
In this SPA (Single Page Application) demo you will be able to reproduce the solution.
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Example Fail
|
|
4
|
+
- Singleton Manager
|
|
5
|
+
- Tools
|
|
6
|
+
title: 'Singleton Manager: Example Fail'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Tools >> Singleton Manager >> Example Fail
|
|
9
|
+
title: Example Fail
|
|
10
|
+
order: 20
|
|
11
|
+
parent: Tools >> Singleton Manager
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Tools >> Singleton Manager >> Example Fail ||20
|
|
2
15
|
|
|
3
16
|
In this SPA (Single Page Application) demo you will be able to reproduce the issue.
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Example Success
|
|
4
|
+
- Singleton Manager
|
|
5
|
+
- Tools
|
|
6
|
+
title: 'Singleton Manager: Example Success'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Tools >> Singleton Manager >> Example Success
|
|
9
|
+
title: Example Success
|
|
10
|
+
order: 30
|
|
11
|
+
parent: Tools >> Singleton Manager
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Tools >> Singleton Manager >> Example Success ||30
|
|
2
15
|
|
|
3
16
|
In this SPA (Single Page Application) demo you will be able to reproduce the solution.
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Singleton Manager
|
|
4
|
+
- Tools
|
|
5
|
+
title: 'Tools: Singleton Manager'
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: Tools >> Singleton Manager
|
|
8
|
+
title: Singleton Manager
|
|
9
|
+
order: 20
|
|
10
|
+
parent: Tools
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# Tools >> Singleton Manager ||20
|
|
2
14
|
|
|
3
15
|
-> go to Overview
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Overview
|
|
4
|
+
- Singleton Manager
|
|
5
|
+
- Tools
|
|
6
|
+
title: 'Singleton Manager: Overview'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Tools >> Singleton Manager >> Overview
|
|
9
|
+
title: Overview
|
|
10
|
+
order: 10
|
|
11
|
+
parent: Tools >> Singleton Manager
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Tools >> Singleton Manager >> Overview ||10
|
|
2
15
|
|
|
3
16
|
A singleton manager provides a way to make sure a singleton instance loaded from multiple file locations stays a singleton.
|
|
@@ -9,7 +22,7 @@ Primarily useful if two major version of a package with a singleton is used.
|
|
|
9
22
|
npm i --save singleton-manager
|
|
10
23
|
```
|
|
11
24
|
|
|
12
|
-
⚠️ You need to make SURE that only ONE version of `singleton-manager` is installed. For how see [Non Goals](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
⚠️ You need to make SURE that only ONE version of `singleton-manager` is installed. For how see [Non Goals](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/tools/singleton-manager/#non-goals).
|
|
13
26
|
|
|
14
27
|
### Example Singleton Users
|
|
15
28
|
|
|
@@ -159,7 +172,7 @@ Steps to reproduce:
|
|
|
159
172
|
1. Page A click on block
|
|
160
173
|
2. Page B => "Blocked: false" (even when hitting the refresh button)
|
|
161
174
|
|
|
162
|
-
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/
|
|
175
|
+
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/tools/singleton-manager/example-fail/index.md). <br>
|
|
163
176
|
➡️ See [the code](https://github.com/ing-bank/lion/tree/master/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js).
|
|
164
177
|
|
|
165
178
|
---
|
|
@@ -202,7 +215,7 @@ See it in action
|
|
|
202
215
|
npm run start:singleton
|
|
203
216
|
```
|
|
204
217
|
|
|
205
|
-
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/
|
|
218
|
+
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/tools/singleton-manager/example-success/index.md). <br>
|
|
206
219
|
➡️ See [the code](https://github.com/ing-bank/lion/tree/master/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js).
|
|
207
220
|
|
|
208
221
|
---
|
|
@@ -243,7 +256,7 @@ See it in action
|
|
|
243
256
|
npm run start:singleton-complex
|
|
244
257
|
```
|
|
245
258
|
|
|
246
|
-
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/
|
|
259
|
+
➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/tools/singleton-manager/example-complex/index.md). <br>
|
|
247
260
|
➡️ See [the code](https://github.com/ing-bank/lion/tree/master/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js).
|
|
248
261
|
|
|
249
262
|
---
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- How To
|
|
4
|
+
- Create a custom field
|
|
5
|
+
title: 'How To: Create a custom field'
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: 'How To: Create a custom field'
|
|
8
|
+
order: 20
|
|
9
|
+
parent: How To
|
|
10
|
+
title: Create a custom field
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# How To: Create a custom field
|
|
2
14
|
|
|
3
15
|
```js script
|
|
4
16
|
import { html, css, LitElement } from '@mdjs/mdjs-preview';
|
|
@@ -75,9 +87,9 @@ if (!customElements.get('dummy-slider')) {
|
|
|
75
87
|
}
|
|
76
88
|
```
|
|
77
89
|
|
|
78
|
-
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/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/components/input/overview.md).
|
|
79
91
|
|
|
80
|
-
> 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/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/how-to/extend-a-native-input.md).
|
|
81
93
|
|
|
82
94
|
## A) an interaction element
|
|
83
95
|
|
|
@@ -126,7 +138,7 @@ export const createAnInteractiveElement = () => {
|
|
|
126
138
|
## B) your LionField extension
|
|
127
139
|
|
|
128
140
|
Now we want to integrate the slider in our form system to enrich the user interface, get
|
|
129
|
-
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/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/components/input/overview.md).
|
|
130
142
|
We start by creating a component `<slider-field>` that extends from `LionField`.
|
|
131
143
|
Then we follow the steps below:
|
|
132
144
|
|
|
@@ -139,7 +151,7 @@ Then we follow the steps below:
|
|
|
139
151
|
|
|
140
152
|
The `user-input-changed` event is listened to by the FormatMixin: it should be regarded as the
|
|
141
153
|
equivalent of the `input` event of the platform, but for custom built interaction elements.
|
|
142
|
-
You now synchronized [modelValue](https://github.com/ing-bank/lion/blob/
|
|
154
|
+
You now synchronized [modelValue](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/form/model-value.md), which can be regarded as
|
|
143
155
|
the glue to integrate all other functionality like parsing/formatting/serializing, validating,
|
|
144
156
|
tracking interaction states etc.
|
|
145
157
|
|
|
@@ -147,7 +159,7 @@ Then we follow the steps below:
|
|
|
147
159
|
> because those properties will lose their reactivity (they won't be considered anymore in the
|
|
148
160
|
> update loop of LitElement).
|
|
149
161
|
> Whenever a .modelValue/.formattedValue/.serializedValue needs to be computed, use
|
|
150
|
-
> [parser/formatter/serializer](https://github.com/ing-bank/lion/blob/
|
|
162
|
+
> [parser/formatter/serializer](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/form/formatting-and-parsing.md)
|
|
151
163
|
|
|
152
164
|
Implement with the following code:
|
|
153
165
|
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- How To
|
|
4
|
+
- Create a form
|
|
5
|
+
title: 'How To: Create a form'
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: 'How To: Create a form'
|
|
8
|
+
order: 15
|
|
9
|
+
parent: How To
|
|
10
|
+
title: Create a form
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# How To: Create a form
|
|
2
14
|
|
|
3
15
|
Creating your own forms as an Application Developer is really simple. Only two rules need to be followed.
|
|
4
16
|
|
|
@@ -27,7 +39,7 @@ Large or complex forms might need to be split up into multiple files. This compo
|
|
|
27
39
|
|
|
28
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.
|
|
29
41
|
|
|
30
|
-
> 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/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/rationales/accessibility.md#shadow-roots-and-accessibility).
|
|
31
43
|
|
|
32
44
|
### Example of a component that renders into Light DOM
|
|
33
45
|
|
|
@@ -74,7 +86,7 @@ Extending form components is not recommended for Application Developers: it shou
|
|
|
74
86
|
This team will add the styling and default configuration needed to make it fit the particular Design System.
|
|
75
87
|
|
|
76
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
|
|
77
|
-
[exceptional cases](https://github.com/ing-bank/lion/blob/
|
|
89
|
+
[exceptional cases](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/how-to/#exceptional-cases) below.
|
|
78
90
|
|
|
79
91
|
### Exceptional cases
|
|
80
92
|
|
|
@@ -82,8 +94,8 @@ If the form component you need is still missing, you have two options:
|
|
|
82
94
|
|
|
83
95
|
- is it a generic primitive that should be part of Lion? Request it in [Lion discussions](https://github.com/ing-bank/lion/discussions)
|
|
84
96
|
- is it a non generic component that is unique to your app?
|
|
85
|
-
- follow [create a custom field](https://github.com/ing-bank/lion/blob/
|
|
86
|
-
- 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/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/how-to/create-a-custom-field.md)
|
|
98
|
+
- follow [extend a native input](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/how-to/extend-a-native-input.md)
|
|
87
99
|
|
|
88
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.
|
|
89
101
|
Changing/overriding functionality is only recommended if the source code in `form-core` is fully understood.
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- How To
|
|
4
|
+
- Extend a native input
|
|
5
|
+
title: 'How To: Extend a native input'
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: 'How To: Extend a native input'
|
|
8
|
+
order: 20
|
|
9
|
+
parent: How To
|
|
10
|
+
title: Extend a native input
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# How To: Extend a native input
|
|
2
14
|
|
|
3
15
|
```js script
|
|
4
16
|
import { html } from '@mdjs/mdjs-preview';
|
|
@@ -11,9 +23,9 @@ import '../../fundamentals/systems/form/assets/h-output.js';
|
|
|
11
23
|
loadDefaultFeedbackMessages();
|
|
12
24
|
```
|
|
13
25
|
|
|
14
|
-
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/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/components/input/overview.md).
|
|
15
27
|
|
|
16
|
-
> 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/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/how-to/create-a-custom-field.md).
|
|
17
29
|
|
|
18
30
|
For this tutorial, we create an input that wraps native `input[type=datetime-local]`.
|
|
19
31
|
This is as simple as adding a type:
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- How To
|
|
4
|
+
- Get Started
|
|
5
|
+
title: 'How To: Get Started'
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: 'How To: Get Started'
|
|
8
|
+
order: 10
|
|
9
|
+
parent: How To
|
|
10
|
+
title: Get Started
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# How To: Get Started
|
|
2
14
|
|
|
3
15
|
## Technologies Used
|
|
4
16
|
|
package/docs/guides/index.md
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Guides
|
|
4
|
+
title: Guides
|
|
5
|
+
eleventyNavigation:
|
|
6
|
+
key: Guides
|
|
7
|
+
order: 30
|
|
8
|
+
title: Guides
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Guides
|
|
2
12
|
|
|
3
13
|
Lion is a set of white label Web Components that can be extended to your own styled layer of components.
|
|
4
14
|
|
|
@@ -12,9 +22,9 @@ Developers consuming our web components inside an application (not extending the
|
|
|
12
22
|
`Application Developers` are only allowed to interact with `public` properties and methods.
|
|
13
23
|
Can be abbreviated as `AD`. Sometimes also called `Consuming Developer`.
|
|
14
24
|
|
|
15
|
-
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/
|
|
16
|
-
- [Styling](https://github.com/ing-bank/lion/blob/
|
|
17
|
-
- [Scoped Elements](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/principles/definitions-and-terms.md)
|
|
26
|
+
- [Styling](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/principles/styling.md)
|
|
27
|
+
- [Scoped Elements](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/principles/scoped-elements.md)
|
|
18
28
|
|
|
19
29
|
## Extending Developer
|
|
20
30
|
|
|
@@ -22,13 +32,13 @@ Developers extending our web components, for instance: `class MaterialInput exte
|
|
|
22
32
|
|
|
23
33
|
Especially for subclassers we have some extra documentation:
|
|
24
34
|
|
|
25
|
-
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/
|
|
26
|
-
- [Extend documentation](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/principles/subclasser-apis.md)
|
|
36
|
+
- [Extend documentation](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/blog/extending-documentation.md)
|
|
27
37
|
|
|
28
38
|
## How To
|
|
29
39
|
|
|
30
40
|
Next to that we have some specific "How To" documentations.
|
|
31
41
|
|
|
32
|
-
- [Get started](https://github.com/ing-bank/lion/blob/
|
|
33
|
-
- [Create a custom field](https://github.com/ing-bank/lion/blob/
|
|
34
|
-
- [Extend a native input](https://github.com/ing-bank/lion/blob/
|
|
42
|
+
- [Get started](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/how-to/get-started.md)
|
|
43
|
+
- [Create a custom field](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/how-to/create-a-custom-field.md)
|
|
44
|
+
- [Extend a native input](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/how-to/extend-a-native-input.md)
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Principles
|
|
4
|
+
- Definitions and Terms
|
|
5
|
+
title: 'Principles: Definitions and Terms'
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: 'Principles: Definitions and Terms'
|
|
8
|
+
order: 20
|
|
9
|
+
parent: Principles
|
|
10
|
+
title: Definitions and Terms
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Principles: Definitions and Terms
|
|
2
14
|
|
|
3
15
|
Below you will find a list of definitions and terms that will be used throughout our code
|
|
4
16
|
documentation.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Principles
|
|
4
|
+
title: Principles
|
|
5
|
+
eleventyNavigation:
|
|
6
|
+
key: Principles
|
|
7
|
+
order: 10
|
|
8
|
+
title: Principles
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Principles
|
|
2
12
|
|
|
3
13
|
Lion is a set of white label Web Components that can be extended to your own styled layer of components.
|
|
4
14
|
|
|
@@ -12,9 +22,9 @@ Developers consuming our web components inside an application (not extending the
|
|
|
12
22
|
`Application Developers` are only allowed to interact with `public` properties and methods.
|
|
13
23
|
Can be abbreviated as `AD`. Sometimes also called `Consuming Developer`.
|
|
14
24
|
|
|
15
|
-
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/
|
|
16
|
-
- [Styling](https://github.com/ing-bank/lion/blob/
|
|
17
|
-
- [Scoped Elements](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
- [Definitions and Terms](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/principles/definitions-and-terms.md)
|
|
26
|
+
- [Styling](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/principles/styling.md)
|
|
27
|
+
- [Scoped Elements](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/principles/scoped-elements.md)
|
|
18
28
|
|
|
19
29
|
## Extending Developer
|
|
20
30
|
|
|
@@ -22,5 +32,5 @@ Developers extending our web components, for instance: `class MaterialInput exte
|
|
|
22
32
|
|
|
23
33
|
Especially for subclassers we have some extra documentation:
|
|
24
34
|
|
|
25
|
-
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/
|
|
26
|
-
- [Extend documentation](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- [Subclasser APIs](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/guides/principles/subclasser-apis.md)
|
|
36
|
+
- [Extend documentation](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/blog/extending-documentation.md)
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Principles
|
|
4
|
+
- Scoped Elements
|
|
5
|
+
title: 'Principles: Scoped Elements'
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: 'Principles: Scoped Elements'
|
|
8
|
+
order: 40
|
|
9
|
+
parent: Principles
|
|
10
|
+
title: Scoped Elements
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Principles: Scoped Elements
|
|
2
14
|
|
|
3
15
|
The [CustomElementRegistry](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry) provides methods for registering custom elements. One of the limitations of working with this global registry is that multiple versions of the same element cannot co-exist. This causes bottlenecks in software delivery that should be managed by the teams and complex build systems. [Scoped Custom Element Registries](https://github.com/w3c/webcomponents/issues/716) is a proposal that will solve the problem. Since this functionality won't be available (especially not cross browser) anytime soon, we've adopted [OpenWC's Scoped Elements](https://open-wc.org/docs/development/scoped-elements/).
|
|
4
16
|
|