@primer/primitives 10.2.0 → 10.3.0-rc.416d4297

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.
Files changed (93) hide show
  1. package/dist/build/formats/cssCustomMedia.js +2 -2
  2. package/dist/build/formats/jsonOneDimensional.js +2 -1
  3. package/dist/build/platforms/css.js +5 -2
  4. package/dist/build/platforms/figma.js +2 -2
  5. package/dist/build/preprocessors/themeOverrides.js +7 -4
  6. package/dist/build/schemas/collections.d.ts +1 -1
  7. package/dist/build/schemas/colorToken.d.ts +471 -65
  8. package/dist/build/schemas/colorToken.js +18 -15
  9. package/dist/build/schemas/shadowToken.js +2 -2
  10. package/dist/build/transformers/colorAlphaToCss.d.ts +1 -1
  11. package/dist/build/transformers/figmaAttributes.js +2 -1
  12. package/dist/build/types/styleDictionaryConfigGenerator.d.ts +1 -1
  13. package/dist/build/utilities/asArray.d.ts +1 -0
  14. package/dist/build/utilities/asArray.js +1 -0
  15. package/dist/css/functional/size/border.css +5 -5
  16. package/dist/css/functional/size/size.css +15 -15
  17. package/dist/css/functional/size/viewport.css +2 -2
  18. package/dist/css/functional/themes/dark-colorblind.css +398 -398
  19. package/dist/css/functional/themes/dark-dimmed.css +390 -390
  20. package/dist/css/functional/themes/dark-high-contrast.css +412 -412
  21. package/dist/css/functional/themes/dark-tritanopia.css +406 -406
  22. package/dist/css/functional/themes/dark.css +416 -416
  23. package/dist/css/functional/themes/light-colorblind.css +434 -434
  24. package/dist/css/functional/themes/light-high-contrast.css +438 -438
  25. package/dist/css/functional/themes/light-tritanopia.css +432 -432
  26. package/dist/css/functional/themes/light.css +444 -444
  27. package/dist/css/primitives.css +20 -20
  28. package/dist/docs/base/motion/motion.json +88 -73
  29. package/dist/docs/base/size/size.json +94 -75
  30. package/dist/docs/base/typography/typography.json +14 -10
  31. package/dist/docs/functional/motion/motion.json +19 -15
  32. package/dist/docs/functional/size/border.json +139 -125
  33. package/dist/docs/functional/size/breakpoints.json +31 -25
  34. package/dist/docs/functional/size/size-coarse.json +13 -10
  35. package/dist/docs/functional/size/size-fine.json +9 -6
  36. package/dist/docs/functional/size/size.json +499 -433
  37. package/dist/docs/functional/size/viewport.json +32 -26
  38. package/dist/docs/functional/themes/dark-colorblind.json +7174 -6544
  39. package/dist/docs/functional/themes/dark-dimmed.json +7181 -6473
  40. package/dist/docs/functional/themes/dark-high-contrast.json +7445 -6789
  41. package/dist/docs/functional/themes/dark-tritanopia.json +7164 -6498
  42. package/dist/docs/functional/themes/dark.json +7202 -6494
  43. package/dist/docs/functional/themes/light-colorblind.json +7096 -6466
  44. package/dist/docs/functional/themes/light-high-contrast.json +7326 -6660
  45. package/dist/docs/functional/themes/light-tritanopia.json +7109 -6479
  46. package/dist/docs/functional/themes/light.json +7159 -6451
  47. package/dist/docs/functional/typography/typography.json +518 -472
  48. package/dist/figma/figma.json +3 -3
  49. package/dist/figma/shadows/dark-colorblind.json +115 -115
  50. package/dist/figma/shadows/light-colorblind.json +105 -105
  51. package/dist/figma/themes/dark-colorblind.json +5553 -5553
  52. package/dist/figma/themes/dark-dimmed.json +5162 -5162
  53. package/dist/figma/themes/dark-high-contrast.json +4196 -4196
  54. package/dist/figma/themes/dark-tritanopia.json +5211 -5211
  55. package/dist/figma/themes/dark.json +5537 -5537
  56. package/dist/figma/themes/light-colorblind.json +5501 -5501
  57. package/dist/figma/themes/light-high-contrast.json +4176 -4176
  58. package/dist/figma/themes/light-tritanopia.json +5077 -5077
  59. package/dist/figma/themes/light.json +1950 -1950
  60. package/dist/internalCss/dark-colorblind.css +1144 -1144
  61. package/dist/internalCss/dark-dimmed.css +1138 -1138
  62. package/dist/internalCss/dark-high-contrast.css +1154 -1154
  63. package/dist/internalCss/dark-tritanopia.css +1148 -1148
  64. package/dist/internalCss/dark.css +1150 -1150
  65. package/dist/internalCss/light-colorblind.css +1152 -1152
  66. package/dist/internalCss/light-high-contrast.css +1166 -1166
  67. package/dist/internalCss/light-tritanopia.css +1156 -1156
  68. package/dist/internalCss/light.css +1158 -1158
  69. package/dist/styleLint/base/motion/motion.json +97 -82
  70. package/dist/styleLint/base/size/size.json +102 -83
  71. package/dist/styleLint/base/typography/typography.json +16 -12
  72. package/dist/styleLint/functional/motion/motion.json +22 -18
  73. package/dist/styleLint/functional/size/border.json +140 -126
  74. package/dist/styleLint/functional/size/breakpoints.json +32 -26
  75. package/dist/styleLint/functional/size/size-coarse.json +14 -11
  76. package/dist/styleLint/functional/size/size-fine.json +10 -7
  77. package/dist/styleLint/functional/size/size.json +486 -420
  78. package/dist/styleLint/functional/size/viewport.json +36 -30
  79. package/dist/styleLint/functional/themes/dark-colorblind.json +6916 -6286
  80. package/dist/styleLint/functional/themes/dark-dimmed.json +7372 -6664
  81. package/dist/styleLint/functional/themes/dark-high-contrast.json +7472 -6816
  82. package/dist/styleLint/functional/themes/dark-tritanopia.json +7051 -6385
  83. package/dist/styleLint/functional/themes/dark.json +7180 -6472
  84. package/dist/styleLint/functional/themes/light-colorblind.json +7041 -6411
  85. package/dist/styleLint/functional/themes/light-high-contrast.json +7418 -6752
  86. package/dist/styleLint/functional/themes/light-tritanopia.json +6926 -6296
  87. package/dist/styleLint/functional/themes/light.json +7093 -6385
  88. package/dist/styleLint/functional/typography/typography.json +520 -474
  89. package/package.json +2 -2
  90. package/src/tokens/component/diffBlob.json5 +293 -0
  91. package/src/tokens/component/highlight.json5 +23 -0
  92. package/src/tokens/functional/color/dark/app-dark.json5 +0 -302
  93. package/src/tokens/functional/color/light/app-light.json5 +1 -274
