@statistikzh/leu 0.27.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 (202) 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 +23 -0
  6. package/dist/{Accordion-DLsqXcK8.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-BSyDL_cV.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-BmSvl-Oc.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-CvDvQsd5.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-Cl_X6gBJ.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-BKhOmZYX.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-McVP3N_x.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-DUGavZeU.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-BlDd4T2u.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-BLxSIe6p.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-DntYrpZ-.js → FileInput-BT3Fe-0J.js} +4 -4
  49. package/dist/FileInput.d.ts +5 -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-CbZXpyHU.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-DBXX7ev8.js → Input-D7zS50oz.js} +2 -2
  56. package/dist/{Input-CeaAOB4p.d.ts → Input-fEiQvGDF.d.ts} +3 -3
  57. package/dist/Input.d.ts +1 -1
  58. package/dist/Input.js +3 -3
  59. package/dist/{LeuElement-k4RjIeoG.js → LeuElement-DQI8cqZV.js} +1 -1
  60. package/dist/{Menu-Cu8eIF1T.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-Cs3KFhJm.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-C6Zlk_2p.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-CB2eVlXk.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-DHMexMhK.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-8jhVy8gB.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-CG0_lHfS.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-DG3xqP3s.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-BKCp9ICX.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-7LrESv4K.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-CJJsfniA.js → ScrollTop-DwcNIKmN.js} +3 -3
  95. package/dist/ScrollTop.d.ts +3 -3
  96. package/dist/ScrollTop.js +5 -5
  97. package/dist/{Select-CxEDXIBn.js → Select-Bpicra9q.js} +7 -8
  98. package/dist/Select.d.ts +9 -9
  99. package/dist/Select.js +9 -9
  100. package/dist/{Spinner-VhKfzI3Q.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-rg_JCtsA.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-BROUaDAZ.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-Co_txzxB.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 +76 -8
  178. package/dist/vue/index.d.ts +73 -5
  179. package/dist/web-types.json +142 -17
  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/select/Select.ts +0 -1
  186. package/src/components/tab/Tab.ts +72 -0
  187. package/src/components/tab/TabGroup.ts +267 -0
  188. package/src/components/tab/TabPanel.ts +59 -0
  189. package/src/components/tab/leu-tab-group.ts +11 -0
  190. package/src/components/tab/leu-tab-panel.ts +11 -0
  191. package/src/components/tab/leu-tab.ts +11 -0
  192. package/src/components/tab/stories/tab.stories.ts +97 -0
  193. package/src/components/tab/tab-group.css +63 -0
  194. package/src/components/tab/tab-panel.css +10 -0
  195. package/src/components/tab/tab.css +54 -0
  196. package/src/components/tab/test/tab-group.test.ts +426 -0
  197. package/src/components/tab/test/tab-panel.test.ts +102 -0
  198. package/src/components/tab/test/tab.test.ts +139 -0
  199. package/tsconfig.json +1 -0
  200. /package/dist/{FormAssociatedMixin-Cc74LjbC.d.ts → FormAssociatedMixin-Cw7LsSUE.d.ts} +0 -0
  201. /package/dist/{LeuElement-pJFU18Xm.d.ts → LeuElement-DK1jntuu.d.ts} +0 -0
  202. /package/dist/{hasSlotController-DWPyZ52b.d.ts → hasSlotController-BjKyhJm-.d.ts} +0 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.27.0"
2
+ ".": "0.28.0"
3
3
  }
