@carbon/react 1.29.0 → 1.30.0-rc.0
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/es/_virtual/_rollupPluginBabelHelpers.js +16 -5
- package/es/components/Accordion/Accordion.Skeleton.js +0 -7
- package/es/components/Accordion/Accordion.js +1 -8
- package/es/components/Accordion/AccordionItem.js +5 -19
- package/es/components/AspectRatio/AspectRatio.js +0 -5
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
- package/es/components/Breadcrumb/Breadcrumb.js +0 -3
- package/es/components/Breadcrumb/BreadcrumbItem.js +0 -7
- package/es/components/Button/Button.Skeleton.js +2 -7
- package/es/components/Button/Button.js +2 -36
- package/es/components/ButtonSet/ButtonSet.js +0 -2
- package/es/components/Checkbox/Checkbox.Skeleton.js +0 -1
- package/es/components/Checkbox/Checkbox.js +4 -20
- package/es/components/CheckboxGroup/CheckboxGroup.js +0 -11
- package/es/components/ClassPrefix/index.d.ts +26 -0
- package/es/components/ClassPrefix/index.js +0 -2
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
- package/es/components/CodeSnippet/CodeSnippet.js +6 -45
- package/es/components/ComboBox/ComboBox.js +12 -79
- package/es/components/ComboBox/tools/filter.js +0 -1
- package/es/components/ComboButton/index.js +0 -14
- package/es/components/ComposedModal/ComposedModal.js +2 -32
- package/es/components/ComposedModal/ModalFooter.js +0 -21
- package/es/components/ComposedModal/ModalHeader.js +0 -12
- package/es/components/ContainedList/ContainedList.js +5 -32
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
- package/es/components/ContentSwitcher/ContentSwitcher.js +11 -23
- package/es/components/ContextMenu/useContextMenu.js +1 -6
- package/es/components/Copy/Copy.js +8 -31
- package/es/components/CopyButton/CopyButton.js +0 -4
- package/es/components/DangerButton/DangerButton.js +0 -1
- package/es/components/DataTable/DataTable.js +171 -91
- package/es/components/DataTable/Table.js +0 -6
- package/es/components/DataTable/TableBatchAction.js +0 -4
- package/es/components/DataTable/TableBatchActions.js +0 -8
- package/es/components/DataTable/TableBody.js +0 -1
- package/es/components/DataTable/TableContainer.js +0 -5
- package/es/components/DataTable/TableExpandHeader.js +0 -7
- package/es/components/DataTable/TableExpandRow.js +0 -6
- package/es/components/DataTable/TableExpandedRow.js +0 -6
- package/es/components/DataTable/TableHeader.d.ts +1 -1
- package/es/components/DataTable/TableHeader.js +3 -19
- package/es/components/DataTable/TableRow.js +4 -5
- package/es/components/DataTable/TableSelectAll.js +0 -8
- package/es/components/DataTable/TableSelectRow.js +2 -10
- package/es/components/DataTable/TableToolbar.js +0 -3
- package/es/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +3 -6
- package/es/components/DataTable/TableToolbarSearch.js +2 -30
- package/es/components/DataTable/state/getDerivedStateFromProps.js +0 -4
- package/es/components/DataTable/state/sorting.js +5 -8
- package/es/components/DataTable/tools/denormalize.js +2 -2
- package/es/components/DataTable/tools/filter.js +0 -2
- package/es/components/DataTable/tools/instanceId.js +0 -1
- package/es/components/DataTable/tools/normalize.js +10 -10
- package/es/components/DataTable/tools/sorting.js +5 -13
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
- package/es/components/DatePicker/DatePicker.Skeleton.js +0 -6
- package/es/components/DatePicker/DatePicker.js +154 -177
- package/es/components/DatePicker/plugins/appendToPlugin.js +3 -7
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
- package/es/components/DatePicker/plugins/rangePlugin.js +2 -7
- package/es/components/DatePickerInput/DatePickerInput.js +2 -28
- package/es/components/Dropdown/Dropdown.Skeleton.js +0 -2
- package/es/components/Dropdown/Dropdown.js +43 -52
- package/es/components/ErrorBoundary/ErrorBoundary.js +0 -10
- package/es/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +1 -10
- package/es/components/FeatureFlags/index.js +8 -20
- package/es/components/FileUploader/FileUploader.Skeleton.js +0 -2
- package/es/components/FileUploader/FileUploader.js +3 -38
- package/es/components/FileUploader/FileUploaderButton.js +3 -24
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -28
- package/es/components/FileUploader/FileUploaderItem.js +1 -11
- package/es/components/FileUploader/Filename.js +0 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
- package/es/components/FluidComboBox/FluidComboBox.js +0 -18
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
- package/es/components/FluidDatePicker/FluidDatePicker.js +0 -6
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
- package/es/components/FluidDropdown/FluidDropdown.js +0 -18
- package/es/components/FluidForm/FluidForm.js +0 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
- package/es/components/FluidSelect/FluidSelect.js +0 -10
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
- package/es/components/FluidTextArea/FluidTextArea.js +0 -20
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
- package/es/components/FluidTextInput/FluidTextInput.js +0 -14
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
- package/es/components/FluidTimePicker/FluidTimePicker.js +1 -11
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
- package/es/components/Form/Form.d.ts +23 -0
- package/es/components/Form/Form.js +3 -6
- package/es/components/Form/index.d.ts +7 -0
- package/es/components/FormGroup/FormGroup.js +0 -7
- package/es/components/FormItem/FormItem.js +0 -2
- package/es/components/FormLabel/FormLabel.js +1 -7
- package/es/components/Grid/CSSGrid.js +2 -15
- package/es/components/Grid/Column.js +18 -59
- package/es/components/Grid/ColumnHang.js +2 -5
- package/es/components/Grid/FlexGrid.js +2 -8
- package/es/components/Grid/Grid.js +0 -8
- package/es/components/Grid/GridContext.js +1 -3
- package/es/components/Grid/Row.js +2 -7
- package/es/components/Heading/index.js +0 -4
- package/es/components/Icon/Icon.Skeleton.js +2 -2
- package/es/components/IconButton/index.js +0 -10
- package/es/components/IdPrefix/index.js +0 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +0 -14
- package/es/components/InlineLoading/InlineLoading.js +0 -12
- package/es/components/Layer/index.js +3 -6
- package/es/components/Layout/LayoutDirection.js +0 -3
- package/es/components/Layout/useLayoutDirection.js +0 -1
- package/es/components/Link/Link.js +3 -10
- package/es/components/ListBox/ListBox.js +2 -13
- package/es/components/ListBox/ListBoxField.js +0 -5
- package/es/components/ListBox/ListBoxMenuIcon.js +0 -4
- package/es/components/ListBox/ListBoxMenuItem.js +2 -6
- package/es/components/ListBox/ListBoxPropTypes.d.ts +2 -2
- package/es/components/ListBox/ListBoxSelection.js +1 -13
- package/es/components/ListBox/next/ListBoxSelection.js +1 -14
- package/es/components/ListBox/next/ListBoxTrigger.js +1 -3
- package/es/components/ListItem/ListItem.d.ts +23 -0
- package/es/components/ListItem/ListItem.js +4 -8
- package/es/components/ListItem/index.d.ts +7 -0
- package/es/components/Loading/Loading.js +0 -6
- package/es/components/Menu/Menu.js +22 -40
- package/es/components/Menu/MenuContext.js +4 -5
- package/es/components/Menu/MenuItem.js +5 -39
- package/es/components/MenuButton/index.js +0 -9
- package/es/components/Modal/Modal.js +0 -43
- package/es/components/ModalWrapper/ModalWrapper.js +2 -15
- package/es/components/MultiSelect/FilterableMultiSelect.js +2 -60
- package/es/components/MultiSelect/MultiSelect.js +22 -70
- package/es/components/MultiSelect/MultiSelectPropTypes.js +0 -1
- package/es/components/MultiSelect/index.js +0 -1
- package/es/components/MultiSelect/tools/itemToString.js +0 -2
- package/es/components/MultiSelect/tools/sorting.js +3 -4
- package/es/components/Notification/Notification.js +0 -78
- package/es/components/NumberInput/NumberInput.Skeleton.js +0 -2
- package/es/components/NumberInput/NumberInput.js +3 -60
- package/es/components/OrderedList/OrderedList.d.ts +39 -0
- package/es/components/OrderedList/OrderedList.js +7 -19
- package/es/components/{Form/index.js → OrderedList/index.d.ts} +1 -3
- package/es/components/OverflowMenu/OverflowMenu.js +65 -86
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
- package/es/components/OverflowMenuV2/index.js +0 -5
- package/es/components/Pagination/Pagination.Skeleton.js +0 -2
- package/es/components/Pagination/Pagination.js +11 -47
- package/es/components/Pagination/experimental/PageSelector.js +0 -10
- package/es/components/Pagination/experimental/Pagination.js +2 -48
- package/es/components/PaginationNav/PaginationNav.js +15 -59
- package/es/components/Popover/index.d.ts +14 -8
- package/es/components/Popover/index.js +44 -48
- package/es/components/PrimaryButton/PrimaryButton.js +0 -1
- package/es/components/ProgressBar/ProgressBar.js +0 -15
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
- package/es/components/ProgressIndicator/ProgressIndicator.js +2 -40
- package/es/components/RadioButton/RadioButton.Skeleton.js +0 -1
- package/es/components/RadioButton/RadioButton.js +0 -13
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
- package/es/components/RadioTile/RadioTile.js +0 -12
- package/es/components/Search/Search.Skeleton.js +0 -2
- package/es/components/Search/Search.js +1 -28
- package/es/components/SecondaryButton/SecondaryButton.js +0 -1
- package/es/components/Select/Select.Skeleton.js +0 -2
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/Select/Select.js +6 -33
- package/es/components/SelectItem/SelectItem.js +0 -5
- package/es/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
- package/es/components/SelectItemGroup/SelectItemGroup.js +1 -7
- package/es/components/SkeletonIcon/SkeletonIcon.js +0 -2
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
- package/es/components/SkeletonText/SkeletonText.js +0 -12
- package/es/components/Slider/Slider.Skeleton.js +0 -2
- package/es/components/Slider/Slider.d.ts +0 -1
- package/es/components/Slider/Slider.js +112 -135
- package/es/components/Stack/Stack.js +1 -8
- package/es/components/StructuredList/StructuredList.Skeleton.js +0 -5
- package/es/components/StructuredList/StructuredList.js +1 -25
- package/es/components/Switch/IconSwitch.js +0 -18
- package/es/components/Switch/Switch.js +0 -11
- package/es/components/TabContent/TabContent.js +2 -6
- package/es/components/Tabs/Tabs.Skeleton.js +0 -4
- package/es/components/Tabs/Tabs.js +135 -104
- package/es/components/Tabs/usePressable.js +18 -31
- package/es/components/Tag/Tag.Skeleton.js +0 -2
- package/es/components/Tag/Tag.js +0 -15
- package/es/components/Text/Text.js +5 -18
- package/es/components/Text/TextDirection.js +0 -3
- package/es/components/Text/TextDirectionContext.js +0 -1
- package/es/components/Text/createTextComponent.js +0 -3
- package/es/components/TextArea/TextArea.Skeleton.js +0 -2
- package/es/components/TextArea/TextArea.js +11 -33
- package/es/components/TextInput/ControlledPasswordInput.js +0 -20
- package/es/components/TextInput/PasswordInput.js +0 -25
- package/es/components/TextInput/TextInput.Skeleton.js +0 -2
- package/es/components/TextInput/TextInput.d.ts +1 -1
- package/es/components/TextInput/TextInput.js +5 -33
- package/es/components/TextInput/util.js +3 -5
- package/es/components/Theme/index.js +1 -6
- package/es/components/Tile/Tile.js +32 -59
- package/es/components/TileGroup/TileGroup.js +1 -22
- package/es/components/TimePicker/TimePicker.js +6 -32
- package/es/components/TimePickerSelect/TimePickerSelect.js +2 -5
- package/es/components/Toggle/Toggle.Skeleton.js +0 -8
- package/es/components/Toggle/Toggle.js +0 -16
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
- package/es/components/Toggletip/index.d.ts +148 -0
- package/es/components/Toggletip/index.js +20 -44
- package/es/components/Tooltip/DefinitionTooltip.js +0 -11
- package/es/components/Tooltip/Tooltip.d.ts +1 -1
- package/es/components/Tooltip/Tooltip.js +4 -21
- package/es/components/TreeView/TreeNode.js +21 -66
- package/es/components/TreeView/TreeView.js +11 -67
- package/es/components/UIShell/Content.js +2 -4
- package/es/components/UIShell/Header.js +0 -2
- package/es/components/UIShell/HeaderContainer.d.ts +33 -0
- package/es/components/UIShell/HeaderContainer.js +13 -11
- package/es/components/UIShell/HeaderGlobalAction.js +0 -6
- package/es/components/UIShell/HeaderGlobalBar.js +0 -1
- package/es/components/UIShell/HeaderMenu.js +32 -31
- package/es/components/UIShell/HeaderMenuButton.js +2 -4
- package/es/components/UIShell/HeaderMenuItem.js +0 -8
- package/es/components/UIShell/HeaderName.js +0 -5
- package/es/components/UIShell/HeaderNavigation.js +0 -2
- package/es/components/UIShell/HeaderPanel.js +0 -2
- package/es/components/UIShell/HeaderSideNavItems.js +0 -2
- package/es/components/UIShell/Link.js +2 -3
- package/es/components/UIShell/SideNav.d.ts +3 -1
- package/es/components/UIShell/SideNav.js +44 -36
- package/es/components/UIShell/SideNavDetails.js +0 -3
- package/es/components/UIShell/SideNavDivider.js +0 -1
- package/es/components/UIShell/SideNavFooter.js +1 -4
- package/es/components/UIShell/SideNavHeader.js +0 -4
- package/es/components/UIShell/SideNavIcon.js +0 -3
- package/es/components/UIShell/SideNavItem.js +0 -3
- package/es/components/UIShell/SideNavItems.js +2 -6
- package/es/components/UIShell/SideNavLink.js +3 -7
- package/es/components/UIShell/SideNavLinkText.js +0 -2
- package/es/components/UIShell/SideNavMenu.js +0 -16
- package/es/components/UIShell/SideNavMenuItem.js +0 -2
- package/es/components/UIShell/SideNavSwitcher.js +2 -5
- package/es/components/UIShell/SkipToContent.d.ts +32 -0
- package/es/components/UIShell/SkipToContent.js +8 -15
- package/es/components/UIShell/Switcher.js +0 -2
- package/es/components/UIShell/SwitcherDivider.js +0 -1
- package/es/components/UIShell/SwitcherItem.js +0 -3
- package/es/components/UnorderedList/UnorderedList.d.ts +34 -0
- package/es/components/UnorderedList/UnorderedList.js +6 -16
- package/es/components/UnorderedList/index.d.ts +7 -0
- package/es/index.js +7 -8
- package/es/internal/ClickListener.js +3 -13
- package/es/internal/FloatingMenu.js +57 -63
- package/es/internal/OptimizedResize.js +6 -12
- package/es/internal/Selection.js +2 -25
- package/es/internal/createClassWrapper.js +0 -2
- package/es/internal/deprecateFieldOnObject.js +0 -4
- package/es/internal/focus/index.js +0 -1
- package/es/internal/keyboard/keys.js +2 -1
- package/es/internal/keyboard/match.js +1 -6
- package/es/internal/keyboard/navigation.js +8 -7
- package/es/internal/useAnnouncer.js +0 -1
- package/es/internal/useAttachedMenu.js +1 -9
- package/es/internal/useControllableState.js +6 -13
- package/es/internal/useDelayedState.js +2 -4
- package/es/internal/useEffectOnce.js +0 -1
- package/es/internal/useEvent.js +61 -3
- package/es/internal/useId.js +2 -5
- package/es/internal/useIsomorphicEffect.js +1 -0
- package/es/internal/useMergedRefs.js +2 -2
- package/es/internal/useNoInteractiveChildren.js +2 -13
- package/es/internal/useNormalizedInputProps.js +0 -3
- package/es/internal/useSavedCallback.js +1 -2
- package/es/internal/warning.js +0 -3
- package/es/internal/wrapFocus.js +1 -8
- package/es/prop-types/deprecate.js +2 -5
- package/es/prop-types/isRequiredOneOf.js +2 -5
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
- package/es/tools/array.js +0 -3
- package/es/tools/events.js +0 -3
- package/es/tools/mergeRefs.js +0 -2
- package/es/tools/wrapComponent.js +2 -5
- package/lib/_virtual/_rollupPluginBabelHelpers.js +17 -4
- package/lib/components/Accordion/Accordion.Skeleton.js +0 -7
- package/lib/components/Accordion/Accordion.js +1 -27
- package/lib/components/Accordion/AccordionItem.js +5 -19
- package/lib/components/AspectRatio/AspectRatio.js +0 -5
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
- package/lib/components/Breadcrumb/Breadcrumb.js +0 -3
- package/lib/components/Breadcrumb/BreadcrumbItem.js +0 -7
- package/lib/components/Button/Button.Skeleton.js +2 -26
- package/lib/components/Button/Button.js +2 -36
- package/lib/components/ButtonSet/ButtonSet.js +0 -2
- package/lib/components/Checkbox/Checkbox.Skeleton.js +0 -1
- package/lib/components/Checkbox/Checkbox.js +4 -20
- package/lib/components/CheckboxGroup/CheckboxGroup.js +0 -11
- package/lib/components/ClassPrefix/index.d.ts +26 -0
- package/lib/components/ClassPrefix/index.js +0 -2
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
- package/lib/components/CodeSnippet/CodeSnippet.js +6 -45
- package/lib/components/ComboBox/ComboBox.js +19 -86
- package/lib/components/ComboBox/tools/filter.js +0 -1
- package/lib/components/ComboButton/index.js +0 -14
- package/lib/components/ComposedModal/ComposedModal.js +2 -32
- package/lib/components/ComposedModal/ModalFooter.js +0 -21
- package/lib/components/ComposedModal/ModalHeader.js +0 -12
- package/lib/components/ContainedList/ContainedList.js +5 -32
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
- package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -23
- package/lib/components/ContextMenu/useContextMenu.js +1 -6
- package/lib/components/Copy/Copy.js +8 -50
- package/lib/components/CopyButton/CopyButton.js +0 -4
- package/lib/components/DangerButton/DangerButton.js +0 -1
- package/lib/components/DataTable/DataTable.js +171 -91
- package/lib/components/DataTable/Table.js +0 -6
- package/lib/components/DataTable/TableBatchAction.js +0 -4
- package/lib/components/DataTable/TableBatchActions.js +0 -8
- package/lib/components/DataTable/TableBody.js +0 -1
- package/lib/components/DataTable/TableContainer.js +0 -5
- package/lib/components/DataTable/TableExpandHeader.js +0 -7
- package/lib/components/DataTable/TableExpandRow.js +0 -6
- package/lib/components/DataTable/TableExpandedRow.js +0 -6
- package/lib/components/DataTable/TableHeader.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.js +3 -19
- package/lib/components/DataTable/TableRow.js +4 -5
- package/lib/components/DataTable/TableSelectAll.js +0 -8
- package/lib/components/DataTable/TableSelectRow.js +2 -10
- package/lib/components/DataTable/TableToolbar.js +0 -3
- package/lib/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarMenu.js +3 -6
- package/lib/components/DataTable/TableToolbarSearch.js +2 -30
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +0 -4
- package/lib/components/DataTable/state/sorting.js +5 -8
- package/lib/components/DataTable/tools/denormalize.js +2 -2
- package/lib/components/DataTable/tools/filter.js +0 -2
- package/lib/components/DataTable/tools/instanceId.js +0 -1
- package/lib/components/DataTable/tools/normalize.js +10 -10
- package/lib/components/DataTable/tools/sorting.js +5 -13
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
- package/lib/components/DatePicker/DatePicker.Skeleton.js +0 -6
- package/lib/components/DatePicker/DatePicker.js +154 -177
- package/lib/components/DatePicker/plugins/appendToPlugin.js +3 -7
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -7
- package/lib/components/DatePickerInput/DatePickerInput.js +2 -28
- package/lib/components/Dropdown/Dropdown.Skeleton.js +0 -2
- package/lib/components/Dropdown/Dropdown.js +50 -59
- package/lib/components/ErrorBoundary/ErrorBoundary.js +0 -10
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +1 -10
- package/lib/components/FeatureFlags/index.js +8 -20
- package/lib/components/FileUploader/FileUploader.Skeleton.js +0 -2
- package/lib/components/FileUploader/FileUploader.js +3 -57
- package/lib/components/FileUploader/FileUploaderButton.js +3 -43
- package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -28
- package/lib/components/FileUploader/FileUploaderItem.js +1 -30
- package/lib/components/FileUploader/Filename.js +0 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
- package/lib/components/FluidComboBox/FluidComboBox.js +0 -18
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.js +0 -6
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
- package/lib/components/FluidDropdown/FluidDropdown.js +0 -18
- package/lib/components/FluidForm/FluidForm.js +0 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
- package/lib/components/FluidSelect/FluidSelect.js +0 -10
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
- package/lib/components/FluidTextArea/FluidTextArea.js +0 -20
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
- package/lib/components/FluidTextInput/FluidTextInput.js +0 -14
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.js +1 -11
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
- package/lib/components/Form/Form.d.ts +23 -0
- package/lib/components/Form/Form.js +3 -6
- package/lib/components/Form/index.d.ts +7 -0
- package/lib/components/FormGroup/FormGroup.js +0 -7
- package/lib/components/FormItem/FormItem.js +0 -2
- package/lib/components/FormLabel/FormLabel.js +1 -26
- package/lib/components/Grid/CSSGrid.js +2 -15
- package/lib/components/Grid/Column.js +18 -59
- package/lib/components/Grid/ColumnHang.js +2 -5
- package/lib/components/Grid/FlexGrid.js +2 -8
- package/lib/components/Grid/Grid.js +0 -8
- package/lib/components/Grid/GridContext.js +1 -3
- package/lib/components/Grid/Row.js +2 -7
- package/lib/components/Heading/index.js +0 -4
- package/lib/components/Icon/Icon.Skeleton.js +2 -2
- package/lib/components/IconButton/index.js +0 -10
- package/lib/components/IdPrefix/index.js +0 -2
- package/lib/components/InlineCheckbox/InlineCheckbox.js +0 -14
- package/lib/components/InlineLoading/InlineLoading.js +0 -12
- package/lib/components/Layer/index.js +3 -6
- package/lib/components/Layout/LayoutDirection.js +0 -3
- package/lib/components/Layout/useLayoutDirection.js +0 -1
- package/lib/components/Link/Link.js +3 -10
- package/lib/components/ListBox/ListBox.js +2 -13
- package/lib/components/ListBox/ListBoxField.js +0 -5
- package/lib/components/ListBox/ListBoxMenuIcon.js +0 -4
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -6
- package/lib/components/ListBox/ListBoxPropTypes.d.ts +2 -2
- package/lib/components/ListBox/ListBoxSelection.js +1 -13
- package/lib/components/ListBox/next/ListBoxSelection.js +1 -14
- package/lib/components/ListBox/next/ListBoxTrigger.js +1 -3
- package/lib/components/ListItem/ListItem.d.ts +23 -0
- package/lib/components/ListItem/ListItem.js +4 -8
- package/lib/components/ListItem/index.d.ts +7 -0
- package/lib/components/Loading/Loading.js +0 -6
- package/lib/components/Menu/Menu.js +22 -40
- package/lib/components/Menu/MenuContext.js +4 -5
- package/lib/components/Menu/MenuItem.js +5 -39
- package/lib/components/MenuButton/index.js +0 -9
- package/lib/components/Modal/Modal.js +0 -43
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -15
- package/lib/components/MultiSelect/FilterableMultiSelect.js +8 -66
- package/lib/components/MultiSelect/MultiSelect.js +30 -78
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +0 -1
- package/lib/components/MultiSelect/index.js +0 -1
- package/lib/components/MultiSelect/tools/itemToString.js +0 -2
- package/lib/components/MultiSelect/tools/sorting.js +3 -4
- package/lib/components/Notification/Notification.js +0 -78
- package/lib/components/NumberInput/NumberInput.Skeleton.js +0 -2
- package/lib/components/NumberInput/NumberInput.js +3 -60
- package/lib/components/OrderedList/OrderedList.d.ts +39 -0
- package/lib/components/OrderedList/OrderedList.js +7 -19
- package/lib/components/OrderedList/index.d.ts +7 -0
- package/lib/components/OverflowMenu/OverflowMenu.js +65 -86
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
- package/lib/components/OverflowMenuV2/index.js +0 -5
- package/lib/components/Pagination/Pagination.Skeleton.js +0 -2
- package/lib/components/Pagination/Pagination.js +11 -47
- package/lib/components/Pagination/experimental/PageSelector.js +0 -10
- package/lib/components/Pagination/experimental/Pagination.js +2 -67
- package/lib/components/PaginationNav/PaginationNav.js +15 -78
- package/lib/components/Popover/index.d.ts +14 -8
- package/lib/components/Popover/index.js +44 -48
- package/lib/components/PrimaryButton/PrimaryButton.js +0 -1
- package/lib/components/ProgressBar/ProgressBar.js +0 -15
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
- package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -40
- package/lib/components/RadioButton/RadioButton.Skeleton.js +0 -1
- package/lib/components/RadioButton/RadioButton.js +0 -13
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
- package/lib/components/RadioTile/RadioTile.js +0 -12
- package/lib/components/Search/Search.Skeleton.js +0 -2
- package/lib/components/Search/Search.js +1 -28
- package/lib/components/SecondaryButton/SecondaryButton.js +0 -1
- package/lib/components/Select/Select.Skeleton.js +0 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Select/Select.js +6 -33
- package/lib/components/SelectItem/SelectItem.js +0 -5
- package/lib/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
- package/lib/components/SelectItemGroup/SelectItemGroup.js +1 -26
- package/lib/components/SkeletonIcon/SkeletonIcon.js +0 -2
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
- package/lib/components/SkeletonText/SkeletonText.js +0 -12
- package/lib/components/Slider/Slider.Skeleton.js +0 -2
- package/lib/components/Slider/Slider.d.ts +0 -1
- package/lib/components/Slider/Slider.js +112 -154
- package/lib/components/Stack/Stack.js +1 -8
- package/lib/components/StructuredList/StructuredList.Skeleton.js +0 -5
- package/lib/components/StructuredList/StructuredList.js +1 -25
- package/lib/components/Switch/IconSwitch.js +0 -18
- package/lib/components/Switch/Switch.js +0 -11
- package/lib/components/TabContent/TabContent.js +2 -6
- package/lib/components/Tabs/Tabs.Skeleton.js +0 -4
- package/lib/components/Tabs/Tabs.js +133 -102
- package/lib/components/Tabs/usePressable.js +18 -31
- package/lib/components/Tag/Tag.Skeleton.js +0 -2
- package/lib/components/Tag/Tag.js +0 -15
- package/lib/components/Text/Text.js +5 -18
- package/lib/components/Text/TextDirection.js +0 -3
- package/lib/components/Text/TextDirectionContext.js +0 -1
- package/lib/components/Text/createTextComponent.js +0 -3
- package/lib/components/TextArea/TextArea.Skeleton.js +0 -2
- package/lib/components/TextArea/TextArea.js +10 -32
- package/lib/components/TextInput/ControlledPasswordInput.js +0 -20
- package/lib/components/TextInput/PasswordInput.js +0 -25
- package/lib/components/TextInput/TextInput.Skeleton.js +0 -2
- package/lib/components/TextInput/TextInput.d.ts +1 -1
- package/lib/components/TextInput/TextInput.js +5 -52
- package/lib/components/TextInput/util.js +3 -5
- package/lib/components/Theme/index.js +1 -6
- package/lib/components/Tile/Tile.js +31 -58
- package/lib/components/TileGroup/TileGroup.js +1 -22
- package/lib/components/TimePicker/TimePicker.js +6 -32
- package/lib/components/TimePickerSelect/TimePickerSelect.js +2 -5
- package/lib/components/Toggle/Toggle.Skeleton.js +0 -8
- package/lib/components/Toggle/Toggle.js +0 -16
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
- package/lib/components/Toggletip/index.d.ts +148 -0
- package/lib/components/Toggletip/index.js +20 -44
- package/lib/components/Tooltip/DefinitionTooltip.js +0 -11
- package/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.js +4 -21
- package/lib/components/TreeView/TreeNode.js +21 -66
- package/lib/components/TreeView/TreeView.js +11 -67
- package/lib/components/UIShell/Content.js +2 -4
- package/lib/components/UIShell/Header.js +0 -2
- package/lib/components/UIShell/HeaderContainer.d.ts +33 -0
- package/lib/components/UIShell/HeaderContainer.js +13 -11
- package/lib/components/UIShell/HeaderGlobalAction.js +0 -6
- package/lib/components/UIShell/HeaderGlobalBar.js +0 -1
- package/lib/components/UIShell/HeaderMenu.js +32 -31
- package/lib/components/UIShell/HeaderMenuButton.js +2 -4
- package/lib/components/UIShell/HeaderMenuItem.js +0 -8
- package/lib/components/UIShell/HeaderName.js +0 -5
- package/lib/components/UIShell/HeaderNavigation.js +0 -2
- package/lib/components/UIShell/HeaderPanel.js +0 -2
- package/lib/components/UIShell/HeaderSideNavItems.js +0 -2
- package/lib/components/UIShell/Link.js +2 -3
- package/lib/components/UIShell/SideNav.d.ts +3 -1
- package/lib/components/UIShell/SideNav.js +43 -35
- package/lib/components/UIShell/SideNavDetails.js +0 -3
- package/lib/components/UIShell/SideNavDivider.js +0 -1
- package/lib/components/UIShell/SideNavFooter.js +1 -4
- package/lib/components/UIShell/SideNavHeader.js +0 -4
- package/lib/components/UIShell/SideNavIcon.js +0 -3
- package/lib/components/UIShell/SideNavItem.js +0 -3
- package/lib/components/UIShell/SideNavItems.js +2 -6
- package/lib/components/UIShell/SideNavLink.js +3 -7
- package/lib/components/UIShell/SideNavLinkText.js +0 -2
- package/lib/components/UIShell/SideNavMenu.js +0 -16
- package/lib/components/UIShell/SideNavMenuItem.js +0 -2
- package/lib/components/UIShell/SideNavSwitcher.js +2 -5
- package/lib/components/UIShell/SkipToContent.d.ts +32 -0
- package/lib/components/UIShell/SkipToContent.js +8 -15
- package/lib/components/UIShell/Switcher.js +0 -2
- package/lib/components/UIShell/SwitcherDivider.js +0 -1
- package/lib/components/UIShell/SwitcherItem.js +0 -3
- package/lib/components/UnorderedList/UnorderedList.d.ts +34 -0
- package/lib/components/UnorderedList/UnorderedList.js +6 -16
- package/lib/components/UnorderedList/index.d.ts +7 -0
- package/lib/index.js +42 -43
- package/lib/internal/ClickListener.js +3 -13
- package/lib/internal/FloatingMenu.js +57 -63
- package/lib/internal/OptimizedResize.js +6 -12
- package/lib/internal/Selection.js +2 -25
- package/lib/internal/createClassWrapper.js +0 -2
- package/lib/internal/deprecateFieldOnObject.js +0 -4
- package/lib/internal/focus/index.js +0 -1
- package/lib/internal/keyboard/keys.js +2 -1
- package/lib/internal/keyboard/match.js +1 -6
- package/lib/internal/keyboard/navigation.js +8 -7
- package/lib/internal/useAnnouncer.js +0 -1
- package/lib/internal/useAttachedMenu.js +1 -9
- package/lib/internal/useControllableState.js +6 -13
- package/lib/internal/useDelayedState.js +2 -4
- package/lib/internal/useEffectOnce.js +0 -1
- package/lib/internal/useEvent.js +61 -2
- package/lib/internal/useId.js +2 -5
- package/lib/internal/useIsomorphicEffect.js +1 -0
- package/lib/internal/useMergedRefs.js +2 -2
- package/lib/internal/useNoInteractiveChildren.js +2 -13
- package/lib/internal/useNormalizedInputProps.js +0 -3
- package/lib/internal/useSavedCallback.js +1 -2
- package/lib/internal/warning.js +0 -3
- package/lib/internal/wrapFocus.js +1 -8
- package/lib/prop-types/deprecate.js +2 -5
- package/lib/prop-types/isRequiredOneOf.js +2 -5
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
- package/lib/tools/array.js +0 -3
- package/lib/tools/events.js +0 -3
- package/lib/tools/mergeRefs.js +0 -2
- package/lib/tools/wrapComponent.js +2 -5
- package/package.json +9 -9
- package/es/components/Tab/Tab.js +0 -185
- package/es/components/Tab/index.js +0 -14
- package/es/components/TimePickerSelect/index.js +0 -13
- package/lib/components/Form/index.js +0 -17
- package/lib/components/Tab/Tab.js +0 -214
- package/lib/components/Tab/index.js +0 -39
- package/lib/components/TimePickerSelect/index.js +0 -38
|
@@ -14,35 +14,14 @@ var PropTypes = require('prop-types');
|
|
|
14
14
|
var React = require('react');
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var iconsReact = require('@carbon/icons-react');
|
|
17
|
-
var Button = require('../Button/Button.js');
|
|
18
17
|
var index = require('../IconButton/index.js');
|
|
19
|
-
var FeatureFlags = require('@carbon/feature-flags');
|
|
20
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
21
19
|
|
|
22
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
21
|
|
|
24
|
-
function _interopNamespace(e) {
|
|
25
|
-
if (e && e.__esModule) return e;
|
|
26
|
-
var n = Object.create(null);
|
|
27
|
-
if (e) {
|
|
28
|
-
Object.keys(e).forEach(function (k) {
|
|
29
|
-
if (k !== 'default') {
|
|
30
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
31
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () { return e[k]; }
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
n["default"] = e;
|
|
39
|
-
return Object.freeze(n);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
22
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
43
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
44
24
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
45
|
-
var FeatureFlags__namespace = /*#__PURE__*/_interopNamespace(FeatureFlags);
|
|
46
25
|
|
|
47
26
|
var _CaretRight, _CaretLeft, _option;
|
|
48
27
|
const translationIds = {
|
|
@@ -52,12 +31,11 @@ const translationIds = {
|
|
|
52
31
|
'carbon.pagination-nav.active': 'Active',
|
|
53
32
|
'carbon.pagination-nav.of': 'of'
|
|
54
33
|
};
|
|
55
|
-
|
|
56
34
|
function translateWithId(messageId) {
|
|
57
35
|
return translationIds[messageId];
|
|
58
|
-
}
|
|
59
|
-
|
|
36
|
+
}
|
|
60
37
|
|
|
38
|
+
// https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
61
39
|
function usePrevious(value) {
|
|
62
40
|
const ref = React.useRef();
|
|
63
41
|
React.useEffect(() => {
|
|
@@ -65,37 +43,30 @@ function usePrevious(value) {
|
|
|
65
43
|
});
|
|
66
44
|
return ref.current;
|
|
67
45
|
}
|
|
68
|
-
|
|
69
46
|
function getCuts(page, totalItems, itemsThatFit) {
|
|
70
47
|
let splitPoint = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
71
|
-
|
|
72
48
|
if (itemsThatFit >= totalItems) {
|
|
73
49
|
return {
|
|
74
50
|
front: 0,
|
|
75
51
|
back: 0
|
|
76
52
|
};
|
|
77
53
|
}
|
|
78
|
-
|
|
79
54
|
const split = splitPoint || Math.ceil(itemsThatFit / 2) - 1;
|
|
80
55
|
let frontHidden = page + 1 - split;
|
|
81
56
|
let backHidden = totalItems - page - (itemsThatFit - split) + 1;
|
|
82
|
-
|
|
83
57
|
if (frontHidden <= 1) {
|
|
84
58
|
backHidden -= frontHidden <= 0 ? Math.abs(frontHidden) + 1 : 0;
|
|
85
59
|
frontHidden = 0;
|
|
86
60
|
}
|
|
87
|
-
|
|
88
61
|
if (backHidden <= 1) {
|
|
89
62
|
frontHidden -= backHidden <= 0 ? Math.abs(backHidden) + 1 : 0;
|
|
90
63
|
backHidden = 0;
|
|
91
64
|
}
|
|
92
|
-
|
|
93
65
|
return {
|
|
94
66
|
front: frontHidden,
|
|
95
67
|
back: backHidden
|
|
96
68
|
};
|
|
97
69
|
}
|
|
98
|
-
|
|
99
70
|
function DirectionButton(_ref) {
|
|
100
71
|
let {
|
|
101
72
|
direction,
|
|
@@ -104,27 +75,16 @@ function DirectionButton(_ref) {
|
|
|
104
75
|
onClick
|
|
105
76
|
} = _ref;
|
|
106
77
|
const prefix = usePrefix.usePrefix();
|
|
107
|
-
const icon = direction === 'forward' ? iconsReact.CaretRight : iconsReact.CaretLeft;
|
|
108
78
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
109
79
|
className: `${prefix}--pagination-nav__list-item`
|
|
110
|
-
},
|
|
80
|
+
}, /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
111
81
|
align: "bottom",
|
|
112
82
|
disabled: disabled,
|
|
113
83
|
kind: "ghost",
|
|
114
84
|
label: label,
|
|
115
85
|
onClick: onClick
|
|
116
|
-
}, direction === 'forward' ? _CaretRight || (_CaretRight = /*#__PURE__*/React__default["default"].createElement(iconsReact.CaretRight, null)) : _CaretLeft || (_CaretLeft = /*#__PURE__*/React__default["default"].createElement(iconsReact.CaretLeft, null)))
|
|
117
|
-
disabled: disabled,
|
|
118
|
-
renderIcon: icon,
|
|
119
|
-
kind: "ghost",
|
|
120
|
-
hasIconOnly: true,
|
|
121
|
-
iconDescription: label,
|
|
122
|
-
tooltipAlignment: "center",
|
|
123
|
-
tooltipPosition: "bottom",
|
|
124
|
-
onClick: onClick
|
|
125
|
-
}));
|
|
86
|
+
}, direction === 'forward' ? _CaretRight || (_CaretRight = /*#__PURE__*/React__default["default"].createElement(iconsReact.CaretRight, null)) : _CaretLeft || (_CaretLeft = /*#__PURE__*/React__default["default"].createElement(iconsReact.CaretLeft, null))));
|
|
126
87
|
}
|
|
127
|
-
|
|
128
88
|
function PaginationItem(_ref2) {
|
|
129
89
|
let {
|
|
130
90
|
page,
|
|
@@ -148,7 +108,6 @@ function PaginationItem(_ref2) {
|
|
|
148
108
|
className: `${prefix}--pagination-nav__accessibility-label`
|
|
149
109
|
}, isActive ? `${t('carbon.pagination-nav.active')}, ${itemLabel}` : itemLabel), page));
|
|
150
110
|
}
|
|
151
|
-
|
|
152
111
|
function PaginationOverflow(_ref3) {
|
|
153
112
|
let {
|
|
154
113
|
fromIndex,
|
|
@@ -157,7 +116,6 @@ function PaginationOverflow(_ref3) {
|
|
|
157
116
|
translateWithId: t = translateWithId
|
|
158
117
|
} = _ref3;
|
|
159
118
|
const prefix = usePrefix.usePrefix();
|
|
160
|
-
|
|
161
119
|
if (count > 1) {
|
|
162
120
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
163
121
|
className: `${prefix}--pagination-nav__list-item`
|
|
@@ -183,7 +141,6 @@ function PaginationOverflow(_ref3) {
|
|
|
183
141
|
className: `${prefix}--pagination-nav__select-icon`
|
|
184
142
|
}))));
|
|
185
143
|
}
|
|
186
|
-
|
|
187
144
|
if (count === 1) {
|
|
188
145
|
return /*#__PURE__*/React__default["default"].createElement(PaginationItem, {
|
|
189
146
|
page: fromIndex + 1,
|
|
@@ -193,10 +150,8 @@ function PaginationOverflow(_ref3) {
|
|
|
193
150
|
}
|
|
194
151
|
});
|
|
195
152
|
}
|
|
196
|
-
|
|
197
153
|
return null;
|
|
198
154
|
}
|
|
199
|
-
|
|
200
155
|
const PaginationNav = /*#__PURE__*/React__default["default"].forwardRef(function PaginationNav(_ref4, ref) {
|
|
201
156
|
let {
|
|
202
157
|
className,
|
|
@@ -213,17 +168,14 @@ const PaginationNav = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
213
168
|
const [cuts, setCuts] = React.useState(getCuts(currentPage, totalItems, itemsThatFit));
|
|
214
169
|
const prevPage = usePrevious(currentPage);
|
|
215
170
|
const prefix = usePrefix.usePrefix();
|
|
216
|
-
|
|
217
171
|
function jumpToItem(index) {
|
|
218
172
|
if (index >= 0 && index < totalItems) {
|
|
219
173
|
setCurrentPage(index);
|
|
220
174
|
onChange(index);
|
|
221
175
|
}
|
|
222
176
|
}
|
|
223
|
-
|
|
224
177
|
function jumpToNext() {
|
|
225
178
|
const nextIndex = currentPage + 1;
|
|
226
|
-
|
|
227
179
|
if (nextIndex >= totalItems) {
|
|
228
180
|
if (loop) {
|
|
229
181
|
jumpToItem(0);
|
|
@@ -232,10 +184,8 @@ const PaginationNav = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
232
184
|
jumpToItem(nextIndex);
|
|
233
185
|
}
|
|
234
186
|
}
|
|
235
|
-
|
|
236
187
|
function jumpToPrevious() {
|
|
237
188
|
const previousIndex = currentPage - 1;
|
|
238
|
-
|
|
239
189
|
if (previousIndex < 0) {
|
|
240
190
|
if (loop) {
|
|
241
191
|
jumpToItem(totalItems - 1);
|
|
@@ -244,29 +194,28 @@ const PaginationNav = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
244
194
|
jumpToItem(previousIndex);
|
|
245
195
|
}
|
|
246
196
|
}
|
|
247
|
-
|
|
248
197
|
function pageWouldBeHidden(page) {
|
|
249
198
|
const startOffset = itemsThatFit <= 4 && page > 1 ? 0 : 1;
|
|
250
199
|
const wouldBeHiddenInFront = page >= startOffset && page <= cuts.front;
|
|
251
200
|
const wouldBeHiddenInBack = page >= totalItems - cuts.back - 1 && page <= totalItems - 2;
|
|
252
201
|
return wouldBeHiddenInFront || wouldBeHiddenInBack;
|
|
253
|
-
}
|
|
254
|
-
|
|
202
|
+
}
|
|
255
203
|
|
|
204
|
+
// jump to new page if props.page is updated
|
|
256
205
|
React.useEffect(() => {
|
|
257
206
|
setCurrentPage(page);
|
|
258
|
-
}, [page]);
|
|
207
|
+
}, [page]);
|
|
259
208
|
|
|
209
|
+
// re-calculate cuts if props.totalItems or props.itemsShown change
|
|
260
210
|
React.useEffect(() => {
|
|
261
211
|
setItemsThatFit(itemsShown >= 4 ? itemsShown : 4);
|
|
262
212
|
setCuts(getCuts(currentPage, totalItems, itemsShown));
|
|
263
213
|
}, [totalItems, itemsShown]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
264
|
-
// update cuts if necessary whenever currentPage changes
|
|
265
214
|
|
|
215
|
+
// update cuts if necessary whenever currentPage changes
|
|
266
216
|
React.useEffect(() => {
|
|
267
217
|
if (pageWouldBeHidden(currentPage)) {
|
|
268
218
|
const delta = currentPage - prevPage || 0;
|
|
269
|
-
|
|
270
219
|
if (delta > 0) {
|
|
271
220
|
const splitPoint = itemsThatFit - 3;
|
|
272
221
|
setCuts(getCuts(currentPage, totalItems, itemsThatFit, splitPoint));
|
|
@@ -293,7 +242,8 @@ const PaginationNav = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
293
242
|
label: t('carbon.pagination-nav.previous'),
|
|
294
243
|
disabled: backwardButtonDisabled,
|
|
295
244
|
onClick: jumpToPrevious
|
|
296
|
-
}),
|
|
245
|
+
}),
|
|
246
|
+
// render first item if at least 5 items can be displayed or
|
|
297
247
|
// 4 items can be displayed and the current page is either 0 or 1
|
|
298
248
|
(itemsThatFit >= 5 || itemsThatFit <= 4 && currentPage <= 1) && /*#__PURE__*/React__default["default"].createElement(PaginationItem, {
|
|
299
249
|
page: 1,
|
|
@@ -306,7 +256,8 @@ const PaginationNav = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
306
256
|
fromIndex: startOffset,
|
|
307
257
|
count: cuts.front,
|
|
308
258
|
onSelect: jumpToItem
|
|
309
|
-
}),
|
|
259
|
+
}),
|
|
260
|
+
// render items between overflows
|
|
310
261
|
[...Array(totalItems)].map((e, i) => i).slice(startOffset + cuts.front, (1 + cuts.back) * -1).map(item => /*#__PURE__*/React__default["default"].createElement(PaginationItem, {
|
|
311
262
|
key: `item-${item}`,
|
|
312
263
|
page: item + 1,
|
|
@@ -319,7 +270,8 @@ const PaginationNav = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
319
270
|
fromIndex: totalItems - cuts.back - 1,
|
|
320
271
|
count: cuts.back,
|
|
321
272
|
onSelect: jumpToItem
|
|
322
|
-
}),
|
|
273
|
+
}),
|
|
274
|
+
// render last item unless there is only one in total
|
|
323
275
|
totalItems > 1 && /*#__PURE__*/React__default["default"].createElement(PaginationItem, {
|
|
324
276
|
page: totalItems,
|
|
325
277
|
translateWithId: t,
|
|
@@ -343,17 +295,14 @@ DirectionButton.propTypes = {
|
|
|
343
295
|
* The direction this button represents ("forward" or "backward").
|
|
344
296
|
*/
|
|
345
297
|
direction: PropTypes__default["default"].oneOf(['forward', 'backward']),
|
|
346
|
-
|
|
347
298
|
/**
|
|
348
299
|
* Whether or not the button should be disabled.
|
|
349
300
|
*/
|
|
350
301
|
disabled: PropTypes__default["default"].bool,
|
|
351
|
-
|
|
352
302
|
/**
|
|
353
303
|
* The label shown in the button's tooltip.
|
|
354
304
|
*/
|
|
355
305
|
label: PropTypes__default["default"].string,
|
|
356
|
-
|
|
357
306
|
/**
|
|
358
307
|
* The callback function called when the button is clicked.
|
|
359
308
|
*/
|
|
@@ -364,17 +313,14 @@ PaginationItem.propTypes = {
|
|
|
364
313
|
* Whether or not this is the currently active page.
|
|
365
314
|
*/
|
|
366
315
|
isActive: PropTypes__default["default"].bool,
|
|
367
|
-
|
|
368
316
|
/**
|
|
369
317
|
* The callback function called when the item is clicked.
|
|
370
318
|
*/
|
|
371
319
|
onClick: PropTypes__default["default"].func,
|
|
372
|
-
|
|
373
320
|
/**
|
|
374
321
|
* The page number this item represents.
|
|
375
322
|
*/
|
|
376
323
|
page: PropTypes__default["default"].number,
|
|
377
|
-
|
|
378
324
|
/**
|
|
379
325
|
* Specify a custom translation function that takes in a message identifier
|
|
380
326
|
* and returns the localized string for the message
|
|
@@ -386,17 +332,14 @@ PaginationOverflow.propTypes = {
|
|
|
386
332
|
* How many items to display in this overflow.
|
|
387
333
|
*/
|
|
388
334
|
count: PropTypes__default["default"].number,
|
|
389
|
-
|
|
390
335
|
/**
|
|
391
336
|
* From which index on this overflow should start displaying pages.
|
|
392
337
|
*/
|
|
393
338
|
fromIndex: PropTypes__default["default"].number,
|
|
394
|
-
|
|
395
339
|
/**
|
|
396
340
|
* The callback function called when the user selects a page from the overflow.
|
|
397
341
|
*/
|
|
398
342
|
onSelect: PropTypes__default["default"].func,
|
|
399
|
-
|
|
400
343
|
/**
|
|
401
344
|
* Specify a custom translation function that takes in a message identifier
|
|
402
345
|
* and returns the localized string for the message
|
|
@@ -409,32 +352,26 @@ PaginationNav.propTypes = {
|
|
|
409
352
|
* Additional CSS class names.
|
|
410
353
|
*/
|
|
411
354
|
className: PropTypes__default["default"].string,
|
|
412
|
-
|
|
413
355
|
/**
|
|
414
356
|
* The number of items to be shown.
|
|
415
357
|
*/
|
|
416
358
|
itemsShown: PropTypes__default["default"].number,
|
|
417
|
-
|
|
418
359
|
/**
|
|
419
360
|
* Whether user should be able to loop through the items when reaching first / last.
|
|
420
361
|
*/
|
|
421
362
|
loop: PropTypes__default["default"].bool,
|
|
422
|
-
|
|
423
363
|
/**
|
|
424
364
|
* The callback function called when the current page changes.
|
|
425
365
|
*/
|
|
426
366
|
onChange: PropTypes__default["default"].func,
|
|
427
|
-
|
|
428
367
|
/**
|
|
429
368
|
* The index of current page.
|
|
430
369
|
*/
|
|
431
370
|
page: PropTypes__default["default"].number,
|
|
432
|
-
|
|
433
371
|
/**
|
|
434
372
|
* The total number of items.
|
|
435
373
|
*/
|
|
436
374
|
totalItems: PropTypes__default["default"].number,
|
|
437
|
-
|
|
438
375
|
/**
|
|
439
376
|
* Specify a custom translation function that takes in a message identifier
|
|
440
377
|
* and returns the localized string for the message
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { PolymorphicProps } from '../../types/common';
|
|
7
|
+
import React, { type WeakValidationMap, type ElementType } from 'react';
|
|
8
|
+
import { type PolymorphicProps } from '../../types/common';
|
|
9
9
|
export type PopoverAlignment = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'left-bottom' | 'left-top' | 'right' | 'right-bottom' | 'right-top';
|
|
10
10
|
interface PopoverBaseProps {
|
|
11
11
|
/**
|
|
@@ -41,15 +41,21 @@ interface PopoverBaseProps {
|
|
|
41
41
|
* Render the component using the tab tip variant
|
|
42
42
|
*/
|
|
43
43
|
isTabTip?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Specify a handler for closing popover.
|
|
46
|
+
* The handler should take care of closing the popover, e.g. changing the `open` prop.
|
|
47
|
+
*/
|
|
48
|
+
onRequestClose?: () => void;
|
|
44
49
|
/**
|
|
45
50
|
* Specify whether the component is currently open or closed
|
|
46
51
|
*/
|
|
47
52
|
open: boolean;
|
|
48
53
|
}
|
|
49
|
-
export type PopoverProps<
|
|
50
|
-
declare const Popover:
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
export type PopoverProps<E extends ElementType> = PolymorphicProps<E, PopoverBaseProps>;
|
|
55
|
+
export declare const Popover: (<E extends React.ElementType<any> = "span">(props: PopoverProps<E>) => JSX.Element) & {
|
|
56
|
+
displayName?: string | undefined;
|
|
57
|
+
propTypes?: WeakValidationMap<PopoverProps<any>> | undefined;
|
|
58
|
+
};
|
|
53
59
|
export type PopoverContentProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
54
|
-
declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLSpanElement>>;
|
|
55
|
-
export {
|
|
60
|
+
export declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLSpanElement>>;
|
|
61
|
+
export {};
|
|
@@ -16,6 +16,7 @@ var React = require('react');
|
|
|
16
16
|
var useIsomorphicEffect = require('../../internal/useIsomorphicEffect.js');
|
|
17
17
|
var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
18
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
|
+
var useEvent = require('../../internal/useEvent.js');
|
|
19
20
|
|
|
20
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
22
|
|
|
@@ -28,37 +29,47 @@ const PopoverContext = /*#__PURE__*/React__default["default"].createContext({
|
|
|
28
29
|
current: null
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
|
-
|
|
32
|
+
function PopoverRenderFunction(_ref, forwardRef) {
|
|
32
33
|
let {
|
|
33
34
|
isTabTip,
|
|
34
35
|
align = isTabTip ? 'bottom-left' : 'bottom',
|
|
35
|
-
as,
|
|
36
|
+
as: BaseComponent = 'span',
|
|
36
37
|
autoAlign = false,
|
|
37
38
|
caret = isTabTip ? false : true,
|
|
38
39
|
className: customClassName,
|
|
39
40
|
children,
|
|
40
41
|
dropShadow = true,
|
|
41
42
|
highContrast = false,
|
|
43
|
+
onRequestClose,
|
|
42
44
|
open,
|
|
43
45
|
...rest
|
|
44
46
|
} = _ref;
|
|
45
47
|
const prefix = usePrefix.usePrefix();
|
|
46
48
|
const floating = React.useRef(null);
|
|
47
49
|
const popover = React.useRef(null);
|
|
50
|
+
|
|
51
|
+
// If the `Popover` is the last focusable item in the tab order, it should also close when the browser window loses focus (#12922)
|
|
52
|
+
useEvent.useWindowEvent('blur', () => {
|
|
53
|
+
if (open) {
|
|
54
|
+
onRequestClose?.();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
useEvent.useWindowEvent('click', event => {
|
|
58
|
+
if (open && !popover?.current?.contains(event.target)) {
|
|
59
|
+
onRequestClose?.();
|
|
60
|
+
}
|
|
61
|
+
});
|
|
48
62
|
const value = React.useMemo(() => {
|
|
49
63
|
return {
|
|
50
64
|
floating
|
|
51
65
|
};
|
|
52
66
|
}, []);
|
|
53
|
-
|
|
54
67
|
if (isTabTip) {
|
|
55
68
|
const tabTipAlignments = ['bottom-left', 'bottom-right'];
|
|
56
|
-
|
|
57
69
|
if (!tabTipAlignments.includes(align)) {
|
|
58
70
|
align = 'bottom-left';
|
|
59
71
|
}
|
|
60
72
|
}
|
|
61
|
-
|
|
62
73
|
const ref = useMergedRefs.useMergedRefs([forwardRef, popover]);
|
|
63
74
|
const [autoAligned, setAutoAligned] = React.useState(false);
|
|
64
75
|
const [autoAlignment, setAutoAlignment] = React.useState(align);
|
|
@@ -76,104 +87,90 @@ const Popover = /*#__PURE__*/React__default["default"].forwardRef((_ref, forward
|
|
|
76
87
|
if (!open) {
|
|
77
88
|
return;
|
|
78
89
|
}
|
|
79
|
-
|
|
80
90
|
if (!autoAlign || isTabTip) {
|
|
81
91
|
setAutoAligned(false);
|
|
82
92
|
return;
|
|
83
93
|
}
|
|
84
|
-
|
|
85
94
|
if (!floating.current) {
|
|
86
95
|
return;
|
|
87
96
|
}
|
|
88
|
-
|
|
89
97
|
if (autoAligned === true) {
|
|
90
98
|
return;
|
|
91
99
|
}
|
|
100
|
+
const rect = floating.current.getBoundingClientRect();
|
|
92
101
|
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
// The conditions, per side, of when the popover is not visible, excluding the popover's internal padding(16)
|
|
95
103
|
const conditions = {
|
|
96
104
|
left: rect.x < -16,
|
|
97
105
|
top: rect.y < -16,
|
|
98
106
|
right: rect.x + (rect.width - 16) > document.documentElement.clientWidth,
|
|
99
107
|
bottom: rect.y + (rect.height - 16) > document.documentElement.clientHeight
|
|
100
108
|
};
|
|
101
|
-
|
|
102
109
|
if (!conditions.left && !conditions.top && !conditions.right && !conditions.bottom) {
|
|
103
110
|
setAutoAligned(false);
|
|
104
111
|
return;
|
|
105
112
|
}
|
|
113
|
+
const alignments = ['top', 'top-left', 'right-bottom', 'right', 'right-top', 'bottom-left', 'bottom', 'bottom-right', 'left-top', 'left', 'left-bottom', 'top-right'];
|
|
106
114
|
|
|
107
|
-
|
|
108
|
-
|
|
115
|
+
// Creates the prioritized list of options depending on ideal alignment coming from `align`
|
|
109
116
|
const options = [align];
|
|
110
117
|
let option = alignments[(alignments.indexOf(align) + 1) % alignments.length];
|
|
111
|
-
|
|
112
118
|
while (option) {
|
|
113
119
|
if (options.includes(option)) {
|
|
114
120
|
break;
|
|
115
121
|
}
|
|
116
|
-
|
|
117
122
|
options.push(option);
|
|
118
123
|
option = alignments[(alignments.indexOf(option) + 1) % alignments.length];
|
|
119
124
|
}
|
|
120
|
-
|
|
121
125
|
function isVisible(alignment) {
|
|
122
126
|
if (!popover.current || !floating.current) {
|
|
123
127
|
return false;
|
|
124
128
|
}
|
|
125
|
-
|
|
126
129
|
popover.current.classList.add(`${prefix}--popover--${alignment}`);
|
|
127
|
-
const rect = floating.current.getBoundingClientRect();
|
|
130
|
+
const rect = floating.current.getBoundingClientRect();
|
|
128
131
|
|
|
132
|
+
// Check if popover is not visible to the left of the screen
|
|
129
133
|
if (rect.x < -16) {
|
|
130
134
|
popover.current.classList.remove(`${prefix}--popover--${alignment}`);
|
|
131
135
|
return false;
|
|
132
|
-
}
|
|
133
|
-
|
|
136
|
+
}
|
|
134
137
|
|
|
138
|
+
// Check if popover is not visible at the top of the screen
|
|
135
139
|
if (rect.y < -16) {
|
|
136
140
|
popover.current.classList.remove(`${prefix}--popover--${alignment}`);
|
|
137
141
|
return false;
|
|
138
|
-
}
|
|
139
|
-
|
|
142
|
+
}
|
|
140
143
|
|
|
144
|
+
// Check if popover is not visible to right of screen
|
|
141
145
|
if (rect.x + (rect.width - 16) > document.documentElement.clientWidth) {
|
|
142
146
|
popover.current.classList.remove(`${prefix}--popover--${alignment}`);
|
|
143
147
|
return false;
|
|
144
|
-
}
|
|
145
|
-
|
|
148
|
+
}
|
|
146
149
|
|
|
150
|
+
// Check if popover is not visible to bottom of screen
|
|
147
151
|
if (rect.y + (rect.height - 16) > document.documentElement.clientHeight) {
|
|
148
152
|
popover.current.classList.remove(`${prefix}--popover--${alignment}`);
|
|
149
153
|
return false;
|
|
150
154
|
}
|
|
151
|
-
|
|
152
155
|
popover.current.classList.remove(`${prefix}--popover--${alignment}`);
|
|
153
156
|
return true;
|
|
154
157
|
}
|
|
155
|
-
|
|
156
158
|
let alignment = null;
|
|
157
|
-
|
|
158
159
|
for (let i = 0; i < options.length; i++) {
|
|
159
160
|
const option = options[i];
|
|
160
|
-
|
|
161
161
|
if (isVisible(option)) {
|
|
162
162
|
alignment = option;
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
|
|
167
166
|
if (alignment) {
|
|
168
167
|
setAutoAligned(true);
|
|
169
168
|
setAutoAlignment(alignment);
|
|
170
169
|
}
|
|
171
170
|
}, [autoAligned, align, autoAlign, prefix, open, isTabTip]);
|
|
172
|
-
const BaseComponent = as ?? 'span';
|
|
173
171
|
const mappedChildren = React__default["default"].Children.map(children, child => {
|
|
174
172
|
const item = child;
|
|
175
|
-
|
|
176
|
-
if ((item === null || item === void 0 ? void 0 : item.type) === 'button') {
|
|
173
|
+
if (item?.type === 'button') {
|
|
177
174
|
const {
|
|
178
175
|
className
|
|
179
176
|
} = item.props;
|
|
@@ -185,73 +182,72 @@ const Popover = /*#__PURE__*/React__default["default"].forwardRef((_ref, forward
|
|
|
185
182
|
return item;
|
|
186
183
|
}
|
|
187
184
|
});
|
|
185
|
+
const BaseComponentAsAny = BaseComponent;
|
|
188
186
|
return /*#__PURE__*/React__default["default"].createElement(PopoverContext.Provider, {
|
|
189
187
|
value: value
|
|
190
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
188
|
+
}, /*#__PURE__*/React__default["default"].createElement(BaseComponentAsAny, _rollupPluginBabelHelpers["extends"]({}, rest, {
|
|
191
189
|
className: className,
|
|
192
190
|
ref: ref
|
|
193
191
|
}), isTabTip ? mappedChildren : children));
|
|
194
|
-
}
|
|
195
|
-
|
|
192
|
+
}
|
|
193
|
+
const Popover = /*#__PURE__*/React__default["default"].forwardRef(PopoverRenderFunction);
|
|
196
194
|
|
|
195
|
+
// Note: this displayName is temporarily set so that Storybook ArgTable
|
|
196
|
+
// correctly displays the name of this component
|
|
197
197
|
if (process.env.NODE_ENV !== "production") {
|
|
198
198
|
Popover.displayName = 'Popover';
|
|
199
199
|
}
|
|
200
|
-
|
|
201
200
|
Popover.propTypes = {
|
|
202
201
|
/**
|
|
203
202
|
* Specify how the popover should align with the trigger element
|
|
204
203
|
*/
|
|
205
204
|
align: PropTypes__default["default"].oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top']),
|
|
206
|
-
|
|
207
205
|
/**
|
|
208
206
|
* Provide a custom element or component to render the top-level node for the
|
|
209
207
|
* component.
|
|
210
208
|
*/
|
|
211
209
|
as: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].elementType]),
|
|
212
|
-
|
|
213
210
|
/**
|
|
214
211
|
* Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
|
|
215
212
|
*/
|
|
216
213
|
autoAlign: PropTypes__default["default"].bool,
|
|
217
|
-
|
|
218
214
|
/**
|
|
219
215
|
* Specify whether a caret should be rendered
|
|
220
216
|
*/
|
|
221
217
|
caret: PropTypes__default["default"].bool,
|
|
222
|
-
|
|
223
218
|
/**
|
|
224
219
|
* Provide elements to be rendered inside of the component
|
|
225
220
|
*/
|
|
226
221
|
children: PropTypes__default["default"].node,
|
|
227
|
-
|
|
228
222
|
/**
|
|
229
223
|
* Provide a custom class name to be added to the outermost node in the
|
|
230
224
|
* component
|
|
231
225
|
*/
|
|
232
226
|
className: PropTypes__default["default"].string,
|
|
233
|
-
|
|
234
227
|
/**
|
|
235
228
|
* Specify whether a drop shadow should be rendered on the popover
|
|
236
229
|
*/
|
|
237
230
|
dropShadow: PropTypes__default["default"].bool,
|
|
238
|
-
|
|
239
231
|
/**
|
|
240
232
|
* Render the component using the high-contrast variant
|
|
241
233
|
*/
|
|
242
234
|
highContrast: PropTypes__default["default"].bool,
|
|
243
|
-
|
|
244
235
|
/**
|
|
245
236
|
* Render the component using the tab tip variant
|
|
246
237
|
*/
|
|
247
238
|
isTabTip: PropTypes__default["default"].bool,
|
|
248
|
-
|
|
239
|
+
/**
|
|
240
|
+
* Specify a handler for closing popover.
|
|
241
|
+
* The handler should take care of closing the popover, e.g. changing the `open` prop.
|
|
242
|
+
*/
|
|
243
|
+
onRequestClose: PropTypes__default["default"].func,
|
|
249
244
|
/**
|
|
250
245
|
* Specify whether the component is currently open or closed
|
|
251
246
|
*/
|
|
252
247
|
open: PropTypes__default["default"].bool.isRequired
|
|
253
248
|
};
|
|
254
|
-
|
|
249
|
+
function PopoverContentRenderFunction( // eslint-disable-next-line react/prop-types
|
|
250
|
+
_ref2, forwardRef) {
|
|
255
251
|
let {
|
|
256
252
|
className,
|
|
257
253
|
children,
|
|
@@ -270,13 +266,13 @@ const PopoverContent = /*#__PURE__*/React__default["default"].forwardRef(functio
|
|
|
270
266
|
}, children), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
271
267
|
className: `${prefix}--popover-caret`
|
|
272
268
|
}));
|
|
273
|
-
}
|
|
269
|
+
}
|
|
270
|
+
const PopoverContent = /*#__PURE__*/React__default["default"].forwardRef(PopoverContentRenderFunction);
|
|
274
271
|
PopoverContent.propTypes = {
|
|
275
272
|
/**
|
|
276
273
|
* Provide elements to be rendered inside of the component
|
|
277
274
|
*/
|
|
278
275
|
children: PropTypes__default["default"].node,
|
|
279
|
-
|
|
280
276
|
/**
|
|
281
277
|
* Provide a custom class name to be added to the outermost node in the
|
|
282
278
|
* component
|
|
@@ -20,7 +20,6 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
20
20
|
const PrimaryButton = props => /*#__PURE__*/React__default["default"].createElement(Button["default"], _rollupPluginBabelHelpers["extends"]({
|
|
21
21
|
kind: "primary"
|
|
22
22
|
}, props));
|
|
23
|
-
|
|
24
23
|
var PrimaryButton$1 = PrimaryButton;
|
|
25
24
|
|
|
26
25
|
exports["default"] = PrimaryButton$1;
|