@lerianstudio/sindarian-ui 2.0.0-beta.6 → 2.0.0-beta.7

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/dist/globals.css +28 -28
  2. package/package.json +1 -1
package/dist/globals.css CHANGED
@@ -541,7 +541,7 @@
541
541
  }
542
542
  }
543
543
 
544
- /* Sonner toast overrides — solid bold backgrounds (Radix parity) */
544
+ /* Sonner toast overrides — tinted surfaces from the system token families */
545
545
  [data-sonner-toaster] {
546
546
  --width: 420px;
547
547
  pointer-events: auto !important;
@@ -559,41 +559,41 @@
559
559
  }
560
560
 
561
561
  /*
562
- Type fills come from the system token families, so a toast themes with the
563
- rest of the app. All three coloured types take ONE ink, --accent-foreground:
564
- a solid system fill is bright enough to need near-black ink in BOTH themes,
565
- and that token is the only one in this sheet that is near-black in both.
566
-
567
- It replaced the per-family reasoning that stood here, which routed success
568
- and error through --primary-foreground because that token inverts (white in
569
- light, base/800 in dark). Inverting was the bug: white ink on the LIGHT
570
- fills measured 3.35:1 on --system-success and 3.78:1 on --system-error,
571
- both under AA, and no token value can fix that from the white side — the
572
- light green/600 and red/500 fills sit mid-luminance, so white caps at ~3.8
573
- while near-black reaches 5.9 and 5.3. Ratios now, ink over fill:
574
- light 5.93 / 5.25 / 11.17 and dark 11.39 / 7.23 / 13.00
575
- (success / error / warning). The dark pairs were already passing at
576
- 8.51 / 5.41 / 13.00 and only gained. `toast ink` in
577
- src/__tests__/tokens-contract.test.ts recomputes all six from these
578
- declarations, so the next token edit that drops a pair under 4.5 fails
579
- instead of shipping.
562
+ Each coloured type paints the `surface` + `text` + `border` trio of its own
563
+ family — the pairing every other tinted component in the kit already uses
564
+ (`components/ui/badge/index.tsx`, `enterprise/alert-banner/index.tsx`).
565
+ `surface` is the only slot in a system family built to sit BEHIND content: it
566
+ darkens on the dark canvas, while `base` and `h1a` are fill and ink slots
567
+ that INVERT between themes (`--system-success-h1a` is #166534 in light and
568
+ #BBF7D0 in dark). Grounding toast text on either of those forces a different
569
+ ink per theme, and the toast stops tracking the family it names.
570
+
571
+ Ink over ground, light / dark: success 6.81 / 10.62, error 7.60 / 8.51,
572
+ warning 6.62 / 11.70 — every half clear of the 4.5 floor by more than two
573
+ points. `system text tokens` in `src/__tests__/tokens-contract.test.ts`
574
+ already measures this pair for all five families, so the toast is covered by
575
+ the gate that guards the pills rather than by a rule written for it alone;
576
+ `sonner toast ink` there reads whichever pair these rules declare.
577
+
578
+ `info` stays neutral on `--card`: an informational toast is the unstyled
579
+ case, not a fourth colour.
580
580
  */
581
581
  [data-sonner-toast][data-type='success'] {
582
- --normal-bg: hsl(var(--system-success));
583
- --normal-text: hsl(var(--accent-foreground));
584
- --normal-border: transparent;
582
+ --normal-bg: hsl(var(--system-success-surface));
583
+ --normal-text: hsl(var(--system-success-text));
584
+ --normal-border: hsl(var(--system-success-border));
585
585
  }
586
586
 
587
587
  [data-sonner-toast][data-type='error'] {
588
- --normal-bg: hsl(var(--system-error));
589
- --normal-text: hsl(var(--accent-foreground));
590
- --normal-border: transparent;
588
+ --normal-bg: hsl(var(--system-error-surface));
589
+ --normal-text: hsl(var(--system-error-text));
590
+ --normal-border: hsl(var(--system-error-border));
591
591
  }
592
592
 
593
593
  [data-sonner-toast][data-type='warning'] {
594
- --normal-bg: hsl(var(--system-alert));
595
- --normal-text: hsl(var(--accent-foreground));
596
- --normal-border: transparent;
594
+ --normal-bg: hsl(var(--system-alert-surface));
595
+ --normal-text: hsl(var(--system-alert-text));
596
+ --normal-border: hsl(var(--system-alert-border));
597
597
  }
598
598
 
599
599
  [data-sonner-toast][data-type='info'] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lerianstudio/sindarian-ui",
3
- "version": "2.0.0-beta.6",
3
+ "version": "2.0.0-beta.7",
4
4
  "description": "Sindarian UI - A UI library for Midaz Console",
5
5
  "license": "ISC",
6
6
  "author": {