@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,4 +1,3 @@
|
|
|
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
3
|
const _excluded = ["children", "className"];
|
|
@@ -9,6 +8,7 @@ import { classNames, style, useOnesyTheme } from '@onesy/style-react';
|
|
|
9
8
|
import useOpen from '../useOpen';
|
|
10
9
|
import LineElement from '../Line';
|
|
11
10
|
import MainProgressContext from './Context';
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
const useStyle = style(theme => ({
|
|
13
13
|
'@keyframes move': {
|
|
14
14
|
from: {
|
|
@@ -38,7 +38,7 @@ const useStyle = style(theme => ({
|
|
|
38
38
|
}), {
|
|
39
39
|
name: 'onesy-MainProgress'
|
|
40
40
|
});
|
|
41
|
-
const MainProgress =
|
|
41
|
+
const MainProgress = props_ => {
|
|
42
42
|
const theme = useOnesyTheme();
|
|
43
43
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyMainProgress?.props?.default), props_);
|
|
44
44
|
const {
|
|
@@ -63,14 +63,16 @@ const MainProgress = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
63
63
|
done
|
|
64
64
|
};
|
|
65
65
|
}, []);
|
|
66
|
-
return /*#__PURE__*/
|
|
67
|
-
value: value
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
})
|
|
66
|
+
return /*#__PURE__*/_jsxs(MainProgressContext.Provider, {
|
|
67
|
+
value: value,
|
|
68
|
+
children: [open.open && /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({
|
|
69
|
+
fullWidth: true,
|
|
70
|
+
className: classNames(['onesy-MainProgress-root', className, classes.root])
|
|
71
|
+
}, other), {}, {
|
|
72
|
+
children: /*#__PURE__*/_jsx(Line, {
|
|
73
|
+
className: classes.loader
|
|
74
|
+
})
|
|
75
|
+
})), children]
|
|
76
|
+
});
|
|
77
|
+
};
|
|
76
78
|
export default MainProgress;
|
|
@@ -1,4 +1,3 @@
|
|
|
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
3
|
const _excluded = ["min", "max", "firstIncrement", "incrementMin", "incrementMax", "stepMin", "stepMax", "stepInterval", "onStart", "onIncrement", "onUpdate", "onDone", "fixed", "position", "TransitionComponent", "TransitionComponentProps", "className", "children"];
|
|
@@ -11,6 +10,7 @@ import FadeElement from '../Fade';
|
|
|
11
10
|
import LinearProgressElement from '../LinearProgress';
|
|
12
11
|
import MainProgressMaterialContext from './Context';
|
|
13
12
|
import { staticClassName } from '../utils';
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
const useStyle = styleMethod(theme => ({
|
|
15
15
|
root: {
|
|
16
16
|
zIndex: theme.z_index.tooltip - 14,
|
|
@@ -36,7 +36,7 @@ const useStyle = styleMethod(theme => ({
|
|
|
36
36
|
}), {
|
|
37
37
|
name: 'onesy-MainProgressMaterial'
|
|
38
38
|
});
|
|
39
|
-
const MainProgressMaterial =
|
|
39
|
+
const MainProgressMaterial = props_ => {
|
|
40
40
|
const theme = useOnesyTheme();
|
|
41
41
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyMainProgressMaterial?.props?.default), props_);
|
|
42
42
|
const Fade = theme?.elements?.Fade || FadeElement;
|
|
@@ -166,17 +166,19 @@ const MainProgressMaterial = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
166
166
|
refs.value_.current.increment = increment;
|
|
167
167
|
refs.value_.current.update = update;
|
|
168
168
|
refs.value_.current.done = done;
|
|
169
|
-
return /*#__PURE__*/
|
|
170
|
-
value: refs.value_.current
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
})
|
|
169
|
+
return /*#__PURE__*/_jsxs(MainProgressMaterialContext.Provider, {
|
|
170
|
+
value: refs.value_.current,
|
|
171
|
+
children: [/*#__PURE__*/_jsx(TransitionComponent, _objectSpread(_objectSpread({
|
|
172
|
+
in: inProp,
|
|
173
|
+
onExited: onExited
|
|
174
|
+
}, TransitionComponentProps), {}, {
|
|
175
|
+
children: /*#__PURE__*/_jsx(LinearProgress, _objectSpread(_objectSpread({
|
|
176
|
+
value: value,
|
|
177
|
+
version: "determinate",
|
|
178
|
+
className: classNames([staticClassName('MainProgressMaterial', theme) && [`onesy-MainProgressMaterial-root`], className, classes.root, classes[`position_${position}`], fixed && classes.fixed])
|
|
179
|
+
}, other), refs.linearProgress.current))
|
|
180
|
+
})), children]
|
|
181
|
+
});
|
|
182
|
+
};
|
|
181
183
|
MainProgressMaterial.displayName = 'onesy-MainProgressMaterial';
|
|
182
184
|
export default MainProgressMaterial;
|
package/esm/Markdown/Markdown.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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 = ["value", "render", "elementClassNames", "elementStyles", "onAdded", "onUpdate", "onStart", "Component", "className", "children"];
|
|
3
|
+
const _excluded = ["ref", "value", "render", "elementClassNames", "elementStyles", "onAdded", "onUpdate", "onStart", "Component", "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';
|
|
8
7
|
import { colorToRgb, is } from '@onesy/utils';
|
|
9
8
|
import { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-react';
|
|
10
9
|
import { replace, sanitize, staticClassName } from '../utils';
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
const useStyle = styleMethod(theme => ({
|
|
12
12
|
root: {
|
|
13
13
|
width: '100%',
|
|
@@ -171,10 +171,11 @@ const useStyle = styleMethod(theme => ({
|
|
|
171
171
|
name: 'onesy-Markdown'
|
|
172
172
|
});
|
|
173
173
|
const escapeRegExp = value => value.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
174
|
-
const Markdown =
|
|
174
|
+
const Markdown = props_ => {
|
|
175
175
|
const theme = useOnesyTheme();
|
|
176
176
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyMarkdown?.props?.default), props_);
|
|
177
177
|
const {
|
|
178
|
+
ref,
|
|
178
179
|
value,
|
|
179
180
|
render,
|
|
180
181
|
elementClassNames,
|
|
@@ -678,7 +679,7 @@ ${listItem(other_, level_1)}
|
|
|
678
679
|
if (is('function', onUpdate)) onUpdate();
|
|
679
680
|
}
|
|
680
681
|
}, [init, value]);
|
|
681
|
-
return /*#__PURE__*/
|
|
682
|
+
return /*#__PURE__*/_jsx(Component, _objectSpread({
|
|
682
683
|
ref: item_15 => {
|
|
683
684
|
if (ref) {
|
|
684
685
|
if (is('function', ref)) ref(item_15);else ref.current = item_15;
|
|
@@ -687,6 +688,6 @@ ${listItem(other_, level_1)}
|
|
|
687
688
|
},
|
|
688
689
|
className: classNames([staticClassName('Markdown', theme) && ['onesy-Markdown-root'], className, classes.root])
|
|
689
690
|
}, other));
|
|
690
|
-
}
|
|
691
|
+
};
|
|
691
692
|
Markdown.displayName = 'onesy-Markdown';
|
|
692
693
|
export default Markdown;
|
package/esm/Masonry/Masonry.js
CHANGED
|
@@ -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 = ["gap", "columns", "className", "style", "noMasonry", "NoMasonryProps", "children"];
|
|
3
|
+
const _excluded = ["ref", "gap", "columns", "className", "style", "noMasonry", "NoMasonryProps", "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';
|
|
@@ -10,6 +9,7 @@ import { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-re
|
|
|
10
9
|
import LineElement from '../Line';
|
|
11
10
|
import useMediaQuery from '../useMediaQuery';
|
|
12
11
|
import { valueBreakpoints, staticClassName } from '../utils';
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
const useStyle = styleMethod(theme => ({
|
|
14
14
|
root: {
|
|
15
15
|
position: 'relative'
|
|
@@ -17,11 +17,12 @@ const useStyle = styleMethod(theme => ({
|
|
|
17
17
|
}), {
|
|
18
18
|
name: 'onesy-Masonry'
|
|
19
19
|
});
|
|
20
|
-
const Masonry =
|
|
20
|
+
const Masonry = props_ => {
|
|
21
21
|
const theme = useOnesyTheme();
|
|
22
22
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyMasonry?.props?.default), props_);
|
|
23
23
|
const Line = theme?.elements?.Line || LineElement;
|
|
24
24
|
const {
|
|
25
|
+
ref,
|
|
25
26
|
gap: gap_,
|
|
26
27
|
columns: columns_,
|
|
27
28
|
className,
|
|
@@ -150,7 +151,7 @@ const Masonry = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
150
151
|
}
|
|
151
152
|
if (!useMasonry) {
|
|
152
153
|
styles.item.width = columns === 1 ? '100%' : `calc(${100 / columns}% - ${gap * theme.space.unit * (columns - 1) / columns}px)`;
|
|
153
|
-
return /*#__PURE__*/
|
|
154
|
+
return /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread(_objectSpread({
|
|
154
155
|
ref: item_1 => {
|
|
155
156
|
if (ref) {
|
|
156
157
|
if (is('function', ref)) ref(item_1);else ref.current = item_1;
|
|
@@ -161,17 +162,19 @@ const Masonry = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
161
162
|
direction: "row",
|
|
162
163
|
wrap: "wrap",
|
|
163
164
|
fullWidth: true
|
|
164
|
-
}, NoMasonryProps, {
|
|
165
|
+
}, NoMasonryProps), {}, {
|
|
165
166
|
className: classNames([staticClassName('Masonry', theme) && ['onesy-Masonry-root', 'onesy-Masonry-noMasonry'], NoMasonryProps?.className, className, classes.root]),
|
|
166
167
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
167
168
|
height: 'auto'
|
|
168
169
|
}, NoMasonryProps?.style)
|
|
169
|
-
}, other),
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
}, other), {}, {
|
|
171
|
+
children: children.map((item_2, index_0) => (/*#__PURE__*/React.cloneElement(item_2, {
|
|
172
|
+
key: index_0,
|
|
173
|
+
style: _objectSpread(_objectSpread({}, styles.item), item_2.props.style)
|
|
174
|
+
})))
|
|
175
|
+
}));
|
|
173
176
|
}
|
|
174
|
-
return /*#__PURE__*/
|
|
177
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
175
178
|
ref: item_3 => {
|
|
176
179
|
if (ref) {
|
|
177
180
|
if (is('function', ref)) ref(item_3);else ref.current = item_3;
|
|
@@ -186,17 +189,18 @@ const Masonry = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
186
189
|
fullWidth: true,
|
|
187
190
|
className: classNames([staticClassName('Masonry', theme) && ['onesy-Masonry-root'], className, classes.root]),
|
|
188
191
|
style: _objectSpread(_objectSpread({}, styles.root), style)
|
|
189
|
-
}, other),
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
});
|
|
192
|
+
}, other), {}, {
|
|
193
|
+
children: [React.Children.toArray(children).map((item_4, index_1) => (/*#__PURE__*/React.cloneElement(item_4, {
|
|
194
|
+
key: index_1,
|
|
195
|
+
style: _objectSpread(_objectSpread({}, styles.item), item_4.props.style)
|
|
196
|
+
}))), columns > 1 && new Array(columns - 1).fill(true).map((item_5, index_2) => /*#__PURE__*/_jsx("div", {
|
|
197
|
+
className: classNames([staticClassName('Masonry', theme) && ['onesy-Masonry-line-break']]),
|
|
198
|
+
style: {
|
|
199
|
+
flex: '1 1 100%',
|
|
200
|
+
order: index_2 + 1
|
|
201
|
+
}
|
|
202
|
+
}, index_2))]
|
|
203
|
+
}));
|
|
204
|
+
};
|
|
201
205
|
Masonry.displayName = 'onesy-Masonry';
|
|
202
206
|
export default Masonry;
|
package/esm/Medias/Medias.js
CHANGED
|
@@ -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 = ["size", "values", "imageGallery", "show", "noName", "IconDocument", "NameProps", "WrapperProps", "EmbedProps", "ImageProps", "AudioProps", "VideoProps", "OtherProps", "ItemsProps", "EmbedItemsProps", "ImageItemsProps", "AudioItemsProps", "VideoItemsProps", "OtherItemsProps", "className", "children"];
|
|
3
|
+
const _excluded = ["ref", "size", "values", "imageGallery", "show", "noName", "IconDocument", "NameProps", "WrapperProps", "EmbedProps", "ImageProps", "AudioProps", "VideoProps", "OtherProps", "ItemsProps", "EmbedItemsProps", "ImageItemsProps", "AudioItemsProps", "VideoItemsProps", "OtherItemsProps", "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';
|
|
@@ -17,6 +16,7 @@ import VideoPlayerElement from '../VideoPlayer';
|
|
|
17
16
|
import PortalElement from '../Portal';
|
|
18
17
|
import ImageGalleryElement from '../ImageGallery';
|
|
19
18
|
import { staticClassName } from '../utils';
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
20
|
const useStyle = styleMethod(theme => ({
|
|
21
21
|
root: {},
|
|
22
22
|
items: {
|
|
@@ -139,7 +139,7 @@ const useStyle = styleMethod(theme => ({
|
|
|
139
139
|
}), {
|
|
140
140
|
name: 'onesy-Medias'
|
|
141
141
|
});
|
|
142
|
-
const Medias =
|
|
142
|
+
const Medias = props_ => {
|
|
143
143
|
const theme = useOnesyTheme();
|
|
144
144
|
const l = theme.l;
|
|
145
145
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyMedias?.props?.default), props_);
|
|
@@ -152,6 +152,7 @@ const Medias = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
152
152
|
const Portal = theme?.elements?.Portal || PortalElement;
|
|
153
153
|
const ImageGallery = theme?.elements?.ImageGallery || ImageGalleryElement;
|
|
154
154
|
const {
|
|
155
|
+
ref,
|
|
155
156
|
size = 'regular',
|
|
156
157
|
values: values_ = [],
|
|
157
158
|
imageGallery = true,
|
|
@@ -233,7 +234,7 @@ const Medias = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
233
234
|
const id = url.pathname?.split('/').filter(Boolean).slice(-1)[0];
|
|
234
235
|
if (!url?.hostname || !id) return null;
|
|
235
236
|
if (item_1.urlEmbed.includes('youtu.be')) {
|
|
236
|
-
return /*#__PURE__*/
|
|
237
|
+
return /*#__PURE__*/_jsx("iframe", _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
237
238
|
title: item_1.name || '',
|
|
238
239
|
src: `https://www.youtube.com/embed/${id}`,
|
|
239
240
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
|
|
@@ -242,7 +243,7 @@ const Medias = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
242
243
|
}));
|
|
243
244
|
}
|
|
244
245
|
if (item_1.urlEmbed.includes('instagram.com')) {
|
|
245
|
-
return /*#__PURE__*/
|
|
246
|
+
return /*#__PURE__*/_jsx("iframe", _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
246
247
|
title: item_1.name || '',
|
|
247
248
|
src: `https://www.instagram.com/reel/${id}/embed`,
|
|
248
249
|
allowFullScreen: true,
|
|
@@ -250,7 +251,7 @@ const Medias = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
250
251
|
}));
|
|
251
252
|
}
|
|
252
253
|
if (item_1.urlEmbed.includes('tiktok.com')) {
|
|
253
|
-
return /*#__PURE__*/
|
|
254
|
+
return /*#__PURE__*/_jsx("iframe", _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
254
255
|
title: item_1.name || '',
|
|
255
256
|
src: `https://www.tiktok.com/embed/v2/${id}`,
|
|
256
257
|
allowFullScreen: true,
|
|
@@ -258,21 +259,22 @@ const Medias = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
258
259
|
}));
|
|
259
260
|
}
|
|
260
261
|
if (item_1.urlEmbed.includes('vimeo.com')) {
|
|
261
|
-
return /*#__PURE__*/
|
|
262
|
+
return /*#__PURE__*/_jsx("iframe", _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
262
263
|
title: item_1.name || '',
|
|
263
264
|
src: `https://player.vimeo.com/video/${id}`,
|
|
264
265
|
allowFullScreen: true,
|
|
265
266
|
className: classNames([otherProps?.className, classes.aspectRatioVimeo])
|
|
266
267
|
}));
|
|
267
268
|
}
|
|
268
|
-
return /*#__PURE__*/
|
|
269
|
+
return /*#__PURE__*/_jsx(Link, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
269
270
|
href: item_1?.urlEmbed,
|
|
270
|
-
target: "blank"
|
|
271
|
-
|
|
271
|
+
target: "blank",
|
|
272
|
+
children: item_1.name || item_1.urlEmbed
|
|
273
|
+
}));
|
|
272
274
|
}
|
|
273
275
|
|
|
274
276
|
// custom embed code
|
|
275
|
-
return /*#__PURE__*/
|
|
277
|
+
return /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
276
278
|
className: classNames([otherProps?.className, classes.customEmbed]),
|
|
277
279
|
fullWidth: true,
|
|
278
280
|
dangerouslySetInnerHTML: {
|
|
@@ -282,88 +284,85 @@ const Medias = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
282
284
|
};
|
|
283
285
|
const getItem = (version, item_2, index_1) => {
|
|
284
286
|
const media_1 = item_2.value;
|
|
285
|
-
const name = (item_2?.props?.name || !noName) && /*#__PURE__*/
|
|
287
|
+
const name = (item_2?.props?.name || !noName) && /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread({
|
|
286
288
|
version: size === 'large' ? 'l2' : size === 'regular' ? 'l3' : 'l3'
|
|
287
|
-
}, NameProps, {
|
|
288
|
-
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-name'], NameProps?.className, classes.name])
|
|
289
|
-
|
|
289
|
+
}, NameProps), {}, {
|
|
290
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-name'], NameProps?.className, classes.name]),
|
|
291
|
+
children: media_1?.name || l('No name')
|
|
292
|
+
}));
|
|
290
293
|
if (version === 'embed') {
|
|
291
294
|
return getLink(media_1, index_1);
|
|
292
295
|
}
|
|
293
296
|
if (version === 'image') {
|
|
294
|
-
return /*#__PURE__*/
|
|
295
|
-
key: index_1,
|
|
297
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
296
298
|
gap: 1
|
|
297
|
-
}, WrapperProps, {
|
|
299
|
+
}, WrapperProps), {}, {
|
|
298
300
|
onClick: () => imageGallery && onOpen(index_1),
|
|
299
|
-
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-wrapper', 'onesy-Medias-wrapper-image'], WrapperProps?.className, classes.wrapper, classes.wrapper_image, classes[`imageWrapper_size_${size}`]])
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
},
|
|
308
|
-
}),
|
|
301
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-wrapper', 'onesy-Medias-wrapper-image'], WrapperProps?.className, classes.wrapper, classes.wrapper_image, classes[`imageWrapper_size_${size}`]]),
|
|
302
|
+
children: [/*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread(_objectSpread({}, ImageProps), item_2?.props), {}, {
|
|
303
|
+
fullWidth: true,
|
|
304
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-item', 'onesy-Medias-item-image'], ImageProps?.className, item_2?.props?.className, classes.item, classes.image, classes[`image_size_${size}`]]),
|
|
305
|
+
style: _objectSpread({
|
|
306
|
+
backgroundImage: `url(${media_1.urlSmall || media_1.url})`
|
|
307
|
+
}, item_2?.props?.style),
|
|
308
|
+
children: /*#__PURE__*/_jsx(Interaction, {})
|
|
309
|
+
}), index_1), name]
|
|
310
|
+
}), index_1);
|
|
309
311
|
}
|
|
310
312
|
if (version === 'audio') {
|
|
311
|
-
return /*#__PURE__*/
|
|
312
|
-
key: index_1,
|
|
313
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
313
314
|
gap: 1
|
|
314
|
-
}, WrapperProps, {
|
|
315
|
-
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-wrapper', 'onesy-Medias-wrapper-audio'], WrapperProps?.className, classes.wrapper, classes[`audioWrapper_size_${size}`]])
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
})
|
|
315
|
+
}, WrapperProps), {}, {
|
|
316
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-wrapper', 'onesy-Medias-wrapper-audio'], WrapperProps?.className, classes.wrapper, classes[`audioWrapper_size_${size}`]]),
|
|
317
|
+
children: [/*#__PURE__*/_jsx(AudioPlayer, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
318
|
+
tonal: true,
|
|
319
|
+
color: "primary",
|
|
320
|
+
src: media_1.url || media_1.urlSmall,
|
|
321
|
+
size: size
|
|
322
|
+
}, media_1), AudioProps), item_2?.props), {}, {
|
|
323
|
+
fullWidth: true,
|
|
324
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-item', 'onesy-Medias-item-audio'], VideoProps?.className, item_2?.props?.className, classes.item, classes.audio])
|
|
325
|
+
}), index_1), name]
|
|
326
|
+
}), index_1);
|
|
326
327
|
}
|
|
327
328
|
if (version === 'video') {
|
|
328
|
-
return /*#__PURE__*/
|
|
329
|
-
key: index_1,
|
|
329
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
330
330
|
gap: 1
|
|
331
|
-
}, WrapperProps, {
|
|
332
|
-
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-wrapper', 'onesy-Medias-wrapper-video'], WrapperProps?.className, classes.wrapper, classes[`videoWrapper_size_${size}`]])
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
})
|
|
331
|
+
}, WrapperProps), {}, {
|
|
332
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-wrapper', 'onesy-Medias-wrapper-video'], WrapperProps?.className, classes.wrapper, classes[`videoWrapper_size_${size}`]]),
|
|
333
|
+
children: [/*#__PURE__*/_jsx(VideoPlayer, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
334
|
+
tonal: true,
|
|
335
|
+
color: "primary",
|
|
336
|
+
src: media_1.url || media_1.urlSmall,
|
|
337
|
+
size: size
|
|
338
|
+
}, media_1), VideoProps), item_2?.props), {}, {
|
|
339
|
+
fullWidth: true,
|
|
340
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-item', 'onesy-Medias-item-video'], VideoProps?.className, item_2?.props?.className, classes.item, classes.video])
|
|
341
|
+
}), index_1), name]
|
|
342
|
+
}), index_1);
|
|
343
343
|
}
|
|
344
344
|
if (version === 'other') {
|
|
345
|
-
return /*#__PURE__*/
|
|
346
|
-
key: index_1,
|
|
345
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
347
346
|
gap: 1
|
|
348
|
-
}, WrapperProps, {
|
|
349
|
-
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-wrapper', 'onesy-Medias-wrapper-other'], WrapperProps?.className, classes.wrapper, classes[`otherWrapper_size_${size}`]])
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
})
|
|
347
|
+
}, WrapperProps), {}, {
|
|
348
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-wrapper', 'onesy-Medias-wrapper-other'], WrapperProps?.className, classes.wrapper, classes[`otherWrapper_size_${size}`]]),
|
|
349
|
+
children: [/*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread(_objectSpread({}, OtherProps), item_2?.props), {}, {
|
|
350
|
+
align: "center",
|
|
351
|
+
justify: "center",
|
|
352
|
+
onClick: () => onOpenMedia(media_1),
|
|
353
|
+
fullWidth: true,
|
|
354
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-item', 'onesy-Medias-item-other'], OtherProps?.className, item_2?.props?.className, classes.item, classes.other, classes[`other_size_${size}`]]),
|
|
355
|
+
children: [/*#__PURE__*/_jsx(Interaction, {}), /*#__PURE__*/_jsx(IconDocument, {
|
|
356
|
+
size: size === 'large' ? 44 : size === 'regular' ? 34 : 24
|
|
357
|
+
})]
|
|
358
|
+
}), index_1), name]
|
|
359
|
+
}), index_1);
|
|
361
360
|
}
|
|
362
361
|
return null;
|
|
363
362
|
};
|
|
364
363
|
const usable = show.filter(item_3 => !!items[item_3]?.length && !!items[item_3].map((itemMedia, indexItemMedia) => getItem(item_3, itemMedia, indexItemMedia)).filter(Boolean).length);
|
|
365
364
|
if (!usable?.length) return null;
|
|
366
|
-
return /*#__PURE__*/
|
|
365
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
367
366
|
ref: item_4 => {
|
|
368
367
|
if (ref) {
|
|
369
368
|
if (is('function', ref)) ref(item_4);else ref.current = item_4;
|
|
@@ -373,26 +372,29 @@ const Medias = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
373
372
|
gap: size === 'large' ? 3 : size === 'regular' ? 2 : 1.5,
|
|
374
373
|
fullWidth: true,
|
|
375
374
|
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-root', `onesy-Medias-size-${size}`], className, classes.root])
|
|
376
|
-
}, other),
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
})
|
|
375
|
+
}, other), {}, {
|
|
376
|
+
children: [usable.map(item_5 => /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
377
|
+
gap: size === 'large' ? 2 : size === 'regular' ? 1.5 : 1,
|
|
378
|
+
direction: item_5 === 'embed' ? 'column' : 'row',
|
|
379
|
+
align: item_5 === 'embed' ? 'center' : 'flex-start',
|
|
380
|
+
justify: item_5 === 'embed' ? 'center' : 'flex-start',
|
|
381
|
+
fullWidth: true
|
|
382
|
+
}, ItemsProps), item_5 === 'embed' && EmbedItemsProps), item_5 === 'image' && ImageItemsProps), item_5 === 'audio' && AudioItemsProps), item_5 === 'video' && VideoItemsProps), item_5 === 'other' && OtherItemsProps), {}, {
|
|
383
|
+
className: classNames([staticClassName('Medias', theme) && ['onesy-Medias-items', `onesy-Medias-items-${item_5}`], ItemsProps?.className, item_5 === 'embed' && EmbedItemsProps?.className, item_5 === 'image' && ImageItemsProps?.className, item_5 === 'audio' && AudioItemsProps?.className, item_5 === 'video' && VideoItemsProps?.className, item_5 === 'other' && OtherItemsProps?.className, classes.items]),
|
|
384
|
+
children: items[item_5].map((itemMedia_0, indexItemMedia_0) => getItem(item_5, itemMedia_0, indexItemMedia_0))
|
|
385
|
+
}), item_5)), refs.root.current && imageGallery && !!items.image?.length && /*#__PURE__*/_jsx(Portal, {
|
|
386
|
+
element: refs.root.current?.ownerDocument?.body,
|
|
387
|
+
children: /*#__PURE__*/_jsx(ImageGallery, {
|
|
388
|
+
open: !!open,
|
|
389
|
+
onClose: onClose,
|
|
390
|
+
value: open?.index,
|
|
391
|
+
items: items.image.map(item_6 => _objectSpread(_objectSpread({}, item_6.value), {}, {
|
|
392
|
+
url: item_6.value.url || item_6.value.urlSmall,
|
|
393
|
+
urlSmall: item_6.value.urlSmall || item_6.value.url
|
|
394
|
+
}))
|
|
395
|
+
})
|
|
396
|
+
})]
|
|
397
|
+
}));
|
|
398
|
+
};
|
|
397
399
|
Medias.displayName = 'onesy-Medias';
|
|
398
400
|
export default Medias;
|