@behavioral-agentic-design-system/core 0.28.0 → 0.29.0
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 +2 -2
- package/scripts/a11y-lint.cjs +78 -9
- package/scripts/build-tokens.cjs +273 -15
- package/scripts/wcag-audit.cjs +37 -7
- package/src/api/layers/file.ts +1 -0
- package/src/app/font-ready.tsx +6 -5
- package/src/app/layout.tsx +54 -3
- package/src/app/preview/components/page.tsx +5532 -3044
- package/src/app/preview/layout.tsx +4 -1
- package/src/app/preview/showcase-filter.tsx +66 -0
- package/src/app/preview/tab-replay.tsx +63 -0
- package/src/app/shell.tsx +74 -18
- package/src/components/customize/save-bar.tsx +19 -6
- package/src/components/docs-tab.tsx +36 -24
- package/src/components/layers-tab.tsx +37 -5
- package/src/components/ui/alert.tsx +12 -0
- package/src/components/ui/badge.tsx +19 -0
- package/src/components/ui/chat-marker.tsx +120 -0
- package/src/components/ui/checkbox.tsx +9 -1
- package/src/components/ui/close-button.tsx +71 -0
- package/src/components/ui/combobox.tsx +62 -3
- package/src/components/ui/container.tsx +65 -0
- package/src/components/ui/date-field.tsx +368 -0
- package/src/components/ui/drawer.tsx +334 -0
- package/src/components/ui/file-button.tsx +145 -0
- package/src/components/ui/floating-indicator.tsx +217 -0
- package/src/components/ui/format-byte.tsx +113 -0
- package/src/components/ui/index.ts +21 -0
- package/src/components/ui/input.tsx +38 -3
- package/src/components/ui/keyboard-shortcut.tsx +146 -0
- package/src/components/ui/loading-dots.tsx +99 -0
- package/src/components/ui/month-picker.tsx +296 -0
- package/src/components/ui/multi-select.tsx +15 -13
- package/src/components/ui/nav-link.tsx +200 -0
- package/src/components/ui/navigation-rail.tsx +256 -0
- package/src/components/ui/notification.tsx +20 -0
- package/src/components/ui/password-input.tsx +34 -1
- package/src/components/ui/progress.tsx +15 -1
- package/src/components/ui/prose.tsx +62 -0
- package/src/components/ui/result.tsx +151 -0
- package/src/components/ui/rolling-number.tsx +1 -0
- package/src/components/ui/simple-grid.tsx +110 -0
- package/src/components/ui/skeleton.tsx +52 -3
- package/src/components/ui/squircle.tsx +274 -0
- package/src/components/ui/stack.tsx +105 -0
- package/src/components/ui/status-badge.tsx +93 -0
- package/src/components/ui/tabs.tsx +34 -7
- package/src/components/ui/tag.tsx +46 -5
- package/src/components/ui/theme-icon.tsx +138 -0
- package/src/components/ui/timeline.tsx +27 -10
- package/src/components/ui/tooltip.tsx +12 -1
- package/src/components/ui/tree-select.tsx +386 -0
- package/src/components/ui/year-picker.tsx +307 -0
- package/src/data/docs-index.ts +10 -0
- package/src/hooks/use-global-primary-color.ts +57 -6
- package/src/stories/Alert.stories.tsx +31 -1
- package/src/stories/Badge.stories.tsx +63 -6
- package/src/stories/ChatMarker.stories.tsx +59 -0
- package/src/stories/Checkbox.stories.tsx +5 -0
- package/src/stories/CloseButton.stories.tsx +65 -0
- package/src/stories/Combobox.stories.tsx +74 -3
- package/src/stories/Container.stories.tsx +134 -0
- package/src/stories/DateField.stories.tsx +114 -0
- package/src/stories/Drawer.stories.tsx +211 -0
- package/src/stories/FileButton.stories.tsx +117 -0
- package/src/stories/FloatingIndicator.stories.tsx +343 -0
- package/src/stories/FormatByte.stories.tsx +142 -0
- package/src/stories/Input.stories.tsx +91 -0
- package/src/stories/KeyboardShortcut.stories.tsx +87 -0
- package/src/stories/LoadingDots.stories.tsx +73 -0
- package/src/stories/MonthPicker.stories.tsx +99 -0
- package/src/stories/MultiSelect.stories.tsx +3 -1
- package/src/stories/NavLink.stories.tsx +213 -0
- package/src/stories/NavigationRail.stories.tsx +413 -0
- package/src/stories/Notification.stories.tsx +53 -0
- package/src/stories/PasswordInput.stories.tsx +21 -0
- package/src/stories/Progress.stories.tsx +38 -0
- package/src/stories/Prose.stories.tsx +232 -0
- package/src/stories/Result.stories.tsx +145 -0
- package/src/stories/RollingNumber.stories.tsx +1 -1
- package/src/stories/SimpleGrid.stories.tsx +130 -0
- package/src/stories/Skeleton.stories.tsx +62 -1
- package/src/stories/Squircle.stories.tsx +127 -0
- package/src/stories/Stack.stories.tsx +139 -0
- package/src/stories/StatusBadge.stories.tsx +125 -0
- package/src/stories/Tabs.stories.tsx +56 -1
- package/src/stories/Tag.stories.tsx +31 -0
- package/src/stories/ThemeIcon.stories.tsx +97 -0
- package/src/stories/Timeline.stories.tsx +69 -0
- package/src/stories/Tooltip.stories.tsx +18 -0
- package/src/stories/TreeSelect.stories.tsx +222 -0
- package/src/stories/YearPicker.stories.tsx +100 -0
- package/src/styles.css +289 -15
- package/src/tokens.json +96 -1
- package/LICENSE +0 -21
package/src/styles.css
CHANGED
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
@custom-variant dark (&:is(.dark *));
|
|
51
51
|
|
|
52
52
|
:root {
|
|
53
|
+
color-scheme: light dark;
|
|
54
|
+
|
|
53
55
|
/* Brand sans from tokens.json leads. Atkinson Hyperlegible (loaded via the
|
|
54
56
|
Google Fonts @import above) is the canonical fallback so unbranded
|
|
55
57
|
consumers still get a high-legibility face out of the box. */
|
|
@@ -79,6 +81,15 @@
|
|
|
79
81
|
--success: oklch(0.5500 0.1500 150);
|
|
80
82
|
--warning: oklch(0.5800 0.1400 65);
|
|
81
83
|
--info: oklch(0.5500 0.1700 250);
|
|
84
|
+
--icon-default: var(--foreground);
|
|
85
|
+
--icon-muted: var(--muted-foreground);
|
|
86
|
+
--icon-primary: var(--primary);
|
|
87
|
+
--icon-success: var(--success);
|
|
88
|
+
--icon-warning: var(--warning);
|
|
89
|
+
--icon-error: var(--destructive);
|
|
90
|
+
--icon-info: var(--info);
|
|
91
|
+
--icon-inverse: var(--primary-foreground);
|
|
92
|
+
--icon-disabled: color-mix(in srgb, var(--muted-foreground) 45%, transparent);
|
|
82
93
|
--border: oklch(0.6100 0 0);
|
|
83
94
|
--input: oklch(0.6100 0 0);
|
|
84
95
|
--ring: oklch(0.4500 0 0);
|
|
@@ -97,6 +108,7 @@
|
|
|
97
108
|
--sidebar-ring: oklch(0.4500 0 0);
|
|
98
109
|
|
|
99
110
|
--radius: 0.625rem;
|
|
111
|
+
--corner-smoothing: 0.6;
|
|
100
112
|
--shadow-opacity: 0.10;
|
|
101
113
|
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / calc(var(--shadow-opacity) * 0.5));
|
|
102
114
|
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / calc(var(--shadow-opacity) * 0.5));
|
|
@@ -159,6 +171,15 @@
|
|
|
159
171
|
--success: oklch(0.8000 0.1500 150);
|
|
160
172
|
--warning: oklch(0.8400 0.1300 80);
|
|
161
173
|
--info: oklch(0.7800 0.1400 250);
|
|
174
|
+
--icon-default: var(--foreground);
|
|
175
|
+
--icon-muted: var(--muted-foreground);
|
|
176
|
+
--icon-primary: var(--primary);
|
|
177
|
+
--icon-success: var(--success);
|
|
178
|
+
--icon-warning: var(--warning);
|
|
179
|
+
--icon-error: var(--destructive);
|
|
180
|
+
--icon-info: var(--info);
|
|
181
|
+
--icon-inverse: var(--primary-foreground);
|
|
182
|
+
--icon-disabled: color-mix(in srgb, var(--muted-foreground) 45%, transparent);
|
|
162
183
|
--border: oklch(0.5500 0 0);
|
|
163
184
|
--input: oklch(0.5500 0 0);
|
|
164
185
|
--ring: oklch(0.7000 0 0);
|
|
@@ -203,6 +224,18 @@
|
|
|
203
224
|
--color-accent-foreground: var(--accent-foreground);
|
|
204
225
|
--color-destructive: var(--destructive);
|
|
205
226
|
--color-destructive-foreground: var(--destructive-foreground);
|
|
227
|
+
--color-success: var(--success);
|
|
228
|
+
--color-warning: var(--warning);
|
|
229
|
+
--color-info: var(--info);
|
|
230
|
+
--color-icon-default: var(--icon-default);
|
|
231
|
+
--color-icon-muted: var(--icon-muted);
|
|
232
|
+
--color-icon-primary: var(--icon-primary);
|
|
233
|
+
--color-icon-success: var(--icon-success);
|
|
234
|
+
--color-icon-warning: var(--icon-warning);
|
|
235
|
+
--color-icon-error: var(--icon-error);
|
|
236
|
+
--color-icon-info: var(--icon-info);
|
|
237
|
+
--color-icon-inverse: var(--icon-inverse);
|
|
238
|
+
--color-icon-disabled: var(--icon-disabled);
|
|
206
239
|
--color-border: var(--border);
|
|
207
240
|
--color-input: var(--input);
|
|
208
241
|
--color-ring: var(--ring);
|
|
@@ -302,13 +335,18 @@
|
|
|
302
335
|
|
|
303
336
|
/* Tracking — every Tailwind tracking-* utility folds in the runtime
|
|
304
337
|
--tracking-offset offset, so the Customize tab slider moves the
|
|
305
|
-
entire app (headlines included), not just unstyled text.
|
|
338
|
+
entire app (headlines included), not just unstyled text.
|
|
339
|
+
Semantic aliases: --tracking-display for hero/display text (4xl–8xl),
|
|
340
|
+
--tracking-heading for section-head text (xl–3xl). Forks use these
|
|
341
|
+
instead of hardcoding em values. */
|
|
306
342
|
--tracking-tighter: calc(-0.05em + var(--tracking-offset, 0em));
|
|
307
343
|
--tracking-tight: calc(-0.025em + var(--tracking-offset, 0em));
|
|
308
344
|
--tracking-normal: var(--tracking-offset, 0em);
|
|
309
345
|
--tracking-wide: calc(0.025em + var(--tracking-offset, 0em));
|
|
310
346
|
--tracking-wider: calc(0.05em + var(--tracking-offset, 0em));
|
|
311
347
|
--tracking-widest: calc(0.1em + var(--tracking-offset, 0em));
|
|
348
|
+
--tracking-display: calc(-0.022em + var(--tracking-offset, 0em));
|
|
349
|
+
--tracking-heading: calc(-0.01em + var(--tracking-offset, 0em));
|
|
312
350
|
}
|
|
313
351
|
|
|
314
352
|
@layer base {
|
|
@@ -534,16 +572,25 @@ html, body {
|
|
|
534
572
|
}
|
|
535
573
|
|
|
536
574
|
/* Theme toggle: iris reveal via View Transitions API. The click coords are
|
|
537
|
-
written to --x / --y on <html> before startViewTransition fires
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
575
|
+
written to --x / --y on <html> before startViewTransition fires, and the
|
|
576
|
+
trigger also writes --r: the exact click-to-farthest-corner distance times
|
|
577
|
+
a small buffer (see shell.tsx toggleDark).
|
|
578
|
+
|
|
579
|
+
Three deliberate choices, all learned the hard way (a client fork 2026-06;
|
|
580
|
+
ultrawide end-of-wipe pop 2026-08):
|
|
581
|
+
1. Radius is JS-computed per click (--r), with a 150vmax FALLBACK — never a
|
|
582
|
+
percentage. Two failure modes bracketed here:
|
|
583
|
+
- circle(150%) resolves against the snapshot box, so on a large/wide
|
|
584
|
+
desktop the wipe can finish before covering the viewport — a glitch at
|
|
585
|
+
the END of the animation that only shows on big displays.
|
|
586
|
+
- A blanket viewport unit (the old 150vmax) always covers, but on wide
|
|
587
|
+
screens it overshoots the needed radius by ~40%, so the eased timeline
|
|
588
|
+
spends its whole tail growing an invisible circle: the last visible
|
|
589
|
+
sweep (the far side of the screen) compresses into ~2 frames and reads
|
|
590
|
+
as a pop/glitch. The exact --r makes the visual sweep own the full
|
|
591
|
+
duration, so the deceleration tail lands where the eye is looking.
|
|
592
|
+
150vmax stays as the no-JS fallback and keeps old forks' behavior. Both
|
|
593
|
+
values are box-independent, so if a fork names sticky chrome as its own
|
|
547
594
|
view-transition group the radius matches the root exactly (no seam).
|
|
548
595
|
2. PURE clip-path reveal, no opacity fade. A 0.7->1 opacity blend makes the
|
|
549
596
|
growing edge translucent, showing the old theme through the new — which
|
|
@@ -568,10 +615,33 @@ html, body {
|
|
|
568
615
|
clip-path: circle(0 at var(--x, 50%) var(--y, 50%));
|
|
569
616
|
}
|
|
570
617
|
to {
|
|
571
|
-
clip-path: circle(150vmax at var(--x, 50%) var(--y, 50%));
|
|
618
|
+
clip-path: circle(var(--r, 150vmax) at var(--x, 50%) var(--y, 50%));
|
|
572
619
|
}
|
|
573
620
|
}
|
|
574
621
|
|
|
622
|
+
/* Tail-guard against the 1-frame old-theme flash at the end of the wipe.
|
|
623
|
+
Measured on prod builds at 3440x1440 (2026-08-19, frame-by-frame video):
|
|
624
|
+
right at the animation boundary the compositor occasionally renders one
|
|
625
|
+
frame where the NEW snapshot misses and the opaque OLD snapshot (z-index 0)
|
|
626
|
+
shows through — an old-theme flash over the just-revealed far side of the
|
|
627
|
+
screen. Direction-agnostic; only conspicuous against the opposite theme.
|
|
628
|
+
Two-part guard, both invisible in correct rendering:
|
|
629
|
+
1. theme-old-out drops the old snapshot to opacity 0 over the final 8% of
|
|
630
|
+
the timeline. The circle fully covers the viewport by ~t=0.91 (the --r
|
|
631
|
+
x1.03 buffer, see shell.tsx), so the old layer is already occluded when
|
|
632
|
+
it fades — this is NOT the forbidden opacity cross-fade (that objection
|
|
633
|
+
is about fading DURING the sweep, which smears the edge grey).
|
|
634
|
+
2. The ::view-transition canvas (beneath both snapshots) paints with the
|
|
635
|
+
live NEW-theme --background, so a frame where BOTH snapshots miss shows
|
|
636
|
+
the new background color instead of the UA canvas. */
|
|
637
|
+
::view-transition {
|
|
638
|
+
background-color: var(--background);
|
|
639
|
+
}
|
|
640
|
+
@keyframes theme-old-out {
|
|
641
|
+
0%, 92% { opacity: 1; }
|
|
642
|
+
98%, 100% { opacity: 0; }
|
|
643
|
+
}
|
|
644
|
+
|
|
575
645
|
/* Accordion disclosure keyframes — used by Radix-based AccordionContent.
|
|
576
646
|
Radix injects the actual content height as `--radix-accordion-content-height`
|
|
577
647
|
at runtime, which these keyframes interpolate against. Duration + timing
|
|
@@ -649,17 +719,221 @@ html, body {
|
|
|
649
719
|
30% { transform: translateY(-4px); opacity: 1; }
|
|
650
720
|
}
|
|
651
721
|
|
|
722
|
+
/* Skeleton wave shimmer — left-to-right highlight sweep, the alternative to
|
|
723
|
+
the default opacity pulse (Skeleton's `animation="wave"`). Same pattern-(b)
|
|
724
|
+
delivery as accordion/marquee: plain CSS keyed off data-slot +
|
|
725
|
+
data-animation, no Tailwind utility generation in the path. The attribute
|
|
726
|
+
lands on the bg-carrying elements only (single skeleton div, or each
|
|
727
|
+
skeleton-line in a multi-line text stack) — never the transparent wrapper,
|
|
728
|
+
so the gradient can't paint on a bg-less container.
|
|
729
|
+
- Highlight mixes 8% foreground into the accent base via color-mix, so it
|
|
730
|
+
tracks light/dark and fork brand tokens with no hardcoded colors.
|
|
731
|
+
- "linear" timing: the sweep is an ambient loop; easing would make it
|
|
732
|
+
lurch (same seamless-loop reasoning as marquee-scroll above).
|
|
733
|
+
- --skeleton-wave-duration is the consumer tunable (default 2s). The
|
|
734
|
+
duration.* tokens top out at 300ms — interaction-scale, not
|
|
735
|
+
ambient-loop-scale — same reasoning as --marquee-duration.
|
|
736
|
+
- Reduced motion: the base layer forces animation-duration to 0.01ms with
|
|
737
|
+
iteration-count 1, so the wave collapses to a static block. */
|
|
738
|
+
@keyframes skeleton-wave {
|
|
739
|
+
from { background-position: 200% 0; }
|
|
740
|
+
to { background-position: -200% 0; }
|
|
741
|
+
}
|
|
742
|
+
[data-slot="skeleton"][data-animation="wave"],
|
|
743
|
+
[data-slot="skeleton-line"][data-animation="wave"] {
|
|
744
|
+
background-image: linear-gradient(
|
|
745
|
+
90deg,
|
|
746
|
+
var(--accent) 25%,
|
|
747
|
+
color-mix(in oklab, var(--accent), var(--foreground) 8%) 50%,
|
|
748
|
+
var(--accent) 75%
|
|
749
|
+
);
|
|
750
|
+
background-size: 200% 100%;
|
|
751
|
+
animation: skeleton-wave var(--skeleton-wave-duration, 2s) linear infinite;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/* Prose — long-form typographic rhythm for arbitrary HTML descendants
|
|
755
|
+
(MDX output, CMS articles, rendered markdown). Keyed off the .prose
|
|
756
|
+
class the Prose primitive (data-slot="prose") applies — same
|
|
757
|
+
design-system-CSS delivery as the accordion/marquee blocks above.
|
|
758
|
+
Deliberately OUTSIDE @layer base so these rules beat the base layer's
|
|
759
|
+
element defaults (p margins, etc.) without specificity games, while any
|
|
760
|
+
consumer utility class on a descendant still wins per the cascade.
|
|
761
|
+
|
|
762
|
+
Type sizes can't use var(--text-*): those live in @theme inline, which
|
|
763
|
+
inlines values into utilities WITHOUT emitting :root custom properties —
|
|
764
|
+
a plain-CSS var() lookup would go invalid at computed-value time and
|
|
765
|
+
silently inherit. Instead each font-size repeats the theme's exact
|
|
766
|
+
calc( var(--text-*-size, <token>) * var(--font-size-scale, 1) ) form,
|
|
767
|
+
interpolated from tokens.json here, so the Customize-tab type-scale
|
|
768
|
+
slider moves prose content too and tokens stay the single source.
|
|
769
|
+
|
|
770
|
+
Block rhythm is em-based (matching the base layer's 1.5em paragraph
|
|
771
|
+
rule) so SC 1.4.8 paragraph spacing holds at every font scale; fixed
|
|
772
|
+
spacing uses the --spacing token. Colors/borders/radii/motion resolve
|
|
773
|
+
through :root tokens. Heading scale mirrors the Heading primitive:
|
|
774
|
+
h1 = heading-lg (text-2xl 700), h2 = heading-md (text-xl 700),
|
|
775
|
+
h3 = heading-sm (text-lg 500). Don't nest app UI (buttons, forms)
|
|
776
|
+
inside a Prose region — see the registry antiPatterns. */
|
|
777
|
+
.prose {
|
|
778
|
+
color: var(--foreground);
|
|
779
|
+
font-size: calc(var(--text-base-size, 20px) * var(--font-size-scale, 1));
|
|
780
|
+
line-height: 1.75;
|
|
781
|
+
min-width: 0;
|
|
782
|
+
overflow-wrap: break-word;
|
|
783
|
+
}
|
|
784
|
+
/* Zero p margins inside prose so the owl below owns ALL rhythm — this
|
|
785
|
+
neutralizes both the base layer's p:not(:last-child) margin and its
|
|
786
|
+
flex/grid carve-out, which otherwise make prose spacing depend on
|
|
787
|
+
whether an ancestor happens to be a flex container. :where() keeps
|
|
788
|
+
this at specificity 0,1,0 so the owl (also 0,1,0, later in source)
|
|
789
|
+
wins margin-block-start on following-sibling paragraphs. */
|
|
790
|
+
.prose :where(p) {
|
|
791
|
+
margin-block: 0;
|
|
792
|
+
}
|
|
793
|
+
/* Lobotomized-owl rhythm: space between sibling blocks, never above the
|
|
794
|
+
first. 1.5em keeps SC 1.4.8 paragraph spacing at every font scale. */
|
|
795
|
+
.prose > * + * {
|
|
796
|
+
margin-block-start: 1.5em;
|
|
797
|
+
}
|
|
798
|
+
/* Headings get extra air above when they follow content; the content a
|
|
799
|
+
heading introduces sits close beneath it. */
|
|
800
|
+
.prose > * + :is(h1, h2, h3, h4) {
|
|
801
|
+
margin-block-start: 2em;
|
|
802
|
+
}
|
|
803
|
+
.prose > :is(h1, h2, h3, h4) + * {
|
|
804
|
+
margin-block-start: calc(var(--spacing) * 3);
|
|
805
|
+
}
|
|
806
|
+
.prose h1 {
|
|
807
|
+
font-size: calc(var(--text-2xl-size, 39.06px) * var(--font-size-scale, 1));
|
|
808
|
+
font-weight: 700;
|
|
809
|
+
line-height: 1.375;
|
|
810
|
+
}
|
|
811
|
+
.prose h2 {
|
|
812
|
+
font-size: calc(var(--text-xl-size, 31.25px) * var(--font-size-scale, 1));
|
|
813
|
+
font-weight: 700;
|
|
814
|
+
line-height: 1.375;
|
|
815
|
+
}
|
|
816
|
+
.prose h3 {
|
|
817
|
+
font-size: calc(var(--text-lg-size, 25px) * var(--font-size-scale, 1));
|
|
818
|
+
font-weight: 500;
|
|
819
|
+
line-height: 1.5;
|
|
820
|
+
}
|
|
821
|
+
.prose h4 {
|
|
822
|
+
font-size: calc(var(--text-base-size, 20px) * var(--font-size-scale, 1));
|
|
823
|
+
font-weight: 700;
|
|
824
|
+
line-height: 1.5;
|
|
825
|
+
}
|
|
826
|
+
/* Inner spacing for multi-paragraph list items / quotes (not direct
|
|
827
|
+
children of .prose, so the owl can't reach them). */
|
|
828
|
+
.prose :is(li, blockquote) > p + p {
|
|
829
|
+
margin-block-start: 1em;
|
|
830
|
+
}
|
|
831
|
+
.prose ul {
|
|
832
|
+
list-style-type: disc;
|
|
833
|
+
padding-inline-start: calc(var(--spacing) * 6);
|
|
834
|
+
}
|
|
835
|
+
.prose ol {
|
|
836
|
+
list-style-type: decimal;
|
|
837
|
+
padding-inline-start: calc(var(--spacing) * 6);
|
|
838
|
+
}
|
|
839
|
+
.prose li {
|
|
840
|
+
margin-block-start: calc(var(--spacing) * 2);
|
|
841
|
+
}
|
|
842
|
+
.prose li::marker {
|
|
843
|
+
color: var(--muted-foreground);
|
|
844
|
+
}
|
|
845
|
+
/* Mirrors the Blockquote primitive's default variant (border-l-2
|
|
846
|
+
border-border pl-4) so hand-authored quotes and markdown quotes match. */
|
|
847
|
+
.prose blockquote {
|
|
848
|
+
border-inline-start: 2px solid var(--border);
|
|
849
|
+
padding-inline-start: calc(var(--spacing) * 4);
|
|
850
|
+
color: var(--muted-foreground);
|
|
851
|
+
}
|
|
852
|
+
.prose code {
|
|
853
|
+
font-family: var(--font-mono);
|
|
854
|
+
font-size: 0.875em;
|
|
855
|
+
background-color: var(--muted);
|
|
856
|
+
border-radius: calc(var(--radius) - 4px);
|
|
857
|
+
padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5);
|
|
858
|
+
}
|
|
859
|
+
.prose pre {
|
|
860
|
+
font-family: var(--font-mono);
|
|
861
|
+
font-size: calc(var(--text-sm-size, 16px) * var(--font-size-scale, 1));
|
|
862
|
+
line-height: 1.7;
|
|
863
|
+
background-color: var(--muted);
|
|
864
|
+
border: 1px solid var(--border);
|
|
865
|
+
border-radius: calc(var(--radius) - 2px);
|
|
866
|
+
padding: calc(var(--spacing) * 4);
|
|
867
|
+
overflow-x: auto;
|
|
868
|
+
}
|
|
869
|
+
.prose pre code {
|
|
870
|
+
background-color: transparent;
|
|
871
|
+
border-radius: 0;
|
|
872
|
+
padding: 0;
|
|
873
|
+
font-size: inherit;
|
|
874
|
+
}
|
|
875
|
+
/* Links: --link is the wcag:audit-enforced AAA link color. Hover thickens
|
|
876
|
+
the underline on motion tokens (spec §4 pattern (b): design-system CSS,
|
|
877
|
+
no Tailwind utility generation in the path). Focus-visible stays on the
|
|
878
|
+
base layer's non-animated outline. */
|
|
879
|
+
.prose a {
|
|
880
|
+
color: var(--link);
|
|
881
|
+
font-weight: 500;
|
|
882
|
+
text-decoration-line: underline;
|
|
883
|
+
text-decoration-thickness: 1px;
|
|
884
|
+
text-underline-offset: 0.2em;
|
|
885
|
+
transition: text-decoration-thickness var(--duration-fast) var(--ease-out);
|
|
886
|
+
}
|
|
887
|
+
.prose a:hover {
|
|
888
|
+
text-decoration-thickness: 2px;
|
|
889
|
+
}
|
|
890
|
+
.prose hr {
|
|
891
|
+
border: 0;
|
|
892
|
+
border-top: 1px solid var(--border);
|
|
893
|
+
margin-block: 2em;
|
|
894
|
+
}
|
|
895
|
+
.prose table {
|
|
896
|
+
width: 100%;
|
|
897
|
+
border-collapse: collapse;
|
|
898
|
+
font-size: calc(var(--text-sm-size, 16px) * var(--font-size-scale, 1));
|
|
899
|
+
line-height: 1.6;
|
|
900
|
+
}
|
|
901
|
+
.prose th {
|
|
902
|
+
text-align: start;
|
|
903
|
+
font-weight: 600;
|
|
904
|
+
border-bottom: 1px solid var(--border);
|
|
905
|
+
padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
|
|
906
|
+
}
|
|
907
|
+
.prose td {
|
|
908
|
+
border-bottom: 1px solid var(--border);
|
|
909
|
+
padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
|
|
910
|
+
}
|
|
911
|
+
.prose img {
|
|
912
|
+
max-width: 100%;
|
|
913
|
+
height: auto;
|
|
914
|
+
border-radius: calc(var(--radius) - 2px);
|
|
915
|
+
}
|
|
916
|
+
|
|
652
917
|
::view-transition-new(root) {
|
|
653
918
|
animation: theme-reveal 0.4s ease-in-out forwards;
|
|
654
919
|
}
|
|
920
|
+
/* Same duration/easing as theme-reveal so the 92%/98% offsets line up with
|
|
921
|
+
the reveal's coverage math. */
|
|
922
|
+
::view-transition-old(root) {
|
|
923
|
+
animation: theme-old-out 0.4s ease-in-out forwards;
|
|
924
|
+
}
|
|
655
925
|
|
|
656
926
|
/* Honor the app-level MotionToggle for the iris wipe too (same three-state
|
|
657
927
|
model as the global kill-all). "reduce" snaps the theme swap instantly;
|
|
658
928
|
"full" keeps the wipe even under an OS reduce preference; absent = OS
|
|
659
|
-
query governs. `animation: none` on the pseudo just does an instant swap.
|
|
660
|
-
|
|
929
|
+
query governs. `animation: none` on the pseudo just does an instant swap.
|
|
930
|
+
Old + new both reset — leaving theme-old-out running would turn the
|
|
931
|
+
instant swap into a 0.4s crossfade for reduced-motion users. */
|
|
932
|
+
html[data-motion="reduce"]::view-transition-new(root),
|
|
933
|
+
html[data-motion="reduce"]::view-transition-old(root) { animation: none; }
|
|
661
934
|
@media (prefers-reduced-motion: reduce) {
|
|
662
|
-
html:not([data-motion="full"])::view-transition-new(root)
|
|
935
|
+
html:not([data-motion="full"])::view-transition-new(root),
|
|
936
|
+
html:not([data-motion="full"])::view-transition-old(root) { animation: none; }
|
|
663
937
|
}
|
|
664
938
|
|
|
665
939
|
@layer utilities {
|
package/src/tokens.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://www.designtokens.org/tr/
|
|
2
|
+
"$schema": "https://www.designtokens.org/tr/format/",
|
|
3
3
|
"version": "0.2.0",
|
|
4
4
|
"color": {
|
|
5
5
|
"primitive": {
|
|
@@ -337,6 +337,11 @@
|
|
|
337
337
|
"$type": "dimension"
|
|
338
338
|
}
|
|
339
339
|
},
|
|
340
|
+
"cornerSmoothing": {
|
|
341
|
+
"$value": 0.6,
|
|
342
|
+
"$type": "number",
|
|
343
|
+
"$description": "Superellipse corner smoothing (0-1) for the Squircle primitive. Maps to --corner-smoothing. Config scalar (drives the clip-path generator), NOT a utility class — the orphan-lint ignores it the same way it ignores chart.* generator inputs. 0 = an ordinary rounded corner, ~0.6 = the iOS look."
|
|
344
|
+
},
|
|
340
345
|
"shadow": {
|
|
341
346
|
"none": {
|
|
342
347
|
"$value": "none",
|
|
@@ -947,6 +952,51 @@
|
|
|
947
952
|
"$type": "color",
|
|
948
953
|
"$description": "Informational status accent (icon, border). Non-text: tuned ≥3:1 on popover/card/background. Not for body text without checking 7:1."
|
|
949
954
|
},
|
|
955
|
+
"icon-default": {
|
|
956
|
+
"$value": "var(--foreground)",
|
|
957
|
+
"$type": "color",
|
|
958
|
+
"$description": "Default icon color — a live alias of --foreground. Icons inherit currentColor by default; reach for text-icon-* only when an icon needs a role independent of the surrounding text (e.g. a status glyph)."
|
|
959
|
+
},
|
|
960
|
+
"icon-muted": {
|
|
961
|
+
"$value": "var(--muted-foreground)",
|
|
962
|
+
"$type": "color",
|
|
963
|
+
"$description": "Secondary / decorative icon color (alias of --muted-foreground)."
|
|
964
|
+
},
|
|
965
|
+
"icon-primary": {
|
|
966
|
+
"$value": "var(--primary)",
|
|
967
|
+
"$type": "color",
|
|
968
|
+
"$description": "Brand-primary icon color (alias of --primary)."
|
|
969
|
+
},
|
|
970
|
+
"icon-success": {
|
|
971
|
+
"$value": "var(--success)",
|
|
972
|
+
"$type": "color",
|
|
973
|
+
"$description": "Success / positive status icon (alias of --success)."
|
|
974
|
+
},
|
|
975
|
+
"icon-warning": {
|
|
976
|
+
"$value": "var(--warning)",
|
|
977
|
+
"$type": "color",
|
|
978
|
+
"$description": "Warning / caution status icon (alias of --warning)."
|
|
979
|
+
},
|
|
980
|
+
"icon-error": {
|
|
981
|
+
"$value": "var(--destructive)",
|
|
982
|
+
"$type": "color",
|
|
983
|
+
"$description": "Error / destructive status icon (alias of --destructive)."
|
|
984
|
+
},
|
|
985
|
+
"icon-info": {
|
|
986
|
+
"$value": "var(--info)",
|
|
987
|
+
"$type": "color",
|
|
988
|
+
"$description": "Informational status icon (alias of --info)."
|
|
989
|
+
},
|
|
990
|
+
"icon-inverse": {
|
|
991
|
+
"$value": "var(--primary-foreground)",
|
|
992
|
+
"$type": "color",
|
|
993
|
+
"$description": "Icon on a filled / inverted (primary) surface (alias of --primary-foreground)."
|
|
994
|
+
},
|
|
995
|
+
"icon-disabled": {
|
|
996
|
+
"$value": "color-mix(in srgb, var(--muted-foreground) 45%, transparent)",
|
|
997
|
+
"$type": "color",
|
|
998
|
+
"$description": "Disabled icon — intentionally low-contrast; the disabled state is exempt from the contrast floor."
|
|
999
|
+
},
|
|
950
1000
|
"border": {
|
|
951
1001
|
"$value": "oklch(0.6100 0 0)",
|
|
952
1002
|
"$type": "color",
|
|
@@ -1112,6 +1162,51 @@
|
|
|
1112
1162
|
"$type": "color",
|
|
1113
1163
|
"$description": "Informational status accent (icon, border) for dark mode. Non-text: tuned ≥3:1 on popover/card/background. Not for body text without checking 7:1."
|
|
1114
1164
|
},
|
|
1165
|
+
"icon-default": {
|
|
1166
|
+
"$value": "var(--foreground)",
|
|
1167
|
+
"$type": "color",
|
|
1168
|
+
"$description": "Default icon color — a live alias of --foreground (dark)."
|
|
1169
|
+
},
|
|
1170
|
+
"icon-muted": {
|
|
1171
|
+
"$value": "var(--muted-foreground)",
|
|
1172
|
+
"$type": "color",
|
|
1173
|
+
"$description": "Secondary / decorative icon color (alias of --muted-foreground, dark)."
|
|
1174
|
+
},
|
|
1175
|
+
"icon-primary": {
|
|
1176
|
+
"$value": "var(--primary)",
|
|
1177
|
+
"$type": "color",
|
|
1178
|
+
"$description": "Brand-primary icon color (alias of --primary, dark)."
|
|
1179
|
+
},
|
|
1180
|
+
"icon-success": {
|
|
1181
|
+
"$value": "var(--success)",
|
|
1182
|
+
"$type": "color",
|
|
1183
|
+
"$description": "Success / positive status icon (alias of --success, dark)."
|
|
1184
|
+
},
|
|
1185
|
+
"icon-warning": {
|
|
1186
|
+
"$value": "var(--warning)",
|
|
1187
|
+
"$type": "color",
|
|
1188
|
+
"$description": "Warning / caution status icon (alias of --warning, dark)."
|
|
1189
|
+
},
|
|
1190
|
+
"icon-error": {
|
|
1191
|
+
"$value": "var(--destructive)",
|
|
1192
|
+
"$type": "color",
|
|
1193
|
+
"$description": "Error / destructive status icon (alias of --destructive, dark)."
|
|
1194
|
+
},
|
|
1195
|
+
"icon-info": {
|
|
1196
|
+
"$value": "var(--info)",
|
|
1197
|
+
"$type": "color",
|
|
1198
|
+
"$description": "Informational status icon (alias of --info, dark)."
|
|
1199
|
+
},
|
|
1200
|
+
"icon-inverse": {
|
|
1201
|
+
"$value": "var(--primary-foreground)",
|
|
1202
|
+
"$type": "color",
|
|
1203
|
+
"$description": "Icon on a filled / inverted (primary) surface (alias of --primary-foreground, dark)."
|
|
1204
|
+
},
|
|
1205
|
+
"icon-disabled": {
|
|
1206
|
+
"$value": "color-mix(in srgb, var(--muted-foreground) 45%, transparent)",
|
|
1207
|
+
"$type": "color",
|
|
1208
|
+
"$description": "Disabled icon — intentionally low-contrast; the disabled state is exempt from the contrast floor (dark)."
|
|
1209
|
+
},
|
|
1115
1210
|
"border": {
|
|
1116
1211
|
"$value": "oklch(0.5500 0 0)",
|
|
1117
1212
|
"$type": "color",
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Matthew Stephens
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|