@hattisar/design-tokens 0.3.26 → 0.3.27
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 +149 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hattisar/design-tokens",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.27",
|
|
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
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
--color-secondary-fill: var(--color-background-card);
|
|
139
139
|
--color-secondary-border: var(--color-border-strong);
|
|
140
140
|
--color-secondary-text: var(--color-text-primary);
|
|
141
|
-
--color-secondary-hover: color-mix(in srgb, var(--color-text-primary)
|
|
142
|
-
--color-secondary-active: color-mix(in srgb, var(--color-text-primary)
|
|
141
|
+
--color-secondary-hover: color-mix(in srgb, var(--color-text-primary) 3%, var(--color-secondary-fill));
|
|
142
|
+
--color-secondary-active: color-mix(in srgb, var(--color-text-primary) 6%, var(--color-secondary-fill));
|
|
143
143
|
|
|
144
144
|
/* Destructive button — irreversible actions only (delete, void). */
|
|
145
145
|
--color-destructive-fill: #c70a24;
|
|
@@ -193,6 +193,24 @@
|
|
|
193
193
|
--status-overdue-text: var(--color-danger);
|
|
194
194
|
--status-overdue-bg: #feebec;
|
|
195
195
|
|
|
196
|
+
/* The badge palette: what a status pill is painted with, kept apart from
|
|
197
|
+
the --status-* accents above (those colour dashboard accents and row
|
|
198
|
+
bars). Quiet gray for anything healthy or finished, so a long column
|
|
199
|
+
of them stays calm; colour only where something is in progress or
|
|
200
|
+
needs a look. */
|
|
201
|
+
--badge-neutral-bg: rgba(0, 0, 0, 0.05);
|
|
202
|
+
--badge-neutral-text: #4a4a4a;
|
|
203
|
+
--badge-progress-bg: #8ce1f8;
|
|
204
|
+
--badge-progress-text: #01596f;
|
|
205
|
+
--badge-attention-bg: #ffe45c;
|
|
206
|
+
--badge-attention-text: #574100;
|
|
207
|
+
--badge-caution-bg: #ffc58a;
|
|
208
|
+
--badge-caution-text: #5c2f00;
|
|
209
|
+
--badge-critical-bg: #fed3d1;
|
|
210
|
+
--badge-critical-text: #8e0b21;
|
|
211
|
+
--badge-success-bg: #dcf5c9;
|
|
212
|
+
--badge-success-text: #214b03;
|
|
213
|
+
|
|
196
214
|
/* Page-level warning/danger/success banners — distinct from the row
|
|
197
215
|
badges above: a border plus a matching soft fill, no separate text
|
|
198
216
|
color (banner text uses --color-text-primary as usual). Warning/
|
|
@@ -261,13 +279,13 @@
|
|
|
261
279
|
--print-paper: #ffffff;
|
|
262
280
|
--print-ink: #0f172a;
|
|
263
281
|
|
|
264
|
-
/* The row a list page's
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
--toolbar-row-height:
|
|
282
|
+
/* The row a list page's search/filter toolbar sits in: the same 36px as
|
|
283
|
+
the table-header and tab-strip rows. It was 48px, once, after the
|
|
284
|
+
icon and text sat against the card edge at 36px ("search area look
|
|
285
|
+
very tight"); the bar has its own border and a margin below it now,
|
|
286
|
+
which is what that was missing, so the shorter row is back — asked
|
|
287
|
+
for directly, to match a compact admin search field. */
|
|
288
|
+
--toolbar-row-height: 36px;
|
|
271
289
|
/* The pinned page header on a list page (title + actions), and what the
|
|
272
290
|
table's column headers stick beneath. */
|
|
273
291
|
--page-heading-height: 52px;
|
|
@@ -284,6 +302,10 @@
|
|
|
284
302
|
/* The big rounded containers on a list page, after Shopify's Orders
|
|
285
303
|
page: the KPI strip, the search bar and the table card all share it. */
|
|
286
304
|
--list-card-radius: var(--radius-xl);
|
|
305
|
+
/* The outline of a list page's three containers (summary tiles, search
|
|
306
|
+
bar, table): the quiet row-divider grey, not the strong one, so the
|
|
307
|
+
frames read as surfaces rather than drawn boxes. */
|
|
308
|
+
--list-frame-border: var(--color-border);
|
|
287
309
|
/* A table row under the cursor: a faint veil of the ink, deliberately
|
|
288
310
|
lighter than the header band (--color-surface-tint) so the two never
|
|
289
311
|
read as the same grey. */
|
|
@@ -295,7 +317,30 @@
|
|
|
295
317
|
hairline of its own to read against the page. Primary is simply the
|
|
296
318
|
bare `button` rule (--color-cta). */
|
|
297
319
|
--button-secondary-bg: var(--color-secondary-fill);
|
|
298
|
-
|
|
320
|
+
/* The press and hover motion every button shares: a long ease-out, which
|
|
321
|
+
reads as snappy because most of the change lands in the first moments. */
|
|
322
|
+
--ease-button: cubic-bezier(0.2, 0.8, 0, 1);
|
|
323
|
+
/* An icon-only button with no fill at rest (the edit pencil): a round tint of
|
|
324
|
+
the ink on hover, 8% like the reference's. */
|
|
325
|
+
--button-tertiary-hover-bg: color-mix(in srgb, var(--color-text-primary) 8%, transparent);
|
|
326
|
+
--duration-button: 0.4s;
|
|
327
|
+
--shadow-btn-primary:
|
|
328
|
+
0 1px 0.5px -0.5px rgba(0, 0, 0, 0.13),
|
|
329
|
+
0 1px 2px -0.5px rgba(0, 0, 0, 0.13),
|
|
330
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.13),
|
|
331
|
+
0 2px 3px -1.5px rgba(0, 0, 0, 0.13),
|
|
332
|
+
inset 0 0 4px 1px var(--color-cta),
|
|
333
|
+
inset 0 0 4px 2px rgba(255, 255, 255, 0.1),
|
|
334
|
+
inset 0 0 12px -6px rgba(255, 255, 255, 0.75);
|
|
335
|
+
--shadow-btn-secondary: 0 1px 2px rgba(9, 9, 11, 0.05);
|
|
336
|
+
--button-primary-sheen:
|
|
337
|
+
radial-gradient(50% 50% at 50% 0%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%),
|
|
338
|
+
radial-gradient(49.59% 37.11% at 50.41% 101.56%, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 66.46%);
|
|
339
|
+
--button-secondary-shadow:
|
|
340
|
+
0 0 0 1px rgba(0, 0, 0, 0.07),
|
|
341
|
+
0 2px 20px 0 rgba(0, 0, 0, 0.03),
|
|
342
|
+
0 5px 20px 0 rgba(0, 0, 0, 0.03),
|
|
343
|
+
0 8px 60px 0 rgba(0, 0, 0, 0.03);
|
|
299
344
|
|
|
300
345
|
/* The picture picker (ImagePicker.tsx) behind an item image, the org
|
|
301
346
|
logo and both user photos. Named so those four can't drift apart. */
|
|
@@ -483,7 +528,30 @@
|
|
|
483
528
|
--sidebar-icon-size: 20px;
|
|
484
529
|
--sidebar-control-height: 36px;
|
|
485
530
|
--sidebar-item-height: 30px;
|
|
531
|
+
/* The sidebar's search field: a short, rounder pill on a lighter fill,
|
|
532
|
+
lifted by a faint inner highlight and a hairline edge so it reads as a
|
|
533
|
+
raised control on the dark rail rather than a flat patch. */
|
|
534
|
+
--sidebar-search-height: 30px;
|
|
535
|
+
--sidebar-search-radius: var(--radius-lg);
|
|
536
|
+
--sidebar-search-shadow:
|
|
537
|
+
inset 0 0 0 1px color-mix(in srgb, var(--sidebar-active-text) 2%, transparent),
|
|
538
|
+
inset 0 1px 1px 0 color-mix(in srgb, var(--sidebar-active-text) 6%, transparent),
|
|
539
|
+
inset 0 0 12px 1px color-mix(in srgb, var(--sidebar-active-text) 6%, transparent),
|
|
540
|
+
0 1px 2px 0 rgba(0, 0, 0, 0.1),
|
|
541
|
+
0 0 0 1px rgba(0, 0, 0, 0.1);
|
|
486
542
|
--sidebar-item-weight: 450;
|
|
543
|
+
/* One row for all three rails (the main sidebar, Settings, Reports): the
|
|
544
|
+
same padding, icon-to-label gap, weight and active weight, so the same
|
|
545
|
+
row looks the same wherever it sits. A sub-item's text starts under its
|
|
546
|
+
parent's text: left padding + the icon + the gap. */
|
|
547
|
+
--sidebar-icon-inset: 6px;
|
|
548
|
+
--sidebar-row-padding: 5px 8px 5px var(--sidebar-icon-inset);
|
|
549
|
+
--sidebar-row-gap: var(--space-2);
|
|
550
|
+
/* The space between one row and the next, at every level, so a top-level
|
|
551
|
+
row and a sub-item sit the same distance from their neighbours. */
|
|
552
|
+
--sidebar-row-spacing: 6px;
|
|
553
|
+
--sidebar-sub-indent: calc(var(--sidebar-icon-inset) + var(--sidebar-icon-size) + var(--sidebar-row-gap));
|
|
554
|
+
--sidebar-active-weight: var(--font-weight-medium);
|
|
487
555
|
--sidebar-badge-size: 22px;
|
|
488
556
|
--sidebar-avatar-size: 28px;
|
|
489
557
|
--popout-min-width: 180px;
|
|
@@ -496,7 +564,11 @@
|
|
|
496
564
|
layout's own sidebar width, the same reason --header-height above
|
|
497
565
|
moved too. */
|
|
498
566
|
--sidebar-width: 220px;
|
|
499
|
-
|
|
567
|
+
/* The collapsed rail is exactly the width of its icon column: the row's
|
|
568
|
+
icon inset, the icon, and the same inset again, inside the rail's own
|
|
569
|
+
padding — so an icon is in the same place whether the rail is open or
|
|
570
|
+
closed. */
|
|
571
|
+
--sidebar-width-collapsed: calc(2 * var(--space-2) + 2 * var(--sidebar-icon-inset) + var(--sidebar-icon-size));
|
|
500
572
|
--sidebar-height: calc(100vh - var(--header-height));
|
|
501
573
|
|
|
502
574
|
/* Two widths, because a page is one of two things.
|
|
@@ -612,8 +684,10 @@
|
|
|
612
684
|
--color-cta-active: var(--color-brand-active);
|
|
613
685
|
--color-cta-text: var(--color-brand-text);
|
|
614
686
|
|
|
615
|
-
--shadow-btn-primary: 0 1px 2px rgba(
|
|
616
|
-
--shadow-btn-secondary: 0 1px 2px rgba(
|
|
687
|
+
--shadow-btn-primary: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
688
|
+
--shadow-btn-secondary: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
689
|
+
--button-primary-sheen: none;
|
|
690
|
+
--button-secondary-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
617
691
|
|
|
618
692
|
--color-secondary-fill: var(--color-surface-tint);
|
|
619
693
|
--color-secondary-border: var(--color-border-strong);
|
|
@@ -653,6 +727,19 @@
|
|
|
653
727
|
--status-overdue-text: var(--color-danger);
|
|
654
728
|
--status-overdue-bg: #401d21;
|
|
655
729
|
|
|
730
|
+
--badge-neutral-bg: rgba(255, 255, 255, 0.08);
|
|
731
|
+
--badge-neutral-text: #d4d4d8;
|
|
732
|
+
--badge-progress-bg: #0f3341;
|
|
733
|
+
--badge-progress-text: #8ce1f8;
|
|
734
|
+
--badge-attention-bg: #4a3b00;
|
|
735
|
+
--badge-attention-text: #ffe45c;
|
|
736
|
+
--badge-caution-bg: #4d2c0a;
|
|
737
|
+
--badge-caution-text: #ffc58a;
|
|
738
|
+
--badge-critical-bg: #4d1218;
|
|
739
|
+
--badge-critical-text: #fda4a8;
|
|
740
|
+
--badge-success-bg: #1f3a0f;
|
|
741
|
+
--badge-success-text: #b3f782;
|
|
742
|
+
|
|
656
743
|
--banner-warning-bg: #3a2907;
|
|
657
744
|
--banner-warning-border: var(--color-warning);
|
|
658
745
|
--banner-danger-bg: #4a1119;
|
|
@@ -721,14 +808,29 @@
|
|
|
721
808
|
--color-cta-active: var(--color-brand-active);
|
|
722
809
|
--color-cta-text: var(--color-brand-text);
|
|
723
810
|
|
|
724
|
-
--shadow-btn-primary:
|
|
725
|
-
|
|
811
|
+
--shadow-btn-primary:
|
|
812
|
+
0 1px 0.5px -0.5px rgba(0, 0, 0, 0.13),
|
|
813
|
+
0 1px 2px -0.5px rgba(0, 0, 0, 0.13),
|
|
814
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.13),
|
|
815
|
+
0 2px 3px -1.5px rgba(0, 0, 0, 0.13),
|
|
816
|
+
inset 0 0 4px 1px var(--color-cta),
|
|
817
|
+
inset 0 0 4px 2px rgba(255, 255, 255, 0.1),
|
|
818
|
+
inset 0 0 12px -6px rgba(255, 255, 255, 0.75);
|
|
819
|
+
--shadow-btn-secondary: 0 1px 2px rgba(9, 9, 11, 0.05);
|
|
820
|
+
--button-primary-sheen:
|
|
821
|
+
radial-gradient(50% 50% at 50% 0%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%),
|
|
822
|
+
radial-gradient(49.59% 37.11% at 50.41% 101.56%, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 66.46%);
|
|
823
|
+
--button-secondary-shadow:
|
|
824
|
+
0 0 0 1px rgba(0, 0, 0, 0.07),
|
|
825
|
+
0 2px 20px 0 rgba(0, 0, 0, 0.03),
|
|
826
|
+
0 5px 20px 0 rgba(0, 0, 0, 0.03),
|
|
827
|
+
0 8px 60px 0 rgba(0, 0, 0, 0.03);
|
|
726
828
|
|
|
727
829
|
--color-secondary-fill: var(--color-background-card);
|
|
728
830
|
--color-secondary-border: var(--color-border-strong);
|
|
729
831
|
--color-secondary-text: var(--color-text-primary);
|
|
730
|
-
--color-secondary-hover: color-mix(in srgb, var(--color-text-primary)
|
|
731
|
-
--color-secondary-active: color-mix(in srgb, var(--color-text-primary)
|
|
832
|
+
--color-secondary-hover: color-mix(in srgb, var(--color-text-primary) 3%, var(--color-secondary-fill));
|
|
833
|
+
--color-secondary-active: color-mix(in srgb, var(--color-text-primary) 6%, var(--color-secondary-fill));
|
|
732
834
|
|
|
733
835
|
--color-destructive-fill: #c70a24;
|
|
734
836
|
--color-destructive-hover: #a30a24;
|
|
@@ -761,6 +863,24 @@
|
|
|
761
863
|
--status-overdue-text: var(--color-danger);
|
|
762
864
|
--status-overdue-bg: #feebec;
|
|
763
865
|
|
|
866
|
+
/* The badge palette: what a status pill is painted with, kept apart from
|
|
867
|
+
the --status-* accents above (those colour dashboard accents and row
|
|
868
|
+
bars). Quiet gray for anything healthy or finished, so a long column
|
|
869
|
+
of them stays calm; colour only where something is in progress or
|
|
870
|
+
needs a look. */
|
|
871
|
+
--badge-neutral-bg: rgba(0, 0, 0, 0.05);
|
|
872
|
+
--badge-neutral-text: #4a4a4a;
|
|
873
|
+
--badge-progress-bg: #8ce1f8;
|
|
874
|
+
--badge-progress-text: #01596f;
|
|
875
|
+
--badge-attention-bg: #ffe45c;
|
|
876
|
+
--badge-attention-text: #574100;
|
|
877
|
+
--badge-caution-bg: #ffc58a;
|
|
878
|
+
--badge-caution-text: #5c2f00;
|
|
879
|
+
--badge-critical-bg: #fed3d1;
|
|
880
|
+
--badge-critical-text: #8e0b21;
|
|
881
|
+
--badge-success-bg: #dcf5c9;
|
|
882
|
+
--badge-success-text: #214b03;
|
|
883
|
+
|
|
764
884
|
--banner-warning-bg: #fff3e6;
|
|
765
885
|
--banner-warning-border: var(--color-warning);
|
|
766
886
|
--banner-danger-bg: #fdeaed;
|
|
@@ -932,21 +1052,29 @@ button {
|
|
|
932
1052
|
font-size: var(--button-font-size);
|
|
933
1053
|
font-weight: var(--button-font-weight);
|
|
934
1054
|
background: var(--color-cta);
|
|
1055
|
+
/* A soft light at the top edge and a fainter one at the bottom, the way
|
|
1056
|
+
the reference admin lifts its primary button off the page. Anything that
|
|
1057
|
+
sets its own `background:` shorthand clears this along with the colour. */
|
|
1058
|
+
background-image: var(--button-primary-sheen);
|
|
935
1059
|
color: var(--color-cta-text);
|
|
936
1060
|
box-shadow: var(--shadow-btn-primary);
|
|
937
1061
|
transition:
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
1062
|
+
background-color var(--duration-button) var(--ease-button),
|
|
1063
|
+
box-shadow var(--duration-button) var(--ease-button),
|
|
1064
|
+
transform var(--duration-button) var(--ease-button);
|
|
941
1065
|
}
|
|
942
1066
|
|
|
943
1067
|
button:hover {
|
|
944
1068
|
background: var(--color-cta-hover);
|
|
1069
|
+
background-image: var(--button-primary-sheen);
|
|
945
1070
|
}
|
|
946
1071
|
|
|
1072
|
+
/* Pressed is a darker fill, not a shrink: the button stays the size it is,
|
|
1073
|
+
which is what made the old one feel busy. */
|
|
947
1074
|
button:active {
|
|
948
1075
|
background: var(--color-cta-active);
|
|
949
|
-
|
|
1076
|
+
background-image: var(--button-primary-sheen);
|
|
1077
|
+
transform: none;
|
|
950
1078
|
}
|
|
951
1079
|
|
|
952
1080
|
button:disabled {
|