@esds-sangam/tokens 0.1.5
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.
- package/README.md +18 -0
- package/colors.json +72 -0
- package/dist/index.d.ts +744 -0
- package/dist/index.js +480 -0
- package/elevation.json +95 -0
- package/iconSize.json +8 -0
- package/package.json +36 -0
- package/radius.json +11 -0
- package/semantic-colors.json +142 -0
- package/shadows.json +6 -0
- package/spacing.json +15 -0
- package/strokeWidth.json +9 -0
- package/tsconfig.json +10 -0
- package/typography.json +58 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
// colors.json
|
|
2
|
+
var colors_default = {
|
|
3
|
+
blue: {
|
|
4
|
+
"100": "#F0F7FF",
|
|
5
|
+
"200": "#E0EFFE",
|
|
6
|
+
"300": "#B9DEFE",
|
|
7
|
+
"400": "#7CC5FD",
|
|
8
|
+
"500": "#36A8FA",
|
|
9
|
+
"600": "#0C8CE9",
|
|
10
|
+
"700": "#006FC9",
|
|
11
|
+
"800": "#0257A2",
|
|
12
|
+
"900": "#064B86",
|
|
13
|
+
"1000": "#0B3F6F",
|
|
14
|
+
"1100": "#07284A"
|
|
15
|
+
},
|
|
16
|
+
green: {
|
|
17
|
+
"100": "#F5FFFB",
|
|
18
|
+
"200": "#E6F6EF",
|
|
19
|
+
"300": "#B2E3CC",
|
|
20
|
+
"400": "#8CD6B4",
|
|
21
|
+
"500": "#58C391",
|
|
22
|
+
"600": "#38B87C",
|
|
23
|
+
"700": "#06A65B",
|
|
24
|
+
"800": "#059753",
|
|
25
|
+
"900": "#047641",
|
|
26
|
+
"1000": "#035B32",
|
|
27
|
+
"1100": "#034626"
|
|
28
|
+
},
|
|
29
|
+
red: {
|
|
30
|
+
"100": "#FFF6F5",
|
|
31
|
+
"200": "#FBE8E6",
|
|
32
|
+
"300": "#F3B7B2",
|
|
33
|
+
"400": "#EE948D",
|
|
34
|
+
"500": "#E6635A",
|
|
35
|
+
"600": "#E14539",
|
|
36
|
+
"700": "#D91608",
|
|
37
|
+
"800": "#C51407",
|
|
38
|
+
"900": "#9A1006",
|
|
39
|
+
"1000": "#770C04",
|
|
40
|
+
"1100": "#5B0903"
|
|
41
|
+
},
|
|
42
|
+
orange: {
|
|
43
|
+
"100": "#FFFBF5",
|
|
44
|
+
"200": "#FFF6E7",
|
|
45
|
+
"300": "#FEE4B3",
|
|
46
|
+
"400": "#FDD78F",
|
|
47
|
+
"500": "#FCC45C",
|
|
48
|
+
"600": "#FCB93C",
|
|
49
|
+
"700": "#FBA70B",
|
|
50
|
+
"800": "#E4980A",
|
|
51
|
+
"900": "#B27708",
|
|
52
|
+
"1000": "#8A5C06",
|
|
53
|
+
"1100": "#694605"
|
|
54
|
+
},
|
|
55
|
+
neutral: {
|
|
56
|
+
"50": "#FFFFFF",
|
|
57
|
+
"100": "#F8F8F8",
|
|
58
|
+
"200": "#EBEBEB",
|
|
59
|
+
"300": "#CCCCCC",
|
|
60
|
+
"400": "#B2B2B2",
|
|
61
|
+
"500": "#989898",
|
|
62
|
+
"600": "#7C7C7C",
|
|
63
|
+
"700": "#606060",
|
|
64
|
+
"800": "#454545",
|
|
65
|
+
"900": "#2B2B2B",
|
|
66
|
+
"1000": "#1E1E1E",
|
|
67
|
+
"1100": "#111111"
|
|
68
|
+
},
|
|
69
|
+
purple: {
|
|
70
|
+
"200": "#F7E8FF",
|
|
71
|
+
"700": "#8910D9"
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// semantic-colors.json
|
|
76
|
+
var semantic_colors_default = {
|
|
77
|
+
background: {
|
|
78
|
+
neutral: {
|
|
79
|
+
primary: "neutral.50",
|
|
80
|
+
secondary: "neutral.100",
|
|
81
|
+
tertiary: "neutral.200",
|
|
82
|
+
disabled: "neutral.200"
|
|
83
|
+
},
|
|
84
|
+
neutralInverse: {
|
|
85
|
+
primary: "neutral.1100",
|
|
86
|
+
secondary: "neutral.800",
|
|
87
|
+
tertiary: "neutral.400"
|
|
88
|
+
},
|
|
89
|
+
semantic: {
|
|
90
|
+
success: {
|
|
91
|
+
subtle: "green.200",
|
|
92
|
+
default: "green.800",
|
|
93
|
+
hover: "green.900"
|
|
94
|
+
},
|
|
95
|
+
warning: {
|
|
96
|
+
subtle: "orange.200",
|
|
97
|
+
default: "orange.600",
|
|
98
|
+
hover: "orange.700"
|
|
99
|
+
},
|
|
100
|
+
error: {
|
|
101
|
+
subtle: "red.200",
|
|
102
|
+
default: "red.800",
|
|
103
|
+
hover: "red.900"
|
|
104
|
+
},
|
|
105
|
+
info: {
|
|
106
|
+
subtle: "blue.200",
|
|
107
|
+
default: "blue.600",
|
|
108
|
+
hover: "blue.800"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
text: {
|
|
113
|
+
neutral: {
|
|
114
|
+
primary: "neutral.1100",
|
|
115
|
+
secondary: "neutral.800",
|
|
116
|
+
tertiary: "neutral.600",
|
|
117
|
+
disabled: "neutral.500"
|
|
118
|
+
},
|
|
119
|
+
neutralInverse: {
|
|
120
|
+
primary: "neutral.50",
|
|
121
|
+
secondary: "neutral.50",
|
|
122
|
+
tertiary: "neutral.1100"
|
|
123
|
+
},
|
|
124
|
+
semantic: {
|
|
125
|
+
success: {
|
|
126
|
+
subtle: "green.800",
|
|
127
|
+
default: "neutral.50",
|
|
128
|
+
hover: "neutral.50"
|
|
129
|
+
},
|
|
130
|
+
warning: {
|
|
131
|
+
subtle: "orange.800",
|
|
132
|
+
default: "neutral.1100",
|
|
133
|
+
hover: "neutral.1100"
|
|
134
|
+
},
|
|
135
|
+
error: {
|
|
136
|
+
subtle: "red.800",
|
|
137
|
+
default: "neutral.50",
|
|
138
|
+
hover: "neutral.50"
|
|
139
|
+
},
|
|
140
|
+
info: {
|
|
141
|
+
subtle: "blue.600",
|
|
142
|
+
default: "neutral.50",
|
|
143
|
+
hover: "neutral.50"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
icon: {
|
|
148
|
+
neutral: {
|
|
149
|
+
primary: "neutral.1100",
|
|
150
|
+
secondary: "neutral.800",
|
|
151
|
+
tertiary: "neutral.600",
|
|
152
|
+
disabled: "neutral.500"
|
|
153
|
+
},
|
|
154
|
+
neutralInverse: {
|
|
155
|
+
primary: "neutral.50",
|
|
156
|
+
secondary: "neutral.50",
|
|
157
|
+
tertiary: "neutral.1100"
|
|
158
|
+
},
|
|
159
|
+
semantic: {
|
|
160
|
+
success: {
|
|
161
|
+
subtle: "green.800",
|
|
162
|
+
default: "neutral.50",
|
|
163
|
+
hover: "neutral.50"
|
|
164
|
+
},
|
|
165
|
+
warning: {
|
|
166
|
+
subtle: "orange.700",
|
|
167
|
+
default: "neutral.1100",
|
|
168
|
+
hover: "neutral.1100"
|
|
169
|
+
},
|
|
170
|
+
error: {
|
|
171
|
+
subtle: "red.800",
|
|
172
|
+
default: "neutral.50",
|
|
173
|
+
hover: "neutral.50"
|
|
174
|
+
},
|
|
175
|
+
info: {
|
|
176
|
+
subtle: "blue.600",
|
|
177
|
+
default: "neutral.50",
|
|
178
|
+
hover: "neutral.50"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
border: {
|
|
183
|
+
neutral: {
|
|
184
|
+
primary: "neutral.400",
|
|
185
|
+
secondary: "neutral.300",
|
|
186
|
+
tertiary: "neutral.200",
|
|
187
|
+
disabled: "neutral.200"
|
|
188
|
+
},
|
|
189
|
+
neutralInverse: {
|
|
190
|
+
primary: "neutral.700",
|
|
191
|
+
secondary: "neutral.600",
|
|
192
|
+
tertiary: "neutral.1100"
|
|
193
|
+
},
|
|
194
|
+
semantic: {
|
|
195
|
+
success: {
|
|
196
|
+
subtle: "green.800",
|
|
197
|
+
default: "green.300",
|
|
198
|
+
hover: "green.300"
|
|
199
|
+
},
|
|
200
|
+
warning: {
|
|
201
|
+
subtle: "orange.700",
|
|
202
|
+
default: "orange.300",
|
|
203
|
+
hover: "orange.300"
|
|
204
|
+
},
|
|
205
|
+
error: {
|
|
206
|
+
subtle: "red.800",
|
|
207
|
+
default: "red.300",
|
|
208
|
+
hover: "red.300"
|
|
209
|
+
},
|
|
210
|
+
info: {
|
|
211
|
+
subtle: "blue.600",
|
|
212
|
+
default: "blue.300",
|
|
213
|
+
hover: "blue.300"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
// spacing.json
|
|
220
|
+
var spacing_default = {
|
|
221
|
+
"0": "0px",
|
|
222
|
+
"2xs": "0.125rem",
|
|
223
|
+
xs: "0.25rem",
|
|
224
|
+
sm: "0.5rem",
|
|
225
|
+
md: "0.75rem",
|
|
226
|
+
lg: "1rem",
|
|
227
|
+
xl: "1.25rem",
|
|
228
|
+
"2xl": "1.5rem",
|
|
229
|
+
"3xl": "2rem",
|
|
230
|
+
"4xl": "2.5rem",
|
|
231
|
+
"5xl": "3rem",
|
|
232
|
+
"6xl": "3.5rem",
|
|
233
|
+
"7xl": "4rem"
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
// typography.json
|
|
237
|
+
var typography_default = {
|
|
238
|
+
fontFamily: {
|
|
239
|
+
sans: ["Inter", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica Neue", "Arial", "sans-serif"],
|
|
240
|
+
serif: ["Georgia", "Cambria", "Times New Roman", "Times", "serif"],
|
|
241
|
+
mono: ["Fira Code", "Consolas", "Monaco", "Courier New", "monospace"]
|
|
242
|
+
},
|
|
243
|
+
fontSize: {
|
|
244
|
+
xs: ["0.75rem", { lineHeight: "1rem", comment: "12px - B4 (Figma)" }],
|
|
245
|
+
"2xs": ["0.8125rem", { lineHeight: "1.125rem", letterSpacing: "-0.01em", comment: "13px - B3 (Figma) - RESTRICTED: See TYPOGRAPHY_2XS_USAGE.md" }],
|
|
246
|
+
"3xs": ["0.625rem", { lineHeight: "1rem", comment: "10px - Avatar small/medium (Figma)" }],
|
|
247
|
+
sm: ["0.875rem", { lineHeight: "1.25rem", comment: "14px - B2 (Figma)" }],
|
|
248
|
+
base: ["1rem", { lineHeight: "1.5rem", comment: "16px - B1 (Figma)" }],
|
|
249
|
+
lg: ["1.125rem", { lineHeight: "1.75rem" }],
|
|
250
|
+
xl: ["1.25rem", { lineHeight: "1.75rem", comment: "20px - H2 (Figma)" }],
|
|
251
|
+
"2xl": ["1.5rem", { lineHeight: "2rem", comment: "24px - H1 (Figma)" }],
|
|
252
|
+
"3xl": ["1.875rem", { lineHeight: "2.25rem" }],
|
|
253
|
+
"4xl": ["2.25rem", { lineHeight: "2.5rem" }],
|
|
254
|
+
"5xl": ["3rem", { lineHeight: "1" }],
|
|
255
|
+
"6xl": ["3.75rem", { lineHeight: "1" }],
|
|
256
|
+
"7xl": ["4.5rem", { lineHeight: "1" }],
|
|
257
|
+
"8xl": ["6rem", { lineHeight: "1" }],
|
|
258
|
+
"9xl": ["8rem", { lineHeight: "1" }]
|
|
259
|
+
},
|
|
260
|
+
fontWeight: {
|
|
261
|
+
thin: "100",
|
|
262
|
+
extralight: "200",
|
|
263
|
+
light: "300",
|
|
264
|
+
normal: "400",
|
|
265
|
+
medium: "500",
|
|
266
|
+
semibold: "600",
|
|
267
|
+
bold: "700",
|
|
268
|
+
extrabold: "800",
|
|
269
|
+
black: "900"
|
|
270
|
+
},
|
|
271
|
+
letterSpacing: {
|
|
272
|
+
tighter: "-0.05em",
|
|
273
|
+
tight: "-0.025em",
|
|
274
|
+
normal: "0em",
|
|
275
|
+
wide: "0.025em",
|
|
276
|
+
wider: "0.05em",
|
|
277
|
+
widest: "0.1em"
|
|
278
|
+
},
|
|
279
|
+
lineHeight: {
|
|
280
|
+
none: "1",
|
|
281
|
+
tight: "1.25",
|
|
282
|
+
snug: "1.375",
|
|
283
|
+
normal: "1.5",
|
|
284
|
+
relaxed: "1.625",
|
|
285
|
+
loose: "2",
|
|
286
|
+
"2xs": "1rem",
|
|
287
|
+
xs: "1.125rem",
|
|
288
|
+
s: "1.25rem",
|
|
289
|
+
m: "1.5rem",
|
|
290
|
+
lg: "1.75rem",
|
|
291
|
+
xl: "2rem"
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
// radius.json
|
|
296
|
+
var radius_default = {
|
|
297
|
+
none: "0px",
|
|
298
|
+
xs: "0.25rem",
|
|
299
|
+
sm: "0.5rem",
|
|
300
|
+
md: "0.75rem",
|
|
301
|
+
lg: "1rem",
|
|
302
|
+
xl: "1.5rem",
|
|
303
|
+
"2xl": "2rem",
|
|
304
|
+
"3xl": "3.5rem",
|
|
305
|
+
full: "9999px"
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
// shadows.json
|
|
309
|
+
var shadows_default = {
|
|
310
|
+
sm: "0 0 6px 0 rgba(0, 0, 0, 0.1)",
|
|
311
|
+
md: "0 4px 10px 0 rgba(0, 0, 0, 0.1)",
|
|
312
|
+
lg: "0 8px 16px 0 rgba(0, 0, 0, 0.1)",
|
|
313
|
+
xl: "0 12px 24px 0 rgba(0, 0, 0, 0.1)"
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// elevation.json
|
|
317
|
+
var elevation_default = {
|
|
318
|
+
$schema: "https://json-schema.org/draft-07/schema#",
|
|
319
|
+
description: "Elevation (shadow) design tokens for the Sangam Design System. Provides directional shadows for creating depth and hierarchy.",
|
|
320
|
+
elevation: {
|
|
321
|
+
bottom: {
|
|
322
|
+
sm: {
|
|
323
|
+
value: "0 2px 6px 0 rgba(0, 0, 0, 0.1)",
|
|
324
|
+
description: "Small elevation shadow cast downward. Subtle depth for cards, buttons.",
|
|
325
|
+
css: "box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);"
|
|
326
|
+
},
|
|
327
|
+
md: {
|
|
328
|
+
value: "0 4px 10px 0 rgba(0, 0, 0, 0.1)",
|
|
329
|
+
description: "Medium elevation shadow cast downward. Moderate depth for dropdowns, popovers.",
|
|
330
|
+
css: "box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.1);"
|
|
331
|
+
},
|
|
332
|
+
lg: {
|
|
333
|
+
value: "0 8px 16px 0 rgba(0, 0, 0, 0.1)",
|
|
334
|
+
description: "Large elevation shadow cast downward. Strong depth for modals, overlays.",
|
|
335
|
+
css: "box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1);"
|
|
336
|
+
},
|
|
337
|
+
xl: {
|
|
338
|
+
value: "0 12px 24px 0 rgba(0, 0, 0, 0.1)",
|
|
339
|
+
description: "Extra large elevation shadow cast downward. Maximum depth for floating panels.",
|
|
340
|
+
css: "box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
top: {
|
|
344
|
+
sm: {
|
|
345
|
+
value: "0 -4px 6px 0 rgba(0, 0, 0, 0.1)",
|
|
346
|
+
description: "Small elevation shadow cast upward. Subtle depth for sticky footers.",
|
|
347
|
+
css: "box-shadow: 0 -4px 6px 0 rgba(0, 0, 0, 0.1);"
|
|
348
|
+
},
|
|
349
|
+
md: {
|
|
350
|
+
value: "0 -6px 12px 0 rgba(0, 0, 0, 0.1)",
|
|
351
|
+
description: "Medium elevation shadow cast upward. Moderate depth for bottom sheets.",
|
|
352
|
+
css: "box-shadow: 0 -6px 12px 0 rgba(0, 0, 0, 0.1);"
|
|
353
|
+
},
|
|
354
|
+
lg: {
|
|
355
|
+
value: "0 -10px 20px 0 rgba(0, 0, 0, 0.1)",
|
|
356
|
+
description: "Large elevation shadow cast upward. Strong depth for elevated panels.",
|
|
357
|
+
css: "box-shadow: 0 -10px 20px 0 rgba(0, 0, 0, 0.1);"
|
|
358
|
+
},
|
|
359
|
+
xl: {
|
|
360
|
+
value: "0 -14px 28px 0 rgba(0, 0, 0, 0.1)",
|
|
361
|
+
description: "Extra large elevation shadow cast upward. Maximum depth for floating elements.",
|
|
362
|
+
css: "box-shadow: 0 -14px 28px 0 rgba(0, 0, 0, 0.1);"
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
left: {
|
|
366
|
+
sm: {
|
|
367
|
+
value: "-4px 0 8px 0 rgba(0, 0, 0, 0.1)",
|
|
368
|
+
description: "Small elevation shadow cast leftward. Subtle depth for side panels.",
|
|
369
|
+
css: "box-shadow: -4px 0 8px 0 rgba(0, 0, 0, 0.1);"
|
|
370
|
+
},
|
|
371
|
+
md: {
|
|
372
|
+
value: "-6px 0 12px 0 rgba(0, 0, 0, 0.1)",
|
|
373
|
+
description: "Medium elevation shadow cast leftward. Moderate depth for drawers.",
|
|
374
|
+
css: "box-shadow: -6px 0 12px 0 rgba(0, 0, 0, 0.1);"
|
|
375
|
+
},
|
|
376
|
+
lg: {
|
|
377
|
+
value: "-10px 0 20px 0 rgba(0, 0, 0, 0.1)",
|
|
378
|
+
description: "Large elevation shadow cast leftward. Strong depth for sliding panels.",
|
|
379
|
+
css: "box-shadow: -10px 0 20px 0 rgba(0, 0, 0, 0.1);"
|
|
380
|
+
},
|
|
381
|
+
xl: {
|
|
382
|
+
value: "-14px 0 28px 0 rgba(0, 0, 0, 0.1)",
|
|
383
|
+
description: "Extra large elevation shadow cast leftward. Maximum depth for side navigation.",
|
|
384
|
+
css: "box-shadow: -14px 0 28px 0 rgba(0, 0, 0, 0.1);"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
right: {
|
|
388
|
+
sm: {
|
|
389
|
+
value: "4px 0 8px 0 rgba(0, 0, 0, 0.1)",
|
|
390
|
+
description: "Small elevation shadow cast rightward. Subtle depth for side panels.",
|
|
391
|
+
css: "box-shadow: 4px 0 8px 0 rgba(0, 0, 0, 0.1);"
|
|
392
|
+
},
|
|
393
|
+
md: {
|
|
394
|
+
value: "6px 0 12px 0 rgba(0, 0, 0, 0.1)",
|
|
395
|
+
description: "Medium elevation shadow cast rightward. Moderate depth for drawers.",
|
|
396
|
+
css: "box-shadow: 6px 0 12px 0 rgba(0, 0, 0, 0.1);"
|
|
397
|
+
},
|
|
398
|
+
lg: {
|
|
399
|
+
value: "10px 0 20px 0 rgba(0, 0, 0, 0.1)",
|
|
400
|
+
description: "Large elevation shadow cast rightward. Strong depth for sliding panels.",
|
|
401
|
+
css: "box-shadow: 10px 0 20px 0 rgba(0, 0, 0, 0.1);"
|
|
402
|
+
},
|
|
403
|
+
xl: {
|
|
404
|
+
value: "14px 0 28px 0 rgba(0, 0, 0, 0.1)",
|
|
405
|
+
description: "Extra large elevation shadow cast rightward. Maximum depth for side navigation.",
|
|
406
|
+
css: "box-shadow: 14px 0 28px 0 rgba(0, 0, 0, 0.1);"
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
// strokeWidth.json
|
|
413
|
+
var strokeWidth_default = {
|
|
414
|
+
"0": "0px",
|
|
415
|
+
"1": "1px",
|
|
416
|
+
"2": "2px",
|
|
417
|
+
"3": "3px",
|
|
418
|
+
"4": "4px",
|
|
419
|
+
"8": "8px"
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
// iconSize.json
|
|
423
|
+
var iconSize_default = {
|
|
424
|
+
"2xs": "0.75rem",
|
|
425
|
+
xs: "1rem",
|
|
426
|
+
sm: "1.25rem",
|
|
427
|
+
md: "1.5rem",
|
|
428
|
+
lg: "2rem"
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
// index.ts
|
|
432
|
+
function resolveRef(ref) {
|
|
433
|
+
const [palette, step] = ref.split(".");
|
|
434
|
+
const pal = colors_default[palette];
|
|
435
|
+
if (!pal || !(step in pal)) return ref;
|
|
436
|
+
return pal[step];
|
|
437
|
+
}
|
|
438
|
+
function resolveSemanticColors(obj, out = {}) {
|
|
439
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
440
|
+
if (typeof value === "string" && /^[a-z]+\.[a-z0-9]+$/i.test(value)) {
|
|
441
|
+
out[key] = resolveRef(value);
|
|
442
|
+
} else if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
443
|
+
const nested = {};
|
|
444
|
+
resolveSemanticColors(value, nested);
|
|
445
|
+
out[key] = nested;
|
|
446
|
+
} else {
|
|
447
|
+
out[key] = value;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
return out;
|
|
451
|
+
}
|
|
452
|
+
var semanticColorsResolved = resolveSemanticColors(
|
|
453
|
+
semantic_colors_default
|
|
454
|
+
);
|
|
455
|
+
var semanticColors = semantic_colors_default;
|
|
456
|
+
var tokens = {
|
|
457
|
+
colors: colors_default,
|
|
458
|
+
semanticColors,
|
|
459
|
+
semanticColorsResolved,
|
|
460
|
+
spacing: spacing_default,
|
|
461
|
+
typography: typography_default,
|
|
462
|
+
radius: radius_default,
|
|
463
|
+
shadows: shadows_default,
|
|
464
|
+
elevation: elevation_default,
|
|
465
|
+
strokeWidth: strokeWidth_default,
|
|
466
|
+
iconSize: iconSize_default
|
|
467
|
+
};
|
|
468
|
+
export {
|
|
469
|
+
colors_default as colors,
|
|
470
|
+
elevation_default as elevation,
|
|
471
|
+
iconSize_default as iconSize,
|
|
472
|
+
radius_default as radius,
|
|
473
|
+
semanticColors,
|
|
474
|
+
semanticColorsResolved,
|
|
475
|
+
shadows_default as shadows,
|
|
476
|
+
spacing_default as spacing,
|
|
477
|
+
strokeWidth_default as strokeWidth,
|
|
478
|
+
tokens,
|
|
479
|
+
typography_default as typography
|
|
480
|
+
};
|
package/elevation.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft-07/schema#",
|
|
3
|
+
"description": "Elevation (shadow) design tokens for the Sangam Design System. Provides directional shadows for creating depth and hierarchy.",
|
|
4
|
+
"elevation": {
|
|
5
|
+
"bottom": {
|
|
6
|
+
"sm": {
|
|
7
|
+
"value": "0 2px 6px 0 rgba(0, 0, 0, 0.1)",
|
|
8
|
+
"description": "Small elevation shadow cast downward. Subtle depth for cards, buttons.",
|
|
9
|
+
"css": "box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);"
|
|
10
|
+
},
|
|
11
|
+
"md": {
|
|
12
|
+
"value": "0 4px 10px 0 rgba(0, 0, 0, 0.1)",
|
|
13
|
+
"description": "Medium elevation shadow cast downward. Moderate depth for dropdowns, popovers.",
|
|
14
|
+
"css": "box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.1);"
|
|
15
|
+
},
|
|
16
|
+
"lg": {
|
|
17
|
+
"value": "0 8px 16px 0 rgba(0, 0, 0, 0.1)",
|
|
18
|
+
"description": "Large elevation shadow cast downward. Strong depth for modals, overlays.",
|
|
19
|
+
"css": "box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1);"
|
|
20
|
+
},
|
|
21
|
+
"xl": {
|
|
22
|
+
"value": "0 12px 24px 0 rgba(0, 0, 0, 0.1)",
|
|
23
|
+
"description": "Extra large elevation shadow cast downward. Maximum depth for floating panels.",
|
|
24
|
+
"css": "box-shadow: 0 12px 24px 0 rgba(0, 0, 0, 0.1);"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"top": {
|
|
28
|
+
"sm": {
|
|
29
|
+
"value": "0 -4px 6px 0 rgba(0, 0, 0, 0.1)",
|
|
30
|
+
"description": "Small elevation shadow cast upward. Subtle depth for sticky footers.",
|
|
31
|
+
"css": "box-shadow: 0 -4px 6px 0 rgba(0, 0, 0, 0.1);"
|
|
32
|
+
},
|
|
33
|
+
"md": {
|
|
34
|
+
"value": "0 -6px 12px 0 rgba(0, 0, 0, 0.1)",
|
|
35
|
+
"description": "Medium elevation shadow cast upward. Moderate depth for bottom sheets.",
|
|
36
|
+
"css": "box-shadow: 0 -6px 12px 0 rgba(0, 0, 0, 0.1);"
|
|
37
|
+
},
|
|
38
|
+
"lg": {
|
|
39
|
+
"value": "0 -10px 20px 0 rgba(0, 0, 0, 0.1)",
|
|
40
|
+
"description": "Large elevation shadow cast upward. Strong depth for elevated panels.",
|
|
41
|
+
"css": "box-shadow: 0 -10px 20px 0 rgba(0, 0, 0, 0.1);"
|
|
42
|
+
},
|
|
43
|
+
"xl": {
|
|
44
|
+
"value": "0 -14px 28px 0 rgba(0, 0, 0, 0.1)",
|
|
45
|
+
"description": "Extra large elevation shadow cast upward. Maximum depth for floating elements.",
|
|
46
|
+
"css": "box-shadow: 0 -14px 28px 0 rgba(0, 0, 0, 0.1);"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"left": {
|
|
50
|
+
"sm": {
|
|
51
|
+
"value": "-4px 0 8px 0 rgba(0, 0, 0, 0.1)",
|
|
52
|
+
"description": "Small elevation shadow cast leftward. Subtle depth for side panels.",
|
|
53
|
+
"css": "box-shadow: -4px 0 8px 0 rgba(0, 0, 0, 0.1);"
|
|
54
|
+
},
|
|
55
|
+
"md": {
|
|
56
|
+
"value": "-6px 0 12px 0 rgba(0, 0, 0, 0.1)",
|
|
57
|
+
"description": "Medium elevation shadow cast leftward. Moderate depth for drawers.",
|
|
58
|
+
"css": "box-shadow: -6px 0 12px 0 rgba(0, 0, 0, 0.1);"
|
|
59
|
+
},
|
|
60
|
+
"lg": {
|
|
61
|
+
"value": "-10px 0 20px 0 rgba(0, 0, 0, 0.1)",
|
|
62
|
+
"description": "Large elevation shadow cast leftward. Strong depth for sliding panels.",
|
|
63
|
+
"css": "box-shadow: -10px 0 20px 0 rgba(0, 0, 0, 0.1);"
|
|
64
|
+
},
|
|
65
|
+
"xl": {
|
|
66
|
+
"value": "-14px 0 28px 0 rgba(0, 0, 0, 0.1)",
|
|
67
|
+
"description": "Extra large elevation shadow cast leftward. Maximum depth for side navigation.",
|
|
68
|
+
"css": "box-shadow: -14px 0 28px 0 rgba(0, 0, 0, 0.1);"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"right": {
|
|
72
|
+
"sm": {
|
|
73
|
+
"value": "4px 0 8px 0 rgba(0, 0, 0, 0.1)",
|
|
74
|
+
"description": "Small elevation shadow cast rightward. Subtle depth for side panels.",
|
|
75
|
+
"css": "box-shadow: 4px 0 8px 0 rgba(0, 0, 0, 0.1);"
|
|
76
|
+
},
|
|
77
|
+
"md": {
|
|
78
|
+
"value": "6px 0 12px 0 rgba(0, 0, 0, 0.1)",
|
|
79
|
+
"description": "Medium elevation shadow cast rightward. Moderate depth for drawers.",
|
|
80
|
+
"css": "box-shadow: 6px 0 12px 0 rgba(0, 0, 0, 0.1);"
|
|
81
|
+
},
|
|
82
|
+
"lg": {
|
|
83
|
+
"value": "10px 0 20px 0 rgba(0, 0, 0, 0.1)",
|
|
84
|
+
"description": "Large elevation shadow cast rightward. Strong depth for sliding panels.",
|
|
85
|
+
"css": "box-shadow: 10px 0 20px 0 rgba(0, 0, 0, 0.1);"
|
|
86
|
+
},
|
|
87
|
+
"xl": {
|
|
88
|
+
"value": "14px 0 28px 0 rgba(0, 0, 0, 0.1)",
|
|
89
|
+
"description": "Extra large elevation shadow cast rightward. Maximum depth for side navigation.",
|
|
90
|
+
"css": "box-shadow: 14px 0 28px 0 rgba(0, 0, 0, 0.1);"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
package/iconSize.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@esds-sangam/tokens",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./colors": "./colors.json",
|
|
14
|
+
"./semantic-colors": "./semantic-colors.json",
|
|
15
|
+
"./spacing": "./spacing.json",
|
|
16
|
+
"./typography": "./typography.json",
|
|
17
|
+
"./radius": "./radius.json",
|
|
18
|
+
"./shadows": "./shadows.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"*.json"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup index.ts --format esm --dts --clean",
|
|
26
|
+
"lint": "eslint . --ext .ts",
|
|
27
|
+
"type-check": "tsc --noEmit"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"tsup": "^8.5.1",
|
|
31
|
+
"typescript": "^5.3.0"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
}
|
|
36
|
+
}
|