@statistikzh/leu 0.10.0 → 0.11.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 (151) hide show
  1. package/.github/workflows/deploy-github-pages.yaml +2 -2
  2. package/.github/workflows/release-please.yml +1 -1
  3. package/CHANGELOG.md +15 -0
  4. package/dist/Accordion.d.ts +1 -1
  5. package/dist/Accordion.d.ts.map +1 -1
  6. package/dist/Accordion.js +22 -30
  7. package/dist/Breadcrumb.d.ts +1 -1
  8. package/dist/Breadcrumb.d.ts.map +1 -1
  9. package/dist/Breadcrumb.js +3 -8
  10. package/dist/Button.d.ts +1 -1
  11. package/dist/Button.js +3 -3
  12. package/dist/ButtonGroup.d.ts +1 -1
  13. package/dist/ButtonGroup.d.ts.map +1 -1
  14. package/dist/ButtonGroup.js +3 -8
  15. package/dist/Checkbox.d.ts +1 -1
  16. package/dist/Checkbox.js +2 -2
  17. package/dist/CheckboxGroup.d.ts +1 -1
  18. package/dist/CheckboxGroup.js +2 -2
  19. package/dist/Chip.d.ts +1 -1
  20. package/dist/Chip.d.ts.map +1 -1
  21. package/dist/Chip.js +3 -5
  22. package/dist/ChipGroup.d.ts +1 -1
  23. package/dist/ChipGroup.js +2 -2
  24. package/dist/ChipLink.js +1 -1
  25. package/dist/ChipRemovable.js +1 -1
  26. package/dist/ChipSelectable.js +1 -1
  27. package/dist/Dialog.d.ts +1 -1
  28. package/dist/Dialog.d.ts.map +1 -1
  29. package/dist/Dialog.js +3 -7
  30. package/dist/Dropdown.d.ts +1 -1
  31. package/dist/Dropdown.d.ts.map +1 -1
  32. package/dist/Dropdown.js +4 -9
  33. package/dist/Icon.d.ts +1 -1
  34. package/dist/Icon.js +2 -2
  35. package/dist/Input.d.ts +1 -1
  36. package/dist/Input.d.ts.map +1 -1
  37. package/dist/Input.js +3 -8
  38. package/dist/{LeuElement-6fbc0dee.d.ts → LeuElement-e092765a.d.ts} +1 -1
  39. package/dist/LeuElement-e092765a.d.ts.map +1 -0
  40. package/dist/{LeuElement-6fbc0dee.js → LeuElement-e092765a.js} +10 -2
  41. package/dist/Menu.d.ts +1 -1
  42. package/dist/Menu.d.ts.map +1 -1
  43. package/dist/Menu.js +3 -8
  44. package/dist/MenuItem.d.ts +1 -1
  45. package/dist/MenuItem.d.ts.map +1 -1
  46. package/dist/MenuItem.js +3 -8
  47. package/dist/Pagination.d.ts +1 -1
  48. package/dist/Pagination.js +3 -3
  49. package/dist/Popup.d.ts +1 -1
  50. package/dist/Popup.d.ts.map +1 -1
  51. package/dist/Popup.js +3 -8
  52. package/dist/Radio.d.ts +1 -1
  53. package/dist/Radio.js +2 -2
  54. package/dist/RadioGroup.d.ts +1 -1
  55. package/dist/RadioGroup.js +2 -2
  56. package/dist/Range.d.ts +60 -0
  57. package/dist/Range.d.ts.map +1 -0
  58. package/dist/Range.js +413 -0
  59. package/dist/ScrollTop.d.ts +1 -1
  60. package/dist/ScrollTop.js +3 -3
  61. package/dist/Select.d.ts +1 -1
  62. package/dist/Select.d.ts.map +1 -1
  63. package/dist/Select.js +4 -9
  64. package/dist/Spinner.d.ts +1 -1
  65. package/dist/Spinner.js +2 -2
  66. package/dist/Table.d.ts +1 -1
  67. package/dist/Table.js +3 -3
  68. package/dist/VisuallyHidden.d.ts +1 -1
  69. package/dist/VisuallyHidden.js +2 -2
  70. package/dist/{hasSlotController-04d0dfa2.d.ts → hasSlotController-d1f26756.d.ts} +1 -1
  71. package/dist/{hasSlotController-04d0dfa2.d.ts.map → hasSlotController-d1f26756.d.ts.map} +1 -1
  72. package/dist/{hasSlotController-04d0dfa2.js → hasSlotController-d1f26756.js} +1 -1
  73. package/dist/index.js +2 -2
  74. package/dist/leu-accordion.js +1 -1
  75. package/dist/leu-breadcrumb.js +1 -1
  76. package/dist/leu-button-group.js +1 -1
  77. package/dist/leu-button.js +2 -2
  78. package/dist/leu-checkbox-group.js +1 -1
  79. package/dist/leu-checkbox.js +1 -1
  80. package/dist/leu-chip-group.js +1 -1
  81. package/dist/leu-chip-link.js +1 -1
  82. package/dist/leu-chip-removable.js +1 -1
  83. package/dist/leu-chip-selectable.js +1 -1
  84. package/dist/leu-dialog.js +2 -2
  85. package/dist/leu-dropdown.js +2 -2
  86. package/dist/leu-icon.js +1 -1
  87. package/dist/leu-input.js +1 -1
  88. package/dist/leu-menu-item.js +1 -1
  89. package/dist/leu-menu.js +1 -1
  90. package/dist/leu-pagination.js +2 -2
  91. package/dist/leu-popup.js +1 -1
  92. package/dist/leu-radio-group.js +1 -1
  93. package/dist/leu-radio.js +1 -1
  94. package/dist/leu-range.d.ts +3 -0
  95. package/dist/leu-range.d.ts.map +1 -0
  96. package/dist/leu-range.js +7 -0
  97. package/dist/leu-scroll-top.js +2 -2
  98. package/dist/leu-select.js +2 -2
  99. package/dist/leu-spinner.js +1 -1
  100. package/dist/leu-table.js +2 -2
  101. package/dist/leu-visually-hidden.js +1 -1
  102. package/dist/vscode.html-custom-data.json +130 -110
  103. package/dist/vue/index.d.ts +194 -153
  104. package/dist/web-types.json +243 -199
  105. package/package.json +1 -1
  106. package/scripts/generate-component/templates/[Name].js +1 -1
  107. package/scripts/generate-component/templates/[name].css +0 -5
  108. package/src/components/accordion/Accordion.js +10 -6
  109. package/src/components/accordion/accordion.css +9 -22
  110. package/src/components/breadcrumb/Breadcrumb.js +1 -1
  111. package/src/components/breadcrumb/breadcrumb.css +0 -5
  112. package/src/components/button/Button.js +1 -1
  113. package/src/components/button-group/ButtonGroup.js +1 -1
  114. package/src/components/button-group/button-group.css +0 -5
  115. package/src/components/checkbox/Checkbox.js +1 -1
  116. package/src/components/checkbox/CheckboxGroup.js +1 -1
  117. package/src/components/chip/Chip.js +1 -1
  118. package/src/components/chip/ChipGroup.js +1 -1
  119. package/src/components/chip/chip.css +0 -2
  120. package/src/components/dialog/Dialog.js +1 -1
  121. package/src/components/dialog/dialog.css +0 -5
  122. package/src/components/dropdown/Dropdown.js +1 -1
  123. package/src/components/dropdown/dropdown.css +0 -5
  124. package/src/components/icon/Icon.js +1 -1
  125. package/src/components/input/Input.js +1 -1
  126. package/src/components/input/input.css +0 -5
  127. package/src/components/menu/Menu.js +1 -1
  128. package/src/components/menu/MenuItem.js +1 -1
  129. package/src/components/menu/menu-item.css +0 -5
  130. package/src/components/menu/menu.css +0 -5
  131. package/src/components/pagination/Pagination.js +1 -1
  132. package/src/components/popup/Popup.js +1 -1
  133. package/src/components/popup/popup.css +0 -5
  134. package/src/components/radio/Radio.js +1 -1
  135. package/src/components/radio/RadioGroup.js +1 -1
  136. package/src/components/range/Range.js +237 -0
  137. package/src/components/range/leu-range.js +5 -0
  138. package/src/components/range/range.css +180 -0
  139. package/src/components/range/stories/range-slider.stories.js +142 -0
  140. package/src/components/range/test/range-test.js +24 -0
  141. package/src/components/scroll-top/ScrollTop.js +1 -1
  142. package/src/components/select/Select.js +1 -1
  143. package/src/components/select/select.css +0 -5
  144. package/src/components/spinner/Spinner.js +1 -1
  145. package/src/components/table/Table.js +1 -1
  146. package/src/components/visually-hidden/VisuallyHidden.js +1 -1
  147. package/src/lib/LeuElement.js +3 -0
  148. package/src/styles/common-styles.css +5 -0
  149. package/src/styles/style.stories.js +1 -0
  150. package/web-dev-server.config.mjs +1 -0
  151. package/dist/LeuElement-6fbc0dee.d.ts.map +0 -1
