@statistikzh/leu 0.14.4 → 0.15.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.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +17 -0
- package/dist/Accordion.js +2 -30
- package/dist/Button.d.ts +56 -68
- package/dist/Button.js +74 -52
- package/dist/ButtonGroup.d.ts +9 -9
- package/dist/ButtonGroup.js +30 -20
- package/dist/ChartWrapper.d.ts +38 -0
- package/dist/ChartWrapper.js +164 -0
- package/dist/Checkbox.d.ts +6 -21
- package/dist/Checkbox.js +17 -9
- package/dist/CheckboxGroup.d.ts +13 -14
- package/dist/CheckboxGroup.js +18 -11
- package/dist/Chip.js +1 -1
- package/dist/ChipGroup.js +1 -1
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.js +1 -1
- package/dist/ChipSelectable.js +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/Dropdown.js +3 -1
- package/dist/Icon.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-x8UlIDDl.js → LeuElement-B84x5CPL.js} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Pagination.d.ts +40 -28
- package/dist/Pagination.js +39 -14
- package/dist/Placeholder.d.ts +27 -0
- package/dist/Placeholder.js +90 -0
- package/dist/Popup.js +1 -1
- package/dist/Radio.d.ts +6 -21
- package/dist/Radio.js +17 -9
- package/dist/RadioGroup.d.ts +28 -23
- package/dist/RadioGroup.js +29 -16
- package/dist/Range.js +1 -1
- package/dist/ScrollTop.d.ts +0 -1
- package/dist/ScrollTop.js +3 -1
- package/dist/Select.js +3 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.d.ts +0 -1
- package/dist/Table.js +3 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/_tslib-CNEFicEt.js +30 -0
- package/dist/components/button/Button.d.ts +55 -67
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/stories/button.stories.d.ts.map +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts +9 -9
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/dist/components/chart-wrapper/ChartWrapper.d.ts +34 -0
- package/dist/components/chart-wrapper/ChartWrapper.d.ts.map +1 -0
- package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts +3 -0
- package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts.map +1 -0
- package/dist/components/chart-wrapper/stories/chart-wrapper.stories.d.ts +47 -0
- package/dist/components/chart-wrapper/stories/chart-wrapper.stories.d.ts.map +1 -0
- package/dist/components/chart-wrapper/test/chart-wrapper.test.d.ts +2 -0
- package/dist/components/chart-wrapper/test/chart-wrapper.test.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +6 -21
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/CheckboxGroup.d.ts +13 -14
- package/dist/components/checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/icon/stories/icon.stories.d.ts +10 -0
- package/dist/components/icon/stories/icon.stories.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +40 -27
- package/dist/components/pagination/Pagination.d.ts.map +1 -1
- package/dist/components/pagination/stories/pagination.stories.d.ts +10 -2
- package/dist/components/pagination/stories/pagination.stories.d.ts.map +1 -1
- package/dist/components/placeholder/Placeholder.d.ts +23 -0
- package/dist/components/placeholder/Placeholder.d.ts.map +1 -0
- package/dist/components/placeholder/leu-placeholder.d.ts +3 -0
- package/dist/components/placeholder/leu-placeholder.d.ts.map +1 -0
- package/dist/components/placeholder/stories/placeholder.stories.d.ts +27 -0
- package/dist/components/placeholder/stories/placeholder.stories.d.ts.map +1 -0
- package/dist/components/placeholder/test/placeholder.test.d.ts +2 -0
- package/dist/components/placeholder/test/placeholder.test.d.ts.map +1 -0
- package/dist/components/radio/Radio.d.ts +6 -21
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.d.ts +28 -23
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/leu-accordion.js +2 -1
- package/dist/leu-button-group.js +8 -1
- package/dist/leu-button.d.ts +0 -1
- package/dist/leu-button.js +3 -1
- package/dist/leu-chart-wrapper.d.ts +6 -0
- package/dist/leu-chart-wrapper.js +11 -0
- package/dist/leu-checkbox-group.js +5 -1
- package/dist/leu-checkbox.js +3 -1
- package/dist/leu-chip-group.js +1 -1
- package/dist/leu-chip-link.js +1 -1
- package/dist/leu-chip-removable.js +1 -1
- package/dist/leu-chip-selectable.js +1 -1
- package/dist/leu-dialog.js +1 -1
- package/dist/leu-dropdown.js +3 -1
- package/dist/leu-icon.js +1 -1
- package/dist/leu-input.js +1 -1
- package/dist/leu-menu-item.js +1 -1
- package/dist/leu-menu.js +1 -1
- package/dist/leu-pagination.d.ts +0 -1
- package/dist/leu-pagination.js +3 -1
- package/dist/leu-placeholder.d.ts +4 -0
- package/dist/leu-placeholder.js +7 -0
- package/dist/leu-popup.js +1 -1
- package/dist/leu-radio-group.js +4 -1
- package/dist/leu-radio.js +3 -1
- package/dist/leu-range.js +1 -1
- package/dist/leu-scroll-top.d.ts +0 -1
- package/dist/leu-scroll-top.js +3 -1
- package/dist/leu-select.js +3 -1
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.d.ts +0 -1
- package/dist/leu-table.js +3 -1
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/lib/a11y.d.ts +2 -2
- package/dist/theme.css +18 -18
- package/dist/vscode.html-custom-data.json +95 -25
- package/dist/vue/index.d.ts +86 -46
- package/dist/web-types.json +222 -80
- package/package.json +1 -1
- package/release-please-config.json +1 -2
- package/scripts/generate-component/templates/stories/[name].stories.ts +17 -4
- package/scripts/postcss-leu-font-styles.cjs +10 -10
- package/src/components/button/Button.ts +95 -79
- package/src/components/button/stories/button.stories.ts +5 -6
- package/src/components/button-group/ButtonGroup.ts +18 -13
- package/src/components/chart-wrapper/ChartWrapper.ts +78 -0
- package/src/components/chart-wrapper/chart-wrapper.css +87 -0
- package/src/components/chart-wrapper/leu-chart-wrapper.ts +5 -0
- package/src/components/chart-wrapper/stories/chart-wrapper.stories.ts +58 -0
- package/src/components/chart-wrapper/test/chart-wrapper.test.ts +77 -0
- package/src/components/checkbox/Checkbox.ts +13 -15
- package/src/components/checkbox/CheckboxGroup.ts +20 -16
- package/src/components/icon/stories/icon.stories.ts +27 -0
- package/src/components/pagination/Pagination.ts +45 -32
- package/src/components/pagination/stories/pagination.stories.ts +28 -17
- package/src/components/placeholder/Placeholder.ts +33 -0
- package/src/components/placeholder/leu-placeholder.ts +5 -0
- package/src/components/placeholder/placeholder.css +59 -0
- package/src/components/placeholder/stories/placeholder.stories.ts +34 -0
- package/src/components/placeholder/test/placeholder.test.ts +31 -0
- package/src/components/radio/Radio.ts +13 -15
- package/src/components/radio/RadioGroup.ts +42 -28
- package/src/docs/contributing.mdx +1 -1
- package/src/index.ts +1 -0
- package/src/lib/a11y.ts +2 -2
- package/src/styles/theme.css +89 -1
- package/src/styles/custom-properties.css +0 -89
package/dist/web-types.json
CHANGED
|
@@ -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.
|
|
4
|
+
"version": "0.15.1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -65,6 +65,33 @@
|
|
|
65
65
|
"events": []
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
+
{
|
|
69
|
+
"name": "leu-button-group",
|
|
70
|
+
"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",
|
|
71
|
+
"doc-url": "",
|
|
72
|
+
"attributes": [],
|
|
73
|
+
"slots": [{ "name": "", "description": "Slot for the buttons" }],
|
|
74
|
+
"events": [
|
|
75
|
+
{
|
|
76
|
+
"name": "input",
|
|
77
|
+
"description": "When the value of the group changes by clicking a button"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"js": {
|
|
81
|
+
"properties": [
|
|
82
|
+
{
|
|
83
|
+
"name": "value",
|
|
84
|
+
"description": "The value of the currently selected (active) button"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"events": [
|
|
88
|
+
{
|
|
89
|
+
"name": "input",
|
|
90
|
+
"description": "When the value of the group changes by clicking a button"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
68
95
|
{
|
|
69
96
|
"name": "leu-button",
|
|
70
97
|
"description": "\n---\n\n\n### **Slots:**\n - **before** - The icon to display before the label\n- **after** - The icon to display after the label\n- _default_ - The label of the button or the icon if no label is set",
|
|
@@ -72,18 +99,28 @@
|
|
|
72
99
|
"attributes": [
|
|
73
100
|
{
|
|
74
101
|
"name": "label",
|
|
75
|
-
"
|
|
102
|
+
"description": "`aria-label` of the underlying button elements.\nUse it to provide a label when only an icon is visible.",
|
|
103
|
+
"value": { "type": "null | string", "default": "null" }
|
|
76
104
|
},
|
|
77
105
|
{
|
|
78
106
|
"name": "size",
|
|
79
|
-
"
|
|
107
|
+
"description": "The size of the button.",
|
|
108
|
+
"value": {
|
|
109
|
+
"type": "\"regular\" | \"small\"",
|
|
110
|
+
"default": "\"regular\""
|
|
111
|
+
}
|
|
80
112
|
},
|
|
81
113
|
{
|
|
82
114
|
"name": "variant",
|
|
83
|
-
"
|
|
115
|
+
"description": "The visual variant of the button.",
|
|
116
|
+
"value": {
|
|
117
|
+
"type": "\"primary\" | \"secondary\" | \"ghost\"",
|
|
118
|
+
"default": "\"primary\""
|
|
119
|
+
}
|
|
84
120
|
},
|
|
85
121
|
{
|
|
86
122
|
"name": "type",
|
|
123
|
+
"description": "The `type` of the underlying button element.",
|
|
87
124
|
"value": {
|
|
88
125
|
"type": "\"button\" | \"submit\" | \"reset\"",
|
|
89
126
|
"default": "\"button\""
|
|
@@ -91,33 +128,33 @@
|
|
|
91
128
|
},
|
|
92
129
|
{
|
|
93
130
|
"name": "componentRole",
|
|
94
|
-
"
|
|
131
|
+
"description": "The `role` of the underlying button element.",
|
|
132
|
+
"value": { "type": "string | undefined" }
|
|
95
133
|
},
|
|
96
134
|
{
|
|
97
135
|
"name": "disabled",
|
|
136
|
+
"description": "Whether the button is disabled or not.",
|
|
98
137
|
"value": { "type": "boolean", "default": "false" }
|
|
99
138
|
},
|
|
100
139
|
{
|
|
101
140
|
"name": "round",
|
|
102
|
-
"description": "
|
|
141
|
+
"description": "Whether the button should be round.\nCan only be applied when the button contains an icon without a visible label.",
|
|
103
142
|
"value": { "type": "boolean", "default": "false" }
|
|
104
143
|
},
|
|
105
144
|
{
|
|
106
145
|
"name": "active",
|
|
146
|
+
"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
147
|
"value": { "type": "boolean", "default": "false" }
|
|
108
148
|
},
|
|
109
149
|
{
|
|
110
150
|
"name": "inverted",
|
|
111
|
-
"description": "
|
|
151
|
+
"description": "Wheter the colors should be inverted. For use on dark backgrounds.",
|
|
112
152
|
"value": { "type": "boolean", "default": "false" }
|
|
113
153
|
},
|
|
114
154
|
{
|
|
115
155
|
"name": "expanded",
|
|
116
|
-
"description": "
|
|
117
|
-
"value": {
|
|
118
|
-
"type": "(\"true\" | \"false\" | undefined)",
|
|
119
|
-
"default": "undefined"
|
|
120
|
-
}
|
|
156
|
+
"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.",
|
|
157
|
+
"value": { "type": "\"true\" | \"false\" | undefined" }
|
|
121
158
|
},
|
|
122
159
|
{
|
|
123
160
|
"name": "fluid",
|
|
@@ -142,65 +179,106 @@
|
|
|
142
179
|
"events": [],
|
|
143
180
|
"js": {
|
|
144
181
|
"properties": [
|
|
145
|
-
{
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
{
|
|
182
|
+
{
|
|
183
|
+
"name": "label",
|
|
184
|
+
"description": "`aria-label` of the underlying button elements.\nUse it to provide a label when only an icon is visible.",
|
|
185
|
+
"type": "null | string"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "size",
|
|
189
|
+
"description": "The size of the button.",
|
|
190
|
+
"type": "\"regular\" | \"small\""
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "variant",
|
|
194
|
+
"description": "The visual variant of the button.",
|
|
195
|
+
"type": "\"primary\" | \"secondary\" | \"ghost\""
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "type",
|
|
199
|
+
"description": "The `type` of the underlying button element.",
|
|
200
|
+
"type": "\"button\" | \"submit\" | \"reset\""
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "componentRole",
|
|
204
|
+
"description": "The `role` of the underlying button element.",
|
|
205
|
+
"type": "string | undefined"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "disabled",
|
|
209
|
+
"description": "Whether the button is disabled or not.",
|
|
210
|
+
"type": "boolean"
|
|
211
|
+
},
|
|
151
212
|
{
|
|
152
213
|
"name": "round",
|
|
153
|
-
"description": "
|
|
214
|
+
"description": "Whether the button should be round.\nCan only be applied when the button contains an icon without a visible label.",
|
|
154
215
|
"type": "boolean"
|
|
155
216
|
},
|
|
156
|
-
{ "name": "active", "type": "boolean" },
|
|
157
217
|
{
|
|
158
|
-
"name": "
|
|
159
|
-
"description": "
|
|
218
|
+
"name": "active",
|
|
219
|
+
"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
220
|
"type": "boolean"
|
|
161
221
|
},
|
|
162
222
|
{
|
|
163
|
-
"name": "
|
|
164
|
-
"description": "
|
|
223
|
+
"name": "inverted",
|
|
224
|
+
"description": "Wheter the colors should be inverted. For use on dark backgrounds.",
|
|
165
225
|
"type": "boolean"
|
|
166
226
|
},
|
|
167
227
|
{
|
|
168
228
|
"name": "expanded",
|
|
169
|
-
"description": "
|
|
170
|
-
"type": "
|
|
229
|
+
"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.",
|
|
230
|
+
"type": "\"true\" | \"false\" | undefined"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "fluid",
|
|
234
|
+
"description": "Alters the shape of the button to be full width of its parent container",
|
|
235
|
+
"type": "boolean"
|
|
171
236
|
}
|
|
172
237
|
],
|
|
173
238
|
"events": []
|
|
174
239
|
}
|
|
175
240
|
},
|
|
176
241
|
{
|
|
177
|
-
"name": "leu-
|
|
178
|
-
"description": "
|
|
242
|
+
"name": "leu-chart-wrapper",
|
|
243
|
+
"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.",
|
|
179
244
|
"doc-url": "",
|
|
180
|
-
"attributes": [
|
|
181
|
-
"slots": [{ "name": "", "description": "Slot for the buttons" }],
|
|
182
|
-
"events": [
|
|
245
|
+
"attributes": [
|
|
183
246
|
{
|
|
184
|
-
"name": "
|
|
185
|
-
"
|
|
186
|
-
"
|
|
247
|
+
"name": "pending",
|
|
248
|
+
"description": "Whether the chart is currently loading or not.\nWhen set to `true`, a spinner will be shown in the chart container.",
|
|
249
|
+
"value": { "type": "boolean", "default": "false" }
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"slots": [
|
|
253
|
+
{
|
|
254
|
+
"name": "title",
|
|
255
|
+
"description": "The title of the chart. Use a heading tag (h2-4) depending on your context."
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "description",
|
|
259
|
+
"description": "A description of the chart. Content is wrapped in a `<p>` tag by the component."
|
|
260
|
+
},
|
|
261
|
+
{ "name": "chart", "description": "The actual chart" },
|
|
262
|
+
{
|
|
263
|
+
"name": "caption",
|
|
264
|
+
"description": "A caption for the chart, e.g. a source or explanation of the data."
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "download",
|
|
268
|
+
"description": "A download button or dropdown to export the chart in different formats."
|
|
187
269
|
}
|
|
188
270
|
],
|
|
271
|
+
"events": [],
|
|
189
272
|
"js": {
|
|
190
273
|
"properties": [
|
|
191
274
|
{
|
|
192
|
-
"name": "
|
|
193
|
-
"description": "
|
|
194
|
-
"type": "
|
|
195
|
-
}
|
|
275
|
+
"name": "pending",
|
|
276
|
+
"description": "Whether the chart is currently loading or not.\nWhen set to `true`, a spinner will be shown in the chart container.",
|
|
277
|
+
"type": "boolean"
|
|
278
|
+
},
|
|
279
|
+
{ "name": "hasSlotController" }
|
|
196
280
|
],
|
|
197
|
-
"events": [
|
|
198
|
-
{
|
|
199
|
-
"name": "input",
|
|
200
|
-
"type": "CustomEvent",
|
|
201
|
-
"description": "When the value of the group changes by clicking a button"
|
|
202
|
-
}
|
|
203
|
-
]
|
|
281
|
+
"events": []
|
|
204
282
|
}
|
|
205
283
|
},
|
|
206
284
|
{
|
|
@@ -227,36 +305,51 @@
|
|
|
227
305
|
"properties": [
|
|
228
306
|
{ "name": "checked", "type": "boolean" },
|
|
229
307
|
{ "name": "disabled", "type": "boolean" },
|
|
230
|
-
{ "name": "
|
|
231
|
-
{ "name": "
|
|
308
|
+
{ "name": "value", "type": "string" },
|
|
309
|
+
{ "name": "name", "type": "string" }
|
|
232
310
|
],
|
|
233
311
|
"events": []
|
|
234
312
|
}
|
|
235
313
|
},
|
|
236
314
|
{
|
|
237
315
|
"name": "leu-checkbox-group",
|
|
238
|
-
"description": "\n---\n",
|
|
316
|
+
"description": "\n---\n\n\n### **Slots:**\n - _default_ - Place the checkboxes inside the default slot.",
|
|
239
317
|
"doc-url": "",
|
|
240
318
|
"attributes": [
|
|
241
319
|
{
|
|
242
320
|
"name": "orientation",
|
|
321
|
+
"description": "Defines how the checkboxes should be aligned.",
|
|
243
322
|
"value": {
|
|
244
323
|
"type": "\"horizontal\" | \"vertical\"",
|
|
245
324
|
"default": "\"horizontal\""
|
|
246
325
|
}
|
|
247
326
|
},
|
|
248
|
-
{
|
|
327
|
+
{
|
|
328
|
+
"name": "label",
|
|
329
|
+
"description": "The label of the checkbox group",
|
|
330
|
+
"value": { "type": "string | undefined" }
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"slots": [
|
|
334
|
+
{
|
|
335
|
+
"name": "",
|
|
336
|
+
"description": "Place the checkboxes inside the default slot."
|
|
337
|
+
}
|
|
249
338
|
],
|
|
250
339
|
"events": [],
|
|
251
340
|
"js": {
|
|
252
341
|
"properties": [
|
|
253
|
-
{ "name": "value" },
|
|
254
342
|
{
|
|
255
343
|
"name": "orientation",
|
|
344
|
+
"description": "Defines how the checkboxes should be aligned.",
|
|
256
345
|
"type": "\"horizontal\" | \"vertical\""
|
|
257
346
|
},
|
|
258
|
-
{
|
|
259
|
-
|
|
347
|
+
{
|
|
348
|
+
"name": "label",
|
|
349
|
+
"description": "The label of the checkbox group",
|
|
350
|
+
"type": "string | undefined"
|
|
351
|
+
},
|
|
352
|
+
{ "name": "value" }
|
|
260
353
|
],
|
|
261
354
|
"events": []
|
|
262
355
|
}
|
|
@@ -881,36 +974,74 @@
|
|
|
881
974
|
"description": "\n---\n\n\n### **Events:**\n - **leu:pagechange**",
|
|
882
975
|
"doc-url": "",
|
|
883
976
|
"attributes": [
|
|
884
|
-
{
|
|
977
|
+
{
|
|
978
|
+
"name": "defaultPage",
|
|
979
|
+
"value": { "type": "number | undefined" }
|
|
980
|
+
},
|
|
885
981
|
{
|
|
886
982
|
"name": "itemsPerPage",
|
|
887
|
-
"
|
|
983
|
+
"description": "Number of items per page.",
|
|
984
|
+
"value": { "type": "number", "default": "1" }
|
|
888
985
|
},
|
|
889
986
|
{
|
|
890
987
|
"name": "numOfItems",
|
|
891
|
-
"
|
|
892
|
-
|
|
893
|
-
|
|
988
|
+
"description": "Total number of items to paginate.",
|
|
989
|
+
"value": { "type": "number", "default": "1" }
|
|
990
|
+
}
|
|
894
991
|
],
|
|
895
992
|
"events": [{ "name": "leu:pagechange", "type": "CustomEvent" }],
|
|
896
993
|
"js": {
|
|
897
994
|
"properties": [
|
|
898
|
-
{ "name": "
|
|
899
|
-
{
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
{
|
|
905
|
-
|
|
906
|
-
"
|
|
907
|
-
"
|
|
908
|
-
|
|
909
|
-
|
|
995
|
+
{ "name": "defaultPage", "type": "number | undefined" },
|
|
996
|
+
{
|
|
997
|
+
"name": "itemsPerPage",
|
|
998
|
+
"description": "Number of items per page.",
|
|
999
|
+
"type": "number"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"name": "numOfItems",
|
|
1003
|
+
"description": "Total number of items to paginate.",
|
|
1004
|
+
"type": "number"
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"name": "page",
|
|
1008
|
+
"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."
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"name": "startIndex",
|
|
1012
|
+
"description": "The index of the first item on the current page."
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"name": "endIndex",
|
|
1016
|
+
"description": "The index of the last item on the current page.\nThis is exclusive, meaning it is one past the last item."
|
|
1017
|
+
},
|
|
1018
|
+
{ "name": "_maxPage" }
|
|
910
1019
|
],
|
|
911
1020
|
"events": [{ "name": "leu:pagechange", "type": "CustomEvent" }]
|
|
912
1021
|
}
|
|
913
1022
|
},
|
|
1023
|
+
{
|
|
1024
|
+
"name": "leu-placeholder",
|
|
1025
|
+
"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>`.",
|
|
1026
|
+
"doc-url": "",
|
|
1027
|
+
"attributes": [],
|
|
1028
|
+
"slots": [
|
|
1029
|
+
{
|
|
1030
|
+
"name": "title",
|
|
1031
|
+
"description": "The placeholders title. Use a heading tag (h1-6) depeneding on your context."
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
"name": "description",
|
|
1035
|
+
"description": "A description of the placeholder. Content is wrapped in a `<p>` tag by the component."
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"name": "cta",
|
|
1039
|
+
"description": "A call to action button like \"Reload\" or \"Create\". Add a single `<leu-button>`."
|
|
1040
|
+
}
|
|
1041
|
+
],
|
|
1042
|
+
"events": [],
|
|
1043
|
+
"js": { "properties": [], "events": [] }
|
|
1044
|
+
},
|
|
914
1045
|
{
|
|
915
1046
|
"name": "leu-popup",
|
|
916
1047
|
"description": "\n---\n",
|
|
@@ -1011,40 +1142,51 @@
|
|
|
1011
1142
|
"properties": [
|
|
1012
1143
|
{ "name": "checked", "type": "boolean" },
|
|
1013
1144
|
{ "name": "disabled", "type": "boolean" },
|
|
1014
|
-
{ "name": "
|
|
1015
|
-
{ "name": "
|
|
1145
|
+
{ "name": "value", "type": "string" },
|
|
1146
|
+
{ "name": "name", "type": "string" }
|
|
1016
1147
|
],
|
|
1017
1148
|
"events": []
|
|
1018
1149
|
}
|
|
1019
1150
|
},
|
|
1020
1151
|
{
|
|
1021
1152
|
"name": "leu-radio-group",
|
|
1022
|
-
"description": "
|
|
1153
|
+
"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
1154
|
"doc-url": "",
|
|
1024
1155
|
"attributes": [
|
|
1025
1156
|
{
|
|
1026
1157
|
"name": "orientation",
|
|
1158
|
+
"description": "Defines how the radio buttons should be aligned.",
|
|
1027
1159
|
"value": {
|
|
1028
1160
|
"type": "\"horizontal\" | \"vertical\"",
|
|
1029
1161
|
"default": "\"horizontal\""
|
|
1030
1162
|
}
|
|
1031
1163
|
},
|
|
1032
|
-
{
|
|
1164
|
+
{
|
|
1165
|
+
"name": "label",
|
|
1166
|
+
"description": "The label of the radio group",
|
|
1167
|
+
"value": { "type": "string | undefined" }
|
|
1168
|
+
}
|
|
1169
|
+
],
|
|
1170
|
+
"slots": [
|
|
1171
|
+
{
|
|
1172
|
+
"name": "",
|
|
1173
|
+
"description": "Place the radio buttons inside the default slot."
|
|
1174
|
+
}
|
|
1033
1175
|
],
|
|
1034
1176
|
"events": [],
|
|
1035
1177
|
"js": {
|
|
1036
1178
|
"properties": [
|
|
1037
|
-
{ "name": "value" },
|
|
1038
|
-
{ "name": "handleFocusIn" },
|
|
1039
|
-
{ "name": "handleKeyDown" },
|
|
1040
|
-
{ "name": "handleInput" },
|
|
1041
1179
|
{
|
|
1042
1180
|
"name": "orientation",
|
|
1181
|
+
"description": "Defines how the radio buttons should be aligned.",
|
|
1043
1182
|
"type": "\"horizontal\" | \"vertical\""
|
|
1044
1183
|
},
|
|
1045
|
-
{
|
|
1046
|
-
|
|
1047
|
-
|
|
1184
|
+
{
|
|
1185
|
+
"name": "label",
|
|
1186
|
+
"description": "The label of the radio group",
|
|
1187
|
+
"type": "string | undefined"
|
|
1188
|
+
},
|
|
1189
|
+
{ "name": "value" }
|
|
1048
1190
|
],
|
|
1049
1191
|
"events": []
|
|
1050
1192
|
}
|
package/package.json
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
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
|
-
"
|
|
6
|
-
"last-release-sha": "c00695d82782cfa6e3fa0046e3a7deb31c14eb26",
|
|
5
|
+
"always-update": true,
|
|
7
6
|
"packages": {
|
|
8
7
|
".": {}
|
|
9
8
|
}
|
|
@@ -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
|
-
|
|
10
|
-
|
|
15
|
+
const Template: Story = {
|
|
16
|
+
render: ({}) => {
|
|
17
|
+
return html` <[namespace]-[name]></[namespace]-[name]>`
|
|
18
|
+
}
|
|
11
19
|
}
|
|
12
20
|
|
|
13
|
-
export const Regular =
|
|
21
|
+
export const Regular = {
|
|
22
|
+
...Template,
|
|
23
|
+
args: {
|
|
24
|
+
// Add default args here
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -35,20 +35,20 @@ function generateCustomPropertyDeclarations({
|
|
|
35
35
|
{
|
|
36
36
|
type: "font",
|
|
37
37
|
name: varFont,
|
|
38
|
-
value: `var(${varFontSize}) / var(${varLineHeight}) var(${varFontFamily})`,
|
|
38
|
+
value: `normal var(${varFontSize}) / var(${varLineHeight}) var(${varFontFamily})`,
|
|
39
39
|
},
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
function curveStepDeclarations(curvePrefix, stepStyle) {
|
|
44
44
|
const fontSizeVar = stepStyle.declarations.find(
|
|
45
|
-
(s) => s.type === "fontSize"
|
|
45
|
+
(s) => s.type === "fontSize",
|
|
46
46
|
).name
|
|
47
47
|
const lineHeightVar = stepStyle.declarations.find(
|
|
48
|
-
(s) => s.type === "lineHeight"
|
|
48
|
+
(s) => s.type === "lineHeight",
|
|
49
49
|
).name
|
|
50
50
|
const spacingVar = stepStyle.declarations.find(
|
|
51
|
-
(s) => s.type === "spacing"
|
|
51
|
+
(s) => s.type === "spacing",
|
|
52
52
|
).name
|
|
53
53
|
const fontVar = stepStyle.declarations.find((s) => s.type === "font").name
|
|
54
54
|
|
|
@@ -93,8 +93,8 @@ async function createLeuFontStyleNodes(file, postcss, nodeSource) {
|
|
|
93
93
|
const fontStyleNodes = fontStyleDeclarations.flatMap((style) =>
|
|
94
94
|
style.declarations.map(
|
|
95
95
|
({ name, value }) =>
|
|
96
|
-
new postcss.Declaration({ prop: name, value, source: nodeSource })
|
|
97
|
-
)
|
|
96
|
+
new postcss.Declaration({ prop: name, value, source: nodeSource }),
|
|
97
|
+
),
|
|
98
98
|
)
|
|
99
99
|
|
|
100
100
|
const curveNodes = curves.flatMap((curve) =>
|
|
@@ -105,12 +105,12 @@ async function createLeuFontStyleNodes(file, postcss, nodeSource) {
|
|
|
105
105
|
const [viewport, styleName] = step
|
|
106
106
|
|
|
107
107
|
const stepStyle = fontStyleDeclarations.find(
|
|
108
|
-
(s) => s.name === styleName && s.fontWeight === fontWeight
|
|
108
|
+
(s) => s.name === styleName && s.fontWeight === fontWeight,
|
|
109
109
|
)
|
|
110
110
|
|
|
111
111
|
const nodes = curveStepDeclarations(curvePrefix, stepStyle).map(
|
|
112
112
|
({ prop, value }) =>
|
|
113
|
-
new postcss.Declaration({ prop, value, source: nodeSource })
|
|
113
|
+
new postcss.Declaration({ prop, value, source: nodeSource }),
|
|
114
114
|
)
|
|
115
115
|
|
|
116
116
|
return viewport === null
|
|
@@ -122,7 +122,7 @@ async function createLeuFontStyleNodes(file, postcss, nodeSource) {
|
|
|
122
122
|
source: nodeSource,
|
|
123
123
|
})
|
|
124
124
|
})
|
|
125
|
-
})
|
|
125
|
+
}),
|
|
126
126
|
)
|
|
127
127
|
|
|
128
128
|
return [...fontStyleNodes, ...curveNodes]
|
|
@@ -143,7 +143,7 @@ module.exports = () => ({
|
|
|
143
143
|
const nodes = await createLeuFontStyleNodes(
|
|
144
144
|
path.resolve(rootDir, jsonFile),
|
|
145
145
|
postcss,
|
|
146
|
-
atRule.source
|
|
146
|
+
atRule.source,
|
|
147
147
|
)
|
|
148
148
|
|
|
149
149
|
atRule.replaceWith(nodes)
|