@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,15 +1,674 @@
1
1
  // src/components/table/Table.tsx
2
- import { useCallback as useCallback3, useEffect as useEffect11, useMemo, useRef as useRef3, useState as useState10 } from "react";
2
+ import { useCallback as useCallback6, useEffect as useEffect15, useMemo as useMemo4, useRef as useRef8, useState as useState14 } from "react";
3
+ import clsx9 from "clsx";
4
+ import {
5
+ flexRender,
6
+ getCoreRowModel,
7
+ getFilteredRowModel,
8
+ getPaginationRowModel,
9
+ getSortedRowModel,
10
+ useReactTable
11
+ } from "@tanstack/react-table";
3
12
 
4
- // src/components/layout-and-navigation/Pagination.tsx
5
- import { ChevronFirst, ChevronLast, ChevronLeft, ChevronRight } from "lucide-react";
13
+ // src/utils/array.ts
14
+ var defaultRangeOptions = {
15
+ allowEmptyRange: false,
16
+ stepSize: 1,
17
+ exclusiveStart: false,
18
+ exclusiveEnd: true
19
+ };
20
+ var range = (endOrRange, options) => {
21
+ const { allowEmptyRange, stepSize, exclusiveStart, exclusiveEnd } = { ...defaultRangeOptions, ...options };
22
+ let start = 0;
23
+ let end;
24
+ if (typeof endOrRange === "number") {
25
+ end = endOrRange;
26
+ } else {
27
+ start = endOrRange[0];
28
+ end = endOrRange[1];
29
+ }
30
+ if (!exclusiveEnd) {
31
+ end -= 1;
32
+ }
33
+ if (exclusiveStart) {
34
+ start += 1;
35
+ }
36
+ if (end - 1 < start) {
37
+ if (!allowEmptyRange) {
38
+ console.warn(`range: end (${end}) < start (${start}) should be allowed explicitly, set options.allowEmptyRange to true`);
39
+ }
40
+ return [];
41
+ }
42
+ return Array.from({ length: end - start }, (_, index) => index * stepSize + start);
43
+ };
44
+
45
+ // src/components/table/Table.tsx
46
+ import { Scrollbars } from "react-custom-scrollbars-2";
47
+
48
+ // src/utils/math.ts
49
+ var clamp = (value, range2 = [0, 1]) => {
50
+ const [min, max] = range2;
51
+ return Math.min(Math.max(value, min), max);
52
+ };
53
+
54
+ // src/utils/noop.ts
55
+ var noop = () => void 0;
56
+
57
+ // src/components/table/TableCell.tsx
58
+ import { clsx } from "clsx";
59
+ import { jsx } from "react/jsx-runtime";
60
+ var TableCell = ({
61
+ children,
62
+ className
63
+ }) => {
64
+ return /* @__PURE__ */ jsx("span", { className: clsx("block max-w-full overflow-ellipsis truncate", className), children });
65
+ };
66
+
67
+ // src/components/table/Filter.ts
68
+ var dateRange = (row, columnId, filterValue) => {
69
+ const [min, max] = filterValue;
70
+ const value = row.getValue(columnId);
71
+ const date = value instanceof Date ? value : new Date(value);
72
+ if (isNaN(date.getTime())) return false;
73
+ if (min && date < min) return false;
74
+ if (max && date > max) return false;
75
+ return true;
76
+ };
77
+ var TableFilters = {
78
+ dateRange
79
+ };
80
+
81
+ // src/hooks/useResizeCallbackWrapper.ts
82
+ import { useEffect } from "react";
83
+ var useResizeCallbackWrapper = (callback) => {
84
+ useEffect(() => {
85
+ window.addEventListener("resize", callback);
86
+ return () => {
87
+ window.removeEventListener("resize", callback);
88
+ };
89
+ }, [callback]);
90
+ };
91
+
92
+ // src/components/table/TableSortButton.tsx
93
+ import { ChevronDown, ChevronsUpDown, ChevronUp } from "lucide-react";
94
+
95
+ // src/components/user-action/Button.tsx
96
+ import { forwardRef } from "react";
97
+ import clsx2 from "clsx";
98
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
99
+ var ButtonColorUtil = {
100
+ solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
101
+ text: ["primary", "negative", "neutral"],
102
+ outline: ["primary"]
103
+ };
104
+ var IconButtonUtil = {
105
+ icon: [...ButtonColorUtil.solid, "transparent"]
106
+ };
107
+ var paddingMapping = {
108
+ small: "btn-sm",
109
+ medium: "btn-md",
110
+ large: "btn-lg"
111
+ };
112
+ var iconPaddingMapping = {
113
+ tiny: "icon-btn-xs",
114
+ small: "icon-btn-sm",
115
+ medium: "icon-btn-md",
116
+ large: "icon-btn-lg"
117
+ };
118
+ var ButtonUtil = {
119
+ paddingMapping,
120
+ iconPaddingMapping
121
+ };
122
+ var SolidButton = forwardRef(function SolidButton2({
123
+ children,
124
+ color = "primary",
125
+ size = "medium",
126
+ startIcon,
127
+ endIcon,
128
+ onClick,
129
+ className,
130
+ ...restProps
131
+ }, ref) {
132
+ const colorClasses = {
133
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
134
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
135
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
136
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
137
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
138
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
139
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
140
+ }[color];
141
+ const iconColorClasses = {
142
+ primary: "not-group-disabled:text-button-solid-primary-icon",
143
+ secondary: "not-group-disabled:text-button-solid-secondary-icon",
144
+ tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
145
+ positive: "not-group-disabled:text-button-solid-positive-icon",
146
+ warning: "not-group-disabled:text-button-solid-warning-icon",
147
+ negative: "not-group-disabled:text-button-solid-negative-icon",
148
+ neutral: "not-group-disabled:text-button-solid-neutral-icon"
149
+ }[color];
150
+ return /* @__PURE__ */ jsxs(
151
+ "button",
152
+ {
153
+ ref,
154
+ onClick,
155
+ className: clsx2(
156
+ "group font-semibold",
157
+ colorClasses,
158
+ "not-disabled:hover:brightness-90",
159
+ "disabled:text-disabled-text disabled:bg-disabled-background",
160
+ ButtonUtil.paddingMapping[size],
161
+ className
162
+ ),
163
+ ...restProps,
164
+ children: [
165
+ startIcon && /* @__PURE__ */ jsx2(
166
+ "span",
167
+ {
168
+ className: clsx2(
169
+ iconColorClasses,
170
+ "group-disabled:text-disabled-icon"
171
+ ),
172
+ children: startIcon
173
+ }
174
+ ),
175
+ children,
176
+ endIcon && /* @__PURE__ */ jsx2(
177
+ "span",
178
+ {
179
+ className: clsx2(
180
+ iconColorClasses,
181
+ "group-disabled:text-disabled-icon"
182
+ ),
183
+ children: endIcon
184
+ }
185
+ )
186
+ ]
187
+ }
188
+ );
189
+ });
190
+ var IconButton = forwardRef(function IconButton2({
191
+ children,
192
+ color = "primary",
193
+ size = "medium",
194
+ className,
195
+ ...restProps
196
+ }, ref) {
197
+ const colorClasses = {
198
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
199
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
200
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
201
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
202
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
203
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
204
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
205
+ transparent: "not-disabled:bg-transparent"
206
+ }[color];
207
+ return /* @__PURE__ */ jsx2(
208
+ "button",
209
+ {
210
+ ref,
211
+ className: clsx2(
212
+ colorClasses,
213
+ "not-disabled:hover:brightness-90",
214
+ "disabled:text-disabled-text",
215
+ {
216
+ "disabled:bg-disabled-background": color !== "transparent",
217
+ "disabled:opacity-70": color === "transparent",
218
+ "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
219
+ },
220
+ ButtonUtil.iconPaddingMapping[size],
221
+ className
222
+ ),
223
+ ...restProps,
224
+ children
225
+ }
226
+ );
227
+ });
228
+
229
+ // src/components/table/TableSortButton.tsx
230
+ import clsx3 from "clsx";
231
+ import { jsx as jsx3 } from "react/jsx-runtime";
232
+ var TableSortButton = ({
233
+ sortDirection,
234
+ invert = false,
235
+ color = "neutral",
236
+ className,
237
+ ...buttonProps
238
+ }) => {
239
+ let icon = /* @__PURE__ */ jsx3(ChevronsUpDown, { className: "w-full h-full" });
240
+ if (sortDirection) {
241
+ let usedSortDirection = sortDirection;
242
+ if (invert) {
243
+ usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
244
+ }
245
+ icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx3(ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ jsx3(ChevronDown, { className: "w-full h-full" });
246
+ }
247
+ return /* @__PURE__ */ jsx3(
248
+ IconButton,
249
+ {
250
+ size: "tiny",
251
+ color,
252
+ className: clsx3(className),
253
+ ...buttonProps,
254
+ children: icon
255
+ }
256
+ );
257
+ };
258
+
259
+ // src/components/user-action/input/Input.tsx
260
+ import { forwardRef as forwardRef2, useEffect as useEffect3, useImperativeHandle, useRef, useState as useState2 } from "react";
6
261
  import clsx4 from "clsx";
7
262
 
263
+ // src/hooks/useDelay.ts
264
+ import { useEffect as useEffect2, useState } from "react";
265
+ var defaultOptions = {
266
+ delay: 3e3,
267
+ disabled: false
268
+ };
269
+ function useDelay(options) {
270
+ const [timer, setTimer] = useState(void 0);
271
+ const { delay, disabled } = {
272
+ ...defaultOptions,
273
+ ...options
274
+ };
275
+ const clearTimer = () => {
276
+ clearTimeout(timer);
277
+ setTimer(void 0);
278
+ };
279
+ const restartTimer = (onDelayFinish) => {
280
+ if (disabled) {
281
+ return;
282
+ }
283
+ clearTimeout(timer);
284
+ setTimer(setTimeout(() => {
285
+ onDelayFinish();
286
+ setTimer(void 0);
287
+ }, delay));
288
+ };
289
+ useEffect2(() => {
290
+ return () => {
291
+ clearTimeout(timer);
292
+ };
293
+ }, [timer]);
294
+ useEffect2(() => {
295
+ if (disabled) {
296
+ clearTimeout(timer);
297
+ setTimer(void 0);
298
+ }
299
+ }, [disabled, timer]);
300
+ return { restartTimer, clearTimer, hasActiveTimer: !!timer };
301
+ }
302
+
303
+ // src/hooks/focus/useFocusManagement.ts
304
+ import { useCallback } from "react";
305
+ function useFocusManagement() {
306
+ const getFocusableElements = useCallback(() => {
307
+ return Array.from(
308
+ document.querySelectorAll(
309
+ 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
310
+ )
311
+ ).filter(
312
+ (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
313
+ );
314
+ }, []);
315
+ const getNextFocusElement = useCallback(() => {
316
+ const elements = getFocusableElements();
317
+ if (elements.length === 0) {
318
+ return void 0;
319
+ }
320
+ let nextElement = elements[0];
321
+ if (document.activeElement instanceof HTMLElement) {
322
+ const currentIndex = elements.indexOf(document.activeElement);
323
+ nextElement = elements[(currentIndex + 1) % elements.length];
324
+ }
325
+ return nextElement;
326
+ }, [getFocusableElements]);
327
+ const focusNext = useCallback(() => {
328
+ const nextElement = getNextFocusElement();
329
+ nextElement?.focus();
330
+ }, [getNextFocusElement]);
331
+ const getPreviousFocusElement = useCallback(() => {
332
+ const elements = getFocusableElements();
333
+ if (elements.length === 0) {
334
+ return void 0;
335
+ }
336
+ let previousElement = elements[0];
337
+ if (document.activeElement instanceof HTMLElement) {
338
+ const currentIndex = elements.indexOf(document.activeElement);
339
+ if (currentIndex === 0) {
340
+ previousElement = elements[elements.length - 1];
341
+ } else {
342
+ previousElement = elements[currentIndex - 1];
343
+ }
344
+ }
345
+ return previousElement;
346
+ }, [getFocusableElements]);
347
+ const focusPrevious = useCallback(() => {
348
+ const previousElement = getPreviousFocusElement();
349
+ if (previousElement) previousElement.focus();
350
+ }, [getPreviousFocusElement]);
351
+ return {
352
+ getFocusableElements,
353
+ getNextFocusElement,
354
+ getPreviousFocusElement,
355
+ focusNext,
356
+ focusPrevious
357
+ };
358
+ }
359
+
360
+ // src/components/user-action/input/Input.tsx
361
+ import { jsx as jsx4 } from "react/jsx-runtime";
362
+ var defaultEditCompleteOptions = {
363
+ allowEnterComplete: false,
364
+ onBlur: true,
365
+ afterDelay: true,
366
+ delay: 2500
367
+ };
368
+ var Input = forwardRef2(function Input2({
369
+ value,
370
+ onChange,
371
+ onChangeText,
372
+ onEditCompleted,
373
+ editCompleteOptions,
374
+ disabled = false,
375
+ invalid = false,
376
+ defaultStyle = true,
377
+ className,
378
+ ...props
379
+ }, forwardedRef) {
380
+ const {
381
+ onBlur: allowEditCompleteOnBlur,
382
+ afterDelay,
383
+ delay,
384
+ allowEnterComplete
385
+ } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
386
+ const {
387
+ restartTimer,
388
+ clearTimer
389
+ } = useDelay({ delay, disabled: !afterDelay });
390
+ const innerRef = useRef(null);
391
+ useImperativeHandle(forwardedRef, () => innerRef.current);
392
+ const { focusNext } = useFocusManagement();
393
+ return /* @__PURE__ */ jsx4(
394
+ "input",
395
+ {
396
+ ...props,
397
+ ref: innerRef,
398
+ value,
399
+ disabled,
400
+ className: defaultStyle ? clsx4(
401
+ "px-2.5 py-1.75 rounded-md border-1 text-sm",
402
+ {
403
+ "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
404
+ "bg-on-negative text-negative border-negative-border hover:border-negative-border-hover focus-visible:ring-negative-border": !disabled && invalid,
405
+ "bg-disabled-background text-disabled-text border-disabled-border": disabled
406
+ },
407
+ className
408
+ ) : className,
409
+ onKeyDown: (event) => {
410
+ props.onKeyDown?.(event);
411
+ if (!allowEnterComplete) {
412
+ return;
413
+ }
414
+ if (event.key === "Enter" && !event.shiftKey) {
415
+ event.preventDefault();
416
+ innerRef.current?.blur();
417
+ onEditCompleted?.(event.target.value);
418
+ focusNext();
419
+ }
420
+ },
421
+ onBlur: (event) => {
422
+ props.onBlur?.(event);
423
+ if (allowEditCompleteOnBlur) {
424
+ onEditCompleted?.(event.target.value);
425
+ clearTimer();
426
+ }
427
+ },
428
+ onChange: (event) => {
429
+ onChange?.(event);
430
+ const value2 = event.target.value;
431
+ restartTimer(() => {
432
+ innerRef.current?.blur();
433
+ onEditCompleted?.(value2);
434
+ });
435
+ onChangeText?.(value2);
436
+ },
437
+ "aria-invalid": props["aria-invalid"] ?? invalid,
438
+ "aria-disabled": props["aria-disabled"] ?? disabled
439
+ }
440
+ );
441
+ });
442
+
443
+ // src/components/table/TableFilterButton.tsx
444
+ import { FilterIcon } from "lucide-react";
445
+
446
+ // src/components/user-action/Menu.tsx
447
+ import { useEffect as useEffect6, useRef as useRef2, useState as useState4 } from "react";
448
+ import clsx5 from "clsx";
449
+
450
+ // src/hooks/useOutsideClick.ts
451
+ import { useEffect as useEffect4 } from "react";
452
+ var useOutsideClick = (refs, handler) => {
453
+ useEffect4(() => {
454
+ const listener = (event) => {
455
+ if (event.target === null) return;
456
+ if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
457
+ return;
458
+ }
459
+ handler();
460
+ };
461
+ document.addEventListener("mousedown", listener);
462
+ document.addEventListener("touchstart", listener);
463
+ return () => {
464
+ document.removeEventListener("mousedown", listener);
465
+ document.removeEventListener("touchstart", listener);
466
+ };
467
+ }, [refs, handler]);
468
+ };
469
+
470
+ // src/hooks/useHoverState.ts
471
+ import { useEffect as useEffect5, useState as useState3 } from "react";
472
+ var defaultUseHoverStateProps = {
473
+ closingDelay: 200,
474
+ isDisabled: false
475
+ };
476
+ var useHoverState = (props = void 0) => {
477
+ const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
478
+ const [isHovered, setIsHovered] = useState3(false);
479
+ const [timer, setTimer] = useState3();
480
+ const onMouseEnter = () => {
481
+ if (isDisabled) {
482
+ return;
483
+ }
484
+ clearTimeout(timer);
485
+ setIsHovered(true);
486
+ };
487
+ const onMouseLeave = () => {
488
+ if (isDisabled) {
489
+ return;
490
+ }
491
+ setTimer(setTimeout(() => {
492
+ setIsHovered(false);
493
+ }, closingDelay));
494
+ };
495
+ useEffect5(() => {
496
+ if (timer) {
497
+ return () => {
498
+ clearTimeout(timer);
499
+ };
500
+ }
501
+ });
502
+ useEffect5(() => {
503
+ if (timer) {
504
+ clearTimeout(timer);
505
+ }
506
+ }, [isDisabled]);
507
+ return {
508
+ isHovered,
509
+ setIsHovered,
510
+ handlers: { onMouseEnter, onMouseLeave }
511
+ };
512
+ };
513
+
514
+ // src/utils/bagFunctions.ts
515
+ var resolve = (children, bag) => {
516
+ if (typeof children === "function") {
517
+ return children(bag);
518
+ }
519
+ return children ?? void 0;
520
+ };
521
+ var BagFunctionUtil = {
522
+ resolve
523
+ };
524
+
525
+ // src/hooks/usePopoverPosition.ts
526
+ var defaultPopoverPositionOptions = {
527
+ edgePadding: 16,
528
+ outerGap: 4,
529
+ horizontalAlignment: "leftInside",
530
+ verticalAlignment: "bottomOutside",
531
+ disabled: false
532
+ };
533
+ var usePopoverPosition = (trigger, options) => {
534
+ const {
535
+ edgePadding,
536
+ outerGap,
537
+ verticalAlignment,
538
+ horizontalAlignment,
539
+ disabled
540
+ } = { ...defaultPopoverPositionOptions, ...options };
541
+ if (disabled || !trigger) {
542
+ return {};
543
+ }
544
+ const left = {
545
+ leftOutside: trigger.left - outerGap,
546
+ leftInside: trigger.left,
547
+ rightOutside: trigger.right + outerGap,
548
+ rightInside: trigger.right,
549
+ center: trigger.left + trigger.width / 2
550
+ }[horizontalAlignment];
551
+ const top = {
552
+ topOutside: trigger.top - outerGap,
553
+ topInside: trigger.top,
554
+ bottomOutside: trigger.bottom + outerGap,
555
+ bottomInside: trigger.bottom,
556
+ center: trigger.top + trigger.height / 2
557
+ }[verticalAlignment];
558
+ const translateX = {
559
+ leftOutside: "-100%",
560
+ leftInside: void 0,
561
+ rightOutside: void 0,
562
+ rightInside: "-100%",
563
+ center: "-50%"
564
+ }[horizontalAlignment];
565
+ const translateY = {
566
+ topOutside: "-100%",
567
+ topInside: void 0,
568
+ bottomOutside: void 0,
569
+ bottomInside: "-100%",
570
+ center: "-50%"
571
+ }[verticalAlignment];
572
+ return {
573
+ left: Math.max(left, edgePadding),
574
+ top: Math.max(top, edgePadding),
575
+ translate: [translateX ?? "0", translateY ?? "0"].join(" ")
576
+ };
577
+ };
578
+
579
+ // src/components/user-action/Menu.tsx
580
+ import { createPortal } from "react-dom";
581
+ import { Fragment, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
582
+ function getScrollableParents(element) {
583
+ const scrollables = [];
584
+ let parent = element.parentElement;
585
+ while (parent) {
586
+ scrollables.push(parent);
587
+ parent = parent.parentElement;
588
+ }
589
+ return scrollables;
590
+ }
591
+ var Menu = ({
592
+ trigger,
593
+ children,
594
+ alignmentHorizontal = "leftInside",
595
+ alignmentVertical = "bottomOutside",
596
+ showOnHover = false,
597
+ disabled = false,
598
+ menuClassName = ""
599
+ }) => {
600
+ const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
601
+ const triggerRef = useRef2(null);
602
+ const menuRef = useRef2(null);
603
+ useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
604
+ const [isHidden, setIsHidden] = useState4(true);
605
+ const bag = {
606
+ isOpen,
607
+ close: () => setIsOpen(false),
608
+ toggleOpen: () => setIsOpen((prevState) => !prevState),
609
+ disabled
610
+ };
611
+ const menuPosition = usePopoverPosition(
612
+ triggerRef.current?.getBoundingClientRect(),
613
+ { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
614
+ );
615
+ useEffect6(() => {
616
+ if (!isOpen) return;
617
+ const triggerEl = triggerRef.current;
618
+ if (!triggerEl) return;
619
+ const scrollableParents = getScrollableParents(triggerEl);
620
+ const close = () => setIsOpen(false);
621
+ scrollableParents.forEach((parent) => {
622
+ parent.addEventListener("scroll", close);
623
+ });
624
+ window.addEventListener("resize", close);
625
+ return () => {
626
+ scrollableParents.forEach((parent) => {
627
+ parent.removeEventListener("scroll", close);
628
+ });
629
+ window.removeEventListener("resize", close);
630
+ };
631
+ }, [isOpen, setIsOpen]);
632
+ useEffect6(() => {
633
+ if (isOpen) {
634
+ setIsHidden(false);
635
+ }
636
+ }, [isOpen]);
637
+ return /* @__PURE__ */ jsxs2(Fragment, { children: [
638
+ trigger(bag, triggerRef),
639
+ createPortal(/* @__PURE__ */ jsx5(
640
+ "div",
641
+ {
642
+ ref: menuRef,
643
+ onClick: (e) => e.stopPropagation(),
644
+ className: clsx5(
645
+ "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
646
+ {
647
+ "animate-pop-in": isOpen,
648
+ "animate-pop-out": !isOpen,
649
+ "hidden": isHidden
650
+ },
651
+ menuClassName
652
+ ),
653
+ onAnimationEnd: () => {
654
+ if (!isOpen) {
655
+ setIsHidden(true);
656
+ }
657
+ },
658
+ style: {
659
+ ...menuPosition
660
+ },
661
+ children: BagFunctionUtil.resolve(children, bag)
662
+ }
663
+ ), document.body)
664
+ ] });
665
+ };
666
+
8
667
  // src/localization/LanguageProvider.tsx
9
- import { createContext, useContext, useEffect, useState as useState2 } from "react";
668
+ import { createContext, useContext, useEffect as useEffect7, useState as useState6 } from "react";
10
669
 
11
670
  // src/hooks/useLocalStorage.ts
12
- import { useCallback, useState } from "react";
671
+ import { useCallback as useCallback2, useState as useState5 } from "react";
13
672
 
14
673
  // src/localization/util.ts
15
674
  var languages = ["en", "de"];
@@ -25,7 +684,7 @@ var LanguageUtil = {
25
684
  };
26
685
 
27
686
  // src/localization/LanguageProvider.tsx
28
- import { jsx } from "react/jsx-runtime";
687
+ import { jsx as jsx6 } from "react/jsx-runtime";
29
688
  var LanguageContext = createContext({
30
689
  language: LanguageUtil.DEFAULT_LANGUAGE,
31
690
  setLanguage: (v) => v
@@ -128,6 +787,7 @@ var formTranslation = {
128
787
  next: "Next",
129
788
  no: "No",
130
789
  none: "None",
790
+ nothingFound: "Nothing found",
131
791
  of: "of",
132
792
  optional: "Optional",
133
793
  pleaseWait: "Please wait...",
@@ -184,6 +844,7 @@ var formTranslation = {
184
844
  next: "Weiter",
185
845
  no: "Nein",
186
846
  none: "Nichts",
847
+ nothingFound: "Nichts gefunden",
187
848
  of: "von",
188
849
  optional: "Optional",
189
850
  pleaseWait: "Bitte warten...",
@@ -198,434 +859,159 @@ var formTranslation = {
198
859
  selectOption: "Option ausw\xE4hlen",
199
860
  show: "Anzeigen",
200
861
  showMore: "Mehr anzeigen",
201
- showLess: "Weniger anzeigen",
202
- submit: "Abschicken",
203
- success: "Erfolg",
204
- update: "Update",
205
- unsavedChanges: "Ungespeicherte \xC4nderungen",
206
- unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
207
- yes: "Ja"
208
- }
209
- };
210
-
211
- // src/components/user-action/Input.tsx
212
- import { forwardRef, useEffect as useEffect4, useImperativeHandle, useRef, useState as useState4 } from "react";
213
- import clsx2 from "clsx";
214
-
215
- // src/hooks/useDelay.ts
216
- import { useEffect as useEffect2, useState as useState3 } from "react";
217
- var defaultOptions = {
218
- delay: 3e3,
219
- disabled: false
220
- };
221
- function useDelay(options) {
222
- const [timer, setTimer] = useState3(void 0);
223
- const { delay, disabled } = {
224
- ...defaultOptions,
225
- ...options
226
- };
227
- const clearTimer = () => {
228
- clearTimeout(timer);
229
- setTimer(void 0);
230
- };
231
- const restartTimer = (onDelayFinish) => {
232
- if (disabled) {
233
- return;
234
- }
235
- clearTimeout(timer);
236
- setTimer(setTimeout(() => {
237
- onDelayFinish();
238
- setTimer(void 0);
239
- }, delay));
240
- };
241
- useEffect2(() => {
242
- return () => {
243
- clearTimeout(timer);
244
- };
245
- }, [timer]);
246
- useEffect2(() => {
247
- if (disabled) {
248
- clearTimeout(timer);
249
- setTimer(void 0);
250
- }
251
- }, [disabled, timer]);
252
- return { restartTimer, clearTimer, hasActiveTimer: !!timer };
253
- }
254
-
255
- // src/util/noop.ts
256
- var noop = () => void 0;
257
-
258
- // src/components/user-action/Label.tsx
259
- import clsx from "clsx";
260
- import { jsx as jsx2 } from "react/jsx-runtime";
261
- var styleMapping = {
262
- labelSmall: "textstyle-label-sm",
263
- labelMedium: "textstyle-label-md",
264
- labelBig: "textstyle-label-lg"
265
- };
266
- var Label = ({
267
- children,
268
- name,
269
- labelType = "labelSmall",
270
- className,
271
- ...props
272
- }) => {
273
- return /* @__PURE__ */ jsx2("label", { ...props, className: clsx(styleMapping[labelType], className), children: children ? children : name });
274
- };
275
-
276
- // src/hooks/useFocusManagement.ts
277
- import { useCallback as useCallback2 } from "react";
278
- function useFocusManagement() {
279
- const getFocusableElements = useCallback2(() => {
280
- return Array.from(
281
- document.querySelectorAll(
282
- 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
283
- )
284
- ).filter(
285
- (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
286
- );
287
- }, []);
288
- const getNextFocusElement = useCallback2(() => {
289
- const elements = getFocusableElements();
290
- if (elements.length === 0) {
291
- return void 0;
292
- }
293
- let nextElement = elements[0];
294
- if (document.activeElement instanceof HTMLElement) {
295
- const currentIndex = elements.indexOf(document.activeElement);
296
- nextElement = elements[(currentIndex + 1) % elements.length];
297
- }
298
- return nextElement;
299
- }, [getFocusableElements]);
300
- const focusNext = useCallback2(() => {
301
- const nextElement = getNextFocusElement();
302
- nextElement?.focus();
303
- }, [getNextFocusElement]);
304
- const getPreviousFocusElement = useCallback2(() => {
305
- const elements = getFocusableElements();
306
- if (elements.length === 0) {
307
- return void 0;
308
- }
309
- let previousElement = elements[0];
310
- if (document.activeElement instanceof HTMLElement) {
311
- const currentIndex = elements.indexOf(document.activeElement);
312
- if (currentIndex === 0) {
313
- previousElement = elements[elements.length - 1];
314
- } else {
315
- previousElement = elements[currentIndex - 1];
316
- }
317
- }
318
- return previousElement;
319
- }, [getFocusableElements]);
320
- const focusPrevious = useCallback2(() => {
321
- const previousElement = getPreviousFocusElement();
322
- if (previousElement) previousElement.focus();
323
- }, [getPreviousFocusElement]);
324
- return {
325
- getFocusableElements,
326
- getNextFocusElement,
327
- getPreviousFocusElement,
328
- focusNext,
329
- focusPrevious
330
- };
331
- }
332
-
333
- // src/hooks/useFocusOnceVisible.ts
334
- import React, { useEffect as useEffect3 } from "react";
335
- var useFocusOnceVisible = (ref, disable = false) => {
336
- const [hasUsedFocus, setHasUsedFocus] = React.useState(false);
337
- useEffect3(() => {
338
- if (disable || hasUsedFocus) {
339
- return;
340
- }
341
- const observer = new IntersectionObserver(([entry]) => {
342
- if (entry.isIntersecting && !hasUsedFocus) {
343
- ref.current?.focus();
344
- setHasUsedFocus(hasUsedFocus);
345
- }
346
- }, {
347
- threshold: 0.1
348
- });
349
- if (ref.current) {
350
- observer.observe(ref.current);
351
- }
352
- return () => observer.disconnect();
353
- }, [disable, hasUsedFocus, ref]);
354
- };
355
-
356
- // src/components/user-action/Input.tsx
357
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
358
- var getInputClassName = ({ disabled = false, hasError = false }) => {
359
- return clsx2(
360
- "px-2 py-1.5 rounded-md border-2",
361
- {
362
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !hasError,
363
- "bg-on-negative text-negative border-negative-border hover:border-negative-border-hover": !disabled && hasError,
364
- "bg-disabled-background text-disabled-text border-disabled-border": disabled
365
- }
366
- );
367
- };
368
- var defaultEditCompleteOptions = {
369
- onBlur: true,
370
- afterDelay: true,
371
- delay: 2500
372
- };
373
- var Input = forwardRef(function Input2({
374
- id,
375
- type = "text",
376
- value,
377
- label,
378
- onChange = noop,
379
- onChangeText = noop,
380
- onEditCompleted,
381
- className = "",
382
- allowEnterComplete = true,
383
- expanded = true,
384
- autoFocus = false,
385
- onBlur,
386
- editCompleteOptions,
387
- containerClassName,
388
- disabled,
389
- ...restProps
390
- }, forwardedRef) {
391
- const { onBlur: allowEditCompleteOnBlur, afterDelay, delay } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
392
- const {
393
- restartTimer,
394
- clearTimer
395
- } = useDelay({ delay, disabled: !afterDelay });
396
- const innerRef = useRef(null);
397
- const { focusNext } = useFocusManagement();
398
- useFocusOnceVisible(innerRef, !autoFocus);
399
- useImperativeHandle(forwardedRef, () => innerRef.current);
400
- const handleKeyDown = (e) => {
401
- if (e.key === "Enter" && !e.shiftKey) {
402
- e.preventDefault();
403
- innerRef.current?.blur();
404
- focusNext();
405
- }
406
- };
407
- return /* @__PURE__ */ jsxs("div", { className: clsx2({ "w-full": expanded }, containerClassName), children: [
408
- label && /* @__PURE__ */ jsx3(Label, { ...label, htmlFor: id, className: clsx2("mb-1", label.className) }),
409
- /* @__PURE__ */ jsx3(
410
- "input",
411
- {
412
- ...restProps,
413
- ref: innerRef,
414
- value,
415
- id,
416
- type,
417
- disabled,
418
- className: clsx2(getInputClassName({ disabled }), className),
419
- onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
420
- onBlur: (event) => {
421
- onBlur?.(event);
422
- if (onEditCompleted && allowEditCompleteOnBlur) {
423
- onEditCompleted(event.target.value);
424
- clearTimer();
425
- }
426
- },
427
- onChange: (e) => {
428
- const value2 = e.target.value;
429
- if (onEditCompleted) {
430
- restartTimer(() => {
431
- if (innerRef.current) {
432
- innerRef.current.blur();
433
- if (!allowEditCompleteOnBlur) {
434
- onEditCompleted(value2);
435
- }
436
- } else {
437
- onEditCompleted(value2);
438
- }
439
- });
440
- }
441
- onChange(e);
442
- onChangeText(value2);
443
- }
444
- }
445
- )
446
- ] });
447
- });
448
- var FormInput = forwardRef(function FormInput2({
449
- id,
450
- labelText,
451
- errorText,
452
- className,
453
- labelClassName,
454
- errorClassName,
455
- containerClassName,
456
- required,
457
- disabled,
458
- ...restProps
459
- }, ref) {
460
- const input = /* @__PURE__ */ jsx3(
461
- "input",
462
- {
463
- ...restProps,
464
- ref,
465
- id,
466
- disabled,
467
- className: clsx2(
468
- getInputClassName({ disabled, hasError: !!errorText }),
469
- className
470
- )
471
- }
472
- );
473
- return /* @__PURE__ */ jsxs("div", { className: clsx2("flex flex-col gap-y-1", containerClassName), children: [
474
- labelText && /* @__PURE__ */ jsxs("label", { htmlFor: id, className: clsx2("textstyle-label-md", labelClassName), children: [
475
- labelText,
476
- required && /* @__PURE__ */ jsx3("span", { className: "text-primary font-bold", children: "*" })
477
- ] }),
478
- input,
479
- errorText && /* @__PURE__ */ jsx3("label", { htmlFor: id, className: clsx2("text-negative", errorClassName), children: errorText })
480
- ] });
481
- });
482
-
483
- // src/util/math.ts
484
- var clamp = (value, min = 0, max = 1) => {
485
- return Math.min(Math.max(value, min), max);
486
- };
487
-
488
- // src/components/layout-and-navigation/Pagination.tsx
489
- import { useEffect as useEffect5, useState as useState5 } from "react";
490
-
491
- // src/components/user-action/Button.tsx
492
- import { forwardRef as forwardRef2 } from "react";
493
- import clsx3 from "clsx";
494
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
495
- var ButtonColorUtil = {
496
- solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
497
- text: ["primary", "negative", "neutral"],
498
- outline: ["primary"]
499
- };
500
- var IconButtonUtil = {
501
- icon: [...ButtonColorUtil.solid, "transparent"]
502
- };
503
- var paddingMapping = {
504
- small: "btn-sm",
505
- medium: "btn-md",
506
- large: "btn-lg"
507
- };
508
- var iconPaddingMapping = {
509
- tiny: "icon-btn-xs",
510
- small: "icon-btn-sm",
511
- medium: "icon-btn-md",
512
- large: "icon-btn-lg"
862
+ showLess: "Weniger anzeigen",
863
+ submit: "Abschicken",
864
+ success: "Erfolg",
865
+ update: "Update",
866
+ unsavedChanges: "Ungespeicherte \xC4nderungen",
867
+ unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
868
+ yes: "Ja"
869
+ }
513
870
  };
514
- var ButtonUtil = {
515
- paddingMapping,
516
- iconPaddingMapping
871
+
872
+ // src/components/table/TableFilterButton.tsx
873
+ import { useEffect as useEffect8, useState as useState7 } from "react";
874
+ import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
875
+ var defaultTableFilterTranslation = {
876
+ en: {
877
+ filter: "Filter",
878
+ min: "Min",
879
+ max: "Max",
880
+ startDate: "Start",
881
+ endDate: "End",
882
+ text: "Text..."
883
+ },
884
+ de: {
885
+ filter: "Filter",
886
+ min: "Min",
887
+ max: "Max",
888
+ startDate: "Start",
889
+ endDate: "Ende",
890
+ text: "Text..."
891
+ }
517
892
  };
518
- var SolidButton = forwardRef2(function SolidButton2({
519
- children,
520
- disabled = false,
521
- color = "primary",
522
- size = "medium",
523
- startIcon,
524
- endIcon,
525
- onClick,
526
- className,
527
- ...restProps
528
- }, ref) {
529
- const colorClasses = {
530
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
531
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
532
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
533
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
534
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
535
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
536
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
537
- }[color];
538
- const iconColorClasses = {
539
- primary: "text-button-solid-primary-icon",
540
- secondary: "text-button-solid-secondary-icon",
541
- tertiary: "text-button-solid-tertiary-icon",
542
- positive: "text-button-solid-positive-icon",
543
- warning: "text-button-solid-warning-icon",
544
- negative: "text-button-solid-negative-icon",
545
- neutral: "text-button-solid-neutral-icon"
546
- }[color];
547
- return /* @__PURE__ */ jsxs2(
548
- "button",
893
+ var TableFilterButton = ({
894
+ filterType,
895
+ column
896
+ }) => {
897
+ const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
898
+ const columnFilterValue = column.getFilterValue();
899
+ const [filterValue, setFilterValue] = useState7(columnFilterValue);
900
+ const hasFilter = !!filterValue;
901
+ useEffect8(() => {
902
+ setFilterValue(columnFilterValue);
903
+ }, [columnFilterValue]);
904
+ return /* @__PURE__ */ jsx7(
905
+ Menu,
549
906
  {
550
- ref,
551
- onClick,
552
- disabled,
553
- className: clsx3(
554
- "font-semibold",
555
- {
556
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
557
- [clsx3(colorClasses, "hover:brightness-90")]: !disabled
558
- },
559
- ButtonUtil.paddingMapping[size],
560
- className
561
- ),
562
- ...restProps,
563
- children: [
564
- startIcon && /* @__PURE__ */ jsx4(
565
- "span",
907
+ trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs3("div", { ref, className: "relative", children: [
908
+ /* @__PURE__ */ jsx7(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ jsx7(FilterIcon, {}) }),
909
+ hasFilter && /* @__PURE__ */ jsx7(
910
+ "div",
566
911
  {
567
- className: clsx3({
568
- [iconColorClasses]: !disabled,
569
- [`text-disabled-icon`]: disabled
570
- }),
571
- children: startIcon
912
+ className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
913
+ "aria-hidden": true
572
914
  }
573
- ),
574
- children,
575
- endIcon && /* @__PURE__ */ jsx4(
576
- "span",
915
+ )
916
+ ] }),
917
+ children: ({ close }) => /* @__PURE__ */ jsxs3("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
918
+ /* @__PURE__ */ jsx7("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
919
+ filterType === "text" && /* @__PURE__ */ jsx7(
920
+ Input,
577
921
  {
578
- className: clsx3({
579
- [iconColorClasses]: !disabled,
580
- [`text-disabled-icon`]: disabled
581
- }),
582
- children: endIcon
922
+ value: filterValue ?? "",
923
+ autoFocus: true,
924
+ placeholder: translation("text"),
925
+ onChangeText: setFilterValue,
926
+ className: "h-10"
583
927
  }
584
- )
585
- ]
928
+ ),
929
+ filterType === "range" && /* @__PURE__ */ jsxs3("div", { className: "flex-row-2 items-center", children: [
930
+ /* @__PURE__ */ jsx7(
931
+ Input,
932
+ {
933
+ value: filterValue?.[0] ?? "",
934
+ type: "number",
935
+ placeholder: translation("min"),
936
+ onChangeText: (text) => {
937
+ const num = Number(text);
938
+ setFilterValue((old) => [num, old?.[1]]);
939
+ },
940
+ className: "h-10 input-indicator-hidden w-40"
941
+ }
942
+ ),
943
+ /* @__PURE__ */ jsx7("span", { className: "font-bold", children: "-" }),
944
+ /* @__PURE__ */ jsx7(
945
+ Input,
946
+ {
947
+ value: filterValue?.[1] ?? "",
948
+ type: "number",
949
+ placeholder: translation("max"),
950
+ onChangeText: (text) => {
951
+ const num = Number(text);
952
+ setFilterValue((old) => [old?.[0], num]);
953
+ },
954
+ className: "h-10 input-indicator-hidden w-40"
955
+ }
956
+ )
957
+ ] }),
958
+ filterType === "dateRange" && /* @__PURE__ */ jsxs3(Fragment2, { children: [
959
+ /* @__PURE__ */ jsx7(
960
+ Input,
961
+ {
962
+ value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
963
+ type: "datetime-local",
964
+ placeholder: translation("startDate"),
965
+ onChangeText: (text) => {
966
+ const value = new Date(text);
967
+ setFilterValue((old) => [value, old?.[1]]);
968
+ },
969
+ className: "h-10 w-50"
970
+ }
971
+ ),
972
+ /* @__PURE__ */ jsx7(
973
+ Input,
974
+ {
975
+ value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
976
+ type: "datetime-local",
977
+ placeholder: translation("endDate"),
978
+ onChangeText: (text) => {
979
+ const value = new Date(text);
980
+ setFilterValue((old) => [old?.[0], value]);
981
+ },
982
+ className: "h-10 w-50"
983
+ }
984
+ )
985
+ ] }),
986
+ /* @__PURE__ */ jsxs3("div", { className: "flex-row-2 justify-end w-full", children: [
987
+ hasFilter && /* @__PURE__ */ jsx7(SolidButton, { color: "negative", size: "small", onClick: () => {
988
+ column.setFilterValue(void 0);
989
+ close();
990
+ }, children: translation("remove") }),
991
+ /* @__PURE__ */ jsx7(SolidButton, { size: "small", onClick: () => {
992
+ column.setFilterValue(filterValue);
993
+ close();
994
+ }, children: translation("apply") })
995
+ ] })
996
+ ] })
586
997
  }
587
998
  );
588
- });
589
- var IconButton = ({
590
- children,
591
- disabled = false,
592
- color = "primary",
593
- size = "medium",
594
- className,
595
- ...restProps
999
+ };
1000
+
1001
+ // src/components/table/FillerRowElement.tsx
1002
+ import { clsx as clsx6 } from "clsx";
1003
+ import { jsx as jsx8 } from "react/jsx-runtime";
1004
+ var FillerRowElement = ({
1005
+ className
596
1006
  }) => {
597
- const colorClasses = {
598
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
599
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
600
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
601
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
602
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
603
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
604
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
605
- transparent: "bg-transparent"
606
- }[color];
607
- return /* @__PURE__ */ jsx4(
608
- "button",
609
- {
610
- disabled,
611
- className: clsx3(
612
- {
613
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
614
- "text-disabled-text cursor-not-allowed opacity-70": disabled && color === "transparent",
615
- "hover:bg-button-text-hover-background": !disabled && color === "transparent",
616
- [clsx3(colorClasses, "hover:brightness-90")]: !disabled
617
- },
618
- ButtonUtil.iconPaddingMapping[size],
619
- className
620
- ),
621
- ...restProps,
622
- children
623
- }
624
- );
1007
+ return /* @__PURE__ */ jsx8("div", { className: clsx6("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
625
1008
  };
626
1009
 
627
1010
  // src/components/layout-and-navigation/Pagination.tsx
628
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1011
+ import { ChevronFirst, ChevronLast, ChevronLeft, ChevronRight } from "lucide-react";
1012
+ import clsx7 from "clsx";
1013
+ import { useEffect as useEffect9, useState as useState8 } from "react";
1014
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
629
1015
  var Pagination = ({
630
1016
  overwriteTranslation,
631
1017
  pageIndex,
@@ -635,11 +1021,11 @@ var Pagination = ({
635
1021
  style
636
1022
  }) => {
637
1023
  const translation = useTranslation([formTranslation], overwriteTranslation);
638
- const [value, setValue] = useState5((pageIndex + 1).toString());
1024
+ const [value, setValue] = useState8((pageIndex + 1).toString());
639
1025
  const noPages = pageCount === 0;
640
1026
  const onFirstPage = pageIndex === 0 && !noPages;
641
1027
  const onLastPage = pageIndex === pageCount - 1;
642
- useEffect5(() => {
1028
+ useEffect9(() => {
643
1029
  if (noPages) {
644
1030
  setValue("0");
645
1031
  } else {
@@ -649,17 +1035,16 @@ var Pagination = ({
649
1035
  const changePage = (page) => {
650
1036
  onPageChanged(page);
651
1037
  };
652
- return /* @__PURE__ */ jsxs3("div", { className: clsx4("flex-row-1", className), style, children: [
653
- /* @__PURE__ */ jsx5(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx5(ChevronFirst, {}) }),
654
- /* @__PURE__ */ jsx5(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx5(ChevronLeft, {}) }),
655
- /* @__PURE__ */ jsxs3("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
656
- /* @__PURE__ */ jsx5(
1038
+ return /* @__PURE__ */ jsxs4("div", { className: clsx7("flex-row-1", className), style, children: [
1039
+ /* @__PURE__ */ jsx9(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx9(ChevronFirst, {}) }),
1040
+ /* @__PURE__ */ jsx9(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx9(ChevronLeft, {}) }),
1041
+ /* @__PURE__ */ jsxs4("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
1042
+ /* @__PURE__ */ jsx9(
657
1043
  Input,
658
1044
  {
659
1045
  value,
660
- containerClassName: "flex flex-1 h-10",
661
- className: clsx4(
662
- "w-full text-center font-bold input-indicator-hidden"
1046
+ className: clsx7(
1047
+ "w-full text-center font-bold input-indicator-hidden h-10"
663
1048
  ),
664
1049
  type: "number",
665
1050
  min: 1,
@@ -667,572 +1052,836 @@ var Pagination = ({
667
1052
  disabled: noPages,
668
1053
  onChangeText: (value2) => {
669
1054
  if (value2) {
670
- setValue(clamp(Number(value2), 1, pageCount).toString());
1055
+ setValue(clamp(Number(value2), [1, pageCount]).toString());
671
1056
  } else {
672
1057
  setValue(value2);
673
1058
  }
674
1059
  },
675
1060
  onEditCompleted: (value2) => {
676
- changePage(clamp(Number(value2) - 1, 0, pageCount - 1));
1061
+ changePage(clamp(Number(value2) - 1, [0, pageCount - 1]));
677
1062
  },
678
1063
  editCompleteOptions: { delay: 800 }
679
1064
  }
680
- ),
681
- /* @__PURE__ */ jsx5("span", { className: "select-none w-10", children: translation("of") }),
682
- /* @__PURE__ */ jsx5(
683
- "span",
684
- {
685
- className: "flex-row-2 flex-1 items-center justify-center select-none h-10 bg-input-background text-input-text rounded-md font-bold",
686
- children: pageCount
687
- }
688
- )
689
- ] }),
690
- /* @__PURE__ */ jsx5(IconButton, { color: "transparent", onClick: () => changePage(pageIndex + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx5(ChevronRight, {}) }),
691
- /* @__PURE__ */ jsx5(IconButton, { color: "transparent", onClick: () => changePage(pageCount - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx5(ChevronLast, {}) })
692
- ] });
693
- };
694
-
695
- // src/components/table/Table.tsx
696
- import clsx10 from "clsx";
697
- import {
698
- flexRender,
699
- getCoreRowModel,
700
- getFilteredRowModel,
701
- getPaginationRowModel,
702
- getSortedRowModel,
703
- useReactTable
704
- } from "@tanstack/react-table";
705
-
706
- // src/util/array.ts
707
- var defaultRangeOptions = {
708
- allowEmptyRange: false,
709
- stepSize: 1,
710
- exclusiveStart: false,
711
- exclusiveEnd: true
712
- };
713
- var range = (endOrRange, options) => {
714
- const { allowEmptyRange, stepSize, exclusiveStart, exclusiveEnd } = { ...defaultRangeOptions, ...options };
715
- let start = 0;
716
- let end;
717
- if (typeof endOrRange === "number") {
718
- end = endOrRange;
719
- } else {
720
- start = endOrRange[0];
721
- end = endOrRange[1];
722
- }
723
- if (!exclusiveEnd) {
724
- end -= 1;
725
- }
726
- if (exclusiveStart) {
727
- start += 1;
728
- }
729
- if (end - 1 < start) {
730
- if (!allowEmptyRange) {
731
- console.warn(`range: end (${end}) < start (${start}) should be allowed explicitly, set options.allowEmptyRange to true`);
732
- }
733
- return [];
734
- }
735
- return Array.from({ length: end - start }, (_, index) => index * stepSize + start);
736
- };
737
-
738
- // src/components/table/Table.tsx
739
- import { Scrollbars } from "react-custom-scrollbars-2";
740
-
741
- // src/components/user-action/Checkbox.tsx
742
- import { useState as useState6 } from "react";
743
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
744
- import { Check, Minus } from "lucide-react";
745
- import clsx5 from "clsx";
746
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
747
- var checkboxSizeMapping = {
748
- small: "size-5",
749
- medium: "size-6",
750
- large: "size-8"
751
- };
752
- var checkboxIconSizeMapping = {
753
- small: "size-4",
754
- medium: "size-5",
755
- large: "size-7"
756
- };
757
- var Checkbox = ({
758
- id,
759
- label,
760
- checked,
761
- disabled,
762
- onChange,
763
- onChangeTristate,
764
- size = "medium",
765
- className = "",
766
- containerClassName
767
- }) => {
768
- const usedSizeClass = checkboxSizeMapping[size];
769
- const innerIconSize = checkboxIconSizeMapping[size];
770
- const propagateChange = (checked2) => {
771
- if (onChangeTristate) {
772
- onChangeTristate(checked2);
773
- }
774
- if (onChange) {
775
- onChange(checked2 === "indeterminate" ? false : checked2);
776
- }
777
- };
778
- const changeValue = () => {
779
- const newValue = checked === "indeterminate" ? false : !checked;
780
- propagateChange(newValue);
781
- };
782
- return /* @__PURE__ */ jsxs4("div", { className: clsx5("group flex-row-2 items-center cursor-pointer", containerClassName), onClick: changeValue, children: [
783
- /* @__PURE__ */ jsx6(
784
- CheckboxPrimitive.Root,
785
- {
786
- onCheckedChange: propagateChange,
787
- checked,
788
- disabled,
789
- id,
790
- className: clsx5(usedSizeClass, `items-center border-2 rounded outline-none `, {
791
- "text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
792
- "focus:border-primary group-hover:border-primary ": !disabled,
793
- "bg-input-background": !disabled && !checked,
794
- "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
795
- }, className),
796
- children: /* @__PURE__ */ jsxs4(CheckboxPrimitive.Indicator, { children: [
797
- checked === true && /* @__PURE__ */ jsx6(Check, { className: innerIconSize }),
798
- checked === "indeterminate" && /* @__PURE__ */ jsx6(Minus, { className: innerIconSize })
799
- ] })
800
- }
801
- ),
802
- label && /* @__PURE__ */ jsx6(Label, { ...label, className: clsx5(label.className), htmlFor: id })
1065
+ ),
1066
+ /* @__PURE__ */ jsx9("span", { className: "select-none w-10", children: translation("of") }),
1067
+ /* @__PURE__ */ jsx9(
1068
+ "span",
1069
+ {
1070
+ className: "flex-row-2 flex-1 items-center justify-center select-none h-10 bg-input-background text-input-text rounded-md font-bold",
1071
+ children: pageCount
1072
+ }
1073
+ )
1074
+ ] }),
1075
+ /* @__PURE__ */ jsx9(IconButton, { color: "transparent", onClick: () => changePage(pageIndex + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx9(ChevronRight, {}) }),
1076
+ /* @__PURE__ */ jsx9(IconButton, { color: "transparent", onClick: () => changePage(pageCount - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx9(ChevronLast, {}) })
803
1077
  ] });
804
1078
  };
805
1079
 
806
- // src/components/table/TableFilterButton.tsx
807
- import { FilterIcon } from "lucide-react";
1080
+ // src/components/user-action/Checkbox.tsx
1081
+ import { useEffect as useEffect14, useState as useState13 } from "react";
1082
+ import { Check, Minus } from "lucide-react";
1083
+ import clsx8 from "clsx";
808
1084
 
809
- // src/components/user-action/Menu.tsx
810
- import { useEffect as useEffect8, useRef as useRef2, useState as useState8 } from "react";
811
- import clsx6 from "clsx";
1085
+ // node_modules/@radix-ui/react-checkbox/dist/index.mjs
1086
+ import * as React11 from "react";
812
1087
 
813
- // src/hooks/useOutsideClick.ts
814
- import { useEffect as useEffect6 } from "react";
815
- var useOutsideClick = (refs, handler) => {
816
- useEffect6(() => {
817
- const listener = (event) => {
818
- if (event.target === null) return;
819
- if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
820
- return;
1088
+ // node_modules/@radix-ui/react-compose-refs/dist/index.mjs
1089
+ import * as React2 from "react";
1090
+ function setRef(ref, value) {
1091
+ if (typeof ref === "function") {
1092
+ return ref(value);
1093
+ } else if (ref !== null && ref !== void 0) {
1094
+ ref.current = value;
1095
+ }
1096
+ }
1097
+ function composeRefs(...refs) {
1098
+ return (node) => {
1099
+ let hasCleanup = false;
1100
+ const cleanups = refs.map((ref) => {
1101
+ const cleanup = setRef(ref, node);
1102
+ if (!hasCleanup && typeof cleanup == "function") {
1103
+ hasCleanup = true;
821
1104
  }
822
- handler();
823
- };
824
- document.addEventListener("mousedown", listener);
825
- document.addEventListener("touchstart", listener);
826
- return () => {
827
- document.removeEventListener("mousedown", listener);
828
- document.removeEventListener("touchstart", listener);
829
- };
830
- }, [refs, handler]);
831
- };
832
-
833
- // src/hooks/useHoverState.ts
834
- import { useEffect as useEffect7, useState as useState7 } from "react";
835
- var defaultUseHoverStateProps = {
836
- closingDelay: 200,
837
- isDisabled: false
838
- };
839
- var useHoverState = (props = void 0) => {
840
- const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
841
- const [isHovered, setIsHovered] = useState7(false);
842
- const [timer, setTimer] = useState7();
843
- const onMouseEnter = () => {
844
- if (isDisabled) {
845
- return;
1105
+ return cleanup;
1106
+ });
1107
+ if (hasCleanup) {
1108
+ return () => {
1109
+ for (let i = 0; i < cleanups.length; i++) {
1110
+ const cleanup = cleanups[i];
1111
+ if (typeof cleanup == "function") {
1112
+ cleanup();
1113
+ } else {
1114
+ setRef(refs[i], null);
1115
+ }
1116
+ }
1117
+ };
846
1118
  }
847
- clearTimeout(timer);
848
- setIsHovered(true);
849
1119
  };
850
- const onMouseLeave = () => {
851
- if (isDisabled) {
852
- return;
1120
+ }
1121
+ function useComposedRefs(...refs) {
1122
+ return React2.useCallback(composeRefs(...refs), refs);
1123
+ }
1124
+
1125
+ // node_modules/@radix-ui/react-context/dist/index.mjs
1126
+ import * as React3 from "react";
1127
+ import { jsx as jsx10 } from "react/jsx-runtime";
1128
+ function createContextScope(scopeName, createContextScopeDeps = []) {
1129
+ let defaultContexts = [];
1130
+ function createContext3(rootComponentName, defaultContext) {
1131
+ const BaseContext = React3.createContext(defaultContext);
1132
+ const index = defaultContexts.length;
1133
+ defaultContexts = [...defaultContexts, defaultContext];
1134
+ const Provider = (props) => {
1135
+ const { scope, children, ...context } = props;
1136
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
1137
+ const value = React3.useMemo(() => context, Object.values(context));
1138
+ return /* @__PURE__ */ jsx10(Context.Provider, { value, children });
1139
+ };
1140
+ Provider.displayName = rootComponentName + "Provider";
1141
+ function useContext22(consumerName, scope) {
1142
+ const Context = scope?.[scopeName]?.[index] || BaseContext;
1143
+ const context = React3.useContext(Context);
1144
+ if (context) return context;
1145
+ if (defaultContext !== void 0) return defaultContext;
1146
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
853
1147
  }
854
- setTimer(setTimeout(() => {
855
- setIsHovered(false);
856
- }, closingDelay));
1148
+ return [Provider, useContext22];
1149
+ }
1150
+ const createScope = () => {
1151
+ const scopeContexts = defaultContexts.map((defaultContext) => {
1152
+ return React3.createContext(defaultContext);
1153
+ });
1154
+ return function useScope(scope) {
1155
+ const contexts = scope?.[scopeName] || scopeContexts;
1156
+ return React3.useMemo(
1157
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
1158
+ [scope, contexts]
1159
+ );
1160
+ };
857
1161
  };
858
- useEffect7(() => {
859
- if (timer) {
860
- return () => {
861
- clearTimeout(timer);
862
- };
863
- }
864
- });
865
- useEffect7(() => {
866
- if (timer) {
867
- clearTimeout(timer);
1162
+ createScope.scopeName = scopeName;
1163
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
1164
+ }
1165
+ function composeContextScopes(...scopes) {
1166
+ const baseScope = scopes[0];
1167
+ if (scopes.length === 1) return baseScope;
1168
+ const createScope = () => {
1169
+ const scopeHooks = scopes.map((createScope2) => ({
1170
+ useScope: createScope2(),
1171
+ scopeName: createScope2.scopeName
1172
+ }));
1173
+ return function useComposedScopes(overrideScopes) {
1174
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
1175
+ const scopeProps = useScope(overrideScopes);
1176
+ const currentScope = scopeProps[`__scope${scopeName}`];
1177
+ return { ...nextScopes2, ...currentScope };
1178
+ }, {});
1179
+ return React3.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
1180
+ };
1181
+ };
1182
+ createScope.scopeName = baseScope.scopeName;
1183
+ return createScope;
1184
+ }
1185
+
1186
+ // node_modules/@radix-ui/primitive/dist/index.mjs
1187
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
1188
+ return function handleEvent(event) {
1189
+ originalEventHandler?.(event);
1190
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
1191
+ return ourEventHandler?.(event);
868
1192
  }
869
- }, [isDisabled]);
870
- return {
871
- isHovered,
872
- setIsHovered,
873
- handlers: { onMouseEnter, onMouseLeave }
874
1193
  };
1194
+ }
1195
+
1196
+ // node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
1197
+ import * as React5 from "react";
1198
+
1199
+ // node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
1200
+ import * as React4 from "react";
1201
+ var useLayoutEffect2 = globalThis?.document ? React4.useLayoutEffect : () => {
875
1202
  };
876
1203
 
877
- // src/util/PropsWithFunctionChildren.ts
878
- var resolve = (children, bag) => {
879
- if (typeof children === "function") {
880
- return children(bag);
1204
+ // node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
1205
+ import * as React22 from "react";
1206
+ var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
1207
+ function useControllableState({
1208
+ prop,
1209
+ defaultProp,
1210
+ onChange = () => {
1211
+ },
1212
+ caller
1213
+ }) {
1214
+ const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
1215
+ defaultProp,
1216
+ onChange
1217
+ });
1218
+ const isControlled = prop !== void 0;
1219
+ const value = isControlled ? prop : uncontrolledProp;
1220
+ if (true) {
1221
+ const isControlledRef = React5.useRef(prop !== void 0);
1222
+ React5.useEffect(() => {
1223
+ const wasControlled = isControlledRef.current;
1224
+ if (wasControlled !== isControlled) {
1225
+ const from = wasControlled ? "controlled" : "uncontrolled";
1226
+ const to = isControlled ? "controlled" : "uncontrolled";
1227
+ console.warn(
1228
+ `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
1229
+ );
1230
+ }
1231
+ isControlledRef.current = isControlled;
1232
+ }, [isControlled, caller]);
881
1233
  }
882
- return children ?? void 0;
883
- };
884
- var BagFunctionUtil = {
885
- resolve
886
- };
1234
+ const setValue = React5.useCallback(
1235
+ (nextValue) => {
1236
+ if (isControlled) {
1237
+ const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
1238
+ if (value2 !== prop) {
1239
+ onChangeRef.current?.(value2);
1240
+ }
1241
+ } else {
1242
+ setUncontrolledProp(nextValue);
1243
+ }
1244
+ },
1245
+ [isControlled, prop, setUncontrolledProp, onChangeRef]
1246
+ );
1247
+ return [value, setValue];
1248
+ }
1249
+ function useUncontrolledState({
1250
+ defaultProp,
1251
+ onChange
1252
+ }) {
1253
+ const [value, setValue] = React5.useState(defaultProp);
1254
+ const prevValueRef = React5.useRef(value);
1255
+ const onChangeRef = React5.useRef(onChange);
1256
+ useInsertionEffect(() => {
1257
+ onChangeRef.current = onChange;
1258
+ }, [onChange]);
1259
+ React5.useEffect(() => {
1260
+ if (prevValueRef.current !== value) {
1261
+ onChangeRef.current?.(value);
1262
+ prevValueRef.current = value;
1263
+ }
1264
+ }, [value, prevValueRef]);
1265
+ return [value, setValue, onChangeRef];
1266
+ }
1267
+ function isFunction(value) {
1268
+ return typeof value === "function";
1269
+ }
1270
+ var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
887
1271
 
888
- // src/hooks/usePopoverPosition.ts
889
- var defaultPopoverPositionOptions = {
890
- edgePadding: 16,
891
- outerGap: 4,
892
- horizontalAlignment: "leftInside",
893
- verticalAlignment: "bottomOutside",
894
- disabled: false
1272
+ // node_modules/@radix-ui/react-use-previous/dist/index.mjs
1273
+ import * as React6 from "react";
1274
+ function usePrevious(value) {
1275
+ const ref = React6.useRef({ value, previous: value });
1276
+ return React6.useMemo(() => {
1277
+ if (ref.current.value !== value) {
1278
+ ref.current.previous = ref.current.value;
1279
+ ref.current.value = value;
1280
+ }
1281
+ return ref.current.previous;
1282
+ }, [value]);
1283
+ }
1284
+
1285
+ // node_modules/@radix-ui/react-use-size/dist/index.mjs
1286
+ import * as React7 from "react";
1287
+ function useSize(element) {
1288
+ const [size, setSize] = React7.useState(void 0);
1289
+ useLayoutEffect2(() => {
1290
+ if (element) {
1291
+ setSize({ width: element.offsetWidth, height: element.offsetHeight });
1292
+ const resizeObserver = new ResizeObserver((entries) => {
1293
+ if (!Array.isArray(entries)) {
1294
+ return;
1295
+ }
1296
+ if (!entries.length) {
1297
+ return;
1298
+ }
1299
+ const entry = entries[0];
1300
+ let width;
1301
+ let height;
1302
+ if ("borderBoxSize" in entry) {
1303
+ const borderSizeEntry = entry["borderBoxSize"];
1304
+ const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
1305
+ width = borderSize["inlineSize"];
1306
+ height = borderSize["blockSize"];
1307
+ } else {
1308
+ width = element.offsetWidth;
1309
+ height = element.offsetHeight;
1310
+ }
1311
+ setSize({ width, height });
1312
+ });
1313
+ resizeObserver.observe(element, { box: "border-box" });
1314
+ return () => resizeObserver.unobserve(element);
1315
+ } else {
1316
+ setSize(void 0);
1317
+ }
1318
+ }, [element]);
1319
+ return size;
1320
+ }
1321
+
1322
+ // node_modules/@radix-ui/react-presence/dist/index.mjs
1323
+ import * as React23 from "react";
1324
+ import * as React8 from "react";
1325
+ function useStateMachine(initialState, machine) {
1326
+ return React8.useReducer((state, event) => {
1327
+ const nextState = machine[state][event];
1328
+ return nextState ?? state;
1329
+ }, initialState);
1330
+ }
1331
+ var Presence = (props) => {
1332
+ const { present, children } = props;
1333
+ const presence = usePresence(present);
1334
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React23.Children.only(children);
1335
+ const ref = useComposedRefs(presence.ref, getElementRef(child));
1336
+ const forceMount = typeof children === "function";
1337
+ return forceMount || presence.isPresent ? React23.cloneElement(child, { ref }) : null;
895
1338
  };
896
- var usePopoverPosition = (trigger, options) => {
897
- const {
898
- edgePadding,
899
- outerGap,
900
- verticalAlignment,
901
- horizontalAlignment,
902
- disabled
903
- } = { ...defaultPopoverPositionOptions, ...options };
904
- if (disabled || !trigger) {
905
- return {};
906
- }
907
- const left = {
908
- leftOutside: trigger.left - outerGap,
909
- leftInside: trigger.left,
910
- rightOutside: trigger.right + outerGap,
911
- rightInside: trigger.right,
912
- center: trigger.left + trigger.width / 2
913
- }[horizontalAlignment];
914
- const top = {
915
- topOutside: trigger.top - outerGap,
916
- topInside: trigger.top,
917
- bottomOutside: trigger.bottom + outerGap,
918
- bottomInside: trigger.bottom,
919
- center: trigger.top + trigger.height / 2
920
- }[verticalAlignment];
921
- const translateX = {
922
- leftOutside: "-100%",
923
- leftInside: void 0,
924
- rightOutside: void 0,
925
- rightInside: "-100%",
926
- center: "-50%"
927
- }[horizontalAlignment];
928
- const translateY = {
929
- topOutside: "-100%",
930
- topInside: void 0,
931
- bottomOutside: void 0,
932
- bottomInside: "-100%",
933
- center: "-50%"
934
- }[verticalAlignment];
1339
+ Presence.displayName = "Presence";
1340
+ function usePresence(present) {
1341
+ const [node, setNode] = React23.useState();
1342
+ const stylesRef = React23.useRef(null);
1343
+ const prevPresentRef = React23.useRef(present);
1344
+ const prevAnimationNameRef = React23.useRef("none");
1345
+ const initialState = present ? "mounted" : "unmounted";
1346
+ const [state, send] = useStateMachine(initialState, {
1347
+ mounted: {
1348
+ UNMOUNT: "unmounted",
1349
+ ANIMATION_OUT: "unmountSuspended"
1350
+ },
1351
+ unmountSuspended: {
1352
+ MOUNT: "mounted",
1353
+ ANIMATION_END: "unmounted"
1354
+ },
1355
+ unmounted: {
1356
+ MOUNT: "mounted"
1357
+ }
1358
+ });
1359
+ React23.useEffect(() => {
1360
+ const currentAnimationName = getAnimationName(stylesRef.current);
1361
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
1362
+ }, [state]);
1363
+ useLayoutEffect2(() => {
1364
+ const styles = stylesRef.current;
1365
+ const wasPresent = prevPresentRef.current;
1366
+ const hasPresentChanged = wasPresent !== present;
1367
+ if (hasPresentChanged) {
1368
+ const prevAnimationName = prevAnimationNameRef.current;
1369
+ const currentAnimationName = getAnimationName(styles);
1370
+ if (present) {
1371
+ send("MOUNT");
1372
+ } else if (currentAnimationName === "none" || styles?.display === "none") {
1373
+ send("UNMOUNT");
1374
+ } else {
1375
+ const isAnimating = prevAnimationName !== currentAnimationName;
1376
+ if (wasPresent && isAnimating) {
1377
+ send("ANIMATION_OUT");
1378
+ } else {
1379
+ send("UNMOUNT");
1380
+ }
1381
+ }
1382
+ prevPresentRef.current = present;
1383
+ }
1384
+ }, [present, send]);
1385
+ useLayoutEffect2(() => {
1386
+ if (node) {
1387
+ let timeoutId;
1388
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
1389
+ const handleAnimationEnd = (event) => {
1390
+ const currentAnimationName = getAnimationName(stylesRef.current);
1391
+ const isCurrentAnimation = currentAnimationName.includes(event.animationName);
1392
+ if (event.target === node && isCurrentAnimation) {
1393
+ send("ANIMATION_END");
1394
+ if (!prevPresentRef.current) {
1395
+ const currentFillMode = node.style.animationFillMode;
1396
+ node.style.animationFillMode = "forwards";
1397
+ timeoutId = ownerWindow.setTimeout(() => {
1398
+ if (node.style.animationFillMode === "forwards") {
1399
+ node.style.animationFillMode = currentFillMode;
1400
+ }
1401
+ });
1402
+ }
1403
+ }
1404
+ };
1405
+ const handleAnimationStart = (event) => {
1406
+ if (event.target === node) {
1407
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
1408
+ }
1409
+ };
1410
+ node.addEventListener("animationstart", handleAnimationStart);
1411
+ node.addEventListener("animationcancel", handleAnimationEnd);
1412
+ node.addEventListener("animationend", handleAnimationEnd);
1413
+ return () => {
1414
+ ownerWindow.clearTimeout(timeoutId);
1415
+ node.removeEventListener("animationstart", handleAnimationStart);
1416
+ node.removeEventListener("animationcancel", handleAnimationEnd);
1417
+ node.removeEventListener("animationend", handleAnimationEnd);
1418
+ };
1419
+ } else {
1420
+ send("ANIMATION_END");
1421
+ }
1422
+ }, [node, send]);
935
1423
  return {
936
- left: Math.max(left, edgePadding),
937
- top: Math.max(top, edgePadding),
938
- translate: [translateX ?? "0", translateY ?? "0"].join(" ")
1424
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
1425
+ ref: React23.useCallback((node2) => {
1426
+ stylesRef.current = node2 ? getComputedStyle(node2) : null;
1427
+ setNode(node2);
1428
+ }, [])
939
1429
  };
940
- };
941
-
942
- // src/components/user-action/Menu.tsx
943
- import { createPortal } from "react-dom";
944
- import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
945
- function getScrollableParents(element) {
946
- const scrollables = [];
947
- let parent = element.parentElement;
948
- while (parent) {
949
- scrollables.push(parent);
950
- parent = parent.parentElement;
1430
+ }
1431
+ function getAnimationName(styles) {
1432
+ return styles?.animationName || "none";
1433
+ }
1434
+ function getElementRef(element) {
1435
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1436
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1437
+ if (mayWarn) {
1438
+ return element.ref;
951
1439
  }
952
- return scrollables;
1440
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1441
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1442
+ if (mayWarn) {
1443
+ return element.props.ref;
1444
+ }
1445
+ return element.props.ref || element.ref;
953
1446
  }
954
- var Menu = ({
955
- trigger,
956
- children,
957
- alignmentHorizontal = "leftInside",
958
- alignmentVertical = "bottomOutside",
959
- showOnHover = false,
960
- disabled = false,
961
- menuClassName = ""
962
- }) => {
963
- const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
964
- const triggerRef = useRef2(null);
965
- const menuRef = useRef2(null);
966
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
967
- const [isHidden, setIsHidden] = useState8(true);
968
- const bag = {
969
- isOpen,
970
- close: () => setIsOpen(false),
971
- toggleOpen: () => setIsOpen((prevState) => !prevState),
972
- disabled
973
- };
974
- const menuPosition = usePopoverPosition(
975
- triggerRef.current?.getBoundingClientRect(),
976
- { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
977
- );
978
- useEffect8(() => {
979
- if (!isOpen) return;
980
- const triggerEl = triggerRef.current;
981
- if (!triggerEl) return;
982
- const scrollableParents = getScrollableParents(triggerEl);
983
- const close = () => setIsOpen(false);
984
- scrollableParents.forEach((parent) => {
985
- parent.addEventListener("scroll", close);
986
- });
987
- window.addEventListener("resize", close);
988
- return () => {
989
- scrollableParents.forEach((parent) => {
990
- parent.removeEventListener("scroll", close);
1447
+
1448
+ // node_modules/@radix-ui/react-primitive/dist/index.mjs
1449
+ import * as React10 from "react";
1450
+ import * as ReactDOM from "react-dom";
1451
+
1452
+ // node_modules/@radix-ui/react-slot/dist/index.mjs
1453
+ import * as React9 from "react";
1454
+ import { Fragment as Fragment22, jsx as jsx11 } from "react/jsx-runtime";
1455
+ // @__NO_SIDE_EFFECTS__
1456
+ function createSlot(ownerName) {
1457
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
1458
+ const Slot2 = React9.forwardRef((props, forwardedRef) => {
1459
+ const { children, ...slotProps } = props;
1460
+ const childrenArray = React9.Children.toArray(children);
1461
+ const slottable = childrenArray.find(isSlottable);
1462
+ if (slottable) {
1463
+ const newElement = slottable.props.children;
1464
+ const newChildren = childrenArray.map((child) => {
1465
+ if (child === slottable) {
1466
+ if (React9.Children.count(newElement) > 1) return React9.Children.only(null);
1467
+ return React9.isValidElement(newElement) ? newElement.props.children : null;
1468
+ } else {
1469
+ return child;
1470
+ }
991
1471
  });
992
- window.removeEventListener("resize", close);
993
- };
994
- }, [isOpen, setIsOpen]);
995
- useEffect8(() => {
996
- if (isOpen) {
997
- setIsHidden(false);
1472
+ return /* @__PURE__ */ jsx11(SlotClone, { ...slotProps, ref: forwardedRef, children: React9.isValidElement(newElement) ? React9.cloneElement(newElement, void 0, newChildren) : null });
1473
+ }
1474
+ return /* @__PURE__ */ jsx11(SlotClone, { ...slotProps, ref: forwardedRef, children });
1475
+ });
1476
+ Slot2.displayName = `${ownerName}.Slot`;
1477
+ return Slot2;
1478
+ }
1479
+ // @__NO_SIDE_EFFECTS__
1480
+ function createSlotClone(ownerName) {
1481
+ const SlotClone = React9.forwardRef((props, forwardedRef) => {
1482
+ const { children, ...slotProps } = props;
1483
+ if (React9.isValidElement(children)) {
1484
+ const childrenRef = getElementRef2(children);
1485
+ const props2 = mergeProps(slotProps, children.props);
1486
+ if (children.type !== React9.Fragment) {
1487
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
1488
+ }
1489
+ return React9.cloneElement(children, props2);
1490
+ }
1491
+ return React9.Children.count(children) > 1 ? React9.Children.only(null) : null;
1492
+ });
1493
+ SlotClone.displayName = `${ownerName}.SlotClone`;
1494
+ return SlotClone;
1495
+ }
1496
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
1497
+ function isSlottable(child) {
1498
+ return React9.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
1499
+ }
1500
+ function mergeProps(slotProps, childProps) {
1501
+ const overrideProps = { ...childProps };
1502
+ for (const propName in childProps) {
1503
+ const slotPropValue = slotProps[propName];
1504
+ const childPropValue = childProps[propName];
1505
+ const isHandler = /^on[A-Z]/.test(propName);
1506
+ if (isHandler) {
1507
+ if (slotPropValue && childPropValue) {
1508
+ overrideProps[propName] = (...args) => {
1509
+ const result = childPropValue(...args);
1510
+ slotPropValue(...args);
1511
+ return result;
1512
+ };
1513
+ } else if (slotPropValue) {
1514
+ overrideProps[propName] = slotPropValue;
1515
+ }
1516
+ } else if (propName === "style") {
1517
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
1518
+ } else if (propName === "className") {
1519
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
998
1520
  }
999
- }, [isOpen]);
1000
- return /* @__PURE__ */ jsxs5(Fragment, { children: [
1001
- trigger(bag, triggerRef),
1002
- createPortal(/* @__PURE__ */ jsx7(
1003
- "div",
1521
+ }
1522
+ return { ...slotProps, ...overrideProps };
1523
+ }
1524
+ function getElementRef2(element) {
1525
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1526
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1527
+ if (mayWarn) {
1528
+ return element.ref;
1529
+ }
1530
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1531
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1532
+ if (mayWarn) {
1533
+ return element.props.ref;
1534
+ }
1535
+ return element.props.ref || element.ref;
1536
+ }
1537
+
1538
+ // node_modules/@radix-ui/react-primitive/dist/index.mjs
1539
+ import { jsx as jsx12 } from "react/jsx-runtime";
1540
+ var NODES = [
1541
+ "a",
1542
+ "button",
1543
+ "div",
1544
+ "form",
1545
+ "h2",
1546
+ "h3",
1547
+ "img",
1548
+ "input",
1549
+ "label",
1550
+ "li",
1551
+ "nav",
1552
+ "ol",
1553
+ "p",
1554
+ "select",
1555
+ "span",
1556
+ "svg",
1557
+ "ul"
1558
+ ];
1559
+ var Primitive = NODES.reduce((primitive, node) => {
1560
+ const Slot = createSlot(`Primitive.${node}`);
1561
+ const Node = React10.forwardRef((props, forwardedRef) => {
1562
+ const { asChild, ...primitiveProps } = props;
1563
+ const Comp = asChild ? Slot : node;
1564
+ if (typeof window !== "undefined") {
1565
+ window[Symbol.for("radix-ui")] = true;
1566
+ }
1567
+ return /* @__PURE__ */ jsx12(Comp, { ...primitiveProps, ref: forwardedRef });
1568
+ });
1569
+ Node.displayName = `Primitive.${node}`;
1570
+ return { ...primitive, [node]: Node };
1571
+ }, {});
1572
+
1573
+ // node_modules/@radix-ui/react-checkbox/dist/index.mjs
1574
+ import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
1575
+ var CHECKBOX_NAME = "Checkbox";
1576
+ var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);
1577
+ var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
1578
+ function CheckboxProvider(props) {
1579
+ const {
1580
+ __scopeCheckbox,
1581
+ checked: checkedProp,
1582
+ children,
1583
+ defaultChecked,
1584
+ disabled,
1585
+ form,
1586
+ name,
1587
+ onCheckedChange,
1588
+ required,
1589
+ value = "on",
1590
+ // @ts-expect-error
1591
+ internal_do_not_use_render
1592
+ } = props;
1593
+ const [checked, setChecked] = useControllableState({
1594
+ prop: checkedProp,
1595
+ defaultProp: defaultChecked ?? false,
1596
+ onChange: onCheckedChange,
1597
+ caller: CHECKBOX_NAME
1598
+ });
1599
+ const [control, setControl] = React11.useState(null);
1600
+ const [bubbleInput, setBubbleInput] = React11.useState(null);
1601
+ const hasConsumerStoppedPropagationRef = React11.useRef(false);
1602
+ const isFormControl = control ? !!form || !!control.closest("form") : (
1603
+ // We set this to true by default so that events bubble to forms without JS (SSR)
1604
+ true
1605
+ );
1606
+ const context = {
1607
+ checked,
1608
+ disabled,
1609
+ setChecked,
1610
+ control,
1611
+ setControl,
1612
+ name,
1613
+ form,
1614
+ value,
1615
+ hasConsumerStoppedPropagationRef,
1616
+ required,
1617
+ defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,
1618
+ isFormControl,
1619
+ bubbleInput,
1620
+ setBubbleInput
1621
+ };
1622
+ return /* @__PURE__ */ jsx13(
1623
+ CheckboxProviderImpl,
1624
+ {
1625
+ scope: __scopeCheckbox,
1626
+ ...context,
1627
+ children: isFunction2(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
1628
+ }
1629
+ );
1630
+ }
1631
+ var TRIGGER_NAME = "CheckboxTrigger";
1632
+ var CheckboxTrigger = React11.forwardRef(
1633
+ ({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
1634
+ const {
1635
+ control,
1636
+ value,
1637
+ disabled,
1638
+ checked,
1639
+ required,
1640
+ setControl,
1641
+ setChecked,
1642
+ hasConsumerStoppedPropagationRef,
1643
+ isFormControl,
1644
+ bubbleInput
1645
+ } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
1646
+ const composedRefs = useComposedRefs(forwardedRef, setControl);
1647
+ const initialCheckedStateRef = React11.useRef(checked);
1648
+ React11.useEffect(() => {
1649
+ const form = control?.form;
1650
+ if (form) {
1651
+ const reset = () => setChecked(initialCheckedStateRef.current);
1652
+ form.addEventListener("reset", reset);
1653
+ return () => form.removeEventListener("reset", reset);
1654
+ }
1655
+ }, [control, setChecked]);
1656
+ return /* @__PURE__ */ jsx13(
1657
+ Primitive.button,
1004
1658
  {
1005
- ref: menuRef,
1006
- onClick: (e) => e.stopPropagation(),
1007
- className: clsx6(
1008
- "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
1009
- {
1010
- "animate-pop-in": isOpen,
1011
- "animate-pop-out": !isOpen,
1012
- "hidden": isHidden
1013
- },
1014
- menuClassName
1015
- ),
1016
- onAnimationEnd: () => {
1017
- if (!isOpen) {
1018
- setIsHidden(true);
1659
+ type: "button",
1660
+ role: "checkbox",
1661
+ "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
1662
+ "aria-required": required,
1663
+ "data-state": getState(checked),
1664
+ "data-disabled": disabled ? "" : void 0,
1665
+ disabled,
1666
+ value,
1667
+ ...checkboxProps,
1668
+ ref: composedRefs,
1669
+ onKeyDown: composeEventHandlers(onKeyDown, (event) => {
1670
+ if (event.key === "Enter") event.preventDefault();
1671
+ }),
1672
+ onClick: composeEventHandlers(onClick, (event) => {
1673
+ setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);
1674
+ if (bubbleInput && isFormControl) {
1675
+ hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
1676
+ if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
1019
1677
  }
1020
- },
1021
- style: {
1022
- ...menuPosition
1023
- },
1024
- children: BagFunctionUtil.resolve(children, bag)
1678
+ })
1025
1679
  }
1026
- ), document.body)
1027
- ] });
1028
- };
1029
-
1030
- // src/components/table/TableFilterButton.tsx
1031
- import { useEffect as useEffect9, useState as useState9 } from "react";
1032
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1033
- var defaultTableFilterTranslation = {
1034
- en: {
1035
- filter: "Filter",
1036
- min: "Min",
1037
- max: "Max",
1038
- startDate: "Start",
1039
- endDate: "End",
1040
- text: "Text..."
1041
- },
1042
- de: {
1043
- filter: "Filter",
1044
- min: "Min",
1045
- max: "Max",
1046
- startDate: "Start",
1047
- endDate: "Ende",
1048
- text: "Text..."
1680
+ );
1049
1681
  }
1050
- };
1051
- var TableFilterButton = ({
1052
- filterType,
1053
- column
1054
- }) => {
1055
- const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
1056
- const columnFilterValue = column.getFilterValue();
1057
- const [filterValue, setFilterValue] = useState9(columnFilterValue);
1058
- const hasFilter = !!filterValue;
1059
- useEffect9(() => {
1060
- setFilterValue(columnFilterValue);
1061
- }, [columnFilterValue]);
1062
- return /* @__PURE__ */ jsx8(
1063
- Menu,
1064
- {
1065
- trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs6("div", { ref, className: "relative", children: [
1066
- /* @__PURE__ */ jsx8(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ jsx8(FilterIcon, {}) }),
1067
- hasFilter && /* @__PURE__ */ jsx8(
1068
- "div",
1069
- {
1070
- className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
1071
- "aria-hidden": true
1072
- }
1073
- )
1074
- ] }),
1075
- children: ({ close }) => /* @__PURE__ */ jsxs6("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
1076
- /* @__PURE__ */ jsx8("h4", { className: "textstyle-title-sm", children: translation("filter") }),
1077
- filterType === "text" && /* @__PURE__ */ jsx8(
1078
- Input,
1079
- {
1080
- value: filterValue ?? "",
1081
- autoFocus: true,
1082
- placeholder: translation("text"),
1083
- onChangeText: setFilterValue,
1084
- className: "h-10"
1085
- }
1086
- ),
1087
- filterType === "range" && /* @__PURE__ */ jsxs6("div", { className: "flex-row-2 items-center", children: [
1088
- /* @__PURE__ */ jsx8(
1089
- Input,
1090
- {
1091
- value: filterValue?.[0] ?? "",
1092
- type: "number",
1093
- placeholder: translation("min"),
1094
- onChangeText: (text) => {
1095
- const num = Number(text);
1096
- setFilterValue((old) => [num, old?.[1]]);
1097
- },
1098
- className: "h-10 input-indicator-hidden w-40"
1099
- }
1100
- ),
1101
- /* @__PURE__ */ jsx8("span", { className: "font-bold", children: "-" }),
1102
- /* @__PURE__ */ jsx8(
1103
- Input,
1104
- {
1105
- value: filterValue?.[1] ?? "",
1106
- type: "number",
1107
- placeholder: translation("max"),
1108
- onChangeText: (text) => {
1109
- const num = Number(text);
1110
- setFilterValue((old) => [old?.[0], num]);
1111
- },
1112
- className: "h-10 input-indicator-hidden w-40"
1113
- }
1114
- )
1115
- ] }),
1116
- filterType === "dateRange" && /* @__PURE__ */ jsxs6(Fragment2, { children: [
1117
- /* @__PURE__ */ jsx8(
1118
- Input,
1682
+ );
1683
+ CheckboxTrigger.displayName = TRIGGER_NAME;
1684
+ var Checkbox = React11.forwardRef(
1685
+ (props, forwardedRef) => {
1686
+ const {
1687
+ __scopeCheckbox,
1688
+ name,
1689
+ checked,
1690
+ defaultChecked,
1691
+ required,
1692
+ disabled,
1693
+ value,
1694
+ onCheckedChange,
1695
+ form,
1696
+ ...checkboxProps
1697
+ } = props;
1698
+ return /* @__PURE__ */ jsx13(
1699
+ CheckboxProvider,
1700
+ {
1701
+ __scopeCheckbox,
1702
+ checked,
1703
+ defaultChecked,
1704
+ disabled,
1705
+ required,
1706
+ onCheckedChange,
1707
+ name,
1708
+ form,
1709
+ value,
1710
+ internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs5(Fragment4, { children: [
1711
+ /* @__PURE__ */ jsx13(
1712
+ CheckboxTrigger,
1119
1713
  {
1120
- value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
1121
- type: "datetime-local",
1122
- placeholder: translation("startDate"),
1123
- onChangeText: (text) => {
1124
- const value = new Date(text);
1125
- setFilterValue((old) => [value, old?.[1]]);
1126
- },
1127
- className: "h-10 w-50"
1714
+ ...checkboxProps,
1715
+ ref: forwardedRef,
1716
+ __scopeCheckbox
1128
1717
  }
1129
1718
  ),
1130
- /* @__PURE__ */ jsx8(
1131
- Input,
1719
+ isFormControl && /* @__PURE__ */ jsx13(
1720
+ CheckboxBubbleInput,
1132
1721
  {
1133
- value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
1134
- type: "datetime-local",
1135
- placeholder: translation("endDate"),
1136
- onChangeText: (text) => {
1137
- const value = new Date(text);
1138
- setFilterValue((old) => [old?.[0], value]);
1139
- },
1140
- className: "h-10 w-50"
1722
+ __scopeCheckbox
1141
1723
  }
1142
1724
  )
1143
- ] }),
1144
- /* @__PURE__ */ jsxs6("div", { className: "flex-row-2 justify-end w-full", children: [
1145
- hasFilter && /* @__PURE__ */ jsx8(SolidButton, { color: "negative", size: "small", onClick: () => {
1146
- column.setFilterValue(void 0);
1147
- close();
1148
- }, children: translation("remove") }),
1149
- /* @__PURE__ */ jsx8(SolidButton, { size: "small", onClick: () => {
1150
- column.setFilterValue(filterValue);
1151
- close();
1152
- }, children: translation("apply") })
1153
1725
  ] })
1154
- ] })
1155
- }
1156
- );
1157
- };
1158
-
1159
- // src/components/table/TableSortButton.tsx
1160
- import { ChevronDown, ChevronsUpDown, ChevronUp } from "lucide-react";
1161
- import clsx7 from "clsx";
1162
- import { jsx as jsx9 } from "react/jsx-runtime";
1163
- var TableSortButton = ({
1164
- sortDirection,
1165
- invert = false,
1166
- color = "neutral",
1167
- className,
1168
- ...buttonProps
1169
- }) => {
1170
- let icon = /* @__PURE__ */ jsx9(ChevronsUpDown, { className: "w-full h-full" });
1171
- if (sortDirection) {
1172
- let usedSortDirection = sortDirection;
1173
- if (invert) {
1174
- usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
1175
- }
1176
- icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx9(ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ jsx9(ChevronDown, { className: "w-full h-full" });
1726
+ }
1727
+ );
1177
1728
  }
1178
- return /* @__PURE__ */ jsx9(
1179
- IconButton,
1180
- {
1181
- size: "tiny",
1182
- color,
1183
- className: clsx7(className),
1184
- ...buttonProps,
1185
- children: icon
1186
- }
1187
- );
1188
- };
1189
-
1190
- // src/components/table/FillerRowElement.tsx
1191
- import { clsx as clsx8 } from "clsx";
1192
- import { jsx as jsx10 } from "react/jsx-runtime";
1193
- var FillerRowElement = ({
1194
- className
1195
- }) => {
1196
- return /* @__PURE__ */ jsx10("div", { className: clsx8("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
1197
- };
1729
+ );
1730
+ Checkbox.displayName = CHECKBOX_NAME;
1731
+ var INDICATOR_NAME = "CheckboxIndicator";
1732
+ var CheckboxIndicator = React11.forwardRef(
1733
+ (props, forwardedRef) => {
1734
+ const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
1735
+ const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
1736
+ return /* @__PURE__ */ jsx13(
1737
+ Presence,
1738
+ {
1739
+ present: forceMount || isIndeterminate(context.checked) || context.checked === true,
1740
+ children: /* @__PURE__ */ jsx13(
1741
+ Primitive.span,
1742
+ {
1743
+ "data-state": getState(context.checked),
1744
+ "data-disabled": context.disabled ? "" : void 0,
1745
+ ...indicatorProps,
1746
+ ref: forwardedRef,
1747
+ style: { pointerEvents: "none", ...props.style }
1748
+ }
1749
+ )
1750
+ }
1751
+ );
1752
+ }
1753
+ );
1754
+ CheckboxIndicator.displayName = INDICATOR_NAME;
1755
+ var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
1756
+ var CheckboxBubbleInput = React11.forwardRef(
1757
+ ({ __scopeCheckbox, ...props }, forwardedRef) => {
1758
+ const {
1759
+ control,
1760
+ hasConsumerStoppedPropagationRef,
1761
+ checked,
1762
+ defaultChecked,
1763
+ required,
1764
+ disabled,
1765
+ name,
1766
+ value,
1767
+ form,
1768
+ bubbleInput,
1769
+ setBubbleInput
1770
+ } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);
1771
+ const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
1772
+ const prevChecked = usePrevious(checked);
1773
+ const controlSize = useSize(control);
1774
+ React11.useEffect(() => {
1775
+ const input = bubbleInput;
1776
+ if (!input) return;
1777
+ const inputProto = window.HTMLInputElement.prototype;
1778
+ const descriptor = Object.getOwnPropertyDescriptor(
1779
+ inputProto,
1780
+ "checked"
1781
+ );
1782
+ const setChecked = descriptor.set;
1783
+ const bubbles = !hasConsumerStoppedPropagationRef.current;
1784
+ if (prevChecked !== checked && setChecked) {
1785
+ const event = new Event("click", { bubbles });
1786
+ input.indeterminate = isIndeterminate(checked);
1787
+ setChecked.call(input, isIndeterminate(checked) ? false : checked);
1788
+ input.dispatchEvent(event);
1789
+ }
1790
+ }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
1791
+ const defaultCheckedRef = React11.useRef(isIndeterminate(checked) ? false : checked);
1792
+ return /* @__PURE__ */ jsx13(
1793
+ Primitive.input,
1794
+ {
1795
+ type: "checkbox",
1796
+ "aria-hidden": true,
1797
+ defaultChecked: defaultChecked ?? defaultCheckedRef.current,
1798
+ required,
1799
+ disabled,
1800
+ name,
1801
+ value,
1802
+ form,
1803
+ ...props,
1804
+ tabIndex: -1,
1805
+ ref: composedRefs,
1806
+ style: {
1807
+ ...props.style,
1808
+ ...controlSize,
1809
+ position: "absolute",
1810
+ pointerEvents: "none",
1811
+ opacity: 0,
1812
+ margin: 0,
1813
+ // We transform because the input is absolutely positioned but we have
1814
+ // rendered it **after** the button. This pulls it back to sit on top
1815
+ // of the button.
1816
+ transform: "translateX(-100%)"
1817
+ }
1818
+ }
1819
+ );
1820
+ }
1821
+ );
1822
+ CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;
1823
+ function isFunction2(value) {
1824
+ return typeof value === "function";
1825
+ }
1826
+ function isIndeterminate(checked) {
1827
+ return checked === "indeterminate";
1828
+ }
1829
+ function getState(checked) {
1830
+ return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
1831
+ }
1198
1832
 
1199
- // src/components/table/Filter.ts
1200
- var dateRange = (row, columnId, filterValue) => {
1201
- const [min, max] = filterValue;
1202
- const value = row.getValue(columnId);
1203
- const date = value instanceof Date ? value : new Date(value);
1204
- if (isNaN(date.getTime())) return false;
1205
- if (min && date < min) return false;
1206
- if (max && date > max) return false;
1207
- return true;
1208
- };
1209
- var TableFilters = {
1210
- dateRange
1833
+ // src/components/user-action/Checkbox.tsx
1834
+ import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
1835
+ var checkboxSizeMapping = {
1836
+ sm: "size-5 border-1",
1837
+ md: "size-6 border-1",
1838
+ lg: "size-8 border-2"
1211
1839
  };
1212
-
1213
- // src/hooks/useResizeCallbackWrapper.ts
1214
- import { useEffect as useEffect10 } from "react";
1215
- var useResizeCallbackWrapper = (callback) => {
1216
- useEffect10(() => {
1217
- window.addEventListener("resize", callback);
1218
- return () => {
1219
- window.removeEventListener("resize", callback);
1220
- };
1221
- }, [callback]);
1840
+ var checkboxIconSizeMapping = {
1841
+ sm: "size-4 stroke-3",
1842
+ md: "size-5 stroke-3",
1843
+ lg: "size-7 stroke-3"
1222
1844
  };
1223
-
1224
- // src/components/table/TableCell.tsx
1225
- import { clsx as clsx9 } from "clsx";
1226
- import { jsx as jsx11 } from "react/jsx-runtime";
1227
- var TableCell = ({
1228
- children,
1229
- className
1845
+ var Checkbox2 = ({
1846
+ disabled,
1847
+ checked = false,
1848
+ indeterminate = false,
1849
+ onChange,
1850
+ size = "md",
1851
+ className = "",
1852
+ ...props
1230
1853
  }) => {
1231
- return /* @__PURE__ */ jsx11("span", { className: clsx9("block max-w-full overflow-ellipsis truncate", className), children });
1854
+ const usedSizeClass = checkboxSizeMapping[size];
1855
+ const innerIconSize = checkboxIconSizeMapping[size];
1856
+ return /* @__PURE__ */ jsx14(
1857
+ Checkbox,
1858
+ {
1859
+ ...props,
1860
+ disabled,
1861
+ checked: indeterminate ? "indeterminate" : checked,
1862
+ onCheckedChange: onChange,
1863
+ className: clsx8(
1864
+ usedSizeClass,
1865
+ `flex-col-0 items-center justify-center rounded outline-none`,
1866
+ {
1867
+ "text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
1868
+ "hover:border-primary": !disabled,
1869
+ "bg-input-background": !disabled && !checked,
1870
+ "bg-primary/30 border-primary text-primary": !disabled && (checked || indeterminate)
1871
+ },
1872
+ className
1873
+ ),
1874
+ children: /* @__PURE__ */ jsxs6(CheckboxIndicator, { children: [
1875
+ !checked && !indeterminate && /* @__PURE__ */ jsx14("div", { className: clsx8("bg-input-background", innerIconSize) }),
1876
+ checked && !indeterminate && /* @__PURE__ */ jsx14(Check, { className: innerIconSize }),
1877
+ indeterminate && /* @__PURE__ */ jsx14(Minus, { className: innerIconSize })
1878
+ ] })
1879
+ }
1880
+ );
1232
1881
  };
1233
1882
 
1234
1883
  // src/components/table/Table.tsx
1235
- import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1884
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
1236
1885
  var Table = ({
1237
1886
  data,
1238
1887
  fillerRow,
@@ -1245,22 +1894,22 @@ var Table = ({
1245
1894
  columns,
1246
1895
  ...tableOptions
1247
1896
  }) => {
1248
- const ref = useRef3(null);
1249
- const tableRef = useRef3(null);
1250
- const [columnSizing, setColumnSizing] = useState10(columns.reduce((previousValue, currentValue) => {
1897
+ const ref = useRef8(null);
1898
+ const tableRef = useRef8(null);
1899
+ const [columnSizing, setColumnSizing] = useState14(columns.reduce((previousValue, currentValue) => {
1251
1900
  return {
1252
1901
  ...previousValue,
1253
1902
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
1254
1903
  };
1255
1904
  }, {}));
1256
- const [columnSizingInfo, setColumnSizingInfo] = useState10();
1257
- const [pagination, setPagination] = useState10({
1905
+ const [columnSizingInfo, setColumnSizingInfo] = useState14();
1906
+ const [pagination, setPagination] = useState14({
1258
1907
  pageSize: 10,
1259
1908
  pageIndex: 0,
1260
1909
  ...initialState?.pagination
1261
1910
  });
1262
- const [columnFilters, setColumnFilters] = useState10(initialState?.columnFilters);
1263
- const computedColumnMinWidths = useMemo(() => {
1911
+ const [columnFilters, setColumnFilters] = useState14(initialState?.columnFilters);
1912
+ const computedColumnMinWidths = useMemo4(() => {
1264
1913
  return columns.reduce((previousValue, column) => {
1265
1914
  return {
1266
1915
  ...previousValue,
@@ -1269,7 +1918,7 @@ var Table = ({
1269
1918
  };
1270
1919
  }, {});
1271
1920
  }, [columns, defaultColumn]);
1272
- const computedColumnMaxWidths = useMemo(() => {
1921
+ const computedColumnMaxWidths = useMemo4(() => {
1273
1922
  return columns.reduce((previousValue, column) => {
1274
1923
  return {
1275
1924
  ...previousValue,
@@ -1277,12 +1926,12 @@ var Table = ({
1277
1926
  };
1278
1927
  }, {});
1279
1928
  }, [columns, defaultColumn]);
1280
- const tableMinWidth = useMemo(() => {
1929
+ const tableMinWidth = useMemo4(() => {
1281
1930
  return columns.reduce((sum, column) => {
1282
1931
  return sum + computedColumnMinWidths[column.id];
1283
1932
  }, 0);
1284
1933
  }, [columns, computedColumnMinWidths]);
1285
- const updateColumnSizes = useMemo(() => {
1934
+ const updateColumnSizes = useMemo4(() => {
1286
1935
  return (previous) => {
1287
1936
  const updateSizing = {
1288
1937
  ...columnSizing,
@@ -1290,7 +1939,7 @@ var Table = ({
1290
1939
  };
1291
1940
  const containerWidth = ref.current.offsetWidth;
1292
1941
  columns.forEach((column) => {
1293
- updateSizing[column.id] = clamp(updateSizing[column.id], computedColumnMinWidths[column.id], computedColumnMaxWidths[column.id] ?? containerWidth);
1942
+ updateSizing[column.id] = clamp(updateSizing[column.id], [computedColumnMinWidths[column.id], computedColumnMaxWidths[column.id] ?? containerWidth]);
1294
1943
  });
1295
1944
  const width = columns.reduce((previousValue, currentValue) => previousValue + updateSizing[currentValue.id], 0);
1296
1945
  if (width > containerWidth) {
@@ -1351,7 +2000,7 @@ var Table = ({
1351
2000
  minSize: 60,
1352
2001
  maxSize: 700,
1353
2002
  cell: ({ cell }) => {
1354
- return /* @__PURE__ */ jsx12(TableCell, { children: cell.getValue() });
2003
+ return /* @__PURE__ */ jsx15(TableCell, { children: cell.getValue() });
1355
2004
  },
1356
2005
  ...defaultColumn
1357
2006
  },
@@ -1399,18 +2048,18 @@ var Table = ({
1399
2048
  columnResizeMode: "onChange",
1400
2049
  ...tableOptions
1401
2050
  });
1402
- const [hasInitializedSizing, setHasInitializedSizing] = useState10(false);
1403
- useEffect11(() => {
2051
+ const [hasInitializedSizing, setHasInitializedSizing] = useState14(false);
2052
+ useEffect15(() => {
1404
2053
  if (!hasInitializedSizing && ref.current) {
1405
2054
  setHasInitializedSizing(true);
1406
2055
  table.setColumnSizing(updateColumnSizes(columnSizing));
1407
2056
  }
1408
2057
  }, [columnSizing, hasInitializedSizing]);
1409
- useResizeCallbackWrapper(useCallback3(() => {
2058
+ useResizeCallbackWrapper(useCallback6(() => {
1410
2059
  table.setColumnSizing(updateColumnSizes);
1411
2060
  }, [updateColumnSizes]));
1412
2061
  const pageCount = table.getPageCount();
1413
- useEffect11(() => {
2062
+ useEffect15(() => {
1414
2063
  const totalPages = pageCount;
1415
2064
  if (totalPages === 0) {
1416
2065
  if (pagination.pageIndex !== 0) {
@@ -1426,7 +2075,7 @@ var Table = ({
1426
2075
  }));
1427
2076
  }
1428
2077
  }, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
1429
- const columnSizeVars = useMemo(() => {
2078
+ const columnSizeVars = useMemo4(() => {
1430
2079
  const headers = table.getFlatHeaders();
1431
2080
  const colSizes = {};
1432
2081
  for (let i = 0; i < headers.length; i++) {
@@ -1436,8 +2085,8 @@ var Table = ({
1436
2085
  }
1437
2086
  return colSizes;
1438
2087
  }, [table.getState().columnSizingInfo, table.getState().columnSizing]);
1439
- return /* @__PURE__ */ jsxs7("div", { ref, className: clsx10("flex-col-4", className), children: [
1440
- /* @__PURE__ */ jsx12(
2088
+ return /* @__PURE__ */ jsxs7("div", { ref, className: clsx9("flex-col-4", className), children: [
2089
+ /* @__PURE__ */ jsx15(
1441
2090
  Scrollbars,
1442
2091
  {
1443
2092
  autoHeight: true,
@@ -1447,13 +2096,13 @@ var Table = ({
1447
2096
  "table",
1448
2097
  {
1449
2098
  ref: tableRef,
1450
- className: clsx10(tableClassName),
2099
+ className: clsx9(tableClassName),
1451
2100
  style: {
1452
2101
  ...columnSizeVars,
1453
2102
  width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
1454
2103
  },
1455
2104
  children: [
1456
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx12("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx12(
2105
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx15("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx15(
1457
2106
  "col",
1458
2107
  {
1459
2108
  style: {
@@ -1464,22 +2113,22 @@ var Table = ({
1464
2113
  },
1465
2114
  header.id
1466
2115
  )) }, headerGroup.id)),
1467
- /* @__PURE__ */ jsx12("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx12("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
2116
+ /* @__PURE__ */ jsx15("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx15("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
1468
2117
  return /* @__PURE__ */ jsxs7(
1469
2118
  "th",
1470
2119
  {
1471
2120
  colSpan: header.colSpan,
1472
- className: clsx10("relative group", header.column.columnDef.meta?.className),
2121
+ className: clsx9("relative group", header.column.columnDef.meta?.className),
1473
2122
  children: [
1474
- /* @__PURE__ */ jsx12("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs7("div", { className: "flex-row-1 items-center", children: [
1475
- header.column.getCanSort() && /* @__PURE__ */ jsx12(
2123
+ /* @__PURE__ */ jsx15("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs7("div", { className: "flex-row-1 items-center", children: [
2124
+ header.column.getCanSort() && /* @__PURE__ */ jsx15(
1476
2125
  TableSortButton,
1477
2126
  {
1478
2127
  sortDirection: header.column.getIsSorted(),
1479
2128
  onClick: () => header.column.toggleSorting()
1480
2129
  }
1481
2130
  ),
1482
- header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx12(
2131
+ header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx15(
1483
2132
  TableFilterButton,
1484
2133
  {
1485
2134
  column: header.column,
@@ -1491,7 +2140,7 @@ var Table = ({
1491
2140
  header.getContext()
1492
2141
  )
1493
2142
  ] }) }),
1494
- header.column.getCanResize() && /* @__PURE__ */ jsx12(
2143
+ header.column.getCanResize() && /* @__PURE__ */ jsx15(
1495
2144
  "div",
1496
2145
  {
1497
2146
  onMouseDown: header.getResizeHandler(),
@@ -1512,16 +2161,16 @@ var Table = ({
1512
2161
  }) }, headerGroup.id)) }),
1513
2162
  /* @__PURE__ */ jsxs7("tbody", { children: [
1514
2163
  table.getRowModel().rows.map((row) => {
1515
- return /* @__PURE__ */ jsx12("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
1516
- return /* @__PURE__ */ jsx12("td", { children: flexRender(
2164
+ return /* @__PURE__ */ jsx15("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
2165
+ return /* @__PURE__ */ jsx15("td", { children: flexRender(
1517
2166
  cell.column.columnDef.cell,
1518
2167
  cell.getContext()
1519
2168
  ) }, cell.id);
1520
2169
  }) }, row.id);
1521
2170
  }),
1522
2171
  range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
1523
- return /* @__PURE__ */ jsx12("tr", { children: columns.map((column) => {
1524
- return /* @__PURE__ */ jsx12("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx12(FillerRowElement, {}) }, column.id);
2172
+ return /* @__PURE__ */ jsx15("tr", { children: columns.map((column) => {
2173
+ return /* @__PURE__ */ jsx15("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx15(FillerRowElement, {}) }, column.id);
1525
2174
  }) }, "filler-row-" + index);
1526
2175
  })
1527
2176
  ] })
@@ -1530,7 +2179,7 @@ var Table = ({
1530
2179
  )
1531
2180
  }
1532
2181
  ),
1533
- /* @__PURE__ */ jsx12("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx12(
2182
+ /* @__PURE__ */ jsx15("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx15(
1534
2183
  Pagination,
1535
2184
  {
1536
2185
  pageIndex: table.getState().pagination.pageIndex,
@@ -1541,11 +2190,11 @@ var Table = ({
1541
2190
  ] });
1542
2191
  };
1543
2192
  var TableUncontrolled = ({ data, ...props }) => {
1544
- const [usedDate, setUsedData] = useState10(data);
1545
- useEffect11(() => {
2193
+ const [usedDate, setUsedData] = useState14(data);
2194
+ useEffect15(() => {
1546
2195
  setUsedData(data);
1547
2196
  }, [data]);
1548
- return /* @__PURE__ */ jsx12(
2197
+ return /* @__PURE__ */ jsx15(
1549
2198
  Table,
1550
2199
  {
1551
2200
  ...props,
@@ -1564,31 +2213,30 @@ var TableWithSelection = ({
1564
2213
  meta,
1565
2214
  ...props
1566
2215
  }) => {
1567
- const columnsWithSelection = useMemo(() => {
2216
+ const columnsWithSelection = useMemo4(() => {
1568
2217
  return [
1569
2218
  {
1570
2219
  id: selectionRowId,
1571
2220
  header: ({ table }) => {
1572
- return /* @__PURE__ */ jsx12(
1573
- Checkbox,
2221
+ return /* @__PURE__ */ jsx15(
2222
+ Checkbox2,
1574
2223
  {
1575
- checked: table.getIsSomeRowsSelected() ? "indeterminate" : table.getIsAllRowsSelected(),
1576
- onChangeTristate: (value) => {
2224
+ checked: table.getIsAllRowsSelected(),
2225
+ indeterminate: table.getIsSomeRowsSelected(),
2226
+ onChange: (value) => {
1577
2227
  const newValue = !!value;
1578
2228
  table.toggleAllRowsSelected(newValue);
1579
- },
1580
- containerClassName: "max-w-6"
2229
+ }
1581
2230
  }
1582
2231
  );
1583
2232
  },
1584
2233
  cell: ({ row }) => {
1585
- return /* @__PURE__ */ jsx12(
1586
- Checkbox,
2234
+ return /* @__PURE__ */ jsx15(
2235
+ Checkbox2,
1587
2236
  {
1588
2237
  disabled: !row.getCanSelect(),
1589
2238
  checked: row.getIsSelected(),
1590
- onChange: row.getToggleSelectedHandler(),
1591
- containerClassName: "max-w-6"
2239
+ onChange: row.getToggleSelectedHandler()
1592
2240
  }
1593
2241
  );
1594
2242
  },
@@ -1601,15 +2249,15 @@ var TableWithSelection = ({
1601
2249
  ...columns
1602
2250
  ];
1603
2251
  }, [columns, selectionRowId]);
1604
- return /* @__PURE__ */ jsx12(
2252
+ return /* @__PURE__ */ jsx15(
1605
2253
  Table,
1606
2254
  {
1607
2255
  columns: columnsWithSelection,
1608
2256
  fillerRow: (columnId, table) => {
1609
2257
  if (columnId === selectionRowId) {
1610
- return /* @__PURE__ */ jsx12(Checkbox, { checked: false, disabled: true, containerClassName: "max-w-6" });
2258
+ return /* @__PURE__ */ jsx15(Checkbox2, { checked: false, disabled: true, className: "max-w-6" });
1611
2259
  }
1612
- return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx12(FillerRowElement, {});
2260
+ return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx15(FillerRowElement, {});
1613
2261
  },
1614
2262
  state: {
1615
2263
  rowSelection,
@@ -1623,7 +2271,7 @@ var TableWithSelection = ({
1623
2271
  },
1624
2272
  meta: {
1625
2273
  ...meta,
1626
- bodyRowClassName: clsx10(
2274
+ bodyRowClassName: clsx9(
1627
2275
  { "cursor-pointer": !disableClickRowClickSelection },
1628
2276
  meta?.bodyRowClassName
1629
2277
  )