@servicetitan/hammer-token 2.5.2 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/CHANGELOG.md +52 -2
  2. package/README.md +332 -0
  3. package/build/web/core/component-variables.scss +1088 -131
  4. package/build/web/core/component.d.ts +558 -0
  5. package/build/web/core/component.js +6685 -249
  6. package/build/web/core/component.scss +557 -69
  7. package/build/web/core/css-utils/a2-border.css +23 -51
  8. package/build/web/core/css-utils/a2-color.css +221 -233
  9. package/build/web/core/css-utils/a2-font.css +1 -29
  10. package/build/web/core/css-utils/a2-spacing.css +238 -483
  11. package/build/web/core/css-utils/a2-utils.css +496 -781
  12. package/build/web/core/css-utils/border.css +23 -51
  13. package/build/web/core/css-utils/color.css +221 -233
  14. package/build/web/core/css-utils/font.css +1 -29
  15. package/build/web/core/css-utils/spacing.css +238 -483
  16. package/build/web/core/css-utils/utils.css +496 -781
  17. package/build/web/core/index.d.ts +6 -0
  18. package/build/web/core/index.js +1 -1
  19. package/build/web/core/primitive-variables.scss +148 -65
  20. package/build/web/core/primitive.d.ts +209 -0
  21. package/build/web/core/primitive.js +779 -61
  22. package/build/web/core/primitive.scss +207 -124
  23. package/build/web/core/semantic-variables.scss +363 -245
  24. package/build/web/core/semantic.d.ts +221 -0
  25. package/build/web/core/semantic.js +1592 -347
  26. package/build/web/core/semantic.scss +219 -140
  27. package/build/web/index.d.ts +3 -4
  28. package/build/web/types.d.ts +17 -0
  29. package/config.js +121 -496
  30. package/eslint.config.mjs +11 -1
  31. package/package.json +15 -5
  32. package/src/global/primitive/breakpoint.tokens.json +54 -0
  33. package/src/global/primitive/color.tokens.json +1092 -0
  34. package/src/global/primitive/duration.tokens.json +44 -0
  35. package/src/global/primitive/font.tokens.json +151 -0
  36. package/src/global/primitive/radius.tokens.json +94 -0
  37. package/src/global/primitive/size.tokens.json +174 -0
  38. package/src/global/primitive/transition.tokens.json +32 -0
  39. package/src/theme/core/background.tokens.json +1312 -0
  40. package/src/theme/core/border.tokens.json +192 -0
  41. package/src/theme/core/chart.tokens.json +982 -0
  42. package/src/theme/core/component/ai-mark.tokens.json +20 -0
  43. package/src/theme/core/component/alert.tokens.json +261 -0
  44. package/src/theme/core/component/announcement.tokens.json +460 -0
  45. package/src/theme/core/component/avatar.tokens.json +137 -0
  46. package/src/theme/core/component/badge.tokens.json +42 -0
  47. package/src/theme/core/component/breadcrumb.tokens.json +42 -0
  48. package/src/theme/core/component/button-toggle.tokens.json +428 -0
  49. package/src/theme/core/component/button.tokens.json +941 -0
  50. package/src/theme/core/component/calendar.tokens.json +391 -0
  51. package/src/theme/core/component/card.tokens.json +107 -0
  52. package/src/theme/core/component/checkbox.tokens.json +631 -0
  53. package/src/theme/core/component/chip.tokens.json +169 -0
  54. package/src/theme/core/component/combobox.tokens.json +269 -0
  55. package/src/theme/core/component/details.tokens.json +152 -0
  56. package/src/theme/core/component/dialog.tokens.json +87 -0
  57. package/src/theme/core/component/divider.tokens.json +23 -0
  58. package/src/theme/core/component/dnd.tokens.json +208 -0
  59. package/src/theme/core/component/drawer.tokens.json +61 -0
  60. package/src/theme/core/component/drilldown.tokens.json +61 -0
  61. package/src/theme/core/component/edit-card.tokens.json +381 -0
  62. package/src/theme/core/component/field-label.tokens.json +42 -0
  63. package/src/theme/core/component/field-message.tokens.json +65 -0
  64. package/src/theme/core/component/icon.tokens.json +42 -0
  65. package/src/theme/core/component/link.tokens.json +108 -0
  66. package/src/theme/core/component/list-view.tokens.json +82 -0
  67. package/src/theme/core/component/listbox.tokens.json +283 -0
  68. package/src/theme/core/component/menu.tokens.json +230 -0
  69. package/src/theme/core/component/overflow.tokens.json +84 -0
  70. package/src/theme/core/component/page.tokens.json +377 -0
  71. package/src/theme/core/component/pagination.tokens.json +63 -0
  72. package/src/theme/core/component/popover.tokens.json +122 -0
  73. package/src/theme/core/component/progress-bar.tokens.json +133 -0
  74. package/src/theme/core/component/radio.tokens.json +631 -0
  75. package/src/theme/core/component/segmented-control.tokens.json +175 -0
  76. package/src/theme/core/component/select-card.tokens.json +943 -0
  77. package/src/theme/core/component/side-nav.tokens.json +349 -0
  78. package/src/theme/core/component/skeleton.tokens.json +42 -0
  79. package/src/theme/core/component/spinner.tokens.json +96 -0
  80. package/src/theme/core/component/status-icon.tokens.json +164 -0
  81. package/src/theme/core/component/stepper.tokens.json +484 -0
  82. package/src/theme/core/component/switch.tokens.json +285 -0
  83. package/src/theme/core/component/tab.tokens.json +192 -0
  84. package/src/theme/core/component/text-field.tokens.json +160 -0
  85. package/src/theme/core/component/text.tokens.json +59 -0
  86. package/src/theme/core/component/toast.tokens.json +343 -0
  87. package/src/theme/core/component/toolbar.tokens.json +114 -0
  88. package/src/theme/core/component/tooltip.tokens.json +61 -0
  89. package/src/theme/core/focus.tokens.json +56 -0
  90. package/src/theme/core/foreground.tokens.json +416 -0
  91. package/src/theme/core/gradient.tokens.json +41 -0
  92. package/src/theme/core/opacity.tokens.json +25 -0
  93. package/src/theme/core/shadow.tokens.json +81 -0
  94. package/src/theme/core/status.tokens.json +74 -0
  95. package/src/theme/core/typography.tokens.json +163 -0
  96. package/src/utils/__tests__/css-utils-format-utils.test.js +312 -0
  97. package/src/utils/__tests__/sd-build-configs.test.js +306 -0
  98. package/src/utils/__tests__/sd-formats.test.js +942 -0
  99. package/src/utils/__tests__/sd-transforms.test.js +336 -0
  100. package/src/utils/__tests__/token-helpers.test.js +1160 -0
  101. package/src/utils/copy-css-utils-cli.js +13 -1
  102. package/src/utils/css-utils-format-utils.js +105 -176
  103. package/src/utils/figma/__tests__/sync-gradient.test.js +561 -0
  104. package/src/utils/figma/__tests__/token-conversion.test.js +117 -0
  105. package/src/utils/figma/__tests__/token-resolution.test.js +231 -0
  106. package/src/utils/figma/auth.js +355 -0
  107. package/src/utils/figma/constants.js +22 -0
  108. package/src/utils/figma/errors.js +80 -0
  109. package/src/utils/figma/figma-api.js +1069 -0
  110. package/src/utils/figma/get-token.js +348 -0
  111. package/src/utils/figma/sync-components.js +909 -0
  112. package/src/utils/figma/sync-main.js +692 -0
  113. package/src/utils/figma/sync-orchestration.js +683 -0
  114. package/src/utils/figma/sync-primitives.js +230 -0
  115. package/src/utils/figma/sync-semantic.js +1056 -0
  116. package/src/utils/figma/token-conversion.js +340 -0
  117. package/src/utils/figma/token-parsing.js +186 -0
  118. package/src/utils/figma/token-resolution.js +569 -0
  119. package/src/utils/figma/utils.js +199 -0
  120. package/src/utils/sd-build-configs.js +305 -0
  121. package/src/utils/sd-formats.js +948 -0
  122. package/src/utils/sd-transforms.js +165 -0
  123. package/src/utils/token-helpers.js +848 -0
  124. package/tsconfig.json +18 -0
  125. package/vitest.config.js +17 -0
  126. package/.turbo/turbo-build.log +0 -37
  127. package/build/web/core/raw.js +0 -234
  128. package/src/global/primitive/breakpoint.js +0 -19
  129. package/src/global/primitive/color.js +0 -231
  130. package/src/global/primitive/duration.js +0 -16
  131. package/src/global/primitive/font.js +0 -60
  132. package/src/global/primitive/radius.js +0 -31
  133. package/src/global/primitive/size.js +0 -55
  134. package/src/global/primitive/transition.js +0 -16
  135. package/src/theme/core/background.js +0 -170
  136. package/src/theme/core/border.js +0 -103
  137. package/src/theme/core/charts.js +0 -464
  138. package/src/theme/core/component/button.js +0 -708
  139. package/src/theme/core/component/checkbox.js +0 -405
  140. package/src/theme/core/focus.js +0 -35
  141. package/src/theme/core/foreground.js +0 -148
  142. package/src/theme/core/overlay.js +0 -137
  143. package/src/theme/core/shadow.js +0 -29
  144. package/src/theme/core/status.js +0 -49
  145. package/src/theme/core/typography.js +0 -82
  146. package/type/types.ts +0 -344
