@onesy/ui-react 1.0.164 → 1.0.167
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.d.ts +2 -2
- package/Accordion/Accordion.js +18 -41
- package/AdvancedTextField/AdvancedTextField.d.ts +1 -1
- package/AdvancedTextField/AdvancedTextField.js +17 -22
- package/Append/Append.d.ts +3 -3
- package/Append/Append.js +98 -110
- package/AreaChart/AreaChart.d.ts +1 -1
- package/AreaChart/AreaChart.js +27 -18
- package/AreaChartItem/AreaChartItem.d.ts +1 -1
- package/AreaChartItem/AreaChartItem.js +38 -49
- package/AudioPlayer/AudioPlayer.d.ts +1 -1
- package/AudioPlayer/AudioPlayer.js +89 -116
- package/AudioRecorder/AudioRecorder.d.ts +1 -1
- package/AudioRecorder/AudioRecorder.js +24 -42
- package/AutoComplete/AutoComplete.d.ts +3 -3
- package/AutoComplete/AutoComplete.js +119 -151
- package/AutoCompleteCountry/AutoCompleteCountry.d.ts +1 -1
- package/AutoCompleteCountry/AutoCompleteCountry.js +11 -22
- package/AutoCompleteCurrency/AutoCompleteCurrency.d.ts +1 -1
- package/AutoCompleteCurrency/AutoCompleteCurrency.js +4 -9
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js +58 -31
- package/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/AvatarGroup/AvatarGroup.js +40 -23
- package/Backdrop/Backdrop.d.ts +1 -1
- package/Backdrop/Backdrop.js +7 -18
- package/Badge/Badge.d.ts +1 -1
- package/Badge/Badge.js +53 -26
- package/Banner/Banner.d.ts +1 -1
- package/Banner/Banner.js +86 -39
- package/BottomAppBar/BottomAppBar.d.ts +1 -1
- package/BottomAppBar/BottomAppBar.js +61 -31
- package/BottomSheet/BottomSheet.d.ts +1 -1
- package/BottomSheet/BottomSheet.js +23 -13
- package/Box/Box.d.ts +1 -1
- package/Box/Box.js +25 -11
- package/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/Breadcrumbs/Breadcrumbs.js +27 -38
- package/BubbleChart/BubbleChart.d.ts +1 -1
- package/BubbleChart/BubbleChart.js +126 -120
- package/BubbleChartItem/BubbleChartItem.d.ts +1 -1
- package/BubbleChartItem/BubbleChartItem.js +12 -23
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +27 -42
- package/Buttons/Buttons.d.ts +1 -1
- package/Buttons/Buttons.js +208 -97
- package/Calendar/Calendar.d.ts +3 -3
- package/Calendar/Calendar.js +95 -133
- package/CalendarAvailability/CalendarAvailability.d.ts +2 -2
- package/CalendarAvailability/CalendarAvailability.js +107 -148
- package/CalendarMenu/CalendarMenu.d.ts +1 -1
- package/CalendarMenu/CalendarMenu.js +47 -80
- package/CalendarMonth/CalendarMonth.d.ts +5 -5
- package/CalendarMonth/CalendarMonth.js +103 -124
- package/CalendarViews/CalendarViews.d.ts +2 -2
- package/CalendarViews/CalendarViews.js +34 -60
- package/CalendarWeek/CalendarWeek.d.ts +1 -1
- package/CalendarWeek/CalendarWeek.js +84 -95
- package/Card/Card.d.ts +1 -1
- package/Card/Card.js +10 -21
- package/CardButton/CardButton.d.ts +1 -1
- package/CardButton/CardButton.js +8 -13
- package/CardFooter/CardFooter.d.ts +1 -1
- package/CardFooter/CardFooter.js +40 -21
- package/CardHeader/CardHeader.d.ts +1 -1
- package/CardHeader/CardHeader.js +68 -24
- package/CardImage/CardImage.d.ts +1 -1
- package/CardImage/CardImage.js +31 -13
- package/CardMain/CardMain.d.ts +1 -1
- package/CardMain/CardMain.js +30 -16
- package/Carousel/Carousel.d.ts +4 -4
- package/Carousel/Carousel.js +163 -181
- package/Chart/Chart.d.ts +4 -4
- package/Chart/Chart.js +250 -271
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Checkbox/Checkbox.js +133 -33
- package/Chip/Chip.d.ts +1 -1
- package/Chip/Chip.js +5 -10
- package/Chips/Chips.d.ts +1 -1
- package/Chips/Chips.js +73 -38
- package/ClickListener/ClickListener.d.ts +1 -1
- package/ClickListener/ClickListener.js +10 -12
- package/Clock/Clock.d.ts +5 -5
- package/Clock/Clock.js +81 -89
- package/ColorTextField/ColorTextField.d.ts +1 -1
- package/ColorTextField/ColorTextField.js +190 -75
- package/ColumnChart/ColumnChart.d.ts +1 -1
- package/ColumnChart/ColumnChart.js +43 -24
- package/ColumnChartItem/ColumnChartItem.d.ts +1 -1
- package/ColumnChartItem/ColumnChartItem.js +12 -23
- package/Confirm/Confirm.d.ts +4 -4
- package/Confirm/Confirm.js +13 -37
- package/Confirm/useConfirm.js +1 -1
- package/Container/Container.d.ts +1 -1
- package/Container/Container.js +9 -14
- package/CookieBanner/CookieBanner.d.ts +1 -1
- package/CookieBanner/CookieBanner.js +65 -39
- package/Countdown/Countdown.d.ts +1 -1
- package/Countdown/Countdown.js +25 -54
- package/DatePicker/DatePicker.d.ts +1 -1
- package/DatePicker/DatePicker.js +138 -176
- package/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/DateRangePicker/DateRangePicker.js +23 -13
- package/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.js +118 -156
- package/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
- package/DateTimeRangePicker/DateTimeRangePicker.js +23 -13
- package/Divider/Divider.d.ts +1 -1
- package/Divider/Divider.js +4 -12
- package/DonutChart/DonutChart.d.ts +1 -1
- package/DonutChart/DonutChart.js +23 -13
- package/DragAndDropList/DragAndDropList.d.ts +1 -1
- package/DragAndDropList/DragAndDropList.js +31 -33
- package/Drawing/Drawing.d.ts +2 -2
- package/Drawing/Drawing.js +107 -153
- package/DropZone/DropZone.d.ts +1 -1
- package/DropZone/DropZone.js +36 -54
- package/Emojis/Emojis.d.ts +3 -3
- package/Emojis/Emojis.js +52 -84
- package/Expand/Expand.d.ts +1 -1
- package/Expand/Expand.js +70 -37
- package/Fab/Fab.d.ts +1 -1
- package/Fab/Fab.js +8 -11
- package/Fade/Fade.d.ts +1 -1
- package/Fade/Fade.js +221 -111
- package/FileChoose/FileChoose.d.ts +2 -2
- package/FileChoose/FileChoose.js +26 -43
- package/Focus/Focus.d.ts +1 -1
- package/Focus/Focus.js +8 -10
- package/Form/Form.d.ts +1 -1
- package/Form/Form.js +95 -54
- package/FormRow/FormRow.d.ts +1 -1
- package/FormRow/FormRow.js +89 -42
- package/Forms/Forms.d.ts +1 -1
- package/Forms/Forms.js +36 -19
- package/Frame/Frame.d.ts +1 -1
- package/Frame/Frame.js +8 -22
- package/Grid/Grid.d.ts +2 -2
- package/Grid/Grid.js +13 -18
- package/Grow/Grow.d.ts +1 -1
- package/Grow/Grow.js +233 -118
- package/HTMLCanvas/HTMLCanvas.d.ts +2 -2
- package/HTMLCanvas/HTMLCanvas.js +225 -254
- package/IFrame/IFrame.d.ts +1 -1
- package/IFrame/IFrame.js +5 -11
- package/Icon/Icon.d.ts +1 -1
- package/Icon/Icon.js +82 -42
- package/IconButton/IconButton.d.ts +1 -1
- package/IconButton/IconButton.js +31 -18
- package/Image/Image.d.ts +1 -1
- package/Image/Image.js +13 -24
- package/ImageCrop/ImageCrop.d.ts +2 -2
- package/ImageCrop/ImageCrop.js +238 -244
- package/ImageEdit/ImageEdit.d.ts +2 -2
- package/ImageEdit/ImageEdit.js +189 -225
- package/ImageGallery/ImageGallery.d.ts +1 -1
- package/ImageGallery/ImageGallery.js +55 -73
- package/ImageList/ImageList.d.ts +1 -1
- package/ImageList/ImageList.js +13 -15
- package/ImageListItem/ImageListItem.d.ts +1 -1
- package/ImageListItem/ImageListItem.js +9 -14
- package/ImageListItemBox/ImageListItemBox.d.ts +1 -1
- package/ImageListItemBox/ImageListItemBox.js +30 -16
- package/Info/Info.d.ts +1 -1
- package/Info/Info.js +83 -42
- package/Interaction/Interaction.d.ts +2 -2
- package/Interaction/Interaction.js +39 -41
- package/Keyframes/Keyframes.d.ts +3 -3
- package/Keyframes/Keyframes.js +16 -18
- package/Keyframes/useKeyframes.js +1 -1
- package/Label/Label.d.ts +1 -1
- package/Label/Label.js +6 -15
- package/Labels/Labels.d.ts +1 -1
- package/Labels/Labels.js +16 -24
- package/Line/Line.d.ts +6 -6
- package/Line/Line.js +10 -15
- package/LineChart/LineChart.d.ts +1 -1
- package/LineChart/LineChart.js +27 -18
- package/LineChartItem/LineChartItem.d.ts +1 -1
- package/LineChartItem/LineChartItem.js +22 -33
- package/LinearMeter/LinearMeter.d.ts +1 -1
- package/LinearMeter/LinearMeter.js +125 -130
- package/LinearProgress/LinearProgress.d.ts +1 -1
- package/LinearProgress/LinearProgress.js +51 -31
- package/Link/Link.d.ts +1 -1
- package/Link/Link.js +59 -27
- package/Links/Links.d.ts +2 -2
- package/Links/Links.js +110 -81
- package/List/List.d.ts +1 -1
- package/List/List.js +12 -20
- package/ListItem/ListItem.d.ts +1 -1
- package/ListItem/ListItem.js +5 -17
- package/ListSubheader/ListSubheader.d.ts +1 -1
- package/ListSubheader/ListSubheader.js +23 -13
- package/MainProgress/MainProgress.d.ts +1 -1
- package/MainProgress/MainProgress.js +7 -12
- package/MainProgress/useMainProgress.js +1 -1
- package/MainProgressMaterial/MainProgressMaterial.d.ts +3 -3
- package/MainProgressMaterial/MainProgressMaterial.js +15 -23
- package/MainProgressMaterial/useMainProgressMaterial.js +1 -1
- package/Markdown/Markdown.d.ts +1 -1
- package/Markdown/Markdown.js +192 -194
- package/Masonry/Masonry.d.ts +1 -1
- package/Masonry/Masonry.js +25 -30
- package/Medias/Medias.d.ts +3 -3
- package/Medias/Medias.js +86 -113
- package/Menu/Menu.d.ts +1 -1
- package/Menu/Menu.js +55 -66
- package/MenuDesktop/MenuDesktop.d.ts +3 -3
- package/MenuDesktop/MenuDesktop.js +118 -121
- package/MenuItem/MenuItem.d.ts +1 -1
- package/MenuItem/MenuItem.js +40 -60
- package/Meta/Meta.d.ts +1 -1
- package/Meta/Meta.js +57 -35
- package/Modal/Modal.d.ts +1 -1
- package/Modal/Modal.js +11 -25
- package/ModalFooter/ModalFooter.d.ts +1 -1
- package/ModalFooter/ModalFooter.js +30 -16
- package/ModalHeader/ModalHeader.d.ts +1 -1
- package/ModalHeader/ModalHeader.js +32 -17
- package/ModalIcon/ModalIcon.d.ts +1 -1
- package/ModalIcon/ModalIcon.js +2 -4
- package/ModalMain/ModalMain.d.ts +1 -1
- package/ModalMain/ModalMain.js +31 -17
- package/ModalText/ModalText.d.ts +1 -1
- package/ModalText/ModalText.js +28 -15
- package/ModalTitle/ModalTitle.d.ts +1 -1
- package/ModalTitle/ModalTitle.js +28 -15
- package/MoreOptions/MoreOptions.d.ts +1 -1
- package/MoreOptions/MoreOptions.js +43 -28
- package/Move/Move.d.ts +1 -1
- package/Move/Move.js +24 -26
- package/NavigationBar/NavigationBar.d.ts +2 -2
- package/NavigationBar/NavigationBar.js +64 -39
- package/NavigationDrawer/NavigationDrawer.d.ts +1 -1
- package/NavigationDrawer/NavigationDrawer.js +12 -21
- package/NavigationItem/NavigationItem.d.ts +2 -2
- package/NavigationItem/NavigationItem.js +26 -41
- package/NavigationRail/NavigationRail.d.ts +1 -1
- package/NavigationRail/NavigationRail.js +69 -54
- package/NotFound/NotFound.d.ts +1 -1
- package/NotFound/NotFound.js +7 -18
- package/NumericTextField/NumericTextField.d.ts +1 -1
- package/NumericTextField/NumericTextField.js +51 -59
- package/Page/Page.d.ts +2 -2
- package/Page/Page.js +6 -20
- package/PageTransition/PageTransition.d.ts +1 -1
- package/PageTransition/PageTransition.js +7 -12
- package/Pagination/Pagination.d.ts +1 -1
- package/Pagination/Pagination.js +121 -68
- package/PaginationItem/PaginationItem.d.ts +1 -1
- package/PaginationItem/PaginationItem.js +50 -30
- package/Parallax/Parallax.d.ts +2 -2
- package/Parallax/Parallax.js +9 -11
- package/Path/Path.d.ts +1 -1
- package/Path/Path.js +22 -9
- package/PieChart/PieChart.d.ts +1 -1
- package/PieChart/PieChart.js +38 -55
- package/Placeholder/Placeholder.d.ts +1 -1
- package/Placeholder/Placeholder.js +59 -23
- package/Portal/Portal.d.ts +1 -1
- package/Portal/Portal.js +2 -4
- package/Properties/Properties.d.ts +2 -2
- package/Properties/Properties.js +51 -30
- package/Property/Property.d.ts +1 -1
- package/Property/Property.js +4 -12
- package/Radio/Radio.d.ts +1 -1
- package/Radio/Radio.js +83 -24
- package/Radios/Radios.d.ts +1 -1
- package/Radios/Radios.js +6 -14
- package/Rating/Rating.d.ts +1 -1
- package/Rating/Rating.js +68 -71
- package/Reset/Reset.d.ts +1 -1
- package/Reset/Reset.js +26 -4
- package/Reveal/Reveal.d.ts +1 -1
- package/Reveal/Reveal.js +8 -14
- package/RichTextEditor/RichTextEditor.d.ts +1 -1
- package/RichTextEditor/RichTextEditor.js +194 -254
- package/RoundMeter/RoundMeter.d.ts +1 -1
- package/RoundMeter/RoundMeter.js +207 -212
- package/RoundProgress/RoundProgress.d.ts +1 -1
- package/RoundProgress/RoundProgress.js +46 -27
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +27 -18
- package/ScatterChartItem/ScatterChartItem.d.ts +1 -1
- package/ScatterChartItem/ScatterChartItem.js +15 -26
- package/ScreenCapture/ScreenCapture.d.ts +2 -2
- package/ScreenCapture/ScreenCapture.js +57 -81
- package/Section/Section.d.ts +2 -2
- package/Section/Section.js +13 -24
- package/SectionAction/SectionAction.d.ts +1 -1
- package/SectionAction/SectionAction.js +4 -12
- package/SectionBoxes/SectionBoxes.d.ts +2 -2
- package/SectionBoxes/SectionBoxes.js +14 -28
- package/SectionCards/SectionCards.d.ts +2 -2
- package/SectionCards/SectionCards.js +14 -28
- package/SectionCarousel/SectionCarousel.d.ts +2 -2
- package/SectionCarousel/SectionCarousel.js +15 -32
- package/SectionContact/SectionContact.d.ts +1 -1
- package/SectionContact/SectionContact.js +6 -20
- package/SectionImageGallery/SectionImageGallery.d.ts +1 -1
- package/SectionImageGallery/SectionImageGallery.js +4 -12
- package/SectionLogos/SectionLogos.d.ts +1 -1
- package/SectionLogos/SectionLogos.js +8 -19
- package/SectionMedia/SectionMedia.d.ts +1 -1
- package/SectionMedia/SectionMedia.js +11 -34
- package/SectionReviews/SectionReviews.d.ts +2 -2
- package/SectionReviews/SectionReviews.js +16 -33
- package/SectionTextMedia/SectionTextMedia.d.ts +1 -1
- package/SectionTextMedia/SectionTextMedia.js +10 -37
- package/SectionTimeline/SectionTimeline.d.ts +2 -2
- package/SectionTimeline/SectionTimeline.js +17 -34
- package/SectionWatch/SectionWatch.d.ts +1 -1
- package/SectionWatch/SectionWatch.js +4 -12
- package/Select/Select.d.ts +1 -1
- package/Select/Select.js +95 -121
- package/Share/Share.d.ts +1 -1
- package/Share/Share.js +217 -119
- package/Slide/Slide.d.ts +1 -1
- package/Slide/Slide.js +16 -18
- package/Slider/Slider.d.ts +2 -2
- package/Slider/Slider.js +150 -165
- package/SmartTextField/SmartTextField.d.ts +1 -1
- package/SmartTextField/SmartTextField.js +203 -256
- package/Snackbar/Snackbar.d.ts +1 -1
- package/Snackbar/Snackbar.js +18 -35
- package/Snackbars/Context.d.ts +1 -1
- package/Snackbars/Snackbars.d.ts +2 -2
- package/Snackbars/Snackbars.js +43 -57
- package/Snackbars/useSnackbars.js +1 -1
- package/Space/Space.d.ts +1 -1
- package/Space/Space.js +762 -556
- package/SpeechToText/SpeechToText.d.ts +1 -1
- package/SpeechToText/SpeechToText.js +26 -37
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDial/SpeedDial.js +69 -58
- package/SpeedDialItem/SpeedDialItem.d.ts +1 -1
- package/SpeedDialItem/SpeedDialItem.js +34 -23
- package/SpyScroll/SpyScroll.d.ts +1 -1
- package/SpyScroll/SpyScroll.js +17 -19
- package/Step/Step.d.ts +1 -1
- package/Step/Step.js +41 -52
- package/Stepper/Stepper.d.ts +1 -1
- package/Stepper/Stepper.js +12 -20
- package/Surface/Surface.d.ts +1 -1
- package/Surface/Surface.js +208 -133
- package/Switch/Switch.d.ts +1 -1
- package/Switch/Switch.js +107 -48
- package/Tab/Tab.d.ts +1 -1
- package/Tab/Tab.js +137 -68
- package/Table/Table.d.ts +1 -1
- package/Table/Table.js +70 -33
- package/TableBody/TableBody.d.ts +1 -1
- package/TableBody/TableBody.js +44 -23
- package/TableCell/TableCell.d.ts +2 -2
- package/TableCell/TableCell.js +26 -40
- package/TableFooter/TableFooter.d.ts +1 -1
- package/TableFooter/TableFooter.js +36 -19
- package/TableHead/TableHead.d.ts +1 -1
- package/TableHead/TableHead.js +15 -26
- package/TableHeader/TableHeader.d.ts +1 -1
- package/TableHeader/TableHeader.js +38 -23
- package/TablePagination/TablePagination.d.ts +1 -1
- package/TablePagination/TablePagination.js +10 -27
- package/TableRow/TableRow.d.ts +1 -1
- package/TableRow/TableRow.js +47 -26
- package/Tabs/Tabs.d.ts +1 -1
- package/Tabs/Tabs.js +41 -56
- package/Text/Text.d.ts +1 -1
- package/Text/Text.js +10 -18
- package/TextField/TextField.d.ts +1 -1
- package/TextField/TextField.js +68 -83
- package/TextToSpeech/TextToSpeech.d.ts +1 -1
- package/TextToSpeech/TextToSpeech.js +21 -32
- package/TimePicker/TimePicker.d.ts +3 -3
- package/TimePicker/TimePicker.js +183 -230
- package/TimeRangePicker/TimeRangePicker.d.ts +1 -1
- package/TimeRangePicker/TimeRangePicker.js +23 -13
- package/Timeline/Timeline.d.ts +1 -1
- package/Timeline/Timeline.js +35 -19
- package/TimelineItem/TimelineItem.d.ts +1 -1
- package/TimelineItem/TimelineItem.js +5 -16
- package/Timer/Timer.d.ts +1 -1
- package/Timer/Timer.js +29 -55
- package/ToggleButton/ToggleButton.d.ts +1 -1
- package/ToggleButton/ToggleButton.js +29 -16
- package/ToggleButtons/ToggleButtons.d.ts +1 -1
- package/ToggleButtons/ToggleButtons.js +24 -15
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.js +46 -60
- package/TopAppBar/TopAppBar.d.ts +1 -1
- package/TopAppBar/TopAppBar.js +118 -61
- package/Transition/Transition.d.ts +3 -3
- package/Transition/Transition.js +54 -56
- package/Transition/useTransition.js +1 -1
- package/Transitions/Transitions.d.ts +2 -2
- package/Transitions/Transitions.js +10 -12
- package/Tree/Tree.d.ts +1 -1
- package/Tree/Tree.js +37 -60
- package/Type/Type.d.ts +1 -1
- package/Type/Type.js +24 -17
- package/VideoPlayer/VideoPlayer.d.ts +1 -1
- package/VideoPlayer/VideoPlayer.js +123 -150
- package/ViewSplit/ViewSplit.d.ts +1 -1
- package/ViewSplit/ViewSplit.js +66 -77
- package/Watch/Watch.d.ts +1 -1
- package/Watch/Watch.js +14 -31
- package/Weather/Weather.d.ts +4 -4
- package/Weather/Weather.js +75 -47
- package/Whiteboard/Whiteboard.d.ts +5 -5
- package/Whiteboard/Whiteboard.js +565 -570
- package/Widgets/Widgets.d.ts +2 -2
- package/Widgets/Widgets.js +31 -48
- package/Widgets/useWidgets.js +1 -1
- package/WindowSplit/WindowSplit.d.ts +1 -1
- package/WindowSplit/WindowSplit.js +52 -63
- package/Zoom/Zoom.d.ts +1 -1
- package/Zoom/Zoom.js +221 -107
- package/esm/Accordion/Accordion.js +17 -17
- package/esm/AdvancedTextField/AdvancedTextField.js +16 -16
- package/esm/Append/Append.js +97 -103
- package/esm/AreaChart/AreaChart.js +26 -9
- package/esm/AreaChartItem/AreaChartItem.js +37 -37
- package/esm/AudioPlayer/AudioPlayer.js +88 -88
- package/esm/AudioRecorder/AudioRecorder.js +23 -23
- package/esm/AutoComplete/AutoComplete.js +115 -115
- package/esm/AutoCompleteCountry/AutoCompleteCountry.js +10 -10
- package/esm/AutoCompleteCurrency/AutoCompleteCurrency.js +3 -3
- package/esm/Avatar/Avatar.js +57 -22
- package/esm/AvatarGroup/AvatarGroup.js +39 -14
- package/esm/Backdrop/Backdrop.js +6 -6
- package/esm/Badge/Badge.js +52 -19
- package/esm/Banner/Banner.js +85 -27
- package/esm/BottomAppBar/BottomAppBar.js +60 -22
- package/esm/BottomSheet/BottomSheet.js +22 -7
- package/esm/Box/Box.js +24 -8
- package/esm/Breadcrumbs/Breadcrumbs.js +25 -25
- package/esm/BubbleChart/BubbleChart.js +130 -104
- package/esm/BubbleChartItem/BubbleChartItem.js +11 -11
- package/esm/Button/Button.js +25 -25
- package/esm/Buttons/Buttons.js +203 -86
- package/esm/Calendar/Calendar.js +93 -93
- package/esm/CalendarAvailability/CalendarAvailability.js +103 -103
- package/esm/CalendarMenu/CalendarMenu.js +46 -46
- package/esm/CalendarMonth/CalendarMonth.js +102 -102
- package/esm/CalendarViews/CalendarViews.js +33 -33
- package/esm/CalendarWeek/CalendarWeek.js +81 -81
- package/esm/Card/Card.js +9 -9
- package/esm/CardButton/CardButton.js +7 -7
- package/esm/CardFooter/CardFooter.js +39 -15
- package/esm/CardHeader/CardHeader.js +67 -18
- package/esm/CardImage/CardImage.js +30 -10
- package/esm/CardMain/CardMain.js +29 -10
- package/esm/Carousel/Carousel.js +162 -162
- package/esm/Chart/Chart.js +236 -236
- package/esm/Checkbox/Checkbox.js +132 -27
- package/esm/Chip/Chip.js +4 -4
- package/esm/Chips/Chips.js +72 -29
- package/esm/ClickListener/ClickListener.js +6 -6
- package/esm/Clock/Clock.js +80 -80
- package/esm/ColorTextField/ColorTextField.js +188 -57
- package/esm/ColumnChart/ColumnChart.js +42 -15
- package/esm/ColumnChartItem/ColumnChartItem.js +11 -11
- package/esm/Confirm/Confirm.js +12 -12
- package/esm/Confirm/useConfirm.js +1 -1
- package/esm/Container/Container.js +8 -8
- package/esm/CookieBanner/CookieBanner.js +64 -21
- package/esm/Countdown/Countdown.js +24 -24
- package/esm/DatePicker/DatePicker.js +136 -136
- package/esm/DateRangePicker/DateRangePicker.js +22 -7
- package/esm/DateTimePicker/DateTimePicker.js +116 -116
- package/esm/DateTimeRangePicker/DateTimeRangePicker.js +22 -7
- package/esm/Divider/Divider.js +3 -3
- package/esm/DonutChart/DonutChart.js +22 -7
- package/esm/DragAndDropList/DragAndDropList.js +30 -30
- package/esm/Drawing/Drawing.js +106 -105
- package/esm/DropZone/DropZone.js +35 -35
- package/esm/Emojis/Emojis.js +51 -51
- package/esm/Expand/Expand.js +69 -33
- package/esm/Fab/Fab.js +7 -5
- package/esm/Fade/Fade.js +204 -94
- package/esm/FileChoose/FileChoose.js +25 -25
- package/esm/Focus/Focus.js +7 -7
- package/esm/Form/Form.js +94 -42
- package/esm/FormRow/FormRow.js +88 -33
- package/esm/Forms/Forms.js +35 -13
- package/esm/Frame/Frame.js +7 -7
- package/esm/Grid/Grid.js +10 -10
- package/esm/Grow/Grow.js +216 -101
- package/esm/HTMLCanvas/HTMLCanvas.js +224 -224
- package/esm/IFrame/IFrame.js +4 -4
- package/esm/Icon/Icon.js +80 -38
- package/esm/IconButton/IconButton.js +30 -12
- package/esm/Image/Image.js +12 -12
- package/esm/ImageCrop/ImageCrop.js +237 -237
- package/esm/ImageEdit/ImageEdit.js +188 -188
- package/esm/ImageGallery/ImageGallery.js +54 -54
- package/esm/ImageList/ImageList.js +12 -12
- package/esm/ImageListItem/ImageListItem.js +8 -8
- package/esm/ImageListItemBox/ImageListItemBox.js +29 -10
- package/esm/Info/Info.js +82 -24
- package/esm/Interaction/Interaction.js +37 -37
- package/esm/Keyframes/Keyframes.js +15 -15
- package/esm/Keyframes/useKeyframes.js +1 -1
- package/esm/Label/Label.js +5 -5
- package/esm/Labels/Labels.js +15 -15
- package/esm/Line/Line.js +9 -9
- package/esm/LineChart/LineChart.js +26 -9
- package/esm/LineChartItem/LineChartItem.js +21 -21
- package/esm/LinearMeter/LinearMeter.js +124 -124
- package/esm/LinearProgress/LinearProgress.js +50 -28
- package/esm/Link/Link.js +58 -21
- package/esm/Links/Links.js +108 -53
- package/esm/List/List.js +11 -11
- package/esm/ListItem/ListItem.js +4 -4
- package/esm/ListSubheader/ListSubheader.js +22 -7
- package/esm/MainProgress/MainProgress.js +6 -6
- package/esm/MainProgress/useMainProgress.js +1 -1
- package/esm/MainProgressMaterial/MainProgressMaterial.js +14 -14
- package/esm/MainProgressMaterial/useMainProgressMaterial.js +1 -1
- package/esm/Markdown/Markdown.js +191 -191
- package/esm/Masonry/Masonry.js +24 -24
- package/esm/Medias/Medias.js +77 -77
- package/esm/Menu/Menu.js +44 -44
- package/esm/MenuDesktop/MenuDesktop.js +116 -93
- package/esm/MenuItem/MenuItem.js +39 -39
- package/esm/Meta/Meta.js +56 -25
- package/esm/Modal/Modal.js +10 -10
- package/esm/ModalFooter/ModalFooter.js +29 -10
- package/esm/ModalHeader/ModalHeader.js +31 -11
- package/esm/ModalIcon/ModalIcon.js +1 -1
- package/esm/ModalMain/ModalMain.js +30 -11
- package/esm/ModalText/ModalText.js +27 -9
- package/esm/ModalTitle/ModalTitle.js +27 -9
- package/esm/MoreOptions/MoreOptions.js +42 -19
- package/esm/Move/Move.js +23 -23
- package/esm/NavigationBar/NavigationBar.js +63 -30
- package/esm/NavigationDrawer/NavigationDrawer.js +11 -11
- package/esm/NavigationItem/NavigationItem.js +25 -25
- package/esm/NavigationRail/NavigationRail.js +66 -37
- package/esm/NotFound/NotFound.js +6 -6
- package/esm/NumericTextField/NumericTextField.js +50 -50
- package/esm/Page/Page.js +5 -5
- package/esm/PageTransition/PageTransition.js +6 -6
- package/esm/Pagination/Pagination.js +120 -53
- package/esm/PaginationItem/PaginationItem.js +49 -21
- package/esm/Parallax/Parallax.js +8 -8
- package/esm/Path/Path.js +21 -6
- package/esm/PieChart/PieChart.js +37 -37
- package/esm/Placeholder/Placeholder.js +58 -17
- package/esm/Portal/Portal.js +1 -1
- package/esm/Properties/Properties.js +50 -20
- package/esm/Property/Property.js +3 -3
- package/esm/Radio/Radio.js +82 -18
- package/esm/Radios/Radios.js +5 -5
- package/esm/Rating/Rating.js +66 -66
- package/esm/Reset/Reset.js +26 -4
- package/esm/Reveal/Reveal.js +7 -7
- package/esm/RichTextEditor/RichTextEditor.js +192 -192
- package/esm/RoundMeter/RoundMeter.js +206 -206
- package/esm/RoundProgress/RoundProgress.js +45 -24
- package/esm/ScatterChart/ScatterChart.js +26 -9
- package/esm/ScatterChartItem/ScatterChartItem.js +14 -14
- package/esm/ScreenCapture/ScreenCapture.js +56 -56
- package/esm/Section/Section.js +12 -12
- package/esm/SectionAction/SectionAction.js +3 -3
- package/esm/SectionBoxes/SectionBoxes.js +13 -13
- package/esm/SectionCards/SectionCards.js +13 -13
- package/esm/SectionCarousel/SectionCarousel.js +14 -14
- package/esm/SectionContact/SectionContact.js +5 -5
- package/esm/SectionImageGallery/SectionImageGallery.js +3 -3
- package/esm/SectionLogos/SectionLogos.js +7 -7
- package/esm/SectionMedia/SectionMedia.js +10 -10
- package/esm/SectionReviews/SectionReviews.js +14 -14
- package/esm/SectionTextMedia/SectionTextMedia.js +9 -9
- package/esm/SectionTimeline/SectionTimeline.js +16 -16
- package/esm/SectionWatch/SectionWatch.js +3 -3
- package/esm/Select/Select.js +88 -88
- package/esm/Share/Share.js +216 -92
- package/esm/Slide/Slide.js +15 -15
- package/esm/Slider/Slider.js +149 -149
- package/esm/SmartTextField/SmartTextField.js +199 -198
- package/esm/Snackbar/Snackbar.js +17 -17
- package/esm/Snackbars/Snackbars.js +40 -40
- package/esm/Snackbars/useSnackbars.js +1 -1
- package/esm/Space/Space.js +755 -480
- package/esm/SpeechToText/SpeechToText.js +25 -25
- package/esm/SpeedDial/SpeedDial.js +68 -40
- package/esm/SpeedDialItem/SpeedDialItem.js +33 -14
- package/esm/SpyScroll/SpyScroll.js +16 -16
- package/esm/Step/Step.js +40 -31
- package/esm/Stepper/Stepper.js +11 -11
- package/esm/Surface/Surface.js +207 -130
- package/esm/Switch/Switch.js +106 -39
- package/esm/Tab/Tab.js +136 -50
- package/esm/Table/Table.js +69 -24
- package/esm/TableBody/TableBody.js +43 -17
- package/esm/TableCell/TableCell.js +25 -25
- package/esm/TableFooter/TableFooter.js +35 -13
- package/esm/TableHead/TableHead.js +14 -14
- package/esm/TableHeader/TableHeader.js +37 -14
- package/esm/TablePagination/TablePagination.js +9 -9
- package/esm/TableRow/TableRow.js +46 -20
- package/esm/Tabs/Tabs.js +38 -38
- package/esm/Text/Text.js +9 -9
- package/esm/TextField/TextField.js +63 -63
- package/esm/TextToSpeech/TextToSpeech.js +20 -20
- package/esm/TimePicker/TimePicker.js +182 -182
- package/esm/TimeRangePicker/TimeRangePicker.js +22 -7
- package/esm/Timeline/Timeline.js +34 -13
- package/esm/TimelineItem/TimelineItem.js +4 -4
- package/esm/Timer/Timer.js +28 -28
- package/esm/ToggleButton/ToggleButton.js +28 -10
- package/esm/ToggleButtons/ToggleButtons.js +23 -9
- package/esm/Tooltip/Tooltip.js +45 -45
- package/esm/TopAppBar/TopAppBar.js +117 -49
- package/esm/Transition/Transition.js +53 -53
- package/esm/Transition/useTransition.js +1 -1
- package/esm/Transitions/Transitions.js +9 -9
- package/esm/Tree/Tree.js +36 -36
- package/esm/Type/Type.js +23 -14
- package/esm/VideoPlayer/VideoPlayer.js +121 -121
- package/esm/ViewSplit/ViewSplit.js +65 -65
- package/esm/Watch/Watch.js +13 -13
- package/esm/Weather/Weather.js +73 -29
- package/esm/Whiteboard/Whiteboard.js +557 -557
- package/esm/Widgets/Widgets.js +29 -29
- package/esm/Widgets/useWidgets.js +1 -1
- package/esm/WindowSplit/WindowSplit.js +51 -51
- package/esm/Zoom/Zoom.js +204 -90
- package/esm/index.js +1 -1
- package/esm/useForm/useForm.js +58 -58
- package/esm/useLocation/useLocation.js +4 -4
- package/esm/useMediaQuery/useMediaQuery.js +2 -2
- package/esm/useOnline/useOnline.js +23 -10
- package/esm/useOpen/useOpen.js +79 -27
- package/esm/useQuery/useQuery.js +11 -1
- package/esm/useResize/useResize.js +30 -14
- package/esm/useScroll/useScroll.js +2 -2
- package/esm/useSubscription/useSubscription.js +73 -21
- package/esm/useSwipe/useSwipe.js +30 -30
- package/esm/useTabs/useTabs.js +22 -7
- package/esm/useVisible/useVisible.js +3 -3
- package/index.js +1 -1
- package/package.json +8 -12
- package/types.d.ts +27 -27
- package/useForm/useForm.d.ts +2 -2
- package/useForm/useForm.js +58 -58
- package/useForm/validate.d.ts +12 -12
- package/useLocation/useLocation.d.ts +1 -1
- package/useLocation/useLocation.js +4 -4
- package/useMediaQuery/useMediaQuery.d.ts +1 -1
- package/useMediaQuery/useMediaQuery.js +2 -2
- package/useOnline/useOnline.js +23 -10
- package/useOpen/useOpen.js +79 -27
- package/useQuery/useQuery.js +11 -1
- package/useResize/useResize.js +30 -14
- package/useScroll/useScroll.d.ts +2 -2
- package/useScroll/useScroll.js +2 -2
- package/useSubscription/useSubscription.js +73 -21
- package/useSwipe/useSwipe.d.ts +2 -2
- package/useSwipe/useSwipe.js +30 -30
- package/useTabs/useTabs.js +22 -7
- package/useVisible/useVisible.d.ts +2 -2
- package/useVisible/useVisible.js +3 -3
package/Chart/Chart.js
CHANGED
|
@@ -278,37 +278,16 @@ const useStyle = (0, _styleReact.style)(theme => ({
|
|
|
278
278
|
name: 'onesy-Chart'
|
|
279
279
|
});
|
|
280
280
|
const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
281
|
-
var _append$values, _append$values2, _append$values3, _append$values4;
|
|
281
|
+
var _theme$ui, _theme$ui2, _theme$elements, _theme$elements2, _theme$elements3, _theme$elements4, _theme$elements5, _theme$elements6, _append$values, _append$values2, _append$values3, _append$values4;
|
|
282
282
|
const theme = (0, _styleReact.useOnesyTheme)();
|
|
283
283
|
const l = theme.l;
|
|
284
|
-
const props =
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}, [theme]);
|
|
292
|
-
const Surface = _react.default.useMemo(() => {
|
|
293
|
-
var _theme$elements2;
|
|
294
|
-
return (theme === null || theme === void 0 || (_theme$elements2 = theme.elements) === null || _theme$elements2 === void 0 ? void 0 : _theme$elements2.Surface) || _Surface.default;
|
|
295
|
-
}, [theme]);
|
|
296
|
-
const Type = _react.default.useMemo(() => {
|
|
297
|
-
var _theme$elements3;
|
|
298
|
-
return (theme === null || theme === void 0 || (_theme$elements3 = theme.elements) === null || _theme$elements3 === void 0 ? void 0 : _theme$elements3.Type) || _Type.default;
|
|
299
|
-
}, [theme]);
|
|
300
|
-
const Path = _react.default.useMemo(() => {
|
|
301
|
-
var _theme$elements4;
|
|
302
|
-
return (theme === null || theme === void 0 || (_theme$elements4 = theme.elements) === null || _theme$elements4 === void 0 ? void 0 : _theme$elements4.Path) || _Path.default;
|
|
303
|
-
}, [theme]);
|
|
304
|
-
const Append = _react.default.useMemo(() => {
|
|
305
|
-
var _theme$elements5;
|
|
306
|
-
return (theme === null || theme === void 0 || (_theme$elements5 = theme.elements) === null || _theme$elements5 === void 0 ? void 0 : _theme$elements5.Append) || _Append.default;
|
|
307
|
-
}, [theme]);
|
|
308
|
-
const Grow = _react.default.useMemo(() => {
|
|
309
|
-
var _theme$elements6;
|
|
310
|
-
return (theme === null || theme === void 0 || (_theme$elements6 = theme.elements) === null || _theme$elements6 === void 0 ? void 0 : _theme$elements6.Grow) || _Grow.default;
|
|
311
|
-
}, [theme]);
|
|
284
|
+
const props = _objectSpread(_objectSpread(_objectSpread({}, theme === null || theme === void 0 || (_theme$ui = theme.ui) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.elements) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.all) === null || _theme$ui === void 0 || (_theme$ui = _theme$ui.props) === null || _theme$ui === void 0 ? void 0 : _theme$ui.default), theme === null || theme === void 0 || (_theme$ui2 = theme.ui) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.elements) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.onesyChart) === null || _theme$ui2 === void 0 || (_theme$ui2 = _theme$ui2.props) === null || _theme$ui2 === void 0 ? void 0 : _theme$ui2.default), props_);
|
|
285
|
+
const Line = (theme === null || theme === void 0 || (_theme$elements = theme.elements) === null || _theme$elements === void 0 ? void 0 : _theme$elements.Line) || _Line.default;
|
|
286
|
+
const Surface = (theme === null || theme === void 0 || (_theme$elements2 = theme.elements) === null || _theme$elements2 === void 0 ? void 0 : _theme$elements2.Surface) || _Surface.default;
|
|
287
|
+
const Type = (theme === null || theme === void 0 || (_theme$elements3 = theme.elements) === null || _theme$elements3 === void 0 ? void 0 : _theme$elements3.Type) || _Type.default;
|
|
288
|
+
const Path = (theme === null || theme === void 0 || (_theme$elements4 = theme.elements) === null || _theme$elements4 === void 0 ? void 0 : _theme$elements4.Path) || _Path.default;
|
|
289
|
+
const Append = (theme === null || theme === void 0 || (_theme$elements5 = theme.elements) === null || _theme$elements5 === void 0 ? void 0 : _theme$elements5.Append) || _Append.default;
|
|
290
|
+
const Grow = (theme === null || theme === void 0 || (_theme$elements6 = theme.elements) === null || _theme$elements6 === void 0 ? void 0 : _theme$elements6.Grow) || _Grow.default;
|
|
312
291
|
const {
|
|
313
292
|
tonal = true,
|
|
314
293
|
color = 'primary',
|
|
@@ -437,13 +416,13 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
437
416
|
const result = [];
|
|
438
417
|
const items = [nameX_, nameY_, tooltip_, tooltipIndividually_, tooltipCloseOnMouseLeave_, elementTooltip_, guidelines_, guidelinesAppend_, guidelinesDisplayInactive_, animate_, animateTimeout_, legend___, labels___, labelsX_, labelsY_, labelDecimalPlaces_, labelsAutoNumber_, labelsYAutoNumber_, labelsXAutoNumber_, marks___, marksX_, marksY_, marksAutoNumber_, marksYAutoNumber_, marksXAutoNumber_, grid___, gridX_, gridY_, gridAutoNumber_, gridYAutoNumber_, gridXAutoNumber_, points___, pointsVisibility_];
|
|
439
418
|
items.forEach(item => {
|
|
440
|
-
if ((0, _utils.is)('object', item)) Object.keys(item).filter(key => theme.breakpoints.media[key]).forEach(
|
|
419
|
+
if ((0, _utils.is)('object', item)) Object.keys(item).filter(key => theme.breakpoints.media[key]).forEach(key_0 => result.push(key_0));
|
|
441
420
|
});
|
|
442
421
|
return (0, _utils.unique)(result);
|
|
443
422
|
}, [nameX_, nameY_, tooltip_, tooltipIndividually_, tooltipCloseOnMouseLeave_, elementTooltip_, guidelines_, guidelinesAppend_, guidelinesDisplayInactive_, animate_, animateTimeout_, legend___, labels___, labelsX_, labelsY_, labelDecimalPlaces_, labelsAutoNumber_, labelsYAutoNumber_, labelsXAutoNumber_, marks___, marksX_, marksY_, marksAutoNumber_, marksYAutoNumber_, marksXAutoNumber_, grid___, gridX_, gridY_, gridAutoNumber_, gridYAutoNumber_, gridXAutoNumber_, points___, pointsVisibility_, borders_, borderStart_, borderLeft_, borderEnd_, borderRight_, borderTop_, borderBottom_, minX_, maxX_, minY_, maxY_, minMaxPadding__, minPadding__, maxPadding__, minPaddingX__, minPaddingY__, maxPaddingX__, maxPaddingY__]);
|
|
444
423
|
const breakpoints = {};
|
|
445
|
-
keys.forEach(
|
|
446
|
-
breakpoints[
|
|
424
|
+
keys.forEach(key_1 => {
|
|
425
|
+
breakpoints[key_1] = (0, _useMediaQuery.default)(theme.breakpoints.media[key_1], {
|
|
447
426
|
element: refs.root.current
|
|
448
427
|
});
|
|
449
428
|
});
|
|
@@ -532,10 +511,10 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
532
511
|
}
|
|
533
512
|
};
|
|
534
513
|
if (!noMain) {
|
|
535
|
-
const allItems = values.flatMap(
|
|
514
|
+
const allItems = values.flatMap(item_0 => (0, _utils.is)('array', item_0.values[0]) ? item_0.values : [item_0.values]);
|
|
536
515
|
if ((0, _utils.is)('array', values)) {
|
|
537
|
-
allItems.forEach(
|
|
538
|
-
const [x, y] =
|
|
516
|
+
allItems.forEach(item_1 => {
|
|
517
|
+
const [x, y] = item_1;
|
|
539
518
|
if (minX === undefined) values_.min.x = Math.min(values_.min.x, x);
|
|
540
519
|
if (maxX === undefined) values_.max.x = Math.max(values_.max.x, x);
|
|
541
520
|
if (minY === undefined) values_.min.y = Math.min(values_.min.y, y);
|
|
@@ -558,43 +537,43 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
558
537
|
return values_;
|
|
559
538
|
}, [values, minX, maxX, minY, maxY, minMaxPadding, minPadding, maxPadding, minPaddingX, minPaddingY, maxPaddingX, maxPaddingY, noMain]);
|
|
560
539
|
refs.minMax.current = minMax;
|
|
561
|
-
const onWrapperMouseEnter =
|
|
540
|
+
const onWrapperMouseEnter = () => {
|
|
562
541
|
if (!refs.guidelinesIn.current) setGuidelineIn(true);
|
|
563
542
|
setHover(true);
|
|
564
|
-
}
|
|
565
|
-
const onWrapperMouseLeave =
|
|
543
|
+
};
|
|
544
|
+
const onWrapperMouseLeave = () => {
|
|
566
545
|
setHover(false);
|
|
567
546
|
setTimeout(() => {
|
|
568
|
-
if (tooltipCloseOnMouseLeave) setAppend(
|
|
547
|
+
if (tooltipCloseOnMouseLeave) setAppend(values__0 => _objectSpread(_objectSpread({}, values__0), {}, {
|
|
569
548
|
open: false
|
|
570
549
|
}));
|
|
571
550
|
if (!guidelinesDisplayInactive) setGuidelineIn(false);
|
|
572
551
|
setGuidelinePosition({});
|
|
573
552
|
});
|
|
574
|
-
}
|
|
553
|
+
};
|
|
575
554
|
const makeGroupTooltip = (x_, y_) => {
|
|
576
|
-
const
|
|
577
|
-
const itemsY = (0, _utils.copy)(
|
|
578
|
-
const
|
|
579
|
-
const
|
|
555
|
+
const items_0 = refs.allValues.current.filter(item_2 => item_2.normalized[0] === x_);
|
|
556
|
+
const itemsY = (0, _utils.copy)(items_0).sort((a, b) => a.normalized[1] - b.normalized[1]);
|
|
557
|
+
const x_0 = x_;
|
|
558
|
+
const y_0 = itemsY[0].normalized[1];
|
|
580
559
|
const groups = {};
|
|
581
|
-
|
|
582
|
-
var
|
|
583
|
-
const color_ = ((
|
|
560
|
+
items_0.forEach(item_3 => {
|
|
561
|
+
var _item_3$item;
|
|
562
|
+
const color_ = ((_item_3$item = item_3.item) === null || _item_3$item === void 0 ? void 0 : _item_3$item.color) || 'primary';
|
|
584
563
|
if (!groups[color_]) groups[color_] = [];
|
|
585
|
-
groups[color_].push(
|
|
564
|
+
groups[color_].push(item_3);
|
|
586
565
|
});
|
|
587
566
|
|
|
588
567
|
// Group sorted by y largest, to smallest
|
|
589
|
-
Object.keys(groups).forEach(group => groups[group].sort((
|
|
590
|
-
var
|
|
591
|
-
return ((
|
|
568
|
+
Object.keys(groups).forEach(group => groups[group].sort((a_0, b_0) => {
|
|
569
|
+
var _a_0$normalized, _b_0$normalized;
|
|
570
|
+
return ((_a_0$normalized = a_0.normalized) === null || _a_0$normalized === void 0 ? void 0 : _a_0$normalized[1]) - ((_b_0$normalized = b_0.normalized) === null || _b_0$normalized === void 0 ? void 0 : _b_0$normalized[1]);
|
|
592
571
|
}));
|
|
593
572
|
|
|
594
573
|
// Groups sorted by y largest, to smallest
|
|
595
|
-
const groupsSorted = Object.keys(groups).sort((
|
|
596
|
-
var _groups$
|
|
597
|
-
return ((_groups$
|
|
574
|
+
const groupsSorted = Object.keys(groups).sort((a_1, b_1) => {
|
|
575
|
+
var _groups$a_1$, _groups$b_1$;
|
|
576
|
+
return ((_groups$a_1$ = groups[a_1][0]) === null || _groups$a_1$ === void 0 || (_groups$a_1$ = _groups$a_1$.normalized) === null || _groups$a_1$ === void 0 ? void 0 : _groups$a_1$[1]) - ((_groups$b_1$ = groups[b_1][0]) === null || _groups$b_1$ === void 0 || (_groups$b_1$ = _groups$b_1$.normalized) === null || _groups$b_1$ === void 0 ? void 0 : _groups$b_1$[1]);
|
|
598
577
|
});
|
|
599
578
|
const element = (0, _utils.is)('function', tooltipGroupRender) ? tooltipGroupRender(groups, groupsSorted) : /*#__PURE__*/_react.default.createElement(Line, {
|
|
600
579
|
tonal: tonal,
|
|
@@ -627,8 +606,8 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
627
606
|
}, (names === null || names === void 0 ? void 0 : names.x) || 'x')), /*#__PURE__*/_react.default.createElement(Line, {
|
|
628
607
|
gap: 1,
|
|
629
608
|
direction: "column"
|
|
630
|
-
}, groupsSorted.map((
|
|
631
|
-
var _groups$
|
|
609
|
+
}, groupsSorted.map((group_0, index) => {
|
|
610
|
+
var _groups$group_0$;
|
|
632
611
|
return /*#__PURE__*/_react.default.createElement(Line, {
|
|
633
612
|
key: index,
|
|
634
613
|
gap: 1,
|
|
@@ -639,7 +618,7 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
639
618
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
640
619
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-append-icon'], classes.append_icon]),
|
|
641
620
|
style: {
|
|
642
|
-
background: !refs.theme.current.palette.color[
|
|
621
|
+
background: !refs.theme.current.palette.color[group_0] ? group_0 : refs.theme.current.palette.color[group_0][((_groups$group_0$ = groups[group_0][0]) === null || _groups$group_0$ === void 0 || (_groups$group_0$ = _groups$group_0$.item) === null || _groups$group_0$ === void 0 ? void 0 : _groups$group_0$.tone) || 'main']
|
|
643
622
|
}
|
|
644
623
|
}), /*#__PURE__*/_react.default.createElement(Line, {
|
|
645
624
|
gap: 0,
|
|
@@ -647,8 +626,8 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
647
626
|
style: {
|
|
648
627
|
width: '100%'
|
|
649
628
|
}
|
|
650
|
-
}, groups[
|
|
651
|
-
var
|
|
629
|
+
}, groups[group_0].map((item_4, index_) => {
|
|
630
|
+
var _item_4$values, _item_4$values2, _item_4$values3, _item_4$values4;
|
|
652
631
|
return /*#__PURE__*/_react.default.createElement(Line, {
|
|
653
632
|
key: index_,
|
|
654
633
|
gap: 1,
|
|
@@ -658,17 +637,17 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
658
637
|
}
|
|
659
638
|
}, /*#__PURE__*/_react.default.createElement(Type, {
|
|
660
639
|
version: "b3"
|
|
661
|
-
}, (0, _utils.is)('function', labelResolve) ? labelResolve(
|
|
640
|
+
}, (0, _utils.is)('function', labelResolve) ? labelResolve(item_4 === null || item_4 === void 0 || (_item_4$values = item_4.values) === null || _item_4$values === void 0 ? void 0 : _item_4$values[1], 'y', item_4, 'group') : item_4 === null || item_4 === void 0 || (_item_4$values2 = item_4.values) === null || _item_4$values2 === void 0 ? void 0 : _item_4$values2[1]), /*#__PURE__*/_react.default.createElement(Type, {
|
|
662
641
|
version: "b3"
|
|
663
|
-
}, (0, _utils.is)('function', labelResolve) ? labelResolve(
|
|
642
|
+
}, (0, _utils.is)('function', labelResolve) ? labelResolve(item_4 === null || item_4 === void 0 || (_item_4$values3 = item_4.values) === null || _item_4$values3 === void 0 ? void 0 : _item_4$values3[0], 'x', item_4, 'group') : item_4 === null || item_4 === void 0 || (_item_4$values4 = item_4.values) === null || _item_4$values4 === void 0 ? void 0 : _item_4$values4[0]));
|
|
664
643
|
})));
|
|
665
644
|
}))));
|
|
666
645
|
const rectSvg = refs.svg.current.getBoundingClientRect();
|
|
667
646
|
const width = 8;
|
|
668
647
|
const height = 8;
|
|
669
648
|
const rect_ = {
|
|
670
|
-
x:
|
|
671
|
-
y:
|
|
649
|
+
x: x_0 + rectSvg.x - width,
|
|
650
|
+
y: y_0 + rectSvg.y - width,
|
|
672
651
|
width,
|
|
673
652
|
height
|
|
674
653
|
};
|
|
@@ -684,69 +663,69 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
684
663
|
};
|
|
685
664
|
_react.default.useEffect(() => {
|
|
686
665
|
var _refs$root$current;
|
|
687
|
-
const onMove = (
|
|
666
|
+
const onMove = (x__0, y__0) => {
|
|
688
667
|
// Only horizontal move at the moment
|
|
689
668
|
// ie. vertical guidelines
|
|
690
669
|
const rectWrapper = refs.rects.current.wrapper;
|
|
691
|
-
const
|
|
692
|
-
let
|
|
693
|
-
const
|
|
670
|
+
const rectSvg_0 = refs.svg.current.getBoundingClientRect();
|
|
671
|
+
let x_1 = (0, _utils.clamp)(x__0 - (rectSvg_0 === null || rectSvg_0 === void 0 ? void 0 : rectSvg_0.x), 0, rectWrapper === null || rectWrapper === void 0 ? void 0 : rectWrapper.width);
|
|
672
|
+
const y_1 = (0, _utils.clamp)(y__0 - (rectSvg_0 === null || rectSvg_0 === void 0 ? void 0 : rectSvg_0.y), 0, rectWrapper === null || rectWrapper === void 0 ? void 0 : rectWrapper.height);
|
|
694
673
|
if (refs.guidelinesAppend.current && ['both', 'vertical'].includes(refs.guidelines.current)) {
|
|
695
674
|
const allValues = refs.allValues.current;
|
|
696
|
-
let
|
|
675
|
+
let index_0;
|
|
697
676
|
let previous;
|
|
698
|
-
let
|
|
677
|
+
let item_5;
|
|
699
678
|
for (let i = 0; i < allValues.length; i++) {
|
|
700
|
-
var _previous,
|
|
679
|
+
var _previous, _item_;
|
|
701
680
|
previous = allValues[i - 1];
|
|
702
|
-
|
|
703
|
-
if (((_previous = previous) === null || _previous === void 0 || (_previous = _previous.normalized) === null || _previous === void 0 ? void 0 : _previous[0]) <=
|
|
704
|
-
|
|
681
|
+
item_5 = allValues[i];
|
|
682
|
+
if (((_previous = previous) === null || _previous === void 0 || (_previous = _previous.normalized) === null || _previous === void 0 ? void 0 : _previous[0]) <= x_1 && x_1 <= ((_item_ = item_5) === null || _item_ === void 0 || (_item_ = _item_.normalized) === null || _item_ === void 0 ? void 0 : _item_[0])) {
|
|
683
|
+
index_0 = i;
|
|
705
684
|
break;
|
|
706
685
|
}
|
|
707
686
|
}
|
|
708
|
-
if (
|
|
687
|
+
if (index_0 === undefined) {
|
|
709
688
|
var _allValues$;
|
|
710
|
-
|
|
711
|
-
previous = allValues[
|
|
712
|
-
|
|
689
|
+
index_0 = x_1 <= ((_allValues$ = allValues[0]) === null || _allValues$ === void 0 || (_allValues$ = _allValues$.normalized) === null || _allValues$ === void 0 ? void 0 : _allValues$[0]) ? 0 : allValues.length - 1;
|
|
690
|
+
previous = allValues[index_0 - 1];
|
|
691
|
+
item_5 = allValues[index_0];
|
|
713
692
|
}
|
|
714
|
-
if (previous ||
|
|
715
|
-
var
|
|
716
|
-
if (!previous)
|
|
717
|
-
const len =
|
|
693
|
+
if (previous || item_5) {
|
|
694
|
+
var _item_5$normalized, _previous$normalized;
|
|
695
|
+
if (!previous) x_1 = (_item_5$normalized = item_5.normalized) === null || _item_5$normalized === void 0 ? void 0 : _item_5$normalized[0];else if (!item_5) x_1 = (_previous$normalized = previous.normalized) === null || _previous$normalized === void 0 ? void 0 : _previous$normalized[0];else {
|
|
696
|
+
const len = item_5.normalized[0] - previous.normalized[0];
|
|
718
697
|
const part = len / 2;
|
|
719
|
-
|
|
698
|
+
x_1 = x_1 < previous.normalized[0] + part ? previous.normalized[0] : item_5.normalized[0];
|
|
720
699
|
}
|
|
721
700
|
}
|
|
722
|
-
makeGroupTooltip(
|
|
701
|
+
makeGroupTooltip(x_1, y_1);
|
|
723
702
|
}
|
|
724
703
|
setGuidelinePosition(value_ => _objectSpread(_objectSpread({}, value_), {}, {
|
|
725
|
-
x,
|
|
726
|
-
y
|
|
704
|
+
x: x_1,
|
|
705
|
+
y: y_1
|
|
727
706
|
}));
|
|
728
707
|
};
|
|
729
708
|
const onMouseMove = event => {
|
|
730
709
|
if (refs.hover.current) {
|
|
731
|
-
const
|
|
732
|
-
const
|
|
733
|
-
onMove(
|
|
710
|
+
const x_2 = event.clientX;
|
|
711
|
+
const y_2 = event.clientY;
|
|
712
|
+
onMove(x_2, y_2);
|
|
734
713
|
}
|
|
735
714
|
};
|
|
736
|
-
const onTouchMove =
|
|
715
|
+
const onTouchMove = event_0 => {
|
|
737
716
|
if (refs.hover.current) {
|
|
738
|
-
const
|
|
739
|
-
const
|
|
740
|
-
onMove(
|
|
717
|
+
const x_3 = event_0.touches[0].clientX;
|
|
718
|
+
const y_3 = event_0.touches[0].clientY;
|
|
719
|
+
onMove(x_3, y_3);
|
|
741
720
|
}
|
|
742
721
|
};
|
|
743
722
|
const method = () => {
|
|
744
723
|
if (refs.wrapper.current) {
|
|
745
|
-
const
|
|
746
|
-
const
|
|
724
|
+
const rectWrapper_0 = refs.wrapper.current.getBoundingClientRect();
|
|
725
|
+
const rectSvg_1 = refs.svg.current.getBoundingClientRect();
|
|
747
726
|
const rects_ = {
|
|
748
|
-
wrapper:
|
|
749
|
-
svg:
|
|
727
|
+
wrapper: rectWrapper_0,
|
|
728
|
+
svg: rectSvg_1
|
|
750
729
|
};
|
|
751
730
|
setRects(rects_);
|
|
752
731
|
if ((0, _utils.is)('function', onUpdateRects)) onUpdateRects(rects_);
|
|
@@ -769,19 +748,19 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
769
748
|
_react.default.useEffect(() => {
|
|
770
749
|
make();
|
|
771
750
|
}, [values, labels__, marks__, grid__, additionalLines__, legend__, visible, guidelinesAppend && guidelinesPosition, rects, theme]);
|
|
772
|
-
const onPointMouseEnter =
|
|
751
|
+
const onPointMouseEnter = values__1 => {
|
|
773
752
|
if (tooltipIndividually) {
|
|
774
|
-
setAppend(_objectSpread(_objectSpread({}, (0, _utils.is)('function', tooltipRender) ? tooltipRender(
|
|
775
|
-
rect:
|
|
753
|
+
setAppend(_objectSpread(_objectSpread({}, (0, _utils.is)('function', tooltipRender) ? tooltipRender(values__1) : values__1), {}, {
|
|
754
|
+
rect: values__1.rect,
|
|
776
755
|
open: true
|
|
777
756
|
}));
|
|
778
757
|
}
|
|
779
|
-
}
|
|
780
|
-
const onPointMouseLeave =
|
|
758
|
+
};
|
|
759
|
+
const onPointMouseLeave = () => {
|
|
781
760
|
setAppend(append_ => _objectSpread(_objectSpread({}, append_), {}, {
|
|
782
761
|
open: false
|
|
783
762
|
}));
|
|
784
|
-
}
|
|
763
|
+
};
|
|
785
764
|
const onLegendClick = value => {
|
|
786
765
|
if (value !== undefined && legendManageVisibility) {
|
|
787
766
|
setVisible(visible_ => _objectSpread(_objectSpread({}, visible_), {}, {
|
|
@@ -789,17 +768,17 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
789
768
|
}));
|
|
790
769
|
}
|
|
791
770
|
};
|
|
792
|
-
const LegendItem =
|
|
771
|
+
const LegendItem = props__ => {
|
|
793
772
|
const {
|
|
794
|
-
item = {},
|
|
773
|
+
item: item_6 = {},
|
|
795
774
|
className: className_
|
|
796
775
|
} = props__,
|
|
797
776
|
other_ = (0, _objectWithoutProperties2.default)(props__, _excluded2);
|
|
798
777
|
const {
|
|
799
|
-
color:
|
|
778
|
+
color: color__0,
|
|
800
779
|
tone = 'main',
|
|
801
780
|
name = 'No name'
|
|
802
|
-
} =
|
|
781
|
+
} = item_6;
|
|
803
782
|
return /*#__PURE__*/_react.default.createElement(Line, (0, _extends2.default)({
|
|
804
783
|
gap: 1,
|
|
805
784
|
direction: "row",
|
|
@@ -809,13 +788,13 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
809
788
|
}, other_), /*#__PURE__*/_react.default.createElement("span", {
|
|
810
789
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-legend-icon'], classes.legend_icon]),
|
|
811
790
|
style: {
|
|
812
|
-
color: !theme.palette.color[
|
|
813
|
-
background: !theme.palette.color[
|
|
791
|
+
color: !theme.palette.color[color__0] ? color__0 : theme.palette.color[color__0][tone],
|
|
792
|
+
background: !theme.palette.color[color__0] ? color__0 : theme.palette.color[color__0][tone]
|
|
814
793
|
}
|
|
815
794
|
}), /*#__PURE__*/_react.default.createElement(Type, {
|
|
816
795
|
version: "b2"
|
|
817
796
|
}, name));
|
|
818
|
-
}
|
|
797
|
+
};
|
|
819
798
|
const make = (valueNew = refs.values.current) => {
|
|
820
799
|
// Make values into x, y, coordinates
|
|
821
800
|
// normalized in rect width, height values
|
|
@@ -823,141 +802,141 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
823
802
|
// invert y so 0, 0 is at bottom left
|
|
824
803
|
if (refs.rects.current && valueNew && !noMain) {
|
|
825
804
|
const {
|
|
826
|
-
width,
|
|
827
|
-
height
|
|
805
|
+
width: width_0,
|
|
806
|
+
height: height_0
|
|
828
807
|
} = refs.rects.current.wrapper;
|
|
829
808
|
|
|
830
809
|
// Labels
|
|
831
810
|
const labels_ = {
|
|
832
|
-
x: (0, _utils.is)('array', labels__ === null || labels__ === void 0 ? void 0 : labels__.x) ? labels__.x : (0, _utils2.minMaxBetweenNumbers)(labelsXAutoNumber !== undefined ? labelsXAutoNumber : labelsAutoNumber !== undefined ? labelsAutoNumber : 10, refs.minMax.current.min.x, refs.minMax.current.max.x).map(
|
|
833
|
-
value:
|
|
834
|
-
label: (0, _utils.castParam)(
|
|
811
|
+
x: (0, _utils.is)('array', labels__ === null || labels__ === void 0 ? void 0 : labels__.x) ? labels__.x : (0, _utils2.minMaxBetweenNumbers)(labelsXAutoNumber !== undefined ? labelsXAutoNumber : labelsAutoNumber !== undefined ? labelsAutoNumber : 10, refs.minMax.current.min.x, refs.minMax.current.max.x).map(item_7 => ({
|
|
812
|
+
value: item_7,
|
|
813
|
+
label: (0, _utils.castParam)(item_7.toFixed(labelDecimalPlaces || 0))
|
|
835
814
|
})),
|
|
836
|
-
y: (0, _utils.is)('array', labels__ === null || labels__ === void 0 ? void 0 : labels__.y) ? labels__.y : (0, _utils2.minMaxBetweenNumbers)(labelsYAutoNumber !== undefined ? labelsYAutoNumber : labelsAutoNumber !== undefined ? labelsAutoNumber : 10, refs.minMax.current.min.y, refs.minMax.current.max.y).map(
|
|
837
|
-
value:
|
|
838
|
-
label: (0, _utils.castParam)(
|
|
815
|
+
y: (0, _utils.is)('array', labels__ === null || labels__ === void 0 ? void 0 : labels__.y) ? labels__.y : (0, _utils2.minMaxBetweenNumbers)(labelsYAutoNumber !== undefined ? labelsYAutoNumber : labelsAutoNumber !== undefined ? labelsAutoNumber : 10, refs.minMax.current.min.y, refs.minMax.current.max.y).map(item_8 => ({
|
|
816
|
+
value: item_8,
|
|
817
|
+
label: (0, _utils.castParam)(item_8.toFixed(labelDecimalPlaces || 0))
|
|
839
818
|
}))
|
|
840
819
|
};
|
|
841
|
-
labels_.x = labels_.x.map(
|
|
842
|
-
percentage: (0, _utils.percentageFromValueWithinRange)(
|
|
820
|
+
labels_.x = labels_.x.map(item_9 => _objectSpread(_objectSpread({}, item_9), {}, {
|
|
821
|
+
percentage: (0, _utils.percentageFromValueWithinRange)(item_9.value, refs.minMax.current.min.x, refs.minMax.current.max.x)
|
|
843
822
|
}));
|
|
844
|
-
labels_.y = labels_.y.map(
|
|
845
|
-
percentage: (0, _utils.percentageFromValueWithinRange)(
|
|
823
|
+
labels_.y = labels_.y.map(item_10 => _objectSpread(_objectSpread({}, item_10), {}, {
|
|
824
|
+
percentage: (0, _utils.percentageFromValueWithinRange)(item_10.value, refs.minMax.current.min.y, refs.minMax.current.max.y)
|
|
846
825
|
}));
|
|
847
826
|
|
|
848
827
|
// Marks
|
|
849
828
|
const marks_ = {
|
|
850
|
-
x: (0, _utils.is)('array', marks__ === null || marks__ === void 0 ? void 0 : marks__.x) ? marks__.x : (0, _utils2.minMaxBetweenNumbers)(marksXAutoNumber !== undefined ? marksXAutoNumber : marksAutoNumber !== undefined ? marksAutoNumber : 10, refs.minMax.current.min.x, refs.minMax.current.max.x).map(
|
|
851
|
-
value:
|
|
829
|
+
x: (0, _utils.is)('array', marks__ === null || marks__ === void 0 ? void 0 : marks__.x) ? marks__.x : (0, _utils2.minMaxBetweenNumbers)(marksXAutoNumber !== undefined ? marksXAutoNumber : marksAutoNumber !== undefined ? marksAutoNumber : 10, refs.minMax.current.min.x, refs.minMax.current.max.x).map(item_11 => ({
|
|
830
|
+
value: item_11
|
|
852
831
|
})),
|
|
853
|
-
y: (0, _utils.is)('array', marks__ === null || marks__ === void 0 ? void 0 : marks__.y) ? marks__.y : (0, _utils2.minMaxBetweenNumbers)(marksYAutoNumber !== undefined ? marksYAutoNumber : marksAutoNumber !== undefined ? marksAutoNumber : 10, refs.minMax.current.min.y, refs.minMax.current.max.y).map(
|
|
854
|
-
value:
|
|
832
|
+
y: (0, _utils.is)('array', marks__ === null || marks__ === void 0 ? void 0 : marks__.y) ? marks__.y : (0, _utils2.minMaxBetweenNumbers)(marksYAutoNumber !== undefined ? marksYAutoNumber : marksAutoNumber !== undefined ? marksAutoNumber : 10, refs.minMax.current.min.y, refs.minMax.current.max.y).map(item_12 => ({
|
|
833
|
+
value: item_12
|
|
855
834
|
}))
|
|
856
835
|
};
|
|
857
|
-
marks_.x = marks_.x.map(
|
|
858
|
-
percentage: (0, _utils.percentageFromValueWithinRange)(
|
|
836
|
+
marks_.x = marks_.x.map(item_13 => _objectSpread(_objectSpread({}, item_13), {}, {
|
|
837
|
+
percentage: (0, _utils.percentageFromValueWithinRange)(item_13.value, refs.minMax.current.min.x, refs.minMax.current.max.x)
|
|
859
838
|
}));
|
|
860
|
-
marks_.y = marks_.y.map(
|
|
861
|
-
percentage: (0, _utils.percentageFromValueWithinRange)(
|
|
839
|
+
marks_.y = marks_.y.map(item_14 => _objectSpread(_objectSpread({}, item_14), {}, {
|
|
840
|
+
percentage: (0, _utils.percentageFromValueWithinRange)(item_14.value, refs.minMax.current.min.y, refs.minMax.current.max.y)
|
|
862
841
|
}));
|
|
863
842
|
|
|
864
843
|
// Grid
|
|
865
844
|
const grid_ = {
|
|
866
|
-
x: (0, _utils.is)('array', grid__ === null || grid__ === void 0 ? void 0 : grid__.x) ? grid__.x : (0, _utils2.minMaxBetweenNumbers)(gridXAutoNumber !== undefined ? gridXAutoNumber : gridAutoNumber !== undefined ? gridAutoNumber : 10, refs.minMax.current.min.x, refs.minMax.current.max.x).map(
|
|
867
|
-
value:
|
|
845
|
+
x: (0, _utils.is)('array', grid__ === null || grid__ === void 0 ? void 0 : grid__.x) ? grid__.x : (0, _utils2.minMaxBetweenNumbers)(gridXAutoNumber !== undefined ? gridXAutoNumber : gridAutoNumber !== undefined ? gridAutoNumber : 10, refs.minMax.current.min.x, refs.minMax.current.max.x).map(item_15 => ({
|
|
846
|
+
value: item_15
|
|
868
847
|
})),
|
|
869
|
-
y: (0, _utils.is)('array', grid__ === null || grid__ === void 0 ? void 0 : grid__.y) ? grid__.y : (0, _utils2.minMaxBetweenNumbers)(gridYAutoNumber !== undefined ? gridYAutoNumber : gridAutoNumber !== undefined ? gridAutoNumber : 10, refs.minMax.current.min.y, refs.minMax.current.max.y).map(
|
|
870
|
-
value:
|
|
848
|
+
y: (0, _utils.is)('array', grid__ === null || grid__ === void 0 ? void 0 : grid__.y) ? grid__.y : (0, _utils2.minMaxBetweenNumbers)(gridYAutoNumber !== undefined ? gridYAutoNumber : gridAutoNumber !== undefined ? gridAutoNumber : 10, refs.minMax.current.min.y, refs.minMax.current.max.y).map(item_16 => ({
|
|
849
|
+
value: item_16
|
|
871
850
|
}))
|
|
872
851
|
};
|
|
873
|
-
grid_.x = grid_.x.map(
|
|
874
|
-
percentage: (0, _utils.percentageFromValueWithinRange)(
|
|
852
|
+
grid_.x = grid_.x.map(item_17 => _objectSpread(_objectSpread({}, item_17), {}, {
|
|
853
|
+
percentage: (0, _utils.percentageFromValueWithinRange)(item_17.value, refs.minMax.current.min.x, refs.minMax.current.max.x)
|
|
875
854
|
}));
|
|
876
|
-
grid_.y = grid_.y.map(
|
|
877
|
-
percentage: (0, _utils.percentageFromValueWithinRange)(
|
|
855
|
+
grid_.y = grid_.y.map(item_18 => _objectSpread(_objectSpread({}, item_18), {}, {
|
|
856
|
+
percentage: (0, _utils.percentageFromValueWithinRange)(item_18.value, refs.minMax.current.min.y, refs.minMax.current.max.y)
|
|
878
857
|
}));
|
|
879
858
|
refs.allValues.current = [];
|
|
880
859
|
|
|
881
860
|
// Points
|
|
882
|
-
const points_ = (0, _utils.copy)(valueNew).flatMap(
|
|
883
|
-
var
|
|
861
|
+
const points_ = (0, _utils.copy)(valueNew).flatMap(item_19 => {
|
|
862
|
+
var _item_19$values;
|
|
884
863
|
const {
|
|
885
|
-
color:
|
|
886
|
-
tone = 'main',
|
|
887
|
-
name
|
|
888
|
-
} =
|
|
889
|
-
const itemValues = ([
|
|
864
|
+
color: color__1,
|
|
865
|
+
tone: tone_0 = 'main',
|
|
866
|
+
name: name_0
|
|
867
|
+
} = item_19;
|
|
868
|
+
const itemValues = ([x_4, y_4, ...args]) => {
|
|
890
869
|
const values__ = {
|
|
891
|
-
x: (0, _utils.percentageFromValueWithinRange)(
|
|
892
|
-
y: (0, _utils.percentageFromValueWithinRange)(
|
|
870
|
+
x: (0, _utils.percentageFromValueWithinRange)(x_4, refs.minMax.current.min.x, refs.minMax.current.max.x),
|
|
871
|
+
y: (0, _utils.percentageFromValueWithinRange)(y_4, refs.minMax.current.min.y, refs.minMax.current.max.y)
|
|
893
872
|
};
|
|
894
|
-
values__.x = (0, _utils.valueFromPercentageWithinRange)(values__.x, 0,
|
|
895
|
-
values__.y = (0, _utils.valueFromPercentageWithinRange)(values__.y, 0,
|
|
896
|
-
if (refs.visible.current[
|
|
873
|
+
values__.x = (0, _utils.valueFromPercentageWithinRange)(values__.x, 0, width_0);
|
|
874
|
+
values__.y = (0, _utils.valueFromPercentageWithinRange)(values__.y, 0, height_0);
|
|
875
|
+
if (refs.visible.current[name_0] !== false) {
|
|
897
876
|
refs.allValues.current.push({
|
|
898
|
-
item,
|
|
899
|
-
values: [
|
|
900
|
-
normalized: [values__.x,
|
|
877
|
+
item: item_19,
|
|
878
|
+
values: [x_4, y_4, ...args],
|
|
879
|
+
normalized: [values__.x, height_0 - values__.y].map(item_ => Math.abs(item_))
|
|
901
880
|
});
|
|
902
881
|
}
|
|
903
882
|
return {
|
|
904
|
-
values: [
|
|
905
|
-
normalized: [values__.x,
|
|
883
|
+
values: [x_4, y_4, ...args],
|
|
884
|
+
normalized: [values__.x, height_0 - values__.y].map(item__0 => Math.abs(item__0))
|
|
906
885
|
};
|
|
907
886
|
};
|
|
908
|
-
const itemArrayNested = (0, _utils.is)('array', (
|
|
909
|
-
const
|
|
887
|
+
const itemArrayNested = (0, _utils.is)('array', (_item_19$values = item_19.values) === null || _item_19$values === void 0 ? void 0 : _item_19$values[0]);
|
|
888
|
+
const values__2 = itemArrayNested ? (0, _utils.copy)(item_19.values)
|
|
910
889
|
// Sort for x from smallest to largest
|
|
911
|
-
.sort((
|
|
912
|
-
return
|
|
913
|
-
key:
|
|
890
|
+
.sort((a_2, b_2) => a_2[0] - b_2[0]).map(itemValues) : [itemValues(item_19.values)];
|
|
891
|
+
return values__2.map((item__1, index_1) => /*#__PURE__*/_react.default.createElement(Path, (0, _extends2.default)({
|
|
892
|
+
key: index_1,
|
|
914
893
|
Component: "circle",
|
|
915
894
|
r: 4,
|
|
916
|
-
cx:
|
|
917
|
-
cy:
|
|
918
|
-
fill: !theme.palette.color[
|
|
895
|
+
cx: item__1.normalized[0],
|
|
896
|
+
cy: item__1.normalized[1],
|
|
897
|
+
fill: !theme.palette.color[color__1] ? color__1 : theme.palette.color[color__1][tone_0],
|
|
919
898
|
stroke: "none"
|
|
920
899
|
}, !elementTooltip ? {
|
|
921
|
-
onMouseEnter:
|
|
922
|
-
const
|
|
900
|
+
onMouseEnter: event_1 => {
|
|
901
|
+
const rect__0 = event_1.target.getBoundingClientRect();
|
|
923
902
|
onPointMouseEnter({
|
|
924
|
-
values:
|
|
925
|
-
rect:
|
|
903
|
+
values: item__1.values,
|
|
904
|
+
rect: rect__0
|
|
926
905
|
});
|
|
927
906
|
},
|
|
928
907
|
onMouseLeave: onPointMouseLeave
|
|
929
908
|
} : undefined, PointProps, {
|
|
930
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-point'], PointProps === null || PointProps === void 0 ? void 0 : PointProps.className, classes.point, classes[`point_visibility_${pointsVisibility}`], refs.guidelinesAppend.current && refs.guidelinesPosition.current.x ===
|
|
931
|
-
style: _objectSpread(_objectSpread({}, refs.visible.current[
|
|
909
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-point'], PointProps === null || PointProps === void 0 ? void 0 : PointProps.className, classes.point, classes[`point_visibility_${pointsVisibility}`], refs.guidelinesAppend.current && refs.guidelinesPosition.current.x === item__1.normalized[0] && classes.point_active]),
|
|
910
|
+
style: _objectSpread(_objectSpread({}, refs.visible.current[name_0] === false ? {
|
|
932
911
|
opacity: 0,
|
|
933
912
|
pointerEvents: 'none'
|
|
934
913
|
} : undefined), PointProps === null || PointProps === void 0 ? void 0 : PointProps.style)
|
|
935
914
|
})));
|
|
936
915
|
});
|
|
937
|
-
refs.allValues.current.sort((
|
|
916
|
+
refs.allValues.current.sort((a_3, b_3) => (a_3 === null || a_3 === void 0 ? void 0 : a_3.normalized[0]) - (b_3 === null || b_3 === void 0 ? void 0 : b_3.normalized[0]));
|
|
938
917
|
|
|
939
918
|
// Guidelines
|
|
940
|
-
const additionalLines_ = additionalLines__ && additionalLines__.map((
|
|
919
|
+
const additionalLines_ = additionalLines__ && additionalLines__.map((item_20, index_2) => {
|
|
941
920
|
const {
|
|
942
|
-
color:
|
|
943
|
-
tone = 'main',
|
|
921
|
+
color: color__2,
|
|
922
|
+
tone: tone_1 = 'main',
|
|
944
923
|
style
|
|
945
|
-
} =
|
|
946
|
-
const
|
|
947
|
-
x1: (0, _utils.percentageFromValueWithinRange)(
|
|
948
|
-
y1: (0, _utils.percentageFromValueWithinRange)(
|
|
949
|
-
x2: (0, _utils.percentageFromValueWithinRange)(
|
|
950
|
-
y2: (0, _utils.percentageFromValueWithinRange)(
|
|
924
|
+
} = item_20;
|
|
925
|
+
const values__3 = {
|
|
926
|
+
x1: (0, _utils.percentageFromValueWithinRange)(item_20.x1, refs.minMax.current.min.x, refs.minMax.current.max.x),
|
|
927
|
+
y1: (0, _utils.percentageFromValueWithinRange)(item_20.y1, refs.minMax.current.min.y, refs.minMax.current.max.y),
|
|
928
|
+
x2: (0, _utils.percentageFromValueWithinRange)(item_20.x2, refs.minMax.current.min.x, refs.minMax.current.max.x),
|
|
929
|
+
y2: (0, _utils.percentageFromValueWithinRange)(item_20.y2, refs.minMax.current.min.y, refs.minMax.current.max.y)
|
|
951
930
|
};
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
931
|
+
values__3.x1 = (0, _utils.valueFromPercentageWithinRange)(values__3.x1, 0, width_0);
|
|
932
|
+
values__3.y1 = (0, _utils.valueFromPercentageWithinRange)(values__3.y1, 0, height_0);
|
|
933
|
+
values__3.x2 = (0, _utils.valueFromPercentageWithinRange)(values__3.x2, 0, width_0);
|
|
934
|
+
values__3.y2 = (0, _utils.valueFromPercentageWithinRange)(values__3.y2, 0, height_0);
|
|
956
935
|
return /*#__PURE__*/_react.default.createElement(Path, (0, _extends2.default)({
|
|
957
|
-
key:
|
|
958
|
-
d: `M ${
|
|
936
|
+
key: index_2,
|
|
937
|
+
d: `M ${values__3.x1} ${height_0 - values__3.y1} L ${values__3.x2} ${height_0 - values__3.y2}`,
|
|
959
938
|
fill: "none",
|
|
960
|
-
stroke: !theme.palette.color[
|
|
939
|
+
stroke: !theme.palette.color[color__2] ? color__2 : theme.palette.color[color__2][tone_1]
|
|
961
940
|
}, AdditionalLineProps, {
|
|
962
941
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-additional-lines'], AdditionalLineProps === null || AdditionalLineProps === void 0 ? void 0 : AdditionalLineProps.className, classes.additionalLines]),
|
|
963
942
|
style: _objectSpread(_objectSpread({}, style), AdditionalLineProps === null || AdditionalLineProps === void 0 ? void 0 : AdditionalLineProps.style)
|
|
@@ -984,16 +963,16 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
984
963
|
const legend_ = legend__ !== 'auto' ? legend__ : [];
|
|
985
964
|
if (legend__ === 'auto') {
|
|
986
965
|
const map = {};
|
|
987
|
-
values.forEach(
|
|
988
|
-
const
|
|
989
|
-
if (!map[
|
|
966
|
+
values.forEach(item_21 => {
|
|
967
|
+
const name_1 = (item_21 === null || item_21 === void 0 ? void 0 : item_21.name) || '';
|
|
968
|
+
if (!map[name_1]) {
|
|
990
969
|
legend_.push({
|
|
991
|
-
item,
|
|
970
|
+
item: item_21,
|
|
992
971
|
element: /*#__PURE__*/_react.default.createElement(LegendItem, {
|
|
993
|
-
item:
|
|
972
|
+
item: item_21
|
|
994
973
|
})
|
|
995
974
|
});
|
|
996
|
-
map[
|
|
975
|
+
map[name_1] = true;
|
|
997
976
|
}
|
|
998
977
|
});
|
|
999
978
|
}
|
|
@@ -1002,11 +981,11 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
1002
981
|
if ((0, _utils.is)('array', legend_)) setLegend(legend_);
|
|
1003
982
|
};
|
|
1004
983
|
return /*#__PURE__*/_react.default.createElement(Surface, (0, _extends2.default)({
|
|
1005
|
-
ref:
|
|
984
|
+
ref: item_22 => {
|
|
1006
985
|
if (ref) {
|
|
1007
|
-
if ((0, _utils.is)('function', ref)) ref(
|
|
986
|
+
if ((0, _utils.is)('function', ref)) ref(item_22);else ref.current = item_22;
|
|
1008
987
|
}
|
|
1009
|
-
refs.root.current =
|
|
988
|
+
refs.root.current = item_22;
|
|
1010
989
|
},
|
|
1011
990
|
tonal: tonal,
|
|
1012
991
|
color: color,
|
|
@@ -1041,13 +1020,13 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
1041
1020
|
}, LegendProps, {
|
|
1042
1021
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-legend', `onesy-Chart-legend-position-${legendPosition}`], LegendProps === null || LegendProps === void 0 ? void 0 : LegendProps.className, classes.legend, classes[`legend_position_${legendPosition}`], (labels === null || labels === void 0 ? void 0 : labels.y) && labelsY && classes.legend_offset_labels_y, (names === null || names === void 0 ? void 0 : names.y) && nameY && classes.legend_offset_names_y])
|
|
1043
1022
|
}), legend.map(({
|
|
1044
|
-
item,
|
|
1045
|
-
element
|
|
1023
|
+
item: item_23,
|
|
1024
|
+
element: element_0
|
|
1046
1025
|
}) => {
|
|
1047
|
-
var
|
|
1048
|
-
return /*#__PURE__*/_react.default.cloneElement(
|
|
1049
|
-
onClick: () => onLegendClick(
|
|
1050
|
-
className: (0, _styleReact.classNames)([
|
|
1026
|
+
var _element_0$props;
|
|
1027
|
+
return /*#__PURE__*/_react.default.cloneElement(element_0, {
|
|
1028
|
+
onClick: () => onLegendClick(item_23.name),
|
|
1029
|
+
className: (0, _styleReact.classNames)([element_0 === null || element_0 === void 0 || (_element_0$props = element_0.props) === null || _element_0$props === void 0 ? void 0 : _element_0$props.className, legendManageVisibility && classes.legend_item_manage_visibility, refs.visible.current[item_23.name] === false && classes.legend_item_hidden])
|
|
1051
1030
|
});
|
|
1052
1031
|
})), /*#__PURE__*/_react.default.createElement(Line, (0, _extends2.default)({
|
|
1053
1032
|
ref: refs.wrapper
|
|
@@ -1057,7 +1036,7 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
1057
1036
|
tonal: tonal,
|
|
1058
1037
|
color: color
|
|
1059
1038
|
}, ({
|
|
1060
|
-
color:
|
|
1039
|
+
color: color__3,
|
|
1061
1040
|
backgroundColor,
|
|
1062
1041
|
palette
|
|
1063
1042
|
}) => {
|
|
@@ -1067,11 +1046,11 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
1067
1046
|
direction: "row",
|
|
1068
1047
|
align: "flex-start",
|
|
1069
1048
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grids', 'onesy-Chart-grids-x'], classes.grids, classes.grids_x])
|
|
1070
|
-
}, grid.x.map((
|
|
1071
|
-
key:
|
|
1049
|
+
}, grid.x.map((item_24, index_3) => /*#__PURE__*/_react.default.createElement("div", {
|
|
1050
|
+
key: index_3,
|
|
1072
1051
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grid', 'onesy-Chart-grid-x'], classes.grid, classes.grid_x]),
|
|
1073
1052
|
style: {
|
|
1074
|
-
left: `${
|
|
1053
|
+
left: `${item_24.percentage}%`
|
|
1075
1054
|
}
|
|
1076
1055
|
}))), !!grid__ && gridY && (grid === null || grid === void 0 ? void 0 : grid.y) && /*#__PURE__*/_react.default.createElement(Line, {
|
|
1077
1056
|
gap: 0,
|
|
@@ -1079,11 +1058,11 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
1079
1058
|
align: "flex-end",
|
|
1080
1059
|
justify: "center",
|
|
1081
1060
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grids', 'onesy-Chart-grids-y'], classes.grids, classes.grids_y])
|
|
1082
|
-
}, grid.y.map((
|
|
1083
|
-
key:
|
|
1061
|
+
}, grid.y.map((item_25, index_4) => /*#__PURE__*/_react.default.createElement("div", {
|
|
1062
|
+
key: index_4,
|
|
1084
1063
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grid', 'onesy-Chart-grid-y'], classes.grid, classes.grid_y]),
|
|
1085
1064
|
style: {
|
|
1086
|
-
bottom: `${
|
|
1065
|
+
bottom: `${item_25.percentage}%`
|
|
1087
1066
|
}
|
|
1088
1067
|
}))), /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
|
|
1089
1068
|
ref: refs.svg,
|
|
@@ -1097,66 +1076,66 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
1097
1076
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-svg'], SvgProps === null || SvgProps === void 0 ? void 0 : SvgProps.className, classes.svg])
|
|
1098
1077
|
}), /*#__PURE__*/_react.default.createElement("defs", {
|
|
1099
1078
|
ref: refs.defs
|
|
1100
|
-
}, defs && defs.map((
|
|
1101
|
-
key:
|
|
1079
|
+
}, defs && defs.map((item_26, index_5) => (/*#__PURE__*/_react.default.cloneElement(item_26, {
|
|
1080
|
+
key: index_5
|
|
1102
1081
|
})))), pre, elements && elements.map(({
|
|
1103
|
-
item,
|
|
1104
|
-
element
|
|
1105
|
-
},
|
|
1082
|
+
item: item_27,
|
|
1083
|
+
element: element_1
|
|
1084
|
+
}, index_6) => {
|
|
1106
1085
|
var _props;
|
|
1107
|
-
const isVisible = visible[
|
|
1108
|
-
return /*#__PURE__*/_react.default.cloneElement(
|
|
1109
|
-
key:
|
|
1086
|
+
const isVisible = visible[item_27 === null || item_27 === void 0 ? void 0 : item_27.name] === undefined || !!visible[item_27 === null || item_27 === void 0 ? void 0 : item_27.name];
|
|
1087
|
+
return /*#__PURE__*/_react.default.cloneElement(element_1, _objectSpread(_objectSpread({
|
|
1088
|
+
key: index_6
|
|
1110
1089
|
}, elementTooltip ? {
|
|
1111
|
-
onMouseEnter:
|
|
1112
|
-
const
|
|
1113
|
-
onPointMouseEnter(_objectSpread(_objectSpread({},
|
|
1114
|
-
rect:
|
|
1090
|
+
onMouseEnter: event_2 => {
|
|
1091
|
+
const rect__1 = event_2.target.getBoundingClientRect();
|
|
1092
|
+
onPointMouseEnter(_objectSpread(_objectSpread({}, item_27), {}, {
|
|
1093
|
+
rect: rect__1
|
|
1115
1094
|
}));
|
|
1116
1095
|
},
|
|
1117
1096
|
onMouseLeave: onPointMouseLeave
|
|
1118
1097
|
} : undefined), {}, {
|
|
1119
|
-
style: _objectSpread(_objectSpread({},
|
|
1098
|
+
style: _objectSpread(_objectSpread({}, element_1 === null || element_1 === void 0 || (_props = element_1.props) === null || _props === void 0 ? void 0 : _props.style), !isVisible ? {
|
|
1120
1099
|
opacity: '0',
|
|
1121
1100
|
pointerEvents: 'none'
|
|
1122
1101
|
} : undefined)
|
|
1123
1102
|
}));
|
|
1124
|
-
}), children && _react.default.Children.toArray(children).map((
|
|
1125
|
-
var
|
|
1126
|
-
const
|
|
1127
|
-
return /*#__PURE__*/_react.default.cloneElement(
|
|
1128
|
-
key:
|
|
1103
|
+
}), children && _react.default.Children.toArray(children).map((element_2, index_7) => {
|
|
1104
|
+
var _element_2$props, _element_2$props2, _props2;
|
|
1105
|
+
const isVisible_0 = visible[(_element_2$props = element_2.props) === null || _element_2$props === void 0 ? void 0 : _element_2$props.name] === undefined || !!visible[(_element_2$props2 = element_2.props) === null || _element_2$props2 === void 0 ? void 0 : _element_2$props2.name];
|
|
1106
|
+
return /*#__PURE__*/_react.default.cloneElement(element_2, _objectSpread(_objectSpread({
|
|
1107
|
+
key: index_7,
|
|
1129
1108
|
refs: {
|
|
1130
1109
|
wrapper: refs.wrapper.current,
|
|
1131
1110
|
defs: refs.defs.current
|
|
1132
1111
|
},
|
|
1133
1112
|
rects,
|
|
1134
|
-
animate:
|
|
1135
|
-
animateTimeout:
|
|
1113
|
+
animate: element_2.props.animate !== undefined ? element_2.props.animate : animate,
|
|
1114
|
+
animateTimeout: element_2.props.animateTimeout !== undefined ? element_2.props.animateTimeout : animateTimeout,
|
|
1136
1115
|
updateDefs: setDefs,
|
|
1137
1116
|
updateLegend: setLegend
|
|
1138
1117
|
}, elementTooltip ? {
|
|
1139
|
-
onMouseEnter:
|
|
1140
|
-
const
|
|
1141
|
-
onPointMouseEnter(_objectSpread(_objectSpread({},
|
|
1142
|
-
rect:
|
|
1118
|
+
onMouseEnter: event_3 => {
|
|
1119
|
+
const rect__2 = event_3.target.getBoundingClientRect();
|
|
1120
|
+
onPointMouseEnter(_objectSpread(_objectSpread({}, element_2.props), {}, {
|
|
1121
|
+
rect: rect__2
|
|
1143
1122
|
}));
|
|
1144
1123
|
},
|
|
1145
1124
|
onMouseLeave: onPointMouseLeave
|
|
1146
1125
|
} : undefined), {}, {
|
|
1147
|
-
minMax:
|
|
1148
|
-
minX:
|
|
1149
|
-
maxX:
|
|
1150
|
-
minY:
|
|
1151
|
-
maxY:
|
|
1152
|
-
minMaxPadding:
|
|
1153
|
-
minPadding:
|
|
1154
|
-
maxPadding:
|
|
1155
|
-
minPaddingX:
|
|
1156
|
-
minPaddingY:
|
|
1157
|
-
maxPaddingX:
|
|
1158
|
-
maxPaddingY:
|
|
1159
|
-
style: _objectSpread(_objectSpread({},
|
|
1126
|
+
minMax: element_2.props.minMax !== undefined ? element_2.props.minMax : minMax,
|
|
1127
|
+
minX: element_2.props.minX !== undefined ? element_2.props.minX : minX,
|
|
1128
|
+
maxX: element_2.props.maxX !== undefined ? element_2.props.maxX : maxX,
|
|
1129
|
+
minY: element_2.props.minY !== undefined ? element_2.props.minY : minY,
|
|
1130
|
+
maxY: element_2.props.maxY !== undefined ? element_2.props.maxY : maxY,
|
|
1131
|
+
minMaxPadding: element_2.props.minMaxPadding !== undefined ? element_2.props.minMaxPadding : minMaxPadding,
|
|
1132
|
+
minPadding: element_2.props.minPadding !== undefined ? element_2.props.minPadding : minPadding,
|
|
1133
|
+
maxPadding: element_2.props.maxPadding !== undefined ? element_2.props.maxPadding : maxPadding,
|
|
1134
|
+
minPaddingX: element_2.props.minPaddingX !== undefined ? element_2.props.minPaddingX : minPaddingX,
|
|
1135
|
+
minPaddingY: element_2.props.minPaddingY !== undefined ? element_2.props.minPaddingY : minPaddingY,
|
|
1136
|
+
maxPaddingX: element_2.props.maxPaddingX !== undefined ? element_2.props.maxPaddingX : maxPaddingX,
|
|
1137
|
+
maxPaddingY: element_2.props.maxPaddingY !== undefined ? element_2.props.maxPaddingY : maxPaddingY,
|
|
1138
|
+
style: _objectSpread(_objectSpread({}, element_2 === null || element_2 === void 0 || (_props2 = element_2.props) === null || _props2 === void 0 ? void 0 : _props2.style), !isVisible_0 ? {
|
|
1160
1139
|
opacity: '0',
|
|
1161
1140
|
pointerEvents: 'none'
|
|
1162
1141
|
} : undefined)
|
|
@@ -1173,8 +1152,8 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
1173
1152
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-guidelines', 'onesy-Chart-guidelines-horizontal'], GuidelineProps === null || GuidelineProps === void 0 ? void 0 : GuidelineProps.className, classes.guidelines, classes.guidelines_horizontal])
|
|
1174
1153
|
}))), points__ && points && /*#__PURE__*/_react.default.createElement("g", (0, _extends2.default)({}, PointsProps, {
|
|
1175
1154
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-points'], PointsProps === null || PointsProps === void 0 ? void 0 : PointsProps.className, classes.points])
|
|
1176
|
-
}), points.map((
|
|
1177
|
-
key:
|
|
1155
|
+
}), points.map((item_28, index_8) => (/*#__PURE__*/_react.default.cloneElement(item_28, {
|
|
1156
|
+
key: index_8
|
|
1178
1157
|
}))))), borders && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, borderTop && /*#__PURE__*/_react.default.createElement("div", {
|
|
1179
1158
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-x', 'onesy-Chart-border-top'], classes.border, classes.borderX, classes.borderTop])
|
|
1180
1159
|
}), borderBottom && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1192,65 +1171,65 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
1192
1171
|
direction: "row",
|
|
1193
1172
|
align: "flex-start",
|
|
1194
1173
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-labels', 'onesy-Chart-labels-x'], classes.labels, classes.labels_x])
|
|
1195
|
-
}, labels.x.map((
|
|
1174
|
+
}, labels.x.map((item_29, index_9) => {
|
|
1196
1175
|
const itemProps = {
|
|
1197
|
-
key:
|
|
1176
|
+
key: index_9,
|
|
1198
1177
|
version: 'b3',
|
|
1199
1178
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-x'], classes.label, classes.label_x]),
|
|
1200
1179
|
style: {
|
|
1201
|
-
left: `${
|
|
1180
|
+
left: `${item_29.percentage}%`
|
|
1202
1181
|
}
|
|
1203
1182
|
};
|
|
1204
|
-
return (0, _utils.is)('function', labelRender) ? labelRender(_objectSpread(_objectSpread({},
|
|
1183
|
+
return (0, _utils.is)('function', labelRender) ? labelRender(_objectSpread(_objectSpread({}, item_29), {}, {
|
|
1205
1184
|
axis: 'x',
|
|
1206
1185
|
props: itemProps
|
|
1207
1186
|
})) : /*#__PURE__*/_react.default.createElement(Type, {
|
|
1208
|
-
key:
|
|
1187
|
+
key: index_9,
|
|
1209
1188
|
version: "b3",
|
|
1210
1189
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-x'], classes.label, classes.label_x]),
|
|
1211
1190
|
style: {
|
|
1212
|
-
left: `${
|
|
1191
|
+
left: `${item_29.percentage}%`
|
|
1213
1192
|
}
|
|
1214
|
-
}, (0, _utils.is)('function', labelResolve) ? labelResolve(
|
|
1193
|
+
}, (0, _utils.is)('function', labelResolve) ? labelResolve(item_29.label, 'x', item_29) : item_29.label);
|
|
1215
1194
|
})), !!labels__ && labelsY && (labels === null || labels === void 0 ? void 0 : labels.y) && /*#__PURE__*/_react.default.createElement(Line, {
|
|
1216
1195
|
gap: 0,
|
|
1217
1196
|
direction: "column",
|
|
1218
1197
|
align: "flex-end",
|
|
1219
1198
|
justify: "center",
|
|
1220
1199
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-labels', 'onesy-Chart-labels-y'], classes.labels, classes.labels_y])
|
|
1221
|
-
}, labels.y.map((
|
|
1200
|
+
}, labels.y.map((item_30, index_10) => (0, _utils.is)('function', labelRender) ? labelRender(_objectSpread(_objectSpread({}, item_30), {}, {
|
|
1222
1201
|
axis: 'y'
|
|
1223
1202
|
})) : /*#__PURE__*/_react.default.createElement(Type, {
|
|
1224
|
-
key:
|
|
1203
|
+
key: index_10,
|
|
1225
1204
|
version: "b3",
|
|
1226
1205
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-y'], classes.label, classes.label_y]),
|
|
1227
1206
|
style: {
|
|
1228
|
-
bottom: `${
|
|
1207
|
+
bottom: `${item_30.percentage}%`
|
|
1229
1208
|
}
|
|
1230
|
-
}, (0, _utils.is)('function', labelResolve) ? labelResolve(
|
|
1209
|
+
}, (0, _utils.is)('function', labelResolve) ? labelResolve(item_30.label, 'y', item_30) : item_30.label))), !!marks__ && marksX && (marks === null || marks === void 0 ? void 0 : marks.x) && /*#__PURE__*/_react.default.createElement(Line, {
|
|
1231
1210
|
gap: 0,
|
|
1232
1211
|
direction: "row",
|
|
1233
1212
|
align: "flex-start",
|
|
1234
1213
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-marks', 'onesy-Chart-marks-x'], classes.marks, classes.marks_x])
|
|
1235
|
-
}, marks.x.map((
|
|
1236
|
-
key:
|
|
1214
|
+
}, marks.x.map((item_31, index_11) => /*#__PURE__*/_react.default.createElement("span", {
|
|
1215
|
+
key: index_11,
|
|
1237
1216
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-mark', 'onesy-Chart-mark-x'], classes.mark, classes.mark_x]),
|
|
1238
1217
|
style: {
|
|
1239
|
-
left: `${
|
|
1218
|
+
left: `${item_31.percentage}%`
|
|
1240
1219
|
}
|
|
1241
|
-
},
|
|
1220
|
+
}, item_31.mark))), !!marks__ && marksY && (marks === null || marks === void 0 ? void 0 : marks.y) && /*#__PURE__*/_react.default.createElement(Line, {
|
|
1242
1221
|
gap: 0,
|
|
1243
1222
|
direction: "column",
|
|
1244
1223
|
align: "flex-end",
|
|
1245
1224
|
justify: "center",
|
|
1246
1225
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-marks', 'onesy-Chart-marks-y'], classes.marks, classes.marks_y])
|
|
1247
|
-
}, marks.y.map((
|
|
1248
|
-
key:
|
|
1226
|
+
}, marks.y.map((item_32, index_12) => /*#__PURE__*/_react.default.createElement("span", {
|
|
1227
|
+
key: index_12,
|
|
1249
1228
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-mark', 'onesy-Chart-mark-y'], classes.mark, classes.mark_y]),
|
|
1250
1229
|
style: {
|
|
1251
|
-
bottom: `${
|
|
1230
|
+
bottom: `${item_32.percentage}%`
|
|
1252
1231
|
}
|
|
1253
|
-
},
|
|
1232
|
+
}, item_32.mark))), (names === null || names === void 0 ? void 0 : names.x) && nameX && /*#__PURE__*/_react.default.createElement(Type, {
|
|
1254
1233
|
version: "b2",
|
|
1255
1234
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-name', 'onesy-Chart-name-x'], classes.name, classes.name_x])
|
|
1256
1235
|
}, names.x), (names === null || names === void 0 ? void 0 : names.y) && nameY && /*#__PURE__*/_react.default.createElement(Type, {
|
|
@@ -1266,13 +1245,13 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
1266
1245
|
}, LegendProps, {
|
|
1267
1246
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-legend', `onesy-Chart-legend-position-${legendPosition}`], LegendProps === null || LegendProps === void 0 ? void 0 : LegendProps.className, classes.legend, classes[`legend_position_${legendPosition}`], (labels === null || labels === void 0 ? void 0 : labels.y) && labelsY && classes.legend_offset_labels_y, (names === null || names === void 0 ? void 0 : names.y) && nameY && classes.legend_offset_names_y])
|
|
1268
1247
|
}), legend.map(({
|
|
1269
|
-
item,
|
|
1270
|
-
element
|
|
1248
|
+
item: item_33,
|
|
1249
|
+
element: element_3
|
|
1271
1250
|
}) => {
|
|
1272
|
-
var
|
|
1273
|
-
return /*#__PURE__*/_react.default.cloneElement(
|
|
1274
|
-
onClick: () => onLegendClick(
|
|
1275
|
-
className: (0, _styleReact.classNames)([
|
|
1251
|
+
var _element_3$props;
|
|
1252
|
+
return /*#__PURE__*/_react.default.cloneElement(element_3, {
|
|
1253
|
+
onClick: () => onLegendClick(item_33.name),
|
|
1254
|
+
className: (0, _styleReact.classNames)([element_3 === null || element_3 === void 0 || (_element_3$props = element_3.props) === null || _element_3$props === void 0 ? void 0 : _element_3$props.className, legendManageVisibility && classes.legend_item_manage_visibility, refs.visible.current[item_33.name] === false && classes.legend_item_hidden])
|
|
1276
1255
|
});
|
|
1277
1256
|
})), tooltip && /*#__PURE__*/_react.default.createElement(Append, (0, _extends2.default)({
|
|
1278
1257
|
open: true,
|