@wordpress/theme 0.2.1-next.dc3f6d3c1.0 → 0.3.1-next.6deb34194.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 (58) hide show
  1. package/bin/terrazzo-plugin-inline-alias-values/index.ts +43 -14
  2. package/build/color-ramps/lib/default-ramps.js +65 -65
  3. package/build/color-ramps/lib/default-ramps.js.map +1 -1
  4. package/build/color-ramps/lib/find-color-with-constraints.js.map +2 -2
  5. package/build/color-ramps/lib/index.js.map +2 -2
  6. package/build/color-ramps/lib/taper-chroma.js +18 -44
  7. package/build/color-ramps/lib/taper-chroma.js.map +2 -2
  8. package/build/prebuilt/js/design-tokens.js +20 -9
  9. package/build/prebuilt/js/design-tokens.js.map +2 -2
  10. package/build/prebuilt/json/figma.json +125 -37
  11. package/build/theme-provider.js +3 -1
  12. package/build/theme-provider.js.map +2 -2
  13. package/build/types.js.map +1 -1
  14. package/build-module/color-ramps/lib/default-ramps.js +65 -65
  15. package/build-module/color-ramps/lib/default-ramps.js.map +1 -1
  16. package/build-module/color-ramps/lib/find-color-with-constraints.js.map +2 -2
  17. package/build-module/color-ramps/lib/index.js.map +2 -2
  18. package/build-module/color-ramps/lib/taper-chroma.js +19 -46
  19. package/build-module/color-ramps/lib/taper-chroma.js.map +2 -2
  20. package/build-module/prebuilt/js/design-tokens.js +20 -9
  21. package/build-module/prebuilt/js/design-tokens.js.map +2 -2
  22. package/build-module/prebuilt/json/figma.json +125 -37
  23. package/build-module/theme-provider.js +3 -1
  24. package/build-module/theme-provider.js.map +2 -2
  25. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts +3 -4
  26. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts.map +1 -1
  27. package/build-types/color-ramps/lib/taper-chroma.d.ts +4 -4
  28. package/build-types/color-ramps/lib/taper-chroma.d.ts.map +1 -1
  29. package/build-types/stories/index.story.d.ts +1 -0
  30. package/build-types/stories/index.story.d.ts.map +1 -1
  31. package/build-types/theme-provider.d.ts +1 -1
  32. package/build-types/theme-provider.d.ts.map +1 -1
  33. package/build-types/types.d.ts +8 -0
  34. package/build-types/types.d.ts.map +1 -1
  35. package/docs/ds-tokens.md +25 -14
  36. package/package.json +4 -4
  37. package/src/color-ramps/lib/default-ramps.ts +65 -65
  38. package/src/color-ramps/lib/find-color-with-constraints.ts +11 -7
  39. package/src/color-ramps/lib/index.ts +4 -4
  40. package/src/color-ramps/lib/taper-chroma.ts +32 -63
  41. package/src/prebuilt/css/design-tokens.css +84 -30
  42. package/src/prebuilt/js/design-tokens.js +20 -9
  43. package/src/prebuilt/json/figma.json +125 -37
  44. package/src/stories/index.story.tsx +23 -9
  45. package/src/theme-provider.tsx +2 -0
  46. package/src/types.ts +9 -0
  47. package/terrazzo.config.ts +21 -0
  48. package/tokens/border.json +43 -21
  49. package/tokens/color.json +65 -65
  50. package/tokens/dimension.json +106 -10
  51. package/tsconfig.bin.tsbuildinfo +1 -1
  52. package/tsconfig.src.json +1 -1
  53. package/tsconfig.src.tsbuildinfo +1 -1
  54. package/build/types/css-modules.d.js +0 -1
  55. package/build/types/css-modules.d.js.map +0 -7
  56. package/build-module/types/css-modules.d.js +0 -1
  57. package/build-module/types/css-modules.d.js.map +0 -7
  58. package/src/types/css-modules.d.ts +0 -4
@@ -3,19 +3,23 @@
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. */
20
24
  --wpds-color-bg-interactive-neutral: #00000000; /* Background color for interactive elements with neutral tone and normal emphasis. */
21
25
  --wpds-color-bg-interactive-neutral-active: #eaeaea; /* Background color for interactive elements with neutral tone and normal emphasis that are hovered, focused, or active. */
