@lion/ui 0.15.3 → 0.15.5

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.
Files changed (153) hide show
  1. package/README.md +2 -2
  2. package/components/collapsible/src/LionCollapsible.js +0 -2
  3. package/components/collapsible/test/lion-collapsible.test.js +0 -9
  4. package/components/combobox/src/LionCombobox.js +4 -1
  5. package/components/combobox/test/lion-combobox-integrations.test.js +23 -0
  6. package/components/combobox/test/lion-combobox.test.js +20 -0
  7. package/components/core/src/ScopedStylesController.js +7 -10
  8. package/components/core/test-helpers/getCachedFixture.js +55 -0
  9. package/components/core/test-helpers/ssr-definitions/ScopedElementsHost.define.js +1 -0
  10. package/components/drawer/test/lion-drawer.test.js +0 -9
  11. package/components/form-core/src/choice-group/ChoiceGroupMixin.js +12 -2
  12. package/components/form-core/test-suites/choice-group/ChoiceGroupMixin.suite.js +48 -4
  13. package/components/input-amount/src/parsers.js +3 -2
  14. package/components/input-amount/test/parsers.test.js +6 -0
  15. package/components/input-amount-dropdown/src/currencyUtil.js +1 -1
  16. package/components/input-file/src/localizeNamespaceLoader.js +4 -0
  17. package/components/input-file/translations/bg.js +5 -0
  18. package/components/input-file/translations/cs.js +5 -0
  19. package/components/input-file/translations/es.js +5 -0
  20. package/components/input-file/translations/fr.js +5 -0
  21. package/components/input-file/translations/hu.js +5 -0
  22. package/components/input-file/translations/id-ID.js +5 -0
  23. package/components/input-file/translations/id.js +19 -0
  24. package/components/input-file/translations/it.js +5 -0
  25. package/components/input-file/translations/pl.js +5 -0
  26. package/components/input-file/translations/ro.js +5 -0
  27. package/components/input-file/translations/sk.js +5 -0
  28. package/components/input-file/translations/uk.js +5 -0
  29. package/components/input-file/translations/zh.js +5 -0
  30. package/components/input-stepper/test/lion-input-stepper-integrations.test.js +2 -19
  31. package/components/input-stepper/test/lion-input-stepper.test.js +2 -688
  32. package/components/input-stepper/test-suites/lion-input-stepper.integration.suite.js +19 -0
  33. package/components/input-stepper/test-suites/lion-input-stepper.suite.js +673 -0
  34. package/components/input-tel/translations/es.js +1 -1
  35. package/components/listbox/src/ListboxMixin.js +0 -1
  36. package/components/listbox/test-suites/ListboxMixin.suite.js +71 -2
  37. package/components/overlays/src/OverlayController.js +3 -0
  38. package/components/overlays/src/OverlaysManager.js +9 -2
  39. package/components/overlays/test/OverlayController.test.js +25 -11
  40. package/components/overlays/test/OverlaysManager.test.js +16 -0
  41. package/custom-elements.json +133 -9
  42. package/dist-types/components/collapsible/src/LionCollapsible.d.ts.map +1 -1
  43. package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
  44. package/dist-types/components/core/src/ScopedStylesController.d.ts +1 -2
  45. package/dist-types/components/core/src/ScopedStylesController.d.ts.map +1 -1
  46. package/dist-types/components/core/test-helpers/getCachedFixture.d.ts +14 -0
  47. package/dist-types/components/core/test-helpers/getCachedFixture.d.ts.map +1 -0
  48. package/dist-types/components/core/test-helpers/ssr-definitions/ScopedElementsHost.define.d.ts +2 -0
  49. package/dist-types/components/core/test-helpers/ssr-definitions/ScopedElementsHost.define.d.ts.map +1 -0
  50. package/dist-types/components/form-core/src/choice-group/ChoiceGroupMixin.d.ts.map +1 -1
  51. package/dist-types/components/form-core/test-suites/choice-group/ChoiceGroupMixin.suite.d.ts.map +1 -1
  52. package/dist-types/components/form-integrations/test/helpers/helpers.d.ts +3 -3
  53. package/dist-types/components/form-integrations/test/helpers/helpers.d.ts.map +1 -1
  54. package/dist-types/components/input-amount/src/parsers.d.ts.map +1 -1
  55. package/dist-types/components/input-file/src/localizeNamespaceLoader.d.ts +1 -1
  56. package/dist-types/components/input-file/src/localizeNamespaceLoader.d.ts.map +1 -1
  57. package/dist-types/components/input-file/translations/bg-BG.d.ts +5 -0
  58. package/dist-types/components/input-file/translations/bg.d.ts +5 -0
  59. package/dist-types/components/input-file/translations/cs-CZ.d.ts +5 -0
  60. package/dist-types/components/input-file/translations/cs.d.ts +5 -0
  61. package/dist-types/components/input-file/translations/es-ES.d.ts +5 -0
  62. package/dist-types/components/input-file/translations/es.d.ts +5 -0
  63. package/dist-types/components/input-file/translations/fr-BE.d.ts +5 -0
  64. package/dist-types/components/input-file/translations/fr-FR.d.ts +5 -0
  65. package/dist-types/components/input-file/translations/fr.d.ts +5 -0
  66. package/dist-types/components/input-file/translations/hu-HU.d.ts +5 -0
  67. package/dist-types/components/input-file/translations/hu.d.ts +5 -0
  68. package/dist-types/components/input-file/translations/id-ID.d.ts +20 -0
  69. package/dist-types/components/input-file/translations/id-ID.d.ts.map +1 -0
  70. package/dist-types/components/input-file/translations/id.d.ts +20 -0
  71. package/dist-types/components/input-file/translations/id.d.ts.map +1 -0
  72. package/dist-types/components/input-file/translations/it-IT.d.ts +5 -0
  73. package/dist-types/components/input-file/translations/it.d.ts +5 -0
  74. package/dist-types/components/input-file/translations/pl-PL.d.ts +5 -0
  75. package/dist-types/components/input-file/translations/pl.d.ts +5 -0
  76. package/dist-types/components/input-file/translations/ro-RO.d.ts +5 -0
  77. package/dist-types/components/input-file/translations/ro.d.ts +5 -0
  78. package/dist-types/components/input-file/translations/sk-SK.d.ts +5 -0
  79. package/dist-types/components/input-file/translations/sk.d.ts +5 -0
  80. package/dist-types/components/input-file/translations/uk-UA.d.ts +5 -0
  81. package/dist-types/components/input-file/translations/uk.d.ts +5 -0
  82. package/dist-types/components/input-file/translations/zh-CN.d.ts +5 -0
  83. package/dist-types/components/input-file/translations/zh.d.ts +5 -0
  84. package/dist-types/components/input-stepper/test/lion-input-stepper.test.d.ts +1 -2
  85. package/dist-types/components/input-stepper/test/lion-input-stepper.test.d.ts.map +1 -1
  86. package/dist-types/components/input-stepper/test-suites/lion-input-stepper.integration.suite.d.ts +3 -0
  87. package/dist-types/components/input-stepper/test-suites/lion-input-stepper.integration.suite.d.ts.map +1 -0
  88. package/dist-types/components/input-stepper/test-suites/lion-input-stepper.suite.d.ts +4 -0
  89. package/dist-types/components/input-stepper/test-suites/lion-input-stepper.suite.d.ts.map +1 -0
  90. package/dist-types/components/listbox/src/ListboxMixin.d.ts.map +1 -1
  91. package/dist-types/components/listbox/test-suites/ListboxMixin.suite.d.ts.map +1 -1
  92. package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
  93. package/dist-types/components/overlays/src/OverlaysManager.d.ts +4 -1
  94. package/dist-types/components/overlays/src/OverlaysManager.d.ts.map +1 -1
  95. package/dist-types/components/overlays/test/OverlayController.test.d.ts.map +1 -1
  96. package/dist-types/exports/input-stepper-suites.d.ts +6 -0
  97. package/dist-types/exports/input-stepper-suites.d.ts.map +1 -0
  98. package/dist-types/tsconfig.tsbuildinfo +1 -1
  99. package/docs/components/checkbox-group/overview.md +2 -2
  100. package/docs/components/collapsible/overview.md +1 -1
  101. package/docs/components/combobox/overview.md +1 -1
  102. package/docs/components/combobox/use-cases.md +1 -1
  103. package/docs/components/dialog/overview.md +1 -1
  104. package/docs/components/fieldset/overview.md +5 -5
  105. package/docs/components/form/overview.md +3 -3
  106. package/docs/components/form/use-cases.md +2 -2
  107. package/docs/components/icon/use-cases.md +1 -1
  108. package/docs/components/input/overview.md +1 -1
  109. package/docs/components/input-amount/overview.md +3 -3
  110. package/docs/components/input-date/overview.md +3 -3
  111. package/docs/components/input-datepicker/overview.md +5 -5
  112. package/docs/components/input-email/overview.md +2 -2
  113. package/docs/components/input-file/overview.md +1 -1
  114. package/docs/components/input-iban/overview.md +2 -2
  115. package/docs/components/input-range/overview.md +2 -2
  116. package/docs/components/input-stepper/overview.md +1 -1
  117. package/docs/components/input-tel/overview.md +1 -1
  118. package/docs/components/input-tel/use-cases.md +6 -6
  119. package/docs/components/input-tel-dropdown/overview.md +1 -1
  120. package/docs/components/listbox/use-cases.md +1 -1
  121. package/docs/components/radio-group/overview.md +3 -3
  122. package/docs/components/select/use-cases.md +1 -1
  123. package/docs/components/select-rich/use-cases.md +2 -2
  124. package/docs/components/switch/use-cases.md +3 -3
  125. package/docs/components/tabs/examples.md +1 -1
  126. package/docs/fundamentals/index.md +4 -4
  127. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  128. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  129. package/docs/fundamentals/rationales/TypeScript.md +46 -0
  130. package/docs/fundamentals/rationales/accessibility.md +1 -1
  131. package/docs/fundamentals/systems/core/SlotMixin.md +2 -2
  132. package/docs/fundamentals/systems/core/api-table.md +3 -4
  133. package/docs/fundamentals/systems/core/overview.md +1 -1
  134. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  135. package/docs/fundamentals/systems/form/model-value.md +1 -1
  136. package/docs/fundamentals/systems/form/overview.md +28 -28
  137. package/docs/fundamentals/systems/form/validate.md +38 -30
  138. package/docs/fundamentals/systems/localize/overview.md +4 -4
  139. package/docs/fundamentals/systems/overlays/api-table.md +1 -1
  140. package/docs/fundamentals/systems/overlays/configuration.md +2 -2
  141. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  142. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  143. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  144. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  145. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  146. package/docs/guides/how-to/create-a-form.md +4 -4
  147. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  148. package/docs/guides/index.md +8 -8
  149. package/docs/guides/principles/index.md +5 -5
  150. package/docs/guides/principles/styling.md +1 -1
  151. package/exports/input-stepper-suites.js +11 -0
  152. package/input-stepper-suites.js +11 -0
  153. package/package.json +1 -1
