@povio/ui 5.0.0-rc.8 → 6.0.0-rc.1

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 (554) hide show
  1. package/MIGRATION.md +645 -0
  2. package/README.md +247 -21
  3. package/dist/{Accordion-BzwO4_ml.js → Accordion-DQRdeDs1.js} +5 -5
  4. package/dist/{Alert-DfiJbKH0.d.ts → Alert-Cee_nKWj.d.ts} +3 -3
  5. package/dist/{AlertDialog-OWTbR4km.d.ts → AlertDialog-uNDUIyng.d.ts} +3 -3
  6. package/dist/Autocomplete-CWU9Ev3J.js +142 -0
  7. package/dist/Autocomplete-D_4gEL7D.d.ts +23 -0
  8. package/dist/Autocomplete.bound-CqhZtdd8.d.ts +9 -0
  9. package/dist/Autocomplete.bound-D0pgmsHB.js +28 -0
  10. package/dist/{Badge-CBNpj823.d.ts → Badge-C4HI9XX4.d.ts} +2 -2
  11. package/dist/{BadgeButton-Ccgt3oGO.d.ts → BadgeButton-h3MeQYcp.d.ts} +2 -2
  12. package/dist/{BottomSheet-DbQuzfAB.d.ts → BottomSheet-BQXSdxoX.d.ts} +1 -1
  13. package/dist/{BottomSheet-BXLE3161.js → BottomSheet-z5brMtDt.js} +6 -80
  14. package/dist/{BottomSheet.lazy-D9LCEo7s.d.ts → BottomSheet.lazy-BzvLg8Ea.d.ts} +1 -1
  15. package/dist/{Breadcrumbs-FF8hMfXd.js → Breadcrumbs-AbUBqBTq.js} +9 -9
  16. package/dist/{Breadcrumbs-CUV6CU8Q.d.ts → Breadcrumbs-B9O0_VSN.d.ts} +1 -1
  17. package/dist/{Button-D6KlWSFL.js → Button-C1YB5dOw.js} +3 -3
  18. package/dist/Button-DER_6cxv.js +16 -0
  19. package/dist/Button-f7FPTaiN.d.ts +13 -0
  20. package/dist/ButtonBase-CYTFS-xK.d.ts +32 -0
  21. package/dist/{Button-BPTvffuk.js → ButtonBase-CeFSNcVs.js} +9 -9
  22. package/dist/{Calendar-BxtOuqIM.js → Calendar-DRQ536wk.js} +20 -16
  23. package/dist/{Checkbox-DYxXYfKL.js → Checkbox-BI3DQPLa.js} +19 -37
  24. package/dist/{Checkbox-DVTWaMKa.d.ts → Checkbox-CCvC7OVT.d.ts} +9 -8
  25. package/dist/Checkbox.bound-CMZnF2_d.js +33 -0
  26. package/dist/Checkbox.bound-DBt33Inx.d.ts +9 -0
  27. package/dist/{CheckboxCheckmark-D_uc9pon.js → CheckboxCheckmark-BzT6MwH5.js} +9 -6
  28. package/dist/CheckboxGroup-DQw4hsFa.js +139 -0
  29. package/dist/CheckboxGroup-MJ6crCZk.d.ts +30 -0
  30. package/dist/CheckboxGroup.bound-CTCdezUN.js +32 -0
  31. package/dist/CheckboxGroup.bound-j2Sc8QtU.d.ts +9 -0
  32. package/dist/ComboBox-DFlz6HJ8.js +212 -0
  33. package/dist/{DatePicker-wulRNGyL.js → DatePicker-CSm9c37c.js} +38 -48
  34. package/dist/{DatePicker-8xSs_jNd.d.ts → DatePicker-umTISfvn.d.ts} +21 -10
  35. package/dist/DatePicker.bound-KLyoWNcX.d.ts +9 -0
  36. package/dist/DatePicker.bound-Yqckg7Mk.js +36 -0
  37. package/dist/{DatePickerInput-BB_vPlKu.js → DatePickerInput-Cs9RwZfy.js} +41 -29
  38. package/dist/{DatePickerInput-D81ZJ3fT.d.ts → DatePickerInput-DwHQvLzi.d.ts} +3 -3
  39. package/dist/{DateRangePicker-Bfq-yDm7.d.ts → DateRangePicker-hV_U1IK0.d.ts} +30 -10
  40. package/dist/{DateRangePicker-B0tMVREG.js → DateRangePicker-s_4n-F_P.js} +75 -64
  41. package/dist/DateRangePicker.bound-C1klxYW0.js +35 -0
  42. package/dist/DateRangePicker.bound-D-GPENNe.d.ts +9 -0
  43. package/dist/{DateTimePicker-WGMr0bEH.js → DateTimePicker-411pU7VF.js} +38 -42
  44. package/dist/{DateTimePicker-D4lHyf6P.d.ts → DateTimePicker-wgV0SUeZ.d.ts} +21 -11
  45. package/dist/DateTimePicker.bound-BDyUzidV.js +32 -0
  46. package/dist/DateTimePicker.bound-cF2X_ncj.d.ts +9 -0
  47. package/dist/{Dialog-9manOgMA.js → Dialog-DSl1Fkqi.js} +10 -7
  48. package/dist/Dialog-V-2cgGk1.d.ts +21 -0
  49. package/dist/{Dialog-CKLkS00H.js → Dialog-lFYX-7Ax.js} +22 -27
  50. package/dist/DropdownMenu-Bl_C5W_E.d.ts +25 -0
  51. package/dist/{DropdownMenu-5jmtgLXd.js → DropdownMenu-DH7E2aXb.js} +6 -6
  52. package/dist/{DropdownMenuDesktop-Cl9gZVq0.js → DropdownMenuDesktop-nMoCa6N5.js} +3 -3
  53. package/dist/{FileInput-DP105Iy9.js → FileInput-CqRrQRM-.js} +25 -39
  54. package/dist/{FileInput-C4CE5kuP.d.ts → FileInput-Q72yXorH.d.ts} +24 -20
  55. package/dist/FileInput.bound-BZ7-g-dq.js +30 -0
  56. package/dist/FileInput.bound-CG2G5E2K.d.ts +8 -0
  57. package/dist/{FileTrigger-Cthk5_Wp.js → FileTrigger-DBX1Io6E.js} +36 -7
  58. package/dist/FileUpload-B4ibHWQn.d.ts +11 -0
  59. package/dist/{FileUpload-CgNDIvzg.js → FileUpload-CG60c6wM.js} +251 -140
  60. package/dist/FileUpload.bound-C-Zy1n5Y.d.ts +16 -0
  61. package/dist/FileUpload.bound-DQ6uuH2W.js +30 -0
  62. package/dist/{FileUploadContainer-042ztsaL.d.ts → FileUploadContainer-CtUhDntB.d.ts} +1 -1
  63. package/dist/{Form-DlQcyN1f.js → Form-CqF1SaVw.js} +2 -2
  64. package/dist/{FormField-Byiehm9y.d.ts → FormField-BIRMlgu4.d.ts} +4 -2
  65. package/dist/{FormField-AY25LzbW.js → FormField-D7KKJ6kG.js} +12 -10
  66. package/dist/{FormFieldError-BVAO5p7H.js → FormFieldError-Bqjg9cMb.js} +1 -1
  67. package/dist/FormFieldHeaderTooltip-k8Snf_oM.js +47 -0
  68. package/dist/{Heading-nI1_VOaE.js → Heading-D4XFYv__.js} +2 -2
  69. package/dist/IconButton-BM2DUNtN.d.ts +25 -0
  70. package/dist/{InlineTooltipWrapper-BpApaGXV.js → InlineTooltipWrapper-DBuQX2yo.js} +1 -1
  71. package/dist/{Input-BsbLZDtC.js → Input-BG0Xjw5X.js} +2 -2
  72. package/dist/{Input-DOanwj3l.d.ts → Input-BX3sZBEp.d.ts} +13 -9
  73. package/dist/Input-CG4Irgae.js +229 -0
  74. package/dist/Input.bound-BE-espm0.d.ts +9 -0
  75. package/dist/Input.bound-jZx8gJro.js +31 -0
  76. package/dist/{InputContent-CXuP1ghQ.d.ts → InputContent-DDFr0kml.d.ts} +4 -4
  77. package/dist/{useFieldAccessibility-CcBTgGfm.js → InputContent-KhD4_YvO.js} +12 -25
  78. package/dist/{Label-B2-B-uFY.js → Label-BGvF9vWx.js} +2 -2
  79. package/dist/{Link-Ow9H7kNv.d.ts → Link-Bw2m9W4B.d.ts} +3 -3
  80. package/dist/{Link-FupWOW1f.js → Link-Chux-Clm.js} +2 -2
  81. package/dist/{ListBox-CL8Ar4Q_.js → ListBox-CoUk0kkt.js} +10 -11
  82. package/dist/{MenuItem-DHyqOqln.d.ts → MenuItem-DPZzOqp2.d.ts} +1 -1
  83. package/dist/{Modal-w60dVQcb.js → Modal-B4p1zFqi.js} +58 -20
  84. package/dist/NumberField-CxwTlqud.js +225 -0
  85. package/dist/{NumberField-Cb9Gf6QJ.d.ts → NumberField-qjvHhCfN.d.ts} +13 -9
  86. package/dist/NumberField.bound-DXPGF5YK.d.ts +9 -0
  87. package/dist/NumberField.bound-zySl-v_q.js +32 -0
  88. package/dist/{NumberFormatter-CLDS_LRZ.js → NumberFormatter-DYarfm5F.js} +2 -36
  89. package/dist/{NumberRangeInput-B_sMIpP1.js → NumberRangeInput-BrW03wC6.js} +15 -43
  90. package/dist/{NumberRangeInput-BfbJQqzn.d.ts → NumberRangeInput-CS4Kn427.d.ts} +13 -8
  91. package/dist/NumberRangeInput.bound-C8I7m1cW.d.ts +9 -0
  92. package/dist/NumberRangeInput.bound-CKywKEKI.js +32 -0
  93. package/dist/{OverlayArrow-D8z7cCsw.js → OverlayArrow-DF0jMwul.js} +2 -2
  94. package/dist/{Pagination-CwQu5Py8.d.ts → Pagination-DkpAg2x6.d.ts} +1 -1
  95. package/dist/{PaginationList-DMRUGtf8.d.ts → PaginationList-DNmZRcS6.d.ts} +1 -1
  96. package/dist/{PaginationList-DptMNpNs.js → PaginationList-PjOxNQwB.js} +93 -94
  97. package/dist/PasswordInput-BHPFkVbM.d.ts +11 -0
  98. package/dist/PasswordInput.bound-CrXKvfil.js +23 -0
  99. package/dist/{PasswordInput-CLwFUgl0.d.ts → PasswordInput.bound-DC57m4NT.d.ts} +5 -6
  100. package/dist/{Popover-BTHPteIh.d.ts → Popover-pjd0Hu61.d.ts} +2 -2
  101. package/dist/{Progress-CjWOR38H.d.ts → Progress-1WGRZE8l.d.ts} +3 -3
  102. package/dist/{Progress-Du30L4_s.js → Progress-De76pCfX.js} +1 -1
  103. package/dist/{RadioGroup-CUGNSJql.js → RadioGroup-BPSvcre6.js} +12 -37
  104. package/dist/RadioGroup-DEwQ6B1F.d.ts +26 -0
  105. package/dist/RadioGroup.bound-CN4K9dV2.js +32 -0
  106. package/dist/RadioGroup.bound-Dj6CEG6M.d.ts +9 -0
  107. package/dist/{RichTextEditor-VDOpj7sk.js → RichTextEditor-BYIQW8QA.js} +147 -78
  108. package/dist/RichTextEditor-hJtuB7Y6.d.ts +28 -0
  109. package/dist/{staticSelect.utils-CzlnLPPd.js → Select-Br_3eecr.js} +194 -235
  110. package/dist/{SelectBase-Omiq2D3M.d.ts → Select-DHYddedn.d.ts} +32 -11
  111. package/dist/Select.bound-CJ-tCsmX.d.ts +17 -0
  112. package/dist/Select.bound-CgLKMzLn.js +34 -0
  113. package/dist/{SelectionIndicator-JblvLKCu.js → SelectionIndicator-B7C5Y0JM.js} +1 -1
  114. package/dist/{SharedElementTransition-Da1c_cOO.js → SharedElementTransition-DJ9CCbEa.js} +1 -1
  115. package/dist/{Slider-EYlGCLWe.d.ts → Slider-CcoNTFVN.d.ts} +9 -8
  116. package/dist/{Slider-Clc1szFY.js → Slider-CqB2TPTR.js} +12 -35
  117. package/dist/Slider.bound-8B5qzQ-8.d.ts +9 -0
  118. package/dist/Slider.bound-Bp7Zrs9_.js +31 -0
  119. package/dist/{Spinner-DbXeDOa2.d.ts → Spinner-B-crRcdG.d.ts} +2 -2
  120. package/dist/{SplitButton-D9ngY1rJ.d.ts → SplitButton-BzhbtpFA.d.ts} +3 -3
  121. package/dist/{Stepper-Cp5vbL5g.js → Stepper-CMw6QnCu.js} +2 -2
  122. package/dist/{Stepper-TATlHZhQ.d.ts → Stepper-LORgYAJr.d.ts} +8 -8
  123. package/dist/Switch-CSitpm4o.d.ts +24 -0
  124. package/dist/{Switch-CimmMqEk.js → Switch-R0kAicgM.js} +7 -32
  125. package/dist/Switch.bound-DVjqsum1.d.ts +9 -0
  126. package/dist/Switch.bound-Dk-BmxJd.js +33 -0
  127. package/dist/{Tag-AHfV_XSf.d.ts → Tag-CoqCTZRm.d.ts} +6 -6
  128. package/dist/{Text-D2MPZ3sY.js → Text-D72yc4S6.js} +1 -1
  129. package/dist/{TextArea-B3teIhsJ.js → TextArea-DCnqXuHC.js} +29 -30
  130. package/dist/{TextArea-l_keyLK7.d.ts → TextArea-e8sQm205.d.ts} +11 -9
  131. package/dist/TextArea.bound-BJZ9m_FE.js +28 -0
  132. package/dist/TextArea.bound-DEZuRYm_.d.ts +9 -0
  133. package/dist/{TimePicker-CU_yL2sY.js → TimePicker-BwF-Crbg.js} +54 -46
  134. package/dist/TimePicker-Zi7B6VTr.d.ts +45 -0
  135. package/dist/TimePicker.bound-B-BVLNbk.js +32 -0
  136. package/dist/TimePicker.bound-Bxtb6uJL.d.ts +9 -0
  137. package/dist/{Toast-ruXqONDA.d.ts → Toast-Dl6KMa58.d.ts} +1 -1
  138. package/dist/{ToastContainer-qgpzMFD4.js → ToastContainer-BDvta6st.js} +3 -3
  139. package/dist/ToggleButton-Cce9bnBw.d.ts +17 -0
  140. package/dist/{ToggleButton-BW1ensey.js → ToggleButton-DUQ8nwKY.js} +5 -5
  141. package/dist/{toggleGroup.types-Bp43zbSQ.d.ts → ToggleGroup-BJ8cqXaO.d.ts} +14 -13
  142. package/dist/{ToggleGroup-BULVwErp.js → ToggleGroup-s5sDSB6l.js} +132 -158
  143. package/dist/ToggleGroup.bound-Cv09n91n.d.ts +9 -0
  144. package/dist/ToggleGroup.bound-DEc7rdNF.js +67 -0
  145. package/dist/Tooltip-BiS7isYB.d.ts +16 -0
  146. package/dist/{Tooltip-CpG1nz7Y.js → Tooltip-CMigoyri.js} +42 -7
  147. package/dist/{TooltipWrapper-3jyN0Wss.js → TooltipWrapper-D7HUZLsP.js} +6 -6
  148. package/dist/{Typography-XljT9s02.d.ts → Typography-D2FfZr7a.d.ts} +1 -1
  149. package/dist/{accordion.cva-CL1bVscW.js → accordion.cva-CeBWV9EO.js} +6 -6
  150. package/dist/{badgeButton.cva-B2bgCQP6.d.ts → badgeButton.cva-B8EQLwPv.d.ts} +3 -3
  151. package/dist/{badgeButton.cva-CvN4CTx5.js → badgeButton.cva-BPyVejxO.js} +66 -66
  152. package/dist/{breadcrumbs.cva-7zzdDhVR.js → breadcrumbs.cva-DPwJJK_D.js} +4 -4
  153. package/dist/{button.cva-C7kEhgoA.d.ts → button.cva-CBckM91c.d.ts} +3 -3
  154. package/dist/{button.cva-rv5Uq4aW.js → button.cva-vO0fPUTn.js} +25 -25
  155. package/dist/{buttonContent.cva-DPIlROA9.d.ts → buttonContent.cva-DG-4lRz4.d.ts} +2 -2
  156. package/dist/{checkbox.cva-t1Ox50hy.d.ts → checkbox.cva-CJy87xUo.d.ts} +5 -5
  157. package/dist/{checkbox.cva-IfOByVLA.js → checkbox.cva-D-D9Qgaf.js} +3 -3
  158. package/dist/components/accordion.js +1 -1
  159. package/dist/components/alert-dialog.d.ts +1 -1
  160. package/dist/components/alert-dialog.js +93 -86
  161. package/dist/components/alert.d.ts +1 -1
  162. package/dist/components/alert.js +1 -1
  163. package/dist/components/autocomplete.d.ts +2 -2
  164. package/dist/components/autocomplete.js +1 -134
  165. package/dist/components/badge-button.d.ts +1 -1
  166. package/dist/components/badge-button.js +3 -3
  167. package/dist/components/badge.d.ts +1 -1
  168. package/dist/components/badge.js +4 -4
  169. package/dist/components/bottom-sheet-header.d.ts +16 -0
  170. package/dist/components/bottom-sheet-header.js +79 -0
  171. package/dist/components/bottom-sheet.d.ts +2 -2
  172. package/dist/components/bottom-sheet.js +2 -2
  173. package/dist/components/breadcrumb/react-aria.js +1 -1
  174. package/dist/components/breadcrumbs.d.ts +1 -1
  175. package/dist/components/breadcrumbs.js +1 -1
  176. package/dist/components/button-group.d.ts +12 -0
  177. package/dist/components/button-group.js +46 -0
  178. package/dist/components/button.d.ts +2 -2
  179. package/dist/components/button.js +1 -1
  180. package/dist/components/checkbox-group.d.ts +2 -2
  181. package/dist/components/checkbox-group.js +1 -163
  182. package/dist/components/checkbox.d.ts +2 -2
  183. package/dist/components/checkbox.js +2 -2
  184. package/dist/components/combo-box/react-aria.js +1 -1
  185. package/dist/components/date-picker/react-aria.js +1 -1
  186. package/dist/components/date-picker.d.ts +2 -2
  187. package/dist/components/date-picker.js +1 -1
  188. package/dist/components/date-range-picker/react-aria.js +1 -1
  189. package/dist/components/date-range-picker.d.ts +2 -2
  190. package/dist/components/date-range-picker.js +1 -1
  191. package/dist/components/date-time-picker.d.ts +2 -2
  192. package/dist/components/date-time-picker.js +1 -1
  193. package/dist/components/dialog-trigger/react-aria.js +1 -1
  194. package/dist/components/dialog.d.ts +1 -1
  195. package/dist/components/dialog.js +1 -1
  196. package/dist/components/drawer.js +3 -3
  197. package/dist/components/dropdown-menu.d.ts +2 -2
  198. package/dist/components/dropdown-menu.js +2 -2
  199. package/dist/components/file-input.d.ts +2 -2
  200. package/dist/components/file-input.js +1 -1
  201. package/dist/components/file-upload-container.d.ts +2 -2
  202. package/dist/components/file-upload-container.js +1 -1
  203. package/dist/components/file-upload.d.ts +3 -3
  204. package/dist/components/file-upload.js +1 -1
  205. package/dist/components/form-field.d.ts +1 -1
  206. package/dist/components/form-field.js +1 -1
  207. package/dist/components/icon-button.d.ts +1 -1
  208. package/dist/components/icon-button.js +17 -15
  209. package/dist/components/icon-slot.d.ts +1 -1
  210. package/dist/components/input-frame.d.ts +93 -0
  211. package/dist/{useStaticInputHandoff-kkQrc6DA.js → components/input-frame.js} +42 -91
  212. package/dist/components/input.d.ts +2 -2
  213. package/dist/components/input.js +1 -241
  214. package/dist/components/link.d.ts +1 -1
  215. package/dist/components/link.js +2 -2
  216. package/dist/components/menu-trigger/react-aria.js +1 -1
  217. package/dist/components/modal/react-aria.js +1 -1
  218. package/dist/components/modal-overlay/react-aria.js +1 -1
  219. package/dist/components/number-field.d.ts +2 -2
  220. package/dist/components/number-field.js +1 -245
  221. package/dist/components/number-range-input.d.ts +2 -2
  222. package/dist/components/number-range-input.js +1 -1
  223. package/dist/components/pagination-list.d.ts +1 -1
  224. package/dist/components/pagination-list.js +1 -1
  225. package/dist/components/pagination.d.ts +1 -1
  226. package/dist/components/pagination.js +10 -6
  227. package/dist/components/password-input.d.ts +2 -2
  228. package/dist/components/password-input.js +22 -1
  229. package/dist/components/popover/react-aria.js +1 -1
  230. package/dist/components/popover.d.ts +1 -1
  231. package/dist/components/popover.js +38 -30
  232. package/dist/components/progress.d.ts +1 -1
  233. package/dist/components/progress.js +1 -1
  234. package/dist/components/radio-group.d.ts +2 -2
  235. package/dist/components/radio-group.js +1 -1
  236. package/dist/components/select/react-aria.js +1 -1
  237. package/dist/components/select.d.ts +2 -3
  238. package/dist/components/select.js +1 -1
  239. package/dist/components/slider.d.ts +2 -2
  240. package/dist/components/slider.js +1 -1
  241. package/dist/components/spinner.d.ts +1 -1
  242. package/dist/components/split-button.d.ts +1 -1
  243. package/dist/components/split-button.js +2 -2
  244. package/dist/components/stepper.d.ts +1 -1
  245. package/dist/components/stepper.js +1 -1
  246. package/dist/components/style-definitions.d.ts +3 -0
  247. package/dist/components/style-definitions.js +121 -0
  248. package/dist/components/submenu-trigger/react-aria.js +1 -1
  249. package/dist/components/switch.d.ts +2 -2
  250. package/dist/components/switch.js +1 -1
  251. package/dist/components/tag.d.ts +1 -1
  252. package/dist/components/tag.js +4 -4
  253. package/dist/components/text-area.d.ts +2 -2
  254. package/dist/components/text-area.js +1 -1
  255. package/dist/components/time-picker.d.ts +2 -2
  256. package/dist/components/time-picker.js +1 -1
  257. package/dist/components/toast.d.ts +2 -2
  258. package/dist/components/toast.js +2 -2
  259. package/dist/components/toggle-button.d.ts +1 -1
  260. package/dist/components/toggle-button.js +17 -30
  261. package/dist/components/toggle-group.d.ts +2 -3
  262. package/dist/components/toggle-group.js +1 -1
  263. package/dist/components/tooltip-ellipsis.js +1 -1
  264. package/dist/components/tooltip.d.ts +1 -1
  265. package/dist/components/tooltip.js +1 -1
  266. package/dist/components/typography.d.ts +2 -2
  267. package/dist/components/use-toast.d.ts +1 -1
  268. package/dist/components/use-toast.js +2 -2
  269. package/dist/config/component-configuration.d.ts +30 -0
  270. package/dist/config/component-configuration.js +69 -0
  271. package/dist/config/confirmation.d.ts +1 -1
  272. package/dist/config/confirmation.js +1 -1
  273. package/dist/config/link-context.d.ts +2 -2
  274. package/dist/config/resources.d.ts +1 -1
  275. package/dist/config/resources.js +1 -1
  276. package/dist/config/ui-config.d.ts +2 -2
  277. package/dist/config/ui-config.js +1 -1
  278. package/dist/config/ui-overrides.d.ts +1 -1
  279. package/dist/{confirmation.context-BOeEVczb.d.ts → confirmation.context-B2z9A1v3.d.ts} +1 -1
  280. package/dist/{confirmation.context-BuzgCfYl.js → confirmation.context-BSn1s-ip.js} +1 -1
  281. package/dist/{datePickerValue.utils-CIFHjKwv.js → datePickerValue.utils-OAQBDk1R.js} +18 -10
  282. package/dist/{dialog.cva-COhDZaVl.js → dialog.cva-sioU_5R7.js} +1 -1
  283. package/dist/{dist-CAdwxJbe.js → dist-CAFUM34b.js} +53 -1
  284. package/dist/{dom.utils-D1AopHx9.js → dom.utils-BbfrA6RP.js} +1 -1
  285. package/dist/{dropdownMenu.cva-DvEmX0bs.js → dropdownMenu.cva-Bi3a21lO.js} +4 -4
  286. package/dist/{PasswordInput-DYwUZ4-k.js → eye-BA4nRlMX.js} +1 -22
  287. package/dist/{fileUpload.types-n5FxK_F-.d.ts → fileUpload.types-BT8P1o7a.d.ts} +17 -17
  288. package/dist/form.binding-B-2id68q.js +49 -0
  289. package/dist/form.types-C8P4sznq.d.ts +22 -0
  290. package/dist/{formFieldError.cva-CsXaQRHX.js → formFieldError.cva-CTl0VeyG.js} +1 -1
  291. package/dist/{formFieldHelper.cva-B8F9LmsE.js → formFieldHelper.cva-CxAmrG2H.js} +9 -8
  292. package/dist/hooks/use-async-list.d.ts +2 -0
  293. package/dist/hooks/use-async-list.js +2 -0
  294. package/dist/hooks/use-filters.js +1 -1
  295. package/dist/{i18n-CX1vFM9r.d.ts → i18n-2z5on9No.d.ts} +18 -0
  296. package/dist/{i18n-CX2EjhJI.js → i18n-BjNKHh_D.js} +20 -2
  297. package/dist/{iconSlot.cva-CnpFzAOR.d.ts → iconSlot.cva-BA9NahZH.d.ts} +2 -1
  298. package/dist/icons.d.ts +1 -1
  299. package/dist/index.d.ts +95 -91
  300. package/dist/index.js +79 -82
  301. package/dist/{input.cva-BsHgYa-L.d.ts → input.cva-L7jKDv6q.d.ts} +3 -3
  302. package/dist/{input.cva-DJA8ovm_.js → input.cva-w7ZEVQAM.js} +60 -41
  303. package/dist/{intlStrings-chfsan9H.js → intlStrings-Cu1YN1tA.js} +35 -35
  304. package/dist/isEqual-LFw0W5rU.js +97 -0
  305. package/dist/{link.context-D5qyz9Rf.d.ts → link.context-C4fE_aMo.d.ts} +1 -1
  306. package/dist/{link.cva-DMTHZiJG.js → link.cva-D3XRgcAv.js} +1 -1
  307. package/dist/{numberStatic.utils-BX50PSee.js → numberStatic.utils-BIyZuILs.js} +5 -5
  308. package/dist/{progress.cva-WQB8BGbk.js → progress.cva-D7iiX6Lh.js} +2 -2
  309. package/dist/{radio.cva-DGbvTymp.js → radio.cva-Ctdop1xV.js} +1 -1
  310. package/dist/{radio.cva-DN9VQ3Kb.d.ts → radio.cva-DO3UEac-.d.ts} +3 -3
  311. package/dist/rich-text-editor.d.ts +2 -2
  312. package/dist/rich-text-editor.js +1 -1
  313. package/dist/{routing.utils-UTQonIhB.js → routing.utils-DfxEt0_Y.js} +5 -0
  314. package/dist/selectDesktop.cva-RzxvSBkd.js +14 -0
  315. package/dist/{selectDesktop.cva-CHAMxhfO.js → selectItem.cva-BWfEkNs_.js} +3 -36
  316. package/dist/{staticDateTimeSegments-sf_ND7zL.js → staticDateTimeSegments-Bt5wCZvg.js} +58 -54
  317. package/dist/{status.cva-6HxNR4EP.js → status.cva-BFGMKZO_.js} +14 -14
  318. package/dist/{stepper.cva-CZ0Kj-s7.js → stepper.cva-CpRi0fGb.js} +10 -10
  319. package/dist/{configuration.context-f_FSPWhQ.d.ts → style-definitions-_RXJdSk-.d.ts} +183 -86
  320. package/dist/styles/editor.css +1 -1
  321. package/dist/styles/input.d.ts +1 -1
  322. package/dist/{switch.cva-BX3HOxbL.js → switch.cva-BsJ4iAFl.js} +1 -1
  323. package/dist/{switch.cva-CWNzmdRc.d.ts → switch.cva-psw67dK9.d.ts} +3 -3
  324. package/dist/table.cva-CmfeWLyW.d.ts +84 -0
  325. package/dist/table.cva-DFQM8VbM.js +111 -0
  326. package/dist/{tag.cva-B3MudLeC.js → tag.cva-BCCH7ku3.js} +12 -12
  327. package/dist/tanstack/autocomplete.d.ts +3 -2
  328. package/dist/tanstack/autocomplete.js +1 -1
  329. package/dist/tanstack/checkbox-group.d.ts +3 -2
  330. package/dist/tanstack/checkbox-group.js +1 -1
  331. package/dist/tanstack/checkbox.d.ts +3 -2
  332. package/dist/tanstack/checkbox.js +2 -2
  333. package/dist/tanstack/date-picker.d.ts +3 -2
  334. package/dist/tanstack/date-picker.js +1 -1
  335. package/dist/tanstack/date-range-picker.d.ts +3 -2
  336. package/dist/tanstack/date-range-picker.js +1 -1
  337. package/dist/tanstack/date-time-picker.d.ts +3 -2
  338. package/dist/tanstack/date-time-picker.js +1 -1
  339. package/dist/tanstack/file-input.d.ts +3 -2
  340. package/dist/tanstack/file-input.js +1 -1
  341. package/dist/tanstack/file-upload.d.ts +4 -3
  342. package/dist/tanstack/file-upload.js +1 -1
  343. package/dist/tanstack/form.d.ts +3 -3
  344. package/dist/tanstack/form.js +3 -3
  345. package/dist/tanstack/input.d.ts +3 -2
  346. package/dist/tanstack/input.js +1 -1
  347. package/dist/tanstack/number-field.d.ts +3 -2
  348. package/dist/tanstack/number-field.js +1 -1
  349. package/dist/tanstack/number-range-input.d.ts +3 -2
  350. package/dist/tanstack/number-range-input.js +1 -1
  351. package/dist/tanstack/password-input.d.ts +1 -1
  352. package/dist/tanstack/password-input.js +1 -1
  353. package/dist/tanstack/radio-group.d.ts +3 -2
  354. package/dist/tanstack/radio-group.js +1 -1
  355. package/dist/tanstack/rich-text-editor.d.ts +9 -2
  356. package/dist/tanstack/rich-text-editor.js +27 -1
  357. package/dist/tanstack/select.d.ts +3 -2
  358. package/dist/tanstack/select.js +1 -1
  359. package/dist/tanstack/slider.d.ts +3 -2
  360. package/dist/tanstack/slider.js +1 -1
  361. package/dist/tanstack/switch.d.ts +3 -2
  362. package/dist/tanstack/switch.js +1 -1
  363. package/dist/tanstack/table.d.ts +3 -2
  364. package/dist/tanstack/table.js +2 -3
  365. package/dist/tanstack/text-area.d.ts +3 -2
  366. package/dist/tanstack/text-area.js +1 -1
  367. package/dist/tanstack/time-picker.d.ts +3 -2
  368. package/dist/tanstack/time-picker.js +1 -1
  369. package/dist/tanstack/toggle-group.d.ts +3 -3
  370. package/dist/tanstack/toggle-group.js +1 -1
  371. package/dist/tanstack-DQu9PNjn.d.ts +469 -0
  372. package/dist/tanstack.d.ts +79 -78
  373. package/dist/tanstack.js +79 -83
  374. package/dist/{toast.cva-By5lvAfr.d.ts → toast.cva-L0k_TBiW.d.ts} +7 -7
  375. package/dist/{toast.cva-C_L_RffH.js → toast.cva-aC4NMpLb.js} +14 -14
  376. package/dist/{toast.runtime-Zf-XyAC3.js → toast.runtime-DKOeUnk6.js} +1 -2
  377. package/dist/{toggleGroup.cva-MbpaEBg1.js → toggleGroup.cva-CEhjMT4j.js} +1 -1
  378. package/dist/{tooltip.cva-BIzlOXHH.js → tooltip.cva-ClcaR72U.js} +4 -4
  379. package/dist/tw-ui-plugin.js +5 -1
  380. package/dist/{typography.cva-D1JOEYl-.d.ts → typography.cva-GpC6QQNx.d.ts} +2 -2
  381. package/dist/{uiConfig.context-DeBX2beU.d.ts → uiConfig.context-CQU9Tzq_.d.ts} +12 -20
  382. package/dist/{uiConfig.context-BS3r_kTS.js → uiConfig.context-CT9EVqC5.js} +3 -109
  383. package/dist/{uiOverrides.context-DEp139He.d.ts → uiOverrides.context-Dmev7iRS.d.ts} +44 -6
  384. package/dist/useAsyncList-Cu-Y8If2.d.ts +9 -0
  385. package/dist/useAsyncList-yHz7twsj.js +445 -0
  386. package/dist/{useBreakpoint-DQoMN-BG.js → useBreakpoint-BzYqQEBO.js} +1 -1
  387. package/dist/{useControlledState-CzXkZCX8.js → useControlledState-CuU1VIh1.js} +2 -2
  388. package/dist/useFieldAccessibility-eZIMECmG.js +19 -0
  389. package/dist/{useFilters-XNH27Md2.js → useFilters-HIngImwn.js} +1 -1
  390. package/dist/{form.binding-DVJ5F0JE.d.ts → useForm-I6z23FXf.d.ts} +15 -15
  391. package/dist/{form.binding-CG1RPv6o.js → useForm-eW4KpH1u.js} +79 -42
  392. package/dist/useFormAutosave-BBLm3Ujo.d.ts +34 -0
  393. package/dist/useFormAutosave-XEQqk1lK.js +216 -0
  394. package/dist/useStaticInputHandoff-DyYxfwv6.js +77 -0
  395. package/dist/useTableColumnConfig-CUINwVTR.js +1348 -0
  396. package/dist/{useTableNav-Ckj5PBRk.d.ts → useTableNav-rU9WmCj6.d.ts} +34 -96
  397. package/dist/{useToast-yreVCUer.d.ts → useToast-DfQif03I.d.ts} +1 -1
  398. package/dist/{utils-Czcqspm7.js → utils-BkLF-JA3.js} +1 -1
  399. package/package.json +69 -227
  400. package/.rulesync/rules/ui-buttons-and-content.md +0 -56
  401. package/.rulesync/rules/ui-inputs-and-forms.md +0 -62
  402. package/.rulesync/rules/ui-overlays-navigation-and-styling.md +0 -49
  403. package/.rulesync/rules/ui-overview.md +0 -33
  404. package/dist/Autocomplete-BwNHp8fy.d.ts +0 -15
  405. package/dist/Button-D-4qb0IR.d.ts +0 -42
  406. package/dist/CheckboxGroup-DGF12cmB.d.ts +0 -28
  407. package/dist/ComponentGallery-Da70Y4_Q.js +0 -3513
  408. package/dist/Dialog-CW93T9X1.d.ts +0 -56
  409. package/dist/DropdownMenu-JNpYT4-3.d.ts +0 -62
  410. package/dist/FileUpload-CR7bZxV1.d.ts +0 -7
  411. package/dist/Form-DbEWnCKc.d.ts +0 -49
  412. package/dist/FormFieldHeaderTooltip-BV2Ju4oB.js +0 -17
  413. package/dist/IconButton-D4thBurp.d.ts +0 -16
  414. package/dist/InlineIconButton-BeJCjl-q.d.ts +0 -15
  415. package/dist/InputItem-ZeN-aIz8.js +0 -63
  416. package/dist/Inputs-BC5q5Cvj.js +0 -17
  417. package/dist/Inputs-O84btFJL.d.ts +0 -13
  418. package/dist/QuerySelect-BGxb6Y0K.d.ts +0 -24
  419. package/dist/RadioGroup-CZg2kIMk.d.ts +0 -24
  420. package/dist/RichTextEditor-YxuRUlI7.d.ts +0 -26
  421. package/dist/Select-B2pAfwRk.js +0 -154
  422. package/dist/Select-pHbyJdZJ.d.ts +0 -15
  423. package/dist/Switch-s_EPn0Jz.d.ts +0 -22
  424. package/dist/Table-CqepqSfe.js +0 -637
  425. package/dist/TextButton-XUhV_1s0.d.ts +0 -15
  426. package/dist/TimePicker-B1POvGWs.d.ts +0 -33
  427. package/dist/Toast-DPbnLlBi.js +0 -53
  428. package/dist/ToggleButton-7aP8Jb11.d.ts +0 -11
  429. package/dist/ToggleGroup-CRFDIPGZ.d.ts +0 -7
  430. package/dist/Tooltip-DHv6vAqW.d.ts +0 -57
  431. package/dist/autocomplete-DeERHN8W.d.ts +0 -16
  432. package/dist/checkbox-DxIPDTK5.d.ts +0 -9
  433. package/dist/checkbox-group-B3BOVshI.d.ts +0 -9
  434. package/dist/chevron-left-Dgo_b9wJ.js +0 -20
  435. package/dist/chevron-up-D_Gqpb5M.js +0 -20
  436. package/dist/components/inline-icon-button.d.ts +0 -2
  437. package/dist/components/inline-icon-button.js +0 -40
  438. package/dist/components/query-autocomplete.d.ts +0 -8
  439. package/dist/components/query-autocomplete.js +0 -134
  440. package/dist/components/query-select.d.ts +0 -2
  441. package/dist/components/query-select.js +0 -147
  442. package/dist/components/text-button.d.ts +0 -2
  443. package/dist/components/text-button.js +0 -35
  444. package/dist/config/app-canvas.d.ts +0 -79
  445. package/dist/config/app-canvas.js +0 -2253
  446. package/dist/config/ui-configurator-theme.d.ts +0 -2
  447. package/dist/config/ui-configurator-theme.js +0 -2
  448. package/dist/config/ui-configurator-vite.d.ts +0 -10
  449. package/dist/config/ui-configurator-vite.js +0 -174
  450. package/dist/config/ui-configurator.d.ts +0 -15
  451. package/dist/config/ui-configurator.js +0 -5384
  452. package/dist/date-picker-DnxDmlOW.d.ts +0 -9
  453. package/dist/date-range-picker-DHDOSvHN.d.ts +0 -9
  454. package/dist/date-time-picker-UkTa0OJ8.d.ts +0 -9
  455. package/dist/date.transforms-DLg-eFcE.js +0 -15
  456. package/dist/dynamicInputs-ByVMnx4Z.d.ts +0 -772
  457. package/dist/dynamicInputs-CRMWIpHA.js +0 -194
  458. package/dist/dynamicInputs-m_DQu5q0.js +0 -214
  459. package/dist/fieldAdapter-C4sDFC8f.d.ts +0 -9
  460. package/dist/fieldAdapter-DjYls12j.js +0 -63
  461. package/dist/file-input-DkbkdI7l.d.ts +0 -9
  462. package/dist/file-upload-CTsPhxJk.d.ts +0 -10
  463. package/dist/form.types-CecYaerF.d.ts +0 -13
  464. package/dist/form.types-ZNGbcqJS.d.ts +0 -13
  465. package/dist/grip-vertical-BVxcjdfr.js +0 -54
  466. package/dist/info-iUmX3uDk.js +0 -32
  467. package/dist/input-CdQNCPgH.d.ts +0 -8
  468. package/dist/inspection-model-LuI36xTg.js +0 -1339
  469. package/dist/number-field-CUDbenNV.d.ts +0 -8
  470. package/dist/number-range-input-DZGrcvjL.d.ts +0 -8
  471. package/dist/password-input-fYN20cQO.d.ts +0 -8
  472. package/dist/query-autocomplete-CfuQeiYG.d.ts +0 -14
  473. package/dist/query-select-CuT_sE6a.d.ts +0 -15
  474. package/dist/queryAutocomplete.types-tl3r6iaY.d.ts +0 -27
  475. package/dist/radio-group-B3ccPf0p.d.ts +0 -9
  476. package/dist/rhf/autocomplete.d.ts +0 -3
  477. package/dist/rhf/autocomplete.js +0 -8
  478. package/dist/rhf/checkbox-group.d.ts +0 -3
  479. package/dist/rhf/checkbox-group.js +0 -8
  480. package/dist/rhf/checkbox.d.ts +0 -3
  481. package/dist/rhf/checkbox.js +0 -8
  482. package/dist/rhf/date-picker.d.ts +0 -3
  483. package/dist/rhf/date-picker.js +0 -9
  484. package/dist/rhf/date-range-picker.d.ts +0 -3
  485. package/dist/rhf/date-range-picker.js +0 -9
  486. package/dist/rhf/date-time-picker.d.ts +0 -3
  487. package/dist/rhf/date-time-picker.js +0 -9
  488. package/dist/rhf/file-input.d.ts +0 -3
  489. package/dist/rhf/file-input.js +0 -6
  490. package/dist/rhf/file-upload.d.ts +0 -3
  491. package/dist/rhf/file-upload.js +0 -6
  492. package/dist/rhf/input.d.ts +0 -3
  493. package/dist/rhf/input.js +0 -6
  494. package/dist/rhf/inputs.d.ts +0 -4
  495. package/dist/rhf/inputs.js +0 -2
  496. package/dist/rhf/number-field.d.ts +0 -3
  497. package/dist/rhf/number-field.js +0 -6
  498. package/dist/rhf/number-range-input.d.ts +0 -3
  499. package/dist/rhf/number-range-input.js +0 -6
  500. package/dist/rhf/password-input.d.ts +0 -3
  501. package/dist/rhf/password-input.js +0 -6
  502. package/dist/rhf/query-autocomplete.d.ts +0 -2
  503. package/dist/rhf/query-autocomplete.js +0 -8
  504. package/dist/rhf/query-select.d.ts +0 -2
  505. package/dist/rhf/query-select.js +0 -8
  506. package/dist/rhf/radio-group.d.ts +0 -3
  507. package/dist/rhf/radio-group.js +0 -8
  508. package/dist/rhf/rich-text-editor.d.ts +0 -3
  509. package/dist/rhf/rich-text-editor.js +0 -6
  510. package/dist/rhf/select.d.ts +0 -3
  511. package/dist/rhf/select.js +0 -8
  512. package/dist/rhf/slider.d.ts +0 -3
  513. package/dist/rhf/slider.js +0 -6
  514. package/dist/rhf/switch.d.ts +0 -3
  515. package/dist/rhf/switch.js +0 -8
  516. package/dist/rhf/text-area.d.ts +0 -3
  517. package/dist/rhf/text-area.js +0 -6
  518. package/dist/rhf/time-picker.d.ts +0 -3
  519. package/dist/rhf/time-picker.js +0 -9
  520. package/dist/rhf/toggle-group.d.ts +0 -3
  521. package/dist/rhf/toggle-group.js +0 -6
  522. package/dist/rhf-t348TCCL.js +0 -256
  523. package/dist/rhf.d.ts +0 -106
  524. package/dist/rhf.js +0 -117
  525. package/dist/rich-text-editor-B-Onl7T8.d.ts +0 -8
  526. package/dist/select-B4a52eWW.d.ts +0 -16
  527. package/dist/slider-dNj9jruO.d.ts +0 -8
  528. package/dist/style-merge.util-zLimKwt6.d.ts +0 -40
  529. package/dist/styles/app-canvas.css +0 -733
  530. package/dist/styles/configurator.css +0 -3280
  531. package/dist/switch-C--iWnY8.d.ts +0 -9
  532. package/dist/table.cva-DlMT-zLD.js +0 -48
  533. package/dist/tanstack/inputs.d.ts +0 -5
  534. package/dist/tanstack/inputs.js +0 -3
  535. package/dist/tanstack/query-autocomplete.d.ts +0 -2
  536. package/dist/tanstack/query-autocomplete.js +0 -2
  537. package/dist/tanstack/query-select.d.ts +0 -2
  538. package/dist/tanstack/query-select.js +0 -2
  539. package/dist/text-area-DQAtpOQp.d.ts +0 -8
  540. package/dist/theme-model-DtYPxNvH.js +0 -406
  541. package/dist/theme-model-T1zIdBg8.d.ts +0 -12
  542. package/dist/time-picker-DoGfbil6.d.ts +0 -9
  543. package/dist/toggle-group-C1nMDOwz.d.ts +0 -9
  544. package/dist/underline-66hmELxa.js +0 -81
  545. package/dist/upload-CXU83BJ4.js +0 -30
  546. package/dist/useFormAutosave-BD_TFqDF.js +0 -198
  547. package/dist/useQueryAutocomplete-CraXvRm_.js +0 -152
  548. package/dist/useTableColumnConfig-aVUWC2Mp.js +0 -892
  549. package/dist/zod.utils-DrrPDT9v.js +0 -24
  550. package/rulesync.jsonc +0 -11
  551. package/scripts/generate-rules.mjs +0 -34
  552. package/src/configurator/README.md +0 -77
  553. package/dist/{import-BE0r63d8.js → import-D_3dPATF.js} +2 -2
  554. /package/dist/{queries.utils-CmbhAoHU.js → tanstack-CmbhAoHU.js} +0 -0
