@statistikzh/leu 0.24.0 → 0.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/.github/workflows/publish.yml +2 -2
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +15 -0
  4. package/dist/Accordion.js +1 -1
  5. package/dist/Button.js +1 -1
  6. package/dist/ButtonGroup.js +1 -1
  7. package/dist/ChartWrapper.js +1 -1
  8. package/dist/Checkbox.js +1 -1
  9. package/dist/CheckboxGroup.js +1 -1
  10. package/dist/Chip.js +1 -1
  11. package/dist/ChipGroup.js +1 -1
  12. package/dist/ChipLink.js +1 -1
  13. package/dist/ChipRemovable.js +1 -1
  14. package/dist/ChipSelectable.js +1 -1
  15. package/dist/Dialog.js +1 -1
  16. package/dist/Dropdown.js +1 -1
  17. package/dist/FileInput.js +1 -1
  18. package/dist/Icon.js +1 -1
  19. package/dist/Input.js +1 -1
  20. package/dist/{LeuElement-BfbOWTGZ.js → LeuElement-BfXSO7MN.js} +1 -1
  21. package/dist/Menu.js +1 -1
  22. package/dist/MenuItem.js +1 -1
  23. package/dist/Message.js +1 -1
  24. package/dist/Pagination.js +1 -1
  25. package/dist/Placeholder.js +1 -1
  26. package/dist/Popup.js +1 -1
  27. package/dist/ProgressBar.js +1 -1
  28. package/dist/Radio.js +1 -1
  29. package/dist/RadioGroup.js +1 -1
  30. package/dist/Range.d.ts +32 -20
  31. package/dist/Range.js +137 -72
  32. package/dist/ScrollTop.js +24 -31
  33. package/dist/Select.js +1 -1
  34. package/dist/Spinner.js +1 -1
  35. package/dist/Table.js +1 -1
  36. package/dist/Tag.js +1 -1
  37. package/dist/VisuallyHidden.js +1 -1
  38. package/dist/components/range/Range.d.ts +33 -20
  39. package/dist/components/range/Range.d.ts.map +1 -1
  40. package/dist/components/range/stories/range.stories.d.ts +1 -0
  41. package/dist/components/range/stories/range.stories.d.ts.map +1 -1
  42. package/dist/index.js +2 -1
  43. package/dist/leu-accordion.js +1 -1
  44. package/dist/leu-button-group.js +1 -1
  45. package/dist/leu-button.js +1 -1
  46. package/dist/leu-chart-wrapper.js +1 -1
  47. package/dist/leu-checkbox-group.js +1 -1
  48. package/dist/leu-checkbox.js +1 -1
  49. package/dist/leu-chip-group.js +1 -1
  50. package/dist/leu-chip-link.js +1 -1
  51. package/dist/leu-chip-removable.js +1 -1
  52. package/dist/leu-chip-selectable.js +1 -1
  53. package/dist/leu-dialog.js +1 -1
  54. package/dist/leu-dropdown.js +1 -1
  55. package/dist/leu-file-input.js +1 -1
  56. package/dist/leu-icon.js +1 -1
  57. package/dist/leu-input.js +1 -1
  58. package/dist/leu-menu-item.js +1 -1
  59. package/dist/leu-menu.js +1 -1
  60. package/dist/leu-message.js +1 -1
  61. package/dist/leu-pagination.js +1 -1
  62. package/dist/leu-placeholder.js +1 -1
  63. package/dist/leu-popup.js +1 -1
  64. package/dist/leu-progress-bar.js +1 -1
  65. package/dist/leu-radio-group.js +1 -1
  66. package/dist/leu-radio.js +1 -1
  67. package/dist/leu-range.js +3 -1
  68. package/dist/leu-scroll-top.js +2 -1
  69. package/dist/leu-select.js +1 -1
  70. package/dist/leu-spinner.js +1 -1
  71. package/dist/leu-table.js +1 -1
  72. package/dist/leu-tag.js +1 -1
  73. package/dist/leu-visually-hidden.js +1 -1
  74. package/dist/lib/utils.d.ts +10 -3
  75. package/dist/lib/utils.d.ts.map +1 -1
  76. package/dist/theme.css +1 -0
  77. package/dist/utils-DBGsNSJW.js +33 -0
  78. package/dist/vscode.html-custom-data.json +38 -34
  79. package/dist/vue/index.d.ts +51 -44
  80. package/dist/web-types.json +86 -80
  81. package/package.json +2 -3
  82. package/src/components/range/Range.ts +160 -87
  83. package/src/components/range/stories/range.stories.ts +3 -0
  84. package/src/components/range/test/range.test.ts +59 -0
  85. package/src/components/scroll-top/scroll-top.css +20 -4
  86. package/src/lib/utils.ts +13 -3
  87. package/src/styles/theme.css +1 -0
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
5
  import './Chip.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
  import './Icon.js';