@@ -0,0 +1,484 @@
1
+ {
2
+ "stepper": {
3
+ "focus-ring": {
4
+ "color": {
5
+ "$type": "color",
6
+ "$value": "{focus.ring.color.default}",
7
+ "$extensions": {
8
+ "appearance": {
9
+ "light": {
10
+ "$type": "color",
11
+ "$value": "{focus.ring.color.default}"
12
+ },
13
+ "dark": {
14
+ "$type": "color",
15
+ "$value": "{focus.ring.color.default}"
16
+ }
17
+ },
18
+ "com.figma.scopes": ["STROKE_COLOR"]
19
+ }
20
+ }
21
+ },
22
+ "step": {
23
+ "default": {
24
+ "label": {
25
+ "foreground": {
26
+ "color": {
27
+ "$type": "color",
28
+ "$value": "{foreground.color.default}",
29
+ "$extensions": {
30
+ "appearance": {
31
+ "light": {
32
+ "$type": "color",
33
+ "$value": "{foreground.color.default}"
34
+ },
35
+ "dark": {
36
+ "$type": "color",
37
+ "$value": "{foreground.color.default}"
38
+ }
39
+ },
40
+ "com.figma.scopes": ["TEXT_FILL", "SHAPE_FILL"]
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "link": {
46
+ "foreground": {
47
+ "color": {
48
+ "$type": "color",
49
+ "$value": "{foreground.color.primary}",
50
+ "$extensions": {
51
+ "appearance": {
52
+ "light": {
53
+ "$type": "color",
54
+ "$value": "{foreground.color.primary}"
55
+ },
56
+ "dark": {
57
+ "$type": "color",
58
+ "$value": "{foreground.color.primary}"
59
+ }
60
+ },
61
+ "com.figma.scopes": ["TEXT_FILL", "SHAPE_FILL"]
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "background": {
67
+ "color": {
68
+ "$type": "color",
69
+ "$value": "{status.color.info}",
70
+ "$extensions": {
71
+ "appearance": {
72
+ "light": {
73
+ "$type": "color",
74
+ "$value": "{status.color.info}"
75
+ },
76
+ "dark": {
77
+ "$type": "color",
78
+ "$value": "{status.color.info}"
79
+ }
80
+ },
81
+ "com.figma.scopes": ["SHAPE_FILL", "FRAME_FILL", "STROKE_COLOR"]
82
+ }
83
+ }
84
+ },
85
+ "foreground": {
86
+ "color": {
87
+ "$type": "color",
88
+ "$value": "{foreground.color.on.primary}",
89
+ "$extensions": {
90
+ "appearance": {
91
+ "light": {
92
+ "$type": "color",
93
+ "$value": "{foreground.color.on.primary}"
94
+ },
95
+ "dark": {
96
+ "$type": "color",
97
+ "$value": "{foreground.color.on.primary}"
98
+ }
99
+ },
100
+ "com.figma.scopes": ["TEXT_FILL", "SHAPE_FILL"]
101
+ }
102
+ }
103
+ },
104
+ "track": {
105
+ "color": {
106
+ "$type": "color",
107
+ "$value": "{background.color.stronger}",
108
+ "$extensions": {
109
+ "appearance": {
110
+ "light": {
111
+ "$type": "color",
112
+ "$value": "{background.color.stronger}"
113
+ },
114
+ "dark": {
115
+ "$type": "color",
116
+ "$value": "{background.color.stronger}"
117
+ }
118
+ },
119
+ "com.figma.scopes": []
120
+ }
121
+ }
122
+ },
123
+ "circle": {
124
+ "background": {
125
+ "color": {
126
+ "$type": "color",
127
+ "$value": "{background.color.default}",
128
+ "$extensions": {
129
+ "appearance": {
130
+ "light": {
131
+ "$type": "color",
132
+ "$value": "{background.color.default}"
133
+ },
134
+ "dark": {
135
+ "$type": "color",
136
+ "$value": "{background.color.default}"
137
+ }
138
+ },
139
+ "com.figma.scopes": ["SHAPE_FILL", "FRAME_FILL", "STROKE_COLOR"]
140
+ }
141
+ }
142
+ },
143
+ "border": {
144
+ "color": {
145
+ "$type": "color",
146
+ "$value": "{border.color.default}",
147
+ "$extensions": {
148
+ "appearance": {
149
+ "light": {
150
+ "$type": "color",
151
+ "$value": "{border.color.default}"
152
+ },
153
+ "dark": {
154
+ "$type": "color",
155
+ "$value": "{border.color.default}"
156
+ }
157
+ },
158
+ "com.figma.scopes": ["STROKE_COLOR", "SHAPE_FILL", "FRAME_FILL"]
159
+ }
160
+ }
161
+ },
162
+ "icon": {
163
+ "color": {
164
+ "$type": "color",
165
+ "$value": "{foreground.color.on.primary}",
166
+ "$extensions": {
167
+ "appearance": {
168
+ "light": {
169
+ "$type": "color",
170
+ "$value": "{foreground.color.on.primary}"
171
+ },
172
+ "dark": {
173
+ "$type": "color",
174
+ "$value": "{foreground.color.on.primary}"
175
+ }
176
+ },
177
+ "com.figma.scopes": []
178
+ }
179
+ }
180
+ }
181
+ }
182
+ },
183
+ "current": {
184
+ "label": {
185
+ "foreground": {
186
+ "color": {
187
+ "$type": "color",
188
+ "$value": "{foreground.color.default}",
189
+ "$extensions": {
190
+ "appearance": {
191
+ "light": {
192
+ "$type": "color",
193
+ "$value": "{foreground.color.default}"
194
+ },
195
+ "dark": {
196
+ "$type": "color",
197
+ "$value": "{foreground.color.default}"
198
+ }
199
+ },
200
+ "com.figma.scopes": ["TEXT_FILL", "SHAPE_FILL"]
201
+ }
202
+ }
203
+ }
204
+ },
205
+ "background": {
206
+ "color": {
207
+ "$type": "color",
208
+ "$value": "{status.color.info}",
209
+ "$extensions": {
210
+ "appearance": {
211
+ "light": {
212
+ "$type": "color",
213
+ "$value": "{status.color.info}"
214
+ },
215
+ "dark": {
216
+ "$type": "color",
217
+ "$value": "{status.color.info}"
218
+ }
219
+ },
220
+ "com.figma.scopes": ["SHAPE_FILL", "FRAME_FILL", "STROKE_COLOR"]
221
+ }
222
+ }
223
+ },
224
+ "foreground": {
225
+ "color": {
226
+ "$type": "color",
227
+ "$value": "{foreground.color.on.primary}",
228
+ "$extensions": {
229
+ "appearance": {
230
+ "light": {
231
+ "$type": "color",
232
+ "$value": "{foreground.color.on.primary}"
233
+ },
234
+ "dark": {
235
+ "$type": "color",
236
+ "$value": "{foreground.color.on.primary}"
237
+ }
238
+ },
239
+ "com.figma.scopes": ["TEXT_FILL", "SHAPE_FILL"]
240
+ }
241
+ }
242
+ },
243
+ "track": {
244
+ "color": {
245
+ "$type": "color",
246
+ "$value": "{background.color.stronger}",
247
+ "$extensions": {
248
+ "appearance": {
249
+ "light": {
250
+ "$type": "color",
251
+ "$value": "{background.color.stronger}"
252
+ },
253
+ "dark": {
254
+ "$type": "color",
255
+ "$value": "{background.color.stronger}"
256
+ }
257
+ },
258
+ "com.figma.scopes": []
259
+ }
260
+ }
261
+ },
262
+ "circle": {
263
+ "background": {
264
+ "color": {
265
+ "$type": "color",
266
+ "$value": "{background.color.default}",
267
+ "$extensions": {
268
+ "appearance": {
269
+ "light": {
270
+ "$type": "color",
271
+ "$value": "{background.color.default}"
272
+ },
273
+ "dark": {
274
+ "$type": "color",
275
+ "$value": "{background.color.default}"
276
+ }
277
+ },
278
+ "com.figma.scopes": ["SHAPE_FILL", "FRAME_FILL", "STROKE_COLOR"]
279
+ }
280
+ }
281
+ },
282
+ "border": {
283
+ "color": {
284
+ "$type": "color",
285
+ "$value": "{status.color.info}",
286
+ "$extensions": {
287
+ "appearance": {
288
+ "light": {
289
+ "$type": "color",
290
+ "$value": "{status.color.info}"
291
+ },
292
+ "dark": {
293
+ "$type": "color",
294
+ "$value": "{status.color.info}"
295
+ }
296
+ },
297
+ "com.figma.scopes": ["STROKE_COLOR", "SHAPE_FILL", "FRAME_FILL"]
298
+ }
299
+ }
300
+ },
301
+ "icon": {
302
+ "color": {
303
+ "$type": "color",
304
+ "$value": "{foreground.color.on.primary}",
305
+ "$extensions": {
306
+ "appearance": {
307
+ "light": {
308
+ "$type": "color",
309
+ "$value": "{foreground.color.on.primary}"
310
+ },
311
+ "dark": {
312
+ "$type": "color",
313
+ "$value": "{foreground.color.on.primary}"
314
+ }
315
+ },
316
+ "com.figma.scopes": []
317
+ }
318
+ }
319
+ }
320
+ }
321
+ },
322
+ "complete": {
323
+ "label": {
324
+ "foreground": {
325
+ "color": {
326
+ "$type": "color",
327
+ "$value": "{foreground.color.default}",
328
+ "$extensions": {
329
+ "appearance": {
330
+ "light": {
331
+ "$type": "color",
332
+ "$value": "{foreground.color.default}"
333
+ },
334
+ "dark": {
335
+ "$type": "color",
336
+ "$value": "{foreground.color.default}"
337
+ }
338
+ },
339
+ "com.figma.scopes": ["TEXT_FILL", "SHAPE_FILL"]
340
+ }
341
+ }
342
+ }
343
+ },
344
+ "link": {
345
+ "foreground": {
346
+ "color": {
347
+ "$type": "color",
348
+ "$value": "{foreground.color.primary}",
349
+ "$extensions": {
350
+ "appearance": {
351
+ "light": {
352
+ "$type": "color",
353
+ "$value": "{foreground.color.primary}"
354
+ },
355
+ "dark": {
356
+ "$type": "color",
357
+ "$value": "{foreground.color.primary}"
358
+ }
359
+ },
360
+ "com.figma.scopes": ["TEXT_FILL", "SHAPE_FILL"]
361
+ }
362
+ }
363
+ }
364
+ },
365
+ "background": {
366
+ "color": {
367
+ "$type": "color",
368
+ "$value": "{status.color.info}",
369
+ "$extensions": {
370
+ "appearance": {
371
+ "light": {
372
+ "$type": "color",
373
+ "$value": "{status.color.info}"
374
+ },
375
+ "dark": {
376
+ "$type": "color",
377
+ "$value": "{status.color.info}"
378
+ }
379
+ },
380
+ "com.figma.scopes": ["SHAPE_FILL", "FRAME_FILL", "STROKE_COLOR"]
381
+ }
382
+ }
383
+ },
384
+ "foreground": {
385
+ "color": {
386
+ "$type": "color",
387
+ "$value": "{foreground.color.on.primary}",
388
+ "$extensions": {
389
+ "appearance": {
390
+ "light": {
391
+ "$type": "color",
392
+ "$value": "{foreground.color.on.primary}"
393
+ },
394
+ "dark": {
395
+ "$type": "color",
396
+ "$value": "{foreground.color.on.primary}"
397
+ }
398
+ },
399
+ "com.figma.scopes": ["TEXT_FILL", "SHAPE_FILL"]
400
+ }
401
+ }
402
+ },
403
+ "track": {
404
+ "color": {
405
+ "$type": "color",
406
+ "$value": "{background.color.stronger}",
407
+ "$extensions": {
408
+ "appearance": {
409
+ "light": {
410
+ "$type": "color",
411
+ "$value": "{background.color.stronger}"
412
+ },
413
+ "dark": {
414
+ "$type": "color",
415
+ "$value": "{background.color.stronger}"
416
+ }
417
+ },
418
+ "com.figma.scopes": []
419
+ }
420
+ }
421
+ },
422
+ "circle": {
423
+ "background": {
424
+ "color": {
425
+ "$type": "color",
426
+ "$value": "{status.color.info}",
427
+ "$extensions": {
428
+ "appearance": {
429
+ "light": {
430
+ "$type": "color",
431
+ "$value": "{status.color.info}"
432
+ },
433
+ "dark": {
434
+ "$type": "color",
435
+ "$value": "{status.color.info}"
436
+ }
437
+ },
438
+ "com.figma.scopes": ["SHAPE_FILL", "FRAME_FILL", "STROKE_COLOR"]
439
+ }
440
+ }
441
+ },
442
+ "border": {
443
+ "color": {
444
+ "$type": "color",
445
+ "$value": "{status.color.info}",
446
+ "$extensions": {
447
+ "appearance": {
448
+ "light": {
449
+ "$type": "color",
450
+ "$value": "{status.color.info}"
451
+ },
452
+ "dark": {
453
+ "$type": "color",
454
+ "$value": "{status.color.info}"
455
+ }
456
+ },
457
+ "com.figma.scopes": ["STROKE_COLOR", "SHAPE_FILL", "FRAME_FILL"]
458
+ }
459
+ }
460
+ },
461
+ "icon": {
462
+ "color": {
463
+ "$type": "color",
464
+ "$value": "{foreground.color.on.primary}",
465
+ "$extensions": {
466
+ "appearance": {
467
+ "light": {
468
+ "$type": "color",
469
+ "$value": "{foreground.color.on.primary}"
470
+ },
471
+ "dark": {
472
+ "$type": "color",
473
+ "$value": "{foreground.color.on.primary}"
474
+ }
475
+ },
476
+ "com.figma.scopes": []
477
+ }
478
+ }
479
+ }
480
+ }
481
+ }
482
+ }
483
+ }
484
+ }