@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/Chart/Chart.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
10
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -19,7 +18,8 @@ var _Append = _interopRequireDefault(require("../Append"));
|
|
|
19
18
|
var _Grow = _interopRequireDefault(require("../Grow"));
|
|
20
19
|
var _useMediaQuery = _interopRequireDefault(require("../useMediaQuery"));
|
|
21
20
|
var _utils2 = require("../utils");
|
|
22
|
-
|
|
21
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
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"],
|
|
23
23
|
_excluded2 = ["item", "className"];
|
|
24
24
|
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; }
|
|
25
25
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -277,7 +277,7 @@ const useStyle = (0, _styleReact.style)(theme => ({
|
|
|
277
277
|
}), {
|
|
278
278
|
name: 'onesy-Chart'
|
|
279
279
|
});
|
|
280
|
-
const Chart =
|
|
280
|
+
const Chart = props_ => {
|
|
281
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 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_);
|
|
@@ -288,6 +288,7 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
288
288
|
const Append = (theme === null || theme === void 0 || (_theme$elements5 = theme.elements) === null || _theme$elements5 === void 0 ? void 0 : _theme$elements5.Append) || _Append.default;
|
|
289
289
|
const Grow = (theme === null || theme === void 0 || (_theme$elements6 = theme.elements) === null || _theme$elements6 === void 0 ? void 0 : _theme$elements6.Grow) || _Grow.default;
|
|
290
290
|
const {
|
|
291
|
+
ref,
|
|
291
292
|
tonal = true,
|
|
292
293
|
color = 'primary',
|
|
293
294
|
title,
|
|
@@ -574,73 +575,82 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
574
575
|
var _groups$a_1$, _groups$b_1$;
|
|
575
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]);
|
|
576
577
|
});
|
|
577
|
-
const element = (0, _utils.is)('function', tooltipGroupRender) ? tooltipGroupRender(groups, groupsSorted) : /*#__PURE__*/
|
|
578
|
+
const element = (0, _utils.is)('function', tooltipGroupRender) ? tooltipGroupRender(groups, groupsSorted) : /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, {
|
|
578
579
|
tonal: tonal,
|
|
579
580
|
color: color,
|
|
580
581
|
elevation: 1,
|
|
581
582
|
gap: 0.25,
|
|
582
583
|
direction: "column",
|
|
583
584
|
Component: Surface,
|
|
584
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-append'], classes.append])
|
|
585
|
-
|
|
586
|
-
gap: 1,
|
|
587
|
-
direction: "column",
|
|
588
|
-
style: {
|
|
589
|
-
width: '100%'
|
|
590
|
-
}
|
|
591
|
-
}, /*#__PURE__*/_react.default.createElement(Line, {
|
|
592
|
-
gap: 1,
|
|
593
|
-
direction: "row",
|
|
594
|
-
align: "center"
|
|
595
|
-
}, /*#__PURE__*/_react.default.createElement(Type, {
|
|
596
|
-
version: "b3",
|
|
597
|
-
style: {
|
|
598
|
-
fontWeight: 600
|
|
599
|
-
}
|
|
600
|
-
}, (names === null || names === void 0 ? void 0 : names.y) || 'y'), /*#__PURE__*/_react.default.createElement(Type, {
|
|
601
|
-
version: "b3",
|
|
602
|
-
style: {
|
|
603
|
-
fontWeight: 600
|
|
604
|
-
}
|
|
605
|
-
}, (names === null || names === void 0 ? void 0 : names.x) || 'x')), /*#__PURE__*/_react.default.createElement(Line, {
|
|
606
|
-
gap: 1,
|
|
607
|
-
direction: "column"
|
|
608
|
-
}, groupsSorted.map((group_0, index) => {
|
|
609
|
-
var _groups$group_0$;
|
|
610
|
-
return /*#__PURE__*/_react.default.createElement(Line, {
|
|
611
|
-
key: index,
|
|
585
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-append'], classes.append]),
|
|
586
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, {
|
|
612
587
|
gap: 1,
|
|
613
588
|
direction: "column",
|
|
614
589
|
style: {
|
|
615
590
|
width: '100%'
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-append-icon'], classes.append_icon]),
|
|
619
|
-
style: {
|
|
620
|
-
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']
|
|
621
|
-
}
|
|
622
|
-
}), /*#__PURE__*/_react.default.createElement(Line, {
|
|
623
|
-
gap: 0,
|
|
624
|
-
direction: "column",
|
|
625
|
-
style: {
|
|
626
|
-
width: '100%'
|
|
627
|
-
}
|
|
628
|
-
}, groups[group_0].map((item_4, index_) => {
|
|
629
|
-
var _item_4$values, _item_4$values2, _item_4$values3, _item_4$values4;
|
|
630
|
-
return /*#__PURE__*/_react.default.createElement(Line, {
|
|
631
|
-
key: index_,
|
|
591
|
+
},
|
|
592
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, {
|
|
632
593
|
gap: 1,
|
|
633
594
|
direction: "row",
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
595
|
+
align: "center",
|
|
596
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
597
|
+
version: "b3",
|
|
598
|
+
style: {
|
|
599
|
+
fontWeight: 600
|
|
600
|
+
},
|
|
601
|
+
children: (names === null || names === void 0 ? void 0 : names.y) || 'y'
|
|
602
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
603
|
+
version: "b3",
|
|
604
|
+
style: {
|
|
605
|
+
fontWeight: 600
|
|
606
|
+
},
|
|
607
|
+
children: (names === null || names === void 0 ? void 0 : names.x) || 'x'
|
|
608
|
+
})]
|
|
609
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, {
|
|
610
|
+
gap: 1,
|
|
611
|
+
direction: "column",
|
|
612
|
+
children: groupsSorted.map((group_0, index) => {
|
|
613
|
+
var _groups$group_0$;
|
|
614
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, {
|
|
615
|
+
gap: 1,
|
|
616
|
+
direction: "column",
|
|
617
|
+
style: {
|
|
618
|
+
width: '100%'
|
|
619
|
+
},
|
|
620
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
621
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-append-icon'], classes.append_icon]),
|
|
622
|
+
style: {
|
|
623
|
+
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']
|
|
624
|
+
}
|
|
625
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, {
|
|
626
|
+
gap: 0,
|
|
627
|
+
direction: "column",
|
|
628
|
+
style: {
|
|
629
|
+
width: '100%'
|
|
630
|
+
},
|
|
631
|
+
children: groups[group_0].map((item_4, index_) => {
|
|
632
|
+
var _item_4$values, _item_4$values2, _item_4$values3, _item_4$values4;
|
|
633
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, {
|
|
634
|
+
gap: 1,
|
|
635
|
+
direction: "row",
|
|
636
|
+
style: {
|
|
637
|
+
width: '100%'
|
|
638
|
+
},
|
|
639
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
640
|
+
version: "b3",
|
|
641
|
+
children: (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]
|
|
642
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
643
|
+
version: "b3",
|
|
644
|
+
children: (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]
|
|
645
|
+
})]
|
|
646
|
+
}, index_);
|
|
647
|
+
})
|
|
648
|
+
})]
|
|
649
|
+
}, index);
|
|
650
|
+
})
|
|
651
|
+
})]
|
|
652
|
+
})
|
|
653
|
+
});
|
|
644
654
|
const rectSvg = refs.svg.current.getBoundingClientRect();
|
|
645
655
|
const width = 8;
|
|
646
656
|
const height = 8;
|
|
@@ -778,21 +788,24 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
778
788
|
tone = 'main',
|
|
779
789
|
name = 'No name'
|
|
780
790
|
} = item_6;
|
|
781
|
-
return /*#__PURE__*/
|
|
791
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, _objectSpread(_objectSpread(_objectSpread({
|
|
782
792
|
gap: 1,
|
|
783
793
|
direction: "row",
|
|
784
794
|
align: "center"
|
|
785
|
-
}, LegendItemProps, {
|
|
795
|
+
}, LegendItemProps), {}, {
|
|
786
796
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-legend-item'], className_, LegendItemProps === null || LegendItemProps === void 0 ? void 0 : LegendItemProps.className, classes.legend_item])
|
|
787
|
-
}, other_),
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
797
|
+
}, other_), {}, {
|
|
798
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
799
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-legend-icon'], classes.legend_icon]),
|
|
800
|
+
style: {
|
|
801
|
+
color: !theme.palette.color[color__0] ? color__0 : theme.palette.color[color__0][tone],
|
|
802
|
+
background: !theme.palette.color[color__0] ? color__0 : theme.palette.color[color__0][tone]
|
|
803
|
+
}
|
|
804
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
805
|
+
version: "b2",
|
|
806
|
+
children: name
|
|
807
|
+
})]
|
|
808
|
+
}));
|
|
796
809
|
};
|
|
797
810
|
const make = (valueNew = refs.values.current) => {
|
|
798
811
|
// Make values into x, y, coordinates
|
|
@@ -887,8 +900,7 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
887
900
|
const values__2 = itemArrayNested ? (0, _utils.copy)(item_19.values)
|
|
888
901
|
// Sort for x from smallest to largest
|
|
889
902
|
.sort((a_2, b_2) => a_2[0] - b_2[0]).map(itemValues) : [itemValues(item_19.values)];
|
|
890
|
-
return values__2.map((item__1, index_1) => /*#__PURE__*/
|
|
891
|
-
key: index_1,
|
|
903
|
+
return values__2.map((item__1, index_1) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Path, _objectSpread(_objectSpread(_objectSpread({
|
|
892
904
|
Component: "circle",
|
|
893
905
|
r: 4,
|
|
894
906
|
cx: item__1.normalized[0],
|
|
@@ -904,13 +916,13 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
904
916
|
});
|
|
905
917
|
},
|
|
906
918
|
onMouseLeave: onPointMouseLeave
|
|
907
|
-
} : undefined, PointProps, {
|
|
919
|
+
} : undefined), PointProps), {}, {
|
|
908
920
|
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]),
|
|
909
921
|
style: _objectSpread(_objectSpread({}, refs.visible.current[name_0] === false ? {
|
|
910
922
|
opacity: 0,
|
|
911
923
|
pointerEvents: 'none'
|
|
912
924
|
} : undefined), PointProps === null || PointProps === void 0 ? void 0 : PointProps.style)
|
|
913
|
-
})));
|
|
925
|
+
}), index_1));
|
|
914
926
|
});
|
|
915
927
|
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]));
|
|
916
928
|
|
|
@@ -931,15 +943,14 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
931
943
|
values__3.y1 = (0, _utils.valueFromPercentageWithinRange)(values__3.y1, 0, height_0);
|
|
932
944
|
values__3.x2 = (0, _utils.valueFromPercentageWithinRange)(values__3.x2, 0, width_0);
|
|
933
945
|
values__3.y2 = (0, _utils.valueFromPercentageWithinRange)(values__3.y2, 0, height_0);
|
|
934
|
-
return /*#__PURE__*/
|
|
935
|
-
key: index_2,
|
|
946
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Path, _objectSpread(_objectSpread({
|
|
936
947
|
d: `M ${values__3.x1} ${height_0 - values__3.y1} L ${values__3.x2} ${height_0 - values__3.y2}`,
|
|
937
948
|
fill: "none",
|
|
938
949
|
stroke: !theme.palette.color[color__2] ? color__2 : theme.palette.color[color__2][tone_1]
|
|
939
|
-
}, AdditionalLineProps, {
|
|
950
|
+
}, AdditionalLineProps), {}, {
|
|
940
951
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-additional-lines'], AdditionalLineProps === null || AdditionalLineProps === void 0 ? void 0 : AdditionalLineProps.className, classes.additionalLines]),
|
|
941
952
|
style: _objectSpread(_objectSpread({}, style), AdditionalLineProps === null || AdditionalLineProps === void 0 ? void 0 : AdditionalLineProps.style)
|
|
942
|
-
}));
|
|
953
|
+
}), index_2);
|
|
943
954
|
});
|
|
944
955
|
|
|
945
956
|
// Labels
|
|
@@ -967,7 +978,7 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
967
978
|
if (!map[name_1]) {
|
|
968
979
|
legend_.push({
|
|
969
980
|
item: item_21,
|
|
970
|
-
element: /*#__PURE__*/
|
|
981
|
+
element: /*#__PURE__*/(0, _jsxRuntime.jsx)(LegendItem, {
|
|
971
982
|
item: item_21
|
|
972
983
|
})
|
|
973
984
|
});
|
|
@@ -979,7 +990,7 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
979
990
|
// Legend
|
|
980
991
|
if ((0, _utils.is)('array', legend_)) setLegend(legend_);
|
|
981
992
|
};
|
|
982
|
-
return /*#__PURE__*/
|
|
993
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Surface, _objectSpread(_objectSpread({
|
|
983
994
|
ref: item_22 => {
|
|
984
995
|
if (ref) {
|
|
985
996
|
if ((0, _utils.is)('function', ref)) ref(item_22);else ref.current = item_22;
|
|
@@ -996,325 +1007,359 @@ const Chart = /*#__PURE__*/_react.default.forwardRef((props_, ref) => {
|
|
|
996
1007
|
Component
|
|
997
1008
|
},
|
|
998
1009
|
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-root'], className, classes.root])
|
|
999
|
-
}, other),
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
}, LegendProps, {
|
|
1020
|
-
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])
|
|
1021
|
-
}), legend.map(({
|
|
1022
|
-
item: item_23,
|
|
1023
|
-
element: element_0
|
|
1024
|
-
}) => {
|
|
1025
|
-
var _element_0$props;
|
|
1026
|
-
return /*#__PURE__*/_react.default.cloneElement(element_0, {
|
|
1027
|
-
onClick: () => onLegendClick(item_23.name),
|
|
1028
|
-
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])
|
|
1029
|
-
});
|
|
1030
|
-
})), /*#__PURE__*/_react.default.createElement(Line, (0, _extends2.default)({
|
|
1031
|
-
ref: refs.wrapper
|
|
1032
|
-
}, WrapperProps, {
|
|
1033
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-wrapper'], WrapperProps === null || WrapperProps === void 0 ? void 0 : WrapperProps.className, classes.wrapper, (labels === null || labels === void 0 ? void 0 : labels.x) && (labels === null || labels === void 0 ? void 0 : labels.y) && labelsX && labelsY && classes.wrapper_labels, !(labels !== null && labels !== void 0 && labels.x && labels !== null && labels !== void 0 && labels.y && labelsX && labelsY) && (labels === null || labels === void 0 ? void 0 : labels.x) && labelsX && classes.wrapper_label_x, !(labels !== null && labels !== void 0 && labels.x && labels !== null && labels !== void 0 && labels.y && labelsX && labelsY) && (labels === null || labels === void 0 ? void 0 : labels.y) && labelsY && classes.wrapper_label_y, (names === null || names === void 0 ? void 0 : names.x) && (names === null || names === void 0 ? void 0 : names.y) && nameX && nameY && classes.wrapper_names, !(names !== null && names !== void 0 && names.x && names !== null && names !== void 0 && names.y && nameX && nameY) && (names === null || names === void 0 ? void 0 : names.x) && nameX && classes.wrapper_name_x, !(names !== null && names !== void 0 && names.x && names !== null && names !== void 0 && names.y && nameX && nameY) && (names === null || names === void 0 ? void 0 : names.y) && nameY && classes.wrapper_name_y])
|
|
1034
|
-
}), /*#__PURE__*/_react.default.createElement(Surface, {
|
|
1035
|
-
tonal: tonal,
|
|
1036
|
-
color: color
|
|
1037
|
-
}, ({
|
|
1038
|
-
color: color__3,
|
|
1039
|
-
backgroundColor,
|
|
1040
|
-
palette
|
|
1041
|
-
}) => {
|
|
1042
|
-
var _rects$wrapper, _rects$wrapper2, _rects$wrapper3, _rects$wrapper4;
|
|
1043
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !!grid__ && gridX && (grid === null || grid === void 0 ? void 0 : grid.x) && /*#__PURE__*/_react.default.createElement(Line, {
|
|
1044
|
-
gap: 0,
|
|
1010
|
+
}, other), {}, {
|
|
1011
|
+
children: [(title || subtitle) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, _objectSpread(_objectSpread({
|
|
1012
|
+
gap: 0.5,
|
|
1013
|
+
align: "center",
|
|
1014
|
+
justify: "center"
|
|
1015
|
+
}, HeaderProps), {}, {
|
|
1016
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-header'], HeaderProps === null || HeaderProps === void 0 ? void 0 : HeaderProps.className, classes.header, (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]),
|
|
1017
|
+
children: [(0, _utils.is)('simple', title) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, _objectSpread(_objectSpread(_objectSpread({
|
|
1018
|
+
version: "t2"
|
|
1019
|
+
}, TypeProps), TitleProps), {}, {
|
|
1020
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-title'], TypeProps === null || TypeProps === void 0 ? void 0 : TypeProps.className, TitleProps === null || TitleProps === void 0 ? void 0 : TitleProps.className, classes.title]),
|
|
1021
|
+
children: title
|
|
1022
|
+
})) : title, (0, _utils.is)('simple', subtitle) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, _objectSpread(_objectSpread(_objectSpread({
|
|
1023
|
+
version: "b3"
|
|
1024
|
+
}, TypeProps), SubtitleProps), {}, {
|
|
1025
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-title'], TypeProps === null || TypeProps === void 0 ? void 0 : TypeProps.className, SubtitleProps === null || SubtitleProps === void 0 ? void 0 : SubtitleProps.className, classes.subtitle]),
|
|
1026
|
+
children: subtitle
|
|
1027
|
+
})) : subtitle]
|
|
1028
|
+
})), legend__ && legendPosition === 'top' && legend && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, _objectSpread(_objectSpread({
|
|
1029
|
+
gap: 2,
|
|
1045
1030
|
direction: "row",
|
|
1046
|
-
align: "
|
|
1047
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grids', 'onesy-Chart-grids-x'], classes.grids, classes.grids_x])
|
|
1048
|
-
}, grid.x.map((item_24, index_3) => /*#__PURE__*/_react.default.createElement("div", {
|
|
1049
|
-
key: index_3,
|
|
1050
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grid', 'onesy-Chart-grid-x'], classes.grid, classes.grid_x]),
|
|
1051
|
-
style: {
|
|
1052
|
-
left: `${item_24.percentage}%`
|
|
1053
|
-
}
|
|
1054
|
-
}))), !!grid__ && gridY && (grid === null || grid === void 0 ? void 0 : grid.y) && /*#__PURE__*/_react.default.createElement(Line, {
|
|
1055
|
-
gap: 0,
|
|
1056
|
-
direction: "column",
|
|
1057
|
-
align: "flex-end",
|
|
1031
|
+
align: "center",
|
|
1058
1032
|
justify: "center",
|
|
1059
|
-
|
|
1060
|
-
},
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
}
|
|
1075
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-
|
|
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
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1033
|
+
wrap: "wrap"
|
|
1034
|
+
}, LegendProps), {}, {
|
|
1035
|
+
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]),
|
|
1036
|
+
children: legend.map(({
|
|
1037
|
+
item: item_23,
|
|
1038
|
+
element: element_0
|
|
1039
|
+
}) => {
|
|
1040
|
+
var _element_0$props;
|
|
1041
|
+
return /*#__PURE__*/_react.default.cloneElement(element_0, {
|
|
1042
|
+
onClick: () => onLegendClick(item_23.name),
|
|
1043
|
+
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])
|
|
1044
|
+
});
|
|
1045
|
+
})
|
|
1046
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, _objectSpread(_objectSpread({
|
|
1047
|
+
ref: refs.wrapper
|
|
1048
|
+
}, WrapperProps), {}, {
|
|
1049
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-wrapper'], WrapperProps === null || WrapperProps === void 0 ? void 0 : WrapperProps.className, classes.wrapper, (labels === null || labels === void 0 ? void 0 : labels.x) && (labels === null || labels === void 0 ? void 0 : labels.y) && labelsX && labelsY && classes.wrapper_labels, !(labels !== null && labels !== void 0 && labels.x && labels !== null && labels !== void 0 && labels.y && labelsX && labelsY) && (labels === null || labels === void 0 ? void 0 : labels.x) && labelsX && classes.wrapper_label_x, !(labels !== null && labels !== void 0 && labels.x && labels !== null && labels !== void 0 && labels.y && labelsX && labelsY) && (labels === null || labels === void 0 ? void 0 : labels.y) && labelsY && classes.wrapper_label_y, (names === null || names === void 0 ? void 0 : names.x) && (names === null || names === void 0 ? void 0 : names.y) && nameX && nameY && classes.wrapper_names, !(names !== null && names !== void 0 && names.x && names !== null && names !== void 0 && names.y && nameX && nameY) && (names === null || names === void 0 ? void 0 : names.x) && nameX && classes.wrapper_name_x, !(names !== null && names !== void 0 && names.x && names !== null && names !== void 0 && names.y && nameX && nameY) && (names === null || names === void 0 ? void 0 : names.y) && nameY && classes.wrapper_name_y]),
|
|
1050
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Surface, {
|
|
1051
|
+
tonal: tonal,
|
|
1052
|
+
color: color,
|
|
1053
|
+
children: ({
|
|
1054
|
+
color: color__3,
|
|
1055
|
+
backgroundColor,
|
|
1056
|
+
palette
|
|
1057
|
+
}) => {
|
|
1058
|
+
var _rects$wrapper, _rects$wrapper2, _rects$wrapper3, _rects$wrapper4;
|
|
1059
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1060
|
+
children: [!!grid__ && gridX && (grid === null || grid === void 0 ? void 0 : grid.x) && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, {
|
|
1061
|
+
gap: 0,
|
|
1062
|
+
direction: "row",
|
|
1063
|
+
align: "flex-start",
|
|
1064
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grids', 'onesy-Chart-grids-x'], classes.grids, classes.grids_x]),
|
|
1065
|
+
children: grid.x.map((item_24, index_3) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1066
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grid', 'onesy-Chart-grid-x'], classes.grid, classes.grid_x]),
|
|
1067
|
+
style: {
|
|
1068
|
+
left: `${item_24.percentage}%`
|
|
1069
|
+
}
|
|
1070
|
+
}, index_3))
|
|
1071
|
+
}), !!grid__ && gridY && (grid === null || grid === void 0 ? void 0 : grid.y) && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, {
|
|
1072
|
+
gap: 0,
|
|
1073
|
+
direction: "column",
|
|
1074
|
+
align: "flex-end",
|
|
1075
|
+
justify: "center",
|
|
1076
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grids', 'onesy-Chart-grids-y'], classes.grids, classes.grids_y]),
|
|
1077
|
+
children: grid.y.map((item_25, index_4) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1078
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-grid', 'onesy-Chart-grid-y'], classes.grid, classes.grid_y]),
|
|
1079
|
+
style: {
|
|
1080
|
+
bottom: `${item_25.percentage}%`
|
|
1081
|
+
}
|
|
1082
|
+
}, index_4))
|
|
1083
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", _objectSpread(_objectSpread(_objectSpread({
|
|
1084
|
+
ref: refs.svg,
|
|
1085
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1086
|
+
viewBox: `0 0 ${(rects === null || rects === void 0 || (_rects$wrapper = rects.wrapper) === null || _rects$wrapper === void 0 ? void 0 : _rects$wrapper.width) || 0} ${(rects === null || rects === void 0 || (_rects$wrapper2 = rects.wrapper) === null || _rects$wrapper2 === void 0 ? void 0 : _rects$wrapper2.height) || 0}`
|
|
1087
|
+
}, guidelines ? {
|
|
1088
|
+
onMouseEnter: onWrapperMouseEnter,
|
|
1089
|
+
onTouchStart: onWrapperMouseEnter,
|
|
1090
|
+
onMouseLeave: onWrapperMouseLeave
|
|
1091
|
+
} : undefined), SvgProps), {}, {
|
|
1092
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-svg'], SvgProps === null || SvgProps === void 0 ? void 0 : SvgProps.className, classes.svg]),
|
|
1093
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("defs", {
|
|
1094
|
+
ref: refs.defs,
|
|
1095
|
+
children: defs && defs.map((item_26, index_5) => (/*#__PURE__*/_react.default.cloneElement(item_26, {
|
|
1096
|
+
key: index_5
|
|
1097
|
+
})))
|
|
1098
|
+
}), pre, elements && elements.map(({
|
|
1099
|
+
item: item_27,
|
|
1100
|
+
element: element_1
|
|
1101
|
+
}, index_6) => {
|
|
1102
|
+
var _props;
|
|
1103
|
+
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];
|
|
1104
|
+
return /*#__PURE__*/_react.default.cloneElement(element_1, _objectSpread(_objectSpread({
|
|
1105
|
+
key: index_6
|
|
1106
|
+
}, elementTooltip ? {
|
|
1107
|
+
onMouseEnter: event_2 => {
|
|
1108
|
+
const rect__1 = event_2.target.getBoundingClientRect();
|
|
1109
|
+
onPointMouseEnter(_objectSpread(_objectSpread({}, item_27), {}, {
|
|
1110
|
+
rect: rect__1
|
|
1111
|
+
}));
|
|
1112
|
+
},
|
|
1113
|
+
onMouseLeave: onPointMouseLeave
|
|
1114
|
+
} : undefined), {}, {
|
|
1115
|
+
style: _objectSpread(_objectSpread({}, element_1 === null || element_1 === void 0 || (_props = element_1.props) === null || _props === void 0 ? void 0 : _props.style), !isVisible ? {
|
|
1116
|
+
opacity: '0',
|
|
1117
|
+
pointerEvents: 'none'
|
|
1118
|
+
} : undefined)
|
|
1119
|
+
}));
|
|
1120
|
+
}), children && _react.default.Children.toArray(children).map((element_2, index_7) => {
|
|
1121
|
+
var _element_2$props, _element_2$props2, _props2;
|
|
1122
|
+
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];
|
|
1123
|
+
return /*#__PURE__*/_react.default.cloneElement(element_2, _objectSpread(_objectSpread({
|
|
1124
|
+
key: index_7,
|
|
1125
|
+
refs: {
|
|
1126
|
+
wrapper: refs.wrapper.current,
|
|
1127
|
+
defs: refs.defs.current
|
|
1128
|
+
},
|
|
1129
|
+
rects,
|
|
1130
|
+
animate: element_2.props.animate !== undefined ? element_2.props.animate : animate,
|
|
1131
|
+
animateTimeout: element_2.props.animateTimeout !== undefined ? element_2.props.animateTimeout : animateTimeout,
|
|
1132
|
+
updateDefs: setDefs,
|
|
1133
|
+
updateLegend: setLegend
|
|
1134
|
+
}, elementTooltip ? {
|
|
1135
|
+
onMouseEnter: event_3 => {
|
|
1136
|
+
const rect__2 = event_3.target.getBoundingClientRect();
|
|
1137
|
+
onPointMouseEnter(_objectSpread(_objectSpread({}, element_2.props), {}, {
|
|
1138
|
+
rect: rect__2
|
|
1139
|
+
}));
|
|
1140
|
+
},
|
|
1141
|
+
onMouseLeave: onPointMouseLeave
|
|
1142
|
+
} : undefined), {}, {
|
|
1143
|
+
minMax: element_2.props.minMax !== undefined ? element_2.props.minMax : minMax,
|
|
1144
|
+
minX: element_2.props.minX !== undefined ? element_2.props.minX : minX,
|
|
1145
|
+
maxX: element_2.props.maxX !== undefined ? element_2.props.maxX : maxX,
|
|
1146
|
+
minY: element_2.props.minY !== undefined ? element_2.props.minY : minY,
|
|
1147
|
+
maxY: element_2.props.maxY !== undefined ? element_2.props.maxY : maxY,
|
|
1148
|
+
minMaxPadding: element_2.props.minMaxPadding !== undefined ? element_2.props.minMaxPadding : minMaxPadding,
|
|
1149
|
+
minPadding: element_2.props.minPadding !== undefined ? element_2.props.minPadding : minPadding,
|
|
1150
|
+
maxPadding: element_2.props.maxPadding !== undefined ? element_2.props.maxPadding : maxPadding,
|
|
1151
|
+
minPaddingX: element_2.props.minPaddingX !== undefined ? element_2.props.minPaddingX : minPaddingX,
|
|
1152
|
+
minPaddingY: element_2.props.minPaddingY !== undefined ? element_2.props.minPaddingY : minPaddingY,
|
|
1153
|
+
maxPaddingX: element_2.props.maxPaddingX !== undefined ? element_2.props.maxPaddingX : maxPaddingX,
|
|
1154
|
+
maxPaddingY: element_2.props.maxPaddingY !== undefined ? element_2.props.maxPaddingY : maxPaddingY,
|
|
1155
|
+
style: _objectSpread(_objectSpread({}, element_2 === null || element_2 === void 0 || (_props2 = element_2.props) === null || _props2 === void 0 ? void 0 : _props2.style), !isVisible_0 ? {
|
|
1156
|
+
opacity: '0',
|
|
1157
|
+
pointerEvents: 'none'
|
|
1158
|
+
} : undefined)
|
|
1159
|
+
}));
|
|
1160
|
+
}), additionalLines && /*#__PURE__*/(0, _jsxRuntime.jsx)("g", _objectSpread(_objectSpread({}, AdditionalLinesProps), {}, {
|
|
1161
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-additional-lines'], AdditionalLinesProps === null || AdditionalLinesProps === void 0 ? void 0 : AdditionalLinesProps.className, classes.additionalLines]),
|
|
1162
|
+
children: additionalLines
|
|
1163
|
+
})), guidelines && guidelinesIn && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1164
|
+
children: [['both', 'vertical'].includes(guidelines) && /*#__PURE__*/(0, _jsxRuntime.jsx)("path", _objectSpread(_objectSpread({
|
|
1165
|
+
d: `M ${(guidelinesPosition === null || guidelinesPosition === void 0 ? void 0 : guidelinesPosition.x) || 0} 0 ${(guidelinesPosition === null || guidelinesPosition === void 0 ? void 0 : guidelinesPosition.x) || 0} ${(rects === null || rects === void 0 || (_rects$wrapper3 = rects.wrapper) === null || _rects$wrapper3 === void 0 ? void 0 : _rects$wrapper3.height) || 0}`
|
|
1166
|
+
}, GuidelineProps), {}, {
|
|
1167
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-guidelines', 'onesy-Chart-guidelines-vertical'], GuidelineProps === null || GuidelineProps === void 0 ? void 0 : GuidelineProps.className, classes.guidelines, classes.guidelines_vertical])
|
|
1168
|
+
})), ['both', 'horizontal'].includes(guidelines) && /*#__PURE__*/(0, _jsxRuntime.jsx)("path", _objectSpread(_objectSpread({
|
|
1169
|
+
d: `M 0 ${(guidelinesPosition === null || guidelinesPosition === void 0 ? void 0 : guidelinesPosition.y) || 0} ${(rects === null || rects === void 0 || (_rects$wrapper4 = rects.wrapper) === null || _rects$wrapper4 === void 0 ? void 0 : _rects$wrapper4.width) || 0} ${(guidelinesPosition === null || guidelinesPosition === void 0 ? void 0 : guidelinesPosition.y) || 0}`
|
|
1170
|
+
}, GuidelineProps), {}, {
|
|
1171
|
+
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])
|
|
1172
|
+
}))]
|
|
1173
|
+
}), points__ && points && /*#__PURE__*/(0, _jsxRuntime.jsx)("g", _objectSpread(_objectSpread({}, PointsProps), {}, {
|
|
1174
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-points'], PointsProps === null || PointsProps === void 0 ? void 0 : PointsProps.className, classes.points]),
|
|
1175
|
+
children: points.map((item_28, index_8) => (/*#__PURE__*/_react.default.cloneElement(item_28, {
|
|
1176
|
+
key: index_8
|
|
1177
|
+
})))
|
|
1178
|
+
}))]
|
|
1179
|
+
})), borders && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1180
|
+
children: [borderTop && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1181
|
+
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])
|
|
1182
|
+
}), borderBottom && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1183
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-x', 'onesy-Chart-border-bottom'], classes.border, classes.borderX, classes.borderBottom])
|
|
1184
|
+
}), borderStart && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1185
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-y', 'onesy-Chart-border-start'], classes.border, classes.borderY, classes.boderStart])
|
|
1186
|
+
}), borderLeft && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1187
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-y', 'onesy-Chart-border-left'], classes.border, classes.borderY, classes.borderLeft])
|
|
1188
|
+
}), borderEnd && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1189
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-y', 'onesy-Chart-border-end'], classes.border, classes.borderY, classes.borderEnd])
|
|
1190
|
+
}), borderRight && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1191
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-border', 'onesy-Chart-border-y', 'onesy-Chart-border-right'], classes.border, classes.borderY, classes.borderRight])
|
|
1192
|
+
})]
|
|
1193
|
+
}), !!labels__ && labelsX && (labels === null || labels === void 0 ? void 0 : labels.x) && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, {
|
|
1194
|
+
gap: 0,
|
|
1195
|
+
direction: "row",
|
|
1196
|
+
align: "flex-start",
|
|
1197
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-labels', 'onesy-Chart-labels-x'], classes.labels, classes.labels_x]),
|
|
1198
|
+
children: labels.x.map((item_29, index_9) => {
|
|
1199
|
+
const itemProps = {
|
|
1200
|
+
key: index_9,
|
|
1201
|
+
version: 'b3',
|
|
1202
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-x'], classes.label, classes.label_x]),
|
|
1203
|
+
style: {
|
|
1204
|
+
left: `${item_29.percentage}%`
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
return (0, _utils.is)('function', labelRender) ? labelRender(_objectSpread(_objectSpread({}, item_29), {}, {
|
|
1208
|
+
axis: 'x',
|
|
1209
|
+
props: itemProps
|
|
1210
|
+
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
1211
|
+
version: "b3",
|
|
1212
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-x'], classes.label, classes.label_x]),
|
|
1213
|
+
style: {
|
|
1214
|
+
left: `${item_29.percentage}%`
|
|
1215
|
+
},
|
|
1216
|
+
children: (0, _utils.is)('function', labelResolve) ? labelResolve(item_29.label, 'x', item_29) : item_29.label
|
|
1217
|
+
}, index_9);
|
|
1218
|
+
})
|
|
1219
|
+
}), !!labels__ && labelsY && (labels === null || labels === void 0 ? void 0 : labels.y) && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, {
|
|
1220
|
+
gap: 0,
|
|
1221
|
+
direction: "column",
|
|
1222
|
+
align: "flex-end",
|
|
1223
|
+
justify: "center",
|
|
1224
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-labels', 'onesy-Chart-labels-y'], classes.labels, classes.labels_y]),
|
|
1225
|
+
children: labels.y.map((item_30, index_10) => (0, _utils.is)('function', labelRender) ? labelRender(_objectSpread(_objectSpread({}, item_30), {}, {
|
|
1226
|
+
axis: 'y'
|
|
1227
|
+
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
1228
|
+
version: "b3",
|
|
1229
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-y'], classes.label, classes.label_y]),
|
|
1230
|
+
style: {
|
|
1231
|
+
bottom: `${item_30.percentage}%`
|
|
1232
|
+
},
|
|
1233
|
+
children: (0, _utils.is)('function', labelResolve) ? labelResolve(item_30.label, 'y', item_30) : item_30.label
|
|
1234
|
+
}, index_10))
|
|
1235
|
+
}), !!marks__ && marksX && (marks === null || marks === void 0 ? void 0 : marks.x) && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, {
|
|
1236
|
+
gap: 0,
|
|
1237
|
+
direction: "row",
|
|
1238
|
+
align: "flex-start",
|
|
1239
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-marks', 'onesy-Chart-marks-x'], classes.marks, classes.marks_x]),
|
|
1240
|
+
children: marks.x.map((item_31, index_11) => /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
1241
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-mark', 'onesy-Chart-mark-x'], classes.mark, classes.mark_x]),
|
|
1242
|
+
style: {
|
|
1243
|
+
left: `${item_31.percentage}%`
|
|
1244
|
+
},
|
|
1245
|
+
children: item_31.mark
|
|
1246
|
+
}, index_11))
|
|
1247
|
+
}), !!marks__ && marksY && (marks === null || marks === void 0 ? void 0 : marks.y) && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, {
|
|
1248
|
+
gap: 0,
|
|
1249
|
+
direction: "column",
|
|
1250
|
+
align: "flex-end",
|
|
1251
|
+
justify: "center",
|
|
1252
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-marks', 'onesy-Chart-marks-y'], classes.marks, classes.marks_y]),
|
|
1253
|
+
children: marks.y.map((item_32, index_12) => /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
1254
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-mark', 'onesy-Chart-mark-y'], classes.mark, classes.mark_y]),
|
|
1255
|
+
style: {
|
|
1256
|
+
bottom: `${item_32.percentage}%`
|
|
1257
|
+
},
|
|
1258
|
+
children: item_32.mark
|
|
1259
|
+
}, index_12))
|
|
1260
|
+
}), (names === null || names === void 0 ? void 0 : names.x) && nameX && /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
1261
|
+
version: "b2",
|
|
1262
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-name', 'onesy-Chart-name-x'], classes.name, classes.name_x]),
|
|
1263
|
+
children: names.x
|
|
1264
|
+
}), (names === null || names === void 0 ? void 0 : names.y) && nameY && /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
1265
|
+
version: "b2",
|
|
1266
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-name', 'onesy-Chart-name-y'], classes.name, classes.name_y]),
|
|
1267
|
+
children: names.y
|
|
1268
|
+
})]
|
|
1269
|
+
});
|
|
1191
1270
|
}
|
|
1192
|
-
}
|
|
1193
|
-
})),
|
|
1194
|
-
gap:
|
|
1195
|
-
direction: "column",
|
|
1196
|
-
align: "flex-end",
|
|
1197
|
-
justify: "center",
|
|
1198
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-labels', 'onesy-Chart-labels-y'], classes.labels, classes.labels_y])
|
|
1199
|
-
}, labels.y.map((item_30, index_10) => (0, _utils.is)('function', labelRender) ? labelRender(_objectSpread(_objectSpread({}, item_30), {}, {
|
|
1200
|
-
axis: 'y'
|
|
1201
|
-
})) : /*#__PURE__*/_react.default.createElement(Type, {
|
|
1202
|
-
key: index_10,
|
|
1203
|
-
version: "b3",
|
|
1204
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-label', 'onesy-Chart-label-y'], classes.label, classes.label_y]),
|
|
1205
|
-
style: {
|
|
1206
|
-
bottom: `${item_30.percentage}%`
|
|
1207
|
-
}
|
|
1208
|
-
}, (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, {
|
|
1209
|
-
gap: 0,
|
|
1271
|
+
})
|
|
1272
|
+
})), legend__ && legendPosition === 'bottom' && legend && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, _objectSpread(_objectSpread({
|
|
1273
|
+
gap: 2,
|
|
1210
1274
|
direction: "row",
|
|
1211
|
-
align: "
|
|
1212
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-marks', 'onesy-Chart-marks-x'], classes.marks, classes.marks_x])
|
|
1213
|
-
}, marks.x.map((item_31, index_11) => /*#__PURE__*/_react.default.createElement("span", {
|
|
1214
|
-
key: index_11,
|
|
1215
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-mark', 'onesy-Chart-mark-x'], classes.mark, classes.mark_x]),
|
|
1216
|
-
style: {
|
|
1217
|
-
left: `${item_31.percentage}%`
|
|
1218
|
-
}
|
|
1219
|
-
}, item_31.mark))), !!marks__ && marksY && (marks === null || marks === void 0 ? void 0 : marks.y) && /*#__PURE__*/_react.default.createElement(Line, {
|
|
1220
|
-
gap: 0,
|
|
1221
|
-
direction: "column",
|
|
1222
|
-
align: "flex-end",
|
|
1275
|
+
align: "center",
|
|
1223
1276
|
justify: "center",
|
|
1224
|
-
|
|
1225
|
-
},
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
},
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1277
|
+
wrap: "wrap"
|
|
1278
|
+
}, LegendProps), {}, {
|
|
1279
|
+
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]),
|
|
1280
|
+
children: legend.map(({
|
|
1281
|
+
item: item_33,
|
|
1282
|
+
element: element_3
|
|
1283
|
+
}) => {
|
|
1284
|
+
var _element_3$props;
|
|
1285
|
+
return /*#__PURE__*/_react.default.cloneElement(element_3, {
|
|
1286
|
+
onClick: () => onLegendClick(item_33.name),
|
|
1287
|
+
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])
|
|
1288
|
+
});
|
|
1289
|
+
})
|
|
1290
|
+
})), tooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)(Append, _objectSpread({
|
|
1291
|
+
open: true,
|
|
1292
|
+
offset: [16, 16],
|
|
1293
|
+
padding: [14, 14],
|
|
1294
|
+
element: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1295
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-append-wrapper'], classes.append_wrapper]),
|
|
1296
|
+
style: _objectSpread({}, refs.appendStyle.current),
|
|
1297
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Grow, {
|
|
1298
|
+
in: append === null || append === void 0 ? void 0 : append.open,
|
|
1299
|
+
onAdded: () => {
|
|
1300
|
+
refs.appendStyle.current = {
|
|
1301
|
+
transition: theme.methods.transitions.make('transform', {
|
|
1302
|
+
duration: 150
|
|
1303
|
+
})
|
|
1304
|
+
};
|
|
1305
|
+
},
|
|
1306
|
+
onEnter: () => {
|
|
1307
|
+
refs.appendStyle.current = {
|
|
1308
|
+
transition: theme.methods.transitions.make('transform', {
|
|
1309
|
+
duration: 150
|
|
1310
|
+
})
|
|
1311
|
+
};
|
|
1312
|
+
},
|
|
1313
|
+
onExited: () => {
|
|
1314
|
+
refs.appendStyle.current = {};
|
|
1315
|
+
},
|
|
1316
|
+
add: true,
|
|
1317
|
+
children: (append === null || append === void 0 ? void 0 : append.element) || /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, {
|
|
1318
|
+
tonal: tonal,
|
|
1319
|
+
color: color,
|
|
1320
|
+
elevation: 1,
|
|
1321
|
+
gap: 0.4,
|
|
1322
|
+
direction: "column",
|
|
1323
|
+
Component: Surface,
|
|
1324
|
+
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-append'], classes.append]),
|
|
1325
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, {
|
|
1326
|
+
gap: 1,
|
|
1327
|
+
direction: "row",
|
|
1328
|
+
align: "center",
|
|
1329
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
1330
|
+
version: "b3",
|
|
1331
|
+
style: {
|
|
1332
|
+
fontWeight: 600
|
|
1333
|
+
},
|
|
1334
|
+
children: (names === null || names === void 0 ? void 0 : names.y) || 'y'
|
|
1335
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
1336
|
+
version: "b3",
|
|
1337
|
+
children: (0, _utils.is)('function', labelResolve) ? labelResolve(append === null || append === void 0 || (_append$values = append.values) === null || _append$values === void 0 ? void 0 : _append$values[1], 'y', append, 'individual') : append === null || append === void 0 || (_append$values2 = append.values) === null || _append$values2 === void 0 ? void 0 : _append$values2[1]
|
|
1338
|
+
})]
|
|
1339
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, {
|
|
1340
|
+
gap: 1,
|
|
1341
|
+
direction: "row",
|
|
1342
|
+
align: "center",
|
|
1343
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
1344
|
+
version: "b3",
|
|
1345
|
+
style: {
|
|
1346
|
+
fontWeight: 600
|
|
1347
|
+
},
|
|
1348
|
+
children: (names === null || names === void 0 ? void 0 : names.x) || 'x'
|
|
1349
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Type, {
|
|
1350
|
+
version: "b3",
|
|
1351
|
+
children: (0, _utils.is)('function', labelResolve) ? labelResolve(append === null || append === void 0 || (_append$values3 = append.values) === null || _append$values3 === void 0 ? void 0 : _append$values3[0], 'x', append, 'individual') : append === null || append === void 0 || (_append$values4 = append.values) === null || _append$values4 === void 0 ? void 0 : _append$values4[0]
|
|
1352
|
+
})]
|
|
1353
|
+
})]
|
|
1275
1354
|
})
|
|
1276
|
-
}
|
|
1277
|
-
},
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
},
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
elevation: 1,
|
|
1286
|
-
gap: 0.4,
|
|
1287
|
-
direction: "column",
|
|
1288
|
-
Component: Surface,
|
|
1289
|
-
className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('Chart', theme) && ['onesy-Chart-append'], classes.append])
|
|
1290
|
-
}, /*#__PURE__*/_react.default.createElement(Line, {
|
|
1291
|
-
gap: 1,
|
|
1292
|
-
direction: "row",
|
|
1293
|
-
align: "center"
|
|
1294
|
-
}, /*#__PURE__*/_react.default.createElement(Type, {
|
|
1295
|
-
version: "b3",
|
|
1296
|
-
style: {
|
|
1297
|
-
fontWeight: 600
|
|
1298
|
-
}
|
|
1299
|
-
}, (names === null || names === void 0 ? void 0 : names.y) || 'y'), /*#__PURE__*/_react.default.createElement(Type, {
|
|
1300
|
-
version: "b3"
|
|
1301
|
-
}, (0, _utils.is)('function', labelResolve) ? labelResolve(append === null || append === void 0 || (_append$values = append.values) === null || _append$values === void 0 ? void 0 : _append$values[1], 'y', append, 'individual') : append === null || append === void 0 || (_append$values2 = append.values) === null || _append$values2 === void 0 ? void 0 : _append$values2[1])), /*#__PURE__*/_react.default.createElement(Line, {
|
|
1302
|
-
gap: 1,
|
|
1303
|
-
direction: "row",
|
|
1304
|
-
align: "center"
|
|
1305
|
-
}, /*#__PURE__*/_react.default.createElement(Type, {
|
|
1306
|
-
version: "b3",
|
|
1307
|
-
style: {
|
|
1308
|
-
fontWeight: 600
|
|
1309
|
-
}
|
|
1310
|
-
}, (names === null || names === void 0 ? void 0 : names.x) || 'x'), /*#__PURE__*/_react.default.createElement(Type, {
|
|
1311
|
-
version: "b3"
|
|
1312
|
-
}, (0, _utils.is)('function', labelResolve) ? labelResolve(append === null || append === void 0 || (_append$values3 = append.values) === null || _append$values3 === void 0 ? void 0 : _append$values3[0], 'x', append, 'individual') : append === null || append === void 0 || (_append$values4 = append.values) === null || _append$values4 === void 0 ? void 0 : _append$values4[0]))))),
|
|
1313
|
-
anchor: append === null || append === void 0 ? void 0 : append.rect,
|
|
1314
|
-
portal: true,
|
|
1315
|
-
alignment: "center",
|
|
1316
|
-
position: "top"
|
|
1317
|
-
}, AppendProps)));
|
|
1318
|
-
});
|
|
1355
|
+
})
|
|
1356
|
+
}),
|
|
1357
|
+
anchor: append === null || append === void 0 ? void 0 : append.rect,
|
|
1358
|
+
portal: true,
|
|
1359
|
+
alignment: "center",
|
|
1360
|
+
position: "top"
|
|
1361
|
+
}, AppendProps))]
|
|
1362
|
+
}));
|
|
1363
|
+
};
|
|
1319
1364
|
Chart.displayName = 'onesy-Chart';
|
|
1320
1365
|
var _default = exports.default = Chart;
|