@@ -35,28 +35,46 @@
35
35
  ]
36
36
  },
37
37
  {
38
- "name": "leu-breadcrumb",
39
- "description": "A Breadcrumb Navigation.\n\nThe breadcrumbs can be displayed in two different layouts.\nOnly the back link (the last item / parent of the current page)\nis displayed when…\n- … the width of the container is smaller\n than the BACK_ONLY_BREAKPOINT.\n- … less then two breadcrumb items could be displayed\n without overflowing the container.\n\nOtherwise as many items as possible are displayed in an inline list\nwithout overflowing the container. The remaining items are displayed\nin a dropdown menu.\n\nIn order to determine the exact numbers of items that have to be\nhidden inside the dropdown, all of them have to be rendered first.\n1. Render all items\n2. Calculate (measure) the number of items that can be displayed\n without overflowing the container.\n3. Updating the state (_hiddeItems) which will trigger a rerender\n4. Render the items again with the new state.\n\nThis results in multiple updates scheduled one after another. Lit\nwill also print a waring in the console beacause of that.\nIt's no a nice behaviour but the only one that works without\nhaving duplicate and hidden markup to derive the sizes from that.\n---\n\n\n### **Methods:**\n - **renderDropdown(): __** - Render the dropdown menu",
38
+ "name": "leu-checkbox",
39
+ "description": "\n---\n",
40
40
  "attributes": [
41
+ { "name": "checked", "values": [] },
42
+ { "name": "disabled", "values": [] },
43
+ { "name": "value", "values": [] },
44
+ { "name": "name", "values": [] }
45
+ ],
46
+ "references": [
41
47
  {
42
- "name": "items",
43
- "description": "Object array with { label, href }",
44
- "values": [{ "name": "Array" }]
45
- },
48
+ "name": "Documentation",
49
+ "url": "https://statistikzh.github.io/leu/?path=/story/checkbox"
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "name": "leu-checkbox-group",
55
+ "description": "\n---\n",
56
+ "attributes": [
46
57
  {
47
- "name": "inverted",
48
- "description": "invert color on dark background",
49
- "values": []
58
+ "name": "orientation",
59
+ "values": [{ "name": "horizontal" }, { "name": "vertical" }]
50
60
  },
51
- { "name": "_hiddenItems", "values": [] },
52
- { "name": "_showBackOnly", "values": [] },
53
- { "name": "_isRecalculating", "values": [] },
54
- { "name": "_isDropdownOpen", "values": [] }
61
+ { "name": "label", "values": [] }
55
62
  ],
56
63
  "references": [
57
64
  {
58
65
  "name": "Documentation",
59
- "url": "https://statistikzh.github.io/leu/?path=/story/breadcrumb"
66
+ "url": "https://statistikzh.github.io/leu/?path=/story/checkbox-group"
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "name": "leu-button-group",
72
+ "description": "\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",
73
+ "attributes": [],
74
+ "references": [
75
+ {
76
+ "name": "Documentation",
77
+ "url": "https://statistikzh.github.io/leu/?path=/story/button-group"
60
78
  }
61
79
  ]
62
80
  },
@@ -111,46 +129,74 @@
111
129
  ]
112
130
  },
113
131
  {
114
- "name": "leu-button-group",
115
- "description": "\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",
116
- "attributes": [],
132
+ "name": "leu-dialog",
133
+ "description": "\n---\n",
134
+ "attributes": [
135
+ { "name": "label", "values": [] },
136
+ { "name": "sublabel", "values": [] },
137
+ { "name": "open", "values": [] }
138
+ ],
117
139
  "references": [
118
140
  {
119
141
  "name": "Documentation",
120
- "url": "https://statistikzh.github.io/leu/?path=/story/button-group"
142
+ "url": "https://statistikzh.github.io/leu/?path=/story/dialog"
121
143
  }
122
144
  ]
123
145
  },
124
146
  {
125
- "name": "leu-checkbox",
126
- "description": "\n---\n",
147
+ "name": "leu-breadcrumb",
148
+ "description": "A Breadcrumb Navigation.\n\nThe breadcrumbs can be displayed in two different layouts.\nOnly the back link (the last item / parent of the current page)\nis displayed when…\n- … the width of the container is smaller\n than the BACK_ONLY_BREAKPOINT.\n- … less then two breadcrumb items could be displayed\n without overflowing the container.\n\nOtherwise as many items as possible are displayed in an inline list\nwithout overflowing the container. The remaining items are displayed\nin a dropdown menu.\n\nIn order to determine the exact numbers of items that have to be\nhidden inside the dropdown, all of them have to be rendered first.\n1. Render all items\n2. Calculate (measure) the number of items that can be displayed\n without overflowing the container.\n3. Updating the state (_hiddeItems) which will trigger a rerender\n4. Render the items again with the new state.\n\nThis results in multiple updates scheduled one after another. Lit\nwill also print a waring in the console beacause of that.\nIt's no a nice behaviour but the only one that works without\nhaving duplicate and hidden markup to derive the sizes from that.\n---\n\n\n### **Methods:**\n - **renderDropdown(): __** - Render the dropdown menu",
127
149
  "attributes": [
128
- { "name": "checked", "values": [] },
129
- { "name": "disabled", "values": [] },
130
- { "name": "value", "values": [] },
131
- { "name": "name", "values": [] }
150
+ {
151
+ "name": "items",
152
+ "description": "Object array with { label, href }",
153
+ "values": [{ "name": "Array" }]
154
+ },
155
+ {
156
+ "name": "inverted",
157
+ "description": "invert color on dark background",
158
+ "values": []
159
+ },
160
+ { "name": "_hiddenItems", "values": [] },
161
+ { "name": "_showBackOnly", "values": [] },
162
+ { "name": "_isRecalculating", "values": [] },
163
+ { "name": "_isDropdownOpen", "values": [] }
132
164
  ],
133
165
  "references": [
134
166
  {
135
167
  "name": "Documentation",
136
- "url": "https://statistikzh.github.io/leu/?path=/story/checkbox"
168
+ "url": "https://statistikzh.github.io/leu/?path=/story/breadcrumb"
137
169
  }
138
170
  ]
139
171
  },
140
172
  {
141
- "name": "leu-checkbox-group",
173
+ "name": "leu-dropdown",
142
174
  "description": "\n---\n",
175
+ "attributes": [
176
+ { "name": "label", "values": [] },
177
+ { "name": "expanded", "values": [] }
178
+ ],
179
+ "references": [
180
+ {
181
+ "name": "Documentation",
182
+ "url": "https://statistikzh.github.io/leu/?path=/story/dropdown"
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ "name": "leu-icon",
188
+ "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)_",
143
189
  "attributes": [
144
190
  {
145
- "name": "orientation",
146
- "values": [{ "name": "horizontal" }, { "name": "vertical" }]
147
- },
148
- { "name": "label", "values": [] }
191
+ "name": "name",
192
+ "description": "The name of the icon to display.",
193
+ "values": [{ "name": "IconPathName" }]
194
+ }
149
195
  ],
150
196
  "references": [
151
197
  {
152
198
  "name": "Documentation",
153
- "url": "https://statistikzh.github.io/leu/?path=/story/checkbox-group"
199
+ "url": "https://statistikzh.github.io/leu/?path=/story/icon"
154
200
  }
155
201
  ]
156
202
  },
@@ -250,52 +296,6 @@
250
296
  }
251
297
  ]
