@wordpress/theme 0.3.1-next.8b30e05b0.0 → 0.4.1-next.738bb1424.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 (125) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +114 -40
  3. package/build/color-ramps/{index.js → index.cjs} +8 -8
  4. package/build/color-ramps/lib/{color-utils.js → color-utils.cjs} +2 -2
  5. package/build/color-ramps/lib/{constants.js → constants.cjs} +2 -2
  6. package/build/color-ramps/lib/{default-ramps.js → default-ramps.cjs} +66 -66
  7. package/build/color-ramps/lib/{default-ramps.js.map → default-ramps.cjs.map} +1 -1
  8. package/build/color-ramps/lib/{find-color-with-constraints.js → find-color-with-constraints.cjs} +6 -6
  9. package/build/color-ramps/lib/find-color-with-constraints.cjs.map +7 -0
  10. package/build/color-ramps/lib/{index.js → index.cjs} +6 -6
  11. package/build/color-ramps/lib/index.cjs.map +7 -0
  12. package/build/color-ramps/lib/{ramp-configs.js → ramp-configs.cjs} +1 -1
  13. package/build/color-ramps/lib/{register-color-spaces.js → register-color-spaces.cjs} +1 -1
  14. package/build/color-ramps/lib/{taper-chroma.js → taper-chroma.cjs} +20 -46
  15. package/build/color-ramps/lib/taper-chroma.cjs.map +7 -0
  16. package/build/color-ramps/lib/{types.js → types.cjs} +1 -1
  17. package/build/color-ramps/lib/{utils.js → utils.cjs} +4 -4
  18. package/build/{context.js → context.cjs} +1 -1
  19. package/build/{index.js → index.cjs} +2 -2
  20. package/build/index.cjs.map +7 -0
  21. package/build/{lock-unlock.js → lock-unlock.cjs} +1 -1
  22. package/build/prebuilt/js/{design-tokens.js → design-tokens.cjs} +33 -7
  23. package/build/prebuilt/js/design-tokens.cjs.map +7 -0
  24. package/build/prebuilt/ts/{color-tokens.js → color-tokens.cjs} +36 -14
  25. package/build/prebuilt/ts/color-tokens.cjs.map +7 -0
  26. package/build/{token-id.js → prebuilt/ts/token-types.cjs} +4 -16
  27. package/build/prebuilt/ts/token-types.cjs.map +7 -0
  28. package/build/{private-apis.js → private-apis.cjs} +4 -4
  29. package/build/{theme-provider.js → theme-provider.cjs} +3 -3
  30. package/build/{types.js → types.cjs} +1 -1
  31. package/build/{use-theme-provider-styles.js → use-theme-provider-styles.cjs} +6 -6
  32. package/build-module/color-ramps/index.js +7 -7
  33. package/build-module/color-ramps/lib/color-utils.js +1 -1
  34. package/build-module/color-ramps/lib/constants.js +1 -1
  35. package/build-module/color-ramps/lib/default-ramps.js +65 -65
  36. package/build-module/color-ramps/lib/default-ramps.js.map +1 -1
  37. package/build-module/color-ramps/lib/find-color-with-constraints.js +5 -5
  38. package/build-module/color-ramps/lib/find-color-with-constraints.js.map +2 -2
  39. package/build-module/color-ramps/lib/index.js +5 -5
  40. package/build-module/color-ramps/lib/index.js.map +2 -2
  41. package/build-module/color-ramps/lib/taper-chroma.js +20 -47
  42. package/build-module/color-ramps/lib/taper-chroma.js.map +2 -2
  43. package/build-module/color-ramps/lib/utils.js +3 -3
  44. package/build-module/index.js +1 -1
  45. package/build-module/index.js.map +2 -2
  46. package/build-module/prebuilt/js/design-tokens.js +32 -6
  47. package/build-module/prebuilt/js/design-tokens.js.map +2 -2
  48. package/build-module/prebuilt/ts/color-tokens.js +35 -13
  49. package/build-module/prebuilt/ts/color-tokens.js.map +2 -2
  50. package/build-module/prebuilt/ts/token-types.js +1 -0
  51. package/build-module/private-apis.js +3 -3
  52. package/build-module/theme-provider.js +2 -2
  53. package/build-module/use-theme-provider-styles.js +4 -4
  54. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts +3 -4
  55. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts.map +1 -1
  56. package/build-types/color-ramps/lib/taper-chroma.d.ts +4 -4
  57. package/build-types/color-ramps/lib/taper-chroma.d.ts.map +1 -1
  58. package/build-types/index.d.ts +2 -0
  59. package/build-types/index.d.ts.map +1 -1
  60. package/build-types/prebuilt/ts/color-tokens.d.ts.map +1 -1
  61. package/build-types/prebuilt/ts/token-types.d.ts +49 -0
  62. package/build-types/prebuilt/ts/token-types.d.ts.map +1 -0
  63. package/package.json +15 -7
  64. package/src/color-ramps/lib/default-ramps.ts +65 -65
  65. package/src/color-ramps/lib/find-color-with-constraints.ts +11 -7
  66. package/src/color-ramps/lib/index.ts +4 -4
  67. package/src/color-ramps/lib/taper-chroma.ts +32 -63
  68. package/src/index.ts +2 -1
  69. package/src/prebuilt/css/design-tokens.css +72 -28
  70. package/src/prebuilt/js/design-tokens.js +32 -6
  71. package/src/prebuilt/ts/color-tokens.ts +31 -9
  72. package/src/prebuilt/ts/token-types.ts +125 -0
  73. package/bin/generate-default-ramps/index.ts +0 -49
  74. package/bin/generate-primitive-tokens/index.ts +0 -120
  75. package/bin/terrazzo-plugin-ds-tokens-docs/index.ts +0 -84
  76. package/bin/terrazzo-plugin-figma-ds-token-manager/index.ts +0 -217
  77. package/bin/terrazzo-plugin-figma-ds-token-manager/lib.ts +0 -1
  78. package/bin/terrazzo-plugin-inline-alias-values/index.ts +0 -113
  79. package/bin/terrazzo-plugin-known-wpds-css-variables/index.ts +0 -52
  80. package/build/color-ramps/lib/find-color-with-constraints.js.map +0 -7
  81. package/build/color-ramps/lib/index.js.map +0 -7
  82. package/build/color-ramps/lib/taper-chroma.js.map +0 -7
  83. package/build/index.js.map +0 -7
  84. package/build/prebuilt/js/design-tokens.js.map +0 -7
  85. package/build/prebuilt/json/figma.json +0 -715
  86. package/build/prebuilt/ts/color-tokens.js.map +0 -7
  87. package/build/token-id.js.map +0 -7
  88. package/build/types/css-modules.d.js +0 -1
  89. package/build/types/css-modules.d.js.map +0 -7
  90. package/build-module/prebuilt/json/figma.json +0 -715
  91. package/build-module/token-id.js +0 -6
  92. package/build-module/token-id.js.map +0 -7
  93. package/build-module/types/css-modules.d.js +0 -1
  94. package/build-types/token-id.d.ts +0 -9
  95. package/build-types/token-id.d.ts.map +0 -1
  96. package/docs/ds-tokens.md +0 -150
  97. package/src/prebuilt/json/figma.json +0 -715
  98. package/src/test/token-id.test.ts +0 -12
  99. package/src/token-id.ts +0 -9
  100. package/src/types/css-modules.d.ts +0 -4
  101. package/terrazzo.config.ts +0 -126
  102. package/tokens/border.json +0 -34
  103. package/tokens/color.json +0 -1029
  104. package/tokens/dimension.json +0 -109
  105. package/tokens/elevation.json +0 -201
  106. package/tokens/typography.json +0 -93
  107. package/tsconfig.bin.json +0 -13
  108. package/tsconfig.bin.tsbuildinfo +0 -1
  109. package/tsconfig.json +0 -11
  110. package/tsconfig.src.json +0 -9
  111. package/tsconfig.src.tsbuildinfo +0 -1
  112. /package/build/color-ramps/{index.js.map → index.cjs.map} +0 -0
  113. /package/build/color-ramps/lib/{color-utils.js.map → color-utils.cjs.map} +0 -0
  114. /package/build/color-ramps/lib/{constants.js.map → constants.cjs.map} +0 -0
  115. /package/build/color-ramps/lib/{ramp-configs.js.map → ramp-configs.cjs.map} +0 -0
  116. /package/build/color-ramps/lib/{register-color-spaces.js.map → register-color-spaces.cjs.map} +0 -0
  117. /package/build/color-ramps/lib/{types.js.map → types.cjs.map} +0 -0
  118. /package/build/color-ramps/lib/{utils.js.map → utils.cjs.map} +0 -0
  119. /package/build/{context.js.map → context.cjs.map} +0 -0
  120. /package/build/{lock-unlock.js.map → lock-unlock.cjs.map} +0 -0
  121. /package/build/{private-apis.js.map → private-apis.cjs.map} +0 -0
  122. /package/build/{theme-provider.js.map → theme-provider.cjs.map} +0 -0
  123. /package/build/{types.js.map → types.cjs.map} +0 -0
  124. /package/build/{use-theme-provider-styles.js.map → use-theme-provider-styles.cjs.map} +0 -0
  125. /package/build-module/{types/css-modules.d.js.map → prebuilt/ts/token-types.js.map} +0 -0
