@helpwave/hightide 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (602) hide show
  1. package/README.md +1 -1
  2. package/dist/components/branding/HelpwaveBadge.d.mts +4 -5
  3. package/dist/components/branding/HelpwaveBadge.d.ts +4 -5
  4. package/dist/components/branding/HelpwaveBadge.js +46 -87
  5. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  6. package/dist/components/branding/HelpwaveBadge.mjs +46 -89
  7. package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
  8. package/dist/components/date/DatePicker.d.mts +1 -1
  9. package/dist/components/date/DatePicker.d.ts +1 -1
  10. package/dist/components/date/DatePicker.js +64 -13
  11. package/dist/components/date/DatePicker.js.map +1 -1
  12. package/dist/components/date/DatePicker.mjs +65 -14
  13. package/dist/components/date/DatePicker.mjs.map +1 -1
  14. package/dist/components/date/DayPicker.d.mts +1 -1
  15. package/dist/components/date/DayPicker.d.ts +1 -1
  16. package/dist/components/date/DayPicker.js +3 -3
  17. package/dist/components/date/DayPicker.js.map +1 -1
  18. package/dist/components/date/DayPicker.mjs +3 -3
  19. package/dist/components/date/DayPicker.mjs.map +1 -1
  20. package/dist/components/date/TimeDisplay.js.map +1 -1
  21. package/dist/components/date/TimeDisplay.mjs.map +1 -1
  22. package/dist/components/date/TimePicker.js +2 -2
  23. package/dist/components/date/TimePicker.js.map +1 -1
  24. package/dist/components/date/TimePicker.mjs +2 -2
  25. package/dist/components/date/TimePicker.mjs.map +1 -1
  26. package/dist/components/date/YearMonthPicker.js +58 -7
  27. package/dist/components/date/YearMonthPicker.js.map +1 -1
  28. package/dist/components/date/YearMonthPicker.mjs +59 -8
  29. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  30. package/dist/components/{dialogs → dialog}/ConfirmDialog.d.mts +9 -8
  31. package/dist/components/{dialogs → dialog}/ConfirmDialog.d.ts +9 -8
  32. package/dist/components/dialog/ConfirmDialog.js +938 -0
  33. package/dist/components/dialog/ConfirmDialog.js.map +1 -0
  34. package/dist/components/dialog/ConfirmDialog.mjs +902 -0
  35. package/dist/components/dialog/ConfirmDialog.mjs.map +1 -0
  36. package/dist/components/dialog/Dialog.d.mts +27 -0
  37. package/dist/components/dialog/Dialog.d.ts +27 -0
  38. package/dist/components/dialog/Dialog.js +879 -0
  39. package/dist/components/dialog/Dialog.js.map +1 -0
  40. package/dist/components/dialog/Dialog.mjs +845 -0
  41. package/dist/components/dialog/Dialog.mjs.map +1 -0
  42. package/dist/components/dialog/DiscardChangesDialog.d.mts +24 -0
  43. package/dist/components/dialog/DiscardChangesDialog.d.ts +24 -0
  44. package/dist/components/dialog/DiscardChangesDialog.js +966 -0
  45. package/dist/components/dialog/DiscardChangesDialog.js.map +1 -0
  46. package/dist/components/dialog/DiscardChangesDialog.mjs +930 -0
  47. package/dist/components/dialog/DiscardChangesDialog.mjs.map +1 -0
  48. package/dist/components/dialog/InputDialog.d.mts +22 -0
  49. package/dist/components/dialog/InputDialog.d.ts +22 -0
  50. package/dist/components/dialog/InputDialog.js +1139 -0
  51. package/dist/components/dialog/InputDialog.js.map +1 -0
  52. package/dist/components/dialog/InputDialog.mjs +1103 -0
  53. package/dist/components/dialog/InputDialog.mjs.map +1 -0
  54. package/dist/components/dialog/LanguageDialog.d.mts +25 -0
  55. package/dist/components/dialog/LanguageDialog.d.ts +25 -0
  56. package/dist/components/dialog/LanguageDialog.js +1684 -0
  57. package/dist/components/dialog/LanguageDialog.js.map +1 -0
  58. package/dist/components/dialog/LanguageDialog.mjs +1658 -0
  59. package/dist/components/dialog/LanguageDialog.mjs.map +1 -0
  60. package/dist/components/dialog/ThemeDialog.d.mts +26 -0
  61. package/dist/components/dialog/ThemeDialog.d.ts +26 -0
  62. package/dist/components/dialog/ThemeDialog.js +1715 -0
  63. package/dist/components/dialog/ThemeDialog.js.map +1 -0
  64. package/dist/components/dialog/ThemeDialog.mjs +1689 -0
  65. package/dist/components/dialog/ThemeDialog.mjs.map +1 -0
  66. package/dist/components/dialog/index.d.mts +17 -0
  67. package/dist/components/dialog/index.d.ts +17 -0
  68. package/dist/components/dialog/index.js +2062 -0
  69. package/dist/components/dialog/index.js.map +1 -0
  70. package/dist/components/dialog/index.mjs +2031 -0
  71. package/dist/components/dialog/index.mjs.map +1 -0
  72. package/dist/components/form/FormElementWrapper.d.mts +29 -0
  73. package/dist/components/form/FormElementWrapper.d.ts +29 -0
  74. package/dist/components/form/FormElementWrapper.js +98 -0
  75. package/dist/components/form/FormElementWrapper.js.map +1 -0
  76. package/dist/components/form/FormElementWrapper.mjs +64 -0
  77. package/dist/components/form/FormElementWrapper.mjs.map +1 -0
  78. package/dist/components/icons-and-geometry/Avatar.js +498 -2886
  79. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  80. package/dist/components/icons-and-geometry/Avatar.mjs +490 -2878
  81. package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
  82. package/dist/components/icons-and-geometry/{Helpwave.d.mts → HelpwaveLogo.d.mts} +3 -3
  83. package/dist/components/icons-and-geometry/{Helpwave.d.ts → HelpwaveLogo.d.ts} +3 -3
  84. package/dist/components/icons-and-geometry/{Helpwave.js → HelpwaveLogo.js} +21 -22
  85. package/dist/components/icons-and-geometry/HelpwaveLogo.js.map +1 -0
  86. package/dist/components/icons-and-geometry/{Helpwave.mjs → HelpwaveLogo.mjs} +17 -18
  87. package/dist/components/icons-and-geometry/HelpwaveLogo.mjs.map +1 -0
  88. package/dist/components/icons-and-geometry/Ring.js +1 -1
  89. package/dist/components/icons-and-geometry/Ring.js.map +1 -1
  90. package/dist/components/icons-and-geometry/Ring.mjs +1 -1
  91. package/dist/components/icons-and-geometry/Ring.mjs.map +1 -1
  92. package/dist/components/icons-and-geometry/Tag.js +8 -20
  93. package/dist/components/icons-and-geometry/Tag.js.map +1 -1
  94. package/dist/components/icons-and-geometry/Tag.mjs +8 -20
  95. package/dist/components/icons-and-geometry/Tag.mjs.map +1 -1
  96. package/dist/components/layout-and-navigation/BreadCrumb.js +667 -22
  97. package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
  98. package/dist/components/layout-and-navigation/BreadCrumb.mjs +667 -22
  99. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
  100. package/dist/components/layout-and-navigation/Carousel.js +12 -10
  101. package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
  102. package/dist/components/layout-and-navigation/Carousel.mjs +12 -10
  103. package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
  104. package/dist/components/layout-and-navigation/Chip.d.mts +8 -5
  105. package/dist/components/layout-and-navigation/Chip.d.ts +8 -5
  106. package/dist/components/layout-and-navigation/Chip.js +17 -4
  107. package/dist/components/layout-and-navigation/Chip.js.map +1 -1
  108. package/dist/components/layout-and-navigation/Chip.mjs +17 -4
  109. package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
  110. package/dist/components/layout-and-navigation/Expandable.d.mts +13 -10
  111. package/dist/components/layout-and-navigation/Expandable.d.ts +13 -10
  112. package/dist/components/layout-and-navigation/Expandable.js +18 -5
  113. package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
  114. package/dist/components/layout-and-navigation/Expandable.mjs +19 -6
  115. package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
  116. package/dist/components/layout-and-navigation/FAQSection.js +21 -8
  117. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
  118. package/dist/components/layout-and-navigation/FAQSection.mjs +22 -9
  119. package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
  120. package/dist/components/layout-and-navigation/FloatingContainer.d.mts +38 -0
  121. package/dist/components/layout-and-navigation/FloatingContainer.d.ts +38 -0
  122. package/dist/components/layout-and-navigation/FloatingContainer.js +219 -0
  123. package/dist/components/layout-and-navigation/FloatingContainer.js.map +1 -0
  124. package/dist/components/layout-and-navigation/FloatingContainer.mjs +195 -0
  125. package/dist/components/layout-and-navigation/FloatingContainer.mjs.map +1 -0
  126. package/dist/components/layout-and-navigation/ListBox.d.mts +44 -0
  127. package/dist/components/layout-and-navigation/ListBox.d.ts +44 -0
  128. package/dist/components/layout-and-navigation/ListBox.js +329 -0
  129. package/dist/components/layout-and-navigation/ListBox.js.map +1 -0
  130. package/dist/components/layout-and-navigation/ListBox.mjs +290 -0
  131. package/dist/components/layout-and-navigation/ListBox.mjs.map +1 -0
  132. package/dist/components/layout-and-navigation/Pagination.js +104 -189
  133. package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
  134. package/dist/components/layout-and-navigation/Pagination.mjs +99 -184
  135. package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
  136. package/dist/components/layout-and-navigation/ScrollArea.d.mts +15 -0
  137. package/dist/components/layout-and-navigation/ScrollArea.d.ts +15 -0
  138. package/dist/components/layout-and-navigation/ScrollArea.js +1252 -0
  139. package/dist/components/layout-and-navigation/ScrollArea.js.map +1 -0
  140. package/dist/components/layout-and-navigation/ScrollArea.mjs +1216 -0
  141. package/dist/components/layout-and-navigation/ScrollArea.mjs.map +1 -0
  142. package/dist/components/layout-and-navigation/StepperBar.js +41 -1
  143. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  144. package/dist/components/layout-and-navigation/StepperBar.mjs +41 -1
  145. package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
  146. package/dist/components/layout-and-navigation/TextImage.js +3 -1
  147. package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
  148. package/dist/components/layout-and-navigation/TextImage.mjs +3 -1
  149. package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
  150. package/dist/components/loading-states/ErrorComponent.js.map +1 -1
  151. package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
  152. package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +1 -1
  153. package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +1 -1
  154. package/dist/components/loading-states/LoadingAnimation.js +18 -17
  155. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  156. package/dist/components/loading-states/LoadingAnimation.mjs +18 -17
  157. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  158. package/dist/components/loading-states/LoadingButton.js +55 -18
  159. package/dist/components/loading-states/LoadingButton.js.map +1 -1
  160. package/dist/components/loading-states/LoadingButton.mjs +55 -18
  161. package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
  162. package/dist/components/properties/CheckboxProperty.js +890 -135
  163. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  164. package/dist/components/properties/CheckboxProperty.mjs +897 -142
  165. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  166. package/dist/components/properties/DateProperty.js +153 -198
  167. package/dist/components/properties/DateProperty.js.map +1 -1
  168. package/dist/components/properties/DateProperty.mjs +146 -191
  169. package/dist/components/properties/DateProperty.mjs.map +1 -1
  170. package/dist/components/properties/MultiSelectProperty.d.mts +5 -10
  171. package/dist/components/properties/MultiSelectProperty.d.ts +5 -10
  172. package/dist/components/properties/MultiSelectProperty.js +1143 -1160
  173. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  174. package/dist/components/properties/MultiSelectProperty.mjs +1156 -1163
  175. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  176. package/dist/components/properties/NumberProperty.js +155 -201
  177. package/dist/components/properties/NumberProperty.js.map +1 -1
  178. package/dist/components/properties/NumberProperty.mjs +148 -194
  179. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  180. package/dist/components/properties/PropertyBase.js +49 -9
  181. package/dist/components/properties/PropertyBase.js.map +1 -1
  182. package/dist/components/properties/PropertyBase.mjs +49 -9
  183. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  184. package/dist/components/properties/SelectProperty.d.mts +5 -8
  185. package/dist/components/properties/SelectProperty.d.ts +5 -8
  186. package/dist/components/properties/SelectProperty.js +1047 -834
  187. package/dist/components/properties/SelectProperty.js.map +1 -1
  188. package/dist/components/properties/SelectProperty.mjs +1063 -840
  189. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  190. package/dist/components/properties/TextProperty.js +97 -100
  191. package/dist/components/properties/TextProperty.js.map +1 -1
  192. package/dist/components/properties/TextProperty.mjs +100 -103
  193. package/dist/components/properties/TextProperty.mjs.map +1 -1
  194. package/dist/components/table/Table.js +1618 -993
  195. package/dist/components/table/Table.js.map +1 -1
  196. package/dist/components/table/Table.mjs +1625 -1000
  197. package/dist/components/table/Table.mjs.map +1 -1
  198. package/dist/components/table/TableFilterButton.js +116 -201
  199. package/dist/components/table/TableFilterButton.js.map +1 -1
  200. package/dist/components/table/TableFilterButton.mjs +105 -190
  201. package/dist/components/table/TableFilterButton.mjs.map +1 -1
  202. package/dist/components/table/TableSortButton.js +4 -3
  203. package/dist/components/table/TableSortButton.js.map +1 -1
  204. package/dist/components/table/TableSortButton.mjs +4 -3
  205. package/dist/components/table/TableSortButton.mjs.map +1 -1
  206. package/dist/components/user-action/Button.d.mts +15 -11
  207. package/dist/components/user-action/Button.d.ts +15 -11
  208. package/dist/components/user-action/Button.js +10 -9
  209. package/dist/components/user-action/Button.js.map +1 -1
  210. package/dist/components/user-action/Button.mjs +10 -9
  211. package/dist/components/user-action/Button.mjs.map +1 -1
  212. package/dist/components/user-action/Checkbox.d.mts +9 -25
  213. package/dist/components/user-action/Checkbox.d.ts +9 -25
  214. package/dist/components/user-action/Checkbox.js +793 -103
  215. package/dist/components/user-action/Checkbox.js.map +1 -1
  216. package/dist/components/user-action/Checkbox.mjs +794 -104
  217. package/dist/components/user-action/Checkbox.mjs.map +1 -1
  218. package/dist/components/user-action/CopyToClipboardWrapper.js +3 -1
  219. package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
  220. package/dist/components/user-action/CopyToClipboardWrapper.mjs +3 -1
  221. package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
  222. package/dist/components/user-action/DateAndTimePicker.d.mts +1 -1
  223. package/dist/components/user-action/DateAndTimePicker.d.ts +1 -1
  224. package/dist/components/user-action/DateAndTimePicker.js +66 -13
  225. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  226. package/dist/components/user-action/DateAndTimePicker.mjs +67 -14
  227. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  228. package/dist/components/user-action/Label.d.mts +6 -8
  229. package/dist/components/user-action/Label.d.ts +6 -8
  230. package/dist/components/user-action/Label.js +4 -6
  231. package/dist/components/user-action/Label.js.map +1 -1
  232. package/dist/components/user-action/Label.mjs +4 -6
  233. package/dist/components/user-action/Label.mjs.map +1 -1
  234. package/dist/components/user-action/Menu.d.mts +2 -2
  235. package/dist/components/user-action/Menu.d.ts +2 -2
  236. package/dist/components/user-action/Menu.js +1 -1
  237. package/dist/components/user-action/Menu.js.map +1 -1
  238. package/dist/components/user-action/Menu.mjs +1 -1
  239. package/dist/components/user-action/Menu.mjs.map +1 -1
  240. package/dist/components/user-action/ScrollPicker.js +8 -6
  241. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  242. package/dist/components/user-action/ScrollPicker.mjs +8 -6
  243. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  244. package/dist/components/user-action/SearchBar.d.mts +1 -2
  245. package/dist/components/user-action/SearchBar.d.ts +1 -2
  246. package/dist/components/user-action/SearchBar.js +93 -178
  247. package/dist/components/user-action/SearchBar.js.map +1 -1
  248. package/dist/components/user-action/SearchBar.mjs +86 -171
  249. package/dist/components/user-action/SearchBar.mjs.map +1 -1
  250. package/dist/components/user-action/Textarea.d.mts +22 -11
  251. package/dist/components/user-action/Textarea.d.ts +22 -11
  252. package/dist/components/user-action/Textarea.js +101 -92
  253. package/dist/components/user-action/Textarea.js.map +1 -1
  254. package/dist/components/user-action/Textarea.mjs +100 -92
  255. package/dist/components/user-action/Textarea.mjs.map +1 -1
  256. package/dist/components/user-action/input/Input.d.mts +37 -0
  257. package/dist/components/user-action/input/Input.d.ts +37 -0
  258. package/dist/components/user-action/input/Input.js +244 -0
  259. package/dist/components/user-action/input/Input.js.map +1 -0
  260. package/dist/components/user-action/input/Input.mjs +209 -0
  261. package/dist/components/user-action/input/Input.mjs.map +1 -0
  262. package/dist/components/user-action/input/InsideLabelInput.d.mts +20 -0
  263. package/dist/components/user-action/input/InsideLabelInput.d.ts +20 -0
  264. package/dist/components/user-action/input/InsideLabelInput.js +295 -0
  265. package/dist/components/user-action/input/InsideLabelInput.js.map +1 -0
  266. package/dist/components/user-action/input/InsideLabelInput.mjs +260 -0
  267. package/dist/components/user-action/input/InsideLabelInput.mjs.map +1 -0
  268. package/dist/components/user-action/input/ToggleableInput.d.mts +22 -0
  269. package/dist/components/user-action/input/ToggleableInput.d.ts +22 -0
  270. package/dist/components/user-action/{Input.js → input/ToggleableInput.js} +136 -171
  271. package/dist/components/user-action/input/ToggleableInput.js.map +1 -0
  272. package/dist/components/user-action/input/ToggleableInput.mjs +264 -0
  273. package/dist/components/user-action/input/ToggleableInput.mjs.map +1 -0
  274. package/dist/components/user-action/select/Select.d.mts +98 -0
  275. package/dist/components/user-action/select/Select.d.ts +98 -0
  276. package/dist/components/user-action/select/Select.js +1354 -0
  277. package/dist/components/user-action/select/Select.js.map +1 -0
  278. package/dist/components/user-action/select/Select.mjs +1320 -0
  279. package/dist/components/user-action/select/Select.mjs.map +1 -0
  280. package/dist/components/utils/FocusTrap.d.mts +28 -0
  281. package/dist/components/utils/FocusTrap.d.ts +28 -0
  282. package/dist/components/utils/FocusTrap.js +252 -0
  283. package/dist/components/utils/FocusTrap.js.map +1 -0
  284. package/dist/components/utils/FocusTrap.mjs +229 -0
  285. package/dist/components/utils/FocusTrap.mjs.map +1 -0
  286. package/dist/components/utils/Transition.d.mts +26 -0
  287. package/dist/components/utils/Transition.d.ts +26 -0
  288. package/dist/components/utils/Transition.js +74 -0
  289. package/dist/components/utils/Transition.js.map +1 -0
  290. package/dist/components/utils/Transition.mjs +50 -0
  291. package/dist/components/utils/Transition.mjs.map +1 -0
  292. package/dist/hooks/focus/useFocusGuards.d.mts +3 -0
  293. package/dist/hooks/focus/useFocusGuards.d.ts +3 -0
  294. package/dist/hooks/focus/useFocusGuards.js +74 -0
  295. package/dist/hooks/focus/useFocusGuards.js.map +1 -0
  296. package/dist/hooks/focus/useFocusGuards.mjs +50 -0
  297. package/dist/hooks/focus/useFocusGuards.mjs.map +1 -0
  298. package/dist/hooks/{useFocusManagement.js → focus/useFocusManagement.js} +1 -1
  299. package/dist/hooks/focus/useFocusManagement.js.map +1 -0
  300. package/dist/hooks/{useFocusManagement.mjs → focus/useFocusManagement.mjs} +1 -1
  301. package/dist/hooks/focus/useFocusManagement.mjs.map +1 -0
  302. package/dist/hooks/{useFocusOnceVisible.js → focus/useFocusOnceVisible.js} +1 -1
  303. package/dist/hooks/focus/useFocusOnceVisible.js.map +1 -0
  304. package/dist/hooks/{useFocusOnceVisible.mjs → focus/useFocusOnceVisible.mjs} +1 -1
  305. package/dist/hooks/focus/useFocusOnceVisible.mjs.map +1 -0
  306. package/dist/hooks/focus/useFocusTrap.d.mts +16 -0
  307. package/dist/hooks/focus/useFocusTrap.d.ts +16 -0
  308. package/dist/hooks/focus/useFocusTrap.js +233 -0
  309. package/dist/hooks/focus/useFocusTrap.js.map +1 -0
  310. package/dist/hooks/focus/useFocusTrap.mjs +210 -0
  311. package/dist/hooks/focus/useFocusTrap.mjs.map +1 -0
  312. package/dist/hooks/focus/useIsMounted.d.mts +3 -0
  313. package/dist/hooks/focus/useIsMounted.d.ts +3 -0
  314. package/dist/hooks/focus/useIsMounted.js +43 -0
  315. package/dist/hooks/focus/useIsMounted.js.map +1 -0
  316. package/dist/hooks/focus/useIsMounted.mjs +20 -0
  317. package/dist/hooks/focus/useIsMounted.mjs.map +1 -0
  318. package/dist/hooks/useFloatingElement.d.mts +22 -0
  319. package/dist/hooks/useFloatingElement.d.ts +22 -0
  320. package/dist/hooks/useFloatingElement.js +162 -0
  321. package/dist/hooks/useFloatingElement.js.map +1 -0
  322. package/dist/hooks/useFloatingElement.mjs +139 -0
  323. package/dist/hooks/useFloatingElement.mjs.map +1 -0
  324. package/dist/hooks/useLocalStorage.js +2 -2
  325. package/dist/hooks/useLocalStorage.js.map +1 -1
  326. package/dist/hooks/useLocalStorage.mjs +2 -2
  327. package/dist/hooks/useLocalStorage.mjs.map +1 -1
  328. package/dist/hooks/useLogOnce.d.mts +3 -4
  329. package/dist/hooks/useLogOnce.d.ts +3 -4
  330. package/dist/hooks/useLogOnce.js +5 -5
  331. package/dist/hooks/useLogOnce.js.map +1 -1
  332. package/dist/hooks/useLogOnce.mjs +5 -5
  333. package/dist/hooks/useLogOnce.mjs.map +1 -1
  334. package/dist/hooks/useRerender.d.mts +2 -2
  335. package/dist/hooks/useRerender.d.ts +2 -2
  336. package/dist/hooks/useSearch.d.mts +2 -2
  337. package/dist/hooks/useSearch.d.ts +2 -2
  338. package/dist/hooks/useSearch.js +1 -1
  339. package/dist/hooks/useSearch.js.map +1 -1
  340. package/dist/hooks/useSearch.mjs +1 -1
  341. package/dist/hooks/useSearch.mjs.map +1 -1
  342. package/dist/localization/LanguageProvider.d.mts +2 -2
  343. package/dist/localization/LanguageProvider.d.ts +2 -2
  344. package/dist/localization/LanguageProvider.js +2 -2
  345. package/dist/localization/LanguageProvider.js.map +1 -1
  346. package/dist/localization/LanguageProvider.mjs +2 -2
  347. package/dist/localization/LanguageProvider.mjs.map +1 -1
  348. package/dist/localization/defaults/form.d.mts +1 -0
  349. package/dist/localization/defaults/form.d.ts +1 -0
  350. package/dist/localization/defaults/form.js +2 -0
  351. package/dist/localization/defaults/form.js.map +1 -1
  352. package/dist/localization/defaults/form.mjs +2 -0
  353. package/dist/localization/defaults/form.mjs.map +1 -1
  354. package/dist/localization/useTranslation.js.map +1 -1
  355. package/dist/localization/useTranslation.mjs.map +1 -1
  356. package/dist/storybook/helper.d.mts +17 -0
  357. package/dist/storybook/helper.d.ts +17 -0
  358. package/dist/storybook/helper.js +61 -0
  359. package/dist/storybook/helper.js.map +1 -0
  360. package/dist/storybook/helper.mjs +37 -0
  361. package/dist/storybook/helper.mjs.map +1 -0
  362. package/dist/{css → style}/globals.css +779 -374
  363. package/dist/{css → style}/uncompiled/globals.css +75 -13
  364. package/dist/{css → style}/uncompiled/theme/colors-component.css +18 -4
  365. package/dist/{css → style}/uncompiled/theme/colors-semantic.css +2 -9
  366. package/dist/style/uncompiled/typography.css +171 -0
  367. package/dist/{css → style}/uncompiled/utitlity/animation.css +54 -42
  368. package/dist/{css → style}/uncompiled/utitlity/index.css +2 -1
  369. package/dist/{css → style}/uncompiled/utitlity/shadow.css +5 -1
  370. package/dist/style/uncompiled/utitlity/sizing.css +29 -0
  371. package/dist/theming/useTheme.d.mts +2 -2
  372. package/dist/theming/useTheme.d.ts +2 -2
  373. package/dist/theming/useTheme.js +3 -3
  374. package/dist/theming/useTheme.js.map +1 -1
  375. package/dist/theming/useTheme.mjs +3 -3
  376. package/dist/theming/useTheme.mjs.map +1 -1
  377. package/dist/{util → utils}/array.d.mts +1 -0
  378. package/dist/{util → utils}/array.d.ts +1 -0
  379. package/dist/{util → utils}/array.js +15 -2
  380. package/dist/utils/array.js.map +1 -0
  381. package/dist/{util → utils}/array.mjs +15 -2
  382. package/dist/utils/array.mjs.map +1 -0
  383. package/dist/utils/bagFunctions.d.mts +15 -0
  384. package/dist/utils/bagFunctions.d.ts +15 -0
  385. package/dist/{util/PropsWithFunctionChildren.js → utils/bagFunctions.js} +5 -5
  386. package/dist/utils/bagFunctions.js.map +1 -0
  387. package/dist/{util/PropsWithFunctionChildren.mjs → utils/bagFunctions.mjs} +2 -2
  388. package/dist/utils/bagFunctions.mjs.map +1 -0
  389. package/dist/{util → utils}/builder.js +1 -1
  390. package/dist/utils/builder.js.map +1 -0
  391. package/dist/{util → utils}/builder.mjs +1 -1
  392. package/dist/utils/builder.mjs.map +1 -0
  393. package/dist/{util → utils}/date.js +3 -3
  394. package/dist/utils/date.js.map +1 -0
  395. package/dist/{util → utils}/date.mjs +2 -2
  396. package/dist/utils/date.mjs.map +1 -0
  397. package/dist/{util → utils}/easeFunctions.js +5 -4
  398. package/dist/utils/easeFunctions.js.map +1 -0
  399. package/dist/{util → utils}/easeFunctions.mjs +4 -3
  400. package/dist/utils/easeFunctions.mjs.map +1 -0
  401. package/dist/{util → utils}/emailValidation.js +1 -1
  402. package/dist/utils/emailValidation.js.map +1 -0
  403. package/dist/{util → utils}/emailValidation.mjs +1 -1
  404. package/dist/utils/emailValidation.mjs.map +1 -0
  405. package/dist/{util → utils}/loopingArray.js +1 -1
  406. package/dist/utils/loopingArray.js.map +1 -0
  407. package/dist/{util → utils}/loopingArray.mjs +1 -1
  408. package/dist/utils/loopingArray.mjs.map +1 -0
  409. package/dist/utils/match.d.mts +3 -0
  410. package/dist/utils/match.d.ts +3 -0
  411. package/dist/utils/match.js +32 -0
  412. package/dist/utils/match.js.map +1 -0
  413. package/dist/utils/match.mjs +8 -0
  414. package/dist/utils/match.mjs.map +1 -0
  415. package/dist/utils/math.d.mts +3 -0
  416. package/dist/utils/math.d.ts +3 -0
  417. package/dist/{util → utils}/math.js +3 -2
  418. package/dist/utils/math.js.map +1 -0
  419. package/dist/utils/math.mjs +9 -0
  420. package/dist/utils/math.mjs.map +1 -0
  421. package/dist/{util → utils}/noop.js +1 -1
  422. package/dist/utils/noop.js.map +1 -0
  423. package/dist/utils/noop.mjs +6 -0
  424. package/dist/utils/noop.mjs.map +1 -0
  425. package/dist/{util → utils}/resolveSetState.js +1 -1
  426. package/dist/utils/resolveSetState.js.map +1 -0
  427. package/dist/{util → utils}/resolveSetState.mjs +1 -1
  428. package/dist/utils/resolveSetState.mjs.map +1 -0
  429. package/dist/{util → utils}/simpleSearch.js +1 -1
  430. package/dist/utils/simpleSearch.js.map +1 -0
  431. package/dist/{util → utils}/simpleSearch.mjs +1 -1
  432. package/dist/utils/simpleSearch.mjs.map +1 -0
  433. package/dist/{util → utils}/storage.js +1 -1
  434. package/dist/utils/storage.js.map +1 -0
  435. package/dist/{util → utils}/storage.mjs +1 -1
  436. package/dist/utils/storage.mjs.map +1 -0
  437. package/dist/{util → utils}/writeToClipboard.js +2 -1
  438. package/dist/utils/writeToClipboard.js.map +1 -0
  439. package/dist/{util → utils}/writeToClipboard.mjs +3 -1
  440. package/dist/utils/writeToClipboard.mjs.map +1 -0
  441. package/package.json +8 -8
  442. package/dist/components/dialogs/ConfirmDialog.js +0 -674
  443. package/dist/components/dialogs/ConfirmDialog.js.map +0 -1
  444. package/dist/components/dialogs/ConfirmDialog.mjs +0 -638
  445. package/dist/components/dialogs/ConfirmDialog.mjs.map +0 -1
  446. package/dist/components/icons-and-geometry/Helpwave.js.map +0 -1
  447. package/dist/components/icons-and-geometry/Helpwave.mjs.map +0 -1
  448. package/dist/components/layout-and-navigation/Overlay.d.mts +0 -67
  449. package/dist/components/layout-and-navigation/Overlay.d.ts +0 -67
  450. package/dist/components/layout-and-navigation/Overlay.js +0 -702
  451. package/dist/components/layout-and-navigation/Overlay.js.map +0 -1
  452. package/dist/components/layout-and-navigation/Overlay.mjs +0 -665
  453. package/dist/components/layout-and-navigation/Overlay.mjs.map +0 -1
  454. package/dist/components/layout-and-navigation/SearchableList.d.mts +0 -24
  455. package/dist/components/layout-and-navigation/SearchableList.d.ts +0 -24
  456. package/dist/components/layout-and-navigation/SearchableList.js +0 -758
  457. package/dist/components/layout-and-navigation/SearchableList.js.map +0 -1
  458. package/dist/components/layout-and-navigation/SearchableList.mjs +0 -724
  459. package/dist/components/layout-and-navigation/SearchableList.mjs.map +0 -1
  460. package/dist/components/layout-and-navigation/Tile.d.mts +0 -27
  461. package/dist/components/layout-and-navigation/Tile.d.ts +0 -27
  462. package/dist/components/layout-and-navigation/Tile.js +0 -96
  463. package/dist/components/layout-and-navigation/Tile.js.map +0 -1
  464. package/dist/components/layout-and-navigation/Tile.mjs +0 -61
  465. package/dist/components/layout-and-navigation/Tile.mjs.map +0 -1
  466. package/dist/components/modals/ConfirmModal.d.mts +0 -33
  467. package/dist/components/modals/ConfirmModal.d.ts +0 -33
  468. package/dist/components/modals/ConfirmModal.js +0 -687
  469. package/dist/components/modals/ConfirmModal.js.map +0 -1
  470. package/dist/components/modals/ConfirmModal.mjs +0 -651
  471. package/dist/components/modals/ConfirmModal.mjs.map +0 -1
  472. package/dist/components/modals/DiscardChangesModal.d.mts +0 -20
  473. package/dist/components/modals/DiscardChangesModal.d.ts +0 -20
  474. package/dist/components/modals/DiscardChangesModal.js +0 -717
  475. package/dist/components/modals/DiscardChangesModal.js.map +0 -1
  476. package/dist/components/modals/DiscardChangesModal.mjs +0 -681
  477. package/dist/components/modals/DiscardChangesModal.mjs.map +0 -1
  478. package/dist/components/modals/InputModal.d.mts +0 -21
  479. package/dist/components/modals/InputModal.d.ts +0 -21
  480. package/dist/components/modals/InputModal.js +0 -976
  481. package/dist/components/modals/InputModal.js.map +0 -1
  482. package/dist/components/modals/InputModal.mjs +0 -940
  483. package/dist/components/modals/InputModal.mjs.map +0 -1
  484. package/dist/components/modals/LanguageModal.d.mts +0 -21
  485. package/dist/components/modals/LanguageModal.d.ts +0 -21
  486. package/dist/components/modals/LanguageModal.js +0 -1468
  487. package/dist/components/modals/LanguageModal.js.map +0 -1
  488. package/dist/components/modals/LanguageModal.mjs +0 -1432
  489. package/dist/components/modals/LanguageModal.mjs.map +0 -1
  490. package/dist/components/modals/ThemeModal.d.mts +0 -21
  491. package/dist/components/modals/ThemeModal.d.ts +0 -21
  492. package/dist/components/modals/ThemeModal.js +0 -1497
  493. package/dist/components/modals/ThemeModal.js.map +0 -1
  494. package/dist/components/modals/ThemeModal.mjs +0 -1461
  495. package/dist/components/modals/ThemeModal.mjs.map +0 -1
  496. package/dist/components/user-action/Input.d.mts +0 -77
  497. package/dist/components/user-action/Input.d.ts +0 -77
  498. package/dist/components/user-action/Input.js.map +0 -1
  499. package/dist/components/user-action/Input.mjs +0 -298
  500. package/dist/components/user-action/Input.mjs.map +0 -1
  501. package/dist/components/user-action/MultiSelect.d.mts +0 -42
  502. package/dist/components/user-action/MultiSelect.d.ts +0 -42
  503. package/dist/components/user-action/MultiSelect.js +0 -1468
  504. package/dist/components/user-action/MultiSelect.js.map +0 -1
  505. package/dist/components/user-action/MultiSelect.mjs +0 -1433
  506. package/dist/components/user-action/MultiSelect.mjs.map +0 -1
  507. package/dist/components/user-action/Select.d.mts +0 -41
  508. package/dist/components/user-action/Select.d.ts +0 -41
  509. package/dist/components/user-action/Select.js +0 -1236
  510. package/dist/components/user-action/Select.js.map +0 -1
  511. package/dist/components/user-action/Select.mjs +0 -1201
  512. package/dist/components/user-action/Select.mjs.map +0 -1
  513. package/dist/components/user-action/ToggleableInput.d.mts +0 -37
  514. package/dist/components/user-action/ToggleableInput.d.ts +0 -37
  515. package/dist/components/user-action/ToggleableInput.js +0 -192
  516. package/dist/components/user-action/ToggleableInput.js.map +0 -1
  517. package/dist/components/user-action/ToggleableInput.mjs +0 -157
  518. package/dist/components/user-action/ToggleableInput.mjs.map +0 -1
  519. package/dist/css/uncompiled/textstyles.css +0 -69
  520. package/dist/hooks/useFocusManagement.js.map +0 -1
  521. package/dist/hooks/useFocusManagement.mjs.map +0 -1
  522. package/dist/hooks/useFocusOnceVisible.js.map +0 -1
  523. package/dist/hooks/useFocusOnceVisible.mjs.map +0 -1
  524. package/dist/index.d.mts +0 -103
  525. package/dist/index.d.ts +0 -103
  526. package/dist/index.js +0 -12610
  527. package/dist/index.js.map +0 -1
  528. package/dist/index.mjs +0 -12447
  529. package/dist/index.mjs.map +0 -1
  530. package/dist/util/PropsWithFunctionChildren.d.mts +0 -14
  531. package/dist/util/PropsWithFunctionChildren.d.ts +0 -14
  532. package/dist/util/PropsWithFunctionChildren.js.map +0 -1
  533. package/dist/util/PropsWithFunctionChildren.mjs.map +0 -1
  534. package/dist/util/array.js.map +0 -1
  535. package/dist/util/array.mjs.map +0 -1
  536. package/dist/util/builder.js.map +0 -1
  537. package/dist/util/builder.mjs.map +0 -1
  538. package/dist/util/date.js.map +0 -1
  539. package/dist/util/date.mjs.map +0 -1
  540. package/dist/util/easeFunctions.js.map +0 -1
  541. package/dist/util/easeFunctions.mjs.map +0 -1
  542. package/dist/util/emailValidation.js.map +0 -1
  543. package/dist/util/emailValidation.mjs.map +0 -1
  544. package/dist/util/loopingArray.js.map +0 -1
  545. package/dist/util/loopingArray.mjs.map +0 -1
  546. package/dist/util/math.d.mts +0 -3
  547. package/dist/util/math.d.ts +0 -3
  548. package/dist/util/math.js.map +0 -1
  549. package/dist/util/math.mjs +0 -8
  550. package/dist/util/math.mjs.map +0 -1
  551. package/dist/util/news.d.mts +0 -101
  552. package/dist/util/news.d.ts +0 -101
  553. package/dist/util/news.js +0 -76
  554. package/dist/util/news.js.map +0 -1
  555. package/dist/util/news.mjs +0 -49
  556. package/dist/util/news.mjs.map +0 -1
  557. package/dist/util/noop.js.map +0 -1
  558. package/dist/util/noop.mjs +0 -6
  559. package/dist/util/noop.mjs.map +0 -1
  560. package/dist/util/resolveSetState.js.map +0 -1
  561. package/dist/util/resolveSetState.mjs.map +0 -1
  562. package/dist/util/simpleSearch.js.map +0 -1
  563. package/dist/util/simpleSearch.mjs.map +0 -1
  564. package/dist/util/storage.js.map +0 -1
  565. package/dist/util/storage.mjs.map +0 -1
  566. package/dist/util/types.d.mts +0 -3
  567. package/dist/util/types.d.ts +0 -3
  568. package/dist/util/types.js +0 -18
  569. package/dist/util/types.js.map +0 -1
  570. package/dist/util/types.mjs +0 -1
  571. package/dist/util/types.mjs.map +0 -1
  572. package/dist/util/writeToClipboard.js.map +0 -1
  573. package/dist/util/writeToClipboard.mjs.map +0 -1
  574. /package/dist/hooks/{useFocusManagement.d.mts → focus/useFocusManagement.d.mts} +0 -0
  575. /package/dist/hooks/{useFocusManagement.d.ts → focus/useFocusManagement.d.ts} +0 -0
  576. /package/dist/hooks/{useFocusOnceVisible.d.mts → focus/useFocusOnceVisible.d.mts} +0 -0
  577. /package/dist/hooks/{useFocusOnceVisible.d.ts → focus/useFocusOnceVisible.d.ts} +0 -0
  578. /package/dist/{css → style}/uncompiled/theme/colors-basic.css +0 -0
  579. /package/dist/{css → style}/uncompiled/theme/index.css +0 -0
  580. /package/dist/{css → style}/uncompiled/theme/variants.css +0 -0
  581. /package/dist/{css → style}/uncompiled/utitlity/borderradius.css +0 -0
  582. /package/dist/{css → style}/uncompiled/utitlity/general.css +0 -0
  583. /package/dist/{util → utils}/builder.d.mts +0 -0
  584. /package/dist/{util → utils}/builder.d.ts +0 -0
  585. /package/dist/{util → utils}/date.d.mts +0 -0
  586. /package/dist/{util → utils}/date.d.ts +0 -0
  587. /package/dist/{util → utils}/easeFunctions.d.mts +0 -0
  588. /package/dist/{util → utils}/easeFunctions.d.ts +0 -0
  589. /package/dist/{util → utils}/emailValidation.d.mts +0 -0
  590. /package/dist/{util → utils}/emailValidation.d.ts +0 -0
  591. /package/dist/{util → utils}/loopingArray.d.mts +0 -0
  592. /package/dist/{util → utils}/loopingArray.d.ts +0 -0
  593. /package/dist/{util → utils}/noop.d.mts +0 -0
  594. /package/dist/{util → utils}/noop.d.ts +0 -0
  595. /package/dist/{util → utils}/resolveSetState.d.mts +0 -0
  596. /package/dist/{util → utils}/resolveSetState.d.ts +0 -0
  597. /package/dist/{util → utils}/simpleSearch.d.mts +0 -0
  598. /package/dist/{util → utils}/simpleSearch.d.ts +0 -0
  599. /package/dist/{util → utils}/storage.d.mts +0 -0
  600. /package/dist/{util → utils}/storage.d.ts +0 -0
  601. /package/dist/{util → utils}/writeToClipboard.d.mts +0 -0
  602. /package/dist/{util → utils}/writeToClipboard.d.ts +0 -0
