@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@statistikzh/leu",
4
- "version": "0.21.1",
4
+ "version": "0.22.1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -211,6 +211,79 @@
211
211
  "events": []
212
212
  }
213
213
  },
214
+ {
215
+ "name": "leu-checkbox",
216
+ "description": "\n---\n",
217
+ "doc-url": "",
218
+ "attributes": [
219
+ {
220
+ "name": "checked",
221
+ "value": { "type": "boolean", "default": "false" }
222
+ },
223
+ {
224
+ "name": "disabled",
225
+ "value": { "type": "boolean", "default": "false" }
226
+ },
227
+ {
228
+ "name": "value",
229
+ "value": { "type": "string", "default": "\"\"" }
230
+ },
231
+ { "name": "name", "value": { "type": "string", "default": "\"\"" } }
232
+ ],
233
+ "events": [],
234
+ "js": {
235
+ "properties": [
236
+ { "name": "checked", "type": "boolean" },
237
+ { "name": "disabled", "type": "boolean" },
238
+ { "name": "value", "type": "string" },
239
+ { "name": "name", "type": "string" }
240
+ ],
241
+ "events": []
242
+ }
243
+ },
244
+ {
245
+ "name": "leu-checkbox-group",
246
+ "description": "\n---\n\n\n### **Slots:**\n - _default_ - Place the checkboxes inside the default slot.",
247
+ "doc-url": "",
248
+ "attributes": [
249
+ {
250
+ "name": "orientation",
251
+ "description": "Defines how the checkboxes should be aligned.",
252
+ "value": {
253
+ "type": "\"horizontal\" | \"vertical\"",
254
+ "default": "\"horizontal\""
255
+ }
256
+ },
257
+ {
258
+ "name": "label",
259
+ "description": "The label of the checkbox group",
260
+ "value": { "type": "string | undefined" }
261
+ }
262
+ ],
263
+ "slots": [
264
+ {
265
+ "name": "",
266
+ "description": "Place the checkboxes inside the default slot."
267
+ }
268
+ ],
269
+ "events": [],
270
+ "js": {
271
+ "properties": [
272
+ {
273
+ "name": "orientation",
274
+ "description": "Defines how the checkboxes should be aligned.",
275
+ "type": "\"horizontal\" | \"vertical\""
276
+ },
277
+ {
278
+ "name": "label",
279
+ "description": "The label of the checkbox group",
280
+ "type": "string | undefined"
281
+ },
282
+ { "name": "value" }
283
+ ],
284
+ "events": []
285
+ }
286
+ },
214
287
  {
215
288
  "name": "leu-button-group",
216
289
  "description": "A radio input-like button group component.\nIt allows only one button to be active at a time.\n---\n\n\n### **Events:**\n - **input** - When the value of the group changes by clicking a button\n\n### **Slots:**\n - _default_ - Slot for the buttons",
@@ -282,76 +355,140 @@
282
355
  }
283
356
  },
284
357
  {
285
- "name": "leu-checkbox",
358
+ "name": "leu-dropdown",
286
359
  "description": "\n---\n",
287
360
  "doc-url": "",
288
361
  "attributes": [
289
362
  {
290
- "name": "checked",
363
+ "name": "label",
364
+ "value": { "type": "string", "default": "\"\"" }
365
+ },
366
+ {
367
+ "name": "expanded",
291
368
  "value": { "type": "boolean", "default": "false" }
292
369
  },
293
370
  {
294
- "name": "disabled",
371
+ "name": "inverted",
295
372
  "value": { "type": "boolean", "default": "false" }
373
+ }
374
+ ],
375
+ "events": [],
376
+ "js": {
377
+ "properties": [
378
+ { "name": "label", "type": "string" },
379
+ { "name": "expanded", "type": "boolean" },
380
+ { "name": "inverted", "type": "boolean" }
381
+ ],
382
+ "events": []
383
+ }
384
+ },
385
+ {
386
+ "name": "leu-dialog",
387
+ "description": "\n---\n",
388
+ "doc-url": "",
389
+ "attributes": [
390
+ {
391
+ "name": "label",
392
+ "value": { "type": "string", "default": "\"\"" }
296
393
  },
297
394
  {
298
- "name": "value",
395
+ "name": "sublabel",
299
396
  "value": { "type": "string", "default": "\"\"" }
300
397
  },
301
- { "name": "name", "value": { "type": "string", "default": "\"\"" } }
398
+ {
399
+ "name": "open",
400
+ "value": { "type": "boolean", "default": "false" }
401
+ }
302
402
  ],
303
403
  "events": [],
304
404
  "js": {
305
405
  "properties": [
306
- { "name": "checked", "type": "boolean" },
307
- { "name": "disabled", "type": "boolean" },
308
- { "name": "value", "type": "string" },
309
- { "name": "name", "type": "string" }
406
+ { "name": "label", "type": "string" },
407
+ { "name": "sublabel", "type": "string" },
408
+ { "name": "open", "type": "boolean" }
310
409
  ],
311
410
  "events": []
312
411
  }
313
412
  },
