@behavioral-agentic-design-system/core 0.45.0 → 0.48.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 (240) hide show
  1. package/package.json +17 -3
  2. package/scripts/a11y-lint.cjs +78 -15
  3. package/scripts/bads-sync.mjs +1 -1
  4. package/scripts/build-tokens.cjs +122 -7
  5. package/scripts/check-dark-contrast.mjs +204 -0
  6. package/scripts/check-flush-edges.mjs +245 -0
  7. package/scripts/design-system-advisory/README.md +239 -0
  8. package/scripts/design-system-advisory/check-copy-punctuation.mjs +44 -0
  9. package/scripts/design-system-advisory/check-even-padding.mjs +35 -0
  10. package/scripts/design-system-advisory/check-hand-built-button.mjs +46 -0
  11. package/scripts/design-system-advisory/check-html-nesting.mjs +51 -0
  12. package/scripts/design-system-advisory/check-icon-sizing.mjs +79 -0
  13. package/scripts/design-system-advisory/check-label-case.mjs +92 -0
  14. package/scripts/design-system-advisory/check-native-form-controls.mjs +53 -0
  15. package/scripts/design-system-advisory/check-radius.mjs +56 -0
  16. package/scripts/design-system-advisory/check-raw-values.mjs +61 -0
  17. package/scripts/design-system-advisory/check-small-text.mjs +72 -0
  18. package/scripts/design-system-advisory/check-tap-target.mjs +70 -0
  19. package/scripts/design-system-advisory/defaults.mjs +90 -0
  20. package/scripts/design-system-advisory/fixtures/clean.tsx.fixture +12 -0
  21. package/scripts/design-system-advisory/fixtures/violations.tsx.fixture +19 -0
  22. package/scripts/design-system-advisory/lib.mjs +255 -0
  23. package/scripts/design-system-advisory/run.mjs +189 -0
  24. package/scripts/design-system-advisory/workflow.yml +82 -0
  25. package/scripts/lib/copy-strings.mjs +146 -0
  26. package/scripts/lib/dark-contrast.mjs +120 -0
  27. package/scripts/lib/flush-edges.mjs +294 -0
  28. package/scripts/lib/lab-lint.mjs +62 -0
  29. package/scripts/lib/mount-page.mjs +25 -0
  30. package/scripts/lib/source-scan.mjs +173 -0
  31. package/scripts/lib/tells.mjs +240 -2
  32. package/scripts/lint-arbitrary-tokens.mjs +47 -0
  33. package/scripts/lint-component-token-refs.mjs +63 -0
  34. package/scripts/lint-content-hierarchy.mjs +114 -0
  35. package/scripts/lint-control-baseline.mjs +72 -0
  36. package/scripts/lint-copy-punctuation.mjs +60 -0
  37. package/scripts/lint-even-padding.mjs +58 -0
  38. package/scripts/lint-label-case.mjs +219 -0
  39. package/scripts/lint-microanimation.mjs +2 -2
  40. package/scripts/lint-proximity.mjs +181 -0
  41. package/scripts/lint-slop.mjs +1 -1
  42. package/scripts/lint-spacing-scale.mjs +78 -0
  43. package/scripts/lint-target-size.cjs +132 -0
  44. package/scripts/lint-token-primitives.mjs +307 -0
  45. package/scripts/size-audit.cjs +2 -2
  46. package/scripts/ux-tells.mjs +8 -6
  47. package/scripts/wcag-audit.cjs +25 -4
  48. package/src/api/layers/file.ts +2 -0
  49. package/src/api/site-auth.ts +14 -2
  50. package/src/app/preview/components/page.tsx +183 -14
  51. package/src/app/preview/sticker-sheet/page.tsx +329 -0
  52. package/src/app/preview/sticker-sheet/specimens.tsx +296 -0
  53. package/src/app/shell.tsx +4 -3
  54. package/src/components/Foundations/Colors.stories.tsx +119 -8
  55. package/src/components/home-tab.tsx +6 -1
  56. package/src/components/onboarding-wizard.tsx +1 -1
  57. package/src/components/ui/avatar.tsx +4 -0
  58. package/src/components/ui/chart.tsx +134 -42
  59. package/src/components/ui/checkbox-group.tsx +1 -1
  60. package/src/components/ui/checkbox.tsx +1 -1
  61. package/src/components/ui/combobox.tsx +1 -0
  62. package/src/components/ui/command.tsx +1 -1
  63. package/src/components/ui/date-picker.tsx +2 -0
  64. package/src/components/ui/date-range-picker.tsx +4 -0
  65. package/src/components/ui/file-upload.tsx +21 -2
  66. package/src/components/ui/heatmap.tsx +3 -1
  67. package/src/components/ui/input-group.tsx +5 -2
  68. package/src/components/ui/multi-select.tsx +1 -0
  69. package/src/components/ui/number-field.tsx +390 -0
  70. package/src/components/ui/radio-group.tsx +2 -2
  71. package/src/components/ui/sparkline.tsx +33 -4
  72. package/src/components/ui/spinner.tsx +23 -4
  73. package/src/components/ui/table.tsx +9 -0
  74. package/src/components/ui/week-picker.tsx +0 -12
  75. package/src/data/component-added.json +12 -0
  76. package/src/data/docs-index.ts +22 -1
  77. package/src/data/history.json +162 -162
  78. package/src/data/sticker-sheet.json +9297 -0
  79. package/src/docs-trace-globs.json +1 -0
  80. package/src/lib/chart-motion.ts +41 -0
  81. package/src/lib/get-icon-color.ts +1 -1
  82. package/src/stories/Accordion.stories.tsx +7 -0
  83. package/src/stories/ActionBar.stories.tsx +5 -0
  84. package/src/stories/Affix.stories.tsx +4 -0
  85. package/src/stories/AiBadge.stories.tsx +9 -7
  86. package/src/stories/Alert.stories.tsx +13 -0
  87. package/src/stories/AlertDialog.stories.tsx +4 -0
  88. package/src/stories/Anchor.stories.tsx +5 -0
  89. package/src/stories/AngleSlider.stories.tsx +6 -3
  90. package/src/stories/AspectRatio.stories.tsx +4 -0
  91. package/src/stories/Autocomplete.stories.tsx +6 -0
  92. package/src/stories/Avatar.stories.tsx +10 -0
  93. package/src/stories/Badge.stories.tsx +14 -6
  94. package/src/stories/Blockquote.stories.tsx +6 -0
  95. package/src/stories/BottomNavigation.stories.tsx +4 -0
  96. package/src/stories/Breadcrumb.stories.tsx +3 -0
  97. package/src/stories/Burger.stories.tsx +1 -0
  98. package/src/stories/Button.stories.tsx +24 -0
  99. package/src/stories/ButtonGroup.stories.tsx +9 -0
  100. package/src/stories/Calendar.stories.tsx +3 -0
  101. package/src/stories/Card.stories.tsx +4 -0
  102. package/src/stories/Carousel.stories.tsx +6 -0
  103. package/src/stories/Cascader.stories.tsx +4 -0
  104. package/src/stories/Chart.stories.tsx +46 -1
  105. package/src/stories/ChatBubble.stories.tsx +8 -2
  106. package/src/stories/ChatMarker.stories.tsx +1 -0
  107. package/src/stories/Checkbox.stories.tsx +40 -0
  108. package/src/stories/CheckboxCard.stories.tsx +8 -0
  109. package/src/stories/CheckboxGroup.stories.tsx +20 -0
  110. package/src/stories/Chip.stories.tsx +10 -19
  111. package/src/stories/CircularProgress.stories.tsx +13 -27
  112. package/src/stories/Clipboard.stories.tsx +6 -0
  113. package/src/stories/CloseButton.stories.tsx +6 -4
  114. package/src/stories/Code.stories.tsx +8 -1
  115. package/src/stories/Collapsible.stories.tsx +2 -0
  116. package/src/stories/ColorPicker.stories.tsx +6 -0
  117. package/src/stories/ColorSwatch.stories.tsx +1 -0
  118. package/src/stories/Combobox.stories.tsx +9 -0
  119. package/src/stories/Command.stories.tsx +2 -0
  120. package/src/stories/Container.stories.tsx +8 -0
  121. package/src/stories/ContextMenu.stories.tsx +9 -0
  122. package/src/stories/CopyButton.stories.tsx +12 -36
  123. package/src/stories/DataList.stories.tsx +8 -0
  124. package/src/stories/DataTable.stories.tsx +9 -0
  125. package/src/stories/DateField.stories.tsx +7 -0
  126. package/src/stories/DatePicker.stories.tsx +34 -0
  127. package/src/stories/DateRangePicker.stories.tsx +32 -0
  128. package/src/stories/Dialog.stories.tsx +8 -0
  129. package/src/stories/Drawer.stories.tsx +6 -0
  130. package/src/stories/DropdownMenu.stories.tsx +2 -0
  131. package/src/stories/Editable.stories.tsx +10 -0
  132. package/src/stories/EmptyState.stories.tsx +9 -0
  133. package/src/stories/Field.stories.tsx +7 -0
  134. package/src/stories/Fieldset.stories.tsx +8 -0
  135. package/src/stories/FileButton.stories.tsx +4 -0
  136. package/src/stories/FileUpload.stories.tsx +16 -17
  137. package/src/stories/FloatLabel.stories.tsx +3 -8
  138. package/src/stories/FloatingActionButton.stories.tsx +10 -0
  139. package/src/stories/FloatingIndicator.stories.tsx +4 -0
  140. package/src/stories/FloatingPanel.stories.tsx +6 -0
  141. package/src/stories/FocusTrap.stories.tsx +5 -0
  142. package/src/stories/FormatByte.stories.tsx +6 -0
  143. package/src/stories/FormatDate.stories.tsx +8 -0
  144. package/src/stories/FormatNumber.stories.tsx +9 -0
  145. package/src/stories/Heatmap.stories.tsx +11 -0
  146. package/src/stories/Highlight.stories.tsx +6 -0
  147. package/src/stories/HoverCard.stories.tsx +4 -0
  148. package/src/stories/Image.stories.tsx +9 -0
  149. package/src/stories/Indicator.stories.tsx +19 -0
  150. package/src/stories/Input.stories.tsx +7 -0
  151. package/src/stories/InputClearButton.stories.tsx +3 -0
  152. package/src/stories/InputGroup.stories.tsx +40 -0
  153. package/src/stories/Kbd.stories.tsx +7 -1
  154. package/src/stories/KeyboardShortcut.stories.tsx +2 -0
  155. package/src/stories/Label.stories.tsx +2 -0
  156. package/src/stories/Link.stories.tsx +9 -0
  157. package/src/stories/List.stories.tsx +8 -0
  158. package/src/stories/Listbox.stories.tsx +1 -0
  159. package/src/stories/LoadingDots.stories.tsx +5 -3
  160. package/src/stories/LoadingOverlay.stories.tsx +5 -1
  161. package/src/stories/Mark.stories.tsx +5 -0
  162. package/src/stories/Marquee.stories.tsx +4 -0
  163. package/src/stories/Masonry.stories.tsx +5 -0
  164. package/src/stories/Menubar.stories.tsx +3 -0
  165. package/src/stories/Meter.stories.tsx +11 -17
  166. package/src/stories/MonthPicker.stories.tsx +5 -1
  167. package/src/stories/MotionToggle.stories.tsx +1 -0
  168. package/src/stories/MultiSelect.stories.tsx +9 -0
  169. package/src/stories/NativeSelect.stories.tsx +1 -0
  170. package/src/stories/NavLink.stories.tsx +7 -0
  171. package/src/stories/NavigationMenu.stories.tsx +5 -0
  172. package/src/stories/NavigationRail.stories.tsx +10 -0
  173. package/src/stories/Notification.stories.tsx +13 -34
  174. package/src/stories/NumberField.stories.tsx +214 -0
  175. package/src/stories/NumberInput.stories.tsx +8 -1
  176. package/src/stories/Overlay.stories.tsx +5 -1
  177. package/src/stories/Pagination.stories.tsx +8 -0
  178. package/src/stories/PasswordInput.stories.tsx +2 -0
  179. package/src/stories/PinInput.stories.tsx +9 -2
  180. package/src/stories/Popover.stories.tsx +2 -0
  181. package/src/stories/Progress.stories.tsx +6 -1
  182. package/src/stories/Prose.stories.tsx +8 -0
  183. package/src/stories/QrCode.stories.tsx +2 -0
  184. package/src/stories/Questionnaire.stories.tsx +7 -0
  185. package/src/stories/RadioGroup.stories.tsx +40 -0
  186. package/src/stories/RatingGroup.stories.tsx +8 -4
  187. package/src/stories/Resizable.stories.tsx +4 -2
  188. package/src/stories/Result.stories.tsx +3 -0
  189. package/src/stories/Reveal.stories.tsx +2 -0
  190. package/src/stories/RollingNumber.stories.tsx +5 -0
  191. package/src/stories/ScrollArea.stories.tsx +3 -1
  192. package/src/stories/SearchInput.stories.tsx +8 -6
  193. package/src/stories/SegmentedControl.stories.tsx +11 -0
  194. package/src/stories/Select.stories.tsx +7 -0
  195. package/src/stories/Separator.stories.tsx +6 -0
  196. package/src/stories/Sheet.stories.tsx +5 -0
  197. package/src/stories/Sidebar.stories.tsx +40 -1
  198. package/src/stories/SimpleGrid.stories.tsx +5 -0
  199. package/src/stories/Skeleton.stories.tsx +8 -0
  200. package/src/stories/SkeletonTable.stories.tsx +6 -5
  201. package/src/stories/SkipLink.stories.tsx +3 -0
  202. package/src/stories/Slider.stories.tsx +2 -1
  203. package/src/stories/Sonner.stories.tsx +7 -0
  204. package/src/stories/Sparkline.stories.tsx +14 -1
  205. package/src/stories/Spinner.stories.tsx +20 -10
  206. package/src/stories/Spoiler.stories.tsx +5 -0
  207. package/src/stories/Squircle.stories.tsx +7 -0
  208. package/src/stories/Stack.stories.tsx +7 -0
  209. package/src/stories/StatusBadge.stories.tsx +12 -6
  210. package/src/stories/Stepper.stories.tsx +5 -0
  211. package/src/stories/Switch.stories.tsx +4 -0
  212. package/src/stories/Table.stories.tsx +10 -1
  213. package/src/stories/Tabs.stories.tsx +8 -0
  214. package/src/stories/Tag.stories.tsx +13 -5
  215. package/src/stories/TagsInput.stories.tsx +13 -0
  216. package/src/stories/Text.stories.tsx +12 -0
  217. package/src/stories/Textarea.stories.tsx +9 -0
  218. package/src/stories/ThemeIcon.stories.tsx +6 -3
  219. package/src/stories/TimePicker.stories.tsx +2 -0
  220. package/src/stories/Timeline.stories.tsx +12 -0
  221. package/src/stories/Timer.stories.tsx +4 -0
  222. package/src/stories/Toggle.stories.tsx +7 -5
  223. package/src/stories/ToggleGroup.stories.tsx +5 -0
  224. package/src/stories/ToggleTip.stories.tsx +4 -0
  225. package/src/stories/Toolbar.stories.tsx +6 -0
  226. package/src/stories/Tooltip.stories.tsx +3 -0
  227. package/src/stories/Tour.stories.tsx +3 -0
  228. package/src/stories/TransferList.stories.tsx +3 -0
  229. package/src/stories/TreeSelect.stories.tsx +4 -0
  230. package/src/stories/TreeView.stories.tsx +5 -0
  231. package/src/stories/TypingIndicator.stories.tsx +4 -0
  232. package/src/stories/VisuallyHidden.stories.tsx +3 -0
  233. package/src/stories/Watermark.stories.tsx +6 -0
  234. package/src/stories/WeekPicker.stories.tsx +4 -1
  235. package/src/stories/WordRotate.stories.tsx +5 -0
  236. package/src/stories/YearPicker.stories.tsx +5 -11
  237. package/src/stories/story-groups.json +2 -1
  238. package/src/styles.css +50 -2
  239. package/src/tokens.json +4 -4
  240. package/LICENSE +0 -21
