@statistikzh/leu 0.22.0 → 0.23.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 (199) hide show
  1. package/.github/workflows/release-please.yml +1 -2
  2. package/.nvmrc +1 -1
  3. package/.release-please-manifest.json +1 -1
  4. package/CHANGELOG.md +16 -0
  5. package/README.md +15 -10
  6. package/dist/Accordion.js +1 -1
  7. package/dist/Button.d.ts +1 -1
  8. package/dist/Button.js +1 -1
  9. package/dist/ButtonGroup.js +1 -1
  10. package/dist/ChartWrapper.js +1 -1
  11. package/dist/Checkbox.d.ts +1 -1
  12. package/dist/Checkbox.js +1 -1
  13. package/dist/CheckboxGroup.js +1 -1
  14. package/dist/Chip.d.ts +1 -7
  15. package/dist/Chip.js +7 -5
  16. package/dist/ChipGroup.d.ts +17 -36
  17. package/dist/ChipGroup.js +35 -33
  18. package/dist/ChipLink.d.ts +5 -21
  19. package/dist/ChipLink.js +14 -15
  20. package/dist/ChipRemovable.d.ts +4 -15
  21. package/dist/ChipRemovable.js +7 -9
  22. package/dist/ChipSelectable.d.ts +14 -37
  23. package/dist/ChipSelectable.js +24 -28
  24. package/dist/Dialog.d.ts +7 -18
  25. package/dist/Dialog.js +15 -18
  26. package/dist/Dropdown.d.ts +16 -28
  27. package/dist/Dropdown.js +22 -23
  28. package/dist/FileInput.d.ts +2 -1
  29. package/dist/FileInput.js +19 -5
  30. package/dist/Icon.d-itcQ94ym.d.ts +151 -0
  31. package/dist/Icon.d.ts +4 -156
  32. package/dist/Icon.js +1 -4
  33. package/dist/Input.d.ts +73 -141
  34. package/dist/Input.js +91 -88
  35. package/dist/{LeuElement-BooZrClI.js → LeuElement-CWseJvWv.js} +1 -1
  36. package/dist/Menu.d.ts +2 -8
  37. package/dist/Menu.js +7 -9
  38. package/dist/MenuItem.d.ts +31 -59
  39. package/dist/MenuItem.js +30 -33
  40. package/dist/Message.d.ts +1 -1
  41. package/dist/Message.js +1 -1
  42. package/dist/Pagination.d.ts +1 -1
  43. package/dist/Pagination.js +1 -1
  44. package/dist/Placeholder.js +1 -1
  45. package/dist/Popup.d.ts +16 -0
  46. package/dist/Popup.js +20 -2
  47. package/dist/ProgressBar.js +1 -1
  48. package/dist/Radio.js +1 -1
  49. package/dist/RadioGroup.js +1 -1
  50. package/dist/Range.d.ts +22 -65
  51. package/dist/Range.js +36 -37
  52. package/dist/ScrollTop.d.ts +5 -7
  53. package/dist/ScrollTop.js +10 -15
  54. package/dist/Select.d.ts +2 -1
  55. package/dist/Select.js +1 -1
  56. package/dist/Spinner.js +1 -1
  57. package/dist/Table.d.ts +1 -1
  58. package/dist/Table.js +1 -1
  59. package/dist/Tag.js +1 -1
  60. package/dist/VisuallyHidden.js +1 -1
  61. package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts +5 -0
  62. package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts.map +1 -1
  63. package/dist/components/chip/Chip.d.ts +1 -7
  64. package/dist/components/chip/Chip.d.ts.map +1 -1
  65. package/dist/components/chip/ChipGroup.d.ts +15 -35
  66. package/dist/components/chip/ChipGroup.d.ts.map +1 -1
  67. package/dist/components/chip/ChipLink.d.ts +4 -20
  68. package/dist/components/chip/ChipLink.d.ts.map +1 -1
  69. package/dist/components/chip/ChipRemovable.d.ts +3 -14
  70. package/dist/components/chip/ChipRemovable.d.ts.map +1 -1
  71. package/dist/components/chip/ChipSelectable.d.ts +13 -36
  72. package/dist/components/chip/ChipSelectable.d.ts.map +1 -1
  73. package/dist/components/chip/stories/chip-group.stories.d.ts +1 -1
  74. package/dist/components/chip/stories/chip-group.stories.d.ts.map +1 -1
  75. package/dist/components/chip/stories/chip-link.stories.d.ts.map +1 -1
  76. package/dist/components/chip/stories/chip-selectable.stories.d.ts.map +1 -1
  77. package/dist/components/dialog/Dialog.d.ts +5 -17
  78. package/dist/components/dialog/Dialog.d.ts.map +1 -1
  79. package/dist/components/dropdown/Dropdown.d.ts +14 -27
  80. package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
  81. package/dist/components/file-input/FileInput.d.ts +1 -0
  82. package/dist/components/file-input/FileInput.d.ts.map +1 -1
  83. package/dist/components/file-input/leu-file-input.d.ts +5 -0
  84. package/dist/components/file-input/leu-file-input.d.ts.map +1 -1
  85. package/dist/components/file-input/stories/file-input.stories.d.ts +4 -0
  86. package/dist/components/file-input/stories/file-input.stories.d.ts.map +1 -1
  87. package/dist/components/icon/Icon.d.ts +0 -6
  88. package/dist/components/icon/Icon.d.ts.map +1 -1
  89. package/dist/components/input/Input.d.ts +73 -140
  90. package/dist/components/input/Input.d.ts.map +1 -1
  91. package/dist/components/menu/Menu.d.ts +1 -7
  92. package/dist/components/menu/Menu.d.ts.map +1 -1
  93. package/dist/components/menu/MenuItem.d.ts +30 -57
  94. package/dist/components/menu/MenuItem.d.ts.map +1 -1
  95. package/dist/components/message/leu-message.d.ts +5 -0
  96. package/dist/components/message/leu-message.d.ts.map +1 -1
  97. package/dist/components/placeholder/leu-placeholder.d.ts +5 -0
  98. package/dist/components/placeholder/leu-placeholder.d.ts.map +1 -1
  99. package/dist/components/popup/Popup.d.ts +16 -0
  100. package/dist/components/popup/Popup.d.ts.map +1 -1
  101. package/dist/components/popup/stories/popup.stories.d.ts +2 -0
  102. package/dist/components/popup/stories/popup.stories.d.ts.map +1 -1
  103. package/dist/components/progress-bar/leu-progress-bar.d.ts +5 -0
  104. package/dist/components/progress-bar/leu-progress-bar.d.ts.map +1 -1
  105. package/dist/components/range/Range.d.ts +22 -65
  106. package/dist/components/range/Range.d.ts.map +1 -1
  107. package/dist/components/scroll-top/ScrollTop.d.ts +4 -6
  108. package/dist/components/scroll-top/ScrollTop.d.ts.map +1 -1
  109. package/dist/components/tag/leu-tag.d.ts +5 -0
  110. package/dist/components/tag/leu-tag.d.ts.map +1 -1
  111. package/dist/index.d.ts +11 -0
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/index.js +13 -4
  114. package/dist/leu-accordion.js +1 -1
  115. package/dist/leu-button-group.js +1 -1
  116. package/dist/leu-button.d.ts +1 -1
  117. package/dist/leu-button.js +1 -1
  118. package/dist/leu-chart-wrapper.d.ts +10 -1
  119. package/dist/leu-chart-wrapper.js +1 -1
  120. package/dist/leu-checkbox-group.js +1 -1
  121. package/dist/leu-checkbox.d.ts +1 -1
  122. package/dist/leu-checkbox.js +1 -1
  123. package/dist/leu-chip-group.d.ts +2 -0
  124. package/dist/leu-chip-group.js +5 -1
  125. package/dist/leu-chip-link.js +3 -1
  126. package/dist/leu-chip-removable.d.ts +1 -1
  127. package/dist/leu-chip-removable.js +3 -3
  128. package/dist/leu-chip-selectable.js +3 -1
  129. package/dist/leu-dialog.d.ts +2 -1
  130. package/dist/leu-dialog.js +3 -3
  131. package/dist/leu-dropdown.d.ts +2 -1
  132. package/dist/leu-dropdown.js +3 -3
  133. package/dist/leu-file-input.d.ts +11 -2
  134. package/dist/leu-file-input.js +11 -4
  135. package/dist/leu-icon.d.ts +1 -1
  136. package/dist/leu-icon.js +1 -1
  137. package/dist/leu-input.d.ts +2 -1
  138. package/dist/leu-input.js +3 -3
  139. package/dist/leu-menu-item.d.ts +2 -2
  140. package/dist/leu-menu-item.js +3 -3
  141. package/dist/leu-menu.d.ts +1 -1
  142. package/dist/leu-menu.js +3 -3
  143. package/dist/leu-message.d.ts +11 -2
  144. package/dist/leu-message.js +1 -1
  145. package/dist/leu-pagination.d.ts +1 -1
  146. package/dist/leu-pagination.js +1 -1
  147. package/dist/leu-placeholder.d.ts +10 -1
  148. package/dist/leu-placeholder.js +1 -1
  149. package/dist/leu-popup.js +1 -1
  150. package/dist/leu-progress-bar.d.ts +10 -1
  151. package/dist/leu-progress-bar.js +1 -1
  152. package/dist/leu-radio-group.js +1 -1
  153. package/dist/leu-radio.js +1 -1
  154. package/dist/leu-range.js +3 -1
  155. package/dist/leu-scroll-top.d.ts +1 -1
  156. package/dist/leu-scroll-top.js +3 -3
  157. package/dist/leu-select.d.ts +2 -1
  158. package/dist/leu-select.js +1 -1
  159. package/dist/leu-spinner.js +1 -1
  160. package/dist/leu-table.d.ts +1 -1
  161. package/dist/leu-table.js +1 -1
  162. package/dist/leu-tag.d.ts +10 -1
  163. package/dist/leu-tag.js +1 -1
  164. package/dist/leu-visually-hidden.js +1 -1
  165. package/dist/vscode.html-custom-data.json +106 -88
  166. package/dist/vue/index.d.ts +105 -115
  167. package/dist/web-types.json +268 -243
  168. package/package.json +1 -1
  169. package/scripts/generate-component/templates/[namespace]-[name].ts +6 -0
  170. package/src/components/chart-wrapper/leu-chart-wrapper.ts +6 -0
  171. package/src/components/chip/Chip.ts +3 -9
  172. package/src/components/chip/ChipGroup.ts +26 -39
  173. package/src/components/chip/ChipLink.ts +7 -18
  174. package/src/components/chip/ChipRemovable.ts +4 -11
  175. package/src/components/chip/ChipSelectable.ts +21 -35
  176. package/src/components/chip/stories/chip-group.stories.ts +4 -7
  177. package/src/components/chip/stories/chip-link.stories.ts +2 -4
  178. package/src/components/chip/stories/chip-selectable.stories.ts +4 -6
  179. package/src/components/chip/test/chip-group.test.ts +34 -31
  180. package/src/components/dialog/Dialog.ts +9 -22
  181. package/src/components/dropdown/Dropdown.ts +19 -26
  182. package/src/components/file-input/FileInput.ts +12 -1
  183. package/src/components/file-input/leu-file-input.ts +6 -0
  184. package/src/components/file-input/stories/file-input.stories.ts +7 -0
  185. package/src/components/icon/Icon.ts +0 -4
  186. package/src/components/input/Input.ts +108 -105
  187. package/src/components/menu/Menu.ts +3 -12
  188. package/src/components/menu/MenuItem.ts +37 -41
  189. package/src/components/message/leu-message.ts +6 -0
  190. package/src/components/placeholder/leu-placeholder.ts +6 -0
  191. package/src/components/popup/Popup.ts +37 -0
  192. package/src/components/popup/stories/popup.stories.ts +10 -0
  193. package/src/components/popup/test/popup.test.ts +27 -0
  194. package/src/components/progress-bar/leu-progress-bar.ts +6 -0
  195. package/src/components/range/Range.ts +51 -59
  196. package/src/components/scroll-top/ScrollTop.ts +8 -15
  197. package/src/components/tag/leu-tag.ts +6 -0
  198. package/src/index.ts +11 -0
  199. package/web-test-runner.config.mjs +10 -0
