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