@pibit.ai/cure-design-system 0.4.0 → 0.5.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 (438) hide show
  1. package/dist/applications/loading-indicator/index.d.ts +2 -0
  2. package/dist/applications/loading-indicator/index.d.ts.map +1 -0
  3. package/dist/applications/loading-indicator/loading-indicator.d.ts +1 -2
  4. package/dist/applications/loading-indicator/loading-indicator.d.ts.map +1 -1
  5. package/dist/assets/icons/filtered-view.svg.js +4 -0
  6. package/dist/index.d.ts +10 -5
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +415 -134
  9. package/dist/patterns/table/TableWrapper.d.ts +1 -1
  10. package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
  11. package/dist/patterns/table/TableWrapper.js +1003 -565
  12. package/dist/patterns/table/TableZoomControl.d.ts +12 -0
  13. package/dist/patterns/table/TableZoomControl.d.ts.map +1 -0
  14. package/dist/patterns/table/TableZoomControl.js +136 -0
  15. package/dist/patterns/table/cellRangeSelection.d.ts +83 -0
  16. package/dist/patterns/table/cellRangeSelection.d.ts.map +1 -0
  17. package/dist/patterns/table/cellRangeSelection.js +162 -0
  18. package/dist/patterns/table/cellRangeSelection.test.d.ts +2 -0
  19. package/dist/patterns/table/cellRangeSelection.test.d.ts.map +1 -0
  20. package/dist/patterns/table/index.d.ts +13 -6
  21. package/dist/patterns/table/index.d.ts.map +1 -1
  22. package/dist/patterns/table/integrateTableUndoRedo.d.ts +41 -0
  23. package/dist/patterns/table/integrateTableUndoRedo.d.ts.map +1 -0
  24. package/dist/patterns/table/integrateTableUndoRedo.js +63 -0
  25. package/dist/patterns/table/rowReorderDrag.d.ts +70 -0
  26. package/dist/patterns/table/rowReorderDrag.d.ts.map +1 -0
  27. package/dist/patterns/table/rowReorderDrag.js +151 -0
  28. package/dist/patterns/table/rowReorderDrag.test.d.ts +2 -0
  29. package/dist/patterns/table/rowReorderDrag.test.d.ts.map +1 -0
  30. package/dist/patterns/table/scrollCellIntoView.d.ts +48 -0
  31. package/dist/patterns/table/scrollCellIntoView.d.ts.map +1 -0
  32. package/dist/patterns/table/scrollCellIntoView.js +122 -0
  33. package/dist/patterns/table/storyHelpers/mockTableViewsApi.d.ts +25 -0
  34. package/dist/patterns/table/storyHelpers/mockTableViewsApi.d.ts.map +1 -0
  35. package/dist/patterns/table/storyHelpers/useMockTableState.d.ts +3 -1
  36. package/dist/patterns/table/storyHelpers/useMockTableState.d.ts.map +1 -1
  37. package/dist/patterns/table/table.d.ts +2 -1
  38. package/dist/patterns/table/table.d.ts.map +1 -1
  39. package/dist/patterns/table/table.js +203 -177
  40. package/dist/patterns/table/tableUndoRedo.d.ts +38 -0
  41. package/dist/patterns/table/tableUndoRedo.d.ts.map +1 -0
  42. package/dist/patterns/table/tableUndoRedo.js +150 -0
  43. package/dist/patterns/table/tableZoomLayout.d.ts +87 -0
  44. package/dist/patterns/table/tableZoomLayout.d.ts.map +1 -0
  45. package/dist/patterns/table/tableZoomLayout.js +55 -0
  46. package/dist/patterns/table/tableZoomLayout.test.d.ts +2 -0
  47. package/dist/patterns/table/tableZoomLayout.test.d.ts.map +1 -0
  48. package/dist/patterns/table/toolbar/AlignDropdown.d.ts.map +1 -1
  49. package/dist/patterns/table/toolbar/AlignDropdown.js +5 -11
  50. package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts +4 -0
  51. package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts.map +1 -1
  52. package/dist/patterns/table/toolbar/ColumnHeaderMenu.js +81 -77
  53. package/dist/patterns/table/toolbar/GroupByDropdown.d.ts.map +1 -1
  54. package/dist/patterns/table/toolbar/GroupByDropdown.js +48 -43
  55. package/dist/patterns/table/toolbar/HideFieldsDropdown.d.ts.map +1 -1
  56. package/dist/patterns/table/toolbar/HideFieldsDropdown.js +75 -32
  57. package/dist/patterns/table/toolbar/RowActionsMenu.d.ts +17 -1
  58. package/dist/patterns/table/toolbar/RowActionsMenu.d.ts.map +1 -1
  59. package/dist/patterns/table/toolbar/RowActionsMenu.js +69 -51
  60. package/dist/patterns/table/toolbar/SummaryFooter.d.ts +10 -3
  61. package/dist/patterns/table/toolbar/SummaryFooter.d.ts.map +1 -1
  62. package/dist/patterns/table/toolbar/SummaryFooter.js +61 -71
  63. package/dist/patterns/table/toolbar/TableToolbar.d.ts +22 -1
  64. package/dist/patterns/table/toolbar/TableToolbar.d.ts.map +1 -1
  65. package/dist/patterns/table/toolbar/TableToolbar.js +234 -139
  66. package/dist/patterns/table/toolbar/TableViewDirtyActions.d.ts +7 -0
  67. package/dist/patterns/table/toolbar/TableViewDirtyActions.d.ts.map +1 -0
  68. package/dist/patterns/table/toolbar/TableViewDirtyActions.js +39 -0
  69. package/dist/patterns/table/toolbar/TableViewsDropdown.d.ts +8 -0
  70. package/dist/patterns/table/toolbar/TableViewsDropdown.d.ts.map +1 -0
  71. package/dist/patterns/table/toolbar/TableViewsDropdown.js +204 -0
  72. package/dist/patterns/table/toolbar/index.d.ts +6 -2
  73. package/dist/patterns/table/toolbar/index.d.ts.map +1 -1
  74. package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts +10 -1
  75. package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts.map +1 -1
  76. package/dist/patterns/table/toolbar/tableToolbarHelpers.js +116 -116
  77. package/dist/patterns/table/toolbar/tableViewSnapshot.d.ts +18 -0
  78. package/dist/patterns/table/toolbar/tableViewSnapshot.d.ts.map +1 -0
  79. package/dist/patterns/table/toolbar/tableViewSnapshot.js +168 -0
  80. package/dist/patterns/table/toolbar/tableViewSnapshot.test.d.ts +2 -0
  81. package/dist/patterns/table/toolbar/tableViewSnapshot.test.d.ts.map +1 -0
  82. package/dist/patterns/table/toolbar/tableViewTypes.d.ts +75 -0
  83. package/dist/patterns/table/toolbar/tableViewTypes.d.ts.map +1 -0
  84. package/dist/patterns/table/toolbar/tableViewTypes.js +4 -0
  85. package/dist/patterns/table/toolbar/useUndoRedoShortcuts.d.ts +9 -0
  86. package/dist/patterns/table/toolbar/useUndoRedoShortcuts.d.ts.map +1 -0
  87. package/dist/patterns/table/toolbar/useUndoRedoShortcuts.js +21 -0
  88. package/dist/patterns/table/types.d.ts +98 -1
  89. package/dist/patterns/table/types.d.ts.map +1 -1
  90. package/dist/patterns/table/useFitTableToViewport.d.ts +15 -0
  91. package/dist/patterns/table/useFitTableToViewport.d.ts.map +1 -0
  92. package/dist/patterns/table/useFitTableToViewport.js +47 -0
  93. package/dist/patterns/table/useGridKeyboardNavigation.d.ts +14 -3
  94. package/dist/patterns/table/useGridKeyboardNavigation.d.ts.map +1 -1
  95. package/dist/patterns/table/useGridKeyboardNavigation.js +47 -46
  96. package/dist/patterns/table/useTableUndoRedo.d.ts +50 -0
  97. package/dist/patterns/table/useTableUndoRedo.d.ts.map +1 -0
  98. package/dist/patterns/table/useTableUndoRedo.js +258 -0
  99. package/dist/patterns/table/useTableZoomState.d.ts +20 -0
  100. package/dist/patterns/table/useTableZoomState.d.ts.map +1 -0
  101. package/dist/patterns/table/useTableZoomState.js +30 -0
  102. package/dist/patterns/table-component/TableComponent.d.ts +6 -0
  103. package/dist/patterns/table-component/TableComponent.d.ts.map +1 -0
  104. package/dist/patterns/table-component/TableComponent.js +810 -0
  105. package/dist/patterns/table-component/buildTableColumns.d.ts +10 -0
  106. package/dist/patterns/table-component/buildTableColumns.d.ts.map +1 -0
  107. package/dist/patterns/table-component/buildTableColumns.js +65 -0
  108. package/dist/patterns/table-component/buildTableColumns.test.d.ts +2 -0
  109. package/dist/patterns/table-component/buildTableColumns.test.d.ts.map +1 -0
  110. package/dist/patterns/table-component/index.d.ts +5 -0
  111. package/dist/patterns/table-component/index.d.ts.map +1 -0
  112. package/dist/patterns/table-component/rowMetrics.d.ts +11 -0
  113. package/dist/patterns/table-component/rowMetrics.d.ts.map +1 -0
  114. package/dist/patterns/table-component/rowMetrics.js +15 -0
  115. package/dist/patterns/table-component/tableFeatures.d.ts +12 -0
  116. package/dist/patterns/table-component/tableFeatures.d.ts.map +1 -0
  117. package/dist/patterns/table-component/tableFeatures.js +14 -0
  118. package/dist/patterns/table-component/types.d.ts +207 -0
  119. package/dist/patterns/table-component/types.d.ts.map +1 -0
  120. package/dist/patterns/table-component/useCellRangeSelection.d.ts +50 -0
  121. package/dist/patterns/table-component/useCellRangeSelection.d.ts.map +1 -0
  122. package/dist/patterns/table-component/useCellRangeSelection.js +218 -0
  123. package/dist/patterns/table-component/useRowReorderDrag.d.ts +17 -0
  124. package/dist/patterns/table-component/useRowReorderDrag.d.ts.map +1 -0
  125. package/dist/patterns/table-component/useRowReorderDrag.js +109 -0
  126. package/dist/primitives/badge/badge.js +5 -5
  127. package/dist/primitives/checkbox/checkbox.d.ts.map +1 -1
  128. package/dist/primitives/checkbox/checkbox.js +16 -16
  129. package/dist/primitives/custom-icon/custom-icon.d.ts +5 -0
  130. package/dist/primitives/custom-icon/custom-icon.d.ts.map +1 -1
  131. package/dist/primitives/custom-icon/custom-icon.js +14 -16
  132. package/dist/primitives/custom-icon/icons/activity-icon-16x16.d.ts +6 -0
  133. package/dist/primitives/custom-icon/icons/activity-icon-16x16.d.ts.map +1 -0
  134. package/dist/primitives/custom-icon/icons/activity-icon-16x16.js +32 -0
  135. package/dist/primitives/custom-icon/icons/activity-icon.d.ts +6 -0
  136. package/dist/primitives/custom-icon/icons/activity-icon.d.ts.map +1 -0
  137. package/dist/primitives/custom-icon/icons/activity-icon.js +32 -0
  138. package/dist/primitives/custom-icon/icons/activity-solid.d.ts +1 -1
  139. package/dist/primitives/custom-icon/icons/activity-solid.d.ts.map +1 -1
  140. package/dist/primitives/custom-icon/icons/activity-solid.js +24 -33
  141. package/dist/primitives/custom-icon/icons/activity.d.ts +6 -0
  142. package/dist/primitives/custom-icon/icons/activity.d.ts.map +1 -0
  143. package/dist/primitives/custom-icon/icons/activity.js +32 -0
  144. package/dist/primitives/custom-icon/icons/ai-extraction.d.ts +1 -1
  145. package/dist/primitives/custom-icon/icons/ai-extraction.d.ts.map +1 -1
  146. package/dist/primitives/custom-icon/icons/ai-extraction.js +24 -33
  147. package/dist/primitives/custom-icon/icons/aiservice.d.ts +6 -0
  148. package/dist/primitives/custom-icon/icons/aiservice.d.ts.map +1 -0
  149. package/dist/primitives/custom-icon/icons/aiservice.js +38 -0
  150. package/dist/primitives/custom-icon/icons/all-nodes.d.ts +6 -0
  151. package/dist/primitives/custom-icon/icons/all-nodes.d.ts.map +1 -0
  152. package/dist/primitives/custom-icon/icons/all-nodes.js +35 -0
  153. package/dist/primitives/custom-icon/icons/api-solid.d.ts +6 -0
  154. package/dist/primitives/custom-icon/icons/api-solid.d.ts.map +1 -0
  155. package/dist/primitives/custom-icon/icons/api-solid.js +32 -0
  156. package/dist/primitives/custom-icon/icons/api.d.ts +6 -0
  157. package/dist/primitives/custom-icon/icons/api.d.ts.map +1 -0
  158. package/dist/primitives/custom-icon/icons/api.js +32 -0
  159. package/dist/primitives/custom-icon/icons/arrow-up-2.d.ts +6 -0
  160. package/dist/primitives/custom-icon/icons/arrow-up-2.d.ts.map +1 -0
  161. package/dist/primitives/custom-icon/icons/arrow-up-2.js +32 -0
  162. package/dist/primitives/custom-icon/icons/azure.d.ts +6 -0
  163. package/dist/primitives/custom-icon/icons/azure.d.ts.map +1 -0
  164. package/dist/primitives/custom-icon/icons/azure.js +32 -0
  165. package/dist/primitives/custom-icon/icons/beaker-03.d.ts +6 -0
  166. package/dist/primitives/custom-icon/icons/beaker-03.d.ts.map +1 -0
  167. package/dist/primitives/custom-icon/icons/beaker-03.js +32 -0
  168. package/dist/primitives/custom-icon/icons/bell-with-dots.d.ts +6 -0
  169. package/dist/primitives/custom-icon/icons/bell-with-dots.d.ts.map +1 -0
  170. package/dist/primitives/custom-icon/icons/bell-with-dots.js +33 -0
  171. package/dist/primitives/custom-icon/icons/bell-without-dots.d.ts +6 -0
  172. package/dist/primitives/custom-icon/icons/bell-without-dots.d.ts.map +1 -0
  173. package/dist/primitives/custom-icon/icons/bell-without-dots.js +32 -0
  174. package/dist/primitives/custom-icon/icons/bill-02-18x23.d.ts +6 -0
  175. package/dist/primitives/custom-icon/icons/bill-02-18x23.d.ts.map +1 -0
  176. package/dist/primitives/custom-icon/icons/bill-02-18x23.js +32 -0
  177. package/dist/primitives/custom-icon/icons/bill-02.d.ts +6 -0
  178. package/dist/primitives/custom-icon/icons/bill-02.d.ts.map +1 -0
  179. package/dist/primitives/custom-icon/icons/bill-02.js +32 -0
  180. package/dist/primitives/custom-icon/icons/branch.d.ts +1 -1
  181. package/dist/primitives/custom-icon/icons/branch.d.ts.map +1 -1
  182. package/dist/primitives/custom-icon/icons/branch.js +16 -15
  183. package/dist/primitives/custom-icon/icons/calendar.d.ts +1 -1
  184. package/dist/primitives/custom-icon/icons/calendar.d.ts.map +1 -1
  185. package/dist/primitives/custom-icon/icons/calendar.js +24 -33
  186. package/dist/primitives/custom-icon/icons/callable.d.ts +1 -1
  187. package/dist/primitives/custom-icon/icons/callable.d.ts.map +1 -1
  188. package/dist/primitives/custom-icon/icons/callable.js +23 -22
  189. package/dist/primitives/custom-icon/icons/camico.d.ts +6 -0
  190. package/dist/primitives/custom-icon/icons/camico.d.ts.map +1 -0
  191. package/dist/primitives/custom-icon/icons/camico.js +38 -0
  192. package/dist/primitives/custom-icon/icons/check-circle-broken-solid.d.ts +1 -1
  193. package/dist/primitives/custom-icon/icons/check-circle-broken-solid.d.ts.map +1 -1
  194. package/dist/primitives/custom-icon/icons/check-circle-broken-solid.js +21 -20
  195. package/dist/primitives/custom-icon/icons/check-icon-20.d.ts +6 -0
  196. package/dist/primitives/custom-icon/icons/check-icon-20.d.ts.map +1 -0
  197. package/dist/primitives/custom-icon/icons/check-icon-20.js +33 -0
  198. package/dist/primitives/custom-icon/icons/check-icon-v2.d.ts +6 -0
  199. package/dist/primitives/custom-icon/icons/check-icon-v2.d.ts.map +1 -0
  200. package/dist/primitives/custom-icon/icons/check-icon-v2.js +33 -0
  201. package/dist/primitives/custom-icon/icons/check-icon.d.ts +6 -0
  202. package/dist/primitives/custom-icon/icons/check-icon.d.ts.map +1 -0
  203. package/dist/primitives/custom-icon/icons/check-icon.js +33 -0
  204. package/dist/primitives/custom-icon/icons/clear-cure.d.ts +1 -1
  205. package/dist/primitives/custom-icon/icons/clear-cure.d.ts.map +1 -1
  206. package/dist/primitives/custom-icon/icons/clear-cure.js +24 -35
  207. package/dist/primitives/custom-icon/icons/code-node.d.ts +1 -1
  208. package/dist/primitives/custom-icon/icons/code-node.d.ts.map +1 -1
  209. package/dist/primitives/custom-icon/icons/code-node.js +22 -23
  210. package/dist/primitives/custom-icon/icons/collapse-left.d.ts +1 -1
  211. package/dist/primitives/custom-icon/icons/collapse-left.d.ts.map +1 -1
  212. package/dist/primitives/custom-icon/icons/collapse-left.js +21 -23
  213. package/dist/primitives/custom-icon/icons/collapse-right.d.ts +1 -1
  214. package/dist/primitives/custom-icon/icons/collapse-right.d.ts.map +1 -1
  215. package/dist/primitives/custom-icon/icons/collapse-right.js +21 -23
  216. package/dist/primitives/custom-icon/icons/condition.d.ts +6 -0
  217. package/dist/primitives/custom-icon/icons/condition.d.ts.map +1 -0
  218. package/dist/primitives/custom-icon/icons/condition.js +32 -0
  219. package/dist/primitives/custom-icon/icons/custom-endpoint.d.ts +6 -0
  220. package/dist/primitives/custom-icon/icons/custom-endpoint.d.ts.map +1 -0
  221. package/dist/primitives/custom-icon/icons/custom-endpoint.js +32 -0
  222. package/dist/primitives/custom-icon/icons/dots.d.ts +6 -0
  223. package/dist/primitives/custom-icon/icons/dots.d.ts.map +1 -0
  224. package/dist/primitives/custom-icon/icons/dots.js +32 -0
  225. package/dist/primitives/custom-icon/icons/file-04-solid.d.ts +1 -1
  226. package/dist/primitives/custom-icon/icons/file-04-solid.d.ts.map +1 -1
  227. package/dist/primitives/custom-icon/icons/file-04-solid.js +22 -23
  228. package/dist/primitives/custom-icon/icons/file-edit-18x19.d.ts +6 -0
  229. package/dist/primitives/custom-icon/icons/file-edit-18x19.d.ts.map +1 -0
  230. package/dist/primitives/custom-icon/icons/file-edit-18x19.js +32 -0
  231. package/dist/primitives/custom-icon/icons/file-edit.d.ts +1 -1
  232. package/dist/primitives/custom-icon/icons/file-edit.d.ts.map +1 -1
  233. package/dist/primitives/custom-icon/icons/file-edit.js +23 -25
  234. package/dist/primitives/custom-icon/icons/files-manager.d.ts +6 -0
  235. package/dist/primitives/custom-icon/icons/files-manager.d.ts.map +1 -0
  236. package/dist/primitives/custom-icon/icons/files-manager.js +32 -0
  237. package/dist/primitives/custom-icon/icons/filtered-view.d.ts +6 -0
  238. package/dist/primitives/custom-icon/icons/filtered-view.d.ts.map +1 -0
  239. package/dist/primitives/custom-icon/icons/filtered-view.js +32 -0
  240. package/dist/primitives/custom-icon/icons/folder-open-40x40.d.ts +6 -0
  241. package/dist/primitives/custom-icon/icons/folder-open-40x40.d.ts.map +1 -0
  242. package/dist/primitives/custom-icon/icons/folder-open-40x40.js +68 -0
  243. package/dist/primitives/custom-icon/icons/folder-open.d.ts +6 -0
  244. package/dist/primitives/custom-icon/icons/folder-open.d.ts.map +1 -0
  245. package/dist/primitives/custom-icon/icons/folder-open.js +68 -0
  246. package/dist/primitives/custom-icon/icons/foresight.d.ts +6 -0
  247. package/dist/primitives/custom-icon/icons/foresight.d.ts.map +1 -0
  248. package/dist/primitives/custom-icon/icons/foresight.js +32 -0
  249. package/dist/primitives/custom-icon/icons/formula.d.ts +1 -1
  250. package/dist/primitives/custom-icon/icons/formula.d.ts.map +1 -1
  251. package/dist/primitives/custom-icon/icons/formula.js +20 -22
  252. package/dist/primitives/custom-icon/icons/gmail-big.d.ts +6 -0
  253. package/dist/primitives/custom-icon/icons/gmail-big.d.ts.map +1 -0
  254. package/dist/primitives/custom-icon/icons/gmail-big.js +38 -0
  255. package/dist/primitives/custom-icon/icons/gmail.d.ts +6 -0
  256. package/dist/primitives/custom-icon/icons/gmail.d.ts.map +1 -0
  257. package/dist/primitives/custom-icon/icons/gmail.js +39 -0
  258. package/dist/primitives/custom-icon/icons/google-chat.d.ts +6 -0
  259. package/dist/primitives/custom-icon/icons/google-chat.d.ts.map +1 -0
  260. package/dist/primitives/custom-icon/icons/google-chat.js +32 -0
  261. package/dist/primitives/custom-icon/icons/google.d.ts +6 -0
  262. package/dist/primitives/custom-icon/icons/google.d.ts.map +1 -0
  263. package/dist/primitives/custom-icon/icons/google.js +35 -0
  264. package/dist/primitives/custom-icon/icons/grid-plus.d.ts +1 -1
  265. package/dist/primitives/custom-icon/icons/grid-plus.d.ts.map +1 -1
  266. package/dist/primitives/custom-icon/icons/grid-plus.js +23 -25
  267. package/dist/primitives/custom-icon/icons/group-by.d.ts +6 -0
  268. package/dist/primitives/custom-icon/icons/group-by.d.ts.map +1 -0
  269. package/dist/primitives/custom-icon/icons/group-by.js +33 -0
  270. package/dist/primitives/custom-icon/icons/guidewire.d.ts +6 -0
  271. package/dist/primitives/custom-icon/icons/guidewire.d.ts.map +1 -0
  272. package/dist/primitives/custom-icon/icons/guidewire.js +33 -0
  273. package/dist/primitives/custom-icon/icons/http-endpoint.d.ts +1 -1
  274. package/dist/primitives/custom-icon/icons/http-endpoint.d.ts.map +1 -1
  275. package/dist/primitives/custom-icon/icons/http-endpoint.js +23 -22
  276. package/dist/primitives/custom-icon/icons/hubspot.d.ts +6 -0
  277. package/dist/primitives/custom-icon/icons/hubspot.d.ts.map +1 -0
  278. package/dist/primitives/custom-icon/icons/hubspot.js +32 -0
  279. package/dist/primitives/custom-icon/icons/integer-20.d.ts +6 -0
  280. package/dist/primitives/custom-icon/icons/integer-20.d.ts.map +1 -0
  281. package/dist/primitives/custom-icon/icons/integer-20.js +32 -0
  282. package/dist/primitives/custom-icon/icons/integer.d.ts +1 -1
  283. package/dist/primitives/custom-icon/icons/integer.d.ts.map +1 -1
  284. package/dist/primitives/custom-icon/icons/integer.js +22 -24
  285. package/dist/primitives/custom-icon/icons/loop.d.ts +1 -1
  286. package/dist/primitives/custom-icon/icons/loop.d.ts.map +1 -1
  287. package/dist/primitives/custom-icon/icons/loop.js +25 -46
  288. package/dist/primitives/custom-icon/icons/mail-01-solid.d.ts +1 -1
  289. package/dist/primitives/custom-icon/icons/mail-01-solid.d.ts.map +1 -1
  290. package/dist/primitives/custom-icon/icons/mail-01-solid.js +23 -30
  291. package/dist/primitives/custom-icon/icons/message-dots-square-solid.d.ts +1 -1
  292. package/dist/primitives/custom-icon/icons/message-dots-square-solid.d.ts.map +1 -1
  293. package/dist/primitives/custom-icon/icons/message-dots-square-solid.js +18 -21
  294. package/dist/primitives/custom-icon/icons/microsoft-outlook.d.ts +6 -0
  295. package/dist/primitives/custom-icon/icons/microsoft-outlook.d.ts.map +1 -0
  296. package/dist/primitives/custom-icon/icons/microsoft-outlook.js +103 -0
  297. package/dist/primitives/custom-icon/icons/microsoft.d.ts +6 -0
  298. package/dist/primitives/custom-icon/icons/microsoft.d.ts.map +1 -0
  299. package/dist/primitives/custom-icon/icons/microsoft.js +32 -0
  300. package/dist/primitives/custom-icon/icons/object-manager.d.ts +1 -1
  301. package/dist/primitives/custom-icon/icons/object-manager.d.ts.map +1 -1
  302. package/dist/primitives/custom-icon/icons/object-manager.js +23 -44
  303. package/dist/primitives/custom-icon/icons/okta.d.ts +6 -0
  304. package/dist/primitives/custom-icon/icons/okta.d.ts.map +1 -0
  305. package/dist/primitives/custom-icon/icons/okta.js +32 -0
  306. package/dist/primitives/custom-icon/icons/onedrive.d.ts +6 -0
  307. package/dist/primitives/custom-icon/icons/onedrive.d.ts.map +1 -0
  308. package/dist/primitives/custom-icon/icons/onedrive.js +78 -0
  309. package/dist/primitives/custom-icon/icons/outlook.d.ts +6 -0
  310. package/dist/primitives/custom-icon/icons/outlook.d.ts.map +1 -0
  311. package/dist/primitives/custom-icon/icons/outlook.js +103 -0
  312. package/dist/primitives/custom-icon/icons/platform.d.ts +6 -0
  313. package/dist/primitives/custom-icon/icons/platform.d.ts.map +1 -0
  314. package/dist/primitives/custom-icon/icons/platform.js +34 -0
  315. package/dist/primitives/custom-icon/icons/plus-circle-solid.d.ts +1 -1
  316. package/dist/primitives/custom-icon/icons/plus-circle-solid.d.ts.map +1 -1
  317. package/dist/primitives/custom-icon/icons/plus-circle-solid.js +22 -25
  318. package/dist/primitives/custom-icon/icons/primespecialty.d.ts +6 -0
  319. package/dist/primitives/custom-icon/icons/primespecialty.d.ts.map +1 -0
  320. package/dist/primitives/custom-icon/icons/primespecialty.js +41 -0
  321. package/dist/primitives/custom-icon/icons/queue.d.ts +6 -0
  322. package/dist/primitives/custom-icon/icons/queue.d.ts.map +1 -0
  323. package/dist/primitives/custom-icon/icons/queue.js +34 -0
  324. package/dist/primitives/custom-icon/icons/reorder-dots-8x14.d.ts +6 -0
  325. package/dist/primitives/custom-icon/icons/reorder-dots-8x14.d.ts.map +1 -0
  326. package/dist/primitives/custom-icon/icons/reorder-dots-8x14.js +37 -0
  327. package/dist/primitives/custom-icon/icons/reorder-dots-new.d.ts +6 -0
  328. package/dist/primitives/custom-icon/icons/reorder-dots-new.d.ts.map +1 -0
  329. package/dist/primitives/custom-icon/icons/reorder-dots-new.js +37 -0
  330. package/dist/primitives/custom-icon/icons/reorder-dots.d.ts +6 -0
  331. package/dist/primitives/custom-icon/icons/reorder-dots.d.ts.map +1 -0
  332. package/dist/primitives/custom-icon/icons/reorder-dots.js +37 -0
  333. package/dist/primitives/custom-icon/icons/rotate-icon-19x18.d.ts +6 -0
  334. package/dist/primitives/custom-icon/icons/rotate-icon-19x18.d.ts.map +1 -0
  335. package/dist/primitives/custom-icon/icons/rotate-icon-19x18.js +32 -0
  336. package/dist/primitives/custom-icon/icons/rotate-icon.d.ts +6 -0
  337. package/dist/primitives/custom-icon/icons/rotate-icon.d.ts.map +1 -0
  338. package/dist/primitives/custom-icon/icons/rotate-icon.js +32 -0
  339. package/dist/primitives/custom-icon/icons/salesforce.d.ts +6 -0
  340. package/dist/primitives/custom-icon/icons/salesforce.d.ts.map +1 -0
  341. package/dist/primitives/custom-icon/icons/salesforce.js +40 -0
  342. package/dist/primitives/custom-icon/icons/saml.d.ts +6 -0
  343. package/dist/primitives/custom-icon/icons/saml.d.ts.map +1 -0
  344. package/dist/primitives/custom-icon/icons/saml.js +35 -0
  345. package/dist/primitives/custom-icon/icons/show-summary.d.ts +6 -0
  346. package/dist/primitives/custom-icon/icons/show-summary.d.ts.map +1 -0
  347. package/dist/primitives/custom-icon/icons/show-summary.js +32 -0
  348. package/dist/primitives/custom-icon/icons/slack.d.ts +6 -0
  349. package/dist/primitives/custom-icon/icons/slack.d.ts.map +1 -0
  350. package/dist/primitives/custom-icon/icons/slack.js +35 -0
  351. package/dist/primitives/custom-icon/icons/sqs.d.ts +6 -0
  352. package/dist/primitives/custom-icon/icons/sqs.d.ts.map +1 -0
  353. package/dist/primitives/custom-icon/icons/sqs.js +34 -0
  354. package/dist/primitives/custom-icon/icons/stop-circle-solid.d.ts +6 -0
  355. package/dist/primitives/custom-icon/icons/stop-circle-solid.d.ts.map +1 -0
  356. package/dist/primitives/custom-icon/icons/stop-circle-solid.js +32 -0
  357. package/dist/primitives/custom-icon/icons/stop.d.ts +6 -0
  358. package/dist/primitives/custom-icon/icons/stop.d.ts.map +1 -0
  359. package/dist/primitives/custom-icon/icons/stop.js +33 -0
  360. package/dist/primitives/custom-icon/icons/submission.d.ts +1 -1
  361. package/dist/primitives/custom-icon/icons/submission.d.ts.map +1 -1
  362. package/dist/primitives/custom-icon/icons/submission.js +23 -22
  363. package/dist/primitives/custom-icon/icons/swap.d.ts +1 -1
  364. package/dist/primitives/custom-icon/icons/swap.d.ts.map +1 -1
  365. package/dist/primitives/custom-icon/icons/swap.js +30 -25
  366. package/dist/primitives/custom-icon/icons/test-tube.d.ts +6 -0
  367. package/dist/primitives/custom-icon/icons/test-tube.d.ts.map +1 -0
  368. package/dist/primitives/custom-icon/icons/test-tube.js +32 -0
  369. package/dist/primitives/custom-icon/icons/thumbs-down-solid.d.ts +1 -1
  370. package/dist/primitives/custom-icon/icons/thumbs-down-solid.d.ts.map +1 -1
  371. package/dist/primitives/custom-icon/icons/thumbs-down-solid.js +23 -30
  372. package/dist/primitives/custom-icon/icons/thumbs-up-solid.d.ts +1 -1
  373. package/dist/primitives/custom-icon/icons/thumbs-up-solid.d.ts.map +1 -1
  374. package/dist/primitives/custom-icon/icons/thumbs-up-solid.js +23 -30
  375. package/dist/primitives/custom-icon/icons/variable-node.d.ts +1 -1
  376. package/dist/primitives/custom-icon/icons/variable-node.d.ts.map +1 -1
  377. package/dist/primitives/custom-icon/icons/variable-node.js +23 -33
  378. package/dist/primitives/custom-icon/icons/variable.d.ts +6 -0
  379. package/dist/primitives/custom-icon/icons/variable.d.ts.map +1 -0
  380. package/dist/primitives/custom-icon/icons/variable.js +33 -0
  381. package/dist/primitives/custom-icon/icons/webhook-solid.d.ts +6 -0
  382. package/dist/primitives/custom-icon/icons/webhook-solid.d.ts.map +1 -0
  383. package/dist/primitives/custom-icon/icons/webhook-solid.js +34 -0
  384. package/dist/primitives/custom-icon/index.d.ts +2 -1
  385. package/dist/primitives/custom-icon/index.d.ts.map +1 -1
  386. package/dist/primitives/custom-icon/named-icons.d.ts +112 -0
  387. package/dist/primitives/custom-icon/named-icons.d.ts.map +1 -0
  388. package/dist/primitives/custom-icon/registry.d.ts +244 -4
  389. package/dist/primitives/custom-icon/registry.d.ts.map +1 -1
  390. package/dist/primitives/custom-icon/registry.js +472 -108
  391. package/dist/primitives/dropdown/dropdown.d.ts +11 -2
  392. package/dist/primitives/dropdown/dropdown.d.ts.map +1 -1
  393. package/dist/primitives/dropdown/dropdown.js +95 -66
  394. package/dist/primitives/dropdown/dropdown.nestedOverlay.test.d.ts +2 -0
  395. package/dist/primitives/dropdown/dropdown.nestedOverlay.test.d.ts.map +1 -0
  396. package/dist/primitives/icon/icons.js +1 -0
  397. package/dist/primitives/input/hint-text.d.ts +1 -2
  398. package/dist/primitives/input/hint-text.d.ts.map +1 -1
  399. package/dist/primitives/input/hint-text.js +1 -1
  400. package/dist/primitives/input/index.d.ts +3 -1
  401. package/dist/primitives/input/index.d.ts.map +1 -1
  402. package/dist/primitives/input/input.d.ts +2 -2
  403. package/dist/primitives/input/input.d.ts.map +1 -1
  404. package/dist/primitives/input/input.js +136 -129
  405. package/dist/primitives/input/label.d.ts +1 -2
  406. package/dist/primitives/input/label.d.ts.map +1 -1
  407. package/dist/primitives/multi-chips-select/MultiChipsSelect.d.ts +20 -0
  408. package/dist/primitives/multi-chips-select/MultiChipsSelect.d.ts.map +1 -0
  409. package/dist/primitives/multi-chips-select/MultiChipsSelect.js +233 -0
  410. package/dist/primitives/multi-chips-select/index.d.ts +3 -0
  411. package/dist/primitives/multi-chips-select/index.d.ts.map +1 -0
  412. package/dist/primitives/multi-chips-select/tagKeyFromLabel.d.ts +3 -0
  413. package/dist/primitives/multi-chips-select/tagKeyFromLabel.d.ts.map +1 -0
  414. package/dist/primitives/multi-chips-select/tagKeyFromLabel.js +6 -0
  415. package/dist/primitives/select/ExpandableSearchInput.d.ts +3 -1
  416. package/dist/primitives/select/ExpandableSearchInput.d.ts.map +1 -1
  417. package/dist/primitives/select/ExpandableSearchInput.js +101 -78
  418. package/dist/primitives/select/SearchInput.d.ts +10 -6
  419. package/dist/primitives/select/SearchInput.d.ts.map +1 -1
  420. package/dist/primitives/select/SearchInput.js +110 -85
  421. package/dist/primitives/select/combobox.d.ts.map +1 -1
  422. package/dist/primitives/select/combobox.js +48 -47
  423. package/dist/primitives/select/index.d.ts +1 -0
  424. package/dist/primitives/select/index.d.ts.map +1 -1
  425. package/dist/primitives/select/multi-select.d.ts.map +1 -1
  426. package/dist/primitives/select/multi-select.js +50 -49
  427. package/dist/primitives/select/select-item.d.ts +1 -2
  428. package/dist/primitives/select/select-item.d.ts.map +1 -1
  429. package/dist/primitives/tooltip/tooltip.d.ts +5 -1
  430. package/dist/primitives/tooltip/tooltip.d.ts.map +1 -1
  431. package/dist/primitives/tooltip/tooltip.js +35 -33
  432. package/dist/styles/components.css +1 -1
  433. package/dist/styles/theme.css +1 -1
  434. package/dist/utils/keyboard-shortcut.d.ts +4 -0
  435. package/dist/utils/keyboard-shortcut.d.ts.map +1 -0
  436. package/dist/utils/keyboard-shortcut.js +29 -0
  437. package/package.json +5 -2
  438. package/dist/primitives/custom-icon/icons/Placeholder.js +0 -39
