@pibit.ai/cure-design-system 0.4.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) 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 +430 -139
  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/button/button-utility.js +7 -7
  128. package/dist/primitives/button/button.d.ts.map +1 -1
  129. package/dist/primitives/button/button.js +10 -5
  130. package/dist/primitives/checkbox/checkbox.d.ts.map +1 -1
  131. package/dist/primitives/checkbox/checkbox.js +16 -16
  132. package/dist/primitives/custom-icon/custom-icon.d.ts +5 -0
  133. package/dist/primitives/custom-icon/custom-icon.d.ts.map +1 -1
  134. package/dist/primitives/custom-icon/custom-icon.js +14 -16
  135. package/dist/primitives/custom-icon/icons/activity-icon-16x16.d.ts +6 -0
  136. package/dist/primitives/custom-icon/icons/activity-icon-16x16.d.ts.map +1 -0
  137. package/dist/primitives/custom-icon/icons/activity-icon-16x16.js +32 -0
  138. package/dist/primitives/custom-icon/icons/activity-icon.d.ts +6 -0
  139. package/dist/primitives/custom-icon/icons/activity-icon.d.ts.map +1 -0
  140. package/dist/primitives/custom-icon/icons/activity-icon.js +32 -0
  141. package/dist/primitives/custom-icon/icons/activity-solid.d.ts +1 -1
  142. package/dist/primitives/custom-icon/icons/activity-solid.d.ts.map +1 -1
  143. package/dist/primitives/custom-icon/icons/activity-solid.js +24 -33
  144. package/dist/primitives/custom-icon/icons/activity.d.ts +6 -0
  145. package/dist/primitives/custom-icon/icons/activity.d.ts.map +1 -0
  146. package/dist/primitives/custom-icon/icons/activity.js +32 -0
  147. package/dist/primitives/custom-icon/icons/ai-extraction.d.ts +1 -1
  148. package/dist/primitives/custom-icon/icons/ai-extraction.d.ts.map +1 -1
  149. package/dist/primitives/custom-icon/icons/ai-extraction.js +24 -33
  150. package/dist/primitives/custom-icon/icons/aiservice.d.ts +6 -0
  151. package/dist/primitives/custom-icon/icons/aiservice.d.ts.map +1 -0
  152. package/dist/primitives/custom-icon/icons/aiservice.js +38 -0
  153. package/dist/primitives/custom-icon/icons/all-nodes.d.ts +6 -0
  154. package/dist/primitives/custom-icon/icons/all-nodes.d.ts.map +1 -0
  155. package/dist/primitives/custom-icon/icons/all-nodes.js +35 -0
  156. package/dist/primitives/custom-icon/icons/api-solid.d.ts +6 -0
  157. package/dist/primitives/custom-icon/icons/api-solid.d.ts.map +1 -0
  158. package/dist/primitives/custom-icon/icons/api-solid.js +32 -0
  159. package/dist/primitives/custom-icon/icons/api.d.ts +6 -0
  160. package/dist/primitives/custom-icon/icons/api.d.ts.map +1 -0
  161. package/dist/primitives/custom-icon/icons/api.js +32 -0
  162. package/dist/primitives/custom-icon/icons/arrow-up-2.d.ts +6 -0
  163. package/dist/primitives/custom-icon/icons/arrow-up-2.d.ts.map +1 -0
  164. package/dist/primitives/custom-icon/icons/arrow-up-2.js +32 -0
  165. package/dist/primitives/custom-icon/icons/azure.d.ts +6 -0
  166. package/dist/primitives/custom-icon/icons/azure.d.ts.map +1 -0
  167. package/dist/primitives/custom-icon/icons/azure.js +32 -0
  168. package/dist/primitives/custom-icon/icons/beaker-03.d.ts +6 -0
  169. package/dist/primitives/custom-icon/icons/beaker-03.d.ts.map +1 -0
  170. package/dist/primitives/custom-icon/icons/beaker-03.js +32 -0
  171. package/dist/primitives/custom-icon/icons/bell-with-dots.d.ts +6 -0
  172. package/dist/primitives/custom-icon/icons/bell-with-dots.d.ts.map +1 -0
  173. package/dist/primitives/custom-icon/icons/bell-with-dots.js +33 -0
  174. package/dist/primitives/custom-icon/icons/bell-without-dots.d.ts +6 -0
  175. package/dist/primitives/custom-icon/icons/bell-without-dots.d.ts.map +1 -0
  176. package/dist/primitives/custom-icon/icons/bell-without-dots.js +32 -0
  177. package/dist/primitives/custom-icon/icons/bill-02-18x23.d.ts +6 -0
  178. package/dist/primitives/custom-icon/icons/bill-02-18x23.d.ts.map +1 -0
  179. package/dist/primitives/custom-icon/icons/bill-02-18x23.js +32 -0
  180. package/dist/primitives/custom-icon/icons/bill-02.d.ts +6 -0
  181. package/dist/primitives/custom-icon/icons/bill-02.d.ts.map +1 -0
  182. package/dist/primitives/custom-icon/icons/bill-02.js +32 -0
  183. package/dist/primitives/custom-icon/icons/branch.d.ts +1 -1
  184. package/dist/primitives/custom-icon/icons/branch.d.ts.map +1 -1
  185. package/dist/primitives/custom-icon/icons/branch.js +16 -15
  186. package/dist/primitives/custom-icon/icons/break.d.ts +6 -0
  187. package/dist/primitives/custom-icon/icons/break.d.ts.map +1 -0
  188. package/dist/primitives/custom-icon/icons/break.js +33 -0
  189. package/dist/primitives/custom-icon/icons/calendar.d.ts +1 -1
  190. package/dist/primitives/custom-icon/icons/calendar.d.ts.map +1 -1
  191. package/dist/primitives/custom-icon/icons/calendar.js +24 -33
  192. package/dist/primitives/custom-icon/icons/callable.d.ts +1 -1
  193. package/dist/primitives/custom-icon/icons/callable.d.ts.map +1 -1
  194. package/dist/primitives/custom-icon/icons/callable.js +23 -22
  195. package/dist/primitives/custom-icon/icons/camico.d.ts +6 -0
  196. package/dist/primitives/custom-icon/icons/camico.d.ts.map +1 -0
  197. package/dist/primitives/custom-icon/icons/camico.js +38 -0
  198. package/dist/primitives/custom-icon/icons/check-circle-broken-solid.d.ts +1 -1
  199. package/dist/primitives/custom-icon/icons/check-circle-broken-solid.d.ts.map +1 -1
  200. package/dist/primitives/custom-icon/icons/check-circle-broken-solid.js +21 -20
  201. package/dist/primitives/custom-icon/icons/check-icon-20.d.ts +6 -0
  202. package/dist/primitives/custom-icon/icons/check-icon-20.d.ts.map +1 -0
  203. package/dist/primitives/custom-icon/icons/check-icon-20.js +33 -0
  204. package/dist/primitives/custom-icon/icons/check-icon-v2.d.ts +6 -0
  205. package/dist/primitives/custom-icon/icons/check-icon-v2.d.ts.map +1 -0
  206. package/dist/primitives/custom-icon/icons/check-icon-v2.js +33 -0
  207. package/dist/primitives/custom-icon/icons/check-icon.d.ts +6 -0
  208. package/dist/primitives/custom-icon/icons/check-icon.d.ts.map +1 -0
  209. package/dist/primitives/custom-icon/icons/check-icon.js +33 -0
  210. package/dist/primitives/custom-icon/icons/clear-cure.d.ts +1 -1
  211. package/dist/primitives/custom-icon/icons/clear-cure.d.ts.map +1 -1
  212. package/dist/primitives/custom-icon/icons/clear-cure.js +24 -35
  213. package/dist/primitives/custom-icon/icons/code-node.d.ts +1 -1
  214. package/dist/primitives/custom-icon/icons/code-node.d.ts.map +1 -1
  215. package/dist/primitives/custom-icon/icons/code-node.js +22 -23
  216. package/dist/primitives/custom-icon/icons/collapse-left.d.ts +1 -1
  217. package/dist/primitives/custom-icon/icons/collapse-left.d.ts.map +1 -1
  218. package/dist/primitives/custom-icon/icons/collapse-left.js +21 -23
  219. package/dist/primitives/custom-icon/icons/collapse-right.d.ts +1 -1
  220. package/dist/primitives/custom-icon/icons/collapse-right.d.ts.map +1 -1
  221. package/dist/primitives/custom-icon/icons/collapse-right.js +21 -23
  222. package/dist/primitives/custom-icon/icons/condition.d.ts +6 -0
  223. package/dist/primitives/custom-icon/icons/condition.d.ts.map +1 -0
  224. package/dist/primitives/custom-icon/icons/condition.js +32 -0
  225. package/dist/primitives/custom-icon/icons/continue.d.ts +6 -0
  226. package/dist/primitives/custom-icon/icons/continue.d.ts.map +1 -0
  227. package/dist/primitives/custom-icon/icons/continue.js +37 -0
  228. package/dist/primitives/custom-icon/icons/csv.d.ts +6 -0
  229. package/dist/primitives/custom-icon/icons/csv.d.ts.map +1 -0
  230. package/dist/primitives/custom-icon/icons/csv.js +35 -0
  231. package/dist/primitives/custom-icon/icons/custom-endpoint.d.ts +6 -0
  232. package/dist/primitives/custom-icon/icons/custom-endpoint.d.ts.map +1 -0
  233. package/dist/primitives/custom-icon/icons/custom-endpoint.js +32 -0
  234. package/dist/primitives/custom-icon/icons/dots.d.ts +6 -0
  235. package/dist/primitives/custom-icon/icons/dots.d.ts.map +1 -0
  236. package/dist/primitives/custom-icon/icons/dots.js +32 -0
  237. package/dist/primitives/custom-icon/icons/file-04-solid.d.ts +1 -1
  238. package/dist/primitives/custom-icon/icons/file-04-solid.d.ts.map +1 -1
  239. package/dist/primitives/custom-icon/icons/file-04-solid.js +22 -23
  240. package/dist/primitives/custom-icon/icons/file-edit-18x19.d.ts +6 -0
  241. package/dist/primitives/custom-icon/icons/file-edit-18x19.d.ts.map +1 -0
  242. package/dist/primitives/custom-icon/icons/file-edit-18x19.js +32 -0
  243. package/dist/primitives/custom-icon/icons/file-edit.d.ts +1 -1
  244. package/dist/primitives/custom-icon/icons/file-edit.d.ts.map +1 -1
  245. package/dist/primitives/custom-icon/icons/file-edit.js +23 -25
  246. package/dist/primitives/custom-icon/icons/files-manager.d.ts +6 -0
  247. package/dist/primitives/custom-icon/icons/files-manager.d.ts.map +1 -0
  248. package/dist/primitives/custom-icon/icons/files-manager.js +32 -0
  249. package/dist/primitives/custom-icon/icons/filtered-view.d.ts +6 -0
  250. package/dist/primitives/custom-icon/icons/filtered-view.d.ts.map +1 -0
  251. package/dist/primitives/custom-icon/icons/filtered-view.js +32 -0
  252. package/dist/primitives/custom-icon/icons/folder-open-40x40.d.ts +6 -0
  253. package/dist/primitives/custom-icon/icons/folder-open-40x40.d.ts.map +1 -0
  254. package/dist/primitives/custom-icon/icons/folder-open-40x40.js +68 -0
  255. package/dist/primitives/custom-icon/icons/folder-open.d.ts +6 -0
  256. package/dist/primitives/custom-icon/icons/folder-open.d.ts.map +1 -0
  257. package/dist/primitives/custom-icon/icons/folder-open.js +68 -0
  258. package/dist/primitives/custom-icon/icons/foresight.d.ts +6 -0
  259. package/dist/primitives/custom-icon/icons/foresight.d.ts.map +1 -0
  260. package/dist/primitives/custom-icon/icons/foresight.js +32 -0
  261. package/dist/primitives/custom-icon/icons/formula.d.ts +1 -1
  262. package/dist/primitives/custom-icon/icons/formula.d.ts.map +1 -1
  263. package/dist/primitives/custom-icon/icons/formula.js +20 -22
  264. package/dist/primitives/custom-icon/icons/gmail-big.d.ts +6 -0
  265. package/dist/primitives/custom-icon/icons/gmail-big.d.ts.map +1 -0
  266. package/dist/primitives/custom-icon/icons/gmail-big.js +38 -0
  267. package/dist/primitives/custom-icon/icons/gmail.d.ts +6 -0
  268. package/dist/primitives/custom-icon/icons/gmail.d.ts.map +1 -0
  269. package/dist/primitives/custom-icon/icons/gmail.js +39 -0
  270. package/dist/primitives/custom-icon/icons/google-chat.d.ts +6 -0
  271. package/dist/primitives/custom-icon/icons/google-chat.d.ts.map +1 -0
  272. package/dist/primitives/custom-icon/icons/google-chat.js +32 -0
  273. package/dist/primitives/custom-icon/icons/google.d.ts +6 -0
  274. package/dist/primitives/custom-icon/icons/google.d.ts.map +1 -0
  275. package/dist/primitives/custom-icon/icons/google.js +35 -0
  276. package/dist/primitives/custom-icon/icons/grid-plus.d.ts +1 -1
  277. package/dist/primitives/custom-icon/icons/grid-plus.d.ts.map +1 -1
  278. package/dist/primitives/custom-icon/icons/grid-plus.js +23 -25
  279. package/dist/primitives/custom-icon/icons/group-by.d.ts +6 -0
  280. package/dist/primitives/custom-icon/icons/group-by.d.ts.map +1 -0
  281. package/dist/primitives/custom-icon/icons/group-by.js +33 -0
  282. package/dist/primitives/custom-icon/icons/guidewire.d.ts +6 -0
  283. package/dist/primitives/custom-icon/icons/guidewire.d.ts.map +1 -0
  284. package/dist/primitives/custom-icon/icons/guidewire.js +33 -0
  285. package/dist/primitives/custom-icon/icons/http-endpoint.d.ts +1 -1
  286. package/dist/primitives/custom-icon/icons/http-endpoint.d.ts.map +1 -1
  287. package/dist/primitives/custom-icon/icons/http-endpoint.js +23 -22
  288. package/dist/primitives/custom-icon/icons/hubspot.d.ts +6 -0
  289. package/dist/primitives/custom-icon/icons/hubspot.d.ts.map +1 -0
  290. package/dist/primitives/custom-icon/icons/hubspot.js +32 -0
  291. package/dist/primitives/custom-icon/icons/integer-20.d.ts +6 -0
  292. package/dist/primitives/custom-icon/icons/integer-20.d.ts.map +1 -0
  293. package/dist/primitives/custom-icon/icons/integer-20.js +32 -0
  294. package/dist/primitives/custom-icon/icons/integer.d.ts +1 -1
  295. package/dist/primitives/custom-icon/icons/integer.d.ts.map +1 -1
  296. package/dist/primitives/custom-icon/icons/integer.js +22 -24
  297. package/dist/primitives/custom-icon/icons/loop.d.ts +1 -1
  298. package/dist/primitives/custom-icon/icons/loop.d.ts.map +1 -1
  299. package/dist/primitives/custom-icon/icons/loop.js +25 -46
  300. package/dist/primitives/custom-icon/icons/mail-01-solid.d.ts +1 -1
  301. package/dist/primitives/custom-icon/icons/mail-01-solid.d.ts.map +1 -1
  302. package/dist/primitives/custom-icon/icons/mail-01-solid.js +23 -30
  303. package/dist/primitives/custom-icon/icons/message-dots-square-solid.d.ts +1 -1
  304. package/dist/primitives/custom-icon/icons/message-dots-square-solid.d.ts.map +1 -1
  305. package/dist/primitives/custom-icon/icons/message-dots-square-solid.js +18 -21
  306. package/dist/primitives/custom-icon/icons/microsoft-outlook.d.ts +6 -0
  307. package/dist/primitives/custom-icon/icons/microsoft-outlook.d.ts.map +1 -0
  308. package/dist/primitives/custom-icon/icons/microsoft-outlook.js +103 -0
  309. package/dist/primitives/custom-icon/icons/microsoft.d.ts +6 -0
  310. package/dist/primitives/custom-icon/icons/microsoft.d.ts.map +1 -0
  311. package/dist/primitives/custom-icon/icons/microsoft.js +32 -0
  312. package/dist/primitives/custom-icon/icons/object-manager.d.ts +1 -1
  313. package/dist/primitives/custom-icon/icons/object-manager.d.ts.map +1 -1
  314. package/dist/primitives/custom-icon/icons/object-manager.js +23 -44
  315. package/dist/primitives/custom-icon/icons/okta.d.ts +6 -0
  316. package/dist/primitives/custom-icon/icons/okta.d.ts.map +1 -0
  317. package/dist/primitives/custom-icon/icons/okta.js +32 -0
  318. package/dist/primitives/custom-icon/icons/onedrive.d.ts +6 -0
  319. package/dist/primitives/custom-icon/icons/onedrive.d.ts.map +1 -0
  320. package/dist/primitives/custom-icon/icons/onedrive.js +78 -0
  321. package/dist/primitives/custom-icon/icons/outlook.d.ts +6 -0
  322. package/dist/primitives/custom-icon/icons/outlook.d.ts.map +1 -0
  323. package/dist/primitives/custom-icon/icons/outlook.js +103 -0
  324. package/dist/primitives/custom-icon/icons/parallel-branch.d.ts +6 -0
  325. package/dist/primitives/custom-icon/icons/parallel-branch.d.ts.map +1 -0
  326. package/dist/primitives/custom-icon/icons/parallel-branch.js +33 -0
  327. package/dist/primitives/custom-icon/icons/platform.d.ts +6 -0
  328. package/dist/primitives/custom-icon/icons/platform.d.ts.map +1 -0
  329. package/dist/primitives/custom-icon/icons/platform.js +34 -0
  330. package/dist/primitives/custom-icon/icons/plus-circle-solid.d.ts +1 -1
  331. package/dist/primitives/custom-icon/icons/plus-circle-solid.d.ts.map +1 -1
  332. package/dist/primitives/custom-icon/icons/plus-circle-solid.js +22 -25
  333. package/dist/primitives/custom-icon/icons/primespecialty.d.ts +6 -0
  334. package/dist/primitives/custom-icon/icons/primespecialty.d.ts.map +1 -0
  335. package/dist/primitives/custom-icon/icons/primespecialty.js +41 -0
  336. package/dist/primitives/custom-icon/icons/queue.d.ts +6 -0
  337. package/dist/primitives/custom-icon/icons/queue.d.ts.map +1 -0
  338. package/dist/primitives/custom-icon/icons/queue.js +34 -0
  339. package/dist/primitives/custom-icon/icons/reorder-dots-8x14.d.ts +6 -0
  340. package/dist/primitives/custom-icon/icons/reorder-dots-8x14.d.ts.map +1 -0
  341. package/dist/primitives/custom-icon/icons/reorder-dots-8x14.js +37 -0
  342. package/dist/primitives/custom-icon/icons/reorder-dots-new.d.ts +6 -0
  343. package/dist/primitives/custom-icon/icons/reorder-dots-new.d.ts.map +1 -0
  344. package/dist/primitives/custom-icon/icons/reorder-dots-new.js +37 -0
  345. package/dist/primitives/custom-icon/icons/reorder-dots.d.ts +6 -0
  346. package/dist/primitives/custom-icon/icons/reorder-dots.d.ts.map +1 -0
  347. package/dist/primitives/custom-icon/icons/reorder-dots.js +37 -0
  348. package/dist/primitives/custom-icon/icons/risk-score.d.ts +6 -0
  349. package/dist/primitives/custom-icon/icons/risk-score.d.ts.map +1 -0
  350. package/dist/primitives/custom-icon/icons/risk-score.js +38 -0
  351. package/dist/primitives/custom-icon/icons/rotate-icon-19x18.d.ts +6 -0
  352. package/dist/primitives/custom-icon/icons/rotate-icon-19x18.d.ts.map +1 -0
  353. package/dist/primitives/custom-icon/icons/rotate-icon-19x18.js +32 -0
  354. package/dist/primitives/custom-icon/icons/rotate-icon.d.ts +6 -0
  355. package/dist/primitives/custom-icon/icons/rotate-icon.d.ts.map +1 -0
  356. package/dist/primitives/custom-icon/icons/rotate-icon.js +32 -0
  357. package/dist/primitives/custom-icon/icons/salesforce.d.ts +6 -0
  358. package/dist/primitives/custom-icon/icons/salesforce.d.ts.map +1 -0
  359. package/dist/primitives/custom-icon/icons/salesforce.js +40 -0
  360. package/dist/primitives/custom-icon/icons/saml.d.ts +6 -0
  361. package/dist/primitives/custom-icon/icons/saml.d.ts.map +1 -0
  362. package/dist/primitives/custom-icon/icons/saml.js +35 -0
  363. package/dist/primitives/custom-icon/icons/show-summary.d.ts +6 -0
  364. package/dist/primitives/custom-icon/icons/show-summary.d.ts.map +1 -0
  365. package/dist/primitives/custom-icon/icons/show-summary.js +32 -0
  366. package/dist/primitives/custom-icon/icons/slack.d.ts +6 -0
  367. package/dist/primitives/custom-icon/icons/slack.d.ts.map +1 -0
  368. package/dist/primitives/custom-icon/icons/slack.js +35 -0
  369. package/dist/primitives/custom-icon/icons/sqs.d.ts +6 -0
  370. package/dist/primitives/custom-icon/icons/sqs.d.ts.map +1 -0
  371. package/dist/primitives/custom-icon/icons/sqs.js +34 -0
  372. package/dist/primitives/custom-icon/icons/stop-circle-solid.d.ts +6 -0
  373. package/dist/primitives/custom-icon/icons/stop-circle-solid.d.ts.map +1 -0
  374. package/dist/primitives/custom-icon/icons/stop-circle-solid.js +32 -0
  375. package/dist/primitives/custom-icon/icons/stop.d.ts +6 -0
  376. package/dist/primitives/custom-icon/icons/stop.d.ts.map +1 -0
  377. package/dist/primitives/custom-icon/icons/stop.js +33 -0
  378. package/dist/primitives/custom-icon/icons/submission.d.ts +1 -1
  379. package/dist/primitives/custom-icon/icons/submission.d.ts.map +1 -1
  380. package/dist/primitives/custom-icon/icons/submission.js +23 -22
  381. package/dist/primitives/custom-icon/icons/swap.d.ts +1 -1
  382. package/dist/primitives/custom-icon/icons/swap.d.ts.map +1 -1
  383. package/dist/primitives/custom-icon/icons/swap.js +30 -25
  384. package/dist/primitives/custom-icon/icons/test-tube.d.ts +6 -0
  385. package/dist/primitives/custom-icon/icons/test-tube.d.ts.map +1 -0
  386. package/dist/primitives/custom-icon/icons/test-tube.js +32 -0
  387. package/dist/primitives/custom-icon/icons/thumbs-down-solid.d.ts +1 -1
  388. package/dist/primitives/custom-icon/icons/thumbs-down-solid.d.ts.map +1 -1
  389. package/dist/primitives/custom-icon/icons/thumbs-down-solid.js +23 -30
  390. package/dist/primitives/custom-icon/icons/thumbs-up-solid.d.ts +1 -1
  391. package/dist/primitives/custom-icon/icons/thumbs-up-solid.d.ts.map +1 -1
  392. package/dist/primitives/custom-icon/icons/thumbs-up-solid.js +23 -30
  393. package/dist/primitives/custom-icon/icons/variable-node.d.ts +1 -1
  394. package/dist/primitives/custom-icon/icons/variable-node.d.ts.map +1 -1
  395. package/dist/primitives/custom-icon/icons/variable-node.js +23 -33
  396. package/dist/primitives/custom-icon/icons/variable.d.ts +6 -0
  397. package/dist/primitives/custom-icon/icons/variable.d.ts.map +1 -0
  398. package/dist/primitives/custom-icon/icons/variable.js +33 -0
  399. package/dist/primitives/custom-icon/icons/webhook-solid.d.ts +6 -0
  400. package/dist/primitives/custom-icon/icons/webhook-solid.d.ts.map +1 -0
  401. package/dist/primitives/custom-icon/icons/webhook-solid.js +34 -0
  402. package/dist/primitives/custom-icon/index.d.ts +2 -1
  403. package/dist/primitives/custom-icon/index.d.ts.map +1 -1
  404. package/dist/primitives/custom-icon/index.js +242 -0
  405. package/dist/primitives/custom-icon/named-icons.d.ts +117 -0
  406. package/dist/primitives/custom-icon/named-icons.d.ts.map +1 -0
  407. package/dist/primitives/custom-icon/named-icons.js +232 -0
  408. package/dist/primitives/custom-icon/registry.d.ts +259 -4
  409. package/dist/primitives/custom-icon/registry.d.ts.map +1 -1
  410. package/dist/primitives/custom-icon/registry.js +492 -108
  411. package/dist/primitives/dropdown/dropdown.d.ts +11 -2
  412. package/dist/primitives/dropdown/dropdown.d.ts.map +1 -1
  413. package/dist/primitives/dropdown/dropdown.js +95 -66
  414. package/dist/primitives/dropdown/dropdown.nestedOverlay.test.d.ts +2 -0
  415. package/dist/primitives/dropdown/dropdown.nestedOverlay.test.d.ts.map +1 -0
  416. package/dist/primitives/icon/icons.js +1 -0
  417. package/dist/primitives/input/hint-text.d.ts +1 -2
  418. package/dist/primitives/input/hint-text.d.ts.map +1 -1
  419. package/dist/primitives/input/hint-text.js +1 -1
  420. package/dist/primitives/input/index.d.ts +3 -1
  421. package/dist/primitives/input/index.d.ts.map +1 -1
  422. package/dist/primitives/input/input.d.ts +2 -2
  423. package/dist/primitives/input/input.d.ts.map +1 -1
  424. package/dist/primitives/input/input.js +136 -129
  425. package/dist/primitives/input/label.d.ts +1 -2
  426. package/dist/primitives/input/label.d.ts.map +1 -1
  427. package/dist/primitives/multi-chips-select/MultiChipsSelect.d.ts +20 -0
  428. package/dist/primitives/multi-chips-select/MultiChipsSelect.d.ts.map +1 -0
  429. package/dist/primitives/multi-chips-select/MultiChipsSelect.js +233 -0
  430. package/dist/primitives/multi-chips-select/index.d.ts +3 -0
  431. package/dist/primitives/multi-chips-select/index.d.ts.map +1 -0
  432. package/dist/primitives/multi-chips-select/tagKeyFromLabel.d.ts +3 -0
  433. package/dist/primitives/multi-chips-select/tagKeyFromLabel.d.ts.map +1 -0
  434. package/dist/primitives/multi-chips-select/tagKeyFromLabel.js +6 -0
  435. package/dist/primitives/select/ExpandableSearchInput.d.ts +3 -1
  436. package/dist/primitives/select/ExpandableSearchInput.d.ts.map +1 -1
  437. package/dist/primitives/select/ExpandableSearchInput.js +101 -78
  438. package/dist/primitives/select/SearchInput.d.ts +10 -6
  439. package/dist/primitives/select/SearchInput.d.ts.map +1 -1
  440. package/dist/primitives/select/SearchInput.js +110 -85
  441. package/dist/primitives/select/combobox.d.ts.map +1 -1
  442. package/dist/primitives/select/combobox.js +48 -47
  443. package/dist/primitives/select/index.d.ts +1 -0
  444. package/dist/primitives/select/index.d.ts.map +1 -1
  445. package/dist/primitives/select/multi-select.d.ts.map +1 -1
  446. package/dist/primitives/select/multi-select.js +50 -49
  447. package/dist/primitives/select/select-item.d.ts +1 -2
  448. package/dist/primitives/select/select-item.d.ts.map +1 -1
  449. package/dist/primitives/toggle/toggle.d.ts.map +1 -1
  450. package/dist/primitives/toggle/toggle.js +55 -50
  451. package/dist/primitives/tooltip/tooltip.d.ts +5 -1
  452. package/dist/primitives/tooltip/tooltip.d.ts.map +1 -1
  453. package/dist/primitives/tooltip/tooltip.js +35 -33
  454. package/dist/styles/components.css +1 -1
  455. package/dist/styles/theme.css +1 -1
  456. package/dist/utils/keyboard-shortcut.d.ts +4 -0
  457. package/dist/utils/keyboard-shortcut.d.ts.map +1 -0
  458. package/dist/utils/keyboard-shortcut.js +29 -0
  459. package/package.json +5 -2
  460. package/dist/primitives/custom-icon/icons/Placeholder.js +0 -39
