@patternfly/react-core 5.0.0-alpha.47 → 5.0.0-alpha.48
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 +6 -0
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.d.ts +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.d.ts.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.js +2 -2
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.js.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherGroup.d.ts +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherGroup.d.ts.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherGroup.js +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherGroup.js.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherItem.d.ts +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherItem.d.ts.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherItem.js +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherItem.js.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherSeparator.d.ts +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherSeparator.d.ts.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherSeparator.js +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherSeparator.js.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.d.ts +24 -55
- package/dist/esm/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js +53 -12
- package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/Dropdown/DropdownGroup.d.ts +8 -7
- package/dist/esm/components/Dropdown/DropdownGroup.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/DropdownGroup.js +4 -9
- package/dist/esm/components/Dropdown/DropdownGroup.js.map +1 -1
- package/dist/esm/components/Dropdown/DropdownItem.d.ts +8 -41
- package/dist/esm/components/Dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/DropdownItem.js +5 -8
- package/dist/esm/components/Dropdown/DropdownItem.js.map +1 -1
- package/dist/esm/{next/components → components}/Dropdown/DropdownList.d.ts +1 -1
- package/dist/esm/components/Dropdown/DropdownList.d.ts.map +1 -0
- package/dist/esm/{next/components → components}/Dropdown/DropdownList.js +1 -1
- package/dist/esm/components/Dropdown/DropdownList.js.map +1 -0
- package/dist/esm/components/Dropdown/index.d.ts +1 -9
- package/dist/esm/components/Dropdown/index.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/index.js +1 -9
- package/dist/esm/components/Dropdown/index.js.map +1 -1
- package/dist/esm/components/OverflowMenu/OverflowMenuDropdownItem.d.ts +1 -1
- package/dist/esm/components/OverflowMenu/OverflowMenuDropdownItem.d.ts.map +1 -1
- package/dist/esm/components/OverflowMenu/OverflowMenuDropdownItem.js +2 -2
- package/dist/esm/components/OverflowMenu/OverflowMenuDropdownItem.js.map +1 -1
- package/dist/esm/{components → deprecated/components}/Dropdown/BadgeToggle.d.ts +1 -1
- package/dist/esm/deprecated/components/Dropdown/BadgeToggle.d.ts.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/BadgeToggle.js +1 -1
- package/dist/esm/deprecated/components/Dropdown/BadgeToggle.js.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/Dropdown.d.ts +66 -0
- package/dist/esm/deprecated/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/Dropdown.js +16 -0
- package/dist/esm/deprecated/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownGroup.d.ts +11 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownGroup.d.ts.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownGroup.js +15 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownGroup.js.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownItem.d.ts +52 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownItem.d.ts.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownItem.js +15 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownItem.js.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownMenu.d.ts.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/DropdownMenu.js +7 -7
- package/dist/esm/deprecated/components/Dropdown/DropdownMenu.js.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/DropdownSeparator.d.ts +1 -1
- package/dist/esm/deprecated/components/Dropdown/DropdownSeparator.d.ts.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/DropdownSeparator.js +3 -3
- package/dist/esm/deprecated/components/Dropdown/DropdownSeparator.js.map +1 -0
- package/dist/{js → esm/deprecated}/components/Dropdown/DropdownToggle.d.ts +1 -1
- package/dist/esm/deprecated/components/Dropdown/DropdownToggle.d.ts.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/DropdownToggle.js +1 -1
- package/dist/esm/deprecated/components/Dropdown/DropdownToggle.js.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownToggleAction.d.ts.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/DropdownToggleAction.js.map +1 -0
- package/dist/{js → esm/deprecated}/components/Dropdown/DropdownToggleCheckbox.d.ts +2 -2
- package/dist/esm/deprecated/components/Dropdown/DropdownToggleCheckbox.d.ts.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/DropdownToggleCheckbox.js +2 -2
- package/dist/esm/deprecated/components/Dropdown/DropdownToggleCheckbox.js.map +1 -0
- package/dist/{js → esm/deprecated}/components/Dropdown/DropdownWithContext.d.ts +2 -2
- package/dist/esm/deprecated/components/Dropdown/DropdownWithContext.d.ts.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/DropdownWithContext.js +2 -2
- package/dist/esm/deprecated/components/Dropdown/DropdownWithContext.js.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/InternalDropdownItem.d.ts.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/InternalDropdownItem.js +3 -3
- package/dist/esm/deprecated/components/Dropdown/InternalDropdownItem.js.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/KebabToggle.d.ts.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/KebabToggle.js.map +1 -0
- package/dist/{js → esm/deprecated}/components/Dropdown/Toggle.d.ts +1 -1
- package/dist/esm/deprecated/components/Dropdown/Toggle.d.ts.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/Toggle.js +2 -2
- package/dist/esm/deprecated/components/Dropdown/Toggle.js.map +1 -0
- package/dist/esm/{components → deprecated/components}/Dropdown/dropdownConstants.d.ts +1 -1
- package/dist/esm/deprecated/components/Dropdown/dropdownConstants.d.ts.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/dropdownConstants.js.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/index.d.ts +13 -0
- package/dist/esm/deprecated/components/Dropdown/index.d.ts.map +1 -0
- package/dist/esm/deprecated/components/Dropdown/index.js +13 -0
- package/dist/esm/deprecated/components/Dropdown/index.js.map +1 -0
- package/dist/esm/deprecated/components/OptionsMenu/OptionsMenu.js +2 -2
- package/dist/esm/deprecated/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/dist/esm/deprecated/components/OptionsMenu/OptionsMenuItem.js +1 -1
- package/dist/esm/deprecated/components/OptionsMenu/OptionsMenuItem.js.map +1 -1
- package/dist/esm/deprecated/components/OptionsMenu/OptionsMenuToggle.js +1 -1
- package/dist/esm/deprecated/components/OptionsMenu/OptionsMenuToggle.js.map +1 -1
- package/dist/esm/deprecated/components/OptionsMenu/OptionsMenuToggleWithText.js +2 -2
- package/dist/esm/deprecated/components/OptionsMenu/OptionsMenuToggleWithText.js.map +1 -1
- package/dist/esm/deprecated/components/index.d.ts +1 -0
- package/dist/esm/deprecated/components/index.d.ts.map +1 -1
- package/dist/esm/deprecated/components/index.js +1 -0
- package/dist/esm/deprecated/components/index.js.map +1 -1
- package/dist/esm/next/components/index.d.ts +0 -1
- package/dist/esm/next/components/index.d.ts.map +1 -1
- package/dist/esm/next/components/index.js +0 -1
- package/dist/esm/next/components/index.js.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.d.ts +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.d.ts.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.js +2 -2
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.js.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherGroup.d.ts +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherGroup.d.ts.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherGroup.js +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherGroup.js.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherItem.d.ts +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherItem.d.ts.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherItem.js +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherItem.js.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherSeparator.d.ts +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherSeparator.d.ts.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherSeparator.js +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherSeparator.js.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.d.ts +24 -55
- package/dist/js/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.js +52 -12
- package/dist/js/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/js/components/Dropdown/DropdownGroup.d.ts +8 -7
- package/dist/js/components/Dropdown/DropdownGroup.d.ts.map +1 -1
- package/dist/js/components/Dropdown/DropdownGroup.js +4 -9
- package/dist/js/components/Dropdown/DropdownGroup.js.map +1 -1
- package/dist/js/components/Dropdown/DropdownItem.d.ts +8 -41
- package/dist/js/components/Dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/js/components/Dropdown/DropdownItem.js +5 -8
- package/dist/js/components/Dropdown/DropdownItem.js.map +1 -1
- package/dist/js/{next/components → components}/Dropdown/DropdownList.d.ts +1 -1
- package/dist/js/components/Dropdown/DropdownList.d.ts.map +1 -0
- package/dist/js/{next/components → components}/Dropdown/DropdownList.js +1 -1
- package/dist/js/components/Dropdown/DropdownList.js.map +1 -0
- package/dist/js/components/Dropdown/index.d.ts +1 -9
- package/dist/js/components/Dropdown/index.d.ts.map +1 -1
- package/dist/js/components/Dropdown/index.js +1 -9
- package/dist/js/components/Dropdown/index.js.map +1 -1
- package/dist/js/components/OverflowMenu/OverflowMenuDropdownItem.d.ts +1 -1
- package/dist/js/components/OverflowMenu/OverflowMenuDropdownItem.d.ts.map +1 -1
- package/dist/js/components/OverflowMenu/OverflowMenuDropdownItem.js +2 -2
- package/dist/js/components/OverflowMenu/OverflowMenuDropdownItem.js.map +1 -1
- package/dist/js/{components → deprecated/components}/Dropdown/BadgeToggle.d.ts +1 -1
- package/dist/js/deprecated/components/Dropdown/BadgeToggle.d.ts.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/BadgeToggle.js +1 -1
- package/dist/js/deprecated/components/Dropdown/BadgeToggle.js.map +1 -0
- package/dist/js/deprecated/components/Dropdown/Dropdown.d.ts +66 -0
- package/dist/js/deprecated/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/js/deprecated/components/Dropdown/Dropdown.js +20 -0
- package/dist/js/deprecated/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/js/deprecated/components/Dropdown/DropdownGroup.d.ts +11 -0
- package/dist/js/deprecated/components/Dropdown/DropdownGroup.d.ts.map +1 -0
- package/dist/js/deprecated/components/Dropdown/DropdownGroup.js +19 -0
- package/dist/js/deprecated/components/Dropdown/DropdownGroup.js.map +1 -0
- package/dist/js/deprecated/components/Dropdown/DropdownItem.d.ts +52 -0
- package/dist/js/deprecated/components/Dropdown/DropdownItem.d.ts.map +1 -0
- package/dist/js/deprecated/components/Dropdown/DropdownItem.js +19 -0
- package/dist/js/deprecated/components/Dropdown/DropdownItem.js.map +1 -0
- package/dist/js/deprecated/components/Dropdown/DropdownMenu.d.ts.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/DropdownMenu.js +7 -7
- package/dist/js/deprecated/components/Dropdown/DropdownMenu.js.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/DropdownSeparator.d.ts +1 -1
- package/dist/js/deprecated/components/Dropdown/DropdownSeparator.d.ts.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/DropdownSeparator.js +3 -3
- package/dist/js/deprecated/components/Dropdown/DropdownSeparator.js.map +1 -0
- package/dist/{esm → js/deprecated}/components/Dropdown/DropdownToggle.d.ts +1 -1
- package/dist/js/deprecated/components/Dropdown/DropdownToggle.d.ts.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/DropdownToggle.js +1 -1
- package/dist/js/deprecated/components/Dropdown/DropdownToggle.js.map +1 -0
- package/dist/js/deprecated/components/Dropdown/DropdownToggleAction.d.ts.map +1 -0
- package/dist/js/deprecated/components/Dropdown/DropdownToggleAction.js.map +1 -0
- package/dist/{esm → js/deprecated}/components/Dropdown/DropdownToggleCheckbox.d.ts +2 -2
- package/dist/js/deprecated/components/Dropdown/DropdownToggleCheckbox.d.ts.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/DropdownToggleCheckbox.js +2 -2
- package/dist/js/deprecated/components/Dropdown/DropdownToggleCheckbox.js.map +1 -0
- package/dist/{esm → js/deprecated}/components/Dropdown/DropdownWithContext.d.ts +2 -2
- package/dist/js/deprecated/components/Dropdown/DropdownWithContext.d.ts.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/DropdownWithContext.js +2 -2
- package/dist/js/deprecated/components/Dropdown/DropdownWithContext.js.map +1 -0
- package/dist/js/deprecated/components/Dropdown/InternalDropdownItem.d.ts.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/InternalDropdownItem.js +3 -3
- package/dist/js/deprecated/components/Dropdown/InternalDropdownItem.js.map +1 -0
- package/dist/js/deprecated/components/Dropdown/KebabToggle.d.ts.map +1 -0
- package/dist/js/deprecated/components/Dropdown/KebabToggle.js.map +1 -0
- package/dist/{esm → js/deprecated}/components/Dropdown/Toggle.d.ts +1 -1
- package/dist/js/deprecated/components/Dropdown/Toggle.d.ts.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/Toggle.js +2 -2
- package/dist/js/deprecated/components/Dropdown/Toggle.js.map +1 -0
- package/dist/js/{components → deprecated/components}/Dropdown/dropdownConstants.d.ts +1 -1
- package/dist/js/deprecated/components/Dropdown/dropdownConstants.d.ts.map +1 -0
- package/dist/js/deprecated/components/Dropdown/dropdownConstants.js.map +1 -0
- package/dist/js/deprecated/components/Dropdown/index.d.ts +13 -0
- package/dist/js/deprecated/components/Dropdown/index.d.ts.map +1 -0
- package/dist/js/deprecated/components/Dropdown/index.js +16 -0
- package/dist/js/deprecated/components/Dropdown/index.js.map +1 -0
- package/dist/js/deprecated/components/OptionsMenu/OptionsMenu.js +2 -2
- package/dist/js/deprecated/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/dist/js/deprecated/components/OptionsMenu/OptionsMenuItem.js +1 -1
- package/dist/js/deprecated/components/OptionsMenu/OptionsMenuItem.js.map +1 -1
- package/dist/js/deprecated/components/OptionsMenu/OptionsMenuToggle.js +1 -1
- package/dist/js/deprecated/components/OptionsMenu/OptionsMenuToggle.js.map +1 -1
- package/dist/js/deprecated/components/OptionsMenu/OptionsMenuToggleWithText.js +2 -2
- package/dist/js/deprecated/components/OptionsMenu/OptionsMenuToggleWithText.js.map +1 -1
- package/dist/js/deprecated/components/index.d.ts +1 -0
- package/dist/js/deprecated/components/index.d.ts.map +1 -1
- package/dist/js/deprecated/components/index.js +1 -0
- package/dist/js/deprecated/components/index.js.map +1 -1
- package/dist/js/next/components/index.d.ts +0 -1
- package/dist/js/next/components/index.d.ts.map +1 -1
- package/dist/js/next/components/index.js +0 -1
- package/dist/js/next/components/index.js.map +1 -1
- package/dist/umd/react-core.min.js +3 -3
- package/package.json +2 -2
- package/src/components/ActionList/examples/ActionList.md +10 -0
- package/src/components/ActionList/examples/ActionListSingleGroup.tsx +15 -17
- package/src/components/ApplicationLauncher/ApplicationLauncher.tsx +8 -9
- package/src/components/ApplicationLauncher/ApplicationLauncherGroup.tsx +1 -1
- package/src/components/ApplicationLauncher/ApplicationLauncherItem.tsx +1 -1
- package/src/components/ApplicationLauncher/ApplicationLauncherSeparator.tsx +1 -1
- package/src/components/ApplicationLauncher/__tests__/ApplicationLauncher.test.tsx +1 -1
- package/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx +1 -1
- package/src/components/ApplicationLauncher/examples/ApplicationLauncher.md +11 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherAlignRight.tsx +3 -2
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherAlignTop.tsx +3 -2
- package/src/components/Breadcrumb/examples/Breadcrumb.md +9 -0
- package/src/components/Breadcrumb/examples/BreadcrumbDropdown.tsx +11 -13
- package/src/components/Card/examples/Card.md +35 -17
- package/src/components/Card/examples/CardExpandable.tsx +18 -16
- package/src/components/Card/examples/CardExpandableWithIcon.tsx +16 -21
- package/src/components/Card/examples/CardHeaderInCardHead.tsx +16 -21
- package/src/components/Card/examples/CardLegacySelectable.tsx +16 -19
- package/src/components/Card/examples/CardOnlyActionsInCardHead.tsx +17 -20
- package/src/components/Card/examples/CardSelectable.tsx +16 -19
- package/src/components/Card/examples/CardWithImageAndActions.tsx +16 -22
- package/src/components/DataList/__tests__/DataList.test.tsx +10 -10
- package/src/components/DataList/examples/DataList.md +18 -1
- package/src/components/DataList/examples/DataListActions.tsx +12 -10
- package/src/components/DataList/examples/DataListCheckboxes.tsx +26 -24
- package/src/components/DataList/examples/DataListExpandable.tsx +25 -23
- package/src/components/DataList/examples/DataListMixedExpandable.tsx +25 -23
- package/src/components/DataList/examples/DataListSelectableRows.tsx +18 -16
- package/src/components/DataList/examples/DataListWidthModifiers.tsx +18 -16
- package/src/components/Dropdown/Dropdown.tsx +113 -98
- package/src/components/Dropdown/DropdownGroup.tsx +15 -26
- package/src/components/Dropdown/DropdownItem.tsx +14 -90
- package/src/{next/components → components}/Dropdown/DropdownList.tsx +1 -1
- package/src/components/Dropdown/__tests__/Dropdown.test.tsx +208 -270
- package/src/components/Dropdown/__tests__/DropdownGroup.test.tsx +68 -9
- package/src/{next/components → components}/Dropdown/__tests__/DropdownItem.test.tsx +1 -1
- package/src/{next/components → components}/Dropdown/__tests__/DropdownList.test.tsx +1 -1
- package/src/components/Dropdown/__tests__/__snapshots__/Dropdown.test.tsx.snap +32 -963
- package/src/components/Dropdown/__tests__/__snapshots__/DropdownGroup.test.tsx.snap +14 -15
- package/src/components/Dropdown/examples/Dropdown.md +20 -149
- package/src/components/Dropdown/examples/DropdownBasic.tsx +35 -43
- package/src/{next/components → components}/Dropdown/examples/DropdownWithDescriptions.tsx +1 -2
- package/src/{next/components → components}/Dropdown/examples/DropdownWithGroups.tsx +4 -5
- package/src/{next/components → components}/Dropdown/examples/DropdownWithKebabToggle.tsx +2 -3
- package/src/components/Dropdown/index.ts +1 -9
- package/src/components/DualListSelector/examples/DualListSelector.md +14 -1
- package/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx +11 -14
- package/src/components/Hint/examples/Hint.md +9 -0
- package/src/components/Hint/examples/HintBasicWithTitle.tsx +15 -19
- package/src/components/Hint/examples/HintBasicWithoutTitle.tsx +15 -18
- package/src/components/InputGroup/examples/InputGroup.md +17 -0
- package/src/components/InputGroup/examples/InputGroupWithDropdown.tsx +13 -8
- package/src/components/Menu/examples/Menu.md +27 -0
- package/src/components/Menu/examples/MenuWithDrilldownBreadcrumbs.tsx +30 -28
- package/src/components/Modal/examples/Modal.md +24 -4
- package/src/components/Modal/examples/ModalWithDropdown.tsx +14 -9
- package/src/components/NotificationDrawer/examples/NotificationDrawer.md +12 -1
- package/src/components/NotificationDrawer/examples/NotificationDrawerBasic.tsx +20 -18
- package/src/components/NotificationDrawer/examples/NotificationDrawerGroups.tsx +22 -20
- package/src/components/OverflowMenu/OverflowMenuDropdownItem.tsx +2 -2
- package/src/components/OverflowMenu/examples/OverflowMenu.md +20 -17
- package/src/components/OverflowMenu/examples/OverflowMenuBreakpointOnContainer.tsx +7 -6
- package/src/components/Toolbar/examples/Toolbar.md +20 -1
- package/src/components/Toolbar/examples/ToolbarStacked.tsx +43 -39
- package/src/components/Toolbar/examples/ToolbarWithFilters.tsx +19 -23
- package/src/components/TreeView/examples/TreeView.md +59 -59
- package/src/demos/AlertGroup.md +8 -2
- package/src/demos/Card/Card.md +38 -23
- package/src/demos/CardDemos.md +15 -12
- package/src/demos/DataListDemo.md +37 -29
- package/src/demos/DateTimePicker.md +6 -0
- package/src/demos/Masthead.md +8 -0
- package/src/demos/Nav.md +86 -78
- package/src/demos/NotificationDrawer/NotificationDrawer.md +94 -80
- package/src/demos/Page.md +12 -1
- package/src/demos/PrimaryDetail.md +51 -34
- package/src/demos/Tabs.md +5 -2
- package/src/demos/Toolbar.md +53 -43
- package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +16 -14
- package/src/demos/examples/DashboardHeader.js +31 -28
- package/src/demos/examples/DateTimePicker/DateTimePicker.tsx +8 -12
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +31 -28
- package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +31 -28
- package/src/demos/examples/Page/PageStickySectionGroup.tsx +31 -28
- package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +31 -28
- package/src/demos/examples/Page/PageStickySectionGroupUsingPageHeader.tsx +31 -28
- package/src/demos/examples/Tabs/TabsAndTable.tsx +15 -14
- package/src/{components → deprecated/components}/Dropdown/BadgeToggle.tsx +1 -1
- package/src/deprecated/components/Dropdown/Dropdown.tsx +115 -0
- package/src/deprecated/components/Dropdown/DropdownGroup.tsx +36 -0
- package/src/deprecated/components/Dropdown/DropdownItem.tsx +113 -0
- package/src/{components → deprecated/components}/Dropdown/DropdownMenu.tsx +11 -18
- package/src/{components → deprecated/components}/Dropdown/DropdownSeparator.tsx +3 -3
- package/src/{components → deprecated/components}/Dropdown/DropdownToggle.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/DropdownToggleCheckbox.tsx +3 -3
- package/src/{components → deprecated/components}/Dropdown/DropdownWithContext.tsx +3 -3
- package/src/{components → deprecated/components}/Dropdown/InternalDropdownItem.tsx +3 -3
- package/src/{components → deprecated/components}/Dropdown/Toggle.tsx +4 -4
- package/src/deprecated/components/Dropdown/__tests__/Dropdown.test.tsx +278 -0
- package/src/deprecated/components/Dropdown/__tests__/DropdownGroup.test.tsx +10 -0
- package/src/deprecated/components/Dropdown/__tests__/__snapshots__/Dropdown.test.tsx.snap +978 -0
- package/src/deprecated/components/Dropdown/__tests__/__snapshots__/DropdownGroup.test.tsx.snap +21 -0
- package/src/{components → deprecated/components}/Dropdown/dropdownConstants.tsx +1 -1
- package/src/deprecated/components/Dropdown/examples/Dropdown.md +211 -0
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownAlignmentOnBreakpoints.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownAppendBodyVsParent.tsx +2 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownBadge.tsx +1 -1
- package/src/deprecated/components/Dropdown/examples/DropdownBasic.tsx +59 -0
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownBasicPanel.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownDescriptions.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownDirectionUp.tsx +7 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownDisabled.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownGroups.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownIconOnly.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownImageAndText.tsx +3 -3
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownInitialSelection.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownKebab.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownPlainTextToggle.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownPositionRight.tsx +7 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownPrimaryToggle.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownRouterLink.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownSecondaryToggle.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownSplitButton.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownSplitButtonAction.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownSplitButtonActionPrimary.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownSplitButtonActionSecondary.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownSplitButtonDisabled.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownSplitButtonProgressCheckbox.tsx +1 -1
- package/src/{components → deprecated/components}/Dropdown/examples/DropdownSplitButtonText.tsx +1 -1
- package/src/deprecated/components/Dropdown/index.ts +12 -0
- package/src/deprecated/components/OptionsMenu/OptionsMenu.tsx +2 -2
- package/src/deprecated/components/OptionsMenu/OptionsMenuItem.tsx +1 -1
- package/src/deprecated/components/OptionsMenu/OptionsMenuToggle.tsx +1 -1
- package/src/deprecated/components/OptionsMenu/OptionsMenuToggleWithText.tsx +2 -2
- package/src/deprecated/components/OptionsMenu/__tests__/Generated/OptionsMenuItem.test.tsx +1 -1
- package/src/deprecated/components/index.ts +1 -0
- package/src/next/components/index.ts +0 -1
- package/dist/esm/components/Dropdown/BadgeToggle.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/BadgeToggle.js.map +0 -1
- package/dist/esm/components/Dropdown/DropdownMenu.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/DropdownMenu.js.map +0 -1
- package/dist/esm/components/Dropdown/DropdownSeparator.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/DropdownSeparator.js.map +0 -1
- package/dist/esm/components/Dropdown/DropdownToggle.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/DropdownToggle.js.map +0 -1
- package/dist/esm/components/Dropdown/DropdownToggleAction.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/DropdownToggleAction.js.map +0 -1
- package/dist/esm/components/Dropdown/DropdownToggleCheckbox.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/DropdownToggleCheckbox.js.map +0 -1
- package/dist/esm/components/Dropdown/DropdownWithContext.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/DropdownWithContext.js.map +0 -1
- package/dist/esm/components/Dropdown/InternalDropdownItem.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/InternalDropdownItem.js.map +0 -1
- package/dist/esm/components/Dropdown/KebabToggle.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/KebabToggle.js.map +0 -1
- package/dist/esm/components/Dropdown/Toggle.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/Toggle.js.map +0 -1
- package/dist/esm/components/Dropdown/dropdownConstants.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/dropdownConstants.js.map +0 -1
- package/dist/esm/next/components/Dropdown/Dropdown.d.ts +0 -35
- package/dist/esm/next/components/Dropdown/Dropdown.d.ts.map +0 -1
- package/dist/esm/next/components/Dropdown/Dropdown.js +0 -57
- package/dist/esm/next/components/Dropdown/Dropdown.js.map +0 -1
- package/dist/esm/next/components/Dropdown/DropdownGroup.d.ts +0 -12
- package/dist/esm/next/components/Dropdown/DropdownGroup.d.ts.map +0 -1
- package/dist/esm/next/components/Dropdown/DropdownGroup.js +0 -10
- package/dist/esm/next/components/Dropdown/DropdownGroup.js.map +0 -1
- package/dist/esm/next/components/Dropdown/DropdownItem.d.ts +0 -19
- package/dist/esm/next/components/Dropdown/DropdownItem.d.ts.map +0 -1
- package/dist/esm/next/components/Dropdown/DropdownItem.js +0 -12
- package/dist/esm/next/components/Dropdown/DropdownItem.js.map +0 -1
- package/dist/esm/next/components/Dropdown/DropdownList.d.ts.map +0 -1
- package/dist/esm/next/components/Dropdown/DropdownList.js.map +0 -1
- package/dist/esm/next/components/Dropdown/index.d.ts +0 -5
- package/dist/esm/next/components/Dropdown/index.d.ts.map +0 -1
- package/dist/esm/next/components/Dropdown/index.js +0 -5
- package/dist/esm/next/components/Dropdown/index.js.map +0 -1
- package/dist/js/components/Dropdown/BadgeToggle.d.ts.map +0 -1
- package/dist/js/components/Dropdown/BadgeToggle.js.map +0 -1
- package/dist/js/components/Dropdown/DropdownMenu.d.ts.map +0 -1
- package/dist/js/components/Dropdown/DropdownMenu.js.map +0 -1
- package/dist/js/components/Dropdown/DropdownSeparator.d.ts.map +0 -1
- package/dist/js/components/Dropdown/DropdownSeparator.js.map +0 -1
- package/dist/js/components/Dropdown/DropdownToggle.d.ts.map +0 -1
- package/dist/js/components/Dropdown/DropdownToggle.js.map +0 -1
- package/dist/js/components/Dropdown/DropdownToggleAction.d.ts.map +0 -1
- package/dist/js/components/Dropdown/DropdownToggleAction.js.map +0 -1
- package/dist/js/components/Dropdown/DropdownToggleCheckbox.d.ts.map +0 -1
- package/dist/js/components/Dropdown/DropdownToggleCheckbox.js.map +0 -1
- package/dist/js/components/Dropdown/DropdownWithContext.d.ts.map +0 -1
- package/dist/js/components/Dropdown/DropdownWithContext.js.map +0 -1
- package/dist/js/components/Dropdown/InternalDropdownItem.d.ts.map +0 -1
- package/dist/js/components/Dropdown/InternalDropdownItem.js.map +0 -1
- package/dist/js/components/Dropdown/KebabToggle.d.ts.map +0 -1
- package/dist/js/components/Dropdown/KebabToggle.js.map +0 -1
- package/dist/js/components/Dropdown/Toggle.d.ts.map +0 -1
- package/dist/js/components/Dropdown/Toggle.js.map +0 -1
- package/dist/js/components/Dropdown/dropdownConstants.d.ts.map +0 -1
- package/dist/js/components/Dropdown/dropdownConstants.js.map +0 -1
- package/dist/js/next/components/Dropdown/Dropdown.d.ts +0 -35
- package/dist/js/next/components/Dropdown/Dropdown.d.ts.map +0 -1
- package/dist/js/next/components/Dropdown/Dropdown.js +0 -60
- package/dist/js/next/components/Dropdown/Dropdown.js.map +0 -1
- package/dist/js/next/components/Dropdown/DropdownGroup.d.ts +0 -12
- package/dist/js/next/components/Dropdown/DropdownGroup.d.ts.map +0 -1
- package/dist/js/next/components/Dropdown/DropdownGroup.js +0 -14
- package/dist/js/next/components/Dropdown/DropdownGroup.js.map +0 -1
- package/dist/js/next/components/Dropdown/DropdownItem.d.ts +0 -19
- package/dist/js/next/components/Dropdown/DropdownItem.d.ts.map +0 -1
- package/dist/js/next/components/Dropdown/DropdownItem.js +0 -16
- package/dist/js/next/components/Dropdown/DropdownItem.js.map +0 -1
- package/dist/js/next/components/Dropdown/DropdownList.d.ts.map +0 -1
- package/dist/js/next/components/Dropdown/DropdownList.js.map +0 -1
- package/dist/js/next/components/Dropdown/index.d.ts +0 -5
- package/dist/js/next/components/Dropdown/index.d.ts.map +0 -1
- package/dist/js/next/components/Dropdown/index.js +0 -8
- package/dist/js/next/components/Dropdown/index.js.map +0 -1
- package/src/next/components/Dropdown/Dropdown.tsx +0 -130
- package/src/next/components/Dropdown/DropdownGroup.tsx +0 -25
- package/src/next/components/Dropdown/DropdownItem.tsx +0 -37
- package/src/next/components/Dropdown/__tests__/Dropdown.test.tsx +0 -216
- package/src/next/components/Dropdown/__tests__/DropdownGroup.test.tsx +0 -69
- package/src/next/components/Dropdown/__tests__/__snapshots__/Dropdown.test.tsx.snap +0 -47
- package/src/next/components/Dropdown/__tests__/__snapshots__/DropdownGroup.test.tsx.snap +0 -20
- package/src/next/components/Dropdown/examples/Dropdown.md +0 -45
- package/src/next/components/Dropdown/examples/DropdownBasic.tsx +0 -52
- package/src/next/components/Dropdown/index.ts +0 -4
- /package/dist/esm/{components → deprecated/components}/Dropdown/DropdownMenu.d.ts +0 -0
- /package/dist/esm/{components → deprecated/components}/Dropdown/DropdownToggleAction.d.ts +0 -0
- /package/dist/esm/{components → deprecated/components}/Dropdown/DropdownToggleAction.js +0 -0
- /package/dist/esm/{components → deprecated/components}/Dropdown/InternalDropdownItem.d.ts +0 -0
- /package/dist/esm/{components → deprecated/components}/Dropdown/KebabToggle.d.ts +0 -0
- /package/dist/esm/{components → deprecated/components}/Dropdown/KebabToggle.js +0 -0
- /package/dist/esm/{components → deprecated/components}/Dropdown/dropdownConstants.js +0 -0
- /package/dist/js/{components → deprecated/components}/Dropdown/DropdownMenu.d.ts +0 -0
- /package/dist/js/{components → deprecated/components}/Dropdown/DropdownToggleAction.d.ts +0 -0
- /package/dist/js/{components → deprecated/components}/Dropdown/DropdownToggleAction.js +0 -0
- /package/dist/js/{components → deprecated/components}/Dropdown/InternalDropdownItem.d.ts +0 -0
- /package/dist/js/{components → deprecated/components}/Dropdown/KebabToggle.d.ts +0 -0
- /package/dist/js/{components → deprecated/components}/Dropdown/KebabToggle.js +0 -0
- /package/dist/js/{components → deprecated/components}/Dropdown/dropdownConstants.js +0 -0
- /package/src/{next/components → components}/Dropdown/__tests__/__snapshots__/DropdownItem.test.tsx.snap +0 -0
- /package/src/{next/components → components}/Dropdown/__tests__/__snapshots__/DropdownList.test.tsx.snap +0 -0
- /package/src/{components → deprecated/components}/Dropdown/DropdownToggleAction.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/KebabToggle.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/DropdownToggle.test.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/DropdownToggleAction.test.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/DropdownToggleCheckbox.test.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/Generated/DropdownItem.test.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/Generated/DropdownMenu.test.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/Generated/DropdownSeparator.test.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/Generated/KebabToggle.test.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/Generated/__snapshots__/DropdownItem.test.tsx.snap +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/Generated/__snapshots__/DropdownMenu.test.tsx.snap +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/Generated/__snapshots__/DropdownSeparator.test.tsx.snap +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/Generated/__snapshots__/KebabToggle.test.tsx.snap +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/InternalDropdownItem.test.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/Toggle.test.tsx +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/__snapshots__/DropdownToggle.test.tsx.snap +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/__snapshots__/DropdownToggleAction.test.tsx.snap +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/__snapshots__/DropdownToggleCheckbox.test.tsx.snap +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/__snapshots__/InternalDropdownItem.test.tsx.snap +0 -0
- /package/src/{components → deprecated/components}/Dropdown/__tests__/__snapshots__/Toggle.test.tsx.snap +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.48",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": "^17 || ^18",
|
|
71
71
|
"react-dom": "^17 || ^18"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "febfd27ce11f0858e9f6f333fb8703c31ae52e3f"
|
|
74
74
|
}
|
|
@@ -7,25 +7,35 @@ propComponents: ['ActionList', 'ActionListGroup', 'ActionListItem']
|
|
|
7
7
|
|
|
8
8
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
9
9
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
10
|
+
import {
|
|
11
|
+
Dropdown as DropdownDeprecated,
|
|
12
|
+
DropdownItem as DropdownItemDeprecated,
|
|
13
|
+
DropdownSeparator,
|
|
14
|
+
KebabToggle
|
|
15
|
+
} from '@patternfly/react-core/deprecated';
|
|
10
16
|
|
|
11
17
|
## Examples
|
|
12
18
|
|
|
13
19
|
### Action list single group
|
|
14
20
|
|
|
15
21
|
```ts file="ActionListSingleGroup.tsx"
|
|
22
|
+
|
|
16
23
|
```
|
|
17
24
|
|
|
18
25
|
### Action list with icons
|
|
19
26
|
|
|
20
27
|
```ts file="./ActionListWithIcons.tsx"
|
|
28
|
+
|
|
21
29
|
```
|
|
22
30
|
|
|
23
31
|
### Action list multiple groups
|
|
24
32
|
|
|
25
33
|
```ts file="./ActionListMultipleGroups.tsx"
|
|
34
|
+
|
|
26
35
|
```
|
|
27
36
|
|
|
28
37
|
### Action list with cancel button
|
|
29
38
|
|
|
30
39
|
```ts file="./ActionListWithCancelButton.tsx"
|
|
40
|
+
|
|
31
41
|
```
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ActionList, ActionListItem, Button } from '@patternfly/react-core';
|
|
2
3
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Button,
|
|
6
|
-
Dropdown,
|
|
7
|
-
DropdownItem,
|
|
4
|
+
Dropdown as DropdownDeprecated,
|
|
5
|
+
DropdownItem as DropdownItemDeprecated,
|
|
8
6
|
DropdownSeparator,
|
|
9
7
|
KebabToggle
|
|
10
|
-
} from '@patternfly/react-core';
|
|
8
|
+
} from '@patternfly/react-core/deprecated';
|
|
11
9
|
|
|
12
10
|
export const ActionListSingleGroup: React.FunctionComponent = () => {
|
|
13
11
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
@@ -26,21 +24,21 @@ export const ActionListSingleGroup: React.FunctionComponent = () => {
|
|
|
26
24
|
};
|
|
27
25
|
|
|
28
26
|
const dropdownItems = [
|
|
29
|
-
<
|
|
30
|
-
<
|
|
27
|
+
<DropdownItemDeprecated key="link">Link</DropdownItemDeprecated>,
|
|
28
|
+
<DropdownItemDeprecated key="action" component="button">
|
|
31
29
|
Action
|
|
32
|
-
</
|
|
33
|
-
<
|
|
30
|
+
</DropdownItemDeprecated>,
|
|
31
|
+
<DropdownItemDeprecated key="disabled link" isDisabled>
|
|
34
32
|
Disabled Link
|
|
35
|
-
</
|
|
36
|
-
<
|
|
33
|
+
</DropdownItemDeprecated>,
|
|
34
|
+
<DropdownItemDeprecated key="disabled action" isDisabled component="button">
|
|
37
35
|
Disabled Action
|
|
38
|
-
</
|
|
36
|
+
</DropdownItemDeprecated>,
|
|
39
37
|
<DropdownSeparator key="separator" />,
|
|
40
|
-
<
|
|
41
|
-
<
|
|
38
|
+
<DropdownItemDeprecated key="separated link">Separated Link</DropdownItemDeprecated>,
|
|
39
|
+
<DropdownItemDeprecated key="separated action" component="button">
|
|
42
40
|
Separated Action
|
|
43
|
-
</
|
|
41
|
+
</DropdownItemDeprecated>
|
|
44
42
|
];
|
|
45
43
|
|
|
46
44
|
return (
|
|
@@ -71,7 +69,7 @@ export const ActionListSingleGroup: React.FunctionComponent = () => {
|
|
|
71
69
|
</Button>
|
|
72
70
|
</ActionListItem>
|
|
73
71
|
<ActionListItem>
|
|
74
|
-
<
|
|
72
|
+
<DropdownDeprecated
|
|
75
73
|
onSelect={onSelect}
|
|
76
74
|
toggle={<KebabToggle onToggle={onToggle} />}
|
|
77
75
|
isOpen={isOpen}
|
|
@@ -2,8 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/AppLauncher/app-launcher';
|
|
4
4
|
import ThIcon from '@patternfly/react-icons/dist/esm/icons/th-icon';
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import {
|
|
6
|
+
DropdownDirection,
|
|
7
|
+
DropdownPosition,
|
|
8
|
+
DropdownToggle,
|
|
9
|
+
DropdownContext
|
|
10
|
+
} from '../../deprecated/components/Dropdown';
|
|
11
|
+
import { DropdownWithContext } from '../../deprecated/components/Dropdown/DropdownWithContext';
|
|
7
12
|
import { ApplicationLauncherGroup } from './ApplicationLauncherGroup';
|
|
8
13
|
import { ApplicationLauncherSeparator } from './ApplicationLauncherSeparator';
|
|
9
14
|
import { ApplicationLauncherItem } from './ApplicationLauncherItem';
|
|
@@ -94,13 +99,7 @@ export class ApplicationLauncher extends React.Component<ApplicationLauncherProp
|
|
|
94
99
|
return (
|
|
95
100
|
<div key="search" className={css(styles.appLauncherMenuSearch)}>
|
|
96
101
|
<ApplicationLauncherItem
|
|
97
|
-
customChild={
|
|
98
|
-
<SearchInput
|
|
99
|
-
placeholder={searchPlaceholderText}
|
|
100
|
-
onChange={onSearch}
|
|
101
|
-
{...searchProps}
|
|
102
|
-
/>
|
|
103
|
-
}
|
|
102
|
+
customChild={<SearchInput placeholder={searchPlaceholderText} onChange={onSearch} {...searchProps} />}
|
|
104
103
|
></ApplicationLauncherItem>
|
|
105
104
|
</div>
|
|
106
105
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DropdownGroup, DropdownGroupProps } from '
|
|
2
|
+
import { DropdownGroup, DropdownGroupProps } from '../../deprecated/components/Dropdown';
|
|
3
3
|
|
|
4
4
|
export const ApplicationLauncherGroup: React.FunctionComponent<DropdownGroupProps> = ({
|
|
5
5
|
children,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/AppLauncher/app-launcher';
|
|
4
|
-
import { DropdownItem, DropdownItemProps } from '
|
|
4
|
+
import { DropdownItem, DropdownItemProps } from '../../deprecated/components/Dropdown';
|
|
5
5
|
import { ApplicationLauncherContent } from './ApplicationLauncherContent';
|
|
6
6
|
import { ApplicationLauncherContext } from './ApplicationLauncherContext';
|
|
7
7
|
import { ApplicationLauncherItemContext } from './ApplicationLauncherItemContext';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DropdownSeparator, SeparatorProps } from '
|
|
2
|
+
import { DropdownSeparator, SeparatorProps } from '../../deprecated/components/Dropdown/DropdownSeparator';
|
|
3
3
|
|
|
4
4
|
export const ApplicationLauncherSeparator: React.FunctionComponent<SeparatorProps> = ({
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -4,7 +4,7 @@ import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
|
|
|
4
4
|
import { ApplicationLauncher } from '../ApplicationLauncher';
|
|
5
5
|
import { ApplicationLauncherItem } from '../ApplicationLauncherItem';
|
|
6
6
|
|
|
7
|
-
import { DropdownPosition, DropdownDirection } from '
|
|
7
|
+
import { DropdownPosition, DropdownDirection } from '../../../deprecated/components/Dropdown/dropdownConstants';
|
|
8
8
|
import { ApplicationLauncherSeparator } from '../ApplicationLauncherSeparator';
|
|
9
9
|
|
|
10
10
|
const dropdownItems = [
|
package/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
3
|
|
|
4
4
|
import { ApplicationLauncherSeparator } from '../../ApplicationLauncherSeparator';
|
|
5
|
-
import { DropdownArrowContext } from '
|
|
5
|
+
import { DropdownArrowContext } from '../../../../deprecated/components/Dropdown/dropdownConstants';
|
|
6
6
|
|
|
7
7
|
describe('ApplicationLauncherSeparator', () => {
|
|
8
8
|
it('should match snapshot', () => {
|
|
@@ -6,6 +6,7 @@ propComponents: ['ApplicationLauncher', 'ApplicationLauncherItem', 'ApplicationL
|
|
|
6
6
|
ouia: true
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
import { DropdownDirection, DropdownPosition } from '@patternfly/react-core/deprecated';
|
|
9
10
|
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
|
|
10
11
|
import { Link } from '@reach/router';
|
|
11
12
|
import pfLogoSm from './pf-logo-small.svg';
|
|
@@ -18,49 +19,59 @@ To add a tooltip, use the `tooltip` prop and optionally add more tooltip props b
|
|
|
18
19
|
### Basic
|
|
19
20
|
|
|
20
21
|
```ts file="./ApplicationLauncherBasic.tsx"
|
|
22
|
+
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
### Router link
|
|
24
26
|
|
|
25
27
|
```ts file="./ApplicationLauncherRouterLink.tsx"
|
|
28
|
+
|
|
26
29
|
```
|
|
27
30
|
|
|
28
31
|
### Disabled
|
|
29
32
|
|
|
30
33
|
```ts file="./ApplicationLauncherDisabled.tsx"
|
|
34
|
+
|
|
31
35
|
```
|
|
32
36
|
|
|
33
37
|
### Aligned right
|
|
34
38
|
|
|
35
39
|
```ts file="./ApplicationLauncherAlignRight.tsx"
|
|
40
|
+
|
|
36
41
|
```
|
|
37
42
|
|
|
38
43
|
### Aligned top
|
|
39
44
|
|
|
40
45
|
```ts file="./ApplicationLauncherAlignTop.tsx"
|
|
46
|
+
|
|
41
47
|
```
|
|
42
48
|
|
|
43
49
|
### With tooltip
|
|
44
50
|
|
|
45
51
|
```ts file="./ApplicationLauncherTooltip.tsx"
|
|
52
|
+
|
|
46
53
|
```
|
|
47
54
|
|
|
48
55
|
### With sections and icons
|
|
49
56
|
|
|
50
57
|
```ts file="./ApplicationLauncherSectionsAndIcons.tsx"
|
|
58
|
+
|
|
51
59
|
```
|
|
52
60
|
|
|
53
61
|
### With favorites and search
|
|
54
62
|
|
|
55
63
|
```ts file="./ApplicationLauncherFavoritesAndSearch.tsx"
|
|
64
|
+
|
|
56
65
|
```
|
|
57
66
|
|
|
58
67
|
### With custom icon
|
|
59
68
|
|
|
60
69
|
```ts file="./ApplicationLauncherCustomIcon.tsx"
|
|
70
|
+
|
|
61
71
|
```
|
|
62
72
|
|
|
63
73
|
### Basic with menu appended to document body
|
|
64
74
|
|
|
65
75
|
```ts file="./ApplicationLauncherDocumentBody.tsx"
|
|
76
|
+
|
|
66
77
|
```
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ApplicationLauncher, ApplicationLauncherItem
|
|
2
|
+
import { ApplicationLauncher, ApplicationLauncherItem } from '@patternfly/react-core';
|
|
3
|
+
import { DropdownPosition } from '@patternfly/react-core/deprecated';
|
|
3
4
|
|
|
4
5
|
const appLauncherItems: React.ReactElement[] = [
|
|
5
6
|
<ApplicationLauncherItem key="application_1a" href="#">
|
|
@@ -17,7 +18,7 @@ export const ApplicationLauncherAlignRight: React.FunctionComponent = () => {
|
|
|
17
18
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
18
19
|
|
|
19
20
|
const onToggle = (_event: any, isOpen: boolean) => setIsOpen(isOpen);
|
|
20
|
-
const onSelect = (_event: any) => setIsOpen(prevIsOpen => !prevIsOpen);
|
|
21
|
+
const onSelect = (_event: any) => setIsOpen((prevIsOpen) => !prevIsOpen);
|
|
21
22
|
|
|
22
23
|
return (
|
|
23
24
|
<ApplicationLauncher
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ApplicationLauncher, ApplicationLauncherItem
|
|
2
|
+
import { ApplicationLauncher, ApplicationLauncherItem } from '@patternfly/react-core';
|
|
3
|
+
import { DropdownDirection } from '@patternfly/react-core/deprecated';
|
|
3
4
|
|
|
4
5
|
const appLauncherItems: React.ReactElement[] = [
|
|
5
6
|
<ApplicationLauncherItem key="application_1a" href="#">
|
|
@@ -17,7 +18,7 @@ export const ApplicationLauncherAlignTop: React.FunctionComponent = () => {
|
|
|
17
18
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
18
19
|
|
|
19
20
|
const onToggle = (_event: any, isOpen: boolean) => setIsOpen(isOpen);
|
|
20
|
-
const onSelect = (_event: any) => setIsOpen(prevIsOpen => !prevIsOpen);
|
|
21
|
+
const onSelect = (_event: any) => setIsOpen((prevIsOpen) => !prevIsOpen);
|
|
21
22
|
|
|
22
23
|
return (
|
|
23
24
|
<ApplicationLauncher
|
|
@@ -6,6 +6,11 @@ propComponents: ['Breadcrumb', 'BreadcrumbItem', 'BreadcrumbHeading']
|
|
|
6
6
|
ouia: true
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
import {
|
|
10
|
+
Dropdown as DropdownDeprecated,
|
|
11
|
+
BadgeToggle,
|
|
12
|
+
DropdownItem as DropdownItemDeprecated
|
|
13
|
+
} from '@patternfly/react-core/deprecated';
|
|
9
14
|
import AngleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-left-icon';
|
|
10
15
|
|
|
11
16
|
## Examples
|
|
@@ -13,19 +18,23 @@ import AngleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-left-ico
|
|
|
13
18
|
### Basic
|
|
14
19
|
|
|
15
20
|
```ts file="./BreadcrumbBasic.tsx"
|
|
21
|
+
|
|
16
22
|
```
|
|
17
23
|
|
|
18
24
|
### Without home link
|
|
19
25
|
|
|
20
26
|
```ts file="./BreadcrumbWithoutHomeLink.tsx"
|
|
27
|
+
|
|
21
28
|
```
|
|
22
29
|
|
|
23
30
|
### With heading
|
|
24
31
|
|
|
25
32
|
```ts file="./BreadcrumbWithHeading.tsx"
|
|
33
|
+
|
|
26
34
|
```
|
|
27
35
|
|
|
28
36
|
### With dropdown
|
|
29
37
|
|
|
30
38
|
```ts file="./BreadcrumbDropdown.tsx"
|
|
39
|
+
|
|
31
40
|
```
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Breadcrumb, BreadcrumbItem, BreadcrumbHeading } from '@patternfly/react-core';
|
|
2
3
|
import {
|
|
3
|
-
|
|
4
|
-
BreadcrumbItem,
|
|
5
|
-
BreadcrumbHeading,
|
|
6
|
-
Dropdown,
|
|
4
|
+
Dropdown as DropdownDeprecated,
|
|
7
5
|
BadgeToggle,
|
|
8
|
-
DropdownItem
|
|
9
|
-
} from '@patternfly/react-core';
|
|
6
|
+
DropdownItem as DropdownItemDeprecated
|
|
7
|
+
} from '@patternfly/react-core/deprecated';
|
|
10
8
|
import AngleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-left-icon';
|
|
11
9
|
|
|
12
10
|
const dropdownItems: JSX.Element[] = [
|
|
13
|
-
<
|
|
11
|
+
<DropdownItemDeprecated key="edit" component="button" icon={<AngleLeftIcon />}>
|
|
14
12
|
Edit
|
|
15
|
-
</
|
|
16
|
-
<
|
|
13
|
+
</DropdownItemDeprecated>,
|
|
14
|
+
<DropdownItemDeprecated key="action" component="button" icon={<AngleLeftIcon />}>
|
|
17
15
|
Deployment
|
|
18
|
-
</
|
|
19
|
-
<
|
|
16
|
+
</DropdownItemDeprecated>,
|
|
17
|
+
<DropdownItemDeprecated key="apps" component="button" icon={<AngleLeftIcon />}>
|
|
20
18
|
Applications
|
|
21
|
-
</
|
|
19
|
+
</DropdownItemDeprecated>
|
|
22
20
|
];
|
|
23
21
|
|
|
24
22
|
export const BreadcrumbDropdown: React.FunctionComponent = () => {
|
|
@@ -36,7 +34,7 @@ export const BreadcrumbDropdown: React.FunctionComponent = () => {
|
|
|
36
34
|
<Breadcrumb>
|
|
37
35
|
<BreadcrumbItem component="button">Section home</BreadcrumbItem>
|
|
38
36
|
<BreadcrumbItem isDropdown>
|
|
39
|
-
<
|
|
37
|
+
<DropdownDeprecated
|
|
40
38
|
onSelect={onSelect}
|
|
41
39
|
toggle={
|
|
42
40
|
<BadgeToggle ref={badgeToggleRef} onToggle={onToggle}>
|
|
@@ -2,21 +2,28 @@
|
|
|
2
2
|
id: Card
|
|
3
3
|
section: components
|
|
4
4
|
cssPrefix: pf-c-card
|
|
5
|
-
propComponents:
|
|
5
|
+
propComponents:
|
|
6
|
+
['Card', 'CardHeader', 'CardHeaderActionsObject', 'CardTitle', 'CardBody', 'CardFooter', 'CardExpandableContent']
|
|
6
7
|
ouia: true
|
|
7
8
|
---
|
|
8
9
|
|
|
10
|
+
import {
|
|
11
|
+
Dropdown as DropdownDeprecated,
|
|
12
|
+
DropdownItem as DropdownItemDeprecated,
|
|
13
|
+
DropdownSeparator,
|
|
14
|
+
KebabToggle
|
|
15
|
+
} from '@patternfly/react-core/deprecated';
|
|
9
16
|
import pfLogo from './pfLogo.svg';
|
|
10
17
|
import pfLogoSmall from './pf-logo-small.svg';
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
## Examples
|
|
19
|
+
## Examples
|
|
14
20
|
|
|
15
21
|
### Basic cards
|
|
16
22
|
|
|
17
23
|
Basic cards typically have a `<CardTitle>`, `<CardBody>` and `<CardFooter>`. You may omit these components as needed, but it is recommended to at least include a `<CardBody>` to provide details about the card item.
|
|
18
24
|
|
|
19
25
|
```ts file='./CardBasic.tsx'
|
|
26
|
+
|
|
20
27
|
```
|
|
21
28
|
|
|
22
29
|
### Modifiers
|
|
@@ -26,29 +33,30 @@ You can further modify the styling of the card's content by using the properties
|
|
|
26
33
|
Most modifiers can be used in combination with each other, except for `isCompact` and `isLarge`, since they are contradictory.
|
|
27
34
|
|
|
28
35
|
```ts file='./CardWithModifiers.tsx'
|
|
29
|
-
```
|
|
30
36
|
|
|
31
|
-
|
|
32
|
-
| --- | --- |
|
|
33
|
-
| isCompact | Modifies the card to include compact styling. Should not be used with isLarge. |
|
|
34
|
-
| isFlat | Modifies the card to include flat styling. |
|
|
35
|
-
| isRounded | Modifies the card to include rounded border styling. |
|
|
36
|
-
| isLarge | Modifies the card to be large. Should not be used with isCompact. |
|
|
37
|
-
| isFullHeight | Modifies the card so that it fills the total available height of its container. |
|
|
38
|
-
| isPlain | Modifies the card to include plain styling, which removes the border and background. |
|
|
37
|
+
```
|
|
39
38
|
|
|
39
|
+
| Modifier | Description |
|
|
40
|
+
| ------------ | ------------------------------------------------------------------------------------ |
|
|
41
|
+
| isCompact | Modifies the card to include compact styling. Should not be used with isLarge. |
|
|
42
|
+
| isFlat | Modifies the card to include flat styling. |
|
|
43
|
+
| isRounded | Modifies the card to include rounded border styling. |
|
|
44
|
+
| isLarge | Modifies the card to be large. Should not be used with isCompact. |
|
|
45
|
+
| isFullHeight | Modifies the card so that it fills the total available height of its container. |
|
|
46
|
+
| isPlain | Modifies the card to include plain styling, which removes the border and background. |
|
|
40
47
|
|
|
41
48
|
### Header images and actions
|
|
42
49
|
|
|
43
50
|
You can include header actions with the `actions` property of `<CardHeader>` . The following example includes an image using the [Brand](/components/brand) component, and also includes a kebab dropdown and a checkbox in `<CardHeader>` actions.
|
|
44
51
|
|
|
45
|
-
The `actions` property for `<CardHeader>` includes the `hasNoOffset` property, which is `false` by default. When `hasNoOffset` is `false`, a negative margin is applied to help align default-sized card titles with card actions.
|
|
52
|
+
The `actions` property for `<CardHeader>` includes the `hasNoOffset` property, which is `false` by default. When `hasNoOffset` is `false`, a negative margin is applied to help align default-sized card titles with card actions.
|
|
46
53
|
|
|
47
|
-
You may use `hasNoOffset` to remove this negative margin, which better aligns card actions in implementations that use large card titles or tall header images, for example.
|
|
54
|
+
You may use `hasNoOffset` to remove this negative margin, which better aligns card actions in implementations that use large card titles or tall header images, for example.
|
|
48
55
|
|
|
49
56
|
Select the "actions hasNoOffset" checkbox in the example below to illustrate this behavior.
|
|
50
57
|
|
|
51
58
|
```ts file='./CardWithImageAndActions.tsx'
|
|
59
|
+
|
|
52
60
|
```
|
|
53
61
|
|
|
54
62
|
### Title inline with images and actions
|
|
@@ -56,6 +64,7 @@ Select the "actions hasNoOffset" checkbox in the example below to illustrate thi
|
|
|
56
64
|
Moving `<CardTitle>` within the `<CardHeader>` will style it inline with any images or actions.
|
|
57
65
|
|
|
58
66
|
```ts file='./CardHeaderInCardHead.tsx'
|
|
67
|
+
|
|
59
68
|
```
|
|
60
69
|
|
|
61
70
|
### Card header without title
|
|
@@ -65,6 +74,7 @@ Card actions can be placed in the card header even without a `<CardTitle>`.
|
|
|
65
74
|
Images can also be placed in the card header without a `<CardTitle>`.
|
|
66
75
|
|
|
67
76
|
```ts file='./CardOnlyActionsInCardHead.tsx'
|
|
77
|
+
|
|
68
78
|
```
|
|
69
79
|
|
|
70
80
|
### With HTML heading element
|
|
@@ -72,6 +82,7 @@ Images can also be placed in the card header without a `<CardTitle>`.
|
|
|
72
82
|
You may use the `component` property to place the card's title within an HTML heading element.
|
|
73
83
|
|
|
74
84
|
```ts file='./CardWithHeadingElement.tsx'
|
|
85
|
+
|
|
75
86
|
```
|
|
76
87
|
|
|
77
88
|
### With multiple body sections
|
|
@@ -79,15 +90,17 @@ You may use the `component` property to place the card's title within an HTML he
|
|
|
79
90
|
You may use multiple body sections to visually separate blocks of content.
|
|
80
91
|
|
|
81
92
|
```ts file='./CardWithMultipleBodySections.tsx'
|
|
93
|
+
|
|
82
94
|
```
|
|
83
95
|
|
|
84
96
|
### With a primary body section that fills
|
|
85
97
|
|
|
86
98
|
`<CardBody>` sections will fill the available height of the card when `isFilled` equals `{true}`, which is the default value. Set `isFilled` to `{false}` to disable this behavior for one or more body sections. The remaining available height of the card will be split between any `<CardBody>` section that does not set `isFilled` to `{false}`.
|
|
87
99
|
|
|
88
|
-
A common use case of this is to set all but one body section to `isFilled={false}` so that a primary body section fills the available space of the card as seen in the example below. This example has 3 `<CardBody>` sections, two of which set `isFilled` to `{false}`. The third `<CardBody>` fills the remaining height of the card.
|
|
100
|
+
A common use case of this is to set all but one body section to `isFilled={false}` so that a primary body section fills the available space of the card as seen in the example below. This example has 3 `<CardBody>` sections, two of which set `isFilled` to `{false}`. The third `<CardBody>` fills the remaining height of the card.
|
|
89
101
|
|
|
90
102
|
```ts file='./CardWithBodySectionFills.tsx'
|
|
103
|
+
|
|
91
104
|
```
|
|
92
105
|
|
|
93
106
|
### Selectable cards
|
|
@@ -95,6 +108,7 @@ A common use case of this is to set all but one body section to `isFilled={false
|
|
|
95
108
|
Selectable cards can only be selected one at a time, and are intended for use with [primary-detail layout](/demos/primary-detail).
|
|
96
109
|
|
|
97
110
|
```ts file='./CardSelectable.tsx'
|
|
111
|
+
|
|
98
112
|
```
|
|
99
113
|
|
|
100
114
|
### Legacy selectable cards
|
|
@@ -102,6 +116,7 @@ Selectable cards can only be selected one at a time, and are intended for use wi
|
|
|
102
116
|
The following example shows a legacy implementation of selectable cards. This example uses the `isSelectable` property instead of `isSelectableRaised`, which is the current recommendation for implementation. `isSelectable` applies selectable styling, but does not apply raised styling on hover and selection as `isSelectableRaised` does.
|
|
103
117
|
|
|
104
118
|
```ts file='./CardLegacySelectable.tsx'
|
|
119
|
+
|
|
105
120
|
```
|
|
106
121
|
|
|
107
122
|
### Selectable card accessibility features
|
|
@@ -114,20 +129,22 @@ By default, this input will have an aria-label that corresponds to the `<CardTit
|
|
|
114
129
|
|
|
115
130
|
The first card passes an onChange callback to `onSelectableInputChange` to enable the selection/deselection of the associated card via checkbox input.
|
|
116
131
|
|
|
117
|
-
The second card does not set `hasSelectableInput` to true, so neither the input nor the selection state is communicated to users of assistive technologies.
|
|
132
|
+
The second card does not set `hasSelectableInput` to true, so neither the input nor the selection state is communicated to users of assistive technologies.
|
|
118
133
|
|
|
119
134
|
We recommend navigating this example using a screen reader to best understand both cards.
|
|
120
135
|
|
|
121
136
|
```ts file='./CardSelectableA11yHighlight.tsx'
|
|
137
|
+
|
|
122
138
|
```
|
|
123
139
|
|
|
124
140
|
### Expandable cards
|
|
125
141
|
|
|
126
|
-
A card can be made expandable using the `isExpanded` property. In the collapsed state, only the card header is shown, and the user can click the caret to view the rest of the card content.
|
|
142
|
+
A card can be made expandable using the `isExpanded` property. In the collapsed state, only the card header is shown, and the user can click the caret to view the rest of the card content.
|
|
127
143
|
|
|
128
144
|
Place any content that you want to be hidden within the `<CardExpandableContent>` component.
|
|
129
145
|
|
|
130
146
|
```ts file='./CardExpandable.tsx'
|
|
147
|
+
|
|
131
148
|
```
|
|
132
149
|
|
|
133
150
|
### Expandable with icon
|
|
@@ -135,4 +152,5 @@ Place any content that you want to be hidden within the `<CardExpandableContent>
|
|
|
135
152
|
An image can be placed in the card header to show users an icon beside the expansion caret.
|
|
136
153
|
|
|
137
154
|
```ts file='./CardExpandableWithIcon.tsx'
|
|
155
|
+
|
|
138
156
|
```
|
|
@@ -6,12 +6,14 @@ import {
|
|
|
6
6
|
CardBody,
|
|
7
7
|
CardFooter,
|
|
8
8
|
CardExpandableContent,
|
|
9
|
-
Checkbox
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Checkbox
|
|
10
|
+
} from '@patternfly/react-core';
|
|
11
|
+
import {
|
|
12
|
+
Dropdown as DropdownDeprecated,
|
|
13
|
+
DropdownItem as DropdownItemDeprecated,
|
|
12
14
|
DropdownSeparator,
|
|
13
15
|
KebabToggle
|
|
14
|
-
} from '@patternfly/react-core';
|
|
16
|
+
} from '@patternfly/react-core/deprecated';
|
|
15
17
|
|
|
16
18
|
export const CardExpandable: React.FunctionComponent = () => {
|
|
17
19
|
const [isOpen, setIsOpen] = React.useState<boolean>(false);
|
|
@@ -38,26 +40,26 @@ export const CardExpandable: React.FunctionComponent = () => {
|
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
const dropdownItems = [
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
+
<DropdownItemDeprecated key="link">Link</DropdownItemDeprecated>,
|
|
44
|
+
<DropdownItemDeprecated key="action" component="button">
|
|
43
45
|
Action
|
|
44
|
-
</
|
|
45
|
-
<
|
|
46
|
+
</DropdownItemDeprecated>,
|
|
47
|
+
<DropdownItemDeprecated key="disabled link" isDisabled>
|
|
46
48
|
Disabled Link
|
|
47
|
-
</
|
|
48
|
-
<
|
|
49
|
+
</DropdownItemDeprecated>,
|
|
50
|
+
<DropdownItemDeprecated key="disabled action" isDisabled component="button">
|
|
49
51
|
Disabled Action
|
|
50
|
-
</
|
|
52
|
+
</DropdownItemDeprecated>,
|
|
51
53
|
<DropdownSeparator key="separator" />,
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
+
<DropdownItemDeprecated key="separated link">Separated Link</DropdownItemDeprecated>,
|
|
55
|
+
<DropdownItemDeprecated key="separated action" component="button">
|
|
54
56
|
Separated Action
|
|
55
|
-
</
|
|
57
|
+
</DropdownItemDeprecated>
|
|
56
58
|
];
|
|
57
59
|
|
|
58
60
|
const headerActions = (
|
|
59
61
|
<>
|
|
60
|
-
<
|
|
62
|
+
<DropdownDeprecated
|
|
61
63
|
onSelect={onSelect}
|
|
62
64
|
toggle={<KebabToggle onToggle={(_event: any, isOpen: boolean) => setIsOpen(isOpen)} />}
|
|
63
65
|
isOpen={isOpen}
|
|
@@ -88,7 +90,7 @@ export const CardExpandable: React.FunctionComponent = () => {
|
|
|
88
90
|
</div>
|
|
89
91
|
<Card id="expandable-card" isExpanded={isExpanded}>
|
|
90
92
|
<CardHeader
|
|
91
|
-
actions={{actions: headerActions}}
|
|
93
|
+
actions={{ actions: headerActions }}
|
|
92
94
|
onExpand={onExpand}
|
|
93
95
|
isToggleRightAligned={isToggleRightAligned}
|
|
94
96
|
toggleButtonProps={{
|