@@ -31,11 +31,11 @@ import '@lion/ui/define/lion-checkbox.js';
31
31
  </lion-checkbox-group>
32
32
  ```
33
33
 
34
- > Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/form/overview.md)'s serialization result.
34
+ > Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/form/overview.md)'s serialization result.
35
35
 
36
36
  ## Features
37
37
 
38
- Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/fieldset/overview.md),
38
+ Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/fieldset/overview.md),
39
39
  it has all the features a fieldset has.
40
40
 
41
41
  ## Installation
@@ -34,7 +34,7 @@ export const main = () => html`
34
34
  ## Features
35
35
 
36
36
  - Use `opened` attribute or `toggle()` method to render default open.
37
- - `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/button/overview.md) or native `button` with custom styling.
37
+ - `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/button/overview.md) or native `button` with custom styling.
38
38
  - Observe the state with the help of `@opened-changed` event.
39
39
  - `show()` and `hide()` are helper methods to hide or show the content from outside.
40
40
 
@@ -46,7 +46,7 @@ export const main = () => html`
46
46
  `;
47
47
  ```
48
48
 
49
- [...show more](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/combobox/extensions.md)
49
+ [...show more](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/combobox/extensions.md)
50
50
 
51
51
  ## Features
52
52
 
@@ -558,4 +558,4 @@ export const complexObjectChoiceValue = () =>
558
558
  ## Listbox compatibility
559
559
 
560
560
  All configurations that can be applied to `lion-listbox`, can be applied to `lion-combobox` as well.
561
- See the [listbox documentation](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/listbox/overview.md) for more information.
561
+ See the [listbox documentation](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/listbox/overview.md) for more information.
@@ -66,6 +66,6 @@ import '@lion/ui/define/lion-dialog.js';
66
66
  ## Changing the configuration
67
67
 
68
68
  You can use the `.config` property on the dialog to change the configuration.
69
- The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/overlays/configuration.md).
69
+ The documentation of the full config object can be found in the `overlays` folder or here in [Overlay System - Configuration](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/overlays/configuration.md).
70
70
 
71
71
  The `config` property uses a setter to merge the passed configuration with the current, so you only **overwrite what you pass** when updating `config`.
@@ -32,9 +32,9 @@ export const main = () => html`
32
32
 