@@ -49,20 +49,20 @@
49
49
  --motion-spinner-easing-rotation: var(--base-easing-linear); /* The easing curve for the "Spinner" loading indicator rotation */
50
50
  }
51
51
  :root {
52
- --borderRadius-default: 0.375rem;
53
52
  --borderRadius-full: 624.9375rem; /* Use this border radius for pill shaped elements */
54
53
  --borderRadius-large: 0.75rem;
55
54
  --borderRadius-medium: 0.375rem;
56
55
  --borderRadius-small: 0.1875rem;
57
- --borderWidth-default: 0.0625rem;
58
56
  --borderWidth-thick: 0.125rem;
59
57
  --borderWidth-thicker: 0.25rem;
60
58
  --borderWidth-thin: 0.0625rem;
61
- --boxShadow-thick: inset 0 0 0 0.125rem;
62
- --boxShadow-thicker: inset 0 0 0 0.25rem;
63
- --boxShadow-thin: inset 0 0 0 0.0625rem; /* Thin shadow for borders */
64
59
  --outline-focus-offset: -0.125rem;
65
60
  --outline-focus-width: 0.125rem;
61
+ --borderRadius-default: var(--borderRadius-medium);
62
+ --borderWidth-default: var(--borderWidth-thin);
63
+ --boxShadow-thick: inset 0 0 0 var(--borderWidth-thick);
64
+ --boxShadow-thicker: inset 0 0 0 var(--borderWidth-thicker);
65
+ --boxShadow-thin: inset 0 0 0 var(--borderWidth-thin); /* Thin shadow for borders */
66
66
  }
67
67
  :root {
68
68
  --breakpoint-large: 63.25rem;
@@ -87,15 +87,28 @@
87
87
  }
88
88
  }
