@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
|
@@ -14,6 +14,11 @@ var _AvatarGroupModule = _interopRequireDefault(require("./AvatarGroup.module.cs
|
|
|
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
16
|
const COLOR_SEQUENCE = ['blue', 'green', 'orange', 'red', 'gray'];
|
|
17
|
+
|
|
18
|
+
// Define the expected props for avatar elements
|
|
19
|
+
|
|
20
|
+
// Type for an avatar element that can be cloned
|
|
21
|
+
|
|
17
22
|
const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
18
23
|
let {
|
|
19
24
|
children,
|
|
@@ -33,10 +38,11 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
33
38
|
};
|
|
34
39
|
let colorIndex = -1;
|
|
35
40
|
const avatarInGroup = (child, index, color) => {
|
|
41
|
+
const avatarProps = child.props;
|
|
36
42
|
const {
|
|
37
43
|
classNames,
|
|
38
44
|
text
|
|
39
|
-
} =
|
|
45
|
+
} = avatarProps;
|
|
40
46
|
const {
|
|
41
47
|
wrapper,
|
|
42
48
|
...restClassNames
|
|
@@ -49,7 +55,6 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
49
55
|
},
|
|
50
56
|
style: {
|
|
51
57
|
borderColor,
|
|
52
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly small: "4px"; readonly medium: `${number}px`; readonly large: "8px"; readonly extraLarge: "12px"; }'.
|
|
53
58
|
marginLeft: `-${index !== 0 ? leftOverlap[size] : 0}`
|
|
54
59
|
},
|
|
55
60
|
color
|
|
@@ -66,13 +71,17 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
66
71
|
const nameList = [];
|
|
67
72
|
for (let i = maxAvatars - 1; i < totalAvatarCount; i++) {
|
|
68
73
|
const child = childrenArray[i];
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
|
|
75
|
+
// Type guard to ensure child is a ReactElement
|
|
76
|
+
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
77
|
+
const childElement = child;
|
|
78
|
+
const childProps = childElement.props;
|
|
79
|
+
const {
|
|
80
|
+
text
|
|
81
|
+
} = childProps;
|
|
82
|
+
if (text) {
|
|
83
|
+
nameList.push(text);
|
|
84
|
+
}
|
|
76
85
|
}
|
|
77
86
|
}
|
|
78
87
|
const NameListNode = () => /*#__PURE__*/React.createElement("span", null, nameList.map(name => /*#__PURE__*/React.createElement(React.Fragment, {
|
|
@@ -94,16 +103,20 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
94
103
|
},
|
|
95
104
|
style: {
|
|
96
105
|
borderColor,
|
|
97
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly small: "4px"; readonly medium: `${number}px`; readonly large: "8px"; readonly extraLarge: "12px"; }'.
|
|
98
106
|
marginLeft: `-${leftOverlap[size]}`
|
|
99
107
|
}
|
|
100
108
|
})));
|
|
101
109
|
};
|
|
102
110
|
const childrenWithProps = React.Children.map(children, (child, index) => {
|
|
103
|
-
//
|
|
111
|
+
// Type guard to ensure child is a ReactElement
|
|
112
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
113
|
+
return child;
|
|
114
|
+
}
|
|
115
|
+
const childElement = child;
|
|
116
|
+
const childProps = childElement.props;
|
|
104
117
|
const {
|
|
105
118
|
imageSrc
|
|
106
|
-
} =
|
|
119
|
+
} = childProps;
|
|
107
120
|
if (!imageSrc) {
|
|
108
121
|
colorIndex++;
|
|
109
122
|
if (colorIndex === COLOR_SEQUENCE.length) {
|
|
@@ -112,10 +125,10 @@ const AvatarGroup = exports.AvatarGroup = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
112
125
|
}
|
|
113
126
|
const color = COLOR_SEQUENCE[colorIndex];
|
|
114
127
|
if (childAvatarCount <= maxAvatars) {
|
|
115
|
-
return avatarInGroup(
|
|
128
|
+
return avatarInGroup(childElement, index, color);
|
|
116
129
|
} else {
|
|
117
130
|
if (index < maxAvatars - 1) {
|
|
118
|
-
return avatarInGroup(
|
|
131
|
+
return avatarInGroup(childElement, index, color);
|
|
119
132
|
} else if (index === maxAvatars) {
|
|
120
133
|
return plusAvatar();
|
|
121
134
|
}
|
|
@@ -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
|
import type { IconSize, IconType } from '../Icon';
|
|
5
4
|
type ClassNames = Readonly<{
|
|
6
5
|
wrapper?: string;
|
|
@@ -21,20 +20,20 @@ export declare const BADGE_COLOR: Readonly<{
|
|
|
21
20
|
indigoDark: "#706F9B";
|
|
22
21
|
}>;
|
|
23
22
|
export type BadgeColorType = keyof typeof BADGE_COLOR;
|
|
24
|
-
export
|
|
23
|
+
export interface BaseBadgeProps {
|
|
25
24
|
classNames?: ClassNames;
|
|
26
25
|
fill?: BadgeColorType;
|
|
27
|
-
}
|
|
28
|
-
export
|
|
26
|
+
}
|
|
27
|
+
export interface BadgeProps extends Omit<BaseBadgeProps, 'text'> {
|
|
29
28
|
text: string;
|
|
30
|
-
}
|
|
31
|
-
export
|
|
29
|
+
}
|
|
30
|
+
export interface IconBadgeProps extends Omit<BaseBadgeProps, 'iconName' | 'iconType' | 'iconSize' | 'onClick' | 'ariaLabel'> {
|
|
32
31
|
iconName: string;
|
|
33
32
|
iconType?: IconType;
|
|
34
33
|
iconSize?: IconSize;
|
|
35
|
-
onClick?:
|
|
34
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
36
35
|
ariaLabel?: string;
|
|
37
|
-
}
|
|
36
|
+
}
|
|
38
37
|
export declare const Badge: Flow.AbstractComponent<BadgeProps, HTMLDivElement>;
|
|
39
38
|
export declare const IconBadge: Flow.AbstractComponent<IconBadgeProps, HTMLDivElement>;
|
|
40
39
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAgBrD,OAAO,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAOhD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;EAYtB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,WAAW,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;IAC9D,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cACf,SAAQ,IAAI,CACV,cAAc,EACd,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,CAC/D;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAkClE,CAAC;AAEJ,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,cAAc,CA8C1E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASxD,wBAmGE;AAEF,eAAO,MAAM,MAAM;WAAU,UAAU;;;;CAItC,CAAC;AAMF,eAAO,MAAM,UAAU;WAAU,cAAc;;;;;
|
|
1
|
+
{"version":3,"file":"Badge.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASxD,wBAmGE;AAEF,eAAO,MAAM,MAAM;WAAU,UAAU;;;;CAItC,CAAC;AAMF,eAAO,MAAM,UAAU;WAAU,cAAc;;;;;CAI9C,CAAC"}
|
|
@@ -5,14 +5,14 @@ type ClassNames = Readonly<{
|
|
|
5
5
|
icon?: string;
|
|
6
6
|
badgeIcon?: string;
|
|
7
7
|
}>;
|
|
8
|
-
export
|
|
8
|
+
export interface BadgedIconProps {
|
|
9
9
|
type?: IconType;
|
|
10
10
|
name: string;
|
|
11
11
|
size?: IconSize;
|
|
12
12
|
ariaLabel?: string;
|
|
13
13
|
showBadge?: boolean;
|
|
14
14
|
classNames?: ClassNames;
|
|
15
|
-
}
|
|
15
|
+
}
|
|
16
16
|
export declare const BadgedIcon: ({ name, showBadge, classNames, size, type, ariaLabel, }: BadgedIconProps) => React.JSX.Element;
|
|
17
17
|
export {};
|
|
18
18
|
//# sourceMappingURL=BadgedIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgedIcon.d.ts","sourceRoot":"","sources":["../../../src/components/BadgedIcon/BadgedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAOhD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,
|
|
1
|
+
{"version":3,"file":"BadgedIcon.d.ts","sourceRoot":"","sources":["../../../src/components/BadgedIcon/BadgedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAOhD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,eAAO,MAAM,UAAU,GAAI,yDAOxB,eAAe,sBAkBjB,CAAC"}
|
|
@@ -26,10 +26,7 @@ const BadgedIcon = _ref => {
|
|
|
26
26
|
}, /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
27
27
|
ariaLabel: ariaLabel,
|
|
28
28
|
name: name,
|
|
29
|
-
className: classNames?.icon
|
|
30
|
-
// @ts-ignore - TS17001 - JSX elements cannot have multiple attributes with the same name.
|
|
31
|
-
,
|
|
32
|
-
name: name,
|
|
29
|
+
className: classNames?.icon,
|
|
33
30
|
size: size === 'large' ? 'medium' : size,
|
|
34
31
|
type: type,
|
|
35
32
|
color: _typography.TEXT_COLORS.clickable
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { Flow } from 'flow-to-typescript-codemod';
|
|
2
|
-
import type { Over } from '../../types/utils';
|
|
3
2
|
import type { InContextAlertProps } from '../InContextAlert';
|
|
4
|
-
export
|
|
3
|
+
export interface BannerProps extends Omit<InContextAlertProps, 'alignment'> {
|
|
5
4
|
alignment?: 'top' | 'bottom';
|
|
6
|
-
}
|
|
5
|
+
}
|
|
7
6
|
export declare const Banner: Flow.AbstractComponent<BannerProps, HTMLDivElement>;
|
|
8
7
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/Banner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/Banner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAIrD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AAM3D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC;IACzE,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAC9B;AAED,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,cAAc,CA0CpE,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
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
|
import type { LinkProps } from '../../Link';
|
|
5
|
-
export
|
|
4
|
+
export interface BreadcrumbLinkProps extends Omit<LinkProps, 'isActive' | 'id' | 'onClick'> {
|
|
6
5
|
isActive?: boolean;
|
|
7
6
|
id: string;
|
|
8
7
|
onClick?: (arg1: React.SyntheticEvent<HTMLElement>, id: string) => unknown;
|
|
9
|
-
}
|
|
8
|
+
}
|
|
10
9
|
export declare const BreadcrumbLink: Flow.AbstractComponent<BreadcrumbLinkProps, HTMLAnchorElement | null | undefined>;
|
|
11
10
|
//# sourceMappingURL=BreadcrumbLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbLink.d.ts","sourceRoot":"","sources":["../../../../src/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"BreadcrumbLink.d.ts","sourceRoot":"","sources":["../../../../src/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAGrD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAM1C,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5E;AAED,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,iBAAiB,CACjD,mBAAmB,EACnB,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAqCrC,CAAC"}
|
|
@@ -30,10 +30,8 @@ const BreadcrumbLink = exports.BreadcrumbLink = /*#__PURE__*/React.forwardRef((_
|
|
|
30
30
|
as: as || 'subTitleExtraSmall',
|
|
31
31
|
underline: underline,
|
|
32
32
|
disabled: isActive,
|
|
33
|
-
className: (0, _classify.default)(_BreadcrumbLinkModule.default.breadcrumbLink,
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
[_BreadcrumbLinkModule.default.active]: isActive ?? window.location.href.includes(to ?? href)
|
|
33
|
+
className: (0, _classify.default)(_BreadcrumbLinkModule.default.breadcrumbLink, {
|
|
34
|
+
[_BreadcrumbLinkModule.default.active]: isActive ?? window.location.href.includes(to ?? href ?? '')
|
|
37
35
|
}, className),
|
|
38
36
|
onClick: e => {
|
|
39
37
|
onClick?.(e, id);
|
|
@@ -4,11 +4,11 @@ import type { BaseLinkProps } from '../Link';
|
|
|
4
4
|
type ClassNames = Readonly<{
|
|
5
5
|
wrapper?: string;
|
|
6
6
|
}>;
|
|
7
|
-
export
|
|
7
|
+
export interface BreadcrumbsProps {
|
|
8
8
|
classNames?: ClassNames;
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
linkComponent?: Flow.AbstractComponent<BaseLinkProps, HTMLAnchorElement | null | undefined>;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
export declare const Breadcrumbs: Flow.AbstractComponent<BreadcrumbsProps, HTMLDivElement>;
|
|
13
13
|
export {};
|
|
14
14
|
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAIrD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAK3C,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAIrD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAK3C,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,IAAI,CAAC,iBAAiB,CACpC,aAAa,EACb,iBAAiB,GAAG,IAAI,GAAG,SAAS,CACrC,CAAC;CACH;AA4BD,eAAO,MAAM,WAAW,EAAE,IAAI,CAAC,iBAAiB,CAC9C,gBAAgB,EAChB,cAAc,CA8Bf,CAAC"}
|
|
@@ -10,6 +10,10 @@ var _Icon = require("../Icon");
|
|
|
10
10
|
var _BreadcrumbsModule = _interopRequireDefault(require("./Breadcrumbs.module.css"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
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); }
|
|
13
|
+
// Define the expected props for breadcrumb link elements
|
|
14
|
+
|
|
15
|
+
// Type for a breadcrumb link element that can be cloned
|
|
16
|
+
|
|
13
17
|
const BreadcrumbSeparator = () => /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
14
18
|
className: _BreadcrumbsModule.default.separator,
|
|
15
19
|
name: "chevron-right",
|
|
@@ -32,12 +36,7 @@ const Breadcrumbs = exports.Breadcrumbs = /*#__PURE__*/React.forwardRef((_ref, r
|
|
|
32
36
|
// eslint-disable-next-line react/no-array-index-key
|
|
33
37
|
React.createElement(React.Fragment, {
|
|
34
38
|
key: `crumb-${idx}`
|
|
35
|
-
}, /*#__PURE__*/React.isValidElement(child) &&
|
|
36
|
-
// @ts-ignore - TS2339 - Property 'displayName' does not exist on type 'string | JSXElementConstructor<any>'.
|
|
37
|
-
child?.type?.displayName === 'BreadcrumbLink' ?
|
|
38
|
-
/*#__PURE__*/
|
|
39
|
-
// @ts-ignore - TS2769 - No overload matches this call.
|
|
40
|
-
React.cloneElement(child, {
|
|
39
|
+
}, /*#__PURE__*/React.isValidElement(child) && child?.type?.displayName === 'BreadcrumbLink' ? /*#__PURE__*/React.cloneElement(child, {
|
|
41
40
|
linkComponent
|
|
42
41
|
}) : child, idx < total - 1 && /*#__PURE__*/React.createElement(BreadcrumbSeparator, {
|
|
43
42
|
"aria-hidden": true
|
|
@@ -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
|
import type { IconType } from '../Icon';
|
|
5
4
|
type ClassNames = Readonly<{
|
|
6
5
|
wrapper?: string;
|
|
@@ -36,20 +35,20 @@ export declare const BUTTON_SIZE: Readonly<{
|
|
|
36
35
|
export type ButtonType = (typeof BUTTON_TYPES)[keyof typeof BUTTON_TYPES];
|
|
37
36
|
export type ButtonActionType = (typeof BUTTON_ACTION_TYPE)[keyof typeof BUTTON_ACTION_TYPE];
|
|
38
37
|
export type ButtonSize = keyof typeof BUTTON_SIZE;
|
|
39
|
-
export
|
|
38
|
+
export interface BaseButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'disabled' | 'actionType' | 'onClick' | 'ariaLabel' | 'tabIndex' | 'isLoading' | 'role'> {
|
|
40
39
|
children?: React.ReactNode;
|
|
41
40
|
disabled?: boolean;
|
|
42
41
|
actionType?: ButtonActionType;
|
|
43
|
-
onClick?:
|
|
42
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
44
43
|
ariaLabel?: string;
|
|
45
44
|
tabIndex?: number;
|
|
46
45
|
isLoading?: boolean;
|
|
47
46
|
role?: string;
|
|
48
|
-
}
|
|
49
|
-
export
|
|
47
|
+
}
|
|
48
|
+
export interface UnstyledButtonProps extends Omit<BaseButtonProps, 'className'> {
|
|
50
49
|
className?: string;
|
|
51
|
-
}
|
|
52
|
-
export
|
|
50
|
+
}
|
|
51
|
+
export interface ButtonProps extends Omit<BaseButtonProps, 'classNames' | 'iconLeftName' | 'iconLeftType' | 'iconRightName' | 'iconRightType' | 'type' | 'isFluid' | 'size'> {
|
|
53
52
|
classNames?: ClassNames;
|
|
54
53
|
iconLeftName?: string;
|
|
55
54
|
iconLeftType?: IconType;
|
|
@@ -58,7 +57,7 @@ export type ButtonProps = Over<BaseButtonProps, {
|
|
|
58
57
|
type?: ButtonType;
|
|
59
58
|
isFluid?: boolean;
|
|
60
59
|
size?: ButtonSize;
|
|
61
|
-
}
|
|
60
|
+
}
|
|
62
61
|
export declare const UnstyledButton: Flow.AbstractComponent<UnstyledButtonProps, HTMLButtonElement>;
|
|
63
62
|
export declare const Button: Flow.AbstractComponent<ButtonProps, HTMLButtonElement>;
|
|
64
63
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAIrD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAOtC,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY;;;;;;;EAOvB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;EAI7B,CAAC;AAEH,eAAO,MAAM,WAAW;;;EAGtB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAC1E,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAC/D,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAElD,MAAM,WAAW,eACf,SAAQ,IAAI,CACV,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC3C,UAAU,GACV,UAAU,GACV,YAAY,GACZ,SAAS,GACT,WAAW,GACX,UAAU,GACV,WAAW,GACX,MAAM,CACT;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WACf,SAAQ,IAAI,CACV,eAAe,EACb,YAAY,GACZ,cAAc,GACd,cAAc,GACd,eAAe,GACf,eAAe,GACf,MAAM,GACN,SAAS,GACT,MAAM,CACT;IACD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAoBD,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,iBAAiB,CACjD,mBAAmB,EACnB,iBAAiB,CAkClB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,iBAAiB,CAoJvE,CAAC"}
|
|
@@ -130,9 +130,7 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
130
130
|
className: _ButtonModule.default.loader
|
|
131
131
|
}, /*#__PURE__*/React.createElement(_CircularLoader.CircularLoader, {
|
|
132
132
|
size: size,
|
|
133
|
-
colorToken: disabled ? 'colorTextDisabled' :
|
|
134
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly primary: "colorTextInversePrimary"; readonly secondary: "colorTextClickable"; readonly tertiary: "colorTextPrimary"; readonly ghost: "colorTextPrimary"; readonly danger: "colorTextInversePrimary"; readonly gradient: "colorTextInversePrimary"; }'.
|
|
135
|
-
ButtonTypeToLoaderColorMap[type]
|
|
133
|
+
colorToken: disabled ? 'colorTextDisabled' : ButtonTypeToLoaderColorMap[type]
|
|
136
134
|
})), /*#__PURE__*/React.createElement(_Truncate.Truncate, {
|
|
137
135
|
className: (0, _classify.classify)({
|
|
138
136
|
[_ButtonModule.default.hidden]: isLoading
|
|
@@ -143,13 +141,9 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
143
141
|
className: _ButtonModule.default.loader
|
|
144
142
|
}, /*#__PURE__*/React.createElement(_CircularLoader.CircularLoader, {
|
|
145
143
|
size: size,
|
|
146
|
-
colorToken: disabled ? 'colorTextDisabled' :
|
|
147
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly primary: "colorTextInversePrimary"; readonly secondary: "colorTextClickable"; readonly tertiary: "colorTextPrimary"; readonly ghost: "colorTextPrimary"; readonly danger: "colorTextInversePrimary"; readonly gradient: "colorTextInversePrimary"; }'.
|
|
148
|
-
ButtonTypeToLoaderColorMap[type]
|
|
144
|
+
colorToken: disabled ? 'colorTextDisabled' : ButtonTypeToLoaderColorMap[type]
|
|
149
145
|
})), /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
150
|
-
name: iconLeftName || iconRightName
|
|
151
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly primary: "inversePrimary"; readonly secondary: "clickable"; readonly tertiary: "primary"; readonly ghost: "primary"; readonly danger: "inversePrimary"; readonly gradient: "inversePrimary"; }'.
|
|
152
|
-
,
|
|
146
|
+
name: iconLeftName || iconRightName,
|
|
153
147
|
color: disabled ? 'disabled' : ButtonTypeToIconColorMap[type],
|
|
154
148
|
size: size === 'medium' ? 'medium' : 'small',
|
|
155
149
|
type: iconLeftName ? iconLeftType : iconRightType,
|
|
@@ -160,9 +154,7 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
160
154
|
// has icon _and_ child
|
|
161
155
|
(iconLeftName || iconRightName) && /*#__PURE__*/React.createElement(React.Fragment, null, iconLeftName && /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
162
156
|
name: iconLeftName,
|
|
163
|
-
color:
|
|
164
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly primary: "inversePrimary"; readonly secondary: "clickable"; readonly tertiary: "primary"; readonly ghost: "primary"; readonly danger: "inversePrimary"; readonly gradient: "inversePrimary"; }'.
|
|
165
|
-
disabled ? 'disabled' : ButtonTypeToIconColorMap[type],
|
|
157
|
+
color: disabled ? 'disabled' : ButtonTypeToIconColorMap[type],
|
|
166
158
|
size: size === 'medium' ? 'medium' : 'small',
|
|
167
159
|
type: iconLeftType,
|
|
168
160
|
className: (0, _classify.classify)({
|
|
@@ -174,18 +166,14 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
174
166
|
className: _ButtonModule.default.loader
|
|
175
167
|
}, /*#__PURE__*/React.createElement(_CircularLoader.CircularLoader, {
|
|
176
168
|
size: size,
|
|
177
|
-
colorToken: disabled ? 'colorTextDisabled' :
|
|
178
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly primary: "colorTextInversePrimary"; readonly secondary: "colorTextClickable"; readonly tertiary: "colorTextPrimary"; readonly ghost: "colorTextPrimary"; readonly danger: "colorTextInversePrimary"; readonly gradient: "colorTextInversePrimary"; }'.
|
|
179
|
-
ButtonTypeToLoaderColorMap[type]
|
|
169
|
+
colorToken: disabled ? 'colorTextDisabled' : ButtonTypeToLoaderColorMap[type]
|
|
180
170
|
})), /*#__PURE__*/React.createElement(_Truncate.Truncate, {
|
|
181
171
|
className: (0, _classify.classify)({
|
|
182
172
|
[_ButtonModule.default.hidden]: isLoading
|
|
183
173
|
})
|
|
184
174
|
}, children)), iconRightName && /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
185
175
|
name: iconRightName,
|
|
186
|
-
color:
|
|
187
|
-
// @ts-ignore - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly primary: "inversePrimary"; readonly secondary: "clickable"; readonly tertiary: "primary"; readonly ghost: "primary"; readonly danger: "inversePrimary"; readonly gradient: "inversePrimary"; }'.
|
|
188
|
-
disabled ? 'disabled' : ButtonTypeToIconColorMap[type],
|
|
176
|
+
color: disabled ? 'disabled' : ButtonTypeToIconColorMap[type],
|
|
189
177
|
size: size === 'medium' ? 'medium' : 'small',
|
|
190
178
|
type: iconRightType,
|
|
191
179
|
className: (0, _classify.classify)({
|
|
@@ -193,6 +181,4 @@ const Button = exports.Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
193
181
|
}, classNames?.icon)
|
|
194
182
|
}))));
|
|
195
183
|
});
|
|
196
|
-
|
|
197
|
-
// @ts-ignore - TS2540 - Cannot assign to 'name' because it is a read-only property.
|
|
198
|
-
Button.name = Button.displayName = 'Button';
|
|
184
|
+
Button.displayName = 'Button';
|
|
@@ -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
|
import type { ClickAwayRefType } from '../../utils/click-away';
|
|
5
4
|
import type { ButtonProps } from '../Button';
|
|
6
5
|
import type { MenuOption, MenuProps } from '../Menu';
|
|
@@ -24,7 +23,7 @@ type ClassNames = Readonly<{
|
|
|
24
23
|
dropdownContainer?: string;
|
|
25
24
|
buttonIcon?: string;
|
|
26
25
|
}>;
|
|
27
|
-
export
|
|
26
|
+
export interface ButtonDropdownProps extends Omit<ButtonProps, 'classNames' | 'menu' | 'positionStrategy' | 'anchorPosition' | 'onOptionSelect' | 'onMenuOpen' | 'onMenuClose' | 'tooltip' | 'elevation' | 'clickAwayRef'> {
|
|
28
27
|
classNames?: ClassNames;
|
|
29
28
|
menu?: MenuProps;
|
|
30
29
|
positionStrategy?: Strategy;
|
|
@@ -34,8 +33,8 @@ export type ButtonDropdownProps = Over<ButtonProps, {
|
|
|
34
33
|
onMenuClose?: () => unknown;
|
|
35
34
|
tooltip?: BaseTooltipProps;
|
|
36
35
|
elevation?: ElevationType;
|
|
37
|
-
clickAwayRef?: ClickAwayRefType
|
|
38
|
-
}
|
|
36
|
+
clickAwayRef?: React.RefObject<ClickAwayRefType | null>;
|
|
37
|
+
}
|
|
39
38
|
export declare const ButtonDropdown: Flow.AbstractComponent<ButtonDropdownProps, HTMLDivElement>;
|
|
40
39
|
export {};
|
|
41
40
|
//# sourceMappingURL=ButtonDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonDropdown/ButtonDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonDropdown/ButtonDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAG7D,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAG3C,OAAO,KAAK,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AAEnD,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAMhE,eAAO,MAAM,oBAAoB;;;;;;;EAO/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;EAGxB,CAAC;AAEH,MAAM,MAAM,UAAU,GACpB,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AACnE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE1E,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,MAAM,WAAW,mBACf,SAAQ,IAAI,CACV,WAAW,EACT,YAAY,GACZ,MAAM,GACN,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,aAAa,GACb,SAAS,GACT,WAAW,GACX,cAAc,CACjB;IACD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAC5B,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,cAAc,CAAC,EAAE,CACf,MAAM,EAAE,UAAU,EAClB,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,KACxD,OAAO,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;CACzD;AAED,eAAO,MAAM,cAAc,EAAE,IAAI,CAAC,iBAAiB,CACjD,mBAAmB,EACnB,cAAc,CAyJf,CAAC"}
|
|
@@ -61,15 +61,11 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
61
61
|
context
|
|
62
62
|
} = (0, _react2.useFloating)({
|
|
63
63
|
open: true,
|
|
64
|
-
// @ts-ignore - TS2322 - Type 'string' is not assignable to type 'Strategy | undefined'.
|
|
65
64
|
strategy: positionStrategy,
|
|
66
|
-
// @ts-ignore - TS2322 - Type 'string' is not assignable to type 'Placement | undefined'.
|
|
67
65
|
placement: anchorPosition,
|
|
68
66
|
whileElementsMounted: _react2.autoUpdate,
|
|
69
67
|
middleware: [(0, _react2.shift)(), (0, _react2.flip)(), (0, _react2.offset)(parseInt(_space.spaceXXSmall))]
|
|
70
68
|
});
|
|
71
|
-
|
|
72
|
-
// @ts-ignore - TS2345 - Argument of type '(ReferenceType & ReferenceType) | null' is not assignable to parameter of type 'HTMLElement | null | undefined'.
|
|
73
69
|
const dropdownWidth = (0, _hooks.useReferenceElementWidth)(refs.reference?.current);
|
|
74
70
|
const onMenuToggle = isOpen => {
|
|
75
71
|
if (isOpen) {
|
|
@@ -106,9 +102,7 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
106
102
|
iconRightName: children ? iconRightName || (isOpen ? 'caret-up' : 'caret-down') : iconRightName,
|
|
107
103
|
iconRightType: iconRightType,
|
|
108
104
|
disabled: disabled,
|
|
109
|
-
size: size
|
|
110
|
-
// @ts-ignore - TS2322 - Type '((node: ReferenceType | null) => void) & ((node: ReferenceType | null) => void)' is not assignable to type '{ current: HTMLElement | null | undefined; }'.
|
|
111
|
-
,
|
|
105
|
+
size: size,
|
|
112
106
|
ref: (0, _mergeRefs.mergeRefs)([refs.setReference, triggerRef]),
|
|
113
107
|
onClick: e => {
|
|
114
108
|
onClick?.(e);
|
|
@@ -122,14 +116,10 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
122
116
|
}
|
|
123
117
|
}), children)), isOpen && menu && /*#__PURE__*/React.createElement(_react2.FloatingPortal, null, /*#__PURE__*/React.createElement(_react2.FloatingFocusManager, {
|
|
124
118
|
modal: false,
|
|
125
|
-
context: context
|
|
126
|
-
// @ts-ignore - TS2322 - Type 'MutableRefObject<ReferenceType | null> & MutableRefObject<ReferenceType | null>' is not assignable to type 'number | MutableRefObject<HTMLElement | null> | undefined'.
|
|
127
|
-
,
|
|
119
|
+
context: context,
|
|
128
120
|
initialFocus: refs.reference
|
|
129
121
|
}, /*#__PURE__*/React.createElement("div", {
|
|
130
|
-
className: _ButtonDropdownModule.default.menuWrapper
|
|
131
|
-
// @ts-ignore - TS2322 - Type '((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void)' is not assignable to type '{ current: HTMLElement | null | undefined; }'.
|
|
132
|
-
,
|
|
122
|
+
className: _ButtonDropdownModule.default.menuWrapper,
|
|
133
123
|
ref: (0, _mergeRefs.mergeRefs)([refs.setFloating, boundaryRef]),
|
|
134
124
|
style: {
|
|
135
125
|
display: 'flex',
|
|
@@ -148,7 +138,7 @@ const ButtonDropdown = exports.ButtonDropdown = /*#__PURE__*/React.forwardRef((_
|
|
|
148
138
|
}
|
|
149
139
|
}, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({}, menu, {
|
|
150
140
|
onSelect: (option, e) => {
|
|
151
|
-
onOptionSelect
|
|
141
|
+
onOptionSelect?.(option, e);
|
|
152
142
|
if (
|
|
153
143
|
// option.keepMenuOpenOnOptionSelect - to allow the menu persist its open stat upon option selection in normal variant
|
|
154
144
|
!option.keepMenuOpenOnOptionSelect && (!menu.optionsVariant || menu.optionsVariant === 'normal')) {
|