33
33
  We have three specific fieldset implementations:
34
34
 
35
- - [form](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/form/overview.md)
36
- - [checkbox-group](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/checkbox-group/overview.md)
37
- - [radio-group](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/radio-group/overview.md)
35
+ - [form](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/form/overview.md)
36
+ - [checkbox-group](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/checkbox-group/overview.md)
37
+ - [radio-group](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/radio-group/overview.md)
38
38
 
39
39
  A native fieldset element should always have a legend-element for a11y purposes.
40
40
  However, our fieldset element is not native and should not have a legend-element.
@@ -43,8 +43,8 @@ Our fieldset instead has a label attribute or you can add a label with a div- or
43
43
  ## Features
44
44
 
45
45
  - Easy retrieval of form data based on field names
46
- - Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/interaction-states.md)
47
- - Can have [validate](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md) on fieldset level and shows the validation feedback below the fieldset
46
+ - Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/interaction-states.md)
47
+ - Can have [validate](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md) on fieldset level and shows the validation feedback below the fieldset
48
48
  - Can disable input fields on fieldset level
49
49
  - Accessible out of the box
50
50
 
@@ -20,7 +20,7 @@ import '@lion/ui/define/lion-form.js';
20
20
  ```
21
21
 
22
22
  A web component that enhances the functionality of the native `form` component.
23
- It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/overview.md).
23
+ It is designed to interact with (instances of) the [form controls](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/overview.md).
24
24
 
25
25
  ```js preview-story
