@helpwave/hightide 0.1.25 → 0.1.27

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 (664) hide show
  1. package/README.md +1 -1
  2. package/dist/components/branding/HelpwaveBadge.d.mts +4 -5
  3. package/dist/components/branding/HelpwaveBadge.d.ts +4 -5
  4. package/dist/components/branding/HelpwaveBadge.js +46 -87
  5. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  6. package/dist/components/branding/HelpwaveBadge.mjs +46 -89
  7. package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
  8. package/dist/components/date/DatePicker.d.mts +1 -1
  9. package/dist/components/date/DatePicker.d.ts +1 -1
  10. package/dist/components/date/DatePicker.js +65 -14
  11. package/dist/components/date/DatePicker.js.map +1 -1
  12. package/dist/components/date/DatePicker.mjs +66 -15
  13. package/dist/components/date/DatePicker.mjs.map +1 -1
  14. package/dist/components/date/DayPicker.d.mts +1 -1
  15. package/dist/components/date/DayPicker.d.ts +1 -1
  16. package/dist/components/date/DayPicker.js +3 -3
  17. package/dist/components/date/DayPicker.js.map +1 -1
  18. package/dist/components/date/DayPicker.mjs +3 -3
  19. package/dist/components/date/DayPicker.mjs.map +1 -1
  20. package/dist/components/date/TimeDisplay.js.map +1 -1
  21. package/dist/components/date/TimeDisplay.mjs.map +1 -1
  22. package/dist/components/date/TimePicker.js +2 -2
  23. package/dist/components/date/TimePicker.js.map +1 -1
  24. package/dist/components/date/TimePicker.mjs +2 -2
  25. package/dist/components/date/TimePicker.mjs.map +1 -1
  26. package/dist/components/date/YearMonthPicker.js +59 -8
  27. package/dist/components/date/YearMonthPicker.js.map +1 -1
  28. package/dist/components/date/YearMonthPicker.mjs +60 -9
  29. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  30. package/dist/components/{dialogs → dialog}/ConfirmDialog.d.mts +9 -8
  31. package/dist/components/{dialogs → dialog}/ConfirmDialog.d.ts +9 -8
  32. package/dist/components/dialog/ConfirmDialog.js +938 -0
  33. package/dist/components/dialog/ConfirmDialog.js.map +1 -0
  34. package/dist/components/dialog/ConfirmDialog.mjs +902 -0
  35. package/dist/components/dialog/ConfirmDialog.mjs.map +1 -0
  36. package/dist/components/dialog/Dialog.d.mts +27 -0
  37. package/dist/components/dialog/Dialog.d.ts +27 -0
  38. package/dist/components/dialog/Dialog.js +879 -0
  39. package/dist/components/dialog/Dialog.js.map +1 -0
  40. package/dist/components/dialog/Dialog.mjs +845 -0
  41. package/dist/components/dialog/Dialog.mjs.map +1 -0
  42. package/dist/components/dialog/DiscardChangesDialog.d.mts +24 -0
  43. package/dist/components/dialog/DiscardChangesDialog.d.ts +24 -0
  44. package/dist/components/dialog/DiscardChangesDialog.js +966 -0
  45. package/dist/components/dialog/DiscardChangesDialog.js.map +1 -0
  46. package/dist/components/dialog/DiscardChangesDialog.mjs +930 -0
  47. package/dist/components/dialog/DiscardChangesDialog.mjs.map +1 -0
  48. package/dist/components/dialog/InputDialog.d.mts +22 -0
  49. package/dist/components/dialog/InputDialog.d.ts +22 -0
  50. package/dist/components/dialog/InputDialog.js +1139 -0
  51. package/dist/components/dialog/InputDialog.js.map +1 -0
  52. package/dist/components/dialog/InputDialog.mjs +1103 -0
  53. package/dist/components/dialog/InputDialog.mjs.map +1 -0
  54. package/dist/components/dialog/LanguageDialog.d.mts +25 -0
  55. package/dist/components/dialog/LanguageDialog.d.ts +25 -0
  56. package/dist/components/dialog/LanguageDialog.js +1697 -0
  57. package/dist/components/dialog/LanguageDialog.js.map +1 -0
  58. package/dist/components/dialog/LanguageDialog.mjs +1671 -0
  59. package/dist/components/dialog/LanguageDialog.mjs.map +1 -0
  60. package/dist/components/dialog/ThemeDialog.d.mts +26 -0
  61. package/dist/components/dialog/ThemeDialog.d.ts +26 -0
  62. package/dist/components/dialog/ThemeDialog.js +1751 -0
  63. package/dist/components/dialog/ThemeDialog.js.map +1 -0
  64. package/dist/components/dialog/ThemeDialog.mjs +1725 -0
  65. package/dist/components/dialog/ThemeDialog.mjs.map +1 -0
  66. package/dist/components/dialog/index.d.mts +17 -0
  67. package/dist/components/dialog/index.d.ts +17 -0
  68. package/dist/components/dialog/index.js +2098 -0
  69. package/dist/components/dialog/index.js.map +1 -0
  70. package/dist/components/dialog/index.mjs +2067 -0
  71. package/dist/components/dialog/index.mjs.map +1 -0
  72. package/dist/components/form/FormElementWrapper.d.mts +29 -0
  73. package/dist/components/form/FormElementWrapper.d.ts +29 -0
  74. package/dist/components/form/FormElementWrapper.js +98 -0
  75. package/dist/components/form/FormElementWrapper.js.map +1 -0
  76. package/dist/components/form/FormElementWrapper.mjs +64 -0
  77. package/dist/components/form/FormElementWrapper.mjs.map +1 -0
  78. package/dist/components/icons-and-geometry/Avatar.js +498 -2886
  79. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  80. package/dist/components/icons-and-geometry/Avatar.mjs +490 -2878
  81. package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
  82. package/dist/components/icons-and-geometry/{Helpwave.d.mts → HelpwaveLogo.d.mts} +3 -3
  83. package/dist/components/icons-and-geometry/{Helpwave.d.ts → HelpwaveLogo.d.ts} +3 -3
  84. package/dist/components/icons-and-geometry/{Helpwave.js → HelpwaveLogo.js} +21 -22
  85. package/dist/components/icons-and-geometry/HelpwaveLogo.js.map +1 -0
  86. package/dist/components/icons-and-geometry/{Helpwave.mjs → HelpwaveLogo.mjs} +17 -18
  87. package/dist/components/icons-and-geometry/HelpwaveLogo.mjs.map +1 -0
  88. package/dist/components/icons-and-geometry/Ring.js +1 -1
  89. package/dist/components/icons-and-geometry/Ring.js.map +1 -1
  90. package/dist/components/icons-and-geometry/Ring.mjs +1 -1
  91. package/dist/components/icons-and-geometry/Ring.mjs.map +1 -1
  92. package/dist/components/icons-and-geometry/Tag.js +8 -20
  93. package/dist/components/icons-and-geometry/Tag.js.map +1 -1
  94. package/dist/components/icons-and-geometry/Tag.mjs +8 -20
  95. package/dist/components/icons-and-geometry/Tag.mjs.map +1 -1
  96. package/dist/components/layout/Carousel.d.mts +33 -0
  97. package/dist/components/layout/Carousel.d.ts +33 -0
  98. package/dist/components/layout/Carousel.js +684 -0
  99. package/dist/components/layout/Carousel.js.map +1 -0
  100. package/dist/components/layout/Carousel.mjs +659 -0
  101. package/dist/components/layout/Carousel.mjs.map +1 -0
  102. package/dist/components/{layout-and-navigation → layout}/Chip.d.mts +8 -5
  103. package/dist/components/{layout-and-navigation → layout}/Chip.d.ts +8 -5
  104. package/dist/components/{layout-and-navigation → layout}/Chip.js +18 -5
  105. package/dist/components/layout/Chip.js.map +1 -0
  106. package/dist/components/{layout-and-navigation → layout}/Chip.mjs +18 -5
  107. package/dist/components/layout/Chip.mjs.map +1 -0
  108. package/dist/components/{layout-and-navigation → layout}/DividerInserter.js +1 -1
  109. package/dist/components/layout/DividerInserter.js.map +1 -0
  110. package/dist/components/{layout-and-navigation → layout}/DividerInserter.mjs +1 -1
  111. package/dist/components/layout/DividerInserter.mjs.map +1 -0
  112. package/dist/components/{layout-and-navigation → layout}/Expandable.d.mts +13 -10
  113. package/dist/components/{layout-and-navigation → layout}/Expandable.d.ts +13 -10
  114. package/dist/components/{layout-and-navigation → layout}/Expandable.js +20 -7
  115. package/dist/components/layout/Expandable.js.map +1 -0
  116. package/dist/components/{layout-and-navigation → layout}/Expandable.mjs +21 -8
  117. package/dist/components/layout/Expandable.mjs.map +1 -0
  118. package/dist/components/{layout-and-navigation → layout}/FAQSection.js +26 -13
  119. package/dist/components/layout/FAQSection.js.map +1 -0
  120. package/dist/components/{layout-and-navigation → layout}/FAQSection.mjs +27 -14
  121. package/dist/components/layout/FAQSection.mjs.map +1 -0
  122. package/dist/components/layout/FloatingContainer.d.mts +38 -0
  123. package/dist/components/layout/FloatingContainer.d.ts +38 -0
  124. package/dist/components/layout/FloatingContainer.js +219 -0
  125. package/dist/components/layout/FloatingContainer.js.map +1 -0
  126. package/dist/components/layout/FloatingContainer.mjs +195 -0
  127. package/dist/components/layout/FloatingContainer.mjs.map +1 -0
  128. package/dist/components/layout/ListBox.d.mts +44 -0
  129. package/dist/components/layout/ListBox.d.ts +44 -0
  130. package/dist/components/layout/ListBox.js +329 -0
  131. package/dist/components/layout/ListBox.js.map +1 -0
  132. package/dist/components/layout/ListBox.mjs +290 -0
  133. package/dist/components/layout/ListBox.mjs.map +1 -0
  134. package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.js +1 -1
  135. package/dist/components/layout/MarkdownInterpreter.js.map +1 -0
  136. package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.mjs +1 -1
  137. package/dist/components/layout/MarkdownInterpreter.mjs.map +1 -0
  138. package/dist/components/layout/ScrollArea.d.mts +15 -0
  139. package/dist/components/layout/ScrollArea.d.ts +15 -0
  140. package/dist/components/layout/ScrollArea.js +1252 -0
  141. package/dist/components/layout/ScrollArea.js.map +1 -0
  142. package/dist/components/layout/ScrollArea.mjs +1216 -0
  143. package/dist/components/layout/ScrollArea.mjs.map +1 -0
  144. package/dist/components/{layout-and-navigation → layout}/TextImage.js +6 -4
  145. package/dist/components/layout/TextImage.js.map +1 -0
  146. package/dist/components/{layout-and-navigation → layout}/TextImage.mjs +5 -3
  147. package/dist/components/layout/TextImage.mjs.map +1 -0
  148. package/dist/components/{layout-and-navigation → layout}/VerticalDivider.js +1 -1
  149. package/dist/components/layout/VerticalDivider.js.map +1 -0
  150. package/dist/components/{layout-and-navigation → layout}/VerticalDivider.mjs +1 -1
  151. package/dist/components/layout/VerticalDivider.mjs.map +1 -0
  152. package/dist/components/loading-states/ErrorComponent.js.map +1 -1
  153. package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
  154. package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +1 -1
  155. package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +1 -1
  156. package/dist/components/loading-states/LoadingAnimation.js +18 -17
  157. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  158. package/dist/components/loading-states/LoadingAnimation.mjs +18 -17
  159. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  160. package/dist/components/loading-states/LoadingButton.js +55 -18
  161. package/dist/components/loading-states/LoadingButton.js.map +1 -1
  162. package/dist/components/loading-states/LoadingButton.mjs +55 -18
  163. package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
  164. package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.js +668 -23
  165. package/dist/components/navigation/BreadCrumb.js.map +1 -0
  166. package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.mjs +668 -23
  167. package/dist/components/navigation/BreadCrumb.mjs.map +1 -0
  168. package/dist/components/navigation/Navigation.d.mts +21 -0
  169. package/dist/components/navigation/Navigation.d.ts +21 -0
  170. package/dist/components/navigation/Navigation.js +4018 -0
  171. package/dist/components/navigation/Navigation.js.map +1 -0
  172. package/dist/components/navigation/Navigation.mjs +4012 -0
  173. package/dist/components/navigation/Navigation.mjs.map +1 -0
  174. package/dist/components/{layout-and-navigation → navigation}/Pagination.js +107 -192
  175. package/dist/components/navigation/Pagination.js.map +1 -0
  176. package/dist/components/{layout-and-navigation → navigation}/Pagination.mjs +102 -187
  177. package/dist/components/navigation/Pagination.mjs.map +1 -0
  178. package/dist/components/{layout-and-navigation → navigation}/StepperBar.js +44 -4
  179. package/dist/components/navigation/StepperBar.js.map +1 -0
  180. package/dist/components/{layout-and-navigation → navigation}/StepperBar.mjs +44 -4
  181. package/dist/components/navigation/StepperBar.mjs.map +1 -0
  182. package/dist/components/properties/CheckboxProperty.js +890 -135
  183. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  184. package/dist/components/properties/CheckboxProperty.mjs +897 -142
  185. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  186. package/dist/components/properties/DateProperty.js +153 -198
  187. package/dist/components/properties/DateProperty.js.map +1 -1
  188. package/dist/components/properties/DateProperty.mjs +146 -191
  189. package/dist/components/properties/DateProperty.mjs.map +1 -1
  190. package/dist/components/properties/MultiSelectProperty.d.mts +5 -10
  191. package/dist/components/properties/MultiSelectProperty.d.ts +5 -10
  192. package/dist/components/properties/MultiSelectProperty.js +1156 -1160
  193. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  194. package/dist/components/properties/MultiSelectProperty.mjs +1169 -1163
  195. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  196. package/dist/components/properties/NumberProperty.js +155 -201
  197. package/dist/components/properties/NumberProperty.js.map +1 -1
  198. package/dist/components/properties/NumberProperty.mjs +148 -194
  199. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  200. package/dist/components/properties/PropertyBase.js +49 -9
  201. package/dist/components/properties/PropertyBase.js.map +1 -1
  202. package/dist/components/properties/PropertyBase.mjs +49 -9
  203. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  204. package/dist/components/properties/SelectProperty.d.mts +5 -8
  205. package/dist/components/properties/SelectProperty.d.ts +5 -8
  206. package/dist/components/properties/SelectProperty.js +1062 -836
  207. package/dist/components/properties/SelectProperty.js.map +1 -1
  208. package/dist/components/properties/SelectProperty.mjs +1077 -841
  209. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  210. package/dist/components/properties/TextProperty.js +97 -100
  211. package/dist/components/properties/TextProperty.js.map +1 -1
  212. package/dist/components/properties/TextProperty.mjs +100 -103
  213. package/dist/components/properties/TextProperty.mjs.map +1 -1
  214. package/dist/components/table/Table.js +1619 -994
  215. package/dist/components/table/Table.js.map +1 -1
  216. package/dist/components/table/Table.mjs +1626 -1001
  217. package/dist/components/table/Table.mjs.map +1 -1
  218. package/dist/components/table/TableFilterButton.js +116 -201
  219. package/dist/components/table/TableFilterButton.js.map +1 -1
  220. package/dist/components/table/TableFilterButton.mjs +105 -190
  221. package/dist/components/table/TableFilterButton.mjs.map +1 -1
  222. package/dist/components/table/TableSortButton.js +4 -3
  223. package/dist/components/table/TableSortButton.js.map +1 -1
  224. package/dist/components/table/TableSortButton.mjs +4 -3
  225. package/dist/components/table/TableSortButton.mjs.map +1 -1
  226. package/dist/components/user-action/Button.d.mts +15 -11
  227. package/dist/components/user-action/Button.d.ts +15 -11
  228. package/dist/components/user-action/Button.js +10 -9
  229. package/dist/components/user-action/Button.js.map +1 -1
  230. package/dist/components/user-action/Button.mjs +10 -9
  231. package/dist/components/user-action/Button.mjs.map +1 -1
  232. package/dist/components/user-action/Checkbox.d.mts +9 -25
  233. package/dist/components/user-action/Checkbox.d.ts +9 -25
  234. package/dist/components/user-action/Checkbox.js +793 -103
  235. package/dist/components/user-action/Checkbox.js.map +1 -1
  236. package/dist/components/user-action/Checkbox.mjs +794 -104
  237. package/dist/components/user-action/Checkbox.mjs.map +1 -1
  238. package/dist/components/user-action/CopyToClipboardWrapper.js +3 -1
  239. package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
  240. package/dist/components/user-action/CopyToClipboardWrapper.mjs +3 -1
  241. package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
  242. package/dist/components/user-action/DateAndTimePicker.d.mts +1 -1
  243. package/dist/components/user-action/DateAndTimePicker.d.ts +1 -1
  244. package/dist/components/user-action/DateAndTimePicker.js +67 -14
  245. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  246. package/dist/components/user-action/DateAndTimePicker.mjs +68 -15
  247. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  248. package/dist/components/user-action/Label.d.mts +6 -8
  249. package/dist/components/user-action/Label.d.ts +6 -8
  250. package/dist/components/user-action/Label.js +4 -6
  251. package/dist/components/user-action/Label.js.map +1 -1
  252. package/dist/components/user-action/Label.mjs +4 -6
  253. package/dist/components/user-action/Label.mjs.map +1 -1
  254. package/dist/components/user-action/Menu.d.mts +2 -2
  255. package/dist/components/user-action/Menu.d.ts +2 -2
  256. package/dist/components/user-action/Menu.js +1 -1
  257. package/dist/components/user-action/Menu.js.map +1 -1
  258. package/dist/components/user-action/Menu.mjs +1 -1
  259. package/dist/components/user-action/Menu.mjs.map +1 -1
  260. package/dist/components/user-action/ScrollPicker.js +8 -6
  261. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  262. package/dist/components/user-action/ScrollPicker.mjs +8 -6
  263. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  264. package/dist/components/user-action/SearchBar.d.mts +1 -2
  265. package/dist/components/user-action/SearchBar.d.ts +1 -2
  266. package/dist/components/user-action/SearchBar.js +93 -178
  267. package/dist/components/user-action/SearchBar.js.map +1 -1
  268. package/dist/components/user-action/SearchBar.mjs +86 -171
  269. package/dist/components/user-action/SearchBar.mjs.map +1 -1
  270. package/dist/components/user-action/Textarea.d.mts +22 -11
  271. package/dist/components/user-action/Textarea.d.ts +22 -11
  272. package/dist/components/user-action/Textarea.js +101 -92
  273. package/dist/components/user-action/Textarea.js.map +1 -1
  274. package/dist/components/user-action/Textarea.mjs +100 -92
  275. package/dist/components/user-action/Textarea.mjs.map +1 -1
  276. package/dist/components/user-action/input/Input.d.mts +37 -0
  277. package/dist/components/user-action/input/Input.d.ts +37 -0
  278. package/dist/components/user-action/input/Input.js +244 -0
  279. package/dist/components/user-action/input/Input.js.map +1 -0
  280. package/dist/components/user-action/input/Input.mjs +209 -0
  281. package/dist/components/user-action/input/Input.mjs.map +1 -0
  282. package/dist/components/user-action/input/InsideLabelInput.d.mts +20 -0
  283. package/dist/components/user-action/input/InsideLabelInput.d.ts +20 -0
  284. package/dist/components/user-action/input/InsideLabelInput.js +295 -0
  285. package/dist/components/user-action/input/InsideLabelInput.js.map +1 -0
  286. package/dist/components/user-action/input/InsideLabelInput.mjs +260 -0
  287. package/dist/components/user-action/input/InsideLabelInput.mjs.map +1 -0
  288. package/dist/components/user-action/input/ToggleableInput.d.mts +22 -0
  289. package/dist/components/user-action/input/ToggleableInput.d.ts +22 -0
  290. package/dist/components/user-action/{Input.js → input/ToggleableInput.js} +136 -171
  291. package/dist/components/user-action/input/ToggleableInput.js.map +1 -0
  292. package/dist/components/user-action/input/ToggleableInput.mjs +264 -0
  293. package/dist/components/user-action/input/ToggleableInput.mjs.map +1 -0
  294. package/dist/components/user-action/select/Select.d.mts +102 -0
  295. package/dist/components/user-action/select/Select.d.ts +102 -0
  296. package/dist/components/user-action/select/Select.js +1367 -0
  297. package/dist/components/user-action/select/Select.js.map +1 -0
  298. package/dist/components/user-action/select/Select.mjs +1333 -0
  299. package/dist/components/user-action/select/Select.mjs.map +1 -0
  300. package/dist/components/utils/FocusTrap.d.mts +28 -0
  301. package/dist/components/utils/FocusTrap.d.ts +28 -0
  302. package/dist/components/utils/FocusTrap.js +252 -0
  303. package/dist/components/utils/FocusTrap.js.map +1 -0
  304. package/dist/components/utils/FocusTrap.mjs +229 -0
  305. package/dist/components/utils/FocusTrap.mjs.map +1 -0
  306. package/dist/components/utils/Transition.d.mts +26 -0
  307. package/dist/components/utils/Transition.d.ts +26 -0
  308. package/dist/components/utils/Transition.js +74 -0
  309. package/dist/components/utils/Transition.js.map +1 -0
  310. package/dist/components/utils/Transition.mjs +50 -0
  311. package/dist/components/utils/Transition.mjs.map +1 -0
  312. package/dist/hooks/focus/useFocusGuards.d.mts +3 -0
  313. package/dist/hooks/focus/useFocusGuards.d.ts +3 -0
  314. package/dist/hooks/focus/useFocusGuards.js +74 -0
  315. package/dist/hooks/focus/useFocusGuards.js.map +1 -0
  316. package/dist/hooks/focus/useFocusGuards.mjs +50 -0
  317. package/dist/hooks/focus/useFocusGuards.mjs.map +1 -0
  318. package/dist/hooks/{useFocusManagement.js → focus/useFocusManagement.js} +1 -1
  319. package/dist/hooks/focus/useFocusManagement.js.map +1 -0
  320. package/dist/hooks/{useFocusManagement.mjs → focus/useFocusManagement.mjs} +1 -1
  321. package/dist/hooks/focus/useFocusManagement.mjs.map +1 -0
  322. package/dist/hooks/{useFocusOnceVisible.js → focus/useFocusOnceVisible.js} +1 -1
  323. package/dist/hooks/focus/useFocusOnceVisible.js.map +1 -0
  324. package/dist/hooks/{useFocusOnceVisible.mjs → focus/useFocusOnceVisible.mjs} +1 -1
  325. package/dist/hooks/focus/useFocusOnceVisible.mjs.map +1 -0
  326. package/dist/hooks/focus/useFocusTrap.d.mts +16 -0
  327. package/dist/hooks/focus/useFocusTrap.d.ts +16 -0
  328. package/dist/hooks/focus/useFocusTrap.js +233 -0
  329. package/dist/hooks/focus/useFocusTrap.js.map +1 -0
  330. package/dist/hooks/focus/useFocusTrap.mjs +210 -0
  331. package/dist/hooks/focus/useFocusTrap.mjs.map +1 -0
  332. package/dist/hooks/focus/useIsMounted.d.mts +3 -0
  333. package/dist/hooks/focus/useIsMounted.d.ts +3 -0
  334. package/dist/hooks/focus/useIsMounted.js +43 -0
  335. package/dist/hooks/focus/useIsMounted.js.map +1 -0
  336. package/dist/hooks/focus/useIsMounted.mjs +20 -0
  337. package/dist/hooks/focus/useIsMounted.mjs.map +1 -0
  338. package/dist/hooks/useFloatingElement.d.mts +22 -0
  339. package/dist/hooks/useFloatingElement.d.ts +22 -0
  340. package/dist/hooks/useFloatingElement.js +162 -0
  341. package/dist/hooks/useFloatingElement.js.map +1 -0
  342. package/dist/hooks/useFloatingElement.mjs +139 -0
  343. package/dist/hooks/useFloatingElement.mjs.map +1 -0
  344. package/dist/hooks/useLocalStorage.js +2 -2
  345. package/dist/hooks/useLocalStorage.js.map +1 -1
  346. package/dist/hooks/useLocalStorage.mjs +2 -2
  347. package/dist/hooks/useLocalStorage.mjs.map +1 -1
  348. package/dist/hooks/useLogOnce.d.mts +3 -4
  349. package/dist/hooks/useLogOnce.d.ts +3 -4
  350. package/dist/hooks/useLogOnce.js +5 -5
  351. package/dist/hooks/useLogOnce.js.map +1 -1
  352. package/dist/hooks/useLogOnce.mjs +5 -5
  353. package/dist/hooks/useLogOnce.mjs.map +1 -1
  354. package/dist/hooks/useRerender.d.mts +2 -2
  355. package/dist/hooks/useRerender.d.ts +2 -2
  356. package/dist/hooks/useSearch.d.mts +2 -2
  357. package/dist/hooks/useSearch.d.ts +2 -2
  358. package/dist/hooks/useSearch.js +1 -1
  359. package/dist/hooks/useSearch.js.map +1 -1
  360. package/dist/hooks/useSearch.mjs +1 -1
  361. package/dist/hooks/useSearch.mjs.map +1 -1
  362. package/dist/localization/LanguageProvider.d.mts +2 -2
  363. package/dist/localization/LanguageProvider.d.ts +2 -2
  364. package/dist/localization/LanguageProvider.js +2 -2
  365. package/dist/localization/LanguageProvider.js.map +1 -1
  366. package/dist/localization/LanguageProvider.mjs +2 -2
  367. package/dist/localization/LanguageProvider.mjs.map +1 -1
  368. package/dist/localization/defaults/form.d.mts +1 -0
  369. package/dist/localization/defaults/form.d.ts +1 -0
  370. package/dist/localization/defaults/form.js +2 -0
  371. package/dist/localization/defaults/form.js.map +1 -1
  372. package/dist/localization/defaults/form.mjs +2 -0
  373. package/dist/localization/defaults/form.mjs.map +1 -1
  374. package/dist/localization/useTranslation.js.map +1 -1
  375. package/dist/localization/useTranslation.mjs.map +1 -1
  376. package/dist/storybook/helper.d.mts +17 -0
  377. package/dist/storybook/helper.d.ts +17 -0
  378. package/dist/storybook/helper.js +61 -0
  379. package/dist/storybook/helper.js.map +1 -0
  380. package/dist/storybook/helper.mjs +37 -0
  381. package/dist/storybook/helper.mjs.map +1 -0
  382. package/dist/{css → style}/globals.css +836 -378
  383. package/dist/{css → style}/uncompiled/globals.css +80 -17
  384. package/dist/{css → style}/uncompiled/theme/colors-component.css +18 -4
  385. package/dist/{css → style}/uncompiled/theme/colors-semantic.css +2 -9
  386. package/dist/style/uncompiled/typography.css +171 -0
  387. package/dist/{css → style}/uncompiled/utitlity/animation.css +54 -42
  388. package/dist/{css → style}/uncompiled/utitlity/index.css +2 -1
  389. package/dist/{css → style}/uncompiled/utitlity/shadow.css +9 -1
  390. package/dist/style/uncompiled/utitlity/sizing.css +29 -0
  391. package/dist/theming/useTheme.d.mts +5 -3
  392. package/dist/theming/useTheme.d.ts +5 -3
  393. package/dist/theming/useTheme.js +42 -19
  394. package/dist/theming/useTheme.js.map +1 -1
  395. package/dist/theming/useTheme.mjs +40 -17
  396. package/dist/theming/useTheme.mjs.map +1 -1
  397. package/dist/{util → utils}/array.d.mts +1 -0
  398. package/dist/{util → utils}/array.d.ts +1 -0
  399. package/dist/{util → utils}/array.js +15 -2
  400. package/dist/utils/array.js.map +1 -0
  401. package/dist/{util → utils}/array.mjs +15 -2
  402. package/dist/utils/array.mjs.map +1 -0
  403. package/dist/utils/bagFunctions.d.mts +15 -0
  404. package/dist/utils/bagFunctions.d.ts +15 -0
  405. package/dist/{util/PropsWithFunctionChildren.js → utils/bagFunctions.js} +5 -5
  406. package/dist/utils/bagFunctions.js.map +1 -0
  407. package/dist/{util/PropsWithFunctionChildren.mjs → utils/bagFunctions.mjs} +2 -2
  408. package/dist/utils/bagFunctions.mjs.map +1 -0
  409. package/dist/{util → utils}/builder.js +1 -1
  410. package/dist/utils/builder.js.map +1 -0
  411. package/dist/{util → utils}/builder.mjs +1 -1
  412. package/dist/utils/builder.mjs.map +1 -0
  413. package/dist/{util → utils}/date.js +3 -3
  414. package/dist/utils/date.js.map +1 -0
  415. package/dist/{util → utils}/date.mjs +2 -2
  416. package/dist/utils/date.mjs.map +1 -0
  417. package/dist/{util → utils}/easeFunctions.js +5 -4
  418. package/dist/utils/easeFunctions.js.map +1 -0
  419. package/dist/{util → utils}/easeFunctions.mjs +4 -3
  420. package/dist/utils/easeFunctions.mjs.map +1 -0
  421. package/dist/{util → utils}/emailValidation.js +1 -1
  422. package/dist/utils/emailValidation.js.map +1 -0
  423. package/dist/{util → utils}/emailValidation.mjs +1 -1
  424. package/dist/utils/emailValidation.mjs.map +1 -0
  425. package/dist/{util → utils}/loopingArray.js +1 -1
  426. package/dist/utils/loopingArray.js.map +1 -0
  427. package/dist/{util → utils}/loopingArray.mjs +1 -1
  428. package/dist/utils/loopingArray.mjs.map +1 -0
  429. package/dist/utils/match.d.mts +3 -0
  430. package/dist/utils/match.d.ts +3 -0
  431. package/dist/utils/match.js +32 -0
  432. package/dist/utils/match.js.map +1 -0
  433. package/dist/utils/match.mjs +8 -0
  434. package/dist/utils/match.mjs.map +1 -0
  435. package/dist/utils/math.d.mts +3 -0
  436. package/dist/utils/math.d.ts +3 -0
  437. package/dist/{util → utils}/math.js +3 -2
  438. package/dist/utils/math.js.map +1 -0
  439. package/dist/utils/math.mjs +9 -0
  440. package/dist/utils/math.mjs.map +1 -0
  441. package/dist/{util → utils}/noop.js +1 -1
  442. package/dist/utils/noop.js.map +1 -0
  443. package/dist/utils/noop.mjs +6 -0
  444. package/dist/utils/noop.mjs.map +1 -0
  445. package/dist/{util → utils}/resolveSetState.js +1 -1
  446. package/dist/utils/resolveSetState.js.map +1 -0
  447. package/dist/{util → utils}/resolveSetState.mjs +1 -1
  448. package/dist/utils/resolveSetState.mjs.map +1 -0
  449. package/dist/{util → utils}/simpleSearch.js +1 -1
  450. package/dist/utils/simpleSearch.js.map +1 -0
  451. package/dist/{util → utils}/simpleSearch.mjs +1 -1
  452. package/dist/utils/simpleSearch.mjs.map +1 -0
  453. package/dist/{util → utils}/storage.js +1 -1
  454. package/dist/utils/storage.js.map +1 -0
  455. package/dist/{util → utils}/storage.mjs +1 -1
  456. package/dist/utils/storage.mjs.map +1 -0
  457. package/dist/{util → utils}/writeToClipboard.js +2 -1
  458. package/dist/utils/writeToClipboard.js.map +1 -0
  459. package/dist/{util → utils}/writeToClipboard.mjs +3 -1
  460. package/dist/utils/writeToClipboard.mjs.map +1 -0
  461. package/package.json +8 -8
  462. package/dist/components/dialogs/ConfirmDialog.js +0 -674
  463. package/dist/components/dialogs/ConfirmDialog.js.map +0 -1
  464. package/dist/components/dialogs/ConfirmDialog.mjs +0 -638
  465. package/dist/components/dialogs/ConfirmDialog.mjs.map +0 -1
  466. package/dist/components/icons-and-geometry/Helpwave.js.map +0 -1
  467. package/dist/components/icons-and-geometry/Helpwave.mjs.map +0 -1
  468. package/dist/components/layout-and-navigation/BreadCrumb.js.map +0 -1
  469. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +0 -1
  470. package/dist/components/layout-and-navigation/Carousel.d.mts +0 -25
  471. package/dist/components/layout-and-navigation/Carousel.d.ts +0 -25
  472. package/dist/components/layout-and-navigation/Carousel.js +0 -641
  473. package/dist/components/layout-and-navigation/Carousel.js.map +0 -1
  474. package/dist/components/layout-and-navigation/Carousel.mjs +0 -607
  475. package/dist/components/layout-and-navigation/Carousel.mjs.map +0 -1
  476. package/dist/components/layout-and-navigation/Chip.js.map +0 -1
  477. package/dist/components/layout-and-navigation/Chip.mjs.map +0 -1
  478. package/dist/components/layout-and-navigation/DividerInserter.js.map +0 -1
  479. package/dist/components/layout-and-navigation/DividerInserter.mjs.map +0 -1
  480. package/dist/components/layout-and-navigation/Expandable.js.map +0 -1
  481. package/dist/components/layout-and-navigation/Expandable.mjs.map +0 -1
  482. package/dist/components/layout-and-navigation/FAQSection.js.map +0 -1
  483. package/dist/components/layout-and-navigation/FAQSection.mjs.map +0 -1
  484. package/dist/components/layout-and-navigation/MarkdownInterpreter.js.map +0 -1
  485. package/dist/components/layout-and-navigation/MarkdownInterpreter.mjs.map +0 -1
  486. package/dist/components/layout-and-navigation/Overlay.d.mts +0 -67
  487. package/dist/components/layout-and-navigation/Overlay.d.ts +0 -67
  488. package/dist/components/layout-and-navigation/Overlay.js +0 -702
  489. package/dist/components/layout-and-navigation/Overlay.js.map +0 -1
  490. package/dist/components/layout-and-navigation/Overlay.mjs +0 -665
  491. package/dist/components/layout-and-navigation/Overlay.mjs.map +0 -1
  492. package/dist/components/layout-and-navigation/Pagination.js.map +0 -1
  493. package/dist/components/layout-and-navigation/Pagination.mjs.map +0 -1
  494. package/dist/components/layout-and-navigation/SearchableList.d.mts +0 -24
  495. package/dist/components/layout-and-navigation/SearchableList.d.ts +0 -24
  496. package/dist/components/layout-and-navigation/SearchableList.js +0 -758
  497. package/dist/components/layout-and-navigation/SearchableList.js.map +0 -1
  498. package/dist/components/layout-and-navigation/SearchableList.mjs +0 -724
  499. package/dist/components/layout-and-navigation/SearchableList.mjs.map +0 -1
  500. package/dist/components/layout-and-navigation/StepperBar.js.map +0 -1
  501. package/dist/components/layout-and-navigation/StepperBar.mjs.map +0 -1
  502. package/dist/components/layout-and-navigation/TextImage.js.map +0 -1
  503. package/dist/components/layout-and-navigation/TextImage.mjs.map +0 -1
  504. package/dist/components/layout-and-navigation/Tile.d.mts +0 -27
  505. package/dist/components/layout-and-navigation/Tile.d.ts +0 -27
  506. package/dist/components/layout-and-navigation/Tile.js +0 -96
  507. package/dist/components/layout-and-navigation/Tile.js.map +0 -1
  508. package/dist/components/layout-and-navigation/Tile.mjs +0 -61
  509. package/dist/components/layout-and-navigation/Tile.mjs.map +0 -1
  510. package/dist/components/layout-and-navigation/VerticalDivider.js.map +0 -1
  511. package/dist/components/layout-and-navigation/VerticalDivider.mjs.map +0 -1
  512. package/dist/components/modals/ConfirmModal.d.mts +0 -33
  513. package/dist/components/modals/ConfirmModal.d.ts +0 -33
  514. package/dist/components/modals/ConfirmModal.js +0 -687
  515. package/dist/components/modals/ConfirmModal.js.map +0 -1
  516. package/dist/components/modals/ConfirmModal.mjs +0 -651
  517. package/dist/components/modals/ConfirmModal.mjs.map +0 -1
  518. package/dist/components/modals/DiscardChangesModal.d.mts +0 -20
  519. package/dist/components/modals/DiscardChangesModal.d.ts +0 -20
  520. package/dist/components/modals/DiscardChangesModal.js +0 -717
  521. package/dist/components/modals/DiscardChangesModal.js.map +0 -1
  522. package/dist/components/modals/DiscardChangesModal.mjs +0 -681
  523. package/dist/components/modals/DiscardChangesModal.mjs.map +0 -1
  524. package/dist/components/modals/InputModal.d.mts +0 -21
  525. package/dist/components/modals/InputModal.d.ts +0 -21
  526. package/dist/components/modals/InputModal.js +0 -976
  527. package/dist/components/modals/InputModal.js.map +0 -1
  528. package/dist/components/modals/InputModal.mjs +0 -940
  529. package/dist/components/modals/InputModal.mjs.map +0 -1
  530. package/dist/components/modals/LanguageModal.d.mts +0 -21
  531. package/dist/components/modals/LanguageModal.d.ts +0 -21
  532. package/dist/components/modals/LanguageModal.js +0 -1468
  533. package/dist/components/modals/LanguageModal.js.map +0 -1
  534. package/dist/components/modals/LanguageModal.mjs +0 -1432
  535. package/dist/components/modals/LanguageModal.mjs.map +0 -1
  536. package/dist/components/modals/ThemeModal.d.mts +0 -21
  537. package/dist/components/modals/ThemeModal.d.ts +0 -21
  538. package/dist/components/modals/ThemeModal.js +0 -1497
  539. package/dist/components/modals/ThemeModal.js.map +0 -1
  540. package/dist/components/modals/ThemeModal.mjs +0 -1461
  541. package/dist/components/modals/ThemeModal.mjs.map +0 -1
  542. package/dist/components/user-action/Input.d.mts +0 -77
  543. package/dist/components/user-action/Input.d.ts +0 -77
  544. package/dist/components/user-action/Input.js.map +0 -1
  545. package/dist/components/user-action/Input.mjs +0 -298
  546. package/dist/components/user-action/Input.mjs.map +0 -1
  547. package/dist/components/user-action/MultiSelect.d.mts +0 -42
  548. package/dist/components/user-action/MultiSelect.d.ts +0 -42
  549. package/dist/components/user-action/MultiSelect.js +0 -1468
  550. package/dist/components/user-action/MultiSelect.js.map +0 -1
  551. package/dist/components/user-action/MultiSelect.mjs +0 -1433
  552. package/dist/components/user-action/MultiSelect.mjs.map +0 -1
  553. package/dist/components/user-action/Select.d.mts +0 -41
  554. package/dist/components/user-action/Select.d.ts +0 -41
  555. package/dist/components/user-action/Select.js +0 -1236
  556. package/dist/components/user-action/Select.js.map +0 -1
  557. package/dist/components/user-action/Select.mjs +0 -1201
  558. package/dist/components/user-action/Select.mjs.map +0 -1
  559. package/dist/components/user-action/ToggleableInput.d.mts +0 -37
  560. package/dist/components/user-action/ToggleableInput.d.ts +0 -37
  561. package/dist/components/user-action/ToggleableInput.js +0 -192
  562. package/dist/components/user-action/ToggleableInput.js.map +0 -1
  563. package/dist/components/user-action/ToggleableInput.mjs +0 -157
  564. package/dist/components/user-action/ToggleableInput.mjs.map +0 -1
  565. package/dist/css/uncompiled/textstyles.css +0 -69
  566. package/dist/hooks/useFocusManagement.js.map +0 -1
  567. package/dist/hooks/useFocusManagement.mjs.map +0 -1
  568. package/dist/hooks/useFocusOnceVisible.js.map +0 -1
  569. package/dist/hooks/useFocusOnceVisible.mjs.map +0 -1
  570. package/dist/index.d.mts +0 -103
  571. package/dist/index.d.ts +0 -103
  572. package/dist/index.js +0 -12610
  573. package/dist/index.js.map +0 -1
  574. package/dist/index.mjs +0 -12447
  575. package/dist/index.mjs.map +0 -1
  576. package/dist/util/PropsWithFunctionChildren.d.mts +0 -14
  577. package/dist/util/PropsWithFunctionChildren.d.ts +0 -14
  578. package/dist/util/PropsWithFunctionChildren.js.map +0 -1
  579. package/dist/util/PropsWithFunctionChildren.mjs.map +0 -1
  580. package/dist/util/array.js.map +0 -1
  581. package/dist/util/array.mjs.map +0 -1
  582. package/dist/util/builder.js.map +0 -1
  583. package/dist/util/builder.mjs.map +0 -1
  584. package/dist/util/date.js.map +0 -1
  585. package/dist/util/date.mjs.map +0 -1
  586. package/dist/util/easeFunctions.js.map +0 -1
  587. package/dist/util/easeFunctions.mjs.map +0 -1
  588. package/dist/util/emailValidation.js.map +0 -1
  589. package/dist/util/emailValidation.mjs.map +0 -1
  590. package/dist/util/loopingArray.js.map +0 -1
  591. package/dist/util/loopingArray.mjs.map +0 -1
  592. package/dist/util/math.d.mts +0 -3
  593. package/dist/util/math.d.ts +0 -3
  594. package/dist/util/math.js.map +0 -1
  595. package/dist/util/math.mjs +0 -8
  596. package/dist/util/math.mjs.map +0 -1
  597. package/dist/util/news.d.mts +0 -101
  598. package/dist/util/news.d.ts +0 -101
  599. package/dist/util/news.js +0 -76
  600. package/dist/util/news.js.map +0 -1
  601. package/dist/util/news.mjs +0 -49
  602. package/dist/util/news.mjs.map +0 -1
  603. package/dist/util/noop.js.map +0 -1
  604. package/dist/util/noop.mjs +0 -6
  605. package/dist/util/noop.mjs.map +0 -1
  606. package/dist/util/resolveSetState.js.map +0 -1
  607. package/dist/util/resolveSetState.mjs.map +0 -1
  608. package/dist/util/simpleSearch.js.map +0 -1
  609. package/dist/util/simpleSearch.mjs.map +0 -1
  610. package/dist/util/storage.js.map +0 -1
  611. package/dist/util/storage.mjs.map +0 -1
  612. package/dist/util/types.d.mts +0 -3
  613. package/dist/util/types.d.ts +0 -3
  614. package/dist/util/types.js +0 -18
  615. package/dist/util/types.js.map +0 -1
  616. package/dist/util/types.mjs +0 -1
  617. package/dist/util/types.mjs.map +0 -1
  618. package/dist/util/writeToClipboard.js.map +0 -1
  619. package/dist/util/writeToClipboard.mjs.map +0 -1
  620. /package/dist/components/{layout-and-navigation → layout}/DividerInserter.d.mts +0 -0
  621. /package/dist/components/{layout-and-navigation → layout}/DividerInserter.d.ts +0 -0
  622. /package/dist/components/{layout-and-navigation → layout}/FAQSection.d.mts +0 -0
  623. /package/dist/components/{layout-and-navigation → layout}/FAQSection.d.ts +0 -0
  624. /package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.d.mts +0 -0
  625. /package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.d.ts +0 -0
  626. /package/dist/components/{layout-and-navigation → layout}/TextImage.d.mts +0 -0
  627. /package/dist/components/{layout-and-navigation → layout}/TextImage.d.ts +0 -0
  628. /package/dist/components/{layout-and-navigation → layout}/VerticalDivider.d.mts +0 -0
  629. /package/dist/components/{layout-and-navigation → layout}/VerticalDivider.d.ts +0 -0
  630. /package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.d.mts +0 -0
  631. /package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.d.ts +0 -0
  632. /package/dist/components/{layout-and-navigation → navigation}/Pagination.d.mts +0 -0
  633. /package/dist/components/{layout-and-navigation → navigation}/Pagination.d.ts +0 -0
  634. /package/dist/components/{layout-and-navigation → navigation}/StepperBar.d.mts +0 -0
  635. /package/dist/components/{layout-and-navigation → navigation}/StepperBar.d.ts +0 -0
  636. /package/dist/hooks/{useFocusManagement.d.mts → focus/useFocusManagement.d.mts} +0 -0
  637. /package/dist/hooks/{useFocusManagement.d.ts → focus/useFocusManagement.d.ts} +0 -0
  638. /package/dist/hooks/{useFocusOnceVisible.d.mts → focus/useFocusOnceVisible.d.mts} +0 -0
  639. /package/dist/hooks/{useFocusOnceVisible.d.ts → focus/useFocusOnceVisible.d.ts} +0 -0
  640. /package/dist/{css → style}/uncompiled/theme/colors-basic.css +0 -0
  641. /package/dist/{css → style}/uncompiled/theme/index.css +0 -0
  642. /package/dist/{css → style}/uncompiled/theme/variants.css +0 -0
  643. /package/dist/{css → style}/uncompiled/utitlity/borderradius.css +0 -0
  644. /package/dist/{css → style}/uncompiled/utitlity/general.css +0 -0
  645. /package/dist/{util → utils}/builder.d.mts +0 -0
  646. /package/dist/{util → utils}/builder.d.ts +0 -0
  647. /package/dist/{util → utils}/date.d.mts +0 -0
  648. /package/dist/{util → utils}/date.d.ts +0 -0
  649. /package/dist/{util → utils}/easeFunctions.d.mts +0 -0
  650. /package/dist/{util → utils}/easeFunctions.d.ts +0 -0
  651. /package/dist/{util → utils}/emailValidation.d.mts +0 -0
  652. /package/dist/{util → utils}/emailValidation.d.ts +0 -0
  653. /package/dist/{util → utils}/loopingArray.d.mts +0 -0
  654. /package/dist/{util → utils}/loopingArray.d.ts +0 -0
  655. /package/dist/{util → utils}/noop.d.mts +0 -0
  656. /package/dist/{util → utils}/noop.d.ts +0 -0
  657. /package/dist/{util → utils}/resolveSetState.d.mts +0 -0
  658. /package/dist/{util → utils}/resolveSetState.d.ts +0 -0
  659. /package/dist/{util → utils}/simpleSearch.d.mts +0 -0
  660. /package/dist/{util → utils}/simpleSearch.d.ts +0 -0
  661. /package/dist/{util → utils}/storage.d.mts +0 -0
  662. /package/dist/{util → utils}/storage.d.ts +0 -0
  663. /package/dist/{util → utils}/writeToClipboard.d.mts +0 -0
  664. /package/dist/{util → utils}/writeToClipboard.d.ts +0 -0