@@ -1,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...",
@@ -207,422 +868,150 @@ var formTranslation = {
207
868
  yes: "Ja"
208
869
  }
209
870
  };
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"
513
- };
514
- var ButtonUtil = {
515
- paddingMapping,
516
- iconPaddingMapping
517
- };
518
- var SolidButton = forwardRef2(function SolidButton2({
519
- children,
520
- color = "primary",
521
- size = "medium",
522
- startIcon,
523
- endIcon,
524
- onClick,
525
- className,
526
- ...restProps
527
- }, ref) {
528
- const colorClasses = {
529
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
530
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
531
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
532
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
533
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
534
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
535
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
536
- }[color];
537
- const iconColorClasses = {
538
- primary: "not-group-disabled:text-button-solid-primary-icon",
539
- secondary: "not-group-disabled:text-button-solid-secondary-icon",
540
- tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
541
- positive: "not-group-disabled:text-button-solid-positive-icon",
542
- warning: "not-group-disabled:text-button-solid-warning-icon",
543
- negative: "not-group-disabled:text-button-solid-negative-icon",
544
- neutral: "not-group-disabled:text-button-solid-neutral-icon"
545
- }[color];
546
- return /* @__PURE__ */ jsxs2(
547
- "button",
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
+ }
892
+ };
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,
548
906
  {
549
- ref,
550
- onClick,
551
- className: clsx3(
552
- "group font-semibold",
553
- colorClasses,
554
- "not-disabled:hover:brightness-90",
555
- "disabled:text-disabled-text disabled:bg-disabled-background",
556
- ButtonUtil.paddingMapping[size],
557
- className
558
- ),
559
- ...restProps,
560
- children: [
561
- startIcon && /* @__PURE__ */ jsx4(
562
- "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",
563
911
  {
564
- className: clsx3(
565
- iconColorClasses,
566
- "group-disabled:text-disabled-icon"
567
- ),
568
- 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
569
914
  }
570
- ),
571
- children,
572
- endIcon && /* @__PURE__ */ jsx4(
573
- "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,
574
921
  {
575
- className: clsx3(
576
- iconColorClasses,
577
- "group-disabled:text-disabled-icon"
578
- ),
579
- children: endIcon
922
+ value: filterValue ?? "",
923
+ autoFocus: true,
924
+ placeholder: translation("text"),
925
+ onChangeText: setFilterValue,
926
+ className: "h-10"
580
927
  }
581
- )
582
- ]
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
+ ] })
583
997
  }
