@feugene/granularity 0.16.0 → 0.19.0

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 (425) hide show
  1. package/dist/chunks/chevron-left-D8AUBAM7.js +23 -0
  2. package/dist/chunks/chevron-left-D8AUBAM7.js.map +1 -0
  3. package/dist/chunks/{chevron-right-BfqMVpbB.js → chevron-right-C6Z01h0X.js} +1 -22
  4. package/dist/chunks/chevron-right-C6Z01h0X.js.map +1 -0
  5. package/dist/chunks/config-8Pcutu1j2.js.map +1 -0
  6. package/dist/chunks/{config-K0C2tcLB.js → config-9PYRZlKE.js} +1 -1
  7. package/dist/chunks/{config-K0C2tcLB.js.map → config-9PYRZlKE.js.map} +1 -1
  8. package/dist/chunks/{config-Zc_bUvZY2.js → config-BDfTXHo12.js} +1 -1
  9. package/dist/chunks/{config-Zc_bUvZY2.js.map → config-BDfTXHo12.js.map} +1 -1
  10. package/dist/chunks/config-BE6n20np2.js.map +1 -0
  11. package/dist/chunks/config-BJ7Bv_G2.js +148 -0
  12. package/dist/chunks/config-BJ7Bv_G2.js.map +1 -0
  13. package/dist/chunks/config-BKvX0q102.js.map +1 -0
  14. package/dist/chunks/{config-CpwwkFBO.js → config-Baj7Wvx-.js} +1 -1
  15. package/dist/chunks/{config-CpwwkFBO.js.map → config-Baj7Wvx-.js.map} +1 -1
  16. package/dist/chunks/{config-D8tSR2uS.js → config-Be9k9bOf.js} +2 -8
  17. package/dist/chunks/config-Be9k9bOf.js.map +1 -0
  18. package/dist/chunks/config-BoNR7_PD2.js.map +1 -0
  19. package/dist/chunks/{config-DxCTVBfx.js → config-BsPDQ0dS.js} +2 -2
  20. package/dist/chunks/config-BsPDQ0dS.js.map +1 -0
  21. package/dist/chunks/{config-DpqOnJiz2.js → config-CDat1wXf2.js} +1 -1
  22. package/dist/chunks/config-CDat1wXf2.js.map +1 -0
  23. package/dist/chunks/config-CN2ULSQL.js.map +1 -0
  24. package/dist/chunks/{config-Cw6TDzWv2.js → config-COpuWGr_.js} +1 -1
  25. package/dist/chunks/config-COpuWGr_.js.map +1 -0
  26. package/dist/chunks/config-CY0_6cMi2.js.map +1 -0
  27. package/dist/chunks/{config-B-g6lT19.js → config-DA6SnEoy.js} +5 -2
  28. package/dist/chunks/config-DA6SnEoy.js.map +1 -0
  29. package/dist/chunks/config-DAX8Deh1.js +68 -0
  30. package/dist/chunks/config-DAX8Deh1.js.map +1 -0
  31. package/dist/chunks/config-DKdlqXiY.js.map +1 -1
  32. package/dist/chunks/{config-CvC0sX8p.js → config-MRvhUl-O.js} +1 -1
  33. package/dist/chunks/{config-CvC0sX8p.js.map → config-MRvhUl-O.js.map} +1 -1
  34. package/dist/chunks/config-Rw9OyW702.js.map +1 -0
  35. package/dist/chunks/config-ScuvHw6k2.js +42 -0
  36. package/dist/chunks/config-ScuvHw6k2.js.map +1 -0
  37. package/dist/chunks/config-T3qdQBgU2.js.map +1 -0
  38. package/dist/chunks/config-eXB87DOi.js.map +1 -0
  39. package/dist/chunks/context-BSYR7RZs.js.map +1 -1
  40. package/dist/chunks/{en-B3xMeswz.js → en-COdzxgAX.js} +30 -5
  41. package/dist/chunks/en-COdzxgAX.js.map +1 -0
  42. package/dist/chunks/{es-CA-mkU--.js → es-ClqJ-4hr.js} +30 -5
  43. package/dist/chunks/es-ClqJ-4hr.js.map +1 -0
  44. package/dist/chunks/{es-Bv8vvqdT.js → es-DGMHwknJ.js} +3 -3
  45. package/dist/chunks/{es-Bv8vvqdT.js.map → es-DGMHwknJ.js.map} +1 -1
  46. package/dist/chunks/generated-BRkbhyxk.js +3270 -0
  47. package/dist/chunks/generated-BRkbhyxk.js.map +1 -0
  48. package/dist/chunks/grKbdStyles-CeZhGQHr.js +43 -0
  49. package/dist/chunks/grKbdStyles-CeZhGQHr.js.map +1 -0
  50. package/dist/chunks/{grTextareaStyles-CWI2SqC8.js → grTextareaStyles-iOcHuVMM.js} +2 -2
  51. package/dist/chunks/{grTextareaStyles-CWI2SqC8.js.map → grTextareaStyles-iOcHuVMM.js.map} +1 -1
  52. package/dist/chunks/{granular-provider-CtrXGa7c.js → granular-provider-C6uAujdJ.js} +23 -21
  53. package/dist/chunks/granular-provider-C6uAujdJ.js.map +1 -0
  54. package/dist/chunks/grip-vertical-lRha2S7q.js +16 -0
  55. package/dist/chunks/grip-vertical-lRha2S7q.js.map +1 -0
  56. package/dist/chunks/icon-Dag2tIMs.js +21 -0
  57. package/dist/chunks/icon-Dag2tIMs.js.map +1 -0
  58. package/dist/chunks/{keyboard-zYvvyHd4.js → keyboard-DE2yhz_b.js} +10 -1
  59. package/dist/chunks/keyboard-DE2yhz_b.js.map +1 -0
  60. package/dist/chunks/{optionFilter-BVY988pC.js → optionFilter-DYw9XPPx.js} +1 -71
  61. package/dist/chunks/optionFilter-DYw9XPPx.js.map +1 -0
  62. package/dist/chunks/{useOverlayLayer-BupuP_hs.js → overlayStack-C8cfsqXa.js} +11 -61
  63. package/dist/chunks/overlayStack-C8cfsqXa.js.map +1 -0
  64. package/dist/chunks/{portalRoot-CWD4zHBm.js → portalRoot-CVhCgdG6.js} +10 -1
  65. package/dist/chunks/{portalRoot-CWD4zHBm.js.map → portalRoot-CVhCgdG6.js.map} +1 -1
  66. package/dist/chunks/{ru-COWxgh2A.js → ru-9z8ix45c.js} +30 -5
  67. package/dist/chunks/ru-9z8ix45c.js.map +1 -0
  68. package/dist/chunks/useDragSort-0l47h4yb.js +265 -0
  69. package/dist/chunks/useDragSort-0l47h4yb.js.map +1 -0
  70. package/dist/chunks/{useModalOverlay-DCM4d3yA.js → useModalOverlay-DrQVYwwA.js} +2 -2
  71. package/dist/chunks/{useModalOverlay-DCM4d3yA.js.map → useModalOverlay-DrQVYwwA.js.map} +1 -1
  72. package/dist/chunks/{usePortalTarget-RyzEgNTb.js → usePortalTarget-Cn-Wiz5d.js} +1 -1
  73. package/dist/chunks/{usePortalTarget-RyzEgNTb.js.map → usePortalTarget-Cn-Wiz5d.js.map} +1 -1
  74. package/dist/components/GrAutocomplete/chunks/{GrAutocomplete-CQ9T7Lly.js → GrAutocomplete-gY4Xopza.js} +35 -26
  75. package/dist/components/GrAutocomplete/chunks/GrAutocomplete-gY4Xopza.js.map +1 -0
  76. package/dist/components/GrAutocomplete/index.js +1 -1
  77. package/dist/components/GrAutocomplete/styles.css +1 -1
  78. package/dist/components/GrBreadcrumbs/chunks/{GrBreadcrumbs-BCNGDS6k.js → GrBreadcrumbs-DS_-PBVt.js} +8 -7
  79. package/dist/components/GrBreadcrumbs/chunks/GrBreadcrumbs-DS_-PBVt.js.map +1 -0
  80. package/dist/components/GrBreadcrumbs/index.js +1 -1
  81. package/dist/components/GrCollapse/chunks/{GrCollapse-B2Fc6A9r.js.map → GrCollapse-Kk0DE8tb.js.map} +1 -1
  82. package/dist/components/GrCollapse/index.js +1 -1
  83. package/dist/components/GrColorPicker/chunks/{GrColorPicker-bnYBRGk8.js → GrColorPicker-CkBTzkqn.js} +4 -4
  84. package/dist/components/GrColorPicker/chunks/{GrColorPicker-bnYBRGk8.js.map → GrColorPicker-CkBTzkqn.js.map} +1 -1
  85. package/dist/components/GrColorPicker/index.js +2 -2
  86. package/dist/components/GrCommandPalette/chunks/{GrCommandPalette-MWDYDPNC.js → GrCommandPalette-BugTlGdj.js} +41 -16
  87. package/dist/components/GrCommandPalette/chunks/GrCommandPalette-BugTlGdj.js.map +1 -0
  88. package/dist/components/GrCommandPalette/index.js +2 -2
  89. package/dist/components/GrCommandPalette/styles.css +1 -1
  90. package/dist/components/GrConfigProvider/index.js +2 -2
  91. package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-DaQmlp1_.js → GrConfirmDialog-Ds5T0GiR.js} +1 -1
  92. package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-DaQmlp1_.js.map → GrConfirmDialog-Ds5T0GiR.js.map} +1 -1
  93. package/dist/components/GrConfirmDialog/index.js +1 -1
  94. package/dist/components/GrDataTable/chunks/{GrDataTable-DVFho9Cj.js → GrDataTable-CYe2A2WA.js} +498 -48
  95. package/dist/components/GrDataTable/chunks/GrDataTable-CYe2A2WA.js.map +1 -0
  96. package/dist/components/GrDataTable/index.js +2 -2
  97. package/dist/components/GrDialog/chunks/{GrDialog-AE1gIZuz.js → GrDialog-C3tYaA8v.js} +1 -1
  98. package/dist/components/GrDialog/chunks/{GrDialog-AE1gIZuz.js.map → GrDialog-C3tYaA8v.js.map} +1 -1
  99. package/dist/components/GrDialog/index.js +1 -1
  100. package/dist/components/GrDialogService/chunks/{GrDialogService-B4DYWDkA.js → GrDialogService-CTBiiJDI.js} +3 -3
  101. package/dist/components/GrDialogService/chunks/{GrDialogService-B4DYWDkA.js.map → GrDialogService-CTBiiJDI.js.map} +1 -1
  102. package/dist/components/GrDialogService/index.js +1 -1
  103. package/dist/components/GrDivider/chunks/{GrDivider-B2Xwc_QO.js → GrDivider-xxq1_fIl.js} +1 -1
  104. package/dist/components/GrDivider/chunks/{GrDivider-B2Xwc_QO.js.map → GrDivider-xxq1_fIl.js.map} +1 -1
  105. package/dist/components/GrDivider/index.js +2 -2
  106. package/dist/components/GrDrawer/chunks/{GrDrawer-DQwi6aRw.js → GrDrawer-BSSuiNHU.js} +1 -1
  107. package/dist/components/GrDrawer/chunks/{GrDrawer-DQwi6aRw.js.map → GrDrawer-BSSuiNHU.js.map} +1 -1
  108. package/dist/components/GrDrawer/index.js +1 -1
  109. package/dist/components/GrDropdown/chunks/{GrDropdown-BLng6V1m.js → GrDropdown-Bh6UK2M5.js} +3 -3
  110. package/dist/components/GrDropdown/chunks/{GrDropdown-BLng6V1m.js.map → GrDropdown-Bh6UK2M5.js.map} +1 -1
  111. package/dist/components/GrDropdown/index.js +1 -1
  112. package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-BImk2Vs7.js → GrDropdownMenu-LyfEFUbg.js} +2 -2
  113. package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-BImk2Vs7.js.map → GrDropdownMenu-LyfEFUbg.js.map} +1 -1
  114. package/dist/components/GrDropdownMenu/index.js +2 -2
  115. package/dist/components/GrFileUpload/chunks/{GrFileUpload-D0B-BEsd.js → GrFileUpload-DuDzC43S.js} +2 -2
  116. package/dist/components/GrFileUpload/chunks/{GrFileUpload-D0B-BEsd.js.map → GrFileUpload-DuDzC43S.js.map} +1 -1
  117. package/dist/components/GrFileUpload/index.js +1 -1
  118. package/dist/components/GrImageViewer/chunks/{GrImageViewer-BeCnE8XQ.js → GrImageViewer-DfD4euH5.js} +48 -23
  119. package/dist/components/GrImageViewer/chunks/GrImageViewer-DfD4euH5.js.map +1 -0
  120. package/dist/components/GrImageViewer/index.js +1 -1
  121. package/dist/components/GrInput/chunks/{GrInput-DD2gYdqS.js → GrInput-2wd7Crs0.js} +1 -1
  122. package/dist/components/GrInput/chunks/GrInput-2wd7Crs0.js.map +1 -0
  123. package/dist/components/GrInput/index.js +1 -1
  124. package/dist/components/GrInputTag/chunks/{GrInputTag-DmNunixz.js → GrInputTag-CyV2eY7Z.js} +20 -33
  125. package/dist/components/GrInputTag/chunks/GrInputTag-CyV2eY7Z.js.map +1 -0
  126. package/dist/components/GrInputTag/index.js +1 -1
  127. package/dist/components/GrKbd/chunks/{GrKbd-DRFPvW3G.js → GrKbd-DU2lBkRV.js} +218 -52
  128. package/dist/components/GrKbd/chunks/GrKbd-DU2lBkRV.js.map +1 -0
  129. package/dist/components/GrKbd/index.js +3 -3
  130. package/dist/components/GrModal/chunks/{GrModal-B8I78T0N.js → GrModal-CbMMr6W1.js} +1 -1
  131. package/dist/components/GrModal/chunks/{GrModal-B8I78T0N.js.map → GrModal-CbMMr6W1.js.map} +1 -1
  132. package/dist/components/GrModal/index.js +1 -1
  133. package/dist/components/GrNumberInput/chunks/{GrNumberInput-CZOyPz4J.js → GrNumberInput-B5CHZDBj.js} +2 -1
  134. package/dist/components/GrNumberInput/chunks/{GrNumberInput-CZOyPz4J.js.map → GrNumberInput-B5CHZDBj.js.map} +1 -1
  135. package/dist/components/GrNumberInput/index.js +1 -1
  136. package/dist/components/GrPagination/chunks/{GrPagination-B6N0QZBf.js → GrPagination-BM4FrD6Q.js} +4 -4
  137. package/dist/components/GrPagination/chunks/GrPagination-BM4FrD6Q.js.map +1 -0
  138. package/dist/components/GrPagination/index.js +1 -1
  139. package/dist/components/GrPopover/chunks/{GrPopover-B1eRCOoO.js → GrPopover-DMH4Jjst.js} +1 -1
  140. package/dist/components/GrPopover/chunks/{GrPopover-B1eRCOoO.js.map → GrPopover-DMH4Jjst.js.map} +1 -1
  141. package/dist/components/GrPopover/index.js +1 -1
  142. package/dist/components/GrProgressBar/chunks/{GrProgressBar-BiHnaitu.js → GrProgressBar-xwbNM9QB.js} +1 -1
  143. package/dist/components/GrProgressBar/chunks/GrProgressBar-xwbNM9QB.js.map +1 -0
  144. package/dist/components/GrProgressBar/index.js +1 -1
  145. package/dist/components/GrProgressCircle/chunks/{GrProgressCircle-CTogjcHz.js → GrProgressCircle-B8olXRo5.js} +1 -1
  146. package/dist/components/GrProgressCircle/chunks/{GrProgressCircle-CTogjcHz.js.map → GrProgressCircle-B8olXRo5.js.map} +1 -1
  147. package/dist/components/GrProgressCircle/index.js +2 -2
  148. package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-Ct174NVD.js → GrPromptDialog-Pwr9NPxK.js} +3 -3
  149. package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-Ct174NVD.js.map → GrPromptDialog-Pwr9NPxK.js.map} +1 -1
  150. package/dist/components/GrPromptDialog/index.js +1 -1
  151. package/dist/components/GrRadio/chunks/{GrRadio-DksDro_U.js → GrRadio-DWiRaMzt.js} +8 -32
  152. package/dist/components/GrRadio/chunks/GrRadio-DWiRaMzt.js.map +1 -0
  153. package/dist/components/GrRadio/index.js +1 -1
  154. package/dist/components/GrRadioGroup/chunks/{GrRadioGroup-BOIhejE6.js → GrRadioGroup-DIuBw0wk.js} +34 -27
  155. package/dist/components/GrRadioGroup/chunks/GrRadioGroup-DIuBw0wk.js.map +1 -0
  156. package/dist/components/GrRadioGroup/index.js +1 -1
  157. package/dist/components/GrRating/chunks/{GrRating-JrHXz0Rv.js → GrRating-DVFH3lYu.js} +10 -9
  158. package/dist/components/GrRating/chunks/GrRating-DVFH3lYu.js.map +1 -0
  159. package/dist/components/GrRating/index.js +2 -2
  160. package/dist/components/GrSegmented/chunks/{GrSegmented-BQIlH5KI.js → GrSegmented-CQw3ijqa.js} +47 -65
  161. package/dist/components/GrSegmented/chunks/GrSegmented-CQw3ijqa.js.map +1 -0
  162. package/dist/components/GrSegmented/index.js +1 -1
  163. package/dist/components/GrSelect/chunks/{GrSelect-aqkPCqjd.js → GrSelect-B-Voni7D.js} +69 -55
  164. package/dist/components/GrSelect/chunks/GrSelect-B-Voni7D.js.map +1 -0
  165. package/dist/components/GrSelect/index.js +1 -1
  166. package/dist/components/GrSelect/styles.css +1 -1
  167. package/dist/components/GrSidebar/chunks/{GrSidebar-DRGnnViw.js → GrSidebar-i7AxjhY_.js} +3 -2
  168. package/dist/components/GrSidebar/chunks/{GrSidebar-DRGnnViw.js.map → GrSidebar-i7AxjhY_.js.map} +1 -1
  169. package/dist/components/GrSidebar/index.js +2 -2
  170. package/dist/components/GrSkeleton/index.js +1 -1
  171. package/dist/components/GrSlider/chunks/{GrSlider-DkU9IQSX.js → GrSlider-CyhVsNKn.js} +21 -34
  172. package/dist/components/GrSlider/chunks/GrSlider-CyhVsNKn.js.map +1 -0
  173. package/dist/components/GrSlider/index.js +2 -2
  174. package/dist/components/GrSortableList/chunks/GrSortableList-XB7mXM1W.js +277 -0
  175. package/dist/components/GrSortableList/chunks/GrSortableList-XB7mXM1W.js.map +1 -0
  176. package/dist/components/GrSortableList/index.js +3 -0
  177. package/dist/components/GrSplitter/chunks/{GrSplitter-7To8jbJ8.js → GrSplitter-BzxVQwbY.js} +17 -37
  178. package/dist/components/GrSplitter/chunks/GrSplitter-BzxVQwbY.js.map +1 -0
  179. package/dist/components/GrSplitter/index.js +2 -2
  180. package/dist/components/GrStatistic/chunks/{GrStatistic-CttyoYPT.js → GrStatistic-DOsM6s5V.js} +54 -7
  181. package/dist/components/GrStatistic/chunks/GrStatistic-DOsM6s5V.js.map +1 -0
  182. package/dist/components/GrStatistic/index.js +2 -2
  183. package/dist/components/GrSwitch/chunks/{GrSwitch-B9TYbiih.js → GrSwitch-DpyvVrZG.js} +1 -1
  184. package/dist/components/GrSwitch/chunks/{GrSwitch-B9TYbiih.js.map → GrSwitch-DpyvVrZG.js.map} +1 -1
  185. package/dist/components/GrSwitch/index.js +2 -2
  186. package/dist/components/GrTabPanels/index.js +1 -1
  187. package/dist/components/GrTable/chunks/{GrTable-BB-mI_NM.js → GrTable-BfqgwETQ.js} +7 -1
  188. package/dist/components/GrTable/chunks/GrTable-BfqgwETQ.js.map +1 -0
  189. package/dist/components/GrTable/index.js +1 -1
  190. package/dist/components/GrTabs/chunks/{GrTabs-B8CDq2D9.js → GrTabs-f3-oQenu.js} +55 -65
  191. package/dist/components/GrTabs/chunks/GrTabs-f3-oQenu.js.map +1 -0
  192. package/dist/components/GrTabs/index.js +1 -1
  193. package/dist/components/GrTextarea/chunks/{GrTextarea-DUh5Tlo4.js → GrTextarea-DSvd1nSy.js} +1 -1
  194. package/dist/components/GrTextarea/chunks/{GrTextarea-DUh5Tlo4.js.map → GrTextarea-DSvd1nSy.js.map} +1 -1
  195. package/dist/components/GrTextarea/index.js +2 -2
  196. package/dist/components/GrTimeline/chunks/{GrTimeline-CE9b3s18.js → GrTimeline-B-h2Yanw.js} +1 -1
  197. package/dist/components/GrTimeline/chunks/{GrTimeline-CE9b3s18.js.map → GrTimeline-B-h2Yanw.js.map} +1 -1
  198. package/dist/components/GrTimeline/index.js +2 -2
  199. package/dist/components/GrToaster/chunks/{GrToaster-BKQy3Srm.js → GrToaster-Dqja0Lf9.js} +114 -13
  200. package/dist/components/GrToaster/chunks/GrToaster-Dqja0Lf9.js.map +1 -0
  201. package/dist/components/GrToaster/index.js +2 -2
  202. package/dist/components/GrToaster/styles.css +1 -1
  203. package/dist/components/GrTooltip/chunks/{GrTooltip-DEbejfhA.js → GrTooltip-Cn08heWz.js} +2 -2
  204. package/dist/components/GrTooltip/chunks/{GrTooltip-DEbejfhA.js.map → GrTooltip-Cn08heWz.js.map} +1 -1
  205. package/dist/components/GrTooltip/index.js +2 -2
  206. package/dist/components/GrTree/chunks/{GrTree-wfdbvygw.js → GrTree-BR9a2pay.js} +148 -111
  207. package/dist/components/GrTree/chunks/GrTree-BR9a2pay.js.map +1 -0
  208. package/dist/components/GrTree/index.js +2 -2
  209. package/dist/components/GrTree/styles.css +1 -1
  210. package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-lLWmAMtI.js → GrTreeSelect--muUeB0v.js} +28 -14
  211. package/dist/components/GrTreeSelect/chunks/GrTreeSelect--muUeB0v.js.map +1 -0
  212. package/dist/components/GrTreeSelect/index.js +1 -1
  213. package/dist/composables/useAnnouncer.js +1 -1
  214. package/dist/composables/useComboboxNavigation.js +71 -0
  215. package/dist/composables/useComboboxNavigation.js.map +1 -0
  216. package/dist/composables/useDismissible.js +1 -1
  217. package/dist/composables/useDragGesture.js +55 -0
  218. package/dist/composables/useDragGesture.js.map +1 -0
  219. package/dist/composables/useDragSort.js +2 -0
  220. package/dist/composables/useFloating.js +22 -1
  221. package/dist/composables/useFloating.js.map +1 -1
  222. package/dist/composables/useGrComponentConfig.js +2 -0
  223. package/dist/composables/useGranularityTranslations.js +2 -0
  224. package/dist/composables/useOverlayLayer.js +64 -1
  225. package/dist/composables/useOverlayLayer.js.map +1 -0
  226. package/dist/composables/usePortalTarget.js +1 -1
  227. package/dist/composables/useRovingFocus.js +150 -0
  228. package/dist/composables/useRovingFocus.js.map +1 -0
  229. package/dist/directives/hotkey.js +13 -7
  230. package/dist/directives/hotkey.js.map +1 -1
  231. package/dist/directives/loading.js +1 -1
  232. package/dist/granular-provider-node.js +1 -1
  233. package/dist/granular-provider.js +1 -1
  234. package/dist/i18n/all.js +1 -1
  235. package/dist/i18n/index.js +1 -1
  236. package/dist/index.js +77 -68
  237. package/dist/styles/themes/dark.css +6 -1
  238. package/dist/testing.js +199 -0
  239. package/dist/testing.js.map +1 -0
  240. package/dist/theme-apply.js +33 -0
  241. package/dist/theme-apply.js.map +1 -0
  242. package/dist/theme.js +501 -0
  243. package/dist/theme.js.map +1 -0
  244. package/dist/tokens.js +1 -3131
  245. package/dist/types/src/components/GrAlert/defaults.d.ts +1 -1
  246. package/dist/types/src/components/GrAutocomplete/defaults.d.ts +1 -1
  247. package/dist/types/src/components/GrAvatar/defaults.d.ts +1 -1
  248. package/dist/types/src/components/GrBadge/defaults.d.ts +1 -1
  249. package/dist/types/src/components/GrBottomNav/defaults.d.ts +1 -1
  250. package/dist/types/src/components/GrBreadcrumbs/defaults.d.ts +1 -1
  251. package/dist/types/src/components/GrBreadcrumbs/grBreadcrumbsStyles.d.ts +5 -2
  252. package/dist/types/src/components/GrButton/defaults.d.ts +1 -1
  253. package/dist/types/src/components/GrCard/defaults.d.ts +1 -1
  254. package/dist/types/src/components/GrCheckbox/defaults.d.ts +1 -1
  255. package/dist/types/src/components/GrCheckboxGroup/defaults.d.ts +1 -1
  256. package/dist/types/src/components/GrCollapse/defaults.d.ts +1 -1
  257. package/dist/types/src/components/GrColorPicker/defaults.d.ts +1 -1
  258. package/dist/types/src/components/GrColorPicker/grColorPickerStyles.d.ts +2 -2
  259. package/dist/types/src/components/GrCommandPalette/GrCommandPalette.vue.d.ts +6 -6
  260. package/dist/types/src/components/GrCommandPalette/defaults.d.ts +1 -1
  261. package/dist/types/src/components/GrCommandPalette/filtering.d.ts +6 -2
  262. package/dist/types/src/components/GrConfigProvider/context.d.ts +6 -22
  263. package/dist/types/src/components/GrConfigProvider/index.d.ts +1 -1
  264. package/dist/types/src/components/GrConfirmDialog/defaults.d.ts +1 -1
  265. package/dist/types/src/components/GrDataTable/GrDataTable.vue.d.ts +53 -0
  266. package/dist/types/src/components/GrDataTable/defaults.d.ts +1 -1
  267. package/dist/types/src/components/GrDataTable/grDataTableStyles.d.ts +38 -0
  268. package/dist/types/src/components/GrDialog/defaults.d.ts +1 -1
  269. package/dist/types/src/components/GrDivider/defaults.d.ts +1 -1
  270. package/dist/types/src/components/GrDrawer/defaults.d.ts +1 -1
  271. package/dist/types/src/components/GrEmptyState/defaults.d.ts +1 -1
  272. package/dist/types/src/components/GrFileUpload/defaults.d.ts +1 -1
  273. package/dist/types/src/components/GrFormField/defaults.d.ts +1 -1
  274. package/dist/types/src/components/GrFormFile/defaults.d.ts +1 -1
  275. package/dist/types/src/components/GrFormSection/defaults.d.ts +1 -1
  276. package/dist/types/src/components/GrIcon/defaults.d.ts +1 -1
  277. package/dist/types/src/components/GrImageViewer/composables/usePointerGestures.d.ts +1 -0
  278. package/dist/types/src/components/GrImageViewer/composables/useZoomPan.d.ts +1 -2
  279. package/dist/types/src/components/GrInput/defaults.d.ts +1 -1
  280. package/dist/types/src/components/GrInputTag/defaults.d.ts +1 -1
  281. package/dist/types/src/components/GrKbd/GrKbd.vue.d.ts +18 -3
  282. package/dist/types/src/components/GrKbd/defaults.d.ts +1 -1
  283. package/dist/types/src/components/GrKbd/grKbdStyles.d.ts +20 -3
  284. package/dist/types/src/components/GrKbd/index.d.ts +6 -0
  285. package/dist/types/src/components/GrLink/defaults.d.ts +1 -1
  286. package/dist/types/src/components/GrModal/defaults.d.ts +1 -1
  287. package/dist/types/src/components/GrNumberInput/defaults.d.ts +1 -1
  288. package/dist/types/src/components/GrPagination/defaults.d.ts +1 -1
  289. package/dist/types/src/components/GrPopover/GrPopover.vue.d.ts +1 -1
  290. package/dist/types/src/components/GrPopover/defaults.d.ts +1 -1
  291. package/dist/types/src/components/GrProgressBar/defaults.d.ts +1 -1
  292. package/dist/types/src/components/GrProgressCircle/defaults.d.ts +1 -1
  293. package/dist/types/src/components/GrProgressCircle/grProgressCircleStyles.d.ts +1 -1
  294. package/dist/types/src/components/GrPromptDialog/defaults.d.ts +1 -1
  295. package/dist/types/src/components/GrRadio/defaults.d.ts +1 -1
  296. package/dist/types/src/components/GrRadio/grRadioGroupContext.d.ts +12 -4
  297. package/dist/types/src/components/GrRadioGroup/defaults.d.ts +1 -1
  298. package/dist/types/src/components/GrRating/GrRating.vue.d.ts +9 -4
  299. package/dist/types/src/components/GrRating/defaults.d.ts +1 -1
  300. package/dist/types/src/components/GrSegmented/defaults.d.ts +1 -1
  301. package/dist/types/src/components/GrSelect/defaults.d.ts +1 -1
  302. package/dist/types/src/components/GrSlider/defaults.d.ts +1 -1
  303. package/dist/types/src/components/GrSortableList/GrSortableList.vue.d.ts +68 -0
  304. package/dist/types/src/components/GrSortableList/config.d.ts +1 -0
  305. package/dist/types/src/components/GrSortableList/grSortableListStyles.d.ts +37 -0
  306. package/dist/types/src/components/GrSortableList/index.d.ts +9 -0
  307. package/dist/types/src/components/GrSortableList/safelist.d.ts +1 -0
  308. package/dist/types/src/components/GrSplitter/defaults.d.ts +1 -1
  309. package/dist/types/src/components/GrStatistic/GrStatistic.vue.d.ts +12 -9
  310. package/dist/types/src/components/GrStatistic/defaults.d.ts +1 -1
  311. package/dist/types/src/components/GrStatistic/grStatisticStyles.d.ts +1 -2
  312. package/dist/types/src/components/GrSwitch/defaults.d.ts +1 -1
  313. package/dist/types/src/components/GrTable/GrTable.vue.d.ts +13 -0
  314. package/dist/types/src/components/GrTable/defaults.d.ts +1 -1
  315. package/dist/types/src/components/GrTabs/GrTabs.vue.d.ts +6 -2
  316. package/dist/types/src/components/GrTabs/defaults.d.ts +1 -1
  317. package/dist/types/src/components/GrTextarea/defaults.d.ts +1 -1
  318. package/dist/types/src/components/GrTextarea/grTextareaStyles.d.ts +2 -2
  319. package/dist/types/src/components/GrTimeline/defaults.d.ts +1 -1
  320. package/dist/types/src/components/GrTimeline/grTimelineStyles.d.ts +1 -1
  321. package/dist/types/src/components/GrToaster/GrToaster.vue.d.ts +8 -0
  322. package/dist/types/src/components/GrToaster/grToasterStyles.d.ts +27 -0
  323. package/dist/types/src/components/GrTooltip/defaults.d.ts +1 -1
  324. package/dist/types/src/components/GrTree/defaults.d.ts +1 -1
  325. package/dist/types/src/components/GrTree/grTreeInteractionContext.d.ts +0 -1
  326. package/dist/types/src/components/GrTree/grTreeProps.d.ts +11 -4
  327. package/dist/types/src/components/GrTree/safelist.d.ts +1 -1
  328. package/dist/types/src/components/GrTreeSelect/defaults.d.ts +1 -1
  329. package/dist/types/src/components/shared/hotkey.d.ts +7 -15
  330. package/dist/types/src/components/shared/hotkeyTokens.d.ts +37 -0
  331. package/dist/types/src/components/shared/icon.d.ts +13 -0
  332. package/dist/types/src/composables/internal/dragSortGeometry.d.ts +59 -0
  333. package/dist/types/src/composables/internal/overlayStack.d.ts +11 -0
  334. package/dist/types/src/composables/useDragGesture.d.ts +63 -0
  335. package/dist/types/src/composables/useDragSort.d.ts +80 -0
  336. package/dist/types/src/composables/useFloating.d.ts +5 -1
  337. package/dist/types/src/composables/useGrComponentConfig.d.ts +41 -0
  338. package/dist/types/src/composables/useGranularityTranslations.d.ts +13 -0
  339. package/dist/types/src/composables/useRovingFocus.d.ts +108 -0
  340. package/dist/types/src/granular-provider/shared.d.ts +1 -0
  341. package/dist/types/src/i18n/messages/en.d.ts +48 -0
  342. package/dist/types/src/i18n/messages/es.d.ts +48 -0
  343. package/dist/types/src/i18n/messages/ru.d.ts +48 -0
  344. package/dist/types/src/index.d.ts +12 -0
  345. package/dist/types/src/internal/keyboard.d.ts +6 -0
  346. package/dist/types/src/testing/announcer.d.ts +10 -0
  347. package/dist/types/src/testing/context.d.ts +36 -0
  348. package/dist/types/src/testing/env.d.ts +25 -0
  349. package/dist/types/src/testing/geometry.d.ts +23 -0
  350. package/dist/types/src/testing/index.d.ts +12 -0
  351. package/dist/types/src/testing/pointer.d.ts +31 -0
  352. package/dist/types/src/theme/apply.d.ts +27 -0
  353. package/dist/types/src/theme/color.d.ts +35 -0
  354. package/dist/types/src/theme/extendTheme.d.ts +63 -0
  355. package/dist/types/src/theme/index.d.ts +22 -0
  356. package/dist/types/src/theme/roles.d.ts +16 -0
  357. package/dist/types/src/theme/tone.d.ts +32 -0
  358. package/dist/types/src/theme/validate.d.ts +16 -0
  359. package/dist/types/src/tokens/types.d.ts +8 -0
  360. package/dist/web-types.json +214 -13
  361. package/package.json +47 -4
  362. package/tokens/themes/dark.json +2 -1
  363. package/dist/chunks/chevron-right-BfqMVpbB.js.map +0 -1
  364. package/dist/chunks/config-8Pcutu1j.js.map +0 -1
  365. package/dist/chunks/config-B-g6lT19.js.map +0 -1
  366. package/dist/chunks/config-BE6n20np.js.map +0 -1
  367. package/dist/chunks/config-BKvX0q10.js.map +0 -1
  368. package/dist/chunks/config-BNfQwyL4.js +0 -97
  369. package/dist/chunks/config-BNfQwyL4.js.map +0 -1
  370. package/dist/chunks/config-BoNR7_PD.js.map +0 -1
  371. package/dist/chunks/config-CN2ULSQL2.js.map +0 -1
  372. package/dist/chunks/config-CY0_6cMi.js.map +0 -1
  373. package/dist/chunks/config-Cw6TDzWv2.js.map +0 -1
  374. package/dist/chunks/config-D8tSR2uS.js.map +0 -1
  375. package/dist/chunks/config-DpqOnJiz2.js.map +0 -1
  376. package/dist/chunks/config-DxCTVBfx.js.map +0 -1
  377. package/dist/chunks/config-LGrZIdaZ.js +0 -21
  378. package/dist/chunks/config-LGrZIdaZ.js.map +0 -1
  379. package/dist/chunks/config-Rw9OyW70.js.map +0 -1
  380. package/dist/chunks/config-T3qdQBgU.js.map +0 -1
  381. package/dist/chunks/config-eXB87DOi2.js.map +0 -1
  382. package/dist/chunks/en-B3xMeswz.js.map +0 -1
  383. package/dist/chunks/es-CA-mkU--.js.map +0 -1
  384. package/dist/chunks/grKbdStyles-DAoxiytu.js +0 -31
  385. package/dist/chunks/grKbdStyles-DAoxiytu.js.map +0 -1
  386. package/dist/chunks/granular-provider-CtrXGa7c.js.map +0 -1
  387. package/dist/chunks/keyboard-zYvvyHd4.js.map +0 -1
  388. package/dist/chunks/optionFilter-BVY988pC.js.map +0 -1
  389. package/dist/chunks/ru-COWxgh2A.js.map +0 -1
  390. package/dist/chunks/useOverlayLayer-BupuP_hs.js.map +0 -1
  391. package/dist/components/GrAutocomplete/chunks/GrAutocomplete-CQ9T7Lly.js.map +0 -1
  392. package/dist/components/GrBreadcrumbs/chunks/GrBreadcrumbs-BCNGDS6k.js.map +0 -1
  393. package/dist/components/GrCommandPalette/chunks/GrCommandPalette-MWDYDPNC.js.map +0 -1
  394. package/dist/components/GrDataTable/chunks/GrDataTable-DVFho9Cj.js.map +0 -1
  395. package/dist/components/GrImageViewer/chunks/GrImageViewer-BeCnE8XQ.js.map +0 -1
  396. package/dist/components/GrInput/chunks/GrInput-DD2gYdqS.js.map +0 -1
  397. package/dist/components/GrInputTag/chunks/GrInputTag-DmNunixz.js.map +0 -1
  398. package/dist/components/GrKbd/chunks/GrKbd-DRFPvW3G.js.map +0 -1
  399. package/dist/components/GrPagination/chunks/GrPagination-B6N0QZBf.js.map +0 -1
  400. package/dist/components/GrProgressBar/chunks/GrProgressBar-BiHnaitu.js.map +0 -1
  401. package/dist/components/GrRadio/chunks/GrRadio-DksDro_U.js.map +0 -1
  402. package/dist/components/GrRadioGroup/chunks/GrRadioGroup-BOIhejE6.js.map +0 -1
  403. package/dist/components/GrRating/chunks/GrRating-JrHXz0Rv.js.map +0 -1
  404. package/dist/components/GrSegmented/chunks/GrSegmented-BQIlH5KI.js.map +0 -1
  405. package/dist/components/GrSelect/chunks/GrSelect-aqkPCqjd.js.map +0 -1
  406. package/dist/components/GrSlider/chunks/GrSlider-DkU9IQSX.js.map +0 -1
  407. package/dist/components/GrSplitter/chunks/GrSplitter-7To8jbJ8.js.map +0 -1
  408. package/dist/components/GrStatistic/chunks/GrStatistic-CttyoYPT.js.map +0 -1
  409. package/dist/components/GrTable/chunks/GrTable-BB-mI_NM.js.map +0 -1
  410. package/dist/components/GrTabs/chunks/GrTabs-B8CDq2D9.js.map +0 -1
  411. package/dist/components/GrToaster/chunks/GrToaster-BKQy3Srm.js.map +0 -1
  412. package/dist/components/GrTree/chunks/GrTree-wfdbvygw.js.map +0 -1
  413. package/dist/components/GrTreeSelect/chunks/GrTreeSelect-lLWmAMtI.js.map +0 -1
  414. package/dist/tokens.js.map +0 -1
  415. package/dist/chunks/{config-8Pcutu1j.js → config-8Pcutu1j2.js} +0 -0
  416. package/dist/chunks/{config-BE6n20np.js → config-BE6n20np2.js} +0 -0
  417. package/dist/chunks/{config-BKvX0q10.js → config-BKvX0q102.js} +0 -0
  418. package/dist/chunks/{config-BoNR7_PD.js → config-BoNR7_PD2.js} +0 -0
  419. package/dist/chunks/{config-CN2ULSQL2.js → config-CN2ULSQL.js} +0 -0
  420. package/dist/chunks/{config-CY0_6cMi.js → config-CY0_6cMi2.js} +0 -0
  421. package/dist/chunks/{config-Rw9OyW70.js → config-Rw9OyW702.js} +0 -0
  422. package/dist/chunks/{config-T3qdQBgU.js → config-T3qdQBgU2.js} +0 -0
  423. package/dist/chunks/{config-eXB87DOi2.js → config-eXB87DOi.js} +0 -0
  424. package/dist/components/GrCollapse/chunks/{GrCollapse-B2Fc6A9r.js → GrCollapse-Kk0DE8tb.js} +1 -1
  425. /package/dist/types/src/composables/{internal/useComboboxNavigation.d.ts → useComboboxNavigation.d.ts} +0 -0