@@ -0,0 +1,1348 @@
1
+ import { t as logger } from "./logger-CqZjM-sn.js";
2
+ import { t as createLucideIcon } from "./createLucideIcon-LcezOE4z.js";
3
+ import { t as UIConfig } from "./uiConfig.context-CT9EVqC5.js";
4
+ import { t as ChevronDown } from "./chevron-down-B4Pr8bD3.js";
5
+ import { n as ChevronUp } from "./Tooltip-CMigoyri.js";
6
+ import { t as clsx } from "./clsx-CnD0nOiA.js";
7
+ import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
8
+ import { t as IconSlot } from "./IconSlot-DSK7qNxc.js";
9
+ import { t as Checkbox } from "./Checkbox-BI3DQPLa.js";
10
+ import { t as Typography } from "./Typography-LU4z2pR1.js";
11
+ import { t as Spinner } from "./Spinner-BeVTUzzx.js";
12
+ import { IconButton } from "./components/icon-button.js";
13
+ import "./i18n-BjNKHh_D.js";
14
+ import { t as useIntersectionObserver } from "./useIntersectionObserver-DYfHnGGU.js";
15
+ import { t as Dialog } from "./Dialog-DSl1Fkqi.js";
16
+ import { Pagination } from "./components/pagination.js";
17
+ import { a as tableHeadRowDefinition, c as theadDefinition, i as tableHeadDataDefinition, n as tableContainerDefinition, o as tableHeaderTextDefinition, r as tableDataDefinition, s as tableRowDefinition, t as tableCellTextDefinition } from "./table.cva-DFQM8VbM.js";
18
+ import { t as useTranslationMemo } from "./useTranslationMemo-CrZbeyBv.js";
19
+ import { t as UIRouter } from "./router.context-B4FvsTim.js";
20
+ import { t as RoutingUtils } from "./routing.utils-DfxEt0_Y.js";
21
+ import { Suspense, lazy, useCallback, useEffect, useMemo, useRef, useState } from "react";
22
+ import { c } from "react/compiler-runtime";
23
+ import { jsx, jsxs } from "react/jsx-runtime";
24
+ import { useTranslation } from "react-i18next";
25
+ import i18next from "i18next";
26
+ import { createPaginatedRowModel, createSortedRowModel, flexRender, stockFeatures, tableFeatures, useTable } from "@tanstack/react-table";
27
+ //#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/grip-vertical.mjs
28
+ /**
29
+ * @license lucide-react v1.43.0 - ISC
30
+ *
31
+ * This source code is licensed under the ISC license.
32
+ * See the LICENSE file in the root directory of this source tree.
33
+ */
34
+ const __iconData = {
35
+ name: "grip-vertical",
36
+ size: 24,
37
+ node: [
38
+ ["circle", {
39
+ cx: "9",
40
+ cy: "12",
41
+ r: "1",
42
+ key: "1vctgf"
43
+ }],
44
+ ["circle", {
45
+ cx: "9",
46
+ cy: "5",
47
+ r: "1",
48
+ key: "hp0tcf"
49
+ }],
50
+ ["circle", {
51
+ cx: "9",
52
+ cy: "19",
53
+ r: "1",
54
+ key: "fkjjf6"
55
+ }],
56
+ ["circle", {
57
+ cx: "15",
58
+ cy: "12",
59
+ r: "1",
60
+ key: "1tmaij"
61
+ }],
62
+ ["circle", {
63
+ cx: "15",
64
+ cy: "5",
65
+ r: "1",
66
+ key: "19l28e"
67
+ }],
68
+ ["circle", {
69
+ cx: "15",
70
+ cy: "19",
71
+ r: "1",
72
+ key: "f4zoj3"
73
+ }]
74
+ ]
75
+ };
76
+ __iconData.node;
77
+ const GripVertical = createLucideIcon(__iconData);
78
+ //#endregion
79
+ //#region src/components/table/CellText.tsx
80
+ const CellText = (props) => {
81
+ const uiConfig = UIConfig.useConfig();
82
+ const { size = uiConfig.tableCellText.size, children, style, className } = props;
83
+ const cellTextCva = UIOverrides.useCva("table.cellTextCva", tableCellTextDefinition);
84
+ return /* @__PURE__ */ jsx(Typography, {
85
+ className: cellTextCva({ className }),
86
+ as: "span",
87
+ size,
88
+ style,
89
+ "data-rac": true,
90
+ children
91
+ });
92
+ };
93
+ //#endregion
94
+ //#region src/components/table/HeaderText.tsx
95
+ const HeaderText = (props) => {
96
+ const uiConfig = UIConfig.useConfig();
97
+ const { size = uiConfig.tableHeaderText.size, children, style, className } = props;
98
+ const headerTextCva = UIOverrides.useCva("table.headerTextCva", tableHeaderTextDefinition);
99
+ return /* @__PURE__ */ jsx(Typography, {
100
+ className: headerTextCva({ className }),
101
+ as: "span",
102
+ size,
103
+ style,
104
+ children
105
+ });
106
+ };
107
+ //#endregion
108
+ //#region src/hooks/useTableNav.ts
109
+ const Selectors = {
110
+ Cell: "[role=\"cell\"],[role=\"gridcell\"],[role=\"columnheader\"],[role=\"rowheader\"],td,th",
111
+ Row: "[role=\"row\"],tr",
112
+ RowGroup: "[role=\"rowgroup\"],thead,tbody,tfoot",
113
+ /** Selector from here: https://github.com/Shopify/polaris/blob/main/polaris-react/src/utilities/focus.ts#L10 */
114
+ Focusable: "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not([aria-disabled=\"true\"]):not([tabindex=\"-1\"]):not(:disabled),*[tabindex]"
115
+ };
116
+ var DataGridNav = class {
117
+ constructor(config = {}) {
118
+ this.keys = [];
119
+ this.activeCell = null;
120
+ this.debugLog = (functionName, message) => {
121
+ if (this.debug) logger.info(`[${functionName}]: ${message}`);
122
+ };
123
+ const { selectors = {}, pageUpDown, debug = false } = config;
124
+ this.selectors = {
125
+ ...Selectors,
126
+ ...selectors
127
+ };
128
+ this.pageUpDown = pageUpDown;
129
+ this.keys = [];
130
+ this.debug = debug;
131
+ this.disabled = false;
132
+ }
133
+ /**
134
+ * Disables the keyboard listener in cases
135
+ * that elements inside the grid need to use
136
+ * arrows keys etc., like select dropdowns
137
+ */
138
+ disable() {
139
+ this.disabled = true;
140
+ }
141
+ /**
142
+ * Enables the keyboard listeners
143
+ */
144
+ enable() {
145
+ this.disabled = false;
146
+ }
147
+ isFocusable(el) {
148
+ return el instanceof HTMLElement || el instanceof SVGElement;
149
+ }
150
+ getActiveCell() {
151
+ return this.activeCell;
152
+ }
153
+ /** Used as a keyboard listener for key up */
154
+ tableKeyUp() {
155
+ this.keys = [];
156
+ }
157
+ /** Used as a keyboard listener for key down */
158
+ tableKeyDown(e) {
159
+ if (this.disabled) return;
160
+ /**
161
+ * Avoid page scrolling etc.
162
+ * Enable default behavior for:
163
+ * Tab, Shift + Tab
164
+ * TODO: Actually it will be better to just prevent
165
+ * in ArrowKeys and PageKeys maybe?
166
+ * Or should the consumer stop propagation?!
167
+ * Cannot work with preventDefault as it will
168
+ * first capture the event from an input in cell for example
169
+ */
170
+ if ("ArrowDown" === e.key || "ArrowUp" === e.key || "ArrowLeft" === e.key || "ArrowRight" === e.key) e.preventDefault();
171
+ /**
172
+ * Add key to the stack if it's
173
+ * not the same with the last (long press)
174
+ */
175
+ if (this.keys.length === 0 || this.keys[this.keys.length - 1] !== e.key) this.keys.push(e.key);
176
+ /**
177
+ * Need to check if we are inside a grid cell
178
+ * or not to enable/disable Grid Navigation
179
+ */
180
+ if (!(e.target instanceof Element)) return;
181
+ const cell = e.target.parentElement?.closest(`${this.selectors.Cell},${this.selectors.Row}`);
182
+ if (!cell) return;
183
+ if (cell.matches(this.selectors.Cell)) this.cellNavigation(e);
184
+ else this.gridNavigation(e);
185
+ }
186
+ /**
187
+ * Handles the navigation inside a cell
188
+ */
189
+ cellNavigation(e) {
190
+ if (!(e.target instanceof Element)) return;
191
+ /**
192
+ * Keys: Escape
193
+ * Restore grid navigation
194
+ */
195
+ if (e.key === "Escape") {
196
+ const cell = e.target.closest(this.selectors.Cell);
197
+ if (cell && this.isFocusable(cell)) {
198
+ cell.focus();
199
+ return;
200
+ }
201
+ }
202
+ /**
203
+ * Keys: ArrowRight, ArrowDown
204
+ * Move to the next focusable cell, or the first one
205
+ *
206
+ * Arrow Down disabled:
207
+ * https://github.com/w3c/aria-practices/issues/2739#issuecomment-1613538972
208
+ */
209
+ if (e.key === "ArrowRight" || e.key === "ArrowDown") {
210
+ const cell = e.target.closest(this.selectors.Cell);
211
+ if (!cell) return;
212
+ const focusableWidgets = [...cell.querySelectorAll(this.selectors.Focusable)];
213
+ const widgetIdx = focusableWidgets.findIndex((el) => el === e.target);
214
+ const widgetToFocus = focusableWidgets[widgetIdx === focusableWidgets.length - 1 ? 0 : widgetIdx + 1];
215
+ if (this.isFocusable(widgetToFocus)) widgetToFocus.focus();
216
+ return;
217
+ }
218
+ /**
219
+ * Keys: ArrowLeft, ArrowUp
220
+ * Move to the previous focusable cell, or the last one
221
+ *
222
+ * Arrow Up disabled:
223
+ * https://github.com/w3c/aria-practices/issues/2739#issuecomment-1613538972
224
+ */
225
+ if (e.key === "ArrowLeft" || e.key === "ArrowUp") {
226
+ const cell = e.target.closest(this.selectors.Cell);
227
+ if (!cell) return;
228
+ const focusableWidgets = [...cell.querySelectorAll(this.selectors.Focusable)];
229
+ const widgetIdx = focusableWidgets.findIndex((el) => el === e.target);
230
+ const widgetToFocus = focusableWidgets[widgetIdx === 0 ? focusableWidgets.length - 1 : widgetIdx - 1];
231
+ if (this.isFocusable(widgetToFocus)) widgetToFocus.focus();
232
+ }
233
+ }
234
+ /**
235
+ * Handles the navigation outside a cell
236
+ * on the grid level
237
+ */
238
+ gridNavigation(e) {
239
+ const { target } = e;
240
+ if (!(e.target instanceof Element)) return;
241
+ if (!(target instanceof Element)) return;
242
+ if (this.keys.length === 1) {
243
+ /**
244
+ * Keys: Enter
245
+ * Should move focus inside the cell to the first focusable element:
246
+ * https://www.w3.org/WAI/ARIA/apg/patterns/grid/#gridNav_inside
247
+ */
248
+ if (/^[a-zA-Z0-9]$/.test(e.key)) {
249
+ const cell = e.target.querySelector(this.selectors.Focusable);
250
+ if (cell && this.isFocusable(cell) && cell instanceof HTMLInputElement) {
251
+ cell.focus();
252
+ cell.value = `${cell.value}${e.key}`;
253
+ e.preventDefault();
254
+ }
255
+ return;
256
+ }
257
+ if (e.key === "Backspace") {
258
+ const cell = e.target.querySelector(this.selectors.Focusable);
259
+ if (cell && this.isFocusable(cell) && cell instanceof HTMLInputElement) {
260
+ const nativeInputValueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
261
+ if (nativeInputValueSetter) {
262
+ nativeInputValueSetter.call(cell, "");
263
+ const ev = new Event("input", { bubbles: true });
264
+ cell.dispatchEvent(ev);
265
+ }
266
+ }
267
+ return;
268
+ }
269
+ if (e.key === "Enter") {
270
+ const cell = e.target.querySelector(this.selectors.Focusable);
271
+ if (cell && this.isFocusable(cell)) {
272
+ if (cell.getAttribute("data-type") === "select-trigger") {
273
+ cell.click();
274
+ return;
275
+ }
276
+ cell.focus();
277
+ e.preventDefault();
278
+ }
279
+ return;
280
+ }
281
+ /**
282
+ * Keys: ArrowLeft, ArrowRight
283
+ * Should move focus to the next/previous cell
284
+ */
285
+ if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
286
+ const direction = e.key === "ArrowLeft" ? "prev" : "next";
287
+ const cell = e.target.closest(this.selectors.Cell);
288
+ let nextCell = null;
289
+ if (direction === "next" && cell?.nextElementSibling instanceof HTMLElement) nextCell = cell.nextElementSibling;
290
+ if (direction === "prev" && cell?.previousElementSibling instanceof HTMLElement) nextCell = cell.previousElementSibling;
291
+ if (nextCell && this.isFocusable(nextCell)) {
292
+ nextCell.focus();
293
+ e.preventDefault();
294
+ }
295
+ }
296
+ /**
297
+ * Keys: Up,Down
298
+ * Should move focus to the same column of the next/previous row
299
+ */
300
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
301
+ this.verticalCellNavigation(e);
302
+ return;
303
+ }
304
+ /**
305
+ * Keys: PageUp, PageDown
306
+ * Should move focus to the first/last row
307
+ * or a predefined number of rows if user provides a value
308
+ */
309
+ if (e.key === "PageUp" || e.key === "PageDown") {
310
+ this.pageCellNavigation(e);
311
+ return;
312
+ }
313
+ /**
314
+ * Keys: Home, End
315
+ * Should move focus to the first/last cell of the current row
316
+ */
317
+ if (e.key === "Home" || e.key === "End") {
318
+ const rowChildren = [...e.target.closest(this.selectors.Row)?.children || []];
319
+ if (e.key === "End") rowChildren.reverse();
320
+ this.focusOnFirstCell(rowChildren);
321
+ }
322
+ } else {
323
+ /**
324
+ * Keys: Control + Home, Control + End
325
+ * Should move focus to the first/last cell of the first/last row
326
+ */
327
+ const [firstKey, secondKey] = this.keys;
328
+ if (firstKey === "Control" && (secondKey === "Home" || secondKey === "End")) {
329
+ const siblings = e.target.closest(this.selectors.Row).parentElement?.children;
330
+ if (!siblings) return;
331
+ const rowChildren = [...(secondKey === "Home" ? siblings[0] : siblings[siblings.length - 1])?.children || []];
332
+ if (secondKey === "End") rowChildren.reverse();
333
+ this.focusOnFirstCell(rowChildren);
334
+ }
335
+ }
336
+ }
337
+ pageCellNavigation(e) {
338
+ if (!(e.target instanceof Element)) return;
339
+ const row = e.target.closest(this.selectors.Row);
340
+ const cell = e.target.closest(this.selectors.Cell);
341
+ if (row && cell) {
342
+ const position = this.getColumnIndex(cell);
343
+ if (position === void 0) return;
344
+ const direction = e.key === "PageUp" ? "prev" : "next";
345
+ const siblings = row.parentElement?.children;
346
+ if (!siblings) return;
347
+ let destinationRow;
348
+ if (this.pageUpDown) {
349
+ const methodClbk = direction === "prev" ? "previousSibling" : "nextSibling";
350
+ let sibling = row[methodClbk];
351
+ if (sibling === null) return;
352
+ let lastVisitedSibling = sibling;
353
+ for (let i = 0; i < this.pageUpDown - 1 && sibling; i++) {
354
+ sibling = sibling[methodClbk];
355
+ if (sibling) lastVisitedSibling = sibling;
356
+ }
357
+ destinationRow = sibling || lastVisitedSibling;
358
+ } else destinationRow = direction === "prev" ? siblings[0] : siblings[siblings.length - 1];
359
+ if (!destinationRow || !(destinationRow instanceof Element)) return;
360
+ const child = destinationRow.children[position];
361
+ if (child && this.isFocusable(child)) child.focus();
362
+ }
363
+ }
364
+ verticalCellNavigation(e) {
365
+ if (!(e.target instanceof Element)) return;
366
+ const row = e.target.closest(this.selectors.Row);
367
+ const cell = e.target.closest(this.selectors.Cell);
368
+ if (row && cell) {
369
+ const cellPosition = this.getColumnIndex(cell);
370
+ const rowPosition = this.getRowIndex(row);
371
+ if (cellPosition === void 0 || rowPosition === void 0) return;
372
+ const direction = e.key === "ArrowUp" ? "prev" : "next";
373
+ /** Find previous rowgroup and focus on the proper cell */
374
+ if (rowPosition === 0 && direction === "prev") {
375
+ const currentRowGroup = row.parentElement?.closest(this.selectors.RowGroup);
376
+ const siblingRowGroups = [...currentRowGroup?.parentElement?.children || []];
377
+ const currentRowGroupIdx = siblingRowGroups.findIndex((el) => el === currentRowGroup);
378
+ if (currentRowGroupIdx !== 0) {
379
+ const rows = [...siblingRowGroups[currentRowGroupIdx - 1].querySelectorAll(this.selectors.Row)];
380
+ const child = rows[rows.length - 1].children[cellPosition];
381
+ if (child && this.isFocusable(child)) child.focus();
382
+ return;
383
+ }
384
+ }
385
+ /** Find next rowgroup and focus on the proper cell */
386
+ if (rowPosition === [...row.parentElement?.querySelectorAll(this.selectors.Row) || []].length - 1 && direction === "next") {
387
+ const currentRowGroup = row.parentElement?.closest(this.selectors.RowGroup);
388
+ const siblingRowGroups = [...currentRowGroup?.parentElement?.children || []];
389
+ const currentRowGroupIdx = siblingRowGroups.findIndex((el) => el === currentRowGroup);
390
+ if (currentRowGroupIdx !== siblingRowGroups.length - 1) {
391
+ const child = [...siblingRowGroups[currentRowGroupIdx + 1].querySelectorAll(this.selectors.Row)][0].children[cellPosition];
392
+ if (child && this.isFocusable(child)) child.focus();
393
+ return;
394
+ }
395
+ return;
396
+ }
397
+ /** Navigation in the same rowgroup */
398
+ const destinationRow = this.findUntil(direction, row, this.selectors.Row);
399
+ if (!destinationRow) return;
400
+ const child = destinationRow.children[cellPosition];
401
+ if (child && this.isFocusable(child)) child.focus();
402
+ }
403
+ }
404
+ /**
405
+ * Sending a row `Element` and then the first cell will be focused.
406
+ *
407
+ * If you want to focus the last cell then the row children can be passed in
408
+ * reversed order
409
+ */
410
+ focusOnFirstCell(el) {
411
+ for (let i = 0; i < el.length; i++) {
412
+ const child = el[i];
413
+ if (this.isFocusable(child)) {
414
+ child.focus();
415
+ return;
416
+ }
417
+ }
418
+ }
419
+ /**
420
+ * Get the column index of a `cell` based on the first `row` parent.
421
+ * `cellIndex` could be used, but it's not supported in HTML tables.
422
+ */
423
+ getColumnIndex(cell) {
424
+ let position = 0;
425
+ const siblings = cell?.parentNode?.children;
426
+ if (!siblings) return;
427
+ while (cell !== siblings[position] && siblings[position] !== void 0) position++;
428
+ if (siblings[position] === void 0) return;
429
+ return position;
430
+ }
431
+ /**
432
+ * Get the row index of a `row` based
433
+ * on its sibling rows
434
+ */
435
+ getRowIndex(row) {
436
+ let position = 0;
437
+ const siblings = row?.parentNode?.children;
438
+ if (!siblings) return;
439
+ while (row !== siblings[position] && siblings[position] !== void 0) position++;
440
+ if (siblings[position] === void 0) return;
441
+ return position;
442
+ }
443
+ /**
444
+ * Equivalent to prevUntil/nextUntil in jQuery
445
+ * https://api.jquery.com/prevUntil/
446
+ */
447
+ findUntil(direction, el, matchSelector, exitSelector) {
448
+ let element = el;
449
+ const method = direction === "next" ? "nextSibling" : "previousSibling";
450
+ while (element[method]) {
451
+ const sibling = element[method];
452
+ if (!sibling) return null;
453
+ if (exitSelector && sibling instanceof Element && sibling.matches(exitSelector)) return null;
454
+ if (sibling instanceof Element && sibling.matches(matchSelector)) return sibling;
455
+ element = sibling;
456
+ }
457
+ return null;
458
+ }
459
+ };
460
+ function useTableNav(options) {
461
+ const nav = new DataGridNav(options);
462
+ return {
463
+ listeners: {
464
+ onKeyDown: (e) => nav.tableKeyDown(e),
465
+ onKeyUp: () => nav.tableKeyUp()
466
+ },
467
+ tableNav: nav
468
+ };
469
+ }
470
+ //#endregion
471
+ //#region src/components/table/Table.tsx
472
+ const DndProvider = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DndProvider })));
473
+ const SortableRows = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.SortableRows })));
474
+ const DraggableRow = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DraggableRow })));
475
+ const DragHandle = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DragHandle })));
476
+ const tableFeaturesConfig = tableFeatures({
477
+ ...stockFeatures,
478
+ sortedRowModel: createSortedRowModel(),
479
+ paginatedRowModel: createPaginatedRowModel()
480
+ });
481
+ const CustomCellContext = (context) => {
482
+ return {
483
+ ...context,
484
+ original: context.row.original,
485
+ data: context.row.original,
486
+ value: context.getValue()
487
+ };
488
+ };
489
+ const isPlainFunction = (Comp) => typeof Comp === "function" && !Comp.prototype?.isReactComponent;
490
+ const CellContent = ({ cell, props }) => {
491
+ const rendered = isPlainFunction(cell) ? cell(props) : flexRender(cell, props);
492
+ return typeof rendered === "string" || typeof rendered === "number" ? /* @__PURE__ */ jsx(CellText, { children: rendered }) : rendered;
493
+ };
494
+ const renderCell = (Comp, props) => /* @__PURE__ */ jsx(CellContent, {
495
+ cell: Comp,
496
+ props
497
+ });
498
+ const RowDragHandleCell = ({ rowId }) => {
499
+ return /* @__PURE__ */ jsx(DragHandle, {
500
+ id: rowId,
501
+ children: (dragProps) => /* @__PURE__ */ jsx(IconButton, {
502
+ ...dragProps,
503
+ className: "cursor-move p-1",
504
+ label: "Drag handle",
505
+ icon: GripVertical,
506
+ variant: "text",
507
+ width: "hug",
508
+ disableTooltip: true,
509
+ size: "sm"
510
+ })
511
+ });
512
+ };
513
+ const AutoDragHandleCell = ({ row }) => /* @__PURE__ */ jsx(RowDragHandleCell, { rowId: row.id });
514
+ const Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, className, variant: variantProp, containerClassName, maxHeight, scroll = "table", sorting, setSorting, columnOrder, setColumnOrder, columnVisibility, setColumnVisibility, bulkSelectionActions: ActionHeader, enableDragDrop = false, onDragEnd, onReorder, getRowId, enableRowSelection, enableMultiRowSelection = false, defaultSelectedRows, onRowSelectionChange, ...props }) => {
515
+ const uiConfig = UIConfig.useConfig();
516
+ const variant = variantProp ?? uiConfig.table.variant;
517
+ const showColumnBorders = showCellBorder ?? (variant !== "horizontals" && variant !== "zebra" && variant !== "striped-columns");
518
+ const tableContainerCva = UIOverrides.useCva("table.containerCva", tableContainerDefinition);
519
+ const tableRowCva = UIOverrides.useCva("table.rowCva", tableRowDefinition);
520
+ const theadCva = UIOverrides.useCva("table.theadCva", theadDefinition);
521
+ const tableHeadRowCva = UIOverrides.useCva("table.headRowCva", tableHeadRowDefinition);
522
+ const tableHeadDataCva = UIOverrides.useCva("table.headDataCva", tableHeadDataDefinition);
523
+ const tableDataCva = UIOverrides.useCva("table.dataCva", tableDataDefinition);
524
+ const ref = useRef(null);
525
+ const { listeners } = useTableNav();
526
+ const data = useMemo(() => items ?? [], [items]);
527
+ const [internalSelectedRows, setInternalSelectedRows] = useState(() => defaultSelectedRows ?? {});
528
+ const hasExternalRowSelection = defaultSelectedRows !== void 0 && onRowSelectionChange !== void 0;
529
+ const rowSelection = hasExternalRowSelection ? defaultSelectedRows : internalSelectedRows;
530
+ const handleRowSelectionChange = useCallback((updater) => {
531
+ if (!hasExternalRowSelection) setInternalSelectedRows(updater);
532
+ onRowSelectionChange?.(updater);
533
+ }, [hasExternalRowSelection, onRowSelectionChange]);
534
+ const baseColumns = useMemo(() => typeof columns === "function" ? columns(i18next.t) : columns, [columns]);
535
+ const tableColumns = useMemo(() => {
536
+ if (enableDragDrop && getRowId) return [{
537
+ id: "drag-handle",
538
+ header: "",
539
+ meta: { width: "w-12" },
540
+ cell: AutoDragHandleCell,
541
+ enableSorting: false
542
+ }, ...baseColumns];
543
+ return baseColumns;
544
+ }, [
545
+ baseColumns,
546
+ enableDragDrop,
547
+ getRowId
548
+ ]);
549
+ const [isSticky, setIsSticky] = useState(false);
550
+ const tableRef = useRef(null);
551
+ const theadRef = useRef(null);
552
+ useEffect(() => {
553
+ const update = () => {
554
+ const tableTop = tableRef.current?.getBoundingClientRect().top;
555
+ const theadTop = theadRef.current?.getBoundingClientRect().top;
556
+ setIsSticky(tableTop !== void 0 && theadTop !== void 0 && theadTop > tableTop);
557
+ };
558
+ update();
559
+ document.addEventListener("scroll", update, {
560
+ capture: true,
561
+ passive: true
562
+ });
563
+ return () => document.removeEventListener("scroll", update, { capture: true });
564
+ }, []);
565
+ const table = useTable({
566
+ features: tableFeaturesConfig,
567
+ data,
568
+ columns: tableColumns,
569
+ state: {
570
+ sorting,
571
+ columnOrder,
572
+ columnVisibility,
573
+ rowSelection
574
+ },
575
+ rowCount: items.length,
576
+ manualPagination: true,
577
+ onColumnOrderChange: setColumnOrder,
578
+ onColumnVisibilityChange: setColumnVisibility,
579
+ onSortingChange: setSorting,
580
+ onRowSelectionChange: handleRowSelectionChange,
581
+ manualSorting: true,
582
+ autoResetPageIndex: false,
583
+ autoResetExpanded: false,
584
+ defaultColumn: { sortDescFirst: true },
585
+ enableRowSelection,
586
+ enableMultiRowSelection,
587
+ getRowId: getRowId ? (row) => String(getRowId(row)) : void 0
588
+ });
589
+ const dataIds = useMemo(() => {
590
+ if (!enableDragDrop || !getRowId) return [];
591
+ return data.map((item) => getRowId(item));
592
+ }, [
593
+ data,
594
+ enableDragDrop,
595
+ getRowId
596
+ ]);
597
+ const handleDragEnd = useCallback((event) => {
598
+ const { active, over } = event;
599
+ if (!active || !over || active.id === over.id) return;
600
+ if (getRowId && (onReorder || onDragEnd)) {
601
+ if (onReorder) {
602
+ const oldIndex = items.findIndex((item_0) => getRowId(item_0) === active.id);
603
+ const newIndex = items.findIndex((item_1) => getRowId(item_1) === over.id);
604
+ if (oldIndex !== -1 && newIndex !== -1) {
605
+ const reorderedItems = [...items];
606
+ const [movedItem] = reorderedItems.splice(oldIndex, 1);
607
+ reorderedItems.splice(newIndex, 0, movedItem);
608
+ onReorder(reorderedItems);
609
+ }
610
+ }
611
+ onDragEnd?.(event);
612
+ }
613
+ }, [
614
+ onDragEnd,
615
+ onReorder,
616
+ items,
617
+ getRowId
618
+ ]);
619
+ const selectedRows = table.getSelectedRowModel().rows;
620
+ const columnCount = table.getHeaderGroups()[0].headers.length;
621
+ const isAnyRowSelected = selectedRows.length > 0 && !!ActionHeader;
622
+ const hasOnClick = !!onRowClick || !!onDoubleClick;
623
+ const tableElement = /* @__PURE__ */ jsx("div", {
624
+ className: tableContainerCva({
625
+ variant,
626
+ scroll,
627
+ className: containerClassName
628
+ }),
629
+ style: maxHeight === void 0 || scroll === "page" ? void 0 : { maxHeight },
630
+ children: /* @__PURE__ */ jsxs("table", {
631
+ ref: tableRef,
632
+ className: clsx("w-full font-body text-large", className),
633
+ ...listeners,
634
+ children: [/* @__PURE__ */ jsx("thead", {
635
+ ref: theadRef,
636
+ className: clsx(theadCva({})),
637
+ "data-is-sticky": isSticky || void 0,
638
+ children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", {
639
+ className: clsx(tableHeadRowCva({})),
640
+ children: headerGroup.headers.filter((header) => {
641
+ if (isAnyRowSelected && header.index > 0) return false;
642
+ return header.column.getIsVisible();
643
+ }).map((header_0, index) => {
644
+ const columnMeta = header_0.column.columnDef.meta ?? {};
645
+ return /* @__PURE__ */ jsx("th", {
646
+ colSpan: isAnyRowSelected ? columnCount : header_0.colSpan,
647
+ tabIndex: -1,
648
+ className: clsx(tableHeadDataCva({
649
+ variant,
650
+ hasRightBorder: index > 0 && showColumnBorders
651
+ }), columnMeta.headerClass, columnMeta.width),
652
+ children: isAnyRowSelected ? /* @__PURE__ */ jsx(ActionHeader, { table }) : /* @__PURE__ */ jsxs("button", {
653
+ type: "button",
654
+ "aria-label": "Sort column",
655
+ className: clsx("flex select-none items-center gap-1 text-content-primary", header_0.column.getCanSort() ? "-mx-1 h-6 cursor-pointer rounded-xs px-1 hover:bg-table-row-hover" : "cursor-default", columnMeta.sortClass),
656
+ onClick: header_0.column.getToggleSortingHandler(),
657
+ children: [typeof header_0.column.columnDef.header === "function" ? flexRender(header_0.column.columnDef.header, header_0.getContext()) : /* @__PURE__ */ jsx(HeaderText, { children: header_0.column.columnDef.header }), {
658
+ asc: /* @__PURE__ */ jsx(IconSlot, { icon: ChevronUp }),
659
+ desc: /* @__PURE__ */ jsx(IconSlot, { icon: ChevronDown })
660
+ }[header_0.column.getIsSorted()] ?? null]
661
+ })
662
+ }, header_0.id);
663
+ })
664
+ }, headerGroup.id))
665
+ }), /* @__PURE__ */ jsx("tbody", {
666
+ ref,
667
+ className: "relative",
668
+ children: enableDragDrop ? /* @__PURE__ */ jsx(SortableRows, {
669
+ items: dataIds,
670
+ children: table.getRowModel().rows.map((row_0) => /* @__PURE__ */ jsx(DraggableRow, {
671
+ id: row_0.id,
672
+ className: clsx(tableRowCva({
673
+ ...props,
674
+ variant
675
+ })),
676
+ isClickable: hasOnClick || row_0.getCanSelect(),
677
+ isSelected: row_0.getIsSelected(),
678
+ onClick: () => {
679
+ if (onRowClick) {
680
+ onRowClick(row_0.original);
681
+ return;
682
+ }
683
+ if (row_0.getCanSelect()) row_0.toggleSelected();
684
+ },
685
+ onDoubleClick: () => onDoubleClick?.(row_0.original),
686
+ children: row_0.getVisibleCells().map((cell, cellIndex) => {
687
+ const columnMeta_0 = cell.column.columnDef.meta ?? {};
688
+ return /* @__PURE__ */ jsx("td", {
689
+ tabIndex: -1,
690
+ className: clsx(tableDataCva({
691
+ variant,
692
+ hasRightBorder: cellIndex > 0 && showColumnBorders
693
+ }), columnMeta_0.cellClass, columnMeta_0.width),
694
+ children: renderCell(cell.column.columnDef.cell, CustomCellContext(cell.getContext()))
695
+ }, cell.id);
696
+ })
697
+ }, row_0.id))
698
+ }) : table.getRowModel().rows.map((row_1) => {
699
+ return /* @__PURE__ */ jsx("tr", {
700
+ className: clsx(tableRowCva({
701
+ ...props,
702
+ variant
703
+ })),
704
+ onClick: () => {
705
+ if (onRowClick) {
706
+ onRowClick(row_1.original);
707
+ return;
708
+ }
709
+ if (row_1.getCanSelect()) row_1.toggleSelected();
710
+ },
711
+ onDoubleClick: () => onDoubleClick?.(row_1.original),
712
+ "data-clickable": hasOnClick || row_1.getCanSelect() || void 0,
713
+ "data-selected": row_1.getIsSelected() || void 0,
714
+ children: row_1.getVisibleCells().map((cell_0, cellIndex_0) => {
715
+ const columnMeta_1 = cell_0.column.columnDef.meta ?? {};
716
+ return /* @__PURE__ */ jsx("td", {
717
+ tabIndex: -1,
718
+ className: clsx(tableDataCva({
719
+ variant,
720
+ hasRightBorder: cellIndex_0 > 0 && showColumnBorders
721
+ }), columnMeta_1.cellClass, columnMeta_1.width),
722
+ children: renderCell(cell_0.column.columnDef.cell, CustomCellContext(cell_0.getContext()))
723
+ }, cell_0.id);
724
+ })
725
+ }, row_1.id);
726
+ })
727
+ })]
728
+ })
729
+ });
730
+ if (enableDragDrop) return /* @__PURE__ */ jsx(Suspense, {
731
+ fallback: null,
732
+ children: /* @__PURE__ */ jsx(DndProvider, {
733
+ onDragEnd: handleDragEnd,
734
+ children: tableElement
735
+ })
736
+ });
737
+ return tableElement;
738
+ };
739
+ //#endregion
740
+ //#region src/components/table/ColumnConfig.tsx
741
+ const VisibilityCell = (t0) => {
742
+ const $ = c(7);
743
+ const { original, onToggle } = t0;
744
+ let t1;
745
+ if ($[0] !== onToggle || $[1] !== original.id) {
746
+ t1 = () => onToggle(original.id);
747
+ $[0] = onToggle;
748
+ $[1] = original.id;
749
+ $[2] = t1;
750
+ } else t1 = $[2];
751
+ const t2 = original.label;
752
+ let t3;
753
+ if ($[3] !== original.visible || $[4] !== t1 || $[5] !== t2) {
754
+ t3 = /* @__PURE__ */ jsx(Checkbox, {
755
+ isSelected: original.visible,
756
+ onChange: t1,
757
+ hideLabel: true,
758
+ children: t2
759
+ });
760
+ $[3] = original.visible;
761
+ $[4] = t1;
762
+ $[5] = t2;
763
+ $[6] = t3;
764
+ } else t3 = $[6];
765
+ return t3;
766
+ };
767
+ const getColumns = (t, handleToggleVisibility) => [{
768
+ id: "name",
769
+ header: t(($) => $.ui.table.column, { ns: "ui" }),
770
+ meta: { width: "flex-1" },
771
+ accessorKey: "label"
772
+ }, {
773
+ id: "visible",
774
+ header: t(($) => $.ui.table.show, { ns: "ui" }),
775
+ meta: { width: "w-20" },
776
+ cell: ({ original }) => /* @__PURE__ */ jsx(VisibilityCell, {
777
+ original,
778
+ onToggle: handleToggleVisibility
779
+ })
780
+ }];
781
+ function ColumnConfigModal(t0) {
782
+ const $ = c(27);
783
+ const { isOpen, onClose, configColumns, visibleColumns, onVisibilityChange, onOrderChange } = t0;
784
+ const { t } = useTranslation("ui");
785
+ let t1;
786
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
787
+ t1 = [];
788
+ $[0] = t1;
789
+ } else t1 = $[0];
790
+ const [data, setData] = useState(t1);
791
+ let t2;
792
+ let t3;
793
+ if ($[1] !== configColumns || $[2] !== visibleColumns) {
794
+ t2 = () => {
795
+ setData(configColumns.map((column) => {
796
+ const columnId = column.id ?? column.accessorKey;
797
+ return {
798
+ id: columnId,
799
+ label: column.header,
800
+ visible: visibleColumns?.[columnId] ?? true
801
+ };
802
+ }));
803
+ };
804
+ t3 = [configColumns, visibleColumns];
805
+ $[1] = configColumns;
806
+ $[2] = visibleColumns;
807
+ $[3] = t2;
808
+ $[4] = t3;
809
+ } else {
810
+ t2 = $[3];
811
+ t3 = $[4];
812
+ }
813
+ useEffect(t2, t3);
814
+ let t4;
815
+ if ($[5] !== onVisibilityChange || $[6] !== visibleColumns) {
816
+ t4 = (columnId_0) => {
817
+ const newVisible = {
818
+ ...visibleColumns,
819
+ [columnId_0]: !visibleColumns[columnId_0]
820
+ };
821
+ onVisibilityChange(newVisible);
822
+ };
823
+ $[5] = onVisibilityChange;
824
+ $[6] = visibleColumns;
825
+ $[7] = t4;
826
+ } else t4 = $[7];
827
+ const handleToggleVisibility = t4;
828
+ let t5;
829
+ if ($[8] !== handleToggleVisibility) {
830
+ t5 = (translateFn) => getColumns(translateFn, handleToggleVisibility);
831
+ $[8] = handleToggleVisibility;
832
+ $[9] = t5;
833
+ } else t5 = $[9];
834
+ const columns = useTranslationMemo(t5);
835
+ let t6;
836
+ if ($[10] !== onOrderChange) {
837
+ t6 = (reorderedItems) => {
838
+ setData(reorderedItems);
839
+ onOrderChange(reorderedItems.map(_temp$2));
840
+ };
841
+ $[10] = onOrderChange;
842
+ $[11] = t6;
843
+ } else t6 = $[11];
844
+ const handleReorder = t6;
845
+ if (!isOpen) return null;
846
+ let t7;
847
+ if ($[12] !== t) {
848
+ t7 = t(_temp2$2);
849
+ $[12] = t;
850
+ $[13] = t7;
851
+ } else t7 = $[13];
852
+ let t8;
853
+ if ($[14] !== t7) {
854
+ t8 = /* @__PURE__ */ jsx(Typography, {
855
+ as: "h2",
856
+ className: "font-bold",
857
+ size: "lead",
858
+ children: t7
859
+ });
860
+ $[14] = t7;
861
+ $[15] = t8;
862
+ } else t8 = $[15];
863
+ let t9;
864
+ if ($[16] !== columns || $[17] !== data || $[18] !== handleReorder) {
865
+ t9 = /* @__PURE__ */ jsx("div", {
866
+ className: "max-h-96 overflow-y-auto",
867
+ children: /* @__PURE__ */ jsx(Table, {
868
+ items: data,
869
+ columns,
870
+ showCellBorder: true,
871
+ className: "w-full",
872
+ enableDragDrop: true,
873
+ getRowId: _temp3,
874
+ onReorder: handleReorder
875
+ })
876
+ });
877
+ $[16] = columns;
878
+ $[17] = data;
879
+ $[18] = handleReorder;
880
+ $[19] = t9;
881
+ } else t9 = $[19];
882
+ let t10;
883
+ if ($[20] !== t8 || $[21] !== t9) {
884
+ t10 = /* @__PURE__ */ jsxs("div", {
885
+ className: "flex flex-col gap-2 p-4",
886
+ children: [t8, t9]
887
+ });
888
+ $[20] = t8;
889
+ $[21] = t9;
890
+ $[22] = t10;
891
+ } else t10 = $[22];
892
+ let t11;
893
+ if ($[23] !== isOpen || $[24] !== onClose || $[25] !== t10) {
894
+ t11 = /* @__PURE__ */ jsx(Dialog, {
895
+ isOpen,
896
+ onClose,
897
+ showCloseIcon: true,
898
+ children: t10
899
+ });
900
+ $[23] = isOpen;
901
+ $[24] = onClose;
902
+ $[25] = t10;
903
+ $[26] = t11;
904
+ } else t11 = $[26];
905
+ return t11;
906
+ }
907
+ function _temp3(row) {
908
+ return row.id;
909
+ }
910
+ function _temp2$2($) {
911
+ return $.ui.table.configureColumns;
912
+ }
913
+ function _temp$2(item) {
914
+ return item.id;
915
+ }
916
+ //#endregion
917
+ //#region src/components/table/InfiniteTable.tsx
918
+ const InfiniteTable = (t0) => {
919
+ const $ = c(20);
920
+ let fetchNextPage;
921
+ let hasNextPage;
922
+ let rest;
923
+ let t1;
924
+ if ($[0] !== t0) {
925
+ ({hasNextPage, isFetchingNextPage: t1, fetchNextPage, ...rest} = t0);
926
+ $[0] = t0;
927
+ $[1] = fetchNextPage;
928
+ $[2] = hasNextPage;
929
+ $[3] = rest;
930
+ $[4] = t1;
931
+ } else {
932
+ fetchNextPage = $[1];
933
+ hasNextPage = $[2];
934
+ rest = $[3];
935
+ t1 = $[4];
936
+ }
937
+ const isFetchingNextPage = t1 === void 0 ? false : t1;
938
+ let t2;
939
+ if ($[5] !== fetchNextPage || $[6] !== hasNextPage || $[7] !== isFetchingNextPage) {
940
+ t2 = () => {
941
+ if (!isFetchingNextPage && hasNextPage) fetchNextPage();
942
+ };
943
+ $[5] = fetchNextPage;
944
+ $[6] = hasNextPage;
945
+ $[7] = isFetchingNextPage;
946
+ $[8] = t2;
947
+ } else t2 = $[8];
948
+ const handleLoadMore = t2;
949
+ let t3;
950
+ if ($[9] !== handleLoadMore) {
951
+ t3 = {
952
+ onIntersection: handleLoadMore,
953
+ rootMargin: "100px"
954
+ };
955
+ $[9] = handleLoadMore;
956
+ $[10] = t3;
957
+ } else t3 = $[10];
958
+ const { ref } = useIntersectionObserver(t3);
959
+ let t4;
960
+ if ($[11] !== rest) {
961
+ t4 = /* @__PURE__ */ jsx(Table, { ...rest });
962
+ $[11] = rest;
963
+ $[12] = t4;
964
+ } else t4 = $[12];
965
+ let t5;
966
+ if ($[13] !== hasNextPage || $[14] !== isFetchingNextPage || $[15] !== ref) {
967
+ t5 = (hasNextPage || isFetchingNextPage) && /* @__PURE__ */ jsx("div", {
968
+ ref,
969
+ className: "flex justify-center py-4",
970
+ children: /* @__PURE__ */ jsx(Spinner, {})
971
+ });
972
+ $[13] = hasNextPage;
973
+ $[14] = isFetchingNextPage;
974
+ $[15] = ref;
975
+ $[16] = t5;
976
+ } else t5 = $[16];
977
+ let t6;
978
+ if ($[17] !== t4 || $[18] !== t5) {
979
+ t6 = /* @__PURE__ */ jsxs("div", {
980
+ className: "flex flex-col",
981
+ children: [t4, t5]
982
+ });
983
+ $[17] = t4;
984
+ $[18] = t5;
985
+ $[19] = t6;
986
+ } else t6 = $[19];
987
+ return t6;
988
+ };
989
+ //#endregion
990
+ //#region src/components/table/PaginatedTable.tsx
991
+ const PaginatedTable = (t0) => {
992
+ const $ = c(24);
993
+ let items;
994
+ let pagination;
995
+ let rest;
996
+ let setPagination;
997
+ let totalItems;
998
+ if ($[0] !== t0) {
999
+ ({pagination, setPagination, items, totalItems, ...rest} = t0);
1000
+ $[0] = t0;
1001
+ $[1] = items;
1002
+ $[2] = pagination;
1003
+ $[3] = rest;
1004
+ $[4] = setPagination;
1005
+ $[5] = totalItems;
1006
+ } else {
1007
+ items = $[1];
1008
+ pagination = $[2];
1009
+ rest = $[3];
1010
+ setPagination = $[4];
1011
+ totalItems = $[5];
1012
+ }
1013
+ let t1;
1014
+ if ($[6] !== items) {
1015
+ t1 = items ?? [];
1016
+ $[6] = items;
1017
+ $[7] = t1;
1018
+ } else t1 = $[7];
1019
+ let t2;
1020
+ if ($[8] !== rest || $[9] !== t1) {
1021
+ t2 = /* @__PURE__ */ jsx(Table, {
1022
+ ...rest,
1023
+ items: t1
1024
+ });
1025
+ $[8] = rest;
1026
+ $[9] = t1;
1027
+ $[10] = t2;
1028
+ } else t2 = $[10];
1029
+ const t3 = pagination.pageIndex + 1;
1030
+ const t4 = totalItems ?? 0;
1031
+ let t5;
1032
+ let t6;
1033
+ if ($[11] !== pagination || $[12] !== setPagination) {
1034
+ t5 = (page) => setPagination({
1035
+ ...pagination,
1036
+ pageIndex: page - 1
1037
+ });
1038
+ t6 = (pageSize) => setPagination({
1039
+ ...pagination,
1040
+ pageSize,
1041
+ pageIndex: 0
1042
+ });
1043
+ $[11] = pagination;
1044
+ $[12] = setPagination;
1045
+ $[13] = t5;
1046
+ $[14] = t6;
1047
+ } else {
1048
+ t5 = $[13];
1049
+ t6 = $[14];
1050
+ }
1051
+ let t7;
1052
+ if ($[15] !== pagination.pageSize || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 || $[19] !== t6) {
1053
+ t7 = /* @__PURE__ */ jsx(Pagination, {
1054
+ page: t3,
1055
+ pageSize: pagination.pageSize,
1056
+ totalItems: t4,
1057
+ onPageChange: t5,
1058
+ onPageSizeChange: t6
1059
+ });
1060
+ $[15] = pagination.pageSize;
1061
+ $[16] = t3;
1062
+ $[17] = t4;
1063
+ $[18] = t5;
1064
+ $[19] = t6;
1065
+ $[20] = t7;
1066
+ } else t7 = $[20];
1067
+ let t8;
1068
+ if ($[21] !== t2 || $[22] !== t7) {
1069
+ t8 = /* @__PURE__ */ jsxs("div", {
1070
+ className: "flex min-h-0 flex-col gap-4",
1071
+ children: [t2, t7]
1072
+ });
1073
+ $[21] = t2;
1074
+ $[22] = t7;
1075
+ $[23] = t8;
1076
+ } else t8 = $[23];
1077
+ return t8;
1078
+ };
1079
+ //#endregion
1080
+ //#region src/hooks/usePagination.ts
1081
+ const DEFAULT_STATE = {
1082
+ pageIndex: 0,
1083
+ pageSize: 20
1084
+ };
1085
+ const parsePositiveInteger = (value, fallback) => {
1086
+ if (value === null || !/^\d+$/.test(value)) return fallback;
1087
+ const number = Number(value);
1088
+ return Number.isSafeInteger(number) && number > 0 ? number : fallback;
1089
+ };
1090
+ /** Zero-based TanStack state; URL `page` values remain one-based. Defaults override initial URL state. */
1091
+ function usePagination(defaultPagination) {
1092
+ const $ = c(12);
1093
+ const { replace, searchParams } = UIRouter.useUIRouter();
1094
+ let t0;
1095
+ if ($[0] !== defaultPagination || $[1] !== searchParams) {
1096
+ t0 = () => defaultPagination ?? {
1097
+ pageIndex: parsePositiveInteger(searchParams.get("page"), 1) - 1,
1098
+ pageSize: parsePositiveInteger(searchParams.get("size"), DEFAULT_STATE.pageSize)
1099
+ };
1100
+ $[0] = defaultPagination;
1101
+ $[1] = searchParams;
1102
+ $[2] = t0;
1103
+ } else t0 = $[2];
1104
+ const [pagination, setPagination] = useState(t0);
1105
+ let t1;
1106
+ if ($[3] !== pagination.pageIndex || $[4] !== pagination.pageSize || $[5] !== replace || $[6] !== searchParams) {
1107
+ t1 = () => {
1108
+ const params = new URLSearchParams(searchParams);
1109
+ params.delete("size");
1110
+ params.delete("page");
1111
+ if (pagination.pageSize !== DEFAULT_STATE.pageSize) params.set("size", pagination.pageSize.toString());
1112
+ if (pagination.pageIndex !== DEFAULT_STATE.pageIndex) params.set("page", (pagination.pageIndex + 1).toString());
1113
+ if (params.toString() === searchParams.toString()) return;
1114
+ replace(".", RoutingUtils.toRouterSearch(params));
1115
+ };
1116
+ $[3] = pagination.pageIndex;
1117
+ $[4] = pagination.pageSize;
1118
+ $[5] = replace;
1119
+ $[6] = searchParams;
1120
+ $[7] = t1;
1121
+ } else t1 = $[7];
1122
+ let t2;
1123
+ if ($[8] !== pagination) {
1124
+ t2 = [pagination];
1125
+ $[8] = pagination;
1126
+ $[9] = t2;
1127
+ } else t2 = $[9];
1128
+ useEffect(t1, t2);
1129
+ let t3;
1130
+ if ($[10] !== pagination) {
1131
+ t3 = {
1132
+ pagination,
1133
+ setPagination,
1134
+ pageIndex: pagination.pageIndex,
1135
+ pageSize: pagination.pageSize
1136
+ };
1137
+ $[10] = pagination;
1138
+ $[11] = t3;
1139
+ } else t3 = $[11];
1140
+ return t3;
1141
+ }
1142
+ //#endregion
1143
+ //#region src/hooks/useSorting.ts
1144
+ function useSorting(defaultSorting, t0) {
1145
+ const $ = c(16);
1146
+ const prefix = t0 === void 0 ? "" : t0;
1147
+ const { replace, searchParams } = UIRouter.useUIRouter();
1148
+ let t1;
1149
+ if ($[0] !== defaultSorting || $[1] !== prefix || $[2] !== searchParams) {
1150
+ t1 = defaultSorting ?? searchParams.get(`order${prefix && `-${prefix}`}`)?.split(",").map(_temp$1) ?? [];
1151
+ $[0] = defaultSorting;
1152
+ $[1] = prefix;
1153
+ $[2] = searchParams;
1154
+ $[3] = t1;
1155
+ } else t1 = $[3];
1156
+ const [sorting, setSorting] = useState(t1);
1157
+ let t2;
1158
+ if ($[4] !== sorting) {
1159
+ t2 = sorting.map(_temp2$1).join(",");
1160
+ $[4] = sorting;
1161
+ $[5] = t2;
1162
+ } else t2 = $[5];
1163
+ const order = t2;
1164
+ let t3;
1165
+ if ($[6] !== order || $[7] !== prefix || $[8] !== replace || $[9] !== searchParams) {
1166
+ t3 = () => {
1167
+ const params = new URLSearchParams(searchParams);
1168
+ const orderKey = prefix ? `order-${prefix}` : "order";
1169
+ params.delete(orderKey);
1170
+ if (order) params.set(orderKey, order);
1171
+ if (params.toString() === searchParams.toString()) return;
1172
+ replace(".", RoutingUtils.toRouterSearch(params));
1173
+ };
1174
+ $[6] = order;
1175
+ $[7] = prefix;
1176
+ $[8] = replace;
1177
+ $[9] = searchParams;
1178
+ $[10] = t3;
1179
+ } else t3 = $[10];
1180
+ let t4;
1181
+ if ($[11] !== order) {
1182
+ t4 = [order];
1183
+ $[11] = order;
1184
+ $[12] = t4;
1185
+ } else t4 = $[12];
1186
+ useEffect(t3, t4);
1187
+ let t5;
1188
+ if ($[13] !== order || $[14] !== sorting) {
1189
+ t5 = {
1190
+ sorting,
1191
+ setSorting,
1192
+ order
1193
+ };
1194
+ $[13] = order;
1195
+ $[14] = sorting;
1196
+ $[15] = t5;
1197
+ } else t5 = $[15];
1198
+ return t5;
1199
+ }
1200
+ function _temp2$1(field) {
1201
+ return `${field.desc ? "-" : "+"}${field.id}`;
1202
+ }
1203
+ function _temp$1(item) {
1204
+ if (item.startsWith("-")) return {
1205
+ id: item.slice(1),
1206
+ desc: true
1207
+ };
1208
+ if (item.startsWith("+")) return {
1209
+ id: item.slice(1),
1210
+ desc: false
1211
+ };
1212
+ return {
1213
+ id: item,
1214
+ desc: false
1215
+ };
1216
+ }
1217
+ //#endregion
1218
+ //#region src/hooks/useTableColumnConfig.ts
1219
+ function sortByKeyOrder(data, orderedKeys = []) {
1220
+ return [...data].sort((a, b) => {
1221
+ return orderedKeys.findIndex((key) => key === (a.id ?? a.accessorKey)) - orderedKeys.findIndex((key) => key === (b.id ?? b.accessorKey));
1222
+ });
1223
+ }
1224
+ function useTableColumnConfig(defaultColumns, t0) {
1225
+ const $ = c(31);
1226
+ let t1;
1227
+ if ($[0] !== t0) {
1228
+ t1 = t0 === void 0 ? {} : t0;
1229
+ $[0] = t0;
1230
+ $[1] = t1;
1231
+ } else t1 = $[1];
1232
+ const options = t1;
1233
+ let t2;
1234
+ if ($[2] !== defaultColumns) {
1235
+ t2 = () => defaultColumns.reduce(_temp, {});
1236
+ $[2] = defaultColumns;
1237
+ $[3] = t2;
1238
+ } else t2 = $[3];
1239
+ const [internalVisibleColumns, setInternalVisibleColumns] = useState(t2);
1240
+ let t3;
1241
+ if ($[4] !== defaultColumns) {
1242
+ t3 = () => defaultColumns.map(_temp2);
1243
+ $[4] = defaultColumns;
1244
+ $[5] = t3;
1245
+ } else t3 = $[5];
1246
+ const [internalColumnOrder, setInternalColumnOrder] = useState(t3);
1247
+ let t4;
1248
+ let t5;
1249
+ if ($[6] !== options.visibleColumns) {
1250
+ t4 = () => {
1251
+ if (options.visibleColumns) setInternalVisibleColumns(options.visibleColumns);
1252
+ };
1253
+ t5 = [options.visibleColumns];
1254
+ $[6] = options.visibleColumns;
1255
+ $[7] = t4;
1256
+ $[8] = t5;
1257
+ } else {
1258
+ t4 = $[7];
1259
+ t5 = $[8];
1260
+ }
1261
+ useEffect(t4, t5);
1262
+ let t6;
1263
+ let t7;
1264
+ if ($[9] !== options.columnOrder) {
1265
+ t6 = () => {
1266
+ if (options.columnOrder) setInternalColumnOrder(options.columnOrder);
1267
+ };
1268
+ t7 = [options.columnOrder];
1269
+ $[9] = options.columnOrder;
1270
+ $[10] = t6;
1271
+ $[11] = t7;
1272
+ } else {
1273
+ t6 = $[10];
1274
+ t7 = $[11];
1275
+ }
1276
+ useEffect(t6, t7);
1277
+ let t8;
1278
+ if ($[12] !== options) {
1279
+ t8 = (value) => {
1280
+ setInternalVisibleColumns(value);
1281
+ options?.onVisibilityChange?.(value);
1282
+ };
1283
+ $[12] = options;
1284
+ $[13] = t8;
1285
+ } else t8 = $[13];
1286
+ const handleVisibilityChange = t8;
1287
+ let t9;
1288
+ if ($[14] !== options) {
1289
+ t9 = (value_0) => {
1290
+ setInternalColumnOrder(value_0);
1291
+ options?.onOrderChange?.(value_0);
1292
+ };
1293
+ $[14] = options;
1294
+ $[15] = t9;
1295
+ } else t9 = $[15];
1296
+ const handleOrderChange = t9;
1297
+ let t10;
1298
+ if ($[16] !== defaultColumns || $[17] !== internalColumnOrder) {
1299
+ t10 = sortByKeyOrder(defaultColumns, internalColumnOrder);
1300
+ $[16] = defaultColumns;
1301
+ $[17] = internalColumnOrder;
1302
+ $[18] = t10;
1303
+ } else t10 = $[18];
1304
+ const configColumns = t10;
1305
+ let t11;
1306
+ if ($[19] !== configColumns || $[20] !== internalVisibleColumns) {
1307
+ let t12;
1308
+ if ($[22] !== internalVisibleColumns) {
1309
+ t12 = (col_1) => internalVisibleColumns?.[col_1.id ?? col_1.accessorKey] ?? true;
1310
+ $[22] = internalVisibleColumns;
1311
+ $[23] = t12;
1312
+ } else t12 = $[23];
1313
+ t11 = configColumns.filter(t12);
1314
+ $[19] = configColumns;
1315
+ $[20] = internalVisibleColumns;
1316
+ $[21] = t11;
1317
+ } else t11 = $[21];
1318
+ const columns = t11;
1319
+ let t12;
1320
+ if ($[24] !== columns || $[25] !== configColumns || $[26] !== handleOrderChange || $[27] !== handleVisibilityChange || $[28] !== internalColumnOrder || $[29] !== internalVisibleColumns) {
1321
+ t12 = {
1322
+ configColumns,
1323
+ columns,
1324
+ visibleColumns: internalVisibleColumns,
1325
+ columnOrder: internalColumnOrder,
1326
+ onVisibilityChange: handleVisibilityChange,
1327
+ onOrderChange: handleOrderChange
1328
+ };
1329
+ $[24] = columns;
1330
+ $[25] = configColumns;
1331
+ $[26] = handleOrderChange;
1332
+ $[27] = handleVisibilityChange;
1333
+ $[28] = internalColumnOrder;
1334
+ $[29] = internalVisibleColumns;
1335
+ $[30] = t12;
1336
+ } else t12 = $[30];
1337
+ return t12;
1338
+ }
1339
+ function _temp2(col_0) {
1340
+ return col_0.id ?? col_0.accessorKey;
1341
+ }
1342
+ function _temp(acc, col) {
1343
+ const key = col.id ?? col.accessorKey;
1344
+ acc[key] = true;
1345
+ return acc;
1346
+ }
1347
+ //#endregion
1348
+ export { InfiniteTable as a, useTableNav as c, PaginatedTable as i, HeaderText as l, useSorting as n, ColumnConfigModal as o, usePagination as r, Table as s, useTableColumnConfig as t, CellText as u };