@primer/primitives 10.0.0 → 10.1.0-rc.3e576ad9

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 (121) hide show
  1. package/dist/build/filters/isColor.js +0 -3
  2. package/dist/build/formats/typescriptExportDefinition.js +2 -2
  3. package/dist/build/platforms/css.d.ts +1 -1
  4. package/dist/build/platforms/css.js +10 -6
  5. package/dist/build/platforms/deprecatedJson.d.ts +1 -1
  6. package/dist/build/platforms/docJson.d.ts +1 -1
  7. package/dist/build/platforms/docJson.js +5 -1
  8. package/dist/build/platforms/fallbacks.d.ts +1 -1
  9. package/dist/build/platforms/figma.d.ts +1 -1
  10. package/dist/build/platforms/figma.js +6 -3
  11. package/dist/build/platforms/javascript.d.ts +1 -1
  12. package/dist/build/platforms/javascript.js +5 -1
  13. package/dist/build/platforms/json.d.ts +1 -1
  14. package/dist/build/platforms/json.js +5 -1
  15. package/dist/build/platforms/styleLint.d.ts +1 -1
  16. package/dist/build/platforms/styleLint.js +5 -1
  17. package/dist/build/platforms/typeDefinitions.d.ts +1 -1
  18. package/dist/build/platforms/typeDefinitions.js +5 -1
  19. package/dist/build/platforms/typescript.d.ts +1 -1
  20. package/dist/build/platforms/typescript.js +5 -1
  21. package/dist/build/preprocessors/themeOverrides.d.ts +2 -0
  22. package/dist/build/preprocessors/themeOverrides.js +22 -0
  23. package/dist/build/preprocessors/utilities/transformTokens.d.ts +8 -0
  24. package/dist/build/preprocessors/utilities/transformTokens.js +22 -0
  25. package/dist/build/{PrimerStyleDictionary.js → primerStyleDictionary.js} +8 -1
  26. package/dist/build/schemas/colorToken.d.ts +75 -0
  27. package/dist/build/schemas/colorToken.js +23 -0
  28. package/dist/build/transformers/borderToCss.js +2 -2
  29. package/dist/build/transformers/figmaAttributes.js +1 -1
  30. package/dist/build/transformers/utilities/invalidTokenError.js +0 -2
  31. package/dist/build/types/{StyleDictionaryConfigGenerator.d.ts → styleDictionaryConfigGenerator.d.ts} +1 -0
  32. package/dist/build/types/{TokenBuildInput.d.ts → tokenBuildInput.d.ts} +2 -0
  33. package/dist/build/utilities/lowerCaseFirstCharacter.d.ts +8 -0
  34. package/dist/build/utilities/lowerCaseFirstCharacter.js +10 -0
  35. package/dist/css/functional/size/border.css +7 -6
  36. package/dist/css/functional/themes/dark-colorblind.css +56 -2
  37. package/dist/css/functional/themes/dark-dimmed.css +56 -2
  38. package/dist/css/functional/themes/dark-high-contrast.css +56 -2
  39. package/dist/css/functional/themes/dark-tritanopia.css +56 -2
  40. package/dist/css/functional/themes/dark.css +56 -2
  41. package/dist/css/functional/themes/light-colorblind.css +56 -2
  42. package/dist/css/functional/themes/light-high-contrast.css +56 -2
  43. package/dist/css/functional/themes/light-tritanopia.css +56 -2
  44. package/dist/css/functional/themes/light.css +56 -2
  45. package/dist/css/primitives.css +7 -6
  46. package/dist/docs/base/size/size.json +19 -19
  47. package/dist/docs/base/typography/typography.json +4 -4
  48. package/dist/docs/functional/size/border.json +41 -28
  49. package/dist/docs/functional/size/breakpoints.json +6 -6
  50. package/dist/docs/functional/size/size-coarse.json +3 -3
  51. package/dist/docs/functional/size/size-fine.json +3 -3
  52. package/dist/docs/functional/size/size.json +66 -66
  53. package/dist/docs/functional/size/viewport.json +6 -6
  54. package/dist/docs/functional/themes/dark-colorblind.json +450 -7
  55. package/dist/docs/functional/themes/dark-dimmed.json +450 -7
  56. package/dist/docs/functional/themes/dark-high-contrast.json +450 -7
  57. package/dist/docs/functional/themes/dark-tritanopia.json +450 -7
  58. package/dist/docs/functional/themes/dark.json +450 -7
  59. package/dist/docs/functional/themes/light-colorblind.json +445 -2
  60. package/dist/docs/functional/themes/light-high-contrast.json +445 -2
  61. package/dist/docs/functional/themes/light-tritanopia.json +445 -2
  62. package/dist/docs/functional/themes/light.json +445 -2
  63. package/dist/docs/functional/typography/typography.json +46 -46
  64. package/dist/fallbacks/functional/size/border.json +7 -6
  65. package/dist/figma/figma.json +0 -8
  66. package/dist/internalCss/dark-colorblind.css +84 -2
  67. package/dist/internalCss/dark-dimmed.css +84 -2
  68. package/dist/internalCss/dark-high-contrast.css +84 -2
  69. package/dist/internalCss/dark-tritanopia.css +84 -2
  70. package/dist/internalCss/dark.css +84 -2
  71. package/dist/internalCss/light-colorblind.css +84 -2
  72. package/dist/internalCss/light-high-contrast.css +84 -2
  73. package/dist/internalCss/light-tritanopia.css +84 -2
  74. package/dist/internalCss/light.css +84 -2
  75. package/dist/styleLint/base/size/size.json +19 -19
  76. package/dist/styleLint/base/typography/typography.json +4 -4
  77. package/dist/styleLint/functional/size/border.json +41 -28
  78. package/dist/styleLint/functional/size/breakpoints.json +6 -6
  79. package/dist/styleLint/functional/size/size-coarse.json +3 -3
  80. package/dist/styleLint/functional/size/size-fine.json +3 -3
  81. package/dist/styleLint/functional/size/size.json +66 -66
  82. package/dist/styleLint/functional/size/viewport.json +6 -6
  83. package/dist/styleLint/functional/themes/dark-colorblind.json +450 -7
  84. package/dist/styleLint/functional/themes/dark-dimmed.json +450 -7
  85. package/dist/styleLint/functional/themes/dark-high-contrast.json +450 -7
  86. package/dist/styleLint/functional/themes/dark-tritanopia.json +450 -7
  87. package/dist/styleLint/functional/themes/dark.json +450 -7
  88. package/dist/styleLint/functional/themes/light-colorblind.json +445 -2
  89. package/dist/styleLint/functional/themes/light-high-contrast.json +445 -2
  90. package/dist/styleLint/functional/themes/light-tritanopia.json +445 -2
  91. package/dist/styleLint/functional/themes/light.json +445 -2
  92. package/dist/styleLint/functional/typography/typography.json +46 -46
  93. package/package.json +11 -10
  94. package/src/tokens/base/typography/typography.json5 +48 -0
  95. package/src/tokens/functional/border/border.json5 +236 -0
  96. package/src/tokens/functional/color/dark/primitives-dark.json5 +0 -1
  97. package/src/tokens/functional/size/border.json5 +115 -0
  98. package/src/tokens/functional/typography/typography.json5 +527 -0
  99. package/src/tokens/base/typography/typography.json +0 -48
  100. package/src/tokens/functional/border/dark.json5 +0 -12
  101. package/src/tokens/functional/border/light.json5 +0 -12
  102. package/src/tokens/functional/color/dark/patterns-dark.json +0 -3963
  103. package/src/tokens/functional/size/border.json +0 -111
  104. package/src/tokens/functional/typography/typography.json +0 -527
  105. /package/dist/build/{PrimerStyleDictionary.d.ts → primerStyleDictionary.d.ts} +0 -0
  106. /package/dist/build/types/{Border.d.ts → border.d.ts} +0 -0
  107. /package/dist/build/types/{BorderTokenValue.d.ts → borderTokenValue.d.ts} +0 -0
  108. /package/dist/build/types/{ColorHex.d.ts → colorHex.d.ts} +0 -0
  109. /package/dist/build/types/{PlatformInitializer.d.ts → platformInitializer.d.ts} +0 -0
  110. /package/dist/build/types/{Shadow.d.ts → shadow.d.ts} +0 -0
  111. /package/dist/build/types/{ShadowTokenValue.d.ts → shadowTokenValue.d.ts} +0 -0
  112. /package/dist/build/types/{SizeEm.d.ts → sizeEm.d.ts} +0 -0
  113. /package/dist/build/types/{SizePx.d.ts → sizePx.d.ts} +0 -0
  114. /package/dist/build/types/{SizeRem.d.ts → sizeRem.d.ts} +0 -0
  115. /package/dist/build/types/{TypographyTokenValue.d.ts → typographyTokenValue.d.ts} +0 -0
  116. /package/src/tokens/base/size/{size.json → size.json5} +0 -0
  117. /package/src/tokens/functional/size/{breakpoints.json → breakpoints.json5} +0 -0
  118. /package/src/tokens/functional/size/{size-coarse.json → size-coarse.json5} +0 -0
  119. /package/src/tokens/functional/size/{size-fine.json → size-fine.json5} +0 -0
  120. /package/src/tokens/functional/size/{size.json → size.json5} +0 -0
  121. /package/src/tokens/functional/size/{viewport.json → viewport.json5} +0 -0
