@primer/primitives 7.17.0-rc.d7413369 → 7.17.1
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/README.md +1 -1
- package/dist/css/functional/typography/typography.css +1 -1
- package/dist/deprecated/colors.json +7 -0
- package/dist/docs/base/typography/typography.json +52 -4
- package/dist/docs/functional/themes/dark-colorblind.json +78 -78
- package/dist/docs/functional/themes/dark-dimmed.json +73 -73
- package/dist/docs/functional/themes/dark-high-contrast.json +75 -75
- package/dist/docs/functional/themes/dark-tritanopia.json +78 -78
- package/dist/docs/functional/themes/dark.json +73 -73
- package/dist/docs/functional/themes/light-colorblind.json +76 -76
- package/dist/docs/functional/themes/light-high-contrast.json +70 -70
- package/dist/docs/functional/themes/light-tritanopia.json +76 -76
- package/dist/docs/functional/themes/light.json +71 -71
- package/dist/docs/functional/typography/typography.json +455 -33
- package/dist/fallbacks/functional/typography/typography.json +1 -1
- package/dist/figma/figma.json +8 -0
- package/dist/figma/scales/dark-dimmed.json +20 -20
- package/dist/figma/scales/dark-high-constrast.json +20 -20
- package/dist/figma/scales/dark.json +20 -20
- package/dist/figma/scales/light-high-constrast.json +20 -20
- package/dist/figma/scales/light.json +20 -20
- package/dist/figma/themes/dark-colorblind.json +70 -70
- package/dist/figma/themes/dark-dimmed.json +65 -65
- package/dist/figma/themes/dark-high-contrast.json +69 -69
- package/dist/figma/themes/dark-tritanopia.json +70 -70
- package/dist/figma/themes/dark.json +65 -65
- package/dist/figma/themes/light-colorblind.json +59 -59
- package/dist/figma/themes/light-high-contrast.json +55 -55
- package/dist/figma/themes/light-tritanopia.json +59 -59
- package/dist/figma/themes/light.json +54 -54
- package/dist/figma/typography/typography.json +338 -0
- package/dist/internalCss/dark-colorblind.css +20 -20
- package/dist/internalCss/dark-dimmed.css +20 -20
- package/dist/internalCss/dark-high-contrast.css +20 -20
- package/dist/internalCss/dark-tritanopia.css +20 -20
- package/dist/internalCss/dark.css +20 -20
- package/dist/internalCss/light-colorblind.css +20 -20
- package/dist/internalCss/light-high-contrast.css +20 -20
- package/dist/internalCss/light-tritanopia.css +20 -20
- package/dist/internalCss/light.css +20 -20
- package/dist/js/colors/dark.d.ts +516 -0
- package/dist/js/colors/dark.js +616 -0
- package/dist/js/colors/dark_colorblind.d.ts +516 -0
- package/dist/js/colors/dark_colorblind.js +616 -0
- package/dist/js/colors/dark_dimmed.d.ts +516 -0
- package/dist/js/colors/dark_dimmed.js +616 -0
- package/dist/js/colors/dark_high_contrast.d.ts +516 -0
- package/dist/js/colors/dark_high_contrast.js +616 -0
- package/dist/js/colors/dark_tritanopia.d.ts +516 -0
- package/dist/js/colors/dark_tritanopia.js +616 -0
- package/dist/js/colors/index.d.ts +4638 -0
- package/dist/js/colors/index.js +15 -0
- package/dist/js/colors/light.d.ts +516 -0
- package/dist/js/colors/light.js +616 -0
- package/dist/js/colors/light_colorblind.d.ts +516 -0
- package/dist/js/colors/light_colorblind.js +616 -0
- package/dist/js/colors/light_high_contrast.d.ts +516 -0
- package/dist/js/colors/light_high_contrast.js +616 -0
- package/dist/js/colors/light_tritanopia.d.ts +516 -0
- package/dist/js/colors/light_tritanopia.js +616 -0
- package/dist/js/index.d.ts +4655 -0
- package/dist/js/index.js +9 -0
- package/dist/js/spacing/index.d.ts +6 -0
- package/dist/js/spacing/index.js +7 -0
- package/dist/js/spacing/normal.d.ts +4 -0
- package/dist/js/spacing/normal.js +13 -0
- package/dist/js/typography/index.d.ts +11 -0
- package/dist/js/typography/index.js +7 -0
- package/dist/js/typography/normal.d.ts +9 -0
- package/dist/js/typography/normal.js +19 -0
- package/dist/json/colors/dark.json +614 -0
- package/dist/json/colors/dark_colorblind.json +614 -0
- package/dist/json/colors/dark_dimmed.json +614 -0
- package/dist/json/colors/dark_high_contrast.json +614 -0
- package/dist/json/colors/dark_tritanopia.json +614 -0
- package/dist/json/colors/light.json +614 -0
- package/dist/json/colors/light_colorblind.json +614 -0
- package/dist/json/colors/light_high_contrast.json +614 -0
- package/dist/json/colors/light_tritanopia.json +614 -0
- package/dist/json/spacing/normal.json +11 -0
- package/dist/json/typography/normal.json +17 -0
- package/dist/removed/colors.json +432 -0
- package/dist/scss/colors/_dark.scss +452 -0
- package/dist/scss/colors/_dark_colorblind.scss +452 -0
- package/dist/scss/colors/_dark_dimmed.scss +452 -0
- package/dist/scss/colors/_dark_high_contrast.scss +452 -0
- package/dist/scss/colors/_dark_tritanopia.scss +452 -0
- package/dist/scss/colors/_light.scss +452 -0
- package/dist/scss/colors/_light_colorblind.scss +452 -0
- package/dist/scss/colors/_light_high_contrast.scss +452 -0
- package/dist/scss/colors/_light_tritanopia.scss +452 -0
- package/dist/scss/spacing/_normal.scss +11 -0
- package/dist/scss/typography/_normal.scss +15 -0
- package/dist/styleLint/base/typography/typography.json +52 -4
- package/dist/styleLint/functional/themes/dark-colorblind.json +78 -78
- package/dist/styleLint/functional/themes/dark-dimmed.json +73 -73
- package/dist/styleLint/functional/themes/dark-high-contrast.json +75 -75
- package/dist/styleLint/functional/themes/dark-tritanopia.json +78 -78
- package/dist/styleLint/functional/themes/dark.json +73 -73
- package/dist/styleLint/functional/themes/light-colorblind.json +76 -76
- package/dist/styleLint/functional/themes/light-high-contrast.json +70 -70
- package/dist/styleLint/functional/themes/light-tritanopia.json +76 -76
- package/dist/styleLint/functional/themes/light.json +71 -71
- package/dist/styleLint/functional/typography/typography.json +455 -33
- package/dist/ts/colors/dark.ts +614 -0
- package/dist/ts/colors/dark_colorblind.ts +614 -0
- package/dist/ts/colors/dark_dimmed.ts +614 -0
- package/dist/ts/colors/dark_high_contrast.ts +614 -0
- package/dist/ts/colors/dark_tritanopia.ts +614 -0
- package/dist/ts/colors/index.ts +10 -0
- package/dist/ts/colors/light.ts +614 -0
- package/dist/ts/colors/light_colorblind.ts +614 -0
- package/dist/ts/colors/light_high_contrast.ts +614 -0
- package/dist/ts/colors/light_tritanopia.ts +614 -0
- package/dist/ts/index.ts +4 -0
- package/dist/ts/spacing/index.ts +2 -0
- package/dist/ts/spacing/normal.ts +11 -0
- package/dist/ts/typography/index.ts +2 -0
- package/dist/ts/typography/normal.ts +17 -0
- package/package.json +3 -3
- package/src/PrimerStyleDictionary.ts +6 -0
- package/src/platforms/figma.ts +1 -0
- package/src/schemas/numberToken.ts +17 -0
- package/src/tokens/base/color/dark/dark.dimmed.json5 +1 -1
- package/src/tokens/base/color/dark/dark.high-contrast.json5 +1 -1
- package/src/tokens/base/color/dark/dark.json5 +1 -1
- package/src/tokens/base/color/light/light.high-contrast.json5 +1 -1
- package/src/tokens/base/color/light/light.json5 +1 -1
- package/src/tokens/base/typography/typography.json +28 -4
- package/src/tokens/functional/color/dark/app-dark.json5 +5 -5
- package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +17 -17
- package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +5 -5
- package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +5 -5
- package/src/tokens/functional/color/dark/patterns-dark.json5 +42 -42
- package/src/tokens/functional/color/dark/primitives-dark.json5 +16 -16
- package/src/tokens/functional/color/dark/syntax-dark.json5 +13 -13
- package/src/tokens/functional/color/light/app-light.json5 +5 -5
- package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +25 -25
- package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +5 -5
- package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +5 -5
- package/src/tokens/functional/color/light/patterns-light.json5 +30 -30
- package/src/tokens/functional/color/light/primitives-light.json5 +15 -15
- package/src/tokens/functional/color/light/syntax-light.json5 +14 -14
- package/src/tokens/functional/shadow/dark.json5 +1 -1
- package/src/tokens/functional/shadow/light.json5 +11 -11
- package/src/tokens/functional/typography/typography.json +242 -31
- package/src/transformers/floatToPixel.ts +33 -0
- package/src/transformers/index.ts +1 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Primer Primitives
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@primer/primitives)
|
|
3
|
+
[](https://www.npmjs.com/package/@primer/primitives) [](https://primer.style/primitives/storybook/) [](https://github.com/primer/primitives/actions/workflows/a11y-contrast.yml)
|
|
4
4
|
|
|
5
5
|
This repo contains values for color, spacing, and typography primitives for use with [Primer][primer], GitHub's design system.
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
--text-title-size-large: 2rem;
|
|
21
21
|
--text-display-lineHeight: 1.4;
|
|
22
22
|
--text-display-size: 2.5rem;
|
|
23
|
-
--text-display-lineBoxHeight:
|
|
23
|
+
--text-display-lineBoxHeight: 1.4;
|
|
24
24
|
--fontStack-monospace: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
|
|
25
25
|
--fontStack-sansSerif: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
26
26
|
--fontStack-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
@@ -2,11 +2,23 @@
|
|
|
2
2
|
"base-text-weight-light": {
|
|
3
3
|
"$type": "fontWeight",
|
|
4
4
|
"value": 300,
|
|
5
|
+
"$extensions": {
|
|
6
|
+
"org.primer.figma": {
|
|
7
|
+
"collection": "base/typography",
|
|
8
|
+
"scopes": ["all"]
|
|
9
|
+
}
|
|
10
|
+
},
|
|
5
11
|
"filePath": "src/tokens/base/typography/typography.json",
|
|
6
12
|
"isSource": true,
|
|
7
13
|
"original": {
|
|
8
14
|
"$type": "fontWeight",
|
|
9
|
-
"value": 300
|
|
15
|
+
"value": 300,
|
|
16
|
+
"$extensions": {
|
|
17
|
+
"org.primer.figma": {
|
|
18
|
+
"collection": "base/typography",
|
|
19
|
+
"scopes": ["all"]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
10
22
|
},
|
|
11
23
|
"name": "base-text-weight-light",
|
|
12
24
|
"attributes": {},
|
|
@@ -15,11 +27,23 @@
|
|
|
15
27
|
"base-text-weight-normal": {
|
|
16
28
|
"value": 400,
|
|
17
29
|
"$type": "fontWeight",
|
|
30
|
+
"$extensions": {
|
|
31
|
+
"org.primer.figma": {
|
|
32
|
+
"collection": "base/typography",
|
|
33
|
+
"scopes": ["all"]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
18
36
|
"filePath": "src/tokens/base/typography/typography.json",
|
|
19
37
|
"isSource": true,
|
|
20
38
|
"original": {
|
|
21
39
|
"value": 400,
|
|
22
|
-
"$type": "fontWeight"
|
|
40
|
+
"$type": "fontWeight",
|
|
41
|
+
"$extensions": {
|
|
42
|
+
"org.primer.figma": {
|
|
43
|
+
"collection": "base/typography",
|
|
44
|
+
"scopes": ["all"]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
23
47
|
},
|
|
24
48
|
"name": "base-text-weight-normal",
|
|
25
49
|
"attributes": {},
|
|
@@ -28,11 +52,23 @@
|
|
|
28
52
|
"base-text-weight-medium": {
|
|
29
53
|
"value": 500,
|
|
30
54
|
"$type": "fontWeight",
|
|
55
|
+
"$extensions": {
|
|
56
|
+
"org.primer.figma": {
|
|
57
|
+
"collection": "base/typography",
|
|
58
|
+
"scopes": ["all"]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
31
61
|
"filePath": "src/tokens/base/typography/typography.json",
|
|
32
62
|
"isSource": true,
|
|
33
63
|
"original": {
|
|
34
64
|
"value": 500,
|
|
35
|
-
"$type": "fontWeight"
|
|
65
|
+
"$type": "fontWeight",
|
|
66
|
+
"$extensions": {
|
|
67
|
+
"org.primer.figma": {
|
|
68
|
+
"collection": "base/typography",
|
|
69
|
+
"scopes": ["all"]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
36
72
|
},
|
|
37
73
|
"name": "base-text-weight-medium",
|
|
38
74
|
"attributes": {},
|
|
@@ -41,11 +77,23 @@
|
|
|
41
77
|
"base-text-weight-semibold": {
|
|
42
78
|
"value": 600,
|
|
43
79
|
"$type": "fontWeight",
|
|
80
|
+
"$extensions": {
|
|
81
|
+
"org.primer.figma": {
|
|
82
|
+
"collection": "base/typography",
|
|
83
|
+
"scopes": ["all"]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
44
86
|
"filePath": "src/tokens/base/typography/typography.json",
|
|
45
87
|
"isSource": true,
|
|
46
88
|
"original": {
|
|
47
89
|
"value": 600,
|
|
48
|
-
"$type": "fontWeight"
|
|
90
|
+
"$type": "fontWeight",
|
|
91
|
+
"$extensions": {
|
|
92
|
+
"org.primer.figma": {
|
|
93
|
+
"collection": "base/typography",
|
|
94
|
+
"scopes": ["all"]
|
|
95
|
+
}
|
|
96
|
+
}
|
|
49
97
|
},
|
|
50
98
|
"name": "base-text-weight-semibold",
|
|
51
99
|
"attributes": {},
|