@statistikzh/leu 0.26.0 → 0.28.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/.release-please-manifest.json +1 -1
- package/.storybook/main.ts +1 -1
- package/.storybook/preview.ts +6 -4
- package/.storybook/static/global.css +5 -0
- package/CHANGELOG.md +44 -0
- package/dist/{Accordion-B04QkmHz.js → Accordion-D9kLsiBW.js} +1 -1
- package/dist/Accordion.d.ts +1 -1
- package/dist/Accordion.js +2 -2
- package/dist/{Button-BgNUxmo_.d.ts → Button-DcuvEVkC.d.ts} +14 -12
- package/dist/{Button-BkhqVjug.js → Button-DyNVOHCd.js} +90 -82
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +4 -4
- package/dist/{ButtonGroup-B8U9fDvM.js → ButtonGroup-MEh4vb5a.js} +2 -2
- package/dist/ButtonGroup.d.ts +1 -1
- package/dist/ButtonGroup.js +5 -5
- package/dist/{ChartWrapper-CSMFwz9e.js → ChartWrapper-DAl91BIN.js} +2 -2
- package/dist/ChartWrapper.d.ts +3 -3
- package/dist/ChartWrapper.js +3 -3
- package/dist/{Checkbox-Dd1QLpfn.js → Checkbox-CGGyUW9U.js} +2 -2
- package/dist/Checkbox.d.ts +3 -3
- package/dist/Checkbox.js +3 -3
- package/dist/{CheckboxGroup-Bz2eWEFL.js → CheckboxGroup-DXt5iMdj.js} +2 -2
- package/dist/CheckboxGroup.d.ts +1 -1
- package/dist/CheckboxGroup.js +4 -4
- package/dist/{Chip-XAQIIsXq.js → Chip-BGs71WGH.js} +1 -1
- package/dist/{Chip-DLKM9P7v.d.ts → Chip-DVGjEPJE.d.ts} +1 -1
- package/dist/Chip.d.ts +1 -1
- package/dist/Chip.js +2 -2
- package/dist/{ChipGroup-Ta8Ht4jc.d.ts → ChipGroup-BK5BYM0X.d.ts} +2 -2
- package/dist/{ChipGroup-DLqfK2kn.js → ChipGroup-BcGyusP-.js} +1 -1
- package/dist/ChipGroup.d.ts +1 -1
- package/dist/ChipGroup.js +3 -3
- package/dist/{ChipLink-BAxyQO2M.d.ts → ChipLink-BdG2o-nk.d.ts} +1 -1
- package/dist/ChipLink.d.ts +1 -1
- package/dist/ChipLink.js +2 -2
- package/dist/{ChipRemovable-DBjwt0CH.d.ts → ChipRemovable-CCwSQTAL.d.ts} +2 -2
- package/dist/ChipRemovable.d.ts +1 -1
- package/dist/ChipRemovable.js +3 -3
- package/dist/{ChipSelectable-CMJNcE4U.d.ts → ChipSelectable-BQ3VLVi5.d.ts} +1 -1
- package/dist/ChipSelectable.d.ts +1 -1
- package/dist/ChipSelectable.js +2 -2
- package/dist/{Dialog-DHuXR_oo.js → Dialog-BzuyL1U3.js} +2 -2
- package/dist/Dialog.d.ts +3 -3
- package/dist/Dialog.js +3 -3
- package/dist/{Dropdown-DtFTePbc.js → Dropdown-plyBTM15.js} +5 -5
- package/dist/Dropdown.d.ts +6 -6
- package/dist/Dropdown.js +8 -8
- package/dist/{FileInput-b8sbLDPI.js → FileInput-BT3Fe-0J.js} +22 -7
- package/dist/FileInput.d.ts +16 -5
- package/dist/FileInput.js +6 -6
- package/dist/{Icon-Op80LrrO.d.ts → Icon-CUfh3eb3.d.ts} +1 -1
- package/dist/{Icon-C_yYuynf.js → Icon-D83qesg5.js} +1 -1
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.js +2 -2
- package/dist/{Input-DEOVocTa.js → Input-D7zS50oz.js} +32 -11
- package/dist/{Input-D2THgo7c.d.ts → Input-fEiQvGDF.d.ts} +9 -5
- package/dist/Input.d.ts +1 -1
- package/dist/Input.js +3 -3
- package/dist/{LeuElement-BeFrgKes.js → LeuElement-DQI8cqZV.js} +1 -1
- package/dist/{Menu-BeqqtCw6.js → Menu-DRU1LiMM.js} +2 -2
- package/dist/{Menu-CQdx1ef3.d.ts → Menu-Z2b7dsB5.d.ts} +2 -2
- package/dist/Menu.d.ts +1 -1
- package/dist/Menu.js +4 -4
- package/dist/{MenuItem-DVg8-1Bq.js → MenuItem-DCttylRO.js} +2 -2
- package/dist/{MenuItem-QcgnRk_7.d.ts → MenuItem-LY4TRIho.d.ts} +2 -2
- package/dist/MenuItem.d.ts +1 -1
- package/dist/MenuItem.js +3 -3
- package/dist/{Message-BhknWvAF.js → Message-0NxnKEqw.js} +2 -2
- package/dist/Message.d.ts +2 -2
- package/dist/Message.js +3 -3
- package/dist/{Pagination-CqkHh-Vd.d.ts → Pagination-9eZ8WMvR.d.ts} +4 -4
- package/dist/{Pagination-DJI5MIi_.js → Pagination-CIy7YvWE.js} +4 -4
- package/dist/Pagination.d.ts +1 -1
- package/dist/Pagination.js +6 -6
- package/dist/{Placeholder-BJybFwSg.js → Placeholder-Dol_X5Hp.js} +1 -1
- package/dist/Placeholder.d.ts +1 -1
- package/dist/Placeholder.js +2 -2
- package/dist/{Popup-Btgm2a3D.d.ts → Popup-B5iDSLIO.d.ts} +1 -1
- package/dist/{Popup-DNlm_9AA.js → Popup-nJrJHGSy.js} +1 -1
- package/dist/Popup.d.ts +1 -1
- package/dist/Popup.js +2 -2
- package/dist/{ProgressBar-B0wYj1KF.js → ProgressBar-Dmq9veqU.js} +1 -1
- package/dist/ProgressBar.d.ts +1 -1
- package/dist/ProgressBar.js +2 -2
- package/dist/{Radio-DMCL8c4D.js → Radio-W5ck_IJI.js} +1 -1
- package/dist/Radio.d.ts +1 -1
- package/dist/Radio.js +2 -2
- package/dist/{RadioGroup-CM6IyBlq.js → RadioGroup-De5x2YCO.js} +2 -2
- package/dist/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup.js +3 -3
- package/dist/{Range-B72rtfln.js → Range-NCdfDkeD.js} +1 -1
- package/dist/Range.d.ts +1 -1
- package/dist/Range.js +2 -2
- package/dist/{ScrollTop-BFAqBVDR.js → ScrollTop-DwcNIKmN.js} +20 -20
- package/dist/ScrollTop.d.ts +8 -8
- package/dist/ScrollTop.js +5 -5
- package/dist/{Select-vxl3BvD4.js → Select-Bpicra9q.js} +153 -134
- package/dist/Select.d.ts +80 -78
- package/dist/Select.js +9 -9
- package/dist/{Spinner-DDTqijTO.js → Spinner-BBiVZxFH.js} +1 -1
- package/dist/{Spinner-CrM1enM0.d.ts → Spinner-DHYaX6-Y.d.ts} +1 -1
- package/dist/Spinner.d.ts +1 -1
- package/dist/Spinner.js +2 -2
- package/dist/Tab-CN97q0nj.d.ts +30 -0
- package/dist/Tab-Ce9nrDok.js +117 -0
- package/dist/Tab.d.ts +2 -0
- package/dist/Tab.js +3 -0
- package/dist/TabGroup-C-cd4Wcx.js +248 -0
- package/dist/TabGroup.d.ts +64 -0
- package/dist/TabGroup.js +5 -0
- package/dist/TabPanel-BW1ydVBT.js +65 -0
- package/dist/TabPanel-DQgWP7LO.d.ts +26 -0
- package/dist/TabPanel.d.ts +2 -0
- package/dist/TabPanel.js +3 -0
- package/dist/{Table-BgCxfBcm.js → Table-DiYqIzBu.js} +3 -3
- package/dist/Table.d.ts +3 -3
- package/dist/Table.js +7 -7
- package/dist/{Tag-DK2KkPIQ.js → Tag-Ct8Hhv7W.js} +1 -1
- package/dist/Tag.d.ts +1 -1
- package/dist/Tag.js +2 -2
- package/dist/{VisuallyHidden-OeQvhxYn.d.ts → VisuallyHidden-CB7aRJzF.d.ts} +1 -1
- package/dist/{VisuallyHidden-pll3amXE.js → VisuallyHidden-CpYXyuC7.js} +1 -1
- package/dist/VisuallyHidden.d.ts +1 -1
- package/dist/VisuallyHidden.js +2 -2
- package/dist/index.d.ts +14 -14
- package/dist/index.js +30 -30
- package/dist/leu-accordion.js +2 -2
- package/dist/leu-button-group.js +5 -5
- package/dist/leu-button.d.ts +1 -1
- package/dist/leu-button.js +4 -4
- package/dist/leu-chart-wrapper.js +3 -3
- package/dist/leu-checkbox-group.js +4 -4
- package/dist/leu-checkbox.js +3 -3
- package/dist/leu-chip-group.d.ts +1 -1
- package/dist/leu-chip-group.js +3 -3
- package/dist/leu-chip-link.d.ts +1 -1
- package/dist/leu-chip-link.js +2 -2
- package/dist/leu-chip-removable.d.ts +1 -1
- package/dist/leu-chip-removable.js +3 -3
- package/dist/leu-chip-selectable.d.ts +1 -1
- package/dist/leu-chip-selectable.js +2 -2
- package/dist/leu-dialog.js +3 -3
- package/dist/leu-dropdown.js +8 -8
- package/dist/leu-file-input.js +6 -6
- package/dist/leu-icon.d.ts +1 -1
- package/dist/leu-icon.js +2 -2
- package/dist/leu-input.d.ts +1 -1
- package/dist/leu-input.js +3 -3
- package/dist/leu-menu-item.d.ts +1 -1
- package/dist/leu-menu-item.js +3 -3
- package/dist/leu-menu.d.ts +1 -1
- package/dist/leu-menu.js +4 -4
- package/dist/leu-message.js +3 -3
- package/dist/leu-pagination.d.ts +1 -1
- package/dist/leu-pagination.js +6 -6
- package/dist/leu-placeholder.js +2 -2
- package/dist/leu-popup.d.ts +1 -1
- package/dist/leu-popup.js +2 -2
- package/dist/leu-progress-bar.js +2 -2
- package/dist/leu-radio-group.js +3 -3
- package/dist/leu-radio.js +2 -2
- package/dist/leu-range.js +2 -2
- package/dist/leu-scroll-top.js +5 -5
- package/dist/leu-select.js +9 -9
- package/dist/leu-spinner.d.ts +1 -1
- package/dist/leu-spinner.js +2 -2
- package/dist/leu-tab-group.d.ts +10 -0
- package/dist/leu-tab-group.js +8 -0
- package/dist/leu-tab-panel.d.ts +10 -0
- package/dist/leu-tab-panel.js +6 -0
- package/dist/leu-tab.d.ts +10 -0
- package/dist/leu-tab.js +6 -0
- package/dist/leu-table.js +7 -7
- package/dist/leu-tag.js +2 -2
- package/dist/leu-visually-hidden.d.ts +1 -1
- package/dist/leu-visually-hidden.js +2 -2
- package/dist/vscode.html-custom-data.json +90 -35
- package/dist/vue/index.d.ts +89 -29
- package/dist/web-types.json +182 -76
- package/package.json +1 -2
- package/src/components/button/Button.ts +45 -30
- package/src/components/button/button.css +55 -54
- package/src/components/button/stories/button.stories.ts +17 -20
- package/src/components/button/test/button.test.ts +46 -0
- package/src/components/file-input/FileInput.ts +24 -5
- package/src/components/input/Input.ts +43 -8
- package/src/components/input/test/input.test.ts +106 -1
- package/src/components/scroll-top/ScrollTop.ts +18 -16
- package/src/components/select/Select.ts +198 -125
- package/src/components/select/select.css +4 -0
- package/src/components/select/stories/select.stories.ts +10 -0
- package/src/components/select/test/select.test.ts +440 -35
- package/src/components/tab/Tab.ts +72 -0
- package/src/components/tab/TabGroup.ts +267 -0
- package/src/components/tab/TabPanel.ts +59 -0
- package/src/components/tab/leu-tab-group.ts +11 -0
- package/src/components/tab/leu-tab-panel.ts +11 -0
- package/src/components/tab/leu-tab.ts +11 -0
- package/src/components/tab/stories/tab.stories.ts +97 -0
- package/src/components/tab/tab-group.css +63 -0
- package/src/components/tab/tab-panel.css +10 -0
- package/src/components/tab/tab.css +54 -0
- package/src/components/tab/test/tab-group.test.ts +426 -0
- package/src/components/tab/test/tab-panel.test.ts +102 -0
- package/src/components/tab/test/tab.test.ts +139 -0
- package/tsconfig.json +1 -0
- /package/dist/{FormAssociatedMixin-Cc74LjbC.d.ts → FormAssociatedMixin-Cw7LsSUE.d.ts} +0 -0
- /package/dist/{LeuElement-pJFU18Xm.d.ts → LeuElement-DK1jntuu.d.ts} +0 -0
- /package/dist/{hasSlotController-DWPyZ52b.d.ts → hasSlotController-BjKyhJm-.d.ts} +0 -0
package/dist/leu-table.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import "./Icon-
|
|
3
|
-
import "./Spinner-
|
|
4
|
-
import "./Button-
|
|
1
|
+
import "./LeuElement-DQI8cqZV.js";
|
|
2
|
+
import "./Icon-D83qesg5.js";
|
|
3
|
+
import "./Spinner-BBiVZxFH.js";
|
|
4
|
+
import "./Button-DyNVOHCd.js";
|
|
5
5
|
import "./FormAssociatedMixin-DLPvFtbT.js";
|
|
6
|
-
import "./VisuallyHidden-
|
|
7
|
-
import "./Pagination-
|
|
8
|
-
import { t as LeuTable } from "./Table-
|
|
6
|
+
import "./VisuallyHidden-CpYXyuC7.js";
|
|
7
|
+
import "./Pagination-CIy7YvWE.js";
|
|
8
|
+
import { t as LeuTable } from "./Table-DiYqIzBu.js";
|
|
9
9
|
//#region src/components/table/leu-table.ts
|
|
10
10
|
LeuTable.define("leu-table");
|
|
11
11
|
//#endregion
|
package/dist/leu-tag.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./LeuElement-
|
|
2
|
-
import { t as LeuVisuallyHidden } from "./VisuallyHidden-
|
|
1
|
+
import "./LeuElement-DQI8cqZV.js";
|
|
2
|
+
import { t as LeuVisuallyHidden } from "./VisuallyHidden-CpYXyuC7.js";
|
|
3
3
|
//#region src/components/visually-hidden/leu-visually-hidden.ts
|
|
4
4
|
LeuVisuallyHidden.define("leu-visually-hidden");
|
|
5
5
|
//#endregion
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"name": "type",
|
|
62
|
-
"description": "The `type` of the underlying button element.",
|
|
62
|
+
"description": "The `type` of the underlying button element. Ignored when `href` is set.",
|
|
63
63
|
"values": [
|
|
64
64
|
{ "name": "button" },
|
|
65
65
|
{ "name": "submit" },
|
|
@@ -68,12 +68,27 @@
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"name": "componentRole",
|
|
71
|
-
"description": "The `role` of the underlying button element.",
|
|
71
|
+
"description": "The `role` of the underlying button element. Ignored when `href` is set.",
|
|
72
72
|
"values": []
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"name": "href",
|
|
76
|
+
"description": "If set, renders the button as an <a> element instead of a <button> with the provided href.",
|
|
77
|
+
"values": []
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "target",
|
|
81
|
+
"description": "Tells the browser where to display the linked URL. Only used when `href` is set.",
|
|
82
|
+
"values": [
|
|
83
|
+
{ "name": "_blank" },
|
|
84
|
+
{ "name": "_parent" },
|
|
85
|
+
{ "name": "_self" },
|
|
86
|
+
{ "name": "_top" }
|
|
87
|
+
]
|
|
88
|
+
},
|
|
74
89
|
{
|
|
75
90
|
"name": "disabled",
|
|
76
|
-
"description": "Whether the button is disabled or not.",
|
|
91
|
+
"description": "Whether the button is disabled or not. Ignored when `href` is set.",
|
|
77
92
|
"values": []
|
|
78
93
|
},
|
|
79
94
|
{
|
|
@@ -96,11 +111,6 @@
|
|
|
96
111
|
"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.",
|
|
97
112
|
"values": [{ "name": "true" }, { "name": "false" }]
|
|
98
113
|
},
|
|
99
|
-
{
|
|
100
|
-
"name": "fluid",
|
|
101
|
-
"description": "Alters the shape of the button to be full width of its parent container",
|
|
102
|
-
"values": []
|
|
103
|
-
},
|
|
104
114
|
{
|
|
105
115
|
"name": "loading",
|
|
106
116
|
"description": "Replaces the content with a spinner",
|
|
@@ -308,7 +318,7 @@
|
|
|
308
318
|
},
|
|
309
319
|
{
|
|
310
320
|
"name": "leu-file-input",
|
|
311
|
-
"description": "\n---\n\n\n### **Events:**\n - **input**\n- **change**",
|
|
321
|
+
"description": "\n---\n\n\n### **Events:**\n - **input**\n- **change**\n\n### **Methods:**\n ",
|
|
312
322
|
"attributes": [
|
|
313
323
|
{ "name": "label", "values": [] },
|
|
314
324
|
{
|
|
@@ -380,11 +390,6 @@
|
|
|
380
390
|
"description": "Adds a button to clear the input element",
|
|
381
391
|
"values": []
|
|
382
392
|
},
|
|
383
|
-
{
|
|
384
|
-
"name": "value",
|
|
385
|
-
"description": "The value of the input element.",
|
|
386
|
-
"values": []
|
|
387
|
-
},
|
|
388
393
|
{
|
|
389
394
|
"name": "error",
|
|
390
395
|
"description": "A custom error that is completely independent of the validity state. Useful for displaying server side errors.",
|
|
@@ -459,6 +464,11 @@
|
|
|
459
464
|
"name": "novalidate",
|
|
460
465
|
"description": "Disables the browser's validation.",
|
|
461
466
|
"values": []
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"name": "value",
|
|
470
|
+
"description": "The default value of the input element.",
|
|
471
|
+
"values": []
|
|
462
472
|
}
|
|
463
473
|
],
|
|
464
474
|
"references": [
|
|
@@ -808,22 +818,12 @@
|
|
|
808
818
|
},
|
|
809
819
|
{
|
|
810
820
|
"name": "leu-select",
|
|
811
|
-
"description": "\n---\n\n\n### **Methods:**\n - **_updateMenuItems(changed)** - Apply the current state to the menu items.\n- Set the active property when the value property has changed.\n- Hide menu items that do not match the filter.\n- **_getDisplayValue()
|
|
821
|
+
"description": "\n---\n\n\n### **Methods:**\n - **_updateMenuItems(changed)** - Apply the current state to the menu items.\n- Set the active property when the value property has changed.\n- Hide menu items that do not match the filter.\n- **_getDisplayValue()** - Determines the value or label that should be displayed inside the toggle button.\n- **_isSelected(menuItemValue: _string_)** - Checks if the given value is selected.\n\n### **Slots:**\n - **before** - Optional content the appears before the option list\n- **after** - Optional content the appears after the option list",
|
|
812
822
|
"attributes": [
|
|
813
823
|
{
|
|
814
824
|
"name": "value",
|
|
815
|
-
"description": "
|
|
816
|
-
"values": [{ "name": "
|
|
817
|
-
},
|
|
818
|
-
{
|
|
819
|
-
"name": "name",
|
|
820
|
-
"description": "Reflects to the name attribute of the hidden input field that would be used in a form",
|
|
821
|
-
"values": []
|
|
822
|
-
},
|
|
823
|
-
{
|
|
824
|
-
"name": "open",
|
|
825
|
-
"description": "The expanded state of the popup",
|
|
826
|
-
"values": []
|
|
825
|
+
"description": "The default value of the select. Corresponds to the `value` HTML attribute.",
|
|
826
|
+
"values": [{ "name": "Array<string>" }]
|
|
827
827
|
},
|
|
828
828
|
{
|
|
829
829
|
"name": "label",
|
|
@@ -835,11 +835,6 @@
|
|
|
835
835
|
"description": "Show a clearable button to reset the value",
|
|
836
836
|
"values": []
|
|
837
837
|
},
|
|
838
|
-
{
|
|
839
|
-
"name": "disabled",
|
|
840
|
-
"description": "If the select should be disabled",
|
|
841
|
-
"values": []
|
|
842
|
-
},
|
|
843
838
|
{
|
|
844
839
|
"name": "filterable",
|
|
845
840
|
"description": "Show an input field to filter the options inside the popup",
|
|
@@ -850,9 +845,11 @@
|
|
|
850
845
|
"description": "Allow multiple selections",
|
|
851
846
|
"values": []
|
|
852
847
|
},
|
|
853
|
-
{
|
|
854
|
-
|
|
855
|
-
|
|
848
|
+
{
|
|
849
|
+
"name": "required",
|
|
850
|
+
"description": "Marks the input element as required",
|
|
851
|
+
"values": []
|
|
852
|
+
}
|
|
856
853
|
],
|
|
857
854
|
"references": [
|
|
858
855
|
{
|
|
@@ -872,6 +869,64 @@
|
|
|
872
869
|
}
|
|
873
870
|
]
|
|
874
871
|
},
|
|
872
|
+
{
|
|
873
|
+
"name": "leu-tab",
|
|
874
|
+
"description": "Tab Button.\n---\n\n\n### **Events:**\n - **leu:tab-select**",
|
|
875
|
+
"attributes": [
|
|
876
|
+
{
|
|
877
|
+
"name": "name",
|
|
878
|
+
"description": "Name to link Button and Panel together",
|
|
879
|
+
"values": []
|
|
880
|
+
},
|
|
881
|
+
{ "name": "active", "description": "Is active", "values": [] }
|
|
882
|
+
],
|
|
883
|
+
"references": [
|
|
884
|
+
{
|
|
885
|
+
"name": "Documentation",
|
|
886
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/tab"
|
|
887
|
+
}
|
|
888
|
+
]
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"name": "leu-tab-group",
|
|
892
|
+
"description": "Tab Group\n---\n\n\n### **Methods:**\n \n\n### **Slots:**\n - **tabs** - Slot for the leu-tab elements\n- **panels** - Slot for the leu-tab-panel elements",
|
|
893
|
+
"attributes": [
|
|
894
|
+
{
|
|
895
|
+
"name": "label",
|
|
896
|
+
"description": "Label for the tab list, used for accessibility.\nContent will not be visible on the page, but should be provided for screen readers.",
|
|
897
|
+
"values": []
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"name": "active",
|
|
901
|
+
"description": "Name of the active/selected tab and panel. Has to match the name property of a leu-tab and leu-tab-panel.",
|
|
902
|
+
"values": []
|
|
903
|
+
}
|
|
904
|
+
],
|
|
905
|
+
"references": [
|
|
906
|
+
{
|
|
907
|
+
"name": "Documentation",
|
|
908
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/tab-group"
|
|
909
|
+
}
|
|
910
|
+
]
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"name": "leu-tab-panel",
|
|
914
|
+
"description": "Tab Panel\n---\n\n\n### **Events:**\n - **leu:show-tab-panel** - Fired when a tab panel is shown",
|
|
915
|
+
"attributes": [
|
|
916
|
+
{
|
|
917
|
+
"name": "name",
|
|
918
|
+
"description": "Name of the tab. Apply the same name to the corresponding tab button to link them together.\nHas to be unique within the tab component.",
|
|
919
|
+
"values": []
|
|
920
|
+
},
|
|
921
|
+
{ "name": "active", "values": [] }
|
|
922
|
+
],
|
|
923
|
+
"references": [
|
|
924
|
+
{
|
|
925
|
+
"name": "Documentation",
|
|
926
|
+
"url": "https://statistikzh.github.io/leu/?path=/story/tab-panel"
|
|
927
|
+
}
|
|
928
|
+
]
|
|
929
|
+
},
|
|
875
930
|
{
|
|
876
931
|
"name": "leu-table",
|
|
877
932
|
"description": "\n---\n",
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -28,6 +28,9 @@ import type { LeuRange, CustomEvent } from "../Range.js";
|
|
|
28
28
|
import type { LeuScrollTop } from "../ScrollTop.js";
|
|
29
29
|
import type { LeuSelect } from "../Select.js";
|
|
30
30
|
import type { LeuSpinner } from "../Spinner.js";
|
|
31
|
+
import type { LeuTab, CustomEvent } from "../Tab.js";
|
|
32
|
+
import type { LeuTabGroup } from "../TabGroup.js";
|
|
33
|
+
import type { LeuTabPanel, CustomEvent } from "../TabPanel.js";
|
|
31
34
|
import type { LeuTable } from "../Table.js";
|
|
32
35
|
import type { LeuTag } from "../Tag.js";
|
|
33
36
|
import type { LeuVisuallyHidden } from "../VisuallyHidden.js";
|
|
@@ -51,11 +54,15 @@ Use it to provide a label when only an icon is visible. */
|
|
|
51
54
|
size?: LeuButton["size"];
|
|
52
55
|
/** The visual variant of the button. */
|
|
53
56
|
variant?: LeuButton["variant"];
|
|
54
|
-
/** The `type` of the underlying button element. */
|
|
57
|
+
/** The `type` of the underlying button element. Ignored when `href` is set. */
|
|
55
58
|
type?: LeuButton["type"];
|
|
56
|
-
/** The `role` of the underlying button element. */
|
|
59
|
+
/** The `role` of the underlying button element. Ignored when `href` is set. */
|
|
57
60
|
componentRole?: LeuButton["componentRole"];
|
|
58
|
-
/**
|
|
61
|
+
/** If set, renders the button as an <a> element instead of a <button> with the provided href. */
|
|
62
|
+
href?: LeuButton["href"];
|
|
63
|
+
/** Tells the browser where to display the linked URL. Only used when `href` is set. */
|
|
64
|
+
target?: LeuButton["target"];
|
|
65
|
+
/** Whether the button is disabled or not. Ignored when `href` is set. */
|
|
59
66
|
disabled?: LeuButton["disabled"];
|
|
60
67
|
/** Whether the button should be round.
|
|
61
68
|
Can only be applied when the button contains an icon without a visible label. */
|
|
@@ -70,8 +77,6 @@ Only has an effect on the variant `ghost` to show an expanding icon.
|
|
|
70
77
|
If the property is not set, the icon will not be shown.
|
|
71
78
|
If it is set, the icon will either show an expanded or collapsed state. */
|
|
72
79
|
expanded?: LeuButton["expanded"];
|
|
73
|
-
/** Alters the shape of the button to be full width of its parent container */
|
|
74
|
-
fluid?: LeuButton["fluid"];
|
|
75
80
|
/** Replaces the content with a spinner */
|
|
76
81
|
loading?: LeuButton["loading"];
|
|
77
82
|
};
|
|
@@ -213,8 +218,6 @@ type LeuInputProps = {
|
|
|
213
218
|
required?: LeuInput["required"];
|
|
214
219
|
/** Adds a button to clear the input element */
|
|
215
220
|
clearable?: LeuInput["clearable"];
|
|
216
|
-
/** The value of the input element. */
|
|
217
|
-
value?: LeuInput["value"];
|
|
218
221
|
/** A custom error that is completely independent of the validity state. Useful for displaying server side errors. */
|
|
219
222
|
error?: LeuInput["error"];
|
|
220
223
|
/** The label of the input element */
|
|
@@ -245,6 +248,10 @@ type LeuInputProps = {
|
|
|
245
248
|
validationMessages?: LeuInput["validationMessages"];
|
|
246
249
|
/** Disables the browser's validation. */
|
|
247
250
|
novalidate?: LeuInput["novalidate"];
|
|
251
|
+
/** The default value of the input element. */
|
|
252
|
+
value?: LeuInput["defaultValue"];
|
|
253
|
+
/** The value of the input element. */
|
|
254
|
+
value?: LeuInput["value"];
|
|
248
255
|
/** */
|
|
249
256
|
_validity?: LeuInput["_validity"];
|
|
250
257
|
/** */
|
|
@@ -429,38 +436,54 @@ type LeuScrollTopProps = {
|
|
|
429
436
|
};
|
|
430
437
|
|
|
431
438
|
type LeuSelectProps = {
|
|
432
|
-
/**
|
|
433
|
-
value?: LeuSelect["
|
|
434
|
-
/** Reflects to the name attribute of the hidden input field that would be used in a form */
|
|
435
|
-
name?: LeuSelect["name"];
|
|
436
|
-
/** The expanded state of the popup */
|
|
437
|
-
open?: LeuSelect["open"];
|
|
439
|
+
/** The default value of the select. Corresponds to the `value` HTML attribute. */
|
|
440
|
+
value?: LeuSelect["defaultValue"];
|
|
438
441
|
/** The label of the select */
|
|
439
442
|
label?: LeuSelect["label"];
|
|
440
443
|
/** Show a clearable button to reset the value */
|
|
441
444
|
clearable?: LeuSelect["clearable"];
|
|
442
|
-
/** If the select should be disabled */
|
|
443
|
-
disabled?: LeuSelect["disabled"];
|
|
444
445
|
/** Show an input field to filter the options inside the popup */
|
|
445
446
|
filterable?: LeuSelect["filterable"];
|
|
446
447
|
/** Allow multiple selections */
|
|
447
448
|
multiple?: LeuSelect["multiple"];
|
|
448
|
-
/**
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
_displayValue?: LeuSelect["_displayValue"];
|
|
454
|
-
/** */
|
|
455
|
-
_optionFilterRef?: LeuSelect["_optionFilterRef"];
|
|
456
|
-
/** */
|
|
457
|
-
_toggleButtonRef?: LeuSelect["_toggleButtonRef"];
|
|
458
|
-
/** */
|
|
459
|
-
_menuRef?: LeuSelect["_menuRef"];
|
|
449
|
+
/** Marks the input element as required */
|
|
450
|
+
required?: LeuSelect["required"];
|
|
451
|
+
/** List of selected values. If they're set from outside the component, the select element
|
|
452
|
+
finds all the options that match the given values and selects them. */
|
|
453
|
+
value?: LeuSelect["value"];
|
|
460
454
|
};
|
|
461
455
|
|
|
462
456
|
type LeuSpinnerProps = {};
|
|
463
457
|
|
|
458
|
+
type LeuTabProps = {
|
|
459
|
+
/** Name to link Button and Panel together */
|
|
460
|
+
name?: LeuTab["name"];
|
|
461
|
+
/** Is active */
|
|
462
|
+
active?: LeuTab["active"];
|
|
463
|
+
|
|
464
|
+
/** */
|
|
465
|
+
"onleu:tab-select"?: (e: CustomEvent<CustomEvent>) => void;
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
type LeuTabGroupProps = {
|
|
469
|
+
/** Label for the tab list, used for accessibility.
|
|
470
|
+
Content will not be visible on the page, but should be provided for screen readers. */
|
|
471
|
+
label?: LeuTabGroup["label"];
|
|
472
|
+
/** Name of the active/selected tab and panel. Has to match the name property of a leu-tab and leu-tab-panel. */
|
|
473
|
+
active?: LeuTabGroup["active"];
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
type LeuTabPanelProps = {
|
|
477
|
+
/** Name of the tab. Apply the same name to the corresponding tab button to link them together.
|
|
478
|
+
Has to be unique within the tab component. */
|
|
479
|
+
name?: LeuTabPanel["name"];
|
|
480
|
+
/** */
|
|
481
|
+
active?: LeuTabPanel["active"];
|
|
482
|
+
|
|
483
|
+
/** Fired when a tab panel is shown */
|
|
484
|
+
"onleu:show-tab-panel"?: (e: CustomEvent<CustomEvent>) => void;
|
|
485
|
+
};
|
|
486
|
+
|
|
464
487
|
type LeuTableProps = {
|
|
465
488
|
/** */
|
|
466
489
|
columns?: LeuTable["columns"];
|
|
@@ -644,6 +667,9 @@ export type CustomElements = {
|
|
|
644
667
|
* ### **Events:**
|
|
645
668
|
* - **input**
|
|
646
669
|
* - **change**
|
|
670
|
+
*
|
|
671
|
+
* ### **Methods:**
|
|
672
|
+
*
|
|
647
673
|
*/
|
|
648
674
|
"leu-file-input": DefineComponent<LeuFileInputProps>;
|
|
649
675
|
|
|
@@ -802,8 +828,8 @@ export type CustomElements = {
|
|
|
802
828
|
* - **_updateMenuItems(changed)** - Apply the current state to the menu items.
|
|
803
829
|
* - Set the active property when the value property has changed.
|
|
804
830
|
* - Hide menu items that do not match the filter.
|
|
805
|
-
* - **_getDisplayValue()
|
|
806
|
-
* - **_isSelected(menuItemValue:
|
|
831
|
+
* - **_getDisplayValue()** - Determines the value or label that should be displayed inside the toggle button.
|
|
832
|
+
* - **_isSelected(menuItemValue: _string_)** - Checks if the given value is selected.
|
|
807
833
|
*
|
|
808
834
|
* ### **Slots:**
|
|
809
835
|
* - **before** - Optional content the appears before the option list
|
|
@@ -821,6 +847,40 @@ export type CustomElements = {
|
|
|
821
847
|
*/
|
|
822
848
|
"leu-spinner": DefineComponent<LeuSpinnerProps>;
|
|
823
849
|
|
|
850
|
+
/**
|
|
851
|
+
* Tab Button.
|
|
852
|
+
* ---
|
|
853
|
+
*
|
|
854
|
+
*
|
|
855
|
+
* ### **Events:**
|
|
856
|
+
* - **leu:tab-select**
|
|
857
|
+
*/
|
|
858
|
+
"leu-tab": DefineComponent<LeuTabProps>;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* Tab Group
|
|
862
|
+
* ---
|
|
863
|
+
*
|
|
864
|
+
*
|
|
865
|
+
* ### **Methods:**
|
|
866
|
+
*
|
|
867
|
+
*
|
|
868
|
+
* ### **Slots:**
|
|
869
|
+
* - **tabs** - Slot for the leu-tab elements
|
|
870
|
+
* - **panels** - Slot for the leu-tab-panel elements
|
|
871
|
+
*/
|
|
872
|
+
"leu-tab-group": DefineComponent<LeuTabGroupProps>;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Tab Panel
|
|
876
|
+
* ---
|
|
877
|
+
*
|
|
878
|
+
*
|
|
879
|
+
* ### **Events:**
|
|
880
|
+
* - **leu:show-tab-panel** - Fired when a tab panel is shown
|
|
881
|
+
*/
|
|
882
|
+
"leu-tab-panel": DefineComponent<LeuTabPanelProps>;
|
|
883
|
+
|
|
824
884
|
/**
|
|
825
885
|
*
|
|
826
886
|
* ---
|