@@ -0,0 +1,236 @@
1
+ {
2
+ focus: {
3
+ outline: {
4
+ $value: {
5
+ color: '{focus.outlineColor}',
6
+ style: 'solid',
7
+ width: '2px',
8
+ },
9
+ $type: 'border',
10
+ },
11
+ },
12
+ border: {
13
+ default: {
14
+ $value: {
15
+ color: '{borderColor.default}',
16
+ style: 'solid',
17
+ width: '{borderWidth.default}',
18
+ },
19
+ $type: 'border',
20
+ },
21
+ muted: {
22
+ $value: {
23
+ color: '{borderColor.muted}',
24
+ style: 'solid',
25
+ width: '{borderWidth.default}',
26
+ },
27
+ $type: 'border',
28
+ },
29
+ emphasis: {
30
+ $value: {
31
+ color: '{borderColor.emphasis}',
32
+ style: 'solid',
33
+ width: '{borderWidth.default}',
34
+ },
35
+ $type: 'border',
36
+ },
37
+ disabled: {
38
+ $value: {
39
+ color: '{borderColor.disabled}',
40
+ style: 'solid',
41
+ width: '{borderWidth.default}',
42
+ },
43
+ $type: 'border',
44
+ },
45
+ transparent: {
46
+ $value: {
47
+ color: '{borderColor.transparent}',
48
+ style: 'solid',
49
+ width: '{borderWidth.default}',
50
+ },
51
+ $type: 'border',
52
+ },
53
+ neutral: {
54
+ emphasis: {
55
+ $value: {
56
+ color: '{borderColor.neutral.emphasis}',
57
+ style: 'solid',
58
+ width: '{borderWidth.default}',
59
+ },
60
+ $type: 'border',
61
+ },
62
+ muted: {
63
+ $value: {
64
+ color: '{borderColor.neutral.muted}',
65
+ style: 'solid',
66
+ width: '{borderWidth.default}',
67
+ },
68
+ $type: 'border',
69
+ },
70
+ },
71
+ accent: {
72
+ emphasis: {
73
+ $value: {
74
+ color: '{borderColor.accent.emphasis}',
75
+ style: 'solid',
76
+ width: '{borderWidth.default}',
77
+ },
78
+ $type: 'border',
79
+ },
80
+ muted: {
81
+ $value: {
82
+ color: '{borderColor.accent.muted}',
83
+ style: 'solid',
84
+ width: '{borderWidth.default}',
85
+ },
86
+ $type: 'border',
87
+ },
88
+ },
89
+ success: {
90
+ emphasis: {
91
+ $value: {
92
+ color: '{borderColor.success.emphasis}',
93
+ style: 'solid',
94
+ width: '{borderWidth.default}',
95
+ },
96
+ $type: 'border',
97
+ },
98
+ muted: {
99
+ $value: {
100
+ color: '{borderColor.success.muted}',
101
+ style: 'solid',
102
+ width: '{borderWidth.default}',
103
+ },
104
+ $type: 'border',
105
+ },
106
+ },
107
+ open: {
108
+ emphasis: {
109
+ $value: '{border.success.emphasis}',
110
+ $type: 'border',
111
+ },
112
+ muted: {
113
+ $value: '{border.success.muted}',
114
+ $type: 'border',
115
+ },
116
+ },
117
+ danger: {
118
+ emphasis: {
119
+ $value: {
120
+ color: '{borderColor.danger.emphasis}',
121
+ style: 'solid',
122
+ width: '{borderWidth.default}',
123
+ },
124
+ $type: 'border',
125
+ },
126
+ muted: {
127
+ $value: {
128
+ color: '{borderColor.danger.muted}',
129
+ style: 'solid',
130
+ width: '{borderWidth.default}',
131
+ },
132
+ $type: 'border',
133
+ },
134
+ },
135
+ closed: {
136
+ emphasis: {
137
+ $value: '{border.danger.emphasis}',
138
+ $type: 'border',
139
+ },
140
+ muted: {
141
+ $value: '{border.danger.muted}',
142
+ $type: 'border',
143
+ },
144
+ },
145
+ attention: {
146
+ emphasis: {
147
+ $value: {
148
+ color: '{borderColor.attention.emphasis}',
149
+ style: 'solid',
150
+ width: '{borderWidth.default}',
151
+ },
152
+ $type: 'border',
153
+ },
154
+ muted: {
155
+ $value: {
156
+ color: '{borderColor.attention.muted}',
157
+ style: 'solid',
158
+ width: '{borderWidth.default}',
159
+ },
160
+ $type: 'border',
161
+ },
162
+ },
163
+ severe: {
164
+ emphasis: {
165
+ $value: {
166
+ color: '{borderColor.severe.emphasis}',
167
+ style: 'solid',
168
+ width: '{borderWidth.default}',
169
+ },
170
+ $type: 'border',
171
+ },
172
+ muted: {
173
+ $value: {
174
+ color: '{borderColor.severe.muted}',
175
+ style: 'solid',
176
+ width: '{borderWidth.default}',
177
+ },
178
+ $type: 'border',
179
+ },
180
+ },
181
+ done: {
182
+ emphasis: {
183
+ $value: {
184
+ color: '{borderColor.done.emphasis}',
185
+ style: 'solid',
186
+ width: '{borderWidth.default}',
187
+ },
188
+ $type: 'border',
189
+ },
190
+ muted: {
191
+ $value: {
192
+ color: '{borderColor.done.muted}',
193
+ style: 'solid',
194
+ width: '{borderWidth.default}',
195
+ },
196
+ $type: 'border',
197
+ },
198
+ },
199
+ upsell: {
200
+ emphasis: {
201
+ $value: {
202
+ color: '{borderColor.upsell.emphasis}',
203
+ style: 'solid',
204
+ width: '{borderWidth.default}',
205
+ },
206
+ $type: 'border',
207
+ },
208
+ muted: {
209
+ $value: {
210
+ color: '{borderColor.upsell.muted}',
211
+ style: 'solid',
212
+ width: '{borderWidth.default}',
213
+ },
214
+ $type: 'border',
215
+ },
216
+ },
217
+ sponsors: {
218
+ emphasis: {
219
+ $value: {
220
+ color: '{borderColor.sponsors.emphasis}',
221
+ style: 'solid',
222
+ width: '{borderWidth.default}',
223
+ },
224
+ $type: 'border',
225
+ },
226
+ muted: {
227
+ $value: {
228
+ color: '{borderColor.sponsors.muted}',
229
+ style: 'solid',
230
+ width: '{borderWidth.default}',
231
+ },
232
+ $type: 'border',
233
+ },
234
+ },
235
+ },
236
+ }
@@ -833,7 +833,6 @@
833
833
  $extensions: {
834
834
  'org.primer.figma': {
835
835
  collection: 'mode',
836
-
837
836
  group: 'component (internal)',
838
837
  scopes: ['borderColor'],
839
838
  },
@@ -0,0 +1,115 @@
1
+ {
2
+ boxShadow: {
3
+ thin: {
4
+ $value: 'inset 0 0 0 {borderWidth.thin}',
5
+ $description: 'Thin shadow for borders',
6
+ $type: 'string',
7
+ },
8
+ thick: {
9
+ $value: 'inset 0 0 0 {borderWidth.thick}',
10
+ $type: 'string',
11
+ },
12
+ thicker: {
13
+ $value: 'inset 0 0 0 {borderWidth.thicker}',
14
+ $type: 'string',
15
+ },
16
+ },
17
+ borderWidth: {
18
+ default: {
19
+ $value: '{borderWidth.thin}',
20
+ $type: 'dimension',
21
+ },
22
+ thin: {
23
+ $value: '1px',
24
+ $type: 'dimension',
25
+ },
26
+ thick: {
27
+ $value: '2px',
28
+ $type: 'dimension',
29
+ },
30
+ thicker: {
31
+ $value: '4px',
32
+ $type: 'dimension',
33
+ },
34
+ },
35
+ borderRadius: {
36
+ small: {
37
+ $value: '3px',
38
+ $type: 'dimension',
39
+ $extensions: {
40
+ 'org.primer.figma': {
41
+ collection: 'functional/size',
42
+ scopes: ['radius'],
43
+ codeSyntax: {
44
+ web: 'var(--borderRadius-small) /* utility class: .rounded-1 */',
45
+ },
46
+ },
47
+ },
48
+ },
49
+ medium: {
50
+ $value: '6px',
51
+ $type: 'dimension',
52
+ $extensions: {
53
+ 'org.primer.figma': {
54
+ collection: 'functional/size',
55
+ scopes: ['radius'],
56
+ codeSyntax: {
57
+ web: 'var(--borderRadius-medium) /* utility class: .rounded-2 */',
58
+ },
59
+ },
60
+ },
61
+ },
62
+ large: {
63
+ $value: '12px',
64
+ $type: 'dimension',
65
+ $extensions: {
66
+ 'org.primer.figma': {
67
+ collection: 'functional/size',
68
+ scopes: ['radius'],
69
+ codeSyntax: {
70
+ web: 'var(--borderRadius-large) /* utility class: .rounded-3 */',
71
+ },
72
+ },
73
+ },
74
+ },
75
+ full: {
76
+ $value: '9999px',
77
+ $type: 'dimension',
78
+ $description: 'Use this border radius for pill shaped elements',
79
+ $extensions: {
80
+ 'org.primer.figma': {
81
+ collection: 'functional/size',
82
+ scopes: ['radius'],
83
+ codeSyntax: {
84
+ web: 'var(--borderRadius-full) /* utility class: .circle */',
85
+ },
86
+ },
87
+ },
88
+ },
89
+ default: {
90
+ $value: '{borderRadius.medium}',
91
+ $type: 'dimension',
92
+ $extensions: {
93
+ 'org.primer.figma': {
94
+ collection: 'functional/size',
95
+ scopes: ['radius'],
96
+ codeSyntax: {
97
+ web: 'var(--borderRadius-default) /* utility class: .rounded-2 */',
98
+ },
99
+ },
100
+ },
101
+ },
102
+ },
103
+ outline: {
104
+ focus: {
105
+ offset: {
106
+ $value: '-2px',
107
+ $type: 'dimension',
108
+ },
109
+ width: {
110
+ $value: '2px',
111
+ $type: 'dimension',
112
+ },
113
+ },
114
+ },
115
+ }