@statistikzh/leu 0.24.2 → 0.26.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 (535) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/.storybook/main.ts +18 -53
  3. package/.storybook/manager.ts +1 -4
  4. package/.storybook/preview.ts +23 -16
  5. package/.storybook/theme.ts +1 -1
  6. package/CHANGELOG.md +21 -0
  7. package/CONTRIBUTING.md +19 -8
  8. package/dist/Accordion-B04QkmHz.js +241 -0
  9. package/dist/Accordion.d.ts +44 -44
  10. package/dist/Accordion.js +2 -249
  11. package/dist/Button-BgNUxmo_.d.ts +99 -0
  12. package/dist/Button-BkhqVjug.js +564 -0
  13. package/dist/Button.d.ts +2 -85
  14. package/dist/Button.js +5 -504
  15. package/dist/ButtonGroup-B8U9fDvM.js +88 -0
  16. package/dist/ButtonGroup.d.ts +19 -19
  17. package/dist/ButtonGroup.js +6 -101
  18. package/dist/ChartWrapper-CSMFwz9e.js +158 -0
  19. package/dist/ChartWrapper.d.ts +26 -26
  20. package/dist/ChartWrapper.js +3 -163
  21. package/dist/Checkbox-Dd1QLpfn.js +198 -0
  22. package/dist/Checkbox.d.ts +35 -27
  23. package/dist/Checkbox.js +4 -157
  24. package/dist/CheckboxGroup-Bz2eWEFL.js +81 -0
  25. package/dist/CheckboxGroup.d.ts +18 -18
  26. package/dist/CheckboxGroup.js +5 -82
  27. package/dist/Chip-DLKM9P7v.d.ts +18 -0
  28. package/dist/Chip-XAQIIsXq.js +171 -0
  29. package/dist/Chip.d.ts +2 -18
  30. package/dist/Chip.js +2 -166
  31. package/dist/ChipGroup-DLqfK2kn.js +125 -0
  32. package/dist/ChipGroup-Ta8Ht4jc.d.ts +42 -0
  33. package/dist/ChipGroup.d.ts +2 -43
  34. package/dist/ChipGroup.js +3 -132
  35. package/dist/ChipLink-BAxyQO2M.d.ts +17 -0
  36. package/dist/ChipLink.d.ts +2 -18
  37. package/dist/ChipLink.js +28 -28
  38. package/dist/ChipRemovable-DBjwt0CH.d.ts +25 -0
  39. package/dist/ChipRemovable.d.ts +2 -26
  40. package/dist/ChipRemovable.js +42 -43
  41. package/dist/ChipSelectable-CMJNcE4U.d.ts +32 -0
  42. package/dist/ChipSelectable.d.ts +2 -33
  43. package/dist/ChipSelectable.js +63 -72
  44. package/dist/Dialog-DHuXR_oo.js +241 -0
  45. package/dist/Dialog.d.ts +28 -28
  46. package/dist/Dialog.js +3 -240
  47. package/dist/Dropdown-DtFTePbc.js +155 -0
  48. package/dist/Dropdown.d.ts +39 -41
  49. package/dist/Dropdown.js +9 -157
  50. package/dist/FileInput-b8sbLDPI.js +344 -0
  51. package/dist/FileInput.d.ts +56 -57
  52. package/dist/FileInput.js +7 -383
  53. package/dist/FormAssociatedMixin-Cc74LjbC.d.ts +22 -0
  54. package/dist/FormAssociatedMixin-DLPvFtbT.js +58 -0
  55. package/dist/Icon-C_yYuynf.js +186 -0
  56. package/dist/Icon-Op80LrrO.d.ts +151 -0
  57. package/dist/Icon.d.ts +2 -4
  58. package/dist/Icon.js +2 -188
  59. package/dist/Input-D2THgo7c.d.ts +169 -0
  60. package/dist/Input-DEOVocTa.js +610 -0
  61. package/dist/Input.d.ts +2 -166
  62. package/dist/Input.js +4 -626
  63. package/dist/LeuElement-BeFrgKes.js +46 -0
  64. package/dist/LeuElement-pJFU18Xm.d.ts +11 -0
  65. package/dist/Menu-BeqqtCw6.js +136 -0
  66. package/dist/Menu-CQdx1ef3.d.ts +43 -0
  67. package/dist/Menu.d.ts +2 -44
  68. package/dist/Menu.js +4 -157
  69. package/dist/MenuItem-DVg8-1Bq.js +219 -0
  70. package/dist/MenuItem-QcgnRk_7.d.ts +63 -0
  71. package/dist/MenuItem.d.ts +2 -64
  72. package/dist/MenuItem.js +3 -227
  73. package/dist/Message-BhknWvAF.js +252 -0
  74. package/dist/Message.d.ts +53 -53
  75. package/dist/Message.js +3 -267
  76. package/dist/Pagination-CqkHh-Vd.d.ts +76 -0
  77. package/dist/Pagination-DJI5MIi_.js +226 -0
  78. package/dist/Pagination.d.ts +2 -76
  79. package/dist/Pagination.js +7 -240
  80. package/dist/Placeholder-BJybFwSg.js +95 -0
  81. package/dist/Placeholder.d.ts +15 -15
  82. package/dist/Placeholder.js +2 -89
  83. package/dist/Popup-Btgm2a3D.d.ts +61 -0
  84. package/dist/Popup-DNlm_9AA.js +195 -0
  85. package/dist/Popup.d.ts +2 -62
  86. package/dist/Popup.js +2 -233
  87. package/dist/ProgressBar-B0wYj1KF.js +167 -0
  88. package/dist/ProgressBar.d.ts +21 -21
  89. package/dist/ProgressBar.js +2 -165
  90. package/dist/Radio-DMCL8c4D.js +160 -0
  91. package/dist/Radio.d.ts +22 -22
  92. package/dist/Radio.js +2 -151
  93. package/dist/RadioGroup-CM6IyBlq.js +171 -0
  94. package/dist/RadioGroup.d.ts +35 -35
  95. package/dist/RadioGroup.js +3 -182
  96. package/dist/Range-B72rtfln.js +496 -0
  97. package/dist/Range.d.ts +112 -112
  98. package/dist/Range.js +2 -586
  99. package/dist/ScrollTop-BFAqBVDR.js +130 -0
  100. package/dist/ScrollTop.d.ts +21 -21
  101. package/dist/ScrollTop.js +6 -134
  102. package/dist/Select-vxl3BvD4.js +618 -0
  103. package/dist/Select.d.ts +130 -132
  104. package/dist/Select.js +10 -675
  105. package/dist/Spinner-CrM1enM0.d.ts +14 -0
  106. package/dist/Spinner-DDTqijTO.js +56 -0
  107. package/dist/Spinner.d.ts +2 -14
  108. package/dist/Spinner.js +2 -52
  109. package/dist/Table-BgCxfBcm.js +392 -0
  110. package/dist/Table.d.ts +61 -63
  111. package/dist/Table.js +8 -427
  112. package/dist/Tag-DK2KkPIQ.js +76 -0
  113. package/dist/Tag.d.ts +8 -8
  114. package/dist/Tag.js +2 -74
  115. package/dist/VisuallyHidden-OeQvhxYn.d.ts +13 -0
  116. package/dist/VisuallyHidden-pll3amXE.js +29 -0
  117. package/dist/VisuallyHidden.d.ts +2 -13
  118. package/dist/VisuallyHidden.js +2 -25
  119. package/dist/decorate-DwpAc4D0.js +9 -0
  120. package/dist/hasSlotController-DSBCVzPD.js +38 -0
  121. package/dist/hasSlotController-DWPyZ52b.d.ts +19 -0
  122. package/dist/index.d.ts +33 -30
  123. package/dist/index.js +35 -45
  124. package/dist/leu-accordion.d.ts +7 -10
  125. package/dist/leu-accordion.js +4 -8
  126. package/dist/leu-button-group.d.ts +7 -10
  127. package/dist/leu-button-group.js +8 -12
  128. package/dist/leu-button.d.ts +7 -11
  129. package/dist/leu-button.js +7 -11
  130. package/dist/leu-chart-wrapper.d.ts +7 -12
  131. package/dist/leu-chart-wrapper.js +5 -9
  132. package/dist/leu-checkbox-group.d.ts +7 -10
  133. package/dist/leu-checkbox-group.js +7 -10
  134. package/dist/leu-checkbox.d.ts +7 -11
  135. package/dist/leu-checkbox.js +6 -8
  136. package/dist/leu-chip-group.d.ts +7 -12
  137. package/dist/leu-chip-group.js +5 -10
  138. package/dist/leu-chip-link.d.ts +7 -11
  139. package/dist/leu-chip-link.js +5 -8
  140. package/dist/leu-chip-removable.d.ts +7 -12
  141. package/dist/leu-chip-removable.js +6 -9
  142. package/dist/leu-chip-selectable.d.ts +7 -11
  143. package/dist/leu-chip-selectable.js +5 -8
  144. package/dist/leu-dialog.d.ts +7 -13
  145. package/dist/leu-dialog.js +5 -11
  146. package/dist/leu-dropdown.d.ts +7 -18
  147. package/dist/leu-dropdown.js +11 -17
  148. package/dist/leu-file-input.d.ts +7 -13
  149. package/dist/leu-file-input.js +9 -13
  150. package/dist/leu-icon.d.ts +7 -10
  151. package/dist/leu-icon.js +4 -7
  152. package/dist/leu-input.d.ts +7 -12
  153. package/dist/leu-input.js +6 -12
  154. package/dist/leu-menu-item.d.ts +7 -11
  155. package/dist/leu-menu-item.js +5 -9
  156. package/dist/leu-menu.d.ts +7 -12
  157. package/dist/leu-menu.js +6 -10
  158. package/dist/leu-message.d.ts +7 -11
  159. package/dist/leu-message.js +5 -10
  160. package/dist/leu-pagination.d.ts +7 -13
  161. package/dist/leu-pagination.js +9 -14
  162. package/dist/leu-placeholder.d.ts +7 -10
  163. package/dist/leu-placeholder.js +4 -5
  164. package/dist/leu-popup.d.ts +7 -11
  165. package/dist/leu-popup.js +4 -8
  166. package/dist/leu-progress-bar.d.ts +7 -10
  167. package/dist/leu-progress-bar.js +4 -8
  168. package/dist/leu-radio-group.d.ts +7 -10
  169. package/dist/leu-radio-group.js +5 -9
  170. package/dist/leu-radio.d.ts +7 -10
  171. package/dist/leu-radio.js +4 -7
  172. package/dist/leu-range.d.ts +7 -10
  173. package/dist/leu-range.js +4 -9
  174. package/dist/leu-scroll-top.d.ts +7 -12
  175. package/dist/leu-scroll-top.js +8 -13
  176. package/dist/leu-select.d.ts +7 -19
  177. package/dist/leu-select.js +12 -19
  178. package/dist/leu-spinner.d.ts +7 -10
  179. package/dist/leu-spinner.js +4 -5
  180. package/dist/leu-table.d.ts +7 -14
  181. package/dist/leu-table.js +10 -17
  182. package/dist/leu-tag.d.ts +7 -10
  183. package/dist/leu-tag.js +4 -7
  184. package/dist/leu-visually-hidden.d.ts +7 -10
  185. package/dist/leu-visually-hidden.js +4 -5
  186. package/dist/utils-hfk5Nwy8.js +28 -0
  187. package/dist/vscode.html-custom-data.json +7 -8
  188. package/dist/vue/index.d.ts +5 -9
  189. package/dist/web-types.json +18 -24
  190. package/eslint.config.mjs +79 -0
  191. package/package.json +44 -60
  192. package/scripts/generate-component/templates/stories/[name].stories.ts +1 -1
  193. package/src/components/accordion/Accordion.ts +1 -1
  194. package/src/components/button/Button.ts +76 -5
  195. package/src/components/button/button.css +37 -9
  196. package/src/components/button/stories/button.stories.ts +23 -0
  197. package/src/components/button/test/button.test.ts +214 -9
  198. package/src/components/button-group/ButtonGroup.ts +1 -6
  199. package/src/components/button-group/stories/button-group.stories.ts +1 -1
  200. package/src/components/chart-wrapper/ChartWrapper.ts +1 -1
  201. package/src/components/chart-wrapper/stories/chart-wrapper.stories.ts +1 -1
  202. package/src/components/checkbox/Checkbox.ts +76 -12
  203. package/src/components/checkbox/CheckboxGroup.ts +1 -1
  204. package/src/components/checkbox/checkbox.css +4 -0
  205. package/src/components/checkbox/stories/checkbox.stories.ts +26 -3
  206. package/src/components/checkbox/test/checkbox.test.ts +147 -3
  207. package/src/components/chip/Chip.ts +1 -1
  208. package/src/components/chip/ChipGroup.ts +2 -2
  209. package/src/components/chip/stories/chip-removable.stories.ts +1 -1
  210. package/src/components/chip/test/chip-removable.test.ts +2 -2
  211. package/src/components/dialog/Dialog.ts +1 -1
  212. package/src/components/dialog/stories/dialog.stories.ts +0 -2
  213. package/src/components/dropdown/Dropdown.ts +1 -1
  214. package/src/components/dropdown/stories/dropdown.stories.ts +1 -1
  215. package/src/components/file-input/FileInput.ts +18 -20
  216. package/src/components/file-input/stories/file-input.stories.ts +2 -2
  217. package/src/components/file-input/test/file-input.test.ts +14 -1
  218. package/src/components/icon/Icon.ts +1 -1
  219. package/src/components/input/Input.ts +18 -7
  220. package/src/components/input/stories/input.stories.ts +24 -21
  221. package/src/components/menu/Menu.ts +4 -4
  222. package/src/components/menu/MenuItem.ts +1 -1
  223. package/src/components/menu/stories/menu-item.stories.ts +0 -2
  224. package/src/components/message/Message.ts +1 -1
  225. package/src/components/message/stories/message.stories.ts +2 -2
  226. package/src/components/pagination/Pagination.ts +1 -1
  227. package/src/components/pagination/stories/pagination.stories.ts +3 -3
  228. package/src/components/pagination/test/pagination.test.ts +1 -1
  229. package/src/components/placeholder/Placeholder.ts +1 -1
  230. package/src/components/placeholder/stories/placeholder.stories.ts +1 -1
  231. package/src/components/popup/Popup.ts +1 -1
  232. package/src/components/progress-bar/ProgressBar.ts +1 -1
  233. package/src/components/progress-bar/stories/progress-bar.stories.ts +1 -1
  234. package/src/components/radio/Radio.ts +1 -1
  235. package/src/components/radio/RadioGroup.ts +5 -5
  236. package/src/components/range/Range.ts +1 -1
  237. package/src/components/range/stories/range.stories.ts +2 -2
  238. package/src/components/scroll-top/ScrollTop.ts +1 -1
  239. package/src/components/select/Select.ts +2 -5
  240. package/src/components/spinner/Spinner.ts +1 -1
  241. package/src/components/table/Table.ts +1 -1
  242. package/src/components/tag/Tag.ts +1 -1
  243. package/src/components/tag/stories/tag.stories.ts +1 -1
  244. package/src/components/visually-hidden/VisuallyHidden.ts +1 -1
  245. package/src/docs/contributing.mdx +1 -1
  246. package/src/docs/installation.mdx +1 -1
  247. package/src/docs/theme.mdx +1 -1
  248. package/src/docs/usage.mdx +1 -1
  249. package/src/global.d.ts +1 -1
  250. package/src/lib/LeuElement.ts +1 -1
  251. package/src/lib/mixins/FormAssociatedMixin.ts +115 -0
  252. package/src/lib/styleMap.ts +1 -1
  253. package/tsdown.config.ts +35 -0
  254. package/web-test-runner.config.mjs +20 -2
  255. package/.eslintrc.json +0 -57
  256. package/dist/Icon.d-itcQ94ym.d.ts +0 -151
  257. package/dist/LeuElement-BfXSO7MN.js +0 -42
  258. package/dist/LeuElement.d-BevHqLUu.d.ts +0 -10
  259. package/dist/_tslib-CNEFicEt.js +0 -30
  260. package/dist/components/accordion/Accordion.d.ts +0 -49
  261. package/dist/components/accordion/Accordion.d.ts.map +0 -1
  262. package/dist/components/accordion/leu-accordion.d.ts +0 -8
  263. package/dist/components/accordion/leu-accordion.d.ts.map +0 -1
  264. package/dist/components/accordion/stories/accordion.stories.d.ts +0 -26
  265. package/dist/components/accordion/stories/accordion.stories.d.ts.map +0 -1
  266. package/dist/components/accordion/test/accordion.test.d.ts +0 -2
  267. package/dist/components/accordion/test/accordion.test.d.ts.map +0 -1
  268. package/dist/components/button/Button.d.ts +0 -81
  269. package/dist/components/button/Button.d.ts.map +0 -1
  270. package/dist/components/button/leu-button.d.ts +0 -8
  271. package/dist/components/button/leu-button.d.ts.map +0 -1
  272. package/dist/components/button/stories/button.stories.d.ts +0 -19
  273. package/dist/components/button/stories/button.stories.d.ts.map +0 -1
  274. package/dist/components/button/test/button.test.d.ts +0 -3
  275. package/dist/components/button/test/button.test.d.ts.map +0 -1
  276. package/dist/components/button-group/ButtonGroup.d.ts +0 -25
  277. package/dist/components/button-group/ButtonGroup.d.ts.map +0 -1
  278. package/dist/components/button-group/leu-button-group.d.ts +0 -8
  279. package/dist/components/button-group/leu-button-group.d.ts.map +0 -1
  280. package/dist/components/button-group/stories/button-group.stories.d.ts +0 -15
  281. package/dist/components/button-group/stories/button-group.stories.d.ts.map +0 -1
  282. package/dist/components/button-group/test/button-group.test.d.ts +0 -3
  283. package/dist/components/button-group/test/button-group.test.d.ts.map +0 -1
  284. package/dist/components/chart-wrapper/ChartWrapper.d.ts +0 -34
  285. package/dist/components/chart-wrapper/ChartWrapper.d.ts.map +0 -1
  286. package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts +0 -8
  287. package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts.map +0 -1
  288. package/dist/components/chart-wrapper/stories/chart-wrapper.stories.d.ts +0 -47
  289. package/dist/components/chart-wrapper/stories/chart-wrapper.stories.d.ts.map +0 -1
  290. package/dist/components/chart-wrapper/test/chart-wrapper.test.d.ts +0 -2
  291. package/dist/components/chart-wrapper/test/chart-wrapper.test.d.ts.map +0 -1
  292. package/dist/components/checkbox/Checkbox.d.ts +0 -28
  293. package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
  294. package/dist/components/checkbox/CheckboxGroup.d.ts +0 -22
  295. package/dist/components/checkbox/CheckboxGroup.d.ts.map +0 -1
  296. package/dist/components/checkbox/leu-checkbox-group.d.ts +0 -8
  297. package/dist/components/checkbox/leu-checkbox-group.d.ts.map +0 -1
  298. package/dist/components/checkbox/leu-checkbox.d.ts +0 -8
  299. package/dist/components/checkbox/leu-checkbox.d.ts.map +0 -1
  300. package/dist/components/checkbox/stories/checkbox-group.stories.d.ts +0 -29
  301. package/dist/components/checkbox/stories/checkbox-group.stories.d.ts.map +0 -1
  302. package/dist/components/checkbox/stories/checkbox.stories.d.ts +0 -22
  303. package/dist/components/checkbox/stories/checkbox.stories.d.ts.map +0 -1
  304. package/dist/components/checkbox/test/checkbox-group.test.d.ts +0 -3
  305. package/dist/components/checkbox/test/checkbox-group.test.d.ts.map +0 -1
  306. package/dist/components/checkbox/test/checkbox.test.d.ts +0 -2
  307. package/dist/components/checkbox/test/checkbox.test.d.ts.map +0 -1
  308. package/dist/components/chip/Chip.d.ts +0 -15
  309. package/dist/components/chip/Chip.d.ts.map +0 -1
  310. package/dist/components/chip/ChipGroup.d.ts +0 -38
  311. package/dist/components/chip/ChipGroup.d.ts.map +0 -1
  312. package/dist/components/chip/ChipLink.d.ts +0 -13
  313. package/dist/components/chip/ChipLink.d.ts.map +0 -1
  314. package/dist/components/chip/ChipRemovable.d.ts +0 -21
  315. package/dist/components/chip/ChipRemovable.d.ts.map +0 -1
  316. package/dist/components/chip/ChipSelectable.d.ts +0 -28
  317. package/dist/components/chip/ChipSelectable.d.ts.map +0 -1
  318. package/dist/components/chip/exports.d.ts +0 -5
  319. package/dist/components/chip/exports.d.ts.map +0 -1
  320. package/dist/components/chip/leu-chip-group.d.ts +0 -8
  321. package/dist/components/chip/leu-chip-group.d.ts.map +0 -1
  322. package/dist/components/chip/leu-chip-link.d.ts +0 -8
  323. package/dist/components/chip/leu-chip-link.d.ts.map +0 -1
  324. package/dist/components/chip/leu-chip-removable.d.ts +0 -8
  325. package/dist/components/chip/leu-chip-removable.d.ts.map +0 -1
  326. package/dist/components/chip/leu-chip-selectable.d.ts +0 -8
  327. package/dist/components/chip/leu-chip-selectable.d.ts.map +0 -1
  328. package/dist/components/chip/stories/chip-group.stories.d.ts +0 -40
  329. package/dist/components/chip/stories/chip-group.stories.d.ts.map +0 -1
  330. package/dist/components/chip/stories/chip-link.stories.d.ts +0 -27
  331. package/dist/components/chip/stories/chip-link.stories.d.ts.map +0 -1
  332. package/dist/components/chip/stories/chip-removable.stories.d.ts +0 -21
  333. package/dist/components/chip/stories/chip-removable.stories.d.ts.map +0 -1
  334. package/dist/components/chip/stories/chip-selectable.stories.d.ts +0 -35
  335. package/dist/components/chip/stories/chip-selectable.stories.d.ts.map +0 -1
  336. package/dist/components/chip/test/chip-group.test.d.ts +0 -4
  337. package/dist/components/chip/test/chip-group.test.d.ts.map +0 -1
  338. package/dist/components/chip/test/chip-link.test.d.ts +0 -2
  339. package/dist/components/chip/test/chip-link.test.d.ts.map +0 -1
  340. package/dist/components/chip/test/chip-removable.test.d.ts +0 -2
  341. package/dist/components/chip/test/chip-removable.test.d.ts.map +0 -1
  342. package/dist/components/chip/test/chip-selectable.test.d.ts +0 -2
  343. package/dist/components/chip/test/chip-selectable.test.d.ts.map +0 -1
  344. package/dist/components/chip/test/chip.test.d.ts +0 -2
  345. package/dist/components/chip/test/chip.test.d.ts.map +0 -1
  346. package/dist/components/dialog/Dialog.d.ts +0 -29
  347. package/dist/components/dialog/Dialog.d.ts.map +0 -1
  348. package/dist/components/dialog/leu-dialog.d.ts +0 -8
  349. package/dist/components/dialog/leu-dialog.d.ts.map +0 -1
  350. package/dist/components/dialog/stories/dialog.stories.d.ts +0 -19
  351. package/dist/components/dialog/stories/dialog.stories.d.ts.map +0 -1
  352. package/dist/components/dialog/test/dialog.test.d.ts +0 -2
  353. package/dist/components/dialog/test/dialog.test.d.ts.map +0 -1
  354. package/dist/components/dropdown/Dropdown.d.ts +0 -40
  355. package/dist/components/dropdown/Dropdown.d.ts.map +0 -1
  356. package/dist/components/dropdown/leu-dropdown.d.ts +0 -8
  357. package/dist/components/dropdown/leu-dropdown.d.ts.map +0 -1
  358. package/dist/components/dropdown/stories/dropdown.stories.d.ts +0 -25
  359. package/dist/components/dropdown/stories/dropdown.stories.d.ts.map +0 -1
  360. package/dist/components/dropdown/test/dropdown.test.d.ts +0 -2
  361. package/dist/components/dropdown/test/dropdown.test.d.ts.map +0 -1
  362. package/dist/components/file-input/FileInput.d.ts +0 -62
  363. package/dist/components/file-input/FileInput.d.ts.map +0 -1
  364. package/dist/components/file-input/leu-file-input.d.ts +0 -8
  365. package/dist/components/file-input/leu-file-input.d.ts.map +0 -1
  366. package/dist/components/file-input/stories/file-input.stories.d.ts +0 -34
  367. package/dist/components/file-input/stories/file-input.stories.d.ts.map +0 -1
  368. package/dist/components/file-input/test/file-input.test.d.ts +0 -2
  369. package/dist/components/file-input/test/file-input.test.d.ts.map +0 -1
  370. package/dist/components/icon/Icon.d.ts +0 -20
  371. package/dist/components/icon/Icon.d.ts.map +0 -1
  372. package/dist/components/icon/leu-icon.d.ts +0 -8
  373. package/dist/components/icon/leu-icon.d.ts.map +0 -1
  374. package/dist/components/icon/paths.d.ts +0 -127
  375. package/dist/components/icon/paths.d.ts.map +0 -1
  376. package/dist/components/icon/stories/icon.stories.d.ts +0 -32
  377. package/dist/components/icon/stories/icon.stories.d.ts.map +0 -1
  378. package/dist/components/icon/test/icon.test.d.ts +0 -2
  379. package/dist/components/icon/test/icon.test.d.ts.map +0 -1
  380. package/dist/components/input/Input.d.ts +0 -163
  381. package/dist/components/input/Input.d.ts.map +0 -1
  382. package/dist/components/input/leu-input.d.ts +0 -8
  383. package/dist/components/input/leu-input.d.ts.map +0 -1
  384. package/dist/components/input/stories/input.stories.d.ts +0 -35
  385. package/dist/components/input/stories/input.stories.d.ts.map +0 -1
  386. package/dist/components/input/test/input.test.d.ts +0 -2
  387. package/dist/components/input/test/input.test.d.ts.map +0 -1
  388. package/dist/components/menu/Menu.d.ts +0 -39
  389. package/dist/components/menu/Menu.d.ts.map +0 -1
  390. package/dist/components/menu/MenuItem.d.ts +0 -61
  391. package/dist/components/menu/MenuItem.d.ts.map +0 -1
  392. package/dist/components/menu/leu-menu-item.d.ts +0 -8
  393. package/dist/components/menu/leu-menu-item.d.ts.map +0 -1
  394. package/dist/components/menu/leu-menu.d.ts +0 -8
  395. package/dist/components/menu/leu-menu.d.ts.map +0 -1
  396. package/dist/components/menu/stories/menu-item.stories.d.ts +0 -24
  397. package/dist/components/menu/stories/menu-item.stories.d.ts.map +0 -1
  398. package/dist/components/menu/stories/menu.stories.d.ts +0 -26
  399. package/dist/components/menu/stories/menu.stories.d.ts.map +0 -1
  400. package/dist/components/menu/test/menu-item.test.d.ts +0 -3
  401. package/dist/components/menu/test/menu-item.test.d.ts.map +0 -1
  402. package/dist/components/menu/test/menu.test.d.ts +0 -4
  403. package/dist/components/menu/test/menu.test.d.ts.map +0 -1
  404. package/dist/components/message/Message.d.ts +0 -59
  405. package/dist/components/message/Message.d.ts.map +0 -1
  406. package/dist/components/message/leu-message.d.ts +0 -8
  407. package/dist/components/message/leu-message.d.ts.map +0 -1
  408. package/dist/components/message/stories/message.stories.d.ts +0 -179
  409. package/dist/components/message/stories/message.stories.d.ts.map +0 -1
  410. package/dist/components/message/test/message.test.d.ts +0 -2
  411. package/dist/components/message/test/message.test.d.ts.map +0 -1
  412. package/dist/components/pagination/Pagination.d.ts +0 -72
  413. package/dist/components/pagination/Pagination.d.ts.map +0 -1
  414. package/dist/components/pagination/leu-pagination.d.ts +0 -8
  415. package/dist/components/pagination/leu-pagination.d.ts.map +0 -1
  416. package/dist/components/pagination/stories/pagination.stories.d.ts +0 -25
  417. package/dist/components/pagination/stories/pagination.stories.d.ts.map +0 -1
  418. package/dist/components/pagination/test/pagination.test.d.ts +0 -2
  419. package/dist/components/pagination/test/pagination.test.d.ts.map +0 -1
  420. package/dist/components/placeholder/Placeholder.d.ts +0 -23
  421. package/dist/components/placeholder/Placeholder.d.ts.map +0 -1
  422. package/dist/components/placeholder/leu-placeholder.d.ts +0 -8
  423. package/dist/components/placeholder/leu-placeholder.d.ts.map +0 -1
  424. package/dist/components/placeholder/stories/placeholder.stories.d.ts +0 -27
  425. package/dist/components/placeholder/stories/placeholder.stories.d.ts.map +0 -1
  426. package/dist/components/placeholder/test/placeholder.test.d.ts +0 -2
  427. package/dist/components/placeholder/test/placeholder.test.d.ts.map +0 -1
  428. package/dist/components/popup/Popup.d.ts +0 -57
  429. package/dist/components/popup/Popup.d.ts.map +0 -1
  430. package/dist/components/popup/leu-popup.d.ts +0 -8
  431. package/dist/components/popup/leu-popup.d.ts.map +0 -1
  432. package/dist/components/popup/stories/popup.stories.d.ts +0 -28
  433. package/dist/components/popup/stories/popup.stories.d.ts.map +0 -1
  434. package/dist/components/popup/test/popup.test.d.ts +0 -2
  435. package/dist/components/popup/test/popup.test.d.ts.map +0 -1
  436. package/dist/components/progress-bar/ProgressBar.d.ts +0 -25
  437. package/dist/components/progress-bar/ProgressBar.d.ts.map +0 -1
  438. package/dist/components/progress-bar/leu-progress-bar.d.ts +0 -8
  439. package/dist/components/progress-bar/leu-progress-bar.d.ts.map +0 -1
  440. package/dist/components/progress-bar/stories/progress-bar.stories.d.ts +0 -48
  441. package/dist/components/progress-bar/stories/progress-bar.stories.d.ts.map +0 -1
  442. package/dist/components/progress-bar/test/progress-bar.test.d.ts +0 -2
  443. package/dist/components/progress-bar/test/progress-bar.test.d.ts.map +0 -1
  444. package/dist/components/radio/Radio.d.ts +0 -24
  445. package/dist/components/radio/Radio.d.ts.map +0 -1
  446. package/dist/components/radio/RadioGroup.d.ts +0 -39
  447. package/dist/components/radio/RadioGroup.d.ts.map +0 -1
  448. package/dist/components/radio/leu-radio-group.d.ts +0 -8
  449. package/dist/components/radio/leu-radio-group.d.ts.map +0 -1
  450. package/dist/components/radio/leu-radio.d.ts +0 -8
  451. package/dist/components/radio/leu-radio.d.ts.map +0 -1
  452. package/dist/components/radio/stories/radio-group.stories.d.ts +0 -29
  453. package/dist/components/radio/stories/radio-group.stories.d.ts.map +0 -1
  454. package/dist/components/radio/stories/radio.stories.d.ts +0 -22
  455. package/dist/components/radio/stories/radio.stories.d.ts.map +0 -1
  456. package/dist/components/radio/test/radio-group.test.d.ts +0 -3
  457. package/dist/components/radio/test/radio-group.test.d.ts.map +0 -1
  458. package/dist/components/radio/test/radio.test.d.ts +0 -2
  459. package/dist/components/radio/test/radio.test.d.ts.map +0 -1
  460. package/dist/components/range/Range.d.ts +0 -116
  461. package/dist/components/range/Range.d.ts.map +0 -1
  462. package/dist/components/range/leu-range.d.ts +0 -8
  463. package/dist/components/range/leu-range.d.ts.map +0 -1
  464. package/dist/components/range/stories/range.stories.d.ts +0 -231
  465. package/dist/components/range/stories/range.stories.d.ts.map +0 -1
  466. package/dist/components/range/test/range.test.d.ts +0 -2
  467. package/dist/components/range/test/range.test.d.ts.map +0 -1
  468. package/dist/components/scroll-top/ScrollTop.d.ts +0 -23
  469. package/dist/components/scroll-top/ScrollTop.d.ts.map +0 -1
  470. package/dist/components/scroll-top/leu-scroll-top.d.ts +0 -8
  471. package/dist/components/scroll-top/leu-scroll-top.d.ts.map +0 -1
  472. package/dist/components/scroll-top/stories/scroll-top.stories.d.ts +0 -8
  473. package/dist/components/scroll-top/stories/scroll-top.stories.d.ts.map +0 -1
  474. package/dist/components/scroll-top/test/scroll-top.test.d.ts +0 -2
  475. package/dist/components/scroll-top/test/scroll-top.test.d.ts.map +0 -1
  476. package/dist/components/select/Select.d.ts +0 -145
  477. package/dist/components/select/Select.d.ts.map +0 -1
  478. package/dist/components/select/leu-select.d.ts +0 -8
  479. package/dist/components/select/leu-select.d.ts.map +0 -1
  480. package/dist/components/select/stories/select.stories.d.ts +0 -23
  481. package/dist/components/select/stories/select.stories.d.ts.map +0 -1
  482. package/dist/components/select/test/fixtures.d.ts +0 -2
  483. package/dist/components/select/test/fixtures.d.ts.map +0 -1
  484. package/dist/components/select/test/select.test.d.ts +0 -3
  485. package/dist/components/select/test/select.test.d.ts.map +0 -1
  486. package/dist/components/spinner/Spinner.d.ts +0 -10
  487. package/dist/components/spinner/Spinner.d.ts.map +0 -1
  488. package/dist/components/spinner/leu-spinner.d.ts +0 -8
  489. package/dist/components/spinner/leu-spinner.d.ts.map +0 -1
  490. package/dist/components/spinner/stories/spinner.stories.d.ts +0 -16
  491. package/dist/components/spinner/stories/spinner.stories.d.ts.map +0 -1
  492. package/dist/components/spinner/test/spinner.test.d.ts +0 -2
  493. package/dist/components/spinner/test/spinner.test.d.ts.map +0 -1
  494. package/dist/components/table/Table.d.ts +0 -65
  495. package/dist/components/table/Table.d.ts.map +0 -1
  496. package/dist/components/table/leu-table.d.ts +0 -8
  497. package/dist/components/table/leu-table.d.ts.map +0 -1
  498. package/dist/components/table/stories/table.stories.d.ts +0 -15
  499. package/dist/components/table/stories/table.stories.d.ts.map +0 -1
  500. package/dist/components/table/test/table.test.d.ts +0 -2
  501. package/dist/components/table/test/table.test.d.ts.map +0 -1
  502. package/dist/components/tag/Tag.d.ts +0 -13
  503. package/dist/components/tag/Tag.d.ts.map +0 -1
  504. package/dist/components/tag/leu-tag.d.ts +0 -8
  505. package/dist/components/tag/leu-tag.d.ts.map +0 -1
  506. package/dist/components/tag/stories/tag.stories.d.ts +0 -136
  507. package/dist/components/tag/stories/tag.stories.d.ts.map +0 -1
  508. package/dist/components/tag/test/tag.test.d.ts +0 -2
  509. package/dist/components/tag/test/tag.test.d.ts.map +0 -1
  510. package/dist/components/visually-hidden/VisuallyHidden.d.ts +0 -9
  511. package/dist/components/visually-hidden/VisuallyHidden.d.ts.map +0 -1
  512. package/dist/components/visually-hidden/leu-visually-hidden.d.ts +0 -8
  513. package/dist/components/visually-hidden/leu-visually-hidden.d.ts.map +0 -1
  514. package/dist/components/visually-hidden/stories/visually-hidden.stories.d.ts +0 -13
  515. package/dist/components/visually-hidden/stories/visually-hidden.stories.d.ts.map +0 -1
  516. package/dist/components/visually-hidden/test/visually-hidden.test.d.ts +0 -2
  517. package/dist/components/visually-hidden/test/visually-hidden.test.d.ts.map +0 -1
  518. package/dist/hasSlotController-Bm2tipvG.js +0 -53
  519. package/dist/hasSlotController.d-emXwVXWF.d.ts +0 -23
  520. package/dist/index.d.ts.map +0 -1
  521. package/dist/lib/LeuElement.d.ts +0 -8
  522. package/dist/lib/LeuElement.d.ts.map +0 -1
  523. package/dist/lib/a11y.d.ts +0 -11
  524. package/dist/lib/a11y.d.ts.map +0 -1
  525. package/dist/lib/hasSlotController.d.ts +0 -20
  526. package/dist/lib/hasSlotController.d.ts.map +0 -1
  527. package/dist/lib/styleMap.d.ts +0 -61
  528. package/dist/lib/styleMap.d.ts.map +0 -1
  529. package/dist/lib/utils.d.ts +0 -23
  530. package/dist/lib/utils.d.ts.map +0 -1
  531. package/dist/styles/style.stories.d.ts +0 -6
  532. package/dist/styles/style.stories.d.ts.map +0 -1
  533. package/dist/utils-DBGsNSJW.js +0 -33
  534. package/rollup.config.js +0 -94
  535. package/web-dev-server.config.mjs +0 -30