@@ -10,23 +10,12 @@ export declare class LeuChipRemovable extends LeuChipBase {
10
10
  static dependencies: {
11
11
  "leu-icon": typeof LeuIcon;
12
12
  };
13
- static properties: {
14
- value: {
15
- type: StringConstructor;
16
- reflect: boolean;
17
- };
18
- inverted: {
19
- type: BooleanConstructor;
20
- reflect: boolean;
21
- };
22
- };
23
- constructor();
13
+ value: string;
24
14
  /**
25
15
  * Returns the value of the chip. If `value` is not set, it will return the text content
26
- * @returns {string}
27
16
  */
28
- getValue(): any;
29
- handleClick(): void;
17
+ getValue(): string;
18
+ protected handleClick(): void;
30
19
  render(): import("lit-html").TemplateResult<1>;
31
20
  }
32
21
  //# sourceMappingURL=ChipRemovable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChipRemovable.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipRemovable.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,CAAC,YAAY;;MAElB;IAED,MAAM,CAAC,UAAU;;;;;;;;;MAGhB;;IAOD;;;OAGG;IACH,QAAQ;IAIR,WAAW;IAWX,MAAM;CAMP"}
1
+ {"version":3,"file":"ChipRemovable.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipRemovable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,CAAC,YAAY;;MAElB;IAGD,KAAK,EAAE,MAAM,CAAK;IAElB;;OAEG;IACH,QAAQ;IAIR,SAAS,CAAC,WAAW;IAWrB,MAAM;CAMP"}
@@ -1,51 +1,28 @@
1
1
  import { LeuChipBase } from "./Chip.js";
