@statistikzh/leu 0.21.1 → 0.22.1

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 (193) hide show
  1. package/.github/workflows/release-please.yml +1 -2
  2. package/.nvmrc +1 -1
  3. package/.release-please-manifest.json +1 -1
  4. package/CHANGELOG.md +16 -0
  5. package/README.md +15 -10
  6. package/dist/Accordion.js +1 -1
  7. package/dist/Button.d.ts +1 -1
  8. package/dist/Button.js +1 -1
  9. package/dist/ButtonGroup.js +1 -1
  10. package/dist/ChartWrapper.js +1 -1
  11. package/dist/Checkbox.d.ts +1 -1
  12. package/dist/Checkbox.js +1 -1
  13. package/dist/CheckboxGroup.js +1 -1
  14. package/dist/Chip.d.ts +1 -7
  15. package/dist/Chip.js +7 -5
  16. package/dist/ChipGroup.d.ts +17 -36
  17. package/dist/ChipGroup.js +35 -33
  18. package/dist/ChipLink.d.ts +5 -21
  19. package/dist/ChipLink.js +14 -15
  20. package/dist/ChipRemovable.d.ts +4 -15
  21. package/dist/ChipRemovable.js +7 -9
  22. package/dist/ChipSelectable.d.ts +14 -37
  23. package/dist/ChipSelectable.js +24 -28
  24. package/dist/Dialog.d.ts +7 -18
  25. package/dist/Dialog.js +15 -18
  26. package/dist/Dropdown.d.ts +16 -24
  27. package/dist/Dropdown.js +23 -21
  28. package/dist/FileInput.d.ts +2 -1
  29. package/dist/FileInput.js +19 -5
  30. package/dist/Icon.d-itcQ94ym.d.ts +151 -0
  31. package/dist/Icon.d.ts +4 -156
  32. package/dist/Icon.js +1 -4
  33. package/dist/Input.d.ts +73 -141
  34. package/dist/Input.js +91 -88
  35. package/dist/{LeuElement-BLUQU9Eu.js → LeuElement-DfsEye-A.js} +1 -1
  36. package/dist/Menu.d.ts +2 -8
  37. package/dist/Menu.js +7 -9
  38. package/dist/MenuItem.d.ts +31 -59
  39. package/dist/MenuItem.js +30 -33
  40. package/dist/Message.d.ts +1 -1
  41. package/dist/Message.js +1 -1
  42. package/dist/Pagination.d.ts +1 -1
  43. package/dist/Pagination.js +1 -1
  44. package/dist/Placeholder.js +1 -1
  45. package/dist/Popup.js +1 -1
  46. package/dist/ProgressBar.js +1 -1
  47. package/dist/Radio.js +1 -1
  48. package/dist/RadioGroup.js +1 -1
  49. package/dist/Range.d.ts +22 -65
  50. package/dist/Range.js +36 -37
  51. package/dist/ScrollTop.d.ts +5 -7
  52. package/dist/ScrollTop.js +10 -15
  53. package/dist/Select.d.ts +2 -1
  54. package/dist/Select.js +1 -1
  55. package/dist/Spinner.js +1 -1
  56. package/dist/Table.d.ts +1 -1
  57. package/dist/Table.js +1 -1
  58. package/dist/Tag.js +1 -1
  59. package/dist/VisuallyHidden.js +1 -1
  60. package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts +5 -0
  61. package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts.map +1 -1
  62. package/dist/components/chip/Chip.d.ts +1 -7
  63. package/dist/components/chip/Chip.d.ts.map +1 -1
  64. package/dist/components/chip/ChipGroup.d.ts +15 -35
  65. package/dist/components/chip/ChipGroup.d.ts.map +1 -1
  66. package/dist/components/chip/ChipLink.d.ts +4 -20
  67. package/dist/components/chip/ChipLink.d.ts.map +1 -1
  68. package/dist/components/chip/ChipRemovable.d.ts +3 -14
  69. package/dist/components/chip/ChipRemovable.d.ts.map +1 -1
  70. package/dist/components/chip/ChipSelectable.d.ts +13 -36
  71. package/dist/components/chip/ChipSelectable.d.ts.map +1 -1
  72. package/dist/components/chip/stories/chip-group.stories.d.ts +1 -1
  73. package/dist/components/chip/stories/chip-group.stories.d.ts.map +1 -1
  74. package/dist/components/chip/stories/chip-link.stories.d.ts.map +1 -1
  75. package/dist/components/chip/stories/chip-selectable.stories.d.ts.map +1 -1
  76. package/dist/components/dialog/Dialog.d.ts +5 -17
  77. package/dist/components/dialog/Dialog.d.ts.map +1 -1
  78. package/dist/components/dropdown/Dropdown.d.ts +14 -23
  79. package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
  80. package/dist/components/dropdown/stories/dropdown.stories.d.ts.map +1 -1
  81. package/dist/components/file-input/FileInput.d.ts +1 -0
  82. package/dist/components/file-input/FileInput.d.ts.map +1 -1
  83. package/dist/components/file-input/leu-file-input.d.ts +5 -0
  84. package/dist/components/file-input/leu-file-input.d.ts.map +1 -1
  85. package/dist/components/file-input/stories/file-input.stories.d.ts +4 -0
  86. package/dist/components/file-input/stories/file-input.stories.d.ts.map +1 -1
  87. package/dist/components/icon/Icon.d.ts +0 -6
  88. package/dist/components/icon/Icon.d.ts.map +1 -1
  89. package/dist/components/input/Input.d.ts +73 -140
  90. package/dist/components/input/Input.d.ts.map +1 -1
  91. package/dist/components/menu/Menu.d.ts +1 -7
  92. package/dist/components/menu/Menu.d.ts.map +1 -1
  93. package/dist/components/menu/MenuItem.d.ts +30 -57
  94. package/dist/components/menu/MenuItem.d.ts.map +1 -1
  95. package/dist/components/message/leu-message.d.ts +5 -0
  96. package/dist/components/message/leu-message.d.ts.map +1 -1
  97. package/dist/components/placeholder/leu-placeholder.d.ts +5 -0
  98. package/dist/components/placeholder/leu-placeholder.d.ts.map +1 -1
  99. package/dist/components/progress-bar/leu-progress-bar.d.ts +5 -0
  100. package/dist/components/progress-bar/leu-progress-bar.d.ts.map +1 -1
  101. package/dist/components/range/Range.d.ts +22 -65
  102. package/dist/components/range/Range.d.ts.map +1 -1
  103. package/dist/components/scroll-top/ScrollTop.d.ts +4 -6
  104. package/dist/components/scroll-top/ScrollTop.d.ts.map +1 -1
  105. package/dist/components/tag/leu-tag.d.ts +5 -0
  106. package/dist/components/tag/leu-tag.d.ts.map +1 -1
  107. package/dist/index.d.ts +11 -0
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +13 -4
  110. package/dist/leu-accordion.js +1 -1
  111. package/dist/leu-button-group.js +1 -1
  112. package/dist/leu-button.d.ts +1 -1
  113. package/dist/leu-button.js +1 -1
  114. package/dist/leu-chart-wrapper.d.ts +10 -1
  115. package/dist/leu-chart-wrapper.js +1 -1
  116. package/dist/leu-checkbox-group.js +1 -1
  117. package/dist/leu-checkbox.d.ts +1 -1
  118. package/dist/leu-checkbox.js +1 -1
  119. package/dist/leu-chip-group.d.ts +2 -0
  120. package/dist/leu-chip-group.js +5 -1
  121. package/dist/leu-chip-link.js +3 -1
  122. package/dist/leu-chip-removable.d.ts +1 -1
  123. package/dist/leu-chip-removable.js +3 -3
  124. package/dist/leu-chip-selectable.js +3 -1
  125. package/dist/leu-dialog.d.ts +2 -1
  126. package/dist/leu-dialog.js +3 -3
  127. package/dist/leu-dropdown.d.ts +2 -1
  128. package/dist/leu-dropdown.js +3 -3
  129. package/dist/leu-file-input.d.ts +11 -2
  130. package/dist/leu-file-input.js +11 -4
  131. package/dist/leu-icon.d.ts +1 -1
  132. package/dist/leu-icon.js +1 -1
  133. package/dist/leu-input.d.ts +2 -1
  134. package/dist/leu-input.js +3 -3
  135. package/dist/leu-menu-item.d.ts +2 -2
  136. package/dist/leu-menu-item.js +3 -3
  137. package/dist/leu-menu.d.ts +1 -1
  138. package/dist/leu-menu.js +3 -3
  139. package/dist/leu-message.d.ts +11 -2
  140. package/dist/leu-message.js +1 -1
  141. package/dist/leu-pagination.d.ts +1 -1
  142. package/dist/leu-pagination.js +1 -1
  143. package/dist/leu-placeholder.d.ts +10 -1
  144. package/dist/leu-placeholder.js +1 -1
  145. package/dist/leu-popup.js +1 -1
  146. package/dist/leu-progress-bar.d.ts +10 -1
  147. package/dist/leu-progress-bar.js +1 -1
  148. package/dist/leu-radio-group.js +1 -1
  149. package/dist/leu-radio.js +1 -1
  150. package/dist/leu-range.js +3 -1
  151. package/dist/leu-scroll-top.d.ts +1 -1
  152. package/dist/leu-scroll-top.js +3 -3
  153. package/dist/leu-select.d.ts +2 -1
  154. package/dist/leu-select.js +1 -1
  155. package/dist/leu-spinner.js +1 -1
  156. package/dist/leu-table.d.ts +1 -1
  157. package/dist/leu-table.js +1 -1
  158. package/dist/leu-tag.d.ts +10 -1
  159. package/dist/leu-tag.js +1 -1
  160. package/dist/leu-visually-hidden.js +1 -1
  161. package/dist/vscode.html-custom-data.json +115 -111
  162. package/dist/vue/index.d.ts +116 -131
  163. package/dist/web-types.json +303 -303
  164. package/package.json +1 -1
  165. package/scripts/generate-component/templates/[namespace]-[name].ts +6 -0
  166. package/src/components/chart-wrapper/leu-chart-wrapper.ts +6 -0
  167. package/src/components/chip/Chip.ts +3 -9
  168. package/src/components/chip/ChipGroup.ts +26 -39
  169. package/src/components/chip/ChipLink.ts +7 -18
  170. package/src/components/chip/ChipRemovable.ts +4 -11
  171. package/src/components/chip/ChipSelectable.ts +21 -35
  172. package/src/components/chip/stories/chip-group.stories.ts +4 -7
  173. package/src/components/chip/stories/chip-link.stories.ts +2 -4
  174. package/src/components/chip/stories/chip-selectable.stories.ts +4 -6
  175. package/src/components/chip/test/chip-group.test.ts +34 -31
  176. package/src/components/dialog/Dialog.ts +9 -22
  177. package/src/components/dropdown/Dropdown.ts +20 -24
  178. package/src/components/dropdown/stories/dropdown.stories.ts +6 -2
  179. package/src/components/dropdown/test/dropdown.test.ts +14 -2
  180. package/src/components/file-input/FileInput.ts +12 -1
  181. package/src/components/file-input/leu-file-input.ts +6 -0
  182. package/src/components/file-input/stories/file-input.stories.ts +7 -0
  183. package/src/components/icon/Icon.ts +0 -4
  184. package/src/components/input/Input.ts +108 -105
  185. package/src/components/menu/Menu.ts +3 -12
  186. package/src/components/menu/MenuItem.ts +37 -41
  187. package/src/components/message/leu-message.ts +6 -0
  188. package/src/components/placeholder/leu-placeholder.ts +6 -0
  189. package/src/components/progress-bar/leu-progress-bar.ts +6 -0
  190. package/src/components/range/Range.ts +51 -59
  191. package/src/components/scroll-top/ScrollTop.ts +8 -15
  192. package/src/components/tag/leu-tag.ts +6 -0
  193. package/src/index.ts +11 -0
