@patternfly/react-core 6.3.1-prerelease.2 → 6.3.1-prerelease.20
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 +104 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Content/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/AnimationsProvider/package.json +1 -0
- package/dist/dynamic/helpers/AnimationsProvider/package.json +1 -0
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/dynamic-modules.json +6 -0
- package/dist/esm/components/Alert/AlertGroup.d.ts +2 -13
- package/dist/esm/components/Alert/AlertGroup.d.ts.map +1 -1
- package/dist/esm/components/Alert/AlertGroup.js +33 -38
- package/dist/esm/components/Alert/AlertGroup.js.map +1 -1
- package/dist/esm/components/Alert/AlertGroupInline.d.ts.map +1 -1
- package/dist/esm/components/Alert/AlertGroupInline.js +3 -1
- package/dist/esm/components/Alert/AlertGroupInline.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts +2 -0
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js +3 -3
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.d.ts +2 -2
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.js +2 -2
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyToggle.d.ts +0 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyToggle.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyToggle.js +2 -2
- package/dist/esm/components/ClipboardCopy/ClipboardCopyToggle.js.map +1 -1
- package/dist/esm/components/DataList/DataListItem.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataListItem.js +8 -0
- package/dist/esm/components/DataList/DataListItem.js.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.d.ts +6 -20
- package/dist/esm/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.d.ts +2 -9
- package/dist/esm/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.js +6 -16
- package/dist/esm/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorTreeItem.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorTreeItem.js +3 -1
- package/dist/esm/components/DualListSelector/DualListSelectorTreeItem.js.map +1 -1
- package/dist/esm/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
- package/dist/esm/components/Form/FormFieldGroupExpandable.js +3 -1
- package/dist/esm/components/Form/FormFieldGroupExpandable.js.map +1 -1
- package/dist/esm/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
- package/dist/esm/components/Form/InternalFormFieldGroup.js +3 -1
- package/dist/esm/components/Form/InternalFormFieldGroup.js.map +1 -1
- package/dist/esm/components/JumpLinks/JumpLinks.d.ts +2 -0
- package/dist/esm/components/JumpLinks/JumpLinks.d.ts.map +1 -1
- package/dist/esm/components/JumpLinks/JumpLinks.js +15 -3
- package/dist/esm/components/JumpLinks/JumpLinks.js.map +1 -1
- package/dist/esm/components/Menu/Menu.d.ts +2 -1
- package/dist/esm/components/Menu/Menu.d.ts.map +1 -1
- package/dist/esm/components/Menu/Menu.js +0 -1
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/Menu/MenuContainer.d.ts +4 -17
- package/dist/esm/components/Menu/MenuContainer.d.ts.map +1 -1
- package/dist/esm/components/Menu/MenuContainer.js.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js +3 -2
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/Menu/MenuItemAction.d.ts.map +1 -1
- package/dist/esm/components/Menu/MenuItemAction.js +1 -2
- package/dist/esm/components/Menu/MenuItemAction.js.map +1 -1
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts +2 -0
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts.map +1 -1
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.js +2 -2
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.js.map +1 -1
- package/dist/esm/components/Progress/Progress.d.ts +2 -0
- package/dist/esm/components/Progress/Progress.d.ts.map +1 -1
- package/dist/esm/components/Progress/Progress.js +6 -2
- package/dist/esm/components/Progress/Progress.js.map +1 -1
- package/dist/esm/components/Progress/ProgressBar.d.ts +1 -0
- package/dist/esm/components/Progress/ProgressBar.d.ts.map +1 -1
- package/dist/esm/components/Progress/ProgressBar.js +1 -1
- package/dist/esm/components/Progress/ProgressBar.js.map +1 -1
- package/dist/esm/components/Progress/ProgressContainer.js +1 -1
- package/dist/esm/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.js +3 -1
- package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts +6 -26
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Tabs/OverflowTab.d.ts +4 -25
- package/dist/esm/components/Tabs/OverflowTab.d.ts.map +1 -1
- package/dist/esm/components/Tabs/OverflowTab.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts +2 -2
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +4 -1
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.js +68 -3
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeView.js +3 -1
- package/dist/esm/components/TreeView/TreeView.js.map +1 -1
- package/dist/esm/components/TreeView/TreeViewListItem.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeViewListItem.js +3 -1
- package/dist/esm/components/TreeView/TreeViewListItem.js.map +1 -1
- package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/esm/components/Truncate/Truncate.js +3 -2
- package/dist/esm/components/Truncate/Truncate.js.map +1 -1
- package/dist/esm/components/Wizard/WizardNavItem.js +1 -1
- package/dist/esm/components/Wizard/WizardNavItem.js.map +1 -1
- package/dist/esm/deprecated/components/Wizard/WizardNavItem.js +1 -1
- package/dist/esm/deprecated/components/Wizard/WizardNavItem.js.map +1 -1
- package/dist/esm/helpers/AnimationsProvider/AnimationsProvider.d.ts +76 -0
- package/dist/esm/helpers/AnimationsProvider/AnimationsProvider.d.ts.map +1 -0
- package/dist/esm/helpers/AnimationsProvider/AnimationsProvider.js +83 -0
- package/dist/esm/helpers/AnimationsProvider/AnimationsProvider.js.map +1 -0
- package/dist/esm/helpers/AnimationsProvider/index.d.ts +2 -0
- package/dist/esm/helpers/AnimationsProvider/index.d.ts.map +1 -0
- package/dist/esm/helpers/AnimationsProvider/index.js +2 -0
- package/dist/esm/helpers/AnimationsProvider/index.js.map +1 -0
- package/dist/esm/helpers/Popper/Popper.d.ts +28 -21
- package/dist/esm/helpers/Popper/Popper.d.ts.map +1 -1
- package/dist/esm/helpers/Popper/Popper.js +2 -2
- package/dist/esm/helpers/Popper/Popper.js.map +1 -1
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.d.ts.map +1 -1
- package/dist/esm/helpers/index.js +1 -0
- package/dist/esm/helpers/index.js.map +1 -1
- package/dist/js/components/Alert/AlertGroup.d.ts +2 -13
- package/dist/js/components/Alert/AlertGroup.d.ts.map +1 -1
- package/dist/js/components/Alert/AlertGroup.js +33 -37
- package/dist/js/components/Alert/AlertGroup.js.map +1 -1
- package/dist/js/components/Alert/AlertGroupInline.d.ts.map +1 -1
- package/dist/js/components/Alert/AlertGroupInline.js +3 -1
- package/dist/js/components/Alert/AlertGroupInline.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts +2 -0
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js +3 -3
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.d.ts +2 -2
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.js +2 -2
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyToggle.d.ts +0 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyToggle.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyToggle.js +2 -2
- package/dist/js/components/ClipboardCopy/ClipboardCopyToggle.js.map +1 -1
- package/dist/js/components/DataList/DataListItem.d.ts.map +1 -1
- package/dist/js/components/DataList/DataListItem.js +8 -0
- package/dist/js/components/DataList/DataListItem.js.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.d.ts +6 -20
- package/dist/js/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.d.ts +2 -9
- package/dist/js/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.js +7 -16
- package/dist/js/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorTreeItem.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorTreeItem.js +3 -1
- package/dist/js/components/DualListSelector/DualListSelectorTreeItem.js.map +1 -1
- package/dist/js/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
- package/dist/js/components/Form/FormFieldGroupExpandable.js +3 -1
- package/dist/js/components/Form/FormFieldGroupExpandable.js.map +1 -1
- package/dist/js/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
- package/dist/js/components/Form/InternalFormFieldGroup.js +3 -1
- package/dist/js/components/Form/InternalFormFieldGroup.js.map +1 -1
- package/dist/js/components/JumpLinks/JumpLinks.d.ts +2 -0
- package/dist/js/components/JumpLinks/JumpLinks.d.ts.map +1 -1
- package/dist/js/components/JumpLinks/JumpLinks.js +14 -2
- package/dist/js/components/JumpLinks/JumpLinks.js.map +1 -1
- package/dist/js/components/Menu/Menu.d.ts +2 -1
- package/dist/js/components/Menu/Menu.d.ts.map +1 -1
- package/dist/js/components/Menu/Menu.js +0 -1
- package/dist/js/components/Menu/Menu.js.map +1 -1
- package/dist/js/components/Menu/MenuContainer.d.ts +4 -17
- package/dist/js/components/Menu/MenuContainer.d.ts.map +1 -1
- package/dist/js/components/Menu/MenuContainer.js.map +1 -1
- package/dist/js/components/Menu/MenuItem.js +3 -2
- package/dist/js/components/Menu/MenuItem.js.map +1 -1
- package/dist/js/components/Menu/MenuItemAction.d.ts.map +1 -1
- package/dist/js/components/Menu/MenuItemAction.js +1 -2
- package/dist/js/components/Menu/MenuItemAction.js.map +1 -1
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts +2 -0
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts.map +1 -1
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.js +2 -2
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.js.map +1 -1
- package/dist/js/components/Progress/Progress.d.ts +2 -0
- package/dist/js/components/Progress/Progress.d.ts.map +1 -1
- package/dist/js/components/Progress/Progress.js +6 -2
- package/dist/js/components/Progress/Progress.js.map +1 -1
- package/dist/js/components/Progress/ProgressBar.d.ts +1 -0
- package/dist/js/components/Progress/ProgressBar.d.ts.map +1 -1
- package/dist/js/components/Progress/ProgressBar.js +1 -1
- package/dist/js/components/Progress/ProgressBar.js.map +1 -1
- package/dist/js/components/Progress/ProgressContainer.js +1 -1
- package/dist/js/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/js/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/js/components/SearchInput/SearchInput.js +3 -1
- package/dist/js/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts +6 -26
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/js/components/Tabs/OverflowTab.d.ts +4 -25
- package/dist/js/components/Tabs/OverflowTab.d.ts.map +1 -1
- package/dist/js/components/Tabs/OverflowTab.js.map +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts +2 -2
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +4 -1
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/js/components/Tooltip/Tooltip.js +68 -3
- package/dist/js/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/js/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeView.js +3 -1
- package/dist/js/components/TreeView/TreeView.js.map +1 -1
- package/dist/js/components/TreeView/TreeViewListItem.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeViewListItem.js +3 -1
- package/dist/js/components/TreeView/TreeViewListItem.js.map +1 -1
- package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/js/components/Truncate/Truncate.js +2 -1
- package/dist/js/components/Truncate/Truncate.js.map +1 -1
- package/dist/js/components/Wizard/WizardNavItem.js +1 -1
- package/dist/js/components/Wizard/WizardNavItem.js.map +1 -1
- package/dist/js/deprecated/components/Wizard/WizardNavItem.js +1 -1
- package/dist/js/deprecated/components/Wizard/WizardNavItem.js.map +1 -1
- package/dist/js/helpers/AnimationsProvider/AnimationsProvider.d.ts +76 -0
- package/dist/js/helpers/AnimationsProvider/AnimationsProvider.d.ts.map +1 -0
- package/dist/js/helpers/AnimationsProvider/AnimationsProvider.js +89 -0
- package/dist/js/helpers/AnimationsProvider/AnimationsProvider.js.map +1 -0
- package/dist/js/helpers/AnimationsProvider/index.d.ts +2 -0
- package/dist/js/helpers/AnimationsProvider/index.d.ts.map +1 -0
- package/dist/js/helpers/AnimationsProvider/index.js +5 -0
- package/dist/js/helpers/AnimationsProvider/index.js.map +1 -0
- package/dist/js/helpers/Popper/Popper.d.ts +28 -21
- package/dist/js/helpers/Popper/Popper.d.ts.map +1 -1
- package/dist/js/helpers/Popper/Popper.js +2 -2
- package/dist/js/helpers/Popper/Popper.js.map +1 -1
- package/dist/js/helpers/index.d.ts +1 -0
- package/dist/js/helpers/index.d.ts.map +1 -1
- package/dist/js/helpers/index.js +1 -0
- package/dist/js/helpers/index.js.map +1 -1
- package/dist/styles/base-no-reset.css +1172 -1
- package/dist/styles/base.css +1176 -1
- package/dist/umd/assets/{output-mLkegqf5.css → output-DsovVjdv.css} +20296 -19881
- package/dist/umd/react-core.min.js +3 -3
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +6 -6
- package/src/components/Alert/AlertGroup.tsx +59 -63
- package/src/components/Alert/AlertGroupInline.tsx +3 -1
- package/src/components/Alert/__tests__/AlertGroup.test.tsx +55 -4
- package/src/components/ClipboardCopy/ClipboardCopy.tsx +5 -5
- package/src/components/ClipboardCopy/ClipboardCopyButton.tsx +2 -4
- package/src/components/ClipboardCopy/ClipboardCopyToggle.tsx +0 -3
- package/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx +16 -0
- package/src/components/ClipboardCopy/__tests__/ClipboardCopyButton.test.tsx +5 -28
- package/src/components/ClipboardCopy/__tests__/ClipboardCopyToggle.test.tsx +3 -4
- package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopy.test.tsx.snap +1 -1
- package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopyButton.test.tsx.snap +0 -1
- package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopyToggle.test.tsx.snap +0 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopyBasic.tsx +1 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopyExpanded.tsx +7 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopyExpandedWithArray.tsx +7 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompact.tsx +1 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactCode.tsx +7 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactInSentence.tsx +19 -3
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactTruncation.tsx +14 -2
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx +1 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyJSONObject.tsx +8 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnly.tsx +1 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpanded.tsx +8 -1
- package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpandedByDefault.tsx +9 -1
- package/src/components/DataList/DataListItem.tsx +12 -0
- package/src/components/Dropdown/Dropdown.tsx +6 -21
- package/src/components/Dropdown/examples/Dropdown.md +2 -2
- package/src/components/DualListSelector/DualListSelector.tsx +32 -39
- package/src/components/DualListSelector/DualListSelectorTreeItem.tsx +3 -1
- package/src/components/DualListSelector/__tests__/DualListSelector.test.tsx +28 -0
- package/src/components/Form/FormFieldGroupExpandable.tsx +3 -1
- package/src/components/Form/InternalFormFieldGroup.tsx +3 -1
- package/src/components/Form/__tests__/FormFieldGroupExpandable.test.tsx +30 -0
- package/src/components/JumpLinks/JumpLinks.tsx +33 -5
- package/src/components/JumpLinks/__tests__/JumpLinks.test.tsx +196 -1
- package/src/components/JumpLinks/__tests__/__snapshots__/JumpLinks.test.tsx.snap +9 -9
- package/src/components/JumpLinks/examples/JumpLinksBasic.tsx +1 -1
- package/src/components/JumpLinks/examples/JumpLinksExpandableVerticalWithSubsection.tsx +2 -2
- package/src/components/JumpLinks/examples/JumpLinksVertical.tsx +1 -1
- package/src/components/JumpLinks/examples/JumpLinksVerticalWithLabel.tsx +1 -1
- package/src/components/JumpLinks/examples/JumpLinksWithCenteredList.tsx +1 -1
- package/src/components/JumpLinks/examples/JumpLinksWithLabel.tsx +2 -2
- package/src/components/Menu/Menu.tsx +2 -2
- package/src/components/Menu/MenuContainer.tsx +4 -17
- package/src/components/Menu/MenuItem.tsx +2 -2
- package/src/components/Menu/MenuItemAction.tsx +3 -2
- package/src/components/Menu/__tests__/Menu.test.tsx +39 -1
- package/src/components/Menu/examples/Menu.md +3 -3
- package/src/components/MultipleFileUpload/MultipleFileUploadStatusItem.tsx +4 -0
- package/src/components/MultipleFileUpload/examples/MultipleFileUploadBasic.tsx +5 -4
- package/src/components/Progress/Progress.tsx +9 -1
- package/src/components/Progress/ProgressBar.tsx +2 -1
- package/src/components/Progress/ProgressContainer.tsx +1 -1
- package/src/components/Progress/__tests__/Generated/__snapshots__/ProgressBar.test.tsx.snap +1 -0
- package/src/components/Progress/__tests__/ProgressBar.test.tsx +19 -0
- package/src/components/Progress/examples/Progress.md +67 -23
- package/src/components/Progress/examples/ProgressHelperText.tsx +8 -2
- package/src/components/SearchInput/SearchInput.tsx +3 -1
- package/src/components/SearchInput/__tests__/SearchInput.test.tsx +52 -0
- package/src/components/Select/Select.tsx +6 -27
- package/src/components/Select/examples/Select.md +1 -1
- package/src/components/Tabs/OverflowTab.tsx +4 -26
- package/src/components/Tabs/Tabs.tsx +11 -3
- package/src/components/Tabs/__tests__/Tabs.test.tsx +60 -0
- package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +14 -14
- package/src/components/Tabs/examples/Tabs.md +27 -27
- package/src/components/Tooltip/Tooltip.tsx +76 -3
- package/src/components/Tooltip/__tests__/Tooltip.test.tsx +126 -0
- package/src/components/TreeView/TreeView.tsx +3 -1
- package/src/components/TreeView/TreeViewListItem.tsx +3 -1
- package/src/components/TreeView/__tests__/TreeView.test.tsx +28 -0
- package/src/components/TreeView/__tests__/__snapshots__/TreeView.test.tsx.snap +1 -1
- package/src/components/Truncate/Truncate.tsx +3 -1
- package/src/components/Truncate/examples/TruncateExamples.css +2 -2
- package/src/components/Wizard/WizardNavItem.tsx +1 -1
- package/src/demos/DataList/examples/DataListBasic.tsx +74 -19
- package/src/demos/DataList/examples/DataListStaticBottomPagination.tsx +16 -3
- package/src/demos/DataListDemo.md +5 -2
- package/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx +1 -1
- package/src/deprecated/components/Wizard/WizardNavItem.tsx +1 -1
- package/src/helpers/AnimationsProvider/AnimationsProvider.tsx +104 -0
- package/src/helpers/AnimationsProvider/__tests__/AnimationsProvider.test.tsx +157 -0
- package/src/helpers/AnimationsProvider/index.ts +1 -0
- package/src/helpers/Popper/Popper.tsx +31 -22
- package/src/helpers/index.ts +1 -0
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import { ClipboardCopy } from '@patternfly/react-core';
|
|
2
2
|
export const ClipboardCopyInlineCompactTruncation: React.FunctionComponent = () => (
|
|
3
3
|
<>
|
|
4
|
-
<ClipboardCopy
|
|
4
|
+
<ClipboardCopy
|
|
5
|
+
copyAriaLabel="Copy inline compact with truncation at end example"
|
|
6
|
+
truncation
|
|
7
|
+
hoverTip="Copy"
|
|
8
|
+
clickTip="Copied"
|
|
9
|
+
variant="inline-compact"
|
|
10
|
+
>
|
|
5
11
|
This lengthy, copyable content will be truncated with default settings when the truncation prop is simply set to
|
|
6
12
|
true. This is useful for quickly applying truncation without needing to worry about any other properties to set.
|
|
7
13
|
</ClipboardCopy>
|
|
8
14
|
<br />
|
|
9
15
|
<br />
|
|
10
|
-
<ClipboardCopy
|
|
16
|
+
<ClipboardCopy
|
|
17
|
+
copyAriaLabel="Copy inline compact with truncation at start example"
|
|
18
|
+
truncation={{ position: 'start' }}
|
|
19
|
+
hoverTip="Copy"
|
|
20
|
+
clickTip="Copied"
|
|
21
|
+
variant="inline-compact"
|
|
22
|
+
>
|
|
11
23
|
This lengthy, copyable content will be truncated with customized settings when the truncation prop is passed an
|
|
12
24
|
object containing Truncate props. This is useful for finetuning truncation for your particular use-case.
|
|
13
25
|
</ClipboardCopy>
|
package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx
CHANGED
|
@@ -8,6 +8,7 @@ export const ClipboardCopyInlineCompactWithAdditionalAction: React.FunctionCompo
|
|
|
8
8
|
const doneRunText: string = 'Running in web terminal';
|
|
9
9
|
return (
|
|
10
10
|
<ClipboardCopy
|
|
11
|
+
copyAriaLabel="Copy inline compact with additional action example"
|
|
11
12
|
hoverTip="Copy"
|
|
12
13
|
clickTip="Copied"
|
|
13
14
|
variant="inline-compact"
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core';
|
|
2
2
|
|
|
3
3
|
export const ClipboardCopyJSONObject: React.FunctionComponent = () => (
|
|
4
|
-
<ClipboardCopy
|
|
4
|
+
<ClipboardCopy
|
|
5
|
+
copyAriaLabel="Copy JSON object example"
|
|
6
|
+
toggleAriaLabel="Show content for JSON object example"
|
|
7
|
+
isCode
|
|
8
|
+
hoverTip="Copy"
|
|
9
|
+
clickTip="Copied"
|
|
10
|
+
variant={ClipboardCopyVariant.expansion}
|
|
11
|
+
>
|
|
5
12
|
{`{ "menu": {
|
|
6
13
|
"id": "file",
|
|
7
14
|
"value": "File",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClipboardCopy } from '@patternfly/react-core';
|
|
2
2
|
|
|
3
3
|
export const ClipboardCopyReadOnly: React.FunctionComponent = () => (
|
|
4
|
-
<ClipboardCopy isReadOnly hoverTip="Copy" clickTip="Copied">
|
|
4
|
+
<ClipboardCopy copyAriaLabel="Copy read-only example" isReadOnly hoverTip="Copy" clickTip="Copied">
|
|
5
5
|
This is read-only
|
|
6
6
|
</ClipboardCopy>
|
|
7
7
|
);
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core';
|
|
2
2
|
|
|
3
3
|
export const ClipboardCopyReadOnlyExpanded: React.FunctionComponent = () => (
|
|
4
|
-
<ClipboardCopy
|
|
4
|
+
<ClipboardCopy
|
|
5
|
+
toggleAriaLabel="Show content for read-only expanded example"
|
|
6
|
+
copyAriaLabel="Copy read-only expanded example"
|
|
7
|
+
isReadOnly
|
|
8
|
+
hoverTip="Copy"
|
|
9
|
+
clickTip="Copied"
|
|
10
|
+
variant={ClipboardCopyVariant.expansion}
|
|
11
|
+
>
|
|
5
12
|
Got a lot of text here, need to see all of it? Click that arrow on the left side and check out the resulting
|
|
6
13
|
expansion.
|
|
7
14
|
</ClipboardCopy>
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core';
|
|
2
2
|
|
|
3
3
|
export const ClipboardCopyReadOnlyExpandedByDefault: React.FunctionComponent = () => (
|
|
4
|
-
<ClipboardCopy
|
|
4
|
+
<ClipboardCopy
|
|
5
|
+
copyAriaLabel="Copy read-only expanded by default example"
|
|
6
|
+
toggleAriaLabel="Show content for read-only expanded by default example"
|
|
7
|
+
isReadOnly
|
|
8
|
+
isExpanded
|
|
9
|
+
hoverTip="Copy"
|
|
10
|
+
clickTip="Copied"
|
|
11
|
+
variant={ClipboardCopyVariant.expansion}
|
|
12
|
+
>
|
|
5
13
|
Got a lot of text here, need to see all of it? Click that arrow on the left side and check out the resulting
|
|
6
14
|
expansion.
|
|
7
15
|
</ClipboardCopy>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Children, Component, cloneElement, isValidElement } from 'react';
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/DataList/data-list';
|
|
4
|
+
import menuStyles from '@patternfly/react-styles/css/components/Menu/menu';
|
|
4
5
|
import { DataListContext } from './DataList';
|
|
5
6
|
import { KeyTypes } from '../../helpers/constants';
|
|
6
7
|
|
|
@@ -65,6 +66,17 @@ class DataListItem extends Component<DataListItemProps> {
|
|
|
65
66
|
|
|
66
67
|
const onKeyDown = (event: React.KeyboardEvent) => {
|
|
67
68
|
if ([KeyTypes.Enter, KeyTypes.Space].includes(event.key)) {
|
|
69
|
+
const target: any = event.target as HTMLElement;
|
|
70
|
+
|
|
71
|
+
if (
|
|
72
|
+
target.closest(`.${menuStyles.menuItem}`) ||
|
|
73
|
+
target.parentNode.classList.contains(styles.dataListItemAction) ||
|
|
74
|
+
target.parentNode.classList.contains(styles.dataListItemControl)
|
|
75
|
+
) {
|
|
76
|
+
// check other event handlers are not present.
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
68
80
|
event.preventDefault();
|
|
69
81
|
updateSelectedDataListItem(event, id);
|
|
70
82
|
}
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
import { forwardRef, useEffect, useRef } from 'react';
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import { Menu, MenuContent, MenuProps } from '../Menu';
|
|
4
|
-
import { Popper } from '../../helpers/Popper/Popper';
|
|
4
|
+
import { Popper, PopperOptions } from '../../helpers/Popper/Popper';
|
|
5
|
+
import type { DropdownItemProps } from './DropdownItem';
|
|
5
6
|
import { useOUIAProps, OUIAProps, onToggleArrowKeydownDefault } from '../../helpers';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
direction?: 'up' | 'down';
|
|
10
|
-
/** Horizontal position of the popper */
|
|
11
|
-
position?: 'right' | 'left' | 'center' | 'start' | 'end';
|
|
12
|
-
/** Custom width of the popper. If the value is "trigger", it will set the width to the dropdown toggle's width */
|
|
13
|
-
width?: string | 'trigger';
|
|
14
|
-
/** Minimum width of the popper. If the value is "trigger", it will set the min width to the dropdown toggle's width */
|
|
15
|
-
minWidth?: string | 'trigger';
|
|
16
|
-
/** Maximum width of the popper. If the value is "trigger", it will set the max width to the dropdown toggle's width */
|
|
17
|
-
maxWidth?: string | 'trigger';
|
|
18
|
-
/** Enable to flip the popper when it reaches the boundary */
|
|
19
|
-
enableFlip?: boolean;
|
|
20
|
-
/** The container to append the popper to. Defaults to document.body. */
|
|
21
|
-
appendTo?: HTMLElement | (() => HTMLElement) | 'inline';
|
|
22
|
-
/** Flag to prevent the popper from overflowing its container and becoming partially obscured. */
|
|
23
|
-
preventOverflow?: boolean;
|
|
24
|
-
}
|
|
8
|
+
/** @deprecated Use PopperOptions instead */
|
|
9
|
+
export type DropdownPopperProps = PopperOptions;
|
|
25
10
|
|
|
26
11
|
export interface DropdownToggleProps {
|
|
27
12
|
/** Dropdown toggle node. */
|
|
@@ -45,7 +30,7 @@ export interface DropdownProps extends MenuProps, OUIAProps {
|
|
|
45
30
|
/** Flag indicating the toggle should be focused after a selection. If this use case is too restrictive, the optional toggleRef property with a node toggle may be used to control focus. */
|
|
46
31
|
shouldFocusToggleOnSelect?: boolean;
|
|
47
32
|
/** Function callback called when user selects item. */
|
|
48
|
-
onSelect?: (event?: React.MouseEvent<Element, MouseEvent>, value?:
|
|
33
|
+
onSelect?: (event?: React.MouseEvent<Element, MouseEvent>, value?: DropdownItemProps['value']) => void;
|
|
49
34
|
/** Callback to allow the dropdown component to change the open state of the menu.
|
|
50
35
|
* Triggered by clicking outside of the menu, or by pressing any keys specified in onOpenChangeKeys. */
|
|
51
36
|
onOpenChange?: (isOpen: boolean) => void;
|
|
@@ -66,7 +51,7 @@ export interface DropdownProps extends MenuProps, OUIAProps {
|
|
|
66
51
|
/** z-index of the dropdown menu */
|
|
67
52
|
zIndex?: number;
|
|
68
53
|
/** Additional properties to pass to the Popper */
|
|
69
|
-
popperProps?:
|
|
54
|
+
popperProps?: PopperOptions;
|
|
70
55
|
/** Height of the dropdown menu */
|
|
71
56
|
menuHeight?: string;
|
|
72
57
|
/** Maximum height of dropdown menu */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
1
|
import styles from '@patternfly/react-styles/css/components/DualListSelector/dual-list-selector';
|
|
3
2
|
import { css } from '@patternfly/react-styles';
|
|
4
|
-
import { GenerateId
|
|
3
|
+
import { GenerateId } from '../../helpers';
|
|
5
4
|
import { DualListSelectorContext } from './DualListSelectorContext';
|
|
5
|
+
import { useHasAnimations } from '../../helpers';
|
|
6
6
|
|
|
7
7
|
/** Acts as a container for all other DualListSelector sub-components when using a
|
|
8
8
|
* composable dual list selector.
|
|
@@ -24,41 +24,34 @@ export interface DualListSelectorProps {
|
|
|
24
24
|
hasAnimations?: boolean;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
export const DualListSelector: React.FunctionComponent<DualListSelectorProps> = ({
|
|
28
|
+
className,
|
|
29
|
+
children,
|
|
30
|
+
id,
|
|
31
|
+
isTree = false,
|
|
32
|
+
hasAnimations: hasAnimationsProp,
|
|
33
|
+
...props
|
|
34
|
+
}: DualListSelectorProps) => {
|
|
35
|
+
const hasAnimations = useHasAnimations(hasAnimationsProp);
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</div>
|
|
57
|
-
)}
|
|
58
|
-
</GenerateId>
|
|
59
|
-
</DualListSelectorContext.Provider>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export { DualListSelector };
|
|
37
|
+
return (
|
|
38
|
+
<DualListSelectorContext.Provider value={{ isTree, hasAnimations }}>
|
|
39
|
+
<GenerateId>
|
|
40
|
+
{(randomId) => (
|
|
41
|
+
<div
|
|
42
|
+
className={css(
|
|
43
|
+
styles.dualListSelector,
|
|
44
|
+
hasAnimations && isTree && styles.modifiers.animateExpand,
|
|
45
|
+
className
|
|
46
|
+
)}
|
|
47
|
+
id={id || randomId}
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
</div>
|
|
52
|
+
)}
|
|
53
|
+
</GenerateId>
|
|
54
|
+
</DualListSelectorContext.Provider>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
DualListSelector.displayName = 'DualListSelector';
|
|
@@ -6,6 +6,7 @@ import { Badge } from '../Badge';
|
|
|
6
6
|
import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
|
|
7
7
|
import { flattenTree } from './treeUtils';
|
|
8
8
|
import { DualListSelectorListContext } from './DualListSelectorContext';
|
|
9
|
+
import { useHasAnimations } from '../../helpers';
|
|
9
10
|
|
|
10
11
|
export interface DualListSelectorTreeItemProps extends React.HTMLProps<HTMLLIElement> {
|
|
11
12
|
/** Content rendered inside the dual list selector. */
|
|
@@ -58,7 +59,7 @@ const DualListSelectorTreeItemBase: React.FunctionComponent<DualListSelectorTree
|
|
|
58
59
|
badgeProps,
|
|
59
60
|
itemData,
|
|
60
61
|
isDisabled = false,
|
|
61
|
-
hasAnimations,
|
|
62
|
+
hasAnimations: hasAnimationsProp,
|
|
62
63
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
63
64
|
useMemo,
|
|
64
65
|
...props
|
|
@@ -66,6 +67,7 @@ const DualListSelectorTreeItemBase: React.FunctionComponent<DualListSelectorTree
|
|
|
66
67
|
const ref = useRef(null);
|
|
67
68
|
const [isExpanded, setIsExpanded] = useState(defaultExpanded || false);
|
|
68
69
|
const { setFocusedOption } = useContext(DualListSelectorListContext);
|
|
70
|
+
const hasAnimations = useHasAnimations(hasAnimationsProp);
|
|
69
71
|
|
|
70
72
|
useEffect(() => {
|
|
71
73
|
setIsExpanded(defaultExpanded);
|
|
@@ -3,6 +3,7 @@ import styles from '@patternfly/react-styles/css/components/DualListSelector/dua
|
|
|
3
3
|
import { DualListSelector } from '../DualListSelector';
|
|
4
4
|
import { DualListSelectorPane } from '../DualListSelectorPane';
|
|
5
5
|
import { SearchInput } from '../../SearchInput';
|
|
6
|
+
import { AnimationsProvider } from '../../../helpers/AnimationsProvider';
|
|
6
7
|
|
|
7
8
|
// The following tests can be removed as part of https://github.com/patternfly/patternfly-react/issues/11838
|
|
8
9
|
describe('Opt-in animations', () => {
|
|
@@ -29,6 +30,33 @@ describe('Opt-in animations', () => {
|
|
|
29
30
|
|
|
30
31
|
expect(screen.getByTestId('test-id')).toHaveClass(styles.modifiers.animateExpand);
|
|
31
32
|
});
|
|
33
|
+
|
|
34
|
+
// Animation context tests
|
|
35
|
+
test('respects AnimationsProvider context when no local hasAnimations prop', () => {
|
|
36
|
+
render(
|
|
37
|
+
<AnimationsProvider config={{ hasAnimations: true }}>
|
|
38
|
+
<DualListSelector isTree data-testid="test-id" />
|
|
39
|
+
</AnimationsProvider>
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
expect(screen.getByTestId('test-id')).toHaveClass(styles.modifiers.animateExpand);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('local hasAnimations prop takes precedence over context', () => {
|
|
46
|
+
render(
|
|
47
|
+
<AnimationsProvider config={{ hasAnimations: true }}>
|
|
48
|
+
<DualListSelector isTree hasAnimations={false} data-testid="test-id" />
|
|
49
|
+
</AnimationsProvider>
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
expect(screen.getByTestId('test-id')).not.toHaveClass(styles.modifiers.animateExpand);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test('works without AnimationsProvider (backward compatibility)', () => {
|
|
56
|
+
render(<DualListSelector isTree data-testid="test-id" />);
|
|
57
|
+
|
|
58
|
+
expect(screen.getByTestId('test-id')).not.toHaveClass(styles.modifiers.animateExpand);
|
|
59
|
+
});
|
|
32
60
|
});
|
|
33
61
|
|
|
34
62
|
// Following tests should be moved to a separate DualListSelectorPane test file
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { InternalFormFieldGroup } from './InternalFormFieldGroup';
|
|
3
|
+
import { useHasAnimations } from '../../helpers';
|
|
3
4
|
|
|
4
5
|
export interface FormFieldGroupExpandableProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onToggle'> {
|
|
5
6
|
/** Anything that can be rendered as form field group content. */
|
|
@@ -25,10 +26,11 @@ export const FormFieldGroupExpandable: React.FunctionComponent<FormFieldGroupExp
|
|
|
25
26
|
header,
|
|
26
27
|
isExpanded = false,
|
|
27
28
|
toggleAriaLabel,
|
|
28
|
-
hasAnimations,
|
|
29
|
+
hasAnimations: hasAnimationsProp,
|
|
29
30
|
...props
|
|
30
31
|
}: FormFieldGroupExpandableProps) => {
|
|
31
32
|
const [localIsExpanded, setIsExpanded] = useState(isExpanded);
|
|
33
|
+
const hasAnimations = useHasAnimations(hasAnimationsProp);
|
|
32
34
|
|
|
33
35
|
return (
|
|
34
36
|
<InternalFormFieldGroup
|
|
@@ -2,6 +2,7 @@ import styles from '@patternfly/react-styles/css/components/Form/form';
|
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import { FormFieldGroupToggle } from './FormFieldGroupToggle';
|
|
4
4
|
import { GenerateId } from '../../helpers';
|
|
5
|
+
import { useHasAnimations } from '../../helpers';
|
|
5
6
|
|
|
6
7
|
export interface InternalFormFieldGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'label' | 'onToggle'> {
|
|
7
8
|
/** Anything that can be rendered as form field group content. */
|
|
@@ -33,9 +34,10 @@ export const InternalFormFieldGroup: React.FunctionComponent<InternalFormFieldGr
|
|
|
33
34
|
isExpanded,
|
|
34
35
|
onToggle,
|
|
35
36
|
toggleAriaLabel,
|
|
36
|
-
hasAnimations,
|
|
37
|
+
hasAnimations: hasAnimationsProp,
|
|
37
38
|
...props
|
|
38
39
|
}: InternalFormFieldGroupProps) => {
|
|
40
|
+
const hasAnimations = useHasAnimations(hasAnimationsProp);
|
|
39
41
|
const headerTitleText = header ? header.props.titleText : null;
|
|
40
42
|
if (isExpandable && !toggleAriaLabel && !headerTitleText) {
|
|
41
43
|
// eslint-disable-next-line no-console
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { render, screen } from '@testing-library/react';
|
|
2
2
|
import { FormFieldGroupExpandable } from '../FormFieldGroupExpandable';
|
|
3
|
+
import { AnimationsProvider } from '../../../helpers/AnimationsProvider';
|
|
3
4
|
import styles from '@patternfly/react-styles/css/components/Form/form';
|
|
4
5
|
|
|
5
6
|
test('Does not render children by default', () => {
|
|
@@ -53,3 +54,32 @@ test(`Renders with class ${styles.modifiers.expandable} when hasAnimations is tr
|
|
|
53
54
|
|
|
54
55
|
expect(screen.getByRole('group')).toHaveClass(styles.modifiers.expandable);
|
|
55
56
|
});
|
|
57
|
+
|
|
58
|
+
// Regression tests for AnimationsProvider context
|
|
59
|
+
test('respects AnimationsProvider context when no local hasAnimations prop', () => {
|
|
60
|
+
render(
|
|
61
|
+
<AnimationsProvider config={{ hasAnimations: true }}>
|
|
62
|
+
<FormFieldGroupExpandable toggleAriaLabel="Toggle label">Child content</FormFieldGroupExpandable>
|
|
63
|
+
</AnimationsProvider>
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
expect(screen.getByRole('group')).toHaveClass(styles.modifiers.expandable);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test('local hasAnimations prop takes precedence over context', () => {
|
|
70
|
+
render(
|
|
71
|
+
<AnimationsProvider config={{ hasAnimations: true }}>
|
|
72
|
+
<FormFieldGroupExpandable hasAnimations={false} toggleAriaLabel="Toggle label">
|
|
73
|
+
Child content
|
|
74
|
+
</FormFieldGroupExpandable>
|
|
75
|
+
</AnimationsProvider>
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
expect(screen.getByRole('group')).not.toHaveClass(styles.modifiers.expandable);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
test('works without AnimationsProvider (backward compatibility)', () => {
|
|
82
|
+
render(<FormFieldGroupExpandable toggleAriaLabel="Toggle label">Child content</FormFieldGroupExpandable>);
|
|
83
|
+
|
|
84
|
+
expect(screen.getByRole('group')).not.toHaveClass(styles.modifiers.expandable);
|
|
85
|
+
});
|
|
@@ -7,7 +7,7 @@ import cssToggleDisplayVar from '@patternfly/react-tokens/dist/esm/c_jump_links_
|
|
|
7
7
|
import { Button } from '../Button';
|
|
8
8
|
import { JumpLinksItem, JumpLinksItemProps } from './JumpLinksItem';
|
|
9
9
|
import { JumpLinksList } from './JumpLinksList';
|
|
10
|
-
import { canUseDOM, formatBreakpointMods } from '../../helpers/util';
|
|
10
|
+
import { canUseDOM, formatBreakpointMods, getUniqueId } from '../../helpers/util';
|
|
11
11
|
|
|
12
12
|
export interface JumpLinksProps extends Omit<React.HTMLProps<HTMLElement>, 'label'> {
|
|
13
13
|
/** Whether to center children. */
|
|
@@ -47,6 +47,8 @@ export interface JumpLinksProps extends Omit<React.HTMLProps<HTMLElement>, 'labe
|
|
|
47
47
|
className?: string;
|
|
48
48
|
/** Whether the current entry in the navigation history should be replaced when a JumpLinksItem is clicked. By default a new entry will be pushed to the navigation history. */
|
|
49
49
|
shouldReplaceNavHistory?: boolean;
|
|
50
|
+
/** Custom ID applied to label if alwaysShowLabel is applied, or expandable toggle. This is used for internal logic related to aria-label and aria-labelledby */
|
|
51
|
+
labelId?: string;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
// Recursively find JumpLinkItems and return an array of all their scrollNodes
|
|
@@ -94,6 +96,7 @@ export const JumpLinks: React.FunctionComponent<JumpLinksProps> = ({
|
|
|
94
96
|
toggleAriaLabel = 'Toggle jump links',
|
|
95
97
|
className,
|
|
96
98
|
shouldReplaceNavHistory = false,
|
|
99
|
+
labelId,
|
|
97
100
|
...props
|
|
98
101
|
}: JumpLinksProps) => {
|
|
99
102
|
const hasScrollSpy = Boolean(scrollableRef || scrollableSelector);
|
|
@@ -106,6 +109,15 @@ export const JumpLinks: React.FunctionComponent<JumpLinksProps> = ({
|
|
|
106
109
|
|
|
107
110
|
let scrollableElement: HTMLElement;
|
|
108
111
|
|
|
112
|
+
if (!label && !ariaLabel) {
|
|
113
|
+
// eslint-disable-next-line no-console
|
|
114
|
+
console.warn('JumpLinks: for accessibility reasons, an aria-label should be specified if no label is provided');
|
|
115
|
+
}
|
|
116
|
+
if (!label && !toggleAriaLabel && expandable) {
|
|
117
|
+
// eslint-disable-next-line no-console
|
|
118
|
+
console.warn('JumpLinks: for accessibility reasons, a toggleAriaLabel should be specified if no label is provided');
|
|
119
|
+
}
|
|
120
|
+
|
|
109
121
|
const getScrollableElement = () => {
|
|
110
122
|
if (scrollableRef) {
|
|
111
123
|
if (scrollableRef instanceof HTMLElement) {
|
|
@@ -232,6 +244,11 @@ export const JumpLinks: React.FunctionComponent<JumpLinksProps> = ({
|
|
|
232
244
|
return child;
|
|
233
245
|
});
|
|
234
246
|
|
|
247
|
+
const id = labelId ?? getUniqueId();
|
|
248
|
+
const hasAriaLabelledBy = expandable || (label && alwaysShowLabel);
|
|
249
|
+
const computedAriaLabel = hasAriaLabelledBy ? null : ariaLabel;
|
|
250
|
+
const computedAriaLabelledBy = hasAriaLabelledBy ? id : null;
|
|
251
|
+
|
|
235
252
|
return (
|
|
236
253
|
<nav
|
|
237
254
|
className={css(
|
|
@@ -242,8 +259,9 @@ export const JumpLinks: React.FunctionComponent<JumpLinksProps> = ({
|
|
|
242
259
|
isExpanded && styles.modifiers.expanded,
|
|
243
260
|
className
|
|
244
261
|
)}
|
|
245
|
-
aria-label={
|
|
262
|
+
aria-label={computedAriaLabel}
|
|
246
263
|
ref={navRef}
|
|
264
|
+
aria-labelledby={computedAriaLabelledBy}
|
|
247
265
|
{...props}
|
|
248
266
|
>
|
|
249
267
|
<div className={styles.jumpLinksMain}>
|
|
@@ -253,21 +271,31 @@ export const JumpLinks: React.FunctionComponent<JumpLinksProps> = ({
|
|
|
253
271
|
<Button
|
|
254
272
|
variant="plain"
|
|
255
273
|
onClick={() => setIsExpanded(!isExpanded)}
|
|
256
|
-
aria-label={toggleAriaLabel}
|
|
274
|
+
aria-label={label ? null : toggleAriaLabel}
|
|
257
275
|
aria-expanded={isExpanded}
|
|
258
276
|
icon={
|
|
259
277
|
<span className={styles.jumpLinksToggleIcon}>
|
|
260
278
|
<AngleRightIcon />
|
|
261
279
|
</span>
|
|
262
280
|
}
|
|
281
|
+
id={id}
|
|
263
282
|
>
|
|
264
283
|
{label && label}
|
|
265
284
|
</Button>
|
|
266
285
|
</div>
|
|
267
286
|
)}
|
|
268
|
-
{label && alwaysShowLabel &&
|
|
287
|
+
{label && alwaysShowLabel && !expandable && (
|
|
288
|
+
<div className={css(styles.jumpLinksLabel)} id={id}>
|
|
289
|
+
{label}
|
|
290
|
+
</div>
|
|
291
|
+
)}
|
|
269
292
|
</div>
|
|
270
|
-
<ul
|
|
293
|
+
<ul
|
|
294
|
+
aria-label={computedAriaLabel}
|
|
295
|
+
aria-labelledby={computedAriaLabelledBy}
|
|
296
|
+
className={styles.jumpLinksList}
|
|
297
|
+
role="list"
|
|
298
|
+
>
|
|
271
299
|
{cloneChildren(children)}
|
|
272
300
|
</ul>
|
|
273
301
|
</div>
|