2
- export declare const SIZES: {
3
- small: string;
4
- regular: string;
5
- };
6
- export declare const VARIANTS: {
7
- toggle: string;
8
- radio: string;
9
- };
10
2
  /**
11
3
  * A chip component that can be selected.
12
4
  * @tagname leu-chip-selectable
13
5
  * @slot - The content of the chip
14
- * @prop {keyof typeof SIZES} size - The size of the chip. Not supported for radio variant.
15
- * @prop {keyof typeof VARIANTS} variant - `toggle` or `radio`. Determines if only one or multiple chips can be selected.
16
- * @prop {boolean} checked - Whether the chip is selected.
17
- * @prop {string} value - The value of the chip.
18
6
  */
19
7
  export declare class LeuChipSelectable extends LeuChipBase {
20
- static properties: {
21
- size: {
22
- type: StringConstructor;
23
- reflect: boolean;
24
- };
25
- variant: {
26
- type: StringConstructor;
27
- reflect: boolean;
28
- };
29
- checked: {
30
- type: BooleanConstructor;
31
- reflect: boolean;
32
- };
33
- value: {
34
- type: StringConstructor;
35
- reflect: boolean;
36
- };
37
- inverted: {
38
- type: BooleanConstructor;
39
- reflect: boolean;
40
- };
41
- };
8
+ /** The size of the chip. Has no effect when variant is "radio" */
9
+ size: "small" | "regular";
10
+ /**
11
+ * The variant of the chip. Determines if only one or multiple chips can be selected.
12
+ * @default "toggle"
13
+ */
14
+ variant: "toggle" | "radio";
15
+ /** Whether the chip is selected */
16
+ checked: boolean;
17
+ /** The value of the chip */
18
+ value: string;
42
19
  constructor();
43
- handleClick(): void;
20
+ protected handleClick(): void;
44
21
  /**
45
22
  * Returns the value of the chip. If `value` is not set, it will return the text content
46
23
  * @returns {string}
47
24
  */
48
- getValue(): any;
25
+ getValue(): string;
49
26
  render(): import("lit-html").TemplateResult<1>;
50
27
  }
51
28
  //# sourceMappingURL=ChipSelectable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChipSelectable.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipSelectable.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC,eAAO,MAAM,KAAK;;;CAGjB,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAGpB,CAAA;AAED;;;;;;;;GAQG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;MAOhB;;IAqBD,WAAW;IAwBX;;;OAGG;IACH,QAAQ;IAIR,MAAM;CASP"}