@@ -4,7 +4,7 @@ import { property } from "lit/decorators.js"
4
4
 
5
5
  import { LeuElement } from "../../lib/LeuElement.js"
6
6
 
7
- import styles from "./progress-bar.css"
7
+ import styles from "./progress-bar.css?inline"
8
8
 
9
9
  /**
10
10
  * An indicator showing the completion progress of a task
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from "@storybook/web-components"
1
+ import { Meta, StoryObj } from "@storybook/web-components-vite"
2
2
  import { html } from "lit"
3
3
  import { ifDefined } from "lit/directives/if-defined.js"
4
4
 
@@ -3,7 +3,7 @@ import { property } from "lit/decorators.js"
3
3
 
4
4
  import { LeuElement } from "../../lib/LeuElement.js"
5
5
 
6
- import styles from "./radio.css"
6
+ import styles from "./radio.css?inline"
7
7
 
8
8
  /**
9
9
  * @tagname leu-radio
@@ -4,7 +4,7 @@ import { property } from "lit/decorators.js"
4
4
 
5
5
  import { LeuElement } from "../../lib/LeuElement.js"
6
6
 
7
- import styles from "./radio-group.css"
7
+ import styles from "./radio-group.css?inline"
8
8
  import { LeuRadio } from "./Radio.js"
9
9
 
10
10
  /**
@@ -106,13 +106,13 @@ export class LeuRadioGroup extends LeuElement {
106
106
 
107
107
  private handleInput = (e: InputEvent & { target: LeuRadio }) => {
108
108
  this.items.forEach((item) => {
109
- item.checked = item === e.target // eslint-disable-line no-param-reassign
109
+ item.checked = item === e.target
110
110
  })
111
111
  }
112
112
 
113
113
  private selectItem(selectingItem: LeuRadio) {
114
114
  this.items.forEach((item) => {
115
- item.checked = item === selectingItem // eslint-disable-line no-param-reassign
115
+ item.checked = item === selectingItem
116
116
  })
117
117
  }
118
118
 
@@ -138,9 +138,9 @@ export class LeuRadioGroup extends LeuElement {
138
138
  private setTabIndex() {
139
139
  this.items.forEach((item, index) => {
140
140
  if (index === this.currentIndex) {
141
- item.tabIndex = 0 // eslint-disable-line no-param-reassign
141
+ item.tabIndex = 0
142
142
  } else {
143
- item.tabIndex = -1 // eslint-disable-line no-param-reassign
143
+ item.tabIndex = -1
144
144
  }
145
145
  })
146
146
  }
@@ -2,7 +2,7 @@ import { html, nothing, PropertyValues } from "lit"
2
2
  import { property, query } from "lit/decorators.js"
3
3
  import { ifDefined } from "lit/directives/if-defined.js"
4
4
 
5
- import styles from "./range.css"
5
+ import styles from "./range.css?inline"
6
6
  import { LeuElement } from "../../lib/LeuElement.js"
7
7
  import { clamp, isNumber } from "../../lib/utils.js"
8
8
 
@@ -1,5 +1,5 @@
1
- import { Meta, StoryObj } from "@storybook/web-components"
2
- import { action } from "@storybook/addon-actions"
1
+ import { Meta, StoryObj } from "@storybook/web-components-vite"
2
+ import { action } from "storybook/actions"
3
3
  import { html } from "lit"
4
4
  import { ifDefined } from "lit/directives/if-defined.js"
5
5
 
@@ -8,7 +8,7 @@ import { LeuIcon } from "../icon/Icon.js"
8
8
 
9
9
  import { throttle } from "../../lib/utils.js"
10
10
 
11
- import styles from "./scroll-top.css"
11
+ import styles from "./scroll-top.css?inline"
12
12
 
13
13
  /**
14
14
  * @tagname leu-scroll-top
@@ -13,7 +13,7 @@ import { LeuIcon } from "../icon/Icon.js"
13
13
  import { LeuInput } from "../input/Input.js"
14
14
  import { LeuPopup } from "../popup/Popup.js"
15
15
 
16
- import styles from "./select.css"
16
+ import styles from "./select.css?inline"
17
17
 
18
18
  /**
19
19
  * @tagname leu-select
@@ -174,7 +174,6 @@ export class LeuSelect extends LeuElement {
174
174
  this._displayValue = ""
175
175
  }
176
176
 
177
- /* eslint-disable no-param-reassign */
178
177
  menuItems.forEach((menuItem) => {
179
178
  if (changed.multiple) {
180
179
  menuItem.multipleSelection = this.multiple
@@ -198,7 +197,6 @@ export class LeuSelect extends LeuElement {
198
197
  }
199
198
  }
200
199
  })
