@hattisar/design-tokens 0.3.32 → 0.3.33
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 +100 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hattisar/design-tokens",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.33",
|
|
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
|
@@ -239,6 +239,12 @@
|
|
|
239
239
|
--radius-lg: 14px;
|
|
240
240
|
--radius-xl: 17px;
|
|
241
241
|
--radius-full: 9999px;
|
|
242
|
+
/* Roles. Stylesheets say what a corner is FOR, so changing the look of every control or every container is one
|
|
243
|
+
edit here: a control is anything you press or type into (buttons, fields, the search bar); a container holds
|
|
244
|
+
other things (cards, tiles, the table card, popovers); a chip is a small label. */
|
|
245
|
+
--radius-control: var(--radius-sm);
|
|
246
|
+
--radius-container: var(--radius-md);
|
|
247
|
+
--radius-chip: var(--radius-xs);
|
|
242
248
|
|
|
243
249
|
/* The width of a rule or a border: a hairline everywhere, a heavier one where a line has to carry weight (a print rule, a
|
|
244
250
|
highlighted edge). Stated here so no stylesheet or component writes "1px" for a border. */
|
|
@@ -254,14 +260,14 @@
|
|
|
254
260
|
the page canvas behind it was gray; it is a fill of its own now. */
|
|
255
261
|
--tabs-frame-bg: var(--color-table-header);
|
|
256
262
|
--tabs-frame-border: var(--border-width) solid var(--color-border);
|
|
257
|
-
--tabs-frame-radius: var(--radius-
|
|
263
|
+
--tabs-frame-radius: var(--radius-control);
|
|
258
264
|
|
|
259
265
|
/* Anything that floats over the page: dropdown and action menus, the
|
|
260
266
|
global-search results, combobox lists, the profile/notification
|
|
261
267
|
drawer, tooltips and modal dialogs. Their surface already had a
|
|
262
268
|
border and a shadow but no radius, so every popup was a hard
|
|
263
269
|
rectangle beside the rounded buttons and cards that opened it. */
|
|
264
|
-
--popup-radius: var(--radius-
|
|
270
|
+
--popup-radius: var(--radius-container);
|
|
265
271
|
|
|
266
272
|
/* The header row shared by every titled card (WidgetCard) and the tab
|
|
267
273
|
strip that stands in for one, and the control that sits inside it (a
|
|
@@ -280,7 +286,7 @@
|
|
|
280
286
|
--widget-bg: var(--color-table-header);
|
|
281
287
|
--widget-border-width: var(--border-width);
|
|
282
288
|
--widget-border-color: var(--color-border-strong);
|
|
283
|
-
--widget-radius: var(--radius-
|
|
289
|
+
--widget-radius: var(--radius-container);
|
|
284
290
|
--widget-shadow: var(--shadow-sm);
|
|
285
291
|
--widget-header-height: var(--card-header-height);
|
|
286
292
|
--widget-header-padding: 6px var(--space-3);
|
|
@@ -332,7 +338,7 @@
|
|
|
332
338
|
|
|
333
339
|
/* The big rounded containers on a list page, after Shopify's Orders
|
|
334
340
|
page: the KPI strip, the search bar and the table card all share it. */
|
|
335
|
-
--list-card-radius: var(--radius-
|
|
341
|
+
--list-card-radius: var(--radius-container);
|
|
336
342
|
/* The outline of a list page's three containers (summary tiles, search
|
|
337
343
|
bar, table): the quiet row-divider grey, not the strong one, so the
|
|
338
344
|
frames read as surfaces rather than drawn boxes. */
|
|
@@ -449,6 +455,9 @@
|
|
|
449
455
|
the input ends up 6px taller than the field it contains, which is
|
|
450
456
|
how an overlaid control centres itself slightly high. */
|
|
451
457
|
--field-label-gap: 6px;
|
|
458
|
+
/* The vertical padding of a text field, select or textarea. 8px (a 38px field) is the shared default; the staff app sets it
|
|
459
|
+
from a field height (data-views.css), so the height is one number and the padding follows from the line height. */
|
|
460
|
+
--field-pad-y: 8px;
|
|
452
461
|
--space-12: 48px;
|
|
453
462
|
/* Two steps past the old ceiling, for the gaps that separate whole
|
|
454
463
|
regions of a page rather than elements inside one. Without them
|
|
@@ -526,6 +535,31 @@
|
|
|
526
535
|
--duration-fast: 100ms;
|
|
527
536
|
--duration-base: 150ms;
|
|
528
537
|
--duration-slow: 250ms;
|
|
538
|
+
/* Panels that move as a whole (the sidebar collapsing, a Settings menu opening beside it): longer than a control's
|
|
539
|
+
hover, with an ease-out that lands softly, so the layout glides instead of snapping. */
|
|
540
|
+
--duration-panel: 350ms;
|
|
541
|
+
--ease-panel: cubic-bezier(0.32, 0.72, 0, 1);
|
|
542
|
+
/* Things that arrive (the menu on load): 400ms on a long ease-out, which lands most of the way in the first
|
|
543
|
+
moments. The same curve as --ease-button. A row starts --nav-enter-shift to the left and --nav-enter-blur
|
|
544
|
+
out of focus, and each row follows the one above by --stagger-step. */
|
|
545
|
+
--duration-enter: 400ms;
|
|
546
|
+
--ease-enter: cubic-bezier(0.2, 0.8, 0, 1);
|
|
547
|
+
--stagger-step: 10ms;
|
|
548
|
+
/* The frame first, then what is in it: the sidebar column, the page and their backgrounds are on screen at once,
|
|
549
|
+
and every arriving thing waits this long before it starts, as Shopify's does (its contents begin well after
|
|
550
|
+
the shell is up). */
|
|
551
|
+
--enter-delay: 200ms;
|
|
552
|
+
/* A section's sub-items arriving when you open it: the same recipe, gentler. They only step 4px and follow each
|
|
553
|
+
other 25ms apart, measured off Shopify's sub-menus. */
|
|
554
|
+
--sub-enter-shift: -4px;
|
|
555
|
+
--sub-stagger-step: 25ms;
|
|
556
|
+
--nav-enter-shift: -60px;
|
|
557
|
+
--nav-enter-blur: 2px;
|
|
558
|
+
--page-enter-rise: 60px;
|
|
559
|
+
/* What happens when you point at or press something: quick, on the browser's own `ease`, which is the curve
|
|
560
|
+
Shopify's admin uses for every hover colour fade. Arrivals above are slow; reactions are not. */
|
|
561
|
+
--duration-hover: 150ms;
|
|
562
|
+
--ease-hover: ease;
|
|
529
563
|
|
|
530
564
|
/* 58px, not 52 — asked for directly, matched against a reference
|
|
531
565
|
layout's own header height so this app's chrome proportions read
|
|
@@ -562,14 +596,20 @@
|
|
|
562
596
|
--popout-bg: color-mix(in srgb, var(--sidebar-active-text) 12%, var(--sidebar-bg));
|
|
563
597
|
|
|
564
598
|
/* Sidebar and popout dimensions, named once. */
|
|
565
|
-
--sidebar-icon-
|
|
599
|
+
/* A menu icon: 18px, drawn at 1.5px (--sidebar-icon-stroke on the 24-unit grid it is drawn on, 2 is 1.5px at this
|
|
600
|
+
size), as Shopify's admin does at 16px with text a size smaller. The inset below is chosen so the icon sits at
|
|
601
|
+
the same place in the 48px collapsed rail: 2 * 8 + 2 * 7 + 18. The slot is the 20px column the Settings and
|
|
602
|
+
Reports rows were built around; their icon is centred in it so their text does not move. */
|
|
603
|
+
--sidebar-icon-size: 18px;
|
|
604
|
+
--sidebar-icon-stroke: 2;
|
|
605
|
+
--sidebar-icon-slot: 20px;
|
|
566
606
|
--sidebar-control-height: 36px;
|
|
567
607
|
--sidebar-item-height: 30px;
|
|
568
608
|
/* The sidebar's search field: a short, rounder pill on a lighter fill,
|
|
569
609
|
lifted by a faint inner highlight and a hairline edge so it reads as a
|
|
570
610
|
raised control on the dark rail rather than a flat patch. */
|
|
571
611
|
--sidebar-search-height: 30px;
|
|
572
|
-
--sidebar-search-radius: var(--radius-
|
|
612
|
+
--sidebar-search-radius: var(--radius-control);
|
|
573
613
|
--sidebar-search-shadow:
|
|
574
614
|
inset 0 0 0 var(--border-width) color-mix(in srgb, var(--sidebar-active-text) 2%, transparent),
|
|
575
615
|
inset 0 1px 1px 0 color-mix(in srgb, var(--sidebar-active-text) 6%, transparent),
|
|
@@ -581,7 +621,7 @@
|
|
|
581
621
|
same padding, icon-to-label gap, weight and active weight, so the same
|
|
582
622
|
row looks the same wherever it sits. A sub-item's text starts under its
|
|
583
623
|
parent's text: left padding + the icon + the gap. */
|
|
584
|
-
--sidebar-icon-inset:
|
|
624
|
+
--sidebar-icon-inset: 7px;
|
|
585
625
|
--sidebar-row-padding: 5px 8px 5px var(--sidebar-icon-inset);
|
|
586
626
|
--sidebar-row-gap: var(--space-2);
|
|
587
627
|
/* The space between one row and the next, at every level, so a top-level
|
|
@@ -591,7 +631,9 @@
|
|
|
591
631
|
--sidebar-active-weight: var(--font-weight-medium);
|
|
592
632
|
--sidebar-avatar-size: 28px;
|
|
593
633
|
--popout-min-width: 180px;
|
|
594
|
-
--search-popup-width:
|
|
634
|
+
--search-popup-width: 650px;
|
|
635
|
+
--search-popup-field-height: 64px;
|
|
636
|
+
--search-popup-min-height: 420px;
|
|
595
637
|
--mobile-nav-width: 350px;
|
|
596
638
|
|
|
597
639
|
/* Every left-hand nav rail in an app sharing this one width instead
|
|
@@ -1232,10 +1274,10 @@ textarea {
|
|
|
1232
1274
|
font-weight: var(--font-weight-regular);
|
|
1233
1275
|
line-height: 1.4;
|
|
1234
1276
|
width: 100%;
|
|
1235
|
-
padding:
|
|
1277
|
+
padding: var(--field-pad-y) 12px;
|
|
1236
1278
|
margin-top: var(--field-label-gap);
|
|
1237
1279
|
border: var(--border-width) solid var(--color-border-strong);
|
|
1238
|
-
border-radius: var(--radius-
|
|
1280
|
+
border-radius: var(--radius-control);
|
|
1239
1281
|
background: var(--color-input);
|
|
1240
1282
|
color: var(--color-text-primary);
|
|
1241
1283
|
transition:
|
|
@@ -1784,7 +1826,7 @@ a.card:hover {
|
|
|
1784
1826
|
|
|
1785
1827
|
.modal-panel {
|
|
1786
1828
|
background: var(--color-surface-raised);
|
|
1787
|
-
border:
|
|
1829
|
+
border: 0;
|
|
1788
1830
|
box-shadow: var(--shadow-popover);
|
|
1789
1831
|
width: 100%;
|
|
1790
1832
|
max-width: 640px;
|
|
@@ -1797,7 +1839,6 @@ a.card:hover {
|
|
|
1797
1839
|
|
|
1798
1840
|
.modal-panel-header {
|
|
1799
1841
|
padding: 12px 16px;
|
|
1800
|
-
border-bottom: var(--border-width) solid var(--color-border);
|
|
1801
1842
|
display: flex;
|
|
1802
1843
|
align-items: center;
|
|
1803
1844
|
gap: 12px;
|
|
@@ -1815,7 +1856,6 @@ a.card:hover {
|
|
|
1815
1856
|
|
|
1816
1857
|
.modal-panel-footer {
|
|
1817
1858
|
padding: 12px 16px;
|
|
1818
|
-
border-top: var(--border-width) solid var(--color-border);
|
|
1819
1859
|
display: flex;
|
|
1820
1860
|
justify-content: flex-end;
|
|
1821
1861
|
gap: 10px;
|
|
@@ -1836,6 +1876,36 @@ a.card:hover {
|
|
|
1836
1876
|
--ui-accent-hover: #0b5f58;
|
|
1837
1877
|
--ui-accent-ink: #fff;
|
|
1838
1878
|
--ui-accent-soft: color-mix(in srgb, var(--ui-accent) var(--ui-wash), transparent);
|
|
1879
|
+
/* The monochrome action: near-black on light, near-white on dark, with its hover and the ink that sits on it.
|
|
1880
|
+
The staff app points --ui-accent at these (data-views.css); the Storefront keeps the accent above, which a
|
|
1881
|
+
seller can swap. */
|
|
1882
|
+
--ui-action: #1a1a1a;
|
|
1883
|
+
--ui-action-hover: #303030;
|
|
1884
|
+
--ui-action-ink: #ffffff;
|
|
1885
|
+
/* The cool-grey look's surfaces and edges, by role. data-views.css maps the staff app's --ui-* tokens onto these,
|
|
1886
|
+
so no stylesheet writes a grey of its own. */
|
|
1887
|
+
--surface-canvas: #eef0f4;
|
|
1888
|
+
--surface-paper: #ffffff;
|
|
1889
|
+
--surface-band: #f6f7f9;
|
|
1890
|
+
--surface-tray: #eceef2;
|
|
1891
|
+
--edge-hairline: #dfe2e8;
|
|
1892
|
+
--edge-strong: #cfd3da;
|
|
1893
|
+
--edge-raised: #dcdfe5;
|
|
1894
|
+
--grid-line: #e9ebef;
|
|
1895
|
+
/* What a shadow is drawn in, and the two pure ends for a highlight or a scrim. */
|
|
1896
|
+
--shadow-ink: #101828;
|
|
1897
|
+
--ui-white: #ffffff;
|
|
1898
|
+
--ui-black: #000000;
|
|
1899
|
+
/* The light-grey guide line a label or barcode preview draws around its cell. Paper, so it is the same in every
|
|
1900
|
+
theme (it is not in the dark block). */
|
|
1901
|
+
--paper-guide: #999999;
|
|
1902
|
+
/* Data colours for chart series 2 to 5 (series 1 follows the action colour). Distinct, sharing one saturation. */
|
|
1903
|
+
--chart-2: #4f46e5;
|
|
1904
|
+
--chart-3: #0284c7;
|
|
1905
|
+
--chart-4: #9333ea;
|
|
1906
|
+
--chart-5: #d97706;
|
|
1907
|
+
/* The Storefront's muted text on a light page: a notch darker than the shared muted token, for contrast. */
|
|
1908
|
+
--sf-muted-light: #52525b;
|
|
1839
1909
|
--ui-surface: var(--color-background-page);
|
|
1840
1910
|
--ui-card: color-mix(in srgb, var(--color-text-primary) var(--ui-tint-card), var(--ui-surface));
|
|
1841
1911
|
--ui-tray: color-mix(in srgb, var(--color-text-primary) var(--ui-tint-tray), var(--ui-card));
|
|
@@ -1864,7 +1934,7 @@ a.card:hover {
|
|
|
1864
1934
|
/* One button for every app that reads this tier: a rounded rectangle that matches the fields beside it, a
|
|
1865
1935
|
32px target (the height of a field), medium-weight type. Apps map their own --button-* onto these. */
|
|
1866
1936
|
--ui-btn-height: 32px;
|
|
1867
|
-
--ui-btn-radius: var(--radius-
|
|
1937
|
+
--ui-btn-radius: var(--radius-control);
|
|
1868
1938
|
--ui-btn-px: var(--space-4);
|
|
1869
1939
|
--ui-btn-weight: var(--font-weight-medium);
|
|
1870
1940
|
--ui-ctl: 32px;
|
|
@@ -1891,6 +1961,22 @@ a.card:hover {
|
|
|
1891
1961
|
--ui-accent: #2dd4bf;
|
|
1892
1962
|
--ui-accent-hover: #5eead4;
|
|
1893
1963
|
--ui-accent-ink: #04201d;
|
|
1964
|
+
--ui-action: #f1f1f1;
|
|
1965
|
+
--ui-action-hover: #d4d4d4;
|
|
1966
|
+
--ui-action-ink: #1a1a1a;
|
|
1967
|
+
--surface-canvas: #0c0c0f;
|
|
1968
|
+
--surface-paper: #15161a;
|
|
1969
|
+
--surface-band: #1a1b20;
|
|
1970
|
+
--surface-tray: #1f2026;
|
|
1971
|
+
--edge-hairline: #2a2c33;
|
|
1972
|
+
--edge-strong: #3a3d46;
|
|
1973
|
+
--edge-raised: #31343c;
|
|
1974
|
+
--grid-line: #24262c;
|
|
1975
|
+
--shadow-ink: #000000;
|
|
1976
|
+
--chart-2: #818cf8;
|
|
1977
|
+
--chart-3: #38bdf8;
|
|
1978
|
+
--chart-4: #c084fc;
|
|
1979
|
+
--chart-5: #fbbf24;
|
|
1894
1980
|
--ui-surface: var(--color-background-global);
|
|
1895
1981
|
--ui-tint-card: 5%;
|
|
1896
1982
|
--ui-card: color-mix(in srgb, var(--color-text-primary) var(--ui-tint-card), var(--color-background-page));
|