@behavioral-agentic-design-system/core 0.24.0 → 0.27.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.
Files changed (137) hide show
  1. package/package.json +5 -2
  2. package/scripts/build-tokens.cjs +87 -5
  3. package/src/app/preview/components/page.tsx +4745 -244
  4. package/src/app/shell.tsx +18 -6
  5. package/src/components/customize/brand-mark-section.tsx +1 -1
  6. package/src/components/customize-tab.tsx +2 -2
  7. package/src/components/home-tab.tsx +2 -2
  8. package/src/components/ui/action-bar.tsx +142 -0
  9. package/src/components/ui/affix.tsx +109 -0
  10. package/src/components/ui/alert.tsx +37 -3
  11. package/src/components/ui/anchor.tsx +136 -0
  12. package/src/components/ui/angle-slider.tsx +265 -0
  13. package/src/components/ui/autocomplete.tsx +223 -0
  14. package/src/components/ui/avatar.tsx +8 -2
  15. package/src/components/ui/blockquote.tsx +112 -0
  16. package/src/components/ui/bottom-navigation.tsx +144 -0
  17. package/src/components/ui/burger.tsx +117 -0
  18. package/src/components/ui/button.tsx +101 -3
  19. package/src/components/ui/calendar.tsx +1 -1
  20. package/src/components/ui/card.tsx +43 -5
  21. package/src/components/ui/carousel.tsx +10 -5
  22. package/src/components/ui/cascader.tsx +253 -0
  23. package/src/components/ui/checkbox-card.tsx +176 -0
  24. package/src/components/ui/checkbox-group.tsx +231 -0
  25. package/src/components/ui/checkbox.tsx +14 -3
  26. package/src/components/ui/chip.tsx +143 -0
  27. package/src/components/ui/circular-progress.tsx +2 -2
  28. package/src/components/ui/color-swatch.tsx +73 -0
  29. package/src/components/ui/copy-button.tsx +21 -4
  30. package/src/components/ui/date-picker.tsx +6 -3
  31. package/src/components/ui/date-range-picker.tsx +6 -3
  32. package/src/components/ui/float-label.tsx +114 -0
  33. package/src/components/ui/floating-action-button.tsx +179 -0
  34. package/src/components/ui/floating-panel.tsx +129 -0
  35. package/src/components/ui/format-number.tsx +122 -0
  36. package/src/components/ui/highlight.tsx +85 -0
  37. package/src/components/ui/image.tsx +195 -0
  38. package/src/components/ui/index.ts +51 -0
  39. package/src/components/ui/indicator.tsx +2 -2
  40. package/src/components/ui/input.tsx +48 -4
  41. package/src/components/ui/kbd.tsx +1 -1
  42. package/src/components/ui/link.tsx +158 -0
  43. package/src/components/ui/listbox.tsx +426 -0
  44. package/src/components/ui/loading-overlay.tsx +80 -0
  45. package/src/components/ui/marquee.tsx +193 -0
  46. package/src/components/ui/masonry.tsx +164 -0
  47. package/src/components/ui/meter.tsx +186 -0
  48. package/src/components/ui/motion-toggle.tsx +170 -0
  49. package/src/components/ui/notification.tsx +175 -0
  50. package/src/components/ui/overlay.tsx +63 -0
  51. package/src/components/ui/progress.tsx +95 -4
  52. package/src/components/ui/rating-group.tsx +1 -0
  53. package/src/components/ui/separator.tsx +57 -1
  54. package/src/components/ui/sidebar.tsx +1 -1
  55. package/src/components/ui/signature-pad.tsx +381 -0
  56. package/src/components/ui/skeleton.tsx +59 -2
  57. package/src/components/ui/skip-link.tsx +117 -0
  58. package/src/components/ui/slider.tsx +86 -1
  59. package/src/components/ui/spoiler.tsx +131 -0
  60. package/src/components/ui/tabs.tsx +1 -1
  61. package/src/components/ui/text.tsx +135 -0
  62. package/src/components/ui/textarea.tsx +66 -2
  63. package/src/components/ui/timeline.tsx +71 -14
  64. package/src/components/ui/timer.tsx +183 -0
  65. package/src/components/ui/tour.tsx +332 -0
  66. package/src/components/ui/transfer-list.tsx +343 -0
  67. package/src/components/ui/typing-indicator.tsx +96 -0
  68. package/src/components/ui/visually-hidden.tsx +42 -0
  69. package/src/components/ui/watermark.tsx +0 -0
  70. package/src/components/ui/word-rotate.tsx +82 -0
  71. package/src/data/docs-index.ts +10 -2
  72. package/src/stories/ActionBar.stories.tsx +201 -0
  73. package/src/stories/Affix.stories.tsx +165 -0
  74. package/src/stories/Alert.stories.tsx +58 -0
  75. package/src/stories/Anchor.stories.tsx +236 -0
  76. package/src/stories/AngleSlider.stories.tsx +128 -0
  77. package/src/stories/Autocomplete.stories.tsx +216 -0
  78. package/src/stories/Avatar.stories.tsx +73 -1
  79. package/src/stories/Blockquote.stories.tsx +148 -0
  80. package/src/stories/BottomNavigation.stories.tsx +195 -0
  81. package/src/stories/Burger.stories.tsx +79 -0
  82. package/src/stories/Button.stories.tsx +103 -2
  83. package/src/stories/Calendar.stories.tsx +4 -0
  84. package/src/stories/Card.stories.tsx +30 -0
  85. package/src/stories/Carousel.stories.tsx +2 -1
  86. package/src/stories/Cascader.stories.tsx +285 -0
  87. package/src/stories/Checkbox.stories.tsx +13 -0
  88. package/src/stories/CheckboxCard.stories.tsx +210 -0
  89. package/src/stories/CheckboxGroup.stories.tsx +186 -0
  90. package/src/stories/Chip.stories.tsx +173 -0
  91. package/src/stories/CircularProgress.stories.tsx +3 -0
  92. package/src/stories/ColorSwatch.stories.tsx +81 -0
  93. package/src/stories/CopyButton.stories.tsx +3 -3
  94. package/src/stories/DatePicker.stories.tsx +3 -0
  95. package/src/stories/DateRangePicker.stories.tsx +3 -0
  96. package/src/stories/Editable.stories.tsx +14 -0
  97. package/src/stories/FloatLabel.stories.tsx +148 -0
  98. package/src/stories/FloatingActionButton.stories.tsx +215 -0
  99. package/src/stories/FloatingPanel.stories.tsx +176 -0
  100. package/src/stories/FormatNumber.stories.tsx +308 -0
  101. package/src/stories/Highlight.stories.tsx +140 -0
  102. package/src/stories/Image.stories.tsx +141 -0
  103. package/src/stories/Indicator.stories.tsx +3 -0
  104. package/src/stories/Input.stories.tsx +33 -0
  105. package/src/stories/Kbd.stories.tsx +3 -0
  106. package/src/stories/Link.stories.tsx +198 -0
  107. package/src/stories/Listbox.stories.tsx +240 -0
  108. package/src/stories/LoadingOverlay.stories.tsx +148 -0
  109. package/src/stories/Marquee.stories.tsx +170 -0
  110. package/src/stories/Masonry.stories.tsx +227 -0
  111. package/src/stories/Meter.stories.tsx +150 -0
  112. package/src/stories/MotionToggle.stories.tsx +85 -0
  113. package/src/stories/Notification.stories.tsx +264 -0
  114. package/src/stories/Overlay.stories.tsx +169 -0
  115. package/src/stories/PasswordInput.stories.tsx +4 -0
  116. package/src/stories/Progress.stories.tsx +70 -27
  117. package/src/stories/RatingGroup.stories.tsx +5 -0
  118. package/src/stories/Separator.stories.tsx +41 -5
  119. package/src/stories/Sidebar.stories.tsx +2 -1
  120. package/src/stories/SignaturePad.stories.tsx +112 -0
  121. package/src/stories/Skeleton.stories.tsx +23 -4
  122. package/src/stories/SkipLink.stories.tsx +137 -0
  123. package/src/stories/Slider.stories.tsx +28 -0
  124. package/src/stories/Spoiler.stories.tsx +122 -0
  125. package/src/stories/Tabs.stories.tsx +2 -1
  126. package/src/stories/Text.stories.tsx +191 -0
  127. package/src/stories/Textarea.stories.tsx +58 -6
  128. package/src/stories/Timeline.stories.tsx +82 -0
  129. package/src/stories/Timer.stories.tsx +160 -0
  130. package/src/stories/Tour.stories.tsx +191 -0
  131. package/src/stories/TransferList.stories.tsx +190 -0
  132. package/src/stories/TypingIndicator.stories.tsx +139 -0
  133. package/src/stories/VisuallyHidden.stories.tsx +105 -0
  134. package/src/stories/Watermark.stories.tsx +212 -0
  135. package/src/stories/WordRotate.stories.tsx +101 -0
  136. package/src/styles.css +88 -6
  137. package/src/tokens.json +3 -3
