@carbon/react 1.83.0 → 1.84.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +980 -945
- package/README.md +1 -1
- package/es/components/AILabel/index.js +27 -30
- package/es/components/AISkeleton/AISkeletonIcon.js +4 -5
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
- package/es/components/AISkeleton/AISkeletonText.js +4 -5
- package/es/components/Accordion/Accordion.Skeleton.js +9 -10
- package/es/components/Accordion/Accordion.js +10 -11
- package/es/components/Accordion/AccordionItem.js +13 -14
- package/es/components/Accordion/AccordionProvider.js +4 -5
- package/es/components/AspectRatio/AspectRatio.js +7 -8
- package/es/components/BadgeIndicator/index.js +5 -6
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
- package/es/components/Button/Button.Skeleton.js +7 -8
- package/es/components/Button/ButtonBase.js +23 -24
- package/es/components/ChatButton/ChatButton.Skeleton.js +5 -6
- package/es/components/ChatButton/ChatButton.js +11 -12
- package/es/components/Checkbox/Checkbox.Skeleton.js +4 -5
- package/es/components/Checkbox/Checkbox.js +19 -20
- package/es/components/CheckboxGroup/CheckboxGroup.js +16 -17
- package/es/components/ClassPrefix/index.js +4 -5
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
- package/es/components/CodeSnippet/CodeSnippet.js +25 -26
- package/es/components/ComboBox/ComboBox.js +24 -30
- package/es/components/ComboBox/tools/filter.js +9 -12
- package/es/components/ComboButton/index.js +16 -18
- package/es/components/ComposedModal/ComposedModal.js +31 -34
- package/es/components/ComposedModal/ModalFooter.js +37 -42
- package/es/components/ComposedModal/ModalHeader.js +14 -15
- package/es/components/ContainedList/ContainedList.js +10 -11
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
- package/es/components/ContentSwitcher/ContentSwitcher.js +96 -128
- package/es/components/ContentSwitcher/index.d.ts +3 -4
- package/es/components/ContextMenu/useContextMenu.js +1 -2
- package/es/components/Copy/Copy.js +11 -12
- package/es/components/CopyButton/CopyButton.js +10 -11
- package/es/components/DataTable/DataTable.js +45 -53
- package/es/components/DataTable/Table.js +15 -18
- package/es/components/DataTable/TableBatchAction.js +8 -11
- package/es/components/DataTable/TableBatchActions.js +18 -20
- package/es/components/DataTable/TableBody.js +8 -11
- package/es/components/DataTable/TableContainer.js +9 -10
- package/es/components/DataTable/TableDecoratorRow.js +4 -5
- package/es/components/DataTable/TableExpandHeader.js +14 -15
- package/es/components/DataTable/TableExpandRow.js +13 -14
- package/es/components/DataTable/TableExpandedRow.js +6 -7
- package/es/components/DataTable/TableHeader.js +15 -16
- package/es/components/DataTable/TableSelectAll.js +11 -12
- package/es/components/DataTable/TableSelectRow.js +12 -13
- package/es/components/DataTable/TableSlugRow.js +4 -5
- package/es/components/DataTable/TableToolbar.js +7 -8
- package/es/components/DataTable/TableToolbarMenu.js +8 -9
- package/es/components/DataTable/TableToolbarSearch.js +22 -24
- package/es/components/DataTable/state/sorting.js +3 -4
- package/es/components/DataTable/tools/filter.js +10 -12
- package/es/components/DataTable/tools/normalize.js +6 -8
- package/es/components/DataTable/tools/sorting.js +24 -30
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
- package/es/components/DatePicker/DatePicker.Skeleton.js +7 -8
- package/es/components/DatePicker/DatePicker.js +88 -65
- package/es/components/DatePickerInput/DatePickerInput.js +5 -6
- package/es/components/Dialog/index.d.ts +193 -8
- package/es/components/Dialog/index.js +454 -35
- package/es/components/Dropdown/Dropdown.Skeleton.js +6 -7
- package/es/components/Dropdown/Dropdown.js +40 -43
- package/es/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/es/components/ExpandableSearch/ExpandableSearch.js +9 -10
- package/es/components/FeatureFlags/index.js +11 -12
- package/es/components/FileUploader/FileUploader.Skeleton.js +4 -5
- package/es/components/FileUploader/FileUploader.js +22 -24
- package/es/components/FileUploader/FileUploaderButton.js +16 -17
- package/es/components/FileUploader/FileUploaderDropContainer.js +15 -16
- package/es/components/FileUploader/FileUploaderItem.js +13 -14
- package/es/components/FileUploader/Filename.js +9 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
- package/es/components/FluidComboBox/FluidComboBox.js +5 -6
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
- package/es/components/FluidDatePicker/FluidDatePicker.js +10 -11
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
- package/es/components/FluidDropdown/FluidDropdown.js +5 -6
- package/es/components/FluidForm/FluidForm.js +5 -6
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
- package/es/components/FluidNumberInput/FluidNumberInput.js +38 -5
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
- package/es/components/FluidSearch/FluidSearch.js +4 -5
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
- package/es/components/FluidSelect/FluidSelect.js +5 -6
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
- package/es/components/FluidTextArea/FluidTextArea.js +4 -5
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
- package/es/components/FluidTextInput/FluidTextInput.js +5 -6
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
- package/es/components/FluidTimePicker/FluidTimePicker.js +11 -12
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
- package/es/components/Form/Form.js +5 -6
- package/es/components/FormGroup/FormGroup.js +11 -12
- package/es/components/FormItem/FormItem.js +5 -6
- package/es/components/FormLabel/FormLabel.js +6 -7
- package/es/components/Grid/CSSGrid.js +17 -19
- package/es/components/Grid/Column.js +28 -27
- package/es/components/Grid/ColumnHang.js +6 -7
- package/es/components/Grid/FlexGrid.js +9 -10
- package/es/components/Grid/GridContext.js +5 -6
- package/es/components/Grid/Row.js +8 -9
- package/es/components/Heading/index.js +5 -6
- package/es/components/Icon/Icon.Skeleton.js +4 -5
- package/es/components/IconButton/index.js +20 -21
- package/es/components/IconIndicator/index.js +7 -8
- package/es/components/IdPrefix/index.js +4 -5
- package/es/components/InlineLoading/InlineLoading.js +9 -10
- package/es/components/Layer/index.js +8 -9
- package/es/components/Layout/index.js +21 -26
- package/es/components/LayoutDirection/LayoutDirection.js +6 -7
- package/es/components/Link/Link.d.ts +1 -1
- package/es/components/Link/Link.js +14 -15
- package/es/components/ListBox/ListBoxField.js +6 -7
- package/es/components/ListBox/ListBoxMenu.js +5 -6
- package/es/components/ListBox/ListBoxMenuIcon.js +4 -5
- package/es/components/ListBox/ListBoxMenuItem.js +8 -10
- package/es/components/ListBox/ListBoxSelection.js +8 -9
- package/es/components/ListBox/next/ListBoxSelection.js +9 -10
- package/es/components/ListBox/next/ListBoxTrigger.js +5 -6
- package/es/components/ListItem/ListItem.js +5 -6
- package/es/components/Loading/Loading.js +8 -9
- package/es/components/Menu/Menu.js +23 -24
- package/es/components/Menu/MenuItem.js +39 -44
- package/es/components/MenuButton/index.js +16 -18
- package/es/components/Modal/Modal.js +55 -63
- package/es/components/ModalWrapper/ModalWrapper.js +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +46 -48
- package/es/components/MultiSelect/MultiSelect.js +43 -45
- package/es/components/MultiSelect/tools/sorting.js +11 -15
- package/es/components/Notification/Notification.js +96 -105
- package/es/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
- package/es/components/NumberInput/NumberFormatPropTypes.js +40 -0
- package/es/components/NumberInput/NumberInput.Skeleton.js +6 -7
- package/es/components/NumberInput/NumberInput.d.ts +39 -3
- package/es/components/NumberInput/NumberInput.js +174 -44
- package/es/components/OrderedList/OrderedList.js +7 -8
- package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +35 -41
- package/es/components/OverflowMenu/next/index.js +12 -13
- package/es/components/PageHeader/PageHeader.d.ts +29 -5
- package/es/components/PageHeader/PageHeader.js +119 -73
- package/es/components/Pagination/Pagination.Skeleton.js +4 -5
- package/es/components/Pagination/Pagination.js +24 -25
- package/es/components/Pagination/experimental/PageSelector.js +8 -9
- package/es/components/Pagination/experimental/Pagination.js +20 -21
- package/es/components/PaginationNav/PaginationNav.js +33 -38
- package/es/components/Popover/index.js +26 -28
- package/es/components/ProgressBar/ProgressBar.js +11 -12
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
- package/es/components/ProgressIndicator/ProgressIndicator.js +29 -32
- package/es/components/RadioTile/RadioTile.js +17 -18
- package/es/components/Search/Search.Skeleton.js +5 -6
- package/es/components/Search/Search.js +26 -28
- package/es/components/Select/Select.Skeleton.js +5 -6
- package/es/components/Select/Select.js +24 -25
- package/es/components/SelectItem/SelectItem.js +8 -9
- package/es/components/SelectItemGroup/SelectItemGroup.js +7 -8
- package/es/components/ShapeIndicator/index.js +7 -8
- package/es/components/SkeletonIcon/SkeletonIcon.js +4 -5
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
- package/es/components/SkeletonText/SkeletonText.js +8 -9
- package/es/components/Slider/Slider.Skeleton.js +8 -9
- package/es/components/Slider/Slider.js +69 -83
- package/es/components/Slider/SliderHandles.js +6 -6
- package/es/components/StructuredList/StructuredList.Skeleton.js +5 -6
- package/es/components/Tabs/Tabs.Skeleton.js +5 -6
- package/es/components/Tabs/Tabs.js +83 -98
- package/es/components/Tabs/usePressable.js +7 -8
- package/es/components/Tag/DismissibleTag.js +16 -17
- package/es/components/Tag/OperationalTag.js +10 -11
- package/es/components/Tag/SelectableTag.js +13 -14
- package/es/components/Tag/Tag.Skeleton.js +5 -6
- package/es/components/Tag/Tag.js +19 -20
- package/es/components/Text/Text.js +6 -7
- package/es/components/Text/TextDirection.js +5 -6
- package/es/components/TextArea/TextArea.js +3 -3
- package/es/components/TextInput/ControlledPasswordInput.js +24 -25
- package/es/components/TextInput/PasswordInput.js +26 -27
- package/es/components/TextInput/TextInput.Skeleton.js +5 -6
- package/es/components/TextInput/TextInput.js +27 -28
- package/es/components/TextInput/util.js +14 -17
- package/es/components/Theme/index.js +10 -12
- package/es/components/Tile/Tile.js +68 -74
- package/es/components/Toggle/Toggle.Skeleton.js +4 -5
- package/es/components/Toggle/Toggle.js +17 -18
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
- package/es/components/Toggletip/index.js +33 -39
- package/es/components/Tooltip/DefinitionTooltip.js +13 -14
- package/es/components/Tooltip/Tooltip.js +15 -16
- package/es/components/TreeView/TreeNode.js +20 -21
- package/es/components/TreeView/TreeView.js +14 -16
- package/es/components/UIShell/Content.js +6 -7
- package/es/components/UIShell/Header.js +5 -6
- package/es/components/UIShell/HeaderContainer.js +5 -6
- package/es/components/UIShell/HeaderGlobalAction.js +12 -13
- package/es/components/UIShell/HeaderMenu.d.ts +10 -112
- package/es/components/UIShell/HeaderMenu.js +154 -201
- package/es/components/UIShell/HeaderMenuButton.js +10 -11
- package/es/components/UIShell/HeaderMenuItem.js +10 -11
- package/es/components/UIShell/HeaderName.js +6 -7
- package/es/components/UIShell/HeaderNavigation.js +7 -8
- package/es/components/UIShell/HeaderPanel.js +9 -10
- package/es/components/UIShell/HeaderSideNavItems.js +5 -6
- package/es/components/UIShell/Link.js +8 -9
- package/es/components/UIShell/SideNav.js +23 -25
- package/es/components/UIShell/SideNavDetails.js +6 -7
- package/es/components/UIShell/SideNavDivider.js +3 -4
- package/es/components/UIShell/SideNavFooter.js +6 -7
- package/es/components/UIShell/SideNavHeader.js +5 -6
- package/es/components/UIShell/SideNavIcon.js +5 -6
- package/es/components/UIShell/SideNavItem.js +5 -6
- package/es/components/UIShell/SideNavItems.js +5 -6
- package/es/components/UIShell/SideNavLink.js +10 -11
- package/es/components/UIShell/SideNavLinkText.js +5 -6
- package/es/components/UIShell/SideNavMenu.js +11 -12
- package/es/components/UIShell/SkipToContent.js +7 -8
- package/es/components/UIShell/Switcher.js +4 -5
- package/es/components/UIShell/SwitcherDivider.js +4 -5
- package/es/components/UnorderedList/UnorderedList.js +6 -7
- package/es/index.js +2 -2
- package/es/internal/FloatingMenu.js +26 -28
- package/es/internal/Selection.js +15 -17
- package/es/internal/getAnnouncement.d.ts +8 -0
- package/es/internal/getAnnouncement.js +22 -0
- package/es/internal/keyboard/match.js +6 -7
- package/es/internal/useControllableState.d.ts +1 -1
- package/es/internal/useControllableState.js +8 -9
- package/es/internal/useDelayedState.js +1 -2
- package/es/internal/useDocumentLang.d.ts +12 -0
- package/es/internal/useId.js +2 -4
- package/es/internal/useMatchMedia.js +1 -2
- package/es/internal/useMergedRefs.d.ts +1 -1
- package/es/internal/useNoInteractiveChildren.js +2 -4
- package/es/internal/useNormalizedInputProps.js +9 -10
- package/es/internal/useResizeObserver.js +4 -5
- package/es/internal/useSavedCallback.js +1 -3
- package/es/internal/wrapFocus.js +20 -29
- package/es/prop-types/deprecate.js +1 -4
- package/es/prop-types/deprecateValuesWithin.js +1 -4
- package/es/prop-types/isRequiredOneOf.js +1 -4
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
- package/es/tools/events.js +1 -4
- package/es/tools/mergeRefs.js +9 -14
- package/es/tools/uniqueId.js +1 -2
- package/es/tools/wrapComponent.js +9 -11
- package/lib/components/AILabel/index.js +27 -30
- package/lib/components/AISkeleton/AISkeletonIcon.js +4 -5
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
- package/lib/components/AISkeleton/AISkeletonText.js +4 -5
- package/lib/components/Accordion/Accordion.Skeleton.js +9 -10
- package/lib/components/Accordion/Accordion.js +10 -11
- package/lib/components/Accordion/AccordionItem.js +13 -14
- package/lib/components/Accordion/AccordionProvider.js +4 -5
- package/lib/components/AspectRatio/AspectRatio.js +7 -8
- package/lib/components/BadgeIndicator/index.js +5 -6
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
- package/lib/components/Button/Button.Skeleton.js +7 -8
- package/lib/components/Button/ButtonBase.js +23 -24
- package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -6
- package/lib/components/ChatButton/ChatButton.js +11 -12
- package/lib/components/Checkbox/Checkbox.Skeleton.js +4 -5
- package/lib/components/Checkbox/Checkbox.js +19 -20
- package/lib/components/CheckboxGroup/CheckboxGroup.js +16 -17
- package/lib/components/ClassPrefix/index.js +4 -5
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
- package/lib/components/CodeSnippet/CodeSnippet.js +25 -26
- package/lib/components/ComboBox/ComboBox.js +24 -30
- package/lib/components/ComboBox/tools/filter.js +9 -12
- package/lib/components/ComboButton/index.js +16 -18
- package/lib/components/ComposedModal/ComposedModal.js +31 -34
- package/lib/components/ComposedModal/ModalFooter.js +37 -42
- package/lib/components/ComposedModal/ModalHeader.js +14 -15
- package/lib/components/ContainedList/ContainedList.js +10 -11
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
- package/lib/components/ContentSwitcher/ContentSwitcher.js +94 -126
- package/lib/components/ContentSwitcher/index.d.ts +3 -4
- package/lib/components/ContextMenu/useContextMenu.js +1 -2
- package/lib/components/Copy/Copy.js +11 -12
- package/lib/components/CopyButton/CopyButton.js +10 -11
- package/lib/components/DataTable/DataTable.js +45 -53
- package/lib/components/DataTable/Table.js +15 -18
- package/lib/components/DataTable/TableBatchAction.js +8 -11
- package/lib/components/DataTable/TableBatchActions.js +18 -20
- package/lib/components/DataTable/TableBody.js +8 -11
- package/lib/components/DataTable/TableContainer.js +9 -10
- package/lib/components/DataTable/TableDecoratorRow.js +4 -5
- package/lib/components/DataTable/TableExpandHeader.js +14 -15
- package/lib/components/DataTable/TableExpandRow.js +13 -14
- package/lib/components/DataTable/TableExpandedRow.js +6 -7
- package/lib/components/DataTable/TableHeader.js +15 -16
- package/lib/components/DataTable/TableSelectAll.js +11 -12
- package/lib/components/DataTable/TableSelectRow.js +12 -13
- package/lib/components/DataTable/TableSlugRow.js +4 -5
- package/lib/components/DataTable/TableToolbar.js +7 -8
- package/lib/components/DataTable/TableToolbarMenu.js +8 -9
- package/lib/components/DataTable/TableToolbarSearch.js +22 -24
- package/lib/components/DataTable/state/sorting.js +3 -4
- package/lib/components/DataTable/tools/filter.js +10 -12
- package/lib/components/DataTable/tools/normalize.js +6 -8
- package/lib/components/DataTable/tools/sorting.js +24 -30
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
- package/lib/components/DatePicker/DatePicker.Skeleton.js +7 -8
- package/lib/components/DatePicker/DatePicker.js +87 -64
- package/lib/components/DatePickerInput/DatePickerInput.js +5 -6
- package/lib/components/Dialog/index.d.ts +193 -8
- package/lib/components/Dialog/index.js +457 -33
- package/lib/components/Dropdown/Dropdown.Skeleton.js +6 -7
- package/lib/components/Dropdown/Dropdown.js +40 -43
- package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +9 -10
- package/lib/components/FeatureFlags/index.js +11 -12
- package/lib/components/FileUploader/FileUploader.Skeleton.js +4 -5
- package/lib/components/FileUploader/FileUploader.js +22 -24
- package/lib/components/FileUploader/FileUploaderButton.js +16 -17
- package/lib/components/FileUploader/FileUploaderDropContainer.js +15 -16
- package/lib/components/FileUploader/FileUploaderItem.js +13 -14
- package/lib/components/FileUploader/Filename.js +9 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
- package/lib/components/FluidComboBox/FluidComboBox.js +5 -6
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
- package/lib/components/FluidDatePicker/FluidDatePicker.js +10 -11
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
- package/lib/components/FluidDropdown/FluidDropdown.js +5 -6
- package/lib/components/FluidForm/FluidForm.js +5 -6
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
- package/lib/components/FluidNumberInput/FluidNumberInput.js +38 -5
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
- package/lib/components/FluidSearch/FluidSearch.js +4 -5
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
- package/lib/components/FluidSelect/FluidSelect.js +5 -6
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
- package/lib/components/FluidTextArea/FluidTextArea.js +4 -5
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
- package/lib/components/FluidTextInput/FluidTextInput.js +5 -6
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
- package/lib/components/FluidTimePicker/FluidTimePicker.js +11 -12
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
- package/lib/components/Form/Form.js +5 -6
- package/lib/components/FormGroup/FormGroup.js +11 -12
- package/lib/components/FormItem/FormItem.js +5 -6
- package/lib/components/FormLabel/FormLabel.js +6 -7
- package/lib/components/Grid/CSSGrid.js +17 -19
- package/lib/components/Grid/Column.js +28 -27
- package/lib/components/Grid/ColumnHang.js +6 -7
- package/lib/components/Grid/FlexGrid.js +9 -10
- package/lib/components/Grid/GridContext.js +5 -6
- package/lib/components/Grid/Row.js +8 -9
- package/lib/components/Heading/index.js +5 -6
- package/lib/components/Icon/Icon.Skeleton.js +4 -5
- package/lib/components/IconButton/index.js +20 -21
- package/lib/components/IconIndicator/index.js +7 -8
- package/lib/components/IdPrefix/index.js +4 -5
- package/lib/components/InlineLoading/InlineLoading.js +9 -10
- package/lib/components/Layer/index.js +8 -9
- package/lib/components/Layout/index.js +21 -26
- package/lib/components/LayoutDirection/LayoutDirection.js +6 -7
- package/lib/components/Link/Link.d.ts +1 -1
- package/lib/components/Link/Link.js +14 -15
- package/lib/components/ListBox/ListBoxField.js +6 -7
- package/lib/components/ListBox/ListBoxMenu.js +5 -6
- package/lib/components/ListBox/ListBoxMenuIcon.js +4 -5
- package/lib/components/ListBox/ListBoxMenuItem.js +8 -10
- package/lib/components/ListBox/ListBoxSelection.js +8 -9
- package/lib/components/ListBox/next/ListBoxSelection.js +9 -10
- package/lib/components/ListBox/next/ListBoxTrigger.js +5 -6
- package/lib/components/ListItem/ListItem.js +5 -6
- package/lib/components/Loading/Loading.js +8 -9
- package/lib/components/Menu/Menu.js +23 -24
- package/lib/components/Menu/MenuItem.js +39 -44
- package/lib/components/MenuButton/index.js +16 -18
- package/lib/components/Modal/Modal.js +55 -63
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +45 -47
- package/lib/components/MultiSelect/MultiSelect.js +43 -45
- package/lib/components/MultiSelect/tools/sorting.js +11 -15
- package/lib/components/Notification/Notification.js +96 -105
- package/lib/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
- package/lib/components/NumberInput/NumberFormatPropTypes.js +48 -0
- package/lib/components/NumberInput/NumberInput.Skeleton.js +6 -7
- package/lib/components/NumberInput/NumberInput.d.ts +39 -3
- package/lib/components/NumberInput/NumberInput.js +173 -43
- package/lib/components/OrderedList/OrderedList.js +7 -8
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +35 -41
- package/lib/components/OverflowMenu/next/index.js +12 -13
- package/lib/components/PageHeader/PageHeader.d.ts +29 -5
- package/lib/components/PageHeader/PageHeader.js +119 -73
- package/lib/components/Pagination/Pagination.Skeleton.js +4 -5
- package/lib/components/Pagination/Pagination.js +24 -25
- package/lib/components/Pagination/experimental/PageSelector.js +8 -9
- package/lib/components/Pagination/experimental/Pagination.js +20 -21
- package/lib/components/PaginationNav/PaginationNav.js +33 -38
- package/lib/components/Popover/index.js +26 -28
- package/lib/components/ProgressBar/ProgressBar.js +11 -12
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
- package/lib/components/ProgressIndicator/ProgressIndicator.js +29 -32
- package/lib/components/RadioTile/RadioTile.js +17 -18
- package/lib/components/Search/Search.Skeleton.js +5 -6
- package/lib/components/Search/Search.js +26 -28
- package/lib/components/Select/Select.Skeleton.js +5 -6
- package/lib/components/Select/Select.js +24 -25
- package/lib/components/SelectItem/SelectItem.js +8 -9
- package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -8
- package/lib/components/ShapeIndicator/index.js +7 -8
- package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -5
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
- package/lib/components/SkeletonText/SkeletonText.js +8 -9
- package/lib/components/Slider/Slider.Skeleton.js +8 -9
- package/lib/components/Slider/Slider.js +69 -83
- package/lib/components/Slider/SliderHandles.js +6 -6
- package/lib/components/StructuredList/StructuredList.Skeleton.js +5 -6
- package/lib/components/Tabs/Tabs.Skeleton.js +5 -6
- package/lib/components/Tabs/Tabs.js +83 -98
- package/lib/components/Tabs/usePressable.js +7 -8
- package/lib/components/Tag/DismissibleTag.js +16 -17
- package/lib/components/Tag/OperationalTag.js +10 -11
- package/lib/components/Tag/SelectableTag.js +13 -14
- package/lib/components/Tag/Tag.Skeleton.js +5 -6
- package/lib/components/Tag/Tag.js +19 -20
- package/lib/components/Text/Text.js +6 -7
- package/lib/components/Text/TextDirection.js +5 -6
- package/lib/components/TextArea/TextArea.js +3 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +24 -25
- package/lib/components/TextInput/PasswordInput.js +26 -27
- package/lib/components/TextInput/TextInput.Skeleton.js +5 -6
- package/lib/components/TextInput/TextInput.js +27 -28
- package/lib/components/TextInput/util.js +14 -17
- package/lib/components/Theme/index.js +10 -12
- package/lib/components/Tile/Tile.js +68 -74
- package/lib/components/Toggle/Toggle.Skeleton.js +4 -5
- package/lib/components/Toggle/Toggle.js +17 -18
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
- package/lib/components/Toggletip/index.js +33 -39
- package/lib/components/Tooltip/DefinitionTooltip.js +13 -14
- package/lib/components/Tooltip/Tooltip.js +15 -16
- package/lib/components/TreeView/TreeNode.js +20 -21
- package/lib/components/TreeView/TreeView.js +14 -16
- package/lib/components/UIShell/Content.js +6 -7
- package/lib/components/UIShell/Header.js +5 -6
- package/lib/components/UIShell/HeaderContainer.js +5 -6
- package/lib/components/UIShell/HeaderGlobalAction.js +12 -13
- package/lib/components/UIShell/HeaderMenu.d.ts +10 -112
- package/lib/components/UIShell/HeaderMenu.js +152 -199
- package/lib/components/UIShell/HeaderMenuButton.js +10 -11
- package/lib/components/UIShell/HeaderMenuItem.js +10 -11
- package/lib/components/UIShell/HeaderName.js +6 -7
- package/lib/components/UIShell/HeaderNavigation.js +7 -8
- package/lib/components/UIShell/HeaderPanel.js +9 -10
- package/lib/components/UIShell/HeaderSideNavItems.js +5 -6
- package/lib/components/UIShell/Link.js +8 -9
- package/lib/components/UIShell/SideNav.js +23 -25
- package/lib/components/UIShell/SideNavDetails.js +6 -7
- package/lib/components/UIShell/SideNavDivider.js +3 -4
- package/lib/components/UIShell/SideNavFooter.js +6 -7
- package/lib/components/UIShell/SideNavHeader.js +5 -6
- package/lib/components/UIShell/SideNavIcon.js +5 -6
- package/lib/components/UIShell/SideNavItem.js +5 -6
- package/lib/components/UIShell/SideNavItems.js +5 -6
- package/lib/components/UIShell/SideNavLink.js +10 -11
- package/lib/components/UIShell/SideNavLinkText.js +5 -6
- package/lib/components/UIShell/SideNavMenu.js +11 -12
- package/lib/components/UIShell/SkipToContent.js +7 -8
- package/lib/components/UIShell/Switcher.js +4 -5
- package/lib/components/UIShell/SwitcherDivider.js +4 -5
- package/lib/components/UnorderedList/UnorderedList.js +6 -7
- package/lib/index.js +35 -35
- package/lib/internal/FloatingMenu.js +26 -28
- package/lib/internal/Selection.js +15 -17
- package/lib/internal/getAnnouncement.d.ts +8 -0
- package/lib/internal/getAnnouncement.js +26 -0
- package/lib/internal/keyboard/match.js +6 -7
- package/lib/internal/useControllableState.d.ts +1 -1
- package/lib/internal/useControllableState.js +8 -9
- package/lib/internal/useDelayedState.js +1 -2
- package/lib/internal/useDocumentLang.d.ts +12 -0
- package/lib/internal/useId.js +2 -4
- package/lib/internal/useMatchMedia.js +1 -2
- package/lib/internal/useMergedRefs.d.ts +1 -1
- package/lib/internal/useNoInteractiveChildren.js +2 -4
- package/lib/internal/useNormalizedInputProps.js +9 -10
- package/lib/internal/useResizeObserver.js +4 -5
- package/lib/internal/useSavedCallback.js +1 -3
- package/lib/internal/wrapFocus.js +20 -29
- package/lib/prop-types/deprecate.js +1 -4
- package/lib/prop-types/deprecateValuesWithin.js +1 -4
- package/lib/prop-types/isRequiredOneOf.js +1 -4
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
- package/lib/tools/events.js +1 -4
- package/lib/tools/mergeRefs.js +9 -14
- package/lib/tools/uniqueId.js +1 -2
- package/lib/tools/wrapComponent.js +9 -11
- package/package.json +21 -19
- package/telemetry.yml +23 -1
- package/es/components/ContentSwitcher/index.js +0 -13
- package/es/feature-flags.d.ts +0 -7
- package/es/internal/useAnnouncer.js +0 -21
- package/lib/components/ContentSwitcher/index.js +0 -18
- package/lib/feature-flags.d.ts +0 -7
- package/lib/internal/useAnnouncer.js +0 -25
|
@@ -16,16 +16,15 @@ import { Escape } from '../../internal/keyboard/keys.js';
|
|
|
16
16
|
import { match } from '../../internal/keyboard/match.js';
|
|
17
17
|
import mergeRefs from '../../tools/mergeRefs.js';
|
|
18
18
|
|
|
19
|
-
const ExpandableSearch = /*#__PURE__*/React.forwardRef(function ExpandableSearch(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
19
|
+
const ExpandableSearch = /*#__PURE__*/React.forwardRef(function ExpandableSearch({
|
|
20
|
+
onBlur,
|
|
21
|
+
onChange,
|
|
22
|
+
onExpand,
|
|
23
|
+
onKeyDown,
|
|
24
|
+
defaultValue,
|
|
25
|
+
isExpanded,
|
|
26
|
+
...props
|
|
27
|
+
}, forwardedRef) {
|
|
29
28
|
const [expanded, setExpanded] = useState(isExpanded || false);
|
|
30
29
|
const [hasContent, setHasContent] = useState(defaultValue ? true : false);
|
|
31
30
|
const searchRef = useRef(null);
|
|
@@ -21,18 +21,17 @@ const FeatureFlagContext = /*#__PURE__*/createContext(FeatureFlags$1);
|
|
|
21
21
|
* along with the current `FeatureFlagContext` to provide consumers to check if
|
|
22
22
|
* a feature flag is enabled or disabled in a given React tree
|
|
23
23
|
*/
|
|
24
|
-
function FeatureFlags(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} = _ref;
|
|
24
|
+
function FeatureFlags({
|
|
25
|
+
children,
|
|
26
|
+
flags = {},
|
|
27
|
+
enableV12TileDefaultIcons = false,
|
|
28
|
+
enableV12TileRadioIcons = false,
|
|
29
|
+
enableV12Overflowmenu = false,
|
|
30
|
+
enableTreeviewControllable = false,
|
|
31
|
+
enableExperimentalFocusWrapWithoutSentinels = false,
|
|
32
|
+
enableDialogElement = false,
|
|
33
|
+
enableV12DynamicFloatingStyles = false
|
|
34
|
+
}) {
|
|
36
35
|
const parentScope = useContext(FeatureFlagContext);
|
|
37
36
|
const [prevParentScope, setPrevParentScope] = useState(parentScope);
|
|
38
37
|
const combinedFlags = {
|
|
@@ -14,11 +14,10 @@ import ButtonSkeleton from '../Button/Button.Skeleton.js';
|
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
|
|
16
16
|
var _SkeletonText, _ButtonSkeleton;
|
|
17
|
-
function FileUploaderSkeleton(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
17
|
+
function FileUploaderSkeleton({
|
|
18
|
+
className,
|
|
19
|
+
...rest
|
|
20
|
+
}) {
|
|
22
21
|
const prefix = usePrefix();
|
|
23
22
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
24
23
|
className: cx(`${prefix}--form-item`, className)
|
|
@@ -19,25 +19,24 @@ import '../Text/index.js';
|
|
|
19
19
|
import { useId } from '../../internal/useId.js';
|
|
20
20
|
import { Text } from '../Text/Text.js';
|
|
21
21
|
|
|
22
|
-
const FileUploader = /*#__PURE__*/React.forwardRef((
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = _ref;
|
|
22
|
+
const FileUploader = /*#__PURE__*/React.forwardRef(({
|
|
23
|
+
accept,
|
|
24
|
+
buttonKind,
|
|
25
|
+
buttonLabel,
|
|
26
|
+
className,
|
|
27
|
+
disabled,
|
|
28
|
+
filenameStatus,
|
|
29
|
+
iconDescription,
|
|
30
|
+
labelDescription,
|
|
31
|
+
labelTitle,
|
|
32
|
+
multiple,
|
|
33
|
+
name,
|
|
34
|
+
onChange,
|
|
35
|
+
onClick,
|
|
36
|
+
onDelete,
|
|
37
|
+
size,
|
|
38
|
+
...other
|
|
39
|
+
}, ref) => {
|
|
41
40
|
const fileUploaderInstanceId = useId('file-uploader');
|
|
42
41
|
const [state, updateState] = useState({
|
|
43
42
|
fileNames: []
|
|
@@ -54,11 +53,10 @@ const FileUploader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
54
53
|
onChange(evt);
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
|
-
const handleClick = (evt,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} = _ref2;
|
|
56
|
+
const handleClick = (evt, {
|
|
57
|
+
index,
|
|
58
|
+
filenameStatus
|
|
59
|
+
}) => {
|
|
62
60
|
if (filenameStatus === 'edit') {
|
|
63
61
|
evt.stopPropagation();
|
|
64
62
|
const filteredArray = state.fileNames.filter(filename => filename !== nodes[index]?.innerText?.trim());
|
|
@@ -18,23 +18,22 @@ import { noopFn } from '../../internal/noopFn.js';
|
|
|
18
18
|
import { ButtonKinds } from '../Button/Button.js';
|
|
19
19
|
import '../Button/Button.Skeleton.js';
|
|
20
20
|
|
|
21
|
-
function FileUploaderButton(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} = _ref;
|
|
21
|
+
function FileUploaderButton({
|
|
22
|
+
accept,
|
|
23
|
+
buttonKind = 'primary',
|
|
24
|
+
className,
|
|
25
|
+
disabled = false,
|
|
26
|
+
disableLabelChanges = false,
|
|
27
|
+
id,
|
|
28
|
+
labelText: ownerLabelText = 'Add file',
|
|
29
|
+
multiple = false,
|
|
30
|
+
onChange = noopFn,
|
|
31
|
+
name,
|
|
32
|
+
size = 'md',
|
|
33
|
+
// eslint-disable-next-line react/prop-types
|
|
34
|
+
innerRef,
|
|
35
|
+
...other
|
|
36
|
+
}) {
|
|
38
37
|
const prefix = usePrefix();
|
|
39
38
|
const [labelText, setLabelText] = useState(ownerLabelText);
|
|
40
39
|
const [prevOwnerLabelText, setPrevOwnerLabelText] = useState(ownerLabelText);
|
|
@@ -17,22 +17,21 @@ import { composeEventHandlers } from '../../tools/events.js';
|
|
|
17
17
|
import deprecate from '../../prop-types/deprecate.js';
|
|
18
18
|
import { noopFn } from '../../internal/noopFn.js';
|
|
19
19
|
|
|
20
|
-
function FileUploaderDropContainer(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} = _ref;
|
|
20
|
+
function FileUploaderDropContainer({
|
|
21
|
+
accept = [],
|
|
22
|
+
className,
|
|
23
|
+
id,
|
|
24
|
+
disabled,
|
|
25
|
+
labelText = 'Add file',
|
|
26
|
+
multiple = false,
|
|
27
|
+
name,
|
|
28
|
+
onAddFiles = noopFn,
|
|
29
|
+
onClick,
|
|
30
|
+
pattern = '.[0-9a-z]+$',
|
|
31
|
+
// eslint-disable-next-line react/prop-types
|
|
32
|
+
innerRef,
|
|
33
|
+
...rest
|
|
34
|
+
}) {
|
|
36
35
|
const prefix = usePrefix();
|
|
37
36
|
const inputRef = useRef(null);
|
|
38
37
|
const {
|
|
@@ -20,20 +20,19 @@ import '../Tooltip/DefinitionTooltip.js';
|
|
|
20
20
|
import { Tooltip } from '../Tooltip/Tooltip.js';
|
|
21
21
|
import { Text } from '../Text/Text.js';
|
|
22
22
|
|
|
23
|
-
function FileUploaderItem(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} = _ref;
|
|
23
|
+
function FileUploaderItem({
|
|
24
|
+
uuid,
|
|
25
|
+
name,
|
|
26
|
+
status = 'uploading',
|
|
27
|
+
iconDescription,
|
|
28
|
+
onDelete = noopFn,
|
|
29
|
+
invalid,
|
|
30
|
+
errorSubject,
|
|
31
|
+
errorBody,
|
|
32
|
+
size,
|
|
33
|
+
className,
|
|
34
|
+
...other
|
|
35
|
+
}) {
|
|
37
36
|
const textRef = useRef(null);
|
|
38
37
|
const [isEllipsisApplied, setIsEllipsisApplied] = useState(false);
|
|
39
38
|
const prefix = usePrefix();
|
|
@@ -13,16 +13,15 @@ import Loading from '../Loading/Loading.js';
|
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
14
|
|
|
15
15
|
var _Close;
|
|
16
|
-
function Filename(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} = _ref;
|
|
16
|
+
function Filename({
|
|
17
|
+
iconDescription = 'Uploading file',
|
|
18
|
+
status = 'uploading',
|
|
19
|
+
invalid,
|
|
20
|
+
name,
|
|
21
|
+
tabIndex = 0,
|
|
22
|
+
['aria-describedby']: ariaDescribedBy,
|
|
23
|
+
...rest
|
|
24
|
+
}) {
|
|
26
25
|
const prefix = usePrefix();
|
|
27
26
|
switch (status) {
|
|
28
27
|
case 'uploading':
|
|
@@ -11,11 +11,10 @@ import React from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
const FluidComboBoxSkeleton =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
14
|
+
const FluidComboBoxSkeleton = ({
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
}) => {
|
|
19
18
|
const prefix = usePrefix();
|
|
20
19
|
const wrapperClasses = cx(className, `${prefix}--list-box__wrapper--fluid`);
|
|
21
20
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -13,12 +13,11 @@ import ComboBox from '../ComboBox/ComboBox.js';
|
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
14
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
15
15
|
|
|
16
|
-
const FluidComboBox = /*#__PURE__*/React.forwardRef(function FluidComboBox(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
16
|
+
const FluidComboBox = /*#__PURE__*/React.forwardRef(function FluidComboBox({
|
|
17
|
+
className,
|
|
18
|
+
isCondensed,
|
|
19
|
+
...other
|
|
20
|
+
}, ref) {
|
|
22
21
|
const prefix = usePrefix();
|
|
23
22
|
const classNames = cx(`${prefix}--list-box__wrapper--fluid`, className, {
|
|
24
23
|
[`${prefix}--list-box__wrapper--fluid--condensed`]: isCondensed
|
|
@@ -13,12 +13,11 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
13
13
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
14
14
|
import { Calendar } from '@carbon/icons-react';
|
|
15
15
|
|
|
16
|
-
const FluidDatePickerSkeleton =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
16
|
+
const FluidDatePickerSkeleton = ({
|
|
17
|
+
className,
|
|
18
|
+
datePickerType = 'single',
|
|
19
|
+
...other
|
|
20
|
+
}) => {
|
|
22
21
|
const prefix = usePrefix();
|
|
23
22
|
const classNames = cx(className, `${prefix}--form-item ${prefix}--date-picker--fluid__skeleton`, {
|
|
24
23
|
[`${prefix}--date-picker--fluid__skeleton--range`]: datePickerType === 'range'
|
|
@@ -14,17 +14,16 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
14
14
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
15
15
|
import React from 'react';
|
|
16
16
|
|
|
17
|
-
const FluidDatePicker = /*#__PURE__*/React.forwardRef(function FluidDatePicker(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = _ref;
|
|
17
|
+
const FluidDatePicker = /*#__PURE__*/React.forwardRef(function FluidDatePicker({
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
invalid,
|
|
21
|
+
invalidText,
|
|
22
|
+
readOnly,
|
|
23
|
+
warn,
|
|
24
|
+
warnText,
|
|
25
|
+
...other
|
|
26
|
+
}, ref) {
|
|
28
27
|
const prefix = usePrefix();
|
|
29
28
|
const classNames = cx(className, {
|
|
30
29
|
[`${prefix}--date-picker--fluid`]: true,
|
|
@@ -11,11 +11,10 @@ import React from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
const FluidDropdownSkeleton =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
14
|
+
const FluidDropdownSkeleton = ({
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
}) => {
|
|
19
18
|
const prefix = usePrefix();
|
|
20
19
|
const wrapperClasses = cx(className, `${prefix}--list-box__wrapper--fluid`);
|
|
21
20
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -14,12 +14,11 @@ import '../Dropdown/Dropdown.Skeleton.js';
|
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
16
16
|
|
|
17
|
-
const FluidDropdown = /*#__PURE__*/React.forwardRef(function FluidDropdown(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
17
|
+
const FluidDropdown = /*#__PURE__*/React.forwardRef(function FluidDropdown({
|
|
18
|
+
className,
|
|
19
|
+
isCondensed,
|
|
20
|
+
...other
|
|
21
|
+
}, ref) {
|
|
23
22
|
const prefix = usePrefix();
|
|
24
23
|
const classNames = cx(`${prefix}--list-box__wrapper--fluid`, className, {
|
|
25
24
|
[`${prefix}--list-box__wrapper--fluid--condensed`]: isCondensed
|
|
@@ -13,12 +13,11 @@ import Form from '../Form/Form.js';
|
|
|
13
13
|
import { FormContext } from './FormContext.js';
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
|
|
16
|
-
const FluidForm =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
16
|
+
const FluidForm = ({
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
...other
|
|
20
|
+
}) => {
|
|
22
21
|
const prefix = usePrefix();
|
|
23
22
|
const classNames = cx(`${prefix}--form--fluid`, className);
|
|
24
23
|
return /*#__PURE__*/React.createElement(FormContext.Provider, {
|
|
@@ -11,11 +11,10 @@ import React from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
const FluidMultiSelectSkeleton =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
14
|
+
const FluidMultiSelectSkeleton = ({
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
}) => {
|
|
19
18
|
const prefix = usePrefix();
|
|
20
19
|
const wrapperClasses = cx(className, `${prefix}--list-box__wrapper--fluid`);
|
|
21
20
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
@@ -14,13 +14,12 @@ import { MultiSelect } from '../MultiSelect/MultiSelect.js';
|
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
16
16
|
|
|
17
|
-
const FluidMultiSelect = /*#__PURE__*/React.forwardRef(function FluidMultiSelect(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = _ref;
|
|
17
|
+
const FluidMultiSelect = /*#__PURE__*/React.forwardRef(function FluidMultiSelect({
|
|
18
|
+
className,
|
|
19
|
+
isCondensed,
|
|
20
|
+
isFilterable,
|
|
21
|
+
...other
|
|
22
|
+
}, ref) {
|
|
24
23
|
const prefix = usePrefix();
|
|
25
24
|
const classNames = cx(`${prefix}--list-box__wrapper--fluid`, className, {
|
|
26
25
|
[`${prefix}--list-box__wrapper--fluid--condensed`]: isCondensed
|
|
@@ -12,11 +12,10 @@ import cx from 'classnames';
|
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
14
14
|
|
|
15
|
-
const FluidNumberInputSkeleton =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
15
|
+
const FluidNumberInputSkeleton = ({
|
|
16
|
+
className,
|
|
17
|
+
...other
|
|
18
|
+
}) => {
|
|
20
19
|
const prefix = usePrefix();
|
|
21
20
|
return /*#__PURE__*/React.createElement(FormContext.Provider, {
|
|
22
21
|
value: {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import { type NumberFormatOptions } from '@carbon/utilities';
|
|
8
9
|
export interface FluidNumberInputProps {
|
|
9
10
|
/**
|
|
10
11
|
* `true` to allow empty string.
|
|
@@ -26,6 +27,13 @@ export interface FluidNumberInputProps {
|
|
|
26
27
|
* Specify if the control should be disabled, or not
|
|
27
28
|
*/
|
|
28
29
|
disabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* **Experimental:** Specify Intl.NumberFormat options applied to internal
|
|
32
|
+
* number parsing and formatting. Use with `type="text"`, has no effect when
|
|
33
|
+
* `type="number"`.
|
|
34
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options
|
|
35
|
+
*/
|
|
36
|
+
formatOptions?: NumberFormatOptions;
|
|
29
37
|
/**
|
|
30
38
|
* Provide a description for up/down icons that can be read by screen readers
|
|
31
39
|
*/
|
|
@@ -34,6 +42,12 @@ export interface FluidNumberInputProps {
|
|
|
34
42
|
* Specify a custom `id` for the input
|
|
35
43
|
*/
|
|
36
44
|
id: string;
|
|
45
|
+
/**
|
|
46
|
+
* Instruct the browser which keyboard to display on mobile devices. Note that
|
|
47
|
+
* standard numeric keyboards vary across devices and operating systems.
|
|
48
|
+
* @see https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/
|
|
49
|
+
*/
|
|
50
|
+
inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];
|
|
37
51
|
/**
|
|
38
52
|
* Specify if the currently value is invalid.
|
|
39
53
|
*/
|
|
@@ -47,6 +61,12 @@ export interface FluidNumberInputProps {
|
|
|
47
61
|
* this field is for
|
|
48
62
|
*/
|
|
49
63
|
label?: React.ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* **Experimental:** Specify a [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt)
|
|
66
|
+
* language code for parsing and formatting. Use with `type="text"`, has no
|
|
67
|
+
* effect when `type="number"`.
|
|
68
|
+
*/
|
|
69
|
+
locale?: string;
|
|
50
70
|
/**
|
|
51
71
|
* The maximum value.
|
|
52
72
|
*/
|
|
@@ -55,7 +75,15 @@ export interface FluidNumberInputProps {
|
|
|
55
75
|
* The minimum value.
|
|
56
76
|
*/
|
|
57
77
|
min?: number;
|
|
58
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Provide an optional handler that is called when the internal state of
|
|
80
|
+
* NumberInput changes. This handler is called with event and state info.
|
|
81
|
+
* When type="number", this is called on every change of the input.
|
|
82
|
+
* When type="text", this is only called on blur after the number has been
|
|
83
|
+
* parsed and formatted.
|
|
84
|
+
* `(event, { value, direction }) => void`
|
|
85
|
+
*/
|
|
86
|
+
onChange?: (event: React.MouseEvent<HTMLButtonElement> | React.FocusEvent<HTMLInputElement> | React.KeyboardEvent<HTMLInputElement>, state: {
|
|
59
87
|
value: number | string;
|
|
60
88
|
direction: string;
|
|
61
89
|
}) => void;
|
|
@@ -70,6 +98,11 @@ export interface FluidNumberInputProps {
|
|
|
70
98
|
* Provide an optional function to be called when a key is pressed in the number input
|
|
71
99
|
*/
|
|
72
100
|
onKeyUp?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
101
|
+
/**
|
|
102
|
+
* When type="text", provide an optional pattern to restrict user input. Has
|
|
103
|
+
* no effect when type="number".
|
|
104
|
+
*/
|
|
105
|
+
pattern?: string;
|
|
73
106
|
/**
|
|
74
107
|
* Specify how much the values should increase/decrease upon clicking on up/down button
|
|
75
108
|
*/
|
|
@@ -78,6 +111,12 @@ export interface FluidNumberInputProps {
|
|
|
78
111
|
* Provide custom text for the component for each translation id
|
|
79
112
|
*/
|
|
80
113
|
translateWithId?: (id: string) => string;
|
|
114
|
+
/**
|
|
115
|
+
* **Experimental**: Specify if the input should be of type text or number.
|
|
116
|
+
* Use type="text" with `locale`, `formatOptions`, and guide user input with
|
|
117
|
+
* `pattern` and `inputMode`.
|
|
118
|
+
*/
|
|
119
|
+
type?: 'number' | 'text';
|
|
81
120
|
/**
|
|
82
121
|
* Specify the value of the input
|
|
83
122
|
*/
|
|
@@ -13,12 +13,12 @@ import '../NumberInput/NumberInput.Skeleton.js';
|
|
|
13
13
|
import { NumberInput } from '../NumberInput/NumberInput.js';
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
16
|
+
import { NumberFormatOptionsPropType } from '../NumberInput/NumberFormatPropTypes.js';
|
|
16
17
|
|
|
17
|
-
const FluidNumberInput = /*#__PURE__*/React.forwardRef(function FluidNumberInput(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
18
|
+
const FluidNumberInput = /*#__PURE__*/React.forwardRef(function FluidNumberInput({
|
|
19
|
+
className,
|
|
20
|
+
...other
|
|
21
|
+
}, ref) {
|
|
22
22
|
const prefix = usePrefix();
|
|
23
23
|
const classNames = cx(`${prefix}--number-input--fluid`, className);
|
|
24
24
|
return /*#__PURE__*/React.createElement(FormContext.Provider, {
|
|
@@ -51,6 +51,13 @@ FluidNumberInput.propTypes = {
|
|
|
51
51
|
* Specify if the control should be disabled, or not
|
|
52
52
|
*/
|
|
53
53
|
disabled: PropTypes.bool,
|
|
54
|
+
/**
|
|
55
|
+
* **Experimental:** Specify Intl.NumberFormat options applied to internal
|
|
56
|
+
* number parsing and formatting. Use with `type="text"`, has no effect when
|
|
57
|
+
* `type="number"`.
|
|
58
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options
|
|
59
|
+
*/
|
|
60
|
+
formatOptions: NumberFormatOptionsPropType,
|
|
54
61
|
/**
|
|
55
62
|
* Provide a description for up/down icons that can be read by screen readers
|
|
56
63
|
*/
|
|
@@ -59,6 +66,12 @@ FluidNumberInput.propTypes = {
|
|
|
59
66
|
* Specify a custom `id` for the input
|
|
60
67
|
*/
|
|
61
68
|
id: PropTypes.string.isRequired,
|
|
69
|
+
/**
|
|
70
|
+
* Instruct the browser which keyboard to display on mobile devices. Note that
|
|
71
|
+
* standard numeric keyboards vary across devices and operating systems.
|
|
72
|
+
* @see https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/
|
|
73
|
+
*/
|
|
74
|
+
inputMode: PropTypes.oneOf(['none', 'text', 'tel', 'url', 'email', 'numeric', 'decimal', 'search']),
|
|
62
75
|
/**
|
|
63
76
|
* Specify if the currently value is invalid.
|
|
64
77
|
*/
|
|
@@ -72,6 +85,12 @@ FluidNumberInput.propTypes = {
|
|
|
72
85
|
* this field is for
|
|
73
86
|
*/
|
|
74
87
|
label: PropTypes.node,
|
|
88
|
+
/**
|
|
89
|
+
* **Experimental:** Specify a [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt)
|
|
90
|
+
* language code for parsing and formatting. Use with `type="text"`, has no
|
|
91
|
+
* effect when `type="number"`.
|
|
92
|
+
*/
|
|
93
|
+
locale: PropTypes.string,
|
|
75
94
|
/**
|
|
76
95
|
* The maximum value.
|
|
77
96
|
*/
|
|
@@ -83,6 +102,9 @@ FluidNumberInput.propTypes = {
|
|
|
83
102
|
/**
|
|
84
103
|
* Provide an optional handler that is called when the internal state of
|
|
85
104
|
* NumberInput changes. This handler is called with event and state info.
|
|
105
|
+
* When type="number", this is called on every change of the input.
|
|
106
|
+
* When type="text", this is only called on blur after the number has been
|
|
107
|
+
* parsed and formatted.
|
|
86
108
|
* `(event, { value, direction }) => void`
|
|
87
109
|
*/
|
|
88
110
|
onChange: PropTypes.func,
|
|
@@ -94,6 +116,11 @@ FluidNumberInput.propTypes = {
|
|
|
94
116
|
* Provide an optional function to be called when a key is pressed in the number input
|
|
95
117
|
*/
|
|
96
118
|
onKeyUp: PropTypes.func,
|
|
119
|
+
/**
|
|
120
|
+
* When type="text", provide an optional pattern to restrict user input. Has
|
|
121
|
+
* no effect when type="number".
|
|
122
|
+
*/
|
|
123
|
+
pattern: PropTypes.string,
|
|
97
124
|
/**
|
|
98
125
|
* Specify how much the values should increase/decrease upon clicking on up/down button
|
|
99
126
|
*/
|
|
@@ -102,6 +129,12 @@ FluidNumberInput.propTypes = {
|
|
|
102
129
|
* Provide custom text for the component for each translation id
|
|
103
130
|
*/
|
|
104
131
|
translateWithId: PropTypes.func,
|
|
132
|
+
/**
|
|
133
|
+
* **Experimental**: Specify if the input should be of type text or number.
|
|
134
|
+
* Use type="text" with `locale`, `formatOptions`, and guide user input with
|
|
135
|
+
* `pattern` and `inputMode`.
|
|
136
|
+
*/
|
|
137
|
+
type: PropTypes.oneOf(['number', 'text']),
|
|
105
138
|
/**
|
|
106
139
|
* Specify the value of the input
|
|
107
140
|
*/
|