@titan-design/react-ui 0.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.
@@ -0,0 +1,1481 @@
1
+ import { Platform } from 'react-native';
2
+
3
+ // src/theme/tokens/primitives.ts
4
+ var primitiveColors = {
5
+ // Blue scale (primary brand)
6
+ blue: {
7
+ 50: "#EFF6FF",
8
+ 100: "#DBEAFE",
9
+ 200: "#BFDBFE",
10
+ 300: "#93C5FD",
11
+ 400: "#60A5FA",
12
+ 500: "#3B82F6",
13
+ 600: "#5048E5",
14
+ // Primary main
15
+ 700: "#3832A0",
16
+ // Primary dark
17
+ 800: "#1E40AF",
18
+ 900: "#1E3A8A"
19
+ },
20
+ // Green scale (secondary brand)
21
+ green: {
22
+ 50: "#ECFDF5",
23
+ 100: "#D1FAE5",
24
+ 200: "#A7F3D0",
25
+ 300: "#6EE7B7",
26
+ 400: "#3FC79A",
27
+ // Secondary light
28
+ 500: "#10B981",
29
+ // Secondary main
30
+ 600: "#059669",
31
+ 700: "#0B815A",
32
+ // Secondary dark
33
+ 800: "#065F46",
34
+ 900: "#064E3B"
35
+ },
36
+ // Teal scale (success)
37
+ teal: {
38
+ 50: "#F0FDFA",
39
+ 100: "#CCFBF1",
40
+ 200: "#99F6E4",
41
+ 300: "#5EEAD4",
42
+ 400: "#43C6B7",
43
+ // Success light
44
+ 500: "#14B8A6",
45
+ // Success main
46
+ 600: "#0D9488",
47
+ 700: "#0E8074",
48
+ // Success dark
49
+ 800: "#115E59",
50
+ 900: "#134E4A"
51
+ },
52
+ // Red scale (error)
53
+ red: {
54
+ 50: "#FEF2F2",
55
+ 100: "#FEE2E2",
56
+ 200: "#FECACA",
57
+ 300: "#FCA5A5",
58
+ 400: "#DA6868",
59
+ // Error light
60
+ 500: "#EF4444",
61
+ 600: "#D14343",
62
+ // Error main
63
+ 700: "#922E2E",
64
+ // Error dark
65
+ 800: "#991B1B",
66
+ 900: "#7F1D1D"
67
+ },
68
+ // Amber scale (warning)
69
+ amber: {
70
+ 50: "#FFFBEB",
71
+ 100: "#FEF3C7",
72
+ 200: "#FDE68A",
73
+ 300: "#FCD34D",
74
+ 400: "#FFBF4C",
75
+ // Warning light
76
+ 500: "#FFB020",
77
+ // Warning main
78
+ 600: "#B27B16",
79
+ // Warning dark
80
+ 700: "#B45309",
81
+ 800: "#92400E",
82
+ 900: "#78350F"
83
+ },
84
+ // Sky/Blue scale (info)
85
+ sky: {
86
+ 50: "#F0F9FF",
87
+ 100: "#E0F2FE",
88
+ 200: "#BAE6FD",
89
+ 300: "#7DD3FC",
90
+ 400: "#64B6F7",
91
+ // Info light
92
+ 500: "#2196F3",
93
+ // Info main
94
+ 600: "#0284C7",
95
+ 700: "#0B79D0",
96
+ // Info dark
97
+ 800: "#075985",
98
+ 900: "#0C4A6E"
99
+ },
100
+ // Neutral/Gray scale
101
+ neutral: {
102
+ 50: "#FAFAFA",
103
+ 100: "#F3F4F6",
104
+ 200: "#E5E7EB",
105
+ 300: "#D1D5DB",
106
+ 400: "#9CA3AF",
107
+ 500: "#6B7280",
108
+ 600: "#4B5563",
109
+ 700: "#374151",
110
+ 800: "#1F2937",
111
+ 900: "#111827",
112
+ 950: "#030712"
113
+ },
114
+ // Orange scale (accent/brand color)
115
+ accent: {
116
+ 100: "#FFA860",
117
+ 200: "#FF9630",
118
+ 300: "#FF8500",
119
+ 400: "#FF7900",
120
+ 500: "#F56C00",
121
+ 600: "#E06D10",
122
+ 700: "#D0620C",
123
+ 800: "#B75500",
124
+ 900: "#A34900"
125
+ },
126
+ // Charcoal scale (dark backgrounds)
127
+ charcoal: {
128
+ 0: "#6E6E6E",
129
+ 50: "#5D5D5D",
130
+ 100: "#4C4C4C",
131
+ 200: "#3C3C3C",
132
+ 300: "#2C2C2C",
133
+ 400: "#1F1F1F",
134
+ 500: "#1C1C1C",
135
+ 600: "#191919",
136
+ 700: "#161616",
137
+ 800: "#131313",
138
+ 900: "#101010"
139
+ },
140
+ // Steel scale (cool accent)
141
+ steel: {
142
+ 100: "#8AA4B8",
143
+ 200: "#7894A8",
144
+ 300: "#678498",
145
+ 400: "#557488",
146
+ 500: "#406D87",
147
+ 600: "#39617A",
148
+ 700: "#32556D",
149
+ 800: "#243D53",
150
+ 900: "#1D3146"
151
+ },
152
+ // Pure colors
153
+ white: "#FFFFFF",
154
+ black: "#000000",
155
+ transparent: "transparent"
156
+ };
157
+ var discreteRainbow = [
158
+ "#E8ECFB",
159
+ "#D9CCE3",
160
+ "#D1BBD7",
161
+ "#CAACCB",
162
+ "#BA8DB4",
163
+ "#AE76A3",
164
+ "#AA6F9E",
165
+ "#994F88",
166
+ "#882E72",
167
+ "#1965B0",
168
+ "#437DBF",
169
+ "#5289C7",
170
+ "#6195CF",
171
+ "#7BAFDE",
172
+ "#4EB265",
173
+ "#90C987",
174
+ "#CAE0AB",
175
+ "#F7F056",
176
+ "#F7CB45",
177
+ "#F6C141",
178
+ "#F4A736",
179
+ "#F1932D",
180
+ "#EE8026",
181
+ "#E8601C",
182
+ "#E65518",
183
+ "#DC050C",
184
+ "#A5170E",
185
+ "#72190E",
186
+ "#42150A"
187
+ ];
188
+ var discreteRainbowPalettes = [
189
+ [10],
190
+ [10, 26],
191
+ [10, 18, 26],
192
+ [10, 15, 18, 26],
193
+ [10, 14, 15, 18, 26],
194
+ [10, 14, 15, 17, 18, 26],
195
+ [9, 10, 14, 15, 17, 18, 26],
196
+ [9, 10, 14, 15, 17, 18, 23, 26],
197
+ [9, 10, 14, 15, 17, 18, 23, 26, 28],
198
+ [9, 10, 14, 15, 17, 18, 21, 24, 26, 28],
199
+ [9, 10, 12, 14, 15, 17, 18, 21, 24, 26, 28],
200
+ [3, 6, 9, 10, 12, 14, 15, 17, 18, 21, 24, 26],
201
+ [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 21, 24, 26],
202
+ [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26],
203
+ [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],
204
+ [3, 5, 7, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],
205
+ [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],
206
+ [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],
207
+ [2, 4, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],
208
+ [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],
209
+ [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28],
210
+ [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29],
211
+ [1, 2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29]
212
+ ];
213
+ function getDiscreteRainbowColor(index, size) {
214
+ index = Math.max(0, index);
215
+ size = Math.min(Math.max(1, size), discreteRainbowPalettes.length);
216
+ const palette = discreteRainbowPalettes[size - 1];
217
+ if (index >= palette.length) index = index % palette.length;
218
+ return discreteRainbow[palette[index] - 1];
219
+ }
220
+ var primitiveTypography = {
221
+ fontFamilies: {
222
+ sans: ["Inter", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Helvetica", "Arial", "sans-serif"],
223
+ body: ["Nunito Sans", "sans-serif"],
224
+ heading: ["Space Grotesk", "sans-serif"],
225
+ mono: ["SF Mono", "Monaco", "Inconsolata", "Fira Mono", "Droid Sans Mono", "Source Code Pro", "monospace"]
226
+ },
227
+ fontSizes: {
228
+ xs: "0.75rem",
229
+ // 12px
230
+ sm: "0.875rem",
231
+ // 14px
232
+ base: "1rem",
233
+ // 16px
234
+ lg: "1.125rem",
235
+ // 18px
236
+ xl: "1.5rem",
237
+ // 24px
238
+ "2xl": "2rem",
239
+ // 32px
240
+ "3xl": "2.25rem",
241
+ // 36px
242
+ "4xl": "3rem",
243
+ // 48px
244
+ "5xl": "3.5rem"
245
+ // 56px
246
+ },
247
+ fontWeights: {
248
+ normal: 400,
249
+ medium: 500,
250
+ semibold: 600,
251
+ bold: 700
252
+ },
253
+ lineHeights: {
254
+ none: 1,
255
+ tight: 1.375,
256
+ snug: 1.5,
257
+ normal: 1.57,
258
+ relaxed: 1.66,
259
+ loose: 1.75
260
+ },
261
+ letterSpacing: {
262
+ tighter: "-0.05em",
263
+ tight: "-0.025em",
264
+ normal: "0em",
265
+ wide: "0.025em",
266
+ wider: "0.05em",
267
+ widest: "0.5px"
268
+ }
269
+ };
270
+ var primitiveSpacing = {
271
+ 0: "0",
272
+ px: "1px",
273
+ 0.5: "0.125rem",
274
+ // 2px
275
+ 1: "0.25rem",
276
+ // 4px
277
+ 1.5: "0.375rem",
278
+ // 6px
279
+ 2: "0.5rem",
280
+ // 8px
281
+ 2.5: "0.625rem",
282
+ // 10px
283
+ 3: "0.75rem",
284
+ // 12px
285
+ 3.5: "0.875rem",
286
+ // 14px
287
+ 4: "1rem",
288
+ // 16px
289
+ 5: "1.25rem",
290
+ // 20px
291
+ 6: "1.5rem",
292
+ // 24px
293
+ 7: "1.75rem",
294
+ // 28px
295
+ 8: "2rem",
296
+ // 32px
297
+ 9: "2.25rem",
298
+ // 36px
299
+ 10: "2.5rem",
300
+ // 40px
301
+ 11: "2.75rem",
302
+ // 44px
303
+ 12: "3rem",
304
+ // 48px
305
+ 14: "3.5rem",
306
+ // 56px
307
+ 16: "4rem",
308
+ // 64px
309
+ 20: "5rem",
310
+ // 80px
311
+ 24: "6rem",
312
+ // 96px
313
+ 28: "7rem",
314
+ // 112px
315
+ 32: "8rem"
316
+ // 128px
317
+ };
318
+ var primitiveBorderRadius = {
319
+ none: "0",
320
+ sm: "4px",
321
+ DEFAULT: "8px",
322
+ md: "8px",
323
+ lg: "12px",
324
+ xl: "16px",
325
+ "2xl": "24px",
326
+ full: "9999px"
327
+ };
328
+ var primitiveShadows = {
329
+ none: "none",
330
+ sm: "0px 1px 2px rgba(100, 116, 139, 0.12)",
331
+ DEFAULT: "0px 1px 3px rgba(100, 116, 139, 0.12), 0px 1px 2px rgba(100, 116, 139, 0.24)",
332
+ md: "0px 4px 6px rgba(100, 116, 139, 0.12)",
333
+ lg: "0px 10px 15px rgba(100, 116, 139, 0.12)",
334
+ xl: "0px 20px 25px rgba(100, 116, 139, 0.12)",
335
+ "2xl": "0px 25px 50px rgba(100, 116, 139, 0.25)",
336
+ inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
337
+ };
338
+ var primitiveBreakpoints = {
339
+ xs: 0,
340
+ sm: 600,
341
+ md: 1e3,
342
+ lg: 1200,
343
+ xl: 1920
344
+ };
345
+ var primitiveZIndex = {
346
+ hide: -1,
347
+ auto: "auto",
348
+ base: 0,
349
+ docked: 10,
350
+ dropdown: 1e3,
351
+ sticky: 1100,
352
+ drawer: 1100,
353
+ banner: 1200,
354
+ appBar: 1200,
355
+ overlay: 1300,
356
+ modal: 1400,
357
+ popover: 1500,
358
+ skipLink: 1600,
359
+ toast: 1700,
360
+ tooltip: 1800
361
+ };
362
+
363
+ // src/theme/tokens/semantic.ts
364
+ var semanticColorsLight = {
365
+ // Brand colors (brand-*)
366
+ "brand-primary": primitiveColors.accent[400],
367
+ // #FF7900
368
+ "brand-primary-light": primitiveColors.accent[200],
369
+ // #FF9630
370
+ "brand-primary-dark": primitiveColors.accent[700],
371
+ // #D0620C
372
+ "brand-primary-subtle": "rgba(255, 121, 0, 0.08)",
373
+ "brand-primary-hover": primitiveColors.accent[500],
374
+ "brand-primary-active": primitiveColors.accent[600],
375
+ "brand-secondary": primitiveColors.steel[500],
376
+ // #406D87
377
+ "brand-secondary-light": primitiveColors.steel[300],
378
+ // #678498
379
+ "brand-secondary-dark": primitiveColors.steel[700],
380
+ // #32556D
381
+ "brand-secondary-subtle": "rgba(64, 109, 135, 0.08)",
382
+ "brand-secondary-hover": primitiveColors.steel[600],
383
+ "brand-secondary-active": primitiveColors.steel[700],
384
+ // Text on brand backgrounds (on-*)
385
+ "on-brand-primary": primitiveColors.white,
386
+ "on-brand-secondary": primitiveColors.white,
387
+ // Status colors (status-*)
388
+ "status-success": primitiveColors.teal[500],
389
+ // #14B8A6
390
+ "status-success-light": primitiveColors.teal[400],
391
+ // #43C6B7
392
+ "status-success-dark": primitiveColors.teal[700],
393
+ // #0E8074
394
+ "status-success-subtle": primitiveColors.teal[50],
395
+ "status-error": primitiveColors.red[600],
396
+ // #D14343
397
+ "status-error-light": primitiveColors.red[400],
398
+ // #DA6868
399
+ "status-error-dark": primitiveColors.red[700],
400
+ // #922E2E
401
+ "status-error-subtle": primitiveColors.red[50],
402
+ "status-warning": primitiveColors.amber[500],
403
+ // #FFB020
404
+ "status-warning-light": primitiveColors.amber[400],
405
+ // #FFBF4C
406
+ "status-warning-dark": primitiveColors.amber[600],
407
+ // #B27B16
408
+ "status-warning-subtle": primitiveColors.amber[50],
409
+ "status-info": primitiveColors.sky[500],
410
+ // #2196F3
411
+ "status-info-light": primitiveColors.sky[400],
412
+ // #64B6F7
413
+ "status-info-dark": primitiveColors.sky[700],
414
+ // #0B79D0
415
+ "status-info-subtle": primitiveColors.sky[50],
416
+ // Text on status backgrounds (on-status-*)
417
+ "on-status-success": primitiveColors.white,
418
+ "on-status-error": primitiveColors.white,
419
+ "on-status-warning": primitiveColors.white,
420
+ "on-status-info": primitiveColors.white,
421
+ // Result/outcome indicators (result-*)
422
+ "result-improve": "#4caf50",
423
+ // Green - positive outcome
424
+ "result-improve-light": "rgba(76, 175, 80, 0.12)",
425
+ "result-improve-dark": "#248a24",
426
+ "result-degrade": "#ef5350",
427
+ // Red - negative outcome
428
+ "result-degrade-light": "rgba(239, 83, 80, 0.12)",
429
+ "result-degrade-dark": "#b30000",
430
+ "result-inconclusive": "#9E9A97",
431
+ // Gray - no clear result
432
+ "result-inconclusive-light": "rgba(158, 154, 151, 0.12)",
433
+ "result-neutral": primitiveColors.neutral[500],
434
+ // Neutral baseline
435
+ // Text on result backgrounds (on-result-*)
436
+ "on-result-improve": primitiveColors.white,
437
+ "on-result-degrade": primitiveColors.white,
438
+ "on-result-inconclusive": primitiveColors.white,
439
+ // Data visualization colors (data-*)
440
+ // First 10 colors from discrete rainbow optimized for charts
441
+ "data-1": discreteRainbow[9],
442
+ // #1965B0 - Blue
443
+ "data-2": discreteRainbow[14],
444
+ // #4EB265 - Green
445
+ "data-3": discreteRainbow[17],
446
+ // #F7F056 - Yellow
447
+ "data-4": discreteRainbow[25],
448
+ // #DC050C - Red
449
+ "data-5": discreteRainbow[8],
450
+ // #882E72 - Purple
451
+ "data-6": discreteRainbow[20],
452
+ // #F4A736 - Orange
453
+ "data-7": discreteRainbow[13],
454
+ // #7BAFDE - Light Blue
455
+ "data-8": discreteRainbow[15],
456
+ // #90C987 - Light Green
457
+ "data-9": discreteRainbow[3],
458
+ // #CAACCB - Lavender
459
+ "data-10": discreteRainbow[22],
460
+ // #EE8026 - Dark Orange
461
+ // Text colors (text-*)
462
+ "text-primary": "#121828",
463
+ "text-secondary": "#65748B",
464
+ "text-tertiary": primitiveColors.neutral[400],
465
+ "text-disabled": "rgba(55, 65, 81, 0.48)",
466
+ "text-inverse": primitiveColors.white,
467
+ "text-link": primitiveColors.blue[600],
468
+ "text-link-hover": primitiveColors.blue[700],
469
+ // Surface colors (surface-*) - for elevated containers
470
+ "surface-base": primitiveColors.white,
471
+ "surface-elevated": primitiveColors.neutral[50],
472
+ // #FAFAFA - slightly off-white for elevated cards
473
+ "surface-raised": primitiveColors.neutral[100],
474
+ // #F3F4F6 - light gray for raised cards
475
+ "surface-overlay": primitiveColors.white,
476
+ "surface-input": primitiveColors.neutral[50],
477
+ // Input field background (filled variant)
478
+ // Background colors (background-*)
479
+ "background-base": "#EBEBEB",
480
+ "background-default": primitiveColors.white,
481
+ "background-subtle": primitiveColors.neutral[50],
482
+ // Border colors (border-*)
483
+ "border-default": "#E8E9EB",
484
+ "border-subtle": primitiveColors.neutral[100],
485
+ "border-strong": primitiveColors.neutral[300],
486
+ "border-focus": primitiveColors.blue[600],
487
+ "border-input": primitiveColors.neutral[300],
488
+ // Input field border
489
+ "border-input-hover": primitiveColors.neutral[400],
490
+ // Input field border on hover
491
+ "border-input-focus": primitiveColors.blue[600],
492
+ // Input field border on focus
493
+ "border-input-error": primitiveColors.red[600],
494
+ // Input field border on error
495
+ // Interactive states (interactive-*)
496
+ "interactive-hover": "rgba(55, 65, 81, 0.04)",
497
+ "interactive-focus": "rgba(55, 65, 81, 0.12)",
498
+ "interactive-active": "rgba(55, 65, 81, 0.16)",
499
+ "interactive-selected": "rgba(55, 65, 81, 0.08)",
500
+ "interactive-disabled": "rgba(55, 65, 81, 0.12)",
501
+ "interactive-disabled-text": "rgba(55, 65, 81, 0.26)",
502
+ // Divider
503
+ "divider": "#E8E9EB",
504
+ // Avatar default
505
+ "avatar-background": primitiveColors.neutral[500],
506
+ "avatar-text": primitiveColors.white
507
+ };
508
+ var semanticColorsDark = {
509
+ // Brand colors stay the same in dark mode
510
+ "brand-primary": primitiveColors.accent[400],
511
+ "brand-primary-light": primitiveColors.accent[200],
512
+ "brand-primary-dark": primitiveColors.accent[700],
513
+ "brand-primary-subtle": "rgba(255, 121, 0, 0.12)",
514
+ "brand-primary-hover": primitiveColors.accent[300],
515
+ "brand-primary-active": primitiveColors.accent[200],
516
+ "brand-secondary": primitiveColors.steel[500],
517
+ "brand-secondary-light": primitiveColors.steel[300],
518
+ "brand-secondary-dark": primitiveColors.steel[700],
519
+ "brand-secondary-subtle": "rgba(64, 109, 135, 0.12)",
520
+ "brand-secondary-hover": primitiveColors.steel[400],
521
+ "brand-secondary-active": primitiveColors.steel[300],
522
+ // Text on brand backgrounds
523
+ "on-brand-primary": primitiveColors.white,
524
+ "on-brand-secondary": primitiveColors.white,
525
+ // Status colors
526
+ "status-success": primitiveColors.teal[500],
527
+ "status-success-light": primitiveColors.teal[400],
528
+ "status-success-dark": primitiveColors.teal[700],
529
+ "status-success-subtle": "rgba(20, 184, 166, 0.12)",
530
+ "status-error": primitiveColors.red[600],
531
+ "status-error-light": primitiveColors.red[400],
532
+ "status-error-dark": primitiveColors.red[700],
533
+ "status-error-subtle": "rgba(209, 67, 67, 0.12)",
534
+ "status-warning": primitiveColors.amber[500],
535
+ "status-warning-light": primitiveColors.amber[400],
536
+ "status-warning-dark": primitiveColors.amber[600],
537
+ "status-warning-subtle": "rgba(255, 176, 32, 0.12)",
538
+ "status-info": primitiveColors.sky[500],
539
+ "status-info-light": primitiveColors.sky[400],
540
+ "status-info-dark": primitiveColors.sky[700],
541
+ "status-info-subtle": "rgba(33, 150, 243, 0.12)",
542
+ // Text on status backgrounds
543
+ "on-status-success": primitiveColors.white,
544
+ "on-status-error": primitiveColors.white,
545
+ "on-status-warning": primitiveColors.white,
546
+ "on-status-info": primitiveColors.white,
547
+ // Result/outcome indicators (result-*)
548
+ "result-improve": "#4caf50",
549
+ "result-improve-light": "rgba(76, 175, 80, 0.16)",
550
+ "result-improve-dark": "#248a24",
551
+ "result-degrade": "#ef5350",
552
+ "result-degrade-light": "rgba(239, 83, 80, 0.16)",
553
+ "result-degrade-dark": "#b30000",
554
+ "result-inconclusive": "#9E9A97",
555
+ "result-inconclusive-light": "rgba(158, 154, 151, 0.16)",
556
+ "result-neutral": primitiveColors.neutral[400],
557
+ // Text on result backgrounds
558
+ "on-result-improve": primitiveColors.white,
559
+ "on-result-degrade": primitiveColors.white,
560
+ "on-result-inconclusive": primitiveColors.white,
561
+ // Data visualization colors (same in dark mode for consistency)
562
+ "data-1": discreteRainbow[9],
563
+ "data-2": discreteRainbow[14],
564
+ "data-3": discreteRainbow[17],
565
+ "data-4": discreteRainbow[25],
566
+ "data-5": discreteRainbow[8],
567
+ "data-6": discreteRainbow[20],
568
+ "data-7": discreteRainbow[13],
569
+ "data-8": discreteRainbow[15],
570
+ "data-9": discreteRainbow[3],
571
+ "data-10": discreteRainbow[22],
572
+ // Text colors - inverted for dark mode
573
+ "text-primary": primitiveColors.neutral[100],
574
+ "text-secondary": primitiveColors.neutral[400],
575
+ "text-tertiary": primitiveColors.neutral[500],
576
+ "text-disabled": "rgba(255, 255, 255, 0.38)",
577
+ "text-inverse": primitiveColors.neutral[900],
578
+ "text-link": "#828DF8",
579
+ "text-link-hover": primitiveColors.blue[400],
580
+ // Surface colors - dark backgrounds
581
+ "surface-base": primitiveColors.charcoal[700],
582
+ // #161616 - main surface
583
+ "surface-elevated": primitiveColors.charcoal[600],
584
+ // #191919 - elevated surface
585
+ "surface-raised": primitiveColors.charcoal[500],
586
+ // #1C1C1C - raised surface
587
+ "surface-overlay": primitiveColors.charcoal[600],
588
+ // #191919 - overlay surface
589
+ "surface-input": primitiveColors.charcoal[600],
590
+ // #191919 - input surface
591
+ // Background colors
592
+ "background-base": primitiveColors.charcoal[900],
593
+ // #101010 - darkest charcoal
594
+ "background-default": primitiveColors.charcoal[700],
595
+ // #161616 - main background
596
+ "background-subtle": primitiveColors.charcoal[500],
597
+ // #1C1C1C - subtle background
598
+ // Border colors
599
+ "border-default": primitiveColors.charcoal[400],
600
+ // #1F1F1F - default border
601
+ "border-subtle": primitiveColors.charcoal[500],
602
+ // #1C1C1C - subtle border
603
+ "border-strong": primitiveColors.charcoal[300],
604
+ // #2C2C2C - strong border
605
+ "border-focus": "#828DF8",
606
+ "border-input": primitiveColors.neutral[600],
607
+ "border-input-hover": primitiveColors.neutral[500],
608
+ "border-input-focus": "#828DF8",
609
+ "border-input-error": primitiveColors.red[500],
610
+ // Interactive states
611
+ "interactive-hover": "rgba(255, 255, 255, 0.04)",
612
+ "interactive-focus": "rgba(255, 255, 255, 0.12)",
613
+ "interactive-active": "rgba(255, 255, 255, 0.16)",
614
+ "interactive-selected": "rgba(255, 255, 255, 0.08)",
615
+ "interactive-disabled": "rgba(255, 255, 255, 0.12)",
616
+ "interactive-disabled-text": "rgba(255, 255, 255, 0.26)",
617
+ // Divider
618
+ "divider": primitiveColors.charcoal[400],
619
+ // #1F1F1F - divider color
620
+ // Avatar default
621
+ "avatar-background": primitiveColors.neutral[600],
622
+ "avatar-text": primitiveColors.white
623
+ };
624
+ var semanticTypography = {
625
+ // Headings (Space Grotesk)
626
+ h1: {
627
+ fontFamily: "heading",
628
+ fontSize: "3.5rem",
629
+ fontWeight: 700,
630
+ lineHeight: 1.375
631
+ },
632
+ h2: {
633
+ fontFamily: "heading",
634
+ fontSize: "3rem",
635
+ fontWeight: 700,
636
+ lineHeight: 1.375
637
+ },
638
+ h3: {
639
+ fontFamily: "heading",
640
+ fontSize: "2.25rem",
641
+ fontWeight: 700,
642
+ lineHeight: 1.375
643
+ },
644
+ h4: {
645
+ fontFamily: "heading",
646
+ fontSize: "2rem",
647
+ fontWeight: 700,
648
+ lineHeight: 1.375
649
+ },
650
+ h5: {
651
+ fontFamily: "heading",
652
+ fontSize: "1.5rem",
653
+ fontWeight: 600,
654
+ lineHeight: 1.375
655
+ },
656
+ h6: {
657
+ fontFamily: "heading",
658
+ fontSize: "1.125rem",
659
+ fontWeight: 600,
660
+ lineHeight: 1.375
661
+ },
662
+ // Body text (Nunito Sans)
663
+ body1: {
664
+ fontFamily: "body",
665
+ fontSize: "1rem",
666
+ fontWeight: 400,
667
+ lineHeight: 1.5
668
+ },
669
+ body2: {
670
+ fontFamily: "body",
671
+ fontSize: "0.875rem",
672
+ fontWeight: 400,
673
+ lineHeight: 1.57
674
+ },
675
+ subtitle1: {
676
+ fontFamily: "body",
677
+ fontSize: "1rem",
678
+ fontWeight: 500,
679
+ lineHeight: 1.75
680
+ },
681
+ subtitle2: {
682
+ fontFamily: "body",
683
+ fontSize: "0.875rem",
684
+ fontWeight: 500,
685
+ lineHeight: 1.57
686
+ },
687
+ caption: {
688
+ fontFamily: "body",
689
+ fontSize: "0.75rem",
690
+ fontWeight: 400,
691
+ lineHeight: 1.66
692
+ },
693
+ overline: {
694
+ fontFamily: "body",
695
+ fontSize: "0.75rem",
696
+ fontWeight: 600,
697
+ lineHeight: 2.5,
698
+ letterSpacing: "0.5px",
699
+ textTransform: "uppercase"
700
+ },
701
+ button: {
702
+ fontFamily: "sans",
703
+ fontSize: "0.875rem",
704
+ fontWeight: 600,
705
+ lineHeight: 1.75
706
+ }
707
+ };
708
+ var buttonSizes = {
709
+ sm: {
710
+ paddingX: "16px",
711
+ paddingY: "6px",
712
+ fontSize: "0.875rem"
713
+ },
714
+ md: {
715
+ paddingX: "20px",
716
+ paddingY: "8px",
717
+ fontSize: "0.875rem"
718
+ },
719
+ lg: {
720
+ paddingX: "24px",
721
+ paddingY: "11px",
722
+ fontSize: "1rem"
723
+ }
724
+ };
725
+ function getSemanticColors(mode) {
726
+ return mode === "dark" ? semanticColorsDark : semanticColorsLight;
727
+ }
728
+
729
+ // src/theme/config.ts
730
+ var lightThemeCSSVars = {
731
+ "--color-brand-primary": semanticColorsLight["brand-primary"],
732
+ "--color-brand-primary-light": semanticColorsLight["brand-primary-light"],
733
+ "--color-brand-primary-dark": semanticColorsLight["brand-primary-dark"],
734
+ "--color-brand-primary-subtle": semanticColorsLight["brand-primary-subtle"],
735
+ "--color-brand-secondary": semanticColorsLight["brand-secondary"],
736
+ "--color-brand-secondary-light": semanticColorsLight["brand-secondary-light"],
737
+ "--color-brand-secondary-dark": semanticColorsLight["brand-secondary-dark"],
738
+ "--color-brand-secondary-subtle": semanticColorsLight["brand-secondary-subtle"],
739
+ "--color-on-brand-primary": semanticColorsLight["on-brand-primary"],
740
+ "--color-on-brand-secondary": semanticColorsLight["on-brand-secondary"],
741
+ "--color-status-success": semanticColorsLight["status-success"],
742
+ "--color-status-success-subtle": semanticColorsLight["status-success-subtle"],
743
+ "--color-status-error": semanticColorsLight["status-error"],
744
+ "--color-status-error-subtle": semanticColorsLight["status-error-subtle"],
745
+ "--color-status-warning": semanticColorsLight["status-warning"],
746
+ "--color-status-warning-subtle": semanticColorsLight["status-warning-subtle"],
747
+ "--color-status-info": semanticColorsLight["status-info"],
748
+ "--color-status-info-subtle": semanticColorsLight["status-info-subtle"],
749
+ "--color-text-primary": semanticColorsLight["text-primary"],
750
+ "--color-text-secondary": semanticColorsLight["text-secondary"],
751
+ "--color-text-tertiary": semanticColorsLight["text-tertiary"],
752
+ "--color-text-disabled": semanticColorsLight["text-disabled"],
753
+ "--color-text-inverse": semanticColorsLight["text-inverse"],
754
+ "--color-text-link": semanticColorsLight["text-link"],
755
+ "--color-surface-base": semanticColorsLight["surface-base"],
756
+ "--color-surface-elevated": semanticColorsLight["surface-elevated"],
757
+ "--color-surface-raised": semanticColorsLight["surface-raised"],
758
+ "--color-background-base": semanticColorsLight["background-base"],
759
+ "--color-background-default": semanticColorsLight["background-default"],
760
+ "--color-background-subtle": semanticColorsLight["background-subtle"],
761
+ "--color-border-default": semanticColorsLight["border-default"],
762
+ "--color-border-subtle": semanticColorsLight["border-subtle"],
763
+ "--color-border-strong": semanticColorsLight["border-strong"],
764
+ "--color-border-focus": semanticColorsLight["border-focus"],
765
+ "--color-interactive-hover": semanticColorsLight["interactive-hover"],
766
+ "--color-interactive-focus": semanticColorsLight["interactive-focus"],
767
+ "--color-interactive-active": semanticColorsLight["interactive-active"],
768
+ "--color-interactive-selected": semanticColorsLight["interactive-selected"],
769
+ "--color-interactive-disabled": semanticColorsLight["interactive-disabled"],
770
+ "--color-divider": semanticColorsLight["divider"]
771
+ };
772
+ var darkThemeCSSVars = {
773
+ "--color-brand-primary": semanticColorsDark["brand-primary"],
774
+ "--color-brand-primary-light": semanticColorsDark["brand-primary-light"],
775
+ "--color-brand-primary-dark": semanticColorsDark["brand-primary-dark"],
776
+ "--color-brand-primary-subtle": semanticColorsDark["brand-primary-subtle"],
777
+ "--color-brand-secondary": semanticColorsDark["brand-secondary"],
778
+ "--color-brand-secondary-light": semanticColorsDark["brand-secondary-light"],
779
+ "--color-brand-secondary-dark": semanticColorsDark["brand-secondary-dark"],
780
+ "--color-brand-secondary-subtle": semanticColorsDark["brand-secondary-subtle"],
781
+ "--color-on-brand-primary": semanticColorsDark["on-brand-primary"],
782
+ "--color-on-brand-secondary": semanticColorsDark["on-brand-secondary"],
783
+ "--color-status-success": semanticColorsDark["status-success"],
784
+ "--color-status-success-subtle": semanticColorsDark["status-success-subtle"],
785
+ "--color-status-error": semanticColorsDark["status-error"],
786
+ "--color-status-error-subtle": semanticColorsDark["status-error-subtle"],
787
+ "--color-status-warning": semanticColorsDark["status-warning"],
788
+ "--color-status-warning-subtle": semanticColorsDark["status-warning-subtle"],
789
+ "--color-status-info": semanticColorsDark["status-info"],
790
+ "--color-status-info-subtle": semanticColorsDark["status-info-subtle"],
791
+ "--color-text-primary": semanticColorsDark["text-primary"],
792
+ "--color-text-secondary": semanticColorsDark["text-secondary"],
793
+ "--color-text-tertiary": semanticColorsDark["text-tertiary"],
794
+ "--color-text-disabled": semanticColorsDark["text-disabled"],
795
+ "--color-text-inverse": semanticColorsDark["text-inverse"],
796
+ "--color-text-link": semanticColorsDark["text-link"],
797
+ "--color-surface-base": semanticColorsDark["surface-base"],
798
+ "--color-surface-elevated": semanticColorsDark["surface-elevated"],
799
+ "--color-surface-raised": semanticColorsDark["surface-raised"],
800
+ "--color-background-base": semanticColorsDark["background-base"],
801
+ "--color-background-default": semanticColorsDark["background-default"],
802
+ "--color-background-subtle": semanticColorsDark["background-subtle"],
803
+ "--color-border-default": semanticColorsDark["border-default"],
804
+ "--color-border-subtle": semanticColorsDark["border-subtle"],
805
+ "--color-border-strong": semanticColorsDark["border-strong"],
806
+ "--color-border-focus": semanticColorsDark["border-focus"],
807
+ "--color-interactive-hover": semanticColorsDark["interactive-hover"],
808
+ "--color-interactive-focus": semanticColorsDark["interactive-focus"],
809
+ "--color-interactive-active": semanticColorsDark["interactive-active"],
810
+ "--color-interactive-selected": semanticColorsDark["interactive-selected"],
811
+ "--color-interactive-disabled": semanticColorsDark["interactive-disabled"],
812
+ "--color-divider": semanticColorsDark["divider"]
813
+ };
814
+ function getThemeCSSVars(mode) {
815
+ return mode === "dark" ? darkThemeCSSVars : lightThemeCSSVars;
816
+ }
817
+ var gluestackConfig = {
818
+ tokens: {
819
+ colors: {
820
+ // Map to our semantic colors via CSS vars
821
+ primary500: "var(--color-brand-primary)",
822
+ primary600: "var(--color-brand-primary-dark)",
823
+ primary400: "var(--color-brand-primary-light)",
824
+ secondary500: "var(--color-brand-secondary)",
825
+ secondary600: "var(--color-brand-secondary-dark)",
826
+ secondary400: "var(--color-brand-secondary-light)",
827
+ success500: "var(--color-status-success)",
828
+ error500: "var(--color-status-error)",
829
+ warning500: "var(--color-status-warning)",
830
+ info500: "var(--color-status-info)",
831
+ textLight: "var(--color-text-primary)",
832
+ textDark: "var(--color-text-inverse)",
833
+ backgroundLight: "var(--color-background-default)",
834
+ backgroundDark: "var(--color-surface-base)"
835
+ },
836
+ space: {
837
+ "0": 0,
838
+ "1": 4,
839
+ "2": 8,
840
+ "3": 12,
841
+ "4": 16,
842
+ "5": 20,
843
+ "6": 24,
844
+ "8": 32,
845
+ "10": 40,
846
+ "12": 48,
847
+ "16": 64,
848
+ "20": 80,
849
+ "24": 96
850
+ },
851
+ radii: {
852
+ none: 0,
853
+ sm: 4,
854
+ md: 8,
855
+ lg: 12,
856
+ xl: 16,
857
+ "2xl": 24,
858
+ full: 9999
859
+ },
860
+ fontSizes: {
861
+ xs: 12,
862
+ sm: 14,
863
+ md: 16,
864
+ lg: 18,
865
+ xl: 20,
866
+ "2xl": 24,
867
+ "3xl": 30,
868
+ "4xl": 36,
869
+ "5xl": 48
870
+ }
871
+ },
872
+ aliases: {
873
+ bg: "backgroundColor",
874
+ p: "padding",
875
+ px: "paddingHorizontal",
876
+ py: "paddingVertical",
877
+ m: "margin",
878
+ mx: "marginHorizontal",
879
+ my: "marginVertical",
880
+ h: "height",
881
+ w: "width",
882
+ rounded: "borderRadius"
883
+ }
884
+ };
885
+ function hexToRgb(hex) {
886
+ const cleaned = hex.replace("#", "");
887
+ let r, g, b;
888
+ if (cleaned.length === 3) {
889
+ r = parseInt(cleaned[0] + cleaned[0], 16);
890
+ g = parseInt(cleaned[1] + cleaned[1], 16);
891
+ b = parseInt(cleaned[2] + cleaned[2], 16);
892
+ } else if (cleaned.length === 6) {
893
+ r = parseInt(cleaned.slice(0, 2), 16);
894
+ g = parseInt(cleaned.slice(2, 4), 16);
895
+ b = parseInt(cleaned.slice(4, 6), 16);
896
+ } else {
897
+ return null;
898
+ }
899
+ return { r, g, b };
900
+ }
901
+ function rgbToHsv(r, g, b) {
902
+ const rNorm = r / 255;
903
+ const gNorm = g / 255;
904
+ const bNorm = b / 255;
905
+ const max = Math.max(rNorm, gNorm, bNorm);
906
+ const min = Math.min(rNorm, gNorm, bNorm);
907
+ const delta = max - min;
908
+ const v = max;
909
+ const s = max === 0 ? 0 : delta / max;
910
+ let h = 0;
911
+ if (delta !== 0) {
912
+ if (max === rNorm) {
913
+ h = 60 * ((gNorm - bNorm) / delta % 6);
914
+ } else if (max === gNorm) {
915
+ h = 60 * ((bNorm - rNorm) / delta + 2);
916
+ } else {
917
+ h = 60 * ((rNorm - gNorm) / delta + 4);
918
+ }
919
+ }
920
+ if (h < 0) h += 360;
921
+ return { h, s, v };
922
+ }
923
+ function hsvToRgb(h, s, v) {
924
+ const c = v * s;
925
+ const x = c * (1 - Math.abs(h / 60 % 2 - 1));
926
+ const m = v - c;
927
+ let rPrime = 0, gPrime = 0, bPrime = 0;
928
+ if (h >= 0 && h < 60) {
929
+ rPrime = c;
930
+ gPrime = x;
931
+ bPrime = 0;
932
+ } else if (h >= 60 && h < 120) {
933
+ rPrime = x;
934
+ gPrime = c;
935
+ bPrime = 0;
936
+ } else if (h >= 120 && h < 180) {
937
+ rPrime = 0;
938
+ gPrime = c;
939
+ bPrime = x;
940
+ } else if (h >= 180 && h < 240) {
941
+ rPrime = 0;
942
+ gPrime = x;
943
+ bPrime = c;
944
+ } else if (h >= 240 && h < 300) {
945
+ rPrime = x;
946
+ gPrime = 0;
947
+ bPrime = c;
948
+ } else {
949
+ rPrime = c;
950
+ gPrime = 0;
951
+ bPrime = x;
952
+ }
953
+ return {
954
+ r: Math.round((rPrime + m) * 255),
955
+ g: Math.round((gPrime + m) * 255),
956
+ b: Math.round((bPrime + m) * 255)
957
+ };
958
+ }
959
+ function rgbToHex(r, g, b) {
960
+ const toHex = (n) => {
961
+ const clamped = Math.max(0, Math.min(255, Math.round(n)));
962
+ return clamped.toString(16).padStart(2, "0");
963
+ };
964
+ return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
965
+ }
966
+ function lighten(hex, amount = 0.1) {
967
+ const rgb = hexToRgb(hex);
968
+ if (!rgb) return hex;
969
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
970
+ const newV = Math.min(1, hsv.v + amount);
971
+ const newRgb = hsvToRgb(hsv.h, hsv.s, newV);
972
+ return rgbToHex(newRgb.r, newRgb.g, newRgb.b);
973
+ }
974
+ function darken(hex, amount = 0.1) {
975
+ const rgb = hexToRgb(hex);
976
+ if (!rgb) return hex;
977
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
978
+ const newV = Math.max(0, hsv.v - amount);
979
+ const newRgb = hsvToRgb(hsv.h, hsv.s, newV);
980
+ return rgbToHex(newRgb.r, newRgb.g, newRgb.b);
981
+ }
982
+ function getHoverColors(bgColor, intensity = "medium") {
983
+ const amounts = {
984
+ subtle: 0.01,
985
+ medium: 0.02,
986
+ strong: 0.03
987
+ };
988
+ const amount = amounts[intensity];
989
+ return {
990
+ raised: lighten(bgColor, amount),
991
+ // Raised hover: lighten (lifting up)
992
+ pressed: darken(bgColor, amount)
993
+ // Pressed hover: darken (pressing down)
994
+ };
995
+ }
996
+ function isDark(hex) {
997
+ const rgb = hexToRgb(hex);
998
+ if (!rgb) return true;
999
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
1000
+ return hsv.v < 0.6;
1001
+ }
1002
+ var shadowColors = {
1003
+ // For charcoal surfaces (~#2C2C2C to #3C3C3C)
1004
+ charcoal: {
1005
+ dark: "rgba(0, 0, 0, 0.5)",
1006
+ light: "rgba(255, 255, 255, 0.12)",
1007
+ // brighter for crisp rim light
1008
+ darker: "rgba(0, 0, 0, 0.6)"
1009
+ },
1010
+ // For neutral dark surfaces (~#1F2937)
1011
+ neutralDark: {
1012
+ dark: "rgba(0, 0, 0, 0.4)",
1013
+ light: "rgba(255, 255, 255, 0.08)",
1014
+ darker: "rgba(0, 0, 0, 0.5)"
1015
+ },
1016
+ // For light surfaces (white/light gray backgrounds)
1017
+ neutralLight: {
1018
+ dark: "rgba(0, 0, 0, 0.15)",
1019
+ // Visible dark shadow for depth on light backgrounds
1020
+ light: "rgba(255, 255, 255, 1)",
1021
+ // Bright highlight for raised effect (visible on light gray)
1022
+ darker: "rgba(0, 0, 0, 0.2)"
1023
+ // Deeper shadow for pressed states
1024
+ }
1025
+ };
1026
+ var intensityConfig = {
1027
+ subtle: { offset: 1, blur: 2 },
1028
+ // very light, barely visible
1029
+ medium: { offset: 2, blur: 4 },
1030
+ // noticeable but restrained
1031
+ strong: { offset: 2, blur: 5 }
1032
+ // slightly deeper blur, same offset as medium
1033
+ };
1034
+ function createRaisedShadow(surface = "charcoal", intensity = "medium") {
1035
+ const colors = shadowColors[surface];
1036
+ const { offset, blur } = intensityConfig[intensity];
1037
+ const rimBlur = 1;
1038
+ return Platform.select({
1039
+ web: {
1040
+ boxShadow: `${offset}px ${offset}px ${blur}px ${colors.dark}, -${offset}px -${offset}px ${rimBlur}px ${colors.light}`
1041
+ },
1042
+ default: {
1043
+ // React Native shadow approximation (limited compared to web)
1044
+ shadowColor: "#000",
1045
+ shadowOffset: { width: offset, height: offset },
1046
+ shadowOpacity: 0.3,
1047
+ shadowRadius: blur / 2,
1048
+ elevation: offset
1049
+ }
1050
+ });
1051
+ }
1052
+ function createPressedShadow(surface = "charcoal", intensity = "medium") {
1053
+ const colors = shadowColors[surface];
1054
+ const { offset, blur } = intensityConfig[intensity];
1055
+ const rimOffset = 1;
1056
+ const rimBlur = 1;
1057
+ return Platform.select({
1058
+ web: {
1059
+ boxShadow: `inset ${offset}px ${offset}px ${blur}px ${colors.darker}, inset -${rimOffset}px -${rimOffset}px ${rimBlur}px ${colors.light}`
1060
+ },
1061
+ default: {
1062
+ // React Native doesn't support inset shadows, approximate with darker bg
1063
+ shadowOpacity: 0,
1064
+ elevation: 0
1065
+ }
1066
+ });
1067
+ }
1068
+ function createFlatShadow() {
1069
+ return Platform.select({
1070
+ web: {
1071
+ boxShadow: "none"
1072
+ },
1073
+ default: {
1074
+ shadowOpacity: 0,
1075
+ elevation: 0
1076
+ }
1077
+ });
1078
+ }
1079
+ function createRaisedHoverShadow(surface = "charcoal", intensity = "medium") {
1080
+ const colors = shadowColors[surface];
1081
+ const { offset, blur } = intensityConfig[intensity];
1082
+ const hoverOffset = Math.max(1, Math.round(offset / 2));
1083
+ const hoverBlur = Math.max(1, Math.round(blur / 2));
1084
+ const rimBlur = 1;
1085
+ return Platform.select({
1086
+ web: {
1087
+ // Keep same offsets as normal state for rim to prevent "shrinking" effect
1088
+ boxShadow: `${hoverOffset}px ${hoverOffset}px ${hoverBlur}px ${colors.dark}, -${offset}px -${offset}px ${rimBlur}px ${colors.light}`
1089
+ },
1090
+ default: {
1091
+ shadowColor: "#000",
1092
+ shadowOffset: { width: hoverOffset, height: hoverOffset },
1093
+ shadowOpacity: 0.2,
1094
+ shadowRadius: hoverBlur / 2,
1095
+ elevation: hoverOffset
1096
+ }
1097
+ });
1098
+ }
1099
+ function createPressedHoverShadow(surface = "charcoal", intensity = "medium") {
1100
+ const colors = shadowColors[surface];
1101
+ const { offset, blur } = intensityConfig[intensity];
1102
+ const hoverOffset = Math.max(1, Math.round(offset / 2));
1103
+ const hoverBlur = Math.max(1, Math.round(blur / 2));
1104
+ const rimBlur = 1;
1105
+ return Platform.select({
1106
+ web: {
1107
+ // Keep rim offset at 1px (same as pressed normal) to prevent "shrinking" effect
1108
+ boxShadow: `inset ${hoverOffset}px ${hoverOffset}px ${hoverBlur}px ${colors.darker}, inset -1px -1px ${rimBlur}px ${colors.light}`
1109
+ },
1110
+ default: {
1111
+ shadowOpacity: 0,
1112
+ elevation: 0
1113
+ }
1114
+ });
1115
+ }
1116
+ var neumorphicShadows = {
1117
+ // Charcoal surface shadows (for dark toolbars, cards)
1118
+ charcoal: {
1119
+ raised: {
1120
+ subtle: createRaisedShadow("charcoal", "subtle"),
1121
+ medium: createRaisedShadow("charcoal", "medium"),
1122
+ strong: createRaisedShadow("charcoal", "strong")
1123
+ },
1124
+ raisedHover: {
1125
+ subtle: createRaisedHoverShadow("charcoal", "subtle"),
1126
+ medium: createRaisedHoverShadow("charcoal", "medium"),
1127
+ strong: createRaisedHoverShadow("charcoal", "strong")
1128
+ },
1129
+ pressed: {
1130
+ subtle: createPressedShadow("charcoal", "subtle"),
1131
+ medium: createPressedShadow("charcoal", "medium"),
1132
+ strong: createPressedShadow("charcoal", "strong")
1133
+ },
1134
+ pressedHover: {
1135
+ subtle: createPressedHoverShadow("charcoal", "subtle"),
1136
+ medium: createPressedHoverShadow("charcoal", "medium"),
1137
+ strong: createPressedHoverShadow("charcoal", "strong")
1138
+ },
1139
+ flat: createFlatShadow()
1140
+ },
1141
+ // Neutral dark surface shadows
1142
+ neutralDark: {
1143
+ raised: {
1144
+ subtle: createRaisedShadow("neutralDark", "subtle"),
1145
+ medium: createRaisedShadow("neutralDark", "medium"),
1146
+ strong: createRaisedShadow("neutralDark", "strong")
1147
+ },
1148
+ raisedHover: {
1149
+ subtle: createRaisedHoverShadow("neutralDark", "subtle"),
1150
+ medium: createRaisedHoverShadow("neutralDark", "medium"),
1151
+ strong: createRaisedHoverShadow("neutralDark", "strong")
1152
+ },
1153
+ pressed: {
1154
+ subtle: createPressedShadow("neutralDark", "subtle"),
1155
+ medium: createPressedShadow("neutralDark", "medium"),
1156
+ strong: createPressedShadow("neutralDark", "strong")
1157
+ },
1158
+ pressedHover: {
1159
+ subtle: createPressedHoverShadow("neutralDark", "subtle"),
1160
+ medium: createPressedHoverShadow("neutralDark", "medium"),
1161
+ strong: createPressedHoverShadow("neutralDark", "strong")
1162
+ },
1163
+ flat: createFlatShadow()
1164
+ },
1165
+ // Neutral light surface shadows
1166
+ neutralLight: {
1167
+ raised: {
1168
+ subtle: createRaisedShadow("neutralLight", "subtle"),
1169
+ medium: createRaisedShadow("neutralLight", "medium"),
1170
+ strong: createRaisedShadow("neutralLight", "strong")
1171
+ },
1172
+ raisedHover: {
1173
+ subtle: createRaisedHoverShadow("neutralLight", "subtle"),
1174
+ medium: createRaisedHoverShadow("neutralLight", "medium"),
1175
+ strong: createRaisedHoverShadow("neutralLight", "strong")
1176
+ },
1177
+ pressed: {
1178
+ subtle: createPressedShadow("neutralLight", "subtle"),
1179
+ medium: createPressedShadow("neutralLight", "medium"),
1180
+ strong: createPressedShadow("neutralLight", "strong")
1181
+ },
1182
+ pressedHover: {
1183
+ subtle: createPressedHoverShadow("neutralLight", "subtle"),
1184
+ medium: createPressedHoverShadow("neutralLight", "medium"),
1185
+ strong: createPressedHoverShadow("neutralLight", "strong")
1186
+ },
1187
+ flat: createFlatShadow()
1188
+ }
1189
+ };
1190
+ var elevationSystem = {
1191
+ // Deep inset (recessed input fields, deeply pressed buttons)
1192
+ [-2]: {
1193
+ name: "deep-inset",
1194
+ colorAdjustment: 0,
1195
+ shadowIntensity: "strong",
1196
+ shadowStyle: "pressed",
1197
+ description: "Deeply recessed elements (e.g., input fields, deeply pressed buttons)"
1198
+ },
1199
+ // Shallow inset (pressed buttons, sunken panels)
1200
+ [-1]: {
1201
+ name: "inset",
1202
+ colorAdjustment: 0,
1203
+ shadowIntensity: "medium",
1204
+ shadowStyle: "pressed",
1205
+ description: "Shallow inset elements (e.g., pressed buttons, sunken panels within cards)"
1206
+ },
1207
+ // Base level (page background, default surface)
1208
+ [0]: {
1209
+ name: "base",
1210
+ colorAdjustment: 0,
1211
+ shadowIntensity: "subtle",
1212
+ shadowStyle: "raised",
1213
+ description: "Base surface level (page background, default containers)"
1214
+ },
1215
+ // Level 1: Subtle elevation (outline cards, subtle containers)
1216
+ [1]: {
1217
+ name: "subtle",
1218
+ colorAdjustment: 0.01,
1219
+ shadowIntensity: "subtle",
1220
+ shadowStyle: "raised",
1221
+ description: "Subtle elevation (outline cards, subtle containers)"
1222
+ },
1223
+ // Level 2: Standard elevation (default cards, buttons)
1224
+ [2]: {
1225
+ name: "standard",
1226
+ colorAdjustment: 0.02,
1227
+ shadowIntensity: "medium",
1228
+ shadowStyle: "raised",
1229
+ description: "Standard elevation (default cards, raised buttons)"
1230
+ },
1231
+ // Level 3: Prominent elevation (important cards, modals)
1232
+ [3]: {
1233
+ name: "prominent",
1234
+ colorAdjustment: 0.04,
1235
+ shadowIntensity: "strong",
1236
+ shadowStyle: "raised",
1237
+ description: "Prominent elevation (important cards, modals, dropdowns)"
1238
+ },
1239
+ // Level 4: High elevation (overlays, popovers)
1240
+ [4]: {
1241
+ name: "high",
1242
+ colorAdjustment: 0.06,
1243
+ shadowIntensity: "strong",
1244
+ shadowStyle: "raised",
1245
+ description: "High elevation (overlays, popovers, tooltips)"
1246
+ },
1247
+ // Level 5: Floating (toasts, floating action buttons)
1248
+ [5]: {
1249
+ name: "floating",
1250
+ colorAdjustment: 0.08,
1251
+ shadowIntensity: "strong",
1252
+ shadowStyle: "raised",
1253
+ description: "Floating elevation (toasts, floating action buttons, highest z-index)"
1254
+ }
1255
+ };
1256
+ function calculateRimLightColor(baseColor, level) {
1257
+ const rgb = hexToRgb(baseColor);
1258
+ if (!rgb) {
1259
+ return "rgba(255, 255, 255, 0.5)";
1260
+ }
1261
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
1262
+ const isLight = hsv.v > 0.6;
1263
+ const isSaturated = hsv.s > 0.3;
1264
+ const absLevel = Math.abs(level);
1265
+ const opacityBoost = Math.max(0, (absLevel - 1) * 0.05);
1266
+ if (isSaturated) {
1267
+ const rimLightValue = 0.95;
1268
+ const rimLightRgb = hsvToRgb(hsv.h, hsv.s * 0.3, rimLightValue);
1269
+ const baseOpacity = isLight ? 0.9 : 0.5;
1270
+ const finalOpacity = Math.min(1, baseOpacity + opacityBoost);
1271
+ return `rgba(${rimLightRgb.r}, ${rimLightRgb.g}, ${rimLightRgb.b}, ${finalOpacity.toFixed(2)})`;
1272
+ } else {
1273
+ const baseOpacity = isLight ? 0.9 : 0.12;
1274
+ const finalOpacity = Math.min(1, baseOpacity + opacityBoost);
1275
+ return `rgba(255, 255, 255, ${finalOpacity.toFixed(2)})`;
1276
+ }
1277
+ }
1278
+ function calculateDarkShadowColors(surfaceColor) {
1279
+ const rgb = hexToRgb(surfaceColor);
1280
+ if (!rgb) {
1281
+ return {
1282
+ dark: "rgba(0, 0, 0, 0.3)",
1283
+ darker: "rgba(0, 0, 0, 0.4)"
1284
+ };
1285
+ }
1286
+ const hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
1287
+ const isLight = hsv.v > 0.6;
1288
+ const isSaturated = hsv.s > 0.3;
1289
+ if (isSaturated) {
1290
+ const darkShadowValue = 0.15;
1291
+ const darkShadowRgb = hsvToRgb(hsv.h, hsv.s, darkShadowValue);
1292
+ if (isLight) {
1293
+ return {
1294
+ dark: `rgba(${darkShadowRgb.r}, ${darkShadowRgb.g}, ${darkShadowRgb.b}, 0.3)`,
1295
+ darker: `rgba(${darkShadowRgb.r}, ${darkShadowRgb.g}, ${darkShadowRgb.b}, 0.4)`
1296
+ };
1297
+ } else {
1298
+ return {
1299
+ dark: `rgba(${darkShadowRgb.r}, ${darkShadowRgb.g}, ${darkShadowRgb.b}, 0.5)`,
1300
+ darker: `rgba(${darkShadowRgb.r}, ${darkShadowRgb.g}, ${darkShadowRgb.b}, 0.6)`
1301
+ };
1302
+ }
1303
+ } else {
1304
+ if (isLight) {
1305
+ return {
1306
+ dark: "rgba(0, 0, 0, 0.2)",
1307
+ darker: "rgba(0, 0, 0, 0.3)"
1308
+ };
1309
+ } else {
1310
+ return {
1311
+ dark: "rgba(0, 0, 0, 0.5)",
1312
+ darker: "rgba(0, 0, 0, 0.6)"
1313
+ };
1314
+ }
1315
+ }
1316
+ }
1317
+ function getRimLightConfig() {
1318
+ return {
1319
+ offset: 1,
1320
+ // Fixed 1px for crisp rim
1321
+ blur: 1
1322
+ // Tight blur for crisp edge
1323
+ };
1324
+ }
1325
+ function getElevationConfig(level) {
1326
+ return elevationSystem[level];
1327
+ }
1328
+ var elevationSurfaceCache = /* @__PURE__ */ new Map();
1329
+ var MAX_CACHE_SIZE = 100;
1330
+ function getCacheKey(baseColor, level, theme) {
1331
+ return `${baseColor}-${level}-${theme}`;
1332
+ }
1333
+ function calculateElevationSurface(baseColor, level, theme) {
1334
+ const config = elevationSystem[level];
1335
+ if (config.colorAdjustment === 0) {
1336
+ return baseColor;
1337
+ }
1338
+ if (level < 0) {
1339
+ return baseColor;
1340
+ }
1341
+ return lighten(baseColor, config.colorAdjustment);
1342
+ }
1343
+ function getElevationSurface(baseColor, level, theme) {
1344
+ const cacheKey = getCacheKey(baseColor, level, theme);
1345
+ if (elevationSurfaceCache.has(cacheKey)) {
1346
+ return elevationSurfaceCache.get(cacheKey);
1347
+ }
1348
+ const result = calculateElevationSurface(baseColor, level);
1349
+ if (elevationSurfaceCache.size >= MAX_CACHE_SIZE) {
1350
+ const firstKey = elevationSurfaceCache.keys().next().value;
1351
+ elevationSurfaceCache.delete(firstKey);
1352
+ }
1353
+ elevationSurfaceCache.set(cacheKey, result);
1354
+ return result;
1355
+ }
1356
+ var elevationShadowCache = /* @__PURE__ */ new Map();
1357
+ var MAX_SHADOW_CACHE_SIZE = 50;
1358
+ function getShadowCacheKey(baseColor, level, theme, isHovered) {
1359
+ return `${baseColor}-${level}-${theme}-${isHovered}`;
1360
+ }
1361
+ function calculateElevationShadow(baseColor, level, theme, isHovered = false) {
1362
+ const config = elevationSystem[level];
1363
+ if (level === 0) {
1364
+ return {};
1365
+ }
1366
+ const elevatedSurfaceColor = calculateElevationSurface(baseColor, level);
1367
+ const rimLightColor = calculateRimLightColor(baseColor, level);
1368
+ const darkShadowColors = calculateDarkShadowColors(elevatedSurfaceColor);
1369
+ const intensityConfig2 = {
1370
+ subtle: { offset: 1, blur: 2 },
1371
+ medium: { offset: 2, blur: 4 },
1372
+ strong: { offset: 2, blur: 5 }
1373
+ };
1374
+ const { offset, blur } = intensityConfig2[config.shadowIntensity];
1375
+ const rimConfig = getRimLightConfig();
1376
+ if (config.shadowStyle === "pressed") {
1377
+ if (isHovered) {
1378
+ const hoverOffset = Math.max(1, Math.round(offset / 2));
1379
+ const hoverBlur = Math.max(1, Math.round(blur / 2));
1380
+ return Platform.select({
1381
+ web: {
1382
+ boxShadow: `inset ${hoverOffset}px ${hoverOffset}px ${hoverBlur}px ${darkShadowColors.darker}, inset -${rimConfig.offset}px -${rimConfig.offset}px ${rimConfig.blur}px ${rimLightColor}`
1383
+ },
1384
+ default: {
1385
+ shadowOpacity: 0,
1386
+ elevation: 0
1387
+ }
1388
+ });
1389
+ }
1390
+ return Platform.select({
1391
+ web: {
1392
+ boxShadow: `inset ${offset}px ${offset}px ${blur}px ${darkShadowColors.darker}, inset -${rimConfig.offset}px -${rimConfig.offset}px ${rimConfig.blur}px ${rimLightColor}`
1393
+ },
1394
+ default: {
1395
+ shadowOpacity: 0,
1396
+ elevation: 0
1397
+ }
1398
+ });
1399
+ } else {
1400
+ if (isHovered) {
1401
+ const hoverOffset = Math.max(1, Math.round(offset / 2));
1402
+ const hoverBlur = Math.max(1, Math.round(blur / 2));
1403
+ return Platform.select({
1404
+ web: {
1405
+ boxShadow: `${hoverOffset}px ${hoverOffset}px ${hoverBlur}px ${darkShadowColors.dark}, -${rimConfig.offset}px -${rimConfig.offset}px ${rimConfig.blur}px ${rimLightColor}`
1406
+ },
1407
+ default: {
1408
+ shadowColor: "#000",
1409
+ shadowOffset: { width: hoverOffset, height: hoverOffset },
1410
+ shadowOpacity: 0.2,
1411
+ shadowRadius: hoverBlur / 2,
1412
+ elevation: hoverOffset
1413
+ }
1414
+ });
1415
+ }
1416
+ return Platform.select({
1417
+ web: {
1418
+ boxShadow: `${offset}px ${offset}px ${blur}px ${darkShadowColors.dark}, -${rimConfig.offset}px -${rimConfig.offset}px ${rimConfig.blur}px ${rimLightColor}`
1419
+ },
1420
+ default: {
1421
+ shadowColor: "#000",
1422
+ shadowOffset: { width: offset, height: offset },
1423
+ shadowOpacity: 0.3,
1424
+ shadowRadius: blur / 2,
1425
+ elevation: offset
1426
+ }
1427
+ });
1428
+ }
1429
+ }
1430
+ function getElevationShadow(baseColor, level, theme, isHovered = false) {
1431
+ const cacheKey = getShadowCacheKey(baseColor, level, theme, isHovered);
1432
+ if (elevationShadowCache.has(cacheKey)) {
1433
+ return elevationShadowCache.get(cacheKey);
1434
+ }
1435
+ const result = calculateElevationShadow(baseColor, level, theme, isHovered);
1436
+ if (elevationShadowCache.size >= MAX_SHADOW_CACHE_SIZE) {
1437
+ const firstKey = elevationShadowCache.keys().next().value;
1438
+ elevationShadowCache.delete(firstKey);
1439
+ }
1440
+ elevationShadowCache.set(cacheKey, result);
1441
+ return result;
1442
+ }
1443
+ function getBaseSurfaceColor(theme) {
1444
+ return theme === "light" ? semanticColorsLight["surface-raised"] : semanticColorsDark["surface-elevated"];
1445
+ }
1446
+ var componentElevationRanges = {
1447
+ button: {
1448
+ allowed: [2],
1449
+ default: 2,
1450
+ hover: 3
1451
+ },
1452
+ card: {
1453
+ allowed: [1, 2, 3],
1454
+ default: 2,
1455
+ hover: 3
1456
+ },
1457
+ input: {
1458
+ allowed: [-2, -1, 0],
1459
+ default: -1
1460
+ },
1461
+ overlay: {
1462
+ allowed: [4, 5],
1463
+ default: 4
1464
+ }
1465
+ };
1466
+ function getValidatedElevation(component, requested) {
1467
+ const range = componentElevationRanges[component];
1468
+ if (range.allowed.includes(requested)) {
1469
+ return requested;
1470
+ }
1471
+ const sorted = [...range.allowed].sort((a, b) => a - b);
1472
+ if (requested < sorted[0]) return sorted[0];
1473
+ if (requested > sorted[sorted.length - 1]) return sorted[sorted.length - 1];
1474
+ return sorted.reduce(
1475
+ (prev, curr) => Math.abs(curr - requested) < Math.abs(prev - requested) ? curr : prev
1476
+ );
1477
+ }
1478
+
1479
+ export { buttonSizes, componentElevationRanges, createFlatShadow, createPressedHoverShadow, createPressedShadow, createRaisedHoverShadow, createRaisedShadow, darkThemeCSSVars, darken, discreteRainbow, elevationSystem, getBaseSurfaceColor, getDiscreteRainbowColor, getElevationConfig, getElevationShadow, getElevationSurface, getHoverColors, getSemanticColors, getThemeCSSVars, getValidatedElevation, gluestackConfig, hexToRgb, hsvToRgb, isDark, lightThemeCSSVars, lighten, neumorphicShadows, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveShadows, primitiveSpacing, primitiveTypography, primitiveZIndex, rgbToHex, rgbToHsv, semanticColorsDark, semanticColorsLight, semanticTypography, shadowColors };
1480
+ //# sourceMappingURL=chunk-NA3EES23.mjs.map
1481
+ //# sourceMappingURL=chunk-NA3EES23.mjs.map