@wordpress/global-styles-ui 1.11.0 → 1.12.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.
Files changed (69) hide show
  1. package/build/dimensions-panel.cjs +1 -0
  2. package/build/dimensions-panel.cjs.map +2 -2
  3. package/build/font-families.cjs.map +3 -3
  4. package/build/font-library/font-card.cjs.map +3 -3
  5. package/build/font-library/font-collection.cjs.map +3 -3
  6. package/build/font-library/font-demo.cjs.map +3 -3
  7. package/build/font-library/google-fonts-confirm-dialog.cjs.map +3 -3
  8. package/build/font-library/installed-fonts.cjs.map +3 -3
  9. package/build/font-library/upload-fonts.cjs.map +3 -3
  10. package/build/pagination/index.cjs.map +3 -3
  11. package/build/palette.cjs.map +2 -2
  12. package/build/preview-wrapper.cjs +15 -3
  13. package/build/preview-wrapper.cjs.map +3 -3
  14. package/build/screen-background.cjs.map +3 -3
  15. package/build/screen-block-list.cjs.map +3 -3
  16. package/build/screen-header.cjs.map +3 -3
  17. package/build-module/dimensions-panel.mjs +1 -0
  18. package/build-module/dimensions-panel.mjs.map +2 -2
  19. package/build-module/font-families.mjs +2 -2
  20. package/build-module/font-families.mjs.map +2 -2
  21. package/build-module/font-library/font-card.mjs +2 -2
  22. package/build-module/font-library/font-card.mjs.map +2 -2
  23. package/build-module/font-library/font-collection.mjs +4 -4
  24. package/build-module/font-library/font-collection.mjs.map +2 -2
  25. package/build-module/font-library/font-demo.mjs +2 -2
  26. package/build-module/font-library/font-demo.mjs.map +2 -2
  27. package/build-module/font-library/google-fonts-confirm-dialog.mjs +3 -3
  28. package/build-module/font-library/google-fonts-confirm-dialog.mjs.map +2 -2
  29. package/build-module/font-library/installed-fonts.mjs +3 -3
  30. package/build-module/font-library/installed-fonts.mjs.map +2 -2
  31. package/build-module/font-library/upload-fonts.mjs +2 -2
  32. package/build-module/font-library/upload-fonts.mjs.map +2 -2
  33. package/build-module/pagination/index.mjs +3 -3
  34. package/build-module/pagination/index.mjs.map +2 -2
  35. package/build-module/palette.mjs.map +2 -2
  36. package/build-module/preview-wrapper.mjs +5 -3
  37. package/build-module/preview-wrapper.mjs.map +2 -2
  38. package/build-module/screen-background.mjs +2 -2
  39. package/build-module/screen-background.mjs.map +2 -2
  40. package/build-module/screen-block-list.mjs +2 -2
  41. package/build-module/screen-block-list.mjs.map +2 -2
  42. package/build-module/screen-header.mjs +2 -2
  43. package/build-module/screen-header.mjs.map +2 -2
  44. package/build-style/style-rtl.css +5 -10
  45. package/build-style/style.css +5 -10
  46. package/build-types/dimensions-panel.d.ts.map +1 -1
  47. package/build-types/font-families.d.ts.map +1 -1
  48. package/build-types/font-library/font-collection.d.ts.map +1 -1
  49. package/build-types/font-library/installed-fonts.d.ts.map +1 -1
  50. package/build-types/palette.d.ts.map +1 -1
  51. package/build-types/preview-wrapper.d.ts.map +1 -1
  52. package/package.json +18 -18
  53. package/src/dimensions-panel.tsx +1 -0
  54. package/src/font-families.tsx +3 -4
  55. package/src/font-library/font-card.tsx +3 -3
  56. package/src/font-library/font-collection.tsx +7 -8
  57. package/src/font-library/font-demo.tsx +3 -3
  58. package/src/font-library/google-fonts-confirm-dialog.tsx +5 -5
  59. package/src/font-library/installed-fonts.tsx +5 -6
  60. package/src/font-library/upload-fonts.tsx +3 -3
  61. package/src/pagination/index.tsx +5 -5
  62. package/src/palette.tsx +0 -2
  63. package/src/preview-wrapper.tsx +8 -2
  64. package/src/screen-background.tsx +3 -3
  65. package/src/screen-block-list.tsx +3 -3
  66. package/src/screen-header.tsx +3 -3
  67. package/src/screen-revisions/style.scss +1 -1
  68. package/src/style.scss +4 -8
  69. package/src/variations/style.scss +1 -1