584
998
  );
585
- });
586
- var IconButton = ({
587
- children,
588
- color = "primary",
589
- size = "medium",
590
- className,
591
- ...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
592
1006
  }) => {
593
- const colorClasses = {
594
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
595
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
596
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
597
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
598
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
599
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
600
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
601
- transparent: "not-disabled:bg-transparent"
602
- }[color];
603
- return /* @__PURE__ */ jsx4(
604
- "button",
605
- {
606
- className: clsx3(
607
- colorClasses,
608
- "not-disabled:hover:brightness-90",
609
- "disabled:text-disabled-text",
610
- {
611
- "disabled:bg-disabled-background": color !== "transparent",
612
- "disabled:opacity-70": color === "transparent",
613
- "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
614
- },
615
- ButtonUtil.iconPaddingMapping[size],
616
- className
617
- ),
618
- ...restProps,
619
- children
620
- }
621
- );
1007
+ return /* @__PURE__ */ jsx8("div", { className: clsx6("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
622
1008
  };
623
1009
 
624
1010
  // src/components/layout-and-navigation/Pagination.tsx
625
- 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";
626
1015
  var Pagination = ({
627
1016
  overwriteTranslation,
628
1017
  pageIndex,
@@ -632,11 +1021,11 @@ var Pagination = ({
632
1021
  style
633
1022
  }) => {
634
1023
  const translation = useTranslation([formTranslation], overwriteTranslation);
635
- const [value, setValue] = useState5((pageIndex + 1).toString());
1024
+ const [value, setValue] = useState8((pageIndex + 1).toString());
636
1025
  const noPages = pageCount === 0;
637
1026
  const onFirstPage = pageIndex === 0 && !noPages;
638
1027
  const onLastPage = pageIndex === pageCount - 1;
639
- useEffect5(() => {
1028
+ useEffect9(() => {
640
1029
  if (noPages) {
641
1030
  setValue("0");
642
1031
  } else {
@@ -646,17 +1035,16 @@ var Pagination = ({
646
1035
  const changePage = (page) => {
647
1036
  onPageChanged(page);
648
1037
  };
649
- return /* @__PURE__ */ jsxs3("div", { className: clsx4("flex-row-1", className), style, children: [
650
- /* @__PURE__ */ jsx5(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx5(ChevronFirst, {}) }),
651
- /* @__PURE__ */ jsx5(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx5(ChevronLeft, {}) }),
652
- /* @__PURE__ */ jsxs3("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
653
- /* @__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(
654
1043
  Input,
655
1044
  {
656
1045
  value,
657
- containerClassName: "flex flex-1 h-10",
658
- className: clsx4(
659
- "w-full text-center font-bold input-indicator-hidden"
1046
+ className: clsx7(
1047
+ "w-full text-center font-bold input-indicator-hidden h-10"
660
1048
  ),
661
1049
  type: "number",
662
1050
  min: 1,
@@ -664,19 +1052,19 @@ var Pagination = ({
664
1052
  disabled: noPages,
665
1053
  onChangeText: (value2) => {
666
1054
  if (value2) {
667
- setValue(clamp(Number(value2), 1, pageCount).toString());
1055
+ setValue(clamp(Number(value2), [1, pageCount]).toString());
668
1056
  } else {
669
1057
  setValue(value2);
670
1058
  }
671
1059
  },
672
1060
  onEditCompleted: (value2) => {
673
- changePage(clamp(Number(value2) - 1, 0, pageCount - 1));
1061
+ changePage(clamp(Number(value2) - 1, [0, pageCount - 1]));
674
1062
  },
675
1063
  editCompleteOptions: { delay: 800 }
676
1064
  }
677
1065
  ),
678
- /* @__PURE__ */ jsx5("span", { className: "select-none w-10", children: translation("of") }),
679
- /* @__PURE__ */ jsx5(
1066
+ /* @__PURE__ */ jsx9("span", { className: "select-none w-10", children: translation("of") }),
1067
+ /* @__PURE__ */ jsx9(
680
1068
  "span",
681
1069
  {
682
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",
@@ -684,578 +1072,816 @@ var Pagination = ({
684
1072
  }
685
1073
  )
686
1074
  ] }),
687
- /* @__PURE__ */ jsx5(IconButton, { color: "transparent", onClick: () => changePage(pageIndex + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx5(ChevronRight, {}) }),
688
- /* @__PURE__ */ jsx5(IconButton, { color: "transparent", onClick: () => changePage(pageCount - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx5(ChevronLast, {}) })
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, {}) })
689
1077
  ] });
690
1078
  };
691
1079
 
692
- // src/components/table/Table.tsx
693
- import clsx10 from "clsx";
694
- import {
695
- flexRender,
696
- getCoreRowModel,
697
- getFilteredRowModel,
698
- getPaginationRowModel,
699
- getSortedRowModel,
700
- useReactTable
701
- } from "@tanstack/react-table";
702
-
703
- // src/util/array.ts
704
- var defaultRangeOptions = {
705
- allowEmptyRange: false,
706
- stepSize: 1,
707
- exclusiveStart: false,
708
- exclusiveEnd: true
709
- };
710
- var range = (endOrRange, options) => {
711
- const { allowEmptyRange, stepSize, exclusiveStart, exclusiveEnd } = { ...defaultRangeOptions, ...options };
712
- let start = 0;
713
- let end;
714
- if (typeof endOrRange === "number") {
715
- end = endOrRange;
716
- } else {
717
- start = endOrRange[0];
718
- end = endOrRange[1];
719
- }
720
- if (!exclusiveEnd) {
721
- end -= 1;
722
- }
723
- if (exclusiveStart) {
724
- start += 1;
725
- }
726
- if (end - 1 < start) {
727
- if (!allowEmptyRange) {
728
- console.warn(`range: end (${end}) < start (${start}) should be allowed explicitly, set options.allowEmptyRange to true`);
729
- }
730
- return [];
731
- }
732
- return Array.from({ length: end - start }, (_, index) => index * stepSize + start);
733
- };
734
-
735
- // src/components/table/Table.tsx
736
- import { Scrollbars } from "react-custom-scrollbars-2";
737
-
738
1080
  // src/components/user-action/Checkbox.tsx
739
- import { useState as useState6 } from "react";
740
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
1081
+ import { useEffect as useEffect14, useState as useState13 } from "react";
741
1082
  import { Check, Minus } from "lucide-react";
742
- import clsx5 from "clsx";
743
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
744
- var checkboxSizeMapping = {
745
- small: "size-5",
746
- medium: "size-6",
747
- large: "size-8"
748
- };
749
- var checkboxIconSizeMapping = {
750
- small: "size-4",
751
- medium: "size-5",
752
- large: "size-7"
753
- };
754
- var Checkbox = ({
755
- id,
756
- label,
757
- checked,
758
- disabled,
759
- onChange,
760
- onChangeTristate,
761
- size = "medium",
762
- className = "",
763
- containerClassName
764
- }) => {
765
- const usedSizeClass = checkboxSizeMapping[size];
766
- const innerIconSize = checkboxIconSizeMapping[size];
767
- const propagateChange = (checked2) => {
768
- if (onChangeTristate) {
769
- onChangeTristate(checked2);
770
- }
771
- if (onChange) {
772
- onChange(checked2 === "indeterminate" ? false : checked2);
1083
+ import clsx8 from "clsx";
1084
+
1085
+ // node_modules/@radix-ui/react-checkbox/dist/index.mjs
1086
+ import * as React11 from "react";
1087
+
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;
1104
+ }
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
+ };
773
1118
  }
774
1119
  };
775
- const changeValue = () => {
776
- if (disabled) {
777
- 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}\``);
778
1147
  }
779
- const newValue = checked === "indeterminate" ? false : !checked;
780
- propagateChange(newValue);
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
+ };
781
1161
  };
782
- return /* @__PURE__ */ jsxs4(
783
- "div",
784
- {
785
- className: clsx5("group flex-row-2 items-center", {
786
- "cursor-pointer": !disabled,
787
- "cursor-not-allowed": disabled
788
- }, containerClassName),
789
- onClick: changeValue,
790
- children: [
791
- /* @__PURE__ */ jsx6(
792
- CheckboxPrimitive.Root,
793
- {
794
- onCheckedChange: propagateChange,
795
- checked,
796
- disabled,
797
- id,
798
- className: clsx5(usedSizeClass, `items-center border-2 rounded outline-none `, {
799
- "text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
800
- "focus:border-primary group-hover:border-primary ": !disabled,
801
- "bg-input-background": !disabled && !checked,
802
- "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
803
- }, className),
804
- children: /* @__PURE__ */ jsxs4(CheckboxPrimitive.Indicator, { children: [
805
- checked === true && /* @__PURE__ */ jsx6(Check, { className: innerIconSize }),
806
- checked === "indeterminate" && /* @__PURE__ */ jsx6(Minus, { className: innerIconSize })
807
- ] })
808
- }
809
- ),
810
- label && /* @__PURE__ */ jsx6(
811
- Label,
812
- {
813
- ...label,
814
- className: clsx5(
815
- label.className,
816
- {
817
- "cursor-pointer": !disabled,
818
- "cursor-not-allowed": disabled
819
- }
820
- ),
821
- htmlFor: id
822
- }
823
- )
824
- ]
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);
825
1192
  }
826
- );
827
- };
1193
+ };
1194
+ }
828
1195
 
829
- // src/components/table/TableFilterButton.tsx
830
- import { FilterIcon } from "lucide-react";
1196
+ // node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
1197
+ import * as React5 from "react";
831
1198
 
832
- // src/components/user-action/Menu.tsx
833
- import { useEffect as useEffect8, useRef as useRef2, useState as useState8 } from "react";
834
- import clsx6 from "clsx";
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 : () => {
1202
+ };
835
1203
 
836
- // src/hooks/useOutsideClick.ts
837
- import { useEffect as useEffect6 } from "react";
838
- var useOutsideClick = (refs, handler) => {
839
- useEffect6(() => {
840
- const listener = (event) => {
841
- if (event.target === null) return;
842
- if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
843
- return;
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
+ );
844
1230
  }
845
- handler();
846
- };
847
- document.addEventListener("mousedown", listener);
848
- document.addEventListener("touchstart", listener);
849
- return () => {
850
- document.removeEventListener("mousedown", listener);
851
- document.removeEventListener("touchstart", listener);
852
- };
853
- }, [refs, handler]);
854
- };
1231
+ isControlledRef.current = isControlled;
1232
+ }, [isControlled, caller]);
1233
+ }
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");
855
1271
 