@@ -0,0 +1,810 @@
1
+ import { jsx as i, jsxs as m, Fragment as sn } from "react/jsx-runtime";
2
+ import { forwardRef as ln, useCallback as A, useMemo as v, useRef as oe, useState as Ne, useLayoutEffect as an, Fragment as dn } from "react";
3
+ import { functionalUpdate as Ye, useTable as cn } from "@tanstack/react-table";
4
+ import { ArrowDown as un, ChevronSelectorVertical as mn, ChevronRight as $e } from "@untitledui/icons";
5
+ import { Checkbox as Ue } from "../../primitives/checkbox/checkbox.js";
6
+ import { ShimmerLine as fn } from "../../primitives/shimmer/shimmer.js";
7
+ import { cn as d } from "../../utils/cn.js";
8
+ import { selectionFromSingleCell as pn, getCellRangeVisualState as bn, cellRangeEdgeBoxShadow as hn } from "../table/cellRangeSelection.js";
9
+ import { useCellRangeSelection as gn } from "./useCellRangeSelection.js";
10
+ import { useRowReorderDrag as xn } from "./useRowReorderDrag.js";
11
+ import { GridNavProvider as yn } from "../table/useGridKeyboardNavigation.js";
12
+ import { ROW_DRAG_SOURCE_STYLE as wn, ROW_SOURCE_INDEX_ATTR as vn, ROW_REORDER_ATTR as Cn, FloatingRowPreview as Sn, DropIndicatorLine as In } from "../table/rowReorderDrag.js";
13
+ import { buildTableComponentColumns as Nn } from "./buildTableColumns.js";
14
+ import { HEADER_PADDING_CLASS as En, ROW_HEIGHT_CLASS as Ze, CELL_PADDING_CLASS as He } from "./rowMetrics.js";
15
+ import { tableComponentFeatures as Tn } from "./tableFeatures.js";
16
+ import { TableZoomControl as _n } from "../table/TableZoomControl.js";
17
+ import { useFitTableToViewport as Ln } from "../table/useFitTableToViewport.js";
18
+ import { useTableZoomState as Rn } from "../table/useTableZoomState.js";
19
+ import { DEFAULT_TABLE_ZOOM_MIN as Wn, parsePxValue as Ee, DEFAULT_ZOOMABLE_COLUMN_MIN_WIDTH as qe, supportsCssZoom as Dn, computeFillBaseWidth as kn, computeEffectiveTableWidth as On, computeFlexColumnWidth as zn, getTableZoomFontSize as An, computeNeedsHorizontalScroll as Fn, DEFAULT_COLUMN_MAX_WIDTH as Pn } from "../table/tableZoomLayout.js";
20
+ const Vn = 5, jn = Dn(), Mn = (r) => r === "center" ? "text-center" : r === "right" ? "text-right" : "text-left", Ge = (r) => r === "center" ? "justify-center" : r === "right" ? "justify-end" : "justify-start", ne = (r, l) => {
21
+ const c = r.__sourceIndex;
22
+ return typeof c == "number" ? c : Number.isFinite(l) ? l : null;
23
+ }, Be = (r) => r instanceof HTMLElement && !!r.closest(
24
+ 'button,a,input,textarea,select,[contenteditable]:not([contenteditable="false"]),[role="button"],[role="menuitem"]'
25
+ ), z = (r, l, c) => {
26
+ const [L, R] = Ne(l), f = r ?? L, C = oe(f), p = oe(c);
27
+ C.current = f, p.current = c;
28
+ const ie = A(
29
+ (g) => {
30
+ var x;
31
+ const I = Ye(g, C.current);
32
+ C.current = I, r === void 0 && R(I), (x = p.current) == null || x.call(p, I);
33
+ },
34
+ [r]
35
+ );
36
+ return [f, ie];
37
+ }, Kn = (r, l) => {
38
+ if (!r) return;
39
+ const c = r.sticky ? {
40
+ position: "sticky",
41
+ [r.sticky]: r.stickyOffset ?? 0,
42
+ zIndex: l ? 30 : 20,
43
+ backgroundColor: l ? "var(--color-bg-secondary-subtle)" : "var(--color-bg-primary)",
44
+ boxShadow: l || !r.sticky ? void 0 : r.sticky === "right" ? "inset 2px 0 0 0 var(--color-border-tertiary)" : "inset -2px 0 0 0 var(--color-border-tertiary)"
45
+ } : {};
46
+ return {
47
+ width: r.width,
48
+ minWidth: r.minWidth ?? r.width ?? `${re}px`,
49
+ maxWidth: r.maxWidth ?? Pn,
50
+ ...c
51
+ };
52
+ }, re = 120, Ie = (r) => !!(r.maxWidth && r.sticky === "right"), $n = (r, l = re) => Ee(r.minWidth) || l, Xe = (r, l, c, L) => {
53
+ if (l === "multiple") return r;
54
+ if (r === !0) return L ? { [L]: !0 } : {};
55
+ const R = c && c !== !0 ? new Set(
56
+ Object.keys(c).filter((p) => c[p])
57
+ ) : /* @__PURE__ */ new Set(), f = Object.keys(r).filter((p) => r[p]), C = f.find((p) => !R.has(p)) ?? f[0];
58
+ return C ? { [C]: !0 } : {};
59
+ };
60
+ function Un({
61
+ data: r,
62
+ columns: l,
63
+ getRowId: c,
64
+ ariaLabel: L,
65
+ headerGroups: R,
66
+ size: f = "xs",
67
+ loading: C = !1,
68
+ loadingRowCount: p = Vn,
69
+ emptyState: ie = "No data found",
70
+ showBorders: g = !1,
71
+ removeRowBorders: I = !1,
72
+ fillWidth: x = !1,
73
+ zoom: Je,
74
+ zoomDisabled: Qe = !1,
75
+ className: Te,
76
+ rootClassName: et,
77
+ tableClassName: tt,
78
+ headerClassName: nt,
79
+ getRowClassName: se,
80
+ onRowClick: le,
81
+ onRowHover: $,
82
+ toolbar: ot,
83
+ renderToolbar: ae,
84
+ pagination: _e,
85
+ summaryRow: rt,
86
+ rowGroups: F,
87
+ renderGroupHeader: de,
88
+ collapsedGroupIds: it,
89
+ defaultCollapsedGroupIds: st = [],
90
+ onCollapsedGroupIdsChange: lt,
91
+ enableSorting: Le = !1,
92
+ sorting: at,
93
+ defaultSorting: dt = [],
94
+ onSortingChange: ct,
95
+ columnVisibility: ut,
96
+ defaultColumnVisibility: mt = {},
97
+ onColumnVisibilityChange: ft,
98
+ columnOrder: pt,
99
+ defaultColumnOrder: bt = [],
100
+ onColumnOrderChange: ht,
101
+ selectionMode: U = "none",
102
+ rowSelection: gt,
103
+ defaultRowSelection: xt = {},
104
+ onRowSelectionChange: yt,
105
+ expanded: wt,
106
+ defaultExpanded: vt = {},
107
+ onExpandedChange: Ct,
108
+ expansionMode: ce = "multiple",
109
+ getRowCanExpand: ue,
110
+ renderExpandedContent: Z,
111
+ onCellClick: me,
112
+ onCellDoubleClick: fe,
113
+ onCellActivate: W,
114
+ cellSelection: H,
115
+ onCellSelectionChange: P,
116
+ onCopyCells: St,
117
+ onPasteCells: It,
118
+ onClearCells: Nt,
119
+ onReorderRows: Re,
120
+ enableRowReorder: Et,
121
+ activateOnSingleClick: Tt
122
+ }, q) {
123
+ var Me;
124
+ const { zoomConfig: N, zoomPercent: V, setZoomPercent: We } = Rn(Je), y = N !== null && jn, j = y ? V / 100 : 1, G = y ? An(V) : void 0, _t = (N == null ? void 0 : N.minZoom) ?? Wn, [Lt, Rt] = z(
125
+ at,
126
+ dt,
127
+ ct
128
+ ), [Wt, Dt] = z(
129
+ ut,
130
+ mt,
131
+ ft
132
+ ), [kt, Ot] = z(
133
+ pt,
134
+ bt,
135
+ ht
136
+ ), [zt, At] = z(
137
+ gt,
138
+ xt,
139
+ yt
140
+ ), [Ft, De] = z(
141
+ wt,
142
+ vt,
143
+ Ct
144
+ ), pe = r.length > 0 ? c(r[0], 0) : void 0, Pt = Xe(
145
+ Ft,
146
+ ce,
147
+ void 0,
148
+ pe
149
+ ), Vt = A(
150
+ (e) => {
151
+ De(
152
+ (t) => Xe(
153
+ Ye(e, t),
154
+ ce,
155
+ t,
156
+ pe
157
+ )
158
+ );
159
+ },
160
+ [ce, pe, De]
161
+ ), [ke, Oe] = z(
162
+ it,
163
+ st,
164
+ lt
165
+ ), be = v(
166
+ () => new Set(ke),
167
+ [ke]
168
+ ), jt = A(
169
+ (e) => Oe(
170
+ (t) => t.includes(e) ? t.filter((o) => o !== e) : [...t, e]
171
+ ),
172
+ [Oe]
173
+ ), D = oe(null), [M, ze] = Ne(null), Mt = Ln({
174
+ containerRef: D,
175
+ zoomConfig: N,
176
+ zoomPercent: V,
177
+ setZoomPercent: We
178
+ });
179
+ an(() => {
180
+ if (!x) {
181
+ ze(null);
182
+ return;
183
+ }
184
+ const e = D.current;
185
+ if (!e || typeof ResizeObserver > "u") return;
186
+ const t = () => {
187
+ const n = e.clientWidth;
188
+ n > 0 && ze(
189
+ (s) => s === n ? s : n
190
+ );
191
+ };
192
+ t();
193
+ const o = new ResizeObserver(t);
194
+ return o.observe(e), () => o.disconnect();
195
+ }, [x, l.length, r.length, C]);
196
+ const b = v(() => {
197
+ if (!x) return null;
198
+ const e = l.reduce(
199
+ (n, s) => Ie(s) ? n + Ee(s.maxWidth) : n,
200
+ 0
201
+ ), t = l.filter((n) => !Ie(n));
202
+ return { minTableWidth: t.reduce(
203
+ (n, s) => n + $n(
204
+ s,
205
+ y ? Ee(qe) : re
206
+ ),
207
+ 0
208
+ ) + e, fixedTotal: e, flexibleCount: t.length };
209
+ }, [x, l, y]), he = v(
210
+ () => b ? kn(M, b.minTableWidth) : null,
211
+ [M, b]
212
+ ), ge = Fn(
213
+ he,
214
+ M,
215
+ j
216
+ ), B = v(
217
+ () => On(he, M, j),
218
+ [he, M, j]
219
+ ), Ae = v(() => !b || b.flexibleCount === 0 ? null : zn(
220
+ B,
221
+ b.fixedTotal,
222
+ b.flexibleCount
223
+ ), [b, B]), X = (e, t) => {
224
+ const o = Kn(e, t);
225
+ return !x || !e ? o : Ie(e) ? {
226
+ ...o,
227
+ width: e.maxWidth,
228
+ minWidth: e.maxWidth,
229
+ maxWidth: e.maxWidth
230
+ } : Ae == null ? o : {
231
+ ...o,
232
+ width: `${Ae}px`,
233
+ minWidth: e.minWidth ?? (y ? qe : `${re}px`)
234
+ };
235
+ }, xe = v(
236
+ () => new Map(l.map((e) => [e.id, e])),
237
+ [l]
238
+ ), Kt = v(
239
+ () => Nn(l, R),
240
+ [l, R]
241
+ ), S = cn({
242
+ features: Tn,
243
+ data: r,
244
+ columns: Kt,
245
+ getRowId: c,
246
+ enableSorting: Le,
247
+ enableCellSpanning: !0,
248
+ enableRowSelection: U !== "none",
249
+ enableMultiRowSelection: U === "multiple",
250
+ getRowCanExpand: ue && Z ? (e) => ue(e.original) : () => !1,
251
+ state: {
252
+ sorting: Lt,
253
+ columnVisibility: Wt,
254
+ columnOrder: kt,
255
+ rowSelection: zt,
256
+ expanded: Pt
257
+ },
258
+ onSortingChange: Rt,
259
+ onColumnVisibilityChange: Dt,
260
+ onColumnOrderChange: Ot,
261
+ onRowSelectionChange: At,
262
+ onExpandedChange: Vt
263
+ }), Y = U !== "none", $t = !!(ue && Z), Ut = Y ? 1 : 0, Zt = S.getVisibleLeafColumns().length, J = Math.max(
264
+ Zt + Ut,
265
+ 1
266
+ ), Ht = Math.max(S.getHeaderGroups().length, 1), T = S.getRowModel().rows, ye = y && N ? /* @__PURE__ */ i(
267
+ _n,
268
+ {
269
+ value: V,
270
+ minValue: _t,
271
+ maxValue: N.maxZoom,
272
+ step: N.step,
273
+ onChange: We,
274
+ onFitToViewport: Mt,
275
+ isDisabled: Qe
276
+ }
277
+ ) : null, Fe = ae ? ae({ zoomControl: ye, zoomPercent: V }) : ot, Pe = !ae && ye ? /* @__PURE__ */ i("div", { className: "flex justify-end", children: ye }) : null, qt = !!(Fe || Pe || _e), Gt = v(() => {
278
+ const e = y ? {
279
+ zoom: j,
280
+ "--table-zoom-font-size": G ? `${G}px` : void 0
281
+ } : void 0;
282
+ return !x || !b ? y ? { ...e, width: "max-content", minWidth: "100%" } : void 0 : y ? {
283
+ ...e,
284
+ tableLayout: "fixed",
285
+ width: `${B ?? b.minTableWidth}px`
286
+ } : {
287
+ tableLayout: "fixed",
288
+ width: ge ? `${b.minTableWidth}px` : "100%"
289
+ };
290
+ }, [
291
+ B,
292
+ x,
293
+ b,
294
+ ge,
295
+ y,
296
+ j,
297
+ G
298
+ ]), Bt = oe(
299
+ null
300
+ ), [k, Xt] = Ne(null), Yt = !!W, Jt = A(
301
+ (e, t, o) => {
302
+ if (Bt.current = { rowId: e, columnKey: t }, !P) return;
303
+ const n = H;
304
+ n != null && n.anchor.rowId === e && n.anchor.columnKey === t && n.focus.rowId === e && n.focus.columnKey === t || P(
305
+ pn({
306
+ rowId: e,
307
+ columnKey: t,
308
+ sourceIndex: o ?? null
309
+ })
310
+ );
311
+ },
312
+ [P, H]
313
+ ), Qt = A(
314
+ (e) => {
315
+ Xt((t) => t === e || t && e && t.rowId === e.rowId && t.columnKey === e.columnKey ? t : e);
316
+ },
317
+ []
318
+ ), Q = !!Re && Et !== !1, u = xn({
319
+ enabled: Q,
320
+ onReorderRows: Re,
321
+ containerRef: D
322
+ }), en = A(
323
+ (e, t, o) => {
324
+ var n;
325
+ return {
326
+ row: e.original,
327
+ rowId: e.id,
328
+ columnId: t,
329
+ value: o,
330
+ rowIndex: e.index,
331
+ sourceIndex: ne(e.original, e.index),
332
+ isRowDragging: ((n = u.session) == null ? void 0 : n.active) === !0 && u.session.rowId === e.id,
333
+ startRowDrag: Q ? (s) => u.startDrag(
334
+ s,
335
+ e.id,
336
+ ne(e.original, e.index) ?? e.index,
337
+ e.original
338
+ ) : void 0
339
+ };
340
+ },
341
+ // eslint-disable-next-line react-hooks/exhaustive-deps
342
+ [Q, u.startDrag, u.session]
343
+ ), we = T.map((e) => e.id).join("\0"), ve = v(
344
+ () => we ? we.split("\0") : [],
345
+ [we]
346
+ ), Ce = S.getVisibleLeafColumns().map((e) => e.id).join("\0"), Se = v(
347
+ () => Ce ? Ce.split("\0") : [],
348
+ [Ce]
349
+ ), O = typeof P == "function", ee = gn({
350
+ enabled: O,
351
+ selection: H,
352
+ onSelectionChange: P,
353
+ onCopyCells: St,
354
+ onPasteCells: It,
355
+ onClearCells: Nt,
356
+ onActivateCell: W ? (e) => {
357
+ const t = T.find((o) => o.id === e.rowId);
358
+ t && W({
359
+ row: t.original,
360
+ rowId: e.rowId,
361
+ columnId: e.columnKey,
362
+ value: void 0,
363
+ rowIndex: t.index,
364
+ sourceIndex: e.sourceIndex ?? ne(t.original, t.index)
365
+ });
366
+ } : void 0,
367
+ activateOnSingleClick: Tt,
368
+ containerRef: D,
369
+ rowIds: ve,
370
+ columnKeys: Se
371
+ }), tn = v(() => {
372
+ if (!(F != null && F.length)) return T.map((n) => ({ kind: "row", row: n }));
373
+ const e = new Map(T.map((n) => [n.id, n])), t = /* @__PURE__ */ new Set(), o = [];
374
+ for (const n of F) {
375
+ const s = n.rowIds.map((h) => e.get(h)).filter((h) => h !== void 0);
376
+ s.length !== 0 && (o.push({
377
+ kind: "group",
378
+ group: { id: n.id, label: n.label, rowCount: s.length }
379
+ }), s.forEach((h) => t.add(h.id)), !be.has(n.id) && s.forEach((h) => o.push({ kind: "row", row: h })));
380
+ }
381
+ for (const n of T)
382
+ t.has(n.id) || o.push({ kind: "row", row: n });
383
+ return o;
384
+ }, [F, T, be]), nn = (e) => {
385
+ const t = be.has(e.id), o = () => jt(e.id);
386
+ return /* @__PURE__ */ i("tr", { className: "bg-secondary_subtle", children: /* @__PURE__ */ i(
387
+ "td",
388
+ {
389
+ colSpan: J,
390
+ className: d(
391
+ !de && "py-1.5",
392
+ g && "border-r border-secondary last:border-r-0"
393
+ ),
394
+ children: de ? de({
395
+ id: e.id,
396
+ label: e.label,
397
+ rowCount: e.rowCount,
398
+ isCollapsed: t,
399
+ toggle: o
400
+ }) : /* @__PURE__ */ m(
401
+ "button",
402
+ {
403
+ type: "button",
404
+ className: "flex w-full items-center gap-2 px-2 text-left text-xs font-medium text-secondary",
405
+ onClick: o,
406
+ "aria-expanded": !t,
407
+ children: [
408
+ /* @__PURE__ */ i(
409
+ $e,
410
+ {
411
+ className: d(
412
+ "size-4 shrink-0 text-fg-quaternary transition-transform",
413
+ !t && "rotate-90"
414
+ )
415
+ }
416
+ ),
417
+ /* @__PURE__ */ i("span", { className: "truncate", children: e.label || "(Empty)" }),
418
+ /* @__PURE__ */ m("span", { className: "text-tertiary", children: [
419
+ "(",
420
+ e.rowCount,
421
+ ")"
422
+ ] })
423
+ ]
424
+ }
425
+ )
426
+ }
427
+ ) }, `group-${e.id}`);
428
+ }, Ve = /* @__PURE__ */ m(
429
+ "div",
430
+ {
431
+ ref: (e) => {
432
+ D.current = e, typeof q == "function" ? q(e) : q && (q.current = e);
433
+ },
434
+ onPointerDownCapture: O ? ee.onPointerDownCapture : void 0,
435
+ onKeyDownCapture: O ? ee.onKeyDownCapture : void 0,
436
+ onClickCapture: O ? ee.onClickCapture : void 0,
437
+ onDoubleClickCapture: O ? ee.onDoubleClickCapture : void 0,
438
+ className: d(
439
+ "w-full rounded-lg bg-primary",
440
+ y || !x || ge ? "overflow-x-auto" : "overflow-x-hidden",
441
+ g && "rounded-xl border border-secondary",
442
+ et
443
+ ),
444
+ children: [
445
+ /* @__PURE__ */ m(
446
+ "table",
447
+ {
448
+ "aria-label": L,
449
+ "data-table-zoom-typography": G !== void 0 ? "" : void 0,
450
+ className: d(
451
+ "w-full border-separate border-spacing-0 overflow-x-hidden",
452
+ tt
453
+ ),
454
+ style: Gt,
455
+ children: [
456
+ /* @__PURE__ */ i(
457
+ "thead",
458
+ {
459
+ className: d(
460
+ "sticky top-0 z-30 rounded-t-lg bg-secondary_subtle [&>tr>th]:h-9 [&>tr>th:first-child]:rounded-tl-lg [&>tr>th:last-child]:rounded-tr-lg",
461
+ g && "[&>tr>th]:border-b [&>tr>th]:border-secondary [&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none",
462
+ nt
463
+ ),
464
+ children: S.getHeaderGroups().map((e, t) => /* @__PURE__ */ m("tr", { children: [
465
+ Y && t === 0 ? /* @__PURE__ */ i(
466
+ "th",
467
+ {
468
+ rowSpan: Ht,
469
+ className: d(
470
+ "relative w-10 min-w-10 p-0 align-middle",
471
+ g && "border-r border-secondary"
472
+ ),
473
+ children: U === "multiple" ? /* @__PURE__ */ i(
474
+ "div",
475
+ {
476
+ className: "flex items-center justify-center",
477
+ onClick: (o) => o.stopPropagation(),
478
+ children: /* @__PURE__ */ i(
479
+ Ue,
480
+ {
481
+ checked: S.getIsAllRowsSelected() ? !0 : S.getIsSomeRowsSelected() ? "indeterminate" : !1,
482
+ onCheckedChange: (o) => S.toggleAllRowsSelected(o === !0),
483
+ "aria-label": "Select all rows",
484
+ className: "items-center justify-center"
485
+ }
486
+ )
487
+ }
488
+ ) : null
489
+ }
490
+ ) : null,
491
+ e.headers.map((o) => {
492
+ if (o.rowSpan === 0) return null;
493
+ const n = xe.get(o.column.id), s = o.column.getIsSorted(), h = Le && !o.isPlaceholder && o.column.getCanSort(), a = n != null && n.renderHeader ? n.renderHeader({
494
+ columnId: n.id,
495
+ label: n.header
496
+ }) : o.isPlaceholder ? null : S.FlexRender({ header: o });
497
+ return /* @__PURE__ */ i(
498
+ "th",
499
+ {
500
+ colSpan: o.colSpan,
501
+ rowSpan: o.rowSpan,
502
+ scope: o.colSpan > 1 ? "colgroup" : "col",
503
+ "aria-sort": s === "asc" ? "ascending" : s === "desc" ? "descending" : void 0,
504
+ style: X(n, !0),
505
+ className: d(
506
+ "relative overflow-hidden p-0 outline-hidden focus-within:z-1 focus-within:ring-2 focus-within:ring-focus-ring focus-within:ring-inset",
507
+ En[f],
508
+ g && "border-r border-secondary last:border-r-0",
509
+ n == null ? void 0 : n.headerClassName
510
+ ),
511
+ children: h ? /* @__PURE__ */ m(
512
+ "button",
513
+ {
514
+ type: "button",
515
+ className: d(
516
+ "flex w-full items-center gap-1 overflow-hidden rounded outline-none",
517
+ Ge(n == null ? void 0 : n.align)
518
+ ),
519
+ onClick: o.column.getToggleSortingHandler(),
520
+ "aria-label": `Sort by ${String((n == null ? void 0 : n.header) ?? o.column.id)}`,
521
+ children: [
522
+ /* @__PURE__ */ i("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap text-xs font-medium text-secondary", children: a }),
523
+ s ? /* @__PURE__ */ i(
524
+ un,
525
+ {
526
+ className: d(
527
+ "size-3 shrink-0 stroke-[3px] text-fg-quaternary",
528
+ s === "asc" && "rotate-180"
529
+ )
530
+ }
531
+ ) : /* @__PURE__ */ i(
532
+ mn,
533
+ {
534
+ size: 12,
535
+ strokeWidth: 3,
536
+ className: "shrink-0 text-fg-quaternary"
537
+ }
538
+ )
539
+ ]
540
+ }
541
+ ) : /* @__PURE__ */ i(
542
+ "div",
543
+ {
544
+ className: d(
545
+ "flex items-center gap-1 overflow-hidden",
546
+ Ge(n == null ? void 0 : n.align)
547
+ ),
548
+ children: /* @__PURE__ */ i("div", { className: "flex items-center overflow-hidden text-ellipsis whitespace-nowrap text-xs font-medium text-secondary", children: a })
549
+ }
550
+ )
551
+ },
552
+ o.id
553
+ );
554
+ })
555
+ ] }, e.id))
556
+ }
557
+ ),
558
+ /* @__PURE__ */ m("tbody", { children: [
559
+ C ? Array.from({ length: p }, (e, t) => /* @__PURE__ */ m(
560
+ "tr",
561
+ {
562
+ className: Ze[f],
563
+ "aria-hidden": "true",
564
+ children: [
565
+ Y ? /* @__PURE__ */ i(
566
+ "td",
567
+ {
568
+ className: d(
569
+ "w-10 min-w-10",
570
+ g && "border-r border-secondary",
571
+ !I && "border-b border-tertiary"
572
+ )
573
+ }
574
+ ) : null,
575
+ S.getVisibleLeafColumns().map((o) => {
576
+ const n = xe.get(o.id);
577
+ return /* @__PURE__ */ i(
578
+ "td",
579
+ {
580
+ style: X(n, !1),
581
+ className: d(
582
+ "relative overflow-hidden text-secondary",
583
+ He[f],
584
+ g && "border-r border-secondary last:border-r-0",
585
+ !I && "border-b border-tertiary",
586
+ n == null ? void 0 : n.cellClassName
587
+ ),
588
+ children: /* @__PURE__ */ i(
589
+ fn,
590
+ {
591
+ height: "14px",
592
+ width: "75%",
593
+ className: "rounded"
594
+ }
595
+ )
596
+ },
597
+ o.id
598
+ );
599
+ })
600
+ ]
601
+ },
602
+ `loading-${t}`
603
+ )) : T.length === 0 ? /* @__PURE__ */ i("tr", { children: /* @__PURE__ */ i(
604
+ "td",
605
+ {
606
+ colSpan: J,
607
+ className: "border-b border-secondary px-3 py-3 text-left text-xs text-placeholder_subtle",
608
+ children: ie
609
+ }
610
+ ) }) : tn.map((e) => {
611
+ var h;
612
+ if (e.kind === "group")
613
+ return nn(e.group);
614
+ const t = e.row, o = $t && t.getCanExpand(), n = o && t.getIsExpanded(), s = t.getVisibleCells();
615
+ return /* @__PURE__ */ m(dn, { children: [
616
+ /* @__PURE__ */ m(
617
+ "tr",
618
+ {
619
+ ...Q ? {
620
+ [Cn]: t.id,
621
+ [vn]: String(
622
+ ne(t.original, t.index) ?? t.index
623
+ )
624
+ } : {},
625
+ style: (h = u.session) != null && h.active && u.session.rowId === t.id ? wn : void 0,
626
+ className: d(
627
+ // `focus-visible`, not `focus-within`: the ring marks the row itself being keyboard-focused.
628
+ // `focus-within` also fires for anything inside it, so an open cell
629
+ // editor outlined the entire row.
630
+ "relative outline-focus-ring transition-colors hover:bg-secondary_subtle focus-visible:outline-2 focus-visible:-outline-offset-2",
631
+ Ze[f],
632
+ t.getIsSelected() && "bg-secondary",
633
+ le && "cursor-pointer",
634
+ se == null ? void 0 : se(t.original)
635
+ ),
636
+ onClick: (a) => {
637
+ !le || Be(a.target) || le(t.original);
638
+ },
639
+ onMouseEnter: $ ? () => $(t.original, !0) : void 0,
640
+ onMouseLeave: $ ? () => $(t.original, !1) : void 0,
641
+ children: [
642
+ Y ? /* @__PURE__ */ i(
643
+ "td",
644
+ {
645
+ className: d(
646
+ "relative w-10 min-w-10 p-0 text-center",
647
+ g && "border-r border-secondary",
648
+ // Matches the data cells, so the row separator
649
+ // runs the full width of the table.
650
+ !I && !n && "border-b border-tertiary"
651
+ ),
652
+ children: /* @__PURE__ */ i(
653
+ "div",
654
+ {
655
+ className: "flex items-center justify-center",
656
+ onClick: (a) => a.stopPropagation(),
657
+ onKeyDown: (a) => a.stopPropagation(),
658
+ children: /* @__PURE__ */ i(
659
+ Ue,
660
+ {
661
+ checked: t.getIsSelected(),
662
+ onCheckedChange: (a) => t.toggleSelected(a === !0),
663
+ "aria-label": `Select row ${t.id}`,
664
+ className: "items-center justify-center"
665
+ }
666
+ )
667
+ }
668
+ )
669
+ }
670
+ ) : null,
671
+ s.map((a, Ke) => {
672
+ if (a.getIsCovered()) return null;
673
+ const w = xe.get(a.column.id);
674
+ if (!w) return null;
675
+ const K = en(
676
+ t,
677
+ w.id,
678
+ a.getValue()
679
+ ), on = w.renderCell ? w.renderCell(K) : String(a.getValue() ?? ""), E = O ? bn(
680
+ H,
681
+ t.id,
682
+ w.id,
683
+ ve,
684
+ Se
685
+ ) : null, te = !!(E != null && E.inRange), rn = (k == null ? void 0 : k.rowId) === t.id && (k == null ? void 0 : k.columnKey) === w.id;
686
+ return /* @__PURE__ */ i(
687
+ "td",
688
+ {
689
+ colSpan: a.getColSpan(),
690
+ rowSpan: a.getRowSpan(),
691
+ style: te && E ? {
692
+ ...X(w, !1),
693
+ boxShadow: hn(
694
+ E.edges
695
+ )
696
+ } : X(w, !1),
697
+ "data-table-component-cell": "",
698
+ "data-grid-cell": "",
699
+ "data-grid-row-id": t.id,
700
+ "data-grid-col-key": w.id,
701
+ "data-grid-source-index": K.sourceIndex ?? void 0,
702
+ tabIndex: W ? 0 : void 0,
703
+ className: d(
704
+ // `overflow-hidden`, never `overflow-x-hidden`: when `overflow-x` is not
705
+ // `visible` the browser computes `overflow-y` to `auto`, turning
706
+ // every cell into its own scroll container that swallows the
707
+ // wheel before the table can scroll.
708
+ "relative text-secondary outline-focus-ring focus-visible:z-1 focus-visible:outline-2 focus-visible:-outline-offset-2",
709
+ // The cell holding an open editor must not clip it: a wrapped
710
+ // multi-line value has to be visible, and the row only grows
711
+ // around content the cell is allowed to show.
712
+ rn ? "z-1 overflow-visible" : "overflow-hidden",
713
+ He[f],
714
+ Mn(w.align),
715
+ g && "border-r border-secondary last:border-r-0",
716
+ !I && !n && !te && "border-b border-tertiary",
717
+ te && "z-1 outline-hidden",
718
+ te && !(E != null && E.isAnchor) && "bg-utility-brand-25",
719
+ w.cellClassName
720
+ ),
721
+ onClick: (_) => {
722
+ me == null || me(K), Ke === 0 && o && Be(_.target) && _.stopPropagation();
723
+ },
724
+ onDoubleClick: () => fe == null ? void 0 : fe(K),
725
+ onKeyDown: (_) => {
726
+ _.key !== "Enter" || !W || (_.preventDefault(), W(K));
727
+ },
728
+ children: /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
729
+ Ke === 0 && o ? /* @__PURE__ */ i(
730
+ "button",
731
+ {
732
+ type: "button",
733
+ className: d(
734
+ "-ml-1 flex shrink-0 cursor-pointer items-center justify-center rounded p-1 transition-transform duration-200 ease-in-out hover:bg-secondary_subtle",
735
+ n && "rotate-90"
736
+ ),
737
+ "aria-label": n ? "Collapse row" : "Expand row",
738
+ "aria-expanded": n,
739
+ "aria-controls": `${t.id}-detail`,
740
+ onClick: (_) => {
741
+ _.stopPropagation(), t.toggleExpanded();
742
+ },
743
+ children: /* @__PURE__ */ i($e, { className: "size-4 text-fg-quaternary" })
744
+ }
745
+ ) : null,
746
+ /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: on })
747
+ ] })
748
+ },
749
+ a.id
750
+ );
751
+ })
752
+ ]
753
+ }
754
+ ),
755
+ n && Z ? /* @__PURE__ */ i(
756
+ "tr",
757
+ {
758
+ id: `${t.id}-detail`,
759
+ className: "relative bg-secondary_subtle",
760
+ children: /* @__PURE__ */ i("td", { colSpan: J, className: "p-0", children: Z({
761
+ row: t.original,
762
+ rowId: t.id,
763
+ colSpan: J,
764
+ collapse: () => t.toggleExpanded(!1)
765
+ }) })
766
+ }
767
+ ) : null
768
+ ] }, t.id);
769
+ }),
770
+ !C && rt
771
+ ] })
772
+ ]
773
+ }
774
+ ),
775
+ ((Me = u.session) == null ? void 0 : Me.active) && /* @__PURE__ */ m(sn, { children: [
776
+ /* @__PURE__ */ i(Sn, { session: u.session }),
777
+ u.session.dropLineY !== null && /* @__PURE__ */ i(
778
+ In,
779
+ {
780
+ y: u.session.dropLineY,
781
+ left: u.session.dropLineLeft,
782
+ width: u.session.dropLineWidth
783
+ }
784
+ )
785
+ ] })
786
+ ]
787
+ }
788
+ ), je = qt ? /* @__PURE__ */ m("div", { className: d("flex flex-col gap-3", Te), children: [
789
+ Fe,
790
+ Pe,
791
+ Ve,
792
+ _e
793
+ ] }) : /* @__PURE__ */ i("div", { className: Te, children: Ve });
794
+ return Yt ? /* @__PURE__ */ i(
795
+ yn,
796
+ {
797
+ rowIds: ve,
798
+ columnKeys: Se,
799
+ containerRef: D,
800
+ onSelectCell: Jt,
801
+ onEditingCellChange: Qt,
802
+ children: je
803
+ }
804
+ ) : je;
805
+ }
806
+ const uo = ln(Un);
807
+ export {
808
+ uo as TableComponent,
809
+ uo as default
810
+ };