@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
|
@@ -16,8 +16,8 @@ import { MenuContext } from "./MenuContext.js";
|
|
|
16
16
|
import { useLayoutDirection } from "../LayoutDirection/useLayoutDirection.js";
|
|
17
17
|
import { Menu as Menu$1 } from "./Menu.js";
|
|
18
18
|
import { useControllableState } from "../../internal/useControllableState.js";
|
|
19
|
-
import React, { forwardRef, useContext, useEffect, useRef, useState } from "react";
|
|
20
19
|
import classNames from "classnames";
|
|
20
|
+
import React, { forwardRef, useContext, useEffect, useRef, useState } from "react";
|
|
21
21
|
import PropTypes from "prop-types";
|
|
22
22
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
23
23
|
import { CaretLeft, CaretRight, Checkmark } from "@carbon/icons-react";
|
|
@@ -198,14 +198,41 @@ const MenuItem = forwardRef(function MenuItem({ children, className, dangerDescr
|
|
|
198
198
|
});
|
|
199
199
|
});
|
|
200
200
|
MenuItem.propTypes = {
|
|
201
|
+
/**
|
|
202
|
+
* Optionally provide another Menu to create a submenu. props.children can't be used to specify the content of the MenuItem itself. Use props.label instead.
|
|
203
|
+
*/
|
|
201
204
|
children: PropTypes.node,
|
|
205
|
+
/**
|
|
206
|
+
* Additional CSS class names.
|
|
207
|
+
*/
|
|
202
208
|
className: PropTypes.string,
|
|
209
|
+
/**
|
|
210
|
+
* Specify the message read by screen readers for the danger menu item variant
|
|
211
|
+
*/
|
|
203
212
|
dangerDescription: PropTypes.string,
|
|
213
|
+
/**
|
|
214
|
+
* Specify whether the MenuItem is disabled or not.
|
|
215
|
+
*/
|
|
204
216
|
disabled: PropTypes.bool,
|
|
217
|
+
/**
|
|
218
|
+
* Specify the kind of the MenuItem.
|
|
219
|
+
*/
|
|
205
220
|
kind: PropTypes.oneOf(["default", "danger"]),
|
|
221
|
+
/**
|
|
222
|
+
* A required label titling the MenuItem. Will be rendered as its text content.
|
|
223
|
+
*/
|
|
206
224
|
label: PropTypes.string.isRequired,
|
|
225
|
+
/**
|
|
226
|
+
* Provide an optional function to be called when the MenuItem is clicked.
|
|
227
|
+
*/
|
|
207
228
|
onClick: PropTypes.func,
|
|
229
|
+
/**
|
|
230
|
+
* A component used to render an icon.
|
|
231
|
+
*/
|
|
208
232
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
233
|
+
/**
|
|
234
|
+
* Provide a shortcut for the action of this MenuItem. Note that the component will only render it as a hint but not actually register the shortcut.
|
|
235
|
+
*/
|
|
209
236
|
shortcut: PropTypes.string
|
|
210
237
|
};
|
|
211
238
|
const MenuItemSelectable = forwardRef(function MenuItemSelectable({ className, defaultSelected, label, onChange, selected, ...rest }, forwardRef) {
|
|
@@ -234,10 +261,25 @@ const MenuItemSelectable = forwardRef(function MenuItemSelectable({ className, d
|
|
|
234
261
|
});
|
|
235
262
|
});
|
|
236
263
|
MenuItemSelectable.propTypes = {
|
|
264
|
+
/**
|
|
265
|
+
* Additional CSS class names.
|
|
266
|
+
*/
|
|
237
267
|
className: PropTypes.string,
|
|
268
|
+
/**
|
|
269
|
+
* Specify whether the option should be selected by default.
|
|
270
|
+
*/
|
|
238
271
|
defaultSelected: PropTypes.bool,
|
|
272
|
+
/**
|
|
273
|
+
* A required label titling this option.
|
|
274
|
+
*/
|
|
239
275
|
label: PropTypes.string.isRequired,
|
|
276
|
+
/**
|
|
277
|
+
* Provide an optional function to be called when the selection state changes.
|
|
278
|
+
*/
|
|
240
279
|
onChange: PropTypes.func,
|
|
280
|
+
/**
|
|
281
|
+
* Pass a bool to props.selected to control the state of this option.
|
|
282
|
+
*/
|
|
241
283
|
selected: PropTypes.bool
|
|
242
284
|
};
|
|
243
285
|
const MenuItemGroup = forwardRef(function MenuItemGroup({ children, className, label, ...rest }, forwardRef) {
|
|
@@ -254,8 +296,17 @@ const MenuItemGroup = forwardRef(function MenuItemGroup({ children, className, l
|
|
|
254
296
|
});
|
|
255
297
|
});
|
|
256
298
|
MenuItemGroup.propTypes = {
|
|
299
|
+
/**
|
|
300
|
+
* A collection of MenuItems to be rendered within this group.
|
|
301
|
+
*/
|
|
257
302
|
children: PropTypes.node,
|
|
303
|
+
/**
|
|
304
|
+
* Additional CSS class names.
|
|
305
|
+
*/
|
|
258
306
|
className: PropTypes.string,
|
|
307
|
+
/**
|
|
308
|
+
* A required label titling this group.
|
|
309
|
+
*/
|
|
259
310
|
label: PropTypes.string.isRequired
|
|
260
311
|
};
|
|
261
312
|
const MenuItemRadioGroup = forwardRef(function MenuItemRadioGroup({ className, defaultSelectedItem, items, itemToString = defaultItemToString, label, onChange, selectedItem, ...rest }, forwardRef) {
|
|
@@ -292,12 +343,33 @@ const MenuItemRadioGroup = forwardRef(function MenuItemRadioGroup({ className, d
|
|
|
292
343
|
});
|
|
293
344
|
});
|
|
294
345
|
MenuItemRadioGroup.propTypes = {
|
|
346
|
+
/**
|
|
347
|
+
* Additional CSS class names.
|
|
348
|
+
*/
|
|
295
349
|
className: PropTypes.string,
|
|
350
|
+
/**
|
|
351
|
+
* Specify the default selected item. Must match the type of props.items.
|
|
352
|
+
*/
|
|
296
353
|
defaultSelectedItem: PropTypes.any,
|
|
354
|
+
/**
|
|
355
|
+
* Converts an item into a string for display.
|
|
356
|
+
*/
|
|
297
357
|
itemToString: PropTypes.func,
|
|
358
|
+
/**
|
|
359
|
+
* Provide the options for this radio group. Can be of any type, as long as you provide an appropriate props.itemToString function.
|
|
360
|
+
*/
|
|
298
361
|
items: PropTypes.array,
|
|
362
|
+
/**
|
|
363
|
+
* A required label titling this radio group.
|
|
364
|
+
*/
|
|
299
365
|
label: PropTypes.string.isRequired,
|
|
366
|
+
/**
|
|
367
|
+
* Provide an optional function to be called when the selection changes.
|
|
368
|
+
*/
|
|
300
369
|
onChange: PropTypes.func,
|
|
370
|
+
/**
|
|
371
|
+
* Provide props.selectedItem to control the state of this radio group. Must match the type of props.items.
|
|
372
|
+
*/
|
|
301
373
|
selectedItem: PropTypes.any
|
|
302
374
|
};
|
|
303
375
|
const MenuItemDivider = forwardRef(function MenuItemDivider({ className, ...rest }, forwardRef) {
|
|
@@ -309,6 +381,10 @@ const MenuItemDivider = forwardRef(function MenuItemDivider({ className, ...rest
|
|
|
309
381
|
ref: forwardRef
|
|
310
382
|
});
|
|
311
383
|
});
|
|
312
|
-
MenuItemDivider.propTypes = {
|
|
384
|
+
MenuItemDivider.propTypes = {
|
|
385
|
+
/**
|
|
386
|
+
* Additional CSS class names.
|
|
387
|
+
*/
|
|
388
|
+
className: PropTypes.string };
|
|
313
389
|
//#endregion
|
|
314
390
|
export { MenuItem, MenuItemDivider, MenuItemGroup, MenuItemRadioGroup, MenuItemSelectable };
|
|
@@ -13,8 +13,8 @@ import Button_default from "../Button/index.js";
|
|
|
13
13
|
import { mergeRefs } from "../../tools/mergeRefs.js";
|
|
14
14
|
import { Menu as Menu$1 } from "../Menu/Menu.js";
|
|
15
15
|
import { useAttachedMenu } from "../../internal/useAttachedMenu.js";
|
|
16
|
-
import { forwardRef, useRef } from "react";
|
|
17
16
|
import classNames from "classnames";
|
|
17
|
+
import { forwardRef, useRef } from "react";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
20
|
import { ChevronDown } from "@carbon/icons-react";
|
|
@@ -115,11 +115,29 @@ const MenuButton = forwardRef(({ children, className, disabled, kind = defaultBu
|
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
MenuButton.propTypes = {
|
|
118
|
+
/**
|
|
119
|
+
* A collection of MenuItems to be rendered as actions for this MenuButton.
|
|
120
|
+
*/
|
|
118
121
|
children: PropTypes.node.isRequired,
|
|
122
|
+
/**
|
|
123
|
+
* Additional CSS class names.
|
|
124
|
+
*/
|
|
119
125
|
className: PropTypes.string,
|
|
126
|
+
/**
|
|
127
|
+
* Specify whether the MenuButton should be disabled, or not.
|
|
128
|
+
*/
|
|
120
129
|
disabled: PropTypes.bool,
|
|
130
|
+
/**
|
|
131
|
+
* Specify the type of button to be used as the base for the trigger button.
|
|
132
|
+
*/
|
|
121
133
|
kind: PropTypes.oneOf(validButtonKinds),
|
|
134
|
+
/**
|
|
135
|
+
* Provide the label to be rendered on the trigger button.
|
|
136
|
+
*/
|
|
122
137
|
label: PropTypes.string.isRequired,
|
|
138
|
+
/**
|
|
139
|
+
* Experimental property. Specify how the menu should align with the button element
|
|
140
|
+
*/
|
|
123
141
|
menuAlignment: PropTypes.oneOf([
|
|
124
142
|
"top",
|
|
125
143
|
"top-start",
|
|
@@ -128,15 +146,30 @@ MenuButton.propTypes = {
|
|
|
128
146
|
"bottom-start",
|
|
129
147
|
"bottom-end"
|
|
130
148
|
]),
|
|
149
|
+
/**
|
|
150
|
+
* Specify the size of the button and menu.
|
|
151
|
+
*/
|
|
131
152
|
size: PropTypes.oneOf([
|
|
132
153
|
"xs",
|
|
133
154
|
"sm",
|
|
134
155
|
"md",
|
|
135
156
|
"lg"
|
|
136
157
|
]),
|
|
158
|
+
/**
|
|
159
|
+
* Specify the tabIndex of the button.
|
|
160
|
+
*/
|
|
137
161
|
tabIndex: PropTypes.number,
|
|
162
|
+
/**
|
|
163
|
+
* Specify the background token to use for the menu. Default is 'layer'.
|
|
164
|
+
*/
|
|
138
165
|
menuBackgroundToken: PropTypes.oneOf(["layer", "background"]),
|
|
166
|
+
/**
|
|
167
|
+
* Specify whether a border should be rendered on the menu
|
|
168
|
+
*/
|
|
139
169
|
menuBorder: PropTypes.bool,
|
|
170
|
+
/**
|
|
171
|
+
* Specify a DOM node where the Menu should be rendered in. Defaults to document.body.
|
|
172
|
+
*/
|
|
140
173
|
menuTarget: PropTypes.instanceOf(typeof Element !== "undefined" ? Element : Object)
|
|
141
174
|
};
|
|
142
175
|
//#endregion
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
9
|
-
import { warning } from "../../internal/warning.js";
|
|
10
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
11
9
|
import { Text } from "../Text/Text.js";
|
|
12
10
|
import { Enter, Escape, Tab } from "../../internal/keyboard/keys.js";
|
|
13
11
|
import { match } from "../../internal/keyboard/match.js";
|
|
14
12
|
import { selectorTabbable } from "../../internal/keyboard/navigation.js";
|
|
15
13
|
import { useId } from "../../internal/useId.js";
|
|
14
|
+
import { noopFn } from "../../internal/noopFn.js";
|
|
15
|
+
import { warning } from "../../internal/warning.js";
|
|
16
16
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
17
17
|
import { isComponentElement } from "../../internal/utils.js";
|
|
18
18
|
import { useMergedRefs } from "../../internal/useMergedRefs.js";
|
|
@@ -32,8 +32,8 @@ import { isTopmostVisibleModal } from "./isTopmostVisibleModal.js";
|
|
|
32
32
|
import { requiredIfGivenPropIsTruthy } from "../../prop-types/requiredIfGivenPropIsTruthy.js";
|
|
33
33
|
import { usePreviousValue } from "../../internal/usePreviousValue.js";
|
|
34
34
|
import { ModalPresence, ModalPresenceContext, useExclusiveModalPresenceContext } from "./ModalPresence.js";
|
|
35
|
-
import React, { cloneElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
36
35
|
import classNames from "classnames";
|
|
36
|
+
import React, { cloneElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
37
37
|
import PropTypes from "prop-types";
|
|
38
38
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
39
39
|
import { Close } from "@carbon/icons-react";
|
|
@@ -483,43 +483,143 @@ const ModalDialog = React.forwardRef(function ModalDialog({ "aria-label": ariaLa
|
|
|
483
483
|
});
|
|
484
484
|
});
|
|
485
485
|
Modal.propTypes = {
|
|
486
|
+
/**
|
|
487
|
+
* Specify whether the Modal is displaying an alert, error or warning
|
|
488
|
+
* Should go hand in hand with the danger prop.
|
|
489
|
+
*/
|
|
486
490
|
alert: PropTypes.bool,
|
|
491
|
+
/**
|
|
492
|
+
* Required props for the accessibility label of the header
|
|
493
|
+
*/
|
|
487
494
|
["aria-label"]: requiredIfGivenPropIsTruthy("hasScrollingContent", PropTypes.string),
|
|
495
|
+
/**
|
|
496
|
+
* Provide the contents of your Modal
|
|
497
|
+
*/
|
|
488
498
|
children: PropTypes.node,
|
|
499
|
+
/**
|
|
500
|
+
* Specify an optional className to be applied to the modal root node
|
|
501
|
+
*/
|
|
489
502
|
className: PropTypes.string,
|
|
503
|
+
/**
|
|
504
|
+
* Specify label for the close button of the modal; defaults to close
|
|
505
|
+
*/
|
|
490
506
|
closeButtonLabel: PropTypes.string,
|
|
507
|
+
/**
|
|
508
|
+
* Specify whether the Modal is for dangerous actions
|
|
509
|
+
*/
|
|
491
510
|
danger: PropTypes.bool,
|
|
511
|
+
/**
|
|
512
|
+
* Specify the message read by screen readers for the danger primary button.
|
|
513
|
+
* Defaults to an empty string; provide localized text to opt in.
|
|
514
|
+
*/
|
|
492
515
|
dangerDescription: PropTypes.string,
|
|
516
|
+
/**
|
|
517
|
+
* **Experimental**: Provide a decorator component to be rendered inside the `Modal` component
|
|
518
|
+
*/
|
|
493
519
|
decorator: PropTypes.node,
|
|
520
|
+
/**
|
|
521
|
+
* Specify whether the modal contains scrolling content
|
|
522
|
+
*/
|
|
494
523
|
hasScrollingContent: PropTypes.bool,
|
|
524
|
+
/**
|
|
525
|
+
* Specify the DOM element ID of the top-level node.
|
|
526
|
+
*/
|
|
495
527
|
id: PropTypes.string,
|
|
528
|
+
/**
|
|
529
|
+
* Specify whether or not the Modal content should have any inner padding.
|
|
530
|
+
*/
|
|
496
531
|
isFullWidth: PropTypes.bool,
|
|
532
|
+
/**
|
|
533
|
+
* Provide a ref to return focus to once the modal is closed.
|
|
534
|
+
*/
|
|
497
535
|
launcherButtonRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.oneOfType([typeof HTMLElement !== "undefined" ? PropTypes.instanceOf(HTMLElement) : PropTypes.any, PropTypes.oneOf([null])]).isRequired })]),
|
|
536
|
+
/**
|
|
537
|
+
* Specify the description for the loading text
|
|
538
|
+
*/
|
|
498
539
|
loadingDescription: PropTypes.string,
|
|
540
|
+
/**
|
|
541
|
+
* Specify the description for the loading text
|
|
542
|
+
*/
|
|
499
543
|
loadingIconDescription: PropTypes.string,
|
|
544
|
+
/**
|
|
545
|
+
* loading status
|
|
546
|
+
*/
|
|
500
547
|
loadingStatus: PropTypes.oneOf([
|
|
501
548
|
"inactive",
|
|
502
549
|
"active",
|
|
503
550
|
"finished",
|
|
504
551
|
"error"
|
|
505
552
|
]),
|
|
553
|
+
/**
|
|
554
|
+
* Specify a label to be read by screen readers on the modal root node
|
|
555
|
+
*/
|
|
506
556
|
modalAriaLabel: PropTypes.string,
|
|
557
|
+
/**
|
|
558
|
+
* Specify the content of the modal header title.
|
|
559
|
+
*/
|
|
507
560
|
modalHeading: PropTypes.node,
|
|
561
|
+
/**
|
|
562
|
+
* Specify the content of the modal header label.
|
|
563
|
+
*/
|
|
508
564
|
modalLabel: PropTypes.node,
|
|
565
|
+
/**
|
|
566
|
+
* Specify a handler for keypresses.
|
|
567
|
+
*/
|
|
509
568
|
onKeyDown: PropTypes.func,
|
|
569
|
+
/**
|
|
570
|
+
* Provide an optional handler to be invoked when loading is
|
|
571
|
+
* successful
|
|
572
|
+
*/
|
|
510
573
|
onLoadingSuccess: PropTypes.func,
|
|
574
|
+
/**
|
|
575
|
+
* Specify a handler for closing modal.
|
|
576
|
+
* The handler should care of closing modal, e.g. changing `open` prop.
|
|
577
|
+
*/
|
|
511
578
|
onRequestClose: PropTypes.func,
|
|
579
|
+
/**
|
|
580
|
+
* Specify a handler for "submitting" modal.
|
|
581
|
+
* The handler should care of closing modal, e.g. changing `open` prop, if necessary.
|
|
582
|
+
*/
|
|
512
583
|
onRequestSubmit: PropTypes.func,
|
|
584
|
+
/**
|
|
585
|
+
* Specify a handler for the secondary button.
|
|
586
|
+
* Useful if separate handler from `onRequestClose` is desirable
|
|
587
|
+
*/
|
|
513
588
|
onSecondarySubmit: PropTypes.func,
|
|
589
|
+
/**
|
|
590
|
+
* Specify whether the Modal is currently open
|
|
591
|
+
*/
|
|
514
592
|
open: PropTypes.bool,
|
|
593
|
+
/**
|
|
594
|
+
* Specify whether the modal should be button-less
|
|
595
|
+
*/
|
|
515
596
|
passiveModal: PropTypes.bool,
|
|
597
|
+
/**
|
|
598
|
+
* Prevent closing on click outside of modal
|
|
599
|
+
*/
|
|
516
600
|
preventCloseOnClickOutside: (props, propName) => {
|
|
517
|
-
if (!props.passiveModal && props[propName] === false) return new Error(invalidOutsideClickMessage);
|
|
601
|
+
if (!props.passiveModal && props[propName] === false) return /* @__PURE__ */ new Error(invalidOutsideClickMessage);
|
|
518
602
|
return null;
|
|
519
603
|
},
|
|
604
|
+
/**
|
|
605
|
+
* Specify whether the Button should be disabled, or not
|
|
606
|
+
*/
|
|
520
607
|
primaryButtonDisabled: PropTypes.bool,
|
|
608
|
+
/**
|
|
609
|
+
* Specify the text for the primary button
|
|
610
|
+
*/
|
|
521
611
|
primaryButtonText: PropTypes.node,
|
|
612
|
+
/**
|
|
613
|
+
* Specify the text for the secondary button
|
|
614
|
+
*/
|
|
522
615
|
secondaryButtonText: PropTypes.node,
|
|
616
|
+
/**
|
|
617
|
+
* Specify an array of config objects for secondary buttons
|
|
618
|
+
* (`Array<{
|
|
619
|
+
* buttonText: string,
|
|
620
|
+
* onClick: function,
|
|
621
|
+
* }>`).
|
|
622
|
+
*/
|
|
523
623
|
secondaryButtons: (props, propName, componentName) => {
|
|
524
624
|
if (props.secondaryButtons) {
|
|
525
625
|
if (!Array.isArray(props.secondaryButtons) || props.secondaryButtons.length !== 2) return /* @__PURE__ */ new Error(`${propName} needs to be an array of two button config objects`);
|
|
@@ -533,9 +633,23 @@ Modal.propTypes = {
|
|
|
533
633
|
}
|
|
534
634
|
return null;
|
|
535
635
|
},
|
|
636
|
+
/**
|
|
637
|
+
* Specify a CSS selector that matches the DOM element that should
|
|
638
|
+
* be focused when the Modal opens
|
|
639
|
+
*/
|
|
536
640
|
selectorPrimaryFocus: PropTypes.string,
|
|
641
|
+
/**
|
|
642
|
+
* Specify CSS selectors that match DOM elements working as floating menus.
|
|
643
|
+
* Focusing on those elements won't trigger "focus-wrap" behavior
|
|
644
|
+
*/
|
|
537
645
|
selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string.isRequired),
|
|
646
|
+
/**
|
|
647
|
+
* Specify if Enter key should be used as "submit" action
|
|
648
|
+
*/
|
|
538
649
|
shouldSubmitOnEnter: PropTypes.bool,
|
|
650
|
+
/**
|
|
651
|
+
* Specify the size variant.
|
|
652
|
+
*/
|
|
539
653
|
size: PropTypes.oneOf(ModalSizes),
|
|
540
654
|
slug: deprecate(PropTypes.node, "The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.")
|
|
541
655
|
};
|
|
@@ -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
|
-
import { warning } from "../../internal/warning.js";
|
|
10
8
|
import { Escape } from "../../internal/keyboard/keys.js";
|
|
11
9
|
import { match } from "../../internal/keyboard/match.js";
|
|
10
|
+
import { noopFn } from "../../internal/noopFn.js";
|
|
11
|
+
import { warning } from "../../internal/warning.js";
|
|
12
12
|
import { ButtonKinds } from "../Button/Button.js";
|
|
13
13
|
import Button_default from "../Button/index.js";
|
|
14
14
|
import Modal_default from "../Modal/index.js";
|
|
@@ -28,8 +28,8 @@ import { sortingPropTypes } from "./MultiSelectPropTypes.js";
|
|
|
28
28
|
import { isSelectAllItem } from "./tools/isSelectAllItem.js";
|
|
29
29
|
import { defaultCompareItems, defaultSortItems } from "./tools/sorting.js";
|
|
30
30
|
import { useSelection } from "../../internal/Selection.js";
|
|
31
|
-
import { cloneElement, forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
32
31
|
import classNames from "classnames";
|
|
32
|
+
import { cloneElement, forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
33
33
|
import PropTypes from "prop-types";
|
|
34
34
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
35
35
|
import { WarningAltFilled, WarningFilled } from "@carbon/icons-react";
|
|
@@ -571,45 +571,173 @@ const FilterableMultiSelect = forwardRef(function FilterableMultiSelect({ autoAl
|
|
|
571
571
|
});
|
|
572
572
|
FilterableMultiSelect.displayName = "FilterableMultiSelect";
|
|
573
573
|
FilterableMultiSelect.propTypes = {
|
|
574
|
+
/**
|
|
575
|
+
* Deprecated, aria-label is no longer needed
|
|
576
|
+
* Specify a label to be read by screen readers on the container node
|
|
577
|
+
*/
|
|
574
578
|
["aria-label"]: deprecate(PropTypes.string, "ariaLabel / aria-label props are no longer required for FilterableMultiSelect"),
|
|
579
|
+
/**
|
|
580
|
+
* Deprecated, please use `aria-label` instead.
|
|
581
|
+
* Specify a label to be read by screen readers on the container note.
|
|
582
|
+
*/
|
|
575
583
|
ariaLabel: deprecate(PropTypes.string, "ariaLabel / aria-label props are no longer required for FilterableMultiSelect"),
|
|
584
|
+
/**
|
|
585
|
+
* **Experimental**: Will attempt to automatically align the floating
|
|
586
|
+
* element to avoid collisions with the viewport and being clipped by
|
|
587
|
+
* ancestor elements. Requires React v17+
|
|
588
|
+
* @see https://github.com/carbon-design-system/carbon/issues/18714
|
|
589
|
+
*/
|
|
576
590
|
autoAlign: PropTypes.bool,
|
|
591
|
+
/**
|
|
592
|
+
* Specify the text that should be read for screen readers that describes total items selected
|
|
593
|
+
*/
|
|
577
594
|
clearSelectionDescription: PropTypes.string,
|
|
595
|
+
/**
|
|
596
|
+
* Specify the text that should be read for screen readers to clear selection.
|
|
597
|
+
*/
|
|
578
598
|
clearSelectionText: PropTypes.string,
|
|
599
|
+
/**
|
|
600
|
+
* **Experimental**: Provide a decorator component to be rendered inside the `FilterableMultiSelect` component
|
|
601
|
+
*/
|
|
579
602
|
decorator: PropTypes.node,
|
|
603
|
+
/**
|
|
604
|
+
* Provide a method that filters the dropdown options based on the current input. Overriding this
|
|
605
|
+
* prop means that you have to handle the filtering logic when the user types in the text input.
|
|
606
|
+
* Otherwise, a default built-in filtering function will be used.
|
|
607
|
+
*/
|
|
580
608
|
filterItems: PropTypes.func,
|
|
609
|
+
/**
|
|
610
|
+
* Specify the direction of the multiselect dropdown. Can be either top or bottom.
|
|
611
|
+
*/
|
|
581
612
|
direction: PropTypes.oneOf(["top", "bottom"]),
|
|
613
|
+
/**
|
|
614
|
+
* Disable the control
|
|
615
|
+
*/
|
|
582
616
|
disabled: PropTypes.bool,
|
|
617
|
+
/**
|
|
618
|
+
* Additional props passed to Downshift.
|
|
619
|
+
*
|
|
620
|
+
* **Use with caution:** anything you define here overrides the components'
|
|
621
|
+
* internal handling of that prop. Downshift APIs and internals are subject to
|
|
622
|
+
* change, and in some cases they can not be shimmed by Carbon to shield you
|
|
623
|
+
* from potentially breaking changes.
|
|
624
|
+
*/
|
|
583
625
|
downshiftProps: PropTypes.shape(Downshift.propTypes),
|
|
626
|
+
/**
|
|
627
|
+
* Specify whether the title text should be hidden or not
|
|
628
|
+
*/
|
|
584
629
|
hideLabel: PropTypes.bool,
|
|
630
|
+
/**
|
|
631
|
+
* Specify a custom `id`
|
|
632
|
+
*/
|
|
585
633
|
id: PropTypes.string.isRequired,
|
|
634
|
+
/**
|
|
635
|
+
* Allow users to pass in arbitrary items from their collection that are
|
|
636
|
+
* pre-selected
|
|
637
|
+
*/
|
|
586
638
|
initialSelectedItems: PropTypes.array,
|
|
639
|
+
/**
|
|
640
|
+
* Is the current selection invalid?
|
|
641
|
+
*/
|
|
587
642
|
invalid: PropTypes.bool,
|
|
643
|
+
/**
|
|
644
|
+
* If invalid, what is the error?
|
|
645
|
+
*/
|
|
588
646
|
invalidText: PropTypes.node,
|
|
647
|
+
/**
|
|
648
|
+
* Function to render items as custom components instead of strings.
|
|
649
|
+
* Defaults to null and is overridden by a getter
|
|
650
|
+
*/
|
|
589
651
|
itemToElement: PropTypes.func,
|
|
652
|
+
/**
|
|
653
|
+
* Helper function passed to downshift that allows the library to render a
|
|
654
|
+
* given item to a string label. By default, it extracts the `label` field
|
|
655
|
+
* from a given item to serve as the item label in the list.
|
|
656
|
+
*/
|
|
590
657
|
itemToString: PropTypes.func,
|
|
658
|
+
/**
|
|
659
|
+
* We try to stay as generic as possible here to allow individuals to pass
|
|
660
|
+
* in a collection of whatever kind of data structure they prefer
|
|
661
|
+
*/
|
|
591
662
|
items: PropTypes.array.isRequired,
|
|
663
|
+
/**
|
|
664
|
+
* `true` to use the light version.
|
|
665
|
+
*/
|
|
592
666
|
light: deprecate(PropTypes.bool, "The `light` prop for `FilterableMultiSelect` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),
|
|
667
|
+
/**
|
|
668
|
+
* Specify the locale of the control. Used for the default `compareItems`
|
|
669
|
+
* used for sorting the list of items in the control.
|
|
670
|
+
*/
|
|
593
671
|
locale: PropTypes.string,
|
|
672
|
+
/**
|
|
673
|
+
* `onChange` is a utility for this controlled component to communicate to a
|
|
674
|
+
* consuming component what kind of internal state changes are occurring.
|
|
675
|
+
*/
|
|
594
676
|
onChange: PropTypes.func,
|
|
677
|
+
/**
|
|
678
|
+
* `onInputValueChange` is a utility for this controlled component to communicate to
|
|
679
|
+
* the currently typed input.
|
|
680
|
+
*/
|
|
595
681
|
onInputValueChange: PropTypes.func,
|
|
682
|
+
/**
|
|
683
|
+
* `onMenuChange` is a utility for this controlled component to communicate to a
|
|
684
|
+
* consuming component that the menu was opened(`true`)/closed(`false`).
|
|
685
|
+
*/
|
|
596
686
|
onMenuChange: PropTypes.func,
|
|
687
|
+
/**
|
|
688
|
+
* Initialize the component with an open(`true`)/closed(`false`) menu.
|
|
689
|
+
*/
|
|
597
690
|
open: PropTypes.bool,
|
|
691
|
+
/**
|
|
692
|
+
* Generic `placeholder` that will be used as the textual representation of
|
|
693
|
+
* what this field is for
|
|
694
|
+
*/
|
|
598
695
|
placeholder: PropTypes.string,
|
|
696
|
+
/**
|
|
697
|
+
* Specify feedback (mode) of the selection.
|
|
698
|
+
* `top`: selected item jumps to top
|
|
699
|
+
* `fixed`: selected item stays at it's position
|
|
700
|
+
* `top-after-reopen`: selected item jump to top after reopen dropdown
|
|
701
|
+
*/
|
|
599
702
|
selectionFeedback: PropTypes.oneOf([
|
|
600
703
|
"top",
|
|
601
704
|
"fixed",
|
|
602
705
|
"top-after-reopen"
|
|
603
706
|
]),
|
|
707
|
+
/**
|
|
708
|
+
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
709
|
+
*/
|
|
604
710
|
size: ListBoxSizePropType,
|
|
605
711
|
slug: deprecate(PropTypes.node, "The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),
|
|
606
712
|
...sortingPropTypes,
|
|
713
|
+
/**
|
|
714
|
+
* Provide text to be used in a `<label>` element that is tied to the
|
|
715
|
+
* combobox via ARIA attributes.
|
|
716
|
+
*/
|
|
607
717
|
titleText: PropTypes.node,
|
|
718
|
+
/**
|
|
719
|
+
* Translates component strings using your i18n tool.
|
|
720
|
+
*/
|
|
608
721
|
translateWithId: PropTypes.func,
|
|
609
722
|
type: ListBoxTypePropType,
|
|
723
|
+
/**
|
|
724
|
+
* Specify title to show title on hover
|
|
725
|
+
*/
|
|
610
726
|
useTitleInItem: PropTypes.bool,
|
|
727
|
+
/**
|
|
728
|
+
* Specify whether the control is currently in warning state
|
|
729
|
+
*/
|
|
611
730
|
warn: PropTypes.bool,
|
|
731
|
+
/**
|
|
732
|
+
* Provide the text that is displayed when the control is in warning state
|
|
733
|
+
*/
|
|
612
734
|
warnText: PropTypes.node,
|
|
735
|
+
/**
|
|
736
|
+
* Specify native input attributes to place on the `<input>`, like maxLength.
|
|
737
|
+
* These are passed to downshift's getInputProps() and will override the
|
|
738
|
+
* internal input props.
|
|
739
|
+
* https://github.com/downshift-js/downshift?tab=readme-ov-file#getinputprops
|
|
740
|
+
*/
|
|
613
741
|
inputProps: PropTypes.object
|
|
614
742
|
};
|
|
615
743
|
//#endregion
|