856
- // src/hooks/useHoverState.ts
857
- import { useEffect as useEffect7, useState as useState7 } from "react";
858
- var defaultUseHoverStateProps = {
859
- closingDelay: 200,
860
- isDisabled: 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;
861
1338
  };
862
- var useHoverState = (props = void 0) => {
863
- const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
864
- const [isHovered, setIsHovered] = useState7(false);
865
- const [timer, setTimer] = useState7();
866
- const onMouseEnter = () => {
867
- if (isDisabled) {
868
- return;
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"
869
1357
  }
870
- clearTimeout(timer);
871
- setIsHovered(true);
872
- };
873
- const onMouseLeave = () => {
874
- if (isDisabled) {
875
- return;
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;
876
1383
  }
877
- setTimer(setTimeout(() => {
878
- setIsHovered(false);
879
- }, closingDelay));
880
- };
881
- useEffect7(() => {
882
- if (timer) {
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);
883
1413
  return () => {
884
- clearTimeout(timer);
1414
+ ownerWindow.clearTimeout(timeoutId);
1415
+ node.removeEventListener("animationstart", handleAnimationStart);
1416
+ node.removeEventListener("animationcancel", handleAnimationEnd);
1417
+ node.removeEventListener("animationend", handleAnimationEnd);
885
1418
  };
1419
+ } else {
1420
+ send("ANIMATION_END");
886
1421
  }
887
- });
888
- useEffect7(() => {
889
- if (timer) {
890
- clearTimeout(timer);
891
- }
892
- }, [isDisabled]);
1422
+ }, [node, send]);
893
1423
  return {
894
- isHovered,
895
- setIsHovered,
896
- handlers: { onMouseEnter, onMouseLeave }
1424
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
1425
+ ref: React23.useCallback((node2) => {
1426
+ stylesRef.current = node2 ? getComputedStyle(node2) : null;
1427
+ setNode(node2);
1428
+ }, [])
897
1429
  };