package/dist/Range.d.ts CHANGED
@@ -15,84 +15,41 @@ declare class LeuRange extends LeuElement {
15
15
  customElements?: CustomElementRegistry;
16
16
  registry?: CustomElementRegistry;
17
17
  };
18
- static properties: {
19
- defaultValue: {
20
- converter: {
21
- fromAttribute(value: any): any;
22
- toAttribute(value: any): any;
23
- };
24
- attribute: string;
25
- };
26
- min: {
27
- type: NumberConstructor;
28
- reflect: boolean;
29
- };
30
- max: {
31
- type: NumberConstructor;
32
- reflect: boolean;
33
- };
34
- step: {
35
- type: NumberConstructor;
36
- reflect: boolean;
37
- };
38
- name: {
39
- type: StringConstructor;
40
- reflect: boolean;
41
- };
42
- label: {
43
- type: StringConstructor;
44
- reflect: boolean;
45
- };
46
- disabled: {
47
- type: BooleanConstructor;
48
- reflect: boolean;
49
- };
50
- multiple: {
51
- type: BooleanConstructor;
52
- reflect: boolean;
53
- };
54
- };
55
- constructor();
18
+ defaultValue: number[];
19
+ min: number;
20
+ max: number;
21
+ step: number;
22
+ name: string;
23
+ label: string;
24
+ disabled: boolean;
25
+ multiple: boolean;
56
26
  updated(): void;