@@ -27,19 +31,19 @@
27
31
  --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
32
  --wpds-color-bg-interactive-neutral-weak-disabled: #e2e2e2; /* Background color for interactive elements with neutral tone and weak emphasis, in their disabled state. */
29
33
  --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. */
34
+ --wpds-color-bg-surface-caution: #fee994; /* Background color for surfaces with caution tone and normal emphasis. */
35
+ --wpds-color-bg-surface-caution-weak: #fff9c9; /* Background color for surfaces with caution tone and weak emphasis. */
36
+ --wpds-color-bg-surface-error: #f6e6e3; /* Background color for surfaces with error tone and normal emphasis. */
37
+ --wpds-color-bg-surface-error-weak: #fff6f4; /* Background color for surfaces with error tone and weak emphasis. */
38
+ --wpds-color-bg-surface-info: #deebfa; /* Background color for surfaces with info tone and normal emphasis. */
39
+ --wpds-color-bg-surface-info-weak: #f3f9ff; /* Background color for surfaces with info tone and weak emphasis. */
36
40
  --wpds-color-bg-surface-neutral: #f8f8f8; /* Background color for surfaces with normal emphasis. */
37
41
  --wpds-color-bg-surface-neutral-strong: #ffffff; /* Background color for surfaces with strong emphasis. */
38
42
  --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. */
43
+ --wpds-color-bg-surface-success: #c5f7cc; /* Background color for surfaces with success tone and normal emphasis. */
44
+ --wpds-color-bg-surface-success-weak: #eaffed; /* Background color for surfaces with success tone and weak emphasis. */
45
+ --wpds-color-bg-surface-warning: #fde6bd; /* Background color for surfaces with warning tone and normal emphasis. */
46
+ --wpds-color-bg-surface-warning-weak: #fff7e0; /* Background color for surfaces with warning tone and weak emphasis. */
43
47
  --wpds-color-bg-thumb-brand: #3858e9; /* Background color for thumbs with a brand tone and normal emphasis (eg. slider thumb and filled track). */
44
48
  --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
49
  --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 +52,7 @@
48
52
  --wpds-color-bg-track-neutral: #d8d8d8; /* Background color for tracks with a neutral tone and normal emphasis (eg. slider or progressbar track). */
49
53
  --wpds-color-bg-track-neutral-weak: #e0e0e0; /* Background color for tracks with a neutral tone and weak emphasis (eg. scrollbar track). */
50
54
  --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. */
55
+ --wpds-color-fg-content-caution-weak: #826a00; /* Foreground color for content like text with caution tone and weak emphasis. */
52
56
  --wpds-color-fg-content-error: #470000; /* Foreground color for content like text with error tone and normal emphasis. */
53
57
  --wpds-color-fg-content-error-weak: #cc1818; /* Foreground color for content like text with error tone and weak emphasis. */
54
58
  --wpds-color-fg-content-info: #001b4f; /* Foreground color for content like text with info tone and normal emphasis. */
@@ -58,7 +62,7 @@
58
62
  --wpds-color-fg-content-success: #002900; /* Foreground color for content like text with success tone and normal emphasis. */
59
63
  --wpds-color-fg-content-success-weak: #007f30; /* Foreground color for content like text with success tone and weak emphasis. */
60
64
  --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. */
65
+ --wpds-color-fg-content-warning-weak: #926300; /* Foreground color for content like text with warning tone and weak emphasis. */
62
66
  --wpds-color-fg-interactive-brand: #3858e9; /* Foreground color for interactive elements with brand tone and normal emphasis. */
63
67
  --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
68
  --wpds-color-fg-interactive-brand-disabled: #8a8a8a; /* Foreground color for interactive elements with brand tone and normal emphasis, in their disabled state. */
@@ -82,24 +86,31 @@
82
86
  --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
87
  --wpds-color-stroke-interactive-neutral-disabled: #d8d8d8; /* Accessible stroke color used for interactive neutrally-toned elements with normal emphasis, in their disabled state. */
84
88
  --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. */
89
+ --wpds-color-stroke-surface-brand: #a3b1d4; /* Decorative stroke color used to define brand-toned surface boundaries with normal emphasis. */
86
90
  --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. */
91
+ --wpds-color-stroke-surface-error: #daa39b; /* Decorative stroke color used to define error-toned surface boundaries with normal emphasis. */
88
92
  --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. */
