@wordpress/theme 0.3.1-next.8b30e05b0.0 → 0.4.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.
- package/README.md +82 -18
- package/bin/generate-primitive-tokens/index.ts +26 -33
- package/bin/terrazzo-plugin-mode-overrides/index.ts +208 -0
- package/build/color-ramps/lib/default-ramps.js +65 -65
- package/build/color-ramps/lib/default-ramps.js.map +1 -1
- package/build/color-ramps/lib/find-color-with-constraints.js.map +2 -2
- package/build/color-ramps/lib/index.js.map +2 -2
- package/build/color-ramps/lib/taper-chroma.js +18 -44
- package/build/color-ramps/lib/taper-chroma.js.map +2 -2
- package/build/prebuilt/js/design-tokens.js +32 -6
- package/build/prebuilt/js/design-tokens.js.map +2 -2
- package/build/prebuilt/ts/color-tokens.js +35 -13
- package/build/prebuilt/ts/color-tokens.js.map +2 -2
- package/build-module/color-ramps/lib/default-ramps.js +65 -65
- package/build-module/color-ramps/lib/default-ramps.js.map +1 -1
- package/build-module/color-ramps/lib/find-color-with-constraints.js.map +2 -2
- package/build-module/color-ramps/lib/index.js.map +2 -2
- package/build-module/color-ramps/lib/taper-chroma.js +19 -46
- package/build-module/color-ramps/lib/taper-chroma.js.map +2 -2
- package/build-module/prebuilt/js/design-tokens.js +32 -6
- package/build-module/prebuilt/js/design-tokens.js.map +2 -2
- package/build-module/prebuilt/ts/color-tokens.js +35 -13
- package/build-module/prebuilt/ts/color-tokens.js.map +2 -2
- package/build-types/color-ramps/lib/find-color-with-constraints.d.ts +3 -4
- package/build-types/color-ramps/lib/find-color-with-constraints.d.ts.map +1 -1
- package/build-types/color-ramps/lib/taper-chroma.d.ts +4 -4
- package/build-types/color-ramps/lib/taper-chroma.d.ts.map +1 -1
- package/build-types/prebuilt/ts/color-tokens.d.ts.map +1 -1
- package/docs/ds-tokens.md +35 -9
- package/package.json +5 -5
- package/src/color-ramps/lib/default-ramps.ts +65 -65
- package/src/color-ramps/lib/find-color-with-constraints.ts +11 -7
- package/src/color-ramps/lib/index.ts +4 -4
- package/src/color-ramps/lib/taper-chroma.ts +32 -63
- package/src/prebuilt/css/design-tokens.css +72 -28
- package/src/prebuilt/js/design-tokens.js +32 -6
- package/src/prebuilt/ts/color-tokens.ts +31 -9
- package/terrazzo.config.ts +11 -14
- package/tokens/border.json +44 -22
- package/tokens/color.json +1160 -630
- package/tokens/dimension.json +112 -52
- package/tokens/elevation.json +1 -1
- package/tokens/modes/border.high-dpi.json +15 -0
- package/tokens/modes/dimension.comfortable.json +54 -0
- package/tokens/modes/dimension.compact.json +54 -0
- package/tokens/typography.json +1 -1
- package/tsconfig.bin.tsbuildinfo +1 -1
- package/tsconfig.src.json +1 -1
- package/tsconfig.src.tsbuildinfo +1 -1
- package/bin/terrazzo-plugin-figma-ds-token-manager/index.ts +0 -217
- package/bin/terrazzo-plugin-figma-ds-token-manager/lib.ts +0 -1
- package/build/prebuilt/json/figma.json +0 -715
- package/build/token-id.js +0 -30
- package/build/token-id.js.map +0 -7
- package/build/types/css-modules.d.js +0 -1
- package/build/types/css-modules.d.js.map +0 -7
- package/build-module/prebuilt/json/figma.json +0 -715
- package/build-module/token-id.js +0 -6
- package/build-module/token-id.js.map +0 -7
- package/build-module/types/css-modules.d.js +0 -1
- package/build-module/types/css-modules.d.js.map +0 -7
- package/build-types/token-id.d.ts +0 -9
- package/build-types/token-id.d.ts.map +0 -1
- package/src/prebuilt/json/figma.json +0 -715
- package/src/test/token-id.test.ts +0 -12
- package/src/token-id.ts +0 -9
- package/src/types/css-modules.d.ts +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/prebuilt/js/design-tokens.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * This file is generated by the @terrazzo/plugin-known-wpds-css-variables plugin.\n * Do not edit this file directly.\n */\n\nexport default [\n\t'--wpds-border-radius-
|
|
5
|
-
"mappings": ";AAKA,IAAO,wBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
|
|
4
|
+
"sourcesContent": ["/**\n * This file is generated by the @terrazzo/plugin-known-wpds-css-variables plugin.\n * Do not edit this file directly.\n */\n\nexport default [\n\t'--wpds-border-radius-surface-xs',\n\t'--wpds-border-radius-surface-sm',\n\t'--wpds-border-radius-surface-md',\n\t'--wpds-border-radius-surface-lg',\n\t'--wpds-border-width-surface-xs',\n\t'--wpds-border-width-surface-sm',\n\t'--wpds-border-width-surface-md',\n\t'--wpds-border-width-surface-lg',\n\t'--wpds-border-width-interactive-focus',\n\t'--wpds-color-bg-surface-neutral',\n\t'--wpds-color-bg-surface-neutral-strong',\n\t'--wpds-color-bg-surface-neutral-weak',\n\t'--wpds-color-bg-surface-brand',\n\t'--wpds-color-bg-surface-success',\n\t'--wpds-color-bg-surface-success-weak',\n\t'--wpds-color-bg-surface-info',\n\t'--wpds-color-bg-surface-info-weak',\n\t'--wpds-color-bg-surface-warning',\n\t'--wpds-color-bg-surface-warning-weak',\n\t'--wpds-color-bg-surface-caution',\n\t'--wpds-color-bg-surface-caution-weak',\n\t'--wpds-color-bg-surface-error',\n\t'--wpds-color-bg-surface-error-weak',\n\t'--wpds-color-bg-interactive-neutral',\n\t'--wpds-color-bg-interactive-neutral-active',\n\t'--wpds-color-bg-interactive-neutral-disabled',\n\t'--wpds-color-bg-interactive-neutral-strong',\n\t'--wpds-color-bg-interactive-neutral-strong-active',\n\t'--wpds-color-bg-interactive-neutral-strong-disabled',\n\t'--wpds-color-bg-interactive-neutral-weak',\n\t'--wpds-color-bg-interactive-neutral-weak-active',\n\t'--wpds-color-bg-interactive-neutral-weak-disabled',\n\t'--wpds-color-bg-interactive-brand',\n\t'--wpds-color-bg-interactive-brand-active',\n\t'--wpds-color-bg-interactive-brand-disabled',\n\t'--wpds-color-bg-interactive-brand-strong',\n\t'--wpds-color-bg-interactive-brand-strong-active',\n\t'--wpds-color-bg-interactive-brand-strong-disabled',\n\t'--wpds-color-bg-interactive-brand-weak',\n\t'--wpds-color-bg-interactive-brand-weak-active',\n\t'--wpds-color-bg-interactive-brand-weak-disabled',\n\t'--wpds-color-bg-interactive-error',\n\t'--wpds-color-bg-interactive-error-active',\n\t'--wpds-color-bg-interactive-error-disabled',\n\t'--wpds-color-bg-interactive-error-strong',\n\t'--wpds-color-bg-interactive-error-strong-active',\n\t'--wpds-color-bg-interactive-error-strong-disabled',\n\t'--wpds-color-bg-interactive-error-weak',\n\t'--wpds-color-bg-interactive-error-weak-active',\n\t'--wpds-color-bg-interactive-error-weak-disabled',\n\t'--wpds-color-bg-track-neutral-weak',\n\t'--wpds-color-bg-track-neutral',\n\t'--wpds-color-bg-thumb-neutral-weak',\n\t'--wpds-color-bg-thumb-neutral-weak-active',\n\t'--wpds-color-bg-thumb-brand',\n\t'--wpds-color-bg-thumb-brand-active',\n\t'--wpds-color-bg-thumb-brand-disabled',\n\t'--wpds-color-fg-content-neutral',\n\t'--wpds-color-fg-content-neutral-weak',\n\t'--wpds-color-fg-content-success',\n\t'--wpds-color-fg-content-success-weak',\n\t'--wpds-color-fg-content-info',\n\t'--wpds-color-fg-content-info-weak',\n\t'--wpds-color-fg-content-warning',\n\t'--wpds-color-fg-content-warning-weak',\n\t'--wpds-color-fg-content-caution',\n\t'--wpds-color-fg-content-caution-weak',\n\t'--wpds-color-fg-content-error',\n\t'--wpds-color-fg-content-error-weak',\n\t'--wpds-color-fg-interactive-neutral',\n\t'--wpds-color-fg-interactive-neutral-active',\n\t'--wpds-color-fg-interactive-neutral-disabled',\n\t'--wpds-color-fg-interactive-neutral-strong',\n\t'--wpds-color-fg-interactive-neutral-strong-active',\n\t'--wpds-color-fg-interactive-neutral-strong-disabled',\n\t'--wpds-color-fg-interactive-neutral-weak',\n\t'--wpds-color-fg-interactive-neutral-weak-disabled',\n\t'--wpds-color-fg-interactive-brand',\n\t'--wpds-color-fg-interactive-brand-active',\n\t'--wpds-color-fg-interactive-brand-disabled',\n\t'--wpds-color-fg-interactive-brand-strong',\n\t'--wpds-color-fg-interactive-brand-strong-active',\n\t'--wpds-color-fg-interactive-brand-strong-disabled',\n\t'--wpds-color-fg-interactive-error',\n\t'--wpds-color-fg-interactive-error-active',\n\t'--wpds-color-fg-interactive-error-disabled',\n\t'--wpds-color-fg-interactive-error-strong',\n\t'--wpds-color-fg-interactive-error-strong-active',\n\t'--wpds-color-fg-interactive-error-strong-disabled',\n\t'--wpds-color-stroke-surface-neutral',\n\t'--wpds-color-stroke-surface-neutral-weak',\n\t'--wpds-color-stroke-surface-neutral-strong',\n\t'--wpds-color-stroke-surface-brand',\n\t'--wpds-color-stroke-surface-brand-strong',\n\t'--wpds-color-stroke-surface-success',\n\t'--wpds-color-stroke-surface-success-strong',\n\t'--wpds-color-stroke-surface-info',\n\t'--wpds-color-stroke-surface-info-strong',\n\t'--wpds-color-stroke-surface-warning',\n\t'--wpds-color-stroke-surface-warning-strong',\n\t'--wpds-color-stroke-surface-error',\n\t'--wpds-color-stroke-surface-error-strong',\n\t'--wpds-color-stroke-interactive-neutral',\n\t'--wpds-color-stroke-interactive-neutral-active',\n\t'--wpds-color-stroke-interactive-neutral-disabled',\n\t'--wpds-color-stroke-interactive-neutral-strong',\n\t'--wpds-color-stroke-interactive-brand',\n\t'--wpds-color-stroke-interactive-brand-active',\n\t'--wpds-color-stroke-interactive-error',\n\t'--wpds-color-stroke-interactive-error-active',\n\t'--wpds-color-stroke-interactive-error-strong',\n\t'--wpds-color-stroke-focus-brand',\n\t'--wpds-dimension-base',\n\t'--wpds-dimension-padding-surface-2xs',\n\t'--wpds-dimension-padding-surface-xs',\n\t'--wpds-dimension-padding-surface-sm',\n\t'--wpds-dimension-padding-surface-md',\n\t'--wpds-dimension-padding-surface-lg',\n\t'--wpds-dimension-gap-2xs',\n\t'--wpds-dimension-gap-xs',\n\t'--wpds-dimension-gap-sm',\n\t'--wpds-dimension-gap-md',\n\t'--wpds-dimension-gap-lg',\n\t'--wpds-dimension-gap-xl',\n\t'--wpds-elevation-x-small',\n\t'--wpds-elevation-small',\n\t'--wpds-elevation-medium',\n\t'--wpds-elevation-large',\n\t'--wpds-font-family-heading',\n\t'--wpds-font-family-body',\n\t'--wpds-font-family-mono',\n\t'--wpds-font-size-x-small',\n\t'--wpds-font-size-small',\n\t'--wpds-font-size-medium',\n\t'--wpds-font-size-large',\n\t'--wpds-font-size-x-large',\n\t'--wpds-font-size-2x-large',\n\t'--wpds-font-line-height-x-small',\n\t'--wpds-font-line-height-small',\n\t'--wpds-font-line-height-medium',\n\t'--wpds-font-line-height-large',\n\t'--wpds-font-line-height-x-large',\n\t'--wpds-font-line-height-2x-large',\n];\n"],
|
|
5
|
+
"mappings": ";AAKA,IAAO,wBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
var color_tokens_default = {
|
|
3
3
|
"primary-bgFill1": ["bg-interactive-brand-strong"],
|
|
4
4
|
"primary-fgFill": [
|
|
5
|
-
"fg-interactive-brand-strong
|
|
6
|
-
"fg-interactive-brand-strong"
|
|
5
|
+
"fg-interactive-brand-strong",
|
|
6
|
+
"fg-interactive-brand-strong-active"
|
|
7
7
|
],
|
|
8
8
|
"primary-bgFill2": ["bg-interactive-brand-strong-active"],
|
|
9
9
|
"primary-surface2": ["bg-interactive-brand-active"],
|
|
10
10
|
"primary-surface4": ["bg-interactive-brand-weak-active"],
|
|
11
11
|
"primary-fgSurface3": [
|
|
12
|
-
"fg-interactive-brand
|
|
13
|
-
"fg-interactive-brand"
|
|
12
|
+
"fg-interactive-brand",
|
|
13
|
+
"fg-interactive-brand-active"
|
|
14
14
|
],
|
|
15
15
|
"primary-stroke3": [
|
|
16
|
-
"bg-thumb-brand-active",
|
|
17
16
|
"bg-thumb-brand",
|
|
17
|
+
"bg-thumb-brand-active",
|
|
18
18
|
"stroke-focus-brand",
|
|
19
19
|
"stroke-interactive-brand",
|
|
20
20
|
"stroke-surface-brand-strong"
|
|
@@ -40,23 +40,44 @@ var color_tokens_default = {
|
|
|
40
40
|
"warning-fgSurface3": ["fg-content-warning-weak"],
|
|
41
41
|
"warning-stroke3": ["stroke-surface-warning-strong"],
|
|
42
42
|
"warning-stroke1": ["stroke-surface-warning"],
|
|
43
|
-
"error-
|
|
44
|
-
"error-
|
|
43
|
+
"error-bgFill1": ["bg-interactive-error-strong"],
|
|
44
|
+
"error-fgFill": [
|
|
45
|
+
"fg-interactive-error-strong",
|
|
46
|
+
"fg-interactive-error-strong-active"
|
|
47
|
+
],
|
|
48
|
+
"error-bgFill2": ["bg-interactive-error-strong-active"],
|
|
49
|
+
"error-surface2": [
|
|
50
|
+
"bg-interactive-error-active",
|
|
51
|
+
"bg-surface-error-weak"
|
|
52
|
+
],
|
|
53
|
+
"error-surface4": [
|
|
54
|
+
"bg-interactive-error-weak-active",
|
|
55
|
+
"bg-surface-error"
|
|
56
|
+
],
|
|
45
57
|
"error-fgSurface4": ["fg-content-error"],
|
|
46
|
-
"error-fgSurface3": [
|
|
58
|
+
"error-fgSurface3": [
|
|
59
|
+
"fg-content-error-weak",
|
|
60
|
+
"fg-interactive-error",
|
|
61
|
+
"fg-interactive-error-active"
|
|
62
|
+
],
|
|
47
63
|
"error-stroke3": [
|
|
64
|
+
"stroke-interactive-error",
|
|
48
65
|
"stroke-interactive-error-strong",
|
|
49
66
|
"stroke-surface-error-strong"
|
|
50
67
|
],
|
|
68
|
+
"error-stroke4": ["stroke-interactive-error-active"],
|
|
51
69
|
"error-stroke1": ["stroke-surface-error"],
|
|
52
70
|
"bg-surface2": ["bg-surface-neutral"],
|
|
53
71
|
"bg-surface6": [
|
|
54
72
|
"bg-interactive-brand-strong-disabled",
|
|
73
|
+
"bg-interactive-error-strong-disabled",
|
|
55
74
|
"bg-interactive-neutral-strong-disabled"
|
|
56
75
|
],
|
|
57
76
|
"bg-surface5": [
|
|
58
77
|
"bg-interactive-brand-disabled",
|
|
59
78
|
"bg-interactive-brand-weak-disabled",
|
|
79
|
+
"bg-interactive-error-disabled",
|
|
80
|
+
"bg-interactive-error-weak-disabled",
|
|
60
81
|
"bg-interactive-neutral-disabled",
|
|
61
82
|
"bg-interactive-neutral-weak-disabled"
|
|
62
83
|
],
|
|
@@ -67,17 +88,19 @@ var color_tokens_default = {
|
|
|
67
88
|
"bg-surface3": ["bg-surface-neutral-strong"],
|
|
68
89
|
"bg-fgSurface4": [
|
|
69
90
|
"fg-content-neutral",
|
|
70
|
-
"fg-interactive-neutral
|
|
71
|
-
"fg-interactive-neutral"
|
|
91
|
+
"fg-interactive-neutral",
|
|
92
|
+
"fg-interactive-neutral-active"
|
|
72
93
|
],
|
|
73
94
|
"bg-fgSurface3": [
|
|
74
95
|
"fg-content-neutral-weak",
|
|
75
96
|
"fg-interactive-brand-strong-disabled",
|
|
97
|
+
"fg-interactive-error-strong-disabled",
|
|
76
98
|
"fg-interactive-neutral-strong-disabled",
|
|
77
99
|
"fg-interactive-neutral-weak"
|
|
78
100
|
],
|
|
79
101
|
"bg-fgSurface2": [
|
|
80
102
|
"fg-interactive-brand-disabled",
|
|
103
|
+
"fg-interactive-error-disabled",
|
|
81
104
|
"fg-interactive-neutral-disabled",
|
|
82
105
|
"fg-interactive-neutral-weak-disabled"
|
|
83
106
|
],
|
|
@@ -94,7 +117,6 @@ var color_tokens_default = {
|
|
|
94
117
|
"bg-stroke2": [
|
|
95
118
|
"bg-thumb-brand-disabled",
|
|
96
119
|
"bg-track-neutral",
|
|
97
|
-
"stroke-interactive-brand-disabled",
|
|
98
120
|
"stroke-interactive-neutral-disabled",
|
|
99
121
|
"stroke-surface-neutral"
|
|
100
122
|
],
|
|
@@ -102,8 +124,8 @@ var color_tokens_default = {
|
|
|
102
124
|
"bg-bgFillInverted2": ["bg-interactive-neutral-strong-active"],
|
|
103
125
|
"bg-bgFillInverted1": ["bg-interactive-neutral-strong"],
|
|
104
126
|
"bg-fgFillInverted": [
|
|
105
|
-
"fg-interactive-neutral-strong
|
|
106
|
-
"fg-interactive-neutral-strong"
|
|
127
|
+
"fg-interactive-neutral-strong",
|
|
128
|
+
"fg-interactive-neutral-strong-active"
|
|
107
129
|
],
|
|
108
130
|
"bg-surface1": ["bg-surface-neutral-weak"],
|
|
109
131
|
"caution-surface2": ["bg-surface-caution-weak"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/prebuilt/ts/color-tokens.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * This file is generated by the @wordpress/terrazzo-plugin-inline-alias-values plugin.\n * Do not edit this file directly.\n */\n\nexport default {\n\t'primary-bgFill1': [ 'bg-interactive-brand-strong' ],\n\t'primary-fgFill': [\n\t\t'fg-interactive-brand-strong
|
|
5
|
-
"mappings": ";AAKA,IAAO,uBAAQ;AAAA,EACd,mBAAmB,CAAE,6BAA8B;AAAA,EACnD,kBAAkB;AAAA,IACjB;AAAA,IACA;AAAA,EACD;AAAA,EACA,mBAAmB,CAAE,oCAAqC;AAAA,EAC1D,oBAAoB,CAAE,6BAA8B;AAAA,EACpD,oBAAoB,CAAE,kCAAmC;AAAA,EACzD,sBAAsB;AAAA,IACrB;AAAA,IACA;AAAA,EACD;AAAA,EACA,mBAAmB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACA,mBAAmB,CAAE,iCAAkC;AAAA,EACvD,mBAAmB,CAAE,sBAAuB;AAAA,EAC5C,oBAAoB,CAAE,kBAAmB;AAAA,EACzC,iBAAiB,CAAE,sBAAuB;AAAA,EAC1C,iBAAiB,CAAE,iBAAkB;AAAA,EACrC,mBAAmB,CAAE,iBAAkB;AAAA,EACvC,mBAAmB,CAAE,sBAAuB;AAAA,EAC5C,gBAAgB,CAAE,4BAA6B;AAAA,EAC/C,gBAAgB,CAAE,qBAAsB;AAAA,EACxC,oBAAoB,CAAE,yBAA0B;AAAA,EAChD,oBAAoB,CAAE,oBAAqB;AAAA,EAC3C,sBAAsB,CAAE,oBAAqB;AAAA,EAC7C,sBAAsB,CAAE,yBAA0B;AAAA,EAClD,mBAAmB,CAAE,+BAAgC;AAAA,EACrD,mBAAmB,CAAE,wBAAyB;AAAA,EAC9C,oBAAoB,CAAE,yBAA0B;AAAA,EAChD,oBAAoB,CAAE,oBAAqB;AAAA,EAC3C,sBAAsB,CAAE,oBAAqB;AAAA,EAC7C,sBAAsB,CAAE,yBAA0B;AAAA,EAClD,mBAAmB,CAAE,+BAAgC;AAAA,EACrD,mBAAmB,CAAE,wBAAyB;AAAA,EAC9C,
|
|
4
|
+
"sourcesContent": ["/**\n * This file is generated by the @wordpress/terrazzo-plugin-inline-alias-values plugin.\n * Do not edit this file directly.\n */\n\nexport default {\n\t'primary-bgFill1': [ 'bg-interactive-brand-strong' ],\n\t'primary-fgFill': [\n\t\t'fg-interactive-brand-strong',\n\t\t'fg-interactive-brand-strong-active',\n\t],\n\t'primary-bgFill2': [ 'bg-interactive-brand-strong-active' ],\n\t'primary-surface2': [ 'bg-interactive-brand-active' ],\n\t'primary-surface4': [ 'bg-interactive-brand-weak-active' ],\n\t'primary-fgSurface3': [\n\t\t'fg-interactive-brand',\n\t\t'fg-interactive-brand-active',\n\t],\n\t'primary-stroke3': [\n\t\t'bg-thumb-brand',\n\t\t'bg-thumb-brand-active',\n\t\t'stroke-focus-brand',\n\t\t'stroke-interactive-brand',\n\t\t'stroke-surface-brand-strong',\n\t],\n\t'primary-stroke4': [ 'stroke-interactive-brand-active' ],\n\t'primary-stroke1': [ 'stroke-surface-brand' ],\n\t'primary-surface1': [ 'bg-surface-brand' ],\n\t'info-surface2': [ 'bg-surface-info-weak' ],\n\t'info-surface4': [ 'bg-surface-info' ],\n\t'info-fgSurface4': [ 'fg-content-info' ],\n\t'info-fgSurface3': [ 'fg-content-info-weak' ],\n\t'info-stroke3': [ 'stroke-surface-info-strong' ],\n\t'info-stroke1': [ 'stroke-surface-info' ],\n\t'success-surface2': [ 'bg-surface-success-weak' ],\n\t'success-surface4': [ 'bg-surface-success' ],\n\t'success-fgSurface4': [ 'fg-content-success' ],\n\t'success-fgSurface3': [ 'fg-content-success-weak' ],\n\t'success-stroke3': [ 'stroke-surface-success-strong' ],\n\t'success-stroke1': [ 'stroke-surface-success' ],\n\t'warning-surface2': [ 'bg-surface-warning-weak' ],\n\t'warning-surface4': [ 'bg-surface-warning' ],\n\t'warning-fgSurface4': [ 'fg-content-warning' ],\n\t'warning-fgSurface3': [ 'fg-content-warning-weak' ],\n\t'warning-stroke3': [ 'stroke-surface-warning-strong' ],\n\t'warning-stroke1': [ 'stroke-surface-warning' ],\n\t'error-bgFill1': [ 'bg-interactive-error-strong' ],\n\t'error-fgFill': [\n\t\t'fg-interactive-error-strong',\n\t\t'fg-interactive-error-strong-active',\n\t],\n\t'error-bgFill2': [ 'bg-interactive-error-strong-active' ],\n\t'error-surface2': [\n\t\t'bg-interactive-error-active',\n\t\t'bg-surface-error-weak',\n\t],\n\t'error-surface4': [\n\t\t'bg-interactive-error-weak-active',\n\t\t'bg-surface-error',\n\t],\n\t'error-fgSurface4': [ 'fg-content-error' ],\n\t'error-fgSurface3': [\n\t\t'fg-content-error-weak',\n\t\t'fg-interactive-error',\n\t\t'fg-interactive-error-active',\n\t],\n\t'error-stroke3': [\n\t\t'stroke-interactive-error',\n\t\t'stroke-interactive-error-strong',\n\t\t'stroke-surface-error-strong',\n\t],\n\t'error-stroke4': [ 'stroke-interactive-error-active' ],\n\t'error-stroke1': [ 'stroke-surface-error' ],\n\t'bg-surface2': [ 'bg-surface-neutral' ],\n\t'bg-surface6': [\n\t\t'bg-interactive-brand-strong-disabled',\n\t\t'bg-interactive-error-strong-disabled',\n\t\t'bg-interactive-neutral-strong-disabled',\n\t],\n\t'bg-surface5': [\n\t\t'bg-interactive-brand-disabled',\n\t\t'bg-interactive-brand-weak-disabled',\n\t\t'bg-interactive-error-disabled',\n\t\t'bg-interactive-error-weak-disabled',\n\t\t'bg-interactive-neutral-disabled',\n\t\t'bg-interactive-neutral-weak-disabled',\n\t],\n\t'bg-surface4': [\n\t\t'bg-interactive-neutral-active',\n\t\t'bg-interactive-neutral-weak-active',\n\t],\n\t'bg-surface3': [ 'bg-surface-neutral-strong' ],\n\t'bg-fgSurface4': [\n\t\t'fg-content-neutral',\n\t\t'fg-interactive-neutral',\n\t\t'fg-interactive-neutral-active',\n\t],\n\t'bg-fgSurface3': [\n\t\t'fg-content-neutral-weak',\n\t\t'fg-interactive-brand-strong-disabled',\n\t\t'fg-interactive-error-strong-disabled',\n\t\t'fg-interactive-neutral-strong-disabled',\n\t\t'fg-interactive-neutral-weak',\n\t],\n\t'bg-fgSurface2': [\n\t\t'fg-interactive-brand-disabled',\n\t\t'fg-interactive-error-disabled',\n\t\t'fg-interactive-neutral-disabled',\n\t\t'fg-interactive-neutral-weak-disabled',\n\t],\n\t'bg-stroke3': [\n\t\t'bg-thumb-neutral-weak',\n\t\t'stroke-interactive-neutral',\n\t\t'stroke-surface-neutral-strong',\n\t],\n\t'bg-stroke4': [\n\t\t'bg-thumb-neutral-weak-active',\n\t\t'stroke-interactive-neutral-active',\n\t\t'stroke-interactive-neutral-strong',\n\t],\n\t'bg-stroke2': [\n\t\t'bg-thumb-brand-disabled',\n\t\t'bg-track-neutral',\n\t\t'stroke-interactive-neutral-disabled',\n\t\t'stroke-surface-neutral',\n\t],\n\t'bg-stroke1': [ 'bg-track-neutral-weak', 'stroke-surface-neutral-weak' ],\n\t'bg-bgFillInverted2': [ 'bg-interactive-neutral-strong-active' ],\n\t'bg-bgFillInverted1': [ 'bg-interactive-neutral-strong' ],\n\t'bg-fgFillInverted': [\n\t\t'fg-interactive-neutral-strong',\n\t\t'fg-interactive-neutral-strong-active',\n\t],\n\t'bg-surface1': [ 'bg-surface-neutral-weak' ],\n\t'caution-surface2': [ 'bg-surface-caution-weak' ],\n\t'caution-surface4': [ 'bg-surface-caution' ],\n\t'caution-fgSurface4': [ 'fg-content-caution' ],\n\t'caution-fgSurface3': [ 'fg-content-caution-weak' ],\n} as Record< string, string[] >;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PlainColorObject } from 'colorjs.io/fn';
|
|
5
5
|
/**
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
@@ -12,7 +12,6 @@ import { type TaperChromaOptions } from './taper-chroma';
|
|
|
12
12
|
* - the L applied to the seed meets the contrast target against the reference
|
|
13
13
|
* - the search is performed in one direction (ie lighter / darker)
|
|
14
14
|
* - more constraints can be applied around lightness
|
|
15
|
-
* - chroma could be tapered
|
|
16
15
|
* @param reference
|
|
17
16
|
* @param seed
|
|
18
17
|
* @param target
|
|
@@ -23,14 +22,14 @@ import { type TaperChromaOptions } from './taper-chroma';
|
|
|
23
22
|
* @param options.lightnessConstraint.value
|
|
24
23
|
* @param options.taperChromaOptions
|
|
25
24
|
*/
|
|
26
|
-
export declare function findColorMeetingRequirements(reference:
|
|
25
|
+
export declare function findColorMeetingRequirements(reference: PlainColorObject, seed: PlainColorObject, target: number, direction: 'lighter' | 'darker', { lightnessConstraint, taperChromaOptions, }?: {
|
|
27
26
|
lightnessConstraint?: {
|
|
28
27
|
type: 'force' | 'onlyIfSucceeds';
|
|
29
28
|
value: number;
|
|
30
29
|
};
|
|
31
30
|
taperChromaOptions?: TaperChromaOptions;
|
|
32
31
|
}): {
|
|
33
|
-
color:
|
|
32
|
+
color: PlainColorObject;
|
|
34
33
|
reached: boolean;
|
|
35
34
|
achieved: number;
|
|
36
35
|
deficit?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-color-with-constraints.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/find-color-with-constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,KAAK,
|
|
1
|
+
{"version":3,"file":"find-color-with-constraints.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/find-color-with-constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAIjC,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,gBAAgB,CAAC;AAatE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,gBAAgB,EAC3B,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GAAG,QAAQ,EAC/B,EACC,mBAAmB,EACnB,kBAAkB,GAClB,GAAE;IACF,mBAAmB,CAAC,EAAE;QACrB,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC;QACjC,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACnC,GACJ;IACF,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAoGA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { type
|
|
4
|
+
import { type PlainColorObject, type ColorSpace } from 'colorjs.io/fn';
|
|
5
5
|
/**
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
8
8
|
import './register-color-spaces';
|
|
9
9
|
export interface TaperChromaOptions {
|
|
10
|
-
gamut?:
|
|
10
|
+
gamut?: ColorSpace;
|
|
11
11
|
alpha?: number;
|
|
12
12
|
carry?: number;
|
|
13
13
|
cUpperBound?: number;
|
|
@@ -27,10 +27,10 @@ export interface TaperChromaOptions {
|
|
|
27
27
|
* @param lTarget
|
|
28
28
|
* @param options
|
|
29
29
|
*/
|
|
30
|
-
export declare function taperChroma(seed:
|
|
30
|
+
export declare function taperChroma(seed: PlainColorObject, // already OKLCH
|
|
31
31
|
lTarget: number, // [0..1]
|
|
32
32
|
options?: TaperChromaOptions): {
|
|
33
33
|
l: number;
|
|
34
34
|
c: number;
|
|
35
|
-
} |
|
|
35
|
+
} | PlainColorObject;
|
|
36
36
|
//# sourceMappingURL=taper-chroma.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taper-chroma.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/taper-chroma.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"taper-chroma.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/taper-chroma.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAKN,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAEjC,MAAM,WAAW,kBAAkB;IAClC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,gBAAgB,EAAE,gBAAgB;AACxC,OAAO,EAAE,MAAM,EAAE,SAAS;AAC1B,OAAO,GAAE,kBAAuB,GAC9B;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CA+D7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-tokens.d.ts","sourceRoot":"","sources":["../../../src/prebuilt/ts/color-tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"color-tokens.d.ts","sourceRoot":"","sources":["../../../src/prebuilt/ts/color-tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;wBAuIE,MAAM,CAAE,MAAM,EAAE,MAAM,EAAE,CAAE;AArI/B,wBAqIgC"}
|
package/docs/ds-tokens.md
CHANGED
|
@@ -9,13 +9,17 @@ Do not edit directly.
|
|
|
9
9
|
|
|
10
10
|
### Border
|
|
11
11
|
|
|
12
|
-
| Variable name
|
|
13
|
-
|
|
|
14
|
-
| `--wpds-border-radius-
|
|
15
|
-
| `--wpds-border-radius-
|
|
16
|
-
| `--wpds-border-radius-
|
|
17
|
-
| `--wpds-border-radius-
|
|
18
|
-
| `--wpds-border-width-
|
|
12
|
+
| Variable name | Description |
|
|
13
|
+
| --------------------------------------- | ------------------------------- |
|
|
14
|
+
| `--wpds-border-radius-surface-xs` | Extra small radius for surfaces |
|
|
15
|
+
| `--wpds-border-radius-surface-sm` | Small radius for surfaces |
|
|
16
|
+
| `--wpds-border-radius-surface-md` | Medium radius for surfaces |
|
|
17
|
+
| `--wpds-border-radius-surface-lg` | Large radius for surfaces |
|
|
18
|
+
| `--wpds-border-width-surface-xs` | Extra small width for surfaces |
|
|
19
|
+
| `--wpds-border-width-surface-sm` | Small width for surfaces |
|
|
20
|
+
| `--wpds-border-width-surface-md` | Medium width for surfaces |
|
|
21
|
+
| `--wpds-border-width-surface-lg` | Large width for surfaces |
|
|
22
|
+
| `--wpds-border-width-interactive-focus` | Border width for focus ring |
|
|
19
23
|
|
|
20
24
|
### Color
|
|
21
25
|
|
|
@@ -53,6 +57,15 @@ Do not edit directly.
|
|
|
53
57
|
| `--wpds-color-bg-interactive-brand-weak` | Background color for interactive elements with brand tone and weak emphasis. |
|
|
54
58
|
| `--wpds-color-bg-interactive-brand-weak-active` | Background color for interactive elements with brand tone and weak emphasis that are hovered, focused, or active. |
|
|
55
59
|
| `--wpds-color-bg-interactive-brand-weak-disabled` | Background color for interactive elements with brand tone and weak emphasis, in their disabled state. |
|
|
60
|
+
| `--wpds-color-bg-interactive-error` | Background color for interactive elements with error tone and normal emphasis. |
|
|
61
|
+
| `--wpds-color-bg-interactive-error-active` | Background color for interactive elements with error tone and normal emphasis that are hovered, focused, or active. |
|
|
62
|
+
| `--wpds-color-bg-interactive-error-disabled` | Background color for interactive elements with error tone and normal emphasis, in their disabled state. |
|
|
63
|
+
| `--wpds-color-bg-interactive-error-strong` | Background color for interactive elements with error tone and strong emphasis. |
|
|
64
|
+
| `--wpds-color-bg-interactive-error-strong-active` | Background color for interactive elements with error tone and strong emphasis that are hovered, focused, or active. |
|
|
65
|
+
| `--wpds-color-bg-interactive-error-strong-disabled` | Background color for interactive elements with error tone and strong emphasis, in their disabled state. |
|
|
66
|
+
| `--wpds-color-bg-interactive-error-weak` | Background color for interactive elements with error tone and weak emphasis. |
|
|
67
|
+
| `--wpds-color-bg-interactive-error-weak-active` | Background color for interactive elements with error tone and weak emphasis that are hovered, focused, or active. |
|
|
68
|
+
| `--wpds-color-bg-interactive-error-weak-disabled` | Background color for interactive elements with error tone and weak emphasis, in their disabled state. |
|
|
56
69
|
| `--wpds-color-bg-track-neutral-weak` | Background color for tracks with a neutral tone and weak emphasis (eg. scrollbar track). |
|
|
57
70
|
| `--wpds-color-bg-track-neutral` | Background color for tracks with a neutral tone and normal emphasis (eg. slider or progressbar track). |
|
|
58
71
|
| `--wpds-color-bg-thumb-neutral-weak` | Background color for thumbs with a neutral tone and weak emphasis (eg. scrollbar thumb). |
|
|
@@ -86,11 +99,17 @@ Do not edit directly.
|
|
|
86
99
|
| `--wpds-color-fg-interactive-brand-strong` | Foreground color for interactive elements with brand tone and strong emphasis. |
|
|
87
100
|
| `--wpds-color-fg-interactive-brand-strong-active` | Foreground color for interactive elements with brand tone and strong emphasis that are hovered, focused, or active. |
|
|
88
101
|
| `--wpds-color-fg-interactive-brand-strong-disabled` | Foreground color for interactive elements with brand tone and strong emphasis, in their disabled state. |
|
|
102
|
+
| `--wpds-color-fg-interactive-error` | Foreground color for interactive elements with error tone and normal emphasis. |
|
|
103
|
+
| `--wpds-color-fg-interactive-error-active` | Foreground color for interactive elements with error tone and normal emphasis that are hovered, focused, or active. |
|
|
104
|
+
| `--wpds-color-fg-interactive-error-disabled` | Foreground color for interactive elements with error tone and normal emphasis, in their disabled state. |
|
|
105
|
+
| `--wpds-color-fg-interactive-error-strong` | Foreground color for interactive elements with error tone and strong emphasis. |
|
|
106
|
+
| `--wpds-color-fg-interactive-error-strong-active` | Foreground color for interactive elements with error tone and strong emphasis that are hovered, focused, or active. |
|
|
107
|
+
| `--wpds-color-fg-interactive-error-strong-disabled` | Foreground color for interactive elements with error tone and strong emphasis, in their disabled state. |
|
|
89
108
|
| `--wpds-color-stroke-surface-neutral` | Decorative stroke color used to define neutrally-toned surface boundaries with normal emphasis. |
|
|
90
109
|
| `--wpds-color-stroke-surface-neutral-weak` | Decorative stroke color used to define neutrally-toned surface boundaries with weak emphasis. |
|
|
91
110
|
| `--wpds-color-stroke-surface-neutral-strong` | Decorative stroke color used to define neutrally-toned surface boundaries with strong emphasis. |
|
|
92
111
|
| `--wpds-color-stroke-surface-brand` | Decorative stroke color used to define brand-toned surface boundaries with normal emphasis. |
|
|
93
|
-
| `--wpds-color-stroke-surface-brand-strong` | Decorative stroke color used to define
|
|
112
|
+
| `--wpds-color-stroke-surface-brand-strong` | Decorative stroke color used to define brand-toned surface boundaries with strong emphasis. |
|
|
94
113
|
| `--wpds-color-stroke-surface-success` | Decorative stroke color used to define success-toned surface boundaries with normal emphasis. |
|
|
95
114
|
| `--wpds-color-stroke-surface-success-strong` | Decorative stroke color used to define success-toned surface boundaries with strong emphasis. |
|
|
96
115
|
| `--wpds-color-stroke-surface-info` | Decorative stroke color used to define info-toned surface boundaries with normal emphasis. |
|
|
@@ -105,7 +124,8 @@ Do not edit directly.
|
|
|
105
124
|
| `--wpds-color-stroke-interactive-neutral-strong` | Accessible stroke color used for interactive neutrally-toned elements with strong emphasis. |
|
|
106
125
|
| `--wpds-color-stroke-interactive-brand` | Accessible stroke color used for interactive brand-toned elements with normal emphasis. |
|
|
107
126
|
| `--wpds-color-stroke-interactive-brand-active` | Accessible stroke color used for interactive brand-toned elements with normal emphasis that are hovered, focused, or active. |
|
|
108
|
-
| `--wpds-color-stroke-interactive-
|
|
127
|
+
| `--wpds-color-stroke-interactive-error` | Accessible stroke color used for interactive error-toned elements with normal emphasis. |
|
|
128
|
+
| `--wpds-color-stroke-interactive-error-active` | Accessible stroke color used for interactive error-toned elements with normal emphasis that are hovered, focused, or active. |
|
|
109
129
|
| `--wpds-color-stroke-interactive-error-strong` | Accessible stroke color used for interactive error-toned elements with strong emphasis. |
|
|
110
130
|
| `--wpds-color-stroke-focus-brand` | Accessible stroke color applied to focus rings. |
|
|
111
131
|
|
|
@@ -119,6 +139,12 @@ Do not edit directly.
|
|
|
119
139
|
| `--wpds-dimension-padding-surface-sm` | Small spacing for surfaces |
|
|
120
140
|
| `--wpds-dimension-padding-surface-md` | Medium spacing for surfaces |
|
|
121
141
|
| `--wpds-dimension-padding-surface-lg` | Large spacing for surfaces |
|
|
142
|
+
| `--wpds-dimension-gap-2xs` | 2x extra small gap |
|
|
143
|
+
| `--wpds-dimension-gap-xs` | Extra small gap |
|
|
144
|
+
| `--wpds-dimension-gap-sm` | Small gap |
|
|
145
|
+
| `--wpds-dimension-gap-md` | Medium gap |
|
|
146
|
+
| `--wpds-dimension-gap-lg` | Large gap |
|
|
147
|
+
| `--wpds-dimension-gap-xl` | Extra large gap |
|
|
122
148
|
|
|
123
149
|
### Elevation
|
|
124
150
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Theme and context provider for the WordPress Design System.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"build-module/color-ramps/lib/register-color-spaces.js"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@wordpress/element": "^6.
|
|
47
|
-
"@wordpress/private-apis": "^1.
|
|
46
|
+
"@wordpress/element": "^6.37.0",
|
|
47
|
+
"@wordpress/private-apis": "^1.37.0",
|
|
48
48
|
"colorjs.io": "^0.5.2",
|
|
49
49
|
"memize": "^2.1.0"
|
|
50
50
|
},
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"build:default-ramps": "node --import=esbuild-esm-loader/register bin/generate-default-ramps/index.ts",
|
|
63
63
|
"build:tokens": "node --import=esbuild-esm-loader/register bin/generate-primitive-tokens/index.ts && cross-env NODE_OPTIONS=--import=esbuild-esm-loader/register tz build --config terrazzo.config.ts",
|
|
64
64
|
"build": "npm run build:tokens && npm run build:default-ramps",
|
|
65
|
-
"postbuild": "prettier --write tokens/color.json src/prebuilt src/color-ramps/lib/default-ramps.ts docs"
|
|
65
|
+
"postbuild": "prettier --write tokens/color.json tokens/modes src/prebuilt src/color-ramps/lib/default-ramps.ts docs"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "2cf13ec6cf86153c9b3cf369bf5c59046f5cd950"
|
|
68
68
|
}
|
|
@@ -40,10 +40,10 @@ export const DEFAULT_RAMPS: Record<
|
|
|
40
40
|
bgFill1: '#3858e9',
|
|
41
41
|
fgFill: '#eff0f2',
|
|
42
42
|
bgFill2: '#2e49d9',
|
|
43
|
-
surface2: '#
|
|
44
|
-
surface6: '#
|
|
43
|
+
surface2: '#f6f8fd',
|
|
44
|
+
surface6: '#c7d2ed',
|
|
45
45
|
surface5: '#dbe2f4',
|
|
46
|
-
surface4: '#
|
|
46
|
+
surface4: '#e6eaf4',
|
|
47
47
|
surface3: '#fff',
|
|
48
48
|
fgSurface4: '#0b0070',
|
|
49
49
|
fgSurface3: '#3858e9',
|
|
@@ -51,11 +51,11 @@ export const DEFAULT_RAMPS: Record<
|
|
|
51
51
|
fgSurface1: '#85a9ff',
|
|
52
52
|
stroke3: '#3858e9',
|
|
53
53
|
stroke4: '#2337c8',
|
|
54
|
-
stroke2: '#
|
|
55
|
-
stroke1: '#
|
|
56
|
-
bgFillDark: '#
|
|
54
|
+
stroke2: '#9caacc',
|
|
55
|
+
stroke1: '#a3b1d4',
|
|
56
|
+
bgFillDark: '#1a1e27',
|
|
57
57
|
fgFillDark: '#eff0f2',
|
|
58
|
-
bgFillInverted2: '#
|
|
58
|
+
bgFillInverted2: '#1a1e27',
|
|
59
59
|
bgFillInverted1: '#13009f',
|
|
60
60
|
fgFillInverted: '#eff0f2',
|
|
61
61
|
surface1: '#ecf0f9',
|
|
@@ -65,27 +65,27 @@ export const DEFAULT_RAMPS: Record<
|
|
|
65
65
|
info: {
|
|
66
66
|
ramp: {
|
|
67
67
|
bgFill1: '#0090ff',
|
|
68
|
-
fgFill: '#
|
|
68
|
+
fgFill: '#1a1f24',
|
|
69
69
|
bgFill2: '#007fed',
|
|
70
|
-
surface2: '#
|
|
71
|
-
surface6: '#
|
|
72
|
-
surface5: '#
|
|
73
|
-
surface4: '#
|
|
70
|
+
surface2: '#f3f9ff',
|
|
71
|
+
surface6: '#bcd5f1',
|
|
72
|
+
surface5: '#d3e4f7',
|
|
73
|
+
surface4: '#deebfa',
|
|
74
74
|
surface3: '#fff',
|
|
75
75
|
fgSurface4: '#001b4f',
|
|
76
76
|
fgSurface3: '#006bd7',
|
|
77
77
|
fgSurface2: '#008bfa',
|
|
78
|
-
fgSurface1: '#
|
|
78
|
+
fgSurface1: '#58b0ff',
|
|
79
79
|
stroke3: '#006bd7',
|
|
80
80
|
stroke4: '#004fa9',
|
|
81
|
-
stroke2: '#
|
|
82
|
-
stroke1: '#
|
|
83
|
-
bgFillDark: '#
|
|
84
|
-
fgFillDark: '#
|
|
85
|
-
bgFillInverted2: '#
|
|
81
|
+
stroke2: '#95b5d9',
|
|
82
|
+
stroke1: '#9fbcdc',
|
|
83
|
+
bgFillDark: '#1a1f24',
|
|
84
|
+
fgFillDark: '#eef0f3',
|
|
85
|
+
bgFillInverted2: '#1a1f24',
|
|
86
86
|
bgFillInverted1: '#002a69',
|
|
87
|
-
fgFillInverted: '#
|
|
88
|
-
surface1: '#
|
|
87
|
+
fgFillInverted: '#eef0f3',
|
|
88
|
+
surface1: '#e4f1ff',
|
|
89
89
|
},
|
|
90
90
|
direction: 'darker',
|
|
91
91
|
},
|
|
@@ -94,25 +94,25 @@ export const DEFAULT_RAMPS: Record<
|
|
|
94
94
|
bgFill1: '#4ab866',
|
|
95
95
|
fgFill: '#1b1f1c',
|
|
96
96
|
bgFill2: '#37a756',
|
|
97
|
-
surface2: '#
|
|
98
|
-
surface6: '#
|
|
99
|
-
surface5: '#
|
|
100
|
-
surface4: '#
|
|
97
|
+
surface2: '#eaffed',
|
|
98
|
+
surface6: '#88e89b',
|
|
99
|
+
surface5: '#aff3bb',
|
|
100
|
+
surface4: '#c5f7cc',
|
|
101
101
|
surface3: '#fff',
|
|
102
102
|
fgSurface4: '#002900',
|
|
103
103
|
fgSurface3: '#007f30',
|
|
104
104
|
fgSurface2: '#2b9e4e',
|
|
105
|
-
fgSurface1: '#
|
|
105
|
+
fgSurface1: '#53c16e',
|
|
106
106
|
stroke3: '#007f30',
|
|
107
107
|
stroke4: '#006013',
|
|
108
|
-
stroke2: '#
|
|
109
|
-
stroke1: '#
|
|
108
|
+
stroke2: '#84c08e',
|
|
109
|
+
stroke1: '#8ac894',
|
|
110
110
|
bgFillDark: '#1b1f1c',
|
|
111
|
-
fgFillDark: '#
|
|
111
|
+
fgFillDark: '#eaf3eb',
|
|
112
112
|
bgFillInverted2: '#1b1f1c',
|
|
113
113
|
bgFillInverted1: '#003701',
|
|
114
|
-
fgFillInverted: '#
|
|
115
|
-
surface1: '#
|
|
114
|
+
fgFillInverted: '#eaf3eb',
|
|
115
|
+
surface1: '#cbfdd2',
|
|
116
116
|
},
|
|
117
117
|
direction: 'darker',
|
|
118
118
|
},
|
|
@@ -121,25 +121,25 @@ export const DEFAULT_RAMPS: Record<
|
|
|
121
121
|
bgFill1: '#f0d149',
|
|
122
122
|
fgFill: '#1f1e1b',
|
|
123
123
|
bgFill2: '#dcbe2f',
|
|
124
|
-
surface2: '#
|
|
125
|
-
surface6: '#
|
|
126
|
-
surface5: '#
|
|
127
|
-
surface4: '#
|
|
124
|
+
surface2: '#fff9c9',
|
|
125
|
+
surface6: '#e8d172',
|
|
126
|
+
surface5: '#f7e18a',
|
|
127
|
+
surface4: '#fee994',
|
|
128
128
|
surface3: '#fff',
|
|
129
129
|
fgSurface4: '#281d00',
|
|
130
|
-
fgSurface3: '#
|
|
131
|
-
fgSurface2: '#
|
|
132
|
-
fgSurface1: '#
|
|
133
|
-
stroke3: '#
|
|
134
|
-
stroke4: '#
|
|
135
|
-
stroke2: '#
|
|
136
|
-
stroke1: '#
|
|
130
|
+
fgSurface3: '#826a00',
|
|
131
|
+
fgSurface2: '#a48600',
|
|
132
|
+
fgSurface1: '#c6a800',
|
|
133
|
+
stroke3: '#826a00',
|
|
134
|
+
stroke4: '#624f00',
|
|
135
|
+
stroke2: '#bdb17e',
|
|
136
|
+
stroke1: '#c5b883',
|
|
137
137
|
bgFillDark: '#1f1e1b',
|
|
138
|
-
fgFillDark: '#
|
|
138
|
+
fgFillDark: '#fdf1bf',
|
|
139
139
|
bgFillInverted2: '#1f1e1b',
|
|
140
140
|
bgFillInverted1: '#392c00',
|
|
141
|
-
fgFillInverted: '#
|
|
142
|
-
surface1: '#
|
|
141
|
+
fgFillInverted: '#fdf1bf',
|
|
142
|
+
surface1: '#ffef9b',
|
|
143
143
|
},
|
|
144
144
|
direction: 'darker',
|
|
145
145
|
},
|
|
@@ -148,25 +148,25 @@ export const DEFAULT_RAMPS: Record<
|
|
|
148
148
|
bgFill1: '#f0b849',
|
|
149
149
|
fgFill: '#1f1e1b',
|
|
150
150
|
bgFill2: '#dda633',
|
|
151
|
-
surface2: '#
|
|
152
|
-
surface6: '#
|
|
153
|
-
surface5: '#
|
|
154
|
-
surface4: '#
|
|
151
|
+
surface2: '#fff7e0',
|
|
152
|
+
surface6: '#f4cc84',
|
|
153
|
+
surface5: '#faddac',
|
|
154
|
+
surface4: '#fde6bd',
|
|
155
155
|
surface3: '#fff',
|
|
156
156
|
fgSurface4: '#2e1900',
|
|
157
|
-
fgSurface3: '#
|
|
158
|
-
fgSurface2: '#
|
|
159
|
-
fgSurface1: '#
|
|
160
|
-
stroke3: '#
|
|
161
|
-
stroke4: '#
|
|
162
|
-
stroke2: '#
|
|
163
|
-
stroke1: '#
|
|
157
|
+
fgSurface3: '#926300',
|
|
158
|
+
fgSurface2: '#b47f00',
|
|
159
|
+
fgSurface1: '#d7a02a',
|
|
160
|
+
stroke3: '#926300',
|
|
161
|
+
stroke4: '#6f4900',
|
|
162
|
+
stroke2: '#c7ad7e',
|
|
163
|
+
stroke1: '#d0b381',
|
|
164
164
|
bgFillDark: '#1f1e1b',
|
|
165
|
-
fgFillDark: '#
|
|
165
|
+
fgFillDark: '#f7efe2',
|
|
166
166
|
bgFillInverted2: '#1f1e1b',
|
|
167
167
|
bgFillInverted1: '#422800',
|
|
168
|
-
fgFillInverted: '#
|
|
169
|
-
surface1: '#
|
|
168
|
+
fgFillInverted: '#f7efe2',
|
|
169
|
+
surface1: '#ffecc4',
|
|
170
170
|
},
|
|
171
171
|
direction: 'darker',
|
|
172
172
|
},
|
|
@@ -175,10 +175,10 @@ export const DEFAULT_RAMPS: Record<
|
|
|
175
175
|
bgFill1: '#cc1818',
|
|
176
176
|
fgFill: '#f2efef',
|
|
177
177
|
bgFill2: '#b90000',
|
|
178
|
-
surface2: '#
|
|
179
|
-
surface6: '#
|
|
180
|
-
surface5: '#
|
|
181
|
-
surface4: '#
|
|
178
|
+
surface2: '#fff6f4',
|
|
179
|
+
surface6: '#f3c8c2',
|
|
180
|
+
surface5: '#f8dcd7',
|
|
181
|
+
surface4: '#f6e6e3',
|
|
182
182
|
surface3: '#fff',
|
|
183
183
|
fgSurface4: '#470000',
|
|
184
184
|
fgSurface3: '#cc1818',
|
|
@@ -186,14 +186,14 @@ export const DEFAULT_RAMPS: Record<
|
|
|
186
186
|
fgSurface1: '#ff8879',
|
|
187
187
|
stroke3: '#cc1818',
|
|
188
188
|
stroke4: '#9d0000',
|
|
189
|
-
stroke2: '#
|
|
190
|
-
stroke1: '#
|
|
189
|
+
stroke2: '#d39c95',
|
|
190
|
+
stroke1: '#daa39b',
|
|
191
191
|
bgFillDark: '#231c1b',
|
|
192
192
|
fgFillDark: '#f2efef',
|
|
193
193
|
bgFillInverted2: '#231c1b',
|
|
194
194
|
bgFillInverted1: '#640000',
|
|
195
195
|
fgFillInverted: '#f2efef',
|
|
196
|
-
surface1: '#
|
|
196
|
+
surface1: '#fcece9',
|
|
197
197
|
},
|
|
198
198
|
direction: 'darker',
|
|
199
199
|
},
|