@primer/primitives 10.0.0-rc.6c806cf9 → 10.0.0-rc.6cee60d3

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 (79) hide show
  1. package/dist/build/filters/isCubicBezier.d.ts +7 -0
  2. package/dist/build/filters/isCubicBezier.js +10 -0
  3. package/dist/build/schemas/borderToken.d.ts +3 -3
  4. package/dist/build/schemas/colorToken.d.ts +3 -3
  5. package/dist/build/schemas/cubicBezierToken.d.ts +18 -0
  6. package/dist/build/schemas/cubicBezierToken.js +8 -0
  7. package/dist/build/schemas/designToken.js +2 -0
  8. package/dist/build/schemas/dimensionToken.d.ts +3 -3
  9. package/dist/build/schemas/durationToken.d.ts +3 -3
  10. package/dist/build/schemas/fontFamilyToken.d.ts +3 -3
  11. package/dist/build/schemas/fontWeightToken.d.ts +3 -3
  12. package/dist/build/schemas/numberToken.d.ts +3 -3
  13. package/dist/build/schemas/shadowToken.d.ts +3 -3
  14. package/dist/build/schemas/stringToken.d.ts +3 -3
  15. package/dist/build/schemas/tokenType.d.ts +1 -1
  16. package/dist/build/schemas/typographyToken.d.ts +3 -3
  17. package/dist/build/schemas/validTokenType.d.ts +1 -1
  18. package/dist/build/schemas/validTokenType.js +1 -0
  19. package/dist/build/schemas/viewportRangeToken.d.ts +3 -3
  20. package/dist/build/transformers/cubicBezierToCss.d.ts +8 -0
  21. package/dist/build/transformers/cubicBezierToCss.js +23 -0
  22. package/dist/css/functional/themes/dark-colorblind.css +40 -22
  23. package/dist/css/functional/themes/dark-dimmed.css +42 -24
  24. package/dist/css/functional/themes/dark-high-contrast.css +40 -22
  25. package/dist/css/functional/themes/dark-tritanopia.css +40 -22
  26. package/dist/css/functional/themes/dark.css +40 -22
  27. package/dist/css/functional/themes/light-colorblind.css +40 -22
  28. package/dist/css/functional/themes/light-high-contrast.css +42 -24
  29. package/dist/css/functional/themes/light-tritanopia.css +40 -22
  30. package/dist/css/functional/themes/light.css +40 -22
  31. package/dist/docs/functional/themes/dark-colorblind.json +504 -251
  32. package/dist/docs/functional/themes/dark-dimmed.json +531 -256
  33. package/dist/docs/functional/themes/dark-high-contrast.json +359 -148
  34. package/dist/docs/functional/themes/dark-tritanopia.json +506 -257
  35. package/dist/docs/functional/themes/dark.json +515 -256
  36. package/dist/docs/functional/themes/light-colorblind.json +326 -65
  37. package/dist/docs/functional/themes/light-high-contrast.json +304 -63
  38. package/dist/docs/functional/themes/light-tritanopia.json +278 -61
  39. package/dist/docs/functional/themes/light.json +307 -58
  40. package/dist/figma/themes/dark-colorblind.json +128 -15
  41. package/dist/figma/themes/dark-dimmed.json +211 -52
  42. package/dist/figma/themes/dark-high-contrast.json +119 -25
  43. package/dist/figma/themes/dark-tritanopia.json +140 -28
  44. package/dist/figma/themes/dark.json +195 -52
  45. package/dist/figma/themes/light-colorblind.json +175 -16
  46. package/dist/figma/themes/light-high-contrast.json +153 -26
  47. package/dist/figma/themes/light-tritanopia.json +145 -35
  48. package/dist/figma/themes/light.json +185 -44
  49. package/dist/internalCss/dark-colorblind.css +40 -22
  50. package/dist/internalCss/dark-dimmed.css +42 -24
  51. package/dist/internalCss/dark-high-contrast.css +40 -22
  52. package/dist/internalCss/dark-tritanopia.css +40 -22
  53. package/dist/internalCss/dark.css +40 -22
  54. package/dist/internalCss/light-colorblind.css +40 -22
  55. package/dist/internalCss/light-high-contrast.css +42 -24
  56. package/dist/internalCss/light-tritanopia.css +40 -22
  57. package/dist/internalCss/light.css +40 -22
  58. package/dist/styleLint/functional/themes/dark-colorblind.json +504 -251
  59. package/dist/styleLint/functional/themes/dark-dimmed.json +531 -256
  60. package/dist/styleLint/functional/themes/dark-high-contrast.json +358 -147
  61. package/dist/styleLint/functional/themes/dark-tritanopia.json +506 -257
  62. package/dist/styleLint/functional/themes/dark.json +515 -256
  63. package/dist/styleLint/functional/themes/light-colorblind.json +326 -65
  64. package/dist/styleLint/functional/themes/light-high-contrast.json +304 -63
  65. package/dist/styleLint/functional/themes/light-tritanopia.json +278 -61
  66. package/dist/styleLint/functional/themes/light.json +307 -58
  67. package/package.json +1 -1
  68. package/src/tokens/functional/color/dark/app-dark.json5 +203 -88
  69. package/src/tokens/functional/color/dark/display-dark.json5 +95 -95
  70. package/src/tokens/functional/color/dark/overrides/dark.dimmed.json5 +0 -8
  71. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +39 -26
  72. package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +54 -28
  73. package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +36 -13
  74. package/src/tokens/functional/color/dark/patterns-dark.json5 +4 -4
  75. package/src/tokens/functional/color/dark/primitives-dark.json5 +1 -1
  76. package/src/tokens/functional/color/light/app-light.json5 +195 -85
  77. package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +25 -25
  78. package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +59 -26
  79. package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +62 -10