201
- /* eslint-enable no-param-reassign */
202
200
 
203
201
  if (changed.optionFilter) {
204
202
  this._hasFilterResults = hasFilterResults
@@ -455,7 +453,7 @@ export class LeuSelect extends LeuElement {
455
453
  * We use the click event listener with the event delegation pattern
456
454
  * so this is not a violation of the rule.
457
455
  */
458
- /* eslint-disable lit-a11y/click-events-have-key-events */
456
+
459
457
  return html`<div
460
458
  class=${classMap(selectClasses)}
461
459
  @keydown=${this._handleKeyDown}
@@ -495,6 +493,5 @@ export class LeuSelect extends LeuElement {
495
493
  </leu-popup>
496
494
  </div>
497
495
  <input type="hidden" name=${this.name} .value=${this.value.join(",")} />`
498
- /* eslint-enable lit-a11y/click-events-have-key-events */
499
496
  }
500
497
  }
@@ -2,7 +2,7 @@ import { html } from "lit"
2
2
 
3
3
  import { LeuElement } from "../../lib/LeuElement.js"
4
4
 
5
- import styles from "./spinner.css"
5
+ import styles from "./spinner.css?inline"
6
6
 
7
7
  /**
8
8
  * @tagname leu-spinner
@@ -7,7 +7,7 @@ import { styleMap } from "../../lib/styleMap.js"
7
7
  import { LeuIcon } from "../icon/Icon.js"
8
8
  import { LeuPagination } from "../pagination/Pagination.js"
9
9
 
10
- import styles from "./table.css"
10
+ import styles from "./table.css?inline"
11
11
 
12
12
  /**
13
13
  * @tagname leu-table
@@ -3,7 +3,7 @@ import { property } from "lit/decorators.js"
3
3
 
4
4
  import { LeuElement } from "../../lib/LeuElement.js"
5
5
 
6
- import styles from "./tag.css"
6
+ import styles from "./tag.css?inline"
7
7
 
8
8
  /**
9
9
  * @tagname leu-tag
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from "@storybook/web-components"
1
+ import { Meta, StoryObj } from "@storybook/web-components-vite"
2
2
  import { html } from "lit"
3
3
  import { ifDefined } from "lit/directives/if-defined.js"
4
4
 
@@ -2,7 +2,7 @@ import { html } from "lit"
2
2
 
3
3
  import { LeuElement } from "../../lib/LeuElement.js"
4
4
 
5
- import styles from "./visually-hidden.css"
5
+ import styles from "./visually-hidden.css?inline"
6
6
 
7
7
  /**
8
8
  * @tagname leu-visually-hidden
@@ -1,4 +1,4 @@
1
- import { Meta, Markdown } from "@storybook/blocks"
1
+ import { Meta, Markdown } from "@storybook/addon-docs/blocks"
2
2
 
3
3
  <Meta title="Introduction/Contributing" />
4
4
 
@@ -1,4 +1,4 @@
1
- import { Meta, Markdown } from "@storybook/blocks"
1
+ import { Meta, Markdown } from "@storybook/addon-docs/blocks"
2
2
 
3
3
  <Meta title="Introduction/Installation" />
4
4
 
@@ -1,4 +1,4 @@
1
- import { Meta, Markdown, Canvas } from "@storybook/blocks"
1
+ import { Meta, Markdown, Canvas } from "@storybook/addon-docs/blocks"
2
2
  import React from "react"
3
3
 
4
4
  import * as GridStories from "../styles/style.stories"
@@ -1,4 +1,4 @@
1
- import { Meta, Markdown } from "@storybook/blocks"
1
+ import { Meta, Markdown } from "@storybook/addon-docs/blocks"
2
2
 
3
3
  <Meta title="Introduction/Usage" />
4
4
 
package/src/global.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare module "*.css" {
1
+ declare module "*.css?inline" {
2
2
  import { CSSResult } from "lit"
3
3
 
4
4
  const css: CSSResult
@@ -1,5 +1,5 @@
1
1
  import { CSSResultGroup, LitElement } from "lit"
2
- import commonStyles from "../styles/common-styles.css"
2
+ import commonStyles from "../styles/common-styles.css?inline"
3
3
 
4
4
  export class LeuElement extends LitElement {
5
5
  static version = __LEU_VERSION__
@@ -0,0 +1,115 @@
1
+ /* eslint-disable max-classes-per-file */
2
+ import { property } from "lit/decorators.js"
3
+ import { LeuElement } from "../LeuElement.js"
4
+
5
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
6
+ type AbstractConstructor<T = object> = abstract new (...args: any[]) => T
7
+
8
+ // @todo define sensible eslint settings for classes
9
+ /* eslint-disable max-classes-per-file */
10
+ export declare abstract class FormAssociatedMixinType {
11
+ static formAssociated: boolean
12
+
13
+ protected readonly internals: ElementInternals
14
+
15
+ name: string | null
16
+
17
+ disabled: boolean
18
+
19
+ required: boolean
20
+
21
+ protected hasInteracted: boolean
22
+
23
+ form: HTMLFormElement | null
24
+
25
+ validity: ValidityState
26
+
27
+ validationMessage: string
28
+
29
+ willValidate: boolean
30
+
31
+ checkValidity(): boolean
32
+
33
+ reportValidity(): boolean
34
+
35
+ resetValidity(): void
36
+
37
+ formDisabledCallback(isDisabled: boolean): void
38
+
39
+ formResetCallback(): void
40
+
41
+ formStateRestoreCallback(_state: string | FormData | null): void
42
+
43
+ protected abstract setFormValue(): void
44
+ }
45
+
46
+ export const FormAssociatedMixin = <T extends AbstractConstructor<LeuElement>>(
47
+ superClass: T,
48
+ ) => {
49
+ abstract class FormAssociatedMixinClass extends superClass {
50
+ static formAssociated = true
51
+
52
+ protected readonly internals: ElementInternals = this.attachInternals()
53
+
54
+ get form() {
55
+ return this.internals.form
56
+ }
57
+
58
+ /** The name of the form control. Is submitted with the `value` as key-value pair. */
59
+ @property({ reflect: true })
60
+ name: string | null = null
61
+
62
+ /** Disables the form control. */
63
+ @property({ type: Boolean })
64
+ disabled: boolean = false
65
+
66
+ // Treat every form control that doesn't implement its own `required` property as "not required"
67
+ required: boolean = false
68
+
69
+ /** Whether the user has interacted with the form control. */
70
+ @property({ state: true, attribute: false })
71
+ protected hasInteracted: boolean = false
72
+
73
+ get validity() {
74
+ return this.internals.validity
75
+ }
76
+
77
+ get validationMessage() {
78
+ return this.internals.validationMessage
79
+ }
80
+
81
+ get willValidate() {
82
+ return this.internals.willValidate
83
+ }
84
+
85
+ checkValidity() {
86
+ return this.internals.checkValidity()
87
+ }
88
+
89
+ reportValidity() {
90
+ return this.internals.reportValidity()
91
+ }
92
+
93
+ resetValidity() {
94
+ this.internals.setValidity({})
95
+ }
96
+
97
+ public formDisabledCallback(isDisabled: boolean) {
98
+ this.disabled = isDisabled
99
+ }
100
+
101
+ public formResetCallback() {
102
+ this.hasInteracted = false
103
+ this.resetValidity()
104
+ }
105
+
106
+ public formStateRestoreCallback(_state: string | FormData | null) {
107
+ this.resetValidity()
108
+ }
109
+
110
+ protected abstract setFormValue(): void
111
+ }
112
+
113
+ return FormAssociatedMixinClass as unknown as AbstractConstructor<FormAssociatedMixinType> &
114
+ T
115
+ }
@@ -1,4 +1,4 @@
1
- /* eslint-disable prefer-template,no-param-reassign,no-restricted-syntax,guard-for-in */
1
+ /* eslint-disable no-restricted-syntax */
2
2
 