8
8
 
9
9
  LeuChipRemovable.define("leu-chip-removable");
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
5
  import './Chip.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
 
8
8
  LeuChipSelectable.define("leu-chip-selectable");
9
9
 
@@ -4,7 +4,7 @@ import 'lit';
4
4
  import 'lit/directives/ref.js';
5
5
  import 'lit/directives/class-map.js';
6
6
  import 'lit/decorators.js';
7
- import './LeuElement-BfbOWTGZ.js';
7
+ import './LeuElement-BfXSO7MN.js';
8
8
  import './hasSlotController-Bm2tipvG.js';
9
9
  import './Icon.js';
10
10
 
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/ref.js';
5
5
  import 'lit/decorators.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
  import './hasSlotController-Bm2tipvG.js';
8
8
  import './Button.js';
9
9
  import 'lit/directives/class-map.js';
@@ -4,7 +4,7 @@ import 'lit';
4
4
  import 'lit/decorators.js';
5
5
  import 'lit/directives/if-defined.js';
6
6
  import 'lit/directives/class-map.js';
7
- import './LeuElement-BfbOWTGZ.js';
7
+ import './LeuElement-BfXSO7MN.js';
8
8
  import './Button.js';
9
9
  import './Icon.js';
10
10
  import './hasSlotController-Bm2tipvG.js';
package/dist/leu-icon.js CHANGED
@@ -2,7 +2,7 @@ import { LeuIcon } from './Icon.js';
2
2
  import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
- import './LeuElement-BfbOWTGZ.js';
5
+ import './LeuElement-BfXSO7MN.js';
6
6
 
7
7
  LeuIcon.define("leu-icon");
8
8
 
package/dist/leu-input.js CHANGED
@@ -6,7 +6,7 @@ import 'lit/directives/if-defined.js';
6
6
  import 'lit/directives/live.js';
7
7
  import 'lit/directives/ref.js';
8
8
  import 'lit/decorators.js';
9
- import './LeuElement-BfbOWTGZ.js';
9
+ import './LeuElement-BfXSO7MN.js';
10
10
  import './Icon.js';
11
11
 
12
12
  LeuInput.define("leu-input");
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/if-defined.js';
5
5
  import 'lit/decorators.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
  import './Icon.js';
8
8
 
9
9
  LeuMenuItem.define("leu-menu-item");
package/dist/leu-menu.js CHANGED
@@ -2,7 +2,7 @@ import { LeuMenu } from './Menu.js';
2
2
  import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
- import './LeuElement-BfbOWTGZ.js';
5
+ import './LeuElement-BfXSO7MN.js';
6
6
  import './MenuItem.js';
7
7
  import 'lit/directives/if-defined.js';
8
8
  import './Icon.js';
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
5
  import 'lit/directives/class-map.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
  import './Icon.js';
8
8
  import './hasSlotController-Bm2tipvG.js';
9
9
 
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/live.js';
5
5
  import 'lit/decorators.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
  import './Button.js';
8
8
  import 'lit/directives/class-map.js';
9
9
  import 'lit/directives/if-defined.js';
@@ -1,6 +1,6 @@
1
1
  import { LeuPlaceholder } from './Placeholder.js';
2
2
  import 'lit';
3
- import './LeuElement-BfbOWTGZ.js';
3
+ import './LeuElement-BfXSO7MN.js';
4
4
 
5
5
  LeuPlaceholder.define("leu-placeholder");
6
6
 
package/dist/leu-popup.js CHANGED
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
5
  import '@floating-ui/dom';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
 
