@authdog/react-elements 0.0.47 → 0.0.49
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/.turbo/turbo-build.log +37 -37
- package/CHANGELOG.md +13 -0
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu.mjs +1 -1
- package/dist/components/ui/dropdown-menu.mjs.map +1 -1
- package/dist/components/ui/theme-toggle.js +1 -1
- package/dist/components/ui/theme-toggle.js.map +1 -1
- package/dist/components/ui/theme-toggle.mjs +1 -1
- package/dist/components/ui/theme-toggle.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +9 -0
- package/package.json +1 -1
- package/src/components/core/navbar.tsx +30 -25
- package/src/components/icons.tsx +9 -4
- package/src/components/ui/dropdown-menu.tsx +1 -1
- package/src/components/ui/theme-toggle.tsx +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @authdog/react-elements@0.0.
|
|
2
|
+
> @authdog/react-elements@0.0.49 build /home/runner/work/web-sdk/web-sdk/packages/react-elements
|
|
3
3
|
> pnpm tsup && pnpm build:styles
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts, src/lib/utils.ts, src/components/ui/alert.tsx, src/components/ui/avatar.tsx, src/components/ui/badge.tsx, src/components/ui/button.tsx, src/components/ui/card.tsx, src/components/ui/dropdown-menu.tsx, src/components/ui/input.tsx, src/components/ui/label.tsx, src/components/ui/separator.tsx, src/components/ui/sheet.tsx, src/components/ui/theme-toggle.tsx
|
|
@@ -10,66 +10,66 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[32mESM[39m [1mdist/lib/utils.mjs [22m[32m166.00 B[39m
|
|
15
|
-
[32mESM[39m [1mdist/components/ui/alert.mjs [22m[32m1.19 KB[39m
|
|
16
|
-
[32mESM[39m [1mdist/components/ui/avatar.mjs [22m[32m749.00 B[39m
|
|
17
|
-
[32mESM[39m [1mdist/components/ui/badge.mjs [22m[32m1.34 KB[39m
|
|
18
|
-
[32mESM[39m [1mdist/components/ui/button.mjs [22m[32m1.36 KB[39m
|
|
19
|
-
[32mESM[39m [1mdist/components/ui/card.mjs [22m[32m1.35 KB[39m
|
|
20
|
-
[32mESM[39m [1mdist/components/ui/dropdown-menu.mjs [22m[32m5.96 KB[39m
|
|
21
|
-
[32mESM[39m [1mdist/components/ui/input.mjs [22m[32m949.00 B[39m
|
|
22
|
-
[32mESM[39m [1mdist/components/ui/label.mjs [22m[32m566.00 B[39m
|
|
23
|
-
[32mESM[39m [1mdist/components/ui/separator.mjs [22m[32m604.00 B[39m
|
|
24
|
-
[32mESM[39m [1mdist/components/ui/sheet.mjs [22m[32m2.68 KB[39m
|
|
25
|
-
[32mESM[39m [1mdist/components/ui/theme-toggle.mjs [22m[32m2.10 KB[39m
|
|
26
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[32m99.95 KB[39m
|
|
27
|
-
[32mESM[39m [1mdist/lib/utils.mjs.map [22m[32m415.00 B[39m
|
|
28
|
-
[32mESM[39m [1mdist/components/ui/alert.mjs.map [22m[32m2.82 KB[39m
|
|
29
|
-
[32mESM[39m [1mdist/components/ui/avatar.mjs.map [22m[32m2.12 KB[39m
|
|
30
|
-
[32mESM[39m [1mdist/components/ui/badge.mjs.map [22m[32m2.62 KB[39m
|
|
31
|
-
[32mESM[39m [1mdist/components/ui/button.mjs.map [22m[32m3.01 KB[39m
|
|
32
|
-
[32mESM[39m [1mdist/components/ui/card.mjs.map [22m[32m3.54 KB[39m
|
|
33
|
-
[32mESM[39m [1mdist/components/ui/dropdown-menu.mjs.map [22m[32m14.35 KB[39m
|
|
34
|
-
[32mESM[39m [1mdist/components/ui/input.mjs.map [22m[32m1.65 KB[39m
|
|
35
|
-
[32mESM[39m [1mdist/components/ui/label.mjs.map [22m[32m1.31 KB[39m
|
|
36
|
-
[32mESM[39m [1mdist/components/ui/separator.mjs.map [22m[32m1.50 KB[39m
|
|
37
|
-
[32mESM[39m [1mdist/components/ui/sheet.mjs.map [22m[32m6.49 KB[39m
|
|
38
|
-
[32mESM[39m [1mdist/components/ui/theme-toggle.mjs.map [22m[32m5.51 KB[39m
|
|
39
|
-
[32mESM[39m ⚡️ Build success in 351ms
|
|
40
|
-
[32mCJS[39m [1mdist/index.js [22m[32m34.82 KB[39m
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m35.10 KB[39m
|
|
41
14
|
[32mCJS[39m [1mdist/lib/utils.js [22m[32m620.00 B[39m
|
|
42
15
|
[32mCJS[39m [1mdist/components/ui/alert.js [22m[32m1.65 KB[39m
|
|
43
16
|
[32mCJS[39m [1mdist/components/ui/avatar.js [22m[32m1.34 KB[39m
|
|
44
17
|
[32mCJS[39m [1mdist/components/ui/badge.js [22m[32m1.78 KB[39m
|
|
45
18
|
[32mCJS[39m [1mdist/components/ui/button.js [22m[32m1.94 KB[39m
|
|
46
19
|
[32mCJS[39m [1mdist/components/ui/card.js [22m[32m1.85 KB[39m
|
|
47
|
-
[32mCJS[39m [1mdist/components/ui/dropdown-menu.js [22m[32m6.
|
|
20
|
+
[32mCJS[39m [1mdist/components/ui/dropdown-menu.js [22m[32m6.77 KB[39m
|
|
48
21
|
[32mCJS[39m [1mdist/components/ui/input.js [22m[32m1.37 KB[39m
|
|
49
22
|
[32mCJS[39m [1mdist/components/ui/label.js [22m[32m1.14 KB[39m
|
|
50
23
|
[32mCJS[39m [1mdist/components/ui/separator.js [22m[32m1.18 KB[39m
|
|
51
24
|
[32mCJS[39m [1mdist/components/ui/sheet.js [22m[32m3.36 KB[39m
|
|
52
|
-
[32mCJS[39m [1mdist/components/ui/theme-toggle.js [22m[32m2.
|
|
53
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
25
|
+
[32mCJS[39m [1mdist/components/ui/theme-toggle.js [22m[32m2.72 KB[39m
|
|
26
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m100.15 KB[39m
|
|
54
27
|
[32mCJS[39m [1mdist/lib/utils.js.map [22m[32m520.00 B[39m
|
|
55
28
|
[32mCJS[39m [1mdist/components/ui/alert.js.map [22m[32m3.00 KB[39m
|
|
56
29
|
[32mCJS[39m [1mdist/components/ui/avatar.js.map [22m[32m2.30 KB[39m
|
|
57
30
|
[32mCJS[39m [1mdist/components/ui/badge.js.map [22m[32m2.78 KB[39m
|
|
58
31
|
[32mCJS[39m [1mdist/components/ui/button.js.map [22m[32m3.17 KB[39m
|
|
59
32
|
[32mCJS[39m [1mdist/components/ui/card.js.map [22m[32m3.80 KB[39m
|
|
60
|
-
[32mCJS[39m [1mdist/components/ui/dropdown-menu.js.map [22m[32m14.
|
|
33
|
+
[32mCJS[39m [1mdist/components/ui/dropdown-menu.js.map [22m[32m14.87 KB[39m
|
|
61
34
|
[32mCJS[39m [1mdist/components/ui/input.js.map [22m[32m1.78 KB[39m
|
|
62
35
|
[32mCJS[39m [1mdist/components/ui/label.js.map [22m[32m1.43 KB[39m
|
|
63
36
|
[32mCJS[39m [1mdist/components/ui/separator.js.map [22m[32m1.63 KB[39m
|
|
64
37
|
[32mCJS[39m [1mdist/components/ui/sheet.js.map [22m[32m6.76 KB[39m
|
|
65
|
-
[32mCJS[39m [1mdist/components/ui/theme-toggle.js.map [22m[32m5.
|
|
66
|
-
[32mCJS[39m ⚡️ Build success in
|
|
38
|
+
[32mCJS[39m [1mdist/components/ui/theme-toggle.js.map [22m[32m5.62 KB[39m
|
|
39
|
+
[32mCJS[39m ⚡️ Build success in 253ms
|
|
40
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m32.60 KB[39m
|
|
41
|
+
[32mESM[39m [1mdist/lib/utils.mjs [22m[32m166.00 B[39m
|
|
42
|
+
[32mESM[39m [1mdist/components/ui/alert.mjs [22m[32m1.19 KB[39m
|
|
43
|
+
[32mESM[39m [1mdist/components/ui/avatar.mjs [22m[32m749.00 B[39m
|
|
44
|
+
[32mESM[39m [1mdist/components/ui/badge.mjs [22m[32m1.34 KB[39m
|
|
45
|
+
[32mESM[39m [1mdist/components/ui/button.mjs [22m[32m1.36 KB[39m
|
|
46
|
+
[32mESM[39m [1mdist/components/ui/card.mjs [22m[32m1.35 KB[39m
|
|
47
|
+
[32mESM[39m [1mdist/components/ui/dropdown-menu.mjs [22m[32m6.02 KB[39m
|
|
48
|
+
[32mESM[39m [1mdist/components/ui/label.mjs [22m[32m566.00 B[39m
|
|
49
|
+
[32mESM[39m [1mdist/components/ui/separator.mjs [22m[32m604.00 B[39m
|
|
50
|
+
[32mESM[39m [1mdist/components/ui/sheet.mjs [22m[32m2.68 KB[39m
|
|
51
|
+
[32mESM[39m [1mdist/components/ui/theme-toggle.mjs [22m[32m2.13 KB[39m
|
|
52
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m100.74 KB[39m
|
|
53
|
+
[32mESM[39m [1mdist/components/ui/input.mjs [22m[32m949.00 B[39m
|
|
54
|
+
[32mESM[39m [1mdist/lib/utils.mjs.map [22m[32m415.00 B[39m
|
|
55
|
+
[32mESM[39m [1mdist/components/ui/alert.mjs.map [22m[32m2.82 KB[39m
|
|
56
|
+
[32mESM[39m [1mdist/components/ui/avatar.mjs.map [22m[32m2.12 KB[39m
|
|
57
|
+
[32mESM[39m [1mdist/components/ui/badge.mjs.map [22m[32m2.62 KB[39m
|
|
58
|
+
[32mESM[39m [1mdist/components/ui/button.mjs.map [22m[32m3.01 KB[39m
|
|
59
|
+
[32mESM[39m [1mdist/components/ui/card.mjs.map [22m[32m3.54 KB[39m
|
|
60
|
+
[32mESM[39m [1mdist/components/ui/label.mjs.map [22m[32m1.31 KB[39m
|
|
61
|
+
[32mESM[39m [1mdist/components/ui/separator.mjs.map [22m[32m1.50 KB[39m
|
|
62
|
+
[32mESM[39m [1mdist/components/ui/sheet.mjs.map [22m[32m6.49 KB[39m
|
|
63
|
+
[32mESM[39m [1mdist/components/ui/theme-toggle.mjs.map [22m[32m5.56 KB[39m
|
|
64
|
+
[32mESM[39m [1mdist/components/ui/input.mjs.map [22m[32m1.65 KB[39m
|
|
65
|
+
[32mESM[39m [1mdist/components/ui/dropdown-menu.mjs.map [22m[32m14.41 KB[39m
|
|
66
|
+
[32mESM[39m ⚡️ Build success in 258ms
|
|
67
67
|
[34mDTS[39m Build start
|
|
68
|
-
[32mDTS[39m ⚡️ Build success in
|
|
68
|
+
[32mDTS[39m ⚡️ Build success in 15647ms
|
|
69
69
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m4.66 KB[39m
|
|
70
70
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m4.66 KB[39m
|
|
71
71
|
|
|
72
|
-
> @authdog/react-elements@0.0.
|
|
72
|
+
> @authdog/react-elements@0.0.49 build:styles /home/runner/work/web-sdk/web-sdk/packages/react-elements
|
|
73
73
|
> postcss src/global.css -o dist/styles.css
|
|
74
74
|
|
|
75
75
|
Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @authdog/react-elements
|
|
2
2
|
|
|
3
|
+
## 0.0.49
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8d39e01: Fix display avatar menu
|
|
8
|
+
|
|
9
|
+
## 0.0.48
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 1be5751: Fix cursor nav elements
|
|
14
|
+
- 3c9f2fc: Enhance display dropdown avatar
|
|
15
|
+
|
|
3
16
|
## 0.0.47
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";"use client";var N=Object.create;var m=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var T=(e,o)=>{for(var n in o)m(e,n,{get:o[n],enumerable:!0})},u=(e,o,n,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of I(o))!z.call(e,d)&&d!==n&&m(e,d,{get:()=>o[d],enumerable:!(i=S(o,d))||i.enumerable});return e};var c=(e,o,n)=>(n=e!=null?N(G(e)):{},u(o||!e||!e.__esModule?m(n,"default",{value:e,enumerable:!0}):n,e)),k=e=>u(m({},"__esModule",{value:!0}),e);var H={};T(H,{DropdownMenu:()=>_,DropdownMenuCheckboxItem:()=>M,DropdownMenuContent:()=>v,DropdownMenuGroup:()=>R,DropdownMenuItem:()=>P,DropdownMenuLabel:()=>y,DropdownMenuPortal:()=>L,DropdownMenuRadioGroup:()=>
|
|
2
|
+
"use strict";"use client";var N=Object.create;var m=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var T=(e,o)=>{for(var n in o)m(e,n,{get:o[n],enumerable:!0})},u=(e,o,n,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of I(o))!z.call(e,d)&&d!==n&&m(e,d,{get:()=>o[d],enumerable:!(i=S(o,d))||i.enumerable});return e};var c=(e,o,n)=>(n=e!=null?N(G(e)):{},u(o||!e||!e.__esModule?m(n,"default",{value:e,enumerable:!0}):n,e)),k=e=>u(m({},"__esModule",{value:!0}),e);var H={};T(H,{DropdownMenu:()=>_,DropdownMenuCheckboxItem:()=>M,DropdownMenuContent:()=>v,DropdownMenuGroup:()=>R,DropdownMenuItem:()=>P,DropdownMenuLabel:()=>y,DropdownMenuPortal:()=>L,DropdownMenuRadioGroup:()=>g,DropdownMenuRadioItem:()=>D,DropdownMenuSeparator:()=>b,DropdownMenuShortcut:()=>h,DropdownMenuSub:()=>j,DropdownMenuSubContent:()=>C,DropdownMenuSubTrigger:()=>x,DropdownMenuTrigger:()=>w});module.exports=k(H);var a=c(require("react")),t=c(require("@radix-ui/react-dropdown-menu")),p=require("lucide-react");var l=require("clsx"),f=require("tailwind-merge");function s(...e){return(0,f.twMerge)((0,l.clsx)(e))}var r=require("react/jsx-runtime"),E=p.Check,W=p.Circle,V=p.ChevronRight;function _({...e}){return(0,r.jsx)(t.Root,{"data-slot":"dropdown-menu",...e})}function L({...e}){return(0,r.jsx)(t.Portal,{"data-slot":"dropdown-menu-portal",...e})}var w=a.forwardRef(({...e},o)=>(0,r.jsx)(t.Trigger,{ref:o,"data-slot":"dropdown-menu-trigger",...e}));w.displayName=t.Trigger.displayName;var v=a.forwardRef(({className:e,sideOffset:o=4,...n},i)=>(0,r.jsx)(t.Portal,{children:(0,r.jsx)(t.Content,{ref:i,"data-slot":"dropdown-menu-content",sideOffset:o,className:s("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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})}));v.displayName=t.Content.displayName;var R=a.forwardRef(({...e},o)=>(0,r.jsx)(t.Group,{ref:o,"data-slot":"dropdown-menu-group",...e}));R.displayName=t.Group.displayName;var P=a.forwardRef(({className:e,inset:o,variant:n="default",...i},d)=>(0,r.jsx)(t.Item,{ref:d,"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":n,className:s("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground focus:[&_svg:not([class*='text-'])]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i}));P.displayName=t.Item.displayName;var M=a.forwardRef(({className:e,children:o,checked:n,...i},d)=>(0,r.jsxs)(t.CheckboxItem,{ref:d,"data-slot":"dropdown-menu-checkbox-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...i,children:[(0,r.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,r.jsx)(t.ItemIndicator,{children:(0,r.jsx)(E,{className:"size-4"})})}),o]}));M.displayName=t.CheckboxItem.displayName;var g=a.forwardRef(({...e},o)=>(0,r.jsx)(t.RadioGroup,{ref:o,"data-slot":"dropdown-menu-radio-group",...e}));g.displayName=t.RadioGroup.displayName;var D=a.forwardRef(({className:e,children:o,...n},i)=>(0,r.jsxs)(t.RadioItem,{ref:i,"data-slot":"dropdown-menu-radio-item",className:s("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[(0,r.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,r.jsx)(t.ItemIndicator,{children:(0,r.jsx)(W,{className:"size-2 fill-current"})})}),o]}));D.displayName=t.RadioItem.displayName;var y=a.forwardRef(({className:e,inset:o,...n},i)=>(0,r.jsx)(t.Label,{ref:i,"data-slot":"dropdown-menu-label","data-inset":o,className:s("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n}));y.displayName=t.Label.displayName;var b=a.forwardRef(({className:e,...o},n)=>(0,r.jsx)(t.Separator,{ref:n,"data-slot":"dropdown-menu-separator",className:s("bg-border -mx-1 my-1 h-px",e),...o}));b.displayName=t.Separator.displayName;var h=a.forwardRef(({className:e,...o},n)=>(0,r.jsx)("span",{ref:n,"data-slot":"dropdown-menu-shortcut",className:s("text-muted-foreground ml-auto text-xs tracking-widest",e),...o}));h.displayName="DropdownMenuShortcut";function j({...e}){return(0,r.jsx)(t.Sub,{"data-slot":"dropdown-menu-sub",...e})}var x=a.forwardRef(({className:e,inset:o,children:n,...i},d)=>(0,r.jsxs)(t.SubTrigger,{ref:d,"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:s("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...i,children:[n,(0,r.jsx)(V,{className:"ml-auto size-4"})]}));x.displayName=t.SubTrigger.displayName;var C=a.forwardRef(({className:e,...o},n)=>(0,r.jsx)(t.SubContent,{ref:n,"data-slot":"dropdown-menu-sub-content",className:s("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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...o}));C.displayName=t.SubContent.displayName;
|
|
3
3
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/dropdown-menu.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst ChevronRightIcon = ChevronRight as ComponentType<\n React.SVGProps<SVGSVGElement>\n>;\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nconst DropdownMenuTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Trigger\n ref={ref}\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n));\nDropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<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 data-slot=\"dropdown-menu-content\"\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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Group\n ref={ref}\n data-slot=\"dropdown-menu-group\"\n {...props}\n />\n));\nDropdownMenuGroup.displayName = DropdownMenuPrimitive.Group.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n }\n>(({ className, inset, variant = \"default\", ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.RadioGroup\n ref={ref}\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n));\nDropdownMenuRadioGroup.displayName =\n DropdownMenuPrimitive.RadioGroup.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-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.ElementRef<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 data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<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 data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n data-slot=\"dropdown-menu-sub-content\"\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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,EAAA,6BAAAC,EAAA,wBAAAC,EAAA,sBAAAC,EAAA,qBAAAC,EAAA,sBAAAC,EAAA,uBAAAC,EAAA,2BAAAC,EAAA,0BAAAC,EAAA,0BAAAC,EAAA,yBAAAC,EAAA,oBAAAC,EAAA,2BAAAC,EAAA,2BAAAC,EAAA,wBAAAC,IAAA,eAAAC,EAAAjB,GAEA,IAAAkB,EAAuB,oBACvBC,EAAuC,4CACvCC,EAA4C,wBCJ5C,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDaS,IAAAC,EAAA,6BATHC,EAAY,QACZC,EAAa,SACbC,EAAmB,eAIzB,SAASC,EAAa,CACpB,GAAGC,CACL,EAA4D,CAC1D,SAAO,OAAuB,OAAtB,CAA2B,YAAU,gBAAiB,GAAGA,EAAO,CAC1E,CAEA,SAASC,EAAmB,CAC1B,GAAGD,CACL,EAA8D,CAC5D,SACE,OAAuB,SAAtB,CAA6B,YAAU,uBAAwB,GAAGA,EAAO,CAE9E,CAEA,IAAME,EAA4B,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AAKA,EACL,YAAU,4BACV,aAAYO,EACZ,UAAWH,EACT,iOACAF,CACF,EACC,GAAGL,EAEH,UAAAa,KACD,OAACf,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CACD,EACDuB,EAAuB,YACC,aAAW,YAEnC,IAAMC,EAA+B,aAGnC,CAAC,CAAE,UAAAjB,EAAW,GAAGL,CAAM,EAAGG,OAC1B,OAAuB,aAAtB,CACC,IAAKA,EACL,YAAU,4BACV,UAAWI,EACT,gfACAF,CACF,EACC,GAAGL,EACN,CACD,EACDsB,EAAuB,YACC,aAAW","names":["dropdown_menu_exports","__export","DropdownMenu","DropdownMenuCheckboxItem","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuLabel","DropdownMenuPortal","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubContent","DropdownMenuSubTrigger","DropdownMenuTrigger","__toCommonJS","React","DropdownMenuPrimitive","import_lucide_react","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","CheckIcon","CircleIcon","ChevronRightIcon","DropdownMenu","props","DropdownMenuPortal","DropdownMenuTrigger","ref","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/dropdown-menu.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst ChevronRightIcon = ChevronRight as ComponentType<\n React.SVGProps<SVGSVGElement>\n>;\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nconst DropdownMenuTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Trigger\n ref={ref}\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n));\nDropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<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 data-slot=\"dropdown-menu-content\"\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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Group\n ref={ref}\n data-slot=\"dropdown-menu-group\"\n {...props}\n />\n));\nDropdownMenuGroup.displayName = DropdownMenuPrimitive.Group.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n }\n>(({ className, inset, variant = \"default\", ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground focus:[&_svg:not([class*='text-'])]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.RadioGroup\n ref={ref}\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n));\nDropdownMenuRadioGroup.displayName =\n DropdownMenuPrimitive.RadioGroup.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-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.ElementRef<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 data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<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 data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n data-slot=\"dropdown-menu-sub-content\"\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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,EAAA,6BAAAC,EAAA,wBAAAC,EAAA,sBAAAC,EAAA,qBAAAC,EAAA,sBAAAC,EAAA,uBAAAC,EAAA,2BAAAC,EAAA,0BAAAC,EAAA,0BAAAC,EAAA,yBAAAC,EAAA,oBAAAC,EAAA,2BAAAC,EAAA,2BAAAC,EAAA,wBAAAC,IAAA,eAAAC,EAAAjB,GAEA,IAAAkB,EAAuB,oBACvBC,EAAuC,4CACvCC,EAA4C,wBCJ5C,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDaS,IAAAC,EAAA,6BATHC,EAAY,QACZC,EAAa,SACbC,EAAmB,eAIzB,SAASC,EAAa,CACpB,GAAGC,CACL,EAA4D,CAC1D,SAAO,OAAuB,OAAtB,CAA2B,YAAU,gBAAiB,GAAGA,EAAO,CAC1E,CAEA,SAASC,EAAmB,CAC1B,GAAGD,CACL,EAA8D,CAC5D,SACE,OAAuB,SAAtB,CAA6B,YAAU,uBAAwB,GAAGA,EAAO,CAE9E,CAEA,IAAME,EAA4B,aAGhC,CAAC,CAAE,GAAGF,CAAM,EAAGG,OACf,OAAuB,UAAtB,CACC,IAAKA,EACL,YAAU,wBACT,GAAGH,EACN,CACD,EACDE,EAAoB,YAAoC,UAAQ,YAEhE,IAAME,EAA4B,aAGhC,CAAC,CAAE,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGN,CAAM,EAAGG,OAC1C,OAAuB,SAAtB,CACC,mBAAuB,UAAtB,CACC,IAAKA,EACL,YAAU,wBACV,WA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,gfACAF,CACF,EACC,GAAGL,EACN,CACD,EACDsB,EAAuB,YACC,aAAW","names":["dropdown_menu_exports","__export","DropdownMenu","DropdownMenuCheckboxItem","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuLabel","DropdownMenuPortal","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubContent","DropdownMenuSubTrigger","DropdownMenuTrigger","__toCommonJS","React","DropdownMenuPrimitive","import_lucide_react","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","CheckIcon","CircleIcon","ChevronRightIcon","DropdownMenu","props","DropdownMenuPortal","DropdownMenuTrigger","ref","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import*as i from"react";import*as e from"@radix-ui/react-dropdown-menu";import{Check as c,ChevronRight as l,Circle as f}from"lucide-react";import{clsx as m}from"clsx";import{twMerge as u}from"tailwind-merge";function d(...t){return u(m(t))}import{jsx as n,jsxs as
|
|
2
|
+
"use client";import*as i from"react";import*as e from"@radix-ui/react-dropdown-menu";import{Check as c,ChevronRight as l,Circle as f}from"lucide-react";import{clsx as m}from"clsx";import{twMerge as u}from"tailwind-merge";function d(...t){return u(m(t))}import{jsx as n,jsxs as p}from"react/jsx-runtime";var w=c,v=f,R=l;function W({...t}){return n(e.Root,{"data-slot":"dropdown-menu",...t})}function V({...t}){return n(e.Portal,{"data-slot":"dropdown-menu-portal",...t})}var P=i.forwardRef(({...t},o)=>n(e.Trigger,{ref:o,"data-slot":"dropdown-menu-trigger",...t}));P.displayName=e.Trigger.displayName;var M=i.forwardRef(({className:t,sideOffset:o=4,...r},a)=>n(e.Portal,{children:n(e.Content,{ref:a,"data-slot":"dropdown-menu-content",sideOffset:o,className:d("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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...r})}));M.displayName=e.Content.displayName;var g=i.forwardRef(({...t},o)=>n(e.Group,{ref:o,"data-slot":"dropdown-menu-group",...t}));g.displayName=e.Group.displayName;var D=i.forwardRef(({className:t,inset:o,variant:r="default",...a},s)=>n(e.Item,{ref:s,"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":r,className:d("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground focus:[&_svg:not([class*='text-'])]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...a}));D.displayName=e.Item.displayName;var y=i.forwardRef(({className:t,children:o,checked:r,...a},s)=>p(e.CheckboxItem,{ref:s,"data-slot":"dropdown-menu-checkbox-item",className:d("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:r,...a,children:[n("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:n(e.ItemIndicator,{children:n(w,{className:"size-4"})})}),o]}));y.displayName=e.CheckboxItem.displayName;var b=i.forwardRef(({...t},o)=>n(e.RadioGroup,{ref:o,"data-slot":"dropdown-menu-radio-group",...t}));b.displayName=e.RadioGroup.displayName;var h=i.forwardRef(({className:t,children:o,...r},a)=>p(e.RadioItem,{ref:a,"data-slot":"dropdown-menu-radio-item",className:d("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[n("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:n(e.ItemIndicator,{children:n(v,{className:"size-2 fill-current"})})}),o]}));h.displayName=e.RadioItem.displayName;var x=i.forwardRef(({className:t,inset:o,...r},a)=>n(e.Label,{ref:a,"data-slot":"dropdown-menu-label","data-inset":o,className:d("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r}));x.displayName=e.Label.displayName;var C=i.forwardRef(({className:t,...o},r)=>n(e.Separator,{ref:r,"data-slot":"dropdown-menu-separator",className:d("bg-border -mx-1 my-1 h-px",t),...o}));C.displayName=e.Separator.displayName;var N=i.forwardRef(({className:t,...o},r)=>n("span",{ref:r,"data-slot":"dropdown-menu-shortcut",className:d("text-muted-foreground ml-auto text-xs tracking-widest",t),...o}));N.displayName="DropdownMenuShortcut";function _({...t}){return n(e.Sub,{"data-slot":"dropdown-menu-sub",...t})}var S=i.forwardRef(({className:t,inset:o,children:r,...a},s)=>p(e.SubTrigger,{ref:s,"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:d("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",t),...a,children:[r,n(R,{className:"ml-auto size-4"})]}));S.displayName=e.SubTrigger.displayName;var I=i.forwardRef(({className:t,...o},r)=>n(e.SubContent,{ref:r,"data-slot":"dropdown-menu-sub-content",className:d("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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),...o}));I.displayName=e.SubContent.displayName;export{W as DropdownMenu,y as DropdownMenuCheckboxItem,M as DropdownMenuContent,g as DropdownMenuGroup,D as DropdownMenuItem,x as DropdownMenuLabel,V as DropdownMenuPortal,b as DropdownMenuRadioGroup,h as DropdownMenuRadioItem,C as DropdownMenuSeparator,N as DropdownMenuShortcut,_ as DropdownMenuSub,I as DropdownMenuSubContent,S as DropdownMenuSubTrigger,P as DropdownMenuTrigger};
|
|
3
3
|
//# sourceMappingURL=dropdown-menu.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/dropdown-menu.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst ChevronRightIcon = ChevronRight as ComponentType<\n React.SVGProps<SVGSVGElement>\n>;\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nconst DropdownMenuTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Trigger\n ref={ref}\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n));\nDropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<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 data-slot=\"dropdown-menu-content\"\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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Group\n ref={ref}\n data-slot=\"dropdown-menu-group\"\n {...props}\n />\n));\nDropdownMenuGroup.displayName = DropdownMenuPrimitive.Group.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n }\n>(({ className, inset, variant = \"default\", ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.RadioGroup\n ref={ref}\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n));\nDropdownMenuRadioGroup.displayName =\n DropdownMenuPrimitive.RadioGroup.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-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.ElementRef<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 data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<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 data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n data-slot=\"dropdown-menu-sub-content\"\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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";aAEA,UAAYA,MAAW,QACvB,UAAYC,MAA2B,gCACvC,OAAS,SAAAC,EAAO,gBAAAC,EAAc,UAAAC,MAAc,eCJ5C,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDaS,cAAAC,EA+EP,QAAAC,MA/EO,oBATT,IAAMC,EAAYC,EACZC,EAAaC,EACbC,EAAmBC,EAIzB,SAASC,EAAa,CACpB,GAAGC,CACL,EAA4D,CAC1D,OAAOT,EAAuB,OAAtB,CAA2B,YAAU,gBAAiB,GAAGS,EAAO,CAC1E,CAEA,SAASC,EAAmB,CAC1B,GAAGD,CACL,EAA8D,CAC5D,OACET,EAAuB,SAAtB,CAA6B,YAAU,uBAAwB,GAAGS,EAAO,CAE9E,CAEA,IAAME,EAA4B,aAGhC,CAAC,CAAE,GAAGF,CAAM,EAAGG,IACfZ,EAAuB,UAAtB,CACC,IAAKY,EACL,YAAU,wBACT,GAAGH,EACN,CACD,EACDE,EAAoB,YAAoC,UAAQ,YAEhE,IAAME,EAA4B,aAGhC,CAAC,CAAE,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGN,CAAM,EAAGG,IAC1CZ,EAAuB,SAAtB,CACC,SAAAA,EAAuB,UAAtB,CACC,IAAKY,EACL,YAAU,wBACV,WAAYG,EACZ,UAAWC,EACT,yjBACAF,CACF,EACC,GAAGL,EACN,EACF,CACD,EACDI,EAAoB,YAAoC,UAAQ,YAEhE,IAAMI,EAA0B,aAG9B,CAAC,CAAE,GAAGR,CAAM,EAAGG,IACfZ,EAAuB,QAAtB,CACC,IAAKY,EACL,YAAU,sBACT,GAAGH,EACN,CACD,EACDQ,EAAkB,YAAoC,QAAM,YAE5D,IAAMC,EAAyB,aAM7B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AAWH,EACT,oDACAF,CACF,EACC,GAAGL,EACN,CACD,EACDiB,EAAkB,YAAoC,QAAM,YAE5D,IAAMC,EAA8B,aAGlC,CAAC,CAAE,UAAAb,EAAW,GAAGL,CAAM,EAAGG,IAC1BZ,EAAuB,YAAtB,CACC,IAAKY,EACL,YAAU,0BACV,UAAWI,EAAG,4BAA6BF,CAAS,EACnD,GAAGL,EACN,CACD,EACDkB,EAAsB,YAAoC,YAAU,YAEpE,IAAMC,EAA6B,aAGjC,CAAC,CAAE,UAAAd,EAAW,GAAGL,CAAM,EAAGG,IAC1BZ,EAAC,QACC,IAAKY,EACL,YAAU,yBACV,UAAWI,EACT,wDACAF,CACF,EACC,GAAGL,EACN,CACD,EACDmB,EAAqB,YAAc,uBAEnC,SAASC,EAAgB,CACvB,GAAGpB,CACL,EAA2D,CACzD,OAAOT,EAAuB,MAAtB,CAA0B,YAAU,oBAAqB,GAAGS,EAAO,CAC7E,CAEA,IAAMqB,EAA+B,aAKnC,CAAC,CAAE,UAAAhB,EAAW,MAAAK,EAAO,SAAAG,EAAU,GAAGb,CAAM,EAAGG,IAC3CX,EAAuB,aAAtB,CACC,IAAKW,EACL,YAAU,4BACV,aAAYO,EACZ,UAAWH,EACT,iOACAF,CACF,EACC,GAAGL,EAEH,UAAAa,EACDtB,EAACM,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CACD,EACDwB,EAAuB,YACC,aAAW,YAEnC,IAAMC,EAA+B,aAGnC,CAAC,CAAE,UAAAjB,EAAW,GAAGL,CAAM,EAAGG,IAC1BZ,EAAuB,aAAtB,CACC,IAAKY,EACL,YAAU,4BACV,UAAWI,EACT,gfACAF,CACF,EACC,GAAGL,EACN,CACD,EACDsB,EAAuB,YACC,aAAW","names":["React","DropdownMenuPrimitive","Check","ChevronRight","Circle","clsx","twMerge","cn","inputs","jsx","jsxs","CheckIcon","Check","CircleIcon","Circle","ChevronRightIcon","ChevronRight","DropdownMenu","props","DropdownMenuPortal","DropdownMenuTrigger","ref","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/dropdown-menu.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { ComponentType } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement>>;\nconst ChevronRightIcon = ChevronRight as ComponentType<\n React.SVGProps<SVGSVGElement>\n>;\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nconst DropdownMenuTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Trigger\n ref={ref}\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n));\nDropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<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 data-slot=\"dropdown-menu-content\"\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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.Group\n ref={ref}\n data-slot=\"dropdown-menu-group\"\n {...props}\n />\n));\nDropdownMenuGroup.displayName = DropdownMenuPrimitive.Group.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n }\n>(({ className, inset, variant = \"default\", ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground focus:[&_svg:not([class*='text-'])]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>\n>(({ ...props }, ref) => (\n <DropdownMenuPrimitive.RadioGroup\n ref={ref}\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n));\nDropdownMenuRadioGroup.displayName =\n DropdownMenuPrimitive.RadioGroup.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-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.ElementRef<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 data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = React.forwardRef<\n HTMLSpanElement,\n React.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<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 data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n data-slot=\"dropdown-menu-sub-content\"\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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";aAEA,UAAYA,MAAW,QACvB,UAAYC,MAA2B,gCACvC,OAAS,SAAAC,EAAO,gBAAAC,EAAc,UAAAC,MAAc,eCJ5C,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDaS,cAAAC,EA+EP,QAAAC,MA/EO,oBATT,IAAMC,EAAYC,EACZC,EAAaC,EACbC,EAAmBC,EAIzB,SAASC,EAAa,CACpB,GAAGC,CACL,EAA4D,CAC1D,OAAOT,EAAuB,OAAtB,CAA2B,YAAU,gBAAiB,GAAGS,EAAO,CAC1E,CAEA,SAASC,EAAmB,CAC1B,GAAGD,CACL,EAA8D,CAC5D,OACET,EAAuB,SAAtB,CAA6B,YAAU,uBAAwB,GAAGS,EAAO,CAE9E,CAEA,IAAME,E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K,EAAO,SAAAG,EAAU,GAAGb,CAAM,EAAGG,IAC3CX,EAAuB,aAAtB,CACC,IAAKW,EACL,YAAU,4BACV,aAAYO,EACZ,UAAWH,EACT,iOACAF,CACF,EACC,GAAGL,EAEH,UAAAa,EACDtB,EAACM,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CACD,EACDwB,EAAuB,YACC,aAAW,YAEnC,IAAMC,EAA+B,aAGnC,CAAC,CAAE,UAAAjB,EAAW,GAAGL,CAAM,EAAGG,IAC1BZ,EAAuB,aAAtB,CACC,IAAKY,EACL,YAAU,4BACV,UAAWI,EACT,gfACAF,CACF,EACC,GAAGL,EACN,CACD,EACDsB,EAAuB,YACC,aAAW","names":["React","DropdownMenuPrimitive","Check","ChevronRight","Circle","clsx","twMerge","cn","inputs","jsx","jsxs","CheckIcon","Check","CircleIcon","Circle","ChevronRightIcon","ChevronRight","DropdownMenu","props","DropdownMenuPortal","DropdownMenuTrigger","ref","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";"use client";var x=Object.create;var a=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var o in t)a(e,o,{get:t[o],enumerable:!0})},l=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of M(t))!B.call(e,n)&&n!==o&&a(e,n,{get:()=>t[n],enumerable:!(r=k(t,n))||r.enumerable});return e};var V=(e,t,o)=>(o=e!=null?x(T(e)):{},l(t||!e||!e.__esModule?a(o,"default",{value:e,enumerable:!0}):o,e)),C=e=>l(a({},"__esModule",{value:!0}),e);var
|
|
2
|
+
"use strict";"use client";var x=Object.create;var a=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var o in t)a(e,o,{get:t[o],enumerable:!0})},l=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of M(t))!B.call(e,n)&&n!==o&&a(e,n,{get:()=>t[n],enumerable:!(r=k(t,n))||r.enumerable});return e};var V=(e,t,o)=>(o=e!=null?x(T(e)):{},l(t||!e||!e.__esModule?a(o,"default",{value:e,enumerable:!0}):o,e)),C=e=>l(a({},"__esModule",{value:!0}),e);var R={};S(R,{ThemeToggle:()=>P});module.exports=C(R);var s=require("react"),d=require("lucide-react");var g=V(require("react")),h=require("@radix-ui/react-slot"),p=require("class-variance-authority");var u=require("clsx"),m=require("tailwind-merge");function f(...e){return(0,m.twMerge)((0,u.clsx)(e))}var b=require("react/jsx-runtime"),E=(0,p.cva)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=g.forwardRef(({className:e,variant:t,size:o,asChild:r=!1,...n},w)=>(0,b.jsx)(r?h.Slot:"button",{className:f(E({variant:t,size:o,className:e})),ref:w,...n}));c.displayName="Button";var i=require("react/jsx-runtime"),y="authdog-theme",N=()=>{if(typeof window>"u")return"light";let e=window.localStorage.getItem(y);return e==="light"||e==="dark"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},v=e=>{document.documentElement.classList.toggle("dark",e==="dark")},P=()=>{let[e,t]=(0,s.useState)("light");return(0,s.useEffect)(()=>{let r=N();v(r),t(r)},[]),(0,i.jsx)(c,{variant:"ghost",size:"icon",className:"cursor-pointer","aria-label":e==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>{let r=e==="dark"?"light":"dark";v(r);try{window.localStorage.setItem(y,r)}catch{}t(r)},children:e==="dark"?(0,i.jsx)(d.Sun,{className:"h-4 w-4"}):(0,i.jsx)(d.Moon,{className:"h-4 w-4"})})};
|
|
3
3
|
//# sourceMappingURL=theme-toggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/theme-toggle.tsx","../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"}\n onClick={toggle}\n >\n {mode === \"dark\" ? <Sun className=\"h-4 w-4\" /> : <Moon className=\"h-4 w-4\" />}\n </Button>\n );\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAAI,EAAoC,iBACpCC,EAA0B,wBCH1B,IAAAC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCCFvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDwCM,IAAAC,EAAA,6BAvCAC,KAAiB,OACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,OAGtD,OAFWF,EAAU,OAAO,SAE3B,CACC,UAAWG,EAAGR,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/theme-toggle.tsx","../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"cursor-pointer\"\n aria-label={mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"}\n onClick={toggle}\n >\n {mode === \"dark\" ? <Sun className=\"h-4 w-4\" /> : <Moon className=\"h-4 w-4\" />}\n </Button>\n );\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAAI,EAAoC,iBACpCC,EAA0B,wBCH1B,IAAAC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCCFvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDwCM,IAAAC,EAAA,6BAvCAC,KAAiB,OACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,OAGtD,OAFWF,EAAU,OAAO,SAE3B,CACC,UAAWG,EAAGR,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,SDDI,IAAAQ,EAAA,6BA7CnBC,EAAc,gBAIdC,EAAoB,IAAiB,CACzC,GAAI,OAAO,OAAW,IAAa,MAAO,QAC1C,IAAMC,EAAS,OAAO,aAAa,QAAQF,CAAW,EACtD,OAAIE,IAAW,SAAWA,IAAW,OAC5BA,EAEF,OAAO,WAAW,8BAA8B,EAAE,QAAU,OAAS,OAC9E,EAEMC,EAAcC,GAAoB,CACtC,SAAS,gBAAgB,UAAU,OAAO,OAAQA,IAAS,MAAM,CACnE,EAEaC,EAAc,IAAM,CAC/B,GAAM,CAACD,EAAME,CAAO,KAAI,YAAoB,OAAO,EAEnD,sBAAU,IAAM,CACd,IAAMC,EAAUN,EAAkB,EAClCE,EAAWI,CAAO,EAClBD,EAAQC,CAAO,CACjB,EAAG,CAAC,CAAC,KAcH,OAACC,EAAA,CACC,QAAQ,QACR,KAAK,OACL,UAAU,iBACV,aAAYJ,IAAS,OAAS,wBAA0B,uBACxD,QAjBW,IAAM,CACnB,IAAMK,EAAsBL,IAAS,OAAS,QAAU,OACxDD,EAAWM,CAAQ,EACnB,GAAI,CACF,OAAO,aAAa,QAAQT,EAAaS,CAAQ,CACnD,MAAQ,CAER,CACAH,EAAQG,CAAQ,CAClB,EAUK,SAAAL,IAAS,UAAS,OAAC,OAAI,UAAU,UAAU,KAAK,OAAC,QAAK,UAAU,UAAU,EAC7E,CAEJ","names":["theme_toggle_exports","__export","ThemeToggle","__toCommonJS","import_react","import_lucide_react","React","import_react_slot","import_class_variance_authority","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","buttonVariants","Button","className","variant","size","asChild","props","ref","cn","import_jsx_runtime","STORAGE_KEY","getPreferredTheme","stored","applyTheme","mode","ThemeToggle","setMode","initial","Button","nextMode"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{useEffect as v,useState as y}from"react";import{Sun as w,Moon as x}from"lucide-react";import*as s from"react";import{Slot as g}from"@radix-ui/react-slot";import{cva as h}from"class-variance-authority";import{clsx as m}from"clsx";import{twMerge as f}from"tailwind-merge";function i(...e){return f(m(e))}import{jsx as b}from"react/jsx-runtime";var p=h("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),r=s.forwardRef(({className:e,variant:o,size:a,asChild:t=!1,...l},u)=>b(t?g:"button",{className:i(p({variant:o,size:a,className:e})),ref:u,...l}));r.displayName="Button";import{jsx as n}from"react/jsx-runtime";var c="authdog-theme",k=()=>{if(typeof window>"u")return"light";let e=window.localStorage.getItem(c);return e==="light"||e==="dark"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},d=e=>{document.documentElement.classList.toggle("dark",e==="dark")},H=()=>{let[e,o]=y("light");return v(()=>{let t=k();d(t),o(t)},[]),n(r,{variant:"ghost",size:"icon","aria-label":e==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>{let t=e==="dark"?"light":"dark";d(t);try{window.localStorage.setItem(c,t)}catch{}o(t)},children:e==="dark"?n(w,{className:"h-4 w-4"}):n(x,{className:"h-4 w-4"})})};export{H as ThemeToggle};
|
|
2
|
+
"use client";import{useEffect as v,useState as y}from"react";import{Sun as w,Moon as x}from"lucide-react";import*as s from"react";import{Slot as g}from"@radix-ui/react-slot";import{cva as h}from"class-variance-authority";import{clsx as m}from"clsx";import{twMerge as f}from"tailwind-merge";function i(...e){return f(m(e))}import{jsx as b}from"react/jsx-runtime";var p=h("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),r=s.forwardRef(({className:e,variant:o,size:a,asChild:t=!1,...l},u)=>b(t?g:"button",{className:i(p({variant:o,size:a,className:e})),ref:u,...l}));r.displayName="Button";import{jsx as n}from"react/jsx-runtime";var c="authdog-theme",k=()=>{if(typeof window>"u")return"light";let e=window.localStorage.getItem(c);return e==="light"||e==="dark"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},d=e=>{document.documentElement.classList.toggle("dark",e==="dark")},H=()=>{let[e,o]=y("light");return v(()=>{let t=k();d(t),o(t)},[]),n(r,{variant:"ghost",size:"icon",className:"cursor-pointer","aria-label":e==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>{let t=e==="dark"?"light":"dark";d(t);try{window.localStorage.setItem(c,t)}catch{}o(t)},children:e==="dark"?n(w,{className:"h-4 w-4"}):n(x,{className:"h-4 w-4"})})};export{H as ThemeToggle};
|
|
3
3
|
//# sourceMappingURL=theme-toggle.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ui/theme-toggle.tsx","../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"}\n onClick={toggle}\n >\n {mode === \"dark\" ? <Sun className=\"h-4 w-4\" /> : <Moon className=\"h-4 w-4\" />}\n </Button>\n );\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";aAEA,OAAS,aAAAA,EAAW,YAAAC,MAAgB,QACpC,OAAS,OAAAC,EAAK,QAAAC,MAAY,eCH1B,UAAYC,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BCFvC,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDwCM,cAAAC,MAAA,oBAvCN,IAAMC,EAAiBC,EACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAGtDT,EAFWO,EAAUG,EAAO,SAE3B,CACC,UAAWC,EAAGV,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/theme-toggle.tsx","../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"cursor-pointer\"\n aria-label={mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"}\n onClick={toggle}\n >\n {mode === \"dark\" ? <Sun className=\"h-4 w-4\" /> : <Moon className=\"h-4 w-4\" />}\n </Button>\n );\n};\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \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nE,EAEaC,EAAc,IAAM,CAC/B,GAAM,CAACD,EAAME,CAAO,EAAIC,EAAoB,OAAO,EAEnD,OAAAC,EAAU,IAAM,CACd,IAAMC,EAAUR,EAAkB,EAClCE,EAAWM,CAAO,EAClBH,EAAQG,CAAO,CACjB,EAAG,CAAC,CAAC,EAcHV,EAACW,EAAA,CACC,QAAQ,QACR,KAAK,OACL,UAAU,iBACV,aAAYN,IAAS,OAAS,wBAA0B,uBACxD,QAjBW,IAAM,CACnB,IAAMO,EAAsBP,IAAS,OAAS,QAAU,OACxDD,EAAWQ,CAAQ,EACnB,GAAI,CACF,OAAO,aAAa,QAAQX,EAAaW,CAAQ,CACnD,MAAQ,CAER,CACAL,EAAQK,CAAQ,CAClB,EAUK,SAAAP,IAAS,OAASL,EAACa,EAAA,CAAI,UAAU,UAAU,EAAKb,EAACc,EAAA,CAAK,UAAU,UAAU,EAC7E,CAEJ","names":["useEffect","useState","Sun","Moon","React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn","jsx","STORAGE_KEY","getPreferredTheme","stored","applyTheme","mode","ThemeToggle","setMode","useState","useEffect","initial","Button","nextMode","Sun","Moon"]}
|