@lerianstudio/sindarian-ui 2.0.0-beta.6 → 2.0.0-beta.8
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/dist/globals.css +55 -31
- package/package.json +1 -1
package/dist/globals.css
CHANGED
|
@@ -541,7 +541,7 @@
|
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
/* Sonner toast overrides —
|
|
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
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
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(--
|
|
584
|
-
--normal-border:
|
|
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(--
|
|
590
|
-
--normal-border:
|
|
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(--
|
|
596
|
-
--normal-border:
|
|
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'] {
|
|
@@ -602,8 +602,32 @@
|
|
|
602
602
|
--normal-border: hsl(var(--border));
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
-
|
|
606
|
-
|
|
605
|
+
/*
|
|
606
|
+
The title outranks the description, and both rules have to WIN the cascade
|
|
607
|
+
for that to mean anything. Sonner ships
|
|
608
|
+
`[data-sonner-toast][data-styled='true'] [data-title]` at font-weight 500 and
|
|
609
|
+
its description twin at 400 — both (0,3,0), both injected at runtime.
|
|
610
|
+
The title rule here was a plain `[data-sonner-toast] [data-title]` (0,2,0):
|
|
611
|
+
it declared 600 and rendered at 500, losing outright, while the description
|
|
612
|
+
carried `!important` and rendered at 600. The hierarchy came out inverted on
|
|
613
|
+
every toast in the kit, the long line heavier than the label naming it.
|
|
614
|
+
|
|
615
|
+
Both now take the compound selector plus !important — the shape the
|
|
616
|
+
close-button rules below already use against this same stylesheet, and for
|
|
617
|
+
the same reason: source order cannot settle a tie with a sheet that is
|
|
618
|
+
injected at runtime.
|
|
619
|
+
|
|
620
|
+
The description returns to 400. It is the running text of a toast, and 14px
|
|
621
|
+
semibold across a full sentence reads as emphasis with nothing left to
|
|
622
|
+
emphasise; the family ink already carries the severity. Its `color` override
|
|
623
|
+
keeps !important on its own merits — sonner hardcodes #3f3f3f there, plus a
|
|
624
|
+
dark-theme rule of its own on top.
|
|
625
|
+
|
|
626
|
+
`toast text weights` in src/__tests__/tokens-contract.test.ts holds the order
|
|
627
|
+
and the two properties that let it apply.
|
|
628
|
+
*/
|
|
629
|
+
[data-sonner-toast][data-styled='true'] [data-title] {
|
|
630
|
+
font-weight: 600 !important;
|
|
607
631
|
font-size: 0.875rem;
|
|
608
632
|
line-height: 1.25rem;
|
|
609
633
|
}
|
|
@@ -611,7 +635,7 @@
|
|
|
611
635
|
[data-sonner-toast] [data-description],
|
|
612
636
|
[data-sonner-toast][data-styled='true'] [data-description] {
|
|
613
637
|
font-size: 0.875rem;
|
|
614
|
-
font-weight:
|
|
638
|
+
font-weight: 400 !important;
|
|
615
639
|
line-height: 1.25rem;
|
|
616
640
|
color: var(--normal-text) !important;
|
|
617
641
|
}
|