898
- };
899
-
900
- // src/util/PropsWithFunctionChildren.ts
901
- var resolve = (children, bag) => {
902
- if (typeof children === "function") {
903
- return children(bag);
904
- }
905
- return children ?? void 0;
906
- };
907
- var BagFunctionUtil = {
908
- resolve
909
- };
910
-
911
- // src/hooks/usePopoverPosition.ts
912
- var defaultPopoverPositionOptions = {
913
- edgePadding: 16,
914
- outerGap: 4,
915
- horizontalAlignment: "leftInside",
916
- verticalAlignment: "bottomOutside",
917
- disabled: false
918
- };
919
- var usePopoverPosition = (trigger, options) => {
920
- const {
921
- edgePadding,
922
- outerGap,
923
- verticalAlignment,
924
- horizontalAlignment,
925
- disabled
926
- } = { ...defaultPopoverPositionOptions, ...options };
927
- if (disabled || !trigger) {
928
- return {};
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;
929
1439
  }
930
- const left = {
931
- leftOutside: trigger.left - outerGap,
932
- leftInside: trigger.left,
933
- rightOutside: trigger.right + outerGap,
934
- rightInside: trigger.right,
935
- center: trigger.left + trigger.width / 2
936
- }[horizontalAlignment];
937
- const top = {
938
- topOutside: trigger.top - outerGap,
939
- topInside: trigger.top,
940
- bottomOutside: trigger.bottom + outerGap,
941
- bottomInside: trigger.bottom,
942
- center: trigger.top + trigger.height / 2
943
- }[verticalAlignment];
944
- const translateX = {
945
- leftOutside: "-100%",
946
- leftInside: void 0,
947
- rightOutside: void 0,
948
- rightInside: "-100%",
949
- center: "-50%"
950
- }[horizontalAlignment];
951
- const translateY = {
952
- topOutside: "-100%",
953
- topInside: void 0,
954
- bottomOutside: void 0,
955
- bottomInside: "-100%",
956
- center: "-50%"
957
- }[verticalAlignment];
958
- return {
959
- left: Math.max(left, edgePadding),
960
- top: Math.max(top, edgePadding),
961
- translate: [translateX ?? "0", translateY ?? "0"].join(" ")
962
- };
963
- };
964
-
965
- // src/components/user-action/Menu.tsx
966
- import { createPortal } from "react-dom";
967
- import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
968
- function getScrollableParents(element) {
969
- const scrollables = [];
970
- let parent = element.parentElement;
971
- while (parent) {
972
- scrollables.push(parent);
973
- parent = parent.parentElement;
1440
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1441
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1442
+ if (mayWarn) {
1443
+ return element.props.ref;
974
1444
  }
975
- return scrollables;
1445
+ return element.props.ref || element.ref;
976
1446
  }
977
- var Menu = ({
978
- trigger,
979
- children,
980
- alignmentHorizontal = "leftInside",
981
- alignmentVertical = "bottomOutside",
982
- showOnHover = false,
983
- disabled = false,
984
- menuClassName = ""
985
- }) => {
986
- const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
987
- const triggerRef = useRef2(null);
988
- const menuRef = useRef2(null);
989
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
990
- const [isHidden, setIsHidden] = useState8(true);
991
- const bag = {
992
- isOpen,
993
- close: () => setIsOpen(false),
994
- toggleOpen: () => setIsOpen((prevState) => !prevState),
995
- disabled
996
- };
997
- const menuPosition = usePopoverPosition(
998
- triggerRef.current?.getBoundingClientRect(),
999
- { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
1000
- );
1001
- useEffect8(() => {
1002
- if (!isOpen) return;
1003
- const triggerEl = triggerRef.current;
1004
- if (!triggerEl) return;
1005
- const scrollableParents = getScrollableParents(triggerEl);
1006
- const close = () => setIsOpen(false);
1007
- scrollableParents.forEach((parent) => {
1008
- parent.addEventListener("scroll", close);
1009
- });
1010
- window.addEventListener("resize", close);
1011
- return () => {
1012
- scrollableParents.forEach((parent) => {
1013
- 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
+ }
1014
1471
  });
1015
- window.removeEventListener("resize", close);
1016
- };
1017
- }, [isOpen, setIsOpen]);
1018
- useEffect8(() => {
1019
- if (isOpen) {
1020
- 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);
1021
1490
  }
1022
- }, [isOpen]);
1023
- return /* @__PURE__ */ jsxs5(Fragment, { children: [
1024
- trigger(bag, triggerRef),
1025
- createPortal(/* @__PURE__ */ jsx7(
1026
- "div",
1027
- {
1028
- ref: menuRef,
1029
- onClick: (e) => e.stopPropagation(),
1030
- className: clsx6(
1031
- "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
1032
- {
1033
- "animate-pop-in": isOpen,
1034
- "animate-pop-out": !isOpen,
1035
- "hidden": isHidden
1036
- },
1037
- menuClassName
1038
- ),
1039
- onAnimationEnd: () => {
1040
- if (!isOpen) {
1041
- setIsHidden(true);
1042
- }
1043
- },
1044
- style: {
1045
- ...menuPosition
1046
- },
1047
- children: BagFunctionUtil.resolve(children, bag)
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;
1048
1515
  }
1049
- ), document.body)
1050
- ] });
1051
- };
1052
-
1053
- // src/components/table/TableFilterButton.tsx
1054
- import { useEffect as useEffect9, useState as useState9 } from "react";
1055
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1056
- var defaultTableFilterTranslation = {
1057
- en: {
1058
- filter: "Filter",
1059
- min: "Min",
1060
- max: "Max",
1061
- startDate: "Start",
1062
- endDate: "End",
1063
- text: "Text..."
1064
- },
1065
- de: {
1066
- filter: "Filter",
1067
- min: "Min",
1068
- max: "Max",
1069
- startDate: "Start",
1070
- endDate: "Ende",
1071
- text: "Text..."
1516
+ } else if (propName === "style") {
1517
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
1518
+ } else if (propName === "className") {
1519
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
1520
+ }
1072
1521
  }
