@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
|
@@ -28,12 +28,6 @@ var index$1 = require('../AILabel/index.js');
|
|
|
28
28
|
var utils = require('../../internal/utils.js');
|
|
29
29
|
var ListBoxPropTypes = require('../ListBox/ListBoxPropTypes.js');
|
|
30
30
|
|
|
31
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
32
|
-
|
|
33
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
34
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
35
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
36
|
-
|
|
37
31
|
const {
|
|
38
32
|
ItemMouseMove,
|
|
39
33
|
MenuMouseLeave
|
|
@@ -86,7 +80,7 @@ function stateReducer(state, actionAndChanges) {
|
|
|
86
80
|
return changes;
|
|
87
81
|
}
|
|
88
82
|
}
|
|
89
|
-
const Dropdown = /*#__PURE__*/
|
|
83
|
+
const Dropdown = /*#__PURE__*/React.forwardRef(({
|
|
90
84
|
autoAlign = false,
|
|
91
85
|
className: containerClassName,
|
|
92
86
|
decorator,
|
|
@@ -222,7 +216,7 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(({
|
|
|
222
216
|
const inline = type === 'inline';
|
|
223
217
|
const showWarning = !invalid && warn;
|
|
224
218
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
225
|
-
const className =
|
|
219
|
+
const className = cx(`${prefix}--dropdown`, {
|
|
226
220
|
[`${prefix}--dropdown--invalid`]: invalid,
|
|
227
221
|
[`${prefix}--dropdown--warning`]: showWarning,
|
|
228
222
|
[`${prefix}--dropdown--open`]: isOpen,
|
|
@@ -235,14 +229,14 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(({
|
|
|
235
229
|
[`${prefix}--list-box--up`]: direction === 'top',
|
|
236
230
|
[`${prefix}--autoalign`]: autoAlign
|
|
237
231
|
});
|
|
238
|
-
const titleClasses =
|
|
232
|
+
const titleClasses = cx(`${prefix}--label`, {
|
|
239
233
|
[`${prefix}--label--disabled`]: disabled,
|
|
240
234
|
[`${prefix}--visually-hidden`]: hideLabel
|
|
241
235
|
});
|
|
242
|
-
const helperClasses =
|
|
236
|
+
const helperClasses = cx(`${prefix}--form__helper-text`, {
|
|
243
237
|
[`${prefix}--form__helper-text--disabled`]: disabled
|
|
244
238
|
});
|
|
245
|
-
const wrapperClasses =
|
|
239
|
+
const wrapperClasses = cx(`${prefix}--dropdown__wrapper`, `${prefix}--list-box__wrapper`, containerClassName, {
|
|
246
240
|
[`${prefix}--dropdown__wrapper--inline`]: inline,
|
|
247
241
|
[`${prefix}--list-box__wrapper--inline`]: inline,
|
|
248
242
|
[`${prefix}--dropdown__wrapper--inline--invalid`]: inline && invalid,
|
|
@@ -258,14 +252,14 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(({
|
|
|
258
252
|
const toggleButtonProps = getToggleButtonProps({
|
|
259
253
|
'aria-label': ariaLabel || deprecatedAriaLabel
|
|
260
254
|
});
|
|
261
|
-
const helper = helperText && !isFluid ? /*#__PURE__*/
|
|
255
|
+
const helper = helperText && !isFluid ? /*#__PURE__*/React.createElement("div", {
|
|
262
256
|
id: helperId,
|
|
263
257
|
className: helperClasses
|
|
264
258
|
}, helperText) : null;
|
|
265
259
|
const handleFocus = evt => {
|
|
266
260
|
setIsFocused(evt.type === 'focus' && !selectedItem ? true : false);
|
|
267
261
|
};
|
|
268
|
-
const mergedRef = mergeRefs
|
|
262
|
+
const mergedRef = mergeRefs.default(toggleButtonProps.ref, ref);
|
|
269
263
|
const [currTimer, setCurrTimer] = React.useState();
|
|
270
264
|
const [isTyping, setIsTyping] = React.useState(false);
|
|
271
265
|
const onKeyDownHandler = React.useCallback(evt => {
|
|
@@ -329,11 +323,11 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(({
|
|
|
329
323
|
const labelProps = /*#__PURE__*/React.isValidElement(titleText) ? {
|
|
330
324
|
id: allLabelProps.id
|
|
331
325
|
} : allLabelProps;
|
|
332
|
-
return /*#__PURE__*/
|
|
326
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
333
327
|
className: wrapperClasses
|
|
334
|
-
}, other), titleText && /*#__PURE__*/
|
|
328
|
+
}, other), titleText && /*#__PURE__*/React.createElement("label", _rollupPluginBabelHelpers.extends({
|
|
335
329
|
className: titleClasses
|
|
336
|
-
}, labelProps), titleText), /*#__PURE__*/
|
|
330
|
+
}, labelProps), titleText), /*#__PURE__*/React.createElement(index$2.default, {
|
|
337
331
|
onFocus: handleFocus,
|
|
338
332
|
onBlur: handleFocus,
|
|
339
333
|
size: size,
|
|
@@ -346,11 +340,11 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(({
|
|
|
346
340
|
isOpen: isOpen,
|
|
347
341
|
ref: enableFloatingStyles || autoAlign ? refs.setReference : null,
|
|
348
342
|
id: id
|
|
349
|
-
}, invalid && /*#__PURE__*/
|
|
343
|
+
}, invalid && /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
|
|
350
344
|
className: `${prefix}--list-box__invalid-icon`
|
|
351
|
-
}), showWarning && /*#__PURE__*/
|
|
345
|
+
}), showWarning && /*#__PURE__*/React.createElement(iconsReact.WarningAltFilled, {
|
|
352
346
|
className: `${prefix}--list-box__invalid-icon ${prefix}--list-box__invalid-icon--warning`
|
|
353
|
-
}), /*#__PURE__*/
|
|
347
|
+
}), /*#__PURE__*/React.createElement("button", _rollupPluginBabelHelpers.extends({
|
|
354
348
|
type: "button"
|
|
355
349
|
// aria-expanded is already being passed through {...toggleButtonProps}
|
|
356
350
|
,
|
|
@@ -362,29 +356,29 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef(({
|
|
|
362
356
|
title: selectedItem && itemToString !== undefined ? itemToString(selectedItem) : defaultItemToString(label)
|
|
363
357
|
}, toggleButtonProps, readOnlyEventHandlers, {
|
|
364
358
|
ref: mergedRef
|
|
365
|
-
}), /*#__PURE__*/
|
|
359
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
366
360
|
className: `${prefix}--list-box__label`
|
|
367
|
-
}, selectedItem ? renderSelectedItem ? renderSelectedItem(selectedItem) : itemToString(selectedItem) : label), /*#__PURE__*/
|
|
361
|
+
}, selectedItem ? renderSelectedItem ? renderSelectedItem(selectedItem) : itemToString(selectedItem) : label), /*#__PURE__*/React.createElement(index$2.default.MenuIcon, {
|
|
368
362
|
isOpen: isOpen,
|
|
369
363
|
translateWithId: translateWithId
|
|
370
|
-
})), slug ? normalizedDecorator : decorator ? /*#__PURE__*/
|
|
364
|
+
})), slug ? normalizedDecorator : decorator ? /*#__PURE__*/React.createElement("div", {
|
|
371
365
|
className: `${prefix}--list-box__inner-wrapper--decorator`
|
|
372
|
-
}, normalizedDecorator) : '', /*#__PURE__*/
|
|
366
|
+
}, normalizedDecorator) : '', /*#__PURE__*/React.createElement(index$2.default.Menu, menuProps, isOpen && items.map((item, index) => {
|
|
373
367
|
const isObject = item !== null && typeof item === 'object';
|
|
374
368
|
const itemProps = getItemProps({
|
|
375
369
|
item,
|
|
376
370
|
index
|
|
377
371
|
});
|
|
378
372
|
const title = isObject && 'text' in item && itemToElement ? item.text : itemToString(item);
|
|
379
|
-
return /*#__PURE__*/
|
|
373
|
+
return /*#__PURE__*/React.createElement(index$2.default.MenuItem, _rollupPluginBabelHelpers.extends({
|
|
380
374
|
key: itemProps.id,
|
|
381
375
|
isActive: selectedItem === item,
|
|
382
376
|
isHighlighted: highlightedIndex === index,
|
|
383
377
|
title: title,
|
|
384
378
|
disabled: itemProps['aria-disabled']
|
|
385
|
-
}, itemProps), typeof item === 'object' && ItemToElement !== undefined && ItemToElement !== null ? /*#__PURE__*/
|
|
379
|
+
}, itemProps), typeof item === 'object' && ItemToElement !== undefined && ItemToElement !== null ? /*#__PURE__*/React.createElement(ItemToElement, _rollupPluginBabelHelpers.extends({
|
|
386
380
|
key: itemProps.id
|
|
387
|
-
}, item)) : itemToString(item), selectedItem === item && /*#__PURE__*/
|
|
381
|
+
}, item)) : itemToString(item), selectedItem === item && /*#__PURE__*/React.createElement(iconsReact.Checkmark, {
|
|
388
382
|
className: `${prefix}--list-box__menu-item__selected-icon`
|
|
389
383
|
}));
|
|
390
384
|
}))), !inline && !invalid && !warn && helper);
|
|
@@ -399,32 +393,32 @@ Dropdown.propTypes = {
|
|
|
399
393
|
* 'aria-label' of the ListBox component.
|
|
400
394
|
* Specify a label to be read by screen readers on the container node
|
|
401
395
|
*/
|
|
402
|
-
['aria-label']:
|
|
396
|
+
['aria-label']: PropTypes.string,
|
|
403
397
|
/**
|
|
404
398
|
* Deprecated, please use `aria-label` instead.
|
|
405
399
|
* Specify a label to be read by screen readers on the container note.
|
|
406
400
|
*/
|
|
407
|
-
ariaLabel: deprecate.deprecate(
|
|
401
|
+
ariaLabel: deprecate.deprecate(PropTypes.string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
408
402
|
/**
|
|
409
403
|
* **Experimental**: Will attempt to automatically align the floating element to avoid collisions with the viewport and being clipped by ancestor elements.
|
|
410
404
|
*/
|
|
411
|
-
autoAlign:
|
|
405
|
+
autoAlign: PropTypes.bool,
|
|
412
406
|
/**
|
|
413
407
|
* Provide a custom className to be applied on the cds--dropdown node
|
|
414
408
|
*/
|
|
415
|
-
className:
|
|
409
|
+
className: PropTypes.string,
|
|
416
410
|
/**
|
|
417
411
|
* **Experimental**: Provide a `decorator` component to be rendered inside the `Dropdown` component
|
|
418
412
|
*/
|
|
419
|
-
decorator:
|
|
413
|
+
decorator: PropTypes.node,
|
|
420
414
|
/**
|
|
421
415
|
* Specify the direction of the dropdown. Can be either top or bottom.
|
|
422
416
|
*/
|
|
423
|
-
direction:
|
|
417
|
+
direction: PropTypes.oneOf(['top', 'bottom']),
|
|
424
418
|
/**
|
|
425
419
|
* Disable the control
|
|
426
420
|
*/
|
|
427
|
-
disabled:
|
|
421
|
+
disabled: PropTypes.bool,
|
|
428
422
|
/**
|
|
429
423
|
* Additional props passed to Downshift.
|
|
430
424
|
*
|
|
@@ -433,76 +427,76 @@ Dropdown.propTypes = {
|
|
|
433
427
|
* change, and in some cases they can not be shimmed by Carbon to shield you
|
|
434
428
|
* from potentially breaking changes.
|
|
435
429
|
*/
|
|
436
|
-
downshiftProps:
|
|
430
|
+
downshiftProps: PropTypes.object,
|
|
437
431
|
/**
|
|
438
432
|
* Provide helper text that is used alongside the control label for
|
|
439
433
|
* additional help
|
|
440
434
|
*/
|
|
441
|
-
helperText:
|
|
435
|
+
helperText: PropTypes.node,
|
|
442
436
|
/**
|
|
443
437
|
* Specify whether the title text should be hidden or not
|
|
444
438
|
*/
|
|
445
|
-
hideLabel:
|
|
439
|
+
hideLabel: PropTypes.bool,
|
|
446
440
|
/**
|
|
447
441
|
* Specify a custom `id`
|
|
448
442
|
*/
|
|
449
|
-
id:
|
|
443
|
+
id: PropTypes.string.isRequired,
|
|
450
444
|
/**
|
|
451
445
|
* Allow users to pass in an arbitrary item or a string (in case their items are an array of strings)
|
|
452
446
|
* from their collection that are pre-selected
|
|
453
447
|
*/
|
|
454
|
-
initialSelectedItem:
|
|
448
|
+
initialSelectedItem: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.number]),
|
|
455
449
|
/**
|
|
456
450
|
* Specify if the currently selected value is invalid.
|
|
457
451
|
*/
|
|
458
|
-
invalid:
|
|
452
|
+
invalid: PropTypes.bool,
|
|
459
453
|
/**
|
|
460
454
|
* Message which is displayed if the value is invalid.
|
|
461
455
|
*/
|
|
462
|
-
invalidText:
|
|
456
|
+
invalidText: PropTypes.node,
|
|
463
457
|
/**
|
|
464
458
|
* Function to render items as custom components instead of strings.
|
|
465
459
|
* Defaults to null and is overridden by a getter
|
|
466
460
|
*/
|
|
467
|
-
itemToElement:
|
|
461
|
+
itemToElement: PropTypes.func,
|
|
468
462
|
/**
|
|
469
463
|
* Helper function passed to downshift that allows the library to render a
|
|
470
464
|
* given item to a string label. By default, it extracts the `label` field
|
|
471
465
|
* from a given item to serve as the item label in the list.
|
|
472
466
|
*/
|
|
473
|
-
itemToString:
|
|
467
|
+
itemToString: PropTypes.func,
|
|
474
468
|
/**
|
|
475
469
|
* We try to stay as generic as possible here to allow individuals to pass
|
|
476
470
|
* in a collection of whatever kind of data structure they prefer
|
|
477
471
|
*/
|
|
478
|
-
items:
|
|
472
|
+
items: PropTypes.array.isRequired,
|
|
479
473
|
/**
|
|
480
474
|
* Generic `label` that will be used as the textual representation of what
|
|
481
475
|
* this field is for
|
|
482
476
|
*/
|
|
483
|
-
label:
|
|
477
|
+
label: PropTypes.node.isRequired,
|
|
484
478
|
/**
|
|
485
479
|
* `true` to use the light version.
|
|
486
480
|
*/
|
|
487
|
-
light: deprecate.deprecate(
|
|
481
|
+
light: deprecate.deprecate(PropTypes.bool, 'The `light` prop for `Dropdown` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
488
482
|
/**
|
|
489
483
|
* `onChange` is a utility for this controlled component to communicate to a
|
|
490
484
|
* consuming component what kind of internal state changes are occurring.
|
|
491
485
|
*/
|
|
492
|
-
onChange:
|
|
486
|
+
onChange: PropTypes.func,
|
|
493
487
|
/**
|
|
494
488
|
* Whether or not the Dropdown is readonly
|
|
495
489
|
*/
|
|
496
|
-
readOnly:
|
|
490
|
+
readOnly: PropTypes.bool,
|
|
497
491
|
/**
|
|
498
492
|
* An optional callback to render the currently selected item as a react element instead of only
|
|
499
493
|
* as a string.
|
|
500
494
|
*/
|
|
501
|
-
renderSelectedItem:
|
|
495
|
+
renderSelectedItem: PropTypes.func,
|
|
502
496
|
/**
|
|
503
497
|
* In the case you want to control the dropdown selection entirely.
|
|
504
498
|
*/
|
|
505
|
-
selectedItem:
|
|
499
|
+
selectedItem: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.number]),
|
|
506
500
|
/**
|
|
507
501
|
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
508
502
|
*/
|
|
@@ -510,16 +504,16 @@ Dropdown.propTypes = {
|
|
|
510
504
|
/**
|
|
511
505
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `Dropdown` component
|
|
512
506
|
*/
|
|
513
|
-
slug: deprecate.deprecate(
|
|
507
|
+
slug: deprecate.deprecate(PropTypes.node, 'The `slug` prop for `Dropdown` has ' + 'been deprecated in favor of the new `decorator` prop. It will be removed in the next major release.'),
|
|
514
508
|
/**
|
|
515
509
|
* Provide the title text that will be read by a screen reader when
|
|
516
510
|
* visiting this control
|
|
517
511
|
*/
|
|
518
|
-
titleText:
|
|
512
|
+
titleText: PropTypes.node.isRequired,
|
|
519
513
|
/**
|
|
520
514
|
* Callback function for translating ListBoxMenuIcon SVG title
|
|
521
515
|
*/
|
|
522
|
-
translateWithId:
|
|
516
|
+
translateWithId: PropTypes.func,
|
|
523
517
|
/**
|
|
524
518
|
* The dropdown type, `default` or `inline`
|
|
525
519
|
*/
|
|
@@ -527,11 +521,11 @@ Dropdown.propTypes = {
|
|
|
527
521
|
/**
|
|
528
522
|
* Specify whether the control is currently in warning state
|
|
529
523
|
*/
|
|
530
|
-
warn:
|
|
524
|
+
warn: PropTypes.bool,
|
|
531
525
|
/**
|
|
532
526
|
* Provide the text that is displayed when the control is in warning state
|
|
533
527
|
*/
|
|
534
|
-
warnText:
|
|
528
|
+
warnText: PropTypes.node
|
|
535
529
|
};
|
|
536
530
|
|
|
537
|
-
exports
|
|
531
|
+
exports.default = Dropdown;
|
|
@@ -14,6 +14,6 @@ var Dropdown_Skeleton = require('./Dropdown.Skeleton.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.Dropdown = Dropdown
|
|
18
|
-
exports
|
|
19
|
-
exports.DropdownSkeleton = Dropdown_Skeleton
|
|
17
|
+
exports.Dropdown = Dropdown.default;
|
|
18
|
+
exports.default = Dropdown.default;
|
|
19
|
+
exports.DropdownSkeleton = Dropdown_Skeleton.default;
|
|
@@ -14,11 +14,6 @@ var React = require('react');
|
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var ErrorBoundaryContext = require('./ErrorBoundaryContext.js');
|
|
16
16
|
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
|
-
|
|
22
17
|
/**
|
|
23
18
|
* React introduced additional lifecycle methods in v16 for capturing errors
|
|
24
19
|
* that occur in a specific sub-tree of components. This component helps to
|
|
@@ -37,7 +32,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
37
32
|
* https://reactjs.org/docs/error-boundaries.html#introducing-error-boundaries
|
|
38
33
|
*/
|
|
39
34
|
|
|
40
|
-
class ErrorBoundary extends
|
|
35
|
+
class ErrorBoundary extends React.Component {
|
|
41
36
|
constructor(...args) {
|
|
42
37
|
super(...args);
|
|
43
38
|
_rollupPluginBabelHelpers.defineProperty(this, "context", void 0);
|
|
@@ -68,9 +63,9 @@ class ErrorBoundary extends React__default["default"].Component {
|
|
|
68
63
|
}
|
|
69
64
|
}
|
|
70
65
|
_rollupPluginBabelHelpers.defineProperty(ErrorBoundary, "propTypes", {
|
|
71
|
-
children:
|
|
72
|
-
fallback:
|
|
66
|
+
children: PropTypes.node,
|
|
67
|
+
fallback: PropTypes.node
|
|
73
68
|
});
|
|
74
69
|
_rollupPluginBabelHelpers.defineProperty(ErrorBoundary, "contextType", ErrorBoundaryContext.ErrorBoundaryContext);
|
|
75
70
|
|
|
76
|
-
exports
|
|
71
|
+
exports.default = ErrorBoundary;
|
|
@@ -20,12 +20,7 @@ var keys = require('../../internal/keyboard/keys.js');
|
|
|
20
20
|
var match = require('../../internal/keyboard/match.js');
|
|
21
21
|
var mergeRefs = require('../../tools/mergeRefs.js');
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
27
|
-
|
|
28
|
-
const ExpandableSearch = /*#__PURE__*/React__default["default"].forwardRef(function ExpandableSearch({
|
|
23
|
+
const ExpandableSearch = /*#__PURE__*/React.forwardRef(function ExpandableSearch({
|
|
29
24
|
onBlur,
|
|
30
25
|
onChange,
|
|
31
26
|
onExpand,
|
|
@@ -64,13 +59,13 @@ const ExpandableSearch = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
|
64
59
|
}
|
|
65
60
|
}
|
|
66
61
|
}
|
|
67
|
-
const classes =
|
|
62
|
+
const classes = cx(`${prefix}--search--expandable`, {
|
|
68
63
|
[`${prefix}--search--expanded`]: expanded
|
|
69
64
|
}, props.className);
|
|
70
|
-
return /*#__PURE__*/
|
|
65
|
+
return /*#__PURE__*/React.createElement(Search.default, _rollupPluginBabelHelpers.extends({}, props, {
|
|
71
66
|
defaultValue: defaultValue,
|
|
72
67
|
isExpanded: expanded,
|
|
73
|
-
ref: mergeRefs
|
|
68
|
+
ref: mergeRefs.default(searchRef, forwardedRef),
|
|
74
69
|
className: classes,
|
|
75
70
|
onBlur: events.composeEventHandlers([onBlur, handleBlur]),
|
|
76
71
|
onChange: events.composeEventHandlers([onChange, handleChange]),
|
|
@@ -78,7 +73,7 @@ const ExpandableSearch = /*#__PURE__*/React__default["default"].forwardRef(funct
|
|
|
78
73
|
onKeyDown: events.composeEventHandlers([onKeyDown, handleKeyDown])
|
|
79
74
|
}));
|
|
80
75
|
});
|
|
81
|
-
ExpandableSearch.propTypes = Search
|
|
76
|
+
ExpandableSearch.propTypes = Search.default.propTypes;
|
|
82
77
|
ExpandableSearch.displayName = 'ExpandableSearch';
|
|
83
78
|
|
|
84
|
-
exports
|
|
79
|
+
exports.default = ExpandableSearch;
|
|
@@ -7,18 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var FeatureFlags$1 = require('@carbon/feature-flags');
|
|
13
11
|
var PropTypes = require('prop-types');
|
|
14
12
|
var React = require('react');
|
|
15
13
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
16
14
|
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
20
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
|
|
22
15
|
/**
|
|
23
16
|
* Our FeatureFlagContext is used alongside the FeatureFlags component to enable
|
|
24
17
|
* or disable feature flags in a given React tree
|
|
@@ -73,23 +66,23 @@ function FeatureFlags({
|
|
|
73
66
|
scope.mergeWithScope(parentScope);
|
|
74
67
|
updateScope(scope);
|
|
75
68
|
});
|
|
76
|
-
return /*#__PURE__*/
|
|
69
|
+
return /*#__PURE__*/React.createElement(FeatureFlagContext.Provider, {
|
|
77
70
|
value: scope
|
|
78
71
|
}, children);
|
|
79
72
|
}
|
|
80
73
|
FeatureFlags.propTypes = {
|
|
81
|
-
children:
|
|
74
|
+
children: PropTypes.node,
|
|
82
75
|
/**
|
|
83
76
|
* Provide the feature flags to enabled or disabled in the current Rea,ct tree
|
|
84
77
|
*/
|
|
85
|
-
flags: deprecate.deprecate(
|
|
86
|
-
enableV12TileDefaultIcons:
|
|
87
|
-
enableV12TileRadioIcons:
|
|
88
|
-
enableV12Overflowmenu:
|
|
89
|
-
enableTreeviewControllable:
|
|
90
|
-
enableExperimentalFocusWrapWithoutSentinels:
|
|
91
|
-
enableDialogElement:
|
|
92
|
-
enableV12DynamicFloatingStyles:
|
|
78
|
+
flags: deprecate.deprecate(PropTypes.objectOf(PropTypes.bool), 'The `flags` prop for `FeatureFlag` has ' + 'been deprecated. Please run the `featureflag-deprecate-flags-prop` codemod to migrate to individual boolean props.' + `npx @carbon/upgrade migrate featureflag-deprecate-flags-prop --write`),
|
|
79
|
+
enableV12TileDefaultIcons: PropTypes.bool,
|
|
80
|
+
enableV12TileRadioIcons: PropTypes.bool,
|
|
81
|
+
enableV12Overflowmenu: PropTypes.bool,
|
|
82
|
+
enableTreeviewControllable: PropTypes.bool,
|
|
83
|
+
enableExperimentalFocusWrapWithoutSentinels: PropTypes.bool,
|
|
84
|
+
enableDialogElement: PropTypes.bool,
|
|
85
|
+
enableV12DynamicFloatingStyles: PropTypes.bool
|
|
93
86
|
};
|
|
94
87
|
|
|
95
88
|
/**
|
|
@@ -17,34 +17,28 @@ var SkeletonText = require('../SkeletonText/SkeletonText.js');
|
|
|
17
17
|
var Button_Skeleton = require('../Button/Button.Skeleton.js');
|
|
18
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
19
|
|
|
20
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
|
-
|
|
22
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
23
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
25
|
-
|
|
26
20
|
var _SkeletonText, _ButtonSkeleton;
|
|
27
21
|
function FileUploaderSkeleton({
|
|
28
22
|
className,
|
|
29
23
|
...rest
|
|
30
24
|
}) {
|
|
31
25
|
const prefix = usePrefix.usePrefix();
|
|
32
|
-
return /*#__PURE__*/
|
|
33
|
-
className:
|
|
34
|
-
}, rest), _SkeletonText || (_SkeletonText = /*#__PURE__*/
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
27
|
+
className: cx(`${prefix}--form-item`, className)
|
|
28
|
+
}, rest), _SkeletonText || (_SkeletonText = /*#__PURE__*/React.createElement(SkeletonText.default, {
|
|
35
29
|
heading: true,
|
|
36
30
|
width: "100px"
|
|
37
|
-
})), /*#__PURE__*/
|
|
31
|
+
})), /*#__PURE__*/React.createElement(SkeletonText.default, {
|
|
38
32
|
width: "225px",
|
|
39
33
|
className: `${prefix}--label-description`
|
|
40
|
-
}), _ButtonSkeleton || (_ButtonSkeleton = /*#__PURE__*/
|
|
34
|
+
}), _ButtonSkeleton || (_ButtonSkeleton = /*#__PURE__*/React.createElement(Button_Skeleton.default, null)));
|
|
41
35
|
}
|
|
42
36
|
FileUploaderSkeleton.propTypes = {
|
|
43
37
|
/**
|
|
44
38
|
* Specify an optional className to add.
|
|
45
39
|
*/
|
|
46
|
-
className:
|
|
40
|
+
className: PropTypes.string
|
|
47
41
|
};
|
|
48
42
|
|
|
49
43
|
exports.FileUploaderSkeleton = FileUploaderSkeleton;
|
|
50
|
-
exports
|
|
44
|
+
exports.default = FileUploaderSkeleton;
|