@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
id: Tabs
|
|
3
3
|
section: components
|
|
4
4
|
cssPrefix: pf-v6-c-tabs
|
|
5
|
-
propComponents: ['Tabs', 'Tab', 'TabContent', 'TabContentBody', 'TabTitleText', 'TabTitleIcon', 'HorizontalOverflowObject', '
|
|
5
|
+
propComponents: ['Tabs', 'Tab', 'TabContent', 'TabContentBody', 'TabTitleText', 'TabTitleIcon', 'HorizontalOverflowObject', 'TabAction', 'PopperOptions']
|
|
6
6
|
ouia: true
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -22,16 +22,16 @@ import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
|
|
|
22
22
|
|
|
23
23
|
A `<Tabs>` component contains multiple `<Tab>` components that may be used to navigate between sets of content within a page.
|
|
24
24
|
|
|
25
|
-
You can adjust a tab in the following ways:
|
|
25
|
+
You can adjust a tab in the following ways:
|
|
26
26
|
|
|
27
27
|
- To label a tab with text, pass a `<TabTitleText>` component into the `title` property of a `<Tab>`.
|
|
28
|
-
- To disable a tab, use the `isDisabled` property. Tabs using `isDisabled` are not perceivable or operable by users navigating via assistive technologies.
|
|
28
|
+
- To disable a tab, use the `isDisabled` property. Tabs using `isDisabled` are not perceivable or operable by users navigating via assistive technologies.
|
|
29
29
|
- To disable a tab, but keep it perceivable to assistive technology users, use the `isAriaDisabled` property. If a disabled tab has a tooltip, use this property instead of `isDisabled`.
|
|
30
|
-
- To add a tooltip to an aria-disabled tab, use the `tooltip` property.
|
|
30
|
+
- To add a tooltip to an aria-disabled tab, use the `tooltip` property.
|
|
31
31
|
|
|
32
|
-
Tabs can be styled as 'default' or 'boxed':
|
|
32
|
+
Tabs can be styled as 'default' or 'boxed':
|
|
33
33
|
|
|
34
|
-
- Default tabs do not have any borders and use a bottom line to distinguish between a selected tab, a hovered tab, and an inactive tab.
|
|
34
|
+
- Default tabs do not have any borders and use a bottom line to distinguish between a selected tab, a hovered tab, and an inactive tab.
|
|
35
35
|
- Boxed tabs are outlined to emphasize the area that a tab spans. To preview boxed tabs in the following examples, select the 'isBox' checkbox, which sets the `isBox` property to true.
|
|
36
36
|
|
|
37
37
|
```ts file="./TabsDefault.tsx"
|
|
@@ -39,7 +39,7 @@ Tabs can be styled as 'default' or 'boxed':
|
|
|
39
39
|
|
|
40
40
|
### Boxed secondary tabs
|
|
41
41
|
|
|
42
|
-
To change the background color of boxed tabs or the tab content, use the `variant` property.
|
|
42
|
+
To change the background color of boxed tabs or the tab content, use the `variant` property.
|
|
43
43
|
|
|
44
44
|
Toggle the tab color by selecting the 'Tabs secondary variant' checkbox in the following example.
|
|
45
45
|
|
|
@@ -50,14 +50,14 @@ Toggle the tab color by selecting the 'Tabs secondary variant' checkbox in the f
|
|
|
50
50
|
|
|
51
51
|
Vertical tabs are placed on the left-hand side of a page or container and may appear in both 'default' and 'boxed' tab variations.
|
|
52
52
|
|
|
53
|
-
To style tabs vertically, use the `isVertical` property.
|
|
53
|
+
To style tabs vertically, use the `isVertical` property.
|
|
54
54
|
|
|
55
55
|
```ts file="./TabsVertical.tsx"
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Vertical expandable tabs
|
|
59
59
|
|
|
60
|
-
Vertical tabs can be made expandable to save space. Users can select the caret to expand a menu and switch between tabs.
|
|
60
|
+
Vertical tabs can be made expandable to save space. Users can select the caret to expand a menu and switch between tabs.
|
|
61
61
|
|
|
62
62
|
Expandable tabs can be enabled at different breakpoints. The following example passes `expandable={{ default: 'expandable', md: 'nonExpandable', lg: 'expandable' }}` into the `<Tabs>` component.
|
|
63
63
|
|
|
@@ -75,14 +75,14 @@ To flag the default expanded state for uncontrolled tabs, use the `defaultIsExpa
|
|
|
75
75
|
|
|
76
76
|
### Default overflow tabs
|
|
77
77
|
|
|
78
|
-
By default, overflow is applied when there are too many tabs for the width of the container they are in. This overflow can be navigated by side-scrolling within the tabs section, or by selecting the left and right arrows.
|
|
78
|
+
By default, overflow is applied when there are too many tabs for the width of the container they are in. This overflow can be navigated by side-scrolling within the tabs section, or by selecting the left and right arrows.
|
|
79
79
|
|
|
80
80
|
```ts file="./TabsDefaultOverflow.tsx"
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
### Horizontal overflow tabs
|
|
84
84
|
|
|
85
|
-
Horizontal overflow can be used instead of the default application. To navigate horizontal overflow tabs users can select the last tab, labeled “more”, to see the overflowed content.
|
|
85
|
+
Horizontal overflow can be used instead of the default application. To navigate horizontal overflow tabs users can select the last tab, labeled “more”, to see the overflowed content.
|
|
86
86
|
|
|
87
87
|
To enable horizontal overflow, use the `isOverflowHorizontal` property.
|
|
88
88
|
|
|
@@ -102,7 +102,7 @@ The tooltip should also have the `id` property passed in. The value of `id` shou
|
|
|
102
102
|
|
|
103
103
|
### Uncontrolled tabs
|
|
104
104
|
|
|
105
|
-
To allow the `<Tabs>` component to manage setting the active tab and displaying correct content itself, use uncontrolled tabs, as shown in the following example.
|
|
105
|
+
To allow the `<Tabs>` component to manage setting the active tab and displaying correct content itself, use uncontrolled tabs, as shown in the following example.
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
```ts file="./TabsUncontrolled.tsx"
|
|
@@ -124,7 +124,7 @@ To adjust the left padding of tabs, use the `usePageInsets` property. This prope
|
|
|
124
124
|
|
|
125
125
|
### With icons and text
|
|
126
126
|
|
|
127
|
-
You can render different content in the `title` property of a tab to add icons and text.
|
|
127
|
+
You can render different content in the `title` property of a tab to add icons and text.
|
|
128
128
|
|
|
129
129
|
To add an icon to a tab, pass a `<TabTitleIcon>` component that contains the icon of your choice into the `title`. To use an icon alongside styled text, keep the text in the `<TabTitleText>` component.
|
|
130
130
|
|
|
@@ -133,53 +133,53 @@ To add an icon to a tab, pass a `<TabTitleIcon>` component that contains the ico
|
|
|
133
133
|
|
|
134
134
|
### Subtabs
|
|
135
135
|
|
|
136
|
-
Use subtabs within other components, like modals. Subtabs have less visually prominent styling.
|
|
136
|
+
Use subtabs within other components, like modals. Subtabs have less visually prominent styling.
|
|
137
137
|
|
|
138
|
-
To apply subtab styling to tabs, use the `isSubtab` property.
|
|
138
|
+
To apply subtab styling to tabs, use the `isSubtab` property.
|
|
139
139
|
|
|
140
140
|
```ts file="./TabsSubtabs.tsx"
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
### Filled tabs with icons
|
|
144
144
|
|
|
145
|
-
To allow tabs to fill the available width of the page section, use the `isFilled` property.
|
|
145
|
+
To allow tabs to fill the available width of the page section, use the `isFilled` property.
|
|
146
146
|
|
|
147
147
|
```ts file="./TabsFilledWithIcons.tsx"
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
### Tabs linked to nav elements
|
|
151
151
|
|
|
152
|
-
To let tabs link to nav elements, pass `{TabsComponent.nav}` into the `component` property.
|
|
152
|
+
To let tabs link to nav elements, pass `{TabsComponent.nav}` into the `component` property.
|
|
153
153
|
|
|
154
|
-
Nav tabs should use the `href` property to link the tab to the URL of another page or page section. A tab with an `href` will render as an `<a>` instead of a `<button>`.
|
|
154
|
+
Nav tabs should use the `href` property to link the tab to the URL of another page or page section. A tab with an `href` will render as an `<a>` instead of a `<button>`.
|
|
155
155
|
|
|
156
156
|
```ts file="./TabsNav.tsx"
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
### Subtabs linked to nav elements
|
|
160
160
|
|
|
161
|
-
Subtabs can also link to nav elements.
|
|
161
|
+
Subtabs can also link to nav elements.
|
|
162
162
|
|
|
163
163
|
```ts file="./TabsNavSubtab.tsx"
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
### With separate content
|
|
167
167
|
|
|
168
|
-
If a `<TabContent>` component is defined outside of a `<Tabs>` component, use the `tabContentRef` and `tabContentId` properties
|
|
168
|
+
If a `<TabContent>` component is defined outside of a `<Tabs>` component, use the `tabContentRef` and `tabContentId` properties
|
|
169
169
|
|
|
170
170
|
```ts file="./TabsSeparateContent.tsx"
|
|
171
171
|
```
|
|
172
172
|
|
|
173
173
|
### With tab content with body and padding
|
|
174
174
|
|
|
175
|
-
To add a content body to a `<TabContent>` component, pass a `<TabContentBody>`. To add padding to the body section, use the `hasPadding` property.
|
|
175
|
+
To add a content body to a `<TabContent>` component, pass a `<TabContentBody>`. To add padding to the body section, use the `hasPadding` property.
|
|
176
176
|
|
|
177
177
|
```ts file="./TabsContentWithBodyPadding.tsx"
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
### Children mounting on click
|
|
181
181
|
|
|
182
|
-
To mount tab children (add to the DOM) when a tab is clicked, use the `mountOnEnter` property.
|
|
182
|
+
To mount tab children (add to the DOM) when a tab is clicked, use the `mountOnEnter` property.
|
|
183
183
|
|
|
184
184
|
Note that this property does not create the tab children until the tab is clicked, so they are not preloaded into the DOM.
|
|
185
185
|
|
|
@@ -197,30 +197,30 @@ To unmount tab children (remove from the DOM) when they are no longer visible, u
|
|
|
197
197
|
|
|
198
198
|
You may control tabs from outside of the tabs component. For example, select the "Hide tab 2" button below to make "Tab item 2" invisible.
|
|
199
199
|
|
|
200
|
-
The tab its content should only be mounted when the tab is visible.
|
|
200
|
+
The tab its content should only be mounted when the tab is visible.
|
|
201
201
|
|
|
202
202
|
```ts file="./TabsToggledSeparateContent.tsx"
|
|
203
203
|
```
|
|
204
204
|
|
|
205
205
|
### Dynamic tabs
|
|
206
206
|
|
|
207
|
-
To enable closeable tabs, pass the `onClose` property to the `<Tabs>` component. To enable a button that adds new tabs, pass the `onAdd` property to `<Tabs>`.
|
|
207
|
+
To enable closeable tabs, pass the `onClose` property to the `<Tabs>` component. To enable a button that adds new tabs, pass the `onAdd` property to `<Tabs>`.
|
|
208
208
|
|
|
209
209
|
```ts file="./TabsDynamic.tsx"
|
|
210
210
|
```
|
|
211
211
|
|
|
212
212
|
### With help action popover
|
|
213
213
|
|
|
214
|
-
You may add a help action to a tab to provide users with additional context in a popover.
|
|
214
|
+
You may add a help action to a tab to provide users with additional context in a popover.
|
|
215
215
|
|
|
216
|
-
To render an action beside the tab content, use the `actions` property of a `<Tab>`. Pass a popover and a `<TabsAction>` component into the `actions` property.
|
|
216
|
+
To render an action beside the tab content, use the `actions` property of a `<Tab>`. Pass a popover and a `<TabsAction>` component into the `actions` property.
|
|
217
217
|
|
|
218
218
|
```ts file="./TabsHelp.tsx"
|
|
219
219
|
```
|
|
220
220
|
|
|
221
221
|
### With help and close actions
|
|
222
222
|
|
|
223
|
-
To add multiple actions to a tab, create a `<TabAction>` component for each action.
|
|
223
|
+
To add multiple actions to a tab, create a `<TabAction>` component for each action.
|
|
224
224
|
|
|
225
225
|
The following example passes in both help popover and close actions.
|
|
226
226
|
|
|
@@ -174,6 +174,75 @@ export const Tooltip: React.FunctionComponent<TooltipProps> = ({
|
|
|
174
174
|
const [visible, setVisible] = useState(false);
|
|
175
175
|
const popperRef = createRef<HTMLDivElement>();
|
|
176
176
|
|
|
177
|
+
const getTriggerRefElement = (): HTMLElement | null => {
|
|
178
|
+
if (typeof triggerRef === 'function') {
|
|
179
|
+
return triggerRef();
|
|
180
|
+
} else if (triggerRef && typeof triggerRef === 'object' && 'current' in triggerRef) {
|
|
181
|
+
return triggerRef.current;
|
|
182
|
+
} else if (triggerRef instanceof HTMLElement) {
|
|
183
|
+
return triggerRef;
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const getAriaAttributeName = () => (aria !== 'none' ? `aria-${aria}` : null);
|
|
189
|
+
|
|
190
|
+
const addAriaToRefElement = (element: HTMLElement): void => {
|
|
191
|
+
const attributeName = getAriaAttributeName();
|
|
192
|
+
if (!element || !attributeName) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const existingAria = element.getAttribute(attributeName);
|
|
197
|
+
if (!existingAria || !existingAria.includes(id)) {
|
|
198
|
+
const newAria = existingAria ? `${existingAria} ${id}` : id;
|
|
199
|
+
element.setAttribute(attributeName, newAria);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const removeAriaFromRefElement = (element: HTMLElement): void => {
|
|
204
|
+
const attributeName = getAriaAttributeName();
|
|
205
|
+
if (!element || !attributeName) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const existingAria = element.getAttribute(attributeName);
|
|
210
|
+
if (!existingAria) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const newAria = existingAria.replace(new RegExp(`\\b${id}\\b`, 'g'), '').trim();
|
|
214
|
+
if (newAria) {
|
|
215
|
+
element.setAttribute(attributeName, newAria);
|
|
216
|
+
} else {
|
|
217
|
+
element.removeAttribute(attributeName);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
const updateTriggerElementAria = (shouldAddAria: boolean): void => {
|
|
222
|
+
if (aria === 'none' || !triggerRef || children) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const triggerElement = getTriggerRefElement();
|
|
227
|
+
if (!triggerElement) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (shouldAddAria) {
|
|
232
|
+
addAriaToRefElement(triggerElement);
|
|
233
|
+
} else {
|
|
234
|
+
removeAriaFromRefElement(triggerElement);
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
useEffect(() => {
|
|
239
|
+
updateTriggerElementAria(visible);
|
|
240
|
+
|
|
241
|
+
return () => {
|
|
242
|
+
updateTriggerElementAria(false);
|
|
243
|
+
};
|
|
244
|
+
}, [visible, aria, triggerRef, children, id]);
|
|
245
|
+
|
|
177
246
|
const onDocumentKeyDown = (event: KeyboardEvent) => {
|
|
178
247
|
if (!triggerManually) {
|
|
179
248
|
if (event.key === KeyTypes.Escape && visible) {
|
|
@@ -258,8 +327,12 @@ export const Tooltip: React.FunctionComponent<TooltipProps> = ({
|
|
|
258
327
|
}
|
|
259
328
|
};
|
|
260
329
|
|
|
261
|
-
const
|
|
262
|
-
if (
|
|
330
|
+
const addAriaToChildren = () => {
|
|
331
|
+
if (!children) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
if (aria === 'describedby' && children.props && !children.props['aria-describedby']) {
|
|
263
336
|
return cloneElement(children, { 'aria-describedby': id });
|
|
264
337
|
} else if (aria === 'labelledby' && children.props && !children.props['aria-labelledby']) {
|
|
265
338
|
return cloneElement(children, { 'aria-labelledby': id });
|
|
@@ -269,7 +342,7 @@ export const Tooltip: React.FunctionComponent<TooltipProps> = ({
|
|
|
269
342
|
|
|
270
343
|
return (
|
|
271
344
|
<Popper
|
|
272
|
-
trigger={aria !== 'none' && visible ?
|
|
345
|
+
trigger={aria !== 'none' && visible ? addAriaToChildren() : children}
|
|
273
346
|
triggerRef={triggerRef}
|
|
274
347
|
popper={content}
|
|
275
348
|
popperRef={popperRef}
|
|
@@ -204,3 +204,129 @@ test('Matches snapshot', async () => {
|
|
|
204
204
|
const tooltip = await screen.findByRole('tooltip');
|
|
205
205
|
expect(tooltip).toMatchSnapshot();
|
|
206
206
|
});
|
|
207
|
+
|
|
208
|
+
test('Applies aria-describedby to triggerRef element when no children are provided', async () => {
|
|
209
|
+
const triggerRef = createRef<HTMLButtonElement>();
|
|
210
|
+
|
|
211
|
+
render(
|
|
212
|
+
<>
|
|
213
|
+
<button ref={triggerRef}>Trigger</button>
|
|
214
|
+
<Tooltip id="trigger-ref-test" triggerRef={triggerRef} isVisible content="Test description" />
|
|
215
|
+
</>
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
await screen.findByRole('tooltip');
|
|
219
|
+
expect(triggerRef.current).toHaveAccessibleDescription('Test description');
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
test('Applies aria-labelledby to triggerRef element when no children are provided', async () => {
|
|
223
|
+
const triggerRef = createRef<HTMLButtonElement>();
|
|
224
|
+
|
|
225
|
+
render(
|
|
226
|
+
<>
|
|
227
|
+
<button ref={triggerRef}>Trigger</button>
|
|
228
|
+
<Tooltip id="trigger-ref-test" aria="labelledby" triggerRef={triggerRef} isVisible content="Test label" />
|
|
229
|
+
</>
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
await screen.findByRole('tooltip');
|
|
233
|
+
expect(triggerRef.current).toHaveAccessibleName('Test label');
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
test('Removes aria-describedby from triggerRef element when tooltip is hidden', async () => {
|
|
237
|
+
const triggerRef = createRef<HTMLButtonElement>();
|
|
238
|
+
|
|
239
|
+
const TooltipTest = () => {
|
|
240
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
241
|
+
|
|
242
|
+
return (
|
|
243
|
+
<>
|
|
244
|
+
<button ref={triggerRef} onClick={() => setIsVisible(!isVisible)}>
|
|
245
|
+
Trigger
|
|
246
|
+
</button>
|
|
247
|
+
<Tooltip id="trigger-ref-test" triggerRef={triggerRef} isVisible={isVisible} content="Test description" />
|
|
248
|
+
</>
|
|
249
|
+
);
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
render(<TooltipTest />);
|
|
253
|
+
|
|
254
|
+
// Tooltip should be visible initially
|
|
255
|
+
await screen.findByRole('tooltip');
|
|
256
|
+
expect(triggerRef.current).toHaveAccessibleDescription('Test description');
|
|
257
|
+
|
|
258
|
+
// Hide tooltip
|
|
259
|
+
const user = userEvent.setup();
|
|
260
|
+
await user.click(triggerRef.current);
|
|
261
|
+
|
|
262
|
+
// aria-describedby should be removed
|
|
263
|
+
expect(triggerRef.current).not.toHaveAccessibleDescription();
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
test('Removes aria-labelledby from triggerRef element when tooltip is hidden', async () => {
|
|
267
|
+
const triggerRef = createRef<HTMLButtonElement>();
|
|
268
|
+
|
|
269
|
+
const TooltipTest = () => {
|
|
270
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
271
|
+
|
|
272
|
+
return (
|
|
273
|
+
<>
|
|
274
|
+
<button ref={triggerRef} onClick={() => setIsVisible(!isVisible)} />
|
|
275
|
+
<Tooltip
|
|
276
|
+
aria="labelledby"
|
|
277
|
+
id="trigger-ref-test"
|
|
278
|
+
triggerRef={triggerRef}
|
|
279
|
+
isVisible={isVisible}
|
|
280
|
+
content="Test label"
|
|
281
|
+
/>
|
|
282
|
+
</>
|
|
283
|
+
);
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
render(<TooltipTest />);
|
|
287
|
+
|
|
288
|
+
// Tooltip should be visible initially
|
|
289
|
+
await screen.findByRole('tooltip');
|
|
290
|
+
expect(triggerRef.current).toHaveAccessibleName('Test label');
|
|
291
|
+
|
|
292
|
+
// Hide tooltip
|
|
293
|
+
const user = userEvent.setup();
|
|
294
|
+
await user.click(triggerRef.current);
|
|
295
|
+
|
|
296
|
+
// aria-describedby should be removed
|
|
297
|
+
expect(triggerRef.current).not.toHaveAccessibleName();
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
test('Preserves existing aria-describedby on triggerRef element', async () => {
|
|
301
|
+
const triggerRef = createRef<HTMLButtonElement>();
|
|
302
|
+
|
|
303
|
+
render(
|
|
304
|
+
<>
|
|
305
|
+
<div id="existing-aria">Existing description</div>
|
|
306
|
+
<button ref={triggerRef} aria-describedby="existing-aria">
|
|
307
|
+
Trigger
|
|
308
|
+
</button>
|
|
309
|
+
<Tooltip id="trigger-ref-test" triggerRef={triggerRef} isVisible content="Test description" />
|
|
310
|
+
</>
|
|
311
|
+
);
|
|
312
|
+
|
|
313
|
+
await screen.findByRole('tooltip');
|
|
314
|
+
expect(triggerRef.current).toHaveAccessibleDescription('Existing description Test description');
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
test('Preserves existing aria-labelledby on triggerRef element', async () => {
|
|
318
|
+
const triggerRef = createRef<HTMLButtonElement>();
|
|
319
|
+
|
|
320
|
+
render(
|
|
321
|
+
<>
|
|
322
|
+
<div id="existing-aria">Existing label</div>
|
|
323
|
+
<button ref={triggerRef} aria-labelledby="existing-aria">
|
|
324
|
+
Trigger
|
|
325
|
+
</button>
|
|
326
|
+
<Tooltip aria="labelledby" id="trigger-ref-test" triggerRef={triggerRef} isVisible content="Test label" />
|
|
327
|
+
</>
|
|
328
|
+
);
|
|
329
|
+
|
|
330
|
+
await screen.findByRole('tooltip');
|
|
331
|
+
expect(triggerRef.current).toHaveAccessibleName('Existing label Test label');
|
|
332
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TreeViewList } from './TreeViewList';
|
|
2
2
|
import { TreeViewCheckProps, TreeViewListItem } from './TreeViewListItem';
|
|
3
3
|
import { TreeViewRoot } from './TreeViewRoot';
|
|
4
|
+
import { useHasAnimations } from '../../helpers';
|
|
4
5
|
|
|
5
6
|
/** Properties that make up a tree view data item. These properties should be passed in as an
|
|
6
7
|
* object to one of the various tree view component properties which accept TreeViewDataItem as
|
|
@@ -135,9 +136,10 @@ export const TreeView: React.FunctionComponent<TreeViewProps> = ({
|
|
|
135
136
|
useMemo,
|
|
136
137
|
'aria-label': ariaLabel,
|
|
137
138
|
'aria-labelledby': ariaLabelledby,
|
|
138
|
-
hasAnimations,
|
|
139
|
+
hasAnimations: hasAnimationsProp,
|
|
139
140
|
...props
|
|
140
141
|
}: TreeViewProps) => {
|
|
142
|
+
const hasAnimations = useHasAnimations(hasAnimationsProp);
|
|
141
143
|
const treeViewList = (
|
|
142
144
|
<TreeViewList
|
|
143
145
|
isNested={isNested}
|
|
@@ -5,6 +5,7 @@ import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-i
|
|
|
5
5
|
import { TreeViewDataItem } from './TreeView';
|
|
6
6
|
import { Badge } from '../Badge';
|
|
7
7
|
import { GenerateId } from '../../helpers/GenerateId/GenerateId';
|
|
8
|
+
import { useHasAnimations } from '../../helpers';
|
|
8
9
|
|
|
9
10
|
export interface TreeViewCheckProps extends Omit<Partial<React.InputHTMLAttributes<HTMLInputElement>>, 'checked'> {
|
|
10
11
|
checked?: boolean | null;
|
|
@@ -102,10 +103,11 @@ const TreeViewListItemBase: React.FunctionComponent<TreeViewListItemProps> = ({
|
|
|
102
103
|
expandedIcon,
|
|
103
104
|
action,
|
|
104
105
|
compareItems,
|
|
105
|
-
hasAnimations,
|
|
106
|
+
hasAnimations: hasAnimationsProp,
|
|
106
107
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
107
108
|
useMemo
|
|
108
109
|
}: TreeViewListItemProps) => {
|
|
110
|
+
const hasAnimations = useHasAnimations(hasAnimationsProp);
|
|
109
111
|
const [internalIsExpanded, setIsExpanded] = useState(defaultExpanded);
|
|
110
112
|
useEffect(() => {
|
|
111
113
|
if (isExpanded !== undefined && isExpanded !== null) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { render, screen } from '@testing-library/react';
|
|
2
2
|
import userEvent from '@testing-library/user-event';
|
|
3
3
|
import { TreeView } from '../TreeView';
|
|
4
|
+
import { AnimationsProvider } from '../../../helpers/AnimationsProvider';
|
|
4
5
|
|
|
5
6
|
jest.mock('../TreeViewList', () => ({
|
|
6
7
|
TreeViewList: ({
|
|
@@ -293,6 +294,33 @@ test('Passes hasAnimations to TreeViewListItem', () => {
|
|
|
293
294
|
|
|
294
295
|
expect(screen.getByText('TreeViewListItem hasAnimations: true')).toBeVisible();
|
|
295
296
|
});
|
|
297
|
+
|
|
298
|
+
// Animation context tests
|
|
299
|
+
test('respects AnimationsProvider context when no local hasAnimations prop', () => {
|
|
300
|
+
render(
|
|
301
|
+
<AnimationsProvider config={{ hasAnimations: true }}>
|
|
302
|
+
<TreeView data={[basicData]} />
|
|
303
|
+
</AnimationsProvider>
|
|
304
|
+
);
|
|
305
|
+
|
|
306
|
+
expect(screen.getByText('TreeViewListItem hasAnimations: true')).toBeVisible();
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
test('local hasAnimations prop takes precedence over context', () => {
|
|
310
|
+
render(
|
|
311
|
+
<AnimationsProvider config={{ hasAnimations: true }}>
|
|
312
|
+
<TreeView data={[basicData]} hasAnimations={false} />
|
|
313
|
+
</AnimationsProvider>
|
|
314
|
+
);
|
|
315
|
+
|
|
316
|
+
expect(screen.getByText('TreeViewListItem hasAnimations: false')).toBeVisible();
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
test('works without AnimationsProvider (backward compatibility)', () => {
|
|
320
|
+
render(<TreeView data={[basicData]} />);
|
|
321
|
+
|
|
322
|
+
expect(screen.getByText('TreeViewListItem hasAnimations: false')).toBeVisible();
|
|
323
|
+
});
|
|
296
324
|
test('Passes data.children to TreeViewListItem', () => {
|
|
297
325
|
render(<TreeView data={[{ ...basicData, children: [{ name: 'Child 1' }] }]} />);
|
|
298
326
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, useEffect, useRef, useState, forwardRef } from 'react';
|
|
1
|
+
import { Fragment, useEffect, useRef, useState, forwardRef, useImperativeHandle } from 'react';
|
|
2
2
|
import styles from '@patternfly/react-styles/css/components/Truncate/truncate';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { Tooltip, TooltipPosition, TooltipProps } from '../Tooltip';
|
|
@@ -75,6 +75,7 @@ const TruncateBase: React.FunctionComponent<TruncateProps> = ({
|
|
|
75
75
|
maxCharsDisplayed,
|
|
76
76
|
omissionContent = '\u2026',
|
|
77
77
|
content,
|
|
78
|
+
innerRef,
|
|
78
79
|
...props
|
|
79
80
|
}: TruncateProps) => {
|
|
80
81
|
const [isTruncated, setIsTruncated] = useState(true);
|
|
@@ -83,6 +84,7 @@ const TruncateBase: React.FunctionComponent<TruncateProps> = ({
|
|
|
83
84
|
const [shouldRenderByMaxChars, setShouldRenderByMaxChars] = useState(maxCharsDisplayed > 0);
|
|
84
85
|
|
|
85
86
|
const textRef = useRef<HTMLElement>(null);
|
|
87
|
+
useImperativeHandle(innerRef, () => textRef.current!);
|
|
86
88
|
const defaultSubParentRef = useRef<any>(null);
|
|
87
89
|
const subParentRef = tooltipProps?.triggerRef || defaultSubParentRef;
|
|
88
90
|
const observer = useRef(null);
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
overflow: auto;
|
|
5
5
|
min-width: 161px;
|
|
6
6
|
max-width: 100%;
|
|
7
|
-
padding: var(--pf-
|
|
8
|
-
border: var(--pf-
|
|
7
|
+
padding: var(--pf-t--global--spacer--sm);
|
|
8
|
+
border: var(--pf-t--global--border--width--box--default) solid var(--pf-t--global--border--color--default);
|
|
9
9
|
}
|
|
@@ -116,7 +116,7 @@ export const WizardNavItem = ({
|
|
|
116
116
|
<span className={css(styles.wizardNavLinkMain)}>
|
|
117
117
|
{isExpandable ? (
|
|
118
118
|
<>
|
|
119
|
-
<span className=
|
|
119
|
+
<span className="pf-v6-c-wizard__nav-link-text">{content}</span>
|
|
120
120
|
<span className={css(styles.wizardNavLinkToggle)}>
|
|
121
121
|
<span className={css(styles.wizardNavLinkToggleIcon)}>
|
|
122
122
|
<AngleRightIcon aria-label={`${isCurrent ? 'Collapse' : 'Expand'} step icon`} />
|