@wordpress/components 30.6.1-next.ff1cebbba.0 → 30.7.1-next.36001005c.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 (53) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/build/color-palette/styles.js +2 -12
  3. package/build/color-palette/styles.js.map +2 -2
  4. package/build/date-time/date/styles.js +9 -9
  5. package/build/date-time/date/styles.js.map +2 -2
  6. package/build/palette-edit/styles.js +9 -9
  7. package/build/palette-edit/styles.js.map +2 -2
  8. package/build/popover/index.js +13 -2
  9. package/build/popover/index.js.map +2 -2
  10. package/build/tools-panel/styles.js +14 -22
  11. package/build/tools-panel/styles.js.map +2 -2
  12. package/build/utils/base-label.js +12 -12
  13. package/build/utils/base-label.js.map +3 -3
  14. package/build/utils/config-values.js +2 -0
  15. package/build/utils/config-values.js.map +2 -2
  16. package/build-module/color-palette/styles.js +2 -12
  17. package/build-module/color-palette/styles.js.map +2 -2
  18. package/build-module/date-time/date/styles.js +9 -9
  19. package/build-module/date-time/date/styles.js.map +2 -2
  20. package/build-module/palette-edit/styles.js +9 -9
  21. package/build-module/palette-edit/styles.js.map +2 -2
  22. package/build-module/popover/index.js +13 -2
  23. package/build-module/popover/index.js.map +2 -2
  24. package/build-module/tools-panel/styles.js +14 -22
  25. package/build-module/tools-panel/styles.js.map +2 -2
  26. package/build-module/utils/base-label.js +2 -12
  27. package/build-module/utils/base-label.js.map +2 -2
  28. package/build-module/utils/config-values.js +2 -0
  29. package/build-module/utils/config-values.js.map +2 -2
  30. package/build-style/style-rtl.css +8 -3
  31. package/build-style/style.css +8 -3
  32. package/build-types/color-palette/styles.d.ts.map +1 -1
  33. package/build-types/date-time/date/styles.d.ts.map +1 -1
  34. package/build-types/popover/index.d.ts.map +1 -1
  35. package/build-types/utils/base-label.d.ts.map +1 -1
  36. package/build-types/utils/config-values.d.ts +1 -0
  37. package/package.json +20 -20
  38. package/src/button/style.scss +4 -1
  39. package/src/color-palette/styles.ts +2 -1
  40. package/src/date-time/date/styles.ts +1 -0
  41. package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -4
  42. package/src/dropdown-menu/style.scss +1 -0
  43. package/src/menu-group/style.scss +1 -1
  44. package/src/menu-item/style.scss +1 -0
  45. package/src/palette-edit/styles.ts +1 -1
  46. package/src/panel/style.scss +1 -1
  47. package/src/popover/index.tsx +23 -2
  48. package/src/tab-panel/style.scss +1 -1
  49. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +4 -4
  50. package/src/tools-panel/styles.ts +2 -2
  51. package/src/utils/base-label.ts +6 -1
  52. package/src/utils/config-values.js +1 -0
  53. package/tsconfig.tsbuildinfo +1 -1
@@ -257,6 +257,7 @@
257
257
  text-decoration: none;
258
258
  font-family: inherit;
259
259
  font-size: 13px;
260
+ font-weight: 499;
260
261
  margin: 0;
261
262
  border: 0;
262
263
  cursor: pointer;
@@ -436,6 +437,7 @@ p + .components-button.is-tertiary {
436
437
  background: none;
437
438
  outline: none;
438
439
  text-align: left;
440
+ font-weight: 400;
439
441
  color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
440
442
  text-decoration: underline;
441
443
  }
