@patternfly/react-core 6.4.1-prerelease.9 → 6.4.1
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 +2 -48
- 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/AnimationsProvider/AnimationsProvider/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/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/esm/components/Checkbox/Checkbox.d.ts +0 -3
- package/dist/esm/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +4 -14
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js +4 -2
- package/dist/esm/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts +0 -4
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.js +3 -5
- package/dist/esm/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts +0 -4
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.js +2 -2
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.js.map +1 -1
- package/dist/esm/components/Modal/Modal.d.ts +0 -2
- package/dist/esm/components/Modal/Modal.d.ts.map +1 -1
- package/dist/esm/components/Modal/Modal.js.map +1 -1
- package/dist/esm/components/Modal/ModalContent.d.ts +0 -2
- package/dist/esm/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalContent.js +2 -2
- package/dist/esm/components/Modal/ModalContent.js.map +1 -1
- package/dist/esm/components/Progress/ProgressContainer.js +2 -2
- package/dist/esm/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/esm/components/Radio/Radio.d.ts +0 -3
- package/dist/esm/components/Radio/Radio.d.ts.map +1 -1
- package/dist/esm/components/Radio/Radio.js +5 -15
- package/dist/esm/components/Radio/Radio.js.map +1 -1
- package/dist/esm/components/Wizard/WizardNavInternal.js +3 -3
- package/dist/esm/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/esm/components/Wizard/WizardNavItem.d.ts +1 -1
- package/dist/esm/components/Wizard/WizardNavItem.d.ts.map +1 -1
- package/dist/esm/components/Wizard/WizardNavItem.js +1 -2
- package/dist/esm/components/Wizard/WizardNavItem.js.map +1 -1
- package/dist/esm/components/Wizard/WizardStep.d.ts +1 -1
- package/dist/esm/components/Wizard/WizardStep.d.ts.map +1 -1
- package/dist/esm/components/Wizard/types.d.ts +2 -3
- package/dist/esm/components/Wizard/types.d.ts.map +1 -1
- package/dist/esm/components/Wizard/types.js +0 -1
- package/dist/esm/components/Wizard/types.js.map +1 -1
- package/dist/esm/helpers/FocusTrap/FocusTrap.d.ts +0 -2
- package/dist/esm/helpers/FocusTrap/FocusTrap.d.ts.map +1 -1
- package/dist/esm/helpers/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/esm/helpers/resizeObserver.js +2 -2
- package/dist/esm/helpers/resizeObserver.js.map +1 -1
- package/dist/js/components/Checkbox/Checkbox.d.ts +0 -3
- package/dist/js/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/js/components/Checkbox/Checkbox.js +4 -14
- package/dist/js/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js +4 -2
- package/dist/js/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts +0 -4
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.js +3 -5
- package/dist/js/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts +0 -4
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.js +2 -2
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.js.map +1 -1
- package/dist/js/components/Modal/Modal.d.ts +0 -2
- package/dist/js/components/Modal/Modal.d.ts.map +1 -1
- package/dist/js/components/Modal/Modal.js.map +1 -1
- package/dist/js/components/Modal/ModalContent.d.ts +0 -2
- package/dist/js/components/Modal/ModalContent.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalContent.js +2 -2
- package/dist/js/components/Modal/ModalContent.js.map +1 -1
- package/dist/js/components/Progress/ProgressContainer.js +2 -2
- package/dist/js/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/js/components/Radio/Radio.d.ts +0 -3
- package/dist/js/components/Radio/Radio.d.ts.map +1 -1
- package/dist/js/components/Radio/Radio.js +5 -15
- package/dist/js/components/Radio/Radio.js.map +1 -1
- package/dist/js/components/Wizard/WizardNavInternal.js +3 -3
- package/dist/js/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/js/components/Wizard/WizardNavItem.d.ts +1 -1
- package/dist/js/components/Wizard/WizardNavItem.d.ts.map +1 -1
- package/dist/js/components/Wizard/WizardNavItem.js +1 -2
- package/dist/js/components/Wizard/WizardNavItem.js.map +1 -1
- package/dist/js/components/Wizard/WizardStep.d.ts +1 -1
- package/dist/js/components/Wizard/WizardStep.d.ts.map +1 -1
- package/dist/js/components/Wizard/types.d.ts +2 -3
- package/dist/js/components/Wizard/types.d.ts.map +1 -1
- package/dist/js/components/Wizard/types.js +0 -1
- package/dist/js/components/Wizard/types.js.map +1 -1
- package/dist/js/helpers/FocusTrap/FocusTrap.d.ts +0 -2
- package/dist/js/helpers/FocusTrap/FocusTrap.d.ts.map +1 -1
- package/dist/js/helpers/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/js/helpers/resizeObserver.js +1 -1
- package/dist/js/helpers/resizeObserver.js.map +1 -1
- package/dist/umd/assets/{output-CJfbZNQh.css → output-Bj1Aarly.css} +14883 -14883
- package/dist/umd/react-core.min.js +1 -1
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +2 -2
- package/src/components/Alert/examples/Alert.md +275 -26
- package/src/components/Checkbox/Checkbox.tsx +2 -21
- package/src/components/Checkbox/__tests__/Checkbox.test.tsx +0 -34
- package/src/components/Drawer/DrawerPanelContent.tsx +3 -5
- package/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx +0 -37
- package/src/components/ExpandableSection/ExpandableSection.tsx +0 -10
- package/src/components/ExpandableSection/ExpandableSectionToggle.tsx +0 -8
- package/src/components/ExpandableSection/__tests__/ExpandableSection.test.tsx +0 -17
- package/src/components/ExpandableSection/__tests__/ExpandableSectionToggle.test.tsx +0 -17
- package/src/components/MenuToggle/examples/MenuToggle.md +96 -13
- package/src/components/Modal/Modal.tsx +0 -2
- package/src/components/Modal/ModalContent.tsx +0 -4
- package/src/components/Modal/__tests__/Modal.test.tsx +0 -9
- package/src/components/Modal/__tests__/ModalContent.test.tsx +1 -17
- package/src/components/Modal/examples/Modal.md +5 -14
- package/src/components/Modal/examples/ModalWithDropdown.tsx +7 -34
- package/src/components/Panel/examples/Panel.md +159 -10
- package/src/components/Progress/ProgressContainer.tsx +2 -2
- package/src/components/Progress/__tests__/Generated/__snapshots__/ProgressContainer.test.tsx.snap +1 -1
- package/src/components/Progress/__tests__/__snapshots__/Progress.test.tsx.snap +1 -1
- package/src/components/Radio/Radio.tsx +3 -21
- package/src/components/Radio/__tests__/Radio.test.tsx +0 -44
- package/src/components/Tabs/__tests__/Tabs.test.tsx +1 -109
- package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +2 -2
- package/src/components/Tabs/examples/Tabs.md +4 -38
- package/src/components/Tabs/examples/TabsSeparateContent.tsx +2 -3
- package/src/components/Wizard/WizardNavInternal.tsx +3 -3
- package/src/components/Wizard/WizardNavItem.tsx +2 -5
- package/src/components/Wizard/WizardStep.tsx +1 -1
- package/src/components/Wizard/__tests__/Wizard.test.tsx +39 -0
- package/src/components/Wizard/__tests__/WizardNavItem.test.tsx +0 -6
- package/src/components/Wizard/__tests__/WizardStep.test.tsx +0 -2
- package/src/components/Wizard/examples/WizardStepStatus.tsx +7 -28
- package/src/components/Wizard/types.tsx +2 -3
- package/src/demos/AlertGroup.md +1 -1
- package/src/demos/BackToTop.md +1 -1
- package/src/demos/{Button/examples/ButtonProgress.tsx → Button.md} +19 -1
- package/src/demos/CardView/CardView.md +1 -1
- package/src/demos/DataListDemo.md +4 -4
- package/src/demos/DescriptionList/DescriptionList.md +2 -2
- package/src/demos/Nav.md +9 -9
- package/src/demos/{PasswordGenerator/examples/PasswordGenerator.tsx → PasswordGenerator.md} +19 -3
- package/src/demos/PrimaryDetail.md +6 -6
- package/src/demos/RTL/RTL.md +1 -1
- package/src/demos/SearchInput/SearchInput.md +487 -2
- package/src/demos/Toolbar.md +1 -1
- package/src/demos/examples/BackToTop/BackToTopNameDemo.tsx +1 -1
- package/src/helpers/FocusTrap/FocusTrap.tsx +0 -2
- package/src/helpers/FocusTrap/__tests__/Generated/FocusTrap.test.tsx +3 -3
- package/src/helpers/OUIA/OUIA.md +10 -2
- package/src/helpers/resizeObserver.tsx +2 -2
- package/src/layouts/Bullseye/examples/Bullseye.md +5 -1
- package/src/layouts/Flex/examples/Flex.md +442 -42
- package/src/layouts/Level/examples/Level.md +15 -3
- package/src/layouts/Split/examples/Split.md +34 -4
- package/src/components/Alert/examples/AlertCustomIcons.tsx +0 -17
- package/src/components/Alert/examples/AlertExpandable.tsx +0 -36
- package/src/components/Alert/examples/AlertInlineVariants.tsx +0 -12
- package/src/components/Alert/examples/AlertInlineVariations.tsx +0 -45
- package/src/components/Alert/examples/AlertPlainInlineVariants.tsx +0 -12
- package/src/components/Alert/examples/AlertPlainInlineVariations.tsx +0 -7
- package/src/components/Alert/examples/AlertStaticLiveRegion.tsx +0 -29
- package/src/components/Alert/examples/AlertTimeout.tsx +0 -45
- package/src/components/Alert/examples/AlertTruncated.tsx +0 -28
- package/src/components/Alert/examples/AlertVariants.tsx +0 -12
- package/src/components/Alert/examples/AlertVariations.tsx +0 -43
- package/src/components/MenuToggle/examples/MenuToggleAvatarText.tsx +0 -15
- package/src/components/MenuToggle/examples/MenuToggleBadge.tsx +0 -9
- package/src/components/MenuToggle/examples/MenuToggleCollapsed.tsx +0 -3
- package/src/components/MenuToggle/examples/MenuToggleDisabled.tsx +0 -3
- package/src/components/MenuToggle/examples/MenuToggleExpanded.tsx +0 -3
- package/src/components/MenuToggle/examples/MenuToggleFullHeight.tsx +0 -9
- package/src/components/MenuToggle/examples/MenuToggleFullWidth.tsx +0 -7
- package/src/components/MenuToggle/examples/MenuTogglePlainIcon.tsx +0 -11
- package/src/components/MenuToggle/examples/MenuTogglePlainTextLabel.tsx +0 -16
- package/src/components/MenuToggle/examples/MenuToggleVariantStyles.tsx +0 -14
- package/src/components/Panel/examples/PanelBasic.tsx +0 -9
- package/src/components/Panel/examples/PanelBordered.tsx +0 -9
- package/src/components/Panel/examples/PanelFooterExample.tsx +0 -10
- package/src/components/Panel/examples/PanelHeaderExample.tsx +0 -11
- package/src/components/Panel/examples/PanelHeaderFooter.tsx +0 -12
- package/src/components/Panel/examples/PanelNoBody.tsx +0 -7
- package/src/components/Panel/examples/PanelRaised.tsx +0 -9
- package/src/components/Panel/examples/PanelScrollable.tsx +0 -35
- package/src/components/Panel/examples/PanelScrollableHeaderFooter.tsx +0 -38
- package/src/components/Panel/examples/PanelSecondaryVariant.tsx +0 -9
- package/src/demos/Button/Button.md +0 -19
- package/src/demos/PasswordGenerator/PasswordGenerator.md +0 -16
- package/src/demos/SearchInput/examples/SearchInputAdvancedComposable.tsx +0 -322
- package/src/demos/SearchInput/examples/SearchInputAutocomplete.tsx +0 -165
- package/src/helpers/FocusTrap/__tests__/FocusTrap.test.tsx +0 -17
- package/src/helpers/OUIA/examples/OuiaExample.tsx +0 -11
- package/src/layouts/Bullseye/examples/BullseyeBasic.tsx +0 -7
- package/src/layouts/Flex/examples/FlexAdjustingWidth.tsx +0 -18
- package/src/layouts/Flex/examples/FlexAlignAdjacentContent.tsx +0 -16
- package/src/layouts/Flex/examples/FlexAlignRightMultipleGroups.tsx +0 -18
- package/src/layouts/Flex/examples/FlexAlignRightSingleItem.tsx +0 -8
- package/src/layouts/Flex/examples/FlexAlignSelfBaseline.tsx +0 -15
- package/src/layouts/Flex/examples/FlexAlignSelfCenter.tsx +0 -15
- package/src/layouts/Flex/examples/FlexAlignSelfFlexEnd.tsx +0 -15
- package/src/layouts/Flex/examples/FlexAlignSelfStretch.tsx +0 -15
- package/src/layouts/Flex/examples/FlexAligningRight.tsx +0 -11
- package/src/layouts/Flex/examples/FlexAlternative.tsx +0 -11
- package/src/layouts/Flex/examples/FlexBasic.tsx +0 -11
- package/src/layouts/Flex/examples/FlexCanGrow.tsx +0 -18
- package/src/layouts/Flex/examples/FlexColumnGap.tsx +0 -16
- package/src/layouts/Flex/examples/FlexColumnLayout.tsx +0 -9
- package/src/layouts/Flex/examples/FlexColumnWidths.tsx +0 -18
- package/src/layouts/Flex/examples/FlexControlTextWidth.tsx +0 -17
- package/src/layouts/Flex/examples/FlexDefaultLayout.tsx +0 -11
- package/src/layouts/Flex/examples/FlexFirstLastOrder.tsx +0 -13
- package/src/layouts/Flex/examples/FlexGap.tsx +0 -16
- package/src/layouts/Flex/examples/FlexIndividuallySpaced.tsx +0 -14
- package/src/layouts/Flex/examples/FlexInline.tsx +0 -11
- package/src/layouts/Flex/examples/FlexJustifyContentEnd.tsx +0 -10
- package/src/layouts/Flex/examples/FlexJustifyContentFlexStart.tsx +0 -9
- package/src/layouts/Flex/examples/FlexJustifyContentSpaceBetween.tsx +0 -9
- package/src/layouts/Flex/examples/FlexNestedItems.tsx +0 -15
- package/src/layouts/Flex/examples/FlexNesting.tsx +0 -15
- package/src/layouts/Flex/examples/FlexNestingInColumns.tsx +0 -15
- package/src/layouts/Flex/examples/FlexOrdering.tsx +0 -24
- package/src/layouts/Flex/examples/FlexResponsiveFirstLastOrder.tsx +0 -15
- package/src/layouts/Flex/examples/FlexResponsiveOrdering.tsx +0 -25
- package/src/layouts/Flex/examples/FlexRowGap.tsx +0 -16
- package/src/layouts/Flex/examples/FlexSpacingNone.tsx +0 -11
- package/src/layouts/Flex/examples/FlexSpacingXl.tsx +0 -11
- package/src/layouts/Flex/examples/FlexStackingElements.tsx +0 -18
- package/src/layouts/Flex/examples/FlexSwitchingColumnRow.tsx +0 -16
- package/src/layouts/Level/examples/LevelBasic.tsx +0 -9
- package/src/layouts/Level/examples/LevelWithGutters.tsx +0 -9
- package/src/layouts/Split/examples/SplitBasic.tsx +0 -9
- package/src/layouts/Split/examples/SplitWithGutter.tsx +0 -9
- package/src/layouts/Split/examples/SplitWrappable.tsx +0 -20
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.4.
|
|
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.4.0","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.4.
|
|
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.4.0","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.4.
|
|
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.4.0","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.4.1
|
|
3
|
+
"version": "6.4.1",
|
|
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",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react": "^17 || ^18 || ^19",
|
|
64
64
|
"react-dom": "^17 || ^18 || ^19"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "476782a298df81cb78de7f3cd804f3ff8f33993c"
|
|
67
67
|
}
|
|
@@ -33,8 +33,17 @@ PatternFly supports several alert variants for different scenarios. Each variant
|
|
|
33
33
|
| Warning | Use to indicate that a non-critical error has occurred |
|
|
34
34
|
| Danger | Use to indicate that a critical or blocking error has occurred |
|
|
35
35
|
|
|
36
|
-
```ts
|
|
37
|
-
|
|
36
|
+
```ts
|
|
37
|
+
import { Fragment } from 'react';
|
|
38
|
+
import { Alert } from '@patternfly/react-core';
|
|
39
|
+
|
|
40
|
+
<Fragment>
|
|
41
|
+
<Alert title="Custom alert title" ouiaId="CustomAlert" />
|
|
42
|
+
<Alert variant="info" title="Info alert title" ouiaId="InfoAlert" />
|
|
43
|
+
<Alert variant="success" title="Success alert title" ouiaId="SuccessAlert" />
|
|
44
|
+
<Alert variant="warning" title="Warning alert title" ouiaId="WarningAlert" />
|
|
45
|
+
<Alert variant="danger" title="Danger alert title" ouiaId="DangerAlert" />
|
|
46
|
+
</Fragment>;
|
|
38
47
|
```
|
|
39
48
|
|
|
40
49
|
### Alert variations
|
|
@@ -51,16 +60,99 @@ PatternFly supports several properties and variations that can be used to add ex
|
|
|
51
60
|
- If there is not a description passed via `children` prop, then the `component` prop should be set to a non-heading element such as a `span` or `div`.
|
|
52
61
|
- If there is a description passed via `children` prop, then the `component` prop should be a heading element. Headings should be ordered by their level and heading levels should not be skipped. For example, a heading of an `h2` level should not be followed directly by an `h4`.
|
|
53
62
|
|
|
54
|
-
```ts
|
|
55
|
-
|
|
63
|
+
```ts
|
|
64
|
+
import { Fragment } from 'react';
|
|
65
|
+
import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';
|
|
66
|
+
|
|
67
|
+
<Fragment>
|
|
68
|
+
<Alert
|
|
69
|
+
variant="success"
|
|
70
|
+
title="Success alert title"
|
|
71
|
+
actionLinks={
|
|
72
|
+
<Fragment>
|
|
73
|
+
<AlertActionLink component="a" href="#">
|
|
74
|
+
View details
|
|
75
|
+
</AlertActionLink>
|
|
76
|
+
<AlertActionLink // eslint-disable-next-line no-console
|
|
77
|
+
onClick={() => console.log('Clicked on Ignore')}
|
|
78
|
+
>
|
|
79
|
+
Ignore
|
|
80
|
+
</AlertActionLink>
|
|
81
|
+
</Fragment>
|
|
82
|
+
}
|
|
83
|
+
>
|
|
84
|
+
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
85
|
+
</Alert>
|
|
86
|
+
<Alert variant="success" title="Success alert title">
|
|
87
|
+
<p>
|
|
88
|
+
Success alert description. This should tell the user more information about the alert.{' '}
|
|
89
|
+
<a href="#">This is a link.</a>
|
|
90
|
+
</p>
|
|
91
|
+
</Alert>
|
|
92
|
+
<Alert
|
|
93
|
+
variant="success"
|
|
94
|
+
title="Success alert title"
|
|
95
|
+
// eslint-disable-next-line no-console
|
|
96
|
+
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
97
|
+
>
|
|
98
|
+
<p>Short alert description.</p>
|
|
99
|
+
</Alert>
|
|
100
|
+
<Alert variant="success" title="div success alert title" component="div" />
|
|
101
|
+
<Alert variant="success" title="h6 Success alert title" component="h6">
|
|
102
|
+
<p>Short alert description.</p>
|
|
103
|
+
</Alert>
|
|
104
|
+
</Fragment>;
|
|
56
105
|
```
|
|
57
106
|
|
|
58
107
|
### Alert timeout
|
|
59
108
|
|
|
60
109
|
Use the `timeout` property to automatically dismiss an alert after a period of time. If set to `true`, the `timeout` will be 8000 milliseconds. Provide a specific value to dismiss the alert after a different number of milliseconds.
|
|
61
110
|
|
|
62
|
-
```ts
|
|
63
|
-
|
|
111
|
+
```ts
|
|
112
|
+
import { Fragment, useState } from 'react';
|
|
113
|
+
import { Alert, AlertActionLink, AlertGroup, Button } from '@patternfly/react-core';
|
|
114
|
+
|
|
115
|
+
const AlertTimeout: React.FunctionComponent = () => {
|
|
116
|
+
const [alerts, setAlerts] = useState<React.ReactNode[]>([]);
|
|
117
|
+
const [newAlertKey, setNewAlertKey] = useState<number>(0);
|
|
118
|
+
|
|
119
|
+
const onClick = () => {
|
|
120
|
+
const timeout = 8000;
|
|
121
|
+
setNewAlertKey((key) => key + 1);
|
|
122
|
+
setAlerts((prevAlerts) => {
|
|
123
|
+
return [
|
|
124
|
+
<Alert
|
|
125
|
+
title="Default timeout Alert"
|
|
126
|
+
timeout={timeout}
|
|
127
|
+
actionLinks={
|
|
128
|
+
<Fragment>
|
|
129
|
+
<AlertActionLink component="a" href="#">
|
|
130
|
+
View details
|
|
131
|
+
</AlertActionLink>
|
|
132
|
+
<AlertActionLink // eslint-disable-next-line no-console
|
|
133
|
+
onClick={() => console.log('Clicked on Ignore')}
|
|
134
|
+
>
|
|
135
|
+
Ignore
|
|
136
|
+
</AlertActionLink>
|
|
137
|
+
</Fragment>
|
|
138
|
+
}
|
|
139
|
+
key={newAlertKey}
|
|
140
|
+
>
|
|
141
|
+
This alert will dismiss after {`${timeout / 1000} seconds`}
|
|
142
|
+
</Alert>, ...prevAlerts
|
|
143
|
+
];
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
<Fragment>
|
|
149
|
+
<Button variant="secondary" onClick={onClick}>
|
|
150
|
+
Add alert
|
|
151
|
+
</Button>
|
|
152
|
+
<AlertGroup hasAnimations isLiveRegion>{alerts}</AlertGroup>
|
|
153
|
+
</Fragment>
|
|
154
|
+
);
|
|
155
|
+
};
|
|
64
156
|
```
|
|
65
157
|
|
|
66
158
|
### Expandable alerts
|
|
@@ -71,56 +163,188 @@ It is not recommended to use an expandable alert with a `timeout` in a [toast al
|
|
|
71
163
|
|
|
72
164
|
See the [toast alert considerations](/components/alert/accessibility#toast-alerts) section of the alert accessibility documentation to understand the accessibility risks associated with using toast alerts.
|
|
73
165
|
|
|
74
|
-
```ts
|
|
75
|
-
|
|
166
|
+
```ts
|
|
167
|
+
import { Fragment } from 'react';
|
|
168
|
+
import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';
|
|
169
|
+
|
|
170
|
+
<Fragment>
|
|
171
|
+
<Alert
|
|
172
|
+
isExpandable
|
|
173
|
+
variant="success"
|
|
174
|
+
title="Success alert title"
|
|
175
|
+
// eslint-disable-next-line no-console
|
|
176
|
+
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
177
|
+
>
|
|
178
|
+
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
179
|
+
</Alert>
|
|
180
|
+
<Alert
|
|
181
|
+
isExpandable
|
|
182
|
+
isInline
|
|
183
|
+
variant="success"
|
|
184
|
+
title="Success alert title"
|
|
185
|
+
actionLinks={
|
|
186
|
+
<Fragment>
|
|
187
|
+
<AlertActionLink component="a" href="#">
|
|
188
|
+
View details
|
|
189
|
+
</AlertActionLink>
|
|
190
|
+
<AlertActionLink // eslint-disable-next-line no-console
|
|
191
|
+
onClick={() => console.log('Clicked on Ignore')}
|
|
192
|
+
>
|
|
193
|
+
Ignore
|
|
194
|
+
</AlertActionLink>
|
|
195
|
+
</Fragment>
|
|
196
|
+
}
|
|
197
|
+
>
|
|
198
|
+
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
199
|
+
</Alert>
|
|
200
|
+
</Fragment>;
|
|
76
201
|
```
|
|
77
202
|
|
|
78
203
|
### Truncated alerts
|
|
79
204
|
|
|
80
205
|
Use the `truncateTitle` property to shorten a long `title`. Set `truncateTitle` equal to a number (passed in as `{n}`) to reduce the number of lines of text in the alert's `title`. Users may hover over or tab to a truncated `title` to see the full message in a tooltip.
|
|
81
206
|
|
|
82
|
-
```ts
|
|
83
|
-
|
|
207
|
+
```ts
|
|
208
|
+
import { Fragment } from 'react';
|
|
209
|
+
import { Alert } from '@patternfly/react-core';
|
|
210
|
+
|
|
211
|
+
<Fragment>
|
|
212
|
+
<Alert
|
|
213
|
+
variant="info"
|
|
214
|
+
truncateTitle={1}
|
|
215
|
+
title={`
|
|
216
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pellentesque neque cursus enim fringilla tincidunt. Proin lobortis aliquam dictum. Nam vel ullamcorper nulla, nec blandit dolor. Vivamus pellentesque neque justo, nec accumsan nulla rhoncus id. Suspendisse mollis, tortor quis faucibus volutpat, sem leo fringilla turpis, ac lacinia augue metus in nulla. Cras vestibulum lacinia orci. Pellentesque sodales consequat interdum. Sed porttitor tincidunt metus nec iaculis. Pellentesque non commodo justo. Morbi feugiat rhoncus neque, vitae facilisis diam aliquam nec. Sed dapibus vitae quam at tristique. Nunc vel commodo mi. Mauris et rhoncus leo.
|
|
217
|
+
`}
|
|
218
|
+
/>
|
|
219
|
+
<Alert
|
|
220
|
+
variant="warning"
|
|
221
|
+
truncateTitle={2}
|
|
222
|
+
title={`
|
|
223
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pellentesque neque cursus enim fringilla tincidunt. Proin lobortis aliquam dictum. Nam vel ullamcorper nulla, nec blandit dolor. Vivamus pellentesque neque justo, nec accumsan nulla rhoncus id. Suspendisse mollis, tortor quis faucibus volutpat, sem leo fringilla turpis, ac lacinia augue metus in nulla. Cras vestibulum lacinia orci. Pellentesque sodales consequat interdum. Sed porttitor tincidunt metus nec iaculis. Pellentesque non commodo justo. Morbi feugiat rhoncus neque, vitae facilisis diam aliquam nec. Sed dapibus vitae quam at tristique. Nunc vel commodo mi. Mauris et rhoncus leo.
|
|
224
|
+
`}
|
|
225
|
+
/>
|
|
226
|
+
<Alert
|
|
227
|
+
variant="danger"
|
|
228
|
+
truncateTitle={3}
|
|
229
|
+
title={`
|
|
230
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pellentesque neque cursus enim fringilla tincidunt. Proin lobortis aliquam dictum. Nam vel ullamcorper nulla, nec blandit dolor. Vivamus pellentesque neque justo, nec accumsan nulla rhoncus id. Suspendisse mollis, tortor quis faucibus volutpat, sem leo fringilla turpis, ac lacinia augue metus in nulla. Cras vestibulum lacinia orci. Pellentesque sodales consequat interdum. Sed porttitor tincidunt metus nec iaculis. Pellentesque non commodo justo. Morbi feugiat rhoncus neque, vitae facilisis diam aliquam nec. Sed dapibus vitae quam at tristique. Nunc vel commodo mi. Mauris et rhoncus leo.
|
|
231
|
+
`}
|
|
232
|
+
/>
|
|
233
|
+
</Fragment>;
|
|
84
234
|
```
|
|
85
235
|
|
|
86
236
|
### Custom icons
|
|
87
237
|
|
|
88
238
|
Use the `customIcon` property to replace a default alert icon with a custom icon.
|
|
89
239
|
|
|
90
|
-
```ts
|
|
240
|
+
```ts
|
|
241
|
+
import { Fragment } from 'react';
|
|
242
|
+
import { Alert } from '@patternfly/react-core';
|
|
243
|
+
import UsersIcon from '@patternfly/react-icons/dist/esm/icons/users-icon';
|
|
244
|
+
import BoxIcon from '@patternfly/react-icons/dist/esm/icons/box-icon';
|
|
245
|
+
import DatabaseIcon from '@patternfly/react-icons/dist/esm/icons/database-icon';
|
|
246
|
+
import ServerIcon from '@patternfly/react-icons/dist/esm/icons/server-icon';
|
|
247
|
+
import LaptopIcon from '@patternfly/react-icons/dist/esm/icons/laptop-icon';
|
|
91
248
|
|
|
249
|
+
<Fragment>
|
|
250
|
+
<Alert customIcon={<UsersIcon />} title="Default alert title" />
|
|
251
|
+
<Alert customIcon={<BoxIcon />} variant="info" title="Info alert title" />
|
|
252
|
+
<Alert customIcon={<DatabaseIcon />} variant="success" title="Success alert title" />
|
|
253
|
+
<Alert customIcon={<ServerIcon />} variant="warning" title="Warning alert title" />
|
|
254
|
+
<Alert customIcon={<LaptopIcon />} variant="danger" title="Danger alert title" />
|
|
255
|
+
</Fragment>;
|
|
92
256
|
```
|
|
93
257
|
|
|
94
258
|
### Inline alerts variants
|
|
95
259
|
|
|
96
260
|
Use inline alerts to display an alert inline with content. All alert variants may use the `isInline` property to position alerts in content-heavy areas, such as within forms, wizards, or drawers.
|
|
97
261
|
|
|
98
|
-
```ts
|
|
99
|
-
|
|
262
|
+
```ts
|
|
263
|
+
import { Fragment } from 'react';
|
|
264
|
+
import { Alert } from '@patternfly/react-core';
|
|
265
|
+
<Fragment>
|
|
266
|
+
<Alert variant="custom" isInline title="Custom inline alert title" />
|
|
267
|
+
<Alert variant="info" isInline title="Info inline alert title" />
|
|
268
|
+
<Alert variant="success" isInline title="Success inline alert title" />
|
|
269
|
+
<Alert variant="warning" isInline title="Warning inline alert title" />
|
|
270
|
+
<Alert variant="danger" isInline title="Danger inline alert title" />
|
|
271
|
+
</Fragment>;
|
|
100
272
|
```
|
|
101
273
|
|
|
102
274
|
### Inline alert variations
|
|
103
275
|
|
|
104
276
|
All general alert variations can use the `isInline` property to apply inline styling.
|
|
105
277
|
|
|
106
|
-
```ts
|
|
107
|
-
|
|
278
|
+
```ts
|
|
279
|
+
import { Fragment } from 'react';
|
|
280
|
+
import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';
|
|
281
|
+
<Fragment>
|
|
282
|
+
<Alert
|
|
283
|
+
isInline
|
|
284
|
+
variant="success"
|
|
285
|
+
title="Success alert title"
|
|
286
|
+
actionLinks={
|
|
287
|
+
<Fragment>
|
|
288
|
+
<AlertActionLink component="a" href="#">
|
|
289
|
+
View details
|
|
290
|
+
</AlertActionLink>
|
|
291
|
+
<AlertActionLink // eslint-disable-next-line no-console
|
|
292
|
+
onClick={() => console.log('Clicked on Ignore')}
|
|
293
|
+
>
|
|
294
|
+
Ignore
|
|
295
|
+
</AlertActionLink>
|
|
296
|
+
</Fragment>
|
|
297
|
+
}
|
|
298
|
+
>
|
|
299
|
+
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
300
|
+
</Alert>
|
|
301
|
+
<Alert isInline variant="success" title="Success alert title">
|
|
302
|
+
<p>
|
|
303
|
+
Success alert description. This should tell the user more information about the alert.{' '}
|
|
304
|
+
<a href="#">This is a link.</a>
|
|
305
|
+
</p>
|
|
306
|
+
</Alert>
|
|
307
|
+
<Alert
|
|
308
|
+
isInline
|
|
309
|
+
variant="success"
|
|
310
|
+
title="Success alert title"
|
|
311
|
+
// eslint-disable-next-line no-console
|
|
312
|
+
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
313
|
+
>
|
|
314
|
+
<p>Short alert description.</p>
|
|
315
|
+
</Alert>
|
|
316
|
+
<Alert isInline variant="success" title="div success alert title" component="div" />
|
|
317
|
+
<Alert isInline variant="success" title="h6 Success alert title" component="h6">
|
|
318
|
+
<p>Short alert description.</p>
|
|
319
|
+
</Alert>
|
|
320
|
+
</Fragment>;
|
|
108
321
|
```
|
|
109
322
|
|
|
110
323
|
### Plain inline alert variants
|
|
111
324
|
|
|
112
325
|
Use the `isPlain` property to make any inline alert plain. Plain styling removes the colored background but keeps colored text and icons.
|
|
113
326
|
|
|
114
|
-
```ts
|
|
115
|
-
|
|
327
|
+
```ts
|
|
328
|
+
import { Fragment } from 'react';
|
|
329
|
+
import { Alert } from '@patternfly/react-core';
|
|
330
|
+
<Fragment>
|
|
331
|
+
<Alert variant="custom" isInline isPlain title="Custom inline alert title" />
|
|
332
|
+
<Alert variant="info" isInline isPlain title="Info inline alert title" />
|
|
333
|
+
<Alert variant="success" isInline isPlain title="Success inline alert title" />
|
|
334
|
+
<Alert variant="warning" isInline isPlain title="Warning inline alert title" />
|
|
335
|
+
<Alert variant="danger" isInline isPlain title="Danger inline alert title" />
|
|
336
|
+
</Fragment>;
|
|
116
337
|
```
|
|
117
338
|
|
|
118
339
|
### Plain inline alert variations
|
|
119
340
|
|
|
120
341
|
It is not recommended to use a plain inline alert with `actionClose` nor `actionLinks` because these alerts are non-dismissible and should persist until the error or action related to the alert is resolved.
|
|
121
342
|
|
|
122
|
-
```ts
|
|
123
|
-
|
|
343
|
+
```ts
|
|
344
|
+
import { Alert } from '@patternfly/react-core';
|
|
345
|
+
<Alert isInline isPlain variant="success" title="Success alert title">
|
|
346
|
+
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
347
|
+
</Alert>;
|
|
124
348
|
```
|
|
125
349
|
|
|
126
350
|
### Static live region alerts
|
|
@@ -129,8 +353,33 @@ Live region alerts allow you to expose dynamic content changes in a way that can
|
|
|
129
353
|
|
|
130
354
|
By default, `isLiveRegion`alerts are static.
|
|
131
355
|
|
|
132
|
-
```ts
|
|
133
|
-
|
|
356
|
+
```ts
|
|
357
|
+
import { Fragment } from 'react';
|
|
358
|
+
import { Alert, AlertActionCloseButton } from '@patternfly/react-core';
|
|
359
|
+
|
|
360
|
+
<Fragment>
|
|
361
|
+
<Alert
|
|
362
|
+
isLiveRegion
|
|
363
|
+
variant="info"
|
|
364
|
+
title="Default live region configuration"
|
|
365
|
+
// eslint-disable-next-line no-console
|
|
366
|
+
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
367
|
+
>
|
|
368
|
+
This alert uses the recommended <code>isLiveRegion</code> prop to automatically set ARIA attributes and CSS classes.
|
|
369
|
+
</Alert>
|
|
370
|
+
<Alert
|
|
371
|
+
aria-live="assertive"
|
|
372
|
+
aria-relevant="additions text"
|
|
373
|
+
aria-atomic="true"
|
|
374
|
+
variant="info"
|
|
375
|
+
title="Customized live region"
|
|
376
|
+
// eslint-disable-next-line no-console
|
|
377
|
+
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
378
|
+
>
|
|
379
|
+
You can alternatively omit the <code>isLiveRegion</code> prop to specify ARIA attributes and CSS manually on the
|
|
380
|
+
containing element.
|
|
381
|
+
</Alert>
|
|
382
|
+
</Fragment>;
|
|
134
383
|
```
|
|
135
384
|
|
|
136
385
|
### Dynamic live region alerts
|
|
@@ -169,7 +418,7 @@ Dynamic alerts that are generated after the page initially loads must be appende
|
|
|
169
418
|
|
|
170
419
|
All alert group variants may combine multiple [alert variants](/components/alert) For example, the following static inline alert group includes one "success" alert and one "info" alert.
|
|
171
420
|
|
|
172
|
-
```ts file="AlertGroupStatic.tsx"
|
|
421
|
+
```ts file="./AlertGroupStatic.tsx"
|
|
173
422
|
|
|
174
423
|
```
|
|
175
424
|
|
|
@@ -179,7 +428,7 @@ Toast alert groups are created by passing in the `isToast` and `isLiveRegion` pr
|
|
|
179
428
|
|
|
180
429
|
Click the buttons in the example below to add alerts to a toast group.
|
|
181
430
|
|
|
182
|
-
```ts file="AlertGroupToast.tsx"
|
|
431
|
+
```ts file="./AlertGroupToast.tsx"
|
|
183
432
|
|
|
184
433
|
```
|
|
185
434
|
|
|
@@ -203,7 +452,7 @@ The following example shows how alerts can be triggered by an asynchronous event
|
|
|
203
452
|
|
|
204
453
|
See the [alert accessibility tab](/components/alert/accessibility) for more information on customizing this behavior.
|
|
205
454
|
|
|
206
|
-
```ts file="AlertGroupAsync.tsx"
|
|
455
|
+
```ts file="./AlertGroupAsync.tsx"
|
|
207
456
|
|
|
208
457
|
```
|
|
209
458
|
|
|
@@ -211,7 +460,7 @@ See the [alert accessibility tab](/components/alert/accessibility) for more info
|
|
|
211
460
|
|
|
212
461
|
Click the buttons in the example below to add dynamic alerts to a group.
|
|
213
462
|
|
|
214
|
-
```ts file="AlertGroupSingularDynamic.tsx"
|
|
463
|
+
```ts file="./AlertGroupSingularDynamic.tsx"
|
|
215
464
|
|
|
216
465
|
```
|
|
217
466
|
|
|
@@ -227,6 +476,6 @@ In the following example, there can be a maximum of 4 alerts shown at once.
|
|
|
227
476
|
|
|
228
477
|
You may add multiple alerts to an alert group at once. Click the "add alert collection" button in the example below to add a batch of 3 toast alerts to a group.
|
|
229
478
|
|
|
230
|
-
```ts file="AlertGroupMultipleDynamic.tsx"
|
|
479
|
+
```ts file="./AlertGroupMultipleDynamic.tsx"
|
|
231
480
|
|
|
232
481
|
```
|
|
@@ -3,7 +3,6 @@ import styles from '@patternfly/react-styles/css/components/Check/check';
|
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { PickOptional } from '../../helpers/typeUtils';
|
|
5
5
|
import { getDefaultOUIAId, getOUIAProps, OUIAProps } from '../../helpers';
|
|
6
|
-
import { getUniqueId } from '../../helpers/util';
|
|
7
6
|
import { ASTERISK } from '../../helpers/htmlConstants';
|
|
8
7
|
|
|
9
8
|
export interface CheckboxProps
|
|
@@ -40,8 +39,6 @@ export interface CheckboxProps
|
|
|
40
39
|
description?: React.ReactNode;
|
|
41
40
|
/** Body text of the checkbox */
|
|
42
41
|
body?: React.ReactNode;
|
|
43
|
-
/** Custom aria-describedby value for the checkbox input. If not provided and description is set, a unique ID will be generated automatically. */
|
|
44
|
-
'aria-describedby'?: string;
|
|
45
42
|
/** Sets the checkbox wrapper component to render. Defaults to "div". If set to "label", behaves the same as if isLabelWrapped prop was specified. */
|
|
46
43
|
component?: React.ElementType;
|
|
47
44
|
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
@@ -55,7 +52,6 @@ const defaultOnChange = () => {};
|
|
|
55
52
|
|
|
56
53
|
interface CheckboxState {
|
|
57
54
|
ouiaStateId: string;
|
|
58
|
-
descriptionId: string;
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
@@ -74,8 +70,7 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
74
70
|
constructor(props: any) {
|
|
75
71
|
super(props);
|
|
76
72
|
this.state = {
|
|
77
|
-
ouiaStateId: getDefaultOUIAId(Checkbox.displayName)
|
|
78
|
-
descriptionId: getUniqueId('pf-checkbox-description')
|
|
73
|
+
ouiaStateId: getDefaultOUIAId(Checkbox.displayName)
|
|
79
74
|
};
|
|
80
75
|
}
|
|
81
76
|
|
|
@@ -86,7 +81,6 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
86
81
|
render() {
|
|
87
82
|
const {
|
|
88
83
|
'aria-label': ariaLabel,
|
|
89
|
-
'aria-describedby': ariaDescribedBy,
|
|
90
84
|
className,
|
|
91
85
|
inputClassName,
|
|
92
86
|
onChange,
|
|
@@ -121,14 +115,6 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
121
115
|
checkedProps.defaultChecked = defaultChecked;
|
|
122
116
|
}
|
|
123
117
|
|
|
124
|
-
// Handle aria-describedby logic
|
|
125
|
-
let ariaDescribedByValue: string | undefined;
|
|
126
|
-
if (ariaDescribedBy !== undefined) {
|
|
127
|
-
ariaDescribedByValue = ariaDescribedBy === '' ? undefined : ariaDescribedBy;
|
|
128
|
-
} else if (description) {
|
|
129
|
-
ariaDescribedByValue = this.state.descriptionId;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
118
|
const inputRendered = (
|
|
133
119
|
<input
|
|
134
120
|
{...props}
|
|
@@ -137,7 +123,6 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
137
123
|
onChange={this.handleChange}
|
|
138
124
|
aria-invalid={!isValid}
|
|
139
125
|
aria-label={ariaLabel}
|
|
140
|
-
aria-describedby={ariaDescribedByValue}
|
|
141
126
|
disabled={isDisabled}
|
|
142
127
|
required={isRequired}
|
|
143
128
|
ref={(elem) => {
|
|
@@ -184,11 +169,7 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
184
169
|
{labelRendered}
|
|
185
170
|
</>
|
|
186
171
|
)}
|
|
187
|
-
{description && (
|
|
188
|
-
<span id={this.state.descriptionId} className={css(styles.checkDescription)}>
|
|
189
|
-
{description}
|
|
190
|
-
</span>
|
|
191
|
-
)}
|
|
172
|
+
{description && <span className={css(styles.checkDescription)}>{description}</span>}
|
|
192
173
|
{body && <span className={css(styles.checkBody)}>{body}</span>}
|
|
193
174
|
</Component>
|
|
194
175
|
);
|
|
@@ -287,37 +287,3 @@ test('Matches snapshot', () => {
|
|
|
287
287
|
|
|
288
288
|
expect(asFragment()).toMatchSnapshot();
|
|
289
289
|
});
|
|
290
|
-
|
|
291
|
-
test('Sets aria-describedby when description is provided', () => {
|
|
292
|
-
render(<Checkbox id="test-id" description="test description" />);
|
|
293
|
-
|
|
294
|
-
const checkbox = screen.getByRole('checkbox');
|
|
295
|
-
const descriptionElement = screen.getByText('test description');
|
|
296
|
-
|
|
297
|
-
expect(checkbox).toHaveAttribute('aria-describedby', descriptionElement.id);
|
|
298
|
-
expect(descriptionElement).toHaveAttribute('id');
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
test('Sets custom aria-describedby when provided', () => {
|
|
302
|
-
render(<Checkbox id="test-id" description="test description" aria-describedby="custom-id" />);
|
|
303
|
-
|
|
304
|
-
const checkbox = screen.getByRole('checkbox');
|
|
305
|
-
|
|
306
|
-
expect(checkbox).toHaveAttribute('aria-describedby', 'custom-id');
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
test('Does not set aria-describedby when no description is provided', () => {
|
|
310
|
-
render(<Checkbox id="test-id" />);
|
|
311
|
-
|
|
312
|
-
const checkbox = screen.getByRole('checkbox');
|
|
313
|
-
|
|
314
|
-
expect(checkbox).not.toHaveAttribute('aria-describedby');
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
test('Does not set aria-describedby when description is provided but aria-describedby is empty string', () => {
|
|
318
|
-
render(<Checkbox id="test-id" description="test description" aria-describedby="" />);
|
|
319
|
-
|
|
320
|
-
const checkbox = screen.getByRole('checkbox');
|
|
321
|
-
|
|
322
|
-
expect(checkbox).not.toHaveAttribute('aria-describedby');
|
|
323
|
-
});
|
|
@@ -77,7 +77,6 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
77
77
|
widths,
|
|
78
78
|
colorVariant = DrawerColorVariant.default,
|
|
79
79
|
focusTrap,
|
|
80
|
-
style,
|
|
81
80
|
...props
|
|
82
81
|
}: DrawerPanelContentProps) => {
|
|
83
82
|
const panel = useRef<HTMLDivElement>(undefined);
|
|
@@ -382,10 +381,9 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
382
381
|
}
|
|
383
382
|
}}
|
|
384
383
|
hidden={hidden}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
}}
|
|
384
|
+
{...((defaultSize || minSize || maxSize) && {
|
|
385
|
+
style: boundaryCssVars as React.CSSProperties
|
|
386
|
+
})}
|
|
389
387
|
{...props}
|
|
390
388
|
ref={panel}
|
|
391
389
|
>
|
|
@@ -121,40 +121,3 @@ test('Renders with role="dialog" when focusTrap.enabled is true', () => {
|
|
|
121
121
|
|
|
122
122
|
expect(screen.getByRole('dialog')).toBeInTheDocument();
|
|
123
123
|
});
|
|
124
|
-
|
|
125
|
-
test('Applies style prop as expected', () => {
|
|
126
|
-
render(
|
|
127
|
-
<Drawer isExpanded>
|
|
128
|
-
<DrawerPanelContent style={{ backgroundColor: 'red', padding: '20px' }}>Drawer panel content</DrawerPanelContent>
|
|
129
|
-
</Drawer>
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
const panelContent = screen.getByText('Drawer panel content');
|
|
133
|
-
expect(panelContent).toHaveStyle({ backgroundColor: 'red', padding: '20px' });
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
test('Style prop overrides boundaryCssVars', () => {
|
|
137
|
-
render(
|
|
138
|
-
<Drawer isExpanded>
|
|
139
|
-
<DrawerPanelContent
|
|
140
|
-
defaultSize="200px"
|
|
141
|
-
minSize="100px"
|
|
142
|
-
maxSize="400px"
|
|
143
|
-
style={{
|
|
144
|
-
'--pf-v6-c-drawer__panel--md--FlexBasis': '300px',
|
|
145
|
-
'--pf-v6-c-drawer__panel--md--FlexBasis--min': '150px',
|
|
146
|
-
'--pf-v6-c-drawer__panel--md--FlexBasis--max': '500px'
|
|
147
|
-
}}
|
|
148
|
-
>
|
|
149
|
-
Drawer panel content
|
|
150
|
-
</DrawerPanelContent>
|
|
151
|
-
</Drawer>
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
const panelContent = screen.getByText('Drawer panel content');
|
|
155
|
-
expect(panelContent).toHaveStyle({
|
|
156
|
-
'--pf-v6-c-drawer__panel--md--FlexBasis': '300px',
|
|
157
|
-
'--pf-v6-c-drawer__panel--md--FlexBasis--min': '150px',
|
|
158
|
-
'--pf-v6-c-drawer__panel--md--FlexBasis--max': '500px'
|
|
159
|
-
});
|
|
160
|
-
});
|
|
@@ -56,10 +56,6 @@ export interface ExpandableSectionProps extends Omit<React.HTMLProps<HTMLDivElem
|
|
|
56
56
|
* both are specified; used for uncontrolled expandable with dynamic toggle text).
|
|
57
57
|
*/
|
|
58
58
|
toggleTextExpanded?: string;
|
|
59
|
-
/** Accessible name via human readable string for the expandable section toggle. */
|
|
60
|
-
toggleAriaLabel?: string;
|
|
61
|
-
/** Accessible name via space delimtted list of IDs for the expandable section toggle. */
|
|
62
|
-
toggleAriaLabelledBy?: string;
|
|
63
59
|
/** Truncates the expandable content to the specified number of lines when using the
|
|
64
60
|
* "truncate" variant.
|
|
65
61
|
*/
|
|
@@ -113,8 +109,6 @@ class ExpandableSection extends Component<ExpandableSectionProps, ExpandableSect
|
|
|
113
109
|
toggleText: '',
|
|
114
110
|
toggleTextExpanded: '',
|
|
115
111
|
toggleTextCollapsed: '',
|
|
116
|
-
toggleAriaLabel: undefined,
|
|
117
|
-
toggleAriaLabelledBy: undefined,
|
|
118
112
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
119
113
|
onToggle: (event, isExpanded): void => undefined,
|
|
120
114
|
isDetached: false,
|
|
@@ -202,8 +196,6 @@ class ExpandableSection extends Component<ExpandableSectionProps, ExpandableSect
|
|
|
202
196
|
toggleTextExpanded,
|
|
203
197
|
toggleTextCollapsed,
|
|
204
198
|
toggleContent,
|
|
205
|
-
toggleAriaLabel,
|
|
206
|
-
toggleAriaLabelledBy,
|
|
207
199
|
children,
|
|
208
200
|
isExpanded,
|
|
209
201
|
isDetached,
|
|
@@ -262,8 +254,6 @@ class ExpandableSection extends Component<ExpandableSectionProps, ExpandableSect
|
|
|
262
254
|
</span>
|
|
263
255
|
)
|
|
264
256
|
})}
|
|
265
|
-
aria-label={toggleAriaLabel}
|
|
266
|
-
aria-labelledby={toggleAriaLabelledBy}
|
|
267
257
|
>
|
|
268
258
|
{toggleContent || computedToggleText}
|
|
269
259
|
</Button>
|