astralkit 0.2.0 → 0.3.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.
@@ -1,8 +1,8 @@
1
- @theme {
1
+ :root {
2
2
  /* ══════════════════════════════════════════════════════════
3
- AstralKit Design Tokens
3
+ AstralKit Design Tokens (Tailwind v3)
4
4
  Default: Black & white neutral theme.
5
- Override any variable in your project's @theme to brand it.
5
+ Override any variable in your own :root block to brand it.
6
6
  ══════════════════════════════════════════════════════════ */
7
7
 
8
8
  /* ── Neutral scale (full 11-shade ramp) ── */
@@ -63,12 +63,12 @@
63
63
  --color-ak-text-disabled: #d4d4d4;
64
64
  --color-ak-text-inverse: #ffffff;
65
65
  --color-ak-text-link: #000000;
66
- --color-ak-text-placeholder:#a3a3a3;
66
+ --color-ak-text-placeholder:#525252;
67
67
 
68
68
  /* ── Semantic border ── */
69
- --color-ak-border: #e5e5e5;
70
- --color-ak-border-subtle: #f5f5f5;
71
- --color-ak-border-strong: #d4d4d4;
69
+ --color-ak-border: #dee2e6;
70
+ --color-ak-border-subtle: #e5e5e5;
71
+ --color-ak-border-strong: #525252;
72
72
  --color-ak-border-focus: #000000;
73
73
 
74
74
  /* ── Status colors ── */
@@ -83,6 +83,8 @@
83
83
  --color-ak-danger-text: #b91c1c;
84
84
  --color-ak-info: #2563eb;
85
85
  --color-ak-info-subtle: #eff6ff;
86
+ --color-ak-pink: #db2777;
87
+ --color-ak-pink-subtle: #fdf2f8;
86
88
  --color-ak-info-text: #1d4ed8;
87
89
 
88
90
  /* ── Font families ── */
@@ -98,8 +100,8 @@
98
100
  --text-ak-lg: 1.125rem;
99
101
  --text-ak-xl: 1.25rem;
100
102
  --text-ak-2xl: 1.5rem;
101
- --text-ak-3xl: 1.875rem;
102
- --text-ak-4xl: 2.25rem;
103
+ --text-ak-3xl: 2rem;
104
+ --text-ak-4xl: 2.5rem;
103
105
  --text-ak-5xl: 3rem;
104
106
  --text-ak-6xl: 3.75rem;
105
107
  --text-ak-7xl: 4.5rem;
@@ -151,13 +153,16 @@
151
153
  --leading-ak-snug: 1.375;
152
154
  --leading-ak-normal: 1.5;
153
155
  --leading-ak-relaxed: 1.625;
156
+ --leading-ak-prose: 1.75;
154
157
  --leading-ak-loose: 2;
155
158
 
156
159
  /* ── Letter Spacing ── */
157
160
  --tracking-ak-tighter: -0.05em;
158
161
  --tracking-ak-tight: -0.025em;
162
+ --tracking-ak-subtle: -0.01em;
159
163
  --tracking-ak-normal: 0em;
160
164
  --tracking-ak-wide: 0.025em;
165
+ --tracking-ak-section: 0.08em;
161
166
  --tracking-ak-wider: 0.05em;
162
167
  --tracking-ak-widest: 0.1em;
163
168
 
@@ -178,8 +183,11 @@
178
183
  --spacing-ak-6: 3rem;
179
184
  --spacing-ak-7: 3.5rem;
180
185
  --spacing-ak-8: 4rem;
186
+ --spacing-ak-9: 4.5rem;
181
187
  --spacing-ak-10: 5rem;
188
+ --spacing-ak-11: 5.5rem;
182
189
  --spacing-ak-12: 6rem;
190
+ --spacing-ak-14: 7rem;
183
191
  --spacing-ak-16: 8rem;
184
192
  --spacing-ak-20: 10rem;
185
193
  --spacing-ak-24: 12rem;
@@ -206,6 +214,14 @@
206
214
  --height-ak-control-lg: 3rem; /* 48px — prominent CTAs */
207
215
  --height-ak-control-xl: 3.5rem; /* 56px — hero CTAs */
208
216
 
217
+ /* ── Table row heights ── */
218
+ --height-ak-row-compact: 2.5rem; /* 40px */
219
+ --height-ak-row-default: 3rem; /* 48px */
220
+ --height-ak-row-comfortable: 3.25rem; /* 52px */
221
+
222
+ /* ── Fluid page margin (16px mobile → 80px desktop) ── */
223
+ --spacing-ak-fl-page-margin: clamp(1rem, 0.26rem + 3.7vw, 5rem);
224
+
209
225
  /* ── Fluid spacing (viewport: 320px → 1400px) ──
210
226
  Scales smoothly. Use p-ak-fl-*, gap-ak-fl-*, m-ak-fl-*, etc.
211
227
  Named sizes (xs → 3xl) for intuitive selection. ── */
@@ -232,6 +248,7 @@
232
248
  --spacing-ak-fl-xl-3xl: clamp(3rem, 0.57rem + 8.33vw, 9rem);
233
249
 
234
250
  /* ── Border Radius ── */
251
+ --radius-ak-xs: 0.125rem;
235
252
  --radius-ak-none: 0;
236
253
  --radius-ak-sm: 0.25rem;
237
254
  --radius-ak-md: 0.5rem;
@@ -249,6 +266,25 @@
249
266
  --shadow-ak-xl: 0 16px 50px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.05);
250
267
  --shadow-ak-2xl: 0 24px 60px rgba(0,0,0,0.14);
251
268
 
269
+ /* ── Neobrutalist ──
270
+ B&W brutalism toolkit. The core rule: face color is NEVER the same
271
+ as shadow/ink color. This prevents "invisible shadow" bugs where a
272
+ black button on a black shadow disappears. */
273
+ --color-ak-brutal-ink: #000000;
274
+ --color-ak-brutal-face: #ffffff;
275
+ --color-ak-brutal-face-dark: #262626;
276
+ --color-ak-brutal-on-face: #000000;
277
+ --color-ak-brutal-on-face-dark: #ffffff;
278
+ --shadow-ak-brutal-xs: 2px 2px 0 0 var(--color-ak-brutal-ink);
279
+ --shadow-ak-brutal-sm: 3px 3px 0 0 var(--color-ak-brutal-ink);
280
+ --shadow-ak-brutal: 4px 4px 0 0 var(--color-ak-brutal-ink);
281
+ --shadow-ak-brutal-lg: 6px 6px 0 0 var(--color-ak-brutal-ink);
282
+ --shadow-ak-brutal-xl: 8px 8px 0 0 var(--color-ak-brutal-ink);
283
+ --border-ak-brutal: 2px;
284
+ --border-ak-brutal-lg: 3px;
285
+ --radius-ak-brutal: 0.5rem;
286
+ --radius-ak-brutal-sm: 0.25rem;
287
+
252
288
  /* ── Component sizes ──
253
289
  --size-* namespace → size-* utility (sets both width AND height).
254
290
  Use: size-ak-icon-lg, size-ak-avatar-md, etc. ── */
@@ -262,7 +298,11 @@
262
298
  --size-ak-icon-2xl: 2rem;
263
299
  --size-ak-icon-3xl: 3rem;
264
300
 
301
+ /* Panel width (sidebar flyout panels) */
302
+ --size-ak-panel-width: 260px;
303
+
265
304
  /* Avatars */
305
+ --size-ak-avatar-xs: 1.5rem;
266
306
  --size-ak-avatar-sm: 2rem;
267
307
  --size-ak-avatar-md: 2.5rem;
268
308
  --size-ak-avatar-lg: 3rem;
@@ -271,6 +311,7 @@
271
311
  --size-ak-avatar-3xl: 8rem;
272
312
 
273
313
  /* Avatar initials font size */
314
+ --text-ak-avatar-xs: 0.625rem;
274
315
  --text-ak-avatar-sm: 0.6875rem;
275
316
  --text-ak-avatar-md: 0.8125rem;
276
317
  --text-ak-avatar-lg: 1rem;
@@ -279,25 +320,29 @@
279
320
  --text-ak-avatar-3xl: 2.25rem;
280
321
 
281
322
  /* Status dots */
323
+ /* Status dots scale with avatar; smaller avatars keep a more
324
+ subtle indicator, larger avatars match count-badge weight.
325
+ Target ~28-35% of avatar size for a refined "hero" ratio. */
282
326
  --size-ak-status-md: 12px;
283
327
  --size-ak-status-lg: 14px;
284
- --size-ak-status-xl: 16px;
285
- --size-ak-status-2xl: 20px;
286
- --size-ak-status-3xl: 24px;
328
+ --size-ak-status-xl: 20px;
329
+ --size-ak-status-2xl: 28px;
330
+ --size-ak-status-3xl: 36px;
287
331
 
288
- /* Badges (count/notification) */
332
+ /* Badges (count/notification) — must accommodate 1-2 digit counts
333
+ while keeping the circle shape. Min-width is applied via CSS. */
289
334
  --size-ak-badge-md: 18px;
290
335
  --size-ak-badge-lg: 20px;
291
- --size-ak-badge-xl: 22px;
292
- --size-ak-badge-2xl: 24px;
293
- --size-ak-badge-3xl: 28px;
336
+ --size-ak-badge-xl: 24px;
337
+ --size-ak-badge-2xl: 32px;
338
+ --size-ak-badge-3xl: 40px;
294
339
 
295
340
  /* Badge border widths */
296
341
  --size-ak-badge-border-md: 2px;
297
342
  --size-ak-badge-border-lg: 2px;
298
- --size-ak-badge-border-xl: 2.5px;
299
- --size-ak-badge-border-2xl: 3px;
300
- --size-ak-badge-border-3xl: 3px;
343
+ --size-ak-badge-border-xl: 3px;
344
+ --size-ak-badge-border-2xl: 3.5px;
345
+ --size-ak-badge-border-3xl: 4px;
301
346
 
302
347
  /* Icon badges (larger badge with icon inside) */
303
348
  --size-ak-icon-badge-md: 22px;
@@ -309,20 +354,20 @@
309
354
  /* Badge text sizes */
310
355
  --text-ak-badge-md: 0.625rem;
311
356
  --text-ak-badge-lg: 0.6875rem;
312
- --text-ak-badge-xl: 0.75rem;
313
- --text-ak-badge-2xl: 0.8125rem;
314
- --text-ak-badge-3xl: 0.875rem;
357
+ --text-ak-badge-xl: 0.8125rem;
358
+ --text-ak-badge-2xl: 0.9375rem;
359
+ --text-ak-badge-3xl: 1.125rem;
315
360
 
316
361
  /* ── Avatar positioning offsets ──
317
362
  Used for absolute-positioned status dots, badges, and icon badges.
318
363
  Negative values pull elements inward; positive push outward. ── */
319
364
 
320
365
  /* Status dot offsets (bottom-right corner) */
321
- --offset-ak-status-md: 1px;
322
- --offset-ak-status-lg: 1px;
323
- --offset-ak-status-xl: 2px;
324
- --offset-ak-status-2xl: 5px;
325
- --offset-ak-status-3xl: 8px;
366
+ --offset-ak-status-md: -1px;
367
+ --offset-ak-status-lg: -1px;
368
+ --offset-ak-status-xl: -1px;
369
+ --offset-ak-status-2xl: 2px;
370
+ --offset-ak-status-3xl: 3px;
326
371
 
327
372
  /* Status ring offsets (with ring decoration) */
328
373
  --offset-ak-status-ring-md: -2px;
@@ -332,6 +377,15 @@
332
377
  --offset-ak-status-ring-3xl: 4px;
333
378
 
334
379
  /* Badge offsets (top-right corner) */
380
+ /* Count badges are rectangular (99+ grows wider than tall) so top/right
381
+ tune independently. Smaller avatars poke out at the corner; larger
382
+ avatars sit flush-right and inset slightly from the top. */
383
+ --offset-ak-badge-md-top: -3px; --offset-ak-badge-md-right: -3px;
384
+ --offset-ak-badge-lg-top: -3px; --offset-ak-badge-lg-right: -3px;
385
+ --offset-ak-badge-xl-top: -2px; --offset-ak-badge-xl-right: -2px;
386
+ --offset-ak-badge-2xl-top: 2px; --offset-ak-badge-2xl-right: 0px;
387
+ --offset-ak-badge-3xl-top: 5px; --offset-ak-badge-3xl-right: 0px;
388
+ /* Legacy single-value token kept for backward compat (equal to -top) */
335
389
  --offset-ak-badge-md: -3px;
336
390
  --offset-ak-badge-lg: -3px;
337
391
  --offset-ak-badge-xl: -2px;
@@ -368,9 +422,189 @@
368
422
  --ease-ak-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
369
423
  --ease-ak-bounce: cubic-bezier(0.25, 1, 0.5, 1);
370
424
 
371
- /* ── Z-index ── */
372
- --z-ak-sticky: 100;
373
- --z-ak-dropdown: 200;
374
- --z-ak-overlay: 300;
375
- --z-ak-modal: 400;
425
+ /* ── Z-index (Chakra-inspired scale) ── */
426
+ --z-ak-base: 0;
427
+ --z-ak-docked: 10;
428
+ --z-ak-dropdown: 1000;
429
+ --z-ak-sticky: 1100;
430
+ --z-ak-banner: 1200;
431
+ --z-ak-overlay: 1300;
432
+ --z-ak-modal: 1400;
433
+ --z-ak-popover: 1500;
434
+ --z-ak-toast: 1700;
435
+ --z-ak-tooltip: 1800;
436
+
437
+ /* ── Control sizes (legacy --size-ak-control-* aliases) ── */
438
+ --size-ak-control-sm: 2rem;
439
+ --size-ak-control-md: 2.5rem;
440
+ --size-ak-control-lg: 3rem;
441
+
442
+ /* ── Touch target minimum ── */
443
+ --size-ak-touch-min: 3rem;
444
+
445
+ /* ── Focus ring style ── */
446
+ --shadow-ak-focus: 0 0 0 3px rgba(0, 0, 0, 0.08);
447
+ --shadow-ak-focus-primary: 0 0 0 3px rgba(0, 0, 0, 0.15);
448
+ --shadow-ak-focus-danger: 0 0 0 3px rgba(220, 38, 38, 0.08);
449
+ --shadow-ak-focus-success: 0 0 0 3px rgba(22, 163, 74, 0.08);
450
+
451
+ /* ── Chart colors (colorblind-safe, Tableau 10 derived) ── */
452
+ --color-ak-chart-1: #4e79a7;
453
+ --color-ak-chart-2: #f28e2c;
454
+ --color-ak-chart-3: #e15759;
455
+ --color-ak-chart-4: #76b7b2;
456
+ --color-ak-chart-5: #59a14f;
457
+ --color-ak-chart-6: #edc949;
458
+
459
+ /* ── Form input border radius ── */
460
+ --radius-ak-input: 0.625rem;
461
+
462
+ /* ── Sidebar widths ── */
463
+ --width-ak-sidebar-collapsed: 5rem;
464
+ --width-ak-sidebar-expanded: 18rem;
465
+ }
466
+
467
+ /* ══════════════════════════════════════════════════════════
468
+ Density Modes
469
+ Wrap any container with data-ak-density="compact|spacious"
470
+ to override spacing and control sizes within it.
471
+ Default (comfortable) uses the base tokens above.
472
+ ══════════════════════════════════════════════════════════ */
473
+
474
+ [data-ak-density="compact"] {
475
+ --spacing-ak-1: 0.375rem; /* 6px (was 8px) */
476
+ --spacing-ak-1_5: 0.5rem; /* 8px (was 12px) */
477
+ --spacing-ak-2: 0.75rem; /* 12px (was 16px) */
478
+ --spacing-ak-2_5: 1rem; /* 16px (was 20px) */
479
+ --spacing-ak-3: 1.125rem; /* 18px (was 24px) */
480
+ --height-ak-control-sm: 1.75rem; /* 28px (was 32px) */
481
+ --height-ak-control-md: 2rem; /* 32px (was 40px) */
482
+ --height-ak-control-lg: 2.5rem; /* 40px (was 48px) */
483
+ --height-ak-row-default: 2.5rem; /* 40px (was 48px) */
484
+ }
485
+
486
+ [data-ak-density="spacious"] {
487
+ --spacing-ak-1: 0.625rem; /* 10px (was 8px) */
488
+ --spacing-ak-1_5: 1rem; /* 16px (was 12px) */
489
+ --spacing-ak-2: 1.25rem; /* 20px (was 16px) */
490
+ --spacing-ak-2_5: 1.5rem; /* 24px (was 20px) */
491
+ --spacing-ak-3: 1.875rem; /* 30px (was 24px) */
492
+ --height-ak-control-sm: 2.25rem; /* 36px (was 32px) */
493
+ --height-ak-control-md: 3rem; /* 48px (was 40px) */
494
+ --height-ak-control-lg: 3.5rem; /* 56px (was 48px) */
495
+ --height-ak-row-default: 3.5rem; /* 56px (was 48px) */
496
+ }
497
+
498
+ /* ══════════════════════════════════════════════════════════
499
+ Dark Mode
500
+ Apply with .dark class on <html> (next-themes standard)
501
+ or via @media (prefers-color-scheme: dark) — both supported.
502
+ Neutral base — works with any accent. For branded dark,
503
+ override --color-ak-primary-* after this block.
504
+ ══════════════════════════════════════════════════════════ */
505
+
506
+ .dark,
507
+ [data-theme="dark"] {
508
+ /* ── Surfaces ── */
509
+ --color-ak-neutral-0: #111113;
510
+ --color-ak-neutral-50: #18191b;
511
+ --color-ak-neutral-100: #1e1f21;
512
+ --color-ak-neutral-200: #252628;
513
+ --color-ak-neutral-300: #333436;
514
+ --color-ak-neutral-400: #52525b;
515
+ --color-ak-neutral-500: #71717a;
516
+ --color-ak-neutral-600: #a1a1aa;
517
+ --color-ak-neutral-700: #d4d4d8;
518
+ --color-ak-neutral-800: #e4e4e7;
519
+ --color-ak-neutral-900: #f4f4f5;
520
+ --color-ak-neutral-950: #fafafa;
521
+
522
+ --color-ak-bg: #111113;
523
+ --color-ak-surface: #18191b;
524
+ --color-ak-surface-2: #1e1f21;
525
+ --color-ak-hover: rgba(255,255,255,0.04);
526
+ --color-ak-active: rgba(255,255,255,0.08);
527
+ --color-ak-elevated: #252628;
528
+ --color-ak-surface-raised: #1e1f21;
529
+ --color-ak-surface-raised-soft: rgba(255,255,255,0.04);
530
+ --color-ak-surface-glass: rgba(255,255,255,0.05);
531
+ --color-ak-surface-glass-strong: rgba(255,255,255,0.08);
532
+ --color-ak-highlight-soft: rgba(255,255,255,0.06);
533
+ --color-ak-highlight-strong: rgba(255,255,255,0.12);
534
+ --color-ak-skeleton-base: #1e1f21;
535
+ --color-ak-skeleton-shine: rgba(255,255,255,0.06);
536
+ --color-ak-overlay: rgba(0,0,0,0.7);
537
+ --color-ak-on-primary: #111113;
538
+ --color-ak-primary-subtle: rgba(129, 140, 248, 0.15);
539
+
540
+ /* ── Text ── */
541
+ --color-ak-text: #f4f4f5;
542
+ --color-ak-text-secondary: #a1a1aa;
543
+ --color-ak-text-muted: #71717a;
544
+ --color-ak-text-disabled: #52525b;
545
+ --color-ak-text-inverse: #111113;
546
+ --color-ak-text-link: #818cf8;
547
+ --color-ak-text-placeholder:#a1a1aa;
548
+
549
+ /* ── Borders (alpha — adapts to any surface) ── */
550
+ --color-ak-border: rgba(255, 255, 255, 0.10);
551
+ --color-ak-border-subtle: rgba(255, 255, 255, 0.06);
552
+ --color-ak-border-strong: rgba(255, 255, 255, 0.16);
553
+ --color-ak-border-focus: #ffffff;
554
+
555
+ /* ── Primary (lightened for contrast on dark bg) ── */
556
+ --color-ak-primary: #818cf8;
557
+ --color-ak-primary-hover: #a5b4fc;
558
+ --color-ak-primary-active: #6366f1;
559
+
560
+ --color-ak-primary-50: rgba(129, 140, 248, 0.06);
561
+ --color-ak-primary-100: rgba(129, 140, 248, 0.10);
562
+ --color-ak-primary-200: rgba(129, 140, 248, 0.16);
563
+ --color-ak-primary-300: rgba(129, 140, 248, 0.24);
564
+ --color-ak-primary-400: #6366f1;
565
+ --color-ak-primary-500: #818cf8;
566
+ --color-ak-primary-600: #a5b4fc;
567
+ --color-ak-primary-700: #c7d2fe;
568
+ --color-ak-primary-800: #e0e7ff;
569
+ --color-ak-primary-900: #eef2ff;
570
+ --color-ak-primary-950: #f5f7ff;
571
+
572
+ /* ── Status (lighter for dark bg readability) ── */
573
+ --color-ak-success: #4ade80;
574
+ --color-ak-success-subtle: rgba(34, 197, 94, 0.12);
575
+ --color-ak-success-text: #4ade80;
576
+ --color-ak-warning: #fbbf24;
577
+ --color-ak-warning-subtle: rgba(251, 191, 36, 0.12);
578
+ --color-ak-warning-text: #fbbf24;
579
+ --color-ak-danger: #f87171;
580
+ --color-ak-danger-subtle: rgba(248, 113, 113, 0.12);
581
+ --color-ak-danger-text: #f87171;
582
+ --color-ak-info: #60a5fa;
583
+ --color-ak-info-subtle: rgba(96, 165, 250, 0.12);
584
+ --color-ak-info-text: #60a5fa;
585
+
586
+ /* ── Shadows (mostly invisible on dark — reduce or remove) ── */
587
+ --shadow-ak-xs: none;
588
+ --shadow-ak-sm: none;
589
+ --shadow-ak-md: 0 4px 12px rgba(0,0,0,0.3);
590
+ --shadow-ak-lg: 0 8px 30px rgba(0,0,0,0.4);
591
+ --shadow-ak-xl: 0 16px 50px rgba(0,0,0,0.5);
592
+ --shadow-ak-2xl: 0 24px 60px rgba(0,0,0,0.6);
593
+
594
+ /* ── Focus rings (solid for AAA 2.4.13 compliance) ── */
595
+ --color-ak-border-focus: #ffffff;
596
+ --shadow-ak-focus: 0 0 0 3px rgba(255, 255, 255, 0.20);
597
+ --shadow-ak-focus-primary: 0 0 0 3px rgba(129, 140, 248, 0.30);
598
+ --shadow-ak-focus-danger: 0 0 0 3px rgba(248, 113, 113, 0.25);
599
+ --shadow-ak-focus-success: 0 0 0 3px rgba(74, 222, 128, 0.25);
600
+
601
+ /* ── Neobrutalist (dark mode — everything flips) ── */
602
+ --color-ak-brutal-ink: #ffffff;
603
+ --color-ak-brutal-face: #0a0a0a;
604
+ --color-ak-brutal-face-dark: #e5e5e5;
605
+ --color-ak-brutal-on-face: #ffffff;
606
+ --color-ak-brutal-on-face-dark: #000000;
607
+
608
+ /* ── Sheet handle ── */
609
+ --color-ak-sheet-handle: #52525b;
376
610
  }