@wordpress/theme 0.1.0 → 0.1.1-next.2f1c7c01b.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 (142) hide show
  1. package/README.md +69 -9
  2. package/bin/generate-default-ramps/index.ts +49 -0
  3. package/bin/generate-primitive-tokens/index.ts +14 -9
  4. package/bin/terrazzo-plugin-figma-ds-token-manager/index.ts +11 -4
  5. package/build/color-ramps/index.js +21 -39
  6. package/build/color-ramps/index.js.map +3 -3
  7. package/build/color-ramps/lib/color-utils.js +39 -0
  8. package/build/color-ramps/lib/color-utils.js.map +7 -0
  9. package/build/color-ramps/lib/constants.js +18 -25
  10. package/build/color-ramps/lib/constants.js.map +3 -3
  11. package/build/color-ramps/lib/default-ramps.js +220 -0
  12. package/build/color-ramps/lib/default-ramps.js.map +7 -0
  13. package/build/color-ramps/lib/find-color-with-constraints.js +57 -71
  14. package/build/color-ramps/lib/find-color-with-constraints.js.map +3 -3
  15. package/build/color-ramps/lib/index.js +25 -68
  16. package/build/color-ramps/lib/index.js.map +3 -3
  17. package/build/color-ramps/lib/ramp-configs.js +12 -11
  18. package/build/color-ramps/lib/ramp-configs.js.map +1 -1
  19. package/build/color-ramps/lib/register-color-spaces.js +7 -0
  20. package/build/color-ramps/lib/register-color-spaces.js.map +7 -0
  21. package/build/color-ramps/lib/taper-chroma.js +35 -27
  22. package/build/color-ramps/lib/taper-chroma.js.map +3 -3
  23. package/build/color-ramps/lib/types.js +2 -1
  24. package/build/color-ramps/lib/types.js.map +1 -1
  25. package/build/color-ramps/lib/utils.js +12 -9
  26. package/build/color-ramps/lib/utils.js.map +2 -2
  27. package/build/context.js +3 -2
  28. package/build/context.js.map +1 -1
  29. package/build/index.js +2 -1
  30. package/build/index.js.map +1 -1
  31. package/build/lock-unlock.js +3 -2
  32. package/build/lock-unlock.js.map +1 -1
  33. package/build/prebuilt/js/design-tokens.js +14 -1
  34. package/build/prebuilt/js/design-tokens.js.map +2 -2
  35. package/build/prebuilt/json/figma.json +214 -32
  36. package/build/prebuilt/ts/design-tokens.js +38 -1
  37. package/build/prebuilt/ts/design-tokens.js.map +2 -2
  38. package/build/private-apis.js +3 -2
  39. package/build/private-apis.js.map +1 -1
  40. package/build/theme-provider.js +19 -17
  41. package/build/theme-provider.js.map +4 -4
  42. package/build/types/css-modules.d.js +0 -1
  43. package/build/types.js +2 -1
  44. package/build/types.js.map +1 -1
  45. package/build/use-theme-provider-styles.js +50 -36
  46. package/build/use-theme-provider-styles.js.map +3 -3
  47. package/build-module/color-ramps/index.js +20 -28
  48. package/build-module/color-ramps/index.js.map +2 -2
  49. package/build-module/color-ramps/lib/color-utils.js +19 -0
  50. package/build-module/color-ramps/lib/color-utils.js.map +7 -0
  51. package/build-module/color-ramps/lib/constants.js +13 -10
  52. package/build-module/color-ramps/lib/constants.js.map +2 -2
  53. package/build-module/color-ramps/lib/default-ramps.js +196 -0
  54. package/build-module/color-ramps/lib/default-ramps.js.map +7 -0
  55. package/build-module/color-ramps/lib/find-color-with-constraints.js +56 -60
  56. package/build-module/color-ramps/lib/find-color-with-constraints.js.map +2 -2
  57. package/build-module/color-ramps/lib/index.js +28 -55
  58. package/build-module/color-ramps/lib/index.js.map +3 -3
  59. package/build-module/color-ramps/lib/ramp-configs.js +11 -10
  60. package/build-module/color-ramps/lib/ramp-configs.js.map +1 -1
  61. package/build-module/color-ramps/lib/register-color-spaces.js +7 -0
  62. package/build-module/color-ramps/lib/register-color-spaces.js.map +7 -0
  63. package/build-module/color-ramps/lib/taper-chroma.js +40 -16
  64. package/build-module/color-ramps/lib/taper-chroma.js.map +2 -2
  65. package/build-module/color-ramps/lib/utils.js +7 -4
  66. package/build-module/color-ramps/lib/utils.js.map +2 -2
  67. package/build-module/context.js +2 -1
  68. package/build-module/context.js.map +1 -1
  69. package/build-module/index.js +1 -0
  70. package/build-module/index.js.map +1 -1
  71. package/build-module/lock-unlock.js +2 -1
  72. package/build-module/lock-unlock.js.map +1 -1
  73. package/build-module/prebuilt/js/design-tokens.js +13 -0
  74. package/build-module/prebuilt/js/design-tokens.js.map +2 -2
  75. package/build-module/prebuilt/json/figma.json +214 -32
  76. package/build-module/prebuilt/ts/design-tokens.js +37 -0
  77. package/build-module/prebuilt/ts/design-tokens.js.map +2 -2
  78. package/build-module/private-apis.js +2 -1
  79. package/build-module/private-apis.js.map +1 -1
  80. package/build-module/theme-provider.js +18 -6
  81. package/build-module/theme-provider.js.map +3 -3
  82. package/build-module/use-theme-provider-styles.js +52 -31
  83. package/build-module/use-theme-provider-styles.js.map +2 -2
  84. package/build-types/color-ramps/index.d.ts +9 -16
  85. package/build-types/color-ramps/index.d.ts.map +1 -1
  86. package/build-types/color-ramps/lib/color-utils.d.ts +22 -0
  87. package/build-types/color-ramps/lib/color-utils.d.ts.map +1 -0
  88. package/build-types/color-ramps/lib/constants.d.ts +6 -8
  89. package/build-types/color-ramps/lib/constants.d.ts.map +1 -1
  90. package/build-types/color-ramps/lib/default-ramps.d.ts +7 -0
  91. package/build-types/color-ramps/lib/default-ramps.d.ts.map +1 -0
  92. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts +7 -5
  93. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts.map +1 -1
  94. package/build-types/color-ramps/lib/index.d.ts +5 -2
  95. package/build-types/color-ramps/lib/index.d.ts.map +1 -1
  96. package/build-types/color-ramps/lib/register-color-spaces.d.ts +2 -0
  97. package/build-types/color-ramps/lib/register-color-spaces.d.ts.map +1 -0
  98. package/build-types/color-ramps/lib/taper-chroma.d.ts +7 -3
  99. package/build-types/color-ramps/lib/taper-chroma.d.ts.map +1 -1
  100. package/build-types/color-ramps/lib/utils.d.ts +7 -3
  101. package/build-types/color-ramps/lib/utils.d.ts.map +1 -1
  102. package/build-types/color-ramps/stories/index.story.d.ts.map +1 -1
  103. package/build-types/prebuilt/ts/design-tokens.d.ts.map +1 -1
  104. package/build-types/use-theme-provider-styles.d.ts +4 -0
  105. package/build-types/use-theme-provider-styles.d.ts.map +1 -1
  106. package/docs/ds-tokens.md +34 -0
  107. package/package.json +19 -9
  108. package/src/color-ramps/index.ts +24 -41
  109. package/src/color-ramps/lib/color-utils.ts +34 -0
  110. package/src/color-ramps/lib/constants.ts +8 -6
  111. package/src/color-ramps/lib/default-ramps.ts +200 -0
  112. package/src/color-ramps/lib/find-color-with-constraints.ts +70 -79
  113. package/src/color-ramps/lib/index.ts +27 -61
  114. package/src/color-ramps/lib/register-color-spaces.ts +13 -0
  115. package/src/color-ramps/lib/taper-chroma.ts +47 -19
  116. package/src/color-ramps/lib/utils.ts +8 -9
  117. package/src/color-ramps/stories/index.story.tsx +16 -22
  118. package/src/color-ramps/test/__snapshots__/index.test.ts.snap +96 -96
  119. package/src/color-ramps/test/index.test.ts +27 -15
  120. package/src/prebuilt/css/design-tokens.css +90 -32
  121. package/src/prebuilt/js/design-tokens.js +12 -0
  122. package/src/prebuilt/json/figma.json +214 -32
  123. package/src/prebuilt/ts/design-tokens.ts +36 -0
  124. package/src/use-theme-provider-styles.ts +47 -25
  125. package/tokens/color.json +184 -32
  126. package/tsconfig.bin.json +13 -0
  127. package/tsconfig.bin.tsbuildinfo +1 -0
  128. package/tsconfig.json +6 -4
  129. package/tsconfig.src.json +9 -0
  130. package/tsconfig.src.tsbuildinfo +1 -0
  131. package/bin/build-tokens.js +0 -83
  132. package/build/color-ramps/lib/cache-utils.js +0 -57
  133. package/build/color-ramps/lib/cache-utils.js.map +0 -7
  134. package/build/style.module.css.js +0 -2
  135. package/build-module/color-ramps/lib/cache-utils.js +0 -31
  136. package/build-module/color-ramps/lib/cache-utils.js.map +0 -7
  137. package/build-module/style.module.css.js +0 -1
  138. package/build-style/style.css +0 -3
  139. package/build-types/color-ramps/lib/cache-utils.d.ts +0 -22
  140. package/build-types/color-ramps/lib/cache-utils.d.ts.map +0 -1
  141. package/src/color-ramps/lib/cache-utils.ts +0 -56
  142. package/tsconfig.tsbuildinfo +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/theme",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-next.2f1c7c01b.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",