8
8
  LeuPopup.define("leu-popup");
9
9
 
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/if-defined.js';
5
5
  import 'lit/decorators.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
 
8
8
  LeuProgressBar.define("leu-progress-bar");
9
9
 
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
5
  import 'lit/decorators.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
  import './Radio.js';
8
8
 
9
9
  LeuRadioGroup.define("leu-radio-group");
package/dist/leu-radio.js CHANGED
@@ -2,7 +2,7 @@ import { LeuRadio } from './Radio.js';
2
2
  import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
- import './LeuElement-BfbOWTGZ.js';
5
+ import './LeuElement-BfXSO7MN.js';
6
6
 
7
7
  LeuRadio.define("leu-radio");
8
8
 
package/dist/leu-range.js CHANGED
@@ -2,7 +2,9 @@ import { LeuRange } from './Range.js';
2
2
  import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
- import './LeuElement-BfbOWTGZ.js';
5
+ import 'lit/directives/if-defined.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
+ import './utils-DBGsNSJW.js';
6
8
 
7
9
  LeuRange.define("leu-range");
8
10
 
@@ -3,11 +3,12 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
5
  import 'lit/decorators.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
  import './Button.js';
8
8
  import 'lit/directives/if-defined.js';
9
9
  import './Icon.js';
10
10
  import './hasSlotController-Bm2tipvG.js';
11
+ import './utils-DBGsNSJW.js';
11
12
 
12
13
  LeuScrollTop.define("leu-scroll-top");
13
14
 
@@ -3,7 +3,7 @@ import 'lit';
3
3
  import 'lit/directives/class-map.js';
4
4
  import 'lit/directives/ref.js';
5
5
  import 'lit/directives/if-defined.js';
6
- import './LeuElement-BfbOWTGZ.js';
6
+ import './LeuElement-BfXSO7MN.js';
7
7
  import './hasSlotController-Bm2tipvG.js';
8
8
  import './Button.js';
9
9
  import './_tslib-CNEFicEt.js';
@@ -1,6 +1,6 @@
1
1
  import { LeuSpinner } from './Spinner.js';
2
2
  import 'lit';
3
- import './LeuElement-BfbOWTGZ.js';
3
+ import './LeuElement-BfXSO7MN.js';
4
4
 
5
5
  LeuSpinner.define("leu-spinner");
6
6
 
package/dist/leu-table.js CHANGED
@@ -2,7 +2,7 @@ import { LeuTable } from './Table.js';
2
2
  import 'lit';
3
3
  import 'lit/directives/class-map.js';
4
4
  import 'lit/directives/ref.js';
5
- import './LeuElement-BfbOWTGZ.js';
5
+ import './LeuElement-BfXSO7MN.js';
6
6
  import 'lit/directive.js';
7
7
  import './Icon.js';
8
8
  import './_tslib-CNEFicEt.js';
package/dist/leu-tag.js CHANGED
@@ -2,7 +2,7 @@ import { LeuTag } from './Tag.js';
2
2
  import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
- import './LeuElement-BfbOWTGZ.js';
5
+ import './LeuElement-BfXSO7MN.js';
6
6
 
7
7
  LeuTag.define("leu-tag");
8
8
 
@@ -1,6 +1,6 @@
1
1
  import { LeuVisuallyHidden } from './VisuallyHidden.js';
2
2
  import 'lit';
3
- import './LeuElement-BfbOWTGZ.js';
3
+ import './LeuElement-BfXSO7MN.js';
4
4
 
5
5
  LeuVisuallyHidden.define("leu-visually-hidden");
6
6
 
@@ -4,13 +4,20 @@
4
4
  * @param {Number} timeout - Default is 500 ms
5
5
  * @returns {Function} - Your function wrapped in a timeout function
6
6
  */
7
- declare const debounce: (func: any, timeout?: number) => (...args: any[]) => void;
7
+ export declare const debounce: (func: any, timeout?: number) => (...args: any[]) => void;
8
8
  /**
9
9
  * Return a throttled function that only invokes func at most once per every wait milliseconds.
10
10
  * @param {Function} func - Your function
11
11
  * @param {Number} timeout - Default is 500 ms
12
12
  * @returns {Function} - Your function wrapped in a timeout function
13
13
  */
