@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
|
@@ -19,12 +19,6 @@ var useId = require('../../internal/useId.js');
|
|
|
19
19
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
20
20
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
21
21
|
|
|
22
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
|
-
|
|
24
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
25
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
27
|
-
|
|
28
22
|
const TableSelectRow = ({
|
|
29
23
|
ariaLabel: deprecatedAriaLabel,
|
|
30
24
|
['aria-label']: ariaLabel,
|
|
@@ -54,20 +48,20 @@ const TableSelectRow = ({
|
|
|
54
48
|
disabled
|
|
55
49
|
};
|
|
56
50
|
const labelValue = ariaLabel || deprecatedAriaLabel || '';
|
|
57
|
-
const tableSelectRowClasses =
|
|
51
|
+
const tableSelectRowClasses = cx(`${prefix}--table-column-checkbox`, {
|
|
58
52
|
...(className && {
|
|
59
53
|
[className]: true
|
|
60
54
|
}),
|
|
61
55
|
[`${prefix}--table-column-radio`]: radio
|
|
62
56
|
});
|
|
63
|
-
return /*#__PURE__*/
|
|
57
|
+
return /*#__PURE__*/React.createElement("td", {
|
|
64
58
|
className: tableSelectRowClasses,
|
|
65
59
|
"aria-live": "off"
|
|
66
|
-
}, radio ? /*#__PURE__*/
|
|
60
|
+
}, radio ? /*#__PURE__*/React.createElement(RadioButton.default, _rollupPluginBabelHelpers.extends({}, selectionInputProps, {
|
|
67
61
|
labelText: labelValue,
|
|
68
62
|
onChange: handleRadioChange,
|
|
69
63
|
hideLabel: true
|
|
70
|
-
})) : /*#__PURE__*/
|
|
64
|
+
})) : /*#__PURE__*/React.createElement(InlineCheckbox.default, _rollupPluginBabelHelpers.extends({}, selectionInputProps, {
|
|
71
65
|
"aria-label": labelValue,
|
|
72
66
|
onChange: handleCheckboxChange
|
|
73
67
|
})));
|
|
@@ -76,44 +70,44 @@ TableSelectRow.propTypes = {
|
|
|
76
70
|
/**
|
|
77
71
|
* Specify the aria label for the underlying input control
|
|
78
72
|
*/
|
|
79
|
-
['aria-label']:
|
|
73
|
+
['aria-label']: PropTypes.string,
|
|
80
74
|
/**
|
|
81
75
|
* Deprecated, please use `aria-label` instead.
|
|
82
76
|
* Specify the aria label for the underlying input control
|
|
83
77
|
*/
|
|
84
|
-
ariaLabel: deprecate.deprecate(
|
|
78
|
+
ariaLabel: deprecate.deprecate(PropTypes.string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
85
79
|
/**
|
|
86
80
|
* Specify whether this row is selected, or not
|
|
87
81
|
*/
|
|
88
|
-
checked:
|
|
82
|
+
checked: PropTypes.bool,
|
|
89
83
|
/**
|
|
90
84
|
* The CSS class names of the cell that wraps the underlying input control
|
|
91
85
|
*/
|
|
92
|
-
className:
|
|
86
|
+
className: PropTypes.string,
|
|
93
87
|
/**
|
|
94
88
|
* Specify whether the control is disabled
|
|
95
89
|
*/
|
|
96
|
-
disabled:
|
|
90
|
+
disabled: PropTypes.bool,
|
|
97
91
|
/**
|
|
98
92
|
* Provide an `id` for the underlying input control
|
|
99
93
|
*/
|
|
100
|
-
id:
|
|
94
|
+
id: PropTypes.string.isRequired,
|
|
101
95
|
/**
|
|
102
96
|
* Provide a `name` for the underlying input control
|
|
103
97
|
*/
|
|
104
|
-
name:
|
|
98
|
+
name: PropTypes.string.isRequired,
|
|
105
99
|
/**
|
|
106
100
|
* Provide an optional hook that is called each time the input is updated
|
|
107
101
|
*/
|
|
108
|
-
onChange:
|
|
102
|
+
onChange: PropTypes.func,
|
|
109
103
|
/**
|
|
110
104
|
* Provide a handler to listen to when a user initiates a selection request
|
|
111
105
|
*/
|
|
112
|
-
onSelect:
|
|
106
|
+
onSelect: PropTypes.func.isRequired,
|
|
113
107
|
/**
|
|
114
108
|
* Specify whether the control should be a radio button or inline checkbox
|
|
115
109
|
*/
|
|
116
|
-
radio:
|
|
110
|
+
radio: PropTypes.bool
|
|
117
111
|
};
|
|
118
112
|
|
|
119
|
-
exports
|
|
113
|
+
exports.default = TableSelectRow;
|
|
@@ -15,21 +15,15 @@ var cx = require('classnames');
|
|
|
15
15
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
16
16
|
var deprecateComponent = require('../../prop-types/deprecateComponent.js');
|
|
17
17
|
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
|
|
24
18
|
const TableSlugRow = ({
|
|
25
19
|
className,
|
|
26
20
|
slug
|
|
27
21
|
}) => {
|
|
28
22
|
React.useEffect(() => {
|
|
29
|
-
deprecateComponent
|
|
23
|
+
deprecateComponent.default('TableSlugRow', 'The `TableSlugRow` component has been deprecated and will be removed in the next major version. Use the TableDecoratorRow component instead.');
|
|
30
24
|
}, []);
|
|
31
25
|
const prefix = usePrefix.usePrefix();
|
|
32
|
-
const TableSlugRowClasses =
|
|
26
|
+
const TableSlugRowClasses = cx({
|
|
33
27
|
...(className && {
|
|
34
28
|
[className]: true
|
|
35
29
|
}),
|
|
@@ -40,11 +34,11 @@ const TableSlugRow = ({
|
|
|
40
34
|
// Slug is always size `mini`
|
|
41
35
|
let normalizedSlug;
|
|
42
36
|
if (slug) {
|
|
43
|
-
normalizedSlug = /*#__PURE__*/
|
|
37
|
+
normalizedSlug = /*#__PURE__*/React.cloneElement(slug, {
|
|
44
38
|
size: 'mini'
|
|
45
39
|
});
|
|
46
40
|
}
|
|
47
|
-
return /*#__PURE__*/
|
|
41
|
+
return /*#__PURE__*/React.createElement("td", {
|
|
48
42
|
className: TableSlugRowClasses
|
|
49
43
|
}, normalizedSlug);
|
|
50
44
|
};
|
|
@@ -53,11 +47,11 @@ TableSlugRow.propTypes = {
|
|
|
53
47
|
/**
|
|
54
48
|
* The CSS class names of the cell that wraps the underlying input control
|
|
55
49
|
*/
|
|
56
|
-
className:
|
|
50
|
+
className: PropTypes.string,
|
|
57
51
|
/**
|
|
58
52
|
* Provide a `Slug` component to be rendered inside the `TableSlugRow` component
|
|
59
53
|
*/
|
|
60
|
-
slug:
|
|
54
|
+
slug: PropTypes.node
|
|
61
55
|
};
|
|
62
56
|
|
|
63
|
-
exports
|
|
57
|
+
exports.default = TableSlugRow;
|
|
@@ -16,12 +16,6 @@ var React = require('react');
|
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
18
18
|
|
|
19
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
|
-
|
|
21
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
22
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
23
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
|
-
|
|
25
19
|
const TableToolbar = ({
|
|
26
20
|
['aria-label']: ariaLabel = 'data table toolbar',
|
|
27
21
|
ariaLabel: deprecatedAriaLabel,
|
|
@@ -30,11 +24,11 @@ const TableToolbar = ({
|
|
|
30
24
|
...rest
|
|
31
25
|
}) => {
|
|
32
26
|
const prefix = usePrefix.usePrefix();
|
|
33
|
-
const className =
|
|
27
|
+
const className = cx({
|
|
34
28
|
[`${prefix}--table-toolbar`]: true,
|
|
35
29
|
[`${prefix}--table-toolbar--${size}`]: size
|
|
36
30
|
});
|
|
37
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/React.createElement("section", _rollupPluginBabelHelpers.extends({
|
|
38
32
|
"aria-label": deprecatedAriaLabel || ariaLabel
|
|
39
33
|
}, rest, {
|
|
40
34
|
className: className
|
|
@@ -45,21 +39,21 @@ TableToolbar.propTypes = {
|
|
|
45
39
|
* 'aria-label' of the TableToolbar component.
|
|
46
40
|
* Specify a label to be read by screen readers on the container node
|
|
47
41
|
*/
|
|
48
|
-
['aria-label']:
|
|
42
|
+
['aria-label']: PropTypes.string,
|
|
49
43
|
/**
|
|
50
44
|
* Deprecated, please use `aria-label` instead.
|
|
51
45
|
* Specify a label to be read by screen readers on the container node.
|
|
52
46
|
* 'aria-label' of the TableToolbar component.
|
|
53
47
|
*/
|
|
54
|
-
ariaLabel: deprecate.deprecate(
|
|
48
|
+
ariaLabel: deprecate.deprecate(PropTypes.string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
55
49
|
/**
|
|
56
50
|
* Pass in the children that will be rendered inside the TableToolbar
|
|
57
51
|
*/
|
|
58
|
-
children:
|
|
52
|
+
children: PropTypes.node,
|
|
59
53
|
/**
|
|
60
54
|
* `lg` Change the row height of table
|
|
61
55
|
*/
|
|
62
|
-
size:
|
|
56
|
+
size: PropTypes.oneOf(['sm', 'lg'])
|
|
63
57
|
};
|
|
64
58
|
|
|
65
|
-
exports
|
|
59
|
+
exports.default = TableToolbar;
|
|
@@ -14,27 +14,22 @@ var PropTypes = require('prop-types');
|
|
|
14
14
|
var React = require('react');
|
|
15
15
|
var OverflowMenuItem = require('../OverflowMenuItem/OverflowMenuItem.js');
|
|
16
16
|
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
20
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
|
|
22
17
|
const frFn = React.forwardRef;
|
|
23
18
|
const TableToolbarAction = frFn((props, ref) => {
|
|
24
19
|
const {
|
|
25
20
|
children,
|
|
26
21
|
...rest
|
|
27
22
|
} = props;
|
|
28
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/React.createElement(OverflowMenuItem.default, _rollupPluginBabelHelpers.extends({
|
|
29
24
|
ref: ref,
|
|
30
25
|
itemText: children
|
|
31
26
|
}, rest));
|
|
32
27
|
});
|
|
33
28
|
TableToolbarAction.displayName = 'TableToolbarAction';
|
|
34
29
|
TableToolbarAction.propTypes = {
|
|
35
|
-
children:
|
|
36
|
-
className:
|
|
37
|
-
onClick:
|
|
30
|
+
children: PropTypes.node,
|
|
31
|
+
className: PropTypes.string,
|
|
32
|
+
onClick: PropTypes.func.isRequired
|
|
38
33
|
};
|
|
39
34
|
|
|
40
|
-
exports
|
|
35
|
+
exports.default = TableToolbarAction;
|
|
@@ -11,10 +11,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
11
11
|
|
|
12
12
|
var wrapComponent = require('../../tools/wrapComponent.js');
|
|
13
13
|
|
|
14
|
-
const TableToolbarContent = wrapComponent
|
|
14
|
+
const TableToolbarContent = wrapComponent.default({
|
|
15
15
|
name: 'TableToolbarContent',
|
|
16
16
|
type: 'div',
|
|
17
17
|
className: prefix => `${prefix}--toolbar-content`
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
exports
|
|
20
|
+
exports.default = TableToolbarContent;
|
|
@@ -17,12 +17,6 @@ var React = require('react');
|
|
|
17
17
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
18
18
|
var index = require('../OverflowMenu/index.js');
|
|
19
19
|
|
|
20
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
|
-
|
|
22
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
24
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
|
-
|
|
26
20
|
const defaultIconDescription = 'Settings';
|
|
27
21
|
const TableToolbarMenu = ({
|
|
28
22
|
className,
|
|
@@ -33,9 +27,9 @@ const TableToolbarMenu = ({
|
|
|
33
27
|
...rest
|
|
34
28
|
}) => {
|
|
35
29
|
const prefix = usePrefix.usePrefix();
|
|
36
|
-
const toolbarActionClasses =
|
|
37
|
-
const menuOptionsClasses =
|
|
38
|
-
return /*#__PURE__*/
|
|
30
|
+
const toolbarActionClasses = cx(className, `${prefix}--toolbar-action ${prefix}--overflow-menu`);
|
|
31
|
+
const menuOptionsClasses = cx(menuOptionsClass, `${prefix}--toolbar-action__menu`);
|
|
32
|
+
return /*#__PURE__*/React.createElement(index.default, _rollupPluginBabelHelpers.extends({
|
|
39
33
|
renderIcon: renderIcon,
|
|
40
34
|
className: toolbarActionClasses,
|
|
41
35
|
title: iconDescription,
|
|
@@ -45,23 +39,23 @@ const TableToolbarMenu = ({
|
|
|
45
39
|
}, rest), children);
|
|
46
40
|
};
|
|
47
41
|
TableToolbarMenu.propTypes = {
|
|
48
|
-
children:
|
|
42
|
+
children: PropTypes.node.isRequired,
|
|
49
43
|
/**
|
|
50
44
|
* Provide an optional class name for the toolbar menu
|
|
51
45
|
*/
|
|
52
|
-
className:
|
|
46
|
+
className: PropTypes.string,
|
|
53
47
|
/**
|
|
54
48
|
* The description of the menu icon.
|
|
55
49
|
*/
|
|
56
|
-
iconDescription:
|
|
50
|
+
iconDescription: PropTypes.string,
|
|
57
51
|
/**
|
|
58
52
|
* Provide an optional class name for the toolbar menu
|
|
59
53
|
*/
|
|
60
|
-
menuOptionsClass:
|
|
54
|
+
menuOptionsClass: PropTypes.string,
|
|
61
55
|
/**
|
|
62
56
|
* A component used to render an icon.
|
|
63
57
|
*/
|
|
64
|
-
renderIcon:
|
|
58
|
+
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
65
59
|
};
|
|
66
60
|
|
|
67
|
-
exports
|
|
61
|
+
exports.default = TableToolbarMenu;
|
|
@@ -19,12 +19,6 @@ var useId = require('../../internal/useId.js');
|
|
|
19
19
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
20
20
|
var noopFn = require('../../internal/noopFn.js');
|
|
21
21
|
|
|
22
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
|
-
|
|
24
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
25
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
26
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
27
|
-
|
|
28
22
|
/**
|
|
29
23
|
* Message ids that will be passed to translateWithId().
|
|
30
24
|
*/
|
|
@@ -79,7 +73,7 @@ const TableToolbarSearch = ({
|
|
|
79
73
|
},
|
|
80
74
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
75
|
[]);
|
|
82
|
-
const searchClasses =
|
|
76
|
+
const searchClasses = cx(className, {
|
|
83
77
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
84
78
|
[searchContainerClass]: searchContainerClass,
|
|
85
79
|
[`${prefix}--toolbar-search-container-active`]: expanded,
|
|
@@ -105,7 +99,7 @@ const TableToolbarSearch = ({
|
|
|
105
99
|
};
|
|
106
100
|
const handleOnFocus = event => handleExpand(event, true);
|
|
107
101
|
const handleOnBlur = event => !value && handleExpand(event, false);
|
|
108
|
-
return /*#__PURE__*/
|
|
102
|
+
return /*#__PURE__*/React.createElement(Search.default, _rollupPluginBabelHelpers.extends({
|
|
109
103
|
disabled: disabled,
|
|
110
104
|
className: searchClasses,
|
|
111
105
|
value: value,
|
|
@@ -124,83 +118,83 @@ const TableToolbarSearch = ({
|
|
|
124
118
|
}, rest));
|
|
125
119
|
};
|
|
126
120
|
TableToolbarSearch.propTypes = {
|
|
127
|
-
children:
|
|
121
|
+
children: PropTypes.node,
|
|
128
122
|
/**
|
|
129
123
|
* Provide an optional class name for the search container
|
|
130
124
|
*/
|
|
131
|
-
className:
|
|
125
|
+
className: PropTypes.string,
|
|
132
126
|
/**
|
|
133
127
|
* Specifies if the search should initially render in an expanded state
|
|
134
128
|
*/
|
|
135
|
-
defaultExpanded:
|
|
129
|
+
defaultExpanded: PropTypes.bool,
|
|
136
130
|
/**
|
|
137
131
|
* Provide an optional default value for the Search component
|
|
138
132
|
*/
|
|
139
|
-
defaultValue:
|
|
133
|
+
defaultValue: PropTypes.string,
|
|
140
134
|
/**
|
|
141
135
|
* Specifies if the search should be disabled
|
|
142
136
|
*/
|
|
143
|
-
disabled:
|
|
137
|
+
disabled: PropTypes.bool,
|
|
144
138
|
/**
|
|
145
139
|
* Specifies if the search should expand
|
|
146
140
|
*/
|
|
147
|
-
expanded:
|
|
141
|
+
expanded: PropTypes.bool,
|
|
148
142
|
/**
|
|
149
143
|
* Provide an optional id for the search container
|
|
150
144
|
*/
|
|
151
|
-
id:
|
|
145
|
+
id: PropTypes.string,
|
|
152
146
|
/**
|
|
153
147
|
* Provide an optional label text for the Search component icon
|
|
154
148
|
*/
|
|
155
|
-
labelText:
|
|
149
|
+
labelText: PropTypes.string,
|
|
156
150
|
/**
|
|
157
151
|
* Provide an optional function to be called when the search input loses focus, this will be
|
|
158
152
|
* passed the event as the first parameter and a function to handle the expanding of the search
|
|
159
153
|
* input as the second
|
|
160
154
|
*/
|
|
161
|
-
onBlur:
|
|
155
|
+
onBlur: PropTypes.func,
|
|
162
156
|
/**
|
|
163
157
|
* Provide an optional hook that is called each time the input is updated
|
|
164
158
|
*/
|
|
165
|
-
onChange:
|
|
159
|
+
onChange: PropTypes.func,
|
|
166
160
|
/**
|
|
167
161
|
* Optional callback called when the search value is cleared.
|
|
168
162
|
*/
|
|
169
|
-
onClear:
|
|
163
|
+
onClear: PropTypes.func,
|
|
170
164
|
/**
|
|
171
165
|
* Provide an optional hook that is called each time the input is expanded
|
|
172
166
|
*/
|
|
173
|
-
onExpand:
|
|
167
|
+
onExpand: PropTypes.func,
|
|
174
168
|
/**
|
|
175
169
|
* Provide an optional function to be called when the search input gains focus, this will be
|
|
176
170
|
* passed the event as the first parameter and a function to handle the expanding of the search
|
|
177
171
|
* input as the second.
|
|
178
172
|
*/
|
|
179
|
-
onFocus:
|
|
173
|
+
onFocus: PropTypes.func,
|
|
180
174
|
/**
|
|
181
175
|
* Whether the search should be allowed to expand
|
|
182
176
|
*/
|
|
183
|
-
persistent:
|
|
177
|
+
persistent: PropTypes.bool,
|
|
184
178
|
/**
|
|
185
179
|
* Provide an optional placeholder text for the Search component
|
|
186
180
|
*/
|
|
187
|
-
placeholder:
|
|
181
|
+
placeholder: PropTypes.string,
|
|
188
182
|
/**
|
|
189
183
|
* Provide an optional className for the overall container of the Search
|
|
190
184
|
*/
|
|
191
|
-
searchContainerClass:
|
|
185
|
+
searchContainerClass: PropTypes.string,
|
|
192
186
|
/**
|
|
193
187
|
* Specify the size of the Search
|
|
194
188
|
*/
|
|
195
|
-
size:
|
|
189
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
196
190
|
/**
|
|
197
191
|
* Optional prop to specify the tabIndex of the <Search> (in expanded state) or the container (in collapsed state)
|
|
198
192
|
*/
|
|
199
|
-
tabIndex:
|
|
193
|
+
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
200
194
|
/**
|
|
201
195
|
* Provide custom text for the component for each translation id
|
|
202
196
|
*/
|
|
203
|
-
translateWithId:
|
|
197
|
+
translateWithId: PropTypes.func
|
|
204
198
|
};
|
|
205
199
|
|
|
206
|
-
exports
|
|
200
|
+
exports.default = TableToolbarSearch;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default getDerivedStateFromProps;
|
|
2
|
+
/**
|
|
3
|
+
* Helper to derive the next state from the given props and the
|
|
4
|
+
* prevState. Potential future-facing API hook for React v17.
|
|
5
|
+
*
|
|
6
|
+
* Currently, it's being used as a way to normalize the incoming data that we
|
|
7
|
+
* are receiving for rows
|
|
8
|
+
*/
|
|
9
|
+
declare function getDerivedStateFromProps(props: any, prevState: any): {
|
|
10
|
+
rowIds: any;
|
|
11
|
+
rowsById: any;
|
|
12
|
+
cellsById: any;
|
|
13
|
+
sortDirection: any;
|
|
14
|
+
sortHeaderKey: any;
|
|
15
|
+
initialRowOrder: any;
|
|
16
|
+
filterInputValue: any;
|
|
17
|
+
shouldShowBatchActions: any;
|
|
18
|
+
isExpandedAll: boolean;
|
|
19
|
+
};
|
|
@@ -24,7 +24,7 @@ const getDerivedStateFromProps = (props, prevState) => {
|
|
|
24
24
|
rowIds,
|
|
25
25
|
rowsById,
|
|
26
26
|
cellsById
|
|
27
|
-
} = normalize
|
|
27
|
+
} = normalize.default(props.rows, props.headers, prevState);
|
|
28
28
|
const state = {
|
|
29
29
|
rowIds,
|
|
30
30
|
rowsById,
|
|
@@ -54,6 +54,5 @@ const getDerivedStateFromProps = (props, prevState) => {
|
|
|
54
54
|
});
|
|
55
55
|
return state;
|
|
56
56
|
};
|
|
57
|
-
var getDerivedStateFromProps$1 = getDerivedStateFromProps;
|
|
58
57
|
|
|
59
|
-
exports
|
|
58
|
+
exports.default = getDerivedStateFromProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { sortStates };
|
|
2
|
+
export const initialSortState: import("./sortStates").DataTableSortState;
|
|
3
|
+
export function getNextSortDirection(prevHeader: string, header: string, prevState: string): string;
|
|
4
|
+
export function getNextSortState(props: any, state: any, { key }: {
|
|
5
|
+
key: any;
|
|
6
|
+
}): any;
|
|
7
|
+
export function getSortedState(props: {
|
|
8
|
+
locale: string;
|
|
9
|
+
sortRows: Function;
|
|
10
|
+
}, state: {
|
|
11
|
+
rowIds: Array<string>;
|
|
12
|
+
cellsById: object;
|
|
13
|
+
initialRowOrder: Array<string>;
|
|
14
|
+
}, key: string, sortDirection: string): object;
|
|
15
|
+
import { sortStates } from './sortStates';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default denormalize;
|
|
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
|
+
* Counterpart to `normalize` for a collection of rows. This method unravels the
|
|
10
|
+
* normalization step that we use to build the given parameters in order to
|
|
11
|
+
* return a natural interface to working with rows for a consumer.
|
|
12
|
+
*
|
|
13
|
+
* The default heuristic here is to map through all the row ids and return the
|
|
14
|
+
* value of the row for the given id, in addition to adding a `cells` key that
|
|
15
|
+
* contains the results of mapping over the rows cells and getting individual
|
|
16
|
+
* cell info.
|
|
17
|
+
*
|
|
18
|
+
* @param {Array<string>} rowIds array of row ids in the table
|
|
19
|
+
* @param {object} rowsById object containing lookups for rows by id
|
|
20
|
+
* @param {object} cellsById object containing lookups for cells by id
|
|
21
|
+
*/
|
|
22
|
+
declare function denormalize(rowIds: Array<string>, rowsById: object, cellsById: object): any[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default normalize;
|
|
2
|
+
/**
|
|
3
|
+
* Normalize a collection of rows with the given headers.
|
|
4
|
+
*
|
|
5
|
+
* @param {Array<object>} rows
|
|
6
|
+
* @param {Array<object>} headers
|
|
7
|
+
* @returns {object}
|
|
8
|
+
*/
|
|
9
|
+
declare function normalize(rows: Array<object>, headers: Array<object>, prevState?: {}): object;
|