@@ -0,0 +1,7 @@
1
+ import type { TransformedToken } from 'style-dictionary/types';
2
+ /**
3
+ * @description Checks if token is of $type `cubicBezier`
4
+ * @param token [TransformedToken](https://github.com/amzn/style-dictionary/blob/main/types/TransformedToken.d.ts)
5
+ * @returns boolean
6
+ */
7
+ export declare const isCubicBezier: (token: TransformedToken) => boolean;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @description Checks if token is of $type `cubicBezier`
3
+ * @param token [TransformedToken](https://github.com/amzn/style-dictionary/blob/main/types/TransformedToken.d.ts)
4
+ * @returns boolean
5
+ */
6
+ export const isCubicBezier = (token) => {
7
+ var _a;
8
+ const typeValue = (_a = token.$type) !== null && _a !== void 0 ? _a : token.type;
9
+ return typeValue === 'cubicBezier';
10
+ };
@@ -29,14 +29,14 @@ export declare const borderToken: z.ZodObject<z.objectUtil.extendShape<{
29
29
  color: string;
30
30
  style: "inset" | "solid" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "outset";
31
31
  }>, z.ZodEffects<z.ZodString, string, string>]>;
32
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
32
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
33
33
  }>, "strict", z.ZodTypeAny, {
34
34
  $value: string | {
35
35
  width: string | 0;
36
36
  color: string;
37
37
  style: "inset" | "solid" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "outset";
38
38
  };
39
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
39
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
40
40
  $description?: string | undefined;
41
41
  deprecated?: string | boolean | undefined;
42
42
  }, {
@@ -45,7 +45,7 @@ export declare const borderToken: z.ZodObject<z.objectUtil.extendShape<{
45
45
  color: string;
46
46
  style: "inset" | "solid" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "outset";
47
47
  };
48
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
48
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
49
49
  $description?: string | undefined;
50
50
  deprecated?: string | boolean | undefined;
51
51
  }>;
