@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.
- package/LICENSE +21 -0
- package/package.json +30 -5
- package/scripts/bads-sync.mjs +1 -1
- package/scripts/build-fonts.cjs +15 -8
- package/scripts/build-tokens.cjs +139 -23
- package/src/api/brand-fonts.ts +27 -6
- package/src/api/layers/file.ts +4 -3
- package/src/api/layers.ts +8 -7
- package/src/api/site-auth.ts +50 -0
- package/src/app/font-ready.tsx +1 -1
- package/src/app/layout.tsx +9 -3
- package/src/app/preview/components/page.tsx +78 -1
- package/src/app/preview/icons/page.tsx +5 -0
- package/src/app/shell.tsx +27 -22
- package/src/app/site-login/page.tsx +82 -0
- package/src/brand-fonts.css +5 -0
- package/src/components/Foundations/Motion.stories.tsx +66 -0
- package/src/components/customize/letter-spacing.tsx +3 -2
- package/src/components/customize/type-scale.tsx +3 -2
- package/src/components/customize-tab.tsx +8 -7
- package/src/components/home-tab.tsx +498 -235
- package/src/components/layers-tab.tsx +141 -3
- package/src/components/ui/alert.tsx +2 -2
- package/src/components/ui/bottom-sheet.tsx +124 -0
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/chart.tsx +115 -14
- package/src/components/ui/checkbox.tsx +3 -2
- package/src/components/ui/dialog.tsx +3 -3
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/radio-group.tsx +4 -3
- package/src/components/ui/sheet.tsx +1 -1
- package/src/components/ui/switch.tsx +3 -3
- package/src/components/ui/tabs.tsx +6 -0
- package/src/fonts/HyperlegibleSans-Bold.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-BoldItalic.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-Italic.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-Medium.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-MediumItalic.woff2 +0 -0
- package/src/fonts/HyperlegibleSans-Regular.woff2 +0 -0
- package/src/fonts/InterVariable-Italic.woff2 +0 -0
- package/src/fonts/InterVariable.woff2 +0 -0
- package/src/fonts.css +99 -0
- package/src/hooks/use-global-primary-color.ts +114 -68
- package/src/hooks/use-global-serif-font.ts +1 -1
- package/src/lib/storage.ts +2 -2
- package/src/styles.css +151 -61
- package/src/tokens.default.json +4 -4
- package/src/tokens.json +159 -162
- package/src/app/preview/login/page.tsx +0 -5
- package/src/app/preview/mail/page.tsx +0 -4
- package/src/app/preview/pricing/page.tsx +0 -4
- package/src/components/admin-menu.stories.tsx +0 -68
- 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
|
-
}
|