1073
- };
1074
- var TableFilterButton = ({
1075
- filterType,
1076
- column
1077
- }) => {
1078
- const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
1079
- const columnFilterValue = column.getFilterValue();
1080
- const [filterValue, setFilterValue] = useState9(columnFilterValue);
1081
- const hasFilter = !!filterValue;
1082
- useEffect9(() => {
1083
- setFilterValue(columnFilterValue);
1084
- }, [columnFilterValue]);
1085
- return /* @__PURE__ */ jsx8(
1086
- Menu,
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,
1087
1624
  {
1088
- trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs6("div", { ref, className: "relative", children: [
1089
- /* @__PURE__ */ jsx8(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ jsx8(FilterIcon, {}) }),
1090
- hasFilter && /* @__PURE__ */ jsx8(
1091
- "div",
1092
- {
1093
- className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
1094
- "aria-hidden": true
1095
- }
1096
- )
1097
- ] }),
1098
- children: ({ close }) => /* @__PURE__ */ jsxs6("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
1099
- /* @__PURE__ */ jsx8("h4", { className: "textstyle-title-sm", children: translation("filter") }),
1100
- filterType === "text" && /* @__PURE__ */ jsx8(
1101
- Input,
1102
- {
1103
- value: filterValue ?? "",
1104
- autoFocus: true,
1105
- placeholder: translation("text"),
1106
- onChangeText: setFilterValue,
1107
- className: "h-10"
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,
1658
+ {
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();
1108
1677
  }
1109
- ),
1110
- filterType === "range" && /* @__PURE__ */ jsxs6("div", { className: "flex-row-2 items-center", children: [
1111
- /* @__PURE__ */ jsx8(
1112
- Input,
1113
- {
1114
- value: filterValue?.[0] ?? "",
1115
- type: "number",
1116
- placeholder: translation("min"),
1117
- onChangeText: (text) => {
1118
- const num = Number(text);
1119
- setFilterValue((old) => [num, old?.[1]]);
1120
- },
1121
- className: "h-10 input-indicator-hidden w-40"
1122
- }
1123
- ),
1124
- /* @__PURE__ */ jsx8("span", { className: "font-bold", children: "-" }),
1125
- /* @__PURE__ */ jsx8(
1126
- Input,
1127
- {
1128
- value: filterValue?.[1] ?? "",
1129
- type: "number",
1130
- placeholder: translation("max"),
1131
- onChangeText: (text) => {
1132
- const num = Number(text);
1133
- setFilterValue((old) => [old?.[0], num]);
1134
- },
1135
- className: "h-10 input-indicator-hidden w-40"
1136
- }
1137
- )
1138
- ] }),
1139
- filterType === "dateRange" && /* @__PURE__ */ jsxs6(Fragment2, { children: [
1140
- /* @__PURE__ */ jsx8(
1141
- Input,
1678
+ })
1679
+ }
1680
+ );
1681
+ }
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,
1142
1713
  {
1143
- value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
1144
- type: "datetime-local",
1145
- placeholder: translation("startDate"),
1146
- onChangeText: (text) => {
1147
- const value = new Date(text);
1148
- setFilterValue((old) => [value, old?.[1]]);
1149
- },
1150
- className: "h-10 w-50"
1714
+ ...checkboxProps,
1715
+ ref: forwardedRef,
1716
+ __scopeCheckbox
1151
1717
  }
1152
1718
  ),
1153
- /* @__PURE__ */ jsx8(
1154
- Input,
1719
+ isFormControl && /* @__PURE__ */ jsx13(
1720
+ CheckboxBubbleInput,
1155
1721
  {
1156
- value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
1157
- type: "datetime-local",
1158
- placeholder: translation("endDate"),
1159
- onChangeText: (text) => {
1160
- const value = new Date(text);
1161
- setFilterValue((old) => [old?.[0], value]);
1162
- },
1163
- className: "h-10 w-50"
1722
+ __scopeCheckbox
1164
1723
  }
1165
1724
  )
1166
- ] }),
1167
- /* @__PURE__ */ jsxs6("div", { className: "flex-row-2 justify-end w-full", children: [
1168
- hasFilter && /* @__PURE__ */ jsx8(SolidButton, { color: "negative", size: "small", onClick: () => {
1169
- column.setFilterValue(void 0);
1170
- close();
1171
- }, children: translation("remove") }),
1172
- /* @__PURE__ */ jsx8(SolidButton, { size: "small", onClick: () => {
1173
- column.setFilterValue(filterValue);
1174
- close();
1175
- }, children: translation("apply") })
1176
1725
  ] })
