@statistikzh/leu 0.14.4 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +8 -0
  3. package/dist/Accordion.js +2 -30
  4. package/dist/Button.d.ts +56 -68
  5. package/dist/Button.js +74 -52
  6. package/dist/ButtonGroup.d.ts +9 -9
  7. package/dist/ButtonGroup.js +30 -20
  8. package/dist/ChartWrapper.d.ts +38 -0
  9. package/dist/ChartWrapper.js +153 -0
  10. package/dist/Checkbox.d.ts +6 -21
  11. package/dist/Checkbox.js +17 -9
  12. package/dist/CheckboxGroup.d.ts +13 -14
  13. package/dist/CheckboxGroup.js +18 -11
  14. package/dist/Chip.js +1 -1
  15. package/dist/ChipGroup.js +1 -1
  16. package/dist/ChipLink.js +1 -1
  17. package/dist/ChipRemovable.js +1 -1
  18. package/dist/ChipSelectable.js +1 -1
  19. package/dist/Dialog.js +1 -1
  20. package/dist/Dropdown.js +3 -1
  21. package/dist/Icon.js +1 -1
  22. package/dist/Input.js +1 -1
  23. package/dist/{LeuElement-x8UlIDDl.js → LeuElement-BhAmogDy.js} +1 -1
  24. package/dist/Menu.js +1 -1
  25. package/dist/MenuItem.js +1 -1
  26. package/dist/Pagination.d.ts +40 -28
  27. package/dist/Pagination.js +39 -14
  28. package/dist/Placeholder.d.ts +27 -0
  29. package/dist/Placeholder.js +90 -0
  30. package/dist/Popup.js +1 -1
  31. package/dist/Radio.d.ts +6 -21
  32. package/dist/Radio.js +17 -9
  33. package/dist/RadioGroup.d.ts +28 -23
  34. package/dist/RadioGroup.js +29 -16
  35. package/dist/Range.js +1 -1
  36. package/dist/ScrollTop.d.ts +0 -1
  37. package/dist/ScrollTop.js +3 -1
  38. package/dist/Select.js +3 -1
  39. package/dist/Spinner.js +1 -1
  40. package/dist/Table.d.ts +0 -1
  41. package/dist/Table.js +3 -1
  42. package/dist/VisuallyHidden.js +1 -1
  43. package/dist/_tslib-CNEFicEt.js +30 -0
  44. package/dist/components/button/Button.d.ts +55 -67
  45. package/dist/components/button/Button.d.ts.map +1 -1
  46. package/dist/components/button/stories/button.stories.d.ts.map +1 -1
  47. package/dist/components/button-group/ButtonGroup.d.ts +9 -9
  48. package/dist/components/button-group/ButtonGroup.d.ts.map +1 -1
  49. package/dist/components/checkbox/Checkbox.d.ts +6 -21
  50. package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
  51. package/dist/components/checkbox/CheckboxGroup.d.ts +13 -14
  52. package/dist/components/checkbox/CheckboxGroup.d.ts.map +1 -1
  53. package/dist/components/icon/stories/icon.stories.d.ts +10 -0
  54. package/dist/components/icon/stories/icon.stories.d.ts.map +1 -1
  55. package/dist/components/pagination/Pagination.d.ts +40 -27
  56. package/dist/components/pagination/Pagination.d.ts.map +1 -1
  57. package/dist/components/pagination/stories/pagination.stories.d.ts +10 -2
  58. package/dist/components/pagination/stories/pagination.stories.d.ts.map +1 -1
  59. package/dist/components/placeholder/Placeholder.d.ts +23 -0
  60. package/dist/components/placeholder/Placeholder.d.ts.map +1 -0
  61. package/dist/components/placeholder/leu-placeholder.d.ts +3 -0
  62. package/dist/components/placeholder/leu-placeholder.d.ts.map +1 -0
  63. package/dist/components/placeholder/stories/placeholder.stories.d.ts +27 -0
  64. package/dist/components/placeholder/stories/placeholder.stories.d.ts.map +1 -0
  65. package/dist/components/placeholder/test/placeholder.test.d.ts +2 -0
  66. package/dist/components/placeholder/test/placeholder.test.d.ts.map +1 -0
  67. package/dist/components/radio/Radio.d.ts +6 -21
  68. package/dist/components/radio/Radio.d.ts.map +1 -1
  69. package/dist/components/radio/RadioGroup.d.ts +28 -23
  70. package/dist/components/radio/RadioGroup.d.ts.map +1 -1
  71. package/dist/components/visualization/ChartWrapper.d.ts +34 -0
  72. package/dist/components/visualization/ChartWrapper.d.ts.map +1 -0
  73. package/dist/components/visualization/leu-chart-wrapper.d.ts +3 -0
  74. package/dist/components/visualization/leu-chart-wrapper.d.ts.map +1 -0
  75. package/dist/components/visualization/stories/chart-wrapper.stories.d.ts +28 -0
  76. package/dist/components/visualization/stories/chart-wrapper.stories.d.ts.map +1 -0
  77. package/dist/components/visualization/test/chart-wrapper.test.d.ts +2 -0
  78. package/dist/components/visualization/test/chart-wrapper.test.d.ts.map +1 -0
  79. package/dist/index.js +3 -2
  80. package/dist/leu-accordion.js +2 -1
  81. package/dist/leu-button-group.js +8 -1
  82. package/dist/leu-button.d.ts +0 -1
  83. package/dist/leu-button.js +3 -1
  84. package/dist/leu-chart-wrapper.d.ts +6 -0
  85. package/dist/leu-chart-wrapper.js +11 -0
  86. package/dist/leu-checkbox-group.js +5 -1
  87. package/dist/leu-checkbox.js +3 -1
  88. package/dist/leu-chip-group.js +1 -1
  89. package/dist/leu-chip-link.js +1 -1
  90. package/dist/leu-chip-removable.js +1 -1
  91. package/dist/leu-chip-selectable.js +1 -1
  92. package/dist/leu-dialog.js +1 -1
  93. package/dist/leu-dropdown.js +3 -1
  94. package/dist/leu-icon.js +1 -1
  95. package/dist/leu-input.js +1 -1
  96. package/dist/leu-menu-item.js +1 -1
  97. package/dist/leu-menu.js +1 -1
  98. package/dist/leu-pagination.d.ts +0 -1
  99. package/dist/leu-pagination.js +3 -1
  100. package/dist/leu-placeholder.d.ts +4 -0
  101. package/dist/leu-placeholder.js +7 -0
  102. package/dist/leu-popup.js +1 -1
  103. package/dist/leu-radio-group.js +4 -1
  104. package/dist/leu-radio.js +3 -1
  105. package/dist/leu-range.js +1 -1
  106. package/dist/leu-scroll-top.d.ts +0 -1
  107. package/dist/leu-scroll-top.js +3 -1
  108. package/dist/leu-select.js +3 -1
  109. package/dist/leu-spinner.js +1 -1
  110. package/dist/leu-table.d.ts +0 -1
  111. package/dist/leu-table.js +3 -1
  112. package/dist/leu-visually-hidden.js +1 -1
  113. package/dist/lib/a11y.d.ts +2 -2
  114. package/dist/vscode.html-custom-data.json +92 -22
  115. package/dist/vue/index.d.ts +78 -38
  116. package/dist/web-types.json +208 -66
  117. package/package.json +1 -1
  118. package/release-please-config.json +0 -2
  119. package/scripts/generate-component/templates/stories/[name].stories.ts +17 -4
  120. package/src/components/button/Button.ts +95 -79
  121. package/src/components/button/stories/button.stories.ts +5 -6
  122. package/src/components/button-group/ButtonGroup.ts +18 -13
  123. package/src/components/checkbox/Checkbox.ts +13 -15
  124. package/src/components/checkbox/CheckboxGroup.ts +20 -16
  125. package/src/components/icon/stories/icon.stories.ts +27 -0
  126. package/src/components/pagination/Pagination.ts +45 -32
  127. package/src/components/pagination/stories/pagination.stories.ts +28 -17
  128. package/src/components/placeholder/Placeholder.ts +33 -0
  129. package/src/components/placeholder/leu-placeholder.ts +5 -0
  130. package/src/components/placeholder/placeholder.css +59 -0
  131. package/src/components/placeholder/stories/placeholder.stories.ts +34 -0
  132. package/src/components/placeholder/test/placeholder.test.ts +31 -0
  133. package/src/components/radio/Radio.ts +13 -15
  134. package/src/components/radio/RadioGroup.ts +42 -28
  135. package/src/components/visualization/ChartWrapper.ts +75 -0
  136. package/src/components/visualization/chart-wrapper.css +78 -0
  137. package/src/components/visualization/leu-chart-wrapper.ts +5 -0
  138. package/src/components/visualization/stories/chart-wrapper.stories.ts +52 -0
  139. package/src/components/visualization/test/chart-wrapper.test.ts +74 -0
  140. package/src/lib/a11y.ts +2 -2
