@persona/design-system 0.10.3 → 0.10.5
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 +28 -0
- package/dist/Accordion.d.mts +2 -2
- package/dist/AccordionItem.d.mts +2 -2
- package/dist/{Action-DT8WqfEg.d.mts → Action-Bmo8B-Q3.d.mts} +4 -4
- package/dist/Action.d.mts +1 -1
- package/dist/AdvancedFilterRuleRow.d.mts +3 -3
- package/dist/AdvancedFilterRulesPopover.d.mts +3 -3
- package/dist/ArrayValueControl.d.mts +2 -2
- package/dist/Attribute.d.mts +4 -4
- package/dist/AttributeGrid.d.mts +1 -1
- package/dist/{Badge-Bvn3afds.mjs → Badge-8YzapjWf.mjs} +4 -4
- package/dist/Badge-8YzapjWf.mjs.map +1 -0
- package/dist/Badge.d.mts +1 -1
- package/dist/Banner.d.mts +1 -1
- package/dist/BooleanValueControl.d.mts +2 -2
- package/dist/BottomPanel.d.mts +1 -1
- package/dist/{Breadcrumb-BDbY1Ffu.d.mts → Breadcrumb-DnY8n3EL.d.mts} +8 -3
- package/dist/Breadcrumb.d.mts +2 -2
- package/dist/{Breadcrumbs-C2ThOYJ-.d.mts → Breadcrumbs-DRu_JfdI.d.mts} +3 -3
- package/dist/{Breadcrumbs-CQUe9VTM.mjs → Breadcrumbs-Dft2TR4v.mjs} +61 -21
- package/dist/Breadcrumbs-Dft2TR4v.mjs.map +1 -0
- package/dist/Breadcrumbs.d.mts +1 -1
- package/dist/{Button-CyjqQa5v.d.mts → Button-Cg8KyT5M.d.mts} +5 -5
- package/dist/Button.d.mts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/{Calendar-CkjYG7Mj.d.mts → Calendar-D-6WOLJ1.d.mts} +2 -2
- package/dist/Calendar.d.mts +1 -1
- package/dist/CalendarBase.d.mts +2 -2
- package/dist/CalendarCell.d.mts +1 -1
- package/dist/CalendarGrid.d.mts +1 -1
- package/dist/{Card-CzRHVUFo.d.mts → Card-CfECLwQ6.d.mts} +5 -5
- package/dist/{Card-BXNxWX5C.mjs → Card-DuQHyroh.mjs} +7 -7
- package/dist/Card-DuQHyroh.mjs.map +1 -0
- package/dist/Card.d.mts +1 -1
- package/dist/Card2.d.mts +1 -1
- package/dist/CardGrouping.d.mts +3 -3
- package/dist/{CardV2-Dp4eHSE-.mjs → CardV2-BRJbRSts.mjs} +14 -14
- package/dist/CardV2-BRJbRSts.mjs.map +1 -0
- package/dist/{Checkbox-BaJ-dGdX.mjs → Checkbox-Dr4LMKHV.mjs} +7 -7
- package/dist/Checkbox-Dr4LMKHV.mjs.map +1 -0
- package/dist/{Checkbox-B2MZShdu.d.mts → Checkbox-ZywrdT_h.d.mts} +2 -2
- package/dist/Checkbox.d.mts +1 -1
- package/dist/{CheckboxGroupField-6E5o6bYi.d.mts → CheckboxGroupField-UHpA38U5.d.mts} +4 -4
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/ChoicesValueControl.d.mts +2 -2
- package/dist/CodeHighlight.d.mts +1 -1
- package/dist/{Combobox-DTeu9_RR.d.mts → Combobox-BXkcQ2aY.d.mts} +4 -4
- package/dist/{Combobox-CBM-oY-e.mjs → Combobox-DQxaOCLA.mjs} +18 -18
- package/dist/Combobox-DQxaOCLA.mjs.map +1 -0
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-BMBdtP2Z.d.mts → ComboboxBase-D2rDQHYZ.d.mts} +8 -8
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-DY5bAep9.d.mts → ComboboxMultiSelect-CrvB6ap5.d.mts} +3 -3
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-1NglA-u2.d.mts → ComboboxSingleSelect-Dp0iTdDO.d.mts} +5 -5
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-D9egXqY_.d.mts → CompactBar-zYfXjFmn.d.mts} +4 -4
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-CidT_cE9.mjs → ConfigFormGroup-BCTWCws5.mjs} +5 -5
- package/dist/ConfigFormGroup-BCTWCws5.mjs.map +1 -0
- package/dist/ConfigFormGroup.d.mts +1 -1
- package/dist/{ControlBar-RIz-xjxs.d.mts → ControlBar-kJ_eWf8f.d.mts} +3 -3
- package/dist/ControlBar.d.mts +1 -1
- package/dist/{DataTable-l1bFeLXL.d.mts → DataTable-C000E74h.d.mts} +7 -7
- package/dist/{DataTable-DQ8axNfo.mjs → DataTable-DEJHWrsy.mjs} +25 -25
- package/dist/DataTable-DEJHWrsy.mjs.map +1 -0
- package/dist/DataTable.d.mts +1 -1
- package/dist/{DateField-CwSq77Ri.d.mts → DateField-g7malFm-.d.mts} +3 -3
- package/dist/DateField.d.mts +1 -1
- package/dist/{DatePicker-DRhY_0st.d.mts → DatePicker-8kUpFFh8.d.mts} +3 -3
- package/dist/{DatePicker-D0cvVbzq.mjs → DatePicker-D-_ibUd1.mjs} +20 -20
- package/dist/DatePicker-D-_ibUd1.mjs.map +1 -0
- package/dist/DatePicker.d.mts +1 -1
- package/dist/{DateRangePicker-CLuBLF1q.d.mts → DateRangePicker-Nv4uNuIW.d.mts} +4 -4
- package/dist/DateRangePicker.d.mts +1 -1
- package/dist/DateRangeValueControl.d.mts +3 -3
- package/dist/DateValueControl.d.mts +2 -2
- package/dist/{DropdownButton-5oNcpsOq.mjs → DropdownButton-BiFRlSVD.mjs} +4 -4
- package/dist/DropdownButton-BiFRlSVD.mjs.map +1 -0
- package/dist/DropdownButton.d.mts +3 -3
- package/dist/{DropdownMenu-UIrnFxfG.d.mts → DropdownMenu-CQbS7ML5.d.mts} +3 -3
- package/dist/{DropdownMenu-CedsmO5h.mjs → DropdownMenu-Q8S-9rXm.mjs} +4 -4
- package/dist/DropdownMenu-Q8S-9rXm.mjs.map +1 -0
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{ErrorProps-DH0fzeGf.d.mts → ErrorProps-Cy-APmdC.d.mts} +2 -2
- package/dist/ErrorProps.d.mts +1 -1
- package/dist/{FieldRegistry-B5E-GN91.d.mts → FieldRegistry-a44G08fS.d.mts} +3 -3
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-BQWpTi2b.d.mts → FilterBar-BpMguIXl.d.mts} +5 -5
- package/dist/FilterBar.d.mts +1 -1
- package/dist/FilterPickerMenu.d.mts +3 -3
- package/dist/FilterPill.d.mts +2 -2
- package/dist/FilterPopover.d.mts +2 -2
- package/dist/FloatValueControl.d.mts +2 -2
- package/dist/{FloatingActionBar-CpvLefPm.d.mts → FloatingActionBar-DPA9v_yH.d.mts} +2 -2
- package/dist/FloatingActionBar.d.mts +1 -1
- package/dist/FloatingPanel.d.mts +1 -1
- package/dist/FloatingPanelContext.d.mts +1 -1
- package/dist/FloatingPanelRenderer.d.mts +1 -1
- package/dist/FloatingToolbar.d.mts +27 -0
- package/dist/{FormControl-C4CiA0H-.mjs → FormControl-BztNXLn6.mjs} +7 -7
- package/dist/FormControl-BztNXLn6.mjs.map +1 -0
- package/dist/{FormControl-DEG_0oXt.d.mts → FormControl-TkYMZeBd.d.mts} +3 -3
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +2 -2
- package/dist/{FormField-mLbXDJ9B.d.mts → FormField-PBo1ctY8.d.mts} +3 -3
- package/dist/{FormField-C0cd1zVd.mjs → FormField-g1zQFM9T.mjs} +22 -22
- package/dist/FormField-g1zQFM9T.mjs.map +1 -0
- package/dist/FormField.d.mts +1 -1
- package/dist/{Grid-DXVkhyNQ.mjs → Grid-BtTuj5mR.mjs} +5 -5
- package/dist/Grid-BtTuj5mR.mjs.map +1 -0
- package/dist/Grid.d.mts +1 -1
- package/dist/GridItem.d.mts +1 -1
- package/dist/{Header-ayDu4VWE.d.mts → Header-fwlbzxYx.d.mts} +2 -2
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-BB9Vznnx.d.mts → HelperTooltip-BLfPfJRN.d.mts} +3 -3
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/HighlightedText.d.mts +3 -3
- package/dist/{HoverCopyableField-D-BubaRd.mjs → HoverCopyableField-CW7Jxmni.mjs} +8 -8
- package/dist/HoverCopyableField-CW7Jxmni.mjs.map +1 -0
- package/dist/HoverCopyableField.d.mts +1 -1
- package/dist/{I18nContext-TXS9M8t5.d.mts → I18nContext-EPmbUprm.d.mts} +3 -3
- package/dist/I18nContext.d.mts +1 -1
- package/dist/{IconButton-HWx5Hlmi.mjs → IconButton-DftINsp7.mjs} +8 -8
- package/dist/IconButton-DftINsp7.mjs.map +1 -0
- package/dist/{IconButton-Bigvu1Q4.d.mts → IconButton-KhCwTwPx.d.mts} +3 -3
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageThumbnail.d.mts +1 -1
- package/dist/ImageTile.d.mts +2 -2
- package/dist/IndexTableLayout.d.mts +6 -6
- package/dist/InlineCombobox.d.mts +2 -2
- package/dist/InlineInput.d.mts +2 -2
- package/dist/{Input-Dap055xf.mjs → Input-DtO3qMnE.mjs} +7 -7
- package/dist/Input-DtO3qMnE.mjs.map +1 -0
- package/dist/{Input-Bg4bi6VZ.d.mts → Input-QNjbGo38.d.mts} +4 -4
- package/dist/Input.d.mts +1 -1
- package/dist/{InputProps-Bl-G826g.d.mts → InputProps-BT7-RfnD.d.mts} +3 -3
- package/dist/InputProps.d.mts +1 -1
- package/dist/{Inserter-BKVrJ4M5.d.mts → Inserter-BnQVEqHV.d.mts} +2 -2
- package/dist/Inserter.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +2 -2
- package/dist/LayoutLoadingShimmer.d.mts +1 -1
- package/dist/LayoutLoadingSpinner.d.mts +1 -1
- package/dist/{Link-Cf__H8gD.mjs → Link-DKYmdL9t.mjs} +4 -4
- package/dist/Link-DKYmdL9t.mjs.map +1 -0
- package/dist/Link.d.mts +2 -2
- package/dist/{ListBox-eoyBHtnJ.mjs → ListBox-CDG0EAPg.mjs} +14 -14
- package/dist/ListBox-CDG0EAPg.mjs.map +1 -0
- package/dist/{ListBox-cH0dfeLN.d.mts → ListBox-D9SYTzOd.d.mts} +4 -4
- package/dist/ListBox.d.mts +1 -1
- package/dist/{ListBoxField-DOpaE0q4.d.mts → ListBoxField-CtPDd_Aw.d.mts} +5 -5
- package/dist/ListBoxField.d.mts +1 -1
- package/dist/{LoadingShimmer-Bqjdut7i.mjs → LoadingShimmer-oPIv2ESr.mjs} +3 -3
- package/dist/LoadingShimmer-oPIv2ESr.mjs.map +1 -0
- package/dist/LoadingShimmer.d.mts +2 -2
- package/dist/{LogicRow-CaxsteGU.d.mts → LogicRow-BWIZ7262.d.mts} +4 -4
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/MatchHighlight.d.mts +1 -1
- package/dist/{Menu-5VknNr1T.d.mts → Menu-DizjcMbO.d.mts} +5 -5
- package/dist/{Menu-Dw6Rcpk6.mjs → Menu-EIT_MwK6.mjs} +7 -9
- package/dist/Menu-EIT_MwK6.mjs.map +1 -0
- package/dist/Menu.d.mts +1 -1
- package/dist/{MiddleTruncatedText-DoTyfMem.mjs → MiddleTruncatedText-DicQsLDG.mjs} +5 -5
- package/dist/MiddleTruncatedText-DicQsLDG.mjs.map +1 -0
- package/dist/{Modal-kjUptzg1.mjs → Modal-92O_uW8H.mjs} +10 -10
- package/dist/Modal-92O_uW8H.mjs.map +1 -0
- package/dist/{Modal-BuxggahW.d.mts → Modal-Bhwq1bQJ.d.mts} +3 -3
- package/dist/Modal.d.mts +1 -1
- package/dist/{PageHeader-DJF7nxgN.mjs → PageHeader-BzvA_NNt.mjs} +13 -6
- package/dist/PageHeader-BzvA_NNt.mjs.map +1 -0
- package/dist/{PageHeader-Czj42pyK.d.mts → PageHeader-D2QLrS7-.d.mts} +3 -3
- package/dist/PageHeader.d.mts +1 -1
- package/dist/{PageLayout-fXJW7daI.mjs → PageLayout-DCe3F76N.mjs} +9 -9
- package/dist/PageLayout-DCe3F76N.mjs.map +1 -0
- package/dist/{PageLayout-TBemv7oL.d.mts → PageLayout-DfAbeFIh.d.mts} +2 -2
- package/dist/PageLayout.d.mts +1 -1
- package/dist/{PageLayoutFrame-DzwlkNZ1.d.mts → PageLayoutFrame-CQLREOBH.d.mts} +2 -2
- package/dist/PageLayoutFrame.d.mts +1 -1
- package/dist/{PageSelector-DXCeBUoU.d.mts → PageSelector-QaKYtk6y.d.mts} +4 -4
- package/dist/PageSelector.d.mts +1 -1
- package/dist/PageSizeSelector.d.mts +1 -1
- package/dist/{Pagination-COcFWlha.d.mts → Pagination-DeXorbSK.d.mts} +3 -3
- package/dist/{Pagination-DtK-jbEY.mjs → Pagination-dTsHLVAk.mjs} +13 -13
- package/dist/Pagination-dTsHLVAk.mjs.map +1 -0
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-DueIK287.mjs → Pii-Bvh_kfGN.mjs} +4 -4
- package/dist/Pii-Bvh_kfGN.mjs.map +1 -0
- package/dist/Pii.d.mts +1 -1
- package/dist/{PillShell-DqglbFHe.d.mts → PillShell-B35z66jZ.d.mts} +3 -3
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-BcII7usF.mjs → Popover-DordjYNM.mjs} +5 -5
- package/dist/Popover-DordjYNM.mjs.map +1 -0
- package/dist/Popover.d.mts +2 -2
- package/dist/ProgressBar.d.mts +2 -2
- package/dist/{ProgressIndicator-C5sbFQcd.d.mts → ProgressIndicator-COCwRZfK.d.mts} +2 -2
- package/dist/{ProgressIndicator-CM37EU1B.mjs → ProgressIndicator-ISARECzW.mjs} +3 -3
- package/dist/ProgressIndicator-ISARECzW.mjs.map +1 -0
- package/dist/ProgressIndicator.d.mts +1 -1
- package/dist/{PseudoClassProps-BFFh2-u8.d.mts → PseudoClassProps-D_f-JUT1.d.mts} +2 -2
- package/dist/PseudoClassProps.d.mts +1 -1
- package/dist/{Radio-BstZg3DI.mjs → Radio-BlEtetrr.mjs} +5 -5
- package/dist/Radio-BlEtetrr.mjs.map +1 -0
- package/dist/Radio.d.mts +1 -1
- package/dist/{RadioGroup-erKerwSt.mjs → RadioGroup-CMrXmmn4.mjs} +5 -5
- package/dist/RadioGroup-CMrXmmn4.mjs.map +1 -0
- package/dist/{RadioGroup-BxEmipHa.d.mts → RadioGroup-pyGpWhhj.d.mts} +2 -2
- package/dist/RadioGroup.d.mts +1 -1
- package/dist/{RangeCalendar-CK5ArbIQ.d.mts → RangeCalendar-BiugsdSP.d.mts} +3 -3
- package/dist/RangeCalendar.d.mts +1 -1
- package/dist/RangeCalendarPresets.d.mts +2 -2
- package/dist/ResizableVerticalPanel.d.mts +1 -1
- package/dist/ResizeHandle.d.mts +1 -1
- package/dist/RichTextEditor.d.mts +36 -0
- package/dist/RightPanel.d.mts +1 -1
- package/dist/RightPanelLoadingContent.d.mts +1 -1
- package/dist/RightPanelResizeHandle.d.mts +1 -1
- package/dist/{RouterContext-CoDbEb_X.d.mts → RouterContext-BUdfr1it.d.mts} +3 -3
- package/dist/{RouterContext-nPSb55p9.mjs → RouterContext-DAQHKOv6.mjs} +2 -2
- package/dist/RouterContext-DAQHKOv6.mjs.map +1 -0
- package/dist/RouterContext.d.mts +1 -1
- package/dist/{RouterLink-BnIEi8d4.d.mts → RouterLink-BKbfvJcM.d.mts} +3 -3
- package/dist/RouterLink.d.mts +1 -1
- package/dist/RuleEditorFields.d.mts +3 -3
- package/dist/RulesPill.d.mts +2 -2
- package/dist/{SearchInput-DLC7-A7K.d.mts → SearchInput-BejaiGsS.d.mts} +3 -3
- package/dist/SearchInput.d.mts +1 -1
- package/dist/Section.d.mts +1 -1
- package/dist/SectionHeading.d.mts +2 -2
- package/dist/{SegmentedControl-DQjIO6iX.mjs → SegmentedControl-D_DA-MU1.mjs} +5 -5
- package/dist/SegmentedControl-D_DA-MU1.mjs.map +1 -0
- package/dist/{SegmentedControl-xjU-2IsJ.d.mts → SegmentedControl-UV03Ujqn.d.mts} +2 -2
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-CG_Xkx0m.d.mts → Select-Chk5WB1F.d.mts} +4 -4
- package/dist/{Select-BJ9ACmRD.mjs → Select-DkUMz4LG.mjs} +10 -10
- package/dist/Select-DkUMz4LG.mjs.map +1 -0
- package/dist/Select.d.mts +1 -1
- package/dist/SelectionCard.d.mts +1 -1
- package/dist/SelectionCardGroup.d.mts +1 -1
- package/dist/{SingleColumnLayout-CBynMc76.d.mts → SingleColumnLayout-DBo35psH.d.mts} +3 -3
- package/dist/SingleColumnLayout.d.mts +1 -1
- package/dist/Slider.d.mts +1 -1
- package/dist/SliderRHF.d.mts +1 -1
- package/dist/SliderThumb.d.mts +1 -1
- package/dist/SmartTextInput.d.mts +7 -7
- package/dist/SmartTextInputCodeDialog.d.mts +1 -1
- package/dist/SmartTextInputField.d.mts +3 -3
- package/dist/SmartTextInputFunctionDialog.d.mts +5 -5
- package/dist/SmartTextInputListbox.d.mts +3 -3
- package/dist/SmartTextInputPopover.d.mts +2 -2
- package/dist/{Spacer-J_HuhxX2.mjs → Spacer-C4d9Aho6.mjs} +3 -3
- package/dist/Spacer-C4d9Aho6.mjs.map +1 -0
- package/dist/Spacer.d.mts +1 -1
- package/dist/{Spinner-7Camx1vs.mjs → Spinner-CXb-KUs1.mjs} +3 -3
- package/dist/Spinner-CXb-KUs1.mjs.map +1 -0
- package/dist/Spinner.d.mts +1 -1
- package/dist/{SplitColumnLayout-BVzGbEDC.d.mts → SplitColumnLayout-C6m_mwdf.d.mts} +3 -3
- package/dist/SplitColumnLayout.d.mts +1 -1
- package/dist/{Stack-BkC7FCdF.mjs → Stack-Bzom2BTR.mjs} +3 -3
- package/dist/Stack-Bzom2BTR.mjs.map +1 -0
- package/dist/{Stack-BZyboHQl.d.mts → Stack-DrYxBkiF.d.mts} +3 -3
- package/dist/Stack.d.mts +1 -1
- package/dist/{StatusIndicator-Bunn9YLV.mjs → StatusIndicator-pWl1-FLb.mjs} +3 -3
- package/dist/StatusIndicator-pWl1-FLb.mjs.map +1 -0
- package/dist/StatusIndicator.d.mts +1 -1
- package/dist/{Sticker-yhxtIYH8.mjs → Sticker-Bi_fezCO.mjs} +6 -6
- package/dist/Sticker-Bi_fezCO.mjs.map +1 -0
- package/dist/{Sticker-CsUSNIH-.d.mts → Sticker-sIBnBbHD.d.mts} +5 -5
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +2 -2
- package/dist/StyledIconDrag.d.mts +1 -1
- package/dist/SwatchPicker.d.mts +1 -1
- package/dist/Tab.d.mts +2 -2
- package/dist/{TabBar-SX8E9-Bk.mjs → TabBar-DpXYsWgS.mjs} +9 -9
- package/dist/TabBar-DpXYsWgS.mjs.map +1 -0
- package/dist/TabBar.d.mts +1 -1
- package/dist/TabBarContext.d.mts +1 -1
- package/dist/TabBarIconButton.d.mts +1 -1
- package/dist/{Table-CadXF71E.d.mts → Table-BJfcRpMX.d.mts} +2 -2
- package/dist/{Table-BIDaC0uS.mjs → Table-DPi4Dt5H.mjs} +14 -14
- package/dist/Table-DPi4Dt5H.mjs.map +1 -0
- package/dist/Table.d.mts +1 -1
- package/dist/{TableBody-BKSHNSTo.d.mts → TableBody-CBz2PjA-.d.mts} +2 -2
- package/dist/TableBody.d.mts +1 -1
- package/dist/{TableBox-Bn_XZEYd.mjs → TableBox-BfSF36Gy.mjs} +23 -23
- package/dist/TableBox-BfSF36Gy.mjs.map +1 -0
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-v_ag22E0.d.mts → TableBoxCell-CwroLAWy.d.mts} +8 -8
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/{TableBoxField-BTpSGmgW.d.mts → TableBoxField-B7bHv7uV.d.mts} +6 -6
- package/dist/TableBoxField.d.mts +1 -1
- package/dist/{TableBoxRow-BBTztgTT.d.mts → TableBoxRow-Dke8B99J.d.mts} +4 -4
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-B9QSVySz.d.mts → TableBoxRowActions-CkUDVERC.d.mts} +3 -3
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/TableBoxRowContext.d.mts +1 -1
- package/dist/{TableCell-4u5_BgTC.d.mts → TableCell-KHx5JlqZ.d.mts} +3 -3
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-qxoq5abn.mjs → TableControls-BDXOQMr7.mjs} +69 -69
- package/dist/TableControls-BDXOQMr7.mjs.map +1 -0
- package/dist/{TableControls-wM35j3g4.d.mts → TableControls-DAjx1TYG.d.mts} +6 -6
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-rTYwRi5S.d.mts → TableControlsContext-BEIvE9qN.d.mts} +3 -3
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableHead-BuCQeDAq.d.mts → TableHead-D5A3bOwt.d.mts} +2 -2
- package/dist/TableHead.d.mts +1 -1
- package/dist/{TableHeaderCell-DIcQlZps.d.mts → TableHeaderCell-BXgnxPpX.d.mts} +2 -2
- package/dist/TableHeaderCell.d.mts +1 -1
- package/dist/{TableLayout-ScEVdvvA.d.mts → TableLayout-Dy5ht8KO.d.mts} +2 -2
- package/dist/TableLayout.d.mts +1 -1
- package/dist/{TableRow-lCsvG0a-.d.mts → TableRow-C1iGbNjZ.d.mts} +3 -3
- package/dist/TableRow.d.mts +1 -1
- package/dist/TableTH.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-Gut16-vY.d.mts → TableViewConfigurationDropdown-vYnU0d4k.d.mts} +3 -3
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-CALVwnrT.mjs → TechnicalSticker-B_JlBkXZ.mjs} +7 -7
- package/dist/TechnicalSticker-B_JlBkXZ.mjs.map +1 -0
- package/dist/TechnicalSticker.d.mts +1 -1
- package/dist/{Text-CSwFifQF.mjs → Text-D0vEReED.mjs} +3 -3
- package/dist/Text-D0vEReED.mjs.map +1 -0
- package/dist/{Text-RSzei6Se.d.mts → Text-SaoRBdB6.d.mts} +4 -4
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-CaIEBz8d.mjs → TextArea-Dro-HH8O.mjs} +4 -4
- package/dist/TextArea-Dro-HH8O.mjs.map +1 -0
- package/dist/{TextArea-DFn4XuG-.d.mts → TextArea-gtSlghjy.d.mts} +3 -3
- package/dist/TextArea.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-B0iYaPM1.d.mts → TextUnderlineTooltip-DV61avLv.d.mts} +3 -3
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +2 -2
- package/dist/Toast.d.mts +2 -2
- package/dist/{Toggle-xtPgGaGD.d.mts → Toggle-BlvrM-Cw.d.mts} +2 -2
- package/dist/{Toggle-BsqSNYok.mjs → Toggle-D9MzTIZs.mjs} +7 -7
- package/dist/Toggle-D9MzTIZs.mjs.map +1 -0
- package/dist/Toggle.d.mts +1 -1
- package/dist/{Tooltip-Blfhi2gT.d.mts → Tooltip-CysnLwST.d.mts} +3 -3
- package/dist/{Tooltip-B-0VRuKT.mjs → Tooltip-YViXzMdm.mjs} +7 -7
- package/dist/Tooltip-YViXzMdm.mjs.map +1 -0
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-BMQmveJG.d.mts → TruncatedText-YcjNG-zP.d.mts} +2 -2
- package/dist/VersionHistory.d.mts +2 -2
- package/dist/{VersionHistoryItem-BExp7oSr.d.mts → VersionHistoryItem-Px3ylMMq.d.mts} +2 -2
- package/dist/VersionHistoryItem.d.mts +1 -1
- package/dist/WizardModal.d.mts +3 -3
- package/dist/{accordionTitleTypography-PMKnfoy0.d.mts → accordionTitleTypography-Dlo2YyWd.d.mts} +3 -3
- package/dist/accordionTitleTypography.d.mts +1 -1
- package/dist/assertNever.d.mts +1 -1
- package/dist/chainTypes-aF5rWav-.d.mts +17 -0
- package/dist/{clientFilterUtils-D0Bwapen.d.mts → clientFilterUtils-DYKgw2Yq.d.mts} +3 -3
- package/dist/clientFilterUtils.d.mts +1 -1
- package/dist/{codec-KAvQRjTW.d.mts → codec-D8ZKFLgs.d.mts} +3 -3
- package/dist/codec.d.mts +1 -1
- package/dist/{color-C5B1pN1D.d.mts → color-Cy_0z4IY.d.mts} +3 -3
- package/dist/common.d.mts +1 -1
- package/dist/complete-typography.d.mts +7 -0
- package/dist/components/Accordion/index.d.mts +1 -1
- package/dist/components/Accordion/index.mjs +8 -8
- package/dist/components/Accordion/index.mjs.map +1 -1
- package/dist/components/Attribute/index.mjs +8 -8
- package/dist/components/Attribute/index.mjs.map +1 -1
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +3 -3
- package/dist/components/Banner/index.mjs.map +1 -1
- package/dist/components/BottomPanel/index.mjs +8 -8
- package/dist/components/BottomPanel/index.mjs.map +1 -1
- package/dist/components/Breadcrumbs/index.d.mts +1 -1
- package/dist/components/Breadcrumbs/index.mjs +1 -1
- package/dist/components/Button/index.d.mts +2 -2
- package/dist/components/Button/index.mjs +1 -1
- package/dist/components/ButtonGroup/index.mjs +5 -5
- package/dist/components/ButtonGroup/index.mjs.map +1 -1
- package/dist/components/Card/index.d.mts +2 -2
- package/dist/components/Card/index.mjs +1 -1
- package/dist/components/CardV2/index.d.mts +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/Checkbox/index.d.mts +1 -1
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/CodeHighlight/PrismWithLanguages.mjs +1 -1
- package/dist/components/CodeHighlight/PrismWithLanguages.mjs.map +1 -1
- package/dist/components/CodeHighlight/index.mjs +6 -6
- package/dist/components/CodeHighlight/index.mjs.map +1 -1
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +2 -2
- package/dist/components/DataTable/TableControls/index.d.mts +21 -21
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.d.mts +8 -8
- package/dist/components/DataTable/index.mjs +1 -1
- package/dist/components/DataTable/types.d.mts +1 -1
- package/dist/components/DatePicker/index.d.mts +5 -5
- package/dist/components/DatePicker/index.mjs +1 -1
- package/dist/components/DropdownButton/index.mjs +1 -1
- package/dist/components/DropdownMenu/index.d.mts +1 -1
- package/dist/components/DropdownMenu/index.mjs +1 -1
- package/dist/components/FloatingPanel/index.mjs +9 -9
- package/dist/components/FloatingPanel/index.mjs.map +1 -1
- package/dist/components/FormControl/index.d.mts +2 -2
- package/dist/components/FormControl/index.mjs +2 -2
- package/dist/components/FormField/index.d.mts +5 -5
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/Grid/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +11 -11
- package/dist/components/ImageTile/index.mjs.map +1 -1
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +2 -2
- package/dist/components/Input/index.mjs.map +1 -1
- package/dist/components/Link/index.mjs +1 -1
- package/dist/components/ListBox/index.d.mts +3 -3
- package/dist/components/ListBox/index.mjs +1 -1
- package/dist/components/LoadingShimmer/index.mjs +1 -1
- package/dist/components/MaskedInput/index.mjs +3 -3
- package/dist/components/MaskedInput/index.mjs.map +1 -1
- package/dist/components/MatchHighlight/index.mjs +2 -2
- package/dist/components/MatchHighlight/index.mjs.map +1 -1
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.d.mts +1 -1
- package/dist/components/Modal/index.mjs +1 -1
- package/dist/components/PageHeader/index.d.mts +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.d.mts +3 -3
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/ProgressBar/index.mjs +4 -4
- package/dist/components/ProgressBar/index.mjs.map +1 -1
- package/dist/components/ProgressIndicator/index.d.mts +1 -1
- package/dist/components/ProgressIndicator/index.mjs +1 -1
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.d.mts +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/RichTextEditor/index.d.mts +5 -0
- package/dist/components/RichTextEditor/index.mjs +1050 -0
- package/dist/components/RichTextEditor/index.mjs.map +1 -0
- package/dist/components/RightPanel/index.mjs +9 -9
- package/dist/components/RightPanel/index.mjs.map +1 -1
- package/dist/components/SegmentedControl/index.d.mts +1 -1
- package/dist/components/SegmentedControl/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/SelectionCard/index.mjs +9 -9
- package/dist/components/SelectionCard/index.mjs.map +1 -1
- package/dist/components/Slider/index.mjs +6 -6
- package/dist/components/Slider/index.mjs.map +1 -1
- package/dist/components/SmartTextInput/PillType.d.mts +1 -1
- package/dist/components/SmartTextInput/PillType.mjs +2 -2
- package/dist/components/SmartTextInput/PillType.mjs.map +1 -1
- package/dist/components/SmartTextInput/index.d.mts +2 -2
- package/dist/components/SmartTextInput/index.mjs +25 -25
- package/dist/components/SmartTextInput/index.mjs.map +1 -1
- package/dist/components/SmartTextInput/parser/method-chain/parser.mjs +1 -1
- package/dist/components/SmartTextInput/parser/method-chain/types.d.mts +1 -1
- package/dist/components/SmartTextInput/parser/method-chain/types.mjs +1 -1
- package/dist/components/SmartTextInput/parser/method-chain/types.mjs.map +1 -1
- package/dist/components/SmartTextInput/parser/smart-text/parser.mjs +2 -2
- package/dist/components/SmartTextInput/parser/smart-text/parser.mjs.map +1 -1
- package/dist/components/SmartTextInput/parser/smart-text/types.d.mts +2 -2
- package/dist/components/SmartTextInput/parser/smart-text/types.mjs +1 -1
- package/dist/components/SmartTextInput/parser/smart-text/types.mjs.map +1 -1
- package/dist/components/Spacer/index.mjs +1 -1
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/Stack/index.mjs +1 -1
- package/dist/components/StatusIndicator/index.mjs +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/SwatchPicker/index.mjs +2 -2
- package/dist/components/SwatchPicker/index.mjs.map +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +8 -8
- package/dist/components/Table/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +2 -2
- package/dist/components/TableBox/index.mjs +1 -1
- package/dist/components/TechnicalSticker/index.mjs +1 -1
- package/dist/components/Text/index.d.mts +1 -1
- package/dist/components/Text/index.mjs +1 -1
- package/dist/components/TextArea/index.d.mts +1 -1
- package/dist/components/TextArea/index.mjs +1 -1
- package/dist/components/Tile/index.mjs +6 -6
- package/dist/components/Tile/index.mjs.map +1 -1
- package/dist/components/Toast/index.mjs +3 -3
- package/dist/components/Toast/index.mjs.map +1 -1
- package/dist/components/Toggle/index.d.mts +1 -1
- package/dist/components/Toggle/index.mjs +1 -1
- package/dist/components/Tooltip/index.d.mts +3 -3
- package/dist/components/Tooltip/index.mjs +1 -1
- package/dist/components/VersionHistory/index.d.mts +1 -1
- package/dist/components/VersionHistory/index.mjs +12 -12
- package/dist/components/VersionHistory/index.mjs.map +1 -1
- package/dist/compound-expression.d.mts +2 -2
- package/dist/{constants-4rSh8e5G.d.mts → constants-CW1DRgwi.d.mts} +2 -2
- package/dist/{constants-BaMvTUbS.d.mts → constants-D1hoZ5LO.d.mts} +2 -2
- package/dist/constants.d.mts +1 -1
- package/dist/constants2.d.mts +1 -1
- package/dist/containers.d.mts +1 -1
- package/dist/createPath-C4ZFkt93.d.mts +7 -0
- package/dist/createPath.d.mts +1 -1
- package/dist/{date-filter-D0ys8s0D.mjs → date-filter-Bj4XkwkT.mjs} +3 -3
- package/dist/date-filter-Bj4XkwkT.mjs.map +1 -0
- package/dist/{date-range-rule-value-Dk6pZHnD.d.mts → date-range-rule-value-CrVBpQcf.d.mts} +3 -3
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/{date-rule-intent-C5C8HB1v.d.mts → date-rule-intent-C1aptAoX.d.mts} +4 -4
- package/dist/date-rule-intent.d.mts +1 -1
- package/dist/display.d.mts +3 -3
- package/dist/fieldPickerOptions.d.mts +3 -3
- package/dist/{filter-size-context-5xQ3ycnC.d.mts → filter-size-context-CbT4pi3S.d.mts} +3 -3
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/{filters-C8YLLbH3.d.mts → filters-DjXkx8GJ.d.mts} +3 -3
- package/dist/filters.d.mts +1 -1
- package/dist/format-date-value.d.mts +1 -1
- package/dist/{formatDateTime-Dd9inM5H.d.mts → formatDateTime-BikGGrvq.d.mts} +2 -2
- package/dist/formatDateTime.d.mts +1 -1
- package/dist/{helpers-DvqDI2e5.d.mts → helpers-CdxEL7ri.d.mts} +5 -5
- package/dist/helpers.d.mts +1 -1
- package/dist/{i18n-BscB9FUy.mjs → i18n-BLyCaSdJ.mjs} +4 -4
- package/dist/i18n-BLyCaSdJ.mjs.map +1 -0
- package/dist/index-BWAycP6L.d.mts +4025 -0
- package/dist/{index-EGvEhP1j.d.mts → index-D2YFHdsf.d.mts} +3 -3
- package/dist/{index-CNDe1Lij.d.mts → index-DX5Zu9JU.d.mts} +4 -4
- package/dist/index-FgIOTuJ4.d.mts +7 -0
- package/dist/index.d.mts +1 -2
- package/dist/index2.d.mts +2 -2
- package/dist/index3.d.mts +2 -4
- package/dist/index4.d.mts +4 -2
- package/dist/index5.d.mts +2 -15
- package/dist/index6.d.mts +15 -1
- package/dist/{input-CKhARTlS.d.mts → input-gtTnb9M8.d.mts} +4 -4
- package/dist/{inputFields-BZcm1UV5.d.mts → inputFields-CYttsz5M.d.mts} +12 -12
- package/dist/inputFields.d.mts +1 -1
- package/dist/{intersperse-ObkRVOag.mjs → intersperse-DvJsBw5D.mjs} +2 -2
- package/dist/intersperse-DvJsBw5D.mjs.map +1 -0
- package/dist/intersperse.d.mts +1 -1
- package/dist/{jsonSchema-DmOA0Lnu.d.mts → jsonSchema-DUkfAip_.d.mts} +3 -3
- package/dist/lib/ConfigContext.d.mts +1 -1
- package/dist/lib/ConfigContext.mjs +1 -1
- package/dist/lib/ConfigContext.mjs.map +1 -1
- package/dist/lib/GlobalStyles.d.mts +1 -1
- package/dist/lib/GlobalStyles.mjs +2 -2
- package/dist/lib/GlobalStyles.mjs.map +1 -1
- package/dist/lib/HeadlessAriaButton.d.mts +1 -1
- package/dist/lib/HeadlessAriaButton.mjs +2 -2
- package/dist/lib/HeadlessAriaButton.mjs.map +1 -1
- package/dist/lib/MiddleTruncatedText.d.mts +1 -1
- package/dist/lib/MiddleTruncatedText.mjs +1 -1
- package/dist/lib/PDSProvider.d.mts +4 -4
- package/dist/lib/PDSProvider.mjs +4 -4
- package/dist/lib/PDSProvider.mjs.map +1 -1
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedText.mjs +2 -2
- package/dist/lib/TruncatedText.mjs.map +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +2 -2
- package/dist/lib/TruncatedTextWithTooltip.mjs +2 -2
- package/dist/lib/TruncatedTextWithTooltip.mjs.map +1 -1
- package/dist/lib/chainTypes.d.mts +1 -1
- package/dist/lib/color.d.mts +1 -1
- package/dist/lib/color.mjs +1 -1
- package/dist/lib/color.mjs.map +1 -1
- package/dist/lib/colorMode.d.mts +3 -3
- package/dist/lib/colorMode.mjs +2 -2
- package/dist/lib/colorMode.mjs.map +1 -1
- package/dist/lib/comboboxHelper.d.mts +1 -1
- package/dist/lib/comboboxHelper.mjs +1 -1
- package/dist/lib/comboboxHelper.mjs.map +1 -1
- package/dist/lib/copyTextToClipboard.d.mts +1 -1
- package/dist/lib/copyTextToClipboard.mjs +1 -1
- package/dist/lib/copyTextToClipboard.mjs.map +1 -1
- package/dist/lib/customFunctionSchema.d.mts +2 -2
- package/dist/lib/customFunctionSchema.mjs +1 -1
- package/dist/lib/customFunctionSchema.mjs.map +1 -1
- package/dist/lib/date-filter/index.d.mts +2 -2
- package/dist/lib/date-filter/index.mjs +1 -1
- package/dist/lib/datePickerHelper.d.mts +1 -1
- package/dist/lib/datePickerHelper.mjs +1 -1
- package/dist/lib/datePickerHelper.mjs.map +1 -1
- package/dist/lib/embeddedSurfaceProtocol.d.mts +1 -1
- package/dist/lib/embeddedSurfaceProtocol.mjs +1 -1
- package/dist/lib/embeddedSurfaceProtocol.mjs.map +1 -1
- package/dist/lib/embeddedSurfaceRegistry.d.mts +1 -1
- package/dist/lib/embeddedSurfaceRegistry.mjs +1 -1
- package/dist/lib/embeddedSurfaceRegistry.mjs.map +1 -1
- package/dist/lib/errorReporter.d.mts +1 -1
- package/dist/lib/errorReporter.mjs +1 -1
- package/dist/lib/errorReporter.mjs.map +1 -1
- package/dist/lib/i18n/index.d.mts +3 -3
- package/dist/lib/i18n/index.mjs +1 -1
- package/dist/lib/jsonSchema.d.mts +1 -1
- package/dist/lib/jsonSchema.mjs +1 -1
- package/dist/lib/jsonSchema.mjs.map +1 -1
- package/dist/lib/jsonSchemaType.d.mts +2 -2
- package/dist/lib/jsonSchemaType.mjs +1 -1
- package/dist/lib/jsonSchemaType.mjs.map +1 -1
- package/dist/lib/letPointerDownReachDocument.d.mts +1 -1
- package/dist/lib/letPointerDownReachDocument.mjs +1 -1
- package/dist/lib/letPointerDownReachDocument.mjs.map +1 -1
- package/dist/lib/message.d.mts +1 -1
- package/dist/lib/message.mjs +1 -1
- package/dist/lib/message.mjs.map +1 -1
- package/dist/lib/methodChain.d.mts +2 -2
- package/dist/lib/methodChain.mjs +1 -1
- package/dist/lib/methodChainNormalize.d.mts +3 -3
- package/dist/lib/methodChainNormalize.mjs +1 -1
- package/dist/lib/methodChainNormalize.mjs.map +1 -1
- package/dist/lib/methodChainTypes.d.mts +1 -1
- package/dist/lib/objectSchemaTypes.d.mts +1 -1
- package/dist/lib/platformObject.d.mts +2 -2
- package/dist/lib/platformObject.mjs +1 -1
- package/dist/lib/platformObject.mjs.map +1 -1
- package/dist/lib/pseudoClass.d.mts +2 -2
- package/dist/lib/pseudoClass.mjs +1 -1
- package/dist/lib/pseudoClass.mjs.map +1 -1
- package/dist/lib/reorderItems.d.mts +1 -1
- package/dist/lib/reorderItems.mjs +1 -1
- package/dist/lib/reorderItems.mjs.map +1 -1
- package/dist/lib/router/adapters/reactRouter.d.mts +2 -2
- package/dist/lib/router/adapters/reactRouter.mjs +2 -2
- package/dist/lib/router/adapters/reactRouter.mjs.map +1 -1
- package/dist/lib/router/adapters/tanstack.d.mts +2 -2
- package/dist/lib/router/adapters/tanstack.mjs +2 -2
- package/dist/lib/router/adapters/tanstack.mjs.map +1 -1
- package/dist/lib/router/index.d.mts +5 -5
- package/dist/lib/router/index.mjs +2 -2
- package/dist/lib/schemaOptions.d.mts +1 -1
- package/dist/lib/schemaOptions.mjs +2 -2
- package/dist/lib/schemaOptions.mjs.map +1 -1
- package/dist/lib/selectHelper.d.mts +1 -1
- package/dist/lib/selectHelper.mjs +1 -1
- package/dist/lib/selectHelper.mjs.map +1 -1
- package/dist/lib/semanticColor.d.mts +1 -1
- package/dist/lib/semanticColor.mjs +1 -1
- package/dist/lib/semanticColor.mjs.map +1 -1
- package/dist/lib/snakifyPath.d.mts +1 -1
- package/dist/lib/snakifyPath.mjs +1 -1
- package/dist/lib/snakifyPath.mjs.map +1 -1
- package/dist/lib/useChain.d.mts +1 -1
- package/dist/lib/useChain.mjs +1 -1
- package/dist/lib/useControlled.d.mts +1 -1
- package/dist/lib/useControlled.mjs +1 -1
- package/dist/lib/useControlled.mjs.map +1 -1
- package/dist/lib/useEmbeddedSurface.d.mts +1 -1
- package/dist/lib/useEmbeddedSurface.mjs +1 -1
- package/dist/lib/useEmbeddedSurface.mjs.map +1 -1
- package/dist/lib/useIsOverflow.d.mts +1 -1
- package/dist/lib/useIsOverflow.mjs +1 -1
- package/dist/lib/useIsOverflow.mjs.map +1 -1
- package/dist/lib/useModalInsetRight.d.mts +1 -1
- package/dist/lib/useModalInsetRight.mjs +1 -1
- package/dist/lib/useModalInsetRight.mjs.map +1 -1
- package/dist/lib/useOutsideClick.d.mts +1 -1
- package/dist/lib/useOutsideClick.mjs +1 -1
- package/dist/lib/useOutsideClick.mjs.map +1 -1
- package/dist/lib/useResizablePanel.d.mts +1 -1
- package/dist/lib/useResizablePanel.mjs +1 -1
- package/dist/lib/useResizablePanel.mjs.map +1 -1
- package/dist/lib/useScrollOverflow.d.mts +1 -1
- package/dist/lib/useScrollOverflow.mjs +1 -1
- package/dist/lib/useScrollOverflow.mjs.map +1 -1
- package/dist/lib/zindex.d.mts +1 -1
- package/dist/lib/zindex.mjs +1 -1
- package/dist/lib/zindex.mjs.map +1 -1
- package/dist/lint/index.d.mts +11 -0
- package/dist/lint/index.mjs +399 -0
- package/dist/lint/index.mjs.map +1 -0
- package/dist/lint/recommended.json +10 -0
- package/dist/{listbox-options-DCmqWWgy.d.mts → listbox-options-CkwENvff.d.mts} +4 -4
- package/dist/listbox-options.d.mts +1 -1
- package/dist/markdownUtils.d.mts +23 -0
- package/dist/{message-Dti22dmx.d.mts → message-klSuXfNN.d.mts} +2 -2
- package/dist/{methodChain-DaDvXsHF.d.mts → methodChain-CRYRDa1k.d.mts} +6 -6
- package/dist/{methodChain-xZ1_vhbz.mjs → methodChain-LVNHiGPB.mjs} +4 -4
- package/dist/methodChain-LVNHiGPB.mjs.map +1 -0
- package/dist/{methodChainTypes-a7kHYhs7.d.mts → methodChainTypes-BtbYWrdP.d.mts} +3 -3
- package/dist/middleTruncateText.d.mts +1 -1
- package/dist/min-copy-size.d.mts +7 -0
- package/dist/mixins/focus.d.mts +2 -2
- package/dist/mixins/focus.mjs +2 -2
- package/dist/mixins/focus.mjs.map +1 -1
- package/dist/mixins/hoverable.d.mts +3 -3
- package/dist/mixins/hoverable.mjs +2 -2
- package/dist/mixins/hoverable.mjs.map +1 -1
- package/dist/mixins/input.d.mts +1 -1
- package/dist/mixins/input.mjs +2 -2
- package/dist/mixins/input.mjs.map +1 -1
- package/dist/mixins/menuItem.d.mts +3 -3
- package/dist/mixins/menuItem.mjs +2 -2
- package/dist/mixins/menuItem.mjs.map +1 -1
- package/dist/mixins/print/index.d.mts +1 -1
- package/dist/mixins/print/index.mjs +2 -2
- package/dist/mixins/print/index.mjs.map +1 -1
- package/dist/mixins/scrollbar.d.mts +2 -2
- package/dist/mixins/scrollbar.mjs +2 -2
- package/dist/mixins/scrollbar.mjs.map +1 -1
- package/dist/mixins/text.d.mts +1 -1
- package/dist/mixins/text.mjs +6 -2
- package/dist/mixins/text.mjs.map +1 -1
- package/dist/navigationEvents.d.mts +1 -1
- package/dist/no-raw-table.d.mts +7 -0
- package/dist/{operators-Seez5p9U.d.mts → operators-gCG7uZ6y.d.mts} +4 -4
- package/dist/operators.d.mts +1 -1
- package/dist/{palette-Bp5G-S_5.d.mts → palette-C1gBbxLO.d.mts} +4 -4
- package/dist/palette.d.mts +1 -1
- package/dist/{parser-BeTiVjRs.mjs → parser-BQ2aDi7S.mjs} +2 -2
- package/dist/parser-BQ2aDi7S.mjs.map +1 -0
- package/dist/patterns/CardGrouping/index.mjs +11 -11
- package/dist/patterns/CardGrouping/index.mjs.map +1 -1
- package/dist/patterns/IndexTableLayout/index.mjs +6 -6
- package/dist/patterns/IndexTableLayout/index.mjs.map +1 -1
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +8 -8
- package/dist/patterns/LayoutLoadingShimmer/index.mjs.map +1 -1
- package/dist/patterns/LayoutLoadingSpinner/index.mjs +2 -2
- package/dist/patterns/LayoutLoadingSpinner/index.mjs.map +1 -1
- package/dist/patterns/PageLayout/index.d.mts +4 -4
- package/dist/patterns/PageLayout/index.mjs +1 -1
- package/dist/patterns/WizardModal/index.mjs +7 -7
- package/dist/patterns/WizardModal/index.mjs.map +1 -1
- package/dist/positioning.d.mts +1 -1
- package/dist/reactRouterFallback.d.mts +2 -2
- package/dist/reduced-motion.d.mts +7 -0
- package/dist/relative-date-label.d.mts +2 -2
- package/dist/{router-COrZcVkf.mjs → router-BxmA940v.mjs} +7 -7
- package/dist/router-BxmA940v.mjs.map +1 -0
- package/dist/safe-parse.d.mts +3 -3
- package/dist/{schemaOptions-BQgLOgtD.d.mts → schemaOptions-C_JM2-sg.d.mts} +4 -4
- package/dist/scrollExpandedItemIntoView.d.mts +1 -1
- package/dist/{semantic-DjKvtUi8.d.mts → semantic-BLaQSW1r.d.mts} +2 -2
- package/dist/semantic-color.d.mts +7 -0
- package/dist/{semanticColor-CmGmGRj8.d.mts → semanticColor-Bxufk3ZO.d.mts} +4 -4
- package/dist/shared.d.mts +30 -0
- package/dist/{strings-FWNWdSn1.d.mts → strings-CK9n6b65.d.mts} +2 -2
- package/dist/strings.d.mts +1 -1
- package/dist/{styledComponentsInterop-NxwFjeA4.mjs → styledComponentsInterop-Cs5CCPRy.mjs} +2 -2
- package/dist/styledComponentsInterop-Cs5CCPRy.mjs.map +1 -0
- package/dist/styles.d.mts +8 -0
- package/dist/tableBoxKeyboardNavigation.d.mts +1 -1
- package/dist/{text-BNfECpa5.d.mts → text-Csytfclh.d.mts} +3 -3
- package/dist/{theme-VNhXxAF3.d.mts → theme-mQ4WkH90.d.mts} +4 -4
- package/dist/theme.d.mts +1 -1
- package/dist/theme.mjs +1 -1
- package/dist/theme.mjs.map +1 -1
- package/dist/time-range.d.mts +1 -1
- package/dist/tone.d.mts +4 -4
- package/dist/tree.d.mts +2 -2
- package/dist/{types-CFe4tA8Q.d.mts → types-6L0ptM6-.d.mts} +2 -2
- package/dist/{types-SOkNtcBq.d.mts → types-B4KbdEDc.d.mts} +3 -3
- package/dist/{types-Kmnood9Y.d.mts → types-C2RhHxbE.d.mts} +2 -2
- package/dist/{types-Ci-KTHfu.d.mts → types-CayYd8EX.d.mts} +4 -4
- package/dist/{types-SYxBPX6o.d.mts → types-DJobO07d.d.mts} +4 -4
- package/dist/{types-EodOhsjw.d.mts → types-DbOD5vE_.d.mts} +3 -3
- package/dist/{types-HxiGiwQN.d.mts → types-Dhz6VMKx.d.mts} +2 -2
- package/dist/{types-DWU0Dmy9.d.mts → types-XjJqUj-p.d.mts} +5 -5
- package/dist/{types-DfpVVjso.d.mts → types-dmItSshr.d.mts} +3 -3
- package/dist/{types-39QvBZuZ.d.mts → types-rDQg74j-.d.mts} +2 -2
- package/dist/types.d.mts +1 -1
- package/dist/types2.d.mts +1 -1
- package/dist/types3.d.mts +1 -1
- package/dist/types4.d.mts +1 -1
- package/dist/types5.d.mts +1 -1
- package/dist/types6.d.mts +1 -1
- package/dist/types7.d.mts +14 -2
- package/dist/types8.d.mts +2 -0
- package/dist/{url-state-CwaRVyXR.d.mts → url-state-CmgyDnG7.d.mts} +3 -3
- package/dist/url-state.d.mts +1 -1
- package/dist/use-rules-popover-selection.d.mts +1 -1
- package/dist/{useChain-DXkKKe-J.d.mts → useChain-7ztbfujM.d.mts} +7 -7
- package/dist/{useChain-Cu4KDfFk.mjs → useChain-D1aNsdvn.mjs} +4 -4
- package/dist/useChain-D1aNsdvn.mjs.map +1 -0
- package/dist/useChainAtCursor.d.mts +7 -7
- package/dist/useCodeChainFunctionPanel.d.mts +2 -2
- package/dist/useColumnConfiguration.d.mts +3 -3
- package/dist/useColumnWidthLock.d.mts +1 -1
- package/dist/useComboboxFooterAction.d.mts +2 -2
- package/dist/useDelayedInlineEditError.d.mts +1 -1
- package/dist/{useFilterStateV2-Bzo27PR-.d.mts → useFilterStateV2-CPBt0qwc.d.mts} +4 -4
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-Ba8rh1CH.d.mts → useFormField-CmEJCqse.d.mts} +3 -3
- package/dist/{useFormField-CbNYbDdp.mjs → useFormField-pOVkb5BK.mjs} +3 -3
- package/dist/useFormField-pOVkb5BK.mjs.map +1 -0
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useFormGroup-CsKC93Pt.mjs → useFormGroup-DSQkoWLh.mjs} +2 -2
- package/dist/useFormGroup-DSQkoWLh.mjs.map +1 -0
- package/dist/useFormGroup.d.mts +1 -1
- package/dist/useLocationPathname-Cnqj8pf4.d.mts +5 -0
- package/dist/useLocationPathname.d.mts +1 -1
- package/dist/{useTableBoxDragAndDrop-CKPIY98e.d.mts → useTableBoxDragAndDrop-8NS4JBuI.d.mts} +2 -2
- package/dist/useTableBoxDragAndDrop.d.mts +1 -1
- package/dist/{useTableColumns-PyxNyTD6.d.mts → useTableColumns-BK-KYY0L.d.mts} +3 -3
- package/dist/useTableColumns.d.mts +1 -1
- package/dist/{useToggle-DRzCDqrc.mjs → useToggle-1z8JE7Ym.mjs} +2 -2
- package/dist/useToggle-1z8JE7Ym.mjs.map +1 -0
- package/dist/useToggle.d.mts +1 -1
- package/dist/useTruncation.d.mts +2 -2
- package/dist/{utilities-BrEUGFGq.d.mts → utilities-CXoc5Cyr.d.mts} +2 -2
- package/dist/utilities.d.mts +1 -1
- package/dist/utils/storybook.mjs +2 -2
- package/dist/utils/storybook.mjs.map +1 -1
- package/dist/utils/testing.d.mts +2 -2
- package/dist/utils/testing.mjs +1 -1
- package/dist/utils/testing.mjs.map +1 -1
- package/dist/utils.d.mts +2 -2
- package/dist/utils2.d.mts +1 -1
- package/dist/utils3.d.mts +1 -1
- package/dist/utils4.d.mts +6 -6
- package/dist/{validation-D6NPueNk.d.mts → validation-BaqPVG1C.d.mts} +4 -4
- package/dist/validation.d.mts +1 -1
- package/dist/validation2.d.mts +5 -5
- package/dist/{value-control-resolver-C-UrXVlB.d.mts → value-control-resolver-CMyFwEY7.d.mts} +3 -3
- package/dist/value-control-resolver.d.mts +1 -1
- package/dist/variables/color.d.mts +1 -1
- package/dist/variables/color.mjs +1 -1
- package/dist/variables/color.mjs.map +1 -1
- package/dist/variables/effect.d.mts +2 -2
- package/dist/variables/effect.mjs +1 -1
- package/dist/variables/effect.mjs.map +1 -1
- package/dist/variables/keyframes.d.mts +1 -1
- package/dist/variables/keyframes.mjs +2 -2
- package/dist/variables/keyframes.mjs.map +1 -1
- package/dist/variables/semantic.d.mts +1 -1
- package/dist/variables/semantic.mjs +1 -1
- package/dist/variables/semantic.mjs.map +1 -1
- package/dist/variables/spacing.d.mts +1 -1
- package/dist/variables/spacing.mjs +1 -1
- package/dist/variables/spacing.mjs.map +1 -1
- package/dist/variables/text.d.mts +1 -1
- package/dist/variables/text.mjs +1 -1
- package/dist/variables/text.mjs.map +1 -1
- package/dist/variables/transitions.d.mts +1 -1
- package/dist/variables/transitions.mjs +1 -1
- package/dist/variables/transitions.mjs.map +1 -1
- package/llms.txt +2 -2
- package/package.json +32 -8
- package/skills/design-system-component-authoring/SKILL.md +4 -4
- package/skills/design-system-component-authoring/component-conventions.md +2 -2
- package/skills/new-screen/SKILL.md +56 -0
- package/skills/ui-authoring/COMPONENTS.md +2 -1
- package/skills/ui-authoring/SKILL.md +5 -3
- package/skills/ui-authoring/STANDARD.md +65 -50
- package/dist/Badge-Bvn3afds.mjs.map +0 -1
- package/dist/Breadcrumbs-CQUe9VTM.mjs.map +0 -1
- package/dist/Card-BXNxWX5C.mjs.map +0 -1
- package/dist/CardV2-Dp4eHSE-.mjs.map +0 -1
- package/dist/Checkbox-BaJ-dGdX.mjs.map +0 -1
- package/dist/Combobox-CBM-oY-e.mjs.map +0 -1
- package/dist/ConfigFormGroup-CidT_cE9.mjs.map +0 -1
- package/dist/DataTable-DQ8axNfo.mjs.map +0 -1
- package/dist/DatePicker-D0cvVbzq.mjs.map +0 -1
- package/dist/DropdownButton-5oNcpsOq.mjs.map +0 -1
- package/dist/DropdownMenu-CedsmO5h.mjs.map +0 -1
- package/dist/FormControl-C4CiA0H-.mjs.map +0 -1
- package/dist/FormField-C0cd1zVd.mjs.map +0 -1
- package/dist/Grid-DXVkhyNQ.mjs.map +0 -1
- package/dist/HoverCopyableField-D-BubaRd.mjs.map +0 -1
- package/dist/IconButton-HWx5Hlmi.mjs.map +0 -1
- package/dist/Input-Dap055xf.mjs.map +0 -1
- package/dist/Link-Cf__H8gD.mjs.map +0 -1
- package/dist/ListBox-eoyBHtnJ.mjs.map +0 -1
- package/dist/LoadingShimmer-Bqjdut7i.mjs.map +0 -1
- package/dist/Menu-Dw6Rcpk6.mjs.map +0 -1
- package/dist/MiddleTruncatedText-DoTyfMem.mjs.map +0 -1
- package/dist/Modal-kjUptzg1.mjs.map +0 -1
- package/dist/PageHeader-DJF7nxgN.mjs.map +0 -1
- package/dist/PageLayout-fXJW7daI.mjs.map +0 -1
- package/dist/Pagination-DtK-jbEY.mjs.map +0 -1
- package/dist/Pii-DueIK287.mjs.map +0 -1
- package/dist/Popover-BcII7usF.mjs.map +0 -1
- package/dist/ProgressIndicator-CM37EU1B.mjs.map +0 -1
- package/dist/Radio-BstZg3DI.mjs.map +0 -1
- package/dist/RadioGroup-erKerwSt.mjs.map +0 -1
- package/dist/RouterContext-nPSb55p9.mjs.map +0 -1
- package/dist/SegmentedControl-DQjIO6iX.mjs.map +0 -1
- package/dist/Select-BJ9ACmRD.mjs.map +0 -1
- package/dist/Spacer-J_HuhxX2.mjs.map +0 -1
- package/dist/Spinner-7Camx1vs.mjs.map +0 -1
- package/dist/Stack-BkC7FCdF.mjs.map +0 -1
- package/dist/StatusIndicator-Bunn9YLV.mjs.map +0 -1
- package/dist/Sticker-yhxtIYH8.mjs.map +0 -1
- package/dist/TabBar-SX8E9-Bk.mjs.map +0 -1
- package/dist/Table-BIDaC0uS.mjs.map +0 -1
- package/dist/TableBox-Bn_XZEYd.mjs.map +0 -1
- package/dist/TableControls-qxoq5abn.mjs.map +0 -1
- package/dist/TechnicalSticker-CALVwnrT.mjs.map +0 -1
- package/dist/Text-CSwFifQF.mjs.map +0 -1
- package/dist/TextArea-CaIEBz8d.mjs.map +0 -1
- package/dist/Toggle-BsqSNYok.mjs.map +0 -1
- package/dist/Tooltip-B-0VRuKT.mjs.map +0 -1
- package/dist/chainTypes-Cjp0zZ4E.d.mts +0 -17
- package/dist/createPath-B_CLq82C.d.mts +0 -7
- package/dist/date-filter-D0ys8s0D.mjs.map +0 -1
- package/dist/i18n-BscB9FUy.mjs.map +0 -1
- package/dist/index-DTAcGzW4.d.mts +0 -7
- package/dist/intersperse-ObkRVOag.mjs.map +0 -1
- package/dist/methodChain-xZ1_vhbz.mjs.map +0 -1
- package/dist/parser-BeTiVjRs.mjs.map +0 -1
- package/dist/router-COrZcVkf.mjs.map +0 -1
- package/dist/styledComponentsInterop-NxwFjeA4.mjs.map +0 -1
- package/dist/useChain-Cu4KDfFk.mjs.map +0 -1
- package/dist/useFormField-CbNYbDdp.mjs.map +0 -1
- package/dist/useFormGroup-CsKC93Pt.mjs.map +0 -1
- package/dist/useLocationPathname-OsvI7mH5.d.mts +0 -5
- package/dist/useToggle-DRzCDqrc.mjs.map +0 -1
- package/skills/ui-authoring/lanes.json +0 -22
- /package/dist/{index-BOaE2xDE.d.mts → index-Bq9Ub6MB.d.mts} +0 -0
|
@@ -0,0 +1,1050 @@
|
|
|
1
|
+
import { a as styled, n as createGlobalStyle, r as css } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
|
+
import { semanticColor, semanticOnly, semanticTokens } from "../../lib/semanticColor.mjs";
|
|
3
|
+
import { t as Card_default } from "../../Card-DuQHyroh.mjs";
|
|
4
|
+
import { t as useToggle } from "../../useToggle-1z8JE7Ym.mjs";
|
|
5
|
+
import "../../variables/transitions.mjs";
|
|
6
|
+
import { withAlpha } from "../../lib/color.mjs";
|
|
7
|
+
import { useOutsideClick } from "../../lib/useOutsideClick.mjs";
|
|
8
|
+
import { Z_INDICES } from "../../lib/zindex.mjs";
|
|
9
|
+
import { focusWithinOutline } from "../../mixins/focus.mjs";
|
|
10
|
+
import "../../variables/effect.mjs";
|
|
11
|
+
import { n as Stack, t as HStack } from "../../Stack-Bzom2BTR.mjs";
|
|
12
|
+
import { n as Button, t as IconButton } from "../../IconButton-DftINsp7.mjs";
|
|
13
|
+
import { t as intersperse } from "../../intersperse-DvJsBw5D.mjs";
|
|
14
|
+
import Input_default from "../Input/index.mjs";
|
|
15
|
+
import { n as DropdownMenu_default } from "../../DropdownMenu-Q8S-9rXm.mjs";
|
|
16
|
+
import { s as Popover_default } from "../../Popover-DordjYNM.mjs";
|
|
17
|
+
import { d as TextField } from "../../FormField-g1zQFM9T.mjs";
|
|
18
|
+
import { Fragment, useCallback, useEffect, useRef, useState } from "react";
|
|
19
|
+
import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
|
|
20
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
import { BoldIcon, CapitalizeIcon, CaretDownIcon, CheckIcon, GridIcon, ItalicIcon, LinkIcon, ListIcon, ListNumbersIcon, RotateCcwIcon, RotateCwIcon, UnlinkIcon, XIcon } from "@persona/icons";
|
|
22
|
+
import { noop } from "lodash-es";
|
|
23
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
24
|
+
import Link from "@tiptap/extension-link";
|
|
25
|
+
import Table from "@tiptap/extension-table";
|
|
26
|
+
import TableCell from "@tiptap/extension-table-cell";
|
|
27
|
+
import TableHeader from "@tiptap/extension-table-header";
|
|
28
|
+
import TableRow from "@tiptap/extension-table-row";
|
|
29
|
+
import { BubbleMenu, EditorContent, useEditor } from "@tiptap/react";
|
|
30
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
31
|
+
import dompurify from "dompurify";
|
|
32
|
+
import { Markdown } from "tiptap-markdown";
|
|
33
|
+
//#region src/components/RichTextEditor/FloatingToolbar.tsx
|
|
34
|
+
const BubbleMenuBar = styled(Stack)`
|
|
35
|
+
padding: ${Spacing[1]} ${Spacing[2]};
|
|
36
|
+
background-color: ${Color.CoreSlate1100};
|
|
37
|
+
border-radius: ${BorderRadius.Lg};
|
|
38
|
+
`;
|
|
39
|
+
const IconContainer = styled(motion.div)`
|
|
40
|
+
display: flex;
|
|
41
|
+
gap: ${Spacing[1]};
|
|
42
|
+
`;
|
|
43
|
+
const InverseIconButton = styled(IconButton)`
|
|
44
|
+
background-color: ${({ $selected }) => $selected ? Color.CoreSlate900 : "transparent"};
|
|
45
|
+
color: ${Color.PrimaryWhite};
|
|
46
|
+
transition: background-color ${"100ms"} ease-out;
|
|
47
|
+
|
|
48
|
+
&:hover:not(:disabled) {
|
|
49
|
+
background-color: ${Color.CoreSlate800};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:disabled {
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
opacity: 0.35;
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
const InverseInput = styled(Input_default)`
|
|
58
|
+
background-color: ${Color.CoreSlate900};
|
|
59
|
+
color: ${Color.PrimaryWhite};
|
|
60
|
+
|
|
61
|
+
:focus-within {
|
|
62
|
+
border-color: ${Color.CoreBlue700};
|
|
63
|
+
}
|
|
64
|
+
::placeholder {
|
|
65
|
+
color: ${Color.TextDisabled};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
input {
|
|
69
|
+
background-color: ${Color.CoreSlate900};
|
|
70
|
+
color: ${Color.PrimaryWhite};
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
const StyledDropdownItem$1 = styled(DropdownMenu_default.Item)`
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 30px;
|
|
76
|
+
font-size: small;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
text-overflow: ellipsis;
|
|
80
|
+
`;
|
|
81
|
+
const TOOLBAR_GAP = parseInt(Spacing[1]);
|
|
82
|
+
const FIELD_OFFSET = [0, TOOLBAR_GAP];
|
|
83
|
+
const SELECTION_OFFSET = [-parseInt(Spacing[2]), TOOLBAR_GAP];
|
|
84
|
+
const SAFE_LINK_SCHEME = /^(https?|mailto|tel):/i;
|
|
85
|
+
const URI_SCHEME = /^[a-zA-Z][a-zA-Z0-9+.-]*:/;
|
|
86
|
+
const ensureProtocol = (url) => {
|
|
87
|
+
const trimmedUrl = url.trim();
|
|
88
|
+
if (!trimmedUrl) return "";
|
|
89
|
+
if (trimmedUrl.includes("{{")) {
|
|
90
|
+
const beforePlaceholder = trimmedUrl.slice(0, trimmedUrl.indexOf("{{")).replace(/[\u0000-\u0020]/g, "");
|
|
91
|
+
if (!URI_SCHEME.test(beforePlaceholder) || SAFE_LINK_SCHEME.test(beforePlaceholder)) return trimmedUrl;
|
|
92
|
+
return "";
|
|
93
|
+
}
|
|
94
|
+
const candidate = SAFE_LINK_SCHEME.test(trimmedUrl) ? trimmedUrl : `https://${trimmedUrl}`;
|
|
95
|
+
return URL.canParse(candidate) ? candidate : "";
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Floating bubble toolbar that appears on text selection or inside a table, or —
|
|
99
|
+
* with `showOnFocus` — for as long as the editor is focused.
|
|
100
|
+
* Keyboard shortcut: Cmd/Ctrl+Shift+U opens the link-edit row.
|
|
101
|
+
*/
|
|
102
|
+
function FloatingToolbar({ editor, showOnFocus = false }) {
|
|
103
|
+
const [linkURL, setLinkURL] = useState("");
|
|
104
|
+
const [editingLink, setEditingLink] = useState(false);
|
|
105
|
+
const linkInputRef = useRef(null);
|
|
106
|
+
const toolbarRef = useRef(null);
|
|
107
|
+
const savedSelection = useRef(null);
|
|
108
|
+
const editingLinkRef = useRef(editingLink);
|
|
109
|
+
const blurTimeout = useRef();
|
|
110
|
+
useEffect(() => () => clearTimeout(blurTimeout.current), []);
|
|
111
|
+
useEffect(() => {
|
|
112
|
+
editingLinkRef.current = editingLink;
|
|
113
|
+
}, [editingLink]);
|
|
114
|
+
const restoreSelection = useCallback(() => {
|
|
115
|
+
if (editor && savedSelection.current) {
|
|
116
|
+
const { from, to } = savedSelection.current;
|
|
117
|
+
editor.chain().focus().setTextSelection({
|
|
118
|
+
from,
|
|
119
|
+
to
|
|
120
|
+
}).run();
|
|
121
|
+
}
|
|
122
|
+
}, [editor]);
|
|
123
|
+
const openLinkEditingMode = useCallback(() => {
|
|
124
|
+
if (!editor) return;
|
|
125
|
+
if (!editor.can().chain().toggleLink({ href: "https://www.google.com" }).run()) return;
|
|
126
|
+
const { from, to } = editor.state.selection;
|
|
127
|
+
savedSelection.current = {
|
|
128
|
+
from,
|
|
129
|
+
to
|
|
130
|
+
};
|
|
131
|
+
const linkAttr = editor.getAttributes("link");
|
|
132
|
+
if (linkAttr.href) setLinkURL(linkAttr.href);
|
|
133
|
+
editor.chain().focus().setTextSelection({
|
|
134
|
+
from,
|
|
135
|
+
to
|
|
136
|
+
}).run();
|
|
137
|
+
setEditingLink(true);
|
|
138
|
+
setTimeout(() => {
|
|
139
|
+
linkInputRef.current?.focus();
|
|
140
|
+
}, 250);
|
|
141
|
+
}, [editor]);
|
|
142
|
+
useEffect(() => {
|
|
143
|
+
if (!editor) return;
|
|
144
|
+
const dom = editor.view.dom;
|
|
145
|
+
const handler = (event) => {
|
|
146
|
+
if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.key.toLowerCase() === "u") {
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
openLinkEditingMode();
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (event.key === "Escape" && editingLinkRef.current) {
|
|
152
|
+
event.preventDefault();
|
|
153
|
+
setEditingLink(false);
|
|
154
|
+
setLinkURL("");
|
|
155
|
+
savedSelection.current = null;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
dom.addEventListener("keydown", handler);
|
|
159
|
+
return () => {
|
|
160
|
+
dom.removeEventListener("keydown", handler);
|
|
161
|
+
};
|
|
162
|
+
}, [editor, openLinkEditingMode]);
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
if (!editingLink || !editor || !savedSelection.current) return;
|
|
165
|
+
restoreSelection();
|
|
166
|
+
const timeoutId = setTimeout(() => {
|
|
167
|
+
restoreSelection();
|
|
168
|
+
editor.view.dom?.focus();
|
|
169
|
+
}, 0);
|
|
170
|
+
return () => clearTimeout(timeoutId);
|
|
171
|
+
}, [
|
|
172
|
+
editingLink,
|
|
173
|
+
restoreSelection,
|
|
174
|
+
editor
|
|
175
|
+
]);
|
|
176
|
+
if (!editor) return null;
|
|
177
|
+
const isFocusWithinToolbar = () => !!toolbarRef.current?.contains(document.activeElement);
|
|
178
|
+
const handleToolbarBlur = () => {
|
|
179
|
+
blurTimeout.current = setTimeout(() => {
|
|
180
|
+
if (editor.isDestroyed || isFocusWithinToolbar() || editor.view.hasFocus()) return;
|
|
181
|
+
editor.options.element._tippy?.hide();
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
const editorState = {
|
|
185
|
+
isBold: editor.isActive("bold"),
|
|
186
|
+
canBold: editor.can().chain().toggleBold().run(),
|
|
187
|
+
isItalic: editor.isActive("italic"),
|
|
188
|
+
canItalic: editor.can().chain().toggleItalic().run(),
|
|
189
|
+
isLink: editor.isActive("link"),
|
|
190
|
+
isBulletList: editor.isActive("bulletList"),
|
|
191
|
+
canLink: editor.can().chain().toggleLink({ href: "https://www.google.com" }).run(),
|
|
192
|
+
isTable: editor.isActive("table"),
|
|
193
|
+
canInsertTable: editor.can().chain().insertTable({
|
|
194
|
+
rows: 3,
|
|
195
|
+
cols: 3,
|
|
196
|
+
withHeaderRow: true
|
|
197
|
+
}).run()
|
|
198
|
+
};
|
|
199
|
+
return /* @__PURE__ */ jsx(BubbleMenu, {
|
|
200
|
+
editor,
|
|
201
|
+
tippyOptions: {
|
|
202
|
+
placement: "top-start",
|
|
203
|
+
offset: showOnFocus ? FIELD_OFFSET : SELECTION_OFFSET,
|
|
204
|
+
...showOnFocus ? { getReferenceClientRect: () => editor.options.element.getBoundingClientRect() } : {}
|
|
205
|
+
},
|
|
206
|
+
shouldShow: ({ editor: e, view, from, to }) => {
|
|
207
|
+
if (!e.isEditable) return false;
|
|
208
|
+
if (e.isActive("mention")) return false;
|
|
209
|
+
if (e.isActive("table")) return true;
|
|
210
|
+
if (from !== to) return true;
|
|
211
|
+
return showOnFocus && (view.hasFocus() || isFocusWithinToolbar());
|
|
212
|
+
},
|
|
213
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(BubbleMenuBar, {
|
|
214
|
+
ref: toolbarRef,
|
|
215
|
+
role: "toolbar",
|
|
216
|
+
"aria-label": "Text formatting",
|
|
217
|
+
direction: "horizontal",
|
|
218
|
+
spacing: Spacing[1],
|
|
219
|
+
onBlur: handleToolbarBlur,
|
|
220
|
+
children: !editingLink ? /* @__PURE__ */ jsxs(IconContainer, {
|
|
221
|
+
layout: true,
|
|
222
|
+
initial: {
|
|
223
|
+
x: -10,
|
|
224
|
+
opacity: 0
|
|
225
|
+
},
|
|
226
|
+
animate: {
|
|
227
|
+
x: 0,
|
|
228
|
+
opacity: 1
|
|
229
|
+
},
|
|
230
|
+
exit: {
|
|
231
|
+
x: -10,
|
|
232
|
+
opacity: 0
|
|
233
|
+
},
|
|
234
|
+
transition: {
|
|
235
|
+
duration: .2,
|
|
236
|
+
ease: "easeOut"
|
|
237
|
+
},
|
|
238
|
+
children: [
|
|
239
|
+
/* @__PURE__ */ jsx(InverseIconButton, {
|
|
240
|
+
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
241
|
+
$selected: editorState.isBulletList,
|
|
242
|
+
size: "sm",
|
|
243
|
+
type: "button",
|
|
244
|
+
"aria-label": "Toggle bullet list",
|
|
245
|
+
"data-rte-menu-bar-item": true,
|
|
246
|
+
children: /* @__PURE__ */ jsx(ListIcon, {})
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ jsx(InverseIconButton, {
|
|
249
|
+
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
250
|
+
disabled: !editorState.canBold,
|
|
251
|
+
$selected: editorState.isBold,
|
|
252
|
+
size: "sm",
|
|
253
|
+
type: "button",
|
|
254
|
+
"aria-label": "Toggle bold",
|
|
255
|
+
"data-rte-menu-bar-item": true,
|
|
256
|
+
children: /* @__PURE__ */ jsx(BoldIcon, {})
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ jsx(InverseIconButton, {
|
|
259
|
+
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
260
|
+
$selected: editorState.isItalic,
|
|
261
|
+
disabled: !editorState.canItalic,
|
|
262
|
+
type: "button",
|
|
263
|
+
size: "sm",
|
|
264
|
+
"aria-label": "Toggle italic",
|
|
265
|
+
"data-rte-menu-bar-item": true,
|
|
266
|
+
children: /* @__PURE__ */ jsx(ItalicIcon, {})
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ jsx(InverseIconButton, {
|
|
269
|
+
onClick: (e) => {
|
|
270
|
+
e.preventDefault();
|
|
271
|
+
e.stopPropagation();
|
|
272
|
+
openLinkEditingMode();
|
|
273
|
+
},
|
|
274
|
+
$selected: editorState.isLink,
|
|
275
|
+
disabled: !editorState.canLink,
|
|
276
|
+
size: "sm",
|
|
277
|
+
type: "button",
|
|
278
|
+
"aria-label": "Toggle link",
|
|
279
|
+
"data-rte-menu-bar-item": true,
|
|
280
|
+
children: /* @__PURE__ */ jsx(LinkIcon, {})
|
|
281
|
+
}),
|
|
282
|
+
editorState.isTable ? /* @__PURE__ */ jsxs(DropdownMenu_default, {
|
|
283
|
+
contentProps: {
|
|
284
|
+
"data-rte-menu-bar-item": "table-actions-dropdown-menu",
|
|
285
|
+
onCloseAutoFocus: (event) => {
|
|
286
|
+
event.preventDefault();
|
|
287
|
+
editor.commands.focus();
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
trigger: /* @__PURE__ */ jsx(InverseIconButton, {
|
|
291
|
+
size: "sm",
|
|
292
|
+
type: "button",
|
|
293
|
+
"aria-label": "Table actions",
|
|
294
|
+
"data-rte-menu-bar-item": true,
|
|
295
|
+
$selected: true,
|
|
296
|
+
children: /* @__PURE__ */ jsx(GridIcon, {})
|
|
297
|
+
}),
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ jsx(StyledDropdownItem$1, {
|
|
300
|
+
id: "floating-toolbar__tableAddRowAfter",
|
|
301
|
+
variant: "basic",
|
|
302
|
+
"data-rte-menu-bar-item": "table-add-row-after",
|
|
303
|
+
onClick: () => editor.chain().focus().addRowAfter().run(),
|
|
304
|
+
children: "Add row below"
|
|
305
|
+
}),
|
|
306
|
+
/* @__PURE__ */ jsx(StyledDropdownItem$1, {
|
|
307
|
+
id: "floating-toolbar__tableAddRowBefore",
|
|
308
|
+
variant: "basic",
|
|
309
|
+
"data-rte-menu-bar-item": "table-add-row-before",
|
|
310
|
+
onClick: () => editor.chain().focus().addRowBefore().run(),
|
|
311
|
+
children: "Add row above"
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ jsx(StyledDropdownItem$1, {
|
|
314
|
+
id: "floating-toolbar__tableAddColumnAfter",
|
|
315
|
+
variant: "basic",
|
|
316
|
+
"data-rte-menu-bar-item": "table-add-column-after",
|
|
317
|
+
onClick: () => editor.chain().focus().addColumnAfter().run(),
|
|
318
|
+
children: "Add column right"
|
|
319
|
+
}),
|
|
320
|
+
/* @__PURE__ */ jsx(StyledDropdownItem$1, {
|
|
321
|
+
id: "floating-toolbar__tableAddColumnBefore",
|
|
322
|
+
variant: "basic",
|
|
323
|
+
"data-rte-menu-bar-item": "table-add-column-before",
|
|
324
|
+
onClick: () => editor.chain().focus().addColumnBefore().run(),
|
|
325
|
+
children: "Add column left"
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ jsx(StyledDropdownItem$1, {
|
|
328
|
+
id: "floating-toolbar__tableDeleteRow",
|
|
329
|
+
variant: "basic",
|
|
330
|
+
"data-rte-menu-bar-item": "table-delete-row",
|
|
331
|
+
onClick: () => editor.chain().focus().deleteRow().run(),
|
|
332
|
+
children: "Delete row"
|
|
333
|
+
}),
|
|
334
|
+
/* @__PURE__ */ jsx(StyledDropdownItem$1, {
|
|
335
|
+
id: "floating-toolbar__tableDeleteColumn",
|
|
336
|
+
variant: "basic",
|
|
337
|
+
"data-rte-menu-bar-item": "table-delete-column",
|
|
338
|
+
onClick: () => editor.chain().focus().deleteColumn().run(),
|
|
339
|
+
children: "Delete column"
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ jsx(StyledDropdownItem$1, {
|
|
342
|
+
id: "floating-toolbar__tableToggleHeaderRow",
|
|
343
|
+
variant: "basic",
|
|
344
|
+
"data-rte-menu-bar-item": "table-toggle-header-row",
|
|
345
|
+
onClick: () => editor.chain().focus().toggleHeaderRow().run(),
|
|
346
|
+
children: "Toggle header row"
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ jsx(StyledDropdownItem$1, {
|
|
349
|
+
id: "floating-toolbar__tableDelete",
|
|
350
|
+
variant: "basic",
|
|
351
|
+
"data-rte-menu-bar-item": "table-delete",
|
|
352
|
+
onClick: () => editor.chain().focus().deleteTable().run(),
|
|
353
|
+
children: "Delete table"
|
|
354
|
+
})
|
|
355
|
+
]
|
|
356
|
+
}) : /* @__PURE__ */ jsx(InverseIconButton, {
|
|
357
|
+
onClick: () => editor.chain().focus().insertTable({
|
|
358
|
+
rows: 3,
|
|
359
|
+
cols: 3,
|
|
360
|
+
withHeaderRow: true
|
|
361
|
+
}).run(),
|
|
362
|
+
disabled: !editorState.canInsertTable,
|
|
363
|
+
size: "sm",
|
|
364
|
+
type: "button",
|
|
365
|
+
"aria-label": "Insert table",
|
|
366
|
+
"data-rte-menu-bar-item": true,
|
|
367
|
+
children: /* @__PURE__ */ jsx(GridIcon, {})
|
|
368
|
+
})
|
|
369
|
+
]
|
|
370
|
+
}, "main-toolbar") : /* @__PURE__ */ jsxs(IconContainer, {
|
|
371
|
+
initial: {
|
|
372
|
+
x: -10,
|
|
373
|
+
opacity: 0
|
|
374
|
+
},
|
|
375
|
+
animate: {
|
|
376
|
+
x: 0,
|
|
377
|
+
opacity: 1
|
|
378
|
+
},
|
|
379
|
+
exit: {
|
|
380
|
+
x: -10,
|
|
381
|
+
opacity: 0
|
|
382
|
+
},
|
|
383
|
+
transition: {
|
|
384
|
+
duration: .2,
|
|
385
|
+
ease: "easeOut"
|
|
386
|
+
},
|
|
387
|
+
"aria-label": "Link toolbar",
|
|
388
|
+
onAnimationComplete: () => {
|
|
389
|
+
if (editor && savedSelection.current) setTimeout(() => {
|
|
390
|
+
restoreSelection();
|
|
391
|
+
linkInputRef.current?.focus();
|
|
392
|
+
}, 10);
|
|
393
|
+
},
|
|
394
|
+
children: [
|
|
395
|
+
/* @__PURE__ */ jsx(InverseInput, {
|
|
396
|
+
ref: linkInputRef,
|
|
397
|
+
size: "sm",
|
|
398
|
+
value: linkURL,
|
|
399
|
+
onChange: (e) => setLinkURL(e.target.value),
|
|
400
|
+
placeholder: "Click to enter URL...",
|
|
401
|
+
"aria-label": "Link input",
|
|
402
|
+
"data-rte-menu-bar-item": true,
|
|
403
|
+
onClick: () => {
|
|
404
|
+
linkInputRef.current?.focus();
|
|
405
|
+
},
|
|
406
|
+
onFocus: () => {
|
|
407
|
+
if (savedSelection.current && editor) {
|
|
408
|
+
const { from, to } = savedSelection.current;
|
|
409
|
+
editor.chain().setTextSelection({
|
|
410
|
+
from,
|
|
411
|
+
to
|
|
412
|
+
}).run();
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
onKeyDown: (e) => {
|
|
416
|
+
if (e.key === "Enter" && linkURL.trim() && editor && savedSelection.current) {
|
|
417
|
+
e.preventDefault();
|
|
418
|
+
e.stopPropagation();
|
|
419
|
+
const { from, to } = savedSelection.current;
|
|
420
|
+
editor.chain().focus().setTextSelection({
|
|
421
|
+
from,
|
|
422
|
+
to
|
|
423
|
+
}).setLink({ href: ensureProtocol(linkURL) }).run();
|
|
424
|
+
savedSelection.current = null;
|
|
425
|
+
setEditingLink(false);
|
|
426
|
+
setLinkURL("");
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
if (e.key === "Escape") {
|
|
430
|
+
e.preventDefault();
|
|
431
|
+
e.stopPropagation();
|
|
432
|
+
setEditingLink(false);
|
|
433
|
+
setLinkURL("");
|
|
434
|
+
savedSelection.current = null;
|
|
435
|
+
const { from, to } = editor.state.selection;
|
|
436
|
+
editor.chain().focus().setTextSelection({
|
|
437
|
+
from,
|
|
438
|
+
to
|
|
439
|
+
}).run();
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}),
|
|
443
|
+
/* @__PURE__ */ jsx(InverseIconButton, {
|
|
444
|
+
onClick: (e) => {
|
|
445
|
+
e.preventDefault();
|
|
446
|
+
e.stopPropagation();
|
|
447
|
+
if (linkURL) editor.chain().focus().unsetLink().run();
|
|
448
|
+
restoreSelection();
|
|
449
|
+
setLinkURL("");
|
|
450
|
+
savedSelection.current = null;
|
|
451
|
+
setEditingLink(false);
|
|
452
|
+
},
|
|
453
|
+
size: "sm",
|
|
454
|
+
type: "button",
|
|
455
|
+
"aria-label": "Cancel link",
|
|
456
|
+
"data-rte-menu-bar-item": true,
|
|
457
|
+
children: linkURL && editorState.isLink ? /* @__PURE__ */ jsx(UnlinkIcon, {}) : /* @__PURE__ */ jsx(XIcon, {})
|
|
458
|
+
}),
|
|
459
|
+
/* @__PURE__ */ jsx(InverseIconButton, {
|
|
460
|
+
onClick: (e) => {
|
|
461
|
+
e.preventDefault();
|
|
462
|
+
e.stopPropagation();
|
|
463
|
+
if (linkURL.trim() && editor && savedSelection.current) {
|
|
464
|
+
const { from, to } = savedSelection.current;
|
|
465
|
+
editor.chain().focus().setTextSelection({
|
|
466
|
+
from,
|
|
467
|
+
to
|
|
468
|
+
}).setLink({ href: ensureProtocol(linkURL) }).run();
|
|
469
|
+
} else if (editor && savedSelection.current) {
|
|
470
|
+
const { from, to } = savedSelection.current;
|
|
471
|
+
editor.chain().focus().setTextSelection({
|
|
472
|
+
from,
|
|
473
|
+
to
|
|
474
|
+
}).unsetLink().run();
|
|
475
|
+
}
|
|
476
|
+
savedSelection.current = null;
|
|
477
|
+
setEditingLink(false);
|
|
478
|
+
setLinkURL("");
|
|
479
|
+
},
|
|
480
|
+
size: "sm",
|
|
481
|
+
type: "button",
|
|
482
|
+
"aria-label": "Apply link",
|
|
483
|
+
"data-rte-menu-bar-item": true,
|
|
484
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
485
|
+
})
|
|
486
|
+
]
|
|
487
|
+
}, "link-toolbar")
|
|
488
|
+
}) })
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region src/components/RichTextEditor/markdownUtils.ts
|
|
493
|
+
/**
|
|
494
|
+
* Collapses double newlines between pipe-delimited table rows into single
|
|
495
|
+
* newlines. TipTap creates paragraph nodes for every Enter, and tiptap-markdown
|
|
496
|
+
* serializes paragraphs as \n\n. GFM tables require single newlines between
|
|
497
|
+
* rows to be parsed as a contiguous table block.
|
|
498
|
+
*
|
|
499
|
+
* Only affects lines that start/end with pipe characters — normal paragraph
|
|
500
|
+
* breaks are preserved.
|
|
501
|
+
*/
|
|
502
|
+
const normalizeTableNewlines = (text) => text.replace(/(\|[^\n]*)\n\n(\|)/g, "$1\n$2");
|
|
503
|
+
/**
|
|
504
|
+
* Whether the doc holds no content at all, i.e. it matches the schema's default
|
|
505
|
+
* empty doc. `Editor#isEmpty` also reports true for docs made of structurally
|
|
506
|
+
* empty nodes (a table of blank cells), which still carry real structure worth
|
|
507
|
+
* serializing to markdown.
|
|
508
|
+
*/
|
|
509
|
+
const isEditorDocEmpty = (doc) => {
|
|
510
|
+
const defaultDoc = doc.type.createAndFill();
|
|
511
|
+
return defaultDoc != null && doc.eq(defaultDoc);
|
|
512
|
+
};
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region src/components/RichTextEditor/styles.ts
|
|
515
|
+
const accentWash = ({ theme }) => {
|
|
516
|
+
const tokens = semanticTokens(theme);
|
|
517
|
+
return tokens ? withAlpha(tokens.SurfaceAccent, tokens.Opacity25) : Color.CorePurple100;
|
|
518
|
+
};
|
|
519
|
+
var styles_default = createGlobalStyle`
|
|
520
|
+
/*
|
|
521
|
+
* A long unbreakable token (URL, hash) otherwise sets the block's min-content
|
|
522
|
+
* width; inside a flex row that lets the editor grow past its container so
|
|
523
|
+
* nothing wraps. anywhere lets the token break, collapsing min-content so the
|
|
524
|
+
* block stays within its container. break-word (which ProseMirror's own
|
|
525
|
+
* injected base style sets via word-wrap) does NOT affect min-content, so it
|
|
526
|
+
* cannot fix this. The doubled selector raises specificity above that base
|
|
527
|
+
* rule, which has equal specificity and is injected after this one.
|
|
528
|
+
*/
|
|
529
|
+
.ProseMirror.ProseMirror {
|
|
530
|
+
overflow-wrap: anywhere;
|
|
531
|
+
}
|
|
532
|
+
.ProseMirror ul, .ProseMirror ol {
|
|
533
|
+
padding-left: 30px;
|
|
534
|
+
}
|
|
535
|
+
.mention {
|
|
536
|
+
background-color: ${accentWash};
|
|
537
|
+
color: ${({ theme }) => semanticColor(theme, "FgAccent", Color.CorePurple700)};
|
|
538
|
+
border-radius: ${BorderRadius.Md};
|
|
539
|
+
display: inline-flex;
|
|
540
|
+
padding: 2px;
|
|
541
|
+
align-items: center;
|
|
542
|
+
gap: ${Spacing[1]};
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/* Table styles applied in both edit and read-only views. */
|
|
546
|
+
.ProseMirror table {
|
|
547
|
+
border-collapse: collapse;
|
|
548
|
+
table-layout: fixed;
|
|
549
|
+
width: 100%;
|
|
550
|
+
margin: ${Spacing[2]} 0;
|
|
551
|
+
overflow: hidden;
|
|
552
|
+
}
|
|
553
|
+
.ProseMirror th,
|
|
554
|
+
.ProseMirror td {
|
|
555
|
+
border: 1px solid ${({ theme }) => semanticColor(theme, "BorderSubtle", Color.BorderDivider)};
|
|
556
|
+
padding: ${Spacing[1]} ${Spacing[2]};
|
|
557
|
+
vertical-align: top;
|
|
558
|
+
box-sizing: border-box;
|
|
559
|
+
min-width: 1em;
|
|
560
|
+
position: relative;
|
|
561
|
+
}
|
|
562
|
+
.ProseMirror th {
|
|
563
|
+
background-color: ${({ theme }) => semanticColor(theme, "SurfaceSecondary", Color.BackgroundSecondary)};
|
|
564
|
+
font-weight: 500;
|
|
565
|
+
text-align: left;
|
|
566
|
+
}
|
|
567
|
+
/* Cell-selection marker. */
|
|
568
|
+
.ProseMirror .selectedCell:after {
|
|
569
|
+
background-color: ${accentWash};
|
|
570
|
+
content: '';
|
|
571
|
+
inset: 0;
|
|
572
|
+
pointer-events: none;
|
|
573
|
+
position: absolute;
|
|
574
|
+
z-index: 2;
|
|
575
|
+
opacity: 0.4;
|
|
576
|
+
}
|
|
577
|
+
`;
|
|
578
|
+
//#endregion
|
|
579
|
+
//#region src/components/RichTextEditor/RichTextEditor.tsx
|
|
580
|
+
const Bar = styled.div`
|
|
581
|
+
display: flex;
|
|
582
|
+
height: fit-content;
|
|
583
|
+
padding: ${Spacing[1]} ${Spacing[1]};
|
|
584
|
+
gap: 2px;
|
|
585
|
+
border-bottom: 1px solid ${({ theme }) => semanticColor(theme, "BorderDivider", Color.BorderHairline)};
|
|
586
|
+
`;
|
|
587
|
+
const TextEditor = styled.div`
|
|
588
|
+
background-clip: padding-box;
|
|
589
|
+
border-radius: ${Spacing[1]};
|
|
590
|
+
border: 1px solid ${({ theme }) => semanticColor(theme, "BorderSubtle", Color.BorderDivider)};
|
|
591
|
+
${semanticOnly((tokens) => css`
|
|
592
|
+
background-color: ${tokens.InputSurfaceDefault};
|
|
593
|
+
color: ${tokens.FgPrimary};
|
|
594
|
+
`)}
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
${focusWithinOutline}
|
|
598
|
+
`;
|
|
599
|
+
const MenuBarItem = styled.button`
|
|
600
|
+
background: ${({ theme }) => semanticColor(theme, "InputSurfaceDefault", Color.PrimaryWhite)};
|
|
601
|
+
${semanticOnly((tokens) => css`
|
|
602
|
+
color: ${tokens.FgPrimary};
|
|
603
|
+
|
|
604
|
+
&:disabled {
|
|
605
|
+
color: ${tokens.FgDisabled};
|
|
606
|
+
}
|
|
607
|
+
`)}
|
|
608
|
+
display: flex;
|
|
609
|
+
align-items: center;
|
|
610
|
+
padding: ${Spacing[1]};
|
|
611
|
+
cursor: pointer;
|
|
612
|
+
border-radius: ${BorderRadius.Md};
|
|
613
|
+
|
|
614
|
+
${({ isActive, theme }) => isActive && css`
|
|
615
|
+
background-color: ${semanticColor(theme, "ActionNeutral", Color.BackgroundButtonDefault)};
|
|
616
|
+
`};
|
|
617
|
+
|
|
618
|
+
svg {
|
|
619
|
+
margin: 0;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
&:hover {
|
|
623
|
+
box-shadow: ${"0px 4px 5px 0px rgba(0, 0, 0, 0.08), 0px 3px 14px 0px rgba(0, 0, 0, 0.04), 0px 8px 10px 0px rgba(0, 0, 0, 0.04)"};
|
|
624
|
+
}
|
|
625
|
+
`;
|
|
626
|
+
const StyledCard = styled(Card_default)`
|
|
627
|
+
min-width: 300px;
|
|
628
|
+
padding: ${Spacing[3]};
|
|
629
|
+
`;
|
|
630
|
+
const VerticalLine = styled.span`
|
|
631
|
+
border-right: 1px solid ${({ theme }) => semanticColor(theme, "BorderSubtle", Color.BorderDivider)};
|
|
632
|
+
`;
|
|
633
|
+
const StyledDropdownItem = styled(DropdownMenu_default.Item)`
|
|
634
|
+
width: 100%;
|
|
635
|
+
height: 30px;
|
|
636
|
+
font-size: small;
|
|
637
|
+
overflow: hidden;
|
|
638
|
+
white-space: nowrap;
|
|
639
|
+
text-overflow: ellipsis;
|
|
640
|
+
`;
|
|
641
|
+
const MenuBar = ({ editor, supportedSections = [
|
|
642
|
+
"undo-redo",
|
|
643
|
+
"text-format",
|
|
644
|
+
"text-style",
|
|
645
|
+
"lists"
|
|
646
|
+
] }) => {
|
|
647
|
+
const [isEditLinkModal, { enable: showEditLinkModal, disable: hideEditLinkModal }] = useToggle();
|
|
648
|
+
const [linkUrl, setLinkUrl] = useState("");
|
|
649
|
+
const editLinkModalCardRef = useRef(null);
|
|
650
|
+
useOutsideClick({
|
|
651
|
+
ref: editLinkModalCardRef,
|
|
652
|
+
onOutsideClick: hideEditLinkModal
|
|
653
|
+
});
|
|
654
|
+
if (!editor || supportedSections.length === 0) return null;
|
|
655
|
+
const { view, state } = editor;
|
|
656
|
+
const { from, to } = view.state.selection;
|
|
657
|
+
const selectionText = state.doc.textBetween(from, to, "");
|
|
658
|
+
const handleSetLink = (url) => {
|
|
659
|
+
if (url === "") {
|
|
660
|
+
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
661
|
+
return;
|
|
662
|
+
}
|
|
663
|
+
editor.chain().focus().extendMarkRange("link").setLink({ href: ensureProtocol(url) }).run();
|
|
664
|
+
hideEditLinkModal();
|
|
665
|
+
};
|
|
666
|
+
const handleLinkModalKeyDown = (e) => {
|
|
667
|
+
if (e.key === "Enter") {
|
|
668
|
+
e.preventDefault();
|
|
669
|
+
handleSetLink(linkUrl);
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
const extraMenuBars = editor.extensionManager.extensions.filter((ext) => ext.type === "extension" && "extraMenuBar" in ext.options).map((ext) => ext.options.extraMenuBar);
|
|
673
|
+
const textFormatItems = () => [
|
|
674
|
+
{
|
|
675
|
+
id: "menu-bar__paragraph",
|
|
676
|
+
label: "Normal text",
|
|
677
|
+
variant: "basic",
|
|
678
|
+
type: "button",
|
|
679
|
+
onClick: () => editor.chain().focus().setParagraph().run()
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
id: "menu-bar__h1",
|
|
683
|
+
label: "Heading 1",
|
|
684
|
+
variant: "basic",
|
|
685
|
+
type: "button",
|
|
686
|
+
onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run()
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
id: "menu-bar__h2",
|
|
690
|
+
label: "Heading 2",
|
|
691
|
+
variant: "basic",
|
|
692
|
+
type: "button",
|
|
693
|
+
onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run()
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
id: "menu-bar__h3",
|
|
697
|
+
label: "Heading 3",
|
|
698
|
+
variant: "basic",
|
|
699
|
+
type: "button",
|
|
700
|
+
onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run()
|
|
701
|
+
}
|
|
702
|
+
];
|
|
703
|
+
const sectionsMap = {
|
|
704
|
+
["undo-redo"]: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MenuBarItem, {
|
|
705
|
+
tabIndex: -1,
|
|
706
|
+
id: "menu-bar__undo",
|
|
707
|
+
type: "button",
|
|
708
|
+
"aria-label": "Undo",
|
|
709
|
+
"data-rte-menu-bar-item": "undo",
|
|
710
|
+
isActive: false,
|
|
711
|
+
disabled: !editor.can().chain().focus().undo().run(),
|
|
712
|
+
onClick: () => editor.chain().focus().undo().run(),
|
|
713
|
+
children: /* @__PURE__ */ jsx(RotateCcwIcon, {})
|
|
714
|
+
}), /* @__PURE__ */ jsx(MenuBarItem, {
|
|
715
|
+
tabIndex: -1,
|
|
716
|
+
id: "menu-bar__redo",
|
|
717
|
+
type: "button",
|
|
718
|
+
"aria-label": "Redo",
|
|
719
|
+
"data-rte-menu-bar-item": "redo",
|
|
720
|
+
isActive: false,
|
|
721
|
+
disabled: !editor.can().chain().focus().redo().run(),
|
|
722
|
+
onClick: () => editor.chain().focus().redo().run(),
|
|
723
|
+
children: /* @__PURE__ */ jsx(RotateCwIcon, {})
|
|
724
|
+
})] }, "undo-redo"),
|
|
725
|
+
["text-format"]: /* @__PURE__ */ jsx(DropdownMenu_default, {
|
|
726
|
+
contentProps: {
|
|
727
|
+
"data-rte-menu-bar-item": "text-format-dropdown-menu",
|
|
728
|
+
onCloseAutoFocus: (event) => {
|
|
729
|
+
event.preventDefault();
|
|
730
|
+
editor.commands.focus();
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
trigger: /* @__PURE__ */ jsxs(MenuBarItem, {
|
|
734
|
+
tabIndex: -1,
|
|
735
|
+
id: "menu-bar__textFormats",
|
|
736
|
+
type: "button",
|
|
737
|
+
"aria-label": "Text sizes",
|
|
738
|
+
"data-rte-menu-bar-item": "text-format",
|
|
739
|
+
isActive: false,
|
|
740
|
+
children: [/* @__PURE__ */ jsx(CapitalizeIcon, {}), /* @__PURE__ */ jsx(CaretDownIcon, {})]
|
|
741
|
+
}),
|
|
742
|
+
children: textFormatItems().map((item) => /* @__PURE__ */ jsx(StyledDropdownItem, {
|
|
743
|
+
id: item.id,
|
|
744
|
+
variant: item.variant,
|
|
745
|
+
onClick: item.onClick,
|
|
746
|
+
"data-rte-menu-bar-item": item.id,
|
|
747
|
+
children: item.label
|
|
748
|
+
}, item.id))
|
|
749
|
+
}, "text-format"),
|
|
750
|
+
["text-style"]: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
751
|
+
/* @__PURE__ */ jsx(MenuBarItem, {
|
|
752
|
+
tabIndex: -1,
|
|
753
|
+
id: "menu-bar__bold",
|
|
754
|
+
type: "button",
|
|
755
|
+
"aria-label": "Bold",
|
|
756
|
+
"data-rte-menu-bar-item": "bold",
|
|
757
|
+
isActive: editor.isActive("bold"),
|
|
758
|
+
disabled: !editor.can().chain().focus().toggleBold().run(),
|
|
759
|
+
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
760
|
+
children: /* @__PURE__ */ jsx(BoldIcon, {})
|
|
761
|
+
}),
|
|
762
|
+
/* @__PURE__ */ jsx(MenuBarItem, {
|
|
763
|
+
tabIndex: -1,
|
|
764
|
+
id: "menu-bar__italic",
|
|
765
|
+
type: "button",
|
|
766
|
+
"aria-label": "Italic",
|
|
767
|
+
"data-rte-menu-bar-item": "italic",
|
|
768
|
+
isActive: editor.isActive("italic"),
|
|
769
|
+
disabled: !editor.can().chain().focus().toggleItalic().run(),
|
|
770
|
+
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
771
|
+
children: /* @__PURE__ */ jsx(ItalicIcon, {})
|
|
772
|
+
}),
|
|
773
|
+
/* @__PURE__ */ jsx(Popover_default, {
|
|
774
|
+
open: isEditLinkModal,
|
|
775
|
+
trigger: /* @__PURE__ */ jsx(MenuBarItem, {
|
|
776
|
+
tabIndex: -1,
|
|
777
|
+
id: "menu-bar__link",
|
|
778
|
+
type: "button",
|
|
779
|
+
"aria-label": "Link",
|
|
780
|
+
"data-rte-menu-bar-item": "link",
|
|
781
|
+
disabled: !editor.isActive("link") && selectionText === "",
|
|
782
|
+
isActive: editor.isActive("link"),
|
|
783
|
+
onClick: () => {
|
|
784
|
+
showEditLinkModal();
|
|
785
|
+
setLinkUrl(editor.getAttributes("link").href || "");
|
|
786
|
+
},
|
|
787
|
+
children: /* @__PURE__ */ jsx(LinkIcon, {})
|
|
788
|
+
}),
|
|
789
|
+
children: /* @__PURE__ */ jsx(Popover_default.Content, {
|
|
790
|
+
side: "bottom",
|
|
791
|
+
align: "center",
|
|
792
|
+
style: { zIndex: Z_INDICES.toast },
|
|
793
|
+
children: /* @__PURE__ */ jsxs(StyledCard, {
|
|
794
|
+
elevated: true,
|
|
795
|
+
ref: editLinkModalCardRef,
|
|
796
|
+
children: [/* @__PURE__ */ jsx(TextField, {
|
|
797
|
+
size: "sm",
|
|
798
|
+
value: linkUrl,
|
|
799
|
+
"data-rte-menu-bar-item": "link-url",
|
|
800
|
+
onChange: (e) => setLinkUrl(e.target.value),
|
|
801
|
+
onKeyDown: handleLinkModalKeyDown
|
|
802
|
+
}), /* @__PURE__ */ jsxs(HStack, {
|
|
803
|
+
equal: true,
|
|
804
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
805
|
+
id: "menu-bar__editLinkModal_cancel",
|
|
806
|
+
size: "sm",
|
|
807
|
+
variant: "basic",
|
|
808
|
+
"data-rte-menu-bar-item": "link-cancel",
|
|
809
|
+
onClick: hideEditLinkModal,
|
|
810
|
+
children: "Cancel"
|
|
811
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
812
|
+
id: "menu-bar__editLinkModal_save",
|
|
813
|
+
type: "submit",
|
|
814
|
+
size: "sm",
|
|
815
|
+
variant: "primary",
|
|
816
|
+
"data-rte-menu-bar-item": "link-save",
|
|
817
|
+
onClick: () => {
|
|
818
|
+
handleSetLink(linkUrl);
|
|
819
|
+
hideEditLinkModal();
|
|
820
|
+
},
|
|
821
|
+
children: "Save"
|
|
822
|
+
})]
|
|
823
|
+
})]
|
|
824
|
+
})
|
|
825
|
+
})
|
|
826
|
+
})
|
|
827
|
+
] }, "text-style"),
|
|
828
|
+
["lists"]: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MenuBarItem, {
|
|
829
|
+
tabIndex: -1,
|
|
830
|
+
id: "menu-bar__bulletList",
|
|
831
|
+
type: "button",
|
|
832
|
+
"aria-label": "Bullet list",
|
|
833
|
+
"data-rte-menu-bar-item": "bullet-list",
|
|
834
|
+
isActive: editor.isActive("bulletList"),
|
|
835
|
+
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
836
|
+
children: /* @__PURE__ */ jsx(ListIcon, {})
|
|
837
|
+
}), /* @__PURE__ */ jsx(MenuBarItem, {
|
|
838
|
+
tabIndex: -1,
|
|
839
|
+
id: "menu-bar__orderedList",
|
|
840
|
+
type: "button",
|
|
841
|
+
"aria-label": "Ordered list",
|
|
842
|
+
"data-rte-menu-bar-item": "ordered-list",
|
|
843
|
+
isActive: editor.isActive("orderedList"),
|
|
844
|
+
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
845
|
+
children: /* @__PURE__ */ jsx(ListNumbersIcon, {})
|
|
846
|
+
})] }, "lists"),
|
|
847
|
+
["table"]: editor.isActive("table") ? /* @__PURE__ */ jsxs(DropdownMenu_default, {
|
|
848
|
+
contentProps: {
|
|
849
|
+
"data-rte-menu-bar-item": "table-actions-dropdown-menu",
|
|
850
|
+
onCloseAutoFocus: (event) => {
|
|
851
|
+
event.preventDefault();
|
|
852
|
+
editor.commands.focus();
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
trigger: /* @__PURE__ */ jsxs(MenuBarItem, {
|
|
856
|
+
tabIndex: -1,
|
|
857
|
+
id: "menu-bar__tableActions",
|
|
858
|
+
type: "button",
|
|
859
|
+
"aria-label": "Table actions",
|
|
860
|
+
"data-rte-menu-bar-item": "table-actions",
|
|
861
|
+
isActive: true,
|
|
862
|
+
children: [/* @__PURE__ */ jsx(GridIcon, {}), /* @__PURE__ */ jsx(CaretDownIcon, {})]
|
|
863
|
+
}),
|
|
864
|
+
children: [
|
|
865
|
+
/* @__PURE__ */ jsx(StyledDropdownItem, {
|
|
866
|
+
id: "menu-bar__tableAddRowAfter",
|
|
867
|
+
variant: "basic",
|
|
868
|
+
"data-rte-menu-bar-item": "table-add-row-after",
|
|
869
|
+
onClick: () => editor.chain().focus().addRowAfter().run(),
|
|
870
|
+
children: "Add row below"
|
|
871
|
+
}),
|
|
872
|
+
/* @__PURE__ */ jsx(StyledDropdownItem, {
|
|
873
|
+
id: "menu-bar__tableAddRowBefore",
|
|
874
|
+
variant: "basic",
|
|
875
|
+
"data-rte-menu-bar-item": "table-add-row-before",
|
|
876
|
+
onClick: () => editor.chain().focus().addRowBefore().run(),
|
|
877
|
+
children: "Add row above"
|
|
878
|
+
}),
|
|
879
|
+
/* @__PURE__ */ jsx(StyledDropdownItem, {
|
|
880
|
+
id: "menu-bar__tableAddColumnAfter",
|
|
881
|
+
variant: "basic",
|
|
882
|
+
"data-rte-menu-bar-item": "table-add-column-after",
|
|
883
|
+
onClick: () => editor.chain().focus().addColumnAfter().run(),
|
|
884
|
+
children: "Add column right"
|
|
885
|
+
}),
|
|
886
|
+
/* @__PURE__ */ jsx(StyledDropdownItem, {
|
|
887
|
+
id: "menu-bar__tableAddColumnBefore",
|
|
888
|
+
variant: "basic",
|
|
889
|
+
"data-rte-menu-bar-item": "table-add-column-before",
|
|
890
|
+
onClick: () => editor.chain().focus().addColumnBefore().run(),
|
|
891
|
+
children: "Add column left"
|
|
892
|
+
}),
|
|
893
|
+
/* @__PURE__ */ jsx(StyledDropdownItem, {
|
|
894
|
+
id: "menu-bar__tableDeleteRow",
|
|
895
|
+
variant: "basic",
|
|
896
|
+
"data-rte-menu-bar-item": "table-delete-row",
|
|
897
|
+
onClick: () => editor.chain().focus().deleteRow().run(),
|
|
898
|
+
children: "Delete row"
|
|
899
|
+
}),
|
|
900
|
+
/* @__PURE__ */ jsx(StyledDropdownItem, {
|
|
901
|
+
id: "menu-bar__tableDeleteColumn",
|
|
902
|
+
variant: "basic",
|
|
903
|
+
"data-rte-menu-bar-item": "table-delete-column",
|
|
904
|
+
onClick: () => editor.chain().focus().deleteColumn().run(),
|
|
905
|
+
children: "Delete column"
|
|
906
|
+
}),
|
|
907
|
+
/* @__PURE__ */ jsx(StyledDropdownItem, {
|
|
908
|
+
id: "menu-bar__tableToggleHeaderRow",
|
|
909
|
+
variant: "basic",
|
|
910
|
+
"data-rte-menu-bar-item": "table-toggle-header-row",
|
|
911
|
+
onClick: () => editor.chain().focus().toggleHeaderRow().run(),
|
|
912
|
+
children: "Toggle header row"
|
|
913
|
+
}),
|
|
914
|
+
/* @__PURE__ */ jsx(StyledDropdownItem, {
|
|
915
|
+
id: "menu-bar__tableDelete",
|
|
916
|
+
variant: "basic",
|
|
917
|
+
"data-rte-menu-bar-item": "table-delete",
|
|
918
|
+
onClick: () => editor.chain().focus().deleteTable().run(),
|
|
919
|
+
children: "Delete table"
|
|
920
|
+
})
|
|
921
|
+
]
|
|
922
|
+
}, "table-actions") : /* @__PURE__ */ jsx(MenuBarItem, {
|
|
923
|
+
tabIndex: -1,
|
|
924
|
+
id: "menu-bar__insertTable",
|
|
925
|
+
type: "button",
|
|
926
|
+
"aria-label": "Insert table",
|
|
927
|
+
"data-rte-menu-bar-item": "insert-table",
|
|
928
|
+
isActive: false,
|
|
929
|
+
disabled: !editor.can().chain().focus().insertTable({
|
|
930
|
+
rows: 3,
|
|
931
|
+
cols: 3,
|
|
932
|
+
withHeaderRow: true
|
|
933
|
+
}).run(),
|
|
934
|
+
onClick: () => editor.chain().focus().insertTable({
|
|
935
|
+
rows: 3,
|
|
936
|
+
cols: 3,
|
|
937
|
+
withHeaderRow: true
|
|
938
|
+
}).run(),
|
|
939
|
+
children: /* @__PURE__ */ jsx(GridIcon, {})
|
|
940
|
+
}, "table-insert")
|
|
941
|
+
};
|
|
942
|
+
return /* @__PURE__ */ jsx(Bar, {
|
|
943
|
+
title: "Menu bar",
|
|
944
|
+
children: intersperse([...supportedSections.map((section) => sectionsMap[section]), ...extraMenuBars.length > 0 ? [/* @__PURE__ */ jsx(Fragment, { children: extraMenuBars.map((contribution, i) => /* @__PURE__ */ jsx(Fragment, { children: contribution.renderPopover(editor) }, `extra-menu-${i}`)) }, "extra")] : []], (i) => /* @__PURE__ */ jsx(VerticalLine, {}, `separator-${i}`))
|
|
945
|
+
});
|
|
946
|
+
};
|
|
947
|
+
const Text = styled.div`
|
|
948
|
+
cursor: default;
|
|
949
|
+
`;
|
|
950
|
+
const RichTextEditor = ({ className, defaultValue, menuBarSections, additionalEditorExtensions = [], returnMarkdown = false, readOnly = false, floatingToolbar = false, editorContentMaxHeight, editorContentMinHeight, onChange = noop, onKeyDown = noop, onBlur = noop }) => {
|
|
951
|
+
const onKeyDownRef = useRef(onKeyDown);
|
|
952
|
+
onKeyDownRef.current = onKeyDown;
|
|
953
|
+
const editor = useEditor({
|
|
954
|
+
extensions: [
|
|
955
|
+
Markdown.configure({
|
|
956
|
+
html: true,
|
|
957
|
+
tightLists: true,
|
|
958
|
+
tightListClass: "tight",
|
|
959
|
+
bulletListMarker: "-",
|
|
960
|
+
linkify: false,
|
|
961
|
+
breaks: false,
|
|
962
|
+
transformPastedText: false,
|
|
963
|
+
transformCopiedText: false
|
|
964
|
+
}),
|
|
965
|
+
StarterKit,
|
|
966
|
+
Link.extend({ inclusive: false }).configure({
|
|
967
|
+
autolink: false,
|
|
968
|
+
openOnClick: false
|
|
969
|
+
}),
|
|
970
|
+
Table.configure({ resizable: false }),
|
|
971
|
+
TableRow,
|
|
972
|
+
TableHeader,
|
|
973
|
+
TableCell,
|
|
974
|
+
...additionalEditorExtensions
|
|
975
|
+
],
|
|
976
|
+
content: dompurify.sanitize(defaultValue ?? ""),
|
|
977
|
+
editorProps: {
|
|
978
|
+
attributes: { title: "Rich text editor" },
|
|
979
|
+
handleKeyDown(_view, event) {
|
|
980
|
+
onKeyDownRef.current?.(event);
|
|
981
|
+
return event.defaultPrevented;
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
onUpdate: ({ editor }) => {
|
|
985
|
+
let value = returnMarkdown ? editor.storage.markdown.getMarkdown() : editor.getHTML();
|
|
986
|
+
if (returnMarkdown && value) value = normalizeTableNewlines(value);
|
|
987
|
+
onChange(isEditorDocEmpty(editor.state.doc) ? "" : dompurify.sanitize(value));
|
|
988
|
+
},
|
|
989
|
+
onBlur: (e) => {
|
|
990
|
+
/**
|
|
991
|
+
* We want to make sure we don't fire onBlur when the user clicks on a menu bar item.
|
|
992
|
+
*/
|
|
993
|
+
if (!e.event.relatedTarget?.dataset?.rteMenuBarItem) onBlur();
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
useEffect(() => {
|
|
997
|
+
if (editor) {
|
|
998
|
+
if (defaultValue !== (returnMarkdown ? editor.storage.markdown.getMarkdown() : editor.getHTML())) {
|
|
999
|
+
const { from, to } = editor.state.selection;
|
|
1000
|
+
editor.chain().command(({ tr }) => {
|
|
1001
|
+
tr.setMeta("addToHistory", false);
|
|
1002
|
+
return true;
|
|
1003
|
+
}).setContent(dompurify.sanitize(defaultValue), false, { preserveWhitespace: true }).setTextSelection({
|
|
1004
|
+
from,
|
|
1005
|
+
to
|
|
1006
|
+
}).run();
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}, [
|
|
1010
|
+
defaultValue,
|
|
1011
|
+
editor,
|
|
1012
|
+
returnMarkdown
|
|
1013
|
+
]);
|
|
1014
|
+
useEffect(() => {
|
|
1015
|
+
if (editor) editor.setEditable(!readOnly, false);
|
|
1016
|
+
}, [editor, readOnly]);
|
|
1017
|
+
if (!editor) return null;
|
|
1018
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(styles_default, {}), readOnly ? /* @__PURE__ */ jsx(Text, {
|
|
1019
|
+
className,
|
|
1020
|
+
children: /* @__PURE__ */ jsx(EditorContent, { editor })
|
|
1021
|
+
}) : /* @__PURE__ */ jsxs(TextEditor, {
|
|
1022
|
+
className,
|
|
1023
|
+
children: [
|
|
1024
|
+
/* @__PURE__ */ jsx(MenuBar, {
|
|
1025
|
+
supportedSections: menuBarSections ?? [
|
|
1026
|
+
"undo-redo",
|
|
1027
|
+
"text-format",
|
|
1028
|
+
"text-style",
|
|
1029
|
+
"lists",
|
|
1030
|
+
"table"
|
|
1031
|
+
],
|
|
1032
|
+
editor
|
|
1033
|
+
}),
|
|
1034
|
+
floatingToolbar && /* @__PURE__ */ jsx(FloatingToolbar, { editor }),
|
|
1035
|
+
/* @__PURE__ */ jsx(EditorContent, {
|
|
1036
|
+
style: {
|
|
1037
|
+
padding: Spacing[3],
|
|
1038
|
+
minHeight: editorContentMinHeight ?? "none",
|
|
1039
|
+
maxHeight: editorContentMaxHeight ?? "none",
|
|
1040
|
+
overflowY: "auto"
|
|
1041
|
+
},
|
|
1042
|
+
editor
|
|
1043
|
+
})
|
|
1044
|
+
]
|
|
1045
|
+
})] });
|
|
1046
|
+
};
|
|
1047
|
+
//#endregion
|
|
1048
|
+
export { FloatingToolbar, MenuBarItem, RichTextEditor as default, isEditorDocEmpty, normalizeTableNewlines };
|
|
1049
|
+
|
|
1050
|
+
//# sourceMappingURL=index.mjs.map
|