@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
|
@@ -13,8 +13,8 @@ var Slider$1 = require('./Slider.js');
|
|
|
13
13
|
var createClassWrapper = require('../../internal/createClassWrapper.js');
|
|
14
14
|
var Slider_Skeleton = require('./Slider.Skeleton.js');
|
|
15
15
|
|
|
16
|
-
const Slider = createClassWrapper.createClassWrapper(Slider$1
|
|
16
|
+
const Slider = createClassWrapper.createClassWrapper(Slider$1.default);
|
|
17
17
|
|
|
18
|
-
exports.SliderSkeleton = Slider_Skeleton
|
|
18
|
+
exports.SliderSkeleton = Slider_Skeleton.default;
|
|
19
19
|
exports.Slider = Slider;
|
|
20
|
-
exports
|
|
20
|
+
exports.default = Slider;
|
|
@@ -7,18 +7,12 @@
|
|
|
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 React = require('react');
|
|
14
12
|
var Stack = require('./Stack.js');
|
|
15
13
|
|
|
16
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
-
|
|
18
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
|
-
|
|
20
14
|
const HStack = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
21
|
-
return /*#__PURE__*/
|
|
15
|
+
return /*#__PURE__*/React.createElement(Stack.Stack, _rollupPluginBabelHelpers.extends({}, props, {
|
|
22
16
|
ref: ref,
|
|
23
17
|
orientation: "horizontal"
|
|
24
18
|
}));
|
|
@@ -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 React = require('react');
|
|
14
12
|
var cx = require('classnames');
|
|
@@ -16,12 +14,6 @@ var PropTypes = require('prop-types');
|
|
|
16
14
|
var layout = require('@carbon/layout');
|
|
17
15
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
18
16
|
|
|
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 cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
24
|
-
|
|
25
17
|
/**
|
|
26
18
|
* The steps in the spacing scale
|
|
27
19
|
*/
|
|
@@ -55,7 +47,7 @@ const Stack = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
55
47
|
...rest
|
|
56
48
|
} = props;
|
|
57
49
|
const prefix = usePrefix.usePrefix();
|
|
58
|
-
const className =
|
|
50
|
+
const className = cx(customClassName, {
|
|
59
51
|
[`${prefix}--stack-${orientation}`]: true,
|
|
60
52
|
[`${prefix}--stack-scale-${gap}`]: typeof gap === 'number'
|
|
61
53
|
});
|
|
@@ -68,7 +60,7 @@ const Stack = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
68
60
|
return (
|
|
69
61
|
/*#__PURE__*/
|
|
70
62
|
// eslint-disable-next-line react/forbid-component-props
|
|
71
|
-
|
|
63
|
+
React.createElement(BaseComponent, _rollupPluginBabelHelpers.extends({}, rest, {
|
|
72
64
|
ref: ref,
|
|
73
65
|
className: className,
|
|
74
66
|
style: style
|
|
@@ -80,27 +72,27 @@ Stack.propTypes = {
|
|
|
80
72
|
* Provide a custom element type to render as the outermost element in
|
|
81
73
|
* the Stack component. By default, this component will render a `div`.
|
|
82
74
|
*/
|
|
83
|
-
as:
|
|
75
|
+
as: PropTypes.elementType,
|
|
84
76
|
/**
|
|
85
77
|
* Provide the elements that will be rendered as children inside of the Stack
|
|
86
78
|
* component. These elements will have having spacing between them according
|
|
87
79
|
* to the `step` and `orientation` prop
|
|
88
80
|
*/
|
|
89
|
-
children:
|
|
81
|
+
children: PropTypes.node,
|
|
90
82
|
/**
|
|
91
83
|
* Provide a custom class name to be used by the outermost element rendered by
|
|
92
84
|
* Stack
|
|
93
85
|
*/
|
|
94
|
-
className:
|
|
86
|
+
className: PropTypes.string,
|
|
95
87
|
/**
|
|
96
88
|
* Provide either a custom value or a step from the spacing scale to be used
|
|
97
89
|
* as the gap in the layout
|
|
98
90
|
*/
|
|
99
|
-
gap:
|
|
91
|
+
gap: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf(SPACING_STEPS)]),
|
|
100
92
|
/**
|
|
101
93
|
* Specify the orientation of them items in the Stack
|
|
102
94
|
*/
|
|
103
|
-
orientation:
|
|
95
|
+
orientation: PropTypes.oneOf(['horizontal', 'vertical'])
|
|
104
96
|
};
|
|
105
97
|
|
|
106
98
|
exports.Stack = Stack;
|
|
@@ -7,18 +7,12 @@
|
|
|
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 React = require('react');
|
|
14
12
|
var Stack = require('./Stack.js');
|
|
15
13
|
|
|
16
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
-
|
|
18
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
|
-
|
|
20
14
|
const VStack = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
21
|
-
return /*#__PURE__*/
|
|
15
|
+
return /*#__PURE__*/React.createElement(Stack.Stack, _rollupPluginBabelHelpers.extends({}, props, {
|
|
22
16
|
ref: ref,
|
|
23
17
|
orientation: "vertical"
|
|
24
18
|
}));
|
|
@@ -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
|
var _span, _span2, _span3;
|
|
25
19
|
function StructuredListSkeleton({
|
|
26
20
|
rowCount = 5,
|
|
@@ -28,30 +22,30 @@ function StructuredListSkeleton({
|
|
|
28
22
|
...rest
|
|
29
23
|
}) {
|
|
30
24
|
const prefix = usePrefix.usePrefix();
|
|
31
|
-
const classNames =
|
|
32
|
-
const rows = new Array(rowCount).fill(null).map((_, i) => /*#__PURE__*/
|
|
25
|
+
const classNames = cx(`${prefix}--skeleton`, `${prefix}--structured-list`, className);
|
|
26
|
+
const rows = new Array(rowCount).fill(null).map((_, i) => /*#__PURE__*/React.createElement("div", {
|
|
33
27
|
className: `${prefix}--structured-list-row`,
|
|
34
28
|
key: i
|
|
35
|
-
}, /*#__PURE__*/
|
|
29
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
36
30
|
className: `${prefix}--structured-list-td`
|
|
37
|
-
}), /*#__PURE__*/
|
|
31
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
38
32
|
className: `${prefix}--structured-list-td`
|
|
39
|
-
}), /*#__PURE__*/
|
|
33
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
40
34
|
className: `${prefix}--structured-list-td`
|
|
41
35
|
})));
|
|
42
|
-
return /*#__PURE__*/
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
43
37
|
className: classNames
|
|
44
|
-
}, rest), /*#__PURE__*/
|
|
38
|
+
}, rest), /*#__PURE__*/React.createElement("div", {
|
|
45
39
|
className: `${prefix}--structured-list-thead`
|
|
46
|
-
}, /*#__PURE__*/
|
|
40
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
47
41
|
className: `${prefix}--structured-list-row ${prefix}--structured-list-row--header-row`
|
|
48
|
-
}, /*#__PURE__*/
|
|
42
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
49
43
|
className: `${prefix}--structured-list-th`
|
|
50
|
-
}, _span || (_span = /*#__PURE__*/
|
|
44
|
+
}, _span || (_span = /*#__PURE__*/React.createElement("span", null))), /*#__PURE__*/React.createElement("div", {
|
|
51
45
|
className: `${prefix}--structured-list-th`
|
|
52
|
-
}, _span2 || (_span2 = /*#__PURE__*/
|
|
46
|
+
}, _span2 || (_span2 = /*#__PURE__*/React.createElement("span", null))), /*#__PURE__*/React.createElement("div", {
|
|
53
47
|
className: `${prefix}--structured-list-th`
|
|
54
|
-
}, _span3 || (_span3 = /*#__PURE__*/
|
|
48
|
+
}, _span3 || (_span3 = /*#__PURE__*/React.createElement("span", null))))), /*#__PURE__*/React.createElement("div", {
|
|
55
49
|
className: `${prefix}--structured-list-tbody`
|
|
56
50
|
}, rows));
|
|
57
51
|
}
|
|
@@ -59,11 +53,11 @@ StructuredListSkeleton.propTypes = {
|
|
|
59
53
|
/**
|
|
60
54
|
* Specify an optional className to add.
|
|
61
55
|
*/
|
|
62
|
-
className:
|
|
56
|
+
className: PropTypes.string,
|
|
63
57
|
/**
|
|
64
58
|
* number of table rows
|
|
65
59
|
*/
|
|
66
|
-
rowCount:
|
|
60
|
+
rowCount: PropTypes.number
|
|
67
61
|
};
|
|
68
62
|
|
|
69
|
-
exports
|
|
63
|
+
exports.default = StructuredListSkeleton;
|
|
@@ -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 React = require('react');
|
|
14
12
|
var PropTypes = require('prop-types');
|
|
@@ -21,15 +19,9 @@ var iconsReact = require('@carbon/icons-react');
|
|
|
21
19
|
var useOutsideClick = require('../../internal/useOutsideClick.js');
|
|
22
20
|
var Text = require('../Text/Text.js');
|
|
23
21
|
|
|
24
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
|
-
|
|
26
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
27
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
28
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
29
|
-
|
|
30
22
|
var _StructuredListCell;
|
|
31
|
-
const GridSelectedRowStateContext = /*#__PURE__*/
|
|
32
|
-
const GridSelectedRowDispatchContext = /*#__PURE__*/
|
|
23
|
+
const GridSelectedRowStateContext = /*#__PURE__*/React.createContext(null);
|
|
24
|
+
const GridSelectedRowDispatchContext = /*#__PURE__*/React.createContext(null);
|
|
33
25
|
function StructuredListWrapper(props) {
|
|
34
26
|
const {
|
|
35
27
|
children,
|
|
@@ -43,17 +35,17 @@ function StructuredListWrapper(props) {
|
|
|
43
35
|
...other
|
|
44
36
|
} = props;
|
|
45
37
|
const prefix = usePrefix.usePrefix();
|
|
46
|
-
const classes =
|
|
38
|
+
const classes = cx(`${prefix}--structured-list`, {
|
|
47
39
|
[`${prefix}--structured-list--selection`]: selection,
|
|
48
40
|
[`${prefix}--structured-list--condensed`]: isCondensed,
|
|
49
41
|
[`${prefix}--structured-list--flush`]: isFlush && !selection
|
|
50
42
|
}, className);
|
|
51
|
-
const [selectedRow, setSelectedRow] =
|
|
52
|
-
return /*#__PURE__*/
|
|
43
|
+
const [selectedRow, setSelectedRow] = React.useState(null);
|
|
44
|
+
return /*#__PURE__*/React.createElement(GridSelectedRowStateContext.Provider, {
|
|
53
45
|
value: selectedRow
|
|
54
|
-
}, /*#__PURE__*/
|
|
46
|
+
}, /*#__PURE__*/React.createElement(GridSelectedRowDispatchContext.Provider, {
|
|
55
47
|
value: setSelectedRow
|
|
56
|
-
}, /*#__PURE__*/
|
|
48
|
+
}, /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
57
49
|
role: "table",
|
|
58
50
|
className: classes
|
|
59
51
|
}, other, {
|
|
@@ -64,32 +56,32 @@ StructuredListWrapper.propTypes = {
|
|
|
64
56
|
/**
|
|
65
57
|
* Specify a label to be read by screen readers on the container node
|
|
66
58
|
*/
|
|
67
|
-
['aria-label']:
|
|
59
|
+
['aria-label']: PropTypes.string,
|
|
68
60
|
/**
|
|
69
61
|
* Deprecated, please use `aria-label` instead.
|
|
70
62
|
* Specify a label to be read by screen readers on the container note.
|
|
71
63
|
*/
|
|
72
|
-
ariaLabel: deprecate.deprecate(
|
|
64
|
+
ariaLabel: deprecate.deprecate(PropTypes.string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
73
65
|
/**
|
|
74
66
|
* Provide the contents of your StructuredListWrapper
|
|
75
67
|
*/
|
|
76
|
-
children:
|
|
68
|
+
children: PropTypes.node,
|
|
77
69
|
/**
|
|
78
70
|
* Specify an optional className to be applied to the container node
|
|
79
71
|
*/
|
|
80
|
-
className:
|
|
72
|
+
className: PropTypes.string,
|
|
81
73
|
/**
|
|
82
74
|
* Specify if structured list is condensed, default is false
|
|
83
75
|
*/
|
|
84
|
-
isCondensed:
|
|
76
|
+
isCondensed: PropTypes.bool,
|
|
85
77
|
/**
|
|
86
78
|
* Specify if structured list is flush, not valid for selection variant, default is false
|
|
87
79
|
*/
|
|
88
|
-
isFlush:
|
|
80
|
+
isFlush: PropTypes.bool,
|
|
89
81
|
/**
|
|
90
82
|
* Specify whether your StructuredListWrapper should have selections
|
|
91
83
|
*/
|
|
92
|
-
selection:
|
|
84
|
+
selection: PropTypes.bool
|
|
93
85
|
};
|
|
94
86
|
function StructuredListHead(props) {
|
|
95
87
|
const {
|
|
@@ -98,8 +90,8 @@ function StructuredListHead(props) {
|
|
|
98
90
|
...other
|
|
99
91
|
} = props;
|
|
100
92
|
const prefix = usePrefix.usePrefix();
|
|
101
|
-
const classes =
|
|
102
|
-
return /*#__PURE__*/
|
|
93
|
+
const classes = cx(`${prefix}--structured-list-thead`, className);
|
|
94
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
103
95
|
role: "rowgroup",
|
|
104
96
|
className: classes
|
|
105
97
|
}, other), children);
|
|
@@ -108,11 +100,11 @@ StructuredListHead.propTypes = {
|
|
|
108
100
|
/**
|
|
109
101
|
* Provide the contents of your StructuredListHead
|
|
110
102
|
*/
|
|
111
|
-
children:
|
|
103
|
+
children: PropTypes.node,
|
|
112
104
|
/**
|
|
113
105
|
* Specify an optional className to be applied to the node
|
|
114
106
|
*/
|
|
115
|
-
className:
|
|
107
|
+
className: PropTypes.string
|
|
116
108
|
};
|
|
117
109
|
function StructuredListBody(props) {
|
|
118
110
|
const {
|
|
@@ -121,8 +113,8 @@ function StructuredListBody(props) {
|
|
|
121
113
|
...other
|
|
122
114
|
} = props;
|
|
123
115
|
const prefix = usePrefix.usePrefix();
|
|
124
|
-
const classes =
|
|
125
|
-
return /*#__PURE__*/
|
|
116
|
+
const classes = cx(`${prefix}--structured-list-tbody`, className);
|
|
117
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
126
118
|
className: classes,
|
|
127
119
|
role: "rowgroup"
|
|
128
120
|
}, other), children);
|
|
@@ -131,18 +123,18 @@ StructuredListBody.propTypes = {
|
|
|
131
123
|
/**
|
|
132
124
|
* Provide the contents of your StructuredListBody
|
|
133
125
|
*/
|
|
134
|
-
children:
|
|
126
|
+
children: PropTypes.node,
|
|
135
127
|
/**
|
|
136
128
|
* Specify an optional className to be applied to the container node
|
|
137
129
|
*/
|
|
138
|
-
className:
|
|
139
|
-
head:
|
|
130
|
+
className: PropTypes.string,
|
|
131
|
+
head: PropTypes.bool,
|
|
140
132
|
/**
|
|
141
133
|
* Provide a handler that is invoked on the key down event for the control
|
|
142
134
|
*/
|
|
143
|
-
onKeyDown:
|
|
135
|
+
onKeyDown: PropTypes.func
|
|
144
136
|
};
|
|
145
|
-
const GridRowContext = /*#__PURE__*/
|
|
137
|
+
const GridRowContext = /*#__PURE__*/React.createContext(null);
|
|
146
138
|
function StructuredListRow(props) {
|
|
147
139
|
const {
|
|
148
140
|
onKeyDown,
|
|
@@ -155,13 +147,13 @@ function StructuredListRow(props) {
|
|
|
155
147
|
} = props;
|
|
156
148
|
const [hasFocusWithin, setHasFocusWithin] = React.useState(false);
|
|
157
149
|
const id = useId.useId('grid-input');
|
|
158
|
-
const selectedRow =
|
|
159
|
-
const setSelectedRow =
|
|
150
|
+
const selectedRow = React.useContext(GridSelectedRowStateContext);
|
|
151
|
+
const setSelectedRow = React.useContext(GridSelectedRowDispatchContext);
|
|
160
152
|
const prefix = usePrefix.usePrefix();
|
|
161
153
|
const value = {
|
|
162
154
|
id
|
|
163
155
|
};
|
|
164
|
-
const classes =
|
|
156
|
+
const classes = cx(`${prefix}--structured-list-row`, {
|
|
165
157
|
[`${prefix}--structured-list-row--header-row`]: head,
|
|
166
158
|
[`${prefix}--structured-list-row--focused-within`]: hasFocusWithin && !selection || hasFocusWithin && selection && (selectedRow === id || selectedRow === null),
|
|
167
159
|
// Ensure focus on the first item when navigating through Tab keys and no row is selected (selectedRow === null)
|
|
@@ -172,16 +164,16 @@ function StructuredListRow(props) {
|
|
|
172
164
|
setHasFocusWithin(false);
|
|
173
165
|
};
|
|
174
166
|
useOutsideClick.useOutsideClick(itemRef, handleClick);
|
|
175
|
-
return head ? /*#__PURE__*/
|
|
167
|
+
return head ? /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
176
168
|
role: "row"
|
|
177
169
|
}, other, {
|
|
178
170
|
className: classes
|
|
179
|
-
}), selection && (_StructuredListCell || (_StructuredListCell = /*#__PURE__*/
|
|
171
|
+
}), selection && (_StructuredListCell || (_StructuredListCell = /*#__PURE__*/React.createElement(StructuredListCell, {
|
|
180
172
|
head: true
|
|
181
173
|
}))), children) :
|
|
182
174
|
/*#__PURE__*/
|
|
183
175
|
// eslint-disable-next-line jsx-a11y/interactive-supports-focus
|
|
184
|
-
|
|
176
|
+
React.createElement("div", _rollupPluginBabelHelpers.extends({}, other, {
|
|
185
177
|
role: "row",
|
|
186
178
|
className: classes,
|
|
187
179
|
ref: itemRef,
|
|
@@ -200,11 +192,11 @@ function StructuredListRow(props) {
|
|
|
200
192
|
setHasFocusWithin(false);
|
|
201
193
|
},
|
|
202
194
|
onKeyDown: onKeyDown
|
|
203
|
-
}), /*#__PURE__*/
|
|
195
|
+
}), /*#__PURE__*/React.createElement(GridRowContext.Provider, {
|
|
204
196
|
value: value
|
|
205
|
-
}, selection && /*#__PURE__*/
|
|
197
|
+
}, selection && /*#__PURE__*/React.createElement(StructuredListCell, null, selectedRow === id ? /*#__PURE__*/React.createElement(iconsReact.RadioButtonChecked, {
|
|
206
198
|
className: `${prefix}--structured-list__icon`
|
|
207
|
-
}) : /*#__PURE__*/
|
|
199
|
+
}) : /*#__PURE__*/React.createElement(iconsReact.RadioButton, {
|
|
208
200
|
className: `${prefix}--structured-list__icon`
|
|
209
201
|
})), children));
|
|
210
202
|
}
|
|
@@ -212,31 +204,31 @@ StructuredListRow.propTypes = {
|
|
|
212
204
|
/**
|
|
213
205
|
* Provide the contents of your StructuredListRow
|
|
214
206
|
*/
|
|
215
|
-
children:
|
|
207
|
+
children: PropTypes.node,
|
|
216
208
|
/**
|
|
217
209
|
* Specify an optional className to be applied to the container node
|
|
218
210
|
*/
|
|
219
|
-
className:
|
|
211
|
+
className: PropTypes.string,
|
|
220
212
|
/**
|
|
221
213
|
* Specify whether your StructuredListRow should be used as a header row
|
|
222
214
|
*/
|
|
223
|
-
head:
|
|
215
|
+
head: PropTypes.bool,
|
|
224
216
|
/**
|
|
225
217
|
* Specify whether a `<label>` should be used
|
|
226
218
|
*/
|
|
227
|
-
label: deprecate.deprecate(
|
|
219
|
+
label: deprecate.deprecate(PropTypes.bool, `\nThe \`label\` prop is no longer needed and will be removed in the next major version of Carbon.`),
|
|
228
220
|
/**
|
|
229
221
|
* Provide a handler that is invoked on the click
|
|
230
222
|
*/
|
|
231
|
-
onClick:
|
|
223
|
+
onClick: PropTypes.func,
|
|
232
224
|
/**
|
|
233
225
|
* Provide a handler that is invoked on the key down event for the control,
|
|
234
226
|
*/
|
|
235
|
-
onKeyDown:
|
|
227
|
+
onKeyDown: PropTypes.func,
|
|
236
228
|
/**
|
|
237
229
|
* Mark if this row should be selectable
|
|
238
230
|
*/
|
|
239
|
-
selection:
|
|
231
|
+
selection: PropTypes.bool
|
|
240
232
|
};
|
|
241
233
|
function StructuredListInput(props) {
|
|
242
234
|
const defaultId = useId.useId('structureListInput');
|
|
@@ -249,11 +241,11 @@ function StructuredListInput(props) {
|
|
|
249
241
|
...other
|
|
250
242
|
} = props;
|
|
251
243
|
const prefix = usePrefix.usePrefix();
|
|
252
|
-
const classes =
|
|
253
|
-
const row =
|
|
254
|
-
const selectedRow =
|
|
255
|
-
const setSelectedRow =
|
|
256
|
-
return /*#__PURE__*/
|
|
244
|
+
const classes = cx(`${prefix}--structured-list-input`, `${prefix}--visually-hidden`, className);
|
|
245
|
+
const row = React.useContext(GridRowContext);
|
|
246
|
+
const selectedRow = React.useContext(GridSelectedRowStateContext);
|
|
247
|
+
const setSelectedRow = React.useContext(GridSelectedRowDispatchContext);
|
|
248
|
+
return /*#__PURE__*/React.createElement("input", _rollupPluginBabelHelpers.extends({}, other, {
|
|
257
249
|
type: "radio",
|
|
258
250
|
tabIndex: 0,
|
|
259
251
|
checked: !!row && row.id === selectedRow,
|
|
@@ -272,31 +264,31 @@ StructuredListInput.propTypes = {
|
|
|
272
264
|
/**
|
|
273
265
|
* Specify an optional className to be applied to the input
|
|
274
266
|
*/
|
|
275
|
-
className:
|
|
267
|
+
className: PropTypes.string,
|
|
276
268
|
/**
|
|
277
269
|
* Specify whether the underlying input should be checked by default
|
|
278
270
|
*/
|
|
279
|
-
defaultChecked: deprecate.deprecate(
|
|
271
|
+
defaultChecked: deprecate.deprecate(PropTypes.bool, `\nThe prop \`defaultChecked\` is no longer needed and will be removed in the next major version of Carbon.`),
|
|
280
272
|
/**
|
|
281
273
|
* Specify a custom `id` for the input
|
|
282
274
|
*/
|
|
283
|
-
id:
|
|
275
|
+
id: PropTypes.string,
|
|
284
276
|
/**
|
|
285
277
|
* Provide a `name` for the input
|
|
286
278
|
*/
|
|
287
|
-
name:
|
|
279
|
+
name: PropTypes.string,
|
|
288
280
|
/**
|
|
289
281
|
* Provide an optional hook that is called each time the input is updated
|
|
290
282
|
*/
|
|
291
|
-
onChange:
|
|
283
|
+
onChange: PropTypes.func,
|
|
292
284
|
/**
|
|
293
285
|
* Provide a `title` for the input
|
|
294
286
|
*/
|
|
295
|
-
title:
|
|
287
|
+
title: PropTypes.string,
|
|
296
288
|
/**
|
|
297
289
|
* Specify the value of the input
|
|
298
290
|
*/
|
|
299
|
-
value: deprecate.deprecate(
|
|
291
|
+
value: deprecate.deprecate(PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, `\nThe prop \`value\` will be removed in the next major version of Carbon.`)
|
|
300
292
|
};
|
|
301
293
|
function StructuredListCell(props) {
|
|
302
294
|
const {
|
|
@@ -307,18 +299,18 @@ function StructuredListCell(props) {
|
|
|
307
299
|
...other
|
|
308
300
|
} = props;
|
|
309
301
|
const prefix = usePrefix.usePrefix();
|
|
310
|
-
const classes =
|
|
302
|
+
const classes = cx({
|
|
311
303
|
[`${prefix}--structured-list-th`]: head,
|
|
312
304
|
[`${prefix}--structured-list-td`]: !head,
|
|
313
305
|
[`${prefix}--structured-list-content--nowrap`]: noWrap
|
|
314
306
|
}, className);
|
|
315
307
|
if (head) {
|
|
316
|
-
return /*#__PURE__*/
|
|
308
|
+
return /*#__PURE__*/React.createElement(Text.Text, _rollupPluginBabelHelpers.extends({
|
|
317
309
|
className: classes,
|
|
318
310
|
role: "columnheader"
|
|
319
311
|
}, other), children);
|
|
320
312
|
}
|
|
321
|
-
return /*#__PURE__*/
|
|
313
|
+
return /*#__PURE__*/React.createElement(Text.Text, _rollupPluginBabelHelpers.extends({
|
|
322
314
|
as: "div",
|
|
323
315
|
className: classes,
|
|
324
316
|
role: "cell"
|
|
@@ -328,19 +320,19 @@ StructuredListCell.propTypes = {
|
|
|
328
320
|
/**
|
|
329
321
|
* Provide the contents of your StructuredListCell
|
|
330
322
|
*/
|
|
331
|
-
children:
|
|
323
|
+
children: PropTypes.node,
|
|
332
324
|
/**
|
|
333
325
|
* Specify an optional className to be applied to the container node
|
|
334
326
|
*/
|
|
335
|
-
className:
|
|
327
|
+
className: PropTypes.string,
|
|
336
328
|
/**
|
|
337
329
|
* Specify whether your StructuredListCell should be used as a header cell
|
|
338
330
|
*/
|
|
339
|
-
head:
|
|
331
|
+
head: PropTypes.bool,
|
|
340
332
|
/**
|
|
341
333
|
* Specify whether your StructuredListCell should have text wrapping
|
|
342
334
|
*/
|
|
343
|
-
noWrap:
|
|
335
|
+
noWrap: PropTypes.bool
|
|
344
336
|
};
|
|
345
337
|
|
|
346
338
|
exports.StructuredListBody = StructuredListBody;
|
|
@@ -16,14 +16,8 @@ var cx = require('classnames');
|
|
|
16
16
|
var index = require('../IconButton/index.js');
|
|
17
17
|
var usePrefix = require('../../internal/usePrefix.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 noopFn = () => {};
|
|
26
|
-
const IconSwitch = /*#__PURE__*/
|
|
20
|
+
const IconSwitch = /*#__PURE__*/React.forwardRef(function Switch(props, tabRef) {
|
|
27
21
|
const {
|
|
28
22
|
align,
|
|
29
23
|
children,
|
|
@@ -65,10 +59,10 @@ const IconSwitch = /*#__PURE__*/React__default["default"].forwardRef(function Sw
|
|
|
65
59
|
const handleMouseLeave = () => {
|
|
66
60
|
setIsHovered(false);
|
|
67
61
|
};
|
|
68
|
-
const classes =
|
|
62
|
+
const classes = cx(className, `${prefix}--content-switcher-btn`, {
|
|
69
63
|
[`${prefix}--content-switcher--selected`]: selected
|
|
70
64
|
});
|
|
71
|
-
const iconButtonClasses =
|
|
65
|
+
const iconButtonClasses = cx(`${prefix}--content-switcher-popover__wrapper`, {
|
|
72
66
|
[`${prefix}--content-switcher-popover--selected`]: selected,
|
|
73
67
|
[`${prefix}--content-switcher-popover--disabled`]: disabled
|
|
74
68
|
});
|
|
@@ -82,7 +76,7 @@ const IconSwitch = /*#__PURE__*/React__default["default"].forwardRef(function Sw
|
|
|
82
76
|
leaveDelayMs,
|
|
83
77
|
size
|
|
84
78
|
};
|
|
85
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/React.createElement(index.IconButton, _rollupPluginBabelHelpers.extends({
|
|
86
80
|
label: text,
|
|
87
81
|
type: "button",
|
|
88
82
|
ref: tabRef,
|
|
@@ -102,59 +96,58 @@ IconSwitch.propTypes = {
|
|
|
102
96
|
/**
|
|
103
97
|
* Specify how the trigger should align with the tooltip
|
|
104
98
|
*/
|
|
105
|
-
align:
|
|
99
|
+
align: PropTypes.oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'right']),
|
|
106
100
|
/**
|
|
107
101
|
* Provide child elements to be rendered inside of the Switch
|
|
108
102
|
*/
|
|
109
|
-
children:
|
|
103
|
+
children: PropTypes.node,
|
|
110
104
|
/**
|
|
111
105
|
* Specify an optional className to be added to your Switch
|
|
112
106
|
*/
|
|
113
|
-
className:
|
|
107
|
+
className: PropTypes.string,
|
|
114
108
|
/**
|
|
115
109
|
* Specify whether or not the Switch should be disabled
|
|
116
110
|
*/
|
|
117
|
-
disabled:
|
|
111
|
+
disabled: PropTypes.bool,
|
|
118
112
|
/**
|
|
119
113
|
* Specify the duration in milliseconds to delay before displaying the tooltip
|
|
120
114
|
*/
|
|
121
|
-
enterDelayMs:
|
|
115
|
+
enterDelayMs: PropTypes.number,
|
|
122
116
|
/**
|
|
123
117
|
* The index of your Switch in your ContentSwitcher that is used for event handlers.
|
|
124
118
|
* Reserved for usage in ContentSwitcher
|
|
125
119
|
*/
|
|
126
|
-
index:
|
|
120
|
+
index: PropTypes.number,
|
|
127
121
|
/**
|
|
128
122
|
* Specify the duration in milliseconds to delay before hiding the tooltip
|
|
129
123
|
*/
|
|
130
|
-
leaveDelayMs:
|
|
124
|
+
leaveDelayMs: PropTypes.number,
|
|
131
125
|
/**
|
|
132
126
|
* Provide the name of your Switch that is used for event handlers
|
|
133
127
|
*/
|
|
134
|
-
name:
|
|
128
|
+
name: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
135
129
|
/**
|
|
136
130
|
* A handler that is invoked when a user clicks on the control.
|
|
137
131
|
* Reserved for usage in ContentSwitcher
|
|
138
132
|
*/
|
|
139
|
-
onClick:
|
|
133
|
+
onClick: PropTypes.func,
|
|
140
134
|
/**
|
|
141
135
|
* A handler that is invoked on the key down event for the control.
|
|
142
136
|
* Reserved for usage in ContentSwitcher
|
|
143
137
|
*/
|
|
144
|
-
onKeyDown:
|
|
138
|
+
onKeyDown: PropTypes.func,
|
|
145
139
|
/**
|
|
146
140
|
* Whether your Switch is selected. Reserved for usage in ContentSwitcher
|
|
147
141
|
*/
|
|
148
|
-
selected:
|
|
142
|
+
selected: PropTypes.bool,
|
|
149
143
|
/**
|
|
150
144
|
* Passed in from `ContentSwitcher` to render icon-only variant
|
|
151
145
|
*/
|
|
152
|
-
size:
|
|
146
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
153
147
|
/**
|
|
154
148
|
* Provide the visible text displayed by the Tooltip
|
|
155
149
|
*/
|
|
156
|
-
text:
|
|
150
|
+
text: PropTypes.string
|
|
157
151
|
};
|
|
158
|
-
var IconSwitch$1 = IconSwitch;
|
|
159
152
|
|
|
160
|
-
exports
|
|
153
|
+
exports.default = IconSwitch;
|