@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,1207 +0,0 @@
1
- // src/components/user-action/Select.tsx
2
- import { useCallback as useCallback5 } from "react";
3
- import { useEffect as useEffect10, useState as useState9 } from "react";
4
- import clsx8 from "clsx";
5
-
6
- // src/components/user-action/Label.tsx
7
- import clsx from "clsx";
8
- import { jsx } from "react/jsx-runtime";
9
- var styleMapping = {
10
- labelSmall: "textstyle-label-sm",
11
- labelMedium: "textstyle-label-md",
12
- labelBig: "textstyle-label-lg"
13
- };
14
- var Label = ({
15
- children,
16
- name,
17
- labelType = "labelSmall",
18
- className,
19
- ...props
20
- }) => {
21
- return /* @__PURE__ */ jsx("label", { ...props, className: clsx(styleMapping[labelType], className), children: children ? children : name });
22
- };
23
-
24
- // src/components/layout-and-navigation/Tile.tsx
25
- import clsx2 from "clsx";
26
- import { Check } from "lucide-react";
27
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
28
- var Tile = ({
29
- title,
30
- titleClassName,
31
- description,
32
- descriptionClassName,
33
- onClick,
34
- isSelected = false,
35
- disabled = false,
36
- prefix,
37
- suffix,
38
- normalClassName = "hover:bg-primary/40 cursor-pointer",
39
- selectedClassName = "bg-primary/20",
40
- disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
41
- className
42
- }) => {
43
- return /* @__PURE__ */ jsxs(
44
- "div",
45
- {
46
- className: clsx2(
47
- "flex-row-2 w-full items-center",
48
- {
49
- [normalClassName]: onClick && !disabled,
50
- [selectedClassName]: isSelected && !disabled,
51
- [disabledClassName]: disabled
52
- },
53
- className
54
- ),
55
- onClick: disabled ? void 0 : onClick,
56
- children: [
57
- prefix,
58
- /* @__PURE__ */ jsxs("div", { className: "flex-col-0 w-full", children: [
59
- /* @__PURE__ */ jsx2("span", { className: clsx2(titleClassName ?? "textstyle-title-normal"), children: title }),
60
- !!description && /* @__PURE__ */ jsx2("span", { className: clsx2(descriptionClassName ?? "textstyle-description"), children: description })
61
- ] }),
62
- suffix ?? (isSelected ? /* @__PURE__ */ jsx2(Check, { size: 24 }) : void 0)
63
- ]
64
- }
65
- );
66
- };
67
- var ListTile = ({
68
- ...props
69
- }) => {
70
- return /* @__PURE__ */ jsx2(
71
- Tile,
72
- {
73
- ...props,
74
- titleClassName: props.titleClassName ?? "font-semibold",
75
- className: clsx2("px-2 py-1 rounded-md", props.className),
76
- disabledClassName: props.disabledClassName ?? "text-disabled-text cursor-not-allowed"
77
- }
78
- );
79
- };
80
-
81
- // src/components/layout-and-navigation/Expandable.tsx
82
- import { forwardRef, useCallback, useEffect, useState } from "react";
83
- import { ChevronDown } from "lucide-react";
84
- import clsx3 from "clsx";
85
-
86
- // src/util/noop.ts
87
- var noop = () => void 0;
88
-
89
- // src/components/layout-and-navigation/Expandable.tsx
90
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
91
- var ExpansionIcon = ({ isExpanded, className }) => {
92
- return /* @__PURE__ */ jsx3(
93
- ChevronDown,
94
- {
95
- className: clsx3(
96
- "min-w-6 w-6 min-h-6 h-6 transition-transform duration-200 ease-in-out",
97
- { "rotate-180": isExpanded },
98
- className
99
- )
100
- }
101
- );
102
- };
103
- var Expandable = forwardRef(function Expandable2({
104
- children,
105
- label,
106
- icon,
107
- isExpanded = false,
108
- onChange = noop,
109
- clickOnlyOnHeader = true,
110
- disabled = false,
111
- className,
112
- headerClassName,
113
- contentClassName,
114
- contentExpandedClassName
115
- }, ref) {
116
- const defaultIcon = useCallback((expanded) => /* @__PURE__ */ jsx3(ExpansionIcon, { isExpanded: expanded }), []);
117
- icon ??= defaultIcon;
118
- return /* @__PURE__ */ jsxs2(
119
- "div",
120
- {
121
- ref,
122
- className: clsx3("flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
123
- onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
124
- children: [
125
- /* @__PURE__ */ jsxs2(
126
- "div",
127
- {
128
- className: clsx3(
129
- "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
130
- {
131
- "group-hover:brightness-97": !isExpanded,
132
- "hover:brightness-97": isExpanded && !disabled,
133
- "cursor-pointer": clickOnlyOnHeader && !disabled
134
- },
135
- headerClassName
136
- ),
137
- onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
138
- children: [
139
- label,
140
- icon(isExpanded)
141
- ]
142
- }
143
- ),
144
- /* @__PURE__ */ jsx3(
145
- "div",
146
- {
147
- className: clsx3(
148
- "flex-col-2 px-4 transition-all duration-300 ease-in-out",
149
- {
150
- [clsx3("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
151
- "max-h-0 opacity-0 overflow-hidden": !isExpanded
152
- },
153
- contentClassName
154
- ),
155
- children
156
- }
157
- )
158
- ]
159
- }
160
- );
161
- });
162
- var ExpandableUncontrolled = forwardRef(function ExpandableUncontrolled2({
163
- isExpanded,
164
- onChange = noop,
165
- ...props
166
- }, ref) {
167
- const [usedIsExpanded, setUsedIsExpanded] = useState(isExpanded);
168
- useEffect(() => {
169
- setUsedIsExpanded(isExpanded);
170
- }, [isExpanded]);
171
- return /* @__PURE__ */ jsx3(
172
- Expandable,
173
- {
174
- ...props,
175
- ref,
176
- isExpanded: usedIsExpanded,
177
- onChange: (value) => {
178
- onChange(value);
179
- setUsedIsExpanded(value);
180
- }
181
- }
182
- );
183
- });
184
-
185
- // src/components/user-action/Menu.tsx
186
- import { useEffect as useEffect4, useRef, useState as useState3 } from "react";
187
- import clsx4 from "clsx";
188
-
189
- // src/hooks/useOutsideClick.ts
190
- import { useEffect as useEffect2 } from "react";
191
- var useOutsideClick = (refs, handler) => {
192
- useEffect2(() => {
193
- const listener = (event) => {
194
- if (event.target === null) return;
195
- if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
196
- return;
197
- }
198
- handler();
199
- };
200
- document.addEventListener("mousedown", listener);
201
- document.addEventListener("touchstart", listener);
202
- return () => {
203
- document.removeEventListener("mousedown", listener);
204
- document.removeEventListener("touchstart", listener);
205
- };
206
- }, [refs, handler]);
207
- };
208
-
209
- // src/hooks/useHoverState.ts
210
- import { useEffect as useEffect3, useState as useState2 } from "react";
211
- var defaultUseHoverStateProps = {
212
- closingDelay: 200,
213
- isDisabled: false
214
- };
215
- var useHoverState = (props = void 0) => {
216
- const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
217
- const [isHovered, setIsHovered] = useState2(false);
218
- const [timer, setTimer] = useState2();
219
- const onMouseEnter = () => {
220
- if (isDisabled) {
221
- return;
222
- }
223
- clearTimeout(timer);
224
- setIsHovered(true);
225
- };
226
- const onMouseLeave = () => {
227
- if (isDisabled) {
228
- return;
229
- }
230
- setTimer(setTimeout(() => {
231
- setIsHovered(false);
232
- }, closingDelay));
233
- };
234
- useEffect3(() => {
235
- if (timer) {
236
- return () => {
237
- clearTimeout(timer);
238
- };
239
- }
240
- });
241
- useEffect3(() => {
242
- if (timer) {
243
- clearTimeout(timer);
244
- }
245
- }, [isDisabled]);
246
- return {
247
- isHovered,
248
- setIsHovered,
249
- handlers: { onMouseEnter, onMouseLeave }
250
- };
251
- };
252
-
253
- // src/util/PropsWithFunctionChildren.ts
254
- var resolve = (children, bag) => {
255
- if (typeof children === "function") {
256
- return children(bag);
257
- }
258
- return children ?? void 0;
259
- };
260
- var BagFunctionUtil = {
261
- resolve
262
- };
263
-
264
- // src/hooks/usePopoverPosition.ts
265
- var defaultPopoverPositionOptions = {
266
- edgePadding: 16,
267
- outerGap: 4,
268
- horizontalAlignment: "leftInside",
269
- verticalAlignment: "bottomOutside",
270
- disabled: false
271
- };
272
- var usePopoverPosition = (trigger, options) => {
273
- const {
274
- edgePadding,
275
- outerGap,
276
- verticalAlignment,
277
- horizontalAlignment,
278
- disabled
279
- } = { ...defaultPopoverPositionOptions, ...options };
280
- if (disabled || !trigger) {
281
- return {};
282
- }
283
- const left = {
284
- leftOutside: trigger.left - outerGap,
285
- leftInside: trigger.left,
286
- rightOutside: trigger.right + outerGap,
287
- rightInside: trigger.right,
288
- center: trigger.left + trigger.width / 2
289
- }[horizontalAlignment];
290
- const top = {
291
- topOutside: trigger.top - outerGap,
292
- topInside: trigger.top,
293
- bottomOutside: trigger.bottom + outerGap,
294
- bottomInside: trigger.bottom,
295
- center: trigger.top + trigger.height / 2
296
- }[verticalAlignment];
297
- const translateX = {
298
- leftOutside: "-100%",
299
- leftInside: void 0,
300
- rightOutside: void 0,
301
- rightInside: "-100%",
302
- center: "-50%"
303
- }[horizontalAlignment];
304
- const translateY = {
305
- topOutside: "-100%",
306
- topInside: void 0,
307
- bottomOutside: void 0,
308
- bottomInside: "-100%",
309
- center: "-50%"
310
- }[verticalAlignment];
311
- return {
312
- left: Math.max(left, edgePadding),
313
- top: Math.max(top, edgePadding),
314
- translate: [translateX ?? "0", translateY ?? "0"].join(" ")
315
- };
316
- };
317
-
318
- // src/components/user-action/Menu.tsx
319
- import { createPortal } from "react-dom";
320
- import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
321
- function getScrollableParents(element) {
322
- const scrollables = [];
323
- let parent = element.parentElement;
324
- while (parent) {
325
- scrollables.push(parent);
326
- parent = parent.parentElement;
327
- }
328
- return scrollables;
329
- }
330
- var Menu = ({
331
- trigger,
332
- children,
333
- alignmentHorizontal = "leftInside",
334
- alignmentVertical = "bottomOutside",
335
- showOnHover = false,
336
- disabled = false,
337
- menuClassName = ""
338
- }) => {
339
- const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
340
- const triggerRef = useRef(null);
341
- const menuRef = useRef(null);
342
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
343
- const [isHidden, setIsHidden] = useState3(true);
344
- const bag = {
345
- isOpen,
346
- close: () => setIsOpen(false),
347
- toggleOpen: () => setIsOpen((prevState) => !prevState),
348
- disabled
349
- };
350
- const menuPosition = usePopoverPosition(
351
- triggerRef.current?.getBoundingClientRect(),
352
- { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
353
- );
354
- useEffect4(() => {
355
- if (!isOpen) return;
356
- const triggerEl = triggerRef.current;
357
- if (!triggerEl) return;
358
- const scrollableParents = getScrollableParents(triggerEl);
359
- const close = () => setIsOpen(false);
360
- scrollableParents.forEach((parent) => {
361
- parent.addEventListener("scroll", close);
362
- });
363
- window.addEventListener("resize", close);
364
- return () => {
365
- scrollableParents.forEach((parent) => {
366
- parent.removeEventListener("scroll", close);
367
- });
368
- window.removeEventListener("resize", close);
369
- };
370
- }, [isOpen, setIsOpen]);
371
- useEffect4(() => {
372
- if (isOpen) {
373
- setIsHidden(false);
374
- }
375
- }, [isOpen]);
376
- return /* @__PURE__ */ jsxs3(Fragment, { children: [
377
- trigger(bag, triggerRef),
378
- createPortal(/* @__PURE__ */ jsx4(
379
- "div",
380
- {
381
- ref: menuRef,
382
- onClick: (e) => e.stopPropagation(),
383
- className: clsx4(
384
- "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
385
- {
386
- "animate-pop-in": isOpen,
387
- "animate-pop-out": !isOpen,
388
- "hidden": isHidden
389
- },
390
- menuClassName
391
- ),
392
- onAnimationEnd: () => {
393
- if (!isOpen) {
394
- setIsHidden(true);
395
- }
396
- },
397
- style: {
398
- ...menuPosition
399
- },
400
- children: BagFunctionUtil.resolve(children, bag)
401
- }
402
- ), document.body)
403
- ] });
404
- };
405
-
406
- // src/components/user-action/Input.tsx
407
- import { forwardRef as forwardRef2, useEffect as useEffect7, useImperativeHandle, useRef as useRef2, useState as useState5 } from "react";
408
- import clsx5 from "clsx";
409
-
410
- // src/hooks/useDelay.ts
411
- import { useEffect as useEffect5, useState as useState4 } from "react";
412
- var defaultOptions = {
413
- delay: 3e3,
414
- disabled: false
415
- };
416
- function useDelay(options) {
417
- const [timer, setTimer] = useState4(void 0);
418
- const { delay, disabled } = {
419
- ...defaultOptions,
420
- ...options
421
- };
422
- const clearTimer = () => {
423
- clearTimeout(timer);
424
- setTimer(void 0);
425
- };
426
- const restartTimer = (onDelayFinish) => {
427
- if (disabled) {
428
- return;
429
- }
430
- clearTimeout(timer);
431
- setTimer(setTimeout(() => {
432
- onDelayFinish();
433
- setTimer(void 0);
434
- }, delay));
435
- };
436
- useEffect5(() => {
437
- return () => {
438
- clearTimeout(timer);
439
- };
440
- }, [timer]);
441
- useEffect5(() => {
442
- if (disabled) {
443
- clearTimeout(timer);
444
- setTimer(void 0);
445
- }
446
- }, [disabled, timer]);
447
- return { restartTimer, clearTimer, hasActiveTimer: !!timer };
448
- }
449
-
450
- // src/hooks/useFocusManagement.ts
451
- import { useCallback as useCallback2 } from "react";
452
- function useFocusManagement() {
453
- const getFocusableElements = useCallback2(() => {
454
- return Array.from(
455
- document.querySelectorAll(
456
- 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
457
- )
458
- ).filter(
459
- (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
460
- );
461
- }, []);
462
- const getNextFocusElement = useCallback2(() => {
463
- const elements = getFocusableElements();
464
- if (elements.length === 0) {
465
- return void 0;
466
- }
467
- let nextElement = elements[0];
468
- if (document.activeElement instanceof HTMLElement) {
469
- const currentIndex = elements.indexOf(document.activeElement);
470
- nextElement = elements[(currentIndex + 1) % elements.length];
471
- }
472
- return nextElement;
473
- }, [getFocusableElements]);
474
- const focusNext = useCallback2(() => {
475
- const nextElement = getNextFocusElement();
476
- nextElement?.focus();
477
- }, [getNextFocusElement]);
478
- const getPreviousFocusElement = useCallback2(() => {
479
- const elements = getFocusableElements();
480
- if (elements.length === 0) {
481
- return void 0;
482
- }
483
- let previousElement = elements[0];
484
- if (document.activeElement instanceof HTMLElement) {
485
- const currentIndex = elements.indexOf(document.activeElement);
486
- if (currentIndex === 0) {
487
- previousElement = elements[elements.length - 1];
488
- } else {
489
- previousElement = elements[currentIndex - 1];
490
- }
491
- }
492
- return previousElement;
493
- }, [getFocusableElements]);
494
- const focusPrevious = useCallback2(() => {
495
- const previousElement = getPreviousFocusElement();
496
- if (previousElement) previousElement.focus();
497
- }, [getPreviousFocusElement]);
498
- return {
499
- getFocusableElements,
500
- getNextFocusElement,
501
- getPreviousFocusElement,
502
- focusNext,
503
- focusPrevious
504
- };
505
- }
506
-
507
- // src/hooks/useFocusOnceVisible.ts
508
- import React, { useEffect as useEffect6 } from "react";
509
- var useFocusOnceVisible = (ref, disable = false) => {
510
- const [hasUsedFocus, setHasUsedFocus] = React.useState(false);
511
- useEffect6(() => {
512
- if (disable || hasUsedFocus) {
513
- return;
514
- }
515
- const observer = new IntersectionObserver(([entry]) => {
516
- if (entry.isIntersecting && !hasUsedFocus) {
517
- ref.current?.focus();
518
- setHasUsedFocus(hasUsedFocus);
519
- }
520
- }, {
521
- threshold: 0.1
522
- });
523
- if (ref.current) {
524
- observer.observe(ref.current);
525
- }
526
- return () => observer.disconnect();
527
- }, [disable, hasUsedFocus, ref]);
528
- };
529
-
530
- // src/components/user-action/Input.tsx
531
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
532
- var getInputClassName = ({ disabled = false, hasError = false }) => {
533
- return clsx5(
534
- "px-2 py-1.5 rounded-md border-2",
535
- {
536
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !hasError,
537
- "bg-on-negative text-negative border-negative-border hover:border-negative-border-hover": !disabled && hasError,
538
- "bg-disabled-background text-disabled-text border-disabled-border": disabled
539
- }
540
- );
541
- };
542
- var defaultEditCompleteOptions = {
543
- onBlur: true,
544
- afterDelay: true,
545
- delay: 2500
546
- };
547
- var Input = forwardRef2(function Input2({
548
- id,
549
- type = "text",
550
- value,
551
- label,
552
- onChange = noop,
553
- onChangeText = noop,
554
- onEditCompleted,
555
- className = "",
556
- allowEnterComplete = true,
557
- expanded = true,
558
- autoFocus = false,
559
- onBlur,
560
- editCompleteOptions,
561
- containerClassName,
562
- disabled,
563
- ...restProps
564
- }, forwardedRef) {
565
- const { onBlur: allowEditCompleteOnBlur, afterDelay, delay } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
566
- const {
567
- restartTimer,
568
- clearTimer
569
- } = useDelay({ delay, disabled: !afterDelay });
570
- const innerRef = useRef2(null);
571
- const { focusNext } = useFocusManagement();
572
- useFocusOnceVisible(innerRef, !autoFocus);
573
- useImperativeHandle(forwardedRef, () => innerRef.current);
574
- const handleKeyDown = (e) => {
575
- if (e.key === "Enter" && !e.shiftKey) {
576
- e.preventDefault();
577
- innerRef.current?.blur();
578
- focusNext();
579
- }
580
- };
581
- return /* @__PURE__ */ jsxs4("div", { className: clsx5({ "w-full": expanded }, containerClassName), children: [
582
- label && /* @__PURE__ */ jsx5(Label, { ...label, htmlFor: id, className: clsx5("mb-1", label.className) }),
583
- /* @__PURE__ */ jsx5(
584
- "input",
585
- {
586
- ...restProps,
587
- ref: innerRef,
588
- value,
589
- id,
590
- type,
591
- disabled,
592
- className: clsx5(getInputClassName({ disabled }), className),
593
- onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
594
- onBlur: (event) => {
595
- onBlur?.(event);
596
- if (onEditCompleted && allowEditCompleteOnBlur) {
597
- onEditCompleted(event.target.value);
598
- clearTimer();
599
- }
600
- },
601
- onChange: (e) => {
602
- const value2 = e.target.value;
603
- if (onEditCompleted) {
604
- restartTimer(() => {
605
- if (innerRef.current) {
606
- innerRef.current.blur();
607
- if (!allowEditCompleteOnBlur) {
608
- onEditCompleted(value2);
609
- }
610
- } else {
611
- onEditCompleted(value2);
612
- }
613
- });
614
- }
615
- onChange(e);
616
- onChangeText(value2);
617
- }
618
- }
619
- )
620
- ] });
621
- });
622
- var FormInput = forwardRef2(function FormInput2({
623
- id,
624
- labelText,
625
- errorText,
626
- className,
627
- labelClassName,
628
- errorClassName,
629
- containerClassName,
630
- required,
631
- disabled,
632
- ...restProps
633
- }, ref) {
634
- const input = /* @__PURE__ */ jsx5(
635
- "input",
636
- {
637
- ...restProps,
638
- ref,
639
- id,
640
- disabled,
641
- className: clsx5(
642
- getInputClassName({ disabled, hasError: !!errorText }),
643
- className
644
- )
645
- }
646
- );
647
- return /* @__PURE__ */ jsxs4("div", { className: clsx5("flex flex-col gap-y-1", containerClassName), children: [
648
- labelText && /* @__PURE__ */ jsxs4("label", { htmlFor: id, className: clsx5("textstyle-label-md", labelClassName), children: [
649
- labelText,
650
- required && /* @__PURE__ */ jsx5("span", { className: "text-primary font-bold", children: "*" })
651
- ] }),
652
- input,
653
- errorText && /* @__PURE__ */ jsx5("label", { htmlFor: id, className: clsx5("text-negative", errorClassName), children: errorText })
654
- ] });
655
- });
656
-
657
- // src/localization/LanguageProvider.tsx
658
- import { createContext, useContext, useEffect as useEffect8, useState as useState7 } from "react";
659
-
660
- // src/hooks/useLocalStorage.ts
661
- import { useCallback as useCallback3, useState as useState6 } from "react";
662
-
663
- // src/localization/util.ts
664
- var languages = ["en", "de"];
665
- var languagesLocalNames = {
666
- en: "English",
667
- de: "Deutsch"
668
- };
669
- var DEFAULT_LANGUAGE = "en";
670
- var LanguageUtil = {
671
- languages,
672
- DEFAULT_LANGUAGE,
673
- languagesLocalNames
674
- };
675
-
676
- // src/localization/LanguageProvider.tsx
677
- import { jsx as jsx6 } from "react/jsx-runtime";
678
- var LanguageContext = createContext({
679
- language: LanguageUtil.DEFAULT_LANGUAGE,
680
- setLanguage: (v) => v
681
- });
682
- var useLanguage = () => useContext(LanguageContext);
683
-
684
- // src/localization/useTranslation.ts
685
- var TranslationPluralCount = {
686
- zero: 0,
687
- one: 1,
688
- two: 2,
689
- few: 3,
690
- many: 11,
691
- other: -1
692
- };
693
- var useTranslation = (translations, overwriteTranslation = {}) => {
694
- const { language: languageProp, translation: overwrite } = overwriteTranslation;
695
- const { language: inferredLanguage } = useLanguage();
696
- const usedLanguage = languageProp ?? inferredLanguage;
697
- const usedTranslations = [...translations];
698
- if (overwrite) {
699
- usedTranslations.push(overwrite);
700
- }
701
- return (key, options) => {
702
- const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
703
- try {
704
- for (let i = translations.length - 1; i >= 0; i--) {
705
- const translation = translations[i];
706
- const localizedTranslation = translation[usedLanguage];
707
- if (!localizedTranslation) {
708
- continue;
709
- }
710
- const value = localizedTranslation[key];
711
- if (!value) {
712
- continue;
713
- }
714
- let forProcessing;
715
- if (typeof value !== "string") {
716
- if (count === TranslationPluralCount.zero && value?.zero) {
717
- forProcessing = value.zero;
718
- } else if (count === TranslationPluralCount.one && value?.one) {
719
- forProcessing = value.one;
720
- } else if (count === TranslationPluralCount.two && value?.two) {
721
- forProcessing = value.two;
722
- } else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
723
- forProcessing = value.few;
724
- } else if (count > TranslationPluralCount.many && value?.many) {
725
- forProcessing = value.many;
726
- } else {
727
- forProcessing = value.other;
728
- }
729
- } else {
730
- forProcessing = value;
731
- }
732
- forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
733
- return replacements[placeholder] ?? `{{key:${placeholder}}}`;
734
- });
735
- return forProcessing;
736
- }
737
- } catch (e) {
738
- console.error(e);
739
- }
740
- return `{{${usedLanguage}:${key}}}`;
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
- disabled = false,
890
- color = "primary",
891
- size = "medium",
892
- startIcon,
893
- endIcon,
894
- onClick,
895
- className,
896
- ...restProps
897
- }, ref) {
898
- const colorClasses = {
899
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
900
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
901
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
902
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
903
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
904
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
905
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
906
- }[color];
907
- const iconColorClasses = {
908
- primary: "text-button-solid-primary-icon",
909
- secondary: "text-button-solid-secondary-icon",
910
- tertiary: "text-button-solid-tertiary-icon",
911
- positive: "text-button-solid-positive-icon",
912
- warning: "text-button-solid-warning-icon",
913
- negative: "text-button-solid-negative-icon",
914
- neutral: "text-button-solid-neutral-icon"
915
- }[color];
916
- return /* @__PURE__ */ jsxs5(
917
- "button",
918
- {
919
- ref,
920
- onClick,
921
- disabled,
922
- className: clsx6(
923
- "font-semibold",
924
- {
925
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
926
- [clsx6(colorClasses, "hover:brightness-90")]: !disabled
927
- },
928
- ButtonUtil.paddingMapping[size],
929
- className
930
- ),
931
- ...restProps,
932
- children: [
933
- startIcon && /* @__PURE__ */ jsx7(
934
- "span",
935
- {
936
- className: clsx6({
937
- [iconColorClasses]: !disabled,
938
- [`text-disabled-icon`]: disabled
939
- }),
940
- children: startIcon
941
- }
942
- ),
943
- children,
944
- endIcon && /* @__PURE__ */ jsx7(
945
- "span",
946
- {
947
- className: clsx6({
948
- [iconColorClasses]: !disabled,
949
- [`text-disabled-icon`]: disabled
950
- }),
951
- children: endIcon
952
- }
953
- )
954
- ]
955
- }
956
- );
957
- });
958
- var IconButton = ({
959
- children,
960
- disabled = false,
961
- color = "primary",
962
- size = "medium",
963
- className,
964
- ...restProps
965
- }) => {
966
- const colorClasses = {
967
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
968
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
969
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
970
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
971
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
972
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
973
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
974
- transparent: "bg-transparent"
975
- }[color];
976
- return /* @__PURE__ */ jsx7(
977
- "button",
978
- {
979
- disabled,
980
- className: clsx6(
981
- {
982
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
983
- "text-disabled-text cursor-not-allowed opacity-70": disabled && color === "transparent",
984
- "hover:bg-button-text-hover-background": !disabled && color === "transparent",
985
- [clsx6(colorClasses, "hover:brightness-90")]: !disabled
986
- },
987
- ButtonUtil.iconPaddingMapping[size],
988
- className
989
- ),
990
- ...restProps,
991
- children
992
- }
993
- );
994
- };
995
-
996
- // src/components/user-action/SearchBar.tsx
997
- import { Search } from "lucide-react";
998
- import { clsx as clsx7 } from "clsx";
999
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1000
- var SearchBar = ({
1001
- placeholder,
1002
- onSearch,
1003
- disableOnSearch,
1004
- containerClassName,
1005
- ...inputProps
1006
- }) => {
1007
- const translation = useTranslation([formTranslation]);
1008
- return /* @__PURE__ */ jsxs6("div", { className: clsx7("flex-row-2 justify-between items-center", containerClassName), children: [
1009
- /* @__PURE__ */ jsx8(
1010
- Input,
1011
- {
1012
- ...inputProps,
1013
- placeholder: placeholder ?? translation("search")
1014
- }
1015
- ),
1016
- onSearch && /* @__PURE__ */ jsx8(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ jsx8(Search, { className: "w-full h-full" }) })
1017
- ] });
1018
- };
1019
-
1020
- // src/hooks/useSearch.ts
1021
- import { useCallback as useCallback4, useEffect as useEffect9, useMemo, useState as useState8 } from "react";
1022
-
1023
- // src/util/simpleSearch.ts
1024
- var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
1025
- return objects.filter((object) => {
1026
- const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
1027
- if (!mappedSearchKeywords) {
1028
- return true;
1029
- }
1030
- return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
1031
- });
1032
- };
1033
-
1034
- // src/hooks/useSearch.ts
1035
- var useSearch = ({
1036
- list,
1037
- initialSearch,
1038
- searchMapping,
1039
- additionalSearchTags,
1040
- isSearchInstant = true,
1041
- sortingFunction,
1042
- filter,
1043
- disabled = false
1044
- }) => {
1045
- const [search, setSearch] = useState8(initialSearch ?? "");
1046
- const [result, setResult] = useState8(list);
1047
- const searchTags = useMemo(() => additionalSearchTags ?? [], [additionalSearchTags]);
1048
- const updateSearch = useCallback4((newSearch) => {
1049
- const usedSearch = newSearch ?? search;
1050
- if (newSearch) {
1051
- setSearch(search);
1052
- }
1053
- setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
1054
- }, [searchTags, list, search, searchMapping]);
1055
- useEffect9(() => {
1056
- if (isSearchInstant) {
1057
- setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
1058
- }
1059
- }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
1060
- const filteredResult = useMemo(() => {
1061
- if (!filter) {
1062
- return result;
1063
- }
1064
- return result.filter(filter);
1065
- }, [result, filter]);
1066
- const sortedAndFilteredResult = useMemo(() => {
1067
- if (!sortingFunction) {
1068
- return filteredResult;
1069
- }
1070
- return filteredResult.sort(sortingFunction);
1071
- }, [filteredResult, sortingFunction]);
1072
- const usedResult = useMemo(() => {
1073
- if (!disabled) {
1074
- return sortedAndFilteredResult;
1075
- }
1076
- return list;
1077
- }, [disabled, list, sortedAndFilteredResult]);
1078
- return {
1079
- result: usedResult,
1080
- hasResult: usedResult.length > 0,
1081
- allItems: list,
1082
- updateSearch,
1083
- search,
1084
- setSearch
1085
- };
1086
- };
1087
-
1088
- // src/components/user-action/Select.tsx
1089
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1090
- var Select = ({
1091
- value,
1092
- label,
1093
- options,
1094
- onChange,
1095
- hintText = "",
1096
- selectedDisplayOverwrite,
1097
- searchOptions,
1098
- additionalItems,
1099
- className,
1100
- triggerClassName,
1101
- hintTextClassName,
1102
- ...menuProps
1103
- }) => {
1104
- const selectedOption = options.find((option) => option.value === value);
1105
- if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
1106
- 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");
1107
- }
1108
- const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
1109
- const { result, search, setSearch } = useSearch({
1110
- list: options,
1111
- searchMapping: useCallback5((item) => item.searchTags, []),
1112
- ...searchOptions
1113
- });
1114
- return /* @__PURE__ */ jsxs7("div", { className: clsx8(className), children: [
1115
- label && /* @__PURE__ */ jsx9(Label, { ...label, labelType: label.labelType ?? "labelBig", className: clsx8("mb-1", label.className) }),
1116
- /* @__PURE__ */ jsx9(
1117
- Menu,
1118
- {
1119
- ...menuProps,
1120
- trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ jsxs7(
1121
- "button",
1122
- {
1123
- ref,
1124
- className: clsx8(
1125
- "btn-md justify-between w-full border-2",
1126
- {
1127
- "rounded-b-lg": !open,
1128
- "bg-input-background text-input-text hover:border-primary": !disabled,
1129
- "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
1130
- },
1131
- triggerClassName
1132
- ),
1133
- onClick: toggleOpen,
1134
- disabled,
1135
- children: [
1136
- !isShowingHint && /* @__PURE__ */ jsx9("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? selectedOption?.label }),
1137
- isShowingHint && /* @__PURE__ */ jsx9("span", { className: clsx8("textstyle-description", hintTextClassName), children: hintText }),
1138
- /* @__PURE__ */ jsx9(ExpansionIcon, { isExpanded: isOpen })
1139
- ]
1140
- }
1141
- ),
1142
- menuClassName: clsx8("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
1143
- children: (bag) => {
1144
- const { close } = bag;
1145
- return /* @__PURE__ */ jsxs7(Fragment2, { children: [
1146
- !searchOptions?.disabled && /* @__PURE__ */ jsx9(
1147
- SearchBar,
1148
- {
1149
- value: search,
1150
- onChangeText: setSearch,
1151
- autoFocus: true
1152
- }
1153
- ),
1154
- /* @__PURE__ */ jsxs7("div", { className: "flex-col-2 overflow-y-auto", children: [
1155
- result.map((option, index) => /* @__PURE__ */ jsx9(
1156
- ListTile,
1157
- {
1158
- isSelected: option === selectedOption,
1159
- title: option.label,
1160
- onClick: () => {
1161
- onChange(option.value);
1162
- close();
1163
- },
1164
- disabled: option.disabled
1165
- },
1166
- index
1167
- )),
1168
- additionalItems && additionalItems({ ...bag, search, selected: value })
1169
- ] })
1170
- ] });
1171
- }
1172
- }
1173
- )
1174
- ] });
1175
- };
1176
- var SelectUncontrolled = ({
1177
- options,
1178
- onChange,
1179
- value,
1180
- hintText,
1181
- ...props
1182
- }) => {
1183
- const [selected, setSelected] = useState9(value);
1184
- useEffect10(() => {
1185
- if (options.find((options2) => options2.value === value)) {
1186
- setSelected(value);
1187
- }
1188
- }, [options, value]);
1189
- return /* @__PURE__ */ jsx9(
1190
- Select,
1191
- {
1192
- value: selected,
1193
- options,
1194
- onChange: (value2) => {
1195
- setSelected(value2);
1196
- onChange(value2);
1197
- },
1198
- hintText,
1199
- ...props
1200
- }
1201
- );
1202
- };
1203
- export {
1204
- Select,
1205
- SelectUncontrolled
1206
- };
1207
- //# sourceMappingURL=Select.mjs.map