93
+ --wpds-color-stroke-surface-info: #9fbcdc; /* Decorative stroke color used to define info-toned surface boundaries with normal emphasis. */
90
94
  --wpds-color-stroke-surface-info-strong: #006bd7; /* Decorative stroke color used to define info-toned surface boundaries with strong emphasis. */
91
95
  --wpds-color-stroke-surface-neutral: #d8d8d8; /* Decorative stroke color used to define neutrally-toned surface boundaries with normal emphasis. */
92
96
  --wpds-color-stroke-surface-neutral-strong: #8a8a8a; /* Decorative stroke color used to define neutrally-toned surface boundaries with strong emphasis. */
93
97
  --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. */
98
+ --wpds-color-stroke-surface-success: #8ac894; /* Decorative stroke color used to define success-toned surface boundaries with normal emphasis. */
95
99
  --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. */
100
+ --wpds-color-stroke-surface-warning: #d0b381; /* Decorative stroke color used to define warning-toned surface boundaries with normal emphasis. */
101
+ --wpds-color-stroke-surface-warning-strong: #926300; /* Decorative stroke color used to define warning-toned surface boundaries with strong emphasis. */
98
102
  --wpds-dimension-base: 4px; /* Base dimension unit */
99
- --wpds-dimension-padding-surface-large: 24px; /* Large spacing for surfaces */
100
- --wpds-dimension-padding-surface-medium: 16px; /* Medium spacing for surfaces */
101
- --wpds-dimension-padding-surface-small: 12px; /* Small spacing for surfaces */
102
- --wpds-dimension-padding-surface-x-small: 8px; /* Extra small spacing for surfaces */
103
+ --wpds-dimension-gap-2xs: 4px; /* 2x extra small gap */
104
+ --wpds-dimension-gap-lg: 24px; /* Large gap */
105
+ --wpds-dimension-gap-md: 16px; /* Medium gap */
106
+ --wpds-dimension-gap-sm: 12px; /* Small gap */
107
+ --wpds-dimension-gap-xl: 40px; /* Extra large gap */
108
+ --wpds-dimension-gap-xs: 8px; /* Extra small gap */
109
+ --wpds-dimension-padding-surface-2xs: 4px; /* 2x extra small spacing for surfaces */
110
+ --wpds-dimension-padding-surface-lg: 32px; /* Large spacing for surfaces */
111
+ --wpds-dimension-padding-surface-md: 24px; /* Medium spacing for surfaces */
112
+ --wpds-dimension-padding-surface-sm: 16px; /* Small spacing for surfaces */
113
+ --wpds-dimension-padding-surface-xs: 8px; /* Extra small spacing for surfaces */
103
114
  --wpds-elevation-large: 0 5px 15px 0 #00000014, 0 15px 27px 0 #00000012,
104
115
  0 30px 36px 0 #0000000a, 0 50px 43px 0 #00000005; /* For components that confirm decisions or handle necessary interruptions. Example: Modals. */
105
116
  --wpds-elevation-medium: 0 2px 3px 0 #0000000d, 0 4px 5px 0 #0000000a,
@@ -127,8 +138,51 @@
127
138
  --wpds-font-size-x-small: 11px; /* Extra small font size */
128
139
  }
129
140
 
