@primer/primitives 11.4.1-rc.d4178e4a → 11.4.1-rc.df218e38
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/DESIGN_TOKENS_GUIDE.md +4 -4
- package/dist/build/schemas/borderToken.d.ts +45 -3
- package/dist/build/schemas/borderToken.js +2 -1
- package/dist/build/schemas/colorToken.d.ts +639 -30
- package/dist/build/schemas/colorToken.js +3 -2
- package/dist/build/schemas/colorW3cValue.d.ts +28 -0
- package/dist/build/schemas/colorW3cValue.js +42 -0
- package/dist/build/schemas/cubicBezierToken.d.ts +1 -1
- package/dist/build/schemas/dimensionToken.d.ts +1 -1
- package/dist/build/schemas/durationToken.d.ts +1 -1
- package/dist/build/schemas/fontFamilyToken.d.ts +1 -1
- package/dist/build/schemas/fontWeightToken.d.ts +1 -1
- package/dist/build/schemas/gradientToken.d.ts +23 -2
- package/dist/build/schemas/gradientToken.js +2 -1
- package/dist/build/schemas/numberToken.d.ts +1 -1
- package/dist/build/schemas/shadowToken.d.ts +1079 -43
- package/dist/build/schemas/shadowToken.js +8 -2
- package/dist/build/schemas/stringToken.d.ts +1 -1
- package/dist/build/schemas/tokenType.d.ts +1 -1
- package/dist/build/schemas/transitionToken.d.ts +1 -1
- package/dist/build/schemas/typographyToken.d.ts +1 -1
- package/dist/build/schemas/viewportRangeToken.d.ts +1 -1
- package/dist/build/transformers/borderToCss.js +3 -1
- package/dist/build/transformers/colorAlphaToCss.js +6 -3
- package/dist/build/transformers/colorToHex.js +5 -2
- package/dist/build/transformers/colorToRgbAlpha.js +5 -2
- package/dist/build/transformers/colorToRgbaFloat.js +5 -0
- package/dist/build/transformers/gradientToCss.js +2 -1
- package/dist/build/transformers/shadowToCss.js +4 -1
- package/dist/build/transformers/utilities/normalizeColorValue.d.ts +23 -0
- package/dist/build/transformers/utilities/normalizeColorValue.js +74 -0
- package/dist/build/types/borderTokenValue.d.ts +2 -1
- package/dist/build/types/shadowTokenValue.d.ts +2 -1
- package/dist/css/functional/themes/dark-colorblind-high-contrast.css +8 -8
- package/dist/css/functional/themes/dark-colorblind.css +8 -8
- package/dist/css/functional/themes/dark-dimmed-high-contrast.css +8 -8
- package/dist/css/functional/themes/dark-dimmed.css +8 -8
- package/dist/css/functional/themes/dark-high-contrast.css +8 -8
- package/dist/css/functional/themes/dark-tritanopia-high-contrast.css +8 -8
- package/dist/css/functional/themes/dark-tritanopia.css +8 -8
- package/dist/css/functional/themes/dark.css +8 -8
- package/dist/css/functional/themes/light-colorblind.css +6 -6
- package/dist/css/functional/themes/light-tritanopia.css +6 -6
- package/dist/css/functional/themes/light.css +6 -6
- package/dist/docs/functional/themes/dark-colorblind-high-contrast.json +2182 -198
- package/dist/docs/functional/themes/dark-colorblind.json +2172 -196
- package/dist/docs/functional/themes/dark-dimmed-high-contrast.json +2207 -203
- package/dist/docs/functional/themes/dark-dimmed.json +2234 -210
- package/dist/docs/functional/themes/dark-high-contrast.json +2187 -199
- package/dist/docs/functional/themes/dark-tritanopia-high-contrast.json +2197 -201
- package/dist/docs/functional/themes/dark-tritanopia.json +2202 -202
- package/dist/docs/functional/themes/dark.json +2182 -198
- package/dist/docs/functional/themes/light-colorblind-high-contrast.json +2206 -202
- package/dist/docs/functional/themes/light-colorblind.json +2196 -200
- package/dist/docs/functional/themes/light-high-contrast.json +2211 -203
- package/dist/docs/functional/themes/light-tritanopia-high-contrast.json +2211 -203
- package/dist/docs/functional/themes/light-tritanopia.json +2206 -202
- package/dist/docs/functional/themes/light.json +2211 -203
- package/dist/figma/themes/dark-dimmed.json +2 -2
- package/dist/internalCss/dark-colorblind-high-contrast.css +8 -8
- package/dist/internalCss/dark-colorblind.css +8 -8
- package/dist/internalCss/dark-dimmed-high-contrast.css +8 -8
- package/dist/internalCss/dark-dimmed.css +8 -8
- package/dist/internalCss/dark-high-contrast.css +8 -8
- package/dist/internalCss/dark-tritanopia-high-contrast.css +8 -8
- package/dist/internalCss/dark-tritanopia.css +8 -8
- package/dist/internalCss/dark.css +8 -8
- package/dist/internalCss/light-colorblind.css +6 -6
- package/dist/internalCss/light-tritanopia.css +6 -6
- package/dist/internalCss/light.css +6 -6
- package/dist/styleLint/functional/themes/dark-colorblind-high-contrast.json +2182 -198
- package/dist/styleLint/functional/themes/dark-colorblind.json +2172 -196
- package/dist/styleLint/functional/themes/dark-dimmed-high-contrast.json +2207 -203
- package/dist/styleLint/functional/themes/dark-dimmed.json +2234 -210
- package/dist/styleLint/functional/themes/dark-high-contrast.json +2187 -199
- package/dist/styleLint/functional/themes/dark-tritanopia-high-contrast.json +2197 -201
- package/dist/styleLint/functional/themes/dark-tritanopia.json +2202 -202
- package/dist/styleLint/functional/themes/dark.json +2182 -198
- package/dist/styleLint/functional/themes/light-colorblind-high-contrast.json +2206 -202
- package/dist/styleLint/functional/themes/light-colorblind.json +2196 -200
- package/dist/styleLint/functional/themes/light-high-contrast.json +2211 -203
- package/dist/styleLint/functional/themes/light-tritanopia-high-contrast.json +2211 -203
- package/dist/styleLint/functional/themes/light-tritanopia.json +2206 -202
- package/dist/styleLint/functional/themes/light.json +2211 -203
- package/package.json +4 -3
- package/src/tokens/base/color/dark/dark.dimmed.json5 +405 -81
- package/src/tokens/base/color/dark/dark.high-contrast.json5 +405 -81
- package/src/tokens/base/color/dark/dark.json5 +475 -95
- package/src/tokens/base/color/dark/display-dark.json5 +960 -192
- package/src/tokens/base/color/light/display-light.json5 +960 -192
- package/src/tokens/base/color/light/light.high-contrast.json5 +405 -81
- package/src/tokens/base/color/light/light.json5 +475 -95
- package/src/tokens/base/size/size.json5 +194 -194
- package/src/tokens/component/button.json5 +326 -65
- package/src/tokens/component/reactionButton.json5 +20 -4
- package/src/tokens/functional/color/bgColor.json5 +10 -2
- package/src/tokens/functional/color/control.json5 +160 -32
- package/src/tokens/functional/color/fgColor.json5 +5 -1
- package/src/tokens/functional/color/syntax.json5 +10 -2
- package/src/tokens/functional/shadow/shadow.json5 +576 -0
package/DESIGN_TOKENS_GUIDE.md
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
```
|
|
36
36
|
--control-[size]-[property]
|
|
37
37
|
├── size: xsmall | small | medium | large | xlarge
|
|
38
|
-
└── property: size | paddingInline-[density] | paddingBlock
|
|
38
|
+
└── property: size | paddingInline-[density] | paddingBlock
|
|
39
39
|
└── density: condensed | normal | spacious
|
|
40
40
|
```
|
|
41
41
|
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
└── size: condensed | normal | spacious
|
|
48
48
|
|
|
49
49
|
--controlStack-[size]-gap-[density]
|
|
50
|
-
├── size:
|
|
51
|
-
└── density: condensed |
|
|
50
|
+
├── size: small | medium | large
|
|
51
|
+
└── density: condensed | auto | spacious
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
### Typography Tokens
|
|
55
55
|
|
|
56
56
|
```
|
|
57
57
|
--text-[role]-shorthand-[size]
|
|
58
|
-
├── role: title | body | subtitle | caption | codeBlock | codeInline
|
|
58
|
+
├── role: display | title | body | subtitle | caption | codeBlock | codeInline
|
|
59
59
|
└── size: small | medium | large
|
|
60
60
|
```
|
|
61
61
|
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const borderValue: z.ZodObject<{
|
|
3
|
-
color: z.ZodUnion<readonly [z.ZodString, z.
|
|
3
|
+
color: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
4
|
+
colorSpace: z.ZodEnum<{
|
|
5
|
+
"display-p3": "display-p3";
|
|
6
|
+
srgb: "srgb";
|
|
7
|
+
rec2020: "rec2020";
|
|
8
|
+
"srgb-linear": "srgb-linear";
|
|
9
|
+
hsl: "hsl";
|
|
10
|
+
hwb: "hwb";
|
|
11
|
+
lab: "lab";
|
|
12
|
+
lch: "lch";
|
|
13
|
+
oklab: "oklab";
|
|
14
|
+
oklch: "oklch";
|
|
15
|
+
"a98-rgb": "a98-rgb";
|
|
16
|
+
"prophoto-rgb": "prophoto-rgb";
|
|
17
|
+
xyz: "xyz";
|
|
18
|
+
"xyz-d50": "xyz-d50";
|
|
19
|
+
"xyz-d65": "xyz-d65";
|
|
20
|
+
}>;
|
|
21
|
+
components: z.ZodTuple<[z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"none">]>, z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"none">]>, z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"none">]>], null>;
|
|
22
|
+
alpha: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strict>, z.ZodString]>;
|
|
4
25
|
style: z.ZodEnum<{
|
|
5
26
|
inset: "inset";
|
|
6
27
|
solid: "solid";
|
|
@@ -24,7 +45,28 @@ export declare const borderToken: z.ZodObject<{
|
|
|
24
45
|
$description: z.ZodOptional<z.ZodString>;
|
|
25
46
|
$deprecated: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
26
47
|
$value: z.ZodUnion<readonly [z.ZodObject<{
|
|
27
|
-
color: z.ZodUnion<readonly [z.ZodString, z.
|
|
48
|
+
color: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
49
|
+
colorSpace: z.ZodEnum<{
|
|
50
|
+
"display-p3": "display-p3";
|
|
51
|
+
srgb: "srgb";
|
|
52
|
+
rec2020: "rec2020";
|
|
53
|
+
"srgb-linear": "srgb-linear";
|
|
54
|
+
hsl: "hsl";
|
|
55
|
+
hwb: "hwb";
|
|
56
|
+
lab: "lab";
|
|
57
|
+
lch: "lch";
|
|
58
|
+
oklab: "oklab";
|
|
59
|
+
oklch: "oklch";
|
|
60
|
+
"a98-rgb": "a98-rgb";
|
|
61
|
+
"prophoto-rgb": "prophoto-rgb";
|
|
62
|
+
xyz: "xyz";
|
|
63
|
+
"xyz-d50": "xyz-d50";
|
|
64
|
+
"xyz-d65": "xyz-d65";
|
|
65
|
+
}>;
|
|
66
|
+
components: z.ZodTuple<[z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"none">]>, z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"none">]>, z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"none">]>], null>;
|
|
67
|
+
alpha: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
hex: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strict>, z.ZodString]>;
|
|
28
70
|
style: z.ZodEnum<{
|
|
29
71
|
inset: "inset";
|
|
30
72
|
solid: "solid";
|
|
@@ -44,7 +86,7 @@ export declare const borderToken: z.ZodObject<{
|
|
|
44
86
|
}>;
|
|
45
87
|
}, z.core.$strict>, z.ZodString]>;
|
|
46
88
|
}, z.core.$strip>, z.ZodString]>;
|
|
47
|
-
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "
|
|
89
|
+
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "duration" | "dimension" | "gradient" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange" | "custom-string">;
|
|
48
90
|
$extensions: z.ZodOptional<z.ZodObject<{
|
|
49
91
|
'org.primer.llm': z.ZodOptional<z.ZodObject<{
|
|
50
92
|
usage: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -2,11 +2,12 @@ import { z } from 'zod';
|
|
|
2
2
|
import { baseToken } from './baseToken.js';
|
|
3
3
|
import { referenceValue } from './referenceValue.js';
|
|
4
4
|
import { colorHexValue } from './colorHexValue.js';
|
|
5
|
+
import { colorW3cValue } from './colorW3cValue.js';
|
|
5
6
|
import { dimensionValue } from './dimensionValue.js';
|
|
6
7
|
import { tokenType } from './tokenType.js';
|
|
7
8
|
import { llmExtension } from './llmExtension.js';
|
|
8
9
|
export const borderValue = z.object({
|
|
9
|
-
color: z.union([colorHexValue, referenceValue]),
|
|
10
|
+
color: z.union([colorHexValue, colorW3cValue, referenceValue]),
|
|
10
11
|
style: z.enum(['solid', 'dashed', 'dotted', 'double', 'groove', 'ridge', 'outset', 'inset']),
|
|
11
12
|
width: z.union([dimensionValue, referenceValue]),
|
|
12
13
|
});
|