89
89
  :root {
90
+ --control-large-paddingBlock: 0.625rem;
91
+ --control-medium-paddingBlock: 0.375rem;
92
+ --control-xlarge-paddingBlock: 0.875rem;
93
+ --control-xsmall-paddingBlock: 0.125rem;
94
+ --overlay-height-large: 27rem;
95
+ --overlay-height-medium: 20rem;
96
+ --overlay-height-small: 16rem;
97
+ --overlay-height-xlarge: 37.5rem;
98
+ --overlay-offset: 0.25rem;
99
+ --overlay-width-large: 40rem;
100
+ --overlay-width-medium: 30rem;
101
+ --overlay-width-small: 20rem;
102
+ --overlay-width-xlarge: 60rem;
103
+ --overlay-width-xsmall: 12rem;
104
+ --spinner-strokeWidth-default: 0.125rem;
90
105
  --control-large-gap: 0.5rem;
91
106
  --control-large-lineBoxHeight: 1.25rem;
92
- --control-large-paddingBlock: 0.625rem;
93
107
  --control-large-paddingInline-normal: 0.75rem;
94
108
  --control-large-paddingInline-spacious: 1rem;
95
109
  --control-large-size: 2.5rem;
96
110
  --control-medium-gap: 0.5rem;
97
111
  --control-medium-lineBoxHeight: 1.25rem;
98
- --control-medium-paddingBlock: 0.375rem;
99
112
  --control-medium-paddingInline-condensed: 0.5rem;
100
113
  --control-medium-paddingInline-normal: 0.75rem;
101
114
  --control-medium-paddingInline-spacious: 1rem;
@@ -110,13 +123,11 @@
110
123
  --control-small-size: 1.75rem;
111
124
  --control-xlarge-gap: 0.5rem;
112
125
  --control-xlarge-lineBoxHeight: 1.25rem;
113
- --control-xlarge-paddingBlock: 0.875rem;
114
126
  --control-xlarge-paddingInline-normal: 0.75rem;
115
127
  --control-xlarge-paddingInline-spacious: 1rem;
116
128
  --control-xlarge-size: 3rem;
117
129
  --control-xsmall-gap: 0.25rem;
118
130
  --control-xsmall-lineBoxHeight: 1.25rem;
119
- --control-xsmall-paddingBlock: 0.125rem;
120
131
  --control-xsmall-paddingInline-condensed: 0.25rem;
121
132
  --control-xsmall-paddingInline-normal: 0.5rem;
122
133
  --control-xsmall-paddingInline-spacious: 0.75rem;
@@ -129,24 +140,13 @@
129
140
  --controlStack-small-gap-condensed: 0.5rem;
130
141
  --controlStack-small-gap-spacious: 1rem;
131
142
  --overlay-borderRadius: 0.375rem;
132
- --overlay-height-large: 27rem;
133
- --overlay-height-medium: 20rem;
134
- --overlay-height-small: 16rem;
135
- --overlay-height-xlarge: 37.5rem;
136
- --overlay-offset: 0.25rem;
137
143
  --overlay-padding-condensed: 0.5rem;
138
144
  --overlay-padding-normal: 1rem;
139
145
  --overlay-paddingBlock-condensed: 0.25rem;
140
146
  --overlay-paddingBlock-normal: 0.75rem;
141
- --overlay-width-large: 40rem;
142
- --overlay-width-medium: 30rem;
143
- --overlay-width-small: 20rem;
144
- --overlay-width-xlarge: 60rem;
145
- --overlay-width-xsmall: 12rem;
146
147
  --spinner-size-large: 4rem;
147
148
  --spinner-size-medium: 2rem;
148
149
  --spinner-size-small: 1rem;
149
- --spinner-strokeWidth-default: 0.125rem;
150
150
  --stack-gap-condensed: 0.5rem;
151
151
  --stack-gap-normal: 1rem;
152
152
  --stack-gap-spacious: 1.5rem;
@@ -1,64 +1,4 @@
1
1
  {
2
- "base-easing-linear": {
3
- "filePath": "src/tokens/base/motion/easing.json5",
4
- "isSource": true,
5
- "original": {
6
- "$value": [0, 0, 1, 1],
7
- "$type": "cubicBezier",
8
- "$description": "Ideal for non-movement properties, like opacity or background color."
9
- },
10
- "name": "base-easing-linear",
11
- "attributes": {},
12
- "path": ["base", "easing", "linear"],
13
- "value": [0, 0, 1, 1],
14
- "type": "cubicBezier",
15
- "description": "Ideal for non-movement properties, like opacity or background color."
16
- },
17
- "base-easing-easeIn": {
18
- "filePath": "src/tokens/base/motion/easing.json5",
19
- "isSource": true,
20
- "original": {
21
- "$value": [0.7, 0.1, 0.75, 0.9],
22
- "$type": "cubicBezier",
23
- "$description": "Ideal for movement that starts on the page and ends off the page."
24
- },
25
- "name": "base-easing-easeIn",
26
- "attributes": {},
27
- "path": ["base", "easing", "easeIn"],
28
- "value": [0.7, 0.1, 0.75, 0.9],
29
- "type": "cubicBezier",
30
- "description": "Ideal for movement that starts on the page and ends off the page."
31
- },
32
- "base-easing-easeOut": {
33
- "filePath": "src/tokens/base/motion/easing.json5",
34
- "isSource": true,
35
- "original": {
36
- "$value": [0.16, 1, 0.3, 1],
37
- "$type": "cubicBezier",
38
- "$description": "Ideal for movement that starts off the page and ends on the page."
39
- },
40
- "name": "base-easing-easeOut",
41
- "attributes": {},
42
- "path": ["base", "easing", "easeOut"],
43
- "value": [0.16, 1, 0.3, 1],
44
- "type": "cubicBezier",
45
- "description": "Ideal for movement that starts off the page and ends on the page."
46
- },
47
- "base-easing-easeInOut": {
48
- "filePath": "src/tokens/base/motion/easing.json5",
49
- "isSource": true,
50
- "original": {
51
- "$value": [0.6, 0, 0.2, 1],
52
- "$type": "cubicBezier",
53
- "$description": "Ideal for movement that starts and ends on the page."
54
- },
55
- "name": "base-easing-easeInOut",
56
- "attributes": {},
57
- "path": ["base", "easing", "easeInOut"],
58
- "value": [0.6, 0, 0.2, 1],
59
- "type": "cubicBezier",
60
- "description": "Ideal for movement that starts and ends on the page."
61
- },
62
2
  "base-duration-0": {
63
3
  "filePath": "src/tokens/base/motion/timing.json5",
64
4
  "isSource": true,
@@ -69,20 +9,22 @@
69
9
  "name": "base-duration-0",
70
10
  "attributes": {},
71
11
  "path": ["base", "duration", "0"],
12
+ "key": "{base.duration.0}",
72
13
  "value": "0ms",
73
14
  "type": "duration"
74
15
  },
75
- "base-duration-75": {
16
+ "base-duration-1000": {
76
17
  "filePath": "src/tokens/base/motion/timing.json5",
77
18
  "isSource": true,
78
19
  "original": {
79
- "$value": "75ms",
20
+ "$value": "1000ms",
80
21
  "$type": "duration"
81
22
  },
82
- "name": "base-duration-75",
23
+ "name": "base-duration-1000",
83
24
  "attributes": {},
84
- "path": ["base", "duration", "75"],
85
- "value": "75ms",
25
+ "path": ["base", "duration", "1000"],
26
+ "key": "{base.duration.1000}",
27
+ "value": "1000ms",
86
28
  "type": "duration"
87
29
  },
88
30
  "base-duration-200": {
@@ -95,6 +37,7 @@
95
37
  "name": "base-duration-200",
96
38
  "attributes": {},
97
39
  "path": ["base", "duration", "200"],
40
+ "key": "{base.duration.200}",
98
41
  "value": "200ms",
99
42
  "type": "duration"
100
43
  },
@@ -108,6 +51,7 @@
108
51
  "name": "base-duration-300",
109
52
  "attributes": {},
110
53
  "path": ["base", "duration", "300"],
54
+ "key": "{base.duration.300}",
111
55
  "value": "300ms",
112
56
  "type": "duration"
113
57
  },
@@ -121,6 +65,7 @@
121
65
  "name": "base-duration-400",
122
66
  "attributes": {},
123
67
  "path": ["base", "duration", "400"],
68
+ "key": "{base.duration.400}",
124
69
  "value": "400ms",
125
70
  "type": "duration"
126
71
  },
@@ -134,6 +79,7 @@
134
79
  "name": "base-duration-500",
135
80
  "attributes": {},
136
81
  "path": ["base", "duration", "500"],
82
+ "key": "{base.duration.500}",
137
83
  "value": "500ms",
138
84
  "type": "duration"
139
85
  },
