@onesy/ui-react 1.0.172 → 1.0.174
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 -68
- 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 -8
- 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 -68
- 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 -8
- 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/index.js +1 -1
- package/package.json +3 -3
package/esm/Drawing/Drawing.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
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", "render", "updates", "actions", "exclude", "downloadName", "downloadType", "downloadQuality", "viewBox", "strokeColor", "strokeWidth", "svgRef", "valueDefault", "value", "onChange", "onMouseDown", "onClear", "onDownload", "IconClear", "IconDownload", "IconSize", "IconStrokeColor", "IconProps", "SizeProps", "AppendProps", "ToolbarProps", "ToolbarUpdatesProps", "ToolbarActionsProps", "ToggleButtonProps", "ToggleButtonsProps", "DividerProps", "SelectProps", "ListItemProps", "TooltipProps", "PaletteProps", "IconButtonProps", "ColorTextFieldProps", "Component", "className"],
|
|
5
|
-
_excluded2 = ["open", "label", "children"],
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "version", "render", "updates", "actions", "exclude", "downloadName", "downloadType", "downloadQuality", "viewBox", "strokeColor", "strokeWidth", "svgRef", "valueDefault", "value", "onChange", "onMouseDown", "onClear", "onDownload", "IconClear", "IconDownload", "IconSize", "IconStrokeColor", "IconProps", "SizeProps", "AppendProps", "ToolbarProps", "ToolbarUpdatesProps", "ToolbarActionsProps", "ToggleButtonProps", "ToggleButtonsProps", "DividerProps", "SelectProps", "ListItemProps", "TooltipProps", "PaletteProps", "IconButtonProps", "ColorTextFieldProps", "Component", "className"],
|
|
4
|
+
_excluded2 = ["ref", "open", "label", "children"],
|
|
6
5
|
_excluded3 = ["open", "element", "anchorElement", "onClose", "children"],
|
|
7
6
|
_excluded4 = ["color"],
|
|
8
|
-
_excluded5 = ["version", "onUpdate", "onClose"];
|
|
7
|
+
_excluded5 = ["ref", "version", "onUpdate", "onClose"];
|
|
9
8
|
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; }
|
|
10
9
|
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; }
|
|
11
10
|
import React from 'react';
|
|
@@ -31,6 +30,7 @@ import AppendElement from '../Append';
|
|
|
31
30
|
import FadeElement from '../Fade';
|
|
32
31
|
import ClickListenerElement from '../ClickListener';
|
|
33
32
|
import { staticClassName } from '../utils';
|
|
33
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
34
34
|
const useStyle = styleMethod(theme => ({
|
|
35
35
|
root: {
|
|
36
36
|
position: 'relative'
|
|
@@ -115,7 +115,7 @@ const useStyle = styleMethod(theme => ({
|
|
|
115
115
|
}), {
|
|
116
116
|
name: 'onesy-Drawing'
|
|
117
117
|
});
|
|
118
|
-
const Drawing =
|
|
118
|
+
const Drawing = props__ => {
|
|
119
119
|
const theme = useOnesyTheme();
|
|
120
120
|
const l = theme.l;
|
|
121
121
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyDrawing?.props?.default), props__);
|
|
@@ -135,6 +135,7 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
135
135
|
const Fade = theme?.elements?.Fade || FadeElement;
|
|
136
136
|
const ClickListener = theme?.elements?.ClickListener || ClickListenerElement;
|
|
137
137
|
const {
|
|
138
|
+
ref,
|
|
138
139
|
tonal = true,
|
|
139
140
|
color = 'default',
|
|
140
141
|
version = 'filled',
|
|
@@ -412,19 +413,22 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
412
413
|
const IconProps = _objectSpread({
|
|
413
414
|
size: 'small'
|
|
414
415
|
}, IconProps_);
|
|
415
|
-
const WrapperToggleButton =
|
|
416
|
+
const WrapperToggleButton = props_ => {
|
|
416
417
|
const {
|
|
418
|
+
ref: ref_,
|
|
417
419
|
open: open_,
|
|
418
420
|
label,
|
|
419
421
|
children
|
|
420
422
|
} = props_,
|
|
421
423
|
other_ = _objectWithoutProperties(props_, _excluded2);
|
|
422
|
-
return /*#__PURE__*/
|
|
424
|
+
return /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
423
425
|
ref: ref_,
|
|
424
426
|
open: open_ !== undefined ? open_ : undefined,
|
|
425
427
|
name: label
|
|
426
|
-
}, TooltipProps),
|
|
427
|
-
|
|
428
|
+
}, TooltipProps), {}, {
|
|
429
|
+
children: /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, other_), children.props))
|
|
430
|
+
}));
|
|
431
|
+
};
|
|
428
432
|
const WrapperAppend = props__0 => {
|
|
429
433
|
const {
|
|
430
434
|
open: open__0,
|
|
@@ -434,38 +438,44 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
434
438
|
children: children_0
|
|
435
439
|
} = props__0,
|
|
436
440
|
other__0 = _objectWithoutProperties(props__0, _excluded3);
|
|
437
|
-
return /*#__PURE__*/
|
|
441
|
+
return /*#__PURE__*/_jsx(Append, _objectSpread(_objectSpread({
|
|
438
442
|
open: open__0,
|
|
439
|
-
element: /*#__PURE__*/
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
+
element: /*#__PURE__*/_jsx("div", {
|
|
444
|
+
children: /*#__PURE__*/_jsx(Fade, {
|
|
445
|
+
in: open__0,
|
|
446
|
+
add: true,
|
|
447
|
+
children: /*#__PURE__*/React.cloneElement(element)
|
|
448
|
+
})
|
|
449
|
+
}),
|
|
443
450
|
anchorElement: anchorElement,
|
|
444
451
|
portal: true,
|
|
445
452
|
alignment: "center",
|
|
446
453
|
position: "bottom"
|
|
447
|
-
}, AppendProps),
|
|
454
|
+
}, AppendProps), {}, {
|
|
455
|
+
children: /*#__PURE__*/React.cloneElement(children_0, _objectSpread(_objectSpread({}, other__0), children_0.props))
|
|
456
|
+
}));
|
|
448
457
|
};
|
|
449
458
|
const PaletteItem = props__1 => {
|
|
450
459
|
const {
|
|
451
460
|
color: color_
|
|
452
461
|
} = props__1,
|
|
453
462
|
other__1 = _objectWithoutProperties(props__1, _excluded4);
|
|
454
|
-
return /*#__PURE__*/
|
|
463
|
+
return /*#__PURE__*/_jsx("span", _objectSpread({
|
|
455
464
|
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-palette-item'], classes.paletteItem]),
|
|
456
465
|
style: {
|
|
457
466
|
background: color_
|
|
458
467
|
}
|
|
459
468
|
}, other__1));
|
|
460
469
|
};
|
|
461
|
-
const Palette =
|
|
470
|
+
const Palette = props__2 => {
|
|
462
471
|
const {
|
|
472
|
+
ref: ref__0,
|
|
463
473
|
version: version_,
|
|
464
474
|
onUpdate,
|
|
465
475
|
onClose: onClose_0
|
|
466
476
|
} = props__2,
|
|
467
477
|
other__2 = _objectWithoutProperties(props__2, _excluded5);
|
|
468
|
-
return /*#__PURE__*/
|
|
478
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
469
479
|
ref: ref__0,
|
|
470
480
|
gap: 1,
|
|
471
481
|
direction: "column",
|
|
@@ -473,129 +483,142 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
473
483
|
color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed',
|
|
474
484
|
Component: Surface,
|
|
475
485
|
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-palette'], classes.palette])
|
|
476
|
-
}, other__2),
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
486
|
+
}, other__2), {}, {
|
|
487
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
488
|
+
gap: 0.5,
|
|
489
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
490
|
+
gap: 0.5,
|
|
491
|
+
direction: "row",
|
|
492
|
+
style: {
|
|
493
|
+
width: '100%'
|
|
494
|
+
},
|
|
495
|
+
children: [/*#__PURE__*/_jsx(PaletteItem, {
|
|
496
|
+
color: "#000000",
|
|
497
|
+
onClick: () => {
|
|
498
|
+
onUpdate('#000000');
|
|
499
|
+
onClose_0();
|
|
500
|
+
}
|
|
501
|
+
}), /*#__PURE__*/_jsx(PaletteItem, {
|
|
502
|
+
color: "#ffffff",
|
|
503
|
+
onClick: () => {
|
|
504
|
+
onUpdate('#ffffff');
|
|
505
|
+
onClose_0();
|
|
506
|
+
}
|
|
507
|
+
})]
|
|
508
|
+
}), Object.keys(colors).filter(item_0 => !['black', 'white'].includes(item_0)).map((item_1, index) => /*#__PURE__*/_jsx(Line, {
|
|
509
|
+
gap: 0.5,
|
|
510
|
+
direction: "row",
|
|
511
|
+
style: {
|
|
512
|
+
width: '100%'
|
|
513
|
+
},
|
|
514
|
+
children: Object.keys(colors[item_1]).map((item_, index_) => /*#__PURE__*/_jsx(PaletteItem, {
|
|
515
|
+
color: colors[item_1][item_],
|
|
516
|
+
onClick: () => {
|
|
517
|
+
onUpdate(colors[item_1][item_]);
|
|
518
|
+
onClose_0();
|
|
519
|
+
}
|
|
520
|
+
}, index_))
|
|
521
|
+
}, index))]
|
|
522
|
+
}), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsxs(Line, {
|
|
523
|
+
gap: 0.5,
|
|
524
|
+
direction: "row",
|
|
525
|
+
align: "center",
|
|
526
|
+
style: {
|
|
527
|
+
width: '100%'
|
|
528
|
+
},
|
|
529
|
+
children: [/*#__PURE__*/_jsx(ColorTextField, _objectSpread(_objectSpread({
|
|
530
|
+
tonal: tonal,
|
|
531
|
+
color: color,
|
|
532
|
+
name: l('Custom color'),
|
|
533
|
+
version: "outlined",
|
|
534
|
+
size: "small",
|
|
535
|
+
value: refs.inputValues.current[version_],
|
|
536
|
+
onChange: valueNew_1 => updateInputValues(version_, valueNew_1)
|
|
537
|
+
}, ColorTextFieldProps), {}, {
|
|
538
|
+
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-text-field-color'], ColorTextFieldProps?.className, classes.textFieldColor])
|
|
539
|
+
})), /*#__PURE__*/_jsx(Button, {
|
|
540
|
+
tonal: tonal,
|
|
541
|
+
color: "inherit",
|
|
542
|
+
version: "text",
|
|
543
|
+
size: "small",
|
|
544
|
+
onClick: () => {
|
|
545
|
+
onUpdate(refs.inputValues.current[version_]);
|
|
546
|
+
onClose_0();
|
|
547
|
+
},
|
|
548
|
+
children: l('Apply')
|
|
549
|
+
})]
|
|
550
|
+
})]
|
|
551
|
+
}));
|
|
552
|
+
};
|
|
538
553
|
const valueNew_ = (is('array', value) ? value : [value]).filter(Boolean);
|
|
539
554
|
const valueNewActive = mouseDown && valueNew_[valueNew_.length - 1];
|
|
540
555
|
const circleStrokeWidth = +(valueNewActive ? valueNewActive.strokeWidth : refs.inputValues.current.strokeWidth);
|
|
541
556
|
const stroke_width = [{
|
|
542
|
-
label: /*#__PURE__*/
|
|
557
|
+
label: /*#__PURE__*/_jsxs(Line, {
|
|
543
558
|
direction: "row",
|
|
544
|
-
align: "center"
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
559
|
+
align: "center",
|
|
560
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
561
|
+
style: {
|
|
562
|
+
width: 14,
|
|
563
|
+
height: 1,
|
|
564
|
+
background: theme.palette.text.default.primary
|
|
565
|
+
}
|
|
566
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
567
|
+
version: "b2",
|
|
568
|
+
children: "1"
|
|
569
|
+
})]
|
|
570
|
+
}),
|
|
554
571
|
value: 1
|
|
555
572
|
}, {
|
|
556
|
-
label: /*#__PURE__*/
|
|
573
|
+
label: /*#__PURE__*/_jsxs(Line, {
|
|
557
574
|
direction: "row",
|
|
558
|
-
align: "center"
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
575
|
+
align: "center",
|
|
576
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
577
|
+
style: {
|
|
578
|
+
width: 14,
|
|
579
|
+
height: 2,
|
|
580
|
+
background: theme.palette.text.default.primary
|
|
581
|
+
}
|
|
582
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
583
|
+
version: "b2",
|
|
584
|
+
children: "2"
|
|
585
|
+
})]
|
|
586
|
+
}),
|
|
568
587
|
value: 2
|
|
569
588
|
}, {
|
|
570
|
-
label: /*#__PURE__*/
|
|
589
|
+
label: /*#__PURE__*/_jsxs(Line, {
|
|
571
590
|
direction: "row",
|
|
572
|
-
align: "center"
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
591
|
+
align: "center",
|
|
592
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
593
|
+
style: {
|
|
594
|
+
width: 14,
|
|
595
|
+
height: 4,
|
|
596
|
+
background: theme.palette.text.default.primary
|
|
597
|
+
}
|
|
598
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
599
|
+
version: "b2",
|
|
600
|
+
children: "4"
|
|
601
|
+
})]
|
|
602
|
+
}),
|
|
582
603
|
value: 4
|
|
583
604
|
}, {
|
|
584
|
-
label: /*#__PURE__*/
|
|
605
|
+
label: /*#__PURE__*/_jsxs(Line, {
|
|
585
606
|
direction: "row",
|
|
586
|
-
align: "center"
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
607
|
+
align: "center",
|
|
608
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
609
|
+
style: {
|
|
610
|
+
width: 14,
|
|
611
|
+
height: 8,
|
|
612
|
+
background: theme.palette.text.default.primary
|
|
613
|
+
}
|
|
614
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
615
|
+
version: "b2",
|
|
616
|
+
children: "8"
|
|
617
|
+
})]
|
|
618
|
+
}),
|
|
596
619
|
value: 8
|
|
597
620
|
}];
|
|
598
|
-
return /*#__PURE__*/
|
|
621
|
+
return /*#__PURE__*/_jsxs(Surface, _objectSpread(_objectSpread({
|
|
599
622
|
ref: item_2 => {
|
|
600
623
|
if (ref) {
|
|
601
624
|
if (is('function', ref)) ref(item_2);else ref.current = item_2;
|
|
@@ -607,194 +630,228 @@ const Drawing = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
607
630
|
version: version,
|
|
608
631
|
Component: Component,
|
|
609
632
|
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-root', updates && `onesy-Drawing-updates`, actions && `onesy-Drawing-actions`], className, classes.root])
|
|
610
|
-
}, other),
|
|
611
|
-
|
|
612
|
-
color: color,
|
|
613
|
-
version: version,
|
|
614
|
-
gap: 0,
|
|
615
|
-
direction: "column",
|
|
616
|
-
align: "unset",
|
|
617
|
-
justify: "unset",
|
|
618
|
-
Component: Surface
|
|
619
|
-
}, ToolbarProps, {
|
|
620
|
-
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-toolbars'], ToolbarProps?.className, classes.toolbars])
|
|
621
|
-
}), updates_ && /*#__PURE__*/React.createElement(Line, _extends({
|
|
622
|
-
gap: 2,
|
|
623
|
-
direction: "row",
|
|
624
|
-
align: "center",
|
|
625
|
-
justify: "flex-start"
|
|
626
|
-
}, ToolbarUpdatesProps, {
|
|
627
|
-
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-toolbar'], ToolbarUpdatesProps?.className, classes.toolbar, classes.toolbar_updates])
|
|
628
|
-
}), includes('stroke-width') && /*#__PURE__*/React.createElement(Line, {
|
|
629
|
-
gap: 1,
|
|
630
|
-
direction: "row",
|
|
631
|
-
align: "center",
|
|
632
|
-
justify: "flex-start"
|
|
633
|
-
}, includes('stroke-width') && /*#__PURE__*/React.createElement(Select, _extends({
|
|
634
|
-
name: l('Stroke Width'),
|
|
635
|
-
valueDefault: stroke_width.find(item_3 => String(item_3.value).includes('1')).value,
|
|
636
|
-
value: inputValues['strokeWidth'],
|
|
637
|
-
onChange: valueNew_2 => updateInputValues('strokeWidth', valueNew_2)
|
|
638
|
-
}, SelectProps, {
|
|
639
|
-
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-select'], SelectProps?.className, classes.select]),
|
|
640
|
-
style: {
|
|
641
|
-
minWidth: '90px'
|
|
642
|
-
}
|
|
643
|
-
}), stroke_width.map(item_4 => /*#__PURE__*/React.createElement(ListItem, _extends({
|
|
644
|
-
key: item_4.value,
|
|
645
|
-
primary: item_4.label,
|
|
646
|
-
value: item_4.value,
|
|
647
|
-
button: true
|
|
648
|
-
}, ListItemProps))))), includes('stroke-color') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('stroke-color') && /*#__PURE__*/React.createElement(WrapperAppend, {
|
|
649
|
-
open: refs.open.current.strokeColor,
|
|
650
|
-
anchorElement: refs.elements.strokeColor.current,
|
|
651
|
-
element: /*#__PURE__*/React.createElement(ClickListener, {
|
|
652
|
-
onClickOutside: () => updateOpen('strokeColor', false),
|
|
653
|
-
include: [refs.elements.strokeColor, refs.elements.strokeColor.current]
|
|
654
|
-
}, /*#__PURE__*/React.createElement(Palette, _extends({
|
|
655
|
-
onClose: () => updateOpen('strokeColor', false),
|
|
656
|
-
onUpdate: valueNew_3 => updateInputValues('strokeColor', valueNew_3)
|
|
657
|
-
}, PaletteProps)))
|
|
658
|
-
}, /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
659
|
-
name: l('Stroke Color'),
|
|
660
|
-
open: refs.open.current.strokeColor ? false : undefined
|
|
661
|
-
}, is('function', render) ? render('stroke-color', ToggleButtonProps, refs.value.current) : /*#__PURE__*/React.createElement(ToggleButton, _extends({
|
|
662
|
-
ref: refs.elements.strokeColor
|
|
663
|
-
}, ToggleButtonProps, {
|
|
664
|
-
selected: refs.open.current.strokeColor,
|
|
665
|
-
onClick: () => updateOpen('strokeColor', !refs.open.current.strokeColor)
|
|
666
|
-
}), /*#__PURE__*/React.createElement(IconStrokeColor, IconProps))))), includes('size') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('size') && /*#__PURE__*/React.createElement(WrapperAppend, {
|
|
667
|
-
open: refs.open.current.size,
|
|
668
|
-
anchorElement: refs.elements.size.current,
|
|
669
|
-
element: /*#__PURE__*/React.createElement(ClickListener, {
|
|
670
|
-
onClickOutside: () => updateOpen('size', false),
|
|
671
|
-
include: [refs.elements.size]
|
|
672
|
-
}, /*#__PURE__*/React.createElement(Line, _extends({
|
|
673
|
-
gap: 1,
|
|
674
|
-
tonal: tonal,
|
|
675
|
-
color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed',
|
|
676
|
-
Component: Surface,
|
|
677
|
-
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-modal'], classes.modal])
|
|
678
|
-
}, SizeProps), /*#__PURE__*/React.createElement(Line, {
|
|
679
|
-
gap: 1,
|
|
680
|
-
direction: "row",
|
|
681
|
-
align: "center",
|
|
682
|
-
justify: "center"
|
|
683
|
-
}, /*#__PURE__*/React.createElement(NumericTextField, {
|
|
684
|
-
name: l('Width'),
|
|
685
|
-
tonal: tonal,
|
|
686
|
-
color: color,
|
|
687
|
-
size: "small",
|
|
688
|
-
version: "outlined",
|
|
689
|
-
min: 1,
|
|
690
|
-
increment: false,
|
|
691
|
-
decrement: false,
|
|
692
|
-
value: refs.inputValues.current.widthInput,
|
|
693
|
-
onChange: valueNew_4 => updateInputValues('widthInput', !valueNew_4 ? 1 : valueNew_4)
|
|
694
|
-
}), "\xD7", /*#__PURE__*/React.createElement(NumericTextField, {
|
|
695
|
-
name: l('Height'),
|
|
633
|
+
}, other), {}, {
|
|
634
|
+
children: [(updates || actions_) && /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
696
635
|
tonal: tonal,
|
|
697
636
|
color: color,
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
637
|
+
version: version,
|
|
638
|
+
gap: 0,
|
|
639
|
+
direction: "column",
|
|
640
|
+
align: "unset",
|
|
641
|
+
justify: "unset",
|
|
642
|
+
Component: Surface
|
|
643
|
+
}, ToolbarProps), {}, {
|
|
644
|
+
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-toolbars'], ToolbarProps?.className, classes.toolbars]),
|
|
645
|
+
children: [updates_ && /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
646
|
+
gap: 2,
|
|
647
|
+
direction: "row",
|
|
648
|
+
align: "center",
|
|
649
|
+
justify: "flex-start"
|
|
650
|
+
}, ToolbarUpdatesProps), {}, {
|
|
651
|
+
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-toolbar'], ToolbarUpdatesProps?.className, classes.toolbar, classes.toolbar_updates]),
|
|
652
|
+
children: [includes('stroke-width') && /*#__PURE__*/_jsx(Line, {
|
|
653
|
+
gap: 1,
|
|
654
|
+
direction: "row",
|
|
655
|
+
align: "center",
|
|
656
|
+
justify: "flex-start",
|
|
657
|
+
children: includes('stroke-width') && /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
|
|
658
|
+
name: l('Stroke Width'),
|
|
659
|
+
valueDefault: stroke_width.find(item_3 => String(item_3.value).includes('1')).value,
|
|
660
|
+
value: inputValues['strokeWidth'],
|
|
661
|
+
onChange: valueNew_2 => updateInputValues('strokeWidth', valueNew_2)
|
|
662
|
+
}, SelectProps), {}, {
|
|
663
|
+
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-select'], SelectProps?.className, classes.select]),
|
|
664
|
+
style: {
|
|
665
|
+
minWidth: '90px'
|
|
666
|
+
},
|
|
667
|
+
children: stroke_width.map(item_4 => /*#__PURE__*/_jsx(ListItem, _objectSpread({
|
|
668
|
+
primary: item_4.label,
|
|
669
|
+
value: item_4.value,
|
|
670
|
+
button: true
|
|
671
|
+
}, ListItemProps), item_4.value))
|
|
672
|
+
}))
|
|
673
|
+
}), includes('stroke-color') && /*#__PURE__*/_jsx(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
674
|
+
children: includes('stroke-color') && /*#__PURE__*/_jsx(WrapperAppend, {
|
|
675
|
+
open: refs.open.current.strokeColor,
|
|
676
|
+
anchorElement: refs.elements.strokeColor.current,
|
|
677
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
678
|
+
onClickOutside: () => updateOpen('strokeColor', false),
|
|
679
|
+
include: [refs.elements.strokeColor, refs.elements.strokeColor.current],
|
|
680
|
+
children: /*#__PURE__*/_jsx(Palette, _objectSpread({
|
|
681
|
+
onClose: () => updateOpen('strokeColor', false),
|
|
682
|
+
onUpdate: valueNew_3 => updateInputValues('strokeColor', valueNew_3)
|
|
683
|
+
}, PaletteProps))
|
|
684
|
+
}),
|
|
685
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
686
|
+
name: l('Stroke Color'),
|
|
687
|
+
open: refs.open.current.strokeColor ? false : undefined,
|
|
688
|
+
children: is('function', render) ? render('stroke-color', ToggleButtonProps, refs.value.current) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
689
|
+
ref: refs.elements.strokeColor
|
|
690
|
+
}, ToggleButtonProps), {}, {
|
|
691
|
+
selected: refs.open.current.strokeColor,
|
|
692
|
+
onClick: () => updateOpen('strokeColor', !refs.open.current.strokeColor),
|
|
693
|
+
children: /*#__PURE__*/_jsx(IconStrokeColor, _objectSpread({}, IconProps))
|
|
694
|
+
}))
|
|
695
|
+
})
|
|
696
|
+
})
|
|
697
|
+
})), includes('size') && /*#__PURE__*/_jsx(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
698
|
+
children: includes('size') && /*#__PURE__*/_jsx(WrapperAppend, {
|
|
699
|
+
open: refs.open.current.size,
|
|
700
|
+
anchorElement: refs.elements.size.current,
|
|
701
|
+
element: /*#__PURE__*/_jsx(ClickListener, {
|
|
702
|
+
onClickOutside: () => updateOpen('size', false),
|
|
703
|
+
include: [refs.elements.size],
|
|
704
|
+
children: /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
705
|
+
gap: 1,
|
|
706
|
+
tonal: tonal,
|
|
707
|
+
color: refs.props.current.color !== undefined ? refs.props.current.color : 'themed',
|
|
708
|
+
Component: Surface,
|
|
709
|
+
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-modal'], classes.modal])
|
|
710
|
+
}, SizeProps), {}, {
|
|
711
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
712
|
+
gap: 1,
|
|
713
|
+
direction: "row",
|
|
714
|
+
align: "center",
|
|
715
|
+
justify: "center",
|
|
716
|
+
children: [/*#__PURE__*/_jsx(NumericTextField, {
|
|
717
|
+
name: l('Width'),
|
|
718
|
+
tonal: tonal,
|
|
719
|
+
color: color,
|
|
720
|
+
size: "small",
|
|
721
|
+
version: "outlined",
|
|
722
|
+
min: 1,
|
|
723
|
+
increment: false,
|
|
724
|
+
decrement: false,
|
|
725
|
+
value: refs.inputValues.current.widthInput,
|
|
726
|
+
onChange: valueNew_4 => updateInputValues('widthInput', !valueNew_4 ? 1 : valueNew_4)
|
|
727
|
+
}), "\xD7", /*#__PURE__*/_jsx(NumericTextField, {
|
|
728
|
+
name: l('Height'),
|
|
729
|
+
tonal: tonal,
|
|
730
|
+
color: color,
|
|
731
|
+
size: "small",
|
|
732
|
+
version: "outlined",
|
|
733
|
+
min: 1,
|
|
734
|
+
increment: false,
|
|
735
|
+
decrement: false,
|
|
736
|
+
value: refs.inputValues.current.heightInput,
|
|
737
|
+
onChange: valueNew_5 => updateInputValues('heightInput', !valueNew_5 ? 1 : valueNew_5)
|
|
738
|
+
})]
|
|
739
|
+
}), /*#__PURE__*/_jsx(Line, {
|
|
740
|
+
gap: 1,
|
|
741
|
+
direction: "row",
|
|
742
|
+
align: "center",
|
|
743
|
+
justify: "flex-end",
|
|
744
|
+
style: {
|
|
745
|
+
width: '100%'
|
|
746
|
+
},
|
|
747
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
748
|
+
tonal: tonal,
|
|
749
|
+
color: "inherit",
|
|
750
|
+
version: "text",
|
|
751
|
+
size: "small",
|
|
752
|
+
onClick: () => {
|
|
753
|
+
const viewBox_ = refs.inputValues.current.viewBox?.split(' ');
|
|
754
|
+
if (viewBox_) {
|
|
755
|
+
viewBox_[2] = refs.inputValues.current.widthInput;
|
|
756
|
+
viewBox_[3] = refs.inputValues.current.heightInput;
|
|
757
|
+
}
|
|
758
|
+
updateInputValues('viewBox', viewBox_.join(' '));
|
|
759
|
+
updateInputValues('width', refs.inputValues.current.widthInput);
|
|
760
|
+
updateInputValues('height', refs.inputValues.current.heightInput);
|
|
761
|
+
updateOpen('size', false);
|
|
762
|
+
},
|
|
763
|
+
children: "Update"
|
|
764
|
+
})
|
|
765
|
+
})]
|
|
766
|
+
}))
|
|
767
|
+
}),
|
|
768
|
+
children: /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
769
|
+
name: l('Size'),
|
|
770
|
+
open: refs.open.current.size ? false : undefined,
|
|
771
|
+
children: is('function', render) ? render('size', ToggleButtonProps, refs.value.current) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({
|
|
772
|
+
ref: refs.elements.size
|
|
773
|
+
}, ToggleButtonProps), {}, {
|
|
774
|
+
selected: refs.open.current.size,
|
|
775
|
+
onClick: () => updateOpen('size', !refs.open.current.size),
|
|
776
|
+
children: /*#__PURE__*/_jsx(IconSize, _objectSpread({}, IconProps))
|
|
777
|
+
}))
|
|
778
|
+
})
|
|
779
|
+
})
|
|
780
|
+
}))]
|
|
781
|
+
})), updates_ && actions_ && /*#__PURE__*/_jsx(Divider, _objectSpread(_objectSpread({}, DividerProps), {}, {
|
|
782
|
+
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-divider'], DividerProps?.className, classes.divider, classes.divider_middle])
|
|
783
|
+
})), actions_ && /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({
|
|
784
|
+
gap: 2,
|
|
785
|
+
direction: "row",
|
|
786
|
+
align: "center",
|
|
787
|
+
justify: "flex-start"
|
|
788
|
+
}, ToolbarActionsProps), {}, {
|
|
789
|
+
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-toolbar'], ToolbarActionsProps?.className, classes.toolbar, classes.toolbar_actions]),
|
|
790
|
+
children: /*#__PURE__*/_jsxs(Line, {
|
|
791
|
+
direction: "row",
|
|
792
|
+
align: "center",
|
|
793
|
+
justify: "space-between",
|
|
794
|
+
style: {
|
|
795
|
+
width: '100%'
|
|
796
|
+
},
|
|
797
|
+
children: [/*#__PURE__*/_jsx(Line, {
|
|
798
|
+
gap: 2,
|
|
799
|
+
direction: "row",
|
|
800
|
+
align: "center",
|
|
801
|
+
justify: "flex-start",
|
|
802
|
+
children: includes('clear') && /*#__PURE__*/_jsx(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
803
|
+
children: includes('clear') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
804
|
+
name: l('Clear'),
|
|
805
|
+
children: is('function', render) ? render('clear', ToggleButtonProps, refs.value.current) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
806
|
+
onClick: onClear,
|
|
807
|
+
children: /*#__PURE__*/_jsx(IconClear, _objectSpread({}, IconProps))
|
|
808
|
+
}))
|
|
809
|
+
})
|
|
810
|
+
}))
|
|
811
|
+
}), /*#__PURE__*/_jsx(Line, {
|
|
812
|
+
gap: 2,
|
|
813
|
+
direction: "row",
|
|
814
|
+
align: "center",
|
|
815
|
+
justify: "flex-start",
|
|
816
|
+
children: includes('download') && /*#__PURE__*/_jsx(ToggleButtons, _objectSpread(_objectSpread({}, ToggleButtonsProps), {}, {
|
|
817
|
+
children: includes('download') && /*#__PURE__*/_jsx(WrapperToggleButton, {
|
|
818
|
+
name: l('Download'),
|
|
819
|
+
children: is('function', render) ? render('download', ToggleButtonProps, refs.value.current) : /*#__PURE__*/_jsx(ToggleButton, _objectSpread(_objectSpread({}, ToggleButtonProps), {}, {
|
|
820
|
+
loading: loading,
|
|
821
|
+
onClick: onDownload,
|
|
822
|
+
children: /*#__PURE__*/_jsx(IconDownload, _objectSpread({}, IconProps))
|
|
823
|
+
}))
|
|
824
|
+
})
|
|
825
|
+
}))
|
|
826
|
+
})]
|
|
827
|
+
})
|
|
828
|
+
})), /*#__PURE__*/_jsx(Divider, _objectSpread(_objectSpread({}, DividerProps), {}, {
|
|
829
|
+
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-divider'], DividerProps?.className, classes.divider, classes.divider_end])
|
|
830
|
+
}))]
|
|
831
|
+
})), /*#__PURE__*/_jsxs("svg", {
|
|
832
|
+
ref: item_5 => {
|
|
833
|
+
if (svgRef) svgRef.current = item_5;
|
|
834
|
+
refs.svg.current = item_5;
|
|
835
|
+
},
|
|
836
|
+
viewBox: refs.inputValues.current.viewBox,
|
|
837
|
+
onMouseDown: onMouseDown,
|
|
838
|
+
onTouchStart: onMouseDown,
|
|
839
|
+
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-svg'], classes.svg]),
|
|
710
840
|
style: {
|
|
711
|
-
width:
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
updateInputValues('height', refs.inputValues.current.heightInput);
|
|
727
|
-
updateOpen('size', false);
|
|
728
|
-
}
|
|
729
|
-
}, "Update"))))
|
|
730
|
-
}, /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
731
|
-
name: l('Size'),
|
|
732
|
-
open: refs.open.current.size ? false : undefined
|
|
733
|
-
}, is('function', render) ? render('size', ToggleButtonProps, refs.value.current) : /*#__PURE__*/React.createElement(ToggleButton, _extends({
|
|
734
|
-
ref: refs.elements.size
|
|
735
|
-
}, ToggleButtonProps, {
|
|
736
|
-
selected: refs.open.current.size,
|
|
737
|
-
onClick: () => updateOpen('size', !refs.open.current.size)
|
|
738
|
-
}), /*#__PURE__*/React.createElement(IconSize, IconProps)))))), updates_ && actions_ && /*#__PURE__*/React.createElement(Divider, _extends({}, DividerProps, {
|
|
739
|
-
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-divider'], DividerProps?.className, classes.divider, classes.divider_middle])
|
|
740
|
-
})), actions_ && /*#__PURE__*/React.createElement(Line, _extends({
|
|
741
|
-
gap: 2,
|
|
742
|
-
direction: "row",
|
|
743
|
-
align: "center",
|
|
744
|
-
justify: "flex-start"
|
|
745
|
-
}, ToolbarActionsProps, {
|
|
746
|
-
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-toolbar'], ToolbarActionsProps?.className, classes.toolbar, classes.toolbar_actions])
|
|
747
|
-
}), /*#__PURE__*/React.createElement(Line, {
|
|
748
|
-
direction: "row",
|
|
749
|
-
align: "center",
|
|
750
|
-
justify: "space-between",
|
|
751
|
-
style: {
|
|
752
|
-
width: '100%'
|
|
753
|
-
}
|
|
754
|
-
}, /*#__PURE__*/React.createElement(Line, {
|
|
755
|
-
gap: 2,
|
|
756
|
-
direction: "row",
|
|
757
|
-
align: "center",
|
|
758
|
-
justify: "flex-start"
|
|
759
|
-
}, includes('clear') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('clear') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
760
|
-
name: l('Clear')
|
|
761
|
-
}, is('function', render) ? render('clear', ToggleButtonProps, refs.value.current) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
762
|
-
onClick: onClear
|
|
763
|
-
}), /*#__PURE__*/React.createElement(IconClear, IconProps))))), /*#__PURE__*/React.createElement(Line, {
|
|
764
|
-
gap: 2,
|
|
765
|
-
direction: "row",
|
|
766
|
-
align: "center",
|
|
767
|
-
justify: "flex-start"
|
|
768
|
-
}, includes('download') && /*#__PURE__*/React.createElement(ToggleButtons, ToggleButtonsProps, includes('download') && /*#__PURE__*/React.createElement(WrapperToggleButton, {
|
|
769
|
-
name: l('Download')
|
|
770
|
-
}, is('function', render) ? render('download', ToggleButtonProps, refs.value.current) : /*#__PURE__*/React.createElement(ToggleButton, _extends({}, ToggleButtonProps, {
|
|
771
|
-
loading: loading,
|
|
772
|
-
onClick: onDownload
|
|
773
|
-
}), /*#__PURE__*/React.createElement(IconDownload, IconProps))))))), /*#__PURE__*/React.createElement(Divider, _extends({}, DividerProps, {
|
|
774
|
-
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-divider'], DividerProps?.className, classes.divider, classes.divider_end])
|
|
775
|
-
}))), /*#__PURE__*/React.createElement("svg", {
|
|
776
|
-
ref: item_5 => {
|
|
777
|
-
if (svgRef) svgRef.current = item_5;
|
|
778
|
-
refs.svg.current = item_5;
|
|
779
|
-
},
|
|
780
|
-
viewBox: refs.inputValues.current.viewBox,
|
|
781
|
-
onMouseDown: onMouseDown,
|
|
782
|
-
onTouchStart: onMouseDown,
|
|
783
|
-
className: classNames([staticClassName('Drawing', theme) && ['onesy-Drawing-svg'], classes.svg]),
|
|
784
|
-
style: {
|
|
785
|
-
width: refs.inputValues.current.width,
|
|
786
|
-
height: refs.inputValues.current.height
|
|
787
|
-
}
|
|
788
|
-
}, valueNew_.map((item_6, index_0) => /*#__PURE__*/React.createElement("path", _extends({
|
|
789
|
-
key: index_0,
|
|
790
|
-
fill: "none"
|
|
791
|
-
}, item_6))), /*#__PURE__*/React.createElement("circle", {
|
|
792
|
-
className: "onesy-Drawing-pointer",
|
|
793
|
-
cx: move?.x,
|
|
794
|
-
cy: move?.y,
|
|
795
|
-
r: circleStrokeWidth + 1,
|
|
796
|
-
fill: refs.inputValues.current.strokeColor
|
|
797
|
-
})));
|
|
798
|
-
});
|
|
841
|
+
width: refs.inputValues.current.width,
|
|
842
|
+
height: refs.inputValues.current.height
|
|
843
|
+
},
|
|
844
|
+
children: [valueNew_.map((item_6, index_0) => /*#__PURE__*/_jsx("path", _objectSpread({
|
|
845
|
+
fill: "none"
|
|
846
|
+
}, item_6), index_0)), /*#__PURE__*/_jsx("circle", {
|
|
847
|
+
className: "onesy-Drawing-pointer",
|
|
848
|
+
cx: move?.x,
|
|
849
|
+
cy: move?.y,
|
|
850
|
+
r: circleStrokeWidth + 1,
|
|
851
|
+
fill: refs.inputValues.current.strokeColor
|
|
852
|
+
})]
|
|
853
|
+
})]
|
|
854
|
+
}));
|
|
855
|
+
};
|
|
799
856
|
Drawing.displayName = 'onesy-Drawing';
|
|
800
857
|
export default Drawing;
|