314
413
  {
315
- "name": "leu-checkbox-group",
316
- "description": "\n---\n\n\n### **Slots:**\n - _default_ - Place the checkboxes inside the default slot.",
414
+ "name": "leu-file-input",
415
+ "description": "\n---\n\n\n### **Events:**\n - **input**\n- **change**",
317
416
  "doc-url": "",
318
417
  "attributes": [
319
418
  {
320
- "name": "orientation",
321
- "description": "Defines how the checkboxes should be aligned.",
322
- "value": {
323
- "type": "\"horizontal\" | \"vertical\"",
324
- "default": "\"horizontal\""
325
- }
419
+ "name": "label",
420
+ "value": { "type": "string", "default": "\"\"" }
326
421
  },
327
422
  {
328
- "name": "label",
329
- "description": "The label of the checkbox group",
330
- "value": { "type": "string | undefined" }
331
- }
332
- ],
333
- "slots": [
423
+ "name": "accept",
424
+ "description": "A list of acceptable file types. Must be a comma-separated list of [unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers).",
425
+ "value": { "type": "string", "default": "\"\"" }
426
+ },
334
427
  {
335
- "name": "",
336
- "description": "Place the checkboxes inside the default slot."
428
+ "name": "disabled",
429
+ "description": "Whether the file input is disabled.",
430
+ "value": { "type": "boolean", "default": "false" }
431
+ },
432
+ {
433
+ "name": "multiple",
434
+ "description": "Whether the file input allows multiple files.",
435
+ "value": { "type": "boolean", "default": "false" }
436
+ },
437
+ {
438
+ "name": "required",
439
+ "description": "Whether the file input is required.",
440
+ "value": { "type": "boolean", "default": "false" }
441
+ },
442
+ {
443
+ "name": "variant",
444
+ "description": "The variant of the file list item. `filled` renders a gray background.",
445
+ "value": {
446
+ "type": "\"filled\" | \"transparent\"",
447
+ "default": "\"filled\""
448
+ }
337
449
  }
338
450
  ],
339
- "events": [],
451
+ "events": [
452
+ { "name": "input", "type": "CustomEvent" },
453
+ { "name": "change", "type": "CustomEvent" }
454
+ ],
340
455
  "js": {
341
456
  "properties": [
457
+ { "name": "label", "type": "string" },
342
458
  {
343
- "name": "orientation",
344
- "description": "Defines how the checkboxes should be aligned.",
345
- "type": "\"horizontal\" | \"vertical\""
459
+ "name": "accept",
460
+ "description": "A list of acceptable file types. Must be a comma-separated list of [unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers).",
461
+ "type": "string"
346
462
  },
347
463
  {
348
- "name": "label",
349
- "description": "The label of the checkbox group",
350
- "type": "string | undefined"
464
+ "name": "disabled",
465
+ "description": "Whether the file input is disabled.",
466
+ "type": "boolean"
351
467
  },
352
- { "name": "value" }
468
+ {
469
+ "name": "multiple",
470
+ "description": "Whether the file input allows multiple files.",
471
+ "type": "boolean"
472
+ },
473
+ {
474
+ "name": "required",
475
+ "description": "Whether the file input is required.",
476
+ "type": "boolean"
477
+ },
478
+ {
479
+ "name": "variant",
480
+ "description": "The variant of the file list item. `filled` renders a gray background.",
481
+ "type": "\"filled\" | \"transparent\""
482
+ },
483
+ { "name": "files", "type": "File[]" },
484
+ { "name": "input", "type": "HTMLInputElement" },
485
+ { "name": "form" },
486
+ { "name": "name" }
353
487
  ],
354
- "events": []
488
+ "events": [
489
+ { "name": "input", "type": "CustomEvent" },
490
+ { "name": "change", "type": "CustomEvent" }
491
+ ]
355
492
  }
356
493
  },
357
494
  {
@@ -365,7 +502,10 @@
365
502
  },