@@ -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.14.4",
4
+ "version": "0.15.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -72,18 +72,28 @@
72
72
  "attributes": [
73
73
  {
74
74
  "name": "label",
75
- "value": { "type": "string", "default": "null" }
75
+ "description": "`aria-label` of the underlying button elements.\nUse it to provide a label when only an icon is visible.",
76
+ "value": { "type": "null | string", "default": "null" }
76
77
  },
77
78
  {
78
79
  "name": "size",
79
- "value": { "type": "string", "default": "\"regular\"" }
80
+ "description": "The size of the button.",
81
+ "value": {
82
+ "type": "\"regular\" | \"small\"",
83
+ "default": "\"regular\""
84
+ }
80
85
  },
81
86
  {
82
87
  "name": "variant",
83
- "value": { "type": "string", "default": "\"primary\"" }
88
+ "description": "The visual variant of the button.",
89
+ "value": {
90
+ "type": "\"primary\" | \"secondary\" | \"ghost\"",
91
+ "default": "\"primary\""
92
+ }
84
93
  },
85
94
  {
86
95
  "name": "type",
96
+ "description": "The `type` of the underlying button element.",
87
97
  "value": {
88
98
  "type": "\"button\" | \"submit\" | \"reset\"",
89
99
  "default": "\"button\""
@@ -91,33 +101,33 @@
91
101
  },
92
102
  {
93
103
  "name": "componentRole",
94
- "value": { "type": "string", "default": "undefined" }
104
+ "description": "The `role` of the underlying button element.",
105
+ "value": { "type": "string | undefined" }
95
106
  },
96
107
  {
97
108
  "name": "disabled",
109
+ "description": "Whether the button is disabled or not.",
98
110
  "value": { "type": "boolean", "default": "false" }
99
111
  },
100
112
  {
101
113
  "name": "round",
102
- "description": "Only taken into account if no Label and an Icon is set",
114
+ "description": "Whether the button should be round.\nCan only be applied when the button contains an icon without a visible label.",
103
115
  "value": { "type": "boolean", "default": "false" }
104
116
  },
105
117
  {
106
118
  "name": "active",
119
+ "description": "Whether the button is active or not.\nDepending on the `componentRole`, it applies `aria-checked` or `aria-selected` to the underlying button element.",
107
120
  "value": { "type": "boolean", "default": "false" }
108
121
  },
109
122
  {
110
123
  "name": "inverted",
111
- "description": "will be used on dark Background",
124
+ "description": "Wheter the colors should be inverted. For use on dark backgrounds.",
112
125
  "value": { "type": "boolean", "default": "false" }
113
126
  },
114
127
  {
115
128
  "name": "expanded",
116
- "description": "Only taken into account if variant is \"ghost\"",
117
- "value": {
118
- "type": "(\"true\" | \"false\" | undefined)",
119
- "default": "undefined"
120
- }
129
+ "description": "Whether the button is expanded or not.\nOnly has an effect on the variant `ghost` to show an expanding icon.\nIf the property is not set, the icon will not be shown.\nIf it is set, the icon will either show an expanded or collapsed state.",
130
+ "value": { "type": "\"true\" | \"false\" | undefined" }
121
131
  },
122
132
  {
123
133
  "name": "fluid",
@@ -142,32 +152,60 @@
142
152
  "events": [],
143
153
  "js": {
144
154
  "properties": [
145
- { "name": "label", "type": "string" },
146
- { "name": "size", "type": "string" },
147
- { "name": "variant", "type": "string" },
148
- { "name": "type", "type": "\"button\" | \"submit\" | \"reset\"" },
149
- { "name": "componentRole", "type": "string" },
150
- { "name": "disabled", "type": "boolean" },
155
+ {
156
+ "name": "label",
157
+ "description": "`aria-label` of the underlying button elements.\nUse it to provide a label when only an icon is visible.",
158
+ "type": "null | string"
159
+ },
160
+ {
161
+ "name": "size",
162
+ "description": "The size of the button.",
163
+ "type": "\"regular\" | \"small\""
164
+ },
165
+ {
166
+ "name": "variant",
167
+ "description": "The visual variant of the button.",
168
+ "type": "\"primary\" | \"secondary\" | \"ghost\""
169
+ },
170
+ {
171
+ "name": "type",
172
+ "description": "The `type` of the underlying button element.",
173
+ "type": "\"button\" | \"submit\" | \"reset\""
174
+ },
175
+ {
176
+ "name": "componentRole",
177
+ "description": "The `role` of the underlying button element.",
178
+ "type": "string | undefined"
179
+ },
180
+ {
181
+ "name": "disabled",
182
+ "description": "Whether the button is disabled or not.",
183
+ "type": "boolean"
184
+ },
151
185
  {
152
186
  "name": "round",
153
- "description": "Only taken into account if no Label and an Icon is set",
187
+ "description": "Whether the button should be round.\nCan only be applied when the button contains an icon without a visible label.",
154
188
  "type": "boolean"
155
189
  },
156
- { "name": "active", "type": "boolean" },
157
190
  {
158
- "name": "inverted",
159
- "description": "will be used on dark Background",
191
+ "name": "active",
192
+ "description": "Whether the button is active or not.\nDepending on the `componentRole`, it applies `aria-checked` or `aria-selected` to the underlying button element.",
160
193
  "type": "boolean"
161
194
  },
162
195
  {
163
- "name": "fluid",
164
- "description": "Alters the shape of the button to be full width of its parent container",
196
+ "name": "inverted",
197
+ "description": "Wheter the colors should be inverted. For use on dark backgrounds.",
165
198
  "type": "boolean"
166
199
  },
167
200
  {
168
201
  "name": "expanded",
169
- "description": "Only taken into account if variant is \"ghost\"",
170
- "type": "(\"true\" | \"false\" | undefined)"
202
+ "description": "Whether the button is expanded or not.\nOnly has an effect on the variant `ghost` to show an expanding icon.\nIf the property is not set, the icon will not be shown.\nIf it is set, the icon will either show an expanded or collapsed state.",
203
+ "type": "\"true\" | \"false\" | undefined"
204
+ },
205
+ {
206
+ "name": "fluid",
207
+ "description": "Alters the shape of the button to be full width of its parent container",
208
+ "type": "boolean"
171
209
  }
172
210
  ],
173
211
  "events": []
@@ -175,14 +213,13 @@
175
213
  },
176
214
  {
177
215
  "name": "leu-button-group",
178
- "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",
216
+ "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",
179
217
  "doc-url": "",
180
218
  "attributes": [],
181
219
  "slots": [{ "name": "", "description": "Slot for the buttons" }],
182
220
  "events": [
183
221
  {
184
222
  "name": "input",
185
- "type": "CustomEvent",
186
223
  "description": "When the value of the group changes by clicking a button"
187
224
  }
188
225
  ],
@@ -190,14 +227,12 @@
190
227
  "properties": [
191
228
  {
192
229
  "name": "value",
193
- "description": "The value of the currenty selected (active) button",
194
- "type": "string"
230
+ "description": "The value of the currently selected (active) button"
195
231
  }
196
232
  ],
197
233
  "events": [
198
234
  {
199
235
  "name": "input",
200
- "type": "CustomEvent",
201
236
  "description": "When the value of the group changes by clicking a button"
202
237
  }
203
238
  ]
@@ -227,36 +262,51 @@
227
262
  "properties": [
228
263
  { "name": "checked", "type": "boolean" },
229
264
  { "name": "disabled", "type": "boolean" },
230
- { "name": "name", "type": "string" },
231
- { "name": "value", "type": "string" }
265
+ { "name": "value", "type": "string" },
266
+ { "name": "name", "type": "string" }
232
267
  ],
233
268
  "events": []
234
269
  }
235
270
  },
236
271
  {
237
272
  "name": "leu-checkbox-group",
238
- "description": "\n---\n",
273
+ "description": "\n---\n\n\n### **Slots:**\n - _default_ - Place the checkboxes inside the default slot.",
239
274
  "doc-url": "",
240
275
  "attributes": [
241
276
  {
242
277
  "name": "orientation",
278
+ "description": "Defines how the checkboxes should be aligned.",
243
279
  "value": {
244
280
  "type": "\"horizontal\" | \"vertical\"",
245
281
  "default": "\"horizontal\""
246
282
  }
247
283
  },
248
- { "name": "label", "value": { "type": "string" } }
284
+ {
285
+ "name": "label",
286
+ "description": "The label of the checkbox group",
287
+ "value": { "type": "string | undefined" }
288
+ }
289
+ ],
290
+ "slots": [
291
+ {
292
+ "name": "",
293
+ "description": "Place the checkboxes inside the default slot."
294
+ }
249
295
  ],
250
296
  "events": [],
251
297
  "js": {
252
298
  "properties": [
253
- { "name": "value" },
254
299
  {
255
300
  "name": "orientation",
301
+ "description": "Defines how the checkboxes should be aligned.",
256
302
  "type": "\"horizontal\" | \"vertical\""
257
303
  },
258
- { "name": "items", "type": "array" },
259
- { "name": "label", "type": "string" }
304
+ {
305
+ "name": "label",
306
+ "description": "The label of the checkbox group",
307
+ "type": "string | undefined"
308
+ },
309
+ { "name": "value" }
260
310
  ],
261
311
  "events": []
262
312
  }
@@ -881,36 +931,74 @@
881
931
  "description": "\n---\n\n\n### **Events:**\n - **leu:pagechange**",
882
932
  "doc-url": "",
883
933
  "attributes": [
884
- { "name": "defaultPage", "value": { "type": "number" } },
934
+ {
935
+ "name": "defaultPage",
936
+ "value": { "type": "number | undefined" }
937
+ },
885
938
  {
886
939
  "name": "itemsPerPage",
887
- "value": { "type": "Number", "default": "1" }
940
+ "description": "Number of items per page.",
941
+ "value": { "type": "number", "default": "1" }
888
942
  },
889
943
  {
890
944
  "name": "numOfItems",
891
- "value": { "type": "Number", "default": "1" }
892
- },
893
- { "name": "_page", "value": { "type": "string" } }
945
+ "description": "Total number of items to paginate.",
946
+ "value": { "type": "number", "default": "1" }
947
+ }
894
948
  ],
895
949
  "events": [{ "name": "leu:pagechange", "type": "CustomEvent" }],
896
950
  "js": {
897
951
  "properties": [
898
- { "name": "page" },
899
- { "name": "startIndex" },
900
- { "name": "endIndex" },
901
- { "name": "_maxPage" },
902
- { "name": "numOfItems", "type": "Number" },
903
- { "name": "itemsPerPage", "type": "Number" },
904
- { "name": "defaultPage", "type": "number" },
905
- {
906
- "name": "_page",
907
- "description": "Internal page state that contains an\nalready clamped page number. Should only\nbe accessed through the `page` getter and\nsetter.",
908
- "type": "Number"
909
- }
952
+ { "name": "defaultPage", "type": "number | undefined" },
953
+ {
954
+ "name": "itemsPerPage",
955
+ "description": "Number of items per page.",
956
+ "type": "number"
957
+ },
958
+ {
959
+ "name": "numOfItems",
960
+ "description": "Total number of items to paginate.",
961
+ "type": "number"
962
+ },
963
+ {
964
+ "name": "page",
965
+ "description": "The current page number. This is a 1-based index.\nWhen setting this value, it will be clamped\nto the range of valid pages."
966
+ },
967
+ {
968
+ "name": "startIndex",
969
+ "description": "The index of the first item on the current page."
970
+ },
971
+ {
972
+ "name": "endIndex",
973
+ "description": "The index of the last item on the current page.\nThis is exclusive, meaning it is one past the last item."
974
+ },
975
+ { "name": "_maxPage" }
910
976
  ],
911
977
  "events": [{ "name": "leu:pagechange", "type": "CustomEvent" }]
912
978
  }
913
979
  },
980
+ {
981
+ "name": "leu-placeholder",
982
+ "description": "* A placeholder to display when no content is available.\n---\n\n\n### **Slots:**\n - **title** - The placeholders title. Use a heading tag (h1-6) depeneding on your context.\n- **description** - A description of the placeholder. Content is wrapped in a `<p>` tag by the component.\n- **cta** - A call to action button like \"Reload\" or \"Create\". Add a single `<leu-button>`.",
983
+ "doc-url": "",
984
+ "attributes": [],
985
+ "slots": [
986
+ {
987
+ "name": "title",
988
+ "description": "The placeholders title. Use a heading tag (h1-6) depeneding on your context."
989
+ },
990
+ {
991
+ "name": "description",
992
+ "description": "A description of the placeholder. Content is wrapped in a `<p>` tag by the component."
993
+ },
994
+ {
995
+ "name": "cta",
996
+ "description": "A call to action button like \"Reload\" or \"Create\". Add a single `<leu-button>`."
997
+ }
998
+ ],
999
+ "events": [],
1000
+ "js": { "properties": [], "events": [] }
1001
+ },
914
1002
  {
915
1003
  "name": "leu-popup",
916
1004
  "description": "\n---\n",
@@ -1011,40 +1099,51 @@
1011
1099
  "properties": [
1012
1100
  { "name": "checked", "type": "boolean" },
1013
1101
  { "name": "disabled", "type": "boolean" },
1014
- { "name": "name", "type": "string" },
1015
- { "name": "value", "type": "string" }
1102
+ { "name": "value", "type": "string" },
1103
+ { "name": "name", "type": "string" }
1016
1104
  ],
1017
1105
  "events": []
1018
1106
  }
1019
1107
  },