@@ -1,12 +1,18 @@
1
1
  import { o as useGrComponentSize } from "../../../chunks/context-BSYR7RZs.js";
2
2
  import { n as useGranularityTranslations } from "../../../chunks/granularityI18n-BC5zsj_d.js";
3
+ import { t as loader_circle_default } from "../../../chunks/loader-circle-CfVLz7lb.js";
3
4
  import { t as GrIcon_default } from "../../GrIcon/chunks/GrIcon-BvA2ZGXP.js";
4
5
  import { useVirtualList } from "../../../composables/useVirtualList.js";
5
6
  import { t as GrCheckbox_default } from "../../GrCheckbox/chunks/GrCheckbox-BLOp8452.js";
6
- import { t as GrTable_default } from "../../GrTable/chunks/GrTable-BB-mI_NM.js";
7
- import { a as headerTextSizes, c as selectCheckboxSizes, d as spinnerSizes, i as headerGaps, l as selectColumnWidths, o as placeholderPaddings, r as cellPaddings, s as rowHeightEstimates, u as sortIconSizes } from "../../../chunks/config-BNfQwyL4.js";
7
+ import { useDragGesture } from "../../../composables/useDragGesture.js";
8
+ import { t as GrTable_default } from "../../GrTable/chunks/GrTable-BfqgwETQ.js";
9
+ import { useAnnouncer } from "../../../composables/useAnnouncer.js";
10
+ import { n as insertionIndex, r as moveItem, t as useDragSort } from "../../../chunks/useDragSort-0l47h4yb.js";
11
+ import { useRovingFocus } from "../../../composables/useRovingFocus.js";
12
+ import { C as sortIconSizes, S as selectColumnWidths, _ as headerTextSizes, a as columnDropAfterClass, b as rowSelectedClass, c as columnHandleClass, d as columnPinnedRightEdgeClass, f as columnResizerClass, g as headerGaps, h as columnResizerLineClass, i as columnDraggingClass, l as columnPinnedClass, m as columnResizerLineActiveClass, o as columnDropBeforeClass, p as columnResizerHoverClass, r as cellPaddings, s as columnHandleActiveClass, u as columnPinnedLeftEdgeClass, v as placeholderPaddings, w as spinnerSizes, x as selectCheckboxSizes, y as rowHeightEstimates } from "../../../chunks/config-BJ7Bv_G2.js";
8
13
  import { t as arrow_up_default } from "../../../chunks/arrow-up-C_G4jg8M.js";