57
- _updateStyles(): void;
58
- get value(): string;
27
+ protected get _inputs(): HTMLInputElement[];
28
+ protected _updateStyles(): void;
29
+ get value(): string | Array<string>;
59
30
  /**
60
31
  * Sets the value of the underlying input element(s).
61
32
  * The value has to be an array if "multiple" range is used.
62
33
  * Otherwise it has to be a string.
63
- * @param {string | Array} value
64
34
  */
65
- set value(value: string);
35
+ set value(value: string | Array<string>);
66
36
  get valueAsArray(): number[];
67
37
  get valueLow(): string | number;
68
38
  get valueHigh(): string | number;
69
- /**
70
- * @returns {HTMLInputElement | null}
71
- */
72
- _getBaseInput(): Element;
73
- /**
74
- * @returns {HTMLInputElement | null}
75
- */
76
- _getGhostInput(): Element;
77
- /**
78
- *
79
- * @param {number} _index
80
- * @param {InputEvent & {target: HTMLInputElement}} _e
81
- */
82
- _handleInput(_index: any, _e: any): void;
83
- /**
84
- *
85
- * @param {number} value
86
- * @returns {number}
87
- */
88
- _getNormalizedValue(value: any): number;
89
- _getNormalizedRange(): number[];
39
+ protected _getBaseInput(): HTMLInputElement;
40
+ protected _getGhostInput(): HTMLInputElement;
41
+ protected _handleInput(_index: number, _e: InputEvent & {
42
+ target: HTMLInputElement;
43
+ }): void;
44
+ protected _getNormalizedValue(value: number): number;
45
+ protected _getNormalizedRange(): number[];
90
46
  /**
91
47
  * Determine if the "click" (pointer event) is closer the
92
48
  * the value of the other input element. Swap the values if this is the case.
93
- * @param {PointerEvent & {target: HTMLInputElement}} e
94
49
  */
