@statistikzh/leu 0.22.1 → 0.24.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/.github/workflows/ci.yml +8 -8
- package/.github/workflows/deploy-github-pages.yaml +2 -2
- package/.github/workflows/publish.yml +30 -0
- package/.github/workflows/release-please.yml +1 -19
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +25 -0
- package/dist/Accordion.js +1 -1
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/ChartWrapper.js +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/CheckboxGroup.js +1 -1
- 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 +1 -1
- package/dist/FileInput.d.ts +0 -1
- package/dist/FileInput.js +1 -35
- package/dist/Icon.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/{LeuElement-DfsEye-A.js → LeuElement-BfbOWTGZ.js} +1 -1
- package/dist/Menu.js +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Message.js +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/Placeholder.js +1 -1
- package/dist/Popup.d.ts +16 -0
- package/dist/Popup.js +20 -2
- package/dist/ProgressBar.js +1 -1
- package/dist/Radio.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/Range.d.ts +51 -0
- package/dist/Range.js +143 -5
- package/dist/ScrollTop.js +1 -1
- package/dist/Select.js +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/Tag.js +1 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/components/file-input/FileInput.d.ts +2 -2
- package/dist/components/file-input/FileInput.d.ts.map +1 -1
- package/dist/components/popup/Popup.d.ts +16 -0
- package/dist/components/popup/Popup.d.ts.map +1 -1
- package/dist/components/popup/stories/popup.stories.d.ts +2 -0
- package/dist/components/popup/stories/popup.stories.d.ts.map +1 -1
- package/dist/components/range/Range.d.ts +51 -0
- package/dist/components/range/Range.d.ts.map +1 -1
- package/dist/components/range/stories/range.stories.d.ts +230 -0
- package/dist/components/range/stories/range.stories.d.ts.map +1 -0
- package/dist/components/range/test/range.test.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/leu-accordion.js +1 -1
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.js +1 -1
- package/dist/leu-chart-wrapper.js +1 -1
- 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 +1 -1
- package/dist/leu-dropdown.js +1 -1
- package/dist/leu-file-input.d.ts +0 -1
- package/dist/leu-file-input.js +1 -35
- 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-message.js +1 -1
- package/dist/leu-pagination.js +1 -1
- package/dist/leu-placeholder.js +1 -1
- package/dist/leu-popup.js +1 -1
- package/dist/leu-progress-bar.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 +1 -1
- package/dist/leu-select.js +1 -1
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.js +1 -1
- package/dist/leu-tag.js +1 -1
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/vscode.html-custom-data.json +149 -85
- package/dist/vue/index.d.ts +125 -100
- package/dist/web-types.json +298 -174
- package/package.json +6 -2
- package/src/components/file-input/FileInput.ts +2 -2
- package/src/components/popup/Popup.ts +37 -0
- package/src/components/popup/stories/popup.stories.ts +10 -0
- package/src/components/popup/test/popup.test.ts +27 -0
- package/src/components/range/Range.ts +102 -3
- package/src/components/range/range.css +48 -1
- package/src/components/range/stories/range.stories.ts +182 -0
- package/src/components/range/test/range.test.ts +151 -6
- package/web-test-runner.config.mjs +10 -0
- package/dist/components/range/stories/range-slider.stories.d.ts +0 -26
- package/dist/components/range/stories/range-slider.stories.d.ts.map +0 -1
- package/src/components/range/stories/range-slider.stories.ts +0 -142
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.24.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -211,6 +211,33 @@
|
|
|
211
211
|
"events": []
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
|
+
{
|
|
215
|
+
"name": "leu-button-group",
|
|
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",
|
|
217
|
+
"doc-url": "",
|
|
218
|
+
"attributes": [],
|
|
219
|
+
"slots": [{ "name": "", "description": "Slot for the buttons" }],
|
|
220
|
+
"events": [
|
|
221
|
+
{
|
|
222
|
+
"name": "input",
|
|
223
|
+
"description": "When the value of the group changes by clicking a button"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"js": {
|
|
227
|
+
"properties": [
|
|
228
|
+
{
|
|
229
|
+
"name": "value",
|
|
230
|
+
"description": "The value of the currently selected (active) button"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"events": [
|
|
234
|
+
{
|
|
235
|
+
"name": "input",
|
|
236
|
+
"description": "When the value of the group changes by clicking a button"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
},
|
|
214
241
|
{
|
|
215
242
|
"name": "leu-checkbox",
|
|
216
243
|
"description": "\n---\n",
|
|
@@ -284,33 +311,6 @@
|
|
|
284
311
|
"events": []
|
|
285
312
|
}
|
|
286
313
|
},
|
|
287
|
-
{
|
|
288
|
-
"name": "leu-button-group",
|
|
289
|
-
"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",
|
|
290
|
-
"doc-url": "",
|
|
291
|
-
"attributes": [],
|
|
292
|
-
"slots": [{ "name": "", "description": "Slot for the buttons" }],
|
|
293
|
-
"events": [
|
|
294
|
-
{
|
|
295
|
-
"name": "input",
|
|
296
|
-
"description": "When the value of the group changes by clicking a button"
|
|
297
|
-
}
|
|
298
|
-
],
|
|
299
|
-
"js": {
|
|
300
|
-
"properties": [
|
|
301
|
-
{
|
|
302
|
-
"name": "value",
|
|
303
|
-
"description": "The value of the currently selected (active) button"
|
|
304
|
-
}
|
|
305
|
-
],
|
|
306
|
-
"events": [
|
|
307
|
-
{
|
|
308
|
-
"name": "input",
|
|
309
|
-
"description": "When the value of the group changes by clicking a button"
|
|
310
|
-
}
|
|
311
|
-
]
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
314
|
{
|
|
315
315
|
"name": "leu-chart-wrapper",
|
|
316
316
|
"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.",
|
|
@@ -354,143 +354,6 @@
|
|
|
354
354
|
"events": []
|
|
355
355
|
}
|
|
356
356
|
},
|
|
357
|
-
{
|
|
358
|
-
"name": "leu-dropdown",
|
|
359
|
-
"description": "\n---\n",
|
|
360
|
-
"doc-url": "",
|
|
361
|
-
"attributes": [
|
|
362
|
-
{
|
|
363
|
-
"name": "label",
|
|
364
|
-
"value": { "type": "string", "default": "\"\"" }
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
"name": "expanded",
|
|
368
|
-
"value": { "type": "boolean", "default": "false" }
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
"name": "inverted",
|
|
372
|
-
"value": { "type": "boolean", "default": "false" }
|
|
373
|
-
}
|
|
374
|
-
],
|
|
375
|
-
"events": [],
|
|
376
|
-
"js": {
|
|
377
|
-
"properties": [
|
|
378
|
-
{ "name": "label", "type": "string" },
|
|
379
|
-
{ "name": "expanded", "type": "boolean" },
|
|
380
|
-
{ "name": "inverted", "type": "boolean" }
|
|
381
|
-
],
|
|
382
|
-
"events": []
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
"name": "leu-dialog",
|
|
387
|
-
"description": "\n---\n",
|
|
388
|
-
"doc-url": "",
|
|
389
|
-
"attributes": [
|
|
390
|
-
{
|
|
391
|
-
"name": "label",
|
|
392
|
-
"value": { "type": "string", "default": "\"\"" }
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
"name": "sublabel",
|
|
396
|
-
"value": { "type": "string", "default": "\"\"" }
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
"name": "open",
|
|
400
|
-
"value": { "type": "boolean", "default": "false" }
|
|
401
|
-
}
|
|
402
|
-
],
|
|
403
|
-
"events": [],
|
|
404
|
-
"js": {
|
|
405
|
-
"properties": [
|
|
406
|
-
{ "name": "label", "type": "string" },
|
|
407
|
-
{ "name": "sublabel", "type": "string" },
|
|
408
|
-
{ "name": "open", "type": "boolean" }
|
|
409
|
-
],
|
|
410
|
-
"events": []
|
|
411
|
-
}
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
"name": "leu-file-input",
|
|
415
|
-
"description": "\n---\n\n\n### **Events:**\n - **input**\n- **change**",
|
|
416
|
-
"doc-url": "",
|
|
417
|
-
"attributes": [
|
|
418
|
-
{
|
|
419
|
-
"name": "label",
|
|
420
|
-
"value": { "type": "string", "default": "\"\"" }
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
"name": "accept",
|
|
424
|
-
"description": "A list of acceptable file types. Must be a comma-separated list of [unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers).",
|
|
425
|
-
"value": { "type": "string", "default": "\"\"" }
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
"name": "disabled",
|
|
429
|
-
"description": "Whether the file input is disabled.",
|
|
430
|
-
"value": { "type": "boolean", "default": "false" }
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
"name": "multiple",
|
|
434
|
-
"description": "Whether the file input allows multiple files.",
|
|
435
|
-
"value": { "type": "boolean", "default": "false" }
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
"name": "required",
|
|
439
|
-
"description": "Whether the file input is required.",
|
|
440
|
-
"value": { "type": "boolean", "default": "false" }
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
"name": "variant",
|
|
444
|
-
"description": "The variant of the file list item. `filled` renders a gray background.",
|
|
445
|
-
"value": {
|
|
446
|
-
"type": "\"filled\" | \"transparent\"",
|
|
447
|
-
"default": "\"filled\""
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
],
|
|
451
|
-
"events": [
|
|
452
|
-
{ "name": "input", "type": "CustomEvent" },
|
|
453
|
-
{ "name": "change", "type": "CustomEvent" }
|
|
454
|
-
],
|
|
455
|
-
"js": {
|
|
456
|
-
"properties": [
|
|
457
|
-
{ "name": "label", "type": "string" },
|
|
458
|
-
{
|
|
459
|
-
"name": "accept",
|
|
460
|
-
"description": "A list of acceptable file types. Must be a comma-separated list of [unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers).",
|
|
461
|
-
"type": "string"
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
"name": "disabled",
|
|
465
|
-
"description": "Whether the file input is disabled.",
|
|
466
|
-
"type": "boolean"
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
"name": "multiple",
|
|
470
|
-
"description": "Whether the file input allows multiple files.",
|
|
471
|
-
"type": "boolean"
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
"name": "required",
|
|
475
|
-
"description": "Whether the file input is required.",
|
|
476
|
-
"type": "boolean"
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
"name": "variant",
|
|
480
|
-
"description": "The variant of the file list item. `filled` renders a gray background.",
|
|
481
|
-
"type": "\"filled\" | \"transparent\""
|
|
482
|
-
},
|
|
483
|
-
{ "name": "files", "type": "File[]" },
|
|
484
|
-
{ "name": "input", "type": "HTMLInputElement" },
|
|
485
|
-
{ "name": "form" },
|
|
486
|
-
{ "name": "name" }
|
|
487
|
-
],
|
|
488
|
-
"events": [
|
|
489
|
-
{ "name": "input", "type": "CustomEvent" },
|
|
490
|
-
{ "name": "change", "type": "CustomEvent" }
|
|
491
|
-
]
|
|
492
|
-
}
|
|
493
|
-
},
|
|
494
357
|
{
|
|
495
358
|
"name": "leu-chip-group",
|
|
496
359
|
"description": "\n---\n\n\n### **Slots:**\n - _default_ - Place leu-chip-* elements inside this slot\n\n### **CSS Properties:**\n - **--leu-chip-group-gap** - The gap between the chips _(default: undefined)_",
|
|
@@ -686,6 +549,115 @@
|
|
|
686
549
|
"events": [{ "name": "input", "type": "CustomEvent" }]
|
|
687
550
|
}
|
|
688
551
|
},
|
|
552
|
+
{
|
|
553
|
+
"name": "leu-dropdown",
|
|
554
|
+
"description": "\n---\n",
|
|
555
|
+
"doc-url": "",
|
|
556
|
+
"attributes": [
|
|
557
|
+
{
|
|
558
|
+
"name": "label",
|
|
559
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"name": "expanded",
|
|
563
|
+
"value": { "type": "boolean", "default": "false" }
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"name": "inverted",
|
|
567
|
+
"value": { "type": "boolean", "default": "false" }
|
|
568
|
+
}
|
|
569
|
+
],
|
|
570
|
+
"events": [],
|
|
571
|
+
"js": {
|
|
572
|
+
"properties": [
|
|
573
|
+
{ "name": "label", "type": "string" },
|
|
574
|
+
{ "name": "expanded", "type": "boolean" },
|
|
575
|
+
{ "name": "inverted", "type": "boolean" }
|
|
576
|
+
],
|
|
577
|
+
"events": []
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "leu-file-input",
|
|
582
|
+
"description": "\n---\n\n\n### **Events:**\n - **input**\n- **change**",
|
|
583
|
+
"doc-url": "",
|
|
584
|
+
"attributes": [
|
|
585
|
+
{
|
|
586
|
+
"name": "label",
|
|
587
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"name": "accept",
|
|
591
|
+
"description": "A list of acceptable file types. Must be a comma-separated list of [unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers).",
|
|
592
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "disabled",
|
|
596
|
+
"description": "Whether the file input is disabled.",
|
|
597
|
+
"value": { "type": "boolean", "default": "false" }
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "multiple",
|
|
601
|
+
"description": "Whether the file input allows multiple files.",
|
|
602
|
+
"value": { "type": "boolean", "default": "false" }
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"name": "required",
|
|
606
|
+
"description": "Whether the file input is required.",
|
|
607
|
+
"value": { "type": "boolean", "default": "false" }
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"name": "variant",
|
|
611
|
+
"description": "The variant of the file list item. `filled` renders a gray background.",
|
|
612
|
+
"value": {
|
|
613
|
+
"type": "\"filled\" | \"transparent\"",
|
|
614
|
+
"default": "\"filled\""
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
"events": [
|
|
619
|
+
{ "name": "input", "type": "CustomEvent" },
|
|
620
|
+
{ "name": "change", "type": "CustomEvent" }
|
|
621
|
+
],
|
|
622
|
+
"js": {
|
|
623
|
+
"properties": [
|
|
624
|
+
{ "name": "label", "type": "string" },
|
|
625
|
+
{
|
|
626
|
+
"name": "accept",
|
|
627
|
+
"description": "A list of acceptable file types. Must be a comma-separated list of [unique file type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers).",
|
|
628
|
+
"type": "string"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"name": "disabled",
|
|
632
|
+
"description": "Whether the file input is disabled.",
|
|
633
|
+
"type": "boolean"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"name": "multiple",
|
|
637
|
+
"description": "Whether the file input allows multiple files.",
|
|
638
|
+
"type": "boolean"
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
"name": "required",
|
|
642
|
+
"description": "Whether the file input is required.",
|
|
643
|
+
"type": "boolean"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"name": "variant",
|
|
647
|
+
"description": "The variant of the file list item. `filled` renders a gray background.",
|
|
648
|
+
"type": "\"filled\" | \"transparent\""
|
|
649
|
+
},
|
|
650
|
+
{ "name": "files", "type": "File[]" },
|
|
651
|
+
{ "name": "input", "type": "HTMLInputElement" },
|
|
652
|
+
{ "name": "form" },
|
|
653
|
+
{ "name": "name" }
|
|
654
|
+
],
|
|
655
|
+
"events": [
|
|
656
|
+
{ "name": "input", "type": "CustomEvent" },
|
|
657
|
+
{ "name": "change", "type": "CustomEvent" }
|
|
658
|
+
]
|
|
659
|
+
}
|
|
660
|
+
},
|
|
689
661
|
{
|
|
690
662
|
"name": "leu-icon",
|
|
691
663
|
"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)_",
|
|
@@ -949,6 +921,34 @@
|
|
|
949
921
|
]
|
|
950
922
|
}
|
|
951
923
|
},
|
|
924
|
+
{
|
|
925
|
+
"name": "leu-dialog",
|
|
926
|
+
"description": "\n---\n",
|
|
927
|
+
"doc-url": "",
|
|
928
|
+
"attributes": [
|
|
929
|
+
{
|
|
930
|
+
"name": "label",
|
|
931
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"name": "sublabel",
|
|
935
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"name": "open",
|
|
939
|
+
"value": { "type": "boolean", "default": "false" }
|
|
940
|
+
}
|
|
941
|
+
],
|
|
942
|
+
"events": [],
|
|
943
|
+
"js": {
|
|
944
|
+
"properties": [
|
|
945
|
+
{ "name": "label", "type": "string" },
|
|
946
|
+
{ "name": "sublabel", "type": "string" },
|
|
947
|
+
{ "name": "open", "type": "boolean" }
|
|
948
|
+
],
|
|
949
|
+
"events": []
|
|
950
|
+
}
|
|
951
|
+
},
|
|
952
952
|
{
|
|
953
953
|
"name": "leu-menu",
|
|
954
954
|
"description": "\n---\n",
|
|
@@ -1247,6 +1247,21 @@
|
|
|
1247
1247
|
"type": "\"width\" | \"height\" | \"both\" | undefined"
|
|
1248
1248
|
}
|
|
1249
1249
|
},
|
|
1250
|
+
{
|
|
1251
|
+
"name": "offset-main-axis",
|
|
1252
|
+
"description": "Offsets the popup along the main axis.",
|
|
1253
|
+
"value": { "type": "number | undefined" }
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"name": "offset-cross-axis",
|
|
1257
|
+
"description": "Offsets the popup along the cross axis.",
|
|
1258
|
+
"value": { "type": "number | undefined" }
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
"name": "offset-alignment-axis",
|
|
1262
|
+
"description": "Offsets the popup along the alignment axis.\nOverrides the `offsetCrossAxis` value.",
|
|
1263
|
+
"value": { "type": "number | undefined" }
|
|
1264
|
+
},
|
|
1250
1265
|
{
|
|
1251
1266
|
"name": "autoSize",
|
|
1252
1267
|
"value": {
|
|
@@ -1271,6 +1286,21 @@
|
|
|
1271
1286
|
"name": "matchSize",
|
|
1272
1287
|
"type": "\"width\" | \"height\" | \"both\" | undefined"
|
|
1273
1288
|
},
|
|
1289
|
+
{
|
|
1290
|
+
"name": "offsetMainAxis",
|
|
1291
|
+
"description": "Offsets the popup along the main axis.",
|
|
1292
|
+
"type": "number | undefined"
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"name": "offsetCrossAxis",
|
|
1296
|
+
"description": "Offsets the popup along the cross axis.",
|
|
1297
|
+
"type": "number | undefined"
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
"name": "offsetAlignmentAxis",
|
|
1301
|
+
"description": "Offsets the popup along the alignment axis.\nOverrides the `offsetCrossAxis` value.",
|
|
1302
|
+
"type": "number | undefined"
|
|
1303
|
+
},
|
|
1274
1304
|
{
|
|
1275
1305
|
"name": "autoSize",
|
|
1276
1306
|
"type": "| \"width\"\n | \"height\"\n | \"both\" | undefined"
|
|
@@ -1405,37 +1435,131 @@
|
|
|
1405
1435
|
"name": "value",
|
|
1406
1436
|
"value": { "type": "array", "default": "[50]" }
|
|
1407
1437
|
},
|
|
1408
|
-
{
|
|
1409
|
-
|
|
1410
|
-
|
|
1438
|
+
{
|
|
1439
|
+
"name": "min",
|
|
1440
|
+
"description": "The minimum value of the range slider.",
|
|
1441
|
+
"value": { "type": "number", "default": "0" }
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"name": "max",
|
|
1445
|
+
"description": "The maximum value of the range slider.",
|
|
1446
|
+
"value": { "type": "number", "default": "100" }
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
"name": "step",
|
|
1450
|
+
"description": "The step size of the range slider.",
|
|
1451
|
+
"value": { "type": "number", "default": "1" }
|
|
1452
|
+
},
|
|
1411
1453
|
{
|
|
1412
1454
|
"name": "name",
|
|
1413
1455
|
"value": { "type": "string", "default": "\"\"" }
|
|
1414
1456
|
},
|
|
1415
1457
|
{
|
|
1416
1458
|
"name": "label",
|
|
1459
|
+
"description": "The label of the range slider.",
|
|
1417
1460
|
"value": { "type": "string", "default": "\"\"" }
|
|
1418
1461
|
},
|
|
1462
|
+
{
|
|
1463
|
+
"name": "hide-label",
|
|
1464
|
+
"description": "Whether to hide the label of the range slider.\nIf true, the label will still be available for screen readers\nand is only visually hidden.",
|
|
1465
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1466
|
+
},
|
|
1419
1467
|
{
|
|
1420
1468
|
"name": "disabled",
|
|
1469
|
+
"description": "Whether the range slider is disabled.",
|
|
1421
1470
|
"value": { "type": "boolean", "default": "false" }
|
|
1422
1471
|
},
|
|
1423
1472
|
{
|
|
1424
1473
|
"name": "multiple",
|
|
1474
|
+
"description": "Whether to use a range with two handles.",
|
|
1425
1475
|
"value": { "type": "boolean", "default": "false" }
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
"name": "show-ticks",
|
|
1479
|
+
"description": "Wheter to show tick marks below the range slider.\nOne tick mark per step will be rendered.",
|
|
1480
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"name": "show-range-labels",
|
|
1484
|
+
"description": "Whether to show the min and max labels below the range slider.",
|
|
1485
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
"name": "prefix",
|
|
1489
|
+
"description": "A prefix to display before the value in the output element(s).\nIs ignored if a custom valueFormatter is provided.",
|
|
1490
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
"name": "suffix",
|
|
1494
|
+
"description": "A suffix to display after the value in the output element(s).\nIs ignored if a custom valueFormatter is provided.",
|
|
1495
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
1426
1496
|
}
|
|
1427
1497
|
],
|
|
1428
1498
|
"events": [],
|
|
1429
1499
|
"js": {
|
|
1430
1500
|
"properties": [
|
|
1431
1501
|
{ "name": "defaultValue", "type": "array" },
|
|
1432
|
-
{
|
|
1433
|
-
|
|
1434
|
-
|
|
1502
|
+
{
|
|
1503
|
+
"name": "min",
|
|
1504
|
+
"description": "The minimum value of the range slider.",
|
|
1505
|
+
"type": "number"
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
"name": "max",
|
|
1509
|
+
"description": "The maximum value of the range slider.",
|
|
1510
|
+
"type": "number"
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
"name": "step",
|
|
1514
|
+
"description": "The step size of the range slider.",
|
|
1515
|
+
"type": "number"
|
|
1516
|
+
},
|
|
1435
1517
|
{ "name": "name", "type": "string" },
|
|
1436
|
-
{
|
|
1437
|
-
|
|
1438
|
-
|
|
1518
|
+
{
|
|
1519
|
+
"name": "label",
|
|
1520
|
+
"description": "The label of the range slider.",
|
|
1521
|
+
"type": "string"
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
"name": "hideLabel",
|
|
1525
|
+
"description": "Whether to hide the label of the range slider.\nIf true, the label will still be available for screen readers\nand is only visually hidden.",
|
|
1526
|
+
"type": "boolean"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"name": "disabled",
|
|
1530
|
+
"description": "Whether the range slider is disabled.",
|
|
1531
|
+
"type": "boolean"
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
"name": "multiple",
|
|
1535
|
+
"description": "Whether to use a range with two handles.",
|
|
1536
|
+
"type": "boolean"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
"name": "showTicks",
|
|
1540
|
+
"description": "Wheter to show tick marks below the range slider.\nOne tick mark per step will be rendered.",
|
|
1541
|
+
"type": "boolean"
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"name": "showRangeLabels",
|
|
1545
|
+
"description": "Whether to show the min and max labels below the range slider.",
|
|
1546
|
+
"type": "boolean"
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
"name": "prefix",
|
|
1550
|
+
"description": "A prefix to display before the value in the output element(s).\nIs ignored if a custom valueFormatter is provided.",
|
|
1551
|
+
"type": "string"
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
"name": "suffix",
|
|
1555
|
+
"description": "A suffix to display after the value in the output element(s).\nIs ignored if a custom valueFormatter is provided.",
|
|
1556
|
+
"type": "string"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"name": "valueFormatter",
|
|
1560
|
+
"description": "A custom function to format the value displayed in the output element(s).\nIf provided, the prefix and suffix properties will be ignored.",
|
|
1561
|
+
"type": "(value: number) => string | undefined"
|
|
1562
|
+
},
|
|
1439
1563
|
{
|
|
1440
1564
|
"name": "value",
|
|
1441
1565
|
"description": "Sets the value of the underlying input element(s).\nThe value has to be an array if \"multiple\" range is used.\nOtherwise it has to be a string."
|
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.24.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "https://github.com/statistikzh/leu.git"
|
|
22
|
+
"url": "git+https://github.com/statistikzh/leu.git"
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/statistikzh/leu/",
|
|
25
25
|
"scripts": {
|
|
@@ -127,5 +127,9 @@
|
|
|
127
127
|
},
|
|
128
128
|
"esm.sh": {
|
|
129
129
|
"bundle": false
|
|
130
|
+
},
|
|
131
|
+
"publishConfig": {
|
|
132
|
+
"access": "public",
|
|
133
|
+
"provenance": false
|
|
130
134
|
}
|
|
131
135
|
}
|
|
@@ -6,8 +6,8 @@ import { classMap } from "lit/directives/class-map.js"
|
|
|
6
6
|
import { LeuElement } from "../../lib/LeuElement.js"
|
|
7
7
|
|
|
8
8
|
import styles from "./file-input.css"
|
|
9
|
-
import { LeuButton } from "
|
|
10
|
-
import { LeuIcon } from "../icon/
|
|
9
|
+
import { LeuButton } from "../button/Button.js"
|
|
10
|
+
import { LeuIcon } from "../icon/Icon.js"
|
|
11
11
|
import { LeuVisuallyHidden } from "../visually-hidden/VisuallyHidden.js"
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
Placement,
|
|
8
8
|
shift,
|
|
9
9
|
size,
|
|
10
|
+
offset,
|
|
10
11
|
} from "@floating-ui/dom"
|
|
11
12
|
|
|
12
13
|
import { LeuElement } from "../../lib/LeuElement.js"
|
|
@@ -58,6 +59,28 @@ export class LeuPopup extends LeuElement {
|
|
|
58
59
|
@property({ type: String, reflect: true })
|
|
59
60
|
matchSize?: "width" | "height" | "both"
|
|
60
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Offsets the popup along the main axis.
|
|
64
|
+
* @link https://floating-ui.com/docs/offset#mainaxis
|
|
65
|
+
*/
|
|
66
|
+
@property({ type: Number, reflect: true, attribute: "offset-main-axis" })
|
|
67
|
+
offsetMainAxis?: number
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Offsets the popup along the cross axis.
|
|
71
|
+
* @link https://floating-ui.com/docs/offset#crossaxis
|
|
72
|
+
*/
|
|
73
|
+
@property({ type: Number, reflect: true, attribute: "offset-cross-axis" })
|
|
74
|
+
offsetCrossAxis?: number
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Offsets the popup along the alignment axis.
|
|
78
|
+
* Overrides the `offsetCrossAxis` value.
|
|
79
|
+
* @link https://floating-ui.com/docs/offset#alignmentaxis
|
|
80
|
+
*/
|
|
81
|
+
@property({ type: Number, reflect: true, attribute: "offset-alignment-axis" })
|
|
82
|
+
offsetAlignmentAxis?: number
|
|
83
|
+
|
|
61
84
|
@property({ type: String, reflect: true }) autoSize?:
|
|
62
85
|
| "width"
|
|
63
86
|
| "height"
|
|
@@ -116,6 +139,20 @@ export class LeuPopup extends LeuElement {
|
|
|
116
139
|
|
|
117
140
|
const middleware = []
|
|
118
141
|
|
|
142
|
+
if (
|
|
143
|
+
this.offsetAlignmentAxis ||
|
|
144
|
+
this.offsetMainAxis ||
|
|
145
|
+
this.offsetCrossAxis
|
|
146
|
+
) {
|
|
147
|
+
middleware.push(
|
|
148
|
+
offset({
|
|
149
|
+
mainAxis: this.offsetMainAxis,
|
|
150
|
+
crossAxis: this.offsetCrossAxis,
|
|
151
|
+
alignmentAxis: this.offsetAlignmentAxis,
|
|
152
|
+
}),
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
|
|
119
156
|
if (this.matchSize) {
|
|
120
157
|
middleware.push(
|
|
121
158
|
size({
|