@patternfly/react-core 5.0.0-alpha.46 → 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 +10 -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/Wizard/examples/WizardWithinModal.tsx +9 -1
- 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
|
@@ -2,19 +2,59 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Dropdown = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const react_styles_1 = require("@patternfly/react-styles");
|
|
7
|
+
const Menu_1 = require("../Menu");
|
|
8
|
+
const Popper_1 = require("../../helpers/Popper/Popper");
|
|
9
9
|
const helpers_1 = require("../../helpers");
|
|
10
|
-
const
|
|
11
|
-
var { onSelect,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const DropdownBase = (_a) => {
|
|
11
|
+
var { children, className, onSelect, isOpen, toggle, onOpenChange, isPlain, isScrollable, innerRef, ouiaId, ouiaSafe = true, zIndex = 9999, popperProps } = _a, props = tslib_1.__rest(_a, ["children", "className", "onSelect", "isOpen", "toggle", "onOpenChange", "isPlain", "isScrollable", "innerRef", "ouiaId", "ouiaSafe", "zIndex", "popperProps"]);
|
|
12
|
+
const localMenuRef = react_1.default.useRef();
|
|
13
|
+
const toggleRef = react_1.default.useRef();
|
|
14
|
+
const containerRef = react_1.default.useRef();
|
|
15
|
+
const ouiaProps = (0, helpers_1.useOUIAProps)(exports.Dropdown.displayName, ouiaId, ouiaSafe);
|
|
16
|
+
const menuRef = innerRef || localMenuRef;
|
|
17
|
+
react_1.default.useEffect(() => {
|
|
18
|
+
const handleMenuKeys = (event) => {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
// Close the menu on tab or escape if onOpenChange is provided
|
|
21
|
+
if ((isOpen && onOpenChange && ((_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) ||
|
|
22
|
+
((_b = toggleRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target))) {
|
|
23
|
+
if (event.key === 'Escape' || event.key === 'Tab') {
|
|
24
|
+
onOpenChange(false);
|
|
25
|
+
(_c = toggleRef.current) === null || _c === void 0 ? void 0 : _c.focus();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const handleClick = (event) => {
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
// toggle was clicked open via keyboard, focus on first menu item
|
|
32
|
+
if (isOpen && ((_a = toggleRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) && event.detail === 0) {
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
var _a;
|
|
35
|
+
const firstElement = (_a = menuRef === null || menuRef === void 0 ? void 0 : menuRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('li button:not(:disabled),li input:not(:disabled)');
|
|
36
|
+
firstElement && firstElement.focus();
|
|
37
|
+
}, 0);
|
|
38
|
+
}
|
|
39
|
+
// If the event is not on the toggle and onOpenChange callback is provided, close the menu
|
|
40
|
+
if (isOpen && onOpenChange && !((_b = toggleRef === null || toggleRef === void 0 ? void 0 : toggleRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target))) {
|
|
41
|
+
if (isOpen && !((_c = menuRef.current) === null || _c === void 0 ? void 0 : _c.contains(event.target))) {
|
|
42
|
+
onOpenChange(false);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
window.addEventListener('keydown', handleMenuKeys);
|
|
47
|
+
window.addEventListener('click', handleClick);
|
|
48
|
+
return () => {
|
|
49
|
+
window.removeEventListener('keydown', handleMenuKeys);
|
|
50
|
+
window.removeEventListener('click', handleClick);
|
|
51
|
+
};
|
|
52
|
+
}, [isOpen, menuRef, onOpenChange]);
|
|
53
|
+
const menu = (react_1.default.createElement(Menu_1.Menu, Object.assign({ className: (0, react_styles_1.css)(className), ref: menuRef, onSelect: (event, itemId) => onSelect && onSelect(event, itemId), isPlain: isPlain, isScrollable: isScrollable }, props),
|
|
54
|
+
react_1.default.createElement(Menu_1.MenuContent, null, children)));
|
|
55
|
+
return (react_1.default.createElement("div", Object.assign({ ref: containerRef }, ouiaProps),
|
|
56
|
+
react_1.default.createElement(Popper_1.Popper, Object.assign({ trigger: toggle(toggleRef), triggerRef: toggleRef, popper: menu, popperRef: menuRef, appendTo: containerRef.current || undefined, isVisible: isOpen, zIndex: zIndex }, popperProps))));
|
|
17
57
|
};
|
|
18
|
-
exports.Dropdown =
|
|
58
|
+
exports.Dropdown = react_1.default.forwardRef((props, ref) => (react_1.default.createElement(DropdownBase, Object.assign({ innerRef: ref }, props))));
|
|
19
59
|
exports.Dropdown.displayName = 'Dropdown';
|
|
20
60
|
//# sourceMappingURL=Dropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2DAA+C;AAC/C,kCAAuD;AACvD,wDAAkE;AAClE,2CAAwD;AAgCxD,MAAM,YAAY,GAA2C,CAAC,EAe9C,EAAE,EAAE;QAf0C,EAC5D,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,MAAM,EACN,MAAM,EACN,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,GAAG,IAAI,EACf,MAAM,GAAG,IAAI,EACb,WAAW,OAEG,EADX,KAAK,sBAdoD,+JAe7D,CADS;IAER,MAAM,YAAY,GAAG,eAAK,CAAC,MAAM,EAAkB,CAAC;IACpD,MAAM,SAAS,GAAG,eAAK,CAAC,MAAM,EAAqB,CAAC;IACpD,MAAM,YAAY,GAAG,eAAK,CAAC,MAAM,EAAkB,CAAC;IACpD,MAAM,SAAS,GAAG,IAAA,sBAAY,EAAC,gBAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAEvE,MAAM,OAAO,GAAI,QAA4C,IAAI,YAAY,CAAC;IAC9E,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,cAAc,GAAG,CAAC,KAAoB,EAAE,EAAE;;YAC9C,8DAA8D;YAC9D,IACE,CAAC,MAAM,IAAI,YAAY,KAAI,MAAA,OAAO,CAAC,OAAO,0CAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAAA,CAAC;iBAC3E,MAAA,SAAS,CAAC,OAAO,0CAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAAA,EACjD;gBACA,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,GAAG,KAAK,KAAK,EAAE;oBACjD,YAAY,CAAC,KAAK,CAAC,CAAC;oBACpB,MAAA,SAAS,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;iBAC5B;aACF;QACH,CAAC,CAAC;QAEF,MAAM,WAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;;YACxC,iEAAiE;YACjE,IAAI,MAAM,KAAI,MAAA,SAAS,CAAC,OAAO,0CAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;gBACrF,UAAU,CAAC,GAAG,EAAE;;oBACd,MAAM,YAAY,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,aAAa,CAAC,kDAAkD,CAAC,CAAC;oBACzG,YAAY,IAAK,YAA4B,CAAC,KAAK,EAAE,CAAC;gBACxD,CAAC,EAAE,CAAC,CAAC,CAAC;aACP;YAED,0FAA0F;YAC1F,IAAI,MAAM,IAAI,YAAY,IAAI,CAAC,CAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,0CAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAAA,EAAE;gBACjF,IAAI,MAAM,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAAA,EAAE;oBAC9D,YAAY,CAAC,KAAK,CAAC,CAAC;iBACrB;aACF;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACnD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAE9C,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;YACtD,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACnD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;IAEpC,MAAM,IAAI,GAAG,CACX,8BAAC,WAAI,kBACH,SAAS,EAAE,IAAA,kBAAG,EAAC,SAAS,CAAC,EACzB,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,EAChE,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,IACtB,KAAK;QAET,8BAAC,kBAAW,QAAE,QAAQ,CAAe,CAChC,CACR,CAAC;IACF,OAAO,CACL,qDAAK,GAAG,EAAE,YAAY,IAAM,SAAS;QACnC,8BAAC,eAAM,kBACL,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,EAC1B,UAAU,EAAE,SAAS,EACrB,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,YAAY,CAAC,OAAO,IAAI,SAAS,EAC3C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,IACV,WAAW,EACf,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,QAAQ,GAAG,eAAK,CAAC,UAAU,CAAC,CAAC,KAAoB,EAAE,GAAmB,EAAE,EAAE,CAAC,CACtF,8BAAC,YAAY,kBAAC,QAAQ,EAAE,GAAG,IAAM,KAAK,EAAI,CAC3C,CAAC,CAAC;AACH,gBAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuGroupProps } from '../Menu';
|
|
3
|
+
export interface DropdownGroupProps extends Omit<MenuGroupProps, 'ref'> {
|
|
4
|
+
/** Anything which can be rendered in a dropdown group. */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Classes applied to root element of dropdown group */
|
|
6
7
|
className?: string;
|
|
7
|
-
/**
|
|
8
|
-
label?:
|
|
8
|
+
/** Label of the dropdown group */
|
|
9
|
+
label?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare const DropdownGroup: React.FunctionComponent<DropdownGroupProps>;
|
|
11
12
|
//# sourceMappingURL=DropdownGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAa,MAAM,SAAS,CAAC;AAEpD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC;IACrE,0DAA0D;IAC1D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAUrE,CAAC"}
|
|
@@ -2,17 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DropdownGroup = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const react_styles_1 = require("@patternfly/react-styles");
|
|
7
|
-
const
|
|
7
|
+
const Menu_1 = require("../Menu");
|
|
8
8
|
const DropdownGroup = (_a) => {
|
|
9
|
-
var { children
|
|
10
|
-
return (
|
|
11
|
-
const SectionComponent = sectionComponent;
|
|
12
|
-
return (React.createElement(SectionComponent, Object.assign({ className: (0, react_styles_1.css)(sectionClass, className) }, props),
|
|
13
|
-
label && (React.createElement("h1", { className: (0, react_styles_1.css)(sectionTitleClass), "aria-hidden": true }, label)),
|
|
14
|
-
React.createElement("ul", { role: "none" }, children)));
|
|
15
|
-
}));
|
|
9
|
+
var { children, className, label, labelHeadingLevel = 'h1' } = _a, props = tslib_1.__rest(_a, ["children", "className", "label", "labelHeadingLevel"]);
|
|
10
|
+
return (react_1.default.createElement(Menu_1.MenuGroup, Object.assign({ className: (0, react_styles_1.css)(className), label: label, labelHeadingLevel: labelHeadingLevel }, props), children));
|
|
16
11
|
};
|
|
17
12
|
exports.DropdownGroup = DropdownGroup;
|
|
18
13
|
exports.DropdownGroup.displayName = 'DropdownGroup';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownGroup.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownGroup.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"DropdownGroup.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownGroup.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2DAA+C;AAC/C,kCAAoD;AAW7C,MAAM,aAAa,GAAgD,CAAC,EAMtD,EAAE,EAAE;QANkD,EACzE,QAAQ,EACR,SAAS,EACT,KAAK,EACL,iBAAiB,GAAG,IAAI,OAEL,EADhB,KAAK,sBALiE,uDAM1E,CADS;IACgB,OAAA,CACxB,8BAAC,gBAAS,kBAAC,SAAS,EAAE,IAAA,kBAAG,EAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,IAAM,KAAK,GAChG,QAAQ,CACC,CACb,CAAA;CAAA,CAAC;AAVW,QAAA,aAAa,iBAUxB;AACF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
|
|
@@ -1,52 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuItemProps } from '../Menu';
|
|
3
3
|
import { OUIAProps } from '../../helpers';
|
|
4
|
-
export interface DropdownItemProps extends Omit<
|
|
5
|
-
/** Anything which can be rendered
|
|
4
|
+
export interface DropdownItemProps extends Omit<MenuItemProps, 'ref'>, OUIAProps {
|
|
5
|
+
/** Anything which can be rendered in a dropdown item */
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
/** Classes applied to root element of dropdown item */
|
|
8
8
|
className?: string;
|
|
9
|
-
/**
|
|
10
|
-
listItemClassName?: string;
|
|
11
|
-
/**
|
|
12
|
-
* A ReactElement to render, or a string to use as the component tag.
|
|
13
|
-
* Example: component={<Link to="/components/alert/">Alert</Link>}
|
|
14
|
-
* Example: component="button"
|
|
15
|
-
* If React.isValidElement(component) the className prop will be injected unless styleChildren="false"
|
|
16
|
-
*/
|
|
17
|
-
component?: React.ReactNode;
|
|
18
|
-
/** ID for the component element */
|
|
19
|
-
componentID?: string;
|
|
20
|
-
/** Whether to set className on component when React.isValidElement(component) */
|
|
21
|
-
styleChildren?: boolean;
|
|
22
|
-
/** Render dropdown item as disabled option */
|
|
23
|
-
isDisabled?: boolean;
|
|
24
|
-
/** Render dropdown item as aria-disabled option */
|
|
25
|
-
isAriaDisabled?: boolean;
|
|
26
|
-
/** Render dropdown item as non-interactive item */
|
|
27
|
-
isPlainText?: boolean;
|
|
28
|
-
/** Default hyperlink location */
|
|
29
|
-
href?: string;
|
|
30
|
-
/** Tooltip to display when hovered over the item */
|
|
31
|
-
tooltip?: React.ReactNode;
|
|
32
|
-
/** Additional tooltip props forwarded to the Tooltip component */
|
|
33
|
-
tooltipProps?: any;
|
|
34
|
-
/** Additional node to include alongside item within the <li> */
|
|
35
|
-
additionalChild?: React.ReactNode;
|
|
36
|
-
/** Custom item rendering that receives the DropdownContext */
|
|
37
|
-
customChild?: React.ReactNode;
|
|
38
|
-
/** tabIndex to use, null to unset it */
|
|
39
|
-
tabIndex?: number | null;
|
|
40
|
-
/** An image to display within the DropdownItem, appearing before any component children */
|
|
41
|
-
icon?: React.ReactNode;
|
|
42
|
-
/** Initial focus on the item when the menu is opened (Note: Only applicable to one of the items) */
|
|
43
|
-
autoFocus?: boolean;
|
|
44
|
-
/** A short description of the dropdown item, displayed under the dropdown item content */
|
|
9
|
+
/** Description of the dropdown item */
|
|
45
10
|
description?: React.ReactNode;
|
|
11
|
+
/** Identifies the component in the dropdown onSelect callback */
|
|
12
|
+
itemId?: any;
|
|
46
13
|
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
47
14
|
ouiaId?: number | string;
|
|
48
15
|
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
49
16
|
ouiaSafe?: boolean;
|
|
50
17
|
}
|
|
51
|
-
export declare const DropdownItem: React.FunctionComponent<
|
|
18
|
+
export declare const DropdownItem: React.FunctionComponent<MenuItemProps>;
|
|
52
19
|
//# sourceMappingURL=DropdownItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAY,MAAM,SAAS,CAAC;AAClD,OAAO,EAAgB,SAAS,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,SAAS;IAC9E,wDAAwD;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,iEAAiE;IACjE,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,iLAAiL;IACjL,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAe/D,CAAC"}
|
|
@@ -2,17 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DropdownItem = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const react_styles_1 = require("@patternfly/react-styles");
|
|
7
|
+
const Menu_1 = require("../Menu");
|
|
8
8
|
const helpers_1 = require("../../helpers");
|
|
9
9
|
const DropdownItem = (_a) => {
|
|
10
|
-
var { children, className,
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
|
-
ref, // Types of Ref are different for React.FunctionComponent vs React.Component
|
|
13
|
-
additionalChild, customChild, tabIndex = -1, icon = null, autoFocus, description = null, styleChildren, ouiaId, ouiaSafe } = _a, props = tslib_1.__rest(_a, ["children", "className", "component", "isDisabled", "isAriaDisabled", "isPlainText", "href", "tooltip", "tooltipProps", "listItemClassName", "onClick", "ref", "additionalChild", "customChild", "tabIndex", "icon", "autoFocus", "description", "styleChildren", "ouiaId", "ouiaSafe"]);
|
|
10
|
+
var { children, className, description, itemId, ouiaId, ouiaSafe } = _a, props = tslib_1.__rest(_a, ["children", "className", "description", "itemId", "ouiaId", "ouiaSafe"]);
|
|
14
11
|
const ouiaProps = (0, helpers_1.useOUIAProps)(exports.DropdownItem.displayName, ouiaId, ouiaSafe);
|
|
15
|
-
return (
|
|
12
|
+
return (react_1.default.createElement(Menu_1.MenuItem, Object.assign({ className: (0, react_styles_1.css)(className), description: description, itemId: itemId }, ouiaProps, props), children));
|
|
16
13
|
};
|
|
17
14
|
exports.DropdownItem = DropdownItem;
|
|
18
15
|
exports.DropdownItem.displayName = 'DropdownItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItem.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"DropdownItem.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2DAA+C;AAC/C,kCAAkD;AAClD,2CAAwD;AAiBjD,MAAM,YAAY,GAA2C,CAAC,EAQjD,EAAE,EAAE;QAR6C,EACnE,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,EACN,MAAM,EACN,QAAQ,OAEU,EADf,KAAK,sBAP2D,wEAQpE,CADS;IAER,MAAM,SAAS,GAAG,IAAA,sBAAY,EAAC,oBAAY,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3E,OAAO,CACL,8BAAC,eAAQ,kBAAC,SAAS,EAAE,IAAA,kBAAG,EAAC,SAAS,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,IAAM,SAAS,EAAM,KAAK,GACpG,QAAQ,CACA,CACZ,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,YAAY,gBAevB;AACF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MenuListProps } from '
|
|
2
|
+
import { MenuListProps } from '../Menu';
|
|
3
3
|
export interface DropdownListProps extends MenuListProps {
|
|
4
4
|
/** Anything which can be rendered in a dropdown list */
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownList.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAY,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,wDAAwD;IACxD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CAQ/D,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.DropdownList = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const react_styles_1 = require("@patternfly/react-styles");
|
|
7
|
-
const Menu_1 = require("
|
|
7
|
+
const Menu_1 = require("../Menu");
|
|
8
8
|
const DropdownList = (_a) => {
|
|
9
9
|
var { children, className } = _a, props = tslib_1.__rest(_a, ["children", "className"]);
|
|
10
10
|
return (react_1.default.createElement(Menu_1.MenuList, Object.assign({ className: (0, react_styles_1.css)(className) }, props), children));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownList.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/DropdownList.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,2DAA+C;AAC/C,kCAAkD;AAS3C,MAAM,YAAY,GAA2C,CAAC,EAIjD,EAAE,EAAE;QAJ6C,EACnE,QAAQ,EACR,SAAS,OAES,EADf,KAAK,sBAH2D,yBAIpE,CADS;IACe,OAAA,CACvB,8BAAC,eAAQ,kBAAC,SAAS,EAAE,IAAA,kBAAG,EAAC,SAAS,CAAC,IAAM,KAAK,GAC3C,QAAQ,CACA,CACZ,CAAA;CAAA,CAAC;AARW,QAAA,YAAY,gBAQvB;AACF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
export * from './Dropdown';
|
|
2
|
-
export * from './DropdownMenu';
|
|
3
|
-
export * from './DropdownWithContext';
|
|
4
|
-
export * from './dropdownConstants';
|
|
5
2
|
export * from './DropdownGroup';
|
|
6
3
|
export * from './DropdownItem';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './BadgeToggle';
|
|
9
|
-
export * from './KebabToggle';
|
|
10
|
-
export * from './DropdownToggle';
|
|
11
|
-
export * from './DropdownToggleCheckbox';
|
|
12
|
-
export * from './DropdownToggleAction';
|
|
4
|
+
export * from './DropdownList';
|
|
13
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
|
@@ -2,15 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./Dropdown"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./DropdownMenu"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./DropdownWithContext"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./dropdownConstants"), exports);
|
|
8
5
|
tslib_1.__exportStar(require("./DropdownGroup"), exports);
|
|
9
6
|
tslib_1.__exportStar(require("./DropdownItem"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./
|
|
11
|
-
tslib_1.__exportStar(require("./BadgeToggle"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./KebabToggle"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./DropdownToggle"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./DropdownToggleCheckbox"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./DropdownToggleAction"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./DropdownList"), exports);
|
|
16
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,0DAAgC;AAChC,yDAA+B;AAC/B,yDAA+B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DropdownItemProps } from '
|
|
2
|
+
import { DropdownItemProps } from '../Dropdown';
|
|
3
3
|
export interface OverflowMenuDropdownItemProps extends Omit<DropdownItemProps, 'ref'> {
|
|
4
4
|
/** Indicates when a dropdown item shows and hides the corresponding list item */
|
|
5
5
|
isShared?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverflowMenuDropdownItem.d.ts","sourceRoot":"","sources":["../../../../src/components/OverflowMenu/OverflowMenuDropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAgB,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OverflowMenuDropdownItem.d.ts","sourceRoot":"","sources":["../../../../src/components/OverflowMenu/OverflowMenuDropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAgB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG9D,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC;IACnF,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,iBAAiB,CAAC,6BAA6B,CAe3F,CAAC"}
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OverflowMenuDropdownItem = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const Dropdown_1 = require("
|
|
6
|
+
const Dropdown_1 = require("../Dropdown");
|
|
7
7
|
const OverflowMenuContext_1 = require("./OverflowMenuContext");
|
|
8
8
|
const OverflowMenuDropdownItem = (_a) => {
|
|
9
9
|
var { children, isShared = false, itemId } = _a, additionalProps = tslib_1.__rest(_a, ["children", "isShared", "itemId"]);
|
|
10
|
-
return (React.createElement(OverflowMenuContext_1.OverflowMenuContext.Consumer, null, value => (!isShared || value.isBelowBreakpoint) && (React.createElement(Dropdown_1.DropdownItem, Object.assign({ component: "button", itemId: itemId }, additionalProps), children))));
|
|
10
|
+
return (React.createElement(OverflowMenuContext_1.OverflowMenuContext.Consumer, null, (value) => (!isShared || value.isBelowBreakpoint) && (React.createElement(Dropdown_1.DropdownItem, Object.assign({ component: "button", itemId: itemId }, additionalProps), children))));
|
|
11
11
|
};
|
|
12
12
|
exports.OverflowMenuDropdownItem = OverflowMenuDropdownItem;
|
|
13
13
|
exports.OverflowMenuDropdownItem.displayName = 'OverflowMenuDropdownItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverflowMenuDropdownItem.js","sourceRoot":"","sources":["../../../../src/components/OverflowMenu/OverflowMenuDropdownItem.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"OverflowMenuDropdownItem.js","sourceRoot":"","sources":["../../../../src/components/OverflowMenu/OverflowMenuDropdownItem.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,0CAA8D;AAC9D,+DAA4D;AASrD,MAAM,wBAAwB,GAA2D,CAAC,EAKjE,EAAE,EAAE;QAL6D,EAC/F,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,MAAM,OAEwB,EAD3B,eAAe,sBAJ6E,kCAKhG,CADmB;IACiB,OAAA,CACnC,oBAAC,yCAAmB,CAAC,QAAQ,QAC1B,CAAC,KAAK,EAAE,EAAE,CACT,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,iBAAiB,CAAC,IAAI,CACxC,oBAAC,uBAAY,kBAAC,SAAS,EAAC,QAAQ,EAAC,MAAM,EAAE,MAAM,IAAM,eAAe,GACjE,QAAQ,CACI,CAChB,CAE0B,CAChC,CAAA;CAAA,CAAC;AAfW,QAAA,wBAAwB,4BAenC;AACF,gCAAwB,CAAC,WAAW,GAAG,0BAA0B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DropdownToggleProps } from './DropdownToggle';
|
|
3
|
-
import { BadgeProps } from '
|
|
3
|
+
import { BadgeProps } from '../../../components/Badge';
|
|
4
4
|
export interface BadgeToggleProps extends DropdownToggleProps {
|
|
5
5
|
/** HTML ID of dropdown toggle */
|
|
6
6
|
id?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeToggle.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/components/Dropdown/BadgeToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAS,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,iCAAiC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gCAAgC;IAChC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAC/G,MAAM,EAAE,OAAO,KACZ,IAAI,CAAC;IACV,iCAAiC;IACjC,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,uBAAuB;IACvB,UAAU,CAAC,EAAE,MAAM,WAAW,CAAC;IAC/B,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gCAAgC;IAChC,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAuCjE,CAAC"}
|
|
@@ -7,7 +7,7 @@ const react_styles_1 = require("@patternfly/react-styles");
|
|
|
7
7
|
const dropdown_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Dropdown/dropdown"));
|
|
8
8
|
const caret_down_icon_1 = tslib_1.__importDefault(require('@patternfly/react-icons/dist/js/icons/caret-down-icon'));
|
|
9
9
|
const Toggle_1 = require("./Toggle");
|
|
10
|
-
const Badge_1 = require("
|
|
10
|
+
const Badge_1 = require("../../../components/Badge");
|
|
11
11
|
const BadgeToggle = (_a) => {
|
|
12
12
|
var { id = '', children = null, badgeProps = { isRead: true }, className = '', isOpen = false, 'aria-label': ariaLabel = 'Actions', parentRef = null, getMenuRef = null, isActive = false, isPlain = null, isDisabled = false, bubbleEvent = false, onToggle = () => undefined,
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeToggle.js","sourceRoot":"","sources":["../../../../../src/deprecated/components/Dropdown/BadgeToggle.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,iHAA+E;AAE/E,oHAAmF;AACnF,qCAAkC;AAClC,qDAA8D;AAoCvD,MAAM,WAAW,GAA8C,CAAC,EAiBpD,EAAE,EAAE;QAjBgD,EACrE,EAAE,GAAG,EAAE,EACP,QAAQ,GAAG,IAAI,EACf,UAAU,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,EAC7B,SAAS,GAAG,EAAE,EACd,MAAM,GAAG,KAAK,EACd,YAAY,EAAE,SAAS,GAAG,SAAS,EACnC,SAAS,GAAG,IAAI,EAChB,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,IAAI,EACd,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,KAAK,EACnB,QAAQ,GAAG,GAAG,EAAE,CAAC,SAAiB;IAClC,6DAA6D;IAC7D,GAAG,OAEc,EAFZ,4EAA4E;IAC9E,KAAK,sBAhB6D,uKAiBtE,CADS;IACc,OAAA,CACtB,oBAAC,eAAM,kBACL,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,gBACF,SAAS,EACrB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,IAAI,IAAI,EACxB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,IACpB,KAAK;QAET,oBAAC,aAAK,oBAAK,UAAU;YAClB,QAAQ;YACT,8BAAM,SAAS,EAAE,IAAA,kBAAG,EAAC,kBAAM,CAAC,kBAAkB,CAAC;gBAC7C,oBAAC,yBAAa,OAAG,CACZ,CACD,CACD,CACV,CAAA;CAAA,CAAC;AAvCW,QAAA,WAAW,eAuCtB;AACF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DropdownPosition, DropdownDirection, DropdownContext } from './dropdownConstants';
|
|
3
|
+
import { OUIAProps } from '../../../helpers';
|
|
4
|
+
export interface DropdownProps extends React.HTMLProps<HTMLDivElement>, OUIAProps {
|
|
5
|
+
/** Anything which can be rendered in a dropdown */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** Classes applied to root element of dropdown */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Array of DropdownItem nodes that will be rendered in the dropdown Menu list */
|
|
10
|
+
dropdownItems?: any[];
|
|
11
|
+
/** Flag to indicate if menu is opened */
|
|
12
|
+
isOpen?: boolean;
|
|
13
|
+
/** Display the toggle with no border or background */
|
|
14
|
+
isPlain?: boolean;
|
|
15
|
+
/** Display the toggle in text only mode */
|
|
16
|
+
isText?: boolean;
|
|
17
|
+
/** Flag indicating that the dropdown should expand to full height */
|
|
18
|
+
isFullHeight?: boolean;
|
|
19
|
+
/** Indicates where menu will be aligned horizontally */
|
|
20
|
+
position?: DropdownPosition | 'right' | 'left';
|
|
21
|
+
/** Indicates how the menu will align at screen size breakpoints. Default alignment is set via the position property. */
|
|
22
|
+
alignments?: {
|
|
23
|
+
sm?: 'right' | 'left';
|
|
24
|
+
md?: 'right' | 'left';
|
|
25
|
+
lg?: 'right' | 'left';
|
|
26
|
+
xl?: 'right' | 'left';
|
|
27
|
+
'2xl'?: 'right' | 'left';
|
|
28
|
+
};
|
|
29
|
+
/** Display menu above or below dropdown toggle */
|
|
30
|
+
direction?: DropdownDirection | 'up' | 'down';
|
|
31
|
+
/** Minimum width of the dropdown menu. If set to "trigger", the minimum width will be set to the toggle width. */
|
|
32
|
+
minWidth?: string | 'trigger';
|
|
33
|
+
/** The container to append the menu to. Defaults to 'inline'.
|
|
34
|
+
* If your menu is being cut off you can append it to an element higher up the DOM tree.
|
|
35
|
+
* Some examples:
|
|
36
|
+
* menuAppendTo="parent"
|
|
37
|
+
* menuAppendTo={() => document.body}
|
|
38
|
+
* menuAppendTo={document.getElementById('target')}
|
|
39
|
+
*/
|
|
40
|
+
menuAppendTo?: HTMLElement | (() => HTMLElement) | 'inline' | 'parent';
|
|
41
|
+
/** Flag to indicate if dropdown has groups */
|
|
42
|
+
isGrouped?: boolean;
|
|
43
|
+
/** Toggle for the dropdown, examples: <DropdownToggle> or <DropdownToggleCheckbox> */
|
|
44
|
+
toggle: React.ReactElement<any>;
|
|
45
|
+
/** Function callback called when user selects item */
|
|
46
|
+
onSelect?: (event?: React.SyntheticEvent<HTMLDivElement>) => void;
|
|
47
|
+
/** Flag to indicate if the first dropdown item should gain initial focus, set false when adding
|
|
48
|
+
* a specific auto-focus item (like a current selection) otherwise leave as true
|
|
49
|
+
*/
|
|
50
|
+
autoFocus?: boolean;
|
|
51
|
+
/** Props for extreme customization of dropdown */
|
|
52
|
+
contextProps?: typeof DropdownContext;
|
|
53
|
+
/** Flag for indicating that the dropdown menu should automatically flip vertically when
|
|
54
|
+
* it reaches the boundary. This prop can only be used when the dropdown component is not
|
|
55
|
+
* appended inline, e.g. `menuAppendTo="parent"`
|
|
56
|
+
*/
|
|
57
|
+
isFlipEnabled?: boolean;
|
|
58
|
+
/** z-index of the dropdown when menuAppendTo is not inline. */
|
|
59
|
+
zIndex?: number;
|
|
60
|
+
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
61
|
+
ouiaId?: number | string;
|
|
62
|
+
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
63
|
+
ouiaSafe?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare const Dropdown: React.FunctionComponent<DropdownProps>;
|
|
66
|
+
//# sourceMappingURL=Dropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3F,OAAO,EAAE,SAAS,EAAa,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,SAAS;IAC/E,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;IACtB,yCAAyC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAC;IAC/C,wHAAwH;IACxH,UAAU,CAAC,EAAE;QACX,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACtB,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACtB,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACtB,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KAC1B,CAAC;IACF,kDAAkD;IAClD,SAAS,CAAC,EAAE,iBAAiB,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C,kHAAkH;IAClH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,WAAW,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvE,8CAA8C;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAChC,sDAAsD;IACtD,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAClE;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,eAAe,CAAC;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,iLAAiL;IACjL,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,aAAa,CA6C3D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Dropdown = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const dropdown_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Dropdown/dropdown"));
|
|
7
|
+
const dropdownConstants_1 = require("./dropdownConstants");
|
|
8
|
+
const DropdownWithContext_1 = require("./DropdownWithContext");
|
|
9
|
+
const helpers_1 = require("../../../helpers");
|
|
10
|
+
const Dropdown = (_a) => {
|
|
11
|
+
var { onSelect,
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
+
ref, // Types of Ref are different for React.FunctionComponent vs React.Component
|
|
14
|
+
ouiaId, ouiaSafe, alignments, contextProps, minWidth, menuAppendTo = 'inline', isFlipEnabled = true, zIndex = 9999 } = _a, props = tslib_1.__rest(_a, ["onSelect", "ref", "ouiaId", "ouiaSafe", "alignments", "contextProps", "minWidth", "menuAppendTo", "isFlipEnabled", "zIndex"]);
|
|
15
|
+
return (React.createElement(dropdownConstants_1.DropdownContext.Provider, { value: Object.assign({ onSelect: (event) => onSelect && onSelect(event), toggleTextClass: dropdown_1.default.dropdownToggleText, toggleIconClass: dropdown_1.default.dropdownToggleImage, toggleIndicatorClass: dropdown_1.default.dropdownToggleIcon, menuClass: dropdown_1.default.dropdownMenu, itemClass: dropdown_1.default.dropdownMenuItem, toggleClass: dropdown_1.default.dropdownToggle, baseClass: dropdown_1.default.dropdown, baseComponent: 'div', sectionClass: dropdown_1.default.dropdownGroup, sectionTitleClass: dropdown_1.default.dropdownGroupTitle, sectionComponent: 'section', disabledClass: dropdown_1.default.modifiers.disabled, plainTextClass: dropdown_1.default.modifiers.text, ouiaId: (0, helpers_1.useOUIAId)(exports.Dropdown.displayName, ouiaId), ouiaSafe, ouiaComponentType: exports.Dropdown.displayName, alignments }, contextProps) },
|
|
16
|
+
React.createElement(DropdownWithContext_1.DropdownWithContext, Object.assign({ menuAppendTo: menuAppendTo, isFlipEnabled: isFlipEnabled, zIndex: zIndex, minWidth: minWidth }, props))));
|
|
17
|
+
};
|
|
18
|
+
exports.Dropdown = Dropdown;
|
|
19
|
+
exports.Dropdown.displayName = 'Dropdown';
|
|
20
|
+
//# sourceMappingURL=Dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../../../src/deprecated/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,iHAA+E;AAC/E,2DAA2F;AAC3F,+DAA4D;AAC5D,8CAAwD;AAgEjD,MAAM,QAAQ,GAA2C,CAAC,EAajD,EAAE,EAAE;QAb6C,EAC/D,QAAQ;IACR,6DAA6D;IAC7D,GAAG,EAAE,4EAA4E;IACjF,MAAM,EACN,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,YAAY,GAAG,QAAQ,EACvB,aAAa,GAAG,IAAI,EACpB,MAAM,GAAG,IAAI,OAEC,EADX,KAAK,sBAZuD,8HAahE,CADS;IACW,OAAA,CACnB,oBAAC,mCAAe,CAAC,QAAQ,IACvB,KAAK,kBACH,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,EAChD,eAAe,EAAE,kBAAM,CAAC,kBAAkB,EAC1C,eAAe,EAAE,kBAAM,CAAC,mBAAmB,EAC3C,oBAAoB,EAAE,kBAAM,CAAC,kBAAkB,EAC/C,SAAS,EAAE,kBAAM,CAAC,YAAY,EAC9B,SAAS,EAAE,kBAAM,CAAC,gBAAgB,EAClC,WAAW,EAAE,kBAAM,CAAC,cAAc,EAClC,SAAS,EAAE,kBAAM,CAAC,QAAQ,EAC1B,aAAa,EAAE,KAAK,EACpB,YAAY,EAAE,kBAAM,CAAC,aAAa,EAClC,iBAAiB,EAAE,kBAAM,CAAC,kBAAkB,EAC5C,gBAAgB,EAAE,SAAS,EAC3B,aAAa,EAAE,kBAAM,CAAC,SAAS,CAAC,QAAQ,EACxC,cAAc,EAAE,kBAAM,CAAC,SAAS,CAAC,IAAI,EACrC,MAAM,EAAE,IAAA,mBAAS,EAAC,gBAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,EAC/C,QAAQ,EACR,iBAAiB,EAAE,gBAAQ,CAAC,WAAW,EACvC,UAAU,IACP,YAAY;QAGjB,oBAAC,yCAAmB,kBAClB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,IACd,KAAK,EACT,CACuB,CAC5B,CAAA;CAAA,CAAC;AA7CW,QAAA,QAAQ,YA6CnB;AACF,gBAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface DropdownGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'label'> {
|
|
3
|
+
/** Checkboxes within group */
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
/** Additional classes added to the DropdownGroup control */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Group label */
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const DropdownGroup: React.FunctionComponent<DropdownGroupProps>;
|
|
11
|
+
//# sourceMappingURL=DropdownGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownGroup.d.ts","sourceRoot":"","sources":["../../../../../src/deprecated/components/Dropdown/DropdownGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IACxF,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAqBrE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DropdownGroup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_styles_1 = require("@patternfly/react-styles");
|
|
7
|
+
const dropdownConstants_1 = require("./dropdownConstants");
|
|
8
|
+
const DropdownGroup = (_a) => {
|
|
9
|
+
var { children = null, className = '', label = '' } = _a, props = tslib_1.__rest(_a, ["children", "className", "label"]);
|
|
10
|
+
return (React.createElement(dropdownConstants_1.DropdownContext.Consumer, null, ({ sectionClass, sectionTitleClass, sectionComponent }) => {
|
|
11
|
+
const SectionComponent = sectionComponent;
|
|
12
|
+
return (React.createElement(SectionComponent, Object.assign({ className: (0, react_styles_1.css)(sectionClass, className) }, props),
|
|
13
|
+
label && (React.createElement("h1", { className: (0, react_styles_1.css)(sectionTitleClass), "aria-hidden": true }, label)),
|
|
14
|
+
React.createElement("ul", { role: "none" }, children)));
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
exports.DropdownGroup = DropdownGroup;
|
|
18
|
+
exports.DropdownGroup.displayName = 'DropdownGroup';
|
|
19
|
+
//# sourceMappingURL=DropdownGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownGroup.js","sourceRoot":"","sources":["../../../../../src/deprecated/components/Dropdown/DropdownGroup.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,2DAAsD;AAW/C,MAAM,aAAa,GAAgD,CAAC,EAKtD,EAAE,EAAE;QALkD,EACzE,QAAQ,GAAG,IAAI,EACf,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,EAAE,OAES,EADhB,KAAK,sBAJiE,kCAK1E,CADS;IACgB,OAAA,CACxB,oBAAC,mCAAe,CAAC,QAAQ,QACtB,CAAC,EAAE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,EAAE;QACzD,MAAM,gBAAgB,GAAG,gBAAuB,CAAC;QACjD,OAAO,CACL,oBAAC,gBAAgB,kBAAC,SAAS,EAAE,IAAA,kBAAG,EAAC,YAAY,EAAE,SAAS,CAAC,IAAM,KAAK;YACjE,KAAK,IAAI,CACR,4BAAI,SAAS,EAAE,IAAA,kBAAG,EAAC,iBAAiB,CAAC,yBAClC,KAAK,CACH,CACN;YACD,4BAAI,IAAI,EAAC,MAAM,IAAE,QAAQ,CAAM,CACd,CACpB,CAAC;IACJ,CAAC,CACwB,CAC5B,CAAA;CAAA,CAAC;AArBW,QAAA,aAAa,iBAqBxB;AACF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
|