95
- _handlePointerDown(e: any): void;
50
+ protected _handlePointerDown(e: PointerEvent & {
51
+ target: HTMLInputElement;
52
+ }): void;
96
53
  render(): lit_html.TemplateResult<1>;
97
54
  }
98
55
 
package/dist/Range.js CHANGED
@@ -1,5 +1,7 @@
1
+ import { _ as __decorate } from './_tslib-CNEFicEt.js';
1
2
  import { css, html } from 'lit';
2
- import { L as LeuElement } from './LeuElement-BLUQU9Eu.js';
3
+ import { property } from 'lit/decorators.js';
4
+ import { L as LeuElement } from './LeuElement-DfsEye-A.js';
3
5
 
4
6
  var css_248z = css`:host {
5
7
  --range-color: var(--leu-color-black-40);
@@ -202,7 +204,7 @@ const RANGE_LABELS = ["Von", "Bis"];
202
204
  */
203
205
  class LeuRange extends LeuElement {
204
206
  constructor() {
205
- super();
207
+ super(...arguments);
206
208
  this.defaultValue = [50];
207
209
  this.min = 0;
208
210
  this.max = 100;
@@ -215,6 +217,9 @@ class LeuRange extends LeuElement {
215
217
  updated() {
216
218
  this._updateStyles();
217
219
  }
220
+ get _inputs() {
221
+ return Array.from(this.shadowRoot.querySelectorAll("input"));
222
+ }
218
223
  _updateStyles() {
219
224
  const normalizedRange = this._getNormalizedRange();
220
225
  this.style.setProperty("--low", normalizedRange[0].toString());
@@ -223,7 +228,6 @@ class LeuRange extends LeuElement {
223
228
  ? [this._getBaseInput(), this._getGhostInput()]
224
229
  : [this._getBaseInput()];
225
230
  inputs.forEach((input) => {
226
- /** @type {HTMLOutputElement} */
227
231
  const output = this.shadowRoot.querySelector(`.output[for=${input.id}]`);
228
232
  const normalizedValue = this._getNormalizedValue(input.valueAsNumber);
229
233
  output.style.setProperty("--value", normalizedValue.toString());
@@ -231,18 +235,16 @@ class LeuRange extends LeuElement {
231
235
  });
232
236
  }
233
237
  get value() {
234
- const inputs = Array.from(this.shadowRoot.querySelectorAll("input"));
235
- return inputs.map((input) => input.value).join(",");
238
+ return this._inputs.map((input) => input.value).join(",");
236
239
  }
237
240
  /**
238
241
  * Sets the value of the underlying input element(s).
239
242
  * The value has to be an array if "multiple" range is used.
240
243
  * Otherwise it has to be a string.
241
- * @param {string | Array} value
242
244
  */
243
245
  set value(value) {
244
246
  if (this.multiple && Array.isArray(value)) {
245
- const inputs = Array.from(this.shadowRoot.querySelectorAll("input"));
247
+ const inputs = this._inputs;
246
248
  value.forEach((v, i) => {
247
249
  inputs[i].value = v;
248
250
  });
@@ -254,47 +256,31 @@ class LeuRange extends LeuElement {
254
256
  }
255
257
  }
256
258
  get valueAsArray() {
257
- return Array.from(this.shadowRoot.querySelectorAll("input")).map((input) => input.valueAsNumber);
259
+ return this._inputs.map((input) => input.valueAsNumber);
258
260
  }
259
261
  get valueLow() {
260
- const inputs = Array.from(this.shadowRoot.querySelectorAll("input"));
262
+ const inputs = this._inputs;
261
263
  if (this.multiple) {
262
264
  return inputs.map((input) => input.valueAsNumber).sort((a, b) => a - b)[0];
263
265
  }
264
266
  return inputs[0].value;
265
267
  }
266
268
  get valueHigh() {
267
- const inputs = Array.from(this.shadowRoot.querySelectorAll("input"));
269
+ const inputs = this._inputs;
268
270
  if (this.multiple) {
269
271
  return inputs.map((input) => input.valueAsNumber).sort((a, b) => a - b)[1];
270
272
  }
271
273
  return inputs[0].value;
272
274
  }
273
- /**
274
- * @returns {HTMLInputElement | null}
275
- */
276
275
  _getBaseInput() {
277
276
  return this.shadowRoot.querySelector(".range--base");
278
277
  }
279
- /**
280
- * @returns {HTMLInputElement | null}
281
- */
282
278
  _getGhostInput() {
283
279
  return this.shadowRoot.querySelector(".range--ghost");
284
280
  }
285
- /**
286
- *
287
- * @param {number} _index
288
- * @param {InputEvent & {target: HTMLInputElement}} _e
289
- */
290
281
  _handleInput(_index, _e) {
291
282
  this._updateStyles();
292
283
  }
293
- /**
294
- *
295
- * @param {number} value
296
- * @returns {number}
297
- */
298
284
  _getNormalizedValue(value) {
299
285
  return (value - this.min) / (this.max - this.min);
300
286
  }
@@ -309,7 +295,6 @@ class LeuRange extends LeuElement {
309
295
  /**
310
296
  * Determine if the "click" (pointer event) is closer the
311
297
  * the value of the other input element. Swap the values if this is the case.
312
- * @param {PointerEvent & {target: HTMLInputElement}} e
313
298
  */
314
299
  _handlePointerDown(e) {
315
300
  const clickValue = this.min + ((this.max - this.min) * e.offsetX) / this.offsetWidth;
@@ -371,15 +356,29 @@ LeuRange.shadowRootOptions = {
371
356
  ...LeuElement.shadowRootOptions,
372
357
  delegatesFocus: true,
373
358
  };
374
- LeuRange.properties = {
375
- defaultValue: { converter: defaultValueConverter, attribute: "value" },
376
- min: { type: Number, reflect: true },
377
- max: { type: Number, reflect: true },
378
- step: { type: Number, reflect: true },
379
- name: { type: String, reflect: true },
380
- label: { type: String, reflect: true },
381
- disabled: { type: Boolean, reflect: true },
382
- multiple: { type: Boolean, reflect: true },
383
- };
359
+ __decorate([
360
+ property({ converter: defaultValueConverter, attribute: "value" })
361
+ ], LeuRange.prototype, "defaultValue", void 0);
362
+ __decorate([
363
+ property({ type: Number, reflect: true })
364
+ ], LeuRange.prototype, "min", void 0);
365
+ __decorate([
366
+ property({ type: Number, reflect: true })
367
+ ], LeuRange.prototype, "max", void 0);
368
+ __decorate([
369
+ property({ type: Number, reflect: true })
370
+ ], LeuRange.prototype, "step", void 0);
371
+ __decorate([
372
+ property({ type: String, reflect: true })
373
+ ], LeuRange.prototype, "name", void 0);
374
+ __decorate([
375
+ property({ type: String, reflect: true })
376
+ ], LeuRange.prototype, "label", void 0);
377
+ __decorate([
378
+ property({ type: Boolean, reflect: true })
379
+ ], LeuRange.prototype, "disabled", void 0);
380
+ __decorate([
381
+ property({ type: Boolean, reflect: true })
382
+ ], LeuRange.prototype, "multiple", void 0);
384
383
 
385
384
  export { LeuRange };
@@ -2,7 +2,7 @@ import * as lit_html from 'lit-html';
2
2
  import * as lit from 'lit';
3
3
  import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
4
4
  import { LeuButton } from './Button.js';
5
- import { LeuIcon } from './Icon.js';
5
+ import { L as LeuIcon } from './Icon.d-itcQ94ym.js';
6
6
 
7
7
  /**
8
8
  * @tagname leu-scroll-top
@@ -13,12 +13,10 @@ declare class LeuScrollTop extends LeuElement {
13
13
  "leu-icon": typeof LeuIcon;
14
14
  };
15
15
  static styles: lit.CSSResultGroup[];
16
- static properties: {
17
- _showButton: {
18
- state: boolean;
19
- };
20
- };
21
- constructor();
16
+ protected _showButton: boolean;
17
+ protected _prevYPos: number;
18
+ protected _scrollDown: boolean;
19
+ protected _scrollListener: EventListener;
22
20
  scroll: () => void;
23
21
  connectedCallback(): void;
24
22
  disconnectedCallback(): void;
package/dist/ScrollTop.js CHANGED
@@ -1,11 +1,11 @@
1
+ import { _ as __decorate } from './_tslib-CNEFicEt.js';
1
2
  import { css, html } from 'lit';
2
3
  import { classMap } from 'lit/directives/class-map.js';
3
- import { L as LeuElement } from './LeuElement-BLUQU9Eu.js';
4
+ import { state } from 'lit/decorators.js';
5
+ import { L as LeuElement } from './LeuElement-DfsEye-A.js';
4
6
  import { LeuButton } from './Button.js';
5
7
  import { LeuIcon } from './Icon.js';
6
- import './_tslib-CNEFicEt.js';
7
8
  import 'lit/directives/if-defined.js';
8
- import 'lit/decorators.js';
9
9
  import './hasSlotController-Bm2tipvG.js';
10
10
 
11
11
  /**
@@ -73,7 +73,10 @@ var css_248z = css`.scroll-top {
73
73
  */
74
74
  class LeuScrollTop extends LeuElement {
75
75
  constructor() {
76
- super();
76
+ super(...arguments);
77
+ this._showButton = false;
78
+ this._prevYPos = 0;
79
+ this._scrollDown = false;
77
80
  this.scroll = () => {
78
81
  const delta = window.scrollY - this._prevYPos;
79
82
  if (this._scrollDown) {
@@ -92,14 +95,6 @@ class LeuScrollTop extends LeuElement {
92
95
  this._showButton = window.scrollY > window.innerHeight && !this._scrollDown;
93
96
  this._prevYPos = window.scrollY;
94
97
  };
95
- /** @internal */
96
- this._prevYPos = 0;
97
- /** @internal */
98
- this._showButton = false;
99
- /** @internal */
100
- this._scrollDown = false;
101
- /** @internal */
102
- this._scrollListener = undefined;
103
98
  }
104
99
  connectedCallback() {
105
100
  super.connectedCallback();
@@ -140,8 +135,8 @@ LeuScrollTop.dependencies = {
140
135
  "leu-icon": LeuIcon,
141
136
  };
142
137
  LeuScrollTop.styles = [LeuElement.styles, css_248z];
143
- LeuScrollTop.properties = {
144
- _showButton: { state: true },
145
- };
138
+ __decorate([
139
+ state()
140
+ ], LeuScrollTop.prototype, "_showButton", void 0);
146
141
 
147
142
  export { LeuScrollTop };
package/dist/Select.d.ts CHANGED
@@ -6,9 +6,10 @@ import { H as HasSlotController } from './hasSlotController.d-emXwVXWF.js';
6
6
  import { LeuButton } from './Button.js';
7
7
  import { LeuMenu } from './Menu.js';
8
8
  import { LeuMenuItem } from './MenuItem.js';
9
- import { LeuIcon } from './Icon.js';
9
+ import { L as LeuIcon } from './Icon.d-itcQ94ym.js';
10
10
  import { LeuInput } from './Input.js';
11
11
  import { LeuPopup } from './Popup.js';
12
+ import 'lit-html/directives/ref.js';
12
13
  import '@floating-ui/dom';
13
14
 
14
15
  /**
package/dist/Select.js CHANGED
@@ -2,7 +2,7 @@ import { css, nothing, html } from 'lit';
2
2
  import { classMap } from 'lit/directives/class-map.js';
3
3
  import { createRef, ref } from 'lit/directives/ref.js';
4
4
  import { ifDefined } from 'lit/directives/if-defined.js';
5
- import { L as LeuElement } from './LeuElement-BLUQU9Eu.js';
5
+ import { L as LeuElement } from './LeuElement-DfsEye-A.js';
6
6
  import { H as HasSlotController } from './hasSlotController-Bm2tipvG.js';
7
7
  import { LeuButton } from './Button.js';
8
8
  import { LeuMenu } from './Menu.js';
package/dist/Spinner.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { css, html } from 'lit';
2
- import { L as LeuElement } from './LeuElement-BLUQU9Eu.js';
2
+ import { L as LeuElement } from './LeuElement-DfsEye-A.js';
3
3
 
4
4
  var css_248z = css`@keyframes leu-spinner-rotate {
5
5
  from {
package/dist/Table.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as lit_html from 'lit-html';
2
2
  import * as lit from 'lit';
3
3
  import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
4
- import { LeuIcon } from './Icon.js';
4
+ import { L as LeuIcon } from './Icon.d-itcQ94ym.js';
5
5
  import { LeuPagination } from './Pagination.js';
6
6
  import './Button.js';
7
7
  import './VisuallyHidden.js';
package/dist/Table.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { nothing, noChange, css, html } from 'lit';
2
2
  import { classMap } from 'lit/directives/class-map.js';
3
3
  import { createRef, ref } from 'lit/directives/ref.js';
4
- import { L as LeuElement } from './LeuElement-BLUQU9Eu.js';
4
+ import { L as LeuElement } from './LeuElement-DfsEye-A.js';
5
5
  import { directive, Directive, PartType } from 'lit/directive.js';
6
6
  import { LeuIcon } from './Icon.js';
7
7
  import { LeuPagination } from './Pagination.js';
package/dist/Tag.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { _ as __decorate } from './_tslib-CNEFicEt.js';
2
2
  import { css, html } from 'lit';
3
3
  import { property } from 'lit/decorators.js';
4
- import { L as LeuElement } from './LeuElement-BLUQU9Eu.js';
4
+ import { L as LeuElement } from './LeuElement-DfsEye-A.js';
5
5
 
6
6
  var css_248z = css`:host {
7
7
  /* --tag-font-regular: var(--leu-font-family-regular);
@@ -1,5 +1,5 @@
1
1
  import { css, html } from 'lit';
2
- import { L as LeuElement } from './LeuElement-BLUQU9Eu.js';
2
+ import { L as LeuElement } from './LeuElement-DfsEye-A.js';
3
3
 
4
4
  var css_248z = css`:host {
5
5
  clip: rect(0 0 0 0);
@@ -1,3 +1,8 @@
1
1
  import { LeuChartWrapper } from "./ChartWrapper.js";
2
2
  export { LeuChartWrapper };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ "leu-chart-wrapper": LeuChartWrapper;
6
+ }
7
+ }
3
8
  //# sourceMappingURL=leu-chart-wrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"leu-chart-wrapper.d.ts","sourceRoot":"","sources":["../../../src/components/chart-wrapper/leu-chart-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,OAAO,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"leu-chart-wrapper.d.ts","sourceRoot":"","sources":["../../../src/components/chart-wrapper/leu-chart-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,OAAO,EAAE,eAAe,EAAE,CAAA;AAI1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAA;KACrC;CACF"}
@@ -10,12 +10,6 @@ export declare class LeuChipBase extends LeuElement {
10
10
  customElements?: CustomElementRegistry;
11
11
  registry?: CustomElementRegistry;
12
12
  };
13
- static properties: {
14
- inverted: {
15
- type: BooleanConstructor;
16
- reflect: boolean;
17
- };
18
- };
19
- constructor();
13
+ inverted: boolean;
20
14
  }
21
15
  //# sourceMappingURL=Chip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/chip/Chip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAMpD,qBAAa,WAAY,SAAQ,UAAU;IACzC,MAAM,CAAC,MAAM,iCAA8B;IAE3C,gBAAgB;IAChB,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAED,MAAM,CAAC,UAAU;;;;;MAEhB;;CAOF"}
1
+ {"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/chip/Chip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAMpD,qBAAa,WAAY,SAAQ,UAAU;IACzC,MAAM,CAAC,MAAM,iCAA8B;IAE3C,gBAAgB;IAChB,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAGD,QAAQ,EAAE,OAAO,CAAQ;CAC1B"}
@@ -1,9 +1,5 @@
1
1
  import { LeuElement } from "../../lib/LeuElement.js";
2
- export declare const SELECTION_MODES: Readonly<{
3
- single: "single";
4
- multiple: "multiple";
5
- none: "none";
6
- }>;
2
+ import { LeuChipSelectable } from "./ChipSelectable.js";
7
3
  /**
8
4
  * @slot - Place leu-chip-* elements inside this slot
9
5
  * @cssproperty --leu-chip-group-gap - The gap between the chips
@@ -11,48 +7,32 @@ export declare const SELECTION_MODES: Readonly<{
11
7
  */
12
8
  export declare class LeuChipGroup extends LeuElement {
13
9
  static styles: import("lit").CSSResultGroup[];
14
- static properties: {
15
- inverted: {
16
- type: BooleanConstructor;
17
- reflect: boolean;
18
- };
19
- selectionMode: {
20
- type: StringConstructor;
21
- attribute: string;
22
- reflect: boolean;
23
- };
24
- headingLevel: {
25
- type: NumberConstructor;
26
- attribute: string;
27
- reflect: boolean;
28
- };
29
- label: {
30
- type: StringConstructor;
31
- reflect: boolean;
32
- };
33
- };
34
- constructor();
10
+ inverted: boolean;
11
+ selectionMode: "single" | "multiple" | "none";
12
+ headingLevel: number;
13
+ label: string;
14
+ protected selectableItems: Array<LeuChipSelectable>;
35
15
  connectedCallback(): void;
36
16
  disconnectedCallback(): void;
37
- get value(): any;
17
+ get value(): string[];
38
18
  /**
39
19
  * Checks the items with the given values.
40
20
  * If the selectionMode is single, only the first item with the given value is checked.
41
- * @param {string[]} valueList
42
21
  */
43
- set value(valueList: any);
22
+ set value(valueList: string[]);
44
23
  /**
45
24
  * Determines the heading tag of the accordion toggle.
46
25
  * The headingLevel shouldn't be used directly to render the heading tag
47
26
  * in order to avoid XSS issues.
48
- * @returns {String} The heading tag of the accordion toggle.
49
27
  * @internal
50
28
  */
51
- _getHeadingTag(): string;
52
- /** @internal */
53
- handleInput: (e: any) => void;
54
- /** @internal */
55
- handleSlotChange: (e: any) => void;
29
+ protected _getHeadingTag(): string;
30
+ protected handleInput: (e: Event & {
31
+ target: LeuChipSelectable;
32
+ }) => void;
33
+ protected handleSlotChange: (e: Event & {
34
+ target: HTMLSlotElement;
35
+ }) => void;
56
36
  render(): import("lit-html").TemplateResult;
57
37
  }
58
38
  //# sourceMappingURL=ChipGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChipGroup.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipGroup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAMpD,eAAO,MAAM,eAAe;;;;EAI1B,CAAA;AAEF;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;MAKhB;;IAgBD,iBAAiB;IAajB,oBAAoB;IAMpB,IAAI,KAAK,QAER;IAED;;;;OAIG;IACH,IAAI,KAAK,CAAC,SAAS,KAAA,EAUlB;IAED;;;;;;OAMG;IACH,cAAc;IASd,gBAAgB;IAChB,WAAW,mBAMV;IAED,gBAAgB;IAChB,gBAAgB,mBAKf;IAED,MAAM;CAkBP"}
1
+ {"version":3,"file":"ChipGroup.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipGroup.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,MAAM,CAAC,MAAM,iCAA8B;IAG3C,QAAQ,EAAE,OAAO,CAAQ;IAGzB,aAAa,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAS;IAGtD,YAAY,EAAE,MAAM,CAAI;IAGxB,KAAK,EAAE,MAAM,CAAK;IAElB,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAK;IAExD,iBAAiB;IAajB,oBAAoB;IAMpB,IAAI,KAAK,IAUY,MAAM,EAAE,CAN5B;IAED;;;OAGG;IACH,IAAI,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,EAU5B;IAED;;;;;OAKG;IACH,SAAS,CAAC,cAAc;IASxB,SAAS,CAAC,WAAW,MAAO,KAAK,GAAG;QAAE,MAAM,EAAE,iBAAiB,CAAA;KAAE,UAMhE;IAED,SAAS,CAAC,gBAAgB,MAAO,KAAK,GAAG;QAAE,MAAM,EAAE,eAAe,CAAA;KAAE,UAOnE;IAED,MAAM;CAkBP"}
@@ -1,29 +1,13 @@
1
1
  import { LeuChipBase } from "./Chip.js";
2
- export declare const SIZES: {
3
- regular: string;
4
- large: string;
5
- };
6
2
  /**
7
3
  * @tagname leu-chip-link
8
4
  * @slot - The content of the chip
9
- * @prop {keyof typeof SIZES} size - The size of the chip
10
5
  */
11
6
  export declare class LeuChipLink extends LeuChipBase {
12
- static properties: {
13
- size: {
14
- type: StringConstructor;
15
- reflect: boolean;
16
- };
17
- href: {
18
- type: StringConstructor;
19
- reflect: boolean;
20
- };
21
- inverted: {
22
- type: BooleanConstructor;
23
- reflect: boolean;
24
- };
25
- };
26
- constructor();
7
+ /** The size of the chip */
8
+ size: "regular" | "large";
9
+ /** The URL that the chip links to */
10
+ href: string;
27
11
  render(): import("lit-html").TemplateResult<1>;
28
12
  }
29
13
  //# sourceMappingURL=ChipLink.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChipLink.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipLink.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC,eAAO,MAAM,KAAK;;;CAGjB,CAAA;AAED;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,CAAC,UAAU;;;;;;;;;;;;;MAIhB;;IAUD,MAAM;CAKP"}
1
+ {"version":3,"file":"ChipLink.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipLink.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;GAGG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,2BAA2B;IAE3B,IAAI,EAAE,SAAS,GAAG,OAAO,CAAY;IAErC,qCAAqC;IAErC,IAAI,EAAE,MAAM,CAAK;IAEjB,MAAM;CAKP"}
@@ -10,23 +10,12 @@ export declare class LeuChipRemovable extends LeuChipBase {
10
10
  static dependencies: {
11
11
  "leu-icon": typeof LeuIcon;
12
12
  };
13
- static properties: {
14
- value: {
15
- type: StringConstructor;
16
- reflect: boolean;
17
- };
18
- inverted: {
19
- type: BooleanConstructor;
20
- reflect: boolean;
21
- };
22
- };
23
- constructor();
13
+ value: string;
24
14
  /**
25
15
  * Returns the value of the chip. If `value` is not set, it will return the text content
26
- * @returns {string}
27
16
  */
28
- getValue(): any;
29
- handleClick(): void;
17
+ getValue(): string;
18
+ protected handleClick(): void;
30
19
  render(): import("lit-html").TemplateResult<1>;
31
20
  }
32
21
  //# sourceMappingURL=ChipRemovable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChipRemovable.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipRemovable.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,CAAC,YAAY;;MAElB;IAED,MAAM,CAAC,UAAU;;;;;;;;;MAGhB;;IAOD;;;OAGG;IACH,QAAQ;IAIR,WAAW;IAWX,MAAM;CAMP"}
1
+ {"version":3,"file":"ChipRemovable.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipRemovable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,CAAC,YAAY;;MAElB;IAGD,KAAK,EAAE,MAAM,CAAK;IAElB;;OAEG;IACH,QAAQ;IAIR,SAAS,CAAC,WAAW;IAWrB,MAAM;CAMP"}