1177
- ] })
1178
- }
1179
- );
1180
- };
1181
-
1182
- // src/components/table/TableSortButton.tsx
1183
- import { ChevronDown, ChevronsUpDown, ChevronUp } from "lucide-react";
1184
- import clsx7 from "clsx";
1185
- import { jsx as jsx9 } from "react/jsx-runtime";
1186
- var TableSortButton = ({
1187
- sortDirection,
1188
- invert = false,
1189
- color = "neutral",
1190
- className,
1191
- ...buttonProps
1192
- }) => {
1193
- let icon = /* @__PURE__ */ jsx9(ChevronsUpDown, { className: "w-full h-full" });
1194
- if (sortDirection) {
1195
- let usedSortDirection = sortDirection;
1196
- if (invert) {
1197
- usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
1198
- }
1199
- icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx9(ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ jsx9(ChevronDown, { className: "w-full h-full" });
1726
+ }
1727
+ );
1200
1728
  }
1201
- return /* @__PURE__ */ jsx9(
1202
- IconButton,
1203
- {
1204
- size: "tiny",
1205
- color,
1206
- className: clsx7(className),
1207
- ...buttonProps,
1208
- children: icon
1209
- }
1210
- );
1211
- };
1212
-
1213
- // src/components/table/FillerRowElement.tsx
1214
- import { clsx as clsx8 } from "clsx";
1215
- import { jsx as jsx10 } from "react/jsx-runtime";
1216
- var FillerRowElement = ({
1217
- className
1218
- }) => {
1219
- return /* @__PURE__ */ jsx10("div", { className: clsx8("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
1220
- };
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
+ }
1221
1832
 
1222
- // src/components/table/Filter.ts
1223
- var dateRange = (row, columnId, filterValue) => {
1224
- const [min, max] = filterValue;
1225
- const value = row.getValue(columnId);
1226
- const date = value instanceof Date ? value : new Date(value);
1227
- if (isNaN(date.getTime())) return false;
1228
- if (min && date < min) return false;
1229
- if (max && date > max) return false;
1230
- return true;
1231
- };
1232
- var TableFilters = {
1233
- 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"
1234
1839
  };
1235
-
1236
- // src/hooks/useResizeCallbackWrapper.ts
1237
- import { useEffect as useEffect10 } from "react";
1238
- var useResizeCallbackWrapper = (callback) => {
1239
- useEffect10(() => {
1240
- window.addEventListener("resize", callback);
1241
- return () => {
1242
- window.removeEventListener("resize", callback);
1243
- };
1244
- }, [callback]);
1840
+ var checkboxIconSizeMapping = {
1841
+ sm: "size-4 stroke-3",
1842
+ md: "size-5 stroke-3",
1843
+ lg: "size-7 stroke-3"
1245
1844
  };
1246
-
1247
- // src/components/table/TableCell.tsx
1248
- import { clsx as clsx9 } from "clsx";
1249
- import { jsx as jsx11 } from "react/jsx-runtime";
1250
- var TableCell = ({
1251
- children,
1252
- className
1845
+ var Checkbox2 = ({
1846
+ disabled,
1847
+ checked = false,
1848
+ indeterminate = false,
1849
+ onChange,
1850
+ size = "md",
1851
+ className = "",
1852
+ ...props
1253
1853
  }) => {
1254
- 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
+ );
1255
1881
  };
1256
1882
 
1257
1883
  // src/components/table/Table.tsx
1258
- import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1884
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
1259
1885
  var Table = ({
1260
1886
  data,
1261
1887
  fillerRow,
@@ -1268,22 +1894,22 @@ var Table = ({
1268
1894
  columns,
1269
1895
  ...tableOptions
1270
1896
  }) => {
1271
- const ref = useRef3(null);
1272
- const tableRef = useRef3(null);
1273
- 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) => {
1274
1900
  return {
1275
1901
  ...previousValue,
1276
1902
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
1277
1903
  };
1278
1904
  }, {}));
1279
- const [columnSizingInfo, setColumnSizingInfo] = useState10();
1280
- const [pagination, setPagination] = useState10({
1905
+ const [columnSizingInfo, setColumnSizingInfo] = useState14();
1906
+ const [pagination, setPagination] = useState14({
1281
1907
  pageSize: 10,
1282
1908
  pageIndex: 0,
1283
1909
  ...initialState?.pagination
1284
1910
  });
1285
- const [columnFilters, setColumnFilters] = useState10(initialState?.columnFilters);
1286
- const computedColumnMinWidths = useMemo(() => {
1911
+ const [columnFilters, setColumnFilters] = useState14(initialState?.columnFilters);
1912
+ const computedColumnMinWidths = useMemo4(() => {
1287
1913
  return columns.reduce((previousValue, column) => {
1288
1914
  return {
1289
1915
  ...previousValue,
@@ -1292,7 +1918,7 @@ var Table = ({
1292
1918
  };
1293
1919
  }, {});
1294
1920
  }, [columns, defaultColumn]);
1295
- const computedColumnMaxWidths = useMemo(() => {
1921
+ const computedColumnMaxWidths = useMemo4(() => {
1296
1922
  return columns.reduce((previousValue, column) => {
1297
1923
  return {
1298
1924
  ...previousValue,
@@ -1300,12 +1926,12 @@ var Table = ({
1300
1926
  };
1301
1927
  }, {});
1302
1928
  }, [columns, defaultColumn]);
1303
- const tableMinWidth = useMemo(() => {
1929
+ const tableMinWidth = useMemo4(() => {
1304
1930
  return columns.reduce((sum, column) => {
1305
1931
  return sum + computedColumnMinWidths[column.id];
1306
1932
  }, 0);
1307
1933
  }, [columns, computedColumnMinWidths]);
1308
- const updateColumnSizes = useMemo(() => {
1934
+ const updateColumnSizes = useMemo4(() => {
1309
1935
  return (previous) => {
1310
1936
  const updateSizing = {
1311
1937
  ...columnSizing,
@@ -1313,7 +1939,7 @@ var Table = ({
1313
1939
  };
1314
1940
  const containerWidth = ref.current.offsetWidth;
1315
1941
  columns.forEach((column) => {
1316
- 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]);
1317
1943
  });
1318
1944
  const width = columns.reduce((previousValue, currentValue) => previousValue + updateSizing[currentValue.id], 0);
1319
1945
  if (width > containerWidth) {
@@ -1374,7 +2000,7 @@ var Table = ({
1374
2000
  minSize: 60,
1375
2001
  maxSize: 700,
1376
2002
  cell: ({ cell }) => {
1377
- return /* @__PURE__ */ jsx12(TableCell, { children: cell.getValue() });
2003
+ return /* @__PURE__ */ jsx15(TableCell, { children: cell.getValue() });
1378
2004
  },
1379
2005
  ...defaultColumn
1380
2006
  },
@@ -1422,18 +2048,18 @@ var Table = ({
1422
2048
  columnResizeMode: "onChange",
1423
2049
  ...tableOptions
1424
2050
  });
1425
- const [hasInitializedSizing, setHasInitializedSizing] = useState10(false);
1426
- useEffect11(() => {
2051
+ const [hasInitializedSizing, setHasInitializedSizing] = useState14(false);
2052
+ useEffect15(() => {
1427
2053
  if (!hasInitializedSizing && ref.current) {
1428
2054
  setHasInitializedSizing(true);
1429
2055
  table.setColumnSizing(updateColumnSizes(columnSizing));
1430
2056
  }
1431
2057
  }, [columnSizing, hasInitializedSizing]);
1432
- useResizeCallbackWrapper(useCallback3(() => {
2058
+ useResizeCallbackWrapper(useCallback6(() => {
1433
2059
  table.setColumnSizing(updateColumnSizes);
1434
2060
  }, [updateColumnSizes]));
1435
2061
  const pageCount = table.getPageCount();
1436
- useEffect11(() => {
2062
+ useEffect15(() => {
1437
2063
  const totalPages = pageCount;
1438
2064
  if (totalPages === 0) {
1439
2065
  if (pagination.pageIndex !== 0) {
@@ -1449,7 +2075,7 @@ var Table = ({
1449
2075
  }));
1450
2076
  }
1451
2077
  }, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
1452
- const columnSizeVars = useMemo(() => {
2078
+ const columnSizeVars = useMemo4(() => {
1453
2079
  const headers = table.getFlatHeaders();
1454
2080
  const colSizes = {};
1455
2081
  for (let i = 0; i < headers.length; i++) {
@@ -1459,8 +2085,8 @@ var Table = ({
1459
2085
  }
1460
2086
  return colSizes;
1461
2087
  }, [table.getState().columnSizingInfo, table.getState().columnSizing]);
1462
- return /* @__PURE__ */ jsxs7("div", { ref, className: clsx10("flex-col-4", className), children: [
1463
- /* @__PURE__ */ jsx12(
2088
+ return /* @__PURE__ */ jsxs7("div", { ref, className: clsx9("flex-col-4", className), children: [
2089
+ /* @__PURE__ */ jsx15(
1464
2090
  Scrollbars,
1465
2091
  {
1466
2092
  autoHeight: true,
@@ -1470,13 +2096,13 @@ var Table = ({
1470
2096
  "table",
1471
2097
  {
1472
2098
  ref: tableRef,
1473
- className: clsx10(tableClassName),
2099
+ className: clsx9(tableClassName),
1474
2100
  style: {
1475
2101
  ...columnSizeVars,
1476
2102
  width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
1477
2103
  },
1478
2104
  children: [
1479
- 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(
1480
2106
  "col",
1481
2107
  {
1482
2108
  style: {
@@ -1487,22 +2113,22 @@ var Table = ({
1487
2113
  },
1488
2114
  header.id
1489
2115
  )) }, headerGroup.id)),
1490
- /* @__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) => {
1491
2117
  return /* @__PURE__ */ jsxs7(
1492
2118
  "th",
1493
2119
  {
1494
2120
  colSpan: header.colSpan,
1495
- className: clsx10("relative group", header.column.columnDef.meta?.className),
2121
+ className: clsx9("relative group", header.column.columnDef.meta?.className),
1496
2122
  children: [
1497
- /* @__PURE__ */ jsx12("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs7("div", { className: "flex-row-1 items-center", children: [
1498
- 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(
1499
2125
  TableSortButton,
1500
2126
  {
1501
2127
  sortDirection: header.column.getIsSorted(),
1502
2128
  onClick: () => header.column.toggleSorting()
1503
2129
  }
1504
2130
  ),
1505
- header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx12(
2131
+ header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx15(
1506
2132
  TableFilterButton,
1507
2133
  {
1508
2134
  column: header.column,
@@ -1514,7 +2140,7 @@ var Table = ({
1514
2140
  header.getContext()
1515
2141
  )
1516
2142
  ] }) }),
1517
- header.column.getCanResize() && /* @__PURE__ */ jsx12(
2143
+ header.column.getCanResize() && /* @__PURE__ */ jsx15(
1518
2144
  "div",
1519
2145
  {
1520
2146
  onMouseDown: header.getResizeHandler(),
@@ -1535,16 +2161,16 @@ var Table = ({
1535
2161
  }) }, headerGroup.id)) }),
1536
2162
  /* @__PURE__ */ jsxs7("tbody", { children: [
1537
2163
  table.getRowModel().rows.map((row) => {
1538
- return /* @__PURE__ */ jsx12("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
1539
- 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(
1540
2166
  cell.column.columnDef.cell,
1541
2167
  cell.getContext()
1542
2168
  ) }, cell.id);
1543
2169
  }) }, row.id);
1544
2170
  }),
1545
2171
  range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
1546
- return /* @__PURE__ */ jsx12("tr", { children: columns.map((column) => {
1547
- 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);
1548
2174
  }) }, "filler-row-" + index);
1549
2175
  })
1550
2176
  ] })
@@ -1553,7 +2179,7 @@ var Table = ({
1553
2179
  )
1554
2180
  }
1555
2181
  ),
1556
- /* @__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(
1557
2183
  Pagination,
1558
2184
  {
1559
2185
  pageIndex: table.getState().pagination.pageIndex,
@@ -1564,11 +2190,11 @@ var Table = ({
1564
2190
  ] });
1565
2191
  };
1566
2192
  var TableUncontrolled = ({ data, ...props }) => {
1567
- const [usedDate, setUsedData] = useState10(data);
1568
- useEffect11(() => {
2193
+ const [usedDate, setUsedData] = useState14(data);
2194
+ useEffect15(() => {
1569
2195
  setUsedData(data);
1570
2196
  }, [data]);
1571
- return /* @__PURE__ */ jsx12(
2197
+ return /* @__PURE__ */ jsx15(
1572
2198
  Table,
1573
2199
  {
1574
2200
  ...props,
@@ -1587,31 +2213,30 @@ var TableWithSelection = ({
1587
2213
  meta,
1588
2214
  ...props
1589
2215
  }) => {
1590
- const columnsWithSelection = useMemo(() => {
2216
+ const columnsWithSelection = useMemo4(() => {
1591
2217
  return [
1592
2218
  {
1593
2219
  id: selectionRowId,
1594
2220
  header: ({ table }) => {
1595
- return /* @__PURE__ */ jsx12(
1596
- Checkbox,
2221
+ return /* @__PURE__ */ jsx15(
2222
+ Checkbox2,
1597
2223
  {
1598
- checked: table.getIsSomeRowsSelected() ? "indeterminate" : table.getIsAllRowsSelected(),
1599
- onChangeTristate: (value) => {
2224
+ checked: table.getIsAllRowsSelected(),
2225
+ indeterminate: table.getIsSomeRowsSelected(),
2226
+ onChange: (value) => {
1600
2227
  const newValue = !!value;
1601
2228
  table.toggleAllRowsSelected(newValue);
1602
- },
1603
- containerClassName: "max-w-6"
2229
+ }
1604
2230
  }
1605
2231
  );
1606
2232
  },
1607
2233
  cell: ({ row }) => {
1608
- return /* @__PURE__ */ jsx12(
1609
- Checkbox,
2234
+ return /* @__PURE__ */ jsx15(
2235
+ Checkbox2,
1610
2236
  {
1611
2237
  disabled: !row.getCanSelect(),
1612
2238
  checked: row.getIsSelected(),
1613
- onChange: row.getToggleSelectedHandler(),
1614
- containerClassName: "max-w-6"
2239
+ onChange: row.getToggleSelectedHandler()
1615
2240
  }
1616
2241
  );
1617
2242
  },
@@ -1624,15 +2249,15 @@ var TableWithSelection = ({
1624
2249
  ...columns
1625
2250
  ];
1626
2251
  }, [columns, selectionRowId]);
1627
- return /* @__PURE__ */ jsx12(
2252
+ return /* @__PURE__ */ jsx15(
1628
2253
  Table,
1629
2254
  {
1630
2255
  columns: columnsWithSelection,
1631
2256
  fillerRow: (columnId, table) => {
1632
2257
  if (columnId === selectionRowId) {
1633
- 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" });
1634
2259
  }
1635
- return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx12(FillerRowElement, {});
2260
+ return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx15(FillerRowElement, {});
1636
2261
  },
1637
2262
  state: {
1638
2263
  rowSelection,
@@ -1646,7 +2271,7 @@ var TableWithSelection = ({
1646
2271
  },
1647
2272
  meta: {
1648
2273
  ...meta,
1649
- bodyRowClassName: clsx10(
2274
+ bodyRowClassName: clsx9(
1650
2275
  { "cursor-pointer": !disableClickRowClickSelection },
1651
2276
  meta?.bodyRowClassName
1652
2277
  )