@carbon/react 1.110.0 → 1.111.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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +927 -927
- package/es/components/AILabel/index.js +48 -1
- package/es/components/AISkeleton/AISkeletonIcon.js +7 -1
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +7 -2
- package/es/components/AISkeleton/AISkeletonText.js +16 -1
- package/es/components/Accordion/Accordion.Skeleton.js +16 -1
- package/es/components/Accordion/Accordion.js +23 -1
- package/es/components/Accordion/AccordionItem.js +34 -1
- package/es/components/AspectRatio/AspectRatio.js +20 -1
- package/es/components/BadgeIndicator/index.js +10 -1
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +13 -1
- package/es/components/Breadcrumb/Breadcrumb.js +17 -1
- package/es/components/Breadcrumb/BreadcrumbItem.js +13 -1
- package/es/components/Button/Button.Skeleton.js +18 -1
- package/es/components/Button/Button.js +96 -0
- package/es/components/Button/ButtonBase.js +1 -1
- package/es/components/ButtonSet/ButtonSet.js +15 -1
- package/es/components/ChatButton/ChatButton.Skeleton.js +7 -1
- package/es/components/ChatButton/ChatButton.js +25 -1
- package/es/components/Checkbox/Checkbox.Skeleton.js +6 -2
- package/es/components/Checkbox/Checkbox.js +59 -2
- package/es/components/CheckboxGroup/CheckboxGroup.js +41 -1
- package/es/components/ClassPrefix/index.js +3 -0
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +7 -1
- package/es/components/CodeSnippet/CodeSnippet.js +77 -1
- package/es/components/ComboBox/ComboBox.js +141 -1
- package/es/components/ComboButton/index.js +28 -1
- package/es/components/ComposedModal/ComposedModal.js +70 -2
- package/es/components/ComposedModal/ModalFooter.js +65 -2
- package/es/components/ComposedModal/ModalHeader.js +36 -1
- package/es/components/ContainedList/ContainedList.js +22 -1
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +19 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +26 -1
- package/es/components/Copy/Copy.js +31 -2
- package/es/components/CopyButton/CopyButton.js +28 -2
- package/es/components/DataTable/DataTable.js +59 -0
- package/es/components/DataTable/Table.js +28 -1
- package/es/components/DataTable/TableBatchAction.js +10 -0
- package/es/components/DataTable/TableBatchActions.js +25 -1
- package/es/components/DataTable/TableBody.js +3 -0
- package/es/components/DataTable/TableCell.js +16 -1
- package/es/components/DataTable/TableContainer.js +19 -1
- package/es/components/DataTable/TableDecoratorRow.js +7 -1
- package/es/components/DataTable/TableExpandHeader.js +32 -1
- package/es/components/DataTable/TableExpandRow.js +30 -1
- package/es/components/DataTable/TableExpandedRow.js +10 -1
- package/es/components/DataTable/TableHeader.js +36 -1
- package/es/components/DataTable/TableRow.js +22 -1
- package/es/components/DataTable/TableSelectAll.js +29 -1
- package/es/components/DataTable/TableSelectRow.js +32 -1
- package/es/components/DataTable/TableSlugRow.js +7 -1
- package/es/components/DataTable/TableToolbar.js +16 -1
- package/es/components/DataTable/TableToolbarMenu.js +16 -1
- package/es/components/DataTable/TableToolbarSearch.js +60 -2
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +25 -1
- package/es/components/DatePicker/DatePicker.Skeleton.js +13 -1
- package/es/components/DatePicker/DatePicker.js +89 -1
- package/es/components/DatePickerInput/DatePickerInput.js +81 -2
- package/es/components/Dialog/Dialog.js +132 -5
- package/es/components/Dropdown/Dropdown.Skeleton.js +10 -1
- package/es/components/Dropdown/Dropdown.js +110 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +1 -1
- package/es/components/FeatureFlags/index.js +3 -0
- package/es/components/FileUploader/FileUploader.Skeleton.js +6 -2
- package/es/components/FileUploader/FileUploader.js +58 -1
- package/es/components/FileUploader/FileUploaderButton.js +49 -2
- package/es/components/FileUploader/FileUploaderDropContainer.js +44 -2
- package/es/components/FileUploader/FileUploaderItem.js +31 -2
- package/es/components/FileUploader/Filename.js +18 -0
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +6 -2
- package/es/components/FluidComboBox/FluidComboBox.js +62 -1
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +7 -1
- package/es/components/FluidDatePicker/FluidDatePicker.js +22 -1
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +6 -2
- package/es/components/FluidDropdown/FluidDropdown.js +66 -1
- package/es/components/FluidForm/FluidForm.js +7 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +6 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +129 -1
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +6 -2
- package/es/components/FluidNumberInput/FluidNumberInput.js +96 -1
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +6 -2
- package/es/components/FluidSearch/FluidSearch.js +46 -1
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +6 -2
- package/es/components/FluidSelect/FluidSelect.js +39 -1
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +6 -2
- package/es/components/FluidTextArea/FluidTextArea.js +68 -1
- package/es/components/FluidTextInput/FluidPasswordInput.js +59 -1
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +6 -2
- package/es/components/FluidTextInput/FluidTextInput.js +55 -1
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +7 -1
- package/es/components/FluidTimePicker/FluidTimePicker.js +29 -1
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +26 -0
- package/es/components/Form/Form.js +7 -1
- package/es/components/FormGroup/FormGroup.js +26 -1
- package/es/components/FormItem/FormItem.js +7 -1
- package/es/components/FormLabel/FormLabel.js +10 -1
- package/es/components/Grid/CSSGrid.js +44 -1
- package/es/components/Grid/Column.js +87 -1
- package/es/components/Grid/ColumnHang.js +10 -1
- package/es/components/Grid/FlexGrid.js +25 -1
- package/es/components/Grid/Grid.js +27 -0
- package/es/components/Grid/GridContext.js +10 -0
- package/es/components/Grid/Row.js +18 -1
- package/es/components/Heading/index.js +19 -0
- package/es/components/Icon/Icon.Skeleton.js +6 -2
- package/es/components/IconButton/index.js +69 -1
- package/es/components/IconIndicator/index.js +13 -1
- package/es/components/IdPrefix/index.js +3 -0
- package/es/components/InlineCheckbox/InlineCheckbox.js +34 -0
- package/es/components/InlineLoading/InlineLoading.js +20 -1
- package/es/components/Layer/index.js +18 -1
- package/es/components/Layout/index.js +35 -1
- package/es/components/LayoutDirection/LayoutDirection.js +10 -0
- package/es/components/Link/Link.d.ts +1 -1
- package/es/components/Link/Link.js +29 -1
- package/es/components/ListBox/ListBox.js +42 -1
- package/es/components/ListBox/ListBoxField.js +17 -0
- package/es/components/ListBox/ListBoxMenu.js +6 -0
- package/es/components/ListBox/ListBoxMenuIcon.js +8 -1
- package/es/components/ListBox/ListBoxMenuItem.js +17 -1
- package/es/components/ListBox/ListBoxSelection.d.ts +1 -1
- package/es/components/ListBox/ListBoxSelection.js +33 -10
- package/es/components/ListBox/next/ListBoxSelection.d.ts +1 -1
- package/es/components/ListBox/next/ListBoxSelection.js +42 -7
- package/es/components/ListBox/next/ListBoxTrigger.js +8 -1
- package/es/components/ListItem/ListItem.js +7 -1
- package/es/components/Loading/Loading.js +19 -1
- package/es/components/Menu/Menu.js +53 -1
- package/es/components/Menu/MenuItem.js +78 -2
- package/es/components/MenuButton/index.js +34 -1
- package/es/components/Modal/Modal.js +118 -4
- package/es/components/ModalWrapper/ModalWrapper.js +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +129 -1
- package/es/components/MultiSelect/MultiSelect.js +151 -3
- package/es/components/MultiSelect/MultiSelectPropTypes.js +25 -0
- package/es/components/Notification/Notification.js +210 -3
- package/es/components/NumberInput/NumberInput.Skeleton.js +10 -1
- package/es/components/NumberInput/NumberInput.js +139 -1
- package/es/components/OrderedList/OrderedList.js +16 -1
- package/es/components/OverflowMenu/OverflowMenu.js +78 -2
- package/es/components/OverflowMenu/next/index.js +31 -1
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +38 -2
- package/es/components/PageHeader/PageHeader.js +49 -1
- package/es/components/Pagination/Pagination.Skeleton.js +6 -2
- package/es/components/Pagination/Pagination.d.ts +8 -0
- package/es/components/Pagination/Pagination.js +86 -4
- package/es/components/Pagination/experimental/PageSelector.js +9 -1
- package/es/components/Pagination/experimental/Pagination.js +55 -1
- package/es/components/PaginationNav/PaginationNav.js +81 -1
- package/es/components/Popover/index.js +59 -1
- package/es/components/ProgressBar/ProgressBar.js +28 -1
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +7 -1
- package/es/components/ProgressIndicator/ProgressIndicator.js +59 -1
- package/es/components/RadioButton/RadioButton.Skeleton.js +6 -2
- package/es/components/RadioButton/RadioButton.js +64 -1
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +60 -1
- package/es/components/RadioTile/RadioTile.js +47 -2
- package/es/components/Search/Search.Skeleton.js +10 -1
- package/es/components/Search/Search.js +68 -3
- package/es/components/Select/Select.Skeleton.js +7 -1
- package/es/components/Select/Select.js +83 -20
- package/es/components/SelectItem/SelectItem.js +16 -1
- package/es/components/SelectItemGroup/SelectItemGroup.js +13 -1
- package/es/components/ShapeIndicator/index.js +13 -1
- package/es/components/SkeletonIcon/SkeletonIcon.js +6 -2
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +6 -2
- package/es/components/SkeletonText/SkeletonText.js +16 -1
- package/es/components/Slider/Slider.Skeleton.js +16 -1
- package/es/components/Slider/Slider.js +105 -1
- package/es/components/Stack/Stack.js +21 -1
- package/es/components/StructuredList/StructuredList.Skeleton.js +7 -1
- package/es/components/StructuredList/StructuredList.js +98 -1
- package/es/components/Switch/IconSwitch.js +49 -2
- package/es/components/Switch/Switch.js +32 -2
- package/es/components/TabContent/TabContent.js +10 -1
- package/es/components/Tabs/Tabs.Skeleton.js +7 -1
- package/es/components/Tabs/Tabs.js +175 -2
- package/es/components/Tag/DismissibleTag.js +44 -1
- package/es/components/Tag/OperationalTag.js +23 -1
- package/es/components/Tag/SelectableTag.js +32 -1
- package/es/components/Tag/Tag.Skeleton.js +8 -1
- package/es/components/Tag/Tag.js +42 -1
- package/es/components/Text/Text.js +10 -0
- package/es/components/Text/TextDirection.js +11 -0
- package/es/components/TextArea/TextArea.Skeleton.js +7 -1
- package/es/components/TextArea/TextArea.js +82 -2
- package/es/components/TextInput/ControlledPasswordInput.js +66 -2
- package/es/components/TextInput/PasswordInput.js +84 -1
- package/es/components/TextInput/TextInput.Skeleton.js +10 -1
- package/es/components/TextInput/TextInput.js +77 -1
- package/es/components/Theme/index.js +22 -1
- package/es/components/Tile/Tile.js +158 -3
- package/es/components/TileGroup/TileGroup.js +29 -1
- package/es/components/TimePicker/TimePicker.js +68 -1
- package/es/components/TimePickerSelect/TimePickerSelect.js +16 -1
- package/es/components/Toggle/Toggle.Skeleton.js +1 -1
- package/es/components/Toggle/Toggle.js +47 -1
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +12 -1
- package/es/components/Toggletip/index.js +39 -1
- package/es/components/Tooltip/DefinitionTooltip.js +37 -1
- package/es/components/Tooltip/Tooltip.js +47 -1
- package/es/components/TreeView/TreeNode.js +65 -1
- package/es/components/TreeView/TreeView.js +33 -1
- package/es/components/UIShell/Content.js +10 -1
- package/es/components/UIShell/Header.js +10 -1
- package/es/components/UIShell/HeaderContainer.js +9 -0
- package/es/components/UIShell/HeaderGlobalAction.js +29 -1
- package/es/components/UIShell/HeaderMenu.js +38 -1
- package/es/components/UIShell/HeaderMenuButton.js +18 -1
- package/es/components/UIShell/HeaderMenuItem.js +26 -1
- package/es/components/UIShell/HeaderName.js +19 -1
- package/es/components/UIShell/HeaderNavigation.js +11 -1
- package/es/components/UIShell/HeaderPanel.js +21 -2
- package/es/components/UIShell/HeaderSideNavItems.js +12 -1
- package/es/components/UIShell/Link.js +14 -0
- package/es/components/UIShell/SideNav.js +54 -1
- package/es/components/UIShell/SideNavDetails.js +11 -1
- package/es/components/UIShell/SideNavDivider.js +6 -2
- package/es/components/UIShell/SideNavFooter.js +12 -1
- package/es/components/UIShell/SideNavHeader.js +14 -1
- package/es/components/UIShell/SideNavIcon.js +11 -1
- package/es/components/UIShell/SideNavItem.js +11 -1
- package/es/components/UIShell/SideNavItems.js +12 -1
- package/es/components/UIShell/SideNavLink.js +23 -1
- package/es/components/UIShell/SideNavLinkText.js +7 -1
- package/es/components/UIShell/SideNavMenu.js +32 -1
- package/es/components/UIShell/SideNavMenuItem.js +18 -1
- package/es/components/UIShell/SideNavSwitcher.js +17 -1
- package/es/components/UIShell/SkipToContent.js +12 -1
- package/es/components/UIShell/Switcher.js +13 -1
- package/es/components/UIShell/SwitcherDivider.js +6 -2
- package/es/components/UIShell/SwitcherItem.js +31 -1
- package/es/components/UnorderedList/UnorderedList.js +13 -1
- package/es/internal/FloatingMenu.js +1 -1
- package/es/internal/OptimizedResize.js +6 -2
- package/es/internal/usePresence.js +6 -0
- package/es/tools/wrapComponent.js +1 -1
- package/lib/components/AILabel/index.js +49 -2
- package/lib/components/AISkeleton/AISkeletonIcon.js +8 -2
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +8 -3
- package/lib/components/AISkeleton/AISkeletonText.js +17 -2
- package/lib/components/Accordion/Accordion.Skeleton.js +17 -2
- package/lib/components/Accordion/Accordion.js +24 -2
- package/lib/components/Accordion/AccordionItem.js +35 -2
- package/lib/components/AspectRatio/AspectRatio.js +21 -2
- package/lib/components/BadgeIndicator/index.js +11 -2
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +14 -2
- package/lib/components/Breadcrumb/Breadcrumb.js +18 -2
- package/lib/components/Breadcrumb/BreadcrumbItem.js +14 -2
- package/lib/components/Button/Button.Skeleton.js +19 -2
- package/lib/components/Button/Button.js +96 -0
- package/lib/components/Button/ButtonBase.js +2 -2
- package/lib/components/ButtonSet/ButtonSet.js +16 -2
- package/lib/components/ChatButton/ChatButton.Skeleton.js +8 -2
- package/lib/components/ChatButton/ChatButton.js +26 -2
- package/lib/components/Checkbox/Checkbox.Skeleton.js +7 -3
- package/lib/components/Checkbox/Checkbox.js +60 -3
- package/lib/components/CheckboxGroup/CheckboxGroup.js +42 -2
- package/lib/components/ClassPrefix/index.js +3 -0
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +8 -2
- package/lib/components/CodeSnippet/CodeSnippet.js +78 -2
- package/lib/components/ComboBox/ComboBox.js +142 -2
- package/lib/components/ComboButton/index.js +29 -2
- package/lib/components/ComposedModal/ComposedModal.js +71 -3
- package/lib/components/ComposedModal/ComposedModalContext.js +0 -1
- package/lib/components/ComposedModal/ModalFooter.js +66 -3
- package/lib/components/ComposedModal/ModalHeader.js +37 -2
- package/lib/components/ComposedModal/useComposedModalState.js +0 -1
- package/lib/components/ContainedList/ContainedList.js +23 -2
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +20 -2
- package/lib/components/ContainedList/index.js +2 -2
- package/lib/components/ContentSwitcher/ContentSwitcher.js +27 -2
- package/lib/components/ContextMenu/useContextMenu.js +0 -1
- package/lib/components/Copy/Copy.js +32 -3
- package/lib/components/CopyButton/CopyButton.js +29 -3
- package/lib/components/DataTable/DataTable.js +59 -0
- package/lib/components/DataTable/Table.js +29 -2
- package/lib/components/DataTable/TableBatchAction.js +10 -0
- package/lib/components/DataTable/TableBatchActions.js +26 -2
- package/lib/components/DataTable/TableBody.js +3 -0
- package/lib/components/DataTable/TableCell.js +17 -2
- package/lib/components/DataTable/TableContainer.js +20 -2
- package/lib/components/DataTable/TableContext.js +0 -1
- package/lib/components/DataTable/TableDecoratorRow.js +8 -2
- package/lib/components/DataTable/TableExpandHeader.js +33 -2
- package/lib/components/DataTable/TableExpandRow.js +31 -2
- package/lib/components/DataTable/TableExpandedRow.js +11 -2
- package/lib/components/DataTable/TableHeader.js +37 -2
- package/lib/components/DataTable/TableRow.js +23 -2
- package/lib/components/DataTable/TableSelectAll.js +30 -2
- package/lib/components/DataTable/TableSelectRow.js +33 -2
- package/lib/components/DataTable/TableSlugRow.js +8 -2
- package/lib/components/DataTable/TableToolbar.js +17 -2
- package/lib/components/DataTable/TableToolbarMenu.js +17 -2
- package/lib/components/DataTable/TableToolbarSearch.js +61 -3
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +26 -2
- package/lib/components/DatePicker/DatePicker.Skeleton.js +14 -2
- package/lib/components/DatePicker/DatePicker.js +90 -2
- package/lib/components/DatePickerInput/DatePickerInput.js +82 -3
- package/lib/components/Dialog/Dialog.js +133 -6
- package/lib/components/Dropdown/Dropdown.Skeleton.js +11 -2
- package/lib/components/Dropdown/Dropdown.js +111 -2
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +2 -2
- package/lib/components/FeatureFlags/index.js +3 -0
- package/lib/components/FileUploader/FileUploader.Skeleton.js +7 -3
- package/lib/components/FileUploader/FileUploader.js +59 -2
- package/lib/components/FileUploader/FileUploaderButton.js +50 -3
- package/lib/components/FileUploader/FileUploaderDropContainer.js +45 -3
- package/lib/components/FileUploader/FileUploaderItem.js +32 -3
- package/lib/components/FileUploader/Filename.js +18 -0
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +7 -3
- package/lib/components/FluidComboBox/FluidComboBox.js +63 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +8 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.js +23 -2
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +7 -3
- package/lib/components/FluidDropdown/FluidDropdown.js +67 -2
- package/lib/components/FluidForm/FluidForm.js +8 -2
- package/lib/components/FluidForm/FormContext.js +0 -1
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +7 -3
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +130 -2
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +7 -3
- package/lib/components/FluidNumberInput/FluidNumberInput.js +97 -2
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +7 -3
- package/lib/components/FluidSearch/FluidSearch.js +47 -2
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +7 -3
- package/lib/components/FluidSelect/FluidSelect.js +40 -2
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +7 -3
- package/lib/components/FluidTextArea/FluidTextArea.js +69 -2
- package/lib/components/FluidTextInput/FluidPasswordInput.js +60 -2
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +7 -3
- package/lib/components/FluidTextInput/FluidTextInput.js +56 -2
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +8 -2
- package/lib/components/FluidTimePicker/FluidTimePicker.js +30 -2
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +26 -0
- package/lib/components/Form/Form.js +8 -2
- package/lib/components/FormGroup/FormGroup.js +27 -2
- package/lib/components/FormItem/FormItem.js +8 -2
- package/lib/components/FormLabel/FormLabel.js +11 -2
- package/lib/components/Grid/CSSGrid.js +45 -2
- package/lib/components/Grid/Column.js +88 -2
- package/lib/components/Grid/ColumnHang.js +11 -2
- package/lib/components/Grid/FlexGrid.js +26 -2
- package/lib/components/Grid/Grid.js +27 -0
- package/lib/components/Grid/GridContext.js +10 -0
- package/lib/components/Grid/Row.js +19 -2
- package/lib/components/Heading/index.js +19 -0
- package/lib/components/Icon/Icon.Skeleton.js +7 -3
- package/lib/components/IconButton/index.js +70 -2
- package/lib/components/IconIndicator/index.js +14 -2
- package/lib/components/IdPrefix/index.js +3 -0
- package/lib/components/InlineCheckbox/InlineCheckbox.js +34 -0
- package/lib/components/InlineLoading/InlineLoading.js +21 -2
- package/lib/components/Layer/index.js +19 -2
- package/lib/components/Layout/index.js +36 -2
- package/lib/components/LayoutDirection/LayoutDirection.js +10 -0
- package/lib/components/LayoutDirection/useLayoutDirection.js +0 -1
- package/lib/components/Link/Link.d.ts +1 -1
- package/lib/components/Link/Link.js +30 -2
- package/lib/components/ListBox/ListBox.js +43 -2
- package/lib/components/ListBox/ListBoxField.js +17 -0
- package/lib/components/ListBox/ListBoxMenu.js +6 -0
- package/lib/components/ListBox/ListBoxMenuIcon.js +9 -2
- package/lib/components/ListBox/ListBoxMenuItem.js +18 -2
- package/lib/components/ListBox/ListBoxSelection.d.ts +1 -1
- package/lib/components/ListBox/ListBoxSelection.js +34 -11
- package/lib/components/ListBox/next/ListBoxSelection.d.ts +1 -1
- package/lib/components/ListBox/next/ListBoxSelection.js +43 -8
- package/lib/components/ListBox/next/ListBoxTrigger.js +9 -2
- package/lib/components/ListItem/ListItem.js +8 -2
- package/lib/components/Loading/Loading.js +20 -2
- package/lib/components/Menu/Menu.js +54 -2
- package/lib/components/Menu/MenuContext.js +0 -1
- package/lib/components/Menu/MenuItem.js +79 -3
- package/lib/components/MenuButton/index.js +35 -2
- package/lib/components/Modal/Modal.js +119 -5
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +130 -2
- package/lib/components/MultiSelect/MultiSelect.js +151 -3
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +25 -0
- package/lib/components/Notification/Notification.js +211 -4
- package/lib/components/NumberInput/NumberInput.Skeleton.js +11 -2
- package/lib/components/NumberInput/NumberInput.js +140 -2
- package/lib/components/OrderedList/OrderedList.js +17 -2
- package/lib/components/OverflowMenu/OverflowMenu.js +79 -3
- package/lib/components/OverflowMenu/next/index.js +32 -2
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +39 -3
- package/lib/components/PageHeader/PageHeader.js +50 -2
- package/lib/components/Pagination/Pagination.Skeleton.js +7 -3
- package/lib/components/Pagination/Pagination.d.ts +8 -0
- package/lib/components/Pagination/Pagination.js +87 -5
- package/lib/components/Pagination/experimental/PageSelector.js +10 -2
- package/lib/components/Pagination/experimental/Pagination.js +56 -2
- package/lib/components/PaginationNav/PaginationNav.js +82 -2
- package/lib/components/Popover/index.js +60 -2
- package/lib/components/ProgressBar/ProgressBar.js +29 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +8 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.js +60 -2
- package/lib/components/RadioButton/RadioButton.Skeleton.js +7 -3
- package/lib/components/RadioButton/RadioButton.js +65 -2
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +61 -2
- package/lib/components/RadioTile/RadioTile.js +48 -3
- package/lib/components/Search/Search.Skeleton.js +11 -2
- package/lib/components/Search/Search.js +69 -4
- package/lib/components/Select/Select.Skeleton.js +8 -2
- package/lib/components/Select/Select.js +84 -21
- package/lib/components/SelectItem/SelectItem.js +17 -2
- package/lib/components/SelectItemGroup/SelectItemGroup.js +14 -2
- package/lib/components/ShapeIndicator/index.js +14 -2
- package/lib/components/SkeletonIcon/SkeletonIcon.js +7 -3
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +7 -3
- package/lib/components/SkeletonText/SkeletonText.js +17 -2
- package/lib/components/Slider/Slider.Skeleton.js +17 -2
- package/lib/components/Slider/Slider.js +106 -2
- package/lib/components/Stack/Stack.js +22 -2
- package/lib/components/StructuredList/StructuredList.Skeleton.js +8 -2
- package/lib/components/StructuredList/StructuredList.js +99 -2
- package/lib/components/Switch/IconSwitch.js +50 -3
- package/lib/components/Switch/Switch.js +33 -3
- package/lib/components/TabContent/TabContent.js +11 -2
- package/lib/components/Tabs/Tabs.Skeleton.js +8 -2
- package/lib/components/Tabs/Tabs.js +176 -3
- package/lib/components/Tabs/usePressable.js +0 -1
- package/lib/components/Tag/DismissibleTag.js +45 -2
- package/lib/components/Tag/OperationalTag.js +24 -2
- package/lib/components/Tag/SelectableTag.js +33 -2
- package/lib/components/Tag/Tag.Skeleton.js +9 -2
- package/lib/components/Tag/Tag.js +43 -2
- package/lib/components/Text/Text.js +10 -0
- package/lib/components/Text/TextDirection.js +11 -0
- package/lib/components/Text/TextDirectionContext.js +0 -1
- package/lib/components/TextArea/TextArea.Skeleton.js +8 -2
- package/lib/components/TextArea/TextArea.js +83 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +67 -3
- package/lib/components/TextInput/PasswordInput.js +85 -2
- package/lib/components/TextInput/TextInput.Skeleton.js +11 -2
- package/lib/components/TextInput/TextInput.js +78 -2
- package/lib/components/Theme/index.js +23 -2
- package/lib/components/Tile/Tile.js +159 -4
- package/lib/components/TileGroup/TileGroup.js +29 -1
- package/lib/components/TimePicker/TimePicker.js +69 -2
- package/lib/components/TimePickerSelect/TimePickerSelect.js +17 -2
- package/lib/components/Toggle/Toggle.Skeleton.js +2 -2
- package/lib/components/Toggle/Toggle.js +48 -2
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +13 -2
- package/lib/components/Toggletip/index.js +40 -2
- package/lib/components/Tooltip/DefinitionTooltip.js +38 -2
- package/lib/components/Tooltip/Tooltip.js +48 -2
- package/lib/components/TreeView/TreeContext.js +0 -1
- package/lib/components/TreeView/TreeNode.js +66 -2
- package/lib/components/TreeView/TreeView.js +34 -2
- package/lib/components/UIShell/Content.js +11 -2
- package/lib/components/UIShell/Header.js +11 -2
- package/lib/components/UIShell/HeaderContainer.js +9 -0
- package/lib/components/UIShell/HeaderGlobalAction.js +30 -2
- package/lib/components/UIShell/HeaderMenu.js +39 -2
- package/lib/components/UIShell/HeaderMenuButton.js +19 -2
- package/lib/components/UIShell/HeaderMenuItem.js +27 -2
- package/lib/components/UIShell/HeaderName.js +20 -2
- package/lib/components/UIShell/HeaderNavigation.js +12 -2
- package/lib/components/UIShell/HeaderPanel.js +22 -3
- package/lib/components/UIShell/HeaderSideNavItems.js +13 -2
- package/lib/components/UIShell/Link.js +14 -0
- package/lib/components/UIShell/SideNav.js +55 -2
- package/lib/components/UIShell/SideNavDetails.js +12 -2
- package/lib/components/UIShell/SideNavDivider.js +7 -3
- package/lib/components/UIShell/SideNavFooter.js +13 -2
- package/lib/components/UIShell/SideNavHeader.js +15 -2
- package/lib/components/UIShell/SideNavIcon.js +12 -2
- package/lib/components/UIShell/SideNavItem.js +12 -2
- package/lib/components/UIShell/SideNavItems.js +13 -2
- package/lib/components/UIShell/SideNavLink.js +24 -2
- package/lib/components/UIShell/SideNavLinkText.js +8 -2
- package/lib/components/UIShell/SideNavMenu.js +33 -2
- package/lib/components/UIShell/SideNavMenuItem.js +19 -2
- package/lib/components/UIShell/SideNavSwitcher.js +18 -2
- package/lib/components/UIShell/SkipToContent.js +13 -2
- package/lib/components/UIShell/Switcher.js +14 -2
- package/lib/components/UIShell/SwitcherDivider.js +7 -3
- package/lib/components/UIShell/SwitcherItem.js +32 -2
- package/lib/components/UnorderedList/UnorderedList.js +14 -2
- package/lib/feature-flags.js +0 -1
- package/lib/index.js +241 -242
- package/lib/internal/FloatingMenu.js +1 -1
- package/lib/internal/OptimizedResize.js +6 -2
- package/lib/internal/useAttachedMenu.js +0 -1
- package/lib/internal/useControllableState.js +0 -1
- package/lib/internal/useDelayedState.js +0 -1
- package/lib/internal/useEvent.js +0 -1
- package/lib/internal/useIsomorphicEffect.js +0 -1
- package/lib/internal/useMatchMedia.js +0 -1
- package/lib/internal/useMergedRefs.js +0 -1
- package/lib/internal/useNoInteractiveChildren.js +0 -1
- package/lib/internal/useOutsideClick.js +0 -1
- package/lib/internal/useOverflowItems.js +0 -1
- package/lib/internal/usePresence.js +6 -1
- package/lib/internal/usePresenceContext.js +0 -1
- package/lib/internal/usePreviousValue.js +0 -1
- package/lib/internal/useResizeObserver.js +0 -1
- package/lib/internal/useSavedCallback.js +0 -1
- package/lib/internal/utils.js +0 -1
- package/lib/internal/wrapFocus.js +0 -1
- package/lib/tools/wrapComponent.js +2 -2
- package/package.json +9 -9
- package/telemetry.yml +12 -0
|
@@ -10,8 +10,8 @@ import { Text } from "../Text/Text.js";
|
|
|
10
10
|
import { useId } from "../../internal/useId.js";
|
|
11
11
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
12
12
|
import { useOutsideClick } from "../../internal/useOutsideClick.js";
|
|
13
|
-
import React, { useRef, useState } from "react";
|
|
14
13
|
import classNames from "classnames";
|
|
14
|
+
import React, { useRef, useState } from "react";
|
|
15
15
|
import PropTypes from "prop-types";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { RadioButton, RadioButtonChecked } from "@carbon/icons-react";
|
|
@@ -48,13 +48,38 @@ function StructuredListWrapper(props) {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
StructuredListWrapper.propTypes = {
|
|
51
|
+
/**
|
|
52
|
+
* Specify a label to be read by screen readers on the container node
|
|
53
|
+
*/
|
|
51
54
|
["aria-label"]: PropTypes.string,
|
|
55
|
+
/**
|
|
56
|
+
* Deprecated, please use `aria-label` instead.
|
|
57
|
+
* Specify a label to be read by screen readers on the container note.
|
|
58
|
+
*/
|
|
52
59
|
ariaLabel: deprecate(PropTypes.string, "This prop syntax has been deprecated. Please use the new `aria-label`."),
|
|
60
|
+
/**
|
|
61
|
+
* Provide the contents of your StructuredListWrapper
|
|
62
|
+
*/
|
|
53
63
|
children: PropTypes.node,
|
|
64
|
+
/**
|
|
65
|
+
* Specify an optional className to be applied to the container node
|
|
66
|
+
*/
|
|
54
67
|
className: PropTypes.string,
|
|
68
|
+
/**
|
|
69
|
+
* Specify if structured list is condensed, default is false
|
|
70
|
+
*/
|
|
55
71
|
isCondensed: PropTypes.bool,
|
|
72
|
+
/**
|
|
73
|
+
* Specify if structured list is flush, not valid for selection variant, default is false
|
|
74
|
+
*/
|
|
56
75
|
isFlush: PropTypes.bool,
|
|
76
|
+
/**
|
|
77
|
+
* Specify whether your StructuredListWrapper should have selections
|
|
78
|
+
*/
|
|
57
79
|
selection: PropTypes.bool,
|
|
80
|
+
/**
|
|
81
|
+
* Specify which row will be selected initially
|
|
82
|
+
*/
|
|
58
83
|
selectedInitialRow: PropTypes.string
|
|
59
84
|
};
|
|
60
85
|
function StructuredListHead(props) {
|
|
@@ -67,7 +92,13 @@ function StructuredListHead(props) {
|
|
|
67
92
|
});
|
|
68
93
|
}
|
|
69
94
|
StructuredListHead.propTypes = {
|
|
95
|
+
/**
|
|
96
|
+
* Provide the contents of your StructuredListHead
|
|
97
|
+
*/
|
|
70
98
|
children: PropTypes.node,
|
|
99
|
+
/**
|
|
100
|
+
* Specify an optional className to be applied to the node
|
|
101
|
+
*/
|
|
71
102
|
className: PropTypes.string
|
|
72
103
|
};
|
|
73
104
|
function StructuredListBody(props) {
|
|
@@ -80,9 +111,18 @@ function StructuredListBody(props) {
|
|
|
80
111
|
});
|
|
81
112
|
}
|
|
82
113
|
StructuredListBody.propTypes = {
|
|
114
|
+
/**
|
|
115
|
+
* Provide the contents of your StructuredListBody
|
|
116
|
+
*/
|
|
83
117
|
children: PropTypes.node,
|
|
118
|
+
/**
|
|
119
|
+
* Specify an optional className to be applied to the container node
|
|
120
|
+
*/
|
|
84
121
|
className: PropTypes.string,
|
|
85
122
|
head: PropTypes.bool,
|
|
123
|
+
/**
|
|
124
|
+
* Provide a handler that is invoked on the key down event for the control
|
|
125
|
+
*/
|
|
86
126
|
onKeyDown: PropTypes.func
|
|
87
127
|
};
|
|
88
128
|
const GridRowContext = React.createContext(null);
|
|
@@ -134,13 +174,37 @@ function StructuredListRow(props) {
|
|
|
134
174
|
});
|
|
135
175
|
}
|
|
136
176
|
StructuredListRow.propTypes = {
|
|
177
|
+
/**
|
|
178
|
+
* Provide the contents of your StructuredListRow
|
|
179
|
+
*/
|
|
137
180
|
children: PropTypes.node,
|
|
181
|
+
/**
|
|
182
|
+
* Specify an optional className to be applied to the container node
|
|
183
|
+
*/
|
|
138
184
|
className: PropTypes.string,
|
|
185
|
+
/**
|
|
186
|
+
* Specify whether your StructuredListRow should be used as a header row
|
|
187
|
+
*/
|
|
139
188
|
head: PropTypes.bool,
|
|
189
|
+
/**
|
|
190
|
+
* Specify whether a `<label>` should be used
|
|
191
|
+
*/
|
|
140
192
|
label: deprecate(PropTypes.bool, `\nThe \`label\` prop is no longer needed and will be removed in the next major version of Carbon.`),
|
|
193
|
+
/**
|
|
194
|
+
* Provide a handler that is invoked on the click
|
|
195
|
+
*/
|
|
141
196
|
onClick: PropTypes.func,
|
|
197
|
+
/**
|
|
198
|
+
* Provide a handler that is invoked on the key down event for the control,
|
|
199
|
+
*/
|
|
142
200
|
onKeyDown: PropTypes.func,
|
|
201
|
+
/**
|
|
202
|
+
* Mark if this row should be selectable
|
|
203
|
+
*/
|
|
143
204
|
selection: PropTypes.bool,
|
|
205
|
+
/**
|
|
206
|
+
* Specify row id so that it can be used for initial selection
|
|
207
|
+
*/
|
|
144
208
|
id: PropTypes.string
|
|
145
209
|
};
|
|
146
210
|
function StructuredListInput(props) {
|
|
@@ -168,12 +232,33 @@ function StructuredListInput(props) {
|
|
|
168
232
|
});
|
|
169
233
|
}
|
|
170
234
|
StructuredListInput.propTypes = {
|
|
235
|
+
/**
|
|
236
|
+
* Specify an optional className to be applied to the input
|
|
237
|
+
*/
|
|
171
238
|
className: PropTypes.string,
|
|
239
|
+
/**
|
|
240
|
+
* Specify whether the underlying input should be checked by default
|
|
241
|
+
*/
|
|
172
242
|
defaultChecked: deprecate(PropTypes.bool, `\nThe prop \`defaultChecked\` is no longer needed and will be removed in the next major version of Carbon.`),
|
|
243
|
+
/**
|
|
244
|
+
* Specify a custom `id` for the input
|
|
245
|
+
*/
|
|
173
246
|
id: PropTypes.string,
|
|
247
|
+
/**
|
|
248
|
+
* Provide a `name` for the input
|
|
249
|
+
*/
|
|
174
250
|
name: PropTypes.string,
|
|
251
|
+
/**
|
|
252
|
+
* Provide an optional hook that is called each time the input is updated
|
|
253
|
+
*/
|
|
175
254
|
onChange: PropTypes.func,
|
|
255
|
+
/**
|
|
256
|
+
* Provide a `title` for the input
|
|
257
|
+
*/
|
|
176
258
|
title: PropTypes.string,
|
|
259
|
+
/**
|
|
260
|
+
* Specify the value of the input
|
|
261
|
+
*/
|
|
177
262
|
value: deprecate(PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, `\nThe prop \`value\` will be removed in the next major version of Carbon.`)
|
|
178
263
|
};
|
|
179
264
|
function StructuredListCell(props) {
|
|
@@ -199,9 +284,21 @@ function StructuredListCell(props) {
|
|
|
199
284
|
});
|
|
200
285
|
}
|
|
201
286
|
StructuredListCell.propTypes = {
|
|
287
|
+
/**
|
|
288
|
+
* Provide the contents of your StructuredListCell
|
|
289
|
+
*/
|
|
202
290
|
children: PropTypes.node,
|
|
291
|
+
/**
|
|
292
|
+
* Specify an optional className to be applied to the container node
|
|
293
|
+
*/
|
|
203
294
|
className: PropTypes.string,
|
|
295
|
+
/**
|
|
296
|
+
* Specify whether your StructuredListCell should be used as a header cell
|
|
297
|
+
*/
|
|
204
298
|
head: PropTypes.bool,
|
|
299
|
+
/**
|
|
300
|
+
* Specify whether your StructuredListCell should have text wrapping
|
|
301
|
+
*/
|
|
205
302
|
noWrap: PropTypes.bool
|
|
206
303
|
};
|
|
207
304
|
//#endregion
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
9
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
+
import { noopFn } from "../../internal/noopFn.js";
|
|
10
10
|
import { IconButton } from "../IconButton/index.js";
|
|
11
|
-
import { forwardRef, useState } from "react";
|
|
12
11
|
import classNames from "classnames";
|
|
12
|
+
import { forwardRef, useState } from "react";
|
|
13
13
|
import PropTypes from "prop-types";
|
|
14
14
|
import { jsx } from "react/jsx-runtime";
|
|
15
15
|
//#region src/components/Switch/IconSwitch.tsx
|
|
@@ -77,6 +77,9 @@ const IconSwitch = forwardRef((props, ref) => {
|
|
|
77
77
|
});
|
|
78
78
|
IconSwitch.displayName = "IconSwitch";
|
|
79
79
|
IconSwitch.propTypes = {
|
|
80
|
+
/**
|
|
81
|
+
* Specify how the trigger should align with the tooltip
|
|
82
|
+
*/
|
|
80
83
|
align: PropTypes.oneOf([
|
|
81
84
|
"top",
|
|
82
85
|
"top-left",
|
|
@@ -87,21 +90,65 @@ IconSwitch.propTypes = {
|
|
|
87
90
|
"left",
|
|
88
91
|
"right"
|
|
89
92
|
]),
|
|
93
|
+
/**
|
|
94
|
+
* Children to be rendered inside of the `IconSwitch`.
|
|
95
|
+
*/
|
|
90
96
|
children: PropTypes.node,
|
|
97
|
+
/**
|
|
98
|
+
* Specify an optional className to be added to your `IconSwitch`.
|
|
99
|
+
*/
|
|
91
100
|
className: PropTypes.string,
|
|
101
|
+
/**
|
|
102
|
+
* Whether the `IconSwitch` should be disabled.
|
|
103
|
+
*/
|
|
92
104
|
disabled: PropTypes.bool,
|
|
105
|
+
/**
|
|
106
|
+
* Specify the duration in milliseconds to delay before displaying the tooltip
|
|
107
|
+
*/
|
|
93
108
|
enterDelayMs: PropTypes.number,
|
|
109
|
+
/**
|
|
110
|
+
* The index of the `IconSwitch`.
|
|
111
|
+
*
|
|
112
|
+
* Reserved for usage in `ContentSwitcher`.
|
|
113
|
+
*/
|
|
94
114
|
index: PropTypes.number,
|
|
115
|
+
/**
|
|
116
|
+
* Specify the duration in milliseconds to delay before hiding the tooltip
|
|
117
|
+
*/
|
|
95
118
|
leaveDelayMs: PropTypes.number,
|
|
119
|
+
/**
|
|
120
|
+
* The name of the `IconSwitch`.
|
|
121
|
+
*/
|
|
96
122
|
name: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
123
|
+
/**
|
|
124
|
+
* A handler that is invoked when a user clicks on the control.
|
|
125
|
+
*
|
|
126
|
+
* Reserved for usage in `ContentSwitcher`.
|
|
127
|
+
*/
|
|
97
128
|
onClick: PropTypes.func,
|
|
129
|
+
/**
|
|
130
|
+
* A handler that is invoked on the key down event for the control.
|
|
131
|
+
*
|
|
132
|
+
* Reserved for usage in `ContentSwitcher`.
|
|
133
|
+
*/
|
|
98
134
|
onKeyDown: PropTypes.func,
|
|
135
|
+
/**
|
|
136
|
+
* Whether the `IconSwitch` is selected.
|
|
137
|
+
*
|
|
138
|
+
* Reserved for usage in `ContentSwitcher`.
|
|
139
|
+
*/
|
|
99
140
|
selected: PropTypes.bool,
|
|
141
|
+
/**
|
|
142
|
+
* Specify the size of the underlying icon-only button.
|
|
143
|
+
*/
|
|
100
144
|
size: PropTypes.oneOf([
|
|
101
145
|
"sm",
|
|
102
146
|
"md",
|
|
103
147
|
"lg"
|
|
104
148
|
]),
|
|
149
|
+
/**
|
|
150
|
+
* `Tooltip` text.
|
|
151
|
+
*/
|
|
105
152
|
text: PropTypes.string
|
|
106
153
|
};
|
|
107
154
|
//#endregion
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
9
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
10
|
-
import
|
|
9
|
+
import { noopFn } from "../../internal/noopFn.js";
|
|
11
10
|
import classNames from "classnames";
|
|
11
|
+
import React from "react";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/Switch/Switch.tsx
|
|
@@ -61,14 +61,44 @@ const Switch = React.forwardRef((props, tabRef) => {
|
|
|
61
61
|
});
|
|
62
62
|
Switch.displayName = "Switch";
|
|
63
63
|
Switch.propTypes = {
|
|
64
|
+
/**
|
|
65
|
+
* Provide child elements to be rendered inside of the Switch
|
|
66
|
+
*/
|
|
64
67
|
children: PropTypes.node,
|
|
68
|
+
/**
|
|
69
|
+
* Specify an optional className to be added to your Switch
|
|
70
|
+
*/
|
|
65
71
|
className: PropTypes.string,
|
|
72
|
+
/**
|
|
73
|
+
* Specify whether or not the Switch should be disabled
|
|
74
|
+
*/
|
|
66
75
|
disabled: PropTypes.bool,
|
|
76
|
+
/**
|
|
77
|
+
* The index of your Switch in your ContentSwitcher that is used for event handlers.
|
|
78
|
+
* Reserved for usage in ContentSwitcher
|
|
79
|
+
*/
|
|
67
80
|
index: PropTypes.number,
|
|
81
|
+
/**
|
|
82
|
+
* Provide the name of your Switch that is used for event handlers
|
|
83
|
+
*/
|
|
68
84
|
name: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
85
|
+
/**
|
|
86
|
+
* A handler that is invoked when a user clicks on the control.
|
|
87
|
+
* Reserved for usage in ContentSwitcher
|
|
88
|
+
*/
|
|
69
89
|
onClick: PropTypes.func,
|
|
90
|
+
/**
|
|
91
|
+
* A handler that is invoked on the key down event for the control.
|
|
92
|
+
* Reserved for usage in ContentSwitcher
|
|
93
|
+
*/
|
|
70
94
|
onKeyDown: PropTypes.func,
|
|
95
|
+
/**
|
|
96
|
+
* Whether your Switch is selected. Reserved for usage in ContentSwitcher
|
|
97
|
+
*/
|
|
71
98
|
selected: PropTypes.bool,
|
|
99
|
+
/**
|
|
100
|
+
* Provide the contents of your Switch
|
|
101
|
+
*/
|
|
72
102
|
text: PropTypes.string
|
|
73
103
|
};
|
|
74
104
|
//#endregion
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import "react";
|
|
10
9
|
import classNames from "classnames";
|
|
10
|
+
import "react";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/TabContent/TabContent.tsx
|
|
@@ -30,8 +30,17 @@ function TabContent(props) {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
TabContent.propTypes = {
|
|
33
|
+
/**
|
|
34
|
+
* Pass in content to render inside the TabContent
|
|
35
|
+
*/
|
|
33
36
|
children: PropTypes.node,
|
|
37
|
+
/**
|
|
38
|
+
* Provide a className for the tab content container
|
|
39
|
+
*/
|
|
34
40
|
className: PropTypes.string,
|
|
41
|
+
/**
|
|
42
|
+
* Specify whether the TabContent is selected
|
|
43
|
+
*/
|
|
35
44
|
selected: PropTypes.bool
|
|
36
45
|
};
|
|
37
46
|
//#endregion
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import "react";
|
|
10
9
|
import classNames from "classnames";
|
|
10
|
+
import "react";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/Tabs/Tabs.Skeleton.tsx
|
|
@@ -45,7 +45,13 @@ function TabsSkeleton({ className, contained, ...rest }) {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
TabsSkeleton.propTypes = {
|
|
48
|
+
/**
|
|
49
|
+
* Specify an optional className to add.
|
|
50
|
+
*/
|
|
48
51
|
className: PropTypes.string,
|
|
52
|
+
/**
|
|
53
|
+
* Provide the type of Tab
|
|
54
|
+
*/
|
|
49
55
|
contained: PropTypes.bool
|
|
50
56
|
};
|
|
51
57
|
//#endregion
|
|
@@ -21,8 +21,8 @@ import { useControllableState } from "../../internal/useControllableState.js";
|
|
|
21
21
|
import { GridAsGridComponent } from "../Grid/Grid.js";
|
|
22
22
|
import { useMatchMedia } from "../../internal/useMatchMedia.js";
|
|
23
23
|
import { usePressable } from "./usePressable.js";
|
|
24
|
-
import React, { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
25
24
|
import classNames from "classnames";
|
|
25
|
+
import React, { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
26
26
|
import PropTypes from "prop-types";
|
|
27
27
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
28
28
|
import { ChevronLeft, ChevronRight, Close } from "@carbon/icons-react";
|
|
@@ -79,13 +79,36 @@ function Tabs({ children, defaultSelectedIndex = 0, onChange, selectedIndex: con
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
Tabs.propTypes = {
|
|
82
|
+
/**
|
|
83
|
+
* Provide child elements to be rendered inside the `Tabs`.
|
|
84
|
+
* These elements should render either `TabsList` or `TabsPanels`
|
|
85
|
+
*/
|
|
82
86
|
children: PropTypes.node,
|
|
87
|
+
/**
|
|
88
|
+
* Specify which content tab should be initially selected when the component
|
|
89
|
+
* is first rendered
|
|
90
|
+
*/
|
|
83
91
|
defaultSelectedIndex: PropTypes.number,
|
|
92
|
+
/**
|
|
93
|
+
* Whether the render Tab children should be dismissable.
|
|
94
|
+
*/
|
|
84
95
|
dismissable: PropTypes.bool,
|
|
96
|
+
/**
|
|
97
|
+
* Provide an optional function which is called whenever the state of the
|
|
98
|
+
* `Tabs` changes
|
|
99
|
+
*/
|
|
85
100
|
onChange: PropTypes.func,
|
|
101
|
+
/**
|
|
102
|
+
* If specifying the `onTabCloseRequest` prop, provide a callback function
|
|
103
|
+
* responsible for removing the tab when close button is pressed on one of the Tab elements
|
|
104
|
+
*/
|
|
86
105
|
onTabCloseRequest: (props) => {
|
|
87
106
|
if (props.dismissable && !props.onTabCloseRequest) return /* @__PURE__ */ new Error("dismissable property specified without also providing an onTabCloseRequest property.");
|
|
88
107
|
},
|
|
108
|
+
/**
|
|
109
|
+
* Control which content panel is currently selected. This puts the component
|
|
110
|
+
* in a controlled mode and should be used along with `onChange`
|
|
111
|
+
*/
|
|
89
112
|
selectedIndex: PropTypes.number
|
|
90
113
|
};
|
|
91
114
|
function TabsVertical({ children, height, defaultSelectedIndex = 0, onChange, selectedIndex: controlledSelectedIndex, ...rest }) {
|
|
@@ -112,10 +135,29 @@ function TabsVertical({ children, height, defaultSelectedIndex = 0, onChange, se
|
|
|
112
135
|
});
|
|
113
136
|
}
|
|
114
137
|
TabsVertical.propTypes = {
|
|
138
|
+
/**
|
|
139
|
+
* Provide child elements to be rendered inside the `TabsVertical`.
|
|
140
|
+
* These elements should render either `TabsListVertical` or `TabsPanels`
|
|
141
|
+
*/
|
|
115
142
|
children: PropTypes.node,
|
|
143
|
+
/**
|
|
144
|
+
* Specify which content tab should be initially selected when the component
|
|
145
|
+
* is first rendered
|
|
146
|
+
*/
|
|
116
147
|
defaultSelectedIndex: PropTypes.number,
|
|
148
|
+
/**
|
|
149
|
+
* Option to set a height style only if using vertical variation
|
|
150
|
+
*/
|
|
117
151
|
height: PropTypes.string,
|
|
152
|
+
/**
|
|
153
|
+
* Provide an optional function which is called whenever the state of the
|
|
154
|
+
* `Tabs` changes
|
|
155
|
+
*/
|
|
118
156
|
onChange: PropTypes.func,
|
|
157
|
+
/**
|
|
158
|
+
* Control which content panel is currently selected. This puts the component
|
|
159
|
+
* in a controlled mode and should be used along with `onChange`
|
|
160
|
+
*/
|
|
119
161
|
selectedIndex: PropTypes.number
|
|
120
162
|
};
|
|
121
163
|
/**
|
|
@@ -331,18 +373,66 @@ function TabList({ activation = "automatic", "aria-label": label, children, clas
|
|
|
331
373
|
});
|
|
332
374
|
}
|
|
333
375
|
TabList.propTypes = {
|
|
376
|
+
/**
|
|
377
|
+
* Specify whether the content tab should be activated automatically or
|
|
378
|
+
* manually
|
|
379
|
+
*/
|
|
334
380
|
activation: PropTypes.oneOf(["automatic", "manual"]),
|
|
381
|
+
/**
|
|
382
|
+
* Provide an accessible label to be read when a user interacts with this
|
|
383
|
+
* component
|
|
384
|
+
*/
|
|
335
385
|
"aria-label": PropTypes.string,
|
|
386
|
+
/**
|
|
387
|
+
* Provide child elements to be rendered inside `ContentTabs`.
|
|
388
|
+
* These elements should render a `ContentTab`
|
|
389
|
+
*/
|
|
336
390
|
children: PropTypes.node,
|
|
391
|
+
/**
|
|
392
|
+
* Specify an optional className to be added to the container node
|
|
393
|
+
*/
|
|
337
394
|
className: PropTypes.string,
|
|
395
|
+
/**
|
|
396
|
+
* Specify whether component is contained type
|
|
397
|
+
*/
|
|
338
398
|
contained: PropTypes.bool,
|
|
399
|
+
/**
|
|
400
|
+
* Used for tabs within a grid, this makes it so tabs span the full container width and have the same width. Only available on contained tabs with <9 children
|
|
401
|
+
*/
|
|
339
402
|
fullWidth: PropTypes.bool,
|
|
403
|
+
/**
|
|
404
|
+
* If using `IconTab`, specify the size of the icon being used.
|
|
405
|
+
*/
|
|
340
406
|
iconSize: PropTypes.oneOf(["default", "lg"]),
|
|
407
|
+
/**
|
|
408
|
+
* Provide the props that describe the left overflow button
|
|
409
|
+
*/
|
|
341
410
|
leftOverflowButtonProps: PropTypes.object,
|
|
411
|
+
/**
|
|
412
|
+
* Specify whether to use the light component variant
|
|
413
|
+
*/
|
|
342
414
|
light: deprecate(PropTypes.bool, "The `light` prop for `TabList` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),
|
|
415
|
+
/**
|
|
416
|
+
* Provide the props that describe the right overflow button
|
|
417
|
+
*/
|
|
343
418
|
rightOverflowButtonProps: PropTypes.object,
|
|
419
|
+
/**
|
|
420
|
+
* Optionally provide a delay (in milliseconds) passed to the lodash
|
|
421
|
+
* debounce of the onScroll handler. This will impact the responsiveness
|
|
422
|
+
* of scroll arrow buttons rendering when scrolling to the first or last tab.
|
|
423
|
+
*/
|
|
344
424
|
scrollDebounceWait: PropTypes.number,
|
|
425
|
+
/**
|
|
426
|
+
* Choose whether to automatically scroll
|
|
427
|
+
* to newly selected tabs on component rerender
|
|
428
|
+
*/
|
|
345
429
|
scrollIntoView: PropTypes.bool,
|
|
430
|
+
/**
|
|
431
|
+
* Specify the size of the tabs.
|
|
432
|
+
*
|
|
433
|
+
* Supports `sm` and `md` for line tabs.
|
|
434
|
+
* Supports `sm`, `md`, and `lg` for contained tabs.
|
|
435
|
+
*/
|
|
346
436
|
size: PropTypes.oneOf([
|
|
347
437
|
"sm",
|
|
348
438
|
"md",
|
|
@@ -461,10 +551,28 @@ function TabListVertical({ activation = "automatic", "aria-label": label, childr
|
|
|
461
551
|
});
|
|
462
552
|
}
|
|
463
553
|
TabListVertical.propTypes = {
|
|
554
|
+
/**
|
|
555
|
+
* Specify whether the content tab should be activated automatically or
|
|
556
|
+
* manually
|
|
557
|
+
*/
|
|
464
558
|
activation: PropTypes.oneOf(["automatic", "manual"]),
|
|
559
|
+
/**
|
|
560
|
+
* Provide an accessible label to be read when a user interacts with this
|
|
561
|
+
* component
|
|
562
|
+
*/
|
|
465
563
|
"aria-label": PropTypes.string,
|
|
564
|
+
/**
|
|
565
|
+
* Provide child elements to be rendered inside `ContentTabs`.
|
|
566
|
+
* These elements should render a `ContentTab`
|
|
567
|
+
*/
|
|
466
568
|
children: PropTypes.node,
|
|
569
|
+
/**
|
|
570
|
+
* Specify an optional className to be added to the container node
|
|
571
|
+
*/
|
|
467
572
|
className: PropTypes.string,
|
|
573
|
+
/**
|
|
574
|
+
* Specify the size of the tabs.
|
|
575
|
+
*/
|
|
468
576
|
size: PropTypes.oneOf([
|
|
469
577
|
"sm",
|
|
470
578
|
"md",
|
|
@@ -684,14 +792,44 @@ const Tab = forwardRef(({ as = "button", children, className: customClassName, d
|
|
|
684
792
|
}), DismissIcon] });
|
|
685
793
|
});
|
|
686
794
|
Tab.propTypes = {
|
|
795
|
+
/**
|
|
796
|
+
* Provide a custom element to render instead of the default button
|
|
797
|
+
*/
|
|
687
798
|
as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
|
799
|
+
/**
|
|
800
|
+
* Provide child elements to be rendered inside `Tab`.
|
|
801
|
+
*/
|
|
688
802
|
children: PropTypes.node,
|
|
803
|
+
/**
|
|
804
|
+
* Specify an optional className to be added to your Tab
|
|
805
|
+
*/
|
|
689
806
|
className: PropTypes.string,
|
|
807
|
+
/**
|
|
808
|
+
* Whether your Tab is disabled.
|
|
809
|
+
*/
|
|
690
810
|
disabled: PropTypes.bool,
|
|
811
|
+
/**
|
|
812
|
+
* Provide a handler that is invoked when a user clicks on the control
|
|
813
|
+
*/
|
|
691
814
|
onClick: PropTypes.func,
|
|
815
|
+
/**
|
|
816
|
+
* Provide a handler that is invoked on the key down event for the control
|
|
817
|
+
*/
|
|
692
818
|
onKeyDown: PropTypes.func,
|
|
819
|
+
/**
|
|
820
|
+
* An optional parameter to allow overriding the anchor rendering.
|
|
821
|
+
* Useful for using Tab along with react-router or other client
|
|
822
|
+
* side router libraries.
|
|
823
|
+
*/
|
|
693
824
|
renderButton: PropTypes.func,
|
|
825
|
+
/**
|
|
826
|
+
* A component used to render an icon.
|
|
827
|
+
*/
|
|
694
828
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
829
|
+
/**
|
|
830
|
+
* An optional label to render under the primary tab label.
|
|
831
|
+
* Only useful for contained tabs.
|
|
832
|
+
*/
|
|
695
833
|
secondaryLabel: PropTypes.string
|
|
696
834
|
};
|
|
697
835
|
/**
|
|
@@ -722,12 +860,37 @@ const IconTab = React.forwardRef(({ badgeIndicator, children, className: customC
|
|
|
722
860
|
});
|
|
723
861
|
});
|
|
724
862
|
IconTab.propTypes = {
|
|
863
|
+
/**
|
|
864
|
+
* **Experimental**: Display an empty dot badge on the Tab.
|
|
865
|
+
*/
|
|
725
866
|
badgeIndicator: PropTypes.bool,
|
|
867
|
+
/**
|
|
868
|
+
* Provide an icon to be rendered inside `IconTab` as the visual label for Tab.
|
|
869
|
+
*/
|
|
726
870
|
children: PropTypes.node,
|
|
871
|
+
/**
|
|
872
|
+
* Specify an optional className to be added to your Tab
|
|
873
|
+
*/
|
|
727
874
|
className: PropTypes.string,
|
|
875
|
+
/**
|
|
876
|
+
* Specify whether the tooltip for the icon should be open when it first renders
|
|
877
|
+
*/
|
|
728
878
|
defaultOpen: PropTypes.bool,
|
|
879
|
+
/**
|
|
880
|
+
* Specify the duration in milliseconds to delay before displaying the tooltip for the icon.
|
|
881
|
+
*/
|
|
729
882
|
enterDelayMs: PropTypes.number,
|
|
883
|
+
/**
|
|
884
|
+
* Provide the label to be rendered inside the Tooltip. The label will use
|
|
885
|
+
* `aria-labelledby` and will fully describe the child node that is provided.
|
|
886
|
+
* This means that if you have text in the child node it will not be
|
|
887
|
+
* announced to the screen reader. If using the badgeIndicator then provide a
|
|
888
|
+
* label with describing that there is a new notification.
|
|
889
|
+
*/
|
|
730
890
|
label: PropTypes.node.isRequired,
|
|
891
|
+
/**
|
|
892
|
+
* Specify the duration in milliseconds to delay before hiding the tooltip
|
|
893
|
+
*/
|
|
731
894
|
leaveDelayMs: PropTypes.number
|
|
732
895
|
};
|
|
733
896
|
const TabPanel = React.forwardRef(({ children, className: customClassName, ...rest }, forwardRef) => {
|
|
@@ -749,7 +912,13 @@ const TabPanel = React.forwardRef(({ children, className: customClassName, ...re
|
|
|
749
912
|
});
|
|
750
913
|
});
|
|
751
914
|
TabPanel.propTypes = {
|
|
915
|
+
/**
|
|
916
|
+
* Provide child elements to be rendered inside `TabPanel`.
|
|
917
|
+
*/
|
|
752
918
|
children: PropTypes.node,
|
|
919
|
+
/**
|
|
920
|
+
* Specify an optional className to be added to TabPanel.
|
|
921
|
+
*/
|
|
753
922
|
className: PropTypes.string
|
|
754
923
|
};
|
|
755
924
|
function TabPanels({ children }) {
|
|
@@ -782,6 +951,10 @@ function TabPanels({ children }) {
|
|
|
782
951
|
});
|
|
783
952
|
}) });
|
|
784
953
|
}
|
|
785
|
-
TabPanels.propTypes = {
|
|
954
|
+
TabPanels.propTypes = {
|
|
955
|
+
/**
|
|
956
|
+
* Provide child elements to be rendered inside `TabPanels`.
|
|
957
|
+
*/
|
|
958
|
+
children: PropTypes.node };
|
|
786
959
|
//#endregion
|
|
787
960
|
export { IconTab, Tab, TabList, TabListVertical, TabPanel, TabPanels, Tabs, TabsVertical };
|