@@ -287,7 +287,7 @@ button.font-library__upload-area {
287
287
 
288
288
  .global-styles-ui-screen-revisions__revision-item {
289
289
  position: relative;
290
- cursor: pointer;
290
+ cursor: var(--wpds-cursor-control, pointer);
291
291
  display: flex;
292
292
  flex-direction: column;
293
293
  }
@@ -445,7 +445,7 @@ button.font-library__upload-area {
445
445
 
446
446
  .global-styles-ui-variations_item {
447
447
  box-sizing: border-box;
448
- cursor: pointer;
448
+ cursor: var(--wpds-cursor-control, pointer);
449
449
  }
450
450
  .global-styles-ui-variations_item .global-styles-ui-variations_item-preview {
451
451
  border-radius: 2px;
@@ -477,19 +477,14 @@ button.font-library__upload-area {
477
477
  outline-color: var(--wp-admin-theme-color);
478
478
  }
479
479
 
480
- .global-styles-ui-preview {
481
- display: flex;
482
- align-items: center;
483
- justify-content: center;
484
- line-height: 1;
485
- cursor: pointer;
486
- }
487
-
488
480
  .global-styles-ui-preview__wrapper {
489
481
  max-width: 100%;
490
482
  display: block;
491
483
  width: 100%;
492
484
  }
485
+ .global-styles-ui-preview__wrapper.is-hoverable {
486
+ cursor: var(--wpds-cursor-control, pointer);
487
+ }
493
488
 
494
489
  .global-styles-ui-typography-preview {
495
490
  display: flex;
@@ -287,7 +287,7 @@ button.font-library__upload-area {
287
287
 
288
288
  .global-styles-ui-screen-revisions__revision-item {
289
289
  position: relative;
290
- cursor: pointer;
290
+ cursor: var(--wpds-cursor-control, pointer);
291
291
  display: flex;
292
292
  flex-direction: column;
293
293
  }
@@ -445,7 +445,7 @@ button.font-library__upload-area {
445
445
 
446
446
  .global-styles-ui-variations_item {
447
447
  box-sizing: border-box;
448
- cursor: pointer;
448
+ cursor: var(--wpds-cursor-control, pointer);
449
449
  }
450
450
  .global-styles-ui-variations_item .global-styles-ui-variations_item-preview {
451
451
  border-radius: 2px;
@@ -477,19 +477,14 @@ button.font-library__upload-area {
477
477
  outline-color: var(--wp-admin-theme-color);
478
478
  }
479
479
 
480
- .global-styles-ui-preview {
481
- display: flex;
482
- align-items: center;
483
- justify-content: center;
484
- line-height: 1;
485
- cursor: pointer;
486
- }
487
-
488
480
  .global-styles-ui-preview__wrapper {
489
481
  max-width: 100%;
490
482
  display: block;
491
483
  width: 100%;
492
484
  }
485
+ .global-styles-ui-preview__wrapper.is-hoverable {
486
+ cursor: var(--wpds-cursor-control, pointer);
487
+ }
493
488
 
494
489
  .global-styles-ui-typography-preview {
495
490
  display: flex;
@@ -1 +1 @@
1
- {"version":3,"file":"dimensions-panel.d.ts","sourceRoot":"","sources":["../src/dimensions-panel.tsx"],"names":[],"mappings":"AA4BA,MAAM,CAAC,OAAO,UAAU,eAAe,gCA0DtC"}
1
+ {"version":3,"file":"dimensions-panel.d.ts","sourceRoot":"","sources":["../src/dimensions-panel.tsx"],"names":[],"mappings":"AA6BA,MAAM,CAAC,OAAO,UAAU,eAAe,gCA0DtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"font-families.d.ts","sourceRoot":"","sources":["../src/font-families.tsx"],"names":[],"mappings":"AAwHA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,EAAE,GAAG,KAAK,EAAE;;CAAA,+BAMjD"}
1
+ {"version":3,"file":"font-families.d.ts","sourceRoot":"","sources":["../src/font-families.tsx"],"names":[],"mappings":"AAuHA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,EAAE,GAAG,KAAK,EAAE;;CAAA,+BAMjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"font-collection.d.ts","sourceRoot":"","sources":["../../src/font-library/font-collection.tsx"],"names":[],"mappings":"AAoEA,iBAAS,cAAc,CAAE,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAqflD;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"font-collection.d.ts","sourceRoot":"","sources":["../../src/font-library/font-collection.tsx"],"names":[],"mappings":"AAoEA,iBAAS,cAAc,CAAE,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAoflD;AAED,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"installed-fonts.d.ts","sourceRoot":"","sources":["../../src/font-library/installed-fonts.tsx"],"names":[],"mappings":"AA4CA,iBAAS,cAAc,gCAwatB;AAwED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"installed-fonts.d.ts","sourceRoot":"","sources":["../../src/font-library/installed-fonts.tsx"],"names":[],"mappings":"AA4CA,iBAAS,cAAc,gCAuatB;AAwED,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../src/palette.tsx"],"names":[],"mappings":"AA4BA,UAAU,YAAY;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,iBAAS,OAAO,CAAE,EAAE,IAAI,EAAE,EAAE,YAAY,+BAoEvC;AAED,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../src/palette.tsx"],"names":[],"mappings":"AA0BA,UAAU,YAAY;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,iBAAS,OAAO,CAAE,EAAE,IAAI,EAAE,EAAE,YAAY,+BAoEvC;AAED,eAAe,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"preview-wrapper.d.ts","sourceRoot":"","sources":["../src/preview-wrapper.tsx"],"names":[],"mappings":"AA0BA,UAAU,mBAAmB;IAC5B,QAAQ,EACL,CAAE,CAAE,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAM,KAAK,CAAC,SAAS,CAAE,GAC/D,CAAE,CAAE,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAM,KAAK,CAAC,SAAS,CAAE,EAAE,CAAC;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,iBAAS,cAAc,CAAE,EACxB,QAAQ,EACR,KAAK,EACL,SAAS,EACT,aAAa,GACb,EAAE,mBAAmB,+BA8FrB;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"preview-wrapper.d.ts","sourceRoot":"","sources":["../src/preview-wrapper.tsx"],"names":[],"mappings":"AA+BA,UAAU,mBAAmB;IAC5B,QAAQ,EACL,CAAE,CAAE,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAM,KAAK,CAAC,SAAS,CAAE,GAC/D,CAAE,CAAE,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAM,KAAK,CAAC,SAAS,CAAE,EAAE,CAAC;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,iBAAS,cAAc,CAAE,EACxB,QAAQ,EACR,KAAK,EACL,SAAS,EACT,aAAa,GACb,EAAE,mBAAmB,+BA+FrB;AAED,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/global-styles-ui",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "Global Styles UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -44,22 +44,22 @@
44
44
  },
45
45
  "react-native": "src/index",
46
46
  "dependencies": {
47
- "@wordpress/a11y": "^4.44.0",
48
- "@wordpress/api-fetch": "^7.44.0",
49
- "@wordpress/base-styles": "^6.20.0",
50
- "@wordpress/block-editor": "^15.17.0",
51
- "@wordpress/blocks": "^15.17.0",
52
- "@wordpress/components": "^32.6.0",
53
- "@wordpress/compose": "^7.44.0",
54
- "@wordpress/core-data": "^7.44.0",
55
- "@wordpress/data": "^10.44.0",
56
- "@wordpress/date": "^5.44.0",
57
- "@wordpress/element": "^6.44.0",
58
- "@wordpress/global-styles-engine": "^1.11.0",
59
- "@wordpress/i18n": "^6.17.0",
60
- "@wordpress/icons": "^12.2.0",
61
- "@wordpress/keycodes": "^4.44.0",
62
- "@wordpress/private-apis": "^1.44.0",
47
+ "@wordpress/a11y": "^4.45.0",
48
+ "@wordpress/api-fetch": "^7.45.0",
49
+ "@wordpress/base-styles": "^7.0.0",
50
+ "@wordpress/block-editor": "^15.18.0",
51
+ "@wordpress/blocks": "^15.18.0",
52
+ "@wordpress/components": "^33.0.0",
53
+ "@wordpress/compose": "^7.45.0",
54
+ "@wordpress/core-data": "^7.45.0",
55
+ "@wordpress/data": "^10.45.0",
56
+ "@wordpress/date": "^5.45.0",
57
+ "@wordpress/element": "^6.45.0",
58
+ "@wordpress/global-styles-engine": "^1.12.0",
59
+ "@wordpress/i18n": "^6.18.0",
60
+ "@wordpress/icons": "^13.0.0",
61
+ "@wordpress/keycodes": "^4.45.0",
62
+ "@wordpress/private-apis": "^1.45.0",
63
63
  "change-case": "^4.1.2",
64
64
  "clsx": "^2.1.0",
65
65
  "colord": "^2.7.0"
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "b862d8c84121a47bbeff882f6c87e61681ce2e0d"
74
+ "gitHead": "8c229eaed0e88c9827e2da3d73a78f9ddd77714b"
75
75
  }
@@ -22,6 +22,7 @@ const DEFAULT_CONTROLS = {
22
22
  blockGap: true,
23
23
  height: true,
24
24
  minHeight: true,
25
+ minWidth: true,
25
26
  width: true,
26
27
  childLayout: false,
27
28
  };
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import {
6
- __experimentalText as Text,
6
+ __experimentalText as WCText,
7
7
  __experimentalItemGroup as ItemGroup,
8
8
  __experimentalVStack as VStack,
9
9
  __experimentalHStack as HStack,
@@ -65,7 +65,6 @@ function FontFamiliesInner() {
65
65
  defaultTabId={ modalTabOpen }
66
66
  />
67
67
  ) }
68
-
69
68
  <VStack spacing={ 2 }>
70
69
  <HStack justify="space-between">
71
70
  <Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>
@@ -90,11 +89,11 @@ function FontFamiliesInner() {
90
89
  ) }
91
90
  { ! hasFonts && (
92
91
  <>
93
- <Text as="p">
92
+ <WCText as="p">
94
93
  { hasInstalledFonts
95
94
  ? __( 'No fonts activated.' )
96
95
  : __( 'No fonts installed.' ) }
97
- </Text>
96
+ </WCText>
98
97
  <Button
99
98
  className="global-styles-ui-font-families__manage-fonts"
100
99
  variant="secondary"
@@ -4,7 +4,7 @@
4
4
  import { _n, sprintf, isRTL } from '@wordpress/i18n';
5
5
  import {
6
6
  useNavigator,
7
- __experimentalText as Text,
7
+ __experimentalText as WCText,
8
8
  Button,
9
9
  Flex,
10
10
  FlexItem,
@@ -52,7 +52,7 @@ function FontCard( {
52
52
  <FontDemo font={ font } />
53
53
  <Flex justify="flex-end">
54
54
  <FlexItem>
55
- <Text className="font-library__font-card__count">
55
+ <WCText className="font-library__font-card__count">
56
56
  { variantsText ||
57
57
  sprintf(
58
58
  /* translators: %d: Number of font variants. */
@@ -63,7 +63,7 @@ function FontCard( {
63
63
  ),
64
64
  variantsCount
65
65
  ) }
66
- </Text>
66
+ </WCText>
67
67
  </FlexItem>
68
68
  <FlexItem>
69
69
  <Icon icon={ isRTL() ? chevronLeft : chevronRight } />
@@ -10,7 +10,7 @@ import {
10
10
  } from '@wordpress/element';
11
11
  import {
12
12
  __experimentalSpacer as Spacer,
13
- __experimentalText as Text,
13
+ __experimentalText as WCText,
14
14
  __experimentalHStack as HStack,
15
15
  __experimentalVStack as VStack,
16
16
  Navigator,
@@ -285,7 +285,6 @@ function FontCollection( { slug }: { slug: string } ) {
285
285
  <ProgressBar />
286
286
  </div>
287
287
  ) }
288
-
289
288
  { ! isLoading && selectedCollection && (
290
289
  <>
291
290
  <Navigator
@@ -298,9 +297,9 @@ function FontCollection( { slug }: { slug: string } ) {
298
297
  <Heading level={ 2 } size={ 13 }>
299
298
  { selectedCollection.name }
300
299
  </Heading>
301
- <Text>
300
+ <WCText>
302
301
  { selectedCollection.description }
303
- </Text>
302
+ </WCText>
304
303
  </VStack>
305
304
  <ActionsComponent />
306
305
  </HStack>
@@ -335,11 +334,11 @@ function FontCollection( { slug }: { slug: string } ) {
335
334
 
336
335
  { !! selectedCollection?.font_families?.length &&
337
336
  ! fonts.length && (
338
- <Text>
337
+ <WCText>
339
338
  { __(
340
339
  'No fonts found. Try with a different search term.'
341
340
  ) }
342
- </Text>
341
+ </WCText>
343
342
  ) }
344
343
 
345
344
  <div className="font-library__fonts-grid__main">
@@ -411,9 +410,9 @@ function FontCollection( { slug }: { slug: string } ) {
411
410
  </>
412
411
  ) }
413
412
  <Spacer margin={ 4 } />
414
- <Text>
413
+ <WCText>
415
414
  { __( 'Select font variants to install.' ) }
416
- </Text>
415
+ </WCText>
417
416
  <Spacer margin={ 4 } />
418
417
  <CheckboxControl
419
418
  className="font-library__select-all"
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { __experimentalText as Text } from '@wordpress/components';
4
+ import { __experimentalText as WCText } from '@wordpress/components';
5
5
  import { useContext, useEffect, useState, useRef } from '@wordpress/element';
6
6
  import type { FontFamily, FontFace } from '@wordpress/core-data';
7
7
 
@@ -109,12 +109,12 @@ function FontDemo( { font, text }: FontDemoProps ) {
109
109
  className="font-library__font-variant_demo-image"
110
110
  />
111
111
  ) : (
112
- <Text
112
+ <WCText
113
113
  style={ textDemoStyle }
114
114
  className="font-library__font-variant_demo-text"
115
115
  >
116
116
  { text }
117
- </Text>
117
+ </WCText>
118
118
  ) }
119
119
  </div>
120
120
  );
@@ -7,7 +7,7 @@ import {
7
7
  Card,
8
8
  CardBody,
9
9
  __experimentalHeading as Heading,
10
- __experimentalText as Text,
10
+ __experimentalText as WCText,
11
11
  __experimentalSpacer as Spacer,
12
12
  } from '@wordpress/components';
13
13
 
@@ -28,17 +28,17 @@ function GoogleFontsConfirmDialog() {
28
28
  { __( 'Connect to Google Fonts' ) }
29
29
  </Heading>
30
30
  <Spacer margin={ 6 } />
31
- <Text as="p">
31
+ <WCText as="p">
32
32
  { __(
33
33
  'To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.'
34
34
  ) }
35
- </Text>
35
+ </WCText>
36
36
  <Spacer margin={ 3 } />
37
- <Text as="p">
37
+ <WCText as="p">
38
38
  { __(
39
39
  'You can alternatively upload files directly on the Upload tab.'
40
40
  ) }
41
- </Text>
41
+ </WCText>
42
42
  <Spacer margin={ 6 } />
43
43
  <Button
44
44
  __next40pxDefaultSize
@@ -9,7 +9,7 @@ import {
9
9
  Navigator,
10
10
  useNavigator,
11
11
  __experimentalSpacer as Spacer,
12
- __experimentalText as Text,
12
+ __experimentalText as WCText,
13
13
  __experimentalVStack as VStack,
14
14
  Flex,
15
15
  Notice,
@@ -238,7 +238,6 @@ function InstalledFonts() {
238
238
  <ProgressBar />
239
239
  </div>
240
240
  ) }
241
-
242
241
  { ! isResolvingLibrary && (
243
242
  <>
244
243
  <Navigator
@@ -257,9 +256,9 @@ function InstalledFonts() {
257
256
  </Notice>
258
257
  ) }
259
258
  { ! hasFonts && (
260
- <Text as="p">
259
+ <WCText as="p">
261
260
  { __( 'No fonts installed.' ) }
262
- </Text>
261
+ </WCText>
263
262
  ) }
264
263
  { baseThemeFonts.length > 0 && (
265
264
  <VStack>
@@ -395,11 +394,11 @@ function InstalledFonts() {
395
394
  </>
396
395
  ) }
397
396
  <Spacer margin={ 4 } />
398
- <Text>
397
+ <WCText>
399
398
  { __(
400
399
  'Choose font variants. Keep in mind that too many variants could make your site slower.'
401
400
  ) }
402
- </Text>
401
+ </WCText>
403
402
  <Spacer margin={ 4 } />
404
403
  <VStack spacing={ 0 }>
405
404
  <CheckboxControl
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import {
6
- __experimentalText as Text,
6
+ __experimentalText as WCText,
7
7
  __experimentalVStack as VStack,
8
8
  Button,
9
9
  DropZone,
@@ -253,11 +253,11 @@ function UploadFonts() {
253
253
  ) }
254
254
  />
255
255
  ) }
256
- <Text className="font-library__upload-area__text">
256
+ <WCText className="font-library__upload-area__text">
257
257
  { __(
258
258
  'Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.'
259
259
  ) }
260
- </Text>
260
+ </WCText>
261
261
  </VStack>
262
262
  </div>
263
263
  );
@@ -8,7 +8,7 @@ import clsx from 'clsx';
8
8
  */
9
9
  import {
10
10
  __experimentalHStack as HStack,
11
- __experimentalText as Text,
11
+ __experimentalText as WCText,
12
12
  Button,
13
13
  } from '@wordpress/components';
14
14
  import { __, _x, _n, sprintf, isRTL } from '@wordpress/i18n';
@@ -44,7 +44,7 @@ export default function Pagination( {
44
44
  justify="flex-start"
45
45
  className={ clsx( 'global-styles-ui-pagination', className ) }
46
46
  >
47
- <Text
47
+ <WCText
48
48
  variant="muted"
49
49
  className="global-styles-ui-pagination__total"
50
50
  >
@@ -53,7 +53,7 @@ export default function Pagination( {
53
53
  _n( '%d item', '%d items', totalItems ),
54
54
  totalItems
55
55
  ) }
56
- </Text>
56
+ </WCText>
57
57
  <HStack expanded={ false } spacing={ 1 }>
58
58
  <Button
59
59
  variant={ buttonVariant }
@@ -74,14 +74,14 @@ export default function Pagination( {
74
74
  size="compact"
75
75
  />
76
76
  </HStack>
77
- <Text variant="muted">
77
+ <WCText variant="muted">
78
78
  { sprintf(
79
79
  // translators: 1: Current page number. 2: Total number of pages.
80
80
  _x( '%1$d of %2$d', 'paging' ),
81
81
  currentPage,
82
82
  numPages
83
83
  ) }
84
- </Text>
84
+ </WCText>
85
85
  <HStack expanded={ false } spacing={ 1 }>
86
86
  <Button
87
87
  variant={ buttonVariant }
package/src/palette.tsx CHANGED
@@ -5,8 +5,6 @@ import {
5
5
  __experimentalItemGroup as ItemGroup,
6
6
  FlexItem,
7
7
  __experimentalHStack as HStack,
8
- // TODO: Replace this ZStack with ad hoc CSS.
9
- // eslint-disable-next-line @wordpress/use-recommended-components
10
8
  __experimentalZStack as ZStack,
11
9
  __experimentalVStack as VStack,
12
10
  ColorIndicator,
@@ -1,3 +1,8 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import clsx from 'clsx';
5
+
1
6
  /**
2
7
  * WordPress dependencies
3
8
  */
@@ -98,7 +103,9 @@ function PreviewWrapper( {
98
103
  </div>
99
104
  { isReady && (
100
105
  <div
101
- className="global-styles-ui-preview__wrapper"
106
+ className={ clsx( 'global-styles-ui-preview__wrapper', {
107
+ 'is-hoverable': withHoverView,
108
+ } ) }
102
109
  style={ {
103
110
  height: normalizedHeight * ratio,
104
111
  } }
@@ -111,7 +118,6 @@ function PreviewWrapper( {
111
118
  height: normalizedHeight * ratio,
112
119
  width: '100%',
113
120
  background: gradientValue ?? backgroundColor,
114
- cursor: withHoverView ? 'pointer' : undefined,
115
121
  } }
116
122
  initial="start"
117
123
  animate={
@@ -4,7 +4,7 @@
4
4
  import { __ } from '@wordpress/i18n';
5
5
  // @ts-expect-error: Not typed yet.
6
6
  import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
7
- import { __experimentalText as Text } from '@wordpress/components';
7
+ import { __experimentalText as WCText } from '@wordpress/components';
8
8
 
9
9
  /**
10
10
  * Internal dependencies
@@ -24,9 +24,9 @@ function ScreenBackground() {
24
24
  <ScreenHeader
25
25
  title={ __( 'Background' ) }
26
26
  description={
27
- <Text>
27
+ <WCText>
28
28
  { __( "Set styles for the site's background." ) }
29
- </Text>
29
+ </WCText>
30
30
  }
31
31
  />
32
32
  { hasBackgroundPanel && <BackgroundPanel /> }
@@ -7,7 +7,7 @@ import {
7
7
  FlexItem,
8
8
  SearchControl,
9
9
  __experimentalHStack as HStack,
10
- __experimentalText as Text,
10
+ __experimentalText as WCText,
11
11
  } from '@wordpress/components';
12
12
  import { useSelect } from '@wordpress/data';
13
13
  import {
@@ -151,9 +151,9 @@ function BlockList( { filterValue }: BlockListProps ) {
151
151
  role="list"
152
152
  >
153
153
  { filteredBlockTypes.length === 0 ? (
154
- <Text align="center" as="p">
154
+ <WCText align="center" as="p">
155
155
  { __( 'No blocks found.' ) }
156
- </Text>
156
+ </WCText>
157
157
  ) : (
158
158
  filteredBlockTypes.map( ( block ) => (
159
159
  <BlockMenuItem
@@ -7,7 +7,7 @@ import {
7
7
  __experimentalSpacer as Spacer,
8
8
  __experimentalHeading as Heading,
9
9
  __experimentalView as View,
10
- __experimentalText as Text,
10
+ __experimentalText as WCText,
11
11
  Navigator,
12
12
  } from '@wordpress/components';
13
13
  import { isRTL, __ } from '@wordpress/i18n';
@@ -73,9 +73,9 @@ export function ScreenHeader( {
73
73
  </Spacer>
74
74
  </HStack>
75
75
  { description && (
76
- <Text className="global-styles-ui-header__description">
76
+ <WCText className="global-styles-ui-header__description">
77
77
  { description }
78
- </Text>
78
+ </WCText>
79
79
  ) }
80
80
  </VStack>
81
81
  </Spacer>
@@ -14,7 +14,7 @@
14
14
 
15
15
  .global-styles-ui-screen-revisions__revision-item {
16
16
  position: relative;
17
- cursor: pointer;
17
+ cursor: var(--wpds-cursor-control);
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
 
package/src/style.scss CHANGED
@@ -7,18 +7,14 @@
7
7
  @use "./size-control/style.scss" as *;
8
8
  @use "./variations/style.scss" as *;
9
9
 
10
- .global-styles-ui-preview {
11
- display: flex;
12
- align-items: center;
13
- justify-content: center;
14
- line-height: 1;
15
- cursor: pointer;
16
- }
17
-
18
10
  .global-styles-ui-preview__wrapper {
19
11
  max-width: 100%;
20
12
  display: block;
21
13
  width: 100%;
14
+
15
+ &.is-hoverable {
16
+ cursor: var(--wpds-cursor-control);
17
+ }
22
18
  }
23
19
 
24
20
  .global-styles-ui-typography-preview {
@@ -4,7 +4,7 @@
4
4
  .global-styles-ui-variations_item {
5
5
  box-sizing: border-box;
6
6
  // To round the outline in Windows 10 high contrast mode.
7
- cursor: pointer;
7
+ cursor: var(--wpds-cursor-control);
8
8
 
9
9
  .global-styles-ui-variations_item-preview {
10
10
  border-radius: $radius-small;