@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.
- package/package.json +5 -2
- package/scripts/build-tokens.cjs +87 -5
- package/src/app/preview/components/page.tsx +4745 -244
- package/src/app/shell.tsx +18 -6
- package/src/components/customize/brand-mark-section.tsx +1 -1
- package/src/components/customize-tab.tsx +2 -2
- package/src/components/home-tab.tsx +2 -2
- package/src/components/ui/action-bar.tsx +142 -0
- package/src/components/ui/affix.tsx +109 -0
- package/src/components/ui/alert.tsx +37 -3
- package/src/components/ui/anchor.tsx +136 -0
- package/src/components/ui/angle-slider.tsx +265 -0
- package/src/components/ui/autocomplete.tsx +223 -0
- package/src/components/ui/avatar.tsx +8 -2
- package/src/components/ui/blockquote.tsx +112 -0
- package/src/components/ui/bottom-navigation.tsx +144 -0
- package/src/components/ui/burger.tsx +117 -0
- package/src/components/ui/button.tsx +101 -3
- package/src/components/ui/calendar.tsx +1 -1
- package/src/components/ui/card.tsx +43 -5
- package/src/components/ui/carousel.tsx +10 -5
- package/src/components/ui/cascader.tsx +253 -0
- package/src/components/ui/checkbox-card.tsx +176 -0
- package/src/components/ui/checkbox-group.tsx +231 -0
- package/src/components/ui/checkbox.tsx +14 -3
- package/src/components/ui/chip.tsx +143 -0
- package/src/components/ui/circular-progress.tsx +2 -2
- package/src/components/ui/color-swatch.tsx +73 -0
- package/src/components/ui/copy-button.tsx +21 -4
- package/src/components/ui/date-picker.tsx +6 -3
- package/src/components/ui/date-range-picker.tsx +6 -3
- package/src/components/ui/float-label.tsx +114 -0
- package/src/components/ui/floating-action-button.tsx +179 -0
- package/src/components/ui/floating-panel.tsx +129 -0
- package/src/components/ui/format-number.tsx +122 -0
- package/src/components/ui/highlight.tsx +85 -0
- package/src/components/ui/image.tsx +195 -0
- package/src/components/ui/index.ts +51 -0
- package/src/components/ui/indicator.tsx +2 -2
- package/src/components/ui/input.tsx +48 -4
- package/src/components/ui/kbd.tsx +1 -1
- package/src/components/ui/link.tsx +158 -0
- package/src/components/ui/listbox.tsx +426 -0
- package/src/components/ui/loading-overlay.tsx +80 -0
- package/src/components/ui/marquee.tsx +193 -0
- package/src/components/ui/masonry.tsx +164 -0
- package/src/components/ui/meter.tsx +186 -0
- package/src/components/ui/motion-toggle.tsx +170 -0
- package/src/components/ui/notification.tsx +175 -0
- package/src/components/ui/overlay.tsx +63 -0
- package/src/components/ui/progress.tsx +95 -4
- package/src/components/ui/rating-group.tsx +1 -0
- package/src/components/ui/separator.tsx +57 -1
- package/src/components/ui/sidebar.tsx +1 -1
- package/src/components/ui/signature-pad.tsx +381 -0
- package/src/components/ui/skeleton.tsx +59 -2
- package/src/components/ui/skip-link.tsx +117 -0
- package/src/components/ui/slider.tsx +86 -1
- package/src/components/ui/spoiler.tsx +131 -0
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/text.tsx +135 -0
- package/src/components/ui/textarea.tsx +66 -2
- package/src/components/ui/timeline.tsx +71 -14
- package/src/components/ui/timer.tsx +183 -0
- package/src/components/ui/tour.tsx +332 -0
- package/src/components/ui/transfer-list.tsx +343 -0
- package/src/components/ui/typing-indicator.tsx +96 -0
- package/src/components/ui/visually-hidden.tsx +42 -0
- package/src/components/ui/watermark.tsx +0 -0
- package/src/components/ui/word-rotate.tsx +82 -0
- package/src/data/docs-index.ts +10 -2
- package/src/stories/ActionBar.stories.tsx +201 -0
- package/src/stories/Affix.stories.tsx +165 -0
- package/src/stories/Alert.stories.tsx +58 -0
- package/src/stories/Anchor.stories.tsx +236 -0
- package/src/stories/AngleSlider.stories.tsx +128 -0
- package/src/stories/Autocomplete.stories.tsx +216 -0
- package/src/stories/Avatar.stories.tsx +73 -1
- package/src/stories/Blockquote.stories.tsx +148 -0
- package/src/stories/BottomNavigation.stories.tsx +195 -0
- package/src/stories/Burger.stories.tsx +79 -0
- package/src/stories/Button.stories.tsx +103 -2
- package/src/stories/Calendar.stories.tsx +4 -0
- package/src/stories/Card.stories.tsx +30 -0
- package/src/stories/Carousel.stories.tsx +2 -1
- package/src/stories/Cascader.stories.tsx +285 -0
- package/src/stories/Checkbox.stories.tsx +13 -0
- package/src/stories/CheckboxCard.stories.tsx +210 -0
- package/src/stories/CheckboxGroup.stories.tsx +186 -0
- package/src/stories/Chip.stories.tsx +173 -0
- package/src/stories/CircularProgress.stories.tsx +3 -0
- package/src/stories/ColorSwatch.stories.tsx +81 -0
- package/src/stories/CopyButton.stories.tsx +3 -3
- package/src/stories/DatePicker.stories.tsx +3 -0
- package/src/stories/DateRangePicker.stories.tsx +3 -0
- package/src/stories/Editable.stories.tsx +14 -0
- package/src/stories/FloatLabel.stories.tsx +148 -0
- package/src/stories/FloatingActionButton.stories.tsx +215 -0
- package/src/stories/FloatingPanel.stories.tsx +176 -0
- package/src/stories/FormatNumber.stories.tsx +308 -0
- package/src/stories/Highlight.stories.tsx +140 -0
- package/src/stories/Image.stories.tsx +141 -0
- package/src/stories/Indicator.stories.tsx +3 -0
- package/src/stories/Input.stories.tsx +33 -0
- package/src/stories/Kbd.stories.tsx +3 -0
- package/src/stories/Link.stories.tsx +198 -0
- package/src/stories/Listbox.stories.tsx +240 -0
- package/src/stories/LoadingOverlay.stories.tsx +148 -0
- package/src/stories/Marquee.stories.tsx +170 -0
- package/src/stories/Masonry.stories.tsx +227 -0
- package/src/stories/Meter.stories.tsx +150 -0
- package/src/stories/MotionToggle.stories.tsx +85 -0
- package/src/stories/Notification.stories.tsx +264 -0
- package/src/stories/Overlay.stories.tsx +169 -0
- package/src/stories/PasswordInput.stories.tsx +4 -0
- package/src/stories/Progress.stories.tsx +70 -27
- package/src/stories/RatingGroup.stories.tsx +5 -0
- package/src/stories/Separator.stories.tsx +41 -5
- package/src/stories/Sidebar.stories.tsx +2 -1
- package/src/stories/SignaturePad.stories.tsx +112 -0
- package/src/stories/Skeleton.stories.tsx +23 -4
- package/src/stories/SkipLink.stories.tsx +137 -0
- package/src/stories/Slider.stories.tsx +28 -0
- package/src/stories/Spoiler.stories.tsx +122 -0
- package/src/stories/Tabs.stories.tsx +2 -1
- package/src/stories/Text.stories.tsx +191 -0
- package/src/stories/Textarea.stories.tsx +58 -6
- package/src/stories/Timeline.stories.tsx +82 -0
- package/src/stories/Timer.stories.tsx +160 -0
- package/src/stories/Tour.stories.tsx +191 -0
- package/src/stories/TransferList.stories.tsx +190 -0
- package/src/stories/TypingIndicator.stories.tsx +139 -0
- package/src/stories/VisuallyHidden.stories.tsx +105 -0
- package/src/stories/Watermark.stories.tsx +212 -0
- package/src/stories/WordRotate.stories.tsx +101 -0
- package/src/styles.css +88 -6
- package/src/tokens.json +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@behavioral-agentic-design-system/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "BADS core — tokens, shadcn/ui components, and the BADS template shell (app routes, customize tab, theme hooks). Forks consume this and re-export, keeping client repos to ~30 lines of glue.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Matthew Stephens <work@matthewstephens.com> (https://github.com/matthewlarn)",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"lucide-react": "*",
|
|
146
146
|
"next-themes": "*",
|
|
147
147
|
"react": ">=18",
|
|
148
|
-
"react-day-picker": "^
|
|
148
|
+
"react-day-picker": "^10.0.1",
|
|
149
149
|
"react-dom": ">=18",
|
|
150
150
|
"react-resizable-panels": "*",
|
|
151
151
|
"recharts": "*",
|
|
@@ -248,5 +248,8 @@
|
|
|
248
248
|
"sonner": {
|
|
249
249
|
"optional": true
|
|
250
250
|
}
|
|
251
|
+
},
|
|
252
|
+
"devDependencies": {
|
|
253
|
+
"@types/react-dom": "^19.2.3"
|
|
251
254
|
}
|
|
252
255
|
}
|
package/scripts/build-tokens.cjs
CHANGED
|
@@ -428,6 +428,11 @@ const baseLayer = `@layer base {
|
|
|
428
428
|
size / weight axes without touching component source. "normal" is a
|
|
429
429
|
no-op for static fonts. */
|
|
430
430
|
font-variation-settings: var(--font-variation-settings, normal);
|
|
431
|
+
/* Enable opsz axis on variable fonts (Inter ships opsz 14–32). Without
|
|
432
|
+
this, browser behavior is implementation-defined and silently inconsistent
|
|
433
|
+
across engines; forks that swap in a different variable font may not
|
|
434
|
+
inherit the setting. */
|
|
435
|
+
font-optical-sizing: auto;
|
|
431
436
|
}
|
|
432
437
|
/* Match: monospace elements pick up --font-mono without each component
|
|
433
438
|
having to remember a \`font-mono\` class. */
|
|
@@ -490,11 +495,31 @@ const baseLayer = `@layer base {
|
|
|
490
495
|
/* WCAG AAA 2.3.3 Animation from Interactions: respect the user's
|
|
491
496
|
reduced-motion preference globally. Components with essential
|
|
492
497
|
motion (loading spinners, progress bars) opt back in via
|
|
493
|
-
\`motion-safe:\` Tailwind utilities or scoped @media queries.
|
|
498
|
+
\`motion-safe:\` Tailwind utilities or scoped @media queries.
|
|
499
|
+
|
|
500
|
+
Three-state model, driven by the optional \`data-motion\` attribute the
|
|
501
|
+
MotionToggle primitive sets on <html> (opt-in — no attribute is the
|
|
502
|
+
default and behaves exactly as an OS-only reduce query):
|
|
503
|
+
• \`data-motion="reduce"\` → force motion OFF regardless of OS.
|
|
504
|
+
• \`data-motion="full"\` → force motion ON even if the OS prefers
|
|
505
|
+
reduce (some users set OS reduce globally
|
|
506
|
+
but trust a given site with motion).
|
|
507
|
+
• absent (\`system\`) → the OS media query governs, as before.
|
|
508
|
+
The OS query below is gated on \`:not([data-motion="full"])\` so "full"
|
|
509
|
+
can override it; the attribute rule above wins on specificity for
|
|
510
|
+
"reduce". */
|
|
511
|
+
html[data-motion="reduce"] *,
|
|
512
|
+
html[data-motion="reduce"] *::before,
|
|
513
|
+
html[data-motion="reduce"] *::after {
|
|
514
|
+
animation-duration: 0.01ms !important;
|
|
515
|
+
animation-iteration-count: 1 !important;
|
|
516
|
+
transition-duration: 0.01ms !important;
|
|
517
|
+
scroll-behavior: auto !important;
|
|
518
|
+
}
|
|
494
519
|
@media (prefers-reduced-motion: reduce) {
|
|
495
|
-
*,
|
|
496
|
-
*::before,
|
|
497
|
-
*::after {
|
|
520
|
+
html:not([data-motion="full"]) *,
|
|
521
|
+
html:not([data-motion="full"]) *::before,
|
|
522
|
+
html:not([data-motion="full"]) *::after {
|
|
498
523
|
animation-duration: 0.01ms !important;
|
|
499
524
|
animation-iteration-count: 1 !important;
|
|
500
525
|
transition-duration: 0.01ms !important;
|
|
@@ -660,12 +685,69 @@ html, body {
|
|
|
660
685
|
animation: accordion-up var(--duration-base) var(--ease-out);
|
|
661
686
|
}
|
|
662
687
|
|
|
688
|
+
/* Marquee continuous-scroll keyframe — applied via data-slot selectors
|
|
689
|
+
(spec §4 pattern (b): plain CSS in the design-system layer, no Tailwind
|
|
690
|
+
utility generation in the path). The track holds 2×K identical groups,
|
|
691
|
+
so translateX(-50%) is always exactly one loop — seamless at any width.
|
|
692
|
+
|
|
693
|
+
- "linear" timing is a seamless-loop REQUIREMENT, not a style choice:
|
|
694
|
+
any easing curve pulses at the loop seam.
|
|
695
|
+
- --marquee-duration is the consumer tunable (the component computes it
|
|
696
|
+
from the \`speed\` prop in px/s and writes it inline; a consumer style
|
|
697
|
+
override wins). --marquee-gap tunes item density.
|
|
698
|
+
- Pausing (SC 2.2.2 Pause, Stop, Hide): hover, focus-within, and the
|
|
699
|
+
component's visible control (data-state="paused") all pause playback.
|
|
700
|
+
- Reduced motion: the base layer already forces animation-duration to
|
|
701
|
+
0.01ms with iteration-count 1, which halts the strip; the explicit
|
|
702
|
+
play-state rule below is belt-and-suspenders and self-documenting. */
|
|
703
|
+
@keyframes marquee-scroll {
|
|
704
|
+
from { transform: translateX(0); }
|
|
705
|
+
to { transform: translateX(-50%); }
|
|
706
|
+
}
|
|
707
|
+
[data-slot="marquee-track"] {
|
|
708
|
+
animation: marquee-scroll var(--marquee-duration, 30s) linear infinite;
|
|
709
|
+
}
|
|
710
|
+
[data-slot="marquee-track"][data-direction="right"] {
|
|
711
|
+
animation-direction: reverse;
|
|
712
|
+
}
|
|
713
|
+
[data-slot="marquee-group"] {
|
|
714
|
+
display: flex;
|
|
715
|
+
align-items: center;
|
|
716
|
+
gap: var(--marquee-gap, 3rem);
|
|
717
|
+
padding-inline-end: var(--marquee-gap, 3rem);
|
|
718
|
+
}
|
|
719
|
+
[data-slot="marquee"][data-state="paused"] [data-slot="marquee-track"],
|
|
720
|
+
[data-slot="marquee"]:hover [data-slot="marquee-track"],
|
|
721
|
+
[data-slot="marquee"]:focus-within [data-slot="marquee-track"] {
|
|
722
|
+
animation-play-state: paused;
|
|
723
|
+
}
|
|
724
|
+
[data-slot="marquee-viewport"][data-fade] {
|
|
725
|
+
-webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
|
|
726
|
+
mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
|
|
727
|
+
}
|
|
728
|
+
@media (prefers-reduced-motion: reduce) {
|
|
729
|
+
[data-slot="marquee-track"] { animation-play-state: paused; }
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/* TypingIndicator — three-dot is-typing animation. Dots bob on a staggered
|
|
733
|
+
delay applied via inline style per dot (pattern b keyframe + pattern c
|
|
734
|
+
animationDelay). Reduced-motion base layer forces duration to 0.01ms. */
|
|
735
|
+
@keyframes typing-dot {
|
|
736
|
+
0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
|
|
737
|
+
30% { transform: translateY(-4px); opacity: 1; }
|
|
738
|
+
}
|
|
739
|
+
|
|
663
740
|
::view-transition-new(root) {
|
|
664
741
|
animation: theme-reveal 0.4s ease-in-out forwards;
|
|
665
742
|
}
|
|
666
743
|
|
|
744
|
+
/* Honor the app-level MotionToggle for the iris wipe too (same three-state
|
|
745
|
+
model as the global kill-all). "reduce" snaps the theme swap instantly;
|
|
746
|
+
"full" keeps the wipe even under an OS reduce preference; absent = OS
|
|
747
|
+
query governs. \`animation: none\` on the pseudo just does an instant swap. */
|
|
748
|
+
html[data-motion="reduce"]::view-transition-new(root) { animation: none; }
|
|
667
749
|
@media (prefers-reduced-motion: reduce) {
|
|
668
|
-
::view-transition-new(root) { animation: none; }
|
|
750
|
+
html:not([data-motion="full"])::view-transition-new(root) { animation: none; }
|
|
669
751
|
}`;
|
|
670
752
|
|
|
671
753
|
// ---- Border-color utilities (workaround for a TURBOPACK bug) --------------
|