@lion/ui 0.10.0 → 0.11.0

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 (118) hide show
  1. package/components/button/src/LionButton.js +5 -1
  2. package/components/button/test-suites/LionButton.suite.js +1 -1
  3. package/components/calendar/src/LionCalendar.js +5 -14
  4. package/components/calendar/test/lion-calendar.test.js +88 -0
  5. package/components/calendar/translations/bg.js +5 -0
  6. package/components/calendar/translations/cs.js +5 -0
  7. package/components/calendar/translations/de.js +5 -0
  8. package/components/calendar/translations/en.js +5 -0
  9. package/components/calendar/translations/es.js +5 -0
  10. package/components/calendar/translations/fr.js +5 -0
  11. package/components/calendar/translations/hu.js +5 -0
  12. package/components/calendar/translations/it.js +5 -0
  13. package/components/calendar/translations/nl.js +5 -0
  14. package/components/calendar/translations/pl.js +5 -0
  15. package/components/calendar/translations/ro.js +5 -0
  16. package/components/calendar/translations/ru.js +5 -0
  17. package/components/calendar/translations/sk.js +5 -0
  18. package/components/calendar/translations/uk.js +3 -0
  19. package/components/calendar/translations/zh.js +3 -0
  20. package/components/core/src/SlotMixin.js +15 -0
  21. package/components/core/test/SlotMixin.test.js +50 -0
  22. package/components/dialog/src/LionDialog.js +13 -0
  23. package/components/dialog/test/lion-dialog.test.js +56 -0
  24. package/components/form-core/src/choice-group/ChoiceInputMixin.js +3 -1
  25. package/components/input-amount/test/lion-input-amount.test.js +48 -1
  26. package/components/input-amount/test/parsers.test.js +1 -1
  27. package/components/input-tel-dropdown/src/LionInputTelDropdown.js +1 -1
  28. package/components/localize/src/number/parseNumber.js +21 -12
  29. package/components/localize/test/number/parseNumber.test.js +1 -1
  30. package/components/overlays/src/OverlayController.js +17 -1
  31. package/components/overlays/test/OverlayController.test.js +29 -0
  32. package/components/overlays/types/OverlayConfig.ts +4 -2
  33. package/components/select-rich/src/LionSelectRich.js +17 -1
  34. package/components/select-rich/test/lion-select-rich-interaction.test.js +139 -20
  35. package/components/validate-messages/translations/pl.js +4 -4
  36. package/custom-elements.json +38 -13
  37. package/dist-types/components/button/src/LionButton.d.ts.map +1 -1
  38. package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
  39. package/dist-types/components/calendar/translations/bg.d.ts +3 -0
  40. package/dist-types/components/calendar/translations/cs.d.ts +3 -0
  41. package/dist-types/components/calendar/translations/de.d.ts +3 -0
  42. package/dist-types/components/calendar/translations/en.d.ts +3 -0
  43. package/dist-types/components/calendar/translations/es.d.ts +3 -0
  44. package/dist-types/components/calendar/translations/fr.d.ts +3 -0
  45. package/dist-types/components/calendar/translations/hu.d.ts +3 -0
  46. package/dist-types/components/calendar/translations/it.d.ts +3 -0
  47. package/dist-types/components/calendar/translations/nl.d.ts +3 -0
  48. package/dist-types/components/calendar/translations/pl.d.ts +3 -0
  49. package/dist-types/components/calendar/translations/ro.d.ts +3 -0
  50. package/dist-types/components/calendar/translations/ru.d.ts +3 -0
  51. package/dist-types/components/calendar/translations/sk.d.ts +3 -0
  52. package/dist-types/components/calendar/translations/uk.d.ts +3 -0
  53. package/dist-types/components/calendar/translations/zh.d.ts +3 -0
  54. package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
  55. package/dist-types/components/dialog/src/LionDialog.d.ts +32 -0
  56. package/dist-types/components/dialog/src/LionDialog.d.ts.map +1 -1
  57. package/dist-types/components/form-core/src/choice-group/ChoiceInputMixin.d.ts.map +1 -1
  58. package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts +1 -1
  59. package/dist-types/components/localize/src/number/parseNumber.d.ts.map +1 -1
  60. package/dist-types/components/overlays/src/OverlayController.d.ts +5 -0
  61. package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
  62. package/dist-types/components/overlays/types/OverlayConfig.d.ts +4 -2
  63. package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
  64. package/dist-types/components/select-rich/src/LionSelectRich.d.ts +1 -0
  65. package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
  66. package/dist-types/tsconfig.tsbuildinfo +1 -1
  67. package/docs/components/checkbox-group/overview.md +2 -2
  68. package/docs/components/collapsible/overview.md +1 -1
  69. package/docs/components/combobox/overview.md +1 -1
  70. package/docs/components/combobox/use-cases.md +1 -1
  71. package/docs/components/dialog/api-table.md +5 -3
  72. package/docs/components/dialog/overview.md +1 -1
  73. package/docs/components/dialog/use-cases.md +32 -1
  74. package/docs/components/fieldset/overview.md +5 -5
  75. package/docs/components/form/overview.md +3 -3
  76. package/docs/components/form/use-cases.md +2 -2
  77. package/docs/components/icon/use-cases.md +1 -1
  78. package/docs/components/input/overview.md +1 -1
  79. package/docs/components/input-amount/overview.md +3 -3
  80. package/docs/components/input-date/overview.md +3 -3
  81. package/docs/components/input-datepicker/overview.md +5 -5
  82. package/docs/components/input-email/overview.md +2 -2
  83. package/docs/components/input-file/overview.md +1 -1
  84. package/docs/components/input-iban/overview.md +2 -2
  85. package/docs/components/input-range/overview.md +2 -2
  86. package/docs/components/input-stepper/overview.md +1 -1
  87. package/docs/components/input-tel/overview.md +1 -1
  88. package/docs/components/input-tel/use-cases.md +6 -6
  89. package/docs/components/input-tel-dropdown/overview.md +1 -1
  90. package/docs/components/listbox/use-cases.md +1 -1
  91. package/docs/components/radio-group/overview.md +3 -3
  92. package/docs/components/select/use-cases.md +1 -1
  93. package/docs/components/select-rich/use-cases.md +1 -1
  94. package/docs/components/tabs/examples.md +1 -1
  95. package/docs/fundamentals/index.md +4 -4
  96. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  97. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  98. package/docs/fundamentals/rationales/accessibility.md +1 -1
  99. package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
  100. package/docs/fundamentals/systems/core/overview.md +1 -1
  101. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  102. package/docs/fundamentals/systems/form/model-value.md +1 -1
  103. package/docs/fundamentals/systems/form/overview.md +28 -28
  104. package/docs/fundamentals/systems/form/validate.md +2 -2
  105. package/docs/fundamentals/systems/localize/overview.md +4 -4
  106. package/docs/fundamentals/systems/overlays/api-table.md +35 -34
  107. package/docs/fundamentals/systems/overlays/configuration.md +32 -2
  108. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  109. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  110. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  111. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  112. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  113. package/docs/guides/how-to/create-a-form.md +10 -9
  114. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  115. package/docs/guides/index.md +8 -8
  116. package/docs/guides/principles/index.md +5 -5
  117. package/docs/guides/principles/styling.md +1 -1
  118. package/package.json +1 -1