252
298
  },
253
- {
254
- "name": "leu-dialog",
255
- "description": "\n---\n",
256
- "attributes": [
257
- { "name": "label", "values": [] },
258
- { "name": "sublabel", "values": [] },
259
- { "name": "open", "values": [] }
260
- ],
261
- "references": [
262
- {
263
- "name": "Documentation",
264
- "url": "https://statistikzh.github.io/leu/?path=/story/dialog"
265
- }
266
- ]
267
- },
268
- {
269
- "name": "leu-dropdown",
270
- "description": "\n---\n",
271
- "attributes": [
272
- { "name": "label", "values": [] },
273
- { "name": "expanded", "values": [] }
274
- ],
275
- "references": [
276
- {
277
- "name": "Documentation",
278
- "url": "https://statistikzh.github.io/leu/?path=/story/dropdown"
279
- }
280
- ]
281
- },
282
- {
283
- "name": "leu-icon",
284
- "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)_",
285
- "attributes": [
286
- {
287
- "name": "name",
288
- "description": "The name of the icon to display.",
289
- "values": [{ "name": "IconPathName" }]
290
- }
291
- ],
292
- "references": [
293
- {
294
- "name": "Documentation",
295
- "url": "https://statistikzh.github.io/leu/?path=/story/icon"
296
- }
297
- ]
298
- },
299
299
  {
300
300
  "name": "leu-input",
301
301
  "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- **renderErrorMessages(): _TemplateResult | nothing_** - Creates an error list with an item for the given validity state.",
@@ -490,70 +490,90 @@
490
490
  ]
