@behavioral-agentic-design-system/core 0.6.0 → 0.7.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 (53) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +30 -5
  3. package/scripts/bads-sync.mjs +1 -1
  4. package/scripts/build-fonts.cjs +15 -8
  5. package/scripts/build-tokens.cjs +139 -23
  6. package/src/api/brand-fonts.ts +27 -6
  7. package/src/api/layers/file.ts +4 -3
  8. package/src/api/layers.ts +8 -7
  9. package/src/api/site-auth.ts +50 -0
  10. package/src/app/font-ready.tsx +1 -1
  11. package/src/app/layout.tsx +9 -3
  12. package/src/app/preview/components/page.tsx +78 -1
  13. package/src/app/preview/icons/page.tsx +5 -0
  14. package/src/app/shell.tsx +27 -22
  15. package/src/app/site-login/page.tsx +82 -0
  16. package/src/brand-fonts.css +5 -0
  17. package/src/components/Foundations/Motion.stories.tsx +66 -0
  18. package/src/components/customize/letter-spacing.tsx +3 -2
  19. package/src/components/customize/type-scale.tsx +3 -2
  20. package/src/components/customize-tab.tsx +8 -7
  21. package/src/components/home-tab.tsx +498 -235
  22. package/src/components/layers-tab.tsx +141 -3
  23. package/src/components/ui/alert.tsx +2 -2
  24. package/src/components/ui/bottom-sheet.tsx +124 -0
  25. package/src/components/ui/button.tsx +1 -1
  26. package/src/components/ui/chart.tsx +115 -14
  27. package/src/components/ui/checkbox.tsx +3 -2
  28. package/src/components/ui/dialog.tsx +3 -3
  29. package/src/components/ui/index.ts +1 -0
  30. package/src/components/ui/radio-group.tsx +4 -3
  31. package/src/components/ui/sheet.tsx +1 -1
  32. package/src/components/ui/switch.tsx +3 -3
  33. package/src/components/ui/tabs.tsx +6 -0
  34. package/src/fonts/HyperlegibleSans-Bold.woff2 +0 -0
  35. package/src/fonts/HyperlegibleSans-BoldItalic.woff2 +0 -0
  36. package/src/fonts/HyperlegibleSans-Italic.woff2 +0 -0
  37. package/src/fonts/HyperlegibleSans-Medium.woff2 +0 -0
  38. package/src/fonts/HyperlegibleSans-MediumItalic.woff2 +0 -0
  39. package/src/fonts/HyperlegibleSans-Regular.woff2 +0 -0
  40. package/src/fonts/InterVariable-Italic.woff2 +0 -0
  41. package/src/fonts/InterVariable.woff2 +0 -0
  42. package/src/fonts.css +99 -0
  43. package/src/hooks/use-global-primary-color.ts +114 -68
  44. package/src/hooks/use-global-serif-font.ts +1 -1
  45. package/src/lib/storage.ts +2 -2
  46. package/src/styles.css +151 -61
  47. package/src/tokens.default.json +4 -4
  48. package/src/tokens.json +159 -162
  49. package/src/app/preview/login/page.tsx +0 -5
  50. package/src/app/preview/mail/page.tsx +0 -4
  51. package/src/app/preview/pricing/page.tsx +0 -4
  52. package/src/components/admin-menu.stories.tsx +0 -68
  53. package/src/components/admin-menu.tsx +0 -59
@@ -1,59 +0,0 @@
1
- "use client";
2
-
3
- import { useState } from "react";
4
- import { Settings, X } from "lucide-react";
5
- import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
6
- import {
7
- Popover,
8
- PopoverContent,
9
- PopoverTrigger,
10
- } from "@behavioral-agentic-design-system/core/components/ui/popover";
11
-
12
- export type AdminMenuChildren = React.ReactNode;
13
-
14
- export type AdminMenuProps = {
15
- children?: AdminMenuChildren;
16
- /**
17
- * Optional text shown next to the gear icon. When omitted the trigger
18
- * stays icon-only (44×44px). When provided the button widens to fit the
19
- * label while preserving the AAA touch target.
20
- */
21
- label?: string;
22
- };
23
-
24
- export function AdminMenu({ children, label }: AdminMenuProps) {
25
- const [open, setOpen] = useState(false);
26
- const hasLabel = Boolean(label);
27
-
28
- // bg-card/95 + backdrop-blur-md mirrors the DevIdentityBadge treatment so
29
- // the trigger stays legible on any background — flat surfaces, gradient
30
- // hero blocks, photo backgrounds, anywhere a fork wants to drop it. Ghost
31
- // variants disappear against busy backgrounds; the resting fill prevents
32
- // that without changing the hover invert.
33
- return (
34
- <Popover open={open} onOpenChange={setOpen}>
35
- <PopoverTrigger asChild>
36
- <Button
37
- variant="ghost"
38
- size={hasLabel ? "sm" : "icon"}
39
- className={
40
- hasLabel
41
- ? "group h-8 gap-1.5 border border-border bg-card/95 backdrop-blur-md shadow-sm hover:!bg-foreground hover:!text-background hover:border-foreground"
42
- : "group size-8 border border-border bg-card/95 backdrop-blur-md shadow-sm hover:!bg-foreground hover:!text-background hover:border-foreground"
43
- }
44
- aria-label={open ? "Close admin menu" : "Open admin menu"}
45
- >
46
- {open ? (
47
- <X className="h-4 w-4 transition-all group-hover:scale-110" strokeWidth={1.5} />
48
- ) : (
49
- <Settings className="h-4 w-4 transition-all group-hover:scale-110" strokeWidth={1.5} />
50
- )}
51
- {hasLabel && <span className="text-xs font-medium">{label}</span>}
52
- </Button>
53
- </PopoverTrigger>
54
- <PopoverContent align="end" side="top" className="w-64 p-3">
55
- {children}
56
- </PopoverContent>
57
- </Popover>
58
- );
59
- }