@@ -32,17 +32,24 @@
32
32
  },
33
33
  "./design-tokens.css": "./src/prebuilt/css/design-tokens.css",
34
34
  "./design-tokens.js": "./src/prebuilt/js/design-tokens.js",
35
- "./package.json": "./package.json",
36
- "./build-style/": "./build-style/"
35
+ "./package.json": "./package.json"
37
36
  },
38
37
  "react-native": "src/index",
39
38
  "wpScript": true,
40
39
  "types": "build-types",
41
- "sideEffects": false,
40
+ "sideEffects": [
41
+ "src/color-ramps/lib/register-color-spaces.ts",
42
+ "build/color-ramps/lib/register-color-spaces.js",
43
+ "build-module/color-ramps/lib/register-color-spaces.js"
44
+ ],
42
45
  "dependencies": {
43
- "@wordpress/element": "^6.34.0",
44
- "@wordpress/private-apis": "^1.34.0",
45
- "colorjs.io": "^0.5.2"
46
+ "@wordpress/element": "^6.34.1-next.2f1c7c01b.0",
47
+ "@wordpress/private-apis": "^1.34.1-next.2f1c7c01b.0",
48
+ "colorjs.io": "^0.5.2",
49
+ "memize": "^2.1.0"
50
+ },
51
+ "devDependencies": {
52
+ "esbuild-esm-loader": "0.3.3"
46
53
  },
