@servicetitan/anvil2 3.0.1 → 3.0.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 (263) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +8 -6
  3. package/dist/{AiMark-B1-M3ZgP.js → AiMark-DiMotaq3.js} +3 -3
  4. package/dist/{AiMark-B1-M3ZgP.js.map → AiMark-DiMotaq3.js.map} +1 -1
  5. package/dist/AiMark.js +1 -1
  6. package/dist/{Alert-C04WIw7A.js → Alert-DhhVURcl.js} +2 -2
  7. package/dist/{Alert-C04WIw7A.js.map → Alert-DhhVURcl.js.map} +1 -1
  8. package/dist/Alert.js +1 -1
  9. package/dist/{Breadcrumbs-CAJMeA1D.js → Breadcrumbs-vvKOtFwN.js} +2 -2
  10. package/dist/{Breadcrumbs-CAJMeA1D.js.map → Breadcrumbs-vvKOtFwN.js.map} +1 -1
  11. package/dist/Breadcrumbs.js +1 -1
  12. package/dist/{Calendar-BAbAagIx.js → Calendar-BLvBN8Ou.js} +2 -2
  13. package/dist/{Calendar-BAbAagIx.js.map → Calendar-BLvBN8Ou.js.map} +1 -1
  14. package/dist/{Calendar-CaCMa_jq.js → Calendar-Dtn07sfJ.js} +2 -2
  15. package/dist/{Calendar-CaCMa_jq.js.map → Calendar-Dtn07sfJ.js.map} +1 -1
  16. package/dist/Calendar.js +2 -2
  17. package/dist/{Checkbox-BSAS8-DM.js → Checkbox-BngBrjEV.js} +3 -3
  18. package/dist/{Checkbox-BSAS8-DM.js.map → Checkbox-BngBrjEV.js.map} +1 -1
  19. package/dist/{Checkbox-Ckl8EFpF.js → Checkbox-lSwl_u26.js} +2 -2
  20. package/dist/{Checkbox-Ckl8EFpF.js.map → Checkbox-lSwl_u26.js.map} +1 -1
  21. package/dist/Checkbox.js +1 -1
  22. package/dist/{Chip-Da8c7tKP.js → Chip-DBn3KRak.js} +2 -2
  23. package/dist/{Chip-Da8c7tKP.js.map → Chip-DBn3KRak.js.map} +1 -1
  24. package/dist/Chip.js +1 -1
  25. package/dist/{Combobox-CBLaT1lU.js → Combobox-BqhvHG9H.js} +4 -4
  26. package/dist/{Combobox-CBLaT1lU.js.map → Combobox-BqhvHG9H.js.map} +1 -1
  27. package/dist/Combobox.js +1 -1
  28. package/dist/{DataTable-BDXdCF7J.js → DataTable-CB-exG-7.js} +1172 -141
  29. package/dist/DataTable-CB-exG-7.js.map +1 -0
  30. package/dist/DataTable.css +259 -103
  31. package/dist/{DateFieldRange-DPTC3EZz.js → DateFieldRange-Ci-OHK6g.js} +4 -4
  32. package/dist/{DateFieldRange-DPTC3EZz.js.map → DateFieldRange-Ci-OHK6g.js.map} +1 -1
  33. package/dist/DateFieldRange.js +1 -1
  34. package/dist/{DateFieldSingle-w1G-zd9G.js → DateFieldSingle-JOEy4kSL.js} +4 -4
  35. package/dist/{DateFieldSingle-w1G-zd9G.js.map → DateFieldSingle-JOEy4kSL.js.map} +1 -1
  36. package/dist/DateFieldSingle.js +1 -1
  37. package/dist/{DateFieldYearless-DHNVc7Sd.js → DateFieldYearless-CIqPup6O.js} +4 -4
  38. package/dist/{DateFieldYearless-DHNVc7Sd.js.map → DateFieldYearless-CIqPup6O.js.map} +1 -1
  39. package/dist/DateFieldYearless.js +1 -1
  40. package/dist/{DateFieldYearlessRange-C5ktVUgG.js → DateFieldYearlessRange-Cf11uZhk.js} +3 -3
  41. package/dist/{DateFieldYearlessRange-C5ktVUgG.js.map → DateFieldYearlessRange-Cf11uZhk.js.map} +1 -1
  42. package/dist/DateFieldYearlessRange.js +1 -1
  43. package/dist/{DaysOfTheWeek-BubWkBZ0.js → DaysOfTheWeek-R2-y7cqh.js} +3 -3
  44. package/dist/{DaysOfTheWeek-BubWkBZ0.js.map → DaysOfTheWeek-R2-y7cqh.js.map} +1 -1
  45. package/dist/DaysOfTheWeek.js +1 -1
  46. package/dist/{Dialog-ByTyuybu.js → Dialog-C3yST7Ly.js} +4 -4
  47. package/dist/{Dialog-ByTyuybu.js.map → Dialog-C3yST7Ly.js.map} +1 -1
  48. package/dist/Dialog.js +1 -1
  49. package/dist/Dnd.js +2 -1
  50. package/dist/Dnd.js.map +1 -1
  51. package/dist/DndHandleButton-Dgt9G-dF.js +43 -0
  52. package/dist/DndHandleButton-Dgt9G-dF.js.map +1 -0
  53. package/dist/DndHandleButton.css +22 -0
  54. package/dist/DndSort.js +2 -1
  55. package/dist/DndSort.js.map +1 -1
  56. package/dist/{Drawer-CwyfBcwt.js → Drawer-CouIrQ8u.js} +4 -4
  57. package/dist/{Drawer-CwyfBcwt.js.map → Drawer-CouIrQ8u.js.map} +1 -1
  58. package/dist/Drawer.js +1 -1
  59. package/dist/DrillDown.js +1 -1
  60. package/dist/{EditCard-DqLSnkih.js → EditCard-DFBjxF9l.js} +2 -2
  61. package/dist/{EditCard-DqLSnkih.js.map → EditCard-DFBjxF9l.js.map} +1 -1
  62. package/dist/EditCard.js +1 -1
  63. package/dist/{FieldLabel-DZWu5dMp.js → FieldLabel-rHPbiyR3.js} +3 -3
  64. package/dist/{FieldLabel-DZWu5dMp.js.map → FieldLabel-rHPbiyR3.js.map} +1 -1
  65. package/dist/FieldLabel.js +1 -1
  66. package/dist/{FilterBar-BU8StPPd.js → FilterBar-kVue-bVK.js} +13 -13
  67. package/dist/{FilterBar-BU8StPPd.js.map → FilterBar-kVue-bVK.js.map} +1 -1
  68. package/dist/FilterBar.js +1 -1
  69. package/dist/{InputMask-EwEJlW-t.js → InputMask-DxbFpzo7.js} +3 -3
  70. package/dist/{InputMask-EwEJlW-t.js.map → InputMask-DxbFpzo7.js.map} +1 -1
  71. package/dist/InputMask.js +1 -1
  72. package/dist/InteractiveCard-KGs2b_al.js +119 -0
  73. package/dist/InteractiveCard-KGs2b_al.js.map +1 -0
  74. package/dist/InteractiveCard.css +21 -28
  75. package/dist/InteractiveCard.js +1 -1
  76. package/dist/{ListView-DBO9Bl1H.js → ListView-CYkuvkAy.js} +2 -2
  77. package/dist/{ListView-DBO9Bl1H.js.map → ListView-CYkuvkAy.js.map} +1 -1
  78. package/dist/ListView.js +1 -1
  79. package/dist/{Listbox-C0tjQFDF.js → Listbox-BBrsMfO3.js} +2 -2
  80. package/dist/{Listbox-C0tjQFDF.js.map → Listbox-BBrsMfO3.js.map} +1 -1
  81. package/dist/Listbox.js +1 -1
  82. package/dist/MultiSelectField.js +1 -1
  83. package/dist/{MultiSelectFieldSync-ueey5UBM.js → MultiSelectFieldSync-BWZQ4MFC.js} +5 -5
  84. package/dist/{MultiSelectFieldSync-ueey5UBM.js.map → MultiSelectFieldSync-BWZQ4MFC.js.map} +1 -1
  85. package/dist/MultiSelectMenu.js +1 -1
  86. package/dist/{MultiSelectMenuSync-D7hqugcQ.js → MultiSelectMenuSync-Bl4ty0je.js} +3 -3
  87. package/dist/{MultiSelectMenuSync-D7hqugcQ.js.map → MultiSelectMenuSync-Bl4ty0je.js.map} +1 -1
  88. package/dist/{NumberField-DJbdyatF.js → NumberField-DMHJ2Cyi.js} +4 -5
  89. package/dist/NumberField-DMHJ2Cyi.js.map +1 -0
  90. package/dist/NumberField.js +1 -1
  91. package/dist/Overflow.js +1 -1
  92. package/dist/{Page-DbK-JKyB.js → Page-Blw4TE5J.js} +9 -9
  93. package/dist/{Page-DbK-JKyB.js.map → Page-Blw4TE5J.js.map} +1 -1
  94. package/dist/Page.js +1 -1
  95. package/dist/{Pagination-Bg5Nsdik.js → Pagination-DYNH3WeU.js} +2 -2
  96. package/dist/{Pagination-Bg5Nsdik.js.map → Pagination-DYNH3WeU.js.map} +1 -1
  97. package/dist/Pagination.js +1 -1
  98. package/dist/{Popover-CyB7yzSf.js → Popover-C_XdNvAZ.js} +2 -2
  99. package/dist/{Popover-CyB7yzSf.js.map → Popover-C_XdNvAZ.js.map} +1 -1
  100. package/dist/Popover.js +1 -1
  101. package/dist/{ProgressBar-DSrjgLTx.js → ProgressBar-BwHaAD25.js} +2 -2
  102. package/dist/{ProgressBar-DSrjgLTx.js.map → ProgressBar-BwHaAD25.js.map} +1 -1
  103. package/dist/ProgressBar.js +1 -1
  104. package/dist/{Radio-CQaXJ72d.js → Radio-DJ6KgfcS.js} +2 -2
  105. package/dist/{Radio-CQaXJ72d.js.map → Radio-DJ6KgfcS.js.map} +1 -1
  106. package/dist/{Radio-DO4UhbBE.js → Radio-IksHWkBl.js} +3 -3
  107. package/dist/{Radio-DO4UhbBE.js.map → Radio-IksHWkBl.js.map} +1 -1
  108. package/dist/Radio.js +1 -1
  109. package/dist/RichTextEditor-C_Boj8QP.js +30852 -0
  110. package/dist/RichTextEditor-C_Boj8QP.js.map +1 -0
  111. package/dist/RichTextEditor.css +178 -0
  112. package/dist/RichTextEditor.d.ts +2 -0
  113. package/dist/RichTextEditor.js +2 -0
  114. package/dist/RichTextEditor.js.map +1 -0
  115. package/dist/{SelectCard-CtXwY8FZ.js → SelectCard-E-13CjHS.js} +3 -3
  116. package/dist/{SelectCard-CtXwY8FZ.js.map → SelectCard-E-13CjHS.js.map} +1 -1
  117. package/dist/SelectCard.js +1 -1
  118. package/dist/SelectField.js +1 -1
  119. package/dist/{SelectFieldLabel-DLT5dKbx.js → SelectFieldLabel-C-MrQm-n.js} +2 -2
  120. package/dist/{SelectFieldLabel-DLT5dKbx.js.map → SelectFieldLabel-C-MrQm-n.js.map} +1 -1
  121. package/dist/{SelectFieldSync-W_-jTf7z.js → SelectFieldSync-BbJFd_bV.js} +4 -4
  122. package/dist/{SelectFieldSync-W_-jTf7z.js.map → SelectFieldSync-BbJFd_bV.js.map} +1 -1
  123. package/dist/SelectMenu.js +1 -1
  124. package/dist/{SelectMenuSync-QcjbQtCO.js → SelectMenuSync-CBMdmGTU.js} +3 -3
  125. package/dist/{SelectMenuSync-QcjbQtCO.js.map → SelectMenuSync-CBMdmGTU.js.map} +1 -1
  126. package/dist/{SelectOptions-BsX0f22q.js → SelectOptions-BT9OCfPh.js} +2 -2
  127. package/dist/{SelectOptions-BsX0f22q.js.map → SelectOptions-BT9OCfPh.js.map} +1 -1
  128. package/dist/{SelectTrigger-BaDvF9JD.js → SelectTrigger-DtyxYDzP.js} +2 -2
  129. package/dist/{SelectTrigger-BaDvF9JD.js.map → SelectTrigger-DtyxYDzP.js.map} +1 -1
  130. package/dist/SelectTrigger.js +1 -1
  131. package/dist/{SelectTriggerBase-kMRqbXwu.js → SelectTriggerBase-Xwq929Wr.js} +3 -3
  132. package/dist/{SelectTriggerBase-kMRqbXwu.js.map → SelectTriggerBase-Xwq929Wr.js.map} +1 -1
  133. package/dist/{Switch-DeBu4Ucg.js → Switch-CElshQ9N.js} +2 -2
  134. package/dist/{Switch-DeBu4Ucg.js.map → Switch-CElshQ9N.js.map} +1 -1
  135. package/dist/Switch.js +1 -1
  136. package/dist/Table.js +1 -1
  137. package/dist/{Text-BH8gglCL.js → Text-C0F8AkvH.js} +2 -2
  138. package/dist/{Text-BH8gglCL.js.map → Text-C0F8AkvH.js.map} +1 -1
  139. package/dist/Text.js +1 -1
  140. package/dist/{TextField-CRDTnuUN.js → TextField-CLZEj0aI.js} +3 -3
  141. package/dist/{TextField-CRDTnuUN.js.map → TextField-CLZEj0aI.js.map} +1 -1
  142. package/dist/{TextField-YlMkDHp-.js → TextField-yL52fx5R.js} +2 -2
  143. package/dist/{TextField-YlMkDHp-.js.map → TextField-yL52fx5R.js.map} +1 -1
  144. package/dist/TextField.js +1 -1
  145. package/dist/{Textarea-CxXmr_Gx.js → Textarea-CGgyvnM8.js} +3 -3
  146. package/dist/{Textarea-CxXmr_Gx.js.map → Textarea-CGgyvnM8.js.map} +1 -1
  147. package/dist/Textarea.js +1 -1
  148. package/dist/{TimeField-Cz4tMYb3.js → TimeField-BEvxjjFp.js} +4 -4
  149. package/dist/{TimeField-Cz4tMYb3.js.map → TimeField-BEvxjjFp.js.map} +1 -1
  150. package/dist/TimeField.js +1 -1
  151. package/dist/Toast.js +2 -2
  152. package/dist/{Toaster-BV8RjmIN.js → Toaster-DllJAOK8.js} +3 -3
  153. package/dist/{Toaster-BV8RjmIN.js.map → Toaster-DllJAOK8.js.map} +1 -1
  154. package/dist/{Toaster-DYGDohJT.js → Toaster-DuadB8pq.js} +2 -2
  155. package/dist/{Toaster-DYGDohJT.js.map → Toaster-DuadB8pq.js.map} +1 -1
  156. package/dist/{Toolbar-Dzj2KMEy.js → Toolbar-J5cakHba.js} +5 -5
  157. package/dist/{Toolbar-Dzj2KMEy.js.map → Toolbar-J5cakHba.js.map} +1 -1
  158. package/dist/Toolbar-QYRQv45Y.js +780 -0
  159. package/dist/Toolbar-QYRQv45Y.js.map +1 -0
  160. package/dist/Toolbar.js +2 -2
  161. package/dist/{ToolbarButtonToggle--2Ka05N8.js → ToolbarButtonToggle-Ch0SH4oH.js} +5 -4
  162. package/dist/ToolbarButtonToggle-Ch0SH4oH.js.map +1 -0
  163. package/dist/{Tooltip-BlStOXN3.js → Tooltip-lBmgi5ZB.js} +7 -6
  164. package/dist/Tooltip-lBmgi5ZB.js.map +1 -0
  165. package/dist/Tooltip.css +7 -6
  166. package/dist/Tooltip.js +1 -1
  167. package/dist/{YearlessDateInputWithPicker-DyytWt0x.js → YearlessDateInputWithPicker-DryLX8sA.js} +2 -2
  168. package/dist/{YearlessDateInputWithPicker-DyytWt0x.js.map → YearlessDateInputWithPicker-DryLX8sA.js.map} +1 -1
  169. package/dist/add-BcQkAUip.js +6 -0
  170. package/dist/add-BcQkAUip.js.map +1 -0
  171. package/dist/assets/css-utils/a2-border.css +23 -53
  172. package/dist/assets/css-utils/a2-color.css +221 -449
  173. package/dist/assets/css-utils/a2-font.css +21 -47
  174. package/dist/assets/css-utils/a2-spacing.css +238 -481
  175. package/dist/assets/css-utils/a2-utils.css +497 -1002
  176. package/dist/assets/css-utils/border.css +23 -53
  177. package/dist/assets/css-utils/color.css +221 -449
  178. package/dist/assets/css-utils/font.css +21 -47
  179. package/dist/assets/css-utils/spacing.css +238 -481
  180. package/dist/assets/css-utils/utils.css +497 -1002
  181. package/dist/beta/components/InteractiveCard/InteractiveCard.d.ts +3 -1
  182. package/dist/beta/components/RichTextEditor/RichTextEditor.d.ts +27 -0
  183. package/dist/beta/components/RichTextEditor/index.d.ts +2 -0
  184. package/dist/beta/components/RichTextEditor/internal/LinkPopover.d.ts +14 -0
  185. package/dist/beta/components/RichTextEditor/internal/MentionList.d.ts +14 -0
  186. package/dist/beta/components/RichTextEditor/internal/MentionNodeView.d.ts +11 -0
  187. package/dist/beta/components/RichTextEditor/internal/MentionPopover.d.ts +16 -0
  188. package/dist/beta/components/RichTextEditor/internal/RichTextEditorContext.d.ts +57 -0
  189. package/dist/beta/components/RichTextEditor/internal/RichTextEditorDragHandle.d.ts +6 -0
  190. package/dist/beta/components/RichTextEditor/internal/RichTextEditorMockData.d.ts +8 -0
  191. package/dist/beta/components/RichTextEditor/internal/RichTextEditorProvider.d.ts +8 -0
  192. package/dist/beta/components/RichTextEditor/internal/RichTextEditorToolbar.d.ts +1 -0
  193. package/dist/beta/components/RichTextEditor/internal/YouTubeEmbedPrompt.d.ts +11 -0
  194. package/dist/beta/components/RichTextEditor/internal/YouTubePopover.d.ts +11 -0
  195. package/dist/beta/components/RichTextEditor/internal/extensions/ImageUploadExtension.d.ts +3 -0
  196. package/dist/beta/components/RichTextEditor/internal/extensions/LinkKeyboardShortcutExtension.d.ts +8 -0
  197. package/dist/beta/components/RichTextEditor/internal/extensions/MentionExtension.d.ts +18 -0
  198. package/dist/beta/components/RichTextEditor/internal/extensions/YoutubeExtension.d.ts +8 -0
  199. package/dist/beta/components/RichTextEditor/internal/useRichTextEditor.d.ts +32 -0
  200. package/dist/beta/components/RichTextEditor/types.d.ts +103 -0
  201. package/dist/beta/components/Table/DataTable/DataTable.d.ts +40 -1
  202. package/dist/beta/components/Table/DataTable/internal/DataTableBody.d.ts +22 -0
  203. package/dist/beta/components/Table/DataTable/internal/DataTableBodyRow.d.ts +18 -1
  204. package/dist/beta/components/Table/DataTable/internal/cells/CellFocusContext.d.ts +16 -0
  205. package/dist/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableCustomCell.d.ts +8 -0
  206. package/dist/beta/components/Table/DataTable/internal/editable-cells/useCustomEditHelpers.d.ts +49 -0
  207. package/dist/beta/components/Table/DataTable/internal/useDataTableVirtualizer.d.ts +9 -5
  208. package/dist/beta/components/Table/DataTable/internal/util/cellTypeHelpers.d.ts +3 -0
  209. package/dist/beta/components/Table/DataTable/internal/util/getTanStackColumnDef.d.ts +13 -1
  210. package/dist/beta/components/Table/createColumnHelper.d.ts +48 -22
  211. package/dist/beta/components/Table/internal/getCommonPinningClasses.d.ts +1 -1
  212. package/dist/beta/components/Table/types.d.ts +311 -7
  213. package/dist/beta/components/index.d.ts +1 -0
  214. package/dist/beta.js +13 -12
  215. package/dist/beta.js.map +1 -1
  216. package/dist/components/Toolbar/internal/utils/accessibility.d.ts +5 -0
  217. package/dist/getKeyboardFocusableElements-B_U9rt6y.js +11 -0
  218. package/dist/getKeyboardFocusableElements-B_U9rt6y.js.map +1 -0
  219. package/dist/index-DUzqzmOX.js +17044 -0
  220. package/dist/index-DUzqzmOX.js.map +1 -0
  221. package/dist/index-DtsM4pjR.js +71 -0
  222. package/dist/index-DtsM4pjR.js.map +1 -0
  223. package/dist/index.css +1 -22
  224. package/dist/index.js +46 -810
  225. package/dist/index.js.map +1 -1
  226. package/dist/internal/components/Surface/Surface.d.ts +141 -0
  227. package/dist/internal/components/Surface/index.d.ts +1 -0
  228. package/dist/internal/components/index.d.ts +1 -0
  229. package/dist/internal/functions/getKeyboardFocusableElements.d.ts +11 -0
  230. package/dist/{stripInlineMarkdown-BWbMy7r_.js → stripInlineMarkdown-BOi-eJO3.js} +2 -2
  231. package/dist/{stripInlineMarkdown-BWbMy7r_.js.map → stripInlineMarkdown-BOi-eJO3.js.map} +1 -1
  232. package/dist/{syncFilterUtils-nJS_tCsu.js → syncFilterUtils-Gvm81gyv.js} +4 -4
  233. package/dist/{syncFilterUtils-nJS_tCsu.js.map → syncFilterUtils-Gvm81gyv.js.map} +1 -1
  234. package/dist/token/core/css-utils/a2-border.css +0 -30
  235. package/dist/token/core/css-utils/a2-color.css +0 -228
  236. package/dist/token/core/css-utils/a2-font.css +1 -27
  237. package/dist/token/core/css-utils/a2-spacing.css +1 -244
  238. package/dist/token/core/css-utils/a2-utils.css +0 -505
  239. package/dist/token/core/css-utils/border.css +0 -30
  240. package/dist/token/core/css-utils/color.css +0 -228
  241. package/dist/token/core/css-utils/font.css +1 -27
  242. package/dist/token/core/css-utils/spacing.css +1 -244
  243. package/dist/token/core/css-utils/utils.css +0 -505
  244. package/dist/{useDrilldown-DwzT0Fse.js → useDrilldown-6SfknQ2s.js} +3 -3
  245. package/dist/{useDrilldown-DwzT0Fse.js.map → useDrilldown-6SfknQ2s.js.map} +1 -1
  246. package/dist/{useInitialFocus-BUxEDMEG.js → useInitialFocus-BIvXK1Rp.js} +2 -2
  247. package/dist/{useInitialFocus-BUxEDMEG.js.map → useInitialFocus-BIvXK1Rp.js.map} +1 -1
  248. package/dist/{usePopoverTransitionStates-CDXCdyKa.js → usePopoverTransitionStates-B1opfxxn.js} +1 -2
  249. package/dist/{usePopoverTransitionStates-CDXCdyKa.js.map → usePopoverTransitionStates-B1opfxxn.js.map} +1 -1
  250. package/dist/{useToggleSelection-CAwGOeXk.js → useToggleSelection-odFvSS5t.js} +2 -2
  251. package/dist/{useToggleSelection-CAwGOeXk.js.map → useToggleSelection-odFvSS5t.js.map} +1 -1
  252. package/package.json +18 -3
  253. package/dist/DataTable-BDXdCF7J.js.map +0 -1
  254. package/dist/InteractiveCard-CnW0m_F-.js +0 -87
  255. package/dist/InteractiveCard-CnW0m_F-.js.map +0 -1
  256. package/dist/NumberField-DJbdyatF.js.map +0 -1
  257. package/dist/ToolbarButtonToggle--2Ka05N8.js.map +0 -1
  258. package/dist/Tooltip-BlStOXN3.js.map +0 -1
  259. package/dist/getKeyboardFocusableElements-QqcABz0D.js +0 -12
  260. package/dist/getKeyboardFocusableElements-QqcABz0D.js.map +0 -1
  261. package/dist/index-ByMdotWU.js +0 -107
  262. package/dist/index-ByMdotWU.js.map +0 -1
  263. /package/dist/{index2.css → Toolbar2.css} +0 -0
