@patternfly/react-core 4.204.0 → 4.205.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/umd/react-core.min.css +153 -153
- package/package.json +5 -5
- package/src/demos/Tabs.md +6 -1
- package/src/demos/examples/DashboardWrapper.js +16 -2
- package/src/demos/examples/Tabs/GrayTabs.tsx +2 -8
- package/src/demos/examples/Tabs/ModalTabs.tsx +1 -1
- package/src/demos/{Tabs/NestedTabsDemo.js → examples/Tabs/NestedTabs.tsx} +12 -13
- package/src/demos/examples/Tabs/NestedUnindentedTabs.tsx +174 -0
- package/src/demos/examples/Tabs/TabsAndTable.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 4.205.0 (2022-04-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **Tabs:** Add nested, unindented demo ([#7194](https://github.com/patternfly/patternfly-react/issues/7194)) ([81bd759](https://github.com/patternfly/patternfly-react/commit/81bd759189379bc558871acc791a1a34dcc2ed1a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# 4.204.0 (2022-04-18)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -17635,6 +17635,159 @@ label.pf-c-radio, .pf-c-radio__label,
|
|
|
17635
17635
|
margin-left: var(--pf-c-slider__main--actions--MarginLeft);
|
|
17636
17636
|
}
|
|
17637
17637
|
|
|
17638
|
+
.pf-c-switch {
|
|
17639
|
+
--pf-c-switch--FontSize: var(--pf-global--FontSize--md);
|
|
17640
|
+
--pf-c-switch__label--PaddingLeft: var(--pf-global--spacer--md);
|
|
17641
|
+
--pf-c-switch--ColumnGap: var(--pf-c-switch__label--PaddingLeft);
|
|
17642
|
+
--pf-c-switch__toggle-icon--FontSize: calc(var(--pf-c-switch--FontSize) * .625);
|
|
17643
|
+
--pf-c-switch__toggle-icon--Color: var(--pf-global--Color--light-100);
|
|
17644
|
+
--pf-c-switch__toggle-icon--Left: calc(var(--pf-c-switch--FontSize) * .4);
|
|
17645
|
+
--pf-c-switch__toggle-icon--Offset: 0.125rem;
|
|
17646
|
+
--pf-c-switch--LineHeight: var(--pf-global--LineHeight--md);
|
|
17647
|
+
--pf-c-switch--Height: auto;
|
|
17648
|
+
--pf-c-switch__input--checked__toggle--BackgroundColor: var(--pf-global--primary-color--100);
|
|
17649
|
+
--pf-c-switch__input--checked__toggle--before--TranslateX: calc(100% + var(--pf-c-switch__toggle-icon--Offset));
|
|
17650
|
+
--pf-c-switch__input--checked__label--Color: var(--pf-global--Color--dark-100);
|
|
17651
|
+
--pf-c-switch__input--not-checked__label--Color: var(--pf-global--disabled-color--100);
|
|
17652
|
+
--pf-c-switch__input--disabled__label--Color: var(--pf-global--disabled-color--100);
|
|
17653
|
+
--pf-c-switch__input--disabled__toggle--BackgroundColor: var(--pf-global--disabled-color--200);
|
|
17654
|
+
--pf-c-switch__input--disabled__toggle--before--BackgroundColor: var(--pf-global--palette--black-150);
|
|
17655
|
+
--pf-c-switch__input--focus__toggle--OutlineWidth: var(--pf-global--BorderWidth--md);
|
|
17656
|
+
--pf-c-switch__input--focus__toggle--OutlineOffset: var(--pf-global--spacer--sm);
|
|
17657
|
+
--pf-c-switch__input--focus__toggle--OutlineColor: var(--pf-global--primary-color--100);
|
|
17658
|
+
--pf-c-switch__toggle--Height: calc(var(--pf-c-switch--FontSize) * var(--pf-c-switch--LineHeight));
|
|
17659
|
+
--pf-c-switch__toggle--BackgroundColor: var(--pf-global--palette--black-500);
|
|
17660
|
+
--pf-c-switch__toggle--BorderRadius: var(--pf-c-switch__toggle--Height);
|
|
17661
|
+
--pf-c-switch__toggle--before--Width: calc(var(--pf-c-switch--FontSize) - var(--pf-c-switch__toggle-icon--Offset));
|
|
17662
|
+
--pf-c-switch__toggle--before--Height: var(--pf-c-switch__toggle--before--Width);
|
|
17663
|
+
--pf-c-switch__toggle--before--Top: calc((var(--pf-c-switch__toggle--Height) - var(--pf-c-switch__toggle--before--Height)) / 2);
|
|
17664
|
+
--pf-c-switch__toggle--before--Left: var(--pf-c-switch__toggle--before--Top);
|
|
17665
|
+
--pf-c-switch__toggle--before--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
17666
|
+
--pf-c-switch__toggle--before--BorderRadius: var(--pf-global--BorderRadius--lg);
|
|
17667
|
+
--pf-c-switch__toggle--before--BoxShadow: var(--pf-global--BoxShadow--md);
|
|
17668
|
+
--pf-c-switch__toggle--before--Transition: transform .25s ease 0s;
|
|
17669
|
+
--pf-c-switch__toggle--Width: calc(var(--pf-c-switch__toggle--Height) + var(--pf-c-switch__toggle-icon--Offset) + var(--pf-c-switch__toggle--before--Width));
|
|
17670
|
+
--pf-c-switch__label--Color: var(--pf-global--Color--dark-100);
|
|
17671
|
+
position: relative;
|
|
17672
|
+
display: inline-grid;
|
|
17673
|
+
grid-template-columns: auto;
|
|
17674
|
+
grid-auto-columns: 1fr;
|
|
17675
|
+
column-gap: var(--pf-c-switch--ColumnGap);
|
|
17676
|
+
height: var(--pf-c-switch--Height);
|
|
17677
|
+
font-size: var(--pf-c-switch--FontSize);
|
|
17678
|
+
line-height: var(--pf-c-switch--LineHeight);
|
|
17679
|
+
vertical-align: middle;
|
|
17680
|
+
cursor: pointer;
|
|
17681
|
+
}
|
|
17682
|
+
|
|
17683
|
+
.pf-c-switch.pf-m-reverse .pf-c-switch__label,
|
|
17684
|
+
.pf-c-switch.pf-m-reverse .pf-c-switch__toggle {
|
|
17685
|
+
grid-row: 1;
|
|
17686
|
+
}
|
|
17687
|
+
|
|
17688
|
+
.pf-c-switch.pf-m-reverse .pf-c-switch__label {
|
|
17689
|
+
grid-column: 1;
|
|
17690
|
+
}
|
|
17691
|
+
|
|
17692
|
+
.pf-c-switch__input {
|
|
17693
|
+
position: absolute;
|
|
17694
|
+
cursor: pointer;
|
|
17695
|
+
opacity: 0;
|
|
17696
|
+
}
|
|
17697
|
+
|
|
17698
|
+
.pf-c-switch__input:focus ~ .pf-c-switch__toggle {
|
|
17699
|
+
outline: var(--pf-c-switch__input--focus__toggle--OutlineWidth) solid var(--pf-c-switch__input--focus__toggle--OutlineColor);
|
|
17700
|
+
outline-offset: var(--pf-c-switch__input--focus__toggle--OutlineOffset);
|
|
17701
|
+
}
|
|
17702
|
+
|
|
17703
|
+
.pf-c-switch__input:checked ~ .pf-c-switch__label {
|
|
17704
|
+
color: var(--pf-c-switch__input--checked__label--Color);
|
|
17705
|
+
}
|
|
17706
|
+
|
|
17707
|
+
.pf-c-switch__input:checked ~ .pf-c-switch__toggle {
|
|
17708
|
+
background-color: var(--pf-c-switch__input--checked__toggle--BackgroundColor);
|
|
17709
|
+
}
|
|
17710
|
+
|
|
17711
|
+
.pf-c-switch__input:checked ~ .pf-c-switch__toggle::before {
|
|
17712
|
+
transform: translateX(var(--pf-c-switch__input--checked__toggle--before--TranslateX));
|
|
17713
|
+
}
|
|
17714
|
+
|
|
17715
|
+
.pf-c-switch__input:checked ~ .pf-m-off {
|
|
17716
|
+
display: none;
|
|
17717
|
+
}
|
|
17718
|
+
|
|
17719
|
+
.pf-c-switch__input:not(:checked) ~ .pf-c-switch__label {
|
|
17720
|
+
color: var(--pf-c-switch__input--not-checked__label--Color);
|
|
17721
|
+
}
|
|
17722
|
+
|
|
17723
|
+
.pf-c-switch__input:not(:checked) ~ .pf-c-switch__toggle .pf-c-switch__toggle-icon {
|
|
17724
|
+
display: none;
|
|
17725
|
+
visibility: hidden;
|
|
17726
|
+
}
|
|
17727
|
+
|
|
17728
|
+
.pf-c-switch__input:not(:checked) ~ .pf-m-on {
|
|
17729
|
+
display: none;
|
|
17730
|
+
}
|
|
17731
|
+
|
|
17732
|
+
.pf-c-switch__input:disabled {
|
|
17733
|
+
cursor: not-allowed;
|
|
17734
|
+
}
|
|
17735
|
+
|
|
17736
|
+
.pf-c-switch__input:disabled ~ .pf-c-switch__label {
|
|
17737
|
+
color: var(--pf-c-switch__input--disabled__label--Color);
|
|
17738
|
+
cursor: not-allowed;
|
|
17739
|
+
}
|
|
17740
|
+
|
|
17741
|
+
.pf-c-switch__input:disabled ~ .pf-c-switch__toggle {
|
|
17742
|
+
cursor: not-allowed;
|
|
17743
|
+
background-color: var(--pf-c-switch__input--disabled__toggle--BackgroundColor);
|
|
17744
|
+
}
|
|
17745
|
+
|
|
17746
|
+
.pf-c-switch__input:disabled ~ .pf-c-switch__toggle::before {
|
|
17747
|
+
background-color: var(--pf-c-switch__input--disabled__toggle--before--BackgroundColor);
|
|
17748
|
+
}
|
|
17749
|
+
|
|
17750
|
+
.pf-c-switch__toggle {
|
|
17751
|
+
position: relative;
|
|
17752
|
+
display: inline-block;
|
|
17753
|
+
width: var(--pf-c-switch__toggle--Width);
|
|
17754
|
+
height: var(--pf-c-switch__toggle--Height);
|
|
17755
|
+
background-color: var(--pf-c-switch__toggle--BackgroundColor);
|
|
17756
|
+
border-radius: var(--pf-c-switch__toggle--BorderRadius);
|
|
17757
|
+
}
|
|
17758
|
+
|
|
17759
|
+
.pf-c-switch__toggle::before {
|
|
17760
|
+
position: absolute;
|
|
17761
|
+
top: var(--pf-c-switch__toggle--before--Top);
|
|
17762
|
+
left: var(--pf-c-switch__toggle--before--Left);
|
|
17763
|
+
display: block;
|
|
17764
|
+
width: var(--pf-c-switch__toggle--before--Width);
|
|
17765
|
+
height: var(--pf-c-switch__toggle--before--Height);
|
|
17766
|
+
content: "";
|
|
17767
|
+
background-color: var(--pf-c-switch__toggle--before--BackgroundColor);
|
|
17768
|
+
border-radius: var(--pf-c-switch__toggle--before--BorderRadius);
|
|
17769
|
+
box-shadow: var(--pf-c-switch__toggle--before--BoxShadow);
|
|
17770
|
+
transition: var(--pf-c-switch__toggle--before--Transition);
|
|
17771
|
+
}
|
|
17772
|
+
|
|
17773
|
+
.pf-c-switch__toggle-icon {
|
|
17774
|
+
position: absolute;
|
|
17775
|
+
top: 0;
|
|
17776
|
+
bottom: 0;
|
|
17777
|
+
left: var(--pf-c-switch__toggle-icon--Left);
|
|
17778
|
+
display: flex;
|
|
17779
|
+
align-items: center;
|
|
17780
|
+
font-size: var(--pf-c-switch__toggle-icon--FontSize);
|
|
17781
|
+
color: var(--pf-c-switch__toggle-icon--Color);
|
|
17782
|
+
}
|
|
17783
|
+
|
|
17784
|
+
.pf-c-switch__label {
|
|
17785
|
+
display: inline-block;
|
|
17786
|
+
grid-column: 2;
|
|
17787
|
+
color: var(--pf-c-switch__label--Color);
|
|
17788
|
+
vertical-align: top;
|
|
17789
|
+
}
|
|
17790
|
+
|
|
17638
17791
|
.pf-c-spinner {
|
|
17639
17792
|
--pf-c-spinner--diameter: var(--pf-global--icon--FontSize--xl);
|
|
17640
17793
|
--pf-c-spinner--Width: var(--pf-c-spinner--diameter);
|
|
@@ -17864,159 +18017,6 @@ svg.pf-c-spinner.pf-m-xl {
|
|
|
17864
18017
|
transform: rotate(720deg);
|
|
17865
18018
|
}
|
|
17866
18019
|
}
|
|
17867
|
-
.pf-c-switch {
|
|
17868
|
-
--pf-c-switch--FontSize: var(--pf-global--FontSize--md);
|
|
17869
|
-
--pf-c-switch__label--PaddingLeft: var(--pf-global--spacer--md);
|
|
17870
|
-
--pf-c-switch--ColumnGap: var(--pf-c-switch__label--PaddingLeft);
|
|
17871
|
-
--pf-c-switch__toggle-icon--FontSize: calc(var(--pf-c-switch--FontSize) * .625);
|
|
17872
|
-
--pf-c-switch__toggle-icon--Color: var(--pf-global--Color--light-100);
|
|
17873
|
-
--pf-c-switch__toggle-icon--Left: calc(var(--pf-c-switch--FontSize) * .4);
|
|
17874
|
-
--pf-c-switch__toggle-icon--Offset: 0.125rem;
|
|
17875
|
-
--pf-c-switch--LineHeight: var(--pf-global--LineHeight--md);
|
|
17876
|
-
--pf-c-switch--Height: auto;
|
|
17877
|
-
--pf-c-switch__input--checked__toggle--BackgroundColor: var(--pf-global--primary-color--100);
|
|
17878
|
-
--pf-c-switch__input--checked__toggle--before--TranslateX: calc(100% + var(--pf-c-switch__toggle-icon--Offset));
|
|
17879
|
-
--pf-c-switch__input--checked__label--Color: var(--pf-global--Color--dark-100);
|
|
17880
|
-
--pf-c-switch__input--not-checked__label--Color: var(--pf-global--disabled-color--100);
|
|
17881
|
-
--pf-c-switch__input--disabled__label--Color: var(--pf-global--disabled-color--100);
|
|
17882
|
-
--pf-c-switch__input--disabled__toggle--BackgroundColor: var(--pf-global--disabled-color--200);
|
|
17883
|
-
--pf-c-switch__input--disabled__toggle--before--BackgroundColor: var(--pf-global--palette--black-150);
|
|
17884
|
-
--pf-c-switch__input--focus__toggle--OutlineWidth: var(--pf-global--BorderWidth--md);
|
|
17885
|
-
--pf-c-switch__input--focus__toggle--OutlineOffset: var(--pf-global--spacer--sm);
|
|
17886
|
-
--pf-c-switch__input--focus__toggle--OutlineColor: var(--pf-global--primary-color--100);
|
|
17887
|
-
--pf-c-switch__toggle--Height: calc(var(--pf-c-switch--FontSize) * var(--pf-c-switch--LineHeight));
|
|
17888
|
-
--pf-c-switch__toggle--BackgroundColor: var(--pf-global--palette--black-500);
|
|
17889
|
-
--pf-c-switch__toggle--BorderRadius: var(--pf-c-switch__toggle--Height);
|
|
17890
|
-
--pf-c-switch__toggle--before--Width: calc(var(--pf-c-switch--FontSize) - var(--pf-c-switch__toggle-icon--Offset));
|
|
17891
|
-
--pf-c-switch__toggle--before--Height: var(--pf-c-switch__toggle--before--Width);
|
|
17892
|
-
--pf-c-switch__toggle--before--Top: calc((var(--pf-c-switch__toggle--Height) - var(--pf-c-switch__toggle--before--Height)) / 2);
|
|
17893
|
-
--pf-c-switch__toggle--before--Left: var(--pf-c-switch__toggle--before--Top);
|
|
17894
|
-
--pf-c-switch__toggle--before--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
17895
|
-
--pf-c-switch__toggle--before--BorderRadius: var(--pf-global--BorderRadius--lg);
|
|
17896
|
-
--pf-c-switch__toggle--before--BoxShadow: var(--pf-global--BoxShadow--md);
|
|
17897
|
-
--pf-c-switch__toggle--before--Transition: transform .25s ease 0s;
|
|
17898
|
-
--pf-c-switch__toggle--Width: calc(var(--pf-c-switch__toggle--Height) + var(--pf-c-switch__toggle-icon--Offset) + var(--pf-c-switch__toggle--before--Width));
|
|
17899
|
-
--pf-c-switch__label--Color: var(--pf-global--Color--dark-100);
|
|
17900
|
-
position: relative;
|
|
17901
|
-
display: inline-grid;
|
|
17902
|
-
grid-template-columns: auto;
|
|
17903
|
-
grid-auto-columns: 1fr;
|
|
17904
|
-
column-gap: var(--pf-c-switch--ColumnGap);
|
|
17905
|
-
height: var(--pf-c-switch--Height);
|
|
17906
|
-
font-size: var(--pf-c-switch--FontSize);
|
|
17907
|
-
line-height: var(--pf-c-switch--LineHeight);
|
|
17908
|
-
vertical-align: middle;
|
|
17909
|
-
cursor: pointer;
|
|
17910
|
-
}
|
|
17911
|
-
|
|
17912
|
-
.pf-c-switch.pf-m-reverse .pf-c-switch__label,
|
|
17913
|
-
.pf-c-switch.pf-m-reverse .pf-c-switch__toggle {
|
|
17914
|
-
grid-row: 1;
|
|
17915
|
-
}
|
|
17916
|
-
|
|
17917
|
-
.pf-c-switch.pf-m-reverse .pf-c-switch__label {
|
|
17918
|
-
grid-column: 1;
|
|
17919
|
-
}
|
|
17920
|
-
|
|
17921
|
-
.pf-c-switch__input {
|
|
17922
|
-
position: absolute;
|
|
17923
|
-
cursor: pointer;
|
|
17924
|
-
opacity: 0;
|
|
17925
|
-
}
|
|
17926
|
-
|
|
17927
|
-
.pf-c-switch__input:focus ~ .pf-c-switch__toggle {
|
|
17928
|
-
outline: var(--pf-c-switch__input--focus__toggle--OutlineWidth) solid var(--pf-c-switch__input--focus__toggle--OutlineColor);
|
|
17929
|
-
outline-offset: var(--pf-c-switch__input--focus__toggle--OutlineOffset);
|
|
17930
|
-
}
|
|
17931
|
-
|
|
17932
|
-
.pf-c-switch__input:checked ~ .pf-c-switch__label {
|
|
17933
|
-
color: var(--pf-c-switch__input--checked__label--Color);
|
|
17934
|
-
}
|
|
17935
|
-
|
|
17936
|
-
.pf-c-switch__input:checked ~ .pf-c-switch__toggle {
|
|
17937
|
-
background-color: var(--pf-c-switch__input--checked__toggle--BackgroundColor);
|
|
17938
|
-
}
|
|
17939
|
-
|
|
17940
|
-
.pf-c-switch__input:checked ~ .pf-c-switch__toggle::before {
|
|
17941
|
-
transform: translateX(var(--pf-c-switch__input--checked__toggle--before--TranslateX));
|
|
17942
|
-
}
|
|
17943
|
-
|
|
17944
|
-
.pf-c-switch__input:checked ~ .pf-m-off {
|
|
17945
|
-
display: none;
|
|
17946
|
-
}
|
|
17947
|
-
|
|
17948
|
-
.pf-c-switch__input:not(:checked) ~ .pf-c-switch__label {
|
|
17949
|
-
color: var(--pf-c-switch__input--not-checked__label--Color);
|
|
17950
|
-
}
|
|
17951
|
-
|
|
17952
|
-
.pf-c-switch__input:not(:checked) ~ .pf-c-switch__toggle .pf-c-switch__toggle-icon {
|
|
17953
|
-
display: none;
|
|
17954
|
-
visibility: hidden;
|
|
17955
|
-
}
|
|
17956
|
-
|
|
17957
|
-
.pf-c-switch__input:not(:checked) ~ .pf-m-on {
|
|
17958
|
-
display: none;
|
|
17959
|
-
}
|
|
17960
|
-
|
|
17961
|
-
.pf-c-switch__input:disabled {
|
|
17962
|
-
cursor: not-allowed;
|
|
17963
|
-
}
|
|
17964
|
-
|
|
17965
|
-
.pf-c-switch__input:disabled ~ .pf-c-switch__label {
|
|
17966
|
-
color: var(--pf-c-switch__input--disabled__label--Color);
|
|
17967
|
-
cursor: not-allowed;
|
|
17968
|
-
}
|
|
17969
|
-
|
|
17970
|
-
.pf-c-switch__input:disabled ~ .pf-c-switch__toggle {
|
|
17971
|
-
cursor: not-allowed;
|
|
17972
|
-
background-color: var(--pf-c-switch__input--disabled__toggle--BackgroundColor);
|
|
17973
|
-
}
|
|
17974
|
-
|
|
17975
|
-
.pf-c-switch__input:disabled ~ .pf-c-switch__toggle::before {
|
|
17976
|
-
background-color: var(--pf-c-switch__input--disabled__toggle--before--BackgroundColor);
|
|
17977
|
-
}
|
|
17978
|
-
|
|
17979
|
-
.pf-c-switch__toggle {
|
|
17980
|
-
position: relative;
|
|
17981
|
-
display: inline-block;
|
|
17982
|
-
width: var(--pf-c-switch__toggle--Width);
|
|
17983
|
-
height: var(--pf-c-switch__toggle--Height);
|
|
17984
|
-
background-color: var(--pf-c-switch__toggle--BackgroundColor);
|
|
17985
|
-
border-radius: var(--pf-c-switch__toggle--BorderRadius);
|
|
17986
|
-
}
|
|
17987
|
-
|
|
17988
|
-
.pf-c-switch__toggle::before {
|
|
17989
|
-
position: absolute;
|
|
17990
|
-
top: var(--pf-c-switch__toggle--before--Top);
|
|
17991
|
-
left: var(--pf-c-switch__toggle--before--Left);
|
|
17992
|
-
display: block;
|
|
17993
|
-
width: var(--pf-c-switch__toggle--before--Width);
|
|
17994
|
-
height: var(--pf-c-switch__toggle--before--Height);
|
|
17995
|
-
content: "";
|
|
17996
|
-
background-color: var(--pf-c-switch__toggle--before--BackgroundColor);
|
|
17997
|
-
border-radius: var(--pf-c-switch__toggle--before--BorderRadius);
|
|
17998
|
-
box-shadow: var(--pf-c-switch__toggle--before--BoxShadow);
|
|
17999
|
-
transition: var(--pf-c-switch__toggle--before--Transition);
|
|
18000
|
-
}
|
|
18001
|
-
|
|
18002
|
-
.pf-c-switch__toggle-icon {
|
|
18003
|
-
position: absolute;
|
|
18004
|
-
top: 0;
|
|
18005
|
-
bottom: 0;
|
|
18006
|
-
left: var(--pf-c-switch__toggle-icon--Left);
|
|
18007
|
-
display: flex;
|
|
18008
|
-
align-items: center;
|
|
18009
|
-
font-size: var(--pf-c-switch__toggle-icon--FontSize);
|
|
18010
|
-
color: var(--pf-c-switch__toggle-icon--Color);
|
|
18011
|
-
}
|
|
18012
|
-
|
|
18013
|
-
.pf-c-switch__label {
|
|
18014
|
-
display: inline-block;
|
|
18015
|
-
grid-column: 2;
|
|
18016
|
-
color: var(--pf-c-switch__label--Color);
|
|
18017
|
-
vertical-align: top;
|
|
18018
|
-
}
|
|
18019
|
-
|
|
18020
18020
|
.pf-c-tabs {
|
|
18021
18021
|
--pf-c-tabs--inset: 0;
|
|
18022
18022
|
--pf-c-tabs--Width: auto;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.205.0",
|
|
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",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"generate": "node scripts/copyStyles.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@patternfly/react-icons": "^4.
|
|
38
|
-
"@patternfly/react-styles": "^4.
|
|
39
|
-
"@patternfly/react-tokens": "^4.
|
|
37
|
+
"@patternfly/react-icons": "^4.56.0",
|
|
38
|
+
"@patternfly/react-styles": "^4.55.0",
|
|
39
|
+
"@patternfly/react-tokens": "^4.57.0",
|
|
40
40
|
"focus-trap": "6.2.2",
|
|
41
41
|
"react-dropzone": "9.0.0",
|
|
42
42
|
"tippy.js": "5.1.2",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"react": "^16.8.0 || ^17.0.0",
|
|
61
61
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "aad64697166a03d35c3e711df51f25ec0d517623"
|
|
64
64
|
}
|
package/src/demos/Tabs.md
CHANGED
|
@@ -445,7 +445,12 @@ TabsOpenWithSecondaryTabsDemo = () => {
|
|
|
445
445
|
|
|
446
446
|
### Nested tabs
|
|
447
447
|
|
|
448
|
-
```js isFullscreen file="./Tabs/
|
|
448
|
+
```js isFullscreen file="./examples/Tabs/NestedTabs.tsx"
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Nested, unindented tabs
|
|
452
|
+
|
|
453
|
+
```js isFullscreen file="./examples/Tabs/NestedUnindentedTabs.tsx"
|
|
449
454
|
```
|
|
450
455
|
|
|
451
456
|
### Tables and tabs
|
|
@@ -6,8 +6,11 @@ import {
|
|
|
6
6
|
NavItem,
|
|
7
7
|
NavList,
|
|
8
8
|
Page,
|
|
9
|
+
PageSection,
|
|
9
10
|
PageSidebar,
|
|
10
|
-
SkipToContent
|
|
11
|
+
SkipToContent,
|
|
12
|
+
Text,
|
|
13
|
+
TextContent
|
|
11
14
|
} from '@patternfly/react-core';
|
|
12
15
|
import DashboardHeader from './DashboardHeader';
|
|
13
16
|
|
|
@@ -21,6 +24,15 @@ export const DashboardBreadcrumb = (
|
|
|
21
24
|
</BreadcrumbItem>
|
|
22
25
|
</Breadcrumb>
|
|
23
26
|
);
|
|
27
|
+
|
|
28
|
+
export const PageTemplateTitle = (
|
|
29
|
+
<PageSection variant="light">
|
|
30
|
+
<TextContent>
|
|
31
|
+
<Text component="h1">Main title</Text>
|
|
32
|
+
<Text component="p">This is a full page demo.</Text>
|
|
33
|
+
</TextContent>
|
|
34
|
+
</PageSection>
|
|
35
|
+
);
|
|
24
36
|
export default class DashboardWrapper extends React.Component {
|
|
25
37
|
constructor(props) {
|
|
26
38
|
super(props);
|
|
@@ -45,7 +57,8 @@ export default class DashboardWrapper extends React.Component {
|
|
|
45
57
|
sidebar,
|
|
46
58
|
sidebarNavOpen,
|
|
47
59
|
onPageResize,
|
|
48
|
-
hasNoBreadcrumb
|
|
60
|
+
hasNoBreadcrumb,
|
|
61
|
+
hasPageTemplateTitle
|
|
49
62
|
} = this.props;
|
|
50
63
|
|
|
51
64
|
let renderedBreadcrumb;
|
|
@@ -92,6 +105,7 @@ export default class DashboardWrapper extends React.Component {
|
|
|
92
105
|
mainContainerId={mainContainerId ? mainContainerId : 'main-content-page-layout-default-nav'}
|
|
93
106
|
onPageResize={onPageResize}
|
|
94
107
|
>
|
|
108
|
+
{hasPageTemplateTitle && PageTemplateTitle}
|
|
95
109
|
{children}
|
|
96
110
|
</Page>
|
|
97
111
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
3
|
PageSection,
|
|
4
|
-
PageSectionVariants,
|
|
5
4
|
Tabs,
|
|
6
5
|
Tab,
|
|
7
6
|
TabContent,
|
|
@@ -16,7 +15,7 @@ import {
|
|
|
16
15
|
CardBody,
|
|
17
16
|
CardHeader
|
|
18
17
|
} from '@patternfly/react-core';
|
|
19
|
-
import DashboardWrapper from '
|
|
18
|
+
import DashboardWrapper from '../DashboardWrapper';
|
|
20
19
|
|
|
21
20
|
export const GrayTabsDemo: React.FunctionComponent = () => {
|
|
22
21
|
const [activeTabKey, setActiveTabKey] = React.useState<string | number>(0);
|
|
@@ -126,12 +125,7 @@ export const GrayTabsDemo: React.FunctionComponent = () => {
|
|
|
126
125
|
);
|
|
127
126
|
|
|
128
127
|
return (
|
|
129
|
-
<DashboardWrapper
|
|
130
|
-
<PageSection isWidthLimited variant={PageSectionVariants.light}>
|
|
131
|
-
<Title headingLevel="h1" size="2xl">
|
|
132
|
-
Overview
|
|
133
|
-
</Title>
|
|
134
|
-
</PageSection>
|
|
128
|
+
<DashboardWrapper hasPageTemplateTitle>
|
|
135
129
|
<PageSection type="tabs" isWidthLimited>
|
|
136
130
|
<Tabs
|
|
137
131
|
activeKey={activeTabKey}
|
|
@@ -81,7 +81,7 @@ export const ModalTabs: React.FunctionComponent = () => {
|
|
|
81
81
|
|
|
82
82
|
return (
|
|
83
83
|
<React.Fragment>
|
|
84
|
-
<DashboardWrapper mainContainerId="main-content-card-view-default-nav"
|
|
84
|
+
<DashboardWrapper mainContainerId="main-content-card-view-default-nav">
|
|
85
85
|
<PageSection variant={PageSectionVariants.light}>
|
|
86
86
|
<TextContent>
|
|
87
87
|
<Text component="h1">Projects</Text>
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
Grid,
|
|
7
7
|
GridItem,
|
|
8
8
|
PageSection,
|
|
9
|
-
PageSectionVariants,
|
|
10
9
|
Tabs,
|
|
11
10
|
Tab,
|
|
12
11
|
TabContent,
|
|
@@ -16,17 +15,17 @@ import {
|
|
|
16
15
|
Flex,
|
|
17
16
|
FlexItem
|
|
18
17
|
} from '@patternfly/react-core';
|
|
19
|
-
import DashboardWrapper from '../
|
|
18
|
+
import DashboardWrapper from '../DashboardWrapper';
|
|
20
19
|
|
|
21
|
-
export const
|
|
20
|
+
export const NestedTabs: React.FunctionComponent = () => {
|
|
22
21
|
const [activeTabKey, setActiveTabKey] = React.useState(0);
|
|
23
22
|
const [activeNestedTabKey, setActiveNestedTabKey] = React.useState(10);
|
|
24
23
|
|
|
25
24
|
// Toggle currently active tab
|
|
26
|
-
const handleTabClick = (
|
|
25
|
+
const handleTabClick = (tabIndex: number) => setActiveTabKey(tabIndex);
|
|
27
26
|
|
|
28
27
|
// Toggle currently active nested tab
|
|
29
|
-
const handleNestedTabClick = (
|
|
28
|
+
const handleNestedTabClick = (tabIndex: number) => setActiveNestedTabKey(tabIndex);
|
|
30
29
|
|
|
31
30
|
const tabContent = (
|
|
32
31
|
<Grid hasGutter>
|
|
@@ -41,7 +40,7 @@ export const NestedTabsDemo = () => {
|
|
|
41
40
|
<Tabs
|
|
42
41
|
activeKey={activeNestedTabKey}
|
|
43
42
|
isSecondary
|
|
44
|
-
onSelect={handleNestedTabClick}
|
|
43
|
+
onSelect={(_event, tabIndex) => handleNestedTabClick(Number(tabIndex))}
|
|
45
44
|
id="nested-tabs-example-nested-tabs-list"
|
|
46
45
|
>
|
|
47
46
|
<Tab eventKey={10} title={<TabTitleText>Cluster</TabTitleText>} tabContentId={`tabContent${10}`} />
|
|
@@ -126,14 +125,14 @@ export const NestedTabsDemo = () => {
|
|
|
126
125
|
);
|
|
127
126
|
|
|
128
127
|
return (
|
|
129
|
-
<DashboardWrapper
|
|
130
|
-
<PageSection isWidthLimited variant={PageSectionVariants.light}>
|
|
131
|
-
<Title headingLevel="h1" size="2xl">
|
|
132
|
-
Overview
|
|
133
|
-
</Title>
|
|
134
|
-
</PageSection>
|
|
128
|
+
<DashboardWrapper hasPageTemplateTitle>
|
|
135
129
|
<PageSection type="tabs" isWidthLimited>
|
|
136
|
-
<Tabs
|
|
130
|
+
<Tabs
|
|
131
|
+
activeKey={activeTabKey}
|
|
132
|
+
onSelect={(_event, tabIndex) => handleTabClick(Number(tabIndex))}
|
|
133
|
+
usePageInsets
|
|
134
|
+
id="nested-tabs-example-tabs-list"
|
|
135
|
+
>
|
|
137
136
|
<Tab eventKey={0} title={<TabTitleText>Cluster 1</TabTitleText>} tabContentId={`tabContent${0}`} />
|
|
138
137
|
<Tab eventKey={1} title={<TabTitleText>Cluster 2</TabTitleText>} tabContentId={`tabContent${1}`} />
|
|
139
138
|
</Tabs>
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Card,
|
|
4
|
+
CardHeader,
|
|
5
|
+
CardBody,
|
|
6
|
+
Grid,
|
|
7
|
+
GridItem,
|
|
8
|
+
PageSection,
|
|
9
|
+
Tabs,
|
|
10
|
+
Tab,
|
|
11
|
+
TabContent,
|
|
12
|
+
TabContentBody,
|
|
13
|
+
TabTitleText,
|
|
14
|
+
Title,
|
|
15
|
+
Text,
|
|
16
|
+
TextContent,
|
|
17
|
+
TitleSizes
|
|
18
|
+
} from '@patternfly/react-core';
|
|
19
|
+
import DashboardWrapper from '../DashboardWrapper';
|
|
20
|
+
|
|
21
|
+
export const NestedUnindentedTabs: React.FunctionComponent = () => {
|
|
22
|
+
const [activeTabKey, setActiveTabKey] = React.useState(1);
|
|
23
|
+
const [activeNestedTabKey, setActiveNestedTabKey] = React.useState(10);
|
|
24
|
+
|
|
25
|
+
// Toggle currently active tab
|
|
26
|
+
const handleTabClick = (tabIndex: number) => setActiveTabKey(tabIndex);
|
|
27
|
+
|
|
28
|
+
// Toggle currently active nested tab
|
|
29
|
+
const handleNestedTabClick = (tabIndex: number) => setActiveNestedTabKey(tabIndex);
|
|
30
|
+
|
|
31
|
+
const tabContent = (
|
|
32
|
+
<Grid hasGutter>
|
|
33
|
+
<GridItem>
|
|
34
|
+
<CardHeader>
|
|
35
|
+
<Title headingLevel="h1" size={TitleSizes['2xl']}>
|
|
36
|
+
Get started with Red Hat Enterprise Linux
|
|
37
|
+
</Title>
|
|
38
|
+
</CardHeader>
|
|
39
|
+
</GridItem>
|
|
40
|
+
<GridItem>
|
|
41
|
+
<Tabs
|
|
42
|
+
activeKey={activeNestedTabKey}
|
|
43
|
+
isSecondary
|
|
44
|
+
onSelect={(_event, tabIndex) => handleNestedTabClick(Number(tabIndex))}
|
|
45
|
+
id="nested-tabs-example-nested-tabs-list"
|
|
46
|
+
>
|
|
47
|
+
<Tab eventKey={10} title={<TabTitleText>x86 architecture</TabTitleText>} tabContentId={`tabContent${10}`} />
|
|
48
|
+
<Tab
|
|
49
|
+
eventKey={11}
|
|
50
|
+
title={<TabTitleText>Additional Architectures</TabTitleText>}
|
|
51
|
+
tabContentId={`tabContent${11}`}
|
|
52
|
+
/>
|
|
53
|
+
</Tabs>
|
|
54
|
+
</GridItem>
|
|
55
|
+
<GridItem>
|
|
56
|
+
<TabContent
|
|
57
|
+
key={10}
|
|
58
|
+
eventKey={10}
|
|
59
|
+
id={`tabContent${10}`}
|
|
60
|
+
activeKey={activeNestedTabKey}
|
|
61
|
+
hidden={10 !== activeNestedTabKey}
|
|
62
|
+
>
|
|
63
|
+
<TabContentBody>
|
|
64
|
+
<Grid hasGutter>
|
|
65
|
+
<GridItem>
|
|
66
|
+
<TextContent>
|
|
67
|
+
<Text>To perform a standard x86_64 installation using the GUI, you'll need to:</Text>
|
|
68
|
+
</TextContent>
|
|
69
|
+
</GridItem>
|
|
70
|
+
<Grid md={6} xl2={3} hasGutter>
|
|
71
|
+
<GridItem>
|
|
72
|
+
<Card isFullHeight>
|
|
73
|
+
<CardHeader>Check system requirements</CardHeader>
|
|
74
|
+
<CardBody>
|
|
75
|
+
Your physical or virtual machine should meet the <a href="#">system requirement</a>.
|
|
76
|
+
</CardBody>
|
|
77
|
+
</Card>
|
|
78
|
+
</GridItem>
|
|
79
|
+
|
|
80
|
+
<GridItem>
|
|
81
|
+
<Card isFullHeight>
|
|
82
|
+
<CardHeader>Download an installation ISO image</CardHeader>
|
|
83
|
+
<CardBody>
|
|
84
|
+
{' '}
|
|
85
|
+
<a href="#">Download</a> the binary DVD ISO.
|
|
86
|
+
</CardBody>
|
|
87
|
+
</Card>
|
|
88
|
+
</GridItem>
|
|
89
|
+
<GridItem>
|
|
90
|
+
<Card isFullHeight>
|
|
91
|
+
<CardHeader>Create a bootable installation media</CardHeader>
|
|
92
|
+
<CardBody>
|
|
93
|
+
{' '}
|
|
94
|
+
<a href="#">Create</a> a bootable installation media, for example a USB flash drive.
|
|
95
|
+
</CardBody>
|
|
96
|
+
</Card>
|
|
97
|
+
</GridItem>
|
|
98
|
+
<GridItem>
|
|
99
|
+
<Card isFullHeight>
|
|
100
|
+
<CardHeader>Install and register your system</CardHeader>
|
|
101
|
+
<CardBody>
|
|
102
|
+
Boot the installation, register your system, attach RHEL subscriptions, and install RHEL from the
|
|
103
|
+
Red Hat Content Delivery Network (CDN) using the GUI.
|
|
104
|
+
</CardBody>
|
|
105
|
+
</Card>
|
|
106
|
+
</GridItem>
|
|
107
|
+
</Grid>
|
|
108
|
+
</Grid>
|
|
109
|
+
</TabContentBody>
|
|
110
|
+
</TabContent>
|
|
111
|
+
<TabContent
|
|
112
|
+
key={11}
|
|
113
|
+
eventKey={11}
|
|
114
|
+
id={`tabContent${11}`}
|
|
115
|
+
activeKey={activeNestedTabKey}
|
|
116
|
+
hidden={11 !== activeNestedTabKey}
|
|
117
|
+
>
|
|
118
|
+
<TabContentBody>Additional architectures panel</TabContentBody>
|
|
119
|
+
</TabContent>
|
|
120
|
+
<TabContent
|
|
121
|
+
key={12}
|
|
122
|
+
eventKey={12}
|
|
123
|
+
id={`tabContent${12}`}
|
|
124
|
+
activeKey={activeNestedTabKey}
|
|
125
|
+
hidden={12 !== activeNestedTabKey}
|
|
126
|
+
>
|
|
127
|
+
<TabContentBody>Operators panel</TabContentBody>
|
|
128
|
+
</TabContent>
|
|
129
|
+
<TabContent
|
|
130
|
+
key={13}
|
|
131
|
+
eventKey={13}
|
|
132
|
+
id={`tabContent${13}`}
|
|
133
|
+
activeKey={activeNestedTabKey}
|
|
134
|
+
hidden={13 !== activeNestedTabKey}
|
|
135
|
+
>
|
|
136
|
+
<TabContentBody>Virtualization panel</TabContentBody>
|
|
137
|
+
</TabContent>
|
|
138
|
+
</GridItem>
|
|
139
|
+
</Grid>
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<DashboardWrapper hasPageTemplateTitle>
|
|
144
|
+
<PageSection type="tabs" isWidthLimited variant="light">
|
|
145
|
+
<Tabs
|
|
146
|
+
isBox
|
|
147
|
+
activeKey={activeTabKey}
|
|
148
|
+
onSelect={(_event, tabIndex) => handleTabClick(Number(tabIndex))}
|
|
149
|
+
usePageInsets
|
|
150
|
+
id="nested-tabs-example-tabs-list"
|
|
151
|
+
>
|
|
152
|
+
<Tab eventKey={0} title={<TabTitleText>What's new</TabTitleText>} tabContentId={`tabContent${0}`} />
|
|
153
|
+
<Tab eventKey={1} title={<TabTitleText>Get started</TabTitleText>} tabContentId={`tabContent${1}`} />
|
|
154
|
+
<Tab eventKey={2} title={<TabTitleText>Knowledge</TabTitleText>} tabContentId={`tabContent${2}`} />
|
|
155
|
+
<Tab eventKey={3} title={<TabTitleText>Support</TabTitleText>} tabContentId={`tabContent${3}`} />
|
|
156
|
+
</Tabs>
|
|
157
|
+
</PageSection>
|
|
158
|
+
<PageSection variant="light">
|
|
159
|
+
<TabContent key={0} eventKey={0} id={`tabContent${0}`} activeKey={activeTabKey} hidden={0 !== activeTabKey}>
|
|
160
|
+
<TabContentBody>What's new panel</TabContentBody>
|
|
161
|
+
</TabContent>
|
|
162
|
+
<TabContent key={1} eventKey={1} id={`tabContent${1}`} activeKey={activeTabKey} hidden={1 !== activeTabKey}>
|
|
163
|
+
<TabContentBody>{tabContent}</TabContentBody>
|
|
164
|
+
</TabContent>
|
|
165
|
+
<TabContent key={2} eventKey={2} id={`tabContent${2}`} activeKey={activeTabKey} hidden={2 !== activeTabKey}>
|
|
166
|
+
<TabContentBody>Knowledge panel</TabContentBody>
|
|
167
|
+
</TabContent>
|
|
168
|
+
<TabContent key={3} eventKey={3} id={`tabContent${3}`} activeKey={activeTabKey} hidden={3 !== activeTabKey}>
|
|
169
|
+
<TabContentBody>Support Panel</TabContentBody>
|
|
170
|
+
</TabContent>
|
|
171
|
+
</PageSection>
|
|
172
|
+
</DashboardWrapper>
|
|
173
|
+
);
|
|
174
|
+
};
|