491
491
  },
492
492
  {
493
- "name": "leu-popup",
493
+ "name": "leu-radio",
494
494
  "description": "\n---\n",
495
495
  "attributes": [
496
- { "name": "anchor", "values": [{ "name": "HTMLElement" }] },
497
- { "name": "active", "values": [] },
498
- { "name": "placement", "values": [{ "name": "Placement" }] },
499
- { "name": "flip", "values": [] },
500
- { "name": "shift", "values": [] },
501
- { "name": "shiftPadding", "values": [] },
496
+ { "name": "checked", "values": [] },
497
+ { "name": "disabled", "values": [] },
498
+ { "name": "value", "values": [] },
499
+ { "name": "name", "values": [] }
500
+ ],
501
+ "references": [
502
502
  {
503
- "name": "matchSize",
504
- "values": [
505
- { "name": "width" },
506
- { "name": "height" },
507
- { "name": "both" }
508
- ]
509
- },
503
+ "name": "Documentation",
504
+ "url": "https://statistikzh.github.io/leu/?path=/story/radio"
505
+ }
506
+ ]
507
+ },
508
+ {
509
+ "name": "leu-radio-group",
510
+ "description": "\n---\n",
511
+ "attributes": [
510
512
  {
511
- "name": "autoSize",
512
- "values": [
513
- { "name": "width" },
514
- { "name": "height" },
515
- { "name": "both" }
516
- ]
513
+ "name": "orientation",
514
+ "values": [{ "name": "horizontal" }, { "name": "vertical" }]
517
515
  },
518
- { "name": "autoSizePadding", "values": [] }
516
+ { "name": "label", "values": [] }
519
517
  ],
520
518
  "references": [
521
519
  {
522
520
  "name": "Documentation",
523
- "url": "https://statistikzh.github.io/leu/?path=/story/popup"
521
+ "url": "https://statistikzh.github.io/leu/?path=/story/radio-group"
524
522
  }
525
523
  ]
526
524
  },