141
+ [data-wpds-theme-provider-id][data-wpds-density='default'] {
142
+ --wpds-dimension-base: 4px; /* Base dimension unit */
143
+ --wpds-dimension-gap-2xs: 4px; /* 2x extra small gap */
144
+ --wpds-dimension-gap-lg: 24px; /* Large gap */
145
+ --wpds-dimension-gap-md: 16px; /* Medium gap */
146
+ --wpds-dimension-gap-sm: 12px; /* Small gap */
147
+ --wpds-dimension-gap-xl: 40px; /* Extra large gap */
148
+ --wpds-dimension-gap-xs: 8px; /* Extra small gap */
149
+ --wpds-dimension-padding-surface-2xs: 4px; /* 2x extra small spacing for surfaces */
150
+ --wpds-dimension-padding-surface-lg: 32px; /* Large spacing for surfaces */
151
+ --wpds-dimension-padding-surface-md: 24px; /* Medium spacing for surfaces */
152
+ --wpds-dimension-padding-surface-sm: 16px; /* Small spacing for surfaces */
153
+ --wpds-dimension-padding-surface-xs: 8px; /* Extra small spacing for surfaces */
154
+ }
155
+
156
+ [data-wpds-theme-provider-id][data-wpds-density='compact'] {
157
+ --wpds-dimension-gap-2xs: 4px; /* 2x extra small gap */
158
+ --wpds-dimension-gap-lg: 20px; /* Large gap */
159
+ --wpds-dimension-gap-md: 12px; /* Medium gap */
160
+ --wpds-dimension-gap-sm: 8px; /* Small gap */
161
+ --wpds-dimension-gap-xl: 32px; /* Extra large gap */
162
+ --wpds-dimension-gap-xs: 4px; /* Extra small gap */
163
+ --wpds-dimension-padding-surface-2xs: 4px; /* 2x extra small spacing for surfaces */
164
+ --wpds-dimension-padding-surface-lg: 24px; /* Large spacing for surfaces */
165
+ --wpds-dimension-padding-surface-md: 20px; /* Medium spacing for surfaces */
166
+ --wpds-dimension-padding-surface-sm: 12px; /* Small spacing for surfaces */
167
+ --wpds-dimension-padding-surface-xs: 4px; /* Extra small spacing for surfaces */
168
+ }
169
+
170
+ [data-wpds-theme-provider-id][data-wpds-density='comfortable'] {
171
+ --wpds-dimension-gap-2xs: 8px; /* 2x extra small gap */
172
+ --wpds-dimension-gap-lg: 32px; /* Large gap */
173
+ --wpds-dimension-gap-md: 20px; /* Medium gap */
174
+ --wpds-dimension-gap-sm: 16px; /* Small gap */
175
+ --wpds-dimension-gap-xl: 48px; /* Extra large gap */
176
+ --wpds-dimension-gap-xs: 12px; /* Extra small gap */
177
+ --wpds-dimension-padding-surface-2xs: 8px; /* 2x extra small spacing for surfaces */
178
+ --wpds-dimension-padding-surface-lg: 40px; /* Large spacing for surfaces */
179
+ --wpds-dimension-padding-surface-md: 32px; /* Medium spacing for surfaces */
180
+ --wpds-dimension-padding-surface-sm: 20px; /* Small spacing for surfaces */
181
+ --wpds-dimension-padding-surface-xs: 12px; /* Extra small spacing for surfaces */
182
+ }
183
+
130
184
  @media ( -webkit-min-device-pixel-ratio: 2 ), ( min-resolution: 192dpi ) {
131
185
  :root {
132
- --wpds-border-width-focus: 1.5px; /* Border width for focus ring */
186
+ --wpds-border-width-interactive-focus: 1.5px; /* Border width for focus ring */
133
187
  }
134
188
  }
