@helpwave/hightide 0.1.25 → 0.1.26

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 (602) 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 +64 -13
  11. package/dist/components/date/DatePicker.js.map +1 -1
  12. package/dist/components/date/DatePicker.mjs +65 -14
  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 +58 -7
  27. package/dist/components/date/YearMonthPicker.js.map +1 -1
  28. package/dist/components/date/YearMonthPicker.mjs +59 -8
  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 +1684 -0
  57. package/dist/components/dialog/LanguageDialog.js.map +1 -0
  58. package/dist/components/dialog/LanguageDialog.mjs +1658 -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 +1715 -0
  63. package/dist/components/dialog/ThemeDialog.js.map +1 -0
  64. package/dist/components/dialog/ThemeDialog.mjs +1689 -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 +2062 -0
  69. package/dist/components/dialog/index.js.map +1 -0
  70. package/dist/components/dialog/index.mjs +2031 -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-and-navigation/BreadCrumb.js +667 -22
  97. package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
  98. package/dist/components/layout-and-navigation/BreadCrumb.mjs +667 -22
  99. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
  100. package/dist/components/layout-and-navigation/Carousel.js +12 -10
  101. package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
  102. package/dist/components/layout-and-navigation/Carousel.mjs +12 -10
  103. package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
  104. package/dist/components/layout-and-navigation/Chip.d.mts +8 -5
  105. package/dist/components/layout-and-navigation/Chip.d.ts +8 -5
  106. package/dist/components/layout-and-navigation/Chip.js +17 -4
  107. package/dist/components/layout-and-navigation/Chip.js.map +1 -1
  108. package/dist/components/layout-and-navigation/Chip.mjs +17 -4
  109. package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
  110. package/dist/components/layout-and-navigation/Expandable.d.mts +13 -10
  111. package/dist/components/layout-and-navigation/Expandable.d.ts +13 -10
  112. package/dist/components/layout-and-navigation/Expandable.js +18 -5
  113. package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
  114. package/dist/components/layout-and-navigation/Expandable.mjs +19 -6
  115. package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
  116. package/dist/components/layout-and-navigation/FAQSection.js +21 -8
  117. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
  118. package/dist/components/layout-and-navigation/FAQSection.mjs +22 -9
  119. package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
  120. package/dist/components/layout-and-navigation/FloatingContainer.d.mts +38 -0
  121. package/dist/components/layout-and-navigation/FloatingContainer.d.ts +38 -0
  122. package/dist/components/layout-and-navigation/FloatingContainer.js +219 -0
  123. package/dist/components/layout-and-navigation/FloatingContainer.js.map +1 -0
  124. package/dist/components/layout-and-navigation/FloatingContainer.mjs +195 -0
  125. package/dist/components/layout-and-navigation/FloatingContainer.mjs.map +1 -0
  126. package/dist/components/layout-and-navigation/ListBox.d.mts +44 -0
  127. package/dist/components/layout-and-navigation/ListBox.d.ts +44 -0
  128. package/dist/components/layout-and-navigation/ListBox.js +329 -0
  129. package/dist/components/layout-and-navigation/ListBox.js.map +1 -0
  130. package/dist/components/layout-and-navigation/ListBox.mjs +290 -0
  131. package/dist/components/layout-and-navigation/ListBox.mjs.map +1 -0
  132. package/dist/components/layout-and-navigation/Pagination.js +104 -189
  133. package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
  134. package/dist/components/layout-and-navigation/Pagination.mjs +99 -184
  135. package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
  136. package/dist/components/layout-and-navigation/ScrollArea.d.mts +15 -0
  137. package/dist/components/layout-and-navigation/ScrollArea.d.ts +15 -0
  138. package/dist/components/layout-and-navigation/ScrollArea.js +1252 -0
  139. package/dist/components/layout-and-navigation/ScrollArea.js.map +1 -0
  140. package/dist/components/layout-and-navigation/ScrollArea.mjs +1216 -0
  141. package/dist/components/layout-and-navigation/ScrollArea.mjs.map +1 -0
  142. package/dist/components/layout-and-navigation/StepperBar.js +41 -1
  143. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  144. package/dist/components/layout-and-navigation/StepperBar.mjs +41 -1
  145. package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
  146. package/dist/components/layout-and-navigation/TextImage.js +3 -1
  147. package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
  148. package/dist/components/layout-and-navigation/TextImage.mjs +3 -1
  149. package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
  150. package/dist/components/loading-states/ErrorComponent.js.map +1 -1
  151. package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
  152. package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +1 -1
  153. package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +1 -1
  154. package/dist/components/loading-states/LoadingAnimation.js +18 -17
  155. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  156. package/dist/components/loading-states/LoadingAnimation.mjs +18 -17
  157. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  158. package/dist/components/loading-states/LoadingButton.js +55 -18
  159. package/dist/components/loading-states/LoadingButton.js.map +1 -1
  160. package/dist/components/loading-states/LoadingButton.mjs +55 -18
  161. package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
  162. package/dist/components/properties/CheckboxProperty.js +890 -135
  163. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  164. package/dist/components/properties/CheckboxProperty.mjs +897 -142
  165. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  166. package/dist/components/properties/DateProperty.js +153 -198
  167. package/dist/components/properties/DateProperty.js.map +1 -1
  168. package/dist/components/properties/DateProperty.mjs +146 -191
  169. package/dist/components/properties/DateProperty.mjs.map +1 -1
  170. package/dist/components/properties/MultiSelectProperty.d.mts +5 -10
  171. package/dist/components/properties/MultiSelectProperty.d.ts +5 -10
  172. package/dist/components/properties/MultiSelectProperty.js +1143 -1160
  173. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  174. package/dist/components/properties/MultiSelectProperty.mjs +1156 -1163
  175. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  176. package/dist/components/properties/NumberProperty.js +155 -201
  177. package/dist/components/properties/NumberProperty.js.map +1 -1
  178. package/dist/components/properties/NumberProperty.mjs +148 -194
  179. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  180. package/dist/components/properties/PropertyBase.js +49 -9
  181. package/dist/components/properties/PropertyBase.js.map +1 -1
  182. package/dist/components/properties/PropertyBase.mjs +49 -9
  183. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  184. package/dist/components/properties/SelectProperty.d.mts +5 -8
  185. package/dist/components/properties/SelectProperty.d.ts +5 -8
  186. package/dist/components/properties/SelectProperty.js +1047 -834
  187. package/dist/components/properties/SelectProperty.js.map +1 -1
  188. package/dist/components/properties/SelectProperty.mjs +1063 -840
  189. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  190. package/dist/components/properties/TextProperty.js +97 -100
  191. package/dist/components/properties/TextProperty.js.map +1 -1
  192. package/dist/components/properties/TextProperty.mjs +100 -103
  193. package/dist/components/properties/TextProperty.mjs.map +1 -1
  194. package/dist/components/table/Table.js +1618 -993
  195. package/dist/components/table/Table.js.map +1 -1
  196. package/dist/components/table/Table.mjs +1625 -1000
  197. package/dist/components/table/Table.mjs.map +1 -1
  198. package/dist/components/table/TableFilterButton.js +116 -201
  199. package/dist/components/table/TableFilterButton.js.map +1 -1
  200. package/dist/components/table/TableFilterButton.mjs +105 -190
  201. package/dist/components/table/TableFilterButton.mjs.map +1 -1
  202. package/dist/components/table/TableSortButton.js +4 -3
  203. package/dist/components/table/TableSortButton.js.map +1 -1
  204. package/dist/components/table/TableSortButton.mjs +4 -3
  205. package/dist/components/table/TableSortButton.mjs.map +1 -1
  206. package/dist/components/user-action/Button.d.mts +15 -11
  207. package/dist/components/user-action/Button.d.ts +15 -11
  208. package/dist/components/user-action/Button.js +10 -9
  209. package/dist/components/user-action/Button.js.map +1 -1
  210. package/dist/components/user-action/Button.mjs +10 -9
  211. package/dist/components/user-action/Button.mjs.map +1 -1
  212. package/dist/components/user-action/Checkbox.d.mts +9 -25
  213. package/dist/components/user-action/Checkbox.d.ts +9 -25
  214. package/dist/components/user-action/Checkbox.js +793 -103
  215. package/dist/components/user-action/Checkbox.js.map +1 -1
  216. package/dist/components/user-action/Checkbox.mjs +794 -104
  217. package/dist/components/user-action/Checkbox.mjs.map +1 -1
  218. package/dist/components/user-action/CopyToClipboardWrapper.js +3 -1
  219. package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
  220. package/dist/components/user-action/CopyToClipboardWrapper.mjs +3 -1
  221. package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
  222. package/dist/components/user-action/DateAndTimePicker.d.mts +1 -1
  223. package/dist/components/user-action/DateAndTimePicker.d.ts +1 -1
  224. package/dist/components/user-action/DateAndTimePicker.js +66 -13
  225. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  226. package/dist/components/user-action/DateAndTimePicker.mjs +67 -14
  227. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  228. package/dist/components/user-action/Label.d.mts +6 -8
  229. package/dist/components/user-action/Label.d.ts +6 -8
  230. package/dist/components/user-action/Label.js +4 -6
  231. package/dist/components/user-action/Label.js.map +1 -1
  232. package/dist/components/user-action/Label.mjs +4 -6
  233. package/dist/components/user-action/Label.mjs.map +1 -1
  234. package/dist/components/user-action/Menu.d.mts +2 -2
  235. package/dist/components/user-action/Menu.d.ts +2 -2
  236. package/dist/components/user-action/Menu.js +1 -1
  237. package/dist/components/user-action/Menu.js.map +1 -1
  238. package/dist/components/user-action/Menu.mjs +1 -1
  239. package/dist/components/user-action/Menu.mjs.map +1 -1
  240. package/dist/components/user-action/ScrollPicker.js +8 -6
  241. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  242. package/dist/components/user-action/ScrollPicker.mjs +8 -6
  243. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  244. package/dist/components/user-action/SearchBar.d.mts +1 -2
  245. package/dist/components/user-action/SearchBar.d.ts +1 -2
  246. package/dist/components/user-action/SearchBar.js +93 -178
  247. package/dist/components/user-action/SearchBar.js.map +1 -1
  248. package/dist/components/user-action/SearchBar.mjs +86 -171
  249. package/dist/components/user-action/SearchBar.mjs.map +1 -1
  250. package/dist/components/user-action/Textarea.d.mts +22 -11
  251. package/dist/components/user-action/Textarea.d.ts +22 -11
  252. package/dist/components/user-action/Textarea.js +101 -92
  253. package/dist/components/user-action/Textarea.js.map +1 -1
  254. package/dist/components/user-action/Textarea.mjs +100 -92
  255. package/dist/components/user-action/Textarea.mjs.map +1 -1
  256. package/dist/components/user-action/input/Input.d.mts +37 -0
  257. package/dist/components/user-action/input/Input.d.ts +37 -0
  258. package/dist/components/user-action/input/Input.js +244 -0
  259. package/dist/components/user-action/input/Input.js.map +1 -0
  260. package/dist/components/user-action/input/Input.mjs +209 -0
  261. package/dist/components/user-action/input/Input.mjs.map +1 -0
  262. package/dist/components/user-action/input/InsideLabelInput.d.mts +20 -0
  263. package/dist/components/user-action/input/InsideLabelInput.d.ts +20 -0
  264. package/dist/components/user-action/input/InsideLabelInput.js +295 -0
  265. package/dist/components/user-action/input/InsideLabelInput.js.map +1 -0
  266. package/dist/components/user-action/input/InsideLabelInput.mjs +260 -0
  267. package/dist/components/user-action/input/InsideLabelInput.mjs.map +1 -0
  268. package/dist/components/user-action/input/ToggleableInput.d.mts +22 -0
  269. package/dist/components/user-action/input/ToggleableInput.d.ts +22 -0
  270. package/dist/components/user-action/{Input.js → input/ToggleableInput.js} +136 -171
  271. package/dist/components/user-action/input/ToggleableInput.js.map +1 -0
  272. package/dist/components/user-action/input/ToggleableInput.mjs +264 -0
  273. package/dist/components/user-action/input/ToggleableInput.mjs.map +1 -0
  274. package/dist/components/user-action/select/Select.d.mts +98 -0
  275. package/dist/components/user-action/select/Select.d.ts +98 -0
  276. package/dist/components/user-action/select/Select.js +1354 -0
  277. package/dist/components/user-action/select/Select.js.map +1 -0
  278. package/dist/components/user-action/select/Select.mjs +1320 -0
  279. package/dist/components/user-action/select/Select.mjs.map +1 -0
  280. package/dist/components/utils/FocusTrap.d.mts +28 -0
  281. package/dist/components/utils/FocusTrap.d.ts +28 -0
  282. package/dist/components/utils/FocusTrap.js +252 -0
  283. package/dist/components/utils/FocusTrap.js.map +1 -0
  284. package/dist/components/utils/FocusTrap.mjs +229 -0
  285. package/dist/components/utils/FocusTrap.mjs.map +1 -0
  286. package/dist/components/utils/Transition.d.mts +26 -0
  287. package/dist/components/utils/Transition.d.ts +26 -0
  288. package/dist/components/utils/Transition.js +74 -0
  289. package/dist/components/utils/Transition.js.map +1 -0
  290. package/dist/components/utils/Transition.mjs +50 -0
  291. package/dist/components/utils/Transition.mjs.map +1 -0
  292. package/dist/hooks/focus/useFocusGuards.d.mts +3 -0
  293. package/dist/hooks/focus/useFocusGuards.d.ts +3 -0
  294. package/dist/hooks/focus/useFocusGuards.js +74 -0
  295. package/dist/hooks/focus/useFocusGuards.js.map +1 -0
  296. package/dist/hooks/focus/useFocusGuards.mjs +50 -0
  297. package/dist/hooks/focus/useFocusGuards.mjs.map +1 -0
  298. package/dist/hooks/{useFocusManagement.js → focus/useFocusManagement.js} +1 -1
  299. package/dist/hooks/focus/useFocusManagement.js.map +1 -0
  300. package/dist/hooks/{useFocusManagement.mjs → focus/useFocusManagement.mjs} +1 -1
  301. package/dist/hooks/focus/useFocusManagement.mjs.map +1 -0
  302. package/dist/hooks/{useFocusOnceVisible.js → focus/useFocusOnceVisible.js} +1 -1
  303. package/dist/hooks/focus/useFocusOnceVisible.js.map +1 -0
  304. package/dist/hooks/{useFocusOnceVisible.mjs → focus/useFocusOnceVisible.mjs} +1 -1
  305. package/dist/hooks/focus/useFocusOnceVisible.mjs.map +1 -0
  306. package/dist/hooks/focus/useFocusTrap.d.mts +16 -0
  307. package/dist/hooks/focus/useFocusTrap.d.ts +16 -0
  308. package/dist/hooks/focus/useFocusTrap.js +233 -0
  309. package/dist/hooks/focus/useFocusTrap.js.map +1 -0
  310. package/dist/hooks/focus/useFocusTrap.mjs +210 -0
  311. package/dist/hooks/focus/useFocusTrap.mjs.map +1 -0
  312. package/dist/hooks/focus/useIsMounted.d.mts +3 -0
  313. package/dist/hooks/focus/useIsMounted.d.ts +3 -0
  314. package/dist/hooks/focus/useIsMounted.js +43 -0
  315. package/dist/hooks/focus/useIsMounted.js.map +1 -0
  316. package/dist/hooks/focus/useIsMounted.mjs +20 -0
  317. package/dist/hooks/focus/useIsMounted.mjs.map +1 -0
  318. package/dist/hooks/useFloatingElement.d.mts +22 -0
  319. package/dist/hooks/useFloatingElement.d.ts +22 -0
  320. package/dist/hooks/useFloatingElement.js +162 -0
  321. package/dist/hooks/useFloatingElement.js.map +1 -0
  322. package/dist/hooks/useFloatingElement.mjs +139 -0
  323. package/dist/hooks/useFloatingElement.mjs.map +1 -0
  324. package/dist/hooks/useLocalStorage.js +2 -2
  325. package/dist/hooks/useLocalStorage.js.map +1 -1
  326. package/dist/hooks/useLocalStorage.mjs +2 -2
  327. package/dist/hooks/useLocalStorage.mjs.map +1 -1
  328. package/dist/hooks/useLogOnce.d.mts +3 -4
  329. package/dist/hooks/useLogOnce.d.ts +3 -4
  330. package/dist/hooks/useLogOnce.js +5 -5
  331. package/dist/hooks/useLogOnce.js.map +1 -1
  332. package/dist/hooks/useLogOnce.mjs +5 -5
  333. package/dist/hooks/useLogOnce.mjs.map +1 -1
  334. package/dist/hooks/useRerender.d.mts +2 -2
  335. package/dist/hooks/useRerender.d.ts +2 -2
  336. package/dist/hooks/useSearch.d.mts +2 -2
  337. package/dist/hooks/useSearch.d.ts +2 -2
  338. package/dist/hooks/useSearch.js +1 -1
  339. package/dist/hooks/useSearch.js.map +1 -1
  340. package/dist/hooks/useSearch.mjs +1 -1
  341. package/dist/hooks/useSearch.mjs.map +1 -1
  342. package/dist/localization/LanguageProvider.d.mts +2 -2
  343. package/dist/localization/LanguageProvider.d.ts +2 -2
  344. package/dist/localization/LanguageProvider.js +2 -2
  345. package/dist/localization/LanguageProvider.js.map +1 -1
  346. package/dist/localization/LanguageProvider.mjs +2 -2
  347. package/dist/localization/LanguageProvider.mjs.map +1 -1
  348. package/dist/localization/defaults/form.d.mts +1 -0
  349. package/dist/localization/defaults/form.d.ts +1 -0
  350. package/dist/localization/defaults/form.js +2 -0
  351. package/dist/localization/defaults/form.js.map +1 -1
  352. package/dist/localization/defaults/form.mjs +2 -0
  353. package/dist/localization/defaults/form.mjs.map +1 -1
  354. package/dist/localization/useTranslation.js.map +1 -1
  355. package/dist/localization/useTranslation.mjs.map +1 -1
  356. package/dist/storybook/helper.d.mts +17 -0
  357. package/dist/storybook/helper.d.ts +17 -0
  358. package/dist/storybook/helper.js +61 -0
  359. package/dist/storybook/helper.js.map +1 -0
  360. package/dist/storybook/helper.mjs +37 -0
  361. package/dist/storybook/helper.mjs.map +1 -0
  362. package/dist/{css → style}/globals.css +779 -374
  363. package/dist/{css → style}/uncompiled/globals.css +75 -13
  364. package/dist/{css → style}/uncompiled/theme/colors-component.css +18 -4
  365. package/dist/{css → style}/uncompiled/theme/colors-semantic.css +2 -9
  366. package/dist/style/uncompiled/typography.css +171 -0
  367. package/dist/{css → style}/uncompiled/utitlity/animation.css +54 -42
  368. package/dist/{css → style}/uncompiled/utitlity/index.css +2 -1
  369. package/dist/{css → style}/uncompiled/utitlity/shadow.css +5 -1
  370. package/dist/style/uncompiled/utitlity/sizing.css +29 -0
  371. package/dist/theming/useTheme.d.mts +2 -2
  372. package/dist/theming/useTheme.d.ts +2 -2
  373. package/dist/theming/useTheme.js +3 -3
  374. package/dist/theming/useTheme.js.map +1 -1
  375. package/dist/theming/useTheme.mjs +3 -3
  376. package/dist/theming/useTheme.mjs.map +1 -1
  377. package/dist/{util → utils}/array.d.mts +1 -0
  378. package/dist/{util → utils}/array.d.ts +1 -0
  379. package/dist/{util → utils}/array.js +15 -2
  380. package/dist/utils/array.js.map +1 -0
  381. package/dist/{util → utils}/array.mjs +15 -2
  382. package/dist/utils/array.mjs.map +1 -0
  383. package/dist/utils/bagFunctions.d.mts +15 -0
  384. package/dist/utils/bagFunctions.d.ts +15 -0
  385. package/dist/{util/PropsWithFunctionChildren.js → utils/bagFunctions.js} +5 -5
  386. package/dist/utils/bagFunctions.js.map +1 -0
  387. package/dist/{util/PropsWithFunctionChildren.mjs → utils/bagFunctions.mjs} +2 -2
  388. package/dist/utils/bagFunctions.mjs.map +1 -0
  389. package/dist/{util → utils}/builder.js +1 -1
  390. package/dist/utils/builder.js.map +1 -0
  391. package/dist/{util → utils}/builder.mjs +1 -1
  392. package/dist/utils/builder.mjs.map +1 -0
  393. package/dist/{util → utils}/date.js +3 -3
  394. package/dist/utils/date.js.map +1 -0
  395. package/dist/{util → utils}/date.mjs +2 -2
  396. package/dist/utils/date.mjs.map +1 -0
  397. package/dist/{util → utils}/easeFunctions.js +5 -4
  398. package/dist/utils/easeFunctions.js.map +1 -0
  399. package/dist/{util → utils}/easeFunctions.mjs +4 -3
  400. package/dist/utils/easeFunctions.mjs.map +1 -0
  401. package/dist/{util → utils}/emailValidation.js +1 -1
  402. package/dist/utils/emailValidation.js.map +1 -0
  403. package/dist/{util → utils}/emailValidation.mjs +1 -1
  404. package/dist/utils/emailValidation.mjs.map +1 -0
  405. package/dist/{util → utils}/loopingArray.js +1 -1
  406. package/dist/utils/loopingArray.js.map +1 -0
  407. package/dist/{util → utils}/loopingArray.mjs +1 -1
  408. package/dist/utils/loopingArray.mjs.map +1 -0
  409. package/dist/utils/match.d.mts +3 -0
  410. package/dist/utils/match.d.ts +3 -0
  411. package/dist/utils/match.js +32 -0
  412. package/dist/utils/match.js.map +1 -0
  413. package/dist/utils/match.mjs +8 -0
  414. package/dist/utils/match.mjs.map +1 -0
  415. package/dist/utils/math.d.mts +3 -0
  416. package/dist/utils/math.d.ts +3 -0
  417. package/dist/{util → utils}/math.js +3 -2
  418. package/dist/utils/math.js.map +1 -0
  419. package/dist/utils/math.mjs +9 -0
  420. package/dist/utils/math.mjs.map +1 -0
  421. package/dist/{util → utils}/noop.js +1 -1
  422. package/dist/utils/noop.js.map +1 -0
  423. package/dist/utils/noop.mjs +6 -0
  424. package/dist/utils/noop.mjs.map +1 -0
  425. package/dist/{util → utils}/resolveSetState.js +1 -1
  426. package/dist/utils/resolveSetState.js.map +1 -0
  427. package/dist/{util → utils}/resolveSetState.mjs +1 -1
  428. package/dist/utils/resolveSetState.mjs.map +1 -0
  429. package/dist/{util → utils}/simpleSearch.js +1 -1
  430. package/dist/utils/simpleSearch.js.map +1 -0
  431. package/dist/{util → utils}/simpleSearch.mjs +1 -1
  432. package/dist/utils/simpleSearch.mjs.map +1 -0
  433. package/dist/{util → utils}/storage.js +1 -1
  434. package/dist/utils/storage.js.map +1 -0
  435. package/dist/{util → utils}/storage.mjs +1 -1
  436. package/dist/utils/storage.mjs.map +1 -0
  437. package/dist/{util → utils}/writeToClipboard.js +2 -1
  438. package/dist/utils/writeToClipboard.js.map +1 -0
  439. package/dist/{util → utils}/writeToClipboard.mjs +3 -1
  440. package/dist/utils/writeToClipboard.mjs.map +1 -0
  441. package/package.json +8 -8
  442. package/dist/components/dialogs/ConfirmDialog.js +0 -674
  443. package/dist/components/dialogs/ConfirmDialog.js.map +0 -1
  444. package/dist/components/dialogs/ConfirmDialog.mjs +0 -638
  445. package/dist/components/dialogs/ConfirmDialog.mjs.map +0 -1
  446. package/dist/components/icons-and-geometry/Helpwave.js.map +0 -1
  447. package/dist/components/icons-and-geometry/Helpwave.mjs.map +0 -1
  448. package/dist/components/layout-and-navigation/Overlay.d.mts +0 -67
  449. package/dist/components/layout-and-navigation/Overlay.d.ts +0 -67
  450. package/dist/components/layout-and-navigation/Overlay.js +0 -702
  451. package/dist/components/layout-and-navigation/Overlay.js.map +0 -1
  452. package/dist/components/layout-and-navigation/Overlay.mjs +0 -665
  453. package/dist/components/layout-and-navigation/Overlay.mjs.map +0 -1
  454. package/dist/components/layout-and-navigation/SearchableList.d.mts +0 -24
  455. package/dist/components/layout-and-navigation/SearchableList.d.ts +0 -24
  456. package/dist/components/layout-and-navigation/SearchableList.js +0 -758
  457. package/dist/components/layout-and-navigation/SearchableList.js.map +0 -1
  458. package/dist/components/layout-and-navigation/SearchableList.mjs +0 -724
  459. package/dist/components/layout-and-navigation/SearchableList.mjs.map +0 -1
  460. package/dist/components/layout-and-navigation/Tile.d.mts +0 -27
  461. package/dist/components/layout-and-navigation/Tile.d.ts +0 -27
  462. package/dist/components/layout-and-navigation/Tile.js +0 -96
  463. package/dist/components/layout-and-navigation/Tile.js.map +0 -1
  464. package/dist/components/layout-and-navigation/Tile.mjs +0 -61
  465. package/dist/components/layout-and-navigation/Tile.mjs.map +0 -1
  466. package/dist/components/modals/ConfirmModal.d.mts +0 -33
  467. package/dist/components/modals/ConfirmModal.d.ts +0 -33
  468. package/dist/components/modals/ConfirmModal.js +0 -687
  469. package/dist/components/modals/ConfirmModal.js.map +0 -1
  470. package/dist/components/modals/ConfirmModal.mjs +0 -651
  471. package/dist/components/modals/ConfirmModal.mjs.map +0 -1
  472. package/dist/components/modals/DiscardChangesModal.d.mts +0 -20
  473. package/dist/components/modals/DiscardChangesModal.d.ts +0 -20
  474. package/dist/components/modals/DiscardChangesModal.js +0 -717
  475. package/dist/components/modals/DiscardChangesModal.js.map +0 -1
  476. package/dist/components/modals/DiscardChangesModal.mjs +0 -681
  477. package/dist/components/modals/DiscardChangesModal.mjs.map +0 -1
  478. package/dist/components/modals/InputModal.d.mts +0 -21
  479. package/dist/components/modals/InputModal.d.ts +0 -21
  480. package/dist/components/modals/InputModal.js +0 -976
  481. package/dist/components/modals/InputModal.js.map +0 -1
  482. package/dist/components/modals/InputModal.mjs +0 -940
  483. package/dist/components/modals/InputModal.mjs.map +0 -1
  484. package/dist/components/modals/LanguageModal.d.mts +0 -21
  485. package/dist/components/modals/LanguageModal.d.ts +0 -21
  486. package/dist/components/modals/LanguageModal.js +0 -1468
  487. package/dist/components/modals/LanguageModal.js.map +0 -1
  488. package/dist/components/modals/LanguageModal.mjs +0 -1432
  489. package/dist/components/modals/LanguageModal.mjs.map +0 -1
  490. package/dist/components/modals/ThemeModal.d.mts +0 -21
  491. package/dist/components/modals/ThemeModal.d.ts +0 -21
  492. package/dist/components/modals/ThemeModal.js +0 -1497
  493. package/dist/components/modals/ThemeModal.js.map +0 -1
  494. package/dist/components/modals/ThemeModal.mjs +0 -1461
  495. package/dist/components/modals/ThemeModal.mjs.map +0 -1
  496. package/dist/components/user-action/Input.d.mts +0 -77
  497. package/dist/components/user-action/Input.d.ts +0 -77
  498. package/dist/components/user-action/Input.js.map +0 -1
  499. package/dist/components/user-action/Input.mjs +0 -298
  500. package/dist/components/user-action/Input.mjs.map +0 -1
  501. package/dist/components/user-action/MultiSelect.d.mts +0 -42
  502. package/dist/components/user-action/MultiSelect.d.ts +0 -42
  503. package/dist/components/user-action/MultiSelect.js +0 -1468
  504. package/dist/components/user-action/MultiSelect.js.map +0 -1
  505. package/dist/components/user-action/MultiSelect.mjs +0 -1433
  506. package/dist/components/user-action/MultiSelect.mjs.map +0 -1
  507. package/dist/components/user-action/Select.d.mts +0 -41
  508. package/dist/components/user-action/Select.d.ts +0 -41
  509. package/dist/components/user-action/Select.js +0 -1236
  510. package/dist/components/user-action/Select.js.map +0 -1
  511. package/dist/components/user-action/Select.mjs +0 -1201
  512. package/dist/components/user-action/Select.mjs.map +0 -1
  513. package/dist/components/user-action/ToggleableInput.d.mts +0 -37
  514. package/dist/components/user-action/ToggleableInput.d.ts +0 -37
  515. package/dist/components/user-action/ToggleableInput.js +0 -192
  516. package/dist/components/user-action/ToggleableInput.js.map +0 -1
  517. package/dist/components/user-action/ToggleableInput.mjs +0 -157
  518. package/dist/components/user-action/ToggleableInput.mjs.map +0 -1
  519. package/dist/css/uncompiled/textstyles.css +0 -69
  520. package/dist/hooks/useFocusManagement.js.map +0 -1
  521. package/dist/hooks/useFocusManagement.mjs.map +0 -1
  522. package/dist/hooks/useFocusOnceVisible.js.map +0 -1
  523. package/dist/hooks/useFocusOnceVisible.mjs.map +0 -1
  524. package/dist/index.d.mts +0 -103
  525. package/dist/index.d.ts +0 -103
  526. package/dist/index.js +0 -12610
  527. package/dist/index.js.map +0 -1
  528. package/dist/index.mjs +0 -12447
  529. package/dist/index.mjs.map +0 -1
  530. package/dist/util/PropsWithFunctionChildren.d.mts +0 -14
  531. package/dist/util/PropsWithFunctionChildren.d.ts +0 -14
  532. package/dist/util/PropsWithFunctionChildren.js.map +0 -1
  533. package/dist/util/PropsWithFunctionChildren.mjs.map +0 -1
  534. package/dist/util/array.js.map +0 -1
  535. package/dist/util/array.mjs.map +0 -1
  536. package/dist/util/builder.js.map +0 -1
  537. package/dist/util/builder.mjs.map +0 -1
  538. package/dist/util/date.js.map +0 -1
  539. package/dist/util/date.mjs.map +0 -1
  540. package/dist/util/easeFunctions.js.map +0 -1
  541. package/dist/util/easeFunctions.mjs.map +0 -1
  542. package/dist/util/emailValidation.js.map +0 -1
  543. package/dist/util/emailValidation.mjs.map +0 -1
  544. package/dist/util/loopingArray.js.map +0 -1
  545. package/dist/util/loopingArray.mjs.map +0 -1
  546. package/dist/util/math.d.mts +0 -3
  547. package/dist/util/math.d.ts +0 -3
  548. package/dist/util/math.js.map +0 -1
  549. package/dist/util/math.mjs +0 -8
  550. package/dist/util/math.mjs.map +0 -1
  551. package/dist/util/news.d.mts +0 -101
  552. package/dist/util/news.d.ts +0 -101
  553. package/dist/util/news.js +0 -76
  554. package/dist/util/news.js.map +0 -1
  555. package/dist/util/news.mjs +0 -49
  556. package/dist/util/news.mjs.map +0 -1
  557. package/dist/util/noop.js.map +0 -1
  558. package/dist/util/noop.mjs +0 -6
  559. package/dist/util/noop.mjs.map +0 -1
  560. package/dist/util/resolveSetState.js.map +0 -1
  561. package/dist/util/resolveSetState.mjs.map +0 -1
  562. package/dist/util/simpleSearch.js.map +0 -1
  563. package/dist/util/simpleSearch.mjs.map +0 -1
  564. package/dist/util/storage.js.map +0 -1
  565. package/dist/util/storage.mjs.map +0 -1
  566. package/dist/util/types.d.mts +0 -3
  567. package/dist/util/types.d.ts +0 -3
  568. package/dist/util/types.js +0 -18
  569. package/dist/util/types.js.map +0 -1
  570. package/dist/util/types.mjs +0 -1
  571. package/dist/util/types.mjs.map +0 -1
  572. package/dist/util/writeToClipboard.js.map +0 -1
  573. package/dist/util/writeToClipboard.mjs.map +0 -1
  574. /package/dist/hooks/{useFocusManagement.d.mts → focus/useFocusManagement.d.mts} +0 -0
  575. /package/dist/hooks/{useFocusManagement.d.ts → focus/useFocusManagement.d.ts} +0 -0
  576. /package/dist/hooks/{useFocusOnceVisible.d.mts → focus/useFocusOnceVisible.d.mts} +0 -0
  577. /package/dist/hooks/{useFocusOnceVisible.d.ts → focus/useFocusOnceVisible.d.ts} +0 -0
  578. /package/dist/{css → style}/uncompiled/theme/colors-basic.css +0 -0
  579. /package/dist/{css → style}/uncompiled/theme/index.css +0 -0
  580. /package/dist/{css → style}/uncompiled/theme/variants.css +0 -0
  581. /package/dist/{css → style}/uncompiled/utitlity/borderradius.css +0 -0
  582. /package/dist/{css → style}/uncompiled/utitlity/general.css +0 -0
  583. /package/dist/{util → utils}/builder.d.mts +0 -0
  584. /package/dist/{util → utils}/builder.d.ts +0 -0
  585. /package/dist/{util → utils}/date.d.mts +0 -0
  586. /package/dist/{util → utils}/date.d.ts +0 -0
  587. /package/dist/{util → utils}/easeFunctions.d.mts +0 -0
  588. /package/dist/{util → utils}/easeFunctions.d.ts +0 -0
  589. /package/dist/{util → utils}/emailValidation.d.mts +0 -0
  590. /package/dist/{util → utils}/emailValidation.d.ts +0 -0
  591. /package/dist/{util → utils}/loopingArray.d.mts +0 -0
  592. /package/dist/{util → utils}/loopingArray.d.ts +0 -0
  593. /package/dist/{util → utils}/noop.d.mts +0 -0
  594. /package/dist/{util → utils}/noop.d.ts +0 -0
  595. /package/dist/{util → utils}/resolveSetState.d.mts +0 -0
  596. /package/dist/{util → utils}/resolveSetState.d.ts +0 -0
  597. /package/dist/{util → utils}/simpleSearch.d.mts +0 -0
  598. /package/dist/{util → utils}/simpleSearch.d.ts +0 -0
  599. /package/dist/{util → utils}/storage.d.mts +0 -0
  600. /package/dist/{util → utils}/storage.d.ts +0 -0
  601. /package/dist/{util → utils}/writeToClipboard.d.mts +0 -0
  602. /package/dist/{util → utils}/writeToClipboard.d.ts +0 -0
