@hattisar/design-tokens 0.3.31 → 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 +16 -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,7 +375,7 @@
|
|
|
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
|
|
|
378
381
|
/* The measurement row: three sizes and their unit, a weight and its
|
|
@@ -470,7 +473,6 @@
|
|
|
470
473
|
/* A control sharing a line with others — the second and third field
|
|
471
474
|
of a header row. Narrower than a control that owns its row, because
|
|
472
475
|
three of those do not fit and a date needs far less than 340px. */
|
|
473
|
-
--form-control-width-compact: 200px;
|
|
474
476
|
/* The label beside it. Fixed rather than sized to each label's own
|
|
475
477
|
text — "Order date", "Due date" and "Tax rate" all sit in this
|
|
476
478
|
position on different rows of the same header, and letting each
|
|
@@ -553,7 +555,6 @@
|
|
|
553
555
|
/* The row you are on: the full ink on the same fill hover uses, the
|
|
554
556
|
weight doing the rest. */
|
|
555
557
|
--sidebar-active-ink: var(--sidebar-active-text);
|
|
556
|
-
--sidebar-rail-bg: var(--sidebar-bg);
|
|
557
558
|
/* The one background every popout shares (account menu, notifications,
|
|
558
559
|
support, the collapsed rail's hover menu, the search popup): the
|
|
559
560
|
sidebar colour one step lighter, so a popout reads as lifted off
|
|
@@ -570,7 +571,7 @@
|
|
|
570
571
|
--sidebar-search-height: 30px;
|
|
571
572
|
--sidebar-search-radius: var(--radius-lg);
|
|
572
573
|
--sidebar-search-shadow:
|
|
573
|
-
inset 0 0 0
|
|
574
|
+
inset 0 0 0 var(--border-width) color-mix(in srgb, var(--sidebar-active-text) 2%, transparent),
|
|
574
575
|
inset 0 1px 1px 0 color-mix(in srgb, var(--sidebar-active-text) 6%, transparent),
|
|
575
576
|
inset 0 0 12px 1px color-mix(in srgb, var(--sidebar-active-text) 6%, transparent),
|
|
576
577
|
0 1px 2px 0 rgba(0, 0, 0, 0.1),
|
|
@@ -588,7 +589,6 @@
|
|
|
588
589
|
--sidebar-row-spacing: 6px;
|
|
589
590
|
--sidebar-sub-indent: calc(var(--sidebar-icon-inset) + var(--sidebar-icon-size) + var(--sidebar-row-gap));
|
|
590
591
|
--sidebar-active-weight: var(--font-weight-medium);
|
|
591
|
-
--sidebar-badge-size: 22px;
|
|
592
592
|
--sidebar-avatar-size: 28px;
|
|
593
593
|
--popout-min-width: 180px;
|
|
594
594
|
--search-popup-width: 640px;
|
|
@@ -727,12 +727,10 @@
|
|
|
727
727
|
--color-cta-text: var(--color-brand-text);
|
|
728
728
|
|
|
729
729
|
--shadow-btn-primary: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
730
|
-
--shadow-btn-secondary: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
731
730
|
--button-primary-sheen: none;
|
|
732
731
|
--button-secondary-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
733
732
|
|
|
734
733
|
--color-secondary-fill: var(--color-surface-tint);
|
|
735
|
-
--color-secondary-border: var(--color-border-strong);
|
|
736
734
|
--color-secondary-text: var(--color-text-primary);
|
|
737
735
|
--color-secondary-hover: color-mix(in srgb, white 6%, var(--color-secondary-fill));
|
|
738
736
|
--color-secondary-active: color-mix(in srgb, white 12%, var(--color-secondary-fill));
|
|
@@ -787,7 +785,6 @@
|
|
|
787
785
|
--banner-danger-bg: #4a1119;
|
|
788
786
|
--banner-danger-border: var(--color-danger);
|
|
789
787
|
--banner-success-bg: #0a3129;
|
|
790
|
-
--banner-success-border: var(--color-success);
|
|
791
788
|
|
|
792
789
|
/* A dark surface cannot be lifted by a soft grey shadow — there is
|
|
793
790
|
nothing lighter behind it to catch the light. So these go darker
|
|
@@ -858,7 +855,6 @@
|
|
|
858
855
|
inset 0 0 4px 1px var(--color-cta),
|
|
859
856
|
inset 0 0 4px 2px rgba(255, 255, 255, 0.1),
|
|
860
857
|
inset 0 0 12px -6px rgba(255, 255, 255, 0.75);
|
|
861
|
-
--shadow-btn-secondary: 0 1px 2px rgba(9, 9, 11, 0.05);
|
|
862
858
|
--button-primary-sheen:
|
|
863
859
|
radial-gradient(50% 50% at 50% 0%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%),
|
|
864
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%);
|
|
@@ -869,7 +865,6 @@
|
|
|
869
865
|
0 8px 60px 0 rgba(0, 0, 0, 0.03);
|
|
870
866
|
|
|
871
867
|
--color-secondary-fill: var(--color-background-card);
|
|
872
|
-
--color-secondary-border: var(--color-border-strong);
|
|
873
868
|
--color-secondary-text: var(--color-text-primary);
|
|
874
869
|
--color-secondary-hover: color-mix(in srgb, var(--color-text-primary) 3%, var(--color-secondary-fill));
|
|
875
870
|
--color-secondary-active: color-mix(in srgb, var(--color-text-primary) 6%, var(--color-secondary-fill));
|
|
@@ -928,7 +923,6 @@
|
|
|
928
923
|
--banner-danger-bg: #fdeaed;
|
|
929
924
|
--banner-danger-border: var(--color-danger);
|
|
930
925
|
--banner-success-bg: #e2f7e6;
|
|
931
|
-
--banner-success-border: #047b5d;
|
|
932
926
|
|
|
933
927
|
/* Deliberately still flat, unlike :root's. The only thing that pins
|
|
934
928
|
itself to light is a print page, and a shadow on paper is a grey
|
|
@@ -973,7 +967,7 @@
|
|
|
973
967
|
|
|
974
968
|
*::-webkit-scrollbar-thumb {
|
|
975
969
|
background: var(--color-border-strong);
|
|
976
|
-
border:
|
|
970
|
+
border: var(--border-width-thick) solid transparent;
|
|
977
971
|
background-clip: padding-box;
|
|
978
972
|
}
|
|
979
973
|
|
|
@@ -1240,7 +1234,7 @@ textarea {
|
|
|
1240
1234
|
width: 100%;
|
|
1241
1235
|
padding: 8px 12px;
|
|
1242
1236
|
margin-top: var(--field-label-gap);
|
|
1243
|
-
border:
|
|
1237
|
+
border: var(--border-width) solid var(--color-border-strong);
|
|
1244
1238
|
border-radius: var(--radius-sm);
|
|
1245
1239
|
background: var(--color-input);
|
|
1246
1240
|
color: var(--color-text-primary);
|
|
@@ -1528,7 +1522,7 @@ input[type="radio"] {
|
|
|
1528
1522
|
job. */
|
|
1529
1523
|
.card {
|
|
1530
1524
|
background: var(--color-background-card);
|
|
1531
|
-
border:
|
|
1525
|
+
border: var(--border-width) solid var(--color-border-strong);
|
|
1532
1526
|
border-radius: var(--radius-sm);
|
|
1533
1527
|
box-shadow: var(--shadow-sm);
|
|
1534
1528
|
padding: 16px;
|
|
@@ -1790,7 +1784,7 @@ a.card:hover {
|
|
|
1790
1784
|
|
|
1791
1785
|
.modal-panel {
|
|
1792
1786
|
background: var(--color-surface-raised);
|
|
1793
|
-
border:
|
|
1787
|
+
border: var(--border-width) solid var(--color-border-raised);
|
|
1794
1788
|
box-shadow: var(--shadow-popover);
|
|
1795
1789
|
width: 100%;
|
|
1796
1790
|
max-width: 640px;
|
|
@@ -1803,7 +1797,7 @@ a.card:hover {
|
|
|
1803
1797
|
|
|
1804
1798
|
.modal-panel-header {
|
|
1805
1799
|
padding: 12px 16px;
|
|
1806
|
-
border-bottom:
|
|
1800
|
+
border-bottom: var(--border-width) solid var(--color-border);
|
|
1807
1801
|
display: flex;
|
|
1808
1802
|
align-items: center;
|
|
1809
1803
|
gap: 12px;
|
|
@@ -1821,7 +1815,7 @@ a.card:hover {
|
|
|
1821
1815
|
|
|
1822
1816
|
.modal-panel-footer {
|
|
1823
1817
|
padding: 12px 16px;
|
|
1824
|
-
border-top:
|
|
1818
|
+
border-top: var(--border-width) solid var(--color-border);
|
|
1825
1819
|
display: flex;
|
|
1826
1820
|
justify-content: flex-end;
|
|
1827
1821
|
gap: 10px;
|
|
@@ -1852,7 +1846,6 @@ a.card:hover {
|
|
|
1852
1846
|
--ui-field-bg-hover: color-mix(in srgb, var(--color-text-primary) var(--ui-tint-field-hover), var(--ui-card));
|
|
1853
1847
|
--ui-row-alt: color-mix(in srgb, var(--color-text-primary) 3%, transparent);
|
|
1854
1848
|
/* Every other row of a table, laid over its surface: what tells one row from the next now that no rule does. */
|
|
1855
|
-
--ui-row-zebra: color-mix(in srgb, var(--color-text-primary) 4%, transparent);
|
|
1856
1849
|
/* A rule between rows: present enough to follow a line across, quiet enough not to read as a grid. */
|
|
1857
1850
|
--ui-divider: color-mix(in srgb, var(--color-text-primary) 8%, transparent);
|
|
1858
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. */
|