@hattisar/design-tokens 0.3.23 → 0.3.25
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/package.json +1 -1
- package/tokens.css +113 -65
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hattisar/design-tokens",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.25",
|
|
4
4
|
"description": "Shared design tokens (colors, type, radius, spacing, motion) and base primitives (reset, buttons, inputs, cards, modals, auth shell) for every Hattisar frontend.",
|
|
5
5
|
"main": "tokens.css",
|
|
6
6
|
"files": [
|
package/tokens.css
CHANGED
|
@@ -33,7 +33,11 @@
|
|
|
33
33
|
to equal background-global exactly, which meant hover states had
|
|
34
34
|
no visible target to land on. */
|
|
35
35
|
--color-background-global: #f4f4f5;
|
|
36
|
+
/* The frame the routed page sits in: white in light, the canvas in dark. */
|
|
37
|
+
--color-background-page: #ffffff;
|
|
36
38
|
--color-background-card: #ffffff;
|
|
39
|
+
/* Table column-header band: a step lighter than the hover tint. */
|
|
40
|
+
--color-table-header: #f7f7f7;
|
|
37
41
|
--color-surface-tint: #e8e8ea;
|
|
38
42
|
--color-input: #ffffff;
|
|
39
43
|
--color-text-primary: #09090b;
|
|
@@ -66,7 +70,10 @@
|
|
|
66
70
|
--color-border-raised: #d4d4d8;
|
|
67
71
|
--shadow-popover: 0 4px 6px -2px rgba(9, 9, 11, 0.08), 0 12px 28px -8px rgba(9, 9, 11, 0.18);
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
/* The one hover fill for every surface: a faint veil of the ink over
|
|
74
|
+
whatever it sits on, so it never reads as a second grey competing
|
|
75
|
+
with a header band or a card (those use --color-surface-tint). */
|
|
76
|
+
--color-hover: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
|
|
70
77
|
--color-focus-ring: rgba(233, 235, 239, 0.2);
|
|
71
78
|
--color-focus-ring-danger: rgba(255, 138, 156, 0.24);
|
|
72
79
|
/* The ring drawn around a focused control. Ink at low alpha rather
|
|
@@ -128,7 +135,7 @@
|
|
|
128
135
|
--color-surface-tint/--color-border-strong/--color-text-primary
|
|
129
136
|
rather than their own literal hex, so the secondary button always
|
|
130
137
|
tracks the same neutral scale as the rest of the page. */
|
|
131
|
-
--color-secondary-fill: var(--color-
|
|
138
|
+
--color-secondary-fill: var(--color-background-card);
|
|
132
139
|
--color-secondary-border: var(--color-border-strong);
|
|
133
140
|
--color-secondary-text: var(--color-text-primary);
|
|
134
141
|
--color-secondary-hover: color-mix(in srgb, var(--color-text-primary) 6%, var(--color-secondary-fill));
|
|
@@ -260,6 +267,34 @@
|
|
|
260
267
|
and the gray column-header band right below ("search area look very
|
|
261
268
|
tight"). One token so the tiles and the toolbar can't drift apart. */
|
|
262
269
|
--toolbar-row-height: 48px;
|
|
270
|
+
/* The pinned page header on a list page (title + actions), and what the
|
|
271
|
+
table's column headers stick beneath. */
|
|
272
|
+
--page-heading-height: 52px;
|
|
273
|
+
|
|
274
|
+
/* Buttons, after Shopify's admin: a fully rounded pill, 28px tall,
|
|
275
|
+
medium-weight small type. One set of numbers for every button the
|
|
276
|
+
app draws (primary, secondary, destructive, the save bar). */
|
|
277
|
+
--button-height: 28px;
|
|
278
|
+
--button-radius: var(--radius-full);
|
|
279
|
+
--button-padding-x: var(--space-3);
|
|
280
|
+
--button-font-size: var(--text-sm);
|
|
281
|
+
--button-font-weight: var(--font-weight-medium);
|
|
282
|
+
|
|
283
|
+
/* The big rounded containers on a list page, after Shopify's Orders
|
|
284
|
+
page: the KPI strip, the search bar and the table card all share it. */
|
|
285
|
+
--list-card-radius: var(--radius-xl);
|
|
286
|
+
/* A table row under the cursor: a faint veil of the ink, deliberately
|
|
287
|
+
lighter than the header band (--color-surface-tint) so the two never
|
|
288
|
+
read as the same grey. */
|
|
289
|
+
--table-row-hover-bg: color-mix(in srgb, var(--color-text-primary) 4%, transparent);
|
|
290
|
+
/* The secondary button's surface, named once so every control that is a
|
|
291
|
+
secondary button in all but markup (More Actions, the dashboard
|
|
292
|
+
filters, the close x) reads the same two tokens as .btn-secondary
|
|
293
|
+
instead of keeping a private copy of the look. A white pill needs a
|
|
294
|
+
hairline of its own to read against the page. Primary is simply the
|
|
295
|
+
bare `button` rule (--color-cta). */
|
|
296
|
+
--button-secondary-bg: var(--color-secondary-fill);
|
|
297
|
+
--button-secondary-shadow: var(--shadow-btn-secondary), 0 0 0 1px var(--color-border);
|
|
263
298
|
|
|
264
299
|
/* The picture picker (ImagePicker.tsx) behind an item image, the org
|
|
265
300
|
logo and both user photos. Named so those four can't drift apart. */
|
|
@@ -378,11 +413,11 @@
|
|
|
378
413
|
Body moves 14.5 -> 14: at Inter's x-height 14px is the more
|
|
379
414
|
comfortable long-session size, and it buys back the density the
|
|
380
415
|
roomier spacing below spends. */
|
|
381
|
-
--text-xs:
|
|
382
|
-
--text-sm:
|
|
383
|
-
--text-base:
|
|
384
|
-
--text-md:
|
|
385
|
-
--text-lg:
|
|
416
|
+
--text-xs: 11px;
|
|
417
|
+
--text-sm: 12px;
|
|
418
|
+
--text-base: 13px;
|
|
419
|
+
--text-md: 14px;
|
|
420
|
+
--text-lg: 16px;
|
|
386
421
|
--text-xl: 20px;
|
|
387
422
|
--text-2xl: 24px;
|
|
388
423
|
--text-3xl: 30px;
|
|
@@ -411,41 +446,56 @@
|
|
|
411
446
|
/* 58px, not 52 — asked for directly, matched against a reference
|
|
412
447
|
layout's own header height so this app's chrome proportions read
|
|
413
448
|
the same. */
|
|
414
|
-
--header-height:
|
|
449
|
+
--header-height: 8px;
|
|
450
|
+
/* Height of a title bar inside a panel or drawer (notifications,
|
|
451
|
+
support). Was --header-height before the top bar left the desktop
|
|
452
|
+
shell and that token shrank to the frame's own 4px + 4px margins. */
|
|
453
|
+
--panel-header-height: 58px;
|
|
415
454
|
|
|
416
455
|
/* Exact Hattisar Design match — aside/header sit at the same white
|
|
417
456
|
--hd-card-bg as every card (bordered, not tonally separate),
|
|
418
457
|
mirrored by dark theme's own literal Hattisar Design values below. */
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
--sidebar-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
--
|
|
458
|
+
/* The sidebar is dark chrome in every theme, built only from the
|
|
459
|
+
palette above: its fill is the theme's own near-black and its ink the
|
|
460
|
+
theme's own near-white, and every other shade is a mix of those two
|
|
461
|
+
(so a theme change re-tints all of them from one pair of tokens). */
|
|
462
|
+
--sidebar-bg: var(--color-text-primary);
|
|
463
|
+
--sidebar-active-text: var(--color-background-card);
|
|
464
|
+
--sidebar-text: color-mix(in srgb, var(--sidebar-active-text) 86%, var(--sidebar-bg));
|
|
465
|
+
--sidebar-text-muted: color-mix(in srgb, var(--sidebar-active-text) 65%, var(--sidebar-bg));
|
|
466
|
+
/* Hover (and the current row's fill), the dividers, and the search /
|
|
467
|
+
input fill: a veil of the ink over the chrome. */
|
|
468
|
+
--sidebar-hover-bg: color-mix(in srgb, var(--sidebar-active-text) 19%, transparent);
|
|
469
|
+
--sidebar-border: color-mix(in srgb, var(--sidebar-active-text) 14%, transparent);
|
|
470
|
+
--sidebar-input-bg: var(--sidebar-hover-bg);
|
|
471
|
+
/* The row you are on: the full ink on the same fill hover uses, the
|
|
472
|
+
weight doing the rest. */
|
|
473
|
+
--sidebar-active-ink: var(--sidebar-active-text);
|
|
474
|
+
--sidebar-rail-bg: var(--sidebar-bg);
|
|
475
|
+
/* The one background every popout shares (account menu, notifications,
|
|
476
|
+
support, the collapsed rail's hover menu, the search popup): the
|
|
477
|
+
sidebar colour one step lighter, so a popout reads as lifted off
|
|
478
|
+
the dark chrome rather than merging into it. */
|
|
479
|
+
--popout-bg: color-mix(in srgb, var(--sidebar-active-text) 12%, var(--sidebar-bg));
|
|
480
|
+
|
|
481
|
+
/* Sidebar and popout dimensions, named once. */
|
|
482
|
+
--sidebar-icon-size: 20px;
|
|
483
|
+
--sidebar-control-height: 36px;
|
|
484
|
+
--sidebar-item-height: 30px;
|
|
485
|
+
--sidebar-item-weight: 450;
|
|
486
|
+
--sidebar-badge-size: 22px;
|
|
487
|
+
--sidebar-avatar-size: 28px;
|
|
488
|
+
--popout-min-width: 180px;
|
|
489
|
+
--search-popup-width: 640px;
|
|
490
|
+
--mobile-nav-width: 350px;
|
|
441
491
|
|
|
442
492
|
/* Every left-hand nav rail in an app sharing this one width instead
|
|
443
493
|
of each picking its own. 260px, not 240 — asked for directly,
|
|
444
494
|
matched (to the nearest round number) against a reference
|
|
445
495
|
layout's own sidebar width, the same reason --header-height above
|
|
446
496
|
moved too. */
|
|
447
|
-
--sidebar-width:
|
|
448
|
-
--sidebar-width-collapsed:
|
|
497
|
+
--sidebar-width: 220px;
|
|
498
|
+
--sidebar-width-collapsed: 56px;
|
|
449
499
|
--sidebar-height: calc(100vh - var(--header-height));
|
|
450
500
|
|
|
451
501
|
/* Two widths, because a page is one of two things.
|
|
@@ -506,7 +556,9 @@
|
|
|
506
556
|
dramatic jump) plus real borders is what keeps a dark theme
|
|
507
557
|
reading crisp instead of washed out — see --color-border below. */
|
|
508
558
|
--color-background-global: #09090b;
|
|
559
|
+
--color-background-page: #09090b;
|
|
509
560
|
--color-background-card: #18181b;
|
|
561
|
+
--color-table-header: #27272a;
|
|
510
562
|
--color-surface-tint: #27272a;
|
|
511
563
|
--color-input: var(--color-background-card);
|
|
512
564
|
/* Not pure white — pure white text on a near-black surface causes
|
|
@@ -526,7 +578,7 @@
|
|
|
526
578
|
--color-surface-raised: #1f1f23;
|
|
527
579
|
--color-border-raised: #3f3f46;
|
|
528
580
|
--shadow-popover: 0 4px 6px -2px rgba(0, 0, 0, 0.5), 0 16px 40px -10px rgba(0, 0, 0, 0.75);
|
|
529
|
-
--color-hover: var(--color-
|
|
581
|
+
--color-hover: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
|
|
530
582
|
|
|
531
583
|
/* Brighter counterparts of :root's accent set — a dark badge fill
|
|
532
584
|
needs a light/saturated text color for contrast, the mirror image
|
|
@@ -624,16 +676,11 @@
|
|
|
624
676
|
surface as a card, which is where shadcn puts a sidebar too.
|
|
625
677
|
The frame still reads as structurally separate from content, which
|
|
626
678
|
was the point of the original choice. */
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
679
|
+
/* Dark theme: a fill one step below the page canvas (so the page frame
|
|
680
|
+
still reads against it) and the theme's own ink; every other sidebar
|
|
681
|
+
shade is the :root mix of the two. */
|
|
682
|
+
--sidebar-bg: color-mix(in srgb, var(--color-background-global) 40%, black);
|
|
630
683
|
--sidebar-active-text: var(--color-text-primary);
|
|
631
|
-
--sidebar-hover-bg: rgba(255, 255, 255, 0.06);
|
|
632
|
-
/* --color-cta is brand ink now (see :root's own --color-cta) — this
|
|
633
|
-
"current row" marker used to lean on the accent blue clearing AA
|
|
634
|
-
on #18181b without the on-surface variant's extra darkening. */
|
|
635
|
-
--sidebar-active-ink: var(--color-cta);
|
|
636
|
-
--sidebar-rail-bg: #18181b;
|
|
637
684
|
|
|
638
685
|
color-scheme: dark;
|
|
639
686
|
}
|
|
@@ -645,7 +692,10 @@
|
|
|
645
692
|
alone would lose to a dark attribute set higher up. */
|
|
646
693
|
[data-theme="light"] {
|
|
647
694
|
--color-background-global: #f4f4f5;
|
|
695
|
+
--color-background-page: #ffffff;
|
|
648
696
|
--color-background-card: #ffffff;
|
|
697
|
+
/* Table column-header band: a step lighter than the hover tint. */
|
|
698
|
+
--color-table-header: #f7f7f7;
|
|
649
699
|
--color-surface-tint: #e8e8ea;
|
|
650
700
|
--color-input: #ffffff;
|
|
651
701
|
--color-text-primary: #09090b;
|
|
@@ -656,7 +706,7 @@
|
|
|
656
706
|
--color-surface-raised: #ffffff;
|
|
657
707
|
--color-border-raised: #d4d4d8;
|
|
658
708
|
--shadow-popover: 0 4px 6px -2px rgba(9, 9, 11, 0.08), 0 12px 28px -8px rgba(9, 9, 11, 0.18);
|
|
659
|
-
--color-hover: var(--color-
|
|
709
|
+
--color-hover: color-mix(in srgb, var(--color-text-primary) 6%, transparent);
|
|
660
710
|
|
|
661
711
|
--color-brand: var(--color-text-primary);
|
|
662
712
|
--color-brand-hover: color-mix(in srgb, var(--color-brand) 85%, black);
|
|
@@ -673,7 +723,7 @@
|
|
|
673
723
|
--shadow-btn-primary: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
674
724
|
--shadow-btn-secondary: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
675
725
|
|
|
676
|
-
--color-secondary-fill: var(--color-
|
|
726
|
+
--color-secondary-fill: var(--color-background-card);
|
|
677
727
|
--color-secondary-border: var(--color-border-strong);
|
|
678
728
|
--color-secondary-text: var(--color-text-primary);
|
|
679
729
|
--color-secondary-hover: color-mix(in srgb, var(--color-text-primary) 6%, var(--color-secondary-fill));
|
|
@@ -728,13 +778,8 @@
|
|
|
728
778
|
--shadow-md: none;
|
|
729
779
|
--shadow-lg: none;
|
|
730
780
|
|
|
731
|
-
--sidebar-bg: var(--color-
|
|
732
|
-
--sidebar-text:
|
|
733
|
-
--sidebar-text-muted: var(--color-text-muted);
|
|
734
|
-
--sidebar-active-text: var(--color-text-primary);
|
|
735
|
-
--sidebar-hover-bg: var(--color-surface-tint);
|
|
736
|
-
--sidebar-active-ink: var(--color-cta-on-surface);
|
|
737
|
-
--sidebar-rail-bg: var(--color-background-card);
|
|
781
|
+
--sidebar-bg: var(--color-text-primary);
|
|
782
|
+
--sidebar-active-text: var(--color-background-card);
|
|
738
783
|
|
|
739
784
|
color-scheme: light;
|
|
740
785
|
}
|
|
@@ -880,10 +925,11 @@ button {
|
|
|
880
925
|
font: inherit;
|
|
881
926
|
cursor: pointer;
|
|
882
927
|
border: none;
|
|
883
|
-
border-radius: var(--radius
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
font-
|
|
928
|
+
border-radius: var(--button-radius);
|
|
929
|
+
min-height: var(--button-height);
|
|
930
|
+
padding: var(--space-1) var(--button-padding-x);
|
|
931
|
+
font-size: var(--button-font-size);
|
|
932
|
+
font-weight: var(--button-font-weight);
|
|
887
933
|
background: var(--color-cta);
|
|
888
934
|
color: var(--color-cta-text);
|
|
889
935
|
box-shadow: var(--shadow-btn-primary);
|
|
@@ -942,13 +988,14 @@ button:focus-visible {
|
|
|
942
988
|
font: inherit;
|
|
943
989
|
cursor: pointer;
|
|
944
990
|
border: none;
|
|
945
|
-
border-radius: var(--radius
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
font-
|
|
949
|
-
|
|
991
|
+
border-radius: var(--button-radius);
|
|
992
|
+
min-height: var(--button-height);
|
|
993
|
+
padding: var(--space-1) var(--button-padding-x);
|
|
994
|
+
font-size: var(--button-font-size);
|
|
995
|
+
font-weight: var(--button-font-weight);
|
|
996
|
+
background: var(--button-secondary-bg);
|
|
950
997
|
color: var(--color-secondary-text);
|
|
951
|
-
box-shadow: var(--
|
|
998
|
+
box-shadow: var(--button-secondary-shadow);
|
|
952
999
|
text-decoration: none;
|
|
953
1000
|
}
|
|
954
1001
|
|
|
@@ -978,10 +1025,11 @@ button:focus-visible {
|
|
|
978
1025
|
font: inherit;
|
|
979
1026
|
cursor: pointer;
|
|
980
1027
|
border: none;
|
|
981
|
-
border-radius: var(--radius
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
font-
|
|
1028
|
+
border-radius: var(--button-radius);
|
|
1029
|
+
min-height: var(--button-height);
|
|
1030
|
+
padding: var(--space-1) var(--button-padding-x);
|
|
1031
|
+
font-size: var(--button-font-size);
|
|
1032
|
+
font-weight: var(--button-font-weight);
|
|
985
1033
|
background: var(--color-destructive-fill);
|
|
986
1034
|
/* Bare button{} above defaults every <button> to box-shadow:
|
|
987
1035
|
var(--shadow-btn-primary), a layered bevel built around
|