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