@primer/primitives 9.1.0-rc.e0e1c4b6 → 9.1.1-rc.694a8233
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/dist/build/PrimerStyleDictionary.js +1 -0
- package/dist/build/formats/cssAdvanced.js +9 -10
- package/dist/build/formats/javascriptCommonJs.js +1 -1
- package/dist/build/transformers/index.d.ts +1 -0
- package/dist/build/transformers/index.js +3 -1
- package/dist/css/functional/motion/motion.css +3 -3
- package/dist/css/functional/size/border.css +2 -2
- package/dist/css/functional/typography/typography.css +11 -11
- package/dist/css/primitives.css +16 -16
- package/package.json +12 -8
- package/src/tokens/base/color/dark/dark.dimmed.json5 +1164 -0
- package/src/tokens/base/color/dark/dark.high-contrast.json5 +764 -0
- package/src/tokens/base/color/dark/dark.json5 +911 -0
- package/src/tokens/base/color/dark/display-dark.json5 +1774 -0
- package/src/tokens/base/color/light/display-light.json5 +1774 -0
- package/src/tokens/base/color/light/light.high-contrast.json5 +755 -0
- package/src/tokens/base/color/light/light.json5 +911 -0
- package/src/tokens/base/size/size.json +196 -0
- package/src/tokens/base/typography/typography.json +48 -0
- package/src/tokens/fallback/color-fallbacks.json +270 -0
- package/src/tokens/functional/border/dark.json5 +12 -0
- package/src/tokens/functional/border/light.json5 +12 -0
- package/src/tokens/functional/color/dark/app-dark.json5 +554 -0
- package/src/tokens/functional/color/dark/data-vis-dark.json5 +284 -0
- package/src/tokens/functional/color/dark/display-dark.json5 +1258 -0
- package/src/tokens/functional/color/dark/overrides/dark.dimmed.json5 +194 -0
- package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +935 -0
- package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +310 -0
- package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +224 -0
- package/src/tokens/functional/color/dark/patterns-dark.json5 +3097 -0
- package/src/tokens/functional/color/dark/primitives-dark.json5 +1200 -0
- package/src/tokens/functional/color/dark/syntax-dark.json5 +559 -0
- package/src/tokens/functional/color/light/app-light.json5 +551 -0
- package/src/tokens/functional/color/light/data-vis-light.json5 +284 -0
- package/src/tokens/functional/color/light/display-light.json5 +1258 -0
- package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +819 -0
- package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +327 -0
- package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +237 -0
- package/src/tokens/functional/color/light/patterns-light.json5 +3091 -0
- package/src/tokens/functional/color/light/primitives-light.json5 +1193 -0
- package/src/tokens/functional/color/light/syntax-light.json5 +559 -0
- package/src/tokens/functional/motion/loading.json5 +17 -0
- package/src/tokens/functional/motion/patterns.json5 +28 -0
- package/src/tokens/functional/shadow/dark.json5 +383 -0
- package/src/tokens/functional/shadow/light.json5 +376 -0
- package/src/tokens/functional/size/border.json +111 -0
- package/src/tokens/functional/size/breakpoints.json +64 -0
- package/src/tokens/functional/size/size-coarse.json +28 -0
- package/src/tokens/functional/size/size-fine.json +28 -0
- package/src/tokens/functional/size/size.json +740 -0
- package/src/tokens/functional/size/viewport.json +28 -0
- package/src/tokens/functional/typography/typography.json +527 -0
- package/src/tokens/removed/color.json +421 -0
- package/src/tokens/removed/testing.json5 +4 -0
|
@@ -71,6 +71,7 @@ style_dictionary_1.default.registerTransform(Object.assign({ name: 'duration/css
|
|
|
71
71
|
style_dictionary_1.default.registerTransform(Object.assign({ name: 'figma/attributes' }, transformers_1.figmaAttributes));
|
|
72
72
|
style_dictionary_1.default.registerTransform(Object.assign({ name: 'json/deprecated' }, transformers_1.jsonDeprecated));
|
|
73
73
|
style_dictionary_1.default.registerTransform(Object.assign({ name: 'name/pathToCamelCase' }, transformers_1.namePathToCamelCase));
|
|
74
|
+
style_dictionary_1.default.registerTransform(Object.assign({ name: 'name/pathToPascalCase' }, transformers_1.namePathToPascalCase));
|
|
74
75
|
style_dictionary_1.default.registerTransform(Object.assign({ name: 'name/pathToDotNotation' }, transformers_1.namePathToDotNotation));
|
|
75
76
|
style_dictionary_1.default.registerTransform(Object.assign({ name: 'name/pathToFigma' }, transformers_1.namePathToFigma));
|
|
76
77
|
style_dictionary_1.default.registerTransform(Object.assign({ name: 'name/pathToCamelCase' }, transformers_1.namePathToCamelCase));
|
|
@@ -16,10 +16,10 @@ const wrapWithSelector = (css, selector) => {
|
|
|
16
16
|
};
|
|
17
17
|
const cssAdvanced = ({ dictionary: originalDictionary, options = {
|
|
18
18
|
queries: [],
|
|
19
|
-
}, file,
|
|
19
|
+
}, file, }) => {
|
|
20
20
|
var _a, _b, _c, _d;
|
|
21
21
|
// get options
|
|
22
|
-
const { outputReferences,
|
|
22
|
+
const { outputReferences, formatting } = options;
|
|
23
23
|
// selector
|
|
24
24
|
const selector = ((_a = file.options) === null || _a === void 0 ? void 0 : _a.selector) !== undefined ? file.options.selector : ':root';
|
|
25
25
|
// query extension property
|
|
@@ -32,15 +32,9 @@ const cssAdvanced = ({ dictionary: originalDictionary, options = {
|
|
|
32
32
|
},
|
|
33
33
|
];
|
|
34
34
|
// set formatting
|
|
35
|
-
const
|
|
36
|
-
commentStyle: descriptions ? 'long' : 'none',
|
|
37
|
-
};
|
|
35
|
+
const mergedFormatting = Object.assign({ commentStyle: 'long' }, formatting);
|
|
38
36
|
// clone dictionary
|
|
39
37
|
const dictionary = Object.assign({}, originalDictionary);
|
|
40
|
-
// add prefix to tokens
|
|
41
|
-
if (platform.prefix) {
|
|
42
|
-
dictionary.allTokens = dictionary.allTokens.map(token => (Object.assign(Object.assign({}, token), { name: `${platform.prefix}-${token.name}`, path: [platform.prefix, ...token.path] })));
|
|
43
|
-
}
|
|
44
38
|
// get queries from tokens
|
|
45
39
|
for (const designToken of dictionary.allTokens) {
|
|
46
40
|
const query = (_d = designToken.$extensions) === null || _d === void 0 ? void 0 : _d[queryExtProp];
|
|
@@ -73,7 +67,12 @@ const cssAdvanced = ({ dictionary: originalDictionary, options = {
|
|
|
73
67
|
if (!filteredDictionary.allTokens.length)
|
|
74
68
|
continue;
|
|
75
69
|
// add tokens into root
|
|
76
|
-
const css = formattedVariables({
|
|
70
|
+
const css = formattedVariables({
|
|
71
|
+
format: 'css',
|
|
72
|
+
dictionary: filteredDictionary,
|
|
73
|
+
outputReferences,
|
|
74
|
+
formatting: mergedFormatting,
|
|
75
|
+
});
|
|
77
76
|
// wrap css
|
|
78
77
|
const cssWithSelector = wrapWithSelector(css, query.selector !== undefined ? query.selector : selector);
|
|
79
78
|
// add css with or without query
|
|
@@ -18,7 +18,7 @@ const javascriptCommonJs = ({ dictionary, file, platform }) => {
|
|
|
18
18
|
// add prefix if defined
|
|
19
19
|
const tokens = (0, prefixTokens_1.prefixTokens)(dictionary.tokens, platform);
|
|
20
20
|
// add file header and convert output
|
|
21
|
-
const output = `${fileHeader({ file })}exports
|
|
21
|
+
const output = `${fileHeader({ file })}module.exports = ${JSON.stringify((0, jsonToNestedValue_1.jsonToNestedValue)(tokens), null, 2)}\n`;
|
|
22
22
|
// return prettified
|
|
23
23
|
return sync_1.default.format(output, { parser: 'typescript', printWidth: 500 });
|
|
24
24
|
};
|
|
@@ -16,6 +16,7 @@ export { fontFamilyToFigma } from './fontFamilyToFigma';
|
|
|
16
16
|
export { fontWeightToNumber } from './fontWeightToNumber';
|
|
17
17
|
export { jsonDeprecated } from './jsonDeprecated';
|
|
18
18
|
export { namePathToCamelCase } from './namePathToCamelCase';
|
|
19
|
+
export { namePathToPascalCase } from './namePathToPascalCase';
|
|
19
20
|
export { namePathToDotNotation } from './namePathToDotNotation';
|
|
20
21
|
export { namePathToFigma } from './namePathToFigma';
|
|
21
22
|
export { namePathToKebabCase } from './namePathToKebabCase';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.typographyToCss = exports.shadowToCss = exports.namePathToSlashNotation = exports.namePathToKebabCase = exports.namePathToFigma = exports.namePathToDotNotation = exports.namePathToCamelCase = exports.jsonDeprecated = exports.fontWeightToNumber = exports.fontFamilyToFigma = exports.fontFamilyToCss = exports.figmaAttributes = exports.durationToCss = exports.dimensionToPixelUnitless = exports.dimensionToRemPxArray = exports.dimensionToRem = exports.floatToPixelUnitless = exports.floatToPixel = exports.colorToRgbaFloat = exports.colorToRgbAlpha = exports.colorToHexMix = exports.colorToHexAlpha = exports.colorToHex = exports.borderToCss = void 0;
|
|
3
|
+
exports.typographyToCss = exports.shadowToCss = exports.namePathToSlashNotation = exports.namePathToKebabCase = exports.namePathToFigma = exports.namePathToDotNotation = exports.namePathToPascalCase = exports.namePathToCamelCase = exports.jsonDeprecated = exports.fontWeightToNumber = exports.fontFamilyToFigma = exports.fontFamilyToCss = exports.figmaAttributes = exports.durationToCss = exports.dimensionToPixelUnitless = exports.dimensionToRemPxArray = exports.dimensionToRem = exports.floatToPixelUnitless = exports.floatToPixel = exports.colorToRgbaFloat = exports.colorToRgbAlpha = exports.colorToHexMix = exports.colorToHexAlpha = exports.colorToHex = exports.borderToCss = void 0;
|
|
4
4
|
var borderToCss_1 = require("./borderToCss");
|
|
5
5
|
Object.defineProperty(exports, "borderToCss", { enumerable: true, get: function () { return borderToCss_1.borderToCss; } });
|
|
6
6
|
var colorToHex_1 = require("./colorToHex");
|
|
@@ -37,6 +37,8 @@ var jsonDeprecated_1 = require("./jsonDeprecated");
|
|
|
37
37
|
Object.defineProperty(exports, "jsonDeprecated", { enumerable: true, get: function () { return jsonDeprecated_1.jsonDeprecated; } });
|
|
38
38
|
var namePathToCamelCase_1 = require("./namePathToCamelCase");
|
|
39
39
|
Object.defineProperty(exports, "namePathToCamelCase", { enumerable: true, get: function () { return namePathToCamelCase_1.namePathToCamelCase; } });
|
|
40
|
+
var namePathToPascalCase_1 = require("./namePathToPascalCase");
|
|
41
|
+
Object.defineProperty(exports, "namePathToPascalCase", { enumerable: true, get: function () { return namePathToPascalCase_1.namePathToPascalCase; } });
|
|
40
42
|
var namePathToDotNotation_1 = require("./namePathToDotNotation");
|
|
41
43
|
Object.defineProperty(exports, "namePathToDotNotation", { enumerable: true, get: function () { return namePathToDotNotation_1.namePathToDotNotation; } });
|
|
42
44
|
var namePathToFigma_1 = require("./namePathToFigma");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--motion-skeletonLoader-shimmer-duration-scale: 1s;
|
|
3
|
-
--motion-spinner-duration-rotation: 1s;
|
|
4
|
-
--motion-loading-delay-default: 1s;
|
|
2
|
+
--motion-skeletonLoader-shimmer-duration-scale: 1s; /* The amount of times it takes the "shimmer" effect to go from the start (left) of the skeleton loader to the end (right) */
|
|
3
|
+
--motion-spinner-duration-rotation: 1s; /* The amount of time it takes the "Spinner" loading indicator to make a full 360deg rotation */
|
|
4
|
+
--motion-loading-delay-default: 1s; /* The amount of time to wait before showing a loading indicator or announcing a loading state to assistive technologies. */
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--boxShadow-thin: inset 0 0 0 max(1px, 0.0625rem);
|
|
2
|
+
--boxShadow-thin: inset 0 0 0 max(1px, 0.0625rem); /* Thin shadow for borders */
|
|
3
3
|
--boxShadow-thick: inset 0 0 0 max(2px, 0.125rem);
|
|
4
4
|
--boxShadow-thicker: inset 0 0 0 max(4px, 0.25rem);
|
|
5
5
|
--borderWidth-thin: max(1px, 0.0625rem);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--borderRadius-small: 0.1875rem;
|
|
9
9
|
--borderRadius-medium: 0.375rem;
|
|
10
10
|
--borderRadius-large: 0.75rem;
|
|
11
|
-
--borderRadius-full: 624.9375rem;
|
|
11
|
+
--borderRadius-full: 624.9375rem; /* Use this border radius for pill shaped elements */
|
|
12
12
|
--borderRadius-default: 0.375rem;
|
|
13
13
|
--outline-focus-offset: -0.125rem;
|
|
14
14
|
--outline-focus-width: 0.125rem;
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
--text-title-weight-medium: var(--base-text-weight-semibold);
|
|
35
35
|
--text-title-weight-large: var(--base-text-weight-semibold);
|
|
36
36
|
--text-display-weight: var(--base-text-weight-medium);
|
|
37
|
-
--text-codeInline-shorthand: var(--text-codeInline-weight) var(--text-codeInline-size) var(--fontStack-monospace);
|
|
38
|
-
--text-codeBlock-shorthand: var(--text-codeBlock-weight) var(--text-codeBlock-size) / var(--text-codeBlock-lineHeight) var(--fontStack-monospace);
|
|
39
|
-
--text-caption-shorthand: var(--text-caption-weight) var(--text-caption-size) / var(--text-caption-lineHeight) var(--fontStack-sansSerif);
|
|
40
|
-
--text-body-shorthand-small: var(--text-body-weight) var(--text-body-size-small) / var(--text-body-lineHeight-small) var(--fontStack-sansSerif);
|
|
41
|
-
--text-body-shorthand-medium: var(--text-body-weight) var(--text-body-size-medium) / var(--text-body-lineHeight-medium) var(--fontStack-sansSerif);
|
|
42
|
-
--text-body-shorthand-large: var(--text-body-weight) var(--text-body-size-large) / var(--text-body-lineHeight-large) var(--fontStack-sansSerif);
|
|
43
|
-
--text-subtitle-shorthand: var(--text-subtitle-weight) var(--text-subtitle-size) / var(--text-subtitle-lineHeight) var(--fontStack-sansSerifDisplay);
|
|
44
|
-
--text-title-shorthand-small: var(--text-title-weight-small) var(--text-title-size-small) / var(--text-title-lineHeight-small) var(--fontStack-sansSerif);
|
|
45
|
-
--text-title-shorthand-medium: var(--text-title-weight-medium) var(--text-title-size-medium) / var(--text-title-lineHeight-medium) var(--fontStack-sansSerifDisplay);
|
|
46
|
-
--text-title-shorthand-large: var(--text-title-weight-large) var(--text-title-size-large) / var(--text-title-lineHeight-large) var(--fontStack-sansSerifDisplay);
|
|
47
|
-
--text-display-shorthand: var(--text-display-weight) var(--text-display-size) / var(--text-display-lineHeight) var(--fontStack-sansSerifDisplay);
|
|
37
|
+
--text-codeInline-shorthand: var(--text-codeInline-weight) var(--text-codeInline-size) var(--fontStack-monospace); /* Inline code blocks using em units to inherit size from its parent. */
|
|
38
|
+
--text-codeBlock-shorthand: var(--text-codeBlock-weight) var(--text-codeBlock-size) / var(--text-codeBlock-lineHeight) var(--fontStack-monospace); /* Default style for rendering code blocks. */
|
|
39
|
+
--text-caption-shorthand: var(--text-caption-weight) var(--text-caption-size) / var(--text-caption-lineHeight) var(--fontStack-sansSerif); /* Compact small font with a smaller line height of 16px. Use it for single-line scenarios, as the small sizing doesn’t pass accessibility requirements. */
|
|
40
|
+
--text-body-shorthand-small: var(--text-body-weight) var(--text-body-size-small) / var(--text-body-lineHeight-small) var(--fontStack-sansSerif); /* Small body text for discrete UI applications, such as helper, footnote text. Should be used sparingly across pages. Line-height matches Body (medium) at 20px. */
|
|
41
|
+
--text-body-shorthand-medium: var(--text-body-weight) var(--text-body-size-medium) / var(--text-body-lineHeight-medium) var(--fontStack-sansSerif); /* Default UI font. Most commonly used for body text. */
|
|
42
|
+
--text-body-shorthand-large: var(--text-body-weight) var(--text-body-size-large) / var(--text-body-lineHeight-large) var(--fontStack-sansSerif); /* User-generated content, markdown rendering. */
|
|
43
|
+
--text-subtitle-shorthand: var(--text-subtitle-weight) var(--text-subtitle-size) / var(--text-subtitle-lineHeight) var(--fontStack-sansSerifDisplay); /* Page sections/sub headings, or less important object names in page titles (automated action titles, for example). Same line-height as title (medium). */
|
|
44
|
+
--text-title-shorthand-small: var(--text-title-weight-small) var(--text-title-size-small) / var(--text-title-lineHeight-small) var(--fontStack-sansSerif); /* Uses the same size as body (large) with a heavier weight of semibold (600). */
|
|
45
|
+
--text-title-shorthand-medium: var(--text-title-weight-medium) var(--text-title-size-medium) / var(--text-title-lineHeight-medium) var(--fontStack-sansSerifDisplay); /* Default page title. The 32px-equivalent line-height matches with button and other medium control heights. Great for page header composition. */
|
|
46
|
+
--text-title-shorthand-large: var(--text-title-weight-large) var(--text-title-size-large) / var(--text-title-lineHeight-large) var(--fontStack-sansSerifDisplay); /* Page headings for user-created objects, such as issues or pull requests. Utilize title (medium) styles on narrow viewports. */
|
|
47
|
+
--text-display-shorthand: var(--text-display-weight) var(--text-display-size) / var(--text-display-lineHeight) var(--fontStack-sansSerifDisplay); /* Hero-style text for brand to product transition pages. Utilize Title (large) styles on narrow viewports. */
|
|
48
48
|
}
|
package/dist/css/primitives.css
CHANGED
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
--base-text-weight-semibold: 600;
|
|
27
27
|
}
|
|
28
28
|
:root {
|
|
29
|
-
--motion-skeletonLoader-shimmer-duration-scale: 1s;
|
|
30
|
-
--motion-spinner-duration-rotation: 1s;
|
|
31
|
-
--motion-loading-delay-default: 1s;
|
|
29
|
+
--motion-skeletonLoader-shimmer-duration-scale: 1s; /* The amount of times it takes the "shimmer" effect to go from the start (left) of the skeleton loader to the end (right) */
|
|
30
|
+
--motion-spinner-duration-rotation: 1s; /* The amount of time it takes the "Spinner" loading indicator to make a full 360deg rotation */
|
|
31
|
+
--motion-loading-delay-default: 1s; /* The amount of time to wait before showing a loading indicator or announcing a loading state to assistive technologies. */
|
|
32
32
|
}
|
|
33
33
|
:root {
|
|
34
|
-
--boxShadow-thin: inset 0 0 0 max(1px, 0.0625rem);
|
|
34
|
+
--boxShadow-thin: inset 0 0 0 max(1px, 0.0625rem); /* Thin shadow for borders */
|
|
35
35
|
--boxShadow-thick: inset 0 0 0 max(2px, 0.125rem);
|
|
36
36
|
--boxShadow-thicker: inset 0 0 0 max(4px, 0.25rem);
|
|
37
37
|
--borderWidth-thin: max(1px, 0.0625rem);
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
--borderRadius-small: 0.1875rem;
|
|
41
41
|
--borderRadius-medium: 0.375rem;
|
|
42
42
|
--borderRadius-large: 0.75rem;
|
|
43
|
-
--borderRadius-full: 624.9375rem;
|
|
43
|
+
--borderRadius-full: 624.9375rem; /* Use this border radius for pill shaped elements */
|
|
44
44
|
--borderRadius-default: 0.375rem;
|
|
45
45
|
--outline-focus-offset: -0.125rem;
|
|
46
46
|
--outline-focus-width: 0.125rem;
|
|
@@ -171,15 +171,15 @@
|
|
|
171
171
|
--text-title-weight-medium: var(--base-text-weight-semibold);
|
|
172
172
|
--text-title-weight-large: var(--base-text-weight-semibold);
|
|
173
173
|
--text-display-weight: var(--base-text-weight-medium);
|
|
174
|
-
--text-codeInline-shorthand: var(--text-codeInline-weight) var(--text-codeInline-size) var(--fontStack-monospace);
|
|
175
|
-
--text-codeBlock-shorthand: var(--text-codeBlock-weight) var(--text-codeBlock-size) / var(--text-codeBlock-lineHeight) var(--fontStack-monospace);
|
|
176
|
-
--text-caption-shorthand: var(--text-caption-weight) var(--text-caption-size) / var(--text-caption-lineHeight) var(--fontStack-sansSerif);
|
|
177
|
-
--text-body-shorthand-small: var(--text-body-weight) var(--text-body-size-small) / var(--text-body-lineHeight-small) var(--fontStack-sansSerif);
|
|
178
|
-
--text-body-shorthand-medium: var(--text-body-weight) var(--text-body-size-medium) / var(--text-body-lineHeight-medium) var(--fontStack-sansSerif);
|
|
179
|
-
--text-body-shorthand-large: var(--text-body-weight) var(--text-body-size-large) / var(--text-body-lineHeight-large) var(--fontStack-sansSerif);
|
|
180
|
-
--text-subtitle-shorthand: var(--text-subtitle-weight) var(--text-subtitle-size) / var(--text-subtitle-lineHeight) var(--fontStack-sansSerifDisplay);
|
|
181
|
-
--text-title-shorthand-small: var(--text-title-weight-small) var(--text-title-size-small) / var(--text-title-lineHeight-small) var(--fontStack-sansSerif);
|
|
182
|
-
--text-title-shorthand-medium: var(--text-title-weight-medium) var(--text-title-size-medium) / var(--text-title-lineHeight-medium) var(--fontStack-sansSerifDisplay);
|
|
183
|
-
--text-title-shorthand-large: var(--text-title-weight-large) var(--text-title-size-large) / var(--text-title-lineHeight-large) var(--fontStack-sansSerifDisplay);
|
|
184
|
-
--text-display-shorthand: var(--text-display-weight) var(--text-display-size) / var(--text-display-lineHeight) var(--fontStack-sansSerifDisplay);
|
|
174
|
+
--text-codeInline-shorthand: var(--text-codeInline-weight) var(--text-codeInline-size) var(--fontStack-monospace); /* Inline code blocks using em units to inherit size from its parent. */
|
|
175
|
+
--text-codeBlock-shorthand: var(--text-codeBlock-weight) var(--text-codeBlock-size) / var(--text-codeBlock-lineHeight) var(--fontStack-monospace); /* Default style for rendering code blocks. */
|
|
176
|
+
--text-caption-shorthand: var(--text-caption-weight) var(--text-caption-size) / var(--text-caption-lineHeight) var(--fontStack-sansSerif); /* Compact small font with a smaller line height of 16px. Use it for single-line scenarios, as the small sizing doesn’t pass accessibility requirements. */
|
|
177
|
+
--text-body-shorthand-small: var(--text-body-weight) var(--text-body-size-small) / var(--text-body-lineHeight-small) var(--fontStack-sansSerif); /* Small body text for discrete UI applications, such as helper, footnote text. Should be used sparingly across pages. Line-height matches Body (medium) at 20px. */
|
|
178
|
+
--text-body-shorthand-medium: var(--text-body-weight) var(--text-body-size-medium) / var(--text-body-lineHeight-medium) var(--fontStack-sansSerif); /* Default UI font. Most commonly used for body text. */
|
|
179
|
+
--text-body-shorthand-large: var(--text-body-weight) var(--text-body-size-large) / var(--text-body-lineHeight-large) var(--fontStack-sansSerif); /* User-generated content, markdown rendering. */
|
|
180
|
+
--text-subtitle-shorthand: var(--text-subtitle-weight) var(--text-subtitle-size) / var(--text-subtitle-lineHeight) var(--fontStack-sansSerifDisplay); /* Page sections/sub headings, or less important object names in page titles (automated action titles, for example). Same line-height as title (medium). */
|
|
181
|
+
--text-title-shorthand-small: var(--text-title-weight-small) var(--text-title-size-small) / var(--text-title-lineHeight-small) var(--fontStack-sansSerif); /* Uses the same size as body (large) with a heavier weight of semibold (600). */
|
|
182
|
+
--text-title-shorthand-medium: var(--text-title-weight-medium) var(--text-title-size-medium) / var(--text-title-lineHeight-medium) var(--fontStack-sansSerifDisplay); /* Default page title. The 32px-equivalent line-height matches with button and other medium control heights. Great for page header composition. */
|
|
183
|
+
--text-title-shorthand-large: var(--text-title-weight-large) var(--text-title-size-large) / var(--text-title-lineHeight-large) var(--fontStack-sansSerifDisplay); /* Page headings for user-created objects, such as issues or pull requests. Utilize title (medium) styles on narrow viewports. */
|
|
184
|
+
--text-display-shorthand: var(--text-display-weight) var(--text-display-size) / var(--text-display-lineHeight) var(--fontStack-sansSerifDisplay); /* Hero-style text for brand to product transition pages. Utilize Title (large) styles on narrow viewports. */
|
|
185
185
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/primitives",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.1-rc.694a8233",
|
|
4
4
|
"description": "Typography, spacing, and color primitives for Primer design system",
|
|
5
5
|
"files": [
|
|
6
|
-
"dist"
|
|
6
|
+
"dist",
|
|
7
|
+
"src/tokens"
|
|
7
8
|
],
|
|
8
9
|
"repository": "https://github.com/primer/primitives",
|
|
9
10
|
"keywords": [
|
|
@@ -21,9 +22,8 @@
|
|
|
21
22
|
},
|
|
22
23
|
"homepage": "https://github.com/primer/primitives#readme",
|
|
23
24
|
"scripts": {
|
|
24
|
-
"build": "npm run build:
|
|
25
|
-
"build:
|
|
26
|
-
"build:v8": "tsx ./scripts/buildTokens.ts",
|
|
25
|
+
"build": "npm run build:tokens && npm run build:fallbacks && npm run build:figma && npm run build:config",
|
|
26
|
+
"build:tokens": "tsx ./scripts/buildTokens.ts",
|
|
27
27
|
"build:fallbacks": "tsx ./scripts/buildFallbacks.ts",
|
|
28
28
|
"build:figma": "tsx scripts/buildFigma.ts",
|
|
29
29
|
"build:config": "tsc -p buildConfig.tsconfig.jsonc",
|
|
@@ -39,16 +39,21 @@
|
|
|
39
39
|
"prepack": "npm run build",
|
|
40
40
|
"release": "changeset publish",
|
|
41
41
|
"start:storybook": "npm run build && cd docs/storybook && npm run storybook",
|
|
42
|
-
"test": "
|
|
42
|
+
"test": "npm run test:unit && npm run test:integration",
|
|
43
|
+
"test:unit": "vitest run --coverage",
|
|
44
|
+
"test:integration": "vitest run -r integration"
|
|
43
45
|
},
|
|
44
46
|
"prettier": "@github/prettier-config",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"prettier": "3.3",
|
|
49
|
+
"@prettier/sync": "^0.5.2"
|
|
50
|
+
},
|
|
45
51
|
"devDependencies": {
|
|
46
52
|
"@actions/github": "^6.0.0",
|
|
47
53
|
"@changesets/changelog-github": "^0.5.0",
|
|
48
54
|
"@changesets/cli": "^2.27.7",
|
|
49
55
|
"@github/prettier-config": "^0.0.6",
|
|
50
56
|
"@playwright/test": "^1.45.1",
|
|
51
|
-
"@prettier/sync": "^0.5.2",
|
|
52
57
|
"@types/node": "^20.14.9",
|
|
53
58
|
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
|
54
59
|
"@typescript-eslint/parser": "^7.15.0",
|
|
@@ -68,7 +73,6 @@
|
|
|
68
73
|
"eslint-plugin-storybook": "^0.8.0",
|
|
69
74
|
"json5": "^2.2.1",
|
|
70
75
|
"markdown-table-ts": "^1.0.3",
|
|
71
|
-
"prettier": "3.3",
|
|
72
76
|
"style-dictionary": "^3.9.2",
|
|
73
77
|
"tsx": "^4.16.2",
|
|
74
78
|
"typescript": "5.5",
|