47
54
  "peerDependencies": {
48
55
  "react": "^18.0.0",
@@ -52,7 +59,10 @@
52
59
  "access": "public"
53
60
  },
54
61
  "scripts": {
55
- "build": "rimraf src/prebuilt docs && node bin/build-tokens.js && prettier --write tokens/color.json src/prebuilt docs"
62
+ "build:default-ramps": "node --import=esbuild-esm-loader/register bin/generate-default-ramps/index.ts",
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
+ "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"
56
66
  },
57
- "gitHead": "ceebff807958d2e8fc755b5a20473939c78b4d1d"
67
+ "gitHead": "c6ddcdf455bc02567a2c9e03de6862a2061b85e8"
58
68
  }
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import Color from 'colorjs.io';
4
+ import { get, OKLCH, parse, serialize } from 'colorjs.io/fn';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
+ import './lib/register-color-spaces';
9
10
  import { buildRamp } from './lib/index';
10
11
  import { clampAccentScaleReferenceLightness } from './lib/utils';
11
12
  import { BG_RAMP_CONFIG, ACCENT_RAMP_CONFIG } from './lib/ramp-configs';
@@ -14,28 +15,20 @@ import type {
14
15
  RampDirection,
15
16
  Ramp,
16
17
  } from './lib/types';
