@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.
Files changed (209) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/.storybook/main.ts +1 -1
  3. package/.storybook/preview.ts +6 -4
  4. package/.storybook/static/global.css +5 -0
  5. package/CHANGELOG.md +44 -0
  6. package/dist/{Accordion-B04QkmHz.js → Accordion-D9kLsiBW.js} +1 -1
  7. package/dist/Accordion.d.ts +1 -1
  8. package/dist/Accordion.js +2 -2
  9. package/dist/{Button-BgNUxmo_.d.ts → Button-DcuvEVkC.d.ts} +14 -12
  10. package/dist/{Button-BkhqVjug.js → Button-DyNVOHCd.js} +90 -82
  11. package/dist/Button.d.ts +1 -1
  12. package/dist/Button.js +4 -4
  13. package/dist/{ButtonGroup-B8U9fDvM.js → ButtonGroup-MEh4vb5a.js} +2 -2
  14. package/dist/ButtonGroup.d.ts +1 -1
  15. package/dist/ButtonGroup.js +5 -5
  16. package/dist/{ChartWrapper-CSMFwz9e.js → ChartWrapper-DAl91BIN.js} +2 -2
  17. package/dist/ChartWrapper.d.ts +3 -3
  18. package/dist/ChartWrapper.js +3 -3
  19. package/dist/{Checkbox-Dd1QLpfn.js → Checkbox-CGGyUW9U.js} +2 -2
  20. package/dist/Checkbox.d.ts +3 -3
  21. package/dist/Checkbox.js +3 -3
  22. package/dist/{CheckboxGroup-Bz2eWEFL.js → CheckboxGroup-DXt5iMdj.js} +2 -2
  23. package/dist/CheckboxGroup.d.ts +1 -1
  24. package/dist/CheckboxGroup.js +4 -4
  25. package/dist/{Chip-XAQIIsXq.js → Chip-BGs71WGH.js} +1 -1
  26. package/dist/{Chip-DLKM9P7v.d.ts → Chip-DVGjEPJE.d.ts} +1 -1
  27. package/dist/Chip.d.ts +1 -1
  28. package/dist/Chip.js +2 -2
  29. package/dist/{ChipGroup-Ta8Ht4jc.d.ts → ChipGroup-BK5BYM0X.d.ts} +2 -2
  30. package/dist/{ChipGroup-DLqfK2kn.js → ChipGroup-BcGyusP-.js} +1 -1
  31. package/dist/ChipGroup.d.ts +1 -1
  32. package/dist/ChipGroup.js +3 -3
  33. package/dist/{ChipLink-BAxyQO2M.d.ts → ChipLink-BdG2o-nk.d.ts} +1 -1
  34. package/dist/ChipLink.d.ts +1 -1
  35. package/dist/ChipLink.js +2 -2
  36. package/dist/{ChipRemovable-DBjwt0CH.d.ts → ChipRemovable-CCwSQTAL.d.ts} +2 -2
  37. package/dist/ChipRemovable.d.ts +1 -1
  38. package/dist/ChipRemovable.js +3 -3
  39. package/dist/{ChipSelectable-CMJNcE4U.d.ts → ChipSelectable-BQ3VLVi5.d.ts} +1 -1
  40. package/dist/ChipSelectable.d.ts +1 -1
  41. package/dist/ChipSelectable.js +2 -2
  42. package/dist/{Dialog-DHuXR_oo.js → Dialog-BzuyL1U3.js} +2 -2
  43. package/dist/Dialog.d.ts +3 -3
  44. package/dist/Dialog.js +3 -3
  45. package/dist/{Dropdown-DtFTePbc.js → Dropdown-plyBTM15.js} +5 -5
  46. package/dist/Dropdown.d.ts +6 -6
  47. package/dist/Dropdown.js +8 -8
  48. package/dist/{FileInput-b8sbLDPI.js → FileInput-BT3Fe-0J.js} +22 -7
  49. package/dist/FileInput.d.ts +16 -5
  50. package/dist/FileInput.js +6 -6
  51. package/dist/{Icon-Op80LrrO.d.ts → Icon-CUfh3eb3.d.ts} +1 -1
  52. package/dist/{Icon-C_yYuynf.js → Icon-D83qesg5.js} +1 -1
  53. package/dist/Icon.d.ts +1 -1
  54. package/dist/Icon.js +2 -2
  55. package/dist/{Input-DEOVocTa.js → Input-D7zS50oz.js} +32 -11
  56. package/dist/{Input-D2THgo7c.d.ts → Input-fEiQvGDF.d.ts} +9 -5
  57. package/dist/Input.d.ts +1 -1
  58. package/dist/Input.js +3 -3
  59. package/dist/{LeuElement-BeFrgKes.js → LeuElement-DQI8cqZV.js} +1 -1
  60. package/dist/{Menu-BeqqtCw6.js → Menu-DRU1LiMM.js} +2 -2
  61. package/dist/{Menu-CQdx1ef3.d.ts → Menu-Z2b7dsB5.d.ts} +2 -2
  62. package/dist/Menu.d.ts +1 -1
  63. package/dist/Menu.js +4 -4
  64. package/dist/{MenuItem-DVg8-1Bq.js → MenuItem-DCttylRO.js} +2 -2
  65. package/dist/{MenuItem-QcgnRk_7.d.ts → MenuItem-LY4TRIho.d.ts} +2 -2
  66. package/dist/MenuItem.d.ts +1 -1
  67. package/dist/MenuItem.js +3 -3
  68. package/dist/{Message-BhknWvAF.js → Message-0NxnKEqw.js} +2 -2
  69. package/dist/Message.d.ts +2 -2
  70. package/dist/Message.js +3 -3
  71. package/dist/{Pagination-CqkHh-Vd.d.ts → Pagination-9eZ8WMvR.d.ts} +4 -4
  72. package/dist/{Pagination-DJI5MIi_.js → Pagination-CIy7YvWE.js} +4 -4
  73. package/dist/Pagination.d.ts +1 -1
  74. package/dist/Pagination.js +6 -6
  75. package/dist/{Placeholder-BJybFwSg.js → Placeholder-Dol_X5Hp.js} +1 -1
  76. package/dist/Placeholder.d.ts +1 -1
  77. package/dist/Placeholder.js +2 -2
  78. package/dist/{Popup-Btgm2a3D.d.ts → Popup-B5iDSLIO.d.ts} +1 -1
  79. package/dist/{Popup-DNlm_9AA.js → Popup-nJrJHGSy.js} +1 -1
  80. package/dist/Popup.d.ts +1 -1
  81. package/dist/Popup.js +2 -2
  82. package/dist/{ProgressBar-B0wYj1KF.js → ProgressBar-Dmq9veqU.js} +1 -1
  83. package/dist/ProgressBar.d.ts +1 -1
  84. package/dist/ProgressBar.js +2 -2
  85. package/dist/{Radio-DMCL8c4D.js → Radio-W5ck_IJI.js} +1 -1
  86. package/dist/Radio.d.ts +1 -1
  87. package/dist/Radio.js +2 -2
  88. package/dist/{RadioGroup-CM6IyBlq.js → RadioGroup-De5x2YCO.js} +2 -2
  89. package/dist/RadioGroup.d.ts +1 -1
  90. package/dist/RadioGroup.js +3 -3
  91. package/dist/{Range-B72rtfln.js → Range-NCdfDkeD.js} +1 -1
  92. package/dist/Range.d.ts +1 -1
  93. package/dist/Range.js +2 -2
  94. package/dist/{ScrollTop-BFAqBVDR.js → ScrollTop-DwcNIKmN.js} +20 -20
  95. package/dist/ScrollTop.d.ts +8 -8
  96. package/dist/ScrollTop.js +5 -5
  97. package/dist/{Select-vxl3BvD4.js → Select-Bpicra9q.js} +153 -134
  98. package/dist/Select.d.ts +80 -78
  99. package/dist/Select.js +9 -9
  100. package/dist/{Spinner-DDTqijTO.js → Spinner-BBiVZxFH.js} +1 -1
  101. package/dist/{Spinner-CrM1enM0.d.ts → Spinner-DHYaX6-Y.d.ts} +1 -1
  102. package/dist/Spinner.d.ts +1 -1
  103. package/dist/Spinner.js +2 -2
  104. package/dist/Tab-CN97q0nj.d.ts +30 -0
  105. package/dist/Tab-Ce9nrDok.js +117 -0
  106. package/dist/Tab.d.ts +2 -0
  107. package/dist/Tab.js +3 -0
  108. package/dist/TabGroup-C-cd4Wcx.js +248 -0
  109. package/dist/TabGroup.d.ts +64 -0
  110. package/dist/TabGroup.js +5 -0
  111. package/dist/TabPanel-BW1ydVBT.js +65 -0
  112. package/dist/TabPanel-DQgWP7LO.d.ts +26 -0
  113. package/dist/TabPanel.d.ts +2 -0
  114. package/dist/TabPanel.js +3 -0
  115. package/dist/{Table-BgCxfBcm.js → Table-DiYqIzBu.js} +3 -3
  116. package/dist/Table.d.ts +3 -3
  117. package/dist/Table.js +7 -7
  118. package/dist/{Tag-DK2KkPIQ.js → Tag-Ct8Hhv7W.js} +1 -1
  119. package/dist/Tag.d.ts +1 -1
  120. package/dist/Tag.js +2 -2
  121. package/dist/{VisuallyHidden-OeQvhxYn.d.ts → VisuallyHidden-CB7aRJzF.d.ts} +1 -1
  122. package/dist/{VisuallyHidden-pll3amXE.js → VisuallyHidden-CpYXyuC7.js} +1 -1
  123. package/dist/VisuallyHidden.d.ts +1 -1
  124. package/dist/VisuallyHidden.js +2 -2
  125. package/dist/index.d.ts +14 -14
  126. package/dist/index.js +30 -30
  127. package/dist/leu-accordion.js +2 -2
  128. package/dist/leu-button-group.js +5 -5
  129. package/dist/leu-button.d.ts +1 -1
  130. package/dist/leu-button.js +4 -4
  131. package/dist/leu-chart-wrapper.js +3 -3
  132. package/dist/leu-checkbox-group.js +4 -4
  133. package/dist/leu-checkbox.js +3 -3
  134. package/dist/leu-chip-group.d.ts +1 -1
  135. package/dist/leu-chip-group.js +3 -3
  136. package/dist/leu-chip-link.d.ts +1 -1
  137. package/dist/leu-chip-link.js +2 -2
  138. package/dist/leu-chip-removable.d.ts +1 -1
  139. package/dist/leu-chip-removable.js +3 -3
  140. package/dist/leu-chip-selectable.d.ts +1 -1
  141. package/dist/leu-chip-selectable.js +2 -2
  142. package/dist/leu-dialog.js +3 -3
  143. package/dist/leu-dropdown.js +8 -8
  144. package/dist/leu-file-input.js +6 -6
  145. package/dist/leu-icon.d.ts +1 -1
  146. package/dist/leu-icon.js +2 -2
  147. package/dist/leu-input.d.ts +1 -1
  148. package/dist/leu-input.js +3 -3
  149. package/dist/leu-menu-item.d.ts +1 -1
  150. package/dist/leu-menu-item.js +3 -3
  151. package/dist/leu-menu.d.ts +1 -1
  152. package/dist/leu-menu.js +4 -4
  153. package/dist/leu-message.js +3 -3
  154. package/dist/leu-pagination.d.ts +1 -1
  155. package/dist/leu-pagination.js +6 -6
  156. package/dist/leu-placeholder.js +2 -2
  157. package/dist/leu-popup.d.ts +1 -1
  158. package/dist/leu-popup.js +2 -2
  159. package/dist/leu-progress-bar.js +2 -2
  160. package/dist/leu-radio-group.js +3 -3
  161. package/dist/leu-radio.js +2 -2
  162. package/dist/leu-range.js +2 -2
  163. package/dist/leu-scroll-top.js +5 -5
  164. package/dist/leu-select.js +9 -9
  165. package/dist/leu-spinner.d.ts +1 -1
  166. package/dist/leu-spinner.js +2 -2
  167. package/dist/leu-tab-group.d.ts +10 -0
  168. package/dist/leu-tab-group.js +8 -0
  169. package/dist/leu-tab-panel.d.ts +10 -0
  170. package/dist/leu-tab-panel.js +6 -0
  171. package/dist/leu-tab.d.ts +10 -0
  172. package/dist/leu-tab.js +6 -0
  173. package/dist/leu-table.js +7 -7
  174. package/dist/leu-tag.js +2 -2
  175. package/dist/leu-visually-hidden.d.ts +1 -1
  176. package/dist/leu-visually-hidden.js +2 -2
  177. package/dist/vscode.html-custom-data.json +90 -35
  178. package/dist/vue/index.d.ts +89 -29
  179. package/dist/web-types.json +182 -76
  180. package/package.json +1 -2
  181. package/src/components/button/Button.ts +45 -30
  182. package/src/components/button/button.css +55 -54
  183. package/src/components/button/stories/button.stories.ts +17 -20
  184. package/src/components/button/test/button.test.ts +46 -0
  185. package/src/components/file-input/FileInput.ts +24 -5
  186. package/src/components/input/Input.ts +43 -8
  187. package/src/components/input/test/input.test.ts +106 -1
  188. package/src/components/scroll-top/ScrollTop.ts +18 -16
  189. package/src/components/select/Select.ts +198 -125
  190. package/src/components/select/select.css +4 -0
  191. package/src/components/select/stories/select.stories.ts +10 -0
  192. package/src/components/select/test/select.test.ts +440 -35
  193. package/src/components/tab/Tab.ts +72 -0
  194. package/src/components/tab/TabGroup.ts +267 -0
  195. package/src/components/tab/TabPanel.ts +59 -0
  196. package/src/components/tab/leu-tab-group.ts +11 -0
  197. package/src/components/tab/leu-tab-panel.ts +11 -0
  198. package/src/components/tab/leu-tab.ts +11 -0
  199. package/src/components/tab/stories/tab.stories.ts +97 -0
  200. package/src/components/tab/tab-group.css +63 -0
  201. package/src/components/tab/tab-panel.css +10 -0
  202. package/src/components/tab/tab.css +54 -0
  203. package/src/components/tab/test/tab-group.test.ts +426 -0
  204. package/src/components/tab/test/tab-panel.test.ts +102 -0
  205. package/src/components/tab/test/tab.test.ts +139 -0
  206. package/tsconfig.json +1 -0
  207. /package/dist/{FormAssociatedMixin-Cc74LjbC.d.ts → FormAssociatedMixin-Cw7LsSUE.d.ts} +0 -0
  208. /package/dist/{LeuElement-pJFU18Xm.d.ts → LeuElement-DK1jntuu.d.ts} +0 -0
  209. /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-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import "./Spinner-DDTqijTO.js";
