@servicetitan/anvil2 3.0.0 → 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.
- package/CHANGELOG.md +45 -0
- package/README.md +8 -6
- package/dist/{AiMark-B1-M3ZgP.js → AiMark-DiMotaq3.js} +3 -3
- package/dist/{AiMark-B1-M3ZgP.js.map → AiMark-DiMotaq3.js.map} +1 -1
- package/dist/AiMark.css +3 -3
- package/dist/AiMark.js +1 -1
- package/dist/{Alert-DmbqtMg_.js → Alert-DhhVURcl.js} +2 -2
- package/dist/{Alert-DmbqtMg_.js.map → Alert-DhhVURcl.js.map} +1 -1
- package/dist/Alert.css +1 -1
- package/dist/Alert.js +1 -1
- package/dist/Announcement.css +1 -1
- package/dist/AnvilProvider.css +1 -2
- package/dist/{Avatar-NbFc4Ovc.js → Avatar-BmNcLUg-.js} +2 -2
- package/dist/{Avatar-NbFc4Ovc.js.map → Avatar-BmNcLUg-.js.map} +1 -1
- package/dist/{Avatar-B4hRHku9.js → Avatar-Cw8B8xZV.js} +2 -2
- package/dist/Avatar-Cw8B8xZV.js.map +1 -0
- package/dist/Avatar.css +2 -2
- package/dist/Avatar.js +2 -2
- package/dist/Badge.css +1 -1
- package/dist/{Breadcrumbs-CYmciJ1D.js → Breadcrumbs-vvKOtFwN.js} +2 -2
- package/dist/{Breadcrumbs-CYmciJ1D.js.map → Breadcrumbs-vvKOtFwN.js.map} +1 -1
- package/dist/Breadcrumbs.css +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/Button.css +1 -1
- package/dist/ButtonCompound.css +1 -1
- package/dist/ButtonToggle.css +1 -1
- package/dist/{Calendar-BAbAagIx.js → Calendar-BLvBN8Ou.js} +2 -2
- package/dist/{Calendar-BAbAagIx.js.map → Calendar-BLvBN8Ou.js.map} +1 -1
- package/dist/{Calendar-CaCMa_jq.js → Calendar-Dtn07sfJ.js} +2 -2
- package/dist/{Calendar-CaCMa_jq.js.map → Calendar-Dtn07sfJ.js.map} +1 -1
- package/dist/Calendar.css +2 -2
- package/dist/Calendar.js +2 -2
- package/dist/Card.css +1 -1
- package/dist/{Checkbox-BSAS8-DM.js → Checkbox-BngBrjEV.js} +3 -3
- package/dist/{Checkbox-BSAS8-DM.js.map → Checkbox-BngBrjEV.js.map} +1 -1
- package/dist/{Checkbox-Ckl8EFpF.js → Checkbox-lSwl_u26.js} +2 -2
- package/dist/{Checkbox-Ckl8EFpF.js.map → Checkbox-lSwl_u26.js.map} +1 -1
- package/dist/Checkbox.css +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/{Chip-CR5i8mQW.js → Chip-DBn3KRak.js} +3 -3
- package/dist/{Chip-CR5i8mQW.js.map → Chip-DBn3KRak.js.map} +1 -1
- package/dist/Chip.css +1 -1
- package/dist/Chip.js +1 -1
- package/dist/{Combobox-BffGTugd.js → Combobox-BqhvHG9H.js} +5 -5
- package/dist/{Combobox-BffGTugd.js.map → Combobox-BqhvHG9H.js.map} +1 -1
- package/dist/Combobox.css +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-D9Xj1nq5.js → DataTable-CB-exG-7.js} +1173 -142
- package/dist/DataTable-CB-exG-7.js.map +1 -0
- package/dist/DataTable.css +274 -118
- package/dist/{DateFieldRange-DPTC3EZz.js → DateFieldRange-Ci-OHK6g.js} +4 -4
- package/dist/{DateFieldRange-DPTC3EZz.js.map → DateFieldRange-Ci-OHK6g.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-w1G-zd9G.js → DateFieldSingle-JOEy4kSL.js} +4 -4
- package/dist/{DateFieldSingle-w1G-zd9G.js.map → DateFieldSingle-JOEy4kSL.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-DHNVc7Sd.js → DateFieldYearless-CIqPup6O.js} +4 -4
- package/dist/{DateFieldYearless-DHNVc7Sd.js.map → DateFieldYearless-CIqPup6O.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-C5ktVUgG.js → DateFieldYearlessRange-Cf11uZhk.js} +3 -3
- package/dist/{DateFieldYearlessRange-C5ktVUgG.js.map → DateFieldYearlessRange-Cf11uZhk.js.map} +1 -1
- package/dist/DateFieldYearlessRange.css +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-BubWkBZ0.js → DaysOfTheWeek-R2-y7cqh.js} +3 -3
- package/dist/{DaysOfTheWeek-BubWkBZ0.js.map → DaysOfTheWeek-R2-y7cqh.js.map} +1 -1
- package/dist/DaysOfTheWeek.css +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/Details.css +1 -1
- package/dist/{Dialog-DGmF6qx3.js → Dialog-C3yST7Ly.js} +5 -5
- package/dist/Dialog-C3yST7Ly.js.map +1 -0
- package/dist/Dialog.css +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/Divider.css +1 -1
- package/dist/Dnd.js +2 -1
- package/dist/Dnd.js.map +1 -1
- package/dist/DndHandleButton-Dgt9G-dF.js +43 -0
- package/dist/DndHandleButton-Dgt9G-dF.js.map +1 -0
- package/dist/DndHandleButton.css +22 -0
- package/dist/DndSort.css +1 -1
- package/dist/DndSort.js +2 -1
- package/dist/DndSort.js.map +1 -1
- package/dist/{Drawer-iewBy1DW.js → Drawer-CouIrQ8u.js} +6 -6
- package/dist/{Drawer-iewBy1DW.js.map → Drawer-CouIrQ8u.js.map} +1 -1
- package/dist/Drawer.css +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.css +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/{EditCard-D7-Ye7R0.js → EditCard-DFBjxF9l.js} +2 -2
- package/dist/{EditCard-D7-Ye7R0.js.map → EditCard-DFBjxF9l.js.map} +1 -1
- package/dist/EditCard.css +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldLabel-DZWu5dMp.js → FieldLabel-rHPbiyR3.js} +3 -3
- package/dist/{FieldLabel-DZWu5dMp.js.map → FieldLabel-rHPbiyR3.js.map} +1 -1
- package/dist/FieldLabel.css +2 -2
- package/dist/FieldLabel.js +1 -1
- package/dist/FieldMessage.css +1 -1
- package/dist/{Toolbar-C1_etxss.js → FilterBar-kVue-bVK.js} +127 -939
- package/dist/FilterBar-kVue-bVK.js.map +1 -0
- package/dist/FilterBar.css +59 -0
- package/dist/FilterBar.d.ts +6 -0
- package/dist/FilterBar.js +2 -0
- package/dist/FilterBar.js.map +1 -0
- package/dist/Flex.css +1 -1
- package/dist/Grid.css +1 -1
- package/dist/Helper.css +1 -1
- package/dist/Icon.css +1 -1
- package/dist/{InputMask-EwEJlW-t.js → InputMask-DxbFpzo7.js} +3 -3
- package/dist/{InputMask-EwEJlW-t.js.map → InputMask-DxbFpzo7.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/InteractiveCard-KGs2b_al.js +119 -0
- package/dist/InteractiveCard-KGs2b_al.js.map +1 -0
- package/dist/InteractiveCard.css +22 -29
- package/dist/InteractiveCard.js +1 -1
- package/dist/Layout.css +1 -1
- package/dist/Link.css +1 -1
- package/dist/List.css +1 -1
- package/dist/{ListView-DBO9Bl1H.js → ListView-CYkuvkAy.js} +2 -2
- package/dist/{ListView-DBO9Bl1H.js.map → ListView-CYkuvkAy.js.map} +1 -1
- package/dist/ListView.css +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{Listbox-DDlxpVu9.js → Listbox-BBrsMfO3.js} +2 -2
- package/dist/{Listbox-DDlxpVu9.js.map → Listbox-BBrsMfO3.js.map} +1 -1
- package/dist/Listbox.css +1 -1
- package/dist/Listbox.js +1 -1
- package/dist/Menu.css +1 -1
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-DZ3tm7zt.js → MultiSelectFieldSync-BWZQ4MFC.js} +5 -5
- package/dist/{MultiSelectFieldSync-DZ3tm7zt.js.map → MultiSelectFieldSync-BWZQ4MFC.js.map} +1 -1
- package/dist/MultiSelectFieldSync.css +1 -1
- package/dist/MultiSelectMenu.js +1 -1
- package/dist/{MultiSelectMenuSync-dgO9SmHi.js → MultiSelectMenuSync-Bl4ty0je.js} +4 -4
- package/dist/{MultiSelectMenuSync-dgO9SmHi.js.map → MultiSelectMenuSync-Bl4ty0je.js.map} +1 -1
- package/dist/{NumberField-DJbdyatF.js → NumberField-DMHJ2Cyi.js} +4 -5
- package/dist/NumberField-DMHJ2Cyi.js.map +1 -0
- package/dist/NumberField.css +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/Overflow.css +2 -2
- package/dist/Overflow.js +1 -1
- package/dist/{Page-Be1Blwme.js → Page-Blw4TE5J.js} +9 -9
- package/dist/{Page-Be1Blwme.js.map → Page-Blw4TE5J.js.map} +1 -1
- package/dist/Page.css +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-USDJM5vi.js → Pagination-DYNH3WeU.js} +2 -2
- package/dist/{Pagination-USDJM5vi.js.map → Pagination-DYNH3WeU.js.map} +1 -1
- package/dist/Pagination.css +6 -6
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-CyB7yzSf.js → Popover-C_XdNvAZ.js} +2 -2
- package/dist/{Popover-CyB7yzSf.js.map → Popover-C_XdNvAZ.js.map} +1 -1
- package/dist/Popover.css +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-DSrjgLTx.js → ProgressBar-BwHaAD25.js} +2 -2
- package/dist/{ProgressBar-DSrjgLTx.js.map → ProgressBar-BwHaAD25.js.map} +1 -1
- package/dist/ProgressBar.css +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-CQaXJ72d.js → Radio-DJ6KgfcS.js} +2 -2
- package/dist/{Radio-CQaXJ72d.js.map → Radio-DJ6KgfcS.js.map} +1 -1
- package/dist/{Radio-DO4UhbBE.js → Radio-IksHWkBl.js} +3 -3
- package/dist/{Radio-DO4UhbBE.js.map → Radio-IksHWkBl.js.map} +1 -1
- package/dist/Radio.css +1 -1
- package/dist/Radio.js +1 -1
- package/dist/RichTextEditor-C_Boj8QP.js +30852 -0
- package/dist/RichTextEditor-C_Boj8QP.js.map +1 -0
- package/dist/RichTextEditor.css +178 -0
- package/dist/RichTextEditor.d.ts +2 -0
- package/dist/RichTextEditor.js +2 -0
- package/dist/RichTextEditor.js.map +1 -0
- package/dist/{SearchField-CsRGYZx3.js → SearchField-BKJOW-vI.js} +3 -10
- package/dist/SearchField-BKJOW-vI.js.map +1 -0
- package/dist/SearchField-BplvDpBG.js +13 -0
- package/dist/SearchField-BplvDpBG.js.map +1 -0
- package/dist/SearchField.css +1 -1
- package/dist/SearchField.js +1 -1
- package/dist/SegmentedControl.css +1 -1
- package/dist/{SelectCard-CtXwY8FZ.js → SelectCard-E-13CjHS.js} +3 -3
- package/dist/{SelectCard-CtXwY8FZ.js.map → SelectCard-E-13CjHS.js.map} +1 -1
- package/dist/SelectCard.css +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldLabel-DLT5dKbx.js → SelectFieldLabel-C-MrQm-n.js} +2 -2
- package/dist/{SelectFieldLabel-DLT5dKbx.js.map → SelectFieldLabel-C-MrQm-n.js.map} +1 -1
- package/dist/{SelectFieldSync-C44hPeeS.js → SelectFieldSync-BbJFd_bV.js} +4 -4
- package/dist/{SelectFieldSync-C44hPeeS.js.map → SelectFieldSync-BbJFd_bV.js.map} +1 -1
- package/dist/SelectMenu.js +1 -1
- package/dist/{SelectMenuSync-V97oN85V.js → SelectMenuSync-CBMdmGTU.js} +4 -4
- package/dist/{SelectMenuSync-V97oN85V.js.map → SelectMenuSync-CBMdmGTU.js.map} +1 -1
- package/dist/{SelectOptions-CDoo4AUu.js → SelectOptions-BT9OCfPh.js} +2 -2
- package/dist/{SelectOptions-CDoo4AUu.js.map → SelectOptions-BT9OCfPh.js.map} +1 -1
- package/dist/{SelectTrigger-BWN3Tx43.js → SelectTrigger-DtyxYDzP.js} +3 -3
- package/dist/{SelectTrigger-BWN3Tx43.js.map → SelectTrigger-DtyxYDzP.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-Do7lQ5rw.js → SelectTriggerBase-Xwq929Wr.js} +3 -3
- package/dist/{SelectTriggerBase-Do7lQ5rw.js.map → SelectTriggerBase-Xwq929Wr.js.map} +1 -1
- package/dist/SelectTriggerBase.css +1 -1
- package/dist/SideNav.css +1 -1
- package/dist/Skeleton.css +1 -1
- package/dist/Spinner.css +1 -1
- package/dist/SrOnly.css +1 -1
- package/dist/StatusIcon.css +1 -1
- package/dist/Stepper.css +4 -4
- package/dist/{Switch-DeBu4Ucg.js → Switch-CElshQ9N.js} +2 -2
- package/dist/{Switch-DeBu4Ucg.js.map → Switch-CElshQ9N.js.map} +1 -1
- package/dist/Switch.css +1 -1
- package/dist/Switch.js +1 -1
- package/dist/Tab.css +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Text-J5YtSSXY.js → Text-C0F8AkvH.js} +5 -5
- package/dist/Text-C0F8AkvH.js.map +1 -0
- package/dist/Text.css +1 -1
- package/dist/Text.js +1 -1
- package/dist/{TextField-CRDTnuUN.js → TextField-CLZEj0aI.js} +3 -3
- package/dist/{TextField-CRDTnuUN.js.map → TextField-CLZEj0aI.js.map} +1 -1
- package/dist/{TextField-YlMkDHp-.js → TextField-yL52fx5R.js} +2 -2
- package/dist/{TextField-YlMkDHp-.js.map → TextField-yL52fx5R.js.map} +1 -1
- package/dist/TextField.css +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-CxXmr_Gx.js → Textarea-CGgyvnM8.js} +3 -3
- package/dist/{Textarea-CxXmr_Gx.js.map → Textarea-CGgyvnM8.js.map} +1 -1
- package/dist/Textarea.css +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/ThemeProvider.css +0 -1
- package/dist/{TimeField-DTg0CE5L.js → TimeField-BEvxjjFp.js} +4 -4
- package/dist/{TimeField-DTg0CE5L.js.map → TimeField-BEvxjjFp.js.map} +1 -1
- package/dist/TimeField.css +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/TimezoneMessage.css +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-Bq42x6Gx.js → Toaster-DllJAOK8.js} +3 -3
- package/dist/{Toaster-Bq42x6Gx.js.map → Toaster-DllJAOK8.js.map} +1 -1
- package/dist/{Toaster-Dly3rfva.js → Toaster-DuadB8pq.js} +2 -2
- package/dist/{Toaster-Dly3rfva.js.map → Toaster-DuadB8pq.js.map} +1 -1
- package/dist/Toaster.css +1 -1
- package/dist/Toolbar-J5cakHba.js +588 -0
- package/dist/Toolbar-J5cakHba.js.map +1 -0
- package/dist/Toolbar-QYRQv45Y.js +780 -0
- package/dist/Toolbar-QYRQv45Y.js.map +1 -0
- package/dist/Toolbar.css +2 -96
- package/dist/Toolbar.js +2 -1
- package/dist/Toolbar.js.map +1 -1
- package/dist/{index2.css → Toolbar2.css} +1 -1
- package/dist/ToolbarButtonToggle-Ch0SH4oH.js +285 -0
- package/dist/ToolbarButtonToggle-Ch0SH4oH.js.map +1 -0
- package/dist/ToolbarButtonToggle.css +41 -0
- package/dist/{Tooltip-BlStOXN3.js → Tooltip-lBmgi5ZB.js} +7 -6
- package/dist/Tooltip-lBmgi5ZB.js.map +1 -0
- package/dist/Tooltip.css +7 -6
- package/dist/Tooltip.js +1 -1
- package/dist/{YearlessDateInputWithPicker-DyytWt0x.js → YearlessDateInputWithPicker-DryLX8sA.js} +2 -2
- package/dist/{YearlessDateInputWithPicker-DyytWt0x.js.map → YearlessDateInputWithPicker-DryLX8sA.js.map} +1 -1
- package/dist/YearlessDateInputWithPicker.css +2 -2
- package/dist/add-BcQkAUip.js +6 -0
- package/dist/add-BcQkAUip.js.map +1 -0
- package/dist/assets/css-utils/a2-border.css +23 -53
- package/dist/assets/css-utils/a2-color.css +221 -449
- package/dist/assets/css-utils/a2-font.css +21 -47
- package/dist/assets/css-utils/a2-spacing.css +238 -481
- package/dist/assets/css-utils/a2-utils.css +497 -1002
- package/dist/assets/css-utils/border.css +23 -53
- package/dist/assets/css-utils/color.css +221 -449
- package/dist/assets/css-utils/font.css +21 -47
- package/dist/assets/css-utils/spacing.css +238 -481
- package/dist/assets/css-utils/utils.css +497 -1002
- package/dist/assets/icons/st/unsorted.svg +1 -1
- package/dist/beta/components/FilterBar/FilterBar.d.ts +87 -0
- package/dist/beta/components/{Toolbar/Filters → FilterBar}/FilterToggleButton.d.ts +1 -1
- package/dist/beta/components/FilterBar/index.d.ts +3 -0
- package/dist/beta/components/{Toolbar/Filters → FilterBar}/internal/FilterGroupContext.d.ts +5 -5
- package/dist/beta/components/{Toolbar/Filters → FilterBar}/internal/types.d.ts +2 -2
- package/dist/beta/components/{Toolbar/Filters → FilterBar}/internal/utils/test.d.ts +1 -0
- package/dist/beta/components/InteractiveCard/InteractiveCard.d.ts +3 -1
- package/dist/beta/components/RichTextEditor/RichTextEditor.d.ts +27 -0
- package/dist/beta/components/RichTextEditor/index.d.ts +2 -0
- package/dist/beta/components/RichTextEditor/internal/LinkPopover.d.ts +14 -0
- package/dist/beta/components/RichTextEditor/internal/MentionList.d.ts +14 -0
- package/dist/beta/components/RichTextEditor/internal/MentionNodeView.d.ts +11 -0
- package/dist/beta/components/RichTextEditor/internal/MentionPopover.d.ts +16 -0
- package/dist/beta/components/RichTextEditor/internal/RichTextEditorContext.d.ts +57 -0
- package/dist/beta/components/RichTextEditor/internal/RichTextEditorDragHandle.d.ts +6 -0
- package/dist/beta/components/RichTextEditor/internal/RichTextEditorMockData.d.ts +8 -0
- package/dist/beta/components/RichTextEditor/internal/RichTextEditorProvider.d.ts +8 -0
- package/dist/beta/components/RichTextEditor/internal/RichTextEditorToolbar.d.ts +1 -0
- package/dist/beta/components/RichTextEditor/internal/YouTubeEmbedPrompt.d.ts +11 -0
- package/dist/beta/components/RichTextEditor/internal/YouTubePopover.d.ts +11 -0
- package/dist/beta/components/RichTextEditor/internal/extensions/ImageUploadExtension.d.ts +3 -0
- package/dist/beta/components/RichTextEditor/internal/extensions/LinkKeyboardShortcutExtension.d.ts +8 -0
- package/dist/beta/components/RichTextEditor/internal/extensions/MentionExtension.d.ts +18 -0
- package/dist/beta/components/RichTextEditor/internal/extensions/YoutubeExtension.d.ts +8 -0
- package/dist/beta/components/RichTextEditor/internal/useRichTextEditor.d.ts +32 -0
- package/dist/beta/components/RichTextEditor/types.d.ts +103 -0
- package/dist/beta/components/Table/DataTable/DataTable.d.ts +40 -1
- package/dist/beta/components/Table/DataTable/internal/DataTableBody.d.ts +22 -0
- package/dist/beta/components/Table/DataTable/internal/DataTableBodyRow.d.ts +18 -1
- package/dist/beta/components/Table/DataTable/internal/cells/CellFocusContext.d.ts +16 -0
- package/dist/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableCustomCell.d.ts +8 -0
- package/dist/beta/components/Table/DataTable/internal/editable-cells/useCustomEditHelpers.d.ts +49 -0
- package/dist/beta/components/Table/DataTable/internal/useDataTableVirtualizer.d.ts +9 -5
- package/dist/beta/components/Table/DataTable/internal/util/cellTypeHelpers.d.ts +3 -0
- package/dist/beta/components/Table/DataTable/internal/util/getTanStackColumnDef.d.ts +13 -1
- package/dist/beta/components/Table/createColumnHelper.d.ts +48 -22
- package/dist/beta/components/Table/internal/getCommonPinningClasses.d.ts +1 -1
- package/dist/beta/components/Table/types.d.ts +311 -7
- package/dist/beta/components/Toolbar/Toolbar.d.ts +0 -54
- package/dist/beta/components/Toolbar/index.d.ts +0 -1
- package/dist/beta/components/index.d.ts +2 -0
- package/dist/beta.js +13 -10
- package/dist/beta.js.map +1 -1
- package/dist/components/Toolbar/internal/utils/accessibility.d.ts +5 -0
- package/dist/getKeyboardFocusableElements-B_U9rt6y.js +11 -0
- package/dist/getKeyboardFocusableElements-B_U9rt6y.js.map +1 -0
- package/dist/index-DUzqzmOX.js +17044 -0
- package/dist/index-DUzqzmOX.js.map +1 -0
- package/dist/index-DtsM4pjR.js +71 -0
- package/dist/index-DtsM4pjR.js.map +1 -0
- package/dist/index.css +1 -22
- package/dist/index.js +49 -813
- package/dist/index.js.map +1 -1
- package/dist/internal/components/Surface/Surface.d.ts +141 -0
- package/dist/internal/components/Surface/index.d.ts +1 -0
- package/dist/internal/components/index.d.ts +1 -0
- package/dist/internal/functions/getKeyboardFocusableElements.d.ts +11 -0
- package/dist/{stripInlineMarkdown-BWbMy7r_.js → stripInlineMarkdown-BOi-eJO3.js} +2 -2
- package/dist/{stripInlineMarkdown-BWbMy7r_.js.map → stripInlineMarkdown-BOi-eJO3.js.map} +1 -1
- package/dist/{syncFilterUtils-BLcRXQfd.js → syncFilterUtils-Gvm81gyv.js} +5 -5
- package/dist/{syncFilterUtils-BLcRXQfd.js.map → syncFilterUtils-Gvm81gyv.js.map} +1 -1
- package/dist/syncFilterUtils.css +4 -4
- package/dist/token/core/css-utils/a2-border.css +0 -30
- package/dist/token/core/css-utils/a2-color.css +0 -228
- package/dist/token/core/css-utils/a2-font.css +1 -27
- package/dist/token/core/css-utils/a2-spacing.css +1 -244
- package/dist/token/core/css-utils/a2-utils.css +0 -505
- package/dist/token/core/css-utils/border.css +0 -30
- package/dist/token/core/css-utils/color.css +0 -228
- package/dist/token/core/css-utils/font.css +1 -27
- package/dist/token/core/css-utils/spacing.css +1 -244
- package/dist/token/core/css-utils/utils.css +0 -505
- package/dist/{useDrilldown-D5WWJRU2.js → useDrilldown-6SfknQ2s.js} +3 -3
- package/dist/{useDrilldown-D5WWJRU2.js.map → useDrilldown-6SfknQ2s.js.map} +1 -1
- package/dist/{useInitialFocus-BUxEDMEG.js → useInitialFocus-BIvXK1Rp.js} +2 -2
- package/dist/{useInitialFocus-BUxEDMEG.js.map → useInitialFocus-BIvXK1Rp.js.map} +1 -1
- package/dist/{usePopoverTransitionStates-CDXCdyKa.js → usePopoverTransitionStates-B1opfxxn.js} +1 -2
- package/dist/{usePopoverTransitionStates-CDXCdyKa.js.map → usePopoverTransitionStates-B1opfxxn.js.map} +1 -1
- package/dist/{useToggleSelection-D_2qS0P1.js → useToggleSelection-odFvSS5t.js} +2 -2
- package/dist/{useToggleSelection-D_2qS0P1.js.map → useToggleSelection-odFvSS5t.js.map} +1 -1
- package/package.json +26 -11
- package/dist/Avatar-B4hRHku9.js.map +0 -1
- package/dist/DataTable-D9Xj1nq5.js.map +0 -1
- package/dist/Dialog-DGmF6qx3.js.map +0 -1
- package/dist/InteractiveCard-CnW0m_F-.js +0 -87
- package/dist/InteractiveCard-CnW0m_F-.js.map +0 -1
- package/dist/NumberField-DJbdyatF.js.map +0 -1
- package/dist/SearchField-CsRGYZx3.js.map +0 -1
- package/dist/Text-J5YtSSXY.js.map +0 -1
- package/dist/Toolbar-C1_etxss.js.map +0 -1
- package/dist/Tooltip-BlStOXN3.js.map +0 -1
- package/dist/beta/components/Toolbar/Filters/FilterGroup.d.ts +0 -25
- package/dist/getKeyboardFocusableElements-QqcABz0D.js +0 -12
- package/dist/getKeyboardFocusableElements-QqcABz0D.js.map +0 -1
- package/dist/index-ByMdotWU.js +0 -107
- package/dist/index-ByMdotWU.js.map +0 -1
- /package/dist/beta/components/{Toolbar/Filters → FilterBar}/FilterButton.d.ts +0 -0
- /package/dist/beta/components/{Toolbar/Filters → FilterBar}/FilterDateRange.d.ts +0 -0
- /package/dist/beta/components/{Toolbar/Filters → FilterBar}/FilterDateSingle.d.ts +0 -0
- /package/dist/beta/components/{Toolbar/Filters → FilterBar}/FilterDrawer.d.ts +0 -0
- /package/dist/beta/components/{Toolbar/Filters → FilterBar}/FilterItemWrapper.d.ts +0 -0
- /package/dist/beta/components/{Toolbar/Filters → FilterBar}/FilterSelect.d.ts +0 -0
- /package/dist/beta/components/{Toolbar/Filters → FilterBar}/internal/utils/filter-state.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17.045 13.083v-6.67l2.657 2.497a1.008 1.008 0 0 0 1.635-.324.99.99 0 0 0-.215-1.086l-4.367-4.208a.995.995 0 0 0-1.41 0L10.793 7.5a.998.998 0 1 0 1.41 1.41l2.84-2.497v6.67c0 .549.45.999 1.001.999s1-.45 1-.999M7.371 11.5v6.67l-2.658-2.498a1.008 1.008 0 0 0-1.637.324.99.99 0 0 0 .216 1.086l4.369 4.207a.995.995 0 0 0 1.41 0l4.552-4.207a.998.998 0 1 0-1.41-1.41L9.37 18.169V11.5c0-.55-.45-1-1-1-.549 0-.999.45-.999 1"/></svg>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { Filter } from './internal/types';
|
|
3
|
+
import { LayoutUtilProps } from '../../../types';
|
|
4
|
+
import { ToolbarOverflowTypes, ToolbarSize } from '../Toolbar/types';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the FilterBar component
|
|
7
|
+
*
|
|
8
|
+
* @extends ComponentPropsWithoutRef<"div">
|
|
9
|
+
* @extends LayoutUtilProps
|
|
10
|
+
*/
|
|
11
|
+
export type FilterBarProps = ComponentPropsWithoutRef<"div"> & LayoutUtilProps & {
|
|
12
|
+
/** Array of filter objects */
|
|
13
|
+
filters: Filter[];
|
|
14
|
+
/** Description of the content this filter bar is associated with, used for accessibility */
|
|
15
|
+
associatedContent: string;
|
|
16
|
+
/** Callback function when filters change */
|
|
17
|
+
onFilterChange: (filters: Filter[]) => void;
|
|
18
|
+
/** Whether the filters submission is controlled via an apply button */
|
|
19
|
+
controlledFiltering?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Size of filter controls
|
|
22
|
+
* @default xsmall
|
|
23
|
+
*/
|
|
24
|
+
size?: ToolbarSize;
|
|
25
|
+
/**
|
|
26
|
+
* How to handle overflow when items don't fit
|
|
27
|
+
* @default wrap
|
|
28
|
+
*/
|
|
29
|
+
overflow?: ToolbarOverflowTypes;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* FilterBar component for displaying a standalone group of filters with toggles and a clear button.
|
|
33
|
+
*
|
|
34
|
+
* Features:
|
|
35
|
+
* - Standalone component with `role="toolbar"` and keyboard navigation
|
|
36
|
+
* - Renders filter toggles and popovers for all filter types
|
|
37
|
+
* - Supports controlled and uncontrolled filtering
|
|
38
|
+
* - Integrates with FilterDrawer for batch filter editing
|
|
39
|
+
* - Provides a clear all filters button
|
|
40
|
+
* - Handles overflow and hidden filters
|
|
41
|
+
* - Shares filter state via context for child components
|
|
42
|
+
* - Supports boolean, custom, single-select, multi-select, date, and date range filter types
|
|
43
|
+
* - Preserves filter state when filter configuration changes
|
|
44
|
+
* - Responsive: condenses to drawer-only at small container sizes
|
|
45
|
+
* - Can be composed alongside Toolbar as a sibling using Flex layout
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* <FilterBar
|
|
49
|
+
* associatedContent="invoices"
|
|
50
|
+
* filters={filters}
|
|
51
|
+
* onFilterChange={handleFilter}
|
|
52
|
+
* controlledFiltering={true}
|
|
53
|
+
* />
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* // With Toolbar as sibling
|
|
57
|
+
* <Flex alignItems="center" justifyContent="space-between">
|
|
58
|
+
* <Toolbar associatedContent="invoice actions">
|
|
59
|
+
* <Toolbar.Button icon={SaveIcon} aria-label="Save" />
|
|
60
|
+
* </Toolbar>
|
|
61
|
+
* <FilterBar
|
|
62
|
+
* associatedContent="invoices"
|
|
63
|
+
* filters={filters}
|
|
64
|
+
* onFilterChange={handleFilter}
|
|
65
|
+
* />
|
|
66
|
+
* </Flex>
|
|
67
|
+
*/
|
|
68
|
+
export declare const FilterBar: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & LayoutUtilProps & {
|
|
69
|
+
/** Array of filter objects */
|
|
70
|
+
filters: Filter[];
|
|
71
|
+
/** Description of the content this filter bar is associated with, used for accessibility */
|
|
72
|
+
associatedContent: string;
|
|
73
|
+
/** Callback function when filters change */
|
|
74
|
+
onFilterChange: (filters: Filter[]) => void;
|
|
75
|
+
/** Whether the filters submission is controlled via an apply button */
|
|
76
|
+
controlledFiltering?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Size of filter controls
|
|
79
|
+
* @default xsmall
|
|
80
|
+
*/
|
|
81
|
+
size?: ToolbarSize;
|
|
82
|
+
/**
|
|
83
|
+
* How to handle overflow when items don't fit
|
|
84
|
+
* @default wrap
|
|
85
|
+
*/
|
|
86
|
+
overflow?: ToolbarOverflowTypes;
|
|
87
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './FilterBar';
|
|
2
|
+
export { FilterBar as default, type FilterBarProps } from './FilterBar';
|
|
3
|
+
export { type Filter, type BooleanFilter, type CustomFilter, type SingleSelectFilter, type MultiSelectFilter, type DateFilter, type DateRangeFilter, type FilterValue, type FilterRenderProps, type BaseFilter, } from './internal/types';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FilterBarProps } from '../FilterBar';
|
|
3
3
|
import { Filter, FilterValue } from './types';
|
|
4
4
|
/**
|
|
5
|
-
* Context for sharing filter state and operations between
|
|
5
|
+
* Context for sharing filter state and operations between FilterBar and its children
|
|
6
6
|
*
|
|
7
|
-
* @extends
|
|
7
|
+
* @extends FilterBarProps
|
|
8
8
|
*/
|
|
9
|
-
type FilterGroupContextProps =
|
|
9
|
+
type FilterGroupContextProps = FilterBarProps & {
|
|
10
10
|
/** Reference to the filter group DOM element
|
|
11
11
|
* @default { current: null }
|
|
12
12
|
*/
|
|
@@ -34,7 +34,7 @@ type FilterGroupContextProps = FilterGroupProps & {
|
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
36
|
* Context provider for filter-related operations
|
|
37
|
-
* Used to share filter state between
|
|
37
|
+
* Used to share filter state between FilterBar and FilterDrawer
|
|
38
38
|
*/
|
|
39
39
|
export declare const FilterGroupContext: import('react').Context<FilterGroupContextProps>;
|
|
40
40
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { DateFieldSingleProps } from '
|
|
3
|
-
import { DateFieldRangeProps } from '
|
|
2
|
+
import { DateFieldSingleProps } from '../../../../components/DateFieldSingle';
|
|
3
|
+
import { DateFieldRangeProps } from '../../../../components/DateFieldRange';
|
|
4
4
|
/**
|
|
5
5
|
* Base properties shared by all filter types
|
|
6
6
|
*/
|
|
@@ -40,6 +40,7 @@ export declare function createMockFilterContext(filters?: Filter[], contextOverr
|
|
|
40
40
|
addHiddenFilter: import('vitest').Mock<(...args: any[]) => any>;
|
|
41
41
|
removeHiddenFilter: import('vitest').Mock<(...args: any[]) => any>;
|
|
42
42
|
controlledFiltering: boolean;
|
|
43
|
+
associatedContent: string;
|
|
43
44
|
};
|
|
44
45
|
export declare function createMockBooleanFilter(overrides?: Partial<BooleanFilter>): BooleanFilter;
|
|
45
46
|
export declare function createMockCustomFilter<T = unknown>(overrides?: Partial<CustomFilter<T>>): CustomFilter<T>;
|
|
@@ -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
|
-
* -
|
|
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,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,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>;
|
package/dist/beta/components/RichTextEditor/internal/extensions/LinkKeyboardShortcutExtension.d.ts
ADDED
|
@@ -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
|
|
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:
|