1
+ {"version":3,"file":"ChipSelectable.d.ts","sourceRoot":"","sources":["../../../src/components/chip/ChipSelectable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,kEAAkE;IAElE,IAAI,EAAE,OAAO,GAAG,SAAS,CAAY;IAErC;;;OAGG;IAEH,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAW;IAEtC,mCAAmC;IAEnC,OAAO,EAAE,OAAO,CAAQ;IAExB,4BAA4B;IAE5B,KAAK,EAAE,MAAM,CAAK;;IAUlB,SAAS,CAAC,WAAW;IAwBrB;;;OAGG;IACH,QAAQ;IAIR,MAAM;CASP"}
@@ -8,7 +8,7 @@ declare const _default: {
8
8
  argTypes: {
9
9
  selectionMode: {
10
10
  control: string;
11
- options: ("single" | "multiple" | "none")[];
11
+ options: string[];
12
12
  };
13
13
  headingLevel: {
14
14
  control: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chip-group.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/chip/stories/chip-group.stories.ts"],"names":[],"mappings":"AAIA,OAAO,2BAA2B,CAAA;AAClC,OAAO,0BAA0B,CAAA;AACjC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,sBAAsB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK7B,wBA6BC;AA8GD,eAAO,MAAM,OAAO,KAA2B,CAAA;AAG/C,eAAO,MAAM,MAAM,KAA0B,CAAA;AAG7C,eAAO,MAAM,QAAQ,KAA4B,CAAA;AAGjD,eAAO,MAAM,OAAO,KAA2B,CAAA"}
1
+ {"version":3,"file":"chip-group.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/chip/stories/chip-group.stories.ts"],"names":[],"mappings":"AAIA,OAAO,2BAA2B,CAAA;AAClC,OAAO,0BAA0B,CAAA;AACjC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,sBAAsB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7B,wBA6BC;AA8GD,eAAO,MAAM,OAAO,KAA2B,CAAA;AAG/C,eAAO,MAAM,MAAM,KAA0B,CAAA;AAG7C,eAAO,MAAM,QAAQ,KAA4B,CAAA;AAGjD,eAAO,MAAM,OAAO,KAA2B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"chip-link.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/chip/stories/chip-link.stories.ts"],"names":[],"mappings":"AAGA,OAAO,qBAAqB,CAAA;;;;;;;;;;;;;;;;;;;;;;;AAI5B,wBAkBC;AAiBD,eAAO,MAAM,OAAO,KAAoB,CAAA;AAGxC,eAAO,MAAM,KAAK,KAAoB,CAAA"}
1
+ {"version":3,"file":"chip-link.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/chip/stories/chip-link.stories.ts"],"names":[],"mappings":"AAGA,OAAO,qBAAqB,CAAA;;;;;;;;;;;;;;;;;;;;;;;AAE5B,wBAkBC;AAiBD,eAAO,MAAM,OAAO,KAAoB,CAAA;AAGxC,eAAO,MAAM,KAAK,KAAoB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"chip-selectable.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/chip/stories/chip-selectable.stories.ts"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIlC,wBAoBC;AAqBD,eAAO,MAAM,OAAO,KAAoB,CAAA;AAGxC,eAAO,MAAM,KAAK,KAAoB,CAAA;AAGtC,eAAO,MAAM,KAAK,KAAoB,CAAA"}
1
+ {"version":3,"file":"chip-selectable.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/chip/stories/chip-selectable.stories.ts"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElC,wBAoBC;AAqBD,eAAO,MAAM,OAAO,KAAoB,CAAA;AAGxC,eAAO,MAAM,KAAK,KAAoB,CAAA;AAGtC,eAAO,MAAM,KAAK,KAAoB,CAAA"}
@@ -17,23 +17,11 @@ export declare class LeuDialog extends LeuElement {
17
17
  customElements?: CustomElementRegistry;
18
18
  registry?: CustomElementRegistry;
19
19
  };
20
- /**
21
- * @internal
22
- */
23
- hasSlotController: HasSlotController;
24
- static properties: {
25
- label: {
26
- type: StringConstructor;
27
- };
28
- sublabel: {
29
- type: StringConstructor;
30
- };
31
- open: {
32
- type: BooleanConstructor;
33
- open: boolean;
34
- };
35
- };
36
- constructor();
20
+ label: string;
21
+ sublabel: string;
22
+ open: boolean;
23
+ protected _dialogRef: import("lit-html/directives/ref.js").Ref<HTMLDialogElement>;
24
+ protected hasSlotController: HasSlotController;
37
25
  show(): void;
38
26
  close(): void;
39
27
  render(): import("lit-html").TemplateResult<1>;
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/Dialog.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAMzC;;GAEG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC,MAAM,CAAC,YAAY;;MAElB;IAED,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAED;;OAEG;IACH,iBAAiB,oBAA2C;IAE5D,MAAM,CAAC,UAAU;;;;;;;;;;;MAIhB;;IAgBD,IAAI;IAIJ,KAAK;IAIL,MAAM;CAsCP"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/Dialog.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAIzC;;GAEG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC,MAAM,CAAC,YAAY;;MAElB;IAED,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAGD,KAAK,EAAE,MAAM,CAAK;IAGlB,QAAQ,EAAE,MAAM,CAAK;IAGrB,IAAI,EAAE,OAAO,CAAQ;IAErB,SAAS,CAAC,UAAU,8DAAiC;IAErD,SAAS,CAAC,iBAAiB,oBAA2C;IAEtE,IAAI;IAIJ,KAAK;IAIL,MAAM;CAsCP"}
@@ -15,39 +15,26 @@ export declare class LeuDropdown extends LeuElement {
15
15
  "leu-popup": typeof LeuPopup;
16
16
  };
17
17
  static styles: import("lit").CSSResultGroup[];
18
- static properties: {
19
- label: {
20
- type: StringConstructor;
21
- reflect: boolean;
22
- };
23
- expanded: {
24
- type: BooleanConstructor;
25
- reflect: boolean;
26
- };
27
- inverted: {
28
- type: BooleanConstructor;
29
- reflect: boolean;
30
- };
31
- };
32
- hasSlotController: HasSlotController;
33
- constructor();
18
+ label: string;
19
+ expanded: boolean;
20
+ inverted: boolean;
21
+ protected hasSlotController: HasSlotController;
22
+ protected _toggleRef: import("lit-html/directives/ref.js").Ref<HTMLButtonElement>;
34
23
  connectedCallback(): void;
35
24
  disconnectedCallback(): void;
36
- _documentClickHandler: (event: any) => void;
37
- _keyUpHandler(event: any): void;
38
- _keyDownToggleHandler(event: any): Promise<void>;
39
- _menuItemClickHandler: (e: any) => void;
25
+ protected _documentClickHandler: (event: MouseEvent) => void;
26
+ protected _keyUpHandler: (event: KeyboardEvent) => void;
27
+ protected _keyDownToggleHandler(event: KeyboardEvent): Promise<void>;
28
+ protected _menuItemClickHandler: (e: MouseEvent & {
29
+ target: HTMLElement;
30
+ }) => void;
40
31
  /**
41
32
  * Close the dropdown when the user presses the Escape or the Tab key.
42
33
  * Navigating the menu with the arrow keys is handled by the menu itself.
43
- * @param {KeyboardEvent} e
44
- */
45
- _keyDownMenuHandler: (e: any) => void;
46
- _handleToggleClick(): void;
47
- /**
48
- * @returns {import("../menu/Menu").LeuMenu}
49
34
  */
50
- _getMenu(): LeuMenu;
35
+ protected _keyDownMenuHandler: (e: KeyboardEvent) => void;
36
+ protected _handleToggleClick(): void;
37
+ protected _getMenu(): LeuMenu;
51
38
  render(): import("lit-html").TemplateResult<1>;
52
39
  }
53
40
  //# sourceMappingURL=Dropdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/Dropdown.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAI5C;;GAEG;AACH,qBAAa,WAAY,SAAQ,UAAU;IACzC,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,UAAU;;;;;;;;;;;;;MAIhB;IAED,iBAAiB,oBAAwC;;IAazD,iBAAiB;IAWjB,oBAAoB;IAWp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Q;IAIlB,MAAM;CA+BP"}
@@ -50,6 +50,7 @@ export declare class LeuFileInput extends LeuElement {
50
50
  formResetCallback(): void;
51
51
  protected updateFormValue(): void;
52
52
  protected removeFile(fileToRemove: File): void;
53
+ protected dispatchChangeAndInputEvents(): void;
53
54
  protected static formatFileSize(size: number): import("lit-html").TemplateResult<1>;
54
55
  protected handleDragEnter: (event: DragEvent) => void;
55
56
  protected handleDragOver: (event: DragEvent) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/file-input/FileInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAA;AAKnD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGpD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AAExE;;;GAGG;AAEH;;GAEG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,MAAM,CAAC,YAAY;;;;MAIlB;IAED,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAED,MAAM,CAAC,cAAc,UAAO;IAE5B,SAAS,CAAC,SAAS,EAAE,gBAAgB,CAAA;IAGrC,KAAK,EAAE,MAAM,CAAK;IAElB,0MAA0M;IAE1M,MAAM,EAAE,MAAM,CAAK;IAEnB,0CAA0C;IAE1C,QAAQ,EAAE,OAAO,CAAQ;IAEzB,oDAAoD;IAEpD,QAAQ,EAAE,OAAO,CAAQ;IAEzB,0CAA0C;IAE1C,QAAQ,EAAE,OAAO,CAAQ;IAEzB,6EAA6E;IAE7E,OAAO,EAAE,QAAQ,GAAG,aAAa,CAAW;IAGrC,KAAK,EAAE,IAAI,EAAE,CAAK;IAGzB,OAAO,CAAC,UAAU,CAAiB;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,MAAM,CAAK;IAEnB,0CAA0C;IAE1C,QAAQ,EAAE,OAAO,CAAQ;IAEzB,oDAAoD;IAEpD,QAAQ,EAAE,OAAO,CAAQ;IAEzB,0CAA0C;IAE1C,QAAQ,EAAE,OAAO,CAAQ;IAEzB,6EAA6E;IAE7E,OAAO,EAAE,QAAQ,GAAG,aAAa,CAAW;IAGrC,KAAK,EAAE,IAAI,EAAE,CAAK;IAGzB,OAAO,CAAC,UAAU,CAAiB;IAGnC,KAAK,EAAE,gBAAgB,CAAA;;IAQvB,IAAI,IAAI,oBAEP;IAED,IAAI,IAAI,WAEP;IAED,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAU/C,SAAS,CAAC,WAAW;IAarB,OAAO,CAAC,YAAY;IAKb,iBAAiB;IAKxB,SAAS,CAAC,eAAe;IAYzB,SAAS,CAAC,UAAU,CAAC,YAAY,EAAE,IAAI;IAKvC,SAAS,CAAC,4BAA4B;IAetC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM;IAY5C,SAAS,CAAC,eAAe,UAAW,SAAS,UAQ5C;IAGD,SAAS,CAAC,cAAc,UAAW,SAAS,UAK3C;IAED,SAAS,CAAC,eAAe,UAAW,SAAS,UAM5C;IAED,SAAS,CAAC,UAAU,UAAW,SAAS,UAqBvC;IAED,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IA4BnC,MAAM;CAkEP"}
@@ -1,3 +1,8 @@
1
1
  import { LeuFileInput } from "./FileInput.js";
2
2
  export { LeuFileInput };
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ "leu-file-input": LeuFileInput;
6
+ }
7
+ }
3
8
  //# sourceMappingURL=leu-file-input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"leu-file-input.d.ts","sourceRoot":"","sources":["../../../src/components/file-input/leu-file-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"leu-file-input.d.ts","sourceRoot":"","sources":["../../../src/components/file-input/leu-file-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EAAE,YAAY,EAAE,CAAA;AAIvB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAA;KAC/B;CACF"}
@@ -3,6 +3,10 @@ import { LeuFileInput } from "../FileInput.js";
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: string;
6
+ args: {
7
+ oninput: import("@storybook/addon-actions").HandlerFunction;
8
+ onchange: import("@storybook/addon-actions").HandlerFunction;
9
+ };
6
10
  };
