@hattisar/design-tokens 0.3.17 → 0.3.19

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tokens.css +30 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hattisar/design-tokens",
3
- "version": "0.3.17",
3
+ "version": "0.3.19",
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
@@ -300,6 +300,15 @@
300
300
  of a header row. Narrower than a control that owns its row, because
301
301
  three of those do not fit and a date needs far less than 340px. */
302
302
  --form-control-width-compact: 200px;
303
+ /* The label beside it. Fixed rather than sized to each label's own
304
+ text — "Order date", "Due date" and "Tax rate" all sit in this
305
+ position on different rows of the same header, and letting each
306
+ size itself put their inputs at three different starting points
307
+ down the card, the one thing --form-label-width above exists to
308
+ prevent for the row's first field. 120px is measured to the
309
+ longest label that lives here today, "Invoice date *" at ~97px,
310
+ with room to spare. */
311
+ --form-label-width-compact: 120px;
303
312
  --form-control-width-wide: 520px;
304
313
  --field-min-width-narrow: 140px;
305
314
 
@@ -752,24 +761,22 @@ a {
752
761
  text-decoration: none;
753
762
  }
754
763
 
764
+ /* The app's one accent blue — same token as the sidebar's current-row
765
+ ink and the active document tab. Not .card: a card-styled link is a
766
+ clickable surface, not inline text, and turning its whole contents
767
+ blue on hover would tint every stat number/label inside a dashboard
768
+ tile along with it (see a.card below, which keeps its own hover
769
+ treatment instead). */
770
+ a:hover:not(.card) {
771
+ color: var(--color-cta-on-surface);
772
+ }
773
+
755
774
  a:focus-visible {
756
775
  outline: 1.5px dashed var(--color-brand);
757
776
  outline-offset: 4px;
758
777
  border-radius: var(--radius-full);
759
778
  }
760
779
 
761
- /* Table-cell identity links (item name, PO number, ...) go semibold on
762
- hover instead of the row itself tinting. Weight rather than
763
- underline, reserved for hover specifically (not the persistent
764
- "you're on this page" signal a nav rail's [aria-current="page"] uses
765
- semibold for too), so there's no confusion between a row you're
766
- pointing at and one you're actually on. Scoped to table cells only,
767
- not every <a> in an app (nav links, card links, etc. keep their own
768
- existing hover treatments). */
769
- td a:hover {
770
- font-weight: var(--font-weight-semibold);
771
- }
772
-
773
780
  /* A label should recede so the value it names is what gets scanned.
774
781
  Medium weight at a step down from body, in secondary ink — quieter
775
782
  than the data, still comfortably above AA. */
@@ -1145,21 +1152,22 @@ label:has(:required) .combobox-input {
1145
1152
  color: var(--color-text-primary);
1146
1153
  }
1147
1154
 
1148
- input:focus-visible,
1149
- select:focus-visible,
1150
- textarea:focus-visible {
1151
- outline: none;
1152
- border-color: var(--color-brand);
1153
- box-shadow: 0 0 0 3px var(--color-focus-ring);
1154
- }
1155
+ /* The app's one accent blue, not --color-brand — asked for directly.
1156
+ --color-brand still does the same job for the controls that used to
1157
+ share this border with it (checkbox tick, a:focus-visible's outline),
1158
+ so it stays defined as-is; this just stops reading its (near-black)
1159
+ value for the field border specifically.
1155
1160
 
1156
- /* Kept for pointer focus too — a click into a field should still show
1157
- which one is live, just without the ring shouting. */
1161
+ No box-shadow ring — asked for directly ("we do not need out shadow
1162
+ on input area when typing"). :focus and :focus-visible used to carry
1163
+ different treatments (a ring for keyboard focus, none for a plain
1164
+ click) and are one rule now that there's no ring to tell them apart
1165
+ by. */
1158
1166
  input:focus,
1159
1167
  select:focus,
1160
1168
  textarea:focus {
1161
1169
  outline: none;
1162
- border-color: var(--color-brand);
1170
+ border-color: var(--color-cta-on-surface);
1163
1171
  }
1164
1172
 
1165
1173
  /* A field the browser or the form has judged invalid.