@@ -5,7 +5,6 @@ export default defineMain({
5
5
  stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
6
6
  addons: [
7
7
  "@storybook/addon-designs",
8
- "@whitespace/storybook-addon-html",
9
8
  "@storybook/addon-a11y",
10
9
  "@storybook/addon-docs",
11
10
  ],
@@ -20,6 +19,7 @@ export default defineMain({
20
19
  ${head}
21
20
  <link rel="stylesheet" href="fonts.css" />
22
21
  <link rel="stylesheet" href="theme.css" />
22
+ <link rel="stylesheet" href="global.css" />
23
23
  `
24
24
  },
25
25
  async viteFinal(config) {
@@ -1,11 +1,12 @@
1
- /** @type { import('@storybook/web-components').Preview } */
2
-
3
- import { setCustomElementsManifest } from "@storybook/web-components-vite"
1
+ import {
2
+ setCustomElementsManifest,
3
+ type Preview,
4
+ } from "@storybook/web-components-vite"
4
5
  import customElemenents from "../dist/custom-elements.json"
5
6
 
6
7
  setCustomElementsManifest(customElemenents)
7
8
 
8
- const preview = {
9
+ const preview: Preview = {
9
10
  tags: ["autodocs"],
10
11
 
11
12
  parameters: {
@@ -15,6 +16,7 @@ const preview = {
15
16
  color: /(background|color)$/i,
16
17
  },
17
18
  },
19
+ docs: { codePanel: true, source: { language: "html" } },
18
20
  options: {
19
21
  storySort: {
20
22
  order: [
@@ -0,0 +1,5 @@
1
+ p {
2
+ font: var(--leu-t-curve-regular-regular-font);
3
+ margin: 0 0 var(--leu-t-curve-regular-regular-spacing) 0;
4
+ color: var(--leu-color-black-60);
5
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.28.0](https://github.com/statistikZH/leu/compare/leu-v0.27.0...leu-v0.28.0) (2026-04-09)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **button:** The `fluid` property is removed. The underlying <button> or <a> element now takes up the whole width of the host element. The width of the host element can be controlled with css from the outside. The only exception are configurations that only show an icon and therefore should be displayed with an aspect ratio of 1.
9
+
10
+ ### Features
11
+
12
+ * **button:** add href property so that the component can be used as a link ([18be699](https://github.com/statistikZH/leu/commit/18be6998e9faa21254717f429c79ac72275bd428))
13
+ * **tabs:** add leu-tab-group, leu-tab and leu-tab-panel components ([9565a9f](https://github.com/statistikZH/leu/commit/9565a9f27aa1bef2daf097a93adee525ef19f040))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * fix vulnerabilities ([f22cf81](https://github.com/statistikZH/leu/commit/f22cf815dc4607b318751dba8987baa36422c8a6))
19
+ * **select:** remove deprecated fluid property from leu-button ([18be699](https://github.com/statistikZH/leu/commit/18be6998e9faa21254717f429c79ac72275bd428))
20
+
21
+
22
+ ### Code Refactoring
23
+
24
+ * **button:** remove `fluid` property ([18be699](https://github.com/statistikZH/leu/commit/18be6998e9faa21254717f429c79ac72275bd428))
25
+
3
26
  ## [0.27.0](https://github.com/statistikZH/leu/compare/leu-v0.26.0...leu-v0.27.0) (2026-04-02)
4
27
 
5
28
 
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
1
+ import { t as LeuElement } from "./LeuElement-DQI8cqZV.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
3
  import { css, nothing } from "lit";
4
4
  import { html as html$1, unsafeStatic } from "lit/static-html.js";
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
1
+ import { t as LeuElement } from "./LeuElement-DK1jntuu.js";
2
2
  import * as lit_html0 from "lit-html";
3
3
 
4
4
  //#region src/components/accordion/Accordion.d.ts
package/dist/Accordion.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./LeuElement-k4RjIeoG.js";
2
- import { t as LeuAccordion } from "./Accordion-DLsqXcK8.js";
1
+ import "./LeuElement-DQI8cqZV.js";
2
+ import { t as LeuAccordion } from "./Accordion-D9kLsiBW.js";
3
3
  export { LeuAccordion };
@@ -1,7 +1,7 @@
1
- import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
2
- import { t as FormAssociatedMixinType } from "./FormAssociatedMixin-Cc74LjbC.js";
3
- import { t as LeuIcon } from "./Icon-Op80LrrO.js";
4
- import { t as LeuSpinner } from "./Spinner-CrM1enM0.js";
1
+ import { t as LeuElement } from "./LeuElement-DK1jntuu.js";
2
+ import { t as FormAssociatedMixinType } from "./FormAssociatedMixin-Cw7LsSUE.js";
3
+ import { t as LeuIcon } from "./Icon-CUfh3eb3.js";
4
+ import { t as LeuSpinner } from "./Spinner-DHYaX6-Y.js";
5
5
  import * as lit_html0 from "lit-html";
6
6
 
7
7
  //#region src/components/button/Button.d.ts
@@ -42,15 +42,21 @@ declare class LeuButton extends LeuButton_base {
42
42
  */
43
43
  variant: "primary" | "secondary" | "ghost";
44
44
  /**
45
- * The `type` of the underlying button element.
45
+ * The `type` of the underlying button element. Ignored when `href` is set.
46
46
  */
47
47
  type: "button" | "submit" | "reset";
48
48
  /**
49
- * The `role` of the underlying button element.
49
+ * The `role` of the underlying button element. Ignored when `href` is set.
50
50
  */
51
51
  componentRole?: string;
52
52
  /**
53
- * Whether the button is disabled or not.
53
+ * If set, renders the button as an <a> element instead of a <button> with the provided href.
54
+ */
55
+ href: string;
56
+ /** Tells the browser where to display the linked URL. Only used when `href` is set. */
57
+ target: "_blank" | "_parent" | "_self" | "_top";
58
+ /**
59
+ * Whether the button is disabled or not. Ignored when `href` is set.
54
60
  * @type {boolean}
55
61
  */
56
62
  disabled: boolean;
@@ -76,10 +82,6 @@ declare class LeuButton extends LeuButton_base {
76
82
  * If it is set, the icon will either show an expanded or collapsed state.
77
83
  */
78
84
  expanded?: "true" | "false";
79
- /**
80
- * Alters the shape of the button to be full width of its parent container
81
- */
82
- fluid: boolean;
83
85
  /**
84
86
  * Replaces the content with a spinner
85
87
  */
@@ -93,7 +95,7 @@ declare class LeuButton extends LeuButton_base {
93
95
  click(): void;
94
96
  focus(options?: FocusOptions): void;
95
97
  blur(): void;
96
- render(): lit_html0.TemplateResult<1>;
98
+ render(): lit_html0.TemplateResult;
97
99
  }
98
100
  //#endregion
99
101
  export { LeuButton as t };
@@ -1,10 +1,11 @@
1
- import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
1
+ import { t as LeuElement } from "./LeuElement-DQI8cqZV.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
4
- import { t as LeuSpinner } from "./Spinner-VhKfzI3Q.js";
3
+ import { t as LeuIcon } from "./Icon-D83qesg5.js";
4
+ import { t as LeuSpinner } from "./Spinner-BBiVZxFH.js";
5
5
  import { t as HasSlotController } from "./hasSlotController-DSBCVzPD.js";
6
6
  import { t as FormAssociatedMixin } from "./FormAssociatedMixin-DLPvFtbT.js";
7
- import { css, html, nothing } from "lit";
7
+ import { css, nothing } from "lit";
8
+ import { html as html$1, literal } from "lit/static-html.js";
8
9
  import { property, query } from "lit/decorators.js";
9
10
  import { classMap } from "lit/directives/class-map.js";
10
11
  import { ifDefined } from "lit/directives/if-defined.js";
@@ -44,11 +45,12 @@ var button_default = css`:host {
44
45
  * @todo : Disable hover styles for loading state
45
46
  */
46
47
 
47
- button {
48
+ .button {
48
49
  position: relative;
49
-
50
50
  font-family: var(--leu-font-family-black);
51
51
  text-align: center;
52
+ -webkit-text-decoration: none;
53
+ text-decoration: none;
52
54
  -webkit-appearance: none;
53
55
  -moz-appearance: none;
54
56
  appearance: none;
@@ -57,11 +59,12 @@ button {
57
59
  border: none;
58
60
  border-radius: 2px;
59
61
 
60
- max-width: 100%;
61
- display: flex;
62
+ display: inline-flex;
63
+ justify-content: center;
62
64
  align-items: center;
63
65
  -moz-column-gap: 8px;
64
66
  column-gap: 8px;
67
+ width: 100%;
65
68
  }
66
69
 
67
70
  .content {
@@ -71,51 +74,52 @@ button {
71
74
  white-space: nowrap;
72
75
  }
73
76
 
74
- button.round {
77
+ .button--round {
75
78
  border-radius: 50%;
76
79
  }
77
80
 
78
- button.disabled {
81
+ .button--disabled {
79
82
  cursor: not-allowed;
80
83
  }
81
84
 
82
- button.loading {
85
+ .button--loading {
83
86
  cursor: wait;
84
87
  }
85
88
 
86
- button:focus-visible {
89
+ .button:focus-visible {
87
90
  outline: 2px solid var(--leu-color-func-cyan);
88
91
  outline-offset: 2px;
89
92
  }
90
93
 
91
- button.inverted:focus-visible {
94
+ .button--inverted:focus-visible {
92
95
  outline: 2px solid var(--leu-color-black-0);
93
96
  }
94
97
 
95
- :host([fluid]) button {
96
- width: 100%;
97
- justify-content: center;
98
+ .button--icon-only {
99
+ aspect-ratio: 1;
100
+ width: auto;
101
+ width: initial;
98
102
  }
99
103
 
100
- button.loading :where(.content, .icon-wrapper) {
104
+ .button--loading :where(.content, .icon-wrapper) {
101
105
  visibility: hidden;
102
106
  }
103
107
 
104
108
  /* size - regular */
105
109
 
106
- button.regular {
110
+ .button--regular {
107
111
  padding: 12px 24px;
108
112
  font-size: 16px;
109
113
  line-height: 24px;
110
114
  }
111
115
 
112
- button.regular.icon-only {
116
+ .button--regular.button--icon-only {
113
117
  padding: 12px;
114
118
  }
115
119
 
116
120
  /* size - small */
117
121
 
118
- button.small {
122
+ .button--small {
119
123
  padding: 6px 24px;
120
124
  font-size: 14px;
121
125
  line-height: 20px;
@@ -123,65 +127,65 @@ button.small {
123
127
  --leu-icon-size: 1rem;
124
128
  }
125
129
 
126
- button.small.icon-only {
130
+ .button--small.button--icon-only {
127
131
  padding: 8px;
128
132
  }
129
133
 
130
134
  /* primary */
131
135
 
132
- button.primary {
136
+ .button--primary {
133
137
  color: var(--leu-color-black-0);
134
138
  background: var(--leu-color-black-100);
135
139
  }
136
140
 
137
- button.primary:hover {
141
+ .button--primary:hover {
138
142
  color: var(--leu-color-black-0);
139
143
  background: var(--leu-color-black-transp-80);
140
144
  }
141
145
 
142
- button.primary.active {
146
+ .button--primary.button--active {
143
147
  color: var(--leu-color-black-0);
144
148
  background: var(--leu-color-black-100);
145
149
  }
146
150
 
147
- button.primary.active:hover {
151
+ .button--primary.button--active:hover {
148
152
  background: var(--leu-color-black-transp-80);
149
153
  }
150
154
 
151
- button.primary.disabled {
155
+ .button--primary.button--disabled {
152
156
  color: var(--leu-color-black-0);
153
157
  background: var(--leu-color-black-transp-20);
154
158
  }
155
159
 
156
160
  /* secondary */
157
161
 
158
- button.secondary {
162
+ .button--secondary {
159
163
  color: var(--leu-color-black-transp-60);
160
164
  background: var(--leu-color-black-transp-10);
161
165
  }
162
166
 
163
- button.secondary:hover {
167
+ .button--secondary:hover {
164
168
  color: var(--leu-color-black-100);
165
169
  background: var(--leu-color-black-transp-20);
166
170
  }
167
171
 
168
- button.secondary.active {
172
+ .button--secondary.button--active {
169
173
  color: var(--leu-color-black-0);
170
174
  background: var(--leu-color-black-100);
171
175
  }
172
176
 
173
- button.secondary.active:hover {
177
+ .button--secondary.button--active:hover {
174
178
  background: var(--leu-color-black-transp-80);
175
179
  }
176
180
 
177
- button.secondary.disabled {
181
+ .button--secondary.button--disabled {
178
182
  color: var(--leu-color-black-transp-20);
179
183
  background: var(--leu-color-black-transp-5);
180
184
  }
181
185
 
182
186
  /* ghost */
183
187
 
184
- button.ghost {
188
+ .button--ghost {
185
189
  --leu-icon-size: 1rem;
186
190
 
187
191
  background: transparent;
@@ -191,77 +195,77 @@ button.ghost {
191
195
  height: 2rem;
192
196
  }
193
197
 
194
- button.ghost:hover {
198
+ .button--ghost:hover {
195
199
  color: var(--leu-color-black-100);
196
200
  }
197
201
 
198
- button.ghost.active {
202
+ .button--ghost.button--active {
199
203
  color: var(--leu-color-black-100);
200
204
  }
201
205
 
202
- button.ghost.disabled {
206
+ .button--ghost.button--disabled {
203
207
  color: var(--leu-color-black-20);
204
208
  }
205
209
 
206
210
  /* primary + inverted */
207
211
 
208
- button.primary.inverted {
212
+ .button--primary.button--inverted {
209
213
  color: var(--leu-color-black-100);
210
214
  background: var(--leu-color-black-0);
211
215
  }
212
216
 
213
- button.primary.inverted:hover {
217
+ .button--primary.button--inverted:hover {
214
218
  color: var(--leu-color-black-100);
215
219
  background: var(--leu-color-white-transp-70);
216
220
  }
217
221
 
218
- button.primary.inverted.active {
222
+ .button--primary.button--inverted.button--active {
219
223
  color: var(--leu-color-black-0);
220
224
  background: var(--leu-color-black-100);
221
225
  }
222
226
 
223
- button.primary.inverted.disabled {
227
+ .button--primary.button--inverted.button--disabled {
224
228
  color: var(--leu-color-black-40);
225
229
  background: var(--leu-color-white-transp-70);
226
230
  }
227
231
 
228
232
  /* secondary + inverted */
229
233
 
230
- button.secondary.inverted {
234
+ .button--secondary.button--inverted {
231
235
  color: var(--leu-color-black-0);
232
236
  background: var(--leu-color-black-transp-20);
233
237
  }
234
238
 
235
- button.secondary.inverted:hover {
239
+ .button--secondary.button--inverted:hover {
236
240
  color: var(--leu-color-black-0);
237
241
  background: var(--leu-color-black-transp-40);
238
242
  }
239
243
 
240
- button.secondary.inverted.active {
244
+ .button--secondary.button--inverted.button--active {
241
245
  color: var(--leu-color-black-100);
242
246
  background: var(--leu-color-black-0);
243
247
  }
244
248
 
245
- button.secondary.inverted.disabled {
249
+ .button--secondary.button--inverted.button--disabled {
246
250
  color: var(--leu-color-white-transp-70);
247
251
  background: var(--leu-color-black-transp-10);
248
252
  }
249
253
 
250
254
  /* ghost + inverted */
251
255
 
252
- button.ghost.inverted {
256
+ .button--ghost.button--inverted {
253
257
  color: var(--leu-color-black-0);
254
258
  }
255
259
 
256
- button.ghost.inverted:hover {
260
+ .button--ghost.button--inverted:hover {
257
261
  color: var(--leu-color-white-transp-70);
258
262
  }
259
263
 
260
- button.ghost.inverted.active {
264
+ .button--ghost.button--inverted.button--active {
261
265
  color: var(--leu-color-black-0);
262
266
  }
263
267
 
264
- button.ghost.inverted.disabled {
268
+ .button--ghost.button--inverted.button--disabled {
265
269
  color: var(--leu-color-black-20);
266
270
  }
267
271
 
@@ -275,12 +279,12 @@ button.ghost.inverted.disabled {
275
279
  display: none;
276
280
  }
277
281
 
278
- .icon-before .icon-wrapper--before,
279
- .icon-after .icon-wrapper--after {
282
+ .button--icon-before .icon-wrapper--before,
283
+ .button--icon-after .icon-wrapper--after {
280
284
  display: block;
281
285
  }
282
286
 
283
- .ghost .icon-wrapper {
287
+ .button--ghost .icon-wrapper {
284
288
  position: relative;
285
289
  width: 2rem;
286
290
  padding: 0 0.5rem;
@@ -288,14 +292,14 @@ button.ghost.inverted.disabled {
288
292
  --_color: currentcolor;
289
293
  }
290
294
 
291
- .ghost .icon-wrapper__slot {
295
+ .button--ghost .icon-wrapper__slot {
292
296
  display: block;
293
297
  position: relative;
294
298
  z-index: 1;
295
299
  color: var(--_color);
296
300
  }
297
301
 
298
- .ghost .icon-wrapper::before {
302
+ .button--ghost .icon-wrapper::before {
299
303
  content: "";
300
304
  position: absolute;
301
305
  z-index: 0;
@@ -308,32 +312,32 @@ button.ghost.inverted.disabled {
308
312
  background: var(--_bg);
309
313
  }
310
314
 
311
- .ghost.active .icon-wrapper {
315
+ .button--ghost.button--active .icon-wrapper {
312
316
  --_bg: var(--leu-color-black-100);
313
317
  --_color: var(--leu-color-black-0);
314
318
  }
315
319
 
316
- .ghost.disabled .icon-wrapper {
320
+ .button--ghost.button--disabled .icon-wrapper {
317
321
  --_bg: var(--leu-color-black-transp-5);
318
322
  }
319
323
 
320
324
  /* inverted */
321
325
 
322
- .ghost.inverted .icon-wrapper {
326
+ .button--ghost.button--inverted .icon-wrapper {
323
327
  --_bg: var(--leu-color-black-transp-20);
324
328
  }
325
329
 
326
- .ghost.inverted:hover .icon-wrapper {
330
+ .button--ghost.button--inverted:hover .icon-wrapper {
327
331
  --_bg: var(--leu-color-black-transp-40);
328
332
  --_color: var(--leu-color-black-0);
329
333
  }
330
334
 
331
- .ghost.inverted.disabled .icon-wrapper {
335
+ .button--ghost.button--inverted.button--disabled .icon-wrapper {
332
336
  --_bg: var(--leu-color-black-transp-20);
333
337
  --_color: var(--leu-color-white-transp-70);
334
338
  }
335
339
 
336
- .ghost.active.inverted .icon-wrapper {
340
+ .button--ghost.button--active.button--inverted .icon-wrapper {
337
341
  --_bg: var(--leu-color-black-0);
338
342
  --_color: var(--leu-color-black-100);
339
343
  }
@@ -392,7 +396,6 @@ var LeuButton = class extends FormAssociatedMixin(LeuElement) {
392
396
  this.round = false;
393
397
  this.active = false;
394
398
  this.inverted = false;
395
- this.fluid = false;
396
399
  this.loading = false;
397
400
  }
398
401
  static {
@@ -411,7 +414,7 @@ var LeuButton = class extends FormAssociatedMixin(LeuElement) {
411
414
  };
412
415
  }
413
416
  renderExpandingIcon() {
414
- if (typeof this.expanded !== "undefined" && this.variant === "ghost") return html`<div class="icon-expanded">
417
+ if (typeof this.expanded !== "undefined" && this.variant === "ghost") return html$1`<div class="icon-expanded">
415
418
  <leu-icon name="angleDropDown" size="24"></leu-icon>
416
419
  </div>`;
417
420
  return nothing;
@@ -472,31 +475,35 @@ var LeuButton = class extends FormAssociatedMixin(LeuElement) {
472
475
  const hasIconDefault = Boolean(this.querySelector("leu-icon"));
473
476
  const hasIconBefore = this.hasSlotController.test("before");
474
477
  const hasIconAfter = this.hasSlotController.test("after");
478
+ const isLink = Boolean(this.href);
475
479
  const aria = this.getAriaAttributes();
480
+ const tag = isLink ? literal`a` : literal`button`;
476
481
  const cssClasses = {
477
482
  button: true,
478
- "icon-only": hasIconDefault && !hasTextContent,
479
- "icon-before": hasIconBefore,
480
- "icon-after": hasIconAfter,
481
- round: this.round,
482
- active: this.active,
483
- disabled: this.disabled,
484
- inverted: this.inverted,
485
- loading: this.loading,
486
- [this.variant]: true,
487
- [this.size]: true
483
+ "button--icon-only": hasIconDefault && !hasTextContent,
484
+ "button--icon-before": hasIconBefore,
485
+ "button--icon-after": hasIconAfter,
486
+ "button--round": this.round,
487
+ "button--active": this.active,
488
+ "button--inverted": this.inverted,
489
+ "button--loading": this.loading,
490
+ "button--disabled": this.disabled,
491
+ [`button--${this.variant}`]: true,
492
+ [`button--${this.size}`]: true
488
493
  };
489
- return html`
490
- <button
491
- @click=${this.handleClick}
494
+ return html$1`
495
+ <${tag}
496
+ @click=${!isLink ? this.handleClick : void 0}
492
497
  aria-label=${ifDefined(aria.label)}
493
498
  aria-selected=${ifDefined(aria.selected)}
494
499
  aria-checked=${ifDefined(aria.checked)}
495
500
  aria-expanded=${ifDefined(this.expanded)}
496
- role=${ifDefined(aria.role)}
501
+ role=${ifDefined(isLink ? void 0 : aria.role)}
502
+ href=${ifDefined(this.href)}
503
+ target=${ifDefined(isLink ? this.target : void 0)}
497
504
  class=${classMap(cssClasses)}
498
- ?disabled=${this.disabled || this.loading}
499
- type=${this.type}
505
+ ?disabled=${this.disabled && !isLink || this.loading}
506
+ type=${ifDefined(isLink ? void 0 : this.type)}
500
507
  >
501
508
  <div class="icon-wrapper icon-wrapper--before">
502
509
  <slot name="before" class="icon-wrapper__slot"></slot>
@@ -505,9 +512,9 @@ var LeuButton = class extends FormAssociatedMixin(LeuElement) {
505
512
  <div class="icon-wrapper icon-wrapper--after">
506
513
  <slot name="after" class="icon-wrapper__slot"></slot>
507
514
  </div>
508
- ${this.loading ? html`<leu-spinner class="spinner"></leu-spinner>` : nothing}
515
+ ${this.loading ? html$1`<leu-spinner class="spinner"></leu-spinner>` : nothing}
509
516
  ${this.renderExpandingIcon()}
510
- </button>
517
+ </${tag}>
511
518
  `;
512
519
  }
513
520
  };
@@ -531,6 +538,11 @@ __decorate([property({
531
538
  type: String,
532
539
  reflect: true
533
540
  })], LeuButton.prototype, "componentRole", void 0);
541
+ __decorate([property({
542
+ type: String,
543
+ reflect: true
544
+ })], LeuButton.prototype, "href", void 0);
545
+ __decorate([property()], LeuButton.prototype, "target", void 0);
534
546
  __decorate([property({
535
547
  type: Boolean,
536
548
  reflect: true
@@ -551,10 +563,6 @@ __decorate([property({
551
563
  type: String,
552
564
  reflect: true
553
565
  })], LeuButton.prototype, "expanded", void 0);
554
- __decorate([property({
555
- type: Boolean,
556
- reflect: true
557
- })], LeuButton.prototype, "fluid", void 0);
558
566
  __decorate([property({
559
567
  type: Boolean,
560
568
  reflect: true
package/dist/Button.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as LeuButton } from "./Button-BgNUxmo_.js";
1
+ import { t as LeuButton } from "./Button-DcuvEVkC.js";
2
2
  export { LeuButton };
package/dist/Button.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./LeuElement-k4RjIeoG.js";
2
- import "./Icon-CbZXpyHU.js";
3
- import "./Spinner-VhKfzI3Q.js";
4
- import { t as LeuButton } from "./Button-BSyDL_cV.js";
1
+ import "./LeuElement-DQI8cqZV.js";
2
+ import "./Icon-D83qesg5.js";
3
+ import "./Spinner-BBiVZxFH.js";
4
+ import { t as LeuButton } from "./Button-DyNVOHCd.js";
5
5
  import "./FormAssociatedMixin-DLPvFtbT.js";
6
6
  export { LeuButton };
@@ -1,5 +1,5 @@
1
- import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
- import { t as LeuButton } from "./Button-BSyDL_cV.js";
1
+ import { t as LeuElement } from "./LeuElement-DQI8cqZV.js";
2
+ import { t as LeuButton } from "./Button-DyNVOHCd.js";
3
3
  import { css, html } from "lit";
4
4
  //#region src/components/button-group/button-group.css?inline
5
5
  var button_group_default = css`.group {
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-pJFU18Xm.js";
1
+ import { t as LeuElement } from "./LeuElement-DK1jntuu.js";
2
2
  import * as lit_html0 from "lit-html";
3
3
 
4
4
  //#region src/components/button-group/ButtonGroup.d.ts
@@ -1,7 +1,7 @@
1
- import "./LeuElement-k4RjIeoG.js";
2
- import "./Icon-CbZXpyHU.js";
3
- import "./Spinner-VhKfzI3Q.js";
4
- import "./Button-BSyDL_cV.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 { t as LeuButtonGroup } from "./ButtonGroup-BmSvl-Oc.js";
6
+ import { t as LeuButtonGroup } from "./ButtonGroup-MEh4vb5a.js";
7
7
  export { LeuButtonGroup };
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
1
+ import { t as LeuElement } from "./LeuElement-DQI8cqZV.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuSpinner } from "./Spinner-VhKfzI3Q.js";
3
+ import { t as LeuSpinner } from "./Spinner-BBiVZxFH.js";
4
4
  import { t as HasSlotController } from "./hasSlotController-DSBCVzPD.js";
5
5
  import { css, html, nothing } from "lit";
6
6
  import { property } from "lit/decorators.js";