3
3
  /**
4
4
  * The original lit styleMap directive is not compatible with a strict style-src content security policy.
@@ -0,0 +1,35 @@
1
+ import path from "path"
2
+ import { defineConfig } from "tsdown"
3
+ import { globSync } from "glob"
4
+ import postcssLit from "rollup-plugin-postcss-lit"
5
+
6
+ export const commonConfig = {
7
+ plugins: [postcssLit()],
8
+ define: {
9
+ __LEU_VERSION__: JSON.stringify(process.env.npm_package_version),
10
+ },
11
+ }
12
+
13
+ export default defineConfig({
14
+ entry: {
15
+ index: "src/index.ts",
16
+ ...Object.fromEntries(
17
+ globSync("src/components/*/{[A-Z],leu-}*.ts", { nocase: false }).map(
18
+ (file) => [path.basename(file, path.extname(file)), file],
19
+ ),
20
+ ),
21
+ },
22
+ format: "esm",
23
+ outDir: "dist",
24
+ dts: true,
25
+ clean: true,
26
+ platform: "browser",
27
+ deps: {
28
+ skipNodeModulesBundle: true,
29
+ },
30
+ define: commonConfig.define,
31
+ css: {
32
+ transformer: "postcss",
33
+ },
34
+ plugins: commonConfig.plugins,
35
+ })
@@ -1,7 +1,25 @@
1
1
  import { playwrightLauncher } from "@web/test-runner-playwright"