1020
1108
  {
1021
1109
  "name": "leu-radio-group",
1022
- "description": "\n---\n",
1110
+ "description": "Handles a group of radio buttons, allowing only one to be selected at a time. It provides keyboard navigation and manages focus within the group.\n---\n\n\n### **Slots:**\n - _default_ - Place the radio buttons inside the default slot.",
1023
1111
  "doc-url": "",
1024
1112
  "attributes": [
1025
1113
  {
1026
1114
  "name": "orientation",
1115
+ "description": "Defines how the radio buttons should be aligned.",
1027
1116
  "value": {
1028
1117
  "type": "\"horizontal\" | \"vertical\"",
1029
1118
  "default": "\"horizontal\""
1030
1119
  }
1031
1120
  },
1032
- { "name": "label", "value": { "type": "string" } }
1121
+ {
1122
+ "name": "label",
1123
+ "description": "The label of the radio group",
1124
+ "value": { "type": "string | undefined" }
1125
+ }
1126
+ ],
1127
+ "slots": [
1128
+ {
1129
+ "name": "",
1130
+ "description": "Place the radio buttons inside the default slot."
1131
+ }
1033
1132
  ],
1034
1133
  "events": [],
1035
1134
  "js": {
1036
1135
  "properties": [
1037
- { "name": "value" },
1038
- { "name": "handleFocusIn" },
1039
- { "name": "handleKeyDown" },
1040
- { "name": "handleInput" },
1041
1136
  {
1042
1137
  "name": "orientation",
1138
+ "description": "Defines how the radio buttons should be aligned.",
1043
1139
  "type": "\"horizontal\" | \"vertical\""
1044
1140
  },
1045
- { "name": "_currentIndex", "type": "number" },
1046
- { "name": "items", "type": "array" },
1047
- { "name": "label", "type": "string" }
1141
+ {
1142
+ "name": "label",
1143
+ "description": "The label of the radio group",
1144
+ "type": "string | undefined"
1145
+ },
1146
+ { "name": "value" }
1048
1147
  ],
1049
1148
  "events": []
1050
1149
  }
@@ -1291,6 +1390,49 @@
1291
1390
  "events": []
1292
1391
  }
