@hattisar/design-tokens 0.3.30 → 0.3.32
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 +31 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hattisar/design-tokens",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.32",
|
|
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
|
@@ -136,7 +136,6 @@
|
|
|
136
136
|
rather than their own literal hex, so the secondary button always
|
|
137
137
|
tracks the same neutral scale as the rest of the page. */
|
|
138
138
|
--color-secondary-fill: var(--color-background-card);
|
|
139
|
-
--color-secondary-border: var(--color-border-strong);
|
|
140
139
|
--color-secondary-text: var(--color-text-primary);
|
|
141
140
|
--color-secondary-hover: color-mix(in srgb, var(--color-text-primary) 3%, var(--color-secondary-fill));
|
|
142
141
|
--color-secondary-active: color-mix(in srgb, var(--color-text-primary) 6%, var(--color-secondary-fill));
|
|
@@ -223,7 +222,6 @@
|
|
|
223
222
|
--banner-danger-bg: #fdeaed;
|
|
224
223
|
--banner-danger-border: var(--color-danger);
|
|
225
224
|
--banner-success-bg: #e2f7e6;
|
|
226
|
-
--banner-success-border: var(--color-success);
|
|
227
225
|
|
|
228
226
|
/* A restrained scale, not flat — every step deliberately small, since
|
|
229
227
|
most controls here are compact (30-36px buttons/inputs, smaller
|
|
@@ -234,6 +232,7 @@
|
|
|
234
232
|
remove-buttons inside chips, the settings toggle switch) — never
|
|
235
233
|
applied to a badge/tag/chip just for a rounder look; those use
|
|
236
234
|
--radius-sm like everything else (see .status-badge and friends). */
|
|
235
|
+
--radius-2xs: 3px; /* the smallest rounding: a keyboard hint, a scrollbar thumb, a highlighted word, the top of a tab's indicator */
|
|
237
236
|
--radius-xs: 6px;
|
|
238
237
|
--radius-sm: 8px;
|
|
239
238
|
--radius-md: 11px;
|
|
@@ -241,6 +240,11 @@
|
|
|
241
240
|
--radius-xl: 17px;
|
|
242
241
|
--radius-full: 9999px;
|
|
243
242
|
|
|
243
|
+
/* 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
|
+
highlighted edge). Stated here so no stylesheet or component writes "1px" for a border. */
|
|
245
|
+
--border-width: 1px;
|
|
246
|
+
--border-width-thick: 2px;
|
|
247
|
+
|
|
244
248
|
/* The horizontal tab block (Tabs.tsx) — one frame for every context it
|
|
245
249
|
appears in, whether wrapped in .card (document forms) or
|
|
246
250
|
.form-section-tabs (Customer/Vendor/Item). The same gray as a widget
|
|
@@ -249,7 +253,7 @@
|
|
|
249
253
|
frame (white) hid both. It was transparent, which only worked while
|
|
250
254
|
the page canvas behind it was gray; it is a fill of its own now. */
|
|
251
255
|
--tabs-frame-bg: var(--color-table-header);
|
|
252
|
-
--tabs-frame-border:
|
|
256
|
+
--tabs-frame-border: var(--border-width) solid var(--color-border);
|
|
253
257
|
--tabs-frame-radius: var(--radius-sm);
|
|
254
258
|
|
|
255
259
|
/* Anything that floats over the page: dropdown and action menus, the
|
|
@@ -274,7 +278,7 @@
|
|
|
274
278
|
colour and radius tokens, so they follow the theme without a block of
|
|
275
279
|
their own. */
|
|
276
280
|
--widget-bg: var(--color-table-header);
|
|
277
|
-
--widget-border-width:
|
|
281
|
+
--widget-border-width: var(--border-width);
|
|
278
282
|
--widget-border-color: var(--color-border-strong);
|
|
279
283
|
--widget-radius: var(--radius-sm);
|
|
280
284
|
--widget-shadow: var(--shadow-sm);
|
|
@@ -359,7 +363,6 @@
|
|
|
359
363
|
inset 0 0 4px 1px var(--color-cta),
|
|
360
364
|
inset 0 0 4px 2px rgba(255, 255, 255, 0.1),
|
|
361
365
|
inset 0 0 12px -6px rgba(255, 255, 255, 0.75);
|
|
362
|
-
--shadow-btn-secondary: 0 1px 2px rgba(9, 9, 11, 0.05);
|
|
363
366
|
--button-primary-sheen:
|
|
364
367
|
radial-gradient(50% 50% at 50% 0%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%),
|
|
365
368
|
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%);
|
|
@@ -372,9 +375,18 @@
|
|
|
372
375
|
/* The picture picker (ImagePicker.tsx) behind an item image, the org
|
|
373
376
|
logo and both user photos. Named so those four can't drift apart. */
|
|
374
377
|
--image-picker-size: 96px;
|
|
375
|
-
--image-picker-border:
|
|
378
|
+
--image-picker-border: var(--border-width) dashed var(--color-border);
|
|
376
379
|
--image-picker-overlay: color-mix(in srgb, var(--color-background-card) 55%, transparent);
|
|
377
380
|
|
|
381
|
+
/* The measurement row: three sizes and their unit, a weight and its
|
|
382
|
+
unit. Shared by a package in Calculate rates and the item form's
|
|
383
|
+
Shipping card, so the unit pickers and the gaps between the groups
|
|
384
|
+
are one width wherever a size or a weight is typed. */
|
|
385
|
+
--measure-unit-width: 84px;
|
|
386
|
+
--measure-weight-width: 100px;
|
|
387
|
+
--measure-field-gap: var(--space-2);
|
|
388
|
+
--measure-group-gap: var(--space-6);
|
|
389
|
+
|
|
378
390
|
/* Depth, deliberately restrained. These were all `none`, which left
|
|
379
391
|
every surface separated by border alone — correct, legible, and
|
|
380
392
|
completely flat: a card, a dropdown and a modal all sat on the page
|
|
@@ -461,7 +473,6 @@
|
|
|
461
473
|
/* A control sharing a line with others — the second and third field
|
|
462
474
|
of a header row. Narrower than a control that owns its row, because
|
|
463
475
|
three of those do not fit and a date needs far less than 340px. */
|
|
464
|
-
--form-control-width-compact: 200px;
|
|
465
476
|
/* The label beside it. Fixed rather than sized to each label's own
|
|
466
477
|
text — "Order date", "Due date" and "Tax rate" all sit in this
|
|
467
478
|
position on different rows of the same header, and letting each
|
|
@@ -544,7 +555,6 @@
|
|
|
544
555
|
/* The row you are on: the full ink on the same fill hover uses, the
|
|
545
556
|
weight doing the rest. */
|
|
546
557
|
--sidebar-active-ink: var(--sidebar-active-text);
|
|
547
|
-
--sidebar-rail-bg: var(--sidebar-bg);
|
|
548
558
|
/* The one background every popout shares (account menu, notifications,
|
|
549
559
|
support, the collapsed rail's hover menu, the search popup): the
|
|
550
560
|
sidebar colour one step lighter, so a popout reads as lifted off
|
|
@@ -561,7 +571,7 @@
|
|
|
561
571
|
--sidebar-search-height: 30px;
|
|
562
572
|
--sidebar-search-radius: var(--radius-lg);
|
|
563
573
|
--sidebar-search-shadow:
|
|
564
|
-
inset 0 0 0
|
|
574
|
+
inset 0 0 0 var(--border-width) color-mix(in srgb, var(--sidebar-active-text) 2%, transparent),
|
|
565
575
|
inset 0 1px 1px 0 color-mix(in srgb, var(--sidebar-active-text) 6%, transparent),
|
|
566
576
|
inset 0 0 12px 1px color-mix(in srgb, var(--sidebar-active-text) 6%, transparent),
|
|
567
577
|
0 1px 2px 0 rgba(0, 0, 0, 0.1),
|
|
@@ -579,7 +589,6 @@
|
|
|
579
589
|
--sidebar-row-spacing: 6px;
|
|
580
590
|
--sidebar-sub-indent: calc(var(--sidebar-icon-inset) + var(--sidebar-icon-size) + var(--sidebar-row-gap));
|
|
581
591
|
--sidebar-active-weight: var(--font-weight-medium);
|
|
582
|
-
--sidebar-badge-size: 22px;
|
|
583
592
|
--sidebar-avatar-size: 28px;
|
|
584
593
|
--popout-min-width: 180px;
|
|
585
594
|
--search-popup-width: 640px;
|
|
@@ -642,6 +651,12 @@
|
|
|
642
651
|
after the first pass shipped. */
|
|
643
652
|
--page-width-wide: 1680px;
|
|
644
653
|
|
|
654
|
+
/* A form that carries a table of item lines (adjustments, transfers, builds, purchase and sales orders). Wider
|
|
655
|
+
than a plain form so the table does not scroll sideways on a laptop screen, and narrower than a list page so
|
|
656
|
+
the numbers stay near their column headers on an ultrawide one. Every card on such a form is this wide,
|
|
657
|
+
not just the table, so their edges line up. */
|
|
658
|
+
--page-width-lines: 1296px;
|
|
659
|
+
|
|
645
660
|
color-scheme: light dark;
|
|
646
661
|
}
|
|
647
662
|
|
|
@@ -712,12 +727,10 @@
|
|
|
712
727
|
--color-cta-text: var(--color-brand-text);
|
|
713
728
|
|
|
714
729
|
--shadow-btn-primary: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
715
|
-
--shadow-btn-secondary: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
716
730
|
--button-primary-sheen: none;
|
|
717
731
|
--button-secondary-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
718
732
|
|
|
719
733
|
--color-secondary-fill: var(--color-surface-tint);
|
|
720
|
-
--color-secondary-border: var(--color-border-strong);
|
|
721
734
|
--color-secondary-text: var(--color-text-primary);
|
|
722
735
|
--color-secondary-hover: color-mix(in srgb, white 6%, var(--color-secondary-fill));
|
|
723
736
|
--color-secondary-active: color-mix(in srgb, white 12%, var(--color-secondary-fill));
|
|
@@ -772,7 +785,6 @@
|
|
|
772
785
|
--banner-danger-bg: #4a1119;
|
|
773
786
|
--banner-danger-border: var(--color-danger);
|
|
774
787
|
--banner-success-bg: #0a3129;
|
|
775
|
-
--banner-success-border: var(--color-success);
|
|
776
788
|
|
|
777
789
|
/* A dark surface cannot be lifted by a soft grey shadow — there is
|
|
778
790
|
nothing lighter behind it to catch the light. So these go darker
|
|
@@ -843,7 +855,6 @@
|
|
|
843
855
|
inset 0 0 4px 1px var(--color-cta),
|
|
844
856
|
inset 0 0 4px 2px rgba(255, 255, 255, 0.1),
|
|
845
857
|
inset 0 0 12px -6px rgba(255, 255, 255, 0.75);
|
|
846
|
-
--shadow-btn-secondary: 0 1px 2px rgba(9, 9, 11, 0.05);
|
|
847
858
|
--button-primary-sheen:
|
|
848
859
|
radial-gradient(50% 50% at 50% 0%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%),
|
|
849
860
|
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%);
|
|
@@ -854,7 +865,6 @@
|
|
|
854
865
|
0 8px 60px 0 rgba(0, 0, 0, 0.03);
|
|
855
866
|
|
|
856
867
|
--color-secondary-fill: var(--color-background-card);
|
|
857
|
-
--color-secondary-border: var(--color-border-strong);
|
|
858
868
|
--color-secondary-text: var(--color-text-primary);
|
|
859
869
|
--color-secondary-hover: color-mix(in srgb, var(--color-text-primary) 3%, var(--color-secondary-fill));
|
|
860
870
|
--color-secondary-active: color-mix(in srgb, var(--color-text-primary) 6%, var(--color-secondary-fill));
|
|
@@ -913,7 +923,6 @@
|
|
|
913
923
|
--banner-danger-bg: #fdeaed;
|
|
914
924
|
--banner-danger-border: var(--color-danger);
|
|
915
925
|
--banner-success-bg: #e2f7e6;
|
|
916
|
-
--banner-success-border: #047b5d;
|
|
917
926
|
|
|
918
927
|
/* Deliberately still flat, unlike :root's. The only thing that pins
|
|
919
928
|
itself to light is a print page, and a shadow on paper is a grey
|
|
@@ -958,7 +967,7 @@
|
|
|
958
967
|
|
|
959
968
|
*::-webkit-scrollbar-thumb {
|
|
960
969
|
background: var(--color-border-strong);
|
|
961
|
-
border:
|
|
970
|
+
border: var(--border-width-thick) solid transparent;
|
|
962
971
|
background-clip: padding-box;
|
|
963
972
|
}
|
|
964
973
|
|
|
@@ -1225,7 +1234,7 @@ textarea {
|
|
|
1225
1234
|
width: 100%;
|
|
1226
1235
|
padding: 8px 12px;
|
|
1227
1236
|
margin-top: var(--field-label-gap);
|
|
1228
|
-
border:
|
|
1237
|
+
border: var(--border-width) solid var(--color-border-strong);
|
|
1229
1238
|
border-radius: var(--radius-sm);
|
|
1230
1239
|
background: var(--color-input);
|
|
1231
1240
|
color: var(--color-text-primary);
|
|
@@ -1513,7 +1522,7 @@ input[type="radio"] {
|
|
|
1513
1522
|
job. */
|
|
1514
1523
|
.card {
|
|
1515
1524
|
background: var(--color-background-card);
|
|
1516
|
-
border:
|
|
1525
|
+
border: var(--border-width) solid var(--color-border-strong);
|
|
1517
1526
|
border-radius: var(--radius-sm);
|
|
1518
1527
|
box-shadow: var(--shadow-sm);
|
|
1519
1528
|
padding: 16px;
|
|
@@ -1775,7 +1784,7 @@ a.card:hover {
|
|
|
1775
1784
|
|
|
1776
1785
|
.modal-panel {
|
|
1777
1786
|
background: var(--color-surface-raised);
|
|
1778
|
-
border:
|
|
1787
|
+
border: var(--border-width) solid var(--color-border-raised);
|
|
1779
1788
|
box-shadow: var(--shadow-popover);
|
|
1780
1789
|
width: 100%;
|
|
1781
1790
|
max-width: 640px;
|
|
@@ -1788,7 +1797,7 @@ a.card:hover {
|
|
|
1788
1797
|
|
|
1789
1798
|
.modal-panel-header {
|
|
1790
1799
|
padding: 12px 16px;
|
|
1791
|
-
border-bottom:
|
|
1800
|
+
border-bottom: var(--border-width) solid var(--color-border);
|
|
1792
1801
|
display: flex;
|
|
1793
1802
|
align-items: center;
|
|
1794
1803
|
gap: 12px;
|
|
@@ -1806,7 +1815,7 @@ a.card:hover {
|
|
|
1806
1815
|
|
|
1807
1816
|
.modal-panel-footer {
|
|
1808
1817
|
padding: 12px 16px;
|
|
1809
|
-
border-top:
|
|
1818
|
+
border-top: var(--border-width) solid var(--color-border);
|
|
1810
1819
|
display: flex;
|
|
1811
1820
|
justify-content: flex-end;
|
|
1812
1821
|
gap: 10px;
|
|
@@ -1837,7 +1846,6 @@ a.card:hover {
|
|
|
1837
1846
|
--ui-field-bg-hover: color-mix(in srgb, var(--color-text-primary) var(--ui-tint-field-hover), var(--ui-card));
|
|
1838
1847
|
--ui-row-alt: color-mix(in srgb, var(--color-text-primary) 3%, transparent);
|
|
1839
1848
|
/* Every other row of a table, laid over its surface: what tells one row from the next now that no rule does. */
|
|
1840
|
-
--ui-row-zebra: color-mix(in srgb, var(--color-text-primary) 4%, transparent);
|
|
1841
1849
|
/* A rule between rows: present enough to follow a line across, quiet enough not to read as a grid. */
|
|
1842
1850
|
--ui-divider: color-mix(in srgb, var(--color-text-primary) 8%, transparent);
|
|
1843
1851
|
/* The one hairline that stays when borders do not: a thin line blended into the surface, where two panels of the same tone meet. */
|