@hattisar/design-tokens 0.3.16 → 0.3.18
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 +33 -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.18",
|
|
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
|
@@ -268,6 +268,13 @@
|
|
|
268
268
|
--space-6: 24px;
|
|
269
269
|
--space-8: 32px;
|
|
270
270
|
--space-10: 40px;
|
|
271
|
+
|
|
272
|
+
/* The gap between a label and the control under it. Was a bare 6px
|
|
273
|
+
inside the input rule; named because anything wrapping a control
|
|
274
|
+
has to reproduce it exactly — a wrapper that keeps the margin on
|
|
275
|
+
the input ends up 6px taller than the field it contains, which is
|
|
276
|
+
how an overlaid control centres itself slightly high. */
|
|
277
|
+
--field-label-gap: 6px;
|
|
271
278
|
--space-12: 48px;
|
|
272
279
|
/* Two steps past the old ceiling, for the gaps that separate whole
|
|
273
280
|
regions of a page rather than elements inside one. Without them
|
|
@@ -289,6 +296,10 @@
|
|
|
289
296
|
lets the page be as wide as it likes. */
|
|
290
297
|
--form-label-width: 160px;
|
|
291
298
|
--form-control-width: 340px;
|
|
299
|
+
/* A control sharing a line with others — the second and third field
|
|
300
|
+
of a header row. Narrower than a control that owns its row, because
|
|
301
|
+
three of those do not fit and a date needs far less than 340px. */
|
|
302
|
+
--form-control-width-compact: 200px;
|
|
292
303
|
--form-control-width-wide: 520px;
|
|
293
304
|
--field-min-width-narrow: 140px;
|
|
294
305
|
|
|
@@ -741,24 +752,22 @@ a {
|
|
|
741
752
|
text-decoration: none;
|
|
742
753
|
}
|
|
743
754
|
|
|
755
|
+
/* The app's one accent blue — same token as the sidebar's current-row
|
|
756
|
+
ink and the active document tab. Not .card: a card-styled link is a
|
|
757
|
+
clickable surface, not inline text, and turning its whole contents
|
|
758
|
+
blue on hover would tint every stat number/label inside a dashboard
|
|
759
|
+
tile along with it (see a.card below, which keeps its own hover
|
|
760
|
+
treatment instead). */
|
|
761
|
+
a:hover:not(.card) {
|
|
762
|
+
color: var(--color-cta-on-surface);
|
|
763
|
+
}
|
|
764
|
+
|
|
744
765
|
a:focus-visible {
|
|
745
766
|
outline: 1.5px dashed var(--color-brand);
|
|
746
767
|
outline-offset: 4px;
|
|
747
768
|
border-radius: var(--radius-full);
|
|
748
769
|
}
|
|
749
770
|
|
|
750
|
-
/* Table-cell identity links (item name, PO number, ...) go semibold on
|
|
751
|
-
hover instead of the row itself tinting. Weight rather than
|
|
752
|
-
underline, reserved for hover specifically (not the persistent
|
|
753
|
-
"you're on this page" signal a nav rail's [aria-current="page"] uses
|
|
754
|
-
semibold for too), so there's no confusion between a row you're
|
|
755
|
-
pointing at and one you're actually on. Scoped to table cells only,
|
|
756
|
-
not every <a> in an app (nav links, card links, etc. keep their own
|
|
757
|
-
existing hover treatments). */
|
|
758
|
-
td a:hover {
|
|
759
|
-
font-weight: var(--font-weight-semibold);
|
|
760
|
-
}
|
|
761
|
-
|
|
762
771
|
/* A label should recede so the value it names is what gets scanned.
|
|
763
772
|
Medium weight at a step down from body, in secondary ink — quieter
|
|
764
773
|
than the data, still comfortably above AA. */
|
|
@@ -909,7 +918,7 @@ textarea {
|
|
|
909
918
|
line-height: 1.4;
|
|
910
919
|
width: 100%;
|
|
911
920
|
padding: 8px 12px;
|
|
912
|
-
margin-top:
|
|
921
|
+
margin-top: var(--field-label-gap);
|
|
913
922
|
border: 1px solid var(--color-border-strong);
|
|
914
923
|
border-radius: var(--radius-sm);
|
|
915
924
|
background: var(--color-input);
|
|
@@ -1134,21 +1143,22 @@ label:has(:required) .combobox-input {
|
|
|
1134
1143
|
color: var(--color-text-primary);
|
|
1135
1144
|
}
|
|
1136
1145
|
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
box-shadow: 0 0 0 3px var(--color-focus-ring);
|
|
1143
|
-
}
|
|
1146
|
+
/* The app's one accent blue, not --color-brand — asked for directly.
|
|
1147
|
+
--color-brand still does the same job for the controls that used to
|
|
1148
|
+
share this border with it (checkbox tick, a:focus-visible's outline),
|
|
1149
|
+
so it stays defined as-is; this just stops reading its (near-black)
|
|
1150
|
+
value for the field border specifically.
|
|
1144
1151
|
|
|
1145
|
-
|
|
1146
|
-
|
|
1152
|
+
No box-shadow ring — asked for directly ("we do not need out shadow
|
|
1153
|
+
on input area when typing"). :focus and :focus-visible used to carry
|
|
1154
|
+
different treatments (a ring for keyboard focus, none for a plain
|
|
1155
|
+
click) and are one rule now that there's no ring to tell them apart
|
|
1156
|
+
by. */
|
|
1147
1157
|
input:focus,
|
|
1148
1158
|
select:focus,
|
|
1149
1159
|
textarea:focus {
|
|
1150
1160
|
outline: none;
|
|
1151
|
-
border-color: var(--color-
|
|
1161
|
+
border-color: var(--color-cta-on-surface);
|
|
1152
1162
|
}
|
|
1153
1163
|
|
|
1154
1164
|
/* A field the browser or the form has judged invalid.
|