9
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, markRaw, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, withCtx, withModifiers } from "vue";
14
+ import { t as grip_vertical_default } from "../../../chunks/grip-vertical-lRha2S7q.js";
15
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, markRaw, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, watch, withCtx, withModifiers } from "vue";
10
16
  //#region src/components/GrDataTable/grDataTableSort.ts
11
17
  /** Пустое значение ячейки: нечего сравнивать, место таким — в конце списка. */
12
18
  function isEmptyCell(value) {
@@ -83,48 +89,77 @@ var arrow_down_default = markRaw({
83
89
  //#region src/components/GrDataTable/GrDataTable.vue?vue&type=script&setup=true&lang.ts
84
90
  var _hoisted_1 = ["id"];
85
91
  var _hoisted_2 = ["aria-rowindex"];
86
- var _hoisted_3 = ["aria-sort"];
87
- var _hoisted_4 = ["onClick"];
88
- var _hoisted_5 = { class: "sr-only" };
89
- var _hoisted_6 = {
92
+ var _hoisted_3 = ["data-column-key", "aria-sort"];
93
+ var _hoisted_4 = [
94
+ "tabindex",
95
+ "aria-label",
96
+ "disabled",
97
+ "onPointerdown",
98
+ "onKeydown",
99
+ "onFocus"
100
+ ];
101
+ var _hoisted_5 = ["onClick"];
102
+ var _hoisted_6 = { class: "sr-only" };
103
+ var _hoisted_7 = {
90
104
  class: "inline-flex",
91
105
  "aria-hidden": "true"
92
106
  };
93
- var _hoisted_7 = {
94
- key: 1,
107
+ var _hoisted_8 = {
108
+ key: 2,
95
109
  class: "text-[var(--gr-muted-fg)]"
96
110
  };
97
- var _hoisted_8 = {
111
+ var _hoisted_9 = [
112
+ "aria-label",
113
+ "aria-valuenow",
114
+ "aria-valuetext",
115
+ "onPointerdown",
116
+ "onKeydown",
117
+ "onDblclick"
118
+ ];
119
+ var _hoisted_10 = {
98
120
  key: 0,
99
121
  "data-gr-datatable-loading": ""
100
122
  };
101
- var _hoisted_9 = ["colspan"];
102
- var _hoisted_10 = { class: "inline-flex items-center gap-2" };
103
- var _hoisted_11 = {
123
+ var _hoisted_11 = ["colspan"];
124
+ var _hoisted_12 = { class: "inline-flex items-center gap-2" };
125
+ var _hoisted_13 = {
104
126
  key: 1,
105
127
  "data-gr-datatable-empty": ""
106
128
  };
107
- var _hoisted_12 = ["colspan"];
108
- var _hoisted_13 = {
129
+ var _hoisted_14 = ["colspan"];
130
+ var _hoisted_15 = {
109
131
  key: 0,
110
132
  "aria-hidden": "true",
111
133
  "data-gr-datatable-spacer": "before",
112
134
  style: { pointerEvents: "none" }
113
135
  };
114
- var _hoisted_14 = ["colspan"];
115
- var _hoisted_15 = [
136
+ var _hoisted_16 = ["colspan"];
137
+ var _hoisted_17 = [
116
138
  "data-row-key",
117
139
  "data-selected",
118
140
  "aria-rowindex",
119
141
  "onClick"
120
142
  ];
121
- var _hoisted_16 = {
143
+ var _hoisted_18 = {
122
144
  key: 1,
123
145
  "aria-hidden": "true",
124
146
  "data-gr-datatable-spacer": "after",
125
147
  style: { pointerEvents: "none" }
126
148
  };
127
- var _hoisted_17 = ["colspan"];
149
+ var _hoisted_19 = ["colspan"];
150
+ /**
151
+ * `GrDataTable` — data-таблица поверх `GrTable` с сортировкой по клику
152
+ * на заголовок и scoped-слотами ячеек (`#cell-<key>`), `#header-<key>`,
153
+ * `#caption`, `#footer`, `#empty`, `#loading`.
154
+ *
155
+ * Сортировка, включая крайние случаи с пустыми и смешанными значениями, живёт
156
+ * в `grDataTableSort.ts` — см. `docs/components/GrDataTable.md`.
157
+ */
158
+ var MIN_COLUMN_WIDTH = 48;
159
+ /** Шаг клавиатуры и крупный шаг — как у `GrSplitter`. */
160
+ var RESIZE_STEP = 16;
161
+ var RESIZE_BIG_STEP = 48;
162
+ var SELECT_COLUMN_KEY = "__select__";
128
163
  //#endregion
129
164
  //#region src/components/GrDataTable/GrDataTable.vue
130
165
  var GrDataTable_default = /* @__PURE__ */ defineComponent({
@@ -181,19 +216,34 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
181
216
  type: Boolean,
182
217
  default: false
183
218
  },
184
- maxHeight: { default: void 0 }
219
+ maxHeight: { default: void 0 },
220
+ reorderableColumns: {
221
+ type: Boolean,
222
+ default: false
223
+ },
224
+ columnOrder: { default: void 0 },
225
+ resizableColumns: {
226
+ type: Boolean,
227
+ default: false
228
+ },
229
+ columnWidths: { default: void 0 }
185
230
  },
186
231
  emits: [
187
232
  "update:sortKey",
188
233
  "update:sortDir",
189
234
  "sortChange",
190
235
  "update:selected",
191
- "rowClick"
236
+ "rowClick",
237
+ "update:columnOrder",
238
+ "columnReorder",
239
+ "update:columnWidths",
240
+ "columnResize"
192
241
  ],
193
242
  setup(__props, { expose: __expose, emit: __emit }) {
194
243
  const props = __props;
195
244
  const emit = __emit;
196
245
  const { t, locale } = useGranularityTranslations();
246
+ const { announce } = useAnnouncer();
197
247
  const resolvedLoadingText = computed(() => props.loadingText ?? t("gr.dataTable.loading", "Loading…"));
198
248
  const resolvedEmptyText = computed(() => props.emptyText ?? t("gr.dataTable.empty", "No data"));
199
249
  const internalSortKey = ref(props.initialSortKey ?? "");
@@ -305,6 +355,57 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
305
355
  function ariaRowIndex(index) {
306
356
  return props.virtual ? index + 2 : void 0;
307
357
  }
358
+ const isEmpty = computed(() => sortedRows.value.length === 0);
359
+ const totalColumns = computed(() => props.columns.length + (props.selectable ? 1 : 0));
360
+ /** Uncontrolled-состояние; в controlled-режиме перекрывается пропом `columnOrder`. */
361
+ const internalColumnOrder = ref(props.columns.map((col) => String(col.key)));
362
+ /**
363
+ * Колонки в пользовательском порядке.
364
+ *
365
+ * Состав задаёт `columns`, порядок — только порядок: ключ, которого в наборе
366
+ * нет, игнорируется, а колонка, которой нет в порядке (её только что добавили),
367
+ * встаёт в конец. Иначе правка `columns` теряла бы колонки молча.
368
+ */
369
+ const orderedColumns = computed(() => {
370
+ const order = props.columnOrder ?? internalColumnOrder.value;
371
+ const remaining = new Map(props.columns.map((col) => [String(col.key), col]));
372
+ const ordered = [];
373
+ for (const key of order) {
374
+ const col = remaining.get(key);
375
+ if (!col) continue;
376
+ remaining.delete(key);
377
+ ordered.push(col);
378
+ }
379
+ for (const col of props.columns) if (remaining.has(String(col.key))) ordered.push(col);
380
+ return ordered.sort((a, b) => pinGroupOf(a) - pinGroupOf(b));
381
+ });
382
+ /** Группа закрепления: 0 — слева, 1 — обычная колонка, 2 — справа. */
383
+ function pinGroupOf(col) {
384
+ if (col.pinned === "left") return 0;
385
+ if (col.pinned === "right") return 2;
386
+ return 1;
387
+ }
388
+ /**
389
+ * Сумма заданных ширин — минимальная ширина таблицы.
390
+ *
391
+ * Без неё фиксированная раскладка вписывает таблицу в контейнер и делит место
392
+ * пропорционально: колонка, которую пользователь растянул, ужимается обратно, а
393
+ * горизонтальной прокрутки — той самой, ради которой закрепляют колонки, — не
394
+ * возникает. Считается, только когда ширина известна у **всех** колонок: с
395
+ * одной неизвестной сумма врала бы.
396
+ */
397
+ const tableMinWidth = computed(() => {
398
+ const cols = orderedColumns.value;
399
+ if (cols.length === 0) return void 0;
400
+ let total = 0;
401
+ for (const col of cols) {
402
+ const width = widthOf(col);
403
+ if (typeof width !== "number") return void 0;
404
+ total += width;
405
+ }
406
+ return total;
407
+ });
408
+ const columnKeys = computed(() => orderedColumns.value.map((col) => String(col.key)));
308
409
  const tableProps = computed(() => ({
309
410
  size: resolvedSize.value,
310
411
  ariaLabel: props.ariaLabel,
@@ -313,10 +414,289 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
313
414
  stickyHeader: props.stickyHeader,
314
415
  maxHeight: props.maxHeight,
315
416
  rowCount: ariaRowCount.value,
316
- fixedLayout: props.virtual
417
+ fixedLayout: props.virtual || props.resizableColumns,
418
+ tableMinWidth: tableMinWidth.value
317
419
  }));
318
- const isEmpty = computed(() => sortedRows.value.length === 0);
319
- const totalColumns = computed(() => props.columns.length + (props.selectable ? 1 : 0));
420
+ function indexOfColumn(key) {
421
+ return columnKeys.value.indexOf(key);
422
+ }
423
+ const headerCellEls = /* @__PURE__ */ new Map();
424
+ const columnHandleEls = /* @__PURE__ */ new Map();
425
+ function registerEl(store, key, el) {
426
+ if (el instanceof HTMLElement) {
427
+ store.set(key, el);
428
+ return;
429
+ }
430
+ const previous = store.get(key);
431
+ if (previous && !previous.isConnected) store.delete(key);
432
+ }
433
+ function applyColumnMove(from, to) {
434
+ const keys = columnKeys.value;
435
+ if (from < 0 || to < 0 || to >= keys.length || from === to) return;
436
+ if (!sameGroup(from, to)) return;
437
+ const key = keys[from];
438
+ const label = orderedColumns.value[from]?.label ?? key;
439
+ const next = moveItem(keys, from, to);
440
+ internalColumnOrder.value = next;
441
+ emit("update:columnOrder", next);
442
+ emit("columnReorder", {
443
+ key,
444
+ from,
445
+ to
446
+ });
447
+ announce(t("gr.dataTable.columnMoved", "Column {label} moved to position {position} of {count}", {
448
+ label,
449
+ position: to + 1,
450
+ count: keys.length
451
+ }));
452
+ }
453
+ const columnSort = useDragSort({
454
+ items: () => columnKeys.value,
455
+ elementFor: (key) => headerCellEls.get(key) ?? null,
456
+ orientation: () => "horizontal",
457
+ disabled: () => !props.reorderableColumns || props.loading,
458
+ resolveTarget: (hit, source) => {
459
+ const to = insertionIndex(hit, indexOfColumn(source), columnKeys.value.length);
460
+ return sameGroup(indexOfColumn(source), to) ? to : null;
461
+ },
462
+ onDrop: (source, to) => applyColumnMove(indexOfColumn(source), to)
463
+ });
464
+ function sameGroup(from, to) {
465
+ const cols = orderedColumns.value;
466
+ if (!cols[from] || !cols[to]) return false;
467
+ return pinGroupOf(cols[from]) === pinGroupOf(cols[to]);
468
+ }
469
+ /**
470
+ * Кольцо роверного фокуса по ручкам: одна остановка `Tab` на всю шапку.
471
+ * Иначе таблица из десяти колонок добавляла бы десять таб-стопов подряд.
472
+ */
473
+ const columnRoving = useRovingFocus({
474
+ items: () => props.reorderableColumns ? columnKeys.value : [],
475
+ elementFor: (key) => columnHandleEls.get(key) ?? null,
476
+ orientation: () => "horizontal",
477
+ wrap: () => false
478
+ });
479
+ async function onColumnHandleKeydown(event, key) {
480
+ if (!props.reorderableColumns) return;
481
+ if (event.shiftKey && (event.key === "ArrowLeft" || event.key === "ArrowRight")) {
482
+ event.preventDefault();
483
+ const from = indexOfColumn(key);
484
+ applyColumnMove(from, event.key === "ArrowLeft" ? from - 1 : from + 1);
485
+ await nextTick();
486
+ await columnRoving.focusKey(key);
487
+ return;
488
+ }
489
+ columnRoving.handleNavigationKeys(event);
490
+ }
491
+ const draggingColumnKey = computed(() => columnSort.mode.value === null ? null : columnSort.source.value);
492
+ /** Полоса места вставки — на колонке-соседе, со стороны движения. */
493
+ function columnDropClass(index) {
494
+ const target = columnSort.target.value;
495
+ if (!columnSort.isActive.value || target === null || target !== index) return "";
496
+ const active = columnSort.source.value === null ? -1 : indexOfColumn(columnSort.source.value);
497
+ if (index === active) return "";
498
+ return target < active ? columnDropBeforeClass : columnDropAfterClass;
499
+ }
500
+ const columnHandleLabel = (col) => t("gr.dataTable.moveColumn", "Move column {label}", { label: col.label });
501
+ /** Уже колонки не бывает: в неё перестаёт помещаться даже стрелка сортировки. */
502
+ const internalColumnWidths = ref({});
503
+ const columnWidths = computed(() => props.columnWidths ?? internalColumnWidths.value);
504
+ /** Фактические ширины шапки: заполняются замером, см. `measureLayout`. */
505
+ const measuredColumnWidths = ref({});
506
+ /** Ширина колонки: заданная пользователем сильнее объявленной в `columns`. */
507
+ function widthOf(col) {
508
+ return columnWidths.value[String(col.key)] ?? col.width;
509
+ }
510
+ const resizingKey = ref(null);
511
+ let pendingResizeKey = null;
512
+ let resizeStartX = 0;
513
+ let resizeStartWidth = 0;
514
+ let widthBeforeResize;
515
+ function setColumnWidth(key, width) {
516
+ const next = {
517
+ ...columnWidths.value,
518
+ [key]: Math.max(MIN_COLUMN_WIDTH, Math.round(width))
519
+ };
520
+ internalColumnWidths.value = next;
521
+ emit("update:columnWidths", next);
522
+ }
523
+ function announceWidth(key) {
524
+ const col = orderedColumns.value.find((item) => String(item.key) === key);
525
+ if (!col) return;
526
+ announce(t("gr.dataTable.columnResized", "Column {label} is {width} pixels wide", {
527
+ label: col.label,
528
+ width: columnWidths.value[key] ?? 0
529
+ }));
530
+ }
531
+ const resizeGesture = useDragGesture({
532
+ disabled: () => !props.resizableColumns || props.loading,
533
+ onStart: (event) => {
534
+ const key = pendingResizeKey;
535
+ const el = key === null ? null : headerCellEls.get(key);
536
+ if (key === null || !el) return false;
537
+ resizeStartX = event.clientX;
538
+ resizeStartWidth = el.getBoundingClientRect().width;
539
+ widthBeforeResize = columnWidths.value[key];
540
+ resizingKey.value = key;
541
+ },
542
+ onMove: (event) => {
543
+ if (resizingKey.value === null) return;
544
+ event.preventDefault();
545
+ setColumnWidth(resizingKey.value, resizeStartWidth + (event.clientX - resizeStartX));
546
+ },
547
+ onEnd: () => {
548
+ const key = resizingKey.value;
549
+ resizingKey.value = null;
550
+ if (key === null) return;
551
+ emit("columnResize", {
552
+ key,
553
+ width: columnWidths.value[key] ?? Math.round(resizeStartWidth)
554
+ });
555
+ announceWidth(key);
556
+ },
557
+ onCancel: () => {
558
+ const key = resizingKey.value;
559
+ resizingKey.value = null;
560
+ if (key === null) return;
561
+ const next = { ...columnWidths.value };
562
+ if (widthBeforeResize === void 0) delete next[key];
563
+ else next[key] = widthBeforeResize;
564
+ internalColumnWidths.value = next;
565
+ emit("update:columnWidths", next);
566
+ }
567
+ });
568
+ function onResizerPointerDown(event, key) {
569
+ pendingResizeKey = key;
570
+ resizeGesture.start(event);
571
+ }
572
+ /** Сброс к авторазметке: колонка снова считается по содержимому. */
573
+ function resetColumnWidth(key) {
574
+ if (columnWidths.value[key] === void 0) return;
575
+ const next = { ...columnWidths.value };
576
+ delete next[key];
577
+ internalColumnWidths.value = next;
578
+ emit("update:columnWidths", next);
579
+ emit("columnResize", {
580
+ key,
581
+ width: 0
582
+ });
583
+ }
584
+ function resizeByKeyboard(key, delta) {
585
+ const measured = headerCellEls.get(key)?.getBoundingClientRect().width ?? MIN_COLUMN_WIDTH;
586
+ const current = columnWidths.value[key] ?? measured;
587
+ setColumnWidth(key, current + delta);
588
+ emit("columnResize", {
589
+ key,
590
+ width: columnWidths.value[key] ?? current
591
+ });
592
+ announceWidth(key);
593
+ }
594
+ function onResizerKeydown(event, key) {
595
+ if (!props.resizableColumns || props.loading) return;
596
+ const step = event.shiftKey ? RESIZE_BIG_STEP : RESIZE_STEP;
597
+ if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
598
+ event.preventDefault();
599
+ resizeByKeyboard(key, event.key === "ArrowLeft" ? -step : step);
600
+ return;
601
+ }
602
+ if (event.key === "Enter") {
603
+ event.preventDefault();
604
+ resetColumnWidth(key);
605
+ }
606
+ }
607
+ function resizerLabel(col) {
608
+ return t("gr.dataTable.resizeColumn", "Width of column {label}", { label: col.label });
609
+ }
610
+ /**
611
+ * Ручка ресайза — фокусируемый `separator`, а значит обязана называть текущее
612
+ * значение с первого рендера, до всякого перетаскивания. Заданной ширины у
613
+ * колонки может не быть вовсе (авторазметка), поэтому за значением идём к
614
+ * измеренной; до замера остаётся объявленная в `columns`, а её тоже может не
615
+ * быть — тогда минимум.
616
+ */
617
+ function resizerValue(col) {
618
+ const key = String(col.key);
619
+ const declared = typeof col.width === "number" ? col.width : void 0;
620
+ return columnWidths.value[key] ?? measuredColumnWidths.value[key] ?? declared ?? MIN_COLUMN_WIDTH;
621
+ }
622
+ /** Служебная колонка выбора в реестре ячеек: своего ключа у неё нет. */
623
+ const hasPinnedLeft = computed(() => orderedColumns.value.some((col) => col.pinned === "left"));
624
+ const pinnedOffsets = ref({});
625
+ /**
626
+ * Смещения липких колонок считаются по **измеренным** ширинам соседей: колонка
627
+ * может жить на авторазметке, и тогда взять смещение больше неоткуда. Отсюда же
628
+ * порядок: замер после отрисовки, а не в вычислении.
629
+ */
630
+ function measurePinnedOffsets() {
631
+ const next = {};
632
+ const cols = orderedColumns.value;
633
+ let left = props.selectable && hasPinnedLeft.value ? headerCellEls.get(SELECT_COLUMN_KEY)?.getBoundingClientRect().width ?? 0 : 0;
634
+ for (const col of cols) {
635
+ if (col.pinned !== "left") continue;
636
+ next[String(col.key)] = left;
637
+ left += headerCellEls.get(String(col.key))?.getBoundingClientRect().width ?? 0;
638
+ }
639
+ let right = 0;
640
+ for (let index = cols.length - 1; index >= 0; index -= 1) {
641
+ const col = cols[index];
642
+ if (col.pinned !== "right") continue;
643
+ next[String(col.key)] = right;
644
+ right += headerCellEls.get(String(col.key))?.getBoundingClientRect().width ?? 0;
645
+ }
646
+ pinnedOffsets.value = next;
647
+ }
648
+ function measureColumnWidths() {
649
+ if (!props.resizableColumns) return;
650
+ const next = {};
651
+ for (const col of orderedColumns.value) {
652
+ const key = String(col.key);
653
+ const width = headerCellEls.get(key)?.getBoundingClientRect().width;
654
+ if (width) next[key] = Math.round(width);
655
+ }
656
+ measuredColumnWidths.value = next;
657
+ }
658
+ function measureLayout() {
659
+ measurePinnedOffsets();
660
+ measureColumnWidths();
661
+ }
662
+ function pinnedStyleOf(col) {
663
+ if (!col.pinned) return void 0;
664
+ const offset = pinnedOffsets.value[String(col.key)] ?? 0;
665
+ return col.pinned === "left" ? { left: `${offset}px` } : { right: `${offset}px` };
666
+ }
667
+ /** Тень рисует только крайняя колонка группы — иначе полос было бы столько же, сколько колонок. */
668
+ function pinnedEdgeClass(col, index) {
669
+ if (col.pinned === "left") return orderedColumns.value[index + 1]?.pinned === "left" ? "" : columnPinnedLeftEdgeClass;
670
+ if (col.pinned === "right") return orderedColumns.value[index - 1]?.pinned === "right" ? "" : columnPinnedRightEdgeClass;
671
+ return "";
672
+ }
673
+ function pinnedCellClass(col, index) {
674
+ if (!col.pinned) return [];
675
+ return [columnPinnedClass, pinnedEdgeClass(col, index)];
676
+ }
677
+ /**
678
+ * Ширину колонки меняет не только правка пропов: окно, шрифт и содержимое
679
+ * ячейки двигают её сами. `ResizeObserver` — единственный способ узнать об этом;
680
+ * в jsdom и на сервере его нет, там хватает пересчёта по изменению данных.
681
+ */
682
+ let layoutObserver = null;
683
+ onMounted(() => {
684
+ measureLayout();
685
+ if (typeof ResizeObserver === "undefined") return;
686
+ layoutObserver = new ResizeObserver(() => measureLayout());
687
+ const el = headerCellEls.get(SELECT_COLUMN_KEY) ?? headerCellEls.get(columnKeys.value[0]);
688
+ if (el?.parentElement) layoutObserver.observe(el.parentElement);
689
+ });
690
+ onUnmounted(() => {
691
+ layoutObserver?.disconnect();
692
+ layoutObserver = null;
693
+ });
694
+ watch(() => [
695
+ orderedColumns.value,
696
+ columnWidths.value,
697
+ props.loading,
698
+ props.rows.length
699
+ ], () => void nextTick(measureLayout));
320
700
  /**
321
701
  * Живой регион существует с первого рендера и пуст, пока объявлять нечего.
322
702
  * Регион, который появляется уже с текстом, часть AT не объявляет вовсе —
@@ -478,7 +858,13 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
478
858
  "aria-rowindex": __props.virtual ? 1 : void 0
479
859
  }, [__props.selectable ? (openBlock(), createElementBlock("th", {
480
860
  key: 0,
481
- class: normalizeClass(["text-left", [selectColumnClass.value, cellClass.value]]),
861
+ ref: (el) => registerEl(unref(headerCellEls), SELECT_COLUMN_KEY, el),
862
+ class: normalizeClass(["text-left", [
863
+ selectColumnClass.value,
864
+ cellClass.value,
865
+ hasPinnedLeft.value ? unref(columnPinnedClass) : ""
866
+ ]]),
867
+ style: normalizeStyle(hasPinnedLeft.value ? { left: "0px" } : void 0),
482
868
  scope: "col"
483
869
  }, [createVNode(GrCheckbox_default, {
484
870
  "data-gr-datatable-select-all": "",
@@ -494,27 +880,54 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
494
880
  "size",
495
881
  "disabled",
496
882
  "aria-label"
497
- ])], 2)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col) => {
883
+ ])], 6)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(orderedColumns.value, (col, colIndex) => {
498
884
  return openBlock(), createElementBlock("th", {
499
885
  key: col.key,
886
+ ref_for: true,
887
+ ref: (el) => registerEl(unref(headerCellEls), String(col.key), el),
500
888
  class: normalizeClass(["font-700", [
501
889
  headerTextClass.value,
502
890
  cellClass.value,
503
- cellAlign(col)
891
+ cellAlign(col),
892
+ __props.reorderableColumns || __props.resizableColumns ? "group relative" : "",
893
+ draggingColumnKey.value === String(col.key) ? unref(columnDraggingClass) : "",
894
+ columnDropClass(colIndex),
895
+ ...pinnedCellClass(col, colIndex)
504
896
  ]]),
505
- style: normalizeStyle(columnWidthStyle(col.width)),
897
+ "data-column-key": col.key,
898
+ style: normalizeStyle({
899
+ ...columnWidthStyle(widthOf(col)),
900
+ ...pinnedStyleOf(col)
901
+ }),
506
902
  "aria-sort": ariaSortFor(col),
507
903
  scope: "col"
508
- }, [createElementVNode("div", { class: normalizeClass(["inline-flex items-center", headerGapClass.value]) }, [col.sortable ? (openBlock(), createElementBlock("button", {
904
+ }, [createElementVNode("div", { class: normalizeClass(["inline-flex items-center", headerGapClass.value]) }, [__props.reorderableColumns ? (openBlock(), createElementBlock("button", {
509
905
  key: 0,
906
+ ref_for: true,
907
+ ref: (el) => registerEl(unref(columnHandleEls), String(col.key), el),
908
+ type: "button",
909
+ "data-gr-datatable-column-handle": "",
910
+ class: normalizeClass([unref(columnHandleClass), unref(columnSort).isActive.value ? unref(columnHandleActiveClass) : ""]),
911
+ tabindex: unref(columnRoving).tabindexFor(String(col.key)),
912
+ "aria-label": columnHandleLabel(col),
913
+ disabled: __props.loading,
914
+ onPointerdown: ($event) => unref(columnSort).startFrom(String(col.key))($event),
915
+ onKeydown: ($event) => onColumnHandleKeydown($event, String(col.key)),
916
+ onFocus: ($event) => unref(columnRoving).setActive(String(col.key)),
917
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
918
+ }, [createVNode(unref(grip_vertical_default), {
919
+ class: "block",
920
+ "aria-hidden": "true"
921
+ })], 42, _hoisted_4)) : createCommentVNode("", true), col.sortable ? (openBlock(), createElementBlock("button", {
922
+ key: 1,
510
923
  type: "button",
511
924
  "data-gr-datatable-sort": "",
512
925
  class: normalizeClass(["inline-flex items-center text-[var(--gr-muted-fg)] hover:text-[var(--gr-fg)] transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--gr-ring)] rounded-[var(--gr-radius-sm)]", headerGapClass.value]),
513
926
  onClick: ($event) => toggleSort(col)
514
927
  }, [
515
928
  createElementVNode("span", null, [renderSlot(_ctx.$slots, `header-${col.key}`, { column: col }, () => [createTextVNode(toDisplayString(col.label), 1)])]),
516
- createElementVNode("span", _hoisted_5, toDisplayString(sortHint(col)), 1),
517
- createElementVNode("span", _hoisted_6, [currentSortKey.value === col.key && currentSortDir.value === "asc" ? (openBlock(), createBlock(GrIcon_default, {
929
+ createElementVNode("span", _hoisted_6, toDisplayString(sortHint(col)), 1),
930
+ createElementVNode("span", _hoisted_7, [currentSortKey.value === col.key && currentSortDir.value === "asc" ? (openBlock(), createBlock(GrIcon_default, {
518
931
  key: 0,
519
932
  size: sortIconSize.value
520
933
  }, {
@@ -527,70 +940,107 @@ var GrDataTable_default = /* @__PURE__ */ defineComponent({
527
940
  default: withCtx(() => [createVNode(unref(arrow_down_default))]),
528
941
  _: 1
529
942
  }, 8, ["size"])) : createCommentVNode("", true)])
530
- ], 10, _hoisted_4)) : (openBlock(), createElementBlock("span", _hoisted_7, [renderSlot(_ctx.$slots, `header-${col.key}`, { column: col }, () => [createTextVNode(toDisplayString(col.label), 1)])]))], 2)], 14, _hoisted_3);
943
+ ], 10, _hoisted_5)) : (openBlock(), createElementBlock("span", _hoisted_8, [renderSlot(_ctx.$slots, `header-${col.key}`, { column: col }, () => [createTextVNode(toDisplayString(col.label), 1)])]))], 2), __props.resizableColumns ? (openBlock(), createElementBlock("span", {
944
+ key: 0,
945
+ "data-gr-datatable-column-resizer": "",
946
+ role: "separator",
947
+ tabindex: "0",
948
+ "aria-orientation": "vertical",
949
+ class: normalizeClass(unref(columnResizerClass)),
950
+ "aria-label": resizerLabel(col),
951
+ "aria-valuenow": resizerValue(col),
952
+ "aria-valuemin": MIN_COLUMN_WIDTH,
953
+ "aria-valuetext": `${resizerValue(col)}px`,
954
+ onPointerdown: ($event) => onResizerPointerDown($event, String(col.key)),
955
+ onKeydown: ($event) => onResizerKeydown($event, String(col.key)),
956
+ onDblclick: ($event) => resetColumnWidth(String(col.key)),
957
+ onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
958
+ }, [createElementVNode("span", {
959
+ class: normalizeClass([
960
+ unref(columnResizerLineClass),
961
+ unref(columnResizerHoverClass),
962
+ resizingKey.value === String(col.key) ? unref(columnResizerLineActiveClass) : ""
963
+ ]),
964
+ "aria-hidden": "true"
965
+ }, null, 2)], 42, _hoisted_9)) : createCommentVNode("", true)], 14, _hoisted_3);
531
966
  }), 128))], 8, _hoisted_2)]),
