@carbon/react 1.86.0 → 1.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +871 -871
- package/es/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/es/components/Button/Button.Skeleton.js +2 -1
- package/es/components/Button/Button.d.ts +1 -1
- package/es/components/Button/Button.js +3 -3
- package/es/components/Button/ButtonBase.js +2 -0
- package/es/components/Button/index.js +5 -1
- package/es/components/ButtonSet/index.js +4 -1
- package/es/components/Checkbox/index.js +4 -1
- package/es/components/CodeSnippet/CodeSnippet.js +1 -0
- package/es/components/ComboBox/ComboBox.d.ts +7 -0
- package/es/components/ComboBox/ComboBox.js +11 -2
- package/es/components/ComboBox/index.js +4 -1
- package/es/components/ComposedModal/ComposedModal.js +18 -8
- package/es/components/ContainedList/ContainedList.d.ts +1 -1
- package/es/components/ContainedList/ContainedList.js +3 -3
- package/es/components/ContainedList/ContainedListItem/index.js +4 -1
- package/es/components/ContainedList/index.js +2 -2
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/Copy/index.js +4 -1
- package/es/components/CopyButton/index.js +4 -1
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/es/components/DataTable/state/getDerivedStateFromProps.js +1 -2
- package/es/components/DataTable/state/sorting.d.ts +15 -0
- package/es/components/DataTable/state/sorting.js +1 -2
- package/es/components/DataTable/tools/denormalize.d.ts +22 -0
- package/es/components/DataTable/tools/denormalize.js +1 -2
- package/es/components/DataTable/tools/normalize.d.ts +9 -0
- package/es/components/DataTable/tools/normalize.js +1 -2
- package/es/components/DatePicker/DatePicker.js +18 -11
- package/es/components/DatePicker/index.js +4 -1
- package/es/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/es/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/es/components/DatePickerInput/DatePickerInput.js +6 -0
- package/es/components/DatePickerInput/index.js +4 -1
- package/es/components/Dialog/index.js +2 -2
- package/es/components/Dropdown/Dropdown.Skeleton.js +4 -4
- package/es/components/Dropdown/Dropdown.js +2 -2
- package/es/components/Dropdown/index.js +4 -1
- package/es/components/FeatureFlags/index.js +2 -2
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +3 -2
- package/es/components/FluidNumberInput/FluidNumberInput.js +3 -2
- package/es/components/FluidSelect/index.js +4 -1
- package/es/components/FluidTextInput/index.js +4 -1
- package/es/components/IconButton/index.d.ts +1 -1
- package/es/components/IconIndicator/index.js +1 -1
- package/es/components/InlineCheckbox/index.js +4 -1
- package/es/components/InlineLoading/index.js +4 -1
- package/es/components/LayoutDirection/LayoutDirection.js +1 -2
- package/es/components/Link/index.js +4 -1
- package/es/components/ListBox/ListBox.js +1 -1
- package/es/components/Loading/index.js +4 -1
- package/es/components/Menu/Menu.d.ts +3 -1
- package/es/components/Menu/Menu.js +3 -1
- package/es/components/Menu/MenuItem.js +1 -1
- package/es/components/Modal/Modal.js +16 -5
- package/es/components/Modal/index.js +4 -1
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +7 -0
- package/es/components/MultiSelect/FilterableMultiSelect.js +20 -10
- package/es/components/MultiSelect/MultiSelect.js +2 -2
- package/es/components/MultiSelect/filter.js +0 -4
- package/es/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/es/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/es/components/Notification/Notification.js +2 -2
- package/es/components/NumberInput/NumberInput.d.ts +3 -2
- package/es/components/NumberInput/NumberInput.js +5 -4
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/OverflowMenuItem/index.js +4 -1
- package/es/components/OverflowMenuV2/index.d.ts +1 -0
- package/es/components/PageHeader/PageHeader.js +1 -1
- package/es/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/es/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/es/components/Pagination/experimental/index.d.ts +3 -0
- package/es/components/Popover/index.js +26 -8
- package/es/components/RadioButton/index.js +4 -1
- package/es/components/RadioTile/index.js +4 -1
- package/es/components/Search/Search.js +1 -1
- package/es/components/Search/index.js +4 -1
- package/es/components/Select/index.js +4 -1
- package/es/components/SelectItem/index.js +4 -1
- package/es/components/ShapeIndicator/index.js +1 -1
- package/es/components/SkeletonText/index.js +4 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/Switch/IconSwitch.d.ts +3 -0
- package/es/components/Switch/IconSwitch.js +1 -2
- package/es/components/TabContent/TabContent.js +2 -22
- package/es/components/Tabs/Tabs.js +5 -5
- package/es/components/Tag/DismissibleTag.js +1 -1
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/TextArea/index.js +4 -1
- package/es/components/TextInput/index.js +4 -1
- package/es/components/TextInput/util.d.ts +9 -0
- package/es/components/Toggletip/index.d.ts +1 -1
- package/es/components/Toggletip/index.js +3 -3
- package/es/components/UIShell/HeaderMenu.js +2 -2
- package/es/components/UIShell/SideNav.js +1 -1
- package/es/components/UIShell/_utils.d.ts +7 -0
- package/es/feature-flags.d.ts +1 -0
- package/es/internal/FloatingMenu.js +1 -1
- package/es/internal/deprecateFieldOnObject.js +1 -1
- package/es/internal/useEvent.d.ts +2 -2
- package/es/internal/useEvent.js +4 -3
- package/es/internal/useId.d.ts +21 -0
- package/es/internal/useId.js +27 -1
- package/es/internal/useOverflowItems.js +0 -6
- package/es/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -1
- package/es/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -1
- package/es/prop-types/deprecateComponent.d.ts +1 -0
- package/es/prop-types/deprecateComponent.js +1 -4
- package/es/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/es/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/es/tools/mergeRefs.d.ts +12 -0
- package/es/tools/mergeRefs.js +1 -2
- package/icons/index.js +1 -3
- package/lib/_virtual/_rollupPluginBabelHelpers.js +5 -7
- package/lib/components/AILabel/index.js +35 -43
- package/lib/components/AISkeleton/AISkeletonIcon.js +5 -11
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -10
- package/lib/components/AISkeleton/AISkeletonText.js +8 -14
- package/lib/components/Accordion/Accordion.Skeleton.js +21 -27
- package/lib/components/Accordion/Accordion.js +11 -17
- package/lib/components/Accordion/AccordionItem.js +19 -25
- package/lib/components/Accordion/AccordionProvider.js +1 -7
- package/lib/components/AspectRatio/AspectRatio.js +7 -13
- package/lib/components/BadgeIndicator/index.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.js +9 -15
- package/lib/components/Breadcrumb/BreadcrumbItem.js +16 -22
- package/lib/components/Button/Button.Skeleton.js +9 -14
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.js +32 -37
- package/lib/components/Button/ButtonBase.js +8 -11
- package/lib/components/Button/index.js +3 -3
- package/lib/components/ButtonSet/ButtonSet.js +6 -12
- package/lib/components/ButtonSet/index.js +2 -2
- package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -11
- package/lib/components/ChatButton/ChatButton.js +12 -18
- package/lib/components/Checkbox/Checkbox.Skeleton.js +6 -12
- package/lib/components/Checkbox/Checkbox.js +33 -39
- package/lib/components/Checkbox/index.js +3 -3
- package/lib/components/CheckboxGroup/CheckboxGroup.js +24 -30
- package/lib/components/ClassPrefix/index.js +3 -10
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +10 -16
- package/lib/components/CodeSnippet/CodeSnippet.js +40 -46
- package/lib/components/ComboBox/ComboBox.d.ts +7 -0
- package/lib/components/ComboBox/ComboBox.js +65 -63
- package/lib/components/ComboBox/index.js +2 -2
- package/lib/components/ComboButton/index.js +20 -28
- package/lib/components/ComposedModal/ComposedModal.js +61 -57
- package/lib/components/ComposedModal/ModalFooter.js +37 -45
- package/lib/components/ComposedModal/ModalHeader.js +23 -31
- package/lib/components/ContainedList/ContainedList.d.ts +1 -1
- package/lib/components/ContainedList/ContainedList.js +19 -25
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +14 -20
- package/lib/components/ContainedList/ContainedListItem/index.js +2 -2
- package/lib/components/ContainedList/index.js +5 -5
- package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -19
- package/lib/components/ContextMenu/useContextMenu.js +1 -1
- package/lib/components/Copy/Copy.js +12 -18
- package/lib/components/Copy/index.js +2 -2
- package/lib/components/CopyButton/CopyButton.js +12 -18
- package/lib/components/CopyButton/index.js +2 -2
- package/lib/components/DangerButton/DangerButton.js +2 -6
- package/lib/components/DataTable/DataTable.js +48 -55
- package/lib/components/DataTable/Table.js +18 -24
- package/lib/components/DataTable/TableActionList.js +2 -2
- package/lib/components/DataTable/TableBatchAction.js +4 -9
- package/lib/components/DataTable/TableBatchActions.js +19 -25
- package/lib/components/DataTable/TableBody.js +5 -10
- package/lib/components/DataTable/TableCell.js +8 -14
- package/lib/components/DataTable/TableContainer.js +14 -20
- package/lib/components/DataTable/TableContext.js +0 -2
- package/lib/components/DataTable/TableDecoratorRow.js +5 -11
- package/lib/components/DataTable/TableExpandHeader.js +16 -22
- package/lib/components/DataTable/TableExpandRow.js +20 -26
- package/lib/components/DataTable/TableExpandedRow.js +8 -14
- package/lib/components/DataTable/TableHead.js +2 -2
- package/lib/components/DataTable/TableHeader.js +26 -32
- package/lib/components/DataTable/TableRow.js +8 -14
- package/lib/components/DataTable/TableSelectAll.js +13 -19
- package/lib/components/DataTable/TableSelectRow.js +15 -21
- package/lib/components/DataTable/TableSlugRow.js +7 -13
- package/lib/components/DataTable/TableToolbar.js +7 -13
- package/lib/components/DataTable/TableToolbarAction.js +5 -10
- package/lib/components/DataTable/TableToolbarContent.js +2 -2
- package/lib/components/DataTable/TableToolbarMenu.js +9 -15
- package/lib/components/DataTable/TableToolbarSearch.js +22 -28
- package/lib/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +2 -3
- package/lib/components/DataTable/state/sortStates.js +0 -2
- package/lib/components/DataTable/state/sorting.d.ts +15 -0
- package/lib/components/DataTable/state/sorting.js +0 -2
- package/lib/components/DataTable/tools/cells.js +0 -2
- package/lib/components/DataTable/tools/denormalize.d.ts +22 -0
- package/lib/components/DataTable/tools/denormalize.js +1 -2
- package/lib/components/DataTable/tools/filter.js +0 -2
- package/lib/components/DataTable/tools/normalize.d.ts +9 -0
- package/lib/components/DataTable/tools/normalize.js +1 -2
- package/lib/components/DataTable/tools/sorting.js +0 -2
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +25 -31
- package/lib/components/DatePicker/DatePicker.Skeleton.js +14 -20
- package/lib/components/DatePicker/DatePicker.js +65 -66
- package/lib/components/DatePicker/index.js +3 -3
- package/lib/components/DatePicker/plugins/appendToPlugin.js +0 -2
- package/lib/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/lib/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -6
- package/lib/components/DatePickerInput/DatePickerInput.js +49 -49
- package/lib/components/DatePickerInput/index.js +2 -2
- package/lib/components/Dialog/index.js +72 -80
- package/lib/components/Dropdown/Dropdown.Skeleton.js +10 -16
- package/lib/components/Dropdown/Dropdown.js +49 -55
- package/lib/components/Dropdown/index.js +3 -3
- package/lib/components/ErrorBoundary/ErrorBoundary.js +4 -9
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +6 -11
- package/lib/components/FeatureFlags/index.js +10 -17
- package/lib/components/FileUploader/FileUploader.Skeleton.js +7 -13
- package/lib/components/FileUploader/FileUploader.js +30 -36
- package/lib/components/FileUploader/FileUploaderButton.js +19 -25
- package/lib/components/FileUploader/FileUploaderDropContainer.js +18 -24
- package/lib/components/FileUploader/FileUploaderItem.js +23 -29
- package/lib/components/FileUploader/Filename.js +13 -18
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +7 -13
- package/lib/components/FluidComboBox/FluidComboBox.js +24 -30
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +14 -20
- package/lib/components/FluidDatePicker/FluidDatePicker.js +12 -18
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +4 -8
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +7 -13
- package/lib/components/FluidDropdown/FluidDropdown.js +24 -30
- package/lib/components/FluidForm/FluidForm.js +6 -12
- package/lib/components/FluidForm/FormContext.js +0 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +7 -13
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +36 -42
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +7 -13
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +3 -2
- package/lib/components/FluidNumberInput/FluidNumberInput.js +33 -38
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +7 -13
- package/lib/components/FluidSearch/FluidSearch.js +19 -25
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +7 -13
- package/lib/components/FluidSelect/FluidSelect.js +17 -23
- package/lib/components/FluidSelect/index.js +3 -3
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +7 -13
- package/lib/components/FluidTextArea/FluidTextArea.js +25 -31
- package/lib/components/FluidTextInput/FluidPasswordInput.js +18 -22
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +7 -13
- package/lib/components/FluidTextInput/FluidTextInput.js +23 -29
- package/lib/components/FluidTextInput/index.js +3 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +6 -12
- package/lib/components/FluidTimePicker/FluidTimePicker.js +23 -29
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +10 -15
- package/lib/components/Form/Form.js +5 -11
- package/lib/components/FormGroup/FormGroup.js +13 -19
- package/lib/components/FormItem/FormItem.js +5 -11
- package/lib/components/FormLabel/FormLabel.js +6 -12
- package/lib/components/Grid/CSSGrid.js +20 -28
- package/lib/components/Grid/Column.js +31 -37
- package/lib/components/Grid/ColumnHang.js +5 -13
- package/lib/components/Grid/FlexGrid.js +10 -18
- package/lib/components/Grid/Grid.js +9 -16
- package/lib/components/Grid/GridContext.js +7 -14
- package/lib/components/Grid/Row.js +8 -14
- package/lib/components/Heading/index.js +14 -21
- package/lib/components/Icon/Icon.Skeleton.js +4 -10
- package/lib/components/IconButton/index.d.ts +1 -1
- package/lib/components/IconButton/index.js +25 -33
- package/lib/components/IconIndicator/index.js +9 -15
- package/lib/components/IdPrefix/index.js +3 -10
- package/lib/components/InlineCheckbox/InlineCheckbox.js +17 -22
- package/lib/components/InlineCheckbox/index.js +2 -2
- package/lib/components/InlineLoading/InlineLoading.js +17 -23
- package/lib/components/InlineLoading/index.js +2 -2
- package/lib/components/Layer/LayerContext.js +1 -7
- package/lib/components/Layer/LayerLevel.js +0 -2
- package/lib/components/Layer/index.js +11 -19
- package/lib/components/Layout/index.js +22 -30
- package/lib/components/LayoutDirection/LayoutDirection.js +6 -13
- package/lib/components/LayoutDirection/LayoutDirectionContext.js +1 -7
- package/lib/components/LayoutDirection/useLayoutDirection.js +0 -2
- package/lib/components/Link/Link.js +15 -21
- package/lib/components/Link/index.js +2 -2
- package/lib/components/ListBox/ListBox.js +17 -23
- package/lib/components/ListBox/ListBoxField.js +7 -12
- package/lib/components/ListBox/ListBoxMenu.js +7 -12
- package/lib/components/ListBox/ListBoxMenuIcon.js +7 -13
- package/lib/components/ListBox/ListBoxMenuItem.js +9 -15
- package/lib/components/ListBox/ListBoxPropTypes.js +2 -8
- package/lib/components/ListBox/ListBoxSelection.js +14 -20
- package/lib/components/ListBox/index.js +7 -7
- package/lib/components/ListBox/next/ListBoxSelection.js +18 -24
- package/lib/components/ListBox/next/ListBoxTrigger.js +7 -13
- package/lib/components/ListItem/ListItem.js +5 -11
- package/lib/components/Loading/Loading.js +14 -20
- package/lib/components/Loading/index.js +2 -2
- package/lib/components/Menu/Menu.d.ts +3 -1
- package/lib/components/Menu/Menu.js +18 -24
- package/lib/components/Menu/MenuContext.js +0 -2
- package/lib/components/Menu/MenuItem.js +44 -52
- package/lib/components/MenuButton/index.js +16 -24
- package/lib/components/Modal/Modal.js +91 -86
- package/lib/components/Modal/index.js +2 -2
- package/lib/components/ModalWrapper/ModalWrapper.js +30 -35
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +7 -0
- package/lib/components/MultiSelect/FilterableMultiSelect.js +71 -71
- package/lib/components/MultiSelect/MultiSelect.js +61 -70
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +2 -8
- package/lib/components/MultiSelect/filter.js +0 -6
- package/lib/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/lib/components/MultiSelect/tools/itemToString.js +1 -7
- package/lib/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/lib/components/MultiSelect/tools/sorting.js +0 -2
- package/lib/components/Notification/Notification.js +118 -126
- package/lib/components/NumberInput/NumberFormatPropTypes.js +21 -27
- package/lib/components/NumberInput/NumberInput.Skeleton.js +8 -14
- package/lib/components/NumberInput/NumberInput.d.ts +3 -2
- package/lib/components/NumberInput/NumberInput.js +70 -77
- package/lib/components/OrderedList/OrderedList.js +8 -14
- package/lib/components/OverflowMenu/OverflowMenu.js +42 -49
- package/lib/components/OverflowMenu/index.js +3 -7
- package/lib/components/OverflowMenu/next/index.js +18 -26
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +27 -33
- package/lib/components/OverflowMenuItem/index.js +2 -2
- package/lib/components/OverflowMenuV2/index.d.ts +1 -0
- package/lib/components/OverflowMenuV2/index.js +2 -8
- package/lib/components/PageHeader/PageHeader.js +70 -78
- package/lib/components/PageHeader/index.js +0 -2
- package/lib/components/Pagination/Pagination.Skeleton.js +10 -16
- package/lib/components/Pagination/Pagination.js +44 -51
- package/lib/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/lib/components/Pagination/experimental/PageSelector.js +9 -15
- package/lib/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/lib/components/Pagination/experimental/Pagination.js +34 -40
- package/lib/components/Pagination/experimental/index.d.ts +3 -0
- package/lib/components/PaginationNav/PaginationNav.js +54 -60
- package/lib/components/Popover/index.js +60 -50
- package/lib/components/PrimaryButton/PrimaryButton.js +2 -6
- package/lib/components/ProgressBar/ProgressBar.js +25 -31
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +10 -16
- package/lib/components/ProgressIndicator/ProgressIndicator.js +41 -49
- package/lib/components/RadioButton/RadioButton.Skeleton.js +6 -12
- package/lib/components/RadioButton/RadioButton.js +26 -32
- package/lib/components/RadioButton/index.js +2 -2
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +37 -43
- package/lib/components/RadioTile/RadioTile.js +25 -31
- package/lib/components/RadioTile/index.js +2 -2
- package/lib/components/Search/Search.Skeleton.js +7 -13
- package/lib/components/Search/Search.js +33 -39
- package/lib/components/Search/index.js +3 -3
- package/lib/components/SecondaryButton/SecondaryButton.js +2 -6
- package/lib/components/Select/Select.Skeleton.js +8 -14
- package/lib/components/Select/Select.js +42 -48
- package/lib/components/Select/index.js +3 -3
- package/lib/components/SelectItem/SelectItem.js +8 -14
- package/lib/components/SelectItem/index.js +2 -2
- package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -13
- package/lib/components/ShapeIndicator/index.js +12 -18
- package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -10
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -10
- package/lib/components/SkeletonText/SkeletonText.js +11 -17
- package/lib/components/SkeletonText/index.js +2 -2
- package/lib/components/Slider/Slider.Skeleton.js +29 -35
- package/lib/components/Slider/Slider.js +84 -90
- package/lib/components/Slider/SliderHandles.js +18 -24
- package/lib/components/Slider/index.js +3 -3
- package/lib/components/Stack/HStack.js +1 -7
- package/lib/components/Stack/Stack.js +7 -15
- package/lib/components/Stack/VStack.js +1 -7
- package/lib/components/StructuredList/StructuredList.Skeleton.js +15 -21
- package/lib/components/StructuredList/StructuredList.js +60 -68
- package/lib/components/Switch/IconSwitch.d.ts +3 -0
- package/lib/components/Switch/IconSwitch.js +18 -25
- package/lib/components/Switch/Switch.js +14 -20
- package/lib/components/TabContent/TabContent.js +7 -33
- package/lib/components/Tabs/Tabs.Skeleton.js +10 -16
- package/lib/components/Tabs/Tabs.js +121 -129
- package/lib/components/Tabs/usePressable.js +0 -2
- package/lib/components/Tag/DismissibleTag.js +24 -30
- package/lib/components/Tag/OperationalTag.js +16 -22
- package/lib/components/Tag/SelectableTag.js +19 -25
- package/lib/components/Tag/Tag.Skeleton.js +5 -11
- package/lib/components/Tag/Tag.js +28 -34
- package/lib/components/Tag/isEllipsisActive.js +0 -2
- package/lib/components/Text/Text.js +6 -13
- package/lib/components/Text/TextDirection.js +4 -11
- package/lib/components/Text/TextDirectionContext.js +0 -2
- package/lib/components/Text/createTextComponent.js +1 -7
- package/lib/components/Text/index.js +0 -2
- package/lib/components/TextArea/TextArea.Skeleton.js +7 -13
- package/lib/components/TextArea/TextArea.js +49 -55
- package/lib/components/TextArea/index.js +3 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +36 -42
- package/lib/components/TextInput/PasswordInput.js +48 -54
- package/lib/components/TextInput/TextInput.Skeleton.js +7 -13
- package/lib/components/TextInput/TextInput.js +47 -53
- package/lib/components/TextInput/index.js +3 -3
- package/lib/components/TextInput/util.d.ts +9 -0
- package/lib/components/TextInput/util.js +0 -2
- package/lib/components/Theme/index.js +16 -24
- package/lib/components/Tile/Tile.js +92 -100
- package/lib/components/TileGroup/TileGroup.js +15 -22
- package/lib/components/TimePicker/TimePicker.js +39 -45
- package/lib/components/TimePickerSelect/TimePickerSelect.js +10 -16
- package/lib/components/Toggle/Toggle.Skeleton.js +7 -13
- package/lib/components/Toggle/Toggle.js +28 -34
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +12 -20
- package/lib/components/Toggletip/index.d.ts +1 -1
- package/lib/components/Toggletip/index.js +33 -41
- package/lib/components/Tooltip/DefinitionTooltip.js +14 -22
- package/lib/components/Tooltip/Tooltip.js +19 -27
- package/lib/components/TreeView/TreeContext.js +0 -2
- package/lib/components/TreeView/TreeNode.js +41 -47
- package/lib/components/TreeView/TreeView.js +17 -23
- package/lib/components/UIShell/Content.js +6 -12
- package/lib/components/UIShell/Header.js +4 -10
- package/lib/components/UIShell/HeaderContainer.js +4 -9
- package/lib/components/UIShell/HeaderGlobalAction.js +11 -17
- package/lib/components/UIShell/HeaderGlobalBar.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +17 -23
- package/lib/components/UIShell/HeaderMenuButton.js +9 -15
- package/lib/components/UIShell/HeaderMenuItem.js +11 -17
- package/lib/components/UIShell/HeaderName.js +8 -14
- package/lib/components/UIShell/HeaderNavigation.js +6 -12
- package/lib/components/UIShell/HeaderPanel.js +11 -17
- package/lib/components/UIShell/HeaderSideNavItems.js +6 -12
- package/lib/components/UIShell/Link.js +6 -11
- package/lib/components/UIShell/SideNav.js +23 -29
- package/lib/components/UIShell/SideNavDetails.js +7 -13
- package/lib/components/UIShell/SideNavDivider.js +5 -11
- package/lib/components/UIShell/SideNavFooter.js +12 -18
- package/lib/components/UIShell/SideNavHeader.js +8 -14
- package/lib/components/UIShell/SideNavIcon.js +6 -12
- package/lib/components/UIShell/SideNavItem.js +6 -12
- package/lib/components/UIShell/SideNavItems.js +9 -15
- package/lib/components/UIShell/SideNavLink.js +13 -19
- package/lib/components/UIShell/SideNavLinkText.js +5 -11
- package/lib/components/UIShell/SideNavMenu.js +20 -26
- package/lib/components/UIShell/SideNavMenuItem.js +13 -19
- package/lib/components/UIShell/SideNavSwitcher.js +13 -19
- package/lib/components/UIShell/SkipToContent.js +7 -13
- package/lib/components/UIShell/Switcher.js +9 -15
- package/lib/components/UIShell/SwitcherDivider.js +4 -10
- package/lib/components/UIShell/SwitcherItem.js +15 -21
- package/lib/components/UIShell/_utils.d.ts +7 -0
- package/lib/components/UIShell/_utils.js +0 -2
- package/lib/components/UnorderedList/UnorderedList.js +7 -13
- package/lib/feature-flags.d.ts +1 -0
- package/lib/feature-flags.js +3 -4
- package/lib/index.js +180 -182
- package/lib/internal/FloatingMenu.js +10 -18
- package/lib/internal/OptimizedResize.js +2 -8
- package/lib/internal/Selection.js +1 -7
- package/lib/internal/clamp.js +0 -2
- package/lib/internal/createClassWrapper.js +1 -7
- package/lib/internal/deprecateFieldOnObject.js +1 -3
- package/lib/internal/environment.js +0 -2
- package/lib/internal/getAnnouncement.js +0 -2
- package/lib/internal/keyboard/keys.js +0 -2
- package/lib/internal/keyboard/match.js +0 -2
- package/lib/internal/keyboard/navigation.js +0 -2
- package/lib/internal/noopFn.js +0 -2
- package/lib/internal/useAttachedMenu.js +0 -2
- package/lib/internal/useControllableState.js +0 -2
- package/lib/internal/useDelayedState.js +0 -2
- package/lib/internal/useEvent.d.ts +2 -2
- package/lib/internal/useEvent.js +4 -5
- package/lib/internal/useId.d.ts +21 -0
- package/lib/internal/useId.js +27 -7
- package/lib/internal/useIdPrefix.js +2 -8
- package/lib/internal/useIsomorphicEffect.js +1 -1
- package/lib/internal/useMatchMedia.js +0 -2
- package/lib/internal/useMergedRefs.js +0 -2
- package/lib/internal/useNoInteractiveChildren.js +0 -2
- package/lib/internal/useNormalizedInputProps.js +2 -8
- package/lib/internal/useOutsideClick.js +0 -2
- package/lib/internal/useOverflowItems.js +1 -7
- package/lib/internal/usePrefix.js +2 -8
- package/lib/internal/usePreviousValue.js +0 -2
- package/lib/internal/useResizeObserver.js +0 -2
- package/lib/internal/useSavedCallback.js +0 -2
- package/lib/internal/utils.js +0 -2
- package/lib/internal/warning.js +0 -2
- package/lib/internal/wrapFocus.js +0 -2
- package/lib/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -2
- package/lib/prop-types/AriaPropTypes.js +2 -8
- package/lib/prop-types/deprecate.js +0 -2
- package/lib/prop-types/deprecateComponent.d.ts +1 -0
- package/lib/prop-types/deprecateComponent.js +2 -5
- package/lib/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/lib/prop-types/deprecateValuesWithin.js +1 -1
- package/lib/prop-types/isRequiredOneOf.js +0 -2
- package/lib/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -1
- package/lib/tools/events.js +0 -2
- package/lib/tools/mapPopoverAlign.js +0 -2
- package/lib/tools/mergeRefs.d.ts +12 -0
- package/lib/tools/mergeRefs.js +1 -2
- package/lib/tools/setupGetInstanceId.js +0 -2
- package/lib/tools/toggleClass.js +0 -2
- package/lib/tools/wrapComponent.js +4 -10
- package/package.json +12 -12
- package/telemetry.yml +1 -0
- /package/es/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -0
|
@@ -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 SelectSkeleton = ({
|
|
25
19
|
hideLabel,
|
|
26
20
|
className,
|
|
27
21
|
...rest
|
|
28
22
|
}) => {
|
|
29
23
|
const prefix = usePrefix.usePrefix();
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
-
className:
|
|
32
|
-
}, rest), !hideLabel && /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
25
|
+
className: cx(`${prefix}--form-item`, className)
|
|
26
|
+
}, rest), !hideLabel && /*#__PURE__*/React.createElement("span", {
|
|
33
27
|
className: `${prefix}--label ${prefix}--skeleton`
|
|
34
|
-
}), /*#__PURE__*/
|
|
28
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
35
29
|
className: `${prefix}--select ${prefix}--skeleton`
|
|
36
|
-
}, /*#__PURE__*/
|
|
30
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
37
31
|
className: `${prefix}--select-input`
|
|
38
32
|
})));
|
|
39
33
|
};
|
|
@@ -41,12 +35,12 @@ SelectSkeleton.propTypes = {
|
|
|
41
35
|
/**
|
|
42
36
|
* Specify an optional className to add to the form item wrapper.
|
|
43
37
|
*/
|
|
44
|
-
className:
|
|
38
|
+
className: PropTypes.string,
|
|
45
39
|
/**
|
|
46
40
|
* Specify whether the label should be hidden, or not
|
|
47
41
|
*/
|
|
48
|
-
hideLabel:
|
|
42
|
+
hideLabel: PropTypes.bool
|
|
49
43
|
};
|
|
50
44
|
|
|
51
45
|
exports.SelectSkeleton = SelectSkeleton;
|
|
52
|
-
exports
|
|
46
|
+
exports.default = SelectSkeleton;
|
|
@@ -25,13 +25,7 @@ var index = require('../AILabel/index.js');
|
|
|
25
25
|
var utils = require('../../internal/utils.js');
|
|
26
26
|
var Text = require('../Text/Text.js');
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
31
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
32
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
33
|
-
|
|
34
|
-
const Select = /*#__PURE__*/React__default["default"].forwardRef(function Select({
|
|
28
|
+
const Select = /*#__PURE__*/React.forwardRef(function Select({
|
|
35
29
|
className,
|
|
36
30
|
decorator,
|
|
37
31
|
id,
|
|
@@ -62,7 +56,7 @@ const Select = /*#__PURE__*/React__default["default"].forwardRef(function Select
|
|
|
62
56
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
63
57
|
const selectInstanceId = useId.useId();
|
|
64
58
|
// Convert children to an array of valid elements once using type narrowing
|
|
65
|
-
const validChildren =
|
|
59
|
+
const validChildren = React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));
|
|
66
60
|
|
|
67
61
|
// Find the default option based on the specified defaultValue
|
|
68
62
|
const defaultOption = validChildren.find(child => child.props?.value === other?.defaultValue);
|
|
@@ -70,7 +64,7 @@ const Select = /*#__PURE__*/React__default["default"].forwardRef(function Select
|
|
|
70
64
|
// Use the default option's text if available; otherwise, fallback to the first option's text
|
|
71
65
|
const initialTitle = defaultOption?.props?.text || validChildren[0]?.props?.text || '';
|
|
72
66
|
const [title, setTitle] = React.useState(initialTitle);
|
|
73
|
-
const selectClasses =
|
|
67
|
+
const selectClasses = cx({
|
|
74
68
|
[`${prefix}--select`]: true,
|
|
75
69
|
[`${prefix}--select--inline`]: inline,
|
|
76
70
|
[`${prefix}--select--light`]: light,
|
|
@@ -83,11 +77,11 @@ const Select = /*#__PURE__*/React__default["default"].forwardRef(function Select
|
|
|
83
77
|
[`${prefix}--select--slug`]: slug,
|
|
84
78
|
[`${prefix}--select--decorator`]: decorator
|
|
85
79
|
});
|
|
86
|
-
const labelClasses =
|
|
80
|
+
const labelClasses = cx(`${prefix}--label`, {
|
|
87
81
|
[`${prefix}--visually-hidden`]: hideLabel,
|
|
88
82
|
[`${prefix}--label--disabled`]: disabled
|
|
89
83
|
});
|
|
90
|
-
const inputClasses =
|
|
84
|
+
const inputClasses = cx({
|
|
91
85
|
[`${prefix}--select-input`]: true,
|
|
92
86
|
[`${prefix}--select-input--${size}`]: size
|
|
93
87
|
});
|
|
@@ -100,16 +94,16 @@ const Select = /*#__PURE__*/React__default["default"].forwardRef(function Select
|
|
|
100
94
|
return warnText;
|
|
101
95
|
}
|
|
102
96
|
})();
|
|
103
|
-
const error = invalid || warn ? /*#__PURE__*/
|
|
97
|
+
const error = invalid || warn ? /*#__PURE__*/React.createElement(Text.Text, {
|
|
104
98
|
as: "div",
|
|
105
99
|
className: `${prefix}--form-requirement`,
|
|
106
100
|
id: errorId
|
|
107
101
|
}, errorText) : null;
|
|
108
|
-
const helperTextClasses =
|
|
102
|
+
const helperTextClasses = cx(`${prefix}--form__helper-text`, {
|
|
109
103
|
[`${prefix}--form__helper-text--disabled`]: disabled
|
|
110
104
|
});
|
|
111
105
|
const helperId = !helperText ? undefined : `select-helper-text-${selectInstanceId}`;
|
|
112
|
-
const helper = helperText ? /*#__PURE__*/
|
|
106
|
+
const helper = helperText ? /*#__PURE__*/React.createElement(Text.Text, {
|
|
113
107
|
as: "div",
|
|
114
108
|
id: helperId,
|
|
115
109
|
className: helperTextClasses
|
|
@@ -152,7 +146,7 @@ const Select = /*#__PURE__*/React__default["default"].forwardRef(function Select
|
|
|
152
146
|
size: 'mini'
|
|
153
147
|
}) : null;
|
|
154
148
|
const input = (() => {
|
|
155
|
-
return /*#__PURE__*/
|
|
149
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("select", _rollupPluginBabelHelpers.extends({}, other, ariaProps, {
|
|
156
150
|
id: id,
|
|
157
151
|
className: inputClasses,
|
|
158
152
|
disabled: disabled || undefined,
|
|
@@ -162,35 +156,35 @@ const Select = /*#__PURE__*/React__default["default"].forwardRef(function Select
|
|
|
162
156
|
onChange: events.composeEventHandlers([onChange, handleChange])
|
|
163
157
|
}, readOnlyEventHandlers, {
|
|
164
158
|
ref: ref
|
|
165
|
-
}), children), /*#__PURE__*/
|
|
159
|
+
}), children), /*#__PURE__*/React.createElement(iconsReact.ChevronDown, {
|
|
166
160
|
className: `${prefix}--select__arrow`
|
|
167
|
-
}), invalid && /*#__PURE__*/
|
|
161
|
+
}), invalid && /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
|
|
168
162
|
className: `${prefix}--select__invalid-icon`
|
|
169
|
-
}), !invalid && warn && /*#__PURE__*/
|
|
163
|
+
}), !invalid && warn && /*#__PURE__*/React.createElement(iconsReact.WarningAltFilled, {
|
|
170
164
|
className: `${prefix}--select__invalid-icon ${prefix}--select__invalid-icon--warning`
|
|
171
165
|
}));
|
|
172
166
|
})();
|
|
173
|
-
return /*#__PURE__*/
|
|
174
|
-
className:
|
|
175
|
-
}, /*#__PURE__*/
|
|
167
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
168
|
+
className: cx(`${prefix}--form-item`, className)
|
|
169
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
176
170
|
className: selectClasses
|
|
177
|
-
}, !noLabel && /*#__PURE__*/
|
|
171
|
+
}, !noLabel && /*#__PURE__*/React.createElement(Text.Text, {
|
|
178
172
|
as: "label",
|
|
179
173
|
htmlFor: id,
|
|
180
174
|
className: labelClasses
|
|
181
|
-
}, labelText), inline && /*#__PURE__*/
|
|
175
|
+
}, labelText), inline && /*#__PURE__*/React.createElement("div", {
|
|
182
176
|
className: `${prefix}--select-input--inline__wrapper`
|
|
183
|
-
}, /*#__PURE__*/
|
|
177
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
184
178
|
className: `${prefix}--select-input__wrapper`,
|
|
185
179
|
"data-invalid": invalid || null
|
|
186
|
-
}, input), error), !inline && /*#__PURE__*/
|
|
180
|
+
}, input), error), !inline && /*#__PURE__*/React.createElement("div", {
|
|
187
181
|
className: `${prefix}--select-input__wrapper`,
|
|
188
182
|
"data-invalid": invalid || null,
|
|
189
183
|
onFocus: handleFocus,
|
|
190
184
|
onBlur: handleFocus
|
|
191
|
-
}, input, slug ? normalizedDecorator : decorator ? /*#__PURE__*/
|
|
185
|
+
}, input, slug ? normalizedDecorator : decorator ? /*#__PURE__*/React.createElement("div", {
|
|
192
186
|
className: `${prefix}--select__inner-wrapper--decorator`
|
|
193
|
-
}, normalizedDecorator) : '', isFluid && /*#__PURE__*/
|
|
187
|
+
}, normalizedDecorator) : '', isFluid && /*#__PURE__*/React.createElement("hr", {
|
|
194
188
|
className: `${prefix}--select__divider`
|
|
195
189
|
}), isFluid && error ? error : null), !inline && !isFluid && error ? error : helper));
|
|
196
190
|
});
|
|
@@ -199,84 +193,84 @@ Select.propTypes = {
|
|
|
199
193
|
/**
|
|
200
194
|
* Provide the contents of your Select
|
|
201
195
|
*/
|
|
202
|
-
children:
|
|
196
|
+
children: PropTypes.node,
|
|
203
197
|
/**
|
|
204
198
|
* Specify an optional className to be applied to the node containing the label and the select box
|
|
205
199
|
*/
|
|
206
|
-
className:
|
|
200
|
+
className: PropTypes.string,
|
|
207
201
|
/**
|
|
208
202
|
* **Experimental**: Provide a decorator component to be rendered inside the `Select` component
|
|
209
203
|
*/
|
|
210
|
-
decorator:
|
|
204
|
+
decorator: PropTypes.node,
|
|
211
205
|
/**
|
|
212
206
|
* Optionally provide the default value of the `<select>`
|
|
213
207
|
*/
|
|
214
|
-
defaultValue:
|
|
208
|
+
defaultValue: PropTypes.any,
|
|
215
209
|
/**
|
|
216
210
|
* Specify whether the control is disabled
|
|
217
211
|
*/
|
|
218
|
-
disabled:
|
|
212
|
+
disabled: PropTypes.bool,
|
|
219
213
|
/**
|
|
220
214
|
* Provide text that is used alongside the control label for additional help
|
|
221
215
|
*/
|
|
222
|
-
helperText:
|
|
216
|
+
helperText: PropTypes.node,
|
|
223
217
|
/**
|
|
224
218
|
* Specify whether the label should be hidden, or not
|
|
225
219
|
*/
|
|
226
|
-
hideLabel:
|
|
220
|
+
hideLabel: PropTypes.bool,
|
|
227
221
|
/**
|
|
228
222
|
* Specify a custom `id` for the `<select>`
|
|
229
223
|
*/
|
|
230
|
-
id:
|
|
224
|
+
id: PropTypes.string.isRequired,
|
|
231
225
|
/**
|
|
232
226
|
* Specify whether you want the inline version of this control
|
|
233
227
|
*/
|
|
234
|
-
inline:
|
|
228
|
+
inline: PropTypes.bool,
|
|
235
229
|
/**
|
|
236
230
|
* Specify if the currently value is invalid.
|
|
237
231
|
*/
|
|
238
|
-
invalid:
|
|
232
|
+
invalid: PropTypes.bool,
|
|
239
233
|
/**
|
|
240
234
|
* Message which is displayed if the value is invalid.
|
|
241
235
|
*/
|
|
242
|
-
invalidText:
|
|
236
|
+
invalidText: PropTypes.node,
|
|
243
237
|
/**
|
|
244
238
|
* Provide label text to be read by screen readers when interacting with the
|
|
245
239
|
* control
|
|
246
240
|
*/
|
|
247
|
-
labelText:
|
|
241
|
+
labelText: PropTypes.node,
|
|
248
242
|
/**
|
|
249
243
|
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
250
244
|
* Don't use this to make tile background color same as container background color.
|
|
251
245
|
*/
|
|
252
|
-
light: deprecate.deprecate(
|
|
246
|
+
light: deprecate.deprecate(PropTypes.bool, 'The `light` prop for `Select` is no longer needed and has ' + 'been deprecated in v11 in favor of the new `Layer` component. It will be moved in the next major release.'),
|
|
253
247
|
/**
|
|
254
248
|
* Reserved for use with Pagination component. Will not render a label for the
|
|
255
249
|
* select since Pagination renders one for us.
|
|
256
250
|
*/
|
|
257
|
-
noLabel:
|
|
251
|
+
noLabel: PropTypes.bool,
|
|
258
252
|
/**
|
|
259
253
|
* Provide an optional `onChange` hook that is called each time the value of
|
|
260
254
|
* the underlying `<input>` changes
|
|
261
255
|
*/
|
|
262
|
-
onChange:
|
|
256
|
+
onChange: PropTypes.func,
|
|
263
257
|
/**
|
|
264
258
|
* Whether the select should be read-only
|
|
265
259
|
*/
|
|
266
|
-
readOnly:
|
|
260
|
+
readOnly: PropTypes.bool,
|
|
267
261
|
/**
|
|
268
262
|
* Specify the size of the Select Input.
|
|
269
263
|
*/
|
|
270
|
-
size:
|
|
271
|
-
slug: deprecate.deprecate(
|
|
264
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
265
|
+
slug: deprecate.deprecate(PropTypes.node, 'The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.'),
|
|
272
266
|
/**
|
|
273
267
|
* Specify whether the control is currently in warning state
|
|
274
268
|
*/
|
|
275
|
-
warn:
|
|
269
|
+
warn: PropTypes.bool,
|
|
276
270
|
/**
|
|
277
271
|
* Provide the text that is displayed when the control is in warning state
|
|
278
272
|
*/
|
|
279
|
-
warnText:
|
|
273
|
+
warnText: PropTypes.node
|
|
280
274
|
};
|
|
281
275
|
|
|
282
|
-
exports
|
|
276
|
+
exports.default = Select;
|
|
@@ -14,6 +14,6 @@ var Select_Skeleton = require('./Select.Skeleton.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.Select = Select
|
|
18
|
-
exports
|
|
19
|
-
exports.SelectSkeleton = Select_Skeleton
|
|
17
|
+
exports.Select = Select.default;
|
|
18
|
+
exports.default = Select.default;
|
|
19
|
+
exports.SelectSkeleton = Select_Skeleton.default;
|
|
@@ -15,12 +15,6 @@ 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 SelectItem = ({
|
|
25
19
|
className,
|
|
26
20
|
value = '',
|
|
@@ -30,13 +24,13 @@ const SelectItem = ({
|
|
|
30
24
|
...other
|
|
31
25
|
}) => {
|
|
32
26
|
const prefix = usePrefix.usePrefix();
|
|
33
|
-
const selectItemClasses =
|
|
27
|
+
const selectItemClasses = cx({
|
|
34
28
|
[`${prefix}--select-option`]: true,
|
|
35
29
|
...(className && {
|
|
36
30
|
[className]: className
|
|
37
31
|
})
|
|
38
32
|
});
|
|
39
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React.createElement("option", _rollupPluginBabelHelpers.extends({}, other, {
|
|
40
34
|
className: selectItemClasses,
|
|
41
35
|
value: value,
|
|
42
36
|
disabled: disabled,
|
|
@@ -47,23 +41,23 @@ SelectItem.propTypes = {
|
|
|
47
41
|
/**
|
|
48
42
|
* Specify an optional className to be applied to the node
|
|
49
43
|
*/
|
|
50
|
-
className:
|
|
44
|
+
className: PropTypes.string,
|
|
51
45
|
/**
|
|
52
46
|
* Specify whether the <SelectItem> should be disabled
|
|
53
47
|
*/
|
|
54
|
-
disabled:
|
|
48
|
+
disabled: PropTypes.bool,
|
|
55
49
|
/**
|
|
56
50
|
* Specify whether the <SelectItem> is hidden
|
|
57
51
|
*/
|
|
58
|
-
hidden:
|
|
52
|
+
hidden: PropTypes.bool,
|
|
59
53
|
/**
|
|
60
54
|
* Provide the contents of your <SelectItem>
|
|
61
55
|
*/
|
|
62
|
-
text:
|
|
56
|
+
text: PropTypes.string.isRequired,
|
|
63
57
|
/**
|
|
64
58
|
* Specify the value of the <SelectItem>
|
|
65
59
|
*/
|
|
66
|
-
value:
|
|
60
|
+
value: PropTypes.any.isRequired
|
|
67
61
|
};
|
|
68
62
|
|
|
69
|
-
exports
|
|
63
|
+
exports.default = SelectItem;
|
|
@@ -15,12 +15,6 @@ 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 SelectItemGroup = ({
|
|
25
19
|
children,
|
|
26
20
|
className,
|
|
@@ -29,8 +23,8 @@ const SelectItemGroup = ({
|
|
|
29
23
|
...other
|
|
30
24
|
}) => {
|
|
31
25
|
const prefix = usePrefix.usePrefix();
|
|
32
|
-
const classNames =
|
|
33
|
-
return /*#__PURE__*/
|
|
26
|
+
const classNames = cx(`${prefix}--select-optgroup`, className);
|
|
27
|
+
return /*#__PURE__*/React.createElement("optgroup", _rollupPluginBabelHelpers.extends({
|
|
34
28
|
className: classNames,
|
|
35
29
|
label: label,
|
|
36
30
|
disabled: disabled
|
|
@@ -40,19 +34,19 @@ SelectItemGroup.propTypes = {
|
|
|
40
34
|
/**
|
|
41
35
|
* Provide the contents of your <SelectItemGroup>
|
|
42
36
|
*/
|
|
43
|
-
children:
|
|
37
|
+
children: PropTypes.node,
|
|
44
38
|
/**
|
|
45
39
|
* Specify an optional className to be applied to the node
|
|
46
40
|
*/
|
|
47
|
-
className:
|
|
41
|
+
className: PropTypes.string,
|
|
48
42
|
/**
|
|
49
43
|
* Specify whether the <SelectItemGroup> should be disabled
|
|
50
44
|
*/
|
|
51
|
-
disabled:
|
|
45
|
+
disabled: PropTypes.bool,
|
|
52
46
|
/**
|
|
53
47
|
* Specify the label to be displayed
|
|
54
48
|
*/
|
|
55
|
-
label:
|
|
49
|
+
label: PropTypes.string.isRequired
|
|
56
50
|
};
|
|
57
51
|
|
|
58
|
-
exports
|
|
52
|
+
exports.default = SelectItemGroup;
|
|
@@ -16,30 +16,24 @@ var cx = require('classnames');
|
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
var iconsReact = require('@carbon/icons-react');
|
|
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
|
var _path;
|
|
26
20
|
const ShapeIndicatorKinds = ['failed', 'critical', 'high', 'medium', 'low', 'cautious', 'undefined', 'stable', 'informative', 'incomplete', 'draft'];
|
|
27
21
|
|
|
28
22
|
// TODO: update to import '@carbon/icons-react'
|
|
29
|
-
const incompleteIcon = props => /*#__PURE__*/
|
|
23
|
+
const incompleteIcon = props => /*#__PURE__*/React.createElement("svg", _rollupPluginBabelHelpers.extends({
|
|
30
24
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31
25
|
width: 16,
|
|
32
26
|
height: 16,
|
|
33
27
|
fill: "none",
|
|
34
28
|
"aria-hidden": "true"
|
|
35
|
-
}, props), /*#__PURE__*/
|
|
29
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
36
30
|
fill: "#fff",
|
|
37
31
|
fillOpacity: 0.01,
|
|
38
32
|
d: "M0 0h16v16H0z",
|
|
39
33
|
style: {
|
|
40
34
|
mixBlendMode: 'multiply'
|
|
41
35
|
}
|
|
42
|
-
}), _path || (_path = /*#__PURE__*/
|
|
36
|
+
}), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
43
37
|
fill: "#161616",
|
|
44
38
|
d: "M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2Zm0 2a4.004 4.004 0 0 1 4 4H4a4.004 4.004 0 0 1 4-4Z"
|
|
45
39
|
})));
|
|
@@ -56,7 +50,7 @@ const shapeTypes = {
|
|
|
56
50
|
incomplete: incompleteIcon,
|
|
57
51
|
draft: iconsReact.CircleStroke
|
|
58
52
|
};
|
|
59
|
-
const ShapeIndicator = /*#__PURE__*/
|
|
53
|
+
const ShapeIndicator = /*#__PURE__*/React.forwardRef(function ShapeIndicatorContent({
|
|
60
54
|
className: customClassName,
|
|
61
55
|
kind,
|
|
62
56
|
label,
|
|
@@ -64,17 +58,17 @@ const ShapeIndicator = /*#__PURE__*/React__default["default"].forwardRef(functio
|
|
|
64
58
|
...rest
|
|
65
59
|
}, ref) {
|
|
66
60
|
const prefix = usePrefix.usePrefix();
|
|
67
|
-
const classNames =
|
|
61
|
+
const classNames = cx(`${prefix}--shape-indicator`, customClassName, {
|
|
68
62
|
[`${prefix}--shape-indicator--14`]: textSize == 14
|
|
69
63
|
});
|
|
70
64
|
const ShapeForKind = shapeTypes[kind];
|
|
71
65
|
if (!ShapeForKind) {
|
|
72
66
|
return null;
|
|
73
67
|
}
|
|
74
|
-
return /*#__PURE__*/
|
|
68
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
75
69
|
className: classNames,
|
|
76
70
|
ref: ref
|
|
77
|
-
}, /*#__PURE__*/
|
|
71
|
+
}, /*#__PURE__*/React.createElement(ShapeForKind, {
|
|
78
72
|
size: 16,
|
|
79
73
|
className: `${prefix}--shape-indicator--${kind}`
|
|
80
74
|
}), label);
|
|
@@ -83,21 +77,21 @@ ShapeIndicator.propTypes = {
|
|
|
83
77
|
/**
|
|
84
78
|
* Specify an optional className to add.
|
|
85
79
|
*/
|
|
86
|
-
className:
|
|
80
|
+
className: PropTypes.string,
|
|
87
81
|
/**
|
|
88
82
|
* Specify the kind of the Shape Indicator
|
|
89
83
|
*/
|
|
90
|
-
kind:
|
|
84
|
+
kind: PropTypes.oneOf(ShapeIndicatorKinds).isRequired,
|
|
91
85
|
/**
|
|
92
86
|
* Label next to the shape.
|
|
93
87
|
*/
|
|
94
|
-
label:
|
|
88
|
+
label: PropTypes.string.isRequired,
|
|
95
89
|
/**
|
|
96
90
|
* Specify the text size of the Shape Indicator. Defaults to 12.
|
|
97
91
|
*/
|
|
98
|
-
textSize:
|
|
92
|
+
textSize: PropTypes.oneOf([12, 14])
|
|
99
93
|
};
|
|
100
94
|
|
|
101
95
|
exports.ShapeIndicator = ShapeIndicator;
|
|
102
96
|
exports.ShapeIndicatorKinds = ShapeIndicatorKinds;
|
|
103
|
-
exports
|
|
97
|
+
exports.default = ShapeIndicator;
|
|
@@ -15,21 +15,15 @@ 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 SkeletonIcon = ({
|
|
25
19
|
className,
|
|
26
20
|
...other
|
|
27
21
|
}) => {
|
|
28
22
|
const prefix = usePrefix.usePrefix();
|
|
29
|
-
const skeletonIconClasses =
|
|
23
|
+
const skeletonIconClasses = cx(className, {
|
|
30
24
|
[`${prefix}--icon--skeleton`]: true
|
|
31
25
|
});
|
|
32
|
-
return /*#__PURE__*/
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
33
27
|
className: skeletonIconClasses
|
|
34
28
|
}, other));
|
|
35
29
|
};
|
|
@@ -37,7 +31,7 @@ SkeletonIcon.propTypes = {
|
|
|
37
31
|
/**
|
|
38
32
|
* Specify an optional className to add.
|
|
39
33
|
*/
|
|
40
|
-
className:
|
|
34
|
+
className: PropTypes.string
|
|
41
35
|
};
|
|
42
36
|
|
|
43
|
-
exports
|
|
37
|
+
exports.default = SkeletonIcon;
|
|
@@ -15,21 +15,15 @@ var PropTypes = require('prop-types');
|
|
|
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 React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
22
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
|
|
24
18
|
const SkeletonPlaceholder = ({
|
|
25
19
|
className,
|
|
26
20
|
...other
|
|
27
21
|
}) => {
|
|
28
22
|
const prefix = usePrefix.usePrefix();
|
|
29
|
-
const skeletonPlaceholderClasses =
|
|
23
|
+
const skeletonPlaceholderClasses = cx({
|
|
30
24
|
[`${prefix}--skeleton__placeholder`]: true
|
|
31
25
|
}, className);
|
|
32
|
-
return /*#__PURE__*/
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
33
27
|
className: skeletonPlaceholderClasses
|
|
34
28
|
}, other));
|
|
35
29
|
};
|
|
@@ -38,7 +32,7 @@ SkeletonPlaceholder.propTypes = {
|
|
|
38
32
|
* Add a custom class to the component
|
|
39
33
|
* to set the height and width
|
|
40
34
|
*/
|
|
41
|
-
className:
|
|
35
|
+
className: PropTypes.string
|
|
42
36
|
};
|
|
43
37
|
|
|
44
|
-
exports
|
|
38
|
+
exports.default = SkeletonPlaceholder;
|
|
@@ -16,12 +16,6 @@ var cx = require('classnames');
|
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
var useIsomorphicEffect = require('../../internal/useIsomorphicEffect.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 randoms = [0.973051493507435, 0.15334737213558558, 0.5671034553053769];
|
|
26
20
|
function getRandomInt(min, max, n) {
|
|
27
21
|
return Math.floor(randoms[n % 3] * (max - min + 1)) + min;
|
|
@@ -35,7 +29,7 @@ const SkeletonText = ({
|
|
|
35
29
|
...rest
|
|
36
30
|
}) => {
|
|
37
31
|
const prefix = usePrefix.usePrefix();
|
|
38
|
-
const skeletonTextClasses =
|
|
32
|
+
const skeletonTextClasses = cx({
|
|
39
33
|
[`${prefix}--skeleton__text`]: true,
|
|
40
34
|
[`${prefix}--skeleton__heading`]: heading,
|
|
41
35
|
[className]: className
|
|
@@ -48,7 +42,7 @@ const SkeletonText = ({
|
|
|
48
42
|
lineCountNumber = lineCount;
|
|
49
43
|
}
|
|
50
44
|
const refs = React.useRef([]);
|
|
51
|
-
useIsomorphicEffect
|
|
45
|
+
useIsomorphicEffect.default(() => {
|
|
52
46
|
refs.current.map((item, j) => {
|
|
53
47
|
const randomPercentWidth = getRandomInt(0, 75, j) + 'px';
|
|
54
48
|
const randomPxWidth = getRandomInt(Math.max(widthNum - 75, 0), widthNum, j) + 'px';
|
|
@@ -65,7 +59,7 @@ const SkeletonText = ({
|
|
|
65
59
|
}, [lineCountNumber, paragraph, refs, width, widthNum, widthPercent, widthPx]);
|
|
66
60
|
const lines = [];
|
|
67
61
|
for (let i = 0; i < lineCountNumber; i++) {
|
|
68
|
-
lines.push(/*#__PURE__*/
|
|
62
|
+
lines.push(/*#__PURE__*/React.createElement("p", _rollupPluginBabelHelpers.extends({
|
|
69
63
|
className: skeletonTextClasses,
|
|
70
64
|
key: i,
|
|
71
65
|
ref: el => {
|
|
@@ -74,33 +68,33 @@ const SkeletonText = ({
|
|
|
74
68
|
}, rest)));
|
|
75
69
|
}
|
|
76
70
|
if (lineCountNumber !== 1) {
|
|
77
|
-
return /*#__PURE__*/
|
|
71
|
+
return /*#__PURE__*/React.createElement("div", null, lines);
|
|
78
72
|
}
|
|
79
73
|
|
|
80
74
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
81
|
-
return /*#__PURE__*/
|
|
75
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, lines);
|
|
82
76
|
};
|
|
83
77
|
SkeletonText.propTypes = {
|
|
84
78
|
/**
|
|
85
79
|
* Specify an optional className to be applied to the container node
|
|
86
80
|
*/
|
|
87
|
-
className:
|
|
81
|
+
className: PropTypes.string,
|
|
88
82
|
/**
|
|
89
83
|
* generates skeleton text at a larger size
|
|
90
84
|
*/
|
|
91
|
-
heading:
|
|
85
|
+
heading: PropTypes.bool,
|
|
92
86
|
/**
|
|
93
87
|
* the number of lines shown if paragraph is true
|
|
94
88
|
*/
|
|
95
|
-
lineCount:
|
|
89
|
+
lineCount: PropTypes.number,
|
|
96
90
|
/**
|
|
97
91
|
* will generate multiple lines of text
|
|
98
92
|
*/
|
|
99
|
-
paragraph:
|
|
93
|
+
paragraph: PropTypes.bool,
|
|
100
94
|
/**
|
|
101
95
|
* width (in px or %) of single line of text or max-width of paragraph lines
|
|
102
96
|
*/
|
|
103
|
-
width:
|
|
97
|
+
width: PropTypes.string
|
|
104
98
|
};
|
|
105
99
|
|
|
106
|
-
exports
|
|
100
|
+
exports.default = SkeletonText;
|