@statistikzh/leu 0.11.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.
- package/.github/workflows/deploy-github-pages.yaml +2 -2
- package/.github/workflows/release-please.yml +1 -1
- package/CHANGELOG.md +8 -0
- package/dist/Accordion.d.ts +1 -1
- package/dist/Accordion.d.ts.map +1 -1
- package/dist/Accordion.js +22 -30
- package/dist/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb.d.ts.map +1 -1
- package/dist/Breadcrumb.js +3 -8
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +3 -3
- package/dist/ButtonGroup.d.ts +1 -1
- package/dist/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup.js +3 -8
- package/dist/Checkbox.d.ts +1 -1
- package/dist/Checkbox.js +2 -2
- package/dist/CheckboxGroup.d.ts +1 -1
- package/dist/CheckboxGroup.js +2 -2
- package/dist/Chip.d.ts +1 -1
- package/dist/Chip.d.ts.map +1 -1
- package/dist/Chip.js +3 -5
- package/dist/ChipGroup.d.ts +1 -1
- package/dist/ChipGroup.js +2 -2
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.js +1 -1
- package/dist/ChipSelectable.js +1 -1
- package/dist/Dialog.d.ts +1 -1
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +3 -7
- package/dist/Dropdown.d.ts +1 -1
- package/dist/Dropdown.d.ts.map +1 -1
- package/dist/Dropdown.js +4 -9
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.js +2 -2
- package/dist/Input.d.ts +1 -1
- package/dist/Input.d.ts.map +1 -1
- package/dist/Input.js +3 -8
- package/dist/{LeuElement-78b4a998.d.ts → LeuElement-e092765a.d.ts} +1 -1
- package/dist/LeuElement-e092765a.d.ts.map +1 -0
- package/dist/{LeuElement-78b4a998.js → LeuElement-e092765a.js} +10 -2
- package/dist/Menu.d.ts +1 -1
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Menu.js +3 -8
- package/dist/MenuItem.d.ts +1 -1
- package/dist/MenuItem.d.ts.map +1 -1
- package/dist/MenuItem.js +3 -8
- package/dist/Pagination.d.ts +1 -1
- package/dist/Pagination.js +3 -3
- package/dist/Popup.d.ts +1 -1
- package/dist/Popup.d.ts.map +1 -1
- package/dist/Popup.js +3 -8
- package/dist/Radio.d.ts +1 -1
- package/dist/Radio.js +2 -2
- package/dist/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup.js +2 -2
- package/dist/Range.d.ts +1 -1
- package/dist/Range.d.ts.map +1 -1
- package/dist/Range.js +2 -3
- package/dist/ScrollTop.d.ts +1 -1
- package/dist/ScrollTop.js +3 -3
- package/dist/Select.d.ts +1 -1
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +4 -9
- package/dist/Spinner.d.ts +1 -1
- package/dist/Spinner.js +2 -2
- package/dist/Table.d.ts +1 -1
- package/dist/Table.js +3 -3
- package/dist/VisuallyHidden.d.ts +1 -1
- package/dist/VisuallyHidden.js +2 -2
- package/dist/{hasSlotController-fd1950b4.d.ts → hasSlotController-d1f26756.d.ts} +1 -1
- package/dist/{hasSlotController-fd1950b4.d.ts.map → hasSlotController-d1f26756.d.ts.map} +1 -1
- package/dist/{hasSlotController-fd1950b4.js → hasSlotController-d1f26756.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/leu-accordion.js +1 -1
- package/dist/leu-breadcrumb.js +1 -1
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.js +2 -2
- package/dist/leu-checkbox-group.js +1 -1
- package/dist/leu-checkbox.js +1 -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 +2 -2
- package/dist/leu-dropdown.js +2 -2
- 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.js +2 -2
- package/dist/leu-popup.js +1 -1
- package/dist/leu-radio-group.js +1 -1
- package/dist/leu-radio.js +1 -1
- package/dist/leu-range.js +1 -1
- package/dist/leu-scroll-top.js +2 -2
- package/dist/leu-select.js +2 -2
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.js +2 -2
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/vscode.html-custom-data.json +112 -112
- package/dist/vue/index.d.ts +157 -157
- package/dist/web-types.json +216 -216
- package/package.json +1 -1
- package/scripts/generate-component/templates/[Name].js +1 -1
- package/scripts/generate-component/templates/[name].css +0 -5
- package/src/components/accordion/Accordion.js +10 -6
- package/src/components/accordion/accordion.css +9 -22
- package/src/components/breadcrumb/Breadcrumb.js +1 -1
- package/src/components/breadcrumb/breadcrumb.css +0 -5
- package/src/components/button/Button.js +1 -1
- package/src/components/button-group/ButtonGroup.js +1 -1
- package/src/components/button-group/button-group.css +0 -5
- package/src/components/checkbox/Checkbox.js +1 -1
- package/src/components/checkbox/CheckboxGroup.js +1 -1
- package/src/components/chip/Chip.js +1 -1
- package/src/components/chip/ChipGroup.js +1 -1
- package/src/components/chip/chip.css +0 -2
- package/src/components/dialog/Dialog.js +1 -1
- package/src/components/dialog/dialog.css +0 -5
- package/src/components/dropdown/Dropdown.js +1 -1
- package/src/components/dropdown/dropdown.css +0 -5
- package/src/components/icon/Icon.js +1 -1
- package/src/components/input/Input.js +1 -1
- package/src/components/input/input.css +0 -5
- package/src/components/menu/Menu.js +1 -1
- package/src/components/menu/MenuItem.js +1 -1
- package/src/components/menu/menu-item.css +0 -5
- package/src/components/menu/menu.css +0 -5
- package/src/components/pagination/Pagination.js +1 -1
- package/src/components/popup/Popup.js +1 -1
- package/src/components/popup/popup.css +0 -5
- package/src/components/radio/Radio.js +1 -1
- package/src/components/radio/RadioGroup.js +1 -1
- package/src/components/range/Range.js +1 -1
- package/src/components/range/range.css +0 -1
- package/src/components/scroll-top/ScrollTop.js +1 -1
- package/src/components/select/Select.js +1 -1
- package/src/components/select/select.css +0 -5
- package/src/components/spinner/Spinner.js +1 -1
- package/src/components/table/Table.js +1 -1
- package/src/components/visually-hidden/VisuallyHidden.js +1 -1
- package/src/lib/LeuElement.js +3 -0
- package/src/styles/common-styles.css +5 -0
- package/src/styles/style.stories.js +1 -0
- package/web-dev-server.config.mjs +1 -0
- package/dist/LeuElement-78b4a998.d.ts.map +0 -1
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.11.
|
|
4
|
+
"version": "0.11.1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -66,44 +66,91 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
"name": "leu-
|
|
70
|
-
"description": "
|
|
69
|
+
"name": "leu-checkbox",
|
|
70
|
+
"description": "\n---\n",
|
|
71
71
|
"doc-url": "",
|
|
72
72
|
"attributes": [
|
|
73
73
|
{
|
|
74
|
-
"name": "
|
|
75
|
-
"
|
|
76
|
-
"value": { "type": "Array", "default": "[]" }
|
|
74
|
+
"name": "checked",
|
|
75
|
+
"value": { "type": "boolean", "default": "false" }
|
|
77
76
|
},
|
|
78
77
|
{
|
|
79
|
-
"name": "
|
|
80
|
-
"description": "invert color on dark background",
|
|
78
|
+
"name": "disabled",
|
|
81
79
|
"value": { "type": "boolean", "default": "false" }
|
|
82
80
|
},
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
{
|
|
82
|
+
"name": "value",
|
|
83
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
84
|
+
},
|
|
85
|
+
{ "name": "name", "value": { "type": "string", "default": "\"\"" } }
|
|
86
|
+
],
|
|
87
|
+
"events": [],
|
|
88
|
+
"js": {
|
|
89
|
+
"properties": [
|
|
90
|
+
{ "name": "checked", "value": { "type": "boolean" } },
|
|
91
|
+
{ "name": "disabled", "value": { "type": "boolean" } },
|
|
92
|
+
{ "name": "value", "value": { "type": "string" } },
|
|
93
|
+
{ "name": "name", "value": { "type": "string" } }
|
|
94
|
+
],
|
|
95
|
+
"events": []
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "leu-checkbox-group",
|
|
100
|
+
"description": "\n---\n",
|
|
101
|
+
"doc-url": "",
|
|
102
|
+
"attributes": [
|
|
103
|
+
{
|
|
104
|
+
"name": "orientation",
|
|
105
|
+
"value": {
|
|
106
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
107
|
+
"default": "\"horizontal\""
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{ "name": "label", "value": { "type": "string" } }
|
|
87
111
|
],
|
|
88
112
|
"events": [],
|
|
89
113
|
"js": {
|
|
90
114
|
"properties": [
|
|
91
115
|
{
|
|
92
|
-
"name": "
|
|
93
|
-
"
|
|
94
|
-
"value": { "type": "Array" }
|
|
116
|
+
"name": "orientation",
|
|
117
|
+
"value": { "type": "\"horizontal\" | \"vertical\"" }
|
|
95
118
|
},
|
|
119
|
+
{ "name": "label", "value": { "type": "string" } }
|
|
120
|
+
],
|
|
121
|
+
"events": []
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "leu-button-group",
|
|
126
|
+
"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",
|
|
127
|
+
"doc-url": "",
|
|
128
|
+
"attributes": [],
|
|
129
|
+
"slots": [{ "name": "", "description": "Slot for the buttons" }],
|
|
130
|
+
"events": [
|
|
131
|
+
{
|
|
132
|
+
"name": "input",
|
|
133
|
+
"description": "When the value of the group changes by clicking a button"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"js": {
|
|
137
|
+
"properties": [
|
|
138
|
+
{ "name": "getButtonValue", "value": {} },
|
|
96
139
|
{
|
|
97
|
-
"name": "
|
|
98
|
-
"description": "
|
|
99
|
-
"value": { "type": "
|
|
140
|
+
"name": "value",
|
|
141
|
+
"description": "The value of the currenty selected (active) button",
|
|
142
|
+
"value": { "type": "string" }
|
|
100
143
|
},
|
|
101
|
-
{ "name": "
|
|
102
|
-
{ "name": "
|
|
103
|
-
{ "name": "
|
|
104
|
-
{ "name": "_isDropdownOpen", "value": {} }
|
|
144
|
+
{ "name": "_handleSlotChange", "value": {} },
|
|
145
|
+
{ "name": "_handleButtonClick", "value": {} },
|
|
146
|
+
{ "name": "_items", "value": { "type": "array" } }
|
|
105
147
|
],
|
|
106
|
-
"events": [
|
|
148
|
+
"events": [
|
|
149
|
+
{
|
|
150
|
+
"name": "input",
|
|
151
|
+
"description": "When the value of the group changes by clicking a button"
|
|
152
|
+
}
|
|
153
|
+
]
|
|
107
154
|
}
|
|
108
155
|
},
|
|
109
156
|
{
|
|
@@ -218,89 +265,116 @@
|
|
|
218
265
|
}
|
|
219
266
|
},
|
|
220
267
|
{
|
|
221
|
-
"name": "leu-
|
|
222
|
-
"description": "\n---\n
|
|
268
|
+
"name": "leu-dialog",
|
|
269
|
+
"description": "\n---\n",
|
|
223
270
|
"doc-url": "",
|
|
224
|
-
"attributes": [
|
|
225
|
-
"slots": [{ "name": "", "description": "Slot for the buttons" }],
|
|
226
|
-
"events": [
|
|
271
|
+
"attributes": [
|
|
227
272
|
{
|
|
228
|
-
"name": "
|
|
229
|
-
"
|
|
273
|
+
"name": "label",
|
|
274
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"name": "sublabel",
|
|
278
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"name": "open",
|
|
282
|
+
"value": { "type": "boolean", "default": "false" }
|
|
230
283
|
}
|
|
231
284
|
],
|
|
285
|
+
"events": [],
|
|
232
286
|
"js": {
|
|
233
287
|
"properties": [
|
|
234
|
-
{ "name": "
|
|
235
|
-
{
|
|
236
|
-
|
|
237
|
-
"description": "The value of the currenty selected (active) button",
|
|
238
|
-
"value": { "type": "string" }
|
|
239
|
-
},
|
|
240
|
-
{ "name": "_handleSlotChange", "value": {} },
|
|
241
|
-
{ "name": "_handleButtonClick", "value": {} },
|
|
242
|
-
{ "name": "_items", "value": { "type": "array" } }
|
|
288
|
+
{ "name": "label", "value": { "type": "string" } },
|
|
289
|
+
{ "name": "sublabel", "value": { "type": "string" } },
|
|
290
|
+
{ "name": "open", "value": { "type": "boolean" } }
|
|
243
291
|
],
|
|
244
|
-
"events": [
|
|
245
|
-
{
|
|
246
|
-
"name": "input",
|
|
247
|
-
"description": "When the value of the group changes by clicking a button"
|
|
248
|
-
}
|
|
249
|
-
]
|
|
292
|
+
"events": []
|
|
250
293
|
}
|
|
251
294
|
},
|
|
252
295
|
{
|
|
253
|
-
"name": "leu-
|
|
254
|
-
"description": "\n---\n",
|
|
296
|
+
"name": "leu-breadcrumb",
|
|
297
|
+
"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",
|
|
255
298
|
"doc-url": "",
|
|
256
299
|
"attributes": [
|
|
257
300
|
{
|
|
258
|
-
"name": "
|
|
259
|
-
"
|
|
301
|
+
"name": "items",
|
|
302
|
+
"description": "Object array with { label, href }",
|
|
303
|
+
"value": { "type": "Array", "default": "[]" }
|
|
260
304
|
},
|
|
261
305
|
{
|
|
262
|
-
"name": "
|
|
306
|
+
"name": "inverted",
|
|
307
|
+
"description": "invert color on dark background",
|
|
263
308
|
"value": { "type": "boolean", "default": "false" }
|
|
264
309
|
},
|
|
310
|
+
{ "name": "_hiddenItems", "value": { "type": "string" } },
|
|
311
|
+
{ "name": "_showBackOnly", "value": { "type": "string" } },
|
|
312
|
+
{ "name": "_isRecalculating", "value": { "type": "string" } },
|
|
313
|
+
{ "name": "_isDropdownOpen", "value": { "type": "string" } }
|
|
314
|
+
],
|
|
315
|
+
"events": [],
|
|
316
|
+
"js": {
|
|
317
|
+
"properties": [
|
|
318
|
+
{
|
|
319
|
+
"name": "items",
|
|
320
|
+
"description": "Object array with { label, href }",
|
|
321
|
+
"value": { "type": "Array" }
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "inverted",
|
|
325
|
+
"description": "invert color on dark background",
|
|
326
|
+
"value": { "type": "boolean" }
|
|
327
|
+
},
|
|
328
|
+
{ "name": "_hiddenItems", "value": {} },
|
|
329
|
+
{ "name": "_showBackOnly", "value": {} },
|
|
330
|
+
{ "name": "_isRecalculating", "value": {} },
|
|
331
|
+
{ "name": "_isDropdownOpen", "value": {} }
|
|
332
|
+
],
|
|
333
|
+
"events": []
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "leu-dropdown",
|
|
338
|
+
"description": "\n---\n",
|
|
339
|
+
"doc-url": "",
|
|
340
|
+
"attributes": [
|
|
265
341
|
{
|
|
266
|
-
"name": "
|
|
342
|
+
"name": "label",
|
|
267
343
|
"value": { "type": "string", "default": "\"\"" }
|
|
268
344
|
},
|
|
269
|
-
{
|
|
345
|
+
{
|
|
346
|
+
"name": "expanded",
|
|
347
|
+
"value": { "type": "boolean", "default": "false" }
|
|
348
|
+
}
|
|
270
349
|
],
|
|
271
350
|
"events": [],
|
|
272
351
|
"js": {
|
|
273
352
|
"properties": [
|
|
274
|
-
{ "name": "
|
|
275
|
-
{ "name": "
|
|
276
|
-
{ "name": "value", "value": { "type": "string" } },
|
|
277
|
-
{ "name": "name", "value": { "type": "string" } }
|
|
353
|
+
{ "name": "label", "value": { "type": "string" } },
|
|
354
|
+
{ "name": "expanded", "value": { "type": "boolean" } }
|
|
278
355
|
],
|
|
279
356
|
"events": []
|
|
280
357
|
}
|
|
281
358
|
},
|
|
282
359
|
{
|
|
283
|
-
"name": "leu-
|
|
284
|
-
"description": "\n---\n",
|
|
360
|
+
"name": "leu-icon",
|
|
361
|
+
"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
362
|
"doc-url": "",
|
|
286
363
|
"attributes": [
|
|
287
364
|
{
|
|
288
|
-
"name": "
|
|
289
|
-
"
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
{ "name": "label", "value": { "type": "string" } }
|
|
365
|
+
"name": "name",
|
|
366
|
+
"description": "The name of the icon to display.",
|
|
367
|
+
"value": { "type": "IconPathName", "default": "\"\"" }
|
|
368
|
+
}
|
|
295
369
|
],
|
|
296
370
|
"events": [],
|
|
297
371
|
"js": {
|
|
298
372
|
"properties": [
|
|
299
373
|
{
|
|
300
|
-
"name": "
|
|
301
|
-
"
|
|
302
|
-
|
|
303
|
-
|
|
374
|
+
"name": "name",
|
|
375
|
+
"description": "The name of the icon to display.",
|
|
376
|
+
"value": { "type": "IconPathName" }
|
|
377
|
+
}
|
|
304
378
|
],
|
|
305
379
|
"events": []
|
|
306
380
|
}
|
|
@@ -488,80 +562,6 @@
|
|
|
488
562
|
"events": [{ "name": "input" }]
|
|
489
563
|
}
|
|
490
564
|
},
|
|
491
|
-
{
|
|
492
|
-
"name": "leu-dialog",
|
|
493
|
-
"description": "\n---\n",
|
|
494
|
-
"doc-url": "",
|
|
495
|
-
"attributes": [
|
|
496
|
-
{
|
|
497
|
-
"name": "label",
|
|
498
|
-
"value": { "type": "string", "default": "\"\"" }
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
"name": "sublabel",
|
|
502
|
-
"value": { "type": "string", "default": "\"\"" }
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"name": "open",
|
|
506
|
-
"value": { "type": "boolean", "default": "false" }
|
|
507
|
-
}
|
|
508
|
-
],
|
|
509
|
-
"events": [],
|
|
510
|
-
"js": {
|
|
511
|
-
"properties": [
|
|
512
|
-
{ "name": "label", "value": { "type": "string" } },
|
|
513
|
-
{ "name": "sublabel", "value": { "type": "string" } },
|
|
514
|
-
{ "name": "open", "value": { "type": "boolean" } }
|
|
515
|
-
],
|
|
516
|
-
"events": []
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
"name": "leu-dropdown",
|
|
521
|
-
"description": "\n---\n",
|
|
522
|
-
"doc-url": "",
|
|
523
|
-
"attributes": [
|
|
524
|
-
{
|
|
525
|
-
"name": "label",
|
|
526
|
-
"value": { "type": "string", "default": "\"\"" }
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
"name": "expanded",
|
|
530
|
-
"value": { "type": "boolean", "default": "false" }
|
|
531
|
-
}
|
|
532
|
-
],
|
|
533
|
-
"events": [],
|
|
534
|
-
"js": {
|
|
535
|
-
"properties": [
|
|
536
|
-
{ "name": "label", "value": { "type": "string" } },
|
|
537
|
-
{ "name": "expanded", "value": { "type": "boolean" } }
|
|
538
|
-
],
|
|
539
|
-
"events": []
|
|
540
|
-
}
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
"name": "leu-icon",
|
|
544
|
-
"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)_",
|
|
545
|
-
"doc-url": "",
|
|
546
|
-
"attributes": [
|
|
547
|
-
{
|
|
548
|
-
"name": "name",
|
|
549
|
-
"description": "The name of the icon to display.",
|
|
550
|
-
"value": { "type": "IconPathName", "default": "\"\"" }
|
|
551
|
-
}
|
|
552
|
-
],
|
|
553
|
-
"events": [],
|
|
554
|
-
"js": {
|
|
555
|
-
"properties": [
|
|
556
|
-
{
|
|
557
|
-
"name": "name",
|
|
558
|
-
"description": "The name of the icon to display.",
|
|
559
|
-
"value": { "type": "IconPathName" }
|
|
560
|
-
}
|
|
561
|
-
],
|
|
562
|
-
"events": []
|
|
563
|
-
}
|
|
564
|
-
},
|
|
565
565
|
{
|
|
566
566
|
"name": "leu-input",
|
|
567
567
|
"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.",
|
|
@@ -934,79 +934,6 @@
|
|
|
934
934
|
"events": [{ "name": "leu:pagechange" }]
|
|
935
935
|
}
|
|
936
936
|
},
|
|
937
|
-
{
|
|
938
|
-
"name": "leu-popup",
|
|
939
|
-
"description": "\n---\n",
|
|
940
|
-
"doc-url": "",
|
|
941
|
-
"attributes": [
|
|
942
|
-
{
|
|
943
|
-
"name": "anchor",
|
|
944
|
-
"value": {
|
|
945
|
-
"type": "string | HTMLElement",
|
|
946
|
-
"default": "undefined"
|
|
947
|
-
}
|
|
948
|
-
},
|
|
949
|
-
{
|
|
950
|
-
"name": "active",
|
|
951
|
-
"value": { "type": "boolean", "default": "false" }
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
"name": "placement",
|
|
955
|
-
"value": { "type": "Placement", "default": "undefined" }
|
|
956
|
-
},
|
|
957
|
-
{
|
|
958
|
-
"name": "flip",
|
|
959
|
-
"value": { "type": "boolean", "default": "false" }
|
|
960
|
-
},
|
|
961
|
-
{
|
|
962
|
-
"name": "shift",
|
|
963
|
-
"value": { "type": "boolean", "default": "false" }
|
|
964
|
-
},
|
|
965
|
-
{
|
|
966
|
-
"name": "shiftPadding",
|
|
967
|
-
"value": { "type": "number", "default": "0" }
|
|
968
|
-
},
|
|
969
|
-
{
|
|
970
|
-
"name": "matchSize",
|
|
971
|
-
"value": {
|
|
972
|
-
"type": "\"width\" | \"height\" | \"both\"",
|
|
973
|
-
"default": "undefined"
|
|
974
|
-
}
|
|
975
|
-
},
|
|
976
|
-
{
|
|
977
|
-
"name": "autoSize",
|
|
978
|
-
"value": {
|
|
979
|
-
"type": "\"width\" | \"height\" | \"both\"",
|
|
980
|
-
"default": "undefined"
|
|
981
|
-
}
|
|
982
|
-
},
|
|
983
|
-
{
|
|
984
|
-
"name": "autoSizePadding",
|
|
985
|
-
"value": { "type": "number", "default": "0" }
|
|
986
|
-
}
|
|
987
|
-
],
|
|
988
|
-
"events": [],
|
|
989
|
-
"js": {
|
|
990
|
-
"properties": [
|
|
991
|
-
{ "name": "anchor", "value": { "type": "string | HTMLElement" } },
|
|
992
|
-
{ "name": "active", "value": { "type": "boolean" } },
|
|
993
|
-
{ "name": "placement", "value": { "type": "Placement" } },
|
|
994
|
-
{ "name": "flip", "value": { "type": "boolean" } },
|
|
995
|
-
{ "name": "shift", "value": { "type": "boolean" } },
|
|
996
|
-
{ "name": "shiftPadding", "value": { "type": "number" } },
|
|
997
|
-
{
|
|
998
|
-
"name": "matchSize",
|
|
999
|
-
"value": { "type": "\"width\" | \"height\" | \"both\"" }
|
|
1000
|
-
},
|
|
1001
|
-
{
|
|
1002
|
-
"name": "autoSize",
|
|
1003
|
-
"value": { "type": "\"width\" | \"height\" | \"both\"" }
|
|
1004
|
-
},
|
|
1005
|
-
{ "name": "autoSizePadding", "value": { "type": "number" } }
|
|
1006
|
-
],
|
|
1007
|
-
"events": []
|
|
1008
|
-
}
|
|
1009
|
-
},
|
|
1010
937
|
{
|
|
1011
938
|
"name": "leu-radio",
|
|
1012
939
|
"description": "\n---\n",
|
|
@@ -1107,6 +1034,79 @@
|
|
|
1107
1034
|
"events": []
|
|
1108
1035
|
}
|
|
1109
1036
|
},
|
|
1037
|
+
{
|
|
1038
|
+
"name": "leu-popup",
|
|
1039
|
+
"description": "\n---\n",
|
|
1040
|
+
"doc-url": "",
|
|
1041
|
+
"attributes": [
|
|
1042
|
+
{
|
|
1043
|
+
"name": "anchor",
|
|
1044
|
+
"value": {
|
|
1045
|
+
"type": "string | HTMLElement",
|
|
1046
|
+
"default": "undefined"
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"name": "active",
|
|
1051
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"name": "placement",
|
|
1055
|
+
"value": { "type": "Placement", "default": "undefined" }
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"name": "flip",
|
|
1059
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"name": "shift",
|
|
1063
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "shiftPadding",
|
|
1067
|
+
"value": { "type": "number", "default": "0" }
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
"name": "matchSize",
|
|
1071
|
+
"value": {
|
|
1072
|
+
"type": "\"width\" | \"height\" | \"both\"",
|
|
1073
|
+
"default": "undefined"
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"name": "autoSize",
|
|
1078
|
+
"value": {
|
|
1079
|
+
"type": "\"width\" | \"height\" | \"both\"",
|
|
1080
|
+
"default": "undefined"
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
"name": "autoSizePadding",
|
|
1085
|
+
"value": { "type": "number", "default": "0" }
|
|
1086
|
+
}
|
|
1087
|
+
],
|
|
1088
|
+
"events": [],
|
|
1089
|
+
"js": {
|
|
1090
|
+
"properties": [
|
|
1091
|
+
{ "name": "anchor", "value": { "type": "string | HTMLElement" } },
|
|
1092
|
+
{ "name": "active", "value": { "type": "boolean" } },
|
|
1093
|
+
{ "name": "placement", "value": { "type": "Placement" } },
|
|
1094
|
+
{ "name": "flip", "value": { "type": "boolean" } },
|
|
1095
|
+
{ "name": "shift", "value": { "type": "boolean" } },
|
|
1096
|
+
{ "name": "shiftPadding", "value": { "type": "number" } },
|
|
1097
|
+
{
|
|
1098
|
+
"name": "matchSize",
|
|
1099
|
+
"value": { "type": "\"width\" | \"height\" | \"both\"" }
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"name": "autoSize",
|
|
1103
|
+
"value": { "type": "\"width\" | \"height\" | \"both\"" }
|
|
1104
|
+
},
|
|
1105
|
+
{ "name": "autoSizePadding", "value": { "type": "number" } }
|
|
1106
|
+
],
|
|
1107
|
+
"events": []
|
|
1108
|
+
}
|
|
1109
|
+
},
|
|
1110
1110
|
{
|
|
1111
1111
|
"name": "leu-scroll-top",
|
|
1112
1112
|
"description": "\n---\n",
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ import styles from "./accordion.css"
|
|
|
16
16
|
* @attr {string} label-prefix - The prefix of the accordion label. e.g. "01"
|
|
17
17
|
*/
|
|
18
18
|
export class LeuAccordion extends LeuElement {
|
|
19
|
-
static styles = styles
|
|
19
|
+
static styles = [LeuElement.styles, styles]
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
22
22
|
static shadowRootOptions = {
|
|
@@ -72,7 +72,7 @@ export class LeuAccordion extends LeuElement {
|
|
|
72
72
|
id="toggle"
|
|
73
73
|
type="button"
|
|
74
74
|
class="button"
|
|
75
|
-
aria-controls="
|
|
75
|
+
aria-controls="contentwrapper"
|
|
76
76
|
aria-expanded="${this.open}"
|
|
77
77
|
@click=${this._handleToggleClick}
|
|
78
78
|
>
|
|
@@ -85,13 +85,17 @@ export class LeuAccordion extends LeuElement {
|
|
|
85
85
|
<div class="plus"></div>
|
|
86
86
|
</button></${unsafeStatic(hTag)}>
|
|
87
87
|
<div
|
|
88
|
-
id="
|
|
89
|
-
class="
|
|
88
|
+
id="contentwrapper"
|
|
89
|
+
class="contentwrapper"
|
|
90
|
+
?hidden=${!this.open}
|
|
90
91
|
aria-labelledby="toggle"
|
|
91
92
|
role="region"
|
|
92
|
-
?hidden=${!this.open}
|
|
93
93
|
>
|
|
94
|
-
<
|
|
94
|
+
<div
|
|
95
|
+
class="content"
|
|
96
|
+
>
|
|
97
|
+
<slot name="content"></slot>
|
|
98
|
+
</div>
|
|
95
99
|
</div>
|
|
96
100
|
<hr class="divider" />`
|
|
97
101
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
@import url("../../styles/custom-media.css");
|
|
2
2
|
|
|
3
|
-
:host,
|
|
4
|
-
:host * {
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
3
|
:host {
|
|
9
4
|
--accordion-font-regular: var(--leu-font-family-regular);
|
|
10
5
|
--accordion-font-black: var(--leu-font-family-black);
|
|
@@ -19,17 +14,9 @@
|
|
|
19
14
|
|
|
20
15
|
--transition: 0.1s ease;
|
|
21
16
|
|
|
22
|
-
font-family: var(--
|
|
17
|
+
font-family: var(--accordion-font-regular);
|
|
23
18
|
|
|
24
19
|
position: relative;
|
|
25
|
-
display: grid;
|
|
26
|
-
grid-template-rows: auto 0fr;
|
|
27
|
-
|
|
28
|
-
transition: grid-template-rows var(--transition);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
:host([open]) {
|
|
32
|
-
grid-template-rows: auto 1fr;
|
|
33
20
|
}
|
|
34
21
|
|
|
35
22
|
.heading {
|
|
@@ -115,15 +102,18 @@
|
|
|
115
102
|
flex-grow: 1;
|
|
116
103
|
}
|
|
117
104
|
|
|
105
|
+
.contentwrapper {
|
|
106
|
+
display: grid;
|
|
107
|
+
grid-template-rows: 1fr;
|
|
108
|
+
transition: grid-template-rows var(--transition);
|
|
109
|
+
}
|
|
110
|
+
|
|
118
111
|
.content {
|
|
119
112
|
overflow: hidden;
|
|
120
|
-
transition: visibility var(--transition), opacity var(--transition);
|
|
121
113
|
}
|
|
122
114
|
|
|
123
|
-
.
|
|
124
|
-
|
|
125
|
-
visibility: hidden;
|
|
126
|
-
opacity: 0;
|
|
115
|
+
.contentwrapper[hidden] {
|
|
116
|
+
grid-template-rows: 0fr;
|
|
127
117
|
}
|
|
128
118
|
|
|
129
119
|
slot[name="content"] {
|
|
@@ -140,9 +130,6 @@ slot[name="content"] {
|
|
|
140
130
|
}
|
|
141
131
|
|
|
142
132
|
.divider {
|
|
143
|
-
position: absolute;
|
|
144
|
-
top: 100%;
|
|
145
|
-
left: 0;
|
|
146
133
|
|
|
147
134
|
width: 100%;
|
|
148
135
|
height: 1px;
|