@patternfly/react-core 6.4.1-prerelease.8 → 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 -44
- 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-CyRsIwqr.css → output-Bj1Aarly.css} +16495 -16495
- 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/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/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
|
@@ -32,10 +32,8 @@ export const ModalWithDropdown: React.FunctionComponent = () => {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
const onFocus = () => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
(element as HTMLElement)?.focus();
|
|
38
|
-
}
|
|
35
|
+
const element = document.getElementById('modal-dropdown-toggle');
|
|
36
|
+
(element as HTMLElement).focus();
|
|
39
37
|
};
|
|
40
38
|
|
|
41
39
|
const onEscapePress = (event: KeyboardEvent) => {
|
|
@@ -47,16 +45,6 @@ export const ModalWithDropdown: React.FunctionComponent = () => {
|
|
|
47
45
|
}
|
|
48
46
|
};
|
|
49
47
|
|
|
50
|
-
const getAppendLocation = () => {
|
|
51
|
-
// document doesn't exist when PatternFly website docs framework gets pre-rendered
|
|
52
|
-
// this is just to avoid that issue - works fine at runtime without it
|
|
53
|
-
if (typeof document !== 'undefined' && document.getElementById) {
|
|
54
|
-
return document.getElementById('modal-with-dropdown-focus-trap');
|
|
55
|
-
} else {
|
|
56
|
-
return 'inline';
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
48
|
return (
|
|
61
49
|
<Fragment>
|
|
62
50
|
<Button variant="primary" onClick={handleModalToggle}>
|
|
@@ -69,21 +57,14 @@ export const ModalWithDropdown: React.FunctionComponent = () => {
|
|
|
69
57
|
onEscapePress={onEscapePress}
|
|
70
58
|
aria-labelledby="modal-with-dropdown"
|
|
71
59
|
aria-describedby="modal-box-body-with-dropdown"
|
|
72
|
-
focusTrapId="modal-with-dropdown-focus-trap"
|
|
73
60
|
>
|
|
74
61
|
<ModalHeader title="Dropdown modal" labelId="modal-with-dropdown" />
|
|
75
62
|
<ModalBody id="modal-box-body-with-dropdown">
|
|
76
63
|
<div>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
can use "inline" to allow it to scroll within the modal itself. Appending to the focus trap should allow the
|
|
82
|
-
menu to expand visually outside the Modal (no scrollbar created in the Modal itself), and still allow
|
|
83
|
-
focusing the content within that menu via keyboard. You should also handle the modal's closing behavior by
|
|
84
|
-
listening to the
|
|
85
|
-
<em>onEscapePress</em> callback on the Modal component. This allows the "escape" key to collapse the
|
|
86
|
-
dropdown without closing the entire modal.
|
|
64
|
+
Set the dropdown <strong>menuAppendTo</strong> prop to <em>parent</em> in order to allow the dropdown menu
|
|
65
|
+
break out of the modal container. You'll also want to handle closing of the modal yourself, by listening to
|
|
66
|
+
the <strong>onEscapePress</strong> callback on the Modal component, so you can close the Dropdown first if
|
|
67
|
+
it's open without closing the entire modal.
|
|
87
68
|
</div>
|
|
88
69
|
<br />
|
|
89
70
|
<div>
|
|
@@ -92,18 +73,10 @@ export const ModalWithDropdown: React.FunctionComponent = () => {
|
|
|
92
73
|
onSelect={onSelect}
|
|
93
74
|
onOpenChange={(isOpen: boolean) => setIsDropdownOpen(isOpen)}
|
|
94
75
|
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
95
|
-
<MenuToggle
|
|
96
|
-
id="modal-dropdown-toggle"
|
|
97
|
-
ref={toggleRef}
|
|
98
|
-
onClick={handleDropdownToggle}
|
|
99
|
-
isExpanded={isDropdownOpen}
|
|
100
|
-
>
|
|
76
|
+
<MenuToggle ref={toggleRef} onClick={handleDropdownToggle} isExpanded={isDropdownOpen}>
|
|
101
77
|
Dropdown
|
|
102
78
|
</MenuToggle>
|
|
103
79
|
)}
|
|
104
|
-
popperProps={{
|
|
105
|
-
appendTo: getAppendLocation()
|
|
106
|
-
}}
|
|
107
80
|
>
|
|
108
81
|
<DropdownList>
|
|
109
82
|
<DropdownItem value={0} key="action">
|
|
@@ -9,50 +9,199 @@ propComponents: [Panel, PanelMain, PanelMainBody, PanelHeader, PanelFooter]
|
|
|
9
9
|
|
|
10
10
|
### Basic
|
|
11
11
|
|
|
12
|
-
```
|
|
12
|
+
```js
|
|
13
|
+
import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
|
|
14
|
+
|
|
15
|
+
const BasicPanel = () => (
|
|
16
|
+
<Panel>
|
|
17
|
+
<PanelMain>
|
|
18
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
19
|
+
</PanelMain>
|
|
20
|
+
</Panel>
|
|
21
|
+
);
|
|
13
22
|
```
|
|
14
23
|
|
|
15
24
|
### Header
|
|
16
25
|
|
|
17
|
-
```
|
|
26
|
+
```js
|
|
27
|
+
import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider } from '@patternfly/react-core';
|
|
28
|
+
|
|
29
|
+
const HeaderPanel = () => (
|
|
30
|
+
<Panel>
|
|
31
|
+
<PanelHeader>Header content</PanelHeader>
|
|
32
|
+
<Divider />
|
|
33
|
+
<PanelMain>
|
|
34
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
35
|
+
</PanelMain>
|
|
36
|
+
</Panel>
|
|
37
|
+
);
|
|
18
38
|
```
|
|
19
39
|
|
|
20
40
|
### Footer
|
|
21
41
|
|
|
22
|
-
```
|
|
42
|
+
```js
|
|
43
|
+
import { Panel, PanelMain, PanelMainBody, PanelFooter } from '@patternfly/react-core';
|
|
44
|
+
|
|
45
|
+
const FooterPanel = () => (
|
|
46
|
+
<Panel>
|
|
47
|
+
<PanelMain>
|
|
48
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
49
|
+
</PanelMain>
|
|
50
|
+
<PanelFooter>Footer content</PanelFooter>
|
|
51
|
+
</Panel>
|
|
52
|
+
);
|
|
23
53
|
```
|
|
24
54
|
|
|
25
55
|
### Header and footer
|
|
26
56
|
|
|
27
|
-
```
|
|
57
|
+
```js
|
|
58
|
+
import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider, PanelFooter } from '@patternfly/react-core';
|
|
59
|
+
|
|
60
|
+
const HeaderFooterPanel = () => (
|
|
61
|
+
<Panel>
|
|
62
|
+
<PanelHeader>Header content</PanelHeader>
|
|
63
|
+
<Divider />
|
|
64
|
+
<PanelMain>
|
|
65
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
66
|
+
</PanelMain>
|
|
67
|
+
<PanelFooter>Footer content</PanelFooter>
|
|
68
|
+
</Panel>
|
|
69
|
+
);
|
|
28
70
|
```
|
|
29
71
|
|
|
30
72
|
### No body
|
|
31
73
|
|
|
32
|
-
```
|
|
74
|
+
```js
|
|
75
|
+
import { Panel, PanelMain } from '@patternfly/react-core';
|
|
76
|
+
|
|
77
|
+
const NoBodyPanel = () => (
|
|
78
|
+
<Panel>
|
|
79
|
+
<PanelMain>Main content</PanelMain>
|
|
80
|
+
</Panel>
|
|
81
|
+
);
|
|
33
82
|
```
|
|
34
83
|
|
|
35
84
|
### Raised
|
|
36
85
|
|
|
37
|
-
```
|
|
86
|
+
```js
|
|
87
|
+
import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
|
|
88
|
+
|
|
89
|
+
const RaisedPanel = () => (
|
|
90
|
+
<Panel variant="raised">
|
|
91
|
+
<PanelMain>
|
|
92
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
93
|
+
</PanelMain>
|
|
94
|
+
</Panel>
|
|
95
|
+
);
|
|
38
96
|
```
|
|
39
97
|
|
|
40
98
|
### Bordered
|
|
41
99
|
|
|
42
|
-
```
|
|
100
|
+
```js
|
|
101
|
+
import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
|
|
102
|
+
|
|
103
|
+
const BorderedPanel = () => (
|
|
104
|
+
<Panel variant="bordered">
|
|
105
|
+
<PanelMain>
|
|
106
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
107
|
+
</PanelMain>
|
|
108
|
+
</Panel>
|
|
109
|
+
);
|
|
43
110
|
```
|
|
44
111
|
|
|
45
112
|
### Secondary variant
|
|
46
113
|
|
|
47
|
-
```
|
|
114
|
+
```js
|
|
115
|
+
import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
|
|
116
|
+
|
|
117
|
+
const PanelSecondaryVariant = () => (
|
|
118
|
+
<Panel variant="secondary">
|
|
119
|
+
<PanelMain>
|
|
120
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
121
|
+
</PanelMain>
|
|
122
|
+
</Panel>
|
|
123
|
+
);
|
|
48
124
|
```
|
|
49
125
|
|
|
50
126
|
### Scrollable
|
|
51
127
|
|
|
52
|
-
```
|
|
128
|
+
```js
|
|
129
|
+
import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
|
|
130
|
+
|
|
131
|
+
const ScrollablePanel = () => (
|
|
132
|
+
<Panel isScrollable>
|
|
133
|
+
<PanelMain tabIndex={0}>
|
|
134
|
+
<PanelMainBody>
|
|
135
|
+
Main content
|
|
136
|
+
<br />
|
|
137
|
+
<br />
|
|
138
|
+
Main content
|
|
139
|
+
<br />
|
|
140
|
+
<br />
|
|
141
|
+
Main content
|
|
142
|
+
<br />
|
|
143
|
+
<br />
|
|
144
|
+
Main content
|
|
145
|
+
<br />
|
|
146
|
+
<br />
|
|
147
|
+
Main content
|
|
148
|
+
<br />
|
|
149
|
+
<br />
|
|
150
|
+
Main content
|
|
151
|
+
<br />
|
|
152
|
+
<br />
|
|
153
|
+
Main content
|
|
154
|
+
<br />
|
|
155
|
+
<br />
|
|
156
|
+
Main content
|
|
157
|
+
<br />
|
|
158
|
+
<br />
|
|
159
|
+
Main content
|
|
160
|
+
</PanelMainBody>
|
|
161
|
+
</PanelMain>
|
|
162
|
+
</Panel>
|
|
163
|
+
);
|
|
53
164
|
```
|
|
54
165
|
|
|
55
166
|
### Scrollable with header and footer
|
|
56
167
|
|
|
57
|
-
```
|
|
168
|
+
```js
|
|
169
|
+
import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider, PanelFooter } from '@patternfly/react-core';
|
|
170
|
+
|
|
171
|
+
const ScrollableHeaderFooterPanel = () => (
|
|
172
|
+
<Panel isScrollable>
|
|
173
|
+
<PanelHeader>Header content</PanelHeader>
|
|
174
|
+
<Divider />
|
|
175
|
+
<PanelMain tabIndex={0}>
|
|
176
|
+
<PanelMainBody>
|
|
177
|
+
Main content
|
|
178
|
+
<br />
|
|
179
|
+
<br />
|
|
180
|
+
Main content
|
|
181
|
+
<br />
|
|
182
|
+
<br />
|
|
183
|
+
Main content
|
|
184
|
+
<br />
|
|
185
|
+
<br />
|
|
186
|
+
Main content
|
|
187
|
+
<br />
|
|
188
|
+
<br />
|
|
189
|
+
Main content
|
|
190
|
+
<br />
|
|
191
|
+
<br />
|
|
192
|
+
Main content
|
|
193
|
+
<br />
|
|
194
|
+
<br />
|
|
195
|
+
Main content
|
|
196
|
+
<br />
|
|
197
|
+
<br />
|
|
198
|
+
Main content
|
|
199
|
+
<br />
|
|
200
|
+
<br />
|
|
201
|
+
Main content
|
|
202
|
+
</PanelMainBody>
|
|
203
|
+
</PanelMain>
|
|
204
|
+
<PanelFooter>Footer content</PanelFooter>
|
|
205
|
+
</Panel>
|
|
206
|
+
);
|
|
58
207
|
```
|
|
@@ -3,7 +3,7 @@ import progressStyle from '@patternfly/react-styles/css/components/Progress/prog
|
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { Tooltip, TooltipPosition } from '../Tooltip';
|
|
5
5
|
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
|
|
6
|
-
import
|
|
6
|
+
import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
|
|
7
7
|
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
|
|
8
8
|
import { AriaProps, ProgressBar } from './ProgressBar';
|
|
9
9
|
import { ProgressHelperText } from './ProgressHelperText';
|
|
@@ -61,7 +61,7 @@ export interface ProgressContainerProps extends Omit<React.HTMLProps<HTMLDivElem
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
const variantToIcon = {
|
|
64
|
-
danger:
|
|
64
|
+
danger: TimesCircleIcon,
|
|
65
65
|
success: CheckCircleIcon,
|
|
66
66
|
warning: ExclamationTriangleIcon
|
|
67
67
|
};
|
package/src/components/Progress/__tests__/Generated/__snapshots__/ProgressContainer.test.tsx.snap
CHANGED
|
@@ -31,7 +31,7 @@ exports[`ProgressContainer should match snapshot (auto-generated) 1`] = `
|
|
|
31
31
|
width="1em"
|
|
32
32
|
>
|
|
33
33
|
<path
|
|
34
|
-
d="
|
|
34
|
+
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"
|
|
35
35
|
/>
|
|
36
36
|
</svg>
|
|
37
37
|
</span>
|
|
@@ -298,7 +298,7 @@ exports[`Progress variant danger 1`] = `
|
|
|
298
298
|
width="1em"
|
|
299
299
|
>
|
|
300
300
|
<path
|
|
301
|
-
d="
|
|
301
|
+
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"
|
|
302
302
|
/>
|
|
303
303
|
</svg>
|
|
304
304
|
</span>
|
|
@@ -3,7 +3,6 @@ import styles from '@patternfly/react-styles/css/components/Radio/radio';
|
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { PickOptional } from '../../helpers/typeUtils';
|
|
5
5
|
import { getOUIAProps, OUIAProps, getDefaultOUIAId } from '../../helpers';
|
|
6
|
-
import { getUniqueId } from '../../helpers/util';
|
|
7
6
|
|
|
8
7
|
export interface RadioProps
|
|
9
8
|
extends Omit<React.HTMLProps<HTMLInputElement>, 'disabled' | 'label' | 'onChange' | 'type'>,
|
|
@@ -40,8 +39,6 @@ export interface RadioProps
|
|
|
40
39
|
description?: React.ReactNode;
|
|
41
40
|
/** Body of the radio. */
|
|
42
41
|
body?: React.ReactNode;
|
|
43
|
-
/** Custom aria-describedby value for the radio input. If not provided and description is set, a unique ID will be generated automatically. */
|
|
44
|
-
'aria-describedby'?: string;
|
|
45
42
|
/** Sets the radio 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.*/
|
|
@@ -50,7 +47,7 @@ export interface RadioProps
|
|
|
50
47
|
ouiaSafe?: boolean;
|
|
51
48
|
}
|
|
52
49
|
|
|
53
|
-
class Radio extends Component<RadioProps, { ouiaStateId: string
|
|
50
|
+
class Radio extends Component<RadioProps, { ouiaStateId: string }> {
|
|
54
51
|
static displayName = 'Radio';
|
|
55
52
|
static defaultProps: PickOptional<RadioProps> = {
|
|
56
53
|
className: '',
|
|
@@ -66,8 +63,7 @@ class Radio extends Component<RadioProps, { ouiaStateId: string; descriptionId:
|
|
|
66
63
|
console.error('Radio:', 'Radio requires an aria-label to be specified');
|
|
67
64
|
}
|
|
68
65
|
this.state = {
|
|
69
|
-
ouiaStateId: getDefaultOUIAId(Radio.displayName)
|
|
70
|
-
descriptionId: getUniqueId('pf-radio-description')
|
|
66
|
+
ouiaStateId: getDefaultOUIAId(Radio.displayName)
|
|
71
67
|
};
|
|
72
68
|
}
|
|
73
69
|
|
|
@@ -78,7 +74,6 @@ class Radio extends Component<RadioProps, { ouiaStateId: string; descriptionId:
|
|
|
78
74
|
render() {
|
|
79
75
|
const {
|
|
80
76
|
'aria-label': ariaLabel,
|
|
81
|
-
'aria-describedby': ariaDescribedBy,
|
|
82
77
|
checked,
|
|
83
78
|
className,
|
|
84
79
|
inputClassName,
|
|
@@ -103,14 +98,6 @@ class Radio extends Component<RadioProps, { ouiaStateId: string; descriptionId:
|
|
|
103
98
|
console.error('Radio:', 'id is required to make input accessible');
|
|
104
99
|
}
|
|
105
100
|
|
|
106
|
-
// Handle aria-describedby logic
|
|
107
|
-
let ariaDescribedByValue: string | undefined;
|
|
108
|
-
if (ariaDescribedBy !== undefined) {
|
|
109
|
-
ariaDescribedByValue = ariaDescribedBy === '' ? undefined : ariaDescribedBy;
|
|
110
|
-
} else if (description) {
|
|
111
|
-
ariaDescribedByValue = this.state.descriptionId;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
101
|
const inputRendered = (
|
|
115
102
|
<input
|
|
116
103
|
{...props}
|
|
@@ -118,7 +105,6 @@ class Radio extends Component<RadioProps, { ouiaStateId: string; descriptionId:
|
|
|
118
105
|
type="radio"
|
|
119
106
|
onChange={this.handleChange}
|
|
120
107
|
aria-invalid={!isValid}
|
|
121
|
-
aria-describedby={ariaDescribedByValue}
|
|
122
108
|
disabled={isDisabled}
|
|
123
109
|
checked={checked || isChecked}
|
|
124
110
|
{...(checked === undefined && { defaultChecked })}
|
|
@@ -157,11 +143,7 @@ class Radio extends Component<RadioProps, { ouiaStateId: string; descriptionId:
|
|
|
157
143
|
{labelRendered}
|
|
158
144
|
</>
|
|
159
145
|
)}
|
|
160
|
-
{description && (
|
|
161
|
-
<span id={this.state.descriptionId} className={css(styles.radioDescription)}>
|
|
162
|
-
{description}
|
|
163
|
-
</span>
|
|
164
|
-
)}
|
|
146
|
+
{description && <span className={css(styles.radioDescription)}>{description}</span>}
|
|
165
147
|
{body && <span className={css(styles.radioBody)}>{body}</span>}
|
|
166
148
|
</Component>
|
|
167
149
|
);
|
|
@@ -139,48 +139,4 @@ describe('Radio', () => {
|
|
|
139
139
|
expect(wrapper.children[0].tagName).toBe('LABEL');
|
|
140
140
|
expect(wrapper.children[1].tagName).toBe('INPUT');
|
|
141
141
|
});
|
|
142
|
-
|
|
143
|
-
test('Sets aria-describedby when description is provided', () => {
|
|
144
|
-
render(<Radio id="test-id" name="check" aria-label="test radio" description="test description" />);
|
|
145
|
-
|
|
146
|
-
const radio = screen.getByRole('radio');
|
|
147
|
-
const descriptionElement = screen.getByText('test description');
|
|
148
|
-
|
|
149
|
-
expect(radio).toHaveAttribute('aria-describedby', descriptionElement.id);
|
|
150
|
-
expect(descriptionElement).toHaveAttribute('id');
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
test('Sets custom aria-describedby when provided', () => {
|
|
154
|
-
render(
|
|
155
|
-
<Radio
|
|
156
|
-
id="test-id"
|
|
157
|
-
name="check"
|
|
158
|
-
aria-label="test radio"
|
|
159
|
-
description="test description"
|
|
160
|
-
aria-describedby="custom-id"
|
|
161
|
-
/>
|
|
162
|
-
);
|
|
163
|
-
|
|
164
|
-
const radio = screen.getByRole('radio');
|
|
165
|
-
|
|
166
|
-
expect(radio).toHaveAttribute('aria-describedby', 'custom-id');
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
test('Does not set aria-describedby when no description is provided', () => {
|
|
170
|
-
render(<Radio id="test-id" name="check" aria-label="test radio" />);
|
|
171
|
-
|
|
172
|
-
const radio = screen.getByRole('radio');
|
|
173
|
-
|
|
174
|
-
expect(radio).not.toHaveAttribute('aria-describedby');
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
test('Does not set aria-describedby when description is provided but aria-describedby is empty string', () => {
|
|
178
|
-
render(
|
|
179
|
-
<Radio id="test-id" name="check" aria-label="test radio" description="test description" aria-describedby="" />
|
|
180
|
-
);
|
|
181
|
-
|
|
182
|
-
const radio = screen.getByRole('radio');
|
|
183
|
-
|
|
184
|
-
expect(radio).not.toHaveAttribute('aria-describedby');
|
|
185
|
-
});
|
|
186
142
|
});
|
|
@@ -1,83 +1,15 @@
|
|
|
1
1
|
import { render, screen, act } from '@testing-library/react';
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import { Tabs
|
|
3
|
+
import { Tabs } from '../Tabs';
|
|
4
4
|
import styles from '@patternfly/react-styles/css/components/Tabs/tabs';
|
|
5
5
|
import { Tab } from '../Tab';
|
|
6
6
|
import { TabTitleText } from '../TabTitleText';
|
|
7
7
|
import { TabTitleIcon } from '../TabTitleIcon';
|
|
8
8
|
import { TabContent } from '../TabContent';
|
|
9
9
|
import { TabContentBody } from '../TabContentBody';
|
|
10
|
-
import { createRef } from 'react';
|
|
11
10
|
|
|
12
11
|
jest.mock('../../../helpers/GenerateId/GenerateId');
|
|
13
12
|
|
|
14
|
-
const renderSeparateTabs = (props?: Pick<TabsProps, 'activeKey' | 'defaultActiveKey'>) => {
|
|
15
|
-
const contentRef1 = createRef<HTMLElement>();
|
|
16
|
-
const contentRef2 = createRef<HTMLElement>();
|
|
17
|
-
const contentRef3 = createRef<HTMLElement>();
|
|
18
|
-
|
|
19
|
-
let calculatedActiveKey;
|
|
20
|
-
if (props?.defaultActiveKey) {
|
|
21
|
-
calculatedActiveKey = props?.defaultActiveKey;
|
|
22
|
-
} else {
|
|
23
|
-
calculatedActiveKey = props?.activeKey;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<>
|
|
28
|
-
<Tabs id="separateTabs" {...props}>
|
|
29
|
-
<Tab
|
|
30
|
-
eventKey={0}
|
|
31
|
-
title={<TabTitleText>Tab item 1</TabTitleText>}
|
|
32
|
-
tabContentId="refTab1Section"
|
|
33
|
-
tabContentRef={contentRef1}
|
|
34
|
-
/>
|
|
35
|
-
<Tab
|
|
36
|
-
eventKey={1}
|
|
37
|
-
title={<TabTitleText>Tab item 2</TabTitleText>}
|
|
38
|
-
tabContentId="refTab2Section"
|
|
39
|
-
tabContentRef={contentRef2}
|
|
40
|
-
/>
|
|
41
|
-
<Tab
|
|
42
|
-
eventKey={2}
|
|
43
|
-
title={<TabTitleText>Tab item 3</TabTitleText>}
|
|
44
|
-
tabContentId="refTab3Section"
|
|
45
|
-
tabContentRef={contentRef3}
|
|
46
|
-
/>
|
|
47
|
-
</Tabs>
|
|
48
|
-
<div>
|
|
49
|
-
<TabContent
|
|
50
|
-
eventKey={0}
|
|
51
|
-
id="refTab1Section"
|
|
52
|
-
ref={contentRef1}
|
|
53
|
-
aria-label="Tab item 1"
|
|
54
|
-
hidden={calculatedActiveKey !== 0}
|
|
55
|
-
>
|
|
56
|
-
Tab 1 section
|
|
57
|
-
</TabContent>
|
|
58
|
-
<TabContent
|
|
59
|
-
eventKey={1}
|
|
60
|
-
id="refTab2Section"
|
|
61
|
-
ref={contentRef2}
|
|
62
|
-
aria-label="Tab item 2"
|
|
63
|
-
hidden={calculatedActiveKey !== 1}
|
|
64
|
-
>
|
|
65
|
-
<TabContentBody>Tab 2 section</TabContentBody>
|
|
66
|
-
</TabContent>
|
|
67
|
-
<TabContent
|
|
68
|
-
eventKey={2}
|
|
69
|
-
id="refTab3Section"
|
|
70
|
-
ref={contentRef3}
|
|
71
|
-
aria-label="Tab item 3"
|
|
72
|
-
hidden={calculatedActiveKey !== 2}
|
|
73
|
-
>
|
|
74
|
-
<TabContentBody hasPadding>Tab 3 section with padding </TabContentBody>
|
|
75
|
-
</TabContent>
|
|
76
|
-
</div>
|
|
77
|
-
</>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
13
|
test(`Renders with classes ${styles.tabs} and ${styles.modifiers.animateCurrent} by default`, () => {
|
|
82
14
|
render(
|
|
83
15
|
<Tabs role="region">
|
|
@@ -497,46 +429,6 @@ test('should render tabs with separate content', () => {
|
|
|
497
429
|
expect(asFragment()).toMatchSnapshot();
|
|
498
430
|
});
|
|
499
431
|
|
|
500
|
-
test('should render correct tab content for uncontrolled tabs with separate content', () => {
|
|
501
|
-
render(renderSeparateTabs({ defaultActiveKey: 1 }));
|
|
502
|
-
|
|
503
|
-
expect(screen.getByText(/Tab 1 section/i)).not.toBeVisible();
|
|
504
|
-
expect(screen.getByText(/Tab 2 section/i)).toBeVisible();
|
|
505
|
-
expect(screen.getByText(/Tab 3 section with padding/i)).not.toBeVisible();
|
|
506
|
-
});
|
|
507
|
-
|
|
508
|
-
test('should correctly advance tab content for uncontrolled tabs with separate content', async () => {
|
|
509
|
-
render(renderSeparateTabs({ defaultActiveKey: 1 }));
|
|
510
|
-
|
|
511
|
-
userEvent.setup();
|
|
512
|
-
expect(screen.getByText(/Tab 1 section/i)).not.toBeVisible();
|
|
513
|
-
expect(screen.getByText(/Tab 2 section/i)).toBeVisible();
|
|
514
|
-
expect(screen.getByText(/Tab 3 section with padding/i)).not.toBeVisible();
|
|
515
|
-
await userEvent.click(screen.getByRole('tab', { name: /Tab item 1/i }));
|
|
516
|
-
expect(screen.getByText(/Tab 1 section/i)).toBeVisible();
|
|
517
|
-
expect(screen.getByText(/Tab 2 section/i)).not.toBeVisible();
|
|
518
|
-
});
|
|
519
|
-
|
|
520
|
-
test('should render correct tab content for controlled tabs with separate content', () => {
|
|
521
|
-
render(renderSeparateTabs({ activeKey: 1 }));
|
|
522
|
-
|
|
523
|
-
expect(screen.getByText(/Tab 1 section/i)).not.toBeVisible();
|
|
524
|
-
expect(screen.getByText(/Tab 2 section/i)).toBeVisible();
|
|
525
|
-
expect(screen.getByText(/Tab 3 section with padding/i)).not.toBeVisible();
|
|
526
|
-
});
|
|
527
|
-
|
|
528
|
-
test('should correctly advance tab content for controlled tabs with separate content', async () => {
|
|
529
|
-
render(renderSeparateTabs({ activeKey: 1 }));
|
|
530
|
-
|
|
531
|
-
userEvent.setup();
|
|
532
|
-
expect(screen.getByText(/Tab 1 section/i)).not.toBeVisible();
|
|
533
|
-
expect(screen.getByText(/Tab 2 section/i)).toBeVisible();
|
|
534
|
-
expect(screen.getByText(/Tab 3 section with padding/i)).not.toBeVisible();
|
|
535
|
-
await userEvent.click(screen.getByRole('tab', { name: /Tab item 1/i }));
|
|
536
|
-
expect(screen.getByText(/Tab 1 section/i)).toBeVisible();
|
|
537
|
-
expect(screen.getByText(/Tab 2 section/i)).not.toBeVisible();
|
|
538
|
-
});
|
|
539
|
-
|
|
540
432
|
test('should render box tabs of secondary variant', () => {
|
|
541
433
|
const { asFragment } = render(
|
|
542
434
|
<Tabs id="boxSecondaryVariantTabs" isBox variant="secondary">
|
|
@@ -281,7 +281,7 @@ exports[`should render box tabs of secondary variant 1`] = `
|
|
|
281
281
|
<DocumentFragment>
|
|
282
282
|
<div
|
|
283
283
|
class="pf-v6-c-tabs pf-m-animate-current pf-m-box pf-m-secondary pf-m-initializing-accent"
|
|
284
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
284
|
+
data-ouia-component-id="OUIA-Generated-Tabs-20"
|
|
285
285
|
data-ouia-component-type="PF6/Tabs"
|
|
286
286
|
data-ouia-safe="true"
|
|
287
287
|
id="boxSecondaryVariantTabs"
|
|
@@ -1228,7 +1228,7 @@ exports[`should render tabs with no bottom border 1`] = `
|
|
|
1228
1228
|
<DocumentFragment>
|
|
1229
1229
|
<div
|
|
1230
1230
|
class="pf-v6-c-tabs pf-m-animate-current pf-m-no-border-bottom pf-m-initializing-accent"
|
|
1231
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
1231
|
+
data-ouia-component-id="OUIA-Generated-Tabs-21"
|
|
1232
1232
|
data-ouia-component-type="PF6/Tabs"
|
|
1233
1233
|
data-ouia-safe="true"
|
|
1234
1234
|
id="noBottomBorderTabs"
|