@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,44 @@
1
+ {
2
+ "duration": {
3
+ "default": {
4
+ "$type": "duration",
5
+ "$value": {
6
+ "value": 200,
7
+ "unit": "ms"
8
+ },
9
+ "$extensions": {
10
+ "com.figma.scopes": []
11
+ }
12
+ },
13
+ "instant": {
14
+ "$type": "duration",
15
+ "$value": {
16
+ "value": 0,
17
+ "unit": "ms"
18
+ },
19
+ "$extensions": {
20
+ "com.figma.scopes": []
21
+ }
22
+ },
23
+ "fast": {
24
+ "$type": "duration",
25
+ "$value": {
26
+ "value": 100,
27
+ "unit": "ms"
28
+ },
29
+ "$extensions": {
30
+ "com.figma.scopes": []
31
+ }
32
+ },
33
+ "slow": {
34
+ "$type": "duration",
35
+ "$value": {
36
+ "value": 300,
37
+ "unit": "ms"
38
+ },
39
+ "$extensions": {
40
+ "com.figma.scopes": []
41
+ }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "font": {
3
+ "family": {
4
+ "base": {
5
+ "$type": "string",
6
+ "$value": "'Nunito Sans', sans-serif",
7
+ "$extensions": {
8
+ "com.figma.scopes": ["FONT_FAMILY"]
9
+ }
10
+ },
11
+ "display": {
12
+ "$type": "string",
13
+ "$value": "'Sofia Pro', SofiaPro, sans-serif",
14
+ "$extensions": {
15
+ "com.figma.scopes": ["FONT_FAMILY"]
16
+ }
17
+ }
18
+ },
19
+ "line-height": {
20
+ "base": {
21
+ "$type": "number",
22
+ "$value": 1.5,
23
+ "$extensions": {
24
+ "com.figma.scopes": []
25
+ }
26
+ },
27
+ "display": {
28
+ "$type": "number",
29
+ "$value": 1.25,
30
+ "$extensions": {
31
+ "com.figma.scopes": []
32
+ }
33
+ }
34
+ },
35
+ "weight": {
36
+ "normal": {
37
+ "$type": "number",
38
+ "$value": 400,
39
+ "$extensions": {
40
+ "com.figma.scopes": ["FONT_STYLE"]
41
+ }
42
+ },
43
+ "semibold": {
44
+ "$type": "number",
45
+ "$value": 600,
46
+ "$extensions": {
47
+ "com.figma.scopes": ["FONT_STYLE"]
48
+ }
49
+ },
50
+ "bold": {
51
+ "$type": "number",
52
+ "$value": 700,
53
+ "$extensions": {
54
+ "com.figma.scopes": ["FONT_STYLE"]
55
+ }
56
+ }
57
+ },
58
+ "size": {
59
+ "100": {
60
+ "$type": "dimension",
61
+ "$value": {
62
+ "value": 0.625,
63
+ "unit": "rem"
64
+ },
65
+ "$extensions": {
66
+ "com.figma.scopes": ["FONT_SIZE"]
67
+ }
68
+ },
69
+ "200": {
70
+ "$type": "dimension",
71
+ "$value": {
72
+ "value": 0.75,
73
+ "unit": "rem"
74
+ },
75
+ "$extensions": {
76
+ "com.figma.scopes": ["FONT_SIZE"]
77
+ }
78
+ },
79
+ "300": {
80
+ "$type": "dimension",
81
+ "$value": {
82
+ "value": 0.875,
83
+ "unit": "rem"
84
+ },
85
+ "$extensions": {
86
+ "com.figma.scopes": ["FONT_SIZE"]
87
+ }
88
+ },
89
+ "400": {
90
+ "$type": "dimension",
91
+ "$value": {
92
+ "value": 1,
93
+ "unit": "rem"
94
+ },
95
+ "$extensions": {
96
+ "com.figma.scopes": ["FONT_SIZE"]
97
+ }
98
+ },
99
+ "500": {
100
+ "$type": "dimension",
101
+ "$value": {
102
+ "value": 1.25,
103
+ "unit": "rem"
104
+ },
105
+ "$extensions": {
106
+ "com.figma.scopes": ["FONT_SIZE"]
107
+ }
108
+ },
109
+ "600": {
110
+ "$type": "dimension",
111
+ "$value": {
112
+ "value": 1.5,
113
+ "unit": "rem"
114
+ },
115
+ "$extensions": {
116
+ "com.figma.scopes": ["FONT_SIZE"]
117
+ }
118
+ },
119
+ "700": {
120
+ "$type": "dimension",
121
+ "$value": {
122
+ "value": 1.75,
123
+ "unit": "rem"
124
+ },
125
+ "$extensions": {
126
+ "com.figma.scopes": ["FONT_SIZE"]
127
+ }
128
+ },
129
+ "800": {
130
+ "$type": "dimension",
131
+ "$value": {
132
+ "value": 2,
133
+ "unit": "rem"
134
+ },
135
+ "$extensions": {
136
+ "com.figma.scopes": ["FONT_SIZE"]
137
+ }
138
+ },
139
+ "900": {
140
+ "$type": "dimension",
141
+ "$value": {
142
+ "value": 2.25,
143
+ "unit": "rem"
144
+ },
145
+ "$extensions": {
146
+ "com.figma.scopes": ["FONT_SIZE"]
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "radius": {
3
+ "0": {
4
+ "$type": "dimension",
5
+ "$value": {
6
+ "value": 0,
7
+ "unit": "rem"
8
+ },
9
+ "$extensions": {
10
+ "com.figma.scopes": ["CORNER_RADIUS"]
11
+ }
12
+ },
13
+ "1": {
14
+ "$type": "dimension",
15
+ "$value": {
16
+ "value": 0.1875,
17
+ "unit": "rem"
18
+ },
19
+ "$extensions": {
20
+ "com.figma.scopes": ["CORNER_RADIUS"]
21
+ }
22
+ },
23
+ "2": {
24
+ "$type": "dimension",
25
+ "$value": {
26
+ "value": 0.375,
27
+ "unit": "rem"
28
+ },
29
+ "$extensions": {
30
+ "com.figma.scopes": ["CORNER_RADIUS"]
31
+ }
32
+ },
33
+ "3": {
34
+ "$type": "dimension",
35
+ "$value": {
36
+ "value": 0.5625,
37
+ "unit": "rem"
38
+ },
39
+ "$extensions": {
40
+ "com.figma.scopes": ["CORNER_RADIUS"]
41
+ }
42
+ },
43
+ "4": {
44
+ "$type": "dimension",
45
+ "$value": {
46
+ "value": 0.75,
47
+ "unit": "rem"
48
+ },
49
+ "$extensions": {
50
+ "com.figma.scopes": ["CORNER_RADIUS"]
51
+ }
52
+ },
53
+ "5": {
54
+ "$type": "dimension",
55
+ "$value": {
56
+ "value": 0.9375,
57
+ "unit": "rem"
58
+ },
59
+ "$extensions": {
60
+ "com.figma.scopes": ["CORNER_RADIUS"]
61
+ }
62
+ },
63
+ "6": {
64
+ "$type": "dimension",
65
+ "$value": {
66
+ "value": 1.125,
67
+ "unit": "rem"
68
+ },
69
+ "$extensions": {
70
+ "com.figma.scopes": ["CORNER_RADIUS"]
71
+ }
72
+ },
73
+ "7": {
74
+ "$type": "dimension",
75
+ "$value": {
76
+ "value": 1.3125,
77
+ "unit": "rem"
78
+ },
79
+ "$extensions": {
80
+ "com.figma.scopes": ["CORNER_RADIUS"]
81
+ }
82
+ },
83
+ "8": {
84
+ "$type": "dimension",
85
+ "$value": {
86
+ "value": 1.5,
87
+ "unit": "rem"
88
+ },
89
+ "$extensions": {
90
+ "com.figma.scopes": ["CORNER_RADIUS"]
91
+ }
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,174 @@
1
+ {
2
+ "size": {
3
+ "0": {
4
+ "$type": "dimension",
5
+ "$value": {
6
+ "value": 0,
7
+ "unit": "rem"
8
+ },
9
+ "$extensions": {
10
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
11
+ }
12
+ },
13
+ "1": {
14
+ "$type": "dimension",
15
+ "$value": {
16
+ "value": 0.25,
17
+ "unit": "rem"
18
+ },
19
+ "$extensions": {
20
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
21
+ }
22
+ },
23
+ "2": {
24
+ "$type": "dimension",
25
+ "$value": {
26
+ "value": 0.5,
27
+ "unit": "rem"
28
+ },
29
+ "$extensions": {
30
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
31
+ }
32
+ },
33
+ "3": {
34
+ "$type": "dimension",
35
+ "$value": {
36
+ "value": 0.75,
37
+ "unit": "rem"
38
+ },
39
+ "$extensions": {
40
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
41
+ }
42
+ },
43
+ "4": {
44
+ "$type": "dimension",
45
+ "$value": {
46
+ "value": 1,
47
+ "unit": "rem"
48
+ },
49
+ "$extensions": {
50
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
51
+ }
52
+ },
53
+ "5": {
54
+ "$type": "dimension",
55
+ "$value": {
56
+ "value": 1.25,
57
+ "unit": "rem"
58
+ },
59
+ "$extensions": {
60
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
61
+ }
62
+ },
63
+ "6": {
64
+ "$type": "dimension",
65
+ "$value": {
66
+ "value": 1.5,
67
+ "unit": "rem"
68
+ },
69
+ "$extensions": {
70
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
71
+ }
72
+ },
73
+ "7": {
74
+ "$type": "dimension",
75
+ "$value": {
76
+ "value": 1.75,
77
+ "unit": "rem"
78
+ },
79
+ "$extensions": {
80
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
81
+ }
82
+ },
83
+ "8": {
84
+ "$type": "dimension",
85
+ "$value": {
86
+ "value": 2,
87
+ "unit": "rem"
88
+ },
89
+ "$extensions": {
90
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
91
+ }
92
+ },
93
+ "9": {
94
+ "$type": "dimension",
95
+ "$value": {
96
+ "value": 2.25,
97
+ "unit": "rem"
98
+ },
99
+ "$extensions": {
100
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
101
+ }
102
+ },
103
+ "10": {
104
+ "$type": "dimension",
105
+ "$value": {
106
+ "value": 2.5,
107
+ "unit": "rem"
108
+ },
109
+ "$extensions": {
110
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
111
+ }
112
+ },
113
+ "11": {
114
+ "$type": "dimension",
115
+ "$value": {
116
+ "value": 2.75,
117
+ "unit": "rem"
118
+ },
119
+ "$extensions": {
120
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
121
+ }
122
+ },
123
+ "12": {
124
+ "$type": "dimension",
125
+ "$value": {
126
+ "value": 3,
127
+ "unit": "rem"
128
+ },
129
+ "$extensions": {
130
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
131
+ }
132
+ },
133
+ "13": {
134
+ "$type": "dimension",
135
+ "$value": {
136
+ "value": 3.25,
137
+ "unit": "rem"
138
+ },
139
+ "$extensions": {
140
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
141
+ }
142
+ },
143
+ "14": {
144
+ "$type": "dimension",
145
+ "$value": {
146
+ "value": 3.5,
147
+ "unit": "rem"
148
+ },
149
+ "$extensions": {
150
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
151
+ }
152
+ },
153
+ "quarter": {
154
+ "$type": "dimension",
155
+ "$value": {
156
+ "value": 0.0625,
157
+ "unit": "rem"
158
+ },
159
+ "$extensions": {
160
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
161
+ }
162
+ },
163
+ "half": {
164
+ "$type": "dimension",
165
+ "$value": {
166
+ "value": 0.125,
167
+ "unit": "rem"
168
+ },
169
+ "$extensions": {
170
+ "com.figma.scopes": ["GAP", "WIDTH_HEIGHT"]
171
+ }
172
+ }
173
+ }
174
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "transition": {
3
+ "ease": {
4
+ "$type": "string",
5
+ "$value": "cubic-bezier(.4, 0, .2, 1)",
6
+ "$extensions": {
7
+ "com.figma.scopes": []
8
+ }
9
+ },
10
+ "ease-in": {
11
+ "$type": "string",
12
+ "$value": "cubic-bezier(.4, 0, 1, 1)",
13
+ "$extensions": {
14
+ "com.figma.scopes": []
15
+ }
16
+ },
17
+ "ease-out": {
18
+ "$type": "string",
19
+ "$value": "cubic-bezier(0, 0, .4, 1)",
20
+ "$extensions": {
21
+ "com.figma.scopes": []
22
+ }
23
+ },
24
+ "ease-in-out": {
25
+ "$type": "string",
26
+ "$value": "cubic-bezier(.4, 0, .6, 1)",
27
+ "$extensions": {
28
+ "com.figma.scopes": []
29
+ }
30
+ }
31
+ }
32
+ }