@povio/ui 5.0.0-rc.9 → 6.0.0-rc.2

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