@primer/primitives 11.8.0 → 11.8.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/DESIGN_TOKENS_SPEC.md +5 -5
- package/dist/build/filters/isDeprecated.js +3 -1
- package/dist/build/transformers/jsonDeprecated.js +5 -1
- package/dist/css/functional/size/border.css +4 -4
- package/dist/css/functional/size/radius.css +5 -5
- package/dist/deprecated/theme.json +5 -0
- package/dist/deprecated.json +5 -0
- package/dist/docs/functional/size/border.json +8 -8
- package/dist/docs/functional/size/radius.json +10 -10
- package/dist/figma/dimension/dimension.json +9 -9
- package/dist/{removed/color.json → removed.json} +8 -1
- package/dist/styleLint/functional/size/border.json +8 -8
- package/dist/styleLint/functional/size/radius.json +10 -10
- package/package.json +3 -4
- package/src/tokens/functional/size/border.json5 +4 -4
- package/src/tokens/functional/size/radius.json5 +5 -5
- package/src/tokens/{removed/color.json → removed.json} +8 -1
package/DESIGN_TOKENS_SPEC.md
CHANGED
|
@@ -160,22 +160,22 @@ Fully transparent border
|
|
|
160
160
|
Corner radius tokens for rounded elements.
|
|
161
161
|
|
|
162
162
|
### borderRadius-full
|
|
163
|
-
|
|
163
|
+
Shape token for fully rounded or pill-shaped elements.
|
|
164
164
|
**U:** avatar, circular-button, pill-badge
|
|
165
165
|
**R:** Use for avatars and pill-shaped elements. Do NOT use for rectangular containers.
|
|
166
166
|
|
|
167
167
|
### borderRadius-large
|
|
168
|
-
|
|
168
|
+
Scale token: 12px radius for larger surfaces or softer container treatments.
|
|
169
169
|
**U:** card, dialog, modal
|
|
170
170
|
**R:** Recommended for dialogs and modals.
|
|
171
171
|
|
|
172
172
|
### borderRadius-medium
|
|
173
|
-
|
|
173
|
+
Scale token: 6px radius in the border-radius scale. Use when selecting a specific radius intentionally.
|
|
174
174
|
**U:** button, input, textarea
|
|
175
175
|
**R:** Default choice for most components. Use for inputs, cards, and general containers.
|
|
176
176
|
|
|
177
177
|
### borderRadius-small
|
|
178
|
-
|
|
178
|
+
Scale token: 3px radius for compact UI elements or small component variants.
|
|
179
179
|
**U:** badge, label, tag
|
|
180
180
|
**R:** Use for small UI elements under 16px height. Do NOT use for buttons or cards.
|
|
181
181
|
|
|
@@ -184,7 +184,7 @@ Small border radius (3px). Use for small variants of components or small UI elem
|
|
|
184
184
|
Border thickness tokens.
|
|
185
185
|
|
|
186
186
|
### borderWidth-thick
|
|
187
|
-
|
|
187
|
+
Scale token: 2px border width for emphasis or focus states.
|
|
188
188
|
**U:** emphasis-border, focus-indicator, selected-state
|
|
189
189
|
**R:** MUST use for focus rings on interactive elements. Do NOT use for subtle dividers.
|
|
190
190
|
|
|
@@ -4,5 +4,7 @@
|
|
|
4
4
|
* @returns boolean
|
|
5
5
|
*/
|
|
6
6
|
export const isDeprecated = (token) => {
|
|
7
|
-
|
|
7
|
+
var _a;
|
|
8
|
+
const deprecated = (_a = token.original.$deprecated) !== null && _a !== void 0 ? _a : token.$deprecated;
|
|
9
|
+
return deprecated === true || typeof deprecated === 'string';
|
|
8
10
|
};
|
|
@@ -10,5 +10,9 @@ export const jsonDeprecated = {
|
|
|
10
10
|
type: 'value',
|
|
11
11
|
transitive: true,
|
|
12
12
|
filter: isDeprecated,
|
|
13
|
-
transform: (token) =>
|
|
13
|
+
transform: (token) => {
|
|
14
|
+
var _a;
|
|
15
|
+
const deprecated = (_a = token.original.$deprecated) !== null && _a !== void 0 ? _a : token.$deprecated;
|
|
16
|
+
return typeof deprecated === 'string' ? deprecated.replace(/[{}]/g, '') : null;
|
|
17
|
+
},
|
|
14
18
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--borderWidth-thick: 0.125rem; /**
|
|
3
|
-
--borderWidth-thicker: 0.25rem; /**
|
|
4
|
-
--borderWidth-thin: 0.0625rem; /**
|
|
2
|
+
--borderWidth-thick: 0.125rem; /** Scale token: 2px border width for emphasis or focus states. */
|
|
3
|
+
--borderWidth-thicker: 0.25rem; /** Scale token: 4px border width for strong emphasis. */
|
|
4
|
+
--borderWidth-thin: 0.0625rem; /** Scale token: 1px border width. Use when selecting an explicit size from the border-width scale. */
|
|
5
5
|
--focus-outline-offset: -0.125rem; /** Focus outline offset (-2px). Negative value creates an inset outline for keyboard focus indicators, ensuring the focus ring stays within the element bounds */
|
|
6
6
|
--focus-outline-width: 0.125rem; /** Focus outline width (2px). Standard width for keyboard focus indicators to meet WCAG 2.4.7 accessibility requirements */
|
|
7
|
-
--borderWidth-default: var(--borderWidth-thin); /**
|
|
7
|
+
--borderWidth-default: var(--borderWidth-thin); /** Semantic token: preferred default border width for standard component borders. Use this in normal component code unless a specific scale value is required. */
|
|
8
8
|
--boxShadow-thick: inset 0 0 0 var(--borderWidth-thick); /** Thick shadow (2px) used instead of a border for emphasis without layout shift */
|
|
9
9
|
--boxShadow-thicker: inset 0 0 0 var(--borderWidth-thicker); /** Thickest shadow (4px) used for high emphasis borders without layout shift. Use sparingly for maximum visual impact */
|
|
10
10
|
--boxShadow-thin: inset 0 0 0 var(--borderWidth-thin); /** Thin shadow used instead of a border to prevent layout shift */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--borderRadius-full: 624.9375rem; /**
|
|
3
|
-
--borderRadius-large: 0.75rem; /**
|
|
4
|
-
--borderRadius-medium: 0.375rem; /**
|
|
5
|
-
--borderRadius-small: 0.1875rem; /**
|
|
6
|
-
--borderRadius-default: var(--borderRadius-medium); /**
|
|
2
|
+
--borderRadius-full: 624.9375rem; /** Shape token for fully rounded or pill-shaped elements. */
|
|
3
|
+
--borderRadius-large: 0.75rem; /** Scale token: 12px radius for larger surfaces or softer container treatments. */
|
|
4
|
+
--borderRadius-medium: 0.375rem; /** Scale token: 6px radius in the border-radius scale. Use when selecting a specific radius intentionally. */
|
|
5
|
+
--borderRadius-small: 0.1875rem; /** Scale token: 3px radius for compact UI elements or small component variants. */
|
|
6
|
+
--borderRadius-default: var(--borderRadius-medium); /** Semantic token: preferred default border radius for standard UI components. Use this in normal component code unless a specific radius is intentionally required. */
|
|
7
7
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"isSource": true,
|
|
12
12
|
"original": {
|
|
13
13
|
"$value": "{borderWidth.thin}",
|
|
14
|
-
"$description": "
|
|
14
|
+
"$description": "Semantic token: preferred default border width for standard component borders. Use this in normal component code unless a specific scale value is required.",
|
|
15
15
|
"$type": "dimension",
|
|
16
16
|
"$extensions": {
|
|
17
17
|
"org.primer.figma": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"path": ["borderWidth", "default"],
|
|
27
27
|
"value": "0.0625rem",
|
|
28
28
|
"type": "dimension",
|
|
29
|
-
"description": "
|
|
29
|
+
"description": "Semantic token: preferred default border width for standard component borders. Use this in normal component code unless a specific scale value is required."
|
|
30
30
|
},
|
|
31
31
|
"borderWidth-thick": {
|
|
32
32
|
"key": "{borderWidth.thick}",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"value": 2,
|
|
48
48
|
"unit": "px"
|
|
49
49
|
},
|
|
50
|
-
"$description": "
|
|
50
|
+
"$description": "Scale token: 2px border width for emphasis or focus states.",
|
|
51
51
|
"$type": "dimension",
|
|
52
52
|
"$extensions": {
|
|
53
53
|
"org.primer.figma": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"path": ["borderWidth", "thick"],
|
|
67
67
|
"value": "0.125rem",
|
|
68
68
|
"type": "dimension",
|
|
69
|
-
"description": "
|
|
69
|
+
"description": "Scale token: 2px border width for emphasis or focus states."
|
|
70
70
|
},
|
|
71
71
|
"borderWidth-thicker": {
|
|
72
72
|
"key": "{borderWidth.thicker}",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"value": 4,
|
|
84
84
|
"unit": "px"
|
|
85
85
|
},
|
|
86
|
-
"$description": "
|
|
86
|
+
"$description": "Scale token: 4px border width for strong emphasis.",
|
|
87
87
|
"$type": "dimension",
|
|
88
88
|
"$extensions": {
|
|
89
89
|
"org.primer.figma": {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"path": ["borderWidth", "thicker"],
|
|
99
99
|
"value": "0.25rem",
|
|
100
100
|
"type": "dimension",
|
|
101
|
-
"description": "
|
|
101
|
+
"description": "Scale token: 4px border width for strong emphasis."
|
|
102
102
|
},
|
|
103
103
|
"borderWidth-thin": {
|
|
104
104
|
"key": "{borderWidth.thin}",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"value": 1,
|
|
116
116
|
"unit": "px"
|
|
117
117
|
},
|
|
118
|
-
"$description": "
|
|
118
|
+
"$description": "Scale token: 1px border width. Use when selecting an explicit size from the border-width scale.",
|
|
119
119
|
"$type": "dimension",
|
|
120
120
|
"$extensions": {
|
|
121
121
|
"org.primer.figma": {
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"path": ["borderWidth", "thin"],
|
|
131
131
|
"value": "0.0625rem",
|
|
132
132
|
"type": "dimension",
|
|
133
|
-
"description": "
|
|
133
|
+
"description": "Scale token: 1px border width. Use when selecting an explicit size from the border-width scale."
|
|
134
134
|
},
|
|
135
135
|
"boxShadow-thick": {
|
|
136
136
|
"key": "{boxShadow.thick}",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"isSource": true,
|
|
15
15
|
"original": {
|
|
16
16
|
"$value": "{borderRadius.medium}",
|
|
17
|
-
"$description": "
|
|
17
|
+
"$description": "Semantic token: preferred default border radius for standard UI components. Use this in normal component code unless a specific radius is intentionally required.",
|
|
18
18
|
"$type": "dimension",
|
|
19
19
|
"$extensions": {
|
|
20
20
|
"org.primer.figma": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"path": ["borderRadius", "default"],
|
|
33
33
|
"value": "0.375rem",
|
|
34
34
|
"type": "dimension",
|
|
35
|
-
"description": "
|
|
35
|
+
"description": "Semantic token: preferred default border radius for standard UI components. Use this in normal component code unless a specific radius is intentionally required."
|
|
36
36
|
},
|
|
37
37
|
"borderRadius-full": {
|
|
38
38
|
"key": "{borderRadius.full}",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"unit": "px"
|
|
58
58
|
},
|
|
59
59
|
"$type": "dimension",
|
|
60
|
-
"$description": "
|
|
60
|
+
"$description": "Shape token for fully rounded or pill-shaped elements.",
|
|
61
61
|
"$extensions": {
|
|
62
62
|
"org.primer.figma": {
|
|
63
63
|
"collection": "functional/size",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"path": ["borderRadius", "full"],
|
|
79
79
|
"value": "624.9375rem",
|
|
80
80
|
"type": "dimension",
|
|
81
|
-
"description": "
|
|
81
|
+
"description": "Shape token for fully rounded or pill-shaped elements."
|
|
82
82
|
},
|
|
83
83
|
"borderRadius-large": {
|
|
84
84
|
"key": "{borderRadius.large}",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"value": 12,
|
|
103
103
|
"unit": "px"
|
|
104
104
|
},
|
|
105
|
-
"$description": "
|
|
105
|
+
"$description": "Scale token: 12px radius for larger surfaces or softer container treatments.",
|
|
106
106
|
"$type": "dimension",
|
|
107
107
|
"$extensions": {
|
|
108
108
|
"org.primer.figma": {
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"path": ["borderRadius", "large"],
|
|
125
125
|
"value": "0.75rem",
|
|
126
126
|
"type": "dimension",
|
|
127
|
-
"description": "
|
|
127
|
+
"description": "Scale token: 12px radius for larger surfaces or softer container treatments."
|
|
128
128
|
},
|
|
129
129
|
"borderRadius-medium": {
|
|
130
130
|
"key": "{borderRadius.medium}",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"value": 6,
|
|
149
149
|
"unit": "px"
|
|
150
150
|
},
|
|
151
|
-
"$description": "
|
|
151
|
+
"$description": "Scale token: 6px radius in the border-radius scale. Use when selecting a specific radius intentionally.",
|
|
152
152
|
"$type": "dimension",
|
|
153
153
|
"$extensions": {
|
|
154
154
|
"org.primer.figma": {
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"path": ["borderRadius", "medium"],
|
|
171
171
|
"value": "0.375rem",
|
|
172
172
|
"type": "dimension",
|
|
173
|
-
"description": "
|
|
173
|
+
"description": "Scale token: 6px radius in the border-radius scale. Use when selecting a specific radius intentionally."
|
|
174
174
|
},
|
|
175
175
|
"borderRadius-small": {
|
|
176
176
|
"key": "{borderRadius.small}",
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
"value": 3,
|
|
195
195
|
"unit": "px"
|
|
196
196
|
},
|
|
197
|
-
"$description": "
|
|
197
|
+
"$description": "Scale token: 3px radius for compact UI elements or small component variants.",
|
|
198
198
|
"$type": "dimension",
|
|
199
199
|
"$extensions": {
|
|
200
200
|
"org.primer.figma": {
|
|
@@ -216,6 +216,6 @@
|
|
|
216
216
|
"path": ["borderRadius", "small"],
|
|
217
217
|
"value": "0.1875rem",
|
|
218
218
|
"type": "dimension",
|
|
219
|
-
"description": "
|
|
219
|
+
"description": "Scale token: 3px radius for compact UI elements or small component variants."
|
|
220
220
|
}
|
|
221
221
|
}
|
|
@@ -972,7 +972,7 @@
|
|
|
972
972
|
"name": "borderWidth/default",
|
|
973
973
|
"value": 1,
|
|
974
974
|
"type": "FLOAT",
|
|
975
|
-
"description": "
|
|
975
|
+
"description": "Semantic token: preferred default border width for standard component borders. Use this in normal component code unless a specific scale value is required.",
|
|
976
976
|
"refId": "functional/size/borderWidth/default",
|
|
977
977
|
"reference": "functional/size/borderWidth/thin",
|
|
978
978
|
"collection": "functional/size",
|
|
@@ -984,7 +984,7 @@
|
|
|
984
984
|
"name": "borderWidth/thin",
|
|
985
985
|
"value": 1,
|
|
986
986
|
"type": "FLOAT",
|
|
987
|
-
"description": "
|
|
987
|
+
"description": "Scale token: 1px border width. Use when selecting an explicit size from the border-width scale.",
|
|
988
988
|
"refId": "functional/size/borderWidth/thin",
|
|
989
989
|
"collection": "functional/size",
|
|
990
990
|
"mode": "default",
|
|
@@ -995,7 +995,7 @@
|
|
|
995
995
|
"name": "borderWidth/thick",
|
|
996
996
|
"value": 2,
|
|
997
997
|
"type": "FLOAT",
|
|
998
|
-
"description": "
|
|
998
|
+
"description": "Scale token: 2px border width for emphasis or focus states.",
|
|
999
999
|
"refId": "functional/size/borderWidth/thick",
|
|
1000
1000
|
"collection": "functional/size",
|
|
1001
1001
|
"mode": "default",
|
|
@@ -1006,7 +1006,7 @@
|
|
|
1006
1006
|
"name": "borderWidth/thicker",
|
|
1007
1007
|
"value": 4,
|
|
1008
1008
|
"type": "FLOAT",
|
|
1009
|
-
"description": "
|
|
1009
|
+
"description": "Scale token: 4px border width for strong emphasis.",
|
|
1010
1010
|
"refId": "functional/size/borderWidth/thicker",
|
|
1011
1011
|
"collection": "functional/size",
|
|
1012
1012
|
"mode": "default",
|
|
@@ -1017,7 +1017,7 @@
|
|
|
1017
1017
|
"name": "borderRadius/small",
|
|
1018
1018
|
"value": 3,
|
|
1019
1019
|
"type": "FLOAT",
|
|
1020
|
-
"description": "
|
|
1020
|
+
"description": "Scale token: 3px radius for compact UI elements or small component variants.",
|
|
1021
1021
|
"refId": "functional/size/borderRadius/small",
|
|
1022
1022
|
"collection": "functional/size",
|
|
1023
1023
|
"mode": "default",
|
|
@@ -1031,7 +1031,7 @@
|
|
|
1031
1031
|
"name": "borderRadius/medium",
|
|
1032
1032
|
"value": 6,
|
|
1033
1033
|
"type": "FLOAT",
|
|
1034
|
-
"description": "
|
|
1034
|
+
"description": "Scale token: 6px radius in the border-radius scale. Use when selecting a specific radius intentionally.",
|
|
1035
1035
|
"refId": "functional/size/borderRadius/medium",
|
|
1036
1036
|
"collection": "functional/size",
|
|
1037
1037
|
"mode": "default",
|
|
@@ -1045,7 +1045,7 @@
|
|
|
1045
1045
|
"name": "borderRadius/large",
|
|
1046
1046
|
"value": 12,
|
|
1047
1047
|
"type": "FLOAT",
|
|
1048
|
-
"description": "
|
|
1048
|
+
"description": "Scale token: 12px radius for larger surfaces or softer container treatments.",
|
|
1049
1049
|
"refId": "functional/size/borderRadius/large",
|
|
1050
1050
|
"collection": "functional/size",
|
|
1051
1051
|
"mode": "default",
|
|
@@ -1059,7 +1059,7 @@
|
|
|
1059
1059
|
"name": "borderRadius/full",
|
|
1060
1060
|
"value": 9999,
|
|
1061
1061
|
"type": "FLOAT",
|
|
1062
|
-
"description": "
|
|
1062
|
+
"description": "Shape token for fully rounded or pill-shaped elements.",
|
|
1063
1063
|
"refId": "functional/size/borderRadius/full",
|
|
1064
1064
|
"collection": "functional/size",
|
|
1065
1065
|
"mode": "default",
|
|
@@ -1073,7 +1073,7 @@
|
|
|
1073
1073
|
"name": "borderRadius/default",
|
|
1074
1074
|
"value": 6,
|
|
1075
1075
|
"type": "FLOAT",
|
|
1076
|
-
"description": "
|
|
1076
|
+
"description": "Semantic token: preferred default border radius for standard UI components. Use this in normal component code unless a specific radius is intentionally required.",
|
|
1077
1077
|
"refId": "functional/size/borderRadius/default",
|
|
1078
1078
|
"reference": "functional/size/borderRadius/medium",
|
|
1079
1079
|
"collection": "functional/size",
|
|
@@ -417,5 +417,12 @@
|
|
|
417
417
|
"mktg.btn.dark.hover.text": null,
|
|
418
418
|
"mktg.btn.dark.hover.border": null,
|
|
419
419
|
"mktg.btn.dark.focus.border": null,
|
|
420
|
-
"mktg.btn.dark.focus.borderInset": null
|
|
420
|
+
"mktg.btn.dark.focus.borderInset": null,
|
|
421
|
+
"control.xsmall.lineBoxHeight": null,
|
|
422
|
+
"control.small.lineBoxHeight": null,
|
|
423
|
+
"control.medium.lineBoxHeight": null,
|
|
424
|
+
"control.large.lineBoxHeight": null,
|
|
425
|
+
"control.xlarge.lineBoxHeight": null,
|
|
426
|
+
"text.display.lineBoxHeight": "text.display.lineHeight",
|
|
427
|
+
"shadow.floating.legacy": "shadow.floating.small"
|
|
421
428
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"borderWidth-default": {
|
|
3
3
|
"key": "{borderWidth.default}",
|
|
4
4
|
"$value": ["0.0625rem", "1px"],
|
|
5
|
-
"$description": "
|
|
5
|
+
"$description": "Semantic token: preferred default border width for standard component borders. Use this in normal component code unless a specific scale value is required.",
|
|
6
6
|
"$type": "dimension",
|
|
7
7
|
"$extensions": {
|
|
8
8
|
"org.primer.figma": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"isSource": true,
|
|
15
15
|
"original": {
|
|
16
16
|
"$value": "{borderWidth.thin}",
|
|
17
|
-
"$description": "
|
|
17
|
+
"$description": "Semantic token: preferred default border width for standard component borders. Use this in normal component code unless a specific scale value is required.",
|
|
18
18
|
"$type": "dimension",
|
|
19
19
|
"$extensions": {
|
|
20
20
|
"org.primer.figma": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"borderWidth-thick": {
|
|
32
32
|
"key": "{borderWidth.thick}",
|
|
33
33
|
"$value": ["0.125rem", "2px"],
|
|
34
|
-
"$description": "
|
|
34
|
+
"$description": "Scale token: 2px border width for emphasis or focus states.",
|
|
35
35
|
"$type": "dimension",
|
|
36
36
|
"$extensions": {
|
|
37
37
|
"org.primer.figma": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"value": 2,
|
|
51
51
|
"unit": "px"
|
|
52
52
|
},
|
|
53
|
-
"$description": "
|
|
53
|
+
"$description": "Scale token: 2px border width for emphasis or focus states.",
|
|
54
54
|
"$type": "dimension",
|
|
55
55
|
"$extensions": {
|
|
56
56
|
"org.primer.figma": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"borderWidth-thicker": {
|
|
72
72
|
"key": "{borderWidth.thicker}",
|
|
73
73
|
"$value": ["0.25rem", "4px"],
|
|
74
|
-
"$description": "
|
|
74
|
+
"$description": "Scale token: 4px border width for strong emphasis.",
|
|
75
75
|
"$type": "dimension",
|
|
76
76
|
"$extensions": {
|
|
77
77
|
"org.primer.figma": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"value": 4,
|
|
87
87
|
"unit": "px"
|
|
88
88
|
},
|
|
89
|
-
"$description": "
|
|
89
|
+
"$description": "Scale token: 4px border width for strong emphasis.",
|
|
90
90
|
"$type": "dimension",
|
|
91
91
|
"$extensions": {
|
|
92
92
|
"org.primer.figma": {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"borderWidth-thin": {
|
|
104
104
|
"key": "{borderWidth.thin}",
|
|
105
105
|
"$value": ["0.0625rem", "1px"],
|
|
106
|
-
"$description": "
|
|
106
|
+
"$description": "Scale token: 1px border width. Use when selecting an explicit size from the border-width scale.",
|
|
107
107
|
"$type": "dimension",
|
|
108
108
|
"$extensions": {
|
|
109
109
|
"org.primer.figma": {
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"value": 1,
|
|
119
119
|
"unit": "px"
|
|
120
120
|
},
|
|
121
|
-
"$description": "
|
|
121
|
+
"$description": "Scale token: 1px border width. Use when selecting an explicit size from the border-width scale.",
|
|
122
122
|
"$type": "dimension",
|
|
123
123
|
"$extensions": {
|
|
124
124
|
"org.primer.figma": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"borderRadius-default": {
|
|
3
3
|
"key": "{borderRadius.default}",
|
|
4
4
|
"$value": ["0.375rem", "6px"],
|
|
5
|
-
"$description": "
|
|
5
|
+
"$description": "Semantic token: preferred default border radius for standard UI components. Use this in normal component code unless a specific radius is intentionally required.",
|
|
6
6
|
"$type": "dimension",
|
|
7
7
|
"$extensions": {
|
|
8
8
|
"org.primer.figma": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"isSource": true,
|
|
18
18
|
"original": {
|
|
19
19
|
"$value": "{borderRadius.medium}",
|
|
20
|
-
"$description": "
|
|
20
|
+
"$description": "Semantic token: preferred default border radius for standard UI components. Use this in normal component code unless a specific radius is intentionally required.",
|
|
21
21
|
"$type": "dimension",
|
|
22
22
|
"$extensions": {
|
|
23
23
|
"org.primer.figma": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"key": "{borderRadius.full}",
|
|
39
39
|
"$value": ["624.9375rem", "9999px"],
|
|
40
40
|
"$type": "dimension",
|
|
41
|
-
"$description": "
|
|
41
|
+
"$description": "Shape token for fully rounded or pill-shaped elements.",
|
|
42
42
|
"$extensions": {
|
|
43
43
|
"org.primer.figma": {
|
|
44
44
|
"collection": "functional/size",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"unit": "px"
|
|
61
61
|
},
|
|
62
62
|
"$type": "dimension",
|
|
63
|
-
"$description": "
|
|
63
|
+
"$description": "Shape token for fully rounded or pill-shaped elements.",
|
|
64
64
|
"$extensions": {
|
|
65
65
|
"org.primer.figma": {
|
|
66
66
|
"collection": "functional/size",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"borderRadius-large": {
|
|
84
84
|
"key": "{borderRadius.large}",
|
|
85
85
|
"$value": ["0.75rem", "12px"],
|
|
86
|
-
"$description": "
|
|
86
|
+
"$description": "Scale token: 12px radius for larger surfaces or softer container treatments.",
|
|
87
87
|
"$type": "dimension",
|
|
88
88
|
"$extensions": {
|
|
89
89
|
"org.primer.figma": {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"value": 12,
|
|
106
106
|
"unit": "px"
|
|
107
107
|
},
|
|
108
|
-
"$description": "
|
|
108
|
+
"$description": "Scale token: 12px radius for larger surfaces or softer container treatments.",
|
|
109
109
|
"$type": "dimension",
|
|
110
110
|
"$extensions": {
|
|
111
111
|
"org.primer.figma": {
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"borderRadius-medium": {
|
|
130
130
|
"key": "{borderRadius.medium}",
|
|
131
131
|
"$value": ["0.375rem", "6px"],
|
|
132
|
-
"$description": "
|
|
132
|
+
"$description": "Scale token: 6px radius in the border-radius scale. Use when selecting a specific radius intentionally.",
|
|
133
133
|
"$type": "dimension",
|
|
134
134
|
"$extensions": {
|
|
135
135
|
"org.primer.figma": {
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"value": 6,
|
|
152
152
|
"unit": "px"
|
|
153
153
|
},
|
|
154
|
-
"$description": "
|
|
154
|
+
"$description": "Scale token: 6px radius in the border-radius scale. Use when selecting a specific radius intentionally.",
|
|
155
155
|
"$type": "dimension",
|
|
156
156
|
"$extensions": {
|
|
157
157
|
"org.primer.figma": {
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"borderRadius-small": {
|
|
176
176
|
"key": "{borderRadius.small}",
|
|
177
177
|
"$value": ["0.1875rem", "3px"],
|
|
178
|
-
"$description": "
|
|
178
|
+
"$description": "Scale token: 3px radius for compact UI elements or small component variants.",
|
|
179
179
|
"$type": "dimension",
|
|
180
180
|
"$extensions": {
|
|
181
181
|
"org.primer.figma": {
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"value": 3,
|
|
198
198
|
"unit": "px"
|
|
199
199
|
},
|
|
200
|
-
"$description": "
|
|
200
|
+
"$description": "Scale token: 3px radius for compact UI elements or small component variants.",
|
|
201
201
|
"$type": "dimension",
|
|
202
202
|
"$extensions": {
|
|
203
203
|
"org.primer.figma": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/primitives",
|
|
3
|
-
"version": "11.8.
|
|
3
|
+
"version": "11.8.1",
|
|
4
4
|
"description": "Typography, spacing, and color primitives for Primer design system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -47,8 +47,7 @@
|
|
|
47
47
|
"prepack": "npm run build",
|
|
48
48
|
"release": "changeset publish",
|
|
49
49
|
"storybook": "npm run build:tokens && cd docs/storybook && npm run storybook",
|
|
50
|
-
"storybook:install": "cd docs/storybook && npm ci --no-audit --no-fund"
|
|
51
|
-
"postinstall": "npm run storybook:install"
|
|
50
|
+
"storybook:install": "cd docs/storybook && npm ci --no-audit --no-fund"
|
|
52
51
|
},
|
|
53
52
|
"prettier": "@github/prettier-config",
|
|
54
53
|
"devDependencies": {
|
|
@@ -84,4 +83,4 @@
|
|
|
84
83
|
"zod-validation-error": "^4.0.1",
|
|
85
84
|
"colorjs.io": "^0.6.1"
|
|
86
85
|
}
|
|
87
|
-
}
|
|
86
|
+
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
borderWidth: {
|
|
20
20
|
default: {
|
|
21
21
|
$value: '{borderWidth.thin}',
|
|
22
|
-
$description: '
|
|
22
|
+
$description: 'Semantic token: preferred default border width for standard component borders. Use this in normal component code unless a specific scale value is required.',
|
|
23
23
|
$type: 'dimension',
|
|
24
24
|
$extensions: {
|
|
25
25
|
'org.primer.figma': {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
thin: {
|
|
32
32
|
$value: {value: 1, unit: 'px'},
|
|
33
|
-
$description: '
|
|
33
|
+
$description: 'Scale token: 1px border width. Use when selecting an explicit size from the border-width scale.',
|
|
34
34
|
$type: 'dimension',
|
|
35
35
|
$extensions: {
|
|
36
36
|
'org.primer.figma': {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
thick: {
|
|
43
43
|
$value: {value: 2, unit: 'px'},
|
|
44
|
-
$description: '
|
|
44
|
+
$description: 'Scale token: 2px border width for emphasis or focus states.',
|
|
45
45
|
$type: 'dimension',
|
|
46
46
|
$extensions: {
|
|
47
47
|
'org.primer.figma': {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
thicker: {
|
|
58
58
|
$value: {value: 4, unit: 'px'},
|
|
59
|
-
$description: '
|
|
59
|
+
$description: 'Scale token: 4px border width for strong emphasis.',
|
|
60
60
|
$type: 'dimension',
|
|
61
61
|
$extensions: {
|
|
62
62
|
'org.primer.figma': {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
borderRadius: {
|
|
3
3
|
small: {
|
|
4
4
|
$value: {value: 3, unit: 'px'},
|
|
5
|
-
$description: '
|
|
5
|
+
$description: 'Scale token: 3px radius for compact UI elements or small component variants.',
|
|
6
6
|
$type: 'dimension',
|
|
7
7
|
$extensions: {
|
|
8
8
|
'org.primer.figma': {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
medium: {
|
|
22
22
|
$value: {value: 6, unit: 'px'},
|
|
23
|
-
$description: '
|
|
23
|
+
$description: 'Scale token: 6px radius in the border-radius scale. Use when selecting a specific radius intentionally.',
|
|
24
24
|
$type: 'dimension',
|
|
25
25
|
$extensions: {
|
|
26
26
|
'org.primer.figma': {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
large: {
|
|
40
40
|
$value: {value: 12, unit: 'px'},
|
|
41
|
-
$description: '
|
|
41
|
+
$description: 'Scale token: 12px radius for larger surfaces or softer container treatments.',
|
|
42
42
|
$type: 'dimension',
|
|
43
43
|
$extensions: {
|
|
44
44
|
'org.primer.figma': {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
full: {
|
|
58
58
|
$value: {value: 9999, unit: 'px'},
|
|
59
59
|
$type: 'dimension',
|
|
60
|
-
$description: '
|
|
60
|
+
$description: 'Shape token for fully rounded or pill-shaped elements.',
|
|
61
61
|
$extensions: {
|
|
62
62
|
'org.primer.figma': {
|
|
63
63
|
collection: 'functional/size',
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
default: {
|
|
76
76
|
$value: '{borderRadius.medium}',
|
|
77
|
-
$description: '
|
|
77
|
+
$description: 'Semantic token: preferred default border radius for standard UI components. Use this in normal component code unless a specific radius is intentionally required.',
|
|
78
78
|
$type: 'dimension',
|
|
79
79
|
$extensions: {
|
|
80
80
|
'org.primer.figma': {
|
|
@@ -417,5 +417,12 @@
|
|
|
417
417
|
"mktg.btn.dark.hover.text": null,
|
|
418
418
|
"mktg.btn.dark.hover.border": null,
|
|
419
419
|
"mktg.btn.dark.focus.border": null,
|
|
420
|
-
"mktg.btn.dark.focus.borderInset": null
|
|
420
|
+
"mktg.btn.dark.focus.borderInset": null,
|
|
421
|
+
"control.xsmall.lineBoxHeight": null,
|
|
422
|
+
"control.small.lineBoxHeight": null,
|
|
423
|
+
"control.medium.lineBoxHeight": null,
|
|
424
|
+
"control.large.lineBoxHeight": null,
|
|
425
|
+
"control.xlarge.lineBoxHeight": null,
|
|
426
|
+
"text.display.lineBoxHeight": "text.display.lineHeight",
|
|
427
|
+
"shadow.floating.legacy": "shadow.floating.small"
|
|
421
428
|
}
|