@@ -1,1497 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/components/modals/ThemeModal.tsx
30
- var ThemeModal_exports = {};
31
- __export(ThemeModal_exports, {
32
- ThemeModal: () => ThemeModal
33
- });
34
- module.exports = __toCommonJS(ThemeModal_exports);
35
-
36
- // src/localization/LanguageProvider.tsx
37
- var import_react2 = require("react");
38
-
39
- // src/hooks/useLocalStorage.ts
40
- var import_react = require("react");
41
-
42
- // src/localization/util.ts
43
- var languages = ["en", "de"];
44
- var languagesLocalNames = {
45
- en: "English",
46
- de: "Deutsch"
47
- };
48
- var DEFAULT_LANGUAGE = "en";
49
- var LanguageUtil = {
50
- languages,
51
- DEFAULT_LANGUAGE,
52
- languagesLocalNames
53
- };
54
-
55
- // src/localization/LanguageProvider.tsx
56
- var import_jsx_runtime = require("react/jsx-runtime");
57
- var LanguageContext = (0, import_react2.createContext)({
58
- language: LanguageUtil.DEFAULT_LANGUAGE,
59
- setLanguage: (v) => v
60
- });
61
- var useLanguage = () => (0, import_react2.useContext)(LanguageContext);
62
-
63
- // src/localization/useTranslation.ts
64
- var TranslationPluralCount = {
65
- zero: 0,
66
- one: 1,
67
- two: 2,
68
- few: 3,
69
- many: 11,
70
- other: -1
71
- };
72
- var useTranslation = (translations, overwriteTranslation = {}) => {
73
- const { language: languageProp, translation: overwrite } = overwriteTranslation;
74
- const { language: inferredLanguage } = useLanguage();
75
- const usedLanguage = languageProp ?? inferredLanguage;
76
- const usedTranslations = [...translations];
77
- if (overwrite) {
78
- usedTranslations.push(overwrite);
79
- }
80
- return (key, options) => {
81
- const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
82
- try {
83
- for (let i = translations.length - 1; i >= 0; i--) {
84
- const translation = translations[i];
85
- const localizedTranslation = translation[usedLanguage];
86
- if (!localizedTranslation) {
87
- continue;
88
- }
89
- const value = localizedTranslation[key];
90
- if (!value) {
91
- continue;
92
- }
93
- let forProcessing;
94
- if (typeof value !== "string") {
95
- if (count === TranslationPluralCount.zero && value?.zero) {
96
- forProcessing = value.zero;
97
- } else if (count === TranslationPluralCount.one && value?.one) {
98
- forProcessing = value.one;
99
- } else if (count === TranslationPluralCount.two && value?.two) {
100
- forProcessing = value.two;
101
- } else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
102
- forProcessing = value.few;
103
- } else if (count > TranslationPluralCount.many && value?.many) {
104
- forProcessing = value.many;
105
- } else {
106
- forProcessing = value.other;
107
- }
108
- } else {
109
- forProcessing = value;
110
- }
111
- forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
112
- return replacements[placeholder] ?? `{{key:${placeholder}}}`;
113
- });
114
- return forProcessing;
115
- }
116
- } catch (e) {
117
- console.error(e);
118
- }
119
- return `{{${usedLanguage}:${key}}}`;
120
- };
121
- };
122
-
123
- // src/components/user-action/Select.tsx
124
- var import_react13 = require("react");
125
- var import_react14 = require("react");
126
- var import_clsx8 = __toESM(require("clsx"));
127
-
128
- // src/components/user-action/Label.tsx
129
- var import_clsx = __toESM(require("clsx"));
130
- var import_jsx_runtime2 = require("react/jsx-runtime");
131
- var styleMapping = {
132
- labelSmall: "textstyle-label-sm",
133
- labelMedium: "textstyle-label-md",
134
- labelBig: "textstyle-label-lg"
135
- };
136
- var Label = ({
137
- children,
138
- name,
139
- labelType = "labelSmall",
140
- className,
141
- ...props
142
- }) => {
143
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { ...props, className: (0, import_clsx.default)(styleMapping[labelType], className), children: children ? children : name });
144
- };
145
-
146
- // src/components/layout-and-navigation/Tile.tsx
147
- var import_clsx2 = __toESM(require("clsx"));
148
- var import_lucide_react = require("lucide-react");
149
- var import_jsx_runtime3 = require("react/jsx-runtime");
150
- var Tile = ({
151
- title,
152
- titleClassName,
153
- description,
154
- descriptionClassName,
155
- onClick,
156
- isSelected = false,
157
- disabled = false,
158
- prefix,
159
- suffix,
160
- normalClassName = "hover:bg-primary/40 cursor-pointer",
161
- selectedClassName = "bg-primary/20",
162
- disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
163
- className
164
- }) => {
165
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
166
- "div",
167
- {
168
- className: (0, import_clsx2.default)(
169
- "flex-row-2 w-full items-center",
170
- {
171
- [normalClassName]: onClick && !disabled,
172
- [selectedClassName]: isSelected && !disabled,
173
- [disabledClassName]: disabled
174
- },
175
- className
176
- ),
177
- onClick: disabled ? void 0 : onClick,
178
- children: [
179
- prefix,
180
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-col-0 w-full", children: [
181
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_clsx2.default)(titleClassName ?? "textstyle-title-normal"), children: title }),
182
- !!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_clsx2.default)(descriptionClassName ?? "textstyle-description"), children: description })
183
- ] }),
184
- suffix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Check, { size: 24 }) : void 0)
185
- ]
186
- }
187
- );
188
- };
189
- var ListTile = ({
190
- ...props
191
- }) => {
192
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
193
- Tile,
194
- {
195
- ...props,
196
- titleClassName: props.titleClassName ?? "font-semibold",
197
- className: (0, import_clsx2.default)("px-2 py-1 rounded-md", props.className),
198
- disabledClassName: props.disabledClassName ?? "text-disabled-text cursor-not-allowed"
199
- }
200
- );
201
- };
202
-
203
- // src/components/layout-and-navigation/Expandable.tsx
204
- var import_react3 = require("react");
205
- var import_lucide_react2 = require("lucide-react");
206
- var import_clsx3 = __toESM(require("clsx"));
207
-
208
- // src/util/noop.ts
209
- var noop = () => void 0;
210
-
211
- // src/components/layout-and-navigation/Expandable.tsx
212
- var import_jsx_runtime4 = require("react/jsx-runtime");
213
- var ExpansionIcon = ({ isExpanded, className }) => {
214
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
215
- import_lucide_react2.ChevronDown,
216
- {
217
- className: (0, import_clsx3.default)(
218
- "min-w-6 w-6 min-h-6 h-6 transition-transform duration-200 ease-in-out",
219
- { "rotate-180": isExpanded },
220
- className
221
- )
222
- }
223
- );
224
- };
225
- var Expandable = (0, import_react3.forwardRef)(function Expandable2({
226
- children,
227
- label,
228
- icon,
229
- isExpanded = false,
230
- onChange = noop,
231
- clickOnlyOnHeader = true,
232
- disabled = false,
233
- className,
234
- headerClassName,
235
- contentClassName,
236
- contentExpandedClassName
237
- }, ref) {
238
- const defaultIcon = (0, import_react3.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
239
- icon ??= defaultIcon;
240
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
241
- "div",
242
- {
243
- ref,
244
- className: (0, import_clsx3.default)("flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
245
- onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
246
- children: [
247
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
248
- "div",
249
- {
250
- className: (0, import_clsx3.default)(
251
- "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
252
- {
253
- "group-hover:brightness-97": !isExpanded,
254
- "hover:brightness-97": isExpanded && !disabled,
255
- "cursor-pointer": clickOnlyOnHeader && !disabled
256
- },
257
- headerClassName
258
- ),
259
- onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
260
- children: [
261
- label,
262
- icon(isExpanded)
263
- ]
264
- }
265
- ),
266
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
267
- "div",
268
- {
269
- className: (0, import_clsx3.default)(
270
- "flex-col-2 px-4 transition-all duration-300 ease-in-out",
271
- {
272
- [(0, import_clsx3.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
273
- "max-h-0 opacity-0 overflow-hidden": !isExpanded
274
- },
275
- contentClassName
276
- ),
277
- children
278
- }
279
- )
280
- ]
281
- }
282
- );
283
- });
284
- var ExpandableUncontrolled = (0, import_react3.forwardRef)(function ExpandableUncontrolled2({
285
- isExpanded,
286
- onChange = noop,
287
- ...props
288
- }, ref) {
289
- const [usedIsExpanded, setUsedIsExpanded] = (0, import_react3.useState)(isExpanded);
290
- (0, import_react3.useEffect)(() => {
291
- setUsedIsExpanded(isExpanded);
292
- }, [isExpanded]);
293
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
294
- Expandable,
295
- {
296
- ...props,
297
- ref,
298
- isExpanded: usedIsExpanded,
299
- onChange: (value) => {
300
- onChange(value);
301
- setUsedIsExpanded(value);
302
- }
303
- }
304
- );
305
- });
306
-
307
- // src/components/user-action/Menu.tsx
308
- var import_react6 = require("react");
309
- var import_clsx4 = __toESM(require("clsx"));
310
-
311
- // src/hooks/useOutsideClick.ts
312
- var import_react4 = require("react");
313
- var useOutsideClick = (refs, handler) => {
314
- (0, import_react4.useEffect)(() => {
315
- const listener = (event) => {
316
- if (event.target === null) return;
317
- if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
318
- return;
319
- }
320
- handler();
321
- };
322
- document.addEventListener("mousedown", listener);
323
- document.addEventListener("touchstart", listener);
324
- return () => {
325
- document.removeEventListener("mousedown", listener);
326
- document.removeEventListener("touchstart", listener);
327
- };
328
- }, [refs, handler]);
329
- };
330
-
331
- // src/hooks/useHoverState.ts
332
- var import_react5 = require("react");
333
- var defaultUseHoverStateProps = {
334
- closingDelay: 200,
335
- isDisabled: false
336
- };
337
- var useHoverState = (props = void 0) => {
338
- const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
339
- const [isHovered, setIsHovered] = (0, import_react5.useState)(false);
340
- const [timer, setTimer] = (0, import_react5.useState)();
341
- const onMouseEnter = () => {
342
- if (isDisabled) {
343
- return;
344
- }
345
- clearTimeout(timer);
346
- setIsHovered(true);
347
- };
348
- const onMouseLeave = () => {
349
- if (isDisabled) {
350
- return;
351
- }
352
- setTimer(setTimeout(() => {
353
- setIsHovered(false);
354
- }, closingDelay));
355
- };
356
- (0, import_react5.useEffect)(() => {
357
- if (timer) {
358
- return () => {
359
- clearTimeout(timer);
360
- };
361
- }
362
- });
363
- (0, import_react5.useEffect)(() => {
364
- if (timer) {
365
- clearTimeout(timer);
366
- }
367
- }, [isDisabled]);
368
- return {
369
- isHovered,
370
- setIsHovered,
371
- handlers: { onMouseEnter, onMouseLeave }
372
- };
373
- };
374
-
375
- // src/util/PropsWithFunctionChildren.ts
376
- var resolve = (children, bag) => {
377
- if (typeof children === "function") {
378
- return children(bag);
379
- }
380
- return children ?? void 0;
381
- };
382
- var BagFunctionUtil = {
383
- resolve
384
- };
385
-
386
- // src/hooks/usePopoverPosition.ts
387
- var defaultPopoverPositionOptions = {
388
- edgePadding: 16,
389
- outerGap: 4,
390
- horizontalAlignment: "leftInside",
391
- verticalAlignment: "bottomOutside",
392
- disabled: false
393
- };
394
- var usePopoverPosition = (trigger, options) => {
395
- const {
396
- edgePadding,
397
- outerGap,
398
- verticalAlignment,
399
- horizontalAlignment,
400
- disabled
401
- } = { ...defaultPopoverPositionOptions, ...options };
402
- if (disabled || !trigger) {
403
- return {};
404
- }
405
- const left = {
406
- leftOutside: trigger.left - outerGap,
407
- leftInside: trigger.left,
408
- rightOutside: trigger.right + outerGap,
409
- rightInside: trigger.right,
410
- center: trigger.left + trigger.width / 2
411
- }[horizontalAlignment];
412
- const top = {
413
- topOutside: trigger.top - outerGap,
414
- topInside: trigger.top,
415
- bottomOutside: trigger.bottom + outerGap,
416
- bottomInside: trigger.bottom,
417
- center: trigger.top + trigger.height / 2
418
- }[verticalAlignment];
419
- const translateX = {
420
- leftOutside: "-100%",
421
- leftInside: void 0,
422
- rightOutside: void 0,
423
- rightInside: "-100%",
424
- center: "-50%"
425
- }[horizontalAlignment];
426
- const translateY = {
427
- topOutside: "-100%",
428
- topInside: void 0,
429
- bottomOutside: void 0,
430
- bottomInside: "-100%",
431
- center: "-50%"
432
- }[verticalAlignment];
433
- return {
434
- left: Math.max(left, edgePadding),
435
- top: Math.max(top, edgePadding),
436
- translate: [translateX ?? "0", translateY ?? "0"].join(" ")
437
- };
438
- };
439
-
440
- // src/components/user-action/Menu.tsx
441
- var import_react_dom = require("react-dom");
442
- var import_jsx_runtime5 = require("react/jsx-runtime");
443
- function getScrollableParents(element) {
444
- const scrollables = [];
445
- let parent = element.parentElement;
446
- while (parent) {
447
- scrollables.push(parent);
448
- parent = parent.parentElement;
449
- }
450
- return scrollables;
451
- }
452
- var Menu = ({
453
- trigger,
454
- children,
455
- alignmentHorizontal = "leftInside",
456
- alignmentVertical = "bottomOutside",
457
- showOnHover = false,
458
- disabled = false,
459
- menuClassName = ""
460
- }) => {
461
- const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
462
- const triggerRef = (0, import_react6.useRef)(null);
463
- const menuRef = (0, import_react6.useRef)(null);
464
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
465
- const [isHidden, setIsHidden] = (0, import_react6.useState)(true);
466
- const bag = {
467
- isOpen,
468
- close: () => setIsOpen(false),
469
- toggleOpen: () => setIsOpen((prevState) => !prevState),
470
- disabled
471
- };
472
- const menuPosition = usePopoverPosition(
473
- triggerRef.current?.getBoundingClientRect(),
474
- { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
475
- );
476
- (0, import_react6.useEffect)(() => {
477
- if (!isOpen) return;
478
- const triggerEl = triggerRef.current;
479
- if (!triggerEl) return;
480
- const scrollableParents = getScrollableParents(triggerEl);
481
- const close = () => setIsOpen(false);
482
- scrollableParents.forEach((parent) => {
483
- parent.addEventListener("scroll", close);
484
- });
485
- window.addEventListener("resize", close);
486
- return () => {
487
- scrollableParents.forEach((parent) => {
488
- parent.removeEventListener("scroll", close);
489
- });
490
- window.removeEventListener("resize", close);
491
- };
492
- }, [isOpen, setIsOpen]);
493
- (0, import_react6.useEffect)(() => {
494
- if (isOpen) {
495
- setIsHidden(false);
496
- }
497
- }, [isOpen]);
498
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
499
- trigger(bag, triggerRef),
500
- (0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
501
- "div",
502
- {
503
- ref: menuRef,
504
- onClick: (e) => e.stopPropagation(),
505
- className: (0, import_clsx4.default)(
506
- "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
507
- {
508
- "animate-pop-in": isOpen,
509
- "animate-pop-out": !isOpen,
510
- "hidden": isHidden
511
- },
512
- menuClassName
513
- ),
514
- onAnimationEnd: () => {
515
- if (!isOpen) {
516
- setIsHidden(true);
517
- }
518
- },
519
- style: {
520
- ...menuPosition
521
- },
522
- children: BagFunctionUtil.resolve(children, bag)
523
- }
524
- ), document.body)
525
- ] });
526
- };
527
-
528
- // src/components/user-action/Input.tsx
529
- var import_react10 = require("react");
530
- var import_clsx5 = __toESM(require("clsx"));
531
-
532
- // src/hooks/useDelay.ts
533
- var import_react7 = require("react");
534
- var defaultOptions = {
535
- delay: 3e3,
536
- disabled: false
537
- };
538
- function useDelay(options) {
539
- const [timer, setTimer] = (0, import_react7.useState)(void 0);
540
- const { delay, disabled } = {
541
- ...defaultOptions,
542
- ...options
543
- };
544
- const clearTimer = () => {
545
- clearTimeout(timer);
546
- setTimer(void 0);
547
- };
548
- const restartTimer = (onDelayFinish) => {
549
- if (disabled) {
550
- return;
551
- }
552
- clearTimeout(timer);
553
- setTimer(setTimeout(() => {
554
- onDelayFinish();
555
- setTimer(void 0);
556
- }, delay));
557
- };
558
- (0, import_react7.useEffect)(() => {
559
- return () => {
560
- clearTimeout(timer);
561
- };
562
- }, [timer]);
563
- (0, import_react7.useEffect)(() => {
564
- if (disabled) {
565
- clearTimeout(timer);
566
- setTimer(void 0);
567
- }
568
- }, [disabled, timer]);
569
- return { restartTimer, clearTimer, hasActiveTimer: !!timer };
570
- }
571
-
572
- // src/hooks/useFocusManagement.ts
573
- var import_react8 = require("react");
574
- function useFocusManagement() {
575
- const getFocusableElements = (0, import_react8.useCallback)(() => {
576
- return Array.from(
577
- document.querySelectorAll(
578
- 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
579
- )
580
- ).filter(
581
- (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
582
- );
583
- }, []);
584
- const getNextFocusElement = (0, import_react8.useCallback)(() => {
585
- const elements = getFocusableElements();
586
- if (elements.length === 0) {
587
- return void 0;
588
- }
589
- let nextElement = elements[0];
590
- if (document.activeElement instanceof HTMLElement) {
591
- const currentIndex = elements.indexOf(document.activeElement);
592
- nextElement = elements[(currentIndex + 1) % elements.length];
593
- }
594
- return nextElement;
595
- }, [getFocusableElements]);
596
- const focusNext = (0, import_react8.useCallback)(() => {
597
- const nextElement = getNextFocusElement();
598
- nextElement?.focus();
599
- }, [getNextFocusElement]);
600
- const getPreviousFocusElement = (0, import_react8.useCallback)(() => {
601
- const elements = getFocusableElements();
602
- if (elements.length === 0) {
603
- return void 0;
604
- }
605
- let previousElement = elements[0];
606
- if (document.activeElement instanceof HTMLElement) {
607
- const currentIndex = elements.indexOf(document.activeElement);
608
- if (currentIndex === 0) {
609
- previousElement = elements[elements.length - 1];
610
- } else {
611
- previousElement = elements[currentIndex - 1];
612
- }
613
- }
614
- return previousElement;
615
- }, [getFocusableElements]);
616
- const focusPrevious = (0, import_react8.useCallback)(() => {
617
- const previousElement = getPreviousFocusElement();
618
- if (previousElement) previousElement.focus();
619
- }, [getPreviousFocusElement]);
620
- return {
621
- getFocusableElements,
622
- getNextFocusElement,
623
- getPreviousFocusElement,
624
- focusNext,
625
- focusPrevious
626
- };
627
- }
628
-
629
- // src/hooks/useFocusOnceVisible.ts
630
- var import_react9 = __toESM(require("react"));
631
- var useFocusOnceVisible = (ref, disable = false) => {
632
- const [hasUsedFocus, setHasUsedFocus] = import_react9.default.useState(false);
633
- (0, import_react9.useEffect)(() => {
634
- if (disable || hasUsedFocus) {
635
- return;
636
- }
637
- const observer = new IntersectionObserver(([entry]) => {
638
- if (entry.isIntersecting && !hasUsedFocus) {
639
- ref.current?.focus();
640
- setHasUsedFocus(hasUsedFocus);
641
- }
642
- }, {
643
- threshold: 0.1
644
- });
645
- if (ref.current) {
646
- observer.observe(ref.current);
647
- }
648
- return () => observer.disconnect();
649
- }, [disable, hasUsedFocus, ref]);
650
- };
651
-
652
- // src/components/user-action/Input.tsx
653
- var import_jsx_runtime6 = require("react/jsx-runtime");
654
- var getInputClassName = ({ disabled = false, hasError = false }) => {
655
- return (0, import_clsx5.default)(
656
- "px-2 py-1.5 rounded-md border-2",
657
- {
658
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !hasError,
659
- "bg-on-negative text-negative border-negative-border hover:border-negative-border-hover": !disabled && hasError,
660
- "bg-disabled-background text-disabled-text border-disabled-border": disabled
661
- }
662
- );
663
- };
664
- var defaultEditCompleteOptions = {
665
- onBlur: true,
666
- afterDelay: true,
667
- delay: 2500
668
- };
669
- var Input = (0, import_react10.forwardRef)(function Input2({
670
- id,
671
- type = "text",
672
- value,
673
- label,
674
- onChange = noop,
675
- onChangeText = noop,
676
- onEditCompleted,
677
- className = "",
678
- allowEnterComplete = true,
679
- expanded = true,
680
- autoFocus = false,
681
- onBlur,
682
- editCompleteOptions,
683
- containerClassName,
684
- disabled,
685
- ...restProps
686
- }, forwardedRef) {
687
- const { onBlur: allowEditCompleteOnBlur, afterDelay, delay } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
688
- const {
689
- restartTimer,
690
- clearTimer
691
- } = useDelay({ delay, disabled: !afterDelay });
692
- const innerRef = (0, import_react10.useRef)(null);
693
- const { focusNext } = useFocusManagement();
694
- useFocusOnceVisible(innerRef, !autoFocus);
695
- (0, import_react10.useImperativeHandle)(forwardedRef, () => innerRef.current);
696
- const handleKeyDown = (e) => {
697
- if (e.key === "Enter" && !e.shiftKey) {
698
- e.preventDefault();
699
- innerRef.current?.blur();
700
- focusNext();
701
- }
702
- };
703
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_clsx5.default)({ "w-full": expanded }, containerClassName), children: [
704
- label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Label, { ...label, htmlFor: id, className: (0, import_clsx5.default)("mb-1", label.className) }),
705
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
706
- "input",
707
- {
708
- ...restProps,
709
- ref: innerRef,
710
- value,
711
- id,
712
- type,
713
- disabled,
714
- className: (0, import_clsx5.default)(getInputClassName({ disabled }), className),
715
- onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
716
- onBlur: (event) => {
717
- onBlur?.(event);
718
- if (onEditCompleted && allowEditCompleteOnBlur) {
719
- onEditCompleted(event.target.value);
720
- clearTimer();
721
- }
722
- },
723
- onChange: (e) => {
724
- const value2 = e.target.value;
725
- if (onEditCompleted) {
726
- restartTimer(() => {
727
- if (innerRef.current) {
728
- innerRef.current.blur();
729
- if (!allowEditCompleteOnBlur) {
730
- onEditCompleted(value2);
731
- }
732
- } else {
733
- onEditCompleted(value2);
734
- }
735
- });
736
- }
737
- onChange(e);
738
- onChangeText(value2);
739
- }
740
- }
741
- )
742
- ] });
743
- });
744
- var FormInput = (0, import_react10.forwardRef)(function FormInput2({
745
- id,
746
- labelText,
747
- errorText,
748
- className,
749
- labelClassName,
750
- errorClassName,
751
- containerClassName,
752
- required,
753
- disabled,
754
- ...restProps
755
- }, ref) {
756
- const input = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
757
- "input",
758
- {
759
- ...restProps,
760
- ref,
761
- id,
762
- disabled,
763
- className: (0, import_clsx5.default)(
764
- getInputClassName({ disabled, hasError: !!errorText }),
765
- className
766
- )
767
- }
768
- );
769
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_clsx5.default)("flex flex-col gap-y-1", containerClassName), children: [
770
- labelText && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { htmlFor: id, className: (0, import_clsx5.default)("textstyle-label-md", labelClassName), children: [
771
- labelText,
772
- required && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-primary font-bold", children: "*" })
773
- ] }),
774
- input,
775
- errorText && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("label", { htmlFor: id, className: (0, import_clsx5.default)("text-negative", errorClassName), children: errorText })
776
- ] });
777
- });
778
-
779
- // src/localization/defaults/form.ts
780
- var formTranslation = {
781
- en: {
782
- add: "Add",
783
- all: "All",
784
- apply: "Apply",
785
- back: "Back",
786
- cancel: "Cancel",
787
- change: "Change",
788
- clear: "Clear",
789
- click: "Click",
790
- clickToCopy: "Click to Copy",
791
- close: "Close",
792
- confirm: "Confirm",
793
- copy: "Copy",
794
- copied: "Copied",
795
- create: "Create",
796
- decline: "Decline",
797
- delete: "Delete",
798
- discard: "Discard",
799
- discardChanges: "Discard Changes",
800
- done: "Done",
801
- edit: "Edit",
802
- enterText: "Enter text here",
803
- error: "Error",
804
- exit: "Exit",
805
- fieldRequiredError: "This field is required.",
806
- invalidEmailError: "Please enter a valid email address.",
807
- less: "Less",
808
- loading: "Loading",
809
- maxLengthError: "Maximum length exceeded.",
810
- minLengthError: "Minimum length not met.",
811
- more: "More",
812
- next: "Next",
813
- no: "No",
814
- none: "None",
815
- of: "of",
816
- optional: "Optional",
817
- pleaseWait: "Please wait...",
818
- previous: "Previous",
819
- remove: "Remove",
820
- required: "Required",
821
- reset: "Reset",
822
- save: "Save",
823
- saved: "Saved",
824
- search: "Search",
825
- select: "Select",
826
- selectOption: "Select an option",
827
- show: "Show",
828
- showMore: "Show more",
829
- showLess: "Show less",
830
- submit: "Submit",
831
- success: "Success",
832
- update: "Update",
833
- unsavedChanges: "Unsaved Changes",
834
- unsavedChangesSaveQuestion: "Do you want to save your changes?",
835
- yes: "Yes"
836
- },
837
- de: {
838
- add: "Hinzuf\xFCgen",
839
- all: "Alle",
840
- apply: "Anwenden",
841
- back: "Zur\xFCck",
842
- cancel: "Abbrechen",
843
- change: "\xC4ndern",
844
- clear: "L\xF6schen",
845
- click: "Klicken",
846
- clickToCopy: "Zum kopieren klicken",
847
- close: "Schlie\xDFen",
848
- confirm: "Best\xE4tigen",
849
- copy: "Kopieren",
850
- copied: "Kopiert",
851
- create: "Erstellen",
852
- decline: "Ablehnen",
853
- delete: "L\xF6schen",
854
- discard: "Verwerfen",
855
- discardChanges: "\xC4nderungen Verwerfen",
856
- done: "Fertig",
857
- edit: "Bearbeiten",
858
- enterText: "Text hier eingeben",
859
- error: "Fehler",
860
- exit: "Beenden",
861
- fieldRequiredError: "Dieses Feld ist erforderlich.",
862
- invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
863
- less: "Weniger",
864
- loading: "L\xE4dt",
865
- maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
866
- minLengthError: "Mindestl\xE4nge nicht erreicht.",
867
- more: "Mehr",
868
- next: "Weiter",
869
- no: "Nein",
870
- none: "Nichts",
871
- of: "von",
872
- optional: "Optional",
873
- pleaseWait: "Bitte warten...",
874
- previous: "Vorherige",
875
- remove: "Entfernen",
876
- required: "Erforderlich",
877
- reset: "Zur\xFCcksetzen",
878
- save: "Speichern",
879
- saved: "Gespeichert",
880
- search: "Suche",
881
- select: "Select",
882
- selectOption: "Option ausw\xE4hlen",
883
- show: "Anzeigen",
884
- showMore: "Mehr anzeigen",
885
- showLess: "Weniger anzeigen",
886
- submit: "Abschicken",
887
- success: "Erfolg",
888
- update: "Update",
889
- unsavedChanges: "Ungespeicherte \xC4nderungen",
890
- unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
891
- yes: "Ja"
892
- }
893
- };
894
-
895
- // src/components/user-action/Button.tsx
896
- var import_react11 = require("react");
897
- var import_clsx6 = __toESM(require("clsx"));
898
- var import_jsx_runtime7 = require("react/jsx-runtime");
899
- var ButtonColorUtil = {
900
- solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
901
- text: ["primary", "negative", "neutral"],
902
- outline: ["primary"]
903
- };
904
- var IconButtonUtil = {
905
- icon: [...ButtonColorUtil.solid, "transparent"]
906
- };
907
- var paddingMapping = {
908
- small: "btn-sm",
909
- medium: "btn-md",
910
- large: "btn-lg"
911
- };
912
- var iconPaddingMapping = {
913
- tiny: "icon-btn-xs",
914
- small: "icon-btn-sm",
915
- medium: "icon-btn-md",
916
- large: "icon-btn-lg"
917
- };
918
- var ButtonUtil = {
919
- paddingMapping,
920
- iconPaddingMapping
921
- };
922
- var SolidButton = (0, import_react11.forwardRef)(function SolidButton2({
923
- children,
924
- color = "primary",
925
- size = "medium",
926
- startIcon,
927
- endIcon,
928
- onClick,
929
- className,
930
- ...restProps
931
- }, ref) {
932
- const colorClasses = {
933
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
934
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
935
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
936
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
937
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
938
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
939
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
940
- }[color];
941
- const iconColorClasses = {
942
- primary: "not-group-disabled:text-button-solid-primary-icon",
943
- secondary: "not-group-disabled:text-button-solid-secondary-icon",
944
- tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
945
- positive: "not-group-disabled:text-button-solid-positive-icon",
946
- warning: "not-group-disabled:text-button-solid-warning-icon",
947
- negative: "not-group-disabled:text-button-solid-negative-icon",
948
- neutral: "not-group-disabled:text-button-solid-neutral-icon"
949
- }[color];
950
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
951
- "button",
952
- {
953
- ref,
954
- onClick,
955
- className: (0, import_clsx6.default)(
956
- "group font-semibold",
957
- colorClasses,
958
- "not-disabled:hover:brightness-90",
959
- "disabled:text-disabled-text disabled:bg-disabled-background",
960
- ButtonUtil.paddingMapping[size],
961
- className
962
- ),
963
- ...restProps,
964
- children: [
965
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
966
- "span",
967
- {
968
- className: (0, import_clsx6.default)(
969
- iconColorClasses,
970
- "group-disabled:text-disabled-icon"
971
- ),
972
- children: startIcon
973
- }
974
- ),
975
- children,
976
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
977
- "span",
978
- {
979
- className: (0, import_clsx6.default)(
980
- iconColorClasses,
981
- "group-disabled:text-disabled-icon"
982
- ),
983
- children: endIcon
984
- }
985
- )
986
- ]
987
- }
988
- );
989
- });
990
- var IconButton = ({
991
- children,
992
- color = "primary",
993
- size = "medium",
994
- className,
995
- ...restProps
996
- }) => {
997
- const colorClasses = {
998
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
999
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
1000
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
1001
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
1002
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
1003
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
1004
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
1005
- transparent: "not-disabled:bg-transparent"
1006
- }[color];
1007
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1008
- "button",
1009
- {
1010
- className: (0, import_clsx6.default)(
1011
- colorClasses,
1012
- "not-disabled:hover:brightness-90",
1013
- "disabled:text-disabled-text",
1014
- {
1015
- "disabled:bg-disabled-background": color !== "transparent",
1016
- "disabled:opacity-70": color === "transparent",
1017
- "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
1018
- },
1019
- ButtonUtil.iconPaddingMapping[size],
1020
- className
1021
- ),
1022
- ...restProps,
1023
- children
1024
- }
1025
- );
1026
- };
1027
-
1028
- // src/components/user-action/SearchBar.tsx
1029
- var import_lucide_react3 = require("lucide-react");
1030
- var import_clsx7 = require("clsx");
1031
- var import_jsx_runtime8 = require("react/jsx-runtime");
1032
- var SearchBar = ({
1033
- placeholder,
1034
- onSearch,
1035
- disableOnSearch,
1036
- containerClassName,
1037
- ...inputProps
1038
- }) => {
1039
- const translation = useTranslation([formTranslation]);
1040
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_clsx7.clsx)("flex-row-2 justify-between items-center", containerClassName), children: [
1041
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1042
- Input,
1043
- {
1044
- ...inputProps,
1045
- placeholder: placeholder ?? translation("search")
1046
- }
1047
- ),
1048
- onSearch && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.Search, { className: "w-full h-full" }) })
1049
- ] });
1050
- };
1051
-
1052
- // src/hooks/useSearch.ts
1053
- var import_react12 = require("react");
1054
-
1055
- // src/util/simpleSearch.ts
1056
- var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
1057
- return objects.filter((object) => {
1058
- const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
1059
- if (!mappedSearchKeywords) {
1060
- return true;
1061
- }
1062
- return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
1063
- });
1064
- };
1065
-
1066
- // src/hooks/useSearch.ts
1067
- var useSearch = ({
1068
- list,
1069
- initialSearch,
1070
- searchMapping,
1071
- additionalSearchTags,
1072
- isSearchInstant = true,
1073
- sortingFunction,
1074
- filter,
1075
- disabled = false
1076
- }) => {
1077
- const [search, setSearch] = (0, import_react12.useState)(initialSearch ?? "");
1078
- const [result, setResult] = (0, import_react12.useState)(list);
1079
- const searchTags = (0, import_react12.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
1080
- const updateSearch = (0, import_react12.useCallback)((newSearch) => {
1081
- const usedSearch = newSearch ?? search;
1082
- if (newSearch) {
1083
- setSearch(search);
1084
- }
1085
- setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
1086
- }, [searchTags, list, search, searchMapping]);
1087
- (0, import_react12.useEffect)(() => {
1088
- if (isSearchInstant) {
1089
- setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
1090
- }
1091
- }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
1092
- const filteredResult = (0, import_react12.useMemo)(() => {
1093
- if (!filter) {
1094
- return result;
1095
- }
1096
- return result.filter(filter);
1097
- }, [result, filter]);
1098
- const sortedAndFilteredResult = (0, import_react12.useMemo)(() => {
1099
- if (!sortingFunction) {
1100
- return filteredResult;
1101
- }
1102
- return filteredResult.sort(sortingFunction);
1103
- }, [filteredResult, sortingFunction]);
1104
- const usedResult = (0, import_react12.useMemo)(() => {
1105
- if (!disabled) {
1106
- return sortedAndFilteredResult;
1107
- }
1108
- return list;
1109
- }, [disabled, list, sortedAndFilteredResult]);
1110
- return {
1111
- result: usedResult,
1112
- hasResult: usedResult.length > 0,
1113
- allItems: list,
1114
- updateSearch,
1115
- search,
1116
- setSearch
1117
- };
1118
- };
1119
-
1120
- // src/components/user-action/Select.tsx
1121
- var import_jsx_runtime9 = require("react/jsx-runtime");
1122
- var Select = ({
1123
- value,
1124
- label,
1125
- options,
1126
- onChange,
1127
- hintText = "",
1128
- selectedDisplayOverwrite,
1129
- searchOptions,
1130
- additionalItems,
1131
- className,
1132
- triggerClassName,
1133
- hintTextClassName,
1134
- ...menuProps
1135
- }) => {
1136
- const selectedOption = options.find((option) => option.value === value);
1137
- if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
1138
- console.warn("The selected value is not found in the options list. This might be an error on your part or default behavior if it is complex data type on which === does not work. In case of the latter use selectedDisplayOverwrite to set your selected text or component");
1139
- }
1140
- const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
1141
- const { result, search, setSearch } = useSearch({
1142
- list: options,
1143
- searchMapping: (0, import_react13.useCallback)((item) => item.searchTags, []),
1144
- ...searchOptions
1145
- });
1146
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_clsx8.default)(className), children: [
1147
- label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Label, { ...label, labelType: label.labelType ?? "labelSmall", className: (0, import_clsx8.default)("mb-1", label.className) }),
1148
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1149
- Menu,
1150
- {
1151
- ...menuProps,
1152
- trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1153
- "button",
1154
- {
1155
- ref,
1156
- className: (0, import_clsx8.default)(
1157
- "btn-md justify-between w-full border-2",
1158
- "not-disabled:bg-input-background not-disabled:text-input-text not-disabled:hover:border-primary",
1159
- "disabled:bg-disabled-background disabled:text-disabled-text disabled:border-disabled-border",
1160
- triggerClassName
1161
- ),
1162
- onClick: toggleOpen,
1163
- disabled,
1164
- children: [
1165
- !isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? selectedOption?.label }),
1166
- isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_clsx8.default)("textstyle-description", hintTextClassName), children: hintText }),
1167
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ExpansionIcon, { isExpanded: isOpen })
1168
- ]
1169
- }
1170
- ),
1171
- menuClassName: (0, import_clsx8.default)("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
1172
- children: (bag) => {
1173
- const { close } = bag;
1174
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1175
- !searchOptions?.disabled && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1176
- SearchBar,
1177
- {
1178
- value: search,
1179
- onChangeText: setSearch,
1180
- autoFocus: true
1181
- }
1182
- ),
1183
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
1184
- result.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1185
- ListTile,
1186
- {
1187
- isSelected: option === selectedOption,
1188
- title: option.label,
1189
- onClick: () => {
1190
- onChange(option.value);
1191
- close();
1192
- },
1193
- disabled: option.disabled
1194
- },
1195
- index
1196
- )),
1197
- additionalItems && additionalItems({ ...bag, search, selected: value })
1198
- ] })
1199
- ] });
1200
- }
1201
- }
1202
- )
1203
- ] });
1204
- };
1205
-
1206
- // src/components/layout-and-navigation/Overlay.tsx
1207
- var import_react15 = require("react");
1208
- var import_react_dom2 = __toESM(require("react-dom"));
1209
- var import_clsx10 = __toESM(require("clsx"));
1210
-
1211
- // src/components/user-action/Tooltip.tsx
1212
- var import_clsx9 = require("clsx");
1213
- var import_jsx_runtime10 = require("react/jsx-runtime");
1214
- var Tooltip = ({
1215
- tooltip,
1216
- children,
1217
- animationDelay = 650,
1218
- tooltipClassName = "",
1219
- containerClassName = "",
1220
- position = "bottom",
1221
- zIndex = 10
1222
- }) => {
1223
- const { isHovered, handlers } = useHoverState();
1224
- const positionClasses = {
1225
- top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
1226
- bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
1227
- left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,
1228
- right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`
1229
- };
1230
- const triangleSize = 6;
1231
- const triangleClasses = {
1232
- top: `top-full left-1/2 -translate-x-1/2 border-t-tooltip-background border-l-transparent border-r-transparent`,
1233
- bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-tooltip-background border-l-transparent border-r-transparent`,
1234
- left: `left-full top-1/2 -translate-y-1/2 border-l-tooltip-background border-t-transparent border-b-transparent`,
1235
- right: `right-full top-1/2 -translate-y-1/2 border-r-tooltip-background border-t-transparent border-b-transparent`
1236
- };
1237
- const triangleStyle = {
1238
- top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },
1239
- bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },
1240
- left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
1241
- right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
1242
- };
1243
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1244
- "div",
1245
- {
1246
- className: (0, import_clsx9.clsx)("relative inline-block", containerClassName),
1247
- ...handlers,
1248
- children: [
1249
- children,
1250
- isHovered && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1251
- "div",
1252
- {
1253
- className: (0, import_clsx9.clsx)(
1254
- `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
1255
- animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
1256
- positionClasses[position],
1257
- tooltipClassName
1258
- ),
1259
- style: { zIndex, animationDelay: animationDelay + "ms" },
1260
- children: [
1261
- tooltip,
1262
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1263
- "div",
1264
- {
1265
- className: (0, import_clsx9.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
1266
- style: { ...triangleStyle[position], zIndex: zIndex + 1 }
1267
- }
1268
- )
1269
- ]
1270
- }
1271
- )
1272
- ]
1273
- }
1274
- );
1275
- };
1276
-
1277
- // src/components/layout-and-navigation/Overlay.tsx
1278
- var import_lucide_react4 = require("lucide-react");
1279
- var import_jsx_runtime11 = require("react/jsx-runtime");
1280
- var Overlay = ({
1281
- children,
1282
- isOpen,
1283
- onBackgroundClick,
1284
- backgroundClassName
1285
- }) => {
1286
- const [root, setRoot] = (0, import_react15.useState)();
1287
- (0, import_react15.useEffect)(() => {
1288
- setRoot(document.body);
1289
- }, []);
1290
- if (!root || !isOpen) return null;
1291
- return import_react_dom2.default.createPortal(
1292
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_clsx10.default)("fixed inset-0 z-[200]"), children: [
1293
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1294
- "div",
1295
- {
1296
- className: (0, import_clsx10.default)("fixed inset-0 h-screen w-screen bg-overlay-shadow", backgroundClassName),
1297
- onClick: onBackgroundClick
1298
- }
1299
- ),
1300
- children
1301
- ] }),
1302
- root
1303
- );
1304
- };
1305
- var overlayStack = [];
1306
- var defaultModalHeaderTranslation = {
1307
- en: {
1308
- ...formTranslation.en
1309
- },
1310
- de: {
1311
- ...formTranslation.de
1312
- }
1313
- };
1314
- var OverlayHeader = ({
1315
- overwriteTranslation,
1316
- onClose,
1317
- title,
1318
- titleText = "",
1319
- description,
1320
- descriptionText = ""
1321
- }) => {
1322
- const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
1323
- const hasTitleRow = !!title || !!titleText || !!onClose;
1324
- const titleRow = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-row-8 justify-between items-start", children: [
1325
- title ?? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1326
- "h2",
1327
- {
1328
- className: (0, import_clsx10.default)("textstyle-title-lg", {
1329
- "mb-1": description || descriptionText
1330
- }),
1331
- children: titleText
1332
- }
1333
- ),
1334
- !!onClose && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Tooltip, { tooltip: translation("close"), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.X, { className: "w-full h-full" }) }) })
1335
- ] });
1336
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-col-2", children: [
1337
- hasTitleRow && titleRow,
1338
- description ?? (descriptionText && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "textstyle-description", children: descriptionText }))
1339
- ] });
1340
- };
1341
- var Modal = ({
1342
- children,
1343
- isOpen,
1344
- onClose,
1345
- className,
1346
- backgroundClassName,
1347
- headerProps
1348
- }) => {
1349
- const ref = (0, import_react15.useRef)(null);
1350
- (0, import_react15.useEffect)(() => {
1351
- if (!isOpen) return;
1352
- const modal = ref.current;
1353
- if (!modal) {
1354
- console.error("modal open, but no ref found");
1355
- return;
1356
- }
1357
- overlayStack.push(modal);
1358
- const focusable = modal?.querySelectorAll(
1359
- 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])'
1360
- );
1361
- const first = focusable[0];
1362
- const last = focusable[focusable.length - 1];
1363
- const handleKeyDown = (e) => {
1364
- const isTopmost = overlayStack[overlayStack.length - 1] === modal;
1365
- if (!isTopmost) return;
1366
- if (e.key === "Escape") {
1367
- e.stopPropagation();
1368
- onClose();
1369
- } else if (e.key === "Tab") {
1370
- if (focusable.length === 0) return;
1371
- if (e.shiftKey && document.activeElement === first) {
1372
- e.preventDefault();
1373
- last.focus();
1374
- } else if (!e.shiftKey && document.activeElement === last) {
1375
- e.preventDefault();
1376
- first.focus();
1377
- }
1378
- }
1379
- };
1380
- modal.focus();
1381
- document.addEventListener("keydown", handleKeyDown);
1382
- return () => {
1383
- document.removeEventListener("keydown", handleKeyDown);
1384
- overlayStack = overlayStack.filter((m) => m !== modal);
1385
- };
1386
- }, [isOpen, onClose]);
1387
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1388
- Overlay,
1389
- {
1390
- isOpen,
1391
- onBackgroundClick: onClose,
1392
- backgroundClassName,
1393
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1394
- "div",
1395
- {
1396
- ref,
1397
- tabIndex: -1,
1398
- className: (0, import_clsx10.default)(
1399
- "flex-col-2 fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-around-lg shadow-strong animate-pop-in",
1400
- className
1401
- ),
1402
- role: "dialog",
1403
- "aria-modal": true,
1404
- children: [
1405
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(OverlayHeader, { ...headerProps, onClose }),
1406
- children
1407
- ]
1408
- }
1409
- )
1410
- }
1411
- );
1412
- };
1413
-
1414
- // src/theming/useTheme.tsx
1415
- var import_react16 = require("react");
1416
- var import_react17 = require("react");
1417
- var import_jsx_runtime12 = require("react/jsx-runtime");
1418
- var themes = ["light", "dark", "system"];
1419
- var defaultThemeTypeTranslation = {
1420
- en: {
1421
- dark: "Dark",
1422
- light: "Light",
1423
- system: "System",
1424
- theme: {
1425
- one: "Theme",
1426
- other: "Themes"
1427
- }
1428
- },
1429
- de: {
1430
- dark: "Dunkel",
1431
- light: "Hell",
1432
- system: "System",
1433
- theme: {
1434
- one: "Farbschema",
1435
- other: "Farbschemas"
1436
- }
1437
- }
1438
- };
1439
- var ThemeUtil = {
1440
- themes,
1441
- translation: defaultThemeTypeTranslation
1442
- };
1443
- var ThemeContext = (0, import_react17.createContext)({
1444
- theme: "light",
1445
- setTheme: noop
1446
- });
1447
- var useTheme = () => (0, import_react17.useContext)(ThemeContext);
1448
-
1449
- // src/components/modals/ThemeModal.tsx
1450
- var import_jsx_runtime13 = require("react/jsx-runtime");
1451
- var defaultConfirmDialogTranslation = {
1452
- en: {
1453
- chooseTheme: "Choose your preferred theme"
1454
- },
1455
- de: {
1456
- chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
1457
- }
1458
- };
1459
- var ThemeModal = ({
1460
- overwriteTranslation,
1461
- headerProps,
1462
- onClose,
1463
- ...modalProps
1464
- }) => {
1465
- const { theme, setTheme } = useTheme();
1466
- const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
1467
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1468
- Modal,
1469
- {
1470
- headerProps: {
1471
- ...headerProps,
1472
- titleText: headerProps?.titleText ?? translation("theme"),
1473
- descriptionText: headerProps?.descriptionText ?? translation("chooseTheme")
1474
- },
1475
- onClose,
1476
- ...modalProps,
1477
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w-64", children: [
1478
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1479
- Select,
1480
- {
1481
- className: "mt-2",
1482
- value: theme,
1483
- options: ThemeUtil.themes.map((theme2) => ({ label: translation(theme2), value: theme2 })),
1484
- onChange: (theme2) => setTheme(theme2),
1485
- searchOptions: { disabled: true }
1486
- }
1487
- ),
1488
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
1489
- ] })
1490
- }
1491
- );
1492
- };
1493
- // Annotate the CommonJS export names for ESM import in node:
1494
- 0 && (module.exports = {
1495
- ThemeModal
1496
- });
1497
- //# sourceMappingURL=ThemeModal.js.map