@behavioral-agentic-design-system/core 0.26.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.
@@ -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
@@ -641,6 +641,14 @@ html, body {
641
641
  [data-slot="marquee-track"] { animation-play-state: paused; }
642
642
  }
643
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
+
644
652
  ::view-transition-new(root) {
645
653
  animation: theme-reveal 0.4s ease-in-out forwards;
646
654
  }
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": {