@primer/primitives 7.17.0-rc.ad176f0c → 7.17.0-rc.be58e800

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.
@@ -20,7 +20,7 @@
20
20
  --text-title-size-large: 2rem;
21
21
  --text-display-lineHeight: 1.4;
22
22
  --text-display-size: 2.5rem;
23
- --text-display-lineBoxHeight: 3.5rem;
23
+ --text-display-lineBoxHeight: 1.4;
24
24
  --fontStack-monospace: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
25
25
  --fontStack-sansSerif: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
26
26
  --fontStack-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
@@ -75,13 +75,31 @@
75
75
  "path": ["fontStack", "monospace"]
76
76
  },
77
77
  "text-display-lineBoxHeight": {
78
- "value": "3.5rem",
79
- "$type": "dimension",
78
+ "value": 1.4,
79
+ "$type": "number",
80
+ "$extensions": {
81
+ "org.primer.data": {
82
+ "fontSize": 40
83
+ },
84
+ "org.primer.figma": {
85
+ "collection": "typography",
86
+ "scopes": ["all"]
87
+ }
88
+ },
80
89
  "filePath": "src/tokens/functional/typography/typography.json",
81
90
  "isSource": true,
82
91
  "original": {
83
- "value": "56px",
84
- "$type": "dimension"
92
+ "value": 1.4,
93
+ "$type": "number",
94
+ "$extensions": {
95
+ "org.primer.data": {
96
+ "fontSize": 40
97
+ },
98
+ "org.primer.figma": {
99
+ "collection": "typography",
100
+ "scopes": ["all"]
101
+ }
102
+ }
85
103
  },
86
104
  "name": "text-display-lineBoxHeight",
87
105
  "attributes": {},
@@ -103,11 +121,29 @@
103
121
  "text-display-lineHeight": {
104
122
  "value": 1.4,
105
123
  "$type": "number",
124
+ "$extensions": {
125
+ "org.primer.data": {
126
+ "fontSize": 40
127
+ },
128
+ "org.primer.figma": {
129
+ "collection": "typography",
130
+ "scopes": ["all"]
131
+ }
132
+ },
106
133
  "filePath": "src/tokens/functional/typography/typography.json",
107
134
  "isSource": true,
108
135
  "original": {
109
136
  "value": 1.4,
110
- "$type": "number"
137
+ "$type": "number",
138
+ "$extensions": {
139
+ "org.primer.data": {
140
+ "fontSize": 40
141
+ },
142
+ "org.primer.figma": {
143
+ "collection": "typography",
144
+ "scopes": ["all"]
145
+ }
146
+ }
111
147
  },
112
148
  "name": "text-display-lineHeight",
113
149
  "attributes": {},
@@ -188,11 +224,29 @@
188
224
  "text-title-lineHeight-large": {
189
225
  "value": 1.5,
190
226
  "$type": "number",
227
+ "$extensions": {
228
+ "org.primer.data": {
229
+ "fontSize": 32
230
+ },
231
+ "org.primer.figma": {
232
+ "collection": "typography",
233
+ "scopes": ["all"]
234
+ }
235
+ },
191
236
  "filePath": "src/tokens/functional/typography/typography.json",
192
237
  "isSource": true,
193
238
  "original": {
194
239
  "value": 1.5,
195
- "$type": "number"
240
+ "$type": "number",
241
+ "$extensions": {
242
+ "org.primer.data": {
243
+ "fontSize": 32
244
+ },
245
+ "org.primer.figma": {
246
+ "collection": "typography",
247
+ "scopes": ["all"]
248
+ }
249
+ }
196
250
  },
197
251
  "name": "text-title-lineHeight-large",
198
252
  "attributes": {},
@@ -201,11 +255,29 @@
201
255
  "text-title-lineHeight-medium": {
202
256
  "value": 1.6,
203
257
  "$type": "number",
258
+ "$extensions": {
259
+ "org.primer.data": {
260
+ "fontSize": 20
261
+ },
262
+ "org.primer.figma": {
263
+ "collection": "typography",
264
+ "scopes": ["all"]
265
+ }
266
+ },
204
267
  "filePath": "src/tokens/functional/typography/typography.json",
205
268
  "isSource": true,
206
269
  "original": {
207
270
  "value": 1.6,
208
- "$type": "number"
271
+ "$type": "number",
272
+ "$extensions": {
273
+ "org.primer.data": {
274
+ "fontSize": 20
275
+ },
276
+ "org.primer.figma": {
277
+ "collection": "typography",
278
+ "scopes": ["all"]
279
+ }
280
+ }
209
281
  },
210
282
  "name": "text-title-lineHeight-medium",
211
283
  "attributes": {},
@@ -214,11 +286,29 @@
214
286
  "text-title-lineHeight-small": {
215
287
  "value": 1.5,
216
288
  "$type": "number",
289
+ "$extensions": {
290
+ "org.primer.data": {
291
+ "fontSize": 16
292
+ },
293
+ "org.primer.figma": {
294
+ "collection": "typography",
295
+ "scopes": ["all"]
296
+ }
297
+ },
217
298
  "filePath": "src/tokens/functional/typography/typography.json",
218
299
  "isSource": true,
219
300
  "original": {
220
301
  "value": 1.5,
221
- "$type": "number"
302
+ "$type": "number",
303
+ "$extensions": {
304
+ "org.primer.data": {
305
+ "fontSize": 16
306
+ },
307
+ "org.primer.figma": {
308
+ "collection": "typography",
309
+ "scopes": ["all"]
310
+ }
311
+ }
222
312
  },
223
313
  "name": "text-title-lineHeight-small",
224
314
  "attributes": {},
@@ -424,11 +514,29 @@
424
514
  "text-body-lineHeight-large": {
425
515
  "value": 1.5,
426
516
  "$type": "number",
517
+ "$extensions": {
518
+ "org.primer.data": {
519
+ "fontSize": 16
520
+ },
521
+ "org.primer.figma": {
522
+ "collection": "typography",
523
+ "scopes": ["all"]
524
+ }
525
+ },
427
526
  "filePath": "src/tokens/functional/typography/typography.json",
428
527
  "isSource": true,
429
528
  "original": {
430
529
  "value": 1.5,
431
- "$type": "number"
530
+ "$type": "number",
531
+ "$extensions": {
532
+ "org.primer.data": {
533
+ "fontSize": 16
534
+ },
535
+ "org.primer.figma": {
536
+ "collection": "typography",
537
+ "scopes": ["all"]
538
+ }
539
+ }
432
540
  },
433
541
  "name": "text-body-lineHeight-large",
434
542
  "attributes": {},
@@ -437,11 +545,29 @@
437
545
  "text-body-lineHeight-medium": {
438
546
  "value": 1.4285,
439
547
  "$type": "number",
548
+ "$extensions": {
549
+ "org.primer.data": {
550
+ "fontSize": 14
551
+ },
552
+ "org.primer.figma": {
553
+ "collection": "typography",
554
+ "scopes": ["all"]
555
+ }
556
+ },
440
557
  "filePath": "src/tokens/functional/typography/typography.json",
441
558
  "isSource": true,
442
559
  "original": {
443
560
  "value": 1.4285,
444
- "$type": "number"
561
+ "$type": "number",
562
+ "$extensions": {
563
+ "org.primer.data": {
564
+ "fontSize": 14
565
+ },
566
+ "org.primer.figma": {
567
+ "collection": "typography",
568
+ "scopes": ["all"]
569
+ }
570
+ }
445
571
  },
446
572
  "name": "text-body-lineHeight-medium",
447
573
  "attributes": {},
@@ -450,11 +576,29 @@
450
576
  "text-body-lineHeight-small": {
451
577
  "value": 1.6666,
452
578
  "$type": "number",
579
+ "$extensions": {
580
+ "org.primer.data": {
581
+ "fontSize": 12
582
+ },
583
+ "org.primer.figma": {
584
+ "collection": "typography",
585
+ "scopes": ["all"]
586
+ }
587
+ },
453
588
  "filePath": "src/tokens/functional/typography/typography.json",
454
589
  "isSource": true,
455
590
  "original": {
456
591
  "value": 1.6666,
457
- "$type": "number"
592
+ "$type": "number",
593
+ "$extensions": {
594
+ "org.primer.data": {
595
+ "fontSize": 12
596
+ },
597
+ "org.primer.figma": {
598
+ "collection": "typography",
599
+ "scopes": ["all"]
600
+ }
601
+ }
458
602
  },
459
603
  "name": "text-body-lineHeight-small",
460
604
  "attributes": {},
@@ -549,11 +693,29 @@
549
693
  "text-caption-lineHeight": {
550
694
  "value": 1.3333,
551
695
  "$type": "number",
696
+ "$extensions": {
697
+ "org.primer.data": {
698
+ "fontSize": 12
699
+ },
700
+ "org.primer.figma": {
701
+ "collection": "typography",
702
+ "scopes": ["all"]
703
+ }
704
+ },
552
705
  "filePath": "src/tokens/functional/typography/typography.json",
553
706
  "isSource": true,
554
707
  "original": {
555
708
  "value": 1.3333,
556
- "$type": "number"
709
+ "$type": "number",
710
+ "$extensions": {
711
+ "org.primer.data": {
712
+ "fontSize": 12
713
+ },
714
+ "org.primer.figma": {
715
+ "collection": "typography",
716
+ "scopes": ["all"]
717
+ }
718
+ }
557
719
  },
558
720
  "name": "text-caption-lineHeight",
559
721
  "attributes": {},
@@ -608,11 +770,29 @@
608
770
  "text-codeBlock-lineHeight": {
609
771
  "value": 1.5385,
610
772
  "$type": "number",
773
+ "$extensions": {
774
+ "org.primer.data": {
775
+ "fontSize": 13
776
+ },
777
+ "org.primer.figma": {
778
+ "collection": "typography",
779
+ "scopes": ["all"]
780
+ }
781
+ },
611
782
  "filePath": "src/tokens/functional/typography/typography.json",
612
783
  "isSource": true,
613
784
  "original": {
614
785
  "value": 1.5385,
615
- "$type": "number"
786
+ "$type": "number",
787
+ "$extensions": {
788
+ "org.primer.data": {
789
+ "fontSize": 13
790
+ },
791
+ "org.primer.figma": {
792
+ "collection": "typography",
793
+ "scopes": ["all"]
794
+ }
795
+ }
616
796
  },
617
797
  "name": "text-codeBlock-lineHeight",
618
798
  "attributes": {},
@@ -2,7 +2,7 @@
2
2
  "--fontStack-system": "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
3
3
  "--fontStack-sansSerif": "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
4
4
  "--fontStack-monospace": "ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",
5
- "--text-display-lineBoxHeight": "3.5rem",
5
+ "--text-display-lineBoxHeight": 1.4,
6
6
  "--text-display-size": "2.5rem",
7
7
  "--text-display-lineHeight": 1.4,
8
8
  "--text-display-weight": 500,
@@ -1,4 +1,104 @@
1
1
  [
2
+ {
3
+ "name": "text/codeBlock/lineHeight",
4
+ "value": "20.0005px",
5
+ "type": "FLOAT",
6
+ "refId": "typography/text/codeBlock/lineHeight",
7
+ "collection": "typography",
8
+ "mode": "default",
9
+ "group": "typography",
10
+ "scopes": ["ALL_SCOPES"]
11
+ },
12
+ {
13
+ "name": "text/caption/lineHeight",
14
+ "value": "15.9996px",
15
+ "type": "FLOAT",
16
+ "refId": "typography/text/caption/lineHeight",
17
+ "collection": "typography",
18
+ "mode": "default",
19
+ "group": "typography",
20
+ "scopes": ["ALL_SCOPES"]
21
+ },
22
+ {
23
+ "name": "text/body/lineHeight/small",
24
+ "value": "19.999200000000002px",
25
+ "type": "FLOAT",
26
+ "refId": "typography/text/body/lineHeight/small",
27
+ "collection": "typography",
28
+ "mode": "default",
29
+ "group": "typography",
30
+ "scopes": ["ALL_SCOPES"]
31
+ },
32
+ {
33
+ "name": "text/body/lineHeight/medium",
34
+ "value": "19.999000000000002px",
35
+ "type": "FLOAT",
36
+ "refId": "typography/text/body/lineHeight/medium",
37
+ "collection": "typography",
38
+ "mode": "default",
39
+ "group": "typography",
40
+ "scopes": ["ALL_SCOPES"]
41
+ },
42
+ {
43
+ "name": "text/body/lineHeight/large",
44
+ "value": "24px",
45
+ "type": "FLOAT",
46
+ "refId": "typography/text/body/lineHeight/large",
47
+ "collection": "typography",
48
+ "mode": "default",
49
+ "group": "typography",
50
+ "scopes": ["ALL_SCOPES"]
51
+ },
52
+ {
53
+ "name": "text/title/lineHeight/small",
54
+ "value": "24px",
55
+ "type": "FLOAT",
56
+ "refId": "typography/text/title/lineHeight/small",
57
+ "collection": "typography",
58
+ "mode": "default",
59
+ "group": "typography",
60
+ "scopes": ["ALL_SCOPES"]
61
+ },
62
+ {
63
+ "name": "text/title/lineHeight/medium",
64
+ "value": "32px",
65
+ "type": "FLOAT",
66
+ "refId": "typography/text/title/lineHeight/medium",
67
+ "collection": "typography",
68
+ "mode": "default",
69
+ "group": "typography",
70
+ "scopes": ["ALL_SCOPES"]
71
+ },
72
+ {
73
+ "name": "text/title/lineHeight/large",
74
+ "value": "48px",
75
+ "type": "FLOAT",
76
+ "refId": "typography/text/title/lineHeight/large",
77
+ "collection": "typography",
78
+ "mode": "default",
79
+ "group": "typography",
80
+ "scopes": ["ALL_SCOPES"]
81
+ },
82
+ {
83
+ "name": "text/display/lineHeight",
84
+ "value": "56px",
85
+ "type": "FLOAT",
86
+ "refId": "typography/text/display/lineHeight",
87
+ "collection": "typography",
88
+ "mode": "default",
89
+ "group": "typography",
90
+ "scopes": ["ALL_SCOPES"]
91
+ },
92
+ {
93
+ "name": "text/display/lineBoxHeight",
94
+ "value": "56px",
95
+ "type": "FLOAT",
96
+ "refId": "typography/text/display/lineBoxHeight",
97
+ "collection": "typography",
98
+ "mode": "default",
99
+ "group": "typography",
100
+ "scopes": ["ALL_SCOPES"]
101
+ },
2
102
  {
3
103
  "name": "fontStack/monospace",
4
104
  "value": "SF Mono",
@@ -75,13 +75,31 @@
75
75
  "path": ["fontStack", "monospace"]
76
76
  },
77
77
  "text-display-lineBoxHeight": {
78
- "value": ["3.5rem", "56px"],
79
- "$type": "dimension",
78
+ "value": 1.4,
79
+ "$type": "number",
80
+ "$extensions": {
81
+ "org.primer.data": {
82
+ "fontSize": 40
83
+ },
84
+ "org.primer.figma": {
85
+ "collection": "typography",
86
+ "scopes": ["all"]
87
+ }
88
+ },
80
89
  "filePath": "src/tokens/functional/typography/typography.json",
81
90
  "isSource": true,
82
91
  "original": {
83
- "value": "56px",
84
- "$type": "dimension"
92
+ "value": 1.4,
93
+ "$type": "number",
94
+ "$extensions": {
95
+ "org.primer.data": {
96
+ "fontSize": 40
97
+ },
98
+ "org.primer.figma": {
99
+ "collection": "typography",
100
+ "scopes": ["all"]
101
+ }
102
+ }
85
103
  },
86
104
  "name": "text-display-lineBoxHeight",
87
105
  "attributes": {},
@@ -103,11 +121,29 @@
103
121
  "text-display-lineHeight": {
104
122
  "value": 1.4,
105
123
  "$type": "number",
124
+ "$extensions": {
125
+ "org.primer.data": {
126
+ "fontSize": 40
127
+ },
128
+ "org.primer.figma": {
129
+ "collection": "typography",
130
+ "scopes": ["all"]
131
+ }
132
+ },
106
133
  "filePath": "src/tokens/functional/typography/typography.json",
107
134
  "isSource": true,
108
135
  "original": {
109
136
  "value": 1.4,
110
- "$type": "number"
137
+ "$type": "number",
138
+ "$extensions": {
139
+ "org.primer.data": {
140
+ "fontSize": 40
141
+ },
142
+ "org.primer.figma": {
143
+ "collection": "typography",
144
+ "scopes": ["all"]
145
+ }
146
+ }
111
147
  },
112
148
  "name": "text-display-lineHeight",
113
149
  "attributes": {},
@@ -188,11 +224,29 @@
188
224
  "text-title-lineHeight-large": {
189
225
  "value": 1.5,
190
226
  "$type": "number",
227
+ "$extensions": {
228
+ "org.primer.data": {
229
+ "fontSize": 32
230
+ },
231
+ "org.primer.figma": {
232
+ "collection": "typography",
233
+ "scopes": ["all"]
234
+ }
235
+ },
191
236
  "filePath": "src/tokens/functional/typography/typography.json",
192
237
  "isSource": true,
193
238
  "original": {
194
239
  "value": 1.5,
195
- "$type": "number"
240
+ "$type": "number",
241
+ "$extensions": {
242
+ "org.primer.data": {
243
+ "fontSize": 32
244
+ },
245
+ "org.primer.figma": {
246
+ "collection": "typography",
247
+ "scopes": ["all"]
248
+ }
249
+ }
196
250
  },
197
251
  "name": "text-title-lineHeight-large",
198
252
  "attributes": {},
@@ -201,11 +255,29 @@
201
255
  "text-title-lineHeight-medium": {
202
256
  "value": 1.6,
203
257
  "$type": "number",
258
+ "$extensions": {
259
+ "org.primer.data": {
260
+ "fontSize": 20
261
+ },
262
+ "org.primer.figma": {
263
+ "collection": "typography",
264
+ "scopes": ["all"]
265
+ }
266
+ },
204
267
  "filePath": "src/tokens/functional/typography/typography.json",
205
268
  "isSource": true,
206
269
  "original": {
207
270
  "value": 1.6,
208
- "$type": "number"
271
+ "$type": "number",
272
+ "$extensions": {
273
+ "org.primer.data": {
274
+ "fontSize": 20
275
+ },
276
+ "org.primer.figma": {
277
+ "collection": "typography",
278
+ "scopes": ["all"]
279
+ }
280
+ }
209
281
  },
210
282
  "name": "text-title-lineHeight-medium",
211
283
  "attributes": {},
@@ -214,11 +286,29 @@
214
286
  "text-title-lineHeight-small": {
215
287
  "value": 1.5,
216
288
  "$type": "number",
289
+ "$extensions": {
290
+ "org.primer.data": {
291
+ "fontSize": 16
292
+ },
293
+ "org.primer.figma": {
294
+ "collection": "typography",
295
+ "scopes": ["all"]
296
+ }
297
+ },
217
298
  "filePath": "src/tokens/functional/typography/typography.json",
218
299
  "isSource": true,
219
300
  "original": {
220
301
  "value": 1.5,
221
- "$type": "number"
302
+ "$type": "number",
303
+ "$extensions": {
304
+ "org.primer.data": {
305
+ "fontSize": 16
306
+ },
307
+ "org.primer.figma": {
308
+ "collection": "typography",
309
+ "scopes": ["all"]
310
+ }
311
+ }
222
312
  },
223
313
  "name": "text-title-lineHeight-small",
224
314
  "attributes": {},
@@ -424,11 +514,29 @@
424
514
  "text-body-lineHeight-large": {
425
515
  "value": 1.5,
426
516
  "$type": "number",
517
+ "$extensions": {
518
+ "org.primer.data": {
519
+ "fontSize": 16
520
+ },
521
+ "org.primer.figma": {
522
+ "collection": "typography",
523
+ "scopes": ["all"]
524
+ }
525
+ },
427
526
  "filePath": "src/tokens/functional/typography/typography.json",
428
527
  "isSource": true,
429
528
  "original": {
430
529
  "value": 1.5,
431
- "$type": "number"
530
+ "$type": "number",
531
+ "$extensions": {
532
+ "org.primer.data": {
533
+ "fontSize": 16
534
+ },
535
+ "org.primer.figma": {
536
+ "collection": "typography",
537
+ "scopes": ["all"]
538
+ }
539
+ }
432
540
  },
433
541
  "name": "text-body-lineHeight-large",
434
542
  "attributes": {},
@@ -437,11 +545,29 @@
437
545
  "text-body-lineHeight-medium": {
438
546
  "value": 1.4285,
439
547
  "$type": "number",
548
+ "$extensions": {
549
+ "org.primer.data": {
550
+ "fontSize": 14
551
+ },
552
+ "org.primer.figma": {
553
+ "collection": "typography",
554
+ "scopes": ["all"]
555
+ }
556
+ },
440
557
  "filePath": "src/tokens/functional/typography/typography.json",
441
558
  "isSource": true,
442
559
  "original": {
443
560
  "value": 1.4285,
444
- "$type": "number"
561
+ "$type": "number",
562
+ "$extensions": {
563
+ "org.primer.data": {
564
+ "fontSize": 14
565
+ },
566
+ "org.primer.figma": {
567
+ "collection": "typography",
568
+ "scopes": ["all"]
569
+ }
570
+ }
445
571
  },
446
572
  "name": "text-body-lineHeight-medium",
447
573
  "attributes": {},
@@ -450,11 +576,29 @@
450
576
  "text-body-lineHeight-small": {
451
577
  "value": 1.6666,
452
578
  "$type": "number",
579
+ "$extensions": {
580
+ "org.primer.data": {
581
+ "fontSize": 12
582
+ },
583
+ "org.primer.figma": {
584
+ "collection": "typography",
585
+ "scopes": ["all"]
586
+ }
587
+ },
453
588
  "filePath": "src/tokens/functional/typography/typography.json",
454
589
  "isSource": true,
455
590
  "original": {
456
591
  "value": 1.6666,
457
- "$type": "number"
592
+ "$type": "number",
593
+ "$extensions": {
594
+ "org.primer.data": {
595
+ "fontSize": 12
596
+ },
597
+ "org.primer.figma": {
598
+ "collection": "typography",
599
+ "scopes": ["all"]
600
+ }
601
+ }
458
602
  },
459
603
  "name": "text-body-lineHeight-small",
460
604
  "attributes": {},
@@ -549,11 +693,29 @@
549
693
  "text-caption-lineHeight": {
550
694
  "value": 1.3333,
551
695
  "$type": "number",
696
+ "$extensions": {
697
+ "org.primer.data": {
698
+ "fontSize": 12
699
+ },
700
+ "org.primer.figma": {
701
+ "collection": "typography",
702
+ "scopes": ["all"]
703
+ }
704
+ },
552
705
  "filePath": "src/tokens/functional/typography/typography.json",
553
706
  "isSource": true,
554
707
  "original": {
555
708
  "value": 1.3333,
556
- "$type": "number"
709
+ "$type": "number",
710
+ "$extensions": {
711
+ "org.primer.data": {
712
+ "fontSize": 12
713
+ },
714
+ "org.primer.figma": {
715
+ "collection": "typography",
716
+ "scopes": ["all"]
717
+ }
718
+ }
557
719
  },
558
720
  "name": "text-caption-lineHeight",
559
721
  "attributes": {},
@@ -608,11 +770,29 @@
608
770
  "text-codeBlock-lineHeight": {
609
771
  "value": 1.5385,
610
772
  "$type": "number",
773
+ "$extensions": {
774
+ "org.primer.data": {
775
+ "fontSize": 13
776
+ },
777
+ "org.primer.figma": {
778
+ "collection": "typography",
779
+ "scopes": ["all"]
780
+ }
781
+ },
611
782
  "filePath": "src/tokens/functional/typography/typography.json",
612
783
  "isSource": true,
613
784
  "original": {
614
785
  "value": 1.5385,
615
- "$type": "number"
786
+ "$type": "number",
787
+ "$extensions": {
788
+ "org.primer.data": {
789
+ "fontSize": 13
790
+ },
791
+ "org.primer.figma": {
792
+ "collection": "typography",
793
+ "scopes": ["all"]
794
+ }
795
+ }
616
796
  },
617
797
  "name": "text-codeBlock-lineHeight",
618
798
  "attributes": {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/primitives",
3
- "version": "7.17.0-rc.ad176f0c",
3
+ "version": "7.17.0-rc.be58e800",
4
4
  "description": "Typography, spacing, and color primitives for Primer design system",
5
5
  "files": [
6
6
  "dist",
@@ -28,6 +28,7 @@ export const figma: PlatformInitializer = (outputFile, prefix, buildPath, option
28
28
  // 'name/pathToSlashNotation',
29
29
  'figma/attributes',
30
30
  'fontFamily/figma',
31
+ 'float/pixel',
31
32
  'dimension/pixelUnitless',
32
33
  // 'border/figma',
33
34
  // 'typography/figma',
@@ -2,10 +2,27 @@ import {z} from 'zod'
2
2
  import {baseToken} from './baseToken'
3
3
  import {referenceValue} from './referenceValue'
4
4
  import {tokenType} from './tokenType'
5
+ import {scopes} from './scopes'
6
+ import {collection} from './collections'
5
7
 
6
8
  export const numberToken = baseToken
7
9
  .extend({
8
10
  $value: z.union([z.number(), referenceValue]),
9
11
  $type: tokenType('number'),
12
+ $extensions: z
13
+ .object({
14
+ 'org.primer.data': z
15
+ .object({
16
+ fontSize: z.number().optional(),
17
+ })
18
+ .optional(),
19
+ 'org.primer.figma': z
20
+ .object({
21
+ collection: collection(['typography']).optional(),
22
+ scopes: scopes(['all']).optional(),
23
+ })
24
+ .optional(),
25
+ })
26
+ .optional(),
10
27
  })
11
28
  .strict()
@@ -34,8 +34,17 @@
34
34
  "text": {
35
35
  "display": {
36
36
  "lineBoxHeight": {
37
- "$value": "56px",
38
- "$type": "dimension"
37
+ "$value": 1.4,
38
+ "$type": "number",
39
+ "$extensions": {
40
+ "org.primer.data": {
41
+ "fontSize": 40
42
+ },
43
+ "org.primer.figma": {
44
+ "collection": "typography",
45
+ "scopes": ["all"]
46
+ }
47
+ }
39
48
  },
40
49
  "size": {
41
50
  "$value": "40px",
@@ -43,7 +52,16 @@
43
52
  },
44
53
  "lineHeight": {
45
54
  "$value": 1.4,
46
- "$type": "number"
55
+ "$type": "number",
56
+ "$extensions": {
57
+ "org.primer.data": {
58
+ "fontSize": 40
59
+ },
60
+ "org.primer.figma": {
61
+ "collection": "typography",
62
+ "scopes": ["all"]
63
+ }
64
+ }
47
65
  },
48
66
  "weight": {
49
67
  "$value": "{base.text.weight.medium}",
@@ -78,15 +96,42 @@
78
96
  "lineHeight": {
79
97
  "large": {
80
98
  "$value": 1.5,
81
- "$type": "number"
99
+ "$type": "number",
100
+ "$extensions": {
101
+ "org.primer.data": {
102
+ "fontSize": 32
103
+ },
104
+ "org.primer.figma": {
105
+ "collection": "typography",
106
+ "scopes": ["all"]
107
+ }
108
+ }
82
109
  },
83
110
  "medium": {
84
111
  "$value": 1.6,
85
- "$type": "number"
112
+ "$type": "number",
113
+ "$extensions": {
114
+ "org.primer.data": {
115
+ "fontSize": 20
116
+ },
117
+ "org.primer.figma": {
118
+ "collection": "typography",
119
+ "scopes": ["all"]
120
+ }
121
+ }
86
122
  },
87
123
  "small": {
88
124
  "$value": 1.5,
89
- "$type": "number"
125
+ "$type": "number",
126
+ "$extensions": {
127
+ "org.primer.data": {
128
+ "fontSize": 16
129
+ },
130
+ "org.primer.figma": {
131
+ "collection": "typography",
132
+ "scopes": ["all"]
133
+ }
134
+ }
90
135
  }
91
136
  },
92
137
  "weight": {
@@ -178,15 +223,42 @@
178
223
  "lineHeight": {
179
224
  "large": {
180
225
  "$value": 1.5,
181
- "$type": "number"
226
+ "$type": "number",
227
+ "$extensions": {
228
+ "org.primer.data": {
229
+ "fontSize": 16
230
+ },
231
+ "org.primer.figma": {
232
+ "collection": "typography",
233
+ "scopes": ["all"]
234
+ }
235
+ }
182
236
  },
183
237
  "medium": {
184
238
  "$value": 1.4285,
185
- "$type": "number"
239
+ "$type": "number",
240
+ "$extensions": {
241
+ "org.primer.data": {
242
+ "fontSize": 14
243
+ },
244
+ "org.primer.figma": {
245
+ "collection": "typography",
246
+ "scopes": ["all"]
247
+ }
248
+ }
186
249
  },
187
250
  "small": {
188
251
  "$value": 1.6666,
189
- "$type": "number"
252
+ "$type": "number",
253
+ "$extensions": {
254
+ "org.primer.data": {
255
+ "fontSize": 12
256
+ },
257
+ "org.primer.figma": {
258
+ "collection": "typography",
259
+ "scopes": ["all"]
260
+ }
261
+ }
190
262
  }
191
263
  },
192
264
  "weight": {
@@ -233,7 +305,16 @@
233
305
  },
234
306
  "lineHeight": {
235
307
  "$value": 1.3333,
236
- "$type": "number"
308
+ "$type": "number",
309
+ "$extensions": {
310
+ "org.primer.data": {
311
+ "fontSize": 12
312
+ },
313
+ "org.primer.figma": {
314
+ "collection": "typography",
315
+ "scopes": ["all"]
316
+ }
317
+ }
237
318
  },
238
319
  "weight": {
239
320
  "$value": "{base.text.weight.normal}",
@@ -257,7 +338,16 @@
257
338
  },
258
339
  "lineHeight": {
259
340
  "$value": 1.5385,
260
- "$type": "number"
341
+ "$type": "number",
342
+ "$extensions": {
343
+ "org.primer.data": {
344
+ "fontSize": 13
345
+ },
346
+ "org.primer.figma": {
347
+ "collection": "typography",
348
+ "scopes": ["all"]
349
+ }
350
+ }
261
351
  },
262
352
  "weight": {
263
353
  "$value": "{base.text.weight.normal}",
@@ -17,7 +17,7 @@ export const convertFloatToPixel = (token: StyleDictionary.TransformedToken) =>
17
17
  // convert value
18
18
  const convertedValue = token.$extensions?.['org.primer.data']?.fontSize * token.value
19
19
  // return converted value
20
- return `${convertedValue}px`
20
+ return convertedValue === 0 ? 0 : `${convertedValue}px`
21
21
  }
22
22
  /**
23
23
  * @description converts a float value to a pixel value based on the provided fontSize on the tokersn extension