@gtcx/tokens 0.1.0

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/index.cjs ADDED
@@ -0,0 +1,384 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ borderRadiusPrimitives: () => borderRadiusPrimitives,
24
+ colorPrimitives: () => colorPrimitives,
25
+ darkColors: () => darkColors,
26
+ fontFamilyPrimitives: () => fontFamilyPrimitives,
27
+ fontSizePrimitives: () => fontSizePrimitives,
28
+ fontWeightPrimitives: () => fontWeightPrimitives,
29
+ letterSpacingPrimitives: () => letterSpacingPrimitives,
30
+ lineHeightPrimitives: () => lineHeightPrimitives,
31
+ platformColors: () => platformColors,
32
+ platformSpacing: () => platformSpacing,
33
+ semanticTokens: () => semanticTokens,
34
+ shadowPrimitives: () => shadowPrimitives,
35
+ spacingPrimitives: () => spacingPrimitives
36
+ });
37
+ module.exports = __toCommonJS(index_exports);
38
+
39
+ // src/primitives.ts
40
+ var colorPrimitives = {
41
+ // GTCX brand primary (sky blue)
42
+ primary: {
43
+ 50: "#f0f9ff",
44
+ 100: "#e0f2fe",
45
+ 200: "#bae6fd",
46
+ 300: "#7dd3fc",
47
+ 400: "#38bdf8",
48
+ 500: "#0ea5e9",
49
+ 600: "#0284c7",
50
+ 700: "#0369a1",
51
+ 800: "#075985",
52
+ 900: "#0c4a6e",
53
+ 950: "#082f49"
54
+ },
55
+ secondary: {
56
+ 50: "#faf5ff",
57
+ 100: "#f3e8ff",
58
+ 200: "#e9d5ff",
59
+ 300: "#d8b4fe",
60
+ 400: "#c084fc",
61
+ 500: "#a855f7",
62
+ 600: "#9333ea",
63
+ 700: "#7c3aed",
64
+ 800: "#6b21a8",
65
+ 900: "#581c87",
66
+ 950: "#3b0764"
67
+ },
68
+ success: {
69
+ 50: "#f0fdf4",
70
+ 100: "#dcfce7",
71
+ 200: "#bbf7d0",
72
+ 300: "#86efac",
73
+ 400: "#4ade80",
74
+ 500: "#22c55e",
75
+ 600: "#16a34a",
76
+ 700: "#15803d",
77
+ 800: "#166534",
78
+ 900: "#14532d",
79
+ 950: "#052e16"
80
+ },
81
+ warning: {
82
+ 50: "#fffbeb",
83
+ 100: "#fef3c7",
84
+ 200: "#fde68a",
85
+ 300: "#fcd34d",
86
+ 400: "#fbbf24",
87
+ 500: "#f59e0b",
88
+ 600: "#d97706",
89
+ 700: "#b45309",
90
+ 800: "#92400e",
91
+ 900: "#78350f",
92
+ 950: "#451a03"
93
+ },
94
+ error: {
95
+ 50: "#fef2f2",
96
+ 100: "#fee2e2",
97
+ 200: "#fecaca",
98
+ 300: "#fca5a5",
99
+ 400: "#f87171",
100
+ 500: "#ef4444",
101
+ 600: "#dc2626",
102
+ 700: "#b91c1c",
103
+ 800: "#991b1b",
104
+ 900: "#7f1d1d",
105
+ 950: "#450a0a"
106
+ },
107
+ info: {
108
+ 50: "#eff6ff",
109
+ 100: "#dbeafe",
110
+ 200: "#bfdbfe",
111
+ 300: "#93c5fd",
112
+ 400: "#60a5fa",
113
+ 500: "#3b82f6",
114
+ 600: "#2563eb",
115
+ 700: "#1d4ed8",
116
+ 800: "#1e40af",
117
+ 900: "#1e3a8a",
118
+ 950: "#172554"
119
+ },
120
+ neutral: {
121
+ 50: "#fafafa",
122
+ 100: "#f5f5f5",
123
+ 200: "#e5e5e5",
124
+ 300: "#d4d4d4",
125
+ 400: "#a3a3a3",
126
+ 500: "#737373",
127
+ 600: "#525252",
128
+ 700: "#404040",
129
+ 800: "#262626",
130
+ 900: "#171717",
131
+ 950: "#0a0a0a"
132
+ },
133
+ white: "#ffffff",
134
+ black: "#000000"
135
+ };
136
+ var spacingPrimitives = {
137
+ 0: 0,
138
+ 1: 4,
139
+ 2: 8,
140
+ 3: 12,
141
+ 4: 16,
142
+ 5: 20,
143
+ 6: 24,
144
+ 8: 32,
145
+ 10: 40,
146
+ 12: 48,
147
+ 16: 64,
148
+ 20: 80,
149
+ 24: 96,
150
+ 32: 128
151
+ };
152
+ var fontSizePrimitives = {
153
+ xs: 12,
154
+ sm: 14,
155
+ base: 16,
156
+ lg: 18,
157
+ xl: 20,
158
+ "2xl": 24,
159
+ "3xl": 30,
160
+ "4xl": 36,
161
+ "5xl": 48
162
+ };
163
+ var fontWeightPrimitives = {
164
+ normal: 400,
165
+ medium: 500,
166
+ semibold: 600,
167
+ bold: 700
168
+ };
169
+ var lineHeightPrimitives = {
170
+ tight: 1.2,
171
+ normal: 1.5,
172
+ relaxed: 1.7
173
+ };
174
+ var letterSpacingPrimitives = {
175
+ tight: "-0.025em",
176
+ normal: "0em",
177
+ wide: "0.025em"
178
+ };
179
+ var borderRadiusPrimitives = {
180
+ none: 0,
181
+ sm: 2,
182
+ md: 4,
183
+ lg: 8,
184
+ xl: 12,
185
+ full: 9999
186
+ };
187
+ var shadowPrimitives = {
188
+ none: "none",
189
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
190
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
191
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
192
+ };
193
+ var fontFamilyPrimitives = {
194
+ sans: "Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
195
+ mono: "JetBrains Mono, Fira Code, Consolas, monospace",
196
+ serif: "Georgia, 'Times New Roman', serif"
197
+ };
198
+
199
+ // src/semantic.ts
200
+ var semanticTokens = {
201
+ colors: {
202
+ // Brand
203
+ primary: colorPrimitives.primary[500],
204
+ primaryHover: colorPrimitives.primary[600],
205
+ primaryActive: colorPrimitives.primary[700],
206
+ primaryBg: colorPrimitives.primary[50],
207
+ secondary: colorPrimitives.secondary[500],
208
+ secondaryHover: colorPrimitives.secondary[600],
209
+ // Feedback
210
+ success: colorPrimitives.success[500],
211
+ warning: colorPrimitives.warning[500],
212
+ error: colorPrimitives.error[500],
213
+ info: colorPrimitives.info[500],
214
+ // Domain-specific semantic colors
215
+ profit: "#10b981",
216
+ loss: "#ef4444",
217
+ approved: "#059669",
218
+ pending: "#d97706",
219
+ rejected: "#dc2626",
220
+ secure: "#059669",
221
+ insecure: "#dc2626",
222
+ // Text
223
+ textPrimary: colorPrimitives.neutral[900],
224
+ textSecondary: colorPrimitives.neutral[600],
225
+ textTertiary: colorPrimitives.neutral[500],
226
+ textMuted: colorPrimitives.neutral[400],
227
+ textInverse: colorPrimitives.neutral[50],
228
+ // Backgrounds
229
+ bgPage: colorPrimitives.neutral[50],
230
+ bgSurface: colorPrimitives.white,
231
+ bgSurfaceHover: colorPrimitives.neutral[100],
232
+ bgSurfaceTertiary: colorPrimitives.neutral[200],
233
+ bgInverse: colorPrimitives.neutral[900],
234
+ bgSidebar: colorPrimitives.white,
235
+ bgHeader: colorPrimitives.white,
236
+ // Borders
237
+ border: colorPrimitives.neutral[200],
238
+ borderLight: colorPrimitives.neutral[100],
239
+ borderSecondary: colorPrimitives.neutral[300],
240
+ borderFocus: colorPrimitives.primary[500],
241
+ // Links
242
+ link: colorPrimitives.primary[600],
243
+ linkHover: colorPrimitives.primary[700]
244
+ },
245
+ spacing: {
246
+ pageGutter: spacingPrimitives[6],
247
+ cardPadding: spacingPrimitives[4],
248
+ sectionGap: spacingPrimitives[6],
249
+ componentGap: spacingPrimitives[3],
250
+ inlineGap: spacingPrimitives[2],
251
+ component: {
252
+ button: { paddingX: spacingPrimitives[4], paddingY: spacingPrimitives[2], gap: spacingPrimitives[2] },
253
+ input: { paddingX: spacingPrimitives[3], paddingY: spacingPrimitives[2] },
254
+ card: { padding: spacingPrimitives[6], gap: spacingPrimitives[4] },
255
+ form: { fieldGap: spacingPrimitives[4], sectionGap: spacingPrimitives[8], labelGap: spacingPrimitives[2] },
256
+ modal: { padding: spacingPrimitives[6], gap: spacingPrimitives[4] },
257
+ table: { cellPadding: spacingPrimitives[4], headerPadding: spacingPrimitives[4] }
258
+ },
259
+ layout: {
260
+ container: { paddingX: spacingPrimitives[4], paddingY: spacingPrimitives[6] },
261
+ section: { marginY: spacingPrimitives[12], gap: spacingPrimitives[8] },
262
+ page: { marginY: spacingPrimitives[16], paddingX: spacingPrimitives[6] }
263
+ }
264
+ },
265
+ typography: {
266
+ fontFamily: fontFamilyPrimitives.sans,
267
+ fontFamilyCode: fontFamilyPrimitives.mono,
268
+ fontFamilySerif: fontFamilyPrimitives.serif,
269
+ display: {
270
+ lg: { fontSize: fontSizePrimitives["5xl"], fontWeight: fontWeightPrimitives.bold, lineHeight: lineHeightPrimitives.tight, letterSpacing: letterSpacingPrimitives.tight },
271
+ md: { fontSize: fontSizePrimitives["4xl"], fontWeight: fontWeightPrimitives.bold, lineHeight: lineHeightPrimitives.tight },
272
+ sm: { fontSize: fontSizePrimitives["3xl"], fontWeight: fontWeightPrimitives.semibold, lineHeight: lineHeightPrimitives.tight }
273
+ },
274
+ heading: {
275
+ h1: { fontSize: fontSizePrimitives["3xl"], fontWeight: fontWeightPrimitives.bold, lineHeight: lineHeightPrimitives.tight },
276
+ h2: { fontSize: fontSizePrimitives["2xl"], fontWeight: fontWeightPrimitives.semibold, lineHeight: lineHeightPrimitives.tight },
277
+ h3: { fontSize: fontSizePrimitives.xl, fontWeight: fontWeightPrimitives.semibold, lineHeight: lineHeightPrimitives.normal },
278
+ h4: { fontSize: fontSizePrimitives.lg, fontWeight: fontWeightPrimitives.medium, lineHeight: lineHeightPrimitives.normal }
279
+ },
280
+ body: {
281
+ lg: { fontSize: fontSizePrimitives.lg, fontWeight: fontWeightPrimitives.normal, lineHeight: lineHeightPrimitives.relaxed },
282
+ md: { fontSize: fontSizePrimitives.base, fontWeight: fontWeightPrimitives.normal, lineHeight: lineHeightPrimitives.normal },
283
+ sm: { fontSize: fontSizePrimitives.sm, fontWeight: fontWeightPrimitives.normal, lineHeight: lineHeightPrimitives.normal }
284
+ },
285
+ caption: { fontSize: fontSizePrimitives.xs, fontWeight: fontWeightPrimitives.normal, lineHeight: lineHeightPrimitives.normal },
286
+ button: {
287
+ lg: { fontSize: fontSizePrimitives.lg, fontWeight: fontWeightPrimitives.medium },
288
+ md: { fontSize: fontSizePrimitives.base, fontWeight: fontWeightPrimitives.medium },
289
+ sm: { fontSize: fontSizePrimitives.sm, fontWeight: fontWeightPrimitives.medium }
290
+ }
291
+ },
292
+ radii: {
293
+ component: borderRadiusPrimitives.md,
294
+ card: borderRadiusPrimitives.lg,
295
+ button: borderRadiusPrimitives.md,
296
+ input: borderRadiusPrimitives.md,
297
+ tag: borderRadiusPrimitives.sm,
298
+ avatar: borderRadiusPrimitives.full
299
+ },
300
+ shadows: {
301
+ card: shadowPrimitives.sm,
302
+ dropdown: shadowPrimitives.md,
303
+ modal: shadowPrimitives.lg
304
+ },
305
+ layout: {
306
+ sidebarWidth: 240,
307
+ sidebarCollapsedWidth: 72,
308
+ headerHeight: 56,
309
+ contentMaxWidth: 1440
310
+ }
311
+ };
312
+
313
+ // src/platform.ts
314
+ var platformColors = {
315
+ crx: {
316
+ primary: colorPrimitives.primary[600],
317
+ secondary: colorPrimitives.secondary[600],
318
+ accent: colorPrimitives.info[500],
319
+ gradient: "linear-gradient(135deg, #1e293b 0%, #0f172a 100%)"
320
+ },
321
+ sgx: {
322
+ primary: colorPrimitives.primary[700],
323
+ secondary: colorPrimitives.secondary[700],
324
+ accent: colorPrimitives.warning[500],
325
+ gradient: "linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%)"
326
+ },
327
+ agx: {
328
+ primary: colorPrimitives.primary[500],
329
+ secondary: colorPrimitives.secondary[500],
330
+ accent: colorPrimitives.success[500],
331
+ gradient: "linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%)"
332
+ }
333
+ };
334
+ var platformSpacing = {
335
+ crx: {
336
+ density: "comfortable",
337
+ basePadding: spacingPrimitives[5],
338
+ baseGap: spacingPrimitives[4]
339
+ },
340
+ sgx: {
341
+ density: "spacious",
342
+ basePadding: spacingPrimitives[6],
343
+ baseGap: spacingPrimitives[5]
344
+ },
345
+ agx: {
346
+ density: "compact",
347
+ basePadding: spacingPrimitives[4],
348
+ baseGap: spacingPrimitives[3]
349
+ }
350
+ };
351
+
352
+ // src/dark.ts
353
+ var darkColors = {
354
+ text: {
355
+ primary: colorPrimitives.neutral[50],
356
+ secondary: colorPrimitives.neutral[300],
357
+ tertiary: colorPrimitives.neutral[400]
358
+ },
359
+ background: {
360
+ primary: colorPrimitives.neutral[900],
361
+ secondary: colorPrimitives.neutral[800],
362
+ tertiary: colorPrimitives.neutral[700]
363
+ },
364
+ border: {
365
+ primary: colorPrimitives.neutral[700],
366
+ secondary: colorPrimitives.neutral[600]
367
+ }
368
+ };
369
+ // Annotate the CommonJS export names for ESM import in node:
370
+ 0 && (module.exports = {
371
+ borderRadiusPrimitives,
372
+ colorPrimitives,
373
+ darkColors,
374
+ fontFamilyPrimitives,
375
+ fontSizePrimitives,
376
+ fontWeightPrimitives,
377
+ letterSpacingPrimitives,
378
+ lineHeightPrimitives,
379
+ platformColors,
380
+ platformSpacing,
381
+ semanticTokens,
382
+ shadowPrimitives,
383
+ spacingPrimitives
384
+ });