4
- import "./Button-BkhqVjug.js";
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-pll3amXE.js";
7
- import "./Pagination-DJI5MIi_.js";
8
- import { t as LeuTable } from "./Table-BgCxfBcm.js";
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-BeFrgKes.js";
2
- import { t as LeuTag } from "./Tag-DK2KkPIQ.js";
1
+ import "./LeuElement-DQI8cqZV.js";
2
+ import { t as LeuTag } from "./Tag-Ct8Hhv7W.js";
3
3
  //#region src/components/tag/leu-tag.ts
4
4
  LeuTag.define("leu-tag");
5
5
  //#endregion
@@ -1,4 +1,4 @@
1
- import { t as LeuVisuallyHidden } from "./VisuallyHidden-OeQvhxYn.js";
1
+ import { t as LeuVisuallyHidden } from "./VisuallyHidden-CB7aRJzF.js";
2
2
 
3
3
  //#region src/components/visually-hidden/leu-visually-hidden.d.ts
4
4
  declare global {
@@ -1,5 +1,5 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import { t as LeuVisuallyHidden } from "./VisuallyHidden-pll3amXE.js";
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(): _String | nothing_** - Determines the value or label that should be displayed inside the toggle button.\n- **_isSelected(menuItemValue: _String_): _Boolean_** - 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",
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": "List of selected values. If they're set from outside the component, the select element tries to find all the options with the given values and selects them.",
816
- "values": [{ "name": "array" }]
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
- { "name": "_optionFilter", "values": [] },
854
- { "name": "_hasFilterResults", "values": [] },
855
- { "name": "_displayValue", "values": [] }
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",
@@ -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
- /** Whether the button is disabled or not. */
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
- /** List of selected values. If they're set from outside the component, the select element tries to find all the options with the given values and selects them. */
433
- value?: LeuSelect["value"];
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
- _optionFilter?: LeuSelect["_optionFilter"];
450
- /** */
451
- _hasFilterResults?: LeuSelect["_hasFilterResults"];
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(): _String | nothing_** - Determines the value or label that should be displayed inside the toggle button.
806
- * - **_isSelected(menuItemValue: _String_): _Boolean_** - Checks if the given value is selected.
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
  * ---