@statistikzh/leu 0.7.0 → 0.9.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.
- package/.eslintrc.json +4 -1
- package/.github/workflows/release-please.yml +3 -3
- package/CHANGELOG.md +35 -0
- package/dist/Accordion.d.ts +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/Breadcrumb.d.ts +1 -1
- package/dist/Breadcrumb.js +1 -1
- package/dist/{Button-7370f901.d.ts → Button-5a8009c5.d.ts} +2 -2
- package/dist/{Button-7370f901.d.ts.map → Button-5a8009c5.d.ts.map} +1 -1
- package/dist/{Button-7370f901.js → Button-5a8009c5.js} +3 -4
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +2 -2
- package/dist/ButtonGroup.d.ts +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/Checkbox.d.ts +1 -1
- package/dist/Checkbox.js +2 -2
- package/dist/CheckboxGroup.d.ts +3 -2
- package/dist/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup.js +4 -3
- package/dist/Chip.d.ts +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ChipGroup.d.ts +1 -1
- package/dist/ChipGroup.js +2 -2
- package/dist/ChipLink.js +1 -1
- package/dist/ChipRemovable.d.ts +7 -0
- package/dist/ChipRemovable.d.ts.map +1 -1
- package/dist/ChipRemovable.js +23 -3
- package/dist/ChipSelectable.d.ts +6 -0
- package/dist/ChipSelectable.d.ts.map +1 -1
- package/dist/ChipSelectable.js +12 -2
- package/dist/Dropdown.d.ts +1 -1
- package/dist/Dropdown.js +3 -3
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.js +1 -1
- package/dist/Input.d.ts +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-ba5ea33d.d.ts → LeuElement-7ab5ef5e.d.ts} +1 -1
- package/dist/LeuElement-7ab5ef5e.d.ts.map +1 -0
- package/dist/{LeuElement-ba5ea33d.js → LeuElement-7ab5ef5e.js} +12 -9
- package/dist/Menu.d.ts +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.d.ts +5 -1
- package/dist/MenuItem.d.ts.map +1 -1
- package/dist/MenuItem.js +21 -6
- package/dist/Pagination.d.ts +1 -1
- package/dist/Pagination.js +2 -2
- package/dist/Popup.d.ts +1 -1
- package/dist/Popup.js +1 -1
- package/dist/Radio.d.ts +1 -1
- package/dist/Radio.js +2 -2
- package/dist/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +4 -3
- package/dist/ScrollTop.d.ts +1 -1
- package/dist/ScrollTop.js +2 -2
- package/dist/Select.d.ts +1 -1
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +9 -5
- package/dist/Spinner.d.ts +9 -0
- package/dist/Spinner.d.ts.map +1 -0
- package/dist/Spinner.js +53 -0
- package/dist/Table.d.ts +1 -1
- package/dist/Table.js +2 -2
- package/dist/VisuallyHidden.d.ts +1 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/index.d.ts +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.d.ts +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-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-scroll-top.js +2 -2
- package/dist/leu-select.js +2 -2
- package/dist/leu-spinner.d.ts +3 -0
- package/dist/leu-spinner.d.ts.map +1 -0
- package/dist/leu-spinner.js +7 -0
- package/dist/leu-table.js +2 -2
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/theme.css +52 -25
- package/dist/vscode.html-custom-data.json +31 -4
- package/dist/vue/index.d.ts +23 -0
- package/dist/web-types.json +48 -8
- package/package.json +2 -1
- package/rollup.config.js +9 -0
- package/scripts/generate-component/templates/[namespace]-[name].js +1 -2
- package/src/components/button/button.css +2 -3
- package/src/components/checkbox/Checkbox.js +1 -1
- package/src/components/checkbox/CheckboxGroup.js +3 -2
- package/src/components/checkbox/stories/checkbox-group.stories.js +3 -3
- package/src/components/checkbox/stories/checkbox.stories.js +7 -2
- package/src/components/chip/ChipGroup.js +1 -1
- package/src/components/chip/ChipRemovable.js +18 -0
- package/src/components/chip/ChipSelectable.js +13 -1
- package/src/components/chip/stories/chip-removable.stories.js +6 -2
- package/src/components/chip/test/chip-removable.test.js +36 -2
- package/src/components/chip/test/chip-selectable.test.js +11 -1
- package/src/components/dropdown/Dropdown.js +1 -1
- package/src/components/dropdown/test/dropdown.test.js +20 -3
- package/src/components/menu/MenuItem.js +22 -3
- package/src/components/menu/menu-item.css +2 -2
- package/src/components/menu/stories/menu-item.stories.js +18 -8
- package/src/components/menu/test/menu-item.test.js +23 -0
- package/src/components/radio/Radio.js +1 -1
- package/src/components/radio/RadioGroup.js +3 -2
- package/src/components/radio/stories/radio-group.stories.js +3 -3
- package/src/components/radio/stories/radio.stories.js +7 -1
- package/src/components/select/Select.js +8 -6
- package/src/components/select/test/select.test.js +30 -0
- package/src/components/spinner/Spinner.js +31 -0
- package/src/components/spinner/leu-spinner.js +5 -0
- package/src/components/spinner/spinner.css +20 -0
- package/src/components/spinner/stories/spinner.stories.js +29 -0
- package/src/components/spinner/test/spinner.test.js +30 -0
- package/src/lib/LeuElement.js +19 -11
- package/src/styles/custom-properties.css +8 -3
- package/dist/LeuElement-ba5ea33d.d.ts.map +0 -1
package/dist/theme.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
:root
|
|
1
|
+
:root,
|
|
2
|
+
:host {
|
|
2
3
|
--leu-color-black-100: #000;
|
|
3
4
|
--leu-color-black-80: #333;
|
|
4
5
|
--leu-color-black-60: #666;
|
|
@@ -42,8 +43,12 @@
|
|
|
42
43
|
--leu-color-func-red: #d93c1a;
|
|
43
44
|
--leu-color-func-green: #1a7f1f;
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
--leu-font-family-
|
|
46
|
+
/* stylelint-disable value-keyword-case */
|
|
47
|
+
--leu-font-family-regular: InterRegular, HelveticaNowRegular, Helvetica,
|
|
48
|
+
sans-serif;
|
|
49
|
+
--leu-font-family-black: InterBlack, HelveticaNowBlack, Arial Black, Helvetica,
|
|
50
|
+
sans-serif;
|
|
51
|
+
/* stylelint-enable value-keyword-case */
|
|
47
52
|
|
|
48
53
|
--leu-box-shadow-short: 0px 0px 2px var(--leu-color-black-transp-40);
|
|
49
54
|
--leu-box-shadow-regular: 0px 0px 16px var(--leu-color-black-transp-20);
|
|
@@ -260,7 +265,8 @@
|
|
|
260
265
|
--leu-t-curve-180-black-font: var(--leu-t-70-black-font);
|
|
261
266
|
}
|
|
262
267
|
@media (min-width: 600px) {
|
|
263
|
-
:root
|
|
268
|
+
:root,
|
|
269
|
+
:host {
|
|
264
270
|
--leu-t-curve-35-black-font-size: var(--leu-t-35-black-font-size);
|
|
265
271
|
--leu-t-curve-35-black-line-height: var(--leu-t-35-black-line-height);
|
|
266
272
|
--leu-t-curve-35-black-spacing: var(--leu-t-35-black-spacing);
|
|
@@ -268,7 +274,8 @@
|
|
|
268
274
|
}
|
|
269
275
|
}
|
|
270
276
|
@media (min-width: 600px) {
|
|
271
|
-
:root
|
|
277
|
+
:root,
|
|
278
|
+
:host {
|
|
272
279
|
--leu-t-curve-45-black-font-size: var(--leu-t-40-black-font-size);
|
|
273
280
|
--leu-t-curve-45-black-line-height: var(--leu-t-40-black-line-height);
|
|
274
281
|
--leu-t-curve-45-black-spacing: var(--leu-t-40-black-spacing);
|
|
@@ -276,7 +283,8 @@
|
|
|
276
283
|
}
|
|
277
284
|
}
|
|
278
285
|
@media (min-width: 1024px) {
|
|
279
|
-
:root
|
|
286
|
+
:root,
|
|
287
|
+
:host {
|
|
280
288
|
--leu-t-curve-45-black-font-size: var(--leu-t-45-black-font-size);
|
|
281
289
|
--leu-t-curve-45-black-line-height: var(--leu-t-45-black-line-height);
|
|
282
290
|
--leu-t-curve-45-black-spacing: var(--leu-t-45-black-spacing);
|
|
@@ -284,7 +292,8 @@
|
|
|
284
292
|
}
|
|
285
293
|
}
|
|
286
294
|
@media (min-width: 400px) {
|
|
287
|
-
:root
|
|
295
|
+
:root,
|
|
296
|
+
:host {
|
|
288
297
|
--leu-t-curve-50-black-font-size: var(--leu-t-45-black-font-size);
|
|
289
298
|
--leu-t-curve-50-black-line-height: var(--leu-t-45-black-line-height);
|
|
290
299
|
--leu-t-curve-50-black-spacing: var(--leu-t-45-black-spacing);
|
|
@@ -292,7 +301,8 @@
|
|
|
292
301
|
}
|
|
293
302
|
}
|
|
294
303
|
@media (min-width: 1280px) {
|
|
295
|
-
:root
|
|
304
|
+
:root,
|
|
305
|
+
:host {
|
|
296
306
|
--leu-t-curve-50-black-font-size: var(--leu-t-50-black-font-size);
|
|
297
307
|
--leu-t-curve-50-black-line-height: var(--leu-t-50-black-line-height);
|
|
298
308
|
--leu-t-curve-50-black-spacing: var(--leu-t-50-black-spacing);
|
|
@@ -300,7 +310,8 @@
|
|
|
300
310
|
}
|
|
301
311
|
}
|
|
302
312
|
@media (min-width: 600px) {
|
|
303
|
-
:root
|
|
313
|
+
:root,
|
|
314
|
+
:host {
|
|
304
315
|
--leu-t-curve-60-black-font-size: var(--leu-t-50-black-font-size);
|
|
305
316
|
--leu-t-curve-60-black-line-height: var(--leu-t-50-black-line-height);
|
|
306
317
|
--leu-t-curve-60-black-spacing: var(--leu-t-50-black-spacing);
|
|
@@ -308,7 +319,8 @@
|
|
|
308
319
|
}
|
|
309
320
|
}
|
|
310
321
|
@media (min-width: 1280px) {
|
|
311
|
-
:root
|
|
322
|
+
:root,
|
|
323
|
+
:host {
|
|
312
324
|
--leu-t-curve-60-black-font-size: var(--leu-t-60-black-font-size);
|
|
313
325
|
--leu-t-curve-60-black-line-height: var(--leu-t-60-black-line-height);
|
|
314
326
|
--leu-t-curve-60-black-spacing: var(--leu-t-60-black-spacing);
|
|
@@ -316,7 +328,8 @@
|
|
|
316
328
|
}
|
|
317
329
|
}
|
|
318
330
|
@media (min-width: 400px) {
|
|
319
|
-
:root
|
|
331
|
+
:root,
|
|
332
|
+
:host {
|
|
320
333
|
--leu-t-curve-70-black-font-size: var(--leu-t-50-black-font-size);
|
|
321
334
|
--leu-t-curve-70-black-line-height: var(--leu-t-50-black-line-height);
|
|
322
335
|
--leu-t-curve-70-black-spacing: var(--leu-t-50-black-spacing);
|
|
@@ -324,7 +337,8 @@
|
|
|
324
337
|
}
|
|
325
338
|
}
|
|
326
339
|
@media (min-width: 1024px) {
|
|
327
|
-
:root
|
|
340
|
+
:root,
|
|
341
|
+
:host {
|
|
328
342
|
--leu-t-curve-70-black-font-size: var(--leu-t-60-black-font-size);
|
|
329
343
|
--leu-t-curve-70-black-line-height: var(--leu-t-60-black-line-height);
|
|
330
344
|
--leu-t-curve-70-black-spacing: var(--leu-t-60-black-spacing);
|
|
@@ -332,7 +346,8 @@
|
|
|
332
346
|
}
|
|
333
347
|
}
|
|
334
348
|
@media (min-width: 1280px) {
|
|
335
|
-
:root
|
|
349
|
+
:root,
|
|
350
|
+
:host {
|
|
336
351
|
--leu-t-curve-70-black-font-size: var(--leu-t-70-black-font-size);
|
|
337
352
|
--leu-t-curve-70-black-line-height: var(--leu-t-70-black-line-height);
|
|
338
353
|
--leu-t-curve-70-black-spacing: var(--leu-t-70-black-spacing);
|
|
@@ -340,7 +355,8 @@
|
|
|
340
355
|
}
|
|
341
356
|
}
|
|
342
357
|
@media (min-width: 600px) {
|
|
343
|
-
:root
|
|
358
|
+
:root,
|
|
359
|
+
:host {
|
|
344
360
|
--leu-t-curve-80-black-font-size: var(--leu-t-60-black-font-size);
|
|
345
361
|
--leu-t-curve-80-black-line-height: var(--leu-t-60-black-line-height);
|
|
346
362
|
--leu-t-curve-80-black-spacing: var(--leu-t-60-black-spacing);
|
|
@@ -348,7 +364,8 @@
|
|
|
348
364
|
}
|
|
349
365
|
}
|
|
350
366
|
@media (min-width: 1024px) {
|
|
351
|
-
:root
|
|
367
|
+
:root,
|
|
368
|
+
:host {
|
|
352
369
|
--leu-t-curve-80-black-font-size: var(--leu-t-70-black-font-size);
|
|
353
370
|
--leu-t-curve-80-black-line-height: var(--leu-t-70-black-line-height);
|
|
354
371
|
--leu-t-curve-80-black-spacing: var(--leu-t-70-black-spacing);
|
|
@@ -356,7 +373,8 @@
|
|
|
356
373
|
}
|
|
357
374
|
}
|
|
358
375
|
@media (min-width: 1280px) {
|
|
359
|
-
:root
|
|
376
|
+
:root,
|
|
377
|
+
:host {
|
|
360
378
|
--leu-t-curve-80-black-font-size: var(--leu-t-80-black-font-size);
|
|
361
379
|
--leu-t-curve-80-black-line-height: var(--leu-t-80-black-line-height);
|
|
362
380
|
--leu-t-curve-80-black-spacing: var(--leu-t-80-black-spacing);
|
|
@@ -364,7 +382,8 @@
|
|
|
364
382
|
}
|
|
365
383
|
}
|
|
366
384
|
@media (min-width: 600px) {
|
|
367
|
-
:root
|
|
385
|
+
:root,
|
|
386
|
+
:host {
|
|
368
387
|
--leu-t-curve-120-black-font-size: var(--leu-t-70-black-font-size);
|
|
369
388
|
--leu-t-curve-120-black-line-height: var(--leu-t-70-black-line-height);
|
|
370
389
|
--leu-t-curve-120-black-spacing: var(--leu-t-70-black-spacing);
|
|
@@ -372,7 +391,8 @@
|
|
|
372
391
|
}
|
|
373
392
|
}
|
|
374
393
|
@media (min-width: 840px) {
|
|
375
|
-
:root
|
|
394
|
+
:root,
|
|
395
|
+
:host {
|
|
376
396
|
--leu-t-curve-120-black-font-size: var(--leu-t-80-black-font-size);
|
|
377
397
|
--leu-t-curve-120-black-line-height: var(--leu-t-80-black-line-height);
|
|
378
398
|
--leu-t-curve-120-black-spacing: var(--leu-t-80-black-spacing);
|
|
@@ -380,7 +400,8 @@
|
|
|
380
400
|
}
|
|
381
401
|
}
|
|
382
402
|
@media (min-width: 1024px) {
|
|
383
|
-
:root
|
|
403
|
+
:root,
|
|
404
|
+
:host {
|
|
384
405
|
--leu-t-curve-120-black-font-size: var(--leu-t-100-black-font-size);
|
|
385
406
|
--leu-t-curve-120-black-line-height: var(--leu-t-100-black-line-height);
|
|
386
407
|
--leu-t-curve-120-black-spacing: var(--leu-t-100-black-spacing);
|
|
@@ -388,7 +409,8 @@
|
|
|
388
409
|
}
|
|
389
410
|
}
|
|
390
411
|
@media (min-width: 1280px) {
|
|
391
|
-
:root
|
|
412
|
+
:root,
|
|
413
|
+
:host {
|
|
392
414
|
--leu-t-curve-120-black-font-size: var(--leu-t-120-black-font-size);
|
|
393
415
|
--leu-t-curve-120-black-line-height: var(--leu-t-120-black-line-height);
|
|
394
416
|
--leu-t-curve-120-black-spacing: var(--leu-t-120-black-spacing);
|
|
@@ -396,7 +418,8 @@
|
|
|
396
418
|
}
|
|
397
419
|
}
|
|
398
420
|
@media (min-width: 400px) {
|
|
399
|
-
:root
|
|
421
|
+
:root,
|
|
422
|
+
:host {
|
|
400
423
|
--leu-t-curve-180-black-font-size: var(--leu-t-80-black-font-size);
|
|
401
424
|
--leu-t-curve-180-black-line-height: var(--leu-t-80-black-line-height);
|
|
402
425
|
--leu-t-curve-180-black-spacing: var(--leu-t-80-black-spacing);
|
|
@@ -404,7 +427,8 @@
|
|
|
404
427
|
}
|
|
405
428
|
}
|
|
406
429
|
@media (min-width: 600px) {
|
|
407
|
-
:root
|
|
430
|
+
:root,
|
|
431
|
+
:host {
|
|
408
432
|
--leu-t-curve-180-black-font-size: var(--leu-t-100-black-font-size);
|
|
409
433
|
--leu-t-curve-180-black-line-height: var(--leu-t-100-black-line-height);
|
|
410
434
|
--leu-t-curve-180-black-spacing: var(--leu-t-100-black-spacing);
|
|
@@ -412,7 +436,8 @@
|
|
|
412
436
|
}
|
|
413
437
|
}
|
|
414
438
|
@media (min-width: 840px) {
|
|
415
|
-
:root
|
|
439
|
+
:root,
|
|
440
|
+
:host {
|
|
416
441
|
--leu-t-curve-180-black-font-size: var(--leu-t-120-black-font-size);
|
|
417
442
|
--leu-t-curve-180-black-line-height: var(--leu-t-120-black-line-height);
|
|
418
443
|
--leu-t-curve-180-black-spacing: var(--leu-t-120-black-spacing);
|
|
@@ -420,7 +445,8 @@
|
|
|
420
445
|
}
|
|
421
446
|
}
|
|
422
447
|
@media (min-width: 1024px) {
|
|
423
|
-
:root
|
|
448
|
+
:root,
|
|
449
|
+
:host {
|
|
424
450
|
--leu-t-curve-180-black-font-size: var(--leu-t-140-black-font-size);
|
|
425
451
|
--leu-t-curve-180-black-line-height: var(--leu-t-140-black-line-height);
|
|
426
452
|
--leu-t-curve-180-black-spacing: var(--leu-t-140-black-spacing);
|
|
@@ -428,7 +454,8 @@
|
|
|
428
454
|
}
|
|
429
455
|
}
|
|
430
456
|
@media (min-width: 1280px) {
|
|
431
|
-
:root
|
|
457
|
+
:root,
|
|
458
|
+
:host {
|
|
432
459
|
--leu-t-curve-180-black-font-size: var(--leu-t-180-black-font-size);
|
|
433
460
|
--leu-t-curve-180-black-line-height: var(--leu-t-180-black-line-height);
|
|
434
461
|
--leu-t-curve-180-black-spacing: var(--leu-t-180-black-spacing);
|
|
@@ -141,7 +141,10 @@
|
|
|
141
141
|
"name": "leu-checkbox-group",
|
|
142
142
|
"description": "\n---\n",
|
|
143
143
|
"attributes": [
|
|
144
|
-
{
|
|
144
|
+
{
|
|
145
|
+
"name": "orientation",
|
|
146
|
+
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
147
|
+
},
|
|
145
148
|
{ "name": "label", "values": [] }
|
|
146
149
|
],
|
|
147
150
|
"references": [
|
|
@@ -196,9 +199,14 @@
|
|
|
196
199
|
},
|
|
197
200
|
{
|
|
198
201
|
"name": "leu-chip-removable",
|
|
199
|
-
"description": "\n---\n\n\n### **Events:**\n - **remove** - Dispatched when the user clicks on the chip\n\n### **Slots:**\n - _default_ - The content of the chip",
|
|
202
|
+
"description": "\n---\n\n\n### **Events:**\n - **remove** - Dispatched when the user clicks on the chip\n\n### **Methods:**\n - **getValue(): _string_** - Returns the value of the chip. If `value` is not set, it will return the text content\n\n### **Slots:**\n - _default_ - The content of the chip",
|
|
200
203
|
"attributes": [
|
|
201
204
|
{ "name": "", "values": [] },
|
|
205
|
+
{
|
|
206
|
+
"name": "value",
|
|
207
|
+
"description": "The value of the chip.",
|
|
208
|
+
"values": []
|
|
209
|
+
},
|
|
202
210
|
{ "name": "inverted", "values": [] }
|
|
203
211
|
],
|
|
204
212
|
"references": [
|
|
@@ -210,7 +218,7 @@
|
|
|
210
218
|
},
|
|
211
219
|
{
|
|
212
220
|
"name": "leu-chip-selectable",
|
|
213
|
-
"description": "A chip component that can be selected.\n---\n\n\n### **Events:**\n - **input** - undefined\n\n### **Slots:**\n - _default_ - The content of the chip",
|
|
221
|
+
"description": "A chip component that can be selected.\n---\n\n\n### **Events:**\n - **input** - undefined\n\n### **Methods:**\n - **getValue(): _string_** - Returns the value of the chip. If `value` is not set, it will return the text content\n\n### **Slots:**\n - _default_ - The content of the chip",
|
|
214
222
|
"attributes": [
|
|
215
223
|
{ "name": "", "values": [] },
|
|
216
224
|
{
|
|
@@ -412,6 +420,11 @@
|
|
|
412
420
|
"description": "Defines if the item is selected or checked",
|
|
413
421
|
"values": []
|
|
414
422
|
},
|
|
423
|
+
{
|
|
424
|
+
"name": "multipleSelection",
|
|
425
|
+
"description": "If the item is part of a multiple selection. Renders a checkmark before the label when active",
|
|
426
|
+
"values": []
|
|
427
|
+
},
|
|
415
428
|
{
|
|
416
429
|
"name": "disabled",
|
|
417
430
|
"description": "Disables the underlying button or link",
|
|
@@ -516,7 +529,10 @@
|
|
|
516
529
|
"name": "leu-radio-group",
|
|
517
530
|
"description": "\n---\n",
|
|
518
531
|
"attributes": [
|
|
519
|
-
{
|
|
532
|
+
{
|
|
533
|
+
"name": "orientation",
|
|
534
|
+
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
535
|
+
},
|
|
520
536
|
{ "name": "label", "values": [] }
|
|
521
537
|
],
|
|
522
538
|
"references": [
|
|
@@ -592,6 +608,17 @@
|
|
|
592
608
|
}
|
|
593
609
|
]
|
|
594
610
|
},
|
|
611
|
+
{
|
|
612
|
+
"name": "leu-spinner",
|
|
613
|
+
"description": "\n---\n\n\n### **CSS Properties:**\n - **--leu-spinner-size** - The size of the spinner. _(default: undefined)_",
|
|
614
|
+
"attributes": [],
|
|
615
|
+
"references": [
|
|
616
|
+
{
|
|
617
|
+
"name": "Documentation",
|
|
618
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/spinner"
|
|
619
|
+
}
|
|
620
|
+
]
|
|
621
|
+
},
|
|
595
622
|
{
|
|
596
623
|
"name": "leu-table",
|
|
597
624
|
"description": "\n---\n",
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type { LeuRadio } from "../Radio.js";
|
|
|
21
21
|
import type { LeuRadioGroup } from "../RadioGroup.js";
|
|
22
22
|
import type { LeuScrollTop } from "../ScrollTop.js";
|
|
23
23
|
import type { LeuSelect } from "../Select.js";
|
|
24
|
+
import type { LeuSpinner } from "../Spinner.js";
|
|
24
25
|
import type { LeuTable } from "../Table.js";
|
|
25
26
|
import type { LeuVisuallyHidden } from "../VisuallyHidden.js";
|
|
26
27
|
|
|
@@ -142,6 +143,8 @@ type LeuChipLinkProps = {
|
|
|
142
143
|
type LeuChipRemovableProps = {
|
|
143
144
|
/** */
|
|
144
145
|
""?: LeuChipRemovable[""];
|
|
146
|
+
/** The value of the chip. */
|
|
147
|
+
value?: LeuChipRemovable["value"];
|
|
145
148
|
/** */
|
|
146
149
|
inverted?: LeuChipRemovable["inverted"];
|
|
147
150
|
/** */
|
|
@@ -253,6 +256,8 @@ type LeuMenuProps = {
|
|
|
253
256
|
type LeuMenuItemProps = {
|
|
254
257
|
/** Defines if the item is selected or checked */
|
|
255
258
|
active?: LeuMenuItem["active"];
|
|
259
|
+
/** If the item is part of a multiple selection. Renders a checkmark before the label when active */
|
|
260
|
+
multipleSelection?: LeuMenuItem["multipleSelection"];
|
|
256
261
|
/** Disables the underlying button or link */
|
|
257
262
|
disabled?: LeuMenuItem["disabled"];
|
|
258
263
|
/** If the item should be focusable. Will be reflected as `tabindex` to the underlying button or link */
|
|
@@ -381,6 +386,8 @@ type LeuSelectProps = {
|
|
|
381
386
|
_menuRef?: LeuSelect["_menuRef"];
|
|
382
387
|
};
|
|
383
388
|
|
|
389
|
+
type LeuSpinnerProps = {};
|
|
390
|
+
|
|
384
391
|
type LeuTableProps = {
|
|
385
392
|
/** */
|
|
386
393
|
columns?: LeuTable["columns"];
|
|
@@ -530,6 +537,9 @@ export type CustomElements = {
|
|
|
530
537
|
* ### **Events:**
|
|
531
538
|
* - **remove** - Dispatched when the user clicks on the chip
|
|
532
539
|
*
|
|
540
|
+
* ### **Methods:**
|
|
541
|
+
* - **getValue(): _string_** - Returns the value of the chip. If `value` is not set, it will return the text content
|
|
542
|
+
*
|
|
533
543
|
* ### **Slots:**
|
|
534
544
|
* - _default_ - The content of the chip
|
|
535
545
|
*/
|
|
@@ -543,6 +553,9 @@ export type CustomElements = {
|
|
|
543
553
|
* ### **Events:**
|
|
544
554
|
* - **input** - undefined
|
|
545
555
|
*
|
|
556
|
+
* ### **Methods:**
|
|
557
|
+
* - **getValue(): _string_** - Returns the value of the chip. If `value` is not set, it will return the text content
|
|
558
|
+
*
|
|
546
559
|
* ### **Slots:**
|
|
547
560
|
* - _default_ - The content of the chip
|
|
548
561
|
*/
|
|
@@ -666,6 +679,16 @@ export type CustomElements = {
|
|
|
666
679
|
*/
|
|
667
680
|
"leu-select": DefineComponent<LeuSelectProps>;
|
|
668
681
|
|
|
682
|
+
/**
|
|
683
|
+
*
|
|
684
|
+
* ---
|
|
685
|
+
*
|
|
686
|
+
*
|
|
687
|
+
* ### **CSS Properties:**
|
|
688
|
+
* - **--leu-spinner-size** - The size of the spinner. _(default: undefined)_
|
|
689
|
+
*/
|
|
690
|
+
"leu-spinner": DefineComponent<LeuSpinnerProps>;
|
|
691
|
+
|
|
669
692
|
/**
|
|
670
693
|
*
|
|
671
694
|
* ---
|
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.9.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -286,14 +286,20 @@
|
|
|
286
286
|
"attributes": [
|
|
287
287
|
{
|
|
288
288
|
"name": "orientation",
|
|
289
|
-
"value": {
|
|
289
|
+
"value": {
|
|
290
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
291
|
+
"default": "\"horizontal\""
|
|
292
|
+
}
|
|
290
293
|
},
|
|
291
294
|
{ "name": "label", "value": { "type": "string" } }
|
|
292
295
|
],
|
|
293
296
|
"events": [],
|
|
294
297
|
"js": {
|
|
295
298
|
"properties": [
|
|
296
|
-
{
|
|
299
|
+
{
|
|
300
|
+
"name": "orientation",
|
|
301
|
+
"value": { "type": "\"horizontal\" | \"vertical\"" }
|
|
302
|
+
},
|
|
297
303
|
{ "name": "label", "value": { "type": "string" } }
|
|
298
304
|
],
|
|
299
305
|
"events": []
|
|
@@ -379,10 +385,15 @@
|
|
|
379
385
|
},
|
|
380
386
|
{
|
|
381
387
|
"name": "leu-chip-removable",
|
|
382
|
-
"description": "\n---\n\n\n### **Events:**\n - **remove** - Dispatched when the user clicks on the chip\n\n### **Slots:**\n - _default_ - The content of the chip",
|
|
388
|
+
"description": "\n---\n\n\n### **Events:**\n - **remove** - Dispatched when the user clicks on the chip\n\n### **Methods:**\n - **getValue(): _string_** - Returns the value of the chip. If `value` is not set, it will return the text content\n\n### **Slots:**\n - _default_ - The content of the chip",
|
|
383
389
|
"doc-url": "",
|
|
384
390
|
"attributes": [
|
|
385
391
|
{ "name": "", "value": { "type": "string" } },
|
|
392
|
+
{
|
|
393
|
+
"name": "value",
|
|
394
|
+
"description": "The value of the chip.",
|
|
395
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
396
|
+
},
|
|
386
397
|
{
|
|
387
398
|
"name": "inverted",
|
|
388
399
|
"value": { "type": "boolean", "default": "false" }
|
|
@@ -398,6 +409,11 @@
|
|
|
398
409
|
"js": {
|
|
399
410
|
"properties": [
|
|
400
411
|
{ "name": "", "value": {} },
|
|
412
|
+
{
|
|
413
|
+
"name": "value",
|
|
414
|
+
"description": "The value of the chip.",
|
|
415
|
+
"value": { "type": "string" }
|
|
416
|
+
},
|
|
401
417
|
{ "name": "inverted", "value": { "type": "boolean" } }
|
|
402
418
|
],
|
|
403
419
|
"events": [
|
|
@@ -410,7 +426,7 @@
|
|
|
410
426
|
},
|
|
411
427
|
{
|
|
412
428
|
"name": "leu-chip-selectable",
|
|
413
|
-
"description": "A chip component that can be selected.\n---\n\n\n### **Events:**\n - **input** - undefined\n\n### **Slots:**\n - _default_ - The content of the chip",
|
|
429
|
+
"description": "A chip component that can be selected.\n---\n\n\n### **Events:**\n - **input** - undefined\n\n### **Methods:**\n - **getValue(): _string_** - Returns the value of the chip. If `value` is not set, it will return the text content\n\n### **Slots:**\n - _default_ - The content of the chip",
|
|
414
430
|
"doc-url": "",
|
|
415
431
|
"attributes": [
|
|
416
432
|
{ "name": "", "value": { "type": "string" } },
|
|
@@ -435,7 +451,7 @@
|
|
|
435
451
|
{
|
|
436
452
|
"name": "value",
|
|
437
453
|
"description": "The value of the chip.",
|
|
438
|
-
"value": { "type": "string" }
|
|
454
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
439
455
|
},
|
|
440
456
|
{
|
|
441
457
|
"name": "inverted",
|
|
@@ -787,6 +803,11 @@
|
|
|
787
803
|
"description": "Defines if the item is selected or checked",
|
|
788
804
|
"value": { "type": "boolean", "default": "false" }
|
|
789
805
|
},
|
|
806
|
+
{
|
|
807
|
+
"name": "multipleSelection",
|
|
808
|
+
"description": "If the item is part of a multiple selection. Renders a checkmark before the label when active",
|
|
809
|
+
"value": { "type": "boolean", "default": "false" }
|
|
810
|
+
},
|
|
790
811
|
{
|
|
791
812
|
"name": "disabled",
|
|
792
813
|
"description": "Disables the underlying button or link",
|
|
@@ -824,6 +845,11 @@
|
|
|
824
845
|
"description": "Defines if the item is selected or checked",
|
|
825
846
|
"value": { "type": "boolean" }
|
|
826
847
|
},
|
|
848
|
+
{
|
|
849
|
+
"name": "multipleSelection",
|
|
850
|
+
"description": "If the item is part of a multiple selection. Renders a checkmark before the label when active",
|
|
851
|
+
"value": { "type": "boolean" }
|
|
852
|
+
},
|
|
827
853
|
{
|
|
828
854
|
"name": "disabled",
|
|
829
855
|
"description": "Disables the underlying button or link",
|
|
@@ -990,14 +1016,20 @@
|
|
|
990
1016
|
"attributes": [
|
|
991
1017
|
{
|
|
992
1018
|
"name": "orientation",
|
|
993
|
-
"value": {
|
|
1019
|
+
"value": {
|
|
1020
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
1021
|
+
"default": "\"horizontal\""
|
|
1022
|
+
}
|
|
994
1023
|
},
|
|
995
1024
|
{ "name": "label", "value": { "type": "string" } }
|
|
996
1025
|
],
|
|
997
1026
|
"events": [],
|
|
998
1027
|
"js": {
|
|
999
1028
|
"properties": [
|
|
1000
|
-
{
|
|
1029
|
+
{
|
|
1030
|
+
"name": "orientation",
|
|
1031
|
+
"value": { "type": "\"horizontal\" | \"vertical\"" }
|
|
1032
|
+
},
|
|
1001
1033
|
{ "name": "label", "value": { "type": "string" } }
|
|
1002
1034
|
],
|
|
1003
1035
|
"events": []
|
|
@@ -1125,6 +1157,14 @@
|
|
|
1125
1157
|
"events": []
|
|
1126
1158
|
}
|
|
1127
1159
|
},
|
|
1160
|
+
{
|
|
1161
|
+
"name": "leu-spinner",
|
|
1162
|
+
"description": "\n---\n\n\n### **CSS Properties:**\n - **--leu-spinner-size** - The size of the spinner. _(default: undefined)_",
|
|
1163
|
+
"doc-url": "",
|
|
1164
|
+
"attributes": [],
|
|
1165
|
+
"events": [],
|
|
1166
|
+
"js": { "properties": [], "events": [] }
|
|
1167
|
+
},
|
|
1128
1168
|
{
|
|
1129
1169
|
"name": "leu-table",
|
|
1130
1170
|
"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.
|
|
6
|
+
"version": "0.9.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@rollup/plugin-babel": "^6.0.4",
|
|
59
59
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
60
60
|
"@rollup/plugin-json": "^6.0.0",
|
|
61
|
+
"@rollup/plugin-replace": "^5.0.7",
|
|
61
62
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
62
63
|
"@storybook/addon-designs": "^7.0.9",
|
|
63
64
|
"@storybook/addon-essentials": "^7.6.17",
|
package/rollup.config.js
CHANGED
|
@@ -4,8 +4,17 @@ import { fileURLToPath } from "url"
|
|
|
4
4
|
import postcss from "rollup-plugin-postcss"
|
|
5
5
|
import postcssLit from "rollup-plugin-postcss-lit"
|
|
6
6
|
import { babel } from "@rollup/plugin-babel"
|
|
7
|
+
import replace from "@rollup/plugin-replace"
|
|
7
8
|
|
|
8
9
|
export const plugins = [
|
|
10
|
+
{
|
|
11
|
+
plugin: replace,
|
|
12
|
+
args: [
|
|
13
|
+
{
|
|
14
|
+
__LEU_VERSION__: JSON.stringify(process.env.npm_package_version),
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
9
18
|
{
|
|
10
19
|
plugin: postcss,
|
|
11
20
|
args: [
|
|
@@ -8,7 +8,7 @@ button {
|
|
|
8
8
|
appearance: none;
|
|
9
9
|
transition: background 0.1s ease;
|
|
10
10
|
cursor: pointer;
|
|
11
|
-
border:
|
|
11
|
+
border: none;
|
|
12
12
|
border-radius: 2px;
|
|
13
13
|
|
|
14
14
|
max-width: 100%;
|
|
@@ -33,12 +33,11 @@ button:disabled {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
button:focus-visible {
|
|
36
|
-
border: 1px solid var(--leu-color-black-0);
|
|
37
36
|
outline: 2px solid var(--leu-color-func-cyan);
|
|
37
|
+
outline-offset: 2px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
button.inverted:focus-visible {
|
|
41
|
-
border: 1px solid var(--leu-color-black-100);
|
|
42
41
|
outline: 2px solid var(--leu-color-black-0);
|
|
43
42
|
}
|
|
44
43
|
|
|
@@ -59,7 +59,7 @@ export class LeuCheckbox extends LeuElement {
|
|
|
59
59
|
@input=${this.handleInput}
|
|
60
60
|
.checked=${this.checked}
|
|
61
61
|
?disabled=${this.disabled}
|
|
62
|
-
.value=${this.value}
|
|
62
|
+
.value=${this.value ?? ""}
|
|
63
63
|
/>
|
|
64
64
|
<label for=${`checkbox-${this.name}`} class="label"><slot></slot></label>
|
|
65
65
|
<leu-icon class="icon" name="check"></leu-icon>
|
|
@@ -19,7 +19,8 @@ export class LeuCheckboxGroup extends LeuElement {
|
|
|
19
19
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super()
|
|
22
|
-
|
|
22
|
+
/** @type {"horizontal" | "vertical"} */
|
|
23
|
+
this.orientation = "horizontal"
|
|
23
24
|
this.items = []
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -38,7 +39,7 @@ export class LeuCheckboxGroup extends LeuElement {
|
|
|
38
39
|
render() {
|
|
39
40
|
const fieldsetClasses = {
|
|
40
41
|
fieldset: "true",
|
|
41
|
-
"fieldset--vertical": this.orientation === "
|
|
42
|
+
"fieldset--vertical": this.orientation === "vertical",
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
return html`
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
argTypes: {
|
|
10
10
|
legend: { control: "text" },
|
|
11
11
|
orientation: {
|
|
12
|
-
options: ["
|
|
12
|
+
options: ["vertical", "horizontal"],
|
|
13
13
|
control: { type: "checkbox" },
|
|
14
14
|
},
|
|
15
15
|
},
|
|
@@ -49,11 +49,11 @@ HorizontalLabel.args = {
|
|
|
49
49
|
|
|
50
50
|
export const Vertical = Template.bind({})
|
|
51
51
|
Vertical.args = {
|
|
52
|
-
orientation: "
|
|
52
|
+
orientation: "vertical",
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export const VerticalLabel = Template.bind({})
|
|
56
56
|
VerticalLabel.args = {
|
|
57
|
-
orientation: "
|
|
57
|
+
orientation: "vertical",
|
|
58
58
|
label: "Anrede",
|
|
59
59
|
}
|
|
@@ -17,9 +17,14 @@ export default {
|
|
|
17
17
|
},
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function Template({ label = "Label", value, checked, disabled }) {
|
|
20
|
+
function Template({ label = "Label", value, checked, disabled, name = "" }) {
|
|
21
21
|
return html`
|
|
22
|
-
<leu-checkbox
|
|
22
|
+
<leu-checkbox
|
|
23
|
+
.value=${value}
|
|
24
|
+
?checked=${checked}
|
|
25
|
+
?disabled=${disabled}
|
|
26
|
+
name=${name}
|
|
27
|
+
>
|
|
23
28
|
${label}
|
|
24
29
|
</leu-checkbox>
|
|
25
30
|
`
|