@spaced-out/ui-design-system 0.5.6 → 0.5.7-beta.1
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/.cspell/custom-words.txt +3 -0
- package/.github/CODEOWNERS +0 -5
- package/.github/workflows/pull_request_checks.yml +4 -4
- package/.storybook/public/component-parent-levels.json +95 -0
- package/.type-coverage +13 -0
- package/CHANGELOG.md +53 -0
- package/cspell.json +0 -1
- package/design-tokens/size/base-size.json +3 -0
- package/eslint.config.mjs +62 -29
- package/lib/components/AIPromptFlow/AIPromptFlow.stories.d.ts.map +1 -1
- package/lib/components/Accordion/Accordion.d.ts +2 -2
- package/lib/components/Accordion/Accordion.d.ts.map +1 -1
- package/lib/components/Accordion/AccordionGroup.d.ts +2 -2
- package/lib/components/Accordion/AccordionGroup.d.ts.map +1 -1
- package/lib/components/Accordion/AccordionGroup.stories.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts +5 -5
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js +4 -13
- package/lib/components/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/lib/components/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/lib/components/AvatarGroup/AvatarGroup.js +27 -14
- package/lib/components/Badge/Badge.d.ts +7 -8
- package/lib/components/Badge/Badge.d.ts.map +1 -1
- package/lib/components/Badge/Badge.stories.d.ts.map +1 -1
- package/lib/components/BadgedIcon/BadgedIcon.d.ts +2 -2
- package/lib/components/BadgedIcon/BadgedIcon.d.ts.map +1 -1
- package/lib/components/BadgedIcon/BadgedIcon.js +1 -4
- package/lib/components/Banner/Banner.d.ts +2 -3
- package/lib/components/Banner/Banner.d.ts.map +1 -1
- package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.d.ts +2 -3
- package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.d.ts.map +1 -1
- package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.js +2 -4
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.js +5 -6
- package/lib/components/Button/Button.d.ts +7 -8
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +7 -21
- package/lib/components/ButtonDropdown/ButtonDropdown.d.ts +3 -4
- package/lib/components/ButtonDropdown/ButtonDropdown.d.ts.map +1 -1
- package/lib/components/ButtonDropdown/ButtonDropdown.js +4 -14
- package/lib/components/ButtonDropdown/ButtonDropdown.stories.d.ts +70 -70
- package/lib/components/ButtonDropdown/ButtonDropdown.stories.d.ts.map +1 -1
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.d.ts +5 -6
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.d.ts.map +1 -1
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.js +1 -9
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.stories.d.ts +109 -109
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.stories.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTab/ButtonTab.d.ts +2 -2
- package/lib/components/ButtonTabs/ButtonTab/ButtonTab.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTabDropdown.d.ts +2 -3
- package/lib/components/ButtonTabs/ButtonTabDropdown.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTabDropdown.js +5 -14
- package/lib/components/ButtonTabs/ButtonTabs.d.ts +2 -2
- package/lib/components/ButtonTabs/ButtonTabs.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTabs.js +2 -3
- package/lib/components/Card/Card.d.ts +9 -7
- package/lib/components/Card/Card.d.ts.map +1 -1
- package/lib/components/Card/Card.js +2 -7
- package/lib/components/Charts/ChartWrapper/ChartWrapper.d.ts +9 -4
- package/lib/components/Charts/ChartWrapper/ChartWrapper.d.ts.map +1 -1
- package/lib/components/Charts/ChartWrapper/ChartWrapper.js +6 -8
- package/lib/components/Charts/ColumnChart/ColumnChart.d.ts +8 -5
- package/lib/components/Charts/ColumnChart/ColumnChart.d.ts.map +1 -1
- package/lib/components/Charts/ColumnChart/ColumnChart.js +16 -10
- package/lib/components/Charts/DonutChart/DonutChart.d.ts +4 -5
- package/lib/components/Charts/DonutChart/DonutChart.d.ts.map +1 -1
- package/lib/components/Charts/DonutChart/DonutChart.js +1 -2
- package/lib/components/Charts/FunnelChart/FunnelChart.d.ts +4 -5
- package/lib/components/Charts/FunnelChart/FunnelChart.d.ts.map +1 -1
- package/lib/components/Charts/LineChart/LineChart.d.ts +4 -5
- package/lib/components/Charts/LineChart/LineChart.d.ts.map +1 -1
- package/lib/components/Charts/SankeyChart/SankeyChart.d.ts +21 -0
- package/lib/components/Charts/SankeyChart/SankeyChart.d.ts.map +1 -0
- package/lib/components/Charts/SankeyChart/SankeyChart.js +104 -0
- package/lib/components/Charts/SankeyChart/SankeyChart.module.css +22 -0
- package/lib/components/Charts/SankeyChart/SankeyChart.stories.d.ts +267 -0
- package/lib/components/Charts/SankeyChart/SankeyChart.stories.d.ts.map +1 -0
- package/lib/components/Charts/SankeyChart/index.d.ts +2 -0
- package/lib/components/Charts/SankeyChart/index.d.ts.map +1 -0
- package/lib/components/Charts/SankeyChart/index.js +16 -0
- package/lib/components/Charts/SpiderChart/SpiderChart.d.ts +4 -5
- package/lib/components/Charts/SpiderChart/SpiderChart.d.ts.map +1 -1
- package/lib/components/Charts/SpiderChart/SpiderChart.module.css +7 -2
- package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts +24 -0
- package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts.map +1 -0
- package/lib/components/Charts/StackedBarChart/StackedBarChart.js +78 -0
- package/lib/components/Charts/StackedBarChart/StackedBarChart.module.css +22 -0
- package/lib/components/Charts/StackedBarChart/StackedBarChart.stories.d.ts +192 -0
- package/lib/components/Charts/StackedBarChart/StackedBarChart.stories.d.ts.map +1 -0
- package/lib/components/Charts/StackedBarChart/index.d.ts +2 -0
- package/lib/components/Charts/StackedBarChart/index.d.ts.map +1 -0
- package/lib/components/Charts/StackedBarChart/index.js +16 -0
- package/lib/components/Charts/index.d.ts +2 -0
- package/lib/components/Charts/index.d.ts.map +1 -1
- package/lib/components/Charts/index.js +22 -0
- package/lib/components/ChatBubble/ChatBubble.d.ts +14 -14
- package/lib/components/ChatBubble/ChatBubble.d.ts.map +1 -1
- package/lib/components/ChatBubble/ChatBubble.js +11 -4
- package/lib/components/Checkbox/Checkbox.d.ts +2 -3
- package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +1 -2
- package/lib/components/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/lib/components/Checkbox/CheckboxGroup.d.ts +2 -2
- package/lib/components/Checkbox/CheckboxGroup.d.ts.map +1 -1
- package/lib/components/Checkbox/CheckboxGroup.js +8 -12
- package/lib/components/Checkbox/CheckboxGroup.stories.d.ts +2 -3
- package/lib/components/Checkbox/CheckboxGroup.stories.d.ts.map +1 -1
- package/lib/components/Chip/Chip.d.ts +10 -11
- package/lib/components/Chip/Chip.d.ts.map +1 -1
- package/lib/components/Chip/Chip.js +7 -13
- package/lib/components/CircularLoader/CircularLoader.d.ts +2 -2
- package/lib/components/CircularLoader/CircularLoader.d.ts.map +1 -1
- package/lib/components/CollapsibleCard/CollapsibleCard.d.ts +6 -6
- package/lib/components/CollapsibleCard/CollapsibleCard.d.ts.map +1 -1
- package/lib/components/Combobox/Combobox.d.ts +16 -16
- package/lib/components/Combobox/Combobox.d.ts.map +1 -1
- package/lib/components/Combobox/Combobox.js +16 -19
- package/lib/components/Combobox/Combobox.stories.d.ts.map +1 -1
- package/lib/components/Combobox/helper.d.ts.map +1 -1
- package/lib/components/Combobox/helper.js +0 -1
- package/lib/components/ConditionalWrapper/ConditionalWrapper.d.ts +2 -2
- package/lib/components/ConditionalWrapper/ConditionalWrapper.d.ts.map +1 -1
- package/lib/components/DateRangePicker/Calendar.d.ts +3 -3
- package/lib/components/DateRangePicker/Calendar.d.ts.map +1 -1
- package/lib/components/DateRangePicker/Calendar.js +2 -6
- package/lib/components/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/lib/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/lib/components/DateRangePicker/DateRangePicker.stories.d.ts.map +1 -1
- package/lib/components/DateRangePicker/DateRangeWrapper.d.ts +2 -2
- package/lib/components/DateRangePicker/DateRangeWrapper.d.ts.map +1 -1
- package/lib/components/DateRangePicker/DateRangeWrapper.js +6 -14
- package/lib/components/DateRangePicker/Day.d.ts +2 -2
- package/lib/components/DateRangePicker/Day.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.d.ts +10 -11
- package/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/components/Disclaimer/Disclaimer.d.ts.map +1 -1
- package/lib/components/Disclaimer/Disclaimer.js +0 -1
- package/lib/components/Dropdown/Dropdown.d.ts +3 -4
- package/lib/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/Dropdown/Dropdown.js +17 -18
- package/lib/components/Dropdown/Dropdown.stories.d.ts.map +1 -1
- package/lib/components/Dropdown/SimpleDropdown.d.ts +5 -6
- package/lib/components/Dropdown/SimpleDropdown.d.ts.map +1 -1
- package/lib/components/Dropdown/SimpleDropdown.js +1 -7
- package/lib/components/Dropdown/SimpleDropdown.stories.d.ts.map +1 -1
- package/lib/components/EmptyState/EmptyState.d.ts +2 -2
- package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/lib/components/ErrorMessage/ErrorMessage.d.ts +2 -2
- package/lib/components/ErrorMessage/ErrorMessage.d.ts.map +1 -1
- package/lib/components/FileUpload/FileBlock/FileBlock.d.ts +2 -2
- package/lib/components/FileUpload/FileBlock/FileBlock.d.ts.map +1 -1
- package/lib/components/FileUpload/FileUpload.d.ts +14 -13
- package/lib/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/lib/components/FileUpload/FileUpload.js +2 -7
- package/lib/components/FileUpload/FileUpload.stories.d.ts +2 -1
- package/lib/components/FileUpload/FileUpload.stories.d.ts.map +1 -1
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.d.ts +3 -4
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.d.ts.map +1 -1
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.js +1 -9
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.stories.d.ts.map +1 -1
- package/lib/components/FocusManager/FocusManager.d.ts +2 -2
- package/lib/components/FocusManager/FocusManager.d.ts.map +1 -1
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.d.ts +4 -5
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.d.ts.map +1 -1
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.js +21 -17
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.stories.d.ts.map +1 -1
- package/lib/components/FormTitleWrapper/FormTitleWrapper.d.ts +2 -2
- package/lib/components/FormTitleWrapper/FormTitleWrapper.d.ts.map +1 -1
- package/lib/components/Grid/Col.stories.d.ts +1 -1
- package/lib/components/Grid/Grid.d.ts +7 -7
- package/lib/components/Grid/Grid.d.ts.map +1 -1
- package/lib/components/Grid/Grid.js +6 -13
- package/lib/components/Grid/GridPatterns.stories.d.ts +1 -1
- package/lib/components/Grid/GridPatterns.stories.d.ts.map +1 -1
- package/lib/components/Grid/Row.stories.d.ts +1 -1
- package/lib/components/Icon/ClickableIcon.d.ts +6 -6
- package/lib/components/Icon/ClickableIcon.d.ts.map +1 -1
- package/lib/components/Icon/ClickableIcon.js +1 -1
- package/lib/components/Icon/Icon.d.ts +3 -3
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +1 -3
- package/lib/components/Icon/Icon.stories.d.ts +2 -2
- package/lib/components/Icon/Icon.stories.d.ts.map +1 -1
- package/lib/components/Icon/SemanticIcon.d.ts +2 -3
- package/lib/components/Icon/SemanticIcon.d.ts.map +1 -1
- package/lib/components/InContextAlert/InContextAlert.d.ts +4 -5
- package/lib/components/InContextAlert/InContextAlert.d.ts.map +1 -1
- package/lib/components/InContextAlert/InContextAlert.js +8 -6
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts +3 -4
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts.map +1 -1
- package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.js +7 -6
- package/lib/components/InfinitePagination/InfinitePagination.d.ts.map +1 -1
- package/lib/components/InfinitePagination/InfinitePagination.js +10 -11
- package/lib/components/InfinitePagination/InfinitePagination.stories.d.ts.map +1 -1
- package/lib/components/InlineDropdown/InlineDropdown.d.ts +3 -4
- package/lib/components/InlineDropdown/InlineDropdown.d.ts.map +1 -1
- package/lib/components/InlineDropdown/InlineDropdown.js +9 -14
- package/lib/components/InlineDropdown/InlineDropdown.stories.d.ts +45 -45
- package/lib/components/InlineDropdown/InlineDropdown.stories.d.ts.map +1 -1
- package/lib/components/InlineDropdown/SimpleInlineDropdown.d.ts +5 -6
- package/lib/components/InlineDropdown/SimpleInlineDropdown.d.ts.map +1 -1
- package/lib/components/InlineDropdown/SimpleInlineDropdown.js +2 -11
- package/lib/components/InlineDropdown/SimpleInlineDropdown.stories.d.ts +83 -83
- package/lib/components/InlineDropdown/SimpleInlineDropdown.stories.d.ts.map +1 -1
- package/lib/components/Input/Input.d.ts +17 -16
- package/lib/components/Input/Input.d.ts.map +1 -1
- package/lib/components/Input/Input.js +7 -20
- package/lib/components/KPIBox/KPIBox.d.ts +2 -2
- package/lib/components/KPIBox/KPIBox.d.ts.map +1 -1
- package/lib/components/LinearLoader/LinearLoader.d.ts +2 -2
- package/lib/components/LinearLoader/LinearLoader.d.ts.map +1 -1
- package/lib/components/LinearLoader/LinearLoader.js +2 -2
- package/lib/components/Link/Link.d.ts +5 -6
- package/lib/components/Link/Link.d.ts.map +1 -1
- package/lib/components/Link/Link.js +4 -13
- package/lib/components/Menu/Menu.d.ts +12 -12
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.js +3 -5
- package/lib/components/Menu/Menu.stories.d.ts.map +1 -1
- package/lib/components/Menu/MenuOptionButton.d.ts +2 -3
- package/lib/components/Menu/MenuOptionButton.d.ts.map +1 -1
- package/lib/components/Menu/MenuOptionButton.js +0 -1
- package/lib/components/Modal/Modal.d.ts +12 -30
- package/lib/components/Modal/Modal.d.ts.map +1 -1
- package/lib/components/Modal/Modal.js +5 -8
- package/lib/components/Notification/Notification.d.ts +6 -7
- package/lib/components/Notification/Notification.d.ts.map +1 -1
- package/lib/components/Notification/Notification.js +7 -4
- package/lib/components/OptionButton/OptionButton.d.ts +6 -7
- package/lib/components/OptionButton/OptionButton.d.ts.map +1 -1
- package/lib/components/OptionButton/OptionButton.js +2 -2
- package/lib/components/OptionButton/OptionButton.stories.d.ts.map +1 -1
- package/lib/components/OptionButton/SimpleOptionButton.d.ts +6 -7
- package/lib/components/OptionButton/SimpleOptionButton.d.ts.map +1 -1
- package/lib/components/OptionButton/SimpleOptionButton.js +1 -7
- package/lib/components/OptionButton/SimpleOptionButton.stories.d.ts +55 -55
- package/lib/components/OptionButton/SimpleOptionButton.stories.d.ts.map +1 -1
- package/lib/components/PageTitle/PageTitle.d.ts +9 -8
- package/lib/components/PageTitle/PageTitle.d.ts.map +1 -1
- package/lib/components/PageTitle/PageTitle.js +15 -10
- package/lib/components/PageTitle/PageTitle.stories.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.d.ts +10 -12
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.stories.d.ts +1 -9
- package/lib/components/Pagination/Pagination.stories.d.ts.map +1 -1
- package/lib/components/Pagination/PaginationItem.d.ts.map +1 -1
- package/lib/components/Pagination/PaginationItem.js +0 -3
- package/lib/components/Panel/Panel.d.ts +9 -10
- package/lib/components/Panel/Panel.d.ts.map +1 -1
- package/lib/components/Panel/Panel.stories.d.ts.map +1 -1
- package/lib/components/ProgressDonut/ProgressDonut.d.ts +2 -2
- package/lib/components/ProgressDonut/ProgressDonut.d.ts.map +1 -1
- package/lib/components/ProgressDonut/ProgressDonut.js +2 -3
- package/lib/components/PromptChip/PromptChip.d.ts.map +1 -1
- package/lib/components/PromptChip/PromptChip.js +6 -5
- package/lib/components/PromptInput/PromptInput.d.ts +7 -7
- package/lib/components/PromptInput/PromptInput.d.ts.map +1 -1
- package/lib/components/PromptInput/PromptInput.js +0 -7
- package/lib/components/RadioButton/RadioButton.d.ts +2 -3
- package/lib/components/RadioButton/RadioButton.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioButton.js +1 -2
- package/lib/components/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioGroup.d.ts +2 -2
- package/lib/components/RadioButton/RadioGroup.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioGroup.js +2 -1
- package/lib/components/RadioButton/RadioGroup.stories.d.ts.map +1 -1
- package/lib/components/RadioTile/RadioTile.d.ts +2 -2
- package/lib/components/RadioTile/RadioTile.d.ts.map +1 -1
- package/lib/components/RadioTile/RadioTile.js +1 -3
- package/lib/components/RadioTile/RadioTile.stories.d.ts.map +1 -1
- package/lib/components/RangeSlider/RangeSlider.d.ts +2 -2
- package/lib/components/RangeSlider/RangeSlider.d.ts.map +1 -1
- package/lib/components/RangeSlider/RangeSlider.js +0 -3
- package/lib/components/Rating/Rating.d.ts +2 -2
- package/lib/components/Rating/Rating.d.ts.map +1 -1
- package/lib/components/ScoreBar/ScoreBar.d.ts +2 -2
- package/lib/components/ScoreBar/ScoreBar.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.d.ts +2 -3
- package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/lib/components/Separator/Separator.d.ts +2 -2
- package/lib/components/Separator/Separator.d.ts.map +1 -1
- package/lib/components/Shimmer/Shimmer.d.ts +6 -6
- package/lib/components/Shimmer/Shimmer.d.ts.map +1 -1
- package/lib/components/Shimmer/Shimmer.js +1 -3
- package/lib/components/SideMenuLink/SideMenuLink.d.ts +2 -2
- package/lib/components/SideMenuLink/SideMenuLink.d.ts.map +1 -1
- package/lib/components/SideMenuLink/SideMenuLink.js +3 -9
- package/lib/components/SideMenuLink/SideMenuLink.stories.d.ts.map +1 -1
- package/lib/components/StatusIndicator/StatusIndicator.d.ts +2 -2
- package/lib/components/StatusIndicator/StatusIndicator.d.ts.map +1 -1
- package/lib/components/Stepper/Step/Step.d.ts +2 -2
- package/lib/components/Stepper/Step/Step.d.ts.map +1 -1
- package/lib/components/Stepper/Step/Step.js +13 -10
- package/lib/components/Stepper/Step/StepContent.d.ts +2 -2
- package/lib/components/Stepper/Step/StepContent.d.ts.map +1 -1
- package/lib/components/Stepper/Step/StepLabel.d.ts +2 -2
- package/lib/components/Stepper/Step/StepLabel.d.ts.map +1 -1
- package/lib/components/Stepper/Stepper.d.ts +2 -2
- package/lib/components/Stepper/Stepper.d.ts.map +1 -1
- package/lib/components/Stepper/Stepper.js +23 -8
- package/lib/components/Stepper/Stepper.stories.d.ts.map +1 -1
- package/lib/components/StickyBar/StickyBar.d.ts +4 -4
- package/lib/components/StickyBar/StickyBar.d.ts.map +1 -1
- package/lib/components/SubMenu/SubMenu.d.ts +2 -2
- package/lib/components/SubMenu/SubMenu.d.ts.map +1 -1
- package/lib/components/SubMenu/SubMenuGroup.d.ts +2 -2
- package/lib/components/SubMenu/SubMenuGroup.d.ts.map +1 -1
- package/lib/components/SubMenu/SubMenuGroup.js +14 -11
- package/lib/components/SubMenu/SubMenuItem.d.ts +8 -8
- package/lib/components/SubMenu/SubMenuItem.d.ts.map +1 -1
- package/lib/components/SubMenu/SubMenuItem.js +16 -24
- package/lib/components/SubMenu/SubMenuLink.d.ts +3 -3
- package/lib/components/SubMenu/SubMenuLink.d.ts.map +1 -1
- package/lib/components/SubMenu/SubMenuLink.js +4 -8
- package/lib/components/Table/BasicTable.stories.d.ts +6 -6
- package/lib/components/Table/BasicTable.stories.d.ts.map +1 -1
- package/lib/components/Table/BulkActions.stories.d.ts.map +1 -1
- package/lib/components/Table/Cell.d.ts +3 -3
- package/lib/components/Table/Cell.d.ts.map +1 -1
- package/lib/components/Table/Cell.js +3 -7
- package/lib/components/Table/DefaultRow.d.ts +4 -4
- package/lib/components/Table/DefaultRow.d.ts.map +1 -1
- package/lib/components/Table/DefaultTableHeader.d.ts +4 -4
- package/lib/components/Table/DefaultTableHeader.d.ts.map +1 -1
- package/lib/components/Table/DefaultTableHeader.js +2 -9
- package/lib/components/Table/InlineEdit.stories.d.ts.map +1 -1
- package/lib/components/Table/StaticTable.d.ts.map +1 -1
- package/lib/components/Table/StaticTable.js +13 -56
- package/lib/components/Table/Table.d.ts +7 -7
- package/lib/components/Table/Table.d.ts.map +1 -1
- package/lib/components/Table/Table.js +2 -24
- package/lib/components/Table/TableActionBar.d.ts +2 -2
- package/lib/components/Table/TableActionBar.d.ts.map +1 -1
- package/lib/components/Table/TableBottomBar.d.ts +2 -2
- package/lib/components/Table/TableBottomBar.d.ts.map +1 -1
- package/lib/components/Table/TableTopBar.d.ts +2 -2
- package/lib/components/Table/TableTopBar.d.ts.map +1 -1
- package/lib/components/Table/hooks.d.ts.map +1 -1
- package/lib/components/Table/hooks.js +4 -12
- package/lib/components/Tabs/Tab/Tab.d.ts +6 -4
- package/lib/components/Tabs/Tab/Tab.d.ts.map +1 -1
- package/lib/components/Tabs/Tab/Tab.js +28 -8
- package/lib/components/Tabs/Tab/Tab.module.css +1 -1
- package/lib/components/Tabs/TabList/TabDropdown.d.ts +2 -2
- package/lib/components/Tabs/TabList/TabDropdown.d.ts.map +1 -1
- package/lib/components/Tabs/TabList/TabDropdown.js +3 -9
- package/lib/components/Tabs/TabList/TabList.d.ts +4 -3
- package/lib/components/Tabs/TabList/TabList.d.ts.map +1 -1
- package/lib/components/Tabs/TabList/TabList.js +40 -50
- package/lib/components/Tabs/TabList/TabList.stories.d.ts +22 -0
- package/lib/components/Tabs/TabList/TabList.stories.d.ts.map +1 -1
- package/lib/components/Text/Text.d.ts +4 -4
- package/lib/components/Text/Text.d.ts.map +1 -1
- package/lib/components/Text/Text.js +0 -1
- package/lib/components/TextTile/TextTile.d.ts +2 -2
- package/lib/components/TextTile/TextTile.d.ts.map +1 -1
- package/lib/components/Textarea/Textarea.d.ts +6 -7
- package/lib/components/Textarea/Textarea.d.ts.map +1 -1
- package/lib/components/Textarea/Textarea.js +7 -17
- package/lib/components/Timeline/Timeline.d.ts +2 -2
- package/lib/components/Timeline/Timeline.d.ts.map +1 -1
- package/lib/components/Timeline/Timeline.js +20 -14
- package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts +2 -2
- package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts.map +1 -1
- package/lib/components/Timeline/TimelineItem/TimelineItem.js +2 -9
- package/lib/components/Timeline/TimelineItem/TimelineItem.stories.d.ts.map +1 -1
- package/lib/components/Toast/Toast.d.ts +8 -8
- package/lib/components/Toast/Toast.d.ts.map +1 -1
- package/lib/components/Toast/Toast.js +31 -24
- package/lib/components/Toast/ToastContainer.d.ts.map +1 -1
- package/lib/components/Toast/ToastContainer.js +7 -6
- package/lib/components/Toast/ToastManager.d.ts +5 -5
- package/lib/components/Toast/ToastManager.d.ts.map +1 -1
- package/lib/components/Toast/ToastManager.js +1 -2
- package/lib/components/Toggle/Toggle.d.ts +2 -2
- package/lib/components/Toggle/Toggle.d.ts.map +1 -1
- package/lib/components/Toggle/Toggle.js +2 -6
- package/lib/components/Toggle/Toggle.stories.d.ts.map +1 -1
- package/lib/components/TokenListInput/TokenListInput.d.ts +13 -11
- package/lib/components/TokenListInput/TokenListInput.d.ts.map +1 -1
- package/lib/components/TokenListInput/TokenListInput.js +24 -38
- package/lib/components/TokenListInput/TokenListInput.stories.d.ts +3 -4
- package/lib/components/TokenListInput/TokenListInput.stories.d.ts.map +1 -1
- package/lib/components/TokenListInput/TokenValueChips.d.ts +4 -4
- package/lib/components/TokenListInput/TokenValueChips.d.ts.map +1 -1
- package/lib/components/TokenListInput/TokenValueChips.js +14 -17
- package/lib/components/Tooltip/Tooltip.d.ts +5 -6
- package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/components/Tooltip/Tooltip.js +10 -9
- package/lib/components/Truncate/Truncate.d.ts +2 -2
- package/lib/components/Truncate/Truncate.d.ts.map +1 -1
- package/lib/components/Truncate/Truncate.js +4 -5
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.d.ts +3 -3
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.d.ts.map +1 -1
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.js +19 -10
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.stories.d.ts +1 -1
- package/lib/components/Typeahead/SimpleTypeahead.d.ts +5 -6
- package/lib/components/Typeahead/SimpleTypeahead.d.ts.map +1 -1
- package/lib/components/Typeahead/SimpleTypeahead.js +1 -5
- package/lib/components/Typeahead/SimpleTypeahead.stories.d.ts.map +1 -1
- package/lib/components/Typeahead/Typeahead.d.ts +5 -6
- package/lib/components/Typeahead/Typeahead.d.ts.map +1 -1
- package/lib/components/Typeahead/Typeahead.js +14 -11
- package/lib/components/Typeahead/Typeahead.stories.d.ts.map +1 -1
- package/lib/components/WeekdayPicker/WeekdayPicker.d.ts +4 -4
- package/lib/components/WeekdayPicker/WeekdayPicker.d.ts.map +1 -1
- package/lib/components/WeekdayPicker/WeekdayPicker.stories.d.ts.map +1 -1
- package/lib/devtools/DependencyGraph/DependencyGraph.stories.d.ts.map +1 -1
- package/lib/flow-to-typescript-codemod.d.ts +1 -21
- package/lib/hooks/useArbitraryOptionAddition/useArbitraryOptionAddition.d.ts +2 -2
- package/lib/hooks/useArbitraryOptionAddition/useArbitraryOptionAddition.d.ts.map +1 -1
- package/lib/hooks/useArbitraryOptionAddition/useArbitraryOptionAddition.stories.d.ts.map +1 -1
- package/lib/hooks/useFileUpload/useFileUpload.d.ts +2 -2
- package/lib/hooks/useFileUpload/useFileUpload.d.ts.map +1 -1
- package/lib/hooks/useFileUpload/useFileUpload.stories.d.ts.map +1 -1
- package/lib/hooks/useFilteredOptions/useFilteredOptions.d.ts +4 -4
- package/lib/hooks/useFilteredOptions/useFilteredOptions.d.ts.map +1 -1
- package/lib/hooks/useFilteredOptions/useFilteredOptions.stories.d.ts.map +1 -1
- package/lib/hooks/useInfiniteScroll/useInfiniteScroll.d.ts +2 -2
- package/lib/hooks/useInfiniteScroll/useInfiniteScroll.d.ts.map +1 -1
- package/lib/hooks/useInputState/useInputState.d.ts.map +1 -1
- package/lib/hooks/useLockedBody/useLockedBody.d.ts.map +1 -1
- package/lib/hooks/useModal/useModal.d.ts +13 -5
- package/lib/hooks/useModal/useModal.d.ts.map +1 -1
- package/lib/hooks/useToastPortal/useToastPortal.d.ts +2 -2
- package/lib/hooks/useToastPortal/useToastPortal.d.ts.map +1 -1
- package/lib/hooks/useToggle/useToggle.d.ts.map +1 -1
- package/lib/hooks/useWindowSize/useWindowSize.d.ts +2 -2
- package/lib/hooks/useWindowSize/useWindowSize.d.ts.map +1 -1
- package/lib/stories/Border/Border.stories.d.ts.map +1 -1
- package/lib/stories/Color/Color.stories.d.ts.map +1 -1
- package/lib/stories/Elevation/Elevation.stories.d.ts.map +1 -1
- package/lib/stories/Motion/Motion.stories.d.ts.map +1 -1
- package/lib/stories/Opacity/Opacity.stories.d.ts.map +1 -1
- package/lib/stories/Shadow/Shadow.stories.d.ts.map +1 -1
- package/lib/stories/Size/Size.stories.d.ts.map +1 -1
- package/lib/stories/Space/Space.stories.d.ts.map +1 -1
- package/lib/stories/Tokens/index.d.ts.map +1 -1
- package/lib/styles/index.css +2 -0
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/index.d.ts.map +1 -1
- package/lib/styles/index.js +2 -1
- package/lib/styles/variables/_size.css +2 -0
- package/lib/styles/variables/_size.d.ts +1 -0
- package/lib/styles/variables/_size.d.ts.map +1 -1
- package/lib/styles/variables/_size.js +2 -1
- package/lib/types/charts.d.ts +45 -33
- package/lib/types/charts.d.ts.map +1 -1
- package/lib/types/date-range-picker.d.ts +8 -9
- package/lib/types/date-range-picker.d.ts.map +1 -1
- package/lib/types/menu.d.ts +2 -2
- package/lib/types/menu.d.ts.map +1 -1
- package/lib/types/toast.d.ts +9 -10
- package/lib/types/toast.d.ts.map +1 -1
- package/lib/utils/charts/charts.d.ts +1 -1
- package/lib/utils/charts/charts.d.ts.map +1 -1
- package/lib/utils/charts/donutChart.d.ts +2 -2
- package/lib/utils/charts/donutChart.d.ts.map +1 -1
- package/lib/utils/charts/donutChart.js +2 -0
- package/lib/utils/charts/funnelChart.d.ts.map +1 -1
- package/lib/utils/charts/helpers.d.ts +1 -1
- package/lib/utils/charts/helpers.d.ts.map +1 -1
- package/lib/utils/charts/index.d.ts +3 -0
- package/lib/utils/charts/index.d.ts.map +1 -1
- package/lib/utils/charts/index.js +33 -0
- package/lib/utils/charts/sankeyChart.d.ts +9 -0
- package/lib/utils/charts/sankeyChart.d.ts.map +1 -0
- package/lib/utils/charts/sankeyChart.js +50 -0
- package/lib/utils/charts/stackedBarChart.d.ts +3 -0
- package/lib/utils/charts/stackedBarChart.d.ts.map +1 -0
- package/lib/utils/charts/stackedBarChart.js +51 -0
- package/lib/utils/click-away/click-away.d.ts +11 -13
- package/lib/utils/click-away/click-away.d.ts.map +1 -1
- package/lib/utils/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/lib/utils/dom/dom.d.ts +2 -2
- package/lib/utils/dom/dom.d.ts.map +1 -1
- package/lib/utils/helpers/helpers.d.ts.map +1 -1
- package/lib/utils/makeClassNameComponent/makeClassNameComponent.d.ts.map +1 -1
- package/lib/utils/merge-refs/merge-refs.d.ts +2 -3
- package/lib/utils/merge-refs/merge-refs.d.ts.map +1 -1
- package/lib/utils/merge-refs/merge-refs.js +13 -7
- package/lib/utils/merge-refs/merge-refs.stories.d.ts.map +1 -1
- package/lib/utils/token-list-input/token-list-input.d.ts +5 -5
- package/lib/utils/token-list-input/token-list-input.d.ts.map +1 -1
- package/lib/utils/tokens/tokens.d.ts +7 -6
- package/lib/utils/tokens/tokens.d.ts.map +1 -1
- package/package.json +18 -10
- package/tsconfig.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { Flow } from 'flow-to-typescript-codemod';
|
|
3
|
-
import type { Over } from '../../types/utils';
|
|
4
3
|
type ClassNames = Readonly<{
|
|
5
4
|
wrapper?: string;
|
|
6
5
|
}>;
|
|
@@ -11,22 +10,25 @@ export declare const PADDING_SIZES: Readonly<{
|
|
|
11
10
|
none: "none";
|
|
12
11
|
}>;
|
|
13
12
|
export type PaddingSizeType = (typeof PADDING_SIZES)[keyof typeof PADDING_SIZES];
|
|
14
|
-
export
|
|
13
|
+
export interface CardProps {
|
|
15
14
|
classNames?: ClassNames;
|
|
15
|
+
tabIndex?: number;
|
|
16
|
+
onClick?: (e: React.SyntheticEvent<HTMLElement>) => void;
|
|
17
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLElement>) => void;
|
|
16
18
|
children: React.ReactNode;
|
|
17
19
|
paddingTop?: PaddingSizeType;
|
|
18
20
|
paddingRight?: PaddingSizeType;
|
|
19
21
|
paddingBottom?: PaddingSizeType;
|
|
20
22
|
paddingLeft?: PaddingSizeType;
|
|
21
|
-
}
|
|
22
|
-
export
|
|
23
|
+
}
|
|
24
|
+
export interface CardChildProps {
|
|
23
25
|
className?: string;
|
|
24
26
|
children: React.ReactNode;
|
|
25
|
-
}
|
|
26
|
-
export
|
|
27
|
+
}
|
|
28
|
+
export interface ClickableCardProps extends Omit<CardProps, 'onClick' | 'disabled'> {
|
|
27
29
|
onClick?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined;
|
|
28
30
|
disabled?: boolean;
|
|
29
|
-
}
|
|
31
|
+
}
|
|
30
32
|
export declare const CardHeader: ({ className, children, ...props }: CardChildProps) => React.JSX.Element;
|
|
31
33
|
export declare const CardTitle: ({ className, children, ...props }: CardChildProps) => React.JSX.Element;
|
|
32
34
|
export declare const CardActions: ({ className, children, ...props }: CardChildProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AASrD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;EAKxB,CAAC;AAEH,MAAM,MAAM,eAAe,GACzB,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/C,OAAO,CAAC,EACJ,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC,GACtD,IAAI,GACJ,SAAS,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAOD,eAAO,MAAM,UAAU,GAAI,mCAAiC,cAAc,sBAIzE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,mCAAiC,cAAc,sBAIxE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,mCAIzB,cAAc,sBAIhB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,mCAAiC,cAAc,sBAIzE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,mCAIzB,cAAc,sBAIhB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,cAAc,CA6BhE,CAAC;AAEJ,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAChD,kBAAkB,EAClB,cAAc,CA+Cf,CAAC"}
|
|
@@ -20,7 +20,6 @@ const PADDING_SIZES = exports.PADDING_SIZES = Object.freeze({
|
|
|
20
20
|
});
|
|
21
21
|
const getPaddingValue = size => {
|
|
22
22
|
const spaceKey = 'space' + (0, _string.capitalize)(size);
|
|
23
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'typeof import("/Users/diwaker/SpacedOut/ui-design-system/src/styles/variables/_space")'.
|
|
24
23
|
return SPACES[spaceKey] || SPACES['spaceNone'];
|
|
25
24
|
};
|
|
26
25
|
const CardHeader = _ref => {
|
|
@@ -108,17 +107,15 @@ const ClickableCard = exports.ClickableCard = /*#__PURE__*/React.forwardRef((_re
|
|
|
108
107
|
...props
|
|
109
108
|
} = _ref7;
|
|
110
109
|
const componentRef = React.useRef(null);
|
|
111
|
-
// @ts-ignore - TS2322 - Type 'null' is not assignable to type 'HTMLDivElement'.
|
|
112
110
|
React.useImperativeHandle(ref, () => componentRef.current);
|
|
113
111
|
React.useEffect(() => {
|
|
114
112
|
if (disabled) {
|
|
115
|
-
// @ts-ignore - TS2339 - Property 'blur' does not exist on type 'never'.
|
|
116
113
|
componentRef.current?.blur();
|
|
117
114
|
}
|
|
118
115
|
}, [disabled]);
|
|
119
116
|
const onClickHandler = e => {
|
|
120
117
|
if (!disabled) {
|
|
121
|
-
onClick
|
|
118
|
+
onClick?.(e);
|
|
122
119
|
}
|
|
123
120
|
};
|
|
124
121
|
const onKeyDownHandler = e => {
|
|
@@ -131,9 +128,7 @@ const ClickableCard = exports.ClickableCard = /*#__PURE__*/React.forwardRef((_re
|
|
|
131
128
|
wrapper: (0, _classify.default)(_CardModule.default.clickableCard, {
|
|
132
129
|
[_CardModule.default.disabled]: disabled
|
|
133
130
|
}, classNames?.wrapper)
|
|
134
|
-
}
|
|
135
|
-
// @ts-ignore - TS2322 - Type '{ classNames: { wrapper: string; }; tabIndex: number; onClick: (e: any) => void; onKeyDown: (e: any) => void; ref: ForwardedRef<HTMLDivElement>; children:React.ReactNode; paddingTop?: string | undefined; paddingRight?: string | undefined; paddingBottom?: string | undefined; paddingLeft?: string | undefined; }' is not assignable to type 'IntrinsicAttributes & CardProps & RefAttributes<HTMLDivElement>'.
|
|
136
|
-
,
|
|
131
|
+
},
|
|
137
132
|
tabIndex: disabled ? -1 : 0,
|
|
138
133
|
onClick: onClickHandler,
|
|
139
134
|
onKeyDown: onKeyDownHandler,
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { Flow } from 'flow-to-typescript-codemod';
|
|
3
|
-
|
|
3
|
+
import Highcharts from 'highcharts';
|
|
4
|
+
interface ChartRef {
|
|
5
|
+
chart?: Highcharts.Chart;
|
|
6
|
+
}
|
|
7
|
+
export type ChartRefObject = React.RefObject<ChartRef | null>;
|
|
8
|
+
export interface ExportOptionType {
|
|
4
9
|
key: string;
|
|
5
10
|
label: string;
|
|
6
11
|
format: string;
|
|
7
|
-
}
|
|
12
|
+
}
|
|
8
13
|
export declare const EXPORT_OPTIONS: Readonly<{
|
|
9
14
|
download_as_png: {
|
|
10
15
|
key: string;
|
|
@@ -35,7 +40,7 @@ export type ChartWrapperClassNames = Readonly<{
|
|
|
35
40
|
content?: string;
|
|
36
41
|
loader?: string;
|
|
37
42
|
}>;
|
|
38
|
-
|
|
43
|
+
interface ChartWrapperProps {
|
|
39
44
|
isLoading?: boolean;
|
|
40
45
|
title: React.ReactNode;
|
|
41
46
|
children?: React.ReactNode;
|
|
@@ -44,7 +49,7 @@ type ChartWrapperProps = {
|
|
|
44
49
|
headerActions?: React.ReactNode;
|
|
45
50
|
hasEmptyData?: boolean;
|
|
46
51
|
emptyText?: React.ReactNode;
|
|
47
|
-
}
|
|
52
|
+
}
|
|
48
53
|
export declare const ChartWrapper: Flow.AbstractComponent<ChartWrapperProps, HTMLDivElement>;
|
|
49
54
|
export {};
|
|
50
55
|
//# sourceMappingURL=ChartWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/ChartWrapper/ChartWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ChartWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/ChartWrapper/ChartWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAErD,OAAO,UAAU,MAAM,YAAY,CAAC;AAqBpC,UAAU,QAAQ;IAChB,KAAK,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC;CAC1B;AAED,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;AAE9D,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;EAqBzB,CAAC;AA4DH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,mBAAmB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IACrD,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAC/C,iBAAiB,EACjB,cAAc,CAoDf,CAAC"}
|
|
@@ -17,6 +17,8 @@ var _CircularLoader = require("../../CircularLoader");
|
|
|
17
17
|
var _ChartWrapperModule = _interopRequireDefault(require("./ChartWrapper.module.css"));
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
20
|
+
// Type definitions for Highcharts chart ref
|
|
21
|
+
|
|
20
22
|
const EXPORT_OPTIONS = exports.EXPORT_OPTIONS = Object.freeze({
|
|
21
23
|
download_as_png: {
|
|
22
24
|
key: 'download_as_png',
|
|
@@ -41,9 +43,7 @@ const EXPORT_OPTIONS = exports.EXPORT_OPTIONS = Object.freeze({
|
|
|
41
43
|
});
|
|
42
44
|
|
|
43
45
|
// on assumption that all export options will be shown by default
|
|
44
|
-
const DEFAULT_EXPORT_OPTIONS = Object.keys(EXPORT_OPTIONS).map(
|
|
45
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Readonly<{ download_as_png: { key: string; label: string; format: string; }; download_as_jpeg: { key: string; label: string; format: string; }; download_as_pdf: { key: string; label: string; format: string; }; download_as_svg: { ...; }; }>'.
|
|
46
|
-
exportKey => EXPORT_OPTIONS[exportKey]);
|
|
46
|
+
const DEFAULT_EXPORT_OPTIONS = Object.keys(EXPORT_OPTIONS).map(exportKey => EXPORT_OPTIONS[exportKey]);
|
|
47
47
|
const CustomExportButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
48
48
|
let {
|
|
49
49
|
customExportOptions = null
|
|
@@ -65,18 +65,16 @@ const CustomExportButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
65
65
|
const handleDownload = exportKey => {
|
|
66
66
|
const exportOptionObject = exportOptions.find(exportOption => exportOption.key === exportKey);
|
|
67
67
|
const exportFormat = exportOptionObject?.format || '';
|
|
68
|
-
|
|
69
|
-
if (ref.current) {
|
|
70
|
-
// @ts-ignore - TS2531 - Object is possibly 'null'. | TS2339 - Property 'current' does not exist on type '((instance: HTMLDivElement | null) => void) | MutableRefObject<HTMLDivElement | null>'.
|
|
68
|
+
if (ref && 'current' in ref && ref.current) {
|
|
71
69
|
ref.current.chart?.exportChart({
|
|
72
70
|
type: exportFormat
|
|
73
|
-
});
|
|
71
|
+
}, {});
|
|
74
72
|
}
|
|
75
73
|
};
|
|
76
74
|
return /*#__PURE__*/React.createElement(_ButtonDropdown.ButtonDropdown, {
|
|
77
75
|
ariaLabel: "Export Chart Menu",
|
|
78
76
|
menu: {
|
|
79
|
-
isFluid:
|
|
77
|
+
isFluid: false,
|
|
80
78
|
menuDisabled: false,
|
|
81
79
|
options: menuOptions,
|
|
82
80
|
size: 'medium',
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { SeriesOptionsType } from 'highcharts';
|
|
2
3
|
import type { ChartOptions, DataOptionsType, Drilldown } from '../../../types/charts';
|
|
3
|
-
import type { Over } from '../../../types/utils';
|
|
4
4
|
import type { ChartWrapperClassNames, ExportOptionType } from '../ChartWrapper';
|
|
5
|
+
export interface SeriesWithData extends Omit<SeriesOptionsType, 'data'> {
|
|
6
|
+
data?: DataOptionsType[];
|
|
7
|
+
}
|
|
5
8
|
type ClassNames = Readonly<ChartWrapperClassNames & {
|
|
6
9
|
highChart?: string;
|
|
7
10
|
}>;
|
|
8
|
-
export
|
|
11
|
+
export interface ColumnSeries {
|
|
9
12
|
name: string;
|
|
10
13
|
data: DataOptionsType[];
|
|
11
|
-
}
|
|
12
|
-
export
|
|
14
|
+
}
|
|
15
|
+
export interface ColumnChartProps extends Omit<ChartOptions, 'isLoading' | 'classNames' | 'cardTitle' | 'customExportOptions' | 'series' | 'drilldown' | 'headerActions' | 'hasEmptyData' | 'emptyText'> {
|
|
13
16
|
isLoading?: boolean;
|
|
14
17
|
classNames?: ClassNames;
|
|
15
18
|
cardTitle?: React.ReactNode;
|
|
@@ -19,7 +22,7 @@ export type ColumnChartProps = Over<ChartOptions, {
|
|
|
19
22
|
headerActions?: React.ReactNode;
|
|
20
23
|
hasEmptyData?: boolean;
|
|
21
24
|
emptyText?: React.ReactNode;
|
|
22
|
-
}
|
|
25
|
+
}
|
|
23
26
|
export declare const ColumnChart: ({ isLoading, classNames, cardTitle, customExportOptions, series, drilldown, headerActions, hasEmptyData, emptyText, ...userOptions }: ColumnChartProps) => React.JSX.Element;
|
|
24
27
|
export {};
|
|
25
28
|
//# sourceMappingURL=ColumnChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/ColumnChart/ColumnChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ColumnChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/ColumnChart/ColumnChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,YAAY,CAAC;AAKlD,OAAO,KAAK,EACV,YAAY,EAEZ,eAAe,EACf,SAAS,EACV,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EAAC,sBAAsB,EAAE,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAM9E,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACrE,IAAI,CAAC,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,KAAK,UAAU,GAAG,QAAQ,CACxB,sBAAsB,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CACF,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,gBACf,SAAQ,IAAI,CACV,YAAY,EACV,WAAW,GACX,YAAY,GACZ,WAAW,GACX,qBAAqB,GACrB,QAAQ,GACR,WAAW,GACX,eAAe,GACf,cAAc,GACd,WAAW,CACd;IACD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,mBAAmB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IACrD,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,GAAI,sIAWzB,gBAAgB,sBAyElB,CAAC"}
|
|
@@ -13,6 +13,8 @@ var _ChartWrapper = require("../ChartWrapper");
|
|
|
13
13
|
var _ColumnChartModule = _interopRequireDefault(require("./ColumnChart.module.css"));
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
// Type guard to check if series has data property
|
|
17
|
+
|
|
16
18
|
const ColumnChart = _ref => {
|
|
17
19
|
let {
|
|
18
20
|
isLoading,
|
|
@@ -34,18 +36,22 @@ const ColumnChart = _ref => {
|
|
|
34
36
|
color: (0, _charts.getDataVizColor)(index),
|
|
35
37
|
pointWidth: _charts.columnPlotWidth
|
|
36
38
|
}));
|
|
37
|
-
const addColorToDrilldownSeries = series => series?.map(seriesItem =>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
...
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
const addColorToDrilldownSeries = series => series?.map(seriesItem => {
|
|
40
|
+
// Type guard to check if series has data property
|
|
41
|
+
const seriesWithData = seriesItem;
|
|
42
|
+
return {
|
|
43
|
+
...seriesItem,
|
|
44
|
+
...(seriesWithData.data && {
|
|
45
|
+
data: seriesWithData.data.map((dataItem, index) => ({
|
|
46
|
+
...dataItem,
|
|
47
|
+
color: (0, _charts.getDataVizColor)(index),
|
|
48
|
+
pointWidth: _charts.columnPlotWidth
|
|
49
|
+
}))
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
});
|
|
46
53
|
const columnDrilldown = drilldown ? {
|
|
47
54
|
...drilldown,
|
|
48
|
-
// @ts-ignore
|
|
49
55
|
series: addColorToDrilldownSeries(drilldown.series),
|
|
50
56
|
breadcrumbs: {
|
|
51
57
|
floating: false
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ChartOptions, Drilldown, LegendOptionsType, SeriesOptionsType } from '../../../types/charts';
|
|
3
|
-
import type { Over } from '../../../types/utils';
|
|
4
3
|
import type { ChartWrapperClassNames, ExportOptionType } from '../ChartWrapper';
|
|
5
4
|
type ClassNames = Readonly<ChartWrapperClassNames & {
|
|
6
5
|
highChart?: string;
|
|
7
6
|
subtitleClassNames?: SubtitleClassNames;
|
|
8
7
|
}>;
|
|
9
|
-
|
|
8
|
+
interface SubtitleClassNames {
|
|
10
9
|
wrapper?: string;
|
|
11
10
|
text?: string;
|
|
12
11
|
subtext?: string;
|
|
13
|
-
}
|
|
14
|
-
export
|
|
12
|
+
}
|
|
13
|
+
export interface DonutChartProps extends Omit<ChartOptions, 'isLoading' | 'classNames' | 'cardTitle' | 'customExportOptions' | 'headerActions' | 'centerText' | 'centerSubtext' | 'series' | 'drilldown' | 'legend' | 'hasEmptyData' | 'emptyText'> {
|
|
15
14
|
isLoading?: boolean;
|
|
16
15
|
classNames?: ClassNames;
|
|
17
16
|
cardTitle?: React.ReactNode;
|
|
@@ -24,7 +23,7 @@ export type DonutChartProps = Over<ChartOptions, {
|
|
|
24
23
|
legend?: LegendOptionsType;
|
|
25
24
|
hasEmptyData?: boolean;
|
|
26
25
|
emptyText?: React.ReactNode;
|
|
27
|
-
}
|
|
26
|
+
}
|
|
28
27
|
export declare const DonutChart: ({ isLoading, classNames, cardTitle, customExportOptions, headerActions, series, drilldown, legend, centerText, centerSubtext, hasEmptyData, emptyText, ...userOptions }: DonutChartProps) => React.JSX.Element;
|
|
29
28
|
export {};
|
|
30
29
|
//# sourceMappingURL=DonutChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DonutChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/DonutChart/DonutChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EACV,YAAY,
|
|
1
|
+
{"version":3,"file":"DonutChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/DonutChart/DonutChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EACV,YAAY,EAEZ,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAC,sBAAsB,EAAE,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAO9E,KAAK,UAAU,GAAG,QAAQ,CACxB,sBAAsB,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CACF,CAAC;AAEF,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eACf,SAAQ,IAAI,CACV,YAAY,EACV,WAAW,GACX,YAAY,GACZ,WAAW,GACX,qBAAqB,GACrB,eAAe,GACf,YAAY,GACZ,eAAe,GACf,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,cAAc,GACd,WAAW,CACd;IACD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,mBAAmB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IACrD,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,UAAU,GAAI,yKAcxB,eAAe,sBAqFjB,CAAC"}
|
|
@@ -30,8 +30,7 @@ const DonutChart = _ref => {
|
|
|
30
30
|
emptyText,
|
|
31
31
|
...userOptions
|
|
32
32
|
} = _ref;
|
|
33
|
-
|
|
34
|
-
const chartRef = React.useRef();
|
|
33
|
+
const chartRef = /*#__PURE__*/React.createRef();
|
|
35
34
|
const {
|
|
36
35
|
highChart,
|
|
37
36
|
subtitleClassNames,
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ChartOptions, DataOptionsType, Drilldown } from '../../../types/charts';
|
|
3
|
-
import type { Over } from '../../../types/utils';
|
|
4
3
|
import type { ChartWrapperClassNames, ExportOptionType } from '../ChartWrapper';
|
|
5
4
|
type ClassNames = Readonly<ChartWrapperClassNames & {
|
|
6
5
|
highChart?: string;
|
|
7
6
|
}>;
|
|
8
|
-
export
|
|
7
|
+
export interface FunnelSeriesItem {
|
|
9
8
|
name?: string;
|
|
10
9
|
showInLegend?: boolean;
|
|
11
10
|
data: Array<DataOptionsType>;
|
|
12
|
-
}
|
|
13
|
-
export
|
|
11
|
+
}
|
|
12
|
+
export interface FunnelChartProps extends Omit<ChartOptions, 'isLoading' | 'classNames' | 'cardTitle' | 'customExportOptions' | 'series' | 'headerActions' | 'drilldown' | 'showLegend' | 'hasEmptyData' | 'emptyText'> {
|
|
14
13
|
isLoading?: boolean;
|
|
15
14
|
classNames?: ClassNames;
|
|
16
15
|
cardTitle?: React.ReactNode;
|
|
@@ -21,7 +20,7 @@ export type FunnelChartProps = Over<ChartOptions, {
|
|
|
21
20
|
showLegend?: boolean;
|
|
22
21
|
hasEmptyData?: boolean;
|
|
23
22
|
emptyText?: React.ReactNode;
|
|
24
|
-
}
|
|
23
|
+
}
|
|
25
24
|
export declare const FunnelChart: ({ isLoading, classNames, cardTitle, customExportOptions, series, headerActions, drilldown, showLegend, hasEmptyData, emptyText, ...userOptions }: FunnelChartProps) => React.JSX.Element;
|
|
26
25
|
export {};
|
|
27
26
|
//# sourceMappingURL=FunnelChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunnelChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/FunnelChart/FunnelChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EACV,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"FunnelChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/FunnelChart/FunnelChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EACV,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EAAC,sBAAsB,EAAE,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAM9E,KAAK,UAAU,GAAG,QAAQ,CACxB,sBAAsB,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CACF,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,gBACf,SAAQ,IAAI,CACV,YAAY,EACV,WAAW,GACX,YAAY,GACZ,WAAW,GACX,qBAAqB,GACrB,QAAQ,GACR,eAAe,GACf,WAAW,GACX,YAAY,GACZ,cAAc,GACd,WAAW,CACd;IACD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,mBAAmB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IACrD,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAChC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,GAAI,kJAYzB,gBAAgB,sBA4ClB,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ChartOptions, DataOptionsType, Drilldown } from '../../../types/charts';
|
|
3
|
-
import type { Over } from '../../../types/utils';
|
|
4
3
|
import type { ChartWrapperClassNames, ExportOptionType } from '../ChartWrapper';
|
|
5
4
|
type ClassNames = Readonly<ChartWrapperClassNames & {
|
|
6
5
|
highChart?: string;
|
|
7
6
|
}>;
|
|
8
|
-
export
|
|
7
|
+
export interface LineSeriesItem {
|
|
9
8
|
name: string;
|
|
10
9
|
data: DataOptionsType[];
|
|
11
|
-
}
|
|
12
|
-
export
|
|
10
|
+
}
|
|
11
|
+
export interface LineChartProps extends Omit<ChartOptions, 'isLoading' | 'classNames' | 'cardTitle' | 'customExportOptions' | 'series' | 'headerActions' | 'drilldown' | 'hasEmptyData' | 'emptyText'> {
|
|
13
12
|
isLoading?: boolean;
|
|
14
13
|
classNames?: ClassNames;
|
|
15
14
|
cardTitle?: React.ReactNode;
|
|
@@ -19,7 +18,7 @@ export type LineChartProps = Over<ChartOptions, {
|
|
|
19
18
|
drilldown?: Drilldown;
|
|
20
19
|
hasEmptyData?: boolean;
|
|
21
20
|
emptyText?: React.ReactNode;
|
|
22
|
-
}
|
|
21
|
+
}
|
|
23
22
|
export declare const LineChart: ({ isLoading, classNames, cardTitle, customExportOptions, series, headerActions, drilldown, hasEmptyData, emptyText, ...userOptions }: LineChartProps) => React.JSX.Element;
|
|
24
23
|
export {};
|
|
25
24
|
//# sourceMappingURL=LineChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/LineChart/LineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EACV,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/LineChart/LineChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EACV,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAC,sBAAsB,EAAE,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAM9E,KAAK,UAAU,GAAG,QAAQ,CACxB,sBAAsB,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CACF,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,cACf,SAAQ,IAAI,CACV,YAAY,EACV,WAAW,GACX,YAAY,GACZ,WAAW,GACX,qBAAqB,GACrB,QAAQ,GACR,eAAe,GACf,WAAW,GACX,cAAc,GACd,WAAW,CACd;IACD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,mBAAmB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IACrD,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,SAAS,GAAI,sIAWvB,cAAc,sBAgDhB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ChartOptions } from '../../../types/charts';
|
|
3
|
+
import type { ChartWrapperClassNames, ExportOptionType } from '../ChartWrapper';
|
|
4
|
+
type ClassNames = Readonly<ChartWrapperClassNames & {
|
|
5
|
+
highChart?: string;
|
|
6
|
+
}>;
|
|
7
|
+
export interface SankeyChartProps extends Omit<ChartOptions, 'isLoading' | 'cardTitle' | 'emptyText' | 'nodeWidth' | 'classNames' | 'showLegend' | 'nodePadding' | 'hasEmptyData' | 'headerActions' | 'customExportOptions'> {
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
cardTitle?: React.ReactNode;
|
|
10
|
+
emptyText?: React.ReactNode;
|
|
11
|
+
nodeWidth?: number;
|
|
12
|
+
classNames?: ClassNames;
|
|
13
|
+
showLegend?: boolean;
|
|
14
|
+
nodePadding?: number;
|
|
15
|
+
hasEmptyData?: boolean;
|
|
16
|
+
headerActions?: React.ReactNode;
|
|
17
|
+
customExportOptions?: Array<ExportOptionType> | null;
|
|
18
|
+
}
|
|
19
|
+
export declare const SankeyChart: ({ series, emptyText, drilldown, cardTitle, isLoading, nodeWidth, showLegend, classNames, nodePadding, hasEmptyData, headerActions, customExportOptions, ...userOptions }: SankeyChartProps) => React.ReactNode;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=SankeyChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SankeyChart.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/SankeyChart/SankeyChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAOxD,OAAO,KAAK,EAAC,sBAAsB,EAAE,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAM9E,KAAK,UAAU,GAAG,QAAQ,CACxB,sBAAsB,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CACF,CAAC;AAEF,MAAM,WAAW,gBACf,SAAQ,IAAI,CACV,YAAY,EACV,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,cAAc,GACd,eAAe,GACf,qBAAqB,CACxB;IACD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,mBAAmB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CACtD;AAMD,eAAO,MAAM,WAAW,GAAI,0KAczB,gBAAgB,KAAG,KAAK,CAAC,SA4E3B,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SankeyChart = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _highcharts = _interopRequireDefault(require("highcharts"));
|
|
9
|
+
var _sankey = _interopRequireDefault(require("highcharts/modules/sankey"));
|
|
10
|
+
var _highchartsReactOfficial = _interopRequireDefault(require("highcharts-react-official"));
|
|
11
|
+
var _charts = require("../../../utils/charts");
|
|
12
|
+
var _classify = _interopRequireDefault(require("../../../utils/classify"));
|
|
13
|
+
var _ChartWrapper = require("../ChartWrapper");
|
|
14
|
+
var _SankeyChartModule = _interopRequireDefault(require("./SankeyChart.module.css"));
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
|
+
if (typeof _sankey.default === 'function') {
|
|
18
|
+
(0, _sankey.default)(_highcharts.default);
|
|
19
|
+
}
|
|
20
|
+
const SankeyChart = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
series,
|
|
23
|
+
emptyText,
|
|
24
|
+
drilldown,
|
|
25
|
+
cardTitle,
|
|
26
|
+
isLoading,
|
|
27
|
+
nodeWidth = 20,
|
|
28
|
+
showLegend = true,
|
|
29
|
+
classNames,
|
|
30
|
+
nodePadding = 10,
|
|
31
|
+
hasEmptyData,
|
|
32
|
+
headerActions,
|
|
33
|
+
customExportOptions,
|
|
34
|
+
...userOptions
|
|
35
|
+
} = _ref;
|
|
36
|
+
const chartRef = React.useRef(null);
|
|
37
|
+
const defaultSankeyChartOptions = (0, _charts.getSankeyChartOptions)({
|
|
38
|
+
nodeWidth,
|
|
39
|
+
showLegend,
|
|
40
|
+
nodePadding
|
|
41
|
+
});
|
|
42
|
+
const sankeyChartSeries = series?.map(seriesItem => ({
|
|
43
|
+
...seriesItem,
|
|
44
|
+
keys: seriesItem.keys || ['from', 'to', 'weight'],
|
|
45
|
+
nodes: seriesItem.nodes?.map((node, index) => ({
|
|
46
|
+
...node,
|
|
47
|
+
color: node.color || (0, _charts.getDataVizColor)(index)
|
|
48
|
+
})),
|
|
49
|
+
data: seriesItem.data.map(dataPoint => ({
|
|
50
|
+
...dataPoint,
|
|
51
|
+
weight: dataPoint.weight ?? 1
|
|
52
|
+
})),
|
|
53
|
+
nodeAlignment: 'center',
|
|
54
|
+
showLegend
|
|
55
|
+
}));
|
|
56
|
+
const sankeyDrilldownSeries = drilldown?.series?.map(seriesItem => ({
|
|
57
|
+
...seriesItem,
|
|
58
|
+
nodes: seriesItem.nodes?.map((node, index) => ({
|
|
59
|
+
...node,
|
|
60
|
+
color: node.color || (0, _charts.getDataVizColor)(index)
|
|
61
|
+
})),
|
|
62
|
+
data: seriesItem.data.map((dataItem, index) => ({
|
|
63
|
+
...dataItem,
|
|
64
|
+
color: dataItem.color || (0, _charts.getDataVizColor)(index),
|
|
65
|
+
weight: dataItem.weight || 1
|
|
66
|
+
})),
|
|
67
|
+
nodeAlignment: 'center',
|
|
68
|
+
showLegend
|
|
69
|
+
}));
|
|
70
|
+
const sankeyDrilldown = drilldown ? {
|
|
71
|
+
...drilldown,
|
|
72
|
+
series: sankeyDrilldownSeries,
|
|
73
|
+
breadcrumbs: {
|
|
74
|
+
floating: false
|
|
75
|
+
}
|
|
76
|
+
} : {};
|
|
77
|
+
const chartOptions = (0, _charts.mergeChartUserOptions)(defaultSankeyChartOptions, {
|
|
78
|
+
series: sankeyChartSeries,
|
|
79
|
+
drilldown: sankeyDrilldown,
|
|
80
|
+
...userOptions
|
|
81
|
+
});
|
|
82
|
+
const {
|
|
83
|
+
highChart,
|
|
84
|
+
...wrapperClassNames
|
|
85
|
+
} = classNames || {};
|
|
86
|
+
return /*#__PURE__*/React.createElement(_ChartWrapper.ChartWrapper, {
|
|
87
|
+
isLoading: isLoading,
|
|
88
|
+
title: cardTitle,
|
|
89
|
+
ref: chartRef,
|
|
90
|
+
classNames: wrapperClassNames,
|
|
91
|
+
customExportOptions: customExportOptions,
|
|
92
|
+
headerActions: headerActions,
|
|
93
|
+
hasEmptyData: hasEmptyData,
|
|
94
|
+
emptyText: emptyText
|
|
95
|
+
}, /*#__PURE__*/React.createElement(_highchartsReactOfficial.default, {
|
|
96
|
+
highcharts: _highcharts.default,
|
|
97
|
+
containerProps: {
|
|
98
|
+
className: (0, _classify.default)(_SankeyChartModule.default.sankeyChartContainer, highChart)
|
|
99
|
+
},
|
|
100
|
+
ref: chartRef,
|
|
101
|
+
options: chartOptions
|
|
102
|
+
}));
|
|
103
|
+
};
|
|
104
|
+
exports.SankeyChart = SankeyChart;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@value (
|
|
2
|
+
size400,
|
|
3
|
+
size540,
|
|
4
|
+
size660,
|
|
5
|
+
size880,
|
|
6
|
+
sizeFluid
|
|
7
|
+
) from '../../../styles/variables/_size.css';
|
|
8
|
+
|
|
9
|
+
.wrapper {
|
|
10
|
+
display: flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.sankeyChartContainer {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
width: sizeFluid;
|
|
18
|
+
min-width: size660;
|
|
19
|
+
max-width: size880;
|
|
20
|
+
min-height: size400;
|
|
21
|
+
max-height: size540;
|
|
22
|
+
}
|