@carbon/react 1.86.0 → 1.87.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 +871 -871
- package/es/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/es/components/Button/Button.Skeleton.js +2 -1
- package/es/components/Button/Button.d.ts +1 -1
- package/es/components/Button/Button.js +3 -3
- package/es/components/Button/ButtonBase.js +2 -0
- package/es/components/Button/index.js +5 -1
- package/es/components/ButtonSet/index.js +4 -1
- package/es/components/Checkbox/index.js +4 -1
- package/es/components/CodeSnippet/CodeSnippet.js +1 -0
- package/es/components/ComboBox/ComboBox.d.ts +7 -0
- package/es/components/ComboBox/ComboBox.js +11 -2
- package/es/components/ComboBox/index.js +4 -1
- package/es/components/ComposedModal/ComposedModal.js +18 -8
- package/es/components/ContainedList/ContainedList.d.ts +1 -1
- package/es/components/ContainedList/ContainedList.js +3 -3
- package/es/components/ContainedList/ContainedListItem/index.js +4 -1
- package/es/components/ContainedList/index.js +2 -2
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/Copy/index.js +4 -1
- package/es/components/CopyButton/index.js +4 -1
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/es/components/DataTable/state/getDerivedStateFromProps.js +1 -2
- package/es/components/DataTable/state/sorting.d.ts +15 -0
- package/es/components/DataTable/state/sorting.js +1 -2
- package/es/components/DataTable/tools/denormalize.d.ts +22 -0
- package/es/components/DataTable/tools/denormalize.js +1 -2
- package/es/components/DataTable/tools/normalize.d.ts +9 -0
- package/es/components/DataTable/tools/normalize.js +1 -2
- package/es/components/DatePicker/DatePicker.js +18 -11
- package/es/components/DatePicker/index.js +4 -1
- package/es/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/es/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/es/components/DatePickerInput/DatePickerInput.js +6 -0
- package/es/components/DatePickerInput/index.js +4 -1
- package/es/components/Dialog/index.js +2 -2
- package/es/components/Dropdown/Dropdown.Skeleton.js +4 -4
- package/es/components/Dropdown/Dropdown.js +2 -2
- package/es/components/Dropdown/index.js +4 -1
- package/es/components/FeatureFlags/index.js +2 -2
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +3 -2
- package/es/components/FluidNumberInput/FluidNumberInput.js +3 -2
- package/es/components/FluidSelect/index.js +4 -1
- package/es/components/FluidTextInput/index.js +4 -1
- package/es/components/IconButton/index.d.ts +1 -1
- package/es/components/IconIndicator/index.js +1 -1
- package/es/components/InlineCheckbox/index.js +4 -1
- package/es/components/InlineLoading/index.js +4 -1
- package/es/components/LayoutDirection/LayoutDirection.js +1 -2
- package/es/components/Link/index.js +4 -1
- package/es/components/ListBox/ListBox.js +1 -1
- package/es/components/Loading/index.js +4 -1
- package/es/components/Menu/Menu.d.ts +3 -1
- package/es/components/Menu/Menu.js +3 -1
- package/es/components/Menu/MenuItem.js +1 -1
- package/es/components/Modal/Modal.js +16 -5
- package/es/components/Modal/index.js +4 -1
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +7 -0
- package/es/components/MultiSelect/FilterableMultiSelect.js +20 -10
- package/es/components/MultiSelect/MultiSelect.js +2 -2
- package/es/components/MultiSelect/filter.js +0 -4
- package/es/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/es/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/es/components/Notification/Notification.js +2 -2
- package/es/components/NumberInput/NumberInput.d.ts +3 -2
- package/es/components/NumberInput/NumberInput.js +5 -4
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/OverflowMenuItem/index.js +4 -1
- package/es/components/OverflowMenuV2/index.d.ts +1 -0
- package/es/components/PageHeader/PageHeader.js +1 -1
- package/es/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/es/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/es/components/Pagination/experimental/index.d.ts +3 -0
- package/es/components/Popover/index.js +26 -8
- package/es/components/RadioButton/index.js +4 -1
- package/es/components/RadioTile/index.js +4 -1
- package/es/components/Search/Search.js +1 -1
- package/es/components/Search/index.js +4 -1
- package/es/components/Select/index.js +4 -1
- package/es/components/SelectItem/index.js +4 -1
- package/es/components/ShapeIndicator/index.js +1 -1
- package/es/components/SkeletonText/index.js +4 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/Switch/IconSwitch.d.ts +3 -0
- package/es/components/Switch/IconSwitch.js +1 -2
- package/es/components/TabContent/TabContent.js +2 -22
- package/es/components/Tabs/Tabs.js +5 -5
- package/es/components/Tag/DismissibleTag.js +1 -1
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/TextArea/index.js +4 -1
- package/es/components/TextInput/index.js +4 -1
- package/es/components/TextInput/util.d.ts +9 -0
- package/es/components/Toggletip/index.d.ts +1 -1
- package/es/components/Toggletip/index.js +3 -3
- package/es/components/UIShell/HeaderMenu.js +2 -2
- package/es/components/UIShell/SideNav.js +1 -1
- package/es/components/UIShell/_utils.d.ts +7 -0
- package/es/feature-flags.d.ts +1 -0
- package/es/internal/FloatingMenu.js +1 -1
- package/es/internal/deprecateFieldOnObject.js +1 -1
- package/es/internal/useEvent.d.ts +2 -2
- package/es/internal/useEvent.js +4 -3
- package/es/internal/useId.d.ts +21 -0
- package/es/internal/useId.js +27 -1
- package/es/internal/useOverflowItems.js +0 -6
- package/es/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -1
- package/es/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -1
- package/es/prop-types/deprecateComponent.d.ts +1 -0
- package/es/prop-types/deprecateComponent.js +1 -4
- package/es/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/es/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/es/tools/mergeRefs.d.ts +12 -0
- package/es/tools/mergeRefs.js +1 -2
- package/icons/index.js +1 -3
- package/lib/_virtual/_rollupPluginBabelHelpers.js +5 -7
- package/lib/components/AILabel/index.js +35 -43
- package/lib/components/AISkeleton/AISkeletonIcon.js +5 -11
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -10
- package/lib/components/AISkeleton/AISkeletonText.js +8 -14
- package/lib/components/Accordion/Accordion.Skeleton.js +21 -27
- package/lib/components/Accordion/Accordion.js +11 -17
- package/lib/components/Accordion/AccordionItem.js +19 -25
- package/lib/components/Accordion/AccordionProvider.js +1 -7
- package/lib/components/AspectRatio/AspectRatio.js +7 -13
- package/lib/components/BadgeIndicator/index.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.js +9 -15
- package/lib/components/Breadcrumb/BreadcrumbItem.js +16 -22
- package/lib/components/Button/Button.Skeleton.js +9 -14
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.js +32 -37
- package/lib/components/Button/ButtonBase.js +8 -11
- package/lib/components/Button/index.js +3 -3
- package/lib/components/ButtonSet/ButtonSet.js +6 -12
- package/lib/components/ButtonSet/index.js +2 -2
- package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -11
- package/lib/components/ChatButton/ChatButton.js +12 -18
- package/lib/components/Checkbox/Checkbox.Skeleton.js +6 -12
- package/lib/components/Checkbox/Checkbox.js +33 -39
- package/lib/components/Checkbox/index.js +3 -3
- package/lib/components/CheckboxGroup/CheckboxGroup.js +24 -30
- package/lib/components/ClassPrefix/index.js +3 -10
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +10 -16
- package/lib/components/CodeSnippet/CodeSnippet.js +40 -46
- package/lib/components/ComboBox/ComboBox.d.ts +7 -0
- package/lib/components/ComboBox/ComboBox.js +65 -63
- package/lib/components/ComboBox/index.js +2 -2
- package/lib/components/ComboButton/index.js +20 -28
- package/lib/components/ComposedModal/ComposedModal.js +61 -57
- package/lib/components/ComposedModal/ModalFooter.js +37 -45
- package/lib/components/ComposedModal/ModalHeader.js +23 -31
- package/lib/components/ContainedList/ContainedList.d.ts +1 -1
- package/lib/components/ContainedList/ContainedList.js +19 -25
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +14 -20
- package/lib/components/ContainedList/ContainedListItem/index.js +2 -2
- package/lib/components/ContainedList/index.js +5 -5
- package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -19
- package/lib/components/ContextMenu/useContextMenu.js +1 -1
- package/lib/components/Copy/Copy.js +12 -18
- package/lib/components/Copy/index.js +2 -2
- package/lib/components/CopyButton/CopyButton.js +12 -18
- package/lib/components/CopyButton/index.js +2 -2
- package/lib/components/DangerButton/DangerButton.js +2 -6
- package/lib/components/DataTable/DataTable.js +48 -55
- package/lib/components/DataTable/Table.js +18 -24
- package/lib/components/DataTable/TableActionList.js +2 -2
- package/lib/components/DataTable/TableBatchAction.js +4 -9
- package/lib/components/DataTable/TableBatchActions.js +19 -25
- package/lib/components/DataTable/TableBody.js +5 -10
- package/lib/components/DataTable/TableCell.js +8 -14
- package/lib/components/DataTable/TableContainer.js +14 -20
- package/lib/components/DataTable/TableContext.js +0 -2
- package/lib/components/DataTable/TableDecoratorRow.js +5 -11
- package/lib/components/DataTable/TableExpandHeader.js +16 -22
- package/lib/components/DataTable/TableExpandRow.js +20 -26
- package/lib/components/DataTable/TableExpandedRow.js +8 -14
- package/lib/components/DataTable/TableHead.js +2 -2
- package/lib/components/DataTable/TableHeader.js +26 -32
- package/lib/components/DataTable/TableRow.js +8 -14
- package/lib/components/DataTable/TableSelectAll.js +13 -19
- package/lib/components/DataTable/TableSelectRow.js +15 -21
- package/lib/components/DataTable/TableSlugRow.js +7 -13
- package/lib/components/DataTable/TableToolbar.js +7 -13
- package/lib/components/DataTable/TableToolbarAction.js +5 -10
- package/lib/components/DataTable/TableToolbarContent.js +2 -2
- package/lib/components/DataTable/TableToolbarMenu.js +9 -15
- package/lib/components/DataTable/TableToolbarSearch.js +22 -28
- package/lib/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +2 -3
- package/lib/components/DataTable/state/sortStates.js +0 -2
- package/lib/components/DataTable/state/sorting.d.ts +15 -0
- package/lib/components/DataTable/state/sorting.js +0 -2
- package/lib/components/DataTable/tools/cells.js +0 -2
- package/lib/components/DataTable/tools/denormalize.d.ts +22 -0
- package/lib/components/DataTable/tools/denormalize.js +1 -2
- package/lib/components/DataTable/tools/filter.js +0 -2
- package/lib/components/DataTable/tools/normalize.d.ts +9 -0
- package/lib/components/DataTable/tools/normalize.js +1 -2
- package/lib/components/DataTable/tools/sorting.js +0 -2
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +25 -31
- package/lib/components/DatePicker/DatePicker.Skeleton.js +14 -20
- package/lib/components/DatePicker/DatePicker.js +65 -66
- package/lib/components/DatePicker/index.js +3 -3
- package/lib/components/DatePicker/plugins/appendToPlugin.js +0 -2
- package/lib/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/lib/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -6
- package/lib/components/DatePickerInput/DatePickerInput.js +49 -49
- package/lib/components/DatePickerInput/index.js +2 -2
- package/lib/components/Dialog/index.js +72 -80
- package/lib/components/Dropdown/Dropdown.Skeleton.js +10 -16
- package/lib/components/Dropdown/Dropdown.js +49 -55
- package/lib/components/Dropdown/index.js +3 -3
- package/lib/components/ErrorBoundary/ErrorBoundary.js +4 -9
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +6 -11
- package/lib/components/FeatureFlags/index.js +10 -17
- package/lib/components/FileUploader/FileUploader.Skeleton.js +7 -13
- package/lib/components/FileUploader/FileUploader.js +30 -36
- package/lib/components/FileUploader/FileUploaderButton.js +19 -25
- package/lib/components/FileUploader/FileUploaderDropContainer.js +18 -24
- package/lib/components/FileUploader/FileUploaderItem.js +23 -29
- package/lib/components/FileUploader/Filename.js +13 -18
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +7 -13
- package/lib/components/FluidComboBox/FluidComboBox.js +24 -30
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +14 -20
- package/lib/components/FluidDatePicker/FluidDatePicker.js +12 -18
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +4 -8
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +7 -13
- package/lib/components/FluidDropdown/FluidDropdown.js +24 -30
- package/lib/components/FluidForm/FluidForm.js +6 -12
- package/lib/components/FluidForm/FormContext.js +0 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +7 -13
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +36 -42
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +7 -13
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +3 -2
- package/lib/components/FluidNumberInput/FluidNumberInput.js +33 -38
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +7 -13
- package/lib/components/FluidSearch/FluidSearch.js +19 -25
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +7 -13
- package/lib/components/FluidSelect/FluidSelect.js +17 -23
- package/lib/components/FluidSelect/index.js +3 -3
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +7 -13
- package/lib/components/FluidTextArea/FluidTextArea.js +25 -31
- package/lib/components/FluidTextInput/FluidPasswordInput.js +18 -22
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +7 -13
- package/lib/components/FluidTextInput/FluidTextInput.js +23 -29
- package/lib/components/FluidTextInput/index.js +3 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +6 -12
- package/lib/components/FluidTimePicker/FluidTimePicker.js +23 -29
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +10 -15
- package/lib/components/Form/Form.js +5 -11
- package/lib/components/FormGroup/FormGroup.js +13 -19
- package/lib/components/FormItem/FormItem.js +5 -11
- package/lib/components/FormLabel/FormLabel.js +6 -12
- package/lib/components/Grid/CSSGrid.js +20 -28
- package/lib/components/Grid/Column.js +31 -37
- package/lib/components/Grid/ColumnHang.js +5 -13
- package/lib/components/Grid/FlexGrid.js +10 -18
- package/lib/components/Grid/Grid.js +9 -16
- package/lib/components/Grid/GridContext.js +7 -14
- package/lib/components/Grid/Row.js +8 -14
- package/lib/components/Heading/index.js +14 -21
- package/lib/components/Icon/Icon.Skeleton.js +4 -10
- package/lib/components/IconButton/index.d.ts +1 -1
- package/lib/components/IconButton/index.js +25 -33
- package/lib/components/IconIndicator/index.js +9 -15
- package/lib/components/IdPrefix/index.js +3 -10
- package/lib/components/InlineCheckbox/InlineCheckbox.js +17 -22
- package/lib/components/InlineCheckbox/index.js +2 -2
- package/lib/components/InlineLoading/InlineLoading.js +17 -23
- package/lib/components/InlineLoading/index.js +2 -2
- package/lib/components/Layer/LayerContext.js +1 -7
- package/lib/components/Layer/LayerLevel.js +0 -2
- package/lib/components/Layer/index.js +11 -19
- package/lib/components/Layout/index.js +22 -30
- package/lib/components/LayoutDirection/LayoutDirection.js +6 -13
- package/lib/components/LayoutDirection/LayoutDirectionContext.js +1 -7
- package/lib/components/LayoutDirection/useLayoutDirection.js +0 -2
- package/lib/components/Link/Link.js +15 -21
- package/lib/components/Link/index.js +2 -2
- package/lib/components/ListBox/ListBox.js +17 -23
- package/lib/components/ListBox/ListBoxField.js +7 -12
- package/lib/components/ListBox/ListBoxMenu.js +7 -12
- package/lib/components/ListBox/ListBoxMenuIcon.js +7 -13
- package/lib/components/ListBox/ListBoxMenuItem.js +9 -15
- package/lib/components/ListBox/ListBoxPropTypes.js +2 -8
- package/lib/components/ListBox/ListBoxSelection.js +14 -20
- package/lib/components/ListBox/index.js +7 -7
- package/lib/components/ListBox/next/ListBoxSelection.js +18 -24
- package/lib/components/ListBox/next/ListBoxTrigger.js +7 -13
- package/lib/components/ListItem/ListItem.js +5 -11
- package/lib/components/Loading/Loading.js +14 -20
- package/lib/components/Loading/index.js +2 -2
- package/lib/components/Menu/Menu.d.ts +3 -1
- package/lib/components/Menu/Menu.js +18 -24
- package/lib/components/Menu/MenuContext.js +0 -2
- package/lib/components/Menu/MenuItem.js +44 -52
- package/lib/components/MenuButton/index.js +16 -24
- package/lib/components/Modal/Modal.js +91 -86
- package/lib/components/Modal/index.js +2 -2
- package/lib/components/ModalWrapper/ModalWrapper.js +30 -35
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +7 -0
- package/lib/components/MultiSelect/FilterableMultiSelect.js +71 -71
- package/lib/components/MultiSelect/MultiSelect.js +61 -70
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +2 -8
- package/lib/components/MultiSelect/filter.js +0 -6
- package/lib/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/lib/components/MultiSelect/tools/itemToString.js +1 -7
- package/lib/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/lib/components/MultiSelect/tools/sorting.js +0 -2
- package/lib/components/Notification/Notification.js +118 -126
- package/lib/components/NumberInput/NumberFormatPropTypes.js +21 -27
- package/lib/components/NumberInput/NumberInput.Skeleton.js +8 -14
- package/lib/components/NumberInput/NumberInput.d.ts +3 -2
- package/lib/components/NumberInput/NumberInput.js +70 -77
- package/lib/components/OrderedList/OrderedList.js +8 -14
- package/lib/components/OverflowMenu/OverflowMenu.js +42 -49
- package/lib/components/OverflowMenu/index.js +3 -7
- package/lib/components/OverflowMenu/next/index.js +18 -26
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +27 -33
- package/lib/components/OverflowMenuItem/index.js +2 -2
- package/lib/components/OverflowMenuV2/index.d.ts +1 -0
- package/lib/components/OverflowMenuV2/index.js +2 -8
- package/lib/components/PageHeader/PageHeader.js +70 -78
- package/lib/components/PageHeader/index.js +0 -2
- package/lib/components/Pagination/Pagination.Skeleton.js +10 -16
- package/lib/components/Pagination/Pagination.js +44 -51
- package/lib/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/lib/components/Pagination/experimental/PageSelector.js +9 -15
- package/lib/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/lib/components/Pagination/experimental/Pagination.js +34 -40
- package/lib/components/Pagination/experimental/index.d.ts +3 -0
- package/lib/components/PaginationNav/PaginationNav.js +54 -60
- package/lib/components/Popover/index.js +60 -50
- package/lib/components/PrimaryButton/PrimaryButton.js +2 -6
- package/lib/components/ProgressBar/ProgressBar.js +25 -31
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +10 -16
- package/lib/components/ProgressIndicator/ProgressIndicator.js +41 -49
- package/lib/components/RadioButton/RadioButton.Skeleton.js +6 -12
- package/lib/components/RadioButton/RadioButton.js +26 -32
- package/lib/components/RadioButton/index.js +2 -2
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +37 -43
- package/lib/components/RadioTile/RadioTile.js +25 -31
- package/lib/components/RadioTile/index.js +2 -2
- package/lib/components/Search/Search.Skeleton.js +7 -13
- package/lib/components/Search/Search.js +33 -39
- package/lib/components/Search/index.js +3 -3
- package/lib/components/SecondaryButton/SecondaryButton.js +2 -6
- package/lib/components/Select/Select.Skeleton.js +8 -14
- package/lib/components/Select/Select.js +42 -48
- package/lib/components/Select/index.js +3 -3
- package/lib/components/SelectItem/SelectItem.js +8 -14
- package/lib/components/SelectItem/index.js +2 -2
- package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -13
- package/lib/components/ShapeIndicator/index.js +12 -18
- package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -10
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -10
- package/lib/components/SkeletonText/SkeletonText.js +11 -17
- package/lib/components/SkeletonText/index.js +2 -2
- package/lib/components/Slider/Slider.Skeleton.js +29 -35
- package/lib/components/Slider/Slider.js +84 -90
- package/lib/components/Slider/SliderHandles.js +18 -24
- package/lib/components/Slider/index.js +3 -3
- package/lib/components/Stack/HStack.js +1 -7
- package/lib/components/Stack/Stack.js +7 -15
- package/lib/components/Stack/VStack.js +1 -7
- package/lib/components/StructuredList/StructuredList.Skeleton.js +15 -21
- package/lib/components/StructuredList/StructuredList.js +60 -68
- package/lib/components/Switch/IconSwitch.d.ts +3 -0
- package/lib/components/Switch/IconSwitch.js +18 -25
- package/lib/components/Switch/Switch.js +14 -20
- package/lib/components/TabContent/TabContent.js +7 -33
- package/lib/components/Tabs/Tabs.Skeleton.js +10 -16
- package/lib/components/Tabs/Tabs.js +121 -129
- package/lib/components/Tabs/usePressable.js +0 -2
- package/lib/components/Tag/DismissibleTag.js +24 -30
- package/lib/components/Tag/OperationalTag.js +16 -22
- package/lib/components/Tag/SelectableTag.js +19 -25
- package/lib/components/Tag/Tag.Skeleton.js +5 -11
- package/lib/components/Tag/Tag.js +28 -34
- package/lib/components/Tag/isEllipsisActive.js +0 -2
- package/lib/components/Text/Text.js +6 -13
- package/lib/components/Text/TextDirection.js +4 -11
- package/lib/components/Text/TextDirectionContext.js +0 -2
- package/lib/components/Text/createTextComponent.js +1 -7
- package/lib/components/Text/index.js +0 -2
- package/lib/components/TextArea/TextArea.Skeleton.js +7 -13
- package/lib/components/TextArea/TextArea.js +49 -55
- package/lib/components/TextArea/index.js +3 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +36 -42
- package/lib/components/TextInput/PasswordInput.js +48 -54
- package/lib/components/TextInput/TextInput.Skeleton.js +7 -13
- package/lib/components/TextInput/TextInput.js +47 -53
- package/lib/components/TextInput/index.js +3 -3
- package/lib/components/TextInput/util.d.ts +9 -0
- package/lib/components/TextInput/util.js +0 -2
- package/lib/components/Theme/index.js +16 -24
- package/lib/components/Tile/Tile.js +92 -100
- package/lib/components/TileGroup/TileGroup.js +15 -22
- package/lib/components/TimePicker/TimePicker.js +39 -45
- package/lib/components/TimePickerSelect/TimePickerSelect.js +10 -16
- package/lib/components/Toggle/Toggle.Skeleton.js +7 -13
- package/lib/components/Toggle/Toggle.js +28 -34
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +12 -20
- package/lib/components/Toggletip/index.d.ts +1 -1
- package/lib/components/Toggletip/index.js +33 -41
- package/lib/components/Tooltip/DefinitionTooltip.js +14 -22
- package/lib/components/Tooltip/Tooltip.js +19 -27
- package/lib/components/TreeView/TreeContext.js +0 -2
- package/lib/components/TreeView/TreeNode.js +41 -47
- package/lib/components/TreeView/TreeView.js +17 -23
- package/lib/components/UIShell/Content.js +6 -12
- package/lib/components/UIShell/Header.js +4 -10
- package/lib/components/UIShell/HeaderContainer.js +4 -9
- package/lib/components/UIShell/HeaderGlobalAction.js +11 -17
- package/lib/components/UIShell/HeaderGlobalBar.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +17 -23
- package/lib/components/UIShell/HeaderMenuButton.js +9 -15
- package/lib/components/UIShell/HeaderMenuItem.js +11 -17
- package/lib/components/UIShell/HeaderName.js +8 -14
- package/lib/components/UIShell/HeaderNavigation.js +6 -12
- package/lib/components/UIShell/HeaderPanel.js +11 -17
- package/lib/components/UIShell/HeaderSideNavItems.js +6 -12
- package/lib/components/UIShell/Link.js +6 -11
- package/lib/components/UIShell/SideNav.js +23 -29
- package/lib/components/UIShell/SideNavDetails.js +7 -13
- package/lib/components/UIShell/SideNavDivider.js +5 -11
- package/lib/components/UIShell/SideNavFooter.js +12 -18
- package/lib/components/UIShell/SideNavHeader.js +8 -14
- package/lib/components/UIShell/SideNavIcon.js +6 -12
- package/lib/components/UIShell/SideNavItem.js +6 -12
- package/lib/components/UIShell/SideNavItems.js +9 -15
- package/lib/components/UIShell/SideNavLink.js +13 -19
- package/lib/components/UIShell/SideNavLinkText.js +5 -11
- package/lib/components/UIShell/SideNavMenu.js +20 -26
- package/lib/components/UIShell/SideNavMenuItem.js +13 -19
- package/lib/components/UIShell/SideNavSwitcher.js +13 -19
- package/lib/components/UIShell/SkipToContent.js +7 -13
- package/lib/components/UIShell/Switcher.js +9 -15
- package/lib/components/UIShell/SwitcherDivider.js +4 -10
- package/lib/components/UIShell/SwitcherItem.js +15 -21
- package/lib/components/UIShell/_utils.d.ts +7 -0
- package/lib/components/UIShell/_utils.js +0 -2
- package/lib/components/UnorderedList/UnorderedList.js +7 -13
- package/lib/feature-flags.d.ts +1 -0
- package/lib/feature-flags.js +3 -4
- package/lib/index.js +180 -182
- package/lib/internal/FloatingMenu.js +10 -18
- package/lib/internal/OptimizedResize.js +2 -8
- package/lib/internal/Selection.js +1 -7
- package/lib/internal/clamp.js +0 -2
- package/lib/internal/createClassWrapper.js +1 -7
- package/lib/internal/deprecateFieldOnObject.js +1 -3
- package/lib/internal/environment.js +0 -2
- package/lib/internal/getAnnouncement.js +0 -2
- package/lib/internal/keyboard/keys.js +0 -2
- package/lib/internal/keyboard/match.js +0 -2
- package/lib/internal/keyboard/navigation.js +0 -2
- package/lib/internal/noopFn.js +0 -2
- package/lib/internal/useAttachedMenu.js +0 -2
- package/lib/internal/useControllableState.js +0 -2
- package/lib/internal/useDelayedState.js +0 -2
- package/lib/internal/useEvent.d.ts +2 -2
- package/lib/internal/useEvent.js +4 -5
- package/lib/internal/useId.d.ts +21 -0
- package/lib/internal/useId.js +27 -7
- package/lib/internal/useIdPrefix.js +2 -8
- package/lib/internal/useIsomorphicEffect.js +1 -1
- package/lib/internal/useMatchMedia.js +0 -2
- package/lib/internal/useMergedRefs.js +0 -2
- package/lib/internal/useNoInteractiveChildren.js +0 -2
- package/lib/internal/useNormalizedInputProps.js +2 -8
- package/lib/internal/useOutsideClick.js +0 -2
- package/lib/internal/useOverflowItems.js +1 -7
- package/lib/internal/usePrefix.js +2 -8
- package/lib/internal/usePreviousValue.js +0 -2
- package/lib/internal/useResizeObserver.js +0 -2
- package/lib/internal/useSavedCallback.js +0 -2
- package/lib/internal/utils.js +0 -2
- package/lib/internal/warning.js +0 -2
- package/lib/internal/wrapFocus.js +0 -2
- package/lib/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -2
- package/lib/prop-types/AriaPropTypes.js +2 -8
- package/lib/prop-types/deprecate.js +0 -2
- package/lib/prop-types/deprecateComponent.d.ts +1 -0
- package/lib/prop-types/deprecateComponent.js +2 -5
- package/lib/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/lib/prop-types/deprecateValuesWithin.js +1 -1
- package/lib/prop-types/isRequiredOneOf.js +0 -2
- package/lib/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -1
- package/lib/tools/events.js +0 -2
- package/lib/tools/mapPopoverAlign.js +0 -2
- package/lib/tools/mergeRefs.d.ts +12 -0
- package/lib/tools/mergeRefs.js +1 -2
- package/lib/tools/setupGetInstanceId.js +0 -2
- package/lib/tools/toggleClass.js +0 -2
- package/lib/tools/wrapComponent.js +4 -10
- package/package.json +12 -12
- package/telemetry.yml +1 -0
- /package/es/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -0
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
11
|
var iconsReact = require('@carbon/icons-react');
|
|
14
12
|
var cx = require('classnames');
|
|
@@ -37,14 +35,6 @@ var index = require('../AILabel/index.js');
|
|
|
37
35
|
var utils = require('../../internal/utils.js');
|
|
38
36
|
var ListBoxPropTypes = require('../ListBox/ListBoxPropTypes.js');
|
|
39
37
|
|
|
40
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
41
|
-
|
|
42
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
43
|
-
var Downshift__default = /*#__PURE__*/_interopDefaultLegacy(Downshift);
|
|
44
|
-
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
|
|
45
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
46
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
47
|
-
|
|
48
38
|
const {
|
|
49
39
|
InputBlur,
|
|
50
40
|
InputKeyDownEnter,
|
|
@@ -114,7 +104,8 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
114
104
|
useTitleInItem,
|
|
115
105
|
warn,
|
|
116
106
|
warnText,
|
|
117
|
-
slug
|
|
107
|
+
slug,
|
|
108
|
+
inputProps
|
|
118
109
|
}, ref) {
|
|
119
110
|
const {
|
|
120
111
|
isFluid
|
|
@@ -202,7 +193,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
202
193
|
}, [items, inputValue, controlledSelectedItems, topItems, selectionFeedback, itemToString$1, compareItems, locale]);
|
|
203
194
|
const inline = type === 'inline';
|
|
204
195
|
const showWarning = !invalid && warn;
|
|
205
|
-
const wrapperClasses =
|
|
196
|
+
const wrapperClasses = cx(`${prefix}--multi-select__wrapper`, `${prefix}--multi-select--filterable__wrapper`, `${prefix}--list-box__wrapper`, containerClassName, {
|
|
206
197
|
[`${prefix}--multi-select__wrapper--inline`]: inline,
|
|
207
198
|
[`${prefix}--list-box__wrapper--inline`]: inline,
|
|
208
199
|
[`${prefix}--multi-select__wrapper--inline--invalid`]: inline && invalid,
|
|
@@ -215,21 +206,21 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
215
206
|
});
|
|
216
207
|
const helperId = !helperText ? undefined : `filterablemultiselect-helper-text-${filterableMultiSelectInstanceId}`;
|
|
217
208
|
const labelId = `${id}-label`;
|
|
218
|
-
const titleClasses =
|
|
209
|
+
const titleClasses = cx({
|
|
219
210
|
[`${prefix}--label`]: true,
|
|
220
211
|
[`${prefix}--label--disabled`]: disabled,
|
|
221
212
|
[`${prefix}--visually-hidden`]: hideLabel
|
|
222
213
|
});
|
|
223
|
-
const helperClasses =
|
|
214
|
+
const helperClasses = cx({
|
|
224
215
|
[`${prefix}--form__helper-text`]: true,
|
|
225
216
|
[`${prefix}--form__helper-text--disabled`]: disabled
|
|
226
217
|
});
|
|
227
|
-
const inputClasses =
|
|
218
|
+
const inputClasses = cx({
|
|
228
219
|
[`${prefix}--text-input`]: true,
|
|
229
220
|
[`${prefix}--text-input--empty`]: !inputValue,
|
|
230
221
|
[`${prefix}--text-input--light`]: light
|
|
231
222
|
});
|
|
232
|
-
const helper = helperText ? /*#__PURE__*/
|
|
223
|
+
const helper = helperText ? /*#__PURE__*/React.createElement("div", {
|
|
233
224
|
id: helperId,
|
|
234
225
|
className: helperClasses
|
|
235
226
|
}, helperText) : null;
|
|
@@ -350,7 +341,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
350
341
|
}
|
|
351
342
|
return {
|
|
352
343
|
...changes,
|
|
353
|
-
highlightedIndex:
|
|
344
|
+
highlightedIndex: controlledSelectedItems.length > 0 ? 0 : -1
|
|
354
345
|
};
|
|
355
346
|
case InputChange:
|
|
356
347
|
if (onInputValueChange) {
|
|
@@ -363,6 +354,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
363
354
|
highlightedIndex: 0
|
|
364
355
|
};
|
|
365
356
|
case InputClick:
|
|
357
|
+
setIsOpen(changes.isOpen || false);
|
|
366
358
|
validateHighlightFocus();
|
|
367
359
|
if (changes.isOpen && !changes.selectedItem) {
|
|
368
360
|
return {
|
|
@@ -372,7 +364,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
372
364
|
return {
|
|
373
365
|
...changes,
|
|
374
366
|
isOpen: false,
|
|
375
|
-
highlightedIndex:
|
|
367
|
+
highlightedIndex: controlledSelectedItems.length > 0 ? 0 : -1
|
|
376
368
|
};
|
|
377
369
|
case MenuMouseLeave:
|
|
378
370
|
return {
|
|
@@ -463,7 +455,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
463
455
|
const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/React.cloneElement(candidate, {
|
|
464
456
|
size: 'mini'
|
|
465
457
|
}) : null;
|
|
466
|
-
const className =
|
|
458
|
+
const className = cx(`${prefix}--multi-select`, `${prefix}--combo-box`, `${prefix}--multi-select--filterable`, {
|
|
467
459
|
[`${prefix}--multi-select--invalid`]: invalid,
|
|
468
460
|
[`${prefix}--multi-select--invalid--focused`]: invalid && inputFocused,
|
|
469
461
|
[`${prefix}--multi-select--open`]: isOpen,
|
|
@@ -494,7 +486,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
494
486
|
}
|
|
495
487
|
}
|
|
496
488
|
});
|
|
497
|
-
const
|
|
489
|
+
const inputProp = getInputProps(getDropdownProps({
|
|
498
490
|
'aria-controls': isOpen ? menuId : undefined,
|
|
499
491
|
'aria-describedby': helperText ? helperId : undefined,
|
|
500
492
|
'aria-haspopup': 'listbox',
|
|
@@ -504,6 +496,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
504
496
|
disabled,
|
|
505
497
|
placeholder,
|
|
506
498
|
preventKeyAction: isOpen,
|
|
499
|
+
...inputProps,
|
|
507
500
|
onClick: () => handleMenuChange(true),
|
|
508
501
|
onKeyDown(event) {
|
|
509
502
|
const $input = event.target;
|
|
@@ -557,7 +550,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
557
550
|
setIsFocused(evt?.type === 'focus' ? true : false);
|
|
558
551
|
}
|
|
559
552
|
};
|
|
560
|
-
const mergedRef = mergeRefs
|
|
553
|
+
const mergedRef = mergeRefs.default(textInput, inputProp.ref);
|
|
561
554
|
const readOnlyEventHandlers = readOnly ? {
|
|
562
555
|
onClick: evt => {
|
|
563
556
|
// NOTE: does not prevent click
|
|
@@ -576,13 +569,13 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
576
569
|
}
|
|
577
570
|
} : {};
|
|
578
571
|
const clearSelectionContent = controlledSelectedItems.length > 0 ? `${clearSelectionDescription} ${controlledSelectedItems.length}. ${clearSelectionText}.` : `${clearSelectionDescription} 0.`;
|
|
579
|
-
return /*#__PURE__*/
|
|
572
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
580
573
|
className: wrapperClasses
|
|
581
|
-
}, titleText ? /*#__PURE__*/
|
|
574
|
+
}, titleText ? /*#__PURE__*/React.createElement("label", _rollupPluginBabelHelpers.extends({
|
|
582
575
|
className: titleClasses
|
|
583
|
-
}, labelProps), titleText, /*#__PURE__*/
|
|
576
|
+
}, labelProps), titleText, /*#__PURE__*/React.createElement("span", {
|
|
584
577
|
className: `${prefix}--visually-hidden`
|
|
585
|
-
}, clearSelectionContent)) : null, /*#__PURE__*/
|
|
578
|
+
}, clearSelectionContent)) : null, /*#__PURE__*/React.createElement(index$1.default, {
|
|
586
579
|
onFocus: isFluid ? handleFocus : undefined,
|
|
587
580
|
onBlur: isFluid ? handleFocus : undefined,
|
|
588
581
|
className: className,
|
|
@@ -596,10 +589,10 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
596
589
|
warnText: warnText,
|
|
597
590
|
isOpen: !readOnly && isOpen,
|
|
598
591
|
size: size
|
|
599
|
-
}, /*#__PURE__*/
|
|
592
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
600
593
|
className: `${prefix}--list-box__field`,
|
|
601
594
|
ref: autoAlign ? refs.setReference : null
|
|
602
|
-
}, controlledSelectedItems.length > 0 && /*#__PURE__*/
|
|
595
|
+
}, controlledSelectedItems.length > 0 && /*#__PURE__*/React.createElement(ListBoxSelection.default, {
|
|
603
596
|
readOnly: readOnly,
|
|
604
597
|
clearSelection: () => {
|
|
605
598
|
clearSelection();
|
|
@@ -610,17 +603,17 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
610
603
|
selectionCount: controlledSelectedItems.length,
|
|
611
604
|
translateWithId: translateWithId,
|
|
612
605
|
disabled: disabled
|
|
613
|
-
}), /*#__PURE__*/
|
|
606
|
+
}), /*#__PURE__*/React.createElement("input", _rollupPluginBabelHelpers.extends({
|
|
614
607
|
className: inputClasses
|
|
615
|
-
},
|
|
608
|
+
}, inputProp, {
|
|
616
609
|
ref: mergedRef
|
|
617
610
|
}, readOnlyEventHandlers, {
|
|
618
611
|
readOnly: readOnly
|
|
619
|
-
})), invalid && /*#__PURE__*/
|
|
612
|
+
})), invalid && /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
|
|
620
613
|
className: `${prefix}--list-box__invalid-icon`
|
|
621
|
-
}), showWarning && /*#__PURE__*/
|
|
614
|
+
}), showWarning && /*#__PURE__*/React.createElement(iconsReact.WarningAltFilled, {
|
|
622
615
|
className: `${prefix}--list-box__invalid-icon ${prefix}--list-box__invalid-icon--warning`
|
|
623
|
-
}), inputValue && /*#__PURE__*/
|
|
616
|
+
}), inputValue && /*#__PURE__*/React.createElement(ListBoxSelection.default, {
|
|
624
617
|
clearSelection: clearInputValue,
|
|
625
618
|
disabled: disabled,
|
|
626
619
|
translateWithId: translateWithId,
|
|
@@ -633,13 +626,13 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
633
626
|
// ListBoxSelection
|
|
634
627
|
event.stopPropagation();
|
|
635
628
|
}
|
|
636
|
-
}), /*#__PURE__*/
|
|
629
|
+
}), /*#__PURE__*/React.createElement(ListBoxTrigger.default, _rollupPluginBabelHelpers.extends({}, buttonProps, {
|
|
637
630
|
isOpen: isOpen,
|
|
638
631
|
translateWithId: translateWithId
|
|
639
|
-
}))), slug ? normalizedDecorator : decorator ? /*#__PURE__*/
|
|
632
|
+
}))), slug ? normalizedDecorator : decorator ? /*#__PURE__*/React.createElement("div", {
|
|
640
633
|
className: `${prefix}--list-box__inner-wrapper--decorator`
|
|
641
|
-
}, normalizedDecorator) : '', /*#__PURE__*/
|
|
642
|
-
const isChecked = controlledSelectedItems.filter(selected =>
|
|
634
|
+
}, normalizedDecorator) : '', /*#__PURE__*/React.createElement(index$1.default.Menu, menuProps, isOpen ? sortedItems.map((item, index) => {
|
|
635
|
+
const isChecked = controlledSelectedItems.filter(selected => isEqual(selected, item)).length > 0;
|
|
643
636
|
const itemProps = getItemProps({
|
|
644
637
|
item,
|
|
645
638
|
['aria-selected']: isChecked
|
|
@@ -656,21 +649,21 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
656
649
|
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
657
650
|
...modifiedItemProps
|
|
658
651
|
} = itemProps;
|
|
659
|
-
return /*#__PURE__*/
|
|
652
|
+
return /*#__PURE__*/React.createElement(index$1.default.MenuItem, _rollupPluginBabelHelpers.extends({
|
|
660
653
|
key: itemProps.id,
|
|
661
654
|
"aria-label": itemText,
|
|
662
655
|
isActive: isChecked,
|
|
663
656
|
isHighlighted: highlightedIndex === index,
|
|
664
657
|
title: itemText,
|
|
665
658
|
disabled: disabled
|
|
666
|
-
}, modifiedItemProps), /*#__PURE__*/
|
|
659
|
+
}, modifiedItemProps), /*#__PURE__*/React.createElement("div", {
|
|
667
660
|
className: `${prefix}--checkbox-wrapper`
|
|
668
|
-
}, /*#__PURE__*/
|
|
661
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
669
662
|
title: useTitleInItem ? itemText : undefined,
|
|
670
663
|
className: `${prefix}--checkbox-label`,
|
|
671
664
|
"data-contained-checkbox-state": isChecked,
|
|
672
665
|
id: `${itemProps.id}-item`
|
|
673
|
-
}, ItemToElement ? /*#__PURE__*/
|
|
666
|
+
}, ItemToElement ? /*#__PURE__*/React.createElement(ItemToElement, _rollupPluginBabelHelpers.extends({
|
|
674
667
|
key: itemProps.id
|
|
675
668
|
}, item)) : itemText)));
|
|
676
669
|
}) : null)), !inline && !invalid && !warn ? helper : null);
|
|
@@ -681,38 +674,38 @@ FilterableMultiSelect.propTypes = {
|
|
|
681
674
|
* Deprecated, aria-label is no longer needed
|
|
682
675
|
* Specify a label to be read by screen readers on the container node
|
|
683
676
|
*/
|
|
684
|
-
['aria-label']: deprecate.deprecate(
|
|
677
|
+
['aria-label']: deprecate.deprecate(PropTypes.string, 'ariaLabel / aria-label props are no longer required for FilterableMultiSelect'),
|
|
685
678
|
/**
|
|
686
679
|
* Deprecated, please use `aria-label` instead.
|
|
687
680
|
* Specify a label to be read by screen readers on the container note.
|
|
688
681
|
*/
|
|
689
|
-
ariaLabel: deprecate.deprecate(
|
|
682
|
+
ariaLabel: deprecate.deprecate(PropTypes.string, 'ariaLabel / aria-label props are no longer required for FilterableMultiSelect'),
|
|
690
683
|
/**
|
|
691
684
|
* **Experimental**: Will attempt to automatically align the floating
|
|
692
685
|
* element to avoid collisions with the viewport and being clipped by
|
|
693
686
|
* ancestor elements.
|
|
694
687
|
*/
|
|
695
|
-
autoAlign:
|
|
688
|
+
autoAlign: PropTypes.bool,
|
|
696
689
|
/**
|
|
697
690
|
* Specify the text that should be read for screen readers that describes total items selected
|
|
698
691
|
*/
|
|
699
|
-
clearSelectionDescription:
|
|
692
|
+
clearSelectionDescription: PropTypes.string,
|
|
700
693
|
/**
|
|
701
694
|
* Specify the text that should be read for screen readers to clear selection.
|
|
702
695
|
*/
|
|
703
|
-
clearSelectionText:
|
|
696
|
+
clearSelectionText: PropTypes.string,
|
|
704
697
|
/**
|
|
705
698
|
* **Experimental**: Provide a decorator component to be rendered inside the `FilterableMultiSelect` component
|
|
706
699
|
*/
|
|
707
|
-
decorator:
|
|
700
|
+
decorator: PropTypes.node,
|
|
708
701
|
/**
|
|
709
702
|
* Specify the direction of the multiselect dropdown. Can be either top or bottom.
|
|
710
703
|
*/
|
|
711
|
-
direction:
|
|
704
|
+
direction: PropTypes.oneOf(['top', 'bottom']),
|
|
712
705
|
/**
|
|
713
706
|
* Disable the control
|
|
714
707
|
*/
|
|
715
|
-
disabled:
|
|
708
|
+
disabled: PropTypes.bool,
|
|
716
709
|
/**
|
|
717
710
|
* Additional props passed to Downshift.
|
|
718
711
|
*
|
|
@@ -722,112 +715,119 @@ FilterableMultiSelect.propTypes = {
|
|
|
722
715
|
* from potentially breaking changes.
|
|
723
716
|
*/
|
|
724
717
|
// @ts-ignore
|
|
725
|
-
downshiftProps:
|
|
718
|
+
downshiftProps: PropTypes.shape(Downshift.propTypes),
|
|
726
719
|
/**
|
|
727
720
|
* Specify whether the title text should be hidden or not
|
|
728
721
|
*/
|
|
729
|
-
hideLabel:
|
|
722
|
+
hideLabel: PropTypes.bool,
|
|
730
723
|
/**
|
|
731
724
|
* Specify a custom `id`
|
|
732
725
|
*/
|
|
733
|
-
id:
|
|
726
|
+
id: PropTypes.string.isRequired,
|
|
734
727
|
/**
|
|
735
728
|
* Allow users to pass in arbitrary items from their collection that are
|
|
736
729
|
* pre-selected
|
|
737
730
|
*/
|
|
738
|
-
initialSelectedItems:
|
|
731
|
+
initialSelectedItems: PropTypes.array,
|
|
739
732
|
/**
|
|
740
733
|
* Is the current selection invalid?
|
|
741
734
|
*/
|
|
742
|
-
invalid:
|
|
735
|
+
invalid: PropTypes.bool,
|
|
743
736
|
/**
|
|
744
737
|
* If invalid, what is the error?
|
|
745
738
|
*/
|
|
746
|
-
invalidText:
|
|
739
|
+
invalidText: PropTypes.node,
|
|
747
740
|
/**
|
|
748
741
|
* Function to render items as custom components instead of strings.
|
|
749
742
|
* Defaults to null and is overridden by a getter
|
|
750
743
|
*/
|
|
751
|
-
itemToElement:
|
|
744
|
+
itemToElement: PropTypes.func,
|
|
752
745
|
/**
|
|
753
746
|
* Helper function passed to downshift that allows the library to render a
|
|
754
747
|
* given item to a string label. By default, it extracts the `label` field
|
|
755
748
|
* from a given item to serve as the item label in the list.
|
|
756
749
|
*/
|
|
757
|
-
itemToString:
|
|
750
|
+
itemToString: PropTypes.func,
|
|
758
751
|
/**
|
|
759
752
|
* We try to stay as generic as possible here to allow individuals to pass
|
|
760
753
|
* in a collection of whatever kind of data structure they prefer
|
|
761
754
|
*/
|
|
762
|
-
items:
|
|
755
|
+
items: PropTypes.array.isRequired,
|
|
763
756
|
/**
|
|
764
757
|
* `true` to use the light version.
|
|
765
758
|
*/
|
|
766
|
-
light: deprecate.deprecate(
|
|
759
|
+
light: deprecate.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.'),
|
|
767
760
|
/**
|
|
768
761
|
* Specify the locale of the control. Used for the default `compareItems`
|
|
769
762
|
* used for sorting the list of items in the control.
|
|
770
763
|
*/
|
|
771
|
-
locale:
|
|
764
|
+
locale: PropTypes.string,
|
|
772
765
|
/**
|
|
773
766
|
* `onChange` is a utility for this controlled component to communicate to a
|
|
774
767
|
* consuming component what kind of internal state changes are occurring.
|
|
775
768
|
*/
|
|
776
|
-
onChange:
|
|
769
|
+
onChange: PropTypes.func,
|
|
777
770
|
/**
|
|
778
771
|
* `onInputValueChange` is a utility for this controlled component to communicate to
|
|
779
772
|
* the currently typed input.
|
|
780
773
|
*/
|
|
781
|
-
onInputValueChange:
|
|
774
|
+
onInputValueChange: PropTypes.func,
|
|
782
775
|
/**
|
|
783
776
|
* `onMenuChange` is a utility for this controlled component to communicate to a
|
|
784
777
|
* consuming component that the menu was opened(`true`)/closed(`false`).
|
|
785
778
|
*/
|
|
786
|
-
onMenuChange:
|
|
779
|
+
onMenuChange: PropTypes.func,
|
|
787
780
|
/**
|
|
788
781
|
* Initialize the component with an open(`true`)/closed(`false`) menu.
|
|
789
782
|
*/
|
|
790
|
-
open:
|
|
783
|
+
open: PropTypes.bool,
|
|
791
784
|
/**
|
|
792
785
|
* Generic `placeholder` that will be used as the textual representation of
|
|
793
786
|
* what this field is for
|
|
794
787
|
*/
|
|
795
|
-
placeholder:
|
|
788
|
+
placeholder: PropTypes.string,
|
|
796
789
|
/**
|
|
797
790
|
* Specify feedback (mode) of the selection.
|
|
798
791
|
* `top`: selected item jumps to top
|
|
799
792
|
* `fixed`: selected item stays at it's position
|
|
800
793
|
* `top-after-reopen`: selected item jump to top after reopen dropdown
|
|
801
794
|
*/
|
|
802
|
-
selectionFeedback:
|
|
795
|
+
selectionFeedback: PropTypes.oneOf(['top', 'fixed', 'top-after-reopen']),
|
|
803
796
|
/**
|
|
804
797
|
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
805
798
|
*/
|
|
806
799
|
size: ListBoxPropTypes.ListBoxSizePropType,
|
|
807
|
-
slug: deprecate.deprecate(
|
|
800
|
+
slug: deprecate.deprecate(PropTypes.node, 'The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.'),
|
|
808
801
|
...MultiSelectPropTypes.sortingPropTypes,
|
|
809
802
|
/**
|
|
810
803
|
* Provide text to be used in a `<label>` element that is tied to the
|
|
811
804
|
* combobox via ARIA attributes.
|
|
812
805
|
*/
|
|
813
|
-
titleText:
|
|
806
|
+
titleText: PropTypes.node,
|
|
814
807
|
/**
|
|
815
808
|
* Callback function for translating ListBoxMenuIcon SVG title
|
|
816
809
|
*/
|
|
817
|
-
translateWithId:
|
|
810
|
+
translateWithId: PropTypes.func,
|
|
818
811
|
type: ListBoxPropTypes.ListBoxTypePropType,
|
|
819
812
|
/**
|
|
820
813
|
* Specify title to show title on hover
|
|
821
814
|
*/
|
|
822
|
-
useTitleInItem:
|
|
815
|
+
useTitleInItem: PropTypes.bool,
|
|
823
816
|
/**
|
|
824
817
|
* Specify whether the control is currently in warning state
|
|
825
818
|
*/
|
|
826
|
-
warn:
|
|
819
|
+
warn: PropTypes.bool,
|
|
827
820
|
/**
|
|
828
821
|
* Provide the text that is displayed when the control is in warning state
|
|
829
822
|
*/
|
|
830
|
-
warnText:
|
|
823
|
+
warnText: PropTypes.node,
|
|
824
|
+
/**
|
|
825
|
+
* Specify native input attributes to place on the `<input>`, like maxLength.
|
|
826
|
+
* These are passed to downshift's getInputProps() and will override the
|
|
827
|
+
* internal input props.
|
|
828
|
+
* https://github.com/downshift-js/downshift?tab=readme-ov-file#getinputprops
|
|
829
|
+
*/
|
|
830
|
+
inputProps: PropTypes.object
|
|
831
831
|
};
|
|
832
832
|
|
|
833
833
|
exports.FilterableMultiSelect = FilterableMultiSelect;
|