@patternfly/react-styles 5.4.0-prerelease.1 → 5.4.0-prerelease.10
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +36 -0
- package/css/components/Form/form.css +59 -2
- package/css/components/Form/form.d.ts +1 -1
- package/css/components/Form/form.js +1 -1
- package/css/components/Form/form.mjs +1 -1
- package/css/components/MenuToggle/menu-toggle.css +7 -0
- package/css/components/Pagination/pagination.css +7 -4
- package/css/components/ProgressStepper/progress-stepper.css +1 -0
- package/css/docs/components/Sidebar/examples/Sidebar.css +4 -2
- package/css/docs/components/Sidebar/examples/Sidebar.d.ts +1 -4
- package/css/docs/components/Sidebar/examples/Sidebar.js +1 -4
- package/css/docs/components/Sidebar/examples/Sidebar.mjs +1 -4
- package/css/docs/utilities/Display/examples/Display.css +1 -8
- package/css/docs/utilities/Display/examples/Display.d.ts +0 -8
- package/css/docs/utilities/Display/examples/Display.js +0 -8
- package/css/docs/utilities/Display/examples/Display.mjs +0 -8
- package/css/utilities/Display/display.css +38 -0
- package/css/utilities/Display/display.d.ts +12 -0
- package/css/utilities/Display/display.js +12 -0
- package/css/utilities/Display/display.mjs +12 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/js/index.js.map +1 -1
- package/package.json +6 -10
- package/scripts/copyStyles.mjs +8 -0
- package/scripts/{generateClassMaps.js → generateClassMaps.mjs} +8 -11
- package/scripts/{writeClassMaps.js → writeClassMaps.mjs} +15 -13
- package/css/docs/components/Pagination/examples/Pagination.css +0 -3
- package/css/docs/components/Pagination/examples/Pagination.d.ts +0 -3
- package/css/docs/components/Pagination/examples/Pagination.js +0 -4
- package/css/docs/components/Pagination/examples/Pagination.mjs +0 -2
- package/scripts/copyStyles.js +0 -7
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,42 @@
|
|
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
|
+
# [5.4.0-prerelease.10](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-styles@5.4.0-prerelease.9...@patternfly/react-styles@5.4.0-prerelease.10) (2024-07-11)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @patternfly/react-styles
|
9
|
+
|
10
|
+
# [5.4.0-prerelease.9](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-styles@5.4.0-prerelease.8...@patternfly/react-styles@5.4.0-prerelease.9) (2024-07-02)
|
11
|
+
|
12
|
+
**Note:** Version bump only for package @patternfly/react-styles
|
13
|
+
|
14
|
+
# [5.4.0-prerelease.8](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-styles@5.4.0-prerelease.7...@patternfly/react-styles@5.4.0-prerelease.8) (2024-07-01)
|
15
|
+
|
16
|
+
**Note:** Version bump only for package @patternfly/react-styles
|
17
|
+
|
18
|
+
# [5.4.0-prerelease.7](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-styles@5.4.0-prerelease.6...@patternfly/react-styles@5.4.0-prerelease.7) (2024-06-13)
|
19
|
+
|
20
|
+
**Note:** Version bump only for package @patternfly/react-styles
|
21
|
+
|
22
|
+
# [5.4.0-prerelease.6](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-styles@5.4.0-prerelease.5...@patternfly/react-styles@5.4.0-prerelease.6) (2024-05-31)
|
23
|
+
|
24
|
+
**Note:** Version bump only for package @patternfly/react-styles
|
25
|
+
|
26
|
+
# [5.4.0-prerelease.5](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-styles@5.4.0-prerelease.4...@patternfly/react-styles@5.4.0-prerelease.5) (2024-05-20)
|
27
|
+
|
28
|
+
**Note:** Version bump only for package @patternfly/react-styles
|
29
|
+
|
30
|
+
# [5.4.0-prerelease.4](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-styles@5.4.0-prerelease.3...@patternfly/react-styles@5.4.0-prerelease.4) (2024-05-15)
|
31
|
+
|
32
|
+
**Note:** Version bump only for package @patternfly/react-styles
|
33
|
+
|
34
|
+
# [5.4.0-prerelease.3](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-styles@5.4.0-prerelease.2...@patternfly/react-styles@5.4.0-prerelease.3) (2024-05-10)
|
35
|
+
|
36
|
+
**Note:** Version bump only for package @patternfly/react-styles
|
37
|
+
|
38
|
+
# 5.4.0-prerelease.2 (2024-04-30)
|
39
|
+
|
40
|
+
**Note:** Version bump only for package @patternfly/react-styles
|
41
|
+
|
6
42
|
# 5.4.0-prerelease.1 (2024-04-19)
|
7
43
|
|
8
44
|
**Note:** Version bump only for package @patternfly/react-styles
|
@@ -32,8 +32,9 @@
|
|
32
32
|
--pf-v5-c-form__group-label-help--Color: var(--pf-v5-global--Color--200);
|
33
33
|
--pf-v5-c-form__group-label-help--hover--Color: var(--pf-v5-global--Color--100);
|
34
34
|
--pf-v5-c-form__group-label-help--focus--Color: var(--pf-v5-global--Color--100);
|
35
|
-
--pf-v5-c-form__group-label-info--
|
35
|
+
--pf-v5-c-form__group-label--m-info--Gap: var(--pf-v5-global--spacer--sm);
|
36
36
|
--pf-v5-c-form__group-label-info--FontSize: var(--pf-v5-global--FontSize--sm);
|
37
|
+
--pf-v5-c-form--m-horizontal__group-label--m-info--Gap: var(--pf-v5-global--spacer--sm);
|
37
38
|
--pf-v5-c-form__group-control--m-inline--child--MarginRight: var(--pf-v5-global--spacer--lg);
|
38
39
|
--pf-v5-c-form__group-control__helper-text--MarginBottom: var(--pf-v5-global--spacer--xs);
|
39
40
|
--pf-v5-c-form__group-control--m-stack--Gap: var(--pf-v5-global--spacer--sm);
|
@@ -119,6 +120,14 @@
|
|
119
120
|
--pf-v5-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop);
|
120
121
|
transform: translateY(var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY));
|
121
122
|
}
|
123
|
+
.pf-v5-c-form.pf-m-horizontal .pf-v5-c-form__group-label.pf-m-info {
|
124
|
+
flex-direction: column;
|
125
|
+
gap: var(--pf-v5-c-form--m-horizontal__group-label--m-info--Gap);
|
126
|
+
align-items: flex-start;
|
127
|
+
}
|
128
|
+
.pf-v5-c-form.pf-m-horizontal .pf-v5-c-form__group-label-main {
|
129
|
+
flex-grow: 0;
|
130
|
+
}
|
122
131
|
.pf-v5-c-form.pf-m-horizontal .pf-v5-c-form__group-control {
|
123
132
|
grid-column: 2;
|
124
133
|
}
|
@@ -139,6 +148,14 @@
|
|
139
148
|
--pf-v5-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop);
|
140
149
|
transform: translateY(var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY));
|
141
150
|
}
|
151
|
+
.pf-v5-c-form.pf-m-horizontal-on-xs .pf-v5-c-form__group-label.pf-m-info {
|
152
|
+
flex-direction: column;
|
153
|
+
gap: var(--pf-v5-c-form--m-horizontal__group-label--m-info--Gap);
|
154
|
+
align-items: flex-start;
|
155
|
+
}
|
156
|
+
.pf-v5-c-form.pf-m-horizontal-on-xs .pf-v5-c-form__group-label-main {
|
157
|
+
flex-grow: 0;
|
158
|
+
}
|
142
159
|
.pf-v5-c-form.pf-m-horizontal-on-xs .pf-v5-c-form__group-control {
|
143
160
|
grid-column: 2;
|
144
161
|
}
|
@@ -159,6 +176,14 @@
|
|
159
176
|
--pf-v5-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop);
|
160
177
|
transform: translateY(var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY));
|
161
178
|
}
|
179
|
+
.pf-v5-c-form.pf-m-horizontal-on-sm .pf-v5-c-form__group-label.pf-m-info {
|
180
|
+
flex-direction: column;
|
181
|
+
gap: var(--pf-v5-c-form--m-horizontal__group-label--m-info--Gap);
|
182
|
+
align-items: flex-start;
|
183
|
+
}
|
184
|
+
.pf-v5-c-form.pf-m-horizontal-on-sm .pf-v5-c-form__group-label-main {
|
185
|
+
flex-grow: 0;
|
186
|
+
}
|
162
187
|
.pf-v5-c-form.pf-m-horizontal-on-sm .pf-v5-c-form__group-control {
|
163
188
|
grid-column: 2;
|
164
189
|
}
|
@@ -179,6 +204,14 @@
|
|
179
204
|
--pf-v5-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop);
|
180
205
|
transform: translateY(var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY));
|
181
206
|
}
|
207
|
+
.pf-v5-c-form.pf-m-horizontal-on-md .pf-v5-c-form__group-label.pf-m-info {
|
208
|
+
flex-direction: column;
|
209
|
+
gap: var(--pf-v5-c-form--m-horizontal__group-label--m-info--Gap);
|
210
|
+
align-items: flex-start;
|
211
|
+
}
|
212
|
+
.pf-v5-c-form.pf-m-horizontal-on-md .pf-v5-c-form__group-label-main {
|
213
|
+
flex-grow: 0;
|
214
|
+
}
|
182
215
|
.pf-v5-c-form.pf-m-horizontal-on-md .pf-v5-c-form__group-control {
|
183
216
|
grid-column: 2;
|
184
217
|
}
|
@@ -199,6 +232,14 @@
|
|
199
232
|
--pf-v5-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop);
|
200
233
|
transform: translateY(var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY));
|
201
234
|
}
|
235
|
+
.pf-v5-c-form.pf-m-horizontal-on-lg .pf-v5-c-form__group-label.pf-m-info {
|
236
|
+
flex-direction: column;
|
237
|
+
gap: var(--pf-v5-c-form--m-horizontal__group-label--m-info--Gap);
|
238
|
+
align-items: flex-start;
|
239
|
+
}
|
240
|
+
.pf-v5-c-form.pf-m-horizontal-on-lg .pf-v5-c-form__group-label-main {
|
241
|
+
flex-grow: 0;
|
242
|
+
}
|
202
243
|
.pf-v5-c-form.pf-m-horizontal-on-lg .pf-v5-c-form__group-control {
|
203
244
|
grid-column: 2;
|
204
245
|
}
|
@@ -219,6 +260,14 @@
|
|
219
260
|
--pf-v5-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop);
|
220
261
|
transform: translateY(var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY));
|
221
262
|
}
|
263
|
+
.pf-v5-c-form.pf-m-horizontal-on-xl .pf-v5-c-form__group-label.pf-m-info {
|
264
|
+
flex-direction: column;
|
265
|
+
gap: var(--pf-v5-c-form--m-horizontal__group-label--m-info--Gap);
|
266
|
+
align-items: flex-start;
|
267
|
+
}
|
268
|
+
.pf-v5-c-form.pf-m-horizontal-on-xl .pf-v5-c-form__group-label-main {
|
269
|
+
flex-grow: 0;
|
270
|
+
}
|
222
271
|
.pf-v5-c-form.pf-m-horizontal-on-xl .pf-v5-c-form__group-control {
|
223
272
|
grid-column: 2;
|
224
273
|
}
|
@@ -239,6 +288,14 @@
|
|
239
288
|
--pf-v5-c-form--m-horizontal__group-label--md--PaddingTop: var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--PaddingTop);
|
240
289
|
transform: translateY(var(--pf-v5-c-form--m-horizontal__group-label--m-no-padding--md--TranslateY));
|
241
290
|
}
|
291
|
+
.pf-v5-c-form.pf-m-horizontal-on-2xl .pf-v5-c-form__group-label.pf-m-info {
|
292
|
+
flex-direction: column;
|
293
|
+
gap: var(--pf-v5-c-form--m-horizontal__group-label--m-info--Gap);
|
294
|
+
align-items: flex-start;
|
295
|
+
}
|
296
|
+
.pf-v5-c-form.pf-m-horizontal-on-2xl .pf-v5-c-form__group-label-main {
|
297
|
+
flex-grow: 0;
|
298
|
+
}
|
242
299
|
.pf-v5-c-form.pf-m-horizontal-on-2xl .pf-v5-c-form__group-control {
|
243
300
|
grid-column: 2;
|
244
301
|
}
|
@@ -275,6 +332,7 @@
|
|
275
332
|
}
|
276
333
|
.pf-v5-c-form__group-label.pf-m-info {
|
277
334
|
display: flex;
|
335
|
+
gap: var(--pf-v5-c-form__group-label--m-info--Gap);
|
278
336
|
align-items: flex-end;
|
279
337
|
}
|
280
338
|
|
@@ -283,7 +341,6 @@
|
|
283
341
|
}
|
284
342
|
|
285
343
|
.pf-v5-c-form__group-label-info {
|
286
|
-
margin-inline-start: var(--pf-v5-c-form__group-label-info--MarginLeft);
|
287
344
|
font-size: var(--pf-v5-c-form__group-label-info--FontSize);
|
288
345
|
}
|
289
346
|
|
@@ -32,6 +32,7 @@ declare const _default: {
|
|
32
32
|
"horizontal": "pf-m-horizontal",
|
33
33
|
"alignRight": "pf-m-align-right",
|
34
34
|
"noPaddingTop": "pf-m-no-padding-top",
|
35
|
+
"info": "pf-m-info",
|
35
36
|
"horizontalOnXs": "pf-m-horizontal-on-xs",
|
36
37
|
"horizontalOnSm": "pf-m-horizontal-on-sm",
|
37
38
|
"horizontalOnMd": "pf-m-horizontal-on-md",
|
@@ -40,7 +41,6 @@ declare const _default: {
|
|
40
41
|
"horizontalOn_2xl": "pf-m-horizontal-on-2xl",
|
41
42
|
"limitWidth": "pf-m-limit-width",
|
42
43
|
"action": "pf-m-action",
|
43
|
-
"info": "pf-m-info",
|
44
44
|
"disabled": "pf-m-disabled",
|
45
45
|
"inline": "pf-m-inline",
|
46
46
|
"stack": "pf-m-stack",
|
@@ -34,6 +34,7 @@ exports.default = {
|
|
34
34
|
"horizontal": "pf-m-horizontal",
|
35
35
|
"alignRight": "pf-m-align-right",
|
36
36
|
"noPaddingTop": "pf-m-no-padding-top",
|
37
|
+
"info": "pf-m-info",
|
37
38
|
"horizontalOnXs": "pf-m-horizontal-on-xs",
|
38
39
|
"horizontalOnSm": "pf-m-horizontal-on-sm",
|
39
40
|
"horizontalOnMd": "pf-m-horizontal-on-md",
|
@@ -42,7 +43,6 @@ exports.default = {
|
|
42
43
|
"horizontalOn_2xl": "pf-m-horizontal-on-2xl",
|
43
44
|
"limitWidth": "pf-m-limit-width",
|
44
45
|
"action": "pf-m-action",
|
45
|
-
"info": "pf-m-info",
|
46
46
|
"disabled": "pf-m-disabled",
|
47
47
|
"inline": "pf-m-inline",
|
48
48
|
"stack": "pf-m-stack",
|
@@ -32,6 +32,7 @@ export default {
|
|
32
32
|
"horizontal": "pf-m-horizontal",
|
33
33
|
"alignRight": "pf-m-align-right",
|
34
34
|
"noPaddingTop": "pf-m-no-padding-top",
|
35
|
+
"info": "pf-m-info",
|
35
36
|
"horizontalOnXs": "pf-m-horizontal-on-xs",
|
36
37
|
"horizontalOnSm": "pf-m-horizontal-on-sm",
|
37
38
|
"horizontalOnMd": "pf-m-horizontal-on-md",
|
@@ -40,7 +41,6 @@ export default {
|
|
40
41
|
"horizontalOn_2xl": "pf-m-horizontal-on-2xl",
|
41
42
|
"limitWidth": "pf-m-limit-width",
|
42
43
|
"action": "pf-m-action",
|
43
|
-
"info": "pf-m-info",
|
44
44
|
"disabled": "pf-m-disabled",
|
45
45
|
"inline": "pf-m-inline",
|
46
46
|
"stack": "pf-m-stack",
|
@@ -113,6 +113,7 @@
|
|
113
113
|
--pf-v5-c-menu-toggle__button--PaddingRight: var(--pf-v5-global--spacer--sm);
|
114
114
|
--pf-v5-c-menu-toggle__button__controls--MarginRight: var(--pf-v5-global--spacer--sm);
|
115
115
|
--pf-v5-c-menu-toggle__button__controls--MarginLeft: var(--pf-v5-global--spacer--sm);
|
116
|
+
--pf-v5-c-menu-toggle__button--m-text--PaddingInlineStart: var(--pf-v5-global--spacer--xs);
|
116
117
|
--pf-v5-c-menu-toggle--m-typeahead__controls--MarginRight: var(--pf-v5-global--spacer--sm);
|
117
118
|
--pf-v5-c-menu-toggle--m-typeahead__controls--MarginLeft: var(--pf-v5-global--spacer--sm);
|
118
119
|
--pf-v5-c-menu-toggle--m-typeahead--c-text-input-group__utilities--c-button--PaddingRight: var(--pf-v5-global--spacer--sm);
|
@@ -415,6 +416,12 @@
|
|
415
416
|
background-color: var(--pf-v5-c-menu-toggle__button--BackgroundColor);
|
416
417
|
border: 0;
|
417
418
|
}
|
419
|
+
.pf-v5-c-menu-toggle__button.pf-m-text {
|
420
|
+
--pf-v5-c-menu-toggle--m-split-button--last-child--PaddingLeft: var(--pf-v5-c-menu-toggle__button--m-text--PaddingInlineStart);
|
421
|
+
display: inline-flex;
|
422
|
+
align-items: baseline;
|
423
|
+
padding-inline-start: var(--pf-v5-c-menu-toggle__button--m-text--PaddingInlineStart);
|
424
|
+
}
|
418
425
|
|
419
426
|
.pf-v5-c-menu-toggle__icon {
|
420
427
|
flex-shrink: 0;
|
@@ -16,7 +16,6 @@
|
|
16
16
|
--pf-v5-c-pagination--m-bottom--child--MarginRight: 0;
|
17
17
|
--pf-v5-c-pagination--m-bottom--child--md--MarginRight: var(--pf-v5-global--spacer--lg);
|
18
18
|
--pf-v5-c-pagination--m-compact--child--MarginRight: var(--pf-v5-global--spacer--sm);
|
19
|
-
--pf-v5-c-pagination--c-menu-toggle--FontSize: var(--pf-v5-global--FontSize--sm);
|
20
19
|
--pf-v5-c-pagination__nav--Display: none;
|
21
20
|
--pf-v5-c-pagination--m-display-summary__nav--Display: none;
|
22
21
|
--pf-v5-c-pagination--m-display-full__nav--Display: inline-flex;
|
@@ -60,9 +59,13 @@
|
|
60
59
|
--pf-v5-c-pagination--m-bottom--xl--PaddingRight: var(--pf-v5-global--spacer--lg);
|
61
60
|
--pf-v5-c-pagination--m-bottom--xl--PaddingLeft: var(--pf-v5-global--spacer--lg);
|
62
61
|
--pf-v5-c-pagination--m-bottom--m-sticky--BoxShadow: var(--pf-v5-global--BoxShadow--sm-top);
|
62
|
+
--pf-v5-c-pagination--c-menu-toggle--FontSize: var(--pf-v5-global--FontSize--sm);
|
63
|
+
--pf-v5-c-pagination--c-menu-toggle--Display--base: inline-flex;
|
63
64
|
--pf-v5-c-pagination--c-menu-toggle--Display: none;
|
65
|
+
--pf-v5-c-pagination--c-menu-toggle--md--Display: var(--pf-v5-c-pagination--c-menu-toggle--Display--base);
|
64
66
|
--pf-v5-c-pagination--m-display-summary--c-menu-toggle--Display: none;
|
65
|
-
--pf-v5-c-pagination--m-display-full--c-menu-toggle--Display:
|
67
|
+
--pf-v5-c-pagination--m-display-full--c-menu-toggle--Display: var(--pf-v5-c-pagination--c-menu-toggle--Display--base);
|
68
|
+
--pf-v5-c-pagination--m-bottom--c-menu-toggle--Display: var(--pf-v5-c-pagination--c-menu-toggle--Display--base);
|
66
69
|
display: flex;
|
67
70
|
flex-wrap: wrap;
|
68
71
|
align-items: center;
|
@@ -79,7 +82,7 @@
|
|
79
82
|
--pf-v5-c-pagination--m-bottom--child--MarginRight: var(--pf-v5-c-pagination--m-bottom--child--md--MarginRight);
|
80
83
|
--pf-v5-c-pagination--m-bottom__nav-control--c-button--OutlineOffset: 0;
|
81
84
|
--pf-v5-c-pagination--m-bottom--BoxShadow: none;
|
82
|
-
--pf-v5-c-pagination--c-menu-toggle--Display:
|
85
|
+
--pf-v5-c-pagination--c-menu-toggle--Display: var(--pf-v5-c-pagination--c-menu-toggle--md--Display);
|
83
86
|
--pf-v5-c-pagination__nav--Display: inline-flex;
|
84
87
|
--pf-v5-c-pagination__total-items--Display: none;
|
85
88
|
}
|
@@ -129,7 +132,7 @@
|
|
129
132
|
}
|
130
133
|
.pf-v5-c-pagination.pf-m-bottom .pf-v5-c-menu-toggle {
|
131
134
|
position: absolute;
|
132
|
-
display:
|
135
|
+
display: var(--pf-v5-c-pagination--m-bottom--c-menu-toggle--Display);
|
133
136
|
}
|
134
137
|
.pf-v5-c-pagination.pf-m-bottom .pf-v5-c-pagination__nav {
|
135
138
|
display: flex;
|
@@ -308,6 +308,7 @@
|
|
308
308
|
border: 0;
|
309
309
|
}
|
310
310
|
.pf-v5-c-progress-stepper__step-title.pf-m-help-text {
|
311
|
+
padding: 0;
|
311
312
|
text-decoration: underline;
|
312
313
|
text-decoration-thickness: var(--pf-v5-c-progress-stepper__step-title--m-help-text--TextDecorationThickness);
|
313
314
|
text-decoration-style: dashed;
|
@@ -1,11 +1,4 @@
|
|
1
|
-
.ws-core-u-display
|
2
|
-
.ws-core-u-display .pf-v5-u-display-block,
|
3
|
-
.ws-core-u-display .pf-v5-u-display-flex,
|
4
|
-
.ws-core-u-display .pf-v5-u-display-inline-flex,
|
5
|
-
.ws-core-u-display .pf-v5-u-display-grid,
|
6
|
-
.ws-core-u-display .pf-v5-u-display-inline,
|
7
|
-
.ws-core-u-display .pf-v5-u-display-table,
|
8
|
-
.ws-core-u-display .pf-v5-u-display-table-cell {
|
1
|
+
.ws-core-u-display [class*="pf-v5-u-display-"] {
|
9
2
|
padding: .5rem !important;
|
10
3
|
border: 2px dashed #393f44;
|
11
4
|
}
|
@@ -1,13 +1,5 @@
|
|
1
1
|
import './Display.css';
|
2
2
|
declare const _default: {
|
3
|
-
"displayBlock": "pf-v5-u-display-block",
|
4
|
-
"displayFlex": "pf-v5-u-display-flex",
|
5
|
-
"displayGrid": "pf-v5-u-display-grid",
|
6
|
-
"displayInline": "pf-v5-u-display-inline",
|
7
|
-
"displayInlineBlock": "pf-v5-u-display-inline-block",
|
8
|
-
"displayInlineFlex": "pf-v5-u-display-inline-flex",
|
9
|
-
"displayTable": "pf-v5-u-display-table",
|
10
|
-
"displayTableCell": "pf-v5-u-display-table-cell",
|
11
3
|
"wsCoreUDisplay": "ws-core-u-display"
|
12
4
|
};
|
13
5
|
export default _default;
|
@@ -2,13 +2,5 @@
|
|
2
2
|
exports.__esModule = true;
|
3
3
|
require('./Display.css');
|
4
4
|
exports.default = {
|
5
|
-
"displayBlock": "pf-v5-u-display-block",
|
6
|
-
"displayFlex": "pf-v5-u-display-flex",
|
7
|
-
"displayGrid": "pf-v5-u-display-grid",
|
8
|
-
"displayInline": "pf-v5-u-display-inline",
|
9
|
-
"displayInlineBlock": "pf-v5-u-display-inline-block",
|
10
|
-
"displayInlineFlex": "pf-v5-u-display-inline-flex",
|
11
|
-
"displayTable": "pf-v5-u-display-table",
|
12
|
-
"displayTableCell": "pf-v5-u-display-table-cell",
|
13
5
|
"wsCoreUDisplay": "ws-core-u-display"
|
14
6
|
};
|
@@ -1,12 +1,4 @@
|
|
1
1
|
import './Display.css';
|
2
2
|
export default {
|
3
|
-
"displayBlock": "pf-v5-u-display-block",
|
4
|
-
"displayFlex": "pf-v5-u-display-flex",
|
5
|
-
"displayGrid": "pf-v5-u-display-grid",
|
6
|
-
"displayInline": "pf-v5-u-display-inline",
|
7
|
-
"displayInlineBlock": "pf-v5-u-display-inline-block",
|
8
|
-
"displayInlineFlex": "pf-v5-u-display-inline-flex",
|
9
|
-
"displayTable": "pf-v5-u-display-table",
|
10
|
-
"displayTableCell": "pf-v5-u-display-table-cell",
|
11
3
|
"wsCoreUDisplay": "ws-core-u-display"
|
12
4
|
};
|
@@ -34,6 +34,14 @@
|
|
34
34
|
display: inline-flex !important;
|
35
35
|
}
|
36
36
|
|
37
|
+
.pf-v5-u-display-grid {
|
38
|
+
display: grid !important;
|
39
|
+
}
|
40
|
+
|
41
|
+
.pf-v5-u-display-inline-grid {
|
42
|
+
display: inline-grid !important;
|
43
|
+
}
|
44
|
+
|
37
45
|
@media screen and (min-width: 576px) {
|
38
46
|
.pf-v5-u-display-none-on-sm {
|
39
47
|
display: none !important;
|
@@ -62,6 +70,12 @@
|
|
62
70
|
.pf-v5-u-display-inline-flex-on-sm {
|
63
71
|
display: inline-flex !important;
|
64
72
|
}
|
73
|
+
.pf-v5-u-display-grid-on-sm {
|
74
|
+
display: grid !important;
|
75
|
+
}
|
76
|
+
.pf-v5-u-display-inline-grid-on-sm {
|
77
|
+
display: inline-grid !important;
|
78
|
+
}
|
65
79
|
}
|
66
80
|
@media screen and (min-width: 768px) {
|
67
81
|
.pf-v5-u-display-none-on-md {
|
@@ -91,6 +105,12 @@
|
|
91
105
|
.pf-v5-u-display-inline-flex-on-md {
|
92
106
|
display: inline-flex !important;
|
93
107
|
}
|
108
|
+
.pf-v5-u-display-grid-on-md {
|
109
|
+
display: grid !important;
|
110
|
+
}
|
111
|
+
.pf-v5-u-display-inline-grid-on-md {
|
112
|
+
display: inline-grid !important;
|
113
|
+
}
|
94
114
|
}
|
95
115
|
@media screen and (min-width: 992px) {
|
96
116
|
.pf-v5-u-display-none-on-lg {
|
@@ -120,6 +140,12 @@
|
|
120
140
|
.pf-v5-u-display-inline-flex-on-lg {
|
121
141
|
display: inline-flex !important;
|
122
142
|
}
|
143
|
+
.pf-v5-u-display-grid-on-lg {
|
144
|
+
display: grid !important;
|
145
|
+
}
|
146
|
+
.pf-v5-u-display-inline-grid-on-lg {
|
147
|
+
display: inline-grid !important;
|
148
|
+
}
|
123
149
|
}
|
124
150
|
@media screen and (min-width: 1200px) {
|
125
151
|
.pf-v5-u-display-none-on-xl {
|
@@ -149,6 +175,12 @@
|
|
149
175
|
.pf-v5-u-display-inline-flex-on-xl {
|
150
176
|
display: inline-flex !important;
|
151
177
|
}
|
178
|
+
.pf-v5-u-display-grid-on-xl {
|
179
|
+
display: grid !important;
|
180
|
+
}
|
181
|
+
.pf-v5-u-display-inline-grid-on-xl {
|
182
|
+
display: inline-grid !important;
|
183
|
+
}
|
152
184
|
}
|
153
185
|
@media screen and (min-width: 1450px) {
|
154
186
|
.pf-v5-u-display-none-on-2xl {
|
@@ -178,4 +210,10 @@
|
|
178
210
|
.pf-v5-u-display-inline-flex-on-2xl {
|
179
211
|
display: inline-flex !important;
|
180
212
|
}
|
213
|
+
.pf-v5-u-display-grid-on-2xl {
|
214
|
+
display: grid !important;
|
215
|
+
}
|
216
|
+
.pf-v5-u-display-inline-grid-on-2xl {
|
217
|
+
display: inline-grid !important;
|
218
|
+
}
|
181
219
|
}
|
@@ -12,6 +12,12 @@ declare const _default: {
|
|
12
12
|
"displayFlexOnSm": "pf-v5-u-display-flex-on-sm",
|
13
13
|
"displayFlexOnXl": "pf-v5-u-display-flex-on-xl",
|
14
14
|
"displayFlexOn_2xl": "pf-v5-u-display-flex-on-2xl",
|
15
|
+
"displayGrid": "pf-v5-u-display-grid",
|
16
|
+
"displayGridOnLg": "pf-v5-u-display-grid-on-lg",
|
17
|
+
"displayGridOnMd": "pf-v5-u-display-grid-on-md",
|
18
|
+
"displayGridOnSm": "pf-v5-u-display-grid-on-sm",
|
19
|
+
"displayGridOnXl": "pf-v5-u-display-grid-on-xl",
|
20
|
+
"displayGridOn_2xl": "pf-v5-u-display-grid-on-2xl",
|
15
21
|
"displayInline": "pf-v5-u-display-inline",
|
16
22
|
"displayInlineBlock": "pf-v5-u-display-inline-block",
|
17
23
|
"displayInlineBlockOnLg": "pf-v5-u-display-inline-block-on-lg",
|
@@ -25,6 +31,12 @@ declare const _default: {
|
|
25
31
|
"displayInlineFlexOnSm": "pf-v5-u-display-inline-flex-on-sm",
|
26
32
|
"displayInlineFlexOnXl": "pf-v5-u-display-inline-flex-on-xl",
|
27
33
|
"displayInlineFlexOn_2xl": "pf-v5-u-display-inline-flex-on-2xl",
|
34
|
+
"displayInlineGrid": "pf-v5-u-display-inline-grid",
|
35
|
+
"displayInlineGridOnLg": "pf-v5-u-display-inline-grid-on-lg",
|
36
|
+
"displayInlineGridOnMd": "pf-v5-u-display-inline-grid-on-md",
|
37
|
+
"displayInlineGridOnSm": "pf-v5-u-display-inline-grid-on-sm",
|
38
|
+
"displayInlineGridOnXl": "pf-v5-u-display-inline-grid-on-xl",
|
39
|
+
"displayInlineGridOn_2xl": "pf-v5-u-display-inline-grid-on-2xl",
|
28
40
|
"displayInlineOnLg": "pf-v5-u-display-inline-on-lg",
|
29
41
|
"displayInlineOnMd": "pf-v5-u-display-inline-on-md",
|
30
42
|
"displayInlineOnSm": "pf-v5-u-display-inline-on-sm",
|
@@ -14,6 +14,12 @@ exports.default = {
|
|
14
14
|
"displayFlexOnSm": "pf-v5-u-display-flex-on-sm",
|
15
15
|
"displayFlexOnXl": "pf-v5-u-display-flex-on-xl",
|
16
16
|
"displayFlexOn_2xl": "pf-v5-u-display-flex-on-2xl",
|
17
|
+
"displayGrid": "pf-v5-u-display-grid",
|
18
|
+
"displayGridOnLg": "pf-v5-u-display-grid-on-lg",
|
19
|
+
"displayGridOnMd": "pf-v5-u-display-grid-on-md",
|
20
|
+
"displayGridOnSm": "pf-v5-u-display-grid-on-sm",
|
21
|
+
"displayGridOnXl": "pf-v5-u-display-grid-on-xl",
|
22
|
+
"displayGridOn_2xl": "pf-v5-u-display-grid-on-2xl",
|
17
23
|
"displayInline": "pf-v5-u-display-inline",
|
18
24
|
"displayInlineBlock": "pf-v5-u-display-inline-block",
|
19
25
|
"displayInlineBlockOnLg": "pf-v5-u-display-inline-block-on-lg",
|
@@ -27,6 +33,12 @@ exports.default = {
|
|
27
33
|
"displayInlineFlexOnSm": "pf-v5-u-display-inline-flex-on-sm",
|
28
34
|
"displayInlineFlexOnXl": "pf-v5-u-display-inline-flex-on-xl",
|
29
35
|
"displayInlineFlexOn_2xl": "pf-v5-u-display-inline-flex-on-2xl",
|
36
|
+
"displayInlineGrid": "pf-v5-u-display-inline-grid",
|
37
|
+
"displayInlineGridOnLg": "pf-v5-u-display-inline-grid-on-lg",
|
38
|
+
"displayInlineGridOnMd": "pf-v5-u-display-inline-grid-on-md",
|
39
|
+
"displayInlineGridOnSm": "pf-v5-u-display-inline-grid-on-sm",
|
40
|
+
"displayInlineGridOnXl": "pf-v5-u-display-inline-grid-on-xl",
|
41
|
+
"displayInlineGridOn_2xl": "pf-v5-u-display-inline-grid-on-2xl",
|
30
42
|
"displayInlineOnLg": "pf-v5-u-display-inline-on-lg",
|
31
43
|
"displayInlineOnMd": "pf-v5-u-display-inline-on-md",
|
32
44
|
"displayInlineOnSm": "pf-v5-u-display-inline-on-sm",
|
@@ -12,6 +12,12 @@ export default {
|
|
12
12
|
"displayFlexOnSm": "pf-v5-u-display-flex-on-sm",
|
13
13
|
"displayFlexOnXl": "pf-v5-u-display-flex-on-xl",
|
14
14
|
"displayFlexOn_2xl": "pf-v5-u-display-flex-on-2xl",
|
15
|
+
"displayGrid": "pf-v5-u-display-grid",
|
16
|
+
"displayGridOnLg": "pf-v5-u-display-grid-on-lg",
|
17
|
+
"displayGridOnMd": "pf-v5-u-display-grid-on-md",
|
18
|
+
"displayGridOnSm": "pf-v5-u-display-grid-on-sm",
|
19
|
+
"displayGridOnXl": "pf-v5-u-display-grid-on-xl",
|
20
|
+
"displayGridOn_2xl": "pf-v5-u-display-grid-on-2xl",
|
15
21
|
"displayInline": "pf-v5-u-display-inline",
|
16
22
|
"displayInlineBlock": "pf-v5-u-display-inline-block",
|
17
23
|
"displayInlineBlockOnLg": "pf-v5-u-display-inline-block-on-lg",
|
@@ -25,6 +31,12 @@ export default {
|
|
25
31
|
"displayInlineFlexOnSm": "pf-v5-u-display-inline-flex-on-sm",
|
26
32
|
"displayInlineFlexOnXl": "pf-v5-u-display-inline-flex-on-xl",
|
27
33
|
"displayInlineFlexOn_2xl": "pf-v5-u-display-inline-flex-on-2xl",
|
34
|
+
"displayInlineGrid": "pf-v5-u-display-inline-grid",
|
35
|
+
"displayInlineGridOnLg": "pf-v5-u-display-inline-grid-on-lg",
|
36
|
+
"displayInlineGridOnMd": "pf-v5-u-display-inline-grid-on-md",
|
37
|
+
"displayInlineGridOnSm": "pf-v5-u-display-inline-grid-on-sm",
|
38
|
+
"displayInlineGridOnXl": "pf-v5-u-display-inline-grid-on-xl",
|
39
|
+
"displayInlineGridOn_2xl": "pf-v5-u-display-inline-grid-on-2xl",
|
28
40
|
"displayInlineOnLg": "pf-v5-u-display-inline-on-lg",
|
29
41
|
"displayInlineOnMd": "pf-v5-u-display-inline-on-md",
|
30
42
|
"displayInlineOnSm": "pf-v5-u-display-inline-on-sm",
|
package/dist/esm/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,GAAG,CAAC,GAAG,IAAS;IAC9B,4EAA4E;IAC5E,MAAM,OAAO,GAAG,EAAc,CAAC;IAC/B,MAAM,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;IAEjC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,OAAO,GAAG,CAAC;QAE3B,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,EAAE;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,GAAG,CAAC,GAAG,IAAS;IAC9B,4EAA4E;IAC5E,MAAM,OAAO,GAAG,EAAc,CAAC;IAC/B,MAAM,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;IAEjC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,OAAO,GAAG,CAAC;QAE3B,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YAC5C,MAAM,KAAK,GAAG,GAAG,CAAC,GAAI,GAAW,CAAC,CAAC;YACnC,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACH,CAAC;aAAM,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;gBACtB,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;oBACtC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACpB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC"}
|
package/dist/js/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,GAAG,CAAC,GAAG,IAAS;IAC9B,4EAA4E;IAC5E,MAAM,OAAO,GAAG,EAAc,CAAC;IAC/B,MAAM,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;IAEjC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,OAAO,GAAG,CAAC;QAE3B,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,EAAE;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAgB,GAAG,CAAC,GAAG,IAAS;IAC9B,4EAA4E;IAC5E,MAAM,OAAO,GAAG,EAAc,CAAC;IAC/B,MAAM,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;IAEjC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAQ,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,OAAO,GAAG,CAAC;QAE3B,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YAC5C,MAAM,KAAK,GAAG,GAAG,CAAC,GAAI,GAAW,CAAC,CAAC;YACnC,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACH,CAAC;aAAM,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;gBACtB,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;oBACtC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACpB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAzBD,kBAyBC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@patternfly/react-styles",
|
3
|
-
"version": "5.4.0-prerelease.
|
3
|
+
"version": "5.4.0-prerelease.10",
|
4
4
|
"main": "dist/js/index.js",
|
5
5
|
"module": "dist/esm/index.js",
|
6
6
|
"types": "dist/esm/index.d.ts",
|
@@ -14,18 +14,14 @@
|
|
14
14
|
"access": "public"
|
15
15
|
},
|
16
16
|
"scripts": {
|
17
|
-
"generate": "rimraf css && node scripts/writeClassMaps.
|
17
|
+
"generate": "rimraf css && node scripts/writeClassMaps.mjs && node scripts/copyStyles.mjs",
|
18
18
|
"clean": "rimraf dist css"
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
|
-
"@patternfly/patternfly": "5.
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"fs-extra": "^11.1.1",
|
25
|
-
"glob": "^7.1.2",
|
26
|
-
"jsdom": "^15.1.0",
|
27
|
-
"typescript": "^4.7.4"
|
21
|
+
"@patternfly/patternfly": "5.4.0-prerelease.7",
|
22
|
+
"change-case": "^5.4.4",
|
23
|
+
"fs-extra": "^11.2.0"
|
28
24
|
},
|
29
25
|
"license": "MIT",
|
30
|
-
"gitHead": "
|
26
|
+
"gitHead": "b343abb86e05cc2a197da5e4a95f347dfda9bf49"
|
31
27
|
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { copySync } from 'fs-extra/esm';
|
2
|
+
import path from 'node:path';
|
3
|
+
import url from 'node:url';
|
4
|
+
|
5
|
+
const toDir = path.resolve(import.meta.dirname, '../css');
|
6
|
+
const fromDir = path.dirname(url.fileURLToPath(import.meta.resolve('@patternfly/patternfly/package.json')));
|
7
|
+
|
8
|
+
copySync(path.join(fromDir, 'assets/images'), path.join(toDir, 'assets/images'));
|
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import { camelCase } from 'change-case';
|
2
|
+
import { glob } from 'glob';
|
3
|
+
import fs from 'node:fs';
|
4
|
+
import path from 'node:path';
|
5
|
+
import url from 'node:url';
|
5
6
|
|
6
7
|
/**
|
7
8
|
* @param {string} cssString - CSS string
|
@@ -14,7 +15,7 @@ function getCSSClasses(cssString) {
|
|
14
15
|
* @param {string} className - Class name
|
15
16
|
*/
|
16
17
|
function formatClassName(className) {
|
17
|
-
return
|
18
|
+
return camelCase(className.replace(/pf-(v5-)?((c|l|m|u|is|has)-)?/g, ''));
|
18
19
|
}
|
19
20
|
|
20
21
|
/**
|
@@ -53,8 +54,8 @@ function getClassMaps(cssString) {
|
|
53
54
|
/**
|
54
55
|
* @returns {any} Map of file names to classMaps
|
55
56
|
*/
|
56
|
-
function generateClassMaps() {
|
57
|
-
const pfStylesDir = path.dirname(
|
57
|
+
export function generateClassMaps() {
|
58
|
+
const pfStylesDir = path.dirname(url.fileURLToPath(import.meta.resolve('@patternfly/patternfly/patternfly.css')));
|
58
59
|
|
59
60
|
const patternflyCSSFiles = glob.sync('**/*.css', {
|
60
61
|
cwd: pfStylesDir,
|
@@ -73,7 +74,3 @@ function generateClassMaps() {
|
|
73
74
|
|
74
75
|
return res;
|
75
76
|
}
|
76
|
-
|
77
|
-
module.exports = {
|
78
|
-
generateClassMaps
|
79
|
-
};
|
@@ -1,34 +1,36 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
import { outputFileSync } from 'fs-extra/esm';
|
2
|
+
import fs from 'node:fs';
|
3
|
+
import path from 'node:path';
|
4
|
+
import url from 'node:url';
|
5
|
+
import { generateClassMaps } from './generateClassMaps.mjs';
|
4
6
|
|
5
|
-
const outDir = resolve(
|
7
|
+
const outDir = path.resolve(import.meta.dirname, '../css');
|
6
8
|
|
7
9
|
const writeCJSExport = (file, classMap) =>
|
8
10
|
outputFileSync(
|
9
|
-
join(outDir, file.replace(/.css$/, '.js')),
|
11
|
+
path.join(outDir, file.replace(/.css$/, '.js')),
|
10
12
|
`
|
11
13
|
"use strict";
|
12
14
|
exports.__esModule = true;
|
13
|
-
require('./${basename(file, '.css.js')}');
|
15
|
+
require('./${path.basename(file, '.css.js')}');
|
14
16
|
exports.default = ${JSON.stringify(classMap, null, 2)};
|
15
17
|
`.trim()
|
16
18
|
);
|
17
19
|
|
18
20
|
const writeESMExport = (file, classMap) =>
|
19
21
|
outputFileSync(
|
20
|
-
join(outDir, file.replace(/.css$/, '.mjs')),
|
22
|
+
path.join(outDir, file.replace(/.css$/, '.mjs')),
|
21
23
|
`
|
22
|
-
import './${basename(file, '.css.js')}';
|
24
|
+
import './${path.basename(file, '.css.js')}';
|
23
25
|
export default ${JSON.stringify(classMap, null, 2)};
|
24
26
|
`.trim()
|
25
27
|
);
|
26
28
|
|
27
29
|
const writeDTSExport = (file, classMap) =>
|
28
30
|
outputFileSync(
|
29
|
-
join(outDir, file.replace(/.css$/, '.d.ts')),
|
31
|
+
path.join(outDir, file.replace(/.css$/, '.d.ts')),
|
30
32
|
`
|
31
|
-
import './${basename(file, '.css.js')}';
|
33
|
+
import './${path.basename(file, '.css.js')}';
|
32
34
|
declare const _default: ${JSON.stringify(classMap, null, 2)};
|
33
35
|
export default _default;
|
34
36
|
`.trim()
|
@@ -38,15 +40,15 @@ export default _default;
|
|
38
40
|
* @param {any} classMaps Map of file names to classMaps
|
39
41
|
*/
|
40
42
|
function writeClassMaps(classMaps) {
|
41
|
-
const pfStylesDir = dirname(
|
43
|
+
const pfStylesDir = path.dirname(url.fileURLToPath(import.meta.resolve('@patternfly/patternfly/patternfly.css')));
|
42
44
|
|
43
45
|
Object.entries(classMaps).forEach(([file, classMap]) => {
|
44
|
-
const outPath = file.includes(pfStylesDir) ? relative(pfStylesDir, file) : relative('src/css', file);
|
46
|
+
const outPath = file.includes(pfStylesDir) ? path.relative(pfStylesDir, file) : path.relative('src/css', file);
|
45
47
|
|
46
48
|
writeCJSExport(outPath, classMap);
|
47
49
|
writeDTSExport(outPath, classMap);
|
48
50
|
writeESMExport(outPath, classMap);
|
49
|
-
copyFileSync(file, join(outDir, outPath));
|
51
|
+
fs.copyFileSync(file, path.join(outDir, outPath));
|
50
52
|
});
|
51
53
|
|
52
54
|
// eslint-disable-next-line no-console
|
package/scripts/copyStyles.js
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
const { copySync } = require('fs-extra');
|
2
|
-
const { resolve, dirname, join } = require('path');
|
3
|
-
|
4
|
-
const toDir = resolve(__dirname, '../css');
|
5
|
-
const fromDir = dirname(require.resolve('@patternfly/patternfly/package.json'));
|
6
|
-
|
7
|
-
copySync(join(fromDir, 'assets/images'), join(toDir, 'assets/images'));
|