@statistikzh/leu 0.26.0 → 0.27.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 (115) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +21 -0
  3. package/dist/{Accordion-B04QkmHz.js → Accordion-DLsqXcK8.js} +1 -1
  4. package/dist/Accordion.js +2 -2
  5. package/dist/{Button-BkhqVjug.js → Button-BSyDL_cV.js} +3 -3
  6. package/dist/Button.js +4 -4
  7. package/dist/{ButtonGroup-B8U9fDvM.js → ButtonGroup-BmSvl-Oc.js} +2 -2
  8. package/dist/ButtonGroup.js +5 -5
  9. package/dist/{ChartWrapper-CSMFwz9e.js → ChartWrapper-CvDvQsd5.js} +2 -2
  10. package/dist/ChartWrapper.js +3 -3
  11. package/dist/{Checkbox-Dd1QLpfn.js → Checkbox-Cl_X6gBJ.js} +2 -2
  12. package/dist/Checkbox.js +3 -3
  13. package/dist/{CheckboxGroup-Bz2eWEFL.js → CheckboxGroup-BKhOmZYX.js} +2 -2
  14. package/dist/CheckboxGroup.js +4 -4
  15. package/dist/{Chip-XAQIIsXq.js → Chip-McVP3N_x.js} +1 -1
  16. package/dist/Chip.js +2 -2
  17. package/dist/{ChipGroup-DLqfK2kn.js → ChipGroup-DUGavZeU.js} +1 -1
  18. package/dist/ChipGroup.js +3 -3
  19. package/dist/ChipLink.js +2 -2
  20. package/dist/ChipRemovable.js +3 -3
  21. package/dist/ChipSelectable.js +2 -2
  22. package/dist/{Dialog-DHuXR_oo.js → Dialog-BlDd4T2u.js} +2 -2
  23. package/dist/Dialog.js +3 -3
  24. package/dist/{Dropdown-DtFTePbc.js → Dropdown-BLxSIe6p.js} +5 -5
  25. package/dist/Dropdown.js +8 -8
  26. package/dist/{FileInput-b8sbLDPI.js → FileInput-DntYrpZ-.js} +22 -7
  27. package/dist/FileInput.d.ts +11 -0
  28. package/dist/FileInput.js +6 -6
  29. package/dist/{Icon-C_yYuynf.js → Icon-CbZXpyHU.js} +1 -1
  30. package/dist/Icon.js +2 -2
  31. package/dist/{Input-D2THgo7c.d.ts → Input-CeaAOB4p.d.ts} +6 -2
  32. package/dist/{Input-DEOVocTa.js → Input-DBXX7ev8.js} +32 -11
  33. package/dist/Input.d.ts +1 -1
  34. package/dist/Input.js +3 -3
  35. package/dist/{LeuElement-BeFrgKes.js → LeuElement-k4RjIeoG.js} +1 -1
  36. package/dist/{Menu-BeqqtCw6.js → Menu-Cu8eIF1T.js} +2 -2
  37. package/dist/Menu.js +4 -4
  38. package/dist/{MenuItem-DVg8-1Bq.js → MenuItem-Cs3KFhJm.js} +2 -2
  39. package/dist/MenuItem.js +3 -3
  40. package/dist/{Message-BhknWvAF.js → Message-C6Zlk_2p.js} +2 -2
  41. package/dist/Message.js +3 -3
  42. package/dist/{Pagination-DJI5MIi_.js → Pagination-CB2eVlXk.js} +4 -4
  43. package/dist/Pagination.js +6 -6
  44. package/dist/{Placeholder-BJybFwSg.js → Placeholder-DHMexMhK.js} +1 -1
  45. package/dist/Placeholder.js +2 -2
  46. package/dist/{Popup-DNlm_9AA.js → Popup-8jhVy8gB.js} +1 -1
  47. package/dist/Popup.js +2 -2
  48. package/dist/{ProgressBar-B0wYj1KF.js → ProgressBar-CG0_lHfS.js} +1 -1
  49. package/dist/ProgressBar.js +2 -2
  50. package/dist/{Radio-DMCL8c4D.js → Radio-DG3xqP3s.js} +1 -1
  51. package/dist/Radio.js +2 -2
  52. package/dist/{RadioGroup-CM6IyBlq.js → RadioGroup-BKCp9ICX.js} +2 -2
  53. package/dist/RadioGroup.js +3 -3
  54. package/dist/{Range-B72rtfln.js → Range-7LrESv4K.js} +1 -1
  55. package/dist/Range.js +2 -2
  56. package/dist/{ScrollTop-BFAqBVDR.js → ScrollTop-CJJsfniA.js} +20 -20
  57. package/dist/ScrollTop.d.ts +5 -5
  58. package/dist/ScrollTop.js +5 -5
  59. package/dist/{Select-vxl3BvD4.js → Select-CxEDXIBn.js} +153 -133
  60. package/dist/Select.d.ts +73 -71
  61. package/dist/Select.js +9 -9
  62. package/dist/{Spinner-DDTqijTO.js → Spinner-VhKfzI3Q.js} +1 -1
  63. package/dist/Spinner.js +2 -2
  64. package/dist/{Table-BgCxfBcm.js → Table-rg_JCtsA.js} +3 -3
  65. package/dist/Table.js +7 -7
  66. package/dist/{Tag-DK2KkPIQ.js → Tag-BROUaDAZ.js} +1 -1
  67. package/dist/Tag.js +2 -2
  68. package/dist/{VisuallyHidden-pll3amXE.js → VisuallyHidden-Co_txzxB.js} +1 -1
  69. package/dist/VisuallyHidden.js +2 -2
  70. package/dist/index.d.ts +1 -1
  71. package/dist/index.js +30 -30
  72. package/dist/leu-accordion.js +2 -2
  73. package/dist/leu-button-group.js +5 -5
  74. package/dist/leu-button.js +4 -4
  75. package/dist/leu-chart-wrapper.js +3 -3
  76. package/dist/leu-checkbox-group.js +4 -4
  77. package/dist/leu-checkbox.js +3 -3
  78. package/dist/leu-chip-group.js +3 -3
  79. package/dist/leu-chip-link.js +2 -2
  80. package/dist/leu-chip-removable.js +3 -3
  81. package/dist/leu-chip-selectable.js +2 -2
  82. package/dist/leu-dialog.js +3 -3
  83. package/dist/leu-dropdown.js +8 -8
  84. package/dist/leu-file-input.js +6 -6
  85. package/dist/leu-icon.js +2 -2
  86. package/dist/leu-input.d.ts +1 -1
  87. package/dist/leu-input.js +3 -3
  88. package/dist/leu-menu-item.js +3 -3
  89. package/dist/leu-menu.js +4 -4
  90. package/dist/leu-message.js +3 -3
  91. package/dist/leu-pagination.js +6 -6
  92. package/dist/leu-placeholder.js +2 -2
  93. package/dist/leu-popup.js +2 -2
  94. package/dist/leu-progress-bar.js +2 -2
  95. package/dist/leu-radio-group.js +3 -3
  96. package/dist/leu-radio.js +2 -2
  97. package/dist/leu-range.js +2 -2
  98. package/dist/leu-scroll-top.js +5 -5
  99. package/dist/leu-select.js +9 -9
  100. package/dist/leu-spinner.js +2 -2
  101. package/dist/leu-table.js +7 -7
  102. package/dist/leu-tag.js +2 -2
  103. package/dist/leu-visually-hidden.js +2 -2
  104. package/dist/vscode.html-custom-data.json +14 -27
  105. package/dist/vue/index.d.ts +16 -24
  106. package/dist/web-types.json +41 -60
  107. package/package.json +1 -1
  108. package/src/components/file-input/FileInput.ts +24 -5
  109. package/src/components/input/Input.ts +43 -8
  110. package/src/components/input/test/input.test.ts +106 -1
  111. package/src/components/scroll-top/ScrollTop.ts +18 -16
  112. package/src/components/select/Select.ts +198 -124
  113. package/src/components/select/select.css +4 -0
  114. package/src/components/select/stories/select.stories.ts +10 -0
  115. package/src/components/select/test/select.test.ts +440 -35
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.26.0"
2
+ ".": "0.27.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.27.0](https://github.com/statistikZH/leu/compare/leu-v0.26.0...leu-v0.27.0) (2026-04-02)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **select:** the `open` property is now an internal state. use the `click()` method to imperatively open the select element
9
+
10
+ ### Features
11
+
12
+ * **input:** implement defaultValue alongside the existing value property to match native behaviour ([#341](https://github.com/statistikZH/leu/issues/341)) ([650ec97](https://github.com/statistikZH/leu/commit/650ec97ffc25384a1c14c463959c7b644391a8e3))
13
+ * **select:** add defaultValue to match native behaviour of a select element ([f8602fb](https://github.com/statistikZH/leu/commit/f8602fbd72ea63c4f29f69eb355efeb89feca5be))
14
+ * **select:** add required property ([f8602fb](https://github.com/statistikZH/leu/commit/f8602fbd72ea63c4f29f69eb355efeb89feca5be))
15
+ * **select:** implement select as a form control ([f8602fb](https://github.com/statistikZH/leu/commit/f8602fbd72ea63c4f29f69eb355efeb89feca5be))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **file-input:** format >1000MB as GB ([#339](https://github.com/statistikZH/leu/issues/339)) ([f9b0d89](https://github.com/statistikZH/leu/commit/f9b0d89700ada07d7a3dff4dfbcf4a27090bd146))
21
+ * fix dev dependencies vulnerabilities ([7390e3e](https://github.com/statistikZH/leu/commit/7390e3e86766d794061a0b84e34c7bec701a3612))
22
+ * **scroll-top:** move scrollTo call from a static to an instance method ([#340](https://github.com/statistikZH/leu/issues/340)) ([860adf4](https://github.com/statistikZH/leu/commit/860adf47596bf06456764b03777f5bd6462d5887))
23
+
3
24
  ## [0.26.0](https://github.com/statistikZH/leu/compare/leu-v0.25.0...leu-v0.26.0) (2026-03-25)
4
25
 
5
26
 
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.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";
package/dist/Accordion.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import { t as LeuAccordion } from "./Accordion-B04QkmHz.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import { t as LeuAccordion } from "./Accordion-DLsqXcK8.js";
3
3
  export { LeuAccordion };
@@ -1,7 +1,7 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
4
- import { t as LeuSpinner } from "./Spinner-DDTqijTO.js";
3
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
4
+ import { t as LeuSpinner } from "./Spinner-VhKfzI3Q.js";
5
5
  import { t as HasSlotController } from "./hasSlotController-DSBCVzPD.js";
6
6
  import { t as FormAssociatedMixin } from "./FormAssociatedMixin-DLPvFtbT.js";
7
7
  import { css, html, nothing } from "lit";
package/dist/Button.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import "./Spinner-DDTqijTO.js";
4
- import { t as LeuButton } from "./Button-BkhqVjug.js";
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";
5
5
  import "./FormAssociatedMixin-DLPvFtbT.js";
6
6
  export { LeuButton };
@@ -1,5 +1,5 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
2
- import { t as LeuButton } from "./Button-BkhqVjug.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
+ import { t as LeuButton } from "./Button-BSyDL_cV.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,7 +1,7 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import "./Spinner-DDTqijTO.js";
4
- import "./Button-BkhqVjug.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
+ import "./Spinner-VhKfzI3Q.js";
4
+ import "./Button-BSyDL_cV.js";
5
5
  import "./FormAssociatedMixin-DLPvFtbT.js";
6
- import { t as LeuButtonGroup } from "./ButtonGroup-B8U9fDvM.js";
6
+ import { t as LeuButtonGroup } from "./ButtonGroup-BmSvl-Oc.js";
7
7
  export { LeuButtonGroup };
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuSpinner } from "./Spinner-DDTqijTO.js";
3
+ import { t as LeuSpinner } from "./Spinner-VhKfzI3Q.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";
@@ -1,4 +1,4 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Spinner-DDTqijTO.js";
3
- import { t as LeuChartWrapper } from "./ChartWrapper-CSMFwz9e.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Spinner-VhKfzI3Q.js";
3
+ import { t as LeuChartWrapper } from "./ChartWrapper-CvDvQsd5.js";
4
4
  export { LeuChartWrapper };
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
3
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
4
4
  import { t as FormAssociatedMixin } from "./FormAssociatedMixin-DLPvFtbT.js";
5
5
  import { css, html } from "lit";
6
6
  import { property } from "lit/decorators.js";
package/dist/Checkbox.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
3
  import "./FormAssociatedMixin-DLPvFtbT.js";
4
- import { t as LeuCheckbox } from "./Checkbox-Dd1QLpfn.js";
4
+ import { t as LeuCheckbox } from "./Checkbox-Cl_X6gBJ.js";
5
5
  export { LeuCheckbox };
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuCheckbox } from "./Checkbox-Dd1QLpfn.js";
3
+ import { t as LeuCheckbox } from "./Checkbox-Cl_X6gBJ.js";
4
4
  import { css, html } from "lit";
5
5
  import { property } from "lit/decorators.js";
6
6
  import { classMap } from "lit/directives/class-map.js";
@@ -1,6 +1,6 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
3
  import "./FormAssociatedMixin-DLPvFtbT.js";
4
- import "./Checkbox-Dd1QLpfn.js";
5
- import { t as LeuCheckboxGroup } from "./CheckboxGroup-Bz2eWEFL.js";
4
+ import "./Checkbox-Cl_X6gBJ.js";
5
+ import { t as LeuCheckboxGroup } from "./CheckboxGroup-BKhOmZYX.js";
6
6
  export { LeuCheckboxGroup };
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
3
  import { css } from "lit";
4
4
  import { property } from "lit/decorators.js";
package/dist/Chip.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import { t as LeuChipBase } from "./Chip-XAQIIsXq.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import { t as LeuChipBase } from "./Chip-McVP3N_x.js";
3
3
  export { LeuChipBase };
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
3
  import { LeuChipSelectable } from "./ChipSelectable.js";
4
4
  import { css } from "lit";
package/dist/ChipGroup.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import { t as LeuChipGroup } from "./ChipGroup-DLqfK2kn.js";
3
- import "./Chip-XAQIIsXq.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import { t as LeuChipGroup } from "./ChipGroup-DUGavZeU.js";
3
+ import "./Chip-McVP3N_x.js";
4
4
  export { LeuChipGroup };
package/dist/ChipLink.js CHANGED
@@ -1,6 +1,6 @@
1
- import "./LeuElement-BeFrgKes.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuChipBase } from "./Chip-XAQIIsXq.js";
3
+ import { t as LeuChipBase } from "./Chip-McVP3N_x.js";
4
4
  import { html } from "lit";
5
5
  import { property } from "lit/decorators.js";
6
6
  //#region src/components/chip/ChipLink.ts
@@ -1,7 +1,7 @@
1
- import "./LeuElement-BeFrgKes.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
4
- import { t as LeuChipBase } from "./Chip-XAQIIsXq.js";
3
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
4
+ import { t as LeuChipBase } from "./Chip-McVP3N_x.js";
5
5
  import { html } from "lit";
6
6
  import { property } from "lit/decorators.js";
7
7
  //#region src/components/chip/ChipRemovable.ts
@@ -1,6 +1,6 @@
1
- import "./LeuElement-BeFrgKes.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuChipBase } from "./Chip-XAQIIsXq.js";
3
+ import { t as LeuChipBase } from "./Chip-McVP3N_x.js";
4
4
  import { html } from "lit";
5
5
  import { property } from "lit/decorators.js";
6
6
  //#region src/components/chip/ChipSelectable.ts
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
3
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.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";
package/dist/Dialog.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import { t as LeuDialog } from "./Dialog-DHuXR_oo.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
+ import { t as LeuDialog } from "./Dialog-BlDd4T2u.js";
4
4
  export { LeuDialog };
@@ -1,10 +1,10 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
3
  import { t as HasSlotController } from "./hasSlotController-DSBCVzPD.js";
4
- import { t as LeuButton } from "./Button-BkhqVjug.js";
5
- import { t as LeuMenuItem } from "./MenuItem-DVg8-1Bq.js";
6
- import { t as LeuMenu } from "./Menu-BeqqtCw6.js";
7
- import { t as LeuPopup } from "./Popup-DNlm_9AA.js";
4
+ import { t as LeuButton } from "./Button-BSyDL_cV.js";
5
+ import { t as LeuMenuItem } from "./MenuItem-Cs3KFhJm.js";
6
+ import { t as LeuMenu } from "./Menu-Cu8eIF1T.js";
7
+ import { t as LeuPopup } from "./Popup-8jhVy8gB.js";
8
8
  import { css, html, nothing } from "lit";
9
9
  import { property } from "lit/decorators.js";
10
10
  import { createRef, ref } from "lit/directives/ref.js";
package/dist/Dropdown.js CHANGED
@@ -1,10 +1,10 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import "./Spinner-DDTqijTO.js";
4
- import "./Button-BkhqVjug.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
+ import "./Spinner-VhKfzI3Q.js";
4
+ import "./Button-BSyDL_cV.js";
5
5
  import "./FormAssociatedMixin-DLPvFtbT.js";
6
- import "./MenuItem-DVg8-1Bq.js";
7
- import "./Menu-BeqqtCw6.js";
8
- import "./Popup-DNlm_9AA.js";
9
- import { t as LeuDropdown } from "./Dropdown-DtFTePbc.js";
6
+ import "./MenuItem-Cs3KFhJm.js";
7
+ import "./Menu-Cu8eIF1T.js";
8
+ import "./Popup-8jhVy8gB.js";
9
+ import { t as LeuDropdown } from "./Dropdown-BLxSIe6p.js";
10
10
  export { LeuDropdown };
@@ -1,9 +1,9 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
4
- import { t as LeuButton } from "./Button-BkhqVjug.js";
3
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
4
+ import { t as LeuButton } from "./Button-BSyDL_cV.js";
5
5
  import { t as FormAssociatedMixin } from "./FormAssociatedMixin-DLPvFtbT.js";
6
- import { t as LeuVisuallyHidden } from "./VisuallyHidden-pll3amXE.js";
6
+ import { t as LeuVisuallyHidden } from "./VisuallyHidden-Co_txzxB.js";
7
7
  import { css, html, nothing } from "lit";
8
8
  import { property, query, state } from "lit/decorators.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
@@ -237,10 +237,25 @@ var LeuFileInput = class LeuFileInput extends FormAssociatedMixin(LeuElement) {
237
237
  bubbles: true
238
238
  }));
239
239
  }
240
+ /**
241
+ * This implementation Uses base-10 (decimal) units:
242
+ * 1 KB = 1_000 bytes
243
+ * 1 MB = 1_000_000 bytes
244
+ * 1 GB = 1_000_000_000 bytes
245
+ *
246
+ * To switch to base-2 (binary), use the following implementation:
247
+ * // const KB = 1024
248
+ * // const MB = 1024 * 1024
249
+ * // const GB = 1024 * 1024 * 1024
250
+ */
240
251
  static formatFileSize(size) {
241
- if (size < 1e3) return html`${size}&nbsp;bytes`;
242
- if (size >= 1e3 && size < 1e6) return html`${(size / 1e3).toFixed(1)}&nbsp;KB`;
243
- return html`${(size / 1e6).toFixed(1)}&nbsp;MB`;
252
+ const KB = 1e3;
253
+ const MB = 1e6;
254
+ const GB = 1e9;
255
+ if (size >= GB) return html`${(size / GB).toFixed(1)}&nbsp;GB`;
256
+ if (size >= MB) return html`${(size / MB).toFixed(1)}&nbsp;MB`;
257
+ if (size >= KB) return html`${(size / KB).toFixed(1)}&nbsp;KB`;
258
+ return html`${size}&nbsp;bytes`;
244
259
  }
245
260
  isAcceptedFile(file) {
246
261
  const acceptedTypes = this.accept.split(",").map((type) => type.trim());
@@ -53,6 +53,17 @@ declare class LeuFileInput extends LeuFileInput_base {
53
53
  protected setFormValue(): void;
54
54
  protected removeFile(fileToRemove: File): void;
55
55
  protected dispatchChangeAndInputEvents(): void;
56
+ /**
57
+ * This implementation Uses base-10 (decimal) units:
58
+ * 1 KB = 1_000 bytes
59
+ * 1 MB = 1_000_000 bytes
60
+ * 1 GB = 1_000_000_000 bytes
61
+ *
62
+ * To switch to base-2 (binary), use the following implementation:
63
+ * // const KB = 1024
64
+ * // const MB = 1024 * 1024
65
+ * // const GB = 1024 * 1024 * 1024
66
+ */
56
67
  protected static formatFileSize(size: number): lit_html0.TemplateResult<1>;
57
68
  protected handleDragEnter: (event: DragEvent) => void;
58
69
  protected handleDragOver: (event: DragEvent) => void;
package/dist/FileInput.js CHANGED
@@ -1,8 +1,8 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import "./Spinner-DDTqijTO.js";
4
- import "./Button-BkhqVjug.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
+ import "./Spinner-VhKfzI3Q.js";
4
+ import "./Button-BSyDL_cV.js";
5
5
  import "./FormAssociatedMixin-DLPvFtbT.js";
6
- import { t as LeuFileInput } from "./FileInput-b8sbLDPI.js";
7
- import "./VisuallyHidden-pll3amXE.js";
6
+ import { t as LeuFileInput } from "./FileInput-DntYrpZ-.js";
7
+ import "./VisuallyHidden-Co_txzxB.js";
8
8
  export { LeuFileInput };
@@ -1,4 +1,4 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
3
  import { css, html, svg } from "lit";
4
4
  import { property } from "lit/decorators.js";
package/dist/Icon.js CHANGED
@@ -1,3 +1,3 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
3
3
  export { LeuIcon };
@@ -42,8 +42,6 @@ declare class LeuInput extends LeuInput_base {
42
42
  required: boolean;
43
43
  /** Adds a button to clear the input element */
44
44
  clearable: boolean;
45
- /** The value of the input element. */
46
- value: string;
47
45
  /** A custom error that is completely independent of the validity state. Useful for displaying server side errors. */
48
46
  error: string;
49
47
  /** The label of the input element */
@@ -74,6 +72,12 @@ declare class LeuInput extends LeuInput_base {
74
72
  validationMessages: Record<string, string>;
75
73
  /** Disables the browser's validation. */
76
74
  novalidate: boolean;
75
+ /** The default value of the input element. */
76
+ defaultValue: string;
77
+ protected _value: string;
78
+ /** The value of the input element. */
79
+ set value(value: string);
80
+ get value(): string;
77
81
  _validity: ValidityState | null;
78
82
  static resolveErrorMessage(message: any, refernceValue: any): any;
79
83
  protected _inputRef: lit_html_directives_ref_js0.Ref<HTMLInputElement>;
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
3
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
4
4
  import { t as FormAssociatedMixin } from "./FormAssociatedMixin-DLPvFtbT.js";
5
5
  import { css, html, nothing } from "lit";
6
6
  import { property, state } from "lit/decorators.js";
@@ -316,13 +316,13 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
316
316
  this.disabled = false;
317
317
  this.required = false;
318
318
  this.clearable = false;
319
- this.value = "";
320
319
  this.error = "";
321
320
  this.label = "";
322
321
  this.size = "regular";
323
322
  this.type = "text";
324
323
  this.validationMessages = {};
325
324
  this.novalidate = false;
325
+ this.defaultValue = "";
326
326
  this._validity = null;
327
327
  this._inputRef = createRef();
328
328
  }
@@ -338,6 +338,14 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
338
338
  delegatesFocus: true
339
339
  };
340
340
  }
341
+ /** The value of the input element. */
342
+ set value(value) {
343
+ this._value = value;
344
+ }
345
+ get value() {
346
+ if (typeof this._value === "string") return this._value;
347
+ return this.defaultValue;
348
+ }
341
349
  static resolveErrorMessage(message, refernceValue) {
342
350
  if (typeof message === "function") return message(refernceValue);
343
351
  return message;
@@ -347,13 +355,19 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
347
355
  return Number(this.value);
348
356
  }
349
357
  formResetCallback() {
350
- this.value = "";
358
+ this.value = this.defaultValue;
351
359
  }
352
360
  setFormValue() {
353
- this.internals.setFormValue(this.value);
361
+ this.internals.setFormValue(this.disabled ? null : this.value);
354
362
  }
355
363
  willUpdate(changedProperties) {
356
- if (changedProperties.has("value")) this.setFormValue();
364
+ super.willUpdate(changedProperties);
365
+ let valueChanged = false;
366
+ if (changedProperties.has("defaultValue") && !changedProperties.has("value") && !this.hasInteracted) {
367
+ this.value = this.defaultValue;
368
+ valueChanged = true;
369
+ }
370
+ if (valueChanged || changedProperties.has("value") || changedProperties.has("name") || changedProperties.has("disabled")) this.setFormValue();
357
371
  }
358
372
  /**
359
373
  * Method for handling the click event of the wrapper element.
@@ -388,6 +402,7 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
388
402
  * @fires {CustomEvent} change
389
403
  */
390
404
  handleChange(event) {
405
+ this.hasInteracted = true;
391
406
  if (event.target.validity.valid) this.value = event.target.value;
392
407
  const customEvent = new CustomEvent(event.type, event);
393
408
  this.dispatchEvent(customEvent);
@@ -398,6 +413,7 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
398
413
  * the event can be handled outside the shadow DOM.
399
414
  */
400
415
  handleInput(event) {
416
+ this.hasInteracted = true;
401
417
  this.value = event.target.value;
402
418
  const customEvent = new CustomEvent("input", {
403
419
  bubbles: true,
@@ -447,7 +463,7 @@ var LeuInput = class LeuInput extends FormAssociatedMixin(LeuElement) {
447
463
  }
448
464
  isInvalid() {
449
465
  if (this.error) return true;
450
- return this._validity === null || this.novalidate ? false : !this._validity.valid;
466
+ return this._validity === null || this.novalidate || this.disabled ? false : !this._validity.valid;
451
467
  }
452
468
  /**
453
469
  * Check input validation
@@ -544,10 +560,6 @@ __decorate([property({
544
560
  type: Boolean,
545
561
  reflect: true
546
562
  })], LeuInput.prototype, "clearable", void 0);
547
- __decorate([property({
548
- type: String,
549
- reflect: true
550
- })], LeuInput.prototype, "value", void 0);
551
563
  __decorate([property({
552
564
  type: String,
553
565
  reflect: true
@@ -605,6 +617,15 @@ __decorate([property({
605
617
  type: Boolean,
606
618
  reflect: true
607
619
  })], LeuInput.prototype, "novalidate", void 0);
620
+ __decorate([property({
621
+ type: String,
622
+ reflect: true,
623
+ attribute: "value"
624
+ })], LeuInput.prototype, "defaultValue", void 0);
625
+ __decorate([property({
626
+ type: String,
627
+ attribute: false
628
+ })], LeuInput.prototype, "value", null);
608
629
  __decorate([state()], LeuInput.prototype, "_validity", void 0);
609
630
  //#endregion
610
631
  export { SIZES as n, LeuInput as t };
package/dist/Input.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as SIZES, t as LeuInput } from "./Input-D2THgo7c.js";
1
+ import { n as SIZES, t as LeuInput } from "./Input-CeaAOB4p.js";
2
2
  export { LeuInput, SIZES };
package/dist/Input.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
3
  import "./FormAssociatedMixin-DLPvFtbT.js";
4
- import { n as SIZES, t as LeuInput } from "./Input-DEOVocTa.js";
4
+ import { n as SIZES, t as LeuInput } from "./Input-DBXX7ev8.js";
5
5
  export { LeuInput, SIZES };
@@ -20,7 +20,7 @@ var common_styles_default = css`:host,
20
20
  //#region src/lib/LeuElement.ts
21
21
  var LeuElement = class extends LitElement {
22
22
  static {
23
- this.version = "0.26.0";
23
+ this.version = "0.27.0";
24
24
  }
25
25
  static {
26
26
  this.dependencies = {};
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuMenuItem } from "./MenuItem-DVg8-1Bq.js";
3
+ import { t as LeuMenuItem } from "./MenuItem-Cs3KFhJm.js";
4
4
  import { css, html } from "lit";
5
5
  import { property } from "lit/decorators.js";
6
6
  //#region src/components/menu/menu.css?inline
package/dist/Menu.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import "./MenuItem-DVg8-1Bq.js";
4
- import { t as LeuMenu } from "./Menu-BeqqtCw6.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
+ import "./MenuItem-Cs3KFhJm.js";
4
+ import { t as LeuMenu } from "./Menu-Cu8eIF1T.js";
5
5
  export { LeuMenu };
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
3
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
4
4
  import { css, html, nothing } from "lit";
5
5
  import { property } from "lit/decorators.js";
6
6
  import { ifDefined } from "lit/directives/if-defined.js";
package/dist/MenuItem.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import { t as LeuMenuItem } from "./MenuItem-DVg8-1Bq.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
+ import { t as LeuMenuItem } from "./MenuItem-Cs3KFhJm.js";
4
4
  export { LeuMenuItem };
@@ -1,6 +1,6 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
3
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.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";
package/dist/Message.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import { t as LeuMessage } from "./Message-BhknWvAF.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
+ import { t as LeuMessage } from "./Message-C6Zlk_2p.js";
4
4
  export { LeuMessage };
@@ -1,8 +1,8 @@
1
- import { t as LeuElement } from "./LeuElement-BeFrgKes.js";
1
+ import { t as LeuElement } from "./LeuElement-k4RjIeoG.js";
2
2
  import { t as __decorate } from "./decorate-DwpAc4D0.js";
3
- import { t as LeuIcon } from "./Icon-C_yYuynf.js";
4
- import { t as LeuButton } from "./Button-BkhqVjug.js";
5
- import { t as LeuVisuallyHidden } from "./VisuallyHidden-pll3amXE.js";
3
+ import { t as LeuIcon } from "./Icon-CbZXpyHU.js";
4
+ import { t as LeuButton } from "./Button-BSyDL_cV.js";
5
+ import { t as LeuVisuallyHidden } from "./VisuallyHidden-Co_txzxB.js";
6
6
  import { css, html } from "lit";
7
7
  import { property, state } from "lit/decorators.js";
8
8
  import { live } from "lit/directives/live.js";
@@ -1,8 +1,8 @@
1
- import "./LeuElement-BeFrgKes.js";
2
- import "./Icon-C_yYuynf.js";
3
- import "./Spinner-DDTqijTO.js";
4
- import "./Button-BkhqVjug.js";
1
+ import "./LeuElement-k4RjIeoG.js";
2
+ import "./Icon-CbZXpyHU.js";
3
+ import "./Spinner-VhKfzI3Q.js";
4
+ import "./Button-BSyDL_cV.js";
5
5
  import "./FormAssociatedMixin-DLPvFtbT.js";
6
- import "./VisuallyHidden-pll3amXE.js";
7
- import { t as LeuPagination } from "./Pagination-DJI5MIi_.js";
6
+ import "./VisuallyHidden-Co_txzxB.js";
7
+ import { t as LeuPagination } from "./Pagination-CB2eVlXk.js";
8
8
  export { LeuPagination };