@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
|
@@ -1,7 +1,6 @@
|
|
|
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", "image", "name", "type", "openDefault", "openedOptionDefault", "valueDefault", "value", "valueCopyDefault", "valueCopy", "onChange", "onChangeCopy", "onlyFilters", "filters", "meta", "filtersOption", "cropOption", "resizeOption", "qualityOption", "downloadOption", "resizeAspectRatio", "renderOption", "renderOptionClear", "renderSave", "renderCancel", "renderSlider", "renderDownload", "renderInput", "IconBrightness", "IconContrast", "IconSaturation", "IconFade", "IconInvert", "IconOldPhoto", "IconSave", "IconCancel", "IconClear", "IconCrop", "IconFilters", "IconResize", "IconQuality", "IconDownload", "ChipProps", "SliderProps", "TooltipProps", "ImageCropProps", "IconButtonProps", "className", "children"];
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "image", "name", "type", "openDefault", "openedOptionDefault", "valueDefault", "value", "valueCopyDefault", "valueCopy", "onChange", "onChangeCopy", "onlyFilters", "filters", "meta", "filtersOption", "cropOption", "resizeOption", "qualityOption", "downloadOption", "resizeAspectRatio", "renderOption", "renderOptionClear", "renderSave", "renderCancel", "renderSlider", "renderDownload", "renderInput", "IconBrightness", "IconContrast", "IconSaturation", "IconFade", "IconInvert", "IconOldPhoto", "IconSave", "IconCancel", "IconClear", "IconCrop", "IconFilters", "IconResize", "IconQuality", "IconDownload", "ChipProps", "SliderProps", "TooltipProps", "ImageCropProps", "IconButtonProps", "className", "children"];
|
|
5
4
|
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; }
|
|
6
5
|
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; }
|
|
7
6
|
import React from 'react';
|
|
@@ -33,6 +32,7 @@ import ImageCropElement from '../ImageCrop';
|
|
|
33
32
|
import ChipElement from '../Chip';
|
|
34
33
|
import LineElement from '../Line';
|
|
35
34
|
import { canvasBrightness, staticClassName, image as imageMethod, canvasContrast, canvasSaturation, canvasFade, canvasInvert, canvasOldPhoto } from '../utils';
|
|
35
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
36
36
|
const useStyle = styleMethod(theme => ({
|
|
37
37
|
root: {},
|
|
38
38
|
option: {
|
|
@@ -120,7 +120,7 @@ const useStyle = styleMethod(theme => ({
|
|
|
120
120
|
}), {
|
|
121
121
|
name: 'onesy-ImageEdit'
|
|
122
122
|
});
|
|
123
|
-
const ImageEdit =
|
|
123
|
+
const ImageEdit = props_ => {
|
|
124
124
|
const theme = useOnesyTheme();
|
|
125
125
|
const l = theme.l;
|
|
126
126
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyImageEdit?.props?.default), props_);
|
|
@@ -136,6 +136,7 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
136
136
|
const ImageCrop = theme?.elements?.ImageCrop || ImageCropElement;
|
|
137
137
|
const Chip = theme?.elements?.Chip || ChipElement;
|
|
138
138
|
const {
|
|
139
|
+
ref,
|
|
139
140
|
tonal = true,
|
|
140
141
|
color = 'primary',
|
|
141
142
|
image,
|
|
@@ -536,16 +537,18 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
536
537
|
Icon: IconBrightness,
|
|
537
538
|
value: 'brightness',
|
|
538
539
|
method: canvasBrightness,
|
|
539
|
-
renderIconButton: (value__, selected_, onChangeFilter_) => /*#__PURE__*/
|
|
540
|
-
key: value__,
|
|
540
|
+
renderIconButton: (value__, selected_, onChangeFilter_) => /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
541
541
|
name: l('Brightness')
|
|
542
|
-
}, TooltipProps),
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
542
|
+
}, TooltipProps), {}, {
|
|
543
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
544
|
+
version: "outlined",
|
|
545
|
+
selected: selected_,
|
|
546
|
+
onClick: () => onChangeFilter_(value__)
|
|
547
|
+
}, IconButtonProps), {}, {
|
|
548
|
+
children: /*#__PURE__*/_jsx(IconBrightness, {})
|
|
549
|
+
}))
|
|
550
|
+
}), value__),
|
|
551
|
+
renderSlider: (value___0, filterValuesCopy_, onFilterSliderChange_) => /*#__PURE__*/_jsx(Slider, _objectSpread(_objectSpread({
|
|
549
552
|
valueDefault: filterValuesCopy_?.[value___0] || 0,
|
|
550
553
|
value: filterValuesCopy_?.[value___0] || 0,
|
|
551
554
|
min: -100,
|
|
@@ -566,24 +569,26 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
566
569
|
onChange: valueNew_11 => {
|
|
567
570
|
if (is('function', onFilterSliderChange_)) onFilterSliderChange_(valueNew_11, value___0);
|
|
568
571
|
}
|
|
569
|
-
}, SliderProps, {
|
|
572
|
+
}, SliderProps), {}, {
|
|
570
573
|
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-slider'], SliderProps.className, classes.slider])
|
|
571
|
-
}))
|
|
574
|
+
}), value___0)
|
|
572
575
|
}, {
|
|
573
576
|
label: l('Contrast'),
|
|
574
577
|
Icon: IconContrast,
|
|
575
578
|
value: 'contrast',
|
|
576
579
|
method: canvasContrast,
|
|
577
|
-
renderIconButton: (value___1, selected__0, onChangeFilter__0) => /*#__PURE__*/
|
|
578
|
-
key: value___1,
|
|
580
|
+
renderIconButton: (value___1, selected__0, onChangeFilter__0) => /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
579
581
|
name: l('Contrast')
|
|
580
|
-
}, TooltipProps),
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
582
|
+
}, TooltipProps), {}, {
|
|
583
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
584
|
+
version: "outlined",
|
|
585
|
+
selected: selected__0,
|
|
586
|
+
onClick: () => onChangeFilter__0(value___1)
|
|
587
|
+
}, IconButtonProps), {}, {
|
|
588
|
+
children: /*#__PURE__*/_jsx(IconContrast, {})
|
|
589
|
+
}))
|
|
590
|
+
}), value___1),
|
|
591
|
+
renderSlider: (value___2, filterValuesCopy__0, onFilterSliderChange__0) => /*#__PURE__*/_jsx(Slider, _objectSpread(_objectSpread({
|
|
587
592
|
valueDefault: filterValuesCopy__0?.[value___2] || 0,
|
|
588
593
|
value: filterValuesCopy__0?.[value___2] || 0,
|
|
589
594
|
min: -100,
|
|
@@ -604,24 +609,26 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
604
609
|
onChange: valueNew_12 => {
|
|
605
610
|
if (is('function', onFilterSliderChange__0)) onFilterSliderChange__0(valueNew_12, value___2);
|
|
606
611
|
}
|
|
607
|
-
}, SliderProps, {
|
|
612
|
+
}, SliderProps), {}, {
|
|
608
613
|
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-slider'], SliderProps.className, classes.slider])
|
|
609
|
-
}))
|
|
614
|
+
}), value___2)
|
|
610
615
|
}, {
|
|
611
616
|
label: l('Saturation'),
|
|
612
617
|
Icon: IconSaturation,
|
|
613
618
|
value: 'saturation',
|
|
614
619
|
method: canvasSaturation,
|
|
615
|
-
renderIconButton: (value___3, selected__1, onChangeFilter__1) => /*#__PURE__*/
|
|
616
|
-
key: value___3,
|
|
620
|
+
renderIconButton: (value___3, selected__1, onChangeFilter__1) => /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
617
621
|
name: l('Saturation')
|
|
618
|
-
}, TooltipProps),
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
622
|
+
}, TooltipProps), {}, {
|
|
623
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
624
|
+
version: "outlined",
|
|
625
|
+
selected: selected__1,
|
|
626
|
+
onClick: () => onChangeFilter__1(value___3)
|
|
627
|
+
}, IconButtonProps), {}, {
|
|
628
|
+
children: /*#__PURE__*/_jsx(IconSaturation, {})
|
|
629
|
+
}))
|
|
630
|
+
}), value___3),
|
|
631
|
+
renderSlider: (value___4, filterValuesCopy__1, onFilterSliderChange__1) => /*#__PURE__*/_jsx(Slider, _objectSpread(_objectSpread({
|
|
625
632
|
valueDefault: filterValuesCopy__1?.[value___4] || 0,
|
|
626
633
|
value: filterValuesCopy__1?.[value___4] || 0,
|
|
627
634
|
min: -100,
|
|
@@ -642,24 +649,26 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
642
649
|
onChange: valueNew_13 => {
|
|
643
650
|
if (is('function', onFilterSliderChange__1)) onFilterSliderChange__1(valueNew_13, value___4);
|
|
644
651
|
}
|
|
645
|
-
}, SliderProps, {
|
|
652
|
+
}, SliderProps), {}, {
|
|
646
653
|
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-slider'], SliderProps.className, classes.slider])
|
|
647
|
-
}))
|
|
654
|
+
}), value___4)
|
|
648
655
|
}, {
|
|
649
656
|
label: l('Fade'),
|
|
650
657
|
Icon: IconFade,
|
|
651
658
|
value: 'fade',
|
|
652
659
|
method: canvasFade,
|
|
653
|
-
renderIconButton: (value___5, selected__2, onChangeFilter__2) => /*#__PURE__*/
|
|
654
|
-
key: value___5,
|
|
660
|
+
renderIconButton: (value___5, selected__2, onChangeFilter__2) => /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
655
661
|
name: l('Fade')
|
|
656
|
-
}, TooltipProps),
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
662
|
+
}, TooltipProps), {}, {
|
|
663
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
664
|
+
version: "outlined",
|
|
665
|
+
selected: selected__2,
|
|
666
|
+
onClick: () => onChangeFilter__2(value___5)
|
|
667
|
+
}, IconButtonProps), {}, {
|
|
668
|
+
children: /*#__PURE__*/_jsx(IconFade, {})
|
|
669
|
+
}))
|
|
670
|
+
}), value___5),
|
|
671
|
+
renderSlider: (value___6, filterValuesCopy__2, onFilterSliderChange__2) => /*#__PURE__*/_jsx(Slider, _objectSpread(_objectSpread({
|
|
663
672
|
valueDefault: filterValuesCopy__2?.[value___6] || 0,
|
|
664
673
|
value: filterValuesCopy__2?.[value___6] || 0,
|
|
665
674
|
min: 0,
|
|
@@ -677,24 +686,26 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
677
686
|
onChange: valueNew_14 => {
|
|
678
687
|
if (is('function', onFilterSliderChange__2)) onFilterSliderChange__2(valueNew_14, value___6);
|
|
679
688
|
}
|
|
680
|
-
}, SliderProps, {
|
|
689
|
+
}, SliderProps), {}, {
|
|
681
690
|
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-slider'], SliderProps.className, classes.slider])
|
|
682
|
-
}))
|
|
691
|
+
}), value___6)
|
|
683
692
|
}, {
|
|
684
693
|
label: l('Invert'),
|
|
685
694
|
Icon: IconInvert,
|
|
686
695
|
value: 'invert',
|
|
687
696
|
method: canvasInvert,
|
|
688
|
-
renderIconButton: (value___7, selected__3, onChangeFilter__3) => /*#__PURE__*/
|
|
689
|
-
key: value___7,
|
|
697
|
+
renderIconButton: (value___7, selected__3, onChangeFilter__3) => /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
690
698
|
name: l('Invert')
|
|
691
|
-
}, TooltipProps),
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
699
|
+
}, TooltipProps), {}, {
|
|
700
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
701
|
+
version: "outlined",
|
|
702
|
+
selected: selected__3,
|
|
703
|
+
onClick: () => onChangeFilter__3(value___7)
|
|
704
|
+
}, IconButtonProps), {}, {
|
|
705
|
+
children: /*#__PURE__*/_jsx(IconInvert, {})
|
|
706
|
+
}))
|
|
707
|
+
}), value___7),
|
|
708
|
+
renderSlider: (value___8, filterValuesCopy__3, onFilterSliderChange__3) => /*#__PURE__*/_jsx(Slider, _objectSpread(_objectSpread({
|
|
698
709
|
valueDefault: filterValuesCopy__3?.[value___8] || 0,
|
|
699
710
|
value: filterValuesCopy__3?.[value___8] || 0,
|
|
700
711
|
min: 0,
|
|
@@ -712,24 +723,26 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
712
723
|
onChange: valueNew_15 => {
|
|
713
724
|
if (is('function', onFilterSliderChange__3)) onFilterSliderChange__3(valueNew_15, value___8);
|
|
714
725
|
}
|
|
715
|
-
}, SliderProps, {
|
|
726
|
+
}, SliderProps), {}, {
|
|
716
727
|
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-slider'], SliderProps.className, classes.slider])
|
|
717
|
-
}))
|
|
728
|
+
}), value___8)
|
|
718
729
|
}, {
|
|
719
730
|
label: l('Old photo'),
|
|
720
731
|
Icon: IconOldPhoto,
|
|
721
732
|
value: 'old_photo',
|
|
722
733
|
method: canvasOldPhoto,
|
|
723
|
-
renderIconButton: (value___9, selected__4, onChangeFilter__4) => /*#__PURE__*/
|
|
724
|
-
key: value___9,
|
|
734
|
+
renderIconButton: (value___9, selected__4, onChangeFilter__4) => /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
725
735
|
name: l('Old photo')
|
|
726
|
-
}, TooltipProps),
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
736
|
+
}, TooltipProps), {}, {
|
|
737
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
738
|
+
version: "outlined",
|
|
739
|
+
selected: selected__4,
|
|
740
|
+
onClick: () => onChangeFilter__4(value___9)
|
|
741
|
+
}, IconButtonProps), {}, {
|
|
742
|
+
children: /*#__PURE__*/_jsx(IconOldPhoto, {})
|
|
743
|
+
}))
|
|
744
|
+
}), value___9),
|
|
745
|
+
renderSlider: (value___10, filterValuesCopy__4, onFilterSliderChange__4) => /*#__PURE__*/_jsx(Slider, _objectSpread(_objectSpread({
|
|
733
746
|
valueDefault: filterValuesCopy__4?.[value___10] || 0,
|
|
734
747
|
value: filterValuesCopy__4?.[value___10] || 0,
|
|
735
748
|
min: -40,
|
|
@@ -750,9 +763,9 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
750
763
|
onChange: valueNew_16 => {
|
|
751
764
|
if (is('function', onFilterSliderChange__4)) onFilterSliderChange__4(valueNew_16, value___10);
|
|
752
765
|
}
|
|
753
|
-
}, SliderProps, {
|
|
766
|
+
}, SliderProps), {}, {
|
|
754
767
|
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-slider'], SliderProps.className, classes.slider])
|
|
755
|
-
}))
|
|
768
|
+
}), value___10)
|
|
756
769
|
}, ...(filters_ || [])], [filters_]);
|
|
757
770
|
|
|
758
771
|
// Only filters
|
|
@@ -806,7 +819,7 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
806
819
|
version: 'b3'
|
|
807
820
|
};
|
|
808
821
|
const filterValue = filters.find(item__0 => item__0.value === filter);
|
|
809
|
-
return /*#__PURE__*/
|
|
822
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
810
823
|
ref: item_1 => {
|
|
811
824
|
if (ref) {
|
|
812
825
|
if (is('function', ref)) ref(item_1);else if (ref?.current) ref.current = item_1;
|
|
@@ -819,225 +832,277 @@ const ImageEdit = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
819
832
|
direction: "column",
|
|
820
833
|
Component: Surface,
|
|
821
834
|
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-root', `onesy-ImageEdit-size-${size}`], className, classes.root])
|
|
822
|
-
}, other),
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
835
|
+
}, other), {}, {
|
|
836
|
+
children: [/*#__PURE__*/_jsx(Line, {
|
|
837
|
+
gap: 0,
|
|
838
|
+
direction: "column",
|
|
839
|
+
align: "center",
|
|
840
|
+
justify: "center",
|
|
841
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-image-wrapper'], classes.imageWrapper]),
|
|
842
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
843
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-canvas-wrapper'], classes.canvasWrapper]),
|
|
844
|
+
children: [/*#__PURE__*/_jsx("canvas", {
|
|
845
|
+
ref: refs.canvasMain,
|
|
846
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-canvas', 'onesy-ImageEdit-canvas-main'], classes.canvas, classes.canvas_main])
|
|
847
|
+
}), open && openedOption === 'crop' && /*#__PURE__*/_jsx(ImageCrop, _objectSpread(_objectSpread({
|
|
848
|
+
image: valueCopy,
|
|
849
|
+
aspectRatio: aspectRatio ? aspectRatio : undefined,
|
|
850
|
+
onSelectorChange: selector => setSelection(selector)
|
|
851
|
+
}, ImageCropProps), {}, {
|
|
852
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-image-crop'], ImageCropProps.className, classes.imageCrop]),
|
|
853
|
+
style: {
|
|
854
|
+
width: valueCopy?.width,
|
|
855
|
+
height: valueCopy?.height
|
|
856
|
+
}
|
|
857
|
+
}))]
|
|
858
|
+
})
|
|
859
|
+
}), (filtersOption || cropOption || resizeOption || qualityOption) && /*#__PURE__*/_jsxs(_Fragment, {
|
|
860
|
+
children: [/*#__PURE__*/_jsxs(Expand, {
|
|
861
|
+
in: !!open,
|
|
862
|
+
parent: refs.root.current,
|
|
863
|
+
style: {
|
|
864
|
+
width: '100%'
|
|
865
|
+
},
|
|
866
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
867
|
+
gap: 0,
|
|
868
|
+
ref: refs.option,
|
|
869
|
+
direction: "column",
|
|
870
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-option'], classes.option]),
|
|
871
|
+
children: [openedOption === 'filters' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
872
|
+
children: [/*#__PURE__*/_jsx(Expand, {
|
|
873
|
+
in: !!filterValue,
|
|
874
|
+
parent: refs.option.current,
|
|
875
|
+
style: {
|
|
876
|
+
width: '100%'
|
|
877
|
+
},
|
|
878
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
879
|
+
style: {
|
|
880
|
+
paddingInline: theme.methods.space.value(5, 'px'),
|
|
881
|
+
paddingBottom: theme.methods.space.value(5, 'px')
|
|
882
|
+
},
|
|
883
|
+
children: is('function', filterValue?.renderSlider) && filterValue?.renderSlider(filterValue.value, refs.filterValuesCopy.current, onFilterSliderChange)
|
|
884
|
+
})
|
|
885
|
+
}), /*#__PURE__*/_jsx(Line, {
|
|
886
|
+
gap: 1,
|
|
887
|
+
direction: "row",
|
|
888
|
+
align: "center",
|
|
889
|
+
justify: "flex-start",
|
|
890
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-filters'], classes.filters]),
|
|
891
|
+
children: filters.map(item_2 => is('function', item_2.renderIconButton) && item_2.renderIconButton(item_2.value, item_2.value === filter, onChangeFilter))
|
|
892
|
+
})]
|
|
893
|
+
}), openedOption === 'crop' && /*#__PURE__*/_jsxs(Line, {
|
|
894
|
+
gap: 1,
|
|
895
|
+
direction: "row",
|
|
896
|
+
align: "center",
|
|
897
|
+
justify: "center",
|
|
898
|
+
style: {
|
|
899
|
+
width: '100%'
|
|
900
|
+
},
|
|
901
|
+
children: [chips.map((item_3, index) => /*#__PURE__*/_jsx(Chip, _objectSpread(_objectSpread({
|
|
902
|
+
selected: aspectRatio === item_3.value,
|
|
903
|
+
onClick: () => onChangeAspectRatio(item_3.value)
|
|
904
|
+
}, ChipProps), {}, {
|
|
905
|
+
children: item_3.label
|
|
906
|
+
}), index)), /*#__PURE__*/_jsxs(Line, {
|
|
907
|
+
gap: 0,
|
|
908
|
+
direction: "row",
|
|
909
|
+
align: "center",
|
|
910
|
+
justify: "center",
|
|
911
|
+
children: [is('function', renderInput) ? renderInput(value, valueCopy, aspectRatioCustom, onChangeAspectRatioCustom, 'left') : /*#__PURE__*/_jsx(NumericTextField, {
|
|
912
|
+
tonal: tonal,
|
|
913
|
+
color: "default",
|
|
914
|
+
version: "text",
|
|
915
|
+
size: "small",
|
|
916
|
+
min: 1,
|
|
917
|
+
value: aspectRatioCustom?.[0],
|
|
918
|
+
onChange: valueNew_17 => onChangeAspectRatioCustom(+valueNew_17),
|
|
919
|
+
increment: false,
|
|
920
|
+
decrement: false,
|
|
921
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-option-input'], classes.optionInput]),
|
|
922
|
+
style: {
|
|
923
|
+
width: 24
|
|
924
|
+
}
|
|
925
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
926
|
+
children: ":"
|
|
927
|
+
}), is('function', renderInput) ? renderInput(value, valueCopy, aspectRatioCustom, onChangeAspectRatioCustom, 'right') : /*#__PURE__*/_jsx(NumericTextField, {
|
|
928
|
+
tonal: tonal,
|
|
929
|
+
color: "default",
|
|
930
|
+
version: "text",
|
|
931
|
+
size: "small",
|
|
932
|
+
min: 1,
|
|
933
|
+
value: aspectRatioCustom?.[1],
|
|
934
|
+
onChange: valueNew_18 => onChangeAspectRatioCustom(+valueNew_18, false),
|
|
935
|
+
increment: false,
|
|
936
|
+
decrement: false,
|
|
937
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-option-input'], classes.optionInput]),
|
|
938
|
+
style: {
|
|
939
|
+
width: 24
|
|
940
|
+
}
|
|
941
|
+
})]
|
|
942
|
+
})]
|
|
943
|
+
}), openedOption === 'resize' && /*#__PURE__*/_jsxs(Line, {
|
|
944
|
+
direction: "row",
|
|
945
|
+
align: "center",
|
|
946
|
+
justify: "center",
|
|
947
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-inputs'], classes.inputs]),
|
|
948
|
+
children: [is('function', renderInput) ? renderInput(value, valueCopy, resize, onChangeResize, 'width') : /*#__PURE__*/_jsx(NumericTextField, {
|
|
949
|
+
tonal: tonal,
|
|
950
|
+
name: l('Width'),
|
|
951
|
+
color: "default",
|
|
952
|
+
version: "text",
|
|
953
|
+
size: "small",
|
|
954
|
+
min: 1,
|
|
955
|
+
max: value?.width,
|
|
956
|
+
valueDefault: value?.width,
|
|
957
|
+
value: resize?.[0],
|
|
958
|
+
onChange: valueNew_19 => onChangeResize(valueNew_19)
|
|
959
|
+
}), is('function', renderInput) ? renderInput(value, valueCopy, resize, onChangeResize, 'height') : /*#__PURE__*/_jsx(NumericTextField, {
|
|
960
|
+
tonal: tonal,
|
|
961
|
+
name: l('Height'),
|
|
962
|
+
color: "default",
|
|
963
|
+
version: "text",
|
|
964
|
+
size: "small",
|
|
965
|
+
min: 1,
|
|
966
|
+
max: value?.height,
|
|
967
|
+
valueDefault: value?.height,
|
|
968
|
+
value: resize?.[1],
|
|
969
|
+
onChange: valueNew_20 => onChangeResize(valueNew_20, false)
|
|
970
|
+
})]
|
|
971
|
+
}), openedOption === 'quality' && /*#__PURE__*/_jsxs(Line, {
|
|
972
|
+
gap: 3,
|
|
973
|
+
direction: "row",
|
|
974
|
+
align: "center",
|
|
975
|
+
style: {
|
|
976
|
+
width: '100%'
|
|
977
|
+
},
|
|
978
|
+
children: [/*#__PURE__*/_jsx(Slider, _objectSpread(_objectSpread({
|
|
979
|
+
valueDefault: quality,
|
|
980
|
+
value: quality,
|
|
981
|
+
min: 1,
|
|
982
|
+
max: 100,
|
|
983
|
+
precision: 1,
|
|
984
|
+
marks: [{
|
|
985
|
+
value: 1
|
|
986
|
+
}, {
|
|
987
|
+
value: 50
|
|
988
|
+
}, {
|
|
989
|
+
value: 100
|
|
990
|
+
}],
|
|
991
|
+
tooltip: true,
|
|
992
|
+
onChange: onChangeQuality
|
|
993
|
+
}, SliderProps), {}, {
|
|
994
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-slider'], SliderProps.className, classes.slider])
|
|
995
|
+
})), /*#__PURE__*/_jsx(NumericTextField, {
|
|
996
|
+
tonal: tonal,
|
|
997
|
+
color: "default",
|
|
998
|
+
version: "text",
|
|
999
|
+
size: "small",
|
|
1000
|
+
min: 1,
|
|
1001
|
+
max: 100,
|
|
1002
|
+
value: quality,
|
|
1003
|
+
increment: false,
|
|
1004
|
+
decrement: false,
|
|
1005
|
+
onChange: valueNew_21 => onChangeQuality(+valueNew_21),
|
|
1006
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-option-input'], classes.optionInput]),
|
|
1007
|
+
style: {
|
|
1008
|
+
width: 34
|
|
1009
|
+
}
|
|
1010
|
+
})]
|
|
1011
|
+
}), /*#__PURE__*/_jsxs(Line, {
|
|
1012
|
+
gap: 1,
|
|
1013
|
+
direction: "row",
|
|
1014
|
+
align: "center",
|
|
1015
|
+
justify: "center",
|
|
1016
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-action'], classes.action]),
|
|
1017
|
+
children: [is('function', renderSave) ? renderSave(onSave) : /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
1018
|
+
name: l('Save')
|
|
1019
|
+
}, TooltipProps), {}, {
|
|
1020
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
1021
|
+
version: "outlined",
|
|
1022
|
+
onClick: onSave
|
|
1023
|
+
}, IconButtonProps), {}, {
|
|
1024
|
+
children: /*#__PURE__*/_jsx(IconSave, {})
|
|
1025
|
+
}))
|
|
1026
|
+
})), is('function', renderCancel) ? renderCancel(onSave) : /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
1027
|
+
name: l('Cancel')
|
|
1028
|
+
}, TooltipProps), {}, {
|
|
1029
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
1030
|
+
version: "outlined",
|
|
1031
|
+
onClick: onCancel
|
|
1032
|
+
}, IconButtonProps), {}, {
|
|
1033
|
+
children: /*#__PURE__*/_jsx(IconCancel, {})
|
|
1034
|
+
}))
|
|
1035
|
+
}))]
|
|
1036
|
+
})]
|
|
1037
|
+
}), /*#__PURE__*/_jsx(Divider, {
|
|
1038
|
+
color: "inherit",
|
|
1039
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-divider'], classes.divider])
|
|
1040
|
+
})]
|
|
1041
|
+
}), /*#__PURE__*/_jsx(Line, {
|
|
1042
|
+
direction: "column",
|
|
1043
|
+
align: "center",
|
|
1044
|
+
justify: "center",
|
|
1045
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-options'], classes.options]),
|
|
1046
|
+
children: /*#__PURE__*/_jsxs(Line, {
|
|
1047
|
+
gap: 1,
|
|
1048
|
+
direction: "row",
|
|
1049
|
+
justify: "flex-start",
|
|
1050
|
+
children: [options.map((item_4, index_0) => is('function', renderOption) ? renderOption(item_4, open && openOption === item_4.value, openOption) : /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
1051
|
+
name: item_4.label
|
|
1052
|
+
}, TooltipProps), {}, {
|
|
1053
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
1054
|
+
version: "outlined",
|
|
1055
|
+
selected: open && openedOption === item_4.value,
|
|
1056
|
+
onClick: () => openOption(item_4.value)
|
|
1057
|
+
}, IconButtonProps), {}, {
|
|
1058
|
+
children: /*#__PURE__*/_jsx(item_4.Icon, {})
|
|
1059
|
+
}))
|
|
1060
|
+
}), index_0)), /*#__PURE__*/_jsxs(Line, {
|
|
1061
|
+
gap: 0,
|
|
1062
|
+
direction: "row",
|
|
1063
|
+
align: "center",
|
|
1064
|
+
children: [downloadOption && is('function', renderDownload) ? renderDownload(onDownload) : /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
1065
|
+
name: l('Download')
|
|
1066
|
+
}, TooltipProps), {}, {
|
|
1067
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
1068
|
+
version: "text",
|
|
1069
|
+
onClick: onDownload
|
|
1070
|
+
}, IconButtonProps), {}, {
|
|
1071
|
+
children: /*#__PURE__*/_jsx(IconDownload, {})
|
|
1072
|
+
}))
|
|
1073
|
+
})), is('function', renderOptionClear) ? renderOptionClear(onReset) : /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
|
|
1074
|
+
name: l('Reset')
|
|
1075
|
+
}, TooltipProps), {}, {
|
|
1076
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
1077
|
+
version: "text",
|
|
1078
|
+
onClick: onReset
|
|
1079
|
+
}, IconButtonProps), {}, {
|
|
1080
|
+
children: /*#__PURE__*/_jsx(IconClear, {})
|
|
1081
|
+
}))
|
|
1082
|
+
}))]
|
|
1083
|
+
})]
|
|
1084
|
+
})
|
|
1085
|
+
})]
|
|
1086
|
+
}), children, meta && value && /*#__PURE__*/_jsxs(_Fragment, {
|
|
1087
|
+
children: [/*#__PURE__*/_jsx(Divider, {
|
|
1088
|
+
color: "inherit",
|
|
1089
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-divider'], classes.divider])
|
|
1090
|
+
}), /*#__PURE__*/_jsxs(Line, {
|
|
1091
|
+
gap: 1,
|
|
1092
|
+
direction: "row",
|
|
1093
|
+
align: "center",
|
|
1094
|
+
justify: "center",
|
|
1095
|
+
className: classNames([staticClassName('ImageEdit', theme) && ['onesy-ImageEdit-meta'], classes.meta]),
|
|
1096
|
+
children: [/*#__PURE__*/_jsxs(Type, _objectSpread(_objectSpread({}, MetaTypeProps), {}, {
|
|
1097
|
+
children: [l('Dimensions'), ": ", (!open ? value : valueCopy)?.width, "x", (!open ? value : valueCopy)?.height]
|
|
1098
|
+
})), /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread({}, MetaTypeProps), {}, {
|
|
1099
|
+
children: "\xB7"
|
|
1100
|
+
})), /*#__PURE__*/_jsxs(Type, _objectSpread(_objectSpread({}, MetaTypeProps), {}, {
|
|
1101
|
+
children: [l('Size'), ": ", size]
|
|
1102
|
+
}))]
|
|
1103
|
+
})]
|
|
1104
|
+
})]
|
|
1105
|
+
}));
|
|
1106
|
+
};
|
|
1042
1107
|
ImageEdit.displayName = 'onesy-ImageEdit';
|
|
1043
1108
|
export default ImageEdit;
|