@lion/ui 0.11.0 → 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 +4 -4
- package/components/checkbox-group/src/LionCheckboxIndeterminate.js +39 -16
- package/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.js +189 -1
- package/components/combobox/test/lion-combobox.test.js +75 -1
- package/components/form-core/src/FocusMixin.js +4 -4
- package/components/form-core/src/LionField.js +1 -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/components/localize/types/LocalizeMixinTypes.ts +0 -5
- package/components/select-rich/src/LionSelectRich.js +1 -1
- package/components/select-rich/test/lion-select-rich.test.js +13 -1
- package/custom-elements.json +47758 -47690
- package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts +10 -0
- package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts.map +1 -1
- package/dist-types/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.d.ts.map +1 -1
- 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/components/localize/types/LocalizeMixinTypes.d.ts +0 -4
- package/dist-types/components/localize/types/LocalizeMixinTypes.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/accordion/api-table.md +19 -7
- 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 +40 -31
- 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 +26 -14
- 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 +318 -330
- 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 +18 -6
- 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 +163 -155
- 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 +25 -13
- 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 +22 -11
- 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 +117 -119
- 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 +16 -4
- 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 +123 -121
- 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 +142 -143
- 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 +123 -121
- 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 +161 -161
- 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 +123 -121
- 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 +145 -144
- 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 +123 -121
- 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 +129 -127
- 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 +136 -134
- 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 +131 -129
- 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 +138 -136
- 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 +139 -132
- 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 +18 -6
- 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 +22 -11
- 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 +247 -259
- 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 +119 -117
- 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 +182 -179
- 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 +19 -7
- 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 +130 -129
- 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 +14 -2
- 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 +127 -125
- 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 +26 -14
- 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 +22 -12
- 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 +91 -83
- 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 +33 -20
- 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 +59 -47
- 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
|
+
- Format Numbers
|
|
4
|
+
- Localize
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Localize: Format Numbers'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Systems >> Localize >> Format Numbers
|
|
9
|
+
title: Format Numbers
|
|
10
|
+
order: 30
|
|
11
|
+
parent: Systems >> Localize
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Systems >> Localize >> Format Numbers ||30
|
|
2
15
|
|
|
3
16
|
## Features
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Overview
|
|
4
|
+
- Localize
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Localize: Overview'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Systems >> Localize >> Overview
|
|
9
|
+
title: Overview
|
|
10
|
+
order: 10
|
|
11
|
+
parent: Systems >> Localize
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Systems >> Localize >> Overview ||10
|
|
2
15
|
|
|
3
16
|
Is meant to translate text into multiple languages.
|
|
@@ -9,15 +22,15 @@ In it's simplest form it is a function that returns the translated text for a na
|
|
|
9
22
|
- Formatting of numbers, amounts
|
|
10
23
|
- Formatting of dates
|
|
11
24
|
|
|
12
|
-
Further examples and a more in depth description can be found at the [Use Cases Page](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
Further examples and a more in depth description can be found at the [Use Cases Page](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/localize/use-cases.md).
|
|
13
26
|
|
|
14
27
|
## Content
|
|
15
28
|
|
|
16
29
|
| Feature | Description |
|
|
17
30
|
| ---------------------------------------- | --------------------------------------------- |
|
|
18
|
-
| [Translate Text](https://github.com/ing-bank/lion/blob/
|
|
19
|
-
| [Format Numbers](https://github.com/ing-bank/lion/blob/
|
|
20
|
-
| [Format Dates](https://github.com/ing-bank/lion/blob/
|
|
31
|
+
| [Translate Text](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/localize/text.md) | Load and translate text in multiple languages |
|
|
32
|
+
| [Format Numbers](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/localize/numbers.md) | Format numbers in multiple languages |
|
|
33
|
+
| [Format Dates](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/localize/dates.md) | Format dates in multiple languages |
|
|
21
34
|
|
|
22
35
|
## Installation
|
|
23
36
|
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Rationale
|
|
4
|
+
- Localize
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Localize: Rationale'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Systems >> Localize >> Rationale
|
|
9
|
+
title: Rationale
|
|
10
|
+
order: 60
|
|
11
|
+
parent: Systems >> Localize
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Systems >> Localize >> Rationale ||60
|
|
2
15
|
|
|
3
16
|
## Requirements
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Translate Text
|
|
4
|
+
- Localize
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Localize: Translate Text'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Systems >> Localize >> Translate Text
|
|
9
|
+
title: Translate Text
|
|
10
|
+
order: 20
|
|
11
|
+
parent: Systems >> Localize
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Systems >> Localize >> Translate Text ||20
|
|
2
15
|
|
|
3
16
|
## As a function
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Use Cases
|
|
4
|
+
- Localize
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Localize: Use Cases'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Systems >> Localize >> Use Cases
|
|
9
|
+
title: Use Cases
|
|
10
|
+
order: 50
|
|
11
|
+
parent: Systems >> Localize
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Systems >> Localize >> Use Cases ||50
|
|
2
15
|
|
|
3
16
|
The localization system helps to manage localization data split into locales and automate its loading.
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
eleventyExcludeFromCollections: true
|
|
3
|
+
parts:
|
|
4
|
+
- Positioning
|
|
5
|
+
- Configuration
|
|
6
|
+
- Overlays
|
|
7
|
+
- Systems
|
|
8
|
+
title: 'Configuration: Positioning'
|
|
9
|
+
eleventyNavigation:
|
|
10
|
+
key: Systems >> Overlays >> Configuration >> Positioning
|
|
11
|
+
title: Positioning
|
|
12
|
+
order: 40
|
|
13
|
+
parent: Systems >> Overlays >> Configuration
|
|
3
14
|
---
|
|
4
15
|
|
|
5
16
|
# Systems >> Overlays >> Configuration >> Positioning ||40
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
eleventyExcludeFromCollections: true
|
|
3
|
+
parts:
|
|
4
|
+
- Edge cases
|
|
5
|
+
- Overlays
|
|
6
|
+
- Systems
|
|
7
|
+
title: 'Overlays: Edge cases'
|
|
8
|
+
eleventyNavigation:
|
|
9
|
+
key: Systems >> Overlays >> Edge cases
|
|
10
|
+
title: Edge cases
|
|
11
|
+
order: 10
|
|
12
|
+
parent: Systems >> Overlays
|
|
3
13
|
---
|
|
4
14
|
|
|
5
15
|
# Systems >> Overlays >> Edge cases ||10
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- API Table
|
|
4
|
+
- Overlays
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Overlays: API Table'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: API Table >> Overlays >> Systems
|
|
9
|
+
title: API Table
|
|
10
|
+
order: 90
|
|
11
|
+
parent: Systems >> Overlays
|
|
12
|
+
---
|
|
13
|
+
# Overlays: API Table
|
|
14
|
+
|
|
2
15
|
|
|
3
16
|
## class: `OverlayController`
|
|
4
17
|
|
|
@@ -6,73 +19,72 @@
|
|
|
6
19
|
|
|
7
20
|
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
8
21
|
| ----------------------------- | --------- | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
9
|
-
| `
|
|
22
|
+
| `backdropNode` | public | `HTMLElement` | | The element that is placed behind the contentNode. When not provided and \`hasBackdrop\` is true,
a backdropNode will be automatically created | |
|
|
23
|
+
| `config` | public | `OverlayConfig` | `{}` | | |
|
|
10
24
|
| `content` | public | `HTMLDialogElement \| HTMLDivElement` | | The contentWrapperNode | |
|
|
11
|
-
| `placementMode` | public | `'global' \| 'local' \| undefined` | | Determines the connection point in DOM (body vs next to invoker). | |
|
|
12
|
-
| `invokerNode` | public | `HTMLElement \| undefined` | | The interactive element (usually a button) invoking the dialog or tooltip | |
|
|
13
|
-
| `referenceNode` | public | `HTMLElement` | | The element that is used to position the overlay content relative to. Usually,
this is the same element as invokerNode. Should only be provided when invokerNode should not
be positioned against. | |
|
|
14
25
|
| `contentNode` | public | `HTMLElement` | | The most important element: the overlay itself | |
|
|
15
26
|
| `contentWrapperNode` | public | `HTMLElement` | | The wrapper element of contentNode, used to supply inline positioning styles. When a Popper
arrow is needed, it acts as parent of the arrow node. Will be automatically created for global
and non projected contentNodes. Required when used in shadow dom mode or when Popper arrow is
supplied. Essential for allowing webcomponents to style their projected contentNodes | |
|
|
16
|
-
| `backdropNode` | public | `HTMLElement` | | The element that is placed behind the contentNode. When not provided and \`hasBackdrop\` is true,
a backdropNode will be automatically created | |
|
|
17
27
|
| `elementToFocusAfterHide` | public | `HTMLElement` | | The element that should be called \`.focus()\` on after dialog closes | |
|
|
28
|
+
| `elevation` | public | `number` | | | |
|
|
29
|
+
| `handlesAccessibility` | public | `boolean` | | For non \`isTooltip\`:
 \- sets aria-expanded="true/false" and aria-haspopup="true" on invokerNode
 \- sets aria-controls on invokerNode
 \- returns focus to invokerNode on hide
 \- sets focus to overlay content(?)

For \`isTooltip\`:
 \- sets role="tooltip" and aria-labelledby/aria-describedby on the content | |
|
|
30
|
+
| `hasActiveBackdrop` | public | | | | |
|
|
31
|
+
| `hasActiveTrapsKeyboardFocus` | public | | | | |
|
|
18
32
|
| `hasBackdrop` | public | `boolean` | | Whether it should have a backdrop (currently exclusive to globalOverlayController) | |
|
|
19
|
-
| `isBlocking` | public | `boolean` | | Hides other overlays when mutiple are opened (currently exclusive to globalOverlayController) | |
|
|
20
|
-
| `preventsScroll` | public | `boolean` | | Hides other overlays when mutiple are opened (currently exclusive to globalOverlayController) | |
|
|
21
|
-
| `trapsKeyboardFocus` | public | `boolean` | | Rotates tab, implicitly set when 'isModal' | |
|
|
22
33
|
| `hidesOnEsc` | public | `boolean` | | Hides the overlay when pressing \[ esc ] | |
|
|
23
34
|
| `hidesOnOutsideClick` | public | `boolean` | | Hides the overlay when clicking next to it, exluding invoker | |
|
|
24
35
|
| `hidesOnOutsideEsc` | public | `boolean` | | Hides the overlay when pressing esc, even when contentNode has no focus | |
|
|
25
36
|
| `inheritsReferenceWidth` | public | `'max' \| 'full' \| 'min' \| 'none' \| undefined` | | Will align contentNode with referenceNode (invokerNode by default) for local overlays.
Usually needed for dropdowns. 'max' will prevent contentNode from exceeding width of
referenceNode, 'min' guarantees that contentNode will be at least as wide as referenceNode.
'full' will make sure that the invoker width always is the same. | |
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `isAlertDialog` | public | | | The alertdialog role is to be used on modal alert dialogs that interrupt a user's workflow
to communicate an important message and require a response. | |
|
|
37
|
+
| `invoker` | public | `HTMLElement \| undefined` | | The invokerNode | |
|
|
38
|
+
| `invokerNode` | public | `HTMLElement \| undefined` | | The interactive element (usually a button) invoking the dialog or tooltip | |
|
|
29
39
|
| `invokerRelation` | public | `'label' \| 'description'\| undefined` | | By default, the tooltip content is a 'description' for the invoker (uses aria-describedby).
Setting this property to 'label' makes the content function as a label (via aria-labelledby) | |
|
|
40
|
+
| `isAlertDialog` | public | | | The alertdialog role is to be used on modal alert dialogs that interrupt a user's workflow
to communicate an important message and require a response. | |
|
|
41
|
+
| `isBlocking` | public | `boolean` | | Hides other overlays when mutiple are opened (currently exclusive to globalOverlayController) | |
|
|
42
|
+
| `isShown` | public | | | | |
|
|
43
|
+
| `isTooltip` | public | `boolean` | | Has a totally different interaction- and accessibility pattern from all other overlays.
Will behave as role="tooltip" element instead of a role="dialog" element | |
|
|
44
|
+
| `manager` | public | | `manager` | | |
|
|
45
|
+
| `placementMode` | public | `'global' \| 'local' \| undefined` | | Determines the connection point in DOM (body vs next to invoker). | |
|
|
30
46
|
| `popperConfig` | public | `PopperOptions` | | Popper configuration. Will be used when placementMode is 'local' | |
|
|
47
|
+
| `preventsScroll` | public | `boolean` | | Hides other overlays when mutiple are opened (currently exclusive to globalOverlayController) | |
|
|
48
|
+
| `referenceNode` | public | `HTMLElement` | | The element that is used to position the overlay content relative to. Usually,
this is the same element as invokerNode. Should only be provided when invokerNode should not
be positioned against. | |
|
|
49
|
+
| `trapsKeyboardFocus` | public | `boolean` | | Rotates tab, implicitly set when 'isModal' | |
|
|
31
50
|
| `viewportConfig` | public | `ViewportConfig` | | Viewport configuration. Will be used when placementMode is 'global' | |
|
|
32
51
|
| `visibilityTriggerFunction` | public | | | | |
|
|
33
|
-
| `_referenceNode` | protected | `HTMLElement \| undefined` | | | |
|
|
34
|
-
| `elevation` | public | `number` | | | |
|
|
35
|
-
| `isShown` | public | | | | |
|
|
36
|
-
| `hasActiveBackdrop` | public | | | | |
|
|
37
|
-
| `hasActiveTrapsKeyboardFocus` | public | | | | |
|
|
38
|
-
| `manager` | public | | `manager` | | |
|
|
39
|
-
| `config` | public | `OverlayConfig` | `{}` | | |
|
|
40
|
-
| `_defaultConfig` | protected | `OverlayConfig` | `{ placementMode: undefined, contentNode: config.contentNode, contentWrapperNode: config.contentWrapperNode, invokerNode: config.invokerNode, backdropNode: config.backdropNode, referenceNode: undefined, elementToFocusAfterHide: config.invokerNode, inheritsReferenceWidth: 'none', hasBackdrop: false, isBlocking: false, preventsScroll: false, trapsKeyboardFocus: false, hidesOnEsc: false, hidesOnOutsideEsc: false, hidesOnOutsideClick: false, isTooltip: false, isAlertDialog: false, invokerRelation: 'description', visibilityTriggerFunction: undefined, handlesAccessibility: false, popperConfig: { placement: 'top', strategy: 'fixed', modifiers: [ { name: 'preventOverflow', enabled: true, options: { boundariesElement: 'viewport', padding: 8, // viewport-margin for shifting/sliding }, }, { name: 'flip', options: { boundariesElement: 'viewport', padding: 16, // viewport-margin for flipping }, }, { name: 'offset', enabled: true, options: { offset: [0, 8], // horizontal and vertical margin (distance between popper and referenceElement) }, }, { name: 'arrow', enabled: false, }, ], }, viewportConfig: { placement: 'center', }, zIndex: 9999, }` | | |
|
|
41
52
|
| `_contentId` | protected | | `` `overlay-content--${Math.random().toString(36).slice(2, 10)}` `` | | |
|
|
53
|
+
| `_defaultConfig` | protected | `OverlayConfig` | `{ placementMode: undefined, contentNode: config.contentNode, contentWrapperNode: config.contentWrapperNode, invokerNode: config.invokerNode, backdropNode: config.backdropNode, referenceNode: undefined, elementToFocusAfterHide: config.invokerNode, inheritsReferenceWidth: 'none', hasBackdrop: false, isBlocking: false, preventsScroll: false, trapsKeyboardFocus: false, hidesOnEsc: false, hidesOnOutsideEsc: false, hidesOnOutsideClick: false, isTooltip: false, isAlertDialog: false, invokerRelation: 'description', visibilityTriggerFunction: undefined, handlesAccessibility: false, popperConfig: { placement: 'top', strategy: 'fixed', modifiers: [ { name: 'preventOverflow', enabled: true, options: { boundariesElement: 'viewport', padding: 8, // viewport-margin for shifting/sliding }, }, { name: 'flip', options: { boundariesElement: 'viewport', padding: 16, // viewport-margin for flipping }, }, { name: 'offset', enabled: true, options: { offset: [0, 8], // horizontal and vertical margin (distance between popper and referenceElement) }, }, { name: 'arrow', enabled: false, }, ], }, viewportConfig: { placement: 'center', }, zIndex: 9999, }` | | |
|
|
54
|
+
| `_referenceNode` | protected | `HTMLElement \| undefined` | | | |
|
|
42
55
|
|
|
43
56
|
### Methods
|
|
44
57
|
|
|
45
58
|
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
46
59
|
| ------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------ | -------------- |
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `_handleZIndex` | protected | Display local overlays on top of elements with no z-index that appear later in the DOM | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
50
|
-
| `show` | public | | `elementToFocusAfterHide: HTMLElement` | | |
|
|
51
|
-
| `_handlePosition` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
52
|
-
| `_keepBodySize` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
60
|
+
| `disableTrapsKeyboardFocus` | public | | `{ findNewTrap = true }` | | |
|
|
61
|
+
| `enableTrapsKeyboardFocus` | public | | | | |
|
|
53
62
|
| `hide` | public | | | | |
|
|
63
|
+
| `show` | public | | `elementToFocusAfterHide: HTMLElement` | | |
|
|
64
|
+
| `teardown` | public | | | | |
|
|
65
|
+
| `toggle` | public | | | | |
|
|
54
66
|
| `transitionHide` | public | Method to be overriden by subclassers | `hideConfig: {backdropNode:HTMLElement, contentNode:HTMLElement}` | | |
|
|
55
|
-
| `_transitionHide` | protected | | `{ backdropNode, contentNode }, hideConfig: {backdropNode:HTMLElement, contentNode:HTMLElement}` | | |
|
|
56
67
|
| `transitionShow` | public | To be overridden by subclassers | `showConfig: {backdropNode:HTMLElement; contentNode:HTMLElement}` | | |
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `toggle` | public | | | | |
|
|
60
|
-
| `_handleFeatures` | protected | All features are handled here. | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
61
|
-
| `_handleVisibilityTriggers` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
62
|
-
| `_handlePreventsScroll` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
63
|
-
| `_handleBlocking` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
68
|
+
| `updateConfig` | public | Allows to dynamically change the overlay configuration. Needed in case the
presentation of the overlay changes depending on screen size.
Note that this method is the only allowed way to update a configuration of an
OverlayController instance. | `cfgToAdd: OverlayConfig` | | |
|
|
69
|
+
| `_handleAccessibility` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
64
70
|
| `_handleBackdrop` | protected | Sets up backdrop on the given overlay. If there was a backdrop on another element
it is removed. Otherwise this is the first time displaying a backdrop, so a animation-in
animation is played. | `{ phase }, config: { animation?: boolean, phase: OverlayPhase }` | | |
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `disableTrapsKeyboardFocus` | public | | `{ findNewTrap = true }` | | |
|
|
68
|
-
| `__escKeyHandler` | protected | | `event: KeyboardEvent` | `void` | |
|
|
71
|
+
| `_handleBlocking` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
72
|
+
| `_handleFeatures` | protected | All features are handled here. | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
69
73
|
| `_handleHidesOnEsc` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
74
|
+
| `_handleHidesOnOutsideClick` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
70
75
|
| `_handleHidesOnOutsideEsc` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
71
76
|
| `_handleInheritsReferenceWidth` | protected | | | | |
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
77
|
+
| `_handlePosition` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
78
|
+
| `_handlePreventsScroll` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
79
|
+
| `_handleTrapsKeyboardFocus` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
80
|
+
| `_handleVisibilityTriggers` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
81
|
+
| `_handleZIndex` | protected | Display local overlays on top of elements with no z-index that appear later in the DOM | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
75
82
|
| `_hasDisabledInvoker` | protected | | | | |
|
|
83
|
+
| `_init` | protected | | | | |
|
|
84
|
+
| `_keepBodySize` | protected | | `{ phase }, config: { phase: OverlayPhase }` | | |
|
|
85
|
+
| `_restoreFocus` | protected | | | | |
|
|
86
|
+
| `_transitionHide` | protected | | `{ backdropNode, contentNode }, hideConfig: {backdropNode:HTMLElement, contentNode:HTMLElement}` | | |
|
|
87
|
+
| `_transitionShow` | protected | | `showConfig: {backdropNode:HTMLElement; contentNode:HTMLElement}` | | |
|
|
76
88
|
|
|
77
89
|
### Events
|
|
78
90
|
|
|
@@ -99,16 +111,16 @@
|
|
|
99
111
|
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
100
112
|
| ------------------------------------- | ------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------- | -------------- |
|
|
101
113
|
| `add` | public | Registers an overlay controller. | `ctrlToAdd: OverlayController` | `OverlayController` | |
|
|
102
|
-
| `remove` | public | | `ctrlToRemove: OverlayController` | | |
|
|
103
|
-
| `show` | public | | `ctrlToShow: OverlayController` | | |
|
|
104
|
-
| `hide` | public | | `ctrlToHide: any` | | |
|
|
105
|
-
| `teardown` | public | | | | |
|
|
106
114
|
| `disableTrapsKeyboardFocusForAll` | public | | | | |
|
|
107
|
-
| `
|
|
115
|
+
| `hide` | public | | `ctrlToHide: any` | | |
|
|
108
116
|
| `informTrapsKeyboardFocusGotDisabled` | public | | `{ disabledCtrl, findNewTrap = true }, options: { disabledCtrl?:OverlayController, findNewTrap?:boolean }` | | |
|
|
109
|
-
| `
|
|
117
|
+
| `informTrapsKeyboardFocusGotEnabled` | public | | `placementMode: 'local' \| 'global' \| undefined` | | |
|
|
118
|
+
| `remove` | public | | `ctrlToRemove: OverlayController` | | |
|
|
110
119
|
| `requestToEnableScroll` | public | | | | |
|
|
120
|
+
| `requestToPreventScroll` | public | PreventsScroll | | | |
|
|
111
121
|
| `requestToShowOnly` | public | Blocking | `blockingCtrl: OverlayController` | | |
|
|
112
122
|
| `retractRequestToShowOnly` | public | | `blockingCtrl: OverlayController` | | |
|
|
123
|
+
| `show` | public | | `ctrlToShow: OverlayController` | | |
|
|
124
|
+
| `teardown` | public | | | | |
|
|
113
125
|
|
|
114
126
|
<hr/>
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- Configuration
|
|
4
|
+
- Overlays
|
|
5
|
+
- Systems
|
|
6
|
+
title: 'Overlays: Configuration'
|
|
7
|
+
eleventyNavigation:
|
|
8
|
+
key: Systems >> Overlays >> Configuration
|
|
9
|
+
title: Configuration
|
|
10
|
+
order: 40
|
|
11
|
+
parent: Systems >> Overlays
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# Systems >> Overlays >> Configuration ||40
|
|
2
15
|
|
|
3
16
|
```js script
|
|
@@ -99,7 +112,7 @@ export const alertDialog = () => {
|
|
|
99
112
|
|
|
100
113
|
## isTooltip (placementMode: 'local')
|
|
101
114
|
|
|
102
|
-
As specified in the [overlay rationale](https://github.com/ing-bank/lion/blob/
|
|
115
|
+
As specified in the [overlay rationale](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/fundamentals/systems/overlays/rationale.md) there are only two official types of overlays: dialogs and tooltips. And their main differences are:
|
|
103
116
|
|
|
104
117
|
- Dialogs have a modal option, tooltips don’t
|
|
105
118
|
- Dialogs have interactive content, tooltips don’t
|
|
@@ -430,7 +443,7 @@ Features:
|
|
|
430
443
|
|
|
431
444
|
> Popper strictly is scoped on positioning. **It does not change the dimensions of the content node nor the invoker node**.
|
|
432
445
|
> This also means that if you use the arrow feature, you are in charge of styling it properly, use the data-popper-placement attribute for this.
|
|
433
|
-
> An example implementation can be found in [lion-tooltip](https://github.com/ing-bank/lion/blob/
|
|
446
|
+
> An example implementation can be found in [lion-tooltip](https://github.com/ing-bank/lion/blob/87a1cb4d5bec301af6688be2c7bf778344d2ae42/docs/components/tooltip/overview.md), where an arrow is set by default.
|
|
434
447
|
|
|
435
448
|
To override the default options we set for local mode, you add a `popperConfig` object to the config passed to the OverlayController.
|
|
436
449
|
Here's a succinct overview of some often used popper properties:
|