@@ -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',
@@ -97,10 +101,17 @@ export default [
97
101
  '--wpds-color-stroke-interactive-error-strong',
98
102
  '--wpds-color-stroke-focus-brand',
99
103
  '--wpds-dimension-base',
100
- '--wpds-dimension-padding-surface-x-small',
101
- '--wpds-dimension-padding-surface-small',
102
- '--wpds-dimension-padding-surface-medium',
103
- '--wpds-dimension-padding-surface-large',
104
+ '--wpds-dimension-padding-surface-2xs',
105
+ '--wpds-dimension-padding-surface-xs',
106
+ '--wpds-dimension-padding-surface-sm',
107
+ '--wpds-dimension-padding-surface-md',
108
+ '--wpds-dimension-padding-surface-lg',
109
+ '--wpds-dimension-gap-2xs',
110
+ '--wpds-dimension-gap-xs',
111
+ '--wpds-dimension-gap-sm',
112
+ '--wpds-dimension-gap-md',
113
+ '--wpds-dimension-gap-lg',
114
+ '--wpds-dimension-gap-xl',
104
115
  '--wpds-elevation-x-small',
105
116
  '--wpds-elevation-small',
106
117
  '--wpds-elevation-medium',
@@ -1,29 +1,53 @@
1
1
  {
2
- "Border/radius-x-small": {
2
+ "Border/radius-surface-xs": {
3
3
  "value": {
4
4
  ".": "1px"
5
5
  },
6
- "description": "Extra small radius"
6
+ "description": "Extra small radius for surfaces"
7
7
  },
8
- "Border/radius-small": {
8
+ "Border/radius-surface-sm": {
9
9
  "value": {
10
10
  ".": "2px"
11
11
  },
12
- "description": "Small radius"
12
+ "description": "Small radius for surfaces"
13
13
  },
14
- "Border/radius-medium": {
14
+ "Border/radius-surface-md": {
15
15
  "value": {
16
16
  ".": "4px"
17
17
  },
18
- "description": "Medium radius"
18
+ "description": "Medium radius for surfaces"
19
19
  },
20
- "Border/radius-large": {
20
+ "Border/radius-surface-lg": {
21
21
  "value": {
22
22
  ".": "8px"
23
23
  },
24
- "description": "Large radius"
24
+ "description": "Large radius for surfaces"
25
25
  },
26
- "Border/width-focus": {
26
+ "Border/width-surface-xs": {
27
+ "value": {
28
+ ".": "1px"
29
+ },
30
+ "description": "Extra small width for surfaces"
31
+ },
32
+ "Border/width-surface-sm": {
33
+ "value": {
34
+ ".": "2px"
35
+ },
36
+ "description": "Small width for surfaces"
37
+ },
38
+ "Border/width-surface-md": {
39
+ "value": {
40
+ ".": "4px"
41
+ },
42
+ "description": "Medium width for surfaces"
43
+ },
44
+ "Border/width-surface-lg": {
45
+ "value": {
46
+ ".": "8px"
47
+ },
48
+ "description": "Large width for surfaces"
49
+ },
50
+ "Border/width-interactive-focus": {
27
51
  "value": {
28
52
  ".": "2px",
29
53
  "high-dpi": "1.5px"
@@ -56,61 +80,61 @@
56
80
  },
57
81
  "Color/Semantic/Background/Success/bgSur-success": {
58
82
  "value": {
59
- ".": "#cbf5d1"
83
+ ".": "#c5f7cc"
60
84
  },
61
85
  "description": "Background color for surfaces with success tone and normal emphasis."
62
86
  },
63
87
  "Color/Semantic/Background/Success/bgSur-success-weak": {
64
88
  "value": {
65
- ".": "#f0fcf2"
89
+ ".": "#eaffed"
66
90
  },
67
91
  "description": "Background color for surfaces with success tone and weak emphasis."
68
92
  },
69
93
  "Color/Semantic/Background/Info/bgSur-info": {
70
94
  "value": {
71
- ".": "#dfebf8"
95
+ ".": "#deebfa"
72
96
  },
73
97
  "description": "Background color for surfaces with info tone and normal emphasis."
74
98
  },
75
99
  "Color/Semantic/Background/Info/bgSur-info-weak": {
76
100
  "value": {
77
- ".": "#f5f9fd"
101
+ ".": "#f3f9ff"
78
102
  },
79
103
  "description": "Background color for surfaces with info tone and weak emphasis."
80
104
  },
81
105
  "Color/Semantic/Background/Warning/bgSur-warning": {
82
106
  "value": {
83
- ".": "#f8e8cc"
107
+ ".": "#fde6bd"
84
108
  },
85
109
  "description": "Background color for surfaces with warning tone and normal emphasis."
86
110
  },
87
111
  "Color/Semantic/Background/Warning/bgSur-warning-weak": {
88
112
  "value": {
89
- ".": "#fdf7ee"
113
+ ".": "#fff7e0"
90
114
  },
91
115
  "description": "Background color for surfaces with warning tone and weak emphasis."
92
116
  },
93
117
  "Color/Semantic/Background/Caution/bgSur-caution": {
94
118
  "value": {
95
- ".": "#f7eab3"
119
+ ".": "#fee994"
96
120
  },
97
121
  "description": "Background color for surfaces with caution tone and normal emphasis."
98
122
  },
99
123
  "Color/Semantic/Background/Caution/bgSur-caution-weak": {
100
124
  "value": {
101
- ".": "#fdf9e7"
125
+ ".": "#fff9c9"
102
126
  },
103
127
  "description": "Background color for surfaces with caution tone and weak emphasis."
104
128
  },
105
129
  "Color/Semantic/Background/Error/bgSur-error": {
106
130
  "value": {
107
- ".": "#fae4e1"
131
+ ".": "#f6e6e3"
108
132
  },
109
133
  "description": "Background color for surfaces with error tone and normal emphasis."
110
134
  },
111
135
  "Color/Semantic/Background/Error/bgSur-error-weak": {
112
136
  "value": {
113
- ".": "#fdf6f5"
137
+ ".": "#fff6f4"
114
138
  },
115
139
  "description": "Background color for surfaces with error tone and weak emphasis."
116
140
  },
@@ -176,7 +200,7 @@
176
200
  },
177
201
  "Color/Semantic/Background/Brand/bgInt-brand-active": {
178
202
  "value": {
179
- ".": "#f6f8fc"
203
+ ".": "#f6f8fd"
180
204
  },
181
205
  "description": "Background color for interactive elements with brand tone and normal emphasis that are hovered, focused, or active."
182
206
  },
@@ -212,7 +236,7 @@
212
236
  },
213
237
  "Color/Semantic/Background/Brand/bgInt-brand-weak-active": {
214
238
  "value": {
215
- ".": "#e4eaf7"
239
+ ".": "#e6eaf4"
216
240
  },
217
241
  "description": "Background color for interactive elements with brand tone and weak emphasis that are hovered, focused, or active."
218
242
  },
@@ -308,7 +332,7 @@
308
332
  },
309
333
  "Color/Semantic/Foreground/Warning/fgCon-warning-weak": {
310
334
  "value": {
311
- ".": "#936400"
335
+ ".": "#926300"
312
336
  },
313
337
  "description": "Foreground color for content like text with warning tone and weak emphasis."
314
338
  },
@@ -320,7 +344,7 @@
320
344
  },
321
345
  "Color/Semantic/Foreground/Caution/fgCon-caution-weak": {
322
346
  "value": {
323
- ".": "#836b00"
347
+ ".": "#826a00"
324
348
  },
325
349
  "description": "Foreground color for content like text with caution tone and weak emphasis."
326
350
  },
@@ -440,7 +464,7 @@
440
464
  },
441
465
  "Color/Semantic/Stroke/Brand/strokeSur-brand": {
442
466
  "value": {
443
- ".": "#a2b1d6"
467
+ ".": "#a3b1d4"
444
468
  },
445
469
  "description": "Decorative stroke color used to define brand-toned surface boundaries with normal emphasis."
446
470
  },
@@ -452,7 +476,7 @@
452
476
  },
453
477
  "Color/Semantic/Stroke/Success/strokeSur-success": {
454
478
  "value": {
455
- ".": "#82c98f"
479
+ ".": "#8ac894"
456
480
  },
457
481
  "description": "Decorative stroke color used to define success-toned surface boundaries with normal emphasis."
458
482
  },
@@ -464,7 +488,7 @@
464
488
  },
465
489
  "Color/Semantic/Stroke/Info/strokeSur-info": {
466
490
  "value": {
467
- ".": "#9fbcdd"
491
+ ".": "#9fbcdc"
468
492
  },
469
493
  "description": "Decorative stroke color used to define info-toned surface boundaries with normal emphasis."
470
494
  },
@@ -476,19 +500,19 @@
476
500
  },