14
- declare const throttle: (func: any, timeout?: number) => (...args: any[]) => void;
15
- export { debounce, throttle };
14
+ export declare const throttle: (func: any, timeout?: number) => (...args: any[]) => void;
15
+ /**
16
+ * Clamp a number between a minimum and maximum value.
17
+ */
18
+ export declare const clamp: (value: number, min: number, max: number) => number;
19
+ /**
20
+ * Check if a value is a finite number.
21
+ */
22
+ export declare const isNumber: (value: unknown) => value is number;
16
23
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,QAAA,MAAM,QAAQ,2DAQb,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,QAAQ,2DAUb,CAAA;AAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,2DAQpB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,2DAUpB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,WACxB,CAAA;AAErC;;GAEG;AACH,eAAO,MAAM,QAAQ,UAAW,OAAO,KAAG,KAAK,IAAI,MACE,CAAA"}
package/dist/theme.css CHANGED
@@ -55,6 +55,7 @@
55
55
  --leu-box-shadow-long: 0px 0px 80px var(--leu-color-black-transp-20);
56
56
 
57
57
  --leu-z-index-popup: 100;
58
+ --leu-z-index-scroll-top: 1099;
58
59
 
59
60
  --leu-t-tiny-regular-font-size: 0.75rem;
60
61
 
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Return a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked.
3
+ * @param {Function} func - Your function
4
+ * @param {Number} timeout - Default is 500 ms
5
+ * @returns {Function} - Your function wrapped in a timeout function
6
+ */
7
+ /**
8
+ * Return a throttled function that only invokes func at most once per every wait milliseconds.
9
+ * @param {Function} func - Your function
10
+ * @param {Number} timeout - Default is 500 ms
11
+ * @returns {Function} - Your function wrapped in a timeout function
12
+ */
13
+ const throttle = function throttle(func, timeout = 500) {
14
+ let timer = null;
15
+ return (...args) => {
16
+ if (timer === null) {
17
+ func(...args);
18
+ timer = setTimeout(() => {
19
+ timer = null;
20
+ }, timeout);
21
+ }
22
+ };
23
+ };
24
+ /**
25
+ * Clamp a number between a minimum and maximum value.
26
+ */
27
+ const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
28
+ /**
29
+ * Check if a value is a finite number.
30
+ */
31
+ const isNumber = (value) => typeof value === "number" && Number.isFinite(value);
32
+
33
+ export { clamp as c, isNumber as i, throttle as t };
@@ -120,6 +120,23 @@
120
120
  }
121
121
  ]
122
122
  },
123
+ {
124
+ "name": "leu-chart-wrapper",
125
+ "description": "A wrapper element for charts.\n---\n\n\n### **Slots:**\n - **title** - The title of the chart. Use a heading tag (h2-4) depending on your context.\n- **description** - A description of the chart. Content is wrapped in a `<p>` tag by the component.\n- **chart** - The actual chart\n- **caption** - A caption for the chart, e.g. a source or explanation of the data.\n- **download** - A download button or dropdown to export the chart in different formats.",
126
+ "attributes": [
127
+ {
128
+ "name": "pending",
129
+ "description": "Whether the chart is currently loading or not.\nWhen set to `true`, a spinner will be shown in the chart container.",
130
+ "values": []
131
+ }
132
+ ],
133
+ "references": [
134
+ {
135
+ "name": "Documentation",
136
+ "url": "https://statistikzh.github.io/leu/?path=/story/chart-wrapper"
137
+ }
138
+ ]
139
+ },
123
140
  {
124
141
  "name": "leu-checkbox",
125
142
  "description": "\n---\n",
@@ -158,23 +175,6 @@
158
175
  }
159
176
  ]
160
177
  },
