@lion/ui 0.7.6 → 0.7.7

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 (128) hide show
  1. package/README.md +1 -2
  2. package/components/button/test-suites/LionButton.suite.js +3 -1
  3. package/components/combobox/src/LionCombobox.js +33 -9
  4. package/components/combobox/test/lion-combobox.test.js +134 -7
  5. package/components/dialog/test/lion-dialog.test.js +59 -1
  6. package/components/input-datepicker/test/lion-input-datepicker.test.js +3 -3
  7. package/components/input-file/src/FileHandle.js +1 -1
  8. package/components/input-file/src/LionInputFile.js +1 -3
  9. package/components/input-file/test/lion-input-file.test.js +11 -14
  10. package/components/overlays/src/OverlayController.js +13 -7
  11. package/components/overlays/src/OverlayMixin.js +5 -1
  12. package/components/overlays/test/OverlayController.test.js +46 -0
  13. package/components/select-rich/src/LionSelectRich.js +12 -0
  14. package/components/select-rich/test/lion-select-rich.test.js +26 -0
  15. package/custom-elements.json +60 -55
  16. package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
  17. package/dist-types/components/combobox/src/LionCombobox.d.ts +9 -0
  18. package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
  19. package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -1
  20. package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
  21. package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
  22. package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
  23. package/dist-types/tsconfig.tsbuildinfo +1 -1
  24. package/docs/components/button/use-cases.md +2 -2
  25. package/docs/components/calendar/use-cases.md +4 -4
  26. package/docs/components/checkbox-group/api-table.md +49 -55
  27. package/docs/components/checkbox-group/overview.md +5 -5
  28. package/docs/components/checkbox-group/use-cases.md +33 -33
  29. package/docs/components/collapsible/overview.md +1 -1
  30. package/docs/components/collapsible/use-cases.md +3 -3
  31. package/docs/components/combobox/api-table.md +84 -89
  32. package/docs/components/combobox/extensions.md +20 -20
  33. package/docs/components/combobox/overview.md +1 -1
  34. package/docs/components/combobox/use-cases.md +6 -6
  35. package/docs/components/dialog/api-table.md +3 -3
  36. package/docs/components/dialog/overview.md +2 -2
  37. package/docs/components/dialog/src/external-dialog.js +32 -0
  38. package/docs/components/dialog/src/slots-dialog-content.js +1 -1
  39. package/docs/components/dialog/src/styled-dialog-content.js +1 -1
  40. package/docs/components/dialog/use-cases.md +49 -3
  41. package/docs/components/drawer/use-cases.md +3 -3
  42. package/docs/components/fieldset/api-table.md +45 -51
  43. package/docs/components/fieldset/overview.md +7 -7
  44. package/docs/components/fieldset/use-cases.md +15 -15
  45. package/docs/components/form/overview.md +7 -7
  46. package/docs/components/form/use-cases.md +4 -4
  47. package/docs/components/icon/use-cases.md +1 -1
  48. package/docs/components/input/overview.md +1 -1
  49. package/docs/components/input/use-cases.md +3 -3
  50. package/docs/components/input-amount/overview.md +3 -3
  51. package/docs/components/input-amount/use-cases.md +8 -8
  52. package/docs/components/input-date/overview.md +3 -3
  53. package/docs/components/input-date/use-cases.md +8 -8
  54. package/docs/components/input-datepicker/api-table.md +1 -1
  55. package/docs/components/input-datepicker/overview.md +5 -5
  56. package/docs/components/input-datepicker/use-cases.md +5 -5
  57. package/docs/components/input-email/overview.md +2 -2
  58. package/docs/components/input-email/use-cases.md +3 -3
  59. package/docs/components/input-file/overview.md +1 -1
  60. package/docs/components/input-iban/overview.md +2 -2
  61. package/docs/components/input-iban/use-cases.md +8 -8
  62. package/docs/components/input-range/overview.md +2 -2
  63. package/docs/components/input-stepper/api-table.md +65 -69
  64. package/docs/components/input-stepper/overview.md +1 -1
  65. package/docs/components/input-tel/overview.md +1 -1
  66. package/docs/components/input-tel/use-cases.md +9 -9
  67. package/docs/components/input-tel-dropdown/api-table.md +70 -73
  68. package/docs/components/input-tel-dropdown/extensions.md +1 -1
  69. package/docs/components/input-tel-dropdown/overview.md +1 -1
  70. package/docs/components/input-tel-dropdown/use-cases.md +5 -5
  71. package/docs/components/listbox/api-table.md +64 -70
  72. package/docs/components/listbox/overview.md +5 -5
  73. package/docs/components/listbox/use-cases.md +61 -61
  74. package/docs/components/pagination/use-cases.md +5 -5
  75. package/docs/components/radio-group/api-table.md +49 -55
  76. package/docs/components/radio-group/overview.md +6 -6
  77. package/docs/components/radio-group/use-cases.md +18 -18
  78. package/docs/components/select/use-cases.md +2 -2
  79. package/docs/components/select-rich/api-table.md +79 -85
  80. package/docs/components/select-rich/overview.md +3 -3
  81. package/docs/components/select-rich/use-cases.md +33 -33
  82. package/docs/components/steps/overview.md +4 -4
  83. package/docs/components/steps/use-cases.md +7 -7
  84. package/docs/components/tabs/examples.md +1 -1
  85. package/docs/components/tabs/use-cases.md +1 -1
  86. package/docs/components/textarea/use-cases.md +3 -3
  87. package/docs/components/tooltip/api-table.md +3 -3
  88. package/docs/components/tooltip/use-cases.md +6 -6
  89. package/docs/fundamentals/index.md +4 -4
  90. package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
  91. package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
  92. package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
  93. package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
  94. package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
  95. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  96. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  97. package/docs/fundamentals/rationales/accessibility.md +1 -1
  98. package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
  99. package/docs/fundamentals/systems/core/overview.md +1 -1
  100. package/docs/fundamentals/systems/form/formatting-and-parsing.md +8 -8
  101. package/docs/fundamentals/systems/form/model-value.md +1 -1
  102. package/docs/fundamentals/systems/form/overview.md +28 -28
  103. package/docs/fundamentals/systems/form/use-cases.md +19 -19
  104. package/docs/fundamentals/systems/form/validate.md +50 -50
  105. package/docs/fundamentals/systems/localize/api-table.md +10 -17
  106. package/docs/fundamentals/systems/localize/overview.md +4 -4
  107. package/docs/fundamentals/systems/localize/use-cases.md +4 -4
  108. package/docs/fundamentals/systems/overlays/_configuration-positioning.md +4 -4
  109. package/docs/fundamentals/systems/overlays/api-table.md +34 -90
  110. package/docs/fundamentals/systems/overlays/assets/umbrella-form.js +9 -9
  111. package/docs/fundamentals/systems/overlays/configuration.md +30 -30
  112. package/docs/fundamentals/systems/overlays/overview.md +6 -6
  113. package/docs/fundamentals/systems/overlays/use-cases.md +30 -30
  114. package/docs/fundamentals/tools/ajax/use-cases.md +20 -20
  115. package/docs/fundamentals/tools/helpers/action-logger.md +3 -3
  116. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  117. package/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js +2 -2
  118. package/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js +2 -2
  119. package/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js +2 -2
  120. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  121. package/docs/guides/how-to/create-a-custom-field.md +7 -7
  122. package/docs/guides/how-to/create-a-form.md +4 -4
  123. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  124. package/docs/guides/index.md +8 -8
  125. package/docs/guides/principles/index.md +5 -5
  126. package/docs/guides/principles/scoped-elements.md +1 -1
  127. package/docs/guides/principles/styling.md +1 -1
  128. package/package.json +1 -1