527
525
  {
528
- "name": "leu-radio",
529
- "description": "\n---\n",
526
+ "name": "leu-range",
527
+ "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.",
530
528
  "attributes": [
531
- { "name": "checked", "values": [] },
529
+ { "name": "value", "values": [{ "name": "array" }] },
530
+ { "name": "min", "values": [] },
531
+ { "name": "max", "values": [] },
532
+ { "name": "step", "values": [] },
533
+ { "name": "name", "values": [] },
534
+ { "name": "label", "values": [] },
532
535
  { "name": "disabled", "values": [] },
533
- { "name": "value", "values": [] },
534
- { "name": "name", "values": [] }
536
+ { "name": "multiple", "values": [] }
535
537
  ],
536
538
  "references": [
537
539
  {
538
540
  "name": "Documentation",
539
- "url": "https://statistikzh.github.io/leu/?path=/story/radio"
541
+ "url": "https://statistikzh.github.io/leu/?path=/story/range"
540
542
  }
541
543
  ]
542
544
  },
543
545
  {
544
- "name": "leu-radio-group",
546
+ "name": "leu-popup",
545
547
  "description": "\n---\n",
546
548
  "attributes": [
549
+ { "name": "anchor", "values": [{ "name": "HTMLElement" }] },
550
+ { "name": "active", "values": [] },
551
+ { "name": "placement", "values": [{ "name": "Placement" }] },
552
+ { "name": "flip", "values": [] },
553
+ { "name": "shift", "values": [] },
554
+ { "name": "shiftPadding", "values": [] },
547
555
  {
548
- "name": "orientation",
549
- "values": [{ "name": "horizontal" }, { "name": "vertical" }]
556
+ "name": "matchSize",
557
+ "values": [
558
+ { "name": "width" },
559
+ { "name": "height" },
560
+ { "name": "both" }
561
+ ]
550
562
  },
551
- { "name": "label", "values": [] }
563
+ {
564
+ "name": "autoSize",
565
+ "values": [
566
+ { "name": "width" },
567
+ { "name": "height" },
568
+ { "name": "both" }
569
+ ]
570
+ },
571
+ { "name": "autoSizePadding", "values": [] }
552
572
  ],
553
573
  "references": [
554
574
  {
555
575
  "name": "Documentation",
556
- "url": "https://statistikzh.github.io/leu/?path=/story/radio-group"
576
+ "url": "https://statistikzh.github.io/leu/?path=/story/popup"
557
577
  }
558
578
  ]
559
579
  },