@tantuui/tokens 0.0.1-rc1
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/dist/base.css +94 -0
- package/dist/index.d.mts +1306 -0
- package/dist/index.d.ts +1306 -0
- package/dist/index.js +778 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +754 -0
- package/dist/index.mjs.map +1 -0
- package/dist/runtime.d.mts +46 -0
- package/dist/runtime.d.ts +46 -0
- package/dist/runtime.js +119 -0
- package/dist/runtime.js.map +1 -0
- package/dist/runtime.mjs +115 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/tailwind-preset.js +588 -0
- package/dist/tokens.css +771 -0
- package/dist/utilities.css +2474 -0
- package/package.json +35 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,754 @@
|
|
|
1
|
+
// src/tokens/color.ts
|
|
2
|
+
var color = {
|
|
3
|
+
// ── Primitives (raw scale) ──────────────────────────────────────────
|
|
4
|
+
primitive: {
|
|
5
|
+
// ── White / Black (brand colors) ───────────────────────────────────
|
|
6
|
+
white: "#ffffff",
|
|
7
|
+
black: "#000000",
|
|
8
|
+
// ── Brand White (scale from pure white) ────────────────────────────
|
|
9
|
+
brandWhite50: "#ffffff",
|
|
10
|
+
brandWhite100: "#fefefe",
|
|
11
|
+
brandWhite200: "#fafafa",
|
|
12
|
+
brandWhite300: "#f5f5f5",
|
|
13
|
+
brandWhite400: "#ededed",
|
|
14
|
+
brandWhite500: "#e0e0e0",
|
|
15
|
+
brandWhite600: "#c2c2c2",
|
|
16
|
+
brandWhite700: "#9e9e9e",
|
|
17
|
+
brandWhite800: "#757575",
|
|
18
|
+
brandWhite900: "#4a4a4a",
|
|
19
|
+
brandWhite950: "#2b2b2b",
|
|
20
|
+
brandWhiteDefault: "#ffffff",
|
|
21
|
+
// base from brand palette
|
|
22
|
+
// ── Brand Black (scale from pure black) ────────────────────────────
|
|
23
|
+
brandBlack50: "#f5f5f5",
|
|
24
|
+
brandBlack100: "#e8e8e8",
|
|
25
|
+
brandBlack200: "#d4d4d4",
|
|
26
|
+
brandBlack300: "#b0b0b0",
|
|
27
|
+
brandBlack400: "#8a8a8a",
|
|
28
|
+
brandBlack500: "#616161",
|
|
29
|
+
brandBlack600: "#4a4a4a",
|
|
30
|
+
brandBlack700: "#363636",
|
|
31
|
+
brandBlack800: "#242424",
|
|
32
|
+
brandBlack900: "#141414",
|
|
33
|
+
brandBlack950: "#000000",
|
|
34
|
+
brandBlackDefault: "#000000",
|
|
35
|
+
// base from brand palette
|
|
36
|
+
// ── Brand Navy (#0D132B base) ──────────────────────────────────────
|
|
37
|
+
brandNavy50: "#f3f4f7",
|
|
38
|
+
brandNavy100: "#e7e8ef",
|
|
39
|
+
brandNavy200: "#cacfe2",
|
|
40
|
+
brandNavy300: "#9da8d2",
|
|
41
|
+
brandNavy400: "#6377c5",
|
|
42
|
+
brandNavy500: "#354eb0",
|
|
43
|
+
brandNavy600: "#2c4091",
|
|
44
|
+
brandNavy700: "#223272",
|
|
45
|
+
brandNavy800: "#1a2656",
|
|
46
|
+
brandNavy900: "#121a3b",
|
|
47
|
+
brandNavy950: "#0a0e1f",
|
|
48
|
+
brandNavyDefault: "#2c4091",
|
|
49
|
+
// base from brand palette
|
|
50
|
+
// ── Brand Blue (#2563EB base) ──────────────────────────────────────
|
|
51
|
+
brandBlue50: "#eff4ff",
|
|
52
|
+
brandBlue100: "#dbe6fe",
|
|
53
|
+
brandBlue200: "#bfd3fe",
|
|
54
|
+
brandBlue300: "#93b4fd",
|
|
55
|
+
brandBlue400: "#6090fa",
|
|
56
|
+
brandBlue500: "#3b6ef6",
|
|
57
|
+
brandBlue600: "#2563eb",
|
|
58
|
+
brandBlue700: "#1d50d8",
|
|
59
|
+
brandBlue800: "#1e41af",
|
|
60
|
+
brandBlue900: "#1e398a",
|
|
61
|
+
brandBlue950: "#172554",
|
|
62
|
+
brandBlueDefault: "#2563EB",
|
|
63
|
+
// base from brand palette
|
|
64
|
+
// ── Brand Purple (#7C3AED base) ────────────────────────────────────
|
|
65
|
+
brandPurple50: "#f5f3ff",
|
|
66
|
+
brandPurple100: "#ede8ff",
|
|
67
|
+
brandPurple200: "#ddd6fe",
|
|
68
|
+
brandPurple300: "#c4b5fc",
|
|
69
|
+
brandPurple400: "#a78bfa",
|
|
70
|
+
brandPurple500: "#8b5cf6",
|
|
71
|
+
brandPurple600: "#7c3aed",
|
|
72
|
+
brandPurple700: "#6d28d9",
|
|
73
|
+
brandPurple800: "#5b21b6",
|
|
74
|
+
brandPurple900: "#4c1d95",
|
|
75
|
+
brandPurple950: "#2e1065",
|
|
76
|
+
brandPurpleDefault: "#7C3AED",
|
|
77
|
+
// base from brand palette
|
|
78
|
+
// ── Brand Pink (#D946EF base) ──────────────────────────────────────
|
|
79
|
+
brandPink50: "#fdf4ff",
|
|
80
|
+
brandPink100: "#fae8ff",
|
|
81
|
+
brandPink200: "#f5d0fe",
|
|
82
|
+
brandPink300: "#f0abfc",
|
|
83
|
+
brandPink400: "#e879f9",
|
|
84
|
+
brandPink500: "#d946ef",
|
|
85
|
+
brandPink600: "#c026d3",
|
|
86
|
+
brandPink700: "#a21caf",
|
|
87
|
+
brandPink800: "#86198f",
|
|
88
|
+
brandPink900: "#701a75",
|
|
89
|
+
brandPink950: "#4a044e",
|
|
90
|
+
brandPinkDefault: "#c026d3",
|
|
91
|
+
// base from brand palette
|
|
92
|
+
// ── Brand Gray (#4B5563 base) ──────────────────────────────────────
|
|
93
|
+
brandGray50: "#f9fafb",
|
|
94
|
+
brandGray100: "#f3f4f6",
|
|
95
|
+
brandGray200: "#e5e7eb",
|
|
96
|
+
brandGray300: "#d1d5db",
|
|
97
|
+
brandGray400: "#9ca3af",
|
|
98
|
+
brandGray500: "#6b7280",
|
|
99
|
+
brandGray600: "#4b5563",
|
|
100
|
+
brandGray700: "#374151",
|
|
101
|
+
brandGray800: "#1f2937",
|
|
102
|
+
brandGray900: "#111827",
|
|
103
|
+
brandGray950: "#030712",
|
|
104
|
+
brandGrayDefault: "#4B5563",
|
|
105
|
+
// base from brand palette
|
|
106
|
+
// ── Brand Light (#F3F4F6 base) ─────────────────────────────────────
|
|
107
|
+
brandLight50: "#fdfefe",
|
|
108
|
+
brandLight100: "#f9fafb",
|
|
109
|
+
brandLight200: "#f3f4f6",
|
|
110
|
+
brandLight300: "#e5e7eb",
|
|
111
|
+
brandLight400: "#d1d5db",
|
|
112
|
+
brandLight500: "#9ca3af",
|
|
113
|
+
brandLight600: "#6b7280",
|
|
114
|
+
brandLight700: "#4b5563",
|
|
115
|
+
brandLight800: "#374151",
|
|
116
|
+
brandLight900: "#1f2937",
|
|
117
|
+
brandLight950: "#111827",
|
|
118
|
+
brandLightDefault: "#F3F4F6",
|
|
119
|
+
// base from brand palette
|
|
120
|
+
// ── Success (green) ───────────────────────────────────────────────
|
|
121
|
+
success50: "#f0fdf4",
|
|
122
|
+
success100: "#dcfce7",
|
|
123
|
+
success200: "#bbf7d0",
|
|
124
|
+
success300: "#86efac",
|
|
125
|
+
success400: "#4ade80",
|
|
126
|
+
success500: "#22c55e",
|
|
127
|
+
success600: "#16a34a",
|
|
128
|
+
success700: "#15803d",
|
|
129
|
+
success800: "#166534",
|
|
130
|
+
success900: "#14532d",
|
|
131
|
+
success950: "#052e16",
|
|
132
|
+
successDefault: "#16a34a",
|
|
133
|
+
// ── Warning (amber) ────────────────────────────────────────────────
|
|
134
|
+
warning50: "#fffbeb",
|
|
135
|
+
warning100: "#fef3c7",
|
|
136
|
+
warning200: "#fde68a",
|
|
137
|
+
warning300: "#fcd34d",
|
|
138
|
+
warning400: "#fbbf24",
|
|
139
|
+
warning500: "#f59e0b",
|
|
140
|
+
warning600: "#d97706",
|
|
141
|
+
warning700: "#b45309",
|
|
142
|
+
warning800: "#92400e",
|
|
143
|
+
warning900: "#78350f",
|
|
144
|
+
warning950: "#451a03",
|
|
145
|
+
warningDefault: "#d97706",
|
|
146
|
+
// ── Danger (red) ───────────────────────────────────────────────────
|
|
147
|
+
danger50: "#fef2f2",
|
|
148
|
+
danger100: "#fee2e2",
|
|
149
|
+
danger200: "#fecaca",
|
|
150
|
+
danger300: "#fca5a5",
|
|
151
|
+
danger400: "#f87171",
|
|
152
|
+
danger500: "#ef4444",
|
|
153
|
+
danger600: "#dc2626",
|
|
154
|
+
danger700: "#b91c1c",
|
|
155
|
+
danger800: "#991b1b",
|
|
156
|
+
danger900: "#7f1d1d",
|
|
157
|
+
danger950: "#450a0a",
|
|
158
|
+
dangerDefault: "#dc2626",
|
|
159
|
+
// ── Info (blue) ────────────────────────────────────────────────────
|
|
160
|
+
info50: "#eff6ff",
|
|
161
|
+
info100: "#dbeafe",
|
|
162
|
+
info200: "#bfdbfe",
|
|
163
|
+
info300: "#93c5fd",
|
|
164
|
+
info400: "#60a5fa",
|
|
165
|
+
info500: "#3b82f6",
|
|
166
|
+
info600: "#2563eb",
|
|
167
|
+
info700: "#1d4ed8",
|
|
168
|
+
info800: "#1e40af",
|
|
169
|
+
info900: "#1e3a8a",
|
|
170
|
+
info950: "#172554",
|
|
171
|
+
infoDefault: "#2563eb",
|
|
172
|
+
// ── Teal (cyan/teal) ───────────────────────────────────────────────
|
|
173
|
+
teal50: "#f0fdfa",
|
|
174
|
+
teal100: "#ccfbf1",
|
|
175
|
+
teal200: "#99f6e4",
|
|
176
|
+
teal300: "#5eead4",
|
|
177
|
+
teal400: "#2dd4bf",
|
|
178
|
+
teal500: "#14b8a6",
|
|
179
|
+
teal600: "#0d9488",
|
|
180
|
+
teal700: "#0f766e",
|
|
181
|
+
teal800: "#115e59",
|
|
182
|
+
teal900: "#134e4a",
|
|
183
|
+
teal950: "#042f2e",
|
|
184
|
+
tealDefault: "#0d9488",
|
|
185
|
+
// ── Orange (deep orange) ───────────────────────────────────────────
|
|
186
|
+
orange50: "#fff7ed",
|
|
187
|
+
orange100: "#ffedd5",
|
|
188
|
+
orange200: "#fed7aa",
|
|
189
|
+
orange300: "#fdba74",
|
|
190
|
+
orange400: "#fb923c",
|
|
191
|
+
orange500: "#f97316",
|
|
192
|
+
orange600: "#ea580c",
|
|
193
|
+
orange700: "#c2410c",
|
|
194
|
+
orange800: "#9a3412",
|
|
195
|
+
orange900: "#7c2d12",
|
|
196
|
+
orange950: "#431407",
|
|
197
|
+
orangeDefault: "#ea580c",
|
|
198
|
+
// ── Rose (soft red/pink) ───────────────────────────────────────────
|
|
199
|
+
rose50: "#fff1f2",
|
|
200
|
+
rose100: "#ffe4e6",
|
|
201
|
+
rose200: "#fecdd3",
|
|
202
|
+
rose300: "#fda4af",
|
|
203
|
+
rose400: "#fb7185",
|
|
204
|
+
rose500: "#f43f5e",
|
|
205
|
+
rose600: "#e11d48",
|
|
206
|
+
rose700: "#be123c",
|
|
207
|
+
rose800: "#9f1239",
|
|
208
|
+
rose900: "#881337",
|
|
209
|
+
rose950: "#4c0519",
|
|
210
|
+
roseDefault: "#e11d48",
|
|
211
|
+
// ── Indigo (deep blue-purple) ──────────────────────────────────────
|
|
212
|
+
indigo50: "#eef2ff",
|
|
213
|
+
indigo100: "#e0e7ff",
|
|
214
|
+
indigo200: "#c7d2fe",
|
|
215
|
+
indigo300: "#a5b4fc",
|
|
216
|
+
indigo400: "#818cf8",
|
|
217
|
+
indigo500: "#6366f1",
|
|
218
|
+
indigo600: "#4f46e5",
|
|
219
|
+
indigo700: "#4338ca",
|
|
220
|
+
indigo800: "#3730a3",
|
|
221
|
+
indigo900: "#312e81",
|
|
222
|
+
indigo950: "#1e1b4b",
|
|
223
|
+
indigoDefault: "#4f46e5",
|
|
224
|
+
// ── Mint (fresh green) ─────────────────────────────────────────────
|
|
225
|
+
mint50: "#ecfdf5",
|
|
226
|
+
mint100: "#d1fae5",
|
|
227
|
+
mint200: "#a7f3d0",
|
|
228
|
+
mint300: "#6ee7b7",
|
|
229
|
+
mint400: "#34d399",
|
|
230
|
+
mint500: "#10b981",
|
|
231
|
+
mint600: "#059669",
|
|
232
|
+
mint700: "#047857",
|
|
233
|
+
mint800: "#065f46",
|
|
234
|
+
mint900: "#064e3b",
|
|
235
|
+
mint950: "#022c22",
|
|
236
|
+
mintDefault: "#059669",
|
|
237
|
+
// ── Coal (dark neutral state) ──────────────────────────────────────
|
|
238
|
+
coal50: "#f8fafc",
|
|
239
|
+
coal100: "#f1f5f9",
|
|
240
|
+
coal200: "#e2e8f0",
|
|
241
|
+
coal300: "#cbd5e1",
|
|
242
|
+
coal400: "#94a3b8",
|
|
243
|
+
coal500: "#64748b",
|
|
244
|
+
coal600: "#475569",
|
|
245
|
+
coal700: "#334155",
|
|
246
|
+
coal800: "#1e293b",
|
|
247
|
+
coal900: "#0f172a",
|
|
248
|
+
coal950: "#020617",
|
|
249
|
+
coalDefault: "#475569"
|
|
250
|
+
},
|
|
251
|
+
// ── Semantic aliases ────────────────────────────────────────────────
|
|
252
|
+
semantic: {
|
|
253
|
+
// Background
|
|
254
|
+
bgBase: "var(--tui-color-white)",
|
|
255
|
+
bgSubtle: "var(--tui-color-brand-black-50)",
|
|
256
|
+
bgMuted: "var(--tui-color-brand-black-100)",
|
|
257
|
+
bgInverse: "var(--tui-color-brand-black-900)",
|
|
258
|
+
// Surface (cards, panels)
|
|
259
|
+
surfaceDefault: "var(--tui-color-white)",
|
|
260
|
+
surfaceRaised: "var(--tui-color-brand-black-50)",
|
|
261
|
+
surfaceOverlay: "var(--tui-color-brand-black-100)",
|
|
262
|
+
// Text
|
|
263
|
+
textPrimary: "var(--tui-color-brand-black-900)",
|
|
264
|
+
textSecondary: "var(--tui-color-brand-gray-600)",
|
|
265
|
+
textTertiary: "var(--tui-color-brand-gray-400)",
|
|
266
|
+
textDisabled: "var(--tui-color-brand-black-300)",
|
|
267
|
+
textInverse: "var(--tui-color-white)",
|
|
268
|
+
textLink: "var(--tui-color-brand-blue-600)",
|
|
269
|
+
textLinkHover: "var(--tui-color-brand-blue-700)",
|
|
270
|
+
// Border
|
|
271
|
+
borderDefault: "var(--tui-color-brand-black-200)",
|
|
272
|
+
borderStrong: "var(--tui-color-brand-black-400)",
|
|
273
|
+
borderFocus: "var(--tui-color-brand-pink-500)",
|
|
274
|
+
// Focus ring
|
|
275
|
+
focusRing: "var(--tui-color-brand-black-500)",
|
|
276
|
+
focusRingGap: "var(--tui-color-white)",
|
|
277
|
+
// Brand interactive (uses brand-pink as primary)
|
|
278
|
+
brandDefault: "var(--tui-color-brand-pink-600)",
|
|
279
|
+
brandHover: "var(--tui-color-brand-pink-700)",
|
|
280
|
+
brandActive: "var(--tui-color-brand-pink-800)",
|
|
281
|
+
brandSubtle: "var(--tui-color-brand-pink-50)",
|
|
282
|
+
brandText: "var(--tui-color-white)",
|
|
283
|
+
// Status
|
|
284
|
+
successDefault: "var(--tui-color-success-600)",
|
|
285
|
+
successSubtle: "var(--tui-color-success-50)",
|
|
286
|
+
successText: "var(--tui-color-success-700)",
|
|
287
|
+
warningDefault: "var(--tui-color-warning-600)",
|
|
288
|
+
warningSubtle: "var(--tui-color-warning-50)",
|
|
289
|
+
warningText: "var(--tui-color-warning-700)",
|
|
290
|
+
dangerDefault: "var(--tui-color-danger-600)",
|
|
291
|
+
dangerSubtle: "var(--tui-color-danger-50)",
|
|
292
|
+
dangerText: "var(--tui-color-danger-700)",
|
|
293
|
+
infoDefault: "var(--tui-color-info-600)",
|
|
294
|
+
infoSubtle: "var(--tui-color-info-50)",
|
|
295
|
+
infoText: "var(--tui-color-info-700)",
|
|
296
|
+
tealDefault: "var(--tui-color-teal-600)",
|
|
297
|
+
tealSubtle: "var(--tui-color-teal-50)",
|
|
298
|
+
tealText: "var(--tui-color-teal-700)",
|
|
299
|
+
orangeDefault: "var(--tui-color-orange-600)",
|
|
300
|
+
orangeSubtle: "var(--tui-color-orange-50)",
|
|
301
|
+
orangeText: "var(--tui-color-orange-700)",
|
|
302
|
+
roseDefault: "var(--tui-color-rose-600)",
|
|
303
|
+
roseSubtle: "var(--tui-color-rose-50)",
|
|
304
|
+
roseText: "var(--tui-color-rose-700)",
|
|
305
|
+
indigoDefault: "var(--tui-color-indigo-600)",
|
|
306
|
+
indigoSubtle: "var(--tui-color-indigo-50)",
|
|
307
|
+
indigoText: "var(--tui-color-indigo-700)",
|
|
308
|
+
mintDefault: "var(--tui-color-mint-600)",
|
|
309
|
+
mintSubtle: "var(--tui-color-mint-50)",
|
|
310
|
+
mintText: "var(--tui-color-mint-700)",
|
|
311
|
+
coalDefault: "var(--tui-color-coal-600)",
|
|
312
|
+
coalSubtle: "var(--tui-color-coal-50)",
|
|
313
|
+
coalText: "var(--tui-color-coal-700)"
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// src/tokens/spacing.ts
|
|
318
|
+
var spacing = {
|
|
319
|
+
0: "0px",
|
|
320
|
+
px: "1px",
|
|
321
|
+
0.5: "0.125rem",
|
|
322
|
+
// 2px
|
|
323
|
+
1: "0.25rem",
|
|
324
|
+
// 4px
|
|
325
|
+
1.5: "0.375rem",
|
|
326
|
+
// 6px
|
|
327
|
+
2: "0.5rem",
|
|
328
|
+
// 8px
|
|
329
|
+
2.5: "0.625rem",
|
|
330
|
+
// 10px
|
|
331
|
+
3: "0.75rem",
|
|
332
|
+
// 12px
|
|
333
|
+
3.5: "0.875rem",
|
|
334
|
+
// 14px
|
|
335
|
+
4: "1rem",
|
|
336
|
+
// 16px
|
|
337
|
+
5: "1.25rem",
|
|
338
|
+
// 20px
|
|
339
|
+
6: "1.5rem",
|
|
340
|
+
// 24px
|
|
341
|
+
7: "1.75rem",
|
|
342
|
+
// 28px
|
|
343
|
+
8: "2rem",
|
|
344
|
+
// 32px
|
|
345
|
+
9: "2.25rem",
|
|
346
|
+
// 36px
|
|
347
|
+
10: "2.5rem",
|
|
348
|
+
// 40px
|
|
349
|
+
11: "2.75rem",
|
|
350
|
+
// 44px
|
|
351
|
+
12: "3rem",
|
|
352
|
+
// 48px
|
|
353
|
+
14: "3.5rem",
|
|
354
|
+
// 56px
|
|
355
|
+
16: "4rem",
|
|
356
|
+
// 64px
|
|
357
|
+
20: "5rem",
|
|
358
|
+
// 80px
|
|
359
|
+
24: "6rem",
|
|
360
|
+
// 96px
|
|
361
|
+
28: "7rem",
|
|
362
|
+
// 112px
|
|
363
|
+
32: "8rem",
|
|
364
|
+
// 128px
|
|
365
|
+
36: "9rem",
|
|
366
|
+
// 144px
|
|
367
|
+
40: "10rem",
|
|
368
|
+
// 160px
|
|
369
|
+
44: "11rem",
|
|
370
|
+
// 176px
|
|
371
|
+
48: "12rem",
|
|
372
|
+
// 192px
|
|
373
|
+
52: "13rem",
|
|
374
|
+
// 208px
|
|
375
|
+
56: "14rem",
|
|
376
|
+
// 224px
|
|
377
|
+
60: "15rem",
|
|
378
|
+
// 240px
|
|
379
|
+
64: "16rem",
|
|
380
|
+
// 256px
|
|
381
|
+
72: "18rem",
|
|
382
|
+
// 288px
|
|
383
|
+
80: "20rem",
|
|
384
|
+
// 320px
|
|
385
|
+
96: "24rem",
|
|
386
|
+
// 384px
|
|
387
|
+
// ── Semantic defaults ────────────────────────────────────────────────
|
|
388
|
+
componentXs: "var(--tui-spacing-1)",
|
|
389
|
+
// tight inner padding (badges)
|
|
390
|
+
componentSm: "var(--tui-spacing-2)",
|
|
391
|
+
// small component padding
|
|
392
|
+
componentMd: "var(--tui-spacing-3)",
|
|
393
|
+
// default component padding
|
|
394
|
+
componentLg: "var(--tui-spacing-4)",
|
|
395
|
+
// large component padding
|
|
396
|
+
componentXl: "var(--tui-spacing-6)",
|
|
397
|
+
// extra-large component padding
|
|
398
|
+
sectionSm: "var(--tui-spacing-6)",
|
|
399
|
+
// small section spacing
|
|
400
|
+
sectionMd: "var(--tui-spacing-8)",
|
|
401
|
+
// default section spacing
|
|
402
|
+
sectionLg: "var(--tui-spacing-12)",
|
|
403
|
+
// large section spacing
|
|
404
|
+
pagePadding: "var(--tui-spacing-4)",
|
|
405
|
+
// page-level side padding
|
|
406
|
+
cardPadding: "var(--tui-spacing-4)",
|
|
407
|
+
// card/panel inner padding
|
|
408
|
+
modalPadding: "var(--tui-spacing-6)",
|
|
409
|
+
// modal/dialog inner padding
|
|
410
|
+
stackSm: "var(--tui-spacing-2)",
|
|
411
|
+
// small vertical stack gap
|
|
412
|
+
stackMd: "var(--tui-spacing-4)",
|
|
413
|
+
// default vertical stack gap
|
|
414
|
+
stackLg: "var(--tui-spacing-6)",
|
|
415
|
+
// large vertical stack gap
|
|
416
|
+
inlineSm: "var(--tui-spacing-2)",
|
|
417
|
+
// small horizontal gap
|
|
418
|
+
inlineMd: "var(--tui-spacing-3)",
|
|
419
|
+
// default horizontal gap
|
|
420
|
+
inlineLg: "var(--tui-spacing-4)"
|
|
421
|
+
// large horizontal gap
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
// src/tokens/typography.ts
|
|
425
|
+
var fontFamily = {
|
|
426
|
+
sans: "'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif",
|
|
427
|
+
serif: "'Georgia', ui-serif, serif",
|
|
428
|
+
mono: "'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace"
|
|
429
|
+
};
|
|
430
|
+
var fontSize = {
|
|
431
|
+
"2xs": "0.625rem",
|
|
432
|
+
// 10px
|
|
433
|
+
xs: "0.75rem",
|
|
434
|
+
// 12px
|
|
435
|
+
sm: "0.875rem",
|
|
436
|
+
// 14px
|
|
437
|
+
md: "1rem",
|
|
438
|
+
// 16px ← base
|
|
439
|
+
lg: "1.125rem",
|
|
440
|
+
// 18px
|
|
441
|
+
xl: "1.25rem",
|
|
442
|
+
// 20px
|
|
443
|
+
"2xl": "1.5rem",
|
|
444
|
+
// 24px
|
|
445
|
+
"3xl": "1.875rem",
|
|
446
|
+
// 30px
|
|
447
|
+
"4xl": "2.25rem",
|
|
448
|
+
// 36px
|
|
449
|
+
"5xl": "3rem",
|
|
450
|
+
// 48px
|
|
451
|
+
"6xl": "3.75rem",
|
|
452
|
+
// 60px
|
|
453
|
+
"7xl": "4.5rem"
|
|
454
|
+
// 72px
|
|
455
|
+
};
|
|
456
|
+
var fontWeight = {
|
|
457
|
+
thin: "100",
|
|
458
|
+
extralight: "200",
|
|
459
|
+
light: "300",
|
|
460
|
+
normal: "400",
|
|
461
|
+
medium: "500",
|
|
462
|
+
semibold: "600",
|
|
463
|
+
bold: "700",
|
|
464
|
+
extrabold: "800",
|
|
465
|
+
black: "900"
|
|
466
|
+
};
|
|
467
|
+
var lineHeight = {
|
|
468
|
+
none: "1",
|
|
469
|
+
tight: "1.25",
|
|
470
|
+
snug: "1.375",
|
|
471
|
+
normal: "1.5",
|
|
472
|
+
relaxed: "1.625",
|
|
473
|
+
loose: "2",
|
|
474
|
+
"3": "0.75rem",
|
|
475
|
+
"4": "1rem",
|
|
476
|
+
"5": "1.25rem",
|
|
477
|
+
"6": "1.5rem",
|
|
478
|
+
"7": "1.75rem",
|
|
479
|
+
"8": "2rem",
|
|
480
|
+
"9": "2.25rem",
|
|
481
|
+
"10": "2.5rem"
|
|
482
|
+
};
|
|
483
|
+
var letterSpacing = {
|
|
484
|
+
tighter: "-0.05em",
|
|
485
|
+
tight: "-0.025em",
|
|
486
|
+
normal: "0em",
|
|
487
|
+
wide: "0.025em",
|
|
488
|
+
wider: "0.05em",
|
|
489
|
+
widest: "0.1em"
|
|
490
|
+
};
|
|
491
|
+
var typography = {
|
|
492
|
+
fontFamily,
|
|
493
|
+
fontSize,
|
|
494
|
+
fontWeight,
|
|
495
|
+
lineHeight,
|
|
496
|
+
letterSpacing
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
// src/tokens/radius.ts
|
|
500
|
+
var radius = {
|
|
501
|
+
none: "0px",
|
|
502
|
+
xs: "0.125rem",
|
|
503
|
+
// 2px
|
|
504
|
+
sm: "0.25rem",
|
|
505
|
+
// 4px
|
|
506
|
+
md: "0.375rem",
|
|
507
|
+
// 6px
|
|
508
|
+
lg: "0.5rem",
|
|
509
|
+
// 8px
|
|
510
|
+
xl: "0.75rem",
|
|
511
|
+
// 12px
|
|
512
|
+
"2xl": "1rem",
|
|
513
|
+
// 16px
|
|
514
|
+
"3xl": "1.5rem",
|
|
515
|
+
// 24px
|
|
516
|
+
full: "9999px",
|
|
517
|
+
// pill / circle
|
|
518
|
+
// ── Semantic defaults ────────────────────────────────────────────────
|
|
519
|
+
default: "var(--tui-radius-md)",
|
|
520
|
+
// default component radius
|
|
521
|
+
button: "var(--tui-radius-md)",
|
|
522
|
+
// buttons
|
|
523
|
+
input: "var(--tui-radius-md)",
|
|
524
|
+
// inputs, selects, textareas
|
|
525
|
+
card: "var(--tui-radius-lg)",
|
|
526
|
+
// cards, panels
|
|
527
|
+
badge: "var(--tui-radius-full)",
|
|
528
|
+
// badges, tags, pills
|
|
529
|
+
avatar: "var(--tui-radius-full)",
|
|
530
|
+
// avatar circles
|
|
531
|
+
modal: "var(--tui-radius-xl)",
|
|
532
|
+
// modals, dialogs
|
|
533
|
+
tooltip: "var(--tui-radius-sm)"
|
|
534
|
+
// tooltips, popovers
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
// src/tokens/shadow.ts
|
|
538
|
+
var shadow = {
|
|
539
|
+
none: "none",
|
|
540
|
+
// Elevation scale
|
|
541
|
+
xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
542
|
+
sm: "0 1px 3px 0 rgb(0 0 0 / 0.10), 0 1px 2px -1px rgb(0 0 0 / 0.10)",
|
|
543
|
+
md: "0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10)",
|
|
544
|
+
lg: "0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10)",
|
|
545
|
+
xl: "0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.10)",
|
|
546
|
+
"2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
547
|
+
// Inner
|
|
548
|
+
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
|
|
549
|
+
// Focus ring (used for keyboard focus)
|
|
550
|
+
focus: "0 0 0 3px var(--tui-color-brand-pink-300, #f0abfc)",
|
|
551
|
+
// Brand focus ring
|
|
552
|
+
focusBrand: "0 0 0 3px var(--tui-color-brand-pink-400, #e879f9)",
|
|
553
|
+
// ── Semantic defaults ────────────────────────────────────────────────
|
|
554
|
+
default: "var(--tui-shadow-sm)",
|
|
555
|
+
// default component shadow
|
|
556
|
+
card: "var(--tui-shadow-md)",
|
|
557
|
+
// cards, panels
|
|
558
|
+
dropdown: "var(--tui-shadow-lg)",
|
|
559
|
+
// dropdowns, menus
|
|
560
|
+
modal: "var(--tui-shadow-xl)",
|
|
561
|
+
// modals, dialogs
|
|
562
|
+
tooltip: "var(--tui-shadow-md)",
|
|
563
|
+
// tooltips, popovers
|
|
564
|
+
button: "var(--tui-shadow-xs)"
|
|
565
|
+
// subtle button lift
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
// src/tokens/border.ts
|
|
569
|
+
var borderWidth = {
|
|
570
|
+
0: "0px",
|
|
571
|
+
0.5: "0.5px",
|
|
572
|
+
1: "1px",
|
|
573
|
+
1.5: "1.5px",
|
|
574
|
+
2: "2px",
|
|
575
|
+
2.5: "2.5px",
|
|
576
|
+
3: "3px",
|
|
577
|
+
3.5: "3.5px",
|
|
578
|
+
4: "4px",
|
|
579
|
+
4.5: "4.5px",
|
|
580
|
+
5: "5px",
|
|
581
|
+
5.5: "5.5px",
|
|
582
|
+
8: "8px",
|
|
583
|
+
none: "0px",
|
|
584
|
+
xs: "0.5px",
|
|
585
|
+
sm: "1px",
|
|
586
|
+
md: "2px",
|
|
587
|
+
lg: "4px",
|
|
588
|
+
xl: "6px",
|
|
589
|
+
"2xl": "12px",
|
|
590
|
+
"3xl": "18px",
|
|
591
|
+
"4xl": "24px",
|
|
592
|
+
"5xl": "30px",
|
|
593
|
+
"6xl": "36px",
|
|
594
|
+
"7xl": "42px",
|
|
595
|
+
"8xl": "48px",
|
|
596
|
+
// ── Semantic defaults ────────────────────────────────────────────────
|
|
597
|
+
default: "var(--tui-border-width-1)",
|
|
598
|
+
// default border width
|
|
599
|
+
input: "var(--tui-border-width-1)",
|
|
600
|
+
// input/select border
|
|
601
|
+
card: "var(--tui-border-width-1)",
|
|
602
|
+
// card border
|
|
603
|
+
divider: "var(--tui-border-width-1)",
|
|
604
|
+
// horizontal/vertical dividers
|
|
605
|
+
thick: "var(--tui-border-width-2)"
|
|
606
|
+
// emphasized borders
|
|
607
|
+
};
|
|
608
|
+
var borderStyle = {
|
|
609
|
+
solid: "solid",
|
|
610
|
+
dashed: "dashed",
|
|
611
|
+
dotted: "dotted",
|
|
612
|
+
none: "none"
|
|
613
|
+
};
|
|
614
|
+
var border = {
|
|
615
|
+
width: borderWidth,
|
|
616
|
+
style: borderStyle
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
// src/tokens/zindex.ts
|
|
620
|
+
var zIndex = {
|
|
621
|
+
hide: "-1",
|
|
622
|
+
auto: "auto",
|
|
623
|
+
base: "0",
|
|
624
|
+
raised: "1",
|
|
625
|
+
dropdown: "1000",
|
|
626
|
+
sticky: "1100",
|
|
627
|
+
overlay: "1200",
|
|
628
|
+
modal: "1300",
|
|
629
|
+
popover: "1400",
|
|
630
|
+
toast: "1500",
|
|
631
|
+
tooltip: "1600"
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
// src/tokens/animation.ts
|
|
635
|
+
var duration = {
|
|
636
|
+
instant: "0ms",
|
|
637
|
+
fast: "100ms",
|
|
638
|
+
normal: "200ms",
|
|
639
|
+
slow: "300ms",
|
|
640
|
+
slower: "500ms",
|
|
641
|
+
slowest: "700ms",
|
|
642
|
+
// ── Semantic defaults ────────────────────────────────────────────────
|
|
643
|
+
default: "var(--tui-duration-normal)",
|
|
644
|
+
// default transition duration
|
|
645
|
+
hover: "var(--tui-duration-fast)",
|
|
646
|
+
// hover state transitions
|
|
647
|
+
modal: "var(--tui-duration-slow)",
|
|
648
|
+
// modal open/close
|
|
649
|
+
tooltip: "var(--tui-duration-fast)",
|
|
650
|
+
// tooltip show/hide
|
|
651
|
+
collapse: "var(--tui-duration-slow)"
|
|
652
|
+
// accordion/collapse
|
|
653
|
+
};
|
|
654
|
+
var easing = {
|
|
655
|
+
linear: "linear",
|
|
656
|
+
in: "cubic-bezier(0.4, 0, 1, 1)",
|
|
657
|
+
out: "cubic-bezier(0, 0, 0.2, 1)",
|
|
658
|
+
inOut: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
659
|
+
bounce: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
660
|
+
spring: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
|
|
661
|
+
// ── Semantic defaults ────────────────────────────────────────────────
|
|
662
|
+
default: "var(--tui-ease-in-out)",
|
|
663
|
+
// default easing
|
|
664
|
+
enter: "var(--tui-ease-out)",
|
|
665
|
+
// elements entering
|
|
666
|
+
exit: "var(--tui-ease-in)"
|
|
667
|
+
// elements exiting
|
|
668
|
+
};
|
|
669
|
+
var animation = {
|
|
670
|
+
duration,
|
|
671
|
+
easing
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
// src/tokens/breakpoint.ts
|
|
675
|
+
var breakpoint = {
|
|
676
|
+
xs: "320px",
|
|
677
|
+
sm: "640px",
|
|
678
|
+
md: "768px",
|
|
679
|
+
lg: "1024px",
|
|
680
|
+
xl: "1280px",
|
|
681
|
+
"2xl": "1536px"
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
// src/tokens/opacity.ts
|
|
685
|
+
var opacity = {
|
|
686
|
+
0: "0",
|
|
687
|
+
5: "0.05",
|
|
688
|
+
10: "0.1",
|
|
689
|
+
20: "0.2",
|
|
690
|
+
25: "0.25",
|
|
691
|
+
30: "0.3",
|
|
692
|
+
35: "0.35",
|
|
693
|
+
40: "0.4",
|
|
694
|
+
45: "0.45",
|
|
695
|
+
50: "0.5",
|
|
696
|
+
55: "0.55",
|
|
697
|
+
60: "0.6",
|
|
698
|
+
65: "0.65",
|
|
699
|
+
70: "0.7",
|
|
700
|
+
75: "0.75",
|
|
701
|
+
80: "0.8",
|
|
702
|
+
85: "0.55",
|
|
703
|
+
90: "0.9",
|
|
704
|
+
95: "0.95",
|
|
705
|
+
100: "1"
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
// src/css-generator.ts
|
|
709
|
+
function toKebab(str) {
|
|
710
|
+
return str.replace(/\./g, "_").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/([a-zA-Z])(\d)/g, "$1-$2").toLowerCase();
|
|
711
|
+
}
|
|
712
|
+
function flattenTokens(obj, prefix = "--tui", skipKeys = []) {
|
|
713
|
+
const result = {};
|
|
714
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
715
|
+
const segment = toKebab(key);
|
|
716
|
+
const varName = skipKeys.includes(key) ? prefix : `${prefix}-${segment}`;
|
|
717
|
+
if (typeof value === "object" && value !== null) {
|
|
718
|
+
Object.assign(result, flattenTokens(value, varName, []));
|
|
719
|
+
} else {
|
|
720
|
+
result[varName] = String(value);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
return result;
|
|
724
|
+
}
|
|
725
|
+
function toCSSRoot(flatTokens, selector = ":root") {
|
|
726
|
+
const lines = Object.entries(flatTokens).map(([prop, value]) => ` ${prop}: ${value};`).join("\n");
|
|
727
|
+
return `${selector} {
|
|
728
|
+
${lines}
|
|
729
|
+
}
|
|
730
|
+
`;
|
|
731
|
+
}
|
|
732
|
+
function generateCSSCategory(categoryName, tokens2, selector = ":root", skipKeys = []) {
|
|
733
|
+
const prefix = `--tui-${toKebab(categoryName)}`;
|
|
734
|
+
const flat = flattenTokens(tokens2, prefix, skipKeys);
|
|
735
|
+
return toCSSRoot(flat, selector);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
// src/index.ts
|
|
739
|
+
var tokens = {
|
|
740
|
+
color,
|
|
741
|
+
spacing,
|
|
742
|
+
typography,
|
|
743
|
+
radius,
|
|
744
|
+
shadow,
|
|
745
|
+
border,
|
|
746
|
+
zIndex,
|
|
747
|
+
animation,
|
|
748
|
+
breakpoint,
|
|
749
|
+
opacity
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
export { animation, border, borderStyle, borderWidth, breakpoint, color, duration, easing, flattenTokens, fontFamily, fontSize, fontWeight, generateCSSCategory, letterSpacing, lineHeight, opacity, radius, shadow, spacing, toCSSRoot, tokens, typography, zIndex };
|
|
753
|
+
//# sourceMappingURL=index.mjs.map
|
|
754
|
+
//# sourceMappingURL=index.mjs.map
|