@@ -22,6 +22,7 @@ type Story = StoryObj<typeof meta>;
22
22
 
23
23
  /** Default inactive link — Dashboard in Jordan Reeves's BADS workspace. */
24
24
  export const Default: Story = {
25
+ parameters: { controls: { disable: true } },
25
26
  render: () => (
26
27
  <div className="w-60">
27
28
  <NavLink href="/dashboard" icon={<LayoutDashboard aria-hidden="true" />}>
@@ -37,6 +38,7 @@ export const Default: Story = {
37
38
  * toggling: the active mark survives SSR and static export.
38
39
  */
39
40
  export const Active: Story = {
41
+ parameters: { controls: { disable: true } },
40
42
  render: () => (
41
43
  <div className="w-60">
42
44
  <NavLink
@@ -56,6 +58,7 @@ export const Active: Story = {
56
58
  * Counts that lack visible label text should carry `aria-label`.
57
59
  */
58
60
  export const WithBadge: Story = {
61
+ parameters: { controls: { disable: true } },
59
62
  render: () => (
60
63
  <div className="w-60 space-y-1">
61
64
  <NavLink
@@ -97,6 +100,7 @@ export const WithBadge: Story = {
97
100
  * convey hierarchy. No JavaScript state: the indent is a layout-only signal.
98
101
  */
99
102
  export const Nested: Story = {
103
+ parameters: { controls: { disable: true } },
100
104
  render: () => (
101
105
  <div className="w-60 space-y-0.5">
102
106
  <NavLink href="/reports" icon={<BarChart3 aria-hidden="true" />}>
@@ -122,6 +126,7 @@ export const Nested: Story = {
122
126
  * slots are injected as children of the merged element via Slottable.
123
127
  */
124
128
  export const AsChild: Story = {
129
+ parameters: { controls: { disable: true } },
125
130
  render: () => (
126
131
  <div className="w-60 space-y-0.5">
127
132
  {/* Simulated with a plain <a> — in a Next.js app replace with <NextLink> */}
@@ -141,6 +146,7 @@ export const AsChild: Story = {
141
146
  * consider whether removing the item entirely is clearer.
142
147
  */
143
148
  export const Disabled: Story = {
149
+ parameters: { controls: { disable: true } },
144
150
  render: () => (
145
151
  <div className="w-60 space-y-0.5">
146
152
  <NavLink href="/dashboard" icon={<LayoutDashboard aria-hidden="true" />}>
@@ -163,6 +169,7 @@ export const Disabled: Story = {
163
169
  * nested sub-items expanded inline.
164
170
  */
165
171
  export const RealisticUse: Story = {
172
+ parameters: { controls: { disable: true } },
166
173
  render: () => (
167
174
  <nav
168
175
  aria-label="Main navigation — BADS workspace"
@@ -63,6 +63,7 @@ const ListItem = ({
63
63
  );
64
64
 
65
65
  export const Default: Story = {
66
+ parameters: { controls: { disable: true } },
66
67
  render: () => (
67
68
  <NavigationMenu>
68
69
  <NavigationMenuList>
@@ -129,6 +130,7 @@ export const Default: Story = {
129
130
  };
130
131
 
131
132
  export const SimpleLinks: Story = {
133
+ parameters: { controls: { disable: true } },
132
134
  render: () => (
133
135
  <NavigationMenu>
134
136
  <NavigationMenuList>
@@ -170,6 +172,7 @@ export const SimpleLinks: Story = {
170
172
  };
171
173
 
172
174
  export const WithTriggerAndLinks: Story = {
175
+ parameters: { controls: { disable: true } },
173
176
  render: () => (
174
177
  <NavigationMenu>
175
178
  <NavigationMenuList>
@@ -211,6 +214,7 @@ export const WithTriggerAndLinks: Story = {
211
214
  };
212
215
 
213
216
  export const WithIndicator: Story = {
217
+ parameters: { controls: { disable: true } },
214
218
  render: () => (
215
219
  <NavigationMenu>
216
220
  <NavigationMenuList>
@@ -257,6 +261,7 @@ export const WithIndicator: Story = {
257
261
  };
258
262
 
259
263
  export const RealisticUse: Story = {
264
+ parameters: { controls: { disable: true } },
260
265
  render: () => (
261
266
  <div className="w-full max-w-4xl rounded-md border bg-background p-3">
262
267
  <div className="flex items-center justify-between">
@@ -49,6 +49,7 @@ function Frame({ children }: { children: React.ReactNode }) {
49
49
  }
50
50
 
51
51
  export const Default: Story = {
52
+ parameters: { controls: { disable: true } },
52
53
  render: () => (
53
54
  <Frame>
54
55
  <NavigationRail defaultValue="dashboard" label="Primary">
@@ -83,6 +84,7 @@ export const Default: Story = {
83
84
  };
84
85
 
85
86
  export const Expanded: Story = {
87
+ parameters: { controls: { disable: true } },
86
88
  render: () => (
87
89
  <Frame>
88
90
  <NavigationRail defaultValue="components" expanded label="Design system">
@@ -112,6 +114,7 @@ export const Expanded: Story = {
112
114
  };
113
115
 
114
116
  export const WithBadge: Story = {
117
+ parameters: { controls: { disable: true } },
115
118
  render: () => (
116
119
  <Frame>
117
120
  <NavigationRail defaultValue="home" label="Primary">
@@ -140,6 +143,7 @@ export const WithBadge: Story = {
140
143
  };
141
144
 
142
145
  export const Disabled: Story = {
146
+ parameters: { controls: { disable: true } },
143
147
  render: () => (
144
148
  <Frame>
145
149
  <NavigationRail defaultValue="home" label="Primary">
@@ -165,6 +169,7 @@ export const Disabled: Story = {
165
169
  };
166
170
 
167
171
  export const WithHeader: Story = {
172
+ parameters: { controls: { disable: true } },
168
173
  render: () => (
169
174
  <Frame>
170
175
  <NavigationRail defaultValue="components" label="Design system">
@@ -197,6 +202,7 @@ export const WithHeader: Story = {
197
202
  };
198
203
 
199
204
  export const WithFooter: Story = {
205
+ parameters: { controls: { disable: true } },
200
206
  render: () => (
201
207
  <Frame>
202
208
  <NavigationRail defaultValue="home" label="Primary">
@@ -230,6 +236,7 @@ export const WithFooter: Story = {
230
236
  // Each destination shown in its active state — the accent pill + semibold
231
237
  // label + icon lift that signal aria-current="page" (never color alone).
232
238
  export const ActiveItem: Story = {
239
+ parameters: { controls: { disable: true } },
233
240
  render: () => (
234
241
  <div className="flex gap-4">
235
242
  {["home", "analytics", "team"].map((active) => (
@@ -266,6 +273,7 @@ export const ActiveItem: Story = {
266
273
  */
267
274
  export const AllVariants: Story = {
268
275
  tags: ["!manifest"],
276
+ parameters: { controls: { disable: true } },
269
277
  render: () => (
270
278
  <div className="flex items-start gap-6">
271
279
  <div className="space-y-2">
@@ -317,6 +325,7 @@ export const AllVariants: Story = {
317
325
  };
318
326
 
319
327
  export const Minimal: Story = {
328
+ parameters: { controls: { disable: true } },
320
329
  render: () => (
321
330
  <Frame>
322
331
  <NavigationRail defaultValue="home" label="Primary">
@@ -344,6 +353,7 @@ export const Minimal: Story = {
344
353
  // content region beside it. Content pulled from content/personas/bads.json
345
354
  // (design-system practitioner audience — Jordan Reeves, design.bads.com).
346
355
  export const RealisticUse: Story = {
356
+ parameters: { controls: { disable: true } },
347
357
  render: () => {
348
358
  const [section, setSection] = React.useState("dashboard");
349
359
  const screens: Record<string, { title: string; body: string }> = {
@@ -35,35 +35,19 @@ export default meta;
35
35
  type Story = StoryObj<typeof meta>;
36
36
 
37
37
  export const Default: Story = {
38
- render: () => (
39
- <Notification
40
- title="Chromatic baseline updated"
41
- description="4 visual changes are ready to review on the tokens-v2-proposal branch."
42
- />
43
- ),
38
+ args: { title: "Chromatic baseline updated", description: "4 visual changes are ready to review on the tokens-v2-proposal branch." },
44
39
  };
45
40
 
46
41
  export const Unread: Story = {
47
- render: () => (
48
- <Notification
49
- unread
50
- title="Jordan Reeves mentioned you"
51
- description="“Can you confirm the 7:1 pair on the new success accent before I merge?”"
52
- />
53
- ),
42
+ args: { unread: true, title: "Jordan Reeves mentioned you", description: "“Can you confirm the 7:1 pair on the new success accent before I merge?”" },
54
43
  };
55
44
 
56
45
  export const WithTimestamp: Story = {
57
- render: () => (
58
- <Notification
59
- title="Story coverage report ready"
60
- description="Coverage is at 98.4% after last night's build pass."
61
- timestamp="2 min ago"
62
- />
63
- ),
46
+ args: { title: "Story coverage report ready", description: "Coverage is at 98.4% after last night's build pass.", timestamp: "2 min ago" },
64
47
  };
65
48
 
66
49
  export const WithIcon: Story = {
50
+ parameters: { controls: { disable: true } },
67
51
  render: () => (
68
52
  <Notification
69
53
  icon={<GitPullRequest strokeWidth={1.5} />}
@@ -75,16 +59,11 @@ export const WithIcon: Story = {
75
59
  };
76
60
 
77
61
  export const Loading: Story = {
78
- render: () => (
79
- <Notification
80
- loading
81
- title="Publishing tokens v2"
82
- description="Running pnpm build:tokens and pushing to the registry."
83
- />
84
- ),
62
+ args: { loading: true, title: "Publishing tokens v2", description: "Running pnpm build:tokens and pushing to the registry." },
85
63
  };
86
64
 
87
65
  export const Variant_Destructive: Story = {
66
+ parameters: { controls: { disable: true } },
88
67
  render: () => (
89
68
  <Notification
90
69
  variant="destructive"
@@ -97,6 +76,7 @@ export const Variant_Destructive: Story = {
97
76
  };
98
77
 
99
78
  export const Variant_Success: Story = {
79
+ parameters: { controls: { disable: true } },
100
80
  render: () => (
101
81
  <Notification
102
82
  variant="success"
@@ -109,6 +89,7 @@ export const Variant_Success: Story = {
109
89
  };
110
90
 
111
91
  export const Variant_Warning: Story = {
92
+ parameters: { controls: { disable: true } },
112
93
  render: () => (
113
94
  <Notification
114
95
  variant="warning"
@@ -121,6 +102,7 @@ export const Variant_Warning: Story = {
121
102
  };
122
103
 
123
104
  export const WithActions: Story = {
105
+ parameters: { controls: { disable: true } },
124
106
  render: () => (
125
107
  <Notification
126
108
  unread
@@ -169,6 +151,7 @@ function WithActionsAndDismissDemo() {
169
151
  // Tab order contract: the action button comes BEFORE the dismiss X (actions
170
152
  // live in the content column, dismiss is a later DOM sibling).
171
153
  export const WithActionsAndDismiss: Story = {
154
+ parameters: { controls: { disable: true } },
172
155
  render: () => <WithActionsAndDismissDemo />,
173
156
  };
174
157
 
@@ -199,7 +182,7 @@ function DismissibleDemo() {
199
182
 
200
183
  export const Dismissible: Story = {
201
184
  render: () => <DismissibleDemo />,
202
- parameters: {
185
+ parameters: { controls: { disable: true },
203
186
  a11y: {
204
187
  config: {
205
188
  rules: [
@@ -218,12 +201,7 @@ export const Dismissible: Story = {
218
201
  };
219
202
 
220
203
  export const NoTitle: Story = {
221
- render: () => (
222
- <Notification
223
- description="Seo-yun Park accepted your invite to the design-tokens workspace."
224
- timestamp="3 hrs ago"
225
- />
226
- ),
204
+ args: { description: "Seo-yun Park accepted your invite to the design-tokens workspace.", timestamp: "3 hrs ago" },
227
205
  };
228
206
 
229
207
  type FeedItem = {
@@ -313,5 +291,6 @@ function RealisticUseDemo() {
313
291
  }
314
292
 
315
293
  export const RealisticUse: Story = {
294
+ parameters: { controls: { disable: true } },
316
295
  render: () => <RealisticUseDemo />,
317
296
  };
@@ -0,0 +1,214 @@
1
+ // ring-[3px] advisory marker added to number-field.tsx (2026-11-11); story coverage unchanged.
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import * as React from "react";
4
+ import { NumberField } from "@behavioral-agentic-design-system/core/components/ui/number-field";
5
+
6
+ const meta: Meta<typeof NumberField> = {
7
+ title: "Components/Forms/NumberField",
8
+ component: NumberField,
9
+ parameters: { layout: "centered" },
10
+ tags: ["autodocs"],
11
+ };
12
+ export default meta;
13
+ type Story = StoryObj<typeof NumberField>;
14
+
15
+ // ─── Controlled wrapper ────────────────────────────────────────────────────────
16
+ function Controlled(props: Omit<React.ComponentProps<typeof NumberField>, "value" | "onChange">) {
17
+ const [value, setValue] = React.useState(props.defaultValue ?? 0);
18
+ return <NumberField {...props} value={value} onChange={setValue} />;
19
+ }
20
+
21
+ // ─── Default ──────────────────────────────────────────────────────────────────
22
+ export const Default: Story = {
23
+ parameters: { controls: { disable: true } },
24
+ render: () => (
25
+ <div className="w-64">
26
+ <Controlled label="Quantity" defaultValue={1} min={1} />
27
+ </div>
28
+ ),
29
+ };
30
+
31
+ // ─── Required ─────────────────────────────────────────────────────────────────
32
+ export const Required: Story = {
33
+ parameters: { controls: { disable: true } },
34
+ render: () => (
35
+ <div className="w-64">
36
+ <Controlled
37
+ label="Seat count"
38
+ required
39
+ defaultValue={1}
40
+ min={1}
41
+ max={50}
42
+ helperText="Maximum 50 seats per booking"
43
+ />
44
+ </div>
45
+ ),
46
+ };
47
+
48
+ // ─── With helper text ─────────────────────────────────────────────────────────
49
+ export const WithHelperText: Story = {
50
+ parameters: { controls: { disable: true } },
51
+ render: () => (
52
+ <div className="w-64">
53
+ <Controlled
54
+ label="Line spacing"
55
+ defaultValue={1.5}
56
+ step={0.1}
57
+ min={1}
58
+ max={3}
59
+ helperText="Recommended: 1.4–1.8 for body text"
60
+ />
61
+ </div>
62
+ ),
63
+ };
64
+
65
+ // ─── Error / invalid state ─────────────────────────────────────────────────────
66
+ export const Invalid: Story = {
67
+ parameters: { controls: { disable: true } },
68
+ render: () => (
69
+ <div className="w-64">
70
+ <Controlled
71
+ label="Stock quantity"
72
+ defaultValue={-1}
73
+ min={0}
74
+ errorMessage="Quantity cannot be negative"
75
+ />
76
+ </div>
77
+ ),
78
+ };
79
+
80
+ // ─── Disabled ─────────────────────────────────────────────────────────────────
81
+ export const Disabled: Story = {
82
+ parameters: { controls: { disable: true } },
83
+ render: () => (
84
+ <div className="w-64">
85
+ <Controlled label="Seat count" defaultValue={5} disabled />
86
+ </div>
87
+ ),
88
+ };
89
+
90
+ // ─── Size_Sm ──────────────────────────────────────────────────────────────────
91
+ export const Size_Sm: Story = {
92
+ parameters: { controls: { disable: true } },
93
+ render: () => (
94
+ <div className="w-64">
95
+ <Controlled label="Quantity" size="sm" defaultValue={1} min={1} />
96
+ </div>
97
+ ),
98
+ };
99
+
100
+ // ─── Size_Default ─────────────────────────────────────────────────────────────
101
+ export const Size_Default: Story = {
102
+ parameters: { controls: { disable: true } },
103
+ render: () => (
104
+ <div className="w-64">
105
+ <Controlled label="Quantity" size="default" defaultValue={1} min={1} />
106
+ </div>
107
+ ),
108
+ };
109
+
110
+ // ─── Size_Lg ──────────────────────────────────────────────────────────────────
111
+ export const Size_Lg: Story = {
112
+ parameters: { controls: { disable: true } },
113
+ render: () => (
114
+ <div className="w-64">
115
+ <Controlled label="Quantity" size="lg" defaultValue={1} min={1} />
116
+ </div>
117
+ ),
118
+ };
119
+
120
+ // ─── Currency format ──────────────────────────────────────────────────────────
121
+ export const Variant_Currency: Story = {
122
+ parameters: { controls: { disable: true } },
123
+ render: () => (
124
+ <div className="w-64">
125
+ <Controlled
126
+ label="Price"
127
+ defaultValue={29.99}
128
+ step={0.01}
129
+ min={0}
130
+ formatOptions={{ style: "currency", currency: "USD" }}
131
+ helperText="Enter price before tax"
132
+ />
133
+ </div>
134
+ ),
135
+ name: "Variant: Currency (USD)",
136
+ };
137
+
138
+ // ─── Percentage format ────────────────────────────────────────────────────────
139
+ export const Variant_Percentage: Story = {
140
+ parameters: { controls: { disable: true } },
141
+ render: () => (
142
+ <div className="w-64">
143
+ <Controlled
144
+ label="Discount"
145
+ defaultValue={25}
146
+ min={0}
147
+ max={100}
148
+ step={5}
149
+ formatOptions={{ style: "percent", maximumFractionDigits: 0 }}
150
+ helperText="Applied at checkout"
151
+ />
152
+ </div>
153
+ ),
154
+ name: "Variant: Percentage",
155
+ };
156
+
157
+ // ─── Locale format ────────────────────────────────────────────────────────────
158
+ export const Variant_EuroCurrency: Story = {
159
+ parameters: { controls: { disable: true } },
160
+ render: () => (
161
+ <div className="w-64">
162
+ <Controlled
163
+ label="Preis"
164
+ defaultValue={1234.5}
165
+ step={0.01}
166
+ min={0}
167
+ locale="de-DE"
168
+ formatOptions={{ style: "currency", currency: "EUR" }}
169
+ />
170
+ </div>
171
+ ),
172
+ name: "Variant: Euro (de-DE locale)",
173
+ };
174
+
175
+ // ─── Realistic use ────────────────────────────────────────────────────────────
176
+ export const RealisticUse: Story = {
177
+ parameters: { controls: { disable: true } },
178
+ render: () => {
179
+ const [quantity, setQuantity] = React.useState(2);
180
+ const [price, setPrice] = React.useState(49.0);
181
+ const total = quantity * price;
182
+ return (
183
+ <div className="w-80 flex flex-col gap-5">
184
+ <NumberField
185
+ label="Quantity"
186
+ value={quantity}
187
+ onChange={setQuantity}
188
+ min={1}
189
+ max={99}
190
+ required
191
+ helperText="Maximum 99 per order"
192
+ />
193
+ <NumberField
194
+ label="Unit price"
195
+ value={price}
196
+ onChange={setPrice}
197
+ step={0.01}
198
+ min={0}
199
+ formatOptions={{ style: "currency", currency: "USD" }}
200
+ helperText="Price before quantity discount"
201
+ />
202
+ <div className="flex justify-between text-sm pt-1 border-t border-border">
203
+ <span className="text-muted-foreground">Total</span>
204
+ <span className="font-medium tabular-nums">
205
+ {new Intl.NumberFormat("en-US", {
206
+ style: "currency",
207
+ currency: "USD",
208
+ }).format(total)}
209
+ </span>
210
+ </div>
211
+ </div>
212
+ );
213
+ },
214
+ };
@@ -21,30 +21,36 @@ function Controlled(props: Omit<React.ComponentProps<typeof NumberInput>, "value
21
21
 
22
22
  // ─── Default ─────────────────────────────────────────────────────────────────
23
23
  export const Default: Story = {
24
+ parameters: { controls: { disable: true } },
24
25
  render: () => <Controlled aria-label="Quantity" />,
25
26
  };
26
27
 
27
28
  // ─── Size variants ────────────────────────────────────────────────────────────
28
29
  export const Size_Sm: Story = {
30
+ parameters: { controls: { disable: true } },
29
31
  render: () => <Controlled size="sm" aria-label="Quantity" />,
30
32
  };
31
33
 
32
34
  export const Size_Default: Story = {
35
+ parameters: { controls: { disable: true } },
33
36
  render: () => <Controlled size="default" aria-label="Quantity" />,
34
37
  };
35
38
 
36
39
  export const Size_Lg: Story = {
40
+ parameters: { controls: { disable: true } },
37
41
  render: () => <Controlled size="lg" aria-label="Quantity" />,
38
42
  };
39
43
 
40
44
  // ─── With min / max ──────────────────────────────────────────────────────────
41
45
  export const MinMax: Story = {
46
+ parameters: { controls: { disable: true } },
42
47
  render: () => <Controlled min={0} max={10} defaultValue={5} aria-label="Rating (0–10)" />,
43
48
  name: "Min / Max (0–10)",
44
49
  };
45
50
 
46
51
  // ─── With step ───────────────────────────────────────────────────────────────
47
52
  export const Step: Story = {
53
+ parameters: { controls: { disable: true } },
48
54
  render: () => <Controlled step={5} defaultValue={0} aria-label="Amount ($)" />,
49
55
  name: "Step of 5",
50
56
  };
@@ -76,7 +82,7 @@ export const WithOnBlur: Story = {
76
82
 
77
83
  // ─── Disabled ─────────────────────────────────────────────────────────────────
78
84
  export const Disabled: Story = {
79
- render: () => <NumberInput value={42} disabled aria-label="Quantity" />,
85
+ args: { value: 42, disabled: true, "aria-label": "Quantity" },
80
86
  };
81
87
 
82
88
  // ─── Realistic use: ticket quantity picker ───────────────────────────────────
@@ -121,6 +127,7 @@ function TicketPicker() {
121
127
  }
122
128
 
123
129
  export const RealisticUse: Story = {
130
+ parameters: { controls: { disable: true } },
124
131
  render: () => <TicketPicker />,
125
132
  };
126
133
 
@@ -44,6 +44,7 @@ function ShareCardBody() {
44
44
  }
45
45
 
46
46
  export const Default: Story = {
47
+ parameters: { controls: { disable: true } },
47
48
  render: () => (
48
49
  // The consumer wraps the frozen container in `relative`;
49
50
  // the overlay covers that nearest positioned ancestor.
@@ -55,6 +56,7 @@ export const Default: Story = {
55
56
  };
56
57
 
57
58
  export const WithBlur: Story = {
59
+ parameters: { controls: { disable: true } },
58
60
  render: () => (
59
61
  <div className="relative">
60
62
  <ShareCardBody />
@@ -82,7 +84,7 @@ function FixedDemo() {
82
84
  }
83
85
 
84
86
  export const Fixed: Story = {
85
- parameters: { layout: "fullscreen" },
87
+ parameters: { controls: { disable: true }, layout: "fullscreen" },
86
88
  render: () => (
87
89
  <div className="p-8">
88
90
  <p className="mb-4 text-sm text-muted-foreground">
@@ -96,6 +98,7 @@ export const Fixed: Story = {
96
98
  };
97
99
 
98
100
  export const Custom: Story = {
101
+ parameters: { controls: { disable: true } },
99
102
  render: () => (
100
103
  <div className="relative">
101
104
  <ShareCardBody />
@@ -165,5 +168,6 @@ function RealisticUseDemo() {
165
168
  }
166
169
 
167
170
  export const RealisticUse: Story = {
171
+ parameters: { controls: { disable: true } },
168
172
  render: () => <RealisticUseDemo />,
169
173
  };
@@ -28,6 +28,7 @@ export default meta;
28
28
  type Story = StoryObj<typeof meta>;
29
29
 
30
30
  export const Default: Story = {
31
+ parameters: { controls: { disable: true } },
31
32
  render: () => (
32
33
  <Pagination className="w-[500px]">
33
34
  <PaginationContent>
@@ -60,6 +61,7 @@ export const Default: Story = {
60
61
  };
61
62
 
62
63
  export const Variant_Compact: Story = {
64
+ parameters: { controls: { disable: true } },
63
65
  render: () => (
64
66
  <Pagination className="w-[360px]">
65
67
  <PaginationContent>
@@ -86,6 +88,7 @@ export const Variant_Compact: Story = {
86
88
  };
87
89
 
88
90
  export const Variant_SimpleArrows: Story = {
91
+ parameters: { controls: { disable: true } },
89
92
  render: () => (
90
93
  <Pagination className="w-[260px]">
91
94
  <PaginationContent>
@@ -106,6 +109,7 @@ export const Variant_SimpleArrows: Story = {
106
109
  };
107
110
 
108
111
  export const Disabled: Story = {
112
+ parameters: { controls: { disable: true } },
109
113
  render: () => (
110
114
  <Pagination className="w-[500px]">
111
115
  <PaginationContent>
@@ -152,6 +156,7 @@ const MEMBERS = [
152
156
  * non-CTA chrome only, not stand-alone navigation paginators.
153
157
  */
154
158
  export const Size_Sm: Story = {
159
+ parameters: { controls: { disable: true } },
155
160
  render: () => (
156
161
  <Pagination size="sm" className="w-[500px]">
157
162
  <PaginationContent>
@@ -186,6 +191,7 @@ export const Size_Sm: Story = {
186
191
  * breathing room is appropriate: full-bleed article paginators, marketing pages.
187
192
  */
188
193
  export const Size_Lg: Story = {
194
+ parameters: { controls: { disable: true } },
189
195
  render: () => (
190
196
  <Pagination size="lg" className="w-[560px]">
191
197
  <PaginationContent>
@@ -217,6 +223,7 @@ export const Size_Lg: Story = {
217
223
 
218
224
  /** All three sizes stacked — sm / default / lg comparison. */
219
225
  export const Sizes: Story = {
226
+ parameters: { controls: { disable: true } },
220
227
  render: () => (
221
228
  <div className="space-y-6">
222
229
  {(["sm", "default", "lg"] as const).map((size) => (
@@ -254,6 +261,7 @@ export const Sizes: Story = {
254
261
  };
255
262
 
256
263
  export const RealisticUse: Story = {
264
+ parameters: { controls: { disable: true } },
257
265
  render: () => (
258
266
  <div className="w-[640px] space-y-4">
259
267
  <p className="text-sm text-muted-foreground">47 members · Page 2 of 10</p>
@@ -52,6 +52,7 @@ export const AriaInvalid: Story = {
52
52
 
53
53
  export const Variant_SubmitReset: Story = {
54
54
  name: "Variant_SubmitReset",
55
+ parameters: { controls: { disable: true } },
55
56
  render: () => (
56
57
  <form
57
58
  className="w-80 space-y-3"
@@ -72,6 +73,7 @@ export const Variant_SubmitReset: Story = {
72
73
  };
73
74
 
74
75
  export const RealisticUse: Story = {
76
+ parameters: { controls: { disable: true } },
75
77
  render: () => (
76
78
  <div className="w-80 space-y-4">
77
79
  <div className="space-y-1.5">