@@ -0,0 +1,212 @@
1
+ import * as React from "react"
2
+ import type { Meta, StoryObj } from "@storybook/react"
3
+ import { Watermark } from "@behavioral-agentic-design-system/core/components/ui/watermark"
4
+ import {
5
+ Card,
6
+ CardContent,
7
+ CardDescription,
8
+ CardHeader,
9
+ CardTitle,
10
+ } from "@behavioral-agentic-design-system/core/components/ui/card"
11
+ import { Badge } from "@behavioral-agentic-design-system/core/components/ui/badge"
12
+ import {
13
+ DataList,
14
+ DataListItem,
15
+ DataListLabel,
16
+ DataListValue,
17
+ } from "@behavioral-agentic-design-system/core/components/ui/data-list"
18
+
19
+ const meta: Meta<typeof Watermark> = {
20
+ title: "Components/Watermark",
21
+ component: Watermark,
22
+ parameters: { layout: "centered" },
23
+ tags: ["autodocs"],
24
+ argTypes: {
25
+ content: { control: "text" },
26
+ rotate: { control: { type: "range", min: -90, max: 90, step: 5 } },
27
+ opacity: { control: { type: "range", min: 0, max: 1, step: 0.05 } },
28
+ },
29
+ }
30
+
31
+ export default meta
32
+ type Story = StoryObj<typeof meta>
33
+
34
+ // Content pulled from content/personas/bads.json (primary persona pool).
35
+
36
+ // Simple diagonal-mark SVG as a data URI — same-origin, so the canvas
37
+ // export never taints. Named color (gray) on purpose: the tile is drawn
38
+ // once and the overlay's opacity keeps it quiet in both themes.
39
+ const MARK_SVG =
40
+ "data:image/svg+xml," +
41
+ encodeURIComponent(
42
+ `<svg xmlns='http://www.w3.org/2000/svg' width='96' height='40' viewBox='0 0 96 40'><text x='0' y='28' font-family='sans-serif' font-size='24' font-weight='600' fill='gray'>BADS</text></svg>`,
43
+ )
44
+
45
+ export const Default: Story = {
46
+ render: () => (
47
+ <Watermark content="Internal review — do not distribute">
48
+ <Card className="w-[28rem]">
49
+ <CardHeader>
50
+ <CardTitle>Tokens v2 proposal</CardTitle>
51
+ <CardDescription>
52
+ Shared by Anika Patel · design.bads.com/share/tokens-v2-proposal
53
+ </CardDescription>
54
+ </CardHeader>
55
+ <CardContent className="space-y-3 text-sm leading-relaxed text-foreground">
56
+ <p>
57
+ The semantic layer gets three new aliases so chart surfaces stop
58
+ borrowing from the sidebar palette. Every pair was audited at 7:1
59
+ before this draft went out.
60
+ </p>
61
+ <p className="text-muted-foreground">
62
+ 36 components, all passing AAA contrast. Last token change was 3
63
+ days ago.
64
+ </p>
65
+ </CardContent>
66
+ </Card>
67
+ </Watermark>
68
+ ),
69
+ }
70
+
71
+ export const Size_Sm: Story = {
72
+ render: () => (
73
+ <Watermark
74
+ content="seoyun_park · 2026-05-26"
75
+ font={{ fontSize: 12 }}
76
+ gap={[64, 64]}
77
+ opacity={0.12}
78
+ >
79
+ <Card className="w-[28rem]">
80
+ <CardHeader>
81
+ <CardTitle>Exported audit snapshot</CardTitle>
82
+ <CardDescription>
83
+ Dense provenance mark — small type, tight gap, low opacity.
84
+ </CardDescription>
85
+ </CardHeader>
86
+ <CardContent className="text-sm leading-relaxed text-muted-foreground">
87
+ Screenshot exports carry the exporting account and date as a
88
+ repeating mark so shared images stay attributable.
89
+ </CardContent>
90
+ </Card>
91
+ </Watermark>
92
+ ),
93
+ }
94
+
95
+ export const Size_Lg: Story = {
96
+ render: () => (
97
+ <Watermark
98
+ content="DRAFT"
99
+ font={{ fontSize: 48, fontWeight: "semibold" }}
100
+ gap={[140, 120]}
101
+ opacity={0.08}
102
+ >
103
+ <Card className="w-[28rem]">
104
+ <CardHeader>
105
+ <CardTitle>Set up your design system in five minutes</CardTitle>
106
+ <CardDescription>
107
+ Loud status mark — large type, wide gap, extra-low opacity so the
108
+ body copy stays readable.
109
+ </CardDescription>
110
+ </CardHeader>
111
+ <CardContent className="space-y-3 text-sm leading-relaxed text-foreground">
112
+ <p>
113
+ Fork it, rename it, customize the brand colors, and start
114
+ building. Token changes saved — run pnpm build:tokens to
115
+ regenerate CSS.
116
+ </p>
117
+ <p>
118
+ This walkthrough is unpublished; the DRAFT mark comes off when
119
+ docs review signs it.
120
+ </p>
121
+ </CardContent>
122
+ </Card>
123
+ </Watermark>
124
+ ),
125
+ }
126
+
127
+ export const WithImage: Story = {
128
+ render: () => (
129
+ <Watermark image={MARK_SVG} gap={[110, 90]} opacity={0.1}>
130
+ <Card className="w-[28rem]">
131
+ <CardHeader>
132
+ <CardTitle>Brand-marked preview</CardTitle>
133
+ <CardDescription>
134
+ Image mode: an SVG wordmark tiles instead of text. Data-URI
135
+ images never taint the canvas; cross-origin URLs load with
136
+ crossOrigin=&quot;anonymous&quot; and fail silent.
137
+ </CardDescription>
138
+ </CardHeader>
139
+ <CardContent className="text-sm leading-relaxed text-muted-foreground">
140
+ Use image mode for logo provenance on exported charts and shared
141
+ board previews.
142
+ </CardContent>
143
+ </Card>
144
+ </Watermark>
145
+ ),
146
+ }
147
+
148
+ export const MultiLine: Story = {
149
+ render: () => (
150
+ <Watermark
151
+ content={["Confidential", "anika.patel@stripe.com"]}
152
+ gap={[90, 80]}
153
+ >
154
+ <Card className="w-[28rem]">
155
+ <CardHeader>
156
+ <CardTitle>Per-viewer mark</CardTitle>
157
+ <CardDescription>
158
+ Array content renders stacked lines — the classic
159
+ classification-plus-identity pair.
160
+ </CardDescription>
161
+ </CardHeader>
162
+ <CardContent className="text-sm leading-relaxed text-muted-foreground">
163
+ Remember: the overlay is a visual cue, not a security control. The
164
+ DOM node is deletable and the content stays copyable by design.
165
+ </CardContent>
166
+ </Card>
167
+ </Watermark>
168
+ ),
169
+ }
170
+
171
+ export const RealisticUse: Story = {
172
+ render: () => (
173
+ <Watermark content="CONFIDENTIAL — internal pricing" rotate={-30}>
174
+ <Card className="w-[30rem]">
175
+ <CardHeader className="flex-row items-start justify-between space-y-0">
176
+ <div className="space-y-1">
177
+ <CardTitle>Invoice #2047</CardTitle>
178
+ <CardDescription>Issued 2026-05-26 · due 2026-06-25</CardDescription>
179
+ </div>
180
+ <Badge variant="secondary">Unpaid</Badge>
181
+ </CardHeader>
182
+ <CardContent className="space-y-4">
183
+ <DataList>
184
+ <DataListItem>
185
+ <DataListLabel>Billed to</DataListLabel>
186
+ <DataListValue>Jordan Reeves — jordan@reeves.design</DataListValue>
187
+ </DataListItem>
188
+ <DataListItem>
189
+ <DataListLabel>Line item</DataListLabel>
190
+ <DataListValue>Pro tier, annual (per seat)</DataListValue>
191
+ </DataListItem>
192
+ <DataListItem>
193
+ <DataListLabel>Amount</DataListLabel>
194
+ <DataListValue>$249.00</DataListValue>
195
+ </DataListItem>
196
+ <DataListItem>
197
+ <DataListLabel>Remit to</DataListLabel>
198
+ <DataListValue>
199
+ 1401 South Congress Ave, Suite 200, Austin, TX 78704
200
+ </DataListValue>
201
+ </DataListItem>
202
+ </DataList>
203
+ <p className="text-xs leading-relaxed text-muted-foreground">
204
+ Pricing terms on this invoice are pre-announcement. The watermark
205
+ overlay is aria-hidden and pointer-events-none, so screen readers
206
+ and text selection behave exactly as they would without it.
207
+ </p>
208
+ </CardContent>
209
+ </Card>
210
+ </Watermark>
211
+ ),
212
+ }
@@ -0,0 +1,101 @@
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+ import { WordRotate } from "@behavioral-agentic-design-system/core/components/ui/word-rotate"
3
+
4
+ const meta: Meta<typeof WordRotate> = {
5
+ title: "Components/WordRotate",
6
+ component: WordRotate,
7
+ parameters: {
8
+ layout: "centered",
9
+ docs: {
10
+ description: {
11
+ component:
12
+ "Cycles an array of words in place with a slide-fade exit/entrance. Zero dependencies — pure CSS transitions using var(--duration-base) + var(--ease-out). Reduced-motion safe via the base layer. Announced via aria-live=\"polite\" on each swap.",
13
+ },
14
+ },
15
+ },
16
+ argTypes: {
17
+ interval: { control: { type: "number", min: 500, step: 500 } },
18
+ },
19
+ }
20
+ export default meta
21
+ type Story = StoryObj<typeof WordRotate>
22
+
23
+ export const Default: Story = {
24
+ render: () => (
25
+ <p className="text-2xl font-semibold text-foreground">
26
+ Design systems that are{" "}
27
+ <WordRotate words={["accessible", "beautiful", "consistent"]} />
28
+ </p>
29
+ ),
30
+ }
31
+
32
+ export const FastInterval: Story = {
33
+ render: () => (
34
+ <p className="text-2xl font-semibold text-foreground">
35
+ Status:{" "}
36
+ <WordRotate
37
+ words={["building", "testing", "shipping"]}
38
+ interval={1000}
39
+ className="text-primary"
40
+ />
41
+ </p>
42
+ ),
43
+ }
44
+
45
+ export const SlowInterval: Story = {
46
+ render: () => (
47
+ <p className="text-2xl font-semibold text-foreground">
48
+ Designed for{" "}
49
+ <WordRotate
50
+ words={["founders", "engineers", "designers", "operators"]}
51
+ interval={3000}
52
+ />
53
+ </p>
54
+ ),
55
+ }
56
+
57
+ export const SingleWord: Story = {
58
+ render: () => (
59
+ // words.length === 1: no interval fires, word is static — correct for
60
+ // cases where the word list is dynamically derived and might have 1 item.
61
+ <p className="text-2xl font-semibold text-foreground">
62
+ Built for{" "}
63
+ <WordRotate words={["scale"]} />
64
+ </p>
65
+ ),
66
+ }
67
+
68
+ export const RealisticUse: Story = {
69
+ render: () => (
70
+ <div className="flex max-w-lg flex-col gap-6 rounded-lg border border-border bg-card p-8">
71
+ <div className="flex flex-col gap-2">
72
+ <p className="text-xs font-medium uppercase tracking-widest text-muted-foreground">
73
+ BADS design system
74
+ </p>
75
+ <h2 className="text-3xl font-bold text-card-foreground">
76
+ Ship{" "}
77
+ <WordRotate
78
+ words={["faster", "smarter", "cleaner"]}
79
+ className="text-primary"
80
+ />
81
+ <br />
82
+ with every client.
83
+ </h2>
84
+ <p className="text-sm text-muted-foreground">
85
+ A portable, accessible-by-default design system that accelerates every
86
+ engagement from day one — Jordan Reeves, design.bads.com.
87
+ </p>
88
+ </div>
89
+ <button
90
+ type="button"
91
+ className="inline-flex min-h-11 items-center justify-center rounded-md bg-primary px-6 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90"
92
+ style={{
93
+ transitionDuration: "var(--duration-fast)",
94
+ transitionTimingFunction: "var(--ease-out)",
95
+ }}
96
+ >
97
+ Start your fork
98
+ </button>
99
+ </div>
100
+ ),
101
+ }
package/src/styles.css CHANGED
@@ -53,7 +53,7 @@
53
53
  /* Brand sans from tokens.json leads. Atkinson Hyperlegible (loaded via the
54
54
  Google Fonts @import above) is the canonical fallback so unbranded
55
55
  consumers still get a high-legibility face out of the box. */
