@primer/primitives 11.4.0-rc.f798df25 → 11.4.1-rc.4e2d1de5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN_TOKENS_GUIDE.md +185 -0
- package/DESIGN_TOKENS_SPEC.md +565 -0
- package/dist/build/filters/hasLlmExtensions.d.ts +7 -0
- package/dist/build/filters/hasLlmExtensions.js +11 -0
- package/dist/build/filters/index.d.ts +1 -0
- package/dist/build/filters/index.js +1 -0
- package/dist/build/formats/index.d.ts +1 -0
- package/dist/build/formats/index.js +1 -0
- package/dist/build/formats/markdownLlmGuidelines.d.ts +11 -0
- package/dist/build/formats/markdownLlmGuidelines.js +1168 -0
- package/dist/build/platforms/index.d.ts +1 -0
- package/dist/build/platforms/index.js +1 -0
- package/dist/build/platforms/llmGuidelines.d.ts +2 -0
- package/dist/build/platforms/llmGuidelines.js +17 -0
- package/dist/build/preprocessors/inheritGroupProperties.d.ts +7 -0
- package/dist/build/preprocessors/inheritGroupProperties.js +70 -0
- package/dist/build/primerStyleDictionary.js +7 -1
- package/dist/build/schemas/borderToken.d.ts +22 -2
- package/dist/build/schemas/borderToken.js +6 -0
- package/dist/build/schemas/colorToken.d.ts +4 -0
- package/dist/build/schemas/colorToken.js +2 -0
- package/dist/build/schemas/cubicBezierToken.d.ts +6 -0
- package/dist/build/schemas/cubicBezierToken.js +10 -2
- package/dist/build/schemas/designToken.d.ts +1 -1
- package/dist/build/schemas/designToken.js +113 -21
- package/dist/build/schemas/dimensionToken.d.ts +14 -3
- package/dist/build/schemas/dimensionToken.js +6 -2
- package/dist/build/schemas/dimensionValue.d.ts +24 -1
- package/dist/build/schemas/dimensionValue.js +20 -1
- package/dist/build/schemas/durationToken.d.ts +13 -1
- package/dist/build/schemas/durationToken.js +6 -0
- package/dist/build/schemas/durationValue.d.ts +11 -1
- package/dist/build/schemas/durationValue.js +13 -3
- package/dist/build/schemas/fontFamilyToken.d.ts +4 -0
- package/dist/build/schemas/fontFamilyToken.js +2 -0
- package/dist/build/schemas/fontWeightToken.d.ts +4 -0
- package/dist/build/schemas/fontWeightToken.js +2 -0
- package/dist/build/schemas/gradientToken.d.ts +4 -0
- package/dist/build/schemas/gradientToken.js +2 -0
- package/dist/build/schemas/llmExtension.d.ts +9 -0
- package/dist/build/schemas/llmExtension.js +11 -0
- package/dist/build/schemas/numberToken.d.ts +4 -0
- package/dist/build/schemas/numberToken.js +2 -0
- package/dist/build/schemas/shadowToken.d.ts +676 -84
- package/dist/build/schemas/shadowToken.js +2 -0
- package/dist/build/schemas/stringToken.d.ts +6 -0
- package/dist/build/schemas/stringToken.js +6 -0
- package/dist/build/schemas/transitionToken.d.ts +20 -2
- package/dist/build/schemas/transitionToken.js +6 -0
- package/dist/build/schemas/typographyToken.d.ts +38 -4
- package/dist/build/schemas/typographyToken.js +6 -0
- package/dist/build/schemas/validTokenType.d.ts +5 -1
- package/dist/build/schemas/validTokenType.js +71 -17
- package/dist/build/schemas/viewportRangeToken.d.ts +6 -0
- package/dist/build/schemas/viewportRangeToken.js +6 -0
- package/dist/build/transformers/dimensionToPixelUnitless.d.ts +3 -2
- package/dist/build/transformers/dimensionToPixelUnitless.js +22 -26
- package/dist/build/transformers/dimensionToRem.d.ts +2 -1
- package/dist/build/transformers/dimensionToRem.js +21 -22
- package/dist/build/transformers/dimensionToRemPxArray.d.ts +2 -1
- package/dist/build/transformers/dimensionToRemPxArray.js +21 -22
- package/dist/build/transformers/durationToCss.d.ts +2 -1
- package/dist/build/transformers/durationToCss.js +18 -11
- package/dist/build/transformers/utilities/parseDimension.d.ts +12 -0
- package/dist/build/transformers/utilities/parseDimension.js +31 -0
- package/dist/build/types/dimensionTokenValue.d.ts +9 -0
- package/dist/css/base/motion/motion.css +5 -4
- package/dist/css/functional/size/border.css +9 -14
- package/dist/css/functional/size/radius.css +7 -0
- package/dist/css/functional/size/size-coarse.css +3 -3
- package/dist/css/functional/size/size-fine.css +3 -3
- package/dist/css/functional/size/viewport.css +1 -1
- package/dist/css/functional/themes/dark-colorblind-high-contrast.css +194 -190
- package/dist/css/functional/themes/dark-colorblind.css +194 -190
- package/dist/css/functional/themes/dark-dimmed-high-contrast.css +194 -190
- package/dist/css/functional/themes/dark-dimmed.css +194 -190
- package/dist/css/functional/themes/dark-high-contrast.css +194 -190
- package/dist/css/functional/themes/dark-tritanopia-high-contrast.css +194 -190
- package/dist/css/functional/themes/dark-tritanopia.css +194 -190
- package/dist/css/functional/themes/dark.css +194 -190
- package/dist/css/functional/themes/light-colorblind-high-contrast.css +194 -190
- package/dist/css/functional/themes/light-colorblind.css +194 -190
- package/dist/css/functional/themes/light-high-contrast.css +194 -190
- package/dist/css/functional/themes/light-tritanopia-high-contrast.css +194 -190
- package/dist/css/functional/themes/light-tritanopia.css +194 -190
- package/dist/css/functional/themes/light.css +194 -190
- package/dist/css/functional/typography/typography.css +4 -4
- package/dist/css/primitives.css +5 -0
- package/dist/docs/base/motion/motion.json +181 -32
- package/dist/docs/base/size/size.json +76 -19
- package/dist/docs/base/typography/typography.json +24 -6
- package/dist/docs/functional/size/border.json +62 -182
- package/dist/docs/functional/size/breakpoints.json +24 -6
- package/dist/docs/functional/size/radius.json +221 -0
- package/dist/docs/functional/size/size-coarse.json +45 -3
- package/dist/docs/functional/size/size-fine.json +45 -3
- package/dist/docs/functional/size/size.json +60 -15
- package/dist/docs/functional/size/viewport.json +2 -2
- package/dist/docs/functional/themes/dark-colorblind-high-contrast.json +1043 -97
- package/dist/docs/functional/themes/dark-colorblind.json +1043 -97
- package/dist/docs/functional/themes/dark-dimmed-high-contrast.json +1043 -97
- package/dist/docs/functional/themes/dark-dimmed.json +1081 -135
- package/dist/docs/functional/themes/dark-high-contrast.json +1043 -97
- package/dist/docs/functional/themes/dark-tritanopia-high-contrast.json +1043 -97
- package/dist/docs/functional/themes/dark-tritanopia.json +1043 -97
- package/dist/docs/functional/themes/dark.json +1043 -97
- package/dist/docs/functional/themes/light-colorblind-high-contrast.json +1049 -103
- package/dist/docs/functional/themes/light-colorblind.json +1049 -103
- package/dist/docs/functional/themes/light-high-contrast.json +1049 -103
- package/dist/docs/functional/themes/light-tritanopia-high-contrast.json +1049 -103
- package/dist/docs/functional/themes/light-tritanopia.json +1049 -103
- package/dist/docs/functional/themes/light.json +1049 -103
- package/dist/docs/functional/typography/typography.json +180 -10
- package/dist/fallbacks/base/motion/motion.json +49 -12
- package/dist/fallbacks/functional/size/border.json +0 -5
- package/dist/fallbacks/functional/size/radius.json +7 -0
- package/dist/fallbacks/functional/size/viewport.json +1 -1
- package/dist/figma/dimension/dimension.json +30 -20
- package/dist/figma/themes/dark-colorblind.json +85 -0
- package/dist/figma/themes/dark-dimmed.json +134 -49
- package/dist/figma/themes/dark-high-contrast.json +85 -0
- package/dist/figma/themes/dark-tritanopia.json +85 -0
- package/dist/figma/themes/dark.json +85 -0
- package/dist/figma/themes/light-colorblind.json +89 -4
- package/dist/figma/themes/light-high-contrast.json +89 -4
- package/dist/figma/themes/light-tritanopia.json +89 -4
- package/dist/figma/themes/light.json +89 -4
- package/dist/figma/typography/typography.json +44 -40
- package/dist/internalCss/dark-colorblind-high-contrast.css +208 -218
- package/dist/internalCss/dark-colorblind.css +208 -218
- package/dist/internalCss/dark-dimmed-high-contrast.css +208 -218
- package/dist/internalCss/dark-dimmed.css +208 -218
- package/dist/internalCss/dark-high-contrast.css +208 -218
- package/dist/internalCss/dark-tritanopia-high-contrast.css +208 -218
- package/dist/internalCss/dark-tritanopia.css +208 -218
- package/dist/internalCss/dark.css +208 -218
- package/dist/internalCss/light-colorblind-high-contrast.css +208 -218
- package/dist/internalCss/light-colorblind.css +208 -218
- package/dist/internalCss/light-high-contrast.css +208 -218
- package/dist/internalCss/light-tritanopia-high-contrast.css +208 -218
- package/dist/internalCss/light-tritanopia.css +208 -218
- package/dist/internalCss/light.css +208 -218
- package/dist/styleLint/base/motion/motion.json +181 -32
- package/dist/styleLint/base/size/size.json +76 -19
- package/dist/styleLint/base/typography/typography.json +30 -12
- package/dist/styleLint/functional/size/border.json +55 -175
- package/dist/styleLint/functional/size/breakpoints.json +24 -6
- package/dist/styleLint/functional/size/radius.json +221 -0
- package/dist/styleLint/functional/size/size-coarse.json +45 -3
- package/dist/styleLint/functional/size/size-fine.json +45 -3
- package/dist/styleLint/functional/size/size.json +111 -66
- package/dist/styleLint/functional/size/viewport.json +2 -2
- package/dist/styleLint/functional/themes/dark-colorblind-high-contrast.json +975 -29
- package/dist/styleLint/functional/themes/dark-colorblind.json +975 -29
- package/dist/styleLint/functional/themes/dark-dimmed-high-contrast.json +975 -29
- package/dist/styleLint/functional/themes/dark-dimmed.json +1013 -67
- package/dist/styleLint/functional/themes/dark-high-contrast.json +975 -29
- package/dist/styleLint/functional/themes/dark-tritanopia-high-contrast.json +975 -29
- package/dist/styleLint/functional/themes/dark-tritanopia.json +975 -29
- package/dist/styleLint/functional/themes/dark.json +975 -29
- package/dist/styleLint/functional/themes/light-colorblind-high-contrast.json +981 -35
- package/dist/styleLint/functional/themes/light-colorblind.json +981 -35
- package/dist/styleLint/functional/themes/light-high-contrast.json +981 -35
- package/dist/styleLint/functional/themes/light-tritanopia-high-contrast.json +981 -35
- package/dist/styleLint/functional/themes/light-tritanopia.json +981 -35
- package/dist/styleLint/functional/themes/light.json +981 -35
- package/dist/styleLint/functional/typography/typography.json +196 -26
- package/package.json +6 -3
- package/src/tokens/base/motion/easing.json5 +39 -4
- package/src/tokens/base/motion/timing.json5 +12 -12
- package/src/tokens/base/size/size.json5 +19 -19
- package/src/tokens/base/typography/typography.json5 +6 -6
- package/src/tokens/functional/border/border.json5 +25 -0
- package/src/tokens/functional/color/bgColor.json5 +165 -0
- package/src/tokens/functional/color/borderColor.json5 +146 -0
- package/src/tokens/functional/color/control.json5 +24 -0
- package/src/tokens/functional/color/data-vis.json5 +7 -0
- package/src/tokens/functional/color/display.json5 +7 -0
- package/src/tokens/functional/color/fgColor.json5 +101 -1
- package/src/tokens/functional/color/focus.json5 +5 -0
- package/src/tokens/functional/color/selection.json5 +5 -0
- package/src/tokens/functional/color/syntax.json5 +14 -0
- package/src/tokens/functional/shadow/shadow.json5 +49 -4
- package/src/tokens/functional/size/border.json5 +22 -74
- package/src/tokens/functional/size/breakpoints.json5 +6 -6
- package/src/tokens/functional/size/radius.json5 +90 -0
- package/src/tokens/functional/size/size-coarse.json5 +24 -3
- package/src/tokens/functional/size/size-fine.json5 +45 -24
- package/src/tokens/functional/size/size.json5 +50 -15
- package/src/tokens/functional/size/viewport.json5 +1 -1
- package/src/tokens/functional/typography/font-stack.json5 +60 -0
- package/src/tokens/functional/typography/typography.json5 +71 -44
- package/dist/build/parsers/index.d.ts +0 -1
- package/dist/build/parsers/index.js +0 -1
- package/dist/build/parsers/w3cJsonParser.d.ts +0 -6
- package/dist/build/parsers/w3cJsonParser.js +0 -25
- package/dist/removed/testing.json5 +0 -4
- package/src/tokens/removed/testing.json5 +0 -4
|
@@ -2,21 +2,24 @@
|
|
|
2
2
|
boxShadow: {
|
|
3
3
|
thin: {
|
|
4
4
|
$value: 'inset 0 0 0 {borderWidth.thin}',
|
|
5
|
-
$description: 'Thin shadow
|
|
5
|
+
$description: 'Thin shadow used instead of a border to prevent layout shift',
|
|
6
6
|
$type: 'string',
|
|
7
7
|
},
|
|
8
8
|
thick: {
|
|
9
9
|
$value: 'inset 0 0 0 {borderWidth.thick}',
|
|
10
|
+
$description: 'Thick shadow (2px) used instead of a border for emphasis without layout shift',
|
|
10
11
|
$type: 'string',
|
|
11
12
|
},
|
|
12
13
|
thicker: {
|
|
13
14
|
$value: 'inset 0 0 0 {borderWidth.thicker}',
|
|
15
|
+
$description: 'Thickest shadow (4px) used for high emphasis borders without layout shift. Use sparingly for maximum visual impact',
|
|
14
16
|
$type: 'string',
|
|
15
17
|
},
|
|
16
18
|
},
|
|
17
19
|
borderWidth: {
|
|
18
20
|
default: {
|
|
19
21
|
$value: '{borderWidth.thin}',
|
|
22
|
+
$description: 'Default border width for most UI elements. Alias of borderWidth.thin (1px)',
|
|
20
23
|
$type: 'dimension',
|
|
21
24
|
$extensions: {
|
|
22
25
|
'org.primer.figma': {
|
|
@@ -26,7 +29,8 @@
|
|
|
26
29
|
},
|
|
27
30
|
},
|
|
28
31
|
thin: {
|
|
29
|
-
$value: '
|
|
32
|
+
$value: {value: 1, unit: 'px'},
|
|
33
|
+
$description: 'Standard 1px border width. Use for most borders, dividers, and outlines throughout the interface',
|
|
30
34
|
$type: 'dimension',
|
|
31
35
|
$extensions: {
|
|
32
36
|
'org.primer.figma': {
|
|
@@ -36,17 +40,23 @@
|
|
|
36
40
|
},
|
|
37
41
|
},
|
|
38
42
|
thick: {
|
|
39
|
-
$value: '
|
|
43
|
+
$value: {value: 2, unit: 'px'},
|
|
44
|
+
$description: 'Thick 2px border for emphasis. Use for focus indicators, selected states, or to emphasize important boundaries',
|
|
40
45
|
$type: 'dimension',
|
|
41
46
|
$extensions: {
|
|
42
47
|
'org.primer.figma': {
|
|
43
48
|
collection: 'functional/size',
|
|
44
49
|
scopes: ['borderWidth', 'effectFloat'],
|
|
45
50
|
},
|
|
51
|
+
'org.primer.llm': {
|
|
52
|
+
usage: ['focus-indicator', 'selected-state', 'emphasis-border'],
|
|
53
|
+
rules: 'MUST use for focus rings on interactive elements. Do NOT use for subtle dividers.',
|
|
54
|
+
},
|
|
46
55
|
},
|
|
47
56
|
},
|
|
48
57
|
thicker: {
|
|
49
|
-
$value: '
|
|
58
|
+
$value: {value: 4, unit: 'px'},
|
|
59
|
+
$description: 'Extra thick 4px border for maximum emphasis. Use sparingly for high-contrast focus indicators or critical visual separators',
|
|
50
60
|
$type: 'dimension',
|
|
51
61
|
$extensions: {
|
|
52
62
|
'org.primer.figma': {
|
|
@@ -56,78 +66,11 @@
|
|
|
56
66
|
},
|
|
57
67
|
},
|
|
58
68
|
},
|
|
59
|
-
borderRadius: {
|
|
60
|
-
small: {
|
|
61
|
-
$value: '3px',
|
|
62
|
-
$type: 'dimension',
|
|
63
|
-
$extensions: {
|
|
64
|
-
'org.primer.figma': {
|
|
65
|
-
collection: 'functional/size',
|
|
66
|
-
scopes: ['radius'],
|
|
67
|
-
codeSyntax: {
|
|
68
|
-
web: 'var(--borderRadius-small) /* utility class: .rounded-1 */',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
medium: {
|
|
74
|
-
$value: '6px',
|
|
75
|
-
$type: 'dimension',
|
|
76
|
-
$extensions: {
|
|
77
|
-
'org.primer.figma': {
|
|
78
|
-
collection: 'functional/size',
|
|
79
|
-
scopes: ['radius'],
|
|
80
|
-
codeSyntax: {
|
|
81
|
-
web: 'var(--borderRadius-medium) /* utility class: .rounded-2 */',
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
large: {
|
|
87
|
-
$value: '12px',
|
|
88
|
-
$type: 'dimension',
|
|
89
|
-
$extensions: {
|
|
90
|
-
'org.primer.figma': {
|
|
91
|
-
collection: 'functional/size',
|
|
92
|
-
scopes: ['radius'],
|
|
93
|
-
codeSyntax: {
|
|
94
|
-
web: 'var(--borderRadius-large) /* utility class: .rounded-3 */',
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
full: {
|
|
100
|
-
$value: '9999px',
|
|
101
|
-
$type: 'dimension',
|
|
102
|
-
$description: 'Use this border radius for pill shaped elements',
|
|
103
|
-
$extensions: {
|
|
104
|
-
'org.primer.figma': {
|
|
105
|
-
collection: 'functional/size',
|
|
106
|
-
scopes: ['radius'],
|
|
107
|
-
codeSyntax: {
|
|
108
|
-
web: 'var(--borderRadius-full) /* utility class: .circle */',
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
default: {
|
|
114
|
-
$value: '{borderRadius.medium}',
|
|
115
|
-
$type: 'dimension',
|
|
116
|
-
$extensions: {
|
|
117
|
-
'org.primer.figma': {
|
|
118
|
-
collection: 'functional/size',
|
|
119
|
-
scopes: ['radius'],
|
|
120
|
-
codeSyntax: {
|
|
121
|
-
web: 'var(--borderRadius-default) /* utility class: .rounded-2 */',
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
69
|
outline: {
|
|
128
70
|
focus: {
|
|
129
71
|
offset: {
|
|
130
|
-
$value:
|
|
72
|
+
$value: {value: -2, unit: 'px'},
|
|
73
|
+
$description: 'Focus outline offset (-2px). Negative value creates an inset outline for keyboard focus indicators, ensuring the focus ring stays within the element bounds',
|
|
131
74
|
$type: 'dimension',
|
|
132
75
|
$extensions: {
|
|
133
76
|
'org.primer.figma': {
|
|
@@ -137,13 +80,18 @@
|
|
|
137
80
|
},
|
|
138
81
|
},
|
|
139
82
|
width: {
|
|
140
|
-
$value: '
|
|
83
|
+
$value: {value: 2, unit: 'px'},
|
|
84
|
+
$description: 'Focus outline width (2px). Standard width for keyboard focus indicators to meet WCAG 2.4.7 accessibility requirements',
|
|
141
85
|
$type: 'dimension',
|
|
142
86
|
$extensions: {
|
|
143
87
|
'org.primer.figma': {
|
|
144
88
|
collection: 'functional/size',
|
|
145
89
|
scopes: ['borderWidth', 'effectFloat'],
|
|
146
90
|
},
|
|
91
|
+
'org.primer.llm': {
|
|
92
|
+
usage: ['focus-ring', 'keyboard-focus', 'accessibility'],
|
|
93
|
+
rules: 'MUST use for all keyboard focus indicators. Required for WCAG 2.4.7 compliance.',
|
|
94
|
+
},
|
|
147
95
|
},
|
|
148
96
|
},
|
|
149
97
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"breakpoint": {
|
|
3
3
|
"xsmall": {
|
|
4
|
-
"$value": "
|
|
4
|
+
"$value": {"value": 320, "unit": "px"},
|
|
5
5
|
"$type": "dimension",
|
|
6
6
|
"$extensions": {
|
|
7
7
|
"org.primer.figma": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"small": {
|
|
14
|
-
"$value": "
|
|
14
|
+
"$value": {"value": 544, "unit": "px"},
|
|
15
15
|
"$type": "dimension",
|
|
16
16
|
"$extensions": {
|
|
17
17
|
"org.primer.figma": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"medium": {
|
|
24
|
-
"$value": "
|
|
24
|
+
"$value": {"value": 768, "unit": "px"},
|
|
25
25
|
"$type": "dimension",
|
|
26
26
|
"$extensions": {
|
|
27
27
|
"org.primer.figma": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"large": {
|
|
34
|
-
"$value": "
|
|
34
|
+
"$value": {"value": 1012, "unit": "px"},
|
|
35
35
|
"$type": "dimension",
|
|
36
36
|
"$extensions": {
|
|
37
37
|
"org.primer.figma": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"xlarge": {
|
|
44
|
-
"$value": "
|
|
44
|
+
"$value": {"value": 1280, "unit": "px"},
|
|
45
45
|
"$type": "dimension",
|
|
46
46
|
"$extensions": {
|
|
47
47
|
"org.primer.figma": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"xxlarge": {
|
|
54
|
-
"$value": "
|
|
54
|
+
"$value": {"value": 1400, "unit": "px"},
|
|
55
55
|
"$type": "dimension",
|
|
56
56
|
"$extensions": {
|
|
57
57
|
"org.primer.figma": {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
borderRadius: {
|
|
3
|
+
small: {
|
|
4
|
+
$value: {value: 3, unit: 'px'},
|
|
5
|
+
$description: 'Small border radius (3px). Use for small variants of components or small UI elements like badges, tags, or anything below 16px in height',
|
|
6
|
+
$type: 'dimension',
|
|
7
|
+
$extensions: {
|
|
8
|
+
'org.primer.figma': {
|
|
9
|
+
collection: 'functional/size',
|
|
10
|
+
scopes: ['radius'],
|
|
11
|
+
codeSyntax: {
|
|
12
|
+
web: 'var(--borderRadius-small) /* utility class: .rounded-1 */',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
'org.primer.llm': {
|
|
16
|
+
usage: ['badge', 'tag', 'label', 'small-input'],
|
|
17
|
+
rules: 'Use for small UI elements under 16px height. Do NOT use for buttons or cards.',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
medium: {
|
|
22
|
+
$value: {value: 6, unit: 'px'},
|
|
23
|
+
$description: 'Medium border radius (6px). The default choice for most buttons, cards, and containers',
|
|
24
|
+
$type: 'dimension',
|
|
25
|
+
$extensions: {
|
|
26
|
+
'org.primer.figma': {
|
|
27
|
+
collection: 'functional/size',
|
|
28
|
+
scopes: ['radius'],
|
|
29
|
+
codeSyntax: {
|
|
30
|
+
web: 'var(--borderRadius-medium) /* utility class: .rounded-2 */',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
'org.primer.llm': {
|
|
34
|
+
usage: ['button', 'input', 'textarea', 'select', 'card', 'container'],
|
|
35
|
+
rules: 'Default choice for most components. Use for inputs, cards, and general containers.',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
large: {
|
|
40
|
+
$value: {value: 12, unit: 'px'},
|
|
41
|
+
$description: 'Large border radius (12px). Use for larger containers, dialogs, or when more visual softness is desired. Always use this for buttons.',
|
|
42
|
+
$type: 'dimension',
|
|
43
|
+
$extensions: {
|
|
44
|
+
'org.primer.figma': {
|
|
45
|
+
collection: 'functional/size',
|
|
46
|
+
scopes: ['radius'],
|
|
47
|
+
codeSyntax: {
|
|
48
|
+
web: 'var(--borderRadius-large) /* utility class: .rounded-3 */',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
'org.primer.llm': {
|
|
52
|
+
usage: ['dialog', 'card', 'modal'],
|
|
53
|
+
rules: 'Recommended for dialogs and modals.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
full: {
|
|
58
|
+
$value: {value: 9999, unit: 'px'},
|
|
59
|
+
$type: 'dimension',
|
|
60
|
+
$description: 'Use this border radius for pill shaped elements',
|
|
61
|
+
$extensions: {
|
|
62
|
+
'org.primer.figma': {
|
|
63
|
+
collection: 'functional/size',
|
|
64
|
+
scopes: ['radius'],
|
|
65
|
+
codeSyntax: {
|
|
66
|
+
web: 'var(--borderRadius-full) /* utility class: .circle */',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
'org.primer.llm': {
|
|
70
|
+
usage: ['avatar', 'pill-badge', 'circular-button'],
|
|
71
|
+
rules: 'Use for avatars and pill-shaped elements. Do NOT use for rectangular containers.',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
default: {
|
|
76
|
+
$value: '{borderRadius.medium}',
|
|
77
|
+
$description: 'Default border radius for most UI elements. Alias of borderRadius.medium (6px). Use when in doubt',
|
|
78
|
+
$type: 'dimension',
|
|
79
|
+
$extensions: {
|
|
80
|
+
'org.primer.figma': {
|
|
81
|
+
collection: 'functional/size',
|
|
82
|
+
scopes: ['radius'],
|
|
83
|
+
codeSyntax: {
|
|
84
|
+
web: 'var(--borderRadius-default) /* utility class: .rounded-2 */',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
}
|
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
"minTarget": {
|
|
4
4
|
"auto": {
|
|
5
5
|
"$value": "{base.size.44}",
|
|
6
|
-
"$type": "dimension"
|
|
6
|
+
"$type": "dimension",
|
|
7
|
+
"$description": "Minimum touch target size for coarse pointer devices (touch screens)",
|
|
8
|
+
"$extensions": {
|
|
9
|
+
"org.primer.llm": {
|
|
10
|
+
"usage": ["touch-target", "mobile-button", "tap-area"],
|
|
11
|
+
"rules": "Use as minimum size for interactive elements on touch devices. Ensures WCAG 2.5.5 compliance (44x44px minimum). Do NOT use for fine pointer (mouse) contexts."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
}
|
|
8
15
|
}
|
|
9
16
|
},
|
|
@@ -12,7 +19,14 @@
|
|
|
12
19
|
"gap": {
|
|
13
20
|
"auto": {
|
|
14
21
|
"$value": "{base.size.16}",
|
|
15
|
-
"$type": "dimension"
|
|
22
|
+
"$type": "dimension",
|
|
23
|
+
"$description": "Gap between stacked controls in small density layouts for touch devices",
|
|
24
|
+
"$extensions": {
|
|
25
|
+
"org.primer.llm": {
|
|
26
|
+
"usage": ["touch-control-spacing", "mobile-form-gap", "stacked-buttons"],
|
|
27
|
+
"rules": "Use for spacing between interactive controls on touch devices in compact layouts. Provides adequate touch separation. Do NOT use for desktop/mouse interfaces."
|
|
28
|
+
}
|
|
29
|
+
}
|
|
16
30
|
}
|
|
17
31
|
}
|
|
18
32
|
},
|
|
@@ -20,7 +34,14 @@
|
|
|
20
34
|
"gap": {
|
|
21
35
|
"auto": {
|
|
22
36
|
"$value": "{base.size.12}",
|
|
23
|
-
"$type": "dimension"
|
|
37
|
+
"$type": "dimension",
|
|
38
|
+
"$description": "Gap between stacked controls in medium density layouts for touch devices",
|
|
39
|
+
"$extensions": {
|
|
40
|
+
"org.primer.llm": {
|
|
41
|
+
"usage": ["touch-control-spacing", "mobile-form-gap", "stacked-buttons"],
|
|
42
|
+
"rules": "Use for spacing between interactive controls on touch devices in standard layouts. Do NOT use for desktop/mouse interfaces."
|
|
43
|
+
}
|
|
44
|
+
}
|
|
24
45
|
}
|
|
25
46
|
}
|
|
26
47
|
}
|
|
@@ -1,28 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
control: {
|
|
3
|
+
minTarget: {
|
|
4
|
+
auto: {
|
|
5
|
+
$value: '{base.size.16}',
|
|
6
|
+
$type: 'dimension',
|
|
7
|
+
$description: 'Minimum target size for fine pointer devices (mouse)',
|
|
8
|
+
$extensions: {
|
|
9
|
+
'org.primer.llm': {
|
|
10
|
+
usage: ['mouse-target', 'desktop-button', 'click-area'],
|
|
11
|
+
rules: 'Use as minimum size for interactive elements on desktop/mouse interfaces. Smaller than touch targets for denser layouts. Do NOT use for touch/mobile contexts.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
9
16
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
controlStack: {
|
|
18
|
+
small: {
|
|
19
|
+
gap: {
|
|
20
|
+
auto: {
|
|
21
|
+
$value: '{base.size.8}',
|
|
22
|
+
$type: 'dimension',
|
|
23
|
+
$description: 'Gap between stacked controls in small density layouts for mouse interfaces',
|
|
24
|
+
$extensions: {
|
|
25
|
+
'org.primer.llm': {
|
|
26
|
+
usage: ['desktop-control-spacing', 'form-gap', 'stacked-buttons'],
|
|
27
|
+
rules: 'Use for spacing between interactive controls on desktop in compact layouts. Tighter spacing than touch devices. Do NOT use for mobile/touch interfaces.',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
medium: {
|
|
34
|
+
gap: {
|
|
35
|
+
auto: {
|
|
36
|
+
$value: '{base.size.8}',
|
|
37
|
+
$type: 'dimension',
|
|
38
|
+
$description: 'Gap between stacked controls in medium density layouts for mouse interfaces',
|
|
39
|
+
$extensions: {
|
|
40
|
+
'org.primer.llm': {
|
|
41
|
+
usage: ['desktop-control-spacing', 'form-gap', 'stacked-buttons'],
|
|
42
|
+
rules: 'Use for spacing between interactive controls on desktop in standard layouts. Do NOT use for mobile/touch interfaces.',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
18
47
|
},
|
|
19
|
-
|
|
20
|
-
"gap": {
|
|
21
|
-
"auto": {
|
|
22
|
-
"$value": "{base.size.8}",
|
|
23
|
-
"$type": "dimension"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
48
|
+
},
|
|
28
49
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"control": {
|
|
3
|
+
"$description": "Size tokens for interactive controls (buttons, inputs, selects). Includes overall size, padding, line height, and gap values for each size variant.",
|
|
4
|
+
"$extensions": {
|
|
5
|
+
"org.primer.llm": {
|
|
6
|
+
"usage": ["button", "input", "select", "form-control", "interactive-element"],
|
|
7
|
+
"rules": "Use size variants consistently across related controls. Match control size to context: xsmall/small for dense UIs, medium for standard forms, large/xlarge for prominent CTAs. Use minTarget values to ensure touch accessibility on coarse pointer devices."
|
|
8
|
+
}
|
|
9
|
+
},
|
|
3
10
|
"minTarget": {
|
|
4
11
|
"fine": {
|
|
5
12
|
"$value": "{base.size.16}",
|
|
@@ -44,7 +51,7 @@
|
|
|
44
51
|
}
|
|
45
52
|
},
|
|
46
53
|
"paddingBlock": {
|
|
47
|
-
"$value": "
|
|
54
|
+
"$value": {"value": 2, "unit": "px"},
|
|
48
55
|
"$type": "dimension",
|
|
49
56
|
"$extensions": {
|
|
50
57
|
"org.primer.figma": {
|
|
@@ -182,7 +189,7 @@
|
|
|
182
189
|
}
|
|
183
190
|
},
|
|
184
191
|
"paddingBlock": {
|
|
185
|
-
"$value": "
|
|
192
|
+
"$value": {"value": 6, "unit": "px"},
|
|
186
193
|
"$type": "dimension",
|
|
187
194
|
"$extensions": {
|
|
188
195
|
"org.primer.figma": {
|
|
@@ -256,7 +263,7 @@
|
|
|
256
263
|
}
|
|
257
264
|
},
|
|
258
265
|
"paddingBlock": {
|
|
259
|
-
"$value": "
|
|
266
|
+
"$value": {"value": 10, "unit": "px"},
|
|
260
267
|
"$type": "dimension",
|
|
261
268
|
"$extensions": {
|
|
262
269
|
"org.primer.figma": {
|
|
@@ -320,7 +327,7 @@
|
|
|
320
327
|
}
|
|
321
328
|
},
|
|
322
329
|
"paddingBlock": {
|
|
323
|
-
"$value": "
|
|
330
|
+
"$value": {"value": 14, "unit": "px"},
|
|
324
331
|
"$type": "dimension",
|
|
325
332
|
"$extensions": {
|
|
326
333
|
"org.primer.figma": {
|
|
@@ -364,9 +371,16 @@
|
|
|
364
371
|
}
|
|
365
372
|
},
|
|
366
373
|
"spinner": {
|
|
374
|
+
"$description": "Size and stroke tokens for loading spinner components.",
|
|
375
|
+
"$extensions": {
|
|
376
|
+
"org.primer.llm": {
|
|
377
|
+
"usage": ["loading-spinner", "progress-indicator", "async-loading"],
|
|
378
|
+
"rules": "Match spinner size to context: small for inline loading, medium for buttons and cards, large for full-page loading states."
|
|
379
|
+
}
|
|
380
|
+
},
|
|
367
381
|
"strokeWidth": {
|
|
368
382
|
"default": {
|
|
369
|
-
"$value": "
|
|
383
|
+
"$value": {"value": 2, "unit": "px"},
|
|
370
384
|
"$type": "dimension"
|
|
371
385
|
}
|
|
372
386
|
},
|
|
@@ -404,6 +418,13 @@
|
|
|
404
418
|
}
|
|
405
419
|
},
|
|
406
420
|
"stack": {
|
|
421
|
+
"$description": "Spacing tokens for Stack layout components including padding and gap values.",
|
|
422
|
+
"$extensions": {
|
|
423
|
+
"org.primer.llm": {
|
|
424
|
+
"usage": ["stack-layout", "vertical-stack", "horizontal-stack", "flex-container"],
|
|
425
|
+
"rules": "Use condensed for dense lists, normal for standard layouts, spacious for prominent sections. Stack tokens provide consistent spacing within layout containers."
|
|
426
|
+
}
|
|
427
|
+
},
|
|
407
428
|
"padding": {
|
|
408
429
|
"condensed": {
|
|
409
430
|
"$value": "{base.size.8}",
|
|
@@ -494,6 +515,13 @@
|
|
|
494
515
|
}
|
|
495
516
|
},
|
|
496
517
|
"controlStack": {
|
|
518
|
+
"$description": "Gap tokens for groups of controls (buttons, form elements) arranged in a row or column.",
|
|
519
|
+
"$extensions": {
|
|
520
|
+
"org.primer.llm": {
|
|
521
|
+
"usage": ["button-group", "form-control-group", "action-bar", "toolbar"],
|
|
522
|
+
"rules": "Use with groups of related controls. Match gap size to control size (small controls use small gaps). Condensed for tight groupings, spacious for separated actions."
|
|
523
|
+
}
|
|
524
|
+
},
|
|
497
525
|
"small": {
|
|
498
526
|
"gap": {
|
|
499
527
|
"condensed": {
|
|
@@ -578,9 +606,16 @@
|
|
|
578
606
|
}
|
|
579
607
|
},
|
|
580
608
|
"overlay": {
|
|
609
|
+
"$description": "Dimension tokens for overlay components like modals, dialogs, popovers, and dropdown menus.",
|
|
610
|
+
"$extensions": {
|
|
611
|
+
"org.primer.llm": {
|
|
612
|
+
"usage": ["modal", "dialog", "popover", "dropdown", "tooltip", "overlay-panel"],
|
|
613
|
+
"rules": "Match overlay size to content: xsmall/small for menus and tooltips, medium for dialogs, large/xlarge for complex modals. Use height tokens to constrain scrollable overlays. Always consider viewport size constraints."
|
|
614
|
+
}
|
|
615
|
+
},
|
|
581
616
|
"width": {
|
|
582
617
|
"xsmall": {
|
|
583
|
-
"$value": "
|
|
618
|
+
"$value": {"value": 192, "unit": "px"},
|
|
584
619
|
"$type": "dimension",
|
|
585
620
|
"$extensions": {
|
|
586
621
|
"org.primer.figma": {
|
|
@@ -590,7 +625,7 @@
|
|
|
590
625
|
}
|
|
591
626
|
},
|
|
592
627
|
"small": {
|
|
593
|
-
"$value": "
|
|
628
|
+
"$value": {"value": 320, "unit": "px"},
|
|
594
629
|
"$type": "dimension",
|
|
595
630
|
"$extensions": {
|
|
596
631
|
"org.primer.figma": {
|
|
@@ -600,7 +635,7 @@
|
|
|
600
635
|
}
|
|
601
636
|
},
|
|
602
637
|
"medium": {
|
|
603
|
-
"$value": "
|
|
638
|
+
"$value": {"value": 480, "unit": "px"},
|
|
604
639
|
"$type": "dimension",
|
|
605
640
|
"$extensions": {
|
|
606
641
|
"org.primer.figma": {
|
|
@@ -610,7 +645,7 @@
|
|
|
610
645
|
}
|
|
611
646
|
},
|
|
612
647
|
"large": {
|
|
613
|
-
"$value": "
|
|
648
|
+
"$value": {"value": 640, "unit": "px"},
|
|
614
649
|
"$type": "dimension",
|
|
615
650
|
"$extensions": {
|
|
616
651
|
"org.primer.figma": {
|
|
@@ -620,7 +655,7 @@
|
|
|
620
655
|
}
|
|
621
656
|
},
|
|
622
657
|
"xlarge": {
|
|
623
|
-
"$value": "
|
|
658
|
+
"$value": {"value": 960, "unit": "px"},
|
|
624
659
|
"$type": "dimension",
|
|
625
660
|
"$extensions": {
|
|
626
661
|
"org.primer.figma": {
|
|
@@ -632,7 +667,7 @@
|
|
|
632
667
|
},
|
|
633
668
|
"height": {
|
|
634
669
|
"small": {
|
|
635
|
-
"$value": "
|
|
670
|
+
"$value": {"value": 256, "unit": "px"},
|
|
636
671
|
"$type": "dimension",
|
|
637
672
|
"$extensions": {
|
|
638
673
|
"org.primer.figma": {
|
|
@@ -642,7 +677,7 @@
|
|
|
642
677
|
}
|
|
643
678
|
},
|
|
644
679
|
"medium": {
|
|
645
|
-
"$value": "
|
|
680
|
+
"$value": {"value": 320, "unit": "px"},
|
|
646
681
|
"$type": "dimension",
|
|
647
682
|
"$extensions": {
|
|
648
683
|
"org.primer.figma": {
|
|
@@ -652,7 +687,7 @@
|
|
|
652
687
|
}
|
|
653
688
|
},
|
|
654
689
|
"large": {
|
|
655
|
-
"$value": "
|
|
690
|
+
"$value": {"value": 432, "unit": "px"},
|
|
656
691
|
"$type": "dimension",
|
|
657
692
|
"$extensions": {
|
|
658
693
|
"org.primer.figma": {
|
|
@@ -662,7 +697,7 @@
|
|
|
662
697
|
}
|
|
663
698
|
},
|
|
664
699
|
"xlarge": {
|
|
665
|
-
"$value": "
|
|
700
|
+
"$value": {"value": 600, "unit": "px"},
|
|
666
701
|
"$type": "dimension",
|
|
667
702
|
"$extensions": {
|
|
668
703
|
"org.primer.figma": {
|
|
@@ -727,7 +762,7 @@
|
|
|
727
762
|
}
|
|
728
763
|
},
|
|
729
764
|
"offset": {
|
|
730
|
-
"$value": "
|
|
765
|
+
"$value": {"value": 4, "unit": "px"},
|
|
731
766
|
"$type": "dimension",
|
|
732
767
|
"$extensions": {
|
|
733
768
|
"org.primer.figma": {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"$type": "custom-viewportRange"
|
|
6
6
|
},
|
|
7
7
|
"narrowLandscape": {
|
|
8
|
-
"$value": "(max-width: calc({breakpoint.large} - 0.02px) and (max-height: calc({breakpoint.small} - 0.02px)) and (orientation: landscape))",
|
|
8
|
+
"$value": "((max-width: calc({breakpoint.large} - 0.02px)) and (max-height: calc({breakpoint.small} - 0.02px)) and (orientation: landscape))",
|
|
9
9
|
"$type": "custom-viewportRange"
|
|
10
10
|
},
|
|
11
11
|
"regular": {
|