@@ -147,6 +93,7 @@
147
93
  "name": "base-duration-600",
148
94
  "attributes": {},
149
95
  "path": ["base", "duration", "600"],
96
+ "key": "{base.duration.600}",
150
97
  "value": "600ms",
151
98
  "type": "duration"
152
99
  },
@@ -160,9 +107,24 @@
160
107
  "name": "base-duration-700",
161
108
  "attributes": {},
162
109
  "path": ["base", "duration", "700"],
110
+ "key": "{base.duration.700}",
163
111
  "value": "700ms",
164
112
  "type": "duration"
165
113
  },
114
+ "base-duration-75": {
115
+ "filePath": "src/tokens/base/motion/timing.json5",
116
+ "isSource": true,
117
+ "original": {
118
+ "$value": "75ms",
119
+ "$type": "duration"
120
+ },
121
+ "name": "base-duration-75",
122
+ "attributes": {},
123
+ "path": ["base", "duration", "75"],
124
+ "key": "{base.duration.75}",
125
+ "value": "75ms",
126
+ "type": "duration"
127
+ },
166
128
  "base-duration-800": {
167
129
  "filePath": "src/tokens/base/motion/timing.json5",
168
130
  "isSource": true,
@@ -173,6 +135,7 @@
173
135
  "name": "base-duration-800",
174
136
  "attributes": {},
175
137
  "path": ["base", "duration", "800"],
138
+ "key": "{base.duration.800}",
176
139
  "value": "800ms",
177
140
  "type": "duration"
178
141
  },