@@ -4,7 +4,7 @@ export declare const colorToken: z.ZodObject<z.objectUtil.extendShape<{
4
4
  deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
7
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
8
8
  alpha: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodAny, any, any>>>;
9
9
  mix: z.ZodOptional<z.ZodNullable<z.ZodObject<{
10
10
  color: z.ZodString;
@@ -48,7 +48,7 @@ export declare const colorToken: z.ZodObject<z.objectUtil.extendShape<{
48
48
  }>>;
49
49
  }>, "strict", z.ZodTypeAny, {
50
50
  $value: string;
51
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
51
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
52
52
  alpha?: any;
53
53
  $description?: string | undefined;
54
54
  mix?: {
@@ -66,7 +66,7 @@ export declare const colorToken: z.ZodObject<z.objectUtil.extendShape<{
66
66
  } | undefined;
67
67
  }, {
68
68
  $value: string;
69
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
69
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
70
70
  alpha?: any;
71
71
  $description?: string | undefined;
72
72
  mix?: {
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const cubicBezierToken: z.ZodObject<z.objectUtil.extendShape<{
3
+ $description: z.ZodOptional<z.ZodString>;
4
+ deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
+ }, {
6
+ $value: z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodEffects<z.ZodString, string, string>]>;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
8
+ }>, "strict", z.ZodTypeAny, {
9
+ $value: string | number[];
10
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
11
+ $description?: string | undefined;
12
+ deprecated?: string | boolean | undefined;
13
+ }, {
14
+ $value: string | number[];
15
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
16
+ $description?: string | undefined;
17
+ deprecated?: string | boolean | undefined;
18
+ }>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ import { baseToken } from './baseToken.js';
3
+ import { referenceValue } from './referenceValue.js';
4
+ import { tokenType } from './tokenType.js';
5
+ export const cubicBezierToken = baseToken.extend({
6
+ $value: z.union([z.array(z.number()).length(4), referenceValue]),
7
+ $type: tokenType('cubicBezier'),
8
+ });
@@ -11,12 +11,14 @@ import { colorToken } from './colorToken.js';
11
11
  import { fontFamilyToken } from './fontFamilyToken.js';
12
12
  import { shadowToken } from './shadowToken.js';
13
13
  import { durationToken } from './durationToken.js';
14
+ import { cubicBezierToken } from './cubicBezierToken.js';
14
15
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
16
  // @ts-ignore: TODO: fix this
16
17
  export const designToken = z.record(tokenName, z.lazy(() => {
17
18
  return z.union([
18
19
  z.discriminatedUnion('$type', [
19
20
  colorToken,
21
+ cubicBezierToken,
20
22
  dimensionToken,
21
23
  shadowToken,
22
24
  borderToken,
@@ -4,7 +4,7 @@ export declare const dimensionToken: z.ZodObject<z.objectUtil.extendShape<{
4
4
  deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"0">, z.ZodLiteral<0>]>, z.ZodEffects<z.ZodString, string, string>]>;
7
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
8
8
  $extensions: z.ZodOptional<z.ZodObject<{
9
9
  'org.primer.figma': z.ZodObject<{
10
10
  collection: z.ZodEffects<z.ZodString, string, string>;
@@ -29,7 +29,7 @@ export declare const dimensionToken: z.ZodObject<z.objectUtil.extendShape<{
29
29
  }>>;
30
30
  }>, "strict", z.ZodTypeAny, {
31
31
  $value: string | 0;
32
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
32
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
33
33
  $description?: string | undefined;
34
34
  deprecated?: string | boolean | undefined;
35
35
  $extensions?: {
@@ -40,7 +40,7 @@ export declare const dimensionToken: z.ZodObject<z.objectUtil.extendShape<{
40
40
  } | undefined;
41
41
  }, {
42
42
  $value: string | 0;
43
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
43
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
44
44
  $description?: string | undefined;
45
45
  deprecated?: string | boolean | undefined;
46
46
  $extensions?: {
@@ -4,15 +4,15 @@ export declare const durationToken: z.ZodObject<z.objectUtil.extendShape<{
4
4
  deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
7
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
8
8
  }>, "strict", z.ZodTypeAny, {
9
9
  $value: string;
10
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
10
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
11
11
  $description?: string | undefined;
12
12
  deprecated?: string | boolean | undefined;
13
13
  }, {
14
14
  $value: string;
15
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
15
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
16
16
  $description?: string | undefined;
17
17
  deprecated?: string | boolean | undefined;
18
18
  }>;
@@ -4,7 +4,7 @@ export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
4
4
  deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
7
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
8
8
  $extensions: z.ZodOptional<z.ZodObject<{
9
9
  'org.primer.figma': z.ZodObject<{
10
10
  collection: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -29,7 +29,7 @@ export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
29
29
  }>>;
30
30
  }>, "strict", z.ZodTypeAny, {
31
31
  $value: string;
32
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
32
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
33
33
  $description?: string | undefined;
34
34
  deprecated?: string | boolean | undefined;
35
35
  $extensions?: {
@@ -40,7 +40,7 @@ export declare const fontFamilyToken: z.ZodObject<z.objectUtil.extendShape<{
40
40
  } | undefined;
41
41
  }, {
42
42
  $value: string;
43
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
43
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
44
44
  $description?: string | undefined;
45
45
  deprecated?: string | boolean | undefined;
46
46
  $extensions?: {
@@ -3,7 +3,7 @@ export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
3
3
  $description: z.ZodOptional<z.ZodString>;
4
4
  deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
6
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
7
7
  $value: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, string, string>]>;
8
8
  $extensions: z.ZodOptional<z.ZodObject<{
9
9
  'org.primer.figma': z.ZodObject<{
@@ -29,7 +29,7 @@ export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
29
29
  }>>;
30
30
  }>, "strict", z.ZodTypeAny, {
31
31
  $value: string | number;
32
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
32
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
33
33
  $description?: string | undefined;
34
34
  deprecated?: string | boolean | undefined;
35
35
  $extensions?: {
@@ -40,7 +40,7 @@ export declare const fontWeightToken: z.ZodObject<z.objectUtil.extendShape<{
40
40
  } | undefined;
41
41
  }, {
42
42
  $value: string | number;
43
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
43
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
44
44
  $description?: string | undefined;
45
45
  deprecated?: string | boolean | undefined;
46
46
  $extensions?: {
@@ -4,7 +4,7 @@ export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
4
4
  deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, string, string>]>;
7
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
8
8
  $extensions: z.ZodOptional<z.ZodObject<{
9
9
  'org.primer.data': z.ZodOptional<z.ZodObject<{
10
10
  fontSize: z.ZodOptional<z.ZodNumber>;
@@ -42,7 +42,7 @@ export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
42
42
  }>>;
43
43
  }>, "strict", z.ZodTypeAny, {
44
44
  $value: string | number;
45
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
45
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
46
46
  $description?: string | undefined;
47
47
  deprecated?: string | boolean | undefined;
48
48
  $extensions?: {
@@ -56,7 +56,7 @@ export declare const numberToken: z.ZodObject<z.objectUtil.extendShape<{
56
56
  } | undefined;
57
57
  }, {
58
58
  $value: string | number;
59
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
59
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
60
60
  $description?: string | undefined;
61
61
  deprecated?: string | boolean | undefined;
62
62
  $extensions?: {
@@ -77,7 +77,7 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
77
77
  alpha?: any;
78
78
  inset?: boolean | undefined;
79
79
  }>, "many">, z.ZodEffects<z.ZodString, string, string>]>;
80
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
80
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
81
81
  $extensions: z.ZodOptional<z.ZodObject<{
82
82
  'org.primer.figma': z.ZodObject<{
83
83
  collection: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -118,7 +118,7 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
118
118
  alpha?: any;
119
119
  inset?: boolean | undefined;
120
120
  }[];
121
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
121
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
122
122
  $description?: string | undefined;
123
123
  deprecated?: string | boolean | undefined;
124
124
  $extensions?: {
@@ -145,7 +145,7 @@ export declare const shadowToken: z.ZodObject<z.objectUtil.extendShape<{
145
145
  alpha?: any;
146
146
  inset?: boolean | undefined;
147
147
  }[];
148
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
148
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
149
149
  $description?: string | undefined;
150
150
  deprecated?: string | boolean | undefined;
151
151
  $extensions?: {
@@ -4,15 +4,15 @@ export declare const stringToken: z.ZodObject<z.objectUtil.extendShape<{
4
4
  deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
7
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
8
8
  }>, "strict", z.ZodTypeAny, {
9
9
  $value: string;
10
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
10
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
11
11
  $description?: string | undefined;
12
12
  deprecated?: string | boolean | undefined;
13
13
  }, {
14
14
  $value: string;
15
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
15
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
16
16
  $description?: string | undefined;
17
17
  deprecated?: string | boolean | undefined;
18
18
  }>;
@@ -1,3 +1,3 @@
1
1
  import { z } from 'zod';
2
2
  import type { TokenType } from './validTokenType.js';
3
- export declare const tokenType: ($type: TokenType) => z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
3
+ export declare const tokenType: ($type: TokenType) => z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
@@ -35,7 +35,7 @@ export declare const typographyToken: z.ZodObject<z.objectUtil.extendShape<{
35
35
  fontWeight: string | number;
36
36
  lineHeight?: string | 0 | undefined;
37
37
  }>, z.ZodEffects<z.ZodString, string, string>]>;
38
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
38
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
39
39
  }>, "strict", z.ZodTypeAny, {
40
40
  $value: string | {
41
41
  fontFamily: string;
@@ -43,7 +43,7 @@ export declare const typographyToken: z.ZodObject<z.objectUtil.extendShape<{
43
43
  fontWeight: string | number;
44
44
  lineHeight?: string | 0 | undefined;
45
45
  };
46
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
46
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
47
47
  $description?: string | undefined;
48
48
  deprecated?: string | boolean | undefined;
49
49
  }, {
@@ -53,7 +53,7 @@ export declare const typographyToken: z.ZodObject<z.objectUtil.extendShape<{
53
53
  fontWeight: string | number;
54
54
  lineHeight?: string | 0 | undefined;
55
55
  };
56
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
56
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
57
57
  $description?: string | undefined;
58
58
  deprecated?: string | boolean | undefined;
59
59
  }>;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- declare const validTypes: readonly ["color", "typography", "dimension", "duration", "border", "shadow", "fontFamily", "fontWeight", "number", "string", "custom-viewportRange"];
2
+ declare const validTypes: readonly ["color", "cubicBezier", "typography", "dimension", "duration", "border", "shadow", "fontFamily", "fontWeight", "number", "string", "custom-viewportRange"];
3
3
  export type TokenType = (typeof validTypes)[number];
4
4
  export declare const validateType: z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodTypeAny>>;
5
5
  export {};
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { joinFriendly, schemaErrorMessage } from '../utilities/index.js';
3
3
  const validTypes = [
4
4
  'color',
5
+ 'cubicBezier',
5
6
  'typography',
6
7
  'dimension',
7
8
  'duration',
@@ -4,15 +4,15 @@ export declare const viewportRangeToken: z.ZodObject<z.objectUtil.extendShape<{
4
4
  deprecated: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
5
5
  }, {
6
6
  $value: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>;
7
- $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange">;
7
+ $type: z.ZodLiteral<"string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange">;
8
8
  }>, "strict", z.ZodTypeAny, {
9
9
  $value: string;
10
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
10
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
11
11
  $description?: string | undefined;
12
12
  deprecated?: string | boolean | undefined;
13
13
  }, {
14
14
  $value: string;
15
- $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "custom-viewportRange";
15
+ $type: "string" | "number" | "border" | "color" | "fontFamily" | "fontWeight" | "dimension" | "duration" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange";
16
16
  $description?: string | undefined;
17
17
  deprecated?: string | boolean | undefined;
18
18
  }>;
@@ -0,0 +1,8 @@
1
+ import type { Transform } from 'style-dictionary/types';
2
+ /**
3
+ * @description converts cubicBezeir tokens array value to a css cubic-bezier
4
+ * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
5
+ * @matcher matches all tokens of $type `duration`
6
+ * @transformer returns a css cubic-bezier function
7
+ */
8
+ export declare const cubicBezierToCss: Transform;
@@ -0,0 +1,23 @@
1
+ import { isCubicBezier } from '../filters/isCubicBezier.js';
2
+ /**
3
+ * @description converts cubicBezeir tokens array value to a css cubic-bezier
4
+ * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
5
+ * @matcher matches all tokens of $type `duration`
6
+ * @transformer returns a css cubic-bezier function
7
+ */
8
+ export const cubicBezierToCss = {
9
+ name: 'cubicBezeir/css',
10
+ type: 'value',
11
+ transitive: true,
12
+ filter: isCubicBezier,
13
+ transform: (token, _config) => {
14
+ var _a;
15
+ const value = (_a = token.$value) !== null && _a !== void 0 ? _a : token.value;
16
+ // throw value of more or less than 4 items in array
17
+ if (value.length !== 4 || value.some((item) => typeof item !== 'number')) {
18
+ throw new Error(`Invalid cubicBezier token ${token.path.join('.')}, must be an array with 4 numbers, but got this instead: ${JSON.stringify(value)}`);
19
+ }
20
+ // return value
21
+ return `cubic-bezier(${value.join(',')})`;
22
+ },
23
+ };
@@ -5,17 +5,26 @@
5
5
  --topicTag-borderColor: #00000000;
6
6
  --highlight-neutral-bgColor: #d2992266;
7
7
  --page-header-bgColor: #0d1117;
8
- --diffBlob-addition-fgColor-text: #f0f6fc;
9
- --diffBlob-addition-fgColor-num: #f0f6fc;
10
- --diffBlob-addition-bgColor-num: #58a6ff4d;
11
- --diffBlob-addition-bgColor-line: #388bfd26;
12
- --diffBlob-addition-bgColor-word: #388bfd66;
13
- --diffBlob-deletion-fgColor-text: #f0f6fc;
14
- --diffBlob-deletion-fgColor-num: #f0f6fc;
15
- --diffBlob-deletion-bgColor-num: #db6d284d;
16
- --diffBlob-deletion-bgColor-line: #db6d2826;
17
- --diffBlob-deletion-bgColor-word: #db6d2866;
18
- --diffBlob-hunk-bgColor-num: #388bfd66;
8
+ --diffBlob-additionLine-fgColor: #f0f6fc;
9
+ --diffBlob-additionLine-bgColor: #388bfd26;
10
+ --diffBlob-additionWord-fgColor: #f0f6fc;
11
+ --diffBlob-additionWord-bgColor: #388bfd66;
12
+ --diffBlob-additionNum-fgColor: #f0f6fc;
13
+ --diffBlob-additionNum-bgColor: #58a6ff4d;
14
+ --diffBlob-deletionLine-fgColor: #f0f6fc;
15
+ --diffBlob-deletionLine-bgColor: #db6d2826;
16
+ --diffBlob-deletionWord-fgColor: #f0f6fc;
17
+ --diffBlob-deletionWord-bgColor: #db6d2866;
18
+ --diffBlob-deletionNum-fgColor: #f0f6fc;
19
+ --diffBlob-deletionNum-bgColor: #db6d284d;
20
+ --diffBlob-hunkLine-fgColor: #9198a1;
21
+ --diffBlob-hunkLine-bgColor: #212830;
22
+ --diffBlob-hunkNum-fgColor-rest: #f0f6fc;
23
+ --diffBlob-hunkNum-fgColor-hover: #ffffff;
24
+ --diffBlob-hunkNum-bgColor-rest: #2f3742;
25
+ --diffBlob-hunkNum-bgColor-hover: #656c76;
26
+ --diffBlob-emptyNum-bgColor: #151b23;
27
+ --diffBlob-emptyLine-bgColor: #151b23;
19
28
  --diffBlob-expander-iconColor: #9198a1;
20
29
  --codeMirror-fgColor: #f0f6fc;
21
30
  --codeMirror-bgColor: #0d1117;
@@ -574,17 +583,26 @@
574
583
  --topicTag-borderColor: #00000000;
575
584
  --highlight-neutral-bgColor: #d2992266;
576
585
  --page-header-bgColor: #0d1117;
577
- --diffBlob-addition-fgColor-text: #f0f6fc;
578
- --diffBlob-addition-fgColor-num: #f0f6fc;
579
- --diffBlob-addition-bgColor-num: #58a6ff4d;
580
- --diffBlob-addition-bgColor-line: #388bfd26;
581
- --diffBlob-addition-bgColor-word: #388bfd66;
582
- --diffBlob-deletion-fgColor-text: #f0f6fc;
583
- --diffBlob-deletion-fgColor-num: #f0f6fc;
584
- --diffBlob-deletion-bgColor-num: #db6d284d;
585
- --diffBlob-deletion-bgColor-line: #db6d2826;
586
- --diffBlob-deletion-bgColor-word: #db6d2866;
587
- --diffBlob-hunk-bgColor-num: #388bfd66;
586
+ --diffBlob-additionLine-fgColor: #f0f6fc;
587
+ --diffBlob-additionLine-bgColor: #388bfd26;
588
+ --diffBlob-additionWord-fgColor: #f0f6fc;
589
+ --diffBlob-additionWord-bgColor: #388bfd66;
590
+ --diffBlob-additionNum-fgColor: #f0f6fc;
591
+ --diffBlob-additionNum-bgColor: #58a6ff4d;
592
+ --diffBlob-deletionLine-fgColor: #f0f6fc;
593
+ --diffBlob-deletionLine-bgColor: #db6d2826;
594
+ --diffBlob-deletionWord-fgColor: #f0f6fc;
595
+ --diffBlob-deletionWord-bgColor: #db6d2866;
596
+ --diffBlob-deletionNum-fgColor: #f0f6fc;
597
+ --diffBlob-deletionNum-bgColor: #db6d284d;
598
+ --diffBlob-hunkLine-fgColor: #9198a1;
599
+ --diffBlob-hunkLine-bgColor: #212830;
600
+ --diffBlob-hunkNum-fgColor-rest: #f0f6fc;
601
+ --diffBlob-hunkNum-fgColor-hover: #ffffff;
602
+ --diffBlob-hunkNum-bgColor-rest: #2f3742;
603
+ --diffBlob-hunkNum-bgColor-hover: #656c76;
604
+ --diffBlob-emptyNum-bgColor: #151b23;
605
+ --diffBlob-emptyLine-bgColor: #151b23;
588
606
  --diffBlob-expander-iconColor: #9198a1;
589
607
  --codeMirror-fgColor: #f0f6fc;
590
608
  --codeMirror-bgColor: #0d1117;
@@ -5,18 +5,27 @@
5
5
  --topicTag-borderColor: #00000000;
6
6
  --highlight-neutral-bgColor: #c6902666;
7
7
  --page-header-bgColor: #212830;
8
- --diffBlob-addition-fgColor-text: #d1d7e0;
9
- --diffBlob-addition-fgColor-num: #d1d7e0;
10
- --diffBlob-addition-bgColor-num: #57ab5a4d;
11
- --diffBlob-addition-bgColor-line: #46954a26;
12
- --diffBlob-addition-bgColor-word: #46954a66;
13
- --diffBlob-deletion-fgColor-text: #d1d7e0;
14
- --diffBlob-deletion-fgColor-num: #d1d7e0;
15
- --diffBlob-deletion-bgColor-num: #e5534b4d;
16
- --diffBlob-deletion-bgColor-line: #e5534b26;
17
- --diffBlob-deletion-bgColor-word: #e5534b66;
18
- --diffBlob-hunk-bgColor-num: #4184e466;
19
- --diffBlob-expander-iconColor: #d1d7e0;
8
+ --diffBlob-additionLine-fgColor: #d1d7e0;
9
+ --diffBlob-additionLine-bgColor: #46954a26;
10
+ --diffBlob-additionWord-fgColor: #d1d7e0;
11
+ --diffBlob-additionWord-bgColor: #46954a66;
12
+ --diffBlob-additionNum-fgColor: #d1d7e0;
13
+ --diffBlob-additionNum-bgColor: #57ab5a4d;
14
+ --diffBlob-deletionLine-fgColor: #d1d7e0;
15
+ --diffBlob-deletionLine-bgColor: #e5534b1a;
16
+ --diffBlob-deletionWord-fgColor: #d1d7e0;
17
+ --diffBlob-deletionWord-bgColor: #e5534b66;
18
+ --diffBlob-deletionNum-fgColor: #d1d7e0;
19
+ --diffBlob-deletionNum-bgColor: #e5534b4d;
20
+ --diffBlob-hunkLine-fgColor: #9198a1;
21
+ --diffBlob-hunkLine-bgColor: #4184e41a;
22
+ --diffBlob-hunkNum-fgColor-rest: #d1d7e0;
23
+ --diffBlob-hunkNum-fgColor-hover: #f0f6fc;
24
+ --diffBlob-hunkNum-bgColor-rest: #143d79;
25
+ --diffBlob-hunkNum-bgColor-hover: #316dca;
26
+ --diffBlob-emptyNum-bgColor: #262c36;
27
+ --diffBlob-emptyLine-bgColor: #262c36;
28
+ --diffBlob-expander-iconColor: #9198a1;
20
29
  --codeMirror-fgColor: #d1d7e0;
21
30
  --codeMirror-bgColor: #212830;
22
31
  --codeMirror-gutters-bgColor: #212830;
@@ -574,18 +583,27 @@
574
583
  --topicTag-borderColor: #00000000;
575
584
  --highlight-neutral-bgColor: #c6902666;
576
585
  --page-header-bgColor: #212830;
577
- --diffBlob-addition-fgColor-text: #d1d7e0;
578
- --diffBlob-addition-fgColor-num: #d1d7e0;
579
- --diffBlob-addition-bgColor-num: #57ab5a4d;
580
- --diffBlob-addition-bgColor-line: #46954a26;
581
- --diffBlob-addition-bgColor-word: #46954a66;
582
- --diffBlob-deletion-fgColor-text: #d1d7e0;
583
- --diffBlob-deletion-fgColor-num: #d1d7e0;
584
- --diffBlob-deletion-bgColor-num: #e5534b4d;
585
- --diffBlob-deletion-bgColor-line: #e5534b26;
586
- --diffBlob-deletion-bgColor-word: #e5534b66;
587
- --diffBlob-hunk-bgColor-num: #4184e466;
588
- --diffBlob-expander-iconColor: #d1d7e0;
586
+ --diffBlob-additionLine-fgColor: #d1d7e0;
587
+ --diffBlob-additionLine-bgColor: #46954a26;
588
+ --diffBlob-additionWord-fgColor: #d1d7e0;
589
+ --diffBlob-additionWord-bgColor: #46954a66;
590
+ --diffBlob-additionNum-fgColor: #d1d7e0;
591
+ --diffBlob-additionNum-bgColor: #57ab5a4d;
592
+ --diffBlob-deletionLine-fgColor: #d1d7e0;
593
+ --diffBlob-deletionLine-bgColor: #e5534b1a;
594
+ --diffBlob-deletionWord-fgColor: #d1d7e0;
595
+ --diffBlob-deletionWord-bgColor: #e5534b66;
596
+ --diffBlob-deletionNum-fgColor: #d1d7e0;
597
+ --diffBlob-deletionNum-bgColor: #e5534b4d;
598
+ --diffBlob-hunkLine-fgColor: #9198a1;
599
+ --diffBlob-hunkLine-bgColor: #4184e41a;
600
+ --diffBlob-hunkNum-fgColor-rest: #d1d7e0;
601
+ --diffBlob-hunkNum-fgColor-hover: #f0f6fc;
602
+ --diffBlob-hunkNum-bgColor-rest: #143d79;
603
+ --diffBlob-hunkNum-bgColor-hover: #316dca;
604
+ --diffBlob-emptyNum-bgColor: #262c36;
605
+ --diffBlob-emptyLine-bgColor: #262c36;
606
+ --diffBlob-expander-iconColor: #9198a1;
589
607
  --codeMirror-fgColor: #d1d7e0;
590
608
  --codeMirror-bgColor: #212830;
591
609
  --codeMirror-gutters-bgColor: #212830;