@patternfly/react-core 6.2.0-prerelease.32 → 6.2.0-prerelease.34
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/CHANGELOG.md +22 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Content/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/dynamic-modules.json +1 -0
- package/dist/esm/components/Alert/Alert.d.ts +3 -3
- package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
- package/dist/esm/components/Alert/Alert.js +31 -5
- package/dist/esm/components/Alert/Alert.js.map +1 -1
- package/dist/esm/components/Alert/AlertActionCloseButton.d.ts.map +1 -1
- package/dist/esm/components/Alert/AlertActionCloseButton.js +18 -1
- package/dist/esm/components/Alert/AlertActionCloseButton.js.map +1 -1
- package/dist/esm/components/Alert/AlertGroup.d.ts +4 -0
- package/dist/esm/components/Alert/AlertGroup.d.ts.map +1 -1
- package/dist/esm/components/Alert/AlertGroup.js +3 -3
- package/dist/esm/components/Alert/AlertGroup.js.map +1 -1
- package/dist/esm/components/Alert/AlertGroupContext.d.ts +8 -0
- package/dist/esm/components/Alert/AlertGroupContext.d.ts.map +1 -0
- package/dist/esm/components/Alert/AlertGroupContext.js +6 -0
- package/dist/esm/components/Alert/AlertGroupContext.js.map +1 -0
- package/dist/esm/components/Alert/AlertGroupInline.d.ts.map +1 -1
- package/dist/esm/components/Alert/AlertGroupInline.js +28 -6
- package/dist/esm/components/Alert/AlertGroupInline.js.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts +2 -2
- package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/esm/components/Card/Card.d.ts +2 -2
- package/dist/esm/components/Card/Card.d.ts.map +1 -1
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Card/CardHeader.d.ts +2 -0
- package/dist/esm/components/Card/CardHeader.d.ts.map +1 -1
- package/dist/esm/components/Card/CardHeader.js +2 -2
- package/dist/esm/components/Card/CardHeader.js.map +1 -1
- package/dist/esm/components/Card/CardTitle.d.ts +2 -2
- package/dist/esm/components/Card/CardTitle.d.ts.map +1 -1
- package/dist/esm/components/Card/CardTitle.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts +4 -0
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js +15 -9
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/esm/components/NotificationBadge/NotificationBadge.d.ts +7 -0
- package/dist/esm/components/NotificationBadge/NotificationBadge.d.ts.map +1 -1
- package/dist/esm/components/NotificationBadge/NotificationBadge.js +21 -4
- package/dist/esm/components/NotificationBadge/NotificationBadge.js.map +1 -1
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Page/PageSection.d.ts +2 -2
- package/dist/esm/components/Page/PageSection.d.ts.map +1 -1
- package/dist/esm/components/Page/PageSection.js.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.d.ts +3 -0
- package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.js +3 -2
- package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.d.ts +9 -0
- package/dist/esm/components/Toolbar/ToolbarContent.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.js +2 -2
- package/dist/esm/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts +9 -0
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.js +2 -2
- package/dist/esm/components/Toolbar/ToolbarGroup.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.d.ts +9 -0
- package/dist/esm/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.js +2 -2
- package/dist/esm/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/esm/components/Truncate/Truncate.d.ts +6 -2
- package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/esm/components/Truncate/Truncate.js +4 -3
- package/dist/esm/components/Truncate/Truncate.js.map +1 -1
- package/dist/esm/helpers/resizeObserver.d.ts +2 -2
- package/dist/esm/helpers/resizeObserver.js +2 -2
- package/dist/js/components/Alert/Alert.d.ts +3 -3
- package/dist/js/components/Alert/Alert.d.ts.map +1 -1
- package/dist/js/components/Alert/Alert.js +30 -4
- package/dist/js/components/Alert/Alert.js.map +1 -1
- package/dist/js/components/Alert/AlertActionCloseButton.d.ts.map +1 -1
- package/dist/js/components/Alert/AlertActionCloseButton.js +18 -1
- package/dist/js/components/Alert/AlertActionCloseButton.js.map +1 -1
- package/dist/js/components/Alert/AlertGroup.d.ts +4 -0
- package/dist/js/components/Alert/AlertGroup.d.ts.map +1 -1
- package/dist/js/components/Alert/AlertGroup.js +3 -3
- package/dist/js/components/Alert/AlertGroup.js.map +1 -1
- package/dist/js/components/Alert/AlertGroupContext.d.ts +8 -0
- package/dist/js/components/Alert/AlertGroupContext.d.ts.map +1 -0
- package/dist/js/components/Alert/AlertGroupContext.js +9 -0
- package/dist/js/components/Alert/AlertGroupContext.js.map +1 -0
- package/dist/js/components/Alert/AlertGroupInline.d.ts.map +1 -1
- package/dist/js/components/Alert/AlertGroupInline.js +27 -5
- package/dist/js/components/Alert/AlertGroupInline.js.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.d.ts +2 -2
- package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/js/components/Card/Card.d.ts +2 -2
- package/dist/js/components/Card/Card.d.ts.map +1 -1
- package/dist/js/components/Card/Card.js.map +1 -1
- package/dist/js/components/Card/CardHeader.d.ts +2 -0
- package/dist/js/components/Card/CardHeader.d.ts.map +1 -1
- package/dist/js/components/Card/CardHeader.js +2 -2
- package/dist/js/components/Card/CardHeader.js.map +1 -1
- package/dist/js/components/Card/CardTitle.d.ts +2 -2
- package/dist/js/components/Card/CardTitle.d.ts.map +1 -1
- package/dist/js/components/Card/CardTitle.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts +4 -0
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js +14 -8
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/js/components/NotificationBadge/NotificationBadge.d.ts +7 -0
- package/dist/js/components/NotificationBadge/NotificationBadge.d.ts.map +1 -1
- package/dist/js/components/NotificationBadge/NotificationBadge.js +21 -4
- package/dist/js/components/NotificationBadge/NotificationBadge.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/Page.js.map +1 -1
- package/dist/js/components/Page/PageSection.d.ts +2 -2
- package/dist/js/components/Page/PageSection.d.ts.map +1 -1
- package/dist/js/components/Page/PageSection.js.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.d.ts +3 -0
- package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.js +3 -2
- package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarContent.d.ts +9 -0
- package/dist/js/components/Toolbar/ToolbarContent.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarContent.js +2 -2
- package/dist/js/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts +9 -0
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.js +2 -2
- package/dist/js/components/Toolbar/ToolbarGroup.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.d.ts +9 -0
- package/dist/js/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.js +2 -2
- package/dist/js/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/js/components/Truncate/Truncate.d.ts +6 -2
- package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/js/components/Truncate/Truncate.js +4 -3
- package/dist/js/components/Truncate/Truncate.js.map +1 -1
- package/dist/js/helpers/resizeObserver.d.ts +2 -2
- package/dist/js/helpers/resizeObserver.js +2 -2
- package/dist/umd/assets/{output-wTo4uWW3.css → output-DwKAaf_N.css} +20023 -19884
- package/dist/umd/react-core.min.js +3 -3
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +6 -6
- package/src/components/Accordion/examples/Accordion.md +1 -0
- package/src/components/Accordion/examples/AccordionBordered.tsx +3 -2
- package/src/components/Accordion/examples/AccordionDefinitionList.tsx +2 -1
- package/src/components/Accordion/examples/AccordionFixedWithMultipleExpandBehavior.tsx +2 -1
- package/src/components/Accordion/examples/AccordionSingleExpandBehavior.tsx +2 -1
- package/src/components/Accordion/examples/AccordionToggleIconAtStart.tsx +2 -1
- package/src/components/ActionList/examples/ActionList.md +1 -1
- package/src/components/ActionList/examples/ActionListSingleGroup.tsx +2 -2
- package/src/components/Alert/Alert.tsx +36 -7
- package/src/components/Alert/AlertActionCloseButton.tsx +34 -14
- package/src/components/Alert/AlertGroup.tsx +6 -0
- package/src/components/Alert/AlertGroupContext.tsx +11 -0
- package/src/components/Alert/AlertGroupInline.tsx +61 -22
- package/src/components/Alert/__tests__/AlertActionCloseButton.test.tsx +20 -2
- package/src/components/Alert/__tests__/AlertGroup.test.tsx +48 -5
- package/src/components/Alert/examples/Alert.md +42 -33
- package/src/components/Alert/examples/AlertAsyncLiveRegion.tsx +5 -5
- package/src/components/Alert/examples/AlertDynamicLiveRegion.tsx +1 -1
- package/src/components/Alert/examples/AlertGroupAsync.tsx +5 -5
- package/src/components/Alert/examples/AlertGroupMultipleDynamic.tsx +3 -3
- package/src/components/Alert/examples/AlertGroupSingularDynamic.tsx +3 -3
- package/src/components/Alert/examples/AlertGroupSingularDynamicOverflow.tsx +4 -4
- package/src/components/Alert/examples/AlertGroupToast.tsx +3 -3
- package/src/components/Alert/examples/AlertGroupToastOverflowCapture.tsx +4 -4
- package/src/components/Breadcrumb/examples/Breadcrumb.md +1 -0
- package/src/components/Breadcrumb/examples/BreadcrumbDropdown.tsx +3 -2
- package/src/components/Button/examples/Button.md +1 -1
- package/src/components/Button/examples/ButtonProgress.tsx +5 -4
- package/src/components/CalendarMonth/CalendarMonth.tsx +2 -2
- package/src/components/CalendarMonth/examples/CalendarMonth.md +1 -0
- package/src/components/CalendarMonth/examples/CalendarMonthSelectableDate.tsx +2 -1
- package/src/components/Card/Card.tsx +2 -2
- package/src/components/Card/CardHeader.tsx +9 -1
- package/src/components/Card/CardTitle.tsx +2 -2
- package/src/components/Card/__tests__/Card.test.tsx +1 -3
- package/src/components/Card/__tests__/CardBody.test.tsx +1 -2
- package/src/components/Card/__tests__/CardFooter.test.tsx +1 -2
- package/src/components/Card/__tests__/CardHeader.test.tsx +14 -0
- package/src/components/Card/examples/Card.md +1 -1
- package/src/components/Card/examples/CardClickable.tsx +2 -1
- package/src/components/Card/examples/CardClickableSelectable.tsx +6 -5
- package/src/components/Card/examples/CardExpandable.tsx +5 -5
- package/src/components/Card/examples/CardExpandableWithIcon.tsx +4 -3
- package/src/components/Card/examples/CardHeaderInCardHead.tsx +3 -2
- package/src/components/Card/examples/CardOnlyActionsInCardHead.tsx +3 -2
- package/src/components/Card/examples/CardSelectable.tsx +5 -4
- package/src/components/Card/examples/CardSingleSelectable.tsx +2 -1
- package/src/components/Card/examples/CardTile.tsx +2 -1
- package/src/components/Card/examples/CardTileMulti.tsx +4 -3
- package/src/components/Card/examples/CardWithImageAndActions.tsx +4 -3
- package/src/components/Card/examples/CardWithModifiers.tsx +2 -2
- package/src/components/Checkbox/examples/Checkbox.md +1 -1
- package/src/components/Checkbox/examples/CheckboxControlled.tsx +7 -7
- package/src/components/ClipboardCopy/ClipboardCopy.tsx +35 -12
- package/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx +187 -1
- package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopy.test.tsx.snap +1 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopy.md +7 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactTruncation.tsx +15 -0
- package/src/components/DescriptionList/examples/DescriptionList.md +1 -0
- package/src/components/DescriptionList/examples/DescriptionListWithCard.tsx +3 -2
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx +3 -2
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx +3 -2
- package/src/components/Dropdown/examples/Dropdown.md +1 -0
- package/src/components/Dropdown/examples/DropdownBasic.tsx +2 -1
- package/src/components/Dropdown/examples/DropdownWithDescriptions.tsx +2 -1
- package/src/components/Dropdown/examples/DropdownWithGroups.tsx +2 -1
- package/src/components/Dropdown/examples/DropdownWithKebabToggle.tsx +2 -1
- package/src/components/EmptyState/examples/EmptyState.md +2 -0
- package/src/components/EmptyState/examples/EmptyStateWithStatus.tsx +2 -1
- package/src/components/ExpandableSection/examples/ExpandableSectionBasic.tsx +2 -1
- package/src/components/ExpandableSection/examples/ExpandableSectionCustomToggle.tsx +2 -1
- package/src/components/ExpandableSection/examples/ExpandableSectionDetached.tsx +2 -1
- package/src/components/ExpandableSection/examples/ExpandableSectionDisclosure.tsx +2 -1
- package/src/components/ExpandableSection/examples/ExpandableSectionTruncateExpansion.tsx +2 -1
- package/src/components/FileUpload/examples/FileUpload.md +1 -0
- package/src/components/FileUpload/examples/FileUploadCustomPreview.tsx +3 -2
- package/src/components/FileUpload/examples/FileUploadCustomUpload.tsx +12 -11
- package/src/components/FileUpload/examples/FileUploadSimpleFile.tsx +3 -2
- package/src/components/FileUpload/examples/FileUploadSimpleText.tsx +4 -3
- package/src/components/FileUpload/examples/FileUploadTextWithEdits.tsx +4 -3
- package/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx +6 -5
- package/src/components/FileUpload/examples/FileUploadWithHelperText.tsx +4 -3
- package/src/components/FormSelect/examples/FormSelect.md +1 -0
- package/src/components/FormSelect/examples/FormSelectBasic.tsx +2 -1
- package/src/components/FormSelect/examples/FormSelectDisabled.tsx +2 -1
- package/src/components/FormSelect/examples/FormSelectGrouped.tsx +2 -1
- package/src/components/FormSelect/examples/FormSelectValidated.tsx +4 -3
- package/src/components/Hint/examples/Hint.md +1 -1
- package/src/components/Hint/examples/HintActionsWithNoOffset.tsx +2 -1
- package/src/components/Hint/examples/HintBasicWithTitle.tsx +2 -1
- package/src/components/Hint/examples/HintBasicWithoutTitle.tsx +2 -2
- package/src/components/Icon/examples/Icon.md +1 -1
- package/src/components/Icon/examples/IconCustomProgress.tsx +2 -2
- package/src/components/Icon/examples/IconProgress.tsx +2 -2
- package/src/components/InputGroup/examples/InputGroup.md +1 -1
- package/src/components/InputGroup/examples/InputGroupWithDropdown.tsx +2 -2
- package/src/components/InputGroup/examples/InputGroupWithPopover.tsx +3 -3
- package/src/components/Label/examples/Label.md +1 -1
- package/src/components/Label/examples/LabelEditable.tsx +3 -3
- package/src/components/Label/examples/LabelGroupCategoryRemovable.tsx +2 -1
- package/src/components/Label/examples/LabelGroupEditableAdd.tsx +3 -2
- package/src/components/Label/examples/LabelGroupEditableAddDropdown.tsx +8 -7
- package/src/components/Label/examples/LabelGroupEditableAddModal.tsx +21 -20
- package/src/components/Label/examples/LabelGroupEditableLabels.tsx +4 -3
- package/src/components/Label/examples/LabelGroupVerticalCategoryOverflowRemovable.tsx +2 -1
- package/src/components/LoginPage/examples/LoginPage.md +1 -1
- package/src/components/LoginPage/examples/LoginPageBasic.tsx +7 -7
- package/src/components/LoginPage/examples/LoginPageLanguageSelect.tsx +9 -9
- package/src/components/LoginPage/examples/LoginPageShowHidePassword.tsx +7 -7
- package/src/components/Menu/examples/Menu.md +1 -1
- package/src/components/Menu/examples/MenuBasic.tsx +3 -3
- package/src/components/Menu/examples/MenuDangerMenuItem.tsx +2 -1
- package/src/components/Menu/examples/MenuFilterDrilldown.tsx +7 -6
- package/src/components/Menu/examples/MenuFilteringWithSearchInput.tsx +3 -2
- package/src/components/Menu/examples/MenuOptionMultiSelect.tsx +2 -1
- package/src/components/Menu/examples/MenuOptionSingleSelect.tsx +3 -2
- package/src/components/Menu/examples/MenuScrollable.tsx +2 -1
- package/src/components/Menu/examples/MenuScrollableCustomMenuHeight.tsx +2 -1
- package/src/components/Menu/examples/MenuWithActions.tsx +2 -1
- package/src/components/Menu/examples/MenuWithCheckbox.tsx +2 -1
- package/src/components/Menu/examples/MenuWithDescription.tsx +2 -1
- package/src/components/Menu/examples/MenuWithDrilldown.tsx +5 -4
- package/src/components/Menu/examples/MenuWithDrilldownBreadcrumbs.tsx +3 -3
- package/src/components/Menu/examples/MenuWithDrilldownInitialState.tsx +5 -4
- package/src/components/Menu/examples/MenuWithDrilldownSubmenuFunctions.tsx +5 -4
- package/src/components/Menu/examples/MenuWithFavorites.tsx +3 -3
- package/src/components/Menu/examples/MenuWithFooter.tsx +2 -1
- package/src/components/Menu/examples/MenuWithIcons.tsx +2 -1
- package/src/components/Menu/examples/MenuWithLinks.tsx +2 -1
- package/src/components/Menu/examples/MenuWithSeparators.tsx +2 -1
- package/src/components/Menu/examples/MenuWithTitledGroups.tsx +2 -1
- package/src/components/Menu/examples/MenuWithViewMore.tsx +9 -8
- package/src/components/MenuToggle/examples/MenuToggle.md +19 -13
- package/src/components/MenuToggle/examples/MenuToggleTypeahead.tsx +2 -1
- package/src/components/Modal/examples/Modal.md +1 -1
- package/src/components/Modal/examples/ModalBasic.tsx +2 -2
- package/src/components/Modal/examples/ModalCustomFocus.tsx +2 -2
- package/src/components/Modal/examples/ModalCustomHeader.tsx +2 -2
- package/src/components/Modal/examples/ModalCustomTitleIcon.tsx +2 -2
- package/src/components/Modal/examples/ModalCustomWidth.tsx +2 -2
- package/src/components/Modal/examples/ModalNoHeaderFooter.tsx +2 -2
- package/src/components/Modal/examples/ModalSize.tsx +3 -3
- package/src/components/Modal/examples/ModalTitleIcon.tsx +2 -2
- package/src/components/Modal/examples/ModalTopAligned.tsx +2 -2
- package/src/components/Modal/examples/ModalWithDescription.tsx +2 -2
- package/src/components/Modal/examples/ModalWithDropdown.tsx +3 -3
- package/src/components/Modal/examples/ModalWithForm.tsx +8 -8
- package/src/components/Modal/examples/ModalWithHelp.tsx +2 -2
- package/src/components/Modal/examples/ModalWithOverflowingContent.tsx +2 -2
- package/src/components/Modal/examples/ModalWithWizard.tsx +2 -2
- package/src/components/MultipleFileUpload/examples/MultipleFileUpload.md +1 -0
- package/src/components/MultipleFileUpload/examples/MultipleFileUploadBasic.tsx +8 -7
- package/src/components/Nav/examples/Nav.md +1 -0
- package/src/components/Nav/examples/NavDefault.tsx +2 -1
- package/src/components/Nav/examples/NavDrilldown.tsx +2 -4
- package/src/components/Nav/examples/NavExpandable.tsx +3 -2
- package/src/components/Nav/examples/NavExpandableThirdLevel.tsx +3 -2
- package/src/components/Nav/examples/NavFlyout.tsx +2 -1
- package/src/components/Nav/examples/NavGrouped.tsx +2 -1
- package/src/components/Nav/examples/NavHorizontalNav.tsx +2 -1
- package/src/components/Nav/examples/NavHorizontalSubNav.tsx +2 -1
- package/src/components/Nav/examples/NavIcons.tsx +2 -1
- package/src/components/Nav/examples/NavMixed.tsx +3 -2
- package/src/components/NotificationBadge/NotificationBadge.tsx +34 -6
- package/src/components/NotificationBadge/__tests__/NotificationBadge.test.tsx +18 -3
- package/src/components/NotificationBadge/__tests__/__snapshots__/NotificationBadge.test.tsx.snap +34 -0
- package/src/components/NotificationBadge/examples/NotificationBadge.md +9 -1
- package/src/components/NotificationBadge/examples/NotificationBadgeBasic.tsx +4 -3
- package/src/components/NotificationBadge/examples/NotificationBadgeWithAnimation.tsx +48 -0
- package/src/components/NotificationBadge/examples/NotificationBadgeWithCount.tsx +4 -3
- package/src/components/NotificationDrawer/examples/NotificationDrawer.md +1 -0
- package/src/components/NotificationDrawer/examples/NotificationDrawerBasic.tsx +2 -1
- package/src/components/NotificationDrawer/examples/NotificationDrawerGroups.tsx +5 -4
- package/src/components/NotificationDrawer/examples/NotificationDrawerLightweight.tsx +4 -3
- package/src/components/NumberInput/examples/NumberInput.md +1 -1
- package/src/components/NumberInput/examples/NumberInputCustomStep.tsx +2 -1
- package/src/components/NumberInput/examples/NumberInputCustomStepAndThreshold.tsx +2 -1
- package/src/components/NumberInput/examples/NumberInputDefault.tsx +2 -1
- package/src/components/NumberInput/examples/NumberInputDisabled.tsx +2 -1
- package/src/components/NumberInput/examples/NumberInputUnit.tsx +3 -3
- package/src/components/NumberInput/examples/NumberInputUnitThreshold.tsx +2 -2
- package/src/components/NumberInput/examples/NumberInputVaryingSizes.tsx +5 -5
- package/src/components/NumberInput/examples/NumberInputWithStatus.tsx +3 -2
- package/src/components/OverflowMenu/examples/OverflowMenu.md +1 -0
- package/src/components/OverflowMenu/examples/OverflowMenuBreakpointOnContainer.tsx +4 -3
- package/src/components/OverflowMenu/examples/OverflowMenuGroupTypes.tsx +2 -1
- package/src/components/OverflowMenu/examples/OverflowMenuMultiGroup.tsx +2 -1
- package/src/components/OverflowMenu/examples/OverflowMenuPersistent.tsx +2 -1
- package/src/components/OverflowMenu/examples/OverflowMenuSimple.tsx +2 -1
- package/src/components/Page/Page.tsx +2 -2
- package/src/components/Page/PageSection.tsx +2 -2
- package/src/components/Page/examples/Page.md +1 -0
- package/src/components/Page/examples/PageCenteredSection.tsx +2 -1
- package/src/components/Page/examples/PageGroupSection.tsx +2 -1
- package/src/components/Page/examples/PageMainSectionPadding.tsx +2 -1
- package/src/components/Page/examples/PageMainSectionVariations.tsx +2 -1
- package/src/components/Page/examples/PageMultipleSidebarBody.tsx +2 -1
- package/src/components/Page/examples/PageVerticalNav.tsx +2 -1
- package/src/components/Page/examples/PageWithOrWithoutFill.tsx +2 -1
- package/src/components/Pagination/examples/Pagination.md +1 -1
- package/src/components/Pagination/examples/PaginationBottom.tsx +3 -2
- package/src/components/Pagination/examples/PaginationCompact.tsx +3 -2
- package/src/components/Pagination/examples/PaginationDisabled.tsx +3 -2
- package/src/components/Pagination/examples/PaginationIndeterminate.tsx +3 -3
- package/src/components/Pagination/examples/PaginationInset.tsx +3 -2
- package/src/components/Pagination/examples/PaginationNoItems.tsx +3 -2
- package/src/components/Pagination/examples/PaginationOffset.tsx +3 -2
- package/src/components/Pagination/examples/PaginationOnePage.tsx +3 -2
- package/src/components/Pagination/examples/PaginationSticky.tsx +4 -4
- package/src/components/Pagination/examples/PaginationTop.tsx +3 -2
- package/src/components/Popover/examples/Popover.md +1 -0
- package/src/components/Popover/examples/PopoverAdvanced.tsx +4 -3
- package/src/components/Popover/examples/PopoverAlert.tsx +2 -1
- package/src/components/Popover/examples/PopoverCloseControlled.tsx +2 -1
- package/src/components/Popover/examples/PopoverReactRef.tsx +2 -1
- package/src/components/Progress/examples/Progress.md +2 -0
- package/src/components/Progress/examples/ProgressHelperText.tsx +2 -1
- package/src/components/ProgressStepper/examples/ProgressStepper.md +1 -1
- package/src/components/ProgressStepper/examples/ProgressStepperBasicWithAlignment.tsx +3 -3
- package/src/components/ProgressStepper/examples/ProgressStepperCompact.tsx +3 -3
- package/src/components/Radio/examples/Radio.md +1 -1
- package/src/components/Radio/examples/RadioControlled.tsx +2 -2
- package/src/components/SearchInput/examples/SearchInput.md +1 -0
- package/src/components/SearchInput/examples/SearchInputAdvanced.tsx +4 -3
- package/src/components/SearchInput/examples/SearchInputBasic.tsx +2 -1
- package/src/components/SearchInput/examples/SearchInputFocusSearch.tsx +3 -2
- package/src/components/SearchInput/examples/SearchInputWithExpandable.tsx +3 -2
- package/src/components/SearchInput/examples/SearchInputWithNavigableOptions.tsx +4 -3
- package/src/components/SearchInput/examples/SearchInputWithResultCount.tsx +3 -2
- package/src/components/SearchInput/examples/SearchInputWithSubmitButton.tsx +2 -1
- package/src/components/Select/examples/Select.md +1 -1
- package/src/components/Select/examples/SelectBasic.tsx +4 -4
- package/src/components/Select/examples/SelectCheckbox.tsx +3 -2
- package/src/components/Select/examples/SelectFooter.tsx +3 -2
- package/src/components/Select/examples/SelectGrouped.tsx +3 -2
- package/src/components/Select/examples/SelectMultiTypeahead.tsx +9 -8
- package/src/components/Select/examples/SelectMultiTypeaheadCheckbox.tsx +11 -10
- package/src/components/Select/examples/SelectMultiTypeaheadCreatable.tsx +10 -9
- package/src/components/Select/examples/SelectOptionVariations.tsx +3 -2
- package/src/components/Select/examples/SelectTypeahead.tsx +10 -9
- package/src/components/Select/examples/SelectTypeaheadCreatable.tsx +10 -9
- package/src/components/Select/examples/SelectValidated.tsx +4 -4
- package/src/components/Select/examples/SelectViewMore.tsx +12 -11
- package/src/components/SimpleList/examples/SimpleList.md +1 -0
- package/src/components/SimpleList/examples/SimpleListUncontrolled.tsx +2 -1
- package/src/components/Slider/examples/Slider.md +1 -0
- package/src/components/Slider/examples/SliderActions.tsx +5 -4
- package/src/components/Slider/examples/SliderContinuous.tsx +4 -3
- package/src/components/Slider/examples/SliderDisabled.tsx +2 -1
- package/src/components/Slider/examples/SliderDiscrete.tsx +2 -1
- package/src/components/Slider/examples/SliderThumbValueInput.tsx +3 -2
- package/src/components/Slider/examples/SliderValueInput.tsx +7 -6
- package/src/components/Switch/examples/Switch.md +1 -1
- package/src/components/Switch/examples/SwitchBasic.tsx +2 -1
- package/src/components/Switch/examples/SwitchCheckedWithLabel.tsx +2 -1
- package/src/components/Switch/examples/SwitchReversed.tsx +2 -1
- package/src/components/Switch/examples/SwitchWithoutLabel.tsx +2 -1
- package/src/components/Tabs/examples/Tabs.md +2 -2
- package/src/components/Tabs/examples/TabsBoxSecondary.tsx +3 -2
- package/src/components/Tabs/examples/TabsChildrenMounting.tsx +2 -1
- package/src/components/Tabs/examples/TabsContentWithBodyPadding.tsx +5 -5
- package/src/components/Tabs/examples/TabsDefault.tsx +3 -2
- package/src/components/Tabs/examples/TabsDefaultOverflow.tsx +3 -2
- package/src/components/Tabs/examples/TabsDynamic.tsx +7 -6
- package/src/components/Tabs/examples/TabsFilled.tsx +3 -2
- package/src/components/Tabs/examples/TabsFilledWithIcons.tsx +3 -2
- package/src/components/Tabs/examples/TabsHelp.tsx +3 -2
- package/src/components/Tabs/examples/TabsHelpAndClose.tsx +7 -6
- package/src/components/Tabs/examples/TabsHorizontalOverflow.tsx +3 -2
- package/src/components/Tabs/examples/TabsIconAndText.tsx +2 -1
- package/src/components/Tabs/examples/TabsInset.tsx +3 -2
- package/src/components/Tabs/examples/TabsNav.tsx +2 -1
- package/src/components/Tabs/examples/TabsNavSubtab.tsx +3 -2
- package/src/components/Tabs/examples/TabsPageInsets.tsx +3 -2
- package/src/components/Tabs/examples/TabsSeparateContent.tsx +5 -5
- package/src/components/Tabs/examples/TabsSubtabs.tsx +4 -3
- package/src/components/Tabs/examples/TabsToggledSeparateContent.tsx +6 -6
- package/src/components/Tabs/examples/TabsTooltipReactRef.tsx +4 -3
- package/src/components/Tabs/examples/TabsUnmountingInvisibleChildren.tsx +2 -1
- package/src/components/Tabs/examples/TabsVertical.tsx +3 -2
- package/src/components/Tabs/examples/TabsVerticalExpandable.tsx +3 -2
- package/src/components/Tabs/examples/TabsVerticalExpandableUncontrolled.tsx +2 -1
- package/src/components/TextArea/examples/TextArea.md +1 -1
- package/src/components/TextArea/examples/TextAreaAutoResizing.tsx +2 -1
- package/src/components/TextArea/examples/TextAreaBasic.tsx +2 -1
- package/src/components/TextArea/examples/TextAreaHorizontallyResizable.tsx +2 -1
- package/src/components/TextArea/examples/TextAreaInvalid.tsx +2 -1
- package/src/components/TextArea/examples/TextAreaReadOnly.tsx +2 -2
- package/src/components/TextArea/examples/TextAreaResizableNone.tsx +2 -1
- package/src/components/TextArea/examples/TextAreaValidated.tsx +5 -4
- package/src/components/TextArea/examples/TextAreaVerticallyResizable.tsx +2 -1
- package/src/components/TextInput/examples/TextInput.md +1 -0
- package/src/components/TextInput/examples/TextInputBasic.tsx +2 -1
- package/src/components/TextInput/examples/TextInputCustomIcon.tsx +3 -2
- package/src/components/TextInput/examples/TextInputCustomIconInvalid.tsx +2 -1
- package/src/components/TextInput/examples/TextInputInvalid.tsx +2 -1
- package/src/components/TextInput/examples/TextInputReadOnly.tsx +2 -1
- package/src/components/TextInput/examples/TextInputSelectUsingRef.tsx +3 -2
- package/src/components/TextInput/examples/TextInputStartTruncated.tsx +2 -1
- package/src/components/TextInputGroup/examples/TextInputGroup.md +1 -0
- package/src/components/TextInputGroup/examples/TextInputGroupBasic.tsx +2 -1
- package/src/components/TextInputGroup/examples/TextInputGroupFilters.tsx +3 -2
- package/src/components/TextInputGroup/examples/TextInputGroupUtilitiesAndIcon.tsx +2 -1
- package/src/components/TextInputGroup/examples/TextInputGroupWithStatus.tsx +4 -5
- package/src/components/ToggleGroup/examples/ToggleGroup.md +1 -0
- package/src/components/ToggleGroup/examples/ToggleGroupCompact.tsx +2 -1
- package/src/components/ToggleGroup/examples/ToggleGroupDefaultMultiple.tsx +3 -2
- package/src/components/ToggleGroup/examples/ToggleGroupDefaultSingle.tsx +2 -1
- package/src/components/ToggleGroup/examples/ToggleGroupIcon.tsx +2 -1
- package/src/components/ToggleGroup/examples/ToggleGroupTextIcon.tsx +2 -1
- package/src/components/Toolbar/Toolbar.tsx +5 -0
- package/src/components/Toolbar/ToolbarContent.tsx +11 -0
- package/src/components/Toolbar/ToolbarGroup.tsx +11 -0
- package/src/components/Toolbar/ToolbarItem.tsx +11 -0
- package/src/components/Toolbar/__tests__/Toolbar.test.tsx +58 -0
- package/src/components/Toolbar/__tests__/ToolbarGroup.test.tsx +28 -1
- package/src/components/Toolbar/__tests__/ToolbarItem.test.tsx +27 -0
- package/src/components/Toolbar/__tests__/__snapshots__/Toolbar.test.tsx.snap +1 -1
- package/src/components/Toolbar/examples/Toolbar.md +9 -2
- package/src/components/Toolbar/examples/ToolbarComponentManagedToggleGroups.tsx +6 -6
- package/src/components/Toolbar/examples/ToolbarConsumerManagedToggleGroups.tsx +7 -7
- package/src/components/Toolbar/examples/ToolbarContentWrap.tsx +35 -0
- package/src/components/Toolbar/examples/ToolbarCustomLabelGroupContent.tsx +4 -4
- package/src/components/Toolbar/examples/ToolbarGroupSpacers.tsx +3 -3
- package/src/components/Toolbar/examples/ToolbarGroups.tsx +7 -7
- package/src/components/Toolbar/examples/ToolbarItemSpacers.tsx +5 -5
- package/src/components/Toolbar/examples/ToolbarStacked.tsx +9 -9
- package/src/components/Toolbar/examples/ToolbarSticky.tsx +3 -3
- package/src/components/Toolbar/examples/ToolbarWithFilters.tsx +6 -6
- package/src/components/Tooltip/examples/Tooltip.md +1 -0
- package/src/components/Tooltip/examples/TooltipIcon.tsx +2 -1
- package/src/components/Tooltip/examples/TooltipOptions.tsx +14 -13
- package/src/components/Tooltip/examples/TooltipReactRef.tsx +2 -1
- package/src/components/TreeView/examples/TreeView.md +1 -1
- package/src/components/TreeView/examples/TreeViewMultiselectable.tsx +2 -1
- package/src/components/TreeView/examples/TreeViewSelectionExpansion.tsx +2 -1
- package/src/components/TreeView/examples/TreeViewSingleSelectable.tsx +3 -3
- package/src/components/TreeView/examples/TreeViewWithActionItems.tsx +3 -2
- package/src/components/TreeView/examples/TreeViewWithBadges.tsx +2 -1
- package/src/components/TreeView/examples/TreeViewWithCheckboxes.tsx +3 -2
- package/src/components/TreeView/examples/TreeViewWithCustomBadges.tsx +2 -1
- package/src/components/TreeView/examples/TreeViewWithIconPerItem.tsx +2 -1
- package/src/components/TreeView/examples/TreeViewWithIcons.tsx +2 -1
- package/src/components/TreeView/examples/TreeViewWithMemoization.tsx +3 -3
- package/src/components/TreeView/examples/TreeViewWithSearch.tsx +4 -3
- package/src/components/Truncate/Truncate.tsx +12 -3
- package/src/components/Wizard/examples/Wizard.md +1 -0
- package/src/components/Wizard/examples/WizardEnabledOnFormValidation.tsx +3 -2
- package/src/components/Wizard/examples/WizardGetCurrentStep.tsx +2 -1
- package/src/components/Wizard/examples/WizardStepDrawerContent.tsx +3 -2
- package/src/components/Wizard/examples/WizardStepStatus.tsx +5 -4
- package/src/components/Wizard/examples/WizardToggleStepVisibility.tsx +4 -3
- package/src/components/Wizard/examples/WizardValidateOnButtonPress.tsx +8 -7
- package/src/components/Wizard/examples/WizardWithCustomFooter.tsx +3 -2
- package/src/components/Wizard/examples/WizardWithSubmitProgress.tsx +5 -4
- package/src/components/Wizard/examples/WizardWithinModal.tsx +2 -1
- package/src/demos/AlertGroup.md +1 -1
- package/src/demos/BackToTop.md +1 -0
- package/src/demos/Button.md +3 -1
- package/src/demos/CustomMenus/ApplicationLauncher.md +2 -0
- package/src/demos/CustomMenus/ContextSelector.md +1 -0
- package/src/demos/CustomMenus/CustomMenus.md +2 -0
- package/src/demos/CustomMenus/OptionsMenu.md +1 -0
- package/src/demos/CustomMenus/examples/ActionsMenuDemo.tsx +4 -3
- package/src/demos/CustomMenus/examples/ApplicationLauncherDemo.tsx +9 -9
- package/src/demos/CustomMenus/examples/ContextSelectorDemo.tsx +7 -6
- package/src/demos/CustomMenus/examples/DateSelectDemo.tsx +4 -3
- package/src/demos/CustomMenus/examples/DrilldownMenuDemo.tsx +8 -7
- package/src/demos/CustomMenus/examples/FavoritesDemo.tsx +2 -2
- package/src/demos/CustomMenus/examples/FlyoutDemo.tsx +4 -3
- package/src/demos/CustomMenus/examples/InlineSearchFilterMenuDemo.tsx +6 -5
- package/src/demos/CustomMenus/examples/OptionsMenuDemo.tsx +4 -3
- package/src/demos/CustomMenus/examples/TreeViewMenuDemo.tsx +5 -4
- package/src/demos/DataList/examples/DataListActionable.tsx +3 -2
- package/src/demos/DataList/examples/DataListExpandableControlInToolbar.tsx +6 -6
- package/src/demos/DataList/examples/DataListStaticBottomPagination.tsx +4 -4
- package/src/demos/DataListDemo.md +2 -0
- package/src/demos/DatePicker/DatePicker.md +3 -2
- package/src/demos/DateTimePicker.md +4 -2
- package/src/demos/DescriptionList/DescriptionList.md +1 -0
- package/src/demos/DescriptionList/examples/DescriptionListInDrawer.tsx +4 -3
- package/src/demos/ExpandableSection/ExpandableSection.md +2 -0
- package/src/demos/ExpandableSection/examples/ExpandableTextDemo.tsx +2 -1
- package/src/demos/Filters/FilterDemos.md +1 -1
- package/src/demos/Filters/examples/FilterAttributeSearch.tsx +29 -29
- package/src/demos/Filters/examples/FilterCheckboxSelect.tsx +16 -16
- package/src/demos/Filters/examples/FilterFaceted.tsx +17 -17
- package/src/demos/Filters/examples/FilterMixedSelectGroup.tsx +22 -22
- package/src/demos/Filters/examples/FilterSameSelectGroup.tsx +22 -22
- package/src/demos/Filters/examples/FilterSearchInput.tsx +11 -11
- package/src/demos/Filters/examples/FilterSingleSelect.tsx +17 -17
- package/src/demos/HelperText.md +1 -0
- package/src/demos/JumpLinks.md +5 -3
- package/src/demos/LabelGroupDemos.md +1 -0
- package/src/demos/Masthead.md +1 -0
- package/src/demos/MultipleFileUploadDemos.md +1 -1
- package/src/demos/Nav.md +1 -0
- package/src/demos/NotificationDrawer/NotificationDrawer.md +2 -0
- package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +10 -13
- package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +13 -16
- package/src/demos/Page.md +1 -0
- package/src/demos/PasswordGenerator.md +9 -7
- package/src/demos/PasswordStrength.md +1 -0
- package/src/demos/PrimaryDetail.md +1 -0
- package/src/demos/ProgressDemo.md +5 -3
- package/src/demos/ProgressStepperDemo.md +3 -1
- package/src/demos/RTL/RTL.md +1 -0
- package/src/demos/RTL/examples/PaginatedTable.jsx +16 -15
- package/src/demos/SearchInput/SearchInput.md +24 -22
- package/src/demos/Tabs.md +6 -3
- package/src/demos/TextInputGroupDemo.md +1 -0
- package/src/demos/Toolbar.md +1 -0
- package/src/demos/Wizard/WizardDemo.md +2 -0
- package/src/demos/examples/Card/CardAggregateStatus.tsx +2 -2
- package/src/demos/examples/Card/CardEventsView.tsx +2 -2
- package/src/demos/examples/Card/CardHorizontalGrid.tsx +3 -2
- package/src/demos/examples/Card/CardLogView.tsx +2 -2
- package/src/demos/examples/Card/CardNested.tsx +5 -4
- package/src/demos/examples/Card/CardStatus.tsx +3 -2
- package/src/demos/examples/Card/CardStatusTabbed.tsx +2 -1
- package/src/demos/examples/Card/CardWithAccordion.tsx +2 -1
- package/src/demos/examples/DateTimePicker/DateTimePicker.tsx +5 -4
- package/src/demos/examples/HelperText/HelperTextDynamic.tsx +4 -3
- package/src/demos/examples/HelperText/HelperTextStatic.tsx +2 -1
- package/src/demos/examples/HelperText/HelperTextStaticTextDynamicVariant.tsx +4 -3
- package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +9 -8
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +16 -16
- package/src/demos/examples/MultipleFileUpload/MultipleFileUploadRejectedFile.tsx +8 -7
- package/src/demos/examples/Nav/NavDrilldown.tsx +3 -3
- package/src/demos/examples/Nav/NavExpandable.tsx +3 -3
- package/src/demos/examples/Nav/NavFlyout.tsx +8 -7
- package/src/demos/examples/Nav/NavGrouped.tsx +2 -1
- package/src/demos/examples/Nav/NavHorizontal.tsx +5 -5
- package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +6 -6
- package/src/demos/examples/Nav/NavManual.tsx +8 -8
- package/src/demos/examples/Nav/NavWithSubnav.tsx +3 -3
- package/src/demos/examples/Page/PageContextSelector.tsx +7 -6
- package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +5 -4
- package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +5 -4
- package/src/demos/examples/PasswordStrength/PasswordStrengthDemo.tsx +2 -2
- package/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx +15 -15
- package/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx +9 -9
- package/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx +5 -5
- package/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx +9 -9
- package/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx +9 -9
- package/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx +3 -3
- package/src/demos/examples/Tabs/ModalTabs.tsx +7 -7
- package/src/demos/examples/Tabs/NestedTabs.tsx +3 -2
- package/src/demos/examples/Tabs/NestedUnindentedTabs.tsx +3 -2
- package/src/demos/examples/Tabs/TabsAndTable.tsx +5 -5
- package/src/demos/examples/TextInputGroup/AttributeValueFiltering.tsx +10 -9
- package/src/demos/examples/TextInputGroup/AutoCompleteSearch.tsx +9 -8
- package/src/demos/examples/Toolbar/ConsoleLogViewerToolbar.tsx +17 -17
- package/src/demos/examples/Wizard/InModalWithDrawer.tsx +3 -2
- package/src/demos/examples/Wizard/InModalWithDrawerInformationalStep.tsx +3 -2
- package/src/demos/examples/Wizard/InPageWithDrawer.tsx +4 -4
- package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +4 -4
- package/src/deprecated/components/Chip/examples/Chip.md +1 -1
- package/src/deprecated/components/Chip/examples/ChipDefault.tsx +2 -2
- package/src/deprecated/components/Chip/examples/ChipGroupInline.tsx +2 -1
- package/src/deprecated/components/Chip/examples/ChipGroupRemovableCategories.tsx +3 -3
- package/src/deprecated/components/Chip/examples/ChipGroupWithCategories.tsx +2 -1
- package/src/deprecated/components/DragDrop/examples/DragDrop.md +1 -0
- package/src/deprecated/components/DragDrop/examples/DragDropBasic.tsx +2 -1
- package/src/deprecated/components/DragDrop/examples/DragDropMultipleLists.tsx +2 -1
- package/src/deprecated/components/Modal/examples/Modal.md +1 -1
- package/src/deprecated/components/Modal/examples/ModalBasic.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalCustomFocus.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalCustomHeaderFooter.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalCustomTitleIcon.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalCustomWidth.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalLarge.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalMedium.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalNoHeaderFooter.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalSmall.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalTitleIcon.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalTopAligned.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalWithDescription.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalWithDropdown.tsx +3 -3
- package/src/deprecated/components/Modal/examples/ModalWithForm.tsx +8 -8
- package/src/deprecated/components/Modal/examples/ModalWithHelp.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalWithOverflowingContent.tsx +2 -2
- package/src/deprecated/components/Modal/examples/ModalWithWizard.tsx +2 -2
- package/src/deprecated/components/Tile/examples/Tile.md +5 -2
- package/src/deprecated/components/Wizard/examples/Wizard.md +1 -1
- package/src/deprecated/components/Wizard/examples/WizardEnabledOnFormValidation.tsx +8 -7
- package/src/deprecated/components/Wizard/examples/WizardFinished.tsx +3 -2
- package/src/deprecated/components/Wizard/examples/WizardInModal.tsx +2 -2
- package/src/deprecated/components/Wizard/examples/WizardIncrementallyEnabledSteps.tsx +2 -1
- package/src/deprecated/components/Wizard/examples/WizardValidateOnButtonPress.tsx +9 -8
- package/src/deprecated/components/Wizard/examples/WizardWithDrawer.tsx +3 -3
- package/src/helpers/resizeObserver.tsx +2 -2
- package/src/layouts/Bullseye/__tests__/Bullseye.test.tsx +1 -2
package/helpers/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.2.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.2.0-prerelease.33","private":true}
|
package/layouts/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.2.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.2.0-prerelease.33","private":true}
|
package/next/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.2.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.2.0-prerelease.33","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.2.0-prerelease.
|
|
3
|
+
"version": "6.2.0-prerelease.34",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@patternfly/react-icons": "^6.2.0-prerelease.
|
|
50
|
-
"@patternfly/react-styles": "^6.2.0-prerelease.
|
|
51
|
-
"@patternfly/react-tokens": "^6.2.0-prerelease.
|
|
49
|
+
"@patternfly/react-icons": "^6.2.0-prerelease.12",
|
|
50
|
+
"@patternfly/react-styles": "^6.2.0-prerelease.11",
|
|
51
|
+
"@patternfly/react-tokens": "^6.2.0-prerelease.11",
|
|
52
52
|
"focus-trap": "7.6.4",
|
|
53
53
|
"react-dropzone": "^14.3.5",
|
|
54
54
|
"tslib": "^2.8.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@patternfly/patternfly": "6.2.0-prerelease.
|
|
57
|
+
"@patternfly/patternfly": "6.2.0-prerelease.25",
|
|
58
58
|
"case-anything": "^3.1.2",
|
|
59
59
|
"css": "^3.0.0",
|
|
60
60
|
"fs-extra": "^11.3.0"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react": "^17 || ^18",
|
|
64
64
|
"react-dom": "^17 || ^18"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "06f0914bed087998e510eddc309c8ab44e2ab194"
|
|
67
67
|
}
|
|
@@ -5,6 +5,7 @@ cssPrefix: pf-v6-c-accordion
|
|
|
5
5
|
propComponents: ['Accordion', 'AccordionItem', 'AccordionContent', 'AccordionToggle', AccordionExpandableContentBody]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
import { useState } from 'react';
|
|
8
9
|
import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon';
|
|
9
10
|
|
|
10
11
|
## Examples
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
1
2
|
import {
|
|
2
3
|
Accordion,
|
|
3
4
|
AccordionItem,
|
|
@@ -10,8 +11,8 @@ import {
|
|
|
10
11
|
import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon';
|
|
11
12
|
|
|
12
13
|
export const AccordionBordered: React.FunctionComponent = () => {
|
|
13
|
-
const [expanded, setExpanded] =
|
|
14
|
-
const [isDisplayLarge, setIsDisplayLarge] =
|
|
14
|
+
const [expanded, setExpanded] = useState('bordered-toggle4');
|
|
15
|
+
const [isDisplayLarge, setIsDisplayLarge] = useState(false);
|
|
15
16
|
|
|
16
17
|
const displaySize = isDisplayLarge ? 'lg' : 'default';
|
|
17
18
|
const onToggle = (id: string) => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
1
2
|
import { Accordion, AccordionItem, AccordionContent, AccordionToggle } from '@patternfly/react-core';
|
|
2
3
|
|
|
3
4
|
export const AccordionDefinitionList: React.FunctionComponent = () => {
|
|
4
|
-
const [expanded, setExpanded] =
|
|
5
|
+
const [expanded, setExpanded] = useState('def-list-toggle2');
|
|
5
6
|
|
|
6
7
|
const onToggle = (id: string) => {
|
|
7
8
|
if (id === expanded) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
1
2
|
import { Accordion, AccordionItem, AccordionContent, AccordionToggle } from '@patternfly/react-core';
|
|
2
3
|
|
|
3
4
|
export const AccordionFixedWithMultipleExpandBehavior: React.FunctionComponent = () => {
|
|
4
|
-
const [expanded, setExpanded] =
|
|
5
|
+
const [expanded, setExpanded] = useState(['ex2-toggle4']);
|
|
5
6
|
|
|
6
7
|
const toggle = (id) => {
|
|
7
8
|
const index = expanded.indexOf(id);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
1
2
|
import { Accordion, AccordionItem, AccordionContent, AccordionToggle } from '@patternfly/react-core';
|
|
2
3
|
|
|
3
4
|
export const AccordionSingleExpandBehavior: React.FunctionComponent = () => {
|
|
4
|
-
const [expanded, setExpanded] =
|
|
5
|
+
const [expanded, setExpanded] = useState('ex-toggle2');
|
|
5
6
|
|
|
6
7
|
const onToggle = (id: string) => {
|
|
7
8
|
if (id === expanded) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
1
2
|
import { Accordion, AccordionItem, AccordionContent, AccordionToggle } from '@patternfly/react-core';
|
|
2
3
|
|
|
3
4
|
export const AccordionToggleIconAtStart: React.FunctionComponent = () => {
|
|
4
|
-
const [expanded, setExpanded] =
|
|
5
|
+
const [expanded, setExpanded] = useState('start-toggle-toggle2');
|
|
5
6
|
|
|
6
7
|
const onToggle = (id: string) => {
|
|
7
8
|
if (id === expanded) {
|
|
@@ -5,7 +5,7 @@ cssPrefix: pf-v6-c-action-list
|
|
|
5
5
|
propComponents: ['ActionList', 'ActionListGroup', 'ActionListItem']
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
import { Fragment } from 'react';
|
|
8
|
+
import { Fragment, useState } from 'react';
|
|
9
9
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
10
10
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
11
11
|
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment } from 'react';
|
|
1
|
+
import { Fragment, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
ActionList,
|
|
4
4
|
ActionListGroup,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
|
|
15
15
|
|
|
16
16
|
export const ActionListSingleGroup: React.FunctionComponent = () => {
|
|
17
|
-
const [isOpen, setIsOpen] =
|
|
17
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
18
18
|
|
|
19
19
|
const onToggle = () => {
|
|
20
20
|
setIsOpen(!isOpen);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { Fragment, useEffect, useRef, useState,
|
|
1
|
+
import { Fragment, useEffect, useRef, useState, useContext } from 'react';
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/Alert/alert';
|
|
4
|
+
import alertGroupStyles from '@patternfly/react-styles/css/components/Alert/alert-group';
|
|
4
5
|
import { AlertIcon } from './AlertIcon';
|
|
5
6
|
import { capitalize, useOUIAProps, OUIAProps } from '../../helpers';
|
|
6
7
|
import { AlertContext } from './AlertContext';
|
|
8
|
+
import { AlertGroupContext } from './AlertGroupContext';
|
|
7
9
|
import maxLines from '@patternfly/react-tokens/dist/esm/c_alert__title_max_lines';
|
|
8
10
|
import { Tooltip, TooltipPosition } from '../Tooltip';
|
|
9
11
|
import { AlertToggleExpandButton } from './AlertToggleExpandButton';
|
|
@@ -22,7 +24,7 @@ export interface AlertProps extends Omit<React.HTMLProps<HTMLDivElement>, 'actio
|
|
|
22
24
|
/** Close button; use the alert action close button component. */
|
|
23
25
|
actionClose?: React.ReactNode;
|
|
24
26
|
/** Action links; use a single alert action link component or multiple wrapped in an array
|
|
25
|
-
* or React.
|
|
27
|
+
* or React fragment.
|
|
26
28
|
*/
|
|
27
29
|
actionLinks?: React.ReactNode;
|
|
28
30
|
/** Content rendered inside the alert. */
|
|
@@ -54,7 +56,7 @@ export interface AlertProps extends Omit<React.HTMLProps<HTMLDivElement>, 'actio
|
|
|
54
56
|
/** Title of the alert. */
|
|
55
57
|
title: React.ReactNode;
|
|
56
58
|
/** Sets the element to use as the alert title. Default is h4. */
|
|
57
|
-
component?: keyof JSX.IntrinsicElements;
|
|
59
|
+
component?: keyof React.JSX.IntrinsicElements;
|
|
58
60
|
/** Adds accessible text to the alert toggle. */
|
|
59
61
|
toggleAriaLabel?: string;
|
|
60
62
|
/** Position of the tooltip which is displayed if text is truncated. */
|
|
@@ -140,7 +142,30 @@ export const Alert: React.FunctionComponent<AlertProps> = ({
|
|
|
140
142
|
const [timedOutAnimation, setTimedOutAnimation] = useState(true);
|
|
141
143
|
const [isMouseOver, setIsMouseOver] = useState<boolean | undefined>();
|
|
142
144
|
const [containsFocus, setContainsFocus] = useState<boolean | undefined>();
|
|
143
|
-
const
|
|
145
|
+
const shouldDismiss = timedOut && timedOutAnimation && !isMouseOver && !containsFocus;
|
|
146
|
+
const [isDismissed, setIsDismissed] = useState(false);
|
|
147
|
+
const { hasAnimations, updateTransitionEnd } = useContext(AlertGroupContext);
|
|
148
|
+
const { offstageRight } = alertGroupStyles.modifiers;
|
|
149
|
+
|
|
150
|
+
const getParentAlertGroupItem = () => divRef.current?.closest(`.${alertGroupStyles.alertGroupItem}`);
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
const shouldSetDismissed = shouldDismiss && !isDismissed;
|
|
153
|
+
if (!shouldSetDismissed) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const alertGroupItem = getParentAlertGroupItem();
|
|
158
|
+
alertGroupItem?.classList.add(offstageRight);
|
|
159
|
+
|
|
160
|
+
if (hasAnimations) {
|
|
161
|
+
updateTransitionEnd(() => {
|
|
162
|
+
setIsDismissed(true);
|
|
163
|
+
});
|
|
164
|
+
} else {
|
|
165
|
+
setIsDismissed(true);
|
|
166
|
+
}
|
|
167
|
+
}, [shouldDismiss, isDismissed]);
|
|
168
|
+
|
|
144
169
|
useEffect(() => {
|
|
145
170
|
const calculatedTimeout = timeout === true ? 8000 : Number(timeout);
|
|
146
171
|
if (calculatedTimeout > 0) {
|
|
@@ -171,8 +196,12 @@ export const Alert: React.FunctionComponent<AlertProps> = ({
|
|
|
171
196
|
}
|
|
172
197
|
}, [containsFocus, isMouseOver, timeoutAnimation]);
|
|
173
198
|
useEffect(() => {
|
|
174
|
-
|
|
175
|
-
}, [
|
|
199
|
+
isDismissed && onTimeout();
|
|
200
|
+
}, [isDismissed, onTimeout]);
|
|
201
|
+
useEffect(() => {
|
|
202
|
+
const alertGroupItem = getParentAlertGroupItem();
|
|
203
|
+
setTimeout(() => alertGroupItem?.classList.remove(alertGroupStyles.modifiers.offstageTop), 0);
|
|
204
|
+
}, []);
|
|
176
205
|
|
|
177
206
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
178
207
|
const onToggleExpand = () => {
|
|
@@ -190,7 +219,7 @@ export const Alert: React.FunctionComponent<AlertProps> = ({
|
|
|
190
219
|
onMouseLeave(ev);
|
|
191
220
|
};
|
|
192
221
|
|
|
193
|
-
if (
|
|
222
|
+
if (shouldDismiss && isDismissed) {
|
|
194
223
|
return null;
|
|
195
224
|
}
|
|
196
225
|
const Title = (
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { useRef, useContext } from 'react';
|
|
1
2
|
import { Button, ButtonVariant, ButtonProps } from '../Button';
|
|
2
3
|
import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
|
|
3
4
|
import { AlertContext } from './AlertContext';
|
|
5
|
+
import { AlertGroupContext } from './AlertGroupContext';
|
|
6
|
+
import alertGroupStyles from '@patternfly/react-styles/css/components/Alert/alert-group';
|
|
4
7
|
|
|
5
8
|
/** Renders a close button for a dismissable alert when this sub-component is passed into
|
|
6
9
|
* the alert's actionClose property.
|
|
@@ -23,18 +26,35 @@ export const AlertActionCloseButton: React.FunctionComponent<AlertActionCloseBut
|
|
|
23
26
|
'aria-label': ariaLabel = '',
|
|
24
27
|
variantLabel,
|
|
25
28
|
...props
|
|
26
|
-
}: AlertActionCloseButtonProps) =>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
}: AlertActionCloseButtonProps) => {
|
|
30
|
+
const closeButtonRef = useRef(null);
|
|
31
|
+
const { hasAnimations, updateTransitionEnd } = useContext(AlertGroupContext);
|
|
32
|
+
const { offstageRight } = alertGroupStyles.modifiers;
|
|
33
|
+
|
|
34
|
+
const getParentAlertGroupItem = () => closeButtonRef.current?.closest(`.${alertGroupStyles.alertGroupItem}`);
|
|
35
|
+
const handleOnClick = () => {
|
|
36
|
+
if (hasAnimations) {
|
|
37
|
+
getParentAlertGroupItem()?.classList.add(offstageRight);
|
|
38
|
+
updateTransitionEnd(onClose);
|
|
39
|
+
} else {
|
|
40
|
+
onClose();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<AlertContext.Consumer>
|
|
46
|
+
{({ title, variantLabel: alertVariantLabel }) => (
|
|
47
|
+
<Button
|
|
48
|
+
ref={closeButtonRef}
|
|
49
|
+
variant={ButtonVariant.plain}
|
|
50
|
+
onClick={handleOnClick}
|
|
51
|
+
aria-label={ariaLabel === '' ? `Close ${variantLabel || alertVariantLabel} alert: ${title}` : ariaLabel}
|
|
52
|
+
className={className}
|
|
53
|
+
icon={<TimesIcon />}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
)}
|
|
57
|
+
</AlertContext.Consumer>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
40
60
|
AlertActionCloseButton.displayName = 'AlertActionCloseButton';
|
|
@@ -8,6 +8,10 @@ export interface AlertGroupProps extends Omit<React.HTMLProps<HTMLUListElement>,
|
|
|
8
8
|
className?: string;
|
|
9
9
|
/** Alerts to be rendered in the AlertGroup */
|
|
10
10
|
children?: React.ReactNode;
|
|
11
|
+
/** @beta Flag to indicate whether Alerts are animated upon rendering and being dismissed. This is intended
|
|
12
|
+
* to remain false for testing purposes only.
|
|
13
|
+
*/
|
|
14
|
+
hasAnimations?: boolean;
|
|
11
15
|
/** Toast notifications are positioned at the top right corner of the viewport */
|
|
12
16
|
isToast?: boolean;
|
|
13
17
|
/** Turns the container into a live region so that changes to content within the AlertGroup, such as appending an Alert, are reliably announced to assistive technology. */
|
|
@@ -58,6 +62,7 @@ class AlertGroup extends Component<AlertGroupProps, AlertGroupState> {
|
|
|
58
62
|
const {
|
|
59
63
|
className,
|
|
60
64
|
children,
|
|
65
|
+
hasAnimations = false,
|
|
61
66
|
isToast,
|
|
62
67
|
isLiveRegion,
|
|
63
68
|
onOverflowClick,
|
|
@@ -75,6 +80,7 @@ class AlertGroup extends Component<AlertGroupProps, AlertGroupState> {
|
|
|
75
80
|
isLiveRegion={isLiveRegion}
|
|
76
81
|
overflowMessage={overflowMessage}
|
|
77
82
|
aria-label={ariaLabel}
|
|
83
|
+
hasAnimations={hasAnimations}
|
|
78
84
|
{...props}
|
|
79
85
|
>
|
|
80
86
|
{children}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
interface AlertGroupContext {
|
|
4
|
+
hasAnimations?: boolean;
|
|
5
|
+
updateTransitionEnd?: (onTransitionEnd: () => void) => void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const AlertGroupContext = createContext<AlertGroupContext>({
|
|
9
|
+
hasAnimations: false,
|
|
10
|
+
updateTransitionEnd: () => {}
|
|
11
|
+
});
|
|
@@ -1,35 +1,74 @@
|
|
|
1
|
-
import { Children } from 'react';
|
|
1
|
+
import { Children, useState } from 'react';
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/Alert/alert-group';
|
|
4
4
|
import { AlertGroupProps } from './AlertGroup';
|
|
5
5
|
import { AlertProps } from '../Alert';
|
|
6
|
+
import { AlertGroupContext } from './AlertGroupContext';
|
|
6
7
|
|
|
7
8
|
export const AlertGroupInline: React.FunctionComponent<AlertGroupProps> = ({
|
|
8
9
|
className,
|
|
9
10
|
children,
|
|
11
|
+
hasAnimations,
|
|
10
12
|
isToast,
|
|
11
13
|
isLiveRegion,
|
|
12
14
|
onOverflowClick,
|
|
13
15
|
overflowMessage,
|
|
14
|
-
...
|
|
15
|
-
}: AlertGroupProps) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
);
|
|
16
|
+
...props
|
|
17
|
+
}: AlertGroupProps) => {
|
|
18
|
+
const [handleTransitionEnd, setHandleTransitionEnd] = useState(() => () => {});
|
|
19
|
+
const updateTransitionEnd = (onTransitionEnd: () => void) => {
|
|
20
|
+
setHandleTransitionEnd(() => onTransitionEnd);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const onTransitionEnd = (event: React.TransitionEvent<HTMLLIElement>) => {
|
|
24
|
+
if (!hasAnimations) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const prefersReducedMotion = !window.matchMedia('(prefers-reduced-motion: no-preference)')?.matches;
|
|
29
|
+
if (
|
|
30
|
+
// If a user has no motion preference, we want to target the grid template rows transition
|
|
31
|
+
// so that the onClose is called after the "slide up" animation of other alerts finishes.
|
|
32
|
+
// If they have motion preference, we don't need to check for a specific transition since only opacity should fire.
|
|
33
|
+
(prefersReducedMotion || (!prefersReducedMotion && event.propertyName === 'grid-template-rows')) &&
|
|
34
|
+
(event.target as HTMLElement).className.includes(styles.modifiers.offstageRight)
|
|
35
|
+
) {
|
|
36
|
+
handleTransitionEnd();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<AlertGroupContext.Provider value={{ hasAnimations, updateTransitionEnd }}>
|
|
42
|
+
<ul
|
|
43
|
+
role="list"
|
|
44
|
+
aria-live={isLiveRegion ? 'polite' : null}
|
|
45
|
+
aria-atomic={isLiveRegion ? false : null}
|
|
46
|
+
className={css(styles.alertGroup, className, isToast ? styles.modifiers.toast : '')}
|
|
47
|
+
{...props}
|
|
48
|
+
>
|
|
49
|
+
{Children.toArray(children).map((alert, index) => (
|
|
50
|
+
<li
|
|
51
|
+
onTransitionEnd={onTransitionEnd}
|
|
52
|
+
className={css(styles.alertGroupItem, hasAnimations && styles.modifiers.offstageTop)}
|
|
53
|
+
key={
|
|
54
|
+
(alert as React.ReactElement<AlertProps>).props?.id ||
|
|
55
|
+
`alertGroupItem-${(alert as React.ReactElement<AlertProps>).key}` ||
|
|
56
|
+
index
|
|
57
|
+
}
|
|
58
|
+
>
|
|
59
|
+
{alert}
|
|
60
|
+
</li>
|
|
61
|
+
))}
|
|
62
|
+
{overflowMessage && (
|
|
63
|
+
<li>
|
|
64
|
+
<button onClick={onOverflowClick} className={css(styles.alertGroupOverflowButton)}>
|
|
65
|
+
{overflowMessage}
|
|
66
|
+
</button>
|
|
67
|
+
</li>
|
|
68
|
+
)}
|
|
69
|
+
</ul>
|
|
70
|
+
</AlertGroupContext.Provider>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
35
74
|
AlertGroupInline.displayName = 'AlertGroupInline';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { render, screen } from '@testing-library/react';
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
|
-
|
|
4
3
|
import { AlertActionCloseButton } from '../AlertActionCloseButton';
|
|
4
|
+
import { AlertGroupContext } from '../AlertGroupContext';
|
|
5
5
|
import { AlertContext } from '../AlertContext';
|
|
6
6
|
|
|
7
7
|
jest.mock('../../Button');
|
|
@@ -59,8 +59,8 @@ test('Does not call the callback provided via onClose when it is not clicked', (
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
test('Calls the callback provided via onClose when clicked', async () => {
|
|
62
|
-
const onCloseMock = jest.fn();
|
|
63
62
|
const user = userEvent.setup();
|
|
63
|
+
const onCloseMock = jest.fn();
|
|
64
64
|
|
|
65
65
|
render(
|
|
66
66
|
<AlertContext.Provider value={{ title: 'title', variantLabel: 'variantLabel' }}>
|
|
@@ -73,6 +73,24 @@ test('Calls the callback provided via onClose when clicked', async () => {
|
|
|
73
73
|
expect(onCloseMock).toHaveBeenCalledTimes(1);
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
+
test('Calls updateTransitionEnd with onClose when animations are enabled', async () => {
|
|
77
|
+
const user = userEvent.setup();
|
|
78
|
+
const onClose = jest.fn();
|
|
79
|
+
const updateMock = jest.fn();
|
|
80
|
+
render(
|
|
81
|
+
<AlertGroupContext.Provider value={{ hasAnimations: true, updateTransitionEnd: updateMock }}>
|
|
82
|
+
<AlertContext.Provider value={{ title: 'title', variantLabel: 'variantLabel' }}>
|
|
83
|
+
<AlertActionCloseButton onClose={onClose} />
|
|
84
|
+
</AlertContext.Provider>
|
|
85
|
+
</AlertGroupContext.Provider>
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
expect(updateMock).not.toHaveBeenCalled();
|
|
89
|
+
await user.click(screen.getByRole('button'));
|
|
90
|
+
expect(updateMock).toHaveBeenCalledWith(onClose);
|
|
91
|
+
expect(updateMock).toHaveBeenCalledTimes(1);
|
|
92
|
+
});
|
|
93
|
+
|
|
76
94
|
test('Renders with an aria label composed with the title and variantLabel provided via a context by default', () => {
|
|
77
95
|
render(
|
|
78
96
|
<AlertContext.Provider value={{ title: 'title', variantLabel: 'variantLabel' }}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
1
|
+
import { render, screen, fireEvent } from '@testing-library/react';
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
3
|
|
|
4
4
|
import { Alert } from '../../Alert';
|
|
@@ -66,8 +66,48 @@ test('Toast Alert Group contains expected modifier class', () => {
|
|
|
66
66
|
expect(screen.getByLabelText('group label')).toHaveClass('pf-m-toast');
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
test('
|
|
70
|
-
|
|
69
|
+
test('Calls the callback set by updateTransitionEnd when transition ends and animations are enabled', async () => {
|
|
70
|
+
window.matchMedia = (query) => ({
|
|
71
|
+
matches: false,
|
|
72
|
+
media: query,
|
|
73
|
+
onchange: null,
|
|
74
|
+
addListener: () => {}, // deprecated
|
|
75
|
+
removeListener: () => {}, // deprecated
|
|
76
|
+
addEventListener: () => {},
|
|
77
|
+
removeEventListener: () => {},
|
|
78
|
+
dispatchEvent: () => true
|
|
79
|
+
});
|
|
80
|
+
const mockCallback = jest.fn();
|
|
81
|
+
const user = userEvent.setup();
|
|
82
|
+
|
|
83
|
+
render(
|
|
84
|
+
<AlertGroup hasAnimations isToast appendTo={document.body}>
|
|
85
|
+
<Alert
|
|
86
|
+
isLiveRegion
|
|
87
|
+
title={'Test Alert'}
|
|
88
|
+
actionClose={<AlertActionCloseButton aria-label="Close" onClose={mockCallback} />}
|
|
89
|
+
/>
|
|
90
|
+
</AlertGroup>
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
await user.click(screen.getByLabelText('Close'));
|
|
94
|
+
expect(mockCallback).not.toHaveBeenCalled();
|
|
95
|
+
fireEvent.transitionEnd(screen.getByText('Test Alert').closest('.pf-v6-c-alert-group__item') as HTMLElement);
|
|
96
|
+
expect(mockCallback).toHaveBeenCalled();
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test('Does not call the callback set by updateTransitionEnd when transition ends and animations are disabled', async () => {
|
|
100
|
+
window.matchMedia = (query) => ({
|
|
101
|
+
matches: false,
|
|
102
|
+
media: query,
|
|
103
|
+
onchange: null,
|
|
104
|
+
addListener: () => {}, // deprecated
|
|
105
|
+
removeListener: () => {}, // deprecated
|
|
106
|
+
addEventListener: () => {},
|
|
107
|
+
removeEventListener: () => {},
|
|
108
|
+
dispatchEvent: () => true
|
|
109
|
+
});
|
|
110
|
+
const mockCallback = jest.fn();
|
|
71
111
|
const user = userEvent.setup();
|
|
72
112
|
|
|
73
113
|
render(
|
|
@@ -75,11 +115,14 @@ test('alertgroup closes when alerts are closed', async () => {
|
|
|
75
115
|
<Alert
|
|
76
116
|
isLiveRegion
|
|
77
117
|
title={'Test Alert'}
|
|
78
|
-
actionClose={<AlertActionCloseButton aria-label="Close" onClose={
|
|
118
|
+
actionClose={<AlertActionCloseButton aria-label="Close" onClose={mockCallback} />}
|
|
79
119
|
/>
|
|
80
120
|
</AlertGroup>
|
|
81
121
|
);
|
|
82
122
|
|
|
83
123
|
await user.click(screen.getByLabelText('Close'));
|
|
84
|
-
expect(
|
|
124
|
+
expect(mockCallback).toHaveBeenCalledTimes(1);
|
|
125
|
+
// The transitionend event firing should not cause the callback to be called again
|
|
126
|
+
fireEvent.transitionEnd(screen.getByText('Test Alert').closest('.pf-v6-c-alert-group__item') as HTMLElement);
|
|
127
|
+
expect(mockCallback).toHaveBeenCalledTimes(1);
|
|
85
128
|
});
|