161
- {
162
- "name": "leu-chart-wrapper",
163
- "description": "A wrapper element for charts.\n---\n\n\n### **Slots:**\n - **title** - The title of the chart. Use a heading tag (h2-4) depending on your context.\n- **description** - A description of the chart. Content is wrapped in a `<p>` tag by the component.\n- **chart** - The actual chart\n- **caption** - A caption for the chart, e.g. a source or explanation of the data.\n- **download** - A download button or dropdown to export the chart in different formats.",
164
- "attributes": [
165
- {
166
- "name": "pending",
167
- "description": "Whether the chart is currently loading or not.\nWhen set to `true`, a spinner will be shown in the chart container.",
168
- "values": []
169
- }
170
- ],
171
- "references": [
172
- {
173
- "name": "Documentation",
174
- "url": "https://statistikzh.github.io/leu/?path=/story/chart-wrapper"
175
- }
176
- ]
177
- },
178
178
  {
179
179
  "name": "leu-chip-group",
180
180
  "description": "\n---\n\n\n### **Slots:**\n - _default_ - Place leu-chip-* elements inside this slot\n\n### **CSS Properties:**\n - **--leu-chip-group-gap** - The gap between the chips _(default: undefined)_",
@@ -272,6 +272,21 @@
272
272
  }
273
273
  ]
274
274
  },
275
+ {
276
+ "name": "leu-dialog",
277
+ "description": "\n---\n",
278
+ "attributes": [
279
+ { "name": "label", "values": [] },
280
+ { "name": "sublabel", "values": [] },
281
+ { "name": "open", "values": [] }
282
+ ],
283
+ "references": [
284
+ {
285
+ "name": "Documentation",
286
+ "url": "https://statistikzh.github.io/leu/?path=/story/dialog"
287
+ }
288
+ ]
289
+ },
275
290
  {
276
291
  "name": "leu-dropdown",
277
292
  "description": "\n---\n",
@@ -454,21 +469,6 @@
454
469
  }
455
470
  ]
456
471
  },
457
- {
458
- "name": "leu-dialog",
459
- "description": "\n---\n",
460
- "attributes": [
461
- { "name": "label", "values": [] },
462
- { "name": "sublabel", "values": [] },
463
- { "name": "open", "values": [] }
464
- ],
465
- "references": [
466
- {
467
- "name": "Documentation",
468
- "url": "https://statistikzh.github.io/leu/?path=/story/dialog"
469
- }
470
- ]
471
- },
472
472
  {
473
473
  "name": "leu-menu",
474
474
  "description": "\n---\n",
@@ -725,9 +725,13 @@
725
725
  },