7
11
  export default _default;
8
12
  export declare const Regular: {
@@ -1 +1 @@
1
- {"version":3,"file":"file-input.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/file-input/stories/file-input.stories.ts"],"names":[],"mappings":"AAIA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;;;;;AAK9C,wBAG2B;AAe3B,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;CASnB,CAAA"}
1
+ {"version":3,"file":"file-input.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/file-input/stories/file-input.stories.ts"],"names":[],"mappings":"AAKA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;;;;;;;;;AAK9C,wBAO2B;AAiB3B,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;CASnB,CAAA"}
@@ -11,12 +11,6 @@ import { IconPathName } from "./paths.js";
11
11
  */
12
12
  export declare class LeuIcon extends LeuElement {
13
13
  static styles: import("lit").CSSResultGroup[];
14
- static properties: {
15
- name: {
16
- type: StringConstructor;
17
- reflect: boolean;
18
- };
19
- };
20
14
  /**
21
15
  * The name of the icon to display.
22
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/Icon.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGpD,OAAO,EAAS,YAAY,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;GAQG;AACH,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,UAAU;;;;;MAEhB;IAED;;OAEG;IAEH,IAAI,EAAE,YAAY,GAAG,EAAE,CAAK;IAE5B,MAAM;CAoBP"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/Icon.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGpD,OAAO,EAAS,YAAY,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;GAQG;AACH,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,MAAM,iCAA8B;IAE3C;;OAEG;IAEH,IAAI,EAAE,YAAY,GAAG,EAAE,CAAK;IAE5B,MAAM;CAoBP"}
@@ -1,34 +1,15 @@
1
1
  import { nothing } from "lit";
2
2
  import { LeuElement } from "../../lib/LeuElement.js";
3
3
  import { LeuIcon } from "../icon/Icon.js";
4
+ import { IconPathName } from "../icon/paths.js";
4
5
  export declare const SIZES: Readonly<{
5
6
  SMALL: "small";
6
7
  REGULAR: "regular";
7
8
  }>;
9
+ type InputType = "date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "week";
8
10
  /**
9
11
  * A text input element.
10
12
  *
11
- * @prop {boolean} disabled - Disables the input element.
12
- * @prop {boolean} required - Marks the input element as required.
13
- * @prop {boolean} clearable - Adds a button to clear the input element.
14
- * @prop {string} value - The value of the input element.
15
- * @prop {string} name - The name of the input element.
16
- * @prop {string} label - The label of the input element.
17
- * @prop {string} error - A custom error that is completely independent of the validity state. Useful for displaying server side errors.
18
- * @prop {string} size - The size of the input element.
19
- * @prop {string} icon - The icon that is displayed at the end of the input element.
20
- * @prop {string} prefix - A prefix that relates to the value of the input (e.g. CHF).
21
- * @prop {string} suffix - A suffix that relates to the value of the input (e.g. mm).
22
- * @prop {string} pattern - A regular expression that the value is checked against.
23
- * @prop {string} type - The type of the input element.
24
- * @prop {string} min - The minimum value of the input element.
25
- * @prop {string} max - The maximum value of the input element.
26
- * @prop {string} minlength - The minimum length of the input element.
27
- * @prop {string} maxlength - The maximum length of the input element.
28
- * @prop {object} validationMessages - Custom validation messages. The key is the name of the validity state and the value is the message.
29
- * @prop {boolean} novalidate - Disables the browser's validation.
30
- * @prop {string} step - The step value of the input element.
31
- *
32
13
  * @fires {CustomEvent} input - Dispatched when the value of the input element changes.
33
14
  * @fires {CustomEvent} change - Dispatched when the value of the input element changes and the input element loses focus.
34
15
  *
@@ -50,92 +31,49 @@ export declare class LeuInput extends LeuElement {
50
31
  customElements?: CustomElementRegistry;
51
32
  registry?: CustomElementRegistry;
52
33
  };
53
- static properties: {
54
- disabled: {
55
- type: BooleanConstructor;
56
- reflect: boolean;
57
- };
58
- required: {
59
- type: BooleanConstructor;
60
- reflect: boolean;
61
- };
62
- clearable: {
63
- type: BooleanConstructor;
64
- reflect: boolean;
65
- };
66
- value: {
67
- type: StringConstructor;
68
- reflect: boolean;
69
- };
70
- name: {
71
- type: StringConstructor;
72
- reflect: boolean;
73
- };
74
- error: {
75
- type: StringConstructor;
76
- reflect: boolean;
77
- };
78
- label: {
79
- type: StringConstructor;
80
- reflect: boolean;
81
- };
82
- prefix: {
83
- type: StringConstructor;
84
- reflect: boolean;
85
- };
86
- suffix: {
87
- type: StringConstructor;
88
- reflect: boolean;
89
- };
90
- size: {
91
- type: StringConstructor;
92
- reflect: boolean;
93
- };
94
- icon: {
95
- type: StringConstructor;
96
- reflect: boolean;
97
- };
98
- pattern: {
99
- type: StringConstructor;
100
- reflect: boolean;
101
- };
102
- type: {
103
- type: StringConstructor;
104
- reflect: boolean;
105
- };
106
- min: {
107
- type: StringConstructor;
108
- reflect: boolean;
109
- };
110
- max: {
111
- type: StringConstructor;
112
- reflect: boolean;
113
- };
114
- maxlength: {
115
- type: StringConstructor;
116
- reflect: boolean;
117
- };
118
- minlength: {
119
- type: StringConstructor;
120
- reflect: boolean;
121
- };
122
- validationMessages: {
123
- type: ObjectConstructor;
124
- };
125
- novalidate: {
126
- type: BooleanConstructor;
127
- reflect: boolean;
128
- };
129
- step: {
130
- type: StringConstructor;
131
- reflect: boolean;
132
- };
133
- _validity: {
134
- state: boolean;
135
- };
136
- };
34
+ /** Disables the input element. */
35
+ disabled: boolean;
36
+ /** Marks the input element as required */
37
+ required: boolean;
38
+ /** Adds a button to clear the input element */
39
+ clearable: boolean;
40
+ /** The value of the input element. */
41
+ value: string;
42
+ /** The name of the input element. */
43
+ name: string;
44
+ /** A custom error that is completely independent of the validity state. Useful for displaying server side errors. */
45
+ error: string;
46
+ /** The label of the input element */
47
+ label: string;
48
+ /** A prefix that relates to the value of the input (e.g. CHF) */
49
+ prefix: string;
50
+ /** A suffix that relates to the value of the input (e.g. mm). */
51
+ suffix: string;
52
+ /** The size of the input element */
53
+ size: "small" | "regular";
54
+ /** The icon that is displayed at the end of the input element */
55
+ icon: IconPathName;
56
+ /** A regular expression that the value is checked against. */
57
+ pattern: string;
58
+ /** The type of the input element. */
59
+ type: InputType;
60
+ /** The minimum value of the input element. */
61
+ min: number;
62
+ /** The maximum value of the input element. */
63
+ max: number;
64
+ /** The step value of the input element. */
65
+ step: number;
66
+ /** The maximum length of the input element. */
67
+ maxlength: number;
68
+ /** The minimum length of the input element. */
69
+ minlength: number;
70
+ /** Custom validation messages. The key is the name of the validity state and the value is the message. */
71
+ validationMessages: Record<string, string>;
72
+ /** Disables the browser's validation. */
73
+ novalidate: boolean;
74
+ _validity: ValidityState | null;
137
75
  static resolveErrorMessage(message: any, refernceValue: any): any;
138
- constructor();
76
+ protected _inputRef: import("lit-html/directives/ref.js").Ref<HTMLInputElement>;
139
77
  get valueAsNumber(): number;
140
78
  /**
141
79
  * Method for handling the click event of the wrapper element.
@@ -144,56 +82,47 @@ export declare class LeuInput extends LeuElement {
144
82
  * looks like the input element. But the actual input field does not
145
83
  * completely fill the wrapper element. Keyboard events don't need to be
146
84
  * handled because the actual input element is focusable.
147
- * @private
148
- * @param {MouseEvent|PointerEvent} event
149
- * @returns {void}
150
85
  */
151
- handleWrapperClick(event: any): void;
86
+ protected handleWrapperClick(event: MouseEvent | PointerEvent): void;
152
87
  /**
153
88
  * Method for handling the blur event of the input element.
154
89
  * Checks validity of the input element and sets the validity state.
155
- * @private
156
- * @param {FocusEvent & {target: HTMLInputElement}} event
157
- * @returns {void}
158
90
  */
159
- handleBlur(event: any): void;
91
+ protected handleBlur(event: FocusEvent & {
92
+ target: HTMLInputElement;
93
+ }): void;
160
94
  /**
161
95
  * Method for handling the invalid event of the input element.
162
96
  * Sets the validity state.
163
- * @private
164
- * @param {Event} event
165
- * @returns {void}
166
97
  */
167
- handleInvalid(event: any): void;
98
+ protected handleInvalid(event: Event & {
99
+ target: HTMLInputElement;
100
+ }): void;
168
101
  /**
169
102
  * Method for handling the change event of the input element.
170
103
  * Sets the value property and dispatches a change event so that
171
104
  * the event can be handled outside the shadow DOM.
172
- * @private
173
- * @param {Event} event
174
105
  * @fires {CustomEvent} change
175
- * @returns {void}
176
106
  */
177
- handleChange(event: any): void;
107
+ protected handleChange(event: Event & {
108
+ target: HTMLInputElement;
109
+ }): void;
178
110
  /**
179
111
  * Method for handling the input event of the input element.
180
112
  * Sets the value property and dispatches an input event so that
181
113
  * the event can be handled outside the shadow DOM.
182
- * @private
183
- * @param {Event} event
184
- * @returns {void}
185
114
  */
186
- handleInput(event: any): void;
115
+ protected handleInput(event: Event & {
116
+ target: HTMLInputElement;
117
+ }): void;
187
118
  /**
188
119
  * Method for clearing the input element.
189
120
  * Sets the value property to an empty string and dispatches
190
121
  * an input and a change event.
191
- * @private
192
- * @returns {void}
193
122
  * @fires {CustomEvent} input
194
123
  * @fires {CustomEvent} change
195
124
  */
196
- clear(): void;
125
+ protected clear(): void;
197
126
  /**
198
127
  * Merge custom and default validation messages.
199
128
  * A validation message can be a function or a string.
@@ -202,29 +131,33 @@ export declare class LeuInput extends LeuElement {
202
131
  * e.g.
203
132
  * `tooLong(this.maxlength)`
204
133
  * This way the framework user can create reasonable validation messages
205
- *
206
- * @returns {Object} validationMessages
207
134
  */
208
- getValidationMessages(): any;
135
+ protected getValidationMessages(): {
136
+ badInput: string;
137
+ patternMismatch: string;
138
+ rangeOverflow: (max: any) => string;
139
+ rangeUnderflow: (min: any) => string;
140
+ stepMismatch: string;
141
+ tooLong: (maxlength: any) => string;
142
+ tooShort: (minlength: any) => string;
143
+ typeMismatch: string;
144
+ valueMissing: string;
145
+ };
209
146
  isInvalid(): boolean;
210
147
  /**
211
148
  * Check input validation
212
- * @returns {boolean} if valid or not
213
149
  */
214
- checkValidity(): any;
150
+ checkValidity(): boolean;
215
151
  /**
216
152
  * Creates an error list with an item for the given validity state.
217
- * @returns {import("lit").TemplateResult | nothing}
218
153
  */
219
- renderErrorMessages(): typeof nothing | import("lit-html").TemplateResult<1>;
154
+ protected renderErrorMessages(): typeof nothing | import("lit-html").TemplateResult<1>;
220
155
  /**
221
156
  * Determines the content that is displayed after the input element.
222
157
  * This can be either an icon, a clear button or an error indicator icon.
223
- *
224
- * @private
225
- * @returns {import("lit").TemplateResult | nothing}
226
158
  */
227
- renderAfterContent(): typeof nothing | import("lit-html").TemplateResult<1>;
159
+ protected renderAfterContent(): typeof nothing | import("lit-html").TemplateResult<1>;
228
160
  render(): import("lit-html").TemplateResult<1>;
229
161
  }