@@ -1,448 +1,830 @@
1
- import { jsx as i, jsxs as k } from "react/jsx-runtime";
2
- import { forwardRef as qt, useState as q, useMemo as h, useCallback as B, useRef as Bt, useEffect as Jt, useLayoutEffect as Vt } from "react";
3
- import { ChevronRight as Xt } from "@untitledui/icons";
4
- import { cx as c } from "../../utils/cn.js";
5
- import { TableCard as Yt, Table as d } from "./table.js";
6
- import { TablePagination as Qt } from "./TablePagination.js";
7
- import { getEffectiveAlignment as lt, resolveColumnLabel as Zt, alignmentClass as Kt } from "./toolbar/tableToolbarHelpers.js";
8
- import { findGridCell as er, isWithinCellEditor as tr, getGridNeighbor as rr, getGridTabNeighbor as nr, focusGridCell as ir, GridNavProvider as sr } from "./useGridKeyboardNavigation.js";
9
- import { BulkActionBar as ar } from "./toolbar/BulkActionBar.js";
10
- import { TableToolbar as or } from "./toolbar/TableToolbar.js";
11
- import { Checkbox as nt } from "../../primitives/checkbox/checkbox.js";
12
- import { ColumnHeaderMenu as lr } from "./toolbar/ColumnHeaderMenu.js";
13
- import { Button as dr } from "../../primitives/button/button.js";
14
- import { SummaryFooterRow as cr } from "./toolbar/SummaryFooter.js";
15
- import { RowActionsMenu as fr } from "./toolbar/RowActionsMenu.js";
16
- import { Icon as hr } from "../../primitives/icon/icon.js";
17
- import { ShimmerLine as ur } from "../../primitives/shimmer/shimmer.js";
18
- const wr = 5, yr = "__all__", it = {
1
+ import { jsx as c, jsxs as S, Fragment as Jt } from "react/jsx-runtime";
2
+ import { forwardRef as Qr, useRef as se, useState as K, useMemo as k, useCallback as E, useEffect as Z, useLayoutEffect as Qt } from "react";
3
+ import { ChevronRight as en } from "@untitledui/icons";
4
+ import { cx as x } from "../../utils/cn.js";
5
+ import { TableCard as tn, Table as m } from "./table.js";
6
+ import { TablePagination as rn } from "./TablePagination.js";
7
+ import { TableZoomControl as nn } from "./TableZoomControl.js";
8
+ import { useFitTableToViewport as sn } from "./useFitTableToViewport.js";
9
+ import { useTableZoomState as on } from "./useTableZoomState.js";
10
+ import { getEffectiveAlignment as dr, resolveColumnLabel as an, alignmentClass as cn } from "./toolbar/tableToolbarHelpers.js";
11
+ import { parsePxValue as ht, DEFAULT_ZOOMABLE_COLUMN_MIN_WIDTH as er, supportsCssZoom as dn, DEFAULT_TABLE_ZOOM_MIN as ln, computeFillBaseWidth as un, computeEffectiveTableWidth as fn, computeFlexColumnWidth as pn, DEFAULT_COLUMN_MAX_WIDTH as lr, getTableZoomFontSize as hn, computeNeedsHorizontalScroll as yn } from "./tableZoomLayout.js";
12
+ import { findGridCell as tr, isWithinCellEditor as Ae, getGridNeighbor as wn, getGridTabNeighbor as mn, focusGridCell as rr, GridNavProvider as gn } from "./useGridKeyboardNavigation.js";
13
+ import { scrollGridCellIntoView as xn } from "./scrollCellIntoView.js";
14
+ import { ROW_DRAG_THRESHOLD_PX as Rn, computeDropTarget as vn, clipDropLineToScrollport as kn, ROW_REORDER_ATTR as nr, measureRowPreview as En, cloneRowForPreview as In, FloatingRowPreview as Ln, DropIndicatorLine as bn, getRowDragScrollDelta as Nn, ROW_DRAG_SOURCE_STYLE as Wn, ROW_SOURCE_INDEX_ATTR as Dn } from "./rowReorderDrag.js";
15
+ import { selectionFromSingleCell as yt, resolveCellCoordFromElement as Be, resolveRowAnchorCoordFromTarget as _n, buildCellRangeRect as wt, nextKeyboardCellSelection as Pn, CELL_RANGE_DRAG_THRESHOLD_PX as Sn, hitTestGridCell as Tn, canStartCellRangeFromTarget as ir, getDragScrollDeltas as Cn, getCellRangeVisualState as Fn, cellRangeEdgeBoxShadow as On } from "./cellRangeSelection.js";
16
+ import { BulkActionBar as zn } from "./toolbar/BulkActionBar.js";
17
+ import { TableToolbar as Gn } from "./toolbar/TableToolbar.js";
18
+ import { Checkbox as sr } from "../../primitives/checkbox/checkbox.js";
19
+ import { ColumnHeaderMenu as Mn } from "./toolbar/ColumnHeaderMenu.js";
20
+ import { Button as Un } from "../../primitives/button/button.js";
21
+ import { SummaryFooterRow as Yn } from "./toolbar/SummaryFooter.js";
22
+ import { RowActionsMenu as An } from "./toolbar/RowActionsMenu.js";
23
+ import { Icon as Bn } from "../../primitives/icon/icon.js";
24
+ import { ShimmerLine as Xn } from "../../primitives/shimmer/shimmer.js";
25
+ const $n = dn(), jn = 5, Zn = "__all__", or = {
19
26
  ArrowUp: "up",
20
27
  ArrowDown: "down",
21
28
  ArrowLeft: "left",
22
29
  ArrowRight: "right"
23
- }, J = (t) => t.__rowId ?? t.id ?? t.rule_id ?? String(t);
24
- function st(t, a) {
25
- return t === "all" ? new Set(a) : t ?? /* @__PURE__ */ new Set();
30
+ }, xe = (s) => s.__rowId ?? s.id ?? s.rule_id ?? String(s);
31
+ function ar(s, u) {
32
+ return s === "all" ? new Set(u) : s ?? /* @__PURE__ */ new Set();
26
33
  }
27
- function pr(t, a, o) {
28
- return t ? t === "all" ? o.includes(a) : t.has(a) : !1;
34
+ function qn(s, u, f) {
35
+ return s ? s === "all" ? f.includes(u) : s.has(u) : !1;
29
36
  }
30
- function xr(t, a) {
31
- return t ? t === "all" ? a.length : t.size : 0;
37
+ function Kn(s, u) {
38
+ return s ? s === "all" ? u.length : s.size : 0;
32
39
  }
33
- function gr(t, a) {
34
- return a.length === 0 ? !1 : t === "all" ? !0 : a.every((o) => (t == null ? void 0 : t.has(o)) ?? !1);
40
+ function Hn(s, u) {
41
+ return u.length === 0 ? !1 : s === "all" ? !0 : u.every((f) => (s == null ? void 0 : s.has(f)) ?? !1);
35
42
  }
36
- function br(t, a) {
37
- return t === "all" ? a.length > 0 : a.some((o) => (t == null ? void 0 : t.has(o)) ?? !1);
43
+ function Vn(s, u) {
44
+ return s === "all" ? u.length > 0 : u.some((f) => (s == null ? void 0 : s.has(f)) ?? !1);
38
45
  }
39
- function mr(t) {
40
- if (t)
41
- return (a) => {
42
- t(a === "all" ? "all" : new Set([...a].map(String)));
46
+ function Jn(s) {
47
+ if (s)
48
+ return (u) => {
49
+ s(u === "all" ? "all" : new Set([...u].map(String)));
43
50
  };
44
51
  }
45
- function Nr(t) {
46
- var a;
47
- return t != null && t.length ? t.length > 1 ? !0 : ((a = t[0]) == null ? void 0 : a.key) !== yr : !1;
52
+ function Qn(s) {
53
+ var u;
54
+ return s != null && s.length ? s.length > 1 ? !0 : ((u = s[0]) == null ? void 0 : u.key) !== Zn : !1;
48
55
  }
49
- function at(t, a, o) {
50
- return o ? lt(o, a ?? /* @__PURE__ */ new Map()) : (a == null ? void 0 : a.get(t)) ?? "left";
56
+ function cr(s, u, f) {
57
+ return f ? dr(f, u ?? /* @__PURE__ */ new Map()) : (u == null ? void 0 : u.get(s)) ?? "left";
51
58
  }
52
- const de = "120px", Te = "300px", Pe = (t) => {
53
- if (!t) return 0;
54
- const a = t.match(/^(\d+(?:\.\d+)?)px$/);
55
- return a ? Number(a[1]) : 0;
56
- }, A = (t) => !!(t.maxWidth && t.sticky === "right"), kr = (t) => ({
57
- maxWidth: t.maxWidth ?? Te,
58
- minWidth: t.minWidth ?? de
59
- }), ot = (t) => A(t) && t.maxWidth ? {
60
- minWidth: t.maxWidth,
61
- width: t.maxWidth,
62
- maxWidth: t.maxWidth
63
- } : {
64
- minWidth: t.minWidth ?? de,
65
- maxWidth: t.maxWidth ?? Te
66
- }, Mr = qt(
59
+ const Re = (s) => !!s.width || !!(s.maxWidth && s.sticky === "right"), mt = (s) => s.width ?? (s.maxWidth && s.sticky === "right" ? s.maxWidth : void 0), ei = (s) => ({
60
+ width: s.width,
61
+ maxWidth: s.maxWidth ?? lr,
62
+ minWidth: s.minWidth ?? s.width
63
+ }), bi = Qr(
67
64
  function({
68
- data: a,
69
- columns: o,
70
- renderRowCell: Le,
71
- onRowClick: V,
72
- arialabel: dt,
73
- size: Oe = "sm",
74
- allowDefaultRowClass: ct = !1,
75
- centeredHeaders: ft = [],
76
- rootClassName: ht,
77
- removeBorders: ze,
78
- headerClassName: ut,
79
- isRowExpandable: Ae,
80
- renderExpandedContent: wt,
81
- loading: P = !1,
82
- loadingRowCount: Ge = wr,
83
- renderHeaderCell: ce,
84
- tableClassName: yt,
85
- getRowClassName: fe,
86
- selectionMode: G = "none",
65
+ data: u,
66
+ columns: f,
67
+ renderRowCell: gt,
68
+ onRowClick: ve,
69
+ onRowHover: H,
70
+ arialabel: ur,
71
+ size: xt = "sm",
72
+ allowDefaultRowClass: fr = !1,
73
+ centeredHeaders: pr = [],
74
+ rootClassName: hr,
75
+ removeBorders: Rt,
76
+ headerClassName: yr,
77
+ isRowExpandable: vt,
78
+ renderExpandedContent: wr,
79
+ loading: X = !1,
80
+ loadingRowCount: kt = jn,
81
+ renderHeaderCell: Xe,
82
+ tableClassName: mr,
83
+ getRowClassName: $e,
84
+ selectionMode: oe = "none",
87
85
  selectedKeys: C,
88
- onSelectionChange: y,
89
- inlineSelection: he = !1,
90
- toolbar: p,
91
- showToolbar: pt,
92
- toolbarTitle: $e,
93
- toolbarTrailing: je,
94
- disableExtendedTools: Fe,
95
- pagination: x,
96
- showBorders: X,
97
- emptyState: Me,
98
- editChrome: S,
99
- showEditActions: xt = !1,
100
- searchCollapsible: He,
101
- isEditable: gt,
102
- toolbarSlot: ue,
103
- rowHeightClass: Ue,
104
- groupedData: L,
105
- showSummaryFooter: bt,
106
- summaryFooterProps: we,
107
- bulkActionBar: Y,
108
- renderBulkActionBar: Q,
109
- onBulkDuplicate: Z,
110
- onBulkDelete: K,
111
- bulkActionBusy: ee,
112
- columnAlignments: O,
113
- onColumnHeaderAction: te,
114
- showColumnHeaderMenu: mt,
115
- columnMenuCapabilities: Nt,
116
- renderGroupHeader: De,
117
- columnMenuSchema: $,
118
- columnSchema: j,
119
- labelMeta: kt,
120
- renderColumnHeaderMenuExtraItems: Ct,
121
- fillWidth: w = !1,
122
- rowActions: ye,
123
- onCellActivate: pe
124
- }, F) {
125
- const [re, vt] = q(
86
+ onSelectionChange: D,
87
+ inlineSelection: ke = !1,
88
+ toolbar: d,
89
+ showToolbar: gr,
90
+ toolbarTitle: Et,
91
+ toolbarTrailing: It,
92
+ disableExtendedTools: Ee,
93
+ pagination: _,
94
+ showBorders: Ie,
95
+ emptyState: Lt,
96
+ editChrome: z,
97
+ showEditActions: xr = !1,
98
+ searchCollapsible: bt,
99
+ isEditable: Rr,
100
+ isEditMode: Nt = !0,
101
+ toolbarSlot: je,
102
+ rowHeightClass: Wt,
103
+ groupedData: V,
104
+ showSummaryFooter: vr,
105
+ summaryFooterProps: Ze,
106
+ bulkActionBar: Le,
107
+ renderBulkActionBar: be,
108
+ onBulkDuplicate: Ne,
109
+ onBulkDelete: We,
110
+ bulkActionBusy: De,
111
+ columnAlignments: J,
112
+ onColumnHeaderAction: _e,
113
+ showColumnHeaderMenu: kr,
114
+ columnMenuCapabilities: Er,
115
+ renderGroupHeader: Dt,
116
+ columnMenuSchema: ae,
117
+ columnSchema: ce,
118
+ labelMeta: Ir,
119
+ renderColumnHeaderMenuExtraItems: Lr,
120
+ fillWidth: br = !1,
121
+ zoom: Nr,
122
+ rowActions: I,
123
+ onCellActivate: Q,
124
+ cellSelection: w = null,
125
+ onCellSelectionChange: N,
126
+ onCopyCells: qe,
127
+ onPasteCells: Ke,
128
+ onClearCells: He
129
+ }, de) {
130
+ const { zoomConfig: G, zoomPercent: le, setZoomPercent: _t } = on(Nr), F = G !== null && $n, ue = le / 100, Pe = F ? hn(le) : void 0, W = br, g = se(null), [fe, Pt] = K(null), Wr = sn({
131
+ containerRef: g,
132
+ zoomConfig: G,
133
+ zoomPercent: le,
134
+ setZoomPercent: _t
135
+ }), ee = k(() => {
136
+ if (!W) return null;
137
+ const e = f.reduce(
138
+ (i, n) => Re(n) ? i + ht(mt(n)) : i,
139
+ 0
140
+ );
141
+ return { minTableWidth: f.filter(
142
+ (i) => !Re(i)
143
+ ).reduce(
144
+ (i, n) => i + ht(
145
+ n.minWidth ?? (F ? er : void 0)
146
+ ),
147
+ 0
148
+ ) + e };
149
+ }, [f, W, F]), St = (G == null ? void 0 : G.minZoom) ?? ln, [Se, Dr] = K(
126
150
  () => /* @__PURE__ */ new Set()
127
- ), [St, Rt] = q(
151
+ ), [_r, Tt] = K(
128
152
  null
129
- ), [b, xe] = q(null), [z, Wt] = q(null), ne = G === "single" || G === "multiple", ge = !!ye, R = ne && !he, be = Nr(L), It = h(() => $ != null && $.length ? new Map($.map((e) => [e.key, e])) : /* @__PURE__ */ new Map(), [$]), qe = h(() => j != null && j.length ? new Map(j.map((e) => [e.value, e])) : /* @__PURE__ */ new Map(), [j]), ie = h(
130
- () => o.map((e) => e.key),
131
- [o]
132
- ), _t = B((e) => {
133
- vt((r) => {
134
- const n = new Set(r);
135
- return n.has(e) ? n.delete(e) : n.add(e), n;
153
+ ), [p, Pr] = K(null), M = se(null), Ve = se({ x: 0, y: 0 }), te = E((e) => {
154
+ M.current = e, Pr(e);
155
+ }, []), [q, Ct] = K(null), [re, Sr] = K(null), y = typeof N == "function", $ = se(null), Je = se({ x: 0, y: 0 }), [ne, Ft] = K(!1), Qe = se(null), Te = oe === "single" || oe === "multiple", et = !!I, U = Te && !ke, Ce = Qn(V), tt = !!(I != null && I.onReorderRows) && (I == null ? void 0 : I.enableRowReorder) !== !1 && !Ce && !X, Tr = k(() => ae != null && ae.length ? new Map(ae.map((e) => [e.key, e])) : /* @__PURE__ */ new Map(), [ae]), Ot = k(() => ce != null && ce.length ? new Map(ce.map((e) => [e.value, e])) : /* @__PURE__ */ new Map(), [ce]), Y = k(
156
+ () => f.map((e) => e.key),
157
+ [f]
158
+ ), Cr = E((e) => {
159
+ Dr((t) => {
160
+ const r = new Set(t);
161
+ return r.has(e) ? r.delete(e) : r.add(e), r;
136
162
  });
137
- }, []), se = h(() => P ? Array.from({ length: Ge }, (e, r) => ({
138
- id: `loading-${r}`
139
- })) : a.map((e) => {
140
- const r = e;
141
- if (r.__rowId != null)
142
- return r;
143
- const n = J(r);
144
- return r.id != null && String(r.id) === n ? r : { ...r, id: n };
145
- }), [P, a, Ge]), g = h(() => P ? [] : be && L ? L.flatMap(
146
- (e) => re.has(e.key) ? [] : e.rows.map((r) => J(r))
147
- ) : se.map((e) => J(e)), [P, be, L, re, se]), me = h(
148
- () => st(C, g),
149
- [C, g]
150
- ), Ne = xr(C, g), ke = Ne > 0, Be = ke && !!(Y ?? Q ?? Z ?? K), M = h(() => {
151
- if (!ke) return;
152
- const e = a.filter(
153
- (r) => me.has(J(r))
163
+ }, []), Fe = k(() => X ? Array.from({ length: kt }, (e, t) => ({
164
+ id: `loading-${t}`
165
+ })) : u.map((e) => {
166
+ const t = e;
167
+ if (t.__rowId != null)
168
+ return t;
169
+ const r = xe(t);
170
+ return t.id != null && String(t.id) === r ? t : { ...t, id: r };
171
+ }), [X, u, kt]), R = k(() => X ? [] : Ce && V ? V.flatMap(
172
+ (e) => Se.has(e.key) ? [] : e.rows.map((t) => xe(t))
173
+ ) : Fe.map((e) => xe(e)), [X, Ce, V, Se, Fe]), pe = k(
174
+ () => ar(C, R),
175
+ [C, R]
176
+ ), rt = Kn(C, R), nt = rt > 0, zt = nt && !!(Le ?? be ?? Ne ?? We), he = k(() => {
177
+ if (!nt) return;
178
+ const e = u.filter(
179
+ (t) => pe.has(xe(t))
154
180
  );
155
181
  return {
156
- selectedKeys: me,
182
+ selectedKeys: pe,
157
183
  selectedRows: e,
158
- clearSelection: () => y == null ? void 0 : y(/* @__PURE__ */ new Set()),
159
- busy: ee
184
+ clearSelection: () => D == null ? void 0 : D(/* @__PURE__ */ new Set()),
185
+ busy: De
160
186
  };
161
187
  }, [
162
- ke,
163
- me,
164
- a,
165
- y,
166
- ee
167
- ]), Je = h(() => {
168
- if (ue != null) return ue;
169
- if (Be) {
170
- if (Y != null) return Y;
171
- if (Q && M)
172
- return Q(M);
173
- if (M && (Z || K))
174
- return /* @__PURE__ */ i(
175
- ar,
188
+ nt,
189
+ pe,
190
+ u,
191
+ D,
192
+ De
193
+ ]), Gt = k(() => {
194
+ if (je != null) return je;
195
+ if (zt) {
196
+ if (Le != null) return Le;
197
+ if (be && he)
198
+ return be(he);
199
+ if (he && (Ne || We))
200
+ return /* @__PURE__ */ c(
201
+ zn,
176
202
  {
177
- count: Ne,
178
- onDuplicate: Z,
179
- onDelete: K,
180
- onClearSelection: M.clearSelection,
181
- busy: ee
203
+ count: rt,
204
+ onDuplicate: Ne,
205
+ onDelete: We,
206
+ onClearSelection: he.clearSelection,
207
+ busy: De
182
208
  }
183
209
  );
184
210
  }
185
- return p ? /* @__PURE__ */ i(
186
- or,
211
+ const e = F && G ? /* @__PURE__ */ c(
212
+ nn,
187
213
  {
188
- sort: p.sort,
189
- filter: p.filter,
190
- search: p.search,
191
- rowHeight: p.rowHeight,
192
- hideFields: p.hideFields,
193
- align: p.align,
194
- groupBy: p.groupBy,
195
- summary: p.summary,
196
- sortContent: p.sortContent,
197
- filterContent: p.filterContent,
198
- fallbackTitle: $e,
199
- trailing: je,
200
- searchCollapsible: He,
201
- disableExtendedTools: Fe
214
+ value: le,
215
+ minValue: St,
216
+ maxValue: G.maxZoom,
217
+ step: G.step,
218
+ onChange: _t,
219
+ onFitToViewport: Wr,
220
+ isDisabled: Ee
202
221
  }
203
- ) : null;
222
+ ) : null, t = It;
223
+ return !d && !t && !e ? null : /* @__PURE__ */ c(
224
+ Gn,
225
+ {
226
+ sort: d == null ? void 0 : d.sort,
227
+ filter: d == null ? void 0 : d.filter,
228
+ search: d == null ? void 0 : d.search,
229
+ rowHeight: d == null ? void 0 : d.rowHeight,
230
+ hideFields: d == null ? void 0 : d.hideFields,
231
+ align: d == null ? void 0 : d.align,
232
+ groupBy: d == null ? void 0 : d.groupBy,
233
+ summary: d == null ? void 0 : d.summary,
234
+ sortContent: d == null ? void 0 : d.sortContent,
235
+ filterContent: d == null ? void 0 : d.filterContent,
236
+ views: d == null ? void 0 : d.views,
237
+ fallbackTitle: Et,
238
+ beforeSearch: e,
239
+ trailing: t,
240
+ searchCollapsible: bt,
241
+ disableExtendedTools: Ee,
242
+ isEditMode: Nt,
243
+ undoRedo: d != null && d.undoRedo ? {
244
+ ...d.undoRedo,
245
+ isDisabled: d.undoRedo.isDisabled ?? Ee
246
+ } : void 0
247
+ }
248
+ );
204
249
  }, [
205
- ue,
206
- Be,
207
- Y,
208
- Q,
209
- M,
210
- Z,
211
- K,
212
- ee,
213
- Ne,
214
- p,
215
- $e,
216
250
  je,
217
- He,
218
- Fe
219
- ]), Ve = Je != null && pt !== !1, Xe = !!x && (x == null ? void 0 : x.showPagination) !== !1, Et = Ve || Xe, Ye = !P && a.length === 0 && Me != null, m = !!(xt && S), Ce = !!(S != null && S.showFooterRow), T = gt ?? (m || Ce || ge), Pt = Ye && !(Ce && S), H = o.length + (R ? 1 : 0) + (m ? 1 : 0), Tt = !!(bt && we), u = X ? "border-r border-secondary last:border-r-0" : void 0, I = h(() => {
220
- if (!w) return null;
221
- const e = o.reduce(
222
- (s, f) => A(f) ? s + Pe(f.maxWidth) : s,
223
- 0
224
- );
225
- return { minTableWidth: o.filter(
226
- (s) => !A(s)
227
- ).reduce(
228
- (s, f) => s + Pe(f.minWidth ?? de),
229
- 0
230
- ) + e };
231
- }, [o, w]), Lt = h(() => {
251
+ zt,
252
+ Le,
253
+ be,
254
+ he,
255
+ Ne,
256
+ We,
257
+ De,
258
+ rt,
259
+ d,
260
+ Et,
261
+ It,
262
+ bt,
263
+ Nt,
264
+ Ee,
265
+ G,
266
+ F,
267
+ le,
268
+ St
269
+ ]), Mt = Gt != null && gr !== !1, Ut = !!_ && (_ == null ? void 0 : _.showPagination) !== !1, Fr = Mt || Ut, Yt = !X && u.length === 0 && Lt != null, T = !!(xr && z), it = !!(z != null && z.showFooterRow), L = Rr ?? (T || it || et), Or = Yt && !(it && z), ye = f.length + (U ? 1 : 0) + (T ? 1 : 0), zr = !!(vr && Ze), b = Ie ? "border-r border-secondary last:border-r-0" : void 0, Gr = k(() => {
232
270
  const e = /* @__PURE__ */ new Map();
233
- return te && o.forEach((r) => {
271
+ return _e && f.forEach((t) => {
234
272
  e.set(
235
- r.key,
236
- (n) => te(r.key, n)
273
+ t.key,
274
+ (r) => _e(t.key, r)
237
275
  );
238
276
  }), e;
239
- }, [o, te]), W = Bt(null), [U, Qe] = q(null), ve = B(
240
- (e, r, n) => {
241
- var f;
242
- let s = n ?? null;
243
- if (s == null) {
244
- const N = (f = er(
245
- W.current,
277
+ }, [f, _e]), st = E(
278
+ (e, t, r) => {
279
+ var a;
280
+ let i = r ?? null;
281
+ if (i == null) {
282
+ const l = (a = tr(
283
+ g.current,
246
284
  e,
247
- r
248
- )) == null ? void 0 : f.getAttribute("data-grid-source-index"), _ = N != null && N !== "" ? Number(N) : NaN;
249
- s = Number.isNaN(_) ? null : _;
285
+ t
286
+ )) == null ? void 0 : a.getAttribute("data-grid-source-index"), h = l != null && l !== "" ? Number(l) : NaN;
287
+ i = Number.isNaN(h) ? null : h;
288
+ }
289
+ const n = {
290
+ rowId: e,
291
+ columnKey: t,
292
+ sourceIndex: i
293
+ };
294
+ if (y) {
295
+ N == null || N(yt(n));
296
+ return;
250
297
  }
251
- xe({ rowId: e, columnKey: r, sourceIndex: s });
298
+ Ct(n);
299
+ },
300
+ [y, N]
301
+ ), Oe = E(() => {
302
+ if (y) {
303
+ N == null || N(null);
304
+ return;
305
+ }
306
+ Ct(null);
307
+ }, [y, N]), P = y ? (w == null ? void 0 : w.focus) ?? null : q, A = E(
308
+ (e) => {
309
+ y && (N == null || N(e));
252
310
  },
253
- []
254
- ), Ot = B(
311
+ [y, N]
312
+ ), Mr = E(
255
313
  (e) => {
256
- var ae, oe, le;
257
- const r = e.key in it;
258
- if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && !r || tr(e.target)) return;
314
+ var Ye, ie, ge;
315
+ const t = e.key in or;
316
+ if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && e.key !== "Delete" && e.key !== "Backspace" && !t || Ae(e.target)) return;
259
317
  if (e.key === "Escape") {
260
- if (!b) return;
261
- e.preventDefault(), e.stopPropagation(), xe(null), (ae = W.current) != null && ae.contains(document.activeElement) && document.activeElement.blur();
318
+ if (!P && !w) return;
319
+ e.preventDefault(), e.stopPropagation(), Oe(), (Ye = g.current) != null && Ye.contains(document.activeElement) && document.activeElement.blur();
262
320
  return;
263
321
  }
264
- const n = (le = (oe = e.target).closest) == null ? void 0 : le.call(
265
- oe,
322
+ const r = (ge = (ie = e.target).closest) == null ? void 0 : ge.call(
323
+ ie,
266
324
  "[data-grid-cell]"
267
- ), s = n == null ? void 0 : n.getAttribute("data-grid-row-id"), f = n == null ? void 0 : n.getAttribute("data-grid-col-key"), N = n == null ? void 0 : n.getAttribute(
268
- "data-grid-source-index"
269
- ), _ = N != null && N !== "" ? Number(N) : NaN, l = Number.isNaN(_) ? null : _, v = b ?? (s && f ? {
270
- rowId: s,
271
- columnKey: f,
272
- sourceIndex: l
273
- } : null);
274
- if (!v) return;
325
+ ), i = r ? Be(r) : null, n = y && t && e.shiftKey && !P && !i ? _n(e.target, g.current) : null, a = n != null && pe.has(n.rowId), l = P ?? i ?? (a ? n : null);
326
+ if (!l) return;
327
+ if (e.key === "Delete" || e.key === "Backspace") {
328
+ if (!y || !w || !He) return;
329
+ const j = wt(
330
+ w,
331
+ R,
332
+ Y
333
+ );
334
+ if (!j) return;
335
+ e.preventDefault(), e.stopPropagation(), He({
336
+ selection: w,
337
+ rect: j,
338
+ event: e.nativeEvent
339
+ });
340
+ return;
341
+ }
275
342
  if (e.key === "Enter") {
276
- if (!pe) return;
277
- e.preventDefault(), e.stopPropagation(), pe({
278
- rowId: v.rowId,
279
- columnKey: v.columnKey,
280
- sourceIndex: v.sourceIndex
343
+ if (!Q) return;
344
+ e.preventDefault(), e.stopPropagation(), Q({
345
+ rowId: l.rowId,
346
+ columnKey: l.columnKey,
347
+ sourceIndex: l.sourceIndex
281
348
  });
282
349
  return;
283
350
  }
284
- const E = r ? rr(
285
- W.current,
286
- g,
287
- ie,
288
- v.rowId,
289
- v.columnKey,
290
- it[e.key]
291
- ) : nr(
292
- W.current,
293
- g,
294
- ie,
295
- v.rowId,
296
- v.columnKey,
351
+ const h = y && e.shiftKey && t, v = t ? or[e.key] : e.shiftKey ? "left" : "right", o = t ? wn(
352
+ g.current,
353
+ R,
354
+ Y,
355
+ l.rowId,
356
+ l.columnKey,
357
+ v
358
+ ) : mn(
359
+ g.current,
360
+ R,
361
+ Y,
362
+ l.rowId,
363
+ l.columnKey,
297
364
  !e.shiftKey
298
365
  );
299
- if (!E) {
300
- r && (e.preventDefault(), e.stopPropagation());
366
+ if (!o && !(h && !w)) {
367
+ t && (e.preventDefault(), e.stopPropagation());
301
368
  return;
302
369
  }
303
- e.preventDefault(), e.stopPropagation(), ve(E.rowId, E.columnKey, E.sourceIndex), requestAnimationFrame(
304
- () => ir(
305
- W.current,
306
- E.rowId,
307
- E.columnKey
370
+ e.preventDefault(), e.stopPropagation();
371
+ const pt = o ? {
372
+ rowId: o.rowId,
373
+ columnKey: o.columnKey,
374
+ sourceIndex: o.sourceIndex
375
+ } : null, we = a ? null : pt, me = we ? v : null;
376
+ if (Qe.current = me, y) {
377
+ const j = Pn(
378
+ l,
379
+ we,
380
+ w,
381
+ h
382
+ );
383
+ j && j !== w && A(j);
384
+ } else o && st(o.rowId, o.columnKey, o.sourceIndex);
385
+ const O = we ?? l;
386
+ requestAnimationFrame(
387
+ () => rr(
388
+ g.current,
389
+ O.rowId,
390
+ O.columnKey,
391
+ { dir: me }
308
392
  )
309
393
  );
310
394
  },
311
- [b, g, ie, pe, ve]
395
+ [
396
+ P,
397
+ R,
398
+ y,
399
+ w,
400
+ Oe,
401
+ Y,
402
+ A,
403
+ pe,
404
+ Q,
405
+ He,
406
+ st
407
+ ]
312
408
  );
313
- Jt(() => {
314
- if (!T || !b) return;
315
- const e = (r) => {
316
- const n = W.current;
317
- n && !n.contains(r.target) && xe(null);
409
+ Z(() => {
410
+ if (!L || !P && !w) return;
411
+ const e = (t) => {
412
+ const r = g.current;
413
+ r && !r.contains(t.target) && Oe();
318
414
  };
319
415
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
320
- }, [T, b]);
321
- const Ze = h(() => {
416
+ }, [L, P, w, Oe]);
417
+ const ot = (P == null ? void 0 : P.rowId) ?? null, at = (P == null ? void 0 : P.columnKey) ?? null;
418
+ Qt(() => {
419
+ if (!L || ne || !ot || !at) return;
420
+ const e = tr(
421
+ g.current,
422
+ ot,
423
+ at
424
+ );
425
+ e && xn(e, { dir: Qe.current });
426
+ }, [L, ne, ot, at]);
427
+ const At = k(() => {
322
428
  let e = 0;
323
- return R && (e += 40), m && (e += 56), o.forEach((r) => {
324
- A(r) && (e += Pe(r.maxWidth));
429
+ return U && (e += 40), T && (e += 56), f.forEach((t) => {
430
+ Re(t) && (e += ht(mt(t)));
325
431
  }), e;
326
- }, [o, m, R]), Se = h(
327
- () => o.filter((e) => !A(e)).length,
328
- [o]
329
- ), Re = h(() => {
330
- if (!w || !I) return null;
331
- const { minTableWidth: e } = I;
332
- return U ? Math.max(U, e) : e;
333
- }, [U, w, I]), We = !!(w && I && U && U < I.minTableWidth), Ie = h(() => !Re || Se === 0 ? null : Math.max(
334
- 0,
335
- (Re - Ze) / Se
336
- ), [Re, Ze, Se]);
337
- Vt(() => {
338
- if (!w) {
339
- Qe(null);
432
+ }, [f, T, U]), Bt = k(
433
+ () => f.filter((e) => !Re(e)).length,
434
+ [f]
435
+ ), ct = k(
436
+ () => W && ee ? un(fe, ee.minTableWidth) : null,
437
+ [fe, W, ee]
438
+ ), Xt = W && yn(ct, fe, ue), ze = k(
439
+ () => fn(ct, fe, ue),
440
+ [ct, fe, ue]
441
+ ), dt = k(
442
+ () => pn(
443
+ ze,
444
+ At,
445
+ Bt
446
+ ),
447
+ [ze, At, Bt]
448
+ );
449
+ Qt(() => {
450
+ if (!W) {
451
+ Pt(null);
340
452
  return;
341
453
  }
342
- const e = W.current;
454
+ const e = g.current;
343
455
  if (!e) return;
344
- const r = () => {
345
- const s = e.clientWidth;
346
- s > 0 && Qe((f) => f === s ? f : s);
456
+ const t = () => {
457
+ const i = e.clientWidth;
458
+ i > 0 && Pt((n) => n === i ? n : i);
347
459
  };
348
- r();
349
- const n = new ResizeObserver(r);
350
- return n.observe(e), () => {
351
- n.disconnect();
460
+ t();
461
+ const r = new ResizeObserver(t);
462
+ return r.observe(e), () => {
463
+ r.disconnect();
352
464
  };
353
465
  }, [
354
- o.length,
355
- a.length,
356
- w,
357
- P,
358
- m,
359
- R
466
+ f.length,
467
+ u.length,
468
+ W,
469
+ X,
470
+ T,
471
+ U
360
472
  ]);
361
- const _e = B(
362
- (e) => w ? A(e) && e.maxWidth ? ot(e) : Ie != null ? {
363
- width: `${Ie}px`,
364
- minWidth: e.minWidth ?? de,
365
- maxWidth: e.maxWidth ?? Te
366
- } : ot(e) : kr(e),
367
- [w, Ie]
368
- ), zt = h(() => {
369
- if (!(!w || !I))
370
- return We ? {
371
- width: `${I.minTableWidth}px`,
372
- tableLayout: "fixed"
373
- } : {
374
- width: "100%",
375
- tableLayout: "fixed"
376
- };
377
- }, [w, I, We]), At = B(
473
+ const lt = E(
474
+ (e) => {
475
+ if (!W)
476
+ return ei(e);
477
+ const t = e.minWidth ?? (F ? er : void 0), r = mt(e), i = r, n = e.maxWidth ?? r ?? lr;
478
+ return Re(e) && i ? {
479
+ minWidth: i,
480
+ width: i,
481
+ maxWidth: n ?? i
482
+ } : dt != null ? {
483
+ width: `${dt}px`,
484
+ minWidth: t
485
+ } : { minWidth: t, maxWidth: n };
486
+ },
487
+ [W, dt, F]
488
+ ), Ur = k(() => {
489
+ const e = F ? {
490
+ zoom: ue,
491
+ "--table-zoom-font-size": Pe ? `${Pe}px` : void 0
492
+ } : void 0;
493
+ return !W || !ee ? F ? { ...e, width: "max-content", minWidth: "100%" } : void 0 : {
494
+ ...e,
495
+ // The zoom-independent base, so the painted width tracks the zoom and overflows by
496
+ // more as you zoom in — matching the widths `getColumnStyle` hands the columns.
497
+ width: `${ze ?? ee.minTableWidth}px`,
498
+ tableLayout: "fixed"
499
+ };
500
+ }, [
501
+ W,
502
+ ee,
503
+ Xt,
504
+ ze,
505
+ F,
506
+ ue,
507
+ Pe
508
+ ]), Yr = E(
378
509
  (e) => {
379
- W.current = e, typeof F == "function" ? F(e) : F && (F.current = e);
510
+ g.current = e, typeof de == "function" ? de(e) : de && (de.current = e);
380
511
  },
381
- [F]
382
- ), Gt = ne ? {
383
- selectionMode: G,
512
+ [de]
513
+ ), Ar = Te && ke ? {
514
+ selectionMode: oe,
384
515
  selectedKeys: C === "all" ? "all" : C,
385
- onSelectionChange: mr(y)
386
- } : {}, $t = (e) => {
516
+ onSelectionChange: Jn(D)
517
+ } : {}, Br = (e, t = 0) => {
387
518
  const r = e.__sourceIndex;
388
- return typeof r == "number" ? r : 0;
389
- }, Ee = ne && gr(C, g), jt = ne && br(C, g), Ft = () => {
390
- if (y) {
391
- if (Ee) {
392
- y(/* @__PURE__ */ new Set());
519
+ return typeof r == "number" ? r : t;
520
+ }, Ge = E(
521
+ (e) => {
522
+ const t = M.current;
523
+ if (!t) return;
524
+ const { fromSourceIndex: r, toSourceIndex: i, item: n, active: a } = t;
525
+ te(null), e && a && r !== i && (I != null && I.onReorderRows) && I.onReorderRows(r, i, n);
526
+ },
527
+ [I, te]
528
+ ), Me = E(
529
+ (e, t) => {
530
+ const r = M.current;
531
+ if (!r) return;
532
+ Ve.current = { x: e, y: t };
533
+ const i = e - r.startX, n = t - r.startY, a = Math.hypot(i, n), l = r.active || a >= Rn;
534
+ let h = {
535
+ ...r,
536
+ currentX: e,
537
+ currentY: t,
538
+ active: l
539
+ };
540
+ if (l) {
541
+ r.active || Tt(null);
542
+ const v = g.current;
543
+ if (v) {
544
+ const o = vn(
545
+ v,
546
+ t,
547
+ r.fromSourceIndex,
548
+ r.rowId
549
+ );
550
+ o && (h = {
551
+ ...h,
552
+ toSourceIndex: o.toSourceIndex,
553
+ // Clip to scrollport so the line never draws over the header / outside the card.
554
+ dropLineY: kn(
555
+ o.dropLineY,
556
+ v
557
+ ),
558
+ dropLineLeft: o.dropLineLeft,
559
+ dropLineWidth: o.dropLineWidth
560
+ });
561
+ }
562
+ }
563
+ te(h);
564
+ },
565
+ [te]
566
+ ), Xr = E(
567
+ (e, t, r, i) => {
568
+ var v, o;
569
+ if (!tt || e.button !== 0) return;
570
+ const n = (v = g.current) == null ? void 0 : v.querySelector(
571
+ `tr[${nr}="${CSS.escape(t)}"]`
572
+ );
573
+ if (!n) return;
574
+ e.preventDefault();
575
+ try {
576
+ e.currentTarget.setPointerCapture(e.pointerId);
577
+ } catch {
578
+ }
579
+ const a = En(n), l = In(n), h = ((o = n.closest("table")) == null ? void 0 : o.getBoundingClientRect()) ?? n.getBoundingClientRect();
580
+ Ve.current = { x: e.clientX, y: e.clientY }, te({
581
+ rowId: t,
582
+ fromSourceIndex: r,
583
+ item: i,
584
+ pointerId: e.pointerId,
585
+ startX: e.clientX,
586
+ startY: e.clientY,
587
+ currentX: e.clientX,
588
+ currentY: e.clientY,
589
+ active: !1,
590
+ preview: a,
591
+ toSourceIndex: r,
592
+ dropLineY: null,
593
+ dropLineLeft: h.left,
594
+ dropLineWidth: h.width,
595
+ rowClone: l
596
+ });
597
+ },
598
+ [tt, te]
599
+ ), $t = p != null;
600
+ Z(() => {
601
+ if (!$t) return;
602
+ const e = (n) => {
603
+ var a;
604
+ n.pointerId === ((a = M.current) == null ? void 0 : a.pointerId) && Me(n.clientX, n.clientY);
605
+ }, t = (n) => {
606
+ var a;
607
+ n.pointerId === ((a = M.current) == null ? void 0 : a.pointerId) && Ge(!0);
608
+ }, r = (n) => {
609
+ var a;
610
+ n.pointerId === ((a = M.current) == null ? void 0 : a.pointerId) && Ge(!1);
611
+ }, i = (n) => {
612
+ n.key === "Escape" && (n.preventDefault(), Ge(!1));
613
+ };
614
+ return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), window.addEventListener("pointercancel", r), window.addEventListener("keydown", i), () => {
615
+ window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t), window.removeEventListener("pointercancel", r), window.removeEventListener("keydown", i);
616
+ };
617
+ }, [$t, Ge, Me]), Z(() => {
618
+ if (!(p != null && p.active)) return;
619
+ const e = document.body.style.userSelect, t = document.body.style.cursor;
620
+ return document.body.style.userSelect = "none", document.body.style.cursor = "grabbing", () => {
621
+ document.body.style.userSelect = e, document.body.style.cursor = t;
622
+ };
623
+ }, [p == null ? void 0 : p.active]), Z(() => {
624
+ if (!(p != null && p.active)) return;
625
+ let e = 0;
626
+ const t = () => {
627
+ const r = M.current, i = g.current;
628
+ if (!(r != null && r.active) || !i) return;
629
+ const { x: n, y: a } = Ve.current, l = Nn(i, a);
630
+ l !== 0 && (i.scrollTop += l, Me(n, a)), e = requestAnimationFrame(t);
631
+ };
632
+ return e = requestAnimationFrame(t), () => cancelAnimationFrame(e);
633
+ }, [p == null ? void 0 : p.active, Me]);
634
+ const Ue = E(
635
+ (e, t) => {
636
+ const r = $.current, i = g.current;
637
+ if (!r || !i) return;
638
+ Je.current = { x: e, y: t };
639
+ const n = e - r.startX, a = t - r.startY, l = Math.hypot(n, a), h = r.active || l >= Sn;
640
+ if (h && !r.active && (r.active = !0, Ft(!0)), !h) return;
641
+ const v = Tn(i, e, t), o = v ? Be(v) : null;
642
+ o && (r.focus = o, A({
643
+ anchor: r.anchor,
644
+ focus: o
645
+ }));
646
+ },
647
+ [A]
648
+ ), ut = E((e) => {
649
+ const t = $.current;
650
+ $.current = null, Ft(!1), t && requestAnimationFrame(
651
+ () => rr(
652
+ g.current,
653
+ t.focus.rowId,
654
+ t.focus.columnKey
655
+ )
656
+ );
657
+ }, []), $r = E(
658
+ (e) => {
659
+ if (!y || !L || !Q || Ae(e.target)) return;
660
+ const t = ir(
661
+ e.target,
662
+ g.current
663
+ );
664
+ if (!t) return;
665
+ const r = Be(t);
666
+ r && (e.preventDefault(), e.stopPropagation(), A(yt(r)), Q({
667
+ rowId: r.rowId,
668
+ columnKey: r.columnKey,
669
+ sourceIndex: r.sourceIndex
670
+ }));
671
+ },
672
+ [y, A, L, Q]
673
+ ), jr = E(
674
+ (e) => {
675
+ if (!y || !L || e.button !== 0 || M.current) return;
676
+ const t = ir(
677
+ e.target,
678
+ g.current
679
+ );
680
+ if (!t) return;
681
+ const r = Be(t);
682
+ if (!r) return;
683
+ const i = e.shiftKey && w != null, n = i ? w.anchor : r;
684
+ Qe.current = null, Je.current = { x: e.clientX, y: e.clientY }, $.current = {
685
+ pointerId: e.pointerId,
686
+ startX: e.clientX,
687
+ startY: e.clientY,
688
+ active: !1,
689
+ anchor: n,
690
+ origin: r,
691
+ focus: r,
692
+ extend: i
693
+ }, A(i ? { anchor: n, focus: r } : yt(r));
694
+ },
695
+ [y, w, A, L]
696
+ );
697
+ Z(() => {
698
+ if (!y) return;
699
+ const e = (i) => {
700
+ const n = $.current;
701
+ !n || i.pointerId !== n.pointerId || (i.preventDefault(), Ue(i.clientX, i.clientY));
702
+ }, t = (i) => {
703
+ const n = $.current;
704
+ !n || i.pointerId !== n.pointerId || ut(!0);
705
+ }, r = (i) => {
706
+ const n = $.current;
707
+ !n || i.pointerId !== n.pointerId || ut(!1);
708
+ };
709
+ return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), window.addEventListener("pointercancel", r), () => {
710
+ window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t), window.removeEventListener("pointercancel", r);
711
+ };
712
+ }, [y, ut, Ue]), Z(() => {
713
+ if (!ne) return;
714
+ const e = document.body.style.userSelect;
715
+ return document.body.style.userSelect = "none", () => {
716
+ document.body.style.userSelect = e;
717
+ };
718
+ }, [ne]), Z(() => {
719
+ if (!ne) return;
720
+ let e = 0;
721
+ const t = () => {
722
+ const r = $.current, i = g.current;
723
+ if (!(r != null && r.active) || !i) return;
724
+ const { x: n, y: a } = Je.current, { dx: l, dy: h } = Cn(i, n, a);
725
+ (l !== 0 || h !== 0) && (l !== 0 && (i.scrollLeft += l), h !== 0 && (i.scrollTop += h), Ue(n, a)), e = requestAnimationFrame(t);
726
+ };
727
+ return e = requestAnimationFrame(t), () => cancelAnimationFrame(e);
728
+ }, [ne, Ue]), Z(() => {
729
+ if (!y || !w) return;
730
+ const e = (r) => {
731
+ if (Ae(r.target)) return;
732
+ const i = g.current;
733
+ if (!i) return;
734
+ const n = document.activeElement;
735
+ if (n && !i.contains(n) && r.target instanceof Node && !i.contains(r.target))
736
+ return;
737
+ const a = wt(
738
+ w,
739
+ R,
740
+ Y
741
+ );
742
+ !a || !qe || (r.preventDefault(), qe({ selection: w, rect: a, event: r }));
743
+ }, t = (r) => {
744
+ var h;
745
+ if (Ae(r.target)) return;
746
+ const i = g.current;
747
+ if (!i) return;
748
+ const n = document.activeElement;
749
+ if (n && !i.contains(n) && r.target instanceof Node && !i.contains(r.target))
750
+ return;
751
+ const a = wt(
752
+ w,
753
+ R,
754
+ Y
755
+ );
756
+ if (!a || !Ke) return;
757
+ const l = ((h = r.clipboardData) == null ? void 0 : h.getData("text/plain")) ?? "";
758
+ r.preventDefault(), Ke({ selection: w, rect: a, text: l, event: r });
759
+ };
760
+ return document.addEventListener("copy", e), document.addEventListener("paste", t), () => {
761
+ document.removeEventListener("copy", e), document.removeEventListener("paste", t);
762
+ };
763
+ }, [
764
+ R,
765
+ y,
766
+ w,
767
+ Y,
768
+ qe,
769
+ Ke
770
+ ]);
771
+ const ft = Te && Hn(C, R), Zr = Te && Vn(C, R), qr = () => {
772
+ if (D) {
773
+ if (ft) {
774
+ D(/* @__PURE__ */ new Set());
393
775
  return;
394
776
  }
395
- y("all");
777
+ D("all");
396
778
  }
397
- }, Mt = (e, r) => {
398
- if (!y) return;
399
- if (G === "single") {
400
- y(r ? /* @__PURE__ */ new Set([e]) : /* @__PURE__ */ new Set());
779
+ }, Kr = (e, t) => {
780
+ if (!D) return;
781
+ if (oe === "single") {
782
+ D(t ? /* @__PURE__ */ new Set([e]) : /* @__PURE__ */ new Set());
401
783
  return;
402
784
  }
403
- const n = C === "all" ? new Set(g) : new Set(st(C, g));
404
- r ? n.add(e) : n.delete(e), y(n);
405
- }, Ht = (e) => {
406
- const r = re.has(e.key);
407
- return De ? /* @__PURE__ */ i(
408
- d.Row,
785
+ const r = C === "all" ? new Set(R) : new Set(ar(C, R));
786
+ t ? r.add(e) : r.delete(e), D(r);
787
+ }, Hr = (e) => {
788
+ const t = Se.has(e.key);
789
+ return Dt ? /* @__PURE__ */ c(
790
+ m.Row,
409
791
  {
410
792
  id: `group-${e.key}`,
411
793
  highlightSelectedRow: !1,
412
794
  className: "bg-secondary_subtle hover:bg-secondary_subtle",
413
- children: /* @__PURE__ */ i(d.Cell, { colSpan: H, className: c(u), children: De(e) })
795
+ children: /* @__PURE__ */ c(m.Cell, { colSpan: ye, className: x(b), children: Dt(e) })
414
796
  },
415
797
  `group-${e.key}`
416
- ) : /* @__PURE__ */ i(
417
- d.Row,
798
+ ) : /* @__PURE__ */ c(
799
+ m.Row,
418
800
  {
419
801
  id: `group-${e.key}`,
420
802
  highlightSelectedRow: !1,
421
803
  className: "bg-secondary_subtle hover:bg-secondary_subtle",
422
- children: /* @__PURE__ */ i(
423
- d.Cell,
804
+ children: /* @__PURE__ */ c(
805
+ m.Cell,
424
806
  {
425
- colSpan: H,
426
- className: c("py-1.5", u),
427
- children: /* @__PURE__ */ k(
807
+ colSpan: ye,
808
+ className: x("py-1.5", b),
809
+ children: /* @__PURE__ */ S(
428
810
  "button",
429
811
  {
430
812
  type: "button",
431
813
  className: "flex w-full items-center gap-2 px-2 text-left text-xs font-medium text-secondary",
432
- onClick: () => _t(e.key),
433
- "aria-expanded": !r,
814
+ onClick: () => Cr(e.key),
815
+ "aria-expanded": !t,
434
816
  children: [
435
- /* @__PURE__ */ i(
436
- Xt,
817
+ /* @__PURE__ */ c(
818
+ en,
437
819
  {
438
- className: c(
820
+ className: x(
439
821
  "size-4 shrink-0 text-fg-quaternary transition-transform",
440
- !r && "rotate-90"
822
+ !t && "rotate-90"
441
823
  )
442
824
  }
443
825
  ),
444
- /* @__PURE__ */ i("span", { className: "truncate", children: e.label || "(Empty)" }),
445
- /* @__PURE__ */ k("span", { className: "text-tertiary", children: [
826
+ /* @__PURE__ */ c("span", { className: "truncate", children: e.label || "(Empty)" }),
827
+ /* @__PURE__ */ S("span", { className: "text-tertiary", children: [
446
828
  "(",
447
829
  e.rows.length,
448
830
  ")"
@@ -455,46 +837,56 @@ const de = "120px", Te = "300px", Pe = (t) => {
455
837
  },
456
838
  `group-${e.key}`
457
839
  );
458
- }, Ke = (e, r) => {
459
- const n = Ae ? Ae(e) : !1, s = J(e), f = $t(e), N = pr(C, s, g), _ = St === s;
460
- return /* @__PURE__ */ k(
461
- d.Row,
840
+ }, jt = (e, t, r = 0) => {
841
+ const i = vt ? vt(e) : !1, n = xe(e), a = Br(e, r), l = qn(C, n, R), h = _r === n, v = (p == null ? void 0 : p.active) === !0 && p.rowId === n;
842
+ return /* @__PURE__ */ S(
843
+ m.Row,
462
844
  {
463
- onAction: () => V == null ? void 0 : V(e),
464
- id: s,
845
+ onAction: () => {
846
+ var o;
847
+ (o = M.current) != null && o.active || ve == null || ve(e);
848
+ },
849
+ onMouseEnter: () => H == null ? void 0 : H(e, !0),
850
+ onMouseLeave: () => H == null ? void 0 : H(e, !1),
851
+ id: n,
465
852
  value: e,
466
- columns: o,
467
- expandedColSpan: H,
468
- isExpandable: n,
469
- highlightSelectedRow: !he,
470
- renderExpandedContent: n ? wt : void 0,
471
- className: c(
472
- V && "cursor-pointer",
473
- ct ? "prose" : "",
474
- ze && "[&>td]:after:hidden",
475
- ge && "group/rowactions",
476
- _ && "bg-utility-brand-25 hover:bg-utility-brand-25",
477
- Ue,
478
- fe == null ? void 0 : fe(e)
853
+ columns: f,
854
+ expandedColSpan: ye,
855
+ isExpandable: i,
856
+ highlightSelectedRow: ke,
857
+ renderExpandedContent: i ? wr : void 0,
858
+ [nr]: n,
859
+ [Dn]: String(a),
860
+ className: x(
861
+ ve && "cursor-pointer",
862
+ fr ? "prose" : "",
863
+ Rt && "[&>td]:after:hidden",
864
+ et && "group/rowactions",
865
+ h && "bg-utility-brand-25 hover:bg-utility-brand-25",
866
+ U && l && "bg-secondary",
867
+ Wt,
868
+ $e == null ? void 0 : $e(e)
479
869
  ),
870
+ style: v ? Wn : void 0,
480
871
  children: [
481
- R && /* @__PURE__ */ i(
482
- d.Cell,
872
+ U && /* @__PURE__ */ c(
873
+ m.Cell,
483
874
  {
484
- className: c("relative w-10 text-center", u),
875
+ "data-grid-no-range": "",
876
+ className: x("relative w-10 text-center", b),
485
877
  style: { minWidth: "40px", width: "40px" },
486
- children: /* @__PURE__ */ i(
878
+ children: /* @__PURE__ */ c(
487
879
  "div",
488
880
  {
489
881
  className: "flex items-center justify-center",
490
- onClick: (l) => l.stopPropagation(),
491
- onKeyDown: (l) => l.stopPropagation(),
492
- children: /* @__PURE__ */ i(
493
- nt,
882
+ onClick: (o) => o.stopPropagation(),
883
+ onKeyDown: (o) => o.stopPropagation(),
884
+ children: /* @__PURE__ */ c(
885
+ sr,
494
886
  {
495
- checked: N,
496
- onCheckedChange: (l) => Mt(s, l === !0),
497
- "aria-label": `Select row ${s}`,
887
+ checked: l,
888
+ onCheckedChange: (o) => Kr(n, o === !0),
889
+ "aria-label": `Select row ${n}`,
498
890
  className: "items-center justify-center"
499
891
  }
500
892
  )
@@ -502,187 +894,220 @@ const de = "120px", Te = "300px", Pe = (t) => {
502
894
  )
503
895
  }
504
896
  ),
505
- o.map((l, v) => {
506
- const E = qe.get(l.key), ae = at(
507
- l.key,
508
- O,
509
- E
510
- ), oe = (z == null ? void 0 : z.rowId) === s && (z == null ? void 0 : z.columnKey) === l.key, le = T && !oe && (b == null ? void 0 : b.rowId) === s && (b == null ? void 0 : b.columnKey) === l.key;
511
- return /* @__PURE__ */ i(
512
- d.Cell,
897
+ f.map((o, Ht) => {
898
+ const pt = Ot.get(o.key), we = cr(
899
+ o.key,
900
+ J,
901
+ pt
902
+ ), me = (re == null ? void 0 : re.rowId) === n && (re == null ? void 0 : re.columnKey) === o.key, O = y ? Fn(
903
+ w,
904
+ n,
905
+ o.key,
906
+ R,
907
+ Y
908
+ ) : null, Ye = !y && L && !me && (q == null ? void 0 : q.rowId) === n && (q == null ? void 0 : q.columnKey) === o.key, ie = !!(O != null && O.inRange) && L && !me, ge = ie && O ? On(O.edges) : void 0, j = lt(o);
909
+ return /* @__PURE__ */ c(
910
+ m.Cell,
513
911
  {
514
- sticky: l.sticky,
515
- stickyOffset: l.stickyOffset,
516
- style: _e(l),
912
+ sticky: o.sticky,
913
+ stickyOffset: o.stickyOffset,
914
+ style: {
915
+ ...j,
916
+ ...ge ? { boxShadow: ge } : null
917
+ },
517
918
  "data-grid-cell": "",
518
- "data-grid-row-id": s,
519
- "data-grid-col-key": l.key,
520
- "data-grid-source-index": f,
521
- className: c(
919
+ "data-grid-row-id": n,
920
+ "data-grid-col-key": o.key,
921
+ "data-grid-source-index": a,
922
+ className: x(
522
923
  "relative overflow-x-hidden",
523
- // Excel-style selected-cell highlight: an inset brand border on the
524
- // selected cell (state-driven). Inset so it sits at the cell edge
525
- // without shifting layout. `after:opacity-0` hides the row's bottom-
526
- // border pseudo-element so it doesn't overlap the ring's bottom edge.
527
- le && "z-1 outline-hidden ring-2 ring-inset ring-brand after:opacity-0",
528
- l.cellClassName,
529
- Kt(ae),
530
- u
924
+ // Uncontrolled single-cell highlight (legacy).
925
+ Ye && "z-1 outline-hidden ring-2 ring-inset ring-brand after:opacity-0",
926
+ // Controlled range: fill all selected cells except the anchor; perimeter via boxShadow.
927
+ ie && "z-1 outline-hidden after:opacity-0",
928
+ ie && O && !O.isAnchor && "bg-utility-brand-25",
929
+ o.cellClassName,
930
+ cn(we),
931
+ b
531
932
  ),
532
933
  children: (() => {
533
- const rt = v === 0 && (n || ge) ? /* @__PURE__ */ k("div", { className: "flex items-center", children: [
534
- ye && /* @__PURE__ */ i(
934
+ const Vt = Ht === 0 && (i || et) ? /* @__PURE__ */ S("div", { className: "flex items-center", children: [
935
+ I && /* @__PURE__ */ c(
535
936
  "div",
536
937
  {
938
+ "data-grid-no-range": "",
537
939
  className: "flex items-center justify-center",
538
- onClick: (D) => D.stopPropagation(),
539
- onKeyDown: (D) => D.stopPropagation(),
540
- children: /* @__PURE__ */ i(
541
- fr,
940
+ onClick: (B) => B.stopPropagation(),
941
+ onContextMenu: (B) => B.stopPropagation(),
942
+ onKeyDown: (B) => B.stopPropagation(),
943
+ children: /* @__PURE__ */ c(
944
+ An,
542
945
  {
543
- config: ye,
544
- sourceRowIndex: f,
946
+ config: I,
947
+ sourceRowIndex: a,
545
948
  item: e,
546
- triggerClassName: c(
949
+ enableDrag: tt,
950
+ isDragging: v,
951
+ onDragHandlePointerDown: (B) => Xr(
952
+ B,
953
+ n,
954
+ a,
955
+ e
956
+ ),
957
+ triggerClassName: x(
958
+ // Hover-reveal: hidden until row hover / focus / menu open / this row is the drag source.
959
+ // Do not force all handles visible while another row is dragging.
547
960
  "transition-opacity group-hover/rowactions:opacity-100 focus-visible:opacity-100",
548
- _ ? "opacity-100" : "opacity-0"
961
+ h || v ? "opacity-100" : "opacity-0"
549
962
  ),
550
- onOpenChange: (D) => Rt(D ? s : null)
963
+ onOpenChange: (B) => Tt(B ? n : null)
551
964
  }
552
965
  )
553
966
  }
554
967
  ),
555
- /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: Le(l.key, e[l.key], e) })
556
- ] }) : Le(l.key, e[l.key], e);
557
- return T ? /* @__PURE__ */ i(
968
+ /* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: gt(o.key, e[o.key], e) })
969
+ ] }) : gt(o.key, e[o.key], e);
970
+ return L ? /* @__PURE__ */ c(
558
971
  "div",
559
972
  {
560
973
  "data-grid-focus": !0,
561
974
  tabIndex: -1,
562
975
  className: "outline-hidden",
563
- children: rt
976
+ children: Vt
564
977
  }
565
- ) : rt;
978
+ ) : Vt;
566
979
  })()
567
980
  },
568
- l.key
981
+ o.key
569
982
  );
570
983
  }),
571
- m && S && /* @__PURE__ */ i(
572
- d.Cell,
984
+ T && z && /* @__PURE__ */ c(
985
+ m.Cell,
573
986
  {
574
- className: c("relative w-14 text-center", u),
987
+ "data-grid-no-range": "",
988
+ className: x("relative w-14 text-center", b),
575
989
  style: { minWidth: "56px", width: "56px" },
576
- children: /* @__PURE__ */ i(
990
+ children: /* @__PURE__ */ c(
577
991
  "button",
578
992
  {
579
993
  type: "button",
580
994
  title: "Delete row",
581
995
  "aria-label": "Delete row",
582
996
  className: "inline-flex items-center justify-center rounded p-1 text-fg-quaternary hover:bg-secondary_subtle hover:text-fg-secondary",
583
- onClick: (l) => {
584
- l.stopPropagation(), S.onDeleteRow(f);
997
+ onClick: (o) => {
998
+ o.stopPropagation(), z.onDeleteRow(a);
585
999
  },
586
- children: /* @__PURE__ */ i(hr, { name: "Trash02", className: "size-3" })
1000
+ children: /* @__PURE__ */ c(Bn, { name: "Trash02", className: "size-3" })
587
1001
  }
588
1002
  )
589
1003
  }
590
1004
  )
591
1005
  ]
592
1006
  },
593
- s
1007
+ n
594
1008
  );
595
- }, Ut = (e) => /* @__PURE__ */ k(
596
- d.Row,
1009
+ }, Vr = (e) => /* @__PURE__ */ S(
1010
+ m.Row,
597
1011
  {
598
1012
  id: String(e.id),
599
1013
  isExpandable: !1,
600
- className: c(ze && "[&>td]:after:hidden", Ue),
1014
+ className: x(Rt && "[&>td]:after:hidden", Wt),
601
1015
  children: [
602
- R && /* @__PURE__ */ i(
603
- d.Cell,
1016
+ U && /* @__PURE__ */ c(
1017
+ m.Cell,
604
1018
  {
605
- className: c("relative w-10", u),
1019
+ className: x("relative w-10", b),
606
1020
  style: { minWidth: "40px", width: "40px" }
607
1021
  }
608
1022
  ),
609
- o.map((r) => /* @__PURE__ */ i(
610
- d.Cell,
1023
+ f.map((t) => /* @__PURE__ */ c(
1024
+ m.Cell,
611
1025
  {
612
- sticky: r.sticky,
613
- stickyOffset: r.stickyOffset,
614
- style: _e(r),
615
- className: c(
1026
+ sticky: t.sticky,
1027
+ stickyOffset: t.stickyOffset,
1028
+ style: lt(t),
1029
+ className: x(
616
1030
  "overflow-x-hidden text-left",
617
- r.cellClassName,
618
- u
1031
+ t.cellClassName,
1032
+ b
619
1033
  ),
620
- children: /* @__PURE__ */ i(ur, { height: "14px", width: "75%", className: "rounded" })
1034
+ children: /* @__PURE__ */ c(Xn, { height: "14px", width: "75%", className: "rounded" })
621
1035
  },
622
- r.key
1036
+ t.key
623
1037
  )),
624
- m && /* @__PURE__ */ i(
625
- d.Cell,
1038
+ T && /* @__PURE__ */ c(
1039
+ m.Cell,
626
1040
  {
627
- className: c("w-14", u),
1041
+ className: x("w-14", b),
628
1042
  style: { minWidth: "56px", width: "56px" }
629
1043
  }
630
1044
  )
631
1045
  ]
632
1046
  },
633
1047
  String(e.id)
634
- ), Dt = () => P ? se.map((e) => Ut(e)) : be && L ? L.flatMap((e) => {
635
- const r = re.has(e.key);
1048
+ ), Jr = () => X ? Fe.map((e) => Vr(e)) : Ce && V ? V.flatMap((e) => {
1049
+ const t = Se.has(e.key);
636
1050
  return [
637
- Ht(e),
638
- ...r ? [] : e.rows.map((n) => Ke(n))
1051
+ Hr(e),
1052
+ ...t ? [] : e.rows.map(
1053
+ (r, i) => jt(r, void 0, i)
1054
+ )
639
1055
  ];
640
- }) : se.map((e) => Ke(e)), et = /* @__PURE__ */ i(
641
- Yt.Root,
1056
+ }) : Fe.map(
1057
+ (e, t) => jt(e, void 0, t)
1058
+ ), Zt = /* @__PURE__ */ c(
1059
+ tn.Root,
642
1060
  {
643
- ref: At,
644
- onKeyDownCapture: T ? Ot : void 0,
645
- className: c(
1061
+ ref: Yr,
1062
+ onKeyDownCapture: L ? Mr : void 0,
1063
+ onPointerDownCapture: y ? jr : void 0,
1064
+ onDoubleClickCapture: y ? $r : void 0,
1065
+ className: x(
646
1066
  "w-full",
647
- !w || We ? "overflow-x-auto" : "overflow-x-hidden",
648
- X && "border border-secondary rounded-xl",
649
- ht
1067
+ !W || Xt ? "overflow-x-auto" : "overflow-x-hidden",
1068
+ Ie && "border border-secondary rounded-xl",
1069
+ "[&_tr:hover>td]:!bg-secondary_subtle",
1070
+ hr
650
1071
  ),
651
- size: Oe,
652
- children: /* @__PURE__ */ k(
653
- d,
1072
+ size: xt,
1073
+ children: /* @__PURE__ */ S(
1074
+ m,
654
1075
  {
655
- "aria-label": dt,
656
- size: Oe,
657
- isEditable: T,
658
- inlineSelection: he,
659
- className: c(w && "min-w-full", yt),
660
- style: zt,
661
- ...Gt,
1076
+ "data-table-zoom-typography": Pe !== void 0 ? "" : void 0,
1077
+ "aria-label": ur,
1078
+ size: xt,
1079
+ isEditable: L,
1080
+ inlineSelection: ke,
1081
+ className: x(
1082
+ W && "min-w-full",
1083
+ mr
1084
+ ),
1085
+ style: Ur,
1086
+ ...Ar,
662
1087
  children: [
663
- /* @__PURE__ */ k(
664
- d.Header,
1088
+ /* @__PURE__ */ S(
1089
+ m.Header,
665
1090
  {
666
- className: c(
667
- "sticky top-0",
668
- X && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none z-1",
669
- ut
1091
+ className: x(
1092
+ "sticky top-0 z-20",
1093
+ Ie && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none",
1094
+ yr
670
1095
  ),
671
1096
  children: [
672
- R && /* @__PURE__ */ i(
673
- d.Head,
1097
+ U && /* @__PURE__ */ c(
1098
+ m.Head,
674
1099
  {
675
1100
  label: "",
676
1101
  allowsSorting: !1,
677
1102
  isRowHeader: !1,
678
1103
  style: { minWidth: "40px", width: "40px" },
679
- className: c(u),
1104
+ className: x(b),
680
1105
  headerCellClass: "justify-center",
681
- children: G === "multiple" && y && /* @__PURE__ */ i("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ i(
682
- nt,
1106
+ children: oe === "multiple" && D && /* @__PURE__ */ c("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ c(
1107
+ sr,
683
1108
  {
684
- checked: Ee ? !0 : jt && !Ee ? "indeterminate" : !1,
685
- onCheckedChange: () => Ft(),
1109
+ checked: ft ? !0 : Zr && !ft ? "indeterminate" : !1,
1110
+ onCheckedChange: () => qr(),
686
1111
  "aria-label": "Select all rows",
687
1112
  className: "items-center justify-center"
688
1113
  }
@@ -690,112 +1115,111 @@ const de = "120px", Te = "300px", Pe = (t) => {
690
1115
  },
691
1116
  "selection"
692
1117
  ),
693
- o.map((e, r) => {
694
- const n = mt ? It.get(e.key) : void 0, s = qe.get(e.key), f = at(
1118
+ f.map((e, t) => {
1119
+ const r = kr ? Tr.get(e.key) : void 0, i = Ot.get(e.key), n = cr(
695
1120
  e.key,
696
- O,
697
- s
698
- ), N = ft.includes(e.key) || f === "center" ? "justify-center" : f === "right" ? "justify-end" : "";
699
- return /* @__PURE__ */ k(
700
- d.Head,
1121
+ J,
1122
+ i
1123
+ ), a = pr.includes(e.key) || n === "center" ? "justify-center" : n === "right" ? "justify-end" : "";
1124
+ return /* @__PURE__ */ c(
1125
+ m.Head,
701
1126
  {
702
1127
  sticky: e.sticky,
703
1128
  stickyOffset: e.stickyOffset,
704
1129
  id: e.key,
705
1130
  label: e.label,
706
- isRowHeader: r === 0 && !R,
1131
+ isRowHeader: t === 0,
707
1132
  allowsSorting: e.allowsSorting,
708
- headerCellClass: `${e.headerCellClass} ${N}`,
709
- style: _e(e),
710
- className: c(
1133
+ headerCellClass: `${e.headerCellClass} ${a}`,
1134
+ style: lt(e),
1135
+ className: x(
711
1136
  "overflow-hidden",
712
1137
  e.headClassName,
713
- u
1138
+ b
714
1139
  ),
715
- children: [
716
- n && te && /* @__PURE__ */ i(
717
- lr,
718
- {
719
- column: n,
720
- columnLabel: n.label ?? (s ? Zt(s, kt) : e.label),
721
- currentAlignment: s ? lt(
722
- s,
723
- O ?? /* @__PURE__ */ new Map()
724
- ) : (O == null ? void 0 : O.get(e.key)) ?? "left",
725
- capabilities: Nt,
726
- hideDisabled: o.length <= 1,
727
- onAction: Lt.get(e.key),
728
- renderExtraItems: Ct
729
- }
730
- ),
731
- (ce == null ? void 0 : ce(e.key)) ?? null
732
- ]
1140
+ headerAction: r && _e ? /* @__PURE__ */ c(
1141
+ Mn,
1142
+ {
1143
+ column: r,
1144
+ columnLabel: r.label ?? (i ? an(i, Ir) : e.label),
1145
+ currentAlignment: i ? dr(
1146
+ i,
1147
+ J ?? /* @__PURE__ */ new Map()
1148
+ ) : (J == null ? void 0 : J.get(e.key)) ?? "left",
1149
+ capabilities: Er,
1150
+ hideDisabled: f.length <= 1,
1151
+ onAction: Gr.get(e.key),
1152
+ renderExtraItems: Lr,
1153
+ showOnHeaderHover: !0
1154
+ }
1155
+ ) : void 0,
1156
+ children: (Xe == null ? void 0 : Xe(e.key)) ?? null
733
1157
  },
734
1158
  e.key
735
1159
  );
736
1160
  }),
737
- m && /* @__PURE__ */ i(
738
- d.Head,
1161
+ T && /* @__PURE__ */ c(
1162
+ m.Head,
739
1163
  {
740
1164
  label: "",
741
1165
  allowsSorting: !1,
742
1166
  isRowHeader: !1,
743
1167
  style: { minWidth: "56px", width: "56px" },
744
- className: c(u)
1168
+ className: x(b)
745
1169
  },
746
1170
  "actions"
747
1171
  )
748
1172
  ]
749
1173
  }
750
1174
  ),
751
- /* @__PURE__ */ k(d.Body, { children: [
752
- !Ye && Dt(),
753
- Pt && /* @__PURE__ */ i(
754
- d.Row,
1175
+ /* @__PURE__ */ S(m.Body, { children: [
1176
+ !Yt && Jr(),
1177
+ Or && /* @__PURE__ */ c(
1178
+ m.Row,
755
1179
  {
756
1180
  id: "empty-state",
757
1181
  highlightSelectedRow: !1,
758
- children: /* @__PURE__ */ i(
759
- d.Cell,
1182
+ children: /* @__PURE__ */ c(
1183
+ m.Cell,
760
1184
  {
761
- colSpan: H,
762
- className: c(
1185
+ colSpan: ye,
1186
+ className: x(
763
1187
  "text-left text-placeholder_subtle border-b border-secondary py-3",
764
- u
1188
+ b
765
1189
  ),
766
- children: Me
1190
+ children: Lt
767
1191
  }
768
1192
  )
769
1193
  },
770
1194
  "empty-state"
771
1195
  ),
772
- Ce && S && /* @__PURE__ */ k(
773
- d.Row,
1196
+ it && z && /* @__PURE__ */ S(
1197
+ m.Row,
774
1198
  {
775
1199
  id: "add-row-footer",
776
1200
  highlightSelectedRow: !1,
777
1201
  children: [
778
- /* @__PURE__ */ i(
779
- d.Cell,
1202
+ /* @__PURE__ */ c(
1203
+ m.Cell,
780
1204
  {
781
- colSpan: H - (m ? 1 : 0),
782
- className: c(u),
783
- children: /* @__PURE__ */ i(
784
- dr,
1205
+ colSpan: ye - (T ? 1 : 0),
1206
+ className: x(b),
1207
+ children: /* @__PURE__ */ c(
1208
+ Un,
785
1209
  {
786
1210
  color: "tertiary",
787
1211
  className: "bg-secondary text-primary",
788
1212
  size: "xs",
789
- onClick: S.onAddRow,
1213
+ onClick: z.onAddRow,
790
1214
  children: "+ Add Row"
791
1215
  }
792
1216
  )
793
1217
  }
794
1218
  ),
795
- m && /* @__PURE__ */ i(
796
- d.Cell,
1219
+ T && /* @__PURE__ */ c(
1220
+ m.Cell,
797
1221
  {
798
- className: c("w-14", u),
1222
+ className: x("w-14", b),
799
1223
  style: { minWidth: "56px", width: "56px" }
800
1224
  }
801
1225
  )
@@ -803,13 +1227,13 @@ const de = "120px", Te = "300px", Pe = (t) => {
803
1227
  },
804
1228
  "add-row-footer"
805
1229
  ),
806
- Tt && we && /* @__PURE__ */ i(
807
- cr,
1230
+ zr && Ze && /* @__PURE__ */ c(
1231
+ Yn,
808
1232
  {
809
- ...we,
810
- hasActionsColumn: m,
811
- hasSelectionColumn: R,
812
- showBorders: !!X
1233
+ ...Ze,
1234
+ hasActionsColumn: T,
1235
+ hasSelectionColumn: U,
1236
+ showBorders: !!Ie
813
1237
  }
814
1238
  )
815
1239
  ] })
@@ -817,35 +1241,49 @@ const de = "120px", Te = "300px", Pe = (t) => {
817
1241
  }
818
1242
  )
819
1243
  }
820
- ), tt = T ? /* @__PURE__ */ i(
821
- sr,
1244
+ ), qt = L ? /* @__PURE__ */ c(
1245
+ gn,
822
1246
  {
823
- rowIds: g,
824
- columnKeys: ie,
825
- containerRef: W,
826
- onSelectCell: ve,
827
- onEditingCellChange: Wt,
828
- children: et
1247
+ rowIds: R,
1248
+ columnKeys: Y,
1249
+ containerRef: g,
1250
+ onSelectCell: st,
1251
+ onEditingCellChange: Sr,
1252
+ children: Zt
829
1253
  }
830
- ) : et;
831
- return Et ? /* @__PURE__ */ k("div", { className: "flex flex-col gap-3", children: [
832
- Ve && Je,
833
- tt,
834
- Xe && x && /* @__PURE__ */ i(
835
- Qt,
1254
+ ) : Zt, Kt = p != null && p.active ? /* @__PURE__ */ S(Jt, { children: [
1255
+ /* @__PURE__ */ c(Ln, { session: p }),
1256
+ p.dropLineY != null && /* @__PURE__ */ c(
1257
+ bn,
836
1258
  {
837
- currentPage: x.currentPage,
838
- pageSize: x.pageSize,
839
- totalPages: x.totalPages,
840
- totalItems: x.totalItems,
841
- onPageChange: x.onPageChange,
842
- onPageSizeChange: x.onPageSizeChange,
843
- showPagination: x.showPagination
1259
+ y: p.dropLineY,
1260
+ left: p.dropLineLeft,
1261
+ width: p.dropLineWidth
844
1262
  }
845
1263
  )
846
- ] }) : tt;
1264
+ ] }) : null;
1265
+ return Fr ? /* @__PURE__ */ S("div", { className: "flex flex-col gap-3", children: [
1266
+ Mt && Gt,
1267
+ qt,
1268
+ Ut && _ && /* @__PURE__ */ c(
1269
+ rn,
1270
+ {
1271
+ currentPage: _.currentPage,
1272
+ pageSize: _.pageSize,
1273
+ totalPages: _.totalPages,
1274
+ totalItems: _.totalItems,
1275
+ onPageChange: _.onPageChange,
1276
+ onPageSizeChange: _.onPageSizeChange,
1277
+ showPagination: _.showPagination
1278
+ }
1279
+ ),
1280
+ Kt
1281
+ ] }) : /* @__PURE__ */ S(Jt, { children: [
1282
+ qt,
1283
+ Kt
1284
+ ] });
847
1285
  }
848
1286
  );
849
1287
  export {
850
- Mr as TableWrapper
1288
+ bi as TableWrapper
851
1289
  };