@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/Chart/Chart.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", "title", "subtitle", "values", "pre", "elements", "names", "nameX", "nameY", "tooltip", "tooltipIndividually", "tooltipCloseOnMouseLeave", "elementTooltip", "guidelines", "guidelinesAppend", "guidelinesDisplayInactive", "additionalLines", "legend", "legendManageVisibility", "legendPosition", "animate", "animateTimeout", "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", "noMain", "tooltipRender", "tooltipGroupRender", "labelRender", "labelResolve", "onUpdateRects", "Component", "SvgProps", "TypeProps", "TitleProps", "SubtitleProps", "PointsProps", "PointProps", "HeaderProps", "AppendProps", "AdditionalLineProps", "AdditionalLinesProps", "LegendProps", "LegendItemProps", "GuidelineProps", "WrapperProps", "className", "children"],
|
|
3
|
+
const _excluded = ["ref", "tonal", "color", "title", "subtitle", "values", "pre", "elements", "names", "nameX", "nameY", "tooltip", "tooltipIndividually", "tooltipCloseOnMouseLeave", "elementTooltip", "guidelines", "guidelinesAppend", "guidelinesDisplayInactive", "additionalLines", "legend", "legendManageVisibility", "legendPosition", "animate", "animateTimeout", "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", "noMain", "tooltipRender", "tooltipGroupRender", "labelRender", "labelResolve", "onUpdateRects", "Component", "SvgProps", "TypeProps", "TitleProps", "SubtitleProps", "PointsProps", "PointProps", "HeaderProps", "AppendProps", "AdditionalLineProps", "AdditionalLinesProps", "LegendProps", "LegendItemProps", "GuidelineProps", "WrapperProps", "className", "children"],
|
|
5
4
|
_excluded2 = ["item", "className"];
|
|
6
5
|
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; }
|
|
7
6
|
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; }
|
|
@@ -16,6 +15,7 @@ import AppendElement from '../Append';
|
|
|
16
15
|
import GrowElement from '../Grow';
|
|
17
16
|
import useMediaQuery from '../useMediaQuery';
|
|
18
17
|
import { valueBreakpoints, staticClassName, minMaxBetweenNumbers } from '../utils';
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
19
|
const useStyle = styleMethod(theme => ({
|
|
20
20
|
root: {
|
|
21
21
|
width: '100%',
|
|
@@ -270,7 +270,7 @@ const useStyle = styleMethod(theme => ({
|
|
|
270
270
|
}), {
|
|
271
271
|
name: 'onesy-Chart'
|
|
272
272
|
});
|
|
273
|
-
const Chart =
|
|
273
|
+
const Chart = props_ => {
|
|
274
274
|
const theme = useOnesyTheme();
|
|
275
275
|
const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyChart?.props?.default), props_);
|
|
276
276
|
const Line = theme?.elements?.Line || LineElement;
|
|
@@ -280,6 +280,7 @@ const Chart = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
280
280
|
const Append = theme?.elements?.Append || AppendElement;
|
|
281
281
|
const Grow = theme?.elements?.Grow || GrowElement;
|
|
282
282
|
const {
|
|
283
|
+
ref,
|
|
283
284
|
tonal = true,
|
|
284
285
|
color = 'primary',
|
|
285
286
|
title,
|
|
@@ -559,67 +560,76 @@ const Chart = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
559
560
|
|
|
560
561
|
// Groups sorted by y largest, to smallest
|
|
561
562
|
const groupsSorted = Object.keys(groups).sort((a_1, b_1) => groups[a_1][0]?.normalized?.[1] - groups[b_1][0]?.normalized?.[1]);
|
|
562
|
-
const element = is('function', tooltipGroupRender) ? tooltipGroupRender(groups, groupsSorted) : /*#__PURE__*/
|
|
563
|
+
const element = is('function', tooltipGroupRender) ? tooltipGroupRender(groups, groupsSorted) : /*#__PURE__*/_jsx(Line, {
|
|
563
564
|
tonal: tonal,
|
|
564
565
|
color: color,
|
|
565
566
|
elevation: 1,
|
|
566
567
|
gap: 0.25,
|
|
567
568
|
direction: "column",
|
|
568
569
|
Component: Surface,
|
|
569
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-append'], classes.append])
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
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
|
-
|
|
570
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-append'], classes.append]),
|
|
571
|
+
children: /*#__PURE__*/_jsxs(Line, {
|
|
572
|
+
gap: 1,
|
|
573
|
+
direction: "column",
|
|
574
|
+
style: {
|
|
575
|
+
width: '100%'
|
|
576
|
+
},
|
|
577
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
578
|
+
gap: 1,
|
|
579
|
+
direction: "row",
|
|
580
|
+
align: "center",
|
|
581
|
+
children: [/*#__PURE__*/_jsx(Type, {
|
|
582
|
+
version: "b3",
|
|
583
|
+
style: {
|
|
584
|
+
fontWeight: 600
|
|
585
|
+
},
|
|
586
|
+
children: names?.y || 'y'
|
|
587
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
588
|
+
version: "b3",
|
|
589
|
+
style: {
|
|
590
|
+
fontWeight: 600
|
|
591
|
+
},
|
|
592
|
+
children: names?.x || 'x'
|
|
593
|
+
})]
|
|
594
|
+
}), /*#__PURE__*/_jsx(Line, {
|
|
595
|
+
gap: 1,
|
|
596
|
+
direction: "column",
|
|
597
|
+
children: groupsSorted.map((group_0, index) => /*#__PURE__*/_jsxs(Line, {
|
|
598
|
+
gap: 1,
|
|
599
|
+
direction: "column",
|
|
600
|
+
style: {
|
|
601
|
+
width: '100%'
|
|
602
|
+
},
|
|
603
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
604
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-append-icon'], classes.append_icon]),
|
|
605
|
+
style: {
|
|
606
|
+
background: !refs.theme.current.palette.color[group_0] ? group_0 : refs.theme.current.palette.color[group_0][groups[group_0][0]?.item?.tone || 'main']
|
|
607
|
+
}
|
|
608
|
+
}), /*#__PURE__*/_jsx(Line, {
|
|
609
|
+
gap: 0,
|
|
610
|
+
direction: "column",
|
|
611
|
+
style: {
|
|
612
|
+
width: '100%'
|
|
613
|
+
},
|
|
614
|
+
children: groups[group_0].map((item_4, index_) => /*#__PURE__*/_jsxs(Line, {
|
|
615
|
+
gap: 1,
|
|
616
|
+
direction: "row",
|
|
617
|
+
style: {
|
|
618
|
+
width: '100%'
|
|
619
|
+
},
|
|
620
|
+
children: [/*#__PURE__*/_jsx(Type, {
|
|
621
|
+
version: "b3",
|
|
622
|
+
children: is('function', labelResolve) ? labelResolve(item_4?.values?.[1], 'y', item_4, 'group') : item_4?.values?.[1]
|
|
623
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
624
|
+
version: "b3",
|
|
625
|
+
children: is('function', labelResolve) ? labelResolve(item_4?.values?.[0], 'x', item_4, 'group') : item_4?.values?.[0]
|
|
626
|
+
})]
|
|
627
|
+
}, index_))
|
|
628
|
+
})]
|
|
629
|
+
}, index))
|
|
630
|
+
})]
|
|
631
|
+
})
|
|
632
|
+
});
|
|
623
633
|
const rectSvg = refs.svg.current.getBoundingClientRect();
|
|
624
634
|
const width = 8;
|
|
625
635
|
const height = 8;
|
|
@@ -753,21 +763,24 @@ const Chart = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
753
763
|
tone = 'main',
|
|
754
764
|
name = 'No name'
|
|
755
765
|
} = item_6;
|
|
756
|
-
return /*#__PURE__*/
|
|
766
|
+
return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread(_objectSpread({
|
|
757
767
|
gap: 1,
|
|
758
768
|
direction: "row",
|
|
759
769
|
align: "center"
|
|
760
|
-
}, LegendItemProps, {
|
|
770
|
+
}, LegendItemProps), {}, {
|
|
761
771
|
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-legend-item'], className_, LegendItemProps?.className, classes.legend_item])
|
|
762
|
-
}, other_),
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
772
|
+
}, other_), {}, {
|
|
773
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
774
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-legend-icon'], classes.legend_icon]),
|
|
775
|
+
style: {
|
|
776
|
+
color: !theme.palette.color[color__0] ? color__0 : theme.palette.color[color__0][tone],
|
|
777
|
+
background: !theme.palette.color[color__0] ? color__0 : theme.palette.color[color__0][tone]
|
|
778
|
+
}
|
|
779
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
780
|
+
version: "b2",
|
|
781
|
+
children: name
|
|
782
|
+
})]
|
|
783
|
+
}));
|
|
771
784
|
};
|
|
772
785
|
const make = (valueNew = refs.values.current) => {
|
|
773
786
|
// Make values into x, y, coordinates
|
|
@@ -861,8 +874,7 @@ const Chart = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
861
874
|
const values__2 = itemArrayNested ? copy(item_19.values)
|
|
862
875
|
// Sort for x from smallest to largest
|
|
863
876
|
.sort((a_2, b_2) => a_2[0] - b_2[0]).map(itemValues) : [itemValues(item_19.values)];
|
|
864
|
-
return values__2.map((item__1, index_1) => /*#__PURE__*/
|
|
865
|
-
key: index_1,
|
|
877
|
+
return values__2.map((item__1, index_1) => /*#__PURE__*/_jsx(Path, _objectSpread(_objectSpread(_objectSpread({
|
|
866
878
|
Component: "circle",
|
|
867
879
|
r: 4,
|
|
868
880
|
cx: item__1.normalized[0],
|
|
@@ -878,13 +890,13 @@ const Chart = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
878
890
|
});
|
|
879
891
|
},
|
|
880
892
|
onMouseLeave: onPointMouseLeave
|
|
881
|
-
} : undefined, PointProps, {
|
|
893
|
+
} : undefined), PointProps), {}, {
|
|
882
894
|
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-point'], PointProps?.className, classes.point, classes[`point_visibility_${pointsVisibility}`], refs.guidelinesAppend.current && refs.guidelinesPosition.current.x === item__1.normalized[0] && classes.point_active]),
|
|
883
895
|
style: _objectSpread(_objectSpread({}, refs.visible.current[name_0] === false ? {
|
|
884
896
|
opacity: 0,
|
|
885
897
|
pointerEvents: 'none'
|
|
886
898
|
} : undefined), PointProps?.style)
|
|
887
|
-
})));
|
|
899
|
+
}), index_1));
|
|
888
900
|
});
|
|
889
901
|
refs.allValues.current.sort((a_3, b_3) => a_3?.normalized[0] - b_3?.normalized[0]);
|
|
890
902
|
|
|
@@ -905,15 +917,14 @@ const Chart = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
905
917
|
values__3.y1 = valueFromPercentageWithinRange(values__3.y1, 0, height_0);
|
|
906
918
|
values__3.x2 = valueFromPercentageWithinRange(values__3.x2, 0, width_0);
|
|
907
919
|
values__3.y2 = valueFromPercentageWithinRange(values__3.y2, 0, height_0);
|
|
908
|
-
return /*#__PURE__*/
|
|
909
|
-
key: index_2,
|
|
920
|
+
return /*#__PURE__*/_jsx(Path, _objectSpread(_objectSpread({
|
|
910
921
|
d: `M ${values__3.x1} ${height_0 - values__3.y1} L ${values__3.x2} ${height_0 - values__3.y2}`,
|
|
911
922
|
fill: "none",
|
|
912
923
|
stroke: !theme.palette.color[color__2] ? color__2 : theme.palette.color[color__2][tone_1]
|
|
913
|
-
}, AdditionalLineProps, {
|
|
924
|
+
}, AdditionalLineProps), {}, {
|
|
914
925
|
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-additional-lines'], AdditionalLineProps?.className, classes.additionalLines]),
|
|
915
926
|
style: _objectSpread(_objectSpread({}, style), AdditionalLineProps?.style)
|
|
916
|
-
}));
|
|
927
|
+
}), index_2);
|
|
917
928
|
});
|
|
918
929
|
|
|
919
930
|
// Labels
|
|
@@ -941,7 +952,7 @@ const Chart = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
941
952
|
if (!map[name_1]) {
|
|
942
953
|
legend_.push({
|
|
943
954
|
item: item_21,
|
|
944
|
-
element: /*#__PURE__*/
|
|
955
|
+
element: /*#__PURE__*/_jsx(LegendItem, {
|
|
945
956
|
item: item_21
|
|
946
957
|
})
|
|
947
958
|
});
|
|
@@ -953,7 +964,7 @@ const Chart = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
953
964
|
// Legend
|
|
954
965
|
if (is('array', legend_)) setLegend(legend_);
|
|
955
966
|
};
|
|
956
|
-
return /*#__PURE__*/
|
|
967
|
+
return /*#__PURE__*/_jsxs(Surface, _objectSpread(_objectSpread({
|
|
957
968
|
ref: item_22 => {
|
|
958
969
|
if (ref) {
|
|
959
970
|
if (is('function', ref)) ref(item_22);else ref.current = item_22;
|
|
@@ -970,320 +981,354 @@ const Chart = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
|
970
981
|
Component
|
|
971
982
|
},
|
|
972
983
|
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-root'], className, classes.root])
|
|
973
|
-
}, other),
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
}, LegendProps, {
|
|
994
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-legend', `onesy-Chart-legend-position-${legendPosition}`], LegendProps?.className, classes.legend, classes[`legend_position_${legendPosition}`], labels?.y && labelsY && classes.legend_offset_labels_y, names?.y && nameY && classes.legend_offset_names_y])
|
|
995
|
-
}), legend.map(({
|
|
996
|
-
item: item_23,
|
|
997
|
-
element: element_0
|
|
998
|
-
}) => {
|
|
999
|
-
return /*#__PURE__*/React.cloneElement(element_0, {
|
|
1000
|
-
onClick: () => onLegendClick(item_23.name),
|
|
1001
|
-
className: classNames([element_0?.props?.className, legendManageVisibility && classes.legend_item_manage_visibility, refs.visible.current[item_23.name] === false && classes.legend_item_hidden])
|
|
1002
|
-
});
|
|
1003
|
-
})), /*#__PURE__*/React.createElement(Line, _extends({
|
|
1004
|
-
ref: refs.wrapper
|
|
1005
|
-
}, WrapperProps, {
|
|
1006
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-wrapper'], WrapperProps?.className, classes.wrapper, labels?.x && labels?.y && labelsX && labelsY && classes.wrapper_labels, !(labels?.x && labels?.y && labelsX && labelsY) && labels?.x && labelsX && classes.wrapper_label_x, !(labels?.x && labels?.y && labelsX && labelsY) && labels?.y && labelsY && classes.wrapper_label_y, names?.x && names?.y && nameX && nameY && classes.wrapper_names, !(names?.x && names?.y && nameX && nameY) && names?.x && nameX && classes.wrapper_name_x, !(names?.x && names?.y && nameX && nameY) && names?.y && nameY && classes.wrapper_name_y])
|
|
1007
|
-
}), /*#__PURE__*/React.createElement(Surface, {
|
|
1008
|
-
tonal: tonal,
|
|
1009
|
-
color: color
|
|
1010
|
-
}, ({
|
|
1011
|
-
color: color__3,
|
|
1012
|
-
backgroundColor,
|
|
1013
|
-
palette
|
|
1014
|
-
}) => {
|
|
1015
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !!grid__ && gridX && grid?.x && /*#__PURE__*/React.createElement(Line, {
|
|
1016
|
-
gap: 0,
|
|
984
|
+
}, other), {}, {
|
|
985
|
+
children: [(title || subtitle) && /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
|
|
986
|
+
gap: 0.5,
|
|
987
|
+
align: "center",
|
|
988
|
+
justify: "center"
|
|
989
|
+
}, HeaderProps), {}, {
|
|
990
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-header'], HeaderProps?.className, classes.header, labels?.y && labelsY && classes.legend_offset_labels_y, names?.y && nameY && classes.legend_offset_names_y]),
|
|
991
|
+
children: [is('simple', title) ? /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread(_objectSpread({
|
|
992
|
+
version: "t2"
|
|
993
|
+
}, TypeProps), TitleProps), {}, {
|
|
994
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-title'], TypeProps?.className, TitleProps?.className, classes.title]),
|
|
995
|
+
children: title
|
|
996
|
+
})) : title, is('simple', subtitle) ? /*#__PURE__*/_jsx(Type, _objectSpread(_objectSpread(_objectSpread({
|
|
997
|
+
version: "b3"
|
|
998
|
+
}, TypeProps), SubtitleProps), {}, {
|
|
999
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-title'], TypeProps?.className, SubtitleProps?.className, classes.subtitle]),
|
|
1000
|
+
children: subtitle
|
|
1001
|
+
})) : subtitle]
|
|
1002
|
+
})), legend__ && legendPosition === 'top' && legend && /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({
|
|
1003
|
+
gap: 2,
|
|
1017
1004
|
direction: "row",
|
|
1018
|
-
align: "
|
|
1019
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-grids', 'onesy-Chart-grids-x'], classes.grids, classes.grids_x])
|
|
1020
|
-
}, grid.x.map((item_24, index_3) => /*#__PURE__*/React.createElement("div", {
|
|
1021
|
-
key: index_3,
|
|
1022
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-grid', 'onesy-Chart-grid-x'], classes.grid, classes.grid_x]),
|
|
1023
|
-
style: {
|
|
1024
|
-
left: `${item_24.percentage}%`
|
|
1025
|
-
}
|
|
1026
|
-
}))), !!grid__ && gridY && grid?.y && /*#__PURE__*/React.createElement(Line, {
|
|
1027
|
-
gap: 0,
|
|
1028
|
-
direction: "column",
|
|
1029
|
-
align: "flex-end",
|
|
1005
|
+
align: "center",
|
|
1030
1006
|
justify: "center",
|
|
1031
|
-
|
|
1032
|
-
},
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1007
|
+
wrap: "wrap"
|
|
1008
|
+
}, LegendProps), {}, {
|
|
1009
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-legend', `onesy-Chart-legend-position-${legendPosition}`], LegendProps?.className, classes.legend, classes[`legend_position_${legendPosition}`], labels?.y && labelsY && classes.legend_offset_labels_y, names?.y && nameY && classes.legend_offset_names_y]),
|
|
1010
|
+
children: legend.map(({
|
|
1011
|
+
item: item_23,
|
|
1012
|
+
element: element_0
|
|
1013
|
+
}) => {
|
|
1014
|
+
return /*#__PURE__*/React.cloneElement(element_0, {
|
|
1015
|
+
onClick: () => onLegendClick(item_23.name),
|
|
1016
|
+
className: classNames([element_0?.props?.className, legendManageVisibility && classes.legend_item_manage_visibility, refs.visible.current[item_23.name] === false && classes.legend_item_hidden])
|
|
1017
|
+
});
|
|
1018
|
+
})
|
|
1019
|
+
})), /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({
|
|
1020
|
+
ref: refs.wrapper
|
|
1021
|
+
}, WrapperProps), {}, {
|
|
1022
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-wrapper'], WrapperProps?.className, classes.wrapper, labels?.x && labels?.y && labelsX && labelsY && classes.wrapper_labels, !(labels?.x && labels?.y && labelsX && labelsY) && labels?.x && labelsX && classes.wrapper_label_x, !(labels?.x && labels?.y && labelsX && labelsY) && labels?.y && labelsY && classes.wrapper_label_y, names?.x && names?.y && nameX && nameY && classes.wrapper_names, !(names?.x && names?.y && nameX && nameY) && names?.x && nameX && classes.wrapper_name_x, !(names?.x && names?.y && nameX && nameY) && names?.y && nameY && classes.wrapper_name_y]),
|
|
1023
|
+
children: /*#__PURE__*/_jsx(Surface, {
|
|
1024
|
+
tonal: tonal,
|
|
1025
|
+
color: color,
|
|
1026
|
+
children: ({
|
|
1027
|
+
color: color__3,
|
|
1028
|
+
backgroundColor,
|
|
1029
|
+
palette
|
|
1030
|
+
}) => {
|
|
1031
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
1032
|
+
children: [!!grid__ && gridX && grid?.x && /*#__PURE__*/_jsx(Line, {
|
|
1033
|
+
gap: 0,
|
|
1034
|
+
direction: "row",
|
|
1035
|
+
align: "flex-start",
|
|
1036
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-grids', 'onesy-Chart-grids-x'], classes.grids, classes.grids_x]),
|
|
1037
|
+
children: grid.x.map((item_24, index_3) => /*#__PURE__*/_jsx("div", {
|
|
1038
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-grid', 'onesy-Chart-grid-x'], classes.grid, classes.grid_x]),
|
|
1039
|
+
style: {
|
|
1040
|
+
left: `${item_24.percentage}%`
|
|
1041
|
+
}
|
|
1042
|
+
}, index_3))
|
|
1043
|
+
}), !!grid__ && gridY && grid?.y && /*#__PURE__*/_jsx(Line, {
|
|
1044
|
+
gap: 0,
|
|
1045
|
+
direction: "column",
|
|
1046
|
+
align: "flex-end",
|
|
1047
|
+
justify: "center",
|
|
1048
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-grids', 'onesy-Chart-grids-y'], classes.grids, classes.grids_y]),
|
|
1049
|
+
children: grid.y.map((item_25, index_4) => /*#__PURE__*/_jsx("div", {
|
|
1050
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-grid', 'onesy-Chart-grid-y'], classes.grid, classes.grid_y]),
|
|
1051
|
+
style: {
|
|
1052
|
+
bottom: `${item_25.percentage}%`
|
|
1053
|
+
}
|
|
1054
|
+
}, index_4))
|
|
1055
|
+
}), /*#__PURE__*/_jsxs("svg", _objectSpread(_objectSpread(_objectSpread({
|
|
1056
|
+
ref: refs.svg,
|
|
1057
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1058
|
+
viewBox: `0 0 ${rects?.wrapper?.width || 0} ${rects?.wrapper?.height || 0}`
|
|
1059
|
+
}, guidelines ? {
|
|
1060
|
+
onMouseEnter: onWrapperMouseEnter,
|
|
1061
|
+
onTouchStart: onWrapperMouseEnter,
|
|
1062
|
+
onMouseLeave: onWrapperMouseLeave
|
|
1063
|
+
} : undefined), SvgProps), {}, {
|
|
1064
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-svg'], SvgProps?.className, classes.svg]),
|
|
1065
|
+
children: [/*#__PURE__*/_jsx("defs", {
|
|
1066
|
+
ref: refs.defs,
|
|
1067
|
+
children: defs && defs.map((item_26, index_5) => (/*#__PURE__*/React.cloneElement(item_26, {
|
|
1068
|
+
key: index_5
|
|
1069
|
+
})))
|
|
1070
|
+
}), pre, elements && elements.map(({
|
|
1071
|
+
item: item_27,
|
|
1072
|
+
element: element_1
|
|
1073
|
+
}, index_6) => {
|
|
1074
|
+
const isVisible = visible[item_27?.name] === undefined || !!visible[item_27?.name];
|
|
1075
|
+
return /*#__PURE__*/React.cloneElement(element_1, _objectSpread(_objectSpread({
|
|
1076
|
+
key: index_6
|
|
1077
|
+
}, elementTooltip ? {
|
|
1078
|
+
onMouseEnter: event_2 => {
|
|
1079
|
+
const rect__1 = event_2.target.getBoundingClientRect();
|
|
1080
|
+
onPointMouseEnter(_objectSpread(_objectSpread({}, item_27), {}, {
|
|
1081
|
+
rect: rect__1
|
|
1082
|
+
}));
|
|
1083
|
+
},
|
|
1084
|
+
onMouseLeave: onPointMouseLeave
|
|
1085
|
+
} : undefined), {}, {
|
|
1086
|
+
style: _objectSpread(_objectSpread({}, element_1?.props?.style), !isVisible ? {
|
|
1087
|
+
opacity: '0',
|
|
1088
|
+
pointerEvents: 'none'
|
|
1089
|
+
} : undefined)
|
|
1090
|
+
}));
|
|
1091
|
+
}), children && React.Children.toArray(children).map((element_2, index_7) => {
|
|
1092
|
+
const isVisible_0 = visible[element_2.props?.name] === undefined || !!visible[element_2.props?.name];
|
|
1093
|
+
return /*#__PURE__*/React.cloneElement(element_2, _objectSpread(_objectSpread({
|
|
1094
|
+
key: index_7,
|
|
1095
|
+
refs: {
|
|
1096
|
+
wrapper: refs.wrapper.current,
|
|
1097
|
+
defs: refs.defs.current
|
|
1098
|
+
},
|
|
1099
|
+
rects,
|
|
1100
|
+
animate: element_2.props.animate !== undefined ? element_2.props.animate : animate,
|
|
1101
|
+
animateTimeout: element_2.props.animateTimeout !== undefined ? element_2.props.animateTimeout : animateTimeout,
|
|
1102
|
+
updateDefs: setDefs,
|
|
1103
|
+
updateLegend: setLegend
|
|
1104
|
+
}, elementTooltip ? {
|
|
1105
|
+
onMouseEnter: event_3 => {
|
|
1106
|
+
const rect__2 = event_3.target.getBoundingClientRect();
|
|
1107
|
+
onPointMouseEnter(_objectSpread(_objectSpread({}, element_2.props), {}, {
|
|
1108
|
+
rect: rect__2
|
|
1109
|
+
}));
|
|
1110
|
+
},
|
|
1111
|
+
onMouseLeave: onPointMouseLeave
|
|
1112
|
+
} : undefined), {}, {
|
|
1113
|
+
minMax: element_2.props.minMax !== undefined ? element_2.props.minMax : minMax,
|
|
1114
|
+
minX: element_2.props.minX !== undefined ? element_2.props.minX : minX,
|
|
1115
|
+
maxX: element_2.props.maxX !== undefined ? element_2.props.maxX : maxX,
|
|
1116
|
+
minY: element_2.props.minY !== undefined ? element_2.props.minY : minY,
|
|
1117
|
+
maxY: element_2.props.maxY !== undefined ? element_2.props.maxY : maxY,
|
|
1118
|
+
minMaxPadding: element_2.props.minMaxPadding !== undefined ? element_2.props.minMaxPadding : minMaxPadding,
|
|
1119
|
+
minPadding: element_2.props.minPadding !== undefined ? element_2.props.minPadding : minPadding,
|
|
1120
|
+
maxPadding: element_2.props.maxPadding !== undefined ? element_2.props.maxPadding : maxPadding,
|
|
1121
|
+
minPaddingX: element_2.props.minPaddingX !== undefined ? element_2.props.minPaddingX : minPaddingX,
|
|
1122
|
+
minPaddingY: element_2.props.minPaddingY !== undefined ? element_2.props.minPaddingY : minPaddingY,
|
|
1123
|
+
maxPaddingX: element_2.props.maxPaddingX !== undefined ? element_2.props.maxPaddingX : maxPaddingX,
|
|
1124
|
+
maxPaddingY: element_2.props.maxPaddingY !== undefined ? element_2.props.maxPaddingY : maxPaddingY,
|
|
1125
|
+
style: _objectSpread(_objectSpread({}, element_2?.props?.style), !isVisible_0 ? {
|
|
1126
|
+
opacity: '0',
|
|
1127
|
+
pointerEvents: 'none'
|
|
1128
|
+
} : undefined)
|
|
1129
|
+
}));
|
|
1130
|
+
}), additionalLines && /*#__PURE__*/_jsx("g", _objectSpread(_objectSpread({}, AdditionalLinesProps), {}, {
|
|
1131
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-additional-lines'], AdditionalLinesProps?.className, classes.additionalLines]),
|
|
1132
|
+
children: additionalLines
|
|
1133
|
+
})), guidelines && guidelinesIn && /*#__PURE__*/_jsxs(_Fragment, {
|
|
1134
|
+
children: [['both', 'vertical'].includes(guidelines) && /*#__PURE__*/_jsx("path", _objectSpread(_objectSpread({
|
|
1135
|
+
d: `M ${guidelinesPosition?.x || 0} 0 ${guidelinesPosition?.x || 0} ${rects?.wrapper?.height || 0}`
|
|
1136
|
+
}, GuidelineProps), {}, {
|
|
1137
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-guidelines', 'onesy-Chart-guidelines-vertical'], GuidelineProps?.className, classes.guidelines, classes.guidelines_vertical])
|
|
1138
|
+
})), ['both', 'horizontal'].includes(guidelines) && /*#__PURE__*/_jsx("path", _objectSpread(_objectSpread({
|
|
1139
|
+
d: `M 0 ${guidelinesPosition?.y || 0} ${rects?.wrapper?.width || 0} ${guidelinesPosition?.y || 0}`
|
|
1140
|
+
}, GuidelineProps), {}, {
|
|
1141
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-guidelines', 'onesy-Chart-guidelines-horizontal'], GuidelineProps?.className, classes.guidelines, classes.guidelines_horizontal])
|
|
1142
|
+
}))]
|
|
1143
|
+
}), points__ && points && /*#__PURE__*/_jsx("g", _objectSpread(_objectSpread({}, PointsProps), {}, {
|
|
1144
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-points'], PointsProps?.className, classes.points]),
|
|
1145
|
+
children: points.map((item_28, index_8) => (/*#__PURE__*/React.cloneElement(item_28, {
|
|
1146
|
+
key: index_8
|
|
1147
|
+
})))
|
|
1148
|
+
}))]
|
|
1149
|
+
})), borders && /*#__PURE__*/_jsxs(_Fragment, {
|
|
1150
|
+
children: [borderTop && /*#__PURE__*/_jsx("div", {
|
|
1151
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-x', 'onesy-Chart-border-top'], classes.border, classes.borderX, classes.borderTop])
|
|
1152
|
+
}), borderBottom && /*#__PURE__*/_jsx("div", {
|
|
1153
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-x', 'onesy-Chart-border-bottom'], classes.border, classes.borderX, classes.borderBottom])
|
|
1154
|
+
}), borderStart && /*#__PURE__*/_jsx("div", {
|
|
1155
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-y', 'onesy-Chart-border-start'], classes.border, classes.borderY, classes.boderStart])
|
|
1156
|
+
}), borderLeft && /*#__PURE__*/_jsx("div", {
|
|
1157
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-y', 'onesy-Chart-border-left'], classes.border, classes.borderY, classes.borderLeft])
|
|
1158
|
+
}), borderEnd && /*#__PURE__*/_jsx("div", {
|
|
1159
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-y', 'onesy-Chart-border-end'], classes.border, classes.borderY, classes.borderEnd])
|
|
1160
|
+
}), borderRight && /*#__PURE__*/_jsx("div", {
|
|
1161
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-y', 'onesy-Chart-border-right'], classes.border, classes.borderY, classes.borderRight])
|
|
1162
|
+
})]
|
|
1163
|
+
}), !!labels__ && labelsX && labels?.x && /*#__PURE__*/_jsx(Line, {
|
|
1164
|
+
gap: 0,
|
|
1165
|
+
direction: "row",
|
|
1166
|
+
align: "flex-start",
|
|
1167
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-labels', 'onesy-Chart-labels-x'], classes.labels, classes.labels_x]),
|
|
1168
|
+
children: labels.x.map((item_29, index_9) => {
|
|
1169
|
+
const itemProps = {
|
|
1170
|
+
key: index_9,
|
|
1171
|
+
version: 'b3',
|
|
1172
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-x'], classes.label, classes.label_x]),
|
|
1173
|
+
style: {
|
|
1174
|
+
left: `${item_29.percentage}%`
|
|
1175
|
+
}
|
|
1176
|
+
};
|
|
1177
|
+
return is('function', labelRender) ? labelRender(_objectSpread(_objectSpread({}, item_29), {}, {
|
|
1178
|
+
axis: 'x',
|
|
1179
|
+
props: itemProps
|
|
1180
|
+
})) : /*#__PURE__*/_jsx(Type, {
|
|
1181
|
+
version: "b3",
|
|
1182
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-x'], classes.label, classes.label_x]),
|
|
1183
|
+
style: {
|
|
1184
|
+
left: `${item_29.percentage}%`
|
|
1185
|
+
},
|
|
1186
|
+
children: is('function', labelResolve) ? labelResolve(item_29.label, 'x', item_29) : item_29.label
|
|
1187
|
+
}, index_9);
|
|
1188
|
+
})
|
|
1189
|
+
}), !!labels__ && labelsY && labels?.y && /*#__PURE__*/_jsx(Line, {
|
|
1190
|
+
gap: 0,
|
|
1191
|
+
direction: "column",
|
|
1192
|
+
align: "flex-end",
|
|
1193
|
+
justify: "center",
|
|
1194
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-labels', 'onesy-Chart-labels-y'], classes.labels, classes.labels_y]),
|
|
1195
|
+
children: labels.y.map((item_30, index_10) => is('function', labelRender) ? labelRender(_objectSpread(_objectSpread({}, item_30), {}, {
|
|
1196
|
+
axis: 'y'
|
|
1197
|
+
})) : /*#__PURE__*/_jsx(Type, {
|
|
1198
|
+
version: "b3",
|
|
1199
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-y'], classes.label, classes.label_y]),
|
|
1200
|
+
style: {
|
|
1201
|
+
bottom: `${item_30.percentage}%`
|
|
1202
|
+
},
|
|
1203
|
+
children: is('function', labelResolve) ? labelResolve(item_30.label, 'y', item_30) : item_30.label
|
|
1204
|
+
}, index_10))
|
|
1205
|
+
}), !!marks__ && marksX && marks?.x && /*#__PURE__*/_jsx(Line, {
|
|
1206
|
+
gap: 0,
|
|
1207
|
+
direction: "row",
|
|
1208
|
+
align: "flex-start",
|
|
1209
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-marks', 'onesy-Chart-marks-x'], classes.marks, classes.marks_x]),
|
|
1210
|
+
children: marks.x.map((item_31, index_11) => /*#__PURE__*/_jsx("span", {
|
|
1211
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-mark', 'onesy-Chart-mark-x'], classes.mark, classes.mark_x]),
|
|
1212
|
+
style: {
|
|
1213
|
+
left: `${item_31.percentage}%`
|
|
1214
|
+
},
|
|
1215
|
+
children: item_31.mark
|
|
1216
|
+
}, index_11))
|
|
1217
|
+
}), !!marks__ && marksY && marks?.y && /*#__PURE__*/_jsx(Line, {
|
|
1218
|
+
gap: 0,
|
|
1219
|
+
direction: "column",
|
|
1220
|
+
align: "flex-end",
|
|
1221
|
+
justify: "center",
|
|
1222
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-marks', 'onesy-Chart-marks-y'], classes.marks, classes.marks_y]),
|
|
1223
|
+
children: marks.y.map((item_32, index_12) => /*#__PURE__*/_jsx("span", {
|
|
1224
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-mark', 'onesy-Chart-mark-y'], classes.mark, classes.mark_y]),
|
|
1225
|
+
style: {
|
|
1226
|
+
bottom: `${item_32.percentage}%`
|
|
1227
|
+
},
|
|
1228
|
+
children: item_32.mark
|
|
1229
|
+
}, index_12))
|
|
1230
|
+
}), names?.x && nameX && /*#__PURE__*/_jsx(Type, {
|
|
1231
|
+
version: "b2",
|
|
1232
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-name', 'onesy-Chart-name-x'], classes.name, classes.name_x]),
|
|
1233
|
+
children: names.x
|
|
1234
|
+
}), names?.y && nameY && /*#__PURE__*/_jsx(Type, {
|
|
1235
|
+
version: "b2",
|
|
1236
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-name', 'onesy-Chart-name-y'], classes.name, classes.name_y]),
|
|
1237
|
+
children: names.y
|
|
1238
|
+
})]
|
|
1239
|
+
});
|
|
1161
1240
|
}
|
|
1162
|
-
}
|
|
1163
|
-
})),
|
|
1164
|
-
gap:
|
|
1165
|
-
direction: "column",
|
|
1166
|
-
align: "flex-end",
|
|
1167
|
-
justify: "center",
|
|
1168
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-labels', 'onesy-Chart-labels-y'], classes.labels, classes.labels_y])
|
|
1169
|
-
}, labels.y.map((item_30, index_10) => is('function', labelRender) ? labelRender(_objectSpread(_objectSpread({}, item_30), {}, {
|
|
1170
|
-
axis: 'y'
|
|
1171
|
-
})) : /*#__PURE__*/React.createElement(Type, {
|
|
1172
|
-
key: index_10,
|
|
1173
|
-
version: "b3",
|
|
1174
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-y'], classes.label, classes.label_y]),
|
|
1175
|
-
style: {
|
|
1176
|
-
bottom: `${item_30.percentage}%`
|
|
1177
|
-
}
|
|
1178
|
-
}, is('function', labelResolve) ? labelResolve(item_30.label, 'y', item_30) : item_30.label))), !!marks__ && marksX && marks?.x && /*#__PURE__*/React.createElement(Line, {
|
|
1179
|
-
gap: 0,
|
|
1241
|
+
})
|
|
1242
|
+
})), legend__ && legendPosition === 'bottom' && legend && /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({
|
|
1243
|
+
gap: 2,
|
|
1180
1244
|
direction: "row",
|
|
1181
|
-
align: "
|
|
1182
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-marks', 'onesy-Chart-marks-x'], classes.marks, classes.marks_x])
|
|
1183
|
-
}, marks.x.map((item_31, index_11) => /*#__PURE__*/React.createElement("span", {
|
|
1184
|
-
key: index_11,
|
|
1185
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-mark', 'onesy-Chart-mark-x'], classes.mark, classes.mark_x]),
|
|
1186
|
-
style: {
|
|
1187
|
-
left: `${item_31.percentage}%`
|
|
1188
|
-
}
|
|
1189
|
-
}, item_31.mark))), !!marks__ && marksY && marks?.y && /*#__PURE__*/React.createElement(Line, {
|
|
1190
|
-
gap: 0,
|
|
1191
|
-
direction: "column",
|
|
1192
|
-
align: "flex-end",
|
|
1245
|
+
align: "center",
|
|
1193
1246
|
justify: "center",
|
|
1194
|
-
|
|
1195
|
-
},
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1247
|
+
wrap: "wrap"
|
|
1248
|
+
}, LegendProps), {}, {
|
|
1249
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-legend', `onesy-Chart-legend-position-${legendPosition}`], LegendProps?.className, classes.legend, classes[`legend_position_${legendPosition}`], labels?.y && labelsY && classes.legend_offset_labels_y, names?.y && nameY && classes.legend_offset_names_y]),
|
|
1250
|
+
children: legend.map(({
|
|
1251
|
+
item: item_33,
|
|
1252
|
+
element: element_3
|
|
1253
|
+
}) => {
|
|
1254
|
+
return /*#__PURE__*/React.cloneElement(element_3, {
|
|
1255
|
+
onClick: () => onLegendClick(item_33.name),
|
|
1256
|
+
className: classNames([element_3?.props?.className, legendManageVisibility && classes.legend_item_manage_visibility, refs.visible.current[item_33.name] === false && classes.legend_item_hidden])
|
|
1257
|
+
});
|
|
1258
|
+
})
|
|
1259
|
+
})), tooltip && /*#__PURE__*/_jsx(Append, _objectSpread({
|
|
1260
|
+
open: true,
|
|
1261
|
+
offset: [16, 16],
|
|
1262
|
+
padding: [14, 14],
|
|
1263
|
+
element: /*#__PURE__*/_jsx("div", {
|
|
1264
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-append-wrapper'], classes.append_wrapper]),
|
|
1265
|
+
style: _objectSpread({}, refs.appendStyle.current),
|
|
1266
|
+
children: /*#__PURE__*/_jsx(Grow, {
|
|
1267
|
+
in: append?.open,
|
|
1268
|
+
onAdded: () => {
|
|
1269
|
+
refs.appendStyle.current = {
|
|
1270
|
+
transition: theme.methods.transitions.make('transform', {
|
|
1271
|
+
duration: 150
|
|
1272
|
+
})
|
|
1273
|
+
};
|
|
1274
|
+
},
|
|
1275
|
+
onEnter: () => {
|
|
1276
|
+
refs.appendStyle.current = {
|
|
1277
|
+
transition: theme.methods.transitions.make('transform', {
|
|
1278
|
+
duration: 150
|
|
1279
|
+
})
|
|
1280
|
+
};
|
|
1281
|
+
},
|
|
1282
|
+
onExited: () => {
|
|
1283
|
+
refs.appendStyle.current = {};
|
|
1284
|
+
},
|
|
1285
|
+
add: true,
|
|
1286
|
+
children: append?.element || /*#__PURE__*/_jsxs(Line, {
|
|
1287
|
+
tonal: tonal,
|
|
1288
|
+
color: color,
|
|
1289
|
+
elevation: 1,
|
|
1290
|
+
gap: 0.4,
|
|
1291
|
+
direction: "column",
|
|
1292
|
+
Component: Surface,
|
|
1293
|
+
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-append'], classes.append]),
|
|
1294
|
+
children: [/*#__PURE__*/_jsxs(Line, {
|
|
1295
|
+
gap: 1,
|
|
1296
|
+
direction: "row",
|
|
1297
|
+
align: "center",
|
|
1298
|
+
children: [/*#__PURE__*/_jsx(Type, {
|
|
1299
|
+
version: "b3",
|
|
1300
|
+
style: {
|
|
1301
|
+
fontWeight: 600
|
|
1302
|
+
},
|
|
1303
|
+
children: names?.y || 'y'
|
|
1304
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
1305
|
+
version: "b3",
|
|
1306
|
+
children: is('function', labelResolve) ? labelResolve(append?.values?.[1], 'y', append, 'individual') : append?.values?.[1]
|
|
1307
|
+
})]
|
|
1308
|
+
}), /*#__PURE__*/_jsxs(Line, {
|
|
1309
|
+
gap: 1,
|
|
1310
|
+
direction: "row",
|
|
1311
|
+
align: "center",
|
|
1312
|
+
children: [/*#__PURE__*/_jsx(Type, {
|
|
1313
|
+
version: "b3",
|
|
1314
|
+
style: {
|
|
1315
|
+
fontWeight: 600
|
|
1316
|
+
},
|
|
1317
|
+
children: names?.x || 'x'
|
|
1318
|
+
}), /*#__PURE__*/_jsx(Type, {
|
|
1319
|
+
version: "b3",
|
|
1320
|
+
children: is('function', labelResolve) ? labelResolve(append?.values?.[0], 'x', append, 'individual') : append?.values?.[0]
|
|
1321
|
+
})]
|
|
1322
|
+
})]
|
|
1244
1323
|
})
|
|
1245
|
-
}
|
|
1246
|
-
},
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
},
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
elevation: 1,
|
|
1255
|
-
gap: 0.4,
|
|
1256
|
-
direction: "column",
|
|
1257
|
-
Component: Surface,
|
|
1258
|
-
className: classNames([staticClassName('Chart', theme) && ['onesy-Chart-append'], classes.append])
|
|
1259
|
-
}, /*#__PURE__*/React.createElement(Line, {
|
|
1260
|
-
gap: 1,
|
|
1261
|
-
direction: "row",
|
|
1262
|
-
align: "center"
|
|
1263
|
-
}, /*#__PURE__*/React.createElement(Type, {
|
|
1264
|
-
version: "b3",
|
|
1265
|
-
style: {
|
|
1266
|
-
fontWeight: 600
|
|
1267
|
-
}
|
|
1268
|
-
}, names?.y || 'y'), /*#__PURE__*/React.createElement(Type, {
|
|
1269
|
-
version: "b3"
|
|
1270
|
-
}, is('function', labelResolve) ? labelResolve(append?.values?.[1], 'y', append, 'individual') : append?.values?.[1])), /*#__PURE__*/React.createElement(Line, {
|
|
1271
|
-
gap: 1,
|
|
1272
|
-
direction: "row",
|
|
1273
|
-
align: "center"
|
|
1274
|
-
}, /*#__PURE__*/React.createElement(Type, {
|
|
1275
|
-
version: "b3",
|
|
1276
|
-
style: {
|
|
1277
|
-
fontWeight: 600
|
|
1278
|
-
}
|
|
1279
|
-
}, names?.x || 'x'), /*#__PURE__*/React.createElement(Type, {
|
|
1280
|
-
version: "b3"
|
|
1281
|
-
}, is('function', labelResolve) ? labelResolve(append?.values?.[0], 'x', append, 'individual') : append?.values?.[0]))))),
|
|
1282
|
-
anchor: append?.rect,
|
|
1283
|
-
portal: true,
|
|
1284
|
-
alignment: "center",
|
|
1285
|
-
position: "top"
|
|
1286
|
-
}, AppendProps)));
|
|
1287
|
-
});
|
|
1324
|
+
})
|
|
1325
|
+
}),
|
|
1326
|
+
anchor: append?.rect,
|
|
1327
|
+
portal: true,
|
|
1328
|
+
alignment: "center",
|
|
1329
|
+
position: "top"
|
|
1330
|
+
}, AppendProps))]
|
|
1331
|
+
}));
|
|
1332
|
+
};
|
|
1288
1333
|
Chart.displayName = 'onesy-Chart';
|
|
1289
1334
|
export default Chart;
|