532
- default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock("tr", _hoisted_8, [createElementVNode("td", {
967
+ default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock("tr", _hoisted_10, [createElementVNode("td", {
533
968
  colspan: totalColumns.value,
534
969
  class: normalizeClass(["text-center text-[var(--gr-muted-fg)]", placeholderClass.value])
535
- }, [renderSlot(_ctx.$slots, "loading", {}, () => [createElementVNode("span", _hoisted_10, [createElementVNode("span", {
536
- class: normalizeClass(["i-lucide-loader-circle block animate-spin", spinnerClass.value]),
970
+ }, [renderSlot(_ctx.$slots, "loading", {}, () => [createElementVNode("span", _hoisted_12, [createVNode(unref(loader_circle_default), {
971
+ class: normalizeClass(["block animate-spin", spinnerClass.value]),
537
972
  "aria-hidden": "true"
538
- }, null, 2), createElementVNode("span", null, toDisplayString(resolvedLoadingText.value), 1)])])], 10, _hoisted_9)])) : isEmpty.value ? (openBlock(), createElementBlock("tr", _hoisted_11, [createElementVNode("td", {
973
+ }, null, 8, ["class"]), createElementVNode("span", null, toDisplayString(resolvedLoadingText.value), 1)])])], 10, _hoisted_11)])) : isEmpty.value ? (openBlock(), createElementBlock("tr", _hoisted_13, [createElementVNode("td", {
539
974
  colspan: totalColumns.value,
540
975
  class: normalizeClass(["text-center text-[var(--gr-muted-fg)]", placeholderClass.value])
541
- }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(resolvedEmptyText.value), 1)])], 10, _hoisted_12)])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
542
- __props.virtual && spacerBefore.value > 0 ? (openBlock(), createElementBlock("tr", _hoisted_13, [createElementVNode("td", {
976
+ }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(resolvedEmptyText.value), 1)])], 10, _hoisted_14)])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
977
+ __props.virtual && spacerBefore.value > 0 ? (openBlock(), createElementBlock("tr", _hoisted_15, [createElementVNode("td", {
543
978
  colspan: totalColumns.value,
544
979
  style: normalizeStyle({
545
980
  height: `${spacerBefore.value}px`,
546
981
  padding: "0",
547
982
  border: "0"
548
983
  })
549
- }, null, 12, _hoisted_14)])) : createCommentVNode("", true),
984
+ }, null, 12, _hoisted_16)])) : createCommentVNode("", true),
550
985
  (openBlock(true), createElementBlock(Fragment, null, renderList(renderedRows.value, ({ row, index }) => {
551
986
  return openBlock(), createElementBlock("tr", mergeProps({
552
987
  key: rowKeyValue(row),
553
988
  ref_for: true,
554
989
  ref: (el) => __props.virtual && unref(virtualizer).measure(index, el),
555
- class: ["border-t border-[var(--gr-brd)]", [isRowSelected(row) ? "bg-[color-mix(in_srgb,var(--gr-primary)_8%,transparent)]" : "", rowClassName(row, index)]],
990
+ class: ["border-t border-[var(--gr-brd)]", [isRowSelected(row) ? unref(rowSelectedClass) : "", rowClassName(row, index)]],
556
991
  "data-gr-datatable-row": "",
557
992
  "data-row-key": rowKeyValue(row),
558
993
  "data-selected": __props.selectable && isRowSelected(row) ? "true" : void 0,
559
994
  "aria-rowindex": ariaRowIndex(index)
560
995
  }, { ref_for: true }, __props.rowProps?.(row, index), { onClick: ($event) => onRowClick(row, index, $event) }), [__props.selectable ? (openBlock(), createElementBlock("td", {
561
996
  key: 0,
562
- class: normalizeClass(["text-left", [selectColumnClass.value, cellClass.value]])
997
+ class: normalizeClass(["text-left", [
998
+ selectColumnClass.value,
999
+ cellClass.value,
1000
+ hasPinnedLeft.value ? unref(columnPinnedClass) : "",
1001
+ hasPinnedLeft.value && isRowSelected(row) ? unref(rowSelectedClass) : ""
1002
+ ]]),
1003
+ style: normalizeStyle(hasPinnedLeft.value ? { left: "0px" } : void 0)
563
1004
  }, [isRowSelectable(row) ? (openBlock(), createBlock(GrCheckbox_default, {
564
1005
  key: 0,
565
1006
  "data-gr-datatable-select-row": "",
566
1007
  "model-value": isRowSelected(row),
567
1008
  size: checkboxSize.value,
568
1009
  "aria-label": unref(t)("gr.dataTable.selectRow", "Select row"),
569
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
1010
+ onClick: _cache[2] || (_cache[2] = withModifiers(() => {}, ["stop"])),
570
1011
  "onUpdate:modelValue": ($event) => toggleRow(row)
571
1012
  }, null, 8, [
572
1013
  "model-value",
573
1014
  "size",
574
1015
  "aria-label",
575
1016
  "onUpdate:modelValue"
576
- ])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col) => {
1017
+ ])) : createCommentVNode("", true)], 6)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(orderedColumns.value, (col, colIndex) => {
577
1018
  return openBlock(), createElementBlock("td", {
578
1019
  key: col.key,
579
- class: normalizeClass([cellClass.value, cellAlign(col)])
1020
+ class: normalizeClass([
1021
+ cellClass.value,
1022
+ cellAlign(col),
1023
+ ...pinnedCellClass(col, colIndex),
1024
+ col.pinned && isRowSelected(row) ? unref(rowSelectedClass) : ""
1025
+ ]),
1026
+ style: normalizeStyle({
1027
+ ...columnWidthStyle(widthOf(col)),
1028
+ ...pinnedStyleOf(col)
1029
+ })
580
1030
  }, [renderSlot(_ctx.$slots, `cell-${col.key}`, {
581
1031
  row,
582
1032
  index
583
- }, () => [createElementVNode("span", null, toDisplayString(cellValue(row, col.key)), 1)])], 2);
584
- }), 128))], 16, _hoisted_15);
1033
+ }, () => [createElementVNode("span", null, toDisplayString(cellValue(row, col.key)), 1)])], 6);
1034
+ }), 128))], 16, _hoisted_17);
585
1035
  }), 128)),
586
- __props.virtual && spacerAfter.value > 0 ? (openBlock(), createElementBlock("tr", _hoisted_16, [createElementVNode("td", {
1036
+ __props.virtual && spacerAfter.value > 0 ? (openBlock(), createElementBlock("tr", _hoisted_18, [createElementVNode("td", {
587
1037
  colspan: totalColumns.value,
588
1038
  style: normalizeStyle({
589
1039
  height: `${spacerAfter.value}px`,
590
1040
  padding: "0",
591
1041
  border: "0"
592
1042
  })
593
- }, null, 12, _hoisted_17)])) : createCommentVNode("", true)
1043
+ }, null, 12, _hoisted_19)])) : createCommentVNode("", true)
594
1044
  ], 64))]),
595
1045
  _: 2
596
1046
  }, [_ctx.$slots.footer ? {