@patternfly/patternfly 4.137.0 → 4.139.1
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/components/Backdrop/backdrop.css +2 -1
- package/components/Backdrop/backdrop.scss +2 -1
- package/components/Check/check.css +2 -2
- package/components/Check/check.scss +2 -2
- package/components/Form/form.css +5 -2
- package/components/Form/form.scss +28 -2
- package/components/Label/label.css +12 -0
- package/components/Label/label.scss +15 -0
- package/components/LogViewer/log-viewer.css +1 -0
- package/components/LogViewer/log-viewer.scss +1 -0
- package/components/Radio/radio.css +2 -2
- package/components/Radio/radio.scss +2 -2
- package/docs/components/Label/examples/Label.md +85 -0
- package/docs/components/LogViewer/examples/LogViewer.md +1146 -1138
- package/docs/demos/Card/examples/Card.md +4 -4
- package/package.json +1 -1
- package/patternfly-drag-drop.css +55 -0
- package/patternfly-drag-drop.scss +67 -0
- package/patternfly-no-reset.css +24 -7
- package/patternfly.css +24 -7
- package/patternfly.min.css +1 -1
- package/patternfly.min.css.map +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
.pf-c-backdrop {
|
|
2
|
+
--pf-c-backdrop--Position: fixed;
|
|
2
3
|
--pf-c-backdrop--ZIndex: var(--pf-global--ZIndex--lg);
|
|
3
4
|
--pf-c-backdrop--BackgroundColor: var(--pf-global--BackgroundColor--dark-transparent-100);
|
|
4
|
-
position:
|
|
5
|
+
position: var(--pf-c-backdrop--Position);
|
|
5
6
|
top: 0;
|
|
6
7
|
left: 0;
|
|
7
8
|
z-index: var(--pf-c-backdrop--ZIndex);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
.pf-c-backdrop {
|
|
2
|
+
--pf-c-backdrop--Position: fixed;
|
|
2
3
|
--pf-c-backdrop--ZIndex: var(--pf-global--ZIndex--lg);
|
|
3
4
|
--pf-c-backdrop--BackgroundColor: var(--pf-global--BackgroundColor--dark-transparent-100);
|
|
4
5
|
|
|
5
|
-
position:
|
|
6
|
+
position: var(--pf-c-backdrop--Position);
|
|
6
7
|
top: 0;
|
|
7
8
|
left: 0;
|
|
8
9
|
z-index: var(--pf-c-backdrop--ZIndex);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
--pf-c-check__label--FontWeight: var(--pf-global--FontWeight--normal);
|
|
6
6
|
--pf-c-check__label--FontSize: var(--pf-global--FontSize--md);
|
|
7
7
|
--pf-c-check__label--LineHeight: var(--pf-global--LineHeight--sm);
|
|
8
|
-
--pf-c-check__input--Height:
|
|
9
|
-
--pf-c-check__input--MarginTop: calc(-
|
|
8
|
+
--pf-c-check__input--Height: var(--pf-c-check__label--FontSize);
|
|
9
|
+
--pf-c-check__input--MarginTop: calc(((var(--pf-c-check__label--FontSize) * var(--pf-c-check__label--LineHeight)) - var(--pf-c-check__input--Height)) / 2);
|
|
10
10
|
--pf-c-check__description--FontSize: var(--pf-global--FontSize--sm);
|
|
11
11
|
--pf-c-check__description--Color: var(--pf-global--Color--200);
|
|
12
12
|
--pf-c-check__body--MarginTop: var(--pf-global--spacer--sm);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
--pf-c-check__label--FontWeight: var(--pf-global--FontWeight--normal);
|
|
6
6
|
--pf-c-check__label--FontSize: var(--pf-global--FontSize--md);
|
|
7
7
|
--pf-c-check__label--LineHeight: var(--pf-global--LineHeight--sm);
|
|
8
|
-
--pf-c-check__input--Height:
|
|
9
|
-
--pf-c-check__input--MarginTop: calc(-
|
|
8
|
+
--pf-c-check__input--Height: var(--pf-c-check__label--FontSize);
|
|
9
|
+
--pf-c-check__input--MarginTop: calc(((var(--pf-c-check__label--FontSize) * var(--pf-c-check__label--LineHeight)) - var(--pf-c-check__input--Height)) / 2);
|
|
10
10
|
--pf-c-check__description--FontSize: var(--pf-global--FontSize--sm);
|
|
11
11
|
--pf-c-check__description--Color: var(--pf-global--Color--200);
|
|
12
12
|
--pf-c-check__body--MarginTop: var(--pf-global--spacer--sm);
|
package/components/Form/form.css
CHANGED
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
--pf-c-form--m-horizontal__group-label--md--GridColumnGap: var(--pf-global--spacer--md);
|
|
6
6
|
--pf-c-form--m-horizontal__group-control--md--GridColumnWidth: 1fr;
|
|
7
7
|
--pf-c-form--m-limit-width--MaxWidth: 31.25rem;
|
|
8
|
-
--pf-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-global--
|
|
8
|
+
--pf-c-form--m-horizontal__group-label--md--PaddingTop: calc((((((var(--pf-global--FontSize--md) * var(--pf-global--LineHeight--md)) + (2 * var(--pf-global--BorderWidth--sm))) - var(--pf-global--FontSize--md)) / 2) + var(--pf-global--FontSize--md)) - ((((var(--pf-global--FontSize--sm) * var(--pf-global--LineHeight--sm)) - var(--pf-global--FontSize--sm)) / 2) + var(--pf-global--FontSize--sm)) + var(--pf-global--BorderWidth--sm));
|
|
9
9
|
--pf-c-form__group-label--PaddingBottom: var(--pf-global--spacer--sm);
|
|
10
|
+
--pf-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop: 0;
|
|
11
|
+
--pf-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY: calc(((((var(--pf-global--FontSize--sm) * var(--pf-global--LineHeight--sm)) - var(--pf-global--FontSize--sm)) / 2) + var(--pf-global--FontSize--sm)) - ((((var(--pf-global--FontSize--md) * var(--pf-global--LineHeight--sm)) - var(--pf-global--FontSize--md)) / 2) + var(--pf-global--FontSize--md)));
|
|
10
12
|
--pf-c-form__label--FontSize: var(--pf-global--FontSize--sm);
|
|
11
13
|
--pf-c-form__label--LineHeight: var(--pf-global--LineHeight--sm);
|
|
12
14
|
--pf-c-form__label--m-disabled--Color: var(--pf-global--disabled-color--100);
|
|
@@ -111,7 +113,8 @@
|
|
|
111
113
|
padding-top: var(--pf-c-form--m-horizontal__group-label--md--PaddingTop);
|
|
112
114
|
}
|
|
113
115
|
.pf-c-form.pf-m-horizontal .pf-c-form__group-label.pf-m-no-padding-top {
|
|
114
|
-
--pf-c-form--m-horizontal__group-label--md--PaddingTop:
|
|
116
|
+
--pf-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop);
|
|
117
|
+
transform: translateY(var(--pf-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY));
|
|
115
118
|
}
|
|
116
119
|
.pf-c-form.pf-m-horizontal .pf-c-form__group-control {
|
|
117
120
|
grid-column: 2;
|
|
@@ -11,9 +11,33 @@
|
|
|
11
11
|
--pf-c-form--m-limit-width--MaxWidth: #{pf-size-prem(500px)};
|
|
12
12
|
|
|
13
13
|
// Group label
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
// Terminology and a note on vertical alignment of the group labels:
|
|
16
|
+
// Content area height = Font size
|
|
17
|
+
// Line Box height = Content area * Line Height
|
|
18
|
+
// Leading = Line Box - Content Area
|
|
19
|
+
// Leading is always split evenly above and below the content area (so the content area always sits vertically centered in the line box)
|
|
20
|
+
|
|
21
|
+
// So, to align the label's baseline with the text input's baseline, we need to calculate the difference between the (content area + top half of leading) of the label and of the control. We'll use the text input as the default control, and we also need to adjust for the border of the text input.
|
|
22
|
+
|
|
23
|
+
// Calculate the distance from top to baseline by (((font size * line height) + border widths - font size) / 2) + font size
|
|
24
|
+
// group__form-label distance from top to baseline (small font, small line height) is 16.1px
|
|
25
|
+
// group__form-control text input distance from top to baseline (medium font, medium line height) is 21px
|
|
26
|
+
// plus the border width used by the text inputs is 1px
|
|
27
|
+
// So we need to adjust by 21 - 16.1 + 1 = 5.9px
|
|
28
|
+
|
|
29
|
+
--pf-c-form--m-horizontal__group-label--md--PaddingTop: calc((((((var(--pf-global--FontSize--md) * var(--pf-global--LineHeight--md)) + (2 * var(--pf-global--BorderWidth--sm))) - var(--pf-global--FontSize--md)) / 2) + var(--pf-global--FontSize--md)) - ((((var(--pf-global--FontSize--sm) * var(--pf-global--LineHeight--sm)) - var(--pf-global--FontSize--sm)) / 2) + var(--pf-global--FontSize--sm)) + var(--pf-global--BorderWidth--sm));
|
|
15
30
|
--pf-c-form__group-label--PaddingBottom: var(--pf-global--spacer--sm);
|
|
16
31
|
|
|
32
|
+
// Use the no-padding modifier to align form groups that aren't text inputs
|
|
33
|
+
// Use the formula above, except
|
|
34
|
+
// - no adjustment for borders needed
|
|
35
|
+
// - reverse the subtraction so we get a negative number to translate by
|
|
36
|
+
// - controls like checkboxes use the medium font and small line height
|
|
37
|
+
// - This comes out to a difference of 2.3px.
|
|
38
|
+
--pf-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop: 0;
|
|
39
|
+
--pf-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY: calc(((((var(--pf-global--FontSize--sm) * var(--pf-global--LineHeight--sm)) - var(--pf-global--FontSize--sm)) / 2) + var(--pf-global--FontSize--sm)) - ((((var(--pf-global--FontSize--md) * var(--pf-global--LineHeight--sm)) - var(--pf-global--FontSize--md)) / 2) + var(--pf-global--FontSize--md)));
|
|
40
|
+
|
|
17
41
|
// Label
|
|
18
42
|
--pf-c-form__label--FontSize: var(--pf-global--FontSize--sm);
|
|
19
43
|
--pf-c-form__label--LineHeight: var(--pf-global--LineHeight--sm);
|
|
@@ -150,7 +174,9 @@
|
|
|
150
174
|
|
|
151
175
|
// stylelint-disable-next-line
|
|
152
176
|
&.pf-m-no-padding-top {
|
|
153
|
-
--pf-c-form--m-horizontal__group-label--md--PaddingTop:
|
|
177
|
+
--pf-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop);
|
|
178
|
+
|
|
179
|
+
transform: translateY(var(--pf-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY));
|
|
154
180
|
}
|
|
155
181
|
}
|
|
156
182
|
|
|
@@ -88,6 +88,11 @@
|
|
|
88
88
|
--pf-c-label--m-overflow__content--link--hover--before--BorderColor: var(--pf-global--BorderColor--300);
|
|
89
89
|
--pf-c-label--m-overflow__content--link--focus--before--BorderWidth: var(--pf-global--BorderWidth--md);
|
|
90
90
|
--pf-c-label--m-overflow__content--link--focus--before--BorderColor: var(--pf-global--BorderColor--300);
|
|
91
|
+
--pf-c-label--m-compact--PaddingTop: 0;
|
|
92
|
+
--pf-c-label--m-compact--PaddingRight: var(--pf-global--spacer--sm);
|
|
93
|
+
--pf-c-label--m-compact--PaddingBottom: 0;
|
|
94
|
+
--pf-c-label--m-compact--PaddingLeft: var(--pf-global--spacer--sm);
|
|
95
|
+
--pf-c-label--m-compact--FontSize: var(--pf-global--FontSize--xs);
|
|
91
96
|
--pf-c-label__content--Color: var(--pf-global--Color--100);
|
|
92
97
|
--pf-c-label--m-outline__content--Color: var(--pf-global--Color--100);
|
|
93
98
|
--pf-c-label__text--MaxWidth: 16ch;
|
|
@@ -114,6 +119,13 @@
|
|
|
114
119
|
border: 0;
|
|
115
120
|
border-radius: var(--pf-c-label--BorderRadius);
|
|
116
121
|
}
|
|
122
|
+
.pf-c-label.pf-m-compact {
|
|
123
|
+
--pf-c-label--PaddingTop: var(--pf-c-label--m-compact--PaddingTop);
|
|
124
|
+
--pf-c-label--PaddingRight: var(--pf-c-label--m-compact--PaddingRight);
|
|
125
|
+
--pf-c-label--PaddingBottom: var(--pf-c-label--m-compact--PaddingBottom);
|
|
126
|
+
--pf-c-label--PaddingLeft: var(--pf-c-label--m-compact--PaddingLeft);
|
|
127
|
+
--pf-c-label--FontSize: var(--pf-c-label--m-compact--FontSize);
|
|
128
|
+
}
|
|
117
129
|
.pf-c-label.pf-m-blue {
|
|
118
130
|
--pf-c-label--BackgroundColor: var(--pf-c-label--m-blue--BackgroundColor);
|
|
119
131
|
--pf-c-label__icon--Color: var(--pf-c-label--m-blue__icon--Color);
|
|
@@ -112,6 +112,13 @@
|
|
|
112
112
|
--pf-c-label--m-overflow__content--link--focus--before--BorderWidth: var(--pf-global--BorderWidth--md);
|
|
113
113
|
--pf-c-label--m-overflow__content--link--focus--before--BorderColor: var(--pf-global--BorderColor--300);
|
|
114
114
|
|
|
115
|
+
// Compact
|
|
116
|
+
--pf-c-label--m-compact--PaddingTop: 0;
|
|
117
|
+
--pf-c-label--m-compact--PaddingRight: var(--pf-global--spacer--sm);
|
|
118
|
+
--pf-c-label--m-compact--PaddingBottom: 0;
|
|
119
|
+
--pf-c-label--m-compact--PaddingLeft: var(--pf-global--spacer--sm);
|
|
120
|
+
--pf-c-label--m-compact--FontSize: var(--pf-global--FontSize--xs);
|
|
121
|
+
|
|
115
122
|
// Content
|
|
116
123
|
--pf-c-label__content--Color: var(--pf-global--Color--100);
|
|
117
124
|
--pf-c-label--m-outline__content--Color: var(--pf-global--Color--100);
|
|
@@ -148,6 +155,14 @@
|
|
|
148
155
|
border: 0;
|
|
149
156
|
border-radius: var(--pf-c-label--BorderRadius);
|
|
150
157
|
|
|
158
|
+
&.pf-m-compact {
|
|
159
|
+
--pf-c-label--PaddingTop: var(--pf-c-label--m-compact--PaddingTop);
|
|
160
|
+
--pf-c-label--PaddingRight: var(--pf-c-label--m-compact--PaddingRight);
|
|
161
|
+
--pf-c-label--PaddingBottom: var(--pf-c-label--m-compact--PaddingBottom);
|
|
162
|
+
--pf-c-label--PaddingLeft: var(--pf-c-label--m-compact--PaddingLeft);
|
|
163
|
+
--pf-c-label--FontSize: var(--pf-c-label--m-compact--FontSize);
|
|
164
|
+
}
|
|
165
|
+
|
|
151
166
|
&.pf-m-blue {
|
|
152
167
|
--pf-c-label--BackgroundColor: var(--pf-c-label--m-blue--BackgroundColor);
|
|
153
168
|
--pf-c-label__icon--Color: var(--pf-c-label--m-blue__icon--Color);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
--pf-c-radio__label--FontWeight: var(--pf-global--FontWeight--normal);
|
|
6
6
|
--pf-c-radio__label--FontSize: var(--pf-global--FontSize--md);
|
|
7
7
|
--pf-c-radio__label--LineHeight: var(--pf-global--LineHeight--sm);
|
|
8
|
-
--pf-c-radio__input--Height:
|
|
9
|
-
--pf-c-radio__input--MarginTop: calc(-
|
|
8
|
+
--pf-c-radio__input--Height: var(--pf-c-radio__label--FontSize);
|
|
9
|
+
--pf-c-radio__input--MarginTop: calc(((var(--pf-c-radio__label--FontSize) * var(--pf-c-radio__label--LineHeight)) - var(--pf-c-radio__input--Height)) / 2);
|
|
10
10
|
--pf-c-radio__input--first-child--MarginLeft: 0.0625rem;
|
|
11
11
|
--pf-c-radio__input--last-child--MarginRight: 0.0625rem;
|
|
12
12
|
--pf-c-radio__description--FontSize: var(--pf-global--FontSize--sm);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
--pf-c-radio__label--FontWeight: var(--pf-global--FontWeight--normal);
|
|
6
6
|
--pf-c-radio__label--FontSize: var(--pf-global--FontSize--md);
|
|
7
7
|
--pf-c-radio__label--LineHeight: var(--pf-global--LineHeight--sm);
|
|
8
|
-
--pf-c-radio__input--Height:
|
|
9
|
-
--pf-c-radio__input--MarginTop: calc(-
|
|
8
|
+
--pf-c-radio__input--Height: var(--pf-c-radio__label--FontSize);
|
|
9
|
+
--pf-c-radio__input--MarginTop: calc(((var(--pf-c-radio__label--FontSize) * var(--pf-c-radio__label--LineHeight)) - var(--pf-c-radio__input--Height)) / 2);
|
|
10
10
|
--pf-c-radio__input--first-child--MarginLeft: #{pf-size-prem(1px)};
|
|
11
11
|
--pf-c-radio__input--last-child--MarginRight: #{pf-size-prem(1px)};
|
|
12
12
|
--pf-c-radio__description--FontSize: var(--pf-global--FontSize--sm);
|
|
@@ -1032,6 +1032,90 @@ cssPrefix: pf-c-label
|
|
|
1032
1032
|
|
|
1033
1033
|
```
|
|
1034
1034
|
|
|
1035
|
+
### Compact
|
|
1036
|
+
|
|
1037
|
+
```html
|
|
1038
|
+
<span class="pf-c-label pf-m-compact">
|
|
1039
|
+
<span class="pf-c-label__content">Compact</span>
|
|
1040
|
+
</span>
|
|
1041
|
+
|
|
1042
|
+
<span class="pf-c-label pf-m-compact">
|
|
1043
|
+
<span class="pf-c-label__content">
|
|
1044
|
+
<span class="pf-c-label__icon">
|
|
1045
|
+
<i class="fas fa-fw fa-info-circle" aria-hidden="true"></i>
|
|
1046
|
+
</span>
|
|
1047
|
+
Compact icon
|
|
1048
|
+
</span>
|
|
1049
|
+
</span>
|
|
1050
|
+
|
|
1051
|
+
<span class="pf-c-label pf-m-compact">
|
|
1052
|
+
<span class="pf-c-label__content">Compact removable</span>
|
|
1053
|
+
<button
|
|
1054
|
+
class="pf-c-button pf-m-plain"
|
|
1055
|
+
type="button"
|
|
1056
|
+
id="compact-close-button"
|
|
1057
|
+
aria-label="Remove"
|
|
1058
|
+
aria-labelledby="compact-close-button compact-close-text"
|
|
1059
|
+
>
|
|
1060
|
+
<i class="fas fa-times" aria-hidden="true"></i>
|
|
1061
|
+
</button>
|
|
1062
|
+
</span>
|
|
1063
|
+
|
|
1064
|
+
<span class="pf-c-label pf-m-compact">
|
|
1065
|
+
<span class="pf-c-label__content">
|
|
1066
|
+
<span class="pf-c-label__icon">
|
|
1067
|
+
<i class="fas fa-fw fa-info-circle" aria-hidden="true"></i>
|
|
1068
|
+
</span>
|
|
1069
|
+
Compact icon removable
|
|
1070
|
+
</span>
|
|
1071
|
+
<button
|
|
1072
|
+
class="pf-c-button pf-m-plain"
|
|
1073
|
+
type="button"
|
|
1074
|
+
id="compact-icon-close-button"
|
|
1075
|
+
aria-label="Remove"
|
|
1076
|
+
aria-labelledby="compact-icon-close-button compact-icon-close-text"
|
|
1077
|
+
>
|
|
1078
|
+
<i class="fas fa-times" aria-hidden="true"></i>
|
|
1079
|
+
</button>
|
|
1080
|
+
</span>
|
|
1081
|
+
|
|
1082
|
+
<span class="pf-c-label pf-m-compact">
|
|
1083
|
+
<a class="pf-c-label__content" href="#">Compact link</a>
|
|
1084
|
+
</span>
|
|
1085
|
+
|
|
1086
|
+
<span class="pf-c-label pf-m-compact">
|
|
1087
|
+
<a class="pf-c-label__content" href="#">Compact link removable</a>
|
|
1088
|
+
<button
|
|
1089
|
+
class="pf-c-button pf-m-plain"
|
|
1090
|
+
type="button"
|
|
1091
|
+
id="compact-link-close-button"
|
|
1092
|
+
aria-label="Remove"
|
|
1093
|
+
aria-labelledby="compact-link-close-button compact-link-close-text"
|
|
1094
|
+
>
|
|
1095
|
+
<i class="fas fa-times" aria-hidden="true"></i>
|
|
1096
|
+
</button>
|
|
1097
|
+
</span>
|
|
1098
|
+
|
|
1099
|
+
<span class="pf-c-label pf-m-compact">
|
|
1100
|
+
<span class="pf-c-label__content">
|
|
1101
|
+
<span class="pf-c-label__icon">
|
|
1102
|
+
<i class="fas fa-fw fa-info-circle" aria-hidden="true"></i>
|
|
1103
|
+
</span>
|
|
1104
|
+
<span class="pf-c-label__text">Compact label with icon that truncates</span>
|
|
1105
|
+
</span>
|
|
1106
|
+
<button
|
|
1107
|
+
class="pf-c-button pf-m-plain"
|
|
1108
|
+
type="button"
|
|
1109
|
+
id="compact-icon-close-truncate-button"
|
|
1110
|
+
aria-label="Remove"
|
|
1111
|
+
aria-labelledby="compact-icon-close-truncate-button compact-icon-close-truncate-text"
|
|
1112
|
+
>
|
|
1113
|
+
<i class="fas fa-times" aria-hidden="true"></i>
|
|
1114
|
+
</button>
|
|
1115
|
+
</span>
|
|
1116
|
+
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1035
1119
|
### Overflow
|
|
1036
1120
|
|
|
1037
1121
|
```html
|
|
@@ -1107,6 +1191,7 @@ cssPrefix: pf-c-label
|
|
|
1107
1191
|
| `.pf-c-label__icon` | `<span>` | Initiates a label icon. |
|
|
1108
1192
|
| `.pf-c-label__text` | `<span>` | Initiates label text. |
|
|
1109
1193
|
| `.pf-m-outline` | `.pf-c-label` | Modifies label for outline styles. |
|
|
1194
|
+
| `.pf-m-compact` | `.pf-c-label` | Modifies label for compact styles. |
|
|
1110
1195
|
| `.pf-m-overflow` | `.pf-c-label` | Modifies label for overflow styles for use in a label group. |
|
|
1111
1196
|
| `.pf-m-blue` | `.pf-c-label` | Modifies the label to have blue colored styling. |
|
|
1112
1197
|
| `.pf-m-green` | `.pf-c-label` | Modifies the label to have green colored styling. |
|