162
+ export {};
230
163
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/input/Input.ts"],"names":[],"mappings":"AAAA,OAAO,EA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AEjB,+CAA+C;IAE/C,SAAS,EAAE,MAAM,CAAA;IAEjB,0GAA0G;IAE1G,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAK;IAE/C,yCAAyC;IAEzC,UAAU,EAAE,OAAO,CAAQ;IAG3B,SAAS,EAAE,aAAa,GAAG,IAAI,CAAO;IAEtC,MAAM,CAAC,mBAAmB,CAAC,OAAO,KAAA,EAAE,aAAa,KAAA;IAQjD,SAAS,CAAC,SAAS,6DAAgC;IAEnD,IAAI,aAAa,WAKhB;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,YAAY;IAM7D;;;OAGG;IACH,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE;IAQrE;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE;IAInE;;;;;OAKG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE;IASlE;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE;IAUjE;;;;;;OAMG;IACH,SAAS,CAAC,KAAK;IAaf;;;;;;;;OAQG;IACH,SAAS,CAAC,qBAAqB;;;;;;;;;;;IA6B/B,SAAS;IAUT;;OAEG;IACH,aAAa;IAIb;;OAEG;IACH,SAAS,CAAC,mBAAmB;IAyB7B;;;OAGG;IACH,SAAS,CAAC,kBAAkB;IA2B5B,MAAM;CAiDP"}
@@ -18,13 +18,7 @@ export declare class LeuMenu extends LeuElement {
18
18
  customElements?: CustomElementRegistry;
19
19
  registry?: CustomElementRegistry;
20
20
  };
21
- static properties: {
22
- selects: {
23
- type: StringConstructor;
24
- reflect: boolean;
25
- };
26
- };
27
- constructor();
21
+ selects: "single" | "multiple" | "none";
28
22
  connectedCallback(): void;
29
23
  disconnectedCallback(): void;
30
24
  _handleSlotChange(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/Menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAA;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAI3C;;GAEG;AAEH;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAED,MAAM,CAAC,UAAU;;;;;MAEhB;;IAWD,iBAAiB;IAUjB,oBAAoB;IAKpB,iBAAiB;IAKjB,iBAAiB;IAuBjB;;;OAGG;IACH,YAAY;IAOZ,mBAAmB;IAInB,cAAc,CAAC,KAAK,KAAA;IAqBpB,cAAc,CAAC,KAAK,KAAA;IAkBpB,SAAS,CAAC,KAAK,KAAA;IAMf,YAAY;IAIZ,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAM/C,MAAM;CAOP"}
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/Menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAA;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAI3C;;GAEG;AAEH;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,MAAM,iCAA8B;IAE3C,MAAM,CAAC,iBAAiB;;;;;;;MAGvB;IAGD,OAAO,EAAE,QAAQ,GAAG,UAAU,GAAG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