1293
1392
  },
1393
+ {
1394
+ "name": "leu-chart-wrapper",
1395
+ "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.",
1396
+ "doc-url": "",
1397
+ "attributes": [
1398
+ {
1399
+ "name": "pending",
1400
+ "description": "Whether the chart is currently loading or not.\nWhen set to `true`, a spinner will be shown in the chart container.",
1401
+ "value": { "type": "boolean", "default": "false" }
1402
+ }
1403
+ ],
1404
+ "slots": [
1405
+ {
1406
+ "name": "title",
1407
+ "description": "The title of the chart. Use a heading tag (h2-4) depending on your context."
1408
+ },
1409
+ {
1410
+ "name": "description",
1411
+ "description": "A description of the chart. Content is wrapped in a `<p>` tag by the component."
1412
+ },
1413
+ { "name": "chart", "description": "The actual chart" },
1414
+ {
1415
+ "name": "caption",
1416
+ "description": "A caption for the chart, e.g. a source or explanation of the data."
1417
+ },
1418
+ {
1419
+ "name": "download",
1420
+ "description": "A download button or dropdown to export the chart in different formats."
1421
+ }
1422
+ ],
1423
+ "events": [],
1424
+ "js": {
1425
+ "properties": [
1426
+ {
1427
+ "name": "pending",
1428
+ "description": "Whether the chart is currently loading or not.\nWhen set to `true`, a spinner will be shown in the chart container.",
1429
+ "type": "boolean"
1430
+ },
1431
+ { "name": "hasSlotController" }
1432
+ ],
1433
+ "events": []
1434
+ }
1435
+ },
1294
1436
  {
1295
1437
  "name": "leu-visually-hidden",
1296
1438
  "description": "\n---\n",
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "UI component library of the canton of zurich",
4
4
  "license": "MIT",
5
5
  "author": "statistikzh",
6
- "version": "0.14.4",
6
+ "version": "0.15.0",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
@@ -2,8 +2,6 @@
2
2
  "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
3
  "release-type": "node",
4
4
  "bump-minor-pre-major": true,
5
- "bump-patch-for-minor-pre-major": true,
6
- "last-release-sha": "c00695d82782cfa6e3fa0046e3a7deb31c14eb26",
7
5
  "packages": {
8
6
  ".": {}
9
7
  }
@@ -1,13 +1,26 @@
1
+ import { Meta, StoryObj } from "@storybook/web-components"
1
2
  import { html } from "lit"
3
+
2
4
  import "../[namespace]-[name].js"
5
+ import {[Namespace][Name]} from "../[Name].js"
6
+
7
+ type StoryArgs = [Namespace][Name]
8
+ type Story = StoryObj<StoryArgs>
3
9
 
4
10
  export default {
5
11
  title: "Components/[Name]",
6
12
  component: "[namespace]-[name]",
7
- }
13
+ } satisfies Meta<StoryArgs>
8
14
 
9
- function Template({}) {
10
- return html` <[namespace]-[name] /> `
15
+ const Template: Story = {
16
+ render: ({}) => {
17
+ return html` <[namespace]-[name]></[namespace]-[name]>`
18
+ }
11
19
  }
12
20
 
13
- export const Regular = Template.bind({})
21
+ export const Regular = {
22
+ ...Template,
23
+ args: {
24
+ // Add default args here
25
+ }
26
+ }