@@ -5,7 +5,9 @@ import { InteractiveCardProps } from './types';
5
5
  * Features:
6
6
  * - Clickable card area that can be a button or link
7
7
  * - Supports nested interactive elements without accessibility violations
8
- * - Uses sibling structure with pointer-events to avoid nested button issues
8
+ * - Dead-space clicks are forwarded to the action element via event delegation,
9
+ * so any focusable child (button, link, input, switch, etc.) handles its own
10
+ * click without bubbling to the card action
9
11
  * - Box-shadow feedback on hover and focus of any interactive element
10
12
  * - Full keyboard accessibility with proper focus management
11
13
  * - Touch-friendly with mobile support
@@ -0,0 +1,27 @@
1
+ import { RichTextEditorProps } from './types';
2
+ /**
3
+ * RichTextEditor component for authoring formatted content.
4
+ *
5
+ * Features:
6
+ * - Supports both controlled (`value`) and uncontrolled (`defaultValue`) modes
7
+ * - Emits content as both HTML string (`onChange`) and TipTap JSON (`onJsonChange`)
8
+ * - Text formatting toolbar: bold, italic, underline, strikethrough, inline code, blockquote
9
+ * - Headings (H1–H3), paragraph, font size, text alignment, and indentation
10
+ * - Bullet lists, ordered lists, and checklists
11
+ * - Link insertion and removal via popover
12
+ * - Image upload and YouTube video embedding via Insert dropdown (`allowMedia`)
13
+ * - Drag handle for reordering content blocks (`allowDragDrop`)
14
+ * - @mention typeahead with hover card support (`allowMention`)
15
+ * - Disabled state disables both toolbar and editor content
16
+ * - Field-level label, hint, description, and error messaging
17
+ * - Accessible toolbar with ARIA roles, `aria-pressed` toggles, and keyboard navigation
18
+ * - Built on TipTap (ProseMirror) with Shadow DOM support
19
+ *
20
+ * @example
21
+ * <RichTextEditor
22
+ * label="Notes"
23
+ * defaultValue="<p>Hello world</p>"
24
+ * onChange={(html) => console.log(html)}
25
+ * />
26
+ */
27
+ export declare const RichTextEditor: import('react').ForwardRefExoticComponent<RichTextEditorProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { RichTextEditor } from './RichTextEditor';
2
+ export type { RichTextEditorProps, RichTextEditorMentionOption } from './types';
@@ -0,0 +1,14 @@
1
+ type LinkPopoverProps = {
2
+ open: boolean;
3
+ anchorRect: DOMRect | null;
4
+ initialHref: string;
5
+ initialDisplayText: string;
6
+ onSave: (href: string, displayText: string) => void;
7
+ onRemove: () => void;
8
+ onCancel: () => void;
9
+ };
10
+ export declare const LinkPopover: {
11
+ ({ open, anchorRect, initialHref, initialDisplayText, onSave, onRemove, onCancel, }: LinkPopoverProps): import("react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ import { RichTextEditorMentionOption } from '../types';
3
+ export type MentionListRef = {
4
+ onKeyDown: (props: {
5
+ event: KeyboardEvent;
6
+ }) => boolean;
7
+ };
8
+ type MentionListProps = {
9
+ items: RichTextEditorMentionOption[];
10
+ command: (item: RichTextEditorMentionOption) => void;
11
+ renderOption?: (option: RichTextEditorMentionOption) => ReactNode;
12
+ };
13
+ export declare const MentionList: import('react').ForwardRefExoticComponent<MentionListProps & import('react').RefAttributes<MentionListRef>>;
14
+ export {};
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { NodeViewProps } from '@tiptap/react';
3
+ import { RichTextEditorMentionOption } from '../types';
4
+ type MentionNodeViewProps = NodeViewProps & {
5
+ renderHoverContent?: (option: RichTextEditorMentionOption) => ReactNode;
6
+ };
7
+ export declare const MentionNodeView: {
8
+ ({ node, renderHoverContent, }: MentionNodeViewProps): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export {};
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { RichTextEditorMentionOption } from '../types';
3
+ export type MentionPopoverRef = {
4
+ onKeyDown: (props: {
5
+ event: KeyboardEvent;
6
+ }) => boolean;
7
+ };
8
+ type MentionPopoverProps = {
9
+ open: boolean;
10
+ rect: DOMRect | null;
11
+ items: RichTextEditorMentionOption[];
12
+ command: ((item: RichTextEditorMentionOption) => void) | null;
13
+ renderOption?: (option: RichTextEditorMentionOption) => ReactNode;
14
+ };
15
+ export declare const MentionPopover: import('react').ForwardRefExoticComponent<MentionPopoverProps & import('react').RefAttributes<MentionPopoverRef>>;
16
+ export {};
@@ -0,0 +1,57 @@
1
+ import { MutableRefObject, MouseEvent } from 'react';
2
+ import { Editor } from '@tiptap/react';
3
+ import { MentionPopoverRef } from './MentionPopover';
4
+ import { MentionState } from './extensions/MentionExtension';
5
+ import { OpenLinkPopover } from './extensions/LinkKeyboardShortcutExtension';
6
+ import { RichTextEditorProps } from '../types';
7
+ type LinkPopoverState = {
8
+ open: boolean;
9
+ anchorRect: DOMRect | null;
10
+ initialHref: string;
11
+ initialDisplayText: string;
12
+ };
13
+ type YouTubePopoverState = {
14
+ open: boolean;
15
+ anchorRect: DOMRect | null;
16
+ };
17
+ type YouTubeEmbedPromptState = {
18
+ open: boolean;
19
+ anchorRect: DOMRect | null;
20
+ url: string;
21
+ from: number;
22
+ to: number;
23
+ };
24
+ export type RichTextEditorContextValue = {
25
+ editor: Editor;
26
+ disabled: boolean;
27
+ allowTextFormat: boolean;
28
+ allowTextAlignment: boolean;
29
+ allowLists: boolean;
30
+ allowChecklist: boolean;
31
+ allowCode: boolean;
32
+ allowBlockquote: boolean;
33
+ allowLink: boolean;
34
+ allowMedia: boolean;
35
+ allowMention: boolean;
36
+ allowDragDrop: boolean;
37
+ onImageUpload: RichTextEditorProps["onImageUpload"];
38
+ allowedMimeTypes: `image/${string}`[];
39
+ mentionState: MentionState;
40
+ mentionPopoverRef: MutableRefObject<MentionPopoverRef | null>;
41
+ linkPopoverState: LinkPopoverState;
42
+ youtubePopoverState: YouTubePopoverState;
43
+ youtubeEmbedPromptState: YouTubeEmbedPromptState;
44
+ onEditorClick: (event: MouseEvent) => void;
45
+ openLinkPopover: OpenLinkPopover;
46
+ closeLinkPopover: () => void;
47
+ removeLinkPopover: () => void;
48
+ saveLinkPopover: (href: string, displayText: string) => void;
49
+ embedYoutubeFromPrompt: () => void;
50
+ closeYoutubeEmbedPrompt: () => void;
51
+ openYoutubePopover: (anchorRect: DOMRect) => void;
52
+ closeYoutubePopover: () => void;
53
+ saveYoutubePopover: (url: string) => void;
54
+ };
55
+ export declare const RichTextEditorContext: import('react').Context<RichTextEditorContextValue | null>;
56
+ export declare const useRichTextEditorContext: () => RichTextEditorContextValue;
57
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Editor } from '@tiptap/core';
2
+ type RichTextEditorDragHandleProps = {
3
+ editor: Editor;
4
+ };
5
+ export declare function RichTextEditorDragHandle({ editor, }: RichTextEditorDragHandleProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import { RichTextEditorMentionOption } from '../types';
2
+ export declare const MOCK_MENTION_USERS: RichTextEditorMentionOption[];
3
+ export declare const MOCK_CONTENT_BASIC = "<p>Hello <strong>world</strong>. This is <em>italic</em> and <u>underlined</u>.</p>";
4
+ export declare const MOCK_CONTENT_RICH: string;
5
+ export declare const MOCK_CONTENT_WITH_MENTION = "<p>Hey <span data-type=\"mention\" data-id=\"1\" data-label=\"Alice Johnson\"></span>, can you review this?</p>";
6
+ export declare const MOCK_CONTENT_WITH_CHECKLIST: string;
7
+ export declare const MOCK_CONTENT_WITH_YOUTUBE: string;
8
+ export declare const MOCK_CONTENT_WITH_DRAG_BLOCKS: string;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { RichTextEditorProps } from '../types';
3
+ type RichTextEditorProviderProps = Pick<RichTextEditorProps, "value" | "defaultValue" | "onChange" | "onJsonChange" | "placeholder" | "disabled" | "allowTextFormat" | "allowTextAlignment" | "allowLists" | "allowChecklist" | "allowCode" | "allowBlockquote" | "allowLink" | "allowMedia" | "allowMention" | "allowDragDrop" | "mentionOptions" | "onMentionInputChange" | "renderMentionHoverContent" | "onImageUpload"> & {
4
+ allowedMimeTypes?: `image/${string}`[];
5
+ children: React.ReactNode;
6
+ };
7
+ export declare const RichTextEditorProvider: ({ children, allowTextFormat, allowTextAlignment, allowLists, allowChecklist, allowCode, allowBlockquote, allowLink, allowMedia, allowMention, allowDragDrop, disabled, mentionOptions, onMentionInputChange, renderMentionHoverContent, onImageUpload, allowedMimeTypes, ...editorProps }: RichTextEditorProviderProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare const RichTextEditorToolbar: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ type YouTubeEmbedPromptProps = {
2
+ open: boolean;
3
+ anchorRect: DOMRect | null;
4
+ onEmbed: () => void;
5
+ onDismiss: () => void;
6
+ };
7
+ export declare const YouTubeEmbedPrompt: {
8
+ ({ open, anchorRect, onEmbed, onDismiss, }: YouTubeEmbedPromptProps): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export {};
@@ -0,0 +1,11 @@
1
+ type YouTubePopoverProps = {
2
+ open: boolean;
3
+ anchorRect: DOMRect | null;
4
+ onSave: (url: string) => void;
5
+ onCancel: () => void;
6
+ };
7
+ export declare const YouTubePopover: {
8
+ ({ open, anchorRect, onSave, onCancel, }: YouTubePopoverProps): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export {};
@@ -0,0 +1,3 @@
1
+ import { MutableRefObject } from 'react';
2
+ export declare const DEFAULT_ALLOWED_MIME_TYPES: `image/${string}`[];
3
+ export declare const createImageUploadExtension: (onImageUploadRef: MutableRefObject<((files: File[], onComplete: (srcs: string[]) => void) => void) | undefined>, allowedMimeTypes?: `image/${string}`[]) => import('@tiptap/core').Extension<Omit<import('@tiptap/extension-file-handler').FileHandlePluginOptions, "key" | "editor">, any>;
@@ -0,0 +1,8 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { Extension } from '@tiptap/core';
3
+ export type OpenLinkPopover = (params: {
4
+ anchorRect: DOMRect;
5
+ href: string;
6
+ displayText: string;
7
+ }) => void;
8
+ export declare const createLinkKeyboardShortcutExtension: (openLinkPopoverRef: MutableRefObject<OpenLinkPopover | null>) => Extension<any, any>;
@@ -0,0 +1,18 @@
1
+ import { MutableRefObject, Dispatch, SetStateAction, ReactNode } from 'react';
2
+ import { RichTextEditorMentionOption } from '../../types';
3
+ export declare const UNICODE_WHITESPACE_PATTERN = "[\0- \u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]";
4
+ export declare const UNICODE_WHITESPACE_REGEX: RegExp;
5
+ export type MentionState = {
6
+ open: boolean;
7
+ items: RichTextEditorMentionOption[];
8
+ command: ((item: RichTextEditorMentionOption) => void) | null;
9
+ rect: DOMRect | null;
10
+ };
11
+ export type MentionCallbacks = {
12
+ getOptions: () => RichTextEditorMentionOption[];
13
+ onQueryChange: (query: string) => void;
14
+ setState: Dispatch<SetStateAction<MentionState>>;
15
+ onKeyDown: (event: KeyboardEvent) => boolean;
16
+ getRenderHoverContent: () => ((option: RichTextEditorMentionOption) => ReactNode) | undefined;
17
+ };
18
+ export declare const createMentionExtension: (callbacksRef: MutableRefObject<MentionCallbacks>) => import('@tiptap/core').Node<import('@tiptap/extension-mention').MentionOptions<any, import('@tiptap/extension-mention').MentionNodeAttrs>, any>;
@@ -0,0 +1,8 @@
1
+ import { MutableRefObject } from 'react';
2
+ export type OnYoutubePaste = (params: {
3
+ anchorRect: DOMRect;
4
+ url: string;
5
+ from: number;
6
+ to: number;
7
+ }) => void;
8
+ export declare const createYoutubeExtension: (onYoutubePasteRef: MutableRefObject<OnYoutubePaste>) => import('@tiptap/core').Node<import('@tiptap/extension-youtube').YoutubeOptions, any>;
@@ -0,0 +1,32 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { MentionCallbacks } from './extensions/MentionExtension';
3
+ import { OnYoutubePaste } from './extensions/YoutubeExtension';
4
+ import { OpenLinkPopover } from './extensions/LinkKeyboardShortcutExtension';
5
+ import { RichTextEditorProps } from '../types';
6
+ /**
7
+ * Parameters for the useRichTextEditor hook.
8
+ * @property {MutableRefObject<RichTextEditorProps["onImageUpload"]>} onImageUploadRef - Stable ref to the image upload callback, used by extensions without re-creating the editor.
9
+ * @property {MutableRefObject<MentionCallbacks>} mentionCallbacksRef - Stable ref to mention event callbacks (input change, item select).
10
+ * @property {MutableRefObject<OnYoutubePaste>} onYoutubePasteRef - Stable ref to the YouTube paste handler used by the YouTube extension.
11
+ * @property {MutableRefObject<OpenLinkPopover | null>} openLinkPopoverRef - Stable ref to the function that opens the link popover, wired to the `Ctrl/Cmd+K` keyboard shortcut extension.
12
+ * @property {`image/${string}`[]} [allowedMimeTypes] - MIME types accepted for image upload via paste and drop.
13
+ */
14
+ export type UseRichTextEditorParams = Pick<RichTextEditorProps, "value" | "defaultValue" | "onChange" | "onJsonChange" | "placeholder" | "disabled" | "allowTextFormat" | "allowTextAlignment" | "allowLists" | "allowChecklist" | "allowCode" | "allowBlockquote" | "allowLink" | "allowMedia" | "allowMention" | "onImageUpload"> & {
15
+ allowedMimeTypes?: `image/${string}`[];
16
+ onImageUploadRef: MutableRefObject<RichTextEditorProps["onImageUpload"]>;
17
+ mentionCallbacksRef: MutableRefObject<MentionCallbacks>;
18
+ onYoutubePasteRef: MutableRefObject<OnYoutubePaste>;
19
+ openLinkPopoverRef: MutableRefObject<OpenLinkPopover | null>;
20
+ };
21
+ /**
22
+ * Internal hook that initializes and manages the TipTap editor instance for RichTextEditor.
23
+ *
24
+ * Conditionally registers TipTap extensions based on the `allow*` feature flags so that
25
+ * only the capabilities needed for a given editor configuration are included. Handles both
26
+ * controlled mode (via `value` + `onChange`) and uncontrolled mode (via `defaultValue`),
27
+ * and syncs the `disabled` prop to the editor's editable state.
28
+ *
29
+ * @param params - Configuration derived from RichTextEditorProps plus stable callback refs.
30
+ * @returns The TipTap `Editor` instance, or `null` during SSR / before mount.
31
+ */
32
+ export declare const useRichTextEditor: ({ value, defaultValue, onChange, onJsonChange, placeholder, disabled, allowTextFormat, allowTextAlignment, allowLists, allowChecklist, allowCode, allowBlockquote, allowLink, allowMedia, allowMention, allowedMimeTypes, onImageUploadRef, mentionCallbacksRef, onYoutubePasteRef, openLinkPopoverRef, }: UseRichTextEditorParams) => import('@tiptap/core').Editor;
@@ -0,0 +1,103 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { JSONContent } from '@tiptap/core';
3
+ import { HelperProps } from '../../../internal/components';
4
+ import { FieldLabelProps } from '../../../components/FieldLabel';
5
+ import { LayoutUtilProps } from '../../../types';
6
+ import { DataTrackingId } from '../../../types/DataTrackingId';
7
+ /**
8
+ * A single option displayed in the @mention typeahead dropdown.
9
+ * @property {string} id - Unique identifier for the mention option, stored in the mention node's attributes.
10
+ * @property {string} label - Display name shown in the dropdown and rendered inside the inserted mention node.
11
+ */
12
+ export type RichTextEditorMentionOption = {
13
+ id: string;
14
+ label: string;
15
+ };
16
+ type RichTextEditorBaseProps = {
17
+ id?: string;
18
+ value?: string;
19
+ defaultValue?: string;
20
+ onChange?: (html: string) => void;
21
+ onJsonChange?: (json: JSONContent) => void;
22
+ placeholder?: string;
23
+ disabled?: boolean;
24
+ error?: boolean | string | string[];
25
+ hint?: HelperProps["hint"];
26
+ description?: HelperProps["description"];
27
+ label?: FieldLabelProps["children"];
28
+ labelProps?: FieldLabelProps;
29
+ required?: boolean;
30
+ moreInfo?: ReactNode;
31
+ allowTextFormat?: boolean;
32
+ allowTextAlignment?: boolean;
33
+ allowLists?: boolean;
34
+ allowChecklist?: boolean;
35
+ allowCode?: boolean;
36
+ allowBlockquote?: boolean;
37
+ allowLink?: boolean;
38
+ allowMention?: boolean;
39
+ allowDragDrop?: boolean;
40
+ mentionOptions?: RichTextEditorMentionOption[];
41
+ onMentionInputChange?: (query: string) => void;
42
+ renderMentionOption?: (option: RichTextEditorMentionOption) => ReactNode;
43
+ renderMentionHoverContent?: (option: RichTextEditorMentionOption) => ReactNode;
44
+ };
45
+ type RichTextEditorWithMedia = {
46
+ /**
47
+ * Enables the Insert dropdown with Image and YouTube options. Requires `onImageUpload`.
48
+ */
49
+ allowMedia: true;
50
+ /**
51
+ * Called when the user selects, pastes, or drops image files into the editor.
52
+ * Receive the files and a callback — invoke it with the resulting URLs once upload is complete.
53
+ */
54
+ onImageUpload: (files: File[], onComplete: (srcs: string[]) => void) => void;
55
+ /**
56
+ * MIME types accepted by the file picker and paste/drop handler.
57
+ * e.g. `["image/jpeg", "image/png"]`. When omitted, defaults to common image types.
58
+ */
59
+ allowedMimeTypes?: `image/${string}`[];
60
+ };
61
+ type RichTextEditorWithoutMedia = {
62
+ allowMedia?: false;
63
+ onImageUpload?: never;
64
+ allowedMimeTypes?: never;
65
+ };
66
+ /**
67
+ * Props for the RichTextEditor component.
68
+ * @property {string} [id] - HTML id applied to the editor's contenteditable element.
69
+ * @property {string} [value] - Controlled HTML string value. When provided, the editor operates in controlled mode.
70
+ * @property {string} [defaultValue] - Default HTML string value for uncontrolled mode.
71
+ * @property {(html: string) => void} [onChange] - Callback fired with the HTML string on each content change.
72
+ * @property {(json: JSONContent) => void} [onJsonChange] - Callback fired with the TipTap JSON representation on each content change.
73
+ * @property {string} [placeholder] - Placeholder text shown when the editor is empty.
74
+ * @property {boolean} [disabled] - Disables the editor and toolbar when true.
75
+ * @property {boolean | string | string[]} [error] - Error state. Pass `true` for error styling only, or a string/string[] for error messages.
76
+ * @property {HelperProps["hint"]} [hint] - Hint text displayed below the editor.
77
+ * @property {HelperProps["description"]} [description] - Description text displayed below the editor.
78
+ * @property {FieldLabelProps["children"]} [label] - Label for the editor field.
79
+ * @property {FieldLabelProps} [labelProps] - Additional props passed to the label element.
80
+ * @property {boolean} [required] - Marks the field as required.
81
+ * @property {ReactNode} [moreInfo] - Additional info rendered alongside the label.
82
+ * @property {boolean} [allowTextFormat] - Enables text formatting toolbar section: text type dropdown, font size, bold, italic, underline, strikethrough. Default: true.
83
+ * @property {boolean} [allowTextAlignment] - Enables text alignment toolbar section: left, center, right, justify. Default: true.
84
+ * @property {boolean} [allowLists] - Enables list toolbar section: ordered list, unordered list, indent controls. Default: false.
85
+ * @property {boolean} [allowChecklist] - Enables checklist toolbar section. Default: false.
86
+ * @property {boolean} [allowCode] - Enables inline code toolbar button. Default: false.
87
+ * @property {boolean} [allowBlockquote] - Enables blockquote toolbar button. Default: false.
88
+ * @property {boolean} [allowLink] - Enables link insert/remove toolbar button. Default: false.
89
+ * @property {boolean} [allowMedia] - Enables the Insert dropdown (Image + YouTube). Requires `onImageUpload`. Default: false.
90
+ * @property {boolean} [allowMention] - Enables @mention toolbar button. Requires `mentionOptions`. Default: false.
91
+ * @property {boolean} [allowDragDrop] - Enables drag handle for reordering blocks. Default: false.
92
+ * @property {RichTextEditorMentionOption[]} [mentionOptions] - List of mention options to display in the dropdown.
93
+ * @property {(query: string) => void} [onMentionInputChange] - Fired when the user types after `@`. Use to filter or async-load `mentionOptions`.
94
+ * @property {(option: RichTextEditorMentionOption) => ReactNode} [renderMentionOption] - Custom render function for each option in the mention dropdown.
95
+ * @property {(option: RichTextEditorMentionOption) => ReactNode} [renderMentionHoverContent] - Render function for the hover card shown when hovering over an inserted mention.
96
+ * @property {(files: File[], onComplete: (srcs: string[]) => void) => void} [onImageUpload] - Required when `allowMedia` is true. Called when the user selects, pastes, or drops image files. Invoke the callback with the resulting URLs once upload is complete.
97
+ * @property {`image/${string}`[]} [allowedMimeTypes] - MIME types accepted by the file picker and paste/drop handler when `allowMedia` is true. Defaults to common image types when omitted.
98
+ * @extends Omit<ComponentPropsWithoutRef<"div">, "onChange">
99
+ * @extends LayoutUtilProps
100
+ * @extends DataTrackingId
101
+ */
102
+ export type RichTextEditorProps = Omit<ComponentPropsWithoutRef<"div">, "onChange"> & RichTextEditorBaseProps & (RichTextEditorWithMedia | RichTextEditorWithoutMedia) & LayoutUtilProps & DataTrackingId;
103
+ export {};
@@ -33,6 +33,10 @@ export type DataTableProps<T extends DataTableRowData> = LayoutUtilProps & Compo
33
33
  * @default false
34
34
  */
35
35
  disableExpandAll?: boolean;
36
+ /**
37
+ * The default active row ids.
38
+ */
39
+ defaultActiveRowIds?: TableRow<T>["id"][];
36
40
  /**
37
41
  * The default selected row ids.
38
42
  */
@@ -51,11 +55,23 @@ export type DataTableProps<T extends DataTableRowData> = LayoutUtilProps & Compo
51
55
  * @default false
52
56
  */
53
57
  disableSelectAll?: boolean;
58
+ /**
59
+ * Whether rows can be activated by clicking. When enabled, rows receive
60
+ * a pointer cursor and hover background, and clicking a row toggles it
61
+ * into the active set. Can be a boolean to apply to all rows, or a
62
+ * function to opt specific rows in.
63
+ * @default false
64
+ */
65
+ isActivatable?: boolean | ((row: T) => boolean);
54
66
  /**
55
67
  * Whether the table is selectable. Can be a boolean or a function to customize the selection logic.
56
68
  * @default false
57
69
  */
58
70
  isSelectable?: boolean | ((row: T) => boolean);
71
+ /**
72
+ * Called when the row activation state changes. Passes the active row ids.
73
+ */
74
+ onActivateRow?: (activeRowIds: TableRow<T>["id"][]) => void;
59
75
  /**
60
76
  * Called when the row expansion state changes. Passes the expanded row ids.
61
77
  */
@@ -74,6 +90,20 @@ export type DataTableProps<T extends DataTableRowData> = LayoutUtilProps & Compo
74
90
  * When `false` or `undefined`, no pagination is applied and all data is shown.
75
91
  */
76
92
  pagination?: boolean | DataTablePaginationConfig<T>;
93
+ /**
94
+ * The active row ids.
95
+ */
96
+ activeRowIds?: TableRow<T>["id"][];
97
+ /**
98
+ * Row ids that should render as read-only. Read-only rows gray their
99
+ * plain text content, show a `not-allowed` cursor when they would
100
+ * otherwise be activatable, and disable the selection checkbox.
101
+ * Links, chips, and custom cell content are unaffected.
102
+ *
103
+ * Pre-seeded `selectedRowIds` / `activeRowIds` are still accepted —
104
+ * read-only only gates user interaction, not the visual state.
105
+ */
106
+ readOnlyRowIds?: TableRow<T>["id"][];
77
107
  /**
78
108
  * The selected row ids.
79
109
  */
@@ -94,14 +124,23 @@ export type DataTableProps<T extends DataTableRowData> = LayoutUtilProps & Compo
94
124
  */
95
125
  emptyCellContent?: ReactNode;
96
126
  /**
97
- * Disables row virtualization. By default, tables with 101 or more rows
127
+ * Disables row virtualization. By default, tables with 50 or more rows
98
128
  * virtualize their body to keep DOM size bounded; set this to `true` to
99
129
  * render every row in the DOM regardless of count. Intended as an escape
100
130
  * hatch for rollout safety and for flows that need every row mounted
101
131
  * (e.g., find-in-page, certain print or export paths).
132
+ *
133
+ * Takes precedence over `forceVirtualization`.
102
134
  * @default false
103
135
  */
104
136
  disableVirtualization?: boolean;
137
+ /**
138
+ * Forces row virtualization below the default row-count threshold.
139
+ *
140
+ * Ignored when `disableVirtualization` is `true`.
141
+ * @default false
142
+ */
143
+ forceVirtualization?: boolean;
105
144
  /**
106
145
  * Optional function that returns a value signaling whether a row has
107
146
  * changed since the last render. When supplied, each row is memoized:
@@ -1,6 +1,7 @@
1
1
  import { ComponentPropsWithoutRef } from 'react';
2
2
  import { Table as TanstackTable } from '@tanstack/react-table';
3
3
  import { DataTableVirtualizer } from './useDataTableVirtualizer';
4
+ import { TableRow } from '../../types';
4
5
  /**
5
6
  * Props for the DataTableBody component
6
7
  * @property {TanstackTable<T>} table - The table instance from @tanstack/react-table to render
@@ -32,5 +33,26 @@ export type DataTableBodyProps<T> = {
32
33
  * When omitted, every row re-renders whenever the parent re-renders.
33
34
  */
34
35
  getRowVersion?: (row: T) => unknown;
36
+ /**
37
+ * Whether rows can be activated. Mirrors the DataTable `isActivatable`
38
+ * prop — a boolean applies to every row, a function opts specific rows in.
39
+ */
40
+ isActivatable?: boolean | ((row: T) => boolean);
41
+ /**
42
+ * Map of currently active row ids keyed by id. An entry set to `true`
43
+ * marks the row as active.
44
+ */
45
+ activeRowMap: Record<string, boolean>;
46
+ /**
47
+ * Map of read-only row ids keyed by id. Read-only rows gray their text
48
+ * and ignore activation clicks; their selection checkbox is disabled.
49
+ */
50
+ readOnlyRowMap: Record<string, boolean>;
51
+ /**
52
+ * Called when an activatable row is clicked. Receives the row id and the
53
+ * ids of all descendant rows (flattened, any depth) so the parent's state
54
+ * can cascade to its sub-rows.
55
+ */
56
+ onToggleActive: (rowId: TableRow<T>["id"], descendantIds: TableRow<T>["id"][]) => void;
35
57
  } & ComponentPropsWithoutRef<"div">;
36
58
  export declare function DataTableBody<T>(props: DataTableBodyProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { Row } from '@tanstack/react-table';
2
+ import { TableRow } from '../../types';
2
3
  import { useColumnOrder } from './useColumnOrder';
3
4
  export type DataTableBodyRowProps<T> = {
4
5
  columnOrder: ReturnType<typeof useColumnOrder>["columnOrder"];
@@ -11,6 +12,22 @@ export type DataTableBodyRowProps<T> = {
11
12
  parentRowCanExpand: boolean;
12
13
  isSelected: boolean;
13
14
  isSomeSelected: boolean;
15
+ isActivatable: boolean;
16
+ isActive: boolean;
17
+ /**
18
+ * True when the row is the topmost active ancestor in its active chain
19
+ * (itself active, has sub-rows, and no ancestor row is active). Drives
20
+ * the darker blue/100 background; non-topmost active rows use blue/50.
21
+ */
22
+ isTopMostActive: boolean;
23
+ /**
24
+ * True when the row is flagged read-only via `readOnlyRowIds`. Grays
25
+ * plain text, shows `not-allowed` cursor on activatable rows, and
26
+ * disables the activation click (checkbox disabling is gated at the
27
+ * DataTable level via `enableRowSelection`).
28
+ */
29
+ isReadOnly: boolean;
30
+ onToggleActive: (rowId: TableRow<T>["id"], descendantIds: TableRow<T>["id"][]) => void;
14
31
  /**
15
32
  * Optional consumer-provided function that returns a value expressing
16
33
  * "this row has changed." When supplied, the row is memoized: a row will
@@ -21,6 +38,6 @@ export type DataTableBodyRowProps<T> = {
21
38
  */
22
39
  getRowVersion?: (row: T) => unknown;
23
40
  };
24
- declare function DataTableBodyRowInner<T>({ columnOrder, row, rowIndex, tableHasSubRows, isExpanded, canExpand, depth, parentRowCanExpand, }: DataTableBodyRowProps<T>): import("react/jsx-runtime").JSX.Element;
41
+ declare function DataTableBodyRowInner<T>({ columnOrder, row, rowIndex, tableHasSubRows, isExpanded, canExpand, depth, parentRowCanExpand, isActivatable, isActive, isTopMostActive, isReadOnly, onToggleActive, }: DataTableBodyRowProps<T>): import("react/jsx-runtime").JSX.Element;
25
42
  export declare const DataTableBodyRow: typeof DataTableBodyRowInner;
26
43
  export {};
@@ -0,0 +1,16 @@
1
+ export type CellFocusContextValue = {
2
+ /**
3
+ * Whether the cell currently has focus
4
+ */
5
+ isCellFocused: boolean;
6
+ };
7
+ /**
8
+ * Context for communicating cell focus state to child components.
9
+ * Used by CellStatus to show tooltips when the cell is focused via keyboard.
10
+ */
11
+ export declare const CellFocusContext: import('react').Context<CellFocusContextValue | null>;
12
+ /**
13
+ * Hook to consume the CellFocusContext.
14
+ * Returns null if used outside of a CellFocusContext.Provider.
15
+ */
16
+ export declare function useCellFocusContext(): CellFocusContextValue | null;
@@ -0,0 +1,8 @@
1
+ import { BaseEditableCellProps, EditableCellImperativeHandle } from './types';
2
+ type DataTableEditableCustomCellProps<T> = BaseEditableCellProps<T>;
3
+ export declare const DataTableEditableCustomCell: (<T>(props: DataTableEditableCustomCellProps<T> & {
4
+ ref?: React.Ref<EditableCellImperativeHandle>;
5
+ }) => React.ReactElement) & {
6
+ displayName: string;
7
+ };
8
+ export {};
@@ -0,0 +1,49 @@
1
+ import { CustomEditConfig, CustomEditController, CustomEditRenderContext, TableRow } from '../../../types';
2
+ type CustomObjectValue = object;
3
+ type CustomEditHelperValue<T, K extends keyof T> = CustomEditRenderContext<T, K>["controller"]["draftValue"];
4
+ /**
5
+ * State returned by custom edit controller helpers.
6
+ * @property {CustomEditController<TValue>} controller - Controller object exposed to custom edit renderers.
7
+ * @property {() => void} runInitialFocus - Runs the initial focus callback registered by the custom editor.
8
+ */
9
+ export type CustomEditControllerState<TValue extends CustomObjectValue> = {
10
+ controller: CustomEditController<TValue>;
11
+ runInitialFocus: () => void;
12
+ };
13
+ /**
14
+ * Options for creating custom edit controller state.
15
+ * @property {TableRow<T>} row - Row whose cell value is being edited.
16
+ * @property {K} columnId - Column id for the editable cell.
17
+ * @property {CustomEditConfig<T, K>} editConfig - Custom edit configuration for the column.
18
+ * @property {() => void} [onCloseEditor] - Called after the editor closes successfully.
19
+ */
20
+ export type UseCustomEditControllerStateOptions<T, K extends keyof T> = {
21
+ row: TableRow<T>;
22
+ columnId: K;
23
+ editConfig: CustomEditConfig<T, K>;
24
+ onCloseEditor?: () => void;
25
+ };
26
+ export type UseCustomEditHelperStateOptions<T, K extends keyof T> = UseCustomEditControllerStateOptions<T, K>;
27
+ /**
28
+ * Creates React stateful helpers for a custom editable DataTable cell.
29
+ *
30
+ * @param options Row, column, edit configuration, and close callback for the editable cell.
31
+ * @returns Controller state with draft value helpers and initial focus runner.
32
+ */
33
+ export declare function useCustomEditControllerState<T, K extends keyof T>({ row, columnId, editConfig, onCloseEditor, }: UseCustomEditControllerStateOptions<T, K>): CustomEditControllerState<CustomEditHelperValue<T, K>>;
34
+ /**
35
+ * Backward-compatible alias for the custom edit controller hook.
36
+ */
37
+ export declare const useCustomEditHelperState: typeof useCustomEditControllerState;
38
+ /**
39
+ * Creates imperative custom edit helpers for non-React consumers and tests.
40
+ *
41
+ * @param options Row, column, edit configuration, and close callback for the editable cell.
42
+ * @returns Controller state with mutable draft value helpers and initial focus runner.
43
+ */
44
+ export declare function createCustomEditControllerState<T, K extends keyof T>({ row, columnId, editConfig, onCloseEditor, }: UseCustomEditControllerStateOptions<T, K>): CustomEditControllerState<CustomEditHelperValue<T, K>>;
45
+ /**
46
+ * Backward-compatible alias for the imperative custom edit controller factory.
47
+ */
48
+ export declare const createCustomEditHelperState: typeof createCustomEditControllerState;
49
+ export {};