@sonamu-kit/react-components 0.5.1 → 0.5.2
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/dist/components/ui/alert-dialog.d.ts +1 -1
- package/dist/components/ui/alert-dialog.js +40 -31
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +1 -1
- package/dist/components/ui/context-menu.js +45 -36
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dialog.js +33 -24
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +1 -1
- package/dist/components/ui/drawer.js +36 -31
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/components/ui/dropdown-menu.js +45 -36
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +1 -1
- package/dist/components/ui/menubar.js +55 -50
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/popover.js +22 -17
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +1 -1
- package/dist/components/ui/sheet.js +36 -27
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/contexts/index.d.ts +1 -0
- package/dist/contexts/index.js +3 -1
- package/dist/contexts/portal-container.d.ts +18 -0
- package/dist/contexts/portal-container.js +16 -0
- package/dist/contexts/portal-container.js.map +1 -0
- package/dist/index.js +66 -65
- package/package.json +2 -1
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
4
|
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare
|
|
6
|
+
declare function DropdownMenuPortal({ container, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
|
|
7
7
|
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
8
|
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
@@ -1,76 +1,85 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import t from "../../
|
|
4
|
-
import n from "../../_virtual/~icons/lucide/
|
|
5
|
-
import r from "../../_virtual/~icons/lucide/
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
3
|
+
import { usePortalContainer as t } from "../../contexts/portal-container.js";
|
|
4
|
+
import n from "../../_virtual/~icons/lucide/chevron-right.js";
|
|
5
|
+
import r from "../../_virtual/~icons/lucide/check.js";
|
|
6
|
+
import i from "../../_virtual/~icons/lucide/circle.js";
|
|
7
|
+
import * as a from "react";
|
|
8
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
9
|
+
import * as c from "@radix-ui/react-dropdown-menu";
|
|
9
10
|
// src/components/ui/dropdown-menu.tsx
|
|
10
|
-
var
|
|
11
|
+
var l = c.Root, u = c.Trigger, d = c.Group;
|
|
12
|
+
function f({ container: e, ...n }) {
|
|
13
|
+
let r = t();
|
|
14
|
+
return /* @__PURE__ */ o(c.Portal, {
|
|
15
|
+
container: e ?? r,
|
|
16
|
+
...n
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
var p = c.Sub, m = c.RadioGroup, h = a.forwardRef(({ className: t, inset: r, children: i, ...a }, l) => /* @__PURE__ */ s(c.SubTrigger, {
|
|
11
20
|
ref: l,
|
|
12
|
-
className: e("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", r && "pl-8",
|
|
13
|
-
...
|
|
14
|
-
children: [i, /* @__PURE__ */
|
|
21
|
+
className: e("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", r && "pl-8", t),
|
|
22
|
+
...a,
|
|
23
|
+
children: [i, /* @__PURE__ */ o(n, { className: "ml-auto" })]
|
|
15
24
|
}));
|
|
16
|
-
|
|
17
|
-
var
|
|
25
|
+
h.displayName = c.SubTrigger.displayName;
|
|
26
|
+
var g = a.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ o(c.SubContent, {
|
|
18
27
|
ref: r,
|
|
19
28
|
className: e("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", t),
|
|
20
29
|
...n
|
|
21
30
|
}));
|
|
22
|
-
|
|
23
|
-
var
|
|
31
|
+
g.displayName = c.SubContent.displayName;
|
|
32
|
+
var _ = a.forwardRef(({ className: t, sideOffset: n = 4, ...r }, i) => /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(c.Content, {
|
|
24
33
|
ref: i,
|
|
25
34
|
sideOffset: n,
|
|
26
35
|
className: e("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]", t),
|
|
27
36
|
...r
|
|
28
37
|
}) }));
|
|
29
|
-
|
|
30
|
-
var
|
|
38
|
+
_.displayName = c.Content.displayName;
|
|
39
|
+
var v = a.forwardRef(({ className: t, inset: n, ...r }, i) => /* @__PURE__ */ o(c.Item, {
|
|
31
40
|
ref: i,
|
|
32
41
|
className: e("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", n && "pl-8", t),
|
|
33
42
|
...r
|
|
34
43
|
}));
|
|
35
|
-
|
|
36
|
-
var
|
|
44
|
+
v.displayName = c.Item.displayName;
|
|
45
|
+
var y = a.forwardRef(({ className: t, children: n, checked: i, ...a }, l) => /* @__PURE__ */ s(c.CheckboxItem, {
|
|
37
46
|
ref: l,
|
|
38
47
|
className: e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t),
|
|
39
48
|
checked: i,
|
|
40
|
-
...
|
|
41
|
-
children: [/* @__PURE__ */
|
|
49
|
+
...a,
|
|
50
|
+
children: [/* @__PURE__ */ o("span", {
|
|
42
51
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
-
}),
|
|
52
|
+
children: /* @__PURE__ */ o(c.ItemIndicator, { children: /* @__PURE__ */ o(r, { className: "h-4 w-4" }) })
|
|
53
|
+
}), n]
|
|
45
54
|
}));
|
|
46
|
-
|
|
47
|
-
var
|
|
48
|
-
ref:
|
|
55
|
+
y.displayName = c.CheckboxItem.displayName;
|
|
56
|
+
var b = a.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__ */ s(c.RadioItem, {
|
|
57
|
+
ref: a,
|
|
49
58
|
className: e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t),
|
|
50
|
-
...
|
|
51
|
-
children: [/* @__PURE__ */
|
|
59
|
+
...r,
|
|
60
|
+
children: [/* @__PURE__ */ o("span", {
|
|
52
61
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
53
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ o(c.ItemIndicator, { children: /* @__PURE__ */ o(i, { className: "h-2 w-2 fill-current" }) })
|
|
54
63
|
}), n]
|
|
55
64
|
}));
|
|
56
|
-
|
|
57
|
-
var
|
|
65
|
+
b.displayName = c.RadioItem.displayName;
|
|
66
|
+
var x = a.forwardRef(({ className: t, inset: n, ...r }, i) => /* @__PURE__ */ o(c.Label, {
|
|
58
67
|
ref: i,
|
|
59
68
|
className: e("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
|
|
60
69
|
...r
|
|
61
70
|
}));
|
|
62
|
-
|
|
63
|
-
var
|
|
71
|
+
x.displayName = c.Label.displayName;
|
|
72
|
+
var S = a.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ o(c.Separator, {
|
|
64
73
|
ref: r,
|
|
65
74
|
className: e("-mx-1 my-1 h-px bg-muted", t),
|
|
66
75
|
...n
|
|
67
76
|
}));
|
|
68
|
-
|
|
69
|
-
var
|
|
77
|
+
S.displayName = c.Separator.displayName;
|
|
78
|
+
var C = ({ className: t, ...n }) => /* @__PURE__ */ o("span", {
|
|
70
79
|
className: e("ml-auto text-xs tracking-widest opacity-60", t),
|
|
71
80
|
...n
|
|
72
81
|
});
|
|
73
|
-
|
|
74
|
-
export {
|
|
82
|
+
C.displayName = "DropdownMenuShortcut";
|
|
83
|
+
export { l as DropdownMenu, y as DropdownMenuCheckboxItem, _ as DropdownMenuContent, d as DropdownMenuGroup, v as DropdownMenuItem, x as DropdownMenuLabel, f as DropdownMenuPortal, m as DropdownMenuRadioGroup, b as DropdownMenuRadioItem, S as DropdownMenuSeparator, C as DropdownMenuShortcut, p as DropdownMenuSub, g as DropdownMenuSubContent, h as DropdownMenuSubTrigger, u as DropdownMenuTrigger };
|
|
75
84
|
|
|
76
85
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","names":["React","ChevronRightIcon","CheckIcon","CircleIcon","ForwardRef","ForwardRef$1","ForwardRef$2","React$1","DropdownMenuPrimitive","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","props","cn","inset","className","children","DropdownMenuSubContent","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"sources":["../../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport * as React from \"react\";\nimport CheckIcon from \"~icons/lucide/check\";\nimport ChevronRightIcon from \"~icons/lucide/chevron-right\";\nimport CircleIcon from \"~icons/lucide/circle\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)} {...props} />\n );\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"mappings":";;;;;;;;;AAUA,IAAMS,IAAeD,EAAsB,MAErCE,IAAsBF,EAAsB,SAE5CG,IAAoBH,EAAsB,OAE1CI,IAAqBJ,EAAsB,QAE3CK,IAAkBL,EAAsB,KAExCM,IAAyBN,EAAsB,YAE/CO,IAAyBf,EAAM,YAKlC,EAAE,cAAW,UAAO,aAAU,GAAGgB,KAAS,MAC3C,kBAACR,EAAsB,YAAvB;CACO;CACL,WAAWS,EACT,0MACAC,KAAS,QACTC,CACF;CACA,GAAIH;CAPN,UAAA,CASGI,GACD,kBAACnB,GAAD,EAAkB,WAAU,UAAW,CAAA,CACP;AACnC,CAAA,CAAA;AACD,EAAuB,cAAcO,EAAsB,WAAW;AAEtE,IAAMa,IAAyBrB,EAAM,YAGlC,EAAE,cAAW,GAAGgB,KAAS,MAC1B,kBAACR,EAAsB,Y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;AAClC,CAAA,CAAA;AACD,EAAsB,cAAcZ,EAAsB,UAAU;AAEpE,IAAMkB,IAAoB1B,EAAM,YAK7B,EAAE,cAAW,UAAO,GAAGgB,KAAS,MACjC,kBAACR,EAAsB,OAAvB;CACO;CACL,WAAWS,EAAG,qCAAqCC,KAAS,QAAQC,CAAS;CAC7E,GAAIH;AACL,CAAA,CACF;AACD,EAAkB,cAAcR,EAAsB,MAAM;AAE5D,IAAMmB,IAAwB3B,EAAM,YAGjC,EAAE,cAAW,GAAGgB,KAAS,MAC1B,kBAACR,EAAsB,WAAvB;CACO;CACL,WAAWS,EAAG,4BAA4BE,CAAS;CACnD,GAAIH;AACL,CAAA,CACF;AACD,EAAsB,cAAcR,EAAsB,UAAU;AAEpE,IAAMoB,KAAwB,EAAE,cAAW,GAAGZ,QAE1C,kBAAC,QAAD;CAAM,WAAWC,EAAG,8CAA8CE,CAAS;CAAG,GAAIH;AAAQ,CAAA;AAG9F,EAAqB,cAAc"}
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","names":["React","ChevronRightIcon","CheckIcon","CircleIcon","ForwardRef","ForwardRef$1","ForwardRef$2","React$1","DropdownMenuPrimitive","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","props","fallback","usePortalContainer","container","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","cn","inset","className","children","DropdownMenuSubContent","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"sources":["../../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport * as React from \"react\";\nimport CheckIcon from \"~icons/lucide/check\";\nimport ChevronRightIcon from \"~icons/lucide/chevron-right\";\nimport CircleIcon from \"~icons/lucide/circle\";\n\nimport { usePortalContainer } from \"../../contexts/portal-container\";\nimport { cn } from \"../../lib/utils\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nfunction DropdownMenuPortal({\n container,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n const fallback = usePortalContainer();\n return <DropdownMenuPrimitive.Portal container={container ?? fallback} {...props} />;\n}\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPortal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPortal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)} {...props} />\n );\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"mappings":";;;;;;;;;;AAWA,IAAMS,IAAeD,EAAsB,MAErCE,IAAsBF,EAAsB,SAE5CG,IAAoBH,EAAsB;AAEhD,SAASI,EAAmB,EAC1B,cACA,GAAGC,KACyD;CAC5D,IAAMC,IAAWC,EAAmB;CACpC,OAAO,kBAACP,EAAsB,QAAvB;EAA8B,WAAWQ,KAAaF;EAAU,GAAID;CAAQ,CAAA;AACrF;AAEA,IAAMI,IAAkBT,EAAsB,KAExCU,IAAyBV,EAAsB,YAE/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AAA;AACD,EAAyB,cAAcf,EAAsB,aAAa;AAE1E,IAAMoB,IAAwB5B,EAAM,YAGjC,EAAE,cAAW,aAAU,GAAGa,KAAS,MACpC,kBAACL,EAAsB,WAAvB;CACO;CACL,WAAWY,EACT,oOACAE,CACF;CACA,GAAIT;CANN,UAAA,CAQE,kBAAC,QAAD;EAAM,WAAU;EACd,UAAA,kBAACL,EAAsB,eAAvB,EAAA,UACE,kBAACL,GAAD,EAAY,WAAU,uBAAwB,CAAA,EACX,CAAA;CACjC,CAAA,GACLoB,CAC8B;AAClC,CAAA,CAAA;AACD,EAAsB,cAAcf,EAAsB,UAAU;AAEpE,IAAMqB,IAAoB7B,EAAM,YAK7B,EAAE,cAAW,UAAO,GAAGa,KAAS,MACjC,kBAACL,EAAsB,OAAvB;CACO;CACL,WAAWY,EAAG,qCAAqCC,KAAS,QAAQC,CAAS;CAC7E,GAAIT;AACL,CAAA,CACF;AACD,EAAkB,cAAcL,EAAsB,MAAM;AAE5D,IAAMsB,IAAwB9B,EAAM,YAGjC,EAAE,cAAW,GAAGa,KAAS,MAC1B,kBAACL,EAAsB,WAAvB;CACO;CACL,WAAWY,EAAG,4BAA4BE,CAAS;CACnD,GAAIT;AACL,CAAA,CACF;AACD,EAAsB,cAAcL,EAAsB,UAAU;AAEpE,IAAMuB,KAAwB,EAAE,cAAW,GAAGlB,QAE1C,kBAAC,QAAD;CAAM,WAAWO,EAAG,8CAA8CE,CAAS;CAAG,GAAIT;AAAQ,CAAA;AAG9F,EAAqB,cAAc"}
|
|
@@ -2,7 +2,7 @@ import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): React.JSX.Element;
|
|
4
4
|
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): React.JSX.Element;
|
|
5
|
-
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): React.JSX.Element;
|
|
5
|
+
declare function MenubarPortal({ container, ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): React.JSX.Element;
|
|
6
6
|
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): React.JSX.Element;
|
|
7
7
|
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): React.JSX.Element;
|
|
8
8
|
declare const Menubar: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,107 +1,112 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import t from "../../
|
|
3
|
-
import n from "../../_virtual/~icons/lucide/
|
|
4
|
-
import r from "../../_virtual/~icons/lucide/
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import { usePortalContainer as t } from "../../contexts/portal-container.js";
|
|
3
|
+
import n from "../../_virtual/~icons/lucide/chevron-right.js";
|
|
4
|
+
import r from "../../_virtual/~icons/lucide/check.js";
|
|
5
|
+
import i from "../../_virtual/~icons/lucide/circle.js";
|
|
6
|
+
import * as a from "react";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import * as c from "@radix-ui/react-menubar";
|
|
8
9
|
// src/components/ui/menubar.tsx
|
|
9
|
-
function c({ ...e }) {
|
|
10
|
-
return /* @__PURE__ */ a(s.Menu, { ...e });
|
|
11
|
-
}
|
|
12
10
|
function l({ ...e }) {
|
|
13
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ o(c.Menu, { ...e });
|
|
14
12
|
}
|
|
15
13
|
function u({ ...e }) {
|
|
16
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ o(c.Group, { ...e });
|
|
17
15
|
}
|
|
18
|
-
function d({
|
|
19
|
-
|
|
16
|
+
function d({ container: e, ...n }) {
|
|
17
|
+
let r = t();
|
|
18
|
+
return /* @__PURE__ */ o(c.Portal, {
|
|
19
|
+
container: e ?? r,
|
|
20
|
+
...n
|
|
21
|
+
});
|
|
20
22
|
}
|
|
21
23
|
function f({ ...e }) {
|
|
22
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ o(c.RadioGroup, { ...e });
|
|
25
|
+
}
|
|
26
|
+
function p({ ...e }) {
|
|
27
|
+
return /* @__PURE__ */ o(c.Sub, {
|
|
23
28
|
"data-slot": "menubar-sub",
|
|
24
29
|
...e
|
|
25
30
|
});
|
|
26
31
|
}
|
|
27
|
-
var
|
|
32
|
+
var m = a.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ o(c.Root, {
|
|
28
33
|
ref: r,
|
|
29
34
|
className: e("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", t),
|
|
30
35
|
...n
|
|
31
36
|
}));
|
|
32
|
-
|
|
33
|
-
var
|
|
37
|
+
m.displayName = c.Root.displayName;
|
|
38
|
+
var h = a.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ o(c.Trigger, {
|
|
34
39
|
ref: r,
|
|
35
40
|
className: e("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", t),
|
|
36
41
|
...n
|
|
37
42
|
}));
|
|
38
|
-
|
|
39
|
-
var
|
|
43
|
+
h.displayName = c.Trigger.displayName;
|
|
44
|
+
var g = a.forwardRef(({ className: t, inset: r, children: i, ...a }, l) => /* @__PURE__ */ s(c.SubTrigger, {
|
|
40
45
|
ref: l,
|
|
41
|
-
className: e("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", r && "pl-8",
|
|
42
|
-
...
|
|
43
|
-
children: [i, /* @__PURE__ */
|
|
46
|
+
className: e("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", r && "pl-8", t),
|
|
47
|
+
...a,
|
|
48
|
+
children: [i, /* @__PURE__ */ o(n, { className: "ml-auto h-4 w-4" })]
|
|
44
49
|
}));
|
|
45
|
-
|
|
46
|
-
var
|
|
50
|
+
g.displayName = c.SubTrigger.displayName;
|
|
51
|
+
var _ = a.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ o(c.SubContent, {
|
|
47
52
|
ref: r,
|
|
48
53
|
className: e("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", t),
|
|
49
54
|
...n
|
|
50
55
|
}));
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
ref:
|
|
56
|
+
_.displayName = c.SubContent.displayName;
|
|
57
|
+
var v = a.forwardRef(({ className: t, align: n = "start", alignOffset: r = -4, sideOffset: i = 8, ...a }, s) => /* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(c.Content, {
|
|
58
|
+
ref: s,
|
|
54
59
|
align: n,
|
|
55
60
|
alignOffset: r,
|
|
56
61
|
sideOffset: i,
|
|
57
62
|
className: e("z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", t),
|
|
58
|
-
...
|
|
63
|
+
...a
|
|
59
64
|
}) }));
|
|
60
|
-
|
|
61
|
-
var
|
|
65
|
+
v.displayName = c.Content.displayName;
|
|
66
|
+
var y = a.forwardRef(({ className: t, inset: n, ...r }, i) => /* @__PURE__ */ o(c.Item, {
|
|
62
67
|
ref: i,
|
|
63
68
|
className: e("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", n && "pl-8", t),
|
|
64
69
|
...r
|
|
65
70
|
}));
|
|
66
|
-
|
|
67
|
-
var
|
|
71
|
+
y.displayName = c.Item.displayName;
|
|
72
|
+
var b = a.forwardRef(({ className: t, children: n, checked: i, ...a }, l) => /* @__PURE__ */ s(c.CheckboxItem, {
|
|
68
73
|
ref: l,
|
|
69
74
|
className: e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t),
|
|
70
75
|
checked: i,
|
|
71
|
-
...
|
|
72
|
-
children: [/* @__PURE__ */
|
|
76
|
+
...a,
|
|
77
|
+
children: [/* @__PURE__ */ o("span", {
|
|
73
78
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
74
|
-
children: /* @__PURE__ */
|
|
75
|
-
}),
|
|
79
|
+
children: /* @__PURE__ */ o(c.ItemIndicator, { children: /* @__PURE__ */ o(r, { className: "h-4 w-4" }) })
|
|
80
|
+
}), n]
|
|
76
81
|
}));
|
|
77
|
-
|
|
78
|
-
var
|
|
79
|
-
ref:
|
|
82
|
+
b.displayName = c.CheckboxItem.displayName;
|
|
83
|
+
var x = a.forwardRef(({ className: t, children: n, ...r }, a) => /* @__PURE__ */ s(c.RadioItem, {
|
|
84
|
+
ref: a,
|
|
80
85
|
className: e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t),
|
|
81
|
-
...
|
|
82
|
-
children: [/* @__PURE__ */
|
|
86
|
+
...r,
|
|
87
|
+
children: [/* @__PURE__ */ o("span", {
|
|
83
88
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
84
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ o(c.ItemIndicator, { children: /* @__PURE__ */ o(i, { className: "h-2 w-2 fill-current" }) })
|
|
85
90
|
}), n]
|
|
86
91
|
}));
|
|
87
|
-
|
|
88
|
-
var
|
|
92
|
+
x.displayName = c.RadioItem.displayName;
|
|
93
|
+
var S = a.forwardRef(({ className: t, inset: n, ...r }, i) => /* @__PURE__ */ o(c.Label, {
|
|
89
94
|
ref: i,
|
|
90
95
|
className: e("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
|
|
91
96
|
...r
|
|
92
97
|
}));
|
|
93
|
-
|
|
94
|
-
var
|
|
98
|
+
S.displayName = c.Label.displayName;
|
|
99
|
+
var C = a.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ o(c.Separator, {
|
|
95
100
|
ref: r,
|
|
96
101
|
className: e("-mx-1 my-1 h-px bg-muted", t),
|
|
97
102
|
...n
|
|
98
103
|
}));
|
|
99
|
-
|
|
100
|
-
var
|
|
104
|
+
C.displayName = c.Separator.displayName;
|
|
105
|
+
var w = ({ className: t, ...n }) => /* @__PURE__ */ o("span", {
|
|
101
106
|
className: e("ml-auto text-xs tracking-widest text-muted-foreground", t),
|
|
102
107
|
...n
|
|
103
108
|
});
|
|
104
|
-
|
|
105
|
-
export {
|
|
109
|
+
w.displayname = "MenubarShortcut";
|
|
110
|
+
export { m as Menubar, b as MenubarCheckboxItem, v as MenubarContent, u as MenubarGroup, y as MenubarItem, S as MenubarLabel, l as MenubarMenu, d as MenubarPortal, f as MenubarRadioGroup, x as MenubarRadioItem, C as MenubarSeparator, w as MenubarShortcut, p as MenubarSub, _ as MenubarSubContent, g as MenubarSubTrigger, h as MenubarTrigger };
|
|
106
111
|
|
|
107
112
|
//# sourceMappingURL=menubar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menubar.js","names":["React","ChevronRightIcon","CheckIcon","CircleIcon","ForwardRef","ForwardRef$1","ForwardRef$2","React$1","MenubarPrimitive","MenubarMenu","props","MenubarGroup","MenubarPortal","MenubarRadioGroup","MenubarSub","Menubar","cn","className","MenubarTrigger","MenubarSubTrigger","inset","children","MenubarSubContent","MenubarContent","MenubarItem","MenubarCheckboxItem","MenubarRadioItem","MenubarLabel","MenubarSeparator","MenubarShortcut"],"sources":["../../../src/components/ui/menubar.tsx"],"sourcesContent":["import * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport * as React from \"react\";\nimport CheckIcon from \"~icons/lucide/check\";\nimport ChevronRightIcon from \"~icons/lucide/chevron-right\";\nimport CircleIcon from \"~icons/lucide/circle\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu {...props} />;\n}\n\nfunction MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group {...props} />;\n}\n\nfunction MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal {...props} />;\n}\n\nfunction MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup {...props} />;\n}\n\nfunction MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\nconst Menubar = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-10 items-center space-x-1 rounded-md border bg-background p-1\",\n className,\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\nconst MenubarTrigger = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className,\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\nconst MenubarSubContent = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\nconst MenubarContent = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(({ className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props }, ref) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n));\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\nconst MenubarItem = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\nconst MenubarRadioItem = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CircleIcon className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\nconst MenubarLabel = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\nconst MenubarSeparator = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\nconst MenubarShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n};\nMenubarShortcut.displayname = \"MenubarShortcut\";\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n};\n"],"mappings":";;;;;;;;AAQA,SAASS,EAAY,EAAE,GAAGC,KAA6D;CACrF,OAAO,kBAACF,EAAiB,MAAlB,EAAuB,GAAIE,EAAQ,CAAA;AAC5C;AAEA,SAASC,EAAa,EAAE,GAAGD,KAA8D;CACvF,OAAO,kBAACF,EAAiB,OAAlB,EAAwB,GAAIE,EAAQ,CAAA;AAC7C;AAEA,SAASE,EAAc,EAAE,GAAGF,KAA+D;CACzF,OAAO,kBAACF,EAAiB,QAAlB,EAAyB,GAAIE,EAAQ,CAAA;AAC9C;AAEA,SAASG,EAAkB,EAAE,GAAGH,KAAmE;CACjG,OAAO,kBAACF,EAAiB,YAAlB,EAA6B,GAAIE,EAAQ,CAAA;AAClD;AAEA,SAASI,EAAW,EAAE,GAAGJ,KAA4D;CACnF,OAAO,kBAACF,EAAiB,K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P;AACL,CAAA,CACF;AACD,EAAiB,cAAcF,EAAiB,UAAU;AAE1D,IAAMqB,KAAmB,EAAE,cAAW,GAAGnB,QAErC,kBAAC,QAAD;CACE,WAAWM,EAAG,yDAAyDC,CAAS;CAChF,GAAIP;AACL,CAAA;AAGL,EAAgB,cAAc"}
|
|
1
|
+
{"version":3,"file":"menubar.js","names":["React","ChevronRightIcon","CheckIcon","CircleIcon","ForwardRef","ForwardRef$1","ForwardRef$2","React$1","MenubarPrimitive","MenubarMenu","props","MenubarGroup","MenubarPortal","fallback","usePortalContainer","container","MenubarRadioGroup","MenubarSub","Menubar","cn","className","MenubarTrigger","MenubarSubTrigger","inset","children","MenubarSubContent","MenubarContent","MenubarItem","MenubarCheckboxItem","MenubarRadioItem","MenubarLabel","MenubarSeparator","MenubarShortcut"],"sources":["../../../src/components/ui/menubar.tsx"],"sourcesContent":["import * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport * as React from \"react\";\nimport CheckIcon from \"~icons/lucide/check\";\nimport ChevronRightIcon from \"~icons/lucide/chevron-right\";\nimport CircleIcon from \"~icons/lucide/circle\";\n\nimport { usePortalContainer } from \"../../contexts/portal-container\";\nimport { cn } from \"../../lib/utils\";\n\nfunction MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu {...props} />;\n}\n\nfunction MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group {...props} />;\n}\n\nfunction MenubarPortal({\n container,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n const fallback = usePortalContainer();\n return <MenubarPrimitive.Portal container={container ?? fallback} {...props} />;\n}\n\nfunction MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup {...props} />;\n}\n\nfunction MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\nconst Menubar = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-10 items-center space-x-1 rounded-md border bg-background p-1\",\n className,\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\nconst MenubarTrigger = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className,\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\nconst MenubarSubContent = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\nconst MenubarContent = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(({ className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props }, ref) => (\n <MenubarPortal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n </MenubarPortal>\n));\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\nconst MenubarItem = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\nconst MenubarRadioItem = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CircleIcon className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\nconst MenubarLabel = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\nconst MenubarSeparator = React.forwardRef<\n React.ComponentRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\nconst MenubarShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n};\nMenubarShortcut.displayname = \"MenubarShortcut\";\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n};\n"],"mappings":";;;;;;;;;AASA,SAASS,EAAY,EAAE,GAAGC,KAA6D;CACrF,OAAO,kBAACF,EAAiB,MAAlB,EAAuB,GAAIE,EAAQ,CAAA;AAC5C;AAEA,SAASC,EAAa,EAAE,GAAGD,KAA8D;CACvF,OAAO,kBAACF,EAAiB,OAAlB,EAAwB,GAAIE,EAAQ,CAAA;AAC7C;AAEA,SAASE,EAAc,EACrB,cACA,GAAGF,KACoD;CACvD,IAAMG,IAAWC,EAAmB;CACpC,OAAO,kBAACN,EAAiB,QAAlB;EAAyB,WAAWO,KAAaF;EAAU,GAAIH;CAAQ,CAAA;AAChF;AAEA,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iB,MAAM;AAElD,IAAMuB,IAAmB/B,EAAM,YAG5B,EAAE,cAAW,GAAGU,KAAS,MAC1B,kBAACF,EAAiB,WAAlB;CACO;CACL,WAAWW,EAAG,4BAA4BC,CAAS;CACnD,GAAIV;AACL,CAAA,CACF;AACD,EAAiB,cAAcF,EAAiB,UAAU;AAE1D,IAAMwB,KAAmB,EAAE,cAAW,GAAGtB,QAErC,kBAAC,QAAD;CACE,WAAWS,EAAG,yDAAyDC,CAAS;CAChF,GAAIV;AACL,CAAA;AAGL,EAAgB,cAAc"}
|
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { usePortalContainer as t } from "../../contexts/portal-container.js";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import * as r from "@radix-ui/react-popover";
|
|
5
6
|
// src/components/ui/popover.tsx
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
function i({ ...e }) {
|
|
8
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
8
9
|
"data-slot": "popover",
|
|
9
10
|
...e
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
function a({ ...e }) {
|
|
14
|
+
return /* @__PURE__ */ n(r.Trigger, {
|
|
14
15
|
"data-slot": "popover-trigger",
|
|
15
16
|
...e
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
function o({ className: i, align: a = "center", sideOffset: o = 4, ...s }) {
|
|
20
|
+
let c = t();
|
|
21
|
+
return /* @__PURE__ */ n(r.Portal, {
|
|
22
|
+
container: c,
|
|
23
|
+
children: /* @__PURE__ */ n(r.Content, {
|
|
24
|
+
"data-slot": "popover-content",
|
|
25
|
+
align: a,
|
|
26
|
+
sideOffset: o,
|
|
27
|
+
className: e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", i),
|
|
28
|
+
...s
|
|
29
|
+
})
|
|
30
|
+
});
|
|
26
31
|
}
|
|
27
|
-
function
|
|
28
|
-
return /* @__PURE__ */
|
|
32
|
+
function s({ ...e }) {
|
|
33
|
+
return /* @__PURE__ */ n(r.Anchor, {
|
|
29
34
|
"data-slot": "popover-anchor",
|
|
30
35
|
...e
|
|
31
36
|
});
|
|
32
37
|
}
|
|
33
|
-
export {
|
|
38
|
+
export { i as Popover, s as PopoverAnchor, o as PopoverContent, a as PopoverTrigger };
|
|
34
39
|
|
|
35
40
|
//# sourceMappingURL=popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","names":["PopoverPrimitive","Popover","props","PopoverTrigger","PopoverContent","cn","className","PopoverAnchor"],"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"popover.js","names":["PopoverPrimitive","Popover","props","PopoverTrigger","PopoverContent","container","usePortalContainer","cn","className","PopoverAnchor"],"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type * as React from \"react\";\n\nimport { usePortalContainer } from \"../../contexts/portal-container\";\nimport { cn } from \"../../lib/utils\";\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n const container = usePortalContainer();\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":";;;;;;AAQA,SAASC,EAAQ,EAAE,GAAGC,KAA6D;CACjF,OAAO,kBAACF,EAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAIE;CAAQ,CAAA;AAChE;AAEA,SAASC,EAAe,EAAE,GAAGD,KAAgE;CAC3F,OAAO,kBAACF,EAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAIE;CAAQ,CAAA;AAC3E;AAEA,SAASE,EAAe,EACtB,cACA,WAAQ,UACR,gBAAa,GACb,GAAGF,KACqD;CACxD,IAAMG,IAAYC,EAAmB;CACrC,OACE,kBAACN,EAAiB,QAAlB;EAAoC;EAClC,UAAA,kBAACA,EAAiB,SAAlB;GACE,aAAU;GACH;GACK;GACZ,WAAWO,EACT,keACAC,CACF;GACA,GAAIN;EACL,CAAA;CACsB,CAAA;AAE7B;AAEA,SAASO,EAAc,EAAE,GAAGP,KAA+D;CACzF,OAAO,kBAACF,EAAiB,QAAlB;EAAyB,aAAU;EAAiB,GAAIE;CAAQ,CAAA;AACzE"}
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
5
5
|
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare
|
|
7
|
+
declare function SheetPortal({ container, ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>): React.JSX.Element;
|
|
8
8
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const sheetVariantsConfig: {
|
|
10
10
|
readonly side: {
|