@@ -57,7 +57,7 @@ Validation happens on every change of `modelValue`. A change in modelValue can b
57
57
 
58
58
  ## When validation feedback will be shown
59
59
 
60
- Although validation happens realtime under the hood, displaying validity feedback in realtime may not always lead to the desired User Experience. Together with [interaction states](https://github.com/ing-bank/lion/blob/e6f2e59134860fafcd9716ada9dcba6f33b76aa0/docs/fundamentals/systems/form/interaction-states.md),
60
+ Although validation happens realtime under the hood, displaying validity feedback in realtime may not always lead to the desired User Experience. Together with [interaction states](https://github.com/ing-bank/lion/blob/a59d362cc1228fc855b426440f4bed3bd21d594b/docs/fundamentals/systems/form/interaction-states.md),
61
61
  validity states can determine whether a validation message should be shown along the input field.
62
62
 
63
63
  ## Assessing field validation state programmatically
@@ -211,11 +211,11 @@ export const defaultValidationMessages = () => {
211
211
  .validators="${[new Required(), new MinLength(4)]}"
212
212
  .modelValue="${'foo'}"
213
213
  ></lion-input>
214
- <button @click=${() => (localize.locale = 'de-DE')}>DE</button>
215
- <button @click=${() => (localize.locale = 'en-GB')}>EN</button>
216
- <button @click=${() => (localize.locale = 'fr-FR')}>FR</button>
217
- <button @click=${() => (localize.locale = 'nl-NL')}>NL</button>
218
- <button @click=${() => (localize.locale = 'zh-CN')}>CN</button>
214
+ <button @click="${() => (localize.locale = 'de-DE')}">DE</button>
215
+ <button @click="${() => (localize.locale = 'en-GB')}">EN</button>
216
+ <button @click="${() => (localize.locale = 'fr-FR')}">FR</button>
217
+ <button @click="${() => (localize.locale = 'nl-NL')}">NL</button>
218
+ <button @click="${() => (localize.locale = 'zh-CN')}">CN</button>
219
219
  `;
220
220
  };
221
221
  ```
@@ -228,11 +228,11 @@ The required validator can be put onto every form field element and will make su
228
228
 
229
229
  ```js preview-story
230
230
  export const requiredValidator = () => html`
231
- <lion-input .validators=${[new Required()]} label="Required" .fieldName="value"></lion-input>
231
+ <lion-input .validators="${[new Required()]}" label="Required" .fieldName="value"></lion-input>
232
232
  `;
233
233
  ```
234
234
 
235
- The default `Required` validation message is "Please, enter a(n) {fieldName}". In which the "fieldName" can be provided separately via the `fieldName` attribute, with a fallback to the label. See [override fieldname](https://github.com/ing-bank/lion/blob/e6f2e59134860fafcd9716ada9dcba6f33b76aa0/docs/fundamentals/systems/form/#override-fieldname) for more information.
235
+ The default `Required` validation message is "Please, enter a(n) {fieldName}". In which the "fieldName" can be provided separately via the `fieldName` attribute, with a fallback to the label. See [override fieldname](https://github.com/ing-bank/lion/blob/a59d362cc1228fc855b426440f4bed3bd21d594b/docs/fundamentals/systems/form/#override-fieldname) for more information.
236
236
 
237
237
  Specific required messages for a select and file-upload are created.
238
238
 
@@ -243,28 +243,28 @@ Useful on input elements it allows to define how many characters can be entered.
243
243
  ```js preview-story
244
244
  export const stringValidators = () => html`
245
245
  <lion-input
246
- .validators=${[new EqualsLength(7)]}
247
- .modelValue=${'not exactly'}
246
+ .validators="${[new EqualsLength(7)]}"
247
+ .modelValue="${'not exactly'}"
248
248
  label="EqualsLength"
249
249
  ></lion-input>
250
250
  <lion-input
251
- .validators=${[new MinLength(10)]}
252
- .modelValue=${'too short'}
251
+ .validators="${[new MinLength(10)]}"
252
+ .modelValue="${'too short'}"
253
253
  label="MinLength"
254
254
  ></lion-input>
255
255
  <lion-input
256
- .validators=${[new MaxLength(7)]}
257
- .modelValue=${'too long'}
256
+ .validators="${[new MaxLength(7)]}"
257
+ .modelValue="${'too long'}"
258
258
  label="MaxLength"
259
259
  ></lion-input>
260
260
  <lion-input
261
- .validators=${[new MinMaxLength({ min: 10, max: 20 })]}
262
- .modelValue=${'that should be enough'}
261
+ .validators="${[new MinMaxLength({ min: 10, max: 20 })]}"
262
+ .modelValue="${'that should be enough'}"
263
263
  label="MinMaxLength"
264
264
  ></lion-input>
265
265
  <lion-input
266
- .validators=${[new Pattern(/#LionRocks/)]}
267
- .modelValue=${'regex checks if "#Lion<NO SPACE>Rocks" is in this input #LionRocks'}
266
+ .validators="${[new Pattern(/#LionRocks/)]}"
267
+ .modelValue="${'regex checks if "#Lion<NO SPACE>Rocks" is in this input #LionRocks'}"
268
268
  label="Pattern"
269
269
  ></lion-input>
270
270
  `;
@@ -314,23 +314,23 @@ export const dateValidators = () => {
314
314
  const tomorrow = new Date(year, month, day + 1);
315
315
  return html`
316
316
  <lion-input-date
317
- .validators=${[new IsDate()]}
318
- .modelValue=${'foo'}
317
+ .validators="${[new IsDate()]}"
318
+ .modelValue="${'foo'}"
319
319
  label="IsDate"
320
320
  ></lion-input-date>
321
321
  <lion-input-date
322
- .validators=${[new MinDate(today)]}
323
- .modelValue=${new Date(yesterday)}
322
+ .validators="${[new MinDate(today)]}"
323
+ .modelValue="${new Date(yesterday)}"
324
324
  label="MinDate"
325
325
  ></lion-input-date>
326
326
  <lion-input-date
327
- .validators=${[new MaxDate(today)]}
328
- .modelValue=${new Date(tomorrow)}
327
+ .validators="${[new MaxDate(today)]}"
328
+ .modelValue="${new Date(tomorrow)}"
329
329
  label="MaxDate"
330
330
  ></lion-input-date>
331
331
  <lion-input-date
332
- .validators=${[new MinMaxDate({ min: new Date(yesterday), max: new Date(tomorrow) })]}
333
- .modelValue=${new Date(today)}
332
+ .validators="${[new MinMaxDate({ min: new Date(yesterday), max: new Date(tomorrow) })]}"
333
+ .modelValue="${new Date(today)}"
334
334
  label="MinMaxDate"
335
335
  ></lion-input-date>
336
336
  `;
@@ -476,11 +476,11 @@ export const checkboxValidation = () => {
476
476
  id="scientists"
477
477
  name="scientists[]"
478
478
  label="Favorite scientists"
479
- .validators=${[new Required()]}
479
+ .validators="${[new Required()]}"
480
480
  >
481
- <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
482
- <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
483
- <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
481
+ <lion-checkbox label="Archimedes" .choiceValue="${'Archimedes'}"></lion-checkbox>
482
+ <lion-checkbox label="Francis Bacon" .choiceValue="${'Francis Bacon'}"></lion-checkbox>
483
+ <lion-checkbox label="Marie Curie" .choiceValue="${'Marie Curie'}"></lion-checkbox>
484
484
  </lion-checkbox-group>
485
485
  <button @click="${e => validate(e)}">Validate</button>
486
486
  `;
@@ -512,11 +512,11 @@ export const checkboxValidationAdvanced = () => {
512
512
  name="scientists2[]"
513
513
  label="Favorite scientists"
514
514
  help-text="You should have at least 2 of those"
515
- .validators=${[new Required(), new HasMinTwoChecked()]}
515
+ .validators="${[new Required(), new HasMinTwoChecked()]}"
516
516
  >
517
- <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
518
- <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
519
- <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
517
+ <lion-checkbox label="Archimedes" .choiceValue="${'Archimedes'}"></lion-checkbox>
518
+ <lion-checkbox label="Francis Bacon" .choiceValue="${'Francis Bacon'}"></lion-checkbox>
519
+ <lion-checkbox label="Marie Curie" .choiceValue="${'Marie Curie'}"></lion-checkbox>
520
520
  </lion-checkbox-group>
521
521
  <button @click="${e => validate(e)}">Validate</button>
522
522
  `;
@@ -536,10 +536,10 @@ export const radioValidation = () => {
536
536
  id="dinos1"
537
537
  name="dinos1"
538
538
  label="Favourite dinosaur"
539
- .validators=${[new Required()]}
539
+ .validators="${[new Required()]}"
540
540
  >
541
- <lion-radio label="allosaurus" .choiceValue=${'allosaurus'}></lion-radio>
542
- <lion-radio label="brontosaurus" .choiceValue=${'brontosaurus'}></lion-radio>
541
+ <lion-radio label="allosaurus" .choiceValue="${'allosaurus'}"></lion-radio>
542
+ <lion-radio label="brontosaurus" .choiceValue="${'brontosaurus'}"></lion-radio>
543
543
  <lion-radio label="diplodocus" .choiceValue="${'diplodocus'}"></lion-radio>
544
544
  </lion-radio-group>
545
545
  <button @click="${e => validate(e)}">Validate</button>
@@ -575,11 +575,11 @@ export const radioValidationAdvanced = () => {
575
575
  id="dinos2"
576
576
  name="dinos2"
577
577
  label="Favourite dinosaur"
578
- .validators=${[new Required(), new IsBrontosaurus()]}
578
+ .validators="${[new Required(), new IsBrontosaurus()]}"
579
579
  >
580
- <lion-radio label="allosaurus" .choiceValue=${'allosaurus'}></lion-radio>
581
- <lion-radio label="brontosaurus" .choiceValue=${'brontosaurus'}></lion-radio>
582
- <lion-radio label="diplodocus" .choiceValue=${'diplodocus'}></lion-radio>
580
+ <lion-radio label="allosaurus" .choiceValue="${'allosaurus'}"></lion-radio>
581
+ <lion-radio label="brontosaurus" .choiceValue="${'brontosaurus'}"></lion-radio>
582
+ <lion-radio label="diplodocus" .choiceValue="${'diplodocus'}"></lion-radio>
583
583
  </lion-radio-group>
584
584
  <button @click="${e => validate(e)}">Validate</button>
585
585
  `;
@@ -593,12 +593,12 @@ Validation can be used as normal, below is an example of a combobox with a `Requ
593
593
  ```js preview-story
594
594
  export const validationCombobox = () => html`
595
595
  <lion-combobox .validators="${[new Required()]}" name="favoriteMovie" label="Favorite movie">
596
- <lion-option checked .choiceValue=${'Rocky'}>Rocky</lion-option>
597
- <lion-option .choiceValue=${'Rocky II'}>Rocky II</lion-option>
598
- <lion-option .choiceValue=${'Rocky III'}>Rocky III</lion-option>
599
- <lion-option .choiceValue=${'Rocky IV'}>Rocky IV</lion-option>
600
- <lion-option .choiceValue=${'Rocky V'}>Rocky V</lion-option>
601
- <lion-option .choiceValue=${'Rocky Balboa'}>Rocky Balboa</lion-option>
596
+ <lion-option checked .choiceValue="${'Rocky'}">Rocky</lion-option>
597
+ <lion-option .choiceValue="${'Rocky II'}">Rocky II</lion-option>
598
+ <lion-option .choiceValue="${'Rocky III'}">Rocky III</lion-option>
599
+ <lion-option .choiceValue="${'Rocky IV'}">Rocky IV</lion-option>
600
+ <lion-option .choiceValue="${'Rocky V'}">Rocky V</lion-option>
601
+ <lion-option .choiceValue="${'Rocky Balboa'}">Rocky Balboa</lion-option>
602
602
  </lion-combobox>
603
603
  `;
604
604
  ```
@@ -762,8 +762,8 @@ According to the W3C specs, Disabled fields should not be validated. Therefore i
762
762
  export const disabledInputsValidation = () => html`
763
763
  <lion-input
764
764
  disabled
765
- .validators=${[new EqualsLength(7)]}
766
- .modelValue=${'not exactly'}
765
+ .validators="${[new EqualsLength(7)]}"
766
+ .modelValue="${'not exactly'}"
767
767
  label="EqualsLength"
768
768
  ></lion-input>
769
769
  `;
@@ -840,7 +840,7 @@ export const backendValidation = () => {
840
840
  opacity: 0.5;
841
841
  }
842
842
  </style>
843
- <lion-form @submit=${submitHandler}>
843
+ <lion-form @submit="${submitHandler}">
844
844
  <form>
845
845
  <lion-input
846
846
  label="username"
@@ -4,23 +4,16 @@
4
4
 
5
5
  ### Fields
6
6
 
7
- | Name | Privacy | Type | Default | Description | Inherited From |
8
- | ---------------------------------- | --------- | --------- | -------------------------------------------------------------------------------------------------------------------- | ----------- | -------------- |
9
- | `locale` | public | | | | |
10
- | `loadingComplete` | public | | | | |
11
- | `_autoLoadOnLocaleChange` | protected | `boolean` | `!!autoLoadOnLocaleChange` | | |
12
- | `_fallbackLocale` | protected | | `fallbackLocale` | | |
13
- | `_showKeyAsFallback` | protected | | `showKeyAsFallback` | | |
14
- | `formatNumberOptions` | public | `object` | `{
15
- returnIfNaN: '',
16
- /** @type {Map<string,DatePostProcessor>} */
17
- postProcessors: new Map(),
18
- }` | | |
19
- | `formatDateOptions` | public | `object` | `{
20
- /** @type {Map<string,DatePostProcessor>} */
21
- postProcessors: new Map(),
22
- }` | | |
23
- | `_supportExternalTranslationTools` | protected | | | | |
7
+ | Name | Privacy | Type | Default | Description | Inherited From |
8
+ | ---------------------------------- | --------- | --------- | ---------------------------------------------------------------------------------------------- | ----------- | -------------- |
9
+ | `locale` | public | | | | |
10
+ | `loadingComplete` | public | | | | |
11
+ | `_autoLoadOnLocaleChange` | protected | `boolean` | `!!autoLoadOnLocaleChange` | | |
12
+ | `_fallbackLocale` | protected | | `fallbackLocale` | | |
13
+ | `_showKeyAsFallback` | protected | | `showKeyAsFallback` | | |
14
+ | `formatNumberOptions` | public | `object` | `{ returnIfNaN: '', /** @type {Map<string,DatePostProcessor>} */ postProcessors: new Map(), }` | | |
15
+ | `formatDateOptions` | public | `object` | `{ /** @type {Map<string,DatePostProcessor>} */ postProcessors: new Map(), }` | | |
16
+ | `_supportExternalTranslationTools` | protected | | | | |
24
17
 
25
18
  ### Methods
26
19
 
@@ -9,15 +9,15 @@ In it's simplest form it is a function that returns the translated text for a na
9
9
  - Formatting of numbers, amounts
10
10
  - Formatting of dates
11
11
 
12
- Further examples and a more in depth description can be found at the [Use Cases Page](https://github.com/ing-bank/lion/blob/e6f2e59134860fafcd9716ada9dcba6f33b76aa0/docs/fundamentals/systems/localize/use-cases.md).
12
+ Further examples and a more in depth description can be found at the [Use Cases Page](https://github.com/ing-bank/lion/blob/a59d362cc1228fc855b426440f4bed3bd21d594b/docs/fundamentals/systems/localize/use-cases.md).
13
13
 
14
14
  ## Content
15
15
 
16
16
  | Feature | Description |
17
17
  | ---------------------------------------- | --------------------------------------------- |
18
- | [Translate Text](https://github.com/ing-bank/lion/blob/e6f2e59134860fafcd9716ada9dcba6f33b76aa0/docs/fundamentals/systems/localize/text.md) | Load and translate text in multiple languages |
19
- | [Format Numbers](https://github.com/ing-bank/lion/blob/e6f2e59134860fafcd9716ada9dcba6f33b76aa0/docs/fundamentals/systems/localize/numbers.md) | Format numbers in multiple languages |
20
- | [Format Dates](https://github.com/ing-bank/lion/blob/e6f2e59134860fafcd9716ada9dcba6f33b76aa0/docs/fundamentals/systems/localize/dates.md) | Format dates in multiple languages |
18
+ | [Translate Text](https://github.com/ing-bank/lion/blob/a59d362cc1228fc855b426440f4bed3bd21d594b/docs/fundamentals/systems/localize/text.md) | Load and translate text in multiple languages |
19
+ | [Format Numbers](https://github.com/ing-bank/lion/blob/a59d362cc1228fc855b426440f4bed3bd21d594b/docs/fundamentals/systems/localize/numbers.md) | Format numbers in multiple languages |
20
+ | [Format Dates](https://github.com/ing-bank/lion/blob/a59d362cc1228fc855b426440f4bed3bd21d594b/docs/fundamentals/systems/localize/dates.md) | Format dates in multiple languages |
21
21
 
22
22
  ## Installation
23
23
 
@@ -118,7 +118,7 @@ If you want to fetch it from some API this is also possible.
118
118
  localize.loadNamespace({
119
119
  'my-hello-component': async locale => {
120
120
  const response = await fetch(
121
- `https://api.example.com/?namespace=my-hello-component&locale=${locale}`,
121
+ `https://api.example.com/?namespace=my-hello-component&locale="${locale}"`,
122
122
  );
123
123
  return response.json(); // resolves to the JSON object `{ greeting: 'Hallo {name}!' }`
124
124
  },
@@ -133,7 +133,7 @@ And this is there the second option comes in handy.
133
133
  ```js
134
134
  // using the regexp to match all component names staring with 'my-'
135
135
  localize.setupNamespaceLoader(/my-.+/, async (locale, namespace) => {
136
- const response = await fetch(`https://api.example.com/?namespace=${namespace}&locale=${locale}`);
136
+ const response = await fetch(`https://api.example.com/?namespace="${namespace}&locale=${locale}"`);
137
137
  return response.json();
138
138
  });
139
139
 
@@ -302,14 +302,14 @@ This is sort of a router for the data and is typically needed to fetch it from a
302
302
  // for one specific component
303
303
  localize.setupNamespaceLoader('my-hello-component', async locale => {
304
304
  const response = await fetch(
305
- `https://api.example.com/?namespace=my-hello-component&locale=${locale}`,
305
+ `https://api.example.com/?namespace=my-hello-component&locale="${locale}"`,
306
306
  );
307
307
  return response.json();
308
308
  });
309
309
 
310
310
  // for all components which have a prefix in their names
311
311
  localize.setupNamespaceLoader(/my-.+/, async (locale, namespace) => {
312
- const response = await fetch(`https://api.example.com/?namespace=${namespace}&locale=${locale}`);
312
+ const response = await fetch(`https://api.example.com/?namespace="${namespace}&locale=${locale}"`);
313
313
  return response.json();
314
314
  });
315
315
  ```
@@ -59,13 +59,13 @@ The `placementMode` property determines the positioning of the `contentNode`:
59
59
  export const placementLocal = () => {
60
60
  const placementModeLocalConfig = { placementMode: 'local' };
61
61
  return html`
62
- <demo-el-using-overlaymixin .config=${placementModeLocalConfig}>
62
+ <demo-el-using-overlaymixin .config="${placementModeLocalConfig}">
63
63
  <button slot="invoker">Click me to open the local overlay!</button>
64
64
  <div slot="content" class="demo-overlay">
65
65
  Hello! You can close this notification here:
66
66
  <button
67
67
  class="close-button"
68
- @click=${e => e.target.dispatchEvent(new Event('close-overlay', { bubbles: true }))}
68
+ @click="${e => e.target.dispatchEvent(new Event('close-overlay', { bubbles: true }))}"
69
69
  >
70
70
  ⨯
71
71
  </button>
@@ -81,13 +81,13 @@ export const placementLocal = () => {
81
81
  export const placementGlobal = () => {
82
82
  const placementModeGlobalConfig = { placementMode: 'global' };
83
83
  return html`
84
- <demo-el-using-overlaymixin .config=${placementModeGlobalConfig}>
84
+ <demo-el-using-overlaymixin .config="${placementModeGlobalConfig}">
85
85
  <button slot="invoker">Click me to open the global overlay!</button>
86
86
  <div slot="content" class="demo-overlay">
87
87
  Hello! You can close this notification here:
88
88
  <button
89
89
  class="close-button"
90
- @click=${e => e.target.dispatchEvent(new Event('close-overlay', { bubbles: true }))}
90
+ @click="${e => e.target.dispatchEvent(new Event('close-overlay', { bubbles: true }))}"
91
91
  >
92
92
  ⨯
93
93
  </button>