726
726
  {
727
727
  "name": "leu-range",
728
- "description": "\n---\n\n\n### **Methods:**\n ",
728
+ "description": "\n---\n\n\n### **Events:**\n - **input**\n\n### **Methods:**\n ",
729
729
  "attributes": [
730
- { "name": "value", "values": [{ "name": "array" }] },
730
+ {
731
+ "name": "value",
732
+ "description": "The default value of the range slider.\nString input is parsed as a comma-separated list of numbers.",
733
+ "values": [{ "name": "array" }]
734
+ },
731
735
  {
732
736
  "name": "min",
733
737
  "description": "The minimum value of the range slider.",
@@ -3,18 +3,18 @@ import type { DefineComponent } from "vue";
3
3
  import type { LeuAccordion } from "../Accordion.js";
4
4
  import type { LeuButton } from "../Button.js";
5
5
  import type { LeuButtonGroup } from "../ButtonGroup.js";
6
+ import type { LeuChartWrapper } from "../ChartWrapper.js";
6
7
  import type { LeuCheckbox } from "../Checkbox.js";
7
8
  import type { LeuCheckboxGroup } from "../CheckboxGroup.js";
8
- import type { LeuChartWrapper } from "../ChartWrapper.js";
9
9
  import type { LeuChipGroup } from "../ChipGroup.js";
10
10
  import type { LeuChipLink } from "../ChipLink.js";
11
11
  import type { LeuChipRemovable } from "../ChipRemovable.js";
12
12
  import type { LeuChipSelectable, CustomEvent } from "../ChipSelectable.js";
13
+ import type { LeuDialog } from "../Dialog.js";
13
14
  import type { LeuDropdown } from "../Dropdown.js";
14
15
  import type { LeuFileInput, CustomEvent } from "../FileInput.js";
15
16
  import type { LeuIcon } from "../Icon.js";
16
17
  import type { LeuInput, CustomEvent } from "../Input.js";
17
- import type { LeuDialog } from "../Dialog.js";
18
18
  import type { LeuMenu } from "../Menu.js";
19
19
  import type { LeuMenuItem } from "../MenuItem.js";
20
20
  import type { LeuMessage, CustomEvent } from "../Message.js";
@@ -24,7 +24,7 @@ import type { LeuPopup } from "../Popup.js";
24
24
  import type { LeuProgressBar } from "../ProgressBar.js";
25
25
  import type { LeuRadio } from "../Radio.js";
26
26
  import type { LeuRadioGroup } from "../RadioGroup.js";
27
- import type { LeuRange } from "../Range.js";
27
+ import type { LeuRange, CustomEvent } from "../Range.js";
28
28
  import type { LeuScrollTop } from "../ScrollTop.js";
29
29
  import type { LeuSelect } from "../Select.js";
30
30
  import type { LeuSpinner } from "../Spinner.js";
@@ -81,6 +81,14 @@ type LeuButtonGroupProps = {
81
81
  oninput?: (e: CustomEvent<never>) => void;
82
82
  };
83
83
 
84
+ type LeuChartWrapperProps = {
85
+ /** Whether the chart is currently loading or not.
86
+ When set to `true`, a spinner will be shown in the chart container. */
87
+ pending?: LeuChartWrapper["pending"];
88
+ /** */
89
+ hasSlotController?: LeuChartWrapper["hasSlotController"];
90
+ };
91
+
84
92
  type LeuCheckboxProps = {
85
93
  /** */
86
94
  checked?: LeuCheckbox["checked"];
@@ -101,14 +109,6 @@ type LeuCheckboxGroupProps = {
101
109
  value?: LeuCheckboxGroup["value"];
102
110
  };
103
111
 
104
- type LeuChartWrapperProps = {
105
- /** Whether the chart is currently loading or not.
106
- When set to `true`, a spinner will be shown in the chart container. */
107
- pending?: LeuChartWrapper["pending"];
108
- /** */
109
- hasSlotController?: LeuChartWrapper["hasSlotController"];
110
- };
111
-
112
112
  type LeuChipGroupProps = {
113
113
  /** */
114
114
  inverted?: LeuChipGroup["inverted"];
@@ -158,6 +158,15 @@ type LeuChipSelectableProps = {
158
158
  oninput?: (e: CustomEvent<CustomEvent>) => void;
159
159
  };
160
160
 
161
+ type LeuDialogProps = {
162
+ /** */
163
+ label?: LeuDialog["label"];
164
+ /** */
165
+ sublabel?: LeuDialog["sublabel"];
166
+ /** */
167
+ open?: LeuDialog["open"];
168
+ };
169
+
161
170
  type LeuDropdownProps = {
162
171
  /** */
163
172
  label?: LeuDropdown["label"];
@@ -250,15 +259,6 @@ type LeuInputProps = {
250
259
  onchange?: (e: CustomEvent<CustomEvent>) => void;
251
260
  };
252
261
 
253
- type LeuDialogProps = {
254
- /** */
255
- label?: LeuDialog["label"];
256
- /** */
257
- sublabel?: LeuDialog["sublabel"];
258
- /** */
259
- open?: LeuDialog["open"];
260
- };
261
-
262
262
  type LeuMenuProps = {
263
263
  /** This has only an effect when the role is 'menu'. It defines which role the menu items will get. Default is 'none'. */
264
264
  selects?: LeuMenu["selects"];
@@ -377,7 +377,8 @@ type LeuRadioGroupProps = {
377
377
  };
378
378
 
379
379
  type LeuRangeProps = {
380
- /** */
380
+ /** The default value of the range slider.
381
+ String input is parsed as a comma-separated list of numbers. */
381
382
  value?: LeuRange["defaultValue"];
382
383
  /** The minimum value of the range slider. */
383
384
  min?: LeuRange["min"];
@@ -411,9 +412,10 @@ Is ignored if a custom valueFormatter is provided. */
411
412
  /** A custom function to format the value displayed in the output element(s).
412
413
  If provided, the prefix and suffix properties will be ignored. */
413
414
  valueFormatter?: LeuRange["valueFormatter"];
414
- /** Sets the value of the underlying input element(s).
415
- The value has to be an array if "multiple" range is used.
416
- Otherwise it has to be a string. */
415
+ /** The value of the range slider.
416
+ String input is parsed as a comma-separated list of numbers.
417
+ In multiple mode, if only a single value is provided, the second handle will be set to the minimum value.
418
+ In single mode, only the first value will be used. */
417
419
  value?: LeuRange["value"];
418
420
  /** */
419
421
  valueAsArray?: LeuRange["valueAsArray"];
@@ -421,6 +423,8 @@ Otherwise it has to be a string. */
421
423
  valueLow?: LeuRange["valueLow"];
422
424
  /** */
423
425
  valueHigh?: LeuRange["valueHigh"];
426
+ /** */
427
+ oninput?: (e: CustomEvent<CustomEvent>) => void;
424
428
  };
425
429
 
426
430
  type LeuScrollTopProps = {
@@ -537,35 +541,35 @@ export type CustomElements = {
537
541
  "leu-button-group": DefineComponent<LeuButtonGroupProps>;
538
542
 
539
543
  /**
540
- *
544
+ * A wrapper element for charts.
541
545
  * ---
542
546
  *
547
+ *
548
+ * ### **Slots:**
549
+ * - **title** - The title of the chart. Use a heading tag (h2-4) depending on your context.
550
+ * - **description** - A description of the chart. Content is wrapped in a `<p>` tag by the component.
551
+ * - **chart** - The actual chart
552
+ * - **caption** - A caption for the chart, e.g. a source or explanation of the data.
553
+ * - **download** - A download button or dropdown to export the chart in different formats.
543
554
  */
544
- "leu-checkbox": DefineComponent<LeuCheckboxProps>;
555
+ "leu-chart-wrapper": DefineComponent<LeuChartWrapperProps>;
545
556
 
546
557
  /**
547
558
  *
548
559
  * ---
549
560
  *
550
- *
551
- * ### **Slots:**
552
- * - _default_ - Place the checkboxes inside the default slot.
553
561
  */
554
- "leu-checkbox-group": DefineComponent<LeuCheckboxGroupProps>;
562
+ "leu-checkbox": DefineComponent<LeuCheckboxProps>;
555
563
 
556
564
  /**
557
- * A wrapper element for charts.
565
+ *
558
566
  * ---
559
567
  *
560
568
  *
561
569
  * ### **Slots:**
562
- * - **title** - The title of the chart. Use a heading tag (h2-4) depending on your context.
563
- * - **description** - A description of the chart. Content is wrapped in a `<p>` tag by the component.
564
- * - **chart** - The actual chart
565
- * - **caption** - A caption for the chart, e.g. a source or explanation of the data.
566
- * - **download** - A download button or dropdown to export the chart in different formats.
570
+ * - _default_ - Place the checkboxes inside the default slot.
567
571
  */
568
- "leu-chart-wrapper": DefineComponent<LeuChartWrapperProps>;
572
+ "leu-checkbox-group": DefineComponent<LeuCheckboxGroupProps>;
569
573
 
570
574
  /**
571
575
  *
@@ -622,6 +626,13 @@ export type CustomElements = {
622
626
  */
623
627
  "leu-chip-selectable": DefineComponent<LeuChipSelectableProps>;
624
628
 
629
+ /**
630
+ *
631
+ * ---
632
+ *
633
+ */
634
+ "leu-dialog": DefineComponent<LeuDialogProps>;
635
+
625
636
  /**
626
637
  *
627
638
  * ---
@@ -676,13 +687,6 @@ export type CustomElements = {
676
687
  */
677
688
  "leu-input": DefineComponent<LeuInputProps>;
678
689
 
679
- /**
680
- *
681
- * ---
682
- *
683
- */
684
- "leu-dialog": DefineComponent<LeuDialogProps>;
685
-
686
690
  /**
687
691
  *
688
692
  * ---
@@ -778,6 +782,9 @@ export type CustomElements = {
778
782
  * ---
779
783
  *
780
784
  *
785
+ * ### **Events:**
786
+ * - **input**
787
+ *
781
788
  * ### **Methods:**
782
789
  *
783
790
  */