@primer/primitives 11.4.1-rc.edbe0e39 → 11.5.0-rc.14eaeb12
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_SPEC.md +14 -5
- 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/durationToCss.js +4 -4
- 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/base/motion/motion.css +1 -1
- package/dist/css/functional/size/radius.css +1 -1
- package/dist/css/functional/size/size-coarse.css +1 -0
- package/dist/css/functional/size/size-fine.css +1 -0
- package/dist/css/functional/size/size.css +5 -0
- package/dist/css/functional/themes/dark-colorblind-high-contrast.css +22 -10
- package/dist/css/functional/themes/dark-colorblind.css +22 -10
- package/dist/css/functional/themes/dark-dimmed-high-contrast.css +22 -10
- package/dist/css/functional/themes/dark-dimmed.css +22 -10
- package/dist/css/functional/themes/dark-high-contrast.css +22 -10
- package/dist/css/functional/themes/dark-tritanopia-high-contrast.css +22 -10
- package/dist/css/functional/themes/dark-tritanopia.css +22 -10
- package/dist/css/functional/themes/dark.css +22 -10
- package/dist/css/functional/themes/light-colorblind-high-contrast.css +14 -2
- package/dist/css/functional/themes/light-colorblind.css +20 -8
- package/dist/css/functional/themes/light-high-contrast.css +14 -2
- package/dist/css/functional/themes/light-tritanopia-high-contrast.css +14 -2
- package/dist/css/functional/themes/light-tritanopia.css +20 -8
- package/dist/css/functional/themes/light.css +20 -8
- package/dist/docs/functional/size/radius.json +2 -2
- package/dist/docs/functional/size/size-coarse.json +55 -2
- package/dist/docs/functional/size/size-fine.json +55 -2
- package/dist/docs/functional/size/size.json +135 -0
- package/dist/docs/functional/themes/dark-colorblind-high-contrast.json +2502 -372
- package/dist/docs/functional/themes/dark-colorblind.json +2492 -370
- package/dist/docs/functional/themes/dark-dimmed-high-contrast.json +2355 -205
- package/dist/docs/functional/themes/dark-dimmed.json +2382 -212
- package/dist/docs/functional/themes/dark-high-contrast.json +2507 -373
- package/dist/docs/functional/themes/dark-tritanopia-high-contrast.json +2517 -375
- package/dist/docs/functional/themes/dark-tritanopia.json +2499 -353
- package/dist/docs/functional/themes/dark.json +2501 -371
- package/dist/docs/functional/themes/light-colorblind-high-contrast.json +2354 -204
- package/dist/docs/functional/themes/light-colorblind.json +2344 -202
- package/dist/docs/functional/themes/light-high-contrast.json +2359 -205
- package/dist/docs/functional/themes/light-tritanopia-high-contrast.json +2359 -205
- package/dist/docs/functional/themes/light-tritanopia.json +2354 -204
- package/dist/docs/functional/themes/light.json +2359 -205
- package/dist/fallbacks/functional/size/size-coarse.json +2 -1
- package/dist/fallbacks/functional/size/size-fine.json +2 -1
- package/dist/fallbacks/functional/size/size.json +5 -0
- package/dist/figma/dimension/dimension.json +56 -1
- package/dist/figma/themes/dark-colorblind.json +49 -1
- package/dist/figma/themes/dark-dimmed.json +51 -3
- package/dist/figma/themes/dark-high-contrast.json +49 -1
- package/dist/figma/themes/dark-tritanopia.json +49 -1
- package/dist/figma/themes/dark.json +49 -1
- package/dist/figma/themes/light-colorblind.json +49 -1
- package/dist/figma/themes/light-high-contrast.json +49 -1
- package/dist/figma/themes/light-tritanopia.json +49 -1
- package/dist/figma/themes/light.json +49 -1
- package/dist/internalCss/dark-colorblind-high-contrast.css +22 -10
- package/dist/internalCss/dark-colorblind.css +22 -10
- package/dist/internalCss/dark-dimmed-high-contrast.css +22 -10
- package/dist/internalCss/dark-dimmed.css +22 -10
- package/dist/internalCss/dark-high-contrast.css +22 -10
- package/dist/internalCss/dark-tritanopia-high-contrast.css +22 -10
- package/dist/internalCss/dark-tritanopia.css +22 -10
- package/dist/internalCss/dark.css +22 -10
- package/dist/internalCss/light-colorblind-high-contrast.css +14 -2
- package/dist/internalCss/light-colorblind.css +20 -8
- package/dist/internalCss/light-high-contrast.css +14 -2
- package/dist/internalCss/light-tritanopia-high-contrast.css +14 -2
- package/dist/internalCss/light-tritanopia.css +20 -8
- package/dist/internalCss/light.css +20 -8
- package/dist/styleLint/functional/size/radius.json +2 -2
- package/dist/styleLint/functional/size/size-coarse.json +57 -4
- package/dist/styleLint/functional/size/size-fine.json +57 -4
- package/dist/styleLint/functional/size/size.json +135 -0
- package/dist/styleLint/functional/themes/dark-colorblind-high-contrast.json +2491 -349
- package/dist/styleLint/functional/themes/dark-colorblind.json +2481 -347
- package/dist/styleLint/functional/themes/dark-dimmed-high-contrast.json +2516 -354
- package/dist/styleLint/functional/themes/dark-dimmed.json +2543 -361
- package/dist/styleLint/functional/themes/dark-high-contrast.json +2496 -350
- package/dist/styleLint/functional/themes/dark-tritanopia-high-contrast.json +2506 -352
- package/dist/styleLint/functional/themes/dark-tritanopia.json +2511 -353
- package/dist/styleLint/functional/themes/dark.json +2491 -349
- package/dist/styleLint/functional/themes/light-colorblind-high-contrast.json +2514 -352
- package/dist/styleLint/functional/themes/light-colorblind.json +2505 -351
- package/dist/styleLint/functional/themes/light-high-contrast.json +2371 -205
- package/dist/styleLint/functional/themes/light-tritanopia-high-contrast.json +2519 -353
- package/dist/styleLint/functional/themes/light-tritanopia.json +2515 -353
- package/dist/styleLint/functional/themes/light.json +2520 -354
- 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 +368 -65
- package/src/tokens/component/reactionButton.json5 +20 -4
- package/src/tokens/functional/border/border.json5 +29 -1
- package/src/tokens/functional/color/bgColor.json5 +10 -2
- package/src/tokens/functional/color/borderColor.json5 +8 -1
- 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/src/tokens/functional/size/radius.json5 +1 -1
- package/src/tokens/functional/size/size-coarse.json5 +15 -0
- package/src/tokens/functional/size/size-fine.json5 +15 -0
- package/src/tokens/functional/size/size.json5 +50 -0
|
@@ -2,6 +2,7 @@ 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 { alphaValue } from './alphaValue.js';
|
|
6
7
|
import { dimensionValue } from './dimensionValue.js';
|
|
7
8
|
import { tokenType } from './tokenType.js';
|
|
@@ -9,8 +10,8 @@ import { collection, mode } from './collections.js';
|
|
|
9
10
|
import { llmExtension } from './llmExtension.js';
|
|
10
11
|
export const shadowValue = z
|
|
11
12
|
.object({
|
|
12
|
-
color: z.union([colorHexValue, referenceValue]),
|
|
13
|
-
alpha: z.union([alphaValue, referenceValue]),
|
|
13
|
+
color: z.union([colorHexValue, colorW3cValue, referenceValue]),
|
|
14
|
+
alpha: z.union([alphaValue, referenceValue]).optional(),
|
|
14
15
|
offsetX: z.union([dimensionValue, referenceValue]),
|
|
15
16
|
offsetY: z.union([dimensionValue, referenceValue]),
|
|
16
17
|
blur: z.union([dimensionValue, referenceValue]),
|
|
@@ -51,11 +52,16 @@ export const shadowToken = baseToken
|
|
|
51
52
|
'light-tritanopia': override,
|
|
52
53
|
'light-protanopia-deuteranopia': override,
|
|
53
54
|
'light-high-contrast': override,
|
|
55
|
+
'light-tritanopia-high-contrast': override,
|
|
56
|
+
'light-protanopia-deuteranopia-high-contrast': override,
|
|
54
57
|
dark: override,
|
|
55
58
|
'dark-tritanopia': override,
|
|
56
59
|
'dark-protanopia-deuteranopia': override,
|
|
57
60
|
'dark-high-contrast': override,
|
|
61
|
+
'dark-tritanopia-high-contrast': override,
|
|
62
|
+
'dark-protanopia-deuteranopia-high-contrast': override,
|
|
58
63
|
'dark-dimmed': override,
|
|
64
|
+
'dark-dimmed-high-contrast': override,
|
|
59
65
|
})
|
|
60
66
|
.strict()
|
|
61
67
|
.optional(),
|
|
@@ -3,7 +3,7 @@ export declare const stringToken: z.ZodObject<{
|
|
|
3
3
|
$description: z.ZodOptional<z.ZodString>;
|
|
4
4
|
$deprecated: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
5
5
|
$value: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
6
|
-
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "
|
|
6
|
+
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "duration" | "dimension" | "gradient" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange" | "custom-string">;
|
|
7
7
|
$extensions: z.ZodOptional<z.ZodObject<{
|
|
8
8
|
'org.primer.llm': z.ZodOptional<z.ZodObject<{
|
|
9
9
|
usage: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -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<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "
|
|
3
|
+
export declare const tokenType: ($type: TokenType) => z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "duration" | "dimension" | "gradient" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange" | "custom-string">;
|
|
@@ -19,7 +19,7 @@ export declare const transitionToken: z.ZodObject<{
|
|
|
19
19
|
}>;
|
|
20
20
|
}, z.core.$strict>, z.ZodString]>, z.ZodString]>>;
|
|
21
21
|
}, z.core.$strip>, z.ZodString]>;
|
|
22
|
-
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "
|
|
22
|
+
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "duration" | "dimension" | "gradient" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange" | "custom-string">;
|
|
23
23
|
$extensions: z.ZodOptional<z.ZodObject<{
|
|
24
24
|
'org.primer.llm': z.ZodOptional<z.ZodObject<{
|
|
25
25
|
usage: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -28,7 +28,7 @@ export declare const typographyToken: z.ZodObject<{
|
|
|
28
28
|
fontWeight: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
29
29
|
fontFamily: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
30
30
|
}, z.core.$strip>, z.ZodString]>;
|
|
31
|
-
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "
|
|
31
|
+
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "duration" | "dimension" | "gradient" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange" | "custom-string">;
|
|
32
32
|
$extensions: z.ZodOptional<z.ZodObject<{
|
|
33
33
|
'org.primer.llm': z.ZodOptional<z.ZodObject<{
|
|
34
34
|
usage: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -3,7 +3,7 @@ export declare const viewportRangeToken: z.ZodObject<{
|
|
|
3
3
|
$description: z.ZodOptional<z.ZodString>;
|
|
4
4
|
$deprecated: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
5
5
|
$value: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
6
|
-
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "
|
|
6
|
+
$type: z.ZodLiteral<"number" | "border" | "color" | "fontFamily" | "fontWeight" | "transition" | "duration" | "dimension" | "gradient" | "shadow" | "typography" | "cubicBezier" | "custom-viewportRange" | "custom-string">;
|
|
7
7
|
$extensions: z.ZodOptional<z.ZodObject<{
|
|
8
8
|
'org.primer.llm': z.ZodOptional<z.ZodObject<{
|
|
9
9
|
usage: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isBorder } from '../filters/isBorder.js';
|
|
2
2
|
import { parseDimension } from './utilities/parseDimension.js';
|
|
3
|
+
import { normalizeColorValue } from './utilities/normalizeColorValue.js';
|
|
3
4
|
/**
|
|
4
5
|
* @description Converts a W3C dimension object to CSS string, preserving the original unit
|
|
5
6
|
* @param dim - The dimension value in W3C object format or a string
|
|
@@ -49,6 +50,7 @@ export const borderToCss = {
|
|
|
49
50
|
throw new Error(`Invalid border token property ${JSON.stringify(value)}. Must be an object with color, width and style properties.`);
|
|
50
51
|
}
|
|
51
52
|
/* width | style | color */
|
|
52
|
-
|
|
53
|
+
const color = typeof value.color === 'object' ? normalizeColorValue(value.color) : value.color;
|
|
54
|
+
return `${dimensionToCss(value.width)} ${value.style} ${color}`;
|
|
53
55
|
},
|
|
54
56
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isColorWithAlpha } from '../filters/isColorWithAlpha.js';
|
|
2
2
|
import { getTokenValue } from './utilities/getTokenValue.js';
|
|
3
|
+
import { normalizeColorValue } from './utilities/normalizeColorValue.js';
|
|
3
4
|
export const cssColorMix = (colorA, colorB, colorBPercent) => {
|
|
4
5
|
if (colorBPercent < 0 || colorBPercent > 1) {
|
|
5
6
|
throw new Error(`Invalid argument for "cssColorMix", colorBPercent must be between 0 and 1, ${colorBPercent} provided.`);
|
|
@@ -16,8 +17,10 @@ export const colorAlphaToCss = {
|
|
|
16
17
|
transitive: true,
|
|
17
18
|
filter: isColorWithAlpha,
|
|
18
19
|
transform: (token) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const rawValue = getTokenValue(token);
|
|
21
|
+
const colorString = normalizeColorValue(rawValue);
|
|
22
|
+
if (token.alpha === null || token.alpha === undefined)
|
|
23
|
+
return colorString;
|
|
24
|
+
return cssColorMix(colorString, 'transparent', 1 - token.alpha);
|
|
22
25
|
},
|
|
23
26
|
};
|
|
@@ -2,6 +2,7 @@ import { toHex } from 'color2k';
|
|
|
2
2
|
import { isColor } from '../filters/index.js';
|
|
3
3
|
import { getTokenValue } from './utilities/getTokenValue.js';
|
|
4
4
|
import { alpha } from './utilities/alpha.js';
|
|
5
|
+
import { normalizeColorValue } from './utilities/normalizeColorValue.js';
|
|
5
6
|
/**
|
|
6
7
|
* @description converts color tokens value to `hex6` or `hex8`
|
|
7
8
|
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
@@ -14,10 +15,12 @@ export const colorToHex = {
|
|
|
14
15
|
transitive: true,
|
|
15
16
|
filter: isColor,
|
|
16
17
|
transform: (token, config) => {
|
|
18
|
+
const rawValue = getTokenValue(token);
|
|
19
|
+
const colorString = normalizeColorValue(rawValue);
|
|
17
20
|
const alphaValue = token.alpha;
|
|
18
21
|
if (alphaValue === null || alphaValue === undefined || alphaValue === 1) {
|
|
19
|
-
return toHex(
|
|
22
|
+
return toHex(colorString);
|
|
20
23
|
}
|
|
21
|
-
return toHex(alpha(
|
|
24
|
+
return toHex(alpha(colorString, alphaValue, token, config));
|
|
22
25
|
},
|
|
23
26
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isColorWithAlpha } from '../filters/index.js';
|
|
2
2
|
import { alpha } from './utilities/alpha.js';
|
|
3
3
|
import { getTokenValue } from './utilities/getTokenValue.js';
|
|
4
|
+
import { normalizeColorValue } from './utilities/normalizeColorValue.js';
|
|
4
5
|
/**
|
|
5
6
|
* @description replaces tokens value with `rgba` color using the tokens `alpha` property to specify the value used for alpha
|
|
6
7
|
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
@@ -13,8 +14,10 @@ export const colorToRgbAlpha = {
|
|
|
13
14
|
transitive: true,
|
|
14
15
|
filter: isColorWithAlpha,
|
|
15
16
|
transform: (token, config) => {
|
|
17
|
+
const rawValue = getTokenValue(token);
|
|
18
|
+
const colorString = normalizeColorValue(rawValue);
|
|
16
19
|
if (token.alpha === null)
|
|
17
|
-
return
|
|
18
|
-
return alpha(
|
|
20
|
+
return colorString;
|
|
21
|
+
return alpha(colorString, token.alpha, token, config);
|
|
19
22
|
},
|
|
20
23
|
};
|
|
@@ -4,8 +4,13 @@ import { getTokenValue } from './utilities/getTokenValue.js';
|
|
|
4
4
|
import { rgbaFloatToHex } from './utilities/rgbaFloatToHex.js';
|
|
5
5
|
import { hexToRgbaFloat } from './utilities/hexToRgbaFloat.js';
|
|
6
6
|
import { isRgbaFloat } from './utilities/isRgbaFloat.js';
|
|
7
|
+
import { normalizeColorValue, isW3cColorValue } from './utilities/normalizeColorValue.js';
|
|
7
8
|
const toRgbaFloat = (token, alpha = undefined) => {
|
|
8
9
|
let tokenValue = getTokenValue(token);
|
|
10
|
+
// Handle W3C color object - convert to hex first
|
|
11
|
+
if (isW3cColorValue(tokenValue)) {
|
|
12
|
+
tokenValue = normalizeColorValue(tokenValue);
|
|
13
|
+
}
|
|
9
14
|
// get hex value from color string
|
|
10
15
|
if (isRgbaFloat(tokenValue)) {
|
|
11
16
|
tokenValue = rgbaFloatToHex(tokenValue, false);
|
|
@@ -27,10 +27,10 @@ export const durationToCss = {
|
|
|
27
27
|
if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {
|
|
28
28
|
throw new Error(`duration token value must be a finite, non-negative number, invalid token: ${token.name} with value: ${value}`);
|
|
29
29
|
}
|
|
30
|
-
//
|
|
31
|
-
if (unit === '
|
|
32
|
-
return `${value
|
|
30
|
+
// Always output in ms
|
|
31
|
+
if (unit === 's') {
|
|
32
|
+
return `${value * 1000}ms`;
|
|
33
33
|
}
|
|
34
|
-
return `${value}
|
|
34
|
+
return `${value}ms`;
|
|
35
35
|
},
|
|
36
36
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { toHex } from 'color2k';
|
|
2
2
|
import { isGradient } from '../filters/isGradient.js';
|
|
3
3
|
import { getTokenValue } from './utilities/getTokenValue.js';
|
|
4
|
+
import { normalizeColorValue } from './utilities/normalizeColorValue.js';
|
|
4
5
|
/**
|
|
5
6
|
* @description converts gradient tokens value to css gradient
|
|
6
7
|
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
@@ -16,7 +17,7 @@ export const gradientToCss = {
|
|
|
16
17
|
var _a, _b;
|
|
17
18
|
const { angle } = (_b = (_a = token.$extensions) === null || _a === void 0 ? void 0 : _a['org.primer.gradient']) !== null && _b !== void 0 ? _b : {};
|
|
18
19
|
const stops = getTokenValue(token).map(({ color, position }) => {
|
|
19
|
-
return `${toHex(color)} ${position * 100}%`;
|
|
20
|
+
return `${toHex(normalizeColorValue(color))} ${position * 100}%`;
|
|
20
21
|
});
|
|
21
22
|
return `linear-gradient(${angle || 180}deg, ${stops.join(', ')})`;
|
|
22
23
|
},
|
|
@@ -3,6 +3,7 @@ import { isShadow } from '../filters/index.js';
|
|
|
3
3
|
import { alpha } from './utilities/alpha.js';
|
|
4
4
|
import { checkRequiredTokenProperties } from './utilities/checkRequiredTokenProperties.js';
|
|
5
5
|
import { getTokenValue } from './utilities/getTokenValue.js';
|
|
6
|
+
import { normalizeColorValue } from './utilities/normalizeColorValue.js';
|
|
6
7
|
/**
|
|
7
8
|
* @description Converts a W3C dimension object to CSS string
|
|
8
9
|
* @param dim - The dimension value in W3C object format
|
|
@@ -38,7 +39,9 @@ export const shadowToCss = {
|
|
|
38
39
|
return shadow;
|
|
39
40
|
checkRequiredTokenProperties(shadow, ['color', 'offsetX', 'offsetY', 'blur', 'spread']);
|
|
40
41
|
/*css box shadow: inset? | offset-x | offset-y | blur-radius | spread-radius | color */
|
|
41
|
-
|
|
42
|
+
const colorString = normalizeColorValue(getTokenValue(Object.assign(Object.assign({}, token), { [valueProp]: shadow }), 'color'));
|
|
43
|
+
const colorHex = shadow.alpha !== undefined ? toHex(alpha(colorString, shadow.alpha, token, config)) : toHex(colorString);
|
|
44
|
+
return `${shadow.inset === true ? 'inset ' : ''}${dimensionToCss(shadow.offsetX)} ${dimensionToCss(shadow.offsetY)} ${dimensionToCss(shadow.blur)} ${dimensionToCss(shadow.spread)} ${colorHex}`;
|
|
42
45
|
})
|
|
43
46
|
.join(', ');
|
|
44
47
|
},
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Color from 'colorjs.io';
|
|
2
|
+
import type { ColorW3cValue } from '../../schemas/colorW3cValue.js';
|
|
3
|
+
export type ColorValue = string | ColorW3cValue;
|
|
4
|
+
/**
|
|
5
|
+
* Type guard to check if value is a valid W3C color object.
|
|
6
|
+
* Validates structure: colorSpace is a string, components is a 3-element array
|
|
7
|
+
* of numbers or 'none' keywords.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isW3cColorValue(value: unknown): value is ColorW3cValue;
|
|
10
|
+
/**
|
|
11
|
+
* Converts a W3C DTCG color object to a colorjs.io Color instance.
|
|
12
|
+
* The 'none' keyword is replaced with 0 per CSS Color 4 rules for color computation.
|
|
13
|
+
*/
|
|
14
|
+
export declare function w3cToColor(value: ColorW3cValue): Color;
|
|
15
|
+
/**
|
|
16
|
+
* Normalizes a color value for use in transformers.
|
|
17
|
+
* String values (hex, rgb, rgba, references) are returned as-is.
|
|
18
|
+
* W3C DTCG color objects are converted to hex via colorjs.io,
|
|
19
|
+
* correctly handling all color spaces (sRGB, display-p3, lab, etc.).
|
|
20
|
+
* @param value - color string or W3C color object
|
|
21
|
+
* @returns color string usable by downstream transformers
|
|
22
|
+
*/
|
|
23
|
+
export declare function normalizeColorValue(value: ColorValue): string;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import Color from 'colorjs.io';
|
|
2
|
+
/**
|
|
3
|
+
* Type guard to check if value is a valid W3C color object.
|
|
4
|
+
* Validates structure: colorSpace is a string, components is a 3-element array
|
|
5
|
+
* of numbers or 'none' keywords.
|
|
6
|
+
*/
|
|
7
|
+
export function isW3cColorValue(value) {
|
|
8
|
+
if (typeof value !== 'object' || value === null)
|
|
9
|
+
return false;
|
|
10
|
+
if (!('colorSpace' in value) || typeof value.colorSpace !== 'string')
|
|
11
|
+
return false;
|
|
12
|
+
if (!('components' in value))
|
|
13
|
+
return false;
|
|
14
|
+
const components = value.components;
|
|
15
|
+
if (!Array.isArray(components) || components.length !== 3)
|
|
16
|
+
return false;
|
|
17
|
+
return components.every(c => typeof c === 'number' || c === 'none');
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Maps W3C DTCG color space names to colorjs.io space identifiers
|
|
21
|
+
*/
|
|
22
|
+
const getColorSpace = (colorSpace) => {
|
|
23
|
+
switch (colorSpace) {
|
|
24
|
+
case 'display-p3':
|
|
25
|
+
return 'p3';
|
|
26
|
+
case 'a98-rgb':
|
|
27
|
+
return 'a98rgb';
|
|
28
|
+
case 'prophoto-rgb':
|
|
29
|
+
return 'prophoto';
|
|
30
|
+
default:
|
|
31
|
+
return colorSpace;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Converts a W3C DTCG color object to a colorjs.io Color instance.
|
|
36
|
+
* The 'none' keyword is replaced with 0 per CSS Color 4 rules for color computation.
|
|
37
|
+
*/
|
|
38
|
+
export function w3cToColor(value) {
|
|
39
|
+
var _a;
|
|
40
|
+
const coords = value.components.map(c => (c === 'none' ? 0 : c));
|
|
41
|
+
return new Color({
|
|
42
|
+
space: getColorSpace(value.colorSpace),
|
|
43
|
+
coords,
|
|
44
|
+
alpha: (_a = value.alpha) !== null && _a !== void 0 ? _a : 1,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Normalizes a color value for use in transformers.
|
|
49
|
+
* String values (hex, rgb, rgba, references) are returned as-is.
|
|
50
|
+
* W3C DTCG color objects are converted to hex via colorjs.io,
|
|
51
|
+
* correctly handling all color spaces (sRGB, display-p3, lab, etc.).
|
|
52
|
+
* @param value - color string or W3C color object
|
|
53
|
+
* @returns color string usable by downstream transformers
|
|
54
|
+
*/
|
|
55
|
+
export function normalizeColorValue(value) {
|
|
56
|
+
// String value (hex, rgb, rgba, reference, etc.) - return as-is
|
|
57
|
+
if (typeof value === 'string') {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
// W3C object with hex property and sRGB color space - use hex directly
|
|
61
|
+
if (value.hex && value.colorSpace === 'srgb' && (value.alpha === undefined || value.alpha === 1)) {
|
|
62
|
+
return value.hex;
|
|
63
|
+
}
|
|
64
|
+
// Convert via colorjs.io for correct color space handling
|
|
65
|
+
const color = w3cToColor(value);
|
|
66
|
+
const rgb = color.toGamut('srgb').to('srgb');
|
|
67
|
+
const [r, g, b] = rgb.coords.map(x => Math.round(Math.max(0, Math.min(1, x !== null && x !== void 0 ? x : 0)) * 255));
|
|
68
|
+
const hex = `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;
|
|
69
|
+
if (rgb.alpha < 1) {
|
|
70
|
+
const a = Math.round(rgb.alpha * 255);
|
|
71
|
+
return hex + a.toString(16).padStart(2, '0');
|
|
72
|
+
}
|
|
73
|
+
return hex;
|
|
74
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {DimensionTokenValue} from './dimensionTokenValue.js'
|
|
2
|
+
import type {ColorW3cValue} from '../schemas/colorW3cValue.js'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Type definition for w3c border composite token value
|
|
@@ -6,7 +7,7 @@ import type {DimensionTokenValue} from './dimensionTokenValue.js'
|
|
|
6
7
|
*/
|
|
7
8
|
export type StrokeStyleString = 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'outset' | 'inset'
|
|
8
9
|
export type BorderTokenValue = {
|
|
9
|
-
color: string
|
|
10
|
+
color: string | ColorW3cValue
|
|
10
11
|
width: string | DimensionTokenValue
|
|
11
12
|
style: StrokeStyleString
|
|
12
13
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type {DimensionTokenValue} from './dimensionTokenValue.js'
|
|
2
|
+
import type {ColorW3cValue} from '../schemas/colorW3cValue.js'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Type definition for w3c shadow composite token value
|
|
5
6
|
* @link https://design-tokens.github.io/community-group/format/#shadow
|
|
6
7
|
*/
|
|
7
8
|
export type ShadowTokenValue = {
|
|
8
|
-
color: string
|
|
9
|
+
color: string | ColorW3cValue
|
|
9
10
|
offsetX: DimensionTokenValue
|
|
10
11
|
offsetY: DimensionTokenValue
|
|
11
12
|
blur: DimensionTokenValue
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--borderRadius-full: 624.9375rem; /** Use this border radius for pill shaped elements */
|
|
3
|
-
--borderRadius-large: 0.75rem; /** Large border radius (12px). Use for larger containers, dialogs, or when more visual softness is desired.
|
|
3
|
+
--borderRadius-large: 0.75rem; /** Large border radius (12px). Use for larger containers, dialogs, or when more visual softness is desired. */
|
|
4
4
|
--borderRadius-medium: 0.375rem; /** Medium border radius (6px). The default choice for most buttons, cards, and containers */
|
|
5
5
|
--borderRadius-small: 0.1875rem; /** Small border radius (3px). Use for small variants of components or small UI elements like badges, tags, or anything below 16px in height */
|
|
6
6
|
--borderRadius-default: var(--borderRadius-medium); /** Default border radius for most UI elements. Alias of borderRadius.medium (6px). Use when in doubt */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@media (pointer: coarse) {
|
|
2
2
|
:root {
|
|
3
3
|
--control-minTarget-auto: 2.75rem; /** Minimum touch target size for coarse pointer devices (touch screens) */
|
|
4
|
+
--controlStack-large-gap-auto: 0.75rem; /** Gap between stacked controls in large density layouts for touch devices */
|
|
4
5
|
--controlStack-medium-gap-auto: 0.75rem; /** Gap between stacked controls in medium density layouts for touch devices */
|
|
5
6
|
--controlStack-small-gap-auto: 1rem; /** Gap between stacked controls in small density layouts for touch devices */
|
|
6
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@media (pointer: fine) {
|
|
2
2
|
:root {
|
|
3
3
|
--control-minTarget-auto: 1rem; /** Minimum target size for fine pointer devices (mouse) */
|
|
4
|
+
--controlStack-large-gap-auto: 0.5rem; /** Gap between stacked controls in large density layouts for mouse interfaces */
|
|
4
5
|
--controlStack-medium-gap-auto: 0.5rem; /** Gap between stacked controls in medium density layouts for mouse interfaces */
|
|
5
6
|
--controlStack-small-gap-auto: 0.5rem; /** Gap between stacked controls in small density layouts for mouse interfaces */
|
|
6
7
|
}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--spinner-strokeWidth-default: 0.125rem;
|
|
17
17
|
--control-large-gap: 0.5rem;
|
|
18
18
|
--control-large-lineBoxHeight: 1.25rem;
|
|
19
|
+
--control-large-paddingInline-condensed: 0.5rem;
|
|
19
20
|
--control-large-paddingInline-normal: 0.75rem;
|
|
20
21
|
--control-large-paddingInline-spacious: 1rem;
|
|
21
22
|
--control-large-size: 2.5rem;
|
|
@@ -32,9 +33,11 @@
|
|
|
32
33
|
--control-small-paddingBlock: 0.25rem;
|
|
33
34
|
--control-small-paddingInline-condensed: 0.5rem;
|
|
34
35
|
--control-small-paddingInline-normal: 0.75rem;
|
|
36
|
+
--control-small-paddingInline-spacious: 1rem;
|
|
35
37
|
--control-small-size: 1.75rem;
|
|
36
38
|
--control-xlarge-gap: 0.5rem;
|
|
37
39
|
--control-xlarge-lineBoxHeight: 1.25rem;
|
|
40
|
+
--control-xlarge-paddingInline-condensed: 0.5rem;
|
|
38
41
|
--control-xlarge-paddingInline-normal: 0.75rem;
|
|
39
42
|
--control-xlarge-paddingInline-spacious: 1rem;
|
|
40
43
|
--control-xlarge-size: 3rem;
|
|
@@ -47,8 +50,10 @@
|
|
|
47
50
|
--controlStack-large-gap-auto: 0.5rem;
|
|
48
51
|
--controlStack-large-gap-condensed: 0.5rem;
|
|
49
52
|
--controlStack-large-gap-spacious: 0.75rem;
|
|
53
|
+
--controlStack-medium-gap-auto: 0.5rem;
|
|
50
54
|
--controlStack-medium-gap-condensed: 0.5rem;
|
|
51
55
|
--controlStack-medium-gap-spacious: 0.75rem;
|
|
56
|
+
--controlStack-small-gap-auto: 0.5rem;
|
|
52
57
|
--controlStack-small-gap-condensed: 0.5rem;
|
|
53
58
|
--controlStack-small-gap-spacious: 1rem;
|
|
54
59
|
--overlay-borderRadius: 0.375rem;
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
--borderColor-sponsors-muted: #f87cbd; /** Subtle border for GitHub Sponsors content */
|
|
59
59
|
--borderColor-success-emphasis: #409eff; /** Strong success border for prominent positive elements */
|
|
60
60
|
--borderColor-success-muted: #5cacff; /** Subtle success border for positive feedback elements */
|
|
61
|
-
--borderColor-translucent: #9198a1; /** Semi-transparent border for overlays and layered elements */
|
|
61
|
+
--borderColor-translucent: #9198a1; /** Semi-transparent border for overlays and layered elements. Border-specific token — no bgColor-translucent counterpart exists by design. */
|
|
62
62
|
--borderColor-transparent: #00000000; /** Fully transparent border */
|
|
63
63
|
--button-danger-bgColor-hover: #8f3c00;
|
|
64
64
|
--button-danger-borderColor-hover: #ffb757;
|
|
65
65
|
--button-danger-fgColor-rest: #ffb757;
|
|
66
|
-
--button-danger-shadow-selected: 0 0 0 0 #
|
|
67
|
-
--button-default-shadow-resting: 0 0 0 0 #
|
|
66
|
+
--button-danger-shadow-selected: 0 0 0 0 #00000000;
|
|
67
|
+
--button-default-shadow-resting: 0 0 0 0 #00000000;
|
|
68
68
|
--button-inactive-bgColor: #262c36;
|
|
69
69
|
--button-inactive-fgColor: #b7bdc8;
|
|
70
70
|
--button-invisible-bgColor-active: #212830;
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
--button-outline-fgColor-disabled: #74b9ff80;
|
|
79
79
|
--button-outline-fgColor-hover: #71b7ff;
|
|
80
80
|
--button-outline-fgColor-rest: #5cacff;
|
|
81
|
-
--button-outline-shadow-selected: 0 0 0 0 #
|
|
81
|
+
--button-outline-shadow-selected: 0 0 0 0 #00000000;
|
|
82
82
|
--button-primary-bgColor-disabled: #318bf8;
|
|
83
83
|
--button-primary-borderColor-rest: #91cbff;
|
|
84
|
-
--button-primary-shadow-selected: 0 0 0 0 #
|
|
84
|
+
--button-primary-shadow-selected: 0 0 0 0 #00000000;
|
|
85
85
|
--button-star-iconColor: #f7c843;
|
|
86
86
|
--buttonCounter-default-bgColor-rest: #2f3742;
|
|
87
87
|
--buttonCounter-outline-bgColor-hover: #194fb133;
|
|
@@ -668,6 +668,7 @@
|
|
|
668
668
|
--border-sponsors-muted: 0.0625rem solid #f87cbd;
|
|
669
669
|
--border-success-emphasis: 0.0625rem solid #409eff;
|
|
670
670
|
--border-success-muted: 0.0625rem solid #5cacff;
|
|
671
|
+
--border-translucent: 0.0625rem solid #9198a1; /** Semi-transparent border shorthand for overlays and layered elements. Border-specific token — no bgColor-translucent counterpart exists by design. */
|
|
671
672
|
--border-transparent: 0.0625rem solid #00000000;
|
|
672
673
|
--borderColor-closed-muted: var(--borderColor-default); /** Subtle border for closed state indicators */
|
|
673
674
|
--borderColor-draft-muted: var(--borderColor-default); /** Subtle border for draft state indicators */
|
|
@@ -807,6 +808,7 @@
|
|
|
807
808
|
--avatar-borderColor: var(--borderColor-emphasis);
|
|
808
809
|
--border-closed-emphasis: var(--border-danger-emphasis);
|
|
809
810
|
--border-closed-muted: var(--border-danger-muted);
|
|
811
|
+
--border-draft-muted: 0.0625rem solid #b7bdc8;
|
|
810
812
|
--border-emphasis: 0.0625rem solid #b7bdc8;
|
|
811
813
|
--border-muted: 0.0625rem solid #b7bdc8;
|
|
812
814
|
--border-open-emphasis: var(--border-success-emphasis);
|
|
@@ -818,14 +820,17 @@
|
|
|
818
820
|
--borderColor-neutral-muted: var(--borderColor-muted); /** Subtle neutral semantic border */
|
|
819
821
|
--button-danger-bgColor-disabled: var(--control-bgColor-disabled);
|
|
820
822
|
--button-danger-borderColor-rest: var(--control-borderColor-rest);
|
|
823
|
+
--button-danger-iconColor-disabled: var(--button-danger-fgColor-disabled);
|
|
821
824
|
--button-default-bgColor-disabled: var(--control-bgColor-disabled);
|
|
822
825
|
--button-default-borderColor-disabled: var(--control-borderColor-disabled);
|
|
823
826
|
--button-default-borderColor-rest: var(--control-borderColor-rest);
|
|
827
|
+
--button-default-fgColor-disabled: var(--control-fgColor-disabled);
|
|
824
828
|
--button-invisible-borderColor-hover: var(--control-transparent-borderColor-hover);
|
|
825
829
|
--button-invisible-fgColor-disabled: var(--control-fgColor-disabled);
|
|
826
830
|
--button-invisible-iconColor-disabled: var(--control-fgColor-disabled);
|
|
827
831
|
--button-outline-bgColor-disabled: var(--control-bgColor-disabled);
|
|
828
832
|
--button-primary-fgColor-rest: var(--fgColor-white);
|
|
833
|
+
--button-primary-iconColor-disabled: var(--button-primary-fgColor-disabled);
|
|
829
834
|
--button-primary-iconColor-rest: var(--fgColor-white);
|
|
830
835
|
--buttonKeybindingHint-danger-bgColor-disabled: var(--buttonKeybindingHint-default-bgColor-disabled);
|
|
831
836
|
--buttonKeybindingHint-danger-fgColor-active: var(--fgColor-onEmphasis);
|
|
@@ -896,6 +901,7 @@
|
|
|
896
901
|
--controlKnob-borderColor-rest: var(--control-borderColor-emphasis);
|
|
897
902
|
--progressBar-track-borderColor: var(--progressBar-track-bgColor);
|
|
898
903
|
--underlineNav-borderColor-hover: var(--borderColor-neutral-muted);
|
|
904
|
+
--border-draft-emphasis: 0.0625rem solid #b7bdc8;
|
|
899
905
|
--button-outline-borderColor-hover: var(--button-default-borderColor-hover);
|
|
900
906
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
901
907
|
}
|
|
@@ -955,13 +961,13 @@
|
|
|
955
961
|
--borderColor-sponsors-muted: #f87cbd; /** Subtle border for GitHub Sponsors content */
|
|
956
962
|
--borderColor-success-emphasis: #409eff; /** Strong success border for prominent positive elements */
|
|
957
963
|
--borderColor-success-muted: #5cacff; /** Subtle success border for positive feedback elements */
|
|
958
|
-
--borderColor-translucent: #9198a1; /** Semi-transparent border for overlays and layered elements */
|
|
964
|
+
--borderColor-translucent: #9198a1; /** Semi-transparent border for overlays and layered elements. Border-specific token — no bgColor-translucent counterpart exists by design. */
|
|
959
965
|
--borderColor-transparent: #00000000; /** Fully transparent border */
|
|
960
966
|
--button-danger-bgColor-hover: #8f3c00;
|
|
961
967
|
--button-danger-borderColor-hover: #ffb757;
|
|
962
968
|
--button-danger-fgColor-rest: #ffb757;
|
|
963
|
-
--button-danger-shadow-selected: 0 0 0 0 #
|
|
964
|
-
--button-default-shadow-resting: 0 0 0 0 #
|
|
969
|
+
--button-danger-shadow-selected: 0 0 0 0 #00000000;
|
|
970
|
+
--button-default-shadow-resting: 0 0 0 0 #00000000;
|
|
965
971
|
--button-inactive-bgColor: #262c36;
|
|
966
972
|
--button-inactive-fgColor: #b7bdc8;
|
|
967
973
|
--button-invisible-bgColor-active: #212830;
|
|
@@ -975,10 +981,10 @@
|
|
|
975
981
|
--button-outline-fgColor-disabled: #74b9ff80;
|
|
976
982
|
--button-outline-fgColor-hover: #71b7ff;
|
|
977
983
|
--button-outline-fgColor-rest: #5cacff;
|
|
978
|
-
--button-outline-shadow-selected: 0 0 0 0 #
|
|
984
|
+
--button-outline-shadow-selected: 0 0 0 0 #00000000;
|
|
979
985
|
--button-primary-bgColor-disabled: #318bf8;
|
|
980
986
|
--button-primary-borderColor-rest: #91cbff;
|
|
981
|
-
--button-primary-shadow-selected: 0 0 0 0 #
|
|
987
|
+
--button-primary-shadow-selected: 0 0 0 0 #00000000;
|
|
982
988
|
--button-star-iconColor: #f7c843;
|
|
983
989
|
--buttonCounter-default-bgColor-rest: #2f3742;
|
|
984
990
|
--buttonCounter-outline-bgColor-hover: #194fb133;
|
|
@@ -1565,6 +1571,7 @@
|
|
|
1565
1571
|
--border-sponsors-muted: 0.0625rem solid #f87cbd;
|
|
1566
1572
|
--border-success-emphasis: 0.0625rem solid #409eff;
|
|
1567
1573
|
--border-success-muted: 0.0625rem solid #5cacff;
|
|
1574
|
+
--border-translucent: 0.0625rem solid #9198a1; /** Semi-transparent border shorthand for overlays and layered elements. Border-specific token — no bgColor-translucent counterpart exists by design. */
|
|
1568
1575
|
--border-transparent: 0.0625rem solid #00000000;
|
|
1569
1576
|
--borderColor-closed-muted: var(--borderColor-default); /** Subtle border for closed state indicators */
|
|
1570
1577
|
--borderColor-draft-muted: var(--borderColor-default); /** Subtle border for draft state indicators */
|
|
@@ -1704,6 +1711,7 @@
|
|
|
1704
1711
|
--avatar-borderColor: var(--borderColor-emphasis);
|
|
1705
1712
|
--border-closed-emphasis: var(--border-danger-emphasis);
|
|
1706
1713
|
--border-closed-muted: var(--border-danger-muted);
|
|
1714
|
+
--border-draft-muted: 0.0625rem solid #b7bdc8;
|
|
1707
1715
|
--border-emphasis: 0.0625rem solid #b7bdc8;
|
|
1708
1716
|
--border-muted: 0.0625rem solid #b7bdc8;
|
|
1709
1717
|
--border-open-emphasis: var(--border-success-emphasis);
|
|
@@ -1715,14 +1723,17 @@
|
|
|
1715
1723
|
--borderColor-neutral-muted: var(--borderColor-muted); /** Subtle neutral semantic border */
|
|
1716
1724
|
--button-danger-bgColor-disabled: var(--control-bgColor-disabled);
|
|
1717
1725
|
--button-danger-borderColor-rest: var(--control-borderColor-rest);
|
|
1726
|
+
--button-danger-iconColor-disabled: var(--button-danger-fgColor-disabled);
|
|
1718
1727
|
--button-default-bgColor-disabled: var(--control-bgColor-disabled);
|
|
1719
1728
|
--button-default-borderColor-disabled: var(--control-borderColor-disabled);
|
|
1720
1729
|
--button-default-borderColor-rest: var(--control-borderColor-rest);
|
|
1730
|
+
--button-default-fgColor-disabled: var(--control-fgColor-disabled);
|
|
1721
1731
|
--button-invisible-borderColor-hover: var(--control-transparent-borderColor-hover);
|
|
1722
1732
|
--button-invisible-fgColor-disabled: var(--control-fgColor-disabled);
|
|
1723
1733
|
--button-invisible-iconColor-disabled: var(--control-fgColor-disabled);
|
|
1724
1734
|
--button-outline-bgColor-disabled: var(--control-bgColor-disabled);
|
|
1725
1735
|
--button-primary-fgColor-rest: var(--fgColor-white);
|
|
1736
|
+
--button-primary-iconColor-disabled: var(--button-primary-fgColor-disabled);
|
|
1726
1737
|
--button-primary-iconColor-rest: var(--fgColor-white);
|
|
1727
1738
|
--buttonKeybindingHint-danger-bgColor-disabled: var(--buttonKeybindingHint-default-bgColor-disabled);
|
|
1728
1739
|
--buttonKeybindingHint-danger-fgColor-active: var(--fgColor-onEmphasis);
|
|
@@ -1793,6 +1804,7 @@
|
|
|
1793
1804
|
--controlKnob-borderColor-rest: var(--control-borderColor-emphasis);
|
|
1794
1805
|
--progressBar-track-borderColor: var(--progressBar-track-bgColor);
|
|
1795
1806
|
--underlineNav-borderColor-hover: var(--borderColor-neutral-muted);
|
|
1807
|
+
--border-draft-emphasis: 0.0625rem solid #b7bdc8;
|
|
1796
1808
|
--button-outline-borderColor-hover: var(--button-default-borderColor-hover);
|
|
1797
1809
|
--button-outline-borderColor-active: var(--button-outline-borderColor-hover);
|
|
1798
1810
|
}
|