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