@carbon/react 1.87.0-rc.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 +853 -853
- package/es/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/es/components/Button/Button.js +1 -1
- package/es/components/Button/index.js +5 -1
- package/es/components/ButtonSet/index.js +4 -1
- package/es/components/Checkbox/index.js +4 -1
- package/es/components/ComboBox/ComboBox.js +1 -1
- package/es/components/ComboBox/index.js +4 -1
- package/es/components/ComposedModal/ComposedModal.js +18 -8
- package/es/components/ContainedList/ContainedListItem/index.js +4 -1
- package/es/components/ContainedList/index.js +2 -2
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/Copy/index.js +4 -1
- package/es/components/CopyButton/index.js +4 -1
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/es/components/DataTable/state/getDerivedStateFromProps.js +1 -2
- package/es/components/DataTable/state/sorting.d.ts +15 -0
- package/es/components/DataTable/state/sorting.js +1 -2
- package/es/components/DataTable/tools/denormalize.d.ts +22 -0
- package/es/components/DataTable/tools/denormalize.js +1 -2
- package/es/components/DataTable/tools/normalize.d.ts +9 -0
- package/es/components/DataTable/tools/normalize.js +1 -2
- package/es/components/DatePicker/DatePicker.js +18 -11
- package/es/components/DatePicker/index.js +4 -1
- package/es/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/es/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/es/components/DatePickerInput/DatePickerInput.js +6 -0
- package/es/components/DatePickerInput/index.js +4 -1
- package/es/components/Dialog/index.js +2 -2
- package/es/components/Dropdown/Dropdown.js +2 -2
- package/es/components/Dropdown/index.js +4 -1
- package/es/components/FeatureFlags/index.js +2 -2
- package/es/components/FluidSelect/index.js +4 -1
- package/es/components/FluidTextInput/index.js +4 -1
- package/es/components/IconIndicator/index.js +1 -1
- package/es/components/InlineCheckbox/index.js +4 -1
- package/es/components/InlineLoading/index.js +4 -1
- package/es/components/LayoutDirection/LayoutDirection.js +1 -2
- package/es/components/Link/index.js +4 -1
- package/es/components/ListBox/ListBox.js +1 -1
- package/es/components/Loading/index.js +4 -1
- package/es/components/Menu/Menu.d.ts +3 -1
- package/es/components/Menu/Menu.js +3 -1
- package/es/components/Menu/MenuItem.js +1 -1
- package/es/components/Modal/Modal.js +16 -5
- package/es/components/Modal/index.js +4 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +3 -3
- package/es/components/MultiSelect/MultiSelect.js +2 -2
- package/es/components/MultiSelect/filter.js +0 -4
- package/es/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/es/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/es/components/Notification/Notification.js +2 -2
- package/es/components/NumberInput/NumberInput.js +1 -1
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/OverflowMenuItem/index.js +4 -1
- package/es/components/OverflowMenuV2/index.d.ts +1 -0
- package/es/components/PageHeader/PageHeader.js +1 -1
- package/es/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/es/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/es/components/Pagination/experimental/index.d.ts +3 -0
- package/es/components/Popover/index.js +21 -4
- package/es/components/RadioButton/index.js +4 -1
- package/es/components/RadioTile/index.js +4 -1
- package/es/components/Search/Search.js +1 -1
- package/es/components/Search/index.js +4 -1
- package/es/components/Select/index.js +4 -1
- package/es/components/SelectItem/index.js +4 -1
- package/es/components/ShapeIndicator/index.js +1 -1
- package/es/components/SkeletonText/index.js +4 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/Switch/IconSwitch.d.ts +3 -0
- package/es/components/Switch/IconSwitch.js +1 -2
- package/es/components/TabContent/TabContent.js +2 -22
- package/es/components/Tabs/Tabs.js +5 -5
- package/es/components/Tag/DismissibleTag.js +1 -1
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/TextArea/index.js +4 -1
- package/es/components/TextInput/index.js +4 -1
- package/es/components/TextInput/util.d.ts +9 -0
- package/es/components/Toggletip/index.js +2 -2
- package/es/components/UIShell/HeaderMenu.js +2 -2
- package/es/components/UIShell/SideNav.js +1 -1
- package/es/components/UIShell/_utils.d.ts +7 -0
- package/es/feature-flags.d.ts +1 -0
- package/es/internal/FloatingMenu.js +1 -1
- package/es/internal/deprecateFieldOnObject.js +1 -1
- package/es/internal/useId.d.ts +21 -0
- package/es/internal/useId.js +27 -1
- package/es/internal/useOverflowItems.js +0 -6
- package/es/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -1
- package/es/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -1
- package/es/prop-types/deprecateComponent.d.ts +1 -0
- package/es/prop-types/deprecateComponent.js +1 -4
- package/es/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/es/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/es/tools/mergeRefs.d.ts +12 -0
- package/es/tools/mergeRefs.js +1 -2
- package/icons/index.js +1 -3
- package/lib/_virtual/_rollupPluginBabelHelpers.js +5 -7
- package/lib/components/AILabel/index.js +35 -43
- package/lib/components/AISkeleton/AISkeletonIcon.js +5 -11
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -10
- package/lib/components/AISkeleton/AISkeletonText.js +8 -14
- package/lib/components/Accordion/Accordion.Skeleton.js +21 -27
- package/lib/components/Accordion/Accordion.js +11 -17
- package/lib/components/Accordion/AccordionItem.js +19 -25
- package/lib/components/Accordion/AccordionProvider.js +1 -7
- package/lib/components/AspectRatio/AspectRatio.js +7 -13
- package/lib/components/BadgeIndicator/index.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.js +9 -15
- package/lib/components/Breadcrumb/BreadcrumbItem.js +16 -22
- package/lib/components/Button/Button.Skeleton.js +8 -14
- package/lib/components/Button/Button.js +31 -36
- package/lib/components/Button/ButtonBase.js +6 -11
- package/lib/components/Button/index.js +3 -3
- package/lib/components/ButtonSet/ButtonSet.js +6 -12
- package/lib/components/ButtonSet/index.js +2 -2
- package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -11
- package/lib/components/ChatButton/ChatButton.js +12 -18
- package/lib/components/Checkbox/Checkbox.Skeleton.js +6 -12
- package/lib/components/Checkbox/Checkbox.js +33 -39
- package/lib/components/Checkbox/index.js +3 -3
- package/lib/components/CheckboxGroup/CheckboxGroup.js +24 -30
- package/lib/components/ClassPrefix/index.js +3 -10
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +10 -16
- package/lib/components/CodeSnippet/CodeSnippet.js +39 -46
- package/lib/components/ComboBox/ComboBox.js +57 -64
- package/lib/components/ComboBox/index.js +2 -2
- package/lib/components/ComboButton/index.js +20 -28
- package/lib/components/ComposedModal/ComposedModal.js +61 -57
- package/lib/components/ComposedModal/ModalFooter.js +37 -45
- package/lib/components/ComposedModal/ModalHeader.js +23 -31
- package/lib/components/ContainedList/ContainedList.js +18 -24
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +14 -20
- package/lib/components/ContainedList/ContainedListItem/index.js +2 -2
- package/lib/components/ContainedList/index.js +5 -5
- package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -19
- package/lib/components/ContextMenu/useContextMenu.js +1 -1
- package/lib/components/Copy/Copy.js +12 -18
- package/lib/components/Copy/index.js +2 -2
- package/lib/components/CopyButton/CopyButton.js +12 -18
- package/lib/components/CopyButton/index.js +2 -2
- package/lib/components/DangerButton/DangerButton.js +2 -6
- package/lib/components/DataTable/DataTable.js +48 -55
- package/lib/components/DataTable/Table.js +18 -24
- package/lib/components/DataTable/TableActionList.js +2 -2
- package/lib/components/DataTable/TableBatchAction.js +4 -9
- package/lib/components/DataTable/TableBatchActions.js +19 -25
- package/lib/components/DataTable/TableBody.js +5 -10
- package/lib/components/DataTable/TableCell.js +8 -14
- package/lib/components/DataTable/TableContainer.js +14 -20
- package/lib/components/DataTable/TableContext.js +0 -2
- package/lib/components/DataTable/TableDecoratorRow.js +5 -11
- package/lib/components/DataTable/TableExpandHeader.js +16 -22
- package/lib/components/DataTable/TableExpandRow.js +20 -26
- package/lib/components/DataTable/TableExpandedRow.js +8 -14
- package/lib/components/DataTable/TableHead.js +2 -2
- package/lib/components/DataTable/TableHeader.js +26 -32
- package/lib/components/DataTable/TableRow.js +8 -14
- package/lib/components/DataTable/TableSelectAll.js +13 -19
- package/lib/components/DataTable/TableSelectRow.js +15 -21
- package/lib/components/DataTable/TableSlugRow.js +7 -13
- package/lib/components/DataTable/TableToolbar.js +7 -13
- package/lib/components/DataTable/TableToolbarAction.js +5 -10
- package/lib/components/DataTable/TableToolbarContent.js +2 -2
- package/lib/components/DataTable/TableToolbarMenu.js +9 -15
- package/lib/components/DataTable/TableToolbarSearch.js +22 -28
- package/lib/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +2 -3
- package/lib/components/DataTable/state/sortStates.js +0 -2
- package/lib/components/DataTable/state/sorting.d.ts +15 -0
- package/lib/components/DataTable/state/sorting.js +0 -2
- package/lib/components/DataTable/tools/cells.js +0 -2
- package/lib/components/DataTable/tools/denormalize.d.ts +22 -0
- package/lib/components/DataTable/tools/denormalize.js +1 -2
- package/lib/components/DataTable/tools/filter.js +0 -2
- package/lib/components/DataTable/tools/normalize.d.ts +9 -0
- package/lib/components/DataTable/tools/normalize.js +1 -2
- package/lib/components/DataTable/tools/sorting.js +0 -2
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +25 -31
- package/lib/components/DatePicker/DatePicker.Skeleton.js +14 -20
- package/lib/components/DatePicker/DatePicker.js +65 -66
- package/lib/components/DatePicker/index.js +3 -3
- package/lib/components/DatePicker/plugins/appendToPlugin.js +0 -2
- package/lib/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/lib/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -6
- package/lib/components/DatePickerInput/DatePickerInput.js +49 -49
- package/lib/components/DatePickerInput/index.js +2 -2
- package/lib/components/Dialog/index.js +72 -80
- package/lib/components/Dropdown/Dropdown.Skeleton.js +8 -14
- package/lib/components/Dropdown/Dropdown.js +49 -55
- package/lib/components/Dropdown/index.js +3 -3
- package/lib/components/ErrorBoundary/ErrorBoundary.js +4 -9
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +6 -11
- package/lib/components/FeatureFlags/index.js +10 -17
- package/lib/components/FileUploader/FileUploader.Skeleton.js +7 -13
- package/lib/components/FileUploader/FileUploader.js +30 -36
- package/lib/components/FileUploader/FileUploaderButton.js +19 -25
- package/lib/components/FileUploader/FileUploaderDropContainer.js +18 -24
- package/lib/components/FileUploader/FileUploaderItem.js +23 -29
- package/lib/components/FileUploader/Filename.js +13 -18
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +7 -13
- package/lib/components/FluidComboBox/FluidComboBox.js +24 -30
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +14 -20
- package/lib/components/FluidDatePicker/FluidDatePicker.js +12 -18
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +4 -8
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +7 -13
- package/lib/components/FluidDropdown/FluidDropdown.js +24 -30
- package/lib/components/FluidForm/FluidForm.js +6 -12
- package/lib/components/FluidForm/FormContext.js +0 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +7 -13
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +36 -42
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +7 -13
- package/lib/components/FluidNumberInput/FluidNumberInput.js +30 -36
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +7 -13
- package/lib/components/FluidSearch/FluidSearch.js +19 -25
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +7 -13
- package/lib/components/FluidSelect/FluidSelect.js +17 -23
- package/lib/components/FluidSelect/index.js +3 -3
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +7 -13
- package/lib/components/FluidTextArea/FluidTextArea.js +25 -31
- package/lib/components/FluidTextInput/FluidPasswordInput.js +18 -22
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +7 -13
- package/lib/components/FluidTextInput/FluidTextInput.js +23 -29
- package/lib/components/FluidTextInput/index.js +3 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +6 -12
- package/lib/components/FluidTimePicker/FluidTimePicker.js +23 -29
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +10 -15
- package/lib/components/Form/Form.js +5 -11
- package/lib/components/FormGroup/FormGroup.js +13 -19
- package/lib/components/FormItem/FormItem.js +5 -11
- package/lib/components/FormLabel/FormLabel.js +6 -12
- package/lib/components/Grid/CSSGrid.js +20 -28
- package/lib/components/Grid/Column.js +31 -37
- package/lib/components/Grid/ColumnHang.js +5 -13
- package/lib/components/Grid/FlexGrid.js +10 -18
- package/lib/components/Grid/Grid.js +9 -16
- package/lib/components/Grid/GridContext.js +7 -14
- package/lib/components/Grid/Row.js +8 -14
- package/lib/components/Heading/index.js +14 -21
- package/lib/components/Icon/Icon.Skeleton.js +4 -10
- package/lib/components/IconButton/index.js +25 -33
- package/lib/components/IconIndicator/index.js +9 -15
- package/lib/components/IdPrefix/index.js +3 -10
- package/lib/components/InlineCheckbox/InlineCheckbox.js +17 -22
- package/lib/components/InlineCheckbox/index.js +2 -2
- package/lib/components/InlineLoading/InlineLoading.js +17 -23
- package/lib/components/InlineLoading/index.js +2 -2
- package/lib/components/Layer/LayerContext.js +1 -7
- package/lib/components/Layer/LayerLevel.js +0 -2
- package/lib/components/Layer/index.js +11 -19
- package/lib/components/Layout/index.js +22 -30
- package/lib/components/LayoutDirection/LayoutDirection.js +6 -13
- package/lib/components/LayoutDirection/LayoutDirectionContext.js +1 -7
- package/lib/components/LayoutDirection/useLayoutDirection.js +0 -2
- package/lib/components/Link/Link.js +15 -21
- package/lib/components/Link/index.js +2 -2
- package/lib/components/ListBox/ListBox.js +17 -23
- package/lib/components/ListBox/ListBoxField.js +7 -12
- package/lib/components/ListBox/ListBoxMenu.js +7 -12
- package/lib/components/ListBox/ListBoxMenuIcon.js +7 -13
- package/lib/components/ListBox/ListBoxMenuItem.js +9 -15
- package/lib/components/ListBox/ListBoxPropTypes.js +2 -8
- package/lib/components/ListBox/ListBoxSelection.js +14 -20
- package/lib/components/ListBox/index.js +7 -7
- package/lib/components/ListBox/next/ListBoxSelection.js +18 -24
- package/lib/components/ListBox/next/ListBoxTrigger.js +7 -13
- package/lib/components/ListItem/ListItem.js +5 -11
- package/lib/components/Loading/Loading.js +14 -20
- package/lib/components/Loading/index.js +2 -2
- package/lib/components/Menu/Menu.d.ts +3 -1
- package/lib/components/Menu/Menu.js +18 -24
- package/lib/components/Menu/MenuContext.js +0 -2
- package/lib/components/Menu/MenuItem.js +44 -52
- package/lib/components/MenuButton/index.js +16 -24
- package/lib/components/Modal/Modal.js +91 -86
- package/lib/components/Modal/index.js +2 -2
- package/lib/components/ModalWrapper/ModalWrapper.js +30 -35
- package/lib/components/MultiSelect/FilterableMultiSelect.js +57 -67
- package/lib/components/MultiSelect/MultiSelect.js +61 -70
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +2 -8
- package/lib/components/MultiSelect/filter.js +0 -6
- package/lib/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/lib/components/MultiSelect/tools/itemToString.js +1 -7
- package/lib/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/lib/components/MultiSelect/tools/sorting.js +0 -2
- package/lib/components/Notification/Notification.js +118 -126
- package/lib/components/NumberInput/NumberFormatPropTypes.js +21 -27
- package/lib/components/NumberInput/NumberInput.Skeleton.js +8 -14
- package/lib/components/NumberInput/NumberInput.js +66 -74
- package/lib/components/OrderedList/OrderedList.js +8 -14
- package/lib/components/OverflowMenu/OverflowMenu.js +42 -49
- package/lib/components/OverflowMenu/index.js +3 -7
- package/lib/components/OverflowMenu/next/index.js +18 -26
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +27 -33
- package/lib/components/OverflowMenuItem/index.js +2 -2
- package/lib/components/OverflowMenuV2/index.d.ts +1 -0
- package/lib/components/OverflowMenuV2/index.js +2 -8
- package/lib/components/PageHeader/PageHeader.js +70 -78
- package/lib/components/PageHeader/index.js +0 -2
- package/lib/components/Pagination/Pagination.Skeleton.js +10 -16
- package/lib/components/Pagination/Pagination.js +44 -51
- package/lib/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/lib/components/Pagination/experimental/PageSelector.js +9 -15
- package/lib/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/lib/components/Pagination/experimental/Pagination.js +34 -40
- package/lib/components/Pagination/experimental/index.d.ts +3 -0
- package/lib/components/PaginationNav/PaginationNav.js +54 -60
- package/lib/components/Popover/index.js +56 -47
- package/lib/components/PrimaryButton/PrimaryButton.js +2 -6
- package/lib/components/ProgressBar/ProgressBar.js +25 -31
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +10 -16
- package/lib/components/ProgressIndicator/ProgressIndicator.js +41 -49
- package/lib/components/RadioButton/RadioButton.Skeleton.js +6 -12
- package/lib/components/RadioButton/RadioButton.js +26 -32
- package/lib/components/RadioButton/index.js +2 -2
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +37 -43
- package/lib/components/RadioTile/RadioTile.js +25 -31
- package/lib/components/RadioTile/index.js +2 -2
- package/lib/components/Search/Search.Skeleton.js +7 -13
- package/lib/components/Search/Search.js +33 -39
- package/lib/components/Search/index.js +3 -3
- package/lib/components/SecondaryButton/SecondaryButton.js +2 -6
- package/lib/components/Select/Select.Skeleton.js +8 -14
- package/lib/components/Select/Select.js +42 -48
- package/lib/components/Select/index.js +3 -3
- package/lib/components/SelectItem/SelectItem.js +8 -14
- package/lib/components/SelectItem/index.js +2 -2
- package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -13
- package/lib/components/ShapeIndicator/index.js +12 -18
- package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -10
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -10
- package/lib/components/SkeletonText/SkeletonText.js +11 -17
- package/lib/components/SkeletonText/index.js +2 -2
- package/lib/components/Slider/Slider.Skeleton.js +29 -35
- package/lib/components/Slider/Slider.js +84 -90
- package/lib/components/Slider/SliderHandles.js +18 -24
- package/lib/components/Slider/index.js +3 -3
- package/lib/components/Stack/HStack.js +1 -7
- package/lib/components/Stack/Stack.js +7 -15
- package/lib/components/Stack/VStack.js +1 -7
- package/lib/components/StructuredList/StructuredList.Skeleton.js +15 -21
- package/lib/components/StructuredList/StructuredList.js +60 -68
- package/lib/components/Switch/IconSwitch.d.ts +3 -0
- package/lib/components/Switch/IconSwitch.js +18 -25
- package/lib/components/Switch/Switch.js +14 -20
- package/lib/components/TabContent/TabContent.js +7 -33
- package/lib/components/Tabs/Tabs.Skeleton.js +10 -16
- package/lib/components/Tabs/Tabs.js +121 -129
- package/lib/components/Tabs/usePressable.js +0 -2
- package/lib/components/Tag/DismissibleTag.js +24 -30
- package/lib/components/Tag/OperationalTag.js +16 -22
- package/lib/components/Tag/SelectableTag.js +19 -25
- package/lib/components/Tag/Tag.Skeleton.js +5 -11
- package/lib/components/Tag/Tag.js +28 -34
- package/lib/components/Tag/isEllipsisActive.js +0 -2
- package/lib/components/Text/Text.js +6 -13
- package/lib/components/Text/TextDirection.js +4 -11
- package/lib/components/Text/TextDirectionContext.js +0 -2
- package/lib/components/Text/createTextComponent.js +1 -7
- package/lib/components/Text/index.js +0 -2
- package/lib/components/TextArea/TextArea.Skeleton.js +7 -13
- package/lib/components/TextArea/TextArea.js +49 -55
- package/lib/components/TextArea/index.js +3 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +36 -42
- package/lib/components/TextInput/PasswordInput.js +48 -54
- package/lib/components/TextInput/TextInput.Skeleton.js +7 -13
- package/lib/components/TextInput/TextInput.js +47 -53
- package/lib/components/TextInput/index.js +3 -3
- package/lib/components/TextInput/util.d.ts +9 -0
- package/lib/components/TextInput/util.js +0 -2
- package/lib/components/Theme/index.js +16 -24
- package/lib/components/Tile/Tile.js +92 -100
- package/lib/components/TileGroup/TileGroup.js +15 -22
- package/lib/components/TimePicker/TimePicker.js +39 -45
- package/lib/components/TimePickerSelect/TimePickerSelect.js +10 -16
- package/lib/components/Toggle/Toggle.Skeleton.js +7 -13
- package/lib/components/Toggle/Toggle.js +28 -34
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +12 -20
- package/lib/components/Toggletip/index.js +32 -40
- package/lib/components/Tooltip/DefinitionTooltip.js +14 -22
- package/lib/components/Tooltip/Tooltip.js +19 -27
- package/lib/components/TreeView/TreeContext.js +0 -2
- package/lib/components/TreeView/TreeNode.js +41 -47
- package/lib/components/TreeView/TreeView.js +17 -23
- package/lib/components/UIShell/Content.js +6 -12
- package/lib/components/UIShell/Header.js +4 -10
- package/lib/components/UIShell/HeaderContainer.js +4 -9
- package/lib/components/UIShell/HeaderGlobalAction.js +11 -17
- package/lib/components/UIShell/HeaderGlobalBar.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +17 -23
- package/lib/components/UIShell/HeaderMenuButton.js +9 -15
- package/lib/components/UIShell/HeaderMenuItem.js +11 -17
- package/lib/components/UIShell/HeaderName.js +8 -14
- package/lib/components/UIShell/HeaderNavigation.js +6 -12
- package/lib/components/UIShell/HeaderPanel.js +11 -17
- package/lib/components/UIShell/HeaderSideNavItems.js +6 -12
- package/lib/components/UIShell/Link.js +6 -11
- package/lib/components/UIShell/SideNav.js +23 -29
- package/lib/components/UIShell/SideNavDetails.js +7 -13
- package/lib/components/UIShell/SideNavDivider.js +5 -11
- package/lib/components/UIShell/SideNavFooter.js +12 -18
- package/lib/components/UIShell/SideNavHeader.js +8 -14
- package/lib/components/UIShell/SideNavIcon.js +6 -12
- package/lib/components/UIShell/SideNavItem.js +6 -12
- package/lib/components/UIShell/SideNavItems.js +9 -15
- package/lib/components/UIShell/SideNavLink.js +13 -19
- package/lib/components/UIShell/SideNavLinkText.js +5 -11
- package/lib/components/UIShell/SideNavMenu.js +20 -26
- package/lib/components/UIShell/SideNavMenuItem.js +13 -19
- package/lib/components/UIShell/SideNavSwitcher.js +13 -19
- package/lib/components/UIShell/SkipToContent.js +7 -13
- package/lib/components/UIShell/Switcher.js +9 -15
- package/lib/components/UIShell/SwitcherDivider.js +4 -10
- package/lib/components/UIShell/SwitcherItem.js +15 -21
- package/lib/components/UIShell/_utils.d.ts +7 -0
- package/lib/components/UIShell/_utils.js +0 -2
- package/lib/components/UnorderedList/UnorderedList.js +7 -13
- package/lib/feature-flags.d.ts +1 -0
- package/lib/feature-flags.js +3 -4
- package/lib/index.js +180 -182
- package/lib/internal/FloatingMenu.js +10 -18
- package/lib/internal/OptimizedResize.js +2 -8
- package/lib/internal/Selection.js +1 -7
- package/lib/internal/clamp.js +0 -2
- package/lib/internal/createClassWrapper.js +1 -7
- package/lib/internal/deprecateFieldOnObject.js +1 -3
- package/lib/internal/environment.js +0 -2
- package/lib/internal/getAnnouncement.js +0 -2
- package/lib/internal/keyboard/keys.js +0 -2
- package/lib/internal/keyboard/match.js +0 -2
- package/lib/internal/keyboard/navigation.js +0 -2
- package/lib/internal/noopFn.js +0 -2
- package/lib/internal/useAttachedMenu.js +0 -2
- package/lib/internal/useControllableState.js +0 -2
- package/lib/internal/useDelayedState.js +0 -2
- package/lib/internal/useEvent.js +0 -2
- package/lib/internal/useId.d.ts +21 -0
- package/lib/internal/useId.js +27 -7
- package/lib/internal/useIdPrefix.js +2 -8
- package/lib/internal/useIsomorphicEffect.js +1 -1
- package/lib/internal/useMatchMedia.js +0 -2
- package/lib/internal/useMergedRefs.js +0 -2
- package/lib/internal/useNoInteractiveChildren.js +0 -2
- package/lib/internal/useNormalizedInputProps.js +2 -8
- package/lib/internal/useOutsideClick.js +0 -2
- package/lib/internal/useOverflowItems.js +1 -7
- package/lib/internal/usePrefix.js +2 -8
- package/lib/internal/usePreviousValue.js +0 -2
- package/lib/internal/useResizeObserver.js +0 -2
- package/lib/internal/useSavedCallback.js +0 -2
- package/lib/internal/utils.js +0 -2
- package/lib/internal/warning.js +0 -2
- package/lib/internal/wrapFocus.js +0 -2
- package/lib/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -2
- package/lib/prop-types/AriaPropTypes.js +2 -8
- package/lib/prop-types/deprecate.js +0 -2
- package/lib/prop-types/deprecateComponent.d.ts +1 -0
- package/lib/prop-types/deprecateComponent.js +2 -5
- package/lib/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/lib/prop-types/deprecateValuesWithin.js +1 -1
- package/lib/prop-types/isRequiredOneOf.js +0 -2
- package/lib/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -1
- package/lib/tools/events.js +0 -2
- package/lib/tools/mapPopoverAlign.js +0 -2
- package/lib/tools/mergeRefs.d.ts +12 -0
- package/lib/tools/mergeRefs.js +1 -2
- package/lib/tools/setupGetInstanceId.js +0 -2
- package/lib/tools/toggleClass.js +0 -2
- package/lib/tools/wrapComponent.js +4 -10
- package/package.json +11 -11
- /package/es/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -0
|
@@ -18,36 +18,30 @@ var MultiSelect = require('../MultiSelect/MultiSelect.js');
|
|
|
18
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
19
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
24
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
26
|
-
|
|
27
|
-
const FluidMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(function FluidMultiSelect({
|
|
21
|
+
const FluidMultiSelect = /*#__PURE__*/React.forwardRef(function FluidMultiSelect({
|
|
28
22
|
className,
|
|
29
23
|
isCondensed,
|
|
30
24
|
isFilterable,
|
|
31
25
|
...other
|
|
32
26
|
}, ref) {
|
|
33
27
|
const prefix = usePrefix.usePrefix();
|
|
34
|
-
const classNames =
|
|
28
|
+
const classNames = cx(`${prefix}--list-box__wrapper--fluid`, className, {
|
|
35
29
|
[`${prefix}--list-box__wrapper--fluid--condensed`]: isCondensed
|
|
36
30
|
});
|
|
37
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/React.createElement(FormContext.FormContext.Provider, {
|
|
38
32
|
value: {
|
|
39
33
|
isFluid: true
|
|
40
34
|
}
|
|
41
35
|
}, isFilterable ?
|
|
42
36
|
/*#__PURE__*/
|
|
43
37
|
// @ts-ignore
|
|
44
|
-
|
|
38
|
+
React.createElement(FilterableMultiSelect.FilterableMultiSelect, _rollupPluginBabelHelpers.extends({
|
|
45
39
|
ref: ref,
|
|
46
40
|
className: classNames
|
|
47
41
|
}, other)) :
|
|
48
42
|
/*#__PURE__*/
|
|
49
43
|
// @ts-ignore
|
|
50
|
-
|
|
44
|
+
React.createElement(MultiSelect.MultiSelect, _rollupPluginBabelHelpers.extends({
|
|
51
45
|
ref: ref,
|
|
52
46
|
className: classNames
|
|
53
47
|
}, other)));
|
|
@@ -56,29 +50,29 @@ FluidMultiSelect.propTypes = {
|
|
|
56
50
|
/**
|
|
57
51
|
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
58
52
|
*/
|
|
59
|
-
className:
|
|
53
|
+
className: PropTypes.string,
|
|
60
54
|
/**
|
|
61
55
|
* Specify the text that should be read for screen readers that describes total items selected
|
|
62
56
|
*/
|
|
63
|
-
clearSelectionDescription:
|
|
57
|
+
clearSelectionDescription: PropTypes.string,
|
|
64
58
|
/**
|
|
65
59
|
* Specify the text that should be read for screen readers to clear selection.
|
|
66
60
|
*/
|
|
67
|
-
clearSelectionText:
|
|
61
|
+
clearSelectionText: PropTypes.string,
|
|
68
62
|
/**
|
|
69
63
|
* Provide a compare function that is used to determine the ordering of
|
|
70
64
|
* options. See 'sortItems' for more control. Consider declaring function
|
|
71
65
|
* with `useCallback` to prevent unnecessary re-renders.
|
|
72
66
|
*/
|
|
73
|
-
compareItems:
|
|
67
|
+
compareItems: PropTypes.func,
|
|
74
68
|
/**
|
|
75
69
|
* Specify the direction of the multiselect dropdown. Can be either top or bottom.
|
|
76
70
|
*/
|
|
77
|
-
direction:
|
|
71
|
+
direction: PropTypes.oneOf(['top', 'bottom']),
|
|
78
72
|
/**
|
|
79
73
|
* Specify whether the `<input>` should be disabled
|
|
80
74
|
*/
|
|
81
|
-
disabled:
|
|
75
|
+
disabled: PropTypes.bool,
|
|
82
76
|
/**
|
|
83
77
|
* Additional props passed to Downshift.
|
|
84
78
|
*
|
|
@@ -87,89 +81,89 @@ FluidMultiSelect.propTypes = {
|
|
|
87
81
|
* change, and in some cases they can not be shimmed by Carbon to shield you
|
|
88
82
|
* from potentially breaking changes.
|
|
89
83
|
*/
|
|
90
|
-
downshiftProps:
|
|
84
|
+
downshiftProps: PropTypes.object,
|
|
91
85
|
/**
|
|
92
86
|
* Specify a custom `id` for the `<input>`
|
|
93
87
|
*/
|
|
94
|
-
id:
|
|
88
|
+
id: PropTypes.string.isRequired,
|
|
95
89
|
/**
|
|
96
90
|
* Allow users to pass in arbitrary items from their collection that are
|
|
97
91
|
* pre-selected
|
|
98
92
|
*/
|
|
99
|
-
initialSelectedItems:
|
|
93
|
+
initialSelectedItems: PropTypes.array,
|
|
100
94
|
/**
|
|
101
95
|
* Specify if the currently selected value is invalid.
|
|
102
96
|
*/
|
|
103
|
-
invalid:
|
|
97
|
+
invalid: PropTypes.bool,
|
|
104
98
|
/**
|
|
105
99
|
* Provide the text that is displayed when the control is in an invalid state
|
|
106
100
|
*/
|
|
107
|
-
invalidText:
|
|
101
|
+
invalidText: PropTypes.node,
|
|
108
102
|
/**
|
|
109
103
|
* Specify if the `FluidMultiSelect` should render its menu items in condensed mode
|
|
110
104
|
*/
|
|
111
|
-
isCondensed:
|
|
105
|
+
isCondensed: PropTypes.bool,
|
|
112
106
|
/**
|
|
113
107
|
* Specify if the `FluidMultiSelect` should render the `filterable` variant of `FluidMultiSelect`
|
|
114
108
|
*/
|
|
115
|
-
isFilterable:
|
|
109
|
+
isFilterable: PropTypes.bool,
|
|
116
110
|
/**
|
|
117
111
|
* Function to render items as custom components instead of strings.
|
|
118
112
|
* Defaults to null and is overridden by a getter
|
|
119
113
|
*/
|
|
120
|
-
itemToElement:
|
|
114
|
+
itemToElement: PropTypes.func,
|
|
121
115
|
/**
|
|
122
116
|
* Helper function passed to downshift that allows the library to render a
|
|
123
117
|
* given item to a string label. By default, it extracts the `label` field
|
|
124
118
|
* from a given item to serve as the item label in the list. Consider
|
|
125
119
|
* declaring function with `useCallback` to prevent unnecessary re-renders.
|
|
126
120
|
*/
|
|
127
|
-
itemToString:
|
|
121
|
+
itemToString: PropTypes.func,
|
|
128
122
|
/**
|
|
129
123
|
* We try to stay as generic as possible here to allow individuals to pass
|
|
130
124
|
* in a collection of whatever kind of data structure they prefer
|
|
131
125
|
*/
|
|
132
|
-
items:
|
|
126
|
+
items: PropTypes.array.isRequired,
|
|
133
127
|
/**
|
|
134
128
|
* Generic `label` that will be used as the textual representation of what
|
|
135
129
|
* this field is for
|
|
136
130
|
*/
|
|
137
|
-
label:
|
|
131
|
+
label: PropTypes.node.isRequired,
|
|
138
132
|
/**
|
|
139
133
|
* Specify the locale of the control. Used for the default `compareItems`
|
|
140
134
|
* used for sorting the list of items in the control.
|
|
141
135
|
*/
|
|
142
|
-
locale:
|
|
136
|
+
locale: PropTypes.string,
|
|
143
137
|
/**
|
|
144
138
|
* `onChange` is a utility for this controlled component to communicate to a
|
|
145
139
|
* consuming component what kind of internal state changes are occurring.
|
|
146
140
|
*/
|
|
147
|
-
onChange:
|
|
141
|
+
onChange: PropTypes.func,
|
|
148
142
|
/**
|
|
149
143
|
* **Filterable variant only** - `onInputValueChange` is a utility for this controlled component to communicate to
|
|
150
144
|
* the currently typed input.
|
|
151
145
|
*/
|
|
152
|
-
onInputValueChange:
|
|
146
|
+
onInputValueChange: PropTypes.func,
|
|
153
147
|
/**
|
|
154
148
|
* `onMenuChange` is a utility for this controlled component to communicate to a
|
|
155
149
|
* consuming component that the menu was open(`true`)/closed(`false`).
|
|
156
150
|
*/
|
|
157
|
-
onMenuChange:
|
|
151
|
+
onMenuChange: PropTypes.func,
|
|
158
152
|
/**
|
|
159
153
|
* Whether or not the Multiselect is readonly
|
|
160
154
|
*/
|
|
161
|
-
readOnly:
|
|
155
|
+
readOnly: PropTypes.bool,
|
|
162
156
|
/**
|
|
163
157
|
* For full control of the selected items
|
|
164
158
|
*/
|
|
165
|
-
selectedItems:
|
|
159
|
+
selectedItems: PropTypes.array,
|
|
166
160
|
/**
|
|
167
161
|
* Specify feedback (mode) of the selection.
|
|
168
162
|
* `top`: selected item jumps to top
|
|
169
163
|
* `fixed`: selected item stays at it's position
|
|
170
164
|
* `top-after-reopen`: selected item jump to top after reopen dropdown
|
|
171
165
|
*/
|
|
172
|
-
selectionFeedback:
|
|
166
|
+
selectionFeedback: PropTypes.oneOf(['top', 'fixed', 'top-after-reopen']),
|
|
173
167
|
/**
|
|
174
168
|
* Provide a method that sorts all options in the control. Overriding this
|
|
175
169
|
* prop means that you also have to handle the sort logic for selected versus
|
|
@@ -190,28 +184,28 @@ FluidMultiSelect.propTypes = {
|
|
|
190
184
|
* locale: string,
|
|
191
185
|
* }) => Array<Item>
|
|
192
186
|
*/
|
|
193
|
-
sortItems:
|
|
187
|
+
sortItems: PropTypes.func,
|
|
194
188
|
/**
|
|
195
189
|
* Provide the title text that will be read by a screen reader when
|
|
196
190
|
* visiting this control
|
|
197
191
|
*/
|
|
198
|
-
titleText:
|
|
192
|
+
titleText: PropTypes.node,
|
|
199
193
|
/**
|
|
200
194
|
* Callback function for translating ListBoxMenuIcon SVG title
|
|
201
195
|
*/
|
|
202
|
-
translateWithId:
|
|
196
|
+
translateWithId: PropTypes.func,
|
|
203
197
|
/**
|
|
204
198
|
* Specify title to show title on hover
|
|
205
199
|
*/
|
|
206
|
-
useTitleInItem:
|
|
200
|
+
useTitleInItem: PropTypes.bool,
|
|
207
201
|
/**
|
|
208
202
|
* Specify whether the control is currently in warning state
|
|
209
203
|
*/
|
|
210
|
-
warn:
|
|
204
|
+
warn: PropTypes.bool,
|
|
211
205
|
/**
|
|
212
206
|
* Provide the text that is displayed when the control is in warning state
|
|
213
207
|
*/
|
|
214
|
-
warnText:
|
|
208
|
+
warnText: PropTypes.node
|
|
215
209
|
};
|
|
216
210
|
|
|
217
|
-
exports
|
|
211
|
+
exports.default = FluidMultiSelect;
|
|
@@ -16,26 +16,20 @@ var cx = require('classnames');
|
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
18
18
|
|
|
19
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
|
-
|
|
21
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
22
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
24
|
-
|
|
25
19
|
const FluidNumberInputSkeleton = ({
|
|
26
20
|
className,
|
|
27
21
|
...other
|
|
28
22
|
}) => {
|
|
29
23
|
const prefix = usePrefix.usePrefix();
|
|
30
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/React.createElement(FormContext.FormContext.Provider, {
|
|
31
25
|
value: {
|
|
32
26
|
isFluid: true
|
|
33
27
|
}
|
|
34
|
-
}, /*#__PURE__*/
|
|
35
|
-
className:
|
|
36
|
-
}, other), /*#__PURE__*/
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
29
|
+
className: cx(`${prefix}--form-item ${prefix}--text-input--fluid__skeleton`, className)
|
|
30
|
+
}, other), /*#__PURE__*/React.createElement("span", {
|
|
37
31
|
className: `${prefix}--label ${prefix}--skeleton`
|
|
38
|
-
}), /*#__PURE__*/
|
|
32
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
39
33
|
className: `${prefix}--skeleton ${prefix}--text-input`
|
|
40
34
|
})));
|
|
41
35
|
};
|
|
@@ -43,7 +37,7 @@ FluidNumberInputSkeleton.propTypes = {
|
|
|
43
37
|
/**
|
|
44
38
|
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
45
39
|
*/
|
|
46
|
-
className:
|
|
40
|
+
className: PropTypes.string
|
|
47
41
|
};
|
|
48
42
|
|
|
49
|
-
exports
|
|
43
|
+
exports.default = FluidNumberInputSkeleton;
|
|
@@ -19,23 +19,17 @@ var usePrefix = require('../../internal/usePrefix.js');
|
|
|
19
19
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
20
20
|
var NumberFormatPropTypes = require('../NumberInput/NumberFormatPropTypes.js');
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
25
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
27
|
-
|
|
28
|
-
const FluidNumberInput = /*#__PURE__*/React__default["default"].forwardRef(function FluidNumberInput({
|
|
22
|
+
const FluidNumberInput = /*#__PURE__*/React.forwardRef(function FluidNumberInput({
|
|
29
23
|
className,
|
|
30
24
|
...other
|
|
31
25
|
}, ref) {
|
|
32
26
|
const prefix = usePrefix.usePrefix();
|
|
33
|
-
const classNames =
|
|
34
|
-
return /*#__PURE__*/
|
|
27
|
+
const classNames = cx(`${prefix}--number-input--fluid`, className);
|
|
28
|
+
return /*#__PURE__*/React.createElement(FormContext.FormContext.Provider, {
|
|
35
29
|
value: {
|
|
36
30
|
isFluid: true
|
|
37
31
|
}
|
|
38
|
-
}, /*#__PURE__*/
|
|
32
|
+
}, /*#__PURE__*/React.createElement(NumberInput.NumberInput, _rollupPluginBabelHelpers.extends({
|
|
39
33
|
ref: ref,
|
|
40
34
|
className: classNames
|
|
41
35
|
}, other)));
|
|
@@ -44,23 +38,23 @@ FluidNumberInput.propTypes = {
|
|
|
44
38
|
/**
|
|
45
39
|
* `true` to allow empty string.
|
|
46
40
|
*/
|
|
47
|
-
allowEmpty:
|
|
41
|
+
allowEmpty: PropTypes.bool,
|
|
48
42
|
/**
|
|
49
43
|
* Specify an optional className to be applied to the wrapper node
|
|
50
44
|
*/
|
|
51
|
-
className:
|
|
45
|
+
className: PropTypes.string,
|
|
52
46
|
/**
|
|
53
47
|
* Optional starting value for uncontrolled state
|
|
54
48
|
*/
|
|
55
|
-
defaultValue:
|
|
49
|
+
defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
56
50
|
/**
|
|
57
51
|
* Specify if the wheel functionality for the input should be disabled, or not
|
|
58
52
|
*/
|
|
59
|
-
disableWheel:
|
|
53
|
+
disableWheel: PropTypes.bool,
|
|
60
54
|
/**
|
|
61
55
|
* Specify if the control should be disabled, or not
|
|
62
56
|
*/
|
|
63
|
-
disabled:
|
|
57
|
+
disabled: PropTypes.bool,
|
|
64
58
|
/**
|
|
65
59
|
* **Experimental:** Specify Intl.NumberFormat options applied to internal
|
|
66
60
|
* number parsing and formatting. Use with `type="text"`, has no effect when
|
|
@@ -71,45 +65,45 @@ FluidNumberInput.propTypes = {
|
|
|
71
65
|
/**
|
|
72
66
|
* Provide a description for up/down icons that can be read by screen readers
|
|
73
67
|
*/
|
|
74
|
-
iconDescription:
|
|
68
|
+
iconDescription: PropTypes.string,
|
|
75
69
|
/**
|
|
76
70
|
* Specify a custom `id` for the input
|
|
77
71
|
*/
|
|
78
|
-
id:
|
|
72
|
+
id: PropTypes.string.isRequired,
|
|
79
73
|
/**
|
|
80
74
|
* Instruct the browser which keyboard to display on mobile devices. Defaults
|
|
81
75
|
* to `decimal`, but note that standard numeric keyboards vary across devices
|
|
82
76
|
* and operating systems.
|
|
83
77
|
* @see https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode/
|
|
84
78
|
*/
|
|
85
|
-
inputMode:
|
|
79
|
+
inputMode: PropTypes.oneOf(['none', 'text', 'tel', 'url', 'email', 'numeric', 'decimal', 'search']),
|
|
86
80
|
/**
|
|
87
81
|
* Specify if the currently value is invalid.
|
|
88
82
|
*/
|
|
89
|
-
invalid:
|
|
83
|
+
invalid: PropTypes.bool,
|
|
90
84
|
/**
|
|
91
85
|
* Message which is displayed if the value is invalid.
|
|
92
86
|
*/
|
|
93
|
-
invalidText:
|
|
87
|
+
invalidText: PropTypes.node,
|
|
94
88
|
/**
|
|
95
89
|
* Generic `label` that will be used as the textual representation of what
|
|
96
90
|
* this field is for
|
|
97
91
|
*/
|
|
98
|
-
label:
|
|
92
|
+
label: PropTypes.node,
|
|
99
93
|
/**
|
|
100
94
|
* **Experimental:** Specify a [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt)
|
|
101
95
|
* language code for parsing and formatting. Use with `type="text"`, has no
|
|
102
96
|
* effect when `type="number"`.
|
|
103
97
|
*/
|
|
104
|
-
locale:
|
|
98
|
+
locale: PropTypes.string,
|
|
105
99
|
/**
|
|
106
100
|
* The maximum value.
|
|
107
101
|
*/
|
|
108
|
-
max:
|
|
102
|
+
max: PropTypes.number,
|
|
109
103
|
/**
|
|
110
104
|
* The minimum value.
|
|
111
105
|
*/
|
|
112
|
-
min:
|
|
106
|
+
min: PropTypes.number,
|
|
113
107
|
/**
|
|
114
108
|
* Provide an optional handler that is called when the internal state of
|
|
115
109
|
* NumberInput changes. This handler is called with event and state info.
|
|
@@ -118,50 +112,50 @@ FluidNumberInput.propTypes = {
|
|
|
118
112
|
* parsed and formatted.
|
|
119
113
|
* `(event, { value, direction }) => void`
|
|
120
114
|
*/
|
|
121
|
-
onChange:
|
|
115
|
+
onChange: PropTypes.func,
|
|
122
116
|
/**
|
|
123
117
|
* Provide an optional function to be called when the up/down button is clicked
|
|
124
118
|
*/
|
|
125
|
-
onClick:
|
|
119
|
+
onClick: PropTypes.func,
|
|
126
120
|
/**
|
|
127
121
|
* Provide an optional function to be called when a key is pressed in the number input
|
|
128
122
|
*/
|
|
129
|
-
onKeyUp:
|
|
123
|
+
onKeyUp: PropTypes.func,
|
|
130
124
|
/**
|
|
131
125
|
* When type="text", provide an optional pattern to restrict user input. Has
|
|
132
126
|
* no effect when type="number".
|
|
133
127
|
*/
|
|
134
|
-
pattern:
|
|
128
|
+
pattern: PropTypes.string,
|
|
135
129
|
/**
|
|
136
130
|
* Specify how much the values should increase/decrease upon clicking on up/down button
|
|
137
131
|
*/
|
|
138
|
-
step:
|
|
132
|
+
step: PropTypes.number,
|
|
139
133
|
/**
|
|
140
134
|
* Provide custom text for the component for each translation id
|
|
141
135
|
*/
|
|
142
|
-
translateWithId:
|
|
136
|
+
translateWithId: PropTypes.func,
|
|
143
137
|
/**
|
|
144
138
|
* **Experimental**: Specify if the input should be of type text or number.
|
|
145
139
|
* Use type="text" with `locale`, `formatOptions`, and guide user input with
|
|
146
140
|
* `pattern` and `inputMode`.
|
|
147
141
|
*/
|
|
148
|
-
type:
|
|
142
|
+
type: PropTypes.oneOf(['number', 'text']),
|
|
149
143
|
/**
|
|
150
144
|
* Specify the value of the input
|
|
151
145
|
*/
|
|
152
|
-
value:
|
|
146
|
+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
153
147
|
/**
|
|
154
148
|
* Specify whether the control is currently in warning state
|
|
155
149
|
*/
|
|
156
|
-
warn:
|
|
150
|
+
warn: PropTypes.bool,
|
|
157
151
|
/**
|
|
158
152
|
* Provide the text that is displayed when the control is in warning state
|
|
159
153
|
*/
|
|
160
|
-
warnText:
|
|
154
|
+
warnText: PropTypes.node,
|
|
161
155
|
/**
|
|
162
156
|
* Whether or not the component is readonly
|
|
163
157
|
*/
|
|
164
|
-
readOnly:
|
|
158
|
+
readOnly: PropTypes.bool
|
|
165
159
|
};
|
|
166
160
|
|
|
167
|
-
exports
|
|
161
|
+
exports.default = FluidNumberInput;
|
|
@@ -16,26 +16,20 @@ var cx = require('classnames');
|
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
18
18
|
|
|
19
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
|
-
|
|
21
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
22
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
24
|
-
|
|
25
19
|
const FluidSearchSkeleton = ({
|
|
26
20
|
className,
|
|
27
21
|
...other
|
|
28
22
|
}) => {
|
|
29
23
|
const prefix = usePrefix.usePrefix();
|
|
30
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/React.createElement(FormContext.FormContext.Provider, {
|
|
31
25
|
value: {
|
|
32
26
|
isFluid: true
|
|
33
27
|
}
|
|
34
|
-
}, /*#__PURE__*/
|
|
35
|
-
className:
|
|
36
|
-
}, other), /*#__PURE__*/
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
29
|
+
className: cx(`${prefix}--form-item ${prefix}--text-input--fluid__skeleton`, className)
|
|
30
|
+
}, other), /*#__PURE__*/React.createElement("span", {
|
|
37
31
|
className: `${prefix}--label ${prefix}--skeleton`
|
|
38
|
-
}), /*#__PURE__*/
|
|
32
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
39
33
|
className: `${prefix}--skeleton ${prefix}--text-input`
|
|
40
34
|
})));
|
|
41
35
|
};
|
|
@@ -43,7 +37,7 @@ FluidSearchSkeleton.propTypes = {
|
|
|
43
37
|
/**
|
|
44
38
|
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
45
39
|
*/
|
|
46
|
-
className:
|
|
40
|
+
className: PropTypes.string
|
|
47
41
|
};
|
|
48
42
|
|
|
49
|
-
exports
|
|
43
|
+
exports.default = FluidSearchSkeleton;
|
|
@@ -18,23 +18,17 @@ require('../Search/Search.Skeleton.js');
|
|
|
18
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
19
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
24
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
26
|
-
|
|
27
|
-
const FluidSearch = /*#__PURE__*/React__default["default"].forwardRef(function FluidSearch({
|
|
21
|
+
const FluidSearch = /*#__PURE__*/React.forwardRef(function FluidSearch({
|
|
28
22
|
className,
|
|
29
23
|
...other
|
|
30
24
|
}, ref) {
|
|
31
25
|
const prefix = usePrefix.usePrefix();
|
|
32
|
-
const classNames =
|
|
33
|
-
return /*#__PURE__*/
|
|
26
|
+
const classNames = cx(`${prefix}--search--fluid`, className);
|
|
27
|
+
return /*#__PURE__*/React.createElement(FormContext.FormContext.Provider, {
|
|
34
28
|
value: {
|
|
35
29
|
isFluid: true
|
|
36
30
|
}
|
|
37
|
-
}, /*#__PURE__*/
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Search.default, _rollupPluginBabelHelpers.extends({
|
|
38
32
|
ref: ref,
|
|
39
33
|
className: classNames
|
|
40
34
|
}, other)));
|
|
@@ -44,61 +38,61 @@ FluidSearch.propTypes = {
|
|
|
44
38
|
* Specify an optional value for the `autocomplete` property on the underlying
|
|
45
39
|
* `<input>`, defaults to "off"
|
|
46
40
|
*/
|
|
47
|
-
autoComplete:
|
|
41
|
+
autoComplete: PropTypes.string,
|
|
48
42
|
/**
|
|
49
43
|
* Specify an optional className to be applied to the container node
|
|
50
44
|
*/
|
|
51
|
-
className:
|
|
45
|
+
className: PropTypes.string,
|
|
52
46
|
/**
|
|
53
47
|
* Specify a label to be read by screen readers on the "close" button
|
|
54
48
|
*/
|
|
55
|
-
closeButtonLabelText:
|
|
49
|
+
closeButtonLabelText: PropTypes.string,
|
|
56
50
|
/**
|
|
57
51
|
* Optionally provide the default value of the `<input>`
|
|
58
52
|
*/
|
|
59
|
-
defaultValue:
|
|
53
|
+
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
60
54
|
/**
|
|
61
55
|
* Specify whether the `<input>` should be disabled
|
|
62
56
|
*/
|
|
63
|
-
disabled:
|
|
57
|
+
disabled: PropTypes.bool,
|
|
64
58
|
/**
|
|
65
59
|
* Specify a custom `id` for the input
|
|
66
60
|
*/
|
|
67
|
-
id:
|
|
61
|
+
id: PropTypes.string,
|
|
68
62
|
/**
|
|
69
63
|
* Provide the label text for the Search icon
|
|
70
64
|
*/
|
|
71
|
-
labelText:
|
|
65
|
+
labelText: PropTypes.node.isRequired,
|
|
72
66
|
/**
|
|
73
67
|
* Optional callback called when the search value changes.
|
|
74
68
|
*/
|
|
75
|
-
onChange:
|
|
69
|
+
onChange: PropTypes.func,
|
|
76
70
|
/**
|
|
77
71
|
* Optional callback called when the search value is cleared.
|
|
78
72
|
*/
|
|
79
|
-
onClear:
|
|
73
|
+
onClear: PropTypes.func,
|
|
80
74
|
/**
|
|
81
75
|
* Provide a handler that is invoked on the key down event for the input
|
|
82
76
|
*/
|
|
83
|
-
onKeyDown:
|
|
77
|
+
onKeyDown: PropTypes.func,
|
|
84
78
|
/**
|
|
85
79
|
* Provide an optional placeholder text for the Search.
|
|
86
80
|
* Note: if the label and placeholder differ,
|
|
87
81
|
* VoiceOver on Mac will read both
|
|
88
82
|
*/
|
|
89
|
-
placeholder:
|
|
83
|
+
placeholder: PropTypes.string,
|
|
90
84
|
/**
|
|
91
85
|
* Specify the role for the underlying `<input>`, defaults to `searchbox`
|
|
92
86
|
*/
|
|
93
|
-
role:
|
|
87
|
+
role: PropTypes.string,
|
|
94
88
|
/**
|
|
95
89
|
* Optional prop to specify the type of the `<input>`
|
|
96
90
|
*/
|
|
97
|
-
type:
|
|
91
|
+
type: PropTypes.string,
|
|
98
92
|
/**
|
|
99
93
|
* Specify the value of the `<input>`
|
|
100
94
|
*/
|
|
101
|
-
value:
|
|
95
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
102
96
|
};
|
|
103
97
|
|
|
104
|
-
exports
|
|
98
|
+
exports.default = FluidSearch;
|
|
@@ -15,25 +15,19 @@ var React = require('react');
|
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
|
|
24
18
|
const FluidSelectSkeleton = ({
|
|
25
19
|
className,
|
|
26
20
|
...rest
|
|
27
21
|
}) => {
|
|
28
22
|
const prefix = usePrefix.usePrefix();
|
|
29
|
-
const wrapperClasses =
|
|
30
|
-
return /*#__PURE__*/
|
|
23
|
+
const wrapperClasses = cx(className, `${prefix}--list-box__wrapper--fluid`);
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
31
25
|
className: wrapperClasses
|
|
32
|
-
}, rest), /*#__PURE__*/
|
|
26
|
+
}, rest), /*#__PURE__*/React.createElement("div", {
|
|
33
27
|
className: `${prefix}--skeleton ${prefix}--list-box`
|
|
34
|
-
}, /*#__PURE__*/
|
|
28
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
35
29
|
className: `${prefix}--list-box__label`
|
|
36
|
-
}), /*#__PURE__*/
|
|
30
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
37
31
|
className: `${prefix}--list-box__field`
|
|
38
32
|
})));
|
|
39
33
|
};
|
|
@@ -41,7 +35,7 @@ FluidSelectSkeleton.propTypes = {
|
|
|
41
35
|
/**
|
|
42
36
|
* Specify an optional className to add.
|
|
43
37
|
*/
|
|
44
|
-
className:
|
|
38
|
+
className: PropTypes.string
|
|
45
39
|
};
|
|
46
40
|
|
|
47
|
-
exports
|
|
41
|
+
exports.default = FluidSelectSkeleton;
|