@carbon/react 1.87.0-rc.0 → 1.87.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +739 -739
- package/es/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/es/components/Button/Button.js +1 -1
- 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/ComboBox/ComboBox.js +1 -1
- package/es/components/ComboBox/index.js +4 -1
- package/es/components/ComposedModal/ComposedModal.js +18 -8
- 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.js +2 -2
- package/es/components/Dropdown/index.js +4 -1
- package/es/components/FeatureFlags/index.js +2 -2
- package/es/components/FluidSelect/index.js +4 -1
- package/es/components/FluidTextInput/index.js +4 -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.js +3 -3
- 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.js +1 -1
- 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 +21 -4
- 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.js +2 -2
- 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/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 +8 -14
- package/lib/components/Button/Button.js +31 -36
- package/lib/components/Button/ButtonBase.js +6 -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 +39 -46
- package/lib/components/ComboBox/ComboBox.js +57 -64
- 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.js +18 -24
- 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 +8 -14
- 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.js +30 -36
- 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.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.js +57 -67
- 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.js +66 -74
- 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 +56 -47
- 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.js +32 -40
- 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.js +0 -2
- 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 +11 -11
- /package/es/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -0
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
|
12
12
|
var iconsReact = require('@carbon/icons-react');
|
|
13
|
+
var warning = require('../../internal/warning.js');
|
|
13
14
|
var cx = require('classnames');
|
|
14
15
|
var PropTypes = require('prop-types');
|
|
15
16
|
var React = require('react');
|
|
@@ -23,13 +24,8 @@ var index = require('../AILabel/index.js');
|
|
|
23
24
|
var utils = require('../../internal/utils.js');
|
|
24
25
|
var Text = require('../Text/Text.js');
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
29
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
30
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
31
|
-
|
|
32
|
-
const DatePickerInput = /*#__PURE__*/React__default["default"].forwardRef(function DatePickerInput(props, ref) {
|
|
27
|
+
let didWarnAboutDatePickerInputValue = false;
|
|
28
|
+
const DatePickerInput = /*#__PURE__*/React.forwardRef(function DatePickerInput(props, ref) {
|
|
33
29
|
const {
|
|
34
30
|
datePickerType,
|
|
35
31
|
decorator,
|
|
@@ -72,26 +68,30 @@ const DatePickerInput = /*#__PURE__*/React__default["default"].forwardRef(functi
|
|
|
72
68
|
placeholder,
|
|
73
69
|
type
|
|
74
70
|
};
|
|
75
|
-
|
|
71
|
+
if (process.env.NODE_ENV !== 'production' && 'value' in rest && !didWarnAboutDatePickerInputValue) {
|
|
72
|
+
process.env.NODE_ENV !== "production" ? warning.warning(false, `The 'value' prop is not supported on the DatePickerInput component. ` + `For DatePicker components with 'datePickerType="range"', please ` + `pass the 'value' prop (as an array of dates) to the parent ` + `DatePicker component instead.`) : void 0;
|
|
73
|
+
didWarnAboutDatePickerInputValue = true;
|
|
74
|
+
}
|
|
75
|
+
const wrapperClasses = cx(`${prefix}--date-picker-input__wrapper`, {
|
|
76
76
|
[`${prefix}--date-picker-input__wrapper--invalid`]: invalid,
|
|
77
77
|
[`${prefix}--date-picker-input__wrapper--warn`]: warn,
|
|
78
78
|
[`${prefix}--date-picker-input__wrapper--slug`]: slug,
|
|
79
79
|
[`${prefix}--date-picker-input__wrapper--decorator`]: decorator
|
|
80
80
|
});
|
|
81
|
-
const labelClasses =
|
|
81
|
+
const labelClasses = cx(`${prefix}--label`, {
|
|
82
82
|
[`${prefix}--visually-hidden`]: hideLabel,
|
|
83
83
|
[`${prefix}--label--disabled`]: disabled,
|
|
84
84
|
[`${prefix}--label--readonly`]: rest.readOnly
|
|
85
85
|
});
|
|
86
|
-
const helperTextClasses =
|
|
86
|
+
const helperTextClasses = cx(`${prefix}--form__helper-text`, {
|
|
87
87
|
[`${prefix}--form__helper-text--disabled`]: disabled
|
|
88
88
|
});
|
|
89
|
-
const inputClasses =
|
|
89
|
+
const inputClasses = cx(`${prefix}--date-picker__input`, {
|
|
90
90
|
[`${prefix}--date-picker__input--${size}`]: size,
|
|
91
91
|
[`${prefix}--date-picker__input--invalid`]: invalid,
|
|
92
92
|
[`${prefix}--date-picker__input--warn`]: warn
|
|
93
93
|
});
|
|
94
|
-
const containerClasses =
|
|
94
|
+
const containerClasses = cx(`${prefix}--date-picker-container`, {
|
|
95
95
|
[`${prefix}--date-picker--nolabel`]: !labelText,
|
|
96
96
|
[`${prefix}--date-picker--fluid--invalid`]: isFluid && invalid,
|
|
97
97
|
[`${prefix}--date-picker--fluid--warn`]: isFluid && warn
|
|
@@ -108,7 +108,7 @@ const DatePickerInput = /*#__PURE__*/React__default["default"].forwardRef(functi
|
|
|
108
108
|
if (invalid) {
|
|
109
109
|
inputProps['data-invalid'] = true;
|
|
110
110
|
}
|
|
111
|
-
const input = /*#__PURE__*/
|
|
111
|
+
const input = /*#__PURE__*/React.createElement("input", inputProps);
|
|
112
112
|
|
|
113
113
|
// AILabel always size `mini`
|
|
114
114
|
const candidate = slug ?? decorator;
|
|
@@ -116,33 +116,33 @@ const DatePickerInput = /*#__PURE__*/React__default["default"].forwardRef(functi
|
|
|
116
116
|
const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/React.cloneElement(candidate, {
|
|
117
117
|
size: 'mini'
|
|
118
118
|
}) : null;
|
|
119
|
-
return /*#__PURE__*/
|
|
119
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
120
120
|
className: containerClasses
|
|
121
|
-
}, labelText && /*#__PURE__*/
|
|
121
|
+
}, labelText && /*#__PURE__*/React.createElement(Text.Text, {
|
|
122
122
|
as: "label",
|
|
123
123
|
htmlFor: id,
|
|
124
124
|
className: labelClasses
|
|
125
|
-
}, labelText), /*#__PURE__*/
|
|
125
|
+
}, labelText), /*#__PURE__*/React.createElement("div", {
|
|
126
126
|
className: wrapperClasses
|
|
127
|
-
}, /*#__PURE__*/
|
|
127
|
+
}, /*#__PURE__*/React.createElement("span", null, input, slug ? normalizedDecorator : decorator ? /*#__PURE__*/React.createElement("div", {
|
|
128
128
|
className: `${prefix}--date-picker-input-inner-wrapper--decorator`
|
|
129
|
-
}, normalizedDecorator) : '', isFluid && /*#__PURE__*/
|
|
129
|
+
}, normalizedDecorator) : '', isFluid && /*#__PURE__*/React.createElement(DatePickerIcon, {
|
|
130
130
|
datePickerType: datePickerType
|
|
131
|
-
}), /*#__PURE__*/
|
|
131
|
+
}), /*#__PURE__*/React.createElement(DatePickerIcon, {
|
|
132
132
|
datePickerType: datePickerType,
|
|
133
133
|
invalid: invalid,
|
|
134
134
|
warn: warn
|
|
135
|
-
}))), invalid && /*#__PURE__*/
|
|
135
|
+
}))), invalid && /*#__PURE__*/React.createElement(React.Fragment, null, isFluid && /*#__PURE__*/React.createElement("hr", {
|
|
136
136
|
className: `${prefix}--date-picker__divider`
|
|
137
|
-
}), /*#__PURE__*/
|
|
137
|
+
}), /*#__PURE__*/React.createElement(Text.Text, {
|
|
138
138
|
as: "div",
|
|
139
139
|
className: `${prefix}--form-requirement`
|
|
140
|
-
}, invalidText)), warn && /*#__PURE__*/
|
|
140
|
+
}, invalidText)), warn && /*#__PURE__*/React.createElement(React.Fragment, null, isFluid && /*#__PURE__*/React.createElement("hr", {
|
|
141
141
|
className: `${prefix}--date-picker__divider`
|
|
142
|
-
}), /*#__PURE__*/
|
|
142
|
+
}), /*#__PURE__*/React.createElement(Text.Text, {
|
|
143
143
|
as: "div",
|
|
144
144
|
className: `${prefix}--form-requirement`
|
|
145
|
-
}, warnText)), helperText && !invalid && /*#__PURE__*/
|
|
145
|
+
}, warnText)), helperText && !invalid && /*#__PURE__*/React.createElement(Text.Text, {
|
|
146
146
|
as: "div",
|
|
147
147
|
id: datePickerInputHelperId,
|
|
148
148
|
className: helperTextClasses
|
|
@@ -156,49 +156,49 @@ DatePickerInput.propTypes = {
|
|
|
156
156
|
* * `single` - With calendar dropdown and single date.
|
|
157
157
|
* * `range` - With calendar dropdown and a date range.
|
|
158
158
|
*/
|
|
159
|
-
datePickerType:
|
|
159
|
+
datePickerType: PropTypes.oneOf(['simple', 'single', 'range']),
|
|
160
160
|
/**
|
|
161
161
|
* **Experimental**: Provide a decorator component to be rendered inside the `RadioButton` component
|
|
162
162
|
*/
|
|
163
|
-
decorator:
|
|
163
|
+
decorator: PropTypes.node,
|
|
164
164
|
/**
|
|
165
165
|
* Specify whether or not the input should be disabled
|
|
166
166
|
*/
|
|
167
|
-
disabled:
|
|
167
|
+
disabled: PropTypes.bool,
|
|
168
168
|
/**
|
|
169
169
|
* Provide text that is used alongside the control label for additional help
|
|
170
170
|
*/
|
|
171
|
-
helperText:
|
|
171
|
+
helperText: PropTypes.node,
|
|
172
172
|
/**
|
|
173
173
|
* Specify if the label should be hidden
|
|
174
174
|
*/
|
|
175
|
-
hideLabel:
|
|
175
|
+
hideLabel: PropTypes.bool,
|
|
176
176
|
/**
|
|
177
177
|
* Specify an id that uniquely identifies the `<input>`
|
|
178
178
|
*/
|
|
179
|
-
id:
|
|
179
|
+
id: PropTypes.string.isRequired,
|
|
180
180
|
/**
|
|
181
181
|
* Specify whether or not the input should be invalid
|
|
182
182
|
*/
|
|
183
|
-
invalid:
|
|
183
|
+
invalid: PropTypes.bool,
|
|
184
184
|
/**
|
|
185
185
|
* Specify the text to be rendered when the input is invalid
|
|
186
186
|
*/
|
|
187
|
-
invalidText:
|
|
187
|
+
invalidText: PropTypes.node,
|
|
188
188
|
/**
|
|
189
189
|
* Provide the text that will be read by a screen reader when visiting this
|
|
190
190
|
* control
|
|
191
191
|
*/
|
|
192
|
-
labelText:
|
|
192
|
+
labelText: PropTypes.node.isRequired,
|
|
193
193
|
/**
|
|
194
194
|
* Specify an `onChange` handler that is called whenever a change in the
|
|
195
195
|
* input field has occurred
|
|
196
196
|
*/
|
|
197
|
-
onChange:
|
|
197
|
+
onChange: PropTypes.func,
|
|
198
198
|
/**
|
|
199
199
|
* Provide a function to be called when the input field is clicked
|
|
200
200
|
*/
|
|
201
|
-
onClick:
|
|
201
|
+
onClick: PropTypes.func,
|
|
202
202
|
/**
|
|
203
203
|
* Provide a regular expression that the input value must match
|
|
204
204
|
*/
|
|
@@ -215,28 +215,28 @@ DatePickerInput.propTypes = {
|
|
|
215
215
|
/**
|
|
216
216
|
* Specify the placeholder text
|
|
217
217
|
*/
|
|
218
|
-
placeholder:
|
|
218
|
+
placeholder: PropTypes.string,
|
|
219
219
|
/**
|
|
220
220
|
* whether the DatePicker is to be readOnly
|
|
221
221
|
*/
|
|
222
|
-
readOnly:
|
|
222
|
+
readOnly: PropTypes.bool,
|
|
223
223
|
/**
|
|
224
224
|
* Specify the size of the Date Picker Input. Currently supports either `sm`, `md`, or `lg` as an option.
|
|
225
225
|
*/
|
|
226
|
-
size:
|
|
227
|
-
slug: deprecate.deprecate(
|
|
226
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
227
|
+
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.'),
|
|
228
228
|
/**
|
|
229
229
|
* Specify the type of the `<input>`
|
|
230
230
|
*/
|
|
231
|
-
type:
|
|
231
|
+
type: PropTypes.string,
|
|
232
232
|
/**
|
|
233
233
|
* Specify whether the control is currently in warning state
|
|
234
234
|
*/
|
|
235
|
-
warn:
|
|
235
|
+
warn: PropTypes.bool,
|
|
236
236
|
/**
|
|
237
237
|
* Provide the text that is displayed when the control is in warning state
|
|
238
238
|
*/
|
|
239
|
-
warnText:
|
|
239
|
+
warnText: PropTypes.node
|
|
240
240
|
};
|
|
241
241
|
function DatePickerIcon({
|
|
242
242
|
datePickerType,
|
|
@@ -253,16 +253,16 @@ function DatePickerIcon({
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
if (invalid) {
|
|
256
|
-
return /*#__PURE__*/
|
|
256
|
+
return /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
|
|
257
257
|
className: `${prefix}--date-picker__icon ${prefix}--date-picker__icon--invalid`
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
if (!invalid && warn) {
|
|
261
|
-
return /*#__PURE__*/
|
|
261
|
+
return /*#__PURE__*/React.createElement(iconsReact.WarningAltFilled, {
|
|
262
262
|
className: `${prefix}--date-picker__icon ${prefix}--date-picker__icon--warn`
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
|
-
return /*#__PURE__*/
|
|
265
|
+
return /*#__PURE__*/React.createElement(iconsReact.Calendar, {
|
|
266
266
|
className: `${prefix}--date-picker__icon`,
|
|
267
267
|
role: "img",
|
|
268
268
|
"aria-hidden": "true"
|
|
@@ -276,15 +276,15 @@ DatePickerIcon.propTypes = {
|
|
|
276
276
|
* * `single` - With calendar dropdown and single date.
|
|
277
277
|
* * `range` - With calendar dropdown and a date range.
|
|
278
278
|
*/
|
|
279
|
-
datePickerType:
|
|
279
|
+
datePickerType: PropTypes.oneOf(['simple', 'single', 'range']),
|
|
280
280
|
/**
|
|
281
281
|
* Specify whether or not the input should be invalid
|
|
282
282
|
*/
|
|
283
|
-
invalid:
|
|
283
|
+
invalid: PropTypes.bool,
|
|
284
284
|
/**
|
|
285
285
|
* Specify whether the control is currently in warning state
|
|
286
286
|
*/
|
|
287
|
-
warn:
|
|
287
|
+
warn: PropTypes.bool
|
|
288
288
|
};
|
|
289
289
|
|
|
290
|
-
exports
|
|
290
|
+
exports.default = DatePickerInput;
|
|
@@ -13,5 +13,5 @@ var DatePickerInput = require('./DatePickerInput.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.DatePickerInput = DatePickerInput
|
|
17
|
-
exports
|
|
16
|
+
exports.DatePickerInput = DatePickerInput.default;
|
|
17
|
+
exports.default = DatePickerInput.default;
|