2
2
  import { esbuildPlugin } from "@web/dev-server-esbuild"
3
+ import { fromRollup } from "@web/dev-server-rollup"
3
4
  import { fileURLToPath } from "url"
4
- import { plugins as wdsPlugins } from "./web-dev-server.config.mjs"
5
+ import rollupReplace from "@rollup/plugin-replace"
6
+ import rollupPostcss from "rollup-plugin-postcss"
7
+ import rollupPostcssLit from "rollup-plugin-postcss-lit"
8
+
9
+ const replace = fromRollup(rollupReplace)
10
+ const postcss = fromRollup(rollupPostcss)
11
+ const postcssLit = fromRollup(rollupPostcssLit)
12
+
13
+ export const plugins = [
14
+ replace({
15
+ preventAssignment: true,
16
+ values: {
17
+ __LEU_VERSION__: JSON.stringify(process.env.npm_package_version),
18
+ },
19
+ }),
20
+ postcss({ inject: false }),
21
+ postcssLit(),
22
+ ]
5
23
 
6
24
  const filteredLogs = ["Couldn't load preload assets", "Lit is in dev mode"]
7
25
 
@@ -14,7 +32,7 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
14
32
  target: "auto",
15
33
  tsconfig: fileURLToPath(new URL("./tsconfig.json", import.meta.url)),