@@ -0,0 +1,2098 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/dialog/index.ts
30
+ var dialog_exports = {};
31
+ __export(dialog_exports, {
32
+ ConfirmDialog: () => ConfirmDialog,
33
+ Dialog: () => Dialog,
34
+ DiscardChangesDialog: () => DiscardChangesDialog,
35
+ InputDialog: () => InputDialog,
36
+ LanguageDialog: () => LanguageDialog,
37
+ ThemeDialog: () => ThemeDialog
38
+ });
39
+ module.exports = __toCommonJS(dialog_exports);
40
+
41
+ // src/components/user-action/Button.tsx
42
+ var import_react = require("react");
43
+ var import_clsx = __toESM(require("clsx"));
44
+ var import_jsx_runtime = require("react/jsx-runtime");
45
+ var ButtonColorUtil = {
46
+ solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
47
+ text: ["primary", "negative", "neutral"],
48
+ outline: ["primary"]
49
+ };
50
+ var IconButtonUtil = {
51
+ icon: [...ButtonColorUtil.solid, "transparent"]
52
+ };
53
+ var paddingMapping = {
54
+ small: "btn-sm",
55
+ medium: "btn-md",
56
+ large: "btn-lg"
57
+ };
58
+ var iconPaddingMapping = {
59
+ tiny: "icon-btn-xs",
60
+ small: "icon-btn-sm",
61
+ medium: "icon-btn-md",
62
+ large: "icon-btn-lg"
63
+ };
64
+ var ButtonUtil = {
65
+ paddingMapping,
66
+ iconPaddingMapping
67
+ };
68
+ var SolidButton = (0, import_react.forwardRef)(function SolidButton2({
69
+ children,
70
+ color = "primary",
71
+ size = "medium",
72
+ startIcon,
73
+ endIcon,
74
+ onClick,
75
+ className,
76
+ ...restProps
77
+ }, ref) {
78
+ const colorClasses = {
79
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
80
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
81
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
82
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
83
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
84
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
85
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
86
+ }[color];
87
+ const iconColorClasses = {
88
+ primary: "not-group-disabled:text-button-solid-primary-icon",
89
+ secondary: "not-group-disabled:text-button-solid-secondary-icon",
90
+ tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
91
+ positive: "not-group-disabled:text-button-solid-positive-icon",
92
+ warning: "not-group-disabled:text-button-solid-warning-icon",
93
+ negative: "not-group-disabled:text-button-solid-negative-icon",
94
+ neutral: "not-group-disabled:text-button-solid-neutral-icon"
95
+ }[color];
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
97
+ "button",
98
+ {
99
+ ref,
100
+ onClick,
101
+ className: (0, import_clsx.default)(
102
+ "group font-semibold",
103
+ colorClasses,
104
+ "not-disabled:hover:brightness-90",
105
+ "disabled:text-disabled-text disabled:bg-disabled-background",
106
+ ButtonUtil.paddingMapping[size],
107
+ className
108
+ ),
109
+ ...restProps,
110
+ children: [
111
+ startIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
112
+ "span",
113
+ {
114
+ className: (0, import_clsx.default)(
115
+ iconColorClasses,
116
+ "group-disabled:text-disabled-icon"
117
+ ),
118
+ children: startIcon
119
+ }
120
+ ),
121
+ children,
122
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
123
+ "span",
124
+ {
125
+ className: (0, import_clsx.default)(
126
+ iconColorClasses,
127
+ "group-disabled:text-disabled-icon"
128
+ ),
129
+ children: endIcon
130
+ }
131
+ )
132
+ ]
133
+ }
134
+ );
135
+ });
136
+ var IconButton = (0, import_react.forwardRef)(function IconButton2({
137
+ children,
138
+ color = "primary",
139
+ size = "medium",
140
+ className,
141
+ ...restProps
142
+ }, ref) {
143
+ const colorClasses = {
144
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
145
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
146
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
147
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
148
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
149
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
150
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
151
+ transparent: "not-disabled:bg-transparent"
152
+ }[color];
153
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
154
+ "button",
155
+ {
156
+ ref,
157
+ className: (0, import_clsx.default)(
158
+ colorClasses,
159
+ "not-disabled:hover:brightness-90",
160
+ "disabled:text-disabled-text",
161
+ {
162
+ "disabled:bg-disabled-background": color !== "transparent",
163
+ "disabled:opacity-70": color === "transparent",
164
+ "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
165
+ },
166
+ ButtonUtil.iconPaddingMapping[size],
167
+ className
168
+ ),
169
+ ...restProps,
170
+ children
171
+ }
172
+ );
173
+ });
174
+
175
+ // src/localization/LanguageProvider.tsx
176
+ var import_react3 = require("react");
177
+
178
+ // src/hooks/useLocalStorage.ts
179
+ var import_react2 = require("react");
180
+
181
+ // src/localization/util.ts
182
+ var languages = ["en", "de"];
183
+ var languagesLocalNames = {
184
+ en: "English",
185
+ de: "Deutsch"
186
+ };
187
+ var DEFAULT_LANGUAGE = "en";
188
+ var LanguageUtil = {
189
+ languages,
190
+ DEFAULT_LANGUAGE,
191
+ languagesLocalNames
192
+ };
193
+
194
+ // src/localization/LanguageProvider.tsx
195
+ var import_jsx_runtime2 = require("react/jsx-runtime");
196
+ var LanguageContext = (0, import_react3.createContext)({
197
+ language: LanguageUtil.DEFAULT_LANGUAGE,
198
+ setLanguage: (v) => v
199
+ });
200
+ var useLanguage = () => (0, import_react3.useContext)(LanguageContext);
201
+
202
+ // src/localization/useTranslation.ts
203
+ var TranslationPluralCount = {
204
+ zero: 0,
205
+ one: 1,
206
+ two: 2,
207
+ few: 3,
208
+ many: 11,
209
+ other: -1
210
+ };
211
+ var useTranslation = (translations, overwriteTranslation = {}) => {
212
+ const { language: languageProp, translation: overwrite } = overwriteTranslation;
213
+ const { language: inferredLanguage } = useLanguage();
214
+ const usedLanguage = languageProp ?? inferredLanguage;
215
+ const usedTranslations = [...translations];
216
+ if (overwrite) {
217
+ usedTranslations.push(overwrite);
218
+ }
219
+ return (key, options) => {
220
+ const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
221
+ try {
222
+ for (let i = translations.length - 1; i >= 0; i--) {
223
+ const translation = translations[i];
224
+ const localizedTranslation = translation[usedLanguage];
225
+ if (!localizedTranslation) {
226
+ continue;
227
+ }
228
+ const value = localizedTranslation[key];
229
+ if (!value) {
230
+ continue;
231
+ }
232
+ let forProcessing;
233
+ if (typeof value !== "string") {
234
+ if (count === TranslationPluralCount.zero && value?.zero) {
235
+ forProcessing = value.zero;
236
+ } else if (count === TranslationPluralCount.one && value?.one) {
237
+ forProcessing = value.one;
238
+ } else if (count === TranslationPluralCount.two && value?.two) {
239
+ forProcessing = value.two;
240
+ } else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
241
+ forProcessing = value.few;
242
+ } else if (count > TranslationPluralCount.many && value?.many) {
243
+ forProcessing = value.many;
244
+ } else {
245
+ forProcessing = value.other;
246
+ }
247
+ } else {
248
+ forProcessing = value;
249
+ }
250
+ forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
251
+ return replacements[placeholder] ?? `{{key:${placeholder}}}`;
252
+ });
253
+ return forProcessing;
254
+ }
255
+ } catch (e) {
256
+ console.error(e);
257
+ }
258
+ return `{{${usedLanguage}:${key}}}`;
259
+ };
260
+ };
261
+
262
+ // src/components/dialog/ConfirmDialog.tsx
263
+ var import_clsx4 = __toESM(require("clsx"));
264
+
265
+ // src/components/dialog/Dialog.tsx
266
+ var import_react9 = require("react");
267
+ var import_clsx3 = __toESM(require("clsx"));
268
+ var import_lucide_react = require("lucide-react");
269
+
270
+ // src/localization/defaults/form.ts
271
+ var formTranslation = {
272
+ en: {
273
+ add: "Add",
274
+ all: "All",
275
+ apply: "Apply",
276
+ back: "Back",
277
+ cancel: "Cancel",
278
+ change: "Change",
279
+ clear: "Clear",
280
+ click: "Click",
281
+ clickToCopy: "Click to Copy",
282
+ close: "Close",
283
+ confirm: "Confirm",
284
+ copy: "Copy",
285
+ copied: "Copied",
286
+ create: "Create",
287
+ decline: "Decline",
288
+ delete: "Delete",
289
+ discard: "Discard",
290
+ discardChanges: "Discard Changes",
291
+ done: "Done",
292
+ edit: "Edit",
293
+ enterText: "Enter text here",
294
+ error: "Error",
295
+ exit: "Exit",
296
+ fieldRequiredError: "This field is required.",
297
+ invalidEmailError: "Please enter a valid email address.",
298
+ less: "Less",
299
+ loading: "Loading",
300
+ maxLengthError: "Maximum length exceeded.",
301
+ minLengthError: "Minimum length not met.",
302
+ more: "More",
303
+ next: "Next",
304
+ no: "No",
305
+ none: "None",
306
+ nothingFound: "Nothing found",
307
+ of: "of",
308
+ optional: "Optional",
309
+ pleaseWait: "Please wait...",
310
+ previous: "Previous",
311
+ remove: "Remove",
312
+ required: "Required",
313
+ reset: "Reset",
314
+ save: "Save",
315
+ saved: "Saved",
316
+ search: "Search",
317
+ select: "Select",
318
+ selectOption: "Select an option",
319
+ show: "Show",
320
+ showMore: "Show more",
321
+ showLess: "Show less",
322
+ submit: "Submit",
323
+ success: "Success",
324
+ update: "Update",
325
+ unsavedChanges: "Unsaved Changes",
326
+ unsavedChangesSaveQuestion: "Do you want to save your changes?",
327
+ yes: "Yes"
328
+ },
329
+ de: {
330
+ add: "Hinzuf\xFCgen",
331
+ all: "Alle",
332
+ apply: "Anwenden",
333
+ back: "Zur\xFCck",
334
+ cancel: "Abbrechen",
335
+ change: "\xC4ndern",
336
+ clear: "L\xF6schen",
337
+ click: "Klicken",
338
+ clickToCopy: "Zum kopieren klicken",
339
+ close: "Schlie\xDFen",
340
+ confirm: "Best\xE4tigen",
341
+ copy: "Kopieren",
342
+ copied: "Kopiert",
343
+ create: "Erstellen",
344
+ decline: "Ablehnen",
345
+ delete: "L\xF6schen",
346
+ discard: "Verwerfen",
347
+ discardChanges: "\xC4nderungen Verwerfen",
348
+ done: "Fertig",
349
+ edit: "Bearbeiten",
350
+ enterText: "Text hier eingeben",
351
+ error: "Fehler",
352
+ exit: "Beenden",
353
+ fieldRequiredError: "Dieses Feld ist erforderlich.",
354
+ invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
355
+ less: "Weniger",
356
+ loading: "L\xE4dt",
357
+ maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
358
+ minLengthError: "Mindestl\xE4nge nicht erreicht.",
359
+ more: "Mehr",
360
+ next: "Weiter",
361
+ no: "Nein",
362
+ none: "Nichts",
363
+ nothingFound: "Nichts gefunden",
364
+ of: "von",
365
+ optional: "Optional",
366
+ pleaseWait: "Bitte warten...",
367
+ previous: "Vorherige",
368
+ remove: "Entfernen",
369
+ required: "Erforderlich",
370
+ reset: "Zur\xFCcksetzen",
371
+ save: "Speichern",
372
+ saved: "Gespeichert",
373
+ search: "Suche",
374
+ select: "Select",
375
+ selectOption: "Option ausw\xE4hlen",
376
+ show: "Anzeigen",
377
+ showMore: "Mehr anzeigen",
378
+ showLess: "Weniger anzeigen",
379
+ submit: "Abschicken",
380
+ success: "Erfolg",
381
+ update: "Update",
382
+ unsavedChanges: "Ungespeicherte \xC4nderungen",
383
+ unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
384
+ yes: "Ja"
385
+ }
386
+ };
387
+
388
+ // src/components/layout/FloatingContainer.tsx
389
+ var import_react6 = require("react");
390
+ var import_react_dom = require("react-dom");
391
+ var import_clsx2 = require("clsx");
392
+
393
+ // src/hooks/useFloatingElement.ts
394
+ var import_react5 = require("react");
395
+
396
+ // src/utils/math.ts
397
+ var clamp = (value, range = [0, 1]) => {
398
+ const [min, max] = range;
399
+ return Math.min(Math.max(value, min), max);
400
+ };
401
+
402
+ // src/hooks/focus/useIsMounted.ts
403
+ var import_react4 = require("react");
404
+ var isClient = typeof window !== "undefined" && typeof document !== "undefined";
405
+ var useIsomorphicEffect = isClient ? import_react4.useLayoutEffect : import_react4.useEffect;
406
+ var useIsMounted = () => {
407
+ const [isMounted, setIsMounted] = (0, import_react4.useState)(false);
408
+ useIsomorphicEffect(() => {
409
+ setIsMounted(true);
410
+ return () => {
411
+ setIsMounted(false);
412
+ };
413
+ }, []);
414
+ return isMounted;
415
+ };
416
+
417
+ // src/hooks/useFloatingElement.ts
418
+ function calculatePosition({
419
+ windowRect,
420
+ containerRect,
421
+ anchorRect,
422
+ options
423
+ }) {
424
+ const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options;
425
+ const windowWidth = windowRect.width;
426
+ const windowHeight = windowRect.height;
427
+ const maxWidth = windowWidth - 2 * screenPadding;
428
+ const maxHeight = windowHeight - 2 * screenPadding;
429
+ const width = Math.min(containerRect.width, maxWidth);
430
+ const height = Math.min(containerRect.height, maxHeight);
431
+ const leftSuggestion = {
432
+ beforeStart: anchorRect.left - width - gap,
433
+ afterStart: anchorRect.left,
434
+ center: anchorRect.left + anchorRect.width / 2 - width / 2,
435
+ beforeEnd: anchorRect.right - width,
436
+ afterEnd: anchorRect.right + gap
437
+ }[horizontalAlignment];
438
+ const topSuggestion = {
439
+ beforeStart: anchorRect.top - height - gap,
440
+ afterStart: anchorRect.top,
441
+ center: anchorRect.top + anchorRect.height / 2 - height / 2,
442
+ beforeEnd: anchorRect.bottom - height,
443
+ afterEnd: anchorRect.bottom + gap
444
+ }[verticalAlignment];
445
+ const left = clamp(leftSuggestion, [
446
+ screenPadding,
447
+ windowWidth - screenPadding - width
448
+ ]);
449
+ const top = clamp(topSuggestion, [
450
+ screenPadding,
451
+ windowHeight - screenPadding - height
452
+ ]);
453
+ return {
454
+ left,
455
+ top,
456
+ maxWidth,
457
+ maxHeight
458
+ };
459
+ }
460
+ function useFloatingElement({
461
+ active = true,
462
+ windowRef,
463
+ anchorRef,
464
+ containerRef,
465
+ isPolling = false,
466
+ pollingInterval = 100,
467
+ verticalAlignment = "afterEnd",
468
+ horizontalAlignment = "afterStart",
469
+ screenPadding = 16,
470
+ gap = 4
471
+ }) {
472
+ const [style, setStyle] = (0, import_react5.useState)();
473
+ const isMounted = useIsMounted();
474
+ const calculate = (0, import_react5.useCallback)(() => {
475
+ const containerRect = containerRef.current.getBoundingClientRect();
476
+ const windowRect = windowRef?.current.getBoundingClientRect() ?? {
477
+ top: 0,
478
+ bottom: window.innerHeight,
479
+ left: 0,
480
+ right: window.innerWidth,
481
+ width: window.innerWidth,
482
+ height: window.innerHeight
483
+ };
484
+ const anchorElement = anchorRef?.current;
485
+ if (anchorRef && !anchorElement) {
486
+ console.warn("FloatingContainer anchor provided, but its value is undefined");
487
+ }
488
+ const anchorRect = anchorElement?.getBoundingClientRect() ?? windowRect;
489
+ const calculateProps = {
490
+ windowRect,
491
+ anchorRect,
492
+ containerRect,
493
+ options: {
494
+ horizontalAlignment,
495
+ verticalAlignment,
496
+ screenPadding,
497
+ gap
498
+ }
499
+ };
500
+ setStyle(calculatePosition(calculateProps));
501
+ }, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
502
+ const height = containerRef.current?.getBoundingClientRect().height;
503
+ const width = containerRef.current?.getBoundingClientRect().width;
504
+ (0, import_react5.useEffect)(() => {
505
+ if (active && isMounted) {
506
+ calculate();
507
+ } else {
508
+ setStyle(void 0);
509
+ }
510
+ }, [calculate, active, isMounted, height, width]);
511
+ (0, import_react5.useEffect)(() => {
512
+ window.addEventListener("resize", calculate);
513
+ let timeout;
514
+ if (isPolling) {
515
+ timeout = setInterval(calculate, pollingInterval);
516
+ }
517
+ return () => {
518
+ window.removeEventListener("resize", calculate);
519
+ if (timeout) {
520
+ clearInterval(timeout);
521
+ }
522
+ };
523
+ }, [calculate, isPolling, pollingInterval]);
524
+ return style;
525
+ }
526
+
527
+ // src/components/layout/FloatingContainer.tsx
528
+ var import_jsx_runtime3 = require("react/jsx-runtime");
529
+ var FloatingContainer = (0, import_react6.forwardRef)(function FloatingContainer2({
530
+ children,
531
+ backgroundOverlay,
532
+ anchor,
533
+ isPolling = false,
534
+ pollingInterval = 100,
535
+ verticalAlignment = "afterEnd",
536
+ horizontalAlignment = "afterStart",
537
+ screenPadding = 16,
538
+ gap = 4,
539
+ ...props
540
+ }, forwardRef6) {
541
+ const innerRef = (0, import_react6.useRef)(null);
542
+ (0, import_react6.useImperativeHandle)(forwardRef6, () => innerRef.current);
543
+ const position = useFloatingElement({
544
+ active: !props.hidden,
545
+ containerRef: innerRef,
546
+ anchorRef: anchor,
547
+ isPolling,
548
+ pollingInterval,
549
+ verticalAlignment,
550
+ horizontalAlignment,
551
+ gap,
552
+ screenPadding
553
+ });
554
+ return (0, import_react_dom.createPortal)(
555
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
556
+ backgroundOverlay,
557
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
558
+ "div",
559
+ {
560
+ ...props,
561
+ ref: innerRef,
562
+ style: {
563
+ position: "fixed",
564
+ overflow: "hidden",
565
+ opacity: position ? void 0 : 0,
566
+ // hide when position calculation isn't done yet
567
+ transition: position ? `top ${pollingInterval}ms linear, left ${pollingInterval}ms linear` : void 0,
568
+ ...position,
569
+ ...props.style
570
+ },
571
+ className: (0, import_clsx2.clsx)("motion-safe:duration-100 motion-reduce:duration-0", props.className),
572
+ children
573
+ }
574
+ )
575
+ ] }),
576
+ document.body
577
+ );
578
+ });
579
+
580
+ // src/hooks/focus/useFocusTrap.ts
581
+ var import_react7 = require("react");
582
+ var createFocusGuard = () => {
583
+ const div = document.createElement("div");
584
+ Object.assign(div.style, {
585
+ opacity: "0",
586
+ outline: "none",
587
+ boxShadow: "none",
588
+ position: "fixed",
589
+ pointerEvents: "none",
590
+ touchAction: "none"
591
+ });
592
+ div.tabIndex = 0;
593
+ div.setAttribute("data-hw-focus-guard", "");
594
+ document.body.appendChild(div);
595
+ return div;
596
+ };
597
+ function getContainedFocusableElements(element) {
598
+ return element?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
599
+ }
600
+ var FocusTrapService = class {
601
+ constructor() {
602
+ // The last entry is always the active one
603
+ this.listeners = [];
604
+ this.onFocusIn = (event) => {
605
+ const active = this.getActive();
606
+ if (!active || !active.container.current) return;
607
+ const { container } = active;
608
+ if (!container.current.contains(event.target)) {
609
+ this.focusElement();
610
+ }
611
+ };
612
+ }
613
+ getActive() {
614
+ if (this.listeners.length === 0) return void 0;
615
+ return this.listeners[this.listeners.length - 1];
616
+ }
617
+ focusElement() {
618
+ const active = this.getActive();
619
+ if (!active) return;
620
+ const { container, initialFocusElement } = active;
621
+ const containerElement = container.current;
622
+ if (initialFocusElement?.current) {
623
+ initialFocusElement.current.focus();
624
+ } else {
625
+ const elements = getContainedFocusableElements(containerElement);
626
+ if (elements && elements.length > 0) {
627
+ const first = elements.item(0);
628
+ first.focus();
629
+ } else {
630
+ containerElement.focus();
631
+ }
632
+ }
633
+ }
634
+ removeGuards() {
635
+ document.querySelectorAll("[data-hw-focus-guard]").forEach((node) => node.remove());
636
+ }
637
+ addGuards() {
638
+ document.body.insertAdjacentElement("afterbegin", createFocusGuard());
639
+ document.body.insertAdjacentElement("beforeend", createFocusGuard());
640
+ }
641
+ activate() {
642
+ document.addEventListener("focusin", this.onFocusIn);
643
+ this.addGuards();
644
+ }
645
+ deactivate() {
646
+ document.removeEventListener("focusin", this.onFocusIn);
647
+ this.removeGuards();
648
+ }
649
+ register(listener) {
650
+ this.listeners.push(listener);
651
+ if (this.listeners.length === 1) {
652
+ this.activate();
653
+ }
654
+ const active = listener;
655
+ this.listeners.forEach((listener2) => {
656
+ const { focus, pause } = listener2;
657
+ if (listener2 === active) {
658
+ focus();
659
+ } else {
660
+ pause();
661
+ }
662
+ });
663
+ }
664
+ unregister(id) {
665
+ const index = this.listeners.findIndex((trap) => trap.id === id);
666
+ if (index !== -1) {
667
+ const isActive = index === this.listeners.length - 1;
668
+ const listener = this.listeners[index];
669
+ this.listeners = this.listeners.filter((listener2) => listener2.id !== id);
670
+ if (isActive) {
671
+ this.deactivate();
672
+ listener.focusLast();
673
+ const active = this.getActive();
674
+ this.listeners.forEach((listener2) => {
675
+ const { pause, unpause } = listener2;
676
+ if (listener2 === active) {
677
+ unpause();
678
+ } else {
679
+ pause();
680
+ }
681
+ });
682
+ if (this.listeners.length > 0) {
683
+ this.activate();
684
+ }
685
+ }
686
+ } else {
687
+ console.warn(`Unable to unregister id ${id}: not found`);
688
+ }
689
+ }
690
+ };
691
+ var service = new FocusTrapService();
692
+ var useFocusTrap = ({
693
+ container,
694
+ active = true,
695
+ initialFocus,
696
+ focusFirst = true
697
+ }) => {
698
+ const lastFocusRef = (0, import_react7.useRef)(null);
699
+ const [paused, setPaused] = (0, import_react7.useState)(false);
700
+ const isMounted = useIsMounted();
701
+ const id = (0, import_react7.useId)();
702
+ const focusElement = (0, import_react7.useCallback)(() => {
703
+ const containerElement = container.current;
704
+ if (initialFocus?.current) {
705
+ initialFocus.current.focus();
706
+ } else {
707
+ const elements = getContainedFocusableElements(containerElement);
708
+ if (elements && elements.length > 0) {
709
+ const first = elements.item(0);
710
+ first.focus();
711
+ } else {
712
+ containerElement.focus();
713
+ }
714
+ }
715
+ }, [container, initialFocus]);
716
+ (0, import_react7.useEffect)(() => {
717
+ if (active && isMounted) {
718
+ let pause = function() {
719
+ setPaused(true);
720
+ }, unpause = function() {
721
+ setPaused(false);
722
+ if (!container.current.contains(document.activeElement)) {
723
+ focusElement();
724
+ }
725
+ }, focus = function() {
726
+ focusElement();
727
+ setPaused(false);
728
+ }, focusLast = function() {
729
+ lastFocusRef.current?.focus();
730
+ };
731
+ if (!lastFocusRef.current) {
732
+ lastFocusRef.current = document.activeElement;
733
+ }
734
+ service.register({ id, pause, focus, focusLast, unpause, container, initialFocusElement: initialFocus });
735
+ return () => {
736
+ service.unregister(id);
737
+ lastFocusRef.current = void 0;
738
+ };
739
+ }
740
+ }, [active, container, focusElement, id, initialFocus, isMounted]);
741
+ (0, import_react7.useEffect)(() => {
742
+ if (active && !paused && isMounted) {
743
+ let onKeyDown = function(event) {
744
+ const key = event.key;
745
+ const elements = getContainedFocusableElements(containerElement);
746
+ const active2 = document.activeElement;
747
+ const index = [...elements].findIndex((value) => value === active2);
748
+ if (index === -1 || event.altKey || event.ctrlKey || event.metaKey) {
749
+ return;
750
+ }
751
+ if (key === "Tab") {
752
+ const next = event.shiftKey ? -1 : 1;
753
+ const nextIndex = (index + next + elements.length) % elements.length;
754
+ const nextElement = elements[nextIndex];
755
+ nextElement.focus();
756
+ event.preventDefault();
757
+ }
758
+ };
759
+ const containerElement = container.current;
760
+ containerElement.addEventListener("keydown", onKeyDown);
761
+ return () => {
762
+ containerElement.removeEventListener("keydown", onKeyDown);
763
+ };
764
+ }
765
+ }, [active, paused, isMounted, container, initialFocus, focusFirst, focusElement]);
766
+ };
767
+
768
+ // src/hooks/useLogOnce.ts
769
+ var import_react8 = require("react");
770
+ var defaultOptions = {
771
+ type: "warning"
772
+ };
773
+ var useLogOnce = (message, condition, options) => {
774
+ const [hasLogged, setHasLogged] = (0, import_react8.useState)(false);
775
+ const { type } = { ...defaultOptions, ...options };
776
+ (0, import_react8.useEffect)(() => {
777
+ if (!hasLogged && condition) {
778
+ switch (type) {
779
+ case "info":
780
+ console.info(message);
781
+ break;
782
+ case "error":
783
+ console.error(message);
784
+ break;
785
+ case "warning":
786
+ console.warn(message);
787
+ break;
788
+ }
789
+ setHasLogged(true);
790
+ }
791
+ }, [condition]);
792
+ };
793
+
794
+ // src/components/dialog/Dialog.tsx
795
+ var import_jsx_runtime4 = require("react/jsx-runtime");
796
+ var Dialog = ({
797
+ children,
798
+ isOpen,
799
+ titleElement,
800
+ description,
801
+ isModal = true,
802
+ onClose,
803
+ horizontalAlignment = "center",
804
+ verticalAlignment = "center",
805
+ className,
806
+ backgroundClassName
807
+ }) => {
808
+ const translation = useTranslation([formTranslation]);
809
+ const ref = (0, import_react9.useRef)(null);
810
+ const onCloseWrapper = () => {
811
+ if (!isModal) return;
812
+ onClose?.();
813
+ };
814
+ useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
815
+ useFocusTrap({
816
+ container: ref,
817
+ active: isOpen,
818
+ focusFirst: true
819
+ });
820
+ if (!isOpen) return void 0;
821
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
822
+ FloatingContainer,
823
+ {
824
+ ref,
825
+ hidden: !isOpen,
826
+ onKeyDown: (event) => {
827
+ if (event.key === "Escape") {
828
+ onCloseWrapper();
829
+ }
830
+ },
831
+ horizontalAlignment,
832
+ verticalAlignment,
833
+ backgroundOverlay: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
834
+ "div",
835
+ {
836
+ className: (0, import_clsx3.default)(
837
+ "fixed inset-0 h-screen w-screen bg-overlay-shadow",
838
+ {
839
+ "motion-safe:animate-fade-in animation-delay-3000": isOpen,
840
+ "motion-safe:animate-fade-out": !isOpen
841
+ },
842
+ backgroundClassName
843
+ ),
844
+ hidden: !isOpen,
845
+ "aria-hidden": true,
846
+ onClick: onCloseWrapper
847
+ }
848
+ ),
849
+ className: (0, import_clsx3.default)(
850
+ "flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom",
851
+ {
852
+ "motion-safe:animate-pop-in": isOpen,
853
+ "motion-safe:animate-pop-out": !isOpen
854
+ },
855
+ className
856
+ ),
857
+ children: [
858
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "typography-title-lg-semibold mr-8", children: titleElement }),
859
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-description", children: description }),
860
+ isModal && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
861
+ "div",
862
+ {
863
+ className: "absolute top-0 right-0",
864
+ style: {
865
+ paddingTop: "inherit",
866
+ paddingRight: "inherit"
867
+ },
868
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
869
+ IconButton,
870
+ {
871
+ color: "neutral",
872
+ size: "tiny",
873
+ "aria-label": translation("close"),
874
+ onClick: onCloseWrapper,
875
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.X, {})
876
+ }
877
+ )
878
+ }
879
+ ),
880
+ children
881
+ ]
882
+ }
883
+ );
884
+ };
885
+
886
+ // src/components/dialog/ConfirmDialog.tsx
887
+ var import_jsx_runtime5 = require("react/jsx-runtime");
888
+ var ConfirmDialog = ({
889
+ overwriteTranslation,
890
+ children,
891
+ onCancel,
892
+ onConfirm,
893
+ onDecline,
894
+ confirmType = "positive",
895
+ buttonOverwrites,
896
+ className,
897
+ ...restProps
898
+ }) => {
899
+ const translation = useTranslation([formTranslation], overwriteTranslation);
900
+ const mapping = {
901
+ neutral: "neutral",
902
+ negative: "negative",
903
+ positive: "positive",
904
+ primary: "primary"
905
+ };
906
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Dialog, { ...restProps, onClose: onCancel, className: (0, import_clsx4.default)("justify-between", className), children: [
907
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-col-2 grow", children }),
908
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-row-4 mt-3 justify-end", children: [
909
+ onCancel && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
910
+ SolidButton,
911
+ {
912
+ color: buttonOverwrites?.[0].color ?? "neutral",
913
+ onClick: onCancel,
914
+ disabled: buttonOverwrites?.[0].disabled ?? false,
915
+ children: buttonOverwrites?.[0].text ?? translation("cancel")
916
+ }
917
+ ),
918
+ onDecline && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
919
+ SolidButton,
920
+ {
921
+ color: buttonOverwrites?.[1].color ?? "negative",
922
+ onClick: onDecline,
923
+ disabled: buttonOverwrites?.[1].disabled ?? false,
924
+ children: buttonOverwrites?.[1].text ?? translation("decline")
925
+ }
926
+ ),
927
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
928
+ SolidButton,
929
+ {
930
+ color: buttonOverwrites?.[2].color ?? mapping[confirmType],
931
+ onClick: onConfirm,
932
+ disabled: buttonOverwrites?.[2].disabled ?? false,
933
+ children: buttonOverwrites?.[2].text ?? translation("confirm")
934
+ }
935
+ )
936
+ ] })
937
+ ] });
938
+ };
939
+
940
+ // src/components/dialog/DiscardChangesDialog.tsx
941
+ var import_jsx_runtime6 = require("react/jsx-runtime");
942
+ var DiscardChangesDialog = ({
943
+ overwriteTranslation,
944
+ children,
945
+ onCancel,
946
+ onSave,
947
+ onDontSave,
948
+ titleOverwrite,
949
+ descriptionOverwrite,
950
+ ...props
951
+ }) => {
952
+ const translation = useTranslation([formTranslation], overwriteTranslation);
953
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
954
+ ConfirmDialog,
955
+ {
956
+ ...props,
957
+ titleElement: titleOverwrite ?? translation("unsavedChanges"),
958
+ description: descriptionOverwrite ?? translation("unsavedChangesSaveQuestion"),
959
+ onConfirm: onSave,
960
+ onCancel,
961
+ onDecline: onDontSave,
962
+ buttonOverwrites: [{ text: translation("cancel") }, { text: translation("discardChanges") }, { text: translation("save") }],
963
+ children
964
+ }
965
+ );
966
+ };
967
+
968
+ // src/components/user-action/input/Input.tsx
969
+ var import_react12 = require("react");
970
+ var import_clsx5 = __toESM(require("clsx"));
971
+
972
+ // src/hooks/useDelay.ts
973
+ var import_react10 = require("react");
974
+ var defaultOptions2 = {
975
+ delay: 3e3,
976
+ disabled: false
977
+ };
978
+ function useDelay(options) {
979
+ const [timer, setTimer] = (0, import_react10.useState)(void 0);
980
+ const { delay, disabled } = {
981
+ ...defaultOptions2,
982
+ ...options
983
+ };
984
+ const clearTimer = () => {
985
+ clearTimeout(timer);
986
+ setTimer(void 0);
987
+ };
988
+ const restartTimer = (onDelayFinish) => {
989
+ if (disabled) {
990
+ return;
991
+ }
992
+ clearTimeout(timer);
993
+ setTimer(setTimeout(() => {
994
+ onDelayFinish();
995
+ setTimer(void 0);
996
+ }, delay));
997
+ };
998
+ (0, import_react10.useEffect)(() => {
999
+ return () => {
1000
+ clearTimeout(timer);
1001
+ };
1002
+ }, [timer]);
1003
+ (0, import_react10.useEffect)(() => {
1004
+ if (disabled) {
1005
+ clearTimeout(timer);
1006
+ setTimer(void 0);
1007
+ }
1008
+ }, [disabled, timer]);
1009
+ return { restartTimer, clearTimer, hasActiveTimer: !!timer };
1010
+ }
1011
+
1012
+ // src/hooks/focus/useFocusManagement.ts
1013
+ var import_react11 = require("react");
1014
+ function useFocusManagement() {
1015
+ const getFocusableElements = (0, import_react11.useCallback)(() => {
1016
+ return Array.from(
1017
+ document.querySelectorAll(
1018
+ 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
1019
+ )
1020
+ ).filter(
1021
+ (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
1022
+ );
1023
+ }, []);
1024
+ const getNextFocusElement = (0, import_react11.useCallback)(() => {
1025
+ const elements = getFocusableElements();
1026
+ if (elements.length === 0) {
1027
+ return void 0;
1028
+ }
1029
+ let nextElement = elements[0];
1030
+ if (document.activeElement instanceof HTMLElement) {
1031
+ const currentIndex = elements.indexOf(document.activeElement);
1032
+ nextElement = elements[(currentIndex + 1) % elements.length];
1033
+ }
1034
+ return nextElement;
1035
+ }, [getFocusableElements]);
1036
+ const focusNext = (0, import_react11.useCallback)(() => {
1037
+ const nextElement = getNextFocusElement();
1038
+ nextElement?.focus();
1039
+ }, [getNextFocusElement]);
1040
+ const getPreviousFocusElement = (0, import_react11.useCallback)(() => {
1041
+ const elements = getFocusableElements();
1042
+ if (elements.length === 0) {
1043
+ return void 0;
1044
+ }
1045
+ let previousElement = elements[0];
1046
+ if (document.activeElement instanceof HTMLElement) {
1047
+ const currentIndex = elements.indexOf(document.activeElement);
1048
+ if (currentIndex === 0) {
1049
+ previousElement = elements[elements.length - 1];
1050
+ } else {
1051
+ previousElement = elements[currentIndex - 1];
1052
+ }
1053
+ }
1054
+ return previousElement;
1055
+ }, [getFocusableElements]);
1056
+ const focusPrevious = (0, import_react11.useCallback)(() => {
1057
+ const previousElement = getPreviousFocusElement();
1058
+ if (previousElement) previousElement.focus();
1059
+ }, [getPreviousFocusElement]);
1060
+ return {
1061
+ getFocusableElements,
1062
+ getNextFocusElement,
1063
+ getPreviousFocusElement,
1064
+ focusNext,
1065
+ focusPrevious
1066
+ };
1067
+ }
1068
+
1069
+ // src/components/user-action/input/Input.tsx
1070
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1071
+ var defaultEditCompleteOptions = {
1072
+ allowEnterComplete: false,
1073
+ onBlur: true,
1074
+ afterDelay: true,
1075
+ delay: 2500
1076
+ };
1077
+ var Input = (0, import_react12.forwardRef)(function Input2({
1078
+ value,
1079
+ onChange,
1080
+ onChangeText,
1081
+ onEditCompleted,
1082
+ editCompleteOptions,
1083
+ disabled = false,
1084
+ invalid = false,
1085
+ defaultStyle = true,
1086
+ className,
1087
+ ...props
1088
+ }, forwardedRef) {
1089
+ const {
1090
+ onBlur: allowEditCompleteOnBlur,
1091
+ afterDelay,
1092
+ delay,
1093
+ allowEnterComplete
1094
+ } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
1095
+ const {
1096
+ restartTimer,
1097
+ clearTimer
1098
+ } = useDelay({ delay, disabled: !afterDelay });
1099
+ const innerRef = (0, import_react12.useRef)(null);
1100
+ (0, import_react12.useImperativeHandle)(forwardedRef, () => innerRef.current);
1101
+ const { focusNext } = useFocusManagement();
1102
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1103
+ "input",
1104
+ {
1105
+ ...props,
1106
+ ref: innerRef,
1107
+ value,
1108
+ disabled,
1109
+ className: defaultStyle ? (0, import_clsx5.default)(
1110
+ "px-2.5 py-1.75 rounded-md border-1 text-sm",
1111
+ {
1112
+ "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
1113
+ "bg-on-negative text-negative border-negative-border hover:border-negative-border-hover focus-visible:ring-negative-border": !disabled && invalid,
1114
+ "bg-disabled-background text-disabled-text border-disabled-border": disabled
1115
+ },
1116
+ className
1117
+ ) : className,
1118
+ onKeyDown: (event) => {
1119
+ props.onKeyDown?.(event);
1120
+ if (!allowEnterComplete) {
1121
+ return;
1122
+ }
1123
+ if (event.key === "Enter" && !event.shiftKey) {
1124
+ event.preventDefault();
1125
+ innerRef.current?.blur();
1126
+ onEditCompleted?.(event.target.value);
1127
+ focusNext();
1128
+ }
1129
+ },
1130
+ onBlur: (event) => {
1131
+ props.onBlur?.(event);
1132
+ if (allowEditCompleteOnBlur) {
1133
+ onEditCompleted?.(event.target.value);
1134
+ clearTimer();
1135
+ }
1136
+ },
1137
+ onChange: (event) => {
1138
+ onChange?.(event);
1139
+ const value2 = event.target.value;
1140
+ restartTimer(() => {
1141
+ innerRef.current?.blur();
1142
+ onEditCompleted?.(value2);
1143
+ });
1144
+ onChangeText?.(value2);
1145
+ },
1146
+ "aria-invalid": props["aria-invalid"] ?? invalid,
1147
+ "aria-disabled": props["aria-disabled"] ?? disabled
1148
+ }
1149
+ );
1150
+ });
1151
+
1152
+ // src/components/dialog/InputDialog.tsx
1153
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1154
+ var InputDialog = ({
1155
+ inputs,
1156
+ buttonOverwrites,
1157
+ ...props
1158
+ }) => {
1159
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1160
+ ConfirmDialog,
1161
+ {
1162
+ buttonOverwrites,
1163
+ ...props,
1164
+ children: inputs.map((inputProps, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Input, { ...inputProps }, `input ${index}`))
1165
+ }
1166
+ );
1167
+ };
1168
+
1169
+ // src/components/user-action/select/Select.tsx
1170
+ var import_react14 = require("react");
1171
+ var import_clsx8 = __toESM(require("clsx"));
1172
+
1173
+ // src/components/layout/Expandable.tsx
1174
+ var import_react13 = require("react");
1175
+ var import_lucide_react2 = require("lucide-react");
1176
+ var import_clsx6 = __toESM(require("clsx"));
1177
+
1178
+ // src/utils/noop.ts
1179
+ var noop = () => void 0;
1180
+
1181
+ // src/components/layout/Expandable.tsx
1182
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1183
+ var ExpansionIcon = ({ isExpanded, className }) => {
1184
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1185
+ import_lucide_react2.ChevronDown,
1186
+ {
1187
+ "aria-hidden": true,
1188
+ className: (0, import_clsx6.default)(
1189
+ "min-w-6 w-6 min-h-6 h-6 transition-transform motion-safe:duration-200 motion-reduce:duration-0 ease-in-out",
1190
+ { "rotate-180": isExpanded },
1191
+ className
1192
+ )
1193
+ }
1194
+ );
1195
+ };
1196
+ var Expandable = (0, import_react13.forwardRef)(function Expandable2({
1197
+ children,
1198
+ id: providedId,
1199
+ label,
1200
+ icon,
1201
+ isExpanded = false,
1202
+ onChange = noop,
1203
+ clickOnlyOnHeader = true,
1204
+ disabled = false,
1205
+ className,
1206
+ headerClassName,
1207
+ contentClassName,
1208
+ contentExpandedClassName
1209
+ }, ref) {
1210
+ const defaultIcon = (0, import_react13.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
1211
+ icon ??= defaultIcon;
1212
+ const generatedId = (0, import_react13.useId)();
1213
+ const id = providedId ?? generatedId;
1214
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1215
+ "div",
1216
+ {
1217
+ ref,
1218
+ onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
1219
+ className: (0, import_clsx6.default)(
1220
+ "flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm",
1221
+ { "cursor-pointer": !clickOnlyOnHeader && !disabled },
1222
+ className
1223
+ ),
1224
+ children: [
1225
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1226
+ "button",
1227
+ {
1228
+ onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
1229
+ className: (0, import_clsx6.default)(
1230
+ "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
1231
+ {
1232
+ "group-hover:brightness-97": !isExpanded,
1233
+ "hover:brightness-97": isExpanded && !disabled,
1234
+ "cursor-pointer": clickOnlyOnHeader && !disabled
1235
+ },
1236
+ headerClassName
1237
+ ),
1238
+ "aria-expanded": isExpanded,
1239
+ "aria-controls": `${id}-content`,
1240
+ "aria-disabled": disabled ?? void 0,
1241
+ children: [
1242
+ label,
1243
+ icon(isExpanded)
1244
+ ]
1245
+ }
1246
+ ),
1247
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1248
+ "div",
1249
+ {
1250
+ id: `${id}-content`,
1251
+ className: (0, import_clsx6.default)(
1252
+ "flex-col-2 px-4 transition-all duration-300 ease-in-out",
1253
+ {
1254
+ [(0, import_clsx6.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
1255
+ "max-h-0 opacity-0 overflow-hidden": !isExpanded
1256
+ },
1257
+ contentClassName
1258
+ ),
1259
+ role: "region",
1260
+ children
1261
+ }
1262
+ )
1263
+ ]
1264
+ }
1265
+ );
1266
+ });
1267
+ var ExpandableUncontrolled = (0, import_react13.forwardRef)(function ExpandableUncontrolled2({
1268
+ isExpanded,
1269
+ onChange = noop,
1270
+ ...props
1271
+ }, ref) {
1272
+ const [usedIsExpanded, setUsedIsExpanded] = (0, import_react13.useState)(isExpanded);
1273
+ (0, import_react13.useEffect)(() => {
1274
+ setUsedIsExpanded(isExpanded);
1275
+ }, [isExpanded]);
1276
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1277
+ Expandable,
1278
+ {
1279
+ ...props,
1280
+ ref,
1281
+ isExpanded: usedIsExpanded,
1282
+ onChange: (value) => {
1283
+ onChange(value);
1284
+ setUsedIsExpanded(value);
1285
+ }
1286
+ }
1287
+ );
1288
+ });
1289
+
1290
+ // src/utils/match.ts
1291
+ var match = (key, values) => {
1292
+ return values[key];
1293
+ };
1294
+
1295
+ // src/components/user-action/select/Select.tsx
1296
+ var import_lucide_react3 = require("lucide-react");
1297
+
1298
+ // src/components/layout/Chip.tsx
1299
+ var import_clsx7 = __toESM(require("clsx"));
1300
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1301
+ var Chip = ({
1302
+ children,
1303
+ trailingIcon,
1304
+ color = "default",
1305
+ size = "md",
1306
+ icon = false,
1307
+ variant = "normal",
1308
+ className = "",
1309
+ ...restProps
1310
+ }) => {
1311
+ const colorMapping = {
1312
+ default: "text-tag-default-text bg-tag-default-background",
1313
+ dark: "text-tag-dark-text bg-tag-dark-background",
1314
+ red: "text-tag-red-text bg-tag-red-background",
1315
+ yellow: "text-tag-yellow-text bg-tag-yellow-background",
1316
+ green: "text-tag-green-text bg-tag-green-background",
1317
+ blue: "text-tag-blue-text bg-tag-blue-background",
1318
+ pink: "text-tag-pink-text bg-tag-pink-background",
1319
+ orange: "text-tag-orange-text bg-tag-orange-background"
1320
+ }[color];
1321
+ const colorMappingIcon = {
1322
+ default: "text-tag-default-icon",
1323
+ dark: "text-tag-dark-icon",
1324
+ red: "text-tag-red-icon",
1325
+ yellow: "text-tag-yellow-icon",
1326
+ green: "text-tag-green-icon",
1327
+ blue: "text-tag-blue-icon",
1328
+ pink: "text-tag-pink-icon",
1329
+ orange: "text-tag-orange-icon"
1330
+ }[color];
1331
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1332
+ "div",
1333
+ {
1334
+ ...restProps,
1335
+ className: (0, import_clsx7.default)(
1336
+ `flex-row-0 w-fit font-semibold`,
1337
+ colorMapping,
1338
+ !icon ? {
1339
+ "px-1 py-0.5": size === "sm",
1340
+ "px-2 py-1": size === "md",
1341
+ "px-4 py-2": size === "lg"
1342
+ } : {
1343
+ "p-0.5": size === "sm",
1344
+ "p-1": size === "md",
1345
+ "p-2": size === "lg"
1346
+ },
1347
+ {
1348
+ "rounded-md": variant === "normal",
1349
+ "rounded-full": variant === "fullyRounded"
1350
+ },
1351
+ className
1352
+ ),
1353
+ children: [
1354
+ children,
1355
+ trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
1356
+ ]
1357
+ }
1358
+ );
1359
+ };
1360
+
1361
+ // src/components/user-action/select/Select.tsx
1362
+ var import_react_dom2 = require("react-dom");
1363
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1364
+ var defaultToggleOpenOptions = {
1365
+ highlightStartPosition: "first"
1366
+ };
1367
+ var SelectContext = (0, import_react14.createContext)(null);
1368
+ function useSelectContext() {
1369
+ const ctx = (0, import_react14.useContext)(SelectContext);
1370
+ if (!ctx) {
1371
+ throw new Error("SelectContext must be used within a ListBoxPrimitive");
1372
+ }
1373
+ return ctx;
1374
+ }
1375
+ var SelectRoot = ({
1376
+ children,
1377
+ id,
1378
+ value,
1379
+ onValueChanged,
1380
+ values,
1381
+ onValuesChanged,
1382
+ isOpen = false,
1383
+ disabled = false,
1384
+ invalid = false,
1385
+ isMultiSelect = false,
1386
+ iconAppearance = "left"
1387
+ }) => {
1388
+ const optionsRef = (0, import_react14.useRef)([]);
1389
+ const triggerRef = (0, import_react14.useRef)(null);
1390
+ const generatedId = (0, import_react14.useId)();
1391
+ const usedId = id ?? generatedId;
1392
+ const [internalState, setInternalState] = (0, import_react14.useState)({
1393
+ isOpen
1394
+ });
1395
+ const state = {
1396
+ ...internalState,
1397
+ id: usedId,
1398
+ disabled,
1399
+ invalid,
1400
+ value: isMultiSelect ? values ?? [] : [value].filter(Boolean)
1401
+ };
1402
+ const config = {
1403
+ isMultiSelect,
1404
+ iconAppearance
1405
+ };
1406
+ const registerItem = (0, import_react14.useCallback)((item) => {
1407
+ optionsRef.current.push(item);
1408
+ optionsRef.current.sort((a, b) => {
1409
+ const aEl = a.ref.current;
1410
+ const bEl = b.ref.current;
1411
+ if (!aEl || !bEl) return 0;
1412
+ return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
1413
+ });
1414
+ }, []);
1415
+ const unregisterItem = (0, import_react14.useCallback)((value2) => {
1416
+ optionsRef.current = optionsRef.current.filter((i) => i.value !== value2);
1417
+ }, []);
1418
+ const toggleSelection = (value2, isSelected) => {
1419
+ if (disabled) {
1420
+ return;
1421
+ }
1422
+ const option = optionsRef.current.find((i) => i.value === value2);
1423
+ if (!option) {
1424
+ console.error(`SelectOption with value: ${value2} not found`);
1425
+ return;
1426
+ }
1427
+ let newValue;
1428
+ if (isMultiSelect) {
1429
+ const isSelectedBefore = state.value.includes(value2);
1430
+ const isSelectedAfter = isSelected ?? !isSelectedBefore;
1431
+ if (!isSelectedAfter) {
1432
+ newValue = state.value.filter((v) => v !== value2);
1433
+ } else {
1434
+ newValue = [...state.value, value2];
1435
+ }
1436
+ } else {
1437
+ newValue = [value2];
1438
+ }
1439
+ if (!isMultiSelect) {
1440
+ onValueChanged?.(newValue[0]);
1441
+ } else {
1442
+ onValuesChanged?.(newValue);
1443
+ }
1444
+ setInternalState((prevState) => ({
1445
+ ...prevState,
1446
+ highlightedValue: value2
1447
+ }));
1448
+ };
1449
+ const highlightItem = (value2) => {
1450
+ if (disabled) {
1451
+ return;
1452
+ }
1453
+ setInternalState((prevState) => ({
1454
+ ...prevState,
1455
+ highlightedValue: value2
1456
+ }));
1457
+ };
1458
+ const registerTrigger = (0, import_react14.useCallback)((ref) => {
1459
+ triggerRef.current = ref.current;
1460
+ }, []);
1461
+ const unregisterTrigger = (0, import_react14.useCallback)(() => {
1462
+ triggerRef.current = null;
1463
+ }, []);
1464
+ const toggleOpen = (isOpen2, options) => {
1465
+ const { highlightStartPosition } = { ...defaultToggleOpenOptions, ...options };
1466
+ let highlightedIndex;
1467
+ if (highlightStartPosition === "first") {
1468
+ highlightedIndex = optionsRef.current.findIndex((option) => !option.disabled);
1469
+ } else {
1470
+ highlightedIndex = optionsRef.current.length - 1 - [...optionsRef.current].reverse().findIndex((option) => !option.disabled);
1471
+ }
1472
+ if (highlightedIndex === -1 || highlightedIndex === optionsRef.current.length) {
1473
+ highlightedIndex = 0;
1474
+ }
1475
+ setInternalState((prevState) => ({
1476
+ ...prevState,
1477
+ isOpen: isOpen2 ?? !prevState.isOpen,
1478
+ highlightedValue: optionsRef.current[highlightedIndex].value
1479
+ }));
1480
+ };
1481
+ const moveHighlightedIndex = (delta) => {
1482
+ let highlightedIndex = optionsRef.current.findIndex((value2) => value2.value === internalState.highlightedValue);
1483
+ if (highlightedIndex === -1) {
1484
+ highlightedIndex = 0;
1485
+ }
1486
+ const optionLength = optionsRef.current.length;
1487
+ const startIndex = (highlightedIndex + delta % optionLength + optionLength) % optionLength;
1488
+ const isForward = delta >= 0;
1489
+ let highlightedValue = optionsRef.current[startIndex].value;
1490
+ for (let i = 0; i < optionsRef.current.length; i++) {
1491
+ const index = (startIndex + (isForward ? i : -i) + optionLength) % optionLength;
1492
+ if (!optionsRef.current[index].disabled) {
1493
+ highlightedValue = optionsRef.current[index].value;
1494
+ break;
1495
+ }
1496
+ }
1497
+ setInternalState((prevState) => ({
1498
+ ...prevState,
1499
+ highlightedValue
1500
+ }));
1501
+ };
1502
+ (0, import_react14.useEffect)(() => {
1503
+ if (!internalState.highlightedValue) return;
1504
+ const highlighted = optionsRef.current.find((value2) => value2.value === internalState.highlightedValue);
1505
+ if (highlighted) {
1506
+ highlighted.ref.current.scrollIntoView({ behavior: "instant", block: "nearest" });
1507
+ } else {
1508
+ console.error(`SelectRoot: Could not find highlighted value (${internalState.highlightedValue})`);
1509
+ }
1510
+ }, [internalState.highlightedValue]);
1511
+ const contextValue = {
1512
+ state,
1513
+ config,
1514
+ item: {
1515
+ register: registerItem,
1516
+ unregister: unregisterItem,
1517
+ toggleSelection,
1518
+ highlightItem,
1519
+ moveHighlightedIndex
1520
+ },
1521
+ trigger: {
1522
+ ref: triggerRef,
1523
+ register: registerTrigger,
1524
+ unregister: unregisterTrigger,
1525
+ toggleOpen
1526
+ }
1527
+ };
1528
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectContext.Provider, { value: contextValue, children });
1529
+ };
1530
+ var SelectOption = (0, import_react14.forwardRef)(
1531
+ function SelectOption2({ children, value, disabled = false, iconAppearance, className, ...restProps }, ref) {
1532
+ const { state, config, item, trigger } = useSelectContext();
1533
+ const { register, unregister, toggleSelection, highlightItem } = item;
1534
+ const itemRef = (0, import_react14.useRef)(null);
1535
+ iconAppearance ??= config.iconAppearance;
1536
+ (0, import_react14.useEffect)(() => {
1537
+ register({
1538
+ value,
1539
+ disabled,
1540
+ ref: itemRef
1541
+ });
1542
+ return () => unregister(value);
1543
+ }, [value, disabled, register, unregister, children]);
1544
+ const isHighlighted = state.highlightedValue === value;
1545
+ const isSelected = state.value.includes(value);
1546
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1547
+ "li",
1548
+ {
1549
+ ...restProps,
1550
+ ref: (node) => {
1551
+ itemRef.current = node;
1552
+ if (typeof ref === "function") ref(node);
1553
+ else if (ref) ref.current = node;
1554
+ },
1555
+ id: value,
1556
+ role: "option",
1557
+ "aria-disabled": disabled,
1558
+ "aria-selected": isSelected,
1559
+ "data-highlighted": isHighlighted ? "" : void 0,
1560
+ "data-selected": isSelected ? "" : void 0,
1561
+ "data-disabled": disabled ? "" : void 0,
1562
+ className: (0, import_clsx8.default)(
1563
+ "flex-row-1 items-center px-2 py-1 rounded-md",
1564
+ "data-highlighted:bg-primary/20",
1565
+ "data-disabled:text-disabled data-disabled:cursor-not-allowed",
1566
+ "not-data-disabled:cursor-pointer",
1567
+ className
1568
+ ),
1569
+ onClick: (event) => {
1570
+ if (!disabled) {
1571
+ toggleSelection(value);
1572
+ if (!config.isMultiSelect) {
1573
+ trigger.toggleOpen(false);
1574
+ }
1575
+ restProps.onClick?.(event);
1576
+ }
1577
+ },
1578
+ onMouseEnter: (event) => {
1579
+ if (!disabled) {
1580
+ highlightItem(value);
1581
+ restProps.onMouseEnter?.(event);
1582
+ }
1583
+ },
1584
+ children: [
1585
+ iconAppearance === "left" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1586
+ import_lucide_react3.CheckIcon,
1587
+ {
1588
+ className: (0, import_clsx8.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
1589
+ "aria-hidden": true
1590
+ }
1591
+ ),
1592
+ children ?? value,
1593
+ iconAppearance === "right" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1594
+ import_lucide_react3.CheckIcon,
1595
+ {
1596
+ className: (0, import_clsx8.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
1597
+ "aria-hidden": true
1598
+ }
1599
+ )
1600
+ ]
1601
+ }
1602
+ );
1603
+ }
1604
+ );
1605
+ var defaultSelectButtonTranslation = {
1606
+ en: {
1607
+ clickToSelect: "Click to select"
1608
+ },
1609
+ de: {
1610
+ clickToSelect: "Zum ausw\xE4hlen dr\xFCcken"
1611
+ }
1612
+ };
1613
+ var SelectButton = (0, import_react14.forwardRef)(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
1614
+ const translation = useTranslation([defaultSelectButtonTranslation]);
1615
+ const { state, trigger } = useSelectContext();
1616
+ const { register, unregister, toggleOpen } = trigger;
1617
+ const innerRef = (0, import_react14.useRef)(null);
1618
+ (0, import_react14.useImperativeHandle)(ref, () => innerRef.current);
1619
+ (0, import_react14.useEffect)(() => {
1620
+ register(innerRef);
1621
+ return () => unregister();
1622
+ }, [register, unregister]);
1623
+ const disabled = !!props?.disabled || !!state.disabled;
1624
+ const invalid = state.invalid;
1625
+ const hasValue = state.value.length > 0;
1626
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1627
+ "button",
1628
+ {
1629
+ ...props,
1630
+ ref: innerRef,
1631
+ id: state.id,
1632
+ className: (0, import_clsx8.default)(
1633
+ "flex-row-2 items-center justify-between bg-input-background text-input-text rounded-md px-2.5 py-2.5",
1634
+ "data-placeholder:text-description",
1635
+ props.className
1636
+ ),
1637
+ onClick: () => toggleOpen(!state.isOpen),
1638
+ onKeyDown: (event) => {
1639
+ switch (event.key) {
1640
+ case "ArrowDown":
1641
+ toggleOpen(true, { highlightStartPosition: "first" });
1642
+ break;
1643
+ case "ArrowUp":
1644
+ toggleOpen(true, { highlightStartPosition: "last" });
1645
+ break;
1646
+ }
1647
+ },
1648
+ "data-placeholder": !hasValue ? "" : void 0,
1649
+ "data-disabled": disabled ? "" : void 0,
1650
+ "data-invalid": invalid ? "" : void 0,
1651
+ "aria-invalid": invalid,
1652
+ "aria-disabled": disabled,
1653
+ "aria-haspopup": "listbox",
1654
+ "aria-expanded": state.isOpen,
1655
+ "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
1656
+ children: [
1657
+ hasValue ? selectedDisplay?.(state.value) ?? state.value.join(", ") : placeholder ?? translation("clickToSelect"),
1658
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ExpansionIcon, { isExpanded: state.isOpen })
1659
+ ]
1660
+ }
1661
+ );
1662
+ });
1663
+ var SelectChipDisplay = (0, import_react14.forwardRef)(function SelectChipDisplay2({ ...props }, ref) {
1664
+ const { state, trigger, item } = useSelectContext();
1665
+ const { register, unregister, toggleOpen } = trigger;
1666
+ const innerRef = (0, import_react14.useRef)(null);
1667
+ (0, import_react14.useImperativeHandle)(ref, () => innerRef.current);
1668
+ (0, import_react14.useEffect)(() => {
1669
+ register(innerRef);
1670
+ return () => unregister();
1671
+ }, [register, unregister]);
1672
+ const disabled = !!props?.disabled || !!state.disabled;
1673
+ const invalid = state.invalid;
1674
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1675
+ "div",
1676
+ {
1677
+ ...props,
1678
+ ref: innerRef,
1679
+ className: (0, import_clsx8.default)(
1680
+ "flex flex-wrap flex-row gap-2 items-center bg-input-background text-input-text rounded-md px-2.5 py-2.5",
1681
+ props.className
1682
+ ),
1683
+ "data-disabled": disabled ? "" : void 0,
1684
+ "data-invalid": invalid ? "" : void 0,
1685
+ "aria-invalid": invalid,
1686
+ "aria-disabled": disabled,
1687
+ children: [
1688
+ state.value.map((value) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Chip, { className: "gap-x-2", children: [
1689
+ value,
1690
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1691
+ "button",
1692
+ {
1693
+ onClick: () => {
1694
+ item.toggleSelection(value, false);
1695
+ },
1696
+ className: "focus-within:text-negative hover:bg-negative/20 hover:text-negative rounded-md focus-style-none focus-visible:ring-2 focus-visible:ring-negative focus-visible:bg-negative/20",
1697
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.XIcon, {})
1698
+ }
1699
+ )
1700
+ ] }, value)),
1701
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1702
+ IconButton,
1703
+ {
1704
+ id: state.id,
1705
+ onClick: () => toggleOpen(),
1706
+ onKeyDown: (event) => {
1707
+ switch (event.key) {
1708
+ case "ArrowDown":
1709
+ toggleOpen(true, { highlightStartPosition: "first" });
1710
+ break;
1711
+ case "ArrowUp":
1712
+ toggleOpen(true, { highlightStartPosition: "last" });
1713
+ }
1714
+ },
1715
+ size: "small",
1716
+ color: "neutral",
1717
+ "aria-invalid": invalid,
1718
+ "aria-disabled": disabled,
1719
+ "aria-haspopup": "listbox",
1720
+ "aria-expanded": state.isOpen,
1721
+ "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
1722
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.Plus, {})
1723
+ }
1724
+ )
1725
+ ]
1726
+ }
1727
+ );
1728
+ });
1729
+ var SelectContent = (0, import_react14.forwardRef)(
1730
+ function SelectContent2({
1731
+ alignment,
1732
+ orientation = "vertical",
1733
+ ...props
1734
+ }, ref) {
1735
+ const innerRef = (0, import_react14.useRef)(null);
1736
+ (0, import_react14.useImperativeHandle)(ref, () => innerRef.current);
1737
+ const { trigger, state, config, item } = useSelectContext();
1738
+ const position = useFloatingElement({
1739
+ active: state.isOpen,
1740
+ anchorRef: trigger.ref,
1741
+ containerRef: innerRef,
1742
+ ...alignment
1743
+ });
1744
+ useFocusTrap({
1745
+ container: innerRef,
1746
+ active: state.isOpen && !!position
1747
+ });
1748
+ return (0, import_react_dom2.createPortal)(
1749
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1750
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1751
+ "div",
1752
+ {
1753
+ hidden: !state.isOpen,
1754
+ onClick: () => trigger.toggleOpen(false),
1755
+ className: (0, import_clsx8.default)("fixed w-screen h-screen inset-0")
1756
+ }
1757
+ ),
1758
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1759
+ "ul",
1760
+ {
1761
+ ...props,
1762
+ id: `${state.id}-listbox`,
1763
+ ref: innerRef,
1764
+ hidden: !state.isOpen,
1765
+ onKeyDown: (event) => {
1766
+ switch (event.key) {
1767
+ case "Escape":
1768
+ trigger.toggleOpen(false);
1769
+ event.preventDefault();
1770
+ event.stopPropagation();
1771
+ break;
1772
+ case match(orientation, {
1773
+ vertical: "ArrowDown",
1774
+ horizontal: "ArrowUp"
1775
+ }):
1776
+ item.moveHighlightedIndex(1);
1777
+ event.preventDefault();
1778
+ break;
1779
+ case match(orientation, {
1780
+ vertical: "ArrowUp",
1781
+ horizontal: "ArrowDown"
1782
+ }):
1783
+ item.moveHighlightedIndex(-1);
1784
+ event.preventDefault();
1785
+ break;
1786
+ case "Home":
1787
+ event.preventDefault();
1788
+ break;
1789
+ case "End":
1790
+ event.preventDefault();
1791
+ break;
1792
+ case "Enter":
1793
+ // Fall through
1794
+ case " ":
1795
+ if (state.highlightedValue) {
1796
+ item.toggleSelection(state.highlightedValue);
1797
+ if (!config.isMultiSelect) {
1798
+ trigger.toggleOpen(false);
1799
+ }
1800
+ event.preventDefault();
1801
+ }
1802
+ break;
1803
+ }
1804
+ },
1805
+ className: (0, import_clsx8.default)("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
1806
+ style: {
1807
+ opacity: position ? void 0 : 0,
1808
+ position: "fixed",
1809
+ ...position
1810
+ },
1811
+ role: "listbox",
1812
+ "aria-multiselectable": config.isMultiSelect,
1813
+ "aria-orientation": orientation,
1814
+ tabIndex: position ? 0 : void 0,
1815
+ children: props.children
1816
+ }
1817
+ )
1818
+ ] }),
1819
+ document.body
1820
+ );
1821
+ }
1822
+ );
1823
+ var Select = (0, import_react14.forwardRef)(function Select2({
1824
+ children,
1825
+ contentPanelProps,
1826
+ buttonProps,
1827
+ ...props
1828
+ }, ref) {
1829
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(SelectRoot, { ...props, isMultiSelect: false, children: [
1830
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1831
+ SelectButton,
1832
+ {
1833
+ ref,
1834
+ ...buttonProps,
1835
+ selectedDisplay: (values) => {
1836
+ const value = values[0];
1837
+ if (!buttonProps?.selectedDisplay) return void 0;
1838
+ return buttonProps.selectedDisplay(value);
1839
+ }
1840
+ }
1841
+ ),
1842
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectContent, { ...contentPanelProps, children })
1843
+ ] });
1844
+ });
1845
+ var SelectUncontrolled = (0, import_react14.forwardRef)(function SelectUncontrolled2({
1846
+ value: initialValue,
1847
+ onValueChanged,
1848
+ ...props
1849
+ }, ref) {
1850
+ const [value, setValue] = (0, import_react14.useState)(initialValue);
1851
+ (0, import_react14.useEffect)(() => {
1852
+ setValue(initialValue);
1853
+ }, [initialValue]);
1854
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1855
+ Select,
1856
+ {
1857
+ ...props,
1858
+ ref,
1859
+ value,
1860
+ onValueChanged: (value2) => {
1861
+ setValue(value2);
1862
+ onValueChanged?.(value2);
1863
+ }
1864
+ }
1865
+ );
1866
+ });
1867
+ var MultiSelect = (0, import_react14.forwardRef)(function MultiSelect2({
1868
+ children,
1869
+ contentPanelProps,
1870
+ buttonProps,
1871
+ ...props
1872
+ }, ref) {
1873
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(SelectRoot, { ...props, isMultiSelect: true, children: [
1874
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectButton, { ref, ...buttonProps }),
1875
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectContent, { ...contentPanelProps, children })
1876
+ ] });
1877
+ });
1878
+ var MultiSelectUncontrolled = (0, import_react14.forwardRef)(function MultiSelectUncontrolled2({
1879
+ values: initialValues,
1880
+ onValuesChanged,
1881
+ ...props
1882
+ }, ref) {
1883
+ const [values, setValues] = (0, import_react14.useState)(initialValues);
1884
+ (0, import_react14.useEffect)(() => {
1885
+ setValues(initialValues);
1886
+ }, [initialValues]);
1887
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1888
+ MultiSelect,
1889
+ {
1890
+ ...props,
1891
+ ref,
1892
+ values,
1893
+ onValuesChanged: (value) => {
1894
+ setValues(value);
1895
+ onValuesChanged?.(value);
1896
+ }
1897
+ }
1898
+ );
1899
+ });
1900
+ var MultiSelectChipDisplay = (0, import_react14.forwardRef)(function MultiSelectChipDisplay2({
1901
+ children,
1902
+ contentPanelProps,
1903
+ chipDisplayProps,
1904
+ ...props
1905
+ }, ref) {
1906
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(SelectRoot, { ...props, isMultiSelect: true, children: [
1907
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectChipDisplay, { ref, ...chipDisplayProps }),
1908
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectContent, { ...contentPanelProps, children })
1909
+ ] });
1910
+ });
1911
+ var MultiSelectChipDisplayUncontrolled = (0, import_react14.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
1912
+ values: initialValues,
1913
+ onValuesChanged,
1914
+ ...props
1915
+ }, ref) {
1916
+ const [values, setValues] = (0, import_react14.useState)(initialValues);
1917
+ (0, import_react14.useEffect)(() => {
1918
+ setValues(initialValues);
1919
+ }, [initialValues]);
1920
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1921
+ MultiSelectChipDisplay,
1922
+ {
1923
+ ...props,
1924
+ ref,
1925
+ values,
1926
+ onValuesChanged: (value) => {
1927
+ setValues(value);
1928
+ onValuesChanged?.(value);
1929
+ }
1930
+ }
1931
+ );
1932
+ });
1933
+
1934
+ // src/components/dialog/LanguageDialog.tsx
1935
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1936
+ var defaultLanguageDialogTranslation = {
1937
+ en: {
1938
+ language: "Language",
1939
+ chooseLanguage: "Choose your language",
1940
+ done: "Done",
1941
+ ...LanguageUtil.languagesLocalNames
1942
+ },
1943
+ de: {
1944
+ language: "Sprache",
1945
+ chooseLanguage: "W\xE4hle deine bevorzugte Sprache",
1946
+ done: "Fertig",
1947
+ ...LanguageUtil.languagesLocalNames
1948
+ }
1949
+ };
1950
+ var LanguageDialog = ({
1951
+ overwriteTranslation,
1952
+ onClose,
1953
+ titleOverwrite,
1954
+ descriptionOverwrite,
1955
+ ...props
1956
+ }) => {
1957
+ const { language, setLanguage } = useLanguage();
1958
+ const translation = useTranslation([defaultLanguageDialogTranslation], overwriteTranslation);
1959
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1960
+ Dialog,
1961
+ {
1962
+ titleElement: titleOverwrite ?? translation("language"),
1963
+ description: descriptionOverwrite ?? translation("chooseLanguage"),
1964
+ onClose,
1965
+ ...props,
1966
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w-64", children: [
1967
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1968
+ Select,
1969
+ {
1970
+ value: language,
1971
+ onValueChanged: (language2) => setLanguage(language2),
1972
+ contentPanelProps: { className: "z-100" },
1973
+ buttonProps: {
1974
+ selectedDisplay: (value) => translation(value)
1975
+ },
1976
+ children: LanguageUtil.languages.map((language2) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SelectOption, { value: language2, children: translation(language2) }, language2))
1977
+ }
1978
+ ),
1979
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SolidButton, { color: "positive", onClick: onClose, children: translation("done") }) })
1980
+ ] })
1981
+ }
1982
+ );
1983
+ };
1984
+
1985
+ // src/theming/useTheme.tsx
1986
+ var import_react15 = require("react");
1987
+ var import_react16 = require("react");
1988
+ var import_react17 = require("react");
1989
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1990
+ var themes = ["light", "dark", "system"];
1991
+ var defaultThemeTypeTranslation = {
1992
+ en: {
1993
+ dark: "Dark",
1994
+ light: "Light",
1995
+ system: "System",
1996
+ theme: {
1997
+ one: "Theme",
1998
+ other: "Themes"
1999
+ }
2000
+ },
2001
+ de: {
2002
+ dark: "Dunkel",
2003
+ light: "Hell",
2004
+ system: "System",
2005
+ theme: {
2006
+ one: "Farbschema",
2007
+ other: "Farbschemas"
2008
+ }
2009
+ }
2010
+ };
2011
+ var ThemeUtil = {
2012
+ themes,
2013
+ translation: defaultThemeTypeTranslation
2014
+ };
2015
+ var ThemeContext = (0, import_react17.createContext)(null);
2016
+ var useTheme = () => {
2017
+ const context = (0, import_react17.useContext)(ThemeContext);
2018
+ if (!context) {
2019
+ throw new Error("useTheme must be used within ThemeContext. Try adding a ThemeProvider around your app.");
2020
+ }
2021
+ return context;
2022
+ };
2023
+
2024
+ // src/components/dialog/ThemeDialog.tsx
2025
+ var import_lucide_react4 = require("lucide-react");
2026
+ var import_clsx9 = __toESM(require("clsx"));
2027
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2028
+ var ThemeIcon = ({ theme, className }) => {
2029
+ if (theme === "dark") {
2030
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.MoonIcon, { className: (0, import_clsx9.default)("w-4 h-4", className) });
2031
+ } else if (theme === "light") {
2032
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.SunIcon, { className: (0, import_clsx9.default)("w-4 h-4", className) });
2033
+ } else {
2034
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.MonitorCog, { className: (0, import_clsx9.default)("w-4 h-4", className) });
2035
+ }
2036
+ };
2037
+ var defaultConfirmDialogTranslation = {
2038
+ en: {
2039
+ chooseTheme: "Choose your preferred color theme."
2040
+ },
2041
+ de: {
2042
+ chooseTheme: "W\xE4hle dein bevorzugtes Farbschema."
2043
+ }
2044
+ };
2045
+ var ThemeDialog = ({
2046
+ overwriteTranslation,
2047
+ onClose,
2048
+ titleOverwrite,
2049
+ descriptionOverwrite,
2050
+ ...props
2051
+ }) => {
2052
+ const { theme, setTheme } = useTheme();
2053
+ const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
2054
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2055
+ Dialog,
2056
+ {
2057
+ titleElement: titleOverwrite ?? translation("theme"),
2058
+ description: descriptionOverwrite ?? translation("chooseTheme"),
2059
+ onClose,
2060
+ ...props,
2061
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w-64", children: [
2062
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2063
+ Select,
2064
+ {
2065
+ value: theme,
2066
+ onValueChanged: (theme2) => setTheme(theme2),
2067
+ iconAppearance: "right",
2068
+ contentPanelProps: {
2069
+ className: "z-100"
2070
+ },
2071
+ buttonProps: {
2072
+ selectedDisplay: (value) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex-row-2 items-center", children: [
2073
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ThemeIcon, { theme }),
2074
+ translation(value)
2075
+ ] }),
2076
+ className: "min-w-32"
2077
+ },
2078
+ children: ThemeUtil.themes.map((theme2) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SelectOption, { value: theme2, className: "gap-x-6 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex-row-2 items-center", children: [
2079
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ThemeIcon, { theme: theme2 }),
2080
+ translation(theme2)
2081
+ ] }) }, theme2))
2082
+ }
2083
+ ),
2084
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
2085
+ ] })
2086
+ }
2087
+ );
2088
+ };
2089
+ // Annotate the CommonJS export names for ESM import in node:
2090
+ 0 && (module.exports = {
2091
+ ConfirmDialog,
2092
+ Dialog,
2093
+ DiscardChangesDialog,
2094
+ InputDialog,
2095
+ LanguageDialog,
2096
+ ThemeDialog
2097
+ });
2098
+ //# sourceMappingURL=index.js.map