366
503
  {
367
504
  "name": "selection-mode",
368
- "value": { "type": "\"single\" | \"multiple\" | \"none\"" }
505
+ "value": {
506
+ "type": "\"single\" | \"multiple\" | \"none\"",
507
+ "default": "\"none\""
508
+ }
369
509
  },
370
510
  {
371
511
  "name": "heading-level",
@@ -385,16 +525,16 @@
385
525
  "events": [],
386
526
  "js": {
387
527
  "properties": [
528
+ { "name": "inverted", "type": "boolean" },
388
529
  {
389
- "name": "value",
390
- "description": "Checks the items with the given values.\nIf the selectionMode is single, only the first item with the given value is checked."
530
+ "name": "selectionMode",
531
+ "type": "\"single\" | \"multiple\" | \"none\""
391
532
  },
392
- { "name": "inverted", "type": "boolean" },
393
533
  { "name": "headingLevel", "type": "number" },
394
534
  { "name": "label", "type": "string" },
395
535
  {
396
- "name": "selectionMode",
397
- "type": "\"single\" | \"multiple\" | \"none\""
536
+ "name": "value",
537
+ "description": "Checks the items with the given values.\nIf the selectionMode is single, only the first item with the given value is checked."
398
538
  }
399
539
  ],
400
540
  "events": []
@@ -408,10 +548,14 @@
408
548
  {
409
549
  "name": "size",
410
550
  "description": "The size of the chip",
411
- "value": { "type": "keyof typeof SIZES" }
551
+ "value": {
552
+ "type": "\"regular\" | \"large\"",
553
+ "default": "\"regular\""
554
+ }
412
555
  },
413
556
  {
414
557
  "name": "href",
558
+ "description": "The URL that the chip links to",
415
559
  "value": { "type": "string", "default": "\"\"" }
416
560
  },
417
561
  {
@@ -423,20 +567,24 @@
423
567
  "events": [],
424
568
  "js": {
425
569
  "properties": [
426
- { "name": "inverted", "type": "boolean" },
427
570
  {
428
571
  "name": "size",
429
572
  "description": "The size of the chip",
430
- "type": "keyof typeof SIZES"
573
+ "type": "\"regular\" | \"large\""
574
+ },
575
+ {
576
+ "name": "href",
577
+ "description": "The URL that the chip links to",
578
+ "type": "string"
431
579
  },
432
- { "name": "href", "type": "string" }
580
+ { "name": "inverted", "type": "boolean" }
433
581
  ],
434
582
  "events": []
435
583
  }
436
584
  },
437
585
  {
438
586
  "name": "leu-chip-removable",
439
- "description": "\n---\n\n\n### **Events:**\n - **remove** - Dispatched when the user clicks on the chip\n\n### **Methods:**\n - **getValue(): _string_** - Returns the value of the chip. If `value` is not set, it will return the text content\n\n### **Slots:**\n - _default_ - The content of the chip",
587
+ "description": "\n---\n\n\n### **Events:**\n - **remove** - Dispatched when the user clicks on the chip\n\n### **Methods:**\n - **getValue()** - Returns the value of the chip. If `value` is not set, it will return the text content\n\n### **Slots:**\n - _default_ - The content of the chip",
440
588
  "doc-url": "",
441
589
  "attributes": [
442
590
  {
@@ -480,25 +628,28 @@
480
628
  "attributes": [
481
629
  {
482
630
  "name": "size",
483
- "description": "The size of the chip. Not supported for radio variant.",
484
- "value": { "type": "keyof typeof SIZES" }
631
+ "description": "The size of the chip. Has no effect when variant is \"radio\"",
632
+ "value": {
633
+ "type": "\"small\" | \"regular\"",
634
+ "default": "\"regular\""
635
+ }
485
636
  },
486
637
  {
487
638
  "name": "variant",
488
- "description": "`toggle` or `radio`. Determines if only one or multiple chips can be selected.",
639
+ "description": "The variant of the chip. Determines if only one or multiple chips can be selected.",
489
640
  "value": {
490
- "type": "keyof typeof VARIANTS",
641
+ "type": "\"toggle\" | \"radio\"",
491
642
  "default": "\"toggle\""
492
643
  }
493
644
  },
494
645
  {
495
646
  "name": "checked",
496
- "description": "Whether the chip is selected.",
647
+ "description": "Whether the chip is selected",
497
648
  "value": { "type": "boolean", "default": "false" }
498
649
  },
499
650
  {
500
651
  "name": "value",
501
- "description": "The value of the chip.",
652
+ "description": "The value of the chip",
502
653
  "value": { "type": "string", "default": "\"\"" }
503
654
  },
504
655
  {
@@ -512,22 +663,22 @@
512
663
  "properties": [
513
664
  {
514
665
  "name": "size",
515
- "description": "The size of the chip. Not supported for radio variant.",
516
- "type": "keyof typeof SIZES"
666
+ "description": "The size of the chip. Has no effect when variant is \"radio\"",
667
+ "type": "\"small\" | \"regular\""
517
668
  },
518
669
  {
519
670
  "name": "variant",
520
- "description": "The variant of the chip. Has an effect not only on the visual appearance but also on the behavior.\n- `toggle`: The chip behaves like a toggle button.\n- `radio`: The chip behaves like a radio button.",
521
- "type": "keyof typeof VARIANTS"
671
+ "description": "The variant of the chip. Determines if only one or multiple chips can be selected.",
672
+ "type": "\"toggle\" | \"radio\""
522
673
  },
523
674
  {
524
675
  "name": "checked",
525
- "description": "Whether the chip is selected.",
676
+ "description": "Whether the chip is selected",
526
677
  "type": "boolean"
527
678
  },
528
679
  {
529
680
  "name": "value",
530
- "description": "The value of the chip.",
681
+ "description": "The value of the chip",
531
682
  "type": "string"
532
683
  },
533
684
  { "name": "inverted", "type": "boolean" }
@@ -535,147 +686,6 @@
535
686
  "events": [{ "name": "input", "type": "CustomEvent" }]
536
687
  }
537
688
  },
538
- {
539
- "name": "leu-dialog",
540
- "description": "\n---\n",
541
- "doc-url": "",
542
- "attributes": [
543
- {
544
- "name": "label",
545
- "value": { "type": "string", "default": "\"\"" }
546
- },
547
- {
548
- "name": "sublabel",
549
- "value": { "type": "string", "default": "\"\"" }
550
- },
551
- {
552
- "name": "open",
553
- "value": { "type": "boolean", "default": "false" }
554
- }
555
- ],
556
- "events": [],
557
- "js": {
558
- "properties": [
559
- { "name": "_dialogRef", "type": "Ref<HTMLDialogElement>" },
560
- { "name": "label", "type": "string" },
561
- { "name": "sublabel", "type": "string" },
562
- { "name": "open", "type": "boolean" }
563
- ],
564
- "events": []
565
- }
566
- },
567
- {
568
- "name": "leu-dropdown",
569
- "description": "\n---\n",
570
- "doc-url": "",
571
- "attributes": [
572
- {
573
- "name": "label",
574
- "value": { "type": "string", "default": "\"\"" }
575
- },
576
- {
577
- "name": "expanded",
578
- "value": { "type": "boolean", "default": "false" }
579
- }
580
- ],
581
- "events": [],
582
- "js": {
583
- "properties": [
584
- { "name": "hasSlotController" },
585
- { "name": "_documentClickHandler" },
586
- { "name": "_menuItemClickHandler" },
587
- {
588
- "name": "_keyDownMenuHandler",
589
- "description": "Close the dropdown when the user presses the Escape or the Tab key.\nNavigating the menu with the arrow keys is handled by the menu itself."
590
- },
591
- { "name": "label", "type": "string" },
592
- { "name": "expanded", "type": "boolean" },
593
- { "name": "_toggleRef", "type": "Ref<HTMLButtonElement>" }
594
- ],
595
- "events": []
596
- }
597
- },
598
- {
599
- "name": "leu-file-input",
600
- "description": "\n---\n\n\n### **Events:**\n - **input**\n- **change**",
601
- "doc-url": "",
602
- "attributes": [
603
- {
604
- "name": "label",
605
- "value": { "type": "string", "default": "\"\"" }
606
- },
607
- {
608
- "name": "accept",
609
- "description": "A list of acceptable file types. Must be a comma-separated list of [unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers).",
610
- "value": { "type": "string", "default": "\"\"" }
611
- },
612
- {
613
- "name": "disabled",
614
- "description": "Whether the file input is disabled.",
615
- "value": { "type": "boolean", "default": "false" }
616
- },
617
- {
618
- "name": "multiple",
619
- "description": "Whether the file input allows multiple files.",
620
- "value": { "type": "boolean", "default": "false" }
621
- },
622
- {
623
- "name": "required",
624
- "description": "Whether the file input is required.",
625
- "value": { "type": "boolean", "default": "false" }
626
- },
627
- {
628
- "name": "variant",
629
- "description": "The variant of the file list item. `filled` renders a gray background.",
630
- "value": {
631
- "type": "\"filled\" | \"transparent\"",
632
- "default": "\"filled\""
633
- }
634
- }
635
- ],
636
- "events": [
637
- { "name": "input", "type": "CustomEvent" },
638
- { "name": "change", "type": "CustomEvent" }
639
- ],
640
- "js": {
641
- "properties": [
642
- { "name": "label", "type": "string" },
643
- {
644
- "name": "accept",
645
- "description": "A list of acceptable file types. Must be a comma-separated list of [unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers).",
646
- "type": "string"
647
- },
648
- {
649
- "name": "disabled",
650
- "description": "Whether the file input is disabled.",
651
- "type": "boolean"
652
- },
653
- {
654
- "name": "multiple",
655
- "description": "Whether the file input allows multiple files.",
656
- "type": "boolean"
657
- },
658
- {
659
- "name": "required",
660
- "description": "Whether the file input is required.",
661
- "type": "boolean"
662
- },
663
- {
664
- "name": "variant",
665
- "description": "The variant of the file list item. `filled` renders a gray background.",
666
- "type": "\"filled\" | \"transparent\""
667
- },
668
- { "name": "files", "type": "File[]" },
669
- { "name": "input", "type": "HTMLInputElement" },
670
- { "name": "form" },
671
- { "name": "name" }
672
- ],
673
- "events": [
674
- { "name": "input", "type": "CustomEvent" },
675
- { "name": "change", "type": "CustomEvent" }
676
- ]
677
- }
678
- },
679
689
  {
680
690
  "name": "leu-icon",
681
691
  "description": "A component to render all defined zhWeb icons.\nThe `fill` of the icon is set to `currentColor` and\ncan be overriden by setting the css `color` property.\nIf the icon name is not found, a placeholder will be displayed.\n---\n\n\n### **CSS Properties:**\n - **--leu-icon-size** - The size of the icon. _(default: undefined)_",
@@ -701,7 +711,7 @@
701
711
  },
702
712
  {
703
713
  "name": "leu-input",
704
- "description": "A text input element.\n---\n\n\n### **Events:**\n - **input** - Dispatched when the value of the input element changes.\n- **change** - Dispatched when the value of the input element changes and the input element loses focus.\n\n### **Methods:**\n - **getValidationMessages(): _Object_** - Merge custom and default validation messages.\nA validation message can be a function or a string.\nIf it s a function, the function is called with the corresponding\nattribute value as argument.\ne.g.\n`tooLong(this.maxlength)`\nThis way the framework user can create reasonable validation messages\n- **checkValidity(): _boolean_** - Check input validation\n- **renderErrorMessages(): _TemplateResult | nothing_** - Creates an error list with an item for the given validity state.",
714
+ "description": "A text input element.\n---\n\n\n### **Events:**\n - **input** - Dispatched when the value of the input element changes.\n- **change** - Dispatched when the value of the input element changes and the input element loses focus.\n\n### **Methods:**\n \n\n\n\n\n\n\n- **checkValidity()** - Check input validation\n\n",
705
715
  "doc-url": "",
706
716
  "attributes": [
707
717
  {
@@ -711,12 +721,12 @@
711
721
  },
712
722
  {
713
723
  "name": "required",
714
- "description": "Marks the input element as required.",
724
+ "description": "Marks the input element as required",
715
725
  "value": { "type": "boolean", "default": "false" }
716
726
  },
717
727
  {
718
728
  "name": "clearable",
719
- "description": "Adds a button to clear the input element.",
729
+ "description": "Adds a button to clear the input element",
720
730
  "value": { "type": "boolean", "default": "false" }
721
731
  },
722
732
  {
@@ -727,21 +737,21 @@
727
737
  {
728
738
  "name": "name",
729
739
  "description": "The name of the input element.",
730
- "value": { "type": "string" }
740
+ "value": { "type": "string", "default": "\"\"" }
731
741
  },
732
742
  {
733
743
  "name": "error",
734
744
  "description": "A custom error that is completely independent of the validity state. Useful for displaying server side errors.",
735
- "value": { "type": "string" }
745
+ "value": { "type": "string", "default": "\"\"" }
736
746
  },
737
747
  {
738
748
  "name": "label",
739
- "description": "The label of the input element.",
740
- "value": { "type": "string" }
749
+ "description": "The label of the input element",
750
+ "value": { "type": "string", "default": "\"\"" }
741
751
  },
742
752
  {
743
753
  "name": "prefix",
744
- "description": "A prefix that relates to the value of the input (e.g. CHF).",
754
+ "description": "A prefix that relates to the value of the input (e.g. CHF)",
745
755
  "value": { "type": "string" }
746
756
  },
747
757
  {
@@ -751,13 +761,16 @@
751
761
  },
752
762
  {
753
763
  "name": "size",
754
- "description": "The size of the input element.",
755
- "value": { "type": "string" }
764
+ "description": "The size of the input element",
765
+ "value": {
766
+ "type": "\"small\" | \"regular\"",
767
+ "default": "\"regular\""
768
+ }
756
769
  },
757
770
  {
758
771
  "name": "icon",
759
- "description": "The icon that is displayed at the end of the input element.",
760
- "value": { "type": "string" }
772
+ "description": "The icon that is displayed at the end of the input element",
773
+ "value": { "type": "IconPathName" }
761
774
  },
762
775
  {
763
776
  "name": "pattern",
@@ -767,46 +780,42 @@
767
780
  {
768
781
  "name": "type",
769
782
  "description": "The type of the input element.",
770
- "value": { "type": "string", "default": "\"text\"" }
783
+ "value": { "type": "InputType", "default": "\"text\"" }
771
784
  },
772
785
  {
773
786
  "name": "min",
774
787
  "description": "The minimum value of the input element.",
775
- "value": { "type": "string" }
788
+ "value": { "type": "number" }
776
789
  },
777
790
  {
778
791
  "name": "max",
779
792
  "description": "The maximum value of the input element.",
780
- "value": { "type": "string" }
793
+ "value": { "type": "number" }
794
+ },
795
+ {
796
+ "name": "step",
797
+ "description": "The step value of the input element.",
798
+ "value": { "type": "number" }
781
799
  },
782
800
  {
783
801
  "name": "maxlength",
784
802
  "description": "The maximum length of the input element.",
785
- "value": { "type": "string" }
803
+ "value": { "type": "number" }
786
804
  },
787
805
  {
788
806
  "name": "minlength",
789
807
  "description": "The minimum length of the input element.",
790
- "value": { "type": "string" }
808
+ "value": { "type": "number" }
791
809
  },
792
810
  {
793
811
  "name": "validationMessages",
794
812
  "description": "Custom validation messages. The key is the name of the validity state and the value is the message.",
795
- "value": { "type": "object", "default": "{}" }
813
+ "value": { "type": "Record<string, string>", "default": "{}" }
796
814
  },
797
815
  {
798
816
  "name": "novalidate",
799
817
  "description": "Disables the browser's validation.",
800
818
  "value": { "type": "boolean", "default": "false" }
801
- },
802
- {
803
- "name": "step",
804
- "description": "The step value of the input element.",
805
- "value": { "type": "string" }
806
- },
807
- {
808
- "name": "_validity",
809
- "value": { "type": "null", "default": "null" }
810
819
  }
811
820
  ],
812
821
  "events": [
@@ -823,7 +832,6 @@
823
832
  ],
824
833
  "js": {
825
834
  "properties": [
826
- { "name": "valueAsNumber" },
827
835
  {
828
836
  "name": "disabled",
829
837
  "description": "Disables the input element.",
@@ -831,33 +839,12 @@
831
839
  },
832
840
  {
833
841
  "name": "required",
834
- "description": "Marks the input element as required.",
842
+ "description": "Marks the input element as required",
835
843
  "type": "boolean"
836
844
  },
837
845
  {
838
846
  "name": "clearable",
839
- "description": "Adds a button to clear the input element.",
840
- "type": "boolean"
841
- },
842
- {
843
- "name": "size",
844
- "description": "The size of the input element.",
845
- "type": "\"small\" | \"regular\""
846
- },
847
- {
848
- "name": "type",
849
- "description": "The type of the input element.",
850
- "type": "string"
851
- },
852
- { "name": "_validity", "type": "null" },
853
- {
854
- "name": "validationMessages",
855
- "description": "Custom validation messages. The key is the name of the validity state and the value is the message.",
856
- "type": "object"
857
- },
858
- {
859
- "name": "novalidate",
860
- "description": "Disables the browser's validation.",
847
+ "description": "Adds a button to clear the input element",
861
848
  "type": "boolean"
862
849
  },
863
850
  {
@@ -870,24 +857,19 @@
870
857
  "description": "The name of the input element.",
871
858
  "type": "string"
872
859
  },
873
- {
874
- "name": "label",
875
- "description": "The label of the input element.",
876
- "type": "string"
877
- },
878
860
  {
879
861
  "name": "error",
880
862
  "description": "A custom error that is completely independent of the validity state. Useful for displaying server side errors.",
881
863
  "type": "string"
882
864
  },
883
865
  {
884
- "name": "icon",
885
- "description": "The icon that is displayed at the end of the input element.",
866
+ "name": "label",
867
+ "description": "The label of the input element",
886
868
  "type": "string"
887
869
  },
888
870
  {
889
871
  "name": "prefix",
890
- "description": "A prefix that relates to the value of the input (e.g. CHF).",
872
+ "description": "A prefix that relates to the value of the input (e.g. CHF)",
891
873
  "type": "string"
892
874
  },
893
875
  {
@@ -895,36 +877,63 @@
895
877
  "description": "A suffix that relates to the value of the input (e.g. mm).",
896
878
  "type": "string"
897
879
  },
880
+ {
881
+ "name": "size",
882
+ "description": "The size of the input element",
883
+ "type": "\"small\" | \"regular\""
884
+ },
885
+ {
886
+ "name": "icon",
887
+ "description": "The icon that is displayed at the end of the input element",
888
+ "type": "IconPathName"
889
+ },
898
890
  {
899
891
  "name": "pattern",
900
892
  "description": "A regular expression that the value is checked against.",
901
893
  "type": "string"
902
894
  },
895
+ {
896
+ "name": "type",
897
+ "description": "The type of the input element.",
898
+ "type": "InputType"
899
+ },
903
900
  {
904
901
  "name": "min",
905
902
  "description": "The minimum value of the input element.",
906
- "type": "string"
903
+ "type": "number"
907
904
  },
908
905
  {
909
906
  "name": "max",
910
907
  "description": "The maximum value of the input element.",
911
- "type": "string"
908
+ "type": "number"
912
909
  },
913
910
  {
914
- "name": "minlength",
915
- "description": "The minimum length of the input element.",
916
- "type": "string"
911
+ "name": "step",
912
+ "description": "The step value of the input element.",
913
+ "type": "number"
917
914
  },
918
915
  {
919
916
  "name": "maxlength",
920
917
  "description": "The maximum length of the input element.",
921
- "type": "string"
918
+ "type": "number"
922
919
  },
923
920
  {
924
- "name": "step",
925
- "description": "The step value of the input element.",
926
- "type": "string"
927
- }
921
+ "name": "minlength",
922
+ "description": "The minimum length of the input element.",
923
+ "type": "number"
924
+ },
925
+ {
926
+ "name": "validationMessages",
927
+ "description": "Custom validation messages. The key is the name of the validity state and the value is the message.",
928
+ "type": "Record<string, string>"
929
+ },
930
+ {
931
+ "name": "novalidate",
932
+ "description": "Disables the browser's validation.",
933
+ "type": "boolean"
934
+ },
935
+ { "name": "_validity", "type": "ValidityState | null" },
936
+ { "name": "valueAsNumber" }
928
937
  ],
929
938
  "events": [
930
939
  {
@@ -958,15 +967,14 @@
958
967
  "name": "selects",
959
968
  "description": "This has only an effect when the role is 'menu'. It defines which role the menu items will get. Default is 'none'.",
960
969
  "type": "SelectsType"
961
- },
962
- { "name": "value" }
970
+ }
963
971
  ],
964
972
  "events": []
965
973
  }
966
974
  },
967
975
  {
968
976
  "name": "leu-menu-item",
969
- "description": "\n---\n\n\n### **Methods:**\n - **getValue(): _string_** - Returns the value of the item. If `value` is not set, it will return the inner text\n\n### **Slots:**\n - _default_ - The label of the menu item",
977
+ "description": "\n---\n\n\n### **Methods:**\n - **getValue()** - Returns the value of the item. If `value` is not set, it will return the inner text\n\n### **Slots:**\n - _default_ - The label of the menu item",
970
978
  "doc-url": "",
971
979
  "attributes": [
972
980
  {
@@ -987,17 +995,17 @@
987
995
  {
988
996
  "name": "tabbable",
989
997
  "description": "If the item should be focusable. Will be reflected as `tabindex` to the underlying button or link",
990
- "value": { "type": "boolean", "default": "undefined" }
998
+ "value": { "type": "boolean" }
991
999
  },
992
1000
  {
993
1001
  "name": "href",
994
1002
  "description": "The href of the underlying link",
995
- "value": { "type": "string", "default": "undefined" }
1003
+ "value": { "type": "string" }
996
1004
  },
997
1005
  {
998
1006
  "name": "value",
999
1007
  "description": "The value of the item. It must not contain commas. See `getValue()`",
1000
- "value": { "type": "string", "default": "undefined" }
1008
+ "value": { "type": "string" }
1001
1009
  },
1002
1010
  {
1003
1011
  "name": "componentRole",
@@ -1017,19 +1025,19 @@
1017
1025
  "type": "boolean"
1018
1026
  },
1019
1027
  {
1020
- "name": "disabled",
1021
- "description": "Disables the underlying button or link",
1028
+ "name": "multipleSelection",
1029
+ "description": "If the item is part of a multiple selection. Renders a checkmark before the label when active",
1022
1030
  "type": "boolean"
1023
1031
  },
1024
1032
  {
1025
- "name": "multipleSelection",
1026
- "description": "If the item is part of a multiple selection. Renders a checkmark before the label when active",
1033
+ "name": "disabled",
1034
+ "description": "Disables the underlying button or link",
1027
1035
  "type": "boolean"
1028
1036
  },
1029
1037
  {
1030
- "name": "value",
1031
- "description": "The value of the item. It must not contain commas. See `getValue()`",
1032
- "type": "string"
1038
+ "name": "tabbable",
1039
+ "description": "If the item should be focusable. Will be reflected as `tabindex` to the underlying button or link",
1040
+ "type": "boolean"
1033
1041
  },
1034
1042
  {
1035
1043
  "name": "href",
@@ -1037,9 +1045,9 @@
1037
1045
  "type": "string"
1038
1046
  },
1039
1047
  {
1040
- "name": "tabbable",
1041
- "description": "If the item should be focusable. Will be reflected as `tabindex` to the underlying button or link",
1042
- "type": "boolean"
1048
+ "name": "value",
1049
+ "description": "The value of the item. It must not contain commas. See `getValue()`",
1050
+ "type": "string"
1043
1051
  },
1044
1052
  {
1045
1053
  "name": "componentRole",
@@ -1390,7 +1398,7 @@
1390
1398
  },
1391
1399
  {
1392
1400
  "name": "leu-range",
1393
- "description": "\n---\n\n\n### **Methods:**\n - **_handlePointerDown(e: _PointerEvent & {target: HTMLInputElement}_)** - Determine if the \"click\" (pointer event) is closer the\nthe value of the other input element. Swap the values if this is the case.",
1401
+ "description": "\n---\n\n\n### **Methods:**\n ",
1394
1402
  "doc-url": "",
1395
1403
  "attributes": [
1396
1404
  {
@@ -1420,13 +1428,6 @@
1420
1428
  "events": [],
1421
1429
  "js": {
1422
1430
  "properties": [
1423
- {
1424
- "name": "value",
1425
- "description": "Sets the value of the underlying input element(s).\nThe value has to be an array if \"multiple\" range is used.\nOtherwise it has to be a string."
1426
- },
1427
- { "name": "valueAsArray" },
1428
- { "name": "valueLow" },
1429
- { "name": "valueHigh" },
1430
1431
  { "name": "defaultValue", "type": "array" },
1431
1432
  { "name": "min", "type": "number" },
1432
1433
  { "name": "max", "type": "number" },
@@ -1434,7 +1435,14 @@
1434
1435
  { "name": "name", "type": "string" },
1435
1436
  { "name": "label", "type": "string" },
1436
1437
  { "name": "disabled", "type": "boolean" },
1437
- { "name": "multiple", "type": "boolean" }
1438
+ { "name": "multiple", "type": "boolean" },
1439
+ {
1440
+ "name": "value",
1441
+ "description": "Sets the value of the underlying input element(s).\nThe value has to be an array if \"multiple\" range is used.\nOtherwise it has to be a string."
1442
+ },
1443
+ { "name": "valueAsArray" },
1444
+ { "name": "valueLow" },
1445
+ { "name": "valueHigh" }
1438
1446
  ],
1439
1447
  "events": []
1440
1448
  }
@@ -1443,17 +1451,9 @@
1443
1451
  "name": "leu-scroll-top",
1444
1452
  "description": "\n---\n",
1445
1453
  "doc-url": "",
1446
- "attributes": [
1447
- { "name": "_showButton", "value": { "type": "string" } }
1448
- ],
1454
+ "attributes": [],
1449
1455
  "events": [],
1450
- "js": {
1451
- "properties": [
1452
- { "name": "scroll" },
1453
- { "name": "_showButton", "type": "boolean" }
1454
- ],
1455
- "events": []
1456
- }
1456
+ "js": { "properties": [{ "name": "scroll" }], "events": [] }
1457
1457
  },
1458
1458
  {
1459
1459
  "name": "leu-select",