@@ -186,20 +149,72 @@
186
149
  "name": "base-duration-900",
187
150
  "attributes": {},
188
151
  "path": ["base", "duration", "900"],
152
+ "key": "{base.duration.900}",
189
153
  "value": "900ms",
190
154
  "type": "duration"
191
155
  },
192
- "base-duration-1000": {
193
- "filePath": "src/tokens/base/motion/timing.json5",
156
+ "base-easing-easeIn": {
157
+ "filePath": "src/tokens/base/motion/easing.json5",
194
158
  "isSource": true,
195
159
  "original": {
196
- "$value": "1000ms",
197
- "$type": "duration"
160
+ "$value": [0.7, 0.1, 0.75, 0.9],
161
+ "$type": "cubicBezier",
162
+ "$description": "Ideal for movement that starts on the page and ends off the page."
198
163
  },
199
- "name": "base-duration-1000",
164
+ "name": "base-easing-easeIn",
200
165
  "attributes": {},
201
- "path": ["base", "duration", "1000"],
202
- "value": "1000ms",
203
- "type": "duration"
166
+ "path": ["base", "easing", "easeIn"],
167
+ "key": "{base.easing.easeIn}",
168
+ "value": [0.7, 0.1, 0.75, 0.9],
169
+ "type": "cubicBezier",
170
+ "description": "Ideal for movement that starts on the page and ends off the page."
171
+ },
172
+ "base-easing-easeInOut": {
173
+ "filePath": "src/tokens/base/motion/easing.json5",
174
+ "isSource": true,
175
+ "original": {
176
+ "$value": [0.6, 0, 0.2, 1],
177
+ "$type": "cubicBezier",
178
+ "$description": "Ideal for movement that starts and ends on the page."
179
+ },
180
+ "name": "base-easing-easeInOut",
181
+ "attributes": {},
182
+ "path": ["base", "easing", "easeInOut"],
183
+ "key": "{base.easing.easeInOut}",
184
+ "value": [0.6, 0, 0.2, 1],
185
+ "type": "cubicBezier",
186
+ "description": "Ideal for movement that starts and ends on the page."
187
+ },
188
+ "base-easing-easeOut": {
189
+ "filePath": "src/tokens/base/motion/easing.json5",
190
+ "isSource": true,
191
+ "original": {
192
+ "$value": [0.16, 1, 0.3, 1],
193
+ "$type": "cubicBezier",
194
+ "$description": "Ideal for movement that starts off the page and ends on the page."
195
+ },
196
+ "name": "base-easing-easeOut",
197
+ "attributes": {},
198
+ "path": ["base", "easing", "easeOut"],
199
+ "key": "{base.easing.easeOut}",
200
+ "value": [0.16, 1, 0.3, 1],
201
+ "type": "cubicBezier",
202
+ "description": "Ideal for movement that starts off the page and ends on the page."
203
+ },
204
+ "base-easing-linear": {
205
+ "filePath": "src/tokens/base/motion/easing.json5",
206
+ "isSource": true,
207
+ "original": {
208
+ "$value": [0, 0, 1, 1],
209
+ "$type": "cubicBezier",
210
+ "$description": "Ideal for non-movement properties, like opacity or background color."
211
+ },
212
+ "name": "base-easing-linear",
213
+ "attributes": {},
214
+ "path": ["base", "easing", "linear"],
215
+ "key": "{base.easing.linear}",
216
+ "value": [0, 0, 1, 1],
217
+ "type": "cubicBezier",
218
+ "description": "Ideal for non-movement properties, like opacity or background color."
204
219
  }
205
220
  }