16
34
  }),
17
- ...wdsPlugins,
35
+ ...plugins,
18
36
  ],
19
37
  mimeTypes: {
20
38
  "src/components/**/*.css": "js",
package/.eslintrc.json DELETED
@@ -1,57 +0,0 @@
1
- {
2
- "ignorePatterns": ["scripts/generate-component/templates/**/*"],
3
- "extends": [
4
- "@open-wc",
5
- "prettier",
6
- "plugin:storybook/recommended",
7
- "plugin:@typescript-eslint/recommended"
8
- ],
9
- "parser": "@typescript-eslint/parser",
10
- "plugins": ["@typescript-eslint"],
11
- "rules": {
12
- "@typescript-eslint/no-unused-vars": [
13
- "error",
14
- {
15
- "varsIgnorePattern": "^_",
16
- "argsIgnorePattern": "^_"
17
- }
18
- ],
19
- "prefer-destructuring": [
20
- "error",
21
- {
22
- "AssignmentExpression": {
23
- "array": false
24
- }
25
- }
26
- ],
27
- "no-use-before-define": "off",
28
- "@typescript-eslint/no-use-before-define": "error",
29
- // TODO: Fix this with the upgrade to ESLint 9
30
- "import/no-unresolved": "off"
31
- },
32
- "overrides": [
33
- {
34
- "files": ["**/scripts/**/*.js", "**/scripts/**/*.ts"],
35
- "rules": {
36
- "import/no-extraneous-dependencies": [
37
- "error",
38
- {
39
- "devDependencies": true
40
- }
41
- ],
42
- "no-console": "off"
43
- }
44
- },
45
- {
46
- "files": ["*.test.ts"],
47
- // Chai assertions are possible without a function call
48
- // e.g. expect(someTrueValue).to.be.true;
49
- "rules": {
50
- "@typescript-eslint/no-unused-expressions": "off"
51
- }
52
- }
53
- ],
54
- "globals": {
55
- "__LEU_VERSION__": "readonly"
56
- }
57
- }
@@ -1,151 +0,0 @@
1
- import * as lit_html from 'lit-html';
2
- import * as lit from 'lit';
3
- import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
4
-
5
- type IconPathName = keyof typeof paths;
6
- declare const paths: {
7
- addNew: string;
8
- alert: string;
9
- angleDropDown: string;
10
- angleDropUp: string;
11
- angleLeft: string;
12
- angleRight: string;
13
- arrowDown: string;
14
- arrowLeft: string;
15
- arrowRight: string;
16
- arrowUp: string;
17
- backward: string;
18
- block: string;
19
- calendar: string;
20
- camera: string;
21
- caution: string;
22
- cc: string;
23
- chart: string;
24
- chatMessage: string;
25
- check: string;
26
- clear: string;
27
- close: string;
28
- comment: string;
29
- conference: string;
30
- confirm: string;
31
- confirmPlain: string;
32
- conversation: string;
33
- copy: string;
34
- delete: string;
35
- download: string;
36
- earth: string;
37
- edit: string;
38
- email: string;
39
- file: string;
40
- fileCsv: string;
41
- fileOutline: string;
42
- filePdf: string;
43
- fileXml: string;
44
- files: string;
45
- filter: string;
46
- floppy: string;
47
- folder: string;
48
- forward: string;
49
- getInformation: string;
50
- hide: string;
51
- home: string;
52
- image: string;
53
- income: string;
54
- launch: string;
55
- levelUp: string;
56
- like: string;
57
- link: string;
58
- list: string;
59
- location: string;
60
- lock: string;
61
- login: string;
62
- logout: string;
63
- love: string;
64
- emailOpen: string;
65
- map: string;
66
- mapLocateMe: string;
67
- mapNavigation: string;
68
- mapPin: string;
69
- menu: string;
70
- menuOverflow: string;
71
- minus: string;
72
- money: string;
73
- moneyIncome: string;
74
- organisation: string;
75
- overflow: string;
76
- paperplane: string;
77
- paragraph: string;
78
- passport: string;
79
- phoneCall: string;
80
- piechart: string;
81
- pill: string;
82
- pin: string;
83
- plus: string;
84
- print: string;
85
- refresh: string;
86
- remove: string;
87
- repost: string;
88
- resizeText: string;
89
- ruler: string;
90
- search: string;
91
- securities: string;
92
- setting: string;
93
- share: string;
94
- show: string;
95
- smileyDevastated: string;
96
- smileyIndifferent: string;
97
- smileySad: string;
98
- smileySmile: string;
99
- smileyThrilled: string;
100
- swissId: string;
101
- time: string;
102
- upload: string;
103
- user: string;
104
- userMultiple: string;
105
- vote: string;
106
- zoom: string;
107
- zoomOut: string;
108
- fastForward: string;
109
- fastRewind: string;
110
- fullScreen: string;
111
- next: string;
112
- pause: string;
113
- play: string;
114
- playButton: string;
115
- previous: string;
116
- skipNext: string;
117
- skipPrevious: string;
118
- stop: string;
119
- facebook: string;
120
- google: string;
121
- instagram: string;
122
- kununu: string;
123
- linkedin: string;
124
- snapchat: string;
125
- tiktok: string;
126
- twitter: string;
127
- xing: string;
128
- youtube: string;
129
- youtubeLogo: string;
130
- };
131
-
132
- /**
133
- * A component to render all defined zhWeb icons.
134
- * The `fill` of the icon is set to `currentColor` and
135
- * can be overriden by setting the css `color` property.
136
- * If the icon name is not found, a placeholder will be displayed.
137
- *
138
- * @tagname leu-icon
139
- * @cssprop --leu-icon-size - The size of the icon.
140
- */
141
- declare class LeuIcon extends LeuElement {
142
- static styles: lit.CSSResultGroup[];
143
- /**
144
- * The name of the icon to display.
145
- */
146
- name: IconPathName | "";
147
- render(): lit_html.TemplateResult<1>;
148
- }
149
-
150
- export { LeuIcon as L };
151
- export type { IconPathName as I };
@@ -1,42 +0,0 @@
1
- import { css, LitElement } from 'lit';
2
-
3
- var css_248z = css`:host,
4
- :host * {
5
- box-sizing: border-box;
6
- font-feature-settings: var(--leu-t-font-feature-settings);
7
- }
8
-
9
- /**
10
- * If a custom element sets the display property to any value
11
- * it will not be hidden by the [hidden] attribute.
12
- * That's why we need to specify this rule.
13
- */
14
-
15
- :host([hidden]) {
16
- display: none;
17
- }
18
- `;
19
-
20
- class LeuElement extends LitElement {
21
- static define(name, constructor = this, options = {}) {
22
- Object.entries(this.dependencies).forEach(([n, c]) => c.define(n));
23
- const currentlyRegisteredConstructor = customElements.get(name);
24
- if (currentlyRegisteredConstructor === undefined) {
25
- customElements.define(name, constructor, options);
26
- return;
27
- }
28
- if (currentlyRegisteredConstructor !== constructor) {
29
- console.warn(`The custom element with the name <${name}> is already registered with a different constructor. This can happen when the same element has been loaded from different modules (e.g. multiple CDN requests or bundles).`);
30
- return;
31
- }
32
- if ("version" in currentlyRegisteredConstructor &&
33
- currentlyRegisteredConstructor.version !== constructor.version) {
34
- console.warn(`The custom element with the name <${name}> is already defined with the same constructor but a different version (${currentlyRegisteredConstructor.version}).`);
35
- }
36
- }
37
- }
38
- LeuElement.version = "0.24.2";
39
- LeuElement.dependencies = {};
40
- LeuElement.styles = css_248z;
41
-
42
- export { LeuElement as L };
@@ -1,10 +0,0 @@
1
- import { LitElement, CSSResultGroup } from 'lit';
2
-
3
- declare class LeuElement extends LitElement {
4
- static version: string;
5
- static dependencies: Record<string, typeof LeuElement>;
6
- static styles: CSSResultGroup;
7
- static define(name: string, constructor?: typeof LeuElement, options?: ElementDefinitionOptions): void;
8
- }
9
-
10
- export { LeuElement as L };