@@ -151,6 +151,7 @@ export class OverlayController extends EventTarget {
151
151
  hidesOnOutsideEsc: false,
152
152
  hidesOnOutsideClick: false,
153
153
  isTooltip: false,
154
+ isAlertDialog: false,
154
155
  invokerRelation: 'description',
155
156
  visibilityTriggerFunction: undefined,
156
157
  handlesAccessibility: false,
@@ -381,6 +382,14 @@ export class OverlayController extends EventTarget {
381
382
  return /** @type {boolean} */ (this.config?.isTooltip);
382
383
  }
383
384
 
385
+ /**
386
+ * The alertdialog role is to be used on modal alert dialogs that interrupt a user's workflow
387
+ * to communicate an important message and require a response.
388
+ */
389
+ get isAlertDialog() {
390
+ return /** @type {boolean} */ (this.config?.isAlertDialog);
391
+ }
392
+
384
393
  /**
385
394
  * By default, the tooltip content is a 'description' for the invoker (uses aria-describedby).
386
395
  * Setting this property to 'label' makes the content function as a label (via aria-labelledby)
@@ -611,6 +620,10 @@ export class OverlayController extends EventTarget {
611
620
  });
612
621
  // @ts-ignore
613
622
  wrappingDialogElement.open = true;
623
+ if (this.isTooltip) {
624
+ // needed to prevent tooltip getting focus in Safari and Firefox
625
+ wrappingDialogElement.setAttribute('tabindex', '-1');
626
+ }
614
627
 
615
628
  this.__wrappingDialogNode.style.display = 'none';
616
629
  this.contentWrapperNode.style.zIndex = '1';
@@ -672,7 +685,10 @@ export class OverlayController extends EventTarget {
672
685
  if (this.invokerNode && !isModal) {
673
686
  this.invokerNode.setAttribute('aria-expanded', `${this.isShown}`);
674
687
  }
675
- if (!this.contentNode.getAttribute('role')) {
688
+ if (this.isAlertDialog) {
689
+ this.contentNode.setAttribute('role', 'alertdialog');
690
+ } else if (!this.contentNode.getAttribute('role')) {
691
+ // N.B. if we did not explicitly set `isTooltip` or `isAlertDialog`, a role potentially already provided by a user (like 'listbox') takes precedence
676
692
  this.contentNode.setAttribute('role', 'dialog');
677
693
  }
678
694
  }
@@ -1876,6 +1876,22 @@ describe('OverlayController', () => {
1876
1876
  it.skip('adds attributes inert and aria-hidden="true" on all siblings of rootNode if an overlay is shown', async () => {});
1877
1877
  it.skip('disables pointer events and selection on inert elements', async () => {});
1878
1878
 
1879
+ describe('Alert dialog', () => {
1880
+ it('sets role="alertdialog" when isAlertDialog is set', async () => {
1881
+ const invokerNode = /** @type {HTMLElement} */ (
1882
+ await fixture('<div role="button">invoker</div>')
1883
+ );
1884
+ const ctrl = new OverlayController({
1885
+ ...withLocalTestConfig(),
1886
+ handlesAccessibility: true,
1887
+ isAlertDialog: true,
1888
+ invokerNode,
1889
+ });
1890
+
1891
+ expect(ctrl.contentNode?.getAttribute('role')).to.equal('alertdialog');
1892
+ });
1893
+ });
1894
+
1879
1895
  describe('Tooltip', () => {
1880
1896
  it('adds [aria-describedby] on invoker', async () => {
1881
1897
  const invokerNode = /** @type {HTMLElement} */ (
@@ -1922,6 +1938,19 @@ describe('OverlayController', () => {
1922
1938
  expect(ctrl.contentNode.getAttribute('role')).to.equal('tooltip');
1923
1939
  });
1924
1940
 
1941
+ it('adds tabindex="-1" to the wrappingDialog element', async () => {
1942
+ const invokerNode = /** @type {HTMLElement} */ (
1943
+ await fixture('<div role="button">invoker</div>')
1944
+ );
1945
+ const ctrl = new OverlayController({
1946
+ ...withLocalTestConfig(),
1947
+ handlesAccessibility: true,
1948
+ isTooltip: true,
1949
+ invokerNode,
1950
+ });
1951
+ expect(ctrl.__wrappingDialogNode?.getAttribute('tabindex')).to.equal('-1');
1952
+ });
1953
+
1925
1954
  describe('Teardown', () => {
1926
1955
  it('restores [role] on dialog content', async () => {
1927
1956
  const invokerNode = /** @type {HTMLElement} */ (
@@ -41,7 +41,7 @@ export interface OverlayConfig {
41
41
  contentNode?: HTMLElement;
42
42
  /** 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 */
43
43
  contentWrapperNode?: HTMLElement;
44
- /** The element that is placed behin the contentNode. When not provided and `hasBackdrop` is true, a backdropNode will be automatically created */
44
+ /** The element that is placed behind the contentNode. When not provided and `hasBackdrop` is true, a backdropNode will be automatically created */
45
45
  backdropNode?: HTMLElement;
46
46
  /** The element that should be called `.focus()` on after dialog closes */
47
47
  elementToFocusAfterHide?: HTMLElement;
@@ -59,7 +59,7 @@ export interface OverlayConfig {
59
59
  trapsKeyboardFocus?: boolean;
60
60
  /** Hides the overlay when pressing [ esc ] */
61
61
  hidesOnEsc?: boolean;
62
- /** Hides the overlay when clicking next to it, exluding invoker */
62
+ /** Hides the overlay when clicking next to it, excluding invoker */
63
63
  hidesOnOutsideClick?: boolean;
64
64
  /** Hides the overlay when pressing esc, even when contentNode has no focus */
65
65
  hidesOnOutsideEsc?: boolean;
@@ -82,6 +82,8 @@ export interface OverlayConfig {
82
82
 
83
83
  /** Has a totally different interaction- and accessibility pattern from all other overlays. Will behave as role="tooltip" element instead of a role="dialog" element */
84
84
  isTooltip?: boolean;
85
+ /** 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. */
86
+ isAlertDialog?: boolean;
85
87
  /** 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) */
86
88
  invokerRelation?: 'label' | 'description';
87
89
 
@@ -489,7 +489,7 @@ export class LionSelectRich extends SlotMixin(ScopedElementsMixin(OverlayMixin(L
489
489
  * @param {KeyboardEvent} ev
490
490
  * @protected
491
491
  */
492
- // TODO: rename to _onKeyUp in v1
492
+ // TODO: rename to #invokerOnKeyUp() (and move event listener to the invoker) in v1
493
493
  __onKeyUp(ev) {
494
494
  if (this.disabled || this.readOnly) {
495
495
  return;
@@ -529,6 +529,22 @@ export class LionSelectRich extends SlotMixin(ScopedElementsMixin(OverlayMixin(L
529
529
  this.opened = true;
530
530
  }
531
531
  break;
532
+ case 'ArrowLeft':
533
+ ev.preventDefault();
534
+ if (this.navigateWithinInvoker) {
535
+ this.setCheckedIndex(
536
+ this._getPreviousEnabledOption(/** @type {number} */ (this.checkedIndex)),
537
+ );
538
+ }
539
+ break;
540
+ case 'ArrowRight':
541
+ ev.preventDefault();
542
+ if (this.navigateWithinInvoker) {
543
+ this.setCheckedIndex(
544
+ this._getNextEnabledOption(/** @type {number} */ (this.checkedIndex)),
545
+ );
546
+ }
547
+ break;
532
548
  default:
533
549
  if (!this._noTypeAhead) {
534
550
  this._handleTypeAhead(ev, { setAsChecked: true });
@@ -24,6 +24,24 @@ function mimicKeyPress(el, key, code = '') {
24
24
  el.dispatchEvent(new KeyboardEvent('keyup', { key, code }));
25
25
  }
26
26
 
27
+ /**
28
+ * @param {LionOption[]} options
29
+ * @param {number} selectedIndex
30
+ */
31
+ function expectOnlyGivenOneOptionToBeChecked(options, selectedIndex) {
32
+ /**
33
+ * @param {{ checked: any; }} option
34
+ * @param {any} i
35
+ */
36
+ options.forEach((option, i) => {
37
+ if (i === selectedIndex) {
38
+ expect(option.checked).to.be.true;
39
+ } else {
40
+ expect(option.checked).to.be.false;
41
+ }
42
+ });
43
+ }
44
+
27
45
  describe('lion-select-rich interactions', () => {
28
46
  describe('Interaction mode', () => {
29
47
  it('autodetects interactionMode if not defined', async () => {
@@ -86,26 +104,91 @@ describe('lion-select-rich interactions', () => {
86
104
  });
87
105
  });
88
106
 
89
- describe('Invoker Keyboard navigation Windows', () => {
90
- it('navigates through list with [ArrowDown] [ArrowUp] keys checks the option while listbox unopened', async () => {
91
- /**
92
- * @param {LionOption[]} options
93
- * @param {number} selectedIndex
94
- */
95
- function expectOnlyGivenOneOptionToBeChecked(options, selectedIndex) {
96
- /**
97
- * @param {{ checked: any; }} option
98
- * @param {any} i
99
- */
100
- options.forEach((option, i) => {
101
- if (i === selectedIndex) {
102
- expect(option.checked).to.be.true;
103
- } else {
104
- expect(option.checked).to.be.false;
105
- }
106
- });
107
- }
107
+ describe('Invoker Keyboard navigation Mac', () => {
108
+ it('opens dropdown with [ArrowDown] [ArrowUp] keys or navigates through the listbox options', async () => {
109
+ const el = /** @type {LionSelectRich} */ (
110
+ await fixture(html`
111
+ <lion-select-rich interaction-mode="mac">
112
+ <lion-options slot="input">
113
+ <lion-option .choiceValue=${10}>Item 1</lion-option>
114
+ <lion-option .choiceValue=${20}>Item 2</lion-option>
115
+ <lion-option .choiceValue=${30}>Item 3</lion-option>
116
+ </lion-options>
117
+ </lion-select-rich>
118
+ `)
119
+ );
120
+
121
+ const options = el.formElements;
122
+ expect(el.checkedIndex).to.equal(0);
123
+ expectOnlyGivenOneOptionToBeChecked(options, 0);
124
+
125
+ el.dispatchEvent(new KeyboardEvent('keyup', { key: 'ArrowDown' }));
126
+
127
+ expect(el.opened).to.be.true;
128
+ expect(el.checkedIndex).to.equal(0);
129
+ expectOnlyGivenOneOptionToBeChecked(options, 0);
130
+
131
+ el.opened = false;
132
+
133
+ el.dispatchEvent(new KeyboardEvent('keyup', { key: 'ArrowUp' }));
134
+ expect(el.opened).to.be.true;
135
+ expect(el.checkedIndex).to.equal(0);
136
+ expectOnlyGivenOneOptionToBeChecked(options, 0);
137
+ });
138
+
139
+ it('does not open dropdown with [ArrowLeft] [ArrowRight] keys or navigates through the listbox options', async () => {
140
+ const el = /** @type {LionSelectRich} */ (
141
+ await fixture(html`
142
+ <lion-select-rich interaction-mode="mac">
143
+ <lion-options slot="input">
144
+ <lion-option .choiceValue=${10}>Item 1</lion-option>
145
+ <lion-option .choiceValue=${20}>Item 2</lion-option>
146
+ <lion-option .choiceValue=${30}>Item 3</lion-option>
147
+ </lion-options>
148
+ </lion-select-rich>
149
+ `)
150
+ );
151
+
152
+ const options = el.formElements;
153
+ expect(el.checkedIndex).to.equal(0);
154
+ expectOnlyGivenOneOptionToBeChecked(options, 0);
155
+
156
+ el.dispatchEvent(new KeyboardEvent('keyup', { key: 'ArrowLeft' }));
157
+
158
+ expect(el.opened).to.be.false;
159
+ expect(el.checkedIndex).to.equal(0);
160
+ expectOnlyGivenOneOptionToBeChecked(options, 0);
161
+
162
+ el.dispatchEvent(new KeyboardEvent('keyup', { key: 'ArrowRight' }));
163
+ expect(el.opened).to.be.false;
164
+ expect(el.checkedIndex).to.equal(0);
165
+ expectOnlyGivenOneOptionToBeChecked(options, 0);
166
+ });
167
+
168
+ it('checks a value with [character] keys while listbox unopened', async () => {
169
+ const el = /** @type {LionSelectRich} */ (
170
+ await fixture(html`
171
+ <lion-select-rich interaction-mode="mac">
172
+ <lion-options slot="input">
173
+ <lion-option .choiceValue=${'red'}>Red</lion-option>
174
+ <lion-option .choiceValue=${'teal'}>Teal</lion-option>
175
+ <lion-option .choiceValue=${'turquoise'}>Turquoise</lion-option>
176
+ </lion-options>
177
+ </lion-select-rich>
178
+ `)
179
+ );
108
180
 
181
+ // @ts-ignore [allow-private] in test
182
+ mimicKeyPress(el, 't', 'KeyT');
183
+ expect(el.checkedIndex).to.equal(1);
184
+
185
+ mimicKeyPress(el, 'u', 'KeyU');
186
+ expect(el.checkedIndex).to.equal(2);
187
+ });
188
+ });
189
+
190
+ describe('Invoker Keyboard navigation Windows/Linux', () => {
191
+ it('navigation through list with [ArrowDown] [ArrowUp] keys checks the option while listbox unopened', async () => {
109
192
  let isTriggeredByUser;
110
193
  const el = /** @type {LionSelectRich} */ (
111
194
  await fixture(html`
@@ -141,7 +224,43 @@ describe('lion-select-rich interactions', () => {
141
224
  expect(isTriggeredByUser).to.be.true;
142
225
  });
143
226
 
144
- it('checkes a value with [character] keys while listbox unopened', async () => {
227
+ it('navigation through list with [ArrowLeft] [ArrowRight] keys checks the option while listbox unopened', async () => {
228
+ let isTriggeredByUser;
229
+ const el = /** @type {LionSelectRich} */ (
230
+ await fixture(html`
231
+ <lion-select-rich
232
+ interaction-mode="windows/linux"
233
+ @model-value-changed="${(/** @type {CustomEvent} */ event) => {
234
+ isTriggeredByUser = event.detail.isTriggeredByUser;
235
+ }}"
236
+ >
237
+ <lion-options slot="input">
238
+ <lion-option .choiceValue=${10}>Item 1</lion-option>
239
+ <lion-option .choiceValue=${20}>Item 2</lion-option>
240
+ <lion-option .choiceValue=${30}>Item 3</lion-option>
241
+ </lion-options>
242
+ </lion-select-rich>
243
+ `)
244
+ );
245
+
246
+ const options = el.formElements;
247
+ expect(el.checkedIndex).to.equal(0);
248
+ expectOnlyGivenOneOptionToBeChecked(options, 0);
249
+
250
+ el.dispatchEvent(new KeyboardEvent('keyup', { key: 'ArrowRight' }));
251
+ expect(el.checkedIndex).to.equal(1);
252
+ expectOnlyGivenOneOptionToBeChecked(options, 1);
253
+ expect(isTriggeredByUser).to.be.true;
254
+
255
+ isTriggeredByUser = false;
256
+
257
+ el.dispatchEvent(new KeyboardEvent('keyup', { key: 'ArrowLeft' }));
258
+ expect(el.checkedIndex).to.equal(0);
259
+ expectOnlyGivenOneOptionToBeChecked(options, 0);
260
+ expect(isTriggeredByUser).to.be.true;
261
+ });
262
+
263
+ it('checks a value with [character] keys while listbox unopened', async () => {
145
264
  const el = /** @type {LionSelectRich} */ (
146
265
  await fixture(html`
147
266
  <lion-select-rich interaction-mode="windows/linux">
@@ -10,8 +10,8 @@ export default {
10
10
  'Proszę podać prawidłową wartość {fieldName} (od {params.min} do {params.max} znaków).',
11
11
  Pattern: 'Wprowadź prawidłową wartość w polu {fieldName}.',
12
12
  IsNumber: 'Wprowadź prawidłową wartość w polu {fieldName}.',
13
- MinNumber: 'Proszę podać wartość {fieldName} większą niż {params}.',
14
- MaxNumber: 'Proszę podać wartość {fieldName} mniejszą niż {params}.',
13
+ MinNumber: 'Proszę podać wartość {fieldName} większą niż lub równą {params}.',
14
+ MaxNumber: 'Proszę podać wartość {fieldName} mniejszą niż lub równą {params}.',
15
15
  MinMaxNumber: 'Proszę podać wartość {fieldName} o długości od {params.min} do {params.max}.',
16
16
  IsDate: 'Wprowadź datę (DD MM RRRR).',
17
17
  MinDate: 'Proszę podać wartość {fieldName} przypadającą po {params, date, YYYYMMDD}.',
@@ -32,8 +32,8 @@ export default {
32
32
  MinMaxLength:
33
33
  'Proszę podać prawidłową wartość {fieldName} (od {params.min} do {params.max} znaków).',
34
34
  IsNumber: 'Wprowadź prawidłową wartość w polu {fieldName}.',
35
- MinNumber: 'Proszę podać wartość {fieldName} większą niż {params}.',
36
- MaxNumber: 'Proszę podać wartość {fieldName} mniejszą niż {params}.',
35
+ MinNumber: 'Proszę podać wartość {fieldName} większą niż lub równą {params}.',
36
+ MaxNumber: 'Proszę podać wartość {fieldName} mniejszą niż lub równą {params}.',
37
37
  MinMaxNumber: 'Proszę podać wartość {fieldName} o długości od {params.min} do {params.max}.',
38
38
  IsDate: 'Wprowadź datę (DD MM RRRR).',
39
39
  MinDate: 'Proszę podać wartość {fieldName} przypadającą po {params, date, YYYYMMDD}.',
@@ -19581,6 +19581,16 @@
19581
19581
  "module": "components/overlays/src/OverlayMixin.js"
19582
19582
  }
19583
19583
  },
19584
+ {
19585
+ "kind": "field",
19586
+ "name": "isAlertDialog",
19587
+ "privacy": "public",
19588
+ "type": {
19589
+ "text": "boolean"
19590
+ },
19591
+ "default": "false",
19592
+ "attribute": "is-alert-dialog"
19593
+ },
19584
19594
  {
19585
19595
  "kind": "field",
19586
19596
  "name": "properties",
@@ -19866,19 +19876,15 @@
19866
19876
  }
19867
19877
  }
19868
19878
  ],
19869
- "mixins": [
19870
- {
19871
- "name": "OverlayMixin",
19872
- "package": "@lion/ui/overlays.js"
19873
- }
19874
- ],
19875
- "superclass": {
19876
- "name": "LitElement",
19877
- "package": "lit"
19878
- },
19879
- "tagName": "lion-dialog",
19880
- "customElement": true,
19881
19879
  "attributes": [
19880
+ {
19881
+ "name": "is-alert-dialog",
19882
+ "type": {
19883
+ "text": "boolean"
19884
+ },
19885
+ "default": "false",
19886
+ "fieldName": "isAlertDialog"
19887
+ },
19882
19888
  {
19883
19889
  "name": "opened",
19884
19890
  "type": {
@@ -19893,6 +19899,18 @@
19893
19899
  }
19894
19900
  }
19895
19901
  ],
19902
+ "mixins": [
19903
+ {
19904
+ "name": "OverlayMixin",
19905
+ "package": "@lion/ui/overlays.js"
19906
+ }
19907
+ ],
19908
+ "superclass": {
19909
+ "name": "LitElement",
19910
+ "package": "lit"
19911
+ },
19912
+ "tagName": "lion-dialog",
19913
+ "customElement": true,
19896
19914
  "events": [
19897
19915
  {
19898
19916
  "name": "opened-changed",
@@ -116396,6 +116414,13 @@
116396
116414
  "readonly": true,
116397
116415
  "privacy": "public"
116398
116416
  },
116417
+ {
116418
+ "kind": "field",
116419
+ "name": "isAlertDialog",
116420
+ "description": "The alertdialog role is to be used on modal alert dialogs that interrupt a user's workflow\nto communicate an important message and require a response.",
116421
+ "readonly": true,
116422
+ "privacy": "public"
116423
+ },
116399
116424
  {
116400
116425
  "kind": "field",
116401
116426
  "name": "invokerRelation",
@@ -116991,7 +117016,7 @@
116991
117016
  "text": "OverlayConfig"
116992
117017
  },
116993
117018
  "privacy": "protected",
116994
- "default": "{ 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, 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, }"
117019
+ "default": "{ 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, }"
116995
117020
  },
116996
117021
  {
116997
117022
  "kind": "field",
@@ -1 +1 @@
1
- {"version":3,"file":"LionButton.d.ts","sourceRoot":"","sources":["../../../../components/button/src/LionButton.js"],"names":[],"mappings":";AAMA;;GAEG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;;;;;;MAKC;IAMD,+CA+EC;IAnFD,+CAEC;IAqFC,aAAoB;IACpB,gBAAmB;IAEnB,kBAA+B;IA6BjC;;OAEG;IACH,sBAIC;IAED;;OAEG;IACH,2BASC;IAED;;;OAGG;IACH,yBAuBC;IAED;;;OAGG;IACH,uBASC;CACF;6BAtNY,OAAO,KAAK,EAAE,cAAc"}
1
+ {"version":3,"file":"LionButton.d.ts","sourceRoot":"","sources":["../../../../components/button/src/LionButton.js"],"names":[],"mappings":";AAMA;;GAEG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;;;;;;MAKC;IAMD,+CA+EC;IAnFD,+CAEC;IAqFC,aAAoB;IACpB,gBAAmB;IAEnB,kBAA+B;IAiCjC;;OAEG;IACH,sBAIC;IAED;;OAEG;IACH,2BASC;IAED;;;OAGG;IACH,yBAuBC;IAED;;;OAGG;IACH,uBASC;CACF;6BA1NY,OAAO,KAAK,EAAE,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"LionCalendar.d.ts","sourceRoot":"","sources":["../../../../components/calendar/src/LionCalendar.js"],"names":[],"mappings":";AAoCA;;GAEG;AACH;IAkEE;QAEI;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;;WAGG;;;;QAGH;;;;WAIG;;;;QAGH;;;;WAIG;;;;QAGH;;;;;;WAMG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;MAGN;IA4CD,+CAEC;IAmKD;;;OAGG;IACH,oDAA4F;IAjN1F;;OAEG;IACH,eAA4B;IAC5B,cAA0B;IAE1B,cAAyC;IACzC,uBAAuB;IACvB,uBADY,GAAG,mCACkB;IAEjC,wBAAwB;IAExB,oBAFY,IAAI,aAEgB;IAEhC,uBAAuB;IACvB,8BAAoC;IACpC,eAAe;IACf,gBAA4C;IAC5C,mBAAmB;IACnB,aADW,IAAI,CACgB;IAC/B;;;OAGG;IACH,sBAAyB;IACzB,eAAe;IACf,gCAAoC;IACpC,eAAe;IACf,sBAA0B;IAC1B,eAAgB;IAChB,eAAe;IACf,uCAA+E;IAC/E,eAAe;IACf,mCAAuE;IACvE,eAAe;IACf,mCAAuE;IACvE,eAAe;IACf,kCAAsE;IAOxE,+CAMC;IAED,+BAEC;IAED,sBAEC;IAED,0BAEC;IAED,qBAEC;IAED,yBAEC;IAED;;OAEG;IACH,gBAFW,IAAI,iBAMd;IAED,yBAOC;IAED,mCAIC;IAED,mCAkCC;IATG,uDAEC;IAkBL,6BAaC;IAUD;;;;;OAKG;IACH,oDAJW,OAAO,sEAEL,IAAI,CAkBhB;IAED;;;OAGG;IACH,wBAWC;IAQD;;OAEG;IACH,sCASC;IAFC,mBAAmB;IACnB,uCAA4C;IAG9C;;;;OAIG;IACH,gCAkBC;IAED;;;;OAIG;IACH,+BAWC;IAED;;OAEG;IACH,2BAQC;IAED;;OAEG;IACH,qBAeC;IAED;;;;;OAKG;IACH,8BAiBC;IAED;;;;;OAKG;IACH,0BAiBC;IAED;;;;;OAKG;IAEH,uCANW,MAAM,iBACN,MAAM,gBACN,MAAM,wCA0BhB;IAGD,8DAEC;IAED;;;;;OAKG;IAEH,mCANW,MAAM,aACN,MAAM,YACN,MAAM,wCA0BhB;IAGD,0DAEC;IAED;;;;;;;OAOG;IACH,6BAEC;IAED;;;OAGG;IACH,iCAuBC;IAED;;;;;OAKG;IACH,8BA0CC;IAED;;;OAGG;IACH,qBAkBC;IAED;;;OAGG;IACH,6BAUC;IATC,+BAAgC;IAWlC;;OAEG;IACH,6BAIC;IAED;;;OAGG;IACH,mDAGC;IAED;;;OAGG;IACH,uDAGC;IAED;;;OAGG;IACH,sDAGC;IAED;;;OAGG;IACH,wBAGC;IAED;;;;;OAKG;IACH,iCAmCC;IAED;;;OAGG;IACH,8BAKC;IAED;;OAEG;IACH,8BASC;IAED;;OAEG;IACH,6BASC;IAED;;;OAGG;IACH,6BAIC;IAED;;;OAGG;IACH,kCAsDC;IAED;;;;;;;OAOG;IACH,qBAeC;IAED;;OAEG;IACH,oBAEC;CACF;kBAp6BY,OAAO,iBAAiB,EAAE,GAAG;mBAC7B,OAAO,iBAAiB,EAAE,IAAI;oBAC9B,OAAO,iBAAiB,EAAE,KAAK"}
1
+ {"version":3,"file":"LionCalendar.d.ts","sourceRoot":"","sources":["../../../../components/calendar/src/LionCalendar.js"],"names":[],"mappings":";AAoCA;;GAEG;AACH;IAkEE;QAEI;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;;WAGG;;;;QAGH;;;;WAIG;;;;QAGH;;;;WAIG;;;;QAGH;;;;;;WAMG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;QAGH;;WAEG;;;;MAGN;IA4CD,+CAEC;IAmKD;;;OAGG;IACH,oDAA4F;IAjN1F;;OAEG;IACH,eAA4B;IAC5B,cAA0B;IAE1B,cAAyC;IACzC,uBAAuB;IACvB,uBADY,GAAG,mCACkB;IAEjC,wBAAwB;IAExB,oBAFY,IAAI,aAEgB;IAEhC,uBAAuB;IACvB,8BAAoC;IACpC,eAAe;IACf,gBAA4C;IAC5C,mBAAmB;IACnB,aADW,IAAI,CACgB;IAC/B;;;OAGG;IACH,sBAAyB;IACzB,eAAe;IACf,gCAAoC;IACpC,eAAe;IACf,sBAA0B;IAC1B,eAAgB;IAChB,eAAe;IACf,uCAA+E;IAC/E,eAAe;IACf,mCAAuE;IACvE,eAAe;IACf,mCAAuE;IACvE,eAAe;IACf,kCAAsE;IAOxE,+CAMC;IAED,+BAEC;IAED,sBAEC;IAED,0BAEC;IAED,qBAEC;IAED,yBAEC;IAED;;OAEG;IACH,gBAFW,IAAI,iBAMd;IAED,yBAOC;IAED,mCAIC;IAED,mCAkCC;IATG,uDAEC;IAkBL,6BAaC;IAUD;;;;;OAKG;IACH,oDAJW,OAAO,sEAEL,IAAI,CAkBhB;IAED;;;OAGG;IACH,wBAWC;IAQD;;OAEG;IACH,sCASC;IAFC,mBAAmB;IACnB,uCAA4C;IAG9C;;;;OAIG;IACH,gCAkBC;IAED;;;;OAIG;IACH,+BAWC;IAED;;OAEG;IACH,2BAQC;IAED;;OAEG;IACH,qBAeC;IAED;;;;;OAKG;IACH,8BAiBC;IAED;;;;;OAKG;IACH,0BAiBC;IAED;;;;;OAKG;IAEH,uCANW,MAAM,iBACN,MAAM,gBACN,MAAM,wCA0BhB;IAGD,8DAEC;IAED;;;;;OAKG;IAEH,mCANW,MAAM,aACN,MAAM,YACN,MAAM,wCA0BhB;IAGD,0DAEC;IAED;;;;;;;OAOG;IACH,6BAEC;IAED;;;OAGG;IACH,iCAuBC;IAED;;;;;OAKG;IACH,8BAiCC;IAED;;;OAGG;IACH,qBAkBC;IAED;;;OAGG;IACH,6BAUC;IATC,+BAAgC;IAWlC;;OAEG;IACH,6BAIC;IAED;;;OAGG;IACH,mDAGC;IAED;;;OAGG;IACH,uDAGC;IAED;;;OAGG;IACH,sDAGC;IAED;;;OAGG;IACH,wBAGC;IAED;;;;;OAKG;IACH,iCAmCC;IAED;;;OAGG;IACH,8BAKC;IAED;;OAEG;IACH,8BASC;IAED;;OAEG;IACH,6BASC;IAED;;;OAGG;IACH,6BAIC;IAED;;;OAGG;IACH,kCAsDC;IAED;;;;;;;OAOG;IACH,qBAeC;IAED;;OAEG;IACH,oBAEC;CACF;kBA35BY,OAAO,iBAAiB,EAAE,GAAG;mBAC7B,OAAO,iBAAiB,EAAE,IAAI;oBAC9B,OAAO,iBAAiB,EAAE,KAAK"}
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=bg.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=cs.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=de.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=en.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=es.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=fr.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=hu.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=it.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=nl.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=pl.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=ro.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=ru.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=sk.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=uk.d.ts.map
@@ -3,6 +3,9 @@ declare namespace _default {
3
3
  const previousMonth: string;
4
4
  const nextFullYear: string;
5
5
  const previousFullYear: string;
6
+ const defaultDisabledDate: string;
7
+ const beforeDisabledDate: string;
8
+ const afterDisabledDate: string;
6
9
  }
7
10
  export default _default;
8
11
  //# sourceMappingURL=zh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SlotMixin.d.ts","sourceRoot":"","sources":["../../../../components/core/src/SlotMixin.js"],"names":[],"mappings":"wBASa,OAAO,4BAA4B,EAAE,SAAS;AAgS3D,4nBAA8D;4BAnSjD;IAAC,YAAY,EAAC,OAAO,CAAC;IAAC,yCAAyC,EAAE,cAAc,CAAA;CAAC;iCACjF,OAAO,4BAA4B,EAAE,kBAAkB;iCACvD,OAAO,4BAA4B,EAAE,kBAAkB;uBAEvD,OAAO,4BAA4B,EAAE,QAAQ;yBAC7C,OAAO,KAAK,EAAE,UAAU"}
1
+ {"version":3,"file":"SlotMixin.d.ts","sourceRoot":"","sources":["../../../../components/core/src/SlotMixin.js"],"names":[],"mappings":"wBASa,OAAO,4BAA4B,EAAE,SAAS;AA+S3D,4nBAA8D;4BAlTjD;IAAC,YAAY,EAAC,OAAO,CAAC;IAAC,yCAAyC,EAAE,cAAc,CAAA;CAAC;iCACjF,OAAO,4BAA4B,EAAE,kBAAkB;iCACvD,OAAO,4BAA4B,EAAE,kBAAkB;uBAEvD,OAAO,4BAA4B,EAAE,QAAQ;yBAC7C,OAAO,KAAK,EAAE,UAAU"}