@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
|
@@ -18,11 +18,11 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
18
18
|
import '../FluidForm/FluidForm.js';
|
|
19
19
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
20
20
|
import { useId } from '../../internal/useId.js';
|
|
21
|
-
import { useFloating, size, flip, hide
|
|
21
|
+
import { useFloating, autoUpdate, size, flip, hide } from '@floating-ui/react';
|
|
22
22
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
23
23
|
import { AILabel } from '../AILabel/index.js';
|
|
24
24
|
import { isComponentElement } from '../../internal/utils.js';
|
|
25
|
-
import {
|
|
25
|
+
import { ListBoxTypePropType, ListBoxSizePropType } from '../ListBox/ListBoxPropTypes.js';
|
|
26
26
|
|
|
27
27
|
const {
|
|
28
28
|
ItemMouseMove,
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { FeatureFlags as FeatureFlags$1, createScope } from '@carbon/feature-flags';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import React, { useContext, useState, useRef, useEffect
|
|
10
|
+
import React, { useContext, createContext, useState, useRef, useEffect } from 'react';
|
|
11
11
|
import { deprecate } from '../../prop-types/deprecate.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -43,8 +43,9 @@ export interface FluidNumberInputProps {
|
|
|
43
43
|
*/
|
|
44
44
|
id: string;
|
|
45
45
|
/**
|
|
46
|
-
* Instruct the browser which keyboard to display on mobile devices.
|
|
47
|
-
* standard numeric keyboards vary across devices
|
|
46
|
+
* Instruct the browser which keyboard to display on mobile devices. Defaults
|
|
47
|
+
* to `decimal`, but note that standard numeric keyboards vary across devices
|
|
48
|
+
* and operating systems.
|
|
48
49
|
* @see https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/
|
|
49
50
|
*/
|
|
50
51
|
inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];
|
|
@@ -67,8 +67,9 @@ FluidNumberInput.propTypes = {
|
|
|
67
67
|
*/
|
|
68
68
|
id: PropTypes.string.isRequired,
|
|
69
69
|
/**
|
|
70
|
-
* Instruct the browser which keyboard to display on mobile devices.
|
|
71
|
-
* standard numeric keyboards vary across devices
|
|
70
|
+
* Instruct the browser which keyboard to display on mobile devices. Defaults
|
|
71
|
+
* to `decimal`, but note that standard numeric keyboards vary across devices
|
|
72
|
+
* and operating systems.
|
|
72
73
|
* @see https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/
|
|
73
74
|
*/
|
|
74
75
|
inputMode: PropTypes.oneOf(['none', 'text', 'tel', 'url', 'email', 'numeric', 'decimal', 'search']),
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import FluidTextInput from './FluidTextInput.js';
|
|
9
|
-
export { default as FluidTextInput, default } from './FluidTextInput.js';
|
|
10
9
|
import './FluidPasswordInput.js';
|
|
11
10
|
export { default as FluidTextInputSkeleton } from './FluidTextInput.Skeleton.js';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export { FluidTextInput, FluidTextInput as default };
|
|
@@ -88,7 +88,7 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
88
88
|
/**
|
|
89
89
|
* Specify the size of the Button.
|
|
90
90
|
*/
|
|
91
|
-
size?: Extract<ButtonSize, 'sm' | 'md' | 'lg'>;
|
|
91
|
+
size?: Extract<ButtonSize, 'xs' | 'sm' | 'md' | 'lg'>;
|
|
92
92
|
/**
|
|
93
93
|
* Optionally specify a `target` when using an `<a>` element.
|
|
94
94
|
*/
|
|
@@ -9,7 +9,7 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
12
|
-
import {
|
|
12
|
+
import { WarningSquareFilled, UnknownFilled, PendingFilled, CircleDash, Incomplete, InProgress, CheckmarkOutline, CheckmarkFilled, UndefinedFilled, WarningAltFilled, WarningAltInvertedFilled, ErrorFilled } from '@carbon/icons-react';
|
|
13
13
|
|
|
14
14
|
const IconIndicatorKinds = ['failed', 'caution-major', 'caution-minor', 'undefined', 'succeeded', 'normal', 'in-progress', 'incomplete', 'not-started', 'pending', 'unknown', 'informative'];
|
|
15
15
|
const iconTypes = {
|
|
@@ -9,7 +9,6 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { LayoutDirectionContext } from './LayoutDirectionContext.js';
|
|
12
|
-
export { LayoutDirectionContext } from './LayoutDirectionContext.js';
|
|
13
12
|
|
|
14
13
|
function LayoutDirection({
|
|
15
14
|
as: BaseComponent = 'div',
|
|
@@ -44,4 +43,4 @@ LayoutDirection.propTypes = {
|
|
|
44
43
|
dir: PropTypes.oneOf(['ltr', 'rtl']).isRequired
|
|
45
44
|
};
|
|
46
45
|
|
|
47
|
-
export { LayoutDirection };
|
|
46
|
+
export { LayoutDirection, LayoutDirectionContext };
|
|
@@ -14,7 +14,7 @@ import './index.js';
|
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
import '../FluidForm/FluidForm.js';
|
|
16
16
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
17
|
-
import {
|
|
17
|
+
import { ListBoxTypePropType, ListBoxSizePropType } from './ListBoxPropTypes.js';
|
|
18
18
|
|
|
19
19
|
const handleOnKeyDown = event => {
|
|
20
20
|
if (event.keyCode === 27) {
|
|
@@ -36,7 +36,9 @@ export interface MenuProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
|
36
36
|
*/
|
|
37
37
|
mode?: 'full' | 'basic';
|
|
38
38
|
/**
|
|
39
|
-
* Provide an optional function to be called when the Menu should be closed
|
|
39
|
+
* Provide an optional function to be called when the Menu should be closed,
|
|
40
|
+
* including if the Menu is blurred, the user presses escape, or the Menu is
|
|
41
|
+
* a submenu and the user presses ArrowLeft.
|
|
40
42
|
*/
|
|
41
43
|
onClose?: () => void;
|
|
42
44
|
/**
|
|
@@ -320,7 +320,9 @@ Menu.propTypes = {
|
|
|
320
320
|
*/
|
|
321
321
|
mode: deprecate(PropTypes.oneOf(['full', 'basic']), 'Menus now always support both icons as well as selectable items and nesting.'),
|
|
322
322
|
/**
|
|
323
|
-
* Provide an optional function to be called when the Menu should be closed
|
|
323
|
+
* Provide an optional function to be called when the Menu should be closed,
|
|
324
|
+
* including if the Menu is blurred, the user presses escape, or the Menu is
|
|
325
|
+
* a submenu and the user presses ArrowLeft.
|
|
324
326
|
*/
|
|
325
327
|
onClose: PropTypes.func,
|
|
326
328
|
/**
|
|
@@ -9,7 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
|
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React, { forwardRef, useState, useContext, useRef, useEffect } from 'react';
|
|
12
|
-
import { useFloating,
|
|
12
|
+
import { useFloating, offset, autoUpdate, useInteractions, useHover, safePolygon, FloatingFocusManager } from '@floating-ui/react';
|
|
13
13
|
import { Checkmark, CaretLeft, CaretRight } from '@carbon/icons-react';
|
|
14
14
|
import { ArrowRight, Enter, Space } from '../../internal/keyboard/keys.js';
|
|
15
15
|
import { match } from '../../internal/keyboard/match.js';
|
|
@@ -17,7 +17,7 @@ import ButtonSet from '../ButtonSet/ButtonSet.js';
|
|
|
17
17
|
import InlineLoading from '../InlineLoading/InlineLoading.js';
|
|
18
18
|
import { Layer } from '../Layer/index.js';
|
|
19
19
|
import requiredIfGivenPropIsTruthy from '../../prop-types/requiredIfGivenPropIsTruthy.js';
|
|
20
|
-
import { wrapFocusWithoutSentinels, elementOrParentIsFloatingMenu
|
|
20
|
+
import { wrapFocus, wrapFocusWithoutSentinels, elementOrParentIsFloatingMenu } from '../../internal/wrapFocus.js';
|
|
21
21
|
import useIsomorphicEffect from '../../internal/useIsomorphicEffect.js';
|
|
22
22
|
import { useId } from '../../internal/useId.js';
|
|
23
23
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
@@ -34,7 +34,7 @@ import { unstable__Dialog } from '../Dialog/index.js';
|
|
|
34
34
|
import { AILabel } from '../AILabel/index.js';
|
|
35
35
|
import { isComponentElement } from '../../internal/utils.js';
|
|
36
36
|
import { warning } from '../../internal/warning.js';
|
|
37
|
-
import { debounce } from '../../node_modules/es-toolkit/dist/compat/function/debounce.
|
|
37
|
+
import { debounce } from '../../node_modules/es-toolkit/dist/compat/function/debounce.js';
|
|
38
38
|
import { Text } from '../Text/Text.js';
|
|
39
39
|
|
|
40
40
|
const ModalSizes = ['xs', 'sm', 'md', 'lg'];
|
|
@@ -107,9 +107,6 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal({
|
|
|
107
107
|
} = evt;
|
|
108
108
|
evt.stopPropagation();
|
|
109
109
|
if (open && target instanceof HTMLElement) {
|
|
110
|
-
if (match(evt, Escape)) {
|
|
111
|
-
onRequestClose(evt);
|
|
112
|
-
}
|
|
113
110
|
if (match(evt, Enter) && shouldSubmitOnEnter && !isCloseButton(target) && document.activeElement !== button.current) {
|
|
114
111
|
onRequestSubmit(evt);
|
|
115
112
|
}
|
|
@@ -211,6 +208,20 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal({
|
|
|
211
208
|
alertDialogProps.role = 'alertdialog';
|
|
212
209
|
alertDialogProps['aria-describedby'] = modalBodyId;
|
|
213
210
|
}
|
|
211
|
+
useEffect(() => {
|
|
212
|
+
if (!open) return;
|
|
213
|
+
const handleEscapeKey = event => {
|
|
214
|
+
if (match(event, Escape)) {
|
|
215
|
+
event.preventDefault();
|
|
216
|
+
event.stopPropagation();
|
|
217
|
+
onRequestClose(event);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
document.addEventListener('keydown', handleEscapeKey, true);
|
|
221
|
+
return () => {
|
|
222
|
+
document.removeEventListener('keydown', handleEscapeKey, true);
|
|
223
|
+
};
|
|
224
|
+
}, [open]);
|
|
214
225
|
useEffect(() => {
|
|
215
226
|
return () => {
|
|
216
227
|
if (!enableDialogElement) {
|
|
@@ -191,6 +191,13 @@ export interface FilterableMultiSelectProps<ItemType> extends MultiSelectSorting
|
|
|
191
191
|
* Provide the text that is displayed when the control is in warning state
|
|
192
192
|
*/
|
|
193
193
|
warnText?: ReactNode;
|
|
194
|
+
/**
|
|
195
|
+
* Specify native input attributes to place on the `<input>`, like maxLength.
|
|
196
|
+
* These are passed to downshift's getInputProps() and will override the
|
|
197
|
+
* internal input props.
|
|
198
|
+
* https://github.com/downshift-js/downshift?tab=readme-ov-file#getinputprops
|
|
199
|
+
*/
|
|
200
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
194
201
|
}
|
|
195
202
|
export declare const FilterableMultiSelect: {
|
|
196
203
|
<ItemType>(props: FilterableMultiSelectProps<ItemType>): ReactElement<any>;
|
|
@@ -23,15 +23,15 @@ import { defaultItemToString } from './tools/itemToString.js';
|
|
|
23
23
|
import mergeRefs from '../../tools/mergeRefs.js';
|
|
24
24
|
import { deprecate } from '../../prop-types/deprecate.js';
|
|
25
25
|
import { useId } from '../../internal/useId.js';
|
|
26
|
-
import {
|
|
26
|
+
import { defaultSortItems, defaultCompareItems } from './tools/sorting.js';
|
|
27
27
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
28
28
|
import '../FluidForm/FluidForm.js';
|
|
29
29
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
30
30
|
import { useSelection } from '../../internal/Selection.js';
|
|
31
|
-
import { useFloating, flip, size, hide
|
|
31
|
+
import { useFloating, autoUpdate, flip, size, hide } from '@floating-ui/react';
|
|
32
32
|
import { AILabel } from '../AILabel/index.js';
|
|
33
33
|
import { isComponentElement } from '../../internal/utils.js';
|
|
34
|
-
import {
|
|
34
|
+
import { ListBoxTypePropType, ListBoxSizePropType } from '../ListBox/ListBoxPropTypes.js';
|
|
35
35
|
|
|
36
36
|
const {
|
|
37
37
|
InputBlur,
|
|
@@ -102,7 +102,8 @@ const FilterableMultiSelect = /*#__PURE__*/forwardRef(function FilterableMultiSe
|
|
|
102
102
|
useTitleInItem,
|
|
103
103
|
warn,
|
|
104
104
|
warnText,
|
|
105
|
-
slug
|
|
105
|
+
slug,
|
|
106
|
+
inputProps
|
|
106
107
|
}, ref) {
|
|
107
108
|
const {
|
|
108
109
|
isFluid
|
|
@@ -338,7 +339,7 @@ const FilterableMultiSelect = /*#__PURE__*/forwardRef(function FilterableMultiSe
|
|
|
338
339
|
}
|
|
339
340
|
return {
|
|
340
341
|
...changes,
|
|
341
|
-
highlightedIndex:
|
|
342
|
+
highlightedIndex: controlledSelectedItems.length > 0 ? 0 : -1
|
|
342
343
|
};
|
|
343
344
|
case InputChange:
|
|
344
345
|
if (onInputValueChange) {
|
|
@@ -351,6 +352,7 @@ const FilterableMultiSelect = /*#__PURE__*/forwardRef(function FilterableMultiSe
|
|
|
351
352
|
highlightedIndex: 0
|
|
352
353
|
};
|
|
353
354
|
case InputClick:
|
|
355
|
+
setIsOpen(changes.isOpen || false);
|
|
354
356
|
validateHighlightFocus();
|
|
355
357
|
if (changes.isOpen && !changes.selectedItem) {
|
|
356
358
|
return {
|
|
@@ -360,7 +362,7 @@ const FilterableMultiSelect = /*#__PURE__*/forwardRef(function FilterableMultiSe
|
|
|
360
362
|
return {
|
|
361
363
|
...changes,
|
|
362
364
|
isOpen: false,
|
|
363
|
-
highlightedIndex:
|
|
365
|
+
highlightedIndex: controlledSelectedItems.length > 0 ? 0 : -1
|
|
364
366
|
};
|
|
365
367
|
case MenuMouseLeave:
|
|
366
368
|
return {
|
|
@@ -482,7 +484,7 @@ const FilterableMultiSelect = /*#__PURE__*/forwardRef(function FilterableMultiSe
|
|
|
482
484
|
}
|
|
483
485
|
}
|
|
484
486
|
});
|
|
485
|
-
const
|
|
487
|
+
const inputProp = getInputProps(getDropdownProps({
|
|
486
488
|
'aria-controls': isOpen ? menuId : undefined,
|
|
487
489
|
'aria-describedby': helperText ? helperId : undefined,
|
|
488
490
|
'aria-haspopup': 'listbox',
|
|
@@ -492,6 +494,7 @@ const FilterableMultiSelect = /*#__PURE__*/forwardRef(function FilterableMultiSe
|
|
|
492
494
|
disabled,
|
|
493
495
|
placeholder,
|
|
494
496
|
preventKeyAction: isOpen,
|
|
497
|
+
...inputProps,
|
|
495
498
|
onClick: () => handleMenuChange(true),
|
|
496
499
|
onKeyDown(event) {
|
|
497
500
|
const $input = event.target;
|
|
@@ -545,7 +548,7 @@ const FilterableMultiSelect = /*#__PURE__*/forwardRef(function FilterableMultiSe
|
|
|
545
548
|
setIsFocused(evt?.type === 'focus' ? true : false);
|
|
546
549
|
}
|
|
547
550
|
};
|
|
548
|
-
const mergedRef = mergeRefs(textInput,
|
|
551
|
+
const mergedRef = mergeRefs(textInput, inputProp.ref);
|
|
549
552
|
const readOnlyEventHandlers = readOnly ? {
|
|
550
553
|
onClick: evt => {
|
|
551
554
|
// NOTE: does not prevent click
|
|
@@ -600,7 +603,7 @@ const FilterableMultiSelect = /*#__PURE__*/forwardRef(function FilterableMultiSe
|
|
|
600
603
|
disabled: disabled
|
|
601
604
|
}), /*#__PURE__*/React.createElement("input", _extends({
|
|
602
605
|
className: inputClasses
|
|
603
|
-
},
|
|
606
|
+
}, inputProp, {
|
|
604
607
|
ref: mergedRef
|
|
605
608
|
}, readOnlyEventHandlers, {
|
|
606
609
|
readOnly: readOnly
|
|
@@ -815,7 +818,14 @@ FilterableMultiSelect.propTypes = {
|
|
|
815
818
|
/**
|
|
816
819
|
* Provide the text that is displayed when the control is in warning state
|
|
817
820
|
*/
|
|
818
|
-
warnText: PropTypes.node
|
|
821
|
+
warnText: PropTypes.node,
|
|
822
|
+
/**
|
|
823
|
+
* Specify native input attributes to place on the `<input>`, like maxLength.
|
|
824
|
+
* These are passed to downshift's getInputProps() and will override the
|
|
825
|
+
* internal input props.
|
|
826
|
+
* https://github.com/downshift-js/downshift?tab=readme-ov-file#getinputprops
|
|
827
|
+
*/
|
|
828
|
+
inputProps: PropTypes.object
|
|
819
829
|
};
|
|
820
830
|
|
|
821
831
|
export { FilterableMultiSelect };
|
|
@@ -27,11 +27,11 @@ import { FormContext } from '../FluidForm/FormContext.js';
|
|
|
27
27
|
import Checkbox from '../Checkbox/Checkbox.js';
|
|
28
28
|
import '../Checkbox/Checkbox.Skeleton.js';
|
|
29
29
|
import { noopFn } from '../../internal/noopFn.js';
|
|
30
|
-
import { useFloating, flip, size, hide
|
|
30
|
+
import { useFloating, autoUpdate, flip, size, hide } from '@floating-ui/react';
|
|
31
31
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
32
32
|
import { AILabel } from '../AILabel/index.js';
|
|
33
33
|
import { isComponentElement } from '../../internal/utils.js';
|
|
34
|
-
import {
|
|
34
|
+
import { ListBoxTypePropType, ListBoxSizePropType } from '../ListBox/ListBoxPropTypes.js';
|
|
35
35
|
|
|
36
36
|
const {
|
|
37
37
|
ItemClick,
|
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
// TODO [@carbon-design-system/monorepo-reviewers]: This file was in the
|
|
9
|
-
// `ComboBox` directory before but it wasn't used there. Now it's used in
|
|
10
|
-
// `FilterableMultiSelect`. Is that expected?
|
|
11
|
-
|
|
12
8
|
const defaultFilterItems = (items, {
|
|
13
9
|
itemToString,
|
|
14
10
|
inputValue
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function defaultItemToString(item: any): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function defaultCompareItems(itemA: string, itemB: string, { locale }: {
|
|
2
|
+
locale: string;
|
|
3
|
+
}): number;
|
|
4
|
+
export function defaultSortItems(items: any, { selectedItems, itemToString, compareItems, locale }: {
|
|
5
|
+
selectedItems?: never[] | undefined;
|
|
6
|
+
itemToString: any;
|
|
7
|
+
compareItems: any;
|
|
8
|
+
locale?: string | undefined;
|
|
9
|
+
}): any;
|
|
@@ -10,7 +10,7 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React, { useState, useRef, useEffect } from 'react';
|
|
11
11
|
import { deprecate } from '../../prop-types/deprecate.js';
|
|
12
12
|
import cx from 'classnames';
|
|
13
|
-
import { Close,
|
|
13
|
+
import { Close, InformationSquareFilled, InformationFilled, WarningAltFilled, WarningFilled, CheckmarkFilled, ErrorFilled } from '@carbon/icons-react';
|
|
14
14
|
import '../Text/index.js';
|
|
15
15
|
import Button from '../Button/Button.js';
|
|
16
16
|
import '../Button/Button.Skeleton.js';
|
|
@@ -21,7 +21,7 @@ import { match, matches } from '../../internal/keyboard/match.js';
|
|
|
21
21
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
22
22
|
import { useId } from '../../internal/useId.js';
|
|
23
23
|
import { noopFn } from '../../internal/noopFn.js';
|
|
24
|
-
import {
|
|
24
|
+
import { wrapFocusWithoutSentinels, wrapFocus } from '../../internal/wrapFocus.js';
|
|
25
25
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
26
26
|
import { warning } from '../../internal/warning.js';
|
|
27
27
|
import deprecateValuesWithin from '../../prop-types/deprecateValuesWithin.js';
|
|
@@ -72,8 +72,9 @@ export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInp
|
|
|
72
72
|
*/
|
|
73
73
|
id: string;
|
|
74
74
|
/**
|
|
75
|
-
* Instruct the browser which keyboard to display on mobile devices.
|
|
76
|
-
* standard numeric keyboards vary across devices
|
|
75
|
+
* Instruct the browser which keyboard to display on mobile devices. Defaults
|
|
76
|
+
* to `decimal`, but note that standard numeric keyboards vary across devices
|
|
77
|
+
* and operating systems.
|
|
77
78
|
* @see https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/
|
|
78
79
|
*/
|
|
79
80
|
inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];
|
|
@@ -9,7 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
|
|
|
9
9
|
import { Subtract, Add } from '@carbon/icons-react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
|
-
import React, { useContext, useState, useMemo, useCallback, useRef,
|
|
12
|
+
import React, { useContext, useState, useMemo, useCallback, useRef, cloneElement, useEffect } from 'react';
|
|
13
13
|
import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
14
14
|
import { useNormalizedInputProps } from '../../internal/useNormalizedInputProps.js';
|
|
15
15
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
@@ -54,7 +54,7 @@ const NumberInput = /*#__PURE__*/React.forwardRef(function NumberInput(props, fo
|
|
|
54
54
|
hideSteppers,
|
|
55
55
|
iconDescription,
|
|
56
56
|
id,
|
|
57
|
-
inputMode,
|
|
57
|
+
inputMode = 'decimal',
|
|
58
58
|
invalid = false,
|
|
59
59
|
invalidText,
|
|
60
60
|
label,
|
|
@@ -495,8 +495,9 @@ NumberInput.propTypes = {
|
|
|
495
495
|
*/
|
|
496
496
|
id: PropTypes.string.isRequired,
|
|
497
497
|
/**
|
|
498
|
-
* Instruct the browser which keyboard to display on mobile devices.
|
|
499
|
-
* standard numeric keyboards vary across devices
|
|
498
|
+
* Instruct the browser which keyboard to display on mobile devices. Defaults
|
|
499
|
+
* to `decimal`, but note that standard numeric keyboards vary across devices
|
|
500
|
+
* and operating systems.
|
|
500
501
|
* @see https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/
|
|
501
502
|
*/
|
|
502
503
|
inputMode: PropTypes.oneOf(['none', 'text', 'tel', 'url', 'email', 'numeric', 'decimal', 'search']),
|
|
@@ -10,7 +10,7 @@ import React, { useRef, useEffect } from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { OverflowMenuVertical } from '@carbon/icons-react';
|
|
13
|
-
import { useFloating,
|
|
13
|
+
import { useFloating, autoUpdate, flip } from '@floating-ui/react';
|
|
14
14
|
import { useFeatureFlag } from '../../FeatureFlags/index.js';
|
|
15
15
|
import { IconButton } from '../../IconButton/index.js';
|
|
16
16
|
import { Menu } from '../../Menu/Menu.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function OverflowMenuV2(props: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import React, { useRef, useState, useLayoutEffect,
|
|
9
|
+
import React, { useRef, useState, useLayoutEffect, useMemo, useEffect, useCallback } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default PageSelector;
|
|
2
|
+
declare function PageSelector({ className, currentPage, id, labelText, totalPages, ...other }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
className?: null | undefined;
|
|
5
|
+
currentPage: any;
|
|
6
|
+
id?: number | undefined;
|
|
7
|
+
labelText?: string | undefined;
|
|
8
|
+
totalPages: any;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare namespace PageSelector {
|
|
11
|
+
namespace propTypes {
|
|
12
|
+
let className: PropTypes.Requireable<string>;
|
|
13
|
+
let currentPage: PropTypes.Validator<number>;
|
|
14
|
+
let id: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
15
|
+
let labelText: PropTypes.Requireable<string>;
|
|
16
|
+
let totalPages: PropTypes.Validator<number>;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export default Pagination;
|
|
2
|
+
declare function Pagination({ backwardText, children, className, disabled, forwardText, id, initialPage, itemsPerPageText, itemRangeText, itemText, onChange, pageRangeText, pageSize, pageSizes, pageText, pagesUnknown, totalItems, ...other }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
backwardText?: string | undefined;
|
|
5
|
+
children?: undefined;
|
|
6
|
+
className?: null | undefined;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
forwardText?: string | undefined;
|
|
9
|
+
id?: number | undefined;
|
|
10
|
+
initialPage?: number | undefined;
|
|
11
|
+
itemsPerPageText?: string | undefined;
|
|
12
|
+
itemRangeText?: ((min: any, max: any, total: any) => string) | undefined;
|
|
13
|
+
itemText?: ((min: any, max: any) => string) | undefined;
|
|
14
|
+
onChange: any;
|
|
15
|
+
pageRangeText?: ((current: any, total: any) => string) | undefined;
|
|
16
|
+
pageSize?: number | undefined;
|
|
17
|
+
pageSizes?: undefined;
|
|
18
|
+
pageText?: ((page: any) => string) | undefined;
|
|
19
|
+
pagesUnknown?: boolean | undefined;
|
|
20
|
+
totalItems?: undefined;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare namespace Pagination {
|
|
23
|
+
namespace propTypes {
|
|
24
|
+
let backwardText: PropTypes.Requireable<string>;
|
|
25
|
+
let children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>>;
|
|
26
|
+
let className: PropTypes.Requireable<string>;
|
|
27
|
+
let disabled: PropTypes.Requireable<boolean>;
|
|
28
|
+
let forwardText: PropTypes.Requireable<string>;
|
|
29
|
+
let id: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
30
|
+
let initialPage: PropTypes.Requireable<number>;
|
|
31
|
+
let itemRangeText: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
|
+
let itemText: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
|
+
let itemsPerPageText: PropTypes.Requireable<string>;
|
|
34
|
+
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
35
|
+
let pageRangeText: PropTypes.Requireable<(...args: any[]) => any>;
|
|
36
|
+
let pageSize: PropTypes.Requireable<number>;
|
|
37
|
+
let pageSizes: PropTypes.Requireable<(number | null | undefined)[]>;
|
|
38
|
+
let pageText: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
|
+
let pagesUnknown: PropTypes.Requireable<boolean>;
|
|
40
|
+
let totalItems: PropTypes.Requireable<number>;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
import PropTypes from 'prop-types';
|