@carbon/react 1.109.0 → 1.110.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 +964 -964
- package/es/components/AILabel/index.js +1 -1
- package/es/components/AISkeleton/AISkeletonIcon.js +1 -1
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +1 -1
- package/es/components/AISkeleton/AISkeletonText.js +1 -1
- package/es/components/Accordion/Accordion.Skeleton.js +1 -1
- package/es/components/Accordion/Accordion.js +1 -1
- package/es/components/Accordion/AccordionItem.js +1 -1
- package/es/components/AspectRatio/AspectRatio.js +1 -1
- package/es/components/BadgeIndicator/index.js +1 -1
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +1 -1
- package/es/components/Breadcrumb/Breadcrumb.js +1 -1
- package/es/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/es/components/Button/Button.Skeleton.js +1 -1
- package/es/components/Button/ButtonBase.js +1 -1
- package/es/components/ButtonSet/ButtonSet.js +1 -1
- package/es/components/ChatButton/ChatButton.Skeleton.js +1 -1
- package/es/components/ChatButton/ChatButton.js +1 -1
- package/es/components/Checkbox/Checkbox.Skeleton.js +1 -1
- package/es/components/Checkbox/Checkbox.js +2 -2
- package/es/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +1 -1
- package/es/components/CodeSnippet/CodeSnippet.js +1 -1
- package/es/components/ComboBox/ComboBox.d.ts +1 -1
- package/es/components/ComboBox/ComboBox.js +1 -1
- package/es/components/ComboButton/index.js +1 -1
- package/es/components/ComposedModal/ComposedModal.js +2 -2
- package/es/components/ComposedModal/ModalFooter.js +2 -2
- package/es/components/ComposedModal/ModalHeader.js +1 -1
- package/es/components/ContainedList/ContainedList.js +1 -1
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +1 -1
- package/es/components/Copy/Copy.js +2 -2
- package/es/components/CopyButton/CopyButton.js +2 -2
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/TableBatchActions.js +1 -1
- package/es/components/DataTable/TableCell.js +1 -1
- package/es/components/DataTable/TableContainer.js +1 -1
- package/es/components/DataTable/TableDecoratorRow.js +1 -1
- package/es/components/DataTable/TableExpandHeader.js +1 -1
- package/es/components/DataTable/TableExpandRow.js +1 -1
- package/es/components/DataTable/TableExpandedRow.js +1 -1
- package/es/components/DataTable/TableHeader.js +1 -1
- package/es/components/DataTable/TableRow.js +1 -1
- package/es/components/DataTable/TableSelectAll.js +1 -1
- package/es/components/DataTable/TableSelectRow.js +1 -1
- package/es/components/DataTable/TableSlugRow.js +1 -1
- package/es/components/DataTable/TableToolbar.js +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +1 -1
- package/es/components/DataTable/TableToolbarSearch.js +2 -2
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +1 -1
- package/es/components/DatePicker/DatePicker.Skeleton.js +1 -1
- package/es/components/DatePicker/DatePicker.js +1 -1
- package/es/components/DatePickerInput/DatePickerInput.js +2 -2
- package/es/components/Dialog/Dialog.js +2 -2
- package/es/components/Dropdown/Dropdown.Skeleton.d.ts +1 -1
- package/es/components/Dropdown/Dropdown.Skeleton.js +1 -1
- package/es/components/Dropdown/Dropdown.d.ts +1 -1
- package/es/components/Dropdown/Dropdown.js +1 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +1 -1
- package/es/components/FileUploader/FileUploader.Skeleton.js +1 -1
- package/es/components/FileUploader/FileUploader.js +1 -1
- package/es/components/FileUploader/FileUploaderButton.js +2 -2
- package/es/components/FileUploader/FileUploaderDropContainer.js +2 -2
- package/es/components/FileUploader/FileUploaderItem.js +2 -2
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +1 -1
- package/es/components/FluidComboBox/FluidComboBox.js +1 -1
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +1 -1
- package/es/components/FluidDatePicker/FluidDatePicker.js +1 -1
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +1 -1
- package/es/components/FluidDropdown/FluidDropdown.js +1 -1
- package/es/components/FluidForm/FluidForm.js +1 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +1 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +1 -1
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +1 -1
- package/es/components/FluidNumberInput/FluidNumberInput.js +1 -1
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +1 -1
- package/es/components/FluidSearch/FluidSearch.js +1 -1
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +1 -1
- package/es/components/FluidSelect/FluidSelect.js +1 -1
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +1 -1
- package/es/components/FluidTextArea/FluidTextArea.js +1 -1
- package/es/components/FluidTextInput/FluidPasswordInput.js +1 -1
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +1 -1
- package/es/components/FluidTextInput/FluidTextInput.js +1 -1
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +1 -1
- package/es/components/FluidTimePicker/FluidTimePicker.js +1 -1
- package/es/components/Form/Form.js +1 -1
- package/es/components/FormGroup/FormGroup.js +1 -1
- package/es/components/FormItem/FormItem.js +1 -1
- package/es/components/FormLabel/FormLabel.js +1 -1
- package/es/components/Grid/CSSGrid.js +1 -1
- package/es/components/Grid/Column.js +1 -1
- package/es/components/Grid/ColumnHang.js +1 -1
- package/es/components/Grid/FlexGrid.js +1 -1
- package/es/components/Grid/Row.js +1 -1
- package/es/components/Icon/Icon.Skeleton.js +1 -1
- package/es/components/IconButton/index.js +1 -1
- package/es/components/IconIndicator/index.js +1 -1
- package/es/components/InlineLoading/InlineLoading.js +1 -1
- package/es/components/Layer/index.js +1 -1
- package/es/components/Layout/index.js +1 -1
- package/es/components/Link/Link.js +3 -2
- package/es/components/ListBox/ListBox.d.ts +2 -2
- package/es/components/ListBox/ListBox.js +3 -2
- package/es/components/ListBox/ListBoxMenuIcon.js +1 -1
- package/es/components/ListBox/ListBoxMenuItem.js +1 -1
- package/es/components/ListBox/ListBoxPropTypes.d.ts +3 -3
- package/es/components/ListBox/ListBoxPropTypes.js +2 -1
- package/es/components/ListBox/ListBoxSelection.js +1 -1
- package/es/components/ListBox/next/ListBoxSelection.js +1 -1
- package/es/components/ListBox/next/ListBoxTrigger.js +1 -1
- package/es/components/ListItem/ListItem.js +1 -1
- package/es/components/Loading/Loading.js +1 -1
- package/es/components/Menu/Menu.js +1 -1
- package/es/components/Menu/MenuContext.d.ts +11 -12
- package/es/components/Menu/MenuItem.js +1 -1
- package/es/components/MenuButton/index.js +1 -1
- package/es/components/Modal/Modal.js +3 -3
- package/es/components/ModalWrapper/ModalWrapper.js +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +1 -1
- package/es/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/es/components/MultiSelect/MultiSelect.js +2 -2
- package/es/components/Notification/Notification.js +3 -3
- package/es/components/NumberInput/NumberInput.Skeleton.js +1 -1
- package/es/components/NumberInput/NumberInput.js +1 -1
- package/es/components/OrderedList/OrderedList.js +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +2 -2
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
- package/es/components/PageHeader/PageHeader.js +1 -1
- package/es/components/Pagination/Pagination.Skeleton.js +1 -1
- package/es/components/Pagination/Pagination.js +1 -1
- package/es/components/Pagination/experimental/PageSelector.js +1 -1
- package/es/components/Pagination/experimental/Pagination.js +1 -1
- package/es/components/PaginationNav/PaginationNav.js +1 -1
- package/es/components/Popover/index.js +1 -1
- package/es/components/ProgressBar/ProgressBar.js +1 -1
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +1 -1
- package/es/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/es/components/RadioButton/RadioButton.Skeleton.js +1 -1
- package/es/components/RadioButton/RadioButton.js +1 -1
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es/components/RadioTile/RadioTile.js +2 -2
- package/es/components/Search/Search.Skeleton.js +1 -1
- package/es/components/Search/Search.js +2 -2
- package/es/components/Select/Select.Skeleton.js +1 -1
- package/es/components/Select/Select.js +1 -1
- package/es/components/SelectItem/SelectItem.js +1 -1
- package/es/components/SelectItemGroup/SelectItemGroup.js +1 -1
- package/es/components/ShapeIndicator/index.js +1 -1
- package/es/components/SkeletonIcon/SkeletonIcon.js +1 -1
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -1
- package/es/components/SkeletonText/SkeletonText.js +1 -1
- package/es/components/Slider/Slider.Skeleton.js +1 -1
- package/es/components/Slider/Slider.d.ts +2 -2
- package/es/components/Slider/Slider.js +29 -36
- package/es/components/Stack/Stack.js +1 -1
- package/es/components/StructuredList/StructuredList.Skeleton.js +1 -1
- package/es/components/StructuredList/StructuredList.js +1 -1
- package/es/components/Switch/IconSwitch.js +2 -2
- package/es/components/Switch/Switch.js +2 -2
- package/es/components/TabContent/TabContent.js +1 -1
- package/es/components/Tabs/Tabs.Skeleton.js +1 -1
- package/es/components/Tabs/Tabs.d.ts +19 -1
- package/es/components/Tabs/Tabs.js +18 -6
- package/es/components/Tag/DismissibleTag.js +1 -1
- package/es/components/Tag/OperationalTag.js +1 -1
- package/es/components/Tag/SelectableTag.js +1 -1
- package/es/components/Tag/Tag.Skeleton.js +1 -1
- package/es/components/Tag/Tag.js +1 -1
- package/es/components/TextArea/TextArea.Skeleton.js +1 -1
- package/es/components/TextArea/TextArea.js +2 -2
- package/es/components/TextInput/ControlledPasswordInput.js +2 -2
- package/es/components/TextInput/PasswordInput.js +1 -1
- package/es/components/TextInput/TextInput.Skeleton.js +1 -1
- package/es/components/TextInput/TextInput.js +1 -1
- package/es/components/Theme/index.js +1 -1
- package/es/components/Tile/Tile.js +1 -1
- package/es/components/TileGroup/TileGroup.js +1 -1
- package/es/components/TimePicker/TimePicker.js +1 -1
- package/es/components/TimePickerSelect/TimePickerSelect.js +1 -1
- package/es/components/Toggle/Toggle.Skeleton.js +1 -1
- package/es/components/Toggle/Toggle.js +1 -1
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +1 -1
- package/es/components/Toggletip/index.js +1 -1
- package/es/components/Tooltip/DefinitionTooltip.js +1 -1
- package/es/components/Tooltip/Tooltip.js +1 -1
- package/es/components/TreeView/TreeNode.js +1 -1
- package/es/components/TreeView/TreeView.js +1 -1
- package/es/components/UIShell/Content.js +1 -1
- package/es/components/UIShell/Header.js +1 -1
- package/es/components/UIShell/HeaderGlobalAction.js +1 -1
- package/es/components/UIShell/HeaderMenu.js +1 -1
- package/es/components/UIShell/HeaderMenuButton.js +1 -1
- package/es/components/UIShell/HeaderMenuItem.js +1 -1
- package/es/components/UIShell/HeaderName.js +1 -1
- package/es/components/UIShell/HeaderNavigation.js +1 -1
- package/es/components/UIShell/HeaderPanel.js +2 -2
- package/es/components/UIShell/HeaderSideNavItems.js +1 -1
- package/es/components/UIShell/SideNav.js +1 -1
- package/es/components/UIShell/SideNavDetails.js +1 -1
- package/es/components/UIShell/SideNavDivider.js +1 -1
- package/es/components/UIShell/SideNavFooter.js +1 -1
- package/es/components/UIShell/SideNavHeader.js +1 -1
- package/es/components/UIShell/SideNavIcon.js +1 -1
- package/es/components/UIShell/SideNavItem.js +1 -1
- package/es/components/UIShell/SideNavItems.js +1 -1
- package/es/components/UIShell/SideNavLink.js +1 -1
- package/es/components/UIShell/SideNavLinkText.js +1 -1
- package/es/components/UIShell/SideNavMenu.js +1 -1
- package/es/components/UIShell/SideNavMenuItem.js +1 -1
- package/es/components/UIShell/SideNavSwitcher.js +1 -1
- package/es/components/UIShell/SkipToContent.js +1 -1
- package/es/components/UIShell/Switcher.js +1 -1
- package/es/components/UIShell/SwitcherDivider.js +1 -1
- package/es/components/UIShell/SwitcherItem.js +1 -1
- package/es/components/UnorderedList/UnorderedList.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/internal/FloatingMenu.js +1 -1
- package/es/internal/warnAboutDeprecatedReactVersion.d.ts +7 -0
- package/es/tools/wrapComponent.js +1 -1
- package/lib/components/AILabel/index.js +2 -2
- package/lib/components/AISkeleton/AISkeletonIcon.js +2 -2
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +2 -2
- package/lib/components/AISkeleton/AISkeletonText.js +2 -2
- package/lib/components/Accordion/Accordion.Skeleton.js +2 -2
- package/lib/components/Accordion/Accordion.js +2 -2
- package/lib/components/Accordion/AccordionItem.js +2 -2
- package/lib/components/AspectRatio/AspectRatio.js +2 -2
- package/lib/components/BadgeIndicator/index.js +2 -2
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +2 -2
- package/lib/components/Breadcrumb/Breadcrumb.js +2 -2
- package/lib/components/Breadcrumb/BreadcrumbItem.js +2 -2
- package/lib/components/Button/Button.Skeleton.js +2 -2
- package/lib/components/Button/ButtonBase.js +2 -2
- package/lib/components/ButtonSet/ButtonSet.js +2 -2
- package/lib/components/ChatButton/ChatButton.Skeleton.js +2 -2
- package/lib/components/ChatButton/ChatButton.js +2 -2
- package/lib/components/Checkbox/Checkbox.Skeleton.js +2 -2
- package/lib/components/Checkbox/Checkbox.js +3 -3
- package/lib/components/CheckboxGroup/CheckboxGroup.js +2 -2
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +2 -2
- package/lib/components/CodeSnippet/CodeSnippet.js +2 -2
- package/lib/components/ComboBox/ComboBox.d.ts +1 -1
- package/lib/components/ComboBox/ComboBox.js +2 -2
- package/lib/components/ComboButton/index.js +2 -2
- package/lib/components/ComposedModal/ComposedModal.js +3 -3
- package/lib/components/ComposedModal/ModalFooter.js +3 -3
- package/lib/components/ComposedModal/ModalHeader.js +2 -2
- package/lib/components/ContainedList/ContainedList.js +2 -2
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +2 -2
- package/lib/components/ContentSwitcher/ContentSwitcher.js +2 -2
- package/lib/components/Copy/Copy.js +3 -3
- package/lib/components/CopyButton/CopyButton.js +3 -3
- package/lib/components/DataTable/Table.js +2 -2
- package/lib/components/DataTable/TableBatchActions.js +2 -2
- package/lib/components/DataTable/TableCell.js +2 -2
- package/lib/components/DataTable/TableContainer.js +2 -2
- package/lib/components/DataTable/TableDecoratorRow.js +2 -2
- package/lib/components/DataTable/TableExpandHeader.js +2 -2
- package/lib/components/DataTable/TableExpandRow.js +2 -2
- package/lib/components/DataTable/TableExpandedRow.js +2 -2
- package/lib/components/DataTable/TableHeader.js +2 -2
- package/lib/components/DataTable/TableRow.js +2 -2
- package/lib/components/DataTable/TableSelectAll.js +2 -2
- package/lib/components/DataTable/TableSelectRow.js +2 -2
- package/lib/components/DataTable/TableSlugRow.js +2 -2
- package/lib/components/DataTable/TableToolbar.js +2 -2
- package/lib/components/DataTable/TableToolbarMenu.js +2 -2
- package/lib/components/DataTable/TableToolbarSearch.js +3 -3
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +2 -2
- package/lib/components/DatePicker/DatePicker.Skeleton.js +2 -2
- package/lib/components/DatePicker/DatePicker.js +2 -2
- package/lib/components/DatePickerInput/DatePickerInput.js +3 -3
- package/lib/components/Dialog/Dialog.js +3 -3
- package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.Skeleton.js +2 -2
- package/lib/components/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.js +2 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +2 -2
- package/lib/components/FileUploader/FileUploader.Skeleton.js +2 -2
- package/lib/components/FileUploader/FileUploader.js +2 -2
- package/lib/components/FileUploader/FileUploaderButton.js +3 -3
- package/lib/components/FileUploader/FileUploaderDropContainer.js +3 -3
- package/lib/components/FileUploader/FileUploaderItem.js +3 -3
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +2 -2
- package/lib/components/FluidComboBox/FluidComboBox.js +2 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +2 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.js +2 -2
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +2 -2
- package/lib/components/FluidDropdown/FluidDropdown.js +2 -2
- package/lib/components/FluidForm/FluidForm.js +2 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +2 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +2 -2
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +2 -2
- package/lib/components/FluidNumberInput/FluidNumberInput.js +2 -2
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +2 -2
- package/lib/components/FluidSearch/FluidSearch.js +2 -2
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +2 -2
- package/lib/components/FluidSelect/FluidSelect.js +2 -2
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +2 -2
- package/lib/components/FluidTextArea/FluidTextArea.js +2 -2
- package/lib/components/FluidTextInput/FluidPasswordInput.js +2 -2
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +2 -2
- package/lib/components/FluidTextInput/FluidTextInput.js +2 -2
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +2 -2
- package/lib/components/FluidTimePicker/FluidTimePicker.js +2 -2
- package/lib/components/Form/Form.js +2 -2
- package/lib/components/FormGroup/FormGroup.js +2 -2
- package/lib/components/FormItem/FormItem.js +2 -2
- package/lib/components/FormLabel/FormLabel.js +2 -2
- package/lib/components/Grid/CSSGrid.js +2 -2
- package/lib/components/Grid/Column.js +2 -2
- package/lib/components/Grid/ColumnHang.js +2 -2
- package/lib/components/Grid/FlexGrid.js +2 -2
- package/lib/components/Grid/Row.js +2 -2
- package/lib/components/Icon/Icon.Skeleton.js +2 -2
- package/lib/components/IconButton/index.js +2 -2
- package/lib/components/IconIndicator/index.js +2 -2
- package/lib/components/InlineLoading/InlineLoading.js +2 -2
- package/lib/components/Layer/index.js +2 -2
- package/lib/components/Layout/index.js +2 -2
- package/lib/components/Link/Link.js +4 -3
- package/lib/components/ListBox/ListBox.d.ts +2 -2
- package/lib/components/ListBox/ListBox.js +4 -3
- package/lib/components/ListBox/ListBoxMenuIcon.js +2 -2
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -2
- package/lib/components/ListBox/ListBoxPropTypes.d.ts +3 -3
- package/lib/components/ListBox/ListBoxPropTypes.js +2 -1
- package/lib/components/ListBox/ListBoxSelection.js +2 -2
- package/lib/components/ListBox/next/ListBoxSelection.js +2 -2
- package/lib/components/ListBox/next/ListBoxTrigger.js +2 -2
- package/lib/components/ListItem/ListItem.js +2 -2
- package/lib/components/Loading/Loading.js +2 -2
- package/lib/components/Menu/Menu.js +2 -2
- package/lib/components/Menu/MenuContext.d.ts +11 -12
- package/lib/components/Menu/MenuItem.js +2 -2
- package/lib/components/MenuButton/index.js +2 -2
- package/lib/components/Modal/Modal.js +4 -4
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +2 -2
- package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/lib/components/MultiSelect/MultiSelect.js +3 -3
- package/lib/components/Notification/Notification.js +4 -4
- package/lib/components/NumberInput/NumberInput.Skeleton.js +2 -2
- package/lib/components/NumberInput/NumberInput.js +2 -2
- package/lib/components/OrderedList/OrderedList.js +2 -2
- package/lib/components/OverflowMenu/OverflowMenu.js +3 -3
- package/lib/components/OverflowMenu/next/index.js +2 -2
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +3 -3
- package/lib/components/PageHeader/PageHeader.js +2 -2
- package/lib/components/Pagination/Pagination.Skeleton.js +2 -2
- package/lib/components/Pagination/Pagination.js +2 -2
- package/lib/components/Pagination/experimental/PageSelector.js +2 -2
- package/lib/components/Pagination/experimental/Pagination.js +2 -2
- package/lib/components/PaginationNav/PaginationNav.js +2 -2
- package/lib/components/Popover/index.js +2 -2
- package/lib/components/ProgressBar/ProgressBar.js +2 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +2 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -2
- package/lib/components/RadioButton/RadioButton.Skeleton.js +2 -2
- package/lib/components/RadioButton/RadioButton.js +2 -2
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +2 -2
- package/lib/components/RadioTile/RadioTile.js +3 -3
- package/lib/components/Search/Search.Skeleton.js +2 -2
- package/lib/components/Search/Search.js +3 -3
- package/lib/components/Select/Select.Skeleton.js +2 -2
- package/lib/components/Select/Select.js +2 -2
- package/lib/components/SelectItem/SelectItem.js +2 -2
- package/lib/components/SelectItemGroup/SelectItemGroup.js +2 -2
- package/lib/components/ShapeIndicator/index.js +2 -2
- package/lib/components/SkeletonIcon/SkeletonIcon.js +2 -2
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +2 -2
- package/lib/components/SkeletonText/SkeletonText.js +2 -2
- package/lib/components/Slider/Slider.Skeleton.js +2 -2
- package/lib/components/Slider/Slider.d.ts +2 -2
- package/lib/components/Slider/Slider.js +30 -37
- package/lib/components/Stack/Stack.js +2 -2
- package/lib/components/StructuredList/StructuredList.Skeleton.js +2 -2
- package/lib/components/StructuredList/StructuredList.js +2 -2
- package/lib/components/Switch/IconSwitch.js +3 -3
- package/lib/components/Switch/Switch.js +3 -3
- package/lib/components/TabContent/TabContent.js +2 -2
- package/lib/components/Tabs/Tabs.Skeleton.js +2 -2
- package/lib/components/Tabs/Tabs.d.ts +19 -1
- package/lib/components/Tabs/Tabs.js +19 -7
- package/lib/components/Tag/DismissibleTag.js +2 -2
- package/lib/components/Tag/OperationalTag.js +2 -2
- package/lib/components/Tag/SelectableTag.js +2 -2
- package/lib/components/Tag/Tag.Skeleton.js +2 -2
- package/lib/components/Tag/Tag.js +2 -2
- package/lib/components/TextArea/TextArea.Skeleton.js +2 -2
- package/lib/components/TextArea/TextArea.js +3 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +3 -3
- package/lib/components/TextInput/PasswordInput.js +2 -2
- package/lib/components/TextInput/TextInput.Skeleton.js +2 -2
- package/lib/components/TextInput/TextInput.js +2 -2
- package/lib/components/Theme/index.js +2 -2
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/TileGroup/TileGroup.js +1 -1
- package/lib/components/TimePicker/TimePicker.js +2 -2
- package/lib/components/TimePickerSelect/TimePickerSelect.js +2 -2
- package/lib/components/Toggle/Toggle.Skeleton.js +2 -2
- package/lib/components/Toggle/Toggle.js +2 -2
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +2 -2
- package/lib/components/Toggletip/index.js +2 -2
- package/lib/components/Tooltip/DefinitionTooltip.js +2 -2
- package/lib/components/Tooltip/Tooltip.js +2 -2
- package/lib/components/TreeView/TreeNode.js +2 -2
- package/lib/components/TreeView/TreeView.js +2 -2
- package/lib/components/UIShell/Content.js +2 -2
- package/lib/components/UIShell/Header.js +2 -2
- package/lib/components/UIShell/HeaderGlobalAction.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +2 -2
- package/lib/components/UIShell/HeaderMenuButton.js +2 -2
- package/lib/components/UIShell/HeaderMenuItem.js +2 -2
- package/lib/components/UIShell/HeaderName.js +2 -2
- package/lib/components/UIShell/HeaderNavigation.js +2 -2
- package/lib/components/UIShell/HeaderPanel.js +3 -3
- package/lib/components/UIShell/HeaderSideNavItems.js +2 -2
- package/lib/components/UIShell/SideNav.js +2 -2
- package/lib/components/UIShell/SideNavDetails.js +2 -2
- package/lib/components/UIShell/SideNavDivider.js +2 -2
- package/lib/components/UIShell/SideNavFooter.js +2 -2
- package/lib/components/UIShell/SideNavHeader.js +2 -2
- package/lib/components/UIShell/SideNavIcon.js +2 -2
- package/lib/components/UIShell/SideNavItem.js +2 -2
- package/lib/components/UIShell/SideNavItems.js +2 -2
- package/lib/components/UIShell/SideNavLink.js +2 -2
- package/lib/components/UIShell/SideNavLinkText.js +2 -2
- package/lib/components/UIShell/SideNavMenu.js +2 -2
- package/lib/components/UIShell/SideNavMenuItem.js +2 -2
- package/lib/components/UIShell/SideNavSwitcher.js +2 -2
- package/lib/components/UIShell/SkipToContent.js +2 -2
- package/lib/components/UIShell/Switcher.js +2 -2
- package/lib/components/UIShell/SwitcherDivider.js +2 -2
- package/lib/components/UIShell/SwitcherItem.js +2 -2
- package/lib/components/UnorderedList/UnorderedList.js +2 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/internal/FloatingMenu.js +1 -1
- package/lib/internal/warnAboutDeprecatedReactVersion.d.ts +7 -0
- package/lib/tools/wrapComponent.js +2 -2
- package/package.json +4 -4
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { noopFn } from "../../internal/noopFn.js";
|
|
8
9
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
10
|
import { Enter, Escape, Space } from "../../internal/keyboard/keys.js";
|
|
10
11
|
import { match } from "../../internal/keyboard/match.js";
|
|
11
12
|
import { useId } from "../../internal/useId.js";
|
|
12
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
13
13
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
14
14
|
import { useMergedRefs } from "../../internal/useMergedRefs.js";
|
|
15
15
|
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
16
16
|
import { composeEventHandlers } from "../../tools/events.js";
|
|
17
17
|
import { FormContext } from "../FluidForm/FormContext.js";
|
|
18
18
|
import { isSearchValuePresent } from "./utils.js";
|
|
19
|
-
import classNames from "classnames";
|
|
20
19
|
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
20
|
+
import classNames from "classnames";
|
|
21
21
|
import PropTypes from "prop-types";
|
|
22
22
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
23
|
import { Close, Search } from "@carbon/icons-react";
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/Select/Select.Skeleton.tsx
|
|
@@ -14,8 +14,8 @@ import { useNormalizedInputProps } from "../../internal/useNormalizedInputProps.
|
|
|
14
14
|
import { AILabel } from "../AILabel/index.js";
|
|
15
15
|
import { composeEventHandlers } from "../../tools/events.js";
|
|
16
16
|
import { FormContext } from "../FluidForm/FormContext.js";
|
|
17
|
-
import classNames from "classnames";
|
|
18
17
|
import React, { cloneElement, forwardRef, useContext, useState } from "react";
|
|
18
|
+
import classNames from "classnames";
|
|
19
19
|
import PropTypes from "prop-types";
|
|
20
20
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
21
|
import { ChevronDown, WarningAltFilled, WarningFilled } from "@carbon/icons-react";
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/SelectItem/SelectItem.tsx
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/SelectItemGroup/SelectItemGroup.tsx
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import React from "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Caution, CircleFill, CircleStroke, Critical, CriticalSeverity, DiamondFill, LowSeverity } from "@carbon/icons-react";
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/SkeletonIcon/SkeletonIcon.tsx
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/SkeletonPlaceholder/SkeletonPlaceholder.tsx
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import useIsomorphicEffect from "../../internal/useIsomorphicEffect.js";
|
|
10
|
-
import classNames from "classnames";
|
|
11
10
|
import { useRef } from "react";
|
|
11
|
+
import classNames from "classnames";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/SkeletonText/SkeletonText.tsx
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import useIsomorphicEffect from "../../internal/useIsomorphicEffect.js";
|
|
10
10
|
import { LowerHandle, UpperHandle } from "./SliderHandles.js";
|
|
11
|
-
import classNames from "classnames";
|
|
12
11
|
import { useState } from "react";
|
|
12
|
+
import classNames from "classnames";
|
|
13
13
|
import PropTypes from "prop-types";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
//#region src/components/Slider/Slider.Skeleton.tsx
|
|
@@ -153,11 +153,11 @@ export interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
153
153
|
*/
|
|
154
154
|
unstable_valueUpper?: number;
|
|
155
155
|
/**
|
|
156
|
-
* Specify whether the
|
|
156
|
+
* Specify whether the Slider is in a warning state.
|
|
157
157
|
*/
|
|
158
158
|
warn?: boolean;
|
|
159
159
|
/**
|
|
160
|
-
* Provide the text
|
|
160
|
+
* Provide the text displayed when the Slider is in a warning state.
|
|
161
161
|
*/
|
|
162
162
|
warnText?: ReactNode;
|
|
163
163
|
}
|
|
@@ -15,8 +15,8 @@ import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
|
15
15
|
import { useNormalizedInputProps } from "../../internal/useNormalizedInputProps.js";
|
|
16
16
|
import { clamp } from "../../internal/clamp.js";
|
|
17
17
|
import { LowerHandle, LowerHandleFocus, UpperHandle, UpperHandleFocus } from "./SliderHandles.js";
|
|
18
|
-
import classNames from "classnames";
|
|
19
18
|
import { useEffect, useMemo, useReducer, useRef } from "react";
|
|
19
|
+
import classNames from "classnames";
|
|
20
20
|
import PropTypes from "prop-types";
|
|
21
21
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { WarningAltFilled, WarningFilled } from "@carbon/icons-react";
|
|
@@ -59,6 +59,8 @@ const calcRawLeftPercent = ({ max, min, value }) => {
|
|
|
59
59
|
};
|
|
60
60
|
/**
|
|
61
61
|
* Minimum time between processed "drag" events in milliseconds.
|
|
62
|
+
*
|
|
63
|
+
* A value of `16` limits updates to at most ~60 per second.
|
|
62
64
|
*/
|
|
63
65
|
const EVENT_THROTTLE = 16;
|
|
64
66
|
const DRAG_EVENT_TYPES = new Set(["mousemove", "touchmove"]);
|
|
@@ -96,6 +98,7 @@ const Slider = (props) => {
|
|
|
96
98
|
const generatedId = useId();
|
|
97
99
|
const prefix = usePrefix();
|
|
98
100
|
const twoHandles = hasUpperValue(state.valueUpper);
|
|
101
|
+
const getOwnerDocument = () => elementRef.current?.ownerDocument;
|
|
99
102
|
/**
|
|
100
103
|
* Sets up initial slider position and value in response to component mount.
|
|
101
104
|
*/
|
|
@@ -131,8 +134,9 @@ const Slider = (props) => {
|
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
return () => {
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
const ownerDocument = getOwnerDocument();
|
|
138
|
+
DRAG_STOP_EVENT_TYPES.forEach((type) => ownerDocument?.removeEventListener(type, onDragStop));
|
|
139
|
+
DRAG_EVENT_TYPES.forEach((type) => ownerDocument?.removeEventListener(type, handleDrag));
|
|
136
140
|
};
|
|
137
141
|
}, []);
|
|
138
142
|
useEffect(() => {
|
|
@@ -236,11 +240,12 @@ const Slider = (props) => {
|
|
|
236
240
|
const onDragStart = (evt) => {
|
|
237
241
|
if (disabled || readOnly) return;
|
|
238
242
|
evt.preventDefault();
|
|
239
|
-
|
|
240
|
-
|
|
243
|
+
const ownerDocument = getOwnerDocument();
|
|
244
|
+
DRAG_STOP_EVENT_TYPES.forEach((type) => {
|
|
245
|
+
ownerDocument?.addEventListener(type, onDragStop);
|
|
241
246
|
});
|
|
242
|
-
DRAG_EVENT_TYPES.forEach((
|
|
243
|
-
|
|
247
|
+
DRAG_EVENT_TYPES.forEach((type) => {
|
|
248
|
+
ownerDocument?.addEventListener(type, handleDrag);
|
|
244
249
|
});
|
|
245
250
|
const clientX = getClientXFromEvent(evt.nativeEvent);
|
|
246
251
|
let activeHandle;
|
|
@@ -264,11 +269,12 @@ const Slider = (props) => {
|
|
|
264
269
|
*/
|
|
265
270
|
const onDragStop = () => {
|
|
266
271
|
if (disabled || readOnly) return;
|
|
267
|
-
|
|
268
|
-
|
|
272
|
+
const ownerDocument = getOwnerDocument();
|
|
273
|
+
DRAG_STOP_EVENT_TYPES.forEach((type) => {
|
|
274
|
+
ownerDocument?.removeEventListener(type, onDragStop);
|
|
269
275
|
});
|
|
270
|
-
DRAG_EVENT_TYPES.forEach((
|
|
271
|
-
|
|
276
|
+
DRAG_EVENT_TYPES.forEach((type) => {
|
|
277
|
+
ownerDocument?.removeEventListener(type, handleDrag);
|
|
272
278
|
});
|
|
273
279
|
setState({ needsOnRelease: true });
|
|
274
280
|
};
|
|
@@ -284,8 +290,8 @@ const Slider = (props) => {
|
|
|
284
290
|
* @param activeHandle The first drag event call, we may have an explicit
|
|
285
291
|
* activeHandle value, which is to be used before state is used.
|
|
286
292
|
*/
|
|
287
|
-
const
|
|
288
|
-
|
|
293
|
+
const onDragRef = useRef(null);
|
|
294
|
+
onDragRef.current = (evt, activeHandle) => {
|
|
289
295
|
activeHandle = activeHandle ?? stateRef.current.activeHandle;
|
|
290
296
|
if (disabled || readOnly) return;
|
|
291
297
|
const { value, left } = calcValue({
|
|
@@ -307,11 +313,11 @@ const Slider = (props) => {
|
|
|
307
313
|
});
|
|
308
314
|
};
|
|
309
315
|
/**
|
|
310
|
-
* Throttles
|
|
311
|
-
*
|
|
316
|
+
* Throttles drag event handling to at most once every `EVENT_THROTTLE`
|
|
317
|
+
* milliseconds.
|
|
312
318
|
*/
|
|
313
319
|
const onDrag = useMemo(() => throttle((evt, activeHandle) => {
|
|
314
|
-
|
|
320
|
+
onDragRef.current?.(evt, activeHandle);
|
|
315
321
|
}, EVENT_THROTTLE, {
|
|
316
322
|
leading: true,
|
|
317
323
|
trailing: false
|
|
@@ -402,11 +408,7 @@ const Slider = (props) => {
|
|
|
402
408
|
value: targetValue,
|
|
403
409
|
min,
|
|
404
410
|
max
|
|
405
|
-
}) :
|
|
406
|
-
value: targetValue,
|
|
407
|
-
min,
|
|
408
|
-
max
|
|
409
|
-
});
|
|
411
|
+
}) : clamp(targetValue, min, max);
|
|
410
412
|
if (adjustedValue !== targetValue) setState({
|
|
411
413
|
correctedValue: targetValue.toString(),
|
|
412
414
|
correctedPosition: handlePosition ?? null
|
|
@@ -430,7 +432,7 @@ const Slider = (props) => {
|
|
|
430
432
|
}
|
|
431
433
|
};
|
|
432
434
|
const calcLeftPercent = ({ clientX, value }) => {
|
|
433
|
-
const boundingRect = elementRef.current?.getBoundingClientRect
|
|
435
|
+
const boundingRect = elementRef.current?.getBoundingClientRect();
|
|
434
436
|
let width = boundingRect ? boundingRect.right - boundingRect.left : 0;
|
|
435
437
|
const nextValue = value ?? min;
|
|
436
438
|
if (width <= 0) width = 1;
|
|
@@ -492,7 +494,7 @@ const Slider = (props) => {
|
|
|
492
494
|
*/
|
|
493
495
|
const calcValueForDelta = (currentValue, delta, step = 1) => {
|
|
494
496
|
const newValue = (delta > 0 ? Math.round(currentValue / step) * step : currentValue) + delta;
|
|
495
|
-
const decimals = (step.toString().split(".")[1]
|
|
497
|
+
const decimals = (step.toString().split(".")[1] ?? "").length;
|
|
496
498
|
return Number(newValue.toFixed(decimals));
|
|
497
499
|
};
|
|
498
500
|
/**
|
|
@@ -538,19 +540,10 @@ const Slider = (props) => {
|
|
|
538
540
|
};
|
|
539
541
|
const getAdjustedValueForPosition = ({ handle, value: newValueInput, min, max }) => {
|
|
540
542
|
const { value, valueUpper } = state;
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
});
|
|
546
|
-
if (handle === "lower" && valueUpper) newValue = newValue > valueUpper ? valueUpper : newValue;
|
|
547
|
-
else if (handle === "upper" && value) newValue = newValue < value ? value : newValue;
|
|
548
|
-
return newValue;
|
|
549
|
-
};
|
|
550
|
-
const getAdjustedValue = ({ value, min, max }) => {
|
|
551
|
-
if (value < min) value = min;
|
|
552
|
-
if (value > max) value = max;
|
|
553
|
-
return value;
|
|
543
|
+
const nextValue = clamp(newValueInput, min, max);
|
|
544
|
+
if (handle === "lower" && hasUpperValue(valueUpper)) return Math.min(nextValue, valueUpper);
|
|
545
|
+
if (handle === "upper") return Math.max(nextValue, value);
|
|
546
|
+
return nextValue;
|
|
554
547
|
};
|
|
555
548
|
/**
|
|
556
549
|
* Get the bounding rect for the requested handles' DOM element.
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import { forwardRef } from "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
import { spacing } from "@carbon/layout";
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/StructuredList/StructuredList.Skeleton.tsx
|
|
@@ -10,8 +10,8 @@ import { Text } from "../Text/Text.js";
|
|
|
10
10
|
import { useId } from "../../internal/useId.js";
|
|
11
11
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
12
12
|
import { useOutsideClick } from "../../internal/useOutsideClick.js";
|
|
13
|
-
import classNames from "classnames";
|
|
14
13
|
import React, { useRef, useState } from "react";
|
|
14
|
+
import classNames from "classnames";
|
|
15
15
|
import PropTypes from "prop-types";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { RadioButton, RadioButtonChecked } from "@carbon/icons-react";
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
8
|
import { noopFn } from "../../internal/noopFn.js";
|
|
9
|
+
import { usePrefix } from "../../internal/usePrefix.js";
|
|
10
10
|
import { IconButton } from "../IconButton/index.js";
|
|
11
|
-
import classNames from "classnames";
|
|
12
11
|
import { forwardRef, useState } from "react";
|
|
12
|
+
import classNames from "classnames";
|
|
13
13
|
import PropTypes from "prop-types";
|
|
14
14
|
import { jsx } from "react/jsx-runtime";
|
|
15
15
|
//#region src/components/Switch/IconSwitch.tsx
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
8
|
import { noopFn } from "../../internal/noopFn.js";
|
|
10
|
-
import
|
|
9
|
+
import { usePrefix } from "../../internal/usePrefix.js";
|
|
11
10
|
import React from "react";
|
|
11
|
+
import classNames from "classnames";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/Switch/Switch.tsx
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/TabContent/TabContent.tsx
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/Tabs/Tabs.Skeleton.tsx
|
|
@@ -194,6 +194,9 @@ export interface TabListProps extends DivAttributes {
|
|
|
194
194
|
scrollIntoView?: boolean;
|
|
195
195
|
/**
|
|
196
196
|
* Specify the size of the tabs.
|
|
197
|
+
*
|
|
198
|
+
* Supports `sm` and `md` for line tabs.
|
|
199
|
+
* Supports `sm`, `md`, and `lg` for contained tabs.
|
|
197
200
|
*/
|
|
198
201
|
size?: 'sm' | 'md' | 'lg';
|
|
199
202
|
}
|
|
@@ -254,6 +257,13 @@ declare namespace TabList {
|
|
|
254
257
|
* to newly selected tabs on component rerender
|
|
255
258
|
*/
|
|
256
259
|
scrollIntoView: PropTypes.Requireable<boolean>;
|
|
260
|
+
/**
|
|
261
|
+
* Specify the size of the tabs.
|
|
262
|
+
*
|
|
263
|
+
* Supports `sm` and `md` for line tabs.
|
|
264
|
+
* Supports `sm`, `md`, and `lg` for contained tabs.
|
|
265
|
+
*/
|
|
266
|
+
size: PropTypes.Requireable<string>;
|
|
257
267
|
};
|
|
258
268
|
}
|
|
259
269
|
/**
|
|
@@ -284,8 +294,12 @@ export interface TabListVerticalProps extends DivAttributes {
|
|
|
284
294
|
* on component rerender
|
|
285
295
|
*/
|
|
286
296
|
scrollIntoView?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Specify the size of the tabs.
|
|
299
|
+
*/
|
|
300
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
287
301
|
}
|
|
288
|
-
declare function TabListVertical({ activation, 'aria-label': label, children, className: customClassName, scrollIntoView, ...rest }: TabListVerticalProps): import("react/jsx-runtime").JSX.Element;
|
|
302
|
+
declare function TabListVertical({ activation, 'aria-label': label, children, className: customClassName, scrollIntoView, size, ...rest }: TabListVerticalProps): import("react/jsx-runtime").JSX.Element;
|
|
289
303
|
declare namespace TabListVertical {
|
|
290
304
|
var propTypes: {
|
|
291
305
|
/**
|
|
@@ -307,6 +321,10 @@ declare namespace TabListVertical {
|
|
|
307
321
|
* Specify an optional className to be added to the container node
|
|
308
322
|
*/
|
|
309
323
|
className: PropTypes.Requireable<string>;
|
|
324
|
+
/**
|
|
325
|
+
* Specify the size of the tabs.
|
|
326
|
+
*/
|
|
327
|
+
size: PropTypes.Requireable<string>;
|
|
310
328
|
};
|
|
311
329
|
}
|
|
312
330
|
/**
|
|
@@ -21,8 +21,8 @@ import { useControllableState } from "../../internal/useControllableState.js";
|
|
|
21
21
|
import { GridAsGridComponent } from "../Grid/Grid.js";
|
|
22
22
|
import { useMatchMedia } from "../../internal/useMatchMedia.js";
|
|
23
23
|
import { usePressable } from "./usePressable.js";
|
|
24
|
-
import classNames from "classnames";
|
|
25
24
|
import React, { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
25
|
+
import classNames from "classnames";
|
|
26
26
|
import PropTypes from "prop-types";
|
|
27
27
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
28
28
|
import { ChevronLeft, ChevronRight, Close } from "@carbon/icons-react";
|
|
@@ -161,7 +161,7 @@ function TabList({ activation = "automatic", "aria-label": label, children, clas
|
|
|
161
161
|
[`${prefix}--tabs__icon--default`]: iconSize === "default",
|
|
162
162
|
[`${prefix}--tabs__icon--lg`]: iconSize === "lg",
|
|
163
163
|
[`${prefix}--layout--size-lg`]: iconSize === "lg",
|
|
164
|
-
[`${prefix}--layout--size-${size}`]: size &&
|
|
164
|
+
[`${prefix}--layout--size-${size}`]: size && !hasSecondaryLabelTabs && (contained || size === "sm" || size === "md"),
|
|
165
165
|
[`${prefix}--tabs--tall`]: hasSecondaryLabelTabs,
|
|
166
166
|
[`${prefix}--tabs--full-width`]: distributeWidth,
|
|
167
167
|
[`${prefix}--tabs--dismissable`]: dismissable
|
|
@@ -342,16 +342,21 @@ TabList.propTypes = {
|
|
|
342
342
|
light: deprecate(PropTypes.bool, "The `light` prop for `TabList` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),
|
|
343
343
|
rightOverflowButtonProps: PropTypes.object,
|
|
344
344
|
scrollDebounceWait: PropTypes.number,
|
|
345
|
-
scrollIntoView: PropTypes.bool
|
|
345
|
+
scrollIntoView: PropTypes.bool,
|
|
346
|
+
size: PropTypes.oneOf([
|
|
347
|
+
"sm",
|
|
348
|
+
"md",
|
|
349
|
+
"lg"
|
|
350
|
+
])
|
|
346
351
|
};
|
|
347
|
-
function TabListVertical({ activation = "automatic", "aria-label": label, children, className: customClassName, scrollIntoView, ...rest }) {
|
|
352
|
+
function TabListVertical({ activation = "automatic", "aria-label": label, children, className: customClassName, scrollIntoView, size, ...rest }) {
|
|
348
353
|
const { activeIndex, selectedIndex, setSelectedIndex, setActiveIndex } = React.useContext(TabsContext);
|
|
349
354
|
const prefix = usePrefix();
|
|
350
355
|
const ref = useRef(null);
|
|
351
356
|
const [isOverflowingBottom, setIsOverflowingBottom] = useState(false);
|
|
352
357
|
const [isOverflowingTop, setIsOverflowingTop] = useState(false);
|
|
353
358
|
const isSm = useMatchMedia(smMediaQuery);
|
|
354
|
-
const className = classNames(`${prefix}--tabs`, `${prefix}--tabs--vertical`, `${prefix}--tabs--contained`, customClassName);
|
|
359
|
+
const className = classNames(`${prefix}--tabs`, `${prefix}--tabs--vertical`, `${prefix}--tabs--contained`, { [`${prefix}--layout--size-${size}`]: size }, customClassName);
|
|
355
360
|
const tabs = useRef([]);
|
|
356
361
|
function onKeyDown(event) {
|
|
357
362
|
if (matches(event, [
|
|
@@ -423,6 +428,7 @@ function TabListVertical({ activation = "automatic", "aria-label": label, childr
|
|
|
423
428
|
...rest,
|
|
424
429
|
"aria-label": label,
|
|
425
430
|
contained: true,
|
|
431
|
+
size: size === "xl" ? "lg" : size,
|
|
426
432
|
children
|
|
427
433
|
});
|
|
428
434
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -458,7 +464,13 @@ TabListVertical.propTypes = {
|
|
|
458
464
|
activation: PropTypes.oneOf(["automatic", "manual"]),
|
|
459
465
|
"aria-label": PropTypes.string,
|
|
460
466
|
children: PropTypes.node,
|
|
461
|
-
className: PropTypes.string
|
|
467
|
+
className: PropTypes.string,
|
|
468
|
+
size: PropTypes.oneOf([
|
|
469
|
+
"sm",
|
|
470
|
+
"md",
|
|
471
|
+
"lg",
|
|
472
|
+
"xl"
|
|
473
|
+
])
|
|
462
474
|
};
|
|
463
475
|
/**
|
|
464
476
|
* Helper function to set up the behavior when a button is "long pressed".
|
|
@@ -16,8 +16,8 @@ import { AILabel } from "../AILabel/index.js";
|
|
|
16
16
|
import { mergeRefs } from "../../tools/mergeRefs.js";
|
|
17
17
|
import { isEllipsisActive } from "./isEllipsisActive.js";
|
|
18
18
|
import Tag, { SIZES, TYPES } from "./Tag.js";
|
|
19
|
-
import classNames from "classnames";
|
|
20
19
|
import { cloneElement, forwardRef, useRef, useState } from "react";
|
|
20
|
+
import classNames from "classnames";
|
|
21
21
|
import PropTypes from "prop-types";
|
|
22
22
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
23
|
import { Close } from "@carbon/icons-react";
|
|
@@ -13,8 +13,8 @@ import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
|
13
13
|
import { mergeRefs } from "../../tools/mergeRefs.js";
|
|
14
14
|
import { isEllipsisActive } from "./isEllipsisActive.js";
|
|
15
15
|
import Tag, { SIZES } from "./Tag.js";
|
|
16
|
-
import classNames from "classnames";
|
|
17
16
|
import { forwardRef, useRef, useState } from "react";
|
|
17
|
+
import classNames from "classnames";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import { jsx } from "react/jsx-runtime";
|
|
20
20
|
//#region src/components/Tag/OperationalTag.tsx
|
|
@@ -14,8 +14,8 @@ import { mergeRefs } from "../../tools/mergeRefs.js";
|
|
|
14
14
|
import { useControllableState } from "../../internal/useControllableState.js";
|
|
15
15
|
import { isEllipsisActive } from "./isEllipsisActive.js";
|
|
16
16
|
import Tag, { SIZES } from "./Tag.js";
|
|
17
|
-
import classNames from "classnames";
|
|
18
17
|
import { forwardRef, useRef, useState } from "react";
|
|
18
|
+
import classNames from "classnames";
|
|
19
19
|
import PropTypes from "prop-types";
|
|
20
20
|
import { jsx } from "react/jsx-runtime";
|
|
21
21
|
//#region src/components/Tag/SelectableTag.tsx
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/Tag/Tag.Skeleton.tsx
|
package/es/components/Tag/Tag.js
CHANGED
|
@@ -15,8 +15,8 @@ import { useMergedRefs } from "../../internal/useMergedRefs.js";
|
|
|
15
15
|
import { DefinitionTooltip } from "../Tooltip/DefinitionTooltip.js";
|
|
16
16
|
import { AILabel } from "../AILabel/index.js";
|
|
17
17
|
import { isEllipsisActive } from "./isEllipsisActive.js";
|
|
18
|
-
import classNames from "classnames";
|
|
19
18
|
import React, { cloneElement, useRef, useState } from "react";
|
|
19
|
+
import classNames from "classnames";
|
|
20
20
|
import PropTypes from "prop-types";
|
|
21
21
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { Close } from "@carbon/icons-react";
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/TextArea/TextArea.Skeleton.tsx
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { noopFn } from "../../internal/noopFn.js";
|
|
8
9
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
10
|
import { Text } from "../Text/Text.js";
|
|
10
11
|
import useIsomorphicEffect from "../../internal/useIsomorphicEffect.js";
|
|
11
12
|
import { useId } from "../../internal/useId.js";
|
|
12
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
13
13
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
14
14
|
import { isComponentElement } from "../../internal/utils.js";
|
|
15
15
|
import { useMergedRefs } from "../../internal/useMergedRefs.js";
|
|
@@ -17,8 +17,8 @@ import { hasHelperText } from "../../internal/hasHelperText.js";
|
|
|
17
17
|
import { AILabel } from "../AILabel/index.js";
|
|
18
18
|
import { FormContext } from "../FluidForm/FormContext.js";
|
|
19
19
|
import { getAnnouncement } from "../../internal/getAnnouncement.js";
|
|
20
|
-
import classNames from "classnames";
|
|
21
20
|
import { cloneElement, forwardRef, useContext, useEffect, useRef, useState } from "react";
|
|
21
|
+
import classNames from "classnames";
|
|
22
22
|
import PropTypes from "prop-types";
|
|
23
23
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
24
|
import { WarningAltFilled, WarningFilled } from "@carbon/icons-react";
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { noopFn } from "../../internal/noopFn.js";
|
|
8
9
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
10
|
import { useId } from "../../internal/useId.js";
|
|
10
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
11
11
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
12
12
|
import { hasHelperText } from "../../internal/hasHelperText.js";
|
|
13
13
|
import { getTextInputProps } from "./util.js";
|
|
14
|
-
import classNames from "classnames";
|
|
15
14
|
import { forwardRef } from "react";
|
|
15
|
+
import classNames from "classnames";
|
|
16
16
|
import PropTypes from "prop-types";
|
|
17
17
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
import { View, ViewOff, WarningFilled } from "@carbon/icons-react";
|
|
@@ -12,8 +12,8 @@ import { hasHelperText } from "../../internal/hasHelperText.js";
|
|
|
12
12
|
import { useNormalizedInputProps } from "../../internal/useNormalizedInputProps.js";
|
|
13
13
|
import { FormContext } from "../FluidForm/FormContext.js";
|
|
14
14
|
import { getTextInputProps } from "./util.js";
|
|
15
|
-
import classNames from "classnames";
|
|
16
15
|
import { forwardRef, useContext, useEffect, useState } from "react";
|
|
16
|
+
import classNames from "classnames";
|
|
17
17
|
import PropTypes from "prop-types";
|
|
18
18
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
19
|
import { View, ViewOff } from "@carbon/icons-react";
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import classNames from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/TextInput/TextInput.Skeleton.tsx
|
|
@@ -16,8 +16,8 @@ import { AILabel } from "../AILabel/index.js";
|
|
|
16
16
|
import { FormContext } from "../FluidForm/FormContext.js";
|
|
17
17
|
import { getTextInputProps } from "./util.js";
|
|
18
18
|
import { getAnnouncement } from "../../internal/getAnnouncement.js";
|
|
19
|
-
import classNames from "classnames";
|
|
20
19
|
import { cloneElement, forwardRef, useContext, useEffect, useRef, useState } from "react";
|
|
20
|
+
import classNames from "classnames";
|
|
21
21
|
import PropTypes from "prop-types";
|
|
22
22
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
23
|
//#region src/components/TextInput/TextInput.tsx
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import { LayerContext } from "../Layer/LayerContext.js";
|
|
10
10
|
import { useMatchMedia } from "../../internal/useMatchMedia.js";
|
|
11
|
-
import classNames from "classnames";
|
|
12
11
|
import React, { cloneElement, isValidElement, useMemo } from "react";
|
|
12
|
+
import classNames from "classnames";
|
|
13
13
|
import PropTypes from "prop-types";
|
|
14
14
|
import { jsx } from "react/jsx-runtime";
|
|
15
15
|
//#region src/components/Theme/index.tsx
|