17
- import { getCachedContrast } from './lib/cache-utils';
18
+ import { getContrast } from './lib/color-utils';
18
19
  import { CONTRAST_COMBINATIONS } from './lib/constants';
19
20
  export { DEFAULT_SEED_COLORS } from './lib/constants';
20
21
 
21
22
  /**
22
23
  * Creates a background ramp.
23
- * @param params
24
- * @param params.seed
25
- * @param params.debug
24
+ * @param seed The seed color for the background ramp.
26
25
  */
27
- export function buildBgRamp( {
28
- seed,
29
- debug,
30
- }: {
31
- seed: string;
32
- debug?: boolean;
33
- } ): InternalRampResult {
26
+ export function buildBgRamp( seed: string ) {
34
27
  if ( typeof seed !== 'string' || seed.trim() === '' ) {
35
28
  throw new Error( 'Seed color must be a non-empty string' );
36
29
  }
37
30
 
38
- return buildRamp( seed, BG_RAMP_CONFIG, { debug } );
31
+ return buildRamp( seed, BG_RAMP_CONFIG );
39
32
  }
40
33
 
41
34
  const STEP_TO_PIN = 'surface2';
@@ -51,7 +44,7 @@ function getBgRampInfo( ramp: InternalRampResult ): {
51
44
  pinLightness: {
52
45
  stepName: STEP_TO_PIN,
53
46
  value: clampAccentScaleReferenceLightness(
54
- new Color( ramp.ramp[ STEP_TO_PIN ].color ).oklch.l,
47
+ get( parse( ramp.ramp[ STEP_TO_PIN ].color ), [ OKLCH, 'l' ] ),
55
48
  ramp.direction
56
49
  ),
57
50
  },
@@ -61,29 +54,19 @@ function getBgRampInfo( ramp: InternalRampResult ): {
61
54
  /**
62
55
  * Creates an accent ramp (ie used by primary, success, info, warning and error
63
56
  * ramps).
64
- * @param params
65
- * @param params.seed
66
- * @param params.bgRamp
67
- * @param params.debug
57
+ * @param seed The seed color for the accent ramp.
58
+ * @param bgRamp The ramp of the background on which the accent is shown.
68
59
  */
69
- export function buildAccentRamp( {
70
- seed,
71
- bgRamp,
72
- debug,
73
- }: {
74
- seed: string;
75
- bgRamp?: InternalRampResult;
76
- debug?: boolean;
77
- } ): InternalRampResult {
60
+ export function buildAccentRamp(
61
+ seed: string,
62
+ bgRamp?: InternalRampResult
63
+ ): InternalRampResult {
78
64
  if ( typeof seed !== 'string' || seed.trim() === '' ) {
79
65
  throw new Error( 'Seed color must be a non-empty string' );
80
66
  }
81
67
 
82
68
  const bgRampInfo = bgRamp ? getBgRampInfo( bgRamp ) : undefined;
83
- return buildRamp( seed, ACCENT_RAMP_CONFIG, {
84
- ...bgRampInfo,
85
- debug,
86
- } );
69
+ return buildRamp( seed, ACCENT_RAMP_CONFIG, bgRampInfo );
87
70
  }
88
71
 
89
72
  /**
@@ -113,14 +96,14 @@ export function checkAccessibleCombinations( {
113
96
  CONTRAST_COMBINATIONS.forEach( ( { bgs, fgs, target } ) => {
114
97
  for ( const bg of bgs ) {
115
98
  for ( const fg of fgs ) {
116
- const bgColor = new Color( ramp.ramp[ bg ].color );
117
- const fgColor = new Color( ramp.ramp[ fg ].color );
118
- if ( getCachedContrast( bgColor, fgColor ) < target ) {
99
+ const bgColor = parse( ramp.ramp[ bg ].color );
100
+ const fgColor = parse( ramp.ramp[ fg ].color );
101
+ if ( getContrast( bgColor, fgColor ) < target ) {
119
102
  unmetTargets.push( {
120
103
  bgName: bg,
121
- bgColor: bgColor.toString(),
104
+ bgColor: serialize( bgColor ),
122
105
  fgName: fg,
123
- fgColor: fgColor.toString(),
106
+ fgColor: serialize( fgColor ),
124
107
  unmetContrast: target,
125
108
  } );
126
109
  }
@@ -133,14 +116,14 @@ export function checkAccessibleCombinations( {
133
116
  CONTRAST_COMBINATIONS.forEach( ( { bgs, fgs, target } ) => {
134
117
  for ( const bg of bgs ) {
135
118
  for ( const fg of fgs ) {
136
- const bgColor = new Color( bgRamp.ramp[ bg ].color );
137
- const fgColor = new Color( ramp.ramp[ fg ].color );
138
- if ( getCachedContrast( bgColor, fgColor ) < target ) {
119
+ const bgColor = parse( bgRamp.ramp[ bg ].color );
120
+ const fgColor = parse( ramp.ramp[ fg ].color );
121
+ if ( getContrast( bgColor, fgColor ) < target ) {
139
122
  unmetTargets.push( {
140
123
  bgName: bg,
141
- bgColor: bgColor.toString(),
124
+ bgColor: serialize( bgColor ),
142
125
  fgName: fg,
143
- fgColor: fgColor.toString(),
126
+ fgColor: serialize( fgColor ),
144
127
  unmetContrast: target,
145
128
  } );
146
129
  }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import {
5
+ to,
6
+ serialize,
7
+ contrastWCAG21,
8
+ sRGB,
9
+ type ColorTypes,
10
+ } from 'colorjs.io/fn';
11
+
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+ import './register-color-spaces';
16
+
17
+ /**
18
+ * Get string representation of a color
19
+ * @param color Color object to stringify
20
+ * @return String representation
21
+ */
22
+ export function getColorString( color: ColorTypes ): string {
23
+ return serialize( to( color, sRGB ), { format: 'hex', inGamut: true } );
24
+ }
25
+
26
+ /**
27
+ * Get contrast value between two colors
28
+ * @param colorA First color
29
+ * @param colorB Second color
30
+ * @return WCAG 2.1 contrast ratio
31
+ */
32
+ export function getContrast( colorA: ColorTypes, colorB: ColorTypes ): number {
33
+ return contrastWCAG21( colorA, colorB );
34
+ }
@@ -1,15 +1,16 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import Color from 'colorjs.io';
4
+ import { to, OKLCH } from 'colorjs.io/fn';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
+ import './register-color-spaces';
9
10
  import type { Ramp } from './types';
10
11
 
11
- export const WHITE = new Color( '#fff' ).to( 'oklch' );
12
- export const BLACK = new Color( '#000' ).to( 'oklch' );
12
+ export const WHITE = to( 'white', OKLCH );
13
+ export const BLACK = to( 'black', OKLCH );
13
14
 
14
15
  // Margin added to target contrasts to counter for algorithm approximations
15
16
  // and rounding errors.
@@ -32,10 +33,10 @@ export const ACCENT_SCALE_BASE_LIGHTNESS_THRESHOLDS = {
32
33
  darker: { min: 0.75, max: 0.98 },
33
34
  } as const;
34
35
 
35
- // Minimum lightness difference noticed by the algorithm.
36
- export const LIGHTNESS_EPSILON = 1e-3;
36
+ // Lightness precision we aim for. Approximately 1/256, resolution of an 8-bit number.
37
+ export const LIGHTNESS_EPSILON = 4e-3;
37
38
 
38
- export const MAX_BISECTION_ITERATIONS = 25;
39
+ export const MAX_BISECTION_ITERATIONS = 10;
39
40
 
40
41
  export const CONTRAST_COMBINATIONS: {
41
42
  bgs: ( keyof Ramp )[];
@@ -80,6 +81,7 @@ export const DEFAULT_SEED_COLORS = {
80
81
  primary: '#3858e9',
81
82
  info: '#0090ff',
82
83
  success: '#4ab866',
84
+ caution: '#f0d149',
83
85
  warning: '#f0b849',
84
86
  error: '#cc1818',
85
87
  };
@@ -0,0 +1,200 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { RampResult } from './types';
5
+ import type { DEFAULT_SEED_COLORS } from './constants';
6
+
7
+ export const DEFAULT_RAMPS: Record<
8
+ keyof typeof DEFAULT_SEED_COLORS,
9
+ RampResult
10
+ > = {
11
+ bg: {
12
+ ramp: {
13
+ surface2: { color: '#f8f8f8', warning: false },
14
+ bgFill1: { color: '#555', warning: false },
15
+ fgFill: { color: '#f0f0f0', warning: false },
16
+ bgFill2: { color: '#474747', warning: false },
17
+ surface6: { color: '#d0d0d0', warning: false },
18
+ surface5: { color: '#dfdfdf', warning: false },
19
+ surface4: { color: '#eaeaea', warning: false },
20
+ surface3: { color: '#fff', warning: false },
21
+ fgSurface4: { color: '#1e1e1e', warning: false },
22
+ fgSurface3: { color: '#6d6d6d', warning: false },
23
+ fgSurface2: { color: '#898989', warning: false },
24
+ fgSurface1: { color: '#a9a9a9', warning: false },
25
+ stroke3: { color: '#898989', warning: false },
26
+ stroke4: { color: '#6a6a6a', warning: false },
27
+ stroke2: { color: '#adadad', warning: false },
28
+ stroke1: { color: '#d0d0d0', warning: false },
29
+ bgFillDark: { color: '#1e1e1e', warning: false },
30
+ fgFillDark: { color: '#f0f0f0', warning: false },
31
+ bgFillInverted2: { color: '#1e1e1e', warning: false },
32
+ bgFillInverted1: { color: '#2f2f2f', warning: false },
33
+ fgFillInverted: { color: '#f0f0f0', warning: false },
34
+ surface1: { color: '#f0f0f0', warning: false },
35
+ },
36
+ direction: 'darker',
37
+ },
38
+ primary: {
39
+ ramp: {
40
+ bgFill1: { color: '#3858e9', warning: false },
41
+ fgFill: { color: '#eff0f2', warning: false },
42
+ bgFill2: { color: '#2c47d7', warning: false },
43
+ surface2: { color: '#f6f8fc', warning: false },
44
+ surface6: { color: '#c4d0ee', warning: false },
45
+ surface5: { color: '#d8e0f3', warning: false },
46
+ surface4: { color: '#e5eaf7', warning: false },
47
+ surface3: { color: '#fff', warning: false },
48
+ fgSurface4: { color: '#080071', warning: false },
49
+ fgSurface3: { color: '#3858e9', warning: false },
50
+ fgSurface2: { color: '#5780ff', warning: false },
51
+ fgSurface1: { color: '#81a7ff', warning: false },
52
+ stroke3: { color: '#3858e9', warning: false },
53
+ stroke4: { color: '#2236c7', warning: false },
54
+ stroke2: { color: '#6f85c0', warning: false },
55
+ stroke1: { color: '#92a4cf', warning: false },
56
+ bgFillDark: { color: '#1b1e26', warning: false },
57
+ fgFillDark: { color: '#eff0f2', warning: false },
58
+ bgFillInverted2: { color: '#1b1e26', warning: false },
59
+ bgFillInverted1: { color: '#1401a4', warning: false },
60
+ fgFillInverted: { color: '#eff0f2', warning: false },
61
+ surface1: { color: '#ecf0f9', warning: false },
62
+ },
63
+ direction: 'darker',
64
+ },
65
+ info: {
66
+ ramp: {
67
+ bgFill1: { color: '#0090ff', warning: false },
68
+ fgFill: { color: '#1b1e23', warning: false },
69
+ bgFill2: { color: '#007eec', warning: false },
70
+ surface2: { color: '#f5f9fd', warning: false },
71
+ surface6: { color: '#bad3f0', warning: false },
72
+ surface5: { color: '#d1e1f5', warning: false },
73
+ surface4: { color: '#e1ecf8', warning: false },
74
+ surface3: { color: '#fff', warning: false },
75
+ fgSurface4: { color: '#001758', warning: false },
76
+ fgSurface3: { color: '#006cd8', warning: false },
77
+ fgSurface2: { color: '#008bfa', warning: false },
78
+ fgSurface1: { color: '#4dafff', warning: false },
79
+ stroke3: { color: '#006cd8', warning: false },
80
+ stroke4: { color: '#004bb5', warning: false },
81
+ stroke2: { color: '#5e90c7', warning: false },
82
+ stroke1: { color: '#8baed6', warning: false },
83
+ bgFillDark: { color: '#1b1e23', warning: false },
84
+ fgFillDark: { color: '#eff0f2', warning: false },
85
+ bgFillInverted2: { color: '#1b1e23', warning: false },
86
+ bgFillInverted1: { color: '#00297a', warning: false },
87
+ fgFillInverted: { color: '#eff0f2', warning: false },
88
+ surface1: { color: '#e9f1fa', warning: false },
89
+ },
90
+ direction: 'darker',
91
+ },
92
+ success: {
93
+ ramp: {
94
+ bgFill1: { color: '#4ab866', warning: false },
95
+ fgFill: { color: '#1b1f1c', warning: false },
96
+ bgFill2: { color: '#34a554', warning: false },
97
+ surface2: { color: '#f0fcf2', warning: false },
98
+ surface6: { color: '#7be792', warning: false },
99
+ surface5: { color: '#acf0b7', warning: false },
100
+ surface4: { color: '#cdf5d3', warning: false },
101
+ surface3: { color: '#fff', warning: false },
102
+ fgSurface4: { color: '#002b00', warning: false },
103
+ fgSurface3: { color: '#008030', warning: false },
104
+ fgSurface2: { color: '#2a9e4d', warning: false },
105
+ fgSurface1: { color: '#52bf6d', warning: false },
106
+ stroke3: { color: '#008030', warning: false },
107
+ stroke4: { color: '#006113', warning: false },
108
+ stroke2: { color: '#62996c', warning: false },
109
+ stroke1: { color: '#78ba84', warning: false },
110
+ bgFillDark: { color: '#1b1f1c', warning: false },
111
+ fgFillDark: { color: '#edf2ed', warning: false },
112
+ bgFillInverted2: { color: '#1b1f1c', warning: false },
113
+ bgFillInverted1: { color: '#003a00', warning: false },
114
+ fgFillInverted: { color: '#edf2ed', warning: false },
115
+ surface1: { color: '#ddf8e0', warning: false },
116
+ },
117
+ direction: 'darker',
118
+ },
119
+ caution: {
120
+ ramp: {
121
+ bgFill1: { color: '#f0d149', warning: false },
122
+ fgFill: { color: '#1f1e1b', warning: false },
123
+ bgFill2: { color: '#dabb2b', warning: false },
124
+ surface2: { color: '#fdf9e7', warning: false },
125
+ surface6: { color: '#e7d070', warning: false },
126
+ surface5: { color: '#f4e08c', warning: false },
127
+ surface4: { color: '#f8ebb6', warning: false },
128
+ surface3: { color: '#fff', warning: false },
129
+ fgSurface4: { color: '#291d00', warning: false },
130
+ fgSurface3: { color: '#866a00', warning: false },
131
+ fgSurface2: { color: '#a58700', warning: false },
132
+ fgSurface1: { color: '#c6a800', warning: false },
133
+ stroke3: { color: '#866a00', warning: false },
134
+ stroke4: { color: '#644e00', warning: false },
135
+ stroke2: { color: '#988d60', warning: false },
136
+ stroke1: { color: '#b8ab76', warning: false },
137
+ bgFillDark: { color: '#1f1e1b', warning: false },
138
+ fgFillDark: { color: '#f6f1da', warning: false },
139
+ bgFillInverted2: { color: '#1f1e1b', warning: false },
140
+ bgFillInverted1: { color: '#3d2d00', warning: false },
141
+ fgFillInverted: { color: '#f6f1da', warning: false },
142
+ surface1: { color: '#faf1cb', warning: false },
143
+ },
144
+ direction: 'darker',
145
+ },
146
+ warning: {
147
+ ramp: {
148
+ bgFill1: { color: '#f0b849', warning: false },
149
+ fgFill: { color: '#1f1e1b', warning: false },
150
+ bgFill2: { color: '#dba430', warning: false },
151
+ surface2: { color: '#fdf7ee', warning: false },
152
+ surface6: { color: '#f0cb89', warning: false },
153
+ surface5: { color: '#f5ddb2', warning: false },
154
+ surface4: { color: '#f8e9cd', warning: false },
155
+ surface3: { color: '#fff', warning: false },
156
+ fgSurface4: { color: '#2f1800', warning: false },
157
+ fgSurface3: { color: '#966200', warning: false },
158
+ fgSurface2: { color: '#b58000', warning: false },
159
+ fgSurface1: { color: '#d7a02b', warning: false },
160
+ stroke3: { color: '#966200', warning: false },
161
+ stroke4: { color: '#724700', warning: false },
162
+ stroke2: { color: '#a08961', warning: false },
163
+ stroke1: { color: '#c2a777', warning: false },
164
+ bgFillDark: { color: '#1f1e1b', warning: false },
165
+ fgFillDark: { color: '#f3f0e9', warning: false },
166
+ bgFillInverted2: { color: '#1f1e1b', warning: false },
167
+ bgFillInverted1: { color: '#472900', warning: false },
168
+ fgFillInverted: { color: '#f3f0e9', warning: false },
169
+ surface1: { color: '#faefdb', warning: false },
170
+ },
171
+ direction: 'darker',
172
+ },
173
+ error: {
174
+ ramp: {
175
+ bgFill1: { color: '#cc1818', warning: false },
176
+ fgFill: { color: '#f2efef', warning: false },
177
+ bgFill2: { color: '#b90000', warning: false },
178
+ surface2: { color: '#fdf6f5', warning: false },
179
+ surface6: { color: '#f5c5be', warning: false },
180
+ surface5: { color: '#f8d8d3', warning: false },
181
+ surface4: { color: '#fae6e2', warning: false },
182
+ surface3: { color: '#fff', warning: false },
183
+ fgSurface4: { color: '#4a0000', warning: false },
184
+ fgSurface3: { color: '#cc1818', warning: false },
185
+ fgSurface2: { color: '#f64b40', warning: false },
186
+ fgSurface1: { color: '#ff8070', warning: false },
187
+ stroke3: { color: '#cc1818', warning: false },
188
+ stroke4: { color: '#a40000', warning: false },
189
+ stroke2: { color: '#cd695d', warning: false },
190
+ stroke1: { color: '#dc9085', warning: false },
191
+ bgFillDark: { color: '#231c1b', warning: false },
192
+ fgFillDark: { color: '#f2efef', warning: false },
193
+ bgFillInverted2: { color: '#231c1b', warning: false },
194
+ bgFillInverted1: { color: '#6d0000', warning: false },
195
+ fgFillInverted: { color: '#f2efef', warning: false },
196
+ surface1: { color: '#fcecea', warning: false },
197
+ },
198
+ direction: 'darker',
199
+ },
200
+ };