26
26
  export const main = () => {
@@ -49,11 +49,11 @@ export const main = () => {
49
49
  - Data synchronization with models
50
50
  - Easy retrieval of form data based on field names
51
51
  - Advanced validation possibilities
52
- - Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/interaction-states.md)
52
+ - Advanced user interaction scenarios via [interaction states](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/interaction-states.md)
53
53
  - Registration mechanism for form controls
54
54
  - Accessible out of the box
55
55
 
56
- For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/overview.md).
56
+ For more information about fields that are designed for our `form`, please read [form system](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/overview.md).
57
57
 
58
58
  ## Installation
59
59
 
@@ -26,7 +26,7 @@ import '@lion/ui/define/lion-form.js';
26
26
  To submit a form, use a regular `<button>` (or `<lion-button-submit>`) somewhere inside the native `<form>`. Then, add a `submit` handler on the `<lion-form>`. You can use this event to do your own (pre-)submit logic, like getting the serialized form data and sending it to a backend API.
27
27
 
28
28
  Another example is checking if the form has errors, and focusing the first field with a validation error.
29
- To learn more about form validation, please take a look at [validate](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md).
29
+ To learn more about form validation, please take a look at [validate](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md).
30
30
 
31
31
  To fire a submit from JavaScript, select the `<lion-form>` element and call `.submit()`.
32
32
 
@@ -128,7 +128,7 @@ export const prefilledData = () => {
128
128
  };
129
129
  ```
130
130
 
131
- Learn more about [formatting and parsing](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/formatting-and-parsing.md).
131
+ Learn more about [formatting and parsing](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/formatting-and-parsing.md).
132
132
 
133
133
  ## Sub forms
134
134
 
@@ -25,7 +25,7 @@ import '@lion/ui/define/lion-icon.js';
25
25
  ## Icon sets
26
26
 
27
27
  Icons are displayed using icon sets. These are collections of icons, lazily loaded on demand for performance.
28
- See the [system documentation](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/icon/overview.md) to learn more about icon sets.
28
+ See the [system documentation](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/icon/overview.md) to learn more about icon sets.
29
29
 
30
30
  ```js preview-story
31
31
  export const iconSets = () => html`
@@ -35,7 +35,7 @@ export const main = () => html`<lion-input label="First Name"></lion-input>`;
35
35
  - **before**: does not have an active use case yet, but the option is in place.
36
36
  - **after**: can be used to show a currency or percentage.
37
37
  - Delegates attributes like `type`, `disabled`, `placeholder` and `readonly` to the native input.
38
- - Can make use of [validation](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md).
38
+ - Can make use of [validation](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md).
39
39
 
40
40
  ## Installation
41
41
 
@@ -36,13 +36,13 @@ export const main = () => {
36
36
 
37
37
  ## Features
38
38
 
39
- - Based on our [input](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input/overview.md)
40
- - Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
39
+ - Based on our [input](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input/overview.md)
40
+ - Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
41
41
  - Option to show currency as a suffix
42
42
  - Option to override locale to change the formatting and parsing
43
43
  - Option to provide additional format options overrides
44
44
  - Default label in different languages
45
- - Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
45
+ - Can make use of number specific [validators](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
46
46
  - IsNumber (default)
47
47
  - MinNumber
48
48
  - MaxNumber
@@ -28,11 +28,11 @@ import '@lion/ui/define/lion-input-date.js';
28
28
 
29
29
  ## Features
30
30
 
31
- - Based on our [input](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input/overview.md)
32
- - Makes use of [formatDate](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
31
+ - Based on our [input](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input/overview.md)
32
+ - Makes use of [formatDate](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
33
33
  - Option to override locale to change the formatting and parsing
34
34
  - Default label in different languages
35
- - Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
35
+ - Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
36
36
  - IsDate (default)
37
37
  - MinDate
38
38
  - MaxDate
@@ -14,7 +14,7 @@ eleventyNavigation:
14
14
 
15
15
  A web component based on the date text input field. Its purpose is to provide a way for users to fill in a date with a datepicker.
16
16
  For an input field with a big range, such as `birthday-input`, a datepicker is not the best choice due to the high variance between possible inputs.
17
- We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input-date/overview.md) for this.
17
+ We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input-date/overview.md) for this.
18
18
 
19
19
  ```js script
20
20
  import { html } from '@mdjs/mdjs-preview';