477
501
  "Color/Semantic/Stroke/Warning/strokeSur-warning": {
478
502
  "value": {
479
- ".": "#d2b581"
503
+ ".": "#d0b381"
480
504
  },
481
505
  "description": "Decorative stroke color used to define warning-toned surface boundaries with normal emphasis."
482
506
  },
483
507
  "Color/Semantic/Stroke/Warning/strokeSur-warning-strong": {
484
508
  "value": {
485
- ".": "#936400"
509
+ ".": "#926300"
486
510
  },
487
511
  "description": "Decorative stroke color used to define warning-toned surface boundaries with strong emphasis."
488
512
  },
489
513
  "Color/Semantic/Stroke/Error/strokeSur-error": {
490
514
  "value": {
491
- ".": "#e1a198"
515
+ ".": "#daa39b"
492
516
  },
493
517
  "description": "Decorative stroke color used to define error-toned surface boundaries with normal emphasis."
494
518
  },
@@ -558,30 +582,94 @@
558
582
  },
559
583
  "description": "Base dimension unit"
560
584
  },
561
- "Dimension/Semantic/padding-surface-x-small": {
585
+ "Dimension/Semantic/padding-surface-2xs": {
562
586
  "value": {
563
- ".": "8px"
587
+ ".": "4px",
588
+ "compact": "4px",
589
+ "comfortable": "8px"
590
+ },
591
+ "description": "2x extra small spacing for surfaces"
592
+ },
593
+ "Dimension/Semantic/padding-surface-xs": {
594
+ "value": {
595
+ ".": "8px",
596
+ "compact": "4px",
597
+ "comfortable": "12px"
564
598
  },
565
599
  "description": "Extra small spacing for surfaces"
566
600
  },
567
- "Dimension/Semantic/padding-surface-small": {
601
+ "Dimension/Semantic/padding-surface-sm": {
568
602
  "value": {
569
- ".": "12px"
603
+ ".": "16px",
604
+ "compact": "12px",
605
+ "comfortable": "20px"
570
606
  },
571
607
  "description": "Small spacing for surfaces"
572
608
  },
573
- "Dimension/Semantic/padding-surface-medium": {
609
+ "Dimension/Semantic/padding-surface-md": {
574
610
  "value": {
575
- ".": "16px"
611
+ ".": "24px",
612
+ "compact": "20px",
613
+ "comfortable": "32px"
576
614
  },
577
615
  "description": "Medium spacing for surfaces"
578
616
  },
579
- "Dimension/Semantic/padding-surface-large": {
617
+ "Dimension/Semantic/padding-surface-lg": {
580
618
  "value": {
581
- ".": "24px"
619
+ ".": "32px",
620
+ "compact": "24px",
621
+ "comfortable": "40px"
582
622
  },
583
623
  "description": "Large spacing for surfaces"
584
624
  },
625
+ "Dimension/Semantic/gap-2xs": {
626
+ "value": {
627
+ ".": "4px",
628
+ "compact": "4px",
629
+ "comfortable": "8px"
630
+ },
631
+ "description": "2x extra small gap"
632
+ },
633
+ "Dimension/Semantic/gap-xs": {
634
+ "value": {
635
+ ".": "8px",
636
+ "compact": "4px",
637
+ "comfortable": "12px"
638
+ },
639
+ "description": "Extra small gap"
640
+ },
641
+ "Dimension/Semantic/gap-sm": {
642
+ "value": {
643
+ ".": "12px",
644
+ "compact": "8px",
645
+ "comfortable": "16px"
646
+ },
647
+ "description": "Small gap"
648
+ },
649
+ "Dimension/Semantic/gap-md": {
650
+ "value": {
651
+ ".": "16px",
652
+ "compact": "12px",
653
+ "comfortable": "20px"
654
+ },
655
+ "description": "Medium gap"
656
+ },
657
+ "Dimension/Semantic/gap-lg": {
658
+ "value": {
659
+ ".": "24px",
660
+ "compact": "20px",
661
+ "comfortable": "32px"
662
+ },
663
+ "description": "Large gap"
664
+ },
665
+ "Dimension/Semantic/gap-xl": {
666
+ "value": {
667
+ ".": "40px",
668
+ "compact": "32px",
669
+ "comfortable": "48px"
670
+ },
671
+ "description": "Extra large gap"
672
+ },
585
673
  "Elevation/x-small": {
586
674
  "value": {
587
675
  ".": "0 1px 1px 0 color(srgb 0 0 0 / 0.03), 0 1px 2px 0 color(srgb 0 0 0 / 0.02), 0 3px 3px 0 color(srgb 0 0 0 / 0.02), 0 4px 4px 0 color(srgb 0 0 0 / 0.01)"
@@ -18,6 +18,7 @@ import {
18
18
  * Internal dependencies
19
19
  */
20
20
  import { ThemeProvider } from '../theme-provider';
21
+ import '../prebuilt/css/design-tokens.css';
21
22
 
22
23
  const meta: Meta< typeof ThemeProvider > = {
23
24
  title: 'Design System/Theme Provider',
@@ -198,10 +199,10 @@ export const WithPicker: StoryObj< typeof ThemeProvider > = {
198
199
  },
199
200
  };
200
201
 
201
- const NestingDebug = ( { bg = '', primary = '' } ) => (
202
+ const NestingDebug = ( { bg = '', primary = '', density = '' } ) => (
202
203
  <div
203
204
  style={ {
204
- padding: '0.25rem',
205
+ padding: 'var(--wpds-dimension-padding-surface-sm)',
205
206
  color: 'var(--wpds-color-fg-content-neutral)',
206
207
  backgroundColor: 'var(--wpds-color-bg-surface-neutral)',
207
208
  display: 'flex',
@@ -210,13 +211,13 @@ const NestingDebug = ( { bg = '', primary = '' } ) => (
210
211
  gap: '1rem',
211
212
  } }
212
213
  >
213
- <pre>
214
- bg: { bg } | primary: { primary }
214
+ <pre style={ { margin: 0 } }>
215
+ bg: { bg } | primary: { primary } | density: { density }
215
216
  </pre>
216
217
  <span
217
218
  style={ {
218
219
  display: 'inline-block',
219
- padding: '0.25rem',
220
+ padding: 'var(--wpds-dimension-padding-surface-xs)',
220
221
  borderRadius: '0.25rem',
221
222
  backgroundColor:
222
223
  'var(--wpds-color-bg-interactive-brand-strong)',
@@ -229,7 +230,7 @@ const NestingDebug = ( { bg = '', primary = '' } ) => (
229
230
  style={ {
230
231
  display: 'inline-block',
231
232
  marginInlineStart: '0.25rem',
232
- padding: '0.25rem',
233
+ padding: 'var(--wpds-dimension-padding-surface-xs)',
233
234
  borderRadius: '0.25rem',
234
235
  backgroundColor:
235
236
  'var(--wpds-color-bg-interactive-brand-weak-disabled)',
@@ -245,27 +246,39 @@ export const NestingAndInheriting: StoryObj< typeof ThemeProvider > = {
245
246
  render: () => {
246
247
  return (
247
248
  <ThemeProvider>
248
- <NestingDebug bg="inherit (root)" primary="inherit (root)" />
249
+ <NestingDebug
250
+ bg="inherit (root)"
251
+ primary="inherit (root)"
252
+ density="inherit (root)"
253
+ />
249
254
  <div style={ { paddingInlineStart: '1rem' } }>
250
255
  <ThemeProvider
251
256
  color={ {
252
257
  bg: '#1e1e1e',
253
258
  } }
259
+ density="compact"
254
260
  >
255
- <NestingDebug bg="#1e1e1e" primary="inherit (root)" />
261
+ <NestingDebug
262
+ bg="#1e1e1e"
263
+ primary="inherit (root)"
264
+ density="compact"
265
+ />
256
266
  <div style={ { paddingInlineStart: '1rem' } }>
257
267
  <ThemeProvider>
258
268
  <NestingDebug
259
269
  bg="inherit (#1e1e1e)"
260
270
  primary="inherit (root)"
271
+ density="inherit (compact)"
261
272
  />
262
273
  <div style={ { paddingInlineStart: '1rem' } }>
263
274
  <ThemeProvider
264
275
  color={ { primary: 'hotpink' } }
276
+ density="default"
265
277
  >
266
278
  <NestingDebug
267
279
  bg="inherit (#1e1e1e)"
268
280
  primary="hotpink"
281
+ density="default"
269
282
  />
270
283
  <div
271
284
  style={ {
@@ -278,6 +291,7 @@ export const NestingAndInheriting: StoryObj< typeof ThemeProvider > = {
278
291
  <NestingDebug
279
292
  bg="#f8f8f8"
280
293
  primary="inherit (hotpink)"
294
+ density="inherit (default)"
281
295
  />
282
296
  </ThemeProvider>
283
297
  </div>
@@ -397,7 +411,7 @@ export const AcrossIframes: StoryObj< typeof ThemeProvider > = {
397
411
  <span
398
412
  style={ {
399
413
  display: 'inline-block',
400
- padding: '0.25rem',
414
+ padding: 'var(--wpds-dimension-padding-surface-xs)',
401
415
  borderRadius: '0.25rem',
402
416
  backgroundColor:
403
417
  'var(--wpds-color-bg-interactive-brand-strong)',
@@ -49,6 +49,7 @@ export const ThemeProvider = ( {
49
49
  children,
50
50
  color = {},
51
51
  isRoot = false,
52
+ density,
52
53
  }: ThemeProviderProps ) => {
53
54
  const instanceId = useId();
54
55
 
@@ -76,6 +77,7 @@ export const ThemeProvider = ( {
76
77
  <div
77
78
  data-wpds-theme-provider-id={ instanceId }
78
79
  data-wpds-root-provider={ isRoot }
80
+ data-wpds-density={ density }
79
81
  className={ styles.root }
80
82
  >
81
83
  <ThemeContext.Provider value={ contextValue }>