56
- --font-sans: 'Inter', 'Hyperlegible Sans', ui-sans-serif, sans-serif, system-ui, 'Atkinson Hyperlegible', ui-sans-serif, sans-serif, system-ui;
56
+ --font-sans: 'Hyperlegible Sans', 'Inter', ui-sans-serif, sans-serif, system-ui, 'Atkinson Hyperlegible', ui-sans-serif, sans-serif, system-ui;
57
57
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
58
58
  --font-serif: ui-serif, Georgia, serif;
59
59
  --font-variation-settings: normal;
@@ -340,6 +340,11 @@
340
340
  size / weight axes without touching component source. "normal" is a
341
341
  no-op for static fonts. */
342
342
  font-variation-settings: var(--font-variation-settings, normal);
343
+ /* Enable opsz axis on variable fonts (Inter ships opsz 14–32). Without
344
+ this, browser behavior is implementation-defined and silently inconsistent
345
+ across engines; forks that swap in a different variable font may not
346
+ inherit the setting. */
347
+ font-optical-sizing: auto;
343
348
  }
344
349
  /* Match: monospace elements pick up --font-mono without each component
345
350
  having to remember a `font-mono` class. */
@@ -402,11 +407,31 @@
402
407
  /* WCAG AAA 2.3.3 Animation from Interactions: respect the user's
403
408
  reduced-motion preference globally. Components with essential
404
409
  motion (loading spinners, progress bars) opt back in via
405
- `motion-safe:` Tailwind utilities or scoped @media queries. */
410
+ `motion-safe:` Tailwind utilities or scoped @media queries.
411
+
412
+ Three-state model, driven by the optional `data-motion` attribute the
413
+ MotionToggle primitive sets on <html> (opt-in — no attribute is the
414
+ default and behaves exactly as an OS-only reduce query):
415
+ • `data-motion="reduce"` → force motion OFF regardless of OS.
416
+ • `data-motion="full"` → force motion ON even if the OS prefers
417
+ reduce (some users set OS reduce globally
418
+ but trust a given site with motion).
419
+ • absent (`system`) → the OS media query governs, as before.
420
+ The OS query below is gated on `:not([data-motion="full"])` so "full"
421
+ can override it; the attribute rule above wins on specificity for
422
+ "reduce". */
423
+ html[data-motion="reduce"] *,
424
+ html[data-motion="reduce"] *::before,
425
+ html[data-motion="reduce"] *::after {
426
+ animation-duration: 0.01ms !important;
427
+ animation-iteration-count: 1 !important;
428
+ transition-duration: 0.01ms !important;
429
+ scroll-behavior: auto !important;
430
+ }
406
431
  @media (prefers-reduced-motion: reduce) {
407
- *,
408
- *::before,
409
- *::after {
432
+ html:not([data-motion="full"]) *,
433
+ html:not([data-motion="full"]) *::before,
434
+ html:not([data-motion="full"]) *::after {
410
435
  animation-duration: 0.01ms !important;
411
436
  animation-iteration-count: 1 !important;
412
437
  transition-duration: 0.01ms !important;
@@ -572,12 +597,69 @@ html, body {
572
597
  animation: accordion-up var(--duration-base) var(--ease-out);
573
598
  }
574
599
 
600
+ /* Marquee continuous-scroll keyframe — applied via data-slot selectors
601
+ (spec §4 pattern (b): plain CSS in the design-system layer, no Tailwind
602
+ utility generation in the path). The track holds 2×K identical groups,
603
+ so translateX(-50%) is always exactly one loop — seamless at any width.
604
+
605
+ - "linear" timing is a seamless-loop REQUIREMENT, not a style choice:
606
+ any easing curve pulses at the loop seam.
607
+ - --marquee-duration is the consumer tunable (the component computes it
608
+ from the `speed` prop in px/s and writes it inline; a consumer style
609
+ override wins). --marquee-gap tunes item density.
610
+ - Pausing (SC 2.2.2 Pause, Stop, Hide): hover, focus-within, and the
611
+ component's visible control (data-state="paused") all pause playback.
612
+ - Reduced motion: the base layer already forces animation-duration to
613
+ 0.01ms with iteration-count 1, which halts the strip; the explicit
614
+ play-state rule below is belt-and-suspenders and self-documenting. */
615
+ @keyframes marquee-scroll {
616
+ from { transform: translateX(0); }
617
+ to { transform: translateX(-50%); }
618
+ }
619
+ [data-slot="marquee-track"] {
620
+ animation: marquee-scroll var(--marquee-duration, 30s) linear infinite;
621
+ }
622
+ [data-slot="marquee-track"][data-direction="right"] {
623
+ animation-direction: reverse;
624
+ }
625
+ [data-slot="marquee-group"] {
626
+ display: flex;
627
+ align-items: center;
628
+ gap: var(--marquee-gap, 3rem);
629
+ padding-inline-end: var(--marquee-gap, 3rem);
630
+ }
631
+ [data-slot="marquee"][data-state="paused"] [data-slot="marquee-track"],
632
+ [data-slot="marquee"]:hover [data-slot="marquee-track"],
633
+ [data-slot="marquee"]:focus-within [data-slot="marquee-track"] {
634
+ animation-play-state: paused;
635
+ }
636
+ [data-slot="marquee-viewport"][data-fade] {
637
+ -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
638
+ mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
639
+ }
640
+ @media (prefers-reduced-motion: reduce) {
641
+ [data-slot="marquee-track"] { animation-play-state: paused; }
642
+ }
643
+
644
+ /* TypingIndicator — three-dot is-typing animation. Dots bob on a staggered
645
+ delay applied via inline style per dot (pattern b keyframe + pattern c
646
+ animationDelay). Reduced-motion base layer forces duration to 0.01ms. */
647
+ @keyframes typing-dot {
648
+ 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
649
+ 30% { transform: translateY(-4px); opacity: 1; }
650
+ }
651
+
575
652
  ::view-transition-new(root) {
576
653
  animation: theme-reveal 0.4s ease-in-out forwards;
577
654
  }
578
655
 
656
+ /* Honor the app-level MotionToggle for the iris wipe too (same three-state
657
+ model as the global kill-all). "reduce" snaps the theme swap instantly;
658
+ "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
+ html[data-motion="reduce"]::view-transition-new(root) { animation: none; }
579
661
  @media (prefers-reduced-motion: reduce) {
580
- ::view-transition-new(root) { animation: none; }
662
+ html:not([data-motion="full"])::view-transition-new(root) { animation: none; }
581
663
  }
582
664
 
583
665
  @layer utilities {
package/src/tokens.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://tokens.studio/schema/draft.json",
2
+ "$schema": "https://www.designtokens.org/tr/drafts/format/",
3
3
  "version": "0.2.0",
4
4
  "color": {
5
5
  "primitive": {
@@ -158,9 +158,9 @@
158
158
  },
159
159
  "fontFamily": {
160
160
  "sans": {
161
- "$value": "'Inter', 'Hyperlegible Sans', ui-sans-serif, sans-serif, system-ui",
161
+ "$value": "'Hyperlegible Sans', 'Inter', ui-sans-serif, sans-serif, system-ui",
162
162
  "$type": "fontFamily",
163
- "$description": "Primary sans (body, UI). Inter Variable is the BADS default — a single variable woff2 covers weights 100–900, enabling responsive type axes and per-fork weight tuning via --font-variation-settings. Hyperlegible Sans (the Braille Institute's low-vision face) stays second in the stack as the accessibility-preserving fallback and is still self-hosted. ACCESSIBILITY NOTE: forks with a low-vision-heavy audience should reorder to lead with 'Hyperlegible Sans'. Override per client."
163
+ "$description": "Primary sans (body, UI). Hyperlegible Sans (the Braille Institute's low-vision face) is the BADS default — an accessibility-first letterform with disambiguated glyphs, self-hosted via fonts.css (6 static weights). Inter Variable stays second in the stack as a fallback for forks that want a single variable woff2 covering weights 100–900 with responsive type axes; reorder to lead with 'Inter' per client if that's the priority. Override per client."
164
164
  },
165
165
  "serif": {
166
166
  "$value": "ui-serif, Georgia, serif",