@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a unique ID for React <=17 with an optional prefix prepended to it.
|
|
3
|
+
* This is an internal utility, not intended for public usage.
|
|
4
|
+
* @param {string} [prefix]
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export function useCompatibleId(prefix?: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Generate a unique id if a given `id` is not provided
|
|
10
|
+
* This is an internal utility, not intended for public usage.
|
|
11
|
+
* @param {string|undefined} id
|
|
12
|
+
* @returns {string}
|
|
13
|
+
*/
|
|
14
|
+
export function useFallbackId(id: string | undefined): string;
|
|
15
|
+
/**
|
|
16
|
+
* Generate a unique ID for React >=18 with an optional prefix prepended to it.
|
|
17
|
+
* This is an internal utility, not intended for public usage.
|
|
18
|
+
* @param {string} [prefix]
|
|
19
|
+
* @returns {string}
|
|
20
|
+
*/
|
|
21
|
+
export function useId(prefix?: string): string;
|
package/es/internal/useId.js
CHANGED
|
@@ -5,12 +5,38 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import React, { useState,
|
|
8
|
+
import React, { useState, useLayoutEffect, useEffect } from 'react';
|
|
9
9
|
import { setupGetInstanceId } from '../tools/setupGetInstanceId.js';
|
|
10
10
|
import { canUseDOM } from './environment.js';
|
|
11
11
|
import { useIdPrefix } from './useIdPrefix.js';
|
|
12
12
|
|
|
13
13
|
// This file was heavily inspired by:
|
|
14
|
+
//
|
|
15
|
+
// 1. Reach UI and their work on their auto-id package:
|
|
16
|
+
// https://github.com/reach/reach-ui/blob/86a046f54d53b6420e392b3fa56dd991d9d4e458/packages/auto-id/src/index.ts
|
|
17
|
+
//
|
|
18
|
+
// 2. Floating UI and their work on react >=18 compatibility
|
|
19
|
+
// https://github.com/floating-ui/floating-ui/blob/%40floating-ui/utils%400.2.5/packages/react/src/hooks/useId.ts
|
|
20
|
+
//
|
|
21
|
+
// The problem that this solves is an id mismatch when auto-generating
|
|
22
|
+
// ids on both the server and the client. When using server-side rendering,
|
|
23
|
+
// there can be the chance of a mismatch between what the server renders and
|
|
24
|
+
// what the client renders when the id value is auto-generated.
|
|
25
|
+
//
|
|
26
|
+
// To get around this, we set the initial value of the `id` to `null` and then
|
|
27
|
+
// conditionally use `useLayoutEffect` on the client and `useEffect` on the
|
|
28
|
+
// server. On the client, `useLayoutEffect` will patch up the id to the correct
|
|
29
|
+
// value. On the server, `useEffect` will not run.
|
|
30
|
+
//
|
|
31
|
+
// This ensures that we won't encounter a mismatch in ids between server and
|
|
32
|
+
// client, at the cost of runtime patching of the id value in
|
|
33
|
+
// `useLayoutEffect`
|
|
34
|
+
//
|
|
35
|
+
// React 18 introduced a new hook called `useId` that takes care of hydration
|
|
36
|
+
// mismatches. If the user is running React 18 or higher, the native hook is
|
|
37
|
+
// used via the `useReactId` function. If the user is running React 17 or
|
|
38
|
+
// lower, `useCompatibleId` is used.
|
|
39
|
+
|
|
14
40
|
|
|
15
41
|
// This tricks bundlers so they can't statically analyze this and produce
|
|
16
42
|
// compilation warnings/errors.
|
|
@@ -105,12 +105,6 @@ const useOverflowItems = (items, containerRef, offsetRef, maxItems, onChange) =>
|
|
|
105
105
|
|
|
106
106
|
// Only call onChange if hidden items actually changed
|
|
107
107
|
useEffect(() => {
|
|
108
|
-
if (previousHiddenItems && onChange) {
|
|
109
|
-
const hasChanged = hiddenItems.length !== previousHiddenItems.length || hiddenItems.some((item, index) => item !== previousHiddenItems[index]);
|
|
110
|
-
if (hasChanged) {
|
|
111
|
-
onChange(hiddenItems);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
108
|
}, [hiddenItems, previousHiddenItems, onChange]);
|
|
115
109
|
return {
|
|
116
110
|
visibleItems,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { debounce as debounce$1 } from '../../function/debounce.
|
|
8
|
+
import { debounce as debounce$1 } from '../../function/debounce.js';
|
|
9
9
|
|
|
10
10
|
function debounce(func, debounceMs = 0, options = {}) {
|
|
11
11
|
if (typeof options !== 'object') {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function deprecateComponent(componentName: any, message: any): any;
|
|
@@ -9,12 +9,9 @@ import { warning } from '../internal/warning.js';
|
|
|
9
9
|
|
|
10
10
|
const didWarnAboutDeprecation = {};
|
|
11
11
|
function deprecateComponent(componentName, message) {
|
|
12
|
-
if (!componentName) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
12
|
if (!didWarnAboutDeprecation[componentName]) {
|
|
16
13
|
didWarnAboutDeprecation[componentName] = true;
|
|
17
|
-
process.env.NODE_ENV !== "production" ? warning(false, message
|
|
14
|
+
process.env.NODE_ENV !== "production" ? warning(false, message) : void 0;
|
|
18
15
|
}
|
|
19
16
|
return componentName;
|
|
20
17
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function deprecateValuesWithin(propType: any, allowedValues: any, propMappingFunction: any): (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @param {string} name The name of the prop that must exist to validate
|
|
9
|
+
* the current prop.
|
|
10
|
+
* @param {React.Validator} propType The original prop type checker.
|
|
11
|
+
* @returns {React.Validator} The new prop type checker for the current prop that
|
|
12
|
+
* becomes required if the prop corresponding to the provided prop name exists.
|
|
13
|
+
*/
|
|
14
|
+
export default function requiredIfGivenPropIsTruthy(name: string, propType: React.Validator): React.Validator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default mergeRefs;
|
|
2
|
+
/**
|
|
3
|
+
* Copyright IBM Corp. 2016, 2023
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @param {...Ref<Element>} refs List of React refs to merge.
|
|
10
|
+
* @returns {Ref<Element>} Merged React ref.
|
|
11
|
+
*/
|
|
12
|
+
declare function mergeRefs(...refs: Ref<Element>[]): Ref<Element>;
|
package/es/tools/mergeRefs.js
CHANGED
package/icons/index.js
CHANGED
|
@@ -7,14 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var iconsReact = require('@carbon/icons-react');
|
|
13
11
|
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
Object.keys(iconsReact).forEach(function (k) {
|
|
17
|
-
if (k !== 'default' && !
|
|
15
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
18
16
|
enumerable: true,
|
|
19
17
|
get: function () { return iconsReact[k]; }
|
|
20
18
|
});
|
|
@@ -7,14 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
function _defineProperty(e, r, t) {
|
|
13
11
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
14
12
|
value: t,
|
|
15
|
-
enumerable:
|
|
16
|
-
configurable:
|
|
17
|
-
writable:
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true
|
|
18
16
|
}) : e[r] = t, e;
|
|
19
17
|
}
|
|
20
18
|
function _extends() {
|
|
@@ -30,7 +28,7 @@ function _toPrimitive(t, r) {
|
|
|
30
28
|
if ("object" != typeof t || !t) return t;
|
|
31
29
|
var e = t[Symbol.toPrimitive];
|
|
32
30
|
if (void 0 !== e) {
|
|
33
|
-
var i = e.call(t, r
|
|
31
|
+
var i = e.call(t, r);
|
|
34
32
|
if ("object" != typeof i) return i;
|
|
35
33
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
36
34
|
}
|
|
@@ -42,6 +40,6 @@ function _toPropertyKey(t) {
|
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
exports.defineProperty = _defineProperty;
|
|
45
|
-
exports
|
|
43
|
+
exports.extends = _extends;
|
|
46
44
|
exports.toPrimitive = _toPrimitive;
|
|
47
45
|
exports.toPropertyKey = _toPropertyKey;
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
11
|
var cx = require('classnames');
|
|
14
12
|
var PropTypes = require('prop-types');
|
|
@@ -22,20 +20,14 @@ var iconsReact = require('@carbon/icons-react');
|
|
|
22
20
|
var useId = require('../../internal/useId.js');
|
|
23
21
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
24
22
|
|
|
25
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
26
|
-
|
|
27
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
28
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
29
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
30
|
-
|
|
31
23
|
var _Undo;
|
|
32
|
-
const AILabelContent = /*#__PURE__*/
|
|
24
|
+
const AILabelContent = /*#__PURE__*/React.forwardRef(function AILabelContent({
|
|
33
25
|
className,
|
|
34
26
|
children,
|
|
35
27
|
...rest
|
|
36
28
|
}, ref) {
|
|
37
29
|
const prefix = usePrefix.usePrefix();
|
|
38
|
-
const hasAILabelActions =
|
|
30
|
+
const hasAILabelActions = React.Children.toArray(children).some(child => {
|
|
39
31
|
const item = child;
|
|
40
32
|
// TODO: Is there supposed to be a `return` here? If so, this issue would
|
|
41
33
|
// have been caught by ESLint. It's concerning that this code is 7 months
|
|
@@ -44,11 +36,11 @@ const AILabelContent = /*#__PURE__*/React__default["default"].forwardRef(functio
|
|
|
44
36
|
// https://github.com/carbon-design-system/carbon/issues/18991
|
|
45
37
|
item.type === AILabelActions;
|
|
46
38
|
});
|
|
47
|
-
const aiLabelContentClasses =
|
|
39
|
+
const aiLabelContentClasses = cx(className, {
|
|
48
40
|
[`${prefix}--ai-label-content`]: true,
|
|
49
41
|
[`${prefix}--ai-label-content--with-actions`]: hasAILabelActions
|
|
50
42
|
});
|
|
51
|
-
return /*#__PURE__*/
|
|
43
|
+
return /*#__PURE__*/React.createElement(index.ToggletipContent, {
|
|
52
44
|
className: aiLabelContentClasses
|
|
53
45
|
}, children);
|
|
54
46
|
});
|
|
@@ -57,22 +49,22 @@ AILabelContent.propTypes = {
|
|
|
57
49
|
/**
|
|
58
50
|
* Specify the content you want rendered inside the AILabel ToggleTip
|
|
59
51
|
*/
|
|
60
|
-
children:
|
|
52
|
+
children: PropTypes.node,
|
|
61
53
|
/**
|
|
62
54
|
* Specify an optional className to be added to the AILabel callout
|
|
63
55
|
*/
|
|
64
|
-
className:
|
|
56
|
+
className: PropTypes.string
|
|
65
57
|
};
|
|
66
|
-
const AILabelActions = /*#__PURE__*/
|
|
58
|
+
const AILabelActions = /*#__PURE__*/React.forwardRef(function AILabelActions({
|
|
67
59
|
className,
|
|
68
60
|
children,
|
|
69
61
|
...rest
|
|
70
62
|
}, ref) {
|
|
71
63
|
const prefix = usePrefix.usePrefix();
|
|
72
|
-
const aiLabelActionsClasses =
|
|
64
|
+
const aiLabelActionsClasses = cx(className, {
|
|
73
65
|
[`${prefix}--ai-label-actions`]: true
|
|
74
66
|
});
|
|
75
|
-
return /*#__PURE__*/
|
|
67
|
+
return /*#__PURE__*/React.createElement(index.ToggletipActions, {
|
|
76
68
|
className: aiLabelActionsClasses
|
|
77
69
|
}, children);
|
|
78
70
|
});
|
|
@@ -81,11 +73,11 @@ AILabelActions.propTypes = {
|
|
|
81
73
|
/**
|
|
82
74
|
* Specify the content you want rendered inside the AILabel callout toolbar
|
|
83
75
|
*/
|
|
84
|
-
children:
|
|
76
|
+
children: PropTypes.node,
|
|
85
77
|
/**
|
|
86
78
|
* Specify an optional className to be added to the AILabel toolbar
|
|
87
79
|
*/
|
|
88
|
-
className:
|
|
80
|
+
className: PropTypes.string
|
|
89
81
|
};
|
|
90
82
|
|
|
91
83
|
/**
|
|
@@ -93,7 +85,7 @@ AILabelActions.propTypes = {
|
|
|
93
85
|
* @deprecated Use NewPopoverAlignment instead.
|
|
94
86
|
*/
|
|
95
87
|
|
|
96
|
-
const AILabel = /*#__PURE__*/
|
|
88
|
+
const AILabel = /*#__PURE__*/React.forwardRef(function AILabel({
|
|
97
89
|
aiText = 'AI',
|
|
98
90
|
aiTextLabel,
|
|
99
91
|
textLabel,
|
|
@@ -112,11 +104,11 @@ const AILabel = /*#__PURE__*/React__default["default"].forwardRef(function AILab
|
|
|
112
104
|
}, ref) {
|
|
113
105
|
const prefix = usePrefix.usePrefix();
|
|
114
106
|
const id = useId.useId('AILabel');
|
|
115
|
-
const aiLabelClasses =
|
|
107
|
+
const aiLabelClasses = cx(className, {
|
|
116
108
|
[`${prefix}--ai-label`]: true,
|
|
117
109
|
[`${prefix}--ai-label--revert`]: revertActive
|
|
118
110
|
});
|
|
119
|
-
const aiLabelButtonClasses =
|
|
111
|
+
const aiLabelButtonClasses = cx({
|
|
120
112
|
[`${prefix}--ai-label__button`]: true,
|
|
121
113
|
[`${prefix}--ai-label__button--${size}`]: size,
|
|
122
114
|
[`${prefix}--ai-label__button--${kind}`]: kind,
|
|
@@ -129,25 +121,25 @@ const AILabel = /*#__PURE__*/React__default["default"].forwardRef(function AILab
|
|
|
129
121
|
};
|
|
130
122
|
const ariaLabelText = !aiTextLabel && !textLabel ? `${aiText} ${slugLabel || ariaLabel}` : `${aiText} ${aiTextLabel || textLabel}`;
|
|
131
123
|
const isSmallIcon = ['xs', '2xs', 'mini'].includes(size);
|
|
132
|
-
return /*#__PURE__*/
|
|
124
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
133
125
|
className: aiLabelClasses,
|
|
134
126
|
ref: ref,
|
|
135
127
|
id: id
|
|
136
|
-
}, revertActive ? /*#__PURE__*/
|
|
128
|
+
}, revertActive ? /*#__PURE__*/React.createElement(index$1.IconButton, _rollupPluginBabelHelpers.extends({
|
|
137
129
|
onClick: handleOnRevertClick,
|
|
138
130
|
kind: "ghost",
|
|
139
131
|
size: "sm",
|
|
140
132
|
label: revertLabel
|
|
141
|
-
}, rest), _Undo || (_Undo = /*#__PURE__*/
|
|
133
|
+
}, rest), _Undo || (_Undo = /*#__PURE__*/React.createElement(iconsReact.Undo, null))) : /*#__PURE__*/React.createElement(index.Toggletip, _rollupPluginBabelHelpers.extends({
|
|
142
134
|
align: align,
|
|
143
135
|
autoAlign: autoAlign,
|
|
144
136
|
alignmentAxisOffset: isSmallIcon ? -24 : 0
|
|
145
|
-
}, rest), /*#__PURE__*/
|
|
137
|
+
}, rest), /*#__PURE__*/React.createElement(index.ToggletipButton, {
|
|
146
138
|
className: aiLabelButtonClasses,
|
|
147
139
|
label: kind === 'inline' ? '' : ariaLabelText
|
|
148
|
-
}, /*#__PURE__*/
|
|
140
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
149
141
|
className: `${prefix}--ai-label__text`
|
|
150
|
-
}, aiText), kind === 'inline' && (aiTextLabel || textLabel) && /*#__PURE__*/
|
|
142
|
+
}, aiText), kind === 'inline' && (aiTextLabel || textLabel) && /*#__PURE__*/React.createElement("span", {
|
|
151
143
|
className: `${prefix}--ai-label__additional-text`
|
|
152
144
|
}, aiTextLabel || textLabel)), children));
|
|
153
145
|
});
|
|
@@ -156,20 +148,20 @@ AILabel.propTypes = {
|
|
|
156
148
|
/**
|
|
157
149
|
* Specify the content you want rendered inside the `AILabel` ToggleTip
|
|
158
150
|
*/
|
|
159
|
-
AILabelContent:
|
|
151
|
+
AILabelContent: PropTypes.node,
|
|
160
152
|
/**
|
|
161
153
|
* Specify the correct translation of the AI text
|
|
162
154
|
*/
|
|
163
|
-
aiText:
|
|
155
|
+
aiText: PropTypes.string,
|
|
164
156
|
/**
|
|
165
157
|
* @deprecated
|
|
166
158
|
* Specify additional text to be rendered next to the AI label in the inline variant
|
|
167
159
|
*/
|
|
168
|
-
aiTextLabel: deprecate.deprecate(
|
|
160
|
+
aiTextLabel: deprecate.deprecate(PropTypes.string, '`aiTextLabel` on `AILabel` has been deprecated - Please use the `textLabel` prop instead'),
|
|
169
161
|
/**
|
|
170
162
|
* Specify how the popover should align with the button
|
|
171
163
|
*/
|
|
172
|
-
align: deprecateValuesWithin
|
|
164
|
+
align: deprecateValuesWithin.default(PropTypes.oneOf(['top', 'top-left',
|
|
173
165
|
// deprecated use top-start instead
|
|
174
166
|
'top-right',
|
|
175
167
|
// deprecated use top-end instead
|
|
@@ -194,48 +186,48 @@ AILabel.propTypes = {
|
|
|
194
186
|
/**
|
|
195
187
|
* Specify the text that will be provided to the aria-label of the `AILabel` button
|
|
196
188
|
*/
|
|
197
|
-
'aria-label':
|
|
189
|
+
'aria-label': PropTypes.string,
|
|
198
190
|
/**
|
|
199
191
|
* Will auto-align the popover. This prop is currently experimental and is subject to future changes.
|
|
200
192
|
*/
|
|
201
|
-
autoAlign:
|
|
193
|
+
autoAlign: PropTypes.bool,
|
|
202
194
|
/**
|
|
203
195
|
* Specify the content you want rendered inside the `AILabel` ToggleTip
|
|
204
196
|
*/
|
|
205
|
-
children:
|
|
197
|
+
children: PropTypes.node,
|
|
206
198
|
/**
|
|
207
199
|
* Specify an optional className to be added to the `AILabel`
|
|
208
200
|
*/
|
|
209
|
-
className:
|
|
201
|
+
className: PropTypes.string,
|
|
210
202
|
/**
|
|
211
203
|
* Specify the type of `AILabel`, from the following list of types:
|
|
212
204
|
*/
|
|
213
|
-
kind:
|
|
205
|
+
kind: PropTypes.oneOf(['default', 'inline']),
|
|
214
206
|
/**
|
|
215
207
|
* Callback function that fires when the revert button is clicked
|
|
216
208
|
*/
|
|
217
|
-
onRevertClick:
|
|
209
|
+
onRevertClick: PropTypes.func,
|
|
218
210
|
/**
|
|
219
211
|
* Specify whether the revert button should be visible
|
|
220
212
|
*/
|
|
221
|
-
revertActive:
|
|
213
|
+
revertActive: PropTypes.bool,
|
|
222
214
|
/**
|
|
223
215
|
* Specify the text that should be shown when the revert button is hovered
|
|
224
216
|
*/
|
|
225
|
-
revertLabel:
|
|
217
|
+
revertLabel: PropTypes.string,
|
|
226
218
|
/**
|
|
227
219
|
* Specify the size of the button, from the following list of sizes:
|
|
228
220
|
*/
|
|
229
|
-
size:
|
|
221
|
+
size: PropTypes.oneOf(['mini', '2xs', 'xs', 'sm', 'md', 'lg', 'xl']),
|
|
230
222
|
/**
|
|
231
223
|
* @deprecated
|
|
232
224
|
* Specify the text that will be provided to the aria-label of the `AILabel` button
|
|
233
225
|
*/
|
|
234
|
-
slugLabel: deprecate.deprecate(
|
|
226
|
+
slugLabel: deprecate.deprecate(PropTypes.string, '`slugLabel` on `AILabel` has been deprecated - Please use the `ariaLabel` prop instead'),
|
|
235
227
|
/**
|
|
236
228
|
* Specify additional text to be rendered next to the AI label in the inline variant
|
|
237
229
|
*/
|
|
238
|
-
textLabel:
|
|
230
|
+
textLabel: PropTypes.string
|
|
239
231
|
};
|
|
240
232
|
|
|
241
233
|
exports.AILabel = AILabel;
|
|
@@ -16,21 +16,15 @@ var cx = require('classnames');
|
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
var SkeletonIcon = require('../SkeletonIcon/SkeletonIcon.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 AISkeletonIcon = ({
|
|
26
20
|
className,
|
|
27
21
|
...rest
|
|
28
22
|
}) => {
|
|
29
23
|
const prefix = usePrefix.usePrefix();
|
|
30
|
-
const AISkeletonIconClasses =
|
|
24
|
+
const AISkeletonIconClasses = cx(className, {
|
|
31
25
|
[`${prefix}--skeleton__icon--ai`]: true
|
|
32
26
|
});
|
|
33
|
-
return /*#__PURE__*/
|
|
27
|
+
return /*#__PURE__*/React.createElement(SkeletonIcon.default, _rollupPluginBabelHelpers.extends({
|
|
34
28
|
className: AISkeletonIconClasses
|
|
35
29
|
}, rest));
|
|
36
30
|
};
|
|
@@ -38,11 +32,11 @@ AISkeletonIcon.propTypes = {
|
|
|
38
32
|
/**
|
|
39
33
|
* Specify an optional className to add.
|
|
40
34
|
*/
|
|
41
|
-
className:
|
|
35
|
+
className: PropTypes.string,
|
|
42
36
|
/**
|
|
43
37
|
* The CSS styles.
|
|
44
38
|
*/
|
|
45
|
-
style:
|
|
39
|
+
style: PropTypes.object
|
|
46
40
|
};
|
|
47
41
|
|
|
48
|
-
exports
|
|
42
|
+
exports.default = AISkeletonIcon;
|
|
@@ -16,22 +16,16 @@ var cx = require('classnames');
|
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
var SkeletonPlaceholder = require('../SkeletonPlaceholder/SkeletonPlaceholder.js');
|
|
18
18
|
|
|
19
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
|
-
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
23
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
24
|
-
|
|
25
19
|
const AISkeletonPlaceholder = ({
|
|
26
20
|
className,
|
|
27
21
|
...other
|
|
28
22
|
}) => {
|
|
29
23
|
const prefix = usePrefix.usePrefix();
|
|
30
|
-
const AISkeletonPlaceholderClasses =
|
|
24
|
+
const AISkeletonPlaceholderClasses = cx({
|
|
31
25
|
className,
|
|
32
26
|
[`${prefix}--skeleton__placeholder--ai`]: true
|
|
33
27
|
}, className);
|
|
34
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/React.createElement(SkeletonPlaceholder.default, _rollupPluginBabelHelpers.extends({
|
|
35
29
|
className: AISkeletonPlaceholderClasses
|
|
36
30
|
}, other));
|
|
37
31
|
};
|
|
@@ -40,7 +34,7 @@ AISkeletonPlaceholder.propTypes = {
|
|
|
40
34
|
* Add a custom class to the component
|
|
41
35
|
* to set the height and width
|
|
42
36
|
*/
|
|
43
|
-
className:
|
|
37
|
+
className: PropTypes.string
|
|
44
38
|
};
|
|
45
39
|
|
|
46
|
-
exports
|
|
40
|
+
exports.default = AISkeletonPlaceholder;
|
|
@@ -16,21 +16,15 @@ var cx = require('classnames');
|
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
var SkeletonText = require('../SkeletonText/SkeletonText.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 AISkeletonText = ({
|
|
26
20
|
className,
|
|
27
21
|
...rest
|
|
28
22
|
}) => {
|
|
29
23
|
const prefix = usePrefix.usePrefix();
|
|
30
|
-
const aiSkeletonTextClasses =
|
|
24
|
+
const aiSkeletonTextClasses = cx(className, {
|
|
31
25
|
[`${prefix}--skeleton__text--ai`]: true
|
|
32
26
|
});
|
|
33
|
-
return /*#__PURE__*/
|
|
27
|
+
return /*#__PURE__*/React.createElement(SkeletonText.default, _rollupPluginBabelHelpers.extends({
|
|
34
28
|
className: aiSkeletonTextClasses
|
|
35
29
|
}, rest));
|
|
36
30
|
};
|
|
@@ -38,23 +32,23 @@ AISkeletonText.propTypes = {
|
|
|
38
32
|
/**
|
|
39
33
|
* Specify an optional className to be applied to the container node
|
|
40
34
|
*/
|
|
41
|
-
className:
|
|
35
|
+
className: PropTypes.string,
|
|
42
36
|
/**
|
|
43
37
|
* generates skeleton text at a larger size
|
|
44
38
|
*/
|
|
45
|
-
heading:
|
|
39
|
+
heading: PropTypes.bool,
|
|
46
40
|
/**
|
|
47
41
|
* the number of lines shown if paragraph is true
|
|
48
42
|
*/
|
|
49
|
-
lineCount:
|
|
43
|
+
lineCount: PropTypes.number,
|
|
50
44
|
/**
|
|
51
45
|
* will generate multiple lines of text
|
|
52
46
|
*/
|
|
53
|
-
paragraph:
|
|
47
|
+
paragraph: PropTypes.bool,
|
|
54
48
|
/**
|
|
55
49
|
* width (in px or %) of single line of text or max-width of paragraph lines
|
|
56
50
|
*/
|
|
57
|
-
width:
|
|
51
|
+
width: PropTypes.string
|
|
58
52
|
};
|
|
59
53
|
|
|
60
|
-
exports
|
|
54
|
+
exports.default = AISkeletonText;
|