@patternfly/react-core 6.3.0-prerelease.12 → 6.3.0-prerelease.14
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 +12 -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/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 +2 -0
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js +2 -2
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/esm/components/Tabs/OverflowTab.d.ts +26 -0
- package/dist/esm/components/Tabs/OverflowTab.d.ts.map +1 -1
- package/dist/esm/components/Tabs/OverflowTab.js +2 -2
- package/dist/esm/components/Tabs/OverflowTab.js.map +1 -1
- package/dist/esm/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tab.js +5 -2
- package/dist/esm/components/Tabs/Tab.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts +8 -0
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +41 -9
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Tabs/TabsContext.d.ts +1 -0
- package/dist/esm/components/Tabs/TabsContext.d.ts.map +1 -1
- package/dist/esm/components/Tabs/TabsContext.js +1 -0
- package/dist/esm/components/Tabs/TabsContext.js.map +1 -1
- package/dist/esm/components/Truncate/Truncate.d.ts +11 -8
- package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/esm/components/Truncate/Truncate.js +16 -9
- package/dist/esm/components/Truncate/Truncate.js.map +1 -1
- package/dist/esm/helpers/util.d.ts +17 -0
- package/dist/esm/helpers/util.d.ts.map +1 -1
- package/dist/esm/helpers/util.js +36 -0
- package/dist/esm/helpers/util.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js +2 -2
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/js/components/Tabs/OverflowTab.d.ts +26 -0
- package/dist/js/components/Tabs/OverflowTab.d.ts.map +1 -1
- package/dist/js/components/Tabs/OverflowTab.js +2 -2
- package/dist/js/components/Tabs/OverflowTab.js.map +1 -1
- package/dist/js/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tab.js +4 -1
- package/dist/js/components/Tabs/Tab.js.map +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts +8 -0
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +40 -8
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/components/Tabs/TabsContext.d.ts +1 -0
- package/dist/js/components/Tabs/TabsContext.d.ts.map +1 -1
- package/dist/js/components/Tabs/TabsContext.js +1 -0
- package/dist/js/components/Tabs/TabsContext.js.map +1 -1
- package/dist/js/components/Truncate/Truncate.d.ts +11 -8
- package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/js/components/Truncate/Truncate.js +15 -9
- package/dist/js/components/Truncate/Truncate.js.map +1 -1
- package/dist/js/helpers/util.d.ts +17 -0
- package/dist/js/helpers/util.d.ts.map +1 -1
- package/dist/js/helpers/util.js +39 -1
- package/dist/js/helpers/util.js.map +1 -1
- package/dist/styles/base-no-reset.css +11 -11
- package/dist/styles/base.css +11 -11
- package/dist/umd/assets/{output-85UrEgTH.css → output-DXt7tMoN.css} +19635 -19582
- package/dist/umd/react-core.min.js +1 -1
- 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/ClipboardCopy/ClipboardCopy.tsx +2 -1
- package/src/components/Tabs/OverflowTab.tsx +29 -0
- package/src/components/Tabs/Tab.tsx +6 -2
- package/src/components/Tabs/Tabs.tsx +70 -11
- package/src/components/Tabs/TabsContext.ts +2 -0
- package/src/components/Tabs/__tests__/Tabs.test.tsx +43 -1
- package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +39 -26
- package/src/components/Tabs/examples/Tabs.md +1 -1
- package/src/components/Truncate/Truncate.tsx +40 -19
- package/src/components/Truncate/__tests__/Truncate.test.tsx +24 -0
- package/src/components/Truncate/examples/Truncate.md +8 -0
- package/src/components/Truncate/examples/TruncateLinks.tsx +22 -0
- package/src/helpers/util.ts +45 -0
package/helpers/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.3.0-prerelease.13","private":true}
|
package/layouts/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.3.0-prerelease.13","private":true}
|
package/next/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.3.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.3.0-prerelease.13","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.3.0-prerelease.
|
|
3
|
+
"version": "6.3.0-prerelease.14",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@patternfly/react-icons": "^6.3.0-prerelease.
|
|
50
|
-
"@patternfly/react-styles": "^6.3.0-prerelease.
|
|
51
|
-
"@patternfly/react-tokens": "^6.3.0-prerelease.
|
|
49
|
+
"@patternfly/react-icons": "^6.3.0-prerelease.3",
|
|
50
|
+
"@patternfly/react-styles": "^6.3.0-prerelease.3",
|
|
51
|
+
"@patternfly/react-tokens": "^6.3.0-prerelease.3",
|
|
52
52
|
"focus-trap": "7.6.4",
|
|
53
53
|
"react-dropzone": "^14.3.5",
|
|
54
54
|
"tslib": "^2.8.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@patternfly/patternfly": "6.3.0-prerelease.
|
|
57
|
+
"@patternfly/patternfly": "6.3.0-prerelease.20",
|
|
58
58
|
"case-anything": "^3.1.2",
|
|
59
59
|
"css": "^3.0.0",
|
|
60
60
|
"fs-extra": "^11.3.0"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react": "^17 || ^18 || ^19",
|
|
64
64
|
"react-dom": "^17 || ^18 || ^19"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "e62933d6c64d3fbeb599a2e3a7c8dc3ab7a981e1"
|
|
67
67
|
}
|
|
@@ -204,7 +204,7 @@ class ClipboardCopy extends Component<ClipboardCopyProps, ClipboardCopyState> {
|
|
|
204
204
|
const shouldTruncate = variant === ClipboardCopyVariant.inlineCompact && truncation;
|
|
205
205
|
const inlineCompactContent = shouldTruncate ? (
|
|
206
206
|
<Truncate
|
|
207
|
-
|
|
207
|
+
tooltipProps={{ triggerRef: this.clipboardRef }}
|
|
208
208
|
content={copyableText}
|
|
209
209
|
{...(typeof truncation === 'object' && truncation)}
|
|
210
210
|
/>
|
|
@@ -223,6 +223,7 @@ class ClipboardCopy extends Component<ClipboardCopyProps, ClipboardCopyState> {
|
|
|
223
223
|
className
|
|
224
224
|
)}
|
|
225
225
|
ref={this.clipboardRef}
|
|
226
|
+
{...(shouldTruncate && { tabIndex: 0 })}
|
|
226
227
|
{...divProps}
|
|
227
228
|
{...getOUIAProps(ClipboardCopy.displayName, ouiaId, ouiaSafe)}
|
|
228
229
|
>
|
|
@@ -8,6 +8,31 @@ import { TabsContext } from './TabsContext';
|
|
|
8
8
|
import { TabProps } from './Tab';
|
|
9
9
|
import { TabTitleText } from './TabTitleText';
|
|
10
10
|
|
|
11
|
+
export interface HorizontalOverflowPopperProps {
|
|
12
|
+
/** Vertical direction of the popper. If enableFlip is set to true, this will set the initial direction before the popper flips. */
|
|
13
|
+
direction?: 'up' | 'down';
|
|
14
|
+
/** Horizontal position of the popper */
|
|
15
|
+
position?: 'right' | 'left' | 'center' | 'start' | 'end';
|
|
16
|
+
/** Custom width of the popper. If the value is "trigger", it will set the width to the select toggle's width */
|
|
17
|
+
width?: string | 'trigger';
|
|
18
|
+
/** Minimum width of the popper. If the value is "trigger", it will set the min width to the select toggle's width */
|
|
19
|
+
minWidth?: string | 'trigger';
|
|
20
|
+
/** Maximum width of the popper. If the value is "trigger", it will set the max width to the select toggle's width */
|
|
21
|
+
maxWidth?: string | 'trigger';
|
|
22
|
+
/** Enable to flip the popper when it reaches the boundary */
|
|
23
|
+
enableFlip?: boolean;
|
|
24
|
+
/** The container to append the select to. Defaults to document.body.
|
|
25
|
+
* If your select is being cut off you can append it to an element higher up the DOM tree.
|
|
26
|
+
* Some examples:
|
|
27
|
+
* appendTo="inline"
|
|
28
|
+
* appendTo={() => document.body}
|
|
29
|
+
* appendTo={document.getElementById('target')}
|
|
30
|
+
*/
|
|
31
|
+
appendTo?: HTMLElement | (() => HTMLElement) | 'inline';
|
|
32
|
+
/** Flag to prevent the popper from overflowing its container and becoming partially obscured. */
|
|
33
|
+
preventOverflow?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
11
36
|
export interface OverflowTabProps extends React.HTMLProps<HTMLLIElement> {
|
|
12
37
|
/** Additional classes added to the overflow tab */
|
|
13
38
|
className?: string;
|
|
@@ -25,6 +50,8 @@ export interface OverflowTabProps extends React.HTMLProps<HTMLLIElement> {
|
|
|
25
50
|
shouldPreventScrollOnItemFocus?: boolean;
|
|
26
51
|
/** Time in ms to wait before firing the toggles' focus event. Defaults to 0 */
|
|
27
52
|
focusTimeoutDelay?: number;
|
|
53
|
+
/** Additional props to spread to the popper menu. */
|
|
54
|
+
popperProps?: HorizontalOverflowPopperProps;
|
|
28
55
|
}
|
|
29
56
|
|
|
30
57
|
export const OverflowTab: React.FunctionComponent<OverflowTabProps> = ({
|
|
@@ -36,6 +63,7 @@ export const OverflowTab: React.FunctionComponent<OverflowTabProps> = ({
|
|
|
36
63
|
zIndex = 9999,
|
|
37
64
|
shouldPreventScrollOnItemFocus = true,
|
|
38
65
|
focusTimeoutDelay = 0,
|
|
66
|
+
popperProps,
|
|
39
67
|
...props
|
|
40
68
|
}: OverflowTabProps) => {
|
|
41
69
|
const menuRef = useRef<HTMLDivElement>(undefined);
|
|
@@ -148,6 +176,7 @@ export const OverflowTab: React.FunctionComponent<OverflowTabProps> = ({
|
|
|
148
176
|
minWidth="revert"
|
|
149
177
|
appendTo={overflowLIRef.current}
|
|
150
178
|
zIndex={zIndex}
|
|
179
|
+
{...popperProps}
|
|
151
180
|
/>
|
|
152
181
|
</Fragment>
|
|
153
182
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useContext, forwardRef } from 'react';
|
|
1
|
+
import { useContext, forwardRef, useEffect } from 'react';
|
|
2
2
|
import styles from '@patternfly/react-styles/css/components/Tabs/tabs';
|
|
3
3
|
import { OUIAProps } from '../../helpers';
|
|
4
4
|
import { TabButton } from './TabButton';
|
|
@@ -75,7 +75,7 @@ const TabBase: React.FunctionComponent<TabProps> = ({
|
|
|
75
75
|
}),
|
|
76
76
|
{}
|
|
77
77
|
);
|
|
78
|
-
const { mountOnEnter, localActiveKey, unmountOnExit, uniqueId, handleTabClick, handleTabClose } =
|
|
78
|
+
const { mountOnEnter, localActiveKey, unmountOnExit, uniqueId, setAccentStyles, handleTabClick, handleTabClose } =
|
|
79
79
|
useContext(TabsContext);
|
|
80
80
|
let ariaControls = tabContentId ? `${tabContentId}` : `pf-tab-section-${eventKey}-${childId || uniqueId}`;
|
|
81
81
|
if ((mountOnEnter || unmountOnExit) && eventKey !== localActiveKey) {
|
|
@@ -116,6 +116,10 @@ const TabBase: React.FunctionComponent<TabProps> = ({
|
|
|
116
116
|
</TabButton>
|
|
117
117
|
);
|
|
118
118
|
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
setAccentStyles(true);
|
|
121
|
+
}, [title, actions]);
|
|
122
|
+
|
|
119
123
|
return (
|
|
120
124
|
<li
|
|
121
125
|
className={css(
|
|
@@ -5,20 +5,27 @@ import { PickOptional } from '../../helpers/typeUtils';
|
|
|
5
5
|
import AngleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-left-icon';
|
|
6
6
|
import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
|
|
7
7
|
import PlusIcon from '@patternfly/react-icons/dist/esm/icons/plus-icon';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
getUniqueId,
|
|
10
|
+
isElementInView,
|
|
11
|
+
formatBreakpointMods,
|
|
12
|
+
getLanguageDirection,
|
|
13
|
+
getInlineStartProperty
|
|
14
|
+
} from '../../helpers/util';
|
|
9
15
|
import { TabContent } from './TabContent';
|
|
10
16
|
import { TabProps } from './Tab';
|
|
11
17
|
import { TabsContextProvider } from './TabsContext';
|
|
12
|
-
import { OverflowTab } from './OverflowTab';
|
|
18
|
+
import { OverflowTab, HorizontalOverflowPopperProps } from './OverflowTab';
|
|
13
19
|
import { Button } from '../Button';
|
|
14
20
|
import { getOUIAProps, OUIAProps, getDefaultOUIAId, canUseDOM } from '../../helpers';
|
|
15
21
|
import { GenerateId } from '../../helpers/GenerateId/GenerateId';
|
|
22
|
+
import linkAccentLength from '@patternfly/react-tokens/dist/esm/c_tabs_link_accent_length';
|
|
23
|
+
import linkAccentStart from '@patternfly/react-tokens/dist/esm/c_tabs_link_accent_start';
|
|
16
24
|
|
|
17
25
|
export enum TabsComponent {
|
|
18
26
|
div = 'div',
|
|
19
27
|
nav = 'nav'
|
|
20
28
|
}
|
|
21
|
-
|
|
22
29
|
export interface HorizontalOverflowObject {
|
|
23
30
|
/** Flag which shows the count of overflowing tabs when enabled */
|
|
24
31
|
showTabCount?: boolean;
|
|
@@ -26,6 +33,8 @@ export interface HorizontalOverflowObject {
|
|
|
26
33
|
defaultTitleText?: string;
|
|
27
34
|
/** The aria label applied to the button which toggles the tab overflow menu */
|
|
28
35
|
toggleAriaLabel?: string;
|
|
36
|
+
/** Additional props to spread to the popper menu. */
|
|
37
|
+
popperProps?: HorizontalOverflowPopperProps;
|
|
29
38
|
}
|
|
30
39
|
|
|
31
40
|
type TabElement = React.ReactElement<TabProps, React.JSXElementConstructor<TabProps>>;
|
|
@@ -139,6 +148,9 @@ interface TabsState {
|
|
|
139
148
|
uncontrolledIsExpandedLocal: boolean;
|
|
140
149
|
ouiaStateId: string;
|
|
141
150
|
overflowingTabCount: number;
|
|
151
|
+
isInitializingAccent: boolean;
|
|
152
|
+
currentLinkAccentLength: string;
|
|
153
|
+
currentLinkAccentStart: string;
|
|
142
154
|
}
|
|
143
155
|
|
|
144
156
|
class Tabs extends Component<TabsProps, TabsState> {
|
|
@@ -158,7 +170,10 @@ class Tabs extends Component<TabsProps, TabsState> {
|
|
|
158
170
|
uncontrolledActiveKey: this.props.defaultActiveKey,
|
|
159
171
|
uncontrolledIsExpandedLocal: this.props.defaultIsExpanded,
|
|
160
172
|
ouiaStateId: getDefaultOUIAId(Tabs.displayName),
|
|
161
|
-
overflowingTabCount: 0
|
|
173
|
+
overflowingTabCount: 0,
|
|
174
|
+
isInitializingAccent: true,
|
|
175
|
+
currentLinkAccentLength: linkAccentLength.value,
|
|
176
|
+
currentLinkAccentStart: linkAccentStart.value
|
|
162
177
|
};
|
|
163
178
|
|
|
164
179
|
if (this.props.isVertical && this.props.expandable !== undefined) {
|
|
@@ -328,21 +343,49 @@ class Tabs extends Component<TabsProps, TabsState> {
|
|
|
328
343
|
}
|
|
329
344
|
};
|
|
330
345
|
|
|
346
|
+
setAccentStyles = (shouldInitializeStyle?: boolean) => {
|
|
347
|
+
const currentItem = this.tabList.current.querySelector('li.pf-m-current') as HTMLElement;
|
|
348
|
+
if (!currentItem) {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
const { isVertical } = this.props;
|
|
353
|
+
const { offsetWidth, offsetHeight, offsetTop } = currentItem;
|
|
354
|
+
const lengthValue = isVertical ? offsetHeight : offsetWidth;
|
|
355
|
+
const startValue = isVertical ? offsetTop : getInlineStartProperty(currentItem, this.tabList.current);
|
|
356
|
+
this.setState({
|
|
357
|
+
currentLinkAccentLength: `${lengthValue}px`,
|
|
358
|
+
currentLinkAccentStart: `${startValue}px`,
|
|
359
|
+
...(shouldInitializeStyle && { isInitializingAccent: true })
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
setTimeout(() => {
|
|
363
|
+
this.setState({ isInitializingAccent: false });
|
|
364
|
+
}, 0);
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
handleResize = () => {
|
|
368
|
+
this.handleScrollButtons();
|
|
369
|
+
this.setAccentStyles();
|
|
370
|
+
};
|
|
371
|
+
|
|
331
372
|
componentDidMount() {
|
|
332
373
|
if (!this.props.isVertical) {
|
|
333
374
|
if (canUseDOM) {
|
|
334
|
-
window.addEventListener('resize', this.
|
|
375
|
+
window.addEventListener('resize', this.handleResize, false);
|
|
335
376
|
}
|
|
336
377
|
this.direction = getLanguageDirection(this.tabList.current);
|
|
337
378
|
// call the handle resize function to check if scroll buttons should be shown
|
|
338
379
|
this.handleScrollButtons();
|
|
339
380
|
}
|
|
381
|
+
|
|
382
|
+
this.setAccentStyles(true);
|
|
340
383
|
}
|
|
341
384
|
|
|
342
385
|
componentWillUnmount() {
|
|
343
386
|
if (!this.props.isVertical) {
|
|
344
387
|
if (canUseDOM) {
|
|
345
|
-
window.removeEventListener('resize', this.
|
|
388
|
+
window.removeEventListener('resize', this.handleResize, false);
|
|
346
389
|
}
|
|
347
390
|
}
|
|
348
391
|
clearTimeout(this.scrollTimeout);
|
|
@@ -350,8 +393,18 @@ class Tabs extends Component<TabsProps, TabsState> {
|
|
|
350
393
|
}
|
|
351
394
|
|
|
352
395
|
componentDidUpdate(prevProps: TabsProps, prevState: TabsState) {
|
|
353
|
-
|
|
354
|
-
const {
|
|
396
|
+
this.direction = getLanguageDirection(this.tabList.current);
|
|
397
|
+
const { activeKey, mountOnEnter, isOverflowHorizontal, children, defaultActiveKey } = this.props;
|
|
398
|
+
const { shownKeys, overflowingTabCount, enableScrollButtons, uncontrolledActiveKey } = this.state;
|
|
399
|
+
const isOnCloseUpdate = !!prevProps.onClose !== !!this.props.onClose;
|
|
400
|
+
if (
|
|
401
|
+
(defaultActiveKey !== undefined && prevState.uncontrolledActiveKey !== uncontrolledActiveKey) ||
|
|
402
|
+
(defaultActiveKey === undefined && prevProps.activeKey !== activeKey) ||
|
|
403
|
+
isOnCloseUpdate
|
|
404
|
+
) {
|
|
405
|
+
this.setAccentStyles(isOnCloseUpdate);
|
|
406
|
+
}
|
|
407
|
+
|
|
355
408
|
if (prevProps.activeKey !== activeKey && mountOnEnter && shownKeys.indexOf(activeKey) < 0) {
|
|
356
409
|
this.setState({
|
|
357
410
|
shownKeys: shownKeys.concat(activeKey)
|
|
@@ -364,6 +417,7 @@ class Tabs extends Component<TabsProps, TabsState> {
|
|
|
364
417
|
Children.toArray(prevProps.children).length !== Children.toArray(children).length
|
|
365
418
|
) {
|
|
366
419
|
this.handleScrollButtons();
|
|
420
|
+
this.setAccentStyles(true);
|
|
367
421
|
}
|
|
368
422
|
|
|
369
423
|
const currentOverflowingTabCount = this.countOverflowingElements(this.tabList.current);
|
|
@@ -380,8 +434,6 @@ class Tabs extends Component<TabsProps, TabsState> {
|
|
|
380
434
|
} else if (prevState.enableScrollButtons && !enableScrollButtons) {
|
|
381
435
|
this.setState({ showScrollButtons: false });
|
|
382
436
|
}
|
|
383
|
-
|
|
384
|
-
this.direction = getLanguageDirection(this.tabList.current);
|
|
385
437
|
}
|
|
386
438
|
|
|
387
439
|
static getDerivedStateFromProps(nextProps: TabsProps, prevState: TabsState) {
|
|
@@ -450,7 +502,10 @@ class Tabs extends Component<TabsProps, TabsState> {
|
|
|
450
502
|
shownKeys,
|
|
451
503
|
uncontrolledActiveKey,
|
|
452
504
|
uncontrolledIsExpandedLocal,
|
|
453
|
-
overflowingTabCount
|
|
505
|
+
overflowingTabCount,
|
|
506
|
+
isInitializingAccent,
|
|
507
|
+
currentLinkAccentLength,
|
|
508
|
+
currentLinkAccentStart
|
|
454
509
|
} = this.state;
|
|
455
510
|
const filteredChildren = Children.toArray(children)
|
|
456
511
|
.filter((child): child is TabElement => isValidElement(child))
|
|
@@ -485,6 +540,7 @@ class Tabs extends Component<TabsProps, TabsState> {
|
|
|
485
540
|
unmountOnExit,
|
|
486
541
|
localActiveKey,
|
|
487
542
|
uniqueId,
|
|
543
|
+
setAccentStyles: this.setAccentStyles,
|
|
488
544
|
handleTabClick: (...args) => this.handleTabClick(...args),
|
|
489
545
|
handleTabClose: onClose
|
|
490
546
|
}}
|
|
@@ -493,6 +549,7 @@ class Tabs extends Component<TabsProps, TabsState> {
|
|
|
493
549
|
aria-label={ariaLabel}
|
|
494
550
|
className={css(
|
|
495
551
|
styles.tabs,
|
|
552
|
+
styles.modifiers.animateCurrent,
|
|
496
553
|
isFilled && styles.modifiers.fill,
|
|
497
554
|
isSubtab && styles.modifiers.subtab,
|
|
498
555
|
isVertical && styles.modifiers.vertical,
|
|
@@ -505,10 +562,12 @@ class Tabs extends Component<TabsProps, TabsState> {
|
|
|
505
562
|
formatBreakpointMods(inset, styles),
|
|
506
563
|
variantStyle[variant],
|
|
507
564
|
hasOverflowTab && styles.modifiers.overflow,
|
|
565
|
+
isInitializingAccent && styles.modifiers.initializingAccent,
|
|
508
566
|
className
|
|
509
567
|
)}
|
|
510
568
|
{...getOUIAProps(Tabs.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe)}
|
|
511
569
|
id={id && id}
|
|
570
|
+
style={{ [linkAccentLength.name]: currentLinkAccentLength, [linkAccentStart.name]: currentLinkAccentStart }}
|
|
512
571
|
{...props}
|
|
513
572
|
>
|
|
514
573
|
{expandable && isVertical && (
|
|
@@ -6,6 +6,7 @@ export interface TabsContextProps {
|
|
|
6
6
|
unmountOnExit: boolean;
|
|
7
7
|
localActiveKey: string | number;
|
|
8
8
|
uniqueId: string;
|
|
9
|
+
setAccentStyles: (shouldInitializeStyles?: boolean) => void;
|
|
9
10
|
handleTabClick: (
|
|
10
11
|
event: React.MouseEvent<HTMLElement, MouseEvent>,
|
|
11
12
|
eventKey: number | string,
|
|
@@ -24,6 +25,7 @@ export const TabsContext = createContext<TabsContextProps>({
|
|
|
24
25
|
unmountOnExit: false,
|
|
25
26
|
localActiveKey: '',
|
|
26
27
|
uniqueId: '',
|
|
28
|
+
setAccentStyles: () => null,
|
|
27
29
|
handleTabClick: () => null,
|
|
28
30
|
handleTabClose: undefined
|
|
29
31
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
1
|
+
import { render, screen, act } from '@testing-library/react';
|
|
2
2
|
import { Tabs } from '../Tabs';
|
|
3
|
+
import styles from '@patternfly/react-styles/css/components/Tabs/tabs';
|
|
3
4
|
import { Tab } from '../Tab';
|
|
4
5
|
import { TabTitleText } from '../TabTitleText';
|
|
5
6
|
import { TabTitleIcon } from '../TabTitleIcon';
|
|
@@ -8,6 +9,47 @@ import { TabContentBody } from '../TabContentBody';
|
|
|
8
9
|
|
|
9
10
|
jest.mock('../../../helpers/GenerateId/GenerateId');
|
|
10
11
|
|
|
12
|
+
test(`Renders with classes ${styles.tabs} and ${styles.modifiers.animateCurrent} by default`, () => {
|
|
13
|
+
render(
|
|
14
|
+
<Tabs role="region">
|
|
15
|
+
<Tab title="Test title" eventKey={0}>
|
|
16
|
+
Tab Content
|
|
17
|
+
</Tab>
|
|
18
|
+
</Tabs>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
expect(screen.getByRole('region')).toHaveClass(`${styles.tabs} ${styles.modifiers.animateCurrent}`);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test(`Renders with class ${styles.modifiers.initializingAccent} when component initially mounts`, () => {
|
|
25
|
+
render(
|
|
26
|
+
<Tabs role="region">
|
|
27
|
+
<Tab title="Test title" eventKey={0}>
|
|
28
|
+
Tab Content
|
|
29
|
+
</Tab>
|
|
30
|
+
</Tabs>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
expect(screen.getByRole('region')).toHaveClass(styles.modifiers.initializingAccent);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test(`Does not render with class ${styles.modifiers.initializingAccent} when component is finished mounting`, () => {
|
|
37
|
+
jest.useFakeTimers();
|
|
38
|
+
render(
|
|
39
|
+
<Tabs role="region">
|
|
40
|
+
<Tab title="Test title" eventKey={0}>
|
|
41
|
+
Tab Content
|
|
42
|
+
</Tab>
|
|
43
|
+
</Tabs>
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
act(() => {
|
|
47
|
+
jest.advanceTimersByTime(500);
|
|
48
|
+
});
|
|
49
|
+
expect(screen.getByRole('region')).not.toHaveClass(styles.modifiers.initializingAccent);
|
|
50
|
+
jest.useRealTimers();
|
|
51
|
+
});
|
|
52
|
+
|
|
11
53
|
test('should render simple tabs', () => {
|
|
12
54
|
const { asFragment } = render(
|
|
13
55
|
<Tabs id="simpleTabs">
|
|
@@ -4,11 +4,12 @@ exports[`should render accessible tabs 1`] = `
|
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<nav
|
|
6
6
|
aria-label="accessible Tabs example"
|
|
7
|
-
class="pf-v6-c-tabs"
|
|
8
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
7
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-initializing-accent"
|
|
8
|
+
data-ouia-component-id="OUIA-Generated-Tabs-12"
|
|
9
9
|
data-ouia-component-type="PF6/Tabs"
|
|
10
10
|
data-ouia-safe="true"
|
|
11
11
|
id="accessibleTabs"
|
|
12
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
12
13
|
>
|
|
13
14
|
<ul
|
|
14
15
|
class="pf-v6-c-tabs__list"
|
|
@@ -120,11 +121,12 @@ exports[`should render accessible tabs 1`] = `
|
|
|
120
121
|
exports[`should render box tabs 1`] = `
|
|
121
122
|
<DocumentFragment>
|
|
122
123
|
<div
|
|
123
|
-
class="pf-v6-c-tabs pf-m-box"
|
|
124
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
124
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-box pf-m-initializing-accent"
|
|
125
|
+
data-ouia-component-id="OUIA-Generated-Tabs-11"
|
|
125
126
|
data-ouia-component-type="PF6/Tabs"
|
|
126
127
|
data-ouia-safe="true"
|
|
127
128
|
id="boxTabs"
|
|
129
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
128
130
|
>
|
|
129
131
|
<ul
|
|
130
132
|
class="pf-v6-c-tabs__list"
|
|
@@ -278,11 +280,12 @@ exports[`should render box tabs 1`] = `
|
|
|
278
280
|
exports[`should render box tabs of secondary variant 1`] = `
|
|
279
281
|
<DocumentFragment>
|
|
280
282
|
<div
|
|
281
|
-
class="pf-v6-c-tabs pf-m-box pf-m-secondary"
|
|
282
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
283
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-box pf-m-secondary pf-m-initializing-accent"
|
|
284
|
+
data-ouia-component-id="OUIA-Generated-Tabs-18"
|
|
283
285
|
data-ouia-component-type="PF6/Tabs"
|
|
284
286
|
data-ouia-safe="true"
|
|
285
287
|
id="boxSecondaryVariantTabs"
|
|
288
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
286
289
|
>
|
|
287
290
|
<ul
|
|
288
291
|
class="pf-v6-c-tabs__list"
|
|
@@ -394,11 +397,12 @@ exports[`should render box tabs of secondary variant 1`] = `
|
|
|
394
397
|
exports[`should render expandable vertical tabs 1`] = `
|
|
395
398
|
<DocumentFragment>
|
|
396
399
|
<div
|
|
397
|
-
class="pf-v6-c-tabs pf-m-vertical pf-m-expandable"
|
|
398
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
400
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-vertical pf-m-expandable pf-m-initializing-accent"
|
|
401
|
+
data-ouia-component-id="OUIA-Generated-Tabs-9"
|
|
399
402
|
data-ouia-component-type="PF6/Tabs"
|
|
400
403
|
data-ouia-safe="true"
|
|
401
404
|
id="verticalTabs"
|
|
405
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
402
406
|
>
|
|
403
407
|
<div
|
|
404
408
|
class="pf-v6-c-tabs__toggle"
|
|
@@ -600,11 +604,12 @@ exports[`should render expandable vertical tabs 1`] = `
|
|
|
600
604
|
exports[`should render filled tabs 1`] = `
|
|
601
605
|
<DocumentFragment>
|
|
602
606
|
<div
|
|
603
|
-
class="pf-v6-c-tabs pf-m-fill"
|
|
604
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
607
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-fill pf-m-initializing-accent"
|
|
608
|
+
data-ouia-component-id="OUIA-Generated-Tabs-13"
|
|
605
609
|
data-ouia-component-type="PF6/Tabs"
|
|
606
610
|
data-ouia-safe="true"
|
|
607
611
|
id="filledTabs"
|
|
612
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
608
613
|
>
|
|
609
614
|
<ul
|
|
610
615
|
class="pf-v6-c-tabs__list"
|
|
@@ -716,11 +721,12 @@ exports[`should render filled tabs 1`] = `
|
|
|
716
721
|
exports[`should render simple tabs 1`] = `
|
|
717
722
|
<DocumentFragment>
|
|
718
723
|
<div
|
|
719
|
-
class="pf-v6-c-tabs"
|
|
720
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
724
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-initializing-accent"
|
|
725
|
+
data-ouia-component-id="OUIA-Generated-Tabs-4"
|
|
721
726
|
data-ouia-component-type="PF6/Tabs"
|
|
722
727
|
data-ouia-safe="true"
|
|
723
728
|
id="simpleTabs"
|
|
729
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
724
730
|
>
|
|
725
731
|
<ul
|
|
726
732
|
class="pf-v6-c-tabs__list"
|
|
@@ -874,11 +880,12 @@ exports[`should render simple tabs 1`] = `
|
|
|
874
880
|
exports[`should render subtabs 1`] = `
|
|
875
881
|
<DocumentFragment>
|
|
876
882
|
<div
|
|
877
|
-
class="pf-v6-c-tabs"
|
|
878
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
883
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-initializing-accent"
|
|
884
|
+
data-ouia-component-id="OUIA-Generated-Tabs-14"
|
|
879
885
|
data-ouia-component-type="PF6/Tabs"
|
|
880
886
|
data-ouia-safe="true"
|
|
881
887
|
id="primarieTabs"
|
|
888
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
882
889
|
>
|
|
883
890
|
<ul
|
|
884
891
|
class="pf-v6-c-tabs__list"
|
|
@@ -959,11 +966,12 @@ exports[`should render subtabs 1`] = `
|
|
|
959
966
|
tabindex="0"
|
|
960
967
|
>
|
|
961
968
|
<div
|
|
962
|
-
class="pf-v6-c-tabs pf-m-subtab"
|
|
963
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
969
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-subtab pf-m-initializing-accent"
|
|
970
|
+
data-ouia-component-id="OUIA-Generated-Tabs-15"
|
|
964
971
|
data-ouia-component-type="PF6/Tabs"
|
|
965
972
|
data-ouia-safe="true"
|
|
966
973
|
id="subtabs"
|
|
974
|
+
style="--pf-v6-c-tabs--link-accent--length: 0; --pf-v6-c-tabs--link-accent--start: 0;"
|
|
967
975
|
>
|
|
968
976
|
<ul
|
|
969
977
|
class="pf-v6-c-tabs__list"
|
|
@@ -1101,11 +1109,12 @@ exports[`should render subtabs 1`] = `
|
|
|
1101
1109
|
exports[`should render tabs with eventKey Strings 1`] = `
|
|
1102
1110
|
<DocumentFragment>
|
|
1103
1111
|
<div
|
|
1104
|
-
class="pf-v6-c-tabs"
|
|
1105
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
1112
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-initializing-accent"
|
|
1113
|
+
data-ouia-component-id="OUIA-Generated-Tabs-16"
|
|
1106
1114
|
data-ouia-component-type="PF6/Tabs"
|
|
1107
1115
|
data-ouia-safe="true"
|
|
1108
1116
|
id="eventKeyTabs"
|
|
1117
|
+
style="--pf-v6-c-tabs--link-accent--length: 0; --pf-v6-c-tabs--link-accent--start: 0;"
|
|
1109
1118
|
>
|
|
1110
1119
|
<ul
|
|
1111
1120
|
class="pf-v6-c-tabs__list"
|
|
@@ -1218,11 +1227,12 @@ exports[`should render tabs with eventKey Strings 1`] = `
|
|
|
1218
1227
|
exports[`should render tabs with no bottom border 1`] = `
|
|
1219
1228
|
<DocumentFragment>
|
|
1220
1229
|
<div
|
|
1221
|
-
class="pf-v6-c-tabs pf-m-no-border-bottom"
|
|
1222
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
1230
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-no-border-bottom pf-m-initializing-accent"
|
|
1231
|
+
data-ouia-component-id="OUIA-Generated-Tabs-19"
|
|
1223
1232
|
data-ouia-component-type="PF6/Tabs"
|
|
1224
1233
|
data-ouia-safe="true"
|
|
1225
1234
|
id="noBottomBorderTabs"
|
|
1235
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
1226
1236
|
>
|
|
1227
1237
|
<ul
|
|
1228
1238
|
class="pf-v6-c-tabs__list"
|
|
@@ -1334,11 +1344,12 @@ exports[`should render tabs with no bottom border 1`] = `
|
|
|
1334
1344
|
exports[`should render tabs with separate content 1`] = `
|
|
1335
1345
|
<DocumentFragment>
|
|
1336
1346
|
<div
|
|
1337
|
-
class="pf-v6-c-tabs"
|
|
1338
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
1347
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-initializing-accent"
|
|
1348
|
+
data-ouia-component-id="OUIA-Generated-Tabs-17"
|
|
1339
1349
|
data-ouia-component-type="PF6/Tabs"
|
|
1340
1350
|
data-ouia-safe="true"
|
|
1341
1351
|
id="separateTabs"
|
|
1352
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
1342
1353
|
>
|
|
1343
1354
|
<ul
|
|
1344
1355
|
class="pf-v6-c-tabs__list"
|
|
@@ -1460,10 +1471,11 @@ exports[`should render tabs with separate content 1`] = `
|
|
|
1460
1471
|
exports[`should render uncontrolled tabs 1`] = `
|
|
1461
1472
|
<DocumentFragment>
|
|
1462
1473
|
<div
|
|
1463
|
-
class="pf-v6-c-tabs"
|
|
1464
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
1474
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-initializing-accent"
|
|
1475
|
+
data-ouia-component-id="OUIA-Generated-Tabs-7"
|
|
1465
1476
|
data-ouia-component-type="PF6/Tabs"
|
|
1466
1477
|
data-ouia-safe="true"
|
|
1478
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
1467
1479
|
>
|
|
1468
1480
|
<ul
|
|
1469
1481
|
class="pf-v6-c-tabs__list"
|
|
@@ -1617,11 +1629,12 @@ exports[`should render uncontrolled tabs 1`] = `
|
|
|
1617
1629
|
exports[`should render vertical tabs 1`] = `
|
|
1618
1630
|
<DocumentFragment>
|
|
1619
1631
|
<div
|
|
1620
|
-
class="pf-v6-c-tabs pf-m-vertical"
|
|
1621
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
1632
|
+
class="pf-v6-c-tabs pf-m-animate-current pf-m-vertical pf-m-initializing-accent"
|
|
1633
|
+
data-ouia-component-id="OUIA-Generated-Tabs-8"
|
|
1622
1634
|
data-ouia-component-type="PF6/Tabs"
|
|
1623
1635
|
data-ouia-safe="true"
|
|
1624
1636
|
id="verticalTabs"
|
|
1637
|
+
style="--pf-v6-c-tabs--link-accent--length: 0px; --pf-v6-c-tabs--link-accent--start: 0px;"
|
|
1625
1638
|
>
|
|
1626
1639
|
<ul
|
|
1627
1640
|
class="pf-v6-c-tabs__list"
|
|
@@ -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', '
|
|
5
|
+
propComponents: ['Tabs', 'Tab', 'TabContent', 'TabContentBody', 'TabTitleText', 'TabTitleIcon', 'HorizontalOverflowObject', 'HorizontalOverflowPopperProps', 'TabAction']
|
|
6
6
|
ouia: true
|
|
7
7
|
---
|
|
8
8
|
|