@onesy/ui-react 1.0.171 → 1.0.173
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/Accordion/Accordion.js +93 -74
- package/AdvancedTextField/AdvancedTextField.js +7 -6
- package/Append/Append.js +24 -19
- package/AreaChart/AreaChart.js +15 -17
- package/AreaChartItem/AreaChartItem.js +63 -58
- package/AudioPlayer/AudioPlayer.js +180 -148
- package/AudioRecorder/AudioRecorder.js +104 -59
- package/AutoComplete/AutoComplete.js +135 -125
- package/AutoCompleteCountry/AutoCompleteCountry.js +10 -11
- package/AutoCompleteCurrency/AutoCompleteCurrency.js +4 -5
- package/Avatar/Avatar.js +11 -8
- package/AvatarGroup/AvatarGroup.js +21 -20
- package/Backdrop/Backdrop.js +30 -21
- package/Badge/Badge.js +18 -17
- package/Banner/Banner.js +15 -12
- package/BottomAppBar/BottomAppBar.js +14 -14
- package/BottomSheet/BottomSheet.js +9 -11
- package/Box/Box.js +12 -12
- package/Breadcrumbs/Breadcrumbs.js +38 -34
- package/BubbleChart/BubbleChart.js +159 -134
- package/BubbleChartItem/BubbleChartItem.js +48 -43
- package/Button/Button.js +46 -39
- package/Buttons/Buttons.d.ts +1 -1
- package/Buttons/Buttons.js +34 -28
- package/Calendar/Calendar.js +357 -315
- package/CalendarAvailability/CalendarAvailability.js +351 -298
- package/CalendarMenu/CalendarMenu.js +93 -79
- package/CalendarMonth/CalendarMonth.js +113 -102
- package/CalendarViews/CalendarViews.js +138 -115
- package/CalendarWeek/CalendarWeek.js +180 -158
- package/Card/Card.js +16 -15
- package/CardButton/CardButton.js +11 -10
- package/CardFooter/CardFooter.js +12 -12
- package/CardHeader/CardHeader.js +13 -13
- package/CardImage/CardImage.js +10 -12
- package/CardMain/CardMain.js +12 -12
- package/Carousel/Carousel.js +140 -124
- package/Chart/Chart.js +438 -393
- package/Checkbox/Checkbox.js +46 -43
- package/Chip/Chip.js +12 -11
- package/Chips/Chips.js +20 -20
- package/ClickListener/ClickListener.js +19 -15
- package/Clock/Clock.js +38 -36
- package/ColorTextField/ColorTextField.js +33 -27
- package/ColumnChart/ColumnChart.js +16 -17
- package/ColumnChartItem/ColumnChartItem.js +35 -31
- package/Confirm/Confirm.js +51 -35
- package/Container/Container.js +9 -6
- package/CookieBanner/CookieBanner.js +55 -41
- package/Countdown/Countdown.js +163 -123
- package/DatePicker/DatePicker.js +236 -197
- package/DateRangePicker/DateRangePicker.js +9 -11
- package/DateTimePicker/DateTimePicker.js +127 -103
- package/DateTimeRangePicker/DateTimeRangePicker.js +9 -11
- package/Divider/Divider.js +25 -21
- package/DonutChart/DonutChart.js +9 -11
- package/DragAndDropList/DragAndDropList.js +8 -4
- package/Drawing/Drawing.js +369 -312
- package/DropZone/DropZone.js +20 -15
- package/Emojis/Emojis.js +95 -85
- package/Expand/Expand.js +78 -70
- package/Fab/Fab.js +4 -6
- package/Fade/Fade.js +64 -58
- package/FileChoose/FileChoose.js +69 -60
- package/Focus/Focus.js +19 -16
- package/Form/Form.js +69 -57
- package/FormRow/FormRow.js +49 -38
- package/Forms/Forms.js +13 -13
- package/Frame/Frame.js +62 -54
- package/Grid/Grid.js +15 -12
- package/Grow/Grow.js +60 -52
- package/HTMLCanvas/HTMLCanvas.js +88 -74
- package/IFrame/IFrame.js +33 -27
- package/Icon/Icon.js +14 -14
- package/IconButton/IconButton.js +12 -14
- package/Image/Image.js +19 -15
- package/ImageCrop/ImageCrop.js +96 -87
- package/ImageEdit/ImageEdit.js +355 -290
- package/ImageGallery/ImageGallery.js +104 -86
- package/ImageList/ImageList.js +16 -11
- package/ImageListItem/ImageListItem.js +9 -6
- package/ImageListItemBox/ImageListItemBox.js +12 -12
- package/Info/Info.js +38 -27
- package/Interaction/Interaction.js +57 -52
- package/Keyframes/Keyframes.js +11 -9
- package/Label/Label.js +59 -50
- package/Labels/Labels.js +30 -26
- package/Line/Line.js +10 -7
- package/LineChart/LineChart.js +16 -17
- package/LineChartItem/LineChartItem.js +30 -26
- package/LinearMeter/LinearMeter.js +92 -87
- package/LinearProgress/LinearProgress.js +27 -22
- package/Link/Link.js +7 -6
- package/Links/Links.js +128 -118
- package/List/List.js +23 -21
- package/ListItem/ListItem.js +68 -58
- package/ListSubheader/ListSubheader.js +9 -11
- package/MainProgress/MainProgress.js +14 -12
- package/MainProgressMaterial/MainProgressMaterial.js +16 -14
- package/Markdown/Markdown.js +6 -5
- package/Masonry/Masonry.js +26 -22
- package/Medias/Medias.js +95 -93
- package/Menu/Menu.js +51 -45
- package/MenuDesktop/MenuDesktop.js +141 -130
- package/MenuItem/MenuItem.js +75 -64
- package/Meta/Meta.js +21 -19
- package/Modal/Modal.js +52 -39
- package/ModalFooter/ModalFooter.js +12 -12
- package/ModalHeader/ModalHeader.js +12 -12
- package/ModalIcon/ModalIcon.js +55 -13
- package/ModalMain/ModalMain.js +12 -12
- package/ModalText/ModalText.js +12 -12
- package/ModalTitle/ModalTitle.js +12 -12
- package/MoreOptions/MoreOptions.js +14 -12
- package/Move/Move.js +9 -6
- package/NavigationBar/NavigationBar.js +7 -6
- package/NavigationDrawer/NavigationDrawer.js +7 -6
- package/NavigationItem/NavigationItem.js +58 -48
- package/NavigationRail/NavigationRail.js +25 -22
- package/NotFound/NotFound.js +21 -18
- package/NumericTextField/NumericTextField.js +14 -9
- package/Page/Page.js +50 -38
- package/PageTransition/PageTransition.js +8 -7
- package/Pagination/Pagination.js +41 -31
- package/PaginationItem/PaginationItem.js +20 -18
- package/Parallax/Parallax.js +4 -3
- package/Path/Path.js +9 -11
- package/PieChart/PieChart.js +96 -79
- package/Placeholder/Placeholder.js +15 -12
- package/Portal/Portal.js +41 -18
- package/Properties/Properties.js +17 -18
- package/Property/Property.js +24 -17
- package/Radio/Radio.js +25 -21
- package/Radios/Radios.js +30 -26
- package/Rating/Rating.js +36 -31
- package/Reset/Reset.js +4 -1
- package/Reveal/Reveal.js +17 -13
- package/RichTextEditor/RichTextEditor.js +1011 -824
- package/RoundMeter/RoundMeter.js +98 -93
- package/RoundProgress/RoundProgress.js +36 -32
- package/ScatterChart/ScatterChart.js +15 -17
- package/ScatterChartItem/ScatterChartItem.js +36 -34
- package/ScreenCapture/ScreenCapture.js +57 -43
- package/Section/Section.js +66 -56
- package/SectionAction/SectionAction.js +17 -13
- package/SectionBoxes/SectionBoxes.js +75 -67
- package/SectionCards/SectionCards.js +86 -76
- package/SectionCarousel/SectionCarousel.js +72 -65
- package/SectionContact/SectionContact.js +65 -58
- package/SectionImageGallery/SectionImageGallery.js +13 -10
- package/SectionLogos/SectionLogos.js +34 -30
- package/SectionMedia/SectionMedia.js +41 -34
- package/SectionReviews/SectionReviews.js +76 -67
- package/SectionTextMedia/SectionTextMedia.js +64 -57
- package/SectionTimeline/SectionTimeline.js +46 -43
- package/SectionWatch/SectionWatch.js +12 -9
- package/Select/Select.js +163 -151
- package/Share/Share.js +165 -151
- package/Slide/Slide.js +29 -26
- package/Slider/Slider.js +87 -81
- package/SmartTextField/SmartTextField.js +453 -361
- package/Snackbar/Snackbar.js +48 -38
- package/Snackbars/Snackbars.js +43 -40
- package/Space/Space.js +731 -630
- package/SpeechToText/SpeechToText.js +20 -14
- package/SpeedDial/SpeedDial.js +84 -65
- package/SpeedDialItem/SpeedDialItem.js +22 -19
- package/SpyScroll/SpyScroll.js +16 -12
- package/Step/Step.js +29 -27
- package/Stepper/Stepper.js +42 -41
- package/Surface/Surface.js +7 -7
- package/Switch/Switch.js +49 -41
- package/Tab/Tab.js +40 -35
- package/Table/Table.js +19 -16
- package/TableBody/TableBody.js +14 -14
- package/TableCell/TableCell.js +37 -30
- package/TableFooter/TableFooter.js +13 -13
- package/TableHead/TableHead.js +25 -21
- package/TableHeader/TableHeader.js +14 -14
- package/TablePagination/TablePagination.js +67 -49
- package/TableRow/TableRow.js +14 -14
- package/Tabs/Tabs.js +55 -49
- package/Text/Text.js +17 -13
- package/TextField/TextField.js +135 -111
- package/TextToSpeech/TextToSpeech.js +20 -14
- package/TimePicker/TimePicker.js +196 -160
- package/TimeRangePicker/TimeRangePicker.js +9 -11
- package/Timeline/Timeline.js +13 -13
- package/TimelineItem/TimelineItem.js +29 -24
- package/Timer/Timer.js +137 -94
- package/ToggleButton/ToggleButton.js +10 -12
- package/ToggleButtons/ToggleButtons.js +9 -11
- package/Tooltip/Tooltip.js +63 -54
- package/TopAppBar/TopAppBar.js +32 -25
- package/Transition/Transition.js +11 -9
- package/Tree/Tree.js +73 -61
- package/Type/Type.js +7 -6
- package/VideoPlayer/VideoPlayer.js +207 -170
- package/ViewSplit/ViewSplit.js +49 -40
- package/Watch/Watch.js +204 -187
- package/Weather/Weather.js +58 -49
- package/Whiteboard/Whiteboard.js +28 -24
- package/Widgets/Widgets.js +60 -54
- package/WindowSplit/WindowSplit.js +59 -52
- package/Zoom/Zoom.js +60 -52
- package/esm/Accordion/Accordion.js +93 -74
- package/esm/AdvancedTextField/AdvancedTextField.js +7 -6
- package/esm/Append/Append.js +24 -19
- package/esm/AreaChart/AreaChart.js +15 -17
- package/esm/AreaChartItem/AreaChartItem.js +63 -58
- package/esm/AudioPlayer/AudioPlayer.js +180 -148
- package/esm/AudioRecorder/AudioRecorder.js +104 -59
- package/esm/AutoComplete/AutoComplete.js +135 -125
- package/esm/AutoCompleteCountry/AutoCompleteCountry.js +10 -11
- package/esm/AutoCompleteCurrency/AutoCompleteCurrency.js +4 -5
- package/esm/Avatar/Avatar.js +11 -8
- package/esm/AvatarGroup/AvatarGroup.js +18 -17
- package/esm/Backdrop/Backdrop.js +30 -21
- package/esm/Badge/Badge.js +18 -17
- package/esm/Banner/Banner.js +15 -12
- package/esm/BottomAppBar/BottomAppBar.js +14 -14
- package/esm/BottomSheet/BottomSheet.js +9 -11
- package/esm/Box/Box.js +12 -12
- package/esm/Breadcrumbs/Breadcrumbs.js +37 -33
- package/esm/BubbleChart/BubbleChart.js +159 -134
- package/esm/BubbleChartItem/BubbleChartItem.js +48 -43
- package/esm/Button/Button.js +45 -38
- package/esm/Buttons/Buttons.js +33 -28
- package/esm/Calendar/Calendar.js +357 -315
- package/esm/CalendarAvailability/CalendarAvailability.js +348 -295
- package/esm/CalendarMenu/CalendarMenu.js +93 -79
- package/esm/CalendarMonth/CalendarMonth.js +113 -102
- package/esm/CalendarViews/CalendarViews.js +138 -115
- package/esm/CalendarWeek/CalendarWeek.js +177 -155
- package/esm/Card/Card.js +16 -15
- package/esm/CardButton/CardButton.js +11 -10
- package/esm/CardFooter/CardFooter.js +12 -12
- package/esm/CardHeader/CardHeader.js +13 -13
- package/esm/CardImage/CardImage.js +10 -12
- package/esm/CardMain/CardMain.js +12 -12
- package/esm/Carousel/Carousel.js +140 -124
- package/esm/Chart/Chart.js +433 -388
- package/esm/Checkbox/Checkbox.js +46 -43
- package/esm/Chip/Chip.js +12 -11
- package/esm/Chips/Chips.js +20 -20
- package/esm/ClickListener/ClickListener.js +19 -15
- package/esm/Clock/Clock.js +38 -36
- package/esm/ColorTextField/ColorTextField.js +33 -27
- package/esm/ColumnChart/ColumnChart.js +16 -17
- package/esm/ColumnChartItem/ColumnChartItem.js +35 -31
- package/esm/Confirm/Confirm.js +51 -35
- package/esm/Container/Container.js +9 -6
- package/esm/CookieBanner/CookieBanner.js +55 -41
- package/esm/Countdown/Countdown.js +163 -123
- package/esm/DatePicker/DatePicker.js +236 -197
- package/esm/DateRangePicker/DateRangePicker.js +9 -11
- package/esm/DateTimePicker/DateTimePicker.js +127 -103
- package/esm/DateTimeRangePicker/DateTimeRangePicker.js +9 -11
- package/esm/Divider/Divider.js +25 -21
- package/esm/DonutChart/DonutChart.js +9 -11
- package/esm/DragAndDropList/DragAndDropList.js +8 -4
- package/esm/Drawing/Drawing.js +368 -311
- package/esm/DropZone/DropZone.js +20 -15
- package/esm/Emojis/Emojis.js +95 -85
- package/esm/Expand/Expand.js +77 -69
- package/esm/Fab/Fab.js +4 -6
- package/esm/Fade/Fade.js +64 -58
- package/esm/FileChoose/FileChoose.js +69 -60
- package/esm/Focus/Focus.js +19 -16
- package/esm/Form/Form.js +69 -57
- package/esm/FormRow/FormRow.js +49 -38
- package/esm/Forms/Forms.js +13 -13
- package/esm/Frame/Frame.js +62 -54
- package/esm/Grid/Grid.js +13 -10
- package/esm/Grow/Grow.js +60 -52
- package/esm/HTMLCanvas/HTMLCanvas.js +88 -74
- package/esm/IFrame/IFrame.js +33 -27
- package/esm/Icon/Icon.js +14 -14
- package/esm/IconButton/IconButton.js +12 -14
- package/esm/Image/Image.js +19 -15
- package/esm/ImageCrop/ImageCrop.js +96 -87
- package/esm/ImageEdit/ImageEdit.js +355 -290
- package/esm/ImageGallery/ImageGallery.js +104 -86
- package/esm/ImageList/ImageList.js +16 -11
- package/esm/ImageListItem/ImageListItem.js +9 -6
- package/esm/ImageListItemBox/ImageListItemBox.js +12 -12
- package/esm/Info/Info.js +38 -27
- package/esm/Interaction/Interaction.js +57 -52
- package/esm/Keyframes/Keyframes.js +11 -9
- package/esm/Label/Label.js +59 -50
- package/esm/Labels/Labels.js +30 -26
- package/esm/Line/Line.js +10 -7
- package/esm/LineChart/LineChart.js +16 -17
- package/esm/LineChartItem/LineChartItem.js +30 -26
- package/esm/LinearMeter/LinearMeter.js +92 -87
- package/esm/LinearProgress/LinearProgress.js +27 -22
- package/esm/Link/Link.js +7 -6
- package/esm/Links/Links.js +125 -115
- package/esm/List/List.js +23 -21
- package/esm/ListItem/ListItem.js +68 -58
- package/esm/ListSubheader/ListSubheader.js +9 -11
- package/esm/MainProgress/MainProgress.js +14 -12
- package/esm/MainProgressMaterial/MainProgressMaterial.js +16 -14
- package/esm/Markdown/Markdown.js +6 -5
- package/esm/Masonry/Masonry.js +26 -22
- package/esm/Medias/Medias.js +95 -93
- package/esm/Menu/Menu.js +51 -45
- package/esm/MenuDesktop/MenuDesktop.js +139 -128
- package/esm/MenuItem/MenuItem.js +75 -64
- package/esm/Meta/Meta.js +21 -19
- package/esm/Modal/Modal.js +52 -39
- package/esm/ModalFooter/ModalFooter.js +12 -12
- package/esm/ModalHeader/ModalHeader.js +12 -12
- package/esm/ModalIcon/ModalIcon.js +55 -13
- package/esm/ModalMain/ModalMain.js +12 -12
- package/esm/ModalText/ModalText.js +12 -12
- package/esm/ModalTitle/ModalTitle.js +12 -12
- package/esm/MoreOptions/MoreOptions.js +14 -12
- package/esm/Move/Move.js +9 -6
- package/esm/NavigationBar/NavigationBar.js +7 -6
- package/esm/NavigationDrawer/NavigationDrawer.js +7 -6
- package/esm/NavigationItem/NavigationItem.js +58 -48
- package/esm/NavigationRail/NavigationRail.js +25 -22
- package/esm/NotFound/NotFound.js +21 -18
- package/esm/NumericTextField/NumericTextField.js +14 -9
- package/esm/Page/Page.js +50 -38
- package/esm/PageTransition/PageTransition.js +8 -7
- package/esm/Pagination/Pagination.js +41 -31
- package/esm/PaginationItem/PaginationItem.js +20 -18
- package/esm/Parallax/Parallax.js +4 -3
- package/esm/Path/Path.js +9 -11
- package/esm/PieChart/PieChart.js +96 -79
- package/esm/Placeholder/Placeholder.js +15 -12
- package/esm/Portal/Portal.js +41 -18
- package/esm/Properties/Properties.js +17 -18
- package/esm/Property/Property.js +24 -17
- package/esm/Radio/Radio.js +25 -21
- package/esm/Radios/Radios.js +30 -26
- package/esm/Rating/Rating.js +35 -30
- package/esm/Reset/Reset.js +4 -1
- package/esm/Reveal/Reveal.js +17 -13
- package/esm/RichTextEditor/RichTextEditor.js +1011 -824
- package/esm/RoundMeter/RoundMeter.js +98 -93
- package/esm/RoundProgress/RoundProgress.js +36 -32
- package/esm/ScatterChart/ScatterChart.js +15 -17
- package/esm/ScatterChartItem/ScatterChartItem.js +36 -34
- package/esm/ScreenCapture/ScreenCapture.js +57 -43
- package/esm/Section/Section.js +66 -56
- package/esm/SectionAction/SectionAction.js +17 -13
- package/esm/SectionBoxes/SectionBoxes.js +75 -67
- package/esm/SectionCards/SectionCards.js +86 -76
- package/esm/SectionCarousel/SectionCarousel.js +72 -65
- package/esm/SectionContact/SectionContact.js +65 -58
- package/esm/SectionImageGallery/SectionImageGallery.js +13 -10
- package/esm/SectionLogos/SectionLogos.js +34 -30
- package/esm/SectionMedia/SectionMedia.js +41 -34
- package/esm/SectionReviews/SectionReviews.js +74 -65
- package/esm/SectionTextMedia/SectionTextMedia.js +64 -57
- package/esm/SectionTimeline/SectionTimeline.js +46 -43
- package/esm/SectionWatch/SectionWatch.js +12 -9
- package/esm/Select/Select.js +161 -149
- package/esm/Share/Share.js +165 -151
- package/esm/Slide/Slide.js +28 -25
- package/esm/Slider/Slider.js +86 -80
- package/esm/SmartTextField/SmartTextField.js +450 -358
- package/esm/Snackbar/Snackbar.js +48 -38
- package/esm/Snackbars/Snackbars.js +40 -37
- package/esm/Space/Space.js +731 -630
- package/esm/SpeechToText/SpeechToText.js +20 -14
- package/esm/SpeedDial/SpeedDial.js +84 -65
- package/esm/SpeedDialItem/SpeedDialItem.js +22 -19
- package/esm/SpyScroll/SpyScroll.js +16 -12
- package/esm/Step/Step.js +29 -27
- package/esm/Stepper/Stepper.js +42 -41
- package/esm/Surface/Surface.js +7 -7
- package/esm/Switch/Switch.js +49 -41
- package/esm/Tab/Tab.js +40 -35
- package/esm/Table/Table.js +19 -16
- package/esm/TableBody/TableBody.js +14 -14
- package/esm/TableCell/TableCell.js +37 -30
- package/esm/TableFooter/TableFooter.js +13 -13
- package/esm/TableHead/TableHead.js +25 -21
- package/esm/TableHeader/TableHeader.js +14 -14
- package/esm/TablePagination/TablePagination.js +67 -49
- package/esm/TableRow/TableRow.js +14 -14
- package/esm/Tabs/Tabs.js +55 -49
- package/esm/Text/Text.js +17 -13
- package/esm/TextField/TextField.js +129 -105
- package/esm/TextToSpeech/TextToSpeech.js +20 -14
- package/esm/TimePicker/TimePicker.js +196 -160
- package/esm/TimeRangePicker/TimeRangePicker.js +9 -11
- package/esm/Timeline/Timeline.js +13 -13
- package/esm/TimelineItem/TimelineItem.js +29 -24
- package/esm/Timer/Timer.js +137 -94
- package/esm/ToggleButton/ToggleButton.js +10 -12
- package/esm/ToggleButtons/ToggleButtons.js +9 -11
- package/esm/Tooltip/Tooltip.js +62 -53
- package/esm/TopAppBar/TopAppBar.js +32 -25
- package/esm/Transition/Transition.js +11 -9
- package/esm/Tree/Tree.js +73 -61
- package/esm/Type/Type.js +7 -6
- package/esm/VideoPlayer/VideoPlayer.js +207 -170
- package/esm/ViewSplit/ViewSplit.js +49 -40
- package/esm/Watch/Watch.js +204 -187
- package/esm/Weather/Weather.js +58 -49
- package/esm/Whiteboard/Whiteboard.js +28 -24
- package/esm/Widgets/Widgets.js +57 -51
- package/esm/WindowSplit/WindowSplit.js +59 -52
- package/esm/Zoom/Zoom.js +60 -52
- package/esm/index.js +1 -1
- package/esm/useSubscription/useSubscription.js +25 -73
- package/index.js +1 -1
- package/package.json +3 -3
- package/useSubscription/useSubscription.js +25 -73
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
const _excluded = ["tonal", "color", "version", "value", "onChange", "render", "miniMenu", "miniMenuInclude", "exclude", "updates", "actions", "fontFamilies", "addFontFamilies", "IconItalic", "IconUnderline", "IconBold", "IconStrikeLine", "IconColor", "IconBackground", "IconAlignLeft", "IconAlignCenter", "IconAlignRight", "IconAlignJustify", "IconIndent", "IconOutdent", "IconSuperscript", "IconSubscript", "IconListOrdered", "IconListUnordered", "IconHorizontalRule", "IconLinkAdd", "IconLinkRemove", "IconQuote", "IconImage", "IconVideo", "IconVideoYoutube", "IconTable", "IconCode", "IconDrawing", "IconCopy", "IconCut", "IconPaste", "IconDelete", "IconClear", "IconSelectAll", "IconSave", "IconPrint", "IconUndo", "IconRedo", "AppendProps", "ToolbarProps", "ToolbarUpdatesProps", "ToolbarActionsProps", "ToggleButtonProps", "ToggleButtonsProps", "DividerProps", "SelectProps", "ListItemProps", "TooltipProps", "MiniMenuProps", "DrawingProps", "IconProps", "ColorTextFieldProps", "Component", "className", "children"],
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "version", "value", "onChange", "render", "miniMenu", "miniMenuInclude", "exclude", "updates", "actions", "fontFamilies", "addFontFamilies", "IconItalic", "IconUnderline", "IconBold", "IconStrikeLine", "IconColor", "IconBackground", "IconAlignLeft", "IconAlignCenter", "IconAlignRight", "IconAlignJustify", "IconIndent", "IconOutdent", "IconSuperscript", "IconSubscript", "IconListOrdered", "IconListUnordered", "IconHorizontalRule", "IconLinkAdd", "IconLinkRemove", "IconQuote", "IconImage", "IconVideo", "IconVideoYoutube", "IconTable", "IconCode", "IconDrawing", "IconCopy", "IconCut", "IconPaste", "IconDelete", "IconClear", "IconSelectAll", "IconSave", "IconPrint", "IconUndo", "IconRedo", "AppendProps", "ToolbarProps", "ToolbarUpdatesProps", "ToolbarActionsProps", "ToggleButtonProps", "ToggleButtonsProps", "DividerProps", "SelectProps", "ListItemProps", "TooltipProps", "MiniMenuProps", "DrawingProps", "IconProps", "ColorTextFieldProps", "Component", "className", "children"],
|
|
5
4
|
_excluded2 = ["open", "name", "children"],
|
|
6
5
|
_excluded3 = ["open", "element", "anchorElement", "onClose", "children"],
|
|
7
6
|
_excluded4 = ["color"],
|
|
8
|
-
_excluded5 = ["version", "onUpdate", "onClose"],
|
|
9
|
-
_excluded6 = ["label", "labelButton", "value", "onChange", "onClick", "InputComponent", "InputProps"];
|
|
7
|
+
_excluded5 = ["ref", "version", "onUpdate", "onClose"],
|
|
8
|
+
_excluded6 = ["ref", "label", "labelButton", "value", "onChange", "onClick", "InputComponent", "InputProps"];
|
|
10
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
11
|
import React from 'react';
|
|
@@ -68,6 +67,7 @@ import SurfaceElement from '../Surface';
|
|
|
68
67
|
import ListItemElement from '../ListItem';
|
|
69
68
|
import LineElement from '../Line';
|
|
70
69
|
import { print, save, staticClassName } from '../utils';
|
|
70
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
71
71
|
const useStyle = styleMethod(theme => ({
|
|
72
72
|
root: {
|
|
73
73
|
width: '100%'
|
|
@@ -207,7 +207,7 @@ const useStyle = styleMethod(theme => ({
|
|
|
207
207
|
}), {
|
|
208
208
|
name: 'onesy-RichTextEditor'
|
|
209
209
|
});
|
|
210
|
-
const RichTextEditor =
|
|
210
|
+
const RichTextEditor = props__ => {
|
|
211
211
|
const theme = useOnesyTheme();
|
|
212
212
|
const l = theme.l;
|
|
213
213
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyRichTextEditor?.props?.default), props__);
|
|
@@ -231,6 +231,7 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
231
231
|
const Button = theme?.elements?.Button || ButtonElement;
|
|
232
232
|
const ListItem = theme?.elements?.ListItem || ListItemElement;
|
|
233
233
|
const {
|
|
234
|
+
ref,
|
|
234
235
|
tonal = true,
|
|
235
236
|
color = 'default',
|
|
236
237
|
version = 'filled',
|
|
@@ -611,18 +612,20 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
611
612
|
const IconProps = _objectSpread({
|
|
612
613
|
size: 'small'
|
|
613
614
|
}, IconProps_);
|
|
614
|
-
const WrapperToggleButton =
|
|
615
|
+
const WrapperToggleButton = props_ => {
|
|
615
616
|
const {
|
|
616
617
|
open: open_,
|
|
617
618
|
name,
|
|
618
619
|
children: children__0
|
|
619
620
|
} = props_,
|
|
620
621
|
other__0 = _objectWithoutProperties(props_, _excluded2);
|
|
621
|
-
return /*#__PURE__*/
|
|
622
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
622
623
|
open: open_ !== undefined ? open_ : undefined,
|
|
623
624
|
name: name
|
|
624
|
-
}, TooltipProps),
|
|
625
|
-
|
|
625
|
+
}, TooltipProps), {}, {
|
|
626
|
+
children: /*#__PURE__*/React.cloneElement(children__0, _objectSpread(_objectSpread({}, other__0), children__0.props))
|
|
627
|
+
}));
|
|
628
|
+
};
|
|
626
629
|
const WrapperAppend = props__0 => {
|
|
627
630
|
const {
|
|
628
631
|
open: open__0,
|
|
@@ -632,17 +635,22 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
632
635
|
children: children__1
|
|
633
636
|
} = props__0,
|
|
634
637
|
other__1 = _objectWithoutProperties(props__0, _excluded3);
|
|
635
|
-
return /*#__PURE__*/
|
|
638
|
+
return /*#__PURE__*/_jsx(Append, _objectSpread(_objectSpread({
|
|
636
639
|
open: open__0,
|
|
637
|
-
element: /*#__PURE__*/
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
640
|
+
element: /*#__PURE__*/_jsx("div", {
|
|
641
|
+
children: /*#__PURE__*/_jsx(Fade, {
|
|
642
|
+
in: open__0,
|
|
643
|
+
add: true,
|
|
644
|
+
children: /*#__PURE__*/React.cloneElement(element_0)
|
|
645
|
+
})
|
|
646
|
+
}),
|
|
641
647
|
anchorElement: anchorElement,
|
|
642
648
|
portal: true,
|
|
643
649
|
alignment: "center",
|
|
644
650
|
position: "bottom"
|
|
645
|
-
}, AppendProps),
|
|
651
|
+
}, AppendProps), {}, {
|
|
652
|
+
children: /*#__PURE__*/React.cloneElement(children__1, _objectSpread(_objectSpread({}, other__1), children__1.props))
|
|
653
|
+
}));
|
|
646
654
|
};
|
|
647
655
|
const onMouseDown = () => {
|
|
648
656
|
const selection__0 = refs.rootWindow.current.getSelection();
|
|
@@ -660,104 +668,111 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
660
668
|
color: color_
|
|
661
669
|
} = props__1,
|
|
662
670
|
other__2 = _objectWithoutProperties(props__1, _excluded4);
|
|
663
|
-
return /*#__PURE__*/
|
|
671
|
+
return /*#__PURE__*/_jsx("span", _objectSpread({
|
|
664
672
|
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-palette-item'], classes.paletteItem]),
|
|
665
673
|
style: {
|
|
666
674
|
background: color_
|
|
667
675
|
}
|
|
668
676
|
}, other__2));
|
|
669
677
|
};
|
|
670
|
-
const Palette =
|
|
678
|
+
const Palette = props__2 => {
|
|
671
679
|
const {
|
|
680
|
+
ref: ref_,
|
|
672
681
|
version: version_,
|
|
673
682
|
onUpdate: onUpdate_,
|
|
674
683
|
onClose: onClose_0
|
|
675
684
|
} = props__2,
|
|
676
685
|
other__3 = _objectWithoutProperties(props__2, _excluded5);
|
|
677
|
-
return /*#__PURE__*/
|
|
678
|
-
ref:
|
|
686
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
687
|
+
ref: ref_,
|
|
679
688
|
gap: 1,
|
|
680
689
|
direction: "column",
|
|
681
690
|
tonal: tonal,
|
|
682
691
|
color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed',
|
|
683
692
|
Component: Surface,
|
|
684
693
|
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-palette'], classes.palette])
|
|
685
|
-
}, other__3),
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
694
|
+
}, other__3), {}, {
|
|
695
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
696
|
+
gap: 0.5,
|
|
697
|
+
onMouseUp: onMouseUp,
|
|
698
|
+
onMouseDown: onMouseDown,
|
|
699
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
700
|
+
gap: 0.5,
|
|
701
|
+
direction: "row",
|
|
702
|
+
style: {
|
|
703
|
+
width: '100%'
|
|
704
|
+
},
|
|
705
|
+
children: [/*#__PURE__*/_jsx(PaletteItem, {
|
|
706
|
+
color: "#000000",
|
|
707
|
+
onClick: () => {
|
|
708
|
+
onUpdate_('#000000');
|
|
709
|
+
onClose_0();
|
|
710
|
+
}
|
|
711
|
+
}), /*#__PURE__*/_jsx(PaletteItem, {
|
|
712
|
+
color: "#ffffff",
|
|
713
|
+
onClick: () => {
|
|
714
|
+
onUpdate_('#ffffff');
|
|
715
|
+
onClose_0();
|
|
716
|
+
}
|
|
717
|
+
})]
|
|
718
|
+
}), Object.keys(colors).filter(item_23 => !['black', 'white'].includes(item_23)).map((item_24, index_0) => /*#__PURE__*/_jsx(Line, {
|
|
719
|
+
gap: 0.5,
|
|
720
|
+
direction: "row",
|
|
721
|
+
style: {
|
|
722
|
+
width: '100%'
|
|
723
|
+
},
|
|
724
|
+
children: Object.keys(colors[item_24]).map((item_, index_) => /*#__PURE__*/_jsx(PaletteItem, {
|
|
725
|
+
color: colors[item_24][item_],
|
|
726
|
+
onClick: () => {
|
|
727
|
+
if (refs.range.current) {
|
|
728
|
+
const selection__2 = refs.rootWindow.current.getSelection();
|
|
729
|
+
selection__2.removeAllRanges();
|
|
730
|
+
selection__2.addRange(refs.range.current);
|
|
731
|
+
}
|
|
732
|
+
onUpdate_(colors[item_24][item_]);
|
|
733
|
+
onClose_0();
|
|
734
|
+
}
|
|
735
|
+
}, index_))
|
|
736
|
+
}, index_0))]
|
|
737
|
+
}), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsxs(Line, {
|
|
738
|
+
gap: 0.5,
|
|
739
|
+
direction: "row",
|
|
740
|
+
align: "center",
|
|
741
|
+
style: {
|
|
742
|
+
width: '100%'
|
|
743
|
+
},
|
|
744
|
+
children: [/*#__PURE__*/_jsx(ColorTextField, _objectSpread(_objectSpread({
|
|
745
|
+
tonal: tonal,
|
|
746
|
+
color: color,
|
|
747
|
+
name: l('Custom color'),
|
|
748
|
+
version: "outlined",
|
|
749
|
+
size: "small",
|
|
750
|
+
value: refs.inputValues.current[version_],
|
|
751
|
+
onChange: valueNew => updateInputValues(version_, valueNew)
|
|
752
|
+
}, ColorTextFieldProps), {}, {
|
|
753
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-text-field-color'], ColorTextFieldProps?.className, classes.textFieldColor])
|
|
754
|
+
})), /*#__PURE__*/_jsx(Button, {
|
|
755
|
+
tonal: tonal,
|
|
756
|
+
color: "inherit",
|
|
757
|
+
version: "text",
|
|
758
|
+
size: "small",
|
|
759
|
+
onClick: () => {
|
|
760
|
+
if (refs.range.current) {
|
|
761
|
+
const selection__3 = refs.rootWindow.current.getSelection();
|
|
762
|
+
selection__3.removeAllRanges();
|
|
763
|
+
selection__3.addRange(refs.range.current);
|
|
764
|
+
}
|
|
765
|
+
onUpdate_(refs.inputValues.current[version_]);
|
|
766
|
+
onClose_0();
|
|
767
|
+
},
|
|
768
|
+
children: "Apply"
|
|
769
|
+
})]
|
|
770
|
+
})]
|
|
771
|
+
}));
|
|
772
|
+
};
|
|
773
|
+
const Input = props__3 => {
|
|
760
774
|
const {
|
|
775
|
+
ref: ref__0,
|
|
761
776
|
label,
|
|
762
777
|
labelButton,
|
|
763
778
|
value: value__,
|
|
@@ -767,38 +782,42 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
767
782
|
InputProps
|
|
768
783
|
} = props__3,
|
|
769
784
|
other__4 = _objectWithoutProperties(props__3, _excluded6);
|
|
770
|
-
return /*#__PURE__*/
|
|
771
|
-
ref:
|
|
785
|
+
return /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({
|
|
786
|
+
ref: ref__0,
|
|
772
787
|
gap: 1,
|
|
773
788
|
direction: "column",
|
|
774
789
|
tonal: tonal,
|
|
775
790
|
color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed',
|
|
776
791
|
Component: Surface,
|
|
777
792
|
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-palette'], classes.palette])
|
|
778
|
-
}, other__4),
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
793
|
+
}, other__4), {}, {
|
|
794
|
+
children: /*#__PURE__*/_jsxs(Line, {
|
|
795
|
+
gap: 0.5,
|
|
796
|
+
direction: "row",
|
|
797
|
+
align: "center",
|
|
798
|
+
style: {
|
|
799
|
+
width: '100%'
|
|
800
|
+
},
|
|
801
|
+
children: [/*#__PURE__*/_jsx(InputComponent, _objectSpread({
|
|
802
|
+
tonal: tonal,
|
|
803
|
+
color: color,
|
|
804
|
+
name: label,
|
|
805
|
+
version: "outlined",
|
|
806
|
+
size: "small",
|
|
807
|
+
value: value__,
|
|
808
|
+
onChange: onChange__,
|
|
809
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-text-field-color'], classes.textFieldColor])
|
|
810
|
+
}, InputProps)), /*#__PURE__*/_jsx(Button, {
|
|
811
|
+
tonal: tonal,
|
|
812
|
+
color: "inherit",
|
|
813
|
+
version: "text",
|
|
814
|
+
size: "small",
|
|
815
|
+
onClick: onClick,
|
|
816
|
+
children: labelButton
|
|
817
|
+
})]
|
|
818
|
+
})
|
|
819
|
+
}));
|
|
820
|
+
};
|
|
802
821
|
const font_families = [...fontFamilies, ...addFontFamilies];
|
|
803
822
|
const font_sizes = [{
|
|
804
823
|
label: '11',
|
|
@@ -823,34 +842,40 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
823
842
|
value: 7
|
|
824
843
|
}];
|
|
825
844
|
const font_versions = [{
|
|
826
|
-
label: /*#__PURE__*/
|
|
827
|
-
version: "b2"
|
|
828
|
-
|
|
845
|
+
label: /*#__PURE__*/_jsx(Type, {
|
|
846
|
+
version: "b2",
|
|
847
|
+
children: l('Normal text')
|
|
848
|
+
}),
|
|
829
849
|
value: 'p'
|
|
830
850
|
}, {
|
|
831
|
-
label: /*#__PURE__*/
|
|
832
|
-
version: "h1"
|
|
833
|
-
|
|
851
|
+
label: /*#__PURE__*/_jsx(Type, {
|
|
852
|
+
version: "h1",
|
|
853
|
+
children: l('Heading 1')
|
|
854
|
+
}),
|
|
834
855
|
value: 'h1'
|
|
835
856
|
}, {
|
|
836
|
-
label: /*#__PURE__*/
|
|
837
|
-
version: "h2"
|
|
838
|
-
|
|
857
|
+
label: /*#__PURE__*/_jsx(Type, {
|
|
858
|
+
version: "h2",
|
|
859
|
+
children: l('Heading 2')
|
|
860
|
+
}),
|
|
839
861
|
value: 'h2'
|
|
840
862
|
}, {
|
|
841
|
-
label: /*#__PURE__*/
|
|
842
|
-
version: "h3"
|
|
843
|
-
|
|
863
|
+
label: /*#__PURE__*/_jsx(Type, {
|
|
864
|
+
version: "h3",
|
|
865
|
+
children: l('Heading 3')
|
|
866
|
+
}),
|
|
844
867
|
value: 'h3'
|
|
845
868
|
}, {
|
|
846
|
-
label: /*#__PURE__*/
|
|
847
|
-
version: "t1"
|
|
848
|
-
|
|
869
|
+
label: /*#__PURE__*/_jsx(Type, {
|
|
870
|
+
version: "t1",
|
|
871
|
+
children: l('Heading 4')
|
|
872
|
+
}),
|
|
849
873
|
value: 'h4'
|
|
850
874
|
}, {
|
|
851
|
-
label: /*#__PURE__*/
|
|
852
|
-
version: "t2"
|
|
853
|
-
|
|
875
|
+
label: /*#__PURE__*/_jsx(Type, {
|
|
876
|
+
version: "t2",
|
|
877
|
+
children: l('Heading 5')
|
|
878
|
+
}),
|
|
854
879
|
value: 'h5'
|
|
855
880
|
}];
|
|
856
881
|
const queryValueUpdate = () => {
|
|
@@ -927,7 +952,7 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
927
952
|
queryValueUpdate();
|
|
928
953
|
};
|
|
929
954
|
const updateElements = {
|
|
930
|
-
'font-version': /*#__PURE__*/
|
|
955
|
+
'font-version': /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
|
|
931
956
|
name: l('Font Version'),
|
|
932
957
|
valueDefault: font_versions.find(item_26 => item_26.value.includes('p')).value,
|
|
933
958
|
value: inputValues['font-version'],
|
|
@@ -937,18 +962,18 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
937
962
|
},
|
|
938
963
|
onMouseUp: onMouseUp,
|
|
939
964
|
onMouseDown: onMouseDown
|
|
940
|
-
}, SelectProps, {
|
|
965
|
+
}, SelectProps), {}, {
|
|
941
966
|
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-select'], SelectProps?.className, classes.select]),
|
|
942
967
|
style: {
|
|
943
968
|
minWidth: '150px'
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
}
|
|
951
|
-
'font-family': /*#__PURE__*/
|
|
969
|
+
},
|
|
970
|
+
children: font_versions.map(item_27 => /*#__PURE__*/_jsx(ListItem, _objectSpread({
|
|
971
|
+
primary: item_27.label,
|
|
972
|
+
value: item_27.value,
|
|
973
|
+
button: true
|
|
974
|
+
}, ListItemProps), item_27.value))
|
|
975
|
+
})),
|
|
976
|
+
'font-family': /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
|
|
952
977
|
name: l('Font Family'),
|
|
953
978
|
valueDefault: font_families.find(item_28 => item_28.label.includes('DM Sans')).value,
|
|
954
979
|
value: inputValues['font-family'],
|
|
@@ -958,21 +983,21 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
958
983
|
},
|
|
959
984
|
onMouseUp: onMouseUp,
|
|
960
985
|
onMouseDown: onMouseDown
|
|
961
|
-
}, SelectProps, {
|
|
986
|
+
}, SelectProps), {}, {
|
|
962
987
|
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-select'], SelectProps?.className, classes.select]),
|
|
963
988
|
style: {
|
|
964
989
|
minWidth: '140px'
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
'font-size': /*#__PURE__*/
|
|
990
|
+
},
|
|
991
|
+
children: font_families.map(item_29 => /*#__PURE__*/_jsx(ListItem, _objectSpread({
|
|
992
|
+
primary: item_29.label,
|
|
993
|
+
value: item_29.value,
|
|
994
|
+
button: true,
|
|
995
|
+
style: {
|
|
996
|
+
fontFamily: item_29.value
|
|
997
|
+
}
|
|
998
|
+
}, ListItemProps), item_29.value))
|
|
999
|
+
})),
|
|
1000
|
+
'font-size': /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
|
|
976
1001
|
name: l('Font Size'),
|
|
977
1002
|
valueDefault: +font_sizes.find(item_30 => item_30.label.includes('14')).value,
|
|
978
1003
|
value: inputValues['font-size'],
|
|
@@ -982,590 +1007,685 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
982
1007
|
},
|
|
983
1008
|
onMouseUp: onMouseUp,
|
|
984
1009
|
onMouseDown: onMouseDown
|
|
985
|
-
}, SelectProps, {
|
|
986
|
-
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-select'], SelectProps?.className, classes.select])
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
}
|
|
993
|
-
'italic': /*#__PURE__*/
|
|
994
|
-
name: l('Italic')
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1010
|
+
}, SelectProps), {}, {
|
|
1011
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-select'], SelectProps?.className, classes.select]),
|
|
1012
|
+
children: font_sizes.map(item_31 => /*#__PURE__*/_jsx(ListItem, _objectSpread({
|
|
1013
|
+
primary: item_31.label,
|
|
1014
|
+
value: item_31.value,
|
|
1015
|
+
button: true
|
|
1016
|
+
}, ListItemProps), item_31.value))
|
|
1017
|
+
})),
|
|
1018
|
+
'italic': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1019
|
+
name: l('Italic'),
|
|
1020
|
+
children: is('function', render) ? render('italic', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1021
|
+
selected: refs.selected.current.includes('italic'),
|
|
1022
|
+
onClick: method('italic'),
|
|
1023
|
+
children: /*#__PURE__*/_jsx(IconItalic, _objectSpread({}, IconProps))
|
|
1024
|
+
}))
|
|
1025
|
+
}),
|
|
1026
|
+
'underline': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1027
|
+
name: l('Underline'),
|
|
1028
|
+
children: is('function', render) ? render('underline', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1029
|
+
selected: refs.selected.current.includes('underline'),
|
|
1030
|
+
onClick: method('underline'),
|
|
1031
|
+
children: /*#__PURE__*/_jsx(IconUnderline, _objectSpread({}, IconProps))
|
|
1032
|
+
}))
|
|
1033
|
+
}),
|
|
1034
|
+
'bold': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1006
1035
|
name: l('Bold'),
|
|
1007
|
-
onClick: method('bold')
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1036
|
+
onClick: method('bold'),
|
|
1037
|
+
children: is('function', render) ? render('bold', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1038
|
+
selected: refs.selected.current.includes('bold'),
|
|
1039
|
+
children: /*#__PURE__*/_jsx(IconBold, _objectSpread({}, IconProps))
|
|
1040
|
+
}))
|
|
1041
|
+
}),
|
|
1042
|
+
'strike-line': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1012
1043
|
name: l('Strike Line'),
|
|
1013
|
-
onClick: method('strike-line')
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1044
|
+
onClick: method('strike-line'),
|
|
1045
|
+
children: is('function', render) ? render('strike-line', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1046
|
+
selected: refs.selected.current.includes('strike-line'),
|
|
1047
|
+
children: /*#__PURE__*/_jsx(IconStrikeLine, _objectSpread({}, IconProps))
|
|
1048
|
+
}))
|
|
1049
|
+
}),
|
|
1050
|
+
'font-color': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1018
1051
|
open: refs.open.current.color,
|
|
1019
1052
|
anchorElement: refs.elements.color.current,
|
|
1020
|
-
element: /*#__PURE__*/
|
|
1053
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1021
1054
|
onClickOutside: () => updateOpen('color', false),
|
|
1022
|
-
include: [refs.elements.color.current]
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1055
|
+
include: [refs.elements.color.current],
|
|
1056
|
+
children: /*#__PURE__*/_jsx(Palette, {
|
|
1057
|
+
version: "font-color",
|
|
1058
|
+
onClose: () => updateOpen('color', false),
|
|
1059
|
+
onUpdate: method('font-color')
|
|
1060
|
+
})
|
|
1061
|
+
}),
|
|
1062
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1063
|
+
name: l('Text Color'),
|
|
1064
|
+
open: refs.open.current.color ? false : undefined,
|
|
1065
|
+
children: is('function', render) ? render('font-color', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1066
|
+
ref: refs.elements.color
|
|
1067
|
+
}, ToggleButtonProps), {}, {
|
|
1068
|
+
selected: refs.open.current.color,
|
|
1069
|
+
onClick: () => updateOpen('color', !refs.open.current.color),
|
|
1070
|
+
children: /*#__PURE__*/_jsx(IconColor, _objectSpread({}, IconProps))
|
|
1071
|
+
}))
|
|
1072
|
+
})
|
|
1073
|
+
}),
|
|
1074
|
+
'font-color-mini-menu': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1038
1075
|
open: refs.open.current.colorMiniMenu,
|
|
1039
1076
|
anchorElement: refs.miniMenuElements.color,
|
|
1040
|
-
element: /*#__PURE__*/
|
|
1077
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1041
1078
|
onClickOutside: () => updateOpen('colorMiniMenu', false),
|
|
1042
|
-
include: [refs.miniMenuElements.color]
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1079
|
+
include: [refs.miniMenuElements.color],
|
|
1080
|
+
children: /*#__PURE__*/_jsx(Palette, {
|
|
1081
|
+
ref: refs.miniMenuElements.colorPalette,
|
|
1082
|
+
version: "font-color",
|
|
1083
|
+
onClose: () => updateOpen('colorMiniMenu', false),
|
|
1084
|
+
onUpdate: method('font-color')
|
|
1085
|
+
})
|
|
1086
|
+
}),
|
|
1087
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1088
|
+
name: l('Text Color'),
|
|
1089
|
+
open: refs.open.current.colorMiniMenu ? false : undefined,
|
|
1090
|
+
children: is('function', render) ? render('font-color', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1091
|
+
ref: refs.miniMenuElements.color
|
|
1092
|
+
}, ToggleButtonProps), {}, {
|
|
1093
|
+
selected: refs.open.current.colorMiniMenu,
|
|
1094
|
+
onClick: () => updateOpen('colorMiniMenu', !refs.open.current.colorMiniMenu),
|
|
1095
|
+
children: /*#__PURE__*/_jsx(IconColor, _objectSpread({}, IconProps))
|
|
1096
|
+
}))
|
|
1097
|
+
})
|
|
1098
|
+
}),
|
|
1099
|
+
'font-background': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1059
1100
|
open: refs.open.current.background,
|
|
1060
1101
|
anchorElement: refs.elements.background.current,
|
|
1061
|
-
element: /*#__PURE__*/
|
|
1102
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1062
1103
|
onClickOutside: () => updateOpen('background', false),
|
|
1063
|
-
include: [refs.elements.background.current]
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1104
|
+
include: [refs.elements.background.current],
|
|
1105
|
+
children: /*#__PURE__*/_jsx(Palette, {
|
|
1106
|
+
version: "font-background",
|
|
1107
|
+
onClose: () => updateOpen('background', false),
|
|
1108
|
+
onUpdate: method('font-background')
|
|
1109
|
+
})
|
|
1110
|
+
}),
|
|
1111
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1112
|
+
name: l('Background Color'),
|
|
1113
|
+
open: refs.open.current.background ? false : undefined,
|
|
1114
|
+
children: is('function', render) ? render('font-background', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1115
|
+
ref: refs.elements.background
|
|
1116
|
+
}, ToggleButtonProps), {}, {
|
|
1117
|
+
selected: refs.open.current.background,
|
|
1118
|
+
onClick: () => updateOpen('background', !refs.open.current.background),
|
|
1119
|
+
children: /*#__PURE__*/_jsx(IconBackground, _objectSpread({}, IconProps))
|
|
1120
|
+
}))
|
|
1121
|
+
})
|
|
1122
|
+
}),
|
|
1123
|
+
'font-background-mini-menu': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1079
1124
|
open: refs.open.current.backgroundMiniMenu,
|
|
1080
1125
|
anchorElement: refs.miniMenuElements.background,
|
|
1081
|
-
element: /*#__PURE__*/
|
|
1126
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1082
1127
|
onClickOutside: () => updateOpen('backgroundMiniMenu', false),
|
|
1083
|
-
include: [refs.miniMenuElements.background]
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1128
|
+
include: [refs.miniMenuElements.background],
|
|
1129
|
+
children: /*#__PURE__*/_jsx(Palette, {
|
|
1130
|
+
ref: refs.miniMenuElements.backgroundPalette,
|
|
1131
|
+
version: "font-background",
|
|
1132
|
+
onClose: () => updateOpen('backgroundMiniMenu', false),
|
|
1133
|
+
onUpdate: method('font-background')
|
|
1134
|
+
})
|
|
1135
|
+
}),
|
|
1136
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1137
|
+
name: l('Text Color'),
|
|
1138
|
+
open: refs.open.current.backgroundMiniMenu ? false : undefined,
|
|
1139
|
+
children: is('function', render) ? render('font-background', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1140
|
+
ref: refs.miniMenuElements.background
|
|
1141
|
+
}, ToggleButtonProps), {}, {
|
|
1142
|
+
selected: refs.open.current.backgroundMiniMenu,
|
|
1143
|
+
onClick: () => updateOpen('backgroundMiniMenu', !refs.open.current.backgroundMiniMenu),
|
|
1144
|
+
children: /*#__PURE__*/_jsx(IconBackground, _objectSpread({}, IconProps))
|
|
1145
|
+
}))
|
|
1146
|
+
})
|
|
1147
|
+
}),
|
|
1148
|
+
'align-left': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1149
|
+
name: l('Align Left'),
|
|
1150
|
+
children: is('function', render) ? render('align-left', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1151
|
+
selected: refs.selected.current.includes('align-left'),
|
|
1152
|
+
onClick: method('align-left'),
|
|
1153
|
+
children: /*#__PURE__*/_jsx(IconAlignLeft, _objectSpread({}, IconProps))
|
|
1154
|
+
}))
|
|
1155
|
+
}),
|
|
1156
|
+
'align-center': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1157
|
+
name: l('Align Center'),
|
|
1158
|
+
children: is('function', render) ? render('align-center', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1159
|
+
selected: refs.selected.current.includes('align-center'),
|
|
1160
|
+
onClick: method('align-center'),
|
|
1161
|
+
children: /*#__PURE__*/_jsx(IconAlignCenter, _objectSpread({}, IconProps))
|
|
1162
|
+
}))
|
|
1163
|
+
}),
|
|
1164
|
+
'align-right': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1165
|
+
name: l('Align Right'),
|
|
1166
|
+
children: is('function', render) ? render('align-right', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1167
|
+
selected: refs.selected.current.includes('align-right'),
|
|
1168
|
+
onClick: method('align-right'),
|
|
1169
|
+
children: /*#__PURE__*/_jsx(IconAlignRight, _objectSpread({}, IconProps))
|
|
1089
1170
|
}))
|
|
1090
|
-
},
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
}),
|
|
1099
|
-
'
|
|
1100
|
-
name: l('
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
}),
|
|
1145
|
-
'
|
|
1146
|
-
name: l('List Ordered')
|
|
1147
|
-
}, is('function', render) ? render('list-ordered', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1148
|
-
selected: refs.selected.current.includes('list-ordered'),
|
|
1149
|
-
onClick: method('list-ordered')
|
|
1150
|
-
}), /*#__PURE__*/React.createElement(IconListOrdered, IconProps))),
|
|
1151
|
-
'list-unordered': /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1152
|
-
name: l('List Unordered')
|
|
1153
|
-
}, is('function', render) ? render('list-unordered', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1154
|
-
selected: refs.selected.current.includes('list-unordered'),
|
|
1155
|
-
onClick: method('list-unordered')
|
|
1156
|
-
}), /*#__PURE__*/React.createElement(IconListUnordered, IconProps))),
|
|
1157
|
-
'horizontal-rule': /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1171
|
+
}),
|
|
1172
|
+
'align-justify': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1173
|
+
name: l('Align Justify'),
|
|
1174
|
+
children: is('function', render) ? render('align-justify', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1175
|
+
selected: refs.selected.current.includes('align-justify'),
|
|
1176
|
+
onClick: method('align-justify'),
|
|
1177
|
+
children: /*#__PURE__*/_jsx(IconAlignJustify, _objectSpread({}, IconProps))
|
|
1178
|
+
}))
|
|
1179
|
+
}),
|
|
1180
|
+
'indent': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1181
|
+
name: l('Indent'),
|
|
1182
|
+
children: is('function', render) ? render('indent', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1183
|
+
onClick: method('indent'),
|
|
1184
|
+
children: /*#__PURE__*/_jsx(IconIndent, _objectSpread({}, IconProps))
|
|
1185
|
+
}))
|
|
1186
|
+
}),
|
|
1187
|
+
'outdent': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1188
|
+
name: l('Outdent'),
|
|
1189
|
+
children: is('function', render) ? render('outdent', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1190
|
+
onClick: method('outdent'),
|
|
1191
|
+
children: /*#__PURE__*/_jsx(IconOutdent, _objectSpread({}, IconProps))
|
|
1192
|
+
}))
|
|
1193
|
+
}),
|
|
1194
|
+
'superscript': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1195
|
+
name: l('Superscript'),
|
|
1196
|
+
children: is('function', render) ? render('superscript', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1197
|
+
selected: refs.selected.current.includes('superscript'),
|
|
1198
|
+
onClick: method('superscript'),
|
|
1199
|
+
children: /*#__PURE__*/_jsx(IconSuperscript, _objectSpread({}, IconProps))
|
|
1200
|
+
}))
|
|
1201
|
+
}),
|
|
1202
|
+
'subscript': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1203
|
+
name: l('Subscript'),
|
|
1204
|
+
children: is('function', render) ? render('subscript', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1205
|
+
selected: refs.selected.current.includes('subscript'),
|
|
1206
|
+
onClick: method('subscript'),
|
|
1207
|
+
children: /*#__PURE__*/_jsx(IconSubscript, _objectSpread({}, IconProps))
|
|
1208
|
+
}))
|
|
1209
|
+
}),
|
|
1210
|
+
'list-ordered': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1211
|
+
name: l('List Ordered'),
|
|
1212
|
+
children: is('function', render) ? render('list-ordered', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1213
|
+
selected: refs.selected.current.includes('list-ordered'),
|
|
1214
|
+
onClick: method('list-ordered'),
|
|
1215
|
+
children: /*#__PURE__*/_jsx(IconListOrdered, _objectSpread({}, IconProps))
|
|
1216
|
+
}))
|
|
1217
|
+
}),
|
|
1218
|
+
'list-unordered': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1219
|
+
name: l('List Unordered'),
|
|
1220
|
+
children: is('function', render) ? render('list-unordered', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1221
|
+
selected: refs.selected.current.includes('list-unordered'),
|
|
1222
|
+
onClick: method('list-unordered'),
|
|
1223
|
+
children: /*#__PURE__*/_jsx(IconListUnordered, _objectSpread({}, IconProps))
|
|
1224
|
+
}))
|
|
1225
|
+
}),
|
|
1226
|
+
'horizontal-rule': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1158
1227
|
name: l('Insert Horizontal Rule'),
|
|
1159
|
-
onClick: method('horizontal-rule')
|
|
1160
|
-
|
|
1161
|
-
|
|
1228
|
+
onClick: method('horizontal-rule'),
|
|
1229
|
+
children: is('function', render) ? render('horizontal-rule', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1230
|
+
children: /*#__PURE__*/_jsx(IconHorizontalRule, _objectSpread({}, IconProps))
|
|
1231
|
+
}))
|
|
1232
|
+
}),
|
|
1233
|
+
'link-add': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1162
1234
|
open: refs.open.current.link,
|
|
1163
1235
|
anchorElement: refs.elements.linkAdd.current,
|
|
1164
|
-
element: /*#__PURE__*/
|
|
1236
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1165
1237
|
onClickOutside: () => updateOpen('link', false),
|
|
1166
|
-
include: [refs.elements.linkAdd.current]
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1238
|
+
include: [refs.elements.linkAdd.current],
|
|
1239
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
1240
|
+
name: l('Link'),
|
|
1241
|
+
labelButton: l('Add'),
|
|
1242
|
+
value: refs.inputValues.current.link,
|
|
1243
|
+
onChange: valueNew_3 => updateInputValues('link', valueNew_3),
|
|
1244
|
+
onClick: () => {
|
|
1245
|
+
if (refs.range.current) {
|
|
1246
|
+
const selection__5 = refs.rootWindow.current.getSelection();
|
|
1247
|
+
selection__5.removeAllRanges();
|
|
1248
|
+
selection__5.addRange(refs.range.current);
|
|
1249
|
+
}
|
|
1250
|
+
method('link-add')(refs.inputValues.current.link);
|
|
1251
|
+
updateOpen('link', false);
|
|
1252
|
+
updateInputValues('link', '');
|
|
1177
1253
|
}
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
}),
|
|
1192
|
-
'link-add-mini-menu': /*#__PURE__*/
|
|
1254
|
+
})
|
|
1255
|
+
}),
|
|
1256
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1257
|
+
name: l('Insert Link'),
|
|
1258
|
+
open: refs.open.current.link ? false : undefined,
|
|
1259
|
+
children: is('function', render) ? render('font-color', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1260
|
+
ref: refs.elements.linkAdd
|
|
1261
|
+
}, ToggleButtonProps), {}, {
|
|
1262
|
+
selected: refs.open.current.link,
|
|
1263
|
+
onClick: () => updateOpen('link', !refs.open.current.link),
|
|
1264
|
+
children: /*#__PURE__*/_jsx(IconLinkAdd, _objectSpread({}, IconProps))
|
|
1265
|
+
}))
|
|
1266
|
+
})
|
|
1267
|
+
}),
|
|
1268
|
+
'link-add-mini-menu': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1193
1269
|
open: refs.open.current.linkMiniMenu,
|
|
1194
1270
|
anchorElement: refs.miniMenuElements.linkAdd,
|
|
1195
|
-
element: /*#__PURE__*/
|
|
1271
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1196
1272
|
onClickOutside: () => updateOpen('linkMiniMenu', false),
|
|
1197
|
-
include: [refs.miniMenuElements.linkAdd]
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1273
|
+
include: [refs.miniMenuElements.linkAdd],
|
|
1274
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
1275
|
+
ref: refs.miniMenuElements.linkAddInput,
|
|
1276
|
+
name: l('Link'),
|
|
1277
|
+
labelButton: l('Add'),
|
|
1278
|
+
value: refs.inputValues.current.link,
|
|
1279
|
+
onChange: valueNew_4 => updateInputValues('link', valueNew_4),
|
|
1280
|
+
onClick: () => {
|
|
1281
|
+
if (refs.range.current) {
|
|
1282
|
+
const selection__6 = refs.rootWindow.current.getSelection();
|
|
1283
|
+
selection__6.removeAllRanges();
|
|
1284
|
+
selection__6.addRange(refs.range.current);
|
|
1285
|
+
}
|
|
1286
|
+
method('link-add')(refs.inputValues.current.link);
|
|
1287
|
+
updateOpen('linkMiniMenu', false);
|
|
1288
|
+
updateInputValues('link', '');
|
|
1209
1289
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1290
|
+
})
|
|
1291
|
+
}),
|
|
1292
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1293
|
+
name: l('Insert Link'),
|
|
1294
|
+
open: refs.open.current.linkMiniMenu ? false : undefined,
|
|
1295
|
+
children: is('function', render) ? render('font-color', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1296
|
+
ref: refs.miniMenuElements.linkAdd
|
|
1297
|
+
}, ToggleButtonProps), {}, {
|
|
1298
|
+
selected: refs.open.current.linkMiniMenu,
|
|
1299
|
+
onClick: () => updateOpen('linkMiniMenu', !refs.open.current.linkMiniMenu),
|
|
1300
|
+
children: /*#__PURE__*/_jsx(IconLinkAdd, _objectSpread({}, IconProps))
|
|
1301
|
+
}))
|
|
1302
|
+
})
|
|
1303
|
+
}),
|
|
1304
|
+
'link-remove': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1305
|
+
name: l('Remove Link'),
|
|
1306
|
+
children: is('function', render) ? render('link-remove', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1307
|
+
onClick: method('link-remove'),
|
|
1308
|
+
children: /*#__PURE__*/_jsx(IconLinkRemove, _objectSpread({}, IconProps))
|
|
1214
1309
|
}))
|
|
1215
|
-
},
|
|
1216
|
-
|
|
1217
|
-
open: refs.open.current.linkMiniMenu ? false : undefined
|
|
1218
|
-
}, is('function', render) ? render('font-color', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({
|
|
1219
|
-
ref: refs.miniMenuElements.linkAdd
|
|
1220
|
-
}, ToggleButtonProps, {
|
|
1221
|
-
selected: refs.open.current.linkMiniMenu,
|
|
1222
|
-
onClick: () => updateOpen('linkMiniMenu', !refs.open.current.linkMiniMenu)
|
|
1223
|
-
}), /*#__PURE__*/React.createElement(IconLinkAdd, IconProps)))),
|
|
1224
|
-
'link-remove': /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1225
|
-
name: l('Remove Link')
|
|
1226
|
-
}, is('function', render) ? render('link-remove', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1227
|
-
onClick: method('link-remove')
|
|
1228
|
-
}), /*#__PURE__*/React.createElement(IconLinkRemove, IconProps))),
|
|
1229
|
-
'quote': /*#__PURE__*/React.createElement(WrapperAppend, {
|
|
1310
|
+
}),
|
|
1311
|
+
'quote': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1230
1312
|
open: refs.open.current.quote,
|
|
1231
1313
|
anchorElement: refs.elements.quote.current,
|
|
1232
|
-
element: /*#__PURE__*/
|
|
1314
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1233
1315
|
onClickOutside: () => updateOpen('quote', false),
|
|
1234
|
-
include: [refs.elements.quote.current]
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1316
|
+
include: [refs.elements.quote.current],
|
|
1317
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
1318
|
+
name: l('Quote'),
|
|
1319
|
+
labelButton: l('Add'),
|
|
1320
|
+
value: refs.inputValues.current.quote,
|
|
1321
|
+
onChange: valueNew_5 => updateInputValues('quote', valueNew_5),
|
|
1322
|
+
InputProps: {
|
|
1323
|
+
multiline: true
|
|
1324
|
+
},
|
|
1325
|
+
onClick: () => {
|
|
1326
|
+
if (refs.range.current) {
|
|
1327
|
+
const selection__7 = refs.rootWindow.current.getSelection();
|
|
1328
|
+
selection__7.removeAllRanges();
|
|
1329
|
+
selection__7.addRange(refs.range.current);
|
|
1330
|
+
}
|
|
1331
|
+
method('html')(`<blockquote>${refs.inputValues.current.quote}</blockquote>`);
|
|
1332
|
+
updateOpen('quote', false);
|
|
1333
|
+
updateInputValues('quote', '');
|
|
1248
1334
|
}
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
}),
|
|
1263
|
-
'table': /*#__PURE__*/
|
|
1335
|
+
})
|
|
1336
|
+
}),
|
|
1337
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1338
|
+
name: l('Insert Quote'),
|
|
1339
|
+
open: refs.open.current.quote ? false : undefined,
|
|
1340
|
+
children: is('function', render) ? render('quote', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1341
|
+
ref: refs.elements.quote
|
|
1342
|
+
}, ToggleButtonProps), {}, {
|
|
1343
|
+
selected: refs.open.current.quote,
|
|
1344
|
+
onClick: () => updateOpen('quote', !refs.open.current.quote),
|
|
1345
|
+
children: /*#__PURE__*/_jsx(IconQuote, _objectSpread({}, IconProps))
|
|
1346
|
+
}))
|
|
1347
|
+
})
|
|
1348
|
+
}),
|
|
1349
|
+
'table': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1264
1350
|
open: refs.open.current.table,
|
|
1265
1351
|
anchorElement: refs.elements.table.current,
|
|
1266
|
-
element: /*#__PURE__*/
|
|
1352
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1267
1353
|
onClickOutside: () => updateOpen('table', false),
|
|
1268
|
-
include: [refs.elements.table.current]
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1354
|
+
include: [refs.elements.table.current],
|
|
1355
|
+
children: /*#__PURE__*/_jsxs(Line, {
|
|
1356
|
+
gap: 1,
|
|
1357
|
+
tonal: tonal,
|
|
1358
|
+
color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed',
|
|
1359
|
+
Component: Surface,
|
|
1360
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-palette'], classes.palette]),
|
|
1361
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
1362
|
+
gap: 1,
|
|
1363
|
+
direction: "row",
|
|
1364
|
+
align: "center",
|
|
1365
|
+
justify: "center",
|
|
1366
|
+
children: [/*#__PURE__*/_jsx(NumericTextField, {
|
|
1367
|
+
name: l('Rows'),
|
|
1368
|
+
tonal: tonal,
|
|
1369
|
+
color: color,
|
|
1370
|
+
size: "small",
|
|
1371
|
+
version: "outlined",
|
|
1372
|
+
increment: false,
|
|
1373
|
+
decrement: false,
|
|
1374
|
+
value: refs.inputValues.current.tableRows,
|
|
1375
|
+
onChange: valueNew_6 => updateInputValues('tableRows', valueNew_6)
|
|
1376
|
+
}), "\xD7", /*#__PURE__*/_jsx(NumericTextField, {
|
|
1377
|
+
name: l('Columns'),
|
|
1378
|
+
tonal: tonal,
|
|
1379
|
+
color: color,
|
|
1380
|
+
size: "small",
|
|
1381
|
+
version: "outlined",
|
|
1382
|
+
increment: false,
|
|
1383
|
+
decrement: false,
|
|
1384
|
+
value: refs.inputValues.current.tableColumns,
|
|
1385
|
+
onChange: valueNew_7 => updateInputValues('tableColumns', valueNew_7)
|
|
1386
|
+
})]
|
|
1387
|
+
}), /*#__PURE__*/_jsxs(Line, {
|
|
1388
|
+
gap: 1,
|
|
1389
|
+
direction: "row",
|
|
1390
|
+
align: "center",
|
|
1391
|
+
justify: "space-between",
|
|
1392
|
+
style: {
|
|
1393
|
+
width: '100%'
|
|
1394
|
+
},
|
|
1395
|
+
children: [/*#__PURE__*/_jsxs(Label, {
|
|
1396
|
+
size: "small",
|
|
1397
|
+
children: [/*#__PURE__*/_jsx(Switch, {
|
|
1398
|
+
tonal: tonal,
|
|
1399
|
+
color: props.color !== undefined ? props.color : 'default',
|
|
1400
|
+
checked: refs.inputValues.current.tableHeader,
|
|
1401
|
+
onChange: valueNew_8 => updateInputValues('tableHeader', valueNew_8)
|
|
1402
|
+
}), l('Header')]
|
|
1403
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
1404
|
+
tonal: tonal,
|
|
1405
|
+
color: "inherit",
|
|
1406
|
+
version: "text",
|
|
1407
|
+
size: "small",
|
|
1408
|
+
onClick: () => {
|
|
1409
|
+
if (refs.range.current) {
|
|
1410
|
+
const selection__8 = refs.rootWindow.current.getSelection();
|
|
1411
|
+
selection__8.removeAllRanges();
|
|
1412
|
+
selection__8.addRange(refs.range.current);
|
|
1413
|
+
}
|
|
1414
|
+
let table = `<table>`;
|
|
1415
|
+
if (refs.inputValues.current.tableHeader && refs.inputValues.current.tableColumns > 0) {
|
|
1416
|
+
table += `<thead><tr>${'<th></th>'.repeat(refs.inputValues.current.tableColumns)}</tr></thead>`;
|
|
1417
|
+
}
|
|
1418
|
+
if (refs.inputValues.current.tableRows > 0 && refs.inputValues.current.tableColumns > 0) {
|
|
1419
|
+
table += `<tbody>`;
|
|
1420
|
+
for (let i = 0; i < refs.inputValues.current.tableRows; i++) {
|
|
1421
|
+
table += `<tr>${'<td></td>'.repeat(refs.inputValues.current.tableColumns)}</tr>`;
|
|
1422
|
+
}
|
|
1423
|
+
table += `</tbody>`;
|
|
1424
|
+
}
|
|
1425
|
+
table += `</table>`;
|
|
1426
|
+
method('html')(table);
|
|
1427
|
+
updateOpen('table', false);
|
|
1428
|
+
updateInputValues('tableRows', '');
|
|
1429
|
+
updateInputValues('tableColumns', '');
|
|
1430
|
+
updateInputValues('tableHeader', '');
|
|
1431
|
+
},
|
|
1432
|
+
children: l('Add')
|
|
1433
|
+
})]
|
|
1434
|
+
})]
|
|
1435
|
+
})
|
|
1436
|
+
}),
|
|
1437
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1438
|
+
name: l('Insert Table'),
|
|
1439
|
+
open: refs.open.current.table ? false : undefined,
|
|
1440
|
+
children: is('function', render) ? render('table', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1441
|
+
ref: refs.elements.table
|
|
1442
|
+
}, ToggleButtonProps), {}, {
|
|
1443
|
+
selected: refs.open.current.table,
|
|
1444
|
+
onClick: () => updateOpen('table', !refs.open.current.table),
|
|
1445
|
+
children: /*#__PURE__*/_jsx(IconTable, _objectSpread({}, IconProps))
|
|
1446
|
+
}))
|
|
1447
|
+
})
|
|
1448
|
+
}),
|
|
1449
|
+
'image': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1355
1450
|
open: refs.open.current.image,
|
|
1356
1451
|
anchorElement: refs.elements.image.current,
|
|
1357
|
-
element: /*#__PURE__*/
|
|
1452
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1358
1453
|
onClickOutside: () => updateOpen('image', false),
|
|
1359
|
-
include: [refs.elements.image.current]
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1454
|
+
include: [refs.elements.image.current],
|
|
1455
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
1456
|
+
name: l('Image'),
|
|
1457
|
+
labelButton: l('Add'),
|
|
1458
|
+
value: refs.inputValues.current.image,
|
|
1459
|
+
onChange: valueNew_9 => updateInputValues('image', valueNew_9),
|
|
1460
|
+
onClick: () => {
|
|
1461
|
+
if (refs.range.current) {
|
|
1462
|
+
const selection__9 = refs.rootWindow.current.getSelection();
|
|
1463
|
+
selection__9.removeAllRanges();
|
|
1464
|
+
selection__9.addRange(refs.range.current);
|
|
1465
|
+
}
|
|
1466
|
+
method('image')(refs.inputValues.current.image);
|
|
1467
|
+
updateOpen('image', false);
|
|
1468
|
+
updateInputValues('image', '');
|
|
1370
1469
|
}
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
}),
|
|
1385
|
-
'video': /*#__PURE__*/
|
|
1470
|
+
})
|
|
1471
|
+
}),
|
|
1472
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1473
|
+
name: l('Insert Image'),
|
|
1474
|
+
open: refs.open.current.image ? false : undefined,
|
|
1475
|
+
children: is('function', render) ? render('image', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1476
|
+
ref: refs.elements.image
|
|
1477
|
+
}, ToggleButtonProps), {}, {
|
|
1478
|
+
selected: refs.open.current.image,
|
|
1479
|
+
onClick: () => updateOpen('image', !refs.open.current.image),
|
|
1480
|
+
children: /*#__PURE__*/_jsx(IconImage, _objectSpread({}, IconProps))
|
|
1481
|
+
}))
|
|
1482
|
+
})
|
|
1483
|
+
}),
|
|
1484
|
+
'video': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1386
1485
|
open: refs.open.current.video,
|
|
1387
1486
|
anchorElement: refs.elements.video.current,
|
|
1388
|
-
element: /*#__PURE__*/
|
|
1487
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1389
1488
|
onClickOutside: () => updateOpen('video', false),
|
|
1390
|
-
include: [refs.elements.video.current]
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1489
|
+
include: [refs.elements.video.current],
|
|
1490
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
1491
|
+
name: l('Video'),
|
|
1492
|
+
labelButton: l('Add'),
|
|
1493
|
+
value: refs.inputValues.current.video,
|
|
1494
|
+
onChange: valueNew_10 => updateInputValues('video', valueNew_10),
|
|
1495
|
+
onClick: () => {
|
|
1496
|
+
if (refs.range.current) {
|
|
1497
|
+
const selection__10 = refs.rootWindow.current.getSelection();
|
|
1498
|
+
selection__10.removeAllRanges();
|
|
1499
|
+
selection__10.addRange(refs.range.current);
|
|
1500
|
+
}
|
|
1501
|
+
method('html')(`<video controls><source src='${refs.inputValues.current.video}' /></video>`);
|
|
1502
|
+
updateOpen('video', false);
|
|
1503
|
+
updateInputValues('video', '');
|
|
1401
1504
|
}
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
}),
|
|
1416
|
-
'video-youtube': /*#__PURE__*/
|
|
1505
|
+
})
|
|
1506
|
+
}),
|
|
1507
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1508
|
+
name: l('Insert Video'),
|
|
1509
|
+
open: refs.open.current.video ? false : undefined,
|
|
1510
|
+
children: is('function', render) ? render('video', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1511
|
+
ref: refs.elements.video
|
|
1512
|
+
}, ToggleButtonProps), {}, {
|
|
1513
|
+
selected: refs.open.current.video,
|
|
1514
|
+
onClick: () => updateOpen('video', !refs.open.current.video),
|
|
1515
|
+
children: /*#__PURE__*/_jsx(IconVideo, _objectSpread({}, IconProps))
|
|
1516
|
+
}))
|
|
1517
|
+
})
|
|
1518
|
+
}),
|
|
1519
|
+
'video-youtube': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1417
1520
|
open: refs.open.current.videoYoutube,
|
|
1418
1521
|
anchorElement: refs.elements.videoYoutube.current,
|
|
1419
|
-
element: /*#__PURE__*/
|
|
1522
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1420
1523
|
onClickOutside: () => updateOpen('videoYoutube', false),
|
|
1421
|
-
include: [refs.elements.videoYoutube.current]
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1524
|
+
include: [refs.elements.videoYoutube.current],
|
|
1525
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
1526
|
+
name: l('Youtube Video ID'),
|
|
1527
|
+
labelButton: l('Add'),
|
|
1528
|
+
value: refs.inputValues.current.videoYoutube,
|
|
1529
|
+
onChange: valueNew_11 => updateInputValues('videoYoutube', valueNew_11),
|
|
1530
|
+
onClick: () => {
|
|
1531
|
+
if (refs.range.current) {
|
|
1532
|
+
const selection__11 = refs.rootWindow.current.getSelection();
|
|
1533
|
+
selection__11.removeAllRanges();
|
|
1534
|
+
selection__11.addRange(refs.range.current);
|
|
1535
|
+
}
|
|
1536
|
+
method('html')(`<iframe width="560" height="315" src="https://www.youtube.com/embed/${refs.inputValues.current.videoYoutube}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`);
|
|
1537
|
+
updateOpen('videoYoutube', false);
|
|
1538
|
+
updateInputValues('videoYoutube', '');
|
|
1432
1539
|
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
}),
|
|
1447
|
-
'drawing': /*#__PURE__*/
|
|
1540
|
+
})
|
|
1541
|
+
}),
|
|
1542
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1543
|
+
name: l('Insert Youtube Video'),
|
|
1544
|
+
open: refs.open.current.videoYoutube ? false : undefined,
|
|
1545
|
+
children: is('function', render) ? render('videoYoutube', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1546
|
+
ref: refs.elements.videoYoutube
|
|
1547
|
+
}, ToggleButtonProps), {}, {
|
|
1548
|
+
selected: refs.open.current.videoYoutube,
|
|
1549
|
+
onClick: () => updateOpen('videoYoutube', !refs.open.current.videoYoutube),
|
|
1550
|
+
children: /*#__PURE__*/_jsx(IconVideoYoutube, _objectSpread({}, IconProps))
|
|
1551
|
+
}))
|
|
1552
|
+
})
|
|
1553
|
+
}),
|
|
1554
|
+
'drawing': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1448
1555
|
open: refs.open.current.drawing,
|
|
1449
1556
|
anchorElement: refs.elements.drawing.current,
|
|
1450
|
-
element: /*#__PURE__*/
|
|
1557
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1451
1558
|
onClickOutside: () => updateOpen('drawing', false),
|
|
1452
1559
|
include: [refs.elements.drawing, refs.elements.drawingSelect, refs.elements.drawingSelect.current, refs.elements.drawingPalette, refs.elements.drawingPalette.current, refs.elements.drawingSize, refs.elements.drawingSize.current],
|
|
1453
1560
|
includeParentQueries: ['.onesy-Drawing-palette', '.onesy-Drawing-modal'],
|
|
1454
|
-
includeQueries: ['a[download]', 'svg', 'path']
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1561
|
+
includeQueries: ['a[download]', 'svg', 'path'],
|
|
1562
|
+
children: /*#__PURE__*/_jsxs(Line, {
|
|
1563
|
+
gap: 2,
|
|
1564
|
+
tonal: tonal,
|
|
1565
|
+
color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed',
|
|
1566
|
+
Component: Surface,
|
|
1567
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-palette'], classes.palette]),
|
|
1568
|
+
children: [/*#__PURE__*/_jsx(Drawing, _objectSpread({
|
|
1569
|
+
tonal: tonal,
|
|
1570
|
+
color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed',
|
|
1571
|
+
version: version,
|
|
1572
|
+
svgRef: refs.elements.drawingSvg,
|
|
1573
|
+
SizeProps: {
|
|
1574
|
+
ref: refs.elements.drawingSize
|
|
1575
|
+
},
|
|
1576
|
+
SelectProps: {
|
|
1577
|
+
MenuProps: _objectSpread({
|
|
1578
|
+
ListProps: {
|
|
1579
|
+
ref: refs.elements.drawingSelect
|
|
1580
|
+
}
|
|
1581
|
+
}, SelectProps?.MenuProps)
|
|
1582
|
+
},
|
|
1583
|
+
PaletteProps: {
|
|
1584
|
+
ref: refs.elements.drawingPalette
|
|
1473
1585
|
}
|
|
1474
|
-
},
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
if (refs.range.current) {
|
|
1494
|
-
const selection__12 = refs.rootWindow.current.getSelection();
|
|
1495
|
-
selection__12.removeAllRanges();
|
|
1496
|
-
selection__12.addRange(refs.range.current);
|
|
1497
|
-
}
|
|
1586
|
+
}, DrawingProps)), /*#__PURE__*/_jsx(Line, {
|
|
1587
|
+
gap: 1,
|
|
1588
|
+
direction: "row",
|
|
1589
|
+
align: "center",
|
|
1590
|
+
justify: "flex-end",
|
|
1591
|
+
style: {
|
|
1592
|
+
width: '100%'
|
|
1593
|
+
},
|
|
1594
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
1595
|
+
tonal: tonal,
|
|
1596
|
+
color: "inherit",
|
|
1597
|
+
version: "text",
|
|
1598
|
+
size: "small",
|
|
1599
|
+
onClick: () => {
|
|
1600
|
+
if (refs.range.current) {
|
|
1601
|
+
const selection__12 = refs.rootWindow.current.getSelection();
|
|
1602
|
+
selection__12.removeAllRanges();
|
|
1603
|
+
selection__12.addRange(refs.range.current);
|
|
1604
|
+
}
|
|
1498
1605
|
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1606
|
+
// Get svg html element
|
|
1607
|
+
// clone it, remove circle
|
|
1608
|
+
// and add it as outer html
|
|
1609
|
+
// to the rich text editor
|
|
1610
|
+
const svg = refs.elements.drawingSvg.current;
|
|
1611
|
+
const svgClone = svg.cloneNode(true);
|
|
1505
1612
|
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1613
|
+
// Clean up
|
|
1614
|
+
svgClone.style.width = refs.inputValues.current.drawingWidth;
|
|
1615
|
+
svgClone.style.height = refs.inputValues.current.drawingHeight;
|
|
1616
|
+
svgClone.style.boxShadow = 'none';
|
|
1617
|
+
const pointers = Array.from(svgClone.querySelectorAll('.onesy-Drawing-pointer'));
|
|
1618
|
+
pointers.forEach(pointer => pointer.remove());
|
|
1619
|
+
const valueNew_12 = svgClone.outerHTML;
|
|
1620
|
+
method('html')(valueNew_12);
|
|
1621
|
+
updateOpen('drawing', false);
|
|
1622
|
+
},
|
|
1623
|
+
children: l('Add')
|
|
1624
|
+
})
|
|
1625
|
+
})]
|
|
1626
|
+
})
|
|
1627
|
+
}),
|
|
1628
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1629
|
+
name: l('Insert Drawing'),
|
|
1630
|
+
open: refs.open.current.drawing ? false : undefined,
|
|
1631
|
+
children: is('function', render) ? render('drawing', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1632
|
+
ref: refs.elements.drawing
|
|
1633
|
+
}, ToggleButtonProps), {}, {
|
|
1634
|
+
selected: refs.open.current.drawing,
|
|
1635
|
+
onClick: () => updateOpen('drawing', !refs.open.current.drawing),
|
|
1636
|
+
children: /*#__PURE__*/_jsx(IconDrawing, _objectSpread({}, IconProps))
|
|
1637
|
+
}))
|
|
1638
|
+
})
|
|
1639
|
+
}),
|
|
1640
|
+
'code': /*#__PURE__*/_jsx(WrapperAppend, {
|
|
1527
1641
|
open: refs.open.current.code,
|
|
1528
1642
|
anchorElement: refs.elements.code.current,
|
|
1529
|
-
element: /*#__PURE__*/
|
|
1643
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
1530
1644
|
onClickOutside: () => updateOpen('code', false),
|
|
1531
|
-
include: [refs.elements.code.current]
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1645
|
+
include: [refs.elements.code.current],
|
|
1646
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
1647
|
+
name: l('Code'),
|
|
1648
|
+
labelButton: l('Add'),
|
|
1649
|
+
value: refs.inputValues.current.code,
|
|
1650
|
+
onChange: valueNew_13 => updateInputValues('code', valueNew_13),
|
|
1651
|
+
InputProps: {
|
|
1652
|
+
multiline: true
|
|
1653
|
+
},
|
|
1654
|
+
onClick: () => {
|
|
1655
|
+
if (refs.range.current) {
|
|
1656
|
+
const selection__13 = refs.rootWindow.current.getSelection();
|
|
1657
|
+
selection__13.removeAllRanges();
|
|
1658
|
+
selection__13.addRange(refs.range.current);
|
|
1659
|
+
}
|
|
1660
|
+
method('html')(`<pre><code>${refs.inputValues.current.code}</code></pre>`);
|
|
1661
|
+
updateOpen('code', false);
|
|
1662
|
+
updateInputValues('code', '');
|
|
1545
1663
|
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
})
|
|
1664
|
+
})
|
|
1665
|
+
}),
|
|
1666
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1667
|
+
name: l('Insert Code'),
|
|
1668
|
+
open: refs.open.current.code ? false : undefined,
|
|
1669
|
+
children: is('function', render) ? render('code', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
1670
|
+
ref: refs.elements.code
|
|
1671
|
+
}, ToggleButtonProps), {}, {
|
|
1672
|
+
selected: refs.open.current.code,
|
|
1673
|
+
onClick: () => updateOpen('code', !refs.open.current.code),
|
|
1674
|
+
children: /*#__PURE__*/_jsx(IconCode, _objectSpread({}, IconProps))
|
|
1675
|
+
}))
|
|
1676
|
+
})
|
|
1677
|
+
})
|
|
1560
1678
|
};
|
|
1561
1679
|
const actionElements = {
|
|
1562
|
-
'clear': /*#__PURE__*/
|
|
1563
|
-
name: l('Clear')
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1680
|
+
'clear': /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1681
|
+
name: l('Clear'),
|
|
1682
|
+
children: is('function', render) ? render('clear', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1683
|
+
onClick: method('clear'),
|
|
1684
|
+
children: /*#__PURE__*/_jsx(IconClear, _objectSpread({}, IconProps))
|
|
1685
|
+
}))
|
|
1686
|
+
})
|
|
1567
1687
|
};
|
|
1568
|
-
return /*#__PURE__*/
|
|
1688
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
1569
1689
|
ref: item_32 => {
|
|
1570
1690
|
if (ref) {
|
|
1571
1691
|
if (is('function', ref)) ref(item_32);else ref.current = item_32;
|
|
@@ -1575,146 +1695,213 @@ const RichTextEditor = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
1575
1695
|
gap: 0,
|
|
1576
1696
|
Component: Component,
|
|
1577
1697
|
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-root'], className, classes.root])
|
|
1578
|
-
}, other),
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
}, ToolbarProps, {
|
|
1588
|
-
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-toolbars'], ToolbarProps?.className, classes.toolbars])
|
|
1589
|
-
}), updates_ && /*#__PURE__*/React.createElement(Line, _extends({
|
|
1590
|
-
gap: 2,
|
|
1591
|
-
direction: "row",
|
|
1592
|
-
align: "center",
|
|
1593
|
-
justify: "flex-start",
|
|
1594
|
-
role: "toolbar",
|
|
1595
|
-
"aria-label": l('Updates')
|
|
1596
|
-
}, ToolbarUpdatesProps, {
|
|
1597
|
-
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-toolbar'], ToolbarUpdatesProps?.className, classes.toolbar, classes.toolbar_updates])
|
|
1598
|
-
}), includes('font-family', 'font-size', 'font-version') && /*#__PURE__*/React.createElement(Line, {
|
|
1599
|
-
gap: 1,
|
|
1600
|
-
direction: "row",
|
|
1601
|
-
align: "center",
|
|
1602
|
-
justify: "flex-start"
|
|
1603
|
-
}, includes('font-version') && updateElements['font-version'], includes('font-family') && updateElements['font-family'], includes('font-size') && updateElements['font-size']), includes('italic', 'underlined', 'bold', 'strike-line') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('italic') && updateElements['italic'], includes('underline') && updateElements['underline'], includes('bold') && updateElements['bold'], includes('strike-line') && updateElements['strike-line']), includes('font-color', 'font-background') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('font-color') && updateElements['font-color'], includes('font-background') && updateElements['font-background']), includes('align-left', 'align-center', 'align-right', 'align-justify') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('align-left') && updateElements['align-left'], includes('align-center') && updateElements['align-center'], includes('align-right') && updateElements['align-right'], includes('align-justify') && updateElements['align-justify']), includes('indent', 'outdent') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('indent') && updateElements['indent'], includes('outdent') && updateElements['outdent']), includes('superscript', 'subscript') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('superscript') && updateElements['superscript'], includes('subscript') && updateElements['subscript']), includes('list-ordered', 'list-unordered') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('list-ordered') && updateElements['list-ordered'], includes('list-unordered') && updateElements['list-unordered']), includes('horizontal-rule') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('horizontal-rule') && updateElements['horizontal-rule']), includes('link-add', 'link-remove') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('link-add') && updateElements['link-add'], includes('link-remove') && updateElements['link-remove']), includes('quote', 'image', 'video', 'video-youtube', 'table', 'drawing', 'code') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('quote') && updateElements['quote'], includes('table') && updateElements['table'], includes('image') && updateElements['image'], includes('video') && updateElements['video'], includes('video-youtube') && updateElements['video-youtube'], includes('drawing') && updateElements['drawing'], includes('code') && updateElements['code'])), updates_ && actions_ && /*#__PURE__*/React.createElement(Divider, _extends({}, DividerProps, {
|
|
1604
|
-
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-divider'], DividerProps?.className, classes.divider, classes.divider_middle])
|
|
1605
|
-
})), actions_ && /*#__PURE__*/React.createElement(Line, _extends({
|
|
1606
|
-
gap: 2,
|
|
1607
|
-
direction: "row",
|
|
1608
|
-
align: "center",
|
|
1609
|
-
justify: "flex-start",
|
|
1610
|
-
role: "toolbar",
|
|
1611
|
-
"aria-label": l('Actions')
|
|
1612
|
-
}, ToolbarActionsProps, {
|
|
1613
|
-
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-toolbar'], ToolbarActionsProps?.className, classes.toolbar, classes.toolbar_actions])
|
|
1614
|
-
}), /*#__PURE__*/React.createElement(Line, {
|
|
1615
|
-
direction: "row",
|
|
1616
|
-
align: "center",
|
|
1617
|
-
justify: "space-between",
|
|
1618
|
-
style: {
|
|
1619
|
-
width: '100%'
|
|
1620
|
-
}
|
|
1621
|
-
}, /*#__PURE__*/React.createElement(Line, {
|
|
1622
|
-
gap: 2,
|
|
1623
|
-
direction: "row",
|
|
1624
|
-
align: "center",
|
|
1625
|
-
justify: "flex-start"
|
|
1626
|
-
}, includes('copy', 'cut', 'paste', 'delete') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('copy') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1627
|
-
name: l('Copy')
|
|
1628
|
-
}, is('function', render) ? render('copy', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1629
|
-
onClick: method('copy')
|
|
1630
|
-
}), /*#__PURE__*/React.createElement(IconCopy, IconProps))), includes('cut') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1631
|
-
name: l('Cut')
|
|
1632
|
-
}, is('function', render) ? render('cut', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1633
|
-
onClick: method('cut')
|
|
1634
|
-
}), /*#__PURE__*/React.createElement(IconCut, IconProps))), includes('paste') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1635
|
-
name: l('Paste')
|
|
1636
|
-
}, is('function', render) ? render('paste', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1637
|
-
onClick: method('paste')
|
|
1638
|
-
}), /*#__PURE__*/React.createElement(IconPaste, IconProps))), includes('delete') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1639
|
-
name: l('Delete')
|
|
1640
|
-
}, is('function', render) ? render('delete', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1641
|
-
onClick: method('delete')
|
|
1642
|
-
}), /*#__PURE__*/React.createElement(IconDelete, IconProps))))), /*#__PURE__*/React.createElement(Line, {
|
|
1643
|
-
gap: 2,
|
|
1644
|
-
direction: "row",
|
|
1645
|
-
align: "center",
|
|
1646
|
-
justify: "flex-start"
|
|
1647
|
-
}, includes('clear', 'select-all') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('clear') && actionElements['clear'], includes('select-all') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1648
|
-
name: l('Select All')
|
|
1649
|
-
}, is('function', render) ? render('select-all', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1650
|
-
onClick: method('select-all')
|
|
1651
|
-
}), /*#__PURE__*/React.createElement(IconSelectAll, IconProps)))), includes('undo', 'redo') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('undo') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1652
|
-
name: l('Undo')
|
|
1653
|
-
}, is('function', render) ? render('undo', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1654
|
-
onClick: method('undo')
|
|
1655
|
-
}), /*#__PURE__*/React.createElement(IconUndo, IconProps))), includes('redo') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1656
|
-
name: l('Redo')
|
|
1657
|
-
}, is('function', render) ? render('redo', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1658
|
-
onClick: method('redo')
|
|
1659
|
-
}), /*#__PURE__*/React.createElement(IconRedo, IconProps)))), includes('save', 'print') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('save') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1660
|
-
name: l('Save')
|
|
1661
|
-
}, is('function', render) ? render('save', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1662
|
-
onClick: () => save(refs.value.current)
|
|
1663
|
-
}), /*#__PURE__*/React.createElement(IconSave, IconProps))), includes('print') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
1664
|
-
name: l('Print')
|
|
1665
|
-
}, is('function', render) ? render('print', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
1666
|
-
onClick: () => print(refs.value.current)
|
|
1667
|
-
}), /*#__PURE__*/React.createElement(IconPrint, IconProps))))))), /*#__PURE__*/React.createElement(Divider, _extends({}, DividerProps, {
|
|
1668
|
-
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-divider'], DividerProps?.className, classes.divider, classes.divider_end])
|
|
1669
|
-
}))), miniMenu && !!refs.miniMenuInclude.current.length && /*#__PURE__*/React.createElement(Append, _extends({
|
|
1670
|
-
open: selection,
|
|
1671
|
-
element: ({
|
|
1672
|
-
ref: ref__2,
|
|
1673
|
-
values: values_26,
|
|
1674
|
-
style
|
|
1675
|
-
}) => /*#__PURE__*/React.createElement("div", {
|
|
1676
|
-
ref: item_33 => {
|
|
1677
|
-
if (ref__2) {
|
|
1678
|
-
if (is('function', ref__2)) ref__2(item_33);else ref__2.current = item_33;
|
|
1679
|
-
refs.miniMenu.current = item_33;
|
|
1680
|
-
}
|
|
1681
|
-
},
|
|
1682
|
-
style: _objectSpread(_objectSpread({}, values_26?.x === 0 && values_26?.y === 0 ? {
|
|
1683
|
-
visibility: 'hidden'
|
|
1684
|
-
} : undefined), style)
|
|
1685
|
-
}, /*#__PURE__*/React.createElement(Fade, {
|
|
1686
|
-
in: !!selection,
|
|
1687
|
-
add: true
|
|
1688
|
-
}, /*#__PURE__*/React.createElement(ClickListener, {
|
|
1689
|
-
onClickOutside: () => {
|
|
1690
|
-
setSelection('');
|
|
1691
|
-
},
|
|
1692
|
-
include: [refs.miniMenu, refs.miniMenu.current, refs.miniMenuElements.colorPalette, refs.miniMenuElements.colorPalette.current, refs.miniMenuElements.backgroundPalette, refs.miniMenuElements.backgroundPalette.current, refs.miniMenuElements.linkAddInput, refs.miniMenuElements.linkAddInput.current]
|
|
1693
|
-
}, /*#__PURE__*/React.createElement(Line, _extends({
|
|
1694
|
-
gap: 2,
|
|
1695
|
-
direction: "row",
|
|
1696
|
-
align: "center",
|
|
1697
|
-
justify: "flex-start",
|
|
1698
|
-
role: "toolbar",
|
|
1699
|
-
"aria-label": l('Mini menu'),
|
|
1698
|
+
}, other), {}, {
|
|
1699
|
+
children: [(updates || actions_) && /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
1700
|
+
tonal: tonal,
|
|
1701
|
+
color: color,
|
|
1702
|
+
version: version,
|
|
1703
|
+
gap: 0,
|
|
1704
|
+
direction: "column",
|
|
1705
|
+
align: "unset",
|
|
1706
|
+
justify: "unset",
|
|
1700
1707
|
Component: Surface
|
|
1701
|
-
},
|
|
1702
|
-
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1708
|
+
}, ToolbarProps), {}, {
|
|
1709
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-toolbars'], ToolbarProps?.className, classes.toolbars]),
|
|
1710
|
+
children: [updates_ && /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
1711
|
+
gap: 2,
|
|
1712
|
+
direction: "row",
|
|
1713
|
+
align: "center",
|
|
1714
|
+
justify: "flex-start",
|
|
1715
|
+
role: "toolbar",
|
|
1716
|
+
"aria-label": l('Updates')
|
|
1717
|
+
}, ToolbarUpdatesProps), {}, {
|
|
1718
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-toolbar'], ToolbarUpdatesProps?.className, classes.toolbar, classes.toolbar_updates]),
|
|
1719
|
+
children: [includes('font-family', 'font-size', 'font-version') && /*#__PURE__*/_jsxs(Line, {
|
|
1720
|
+
gap: 1,
|
|
1721
|
+
direction: "row",
|
|
1722
|
+
align: "center",
|
|
1723
|
+
justify: "flex-start",
|
|
1724
|
+
children: [includes('font-version') && updateElements['font-version'], includes('font-family') && updateElements['font-family'], includes('font-size') && updateElements['font-size']]
|
|
1725
|
+
}), includes('italic', 'underlined', 'bold', 'strike-line') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1726
|
+
children: [includes('italic') && updateElements['italic'], includes('underline') && updateElements['underline'], includes('bold') && updateElements['bold'], includes('strike-line') && updateElements['strike-line']]
|
|
1727
|
+
})), includes('font-color', 'font-background') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1728
|
+
children: [includes('font-color') && updateElements['font-color'], includes('font-background') && updateElements['font-background']]
|
|
1729
|
+
})), includes('align-left', 'align-center', 'align-right', 'align-justify') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1730
|
+
children: [includes('align-left') && updateElements['align-left'], includes('align-center') && updateElements['align-center'], includes('align-right') && updateElements['align-right'], includes('align-justify') && updateElements['align-justify']]
|
|
1731
|
+
})), includes('indent', 'outdent') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1732
|
+
children: [includes('indent') && updateElements['indent'], includes('outdent') && updateElements['outdent']]
|
|
1733
|
+
})), includes('superscript', 'subscript') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1734
|
+
children: [includes('superscript') && updateElements['superscript'], includes('subscript') && updateElements['subscript']]
|
|
1735
|
+
})), includes('list-ordered', 'list-unordered') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1736
|
+
children: [includes('list-ordered') && updateElements['list-ordered'], includes('list-unordered') && updateElements['list-unordered']]
|
|
1737
|
+
})), includes('horizontal-rule') && /*#__PURE__*/_jsx(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1738
|
+
children: includes('horizontal-rule') && updateElements['horizontal-rule']
|
|
1739
|
+
})), includes('link-add', 'link-remove') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1740
|
+
children: [includes('link-add') && updateElements['link-add'], includes('link-remove') && updateElements['link-remove']]
|
|
1741
|
+
})), includes('quote', 'image', 'video', 'video-youtube', 'table', 'drawing', 'code') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1742
|
+
children: [includes('quote') && updateElements['quote'], includes('table') && updateElements['table'], includes('image') && updateElements['image'], includes('video') && updateElements['video'], includes('video-youtube') && updateElements['video-youtube'], includes('drawing') && updateElements['drawing'], includes('code') && updateElements['code']]
|
|
1743
|
+
}))]
|
|
1744
|
+
})), updates_ && actions_ && /*#__PURE__*/_jsx(Divider, _objectSpread(_objectSpread({}, DividerProps), {}, {
|
|
1745
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-divider'], DividerProps?.className, classes.divider, classes.divider_middle])
|
|
1746
|
+
})), actions_ && /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({
|
|
1747
|
+
gap: 2,
|
|
1748
|
+
direction: "row",
|
|
1749
|
+
align: "center",
|
|
1750
|
+
justify: "flex-start",
|
|
1751
|
+
role: "toolbar",
|
|
1752
|
+
"aria-label": l('Actions')
|
|
1753
|
+
}, ToolbarActionsProps), {}, {
|
|
1754
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-toolbar'], ToolbarActionsProps?.className, classes.toolbar, classes.toolbar_actions]),
|
|
1755
|
+
children: /*#__PURE__*/_jsxs(Line, {
|
|
1756
|
+
direction: "row",
|
|
1757
|
+
align: "center",
|
|
1758
|
+
justify: "space-between",
|
|
1759
|
+
style: {
|
|
1760
|
+
width: '100%'
|
|
1761
|
+
},
|
|
1762
|
+
children: [/*#__PURE__*/_jsx(Line, {
|
|
1763
|
+
gap: 2,
|
|
1764
|
+
direction: "row",
|
|
1765
|
+
align: "center",
|
|
1766
|
+
justify: "flex-start",
|
|
1767
|
+
children: includes('copy', 'cut', 'paste', 'delete') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1768
|
+
children: [includes('copy') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1769
|
+
name: l('Copy'),
|
|
1770
|
+
children: is('function', render) ? render('copy', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1771
|
+
onClick: method('copy'),
|
|
1772
|
+
children: /*#__PURE__*/_jsx(IconCopy, _objectSpread({}, IconProps))
|
|
1773
|
+
}))
|
|
1774
|
+
}), includes('cut') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1775
|
+
name: l('Cut'),
|
|
1776
|
+
children: is('function', render) ? render('cut', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1777
|
+
onClick: method('cut'),
|
|
1778
|
+
children: /*#__PURE__*/_jsx(IconCut, _objectSpread({}, IconProps))
|
|
1779
|
+
}))
|
|
1780
|
+
}), includes('paste') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1781
|
+
name: l('Paste'),
|
|
1782
|
+
children: is('function', render) ? render('paste', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1783
|
+
onClick: method('paste'),
|
|
1784
|
+
children: /*#__PURE__*/_jsx(IconPaste, _objectSpread({}, IconProps))
|
|
1785
|
+
}))
|
|
1786
|
+
}), includes('delete') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1787
|
+
name: l('Delete'),
|
|
1788
|
+
children: is('function', render) ? render('delete', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1789
|
+
onClick: method('delete'),
|
|
1790
|
+
children: /*#__PURE__*/_jsx(IconDelete, _objectSpread({}, IconProps))
|
|
1791
|
+
}))
|
|
1792
|
+
})]
|
|
1793
|
+
}))
|
|
1794
|
+
}), /*#__PURE__*/_jsxs(Line, {
|
|
1795
|
+
gap: 2,
|
|
1796
|
+
direction: "row",
|
|
1797
|
+
align: "center",
|
|
1798
|
+
justify: "flex-start",
|
|
1799
|
+
children: [includes('clear', 'select-all') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1800
|
+
children: [includes('clear') && actionElements['clear'], includes('select-all') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1801
|
+
name: l('Select All'),
|
|
1802
|
+
children: is('function', render) ? render('select-all', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1803
|
+
onClick: method('select-all'),
|
|
1804
|
+
children: /*#__PURE__*/_jsx(IconSelectAll, _objectSpread({}, IconProps))
|
|
1805
|
+
}))
|
|
1806
|
+
})]
|
|
1807
|
+
})), includes('undo', 'redo') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1808
|
+
children: [includes('undo') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1809
|
+
name: l('Undo'),
|
|
1810
|
+
children: is('function', render) ? render('undo', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1811
|
+
onClick: method('undo'),
|
|
1812
|
+
children: /*#__PURE__*/_jsx(IconUndo, _objectSpread({}, IconProps))
|
|
1813
|
+
}))
|
|
1814
|
+
}), includes('redo') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1815
|
+
name: l('Redo'),
|
|
1816
|
+
children: is('function', render) ? render('redo', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1817
|
+
onClick: method('redo'),
|
|
1818
|
+
children: /*#__PURE__*/_jsx(IconRedo, _objectSpread({}, IconProps))
|
|
1819
|
+
}))
|
|
1820
|
+
})]
|
|
1821
|
+
})), includes('save', 'print') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1822
|
+
children: [includes('save') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1823
|
+
name: l('Save'),
|
|
1824
|
+
children: is('function', render) ? render('save', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1825
|
+
onClick: () => save(refs.value.current),
|
|
1826
|
+
children: /*#__PURE__*/_jsx(IconSave, _objectSpread({}, IconProps))
|
|
1827
|
+
}))
|
|
1828
|
+
}), includes('print') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
1829
|
+
name: l('Print'),
|
|
1830
|
+
children: is('function', render) ? render('print', ToggleButtonProps, refs.value.current, method) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
1831
|
+
onClick: () => print(refs.value.current),
|
|
1832
|
+
children: /*#__PURE__*/_jsx(IconPrint, _objectSpread({}, IconProps))
|
|
1833
|
+
}))
|
|
1834
|
+
})]
|
|
1835
|
+
}))]
|
|
1836
|
+
})]
|
|
1837
|
+
})
|
|
1838
|
+
})), /*#__PURE__*/_jsx(Divider, _objectSpread(_objectSpread({}, DividerProps), {}, {
|
|
1839
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-divider'], DividerProps?.className, classes.divider, classes.divider_end])
|
|
1840
|
+
}))]
|
|
1841
|
+
})), miniMenu && !!refs.miniMenuInclude.current.length && /*#__PURE__*/_jsx(Append, _objectSpread({
|
|
1842
|
+
open: selection,
|
|
1843
|
+
element: ({
|
|
1844
|
+
ref: ref__1,
|
|
1845
|
+
values: values_26,
|
|
1846
|
+
style
|
|
1847
|
+
}) => /*#__PURE__*/_jsx("div", {
|
|
1848
|
+
ref: item_33 => {
|
|
1849
|
+
if (ref__1) {
|
|
1850
|
+
if (is('function', ref__1)) ref__1(item_33);else ref__1.current = item_33;
|
|
1851
|
+
refs.miniMenu.current = item_33;
|
|
1852
|
+
}
|
|
1853
|
+
},
|
|
1854
|
+
style: _objectSpread(_objectSpread({}, values_26?.x === 0 && values_26?.y === 0 ? {
|
|
1855
|
+
visibility: 'hidden'
|
|
1856
|
+
} : undefined), style),
|
|
1857
|
+
children: /*#__PURE__*/_jsx(Fade, {
|
|
1858
|
+
in: !!selection,
|
|
1859
|
+
add: true,
|
|
1860
|
+
children: /*#__PURE__*/_jsx(ClickListener, {
|
|
1861
|
+
onClickOutside: () => {
|
|
1862
|
+
setSelection('');
|
|
1863
|
+
},
|
|
1864
|
+
include: [refs.miniMenu, refs.miniMenu.current, refs.miniMenuElements.colorPalette, refs.miniMenuElements.colorPalette.current, refs.miniMenuElements.backgroundPalette, refs.miniMenuElements.backgroundPalette.current, refs.miniMenuElements.linkAddInput, refs.miniMenuElements.linkAddInput.current],
|
|
1865
|
+
children: /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
1866
|
+
gap: 2,
|
|
1867
|
+
direction: "row",
|
|
1868
|
+
align: "center",
|
|
1869
|
+
justify: "flex-start",
|
|
1870
|
+
role: "toolbar",
|
|
1871
|
+
"aria-label": l('Mini menu'),
|
|
1872
|
+
Component: Surface
|
|
1873
|
+
}, MiniMenuProps), {}, {
|
|
1874
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-mini-menu'], MiniMenuProps?.className, classes.miniMenu]),
|
|
1875
|
+
children: [includesMinMenu('italic', 'underlined', 'bold', 'strike-line') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1876
|
+
children: [includesMinMenu('italic') && updateElements['italic'], includesMinMenu('underline') && updateElements['underline'], includesMinMenu('bold') && updateElements['bold'], includesMinMenu('strike-line') && updateElements['strike-line']]
|
|
1877
|
+
})), includesMinMenu('font-color', 'font-background') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1878
|
+
children: [includesMinMenu('font-color') && updateElements['font-color-mini-menu'], includesMinMenu('font-background') && updateElements['font-background-mini-menu']]
|
|
1879
|
+
})), includesMinMenu('align-left', 'align-center', 'align-right', 'align-justify') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1880
|
+
children: [includesMinMenu('align-left') && updateElements['align-left'], includesMinMenu('align-center') && updateElements['align-center'], includesMinMenu('align-right') && updateElements['align-right'], includesMinMenu('align-justify') && updateElements['align-justify']]
|
|
1881
|
+
})), includesMinMenu('link-add', 'link-remove') && /*#__PURE__*/_jsxs(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1882
|
+
children: [includesMinMenu('link-add') && updateElements['link-add-mini-menu'], includesMinMenu('link-remove') && updateElements['link-remove']]
|
|
1883
|
+
})), includesMinMenu('clear') && /*#__PURE__*/_jsx(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
1884
|
+
children: includesMinMenu('clear') && actionElements['clear']
|
|
1885
|
+
}))]
|
|
1886
|
+
}))
|
|
1887
|
+
})
|
|
1888
|
+
})
|
|
1889
|
+
}),
|
|
1890
|
+
anchor: selection,
|
|
1891
|
+
portal: true,
|
|
1892
|
+
alignment: "center",
|
|
1893
|
+
position: "bottom",
|
|
1894
|
+
clearOnClose: true
|
|
1895
|
+
}, AppendProps)), /*#__PURE__*/_jsx(Surface, {
|
|
1896
|
+
ref: refs.value,
|
|
1897
|
+
color: "default",
|
|
1898
|
+
onMouseUp: onMouseUpValue,
|
|
1899
|
+
onMouseDown: onMouseDownValue,
|
|
1900
|
+
onInput: onUpdate,
|
|
1901
|
+
contentEditable: true,
|
|
1902
|
+
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-value'], classes.value])
|
|
1903
|
+
})]
|
|
1717
1904
|
}));
|
|
1718
|
-
}
|
|
1905
|
+
};
|
|
1719
1906
|
RichTextEditor.displayName = 'onesy-RichTextEditor';
|
|
1720
1907
|
export default RichTextEditor;
|