@carbon/react 1.112.0 → 1.113.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 +959 -959
- 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/FeatureFlags/index.d.ts +58 -0
- package/es/components/FeatureFlags/index.js +4 -2
- 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.d.ts +1 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +12 -11
- 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/FeatureFlags/index.d.ts +58 -0
- package/lib/components/FeatureFlags/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.d.ts +1 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +8 -7
- 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 +14 -11
- package/telemetry.yml +1 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import "./ListBoxPropTypes.js";
|
|
8
|
+
import { ListBoxSizePropType, ListBoxTypePropType } from "./ListBoxPropTypes.js";
|
|
9
9
|
import ListBox$1 from "./ListBox.js";
|
|
10
10
|
import ListBoxField from "./ListBoxField.js";
|
|
11
11
|
import ListBoxMenuItem from "./ListBoxMenuItem.js";
|
|
@@ -21,4 +21,4 @@ const ListBox = Object.assign(ListBox$1, {
|
|
|
21
21
|
Selection: ListBoxSelection
|
|
22
22
|
});
|
|
23
23
|
//#endregion
|
|
24
|
-
export { ListBox as default };
|
|
24
|
+
export { ListBoxSizePropType, ListBoxTypePropType, ListBox as default };
|
|
@@ -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 { Close } from "@carbon/icons-react";
|
|
@@ -38,12 +38,12 @@ function ListBoxSelection({ clearSelection, selectionCount, translateWithId: t =
|
|
|
38
38
|
const prefix = usePrefix();
|
|
39
39
|
const hasSelectionCount = (selectionCount ?? 0) > 0;
|
|
40
40
|
const hasMultipleSelections = (selectionCount ?? 0) > 1;
|
|
41
|
-
const className =
|
|
41
|
+
const className = cx(`${prefix}--list-box__selection`, {
|
|
42
42
|
[`${prefix}--tag--filter`]: hasSelectionCount,
|
|
43
43
|
[`${prefix}--list-box__selection--multi`]: hasSelectionCount
|
|
44
44
|
});
|
|
45
45
|
const description = hasMultipleSelections ? t("clear.all") : t("clear.selection");
|
|
46
|
-
const tagClasses =
|
|
46
|
+
const tagClasses = cx(`${prefix}--tag`, `${prefix}--tag--filter`, `${prefix}--tag--high-contrast`, { [`${prefix}--tag--disabled`]: disabled });
|
|
47
47
|
function onClick(event) {
|
|
48
48
|
event.stopPropagation();
|
|
49
49
|
if (disabled || readOnly) return;
|
|
@@ -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 cx from "classnames";
|
|
11
11
|
import PropTypes from "prop-types";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
import { ChevronDown } from "@carbon/icons-react";
|
|
@@ -35,7 +35,7 @@ const defaultTranslateWithId = (messageId) => {
|
|
|
35
35
|
*/
|
|
36
36
|
const ListBoxTrigger = React.forwardRef(({ isOpen, translateWithId: t = defaultTranslateWithId, ...rest }, ref) => {
|
|
37
37
|
const prefix = usePrefix();
|
|
38
|
-
const className =
|
|
38
|
+
const className = cx({
|
|
39
39
|
[`${prefix}--list-box__menu-icon`]: true,
|
|
40
40
|
[`${prefix}--list-box__menu-icon--open`]: isOpen
|
|
41
41
|
});
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import { Text } from "../Text/Text.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/ListItem/ListItem.tsx
|
|
@@ -21,7 +21,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
21
21
|
function ListItem({ className, children, ...other }) {
|
|
22
22
|
return /* @__PURE__ */ jsx(Text, {
|
|
23
23
|
as: "li",
|
|
24
|
-
className:
|
|
24
|
+
className: cx(`${usePrefix()}--list__item`, className),
|
|
25
25
|
...other,
|
|
26
26
|
children
|
|
27
27
|
});
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import { deprecate } from "../../prop-types/deprecate.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/Loading/Loading.tsx
|
|
@@ -20,12 +20,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
20
20
|
*/
|
|
21
21
|
function Loading({ active = true, className: customClassName, withOverlay = true, small = false, description = "loading", ...rest }) {
|
|
22
22
|
const prefix = usePrefix();
|
|
23
|
-
const loadingClassName =
|
|
23
|
+
const loadingClassName = cx(customClassName, {
|
|
24
24
|
[`${prefix}--loading`]: true,
|
|
25
25
|
[`${prefix}--loading--small`]: small,
|
|
26
26
|
[`${prefix}--loading--stop`]: !active
|
|
27
27
|
});
|
|
28
|
-
const overlayClassName =
|
|
28
|
+
const overlayClassName = cx({
|
|
29
29
|
[`${prefix}--loading-overlay`]: true,
|
|
30
30
|
[`${prefix}--loading-overlay--stop`]: !active
|
|
31
31
|
});
|
|
@@ -13,8 +13,8 @@ import { useMergedRefs } from "../../internal/useMergedRefs.js";
|
|
|
13
13
|
import { MenuContext, menuReducer } from "./MenuContext.js";
|
|
14
14
|
import { useLayoutDirection } from "../LayoutDirection/useLayoutDirection.js";
|
|
15
15
|
import { canUseDOM } from "../../internal/environment.js";
|
|
16
|
-
import classNames from "classnames";
|
|
17
16
|
import { forwardRef, useContext, useEffect, useMemo, useReducer, 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
|
import { createPortal } from "react-dom";
|
|
@@ -184,7 +184,7 @@ const Menu = forwardRef(function Menu({ backgroundToken = "layer", border = fals
|
|
|
184
184
|
if (open) handleOpen();
|
|
185
185
|
else setPosition([-1, -1]);
|
|
186
186
|
}, [open]);
|
|
187
|
-
const classNames
|
|
187
|
+
const classNames = cx(className, `${prefix}--menu`, `${prefix}--menu--${menuSize}`, {
|
|
188
188
|
[`${prefix}--menu--box-shadow-top`]: menuAlignment && menuAlignment.slice(0, 3) === "top",
|
|
189
189
|
[`${prefix}--menu--open`]: open,
|
|
190
190
|
[`${prefix}--menu--shown`]: open && !legacyAutoalign || position[0] >= 0 && position[1] >= 0,
|
|
@@ -198,7 +198,7 @@ const Menu = forwardRef(function Menu({ backgroundToken = "layer", border = fals
|
|
|
198
198
|
value: childContext,
|
|
199
199
|
children: /* @__PURE__ */ jsx("ul", {
|
|
200
200
|
...rest,
|
|
201
|
-
className: classNames
|
|
201
|
+
className: classNames,
|
|
202
202
|
role: "menu",
|
|
203
203
|
ref,
|
|
204
204
|
"aria-label": label,
|
|
@@ -16,8 +16,8 @@ import { MenuContext } from "./MenuContext.js";
|
|
|
16
16
|
import { useLayoutDirection } from "../LayoutDirection/useLayoutDirection.js";
|
|
17
17
|
import { Menu as Menu$1 } from "./Menu.js";
|
|
18
18
|
import { useControllableState } from "../../internal/useControllableState.js";
|
|
19
|
-
import classNames from "classnames";
|
|
20
19
|
import React, { forwardRef, useContext, useEffect, useRef, useState } from "react";
|
|
20
|
+
import cx from "classnames";
|
|
21
21
|
import PropTypes from "prop-types";
|
|
22
22
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
23
23
|
import { CaretLeft, CaretRight, Checkmark } from "@carbon/icons-react";
|
|
@@ -112,7 +112,7 @@ const MenuItem = forwardRef(function MenuItem({ children, className, dangerDescr
|
|
|
112
112
|
if (pendingKeyboardClick.current && keyboardClickEvent(e)) handleClick(e);
|
|
113
113
|
pendingKeyboardClick.current = false;
|
|
114
114
|
}
|
|
115
|
-
const classNames
|
|
115
|
+
const classNames = cx(className, `${prefix}--menu-item`, {
|
|
116
116
|
[`${prefix}--menu-item--disabled`]: isDisabled,
|
|
117
117
|
[`${prefix}--menu-item--danger`]: isDanger
|
|
118
118
|
});
|
|
@@ -145,7 +145,7 @@ const MenuItem = forwardRef(function MenuItem({ children, className, dangerDescr
|
|
|
145
145
|
role: "menuitem",
|
|
146
146
|
...rest,
|
|
147
147
|
ref,
|
|
148
|
-
className: classNames
|
|
148
|
+
className: classNames,
|
|
149
149
|
tabIndex: !disabled ? 0 : -1,
|
|
150
150
|
"aria-disabled": isDisabled ?? void 0,
|
|
151
151
|
"aria-haspopup": hasChildren ?? void 0,
|
|
@@ -249,12 +249,12 @@ const MenuItemSelectable = forwardRef(function MenuItemSelectable({ className, d
|
|
|
249
249
|
useEffect(() => {
|
|
250
250
|
if (!context.state.hasSelectableItems) context.dispatch({ type: "enableSelectableItems" });
|
|
251
251
|
}, [context.state.hasSelectableItems, context]);
|
|
252
|
-
const classNames
|
|
252
|
+
const classNames = cx(className, `${prefix}--menu-item-selectable--selected`);
|
|
253
253
|
return /* @__PURE__ */ jsx(MenuItem, {
|
|
254
254
|
...rest,
|
|
255
255
|
ref: forwardRef,
|
|
256
256
|
label,
|
|
257
|
-
className: classNames
|
|
257
|
+
className: classNames,
|
|
258
258
|
role: "menuitemcheckbox",
|
|
259
259
|
"aria-checked": checked,
|
|
260
260
|
onClick: handleClick
|
|
@@ -284,7 +284,7 @@ MenuItemSelectable.propTypes = {
|
|
|
284
284
|
};
|
|
285
285
|
const MenuItemGroup = forwardRef(function MenuItemGroup({ children, className, label, ...rest }, forwardRef) {
|
|
286
286
|
return /* @__PURE__ */ jsx("li", {
|
|
287
|
-
className:
|
|
287
|
+
className: cx(className, `${usePrefix()}--menu-item-group`),
|
|
288
288
|
role: "none",
|
|
289
289
|
ref: forwardRef,
|
|
290
290
|
children: /* @__PURE__ */ jsx("ul", {
|
|
@@ -324,7 +324,7 @@ const MenuItemRadioGroup = forwardRef(function MenuItemRadioGroup({ className, d
|
|
|
324
324
|
if (!context.state.hasSelectableItems) context.dispatch({ type: "enableSelectableItems" });
|
|
325
325
|
}, [context.state.hasSelectableItems, context]);
|
|
326
326
|
return /* @__PURE__ */ jsx("li", {
|
|
327
|
-
className:
|
|
327
|
+
className: cx(className, `${prefix}--menu-item-radio-group`),
|
|
328
328
|
role: "none",
|
|
329
329
|
ref: forwardRef,
|
|
330
330
|
children: /* @__PURE__ */ jsx("ul", {
|
|
@@ -373,10 +373,10 @@ MenuItemRadioGroup.propTypes = {
|
|
|
373
373
|
selectedItem: PropTypes.any
|
|
374
374
|
};
|
|
375
375
|
const MenuItemDivider = forwardRef(function MenuItemDivider({ className, ...rest }, forwardRef) {
|
|
376
|
-
const classNames
|
|
376
|
+
const classNames = cx(className, `${usePrefix()}--menu-item-divider`);
|
|
377
377
|
return /* @__PURE__ */ jsx("li", {
|
|
378
378
|
...rest,
|
|
379
|
-
className: classNames
|
|
379
|
+
className: classNames,
|
|
380
380
|
role: "separator",
|
|
381
381
|
ref: forwardRef
|
|
382
382
|
});
|
|
@@ -13,8 +13,8 @@ import Button_default from "../Button/index.js";
|
|
|
13
13
|
import { mergeRefs } from "../../tools/mergeRefs.js";
|
|
14
14
|
import { Menu as Menu$1 } from "../Menu/Menu.js";
|
|
15
15
|
import { useAttachedMenu } from "../../internal/useAttachedMenu.js";
|
|
16
|
-
import classNames from "classnames";
|
|
17
16
|
import { forwardRef, useRef } from "react";
|
|
17
|
+
import cx from "classnames";
|
|
18
18
|
import PropTypes from "prop-types";
|
|
19
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
20
|
import { ChevronDown } from "@carbon/icons-react";
|
|
@@ -74,9 +74,9 @@ const MenuButton = forwardRef(({ children, className, disabled, kind = defaultBu
|
|
|
74
74
|
function handleClick() {
|
|
75
75
|
if (triggerRef.current) hookOnClick();
|
|
76
76
|
}
|
|
77
|
-
const containerClasses =
|
|
78
|
-
const triggerClasses =
|
|
79
|
-
const menuClasses =
|
|
77
|
+
const containerClasses = cx(`${prefix}--menu-button__container`, className);
|
|
78
|
+
const triggerClasses = cx(`${prefix}--menu-button__trigger`, { [`${prefix}--menu-button__trigger--open`]: open });
|
|
79
|
+
const menuClasses = cx(`${prefix}--menu-button__${menuAlignment}`);
|
|
80
80
|
return /* @__PURE__ */ jsxs("div", {
|
|
81
81
|
...rest,
|
|
82
82
|
ref,
|
|
@@ -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";
|
|
9
|
+
import { warning } from "../../internal/warning.js";
|
|
8
10
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
11
|
import { Text } from "../Text/Text.js";
|
|
10
12
|
import { Enter, Escape, Tab } from "../../internal/keyboard/keys.js";
|
|
11
13
|
import { match } from "../../internal/keyboard/match.js";
|
|
12
14
|
import { selectorTabbable } from "../../internal/keyboard/navigation.js";
|
|
13
15
|
import { useId } from "../../internal/useId.js";
|
|
14
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
15
|
-
import { warning } from "../../internal/warning.js";
|
|
16
16
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
17
17
|
import { isComponentElement } from "../../internal/utils.js";
|
|
18
18
|
import { useMergedRefs } from "../../internal/useMergedRefs.js";
|
|
@@ -32,8 +32,8 @@ import { isTopmostVisibleModal } from "./isTopmostVisibleModal.js";
|
|
|
32
32
|
import { requiredIfGivenPropIsTruthy } from "../../prop-types/requiredIfGivenPropIsTruthy.js";
|
|
33
33
|
import { usePreviousValue } from "../../internal/usePreviousValue.js";
|
|
34
34
|
import { ModalPresence, ModalPresenceContext, useExclusiveModalPresenceContext } from "./ModalPresence.js";
|
|
35
|
-
import classNames from "classnames";
|
|
36
35
|
import React, { cloneElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
36
|
+
import cx from "classnames";
|
|
37
37
|
import PropTypes from "prop-types";
|
|
38
38
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
39
39
|
import { Close } from "@carbon/icons-react";
|
|
@@ -88,7 +88,7 @@ const ModalDialog = React.forwardRef(function ModalDialog({ "aria-label": ariaLa
|
|
|
88
88
|
const modalHeadingId = `${prefix}--modal-header__heading--${modalInstanceId}`;
|
|
89
89
|
const modalBodyId = `${prefix}--modal-body--${modalInstanceId}`;
|
|
90
90
|
const modalCloseButtonClass = `${prefix}--modal-close`;
|
|
91
|
-
const primaryButtonClass =
|
|
91
|
+
const primaryButtonClass = cx({ [`${prefix}--btn--loading`]: loadingStatus !== "inactive" });
|
|
92
92
|
const loadingActive = loadingStatus !== "inactive";
|
|
93
93
|
const presenceContext = useContext(ModalPresenceContext);
|
|
94
94
|
const mergedRefs = useMergedRefs([
|
|
@@ -155,7 +155,7 @@ const ModalDialog = React.forwardRef(function ModalDialog({ "aria-label": ariaLa
|
|
|
155
155
|
}
|
|
156
156
|
const onSecondaryButtonClick = onSecondarySubmit ? onSecondarySubmit : onRequestClose;
|
|
157
157
|
const { height } = useResizeObserver({ ref: contentRef });
|
|
158
|
-
const modalClasses =
|
|
158
|
+
const modalClasses = cx(`${prefix}--modal`, {
|
|
159
159
|
[`${prefix}--modal-tall`]: !passiveModal,
|
|
160
160
|
"is-visible": enablePresence || open,
|
|
161
161
|
[`${prefix}--modal--enable-presence`]: presenceContext?.autoEnablePresence,
|
|
@@ -163,7 +163,7 @@ const ModalDialog = React.forwardRef(function ModalDialog({ "aria-label": ariaLa
|
|
|
163
163
|
[`${prefix}--modal--slug`]: slug,
|
|
164
164
|
[`${prefix}--modal--decorator`]: decorator
|
|
165
165
|
}, className);
|
|
166
|
-
const containerClasses =
|
|
166
|
+
const containerClasses = cx(`${prefix}--modal-container`, {
|
|
167
167
|
[`${prefix}--modal-container--${size}`]: size,
|
|
168
168
|
[`${prefix}--modal-container--full-width`]: isFullWidth
|
|
169
169
|
});
|
|
@@ -179,11 +179,11 @@ const ModalDialog = React.forwardRef(function ModalDialog({ "aria-label": ariaLa
|
|
|
179
179
|
if (diff > 5) setIsScrollable(true);
|
|
180
180
|
else if (diff < -5) setIsScrollable(false);
|
|
181
181
|
}, [currentScrollHeight, currentClientHeight]);
|
|
182
|
-
const contentClasses =
|
|
182
|
+
const contentClasses = cx(`${prefix}--modal-content`, {
|
|
183
183
|
[`${prefix}--modal-scroll-content`]: hasScrollingContent || isScrollable,
|
|
184
184
|
[`${prefix}--modal-scroll-content--no-fade`]: height <= 300
|
|
185
185
|
});
|
|
186
|
-
const footerClasses =
|
|
186
|
+
const footerClasses = cx(`${prefix}--modal-footer`, { [`${prefix}--modal-footer--three-button`]: Array.isArray(secondaryButtons) && secondaryButtons.length === 2 });
|
|
187
187
|
const asStringOrUndefined = (node) => {
|
|
188
188
|
return typeof node === "string" ? node : void 0;
|
|
189
189
|
};
|
|
@@ -654,4 +654,4 @@ Modal.propTypes = {
|
|
|
654
654
|
slug: deprecate(PropTypes.node, "The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.")
|
|
655
655
|
};
|
|
656
656
|
//#endregion
|
|
657
|
-
export { Modal as default };
|
|
657
|
+
export { ModalSizes, Modal as default };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { usePresenceContext } from "../../internal/usePresenceContext.js";
|
|
8
|
+
import { PresenceHoldContext, usePresenceContext } from "../../internal/usePresenceContext.js";
|
|
9
9
|
import { createContext, useContext, useMemo } from "react";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/Modal/ModalPresence.tsx
|
|
@@ -24,7 +24,10 @@ const ModalPresence = ({ open, _presenceId: presenceId, _autoEnablePresence: aut
|
|
|
24
24
|
if (!isPresent) return null;
|
|
25
25
|
return /* @__PURE__ */ jsx(ModalPresenceContext.Provider, {
|
|
26
26
|
value: contextValue,
|
|
27
|
-
children
|
|
27
|
+
children: /* @__PURE__ */ jsx(PresenceHoldContext.Provider, {
|
|
28
|
+
value: contextValue,
|
|
29
|
+
children
|
|
30
|
+
})
|
|
28
31
|
});
|
|
29
32
|
};
|
|
30
33
|
const ModalPresenceContext = createContext(void 0);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import "./ModalPresence.js";
|
|
8
|
+
import { ModalPresence, withModalPresence } from "./ModalPresence.js";
|
|
9
9
|
import Modal from "./Modal.js";
|
|
10
10
|
//#region src/components/Modal/index.ts
|
|
11
11
|
/**
|
|
@@ -16,4 +16,4 @@ import Modal from "./Modal.js";
|
|
|
16
16
|
*/
|
|
17
17
|
var Modal_default = Modal;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { Modal_default as default };
|
|
19
|
+
export { Modal, ModalPresence, Modal_default as default, withModalPresence };
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Escape } from "../../internal/keyboard/keys.js";
|
|
9
|
-
import { match } from "../../internal/keyboard/match.js";
|
|
10
8
|
import { noopFn } from "../../internal/noopFn.js";
|
|
11
9
|
import { warning } from "../../internal/warning.js";
|
|
10
|
+
import { Escape } from "../../internal/keyboard/keys.js";
|
|
11
|
+
import { match } from "../../internal/keyboard/match.js";
|
|
12
12
|
import { ButtonKinds } from "../Button/Button.js";
|
|
13
13
|
import Button_default from "../Button/index.js";
|
|
14
14
|
import Modal_default from "../Modal/index.js";
|
|
@@ -125,8 +125,7 @@ export interface FilterableMultiSelectProps<ItemType> extends MultiSelectSorting
|
|
|
125
125
|
selectedItems: ItemType[];
|
|
126
126
|
}): void;
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
129
|
-
* to communicate to the currently typed input.
|
|
128
|
+
* Called whenever the input value changes.
|
|
130
129
|
*/
|
|
131
130
|
onInputValueChange?: UseComboboxProps<ItemType>['onInputValueChange'];
|
|
132
131
|
/**
|
|
@@ -29,8 +29,8 @@ import { sortingPropTypes } from "./MultiSelectPropTypes.js";
|
|
|
29
29
|
import { isSelectAllItem } from "./tools/isSelectAllItem.js";
|
|
30
30
|
import { defaultCompareItems, defaultSortItems } from "./tools/sorting.js";
|
|
31
31
|
import { useSelection } from "../../internal/Selection.js";
|
|
32
|
-
import classNames from "classnames";
|
|
33
32
|
import { cloneElement, forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
33
|
+
import cx from "classnames";
|
|
34
34
|
import PropTypes from "prop-types";
|
|
35
35
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
36
|
import { WarningAltFilled, WarningFilled } from "@carbon/icons-react";
|
|
@@ -84,8 +84,10 @@ const FilterableMultiSelect = forwardRef(function FilterableMultiSelect({ autoAl
|
|
|
84
84
|
const handleSelectAllClick = useCallback(() => {
|
|
85
85
|
const selectable = nonSelectAllItems.filter((item) => !isItemDisabled(item));
|
|
86
86
|
const { checked, indeterminate } = selectAllStatus;
|
|
87
|
-
if (checked || indeterminate)
|
|
88
|
-
|
|
87
|
+
if (checked || indeterminate) {
|
|
88
|
+
const remainingSelectedItems = controlledSelectedItems.filter((sel) => !filteredItems.some((e) => isEqual(e, sel)));
|
|
89
|
+
toggleAll(remainingSelectedItems);
|
|
90
|
+
} else {
|
|
89
91
|
const toSelect = selectable.filter((e) => !controlledSelectedItems.some((sel) => isEqual(sel, e)));
|
|
90
92
|
toggleAll([...controlledSelectedItems, ...toSelect]);
|
|
91
93
|
}
|
|
@@ -167,7 +169,7 @@ const FilterableMultiSelect = forwardRef(function FilterableMultiSelect({ autoAl
|
|
|
167
169
|
const inline = type === "inline";
|
|
168
170
|
const showWarning = normalizedProps.warn;
|
|
169
171
|
const showHelperText = !normalizedProps.warn && !normalizedProps.invalid;
|
|
170
|
-
const wrapperClasses =
|
|
172
|
+
const wrapperClasses = cx(`${prefix}--multi-select__wrapper`, `${prefix}--multi-select--filterable__wrapper`, `${prefix}--list-box__wrapper`, containerClassName, {
|
|
171
173
|
[`${prefix}--multi-select__wrapper--inline`]: inline,
|
|
172
174
|
[`${prefix}--list-box__wrapper--inline`]: inline,
|
|
173
175
|
[`${prefix}--multi-select__wrapper--inline--invalid`]: inline && normalizedProps.invalid,
|
|
@@ -181,16 +183,16 @@ const FilterableMultiSelect = forwardRef(function FilterableMultiSelect({ autoAl
|
|
|
181
183
|
const hasHelper = hasHelperText(helperText);
|
|
182
184
|
const helperId = !hasHelper ? void 0 : `filterablemultiselect-helper-text-${filterableMultiSelectInstanceId}`;
|
|
183
185
|
const labelId = `${id}-label`;
|
|
184
|
-
const titleClasses =
|
|
186
|
+
const titleClasses = cx({
|
|
185
187
|
[`${prefix}--label`]: true,
|
|
186
188
|
[`${prefix}--label--disabled`]: disabled,
|
|
187
189
|
[`${prefix}--visually-hidden`]: hideLabel
|
|
188
190
|
});
|
|
189
|
-
const helperClasses =
|
|
191
|
+
const helperClasses = cx({
|
|
190
192
|
[`${prefix}--form__helper-text`]: true,
|
|
191
193
|
[`${prefix}--form__helper-text--disabled`]: disabled
|
|
192
194
|
});
|
|
193
|
-
const inputClasses =
|
|
195
|
+
const inputClasses = cx({
|
|
194
196
|
[`${prefix}--text-input`]: true,
|
|
195
197
|
[`${prefix}--text-input--empty`]: !inputValue,
|
|
196
198
|
[`${prefix}--text-input--light`]: light
|
|
@@ -255,6 +257,7 @@ const FilterableMultiSelect = forwardRef(function FilterableMultiSelect({ autoAl
|
|
|
255
257
|
menuId,
|
|
256
258
|
inputId,
|
|
257
259
|
inputValue,
|
|
260
|
+
onInputValueChange,
|
|
258
261
|
stateReducer,
|
|
259
262
|
isItemDisabled
|
|
260
263
|
});
|
|
@@ -290,7 +293,6 @@ const FilterableMultiSelect = forwardRef(function FilterableMultiSelect({ autoAl
|
|
|
290
293
|
highlightedIndex: controlledSelectedItems.length > 0 ? 0 : -1
|
|
291
294
|
};
|
|
292
295
|
case InputChange:
|
|
293
|
-
if (onInputValueChange) onInputValueChange(changes);
|
|
294
296
|
setInputValue(changes.inputValue ?? "");
|
|
295
297
|
setIsOpen(true);
|
|
296
298
|
return {
|
|
@@ -379,7 +381,7 @@ const FilterableMultiSelect = forwardRef(function FilterableMultiSelect({ autoAl
|
|
|
379
381
|
const candidateIsAILabel = isComponentElement(candidate, AILabel);
|
|
380
382
|
const normalizedDecorator = candidateIsAILabel ? cloneElement(candidate, { size: "mini" }) : candidate;
|
|
381
383
|
const selectedItemsLength = controlledSelectedItems.filter((item) => !isSelectAllItem(item)).length;
|
|
382
|
-
const className =
|
|
384
|
+
const className = cx(`${prefix}--multi-select`, `${prefix}--combo-box`, `${prefix}--multi-select--filterable`, {
|
|
383
385
|
[`${prefix}--multi-select--invalid`]: normalizedProps.invalid,
|
|
384
386
|
[`${prefix}--multi-select--invalid--focused`]: inputFocused && normalizedProps.invalid,
|
|
385
387
|
[`${prefix}--multi-select--open`]: isOpen,
|
|
@@ -684,8 +686,7 @@ FilterableMultiSelect.propTypes = {
|
|
|
684
686
|
*/
|
|
685
687
|
onChange: PropTypes.func,
|
|
686
688
|
/**
|
|
687
|
-
*
|
|
688
|
-
* the currently typed input.
|
|
689
|
+
* Called whenever the input value changes.
|
|
689
690
|
*/
|
|
690
691
|
onInputValueChange: PropTypes.func,
|
|
691
692
|
/**
|
|
@@ -5,12 +5,12 @@
|
|
|
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 { ArrowDown, Delete, Enter, Escape, Space, Tab } from "../../internal/keyboard/keys.js";
|
|
10
11
|
import { match } from "../../internal/keyboard/match.js";
|
|
11
12
|
import useIsomorphicEffect from "../../internal/useIsomorphicEffect.js";
|
|
12
13
|
import { useId } from "../../internal/useId.js";
|
|
13
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
14
14
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
15
15
|
import { defaultItemToString } from "../../internal/defaultItemToString.js";
|
|
16
16
|
import { isItemDisabled } from "../../internal/isItemDisabled.js";
|
|
@@ -27,8 +27,8 @@ import { sortingPropTypes } from "./MultiSelectPropTypes.js";
|
|
|
27
27
|
import { isSelectAllItem } from "./tools/isSelectAllItem.js";
|
|
28
28
|
import { defaultCompareItems, defaultSortItems } from "./tools/sorting.js";
|
|
29
29
|
import { useSelection } from "../../internal/Selection.js";
|
|
30
|
-
import classNames from "classnames";
|
|
31
30
|
import React, { cloneElement, isValidElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
31
|
+
import cx from "classnames";
|
|
32
32
|
import PropTypes from "prop-types";
|
|
33
33
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
34
|
import { WarningAltFilled, WarningFilled } from "@carbon/icons-react";
|
|
@@ -171,7 +171,7 @@ const MultiSelect = React.forwardRef(({ autoAlign = false, className: containerC
|
|
|
171
171
|
const inline = type === "inline";
|
|
172
172
|
const showWarning = normalizedProps.warn;
|
|
173
173
|
const showHelperText = !normalizedProps.warn && !normalizedProps.invalid && helperText;
|
|
174
|
-
const wrapperClasses =
|
|
174
|
+
const wrapperClasses = cx(`${prefix}--multi-select__wrapper`, `${prefix}--list-box__wrapper`, containerClassName, {
|
|
175
175
|
[`${prefix}--multi-select__wrapper--inline`]: inline,
|
|
176
176
|
[`${prefix}--list-box__wrapper--inline`]: inline,
|
|
177
177
|
[`${prefix}--multi-select__wrapper--inline--invalid`]: inline && normalizedProps.invalid,
|
|
@@ -180,14 +180,14 @@ const MultiSelect = React.forwardRef(({ autoAlign = false, className: containerC
|
|
|
180
180
|
[`${prefix}--list-box__wrapper--slug`]: slug,
|
|
181
181
|
[`${prefix}--list-box__wrapper--decorator`]: decorator
|
|
182
182
|
});
|
|
183
|
-
const titleClasses =
|
|
183
|
+
const titleClasses = cx(`${prefix}--label`, {
|
|
184
184
|
[`${prefix}--label--disabled`]: disabled,
|
|
185
185
|
[`${prefix}--visually-hidden`]: hideLabel
|
|
186
186
|
});
|
|
187
187
|
const helperId = !helperText ? void 0 : `multiselect-helper-text-${multiSelectInstanceId}`;
|
|
188
188
|
const fieldLabelId = `multiselect-field-label-${multiSelectInstanceId}`;
|
|
189
|
-
const helperClasses =
|
|
190
|
-
const className =
|
|
189
|
+
const helperClasses = cx(`${prefix}--form__helper-text`, { [`${prefix}--form__helper-text--disabled`]: disabled });
|
|
190
|
+
const className = cx(`${prefix}--multi-select`, {
|
|
191
191
|
[`${prefix}--multi-select--invalid`]: normalizedProps.invalid,
|
|
192
192
|
[`${prefix}--multi-select--invalid--focused`]: inputFocused && normalizedProps.invalid,
|
|
193
193
|
[`${prefix}--multi-select--warning`]: showWarning,
|
|
@@ -263,7 +263,7 @@ const MultiSelect = React.forwardRef(({ autoAlign = false, className: containerC
|
|
|
263
263
|
}
|
|
264
264
|
return changes;
|
|
265
265
|
}
|
|
266
|
-
const multiSelectFieldWrapperClasses =
|
|
266
|
+
const multiSelectFieldWrapperClasses = cx(`${prefix}--list-box__field--wrapper`, { [`${prefix}--list-box__field--wrapper--input-focused`]: inputFocused });
|
|
267
267
|
const readOnlyEventHandlers = readOnly ? {
|
|
268
268
|
onClick: (evt) => {
|
|
269
269
|
evt.preventDefault();
|
|
@@ -5,22 +5,22 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { noopFn } from "../../internal/noopFn.js";
|
|
9
|
+
import { warning } from "../../internal/warning.js";
|
|
8
10
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
11
|
import { Text } from "../Text/Text.js";
|
|
10
12
|
import { Escape, Tab } from "../../internal/keyboard/keys.js";
|
|
11
13
|
import { match, matches } from "../../internal/keyboard/match.js";
|
|
12
14
|
import useIsomorphicEffect from "../../internal/useIsomorphicEffect.js";
|
|
13
15
|
import { useId } from "../../internal/useId.js";
|
|
14
|
-
import { noopFn } from "../../internal/noopFn.js";
|
|
15
|
-
import { warning } from "../../internal/warning.js";
|
|
16
16
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
17
17
|
import { deprecateValuesWithin } from "../../prop-types/deprecateValuesWithin.js";
|
|
18
18
|
import { useFeatureFlag } from "../FeatureFlags/index.js";
|
|
19
19
|
import { useInteractiveChildrenNeedDescription, useNoInteractiveChildren } from "../../internal/useNoInteractiveChildren.js";
|
|
20
20
|
import Button_default from "../Button/index.js";
|
|
21
21
|
import { wrapFocus, wrapFocusWithoutSentinels } from "../../internal/wrapFocus.js";
|
|
22
|
-
import classNames from "classnames";
|
|
23
22
|
import { useEffect, useRef, useState } from "react";
|
|
23
|
+
import cx from "classnames";
|
|
24
24
|
import PropTypes from "prop-types";
|
|
25
25
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
26
|
import { CheckmarkFilled, Close, ErrorFilled, InformationFilled, InformationSquareFilled, WarningAltFilled, WarningFilled } from "@carbon/icons-react";
|
|
@@ -49,7 +49,7 @@ function useEscapeToClose(ref, callback, override = true) {
|
|
|
49
49
|
}
|
|
50
50
|
function NotificationActionButton({ children, className: customClassName, onClick, inline, ...rest }) {
|
|
51
51
|
return /* @__PURE__ */ jsx(Button_default, {
|
|
52
|
-
className:
|
|
52
|
+
className: cx(customClassName, { [`${usePrefix()}--actionable-notification__action-button`]: true }),
|
|
53
53
|
kind: inline ? "ghost" : "tertiary",
|
|
54
54
|
onClick,
|
|
55
55
|
size: "sm",
|
|
@@ -77,8 +77,8 @@ NotificationActionButton.propTypes = {
|
|
|
77
77
|
};
|
|
78
78
|
function NotificationButton({ "aria-label": ariaLabel = "close notification", ariaLabel: deprecatedAriaLabel, className, type = "button", renderIcon: IconTag = Close, name, notificationType = "toast", ...rest }) {
|
|
79
79
|
const prefix = usePrefix();
|
|
80
|
-
const buttonClassName =
|
|
81
|
-
const iconClassName =
|
|
80
|
+
const buttonClassName = cx(className, { [`${prefix}--${notificationType}-notification__close-button`]: notificationType });
|
|
81
|
+
const iconClassName = cx({ [`${prefix}--${notificationType}-notification__close-icon`]: notificationType });
|
|
82
82
|
return /* @__PURE__ */ jsx("button", {
|
|
83
83
|
...rest,
|
|
84
84
|
type,
|
|
@@ -164,7 +164,7 @@ NotificationIcon.propTypes = {
|
|
|
164
164
|
function ToastNotification({ ["aria-label"]: ariaLabel, ariaLabel: deprecatedAriaLabel, role = "status", onClose, onCloseButtonClick = noopFn, statusIconDescription, className, children, kind = "error", lowContrast, hideCloseButton = false, timeout = 0, title, caption, subtitle, ...rest }) {
|
|
165
165
|
const [isOpen, setIsOpen] = useState(true);
|
|
166
166
|
const prefix = usePrefix();
|
|
167
|
-
const containerClassName =
|
|
167
|
+
const containerClassName = cx(className, {
|
|
168
168
|
[`${prefix}--toast-notification`]: true,
|
|
169
169
|
[`${prefix}--toast-notification--low-contrast`]: lowContrast,
|
|
170
170
|
[`${prefix}--toast-notification--${kind}`]: kind
|
|
@@ -313,7 +313,7 @@ ToastNotification.propTypes = {
|
|
|
313
313
|
function InlineNotification({ ["aria-label"]: ariaLabel, children, title, subtitle, role = "status", onClose, onCloseButtonClick = noopFn, statusIconDescription, className, kind = "error", lowContrast, hideCloseButton = false, ...rest }) {
|
|
314
314
|
const [isOpen, setIsOpen] = useState(true);
|
|
315
315
|
const prefix = usePrefix();
|
|
316
|
-
const containerClassName =
|
|
316
|
+
const containerClassName = cx(className, {
|
|
317
317
|
[`${prefix}--inline-notification`]: true,
|
|
318
318
|
[`${prefix}--inline-notification--low-contrast`]: lowContrast,
|
|
319
319
|
[`${prefix}--inline-notification--${kind}`]: kind,
|
|
@@ -432,7 +432,7 @@ function ActionableNotification({ actionButtonLabel, ["aria-label"]: ariaLabel,
|
|
|
432
432
|
const prefix = usePrefix();
|
|
433
433
|
const id = useId("actionable-notification");
|
|
434
434
|
const subtitleId = useId("actionable-notification-subtitle");
|
|
435
|
-
const containerClassName =
|
|
435
|
+
const containerClassName = cx(className, {
|
|
436
436
|
[`${prefix}--actionable-notification`]: true,
|
|
437
437
|
[`${prefix}--actionable-notification--toast`]: !inline,
|
|
438
438
|
[`${prefix}--actionable-notification--low-contrast`]: lowContrast,
|
|
@@ -648,7 +648,7 @@ const propMappingFunction = (deprecatedValue) => {
|
|
|
648
648
|
};
|
|
649
649
|
function Callout({ actionButtonLabel, children, onActionButtonClick, title, titleId, subtitle, statusIconDescription, className, kind = "info", lowContrast, ...rest }) {
|
|
650
650
|
const prefix = usePrefix();
|
|
651
|
-
const containerClassName =
|
|
651
|
+
const containerClassName = cx(className, {
|
|
652
652
|
[`${prefix}--actionable-notification`]: true,
|
|
653
653
|
[`${prefix}--actionable-notification--low-contrast`]: lowContrast,
|
|
654
654
|
[`${prefix}--actionable-notification--${kind}`]: kind,
|
|
@@ -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/NumberInput/NumberInput.Skeleton.tsx
|
|
@@ -20,7 +20,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
20
20
|
function NumberInputSkeleton({ hideLabel, className, size = "md", ...rest }) {
|
|
21
21
|
const prefix = usePrefix();
|
|
22
22
|
return /* @__PURE__ */ jsxs("div", {
|
|
23
|
-
className:
|
|
23
|
+
className: cx(`${prefix}--form-item`, className),
|
|
24
24
|
...rest,
|
|
25
25
|
children: [!hideLabel && /* @__PURE__ */ jsx("span", { className: `${prefix}--label ${prefix}--skeleton` }), /* @__PURE__ */ jsx("div", { className: `${prefix}--number ${prefix}--skeleton ${prefix}--number--${size}` })]
|
|
26
26
|
});
|