@carbon/react 1.83.0-rc.0 → 1.83.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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +1008 -938
- package/es/components/AILabel/index.js +13 -13
- package/es/components/AISkeleton/AISkeletonIcon.js +2 -2
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +2 -2
- package/es/components/AISkeleton/AISkeletonText.js +2 -2
- package/es/components/Accordion/Accordion.Skeleton.js +15 -15
- package/es/components/Accordion/Accordion.js +3 -3
- package/es/components/Accordion/AccordionItem.js +9 -9
- package/es/components/Accordion/AccordionProvider.js +2 -2
- package/es/components/AspectRatio/AspectRatio.js +2 -2
- package/es/components/BadgeIndicator/index.js +3 -3
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +5 -5
- package/es/components/Breadcrumb/Breadcrumb.js +3 -3
- package/es/components/Breadcrumb/BreadcrumbItem.js +9 -9
- package/es/components/Button/Button.Skeleton.js +3 -3
- package/es/components/Button/Button.js +5 -5
- package/es/components/Button/ButtonBase.js +5 -5
- package/es/components/ButtonSet/ButtonSet.js +2 -2
- package/es/components/ChatButton/ChatButton.Skeleton.js +2 -2
- package/es/components/ChatButton/ChatButton.js +3 -3
- package/es/components/Checkbox/Checkbox.Skeleton.js +4 -4
- package/es/components/Checkbox/Checkbox.js +15 -15
- package/es/components/CheckboxGroup/CheckboxGroup.js +12 -12
- package/es/components/ClassPrefix/index.js +2 -2
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +7 -7
- package/es/components/CodeSnippet/CodeSnippet.js +16 -16
- package/es/components/ComboBox/ComboBox.js +18 -18
- package/es/components/ComboButton/index.js +7 -7
- package/es/components/ComposedModal/ComposedModal.js +20 -20
- package/es/components/ComposedModal/ModalFooter.js +8 -8
- package/es/components/ComposedModal/ModalHeader.js +8 -8
- package/es/components/ContainedList/ContainedList.js +7 -7
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +7 -7
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +8 -0
- package/es/components/ContentSwitcher/ContentSwitcher.js +13 -7
- package/es/components/Copy/Copy.js +2 -2
- package/es/components/CopyButton/CopyButton.js +4 -4
- package/es/components/DangerButton/DangerButton.js +2 -2
- package/es/components/DataTable/DataTable.d.ts +81 -283
- package/es/components/DataTable/DataTable.js +83 -123
- package/es/components/DataTable/Table.d.ts +2 -2
- package/es/components/DataTable/Table.js +4 -4
- package/es/components/DataTable/TableActionList.d.ts +1 -1
- package/es/components/DataTable/TableBatchAction.js +2 -2
- package/es/components/DataTable/TableBatchActions.js +9 -9
- package/es/components/DataTable/TableBody.d.ts +3 -3
- package/es/components/DataTable/TableBody.js +2 -2
- package/es/components/DataTable/TableCell.d.ts +3 -4
- package/es/components/DataTable/TableCell.js +2 -2
- package/es/components/DataTable/TableContainer.d.ts +2 -3
- package/es/components/DataTable/TableContainer.js +6 -6
- package/es/components/DataTable/TableDecoratorRow.js +4 -4
- package/es/components/DataTable/TableExpandHeader.d.ts +2 -3
- package/es/components/DataTable/TableExpandHeader.js +4 -4
- package/es/components/DataTable/TableExpandRow.js +8 -8
- package/es/components/DataTable/TableExpandedRow.d.ts +3 -3
- package/es/components/DataTable/TableExpandedRow.js +4 -4
- package/es/components/DataTable/TableHead.d.ts +1 -1
- package/es/components/DataTable/TableHeader.d.ts +4 -4
- package/es/components/DataTable/TableHeader.js +15 -15
- package/es/components/DataTable/TableRow.d.ts +3 -4
- package/es/components/DataTable/TableRow.js +4 -4
- package/es/components/DataTable/TableSelectAll.js +3 -3
- package/es/components/DataTable/TableSelectRow.js +4 -4
- package/es/components/DataTable/TableSlugRow.js +3 -3
- package/es/components/DataTable/TableToolbar.js +2 -2
- package/es/components/DataTable/TableToolbarAction.js +2 -2
- package/es/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +2 -2
- package/es/components/DataTable/TableToolbarSearch.js +2 -2
- package/es/components/DataTable/index.d.ts +1 -1
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +15 -15
- package/es/components/DatePicker/DatePicker.Skeleton.js +8 -8
- package/es/components/DatePicker/DatePicker.js +17 -17
- package/es/components/DatePickerInput/DatePickerInput.d.ts +3 -4
- package/es/components/DatePickerInput/DatePickerInput.js +19 -19
- package/es/components/Dialog/index.d.ts +5 -6
- package/es/components/Dialog/index.js +10 -10
- package/es/components/Dropdown/Dropdown.Skeleton.d.ts +2 -3
- package/es/components/Dropdown/Dropdown.Skeleton.js +4 -4
- package/es/components/Dropdown/Dropdown.d.ts +3 -3
- package/es/components/Dropdown/Dropdown.js +18 -18
- package/es/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/es/components/ExpandableSearch/ExpandableSearch.js +3 -3
- package/es/components/FeatureFlags/index.js +2 -2
- package/es/components/FileUploader/FileUploader.Skeleton.d.ts +3 -3
- package/es/components/FileUploader/FileUploader.Skeleton.js +5 -5
- package/es/components/FileUploader/FileUploader.d.ts +2 -3
- package/es/components/FileUploader/FileUploader.js +12 -12
- package/es/components/FileUploader/FileUploaderButton.d.ts +2 -3
- package/es/components/FileUploader/FileUploaderButton.js +4 -4
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +2 -3
- package/es/components/FileUploader/FileUploaderDropContainer.js +5 -5
- package/es/components/FileUploader/FileUploaderItem.d.ts +2 -3
- package/es/components/FileUploader/FileUploaderItem.js +13 -13
- package/es/components/FileUploader/Filename.d.ts +3 -4
- package/es/components/FileUploader/Filename.js +7 -7
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +5 -5
- package/es/components/FluidComboBox/FluidComboBox.js +4 -4
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +11 -11
- package/es/components/FluidDatePicker/FluidDatePicker.js +4 -4
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +3 -3
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +5 -5
- package/es/components/FluidDropdown/FluidDropdown.js +4 -4
- package/es/components/FluidForm/FluidForm.d.ts +3 -4
- package/es/components/FluidForm/FluidForm.js +3 -3
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +5 -5
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +5 -5
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +5 -5
- package/es/components/FluidNumberInput/FluidNumberInput.js +4 -4
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +5 -5
- package/es/components/FluidSearch/FluidSearch.js +4 -4
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +5 -5
- package/es/components/FluidSelect/FluidSelect.js +4 -4
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +5 -5
- package/es/components/FluidTextArea/FluidTextArea.js +3 -3
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +5 -5
- package/es/components/FluidTextInput/FluidTextInput.js +5 -5
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +3 -3
- package/es/components/FluidTimePicker/FluidTimePicker.js +13 -13
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -3
- package/es/components/Form/Form.js +2 -2
- package/es/components/FormGroup/FormGroup.d.ts +3 -4
- package/es/components/FormGroup/FormGroup.js +4 -4
- package/es/components/FormItem/FormItem.js +2 -2
- package/es/components/FormLabel/FormLabel.js +2 -2
- package/es/components/Grid/CSSGrid.js +8 -8
- package/es/components/Grid/Column.js +5 -5
- package/es/components/Grid/ColumnHang.js +2 -2
- package/es/components/Grid/FlexGrid.js +4 -4
- package/es/components/Grid/Grid.js +3 -3
- package/es/components/Grid/GridContext.d.ts +2 -2
- package/es/components/Grid/GridContext.js +1 -1
- package/es/components/Grid/Row.js +2 -2
- package/es/components/Heading/index.js +9 -9
- package/es/components/Icon/Icon.Skeleton.js +2 -2
- package/es/components/IconButton/index.js +11 -6
- package/es/components/IconIndicator/index.js +4 -4
- package/es/components/IdPrefix/index.js +2 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +6 -6
- package/es/components/InlineLoading/InlineLoading.js +10 -10
- package/es/components/Layer/LayerContext.js +2 -2
- package/es/components/Layer/index.d.ts +4 -0
- package/es/components/Layer/index.js +15 -8
- package/es/components/Layout/index.js +5 -5
- package/es/components/LayoutDirection/LayoutDirection.js +4 -4
- package/es/components/LayoutDirection/LayoutDirectionContext.js +2 -2
- package/es/components/Link/Link.js +6 -6
- package/es/components/ListBox/ListBox.d.ts +2 -3
- package/es/components/ListBox/ListBox.js +5 -5
- package/es/components/ListBox/ListBoxField.d.ts +3 -4
- package/es/components/ListBox/ListBoxField.js +2 -2
- package/es/components/ListBox/ListBoxMenu.d.ts +2 -3
- package/es/components/ListBox/ListBoxMenu.js +2 -2
- package/es/components/ListBox/ListBoxMenuIcon.js +4 -4
- package/es/components/ListBox/ListBoxMenuItem.d.ts +2 -3
- package/es/components/ListBox/ListBoxMenuItem.js +3 -3
- package/es/components/ListBox/ListBoxSelection.js +6 -6
- package/es/components/ListBox/next/ListBoxSelection.js +7 -7
- package/es/components/ListBox/next/ListBoxTrigger.js +4 -4
- package/es/components/ListItem/ListItem.js +2 -2
- package/es/components/Loading/Loading.d.ts +3 -3
- package/es/components/Loading/Loading.js +6 -6
- package/es/components/Menu/Menu.js +3 -3
- package/es/components/Menu/MenuItem.js +16 -16
- package/es/components/MenuButton/index.js +4 -4
- package/es/components/Modal/Modal.d.ts +2 -3
- package/es/components/Modal/Modal.js +35 -35
- package/es/components/ModalWrapper/ModalWrapper.js +7 -7
- package/es/components/MultiSelect/FilterableMultiSelect.js +22 -26
- package/es/components/MultiSelect/MultiSelect.js +23 -23
- package/es/components/Notification/Notification.js +41 -41
- package/es/components/NumberInput/NumberInput.Skeleton.js +4 -4
- package/es/components/NumberInput/NumberInput.js +22 -22
- package/es/components/OrderedList/OrderedList.js +2 -2
- package/es/components/OverflowMenu/OverflowMenu.js +7 -7
- package/es/components/OverflowMenu/index.js +3 -3
- package/es/components/OverflowMenu/next/index.js +6 -6
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +4 -4
- package/es/components/OverflowMenuV2/index.js +3 -3
- package/es/components/PageHeader/PageHeader.js +29 -29
- package/es/components/Pagination/Pagination.Skeleton.js +8 -8
- package/es/components/Pagination/Pagination.js +17 -17
- package/es/components/Pagination/experimental/PageSelector.js +3 -3
- package/es/components/Pagination/experimental/Pagination.js +14 -14
- package/es/components/PaginationNav/PaginationNav.js +31 -31
- package/es/components/Popover/index.js +15 -15
- package/es/components/PrimaryButton/PrimaryButton.js +2 -2
- package/es/components/ProgressBar/ProgressBar.js +13 -13
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +7 -7
- package/es/components/ProgressIndicator/ProgressIndicator.js +20 -20
- package/es/components/RadioButton/RadioButton.Skeleton.js +4 -4
- package/es/components/RadioButton/RadioButton.js +10 -10
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +16 -16
- package/es/components/RadioTile/RadioTile.js +12 -12
- package/es/components/Search/Search.Skeleton.js +4 -4
- package/es/components/Search/Search.js +11 -11
- package/es/components/SecondaryButton/SecondaryButton.js +2 -2
- package/es/components/Select/Select.Skeleton.js +5 -5
- package/es/components/Select/Select.js +19 -19
- package/es/components/SelectItem/SelectItem.js +2 -2
- package/es/components/SelectItemGroup/SelectItemGroup.js +2 -2
- package/es/components/ShapeIndicator/index.js +7 -7
- package/es/components/SkeletonIcon/SkeletonIcon.d.ts +0 -4
- package/es/components/SkeletonIcon/SkeletonIcon.js +3 -7
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +2 -2
- package/es/components/SkeletonText/SkeletonText.js +4 -4
- package/es/components/Slider/Slider.Skeleton.js +17 -17
- package/es/components/Slider/Slider.js +38 -38
- package/es/components/Slider/SliderHandles.js +19 -19
- package/es/components/Stack/HStack.js +2 -2
- package/es/components/Stack/Stack.js +2 -2
- package/es/components/Stack/VStack.js +2 -2
- package/es/components/StructuredList/StructuredList.Skeleton.js +12 -12
- package/es/components/StructuredList/StructuredList.js +24 -24
- package/es/components/Switch/IconSwitch.js +3 -3
- package/es/components/Switch/Switch.js +4 -4
- package/es/components/TabContent/TabContent.js +2 -2
- package/es/components/Tabs/Tabs.Skeleton.js +7 -7
- package/es/components/Tabs/Tabs.js +60 -60
- package/es/components/Tag/DismissibleTag.js +10 -10
- package/es/components/Tag/OperationalTag.js +6 -6
- package/es/components/Tag/SelectableTag.js +6 -6
- package/es/components/Tag/Tag.Skeleton.js +2 -2
- package/es/components/Tag/Tag.js +15 -15
- package/es/components/Text/Text.js +4 -4
- package/es/components/Text/TextDirection.js +2 -2
- package/es/components/Text/createTextComponent.js +2 -2
- package/es/components/TextArea/TextArea.Skeleton.js +4 -4
- package/es/components/TextArea/TextArea.js +19 -19
- package/es/components/TextInput/ControlledPasswordInput.d.ts +2 -3
- package/es/components/TextInput/ControlledPasswordInput.js +13 -13
- package/es/components/TextInput/PasswordInput.js +15 -15
- package/es/components/TextInput/TextInput.Skeleton.js +4 -4
- package/es/components/TextInput/TextInput.js +17 -17
- package/es/components/Theme/index.js +10 -10
- package/es/components/Tile/Tile.js +36 -36
- package/es/components/TileGroup/TileGroup.d.ts +3 -4
- package/es/components/TileGroup/TileGroup.js +8 -8
- package/es/components/TimePicker/TimePicker.d.ts +2 -3
- package/es/components/TimePicker/TimePicker.js +14 -14
- package/es/components/TimePickerSelect/TimePickerSelect.js +4 -4
- package/es/components/Toggle/Toggle.Skeleton.js +4 -4
- package/es/components/Toggle/Toggle.js +10 -10
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +8 -8
- package/es/components/Toggletip/index.js +12 -12
- package/es/components/Tooltip/DefinitionTooltip.js +4 -4
- package/es/components/Tooltip/Tooltip.d.ts +3 -0
- package/es/components/Tooltip/Tooltip.js +25 -13
- package/es/components/TreeView/TreeNode.js +45 -36
- package/es/components/TreeView/TreeView.js +30 -21
- package/es/components/UIShell/Content.js +2 -2
- package/es/components/UIShell/Header.js +2 -2
- package/es/components/UIShell/HeaderContainer.js +2 -2
- package/es/components/UIShell/HeaderGlobalAction.js +3 -3
- package/es/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/es/components/UIShell/HeaderMenu.js +14 -14
- package/es/components/UIShell/HeaderMenuButton.js +4 -4
- package/es/components/UIShell/HeaderMenuItem.js +11 -9
- package/es/components/UIShell/HeaderName.js +3 -3
- package/es/components/UIShell/HeaderNavigation.js +3 -3
- package/es/components/UIShell/HeaderPanel.js +3 -3
- package/es/components/UIShell/HeaderSideNavItems.js +2 -2
- package/es/components/UIShell/Link.js +3 -3
- package/es/components/UIShell/SideNav.js +7 -7
- package/es/components/UIShell/SideNavDetails.js +3 -3
- package/es/components/UIShell/SideNavDivider.js +3 -3
- package/es/components/UIShell/SideNavFooter.js +7 -7
- package/es/components/UIShell/SideNavHeader.js +3 -3
- package/es/components/UIShell/SideNavIcon.js +2 -2
- package/es/components/UIShell/SideNavItem.js +2 -2
- package/es/components/UIShell/SideNavItems.js +5 -5
- package/es/components/UIShell/SideNavLink.js +5 -5
- package/es/components/UIShell/SideNavLinkText.js +2 -2
- package/es/components/UIShell/SideNavMenu.js +10 -10
- package/es/components/UIShell/SideNavMenuItem.js +5 -5
- package/es/components/UIShell/SideNavSwitcher.js +8 -8
- package/es/components/UIShell/SkipToContent.js +2 -2
- package/es/components/UIShell/Switcher.js +8 -8
- package/es/components/UIShell/SwitcherDivider.js +2 -2
- package/es/components/UIShell/SwitcherItem.js +3 -3
- package/es/components/UnorderedList/UnorderedList.js +2 -2
- package/es/index.js +23 -24
- package/es/internal/FloatingMenu.js +4 -4
- package/es/internal/__mocks__/mockHTMLElement.d.ts +9 -0
- package/es/internal/createClassWrapper.js +2 -2
- package/es/internal/useId.js +2 -2
- package/es/internal/useIdPrefix.js +3 -3
- package/es/internal/useNormalizedInputProps.js +3 -3
- package/es/internal/usePrefix.js +3 -3
- package/es/internal/useResizeObserver.d.ts +14 -0
- package/es/internal/useResizeObserver.js +74 -0
- package/es/internal/wrapFocus.js +3 -6
- package/es/tools/wrapComponent.d.ts +3 -4
- package/es/tools/wrapComponent.js +2 -2
- package/es/types/common.d.ts +0 -2
- package/lib/components/CodeSnippet/CodeSnippet.js +2 -3
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +8 -0
- package/lib/components/ContentSwitcher/ContentSwitcher.js +7 -1
- package/lib/components/DataTable/DataTable.d.ts +81 -283
- package/lib/components/DataTable/DataTable.js +82 -123
- package/lib/components/DataTable/Table.d.ts +2 -2
- package/lib/components/DataTable/TableActionList.d.ts +1 -1
- package/lib/components/DataTable/TableBody.d.ts +3 -3
- package/lib/components/DataTable/TableCell.d.ts +3 -4
- package/lib/components/DataTable/TableContainer.d.ts +2 -3
- package/lib/components/DataTable/TableExpandHeader.d.ts +2 -3
- package/lib/components/DataTable/TableExpandedRow.d.ts +3 -3
- package/lib/components/DataTable/TableHead.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.d.ts +4 -4
- package/lib/components/DataTable/TableRow.d.ts +3 -4
- package/lib/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/lib/components/DataTable/index.d.ts +1 -1
- package/lib/components/DatePickerInput/DatePickerInput.d.ts +3 -4
- package/lib/components/Dialog/index.d.ts +5 -6
- package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +2 -3
- package/lib/components/Dropdown/Dropdown.d.ts +3 -3
- package/lib/components/FileUploader/FileUploader.Skeleton.d.ts +3 -3
- package/lib/components/FileUploader/FileUploader.d.ts +2 -3
- package/lib/components/FileUploader/FileUploaderButton.d.ts +2 -3
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +2 -3
- package/lib/components/FileUploader/FileUploaderItem.d.ts +2 -3
- package/lib/components/FileUploader/Filename.d.ts +3 -4
- package/lib/components/FluidForm/FluidForm.d.ts +3 -4
- package/lib/components/FormGroup/FormGroup.d.ts +3 -4
- package/lib/components/Grid/GridContext.d.ts +2 -2
- package/lib/components/Grid/GridContext.js +5 -23
- package/lib/components/IconButton/index.js +6 -1
- package/lib/components/Layer/index.d.ts +4 -0
- package/lib/components/Layer/index.js +9 -2
- package/lib/components/Link/Link.js +1 -1
- package/lib/components/ListBox/ListBox.d.ts +2 -3
- package/lib/components/ListBox/ListBoxField.d.ts +3 -4
- package/lib/components/ListBox/ListBoxMenu.d.ts +2 -3
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +2 -3
- package/lib/components/Loading/Loading.d.ts +3 -3
- package/lib/components/Modal/Modal.d.ts +2 -3
- package/lib/components/MultiSelect/FilterableMultiSelect.js +1 -5
- package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +0 -4
- package/lib/components/SkeletonIcon/SkeletonIcon.js +1 -5
- package/lib/components/TextInput/ControlledPasswordInput.d.ts +2 -3
- package/lib/components/TileGroup/TileGroup.d.ts +3 -4
- package/lib/components/TimePicker/TimePicker.d.ts +2 -3
- package/lib/components/Tooltip/Tooltip.d.ts +3 -0
- package/lib/components/Tooltip/Tooltip.js +18 -6
- package/lib/components/TreeView/TreeNode.js +20 -11
- package/lib/components/TreeView/TreeView.js +27 -18
- package/lib/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/lib/components/UIShell/HeaderMenuItem.js +7 -5
- package/lib/index.js +46 -47
- package/lib/internal/__mocks__/mockHTMLElement.d.ts +9 -0
- package/lib/internal/useResizeObserver.d.ts +14 -0
- package/lib/internal/useResizeObserver.js +78 -0
- package/lib/internal/wrapFocus.js +3 -6
- package/lib/tools/wrapComponent.d.ts +3 -4
- package/lib/types/common.d.ts +0 -2
- package/package.json +5 -6
- package/scss/components/content-switcher/_tokens.scss +9 -0
- package/telemetry.yml +4 -1
- package/es/components/DataTable/index.js +0 -76
- package/lib/components/DataTable/index.js +0 -82
|
@@ -9,7 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
|
|
|
9
9
|
import { ChevronRight } from '@carbon/icons-react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
|
-
import
|
|
12
|
+
import React from 'react';
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
14
|
import deprecate from '../../prop-types/deprecate.js';
|
|
15
15
|
import requiredIfGivenPropIsTruthy from '../../prop-types/requiredIfGivenPropIsTruthy.js';
|
|
@@ -32,12 +32,12 @@ const TableExpandHeader = _ref => {
|
|
|
32
32
|
const prefix = usePrefix();
|
|
33
33
|
const className = cx(`${prefix}--table-expand`, headerClassName);
|
|
34
34
|
const previousValue = isExpanded ? 'collapsed' : undefined;
|
|
35
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/React.createElement("th", _extends({
|
|
36
36
|
scope: "col",
|
|
37
37
|
className: className,
|
|
38
38
|
"data-previous-value": previousValue,
|
|
39
39
|
id: id
|
|
40
|
-
}, rest), enableExpando || enableToggle ? /*#__PURE__*/
|
|
40
|
+
}, rest), enableExpando || enableToggle ? /*#__PURE__*/React.createElement("button", {
|
|
41
41
|
type: "button",
|
|
42
42
|
className: `${prefix}--table-expand__button`,
|
|
43
43
|
onClick: onExpand,
|
|
@@ -45,7 +45,7 @@ const TableExpandHeader = _ref => {
|
|
|
45
45
|
"aria-label": deprecatedAriaLabel || ariaLabel,
|
|
46
46
|
"aria-expanded": isExpanded,
|
|
47
47
|
"aria-controls": ariaControls
|
|
48
|
-
}, /*#__PURE__*/
|
|
48
|
+
}, /*#__PURE__*/React.createElement(ChevronRight, {
|
|
49
49
|
className: `${prefix}--table-expand__svg`,
|
|
50
50
|
"aria-label": expandIconDescription
|
|
51
51
|
})) : null, children);
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React from 'react';
|
|
12
12
|
import { ChevronRight } from '@carbon/icons-react';
|
|
13
13
|
import TableCell from './TableCell.js';
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
|
|
16
|
-
const TableExpandRow = /*#__PURE__*/
|
|
16
|
+
const TableExpandRow = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
17
17
|
let {
|
|
18
18
|
['aria-controls']: ariaControls,
|
|
19
19
|
['aria-label']: ariaLabel,
|
|
@@ -31,7 +31,7 @@ const TableExpandRow = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
31
31
|
|
|
32
32
|
// We need to put the AILabel and Decorator before the expansion arrow and all other table cells after the arrow.
|
|
33
33
|
let rowHasAILabel;
|
|
34
|
-
const decorator =
|
|
34
|
+
const decorator = React.Children.toArray(children).map(child => {
|
|
35
35
|
if (child.type?.displayName === 'TableSlugRow' || child.type?.displayName === 'TableDecoratorRow') {
|
|
36
36
|
if (child.props.slug || child.props.decorator?.type.displayName === 'AILabel') {
|
|
37
37
|
rowHasAILabel = true;
|
|
@@ -39,7 +39,7 @@ const TableExpandRow = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
39
39
|
return child;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
const normalizedChildren =
|
|
42
|
+
const normalizedChildren = React.Children.toArray(children).map(child => {
|
|
43
43
|
if (child.type?.displayName !== 'TableSlugRow' && child.type?.displayName !== 'TableDecoratorRow') {
|
|
44
44
|
return child;
|
|
45
45
|
}
|
|
@@ -51,15 +51,15 @@ const TableExpandRow = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
51
51
|
[`${prefix}--data-table--slug-row ${prefix}--data-table--ai-label-row`]: rowHasAILabel
|
|
52
52
|
}, rowClassName);
|
|
53
53
|
const previousValue = isExpanded ? 'collapsed' : undefined;
|
|
54
|
-
return /*#__PURE__*/
|
|
54
|
+
return /*#__PURE__*/React.createElement("tr", _extends({}, rest, {
|
|
55
55
|
ref: ref,
|
|
56
56
|
className: className,
|
|
57
57
|
"data-parent-row": true
|
|
58
|
-
}), decorator, /*#__PURE__*/
|
|
58
|
+
}), decorator, /*#__PURE__*/React.createElement(TableCell, {
|
|
59
59
|
className: `${prefix}--table-expand`,
|
|
60
60
|
"data-previous-value": previousValue,
|
|
61
61
|
headers: expandHeader
|
|
62
|
-
}, /*#__PURE__*/
|
|
62
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
63
63
|
type: "button",
|
|
64
64
|
className: `${prefix}--table-expand__button`,
|
|
65
65
|
onClick: onExpand,
|
|
@@ -67,7 +67,7 @@ const TableExpandRow = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
67
67
|
"aria-label": deprecatedAriaLabel || ariaLabel,
|
|
68
68
|
"aria-expanded": isExpanded,
|
|
69
69
|
"aria-controls": ariaControls
|
|
70
|
-
}, /*#__PURE__*/
|
|
70
|
+
}, /*#__PURE__*/React.createElement(ChevronRight, {
|
|
71
71
|
className: `${prefix}--table-expand__svg`,
|
|
72
72
|
"aria-label": expandIconDescription
|
|
73
73
|
}))), normalizedChildren);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import {
|
|
9
|
-
export interface TableExpandedRowProps extends
|
|
8
|
+
import { type HTMLAttributes } from 'react';
|
|
9
|
+
export interface TableExpandedRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
10
10
|
/**
|
|
11
11
|
* The width of the expanded row's internal cell
|
|
12
12
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React, { useRef } from 'react';
|
|
12
12
|
import TableCell from './TableCell.js';
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
14
|
|
|
@@ -32,16 +32,16 @@ const TableExpandedRow = _ref => {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/React.createElement("tr", _extends({
|
|
36
36
|
ref: rowRef,
|
|
37
37
|
onMouseEnter: () => toggleParentHoverClass('enter'),
|
|
38
38
|
onMouseLeave: () => toggleParentHoverClass('leave')
|
|
39
39
|
}, rest, {
|
|
40
40
|
className: className,
|
|
41
41
|
"data-child-row": true
|
|
42
|
-
}), /*#__PURE__*/
|
|
42
|
+
}), /*#__PURE__*/React.createElement(TableCell, {
|
|
43
43
|
colSpan: colSpan
|
|
44
|
-
}, /*#__PURE__*/
|
|
44
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
45
45
|
className: `${prefix}--child-row-inner-container`
|
|
46
46
|
}, children)));
|
|
47
47
|
};
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { ThHTMLAttributes } from 'react';
|
|
8
8
|
export type TableHeadProps = ThHTMLAttributes<HTMLTableSectionElement>;
|
|
9
|
-
declare const TableHead: (props: import("
|
|
9
|
+
declare const TableHead: (props: import("react").HTMLAttributes<"thead">) => React.ReactElement<any>;
|
|
10
10
|
export default TableHead;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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, { type MouseEventHandler, ReactNode } from 'react';
|
|
7
|
+
import React, { type HTMLAttributes, type MouseEventHandler, type ReactNode } from 'react';
|
|
8
8
|
import { sortStates } from './state/sorting';
|
|
9
|
-
import { TranslateWithId
|
|
9
|
+
import { TranslateWithId } from '../../types/common';
|
|
10
10
|
import { DataTableSortState } from './state/sortStates';
|
|
11
11
|
export type TableHeaderTranslationKey = 'carbon.table.header.icon.description';
|
|
12
12
|
export interface TableHeaderTranslationArgs {
|
|
@@ -15,7 +15,7 @@ export interface TableHeaderTranslationArgs {
|
|
|
15
15
|
sortDirection?: DataTableSortState;
|
|
16
16
|
sortStates: typeof sortStates;
|
|
17
17
|
}
|
|
18
|
-
export interface TableHeaderProps extends
|
|
18
|
+
export interface TableHeaderProps extends HTMLAttributes<HTMLTableCellElement & HTMLButtonElement>, TranslateWithId<TableHeaderTranslationKey, {
|
|
19
19
|
header: any;
|
|
20
20
|
sortDirection: any;
|
|
21
21
|
isSortHeader: any;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React, { useRef } from 'react';
|
|
12
12
|
import { ArrowUp, ArrowsVertical } from '@carbon/icons-react';
|
|
13
13
|
import './state/sorting.js';
|
|
14
14
|
import { useId } from '../../internal/useId.js';
|
|
@@ -41,7 +41,7 @@ const sortDirections = {
|
|
|
41
41
|
[sortStates.ASC]: 'ascending',
|
|
42
42
|
[sortStates.DESC]: 'descending'
|
|
43
43
|
};
|
|
44
|
-
const TableHeader = /*#__PURE__*/
|
|
44
|
+
const TableHeader = /*#__PURE__*/React.forwardRef(function TableHeader(_ref, ref) {
|
|
45
45
|
let {
|
|
46
46
|
className: headerClassName,
|
|
47
47
|
children,
|
|
@@ -63,10 +63,10 @@ const TableHeader = /*#__PURE__*/React__default.forwardRef(function TableHeader(
|
|
|
63
63
|
// AILabel is always size `mini`
|
|
64
64
|
const AILableRef = useRef(null);
|
|
65
65
|
let colHasAILabel;
|
|
66
|
-
let normalizedDecorator = /*#__PURE__*/
|
|
66
|
+
let normalizedDecorator = /*#__PURE__*/React.isValidElement(slug ?? decorator) ? slug ?? decorator : null;
|
|
67
67
|
if (normalizedDecorator && normalizedDecorator['type']?.displayName === 'AILabel') {
|
|
68
68
|
colHasAILabel = true;
|
|
69
|
-
normalizedDecorator = /*#__PURE__*/
|
|
69
|
+
normalizedDecorator = /*#__PURE__*/React.cloneElement(normalizedDecorator, {
|
|
70
70
|
size: 'mini',
|
|
71
71
|
ref: AILableRef
|
|
72
72
|
});
|
|
@@ -77,15 +77,15 @@ const TableHeader = /*#__PURE__*/React__default.forwardRef(function TableHeader(
|
|
|
77
77
|
[`${prefix}--table-header-label--decorator`]: decorator
|
|
78
78
|
});
|
|
79
79
|
if (!isSortable) {
|
|
80
|
-
return /*#__PURE__*/
|
|
80
|
+
return /*#__PURE__*/React.createElement("th", _extends({}, rest, {
|
|
81
81
|
id: id,
|
|
82
82
|
className: headerClassName,
|
|
83
83
|
scope: scope,
|
|
84
84
|
colSpan: colSpan,
|
|
85
85
|
ref: ref
|
|
86
|
-
}), children ? /*#__PURE__*/
|
|
86
|
+
}), children ? /*#__PURE__*/React.createElement("div", {
|
|
87
87
|
className: headerLabelClassNames
|
|
88
|
-
}, children, /*#__PURE__*/
|
|
88
|
+
}, children, /*#__PURE__*/React.createElement("div", {
|
|
89
89
|
className: `${prefix}--table-header-label--decorator-inner`
|
|
90
90
|
}, normalizedDecorator)) : null);
|
|
91
91
|
}
|
|
@@ -112,32 +112,32 @@ const TableHeader = /*#__PURE__*/React__default.forwardRef(function TableHeader(
|
|
|
112
112
|
return onClick(evt);
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
|
-
return /*#__PURE__*/
|
|
115
|
+
return /*#__PURE__*/React.createElement("th", {
|
|
116
116
|
id: id,
|
|
117
117
|
"aria-sort": ariaSort,
|
|
118
118
|
className: headerClasses,
|
|
119
119
|
colSpan: colSpan,
|
|
120
120
|
ref: ref,
|
|
121
121
|
scope: scope
|
|
122
|
-
}, /*#__PURE__*/
|
|
122
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
123
123
|
className: `${prefix}--table-sort__description`,
|
|
124
124
|
id: uniqueId
|
|
125
|
-
}, sortDescription), /*#__PURE__*/
|
|
125
|
+
}, sortDescription), /*#__PURE__*/React.createElement("button", _extends({
|
|
126
126
|
type: "button",
|
|
127
127
|
"aria-describedby": uniqueId,
|
|
128
128
|
className: className,
|
|
129
129
|
onClick: handleClick
|
|
130
|
-
}, rest), /*#__PURE__*/
|
|
130
|
+
}, rest), /*#__PURE__*/React.createElement("span", {
|
|
131
131
|
className: `${prefix}--table-sort__flex`
|
|
132
|
-
}, /*#__PURE__*/
|
|
132
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
133
133
|
className: `${prefix}--table-header-label`
|
|
134
|
-
}, children), /*#__PURE__*/
|
|
134
|
+
}, children), /*#__PURE__*/React.createElement(ArrowUp, {
|
|
135
135
|
size: 20,
|
|
136
136
|
className: `${prefix}--table-sort__icon`
|
|
137
|
-
}), /*#__PURE__*/
|
|
137
|
+
}), /*#__PURE__*/React.createElement(ArrowsVertical, {
|
|
138
138
|
size: 20,
|
|
139
139
|
className: `${prefix}--table-sort__icon-unsorted`
|
|
140
|
-
}), /*#__PURE__*/
|
|
140
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
141
141
|
className: `${prefix}--table-header-label--decorator-inner`
|
|
142
142
|
}, normalizedDecorator))));
|
|
143
143
|
});
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
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
|
-
|
|
9
|
-
export interface TableRowProps extends ReactAttr<HTMLTableRowElement> {
|
|
7
|
+
import React, { type HTMLAttributes } from 'react';
|
|
8
|
+
export interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
10
9
|
/**
|
|
11
10
|
* Specify an optional className to be applied to the container node
|
|
12
11
|
*/
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import
|
|
9
|
+
import React from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
const TableRow = /*#__PURE__*/
|
|
14
|
+
const TableRow = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
15
15
|
const prefix = usePrefix();
|
|
16
16
|
let rowHasAILabel;
|
|
17
17
|
if (props?.children) {
|
|
18
|
-
|
|
18
|
+
React.Children.toArray(props.children).map(child => {
|
|
19
19
|
if (child.type?.displayName === 'TableSlugRow' || child.type?.displayName === 'TableDecoratorRow') {
|
|
20
20
|
if (child.props.slug || child.props.decorator?.type.displayName === 'AILabel') {
|
|
21
21
|
rowHasAILabel = true;
|
|
@@ -41,7 +41,7 @@ const TableRow = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
|
41
41
|
if (className) {
|
|
42
42
|
cleanProps.className = className;
|
|
43
43
|
}
|
|
44
|
-
return /*#__PURE__*/
|
|
44
|
+
return /*#__PURE__*/React.createElement("tr", _extends({
|
|
45
45
|
ref: ref
|
|
46
46
|
}, cleanProps));
|
|
47
47
|
});
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
|
-
import
|
|
9
|
+
import React from 'react';
|
|
10
10
|
import InlineCheckbox from '../InlineCheckbox/InlineCheckbox.js';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
@@ -25,11 +25,11 @@ const TableSelectAll = _ref => {
|
|
|
25
25
|
className
|
|
26
26
|
} = _ref;
|
|
27
27
|
const prefix = usePrefix();
|
|
28
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/React.createElement("th", {
|
|
29
29
|
"aria-live": "off",
|
|
30
30
|
scope: "col",
|
|
31
31
|
className: cx(`${prefix}--table-column-checkbox`, className)
|
|
32
|
-
}, /*#__PURE__*/
|
|
32
|
+
}, /*#__PURE__*/React.createElement(InlineCheckbox, {
|
|
33
33
|
"aria-label": ariaLabel || deprecatedAriaLabel,
|
|
34
34
|
checked: checked,
|
|
35
35
|
id: id,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import InlineCheckbox from '../InlineCheckbox/InlineCheckbox.js';
|
|
13
13
|
import RadioButton from '../RadioButton/RadioButton.js';
|
|
@@ -51,14 +51,14 @@ const TableSelectRow = _ref => {
|
|
|
51
51
|
}),
|
|
52
52
|
[`${prefix}--table-column-radio`]: radio
|
|
53
53
|
});
|
|
54
|
-
return /*#__PURE__*/
|
|
54
|
+
return /*#__PURE__*/React.createElement("td", {
|
|
55
55
|
className: tableSelectRowClasses,
|
|
56
56
|
"aria-live": "off"
|
|
57
|
-
}, radio ? /*#__PURE__*/
|
|
57
|
+
}, radio ? /*#__PURE__*/React.createElement(RadioButton, _extends({}, selectionInputProps, {
|
|
58
58
|
labelText: labelValue,
|
|
59
59
|
onChange: handleRadioChange,
|
|
60
60
|
hideLabel: true
|
|
61
|
-
})) : /*#__PURE__*/
|
|
61
|
+
})) : /*#__PURE__*/React.createElement(InlineCheckbox, _extends({}, selectionInputProps, {
|
|
62
62
|
"aria-label": labelValue,
|
|
63
63
|
onChange: handleCheckboxChange
|
|
64
64
|
})));
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
|
-
import
|
|
9
|
+
import React, { useEffect } from 'react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
12
12
|
import deprecateComponent from '../../prop-types/deprecateComponent.js';
|
|
@@ -31,11 +31,11 @@ const TableSlugRow = _ref => {
|
|
|
31
31
|
// Slug is always size `mini`
|
|
32
32
|
let normalizedSlug;
|
|
33
33
|
if (slug) {
|
|
34
|
-
normalizedSlug = /*#__PURE__*/
|
|
34
|
+
normalizedSlug = /*#__PURE__*/React.cloneElement(slug, {
|
|
35
35
|
size: 'mini'
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/React.createElement("td", {
|
|
39
39
|
className: TableSlugRowClasses
|
|
40
40
|
}, normalizedSlug);
|
|
41
41
|
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React from 'react';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
import deprecate from '../../prop-types/deprecate.js';
|
|
14
14
|
|
|
@@ -25,7 +25,7 @@ const TableToolbar = _ref => {
|
|
|
25
25
|
[`${prefix}--table-toolbar`]: true,
|
|
26
26
|
[`${prefix}--table-toolbar--${size}`]: size
|
|
27
27
|
});
|
|
28
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/React.createElement("section", _extends({
|
|
29
29
|
"aria-label": deprecatedAriaLabel || ariaLabel
|
|
30
30
|
}, rest, {
|
|
31
31
|
className: className
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React, { forwardRef } from 'react';
|
|
11
11
|
import OverflowMenuItem from '../OverflowMenuItem/OverflowMenuItem.js';
|
|
12
12
|
|
|
13
13
|
const frFn = forwardRef;
|
|
@@ -16,7 +16,7 @@ const TableToolbarAction = frFn((props, ref) => {
|
|
|
16
16
|
children,
|
|
17
17
|
...rest
|
|
18
18
|
} = props;
|
|
19
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/React.createElement(OverflowMenuItem, _extends({
|
|
20
20
|
ref: ref,
|
|
21
21
|
itemText: children
|
|
22
22
|
}, rest));
|
|
@@ -4,5 +4,5 @@
|
|
|
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
|
-
declare const TableToolbarContent: (props: import("
|
|
7
|
+
declare const TableToolbarContent: (props: import("react").HTMLAttributes<"div">) => React.ReactElement<any>;
|
|
8
8
|
export default TableToolbarContent;
|
|
@@ -9,7 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
|
|
|
9
9
|
import { Settings } from '@carbon/icons-react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
|
-
import
|
|
12
|
+
import React from 'react';
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
14
|
import OverflowMenu from '../OverflowMenu/index.js';
|
|
15
15
|
|
|
@@ -26,7 +26,7 @@ const TableToolbarMenu = _ref => {
|
|
|
26
26
|
const prefix = usePrefix();
|
|
27
27
|
const toolbarActionClasses = cx(className, `${prefix}--toolbar-action ${prefix}--overflow-menu`);
|
|
28
28
|
const menuOptionsClasses = cx(menuOptionsClass, `${prefix}--toolbar-action__menu`);
|
|
29
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/React.createElement(OverflowMenu, _extends({
|
|
30
30
|
"aria-label": iconDescription,
|
|
31
31
|
renderIcon: renderIcon,
|
|
32
32
|
className: toolbarActionClasses,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
12
12
|
import Search from '../Search/Search.js';
|
|
13
13
|
import '../Search/Search.Skeleton.js';
|
|
14
14
|
import { useId } from '../../internal/useId.js';
|
|
@@ -97,7 +97,7 @@ const TableToolbarSearch = _ref => {
|
|
|
97
97
|
};
|
|
98
98
|
const handleOnFocus = event => handleExpand(event, true);
|
|
99
99
|
const handleOnBlur = event => !value && handleExpand(event, false);
|
|
100
|
-
return /*#__PURE__*/
|
|
100
|
+
return /*#__PURE__*/React.createElement(Search, _extends({
|
|
101
101
|
disabled: disabled,
|
|
102
102
|
className: searchClasses,
|
|
103
103
|
value: value,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
@@ -37,34 +37,34 @@ const DataTableSkeleton = _ref => {
|
|
|
37
37
|
length: columnCount
|
|
38
38
|
}, (_, index) => index);
|
|
39
39
|
for (let i = 0; i < rowRepeat; i++) {
|
|
40
|
-
rows[i] = /*#__PURE__*/
|
|
40
|
+
rows[i] = /*#__PURE__*/React.createElement("tr", {
|
|
41
41
|
key: i
|
|
42
|
-
}, columnsArray.map(j => /*#__PURE__*/
|
|
42
|
+
}, columnsArray.map(j => /*#__PURE__*/React.createElement("td", {
|
|
43
43
|
key: j
|
|
44
|
-
}, _span || (_span = /*#__PURE__*/
|
|
44
|
+
}, _span || (_span = /*#__PURE__*/React.createElement("span", null)))));
|
|
45
45
|
}
|
|
46
|
-
return /*#__PURE__*/
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
47
47
|
className: `${prefix}--skeleton ${prefix}--data-table-container`
|
|
48
|
-
}, showHeader ? /*#__PURE__*/
|
|
48
|
+
}, showHeader ? /*#__PURE__*/React.createElement("div", {
|
|
49
49
|
className: `${prefix}--data-table-header`
|
|
50
|
-
}, /*#__PURE__*/
|
|
50
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
51
51
|
className: `${prefix}--data-table-header__title`
|
|
52
|
-
}), /*#__PURE__*/
|
|
52
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
53
53
|
className: `${prefix}--data-table-header__description`
|
|
54
|
-
})) : null, showToolbar ? /*#__PURE__*/
|
|
54
|
+
})) : null, showToolbar ? /*#__PURE__*/React.createElement("section", {
|
|
55
55
|
"aria-label": "data table toolbar",
|
|
56
56
|
className: `${prefix}--table-toolbar`
|
|
57
|
-
}, /*#__PURE__*/
|
|
57
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
58
58
|
className: `${prefix}--toolbar-content`
|
|
59
|
-
}, /*#__PURE__*/
|
|
59
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
60
60
|
className: `${prefix}--skeleton ${prefix}--btn ${prefix}--btn--sm`
|
|
61
|
-
}))) : null, /*#__PURE__*/
|
|
61
|
+
}))) : null, /*#__PURE__*/React.createElement("table", _extends({
|
|
62
62
|
className: dataTableSkeletonClasses
|
|
63
|
-
}, rest), /*#__PURE__*/
|
|
63
|
+
}, rest), /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, columnsArray.map(i => /*#__PURE__*/React.createElement("th", {
|
|
64
64
|
key: i
|
|
65
|
-
}, headers ? /*#__PURE__*/
|
|
65
|
+
}, headers ? /*#__PURE__*/React.createElement("div", {
|
|
66
66
|
className: "cds--table-header-label"
|
|
67
|
-
}, headers[i]?.header) : _span2 || (_span2 = /*#__PURE__*/
|
|
67
|
+
}, headers[i]?.header) : _span2 || (_span2 = /*#__PURE__*/React.createElement("span", null)))))), /*#__PURE__*/React.createElement("tbody", null, rows)));
|
|
68
68
|
};
|
|
69
69
|
DataTableSkeleton.propTypes = {
|
|
70
70
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
@@ -20,24 +20,24 @@ const DatePickerSkeleton = _ref => {
|
|
|
20
20
|
...rest
|
|
21
21
|
} = _ref;
|
|
22
22
|
const prefix = usePrefix();
|
|
23
|
-
const dateInput = /*#__PURE__*/
|
|
23
|
+
const dateInput = /*#__PURE__*/React.createElement("div", {
|
|
24
24
|
className: `${prefix}--date-picker-container`
|
|
25
|
-
}, !hideLabel && /*#__PURE__*/
|
|
25
|
+
}, !hideLabel && /*#__PURE__*/React.createElement("span", {
|
|
26
26
|
className: `${prefix}--label`,
|
|
27
27
|
id: id
|
|
28
|
-
}), /*#__PURE__*/
|
|
28
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
29
29
|
className: `${prefix}--date-picker__input ${prefix}--skeleton`
|
|
30
30
|
}));
|
|
31
31
|
if (range) {
|
|
32
|
-
return /*#__PURE__*/
|
|
32
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
33
33
|
className: `${prefix}--form-item`
|
|
34
|
-
}, /*#__PURE__*/
|
|
34
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
35
35
|
className: cx(`${prefix}--date-picker`, `${prefix}--date-picker--range`, `${prefix}--skeleton`, className)
|
|
36
36
|
}, rest), dateInput, dateInput));
|
|
37
37
|
}
|
|
38
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
39
|
className: `${prefix}--form-item`
|
|
40
|
-
}, /*#__PURE__*/
|
|
40
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
41
41
|
className: cx(`${prefix}--date-picker`, `${prefix}--date-picker--short`, `${prefix}--date-picker--simple`, `${prefix}--skeleton`, className)
|
|
42
42
|
}, rest), dateInput));
|
|
43
43
|
};
|