@onesy/ui-react 1.0.172 → 1.0.173
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.js +93 -74
- package/AdvancedTextField/AdvancedTextField.js +7 -6
- package/Append/Append.js +24 -19
- package/AreaChart/AreaChart.js +15 -17
- package/AreaChartItem/AreaChartItem.js +63 -58
- package/AudioPlayer/AudioPlayer.js +180 -148
- package/AudioRecorder/AudioRecorder.js +104 -59
- package/AutoComplete/AutoComplete.js +135 -125
- package/AutoCompleteCountry/AutoCompleteCountry.js +10 -11
- package/AutoCompleteCurrency/AutoCompleteCurrency.js +4 -5
- package/Avatar/Avatar.js +11 -8
- package/AvatarGroup/AvatarGroup.js +21 -20
- package/Backdrop/Backdrop.js +30 -21
- package/Badge/Badge.js +18 -17
- package/Banner/Banner.js +15 -12
- package/BottomAppBar/BottomAppBar.js +14 -14
- package/BottomSheet/BottomSheet.js +9 -11
- package/Box/Box.js +12 -12
- package/Breadcrumbs/Breadcrumbs.js +38 -34
- package/BubbleChart/BubbleChart.js +159 -134
- package/BubbleChartItem/BubbleChartItem.js +48 -43
- package/Button/Button.js +46 -39
- package/Buttons/Buttons.d.ts +1 -1
- package/Buttons/Buttons.js +34 -28
- package/Calendar/Calendar.js +357 -315
- package/CalendarAvailability/CalendarAvailability.js +351 -298
- package/CalendarMenu/CalendarMenu.js +93 -79
- package/CalendarMonth/CalendarMonth.js +113 -102
- package/CalendarViews/CalendarViews.js +138 -115
- package/CalendarWeek/CalendarWeek.js +180 -158
- package/Card/Card.js +16 -15
- package/CardButton/CardButton.js +11 -10
- package/CardFooter/CardFooter.js +12 -12
- package/CardHeader/CardHeader.js +13 -13
- package/CardImage/CardImage.js +10 -12
- package/CardMain/CardMain.js +12 -12
- package/Carousel/Carousel.js +140 -124
- package/Chart/Chart.js +438 -393
- package/Checkbox/Checkbox.js +46 -43
- package/Chip/Chip.js +12 -11
- package/Chips/Chips.js +20 -20
- package/ClickListener/ClickListener.js +19 -15
- package/Clock/Clock.js +38 -36
- package/ColorTextField/ColorTextField.js +33 -27
- package/ColumnChart/ColumnChart.js +16 -17
- package/ColumnChartItem/ColumnChartItem.js +35 -31
- package/Confirm/Confirm.js +51 -35
- package/Container/Container.js +9 -6
- package/CookieBanner/CookieBanner.js +55 -41
- package/Countdown/Countdown.js +163 -123
- package/DatePicker/DatePicker.js +236 -197
- package/DateRangePicker/DateRangePicker.js +9 -11
- package/DateTimePicker/DateTimePicker.js +127 -103
- package/DateTimeRangePicker/DateTimeRangePicker.js +9 -11
- package/Divider/Divider.js +25 -21
- package/DonutChart/DonutChart.js +9 -11
- package/DragAndDropList/DragAndDropList.js +8 -4
- package/Drawing/Drawing.js +369 -312
- package/DropZone/DropZone.js +20 -15
- package/Emojis/Emojis.js +95 -85
- package/Expand/Expand.js +78 -70
- package/Fab/Fab.js +4 -6
- package/Fade/Fade.js +64 -58
- package/FileChoose/FileChoose.js +69 -60
- package/Focus/Focus.js +19 -16
- package/Form/Form.js +69 -57
- package/FormRow/FormRow.js +49 -38
- package/Forms/Forms.js +13 -13
- package/Frame/Frame.js +62 -54
- package/Grid/Grid.js +15 -12
- package/Grow/Grow.js +60 -52
- package/HTMLCanvas/HTMLCanvas.js +88 -74
- package/IFrame/IFrame.js +33 -27
- package/Icon/Icon.js +14 -14
- package/IconButton/IconButton.js +12 -14
- package/Image/Image.js +19 -15
- package/ImageCrop/ImageCrop.js +96 -87
- package/ImageEdit/ImageEdit.js +355 -290
- package/ImageGallery/ImageGallery.js +104 -86
- package/ImageList/ImageList.js +16 -11
- package/ImageListItem/ImageListItem.js +9 -6
- package/ImageListItemBox/ImageListItemBox.js +12 -12
- package/Info/Info.js +38 -27
- package/Interaction/Interaction.js +57 -52
- package/Keyframes/Keyframes.js +11 -9
- package/Label/Label.js +59 -50
- package/Labels/Labels.js +30 -26
- package/Line/Line.js +10 -7
- package/LineChart/LineChart.js +16 -17
- package/LineChartItem/LineChartItem.js +30 -26
- package/LinearMeter/LinearMeter.js +92 -87
- package/LinearProgress/LinearProgress.js +27 -22
- package/Link/Link.js +7 -6
- package/Links/Links.js +128 -118
- package/List/List.js +23 -21
- package/ListItem/ListItem.js +68 -58
- package/ListSubheader/ListSubheader.js +9 -11
- package/MainProgress/MainProgress.js +14 -12
- package/MainProgressMaterial/MainProgressMaterial.js +16 -14
- package/Markdown/Markdown.js +6 -5
- package/Masonry/Masonry.js +26 -22
- package/Medias/Medias.js +95 -93
- package/Menu/Menu.js +51 -45
- package/MenuDesktop/MenuDesktop.js +141 -130
- package/MenuItem/MenuItem.js +75 -64
- package/Meta/Meta.js +21 -19
- package/Modal/Modal.js +52 -39
- package/ModalFooter/ModalFooter.js +12 -12
- package/ModalHeader/ModalHeader.js +12 -12
- package/ModalIcon/ModalIcon.js +55 -13
- package/ModalMain/ModalMain.js +12 -12
- package/ModalText/ModalText.js +12 -12
- package/ModalTitle/ModalTitle.js +12 -12
- package/MoreOptions/MoreOptions.js +14 -12
- package/Move/Move.js +9 -6
- package/NavigationBar/NavigationBar.js +7 -6
- package/NavigationDrawer/NavigationDrawer.js +7 -6
- package/NavigationItem/NavigationItem.js +58 -48
- package/NavigationRail/NavigationRail.js +25 -22
- package/NotFound/NotFound.js +21 -18
- package/NumericTextField/NumericTextField.js +14 -9
- package/Page/Page.js +50 -38
- package/PageTransition/PageTransition.js +8 -7
- package/Pagination/Pagination.js +41 -31
- package/PaginationItem/PaginationItem.js +20 -18
- package/Parallax/Parallax.js +4 -3
- package/Path/Path.js +9 -11
- package/PieChart/PieChart.js +96 -79
- package/Placeholder/Placeholder.js +15 -12
- package/Portal/Portal.js +41 -18
- package/Properties/Properties.js +17 -18
- package/Property/Property.js +24 -17
- package/Radio/Radio.js +25 -21
- package/Radios/Radios.js +30 -26
- package/Rating/Rating.js +36 -31
- package/Reset/Reset.js +4 -1
- package/Reveal/Reveal.js +17 -13
- package/RichTextEditor/RichTextEditor.js +1011 -824
- package/RoundMeter/RoundMeter.js +98 -93
- package/RoundProgress/RoundProgress.js +36 -32
- package/ScatterChart/ScatterChart.js +15 -17
- package/ScatterChartItem/ScatterChartItem.js +36 -34
- package/ScreenCapture/ScreenCapture.js +57 -43
- package/Section/Section.js +66 -56
- package/SectionAction/SectionAction.js +17 -13
- package/SectionBoxes/SectionBoxes.js +75 -67
- package/SectionCards/SectionCards.js +86 -76
- package/SectionCarousel/SectionCarousel.js +72 -65
- package/SectionContact/SectionContact.js +65 -58
- package/SectionImageGallery/SectionImageGallery.js +13 -10
- package/SectionLogos/SectionLogos.js +34 -30
- package/SectionMedia/SectionMedia.js +41 -34
- package/SectionReviews/SectionReviews.js +76 -67
- package/SectionTextMedia/SectionTextMedia.js +64 -57
- package/SectionTimeline/SectionTimeline.js +46 -43
- package/SectionWatch/SectionWatch.js +12 -9
- package/Select/Select.js +163 -151
- package/Share/Share.js +165 -151
- package/Slide/Slide.js +29 -26
- package/Slider/Slider.js +87 -81
- package/SmartTextField/SmartTextField.js +453 -361
- package/Snackbar/Snackbar.js +48 -38
- package/Snackbars/Snackbars.js +43 -40
- package/Space/Space.js +731 -630
- package/SpeechToText/SpeechToText.js +20 -14
- package/SpeedDial/SpeedDial.js +84 -65
- package/SpeedDialItem/SpeedDialItem.js +22 -19
- package/SpyScroll/SpyScroll.js +16 -12
- package/Step/Step.js +29 -27
- package/Stepper/Stepper.js +42 -41
- package/Surface/Surface.js +7 -7
- package/Switch/Switch.js +49 -41
- package/Tab/Tab.js +40 -35
- package/Table/Table.js +19 -16
- package/TableBody/TableBody.js +14 -14
- package/TableCell/TableCell.js +37 -30
- package/TableFooter/TableFooter.js +13 -13
- package/TableHead/TableHead.js +25 -21
- package/TableHeader/TableHeader.js +14 -14
- package/TablePagination/TablePagination.js +67 -49
- package/TableRow/TableRow.js +14 -14
- package/Tabs/Tabs.js +55 -49
- package/Text/Text.js +17 -13
- package/TextField/TextField.js +135 -111
- package/TextToSpeech/TextToSpeech.js +20 -14
- package/TimePicker/TimePicker.js +196 -160
- package/TimeRangePicker/TimeRangePicker.js +9 -11
- package/Timeline/Timeline.js +13 -13
- package/TimelineItem/TimelineItem.js +29 -24
- package/Timer/Timer.js +137 -94
- package/ToggleButton/ToggleButton.js +10 -12
- package/ToggleButtons/ToggleButtons.js +9 -11
- package/Tooltip/Tooltip.js +63 -54
- package/TopAppBar/TopAppBar.js +32 -25
- package/Transition/Transition.js +11 -9
- package/Tree/Tree.js +73 -61
- package/Type/Type.js +7 -6
- package/VideoPlayer/VideoPlayer.js +207 -170
- package/ViewSplit/ViewSplit.js +49 -40
- package/Watch/Watch.js +204 -187
- package/Weather/Weather.js +58 -49
- package/Whiteboard/Whiteboard.js +28 -24
- package/Widgets/Widgets.js +60 -54
- package/WindowSplit/WindowSplit.js +59 -52
- package/Zoom/Zoom.js +60 -52
- package/esm/Accordion/Accordion.js +93 -74
- package/esm/AdvancedTextField/AdvancedTextField.js +7 -6
- package/esm/Append/Append.js +24 -19
- package/esm/AreaChart/AreaChart.js +15 -17
- package/esm/AreaChartItem/AreaChartItem.js +63 -58
- package/esm/AudioPlayer/AudioPlayer.js +180 -148
- package/esm/AudioRecorder/AudioRecorder.js +104 -59
- package/esm/AutoComplete/AutoComplete.js +135 -125
- package/esm/AutoCompleteCountry/AutoCompleteCountry.js +10 -11
- package/esm/AutoCompleteCurrency/AutoCompleteCurrency.js +4 -5
- package/esm/Avatar/Avatar.js +11 -8
- package/esm/AvatarGroup/AvatarGroup.js +18 -17
- package/esm/Backdrop/Backdrop.js +30 -21
- package/esm/Badge/Badge.js +18 -17
- package/esm/Banner/Banner.js +15 -12
- package/esm/BottomAppBar/BottomAppBar.js +14 -14
- package/esm/BottomSheet/BottomSheet.js +9 -11
- package/esm/Box/Box.js +12 -12
- package/esm/Breadcrumbs/Breadcrumbs.js +37 -33
- package/esm/BubbleChart/BubbleChart.js +159 -134
- package/esm/BubbleChartItem/BubbleChartItem.js +48 -43
- package/esm/Button/Button.js +45 -38
- package/esm/Buttons/Buttons.js +33 -28
- package/esm/Calendar/Calendar.js +357 -315
- package/esm/CalendarAvailability/CalendarAvailability.js +348 -295
- package/esm/CalendarMenu/CalendarMenu.js +93 -79
- package/esm/CalendarMonth/CalendarMonth.js +113 -102
- package/esm/CalendarViews/CalendarViews.js +138 -115
- package/esm/CalendarWeek/CalendarWeek.js +177 -155
- package/esm/Card/Card.js +16 -15
- package/esm/CardButton/CardButton.js +11 -10
- package/esm/CardFooter/CardFooter.js +12 -12
- package/esm/CardHeader/CardHeader.js +13 -13
- package/esm/CardImage/CardImage.js +10 -12
- package/esm/CardMain/CardMain.js +12 -12
- package/esm/Carousel/Carousel.js +140 -124
- package/esm/Chart/Chart.js +433 -388
- package/esm/Checkbox/Checkbox.js +46 -43
- package/esm/Chip/Chip.js +12 -11
- package/esm/Chips/Chips.js +20 -20
- package/esm/ClickListener/ClickListener.js +19 -15
- package/esm/Clock/Clock.js +38 -36
- package/esm/ColorTextField/ColorTextField.js +33 -27
- package/esm/ColumnChart/ColumnChart.js +16 -17
- package/esm/ColumnChartItem/ColumnChartItem.js +35 -31
- package/esm/Confirm/Confirm.js +51 -35
- package/esm/Container/Container.js +9 -6
- package/esm/CookieBanner/CookieBanner.js +55 -41
- package/esm/Countdown/Countdown.js +163 -123
- package/esm/DatePicker/DatePicker.js +236 -197
- package/esm/DateRangePicker/DateRangePicker.js +9 -11
- package/esm/DateTimePicker/DateTimePicker.js +127 -103
- package/esm/DateTimeRangePicker/DateTimeRangePicker.js +9 -11
- package/esm/Divider/Divider.js +25 -21
- package/esm/DonutChart/DonutChart.js +9 -11
- package/esm/DragAndDropList/DragAndDropList.js +8 -4
- package/esm/Drawing/Drawing.js +368 -311
- package/esm/DropZone/DropZone.js +20 -15
- package/esm/Emojis/Emojis.js +95 -85
- package/esm/Expand/Expand.js +77 -69
- package/esm/Fab/Fab.js +4 -6
- package/esm/Fade/Fade.js +64 -58
- package/esm/FileChoose/FileChoose.js +69 -60
- package/esm/Focus/Focus.js +19 -16
- package/esm/Form/Form.js +69 -57
- package/esm/FormRow/FormRow.js +49 -38
- package/esm/Forms/Forms.js +13 -13
- package/esm/Frame/Frame.js +62 -54
- package/esm/Grid/Grid.js +13 -10
- package/esm/Grow/Grow.js +60 -52
- package/esm/HTMLCanvas/HTMLCanvas.js +88 -74
- package/esm/IFrame/IFrame.js +33 -27
- package/esm/Icon/Icon.js +14 -14
- package/esm/IconButton/IconButton.js +12 -14
- package/esm/Image/Image.js +19 -15
- package/esm/ImageCrop/ImageCrop.js +96 -87
- package/esm/ImageEdit/ImageEdit.js +355 -290
- package/esm/ImageGallery/ImageGallery.js +104 -86
- package/esm/ImageList/ImageList.js +16 -11
- package/esm/ImageListItem/ImageListItem.js +9 -6
- package/esm/ImageListItemBox/ImageListItemBox.js +12 -12
- package/esm/Info/Info.js +38 -27
- package/esm/Interaction/Interaction.js +57 -52
- package/esm/Keyframes/Keyframes.js +11 -9
- package/esm/Label/Label.js +59 -50
- package/esm/Labels/Labels.js +30 -26
- package/esm/Line/Line.js +10 -7
- package/esm/LineChart/LineChart.js +16 -17
- package/esm/LineChartItem/LineChartItem.js +30 -26
- package/esm/LinearMeter/LinearMeter.js +92 -87
- package/esm/LinearProgress/LinearProgress.js +27 -22
- package/esm/Link/Link.js +7 -6
- package/esm/Links/Links.js +125 -115
- package/esm/List/List.js +23 -21
- package/esm/ListItem/ListItem.js +68 -58
- package/esm/ListSubheader/ListSubheader.js +9 -11
- package/esm/MainProgress/MainProgress.js +14 -12
- package/esm/MainProgressMaterial/MainProgressMaterial.js +16 -14
- package/esm/Markdown/Markdown.js +6 -5
- package/esm/Masonry/Masonry.js +26 -22
- package/esm/Medias/Medias.js +95 -93
- package/esm/Menu/Menu.js +51 -45
- package/esm/MenuDesktop/MenuDesktop.js +139 -128
- package/esm/MenuItem/MenuItem.js +75 -64
- package/esm/Meta/Meta.js +21 -19
- package/esm/Modal/Modal.js +52 -39
- package/esm/ModalFooter/ModalFooter.js +12 -12
- package/esm/ModalHeader/ModalHeader.js +12 -12
- package/esm/ModalIcon/ModalIcon.js +55 -13
- package/esm/ModalMain/ModalMain.js +12 -12
- package/esm/ModalText/ModalText.js +12 -12
- package/esm/ModalTitle/ModalTitle.js +12 -12
- package/esm/MoreOptions/MoreOptions.js +14 -12
- package/esm/Move/Move.js +9 -6
- package/esm/NavigationBar/NavigationBar.js +7 -6
- package/esm/NavigationDrawer/NavigationDrawer.js +7 -6
- package/esm/NavigationItem/NavigationItem.js +58 -48
- package/esm/NavigationRail/NavigationRail.js +25 -22
- package/esm/NotFound/NotFound.js +21 -18
- package/esm/NumericTextField/NumericTextField.js +14 -9
- package/esm/Page/Page.js +50 -38
- package/esm/PageTransition/PageTransition.js +8 -7
- package/esm/Pagination/Pagination.js +41 -31
- package/esm/PaginationItem/PaginationItem.js +20 -18
- package/esm/Parallax/Parallax.js +4 -3
- package/esm/Path/Path.js +9 -11
- package/esm/PieChart/PieChart.js +96 -79
- package/esm/Placeholder/Placeholder.js +15 -12
- package/esm/Portal/Portal.js +41 -18
- package/esm/Properties/Properties.js +17 -18
- package/esm/Property/Property.js +24 -17
- package/esm/Radio/Radio.js +25 -21
- package/esm/Radios/Radios.js +30 -26
- package/esm/Rating/Rating.js +35 -30
- package/esm/Reset/Reset.js +4 -1
- package/esm/Reveal/Reveal.js +17 -13
- package/esm/RichTextEditor/RichTextEditor.js +1011 -824
- package/esm/RoundMeter/RoundMeter.js +98 -93
- package/esm/RoundProgress/RoundProgress.js +36 -32
- package/esm/ScatterChart/ScatterChart.js +15 -17
- package/esm/ScatterChartItem/ScatterChartItem.js +36 -34
- package/esm/ScreenCapture/ScreenCapture.js +57 -43
- package/esm/Section/Section.js +66 -56
- package/esm/SectionAction/SectionAction.js +17 -13
- package/esm/SectionBoxes/SectionBoxes.js +75 -67
- package/esm/SectionCards/SectionCards.js +86 -76
- package/esm/SectionCarousel/SectionCarousel.js +72 -65
- package/esm/SectionContact/SectionContact.js +65 -58
- package/esm/SectionImageGallery/SectionImageGallery.js +13 -10
- package/esm/SectionLogos/SectionLogos.js +34 -30
- package/esm/SectionMedia/SectionMedia.js +41 -34
- package/esm/SectionReviews/SectionReviews.js +74 -65
- package/esm/SectionTextMedia/SectionTextMedia.js +64 -57
- package/esm/SectionTimeline/SectionTimeline.js +46 -43
- package/esm/SectionWatch/SectionWatch.js +12 -9
- package/esm/Select/Select.js +161 -149
- package/esm/Share/Share.js +165 -151
- package/esm/Slide/Slide.js +28 -25
- package/esm/Slider/Slider.js +86 -80
- package/esm/SmartTextField/SmartTextField.js +450 -358
- package/esm/Snackbar/Snackbar.js +48 -38
- package/esm/Snackbars/Snackbars.js +40 -37
- package/esm/Space/Space.js +731 -630
- package/esm/SpeechToText/SpeechToText.js +20 -14
- package/esm/SpeedDial/SpeedDial.js +84 -65
- package/esm/SpeedDialItem/SpeedDialItem.js +22 -19
- package/esm/SpyScroll/SpyScroll.js +16 -12
- package/esm/Step/Step.js +29 -27
- package/esm/Stepper/Stepper.js +42 -41
- package/esm/Surface/Surface.js +7 -7
- package/esm/Switch/Switch.js +49 -41
- package/esm/Tab/Tab.js +40 -35
- package/esm/Table/Table.js +19 -16
- package/esm/TableBody/TableBody.js +14 -14
- package/esm/TableCell/TableCell.js +37 -30
- package/esm/TableFooter/TableFooter.js +13 -13
- package/esm/TableHead/TableHead.js +25 -21
- package/esm/TableHeader/TableHeader.js +14 -14
- package/esm/TablePagination/TablePagination.js +67 -49
- package/esm/TableRow/TableRow.js +14 -14
- package/esm/Tabs/Tabs.js +55 -49
- package/esm/Text/Text.js +17 -13
- package/esm/TextField/TextField.js +129 -105
- package/esm/TextToSpeech/TextToSpeech.js +20 -14
- package/esm/TimePicker/TimePicker.js +196 -160
- package/esm/TimeRangePicker/TimeRangePicker.js +9 -11
- package/esm/Timeline/Timeline.js +13 -13
- package/esm/TimelineItem/TimelineItem.js +29 -24
- package/esm/Timer/Timer.js +137 -94
- package/esm/ToggleButton/ToggleButton.js +10 -12
- package/esm/ToggleButtons/ToggleButtons.js +9 -11
- package/esm/Tooltip/Tooltip.js +62 -53
- package/esm/TopAppBar/TopAppBar.js +32 -25
- package/esm/Transition/Transition.js +11 -9
- package/esm/Tree/Tree.js +73 -61
- package/esm/Type/Type.js +7 -6
- package/esm/VideoPlayer/VideoPlayer.js +207 -170
- package/esm/ViewSplit/ViewSplit.js +49 -40
- package/esm/Watch/Watch.js +204 -187
- package/esm/Weather/Weather.js +58 -49
- package/esm/Whiteboard/Whiteboard.js +28 -24
- package/esm/Widgets/Widgets.js +57 -51
- package/esm/WindowSplit/WindowSplit.js +59 -52
- package/esm/Zoom/Zoom.js +60 -52
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +3 -3
package/esm/Calendar/Calendar.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 = ["tonal", "color", "version", "size", "value", "valueDefault", "onChange", "calendar", "calendarDefault", "onChangeCalendar", "start", "end", "menu", "range", "now", "calendars", "min", "max", "validate", "menu_month_previous_unit", "menu_month_next_unit", "valid", "getMonths", "getYears", "belowCalendars", "disabled", "IconPrevious", "IconNext", "IconDropDown", "CalendarMonthProps", "OptionButtonProps", "PaginationItemsProps", "renderDay", "renderDayName", "className"];
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "version", "size", "value", "valueDefault", "onChange", "calendar", "calendarDefault", "onChangeCalendar", "start", "end", "menu", "range", "now", "calendars", "min", "max", "validate", "menu_month_previous_unit", "menu_month_next_unit", "valid", "getMonths", "getYears", "belowCalendars", "disabled", "IconPrevious", "IconNext", "IconDropDown", "CalendarMonthProps", "OptionButtonProps", "PaginationItemsProps", "renderDay", "renderDayName", "className"];
|
|
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';
|
|
@@ -25,6 +24,7 @@ import CarouselElement from '../Carousel';
|
|
|
25
24
|
import PaginationItemElement from '../PaginationItem';
|
|
26
25
|
import { IconDoneAnimated } from '../Buttons/Buttons';
|
|
27
26
|
import { iconFontSize, staticClassName } from '../utils';
|
|
27
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
28
|
const useStyle = style(theme => ({
|
|
29
29
|
root: {
|
|
30
30
|
borderRadius: theme.methods.shape.radius.value(4, 'px'),
|
|
@@ -143,7 +143,7 @@ const useStyle = style(theme => ({
|
|
|
143
143
|
// [l('Monday'), l('Tuesday'), l('Wednesday'), l('Thursday'), l('Friday'), l('Saturday'), l('Sunday'];
|
|
144
144
|
// ['Mon'), l('Tue'), l('Wed'), l('Thu'), l('Fri'), l('Sat'), l('Sun')];
|
|
145
145
|
|
|
146
|
-
const Calendar =
|
|
146
|
+
const Calendar = props__ => {
|
|
147
147
|
const theme = useOnesyTheme();
|
|
148
148
|
const l = theme.l;
|
|
149
149
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyCalendar?.props?.default), props__);
|
|
@@ -160,6 +160,7 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
160
160
|
const Carousel = theme?.elements?.Carousel || CarouselElement;
|
|
161
161
|
const PaginationItem = theme?.elements?.PaginationItem || PaginationItemElement;
|
|
162
162
|
const {
|
|
163
|
+
ref,
|
|
163
164
|
tonal = true,
|
|
164
165
|
color = 'default',
|
|
165
166
|
version = 'regular',
|
|
@@ -318,7 +319,7 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
318
319
|
const main = () => {
|
|
319
320
|
switch (version) {
|
|
320
321
|
case 'year':
|
|
321
|
-
return /*#__PURE__*/
|
|
322
|
+
return /*#__PURE__*/_jsx(Carousel, {
|
|
322
323
|
color: "default",
|
|
323
324
|
id: value[0]?.milliseconds + (value[1]?.milliseconds || 0) + year,
|
|
324
325
|
value: carousel,
|
|
@@ -334,40 +335,41 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
334
335
|
length: 12
|
|
335
336
|
}).map((item_3, index_2) => {
|
|
336
337
|
const calendarOnesyDate_0 = set(index_2, 'month', calendar);
|
|
337
|
-
return /*#__PURE__*/
|
|
338
|
-
key: index_2,
|
|
338
|
+
return /*#__PURE__*/_jsxs(Line, {
|
|
339
339
|
gap: 1.5,
|
|
340
340
|
direction: "column",
|
|
341
|
-
className: classNames([classes.carousel_item])
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
341
|
+
className: classNames([classes.carousel_item]),
|
|
342
|
+
children: [/*#__PURE__*/_jsxs(Type, {
|
|
343
|
+
version: size === 'large' ? 'l1' : size === 'regular' ? 'l2' : 'l3',
|
|
344
|
+
className: classNames([classes.carousel_item_label]),
|
|
345
|
+
children: [format(calendarOnesyDate_0, 'MMMM', {
|
|
346
|
+
l
|
|
347
|
+
}), " ", format(calendarOnesyDate_0, 'YYYY', {
|
|
348
|
+
l
|
|
349
|
+
})]
|
|
350
|
+
}), /*#__PURE__*/_jsx(CalendarMonth, _objectSpread(_objectSpread({
|
|
351
|
+
color: "default",
|
|
352
|
+
value: value,
|
|
353
|
+
calendar: calendarOnesyDate_0,
|
|
354
|
+
valid: valid,
|
|
355
|
+
now: now,
|
|
356
|
+
size: size,
|
|
357
|
+
range: range,
|
|
358
|
+
offset: index_2,
|
|
359
|
+
min: min,
|
|
360
|
+
max: max,
|
|
361
|
+
validate: validate,
|
|
362
|
+
outside: false,
|
|
363
|
+
noTransition: true
|
|
364
|
+
}, calendarMonthProps), {}, {
|
|
365
|
+
onChange: onCalendarMonthChange,
|
|
366
|
+
onChangeCalendar: onCalendarMonthChangeCalendar,
|
|
367
|
+
TransitionProps: {
|
|
368
|
+
onTransition
|
|
369
|
+
},
|
|
370
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-calendar-days'], calendarMonthProps?.className, classes.calendar])
|
|
371
|
+
}))]
|
|
372
|
+
}, index_2);
|
|
371
373
|
}),
|
|
372
374
|
ItemWrapperProps: {
|
|
373
375
|
style: {
|
|
@@ -377,56 +379,59 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
377
379
|
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-carousel'], classes.carousel])
|
|
378
380
|
});
|
|
379
381
|
default:
|
|
380
|
-
return /*#__PURE__*/
|
|
382
|
+
return /*#__PURE__*/_jsxs(Line, {
|
|
381
383
|
gap: 0,
|
|
382
384
|
direction: "column",
|
|
383
385
|
align: "center",
|
|
384
386
|
style: {
|
|
385
387
|
width: '100%'
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
388
|
+
},
|
|
389
|
+
children: [/*#__PURE__*/_jsx(Line, {
|
|
390
|
+
direction: "row",
|
|
391
|
+
align: "center",
|
|
392
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-calendars'], classes.calendars]),
|
|
393
|
+
children: Array.from({
|
|
394
|
+
length: calendars
|
|
395
|
+
}).map((item_2, index_1) => {
|
|
396
|
+
const calendarOnesyDate = add(index_1, 'month', calendar);
|
|
397
|
+
return /*#__PURE__*/_jsxs(Line, {
|
|
398
|
+
gap: 1,
|
|
399
|
+
direction: "column",
|
|
400
|
+
style: {
|
|
401
|
+
width: '100%'
|
|
402
|
+
},
|
|
403
|
+
children: [calendars > 1 && /*#__PURE__*/_jsx(Type, {
|
|
404
|
+
version: size === 'large' ? 'l1' : size === 'regular' ? 'l2' : 'l3',
|
|
405
|
+
style: {
|
|
406
|
+
paddingInlineStart: '16px'
|
|
407
|
+
},
|
|
408
|
+
children: format(calendarOnesyDate, 'MMMM', {
|
|
409
|
+
l
|
|
410
|
+
})
|
|
411
|
+
}), /*#__PURE__*/_jsx(CalendarMonth, _objectSpread(_objectSpread({
|
|
412
|
+
color: "default",
|
|
413
|
+
value: value,
|
|
414
|
+
calendar: calendarOnesyDate,
|
|
415
|
+
valid: valid,
|
|
416
|
+
now: now,
|
|
417
|
+
size: size,
|
|
418
|
+
range: range,
|
|
419
|
+
offset: index_1,
|
|
420
|
+
min: min,
|
|
421
|
+
max: max,
|
|
422
|
+
validate: validate
|
|
423
|
+
}, calendarMonthProps), {}, {
|
|
424
|
+
onChange: onCalendarMonthChange,
|
|
425
|
+
onChangeCalendar: onCalendarMonthChangeCalendar,
|
|
426
|
+
TransitionProps: {
|
|
427
|
+
onTransition
|
|
428
|
+
},
|
|
429
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-calendar-days'], calendarMonthProps?.className, classes.calendar])
|
|
430
|
+
}))]
|
|
431
|
+
}, index_1);
|
|
432
|
+
})
|
|
433
|
+
}), belowCalendars]
|
|
434
|
+
});
|
|
430
435
|
}
|
|
431
436
|
};
|
|
432
437
|
const month = format(calendar, 'MMM');
|
|
@@ -435,7 +440,7 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
435
440
|
color: 'inherit',
|
|
436
441
|
version: 'text'
|
|
437
442
|
}, OptionButtonProps);
|
|
438
|
-
return /*#__PURE__*/
|
|
443
|
+
return /*#__PURE__*/_jsxs(Surface, _objectSpread(_objectSpread({
|
|
439
444
|
ref: item_4 => {
|
|
440
445
|
if (ref) {
|
|
441
446
|
if (is('function', ref)) ref(item_4);else ref.current = item_4;
|
|
@@ -443,240 +448,277 @@ const Calendar = /*#__PURE__*/React.forwardRef((props__, ref) => {
|
|
|
443
448
|
refs.root.current = item_4;
|
|
444
449
|
},
|
|
445
450
|
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-root', `onesy-Calendar-version-${version}`, `onesy-Calendar-size-${size}`], className, classes.root, classes[`size_${size}`], range && classes.range])
|
|
446
|
-
}, other),
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
451
|
+
}, other), {}, {
|
|
452
|
+
children: [start, /*#__PURE__*/_jsx(Line, {
|
|
453
|
+
gap: 0.5,
|
|
454
|
+
direction: "row",
|
|
455
|
+
align: "center",
|
|
456
|
+
justify: "space-between",
|
|
457
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-header'], classes.header]),
|
|
458
|
+
children: menu === 'month-year' ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
459
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
460
|
+
gap: 0,
|
|
461
|
+
direction: "row",
|
|
462
|
+
align: "center",
|
|
463
|
+
children: [/*#__PURE__*/_jsx(Fade, {
|
|
464
|
+
in: !open,
|
|
465
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
466
|
+
onClick: () => move(false),
|
|
467
|
+
size: size,
|
|
468
|
+
"aria-label": l('Previous month'),
|
|
469
|
+
disabled: open || +year <= 1970 && month === 'Jan'
|
|
470
|
+
}, optionButtonProps), {}, {
|
|
471
|
+
children: /*#__PURE__*/_jsx(IconPrevious, {
|
|
472
|
+
size: size
|
|
473
|
+
})
|
|
474
|
+
}))
|
|
475
|
+
}), /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
476
|
+
version: "text",
|
|
477
|
+
onClick: () => onOpen(),
|
|
478
|
+
fontSize: iconFontSize,
|
|
479
|
+
size: size,
|
|
480
|
+
end: /*#__PURE__*/_jsx(Fade, {
|
|
481
|
+
in: open !== 'year',
|
|
482
|
+
children: /*#__PURE__*/_jsx(IconDropDown, {
|
|
483
|
+
size: size,
|
|
484
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-arrow'], classes.arrow, open === 'month' && classes.arrow_open])
|
|
485
|
+
})
|
|
486
|
+
}),
|
|
487
|
+
"aria-label": `${l('Select month')}, ${l('current')} ${l(month)}`
|
|
488
|
+
}, optionButtonProps), {}, {
|
|
489
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-option'], optionButtonProps?.className, classes.option, open === 'year' && classes.option_secondary]),
|
|
490
|
+
children: l(month)
|
|
491
|
+
})), /*#__PURE__*/_jsx(Fade, {
|
|
492
|
+
in: !open,
|
|
493
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
494
|
+
onClick: () => move(),
|
|
495
|
+
size: size,
|
|
496
|
+
"aria-label": l('Next month'),
|
|
497
|
+
disabled: open || +year === 2099 && month === 'Dec'
|
|
498
|
+
}, optionButtonProps), {}, {
|
|
499
|
+
children: /*#__PURE__*/_jsx(IconNext, {
|
|
500
|
+
size: size
|
|
501
|
+
})
|
|
502
|
+
}))
|
|
503
|
+
})]
|
|
504
|
+
}), /*#__PURE__*/_jsxs(Line, {
|
|
505
|
+
gap: 0,
|
|
506
|
+
direction: "row",
|
|
507
|
+
align: "center",
|
|
508
|
+
children: [/*#__PURE__*/_jsx(Fade, {
|
|
509
|
+
in: !open,
|
|
510
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
511
|
+
onClick: () => move(false, 'year'),
|
|
512
|
+
size: size,
|
|
513
|
+
"aria-label": l('Previous year'),
|
|
514
|
+
disabled: open || +year <= 1970
|
|
515
|
+
}, optionButtonProps), {}, {
|
|
516
|
+
children: /*#__PURE__*/_jsx(IconPrevious, {
|
|
517
|
+
size: size
|
|
518
|
+
})
|
|
519
|
+
}))
|
|
520
|
+
}), /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
521
|
+
version: "text",
|
|
522
|
+
onClick: () => onOpen('year'),
|
|
523
|
+
fontSize: iconFontSize,
|
|
524
|
+
size: size,
|
|
525
|
+
end: /*#__PURE__*/_jsx(Fade, {
|
|
526
|
+
in: open !== 'month',
|
|
527
|
+
children: /*#__PURE__*/_jsx(IconDropDown, {
|
|
528
|
+
size: size,
|
|
529
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-arrow'], classes.arrow, open === 'year' && classes.arrow_open])
|
|
530
|
+
})
|
|
531
|
+
}),
|
|
532
|
+
"aria-label": `${l('Select year')}, ${l('current')} ${year}`
|
|
533
|
+
}, optionButtonProps), {}, {
|
|
534
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-option'], optionButtonProps?.className, classes.option, open === 'month' && classes.option_secondary]),
|
|
535
|
+
children: year
|
|
536
|
+
})), /*#__PURE__*/_jsx(Fade, {
|
|
537
|
+
in: !open,
|
|
538
|
+
children: /*#__PURE__*/_jsx(IconButton, _objectSpread(_objectSpread({
|
|
539
|
+
onClick: () => move(true, 'year'),
|
|
540
|
+
size: size,
|
|
541
|
+
"aria-label": l('Next year'),
|
|
542
|
+
disabled: open || +year === 2099
|
|
543
|
+
}, optionButtonProps), {}, {
|
|
544
|
+
children: /*#__PURE__*/_jsx(IconNext, {
|
|
545
|
+
size: size
|
|
546
|
+
})
|
|
547
|
+
}))
|
|
548
|
+
})]
|
|
549
|
+
})]
|
|
550
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
551
|
+
children: [/*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({
|
|
552
|
+
tonal: tonal,
|
|
553
|
+
color: "inherit",
|
|
554
|
+
size: size,
|
|
555
|
+
version: "text",
|
|
556
|
+
onClick: () => onOpen('year'),
|
|
557
|
+
fontSize: iconFontSize,
|
|
558
|
+
end: /*#__PURE__*/_jsx(IconDropDown, {
|
|
559
|
+
size: size,
|
|
560
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-arrow'], classes.arrow, open === 'year' && classes.arrow_open])
|
|
561
|
+
})
|
|
562
|
+
}, optionButtonProps), {}, {
|
|
563
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-option'], optionButtonProps?.className, classes.option]),
|
|
564
|
+
children: [format(calendar, 'MMMM', {
|
|
565
|
+
l
|
|
566
|
+
}), " ", format(calendar, 'YYYY', {
|
|
567
|
+
l
|
|
568
|
+
})]
|
|
569
|
+
})), /*#__PURE__*/_jsxs(Line, {
|
|
570
|
+
gap: 0,
|
|
571
|
+
direction: "row",
|
|
572
|
+
align: "center",
|
|
573
|
+
children: [/*#__PURE__*/_jsx(Fade, {
|
|
574
|
+
in: !open,
|
|
575
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
|
576
|
+
tonal: tonal,
|
|
577
|
+
color: "inherit",
|
|
578
|
+
size: size,
|
|
579
|
+
onClick: () => move(false, menu_month_previous_unit || 'month'),
|
|
580
|
+
"aria-label": l('Previous month'),
|
|
581
|
+
disabled: !!(open || +year === 1970 && month === 'Jan'),
|
|
582
|
+
children: /*#__PURE__*/_jsx(IconPrevious, {
|
|
583
|
+
size: size
|
|
584
|
+
})
|
|
585
|
+
})
|
|
586
|
+
}), /*#__PURE__*/_jsx(Fade, {
|
|
587
|
+
in: !open,
|
|
588
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
|
589
|
+
tonal: tonal,
|
|
590
|
+
color: "inherit",
|
|
591
|
+
size: size,
|
|
592
|
+
onClick: () => move(true, menu_month_next_unit || 'month'),
|
|
593
|
+
"aria-label": l('Next month'),
|
|
594
|
+
disabled: !!(open || +year === 2099 && month === 'Dec'),
|
|
595
|
+
children: /*#__PURE__*/_jsx(IconNext, {
|
|
596
|
+
size: size
|
|
597
|
+
})
|
|
598
|
+
})
|
|
599
|
+
})]
|
|
600
|
+
})]
|
|
601
|
+
})
|
|
602
|
+
}), !open && /*#__PURE__*/_jsx(Fade, {
|
|
603
|
+
in: true,
|
|
604
|
+
children: main()
|
|
605
|
+
}), open && /*#__PURE__*/_jsx(Divider, {
|
|
606
|
+
tonal: false,
|
|
607
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-divider'], classes.divider])
|
|
608
|
+
}), open === 'month' && /*#__PURE__*/_jsx(Fade, {
|
|
609
|
+
in: true,
|
|
610
|
+
children: /*#__PURE__*/_jsx(List, {
|
|
611
|
+
ref: refs.month,
|
|
612
|
+
color: "default",
|
|
613
|
+
size: "large",
|
|
614
|
+
menu: true,
|
|
615
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-list'], classes.list]),
|
|
616
|
+
children: getMonths(value, calendar, props).map((item_5, index_3) => {
|
|
617
|
+
const onesyDate = item_5.value;
|
|
618
|
+
const selected = calendar.month === onesyDate.month;
|
|
619
|
+
return /*#__PURE__*/_jsx(ListItem, {
|
|
620
|
+
onClick: () => onUpdateCalendarOption(onesyDate),
|
|
621
|
+
primary: format(onesyDate, 'MMMM', {
|
|
622
|
+
l
|
|
623
|
+
}),
|
|
624
|
+
inset: !selected,
|
|
625
|
+
startAlign: "center",
|
|
626
|
+
size: size,
|
|
627
|
+
start: selected ? /*#__PURE__*/_jsx(IconDoneAnimated, {
|
|
628
|
+
in: true,
|
|
629
|
+
add: true,
|
|
630
|
+
simple: true,
|
|
631
|
+
size: size
|
|
632
|
+
}) : undefined,
|
|
633
|
+
disabled: !valid(onesyDate, 'month'),
|
|
634
|
+
selected: selected,
|
|
635
|
+
button: true,
|
|
636
|
+
PrimaryProps: {
|
|
637
|
+
version: size === 'regular' ? 'b2' : size === 'small' ? 'b3' : 'b1'
|
|
638
|
+
},
|
|
639
|
+
"data-value": index_3,
|
|
640
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-list-item'], classes.listItem])
|
|
641
|
+
}, index_3);
|
|
642
|
+
})
|
|
643
|
+
})
|
|
644
|
+
}), open === 'year' && /*#__PURE__*/_jsx(Surface, {
|
|
645
|
+
color: "default",
|
|
646
|
+
children: ({
|
|
647
|
+
palette
|
|
648
|
+
}) => menu === 'month-year' ? /*#__PURE__*/_jsx(Fade, {
|
|
593
649
|
in: true,
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
startAlign: "center",
|
|
629
|
-
size: size,
|
|
630
|
-
start: selected_0 ? /*#__PURE__*/React.createElement(IconDoneAnimated, {
|
|
650
|
+
children: /*#__PURE__*/_jsx(List, {
|
|
651
|
+
ref: refs.year,
|
|
652
|
+
color: "default",
|
|
653
|
+
size: size,
|
|
654
|
+
menu: true,
|
|
655
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-list'], classes.list]),
|
|
656
|
+
children: getYears(value, calendar, props).map((item_6, index_4) => {
|
|
657
|
+
const onesyDate_0 = item_6.value;
|
|
658
|
+
const yearValue = format(onesyDate_0, 'YYYY');
|
|
659
|
+
const selected_0 = calendar.year === onesyDate_0.year;
|
|
660
|
+
return /*#__PURE__*/_jsx(ListItem, {
|
|
661
|
+
onClick: () => onUpdateCalendarOption(onesyDate_0),
|
|
662
|
+
primary: yearValue,
|
|
663
|
+
inset: !selected_0,
|
|
664
|
+
startAlign: "center",
|
|
665
|
+
size: size,
|
|
666
|
+
start: selected_0 ? /*#__PURE__*/_jsx(IconDoneAnimated, {
|
|
667
|
+
in: true,
|
|
668
|
+
add: true,
|
|
669
|
+
simple: true,
|
|
670
|
+
size: size
|
|
671
|
+
}) : undefined,
|
|
672
|
+
selected: selected_0,
|
|
673
|
+
disabled: !valid(onesyDate_0, 'year'),
|
|
674
|
+
button: true,
|
|
675
|
+
PrimaryProps: {
|
|
676
|
+
version: size === 'regular' ? 'b2' : size === 'small' ? 'b3' : 'b1'
|
|
677
|
+
},
|
|
678
|
+
"data-value": yearValue,
|
|
679
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-list-item'], classes.listItem])
|
|
680
|
+
}, index_4);
|
|
681
|
+
})
|
|
682
|
+
})
|
|
683
|
+
}) : /*#__PURE__*/_jsx(Fade, {
|
|
631
684
|
in: true,
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
"data-value": yearValue_0,
|
|
671
|
-
disabled: !valid(onesyDate_1, 'year')
|
|
672
|
-
}, PaginationItemsProps, {
|
|
673
|
-
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-day-version-year'], PaginationItemsProps?.className, classes.day_version_year]),
|
|
674
|
-
style: _objectSpread(_objectSpread({}, selected_1 ? {
|
|
675
|
-
color: theme.methods.palette.color.value(undefined, 90, true, palette),
|
|
676
|
-
backgroundColor: theme.methods.palette.color.value(undefined, 40, true, palette)
|
|
677
|
-
} : undefined), PaginationItemsProps?.style)
|
|
678
|
-
}), yearValue_0);
|
|
679
|
-
})))), end);
|
|
680
|
-
});
|
|
685
|
+
children: /*#__PURE__*/_jsx(Line, {
|
|
686
|
+
ref: refs.year,
|
|
687
|
+
direction: "row",
|
|
688
|
+
wrap: "wrap",
|
|
689
|
+
justify: "space-evenly",
|
|
690
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-list-version-year'], classes.list_version_year]),
|
|
691
|
+
children: getYears(value, calendar, props).map((item_7, index_5) => {
|
|
692
|
+
const onesyDate_1 = item_7.value;
|
|
693
|
+
const yearValue_0 = format(onesyDate_1, 'YYYY');
|
|
694
|
+
const selected_1 = calendar.year === onesyDate_1.year;
|
|
695
|
+
return /*#__PURE__*/_jsx(PaginationItem, _objectSpread(_objectSpread({
|
|
696
|
+
tonal: tonal,
|
|
697
|
+
color: "inherit",
|
|
698
|
+
size: size,
|
|
699
|
+
InteractionProps: {
|
|
700
|
+
background: false
|
|
701
|
+
},
|
|
702
|
+
TypeProps: {
|
|
703
|
+
version: size === 'large' ? 'b1' : size === 'regular' ? 'b2' : 'b3',
|
|
704
|
+
tone: !selected_1 ? 'primary' : undefined
|
|
705
|
+
},
|
|
706
|
+
onClick: () => onUpdateCalendarOption(onesyDate_1),
|
|
707
|
+
"data-value": yearValue_0,
|
|
708
|
+
disabled: !valid(onesyDate_1, 'year')
|
|
709
|
+
}, PaginationItemsProps), {}, {
|
|
710
|
+
className: classNames([staticClassName('Calendar', theme) && ['onesy-Calendar-day-version-year'], PaginationItemsProps?.className, classes.day_version_year]),
|
|
711
|
+
style: _objectSpread(_objectSpread({}, selected_1 ? {
|
|
712
|
+
color: theme.methods.palette.color.value(undefined, 90, true, palette),
|
|
713
|
+
backgroundColor: theme.methods.palette.color.value(undefined, 40, true, palette)
|
|
714
|
+
} : undefined), PaginationItemsProps?.style),
|
|
715
|
+
children: yearValue_0
|
|
716
|
+
}), index_5);
|
|
717
|
+
})
|
|
718
|
+
})
|
|
719
|
+
})
|
|
720
|
+
}), end]
|
|
721
|
+
}));
|
|
722
|
+
};
|
|
681
723
|
Calendar.displayName = 'onesy-Calendar';
|
|
682
724
|
export default Calendar;
|