@@ -535,6 +537,7 @@ p + .components-button.is-tertiary {
535
537
  .components-button svg {
536
538
  fill: currentColor;
537
539
  outline: none;
540
+ flex-shrink: 0;
538
541
  }
539
542
  @media (forced-colors: active) {
540
543
  .components-button svg {
@@ -1596,6 +1599,7 @@ body.is-dragging-components-draggable {
1596
1599
  outline: none;
1597
1600
  cursor: pointer;
1598
1601
  white-space: nowrap;
1602
+ font-weight: 400;
1599
1603
  }
1600
1604
  .components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator,
1601
1605
  .components-dropdown-menu__menu .components-menu-item.has-separator {
@@ -2142,13 +2146,14 @@ body.is-dragging-components-draggable {
2142
2146
  color: #757575;
2143
2147
  text-transform: uppercase;
2144
2148
  font-size: 11px;
2145
- font-weight: 500;
2149
+ font-weight: 499;
2146
2150
  white-space: nowrap;
2147
2151
  }
2148
2152
 
2149
2153
  .components-menu-item__button,
2150
2154
  .components-menu-item__button.components-button {
2151
2155
  width: 100%;
2156
+ font-weight: 400;
2152
2157
  }
2153
2158
  .components-menu-item__button[role=menuitemradio] .components-menu-item__item:only-child, .components-menu-item__button[role=menuitemcheckbox] .components-menu-item__item:only-child,
2154
2159
  .components-menu-item__button.components-button[role=menuitemradio] .components-menu-item__item:only-child,
@@ -2594,7 +2599,7 @@ body.is-dragging-components-draggable {
2594
2599
  padding: 16px 48px 16px 16px;
2595
2600
  outline: none;
2596
2601
  width: 100%;
2597
- font-weight: 500;
2602
+ font-weight: 499;
2598
2603
  text-align: left;
2599
2604
  color: #1e1e1e;
2600
2605
  border: none;
@@ -3421,7 +3426,7 @@ body.lockscroll {
3421
3426
  cursor: pointer;
3422
3427
  padding: 3px 16px;
3423
3428
  margin-left: 0;
3424
- font-weight: 500;
3429
+ font-weight: 400;
3425
3430
  }
3426
3431
  .components-tab-panel__tabs-item:focus:not(:disabled) {
3427
3432
  position: relative;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/color-palette/styles.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY;;;;;;;;;UAQxB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/color-palette/styles.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY;;;;;;;;;UAQxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/date-time/date/styles.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,OAAO;;SAO8B,MAC/C,WAAW;yGANb,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;UAMrB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;UAEnC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;UAE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;UAQ5B,CAAC;AAEF,eAAO,MAAM,QAAQ;;SAvB6B,MAC/C,WAAW;yGA4Bb,CAAC;AAEF,eAAO,MAAM,SAAS;;SA/B4B,MAC/C,WAAW;yGAkCb,CAAC;AAEF,eAAO,MAAM,SAAS;;;YAIb,MAAM;gBACF,OAAO;aACV,OAAO;eACL,OAAO;UAmElB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/date-time/date/styles.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,OAAO;;SAO8B,MAC/C,WAAW;yGANb,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;UAMrB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;UAEnC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;UAE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;UAQ5B,CAAC;AAEF,eAAO,MAAM,QAAQ;;SAvB6B,MAC/C,WAAW;yGA4Bb,CAAC;AAEF,eAAO,MAAM,SAAS;;SA/B4B,MAC/C,WAAW;yGAkCb,CAAC;AAEF,eAAO,MAAM,SAAS;;;YAIb,MAAM;gBACF,OAAO;aACV,OAAO;eACL,OAAO;UAoElB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.tsx"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACX,YAAY,EAGZ,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAIjB;;;;GAIG;AACH,eAAO,MAAM,SAAS,YAAY,CAAC;AAuanC,eAAO,MAAM,WAAW,6GAWvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,OAAO;IAGlB;;OAEG;;;;IAIH;;;;OAIG;;;;CAKJ,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.tsx"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACX,YAAY,EAGZ,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAIjB;;;;GAIG;AACH,eAAO,MAAM,SAAS,YAAY,CAAC;AA4bnC,eAAO,MAAM,WAAW,6GAWvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,OAAO;IAGlB;;OAEG;;;;IAIH;;;;OAIG;;;;CAKJ,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"base-label.d.ts","sourceRoot":"","sources":["../../src/utils/base-label.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB,2CAK/B,CAAC"}
1
+ {"version":3,"file":"base-label.d.ts","sourceRoot":"","sources":["../../src/utils/base-label.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,mBAAmB,2CAK/B,CAAC"}
@@ -37,6 +37,7 @@ declare const _default: {
37
37
  fontSizeXSmall: string;
38
38
  fontLineHeightBase: string;
39
39
  fontWeight: string;
40
+ fontWeightMedium: string;
40
41
  fontWeightHeading: string;
41
42
  gridBase: string;
42
43
  cardPaddingXSmall: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "30.6.1-next.ff1cebbba.0",
3
+ "version": "30.7.1-next.36001005c.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -54,24 +54,24 @@
54
54
  "@types/gradient-parser": "1.1.0",
55
55
  "@types/highlight-words-core": "1.2.1",
56
56
  "@use-gesture/react": "^10.3.1",
57
- "@wordpress/a11y": "^4.32.1-next.ff1cebbba.0",
58
- "@wordpress/base-styles": "^6.8.1-next.ff1cebbba.0",
59
- "@wordpress/compose": "^7.32.1-next.ff1cebbba.0",
60
- "@wordpress/date": "^5.32.1-next.ff1cebbba.0",
61
- "@wordpress/deprecated": "^4.32.1-next.ff1cebbba.0",
62
- "@wordpress/dom": "^4.32.1-next.ff1cebbba.0",
63
- "@wordpress/element": "^6.32.1-next.ff1cebbba.0",
64
- "@wordpress/escape-html": "^3.32.1-next.ff1cebbba.0",
65
- "@wordpress/hooks": "^4.32.1-next.ff1cebbba.0",
66
- "@wordpress/html-entities": "^4.32.1-next.ff1cebbba.0",
67
- "@wordpress/i18n": "^6.5.1-next.ff1cebbba.0",
68
- "@wordpress/icons": "^11.0.1-next.ff1cebbba.0",
69
- "@wordpress/is-shallow-equal": "^5.32.1-next.ff1cebbba.0",
70
- "@wordpress/keycodes": "^4.32.1-next.ff1cebbba.0",
71
- "@wordpress/primitives": "^4.32.1-next.ff1cebbba.0",
72
- "@wordpress/private-apis": "^1.32.1-next.ff1cebbba.0",
73
- "@wordpress/rich-text": "^7.32.1-next.ff1cebbba.0",
74
- "@wordpress/warning": "^3.32.1-next.ff1cebbba.0",
57
+ "@wordpress/a11y": "^4.33.1-next.36001005c.0",
58
+ "@wordpress/base-styles": "^6.10.1-next.36001005c.0",
59
+ "@wordpress/compose": "^7.33.1-next.36001005c.0",
60
+ "@wordpress/date": "^5.33.1-next.36001005c.0",
61
+ "@wordpress/deprecated": "^4.33.1-next.36001005c.0",
62
+ "@wordpress/dom": "^4.33.1-next.36001005c.0",
63
+ "@wordpress/element": "^6.33.1-next.36001005c.0",
64
+ "@wordpress/escape-html": "^3.33.1-next.36001005c.0",
65
+ "@wordpress/hooks": "^4.33.1-next.36001005c.0",
66
+ "@wordpress/html-entities": "^4.33.1-next.36001005c.0",
67
+ "@wordpress/i18n": "^6.6.1-next.36001005c.0",
68
+ "@wordpress/icons": "^11.0.1-next.36001005c.0",
69
+ "@wordpress/is-shallow-equal": "^5.33.1-next.36001005c.0",
70
+ "@wordpress/keycodes": "^4.33.1-next.36001005c.0",
71
+ "@wordpress/primitives": "^4.33.1-next.36001005c.0",
72
+ "@wordpress/private-apis": "^1.33.1-next.36001005c.0",
73
+ "@wordpress/rich-text": "^7.33.1-next.36001005c.0",
74
+ "@wordpress/warning": "^3.33.1-next.36001005c.0",
75
75
  "change-case": "^4.1.2",
76
76
  "clsx": "^2.1.1",
77
77
  "colord": "^2.7.0",
@@ -97,5 +97,5 @@
97
97
  "publishConfig": {
98
98
  "access": "public"
99
99
  },
100
- "gitHead": "c5b659710aff01d40d2eb97b211eb2cec9c07d3b"
100
+ "gitHead": "b73a8a22e779c59efb8f911e32b681652f237d60"
101
101
  }
@@ -15,13 +15,14 @@
15
15
  text-decoration: none;
16
16
  font-family: inherit;
17
17
  font-size: $default-font-size;
18
+ font-weight: $font-weight-medium;
18
19
  margin: 0;
19
20
  border: 0;
20
21
  cursor: pointer;
21
22
  -webkit-appearance: none;
22
23
  background: none;
23
24
 
24
- @media not (prefers-reduced-motion) {
25
+ @media not ( prefers-reduced-motion ) {
25
26
  transition: box-shadow 0.1s linear;
26
27
  }
27
28
 
@@ -251,6 +252,7 @@
251
252
  background: none;
252
253
  outline: none;
253
254
  text-align: left;
255
+ font-weight: $font-weight-regular;
254
256
  color: $components-color-accent;
255
257
  text-decoration: underline;
256
258
 
@@ -385,6 +387,7 @@
385
387
  svg {
386
388
  fill: currentColor;
387
389
  outline: none;
390
+ flex-shrink: 0;
388
391
 
389
392
  // Optimize for high contrast modes.
390
393
  // See also https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/.
@@ -7,11 +7,12 @@ import styled from '@emotion/styled';
7
7
  * Internal dependencies
8
8
  */
9
9
  import { Heading } from '../heading';
10
+ import { CONFIG } from '../utils';
10
11
 
11
12
  export const ColorHeading = styled( Heading )`
12
13
  text-transform: uppercase;
13
14
  line-height: 24px;
14
- font-weight: 500;
15
+ font-weight: ${ CONFIG.fontWeightMedium };
15
16
  &&& {
16
17
  font-size: 11px;
17
18
  margin-bottom: 0;
@@ -79,6 +79,7 @@ export const DayButton = styled( Button, {
79
79
  border-radius: ${ CONFIG.radiusRound };
80
80
  height: ${ space( 7 ) };
81
81
  width: ${ space( 7 ) };
82
+ font-weight: 400;
82
83
 
83
84
  ${ ( props ) =>
84
85
  props.isSelected &&
@@ -74,7 +74,7 @@ exports[`DimensionControl rendering renders with custom sizes 1`] = `
74
74
 
75
75
  .emotion-12.emotion-12.emotion-12 {
76
76
  font-size: 11px;
77
- font-weight: 500;
77
+ font-weight: 499;
78
78
  line-height: 1.4;
79
79
  text-transform: uppercase;
80
80
  box-sizing: border-box;
@@ -356,7 +356,7 @@ exports[`DimensionControl rendering renders with defaults 1`] = `
356
356
 
357
357
  .emotion-12.emotion-12.emotion-12 {
358
358
  font-size: 11px;
359
- font-weight: 500;
359
+ font-weight: 499;
360
360
  line-height: 1.4;
361
361
  text-transform: uppercase;
362
362
  box-sizing: border-box;
@@ -648,7 +648,7 @@ exports[`DimensionControl rendering renders with icon and custom icon label 1`]
648
648
 
649
649
  .emotion-12.emotion-12.emotion-12 {
650
650
  font-size: 11px;
651
- font-weight: 500;
651
+ font-weight: 499;
652
652
  line-height: 1.4;
653
653
  text-transform: uppercase;
654
654
  box-sizing: border-box;
@@ -952,7 +952,7 @@ exports[`DimensionControl rendering renders with icon and default icon label 1`]
952
952
 
953
953
  .emotion-12.emotion-12.emotion-12 {
954
954
  font-size: 11px;
955
- font-weight: 500;
955
+ font-weight: 499;
956
956
  line-height: 1.4;
957
957
  text-transform: uppercase;
958
958
  box-sizing: border-box;
@@ -18,6 +18,7 @@
18
18
  outline: none;
19
19
  cursor: pointer;
20
20
  white-space: nowrap;
21
+ font-weight: $font-weight-regular;
21
22
 
22
23
  &.has-separator {
23
24
  margin-top: 6px;
@@ -23,6 +23,6 @@
23
23
  color: $gray-700;
24
24
  text-transform: uppercase;
25
25
  font-size: 11px;
26
- font-weight: 500;
26
+ font-weight: $font-weight-medium;
27
27
  white-space: nowrap;
28
28
  }
@@ -6,6 +6,7 @@
6
6
  .components-menu-item__button,
7
7
  .components-menu-item__button.components-button {
8
8
  width: 100%;
9
+ font-weight: $font-weight-regular;
9
10
 
10
11
  &[role="menuitemradio"],
11
12
  &[role="menuitemcheckbox"] {
@@ -52,7 +52,7 @@ export const NameContainer = styled.div`
52
52
  export const PaletteHeading = styled( Heading )`
53
53
  text-transform: uppercase;
54
54
  line-height: ${ space( 6 ) };
55
- font-weight: 500;
55
+ font-weight: ${ CONFIG.fontWeightMedium };
56
56
  &&& {
57
57
  font-size: 11px;
58
58
  margin-bottom: 0;
@@ -89,7 +89,7 @@
89
89
  padding: $grid-unit-20 $grid-unit-60 $grid-unit-20 $grid-unit-20;
90
90
  outline: none;
91
91
  width: 100%;
92
- font-weight: 500;
92
+ font-weight: $font-weight-medium;
93
93
  text-align: left;
94
94
  color: $gray-900;
95
95
  border: none;
@@ -268,9 +268,30 @@ const UnforwardedPopover = (
268
268
  onDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {
269
269
  // Ideally the popover should have just a single onClose prop and
270
270
  // not three props that potentially do the same thing.
271
- if ( type === 'focus-outside' && onFocusOutside ) {
272
- onFocusOutside( event );
271
+ if ( type === 'focus-outside' ) {
272
+ // Check if this blur event is actually relevant to this popover
273
+ const blurTarget = event?.target as Element;
274
+ const referenceElement = refs.reference.current;
275
+ const floatingElement = refs.floating.current;
276
+
277
+ // Check if blur is from this popover's reference element or its floating content
278
+ const isBlurFromThisPopover =
279
+ ( referenceElement &&
280
+ 'contains' in referenceElement &&
281
+ referenceElement.contains( blurTarget ) ) ||
282
+ floatingElement?.contains( blurTarget );
283
+ // Only proceed if the blur is actually from this popover
284
+ if ( ! isBlurFromThisPopover ) {
285
+ return;
286
+ }
287
+ // Call onFocusOutside if defined or call onClose.
288
+ if ( onFocusOutside ) {
289
+ onFocusOutside( event );
290
+ } else if ( onClose ) {
291
+ onClose();
292
+ }
273
293
  } else if ( onClose ) {
294
+ // onClose should be called for other event types if it exists.
274
295
  onClose();
275
296
  }
276
297
  };
@@ -21,7 +21,7 @@
21
21
  cursor: pointer;
22
22
  padding: 3px $grid-unit-20; // Use padding to offset the is-active border, this benefits Windows High Contrast mode
23
23
  margin-left: 0;
24
- font-weight: 500;
24
+ font-weight: $font-weight-regular;
25
25
 
26
26
  &:focus:not(:disabled) {
27
27
  position: relative;
@@ -26,7 +26,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
26
26
 
27
27
  .emotion-6 {
28
28
  font-size: 11px;
29
- font-weight: 500;
29
+ font-weight: 499;
30
30
  line-height: 1.4;
31
31
  text-transform: uppercase;
32
32
  display: block;
@@ -391,7 +391,7 @@ exports[`ToggleGroupControl controlled should render correctly with text options
391
391
 
392
392
  .emotion-6 {
393
393
  font-size: 11px;
394
- font-weight: 500;
394
+ font-weight: 499;
395
395
  line-height: 1.4;
396
396
  text-transform: uppercase;
397
397
  display: block;
@@ -660,7 +660,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
660
660
 
661
661
  .emotion-6 {
662
662
  font-size: 11px;
663
- font-weight: 500;
663
+ font-weight: 499;
664
664
  line-height: 1.4;
665
665
  text-transform: uppercase;
666
666
  display: block;
@@ -1019,7 +1019,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with text optio
1019
1019
 
1020
1020
  .emotion-6 {
1021
1021
  font-size: 11px;
1022
- font-weight: 500;
1022
+ font-weight: 499;
1023
1023
  line-height: 1.4;
1024
1024
  text-transform: uppercase;
1025
1025
  display: block;
@@ -86,7 +86,7 @@ export const ToolsPanelHeader = css`
86
86
 
87
87
  export const ToolsPanelHeading = css`
88
88
  font-size: inherit;
89
- font-weight: 500;
89
+ font-weight: ${ CONFIG.fontWeightMedium };
90
90
  line-height: normal;
91
91
 
92
92
  /* Required to meet specificity requirements to ensure zero margin */
@@ -150,7 +150,7 @@ export const DropdownMenu = css`
150
150
  export const ResetLabel = styled.span`
151
151
  color: ${ COLORS.theme.accentDarker10 };
152
152
  font-size: 11px;
153
- font-weight: 500;
153
+ font-weight: ${ CONFIG.fontWeightMedium };
154
154
  line-height: 1.4;
155
155
  ${ rtl( { marginLeft: space( 3 ) } ) }
156
156
  text-transform: uppercase;
@@ -3,11 +3,16 @@
3
3
  */
4
4
  import { css } from '@emotion/react';
5
5
 
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import CONFIG from './config-values.js';
10
+
6
11
  // This is a very low-level mixin which you shouldn't have to use directly.
7
12
  // Try to use BaseControl's StyledLabel or BaseControl.VisualLabel if you can.
8
13
  export const baseLabelTypography = css`
9
14
  font-size: 11px;
10
- font-weight: 500;
15
+ font-weight: ${ CONFIG.fontWeightMedium };
11
16
  line-height: 1.4;
12
17
  text-transform: uppercase;
13
18
  `;
@@ -51,6 +51,7 @@ export default Object.assign( {}, CONTROL_PROPS, {
51
51
  fontSizeXSmall: 'calc(0.75 * 13px)',
52
52
  fontLineHeightBase: '1.4',
53
53
  fontWeight: 'normal',
54
+ fontWeightMedium: '499', // ensures fallback to 400 (instead of 600)
54
55
  fontWeightHeading: '600',
55
56
  gridBase: '4px',
56
57
  cardPaddingXSmall: `${ space( 2 ) }`,