@patternfly/react-core 4.158.1 → 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 +35 -0
- package/dist/esm/components/DragDrop/Draggable.d.ts.map +1 -1
- package/dist/esm/components/DragDrop/Draggable.js +13 -7
- package/dist/esm/components/DragDrop/Draggable.js.map +1 -1
- package/dist/esm/components/DragDrop/Droppable.d.ts.map +1 -1
- package/dist/esm/components/DragDrop/Droppable.js +3 -1
- package/dist/esm/components/DragDrop/Droppable.js.map +1 -1
- 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/DragDrop/Draggable.d.ts.map +1 -1
- package/dist/js/components/DragDrop/Draggable.js +13 -7
- package/dist/js/components/DragDrop/Draggable.js.map +1 -1
- package/dist/js/components/DragDrop/Droppable.d.ts.map +1 -1
- package/dist/js/components/DragDrop/Droppable.js +3 -1
- package/dist/js/components/DragDrop/Droppable.js.map +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 +13638 -13562
- package/dist/umd/react-core.js +104 -49
- package/dist/umd/react-core.min.css +10666 -10590
- package/dist/umd/react-core.min.js +2 -2
- package/package.json +6 -6
- package/src/components/DragDrop/Draggable.tsx +20 -11
- package/src/components/DragDrop/Droppable.tsx +3 -1
- 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/Sidebar/examples/Sidebar.md +6 -3
- 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/CardDemos.md +443 -0
- package/src/demos/ComposableMenu.md +125 -17
- package/src/demos/Page/Page.md +322 -12
|
@@ -34,6 +34,7 @@ exports[`checkbox select renders checkbox select groups successfully 1`] = `
|
|
|
34
34
|
onTypeaheadInputChanged={null}
|
|
35
35
|
ouiaSafe={true}
|
|
36
36
|
placeholderText=""
|
|
37
|
+
position="left"
|
|
37
38
|
removeSelectionAriaLabel="Remove"
|
|
38
39
|
selections={Array []}
|
|
39
40
|
toggleAriaLabel="Options menu"
|
|
@@ -479,6 +480,7 @@ exports[`checkbox select renders checkbox select groups successfully 1`] = `
|
|
|
479
480
|
isLastOptionBeforeFooter={[Function]}
|
|
480
481
|
keyHandler={[Function]}
|
|
481
482
|
openedOnEnter={false}
|
|
483
|
+
position="left"
|
|
482
484
|
selected={Array []}
|
|
483
485
|
sendRef={[Function]}
|
|
484
486
|
>
|
|
@@ -652,6 +654,7 @@ exports[`checkbox select renders checkbox select groups successfully 1`] = `
|
|
|
652
654
|
keyHandler={[Function]}
|
|
653
655
|
maxHeight=""
|
|
654
656
|
openedOnEnter={false}
|
|
657
|
+
position="left"
|
|
655
658
|
selected={Array []}
|
|
656
659
|
sendRef={[Function]}
|
|
657
660
|
>
|
|
@@ -1071,6 +1074,7 @@ exports[`checkbox select renders checkbox select selections properly 1`] = `
|
|
|
1071
1074
|
onTypeaheadInputChanged={null}
|
|
1072
1075
|
ouiaSafe={true}
|
|
1073
1076
|
placeholderText=""
|
|
1077
|
+
position="left"
|
|
1074
1078
|
removeSelectionAriaLabel="Remove"
|
|
1075
1079
|
selections={
|
|
1076
1080
|
Array [
|
|
@@ -1288,6 +1292,7 @@ exports[`checkbox select renders checkbox select selections properly when isChec
|
|
|
1288
1292
|
onTypeaheadInputChanged={null}
|
|
1289
1293
|
ouiaSafe={true}
|
|
1290
1294
|
placeholderText=""
|
|
1295
|
+
position="left"
|
|
1291
1296
|
removeSelectionAriaLabel="Remove"
|
|
1292
1297
|
selections={
|
|
1293
1298
|
Array [
|
|
@@ -1487,6 +1492,7 @@ exports[`checkbox select renders closed successfully 1`] = `
|
|
|
1487
1492
|
onTypeaheadInputChanged={null}
|
|
1488
1493
|
ouiaSafe={true}
|
|
1489
1494
|
placeholderText=""
|
|
1495
|
+
position="left"
|
|
1490
1496
|
removeSelectionAriaLabel="Remove"
|
|
1491
1497
|
selections={Array []}
|
|
1492
1498
|
toggleAriaLabel="Options menu"
|
|
@@ -1662,6 +1668,7 @@ exports[`checkbox select renders expanded successfully 1`] = `
|
|
|
1662
1668
|
onTypeaheadInputChanged={null}
|
|
1663
1669
|
ouiaSafe={true}
|
|
1664
1670
|
placeholderText=""
|
|
1671
|
+
position="left"
|
|
1665
1672
|
removeSelectionAriaLabel="Remove"
|
|
1666
1673
|
selections={Array []}
|
|
1667
1674
|
toggleAriaLabel="Options menu"
|
|
@@ -1935,6 +1942,7 @@ exports[`checkbox select renders expanded successfully 1`] = `
|
|
|
1935
1942
|
isLastOptionBeforeFooter={[Function]}
|
|
1936
1943
|
keyHandler={[Function]}
|
|
1937
1944
|
openedOnEnter={false}
|
|
1945
|
+
position="left"
|
|
1938
1946
|
selected={Array []}
|
|
1939
1947
|
sendRef={[Function]}
|
|
1940
1948
|
>
|
|
@@ -2022,6 +2030,7 @@ exports[`checkbox select renders expanded successfully 1`] = `
|
|
|
2022
2030
|
keyHandler={[Function]}
|
|
2023
2031
|
maxHeight=""
|
|
2024
2032
|
openedOnEnter={false}
|
|
2033
|
+
position="left"
|
|
2025
2034
|
selected={Array []}
|
|
2026
2035
|
sendRef={[Function]}
|
|
2027
2036
|
>
|
|
@@ -2237,6 +2246,7 @@ exports[`checkbox select renders expanded successfully with custom objects 1`] =
|
|
|
2237
2246
|
onTypeaheadInputChanged={null}
|
|
2238
2247
|
ouiaSafe={true}
|
|
2239
2248
|
placeholderText=""
|
|
2249
|
+
position="left"
|
|
2240
2250
|
removeSelectionAriaLabel="Remove"
|
|
2241
2251
|
selections={Array []}
|
|
2242
2252
|
toggleAriaLabel="Options menu"
|
|
@@ -2482,6 +2492,7 @@ exports[`checkbox select renders expanded successfully with custom objects 1`] =
|
|
|
2482
2492
|
isLastOptionBeforeFooter={[Function]}
|
|
2483
2493
|
keyHandler={[Function]}
|
|
2484
2494
|
openedOnEnter={false}
|
|
2495
|
+
position="left"
|
|
2485
2496
|
selected={Array []}
|
|
2486
2497
|
sendRef={[Function]}
|
|
2487
2498
|
>
|
|
@@ -2555,6 +2566,7 @@ exports[`checkbox select renders expanded successfully with custom objects 1`] =
|
|
|
2555
2566
|
keyHandler={[Function]}
|
|
2556
2567
|
maxHeight=""
|
|
2557
2568
|
openedOnEnter={false}
|
|
2569
|
+
position="left"
|
|
2558
2570
|
selected={Array []}
|
|
2559
2571
|
sendRef={[Function]}
|
|
2560
2572
|
>
|
|
@@ -2753,6 +2765,7 @@ exports[`checkbox select renders expanded with filtering successfully 1`] = `
|
|
|
2753
2765
|
onTypeaheadInputChanged={null}
|
|
2754
2766
|
ouiaSafe={true}
|
|
2755
2767
|
placeholderText=""
|
|
2768
|
+
position="left"
|
|
2756
2769
|
removeSelectionAriaLabel="Remove"
|
|
2757
2770
|
selections={Array []}
|
|
2758
2771
|
toggleAriaLabel="Options menu"
|
|
@@ -3060,6 +3073,7 @@ exports[`checkbox select renders expanded with filtering successfully 1`] = `
|
|
|
3060
3073
|
isLastOptionBeforeFooter={[Function]}
|
|
3061
3074
|
keyHandler={[Function]}
|
|
3062
3075
|
openedOnEnter={false}
|
|
3076
|
+
position="left"
|
|
3063
3077
|
selected={Array []}
|
|
3064
3078
|
sendRef={[Function]}
|
|
3065
3079
|
>
|
|
@@ -3162,6 +3176,7 @@ exports[`checkbox select renders expanded with filtering successfully 1`] = `
|
|
|
3162
3176
|
keyHandler={[Function]}
|
|
3163
3177
|
maxHeight=""
|
|
3164
3178
|
openedOnEnter={false}
|
|
3179
|
+
position="left"
|
|
3165
3180
|
selected={Array []}
|
|
3166
3181
|
sendRef={[Function]}
|
|
3167
3182
|
>
|
|
@@ -3401,6 +3416,7 @@ exports[`checkbox select renders expanded with filtering successfully 2`] = `
|
|
|
3401
3416
|
onTypeaheadInputChanged={null}
|
|
3402
3417
|
ouiaSafe={true}
|
|
3403
3418
|
placeholderText=""
|
|
3419
|
+
position="left"
|
|
3404
3420
|
removeSelectionAriaLabel="Remove"
|
|
3405
3421
|
selections={Array []}
|
|
3406
3422
|
toggleAriaLabel="Options menu"
|
|
@@ -3708,6 +3724,7 @@ exports[`checkbox select renders expanded with filtering successfully 2`] = `
|
|
|
3708
3724
|
isLastOptionBeforeFooter={[Function]}
|
|
3709
3725
|
keyHandler={[Function]}
|
|
3710
3726
|
openedOnEnter={false}
|
|
3727
|
+
position="left"
|
|
3711
3728
|
selected={Array []}
|
|
3712
3729
|
sendRef={[Function]}
|
|
3713
3730
|
>
|
|
@@ -3810,6 +3827,7 @@ exports[`checkbox select renders expanded with filtering successfully 2`] = `
|
|
|
3810
3827
|
keyHandler={[Function]}
|
|
3811
3828
|
maxHeight=""
|
|
3812
3829
|
openedOnEnter={false}
|
|
3830
|
+
position="left"
|
|
3813
3831
|
selected={Array []}
|
|
3814
3832
|
sendRef={[Function]}
|
|
3815
3833
|
>
|
|
@@ -4054,6 +4072,7 @@ exports[`renders select with favorites successfully 1`] = `
|
|
|
4054
4072
|
onTypeaheadInputChanged={null}
|
|
4055
4073
|
ouiaSafe={true}
|
|
4056
4074
|
placeholderText=""
|
|
4075
|
+
position="left"
|
|
4057
4076
|
removeSelectionAriaLabel="Remove"
|
|
4058
4077
|
selections={Array []}
|
|
4059
4078
|
toggleAriaLabel="Options menu"
|
|
@@ -4831,6 +4850,7 @@ exports[`renders select with favorites successfully 1`] = `
|
|
|
4831
4850
|
isLastOptionBeforeFooter={[Function]}
|
|
4832
4851
|
keyHandler={[Function]}
|
|
4833
4852
|
openedOnEnter={false}
|
|
4853
|
+
position="left"
|
|
4834
4854
|
sendRef={[Function]}
|
|
4835
4855
|
>
|
|
4836
4856
|
<SelectMenu
|
|
@@ -5168,6 +5188,7 @@ exports[`renders select with favorites successfully 1`] = `
|
|
|
5168
5188
|
keyHandler={[Function]}
|
|
5169
5189
|
maxHeight=""
|
|
5170
5190
|
openedOnEnter={false}
|
|
5191
|
+
position="left"
|
|
5171
5192
|
selected=""
|
|
5172
5193
|
sendRef={[Function]}
|
|
5173
5194
|
>
|
|
@@ -5850,6 +5871,7 @@ exports[`select custom select filter filters properly 1`] = `
|
|
|
5850
5871
|
onTypeaheadInputChanged={null}
|
|
5851
5872
|
ouiaSafe={true}
|
|
5852
5873
|
placeholderText=""
|
|
5874
|
+
position="left"
|
|
5853
5875
|
removeSelectionAriaLabel="Remove"
|
|
5854
5876
|
selections={Array []}
|
|
5855
5877
|
toggleAriaLabel="Options menu"
|
|
@@ -6110,6 +6132,7 @@ exports[`select custom select filter filters properly 1`] = `
|
|
|
6110
6132
|
isLastOptionBeforeFooter={[Function]}
|
|
6111
6133
|
keyHandler={[Function]}
|
|
6112
6134
|
openedOnEnter={false}
|
|
6135
|
+
position="left"
|
|
6113
6136
|
sendRef={[Function]}
|
|
6114
6137
|
>
|
|
6115
6138
|
<SelectMenu
|
|
@@ -6178,6 +6201,7 @@ exports[`select custom select filter filters properly 1`] = `
|
|
|
6178
6201
|
keyHandler={[Function]}
|
|
6179
6202
|
maxHeight=""
|
|
6180
6203
|
openedOnEnter={false}
|
|
6204
|
+
position="left"
|
|
6181
6205
|
selected=""
|
|
6182
6206
|
sendRef={[Function]}
|
|
6183
6207
|
>
|
|
@@ -6349,6 +6373,7 @@ exports[`select renders select groups successfully 1`] = `
|
|
|
6349
6373
|
onTypeaheadInputChanged={null}
|
|
6350
6374
|
ouiaSafe={true}
|
|
6351
6375
|
placeholderText=""
|
|
6376
|
+
position="left"
|
|
6352
6377
|
removeSelectionAriaLabel="Remove"
|
|
6353
6378
|
selections={Array []}
|
|
6354
6379
|
toggleAriaLabel="Options menu"
|
|
@@ -6774,6 +6799,7 @@ exports[`select renders select groups successfully 1`] = `
|
|
|
6774
6799
|
isLastOptionBeforeFooter={[Function]}
|
|
6775
6800
|
keyHandler={[Function]}
|
|
6776
6801
|
openedOnEnter={false}
|
|
6802
|
+
position="left"
|
|
6777
6803
|
sendRef={[Function]}
|
|
6778
6804
|
>
|
|
6779
6805
|
<SelectMenu
|
|
@@ -6935,6 +6961,7 @@ exports[`select renders select groups successfully 1`] = `
|
|
|
6935
6961
|
keyHandler={[Function]}
|
|
6936
6962
|
maxHeight=""
|
|
6937
6963
|
openedOnEnter={false}
|
|
6964
|
+
position="left"
|
|
6938
6965
|
selected=""
|
|
6939
6966
|
sendRef={[Function]}
|
|
6940
6967
|
>
|
|
@@ -7337,6 +7364,7 @@ exports[`select renders up direction successfully 1`] = `
|
|
|
7337
7364
|
onTypeaheadInputChanged={null}
|
|
7338
7365
|
ouiaSafe={true}
|
|
7339
7366
|
placeholderText=""
|
|
7367
|
+
position="left"
|
|
7340
7368
|
removeSelectionAriaLabel="Remove"
|
|
7341
7369
|
selections={Array []}
|
|
7342
7370
|
toggleAriaLabel="Options menu"
|
|
@@ -7517,6 +7545,7 @@ exports[`select single select renders closed successfully 1`] = `
|
|
|
7517
7545
|
onTypeaheadInputChanged={null}
|
|
7518
7546
|
ouiaSafe={true}
|
|
7519
7547
|
placeholderText=""
|
|
7548
|
+
position="left"
|
|
7520
7549
|
removeSelectionAriaLabel="Remove"
|
|
7521
7550
|
selections={Array []}
|
|
7522
7551
|
toggleAriaLabel="Options menu"
|
|
@@ -7697,6 +7726,7 @@ exports[`select single select renders disabled successfully 1`] = `
|
|
|
7697
7726
|
onTypeaheadInputChanged={null}
|
|
7698
7727
|
ouiaSafe={true}
|
|
7699
7728
|
placeholderText=""
|
|
7729
|
+
position="left"
|
|
7700
7730
|
removeSelectionAriaLabel="Remove"
|
|
7701
7731
|
selections={Array []}
|
|
7702
7732
|
toggleAriaLabel="Options menu"
|
|
@@ -7878,6 +7908,7 @@ exports[`select single select renders expanded successfully 1`] = `
|
|
|
7878
7908
|
onTypeaheadInputChanged={null}
|
|
7879
7909
|
ouiaSafe={true}
|
|
7880
7910
|
placeholderText=""
|
|
7911
|
+
position="left"
|
|
7881
7912
|
removeSelectionAriaLabel="Remove"
|
|
7882
7913
|
selections={Array []}
|
|
7883
7914
|
toggleAriaLabel="Options menu"
|
|
@@ -8147,6 +8178,7 @@ exports[`select single select renders expanded successfully 1`] = `
|
|
|
8147
8178
|
isLastOptionBeforeFooter={[Function]}
|
|
8148
8179
|
keyHandler={[Function]}
|
|
8149
8180
|
openedOnEnter={false}
|
|
8181
|
+
position="left"
|
|
8150
8182
|
sendRef={[Function]}
|
|
8151
8183
|
>
|
|
8152
8184
|
<SelectMenu
|
|
@@ -8228,6 +8260,7 @@ exports[`select single select renders expanded successfully 1`] = `
|
|
|
8228
8260
|
keyHandler={[Function]}
|
|
8229
8261
|
maxHeight=""
|
|
8230
8262
|
openedOnEnter={false}
|
|
8263
|
+
position="left"
|
|
8231
8264
|
selected=""
|
|
8232
8265
|
sendRef={[Function]}
|
|
8233
8266
|
>
|
|
@@ -8435,6 +8468,7 @@ exports[`select single select renders expanded successfully with custom objects
|
|
|
8435
8468
|
onTypeaheadInputChanged={null}
|
|
8436
8469
|
ouiaSafe={true}
|
|
8437
8470
|
placeholderText=""
|
|
8471
|
+
position="left"
|
|
8438
8472
|
removeSelectionAriaLabel="Remove"
|
|
8439
8473
|
selections={Array []}
|
|
8440
8474
|
toggleAriaLabel="Options menu"
|
|
@@ -8678,6 +8712,7 @@ exports[`select single select renders expanded successfully with custom objects
|
|
|
8678
8712
|
isLastOptionBeforeFooter={[Function]}
|
|
8679
8713
|
keyHandler={[Function]}
|
|
8680
8714
|
openedOnEnter={false}
|
|
8715
|
+
position="left"
|
|
8681
8716
|
sendRef={[Function]}
|
|
8682
8717
|
>
|
|
8683
8718
|
<SelectMenu
|
|
@@ -8746,6 +8781,7 @@ exports[`select single select renders expanded successfully with custom objects
|
|
|
8746
8781
|
keyHandler={[Function]}
|
|
8747
8782
|
maxHeight=""
|
|
8748
8783
|
openedOnEnter={false}
|
|
8784
|
+
position="left"
|
|
8749
8785
|
selected=""
|
|
8750
8786
|
sendRef={[Function]}
|
|
8751
8787
|
>
|
|
@@ -8937,6 +8973,7 @@ exports[`select with custom content renders closed successfully 1`] = `
|
|
|
8937
8973
|
onTypeaheadInputChanged={null}
|
|
8938
8974
|
ouiaSafe={true}
|
|
8939
8975
|
placeholderText=""
|
|
8976
|
+
position="left"
|
|
8940
8977
|
removeSelectionAriaLabel="Remove"
|
|
8941
8978
|
selections={Array []}
|
|
8942
8979
|
toggleAriaLabel="Options menu"
|
|
@@ -9112,6 +9149,7 @@ exports[`select with custom content renders expanded successfully 1`] = `
|
|
|
9112
9149
|
onTypeaheadInputChanged={null}
|
|
9113
9150
|
ouiaSafe={true}
|
|
9114
9151
|
placeholderText=""
|
|
9152
|
+
position="left"
|
|
9115
9153
|
removeSelectionAriaLabel="Remove"
|
|
9116
9154
|
selections={Array []}
|
|
9117
9155
|
toggleAriaLabel="Options menu"
|
|
@@ -9271,6 +9309,7 @@ exports[`select with custom content renders expanded successfully 1`] = `
|
|
|
9271
9309
|
isLastOptionBeforeFooter={[Function]}
|
|
9272
9310
|
keyHandler={[Function]}
|
|
9273
9311
|
openedOnEnter={false}
|
|
9312
|
+
position="left"
|
|
9274
9313
|
selected={Array []}
|
|
9275
9314
|
sendRef={[Function]}
|
|
9276
9315
|
>
|
|
@@ -9300,6 +9339,7 @@ exports[`select with custom content renders expanded successfully 1`] = `
|
|
|
9300
9339
|
keyHandler={[Function]}
|
|
9301
9340
|
maxHeight=""
|
|
9302
9341
|
openedOnEnter={false}
|
|
9342
|
+
position="left"
|
|
9303
9343
|
selected={Array []}
|
|
9304
9344
|
sendRef={[Function]}
|
|
9305
9345
|
>
|
|
@@ -9389,6 +9429,7 @@ exports[`typeahead multi select renders closed successfully 1`] = `
|
|
|
9389
9429
|
onTypeaheadInputChanged={null}
|
|
9390
9430
|
ouiaSafe={true}
|
|
9391
9431
|
placeholderText=""
|
|
9432
|
+
position="left"
|
|
9392
9433
|
removeSelectionAriaLabel="Remove"
|
|
9393
9434
|
selections={Array []}
|
|
9394
9435
|
toggleAriaLabel="Options menu"
|
|
@@ -9589,6 +9630,7 @@ exports[`typeahead multi select renders expanded successfully 1`] = `
|
|
|
9589
9630
|
onTypeaheadInputChanged={null}
|
|
9590
9631
|
ouiaSafe={true}
|
|
9591
9632
|
placeholderText=""
|
|
9633
|
+
position="left"
|
|
9592
9634
|
removeSelectionAriaLabel="Remove"
|
|
9593
9635
|
selections={Array []}
|
|
9594
9636
|
toggleAriaLabel="Options menu"
|
|
@@ -9877,6 +9919,7 @@ exports[`typeahead multi select renders expanded successfully 1`] = `
|
|
|
9877
9919
|
isLastOptionBeforeFooter={[Function]}
|
|
9878
9920
|
keyHandler={[Function]}
|
|
9879
9921
|
openedOnEnter={false}
|
|
9922
|
+
position="left"
|
|
9880
9923
|
selected={Array []}
|
|
9881
9924
|
sendRef={[Function]}
|
|
9882
9925
|
>
|
|
@@ -9959,6 +10002,7 @@ exports[`typeahead multi select renders expanded successfully 1`] = `
|
|
|
9959
10002
|
keyHandler={[Function]}
|
|
9960
10003
|
maxHeight=""
|
|
9961
10004
|
openedOnEnter={false}
|
|
10005
|
+
position="left"
|
|
9962
10006
|
selected={Array []}
|
|
9963
10007
|
sendRef={[Function]}
|
|
9964
10008
|
>
|
|
@@ -10170,6 +10214,7 @@ exports[`typeahead multi select renders selected successfully 1`] = `
|
|
|
10170
10214
|
onTypeaheadInputChanged={null}
|
|
10171
10215
|
ouiaSafe={true}
|
|
10172
10216
|
placeholderText=""
|
|
10217
|
+
position="left"
|
|
10173
10218
|
removeSelectionAriaLabel="Remove"
|
|
10174
10219
|
selections={
|
|
10175
10220
|
Array [
|
|
@@ -10854,6 +10899,7 @@ exports[`typeahead multi select renders selected successfully 1`] = `
|
|
|
10854
10899
|
isLastOptionBeforeFooter={[Function]}
|
|
10855
10900
|
keyHandler={[Function]}
|
|
10856
10901
|
openedOnEnter={false}
|
|
10902
|
+
position="left"
|
|
10857
10903
|
selected={
|
|
10858
10904
|
Array [
|
|
10859
10905
|
"Mr",
|
|
@@ -10977,6 +11023,7 @@ exports[`typeahead multi select renders selected successfully 1`] = `
|
|
|
10977
11023
|
keyHandler={[Function]}
|
|
10978
11024
|
maxHeight=""
|
|
10979
11025
|
openedOnEnter={false}
|
|
11026
|
+
position="left"
|
|
10980
11027
|
selected={
|
|
10981
11028
|
Array [
|
|
10982
11029
|
"Mr",
|
|
@@ -11251,6 +11298,7 @@ exports[`typeahead select renders closed successfully 1`] = `
|
|
|
11251
11298
|
onTypeaheadInputChanged={null}
|
|
11252
11299
|
ouiaSafe={true}
|
|
11253
11300
|
placeholderText=""
|
|
11301
|
+
position="left"
|
|
11254
11302
|
removeSelectionAriaLabel="Remove"
|
|
11255
11303
|
selections={Array []}
|
|
11256
11304
|
toggleAriaLabel="Options menu"
|
|
@@ -11449,6 +11497,7 @@ exports[`typeahead select renders expanded successfully 1`] = `
|
|
|
11449
11497
|
onTypeaheadInputChanged={null}
|
|
11450
11498
|
ouiaSafe={true}
|
|
11451
11499
|
placeholderText=""
|
|
11500
|
+
position="left"
|
|
11452
11501
|
removeSelectionAriaLabel="Remove"
|
|
11453
11502
|
selections={Array []}
|
|
11454
11503
|
toggleAriaLabel="Options menu"
|
|
@@ -11735,6 +11784,7 @@ exports[`typeahead select renders expanded successfully 1`] = `
|
|
|
11735
11784
|
isLastOptionBeforeFooter={[Function]}
|
|
11736
11785
|
keyHandler={[Function]}
|
|
11737
11786
|
openedOnEnter={false}
|
|
11787
|
+
position="left"
|
|
11738
11788
|
sendRef={[Function]}
|
|
11739
11789
|
>
|
|
11740
11790
|
<SelectMenu
|
|
@@ -11816,6 +11866,7 @@ exports[`typeahead select renders expanded successfully 1`] = `
|
|
|
11816
11866
|
keyHandler={[Function]}
|
|
11817
11867
|
maxHeight=""
|
|
11818
11868
|
openedOnEnter={false}
|
|
11869
|
+
position="left"
|
|
11819
11870
|
selected=""
|
|
11820
11871
|
sendRef={[Function]}
|
|
11821
11872
|
>
|
|
@@ -12027,6 +12078,7 @@ exports[`typeahead select renders selected successfully 1`] = `
|
|
|
12027
12078
|
onTypeaheadInputChanged={null}
|
|
12028
12079
|
ouiaSafe={true}
|
|
12029
12080
|
placeholderText=""
|
|
12081
|
+
position="left"
|
|
12030
12082
|
removeSelectionAriaLabel="Remove"
|
|
12031
12083
|
selections="Mr"
|
|
12032
12084
|
toggleAriaLabel="Options menu"
|
|
@@ -12349,6 +12401,7 @@ exports[`typeahead select renders selected successfully 1`] = `
|
|
|
12349
12401
|
isLastOptionBeforeFooter={[Function]}
|
|
12350
12402
|
keyHandler={[Function]}
|
|
12351
12403
|
openedOnEnter={false}
|
|
12404
|
+
position="left"
|
|
12352
12405
|
selected="Mr"
|
|
12353
12406
|
sendRef={[Function]}
|
|
12354
12407
|
>
|
|
@@ -12449,6 +12502,7 @@ exports[`typeahead select renders selected successfully 1`] = `
|
|
|
12449
12502
|
keyHandler={[Function]}
|
|
12450
12503
|
maxHeight=""
|
|
12451
12504
|
openedOnEnter={false}
|
|
12505
|
+
position="left"
|
|
12452
12506
|
selected="Mr"
|
|
12453
12507
|
sendRef={[Function]}
|
|
12454
12508
|
>
|
|
@@ -12688,6 +12742,7 @@ exports[`typeahead select test select existing option on a non-creatable select
|
|
|
12688
12742
|
onTypeaheadInputChanged={null}
|
|
12689
12743
|
ouiaSafe={true}
|
|
12690
12744
|
placeholderText=""
|
|
12745
|
+
position="left"
|
|
12691
12746
|
removeSelectionAriaLabel="Remove"
|
|
12692
12747
|
selections={Array []}
|
|
12693
12748
|
toggleAriaLabel="Options menu"
|
|
@@ -12896,6 +12951,7 @@ exports[`typeahead select test select existing option on a non-creatable select
|
|
|
12896
12951
|
isLastOptionBeforeFooter={[Function]}
|
|
12897
12952
|
keyHandler={[Function]}
|
|
12898
12953
|
openedOnEnter={false}
|
|
12954
|
+
position="left"
|
|
12899
12955
|
sendRef={[Function]}
|
|
12900
12956
|
>
|
|
12901
12957
|
<SelectMenu
|
|
@@ -12938,6 +12994,7 @@ exports[`typeahead select test select existing option on a non-creatable select
|
|
|
12938
12994
|
keyHandler={[Function]}
|
|
12939
12995
|
maxHeight=""
|
|
12940
12996
|
openedOnEnter={false}
|
|
12997
|
+
position="left"
|
|
12941
12998
|
selected=""
|
|
12942
12999
|
sendRef={[Function]}
|
|
12943
13000
|
>
|
|
@@ -56,11 +56,12 @@ import { Sidebar, SidebarContent, SidebarPanel } from '@patternfly/react-core';
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Sticky panel
|
|
59
|
+
A `tabindex` should be added to the `Sidebar` when there is scrollable content in order for the overflow content to be accessible by keyboard.
|
|
59
60
|
```js
|
|
60
61
|
import React from 'react';
|
|
61
62
|
import { Sidebar, SidebarContent, SidebarPanel } from '@patternfly/react-core';
|
|
62
63
|
|
|
63
|
-
<Sidebar style={{ height: '200px', overflow: 'auto' }}>
|
|
64
|
+
<Sidebar style={{ height: '200px', overflow: 'auto' }} tabindex={0}>
|
|
64
65
|
<SidebarPanel variant="sticky">
|
|
65
66
|
Sticky sidebar panel
|
|
66
67
|
</SidebarPanel>
|
|
@@ -73,11 +74,12 @@ import { Sidebar, SidebarContent, SidebarPanel } from '@patternfly/react-core';
|
|
|
73
74
|
```
|
|
74
75
|
|
|
75
76
|
### Static panel
|
|
77
|
+
A `tabindex` should be added to the `Sidebar` when there is scrollable content in order for the overflow content to be accessible by keyboard.
|
|
76
78
|
```js
|
|
77
79
|
import React from 'react';
|
|
78
80
|
import { Sidebar, SidebarContent, SidebarPanel } from '@patternfly/react-core';
|
|
79
81
|
|
|
80
|
-
<Sidebar style={{ height: '200px', overflow: 'auto' }}>
|
|
82
|
+
<Sidebar style={{ height: '200px', overflow: 'auto' }} tabindex={0}>
|
|
81
83
|
<SidebarPanel variant="static">
|
|
82
84
|
Static sidebar panel
|
|
83
85
|
</SidebarPanel>
|
|
@@ -90,11 +92,12 @@ import { Sidebar, SidebarContent, SidebarPanel } from '@patternfly/react-core';
|
|
|
90
92
|
```
|
|
91
93
|
|
|
92
94
|
### Responsive panel width
|
|
95
|
+
A `tabindex` should be added to the `Sidebar` when there is scrollable content in order for the overflow content to be accessible by keyboard.
|
|
93
96
|
```js
|
|
94
97
|
import React from 'react';
|
|
95
98
|
import { Sidebar, SidebarContent, SidebarPanel } from '@patternfly/react-core';
|
|
96
99
|
|
|
97
|
-
<Sidebar style={{ height: '200px', overflow: 'auto' }}>
|
|
100
|
+
<Sidebar style={{ height: '200px', overflow: 'auto' }} tabindex={0}>
|
|
98
101
|
<SidebarPanel width={{ default: 'width_50', lg: 'width_33', xl: 'width_75' }}>
|
|
99
102
|
Sidebar panel
|
|
100
103
|
</SidebarPanel>
|
|
@@ -9,7 +9,9 @@ import { getUniqueId, isElementInView, formatBreakpointMods } from '../../helper
|
|
|
9
9
|
import { TabContent } from './TabContent';
|
|
10
10
|
import { TabProps } from './Tab';
|
|
11
11
|
import { TabsContextProvider } from './TabsContext';
|
|
12
|
+
import { Button } from '../Button';
|
|
12
13
|
import { getOUIAProps, OUIAProps, getDefaultOUIAId, canUseDOM } from '../../helpers';
|
|
14
|
+
import { GenerateId } from '../../helpers/GenerateId/GenerateId';
|
|
13
15
|
|
|
14
16
|
export enum TabsComponent {
|
|
15
17
|
div = 'div',
|
|
@@ -62,6 +64,25 @@ export interface TabsProps extends Omit<React.HTMLProps<HTMLElement | HTMLDivEle
|
|
|
62
64
|
xl?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
|
|
63
65
|
'2xl'?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
|
|
64
66
|
};
|
|
67
|
+
/** Enable expandable vertical tabs at various breakpoints. (isVertical should be set to true for this to work) */
|
|
68
|
+
expandable?: {
|
|
69
|
+
default?: 'expandable' | 'nonExpandable';
|
|
70
|
+
sm?: 'expandable' | 'nonExpandable';
|
|
71
|
+
md?: 'expandable' | 'nonExpandable';
|
|
72
|
+
lg?: 'expandable' | 'nonExpandable';
|
|
73
|
+
xl?: 'expandable' | 'nonExpandable';
|
|
74
|
+
'2xl'?: 'expandable' | 'nonExpandable';
|
|
75
|
+
};
|
|
76
|
+
/** Flag to indicate if the vertical tabs are expanded */
|
|
77
|
+
isExpanded?: boolean;
|
|
78
|
+
/** Flag indicating the default expanded state for uncontrolled expand/collapse of */
|
|
79
|
+
defaultIsExpanded?: boolean;
|
|
80
|
+
/** Text that appears in the expandable toggle */
|
|
81
|
+
toggleText?: string;
|
|
82
|
+
/** Aria-label for the left expandable toggle */
|
|
83
|
+
toggleAriaLabel?: string;
|
|
84
|
+
/** Callback function to toggle the expandable tabs. */
|
|
85
|
+
onToggle?: (isExpanded: boolean) => void;
|
|
65
86
|
}
|
|
66
87
|
|
|
67
88
|
const variantStyle = {
|
|
@@ -75,6 +96,7 @@ interface TabsState {
|
|
|
75
96
|
disableRightScrollButton: boolean;
|
|
76
97
|
shownKeys: (string | number)[];
|
|
77
98
|
uncontrolledActiveKey: number | string;
|
|
99
|
+
uncontrolledIsExpandedLocal: boolean;
|
|
78
100
|
ouiaStateId: string;
|
|
79
101
|
}
|
|
80
102
|
|
|
@@ -85,12 +107,23 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
85
107
|
super(props);
|
|
86
108
|
this.state = {
|
|
87
109
|
showScrollButtons: false,
|
|
88
|
-
disableLeftScrollButton:
|
|
89
|
-
disableRightScrollButton:
|
|
110
|
+
disableLeftScrollButton: true,
|
|
111
|
+
disableRightScrollButton: true,
|
|
90
112
|
shownKeys: this.props.defaultActiveKey !== undefined ? [this.props.defaultActiveKey] : [this.props.activeKey], // only for mountOnEnter case
|
|
91
113
|
uncontrolledActiveKey: this.props.defaultActiveKey,
|
|
114
|
+
uncontrolledIsExpandedLocal: this.props.defaultIsExpanded,
|
|
92
115
|
ouiaStateId: getDefaultOUIAId(Tabs.displayName)
|
|
93
116
|
};
|
|
117
|
+
|
|
118
|
+
if (this.props.isVertical && this.props.expandable !== undefined) {
|
|
119
|
+
if (!this.props.toggleAriaLabel && !this.props.toggleText) {
|
|
120
|
+
// eslint-disable-next-line no-console
|
|
121
|
+
console.error(
|
|
122
|
+
'Tabs:',
|
|
123
|
+
'toggleAriaLabel or the toggleText prop is required to make the toggle button accessible'
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
94
127
|
}
|
|
95
128
|
|
|
96
129
|
static defaultProps: PickOptional<TabsProps> = {
|
|
@@ -106,7 +139,9 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
106
139
|
mountOnEnter: false,
|
|
107
140
|
unmountOnExit: false,
|
|
108
141
|
ouiaSafe: true,
|
|
109
|
-
variant: 'default'
|
|
142
|
+
variant: 'default',
|
|
143
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
144
|
+
onToggle: (isExpanded): void => undefined
|
|
110
145
|
};
|
|
111
146
|
|
|
112
147
|
handleTabClick(
|
|
@@ -147,6 +182,10 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
147
182
|
|
|
148
183
|
handleScrollButtons = () => {
|
|
149
184
|
const container = this.tabList.current;
|
|
185
|
+
let disableLeftScrollButton = true;
|
|
186
|
+
let disableRightScrollButton = true;
|
|
187
|
+
let showScrollButtons = false;
|
|
188
|
+
|
|
150
189
|
if (container && !this.props.isVertical) {
|
|
151
190
|
// get first element and check if it is in view
|
|
152
191
|
const overflowOnLeft = !isElementInView(container, container.firstChild as HTMLElement, false);
|
|
@@ -154,17 +193,16 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
154
193
|
// get last element and check if it is in view
|
|
155
194
|
const overflowOnRight = !isElementInView(container, container.lastChild as HTMLElement, false);
|
|
156
195
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const disableLeftScrollButton = !overflowOnLeft;
|
|
160
|
-
const disableRightScrollButton = !overflowOnRight;
|
|
196
|
+
showScrollButtons = overflowOnLeft || overflowOnRight;
|
|
161
197
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
disableLeftScrollButton,
|
|
165
|
-
disableRightScrollButton
|
|
166
|
-
});
|
|
198
|
+
disableLeftScrollButton = !overflowOnLeft;
|
|
199
|
+
disableRightScrollButton = !overflowOnRight;
|
|
167
200
|
}
|
|
201
|
+
this.setState({
|
|
202
|
+
showScrollButtons,
|
|
203
|
+
disableLeftScrollButton,
|
|
204
|
+
disableRightScrollButton
|
|
205
|
+
});
|
|
168
206
|
};
|
|
169
207
|
|
|
170
208
|
scrollLeft = () => {
|
|
@@ -256,6 +294,12 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
256
294
|
usePageInsets,
|
|
257
295
|
inset,
|
|
258
296
|
variant,
|
|
297
|
+
expandable,
|
|
298
|
+
isExpanded,
|
|
299
|
+
defaultIsExpanded,
|
|
300
|
+
toggleText,
|
|
301
|
+
toggleAriaLabel,
|
|
302
|
+
onToggle,
|
|
259
303
|
...props
|
|
260
304
|
} = this.props;
|
|
261
305
|
const {
|
|
@@ -263,7 +307,8 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
263
307
|
disableLeftScrollButton,
|
|
264
308
|
disableRightScrollButton,
|
|
265
309
|
shownKeys,
|
|
266
|
-
uncontrolledActiveKey
|
|
310
|
+
uncontrolledActiveKey,
|
|
311
|
+
uncontrolledIsExpandedLocal
|
|
267
312
|
} = this.state;
|
|
268
313
|
const filteredChildren = (React.Children.toArray(children) as React.ReactElement<TabProps>[])
|
|
269
314
|
.filter(Boolean)
|
|
@@ -273,6 +318,16 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
273
318
|
const Component: any = component === TabsComponent.nav ? 'nav' : 'div';
|
|
274
319
|
const localActiveKey = defaultActiveKey !== undefined ? uncontrolledActiveKey : activeKey;
|
|
275
320
|
|
|
321
|
+
const isExpandedLocal = defaultIsExpanded !== undefined ? uncontrolledIsExpandedLocal : isExpanded;
|
|
322
|
+
/* Uncontrolled expandable tabs */
|
|
323
|
+
const toggleTabs = (newValue: boolean) => {
|
|
324
|
+
if (isExpanded === undefined) {
|
|
325
|
+
this.setState({ uncontrolledIsExpandedLocal: newValue });
|
|
326
|
+
} else {
|
|
327
|
+
onToggle(newValue);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
|
|
276
331
|
return (
|
|
277
332
|
<TabsContextProvider
|
|
278
333
|
value={{
|
|
@@ -291,6 +346,8 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
291
346
|
isFilled && styles.modifiers.fill,
|
|
292
347
|
isSecondary && styles.modifiers.secondary,
|
|
293
348
|
isVertical && styles.modifiers.vertical,
|
|
349
|
+
isVertical && expandable && formatBreakpointMods(expandable, styles),
|
|
350
|
+
isVertical && expandable && isExpandedLocal && styles.modifiers.expanded,
|
|
294
351
|
isBox && styles.modifiers.box,
|
|
295
352
|
showScrollButtons && !isVertical && styles.modifiers.scrollable,
|
|
296
353
|
usePageInsets && styles.modifiers.pageInsets,
|
|
@@ -302,6 +359,33 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
302
359
|
id={id && id}
|
|
303
360
|
{...props}
|
|
304
361
|
>
|
|
362
|
+
{expandable && isVertical && (
|
|
363
|
+
<GenerateId>
|
|
364
|
+
{randomId => (
|
|
365
|
+
<div className={css(styles.tabsToggle)}>
|
|
366
|
+
<div className={css(styles.tabsToggleButton)}>
|
|
367
|
+
<Button
|
|
368
|
+
onClick={() => toggleTabs(!isExpandedLocal)}
|
|
369
|
+
variant="plain"
|
|
370
|
+
aria-label={toggleAriaLabel}
|
|
371
|
+
aria-expanded={isExpandedLocal}
|
|
372
|
+
id={`${randomId}-button`}
|
|
373
|
+
aria-labelledby={`${randomId}-text ${randomId}-button`}
|
|
374
|
+
>
|
|
375
|
+
<span className={css(styles.tabsToggleIcon)}>
|
|
376
|
+
<AngleRightIcon arian-hidden="true" />
|
|
377
|
+
</span>
|
|
378
|
+
{toggleText && (
|
|
379
|
+
<span className={css('pf-c-tabs__toggle-text')} id={`${randomId}-text`}>
|
|
380
|
+
{toggleText}
|
|
381
|
+
</span>
|
|
382
|
+
)}
|
|
383
|
+
</Button>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
)}
|
|
387
|
+
</GenerateId>
|
|
388
|
+
)}
|
|
305
389
|
<button
|
|
306
390
|
className={css(styles.tabsScrollButton, isSecondary && buttonStyles.modifiers.secondary)}
|
|
307
391
|
aria-label={leftScrollAriaLabel}
|