@patternfly/react-core 6.2.2 → 6.3.0-prerelease.10
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 +73 -9
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Content/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/esm/components/Divider/Divider.d.ts +2 -0
- package/dist/esm/components/Divider/Divider.d.ts.map +1 -1
- package/dist/esm/components/Divider/Divider.js +2 -2
- package/dist/esm/components/Divider/Divider.js.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/esm/components/Form/FormFieldGroup.d.ts +1 -1
- package/dist/esm/components/Form/FormFieldGroup.d.ts.map +1 -1
- package/dist/esm/components/Form/FormFieldGroupExpandable.d.ts +1 -1
- package/dist/esm/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
- package/dist/esm/components/Form/FormGroupLabelHelp.js +2 -2
- package/dist/esm/components/Form/FormGroupLabelHelp.js.map +1 -1
- package/dist/esm/components/Form/InternalFormFieldGroup.d.ts +1 -1
- package/dist/esm/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
- package/dist/esm/components/List/List.d.ts.map +1 -1
- package/dist/esm/components/List/List.js +2 -2
- package/dist/esm/components/List/List.js.map +1 -1
- package/dist/esm/components/List/ListItem.d.ts +4 -2
- package/dist/esm/components/List/ListItem.d.ts.map +1 -1
- package/dist/esm/components/List/ListItem.js +2 -2
- package/dist/esm/components/List/ListItem.js.map +1 -1
- package/dist/esm/components/Nav/Nav.d.ts +1 -1
- package/dist/esm/components/Nav/Nav.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavExpandable.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavExpandable.js +1 -1
- package/dist/esm/components/Nav/NavExpandable.js.map +1 -1
- package/dist/esm/components/Nav/NavItemSeparator.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavItemSeparator.js +2 -2
- package/dist/esm/components/Nav/NavItemSeparator.js.map +1 -1
- package/dist/esm/components/Progress/ProgressContainer.d.ts.map +1 -1
- package/dist/esm/components/Progress/ProgressContainer.js +12 -6
- package/dist/esm/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.js +4 -3
- package/dist/esm/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/esm/components/TreeView/TreeViewListItem.d.ts +2 -2
- package/dist/esm/components/TreeView/TreeViewListItem.d.ts.map +1 -1
- package/dist/esm/components/Truncate/Truncate.d.ts +11 -1
- package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/esm/components/Truncate/Truncate.js +49 -10
- package/dist/esm/components/Truncate/Truncate.js.map +1 -1
- package/dist/esm/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/js/components/Divider/Divider.d.ts +2 -0
- package/dist/js/components/Divider/Divider.d.ts.map +1 -1
- package/dist/js/components/Divider/Divider.js +2 -2
- package/dist/js/components/Divider/Divider.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/js/components/Form/FormFieldGroup.d.ts +1 -1
- package/dist/js/components/Form/FormFieldGroup.d.ts.map +1 -1
- package/dist/js/components/Form/FormFieldGroupExpandable.d.ts +1 -1
- package/dist/js/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
- package/dist/js/components/Form/FormGroupLabelHelp.js +2 -2
- package/dist/js/components/Form/FormGroupLabelHelp.js.map +1 -1
- package/dist/js/components/Form/InternalFormFieldGroup.d.ts +1 -1
- package/dist/js/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
- package/dist/js/components/List/List.d.ts.map +1 -1
- package/dist/js/components/List/List.js +2 -2
- package/dist/js/components/List/List.js.map +1 -1
- package/dist/js/components/List/ListItem.d.ts +4 -2
- package/dist/js/components/List/ListItem.d.ts.map +1 -1
- package/dist/js/components/List/ListItem.js +2 -2
- package/dist/js/components/List/ListItem.js.map +1 -1
- package/dist/js/components/Nav/Nav.d.ts +1 -1
- package/dist/js/components/Nav/Nav.d.ts.map +1 -1
- package/dist/js/components/Nav/NavExpandable.d.ts.map +1 -1
- package/dist/js/components/Nav/NavExpandable.js +1 -1
- package/dist/js/components/Nav/NavExpandable.js.map +1 -1
- package/dist/js/components/Nav/NavItemSeparator.d.ts.map +1 -1
- package/dist/js/components/Nav/NavItemSeparator.js +2 -2
- package/dist/js/components/Nav/NavItemSeparator.js.map +1 -1
- package/dist/js/components/Progress/ProgressContainer.d.ts.map +1 -1
- package/dist/js/components/Progress/ProgressContainer.js +10 -4
- package/dist/js/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.js +4 -3
- package/dist/js/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/js/components/TreeView/TreeViewListItem.d.ts +2 -2
- package/dist/js/components/TreeView/TreeViewListItem.d.ts.map +1 -1
- package/dist/js/components/Truncate/Truncate.d.ts +11 -1
- package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/js/components/Truncate/Truncate.js +48 -9
- package/dist/js/components/Truncate/Truncate.js.map +1 -1
- package/dist/js/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/umd/assets/{output-AyA9e2xy.css → output-CuGIDyMV.css} +19664 -19577
- package/dist/umd/react-core.min.js +3 -3
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +8 -8
- package/src/components/Alert/examples/Alert.md +0 -3
- package/src/components/Card/examples/Card.md +4 -0
- package/src/components/Card/examples/CardHeaderWraps.tsx +26 -0
- package/src/components/CodeBlock/examples/CodeBlockBasic.tsx +1 -1
- package/src/components/CodeBlock/examples/CodeBlockExpandable.tsx +10 -3
- package/src/components/DescriptionList/examples/DescriptionListAutoFitBasic.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthModified.tsx +5 -1
- package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthResponsive.tsx +5 -1
- package/src/components/DescriptionList/examples/DescriptionListBasic.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListColumnFill.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListCompact.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListCompactHorizontal.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultAutoColumn.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultInlineGrid.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultResponsiveColumns.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultThreeColLg.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultTwoCol.tsx +1 -0
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx +7 -1
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx +5 -1
- package/src/components/DescriptionList/examples/DescriptionListFluidHorizontal.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontal.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontalAutoColumn.tsx +6 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontalCustomTermWidth.tsx +1 -0
- package/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontalThreeColLg.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontalTwoCol.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListIconsOnTerms.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListResponsiveHoriVertGroup.tsx +1 -0
- package/src/components/DescriptionList/examples/DescriptionListWithCard.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx +5 -1
- package/src/components/DescriptionList/examples/DescriptionListWithTermHelpText.tsx +1 -1
- package/src/components/Divider/Divider.tsx +4 -1
- package/src/components/Divider/__tests__/Divider.test.tsx +10 -0
- package/src/components/DualListSelector/examples/DualListSelectorBasicSearch.tsx +1 -0
- package/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx +1 -0
- package/src/components/DualListSelector/examples/DualListSelectorTree.tsx +1 -0
- package/src/components/ExpandableSection/ExpandableSection.tsx +1 -1
- package/src/components/ExpandableSection/ExpandableSectionToggle.tsx +1 -1
- package/src/components/Form/FormFieldGroup.tsx +1 -1
- package/src/components/Form/FormFieldGroupExpandable.tsx +1 -1
- package/src/components/Form/FormGroupLabelHelp.tsx +2 -2
- package/src/components/Form/InternalFormFieldGroup.tsx +1 -1
- package/src/components/List/List.tsx +3 -0
- package/src/components/List/ListItem.tsx +7 -4
- package/src/components/List/__tests__/List.test.tsx +97 -101
- package/src/components/List/__tests__/ListItem.test.tsx +51 -0
- package/src/components/List/__tests__/__snapshots__/List.test.tsx.snap +4 -261
- package/src/components/List/__tests__/__snapshots__/ListItem.test.tsx.snap +34 -0
- package/src/components/LoginPage/examples/LoginPageBasic.tsx +1 -1
- package/src/components/LoginPage/examples/LoginPageLanguageSelect.tsx +1 -1
- package/src/components/LoginPage/examples/LoginPageShowHidePassword.tsx +1 -1
- package/src/components/Nav/Nav.tsx +1 -1
- package/src/components/Nav/NavExpandable.tsx +6 -1
- package/src/components/Nav/NavItemSeparator.tsx +2 -1
- package/src/components/Nav/__tests__/Generated/__snapshots__/NavExpandable.test.tsx.snap +1 -0
- package/src/components/Nav/__tests__/NavExpandable.test.tsx +15 -0
- package/src/components/Nav/__tests__/__snapshots__/Nav.test.tsx.snap +3 -0
- package/src/components/Page/examples/Page.md +1 -1
- package/src/components/Page/examples/PageCenteredSection.tsx +3 -4
- package/src/components/Page/examples/PageGroupSection.tsx +9 -3
- package/src/components/Page/examples/PageHorizontalNav.tsx +9 -3
- package/src/components/Page/examples/PageMainSectionPadding.tsx +12 -4
- package/src/components/Page/examples/PageMainSectionVariations.tsx +6 -6
- package/src/components/Page/examples/PageMultipleSidebarBody.tsx +9 -3
- package/src/components/Page/examples/PageUncontrolledNav.tsx +9 -3
- package/src/components/Page/examples/PageVerticalNav.tsx +9 -3
- package/src/components/Page/examples/PageWithOrWithoutFill.tsx +8 -4
- package/src/components/Progress/ProgressContainer.tsx +23 -16
- package/src/components/Progress/examples/ProgressTitleOutsideOfProgressBar.tsx +1 -1
- package/src/components/SearchInput/examples/SearchInputAdvanced.tsx +1 -0
- package/src/components/SearchInput/examples/SearchInputBasic.tsx +1 -0
- package/src/components/SearchInput/examples/SearchInputFocusSearch.tsx +7 -1
- package/src/components/SearchInput/examples/SearchInputWithExpandable.tsx +1 -0
- package/src/components/SearchInput/examples/SearchInputWithNavigableOptions.tsx +1 -0
- package/src/components/SearchInput/examples/SearchInputWithResultCount.tsx +1 -0
- package/src/components/SearchInput/examples/SearchInputWithSubmitButton.tsx +1 -0
- package/src/components/Select/examples/Select.md +3 -26
- package/src/components/Skeleton/examples/SkeletonText.tsx +0 -1
- package/src/components/Tabs/Tabs.tsx +3 -1
- package/src/components/Toolbar/ToolbarGroup.tsx +1 -1
- package/src/components/Toolbar/ToolbarItem.tsx +11 -1
- package/src/components/TreeView/TreeViewListItem.tsx +2 -2
- package/src/components/TreeView/__tests__/TreeView.test.tsx +26 -1
- package/src/components/TreeView/__tests__/TreeViewList.test.tsx +46 -0
- package/src/components/TreeView/__tests__/TreeViewListItem.test.tsx +278 -156
- package/src/components/TreeView/__tests__/TreeViewSearch.test.tsx +12 -1
- package/src/components/TreeView/__tests__/__snapshots__/TreeView.test.tsx.snap +9 -0
- package/src/components/Truncate/Truncate.tsx +123 -32
- package/src/components/Truncate/__tests__/Truncate.test.tsx +75 -5
- package/src/components/Truncate/__tests__/__snapshots__/Truncate.test.tsx.snap +55 -15
- package/src/components/Truncate/examples/Truncate.md +32 -36
- package/src/components/Truncate/examples/TruncateCustomTooltipPosition.tsx +10 -0
- package/src/components/Truncate/examples/TruncateDefault.tsx +7 -0
- package/src/components/Truncate/examples/TruncateMaxChars.tsx +27 -0
- package/src/components/Truncate/examples/TruncateMiddle.tsx +11 -0
- package/src/components/Truncate/examples/TruncateStart.tsx +7 -0
- package/src/components/Wizard/WizardNavInternal.tsx +1 -1
- package/src/components/Wizard/examples/WizardGetCurrentStep.tsx +1 -1
- package/src/demos/Banner.md +6 -6
- package/src/demos/CardDemos.md +1 -1
- package/src/demos/CardView/examples/CardView.tsx +9 -4
- package/src/demos/DataList/examples/DataListActionable.tsx +5 -3
- package/src/demos/DataList/examples/DataListBasic.tsx +2 -2
- package/src/demos/DataList/examples/DataListExpandableControlInToolbar.tsx +2 -2
- package/src/demos/DataList/examples/DataListStaticBottomPagination.tsx +4 -2
- package/src/demos/DescriptionList/examples/DescriptionListBasic.tsx +5 -5
- package/src/demos/DescriptionList/examples/DescriptionListInDrawer.tsx +6 -4
- package/src/demos/JumpLinks.md +5 -5
- package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +3 -3
- package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +3 -3
- package/src/demos/PasswordGenerator.md +1 -1
- package/src/demos/RTL/examples/PaginatedTable.jsx +2 -2
- package/src/demos/RTL/examples/PaginatedTable.tsx +2 -2
- package/src/demos/SearchInput/SearchInput.md +2 -0
- package/src/demos/Tabs.md +6 -6
- package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +6 -6
- package/src/demos/examples/BackToTop/BackToTopNameDemo.tsx +2 -2
- package/src/demos/examples/Card/CardAggregateStatus.tsx +2 -6
- package/src/demos/examples/Card/CardDetails.tsx +4 -5
- package/src/demos/examples/Card/CardEventsView.tsx +3 -4
- package/src/demos/examples/Card/CardLogView.tsx +3 -4
- package/src/demos/examples/Card/CardStatus.tsx +0 -1
- package/src/demos/examples/Card/CardStatusTabbed.tsx +3 -3
- package/src/demos/examples/Card/CardUtilizationDemo3.tsx +0 -1
- package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +5 -3
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +3 -3
- package/src/demos/examples/Nav/NavDefault.tsx +3 -3
- package/src/demos/examples/Nav/NavDrilldown.tsx +1 -1
- package/src/demos/examples/Nav/NavExpandable.tsx +3 -3
- package/src/demos/examples/Nav/NavFlyout.tsx +9 -3
- package/src/demos/examples/Nav/NavGrouped.tsx +14 -6
- package/src/demos/examples/Nav/NavHorizontal.tsx +3 -3
- package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +5 -5
- package/src/demos/examples/Nav/NavManual.tsx +3 -3
- package/src/demos/examples/Nav/NavWithSubnav.tsx +5 -5
- package/src/demos/examples/Page/PageContextSelector.tsx +5 -3
- package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +3 -3
- package/src/demos/examples/Page/PageStickySectionGroup.tsx +3 -3
- package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +3 -3
- package/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx +5 -4
- package/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx +3 -3
- package/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx +3 -3
- package/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx +3 -3
- package/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx +3 -3
- package/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx +3 -3
- package/src/demos/examples/Skeleton/SkeletonCard.tsx +5 -3
- package/src/demos/examples/Tabs/ModalTabs.tsx +3 -3
- package/src/demos/examples/Tabs/NestedTabs.tsx +2 -2
- package/src/demos/examples/Tabs/NestedUnindentedTabs.tsx +2 -2
- package/src/demos/examples/Tabs/TabsAndTable.tsx +3 -3
- package/src/demos/examples/Toolbar/ConsoleLogViewerToolbar.tsx +1 -1
- package/src/demos/examples/Wizard/InModal.tsx +1 -1
- package/src/demos/examples/Wizard/InPage.tsx +1 -1
- package/src/demos/examples/Wizard/InPageWithDrawer.tsx +3 -3
- package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +3 -3
- package/src/components/List/__tests__/Generated/ListItem.test.tsx +0 -12
- package/src/components/List/__tests__/Generated/__snapshots__/ListItem.test.tsx.snap +0 -13
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import '@testing-library/jest-dom';
|
|
3
|
+
import { NavExpandable } from '../NavExpandable';
|
|
4
|
+
|
|
5
|
+
test('Renders with the inert attribute by default', () => {
|
|
6
|
+
render(<NavExpandable id="grp-1" title="NavExpandable"></NavExpandable>);
|
|
7
|
+
|
|
8
|
+
expect(screen.getByLabelText('NavExpandable')).toHaveAttribute('inert', '');
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('Does not render with the inert attribute when isExpanded is true', () => {
|
|
12
|
+
render(<NavExpandable id="grp-1" title="NavExpandable" isExpanded={true}></NavExpandable>);
|
|
13
|
+
|
|
14
|
+
expect(screen.getByLabelText('NavExpandable')).not.toHaveAttribute('inert', '');
|
|
15
|
+
});
|
|
@@ -223,6 +223,7 @@ exports[`Nav Expandable Nav List - Trigger toggle 1`] = `
|
|
|
223
223
|
aria-labelledby="grp-1"
|
|
224
224
|
class="pf-v6-c-nav__subnav"
|
|
225
225
|
hidden=""
|
|
226
|
+
inert=""
|
|
226
227
|
>
|
|
227
228
|
<ul
|
|
228
229
|
class="pf-v6-c-nav__list"
|
|
@@ -355,6 +356,7 @@ exports[`Nav Expandable Nav List 1`] = `
|
|
|
355
356
|
aria-labelledby="grp-1"
|
|
356
357
|
class="pf-v6-c-nav__subnav"
|
|
357
358
|
hidden=""
|
|
359
|
+
inert=""
|
|
358
360
|
>
|
|
359
361
|
<ul
|
|
360
362
|
class="pf-v6-c-nav__list"
|
|
@@ -486,6 +488,7 @@ exports[`Nav Expandable Nav List with aria label 1`] = `
|
|
|
486
488
|
aria-labelledby="grp-1"
|
|
487
489
|
class="pf-v6-c-nav__subnav"
|
|
488
490
|
hidden=""
|
|
491
|
+
inert=""
|
|
489
492
|
>
|
|
490
493
|
<h2
|
|
491
494
|
class="pf-v6-screen-reader"
|
|
@@ -8,7 +8,7 @@ propComponents:
|
|
|
8
8
|
|
|
9
9
|
import { useState } from 'react';
|
|
10
10
|
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
11
|
-
import
|
|
11
|
+
import pageSectionWidthLimitMaxWidth from '@patternfly/react-tokens/dist/esm/c_page_section_m_limit_width_MaxWidth';
|
|
12
12
|
|
|
13
13
|
## Examples
|
|
14
14
|
|
|
@@ -18,8 +18,7 @@ import {
|
|
|
18
18
|
CardBody
|
|
19
19
|
} from '@patternfly/react-core';
|
|
20
20
|
import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
|
|
21
|
-
|
|
22
|
-
import c_page_section_m_limit_width_MaxWidth from '@patternfly/react-tokens/dist/esm/c_page_section_m_limit_width_MaxWidth';
|
|
21
|
+
import pageSectionWidthLimitMaxWidth from '@patternfly/react-tokens/dist/esm/c_page_section_m_limit_width_MaxWidth';
|
|
23
22
|
|
|
24
23
|
export const PageCenteredSection: React.FunctionComponent = () => {
|
|
25
24
|
const [isSidebarOpen, setIsSidebarOpen] = useState(true);
|
|
@@ -68,11 +67,11 @@ export const PageCenteredSection: React.FunctionComponent = () => {
|
|
|
68
67
|
|
|
69
68
|
return (
|
|
70
69
|
<Page masthead={masthead} sidebar={sidebar}>
|
|
71
|
-
<PageSection isWidthLimited isCenterAligned>
|
|
70
|
+
<PageSection isWidthLimited isCenterAligned aria-label="width limited page section">
|
|
72
71
|
<Card>
|
|
73
72
|
<CardBody>
|
|
74
73
|
When a width limited page section is wider than the value of
|
|
75
|
-
<code>{
|
|
74
|
+
<code>{pageSectionWidthLimitMaxWidth.name}</code>, the section will be centered in the main section.
|
|
76
75
|
<br />
|
|
77
76
|
<br />
|
|
78
77
|
The content in this example is placed in a card to better illustrate how the section behaves when it is
|
|
@@ -101,10 +101,16 @@ export const PageGroupSection: React.FunctionComponent = () => {
|
|
|
101
101
|
</BreadcrumbItem>
|
|
102
102
|
</Breadcrumb>
|
|
103
103
|
</PageBreadcrumb>
|
|
104
|
-
<PageSection
|
|
104
|
+
<PageSection aria-labelledby="grouped-section">
|
|
105
|
+
<h2 id="grouped-section">Grouped section</h2>
|
|
106
|
+
</PageSection>
|
|
105
107
|
</PageGroup>
|
|
106
|
-
<PageSection
|
|
107
|
-
|
|
108
|
+
<PageSection aria-labelledby="section-1">
|
|
109
|
+
<h2 id="section-1">Grouped example section 1</h2>
|
|
110
|
+
</PageSection>
|
|
111
|
+
<PageSection aria-labelledby="section-2">
|
|
112
|
+
<h2 id="section-2">Grouped example section 2</h2>
|
|
113
|
+
</PageSection>
|
|
108
114
|
</Page>
|
|
109
115
|
);
|
|
110
116
|
};
|
|
@@ -36,9 +36,15 @@ export const PageHorizontalNav: React.FunctionComponent = () => {
|
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
38
|
<Page masthead={masthead}>
|
|
39
|
-
<PageSection
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
<PageSection aria-labelledby="section-1">
|
|
40
|
+
<h2 id="section-1">Horizontal nav example section 1</h2>
|
|
41
|
+
</PageSection>
|
|
42
|
+
<PageSection variant="secondary" aria-labelledby="section-2">
|
|
43
|
+
<h2 id="section-2">Horizontal nav example section 2 with secondary variant styling</h2>
|
|
44
|
+
</PageSection>
|
|
45
|
+
<PageSection aria-labelledby="section-3">
|
|
46
|
+
<h2 id="section-3">Horizontal nav example section 3</h2>
|
|
47
|
+
</PageSection>
|
|
42
48
|
</Page>
|
|
43
49
|
);
|
|
44
50
|
};
|
|
@@ -64,10 +64,18 @@ export const PageMainSectionPadding: React.FunctionComponent = () => {
|
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
66
|
<Page masthead={masthead} sidebar={sidebar}>
|
|
67
|
-
<PageSection
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<PageSection padding={{
|
|
67
|
+
<PageSection aria-labelledby="section-1">
|
|
68
|
+
<h2 id="section-1">Section with default padding</h2>
|
|
69
|
+
</PageSection>
|
|
70
|
+
<PageSection padding={{ default: 'noPadding' }} aria-labelledby="section-2">
|
|
71
|
+
<h2 id="section-2">Section with no padding</h2>
|
|
72
|
+
</PageSection>
|
|
73
|
+
<PageSection padding={{ default: 'noPadding', md: 'padding' }} aria-labelledby="section-3">
|
|
74
|
+
<h2 id="section-3">Section with padding on medium</h2>
|
|
75
|
+
</PageSection>
|
|
76
|
+
<PageSection padding={{ md: 'noPadding' }} aria-labelledby="section-4">
|
|
77
|
+
<h2 id="section-4">Section with no padding on medium</h2>
|
|
78
|
+
</PageSection>
|
|
71
79
|
</Page>
|
|
72
80
|
);
|
|
73
81
|
};
|
|
@@ -64,22 +64,22 @@ export const PageMainSectionPadding: React.FunctionComponent = () => {
|
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
66
|
<Page header={header} sidebar={sidebar}>
|
|
67
|
-
<PageSection type="subnav">
|
|
67
|
+
<PageSection type="subnav" aria-label="With subnav type">
|
|
68
68
|
Section with <code>type="subnav"</code> for horizontal subnav navigation
|
|
69
69
|
</PageSection>
|
|
70
|
-
<PageSection type="nav">
|
|
70
|
+
<PageSection type="nav" aria-label="With nav type">
|
|
71
71
|
Section with <code>type="nav"</code> for tertiary navigation
|
|
72
72
|
</PageSection>
|
|
73
|
-
<PageSection type="tabs">
|
|
73
|
+
<PageSection type="tabs" aria-label="With tabs type">
|
|
74
74
|
Section with <code>type="tabs"</code> for tabs
|
|
75
75
|
</PageSection>
|
|
76
|
-
<PageSection type="breadcrumb">
|
|
76
|
+
<PageSection type="breadcrumb" aria-label="With breadcrumb type">
|
|
77
77
|
Section with <code>type="breadcrumb"</code> for breadcrumbs
|
|
78
78
|
</PageSection>
|
|
79
|
-
<PageSection>
|
|
79
|
+
<PageSection aria-label="With default type">
|
|
80
80
|
Section without <code>type</code> prop or <code>type="default"</code> for main sections
|
|
81
81
|
</PageSection>
|
|
82
|
-
<PageSection type="wizard">
|
|
82
|
+
<PageSection type="wizard" aria-label="With wizard type">
|
|
83
83
|
Section with <code>type="wizard"</code> for wizards
|
|
84
84
|
</PageSection>
|
|
85
85
|
</Page>
|
|
@@ -71,9 +71,15 @@ export const PageMultipleSidebarBody: React.FunctionComponent = () => {
|
|
|
71
71
|
|
|
72
72
|
return (
|
|
73
73
|
<Page masthead={masthead} sidebar={sidebar}>
|
|
74
|
-
<PageSection
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
<PageSection aria-labelledby="section-1">
|
|
75
|
+
<h2 id="section-1">Multiple sidebar body example section 1</h2>
|
|
76
|
+
</PageSection>
|
|
77
|
+
<PageSection aria-labelledby="section-2">
|
|
78
|
+
<h2 id="section-2">Multiple sidebar body example section 2</h2>
|
|
79
|
+
</PageSection>
|
|
80
|
+
<PageSection aria-labelledby="section-3">
|
|
81
|
+
<h2 id="section-3">Multiple sidebar body example section 3</h2>
|
|
82
|
+
</PageSection>
|
|
77
83
|
</Page>
|
|
78
84
|
);
|
|
79
85
|
};
|
|
@@ -51,9 +51,15 @@ export const PageUncontrolledNav: React.FunctionComponent = () => {
|
|
|
51
51
|
|
|
52
52
|
return (
|
|
53
53
|
<Page isManagedSidebar masthead={masthead} sidebar={sidebar}>
|
|
54
|
-
<PageSection
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
<PageSection aria-labelledby="section-1">
|
|
55
|
+
<h2 id="section-1">Uncontrolled nav example section 1</h2>
|
|
56
|
+
</PageSection>
|
|
57
|
+
<PageSection aria-labelledby="section-2">
|
|
58
|
+
<h2 id="section-2">Uncontrolled nav example section 2</h2>
|
|
59
|
+
</PageSection>
|
|
60
|
+
<PageSection aria-labelledby="section-3">
|
|
61
|
+
<h2 id="section-3">Uncontrolled nav example section 3</h2>
|
|
62
|
+
</PageSection>
|
|
57
63
|
</Page>
|
|
58
64
|
);
|
|
59
65
|
};
|
|
@@ -64,9 +64,15 @@ export const PageVerticalNav: React.FunctionComponent = () => {
|
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
66
|
<Page masthead={masthead} sidebar={sidebar}>
|
|
67
|
-
<PageSection
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
<PageSection aria-labelledby="section-1">
|
|
68
|
+
<h2 id="section-1">Vertical nav example section 1</h2>
|
|
69
|
+
</PageSection>
|
|
70
|
+
<PageSection variant="secondary" aria-labelledby="section-2">
|
|
71
|
+
<h2 id="section-2">Vertical nav example section 2 with secondary variant styling</h2>
|
|
72
|
+
</PageSection>
|
|
73
|
+
<PageSection aria-labelledby="section-3">
|
|
74
|
+
<h2 id="section-3">Vertical nav example section 3</h2>
|
|
75
|
+
</PageSection>
|
|
70
76
|
</Page>
|
|
71
77
|
);
|
|
72
78
|
};
|
|
@@ -64,11 +64,15 @@ export const PageWithOrWithoutFill: React.FunctionComponent = () => {
|
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
66
|
<Page isContentFilled masthead={masthead} sidebar={sidebar}>
|
|
67
|
-
<PageSection
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
<PageSection aria-labelledby="section-1">
|
|
68
|
+
<h2 id="section-1">Section without fill</h2>
|
|
69
|
+
</PageSection>
|
|
70
|
+
<PageSection isFilled={true} variant="secondary" aria-labelledby="section-2">
|
|
71
|
+
<h2 id="section-2">Section with fill</h2>
|
|
72
|
+
</PageSection>
|
|
73
|
+
<PageSection aria-labelledby="section-3">
|
|
74
|
+
<h2 id="section-3">Another section without fill</h2>
|
|
70
75
|
</PageSection>
|
|
71
|
-
<PageSection>A default page section</PageSection>
|
|
72
76
|
</Page>
|
|
73
77
|
);
|
|
74
78
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, useState } from 'react';
|
|
1
|
+
import { Fragment, useState, useRef, useEffect } from 'react';
|
|
2
2
|
import progressStyle from '@patternfly/react-styles/css/components/Progress/progress';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { Tooltip, TooltipPosition } from '../Tooltip';
|
|
@@ -80,22 +80,31 @@ export const ProgressContainer: React.FunctionComponent<ProgressContainerProps>
|
|
|
80
80
|
}: ProgressContainerProps) => {
|
|
81
81
|
const StatusIcon = variantToIcon.hasOwnProperty(variant) && variantToIcon[variant];
|
|
82
82
|
const [tooltip, setTooltip] = useState('');
|
|
83
|
-
const
|
|
83
|
+
const titleRef = useRef(null);
|
|
84
|
+
const updateTooltip = (event: any) => {
|
|
84
85
|
if (event.target.offsetWidth < event.target.scrollWidth) {
|
|
85
86
|
setTooltip(title || event.target.innerHTML);
|
|
86
87
|
} else {
|
|
87
88
|
setTooltip('');
|
|
88
89
|
}
|
|
89
90
|
};
|
|
91
|
+
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
if (tooltip !== '') {
|
|
94
|
+
titleRef.current.focus();
|
|
95
|
+
}
|
|
96
|
+
}, [tooltip]);
|
|
97
|
+
|
|
98
|
+
const _isTruncatedAndString = isTitleTruncated && typeof title === 'string';
|
|
90
99
|
const Title = (
|
|
91
100
|
<div
|
|
92
|
-
className={css(
|
|
93
|
-
progressStyle.progressDescription,
|
|
94
|
-
isTitleTruncated && typeof title === 'string' && progressStyle.modifiers.truncate
|
|
95
|
-
)}
|
|
101
|
+
className={css(progressStyle.progressDescription, _isTruncatedAndString && progressStyle.modifiers.truncate)}
|
|
96
102
|
id={`${parentId}-description`}
|
|
97
|
-
aria-hidden=
|
|
98
|
-
onMouseEnter={
|
|
103
|
+
aria-hidden={_isTruncatedAndString ? null : 'true'}
|
|
104
|
+
onMouseEnter={_isTruncatedAndString ? updateTooltip : null}
|
|
105
|
+
onFocus={_isTruncatedAndString ? updateTooltip : null}
|
|
106
|
+
{...(_isTruncatedAndString && { tabIndex: 0 })}
|
|
107
|
+
ref={titleRef}
|
|
99
108
|
>
|
|
100
109
|
{title}
|
|
101
110
|
</div>
|
|
@@ -103,14 +112,12 @@ export const ProgressContainer: React.FunctionComponent<ProgressContainerProps>
|
|
|
103
112
|
|
|
104
113
|
return (
|
|
105
114
|
<Fragment>
|
|
106
|
-
{title &&
|
|
107
|
-
|
|
108
|
-
<Tooltip position={tooltipPosition} content={tooltip} isVisible
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Title
|
|
113
|
-
))}
|
|
115
|
+
{title && (
|
|
116
|
+
<>
|
|
117
|
+
{tooltip && <Tooltip position={tooltipPosition} content={tooltip} isVisible triggerRef={titleRef} />}
|
|
118
|
+
{Title}
|
|
119
|
+
</>
|
|
120
|
+
)}
|
|
114
121
|
{(measureLocation !== ProgressMeasureLocation.none || StatusIcon) && (
|
|
115
122
|
<div className={css(progressStyle.progressStatus)} aria-hidden="true">
|
|
116
123
|
{(measureLocation === ProgressMeasureLocation.top || measureLocation === ProgressMeasureLocation.outside) && (
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from '@patternfly/react-core';
|
|
9
9
|
|
|
10
10
|
export const ProgressTitleOutsideOfProgressBar: React.FunctionComponent = () => (
|
|
11
|
-
<DescriptionList>
|
|
11
|
+
<DescriptionList aria-label="Progress Title outside of progress bar">
|
|
12
12
|
<DescriptionListGroup>
|
|
13
13
|
<DescriptionListTerm id="title-outside-progress-example-label">Title outside of progress bar</DescriptionListTerm>
|
|
14
14
|
<DescriptionListDescription>
|
|
@@ -7,7 +7,13 @@ export const SearchInputFocusSearch: React.FunctionComponent = () => {
|
|
|
7
7
|
|
|
8
8
|
return (
|
|
9
9
|
<>
|
|
10
|
-
<SearchInput
|
|
10
|
+
<SearchInput
|
|
11
|
+
ref={ref}
|
|
12
|
+
value={value}
|
|
13
|
+
onChange={(_event, value) => setValue(value)}
|
|
14
|
+
onClear={() => setValue('')}
|
|
15
|
+
aria-label="Search focus using ref example"
|
|
16
|
+
/>
|
|
11
17
|
<Button onClick={() => ref.current && ref.current.focus()}>Focus on the search input</Button>
|
|
12
18
|
</>
|
|
13
19
|
);
|
|
@@ -29,6 +29,7 @@ export const SearchInputWithNavigableOptions: React.FunctionComponent = () => {
|
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<SearchInput
|
|
32
|
+
aria-label="Search match with navigable options example"
|
|
32
33
|
placeholder="Find by name"
|
|
33
34
|
value={value}
|
|
34
35
|
onChange={(_event, value) => onChange(value)}
|
|
@@ -78,11 +78,6 @@ By default, the menu toggle will display a badge to indicate the number of items
|
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
### Typeahead
|
|
81
|
-
Typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.
|
|
82
|
-
|
|
83
|
-
Typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.
|
|
84
|
-
|
|
85
|
-
To make a typeahead, pass `variant=typeahead` into the `<MenuToggle>` component and link an `onClick` function to the `<TextInputGroupMain>` component.
|
|
86
81
|
|
|
87
82
|
Typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.
|
|
88
83
|
|
|
@@ -93,13 +88,6 @@ To make a typeahead, pass `variant=typeahead` into the `<MenuToggle>` component
|
|
|
93
88
|
```
|
|
94
89
|
|
|
95
90
|
### Typeahead with create option
|
|
96
|
-
If a user enters a value into a typeahead select menu that does not exist, you can allow them to create an option of that value.
|
|
97
|
-
|
|
98
|
-
If a user enters a value into a typeahead select menu that does not exist, you can allow them to create an option of that value.
|
|
99
|
-
|
|
100
|
-
To enable the creation ability, pass a predetermined `value` into a `<SelectOption>` component. You can use the `placeholder` property to change the default text shown in the text input.
|
|
101
|
-
|
|
102
|
-
The following example outlines the code implementation required to create a working typeahead menu that allows for creation.
|
|
103
91
|
|
|
104
92
|
If a user enters a value into a typeahead select menu that does not exist, you can allow them to create an option of that value.
|
|
105
93
|
|
|
@@ -111,14 +99,9 @@ The following example outlines the code implementation required to create a work
|
|
|
111
99
|
|
|
112
100
|
```
|
|
113
101
|
|
|
114
|
-
### Multiple typeahead with
|
|
115
|
-
A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a chip group to be placed in the select toggle.
|
|
116
|
-
|
|
117
|
-
A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a chip group to be placed in the select toggle.
|
|
118
|
-
|
|
119
|
-
When more items than the allowed limit are selected, overflowing items will be hidden under a "more" button. The following example hides items after more than 3 are selected. To show hidden items, select the “more” button. Select "show less" to hide extra items again.
|
|
102
|
+
### Multiple typeahead with labels
|
|
120
103
|
|
|
121
|
-
A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a
|
|
104
|
+
A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a label group to be placed in the select toggle.
|
|
122
105
|
|
|
123
106
|
When more items than the allowed limit are selected, overflowing items will be hidden under a "more" button. The following example hides items after more than 3 are selected. To show hidden items, select the “more” button. Select "show less" to hide extra items again.
|
|
124
107
|
|
|
@@ -127,20 +110,14 @@ When more items than the allowed limit are selected, overflowing items will be h
|
|
|
127
110
|
```
|
|
128
111
|
|
|
129
112
|
### Multiple typeahead with create option
|
|
130
|
-
If the text that is entered into a typeahead doesn't match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a chip group to display created items as chips."
|
|
131
113
|
|
|
132
|
-
If the text that is entered into a typeahead doesn't match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a
|
|
133
|
-
|
|
134
|
-
If the text that is entered into a typeahead doesn't match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a chip group to display created items as chips."
|
|
114
|
+
If the text that is entered into a typeahead doesn't match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a label group to display created items as labels.
|
|
135
115
|
|
|
136
116
|
```ts file="./SelectMultiTypeaheadCreatable.tsx"
|
|
137
117
|
|
|
138
118
|
```
|
|
139
119
|
|
|
140
120
|
### Multiple typeahead with checkboxes
|
|
141
|
-
By default, a multiple typeahead select allows you to select multiple menu items, placing a checkmark beside selected items. Like basic checkbox select menus, you can add checkboxes to your menu items. This approach may be more accurate and comprehensive for more complex menu scenarios like filtering.
|
|
142
|
-
|
|
143
|
-
By default, a multiple typeahead select allows you to select multiple menu items, placing a checkmark beside selected items. Like basic checkbox select menus, you can add checkboxes to your menu items. This approach may be more accurate and comprehensive for more complex menu scenarios like filtering.
|
|
144
121
|
|
|
145
122
|
By default, a multiple typeahead select allows you to select multiple menu items, placing a checkmark beside selected items. Like basic checkbox select menus, you can add checkboxes to your menu items. This approach may be more accurate and comprehensive for more complex menu scenarios like filtering.
|
|
146
123
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
2
|
import { Skeleton } from '@patternfly/react-core';
|
|
3
|
-
/* eslint-disable camelcase */
|
|
4
3
|
import t_global_font_size_4xl from '@patternfly/react-tokens/dist/esm/t_global_font_size_4xl';
|
|
5
4
|
import t_global_font_size_3xl from '@patternfly/react-tokens/dist/esm/t_global_font_size_3xl';
|
|
6
5
|
import t_global_font_size_2xl from '@patternfly/react-tokens/dist/esm/t_global_font_size_2xl';
|
|
@@ -31,7 +31,9 @@ export interface HorizontalOverflowObject {
|
|
|
31
31
|
type TabElement = React.ReactElement<TabProps, React.JSXElementConstructor<TabProps>>;
|
|
32
32
|
type TabsChild = TabElement | boolean | null | undefined;
|
|
33
33
|
|
|
34
|
-
export interface TabsProps
|
|
34
|
+
export interface TabsProps
|
|
35
|
+
extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect' | 'onToggle'>,
|
|
36
|
+
OUIAProps {
|
|
35
37
|
/** Content rendered inside the tabs component. Only `Tab` components or expressions resulting in a falsy value are allowed here. */
|
|
36
38
|
children: TabsChild | TabsChild[];
|
|
37
39
|
/** Additional classes added to the tabs */
|
|
@@ -12,7 +12,7 @@ export enum ToolbarGroupVariant {
|
|
|
12
12
|
'label-group' = 'label-group'
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'ref'> {
|
|
15
|
+
export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'ref' | 'onToggle'> {
|
|
16
16
|
/** Classes applied to root element of the data toolbar group */
|
|
17
17
|
className?: string;
|
|
18
18
|
/** A type modifier which modifies spacing specifically depending on the type of group */
|
|
@@ -185,10 +185,19 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
|
|
|
185
185
|
children,
|
|
186
186
|
isAllExpanded,
|
|
187
187
|
isOverflowContainer,
|
|
188
|
+
role,
|
|
188
189
|
...props
|
|
189
190
|
}: ToolbarItemProps) => {
|
|
190
191
|
if (variant === ToolbarItemVariant.separator) {
|
|
191
|
-
|
|
192
|
+
const isDividerRoleValid = role === 'separator' || role === 'presentation';
|
|
193
|
+
return (
|
|
194
|
+
<Divider
|
|
195
|
+
className={css(className)}
|
|
196
|
+
orientation={{ default: 'vertical' }}
|
|
197
|
+
{...props}
|
|
198
|
+
{...(isDividerRoleValid && { role: role as 'separator' | 'presentation' })}
|
|
199
|
+
/>
|
|
200
|
+
);
|
|
192
201
|
}
|
|
193
202
|
|
|
194
203
|
return (
|
|
@@ -217,6 +226,7 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
|
|
|
217
226
|
)}
|
|
218
227
|
{...(variant === 'label' && { 'aria-hidden': true })}
|
|
219
228
|
id={id}
|
|
229
|
+
role={role}
|
|
220
230
|
{...props}
|
|
221
231
|
>
|
|
222
232
|
{children}
|
|
@@ -50,11 +50,11 @@ export interface TreeViewListItemProps {
|
|
|
50
50
|
/** Internal content of a tree view item. */
|
|
51
51
|
name: React.ReactNode;
|
|
52
52
|
/** Callback for item checkbox selection. */
|
|
53
|
-
onCheck?: (event: React.ChangeEvent<HTMLInputElement>, item: TreeViewDataItem,
|
|
53
|
+
onCheck?: (event: React.ChangeEvent<HTMLInputElement>, item: TreeViewDataItem, parentItem: TreeViewDataItem) => void;
|
|
54
54
|
/** Callback for item selection. Note: calling event.preventDefault() will prevent the node
|
|
55
55
|
* from toggling.
|
|
56
56
|
*/
|
|
57
|
-
onSelect?: (event: React.MouseEvent, item: TreeViewDataItem,
|
|
57
|
+
onSelect?: (event: React.MouseEvent, item: TreeViewDataItem, parentItem: TreeViewDataItem) => void;
|
|
58
58
|
/** Callback for expanding a node with children. */
|
|
59
59
|
onExpand?: (event: React.MouseEvent, item: TreeViewDataItem, parentItem: TreeViewDataItem) => void;
|
|
60
60
|
/** Callback for collapsing a node with children. */
|
|
@@ -3,10 +3,20 @@ import userEvent from '@testing-library/user-event';
|
|
|
3
3
|
import { TreeView } from '../TreeView';
|
|
4
4
|
|
|
5
5
|
jest.mock('../TreeViewList', () => ({
|
|
6
|
-
TreeViewList: ({
|
|
6
|
+
TreeViewList: ({
|
|
7
|
+
children,
|
|
8
|
+
isNested,
|
|
9
|
+
toolbar,
|
|
10
|
+
'aria-label': ariaLabel,
|
|
11
|
+
'aria-labelledby': ariaLabelledBy,
|
|
12
|
+
isMultiSelectable
|
|
13
|
+
}) => (
|
|
7
14
|
<div data-testid="TreeViewList-mock">
|
|
8
15
|
<p>{`TreeViewList isNested: ${isNested}`}</p>
|
|
9
16
|
<p>{`TreeViewList toolbar: ${toolbar}`}</p>
|
|
17
|
+
<p>{`TreeViewList aria-label: ${ariaLabel}`}</p>
|
|
18
|
+
<p>{`TreeViewList aria-labelledBy: ${ariaLabelledBy}`}</p>
|
|
19
|
+
<p>{`TreeViewList isMultiSelectable: ${isMultiSelectable}`}</p>
|
|
10
20
|
<div data-testid="TreeViewList-children">{children}</div>
|
|
11
21
|
</div>
|
|
12
22
|
)
|
|
@@ -131,6 +141,21 @@ test('Passes toolbar to TreeViewList', () => {
|
|
|
131
141
|
|
|
132
142
|
expect(screen.getByText('TreeViewList toolbar: Toolbar content')).toBeVisible();
|
|
133
143
|
});
|
|
144
|
+
test('Passes aria-label to TreeViewList', () => {
|
|
145
|
+
render(<TreeView aria-label="Test aria-label" data={[basicData]} />);
|
|
146
|
+
|
|
147
|
+
expect(screen.getByText('TreeViewList aria-label: Test aria-label')).toBeVisible();
|
|
148
|
+
});
|
|
149
|
+
test('Passes aria-labelledby to TreeViewList', () => {
|
|
150
|
+
render(<TreeView aria-labelledby="test-aria-labelledby" data={[basicData]} />);
|
|
151
|
+
|
|
152
|
+
expect(screen.getByText('TreeViewList aria-labelledBy: test-aria-labelledby')).toBeVisible();
|
|
153
|
+
});
|
|
154
|
+
test('Passes isMultiSelectable to TreeViewList', () => {
|
|
155
|
+
render(<TreeView isMultiSelectable={true} data={[basicData]} />);
|
|
156
|
+
|
|
157
|
+
expect(screen.getByText('TreeViewList isMultiSelectable: true')).toBeVisible();
|
|
158
|
+
});
|
|
134
159
|
test('Passes data as children TreeViewList', () => {
|
|
135
160
|
render(<TreeView data={[basicData]} />);
|
|
136
161
|
|