@patternfly/react-core 4.158.4 → 4.159.0
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 +11 -0
- package/dist/esm/components/Select/Select.d.ts +3 -0
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +2 -1
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Select/SelectMenu.d.ts +3 -0
- package/dist/esm/components/Select/SelectMenu.d.ts.map +1 -1
- package/dist/esm/components/Select/SelectMenu.js +4 -3
- package/dist/esm/components/Select/SelectMenu.js.map +1 -1
- package/dist/esm/components/Select/selectConstants.d.ts +4 -0
- package/dist/esm/components/Select/selectConstants.d.ts.map +1 -1
- package/dist/esm/components/Select/selectConstants.js +5 -0
- package/dist/esm/components/Select/selectConstants.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts +20 -0
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +44 -14
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Wizard/WizardNavItem.js +1 -1
- package/dist/js/components/Select/Select.d.ts +3 -0
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +1 -0
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/js/components/Select/SelectMenu.d.ts +3 -0
- package/dist/js/components/Select/SelectMenu.d.ts.map +1 -1
- package/dist/js/components/Select/SelectMenu.js +3 -2
- package/dist/js/components/Select/SelectMenu.js.map +1 -1
- package/dist/js/components/Select/selectConstants.d.ts +4 -0
- package/dist/js/components/Select/selectConstants.d.ts.map +1 -1
- package/dist/js/components/Select/selectConstants.js +6 -1
- package/dist/js/components/Select/selectConstants.js.map +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts +20 -0
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +44 -14
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/components/Wizard/WizardNavItem.js +1 -1
- package/dist/umd/react-core.css +11237 -11237
- package/dist/umd/react-core.js +51 -17
- package/dist/umd/react-core.min.css +12076 -12076
- package/dist/umd/react-core.min.js +2 -2
- package/package.json +2 -2
- package/src/components/Drawer/examples/Drawer.md +0 -78
- package/src/components/Page/examples/Page.md +289 -103
- package/src/components/Select/Select.tsx +4 -1
- package/src/components/Select/SelectMenu.tsx +10 -2
- package/src/components/Select/__tests__/Generated/__snapshots__/SelectMenu.test.tsx.snap +1 -0
- package/src/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +57 -0
- package/src/components/Select/selectConstants.tsx +5 -0
- package/src/components/Tabs/Tabs.tsx +97 -13
- package/src/components/Tabs/__tests__/Generated/__snapshots__/Tabs.test.tsx.snap +4 -4
- package/src/components/Tabs/__tests__/Tabs.test.tsx +50 -0
- package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +276 -30
- package/src/components/Tabs/examples/Tabs.md +96 -0
- package/src/components/Wizard/WizardNavItem.tsx +1 -1
- package/src/demos/ComposableMenu.md +125 -17
- package/src/demos/Page/Page.md +322 -12
|
@@ -78,6 +78,56 @@ test('should render vertical tabs', () => {
|
|
|
78
78
|
expect(view).toMatchSnapshot();
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
+
test('should render expandable vertical tabs', () => {
|
|
82
|
+
const view = render(
|
|
83
|
+
<Tabs id="verticalTabs" isVertical toggleText='toggle' expandable={{default: 'expandable'}}>
|
|
84
|
+
<Tab id="tab1" eventKey={0} title={<TabTitleText>"Tab item 1"</TabTitleText>}>
|
|
85
|
+
Tab 1 section
|
|
86
|
+
</Tab>
|
|
87
|
+
<Tab id="tab2" eventKey={1} title={<TabTitleText>"Tab item 2"</TabTitleText>}>
|
|
88
|
+
Tab 2 section
|
|
89
|
+
</Tab>
|
|
90
|
+
<Tab id="tab3" eventKey={2} title={<TabTitleText>"Tab item 3"</TabTitleText>}>
|
|
91
|
+
Tab 3 section
|
|
92
|
+
</Tab>
|
|
93
|
+
<Tab
|
|
94
|
+
id="tab4"
|
|
95
|
+
eventKey={3}
|
|
96
|
+
title={<><TabTitleIcon><i>4</i></TabTitleIcon> <TabTitleText>Users</TabTitleText> </>}
|
|
97
|
+
>
|
|
98
|
+
Tab 4 section
|
|
99
|
+
</Tab>
|
|
100
|
+
</Tabs>
|
|
101
|
+
);
|
|
102
|
+
expect(view).toMatchSnapshot();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
test('should log error when there is no aria-label or toggleText for expandable vertical tabs', () => {
|
|
106
|
+
const consoleErrorMock = jest.fn();
|
|
107
|
+
global.console = { error: consoleErrorMock } as any;
|
|
108
|
+
const view = render(
|
|
109
|
+
<Tabs id="verticalTabs" isVertical expandable={{default: 'expandable'}}>
|
|
110
|
+
<Tab id="tab1" eventKey={0} title={<TabTitleText>"Tab item 1"</TabTitleText>}>
|
|
111
|
+
Tab 1 section
|
|
112
|
+
</Tab>
|
|
113
|
+
<Tab id="tab2" eventKey={1} title={<TabTitleText>"Tab item 2"</TabTitleText>}>
|
|
114
|
+
Tab 2 section
|
|
115
|
+
</Tab>
|
|
116
|
+
<Tab id="tab3" eventKey={2} title={<TabTitleText>"Tab item 3"</TabTitleText>}>
|
|
117
|
+
Tab 3 section
|
|
118
|
+
</Tab>
|
|
119
|
+
<Tab
|
|
120
|
+
id="tab4"
|
|
121
|
+
eventKey={3}
|
|
122
|
+
title={<><TabTitleIcon><i>4</i></TabTitleIcon> <TabTitleText>Users</TabTitleText> </>}
|
|
123
|
+
>
|
|
124
|
+
Tab 4 section
|
|
125
|
+
</Tab>
|
|
126
|
+
</Tabs>
|
|
127
|
+
);
|
|
128
|
+
expect(consoleErrorMock).toBeCalled();
|
|
129
|
+
});
|
|
130
|
+
|
|
81
131
|
test('should render box tabs', () => {
|
|
82
132
|
const view = render(
|
|
83
133
|
<Tabs id="boxTabs" isBox>
|
|
@@ -5,15 +5,16 @@ Array [
|
|
|
5
5
|
<nav
|
|
6
6
|
aria-label="accessible Tabs example"
|
|
7
7
|
class="pf-c-tabs"
|
|
8
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
8
|
+
data-ouia-component-id="OUIA-Generated-Tabs-7"
|
|
9
9
|
data-ouia-component-type="PF4/Tabs"
|
|
10
10
|
data-ouia-safe="true"
|
|
11
11
|
id="accessibleTabs"
|
|
12
12
|
>
|
|
13
13
|
<button
|
|
14
|
-
aria-hidden="
|
|
14
|
+
aria-hidden="true"
|
|
15
15
|
aria-label="Scroll left"
|
|
16
16
|
class="pf-c-tabs__scroll-button"
|
|
17
|
+
disabled=""
|
|
17
18
|
>
|
|
18
19
|
<svg
|
|
19
20
|
aria-hidden="true"
|
|
@@ -88,9 +89,10 @@ Array [
|
|
|
88
89
|
</li>
|
|
89
90
|
</ul>
|
|
90
91
|
<button
|
|
91
|
-
aria-hidden="
|
|
92
|
+
aria-hidden="true"
|
|
92
93
|
aria-label="Scroll right"
|
|
93
94
|
class="pf-c-tabs__scroll-button"
|
|
95
|
+
disabled=""
|
|
94
96
|
>
|
|
95
97
|
<svg
|
|
96
98
|
aria-hidden="true"
|
|
@@ -149,15 +151,16 @@ exports[`should render box tabs 1`] = `
|
|
|
149
151
|
Array [
|
|
150
152
|
<div
|
|
151
153
|
class="pf-c-tabs pf-m-box"
|
|
152
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
154
|
+
data-ouia-component-id="OUIA-Generated-Tabs-6"
|
|
153
155
|
data-ouia-component-type="PF4/Tabs"
|
|
154
156
|
data-ouia-safe="true"
|
|
155
157
|
id="boxTabs"
|
|
156
158
|
>
|
|
157
159
|
<button
|
|
158
|
-
aria-hidden="
|
|
160
|
+
aria-hidden="true"
|
|
159
161
|
aria-label="Scroll left"
|
|
160
162
|
class="pf-c-tabs__scroll-button"
|
|
163
|
+
disabled=""
|
|
161
164
|
>
|
|
162
165
|
<svg
|
|
163
166
|
aria-hidden="true"
|
|
@@ -255,9 +258,10 @@ Array [
|
|
|
255
258
|
</li>
|
|
256
259
|
</ul>
|
|
257
260
|
<button
|
|
258
|
-
aria-hidden="
|
|
261
|
+
aria-hidden="true"
|
|
259
262
|
aria-label="Scroll right"
|
|
260
263
|
class="pf-c-tabs__scroll-button"
|
|
264
|
+
disabled=""
|
|
261
265
|
>
|
|
262
266
|
<svg
|
|
263
267
|
aria-hidden="true"
|
|
@@ -328,15 +332,16 @@ exports[`should render box tabs of light variant 1`] = `
|
|
|
328
332
|
Array [
|
|
329
333
|
<div
|
|
330
334
|
class="pf-c-tabs pf-m-box pf-m-color-scheme--light-300"
|
|
331
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
335
|
+
data-ouia-component-id="OUIA-Generated-Tabs-13"
|
|
332
336
|
data-ouia-component-type="PF4/Tabs"
|
|
333
337
|
data-ouia-safe="true"
|
|
334
338
|
id="boxLightVariantTabs"
|
|
335
339
|
>
|
|
336
340
|
<button
|
|
337
|
-
aria-hidden="
|
|
341
|
+
aria-hidden="true"
|
|
338
342
|
aria-label="Scroll left"
|
|
339
343
|
class="pf-c-tabs__scroll-button"
|
|
344
|
+
disabled=""
|
|
340
345
|
>
|
|
341
346
|
<svg
|
|
342
347
|
aria-hidden="true"
|
|
@@ -408,9 +413,10 @@ Array [
|
|
|
408
413
|
</li>
|
|
409
414
|
</ul>
|
|
410
415
|
<button
|
|
411
|
-
aria-hidden="
|
|
416
|
+
aria-hidden="true"
|
|
412
417
|
aria-label="Scroll right"
|
|
413
418
|
class="pf-c-tabs__scroll-button"
|
|
419
|
+
disabled=""
|
|
414
420
|
>
|
|
415
421
|
<svg
|
|
416
422
|
aria-hidden="true"
|
|
@@ -465,19 +471,244 @@ Array [
|
|
|
465
471
|
]
|
|
466
472
|
`;
|
|
467
473
|
|
|
474
|
+
exports[`should render expandable vertical tabs 1`] = `
|
|
475
|
+
Array [
|
|
476
|
+
<div
|
|
477
|
+
class="pf-c-tabs pf-m-vertical pf-m-expandable"
|
|
478
|
+
data-ouia-component-id="OUIA-Generated-Tabs-4"
|
|
479
|
+
data-ouia-component-type="PF4/Tabs"
|
|
480
|
+
data-ouia-safe="true"
|
|
481
|
+
id="verticalTabs"
|
|
482
|
+
>
|
|
483
|
+
<div
|
|
484
|
+
class="pf-c-tabs__toggle"
|
|
485
|
+
>
|
|
486
|
+
<div
|
|
487
|
+
class="pf-c-tabs__toggle-button"
|
|
488
|
+
>
|
|
489
|
+
<button
|
|
490
|
+
aria-disabled="false"
|
|
491
|
+
aria-labelledby="pf-random-id-0-text pf-random-id-0-button"
|
|
492
|
+
class="pf-c-button pf-m-plain"
|
|
493
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-1"
|
|
494
|
+
data-ouia-component-type="PF4/Button"
|
|
495
|
+
data-ouia-safe="true"
|
|
496
|
+
id="pf-random-id-0-button"
|
|
497
|
+
type="button"
|
|
498
|
+
>
|
|
499
|
+
<span
|
|
500
|
+
class="pf-c-tabs__toggle-icon"
|
|
501
|
+
>
|
|
502
|
+
<svg
|
|
503
|
+
aria-hidden="true"
|
|
504
|
+
arian-hidden="true"
|
|
505
|
+
fill="currentColor"
|
|
506
|
+
height="1em"
|
|
507
|
+
role="img"
|
|
508
|
+
style="vertical-align:-0.125em"
|
|
509
|
+
viewBox="0 0 256 512"
|
|
510
|
+
width="1em"
|
|
511
|
+
>
|
|
512
|
+
<path
|
|
513
|
+
d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"
|
|
514
|
+
/>
|
|
515
|
+
</svg>
|
|
516
|
+
</span>
|
|
517
|
+
<span
|
|
518
|
+
class="pf-c-tabs__toggle-text"
|
|
519
|
+
id="pf-random-id-0-text"
|
|
520
|
+
>
|
|
521
|
+
toggle
|
|
522
|
+
</span>
|
|
523
|
+
</button>
|
|
524
|
+
</div>
|
|
525
|
+
</div>
|
|
526
|
+
<button
|
|
527
|
+
aria-hidden="true"
|
|
528
|
+
aria-label="Scroll left"
|
|
529
|
+
class="pf-c-tabs__scroll-button"
|
|
530
|
+
disabled=""
|
|
531
|
+
>
|
|
532
|
+
<svg
|
|
533
|
+
aria-hidden="true"
|
|
534
|
+
fill="currentColor"
|
|
535
|
+
height="1em"
|
|
536
|
+
role="img"
|
|
537
|
+
style="vertical-align:-0.125em"
|
|
538
|
+
viewBox="0 0 256 512"
|
|
539
|
+
width="1em"
|
|
540
|
+
>
|
|
541
|
+
<path
|
|
542
|
+
d="M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"
|
|
543
|
+
/>
|
|
544
|
+
</svg>
|
|
545
|
+
</button>
|
|
546
|
+
<ul
|
|
547
|
+
class="pf-c-tabs__list"
|
|
548
|
+
>
|
|
549
|
+
<li
|
|
550
|
+
class="pf-c-tabs__item pf-m-current"
|
|
551
|
+
>
|
|
552
|
+
<button
|
|
553
|
+
aria-controls="pf-tab-section-0-tab1"
|
|
554
|
+
class="pf-c-tabs__link"
|
|
555
|
+
data-ouia-component-type="PF4/TabButton"
|
|
556
|
+
data-ouia-safe="true"
|
|
557
|
+
id="pf-tab-0-tab1"
|
|
558
|
+
>
|
|
559
|
+
<span
|
|
560
|
+
class="pf-c-tabs__item-text"
|
|
561
|
+
>
|
|
562
|
+
"Tab item 1"
|
|
563
|
+
</span>
|
|
564
|
+
</button>
|
|
565
|
+
</li>
|
|
566
|
+
<li
|
|
567
|
+
class="pf-c-tabs__item"
|
|
568
|
+
>
|
|
569
|
+
<button
|
|
570
|
+
aria-controls="pf-tab-section-1-tab2"
|
|
571
|
+
class="pf-c-tabs__link"
|
|
572
|
+
data-ouia-component-type="PF4/TabButton"
|
|
573
|
+
data-ouia-safe="true"
|
|
574
|
+
id="pf-tab-1-tab2"
|
|
575
|
+
>
|
|
576
|
+
<span
|
|
577
|
+
class="pf-c-tabs__item-text"
|
|
578
|
+
>
|
|
579
|
+
"Tab item 2"
|
|
580
|
+
</span>
|
|
581
|
+
</button>
|
|
582
|
+
</li>
|
|
583
|
+
<li
|
|
584
|
+
class="pf-c-tabs__item"
|
|
585
|
+
>
|
|
586
|
+
<button
|
|
587
|
+
aria-controls="pf-tab-section-2-tab3"
|
|
588
|
+
class="pf-c-tabs__link"
|
|
589
|
+
data-ouia-component-type="PF4/TabButton"
|
|
590
|
+
data-ouia-safe="true"
|
|
591
|
+
id="pf-tab-2-tab3"
|
|
592
|
+
>
|
|
593
|
+
<span
|
|
594
|
+
class="pf-c-tabs__item-text"
|
|
595
|
+
>
|
|
596
|
+
"Tab item 3"
|
|
597
|
+
</span>
|
|
598
|
+
</button>
|
|
599
|
+
</li>
|
|
600
|
+
<li
|
|
601
|
+
class="pf-c-tabs__item"
|
|
602
|
+
>
|
|
603
|
+
<button
|
|
604
|
+
aria-controls="pf-tab-section-3-tab4"
|
|
605
|
+
class="pf-c-tabs__link"
|
|
606
|
+
data-ouia-component-type="PF4/TabButton"
|
|
607
|
+
data-ouia-safe="true"
|
|
608
|
+
id="pf-tab-3-tab4"
|
|
609
|
+
>
|
|
610
|
+
<span
|
|
611
|
+
class="pf-c-tabs__item-icon"
|
|
612
|
+
>
|
|
613
|
+
<i>
|
|
614
|
+
4
|
|
615
|
+
</i>
|
|
616
|
+
</span>
|
|
617
|
+
|
|
618
|
+
<span
|
|
619
|
+
class="pf-c-tabs__item-text"
|
|
620
|
+
>
|
|
621
|
+
Users
|
|
622
|
+
</span>
|
|
623
|
+
|
|
624
|
+
</button>
|
|
625
|
+
</li>
|
|
626
|
+
</ul>
|
|
627
|
+
<button
|
|
628
|
+
aria-hidden="true"
|
|
629
|
+
aria-label="Scroll right"
|
|
630
|
+
class="pf-c-tabs__scroll-button"
|
|
631
|
+
disabled=""
|
|
632
|
+
>
|
|
633
|
+
<svg
|
|
634
|
+
aria-hidden="true"
|
|
635
|
+
fill="currentColor"
|
|
636
|
+
height="1em"
|
|
637
|
+
role="img"
|
|
638
|
+
style="vertical-align:-0.125em"
|
|
639
|
+
viewBox="0 0 256 512"
|
|
640
|
+
width="1em"
|
|
641
|
+
>
|
|
642
|
+
<path
|
|
643
|
+
d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"
|
|
644
|
+
/>
|
|
645
|
+
</svg>
|
|
646
|
+
</button>
|
|
647
|
+
</div>,
|
|
648
|
+
<section
|
|
649
|
+
aria-labelledby="pf-tab-0-tab1"
|
|
650
|
+
class="pf-c-tab-content"
|
|
651
|
+
data-ouia-component-type="PF4/TabContent"
|
|
652
|
+
data-ouia-safe="true"
|
|
653
|
+
id="pf-tab-section-0-tab1"
|
|
654
|
+
role="tabpanel"
|
|
655
|
+
tabindex="0"
|
|
656
|
+
>
|
|
657
|
+
Tab 1 section
|
|
658
|
+
</section>,
|
|
659
|
+
<section
|
|
660
|
+
aria-labelledby="pf-tab-1-tab2"
|
|
661
|
+
class="pf-c-tab-content"
|
|
662
|
+
data-ouia-component-type="PF4/TabContent"
|
|
663
|
+
data-ouia-safe="true"
|
|
664
|
+
hidden=""
|
|
665
|
+
id="pf-tab-section-1-tab2"
|
|
666
|
+
role="tabpanel"
|
|
667
|
+
tabindex="0"
|
|
668
|
+
>
|
|
669
|
+
Tab 2 section
|
|
670
|
+
</section>,
|
|
671
|
+
<section
|
|
672
|
+
aria-labelledby="pf-tab-2-tab3"
|
|
673
|
+
class="pf-c-tab-content"
|
|
674
|
+
data-ouia-component-type="PF4/TabContent"
|
|
675
|
+
data-ouia-safe="true"
|
|
676
|
+
hidden=""
|
|
677
|
+
id="pf-tab-section-2-tab3"
|
|
678
|
+
role="tabpanel"
|
|
679
|
+
tabindex="0"
|
|
680
|
+
>
|
|
681
|
+
Tab 3 section
|
|
682
|
+
</section>,
|
|
683
|
+
<section
|
|
684
|
+
aria-labelledby="pf-tab-3-tab4"
|
|
685
|
+
class="pf-c-tab-content"
|
|
686
|
+
data-ouia-component-type="PF4/TabContent"
|
|
687
|
+
data-ouia-safe="true"
|
|
688
|
+
hidden=""
|
|
689
|
+
id="pf-tab-section-3-tab4"
|
|
690
|
+
role="tabpanel"
|
|
691
|
+
tabindex="0"
|
|
692
|
+
>
|
|
693
|
+
Tab 4 section
|
|
694
|
+
</section>,
|
|
695
|
+
]
|
|
696
|
+
`;
|
|
697
|
+
|
|
468
698
|
exports[`should render filled tabs 1`] = `
|
|
469
699
|
Array [
|
|
470
700
|
<div
|
|
471
701
|
class="pf-c-tabs pf-m-fill"
|
|
472
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
702
|
+
data-ouia-component-id="OUIA-Generated-Tabs-8"
|
|
473
703
|
data-ouia-component-type="PF4/Tabs"
|
|
474
704
|
data-ouia-safe="true"
|
|
475
705
|
id="filledTabs"
|
|
476
706
|
>
|
|
477
707
|
<button
|
|
478
|
-
aria-hidden="
|
|
708
|
+
aria-hidden="true"
|
|
479
709
|
aria-label="Scroll left"
|
|
480
710
|
class="pf-c-tabs__scroll-button"
|
|
711
|
+
disabled=""
|
|
481
712
|
>
|
|
482
713
|
<svg
|
|
483
714
|
aria-hidden="true"
|
|
@@ -549,9 +780,10 @@ Array [
|
|
|
549
780
|
</li>
|
|
550
781
|
</ul>
|
|
551
782
|
<button
|
|
552
|
-
aria-hidden="
|
|
783
|
+
aria-hidden="true"
|
|
553
784
|
aria-label="Scroll right"
|
|
554
785
|
class="pf-c-tabs__scroll-button"
|
|
786
|
+
disabled=""
|
|
555
787
|
>
|
|
556
788
|
<svg
|
|
557
789
|
aria-hidden="true"
|
|
@@ -610,15 +842,16 @@ exports[`should render secondary tabs 1`] = `
|
|
|
610
842
|
Array [
|
|
611
843
|
<div
|
|
612
844
|
class="pf-c-tabs"
|
|
613
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
845
|
+
data-ouia-component-id="OUIA-Generated-Tabs-9"
|
|
614
846
|
data-ouia-component-type="PF4/Tabs"
|
|
615
847
|
data-ouia-safe="true"
|
|
616
848
|
id="primarieTabs"
|
|
617
849
|
>
|
|
618
850
|
<button
|
|
619
|
-
aria-hidden="
|
|
851
|
+
aria-hidden="true"
|
|
620
852
|
aria-label="Scroll left"
|
|
621
853
|
class="pf-c-tabs__scroll-button"
|
|
854
|
+
disabled=""
|
|
622
855
|
>
|
|
623
856
|
<svg
|
|
624
857
|
aria-hidden="true"
|
|
@@ -690,9 +923,10 @@ Array [
|
|
|
690
923
|
</li>
|
|
691
924
|
</ul>
|
|
692
925
|
<button
|
|
693
|
-
aria-hidden="
|
|
926
|
+
aria-hidden="true"
|
|
694
927
|
aria-label="Scroll right"
|
|
695
928
|
class="pf-c-tabs__scroll-button"
|
|
929
|
+
disabled=""
|
|
696
930
|
>
|
|
697
931
|
<svg
|
|
698
932
|
aria-hidden="true"
|
|
@@ -720,15 +954,16 @@ Array [
|
|
|
720
954
|
>
|
|
721
955
|
<div
|
|
722
956
|
class="pf-c-tabs pf-m-secondary"
|
|
723
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
957
|
+
data-ouia-component-id="OUIA-Generated-Tabs-10"
|
|
724
958
|
data-ouia-component-type="PF4/Tabs"
|
|
725
959
|
data-ouia-safe="true"
|
|
726
960
|
id="secondaryTabs"
|
|
727
961
|
>
|
|
728
962
|
<button
|
|
729
|
-
aria-hidden="
|
|
963
|
+
aria-hidden="true"
|
|
730
964
|
aria-label="Scroll left"
|
|
731
965
|
class="pf-c-tabs__scroll-button pf-m-secondary"
|
|
966
|
+
disabled=""
|
|
732
967
|
>
|
|
733
968
|
<svg
|
|
734
969
|
aria-hidden="true"
|
|
@@ -800,9 +1035,10 @@ Array [
|
|
|
800
1035
|
</li>
|
|
801
1036
|
</ul>
|
|
802
1037
|
<button
|
|
803
|
-
aria-hidden="
|
|
1038
|
+
aria-hidden="true"
|
|
804
1039
|
aria-label="Scroll right"
|
|
805
1040
|
class="pf-c-tabs__scroll-button pf-m-secondary"
|
|
1041
|
+
disabled=""
|
|
806
1042
|
>
|
|
807
1043
|
<svg
|
|
808
1044
|
aria-hidden="true"
|
|
@@ -893,9 +1129,10 @@ Array [
|
|
|
893
1129
|
id="simpleTabs"
|
|
894
1130
|
>
|
|
895
1131
|
<button
|
|
896
|
-
aria-hidden="
|
|
1132
|
+
aria-hidden="true"
|
|
897
1133
|
aria-label="Scroll left"
|
|
898
1134
|
class="pf-c-tabs__scroll-button"
|
|
1135
|
+
disabled=""
|
|
899
1136
|
>
|
|
900
1137
|
<svg
|
|
901
1138
|
aria-hidden="true"
|
|
@@ -993,9 +1230,10 @@ Array [
|
|
|
993
1230
|
</li>
|
|
994
1231
|
</ul>
|
|
995
1232
|
<button
|
|
996
|
-
aria-hidden="
|
|
1233
|
+
aria-hidden="true"
|
|
997
1234
|
aria-label="Scroll right"
|
|
998
1235
|
class="pf-c-tabs__scroll-button"
|
|
1236
|
+
disabled=""
|
|
999
1237
|
>
|
|
1000
1238
|
<svg
|
|
1001
1239
|
aria-hidden="true"
|
|
@@ -1066,15 +1304,16 @@ exports[`should render tabs with eventKey Strings 1`] = `
|
|
|
1066
1304
|
Array [
|
|
1067
1305
|
<div
|
|
1068
1306
|
class="pf-c-tabs"
|
|
1069
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
1307
|
+
data-ouia-component-id="OUIA-Generated-Tabs-11"
|
|
1070
1308
|
data-ouia-component-type="PF4/Tabs"
|
|
1071
1309
|
data-ouia-safe="true"
|
|
1072
1310
|
id="eventKeyTabs"
|
|
1073
1311
|
>
|
|
1074
1312
|
<button
|
|
1075
|
-
aria-hidden="
|
|
1313
|
+
aria-hidden="true"
|
|
1076
1314
|
aria-label="Scroll left"
|
|
1077
1315
|
class="pf-c-tabs__scroll-button"
|
|
1316
|
+
disabled=""
|
|
1078
1317
|
>
|
|
1079
1318
|
<svg
|
|
1080
1319
|
aria-hidden="true"
|
|
@@ -1146,9 +1385,10 @@ Array [
|
|
|
1146
1385
|
</li>
|
|
1147
1386
|
</ul>
|
|
1148
1387
|
<button
|
|
1149
|
-
aria-hidden="
|
|
1388
|
+
aria-hidden="true"
|
|
1150
1389
|
aria-label="Scroll right"
|
|
1151
1390
|
class="pf-c-tabs__scroll-button"
|
|
1391
|
+
disabled=""
|
|
1152
1392
|
>
|
|
1153
1393
|
<svg
|
|
1154
1394
|
aria-hidden="true"
|
|
@@ -1208,15 +1448,16 @@ exports[`should render tabs with separate content 1`] = `
|
|
|
1208
1448
|
Array [
|
|
1209
1449
|
<div
|
|
1210
1450
|
class="pf-c-tabs"
|
|
1211
|
-
data-ouia-component-id="OUIA-Generated-Tabs-
|
|
1451
|
+
data-ouia-component-id="OUIA-Generated-Tabs-12"
|
|
1212
1452
|
data-ouia-component-type="PF4/Tabs"
|
|
1213
1453
|
data-ouia-safe="true"
|
|
1214
1454
|
id="separateTabs"
|
|
1215
1455
|
>
|
|
1216
1456
|
<button
|
|
1217
|
-
aria-hidden="
|
|
1457
|
+
aria-hidden="true"
|
|
1218
1458
|
aria-label="Scroll left"
|
|
1219
1459
|
class="pf-c-tabs__scroll-button"
|
|
1460
|
+
disabled=""
|
|
1220
1461
|
>
|
|
1221
1462
|
<svg
|
|
1222
1463
|
aria-hidden="true"
|
|
@@ -1288,9 +1529,10 @@ Array [
|
|
|
1288
1529
|
</li>
|
|
1289
1530
|
</ul>
|
|
1290
1531
|
<button
|
|
1291
|
-
aria-hidden="
|
|
1532
|
+
aria-hidden="true"
|
|
1292
1533
|
aria-label="Scroll right"
|
|
1293
1534
|
class="pf-c-tabs__scroll-button"
|
|
1535
|
+
disabled=""
|
|
1294
1536
|
>
|
|
1295
1537
|
<svg
|
|
1296
1538
|
aria-hidden="true"
|
|
@@ -1356,9 +1598,10 @@ Array [
|
|
|
1356
1598
|
data-ouia-safe="true"
|
|
1357
1599
|
>
|
|
1358
1600
|
<button
|
|
1359
|
-
aria-hidden="
|
|
1601
|
+
aria-hidden="true"
|
|
1360
1602
|
aria-label="Scroll left"
|
|
1361
1603
|
class="pf-c-tabs__scroll-button"
|
|
1604
|
+
disabled=""
|
|
1362
1605
|
>
|
|
1363
1606
|
<svg
|
|
1364
1607
|
aria-hidden="true"
|
|
@@ -1456,9 +1699,10 @@ Array [
|
|
|
1456
1699
|
</li>
|
|
1457
1700
|
</ul>
|
|
1458
1701
|
<button
|
|
1459
|
-
aria-hidden="
|
|
1702
|
+
aria-hidden="true"
|
|
1460
1703
|
aria-label="Scroll right"
|
|
1461
1704
|
class="pf-c-tabs__scroll-button"
|
|
1705
|
+
disabled=""
|
|
1462
1706
|
>
|
|
1463
1707
|
<svg
|
|
1464
1708
|
aria-hidden="true"
|
|
@@ -1535,9 +1779,10 @@ Array [
|
|
|
1535
1779
|
id="verticalTabs"
|
|
1536
1780
|
>
|
|
1537
1781
|
<button
|
|
1538
|
-
aria-hidden="
|
|
1782
|
+
aria-hidden="true"
|
|
1539
1783
|
aria-label="Scroll left"
|
|
1540
1784
|
class="pf-c-tabs__scroll-button"
|
|
1785
|
+
disabled=""
|
|
1541
1786
|
>
|
|
1542
1787
|
<svg
|
|
1543
1788
|
aria-hidden="true"
|
|
@@ -1635,9 +1880,10 @@ Array [
|
|
|
1635
1880
|
</li>
|
|
1636
1881
|
</ul>
|
|
1637
1882
|
<button
|
|
1638
|
-
aria-hidden="
|
|
1883
|
+
aria-hidden="true"
|
|
1639
1884
|
aria-label="Scroll right"
|
|
1640
1885
|
class="pf-c-tabs__scroll-button"
|
|
1886
|
+
disabled=""
|
|
1641
1887
|
>
|
|
1642
1888
|
<svg
|
|
1643
1889
|
aria-hidden="true"
|
|
@@ -345,6 +345,102 @@ class VerticalTabs extends React.Component {
|
|
|
345
345
|
}
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
+
### Vertical expandable
|
|
349
|
+
```js
|
|
350
|
+
import React from 'react';
|
|
351
|
+
import { Tabs, Tab, TabTitleText, Checkbox } from '@patternfly/react-core';
|
|
352
|
+
class VerticalExpandableTabs extends React.Component {
|
|
353
|
+
constructor(props) {
|
|
354
|
+
super(props);
|
|
355
|
+
this.state = {
|
|
356
|
+
activeTabKey: 0,
|
|
357
|
+
isExpanded: false
|
|
358
|
+
};
|
|
359
|
+
// Toggle currently active tab
|
|
360
|
+
this.handleTabClick = (event, tabIndex) => {
|
|
361
|
+
this.setState({
|
|
362
|
+
activeTabKey: tabIndex
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
this.onToggle = isExpanded => {
|
|
366
|
+
this.setState({
|
|
367
|
+
isExpanded
|
|
368
|
+
});
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
render() {
|
|
372
|
+
const {activeTabKey, isExpanded} = this.state;
|
|
373
|
+
return (
|
|
374
|
+
<Tabs activeKey={activeTabKey} onSelect={this.handleTabClick} isVertical expandable={{default: 'expandable', md: 'nonExpandable', lg: 'expandable'}} isExpanded={isExpanded} onToggle={this.onToggle} toggleText="Containers">
|
|
375
|
+
<Tab eventKey={0} title={<TabTitleText>Users</TabTitleText>}>
|
|
376
|
+
Users
|
|
377
|
+
</Tab>
|
|
378
|
+
<Tab eventKey={1} title={<TabTitleText>Containers</TabTitleText>}>
|
|
379
|
+
Containers
|
|
380
|
+
</Tab>
|
|
381
|
+
<Tab eventKey={2} title={<TabTitleText>Database</TabTitleText>}>
|
|
382
|
+
Database
|
|
383
|
+
</Tab>
|
|
384
|
+
<Tab eventKey={3} title={<TabTitleText>Server</TabTitleText>}>
|
|
385
|
+
Server
|
|
386
|
+
</Tab>
|
|
387
|
+
<Tab eventKey={4} title={<TabTitleText>System</TabTitleText>}>
|
|
388
|
+
System
|
|
389
|
+
</Tab>
|
|
390
|
+
<Tab eventKey={6} title={<TabTitleText>Network</TabTitleText>}>
|
|
391
|
+
Network
|
|
392
|
+
</Tab>
|
|
393
|
+
</Tabs>
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Vertical expandable uncontrolled
|
|
400
|
+
```js
|
|
401
|
+
import React from 'react';
|
|
402
|
+
import { Tabs, Tab, TabTitleText, Checkbox } from '@patternfly/react-core';
|
|
403
|
+
class VerticalExpandableUncontrolledTabs extends React.Component {
|
|
404
|
+
constructor(props) {
|
|
405
|
+
super(props);
|
|
406
|
+
this.state = {
|
|
407
|
+
activeTabKey: 0
|
|
408
|
+
};
|
|
409
|
+
// Toggle currently active tab
|
|
410
|
+
this.handleTabClick = (event, tabIndex) => {
|
|
411
|
+
this.setState({
|
|
412
|
+
activeTabKey: tabIndex
|
|
413
|
+
});
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
render() {
|
|
417
|
+
const {activeTabKey} = this.state;
|
|
418
|
+
return (
|
|
419
|
+
<Tabs activeKey={activeTabKey} onSelect={this.handleTabClick} isVertical expandable={{default: 'expandable', md: 'nonExpandable', lg: 'expandable'}} defaultIsExpanded={false} toggleText="Containers">
|
|
420
|
+
<Tab eventKey={0} title={<TabTitleText>Users</TabTitleText>}>
|
|
421
|
+
Users
|
|
422
|
+
</Tab>
|
|
423
|
+
<Tab eventKey={1} title={<TabTitleText>Containers</TabTitleText>}>
|
|
424
|
+
Containers
|
|
425
|
+
</Tab>
|
|
426
|
+
<Tab eventKey={2} title={<TabTitleText>Database</TabTitleText>}>
|
|
427
|
+
Database
|
|
428
|
+
</Tab>
|
|
429
|
+
<Tab eventKey={3} title={<TabTitleText>Server</TabTitleText>}>
|
|
430
|
+
Server
|
|
431
|
+
</Tab>
|
|
432
|
+
<Tab eventKey={4} title={<TabTitleText>System</TabTitleText>}>
|
|
433
|
+
System
|
|
434
|
+
</Tab>
|
|
435
|
+
<Tab eventKey={6} title={<TabTitleText>Network</TabTitleText>}>
|
|
436
|
+
Network
|
|
437
|
+
</Tab>
|
|
438
|
+
</Tabs>
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
```
|
|
443
|
+
|
|
348
444
|
### Inset
|
|
349
445
|
```js
|
|
350
446
|
import React from 'react';
|