@carbon/react 1.112.0 → 1.113.0-rc.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 +941 -941
- package/es/components/AILabel/index.js +6 -6
- package/es/components/AISkeleton/AISkeletonIcon.js +2 -2
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +2 -2
- package/es/components/AISkeleton/AISkeletonText.js +2 -2
- package/es/components/Accordion/Accordion.Skeleton.js +3 -3
- package/es/components/Accordion/Accordion.js +2 -2
- package/es/components/Accordion/AccordionItem.js +2 -2
- package/es/components/AspectRatio/AspectRatio.js +2 -2
- package/es/components/BadgeIndicator/index.js +4 -4
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +3 -3
- package/es/components/Breadcrumb/Breadcrumb.js +2 -2
- package/es/components/Breadcrumb/BreadcrumbItem.js +3 -3
- package/es/components/Button/Button.Skeleton.js +3 -3
- package/es/components/Button/Button.js +2 -2
- package/es/components/Button/ButtonBase.js +2 -2
- package/es/components/Button/index.js +3 -3
- package/es/components/ButtonSet/ButtonSet.js +3 -3
- package/es/components/ButtonSet/index.js +1 -1
- package/es/components/ChatButton/ChatButton.Skeleton.js +2 -2
- package/es/components/ChatButton/ChatButton.js +3 -3
- package/es/components/Checkbox/Checkbox.Skeleton.js +3 -3
- package/es/components/Checkbox/Checkbox.js +4 -4
- package/es/components/Checkbox/index.js +2 -2
- package/es/components/CheckboxGroup/CheckboxGroup.js +2 -2
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +3 -3
- package/es/components/CodeSnippet/CodeSnippet.js +2 -2
- package/es/components/ComboBox/ComboBox.js +12 -9
- package/es/components/ComboBox/index.js +1 -1
- package/es/components/ComboButton/index.js +5 -5
- package/es/components/ComposedModal/ComposedModal.js +7 -6
- package/es/components/ComposedModal/ComposedModalPresence.js +5 -2
- package/es/components/ComposedModal/ModalFooter.js +4 -4
- package/es/components/ComposedModal/ModalHeader.js +6 -6
- package/es/components/ContainedList/ContainedList.js +2 -2
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +2 -2
- package/es/components/ContainedList/ContainedListItem/index.js +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +2 -2
- package/es/components/Copy/Copy.js +4 -4
- package/es/components/Copy/index.js +1 -1
- package/es/components/CopyButton/CopyButton.js +3 -3
- package/es/components/CopyButton/index.js +1 -1
- package/es/components/DataTable/DataTable.js +4 -3
- package/es/components/DataTable/Table.js +3 -3
- package/es/components/DataTable/TableBatchActions.js +3 -3
- package/es/components/DataTable/TableCell.js +2 -2
- package/es/components/DataTable/TableContainer.js +3 -3
- package/es/components/DataTable/TableDecoratorRow.js +2 -2
- package/es/components/DataTable/TableExpandHeader.js +2 -2
- package/es/components/DataTable/TableExpandRow.js +2 -2
- package/es/components/DataTable/TableExpandedRow.js +2 -2
- package/es/components/DataTable/TableHeader.js +4 -4
- package/es/components/DataTable/TableRow.js +2 -2
- package/es/components/DataTable/TableSelectAll.js +2 -2
- package/es/components/DataTable/TableSelectRow.js +2 -2
- package/es/components/DataTable/TableSlugRow.js +2 -2
- package/es/components/DataTable/TableToolbar.js +3 -3
- package/es/components/DataTable/TableToolbarMenu.js +4 -4
- package/es/components/DataTable/TableToolbarSearch.js +3 -3
- package/es/components/DataTable/state/sorting.js +3 -2
- package/es/components/DataTable/tools/sorting.js +1 -1
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +2 -2
- package/es/components/DatePicker/DatePicker.Skeleton.js +4 -4
- package/es/components/DatePicker/DatePicker.js +3 -3
- package/es/components/DatePicker/index.js +2 -2
- package/es/components/DatePickerInput/DatePickerInput.js +7 -7
- package/es/components/DatePickerInput/index.js +1 -1
- package/es/components/Dialog/Dialog.js +9 -9
- package/es/components/Dialog/index.js +1 -1
- package/es/components/Dropdown/Dropdown.Skeleton.js +4 -4
- package/es/components/Dropdown/Dropdown.js +5 -5
- package/es/components/Dropdown/index.js +2 -2
- package/es/components/ExpandableSearch/ExpandableSearch.js +2 -2
- package/es/components/ExpandableSearch/index.js +1 -1
- package/es/components/FileUploader/FileUploader.Skeleton.js +4 -4
- package/es/components/FileUploader/FileUploader.js +11 -8
- package/es/components/FileUploader/FileUploaderButton.js +3 -3
- package/es/components/FileUploader/FileUploaderDropContainer.js +8 -6
- package/es/components/FileUploader/FileUploaderItem.js +3 -3
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +2 -2
- package/es/components/FluidComboBox/FluidComboBox.js +3 -3
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +3 -3
- package/es/components/FluidDatePicker/FluidDatePicker.js +3 -3
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +2 -2
- package/es/components/FluidDropdown/FluidDropdown.js +3 -3
- package/es/components/FluidForm/FluidForm.js +3 -3
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +2 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +4 -4
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +2 -2
- package/es/components/FluidNumberInput/FluidNumberInput.js +3 -3
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +2 -2
- package/es/components/FluidSearch/FluidSearch.js +3 -3
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +2 -2
- package/es/components/FluidSelect/FluidSelect.js +3 -3
- package/es/components/FluidSelect/index.js +2 -2
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +2 -2
- package/es/components/FluidTextArea/FluidTextArea.js +3 -3
- package/es/components/FluidTextInput/FluidPasswordInput.js +3 -3
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +2 -2
- package/es/components/FluidTextInput/FluidTextInput.js +4 -4
- package/es/components/FluidTextInput/index.js +3 -3
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +2 -2
- package/es/components/FluidTimePicker/FluidTimePicker.js +3 -3
- package/es/components/FluidTimePickerSelect/index.js +1 -1
- package/es/components/Form/Form.js +2 -2
- package/es/components/FormGroup/FormGroup.js +2 -2
- package/es/components/FormItem/FormItem.js +2 -2
- package/es/components/FormLabel/FormLabel.js +2 -2
- package/es/components/Grid/CSSGrid.js +4 -4
- package/es/components/Grid/Column.js +3 -3
- package/es/components/Grid/ColumnHang.js +3 -3
- package/es/components/Grid/FlexGrid.js +3 -3
- package/es/components/Grid/Grid.js +3 -3
- package/es/components/Grid/Row.js +2 -2
- package/es/components/Icon/Icon.Skeleton.js +3 -3
- package/es/components/IconButton/index.js +4 -3
- package/es/components/IconIndicator/index.js +4 -4
- package/es/components/InlineCheckbox/index.js +1 -1
- package/es/components/InlineLoading/InlineLoading.js +2 -2
- package/es/components/InlineLoading/index.js +1 -1
- package/es/components/Layer/LayerLevel.js +1 -1
- package/es/components/Layer/index.js +2 -2
- package/es/components/Layout/index.js +3 -3
- package/es/components/LayoutDirection/LayoutDirection.js +1 -1
- package/es/components/Link/Link.js +2 -2
- package/es/components/Link/index.js +1 -1
- package/es/components/ListBox/ListBox.js +2 -2
- package/es/components/ListBox/ListBoxMenuIcon.js +2 -2
- package/es/components/ListBox/ListBoxMenuItem.js +4 -3
- package/es/components/ListBox/ListBoxSelection.js +3 -3
- package/es/components/ListBox/index.js +2 -2
- package/es/components/ListBox/next/ListBoxSelection.js +3 -3
- package/es/components/ListBox/next/ListBoxTrigger.js +2 -2
- package/es/components/ListItem/ListItem.js +2 -2
- package/es/components/Loading/Loading.js +3 -3
- package/es/components/Loading/index.js +1 -1
- package/es/components/Menu/Menu.js +3 -3
- package/es/components/Menu/MenuItem.js +9 -9
- package/es/components/MenuButton/index.js +4 -4
- package/es/components/Modal/Modal.js +9 -9
- package/es/components/Modal/ModalPresence.js +5 -2
- package/es/components/Modal/index.js +2 -2
- package/es/components/ModalWrapper/ModalWrapper.js +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +10 -8
- package/es/components/MultiSelect/MultiSelect.js +7 -7
- package/es/components/Notification/Notification.js +10 -10
- package/es/components/NumberInput/NumberInput.Skeleton.js +2 -2
- package/es/components/NumberInput/NumberInput.js +21 -11
- package/es/components/OrderedList/OrderedList.js +2 -2
- package/es/components/OverflowMenu/OverflowMenu.js +7 -7
- package/es/components/OverflowMenu/index.js +2 -2
- package/es/components/OverflowMenu/next/index.js +4 -4
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +4 -4
- package/es/components/OverflowMenuItem/index.js +1 -1
- package/es/components/OverflowMenuV2/index.js +1 -1
- package/es/components/PageHeader/PageHeader.js +15 -15
- package/es/components/PageHeader/index.js +1 -1
- package/es/components/Pagination/Pagination.Skeleton.js +3 -3
- package/es/components/Pagination/Pagination.d.ts +18 -1
- package/es/components/Pagination/Pagination.js +33 -8
- package/es/components/Pagination/experimental/PageSelector.d.ts +4 -0
- package/es/components/Pagination/experimental/PageSelector.js +16 -3
- package/es/components/Pagination/experimental/Pagination-story.d.ts +100 -65
- package/es/components/Pagination/experimental/Pagination.d.ts +4 -0
- package/es/components/Pagination/experimental/Pagination.js +12 -5
- package/es/components/PaginationNav/PaginationNav.js +8 -6
- package/es/components/Popover/index.js +14 -6
- package/es/components/ProgressBar/ProgressBar.js +3 -3
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +3 -3
- package/es/components/ProgressIndicator/ProgressIndicator.js +4 -4
- package/es/components/RadioButton/RadioButton.Skeleton.js +3 -3
- package/es/components/RadioButton/RadioButton.js +3 -3
- package/es/components/RadioButton/index.js +1 -1
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +4 -4
- package/es/components/RadioTile/RadioTile.js +3 -3
- package/es/components/RadioTile/index.js +1 -1
- package/es/components/Search/Search.Skeleton.js +3 -3
- package/es/components/Search/Search.js +4 -4
- package/es/components/Search/index.js +2 -2
- package/es/components/Select/Select.Skeleton.js +3 -3
- package/es/components/Select/Select.js +6 -6
- package/es/components/Select/index.js +2 -2
- package/es/components/SelectItem/SelectItem.js +2 -2
- package/es/components/SelectItem/index.js +1 -1
- package/es/components/SelectItemGroup/SelectItemGroup.js +2 -2
- package/es/components/ShapeIndicator/index.js +4 -4
- package/es/components/SkeletonIcon/SkeletonIcon.js +2 -2
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +2 -2
- package/es/components/SkeletonText/SkeletonText.js +2 -2
- package/es/components/SkeletonText/index.js +1 -1
- package/es/components/Slider/Slider.Skeleton.js +7 -7
- package/es/components/Slider/Slider.js +22 -20
- package/es/components/Stack/Stack.js +2 -2
- package/es/components/StructuredList/StructuredList.Skeleton.js +3 -3
- package/es/components/StructuredList/StructuredList.js +7 -7
- package/es/components/Switch/IconSwitch.js +6 -5
- package/es/components/Switch/Switch.js +3 -3
- package/es/components/TabContent/TabContent.js +2 -2
- package/es/components/Tabs/Tabs.Skeleton.js +3 -3
- package/es/components/Tabs/Tabs.js +45 -33
- package/es/components/Tag/DismissibleTag.js +4 -3
- package/es/components/Tag/OperationalTag.js +4 -3
- package/es/components/Tag/SelectableTag.js +3 -3
- package/es/components/Tag/Tag.Skeleton.js +3 -3
- package/es/components/Tag/Tag.js +4 -3
- package/es/components/TextArea/TextArea.Skeleton.js +3 -3
- package/es/components/TextArea/TextArea.js +8 -8
- package/es/components/TextArea/index.js +2 -2
- package/es/components/TextInput/ControlledPasswordInput.js +6 -6
- package/es/components/TextInput/PasswordInput.js +10 -10
- package/es/components/TextInput/TextInput.Skeleton.js +3 -3
- package/es/components/TextInput/TextInput.js +9 -9
- package/es/components/TextInput/index.js +2 -2
- package/es/components/Theme/index.js +2 -2
- package/es/components/Tile/Tile.js +14 -11
- package/es/components/TileGroup/TileGroup.js +1 -1
- package/es/components/TimePicker/TimePicker.js +5 -5
- package/es/components/TimePickerSelect/TimePickerSelect.js +2 -2
- package/es/components/Toggle/Toggle.Skeleton.js +3 -3
- package/es/components/Toggle/Toggle.js +6 -6
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +2 -2
- package/es/components/Toggletip/index.js +6 -6
- package/es/components/Tooltip/DefinitionTooltip.js +2 -2
- package/es/components/Tooltip/Tooltip.d.ts +2 -1
- package/es/components/Tooltip/Tooltip.js +5 -4
- package/es/components/TreeView/TreeNode.js +11 -8
- package/es/components/TreeView/TreeView.js +2 -2
- package/es/components/UIShell/Content.js +2 -2
- package/es/components/UIShell/Header.js +2 -2
- package/es/components/UIShell/HeaderGlobalAction.js +2 -2
- package/es/components/UIShell/HeaderMenu.js +4 -4
- package/es/components/UIShell/HeaderMenuButton.js +2 -2
- package/es/components/UIShell/HeaderMenuItem.js +2 -2
- package/es/components/UIShell/HeaderName.js +2 -2
- package/es/components/UIShell/HeaderNavigation.js +2 -2
- package/es/components/UIShell/HeaderPanel.js +3 -3
- package/es/components/UIShell/HeaderSideNavItems.js +2 -2
- package/es/components/UIShell/SideNav.js +3 -3
- package/es/components/UIShell/SideNavDetails.js +2 -2
- package/es/components/UIShell/SideNavDivider.js +2 -2
- package/es/components/UIShell/SideNavFooter.js +2 -2
- package/es/components/UIShell/SideNavHeader.js +2 -2
- package/es/components/UIShell/SideNavIcon.js +2 -2
- package/es/components/UIShell/SideNavItem.js +2 -2
- package/es/components/UIShell/SideNavItems.js +2 -2
- package/es/components/UIShell/SideNavLink.js +2 -2
- package/es/components/UIShell/SideNavLinkText.js +2 -2
- package/es/components/UIShell/SideNavMenu.js +3 -3
- package/es/components/UIShell/SideNavMenuItem.js +3 -3
- package/es/components/UIShell/SideNavSwitcher.js +2 -2
- package/es/components/UIShell/SkipToContent.js +2 -2
- package/es/components/UIShell/Switcher.js +2 -2
- package/es/components/UIShell/SwitcherDivider.js +3 -3
- package/es/components/UIShell/SwitcherItem.js +4 -4
- package/es/components/UnorderedList/UnorderedList.js +2 -2
- package/es/index.js +30 -30
- package/es/internal/FloatingMenu.js +12 -9
- package/es/internal/motion/MotionSurface.d.ts +35 -0
- package/es/internal/motion/useMotionEnabled.d.ts +13 -0
- package/es/internal/motion/useMotionSurface.d.ts +33 -0
- package/es/internal/useId.js +1 -1
- package/es/internal/useOverflowItems.js +2 -1
- package/es/internal/usePresence.d.ts +8 -1
- package/es/internal/usePresence.js +4 -2
- package/es/internal/usePresenceContext.d.ts +12 -0
- package/es/internal/usePresenceContext.js +23 -5
- package/es/tools/wrapComponent.js +2 -2
- package/lib/components/AILabel/index.js +4 -4
- 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 +3 -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 +3 -2
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +3 -2
- package/lib/components/Breadcrumb/Breadcrumb.js +2 -2
- package/lib/components/Breadcrumb/BreadcrumbItem.js +2 -2
- package/lib/components/Button/Button.Skeleton.js +3 -2
- package/lib/components/Button/Button.js +2 -2
- package/lib/components/Button/ButtonBase.js +2 -2
- package/lib/components/Button/index.js +7 -1
- package/lib/components/ButtonSet/ButtonSet.js +2 -2
- package/lib/components/ButtonSet/index.js +3 -1
- package/lib/components/ChatButton/ChatButton.Skeleton.js +2 -2
- package/lib/components/ChatButton/ChatButton.js +2 -2
- package/lib/components/Checkbox/Checkbox.Skeleton.js +3 -2
- package/lib/components/Checkbox/Checkbox.js +3 -3
- package/lib/components/Checkbox/index.js +3 -1
- package/lib/components/CheckboxGroup/CheckboxGroup.js +2 -2
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +3 -2
- package/lib/components/CodeSnippet/CodeSnippet.js +2 -2
- package/lib/components/ComboBox/ComboBox.js +8 -5
- package/lib/components/ComboBox/index.js +3 -1
- package/lib/components/ComboButton/index.js +2 -2
- package/lib/components/ComposedModal/ComposedModal.js +5 -4
- package/lib/components/ComposedModal/ComposedModalPresence.js +4 -1
- 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/ContainedList/ContainedListItem/index.js +3 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +2 -2
- package/lib/components/Copy/Copy.js +3 -3
- package/lib/components/Copy/index.js +3 -1
- package/lib/components/CopyButton/CopyButton.js +3 -3
- package/lib/components/CopyButton/index.js +3 -1
- package/lib/components/DataTable/DataTable.js +4 -3
- package/lib/components/DataTable/Table.js +3 -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 +3 -2
- package/lib/components/DataTable/TableToolbarMenu.js +3 -3
- package/lib/components/DataTable/TableToolbarSearch.js +3 -3
- package/lib/components/DataTable/state/sorting.js +3 -1
- package/lib/components/DataTable/tools/sorting.js +2 -0
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +2 -2
- package/lib/components/DatePicker/DatePicker.Skeleton.js +3 -2
- package/lib/components/DatePicker/DatePicker.js +2 -2
- package/lib/components/DatePicker/index.js +3 -1
- package/lib/components/DatePickerInput/DatePickerInput.js +3 -3
- package/lib/components/DatePickerInput/index.js +3 -1
- package/lib/components/Dialog/Dialog.js +3 -3
- package/lib/components/Dialog/index.js +8 -0
- package/lib/components/Dropdown/Dropdown.Skeleton.js +3 -2
- package/lib/components/Dropdown/Dropdown.js +2 -2
- package/lib/components/Dropdown/index.js +3 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +2 -2
- package/lib/components/ExpandableSearch/index.js +3 -1
- package/lib/components/FileUploader/FileUploader.Skeleton.js +4 -3
- package/lib/components/FileUploader/FileUploader.js +9 -6
- package/lib/components/FileUploader/FileUploaderButton.js +3 -3
- package/lib/components/FileUploader/FileUploaderDropContainer.js +8 -6
- 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/FluidSelect/index.js +3 -1
- 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/FluidTextInput/index.js +5 -2
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +2 -2
- package/lib/components/FluidTimePicker/FluidTimePicker.js +2 -2
- package/lib/components/FluidTimePickerSelect/index.js +3 -1
- 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 +3 -3
- package/lib/components/Grid/Column.js +2 -2
- package/lib/components/Grid/ColumnHang.js +3 -3
- package/lib/components/Grid/FlexGrid.js +3 -3
- package/lib/components/Grid/Grid.js +3 -3
- package/lib/components/Grid/Row.js +2 -2
- package/lib/components/Icon/Icon.Skeleton.js +3 -2
- package/lib/components/IconButton/index.js +4 -3
- package/lib/components/IconIndicator/index.js +4 -2
- package/lib/components/InlineCheckbox/index.js +3 -1
- package/lib/components/InlineLoading/InlineLoading.js +2 -2
- package/lib/components/InlineLoading/index.js +3 -1
- package/lib/components/Layer/LayerLevel.js +1 -0
- package/lib/components/Layer/index.js +2 -2
- package/lib/components/Layout/index.js +2 -2
- package/lib/components/LayoutDirection/LayoutDirection.js +1 -0
- package/lib/components/Link/Link.js +2 -2
- package/lib/components/Link/index.js +3 -1
- package/lib/components/ListBox/ListBox.js +2 -2
- package/lib/components/ListBox/ListBoxMenuIcon.js +2 -2
- package/lib/components/ListBox/ListBoxMenuItem.js +4 -3
- package/lib/components/ListBox/ListBoxSelection.js +2 -2
- package/lib/components/ListBox/index.js +3 -1
- 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/Loading/index.js +3 -1
- package/lib/components/Menu/Menu.js +2 -2
- package/lib/components/Menu/MenuItem.js +2 -2
- package/lib/components/MenuButton/index.js +2 -2
- package/lib/components/Modal/Modal.js +5 -4
- package/lib/components/Modal/ModalPresence.js +4 -1
- package/lib/components/Modal/index.js +6 -2
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +6 -4
- 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 +16 -5
- package/lib/components/OrderedList/OrderedList.js +2 -2
- package/lib/components/OverflowMenu/OverflowMenu.js +5 -3
- package/lib/components/OverflowMenu/index.js +3 -2
- package/lib/components/OverflowMenu/next/index.js +2 -2
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +3 -3
- package/lib/components/OverflowMenuItem/index.js +3 -1
- package/lib/components/OverflowMenuV2/index.js +1 -1
- package/lib/components/PageHeader/PageHeader.js +5 -5
- package/lib/components/PageHeader/index.js +14 -0
- package/lib/components/Pagination/Pagination.Skeleton.js +3 -2
- package/lib/components/Pagination/Pagination.d.ts +18 -1
- package/lib/components/Pagination/Pagination.js +31 -6
- package/lib/components/Pagination/experimental/PageSelector.d.ts +4 -0
- package/lib/components/Pagination/experimental/PageSelector.js +9 -2
- package/lib/components/Pagination/experimental/Pagination-story.d.ts +100 -65
- package/lib/components/Pagination/experimental/Pagination.d.ts +4 -0
- package/lib/components/Pagination/experimental/Pagination.js +9 -2
- package/lib/components/PaginationNav/PaginationNav.js +6 -4
- package/lib/components/Popover/index.js +10 -2
- package/lib/components/ProgressBar/ProgressBar.js +2 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +3 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -2
- package/lib/components/RadioButton/RadioButton.Skeleton.js +3 -2
- package/lib/components/RadioButton/RadioButton.js +2 -2
- package/lib/components/RadioButton/index.js +3 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +2 -2
- package/lib/components/RadioTile/RadioTile.js +3 -3
- package/lib/components/RadioTile/index.js +3 -1
- package/lib/components/Search/Search.Skeleton.js +3 -2
- package/lib/components/Search/Search.js +3 -3
- package/lib/components/Search/index.js +3 -1
- package/lib/components/Select/Select.Skeleton.js +3 -2
- package/lib/components/Select/Select.js +2 -2
- package/lib/components/Select/index.js +3 -1
- package/lib/components/SelectItem/SelectItem.js +2 -2
- package/lib/components/SelectItem/index.js +3 -1
- package/lib/components/SelectItemGroup/SelectItemGroup.js +2 -2
- package/lib/components/ShapeIndicator/index.js +4 -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/SkeletonText/index.js +3 -1
- package/lib/components/Slider/Slider.Skeleton.js +2 -2
- package/lib/components/Slider/Slider.js +8 -6
- 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 +5 -4
- package/lib/components/Switch/Switch.js +3 -3
- package/lib/components/TabContent/TabContent.js +2 -2
- package/lib/components/Tabs/Tabs.Skeleton.js +3 -2
- package/lib/components/Tabs/Tabs.js +35 -23
- package/lib/components/Tag/DismissibleTag.js +3 -2
- package/lib/components/Tag/OperationalTag.js +3 -2
- package/lib/components/Tag/SelectableTag.js +2 -2
- package/lib/components/Tag/Tag.Skeleton.js +3 -2
- package/lib/components/Tag/Tag.js +3 -2
- package/lib/components/TextArea/TextArea.Skeleton.js +3 -2
- package/lib/components/TextArea/TextArea.js +3 -3
- package/lib/components/TextArea/index.js +3 -1
- package/lib/components/TextInput/ControlledPasswordInput.js +3 -3
- package/lib/components/TextInput/PasswordInput.js +2 -2
- package/lib/components/TextInput/TextInput.Skeleton.js +3 -2
- package/lib/components/TextInput/TextInput.js +2 -2
- package/lib/components/TextInput/index.js +3 -1
- package/lib/components/Theme/index.js +2 -2
- package/lib/components/Tile/Tile.js +7 -4
- 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 +3 -2
- package/lib/components/Toggle/Toggle.js +3 -2
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +2 -2
- package/lib/components/Toggletip/index.js +4 -3
- package/lib/components/Tooltip/DefinitionTooltip.js +2 -2
- package/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/lib/components/Tooltip/Tooltip.js +5 -4
- package/lib/components/TreeView/TreeNode.js +8 -5
- 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 +3 -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 +3 -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.js +33 -32
- package/lib/internal/FloatingMenu.js +13 -8
- package/lib/internal/motion/MotionSurface.d.ts +35 -0
- package/lib/internal/motion/useMotionEnabled.d.ts +13 -0
- package/lib/internal/motion/useMotionSurface.d.ts +33 -0
- package/lib/internal/useId.js +1 -0
- package/lib/internal/useOverflowItems.js +2 -1
- package/lib/internal/usePresence.d.ts +8 -1
- package/lib/internal/usePresence.js +4 -2
- package/lib/internal/usePresenceContext.d.ts +12 -0
- package/lib/internal/usePresenceContext.js +22 -3
- package/lib/tools/wrapComponent.js +2 -2
- package/package.json +12 -9
- package/telemetry.yml +1 -0
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import { AriaLabelPropType } from "../../prop-types/AriaPropTypes.js";
|
|
10
|
-
import classNames from "classnames";
|
|
11
10
|
import "react";
|
|
11
|
+
import cx from "classnames";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
import { Close, Menu } from "@carbon/icons-react";
|
|
@@ -21,7 +21,7 @@ import { Close, Menu } from "@carbon/icons-react";
|
|
|
21
21
|
*/
|
|
22
22
|
function HeaderMenuButton({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className: customClassName, renderMenuIcon, renderCloseIcon, isActive, isCollapsible, ...rest }) {
|
|
23
23
|
const prefix = usePrefix();
|
|
24
|
-
const className =
|
|
24
|
+
const className = cx({
|
|
25
25
|
...typeof customClassName === "string" && { [customClassName]: !!customClassName },
|
|
26
26
|
[`${prefix}--header__action`]: true,
|
|
27
27
|
[`${prefix}--header__menu-trigger`]: true,
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
10
10
|
import Link, { LinkPropTypes } from "./Link.js";
|
|
11
|
-
import classNames from "classnames";
|
|
12
11
|
import { forwardRef } from "react";
|
|
12
|
+
import cx from "classnames";
|
|
13
13
|
import PropTypes from "prop-types";
|
|
14
14
|
import { jsx } from "react/jsx-runtime";
|
|
15
15
|
//#region src/components/UIShell/HeaderMenuItem.tsx
|
|
@@ -24,7 +24,7 @@ const HeaderMenuItem = forwardRef(function HeaderMenuItem({ className, isActive,
|
|
|
24
24
|
const resolvedTabIndex = tabIndex ?? 0;
|
|
25
25
|
if (isCurrentPage) isActive = isCurrentPage;
|
|
26
26
|
const hasCurrentClass = isActive && ariaCurrent !== "page";
|
|
27
|
-
const linkClassName =
|
|
27
|
+
const linkClassName = cx({
|
|
28
28
|
[`${prefix}--header__menu-item`]: true,
|
|
29
29
|
[`${prefix}--header__menu-item--current`]: hasCurrentClass
|
|
30
30
|
});
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import Link, { LinkPropTypes } from "./Link.js";
|
|
10
|
-
import classNames from "classnames";
|
|
11
10
|
import "react";
|
|
11
|
+
import cx from "classnames";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/UIShell/HeaderName.tsx
|
|
@@ -20,7 +20,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
20
20
|
*/
|
|
21
21
|
function HeaderName({ children, className: customClassName, prefix = "IBM", ...rest }) {
|
|
22
22
|
const selectorPrefix = usePrefix();
|
|
23
|
-
const className =
|
|
23
|
+
const className = cx(`${selectorPrefix}--header__name`, customClassName);
|
|
24
24
|
return /* @__PURE__ */ jsxs(Link, {
|
|
25
25
|
...rest,
|
|
26
26
|
className,
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import { AriaLabelPropType } from "../../prop-types/AriaPropTypes.js";
|
|
10
|
-
import classNames from "classnames";
|
|
11
10
|
import "react";
|
|
11
|
+
import cx from "classnames";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/UIShell/HeaderNavigation.tsx
|
|
@@ -20,7 +20,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
20
20
|
*/
|
|
21
21
|
function HeaderNavigation({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, className: customClassName, ...rest }) {
|
|
22
22
|
const prefix = usePrefix();
|
|
23
|
-
const className =
|
|
23
|
+
const className = cx(`${prefix}--header__nav`, customClassName);
|
|
24
24
|
return /* @__PURE__ */ jsx("nav", {
|
|
25
25
|
...rest,
|
|
26
26
|
"aria-label": ariaLabel,
|
|
@@ -5,16 +5,16 @@
|
|
|
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 { Escape } from "../../internal/keyboard/keys.js";
|
|
10
11
|
import { match } from "../../internal/keyboard/match.js";
|
|
11
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
12
12
|
import { isComponentElement } from "../../internal/utils.js";
|
|
13
13
|
import { useMergedRefs } from "../../internal/useMergedRefs.js";
|
|
14
14
|
import { useWindowEvent } from "../../internal/useEvent.js";
|
|
15
15
|
import Switcher from "./Switcher.js";
|
|
16
|
-
import classNames from "classnames";
|
|
17
16
|
import React, { useRef, useState } from "react";
|
|
17
|
+
import cx from "classnames";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import { jsx } from "react/jsx-runtime";
|
|
20
20
|
//#region src/components/UIShell/HeaderPanel.tsx
|
|
@@ -32,7 +32,7 @@ const HeaderPanel = React.forwardRef(({ children, className: customClassName, ex
|
|
|
32
32
|
const [expandedState, setExpandedState] = useState(expanded);
|
|
33
33
|
const expandedProp = controlled ? expanded : expandedState;
|
|
34
34
|
const [lastClickedElement, setLastClickedElement] = useState(null);
|
|
35
|
-
const className =
|
|
35
|
+
const className = cx(`${prefix}--header-panel`, {
|
|
36
36
|
[`${prefix}--header-panel--expanded`]: expandedProp,
|
|
37
37
|
[customClassName]: !!customClassName
|
|
38
38
|
});
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/UIShell/HeaderSideNavItems.tsx
|
|
@@ -20,7 +20,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
20
20
|
function HeaderSideNavItems({ className: customClassName, children, hasDivider = false }) {
|
|
21
21
|
const prefix = usePrefix();
|
|
22
22
|
return /* @__PURE__ */ jsx("ul", {
|
|
23
|
-
className:
|
|
23
|
+
className: cx({
|
|
24
24
|
[`${prefix}--side-nav__header-navigation`]: true,
|
|
25
25
|
[`${prefix}--side-nav__header-divider`]: hasDivider
|
|
26
26
|
}, customClassName),
|
|
@@ -14,8 +14,8 @@ import { useDelayedState } from "../../internal/useDelayedState.js";
|
|
|
14
14
|
import { useMatchMedia } from "../../internal/useMatchMedia.js";
|
|
15
15
|
import { AriaLabelPropType } from "../../prop-types/AriaPropTypes.js";
|
|
16
16
|
import { SideNavContextProvider } from "./SideNavContext.js";
|
|
17
|
-
import classNames from "classnames";
|
|
18
17
|
import { forwardRef, useEffect, useRef } from "react";
|
|
18
|
+
import cx from "classnames";
|
|
19
19
|
import PropTypes from "prop-types";
|
|
20
20
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
21
|
import { breakpoints } from "@carbon/layout";
|
|
@@ -44,7 +44,7 @@ const SideNav = forwardRef((props, ref) => {
|
|
|
44
44
|
"aria-label": ariaLabel,
|
|
45
45
|
"aria-labelledby": ariaLabelledBy
|
|
46
46
|
};
|
|
47
|
-
const className =
|
|
47
|
+
const className = cx(customClassName, {
|
|
48
48
|
[`${prefix}--side-nav`]: true,
|
|
49
49
|
[`${prefix}--side-nav--expanded`]: expanded || expandedViaHoverState,
|
|
50
50
|
[`${prefix}--side-nav--collapsed`]: !expanded && isFixedNav,
|
|
@@ -52,7 +52,7 @@ const SideNav = forwardRef((props, ref) => {
|
|
|
52
52
|
[`${prefix}--side-nav--ux`]: isChildOfHeader,
|
|
53
53
|
[`${prefix}--side-nav--hidden`]: !isPersistent
|
|
54
54
|
});
|
|
55
|
-
const overlayClassName =
|
|
55
|
+
const overlayClassName = cx({
|
|
56
56
|
[`${prefix}--side-nav__overlay`]: true,
|
|
57
57
|
[`${prefix}--side-nav__overlay-active`]: expanded || expandedViaHoverState
|
|
58
58
|
});
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/UIShell/SideNavDetails.tsx
|
|
@@ -20,7 +20,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
20
20
|
const SideNavDetails = ({ children, className: customClassName, title, ...rest }) => {
|
|
21
21
|
const prefix = usePrefix();
|
|
22
22
|
return /* @__PURE__ */ jsxs("div", {
|
|
23
|
-
className:
|
|
23
|
+
className: cx(`${prefix}--side-nav__details`, customClassName),
|
|
24
24
|
...rest,
|
|
25
25
|
children: [/* @__PURE__ */ jsx("h2", {
|
|
26
26
|
className: `${prefix}--side-nav__title`,
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/UIShell/SideNavDivider.tsx
|
|
@@ -19,7 +19,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
19
19
|
*/
|
|
20
20
|
const SideNavDivider = ({ className }) => {
|
|
21
21
|
return /* @__PURE__ */ jsx("li", {
|
|
22
|
-
className:
|
|
22
|
+
className: cx(`${usePrefix()}--side-nav__divider`, className),
|
|
23
23
|
children: /* @__PURE__ */ jsx("hr", {})
|
|
24
24
|
});
|
|
25
25
|
};
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { ChevronRight, Close } from "@carbon/icons-react";
|
|
@@ -26,7 +26,7 @@ import { ChevronRight, Close } from "@carbon/icons-react";
|
|
|
26
26
|
function SideNavFooter({ assistiveText = "Toggle opening or closing the side navigation", className: customClassName, expanded, onToggle }) {
|
|
27
27
|
const prefix = usePrefix();
|
|
28
28
|
return /* @__PURE__ */ jsx("footer", {
|
|
29
|
-
className:
|
|
29
|
+
className: cx(`${prefix}--side-nav__footer`, customClassName),
|
|
30
30
|
children: /* @__PURE__ */ jsxs("button", {
|
|
31
31
|
className: `${prefix}--side-nav__toggle`,
|
|
32
32
|
type: "button",
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import SideNavIcon from "./SideNavIcon.js";
|
|
10
|
-
import classNames from "classnames";
|
|
11
10
|
import "react";
|
|
11
|
+
import cx from "classnames";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/UIShell/SideNavHeader.tsx
|
|
@@ -20,7 +20,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
20
20
|
*/
|
|
21
21
|
const SideNavHeader = ({ children, className: customClassName, renderIcon: IconElement }) => {
|
|
22
22
|
return /* @__PURE__ */ jsxs("header", {
|
|
23
|
-
className:
|
|
23
|
+
className: cx(`${usePrefix()}--side-nav__header`, customClassName),
|
|
24
24
|
children: [/* @__PURE__ */ jsx(SideNavIcon, { children: /* @__PURE__ */ jsx(IconElement, {}) }), children]
|
|
25
25
|
});
|
|
26
26
|
};
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/UIShell/SideNavIcon.tsx
|
|
@@ -20,7 +20,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
20
20
|
const SideNavIcon = ({ children, className: customClassName, small = false }) => {
|
|
21
21
|
const prefix = usePrefix();
|
|
22
22
|
return /* @__PURE__ */ jsx("div", {
|
|
23
|
-
className:
|
|
23
|
+
className: cx({
|
|
24
24
|
[`${prefix}--side-nav__icon`]: true,
|
|
25
25
|
[`${prefix}--side-nav__icon--small`]: small,
|
|
26
26
|
[customClassName]: !!customClassName
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/UIShell/SideNavItem.tsx
|
|
@@ -20,7 +20,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
20
20
|
const SideNavItem = ({ className: customClassName, children, large = false }) => {
|
|
21
21
|
const prefix = usePrefix();
|
|
22
22
|
return /* @__PURE__ */ jsx("li", {
|
|
23
|
-
className:
|
|
23
|
+
className: cx({
|
|
24
24
|
[`${prefix}--side-nav__item`]: true,
|
|
25
25
|
[`${prefix}--side-nav__item--large`]: large,
|
|
26
26
|
[customClassName]: !!customClassName
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import { SideNavContext, SideNavContextProvider } from "./SideNavContext.js";
|
|
10
|
-
import classNames from "classnames";
|
|
11
10
|
import { useContext } from "react";
|
|
11
|
+
import cx from "classnames";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/UIShell/SideNavItems.tsx
|
|
@@ -25,7 +25,7 @@ const SideNavItems = ({ className: customClassName, children, isSideNavExpanded
|
|
|
25
25
|
isRail,
|
|
26
26
|
isSideNavExpanded: isSideNavExpanded ?? contextIsSideNavExpanded,
|
|
27
27
|
children: /* @__PURE__ */ jsx("ul", {
|
|
28
|
-
className:
|
|
28
|
+
className: cx([`${prefix}--side-nav__items`], customClassName),
|
|
29
29
|
children
|
|
30
30
|
})
|
|
31
31
|
});
|
|
@@ -11,8 +11,8 @@ import { SideNavContext } from "./SideNavContext.js";
|
|
|
11
11
|
import SideNavIcon from "./SideNavIcon.js";
|
|
12
12
|
import SideNavItem from "./SideNavItem.js";
|
|
13
13
|
import SideNavLinkText from "./SideNavLinkText.js";
|
|
14
|
-
import classNames from "classnames";
|
|
15
14
|
import { forwardRef, useContext } from "react";
|
|
15
|
+
import cx from "classnames";
|
|
16
16
|
import PropTypes from "prop-types";
|
|
17
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
//#region src/components/UIShell/SideNavLink.tsx
|
|
@@ -27,7 +27,7 @@ const SideNavLink = forwardRef((props, ref) => {
|
|
|
27
27
|
const { isRail, isSideNavExpanded: contextIsSideNavExpanded } = useContext(SideNavContext);
|
|
28
28
|
const currentIsSideNavExpanded = isSideNavExpanded ?? contextIsSideNavExpanded;
|
|
29
29
|
const prefix = usePrefix();
|
|
30
|
-
const className =
|
|
30
|
+
const className = cx({
|
|
31
31
|
[`${prefix}--side-nav__link`]: true,
|
|
32
32
|
[`${prefix}--side-nav__link--current`]: isActive,
|
|
33
33
|
[customClassName]: !!customClassName
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/UIShell/SideNavLinkText.tsx
|
|
@@ -18,7 +18,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
19
|
*/
|
|
20
20
|
function SideNavLinkText({ className: customClassName, children, ...rest }) {
|
|
21
|
-
const className =
|
|
21
|
+
const className = cx(`${usePrefix()}--side-nav__link-text`, customClassName);
|
|
22
22
|
return /* @__PURE__ */ jsx("span", {
|
|
23
23
|
...rest,
|
|
24
24
|
className,
|
|
@@ -11,8 +11,8 @@ import { match } from "../../internal/keyboard/match.js";
|
|
|
11
11
|
import { composeEventHandlers } from "../../tools/events.js";
|
|
12
12
|
import { SideNavContext } from "./SideNavContext.js";
|
|
13
13
|
import SideNavIcon from "./SideNavIcon.js";
|
|
14
|
-
import classNames from "classnames";
|
|
15
14
|
import React, { forwardRef, useContext, useEffect, useRef, useState } from "react";
|
|
15
|
+
import cx from "classnames";
|
|
16
16
|
import PropTypes from "prop-types";
|
|
17
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
import { ChevronDown } from "@carbon/icons-react";
|
|
@@ -29,7 +29,7 @@ const SideNavMenu = forwardRef(({ className: customClassName, children, defaultE
|
|
|
29
29
|
const prefix = usePrefix();
|
|
30
30
|
const [isExpanded, setIsExpanded] = useState(defaultExpanded);
|
|
31
31
|
const prevExpandedRef = useRef(false);
|
|
32
|
-
const className =
|
|
32
|
+
const className = cx({
|
|
33
33
|
[`${prefix}--side-nav__item`]: true,
|
|
34
34
|
[`${prefix}--side-nav__item--active`]: isActive || hasActiveDescendant(children) && !isExpanded,
|
|
35
35
|
[`${prefix}--side-nav__item--icon`]: IconElement,
|
|
@@ -148,4 +148,4 @@ function hasActiveDescendant(children) {
|
|
|
148
148
|
return false;
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
|
-
export { SideNavMenu as default };
|
|
151
|
+
export { SideNavMenu, SideNavMenu as default };
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import Link from "./Link.js";
|
|
10
10
|
import SideNavLinkText from "./SideNavLinkText.js";
|
|
11
|
-
import classNames from "classnames";
|
|
12
11
|
import { forwardRef } from "react";
|
|
12
|
+
import cx from "classnames";
|
|
13
13
|
import PropTypes from "prop-types";
|
|
14
14
|
import { jsx } from "react/jsx-runtime";
|
|
15
15
|
//#region src/components/UIShell/SideNavMenuItem.tsx
|
|
@@ -22,8 +22,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
22
22
|
const SideNavMenuItem = forwardRef((props, ref) => {
|
|
23
23
|
const prefix = usePrefix();
|
|
24
24
|
const { children, className: customClassName, as: Component = Link, isActive, ...rest } = props;
|
|
25
|
-
const className =
|
|
26
|
-
const linkClassName =
|
|
25
|
+
const className = cx(`${prefix}--side-nav__menu-item`, customClassName);
|
|
26
|
+
const linkClassName = cx({
|
|
27
27
|
[`${prefix}--side-nav__link`]: true,
|
|
28
28
|
[`${prefix}--side-nav__link--current`]: isActive
|
|
29
29
|
});
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import { useId } from "../../internal/useId.js";
|
|
10
|
-
import classNames from "classnames";
|
|
11
10
|
import { forwardRef } from "react";
|
|
11
|
+
import cx from "classnames";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { ChevronDown } from "@carbon/icons-react";
|
|
@@ -24,7 +24,7 @@ const SideNavSwitcher = forwardRef((props, ref) => {
|
|
|
24
24
|
const prefix = usePrefix();
|
|
25
25
|
const { className: customClassName, labelText, onChange, options } = props;
|
|
26
26
|
return /* @__PURE__ */ jsxs("div", {
|
|
27
|
-
className:
|
|
27
|
+
className: cx(`${prefix}--side-nav__switcher`, customClassName),
|
|
28
28
|
children: [
|
|
29
29
|
/* @__PURE__ */ jsx("label", {
|
|
30
30
|
htmlFor: id,
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/UIShell/SkipToContent.tsx
|
|
@@ -18,7 +18,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
19
|
*/
|
|
20
20
|
function SkipToContent({ children = "Skip to main content", className: customClassName, href = "#main-content", tabIndex = 0, ...rest }) {
|
|
21
|
-
const className =
|
|
21
|
+
const className = cx(`${usePrefix()}--skip-to-content`, customClassName);
|
|
22
22
|
return /* @__PURE__ */ jsx("a", {
|
|
23
23
|
...rest,
|
|
24
24
|
className,
|
|
@@ -11,8 +11,8 @@ import { useMergedRefs } from "../../internal/useMergedRefs.js";
|
|
|
11
11
|
import { AriaLabelPropType } from "../../prop-types/AriaPropTypes.js";
|
|
12
12
|
import SwitcherItem from "./SwitcherItem.js";
|
|
13
13
|
import SwitcherDivider from "./SwitcherDivider.js";
|
|
14
|
-
import classNames from "classnames";
|
|
15
14
|
import { Children, cloneElement, forwardRef, useRef } from "react";
|
|
15
|
+
import cx from "classnames";
|
|
16
16
|
import PropTypes from "prop-types";
|
|
17
17
|
import { jsx } from "react/jsx-runtime";
|
|
18
18
|
//#region src/components/UIShell/Switcher.tsx
|
|
@@ -31,7 +31,7 @@ const Switcher = forwardRef((props, forwardRef) => {
|
|
|
31
31
|
"aria-label": ariaLabel,
|
|
32
32
|
"aria-labelledby": ariaLabelledBy
|
|
33
33
|
};
|
|
34
|
-
const className =
|
|
34
|
+
const className = cx(`${prefix}--switcher`, { [customClassName || ""]: !!customClassName });
|
|
35
35
|
const handleSwitcherItemFocus = ({ currentIndex, direction }) => {
|
|
36
36
|
const enabledIndices = Children.toArray(children).reduce((acc, child, i) => {
|
|
37
37
|
if (isComponentElement(child, SwitcherItem) && Object.keys(child.props).length) acc.push(i);
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
-
import classNames from "classnames";
|
|
10
9
|
import "react";
|
|
10
|
+
import cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/UIShell/SwitcherDivider.tsx
|
|
14
14
|
const SwitcherDivider = ({ className: customClassName, ...other }) => {
|
|
15
|
-
const classNames
|
|
15
|
+
const classNames = cx(`${usePrefix()}--switcher__item--divider`, { [customClassName || ""]: !!customClassName });
|
|
16
16
|
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("hr", {
|
|
17
17
|
...other,
|
|
18
|
-
className: classNames
|
|
18
|
+
className: classNames
|
|
19
19
|
}) });
|
|
20
20
|
};
|
|
21
21
|
SwitcherDivider.propTypes = {
|
|
@@ -10,8 +10,8 @@ import { ArrowDown, ArrowUp } from "../../internal/keyboard/keys.js";
|
|
|
10
10
|
import { match } from "../../internal/keyboard/match.js";
|
|
11
11
|
import { AriaLabelPropType } from "../../prop-types/AriaPropTypes.js";
|
|
12
12
|
import Link from "./Link.js";
|
|
13
|
-
import classNames from "classnames";
|
|
14
13
|
import { forwardRef } from "react";
|
|
14
|
+
import cx from "classnames";
|
|
15
15
|
import PropTypes from "prop-types";
|
|
16
16
|
import { jsx } from "react/jsx-runtime";
|
|
17
17
|
//#region src/components/UIShell/SwitcherItem.tsx
|
|
@@ -24,12 +24,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
24
24
|
const SwitcherItem = forwardRef((props, forwardRef) => {
|
|
25
25
|
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className: customClassName, children, isSelected, expanded, tabIndex = expanded ? 0 : -1, index, handleSwitcherItemFocus, onKeyDown = () => {}, href, target, rel, ...rest } = props;
|
|
26
26
|
const prefix = usePrefix();
|
|
27
|
-
const classNames
|
|
27
|
+
const classNames = cx(`${prefix}--switcher__item`, { [customClassName || ""]: !!customClassName });
|
|
28
28
|
const accessibilityLabel = {
|
|
29
29
|
"aria-label": ariaLabel,
|
|
30
30
|
"aria-labelledby": ariaLabelledBy
|
|
31
31
|
};
|
|
32
|
-
const linkClassName =
|
|
32
|
+
const linkClassName = cx(`${prefix}--switcher__item-link`, { [`${prefix}--switcher__item-link--selected`]: isSelected });
|
|
33
33
|
function setTabFocus(evt) {
|
|
34
34
|
if (match(evt, ArrowDown)) {
|
|
35
35
|
evt.preventDefault();
|
|
@@ -47,7 +47,7 @@ const SwitcherItem = forwardRef((props, forwardRef) => {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return /* @__PURE__ */ jsx("li", {
|
|
50
|
-
className: classNames
|
|
50
|
+
className: classNames,
|
|
51
51
|
children: /* @__PURE__ */ jsx(Link, {
|
|
52
52
|
onKeyDown: (evt) => {
|
|
53
53
|
setTabFocus(evt);
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/UnorderedList/UnorderedList.tsx
|
|
@@ -20,7 +20,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
20
20
|
function UnorderedList({ className, nested = false, isExpressive = false, ...other }) {
|
|
21
21
|
const prefix = usePrefix();
|
|
22
22
|
return /* @__PURE__ */ jsx("ul", {
|
|
23
|
-
className:
|
|
23
|
+
className: cx(`${prefix}--list--unordered`, className, {
|
|
24
24
|
[`${prefix}--list--nested`]: nested,
|
|
25
25
|
[`${prefix}--list--expressive`]: isExpressive
|
|
26
26
|
}),
|