@@ -30,11 +30,11 @@ export const main = () => {
30
30
  ## Features
31
31
 
32
32
  - Input field with a datepicker to help to choose a date
33
- - Based on our [input-date](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input-date/overview.md)
34
- - Makes use of our [calendar](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/calendar/overview.md) inside the datepicker
35
- - Makes use of [formatDate](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
33
+ - Based on our [input-date](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input-date/overview.md)
34
+ - Makes use of our [calendar](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/calendar/overview.md) inside the datepicker
35
+ - Makes use of [formatDate](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
36
36
  - Option to overwrite locale to change the formatting and parsing
37
- - Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
37
+ - Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
38
38
  - IsDate (default)
39
39
  - MinDate
40
40
  - MaxDate
@@ -27,8 +27,8 @@ export const main = () => {
27
27
 
28
28
  ## Features
29
29
 
30
- - Based on our [input](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input/overview.md)
31
- - Makes use of email [validators](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
30
+ - Based on our [input](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input/overview.md)
31
+ - Makes use of email [validators](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
32
32
  - IsEmail (default)
33
33
 
34
34
  ## Installation
@@ -27,7 +27,7 @@ export const main = () => {
27
27
 
28
28
  ## Features
29
29
 
30
- - Based on our [input](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input/overview.md)
30
+ - Based on our [input](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input/overview.md)
31
31
  - Default labels and validation messages in different languages
32
32
  - Options for multi file upload and drop-zone.
33
33
 
@@ -28,9 +28,9 @@ export const main = () => {
28
28
 
29
29
  ## Features
30
30
 
31
- - Based on our [input](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input/overview.md)
31
+ - Based on our [input](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input/overview.md)
32
32
  - Default label in different languages
33
- - Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
33
+ - Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
34
34
  - IsIBAN (default)
35
35
  - IsCountryIBAN
36
36
  - Parses IBANs automatically
@@ -25,11 +25,11 @@ import '@lion/ui/define/lion-input-range.js';
25
25
 
26
26
  ## Features
27
27
 
28
- - Based on our [input](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input/overview.md).
28
+ - Based on our [input](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input/overview.md).
29
29
  - Shows `modelValue` and `unit` above the range input.
30
30
  - Shows `min` and `max` value after the range input.
31
31
  - Can hide the `min` and `max` value via `no-min-max-labels`.
32
- - Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
32
+ - Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
33
33
 
34
34
  ## Installation
35
35
 
@@ -30,7 +30,7 @@ loadDefaultFeedbackMessages();
30
30
 
31
31
  ## Features
32
32
 
33
- - Based on our [input](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input/overview.md).
33
+ - Based on our [input](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input/overview.md).
34
34
  - Set `min` and `max` value to define the range.
35
35
  - Set `step` value in integer or decimal to increase and decrease the value.
36
36
  - Use `ArrowUp` or `ArrowDown` to update the value.
@@ -51,7 +51,7 @@ export const main = () => {
51
51
 
52
52
  ## Features
53
53
 
54
- - Extends our [input](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input/overview.md)
54
+ - Extends our [input](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input/overview.md)
55
55
  - Shows a mobile telephone keypad on mobile (by having a native `<input inputmode="tel">` inside)
56
56
  - Can be configured with a list of allowed region codes
57
57
  - Will be preconfigured with region derived from locale
@@ -34,7 +34,7 @@ Say we have the following telephone number from Madrid, Spain: `+34919930432`.
34
34
  It contains a [country code](https://en.wikipedia.org/wiki/Country_code) (34), an [area code](https://en.wikipedia.org/wiki/Telephone_numbering_plan#Area_code) (91) and a [dial code](https://en.wikipedia.org/wiki/Mobile_dial_code) (+34 91).
35
35
  Input Tel interprets phone numbers based on their [region code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2): a two character long region representation('ES' in the telephone number above).
36
36
 
37
- The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input-tel/#allowed-regions) are not configured,
37
+ The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input-tel/#allowed-regions) are not configured,
38
38
  all of them will be supported as values of Input Tel.
39
39
 
40
40
  ```js story
@@ -49,11 +49,11 @@ export const regionCodesTable = () => {
49
49
  The active region (accessible via readonly accessor `.activeRegion`) determines how validation and formatting
50
50
  should be applied. It is dependent on the following factors:
51
51
 
52
- - [allowed regions](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input-tel/#allowed-regions): a list that determines what is allowed to become .activeRegion. If
53
- [.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input-tel/#restrict-to-one-region), .activeRegion will always be this value.
52
+ - [allowed regions](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input-tel/#allowed-regions): a list that determines what is allowed to become .activeRegion. If
53
+ [.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input-tel/#restrict-to-one-region), .activeRegion will always be this value.
54
54
  - the modelValue or viewValue: once it contains sufficient info to derive its region code (and
55
- the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input-tel/#allowed-regions) if configured)
56
- - active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input-tel/#allowed-regions) if configured)
55
+ the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input-tel/#allowed-regions) if configured)
56
+ - active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input-tel/#allowed-regions) if configured)
57
57
 
58
58
  What follows from the list above is that .activeRegion can change dynamically, after a value
59
59
  change in the text box by the user (or when locales or allowed regions would be changed by the
@@ -142,7 +142,7 @@ export const heuristic = () => {
142
142
  Once it is configured, validation and formatting will be restricted to those
143
143
  values that are present in this list.
144
144
 
145
- > Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input-tel-dropdown/index.md), only allowed regions will
145
+ > Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input-tel-dropdown/index.md), only allowed regions will
146
146
  > be shown in the dropdown list.
147
147
 
148
148
  ```js preview-story
@@ -31,7 +31,7 @@ export const main = () => {
31
31
 
32
32
  ## Features
33
33
 
34
- - Extends our [input-tel](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/input-tel/overview.md)
34
+ - Extends our [input-tel](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/input-tel/overview.md)
35
35
  - Shows dropdown list with all possible regions
36
36
  - Shows only allowed regions in dropdown list when .allowedRegions is configured
37
37
  - Highlights regions on top of dropdown list when .preferredRegions is configured
@@ -151,4 +151,4 @@ Navigation will skip over disabled options. Let's disable Artichoke and Brussel
151
151
 
152
152
  ## Validation
153
153
 
154
- A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md).
154
+ A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md).
@@ -32,12 +32,12 @@ export const main = () => html`
32
32
  `;
33
33
  ```
34
34
 
35
- - Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/form/overview.md)'s serialization result.
36
- - If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/select/overview.md) instead.
35
+ - Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/form/overview.md)'s serialization result.
36
+ - If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/select/overview.md) instead.
37
37
 
38
38
  ## Features
39
39
 
40
- Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/fieldset/overview.md), it has all the features a fieldset has.
40
+ Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/fieldset/overview.md), it has all the features a fieldset has.
41
41
 
42
42
  - Get or set the checked value of the group:
43
43
  - modelValue (default) - `checkedValue()`
@@ -65,7 +65,7 @@ Or by setting the `disabled` attribute on the entire `lion-select` field.
65
65
 
66
66
  ## Validation
67
67
 
68
- A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/form/validate.md).
68
+ A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/form/validate.md).
69
69
 
70
70
  ## Rendering and updating select options
71
71
 
@@ -29,7 +29,7 @@ You can set the full `modelValue` for each option, which includes the checked pr
29
29
  ```
30
30
 
31
31
  Note, when rendering with the help of the `cache` function imported from `lit/directives/cache.js`, setting model by
32
- the `modelValue` property is not fully supported. Consider setting the model by the `choiceValue` property instead. See [Setting model by `choiceValue` property](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/select-rich/#setting-model-by-the-choicevalue-property) for more details.
32
+ the `modelValue` property is not fully supported. Consider setting the model by the `choiceValue` property instead. See [Setting model by `choiceValue` property](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/select-rich/#setting-model-by-the-choicevalue-property) for more details.
33
33
 
34
34
  ### Setting model by the `choiceValue` property
35
35
 
@@ -328,7 +328,7 @@ LionSelectRich will give it acces to:
328
328
  - LionSelectRich itself, via `.hostElement`
329
329
 
330
330
  Code of an advanced custom invoker is shown below (this is the code for the
331
- invoker used in [IntlSelectRich](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/components/select-rich/examples.md)).
331
+ invoker used in [IntlSelectRich](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/components/select-rich/examples.md)).
332
332
  The invoker is usually added in the invoker slot of the LionSelectRich subclass.
333
333
  However, it would also be possible for an application developer to provide the invoker
334
334
  by putting it in light dom:
@@ -68,16 +68,16 @@ export const validation = () => html`
68
68
  `;
69
69
  ```
70
70
 
71
- ## With checked-changed handler
71
+ ## With model-value-changed handler
72
72
 
73
- You can listen for a `checked-changed` event that is fired when the switch is clicked.
73
+ You can listen for a `model-value-changed` event that is fired when the switch is toggled.
74
74
 
75
75
  ```js preview-story
76
76
  export const handler = ({ shadowRoot }) => {
77
77
  return html`
78
78
  <lion-switch
79
79
  label="Label"
80
- @checked-changed="${ev => {
80
+ @model-value-changed="${ev => {
81
81
  shadowRoot.querySelector('sb-action-logger').log(`Current value: ${ev.target.checked}`);
82
82
  }}"
83
83
  >
@@ -21,7 +21,7 @@ import './src/lea-tab-panel.js';
21
21
 
22
22
  ## Lea Tabs
23
23
 
24
- Learn how to create the `lea tabs` in our ["introducing lion" blogpost](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/blog/ing-open-sources-lion.md).
24
+ Learn how to create the `lea tabs` in our ["introducing lion" blogpost](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/blog/ing-open-sources-lion.md).
25
25
 
26
26
  ```js preview-story
27
27
  export const main = () => html`
@@ -9,11 +9,11 @@ Here you find more details about what we offer.
9
9
 
10
10
  Let's see what each section describes.
11
11
 
12
- 1. [Systems](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/core/overview.md) <br>
12
+ 1. [Systems](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/core/overview.md) <br>
13
13
  These are the fundamental systems that power all of our components.
14
- 2. [Tools](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/tools/helpers/overview.md) <br>
14
+ 2. [Tools](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/tools/helpers/overview.md) <br>
15
15
  Frontend Tools useful for web development but are not visual and therefore are not components.
16
- 3. [Node Tools](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md) <br>
16
+ 3. [Node Tools](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md) <br>
17
17
  Node tools to analyse the code and for extending the documentation.
18
- 4. [Rationales](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/rationales/side-effects.md) <br>
18
+ 4. [Rationales](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/rationales/side-effects.md) <br>
19
19
  The reasoning behind some of our decisions.
@@ -44,7 +44,7 @@ For a Mono Repository
44
44
  ```md
45
45
  # My Pkg
46
46
 
47
- [=> See Source <=](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/docs/deep/dir/overview.md)
47
+ [=> See Source <=](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/docs/deep/dir/overview.md)
48
48
  ```
49
49
 
50
50
  ## CLI flags
@@ -74,7 +74,7 @@ Bring the `overview.md` in a docs folder along.
74
74
  👉 `packages/[my-package]/docs/overview.md`
75
75
 
76
76
  ```md
77
- [=> See Source <=](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/docs/deep/dir/overview.md)
77
+ [=> See Source <=](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/docs/deep/dir/overview.md)
78
78
  ```
79
79
 
80
80
  Add a `use-cases.md`
@@ -82,7 +82,7 @@ Add a `use-cases.md`
82
82
  👉 `packages/[my-package]/docs/use-cases.md`
83
83
 
84
84
  ```md
85
- [=> See Source <=](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/docs/deep/dir/use-cases.md)
85
+ [=> See Source <=](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/docs/deep/dir/use-cases.md)
86
86
  ```
87
87
 
88
88
  So you will end up with something like this in your package.
@@ -20,7 +20,7 @@ To do this automatically you can use this preset for [rocket](https://rocket.mod
20
20
 
21
21
  ## Features
22
22
 
23
- - Import lion documentation and adjust it using [remark-extend](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/node-tools/remark-extend/overview.md)
23
+ - Import lion documentation and adjust it using [remark-extend](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/node-tools/remark-extend/overview.md)
24
24
  - Renames named imports and all it's usage
25
25
  - Adjusts import paths
26
26
  - Replace tags in template literals
@@ -51,7 +51,7 @@ export default {
51
51
 
52
52
  ## Reusing documentation
53
53
 
54
- To take an existing documentation you can "import" it using [remark-extend](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/node-tools/remark-extend/overview.md).
54
+ To take an existing documentation you can "import" it using [remark-extend](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/node-tools/remark-extend/overview.md).
55
55
 
56
56
  As an example you can create `docs/components/tabs/overview.md`.
57
57
 
@@ -16,6 +16,22 @@ eleventyNavigation:
16
16
 
17
17
  We've ensured that the entire Lion library is typed so that you can use it in TypeScript, but there are some caveats.
18
18
 
19
+ ## Why JSDoc?
20
+
21
+ Lion uses [JSDoc](https://jsdoc.app/) for type annotations instead of native TypeScript files. This approach offers several advantages:
22
+
23
+ **No Compilation Step**: JSDoc allows us to maintain a pure JavaScript codebase while still providing comprehensive type information. This eliminates the need for a TypeScript compilation step in our build process, keeping our development workflow simple, fast and robust.
24
+
25
+ **Runtime JavaScript**: Since our source files remain `.js`, they can be executed directly by JavaScript engines without any transformation. This is particularly valuable for debugging, as you're working with the actual code that runs in production.
26
+
27
+ **Universal Compatibility**: JSDoc annotations are just comments, so they don't affect runtime behavior and are compatible with any JavaScript environment. Libraries and tools that don't understand TypeScript can still consume Lion packages without issues.
28
+
29
+ **Gradual Adoption**: Teams can benefit from Lion's type information regardless of whether they use TypeScript, plain JavaScript with JSDoc, or other type checking tools. The types are there when you need them, invisible when you don't.
30
+
31
+ **TypeScript Integration**: Despite using JSDoc, we still get full TypeScript integration. The TypeScript compiler can read JSDoc annotations and generate proper `.d.ts` files, giving consumers the same autocomplete and type checking experience as native TypeScript packages.
32
+
33
+ ## Mixins
34
+
19
35
  In Lion, we rely heavily on [Mixins](https://lit.dev/docs/composition/mixins/#mixin-basics) as a pattern for abstracting certain behaviors and properties into implementable interfaces.
20
36
  Since JavaScript has a one-dimensional inheritance chain, inheriting from multiple ancestors has always been tricky, the Mixin pattern is used to get around that.
21
37
 
@@ -28,3 +44,33 @@ This suggestion was declined and in [this comment](https://github.com/microsoft/
28
44
  As a user of Lion this means that because we've got `@ts-ignore`s in our source code, you may get type errors that originate from Lion, and there's nothing we can do about that, TypeScript's stance is that sometimes rules are too conservative, and ignoring them is the correct answer.
29
45
 
30
46
  In order to ignore type issues coming from Lion, please use the [skipLibCheck](https://www.typescriptlang.org/tsconfig#skipLibCheck) option in your `ts.config.json`, this will ignore issues that aren't coming from your code.
47
+
48
+ ## Export Maps and Type Resolution
49
+
50
+ Lion uses [package.json export maps](https://nodejs.org/api/packages.html#exports) to provide proper module resolution and type definitions. The export map ensures that when you import from Lion packages, TypeScript can correctly resolve both the JavaScript modules and their corresponding type definitions.
51
+
52
+ The export map works by defining explicit entry points for each package, mapping import paths to their actual file locations. For types, this means that when you import `@lion/ui/button.js`, TypeScript knows to look for the corresponding type definitions in the `dist-types` directory.
53
+
54
+ ## Type Correction for JSDoc
55
+
56
+ Since we use JSDoc for typing instead of native TypeScript files, we encounter some challenges during the type definition generation process. The TypeScript compiler sometimes produces inconsistent import statements when processing JSDoc annotations, particularly for Lit imports.
57
+
58
+ We have a post-build script (`types-correct-after-build.js`) that addresses these issues:
59
+
60
+ ### Import Normalization
61
+
62
+ The script ensures consistency in Lit imports by converting:
63
+
64
+ - JSDoc-generated imports: `import { LitElement } from "lit-element/lit-element.js"`
65
+ - To standardized imports: `import { LitElement } from "lit"`
66
+
67
+ This prevents type incompatibility issues where the same class imported through different paths isn't recognized as the same type by TypeScript (see [TypeScript issue #51622](https://github.com/microsoft/TypeScript/issues/51622)).
68
+
69
+ ### External Dependency Path Correction
70
+
71
+ The script also "unresolves" paths that reference external node_modules, particularly for scoped elements:
72
+
73
+ - From: `"../../../node_modules/@open-wc/scoped-elements/types.js"`
74
+ - To: `"@open-wc/scoped-elements/lit-element.js"`
75
+
76
+ These corrections ensure that generated type definitions work correctly in consuming projects, where the resolved local paths would break since they reference locations outside the bundled package.
@@ -37,4 +37,4 @@ Internally, we delegate all intricacies involved in managing light dom to SlotMi
37
37
  SlotMixin automatically mediates between light dom provided by the user ('public slots') and light dom provided by the component author ('private slots').
38
38
  Also, SlotMixin allows to hook into the reactive update loop of LitElement (automatically rerendering on property changes) and it automatically respects
39
39
  the scoped registry belonging to the shadow root.
40
- More details about SlotMixin can be found in the [SlotMixin documentation](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/core/SlotMixin.md)
40
+ More details about SlotMixin can be found in the [SlotMixin documentation](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/core/SlotMixin.md)
@@ -90,7 +90,7 @@ class MyAccessibleControl extends SlotMixin(LitElement) {
90
90
  }
91
91
  },
92
92
  // undefined (conditional slot)
93
- '' => () => {
93
+ '': () => {
94
94
  if (conditionApplies) {
95
95
  return html`<div>default slot</div>`;
96
96
  }
@@ -165,4 +165,4 @@ This will make sure that the slot provided by the user always takes precedence a
165
165
 
166
166
  ### Default slot
167
167
 
168
- As can be seen in the example of [SlotFunctionResults](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/core/#slotfunctionresults), '' can be used to add content to the default slot
168
+ As can be seen in the example of [SlotFunctionResults](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/core/#slotfunctionresults), '' can be used to add content to the default slot
@@ -36,9 +36,8 @@ eleventyNavigation:
36
36
 
37
37
  ### Methods
38
38
 
39
- | Name | Privacy | Description | Parameters | Return | Inherited From |
40
- | ------------------ | ------- | ----------- | ---------- | ------ | -------------- |
41
- | `hostConnected` | public | | | | |
42
- | `hostDisconnected` | public | | | | |
39
+ | Name | Privacy | Description | Parameters | Return | Inherited From |
40
+ | --------------- | ------- | ----------- | ---------- | ------ | -------------- |
41
+ | `hostConnected` | public | | | | |
43
42
 
44
43
  <hr/>
@@ -28,7 +28,7 @@ import { LitElement, html, render } from 'lit-element';
28
28
 
29
29
  ## Features
30
30
 
31
- - [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/b7d7ffac177a6f66a52281c47d969558fa66edf8/docs/fundamentals/systems/core/#deduping-of-mixins)
31
+ - [function to deduplicate mixins (dedupeMixin)](https://github.com/ing-bank/lion/blob/306ed5a799d10ddde151740c31f946981caac4ba/docs/fundamentals/systems/core/#deduping-of-mixins)
32
32
  - Mixin to handle disabled (DisabledMixin)
33
33
  - Mixin to handle disabled AND tabIndex (DisabledWithTabIndexMixin)
34
34
  - Mixin to manage auto-generated needed slot elements in light dom (SlotMixin)