@fluencypassdevs/cycle 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -22
- package/dist/chunk-2EKU7RP4.js +18 -0
- package/dist/chunk-2EKU7RP4.js.map +1 -0
- package/dist/chunk-5AZSRHJE.js +180 -0
- package/dist/chunk-5AZSRHJE.js.map +1 -0
- package/dist/chunk-EF6FQT4Y.js +78 -0
- package/dist/chunk-EF6FQT4Y.js.map +1 -0
- package/dist/chunk-F2Q3E2ZM.js +102 -0
- package/dist/chunk-F2Q3E2ZM.js.map +1 -0
- package/dist/chunk-IGMII4BK.js +58 -0
- package/dist/chunk-IGMII4BK.js.map +1 -0
- package/dist/chunk-POQUVBVT.js +110 -0
- package/dist/chunk-POQUVBVT.js.map +1 -0
- package/dist/chunk-PY2BIZNB.js +52 -0
- package/dist/chunk-PY2BIZNB.js.map +1 -0
- package/dist/chunk-RI3ULQHH.js +91 -0
- package/dist/chunk-RI3ULQHH.js.map +1 -0
- package/dist/chunk-SZUWVHP4.js +187 -0
- package/dist/chunk-SZUWVHP4.js.map +1 -0
- package/dist/chunk-TZ7BEYQ7.js +147 -0
- package/dist/chunk-TZ7BEYQ7.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +10 -0
- package/dist/styles/tokens.css +89 -13
- package/dist/ui/alert-dialog.d.ts +23 -0
- package/dist/ui/alert-dialog.js +6 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +17 -0
- package/dist/ui/alert.js +7 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/checkbox.d.ts +1 -1
- package/dist/ui/dialog.d.ts +20 -0
- package/dist/ui/dialog.js +6 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/empty.d.ts +15 -0
- package/dist/ui/empty.js +5 -0
- package/dist/ui/empty.js.map +1 -0
- package/dist/ui/file-card.d.ts +1 -1
- package/dist/ui/like-dislike.d.ts +1 -1
- package/dist/ui/popover.d.ts +13 -0
- package/dist/ui/popover.js +5 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress-stage.d.ts +1 -1
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/radio-group.d.ts +1 -1
- package/dist/ui/resizable.d.ts +10 -0
- package/dist/ui/resizable.js +5 -0
- package/dist/ui/resizable.js.map +1 -0
- package/dist/ui/select.d.ts +18 -0
- package/dist/ui/select.js +5 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/skeleton.d.ts +5 -0
- package/dist/ui/skeleton.js +5 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.d.ts +1 -1
- package/dist/ui/sonner.d.ts +29 -0
- package/dist/ui/sonner.js +7 -0
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/switch.d.ts +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/tooltip.d.ts +10 -0
- package/dist/ui/tooltip.js +5 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/package.json +5 -3
- package/dist/styles/tailwind-theme.css +0 -87
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { CycleIcon } from './chunk-OT2HCBR2.js';
|
|
2
|
+
import { cn } from './chunk-TYCPXAXF.js';
|
|
3
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-YINJ5YZ5.js';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { X } from 'lucide-react';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var alertVariants = cva(
|
|
9
|
+
"relative grid w-full grid-cols-[0_1fr_auto] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "bg-card text-card-foreground",
|
|
14
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current",
|
|
15
|
+
positive: "theme-positive bg-card text-card-foreground border-border *:data-[slot=alert-description]:text-muted-foreground [&>svg]:text-current",
|
|
16
|
+
warning: "theme-warning bg-card text-card-foreground border-border *:data-[slot=alert-description]:text-muted-foreground [&>svg]:text-current",
|
|
17
|
+
critical: "theme-critical bg-card text-card-foreground border-border *:data-[slot=alert-description]:text-muted-foreground [&>svg]:text-current",
|
|
18
|
+
info: "theme-class bg-card text-card-foreground border-border *:data-[slot=alert-description]:text-muted-foreground [&>svg]:text-current"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "default"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
function Alert(_a) {
|
|
27
|
+
var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
"div",
|
|
30
|
+
__spreadValues({
|
|
31
|
+
"data-slot": "alert",
|
|
32
|
+
role: "alert",
|
|
33
|
+
className: cn(alertVariants({ variant }), className)
|
|
34
|
+
}, props)
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function AlertTitle(_a) {
|
|
38
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"div",
|
|
41
|
+
__spreadValues({
|
|
42
|
+
"data-slot": "alert-title",
|
|
43
|
+
className: cn(
|
|
44
|
+
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
45
|
+
className
|
|
46
|
+
)
|
|
47
|
+
}, props)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function AlertDescription(_a) {
|
|
51
|
+
var _b = _a, {
|
|
52
|
+
className
|
|
53
|
+
} = _b, props = __objRest(_b, [
|
|
54
|
+
"className"
|
|
55
|
+
]);
|
|
56
|
+
return /* @__PURE__ */ jsx(
|
|
57
|
+
"div",
|
|
58
|
+
__spreadValues({
|
|
59
|
+
"data-slot": "alert-description",
|
|
60
|
+
className: cn(
|
|
61
|
+
"col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",
|
|
62
|
+
className
|
|
63
|
+
)
|
|
64
|
+
}, props)
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function AlertAction(_a) {
|
|
68
|
+
var _b = _a, {
|
|
69
|
+
className
|
|
70
|
+
} = _b, props = __objRest(_b, [
|
|
71
|
+
"className"
|
|
72
|
+
]);
|
|
73
|
+
return /* @__PURE__ */ jsx(
|
|
74
|
+
"button",
|
|
75
|
+
__spreadValues({
|
|
76
|
+
"data-slot": "alert-action",
|
|
77
|
+
className: cn(
|
|
78
|
+
"col-start-2 mt-2 inline-flex h-8 items-center justify-center rounded-md border border-current/20 bg-transparent px-3 text-xs font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
79
|
+
className
|
|
80
|
+
)
|
|
81
|
+
}, props)
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
function AlertClose(_a) {
|
|
85
|
+
var _b = _a, {
|
|
86
|
+
className,
|
|
87
|
+
onClick
|
|
88
|
+
} = _b, props = __objRest(_b, [
|
|
89
|
+
"className",
|
|
90
|
+
"onClick"
|
|
91
|
+
]);
|
|
92
|
+
return /* @__PURE__ */ jsx(
|
|
93
|
+
"button",
|
|
94
|
+
__spreadProps(__spreadValues({
|
|
95
|
+
"data-slot": "alert-close",
|
|
96
|
+
"aria-label": "Fechar alerta",
|
|
97
|
+
className: cn(
|
|
98
|
+
"col-start-3 row-start-1 -mr-1 -mt-0.5 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
99
|
+
className
|
|
100
|
+
),
|
|
101
|
+
onClick
|
|
102
|
+
}, props), {
|
|
103
|
+
children: /* @__PURE__ */ jsx(CycleIcon, { icon: X, size: "xs", decorative: true })
|
|
104
|
+
})
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { Alert, AlertAction, AlertClose, AlertDescription, AlertTitle, alertVariants };
|
|
109
|
+
//# sourceMappingURL=chunk-POQUVBVT.js.map
|
|
110
|
+
//# sourceMappingURL=chunk-POQUVBVT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/alert.tsx"],"names":[],"mappings":";;;;;;;AAOA,IAAM,aAAA,GAAgB,GAAA;AAAA,EACpB,6OAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,8BAAA;AAAA,QACT,WAAA,EACE,mGAAA;AAAA,QACF,QAAA,EACE,sIAAA;AAAA,QACF,OAAA,EACE,qIAAA;AAAA,QACF,QAAA,EACE,sIAAA;AAAA,QACF,IAAA,EACE;AAAA;AACJ,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS;AAAA;AACX;AAEJ;AAMA,SAAS,MAAM,EAAA,EAA8C;AAA9C,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,aAAW,OAAA,EAnC5B,GAmCe,IAAyB,KAAA,GAAA,SAAA,CAAzB,EAAA,EAAyB,CAAvB,WAAA,EAAW,SAAA,CAAA,CAAA;AAC1B,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA,cAAA,CAAA;AAAA,MACC,WAAA,EAAU,OAAA;AAAA,MACV,IAAA,EAAK,OAAA;AAAA,MACL,WAAW,EAAA,CAAG,aAAA,CAAc,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W,EAAA,EAIe;AAJf,EAAA,IAAA,EAAA,GAAA,EAAA,EAClB;AAAA,IAAA,SAAA;AAAA,IACA;AAAA,GA7FF,GA2FoB,EAAA,EAGf,KAAA,GAAA,SAAA,CAHe,EAAA,EAGf;AAAA,IAFH,WAAA;AAAA,IACA;AAAA,GAAA,CAAA;AAGA,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA,aAAA,CAAA,cAAA,CAAA;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,YAAA,EAAW,eAAA;AAAA,MACX,SAAA,EAAW,EAAA;AAAA,QACT,0OAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA;AAAA,KAAA,EACI,KAAA,CAAA,EARL;AAAA,MAUC,8BAAC,SAAA,EAAA,EAAU,IAAA,EAAM,GAAG,IAAA,EAAK,IAAA,EAAK,YAAU,IAAA,EAAC;AAAA,KAAA;AAAA,GAC3C;AAEJ","file":"chunk-POQUVBVT.js","sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { CycleIcon } from \"@/components/icons\"\n\nconst alertVariants = cva(\n \"relative grid w-full grid-cols-[0_1fr_auto] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current\",\n positive:\n \"theme-positive bg-card text-card-foreground border-border *:data-[slot=alert-description]:text-muted-foreground [&>svg]:text-current\",\n warning:\n \"theme-warning bg-card text-card-foreground border-border *:data-[slot=alert-description]:text-muted-foreground [&>svg]:text-current\",\n critical:\n \"theme-critical bg-card text-card-foreground border-border *:data-[slot=alert-description]:text-muted-foreground [&>svg]:text-current\",\n info:\n \"theme-class bg-card text-card-foreground border-border *:data-[slot=alert-description]:text-muted-foreground [&>svg]:text-current\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface AlertProps\n extends React.ComponentProps<\"div\">,\n VariantProps<typeof alertVariants> {}\n\nfunction Alert({ className, variant, ...props }: AlertProps) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertAction({\n className,\n ...props\n}: React.ComponentProps<\"button\">) {\n return (\n <button\n data-slot=\"alert-action\"\n className={cn(\n \"col-start-2 mt-2 inline-flex h-8 items-center justify-center rounded-md border border-current/20 bg-transparent px-3 text-xs font-medium transition-colors hover:bg-accent hover:text-accent-foreground 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 className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertClose({\n className,\n onClick,\n ...props\n}: React.ComponentProps<\"button\">) {\n return (\n <button\n data-slot=\"alert-close\"\n aria-label=\"Fechar alerta\"\n className={cn(\n \"col-start-3 row-start-1 -mr-1 -mt-0.5 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground/60 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n className\n )}\n onClick={onClick}\n {...props}\n >\n <CycleIcon icon={X} size=\"xs\" decorative />\n </button>\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertAction, AlertClose, alertVariants }\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { cn } from './chunk-TYCPXAXF.js';
|
|
2
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-YINJ5YZ5.js';
|
|
3
|
+
import { GripVerticalIcon } from 'lucide-react';
|
|
4
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function ResizablePanelGroup(_a) {
|
|
8
|
+
var _b = _a, {
|
|
9
|
+
className
|
|
10
|
+
} = _b, props = __objRest(_b, [
|
|
11
|
+
"className"
|
|
12
|
+
]);
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
ResizablePrimitive.Group,
|
|
15
|
+
__spreadValues({
|
|
16
|
+
"data-slot": "resizable-panel-group",
|
|
17
|
+
className: cn(
|
|
18
|
+
"flex h-full w-full aria-[orientation=vertical]:flex-col",
|
|
19
|
+
className
|
|
20
|
+
)
|
|
21
|
+
}, props)
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function ResizablePanel(_a) {
|
|
25
|
+
var props = __objRest(_a, []);
|
|
26
|
+
return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, __spreadValues({ "data-slot": "resizable-panel" }, props));
|
|
27
|
+
}
|
|
28
|
+
function ResizableHandle(_a) {
|
|
29
|
+
var _b = _a, {
|
|
30
|
+
withHandle,
|
|
31
|
+
className
|
|
32
|
+
} = _b, props = __objRest(_b, [
|
|
33
|
+
"withHandle",
|
|
34
|
+
"className"
|
|
35
|
+
]);
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
ResizablePrimitive.Separator,
|
|
38
|
+
__spreadProps(__spreadValues({
|
|
39
|
+
"data-slot": "resizable-handle",
|
|
40
|
+
className: cn(
|
|
41
|
+
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",
|
|
42
|
+
className
|
|
43
|
+
)
|
|
44
|
+
}, props), {
|
|
45
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
51
|
+
//# sourceMappingURL=chunk-PY2BIZNB.js.map
|
|
52
|
+
//# sourceMappingURL=chunk-PY2BIZNB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/resizable.tsx"],"names":[],"mappings":";;;;;;AAOA,SAAS,oBAAoB,EAAA,EAGK;AAHL,EAAA,IAAA,EAAA,GAAA,EAAA,EAC3B;AAAA,IAAA;AAAA,GARF,GAO6B,EAAA,EAExB,KAAA,GAAA,SAAA,CAFwB,EAAA,EAExB;AAAA,IADH;AAAA,GAAA,CAAA;AAGA,EAAA,uBACE,GAAA;AAAA,IAAoB,kBAAA,CAAA,KAAA;AAAA,IAAnB,cAAA,CAAA;AAAA,MACC,WAAA,EAAU,uBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,yDAAA;AAAA,QACA;AAAA;AACF,KAAA,EACI,KAAA;AAAA,GACN;AAEJ;AAEA,SAAS,eAAe,EAAA,EAA6C;AAA7C,EAAA,IAAK,kBAAL,EAAA,EAAK,EAAA,CAAA;AAC3B,EAAA,uBAAO,GAAA,CAAoB,kBAAA,CAAA,KAAA,EAAnB,cAAA,CAAA,EAAyB,WAAA,EAAU,qBAAsB,KAAA,CAAO,CAAA;AAC1E;AAEA,SAAS,gBAAgB,EAAA,EAMtB;AANsB,EAAA,IAAA,EAAA,GAAA,EAAA,EACvB;AAAA,IAAA,UAAA;AAAA,IACA;AAAA,GA7BF,GA2ByB,EAAA,EAGpB,KAAA,GAAA,SAAA,CAHoB,EAAA,EAGpB;AAAA,IAFH,YAAA;AAAA,IACA;AAAA,GAAA,CAAA;AAKA,EAAA,uBACE,GAAA;AAAA,IAAoB,kBAAA,CAAA,SAAA;AAAA,IAAnB,aAAA,CAAA,cAAA,CAAA;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,2kBAAA;AAAA,QACA;AAAA;AACF,KAAA,EACI,KAAA,CAAA,EANL;AAAA,MAQE,QAAA,EAAA,UAAA,wBACE,KAAA,EAAA,EAAI,SAAA,EAAU,6EACb,QAAA,kBAAA,GAAA,CAAC,gBAAA,EAAA,EAAiB,SAAA,EAAU,UAAA,EAAW,CAAA,EACzC;AAAA,KAAA;AAAA,GAEJ;AAEJ","file":"chunk-PY2BIZNB.js","sourcesContent":["\"use client\"\n\nimport { GripVerticalIcon } from \"lucide-react\"\nimport * as ResizablePrimitive from \"react-resizable-panels\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn(\n \"flex h-full w-full aria-[orientation=vertical]:flex-col\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n \"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90\",\n className\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border\">\n <GripVerticalIcon className=\"size-2.5\" />\n </div>\n )}\n </ResizablePrimitive.Separator>\n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n"]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { CycleIcon } from './chunk-OT2HCBR2.js';
|
|
2
|
+
import { cn } from './chunk-TYCPXAXF.js';
|
|
3
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-YINJ5YZ5.js';
|
|
4
|
+
import { useTheme } from 'next-themes';
|
|
5
|
+
import { Toaster as Toaster$1, toast } from 'sonner';
|
|
6
|
+
import { Loader2, OctagonX, TriangleAlert, Info, CircleCheck } from 'lucide-react';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var Toaster = (_a) => {
|
|
10
|
+
var props = __objRest(_a, []);
|
|
11
|
+
const { theme = "system" } = useTheme();
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
Toaster$1,
|
|
14
|
+
__spreadValues({
|
|
15
|
+
theme,
|
|
16
|
+
className: "toaster group",
|
|
17
|
+
icons: {
|
|
18
|
+
success: /* @__PURE__ */ jsx(CycleIcon, { icon: CircleCheck, size: "xs", decorative: true }),
|
|
19
|
+
info: /* @__PURE__ */ jsx(CycleIcon, { icon: Info, size: "xs", decorative: true }),
|
|
20
|
+
warning: /* @__PURE__ */ jsx(CycleIcon, { icon: TriangleAlert, size: "xs", decorative: true }),
|
|
21
|
+
error: /* @__PURE__ */ jsx(CycleIcon, { icon: OctagonX, size: "xs", decorative: true }),
|
|
22
|
+
loading: /* @__PURE__ */ jsx(
|
|
23
|
+
CycleIcon,
|
|
24
|
+
{
|
|
25
|
+
icon: Loader2,
|
|
26
|
+
size: "xs",
|
|
27
|
+
decorative: true,
|
|
28
|
+
className: "animate-spin"
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
},
|
|
32
|
+
style: {
|
|
33
|
+
"--normal-bg": "var(--popover)",
|
|
34
|
+
"--normal-text": "var(--popover-foreground)",
|
|
35
|
+
"--normal-border": "var(--border)",
|
|
36
|
+
"--border-radius": "var(--radius)"
|
|
37
|
+
}
|
|
38
|
+
}, props)
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
var themedStyle = {
|
|
42
|
+
"--normal-bg": "var(--popover)",
|
|
43
|
+
"--normal-text": "var(--popover-foreground)",
|
|
44
|
+
"--normal-border": "var(--border)"
|
|
45
|
+
};
|
|
46
|
+
var cycleToast = {
|
|
47
|
+
/** Green — positive feedback (saved, completed, success) */
|
|
48
|
+
positive: (message, options) => {
|
|
49
|
+
var _a;
|
|
50
|
+
return toast.success(message, __spreadProps(__spreadValues({}, options), {
|
|
51
|
+
style: __spreadValues(__spreadValues({}, themedStyle), options == null ? void 0 : options.style),
|
|
52
|
+
classNames: __spreadProps(__spreadValues({}, options == null ? void 0 : options.classNames), {
|
|
53
|
+
toast: cn("theme-positive", (_a = options == null ? void 0 : options.classNames) == null ? void 0 : _a.toast)
|
|
54
|
+
})
|
|
55
|
+
}));
|
|
56
|
+
},
|
|
57
|
+
/** Red — critical error (failed, deleted, destructive) */
|
|
58
|
+
critical: (message, options) => {
|
|
59
|
+
var _a;
|
|
60
|
+
return toast.error(message, __spreadProps(__spreadValues({}, options), {
|
|
61
|
+
style: __spreadValues(__spreadValues({}, themedStyle), options == null ? void 0 : options.style),
|
|
62
|
+
classNames: __spreadProps(__spreadValues({}, options == null ? void 0 : options.classNames), {
|
|
63
|
+
toast: cn("theme-critical", (_a = options == null ? void 0 : options.classNames) == null ? void 0 : _a.toast)
|
|
64
|
+
})
|
|
65
|
+
}));
|
|
66
|
+
},
|
|
67
|
+
/** Amber — warning (limit reached, attention needed) */
|
|
68
|
+
warning: (message, options) => {
|
|
69
|
+
var _a;
|
|
70
|
+
return toast.warning(message, __spreadProps(__spreadValues({}, options), {
|
|
71
|
+
style: __spreadValues(__spreadValues({}, themedStyle), options == null ? void 0 : options.style),
|
|
72
|
+
classNames: __spreadProps(__spreadValues({}, options == null ? void 0 : options.classNames), {
|
|
73
|
+
toast: cn("theme-warning", (_a = options == null ? void 0 : options.classNames) == null ? void 0 : _a.toast)
|
|
74
|
+
})
|
|
75
|
+
}));
|
|
76
|
+
},
|
|
77
|
+
/** Blue (Class) — informational (updates, tips, contextual info) */
|
|
78
|
+
info: (message, options) => {
|
|
79
|
+
var _a;
|
|
80
|
+
return toast.info(message, __spreadProps(__spreadValues({}, options), {
|
|
81
|
+
style: __spreadValues(__spreadValues({}, themedStyle), options == null ? void 0 : options.style),
|
|
82
|
+
classNames: __spreadProps(__spreadValues({}, options == null ? void 0 : options.classNames), {
|
|
83
|
+
toast: cn("theme-class", (_a = options == null ? void 0 : options.classNames) == null ? void 0 : _a.toast)
|
|
84
|
+
})
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export { Toaster, cycleToast };
|
|
90
|
+
//# sourceMappingURL=chunk-RI3ULQHH.js.map
|
|
91
|
+
//# sourceMappingURL=chunk-RI3ULQHH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/sonner.tsx"],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,CAAS,UAAA,CAAA,EADF;AAAA,QAEV,OAAO,EAAA,CAAG,aAAA,EAAA,CAAe,EAAA,GAAA,OAAA,IAAA,IAAA,GAAA,MAAA,GAAA,OAAA,CAAS,UAAA,KAAT,mBAAqB,KAAK;AAAA,OACrD;AAAA,KACF,CAAC,CAAA;AAAA,EAAA;AACL","file":"chunk-RI3ULQHH.js","sourcesContent":["\"use client\"\n\nimport { useTheme } from \"next-themes\"\nimport { Toaster as Sonner, toast, type ToasterProps } from \"sonner\"\nimport {\n CircleCheck,\n Info,\n Loader2,\n OctagonX,\n TriangleAlert,\n} from \"lucide-react\"\nimport { CycleIcon } from \"@/components/icons\"\nimport { cn } from \"@/lib/utils\"\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const { theme = \"system\" } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps[\"theme\"]}\n className=\"toaster group\"\n icons={{\n success: <CycleIcon icon={CircleCheck} size=\"xs\" decorative />,\n info: <CycleIcon icon={Info} size=\"xs\" decorative />,\n warning: <CycleIcon icon={TriangleAlert} size=\"xs\" decorative />,\n error: <CycleIcon icon={OctagonX} size=\"xs\" decorative />,\n loading: (\n <CycleIcon\n icon={Loader2}\n size=\"xs\"\n decorative\n className=\"animate-spin\"\n />\n ),\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--popover-foreground)\",\n \"--normal-border\": \"var(--border)\",\n \"--border-radius\": \"var(--radius)\",\n } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n\n/**\n * Cycle-themed toast helpers.\n *\n * These wrap `sonner.toast` with Cycle semantic colors:\n * - `cycleToast.positive(...)` — green/success feedback\n * - `cycleToast.critical(...)` — red/error feedback\n * - `cycleToast.warning(...)` — amber/warning feedback\n *\n * Each applies the `.theme-*` class AND redefines `--normal-bg/text/border`\n * on the toast element so Sonner picks up the themed token values.\n */\n\ntype ToastMessage = string | React.ReactNode\ntype ToastOptions = Parameters<typeof toast>[1]\n\n/**\n * Style override that re-binds Sonner's CSS variables on the toast element itself.\n * Combined with `.theme-*` classNames, this makes `var(--popover)` resolve\n * in the toast's own scope (where the theme redefines the tokens).\n */\nconst themedStyle = {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--popover-foreground)\",\n \"--normal-border\": \"var(--border)\",\n} as React.CSSProperties\n\nconst cycleToast = {\n /** Green — positive feedback (saved, completed, success) */\n positive: (message: ToastMessage, options?: ToastOptions) =>\n toast.success(message, {\n ...options,\n style: { ...themedStyle, ...options?.style },\n classNames: {\n ...options?.classNames,\n toast: cn(\"theme-positive\", options?.classNames?.toast),\n },\n }),\n\n /** Red — critical error (failed, deleted, destructive) */\n critical: (message: ToastMessage, options?: ToastOptions) =>\n toast.error(message, {\n ...options,\n style: { ...themedStyle, ...options?.style },\n classNames: {\n ...options?.classNames,\n toast: cn(\"theme-critical\", options?.classNames?.toast),\n },\n }),\n\n /** Amber — warning (limit reached, attention needed) */\n warning: (message: ToastMessage, options?: ToastOptions) =>\n toast.warning(message, {\n ...options,\n style: { ...themedStyle, ...options?.style },\n classNames: {\n ...options?.classNames,\n toast: cn(\"theme-warning\", options?.classNames?.toast),\n },\n }),\n\n /** Blue (Class) — informational (updates, tips, contextual info) */\n info: (message: ToastMessage, options?: ToastOptions) =>\n toast.info(message, {\n ...options,\n style: { ...themedStyle, ...options?.style },\n classNames: {\n ...options?.classNames,\n toast: cn(\"theme-class\", options?.classNames?.toast),\n },\n }),\n}\n\nexport { Toaster, cycleToast }\n"]}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { cn } from './chunk-TYCPXAXF.js';
|
|
2
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-YINJ5YZ5.js';
|
|
3
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react';
|
|
4
|
+
import { Select as Select$1 } from 'radix-ui';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Select(_a) {
|
|
8
|
+
var props = __objRest(_a, []);
|
|
9
|
+
return /* @__PURE__ */ jsx(Select$1.Root, __spreadValues({ "data-slot": "select" }, props));
|
|
10
|
+
}
|
|
11
|
+
function SelectGroup(_a) {
|
|
12
|
+
var props = __objRest(_a, []);
|
|
13
|
+
return /* @__PURE__ */ jsx(Select$1.Group, __spreadValues({ "data-slot": "select-group" }, props));
|
|
14
|
+
}
|
|
15
|
+
function SelectValue(_a) {
|
|
16
|
+
var props = __objRest(_a, []);
|
|
17
|
+
return /* @__PURE__ */ jsx(Select$1.Value, __spreadValues({ "data-slot": "select-value" }, props));
|
|
18
|
+
}
|
|
19
|
+
function SelectTrigger(_a) {
|
|
20
|
+
var _b = _a, {
|
|
21
|
+
className,
|
|
22
|
+
size = "default",
|
|
23
|
+
children
|
|
24
|
+
} = _b, props = __objRest(_b, [
|
|
25
|
+
"className",
|
|
26
|
+
"size",
|
|
27
|
+
"children"
|
|
28
|
+
]);
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
Select$1.Trigger,
|
|
31
|
+
__spreadProps(__spreadValues({
|
|
32
|
+
"data-slot": "select-trigger",
|
|
33
|
+
"data-size": size,
|
|
34
|
+
className: cn(
|
|
35
|
+
"flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
36
|
+
className
|
|
37
|
+
)
|
|
38
|
+
}, props), {
|
|
39
|
+
children: [
|
|
40
|
+
children,
|
|
41
|
+
/* @__PURE__ */ jsx(Select$1.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
42
|
+
]
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function SelectContent(_a) {
|
|
47
|
+
var _b = _a, {
|
|
48
|
+
className,
|
|
49
|
+
children,
|
|
50
|
+
position = "item-aligned",
|
|
51
|
+
align = "center"
|
|
52
|
+
} = _b, props = __objRest(_b, [
|
|
53
|
+
"className",
|
|
54
|
+
"children",
|
|
55
|
+
"position",
|
|
56
|
+
"align"
|
|
57
|
+
]);
|
|
58
|
+
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsxs(
|
|
59
|
+
Select$1.Content,
|
|
60
|
+
__spreadProps(__spreadValues({
|
|
61
|
+
"data-slot": "select-content",
|
|
62
|
+
className: cn(
|
|
63
|
+
"relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
64
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
65
|
+
className
|
|
66
|
+
),
|
|
67
|
+
position,
|
|
68
|
+
align
|
|
69
|
+
}, props), {
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
72
|
+
/* @__PURE__ */ jsx(
|
|
73
|
+
Select$1.Viewport,
|
|
74
|
+
{
|
|
75
|
+
className: cn(
|
|
76
|
+
"p-1",
|
|
77
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
78
|
+
),
|
|
79
|
+
children
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
83
|
+
]
|
|
84
|
+
})
|
|
85
|
+
) });
|
|
86
|
+
}
|
|
87
|
+
function SelectLabel(_a) {
|
|
88
|
+
var _b = _a, {
|
|
89
|
+
className
|
|
90
|
+
} = _b, props = __objRest(_b, [
|
|
91
|
+
"className"
|
|
92
|
+
]);
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
Select$1.Label,
|
|
95
|
+
__spreadValues({
|
|
96
|
+
"data-slot": "select-label",
|
|
97
|
+
className: cn("px-2 py-1.5 text-xs text-muted-foreground", className)
|
|
98
|
+
}, props)
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function SelectItem(_a) {
|
|
102
|
+
var _b = _a, {
|
|
103
|
+
className,
|
|
104
|
+
children
|
|
105
|
+
} = _b, props = __objRest(_b, [
|
|
106
|
+
"className",
|
|
107
|
+
"children"
|
|
108
|
+
]);
|
|
109
|
+
return /* @__PURE__ */ jsxs(
|
|
110
|
+
Select$1.Item,
|
|
111
|
+
__spreadProps(__spreadValues({
|
|
112
|
+
"data-slot": "select-item",
|
|
113
|
+
className: cn(
|
|
114
|
+
"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
115
|
+
className
|
|
116
|
+
)
|
|
117
|
+
}, props), {
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ jsx(
|
|
120
|
+
"span",
|
|
121
|
+
{
|
|
122
|
+
"data-slot": "select-item-indicator",
|
|
123
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
124
|
+
children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ jsx(Select$1.ItemText, { children })
|
|
128
|
+
]
|
|
129
|
+
})
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function SelectSeparator(_a) {
|
|
133
|
+
var _b = _a, {
|
|
134
|
+
className
|
|
135
|
+
} = _b, props = __objRest(_b, [
|
|
136
|
+
"className"
|
|
137
|
+
]);
|
|
138
|
+
return /* @__PURE__ */ jsx(
|
|
139
|
+
Select$1.Separator,
|
|
140
|
+
__spreadValues({
|
|
141
|
+
"data-slot": "select-separator",
|
|
142
|
+
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)
|
|
143
|
+
}, props)
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function SelectScrollUpButton(_a) {
|
|
147
|
+
var _b = _a, {
|
|
148
|
+
className
|
|
149
|
+
} = _b, props = __objRest(_b, [
|
|
150
|
+
"className"
|
|
151
|
+
]);
|
|
152
|
+
return /* @__PURE__ */ jsx(
|
|
153
|
+
Select$1.ScrollUpButton,
|
|
154
|
+
__spreadProps(__spreadValues({
|
|
155
|
+
"data-slot": "select-scroll-up-button",
|
|
156
|
+
className: cn(
|
|
157
|
+
"flex cursor-default items-center justify-center py-1",
|
|
158
|
+
className
|
|
159
|
+
)
|
|
160
|
+
}, props), {
|
|
161
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
162
|
+
})
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
function SelectScrollDownButton(_a) {
|
|
166
|
+
var _b = _a, {
|
|
167
|
+
className
|
|
168
|
+
} = _b, props = __objRest(_b, [
|
|
169
|
+
"className"
|
|
170
|
+
]);
|
|
171
|
+
return /* @__PURE__ */ jsx(
|
|
172
|
+
Select$1.ScrollDownButton,
|
|
173
|
+
__spreadProps(__spreadValues({
|
|
174
|
+
"data-slot": "select-scroll-down-button",
|
|
175
|
+
className: cn(
|
|
176
|
+
"flex cursor-default items-center justify-center py-1",
|
|
177
|
+
className
|
|
178
|
+
)
|
|
179
|
+
}, props), {
|
|
180
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
181
|
+
})
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
186
|
+
//# sourceMappingURL=chunk-SZUWVHP4.js.map
|
|
187
|
+
//# sourceMappingURL=chunk-SZUWVHP4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/select.tsx"],"names":["SelectPrimitive"],"mappings":";;;;;;AAQA,SAAS,OAAO,EAAA,EAEsC;AAFtC,EAAA,IACX,kBADW,EAAA,EACX,EAAA,CAAA;AAEH,EAAA,2BAAQA,QAAA,CAAgB,IAAA,EAAhB,cAAA,CAAA,EAAqB,WAAA,EAAU,YAAa,KAAA,CAAO,CAAA;AAC7D;AAEA,SAAS,YAAY,EAAA,EAEkC;AAFlC,EAAA,IAChB,kBADgB,EAAA,EAChB,EAAA,CAAA;AAEH,EAAA,2BAAQA,QAAA,CAAgB,KAAA,EAAhB,cAAA,CAAA,EAAsB,WAAA,EAAU,kBAAmB,KAAA,CAAO,CAAA;AACpE;AAEA,SAAS,YAAY,EAAA,EAEkC;AAFlC,EAAA,IAChB,kBADgB,EAAA,EAChB,EAAA,C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AA,IAACA,QAAA,CAAgB,cAAA;AAAA,IAAhB,aAAA,CAAA,cAAA,CAAA;AAAA,MACC,WAAA,EAAU,yBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,sDAAA;AAAA,QACA;AAAA;AACF,KAAA,EACI,KAAA,CAAA,EANL;AAAA,MAQC,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,SAAA,EAAU,QAAA,EAAS;AAAA,KAAA;AAAA,GACpC;AAEJ;AAEA,SAAS,uBAAuB,EAAA,EAGkC;AAHlC,EAAA,IAAA,EAAA,GAAA,EAAA,EAC9B;AAAA,IAAA;AAAA,GAjKF,GAgKgC,EAAA,EAE3B,KAAA,GAAA,SAAA,CAF2B,EAAA,EAE3B;AAAA,IADH;AAAA,GAAA,CAAA;AAGA,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,gBAAA;AAAA,IAAhB,aAAA,CAAA,cAAA,CAAA;AAAA,MACC,WAAA,EAAU,2BAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,sDAAA;AAAA,QACA;AAAA;AACF,KAAA,EACI,KAAA,CAAA,EANL;AAAA,MAQC,QAAA,kBAAA,GAAA,CAAC,eAAA,EAAA,EAAgB,SAAA,EAAU,QAAA,EAAS;AAAA,KAAA;AAAA,GACtC;AAEJ","file":"chunk-SZUWVHP4.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\"\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"item-aligned\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"px-2 py-1.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span\n data-slot=\"select-item-indicator\"\n className=\"absolute right-2 flex size-3.5 items-center justify-center\"\n >\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n"]}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Button } from './chunk-7UMEJDC3.js';
|
|
2
|
+
import { cn } from './chunk-TYCPXAXF.js';
|
|
3
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-YINJ5YZ5.js';
|
|
4
|
+
import { XIcon } from 'lucide-react';
|
|
5
|
+
import { Dialog as Dialog$1 } from 'radix-ui';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function Dialog(_a) {
|
|
9
|
+
var props = __objRest(_a, []);
|
|
10
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
11
|
+
}
|
|
12
|
+
function DialogTrigger(_a) {
|
|
13
|
+
var props = __objRest(_a, []);
|
|
14
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, __spreadValues({ "data-slot": "dialog-trigger" }, props));
|
|
15
|
+
}
|
|
16
|
+
function DialogPortal(_a) {
|
|
17
|
+
var props = __objRest(_a, []);
|
|
18
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
19
|
+
}
|
|
20
|
+
function DialogClose(_a) {
|
|
21
|
+
var props = __objRest(_a, []);
|
|
22
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
|
|
23
|
+
}
|
|
24
|
+
function DialogOverlay(_a) {
|
|
25
|
+
var _b = _a, {
|
|
26
|
+
className
|
|
27
|
+
} = _b, props = __objRest(_b, [
|
|
28
|
+
"className"
|
|
29
|
+
]);
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
Dialog$1.Overlay,
|
|
32
|
+
__spreadValues({
|
|
33
|
+
"data-slot": "dialog-overlay",
|
|
34
|
+
className: cn(
|
|
35
|
+
"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
36
|
+
className
|
|
37
|
+
)
|
|
38
|
+
}, props)
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function DialogContent(_a) {
|
|
42
|
+
var _b = _a, {
|
|
43
|
+
className,
|
|
44
|
+
children,
|
|
45
|
+
showCloseButton = true
|
|
46
|
+
} = _b, props = __objRest(_b, [
|
|
47
|
+
"className",
|
|
48
|
+
"children",
|
|
49
|
+
"showCloseButton"
|
|
50
|
+
]);
|
|
51
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
52
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
53
|
+
/* @__PURE__ */ jsxs(
|
|
54
|
+
Dialog$1.Content,
|
|
55
|
+
__spreadProps(__spreadValues({
|
|
56
|
+
"data-slot": "dialog-content",
|
|
57
|
+
className: cn(
|
|
58
|
+
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
|
|
59
|
+
className
|
|
60
|
+
)
|
|
61
|
+
}, props), {
|
|
62
|
+
children: [
|
|
63
|
+
children,
|
|
64
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
65
|
+
Dialog$1.Close,
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "dialog-close",
|
|
68
|
+
className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
71
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
)
|
|
78
|
+
] });
|
|
79
|
+
}
|
|
80
|
+
function DialogHeader(_a) {
|
|
81
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
"div",
|
|
84
|
+
__spreadValues({
|
|
85
|
+
"data-slot": "dialog-header",
|
|
86
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className)
|
|
87
|
+
}, props)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function DialogFooter(_a) {
|
|
91
|
+
var _b = _a, {
|
|
92
|
+
className,
|
|
93
|
+
showCloseButton = false,
|
|
94
|
+
children
|
|
95
|
+
} = _b, props = __objRest(_b, [
|
|
96
|
+
"className",
|
|
97
|
+
"showCloseButton",
|
|
98
|
+
"children"
|
|
99
|
+
]);
|
|
100
|
+
return /* @__PURE__ */ jsxs(
|
|
101
|
+
"div",
|
|
102
|
+
__spreadProps(__spreadValues({
|
|
103
|
+
"data-slot": "dialog-footer",
|
|
104
|
+
className: cn(
|
|
105
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
106
|
+
className
|
|
107
|
+
)
|
|
108
|
+
}, props), {
|
|
109
|
+
children: [
|
|
110
|
+
children,
|
|
111
|
+
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Close" }) })
|
|
112
|
+
]
|
|
113
|
+
})
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function DialogTitle(_a) {
|
|
117
|
+
var _b = _a, {
|
|
118
|
+
className
|
|
119
|
+
} = _b, props = __objRest(_b, [
|
|
120
|
+
"className"
|
|
121
|
+
]);
|
|
122
|
+
return /* @__PURE__ */ jsx(
|
|
123
|
+
Dialog$1.Title,
|
|
124
|
+
__spreadValues({
|
|
125
|
+
"data-slot": "dialog-title",
|
|
126
|
+
className: cn("text-lg leading-none font-semibold", className)
|
|
127
|
+
}, props)
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function DialogDescription(_a) {
|
|
131
|
+
var _b = _a, {
|
|
132
|
+
className
|
|
133
|
+
} = _b, props = __objRest(_b, [
|
|
134
|
+
"className"
|
|
135
|
+
]);
|
|
136
|
+
return /* @__PURE__ */ jsx(
|
|
137
|
+
Dialog$1.Description,
|
|
138
|
+
__spreadValues({
|
|
139
|
+
"data-slot": "dialog-description",
|
|
140
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
141
|
+
}, props)
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
146
|
+
//# sourceMappingURL=chunk-TZ7BEYQ7.js.map
|
|
147
|
+
//# sourceMappingURL=chunk-TZ7BEYQ7.js.map
|