@@ -3,20 +3,33 @@
3
3
  * ------------------------------------------- */
4
4
 
5
5
  :root {
6
- --wpds-border-radius-large: 8px; /* Large radius */
7
- --wpds-border-radius-medium: 4px; /* Medium radius */
8
- --wpds-border-radius-small: 2px; /* Small radius */
9
- --wpds-border-radius-x-small: 1px; /* Extra small radius */
10
- --wpds-border-width-focus: 2px; /* Border width for focus ring */
6
+ --wpds-border-radius-surface-lg: 8px; /* Large radius for surfaces */
7
+ --wpds-border-radius-surface-md: 4px; /* Medium radius for surfaces */
8
+ --wpds-border-radius-surface-sm: 2px; /* Small radius for surfaces */
9
+ --wpds-border-radius-surface-xs: 1px; /* Extra small radius for surfaces */
10
+ --wpds-border-width-interactive-focus: 2px; /* Border width for focus ring */
11
+ --wpds-border-width-surface-lg: 8px; /* Large width for surfaces */
12
+ --wpds-border-width-surface-md: 4px; /* Medium width for surfaces */
13
+ --wpds-border-width-surface-sm: 2px; /* Small width for surfaces */
14
+ --wpds-border-width-surface-xs: 1px; /* Extra small width for surfaces */
11
15
  --wpds-color-bg-interactive-brand: #00000000; /* Background color for interactive elements with brand tone and normal emphasis. */
12
- --wpds-color-bg-interactive-brand-active: #f6f8fc; /* Background color for interactive elements with brand tone and normal emphasis that are hovered, focused, or active. */
16
+ --wpds-color-bg-interactive-brand-active: #f6f8fd; /* Background color for interactive elements with brand tone and normal emphasis that are hovered, focused, or active. */
13
17
  --wpds-color-bg-interactive-brand-disabled: #e2e2e2; /* Background color for interactive elements with brand tone and normal emphasis, in their disabled state. */
14
18
  --wpds-color-bg-interactive-brand-strong: #3858e9; /* Background color for interactive elements with brand tone and strong emphasis. */
15
19
  --wpds-color-bg-interactive-brand-strong-active: #2e49d9; /* Background color for interactive elements with brand tone and strong emphasis that are hovered, focused, or active. */
16
20
  --wpds-color-bg-interactive-brand-strong-disabled: #d2d2d2; /* Background color for interactive elements with brand tone and strong emphasis, in their disabled state. */
17
21
  --wpds-color-bg-interactive-brand-weak: #00000000; /* Background color for interactive elements with brand tone and weak emphasis. */
18
- --wpds-color-bg-interactive-brand-weak-active: #e4eaf7; /* Background color for interactive elements with brand tone and weak emphasis that are hovered, focused, or active. */
22
+ --wpds-color-bg-interactive-brand-weak-active: #e6eaf4; /* Background color for interactive elements with brand tone and weak emphasis that are hovered, focused, or active. */
19
23
  --wpds-color-bg-interactive-brand-weak-disabled: #e2e2e2; /* Background color for interactive elements with brand tone and weak emphasis, in their disabled state. */
24
+ --wpds-color-bg-interactive-error: #00000000; /* Background color for interactive elements with error tone and normal emphasis. */
25
+ --wpds-color-bg-interactive-error-active: #fff6f4; /* Background color for interactive elements with error tone and normal emphasis that are hovered, focused, or active. */
26
+ --wpds-color-bg-interactive-error-disabled: #e2e2e2; /* Background color for interactive elements with error tone and normal emphasis, in their disabled state. */
27
+ --wpds-color-bg-interactive-error-strong: #cc1818; /* Background color for interactive elements with error tone and strong emphasis. */
28
+ --wpds-color-bg-interactive-error-strong-active: #b90000; /* Background color for interactive elements with error tone and strong emphasis that are hovered, focused, or active. */
29
+ --wpds-color-bg-interactive-error-strong-disabled: #d2d2d2; /* Background color for interactive elements with error tone and strong emphasis, in their disabled state. */
30
+ --wpds-color-bg-interactive-error-weak: #00000000; /* Background color for interactive elements with error tone and weak emphasis. */
31
+ --wpds-color-bg-interactive-error-weak-active: #f6e6e3; /* Background color for interactive elements with error tone and weak emphasis that are hovered, focused, or active. */
32
+ --wpds-color-bg-interactive-error-weak-disabled: #e2e2e2; /* Background color for interactive elements with error tone and weak emphasis, in their disabled state. */
20
33
  --wpds-color-bg-interactive-neutral: #00000000; /* Background color for interactive elements with neutral tone and normal emphasis. */
21
34
  --wpds-color-bg-interactive-neutral-active: #eaeaea; /* Background color for interactive elements with neutral tone and normal emphasis that are hovered, focused, or active. */
22
35
  --wpds-color-bg-interactive-neutral-disabled: #e2e2e2; /* Background color for interactive elements with neutral tone and normal emphasis, in their disabled state. */
@@ -27,19 +40,19 @@
27
40
  --wpds-color-bg-interactive-neutral-weak-active: #eaeaea; /* Background color for interactive elements with neutral tone and weak emphasis that are hovered, focused, or active. */
28
41
  --wpds-color-bg-interactive-neutral-weak-disabled: #e2e2e2; /* Background color for interactive elements with neutral tone and weak emphasis, in their disabled state. */
29
42
  --wpds-color-bg-surface-brand: #ecf0f9; /* Background color for surfaces with brand tone and normal emphasis. */
30
- --wpds-color-bg-surface-caution: #f7eab3; /* Background color for surfaces with caution tone and normal emphasis. */
31
- --wpds-color-bg-surface-caution-weak: #fdf9e7; /* Background color for surfaces with caution tone and weak emphasis. */
32
- --wpds-color-bg-surface-error: #fae4e1; /* Background color for surfaces with error tone and normal emphasis. */
33
- --wpds-color-bg-surface-error-weak: #fdf6f5; /* Background color for surfaces with error tone and weak emphasis. */
34
- --wpds-color-bg-surface-info: #dfebf8; /* Background color for surfaces with info tone and normal emphasis. */
35
- --wpds-color-bg-surface-info-weak: #f5f9fd; /* Background color for surfaces with info tone and weak emphasis. */
43
+ --wpds-color-bg-surface-caution: #fee994; /* Background color for surfaces with caution tone and normal emphasis. */
44
+ --wpds-color-bg-surface-caution-weak: #fff9c9; /* Background color for surfaces with caution tone and weak emphasis. */
45
+ --wpds-color-bg-surface-error: #f6e6e3; /* Background color for surfaces with error tone and normal emphasis. */
46
+ --wpds-color-bg-surface-error-weak: #fff6f4; /* Background color for surfaces with error tone and weak emphasis. */
47
+ --wpds-color-bg-surface-info: #deebfa; /* Background color for surfaces with info tone and normal emphasis. */
48
+ --wpds-color-bg-surface-info-weak: #f3f9ff; /* Background color for surfaces with info tone and weak emphasis. */
36
49
  --wpds-color-bg-surface-neutral: #f8f8f8; /* Background color for surfaces with normal emphasis. */
37
50
  --wpds-color-bg-surface-neutral-strong: #ffffff; /* Background color for surfaces with strong emphasis. */
38
51
  --wpds-color-bg-surface-neutral-weak: #f0f0f0; /* Background color for surfaces with weak emphasis. */
39
- --wpds-color-bg-surface-success: #cbf5d1; /* Background color for surfaces with success tone and normal emphasis. */
40
- --wpds-color-bg-surface-success-weak: #f0fcf2; /* Background color for surfaces with success tone and weak emphasis. */
41
- --wpds-color-bg-surface-warning: #f8e8cc; /* Background color for surfaces with warning tone and normal emphasis. */
42
- --wpds-color-bg-surface-warning-weak: #fdf7ee; /* Background color for surfaces with warning tone and weak emphasis. */
52
+ --wpds-color-bg-surface-success: #c5f7cc; /* Background color for surfaces with success tone and normal emphasis. */
53
+ --wpds-color-bg-surface-success-weak: #eaffed; /* Background color for surfaces with success tone and weak emphasis. */
54
+ --wpds-color-bg-surface-warning: #fde6bd; /* Background color for surfaces with warning tone and normal emphasis. */
55
+ --wpds-color-bg-surface-warning-weak: #fff7e0; /* Background color for surfaces with warning tone and weak emphasis. */
43
56
  --wpds-color-bg-thumb-brand: #3858e9; /* Background color for thumbs with a brand tone and normal emphasis (eg. slider thumb and filled track). */
44
57
  --wpds-color-bg-thumb-brand-active: #3858e9; /* Background color for thumbs with a brand tone and normal emphasis (eg. slider thumb and filled track) that are hovered, focused, or active. */
45
58
  --wpds-color-bg-thumb-brand-disabled: #d8d8d8; /* Background color for thumbs with a brand tone and normal emphasis (eg. slider thumb and filled track), in their disabled state. */
@@ -48,7 +61,7 @@
48
61
  --wpds-color-bg-track-neutral: #d8d8d8; /* Background color for tracks with a neutral tone and normal emphasis (eg. slider or progressbar track). */
49
62
  --wpds-color-bg-track-neutral-weak: #e0e0e0; /* Background color for tracks with a neutral tone and weak emphasis (eg. scrollbar track). */
50
63
  --wpds-color-fg-content-caution: #281d00; /* Foreground color for content like text with caution tone and normal emphasis. */
51
- --wpds-color-fg-content-caution-weak: #836b00; /* Foreground color for content like text with caution tone and weak emphasis. */
64
+ --wpds-color-fg-content-caution-weak: #826a00; /* Foreground color for content like text with caution tone and weak emphasis. */
52
65
  --wpds-color-fg-content-error: #470000; /* Foreground color for content like text with error tone and normal emphasis. */
53
66
  --wpds-color-fg-content-error-weak: #cc1818; /* Foreground color for content like text with error tone and weak emphasis. */
54
67
  --wpds-color-fg-content-info: #001b4f; /* Foreground color for content like text with info tone and normal emphasis. */
@@ -58,13 +71,19 @@
58
71
  --wpds-color-fg-content-success: #002900; /* Foreground color for content like text with success tone and normal emphasis. */
59
72
  --wpds-color-fg-content-success-weak: #007f30; /* Foreground color for content like text with success tone and weak emphasis. */
60
73
  --wpds-color-fg-content-warning: #2e1900; /* Foreground color for content like text with warning tone and normal emphasis. */
61
- --wpds-color-fg-content-warning-weak: #936400; /* Foreground color for content like text with warning tone and weak emphasis. */
74
+ --wpds-color-fg-content-warning-weak: #926300; /* Foreground color for content like text with warning tone and weak emphasis. */
62
75
  --wpds-color-fg-interactive-brand: #3858e9; /* Foreground color for interactive elements with brand tone and normal emphasis. */
63
76
  --wpds-color-fg-interactive-brand-active: #3858e9; /* Foreground color for interactive elements with brand tone and normal emphasis that are hovered, focused, or active. */
64
77
  --wpds-color-fg-interactive-brand-disabled: #8a8a8a; /* Foreground color for interactive elements with brand tone and normal emphasis, in their disabled state. */
65
78
  --wpds-color-fg-interactive-brand-strong: #eff0f2; /* Foreground color for interactive elements with brand tone and strong emphasis. */
66
79
  --wpds-color-fg-interactive-brand-strong-active: #eff0f2; /* Foreground color for interactive elements with brand tone and strong emphasis that are hovered, focused, or active. */
67
80
  --wpds-color-fg-interactive-brand-strong-disabled: #6d6d6d; /* Foreground color for interactive elements with brand tone and strong emphasis, in their disabled state. */
81
+ --wpds-color-fg-interactive-error: #cc1818; /* Foreground color for interactive elements with error tone and normal emphasis. */
82
+ --wpds-color-fg-interactive-error-active: #cc1818; /* Foreground color for interactive elements with error tone and normal emphasis that are hovered, focused, or active. */
83
+ --wpds-color-fg-interactive-error-disabled: #8a8a8a; /* Foreground color for interactive elements with error tone and normal emphasis, in their disabled state. */
84
+ --wpds-color-fg-interactive-error-strong: #f2efef; /* Foreground color for interactive elements with error tone and strong emphasis. */
85
+ --wpds-color-fg-interactive-error-strong-active: #f2efef; /* Foreground color for interactive elements with error tone and strong emphasis that are hovered, focused, or active. */
86
+ --wpds-color-fg-interactive-error-strong-disabled: #6d6d6d; /* Foreground color for interactive elements with error tone and strong emphasis, in their disabled state. */
68
87
  --wpds-color-fg-interactive-neutral: #1e1e1e; /* Foreground color for interactive elements with neutral tone and normal emphasis. */
69
88
  --wpds-color-fg-interactive-neutral-active: #1e1e1e; /* Foreground color for interactive elements with neutral tone and normal emphasis that are hovered, focused, or active. */
70
89
  --wpds-color-fg-interactive-neutral-disabled: #8a8a8a; /* Foreground color for interactive elements with neutral tone and normal emphasis, in their disabled state. */
@@ -76,26 +95,33 @@
76
95
  --wpds-color-stroke-focus-brand: #3858e9; /* Accessible stroke color applied to focus rings. */
77
96
  --wpds-color-stroke-interactive-brand: #3858e9; /* Accessible stroke color used for interactive brand-toned elements with normal emphasis. */
78
97
  --wpds-color-stroke-interactive-brand-active: #2337c8; /* Accessible stroke color used for interactive brand-toned elements with normal emphasis that are hovered, focused, or active. */
79
- --wpds-color-stroke-interactive-brand-disabled: #d8d8d8; /* Accessible stroke color used for interactive brand-toned elements with normal emphasis, in their disabled state. */
98
+ --wpds-color-stroke-interactive-error: #cc1818; /* Accessible stroke color used for interactive error-toned elements with normal emphasis. */
99
+ --wpds-color-stroke-interactive-error-active: #9d0000; /* Accessible stroke color used for interactive error-toned elements with normal emphasis that are hovered, focused, or active. */
80
100
  --wpds-color-stroke-interactive-error-strong: #cc1818; /* Accessible stroke color used for interactive error-toned elements with strong emphasis. */
81
101
  --wpds-color-stroke-interactive-neutral: #8a8a8a; /* Accessible stroke color used for interactive neutrally-toned elements with normal emphasis. */
82
102
  --wpds-color-stroke-interactive-neutral-active: #6c6c6c; /* Accessible stroke color used for interactive neutrally-toned elements with normal emphasis that are hovered, focused, or active. */
83
103
  --wpds-color-stroke-interactive-neutral-disabled: #d8d8d8; /* Accessible stroke color used for interactive neutrally-toned elements with normal emphasis, in their disabled state. */
84
104
  --wpds-color-stroke-interactive-neutral-strong: #6c6c6c; /* Accessible stroke color used for interactive neutrally-toned elements with strong emphasis. */
85
- --wpds-color-stroke-surface-brand: #a2b1d6; /* Decorative stroke color used to define brand-toned surface boundaries with normal emphasis. */
86
- --wpds-color-stroke-surface-brand-strong: #3858e9; /* Decorative stroke color used to define neutrally-toned surface boundaries with strong emphasis. */
87
- --wpds-color-stroke-surface-error: #e1a198; /* Decorative stroke color used to define error-toned surface boundaries with normal emphasis. */
105
+ --wpds-color-stroke-surface-brand: #a3b1d4; /* Decorative stroke color used to define brand-toned surface boundaries with normal emphasis. */
106
+ --wpds-color-stroke-surface-brand-strong: #3858e9; /* Decorative stroke color used to define brand-toned surface boundaries with strong emphasis. */
107
+ --wpds-color-stroke-surface-error: #daa39b; /* Decorative stroke color used to define error-toned surface boundaries with normal emphasis. */
88
108
  --wpds-color-stroke-surface-error-strong: #cc1818; /* Decorative stroke color used to define error-toned surface boundaries with strong emphasis. */
89
- --wpds-color-stroke-surface-info: #9fbcdd; /* Decorative stroke color used to define info-toned surface boundaries with normal emphasis. */
109
+ --wpds-color-stroke-surface-info: #9fbcdc; /* Decorative stroke color used to define info-toned surface boundaries with normal emphasis. */
90
110
  --wpds-color-stroke-surface-info-strong: #006bd7; /* Decorative stroke color used to define info-toned surface boundaries with strong emphasis. */
91
111
  --wpds-color-stroke-surface-neutral: #d8d8d8; /* Decorative stroke color used to define neutrally-toned surface boundaries with normal emphasis. */
92
112
  --wpds-color-stroke-surface-neutral-strong: #8a8a8a; /* Decorative stroke color used to define neutrally-toned surface boundaries with strong emphasis. */
93
113
  --wpds-color-stroke-surface-neutral-weak: #e0e0e0; /* Decorative stroke color used to define neutrally-toned surface boundaries with weak emphasis. */
94
- --wpds-color-stroke-surface-success: #82c98f; /* Decorative stroke color used to define success-toned surface boundaries with normal emphasis. */
114
+ --wpds-color-stroke-surface-success: #8ac894; /* Decorative stroke color used to define success-toned surface boundaries with normal emphasis. */
95
115
  --wpds-color-stroke-surface-success-strong: #007f30; /* Decorative stroke color used to define success-toned surface boundaries with strong emphasis. */
96
- --wpds-color-stroke-surface-warning: #d2b581; /* Decorative stroke color used to define warning-toned surface boundaries with normal emphasis. */
97
- --wpds-color-stroke-surface-warning-strong: #936400; /* Decorative stroke color used to define warning-toned surface boundaries with strong emphasis. */
116
+ --wpds-color-stroke-surface-warning: #d0b381; /* Decorative stroke color used to define warning-toned surface boundaries with normal emphasis. */
117
+ --wpds-color-stroke-surface-warning-strong: #926300; /* Decorative stroke color used to define warning-toned surface boundaries with strong emphasis. */
98
118
  --wpds-dimension-base: 4px; /* Base dimension unit */
119
+ --wpds-dimension-gap-2xs: 4px; /* 2x extra small gap */
120
+ --wpds-dimension-gap-lg: 24px; /* Large gap */
121
+ --wpds-dimension-gap-md: 16px; /* Medium gap */
122
+ --wpds-dimension-gap-sm: 12px; /* Small gap */
123
+ --wpds-dimension-gap-xl: 40px; /* Extra large gap */
124
+ --wpds-dimension-gap-xs: 8px; /* Extra small gap */
99
125
  --wpds-dimension-padding-surface-2xs: 4px; /* 2x extra small spacing for surfaces */
100
126
  --wpds-dimension-padding-surface-lg: 32px; /* Large spacing for surfaces */
101
127
  --wpds-dimension-padding-surface-md: 24px; /* Medium spacing for surfaces */
@@ -130,6 +156,12 @@
130
156
 
131
157
  [data-wpds-theme-provider-id][data-wpds-density='default'] {
132
158
  --wpds-dimension-base: 4px; /* Base dimension unit */
159
+ --wpds-dimension-gap-2xs: 4px; /* 2x extra small gap */
160
+ --wpds-dimension-gap-lg: 24px; /* Large gap */
161
+ --wpds-dimension-gap-md: 16px; /* Medium gap */
162
+ --wpds-dimension-gap-sm: 12px; /* Small gap */
163
+ --wpds-dimension-gap-xl: 40px; /* Extra large gap */
164
+ --wpds-dimension-gap-xs: 8px; /* Extra small gap */
133
165
  --wpds-dimension-padding-surface-2xs: 4px; /* 2x extra small spacing for surfaces */
134
166
  --wpds-dimension-padding-surface-lg: 32px; /* Large spacing for surfaces */
135
167
  --wpds-dimension-padding-surface-md: 24px; /* Medium spacing for surfaces */
@@ -138,6 +170,12 @@
138
170
  }
139
171
 
140
172
  [data-wpds-theme-provider-id][data-wpds-density='compact'] {
173
+ --wpds-dimension-gap-2xs: 4px; /* 2x extra small gap */
174
+ --wpds-dimension-gap-lg: 20px; /* Large gap */
175
+ --wpds-dimension-gap-md: 12px; /* Medium gap */
176
+ --wpds-dimension-gap-sm: 8px; /* Small gap */
177
+ --wpds-dimension-gap-xl: 32px; /* Extra large gap */
178
+ --wpds-dimension-gap-xs: 4px; /* Extra small gap */
141
179
  --wpds-dimension-padding-surface-2xs: 4px; /* 2x extra small spacing for surfaces */
142
180
  --wpds-dimension-padding-surface-lg: 24px; /* Large spacing for surfaces */
143
181
  --wpds-dimension-padding-surface-md: 20px; /* Medium spacing for surfaces */
@@ -146,6 +184,12 @@
146
184
  }
147
185
 
148
186
  [data-wpds-theme-provider-id][data-wpds-density='comfortable'] {
187
+ --wpds-dimension-gap-2xs: 8px; /* 2x extra small gap */
188
+ --wpds-dimension-gap-lg: 32px; /* Large gap */
189
+ --wpds-dimension-gap-md: 20px; /* Medium gap */
190
+ --wpds-dimension-gap-sm: 16px; /* Small gap */
191
+ --wpds-dimension-gap-xl: 48px; /* Extra large gap */
192
+ --wpds-dimension-gap-xs: 12px; /* Extra small gap */
149
193
  --wpds-dimension-padding-surface-2xs: 8px; /* 2x extra small spacing for surfaces */
150
194
  --wpds-dimension-padding-surface-lg: 40px; /* Large spacing for surfaces */
151
195
  --wpds-dimension-padding-surface-md: 32px; /* Medium spacing for surfaces */
@@ -155,6 +199,6 @@
155
199
 
156
200
  @media ( -webkit-min-device-pixel-ratio: 2 ), ( min-resolution: 192dpi ) {
157
201
  :root {
158
- --wpds-border-width-focus: 1.5px; /* Border width for focus ring */
202
+ --wpds-border-width-interactive-focus: 1.5px; /* Border width for focus ring */
159
203
  }
160
204
  }
@@ -4,11 +4,15 @@
4
4
  */
5
5
 
6
6
  export default [
7
- '--wpds-border-radius-x-small',
8
- '--wpds-border-radius-small',
9
- '--wpds-border-radius-medium',
10
- '--wpds-border-radius-large',
11
- '--wpds-border-width-focus',
7
+ '--wpds-border-radius-surface-xs',
8
+ '--wpds-border-radius-surface-sm',
9
+ '--wpds-border-radius-surface-md',
10
+ '--wpds-border-radius-surface-lg',
11
+ '--wpds-border-width-surface-xs',
12
+ '--wpds-border-width-surface-sm',
13
+ '--wpds-border-width-surface-md',
14
+ '--wpds-border-width-surface-lg',
15
+ '--wpds-border-width-interactive-focus',
12
16
  '--wpds-color-bg-surface-neutral',
13
17
  '--wpds-color-bg-surface-neutral-strong',
14
18
  '--wpds-color-bg-surface-neutral-weak',
@@ -41,6 +45,15 @@ export default [
41
45
  '--wpds-color-bg-interactive-brand-weak',
42
46
  '--wpds-color-bg-interactive-brand-weak-active',
43
47
  '--wpds-color-bg-interactive-brand-weak-disabled',
48
+ '--wpds-color-bg-interactive-error',
49
+ '--wpds-color-bg-interactive-error-active',
50
+ '--wpds-color-bg-interactive-error-disabled',
51
+ '--wpds-color-bg-interactive-error-strong',
52
+ '--wpds-color-bg-interactive-error-strong-active',
53
+ '--wpds-color-bg-interactive-error-strong-disabled',
54
+ '--wpds-color-bg-interactive-error-weak',
55
+ '--wpds-color-bg-interactive-error-weak-active',
56
+ '--wpds-color-bg-interactive-error-weak-disabled',
44
57
  '--wpds-color-bg-track-neutral-weak',
45
58
  '--wpds-color-bg-track-neutral',
46
59
  '--wpds-color-bg-thumb-neutral-weak',
@@ -74,6 +87,12 @@ export default [
74
87
  '--wpds-color-fg-interactive-brand-strong',
75
88
  '--wpds-color-fg-interactive-brand-strong-active',
76
89
  '--wpds-color-fg-interactive-brand-strong-disabled',
90
+ '--wpds-color-fg-interactive-error',
91
+ '--wpds-color-fg-interactive-error-active',
92
+ '--wpds-color-fg-interactive-error-disabled',
93
+ '--wpds-color-fg-interactive-error-strong',
94
+ '--wpds-color-fg-interactive-error-strong-active',
95
+ '--wpds-color-fg-interactive-error-strong-disabled',
77
96
  '--wpds-color-stroke-surface-neutral',
78
97
  '--wpds-color-stroke-surface-neutral-weak',
79
98
  '--wpds-color-stroke-surface-neutral-strong',
@@ -93,7 +112,8 @@ export default [
93
112
  '--wpds-color-stroke-interactive-neutral-strong',
94
113
  '--wpds-color-stroke-interactive-brand',
95
114
  '--wpds-color-stroke-interactive-brand-active',
96
- '--wpds-color-stroke-interactive-brand-disabled',
115
+ '--wpds-color-stroke-interactive-error',
116
+ '--wpds-color-stroke-interactive-error-active',
97
117
  '--wpds-color-stroke-interactive-error-strong',
98
118
  '--wpds-color-stroke-focus-brand',
99
119
  '--wpds-dimension-base',
@@ -102,6 +122,12 @@ export default [
102
122
  '--wpds-dimension-padding-surface-sm',
103
123
  '--wpds-dimension-padding-surface-md',
104
124
  '--wpds-dimension-padding-surface-lg',
125
+ '--wpds-dimension-gap-2xs',
126
+ '--wpds-dimension-gap-xs',
127
+ '--wpds-dimension-gap-sm',
128
+ '--wpds-dimension-gap-md',
129
+ '--wpds-dimension-gap-lg',
130
+ '--wpds-dimension-gap-xl',
105
131
  '--wpds-elevation-x-small',
106
132
  '--wpds-elevation-small',
107
133
  '--wpds-elevation-medium',
@@ -6,19 +6,19 @@
6
6
  export default {
7
7
  'primary-bgFill1': [ 'bg-interactive-brand-strong' ],
8
8
  'primary-fgFill': [
9
- 'fg-interactive-brand-strong-active',
10
9
  'fg-interactive-brand-strong',
10
+ 'fg-interactive-brand-strong-active',
11
11
  ],
12
12
  'primary-bgFill2': [ 'bg-interactive-brand-strong-active' ],
13
13
  'primary-surface2': [ 'bg-interactive-brand-active' ],
14
14
  'primary-surface4': [ 'bg-interactive-brand-weak-active' ],
15
15
  'primary-fgSurface3': [
16
- 'fg-interactive-brand-active',
17
16
  'fg-interactive-brand',
17
+ 'fg-interactive-brand-active',
18
18
  ],
19
19
  'primary-stroke3': [
20
- 'bg-thumb-brand-active',
21
20
  'bg-thumb-brand',
21
+ 'bg-thumb-brand-active',
22
22
  'stroke-focus-brand',
23
23
  'stroke-interactive-brand',
24
24
  'stroke-surface-brand-strong',
@@ -44,23 +44,44 @@ export default {
44
44
  'warning-fgSurface3': [ 'fg-content-warning-weak' ],
45
45
  'warning-stroke3': [ 'stroke-surface-warning-strong' ],
46
46
  'warning-stroke1': [ 'stroke-surface-warning' ],
47
- 'error-surface2': [ 'bg-surface-error-weak' ],
48
- 'error-surface4': [ 'bg-surface-error' ],
47
+ 'error-bgFill1': [ 'bg-interactive-error-strong' ],
48
+ 'error-fgFill': [
49
+ 'fg-interactive-error-strong',
50
+ 'fg-interactive-error-strong-active',
51
+ ],
52
+ 'error-bgFill2': [ 'bg-interactive-error-strong-active' ],
53
+ 'error-surface2': [
54
+ 'bg-interactive-error-active',
55
+ 'bg-surface-error-weak',
56
+ ],
57
+ 'error-surface4': [
58
+ 'bg-interactive-error-weak-active',
59
+ 'bg-surface-error',
60
+ ],
49
61
  'error-fgSurface4': [ 'fg-content-error' ],
50
- 'error-fgSurface3': [ 'fg-content-error-weak' ],
62
+ 'error-fgSurface3': [
63
+ 'fg-content-error-weak',
64
+ 'fg-interactive-error',
65
+ 'fg-interactive-error-active',
66
+ ],
51
67
  'error-stroke3': [
68
+ 'stroke-interactive-error',
52
69
  'stroke-interactive-error-strong',
53
70
  'stroke-surface-error-strong',
54
71
  ],
72
+ 'error-stroke4': [ 'stroke-interactive-error-active' ],
55
73
  'error-stroke1': [ 'stroke-surface-error' ],
56
74
  'bg-surface2': [ 'bg-surface-neutral' ],
57
75
  'bg-surface6': [
58
76
  'bg-interactive-brand-strong-disabled',
77
+ 'bg-interactive-error-strong-disabled',
59
78
  'bg-interactive-neutral-strong-disabled',
60
79
  ],
61
80
  'bg-surface5': [
62
81
  'bg-interactive-brand-disabled',
63
82
  'bg-interactive-brand-weak-disabled',
83
+ 'bg-interactive-error-disabled',
84
+ 'bg-interactive-error-weak-disabled',
64
85
  'bg-interactive-neutral-disabled',
65
86
  'bg-interactive-neutral-weak-disabled',
66
87
  ],
@@ -71,17 +92,19 @@ export default {
71
92
  'bg-surface3': [ 'bg-surface-neutral-strong' ],
72
93
  'bg-fgSurface4': [
73
94
  'fg-content-neutral',
74
- 'fg-interactive-neutral-active',
75
95
  'fg-interactive-neutral',
96
+ 'fg-interactive-neutral-active',
76
97
  ],
77
98
  'bg-fgSurface3': [
78
99
  'fg-content-neutral-weak',
79
100
  'fg-interactive-brand-strong-disabled',
101
+ 'fg-interactive-error-strong-disabled',
80
102
  'fg-interactive-neutral-strong-disabled',
81
103
  'fg-interactive-neutral-weak',
82
104
  ],
83
105
  'bg-fgSurface2': [
84
106
  'fg-interactive-brand-disabled',
107
+ 'fg-interactive-error-disabled',
85
108
  'fg-interactive-neutral-disabled',
86
109
  'fg-interactive-neutral-weak-disabled',
87
110
  ],
@@ -98,7 +121,6 @@ export default {
98
121
  'bg-stroke2': [
99
122
  'bg-thumb-brand-disabled',
100
123
  'bg-track-neutral',
101
- 'stroke-interactive-brand-disabled',
102
124
  'stroke-interactive-neutral-disabled',
103
125
  'stroke-surface-neutral',
104
126
  ],
@@ -106,8 +128,8 @@ export default {
106
128
  'bg-bgFillInverted2': [ 'bg-interactive-neutral-strong-active' ],
107
129
  'bg-bgFillInverted1': [ 'bg-interactive-neutral-strong' ],
108
130
  'bg-fgFillInverted': [
109
- 'fg-interactive-neutral-strong-active',
110
131
  'fg-interactive-neutral-strong',
132
+ 'fg-interactive-neutral-strong-active',
111
133
  ],
112
134
  'bg-surface1': [ 'bg-surface-neutral-weak' ],
113
135
  'caution-surface2': [ 'bg-surface-caution-weak' ],
@@ -0,0 +1,125 @@
1
+ /**
2
+ * This file is generated by the @wordpress/terrazzo-plugin-typescript-types plugin.
3
+ * Do not edit this file directly.
4
+ */
5
+
6
+ /**
7
+ * Size scale for padding tokens.
8
+ */
9
+ export type PaddingSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
10
+
11
+ /**
12
+ * Size scale for gap tokens.
13
+ */
14
+ export type GapSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
15
+
16
+ /**
17
+ * Size scale for border radius tokens.
18
+ */
19
+ export type BorderRadiusSize = 'xs' | 'sm' | 'md' | 'lg';
20
+
21
+ /**
22
+ * Size scale for border width tokens.
23
+ */
24
+ export type BorderWidthSize = 'xs' | 'sm' | 'md' | 'lg';
25
+
26
+ /**
27
+ * Target elements that tokens can be applied to.
28
+ */
29
+ export type Target =
30
+ | 'surface'
31
+ | 'interactive'
32
+ | 'track'
33
+ | 'thumb'
34
+ | 'content'
35
+ | 'focus';
36
+
37
+ /**
38
+ * Background color variants for surface elements.
39
+ */
40
+ export type SurfaceBackgroundColor =
41
+ | 'neutral'
42
+ | 'neutral-strong'
43
+ | 'neutral-weak'
44
+ | 'brand'
45
+ | 'success'
46
+ | 'success-weak'
47
+ | 'info'
48
+ | 'info-weak'
49
+ | 'warning'
50
+ | 'warning-weak'
51
+ | 'caution'
52
+ | 'caution-weak'
53
+ | 'error'
54
+ | 'error-weak';
55
+
56
+ /**
57
+ * Background color variants for interactive elements.
58
+ */
59
+ export type InteractiveBackgroundColor =
60
+ | 'neutral'
61
+ | 'neutral-strong'
62
+ | 'neutral-weak'
63
+ | 'brand'
64
+ | 'brand-strong'
65
+ | 'brand-weak'
66
+ | 'error'
67
+ | 'error-strong'
68
+ | 'error-weak';
69
+
70
+ /**
71
+ * Foreground color variants for content text and icons.
72
+ */
73
+ export type ContentForegroundColor =
74
+ | 'neutral'
75
+ | 'neutral-weak'
76
+ | 'success'
77
+ | 'success-weak'
78
+ | 'info'
79
+ | 'info-weak'
80
+ | 'warning'
81
+ | 'warning-weak'
82
+ | 'caution'
83
+ | 'caution-weak'
84
+ | 'error'
85
+ | 'error-weak';
86
+
87
+ /**
88
+ * Foreground color variants for interactive element text and icons.
89
+ */
90
+ export type InteractiveForegroundColor =
91
+ | 'neutral'
92
+ | 'neutral-strong'
93
+ | 'neutral-weak'
94
+ | 'brand'
95
+ | 'brand-strong'
96
+ | 'error'
97
+ | 'error-strong';
98
+
99
+ /**
100
+ * Stroke color variants for surface borders.
101
+ */
102
+ export type SurfaceStrokeColor =
103
+ | 'neutral'
104
+ | 'neutral-weak'
105
+ | 'neutral-strong'
106
+ | 'brand'
107
+ | 'brand-strong'
108
+ | 'success'
109
+ | 'success-strong'
110
+ | 'info'
111
+ | 'info-strong'
112
+ | 'warning'
113
+ | 'warning-strong'
114
+ | 'error'
115
+ | 'error-strong';
116
+
117
+ /**
118
+ * Stroke color variants for interactive element borders.
119
+ */
120
+ export type InteractiveStrokeColor =
121
+ | 'neutral'
122
+ | 'neutral-strong'
123
+ | 'brand'
124
+ | 'error'
125
+ | 'error-strong';
@@ -1,49 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { writeFile } from 'node:fs/promises';
5
- import { dirname, join } from 'node:path';
6
- import { fileURLToPath } from 'node:url';
7
-
8
- /**
9
- * Internal dependencies
10
- */
11
- import {
12
- DEFAULT_SEED_COLORS,
13
- buildBgRamp,
14
- buildAccentRamp,
15
- } from '../../src/color-ramps/index.ts';
16
-
17
- const __dirname = dirname( fileURLToPath( import.meta.url ) );
18
-
19
- const bgRamp = buildBgRamp( DEFAULT_SEED_COLORS.bg );
20
- const accentRamps = Object.fromEntries(
21
- [ ...Object.entries( DEFAULT_SEED_COLORS ) ]
22
- .filter( ( [ scaleName ] ) => scaleName !== 'bg' )
23
- .map( ( [ scaleName, seed ] ) => [
24
- scaleName,
25
- buildAccentRamp( seed, bgRamp ),
26
- ] )
27
- );
28
-
29
- const ramps = { bg: bgRamp, ...accentRamps };
30
-
31
- const outputPath = join(
32
- __dirname,
33
- '../../src/color-ramps/lib/default-ramps.ts'
34
- );
35
-
36
- const content = `
37
- /**
38
- * Internal dependencies
39
- */
40
- import type { RampResult } from './types';
41
- import type { DEFAULT_SEED_COLORS } from './constants';
42
-
43
- export const DEFAULT_RAMPS: Record<
44
- keyof typeof DEFAULT_SEED_COLORS,
45
- RampResult
46
- > = ${ JSON.stringify( ramps ) };
47
- `;
48
-
49
- await writeFile( outputPath, content );