@clasing/ui 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/badge-DK9gdPpu.cjs +91 -0
- package/dist/badge-aFyTFGVU.js +173 -0
- package/dist/button-2VesFn_C.js +256 -0
- package/dist/button-DWBp81pk.cjs +70 -0
- package/dist/card-DkYKwjsA.cjs +12 -0
- package/dist/{card-Cv2M4wv8.js → card-aAzRmGVH.js} +19 -5
- package/dist/chip-BlWb6w16.cjs +17 -0
- package/dist/chip-BmqvnZuy.js +116 -0
- package/dist/{clasing-icon-Bym32_-4.cjs → clasing-icon-CHt2Otn8.cjs} +1 -1
- package/dist/{clasing-icon-BIYMLc8o.js → clasing-icon-CJQQN554.js} +1 -1
- package/dist/command-FBkK3fzE.cjs +36 -0
- package/dist/{command-CGrOI2Z9.js → command-Vk11GgqU.js} +67 -26
- package/dist/components/accordion.cjs.js +20 -1
- package/dist/components/accordion.es.js +38 -16
- package/dist/components/alert-dialog.cjs.js +17 -1
- package/dist/components/alert-dialog.es.js +23 -7
- package/dist/components/alert.cjs.js +6 -1
- package/dist/components/alert.d.ts +1 -2
- package/dist/components/alert.es.js +54 -50
- package/dist/components/avatar.cjs.js +1 -1
- package/dist/components/avatar.es.js +1 -1
- package/dist/components/badge.cjs.js +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.es.js +1 -1
- package/dist/components/blocks/interactive-card.cjs.js +5 -1
- package/dist/components/blocks/interactive-card.es.js +60 -56
- package/dist/components/blocks/selectable-chips.cjs.js +1 -1
- package/dist/components/blocks/selectable-chips.d.ts +6 -6
- package/dist/components/blocks/selectable-chips.es.js +88 -55
- package/dist/components/breadcrumb.cjs.js +1 -1
- package/dist/components/breadcrumb.es.js +1 -1
- package/dist/components/button-group.cjs.js +1 -1
- package/dist/components/button-group.es.js +3 -3
- package/dist/components/button.cjs.js +1 -1
- package/dist/components/button.d.ts +8 -17
- package/dist/components/button.es.js +2 -4
- package/dist/components/calendar.cjs.js +73 -1
- package/dist/components/calendar.es.js +120 -42
- package/dist/components/card.cjs.js +1 -1
- package/dist/components/card.es.js +1 -1
- package/dist/components/chart.cjs.js +27 -2
- package/dist/components/chart.es.js +38 -7
- package/dist/components/checkbox.cjs.js +15 -1
- package/dist/components/checkbox.es.js +28 -14
- package/dist/components/chip.cjs.js +1 -1
- package/dist/components/chip.d.ts +3 -3
- package/dist/components/chip.es.js +1 -1
- package/dist/components/clasing-icon.cjs.js +1 -1
- package/dist/components/clasing-icon.es.js +1 -1
- package/dist/components/collapsible.cjs.js +10 -1
- package/dist/components/collapsible.es.js +17 -8
- package/dist/components/command.cjs.js +1 -1
- package/dist/components/command.es.js +1 -1
- package/dist/components/context-menu.cjs.js +71 -1
- package/dist/components/context-menu.es.js +94 -12
- package/dist/components/dialog.cjs.js +1 -1
- package/dist/components/dialog.es.js +1 -1
- package/dist/components/divider.cjs.js +1 -1
- package/dist/components/divider.es.js +1 -1
- package/dist/components/drawer.cjs.js +42 -1
- package/dist/components/drawer.es.js +63 -17
- package/dist/components/dropdown-menu.cjs.js +69 -1
- package/dist/components/dropdown-menu.es.js +101 -21
- package/dist/components/form.cjs.js +1 -1
- package/dist/components/form.es.js +21 -21
- package/dist/components/hover-card.cjs.js +13 -1
- package/dist/components/hover-card.es.js +14 -2
- package/dist/components/input-otp.cjs.js +19 -1
- package/dist/components/input-otp.es.js +49 -25
- package/dist/components/input.cjs.js +1 -1
- package/dist/components/input.es.js +1 -1
- package/dist/components/kbd.cjs.js +9 -1
- package/dist/components/kbd.es.js +11 -3
- package/dist/components/label.cjs.js +1 -1
- package/dist/components/label.es.js +1 -1
- package/dist/components/menubar.cjs.js +75 -1
- package/dist/components/menubar.es.js +118 -32
- package/dist/components/multi-select.cjs.js +24 -1
- package/dist/components/multi-select.es.js +61 -27
- package/dist/components/navigation-menu.cjs.js +71 -1
- package/dist/components/navigation-menu.es.js +86 -11
- package/dist/components/phone-input.cjs.js +21 -1
- package/dist/components/phone-input.es.js +267 -174
- package/dist/components/popover.cjs.js +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress.cjs.js +1 -1
- package/dist/components/progress.es.js +3 -3
- package/dist/components/resizable.cjs.js +22 -1
- package/dist/components/resizable.d.ts +1 -1
- package/dist/components/resizable.es.js +52 -17
- package/dist/components/scroll-area.cjs.js +1 -1
- package/dist/components/scroll-area.es.js +1 -1
- package/dist/components/select.cjs.js +57 -1
- package/dist/components/select.d.ts +2 -1
- package/dist/components/select.es.js +83 -23
- package/dist/components/sheet.cjs.js +36 -1
- package/dist/components/sheet.es.js +75 -34
- package/dist/components/skeleton.cjs.js +1 -1
- package/dist/components/skeleton.es.js +1 -1
- package/dist/components/slider.cjs.js +23 -1
- package/dist/components/slider.es.js +46 -24
- package/dist/components/sonner.cjs.js +15 -1
- package/dist/components/sonner.es.js +67 -41
- package/dist/components/switch.cjs.js +19 -1
- package/dist/components/switch.es.js +29 -11
- package/dist/components/table.cjs.js +20 -1
- package/dist/components/table.es.js +56 -34
- package/dist/components/textarea.cjs.js +22 -1
- package/dist/components/textarea.es.js +46 -25
- package/dist/components/toggle-group.cjs.js +12 -1
- package/dist/components/toggle-group.es.js +15 -4
- package/dist/components/toggle.cjs.js +1 -1
- package/dist/components/toggle.es.js +1 -1
- package/dist/components/tooltip.cjs.js +1 -1
- package/dist/components/tooltip.es.js +1 -1
- package/dist/dialog-BUaX7IId.cjs +28 -0
- package/dist/{dialog-CH4VxKX4.js → dialog-CdmsVmRe.js} +41 -14
- package/dist/divider-D4EfIlt3.cjs +1 -0
- package/dist/{divider-BMxVoyPg.js → divider-DumyhJI_.js} +6 -6
- package/dist/entries/button.d.ts +2 -2
- package/dist/index-Bfismeyo.cjs +6 -0
- package/dist/{index-ECyCsPX0.cjs → index-BmhzhLcV.cjs} +1 -1
- package/dist/{index-DEha_UuN.js → index-CnqageB2.js} +1 -1
- package/dist/{index-BCEGphus.js → index-CwFDnnd3.js} +678 -519
- package/dist/input-kOA9xJIa.js +122 -0
- package/dist/input-u-OTHOPe.cjs +28 -0
- package/dist/label-BteX4MEt.js +27 -0
- package/dist/label-O3mSiGyx.cjs +7 -0
- package/dist/popover-A1-x5q-F.cjs +13 -0
- package/dist/{popover-BzUZg2od.js → popover-eQq2Is-I.js} +14 -2
- package/dist/{scroll-area-CxpVQq0v.js → scroll-area-CJy_EOqT.js} +10 -5
- package/dist/scroll-area-DFyIQG6Z.cjs +6 -0
- package/dist/toggle-BdWGPLza.cjs +21 -0
- package/dist/toggle-DuhnqdDT.js +63 -0
- package/dist/tooltip-BYeLeBei.js +74 -0
- package/dist/tooltip-BZWEHWmU.cjs +14 -0
- package/dist/ui.css +209 -209
- package/package.json +32 -27
- package/dist/badge-C29hQNIG.js +0 -84
- package/dist/badge-Da_xHgvC.cjs +0 -1
- package/dist/button-BIGg5o8m.js +0 -213
- package/dist/button-BsQuxg6u.cjs +0 -1
- package/dist/card-COFAc2zN.cjs +0 -1
- package/dist/chip-C_Uh7fe6.cjs +0 -1
- package/dist/chip-ZryYiiU1.js +0 -89
- package/dist/command-CrtCQpi_.cjs +0 -1
- package/dist/dialog-DHZARK1o.cjs +0 -1
- package/dist/divider-BcIwJzm7.cjs +0 -1
- package/dist/index-9HRzXEQf.cjs +0 -6
- package/dist/input-BdGPpUZ8.js +0 -82
- package/dist/input-DDgYyRSP.cjs +0 -1
- package/dist/label-Bl6V6esj.js +0 -21
- package/dist/label-D3iN3bzS.cjs +0 -1
- package/dist/popover-Cj78cvz1.cjs +0 -1
- package/dist/scroll-area-D74XszlE.cjs +0 -1
- package/dist/toggle-99EXLQgX.js +0 -43
- package/dist/toggle-CtoQhQby.cjs +0 -1
- package/dist/tooltip-CHBabriJ.js +0 -56
- package/dist/tooltip-Dd6ylN0m.cjs +0 -1
|
@@ -1 +1,19 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Bfismeyo.cjs"),i=require("input-otp"),c=require("react"),d=require("@phosphor-icons/react");function l(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const p=l(c);function x({className:t,containerClassName:r,...n}){return e.jsxRuntimeExports.jsx(i.OTPInput,{"data-slot":"input-otp",containerClassName:e.cn(`
|
|
2
|
+
flex items-center gap-2
|
|
3
|
+
has-disabled:opacity-50
|
|
4
|
+
`,r),className:e.cn("disabled:cursor-not-allowed",t),...n})}function f({className:t,...r}){return e.jsxRuntimeExports.jsx("div",{"data-slot":"input-otp-group",className:e.cn("flex items-center",t),...r})}function m({index:t,className:r,...n}){const a=p.useContext(i.OTPInputContext),{char:o,hasFakeCaret:s,isActive:u}=a?.slots[t]??{};return e.jsxRuntimeExports.jsxs("div",{"data-slot":"input-otp-slot","data-active":u,className:e.cn(`
|
|
5
|
+
relative flex h-9 w-9 items-center justify-center border-y border-r
|
|
6
|
+
border-input paragraph-sm text-foreground transition-all outline-none
|
|
7
|
+
first:rounded-l-md first:border-l
|
|
8
|
+
last:rounded-r-md
|
|
9
|
+
aria-invalid:border-destructive-foreground
|
|
10
|
+
data-[active=true]:z-10 data-[active=true]:border-ring
|
|
11
|
+
data-[active=true]:ring-[3px] data-[active=true]:ring-ring
|
|
12
|
+
data-[active=true]:aria-invalid:border-destructive-foreground
|
|
13
|
+
data-[active=true]:aria-invalid:ring-destructive-foreground/20
|
|
14
|
+
dark:bg-input/30
|
|
15
|
+
dark:data-[active=true]:aria-invalid:ring-destructive-foreground/40
|
|
16
|
+
`,r),...n,children:[o,s&&e.jsxRuntimeExports.jsx("div",{className:`\r
|
|
17
|
+
pointer-events-none absolute inset-0 flex items-center\r
|
|
18
|
+
justify-center\r
|
|
19
|
+
`,children:e.jsxRuntimeExports.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})}function v({...t}){return e.jsxRuntimeExports.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...t,children:e.jsxRuntimeExports.jsx(d.MinusIcon,{className:"text-foreground"})})}exports.InputOTP=x;exports.InputOTPGroup=f;exports.InputOTPSeparator=v;exports.InputOTPSlot=m;
|
|
@@ -1,64 +1,88 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as r, c as a } from "../index-CwFDnnd3.js";
|
|
2
2
|
import { OTPInput as u, OTPInputContext as c } from "input-otp";
|
|
3
3
|
import * as l from "react";
|
|
4
4
|
import { MinusIcon as p } from "@phosphor-icons/react";
|
|
5
|
-
function
|
|
5
|
+
function x({
|
|
6
6
|
className: t,
|
|
7
|
-
containerClassName:
|
|
8
|
-
...
|
|
7
|
+
containerClassName: e,
|
|
8
|
+
...n
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ r.jsx(
|
|
11
11
|
u,
|
|
12
12
|
{
|
|
13
13
|
"data-slot": "input-otp",
|
|
14
14
|
containerClassName: a(
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
`
|
|
16
|
+
flex items-center gap-2
|
|
17
|
+
has-disabled:opacity-50
|
|
18
|
+
`,
|
|
19
|
+
e
|
|
17
20
|
),
|
|
18
21
|
className: a("disabled:cursor-not-allowed", t),
|
|
19
|
-
...
|
|
22
|
+
...n
|
|
20
23
|
}
|
|
21
24
|
);
|
|
22
25
|
}
|
|
23
|
-
function
|
|
24
|
-
return /* @__PURE__ */
|
|
26
|
+
function g({ className: t, ...e }) {
|
|
27
|
+
return /* @__PURE__ */ r.jsx(
|
|
25
28
|
"div",
|
|
26
29
|
{
|
|
27
30
|
"data-slot": "input-otp-group",
|
|
28
31
|
className: a("flex items-center", t),
|
|
29
|
-
...
|
|
32
|
+
...e
|
|
30
33
|
}
|
|
31
34
|
);
|
|
32
35
|
}
|
|
33
|
-
function
|
|
36
|
+
function b({
|
|
34
37
|
index: t,
|
|
35
|
-
className:
|
|
36
|
-
...
|
|
38
|
+
className: e,
|
|
39
|
+
...n
|
|
37
40
|
}) {
|
|
38
|
-
const
|
|
39
|
-
return /* @__PURE__ */
|
|
41
|
+
const i = l.useContext(c), { char: o, hasFakeCaret: s, isActive: d } = i?.slots[t] ?? {};
|
|
42
|
+
return /* @__PURE__ */ r.jsxs(
|
|
40
43
|
"div",
|
|
41
44
|
{
|
|
42
45
|
"data-slot": "input-otp-slot",
|
|
43
46
|
"data-active": d,
|
|
44
47
|
className: a(
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
`
|
|
49
|
+
relative flex h-9 w-9 items-center justify-center border-y border-r
|
|
50
|
+
border-input paragraph-sm text-foreground transition-all outline-none
|
|
51
|
+
first:rounded-l-md first:border-l
|
|
52
|
+
last:rounded-r-md
|
|
53
|
+
aria-invalid:border-destructive-foreground
|
|
54
|
+
data-[active=true]:z-10 data-[active=true]:border-ring
|
|
55
|
+
data-[active=true]:ring-[3px] data-[active=true]:ring-ring
|
|
56
|
+
data-[active=true]:aria-invalid:border-destructive-foreground
|
|
57
|
+
data-[active=true]:aria-invalid:ring-destructive-foreground/20
|
|
58
|
+
dark:bg-input/30
|
|
59
|
+
dark:data-[active=true]:aria-invalid:ring-destructive-foreground/40
|
|
60
|
+
`,
|
|
61
|
+
e
|
|
47
62
|
),
|
|
48
|
-
...
|
|
63
|
+
...n,
|
|
49
64
|
children: [
|
|
50
|
-
|
|
51
|
-
|
|
65
|
+
o,
|
|
66
|
+
s && /* @__PURE__ */ r.jsx(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: `\r
|
|
70
|
+
pointer-events-none absolute inset-0 flex items-center\r
|
|
71
|
+
justify-center\r
|
|
72
|
+
`,
|
|
73
|
+
children: /* @__PURE__ */ r.jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
|
|
74
|
+
}
|
|
75
|
+
)
|
|
52
76
|
]
|
|
53
77
|
}
|
|
54
78
|
);
|
|
55
79
|
}
|
|
56
80
|
function j({ ...t }) {
|
|
57
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ r.jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...t, children: /* @__PURE__ */ r.jsx(p, { className: "text-foreground" }) });
|
|
58
82
|
}
|
|
59
83
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
84
|
+
x as InputOTP,
|
|
85
|
+
g as InputOTPGroup,
|
|
62
86
|
j as InputOTPSeparator,
|
|
63
|
-
|
|
87
|
+
b as InputOTPSlot
|
|
64
88
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../input-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../input-u-OTHOPe.cjs");exports.Input=t.Input;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../index-Bfismeyo.cjs");function o({className:e,...n}){return t.jsxRuntimeExports.jsx("kbd",{"data-slot":"kbd",className:t.cn(`
|
|
2
|
+
pointer-events-none inline-flex h-5 w-fit min-w-5 items-center
|
|
3
|
+
justify-center gap-1 rounded-[4px] bg-muted px-1 font-sans label-md
|
|
4
|
+
font-medium text-muted-foreground select-none
|
|
5
|
+
`,"[&_svg:not([class*='size-'])]:size-3",`
|
|
6
|
+
in-data-[slot=tooltip-content]:bg-background/20
|
|
7
|
+
in-data-[slot=tooltip-content]:text-background
|
|
8
|
+
dark:in-data-[slot=tooltip-content]:bg-background/10
|
|
9
|
+
`,e),...n})}function s({className:e,...n}){return t.jsxRuntimeExports.jsx("kbd",{"data-slot":"kbd-group",className:t.cn("inline-flex items-center gap-1",e),...n})}exports.Kbd=o;exports.KbdGroup=s;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
import { j as e, c as o } from "../index-
|
|
1
|
+
import { j as e, c as o } from "../index-CwFDnnd3.js";
|
|
2
2
|
function a({ className: t, ...n }) {
|
|
3
3
|
return /* @__PURE__ */ e.jsx(
|
|
4
4
|
"kbd",
|
|
5
5
|
{
|
|
6
6
|
"data-slot": "kbd",
|
|
7
7
|
className: o(
|
|
8
|
-
|
|
8
|
+
`
|
|
9
|
+
pointer-events-none inline-flex h-5 w-fit min-w-5 items-center
|
|
10
|
+
justify-center gap-1 rounded-[4px] bg-muted px-1 font-sans label-md
|
|
11
|
+
font-medium text-muted-foreground select-none
|
|
12
|
+
`,
|
|
9
13
|
"[&_svg:not([class*='size-'])]:size-3",
|
|
10
|
-
|
|
14
|
+
`
|
|
15
|
+
in-data-[slot=tooltip-content]:bg-background/20
|
|
16
|
+
in-data-[slot=tooltip-content]:text-background
|
|
17
|
+
dark:in-data-[slot=tooltip-content]:bg-background/10
|
|
18
|
+
`,
|
|
11
19
|
t
|
|
12
20
|
),
|
|
13
21
|
...n
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../label-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../label-O3mSiGyx.cjs");exports.Label=e.Label;
|
|
@@ -1 +1,75 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../index-Bfismeyo.cjs"),d=require("@radix-ui/react-menubar"),o=require("@phosphor-icons/react");function c(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return n.default=e,Object.freeze(n)}const r=c(d);function m({className:e,...n}){return t.jsxRuntimeExports.jsx(r.Root,{"data-slot":"menubar",className:t.cn(`
|
|
2
|
+
flex h-9 items-center gap-1 rounded-md border bg-background p-1
|
|
3
|
+
text-foreground shadow-xs
|
|
4
|
+
`,e),...n})}function l({...e}){return t.jsxRuntimeExports.jsx(r.Menu,{"data-slot":"menubar-menu",...e})}function p({...e}){return t.jsxRuntimeExports.jsx(r.Group,{"data-slot":"menubar-group",...e})}function u({...e}){return t.jsxRuntimeExports.jsx(r.Portal,{"data-slot":"menubar-portal",...e})}function x({...e}){return t.jsxRuntimeExports.jsx(r.RadioGroup,{"data-slot":"menubar-radio-group",...e})}function b({className:e,...n}){return t.jsxRuntimeExports.jsx(r.Trigger,{"data-slot":"menubar-trigger",className:t.cn(`
|
|
5
|
+
flex items-center rounded-sm px-2 py-1 paragraph-sm font-medium
|
|
6
|
+
outline-hidden select-none
|
|
7
|
+
focus:bg-accent focus:text-accent-foreground
|
|
8
|
+
data-[state=open]:bg-accent data-[state=open]:text-accent-foreground
|
|
9
|
+
`,e),...n})}function f({className:e,align:n="start",alignOffset:a=-4,sideOffset:s=8,...i}){return t.jsxRuntimeExports.jsx(u,{children:t.jsxRuntimeExports.jsx(r.Content,{"data-slot":"menubar-content",align:n,alignOffset:a,sideOffset:s,className:t.cn(`
|
|
10
|
+
z-50 min-w-48 origin-(--radix-menubar-content-transform-origin)
|
|
11
|
+
overflow-hidden rounded-md border bg-popover p-1
|
|
12
|
+
text-popover-foreground shadow-md
|
|
13
|
+
data-[side=bottom]:slide-in-from-top-2
|
|
14
|
+
data-[side=left]:slide-in-from-right-2
|
|
15
|
+
data-[side=right]:slide-in-from-left-2
|
|
16
|
+
data-[side=top]:slide-in-from-bottom-2
|
|
17
|
+
data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95
|
|
18
|
+
data-[state=open]:animate-in data-[state=open]:fade-in-0
|
|
19
|
+
data-[state=open]:zoom-in-95
|
|
20
|
+
`,e),...i})})}function g({className:e,inset:n,variant:a="default",...s}){return t.jsxRuntimeExports.jsx(r.Item,{"data-slot":"menubar-item","data-inset":n,"data-variant":a,className:t.cn(`
|
|
21
|
+
relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
|
|
22
|
+
paragraph-sm outline-hidden select-none
|
|
23
|
+
focus:bg-accent focus:text-accent-foreground
|
|
24
|
+
data-disabled:pointer-events-none data-disabled:opacity-50
|
|
25
|
+
data-inset:pl-8
|
|
26
|
+
data-[variant=destructive]:text-destructive-foreground
|
|
27
|
+
data-[variant=destructive]:focus:bg-destructive
|
|
28
|
+
data-[variant=destructive]:focus:text-destructive-foreground
|
|
29
|
+
dark:data-[variant=destructive]:focus:bg-destructive
|
|
30
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
31
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
32
|
+
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
33
|
+
data-[variant=destructive]:*:[svg]:text-destructive-foreground!
|
|
34
|
+
`,e),...s})}function j({className:e,children:n,checked:a,...s}){return t.jsxRuntimeExports.jsxs(r.CheckboxItem,{"data-slot":"menubar-checkbox-item",className:t.cn(`
|
|
35
|
+
relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2
|
|
36
|
+
pl-8 paragraph-sm outline-hidden select-none
|
|
37
|
+
focus:bg-accent focus:text-accent-foreground
|
|
38
|
+
data-disabled:pointer-events-none data-disabled:opacity-50
|
|
39
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
40
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
41
|
+
`,e),checked:a,...s,children:[t.jsxRuntimeExports.jsx("span",{className:`\r
|
|
42
|
+
pointer-events-none absolute left-2 flex size-3.5 items-center\r
|
|
43
|
+
justify-center\r
|
|
44
|
+
`,children:t.jsxRuntimeExports.jsx(r.ItemIndicator,{children:t.jsxRuntimeExports.jsx(o.CheckIcon,{className:"size-4"})})}),n]})}function v({className:e,children:n,...a}){return t.jsxRuntimeExports.jsxs(r.RadioItem,{"data-slot":"menubar-radio-item",className:t.cn(`
|
|
45
|
+
relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2
|
|
46
|
+
pl-8 paragraph-sm outline-hidden select-none
|
|
47
|
+
focus:bg-accent focus:text-accent-foreground
|
|
48
|
+
data-disabled:pointer-events-none data-disabled:opacity-50
|
|
49
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
50
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
51
|
+
`,e),...a,children:[t.jsxRuntimeExports.jsx("span",{className:`\r
|
|
52
|
+
pointer-events-none absolute left-2 flex size-3.5 items-center\r
|
|
53
|
+
justify-center\r
|
|
54
|
+
`,children:t.jsxRuntimeExports.jsx(r.ItemIndicator,{children:t.jsxRuntimeExports.jsx(o.CircleIcon,{weight:"fill",className:"size-2 fill-current"})})}),n]})}function h({className:e,inset:n,...a}){return t.jsxRuntimeExports.jsx(r.Label,{"data-slot":"menubar-label","data-inset":n,className:t.cn(`
|
|
55
|
+
px-2 py-1.5 paragraph-sm font-medium
|
|
56
|
+
data-inset:pl-8
|
|
57
|
+
`,e),...a})}function M({className:e,...n}){return t.jsxRuntimeExports.jsx(r.Separator,{"data-slot":"menubar-separator",className:t.cn("-mx-1 my-1 h-px bg-border",e),...n})}function R({className:e,...n}){return t.jsxRuntimeExports.jsx("span",{"data-slot":"menubar-shortcut",className:t.cn("ml-auto paragraph-xs tracking-widest text-muted-foreground",e),...n})}function E({...e}){return t.jsxRuntimeExports.jsx(r.Sub,{"data-slot":"menubar-sub",...e})}function z({className:e,inset:n,children:a,...s}){return t.jsxRuntimeExports.jsxs(r.SubTrigger,{"data-slot":"menubar-sub-trigger","data-inset":n,className:t.cn(`
|
|
58
|
+
flex cursor-default items-center rounded-sm px-2 py-1.5 paragraph-sm
|
|
59
|
+
outline-none select-none
|
|
60
|
+
focus:bg-accent focus:text-accent-foreground
|
|
61
|
+
data-inset:pl-8
|
|
62
|
+
data-[state=open]:bg-accent data-[state=open]:text-accent-foreground
|
|
63
|
+
`,e),...s,children:[a,t.jsxRuntimeExports.jsx(o.CaretRightIcon,{className:"ml-auto size-4"})]})}function S({className:e,collisionPadding:n=24,...a}){return t.jsxRuntimeExports.jsx(r.SubContent,{"data-slot":"menubar-sub-content",className:t.cn(`
|
|
64
|
+
z-50 min-w-32 origin-(--radix-menubar-content-transform-origin)
|
|
65
|
+
overflow-hidden rounded-md border bg-popover p-1
|
|
66
|
+
text-popover-foreground shadow-lg
|
|
67
|
+
data-[side=bottom]:slide-in-from-top-2
|
|
68
|
+
data-[side=left]:slide-in-from-right-2
|
|
69
|
+
data-[side=right]:slide-in-from-left-2
|
|
70
|
+
data-[side=top]:slide-in-from-bottom-2
|
|
71
|
+
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
72
|
+
data-[state=closed]:zoom-out-95
|
|
73
|
+
data-[state=open]:animate-in data-[state=open]:fade-in-0
|
|
74
|
+
data-[state=open]:zoom-in-95
|
|
75
|
+
`,e),collisionPadding:n,...a})}exports.Menubar=m;exports.MenubarCheckboxItem=j;exports.MenubarContent=f;exports.MenubarGroup=p;exports.MenubarItem=g;exports.MenubarLabel=h;exports.MenubarMenu=l;exports.MenubarPortal=u;exports.MenubarRadioGroup=x;exports.MenubarRadioItem=v;exports.MenubarSeparator=M;exports.MenubarShortcut=R;exports.MenubarSub=E;exports.MenubarSubContent=S;exports.MenubarSubTrigger=z;exports.MenubarTrigger=b;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t, c as
|
|
1
|
+
import { j as t, c as o } from "../index-CwFDnnd3.js";
|
|
2
2
|
import * as n from "@radix-ui/react-menubar";
|
|
3
3
|
import { CheckIcon as i, CircleIcon as u, CaretRightIcon as c } from "@phosphor-icons/react";
|
|
4
4
|
function f({
|
|
@@ -9,8 +9,11 @@ function f({
|
|
|
9
9
|
n.Root,
|
|
10
10
|
{
|
|
11
11
|
"data-slot": "menubar",
|
|
12
|
-
className:
|
|
13
|
-
|
|
12
|
+
className: o(
|
|
13
|
+
`
|
|
14
|
+
flex h-9 items-center gap-1 rounded-md border bg-background p-1
|
|
15
|
+
text-foreground shadow-xs
|
|
16
|
+
`,
|
|
14
17
|
e
|
|
15
18
|
),
|
|
16
19
|
...a
|
|
@@ -45,8 +48,13 @@ function v({
|
|
|
45
48
|
n.Trigger,
|
|
46
49
|
{
|
|
47
50
|
"data-slot": "menubar-trigger",
|
|
48
|
-
className:
|
|
49
|
-
|
|
51
|
+
className: o(
|
|
52
|
+
`
|
|
53
|
+
flex items-center rounded-sm px-2 py-1 paragraph-sm font-medium
|
|
54
|
+
outline-hidden select-none
|
|
55
|
+
focus:bg-accent focus:text-accent-foreground
|
|
56
|
+
data-[state=open]:bg-accent data-[state=open]:text-accent-foreground
|
|
57
|
+
`,
|
|
50
58
|
e
|
|
51
59
|
),
|
|
52
60
|
...a
|
|
@@ -57,7 +65,7 @@ function h({
|
|
|
57
65
|
className: e,
|
|
58
66
|
align: a = "start",
|
|
59
67
|
alignOffset: r = -4,
|
|
60
|
-
sideOffset:
|
|
68
|
+
sideOffset: s = 8,
|
|
61
69
|
...d
|
|
62
70
|
}) {
|
|
63
71
|
return /* @__PURE__ */ t.jsx(l, { children: /* @__PURE__ */ t.jsx(
|
|
@@ -66,9 +74,20 @@ function h({
|
|
|
66
74
|
"data-slot": "menubar-content",
|
|
67
75
|
align: a,
|
|
68
76
|
alignOffset: r,
|
|
69
|
-
sideOffset:
|
|
70
|
-
className:
|
|
71
|
-
|
|
77
|
+
sideOffset: s,
|
|
78
|
+
className: o(
|
|
79
|
+
`
|
|
80
|
+
z-50 min-w-48 origin-(--radix-menubar-content-transform-origin)
|
|
81
|
+
overflow-hidden rounded-md border bg-popover p-1
|
|
82
|
+
text-popover-foreground shadow-md
|
|
83
|
+
data-[side=bottom]:slide-in-from-top-2
|
|
84
|
+
data-[side=left]:slide-in-from-right-2
|
|
85
|
+
data-[side=right]:slide-in-from-left-2
|
|
86
|
+
data-[side=top]:slide-in-from-bottom-2
|
|
87
|
+
data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95
|
|
88
|
+
data-[state=open]:animate-in data-[state=open]:fade-in-0
|
|
89
|
+
data-[state=open]:zoom-in-95
|
|
90
|
+
`,
|
|
72
91
|
e
|
|
73
92
|
),
|
|
74
93
|
...d
|
|
@@ -79,7 +98,7 @@ function j({
|
|
|
79
98
|
className: e,
|
|
80
99
|
inset: a,
|
|
81
100
|
variant: r = "default",
|
|
82
|
-
...
|
|
101
|
+
...s
|
|
83
102
|
}) {
|
|
84
103
|
return /* @__PURE__ */ t.jsx(
|
|
85
104
|
n.Item,
|
|
@@ -87,11 +106,25 @@ function j({
|
|
|
87
106
|
"data-slot": "menubar-item",
|
|
88
107
|
"data-inset": a,
|
|
89
108
|
"data-variant": r,
|
|
90
|
-
className:
|
|
91
|
-
|
|
109
|
+
className: o(
|
|
110
|
+
`
|
|
111
|
+
relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
|
|
112
|
+
paragraph-sm outline-hidden select-none
|
|
113
|
+
focus:bg-accent focus:text-accent-foreground
|
|
114
|
+
data-disabled:pointer-events-none data-disabled:opacity-50
|
|
115
|
+
data-inset:pl-8
|
|
116
|
+
data-[variant=destructive]:text-destructive-foreground
|
|
117
|
+
data-[variant=destructive]:focus:bg-destructive
|
|
118
|
+
data-[variant=destructive]:focus:text-destructive-foreground
|
|
119
|
+
dark:data-[variant=destructive]:focus:bg-destructive
|
|
120
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
121
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
122
|
+
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
123
|
+
data-[variant=destructive]:*:[svg]:text-destructive-foreground!
|
|
124
|
+
`,
|
|
92
125
|
e
|
|
93
126
|
),
|
|
94
|
-
...
|
|
127
|
+
...s
|
|
95
128
|
}
|
|
96
129
|
);
|
|
97
130
|
}
|
|
@@ -99,20 +132,36 @@ function M({
|
|
|
99
132
|
className: e,
|
|
100
133
|
children: a,
|
|
101
134
|
checked: r,
|
|
102
|
-
...
|
|
135
|
+
...s
|
|
103
136
|
}) {
|
|
104
137
|
return /* @__PURE__ */ t.jsxs(
|
|
105
138
|
n.CheckboxItem,
|
|
106
139
|
{
|
|
107
140
|
"data-slot": "menubar-checkbox-item",
|
|
108
|
-
className:
|
|
109
|
-
|
|
141
|
+
className: o(
|
|
142
|
+
`
|
|
143
|
+
relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2
|
|
144
|
+
pl-8 paragraph-sm outline-hidden select-none
|
|
145
|
+
focus:bg-accent focus:text-accent-foreground
|
|
146
|
+
data-disabled:pointer-events-none data-disabled:opacity-50
|
|
147
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
148
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
149
|
+
`,
|
|
110
150
|
e
|
|
111
151
|
),
|
|
112
152
|
checked: r,
|
|
113
|
-
...
|
|
153
|
+
...s,
|
|
114
154
|
children: [
|
|
115
|
-
/* @__PURE__ */ t.jsx(
|
|
155
|
+
/* @__PURE__ */ t.jsx(
|
|
156
|
+
"span",
|
|
157
|
+
{
|
|
158
|
+
className: `\r
|
|
159
|
+
pointer-events-none absolute left-2 flex size-3.5 items-center\r
|
|
160
|
+
justify-center\r
|
|
161
|
+
`,
|
|
162
|
+
children: /* @__PURE__ */ t.jsx(n.ItemIndicator, { children: /* @__PURE__ */ t.jsx(i, { className: "size-4" }) })
|
|
163
|
+
}
|
|
164
|
+
),
|
|
116
165
|
a
|
|
117
166
|
]
|
|
118
167
|
}
|
|
@@ -127,13 +176,29 @@ function z({
|
|
|
127
176
|
n.RadioItem,
|
|
128
177
|
{
|
|
129
178
|
"data-slot": "menubar-radio-item",
|
|
130
|
-
className:
|
|
131
|
-
|
|
179
|
+
className: o(
|
|
180
|
+
`
|
|
181
|
+
relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2
|
|
182
|
+
pl-8 paragraph-sm outline-hidden select-none
|
|
183
|
+
focus:bg-accent focus:text-accent-foreground
|
|
184
|
+
data-disabled:pointer-events-none data-disabled:opacity-50
|
|
185
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
186
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
187
|
+
`,
|
|
132
188
|
e
|
|
133
189
|
),
|
|
134
190
|
...r,
|
|
135
191
|
children: [
|
|
136
|
-
/* @__PURE__ */ t.jsx(
|
|
192
|
+
/* @__PURE__ */ t.jsx(
|
|
193
|
+
"span",
|
|
194
|
+
{
|
|
195
|
+
className: `\r
|
|
196
|
+
pointer-events-none absolute left-2 flex size-3.5 items-center\r
|
|
197
|
+
justify-center\r
|
|
198
|
+
`,
|
|
199
|
+
children: /* @__PURE__ */ t.jsx(n.ItemIndicator, { children: /* @__PURE__ */ t.jsx(u, { weight: "fill", className: "size-2 fill-current" }) })
|
|
200
|
+
}
|
|
201
|
+
),
|
|
137
202
|
a
|
|
138
203
|
]
|
|
139
204
|
}
|
|
@@ -149,8 +214,11 @@ function N({
|
|
|
149
214
|
{
|
|
150
215
|
"data-slot": "menubar-label",
|
|
151
216
|
"data-inset": a,
|
|
152
|
-
className:
|
|
153
|
-
|
|
217
|
+
className: o(
|
|
218
|
+
`
|
|
219
|
+
px-2 py-1.5 paragraph-sm font-medium
|
|
220
|
+
data-inset:pl-8
|
|
221
|
+
`,
|
|
154
222
|
e
|
|
155
223
|
),
|
|
156
224
|
...r
|
|
@@ -165,7 +233,7 @@ function I({
|
|
|
165
233
|
n.Separator,
|
|
166
234
|
{
|
|
167
235
|
"data-slot": "menubar-separator",
|
|
168
|
-
className:
|
|
236
|
+
className: o("-mx-1 my-1 h-px bg-border", e),
|
|
169
237
|
...a
|
|
170
238
|
}
|
|
171
239
|
);
|
|
@@ -178,8 +246,8 @@ function y({
|
|
|
178
246
|
"span",
|
|
179
247
|
{
|
|
180
248
|
"data-slot": "menubar-shortcut",
|
|
181
|
-
className:
|
|
182
|
-
"
|
|
249
|
+
className: o(
|
|
250
|
+
"ml-auto paragraph-xs tracking-widest text-muted-foreground",
|
|
183
251
|
e
|
|
184
252
|
),
|
|
185
253
|
...a
|
|
@@ -195,18 +263,24 @@ function _({
|
|
|
195
263
|
className: e,
|
|
196
264
|
inset: a,
|
|
197
265
|
children: r,
|
|
198
|
-
...
|
|
266
|
+
...s
|
|
199
267
|
}) {
|
|
200
268
|
return /* @__PURE__ */ t.jsxs(
|
|
201
269
|
n.SubTrigger,
|
|
202
270
|
{
|
|
203
271
|
"data-slot": "menubar-sub-trigger",
|
|
204
272
|
"data-inset": a,
|
|
205
|
-
className:
|
|
206
|
-
|
|
273
|
+
className: o(
|
|
274
|
+
`
|
|
275
|
+
flex cursor-default items-center rounded-sm px-2 py-1.5 paragraph-sm
|
|
276
|
+
outline-none select-none
|
|
277
|
+
focus:bg-accent focus:text-accent-foreground
|
|
278
|
+
data-inset:pl-8
|
|
279
|
+
data-[state=open]:bg-accent data-[state=open]:text-accent-foreground
|
|
280
|
+
`,
|
|
207
281
|
e
|
|
208
282
|
),
|
|
209
|
-
...
|
|
283
|
+
...s,
|
|
210
284
|
children: [
|
|
211
285
|
r,
|
|
212
286
|
/* @__PURE__ */ t.jsx(c, { className: "ml-auto size-4" })
|
|
@@ -223,8 +297,20 @@ function w({
|
|
|
223
297
|
n.SubContent,
|
|
224
298
|
{
|
|
225
299
|
"data-slot": "menubar-sub-content",
|
|
226
|
-
className:
|
|
227
|
-
|
|
300
|
+
className: o(
|
|
301
|
+
`
|
|
302
|
+
z-50 min-w-32 origin-(--radix-menubar-content-transform-origin)
|
|
303
|
+
overflow-hidden rounded-md border bg-popover p-1
|
|
304
|
+
text-popover-foreground shadow-lg
|
|
305
|
+
data-[side=bottom]:slide-in-from-top-2
|
|
306
|
+
data-[side=left]:slide-in-from-right-2
|
|
307
|
+
data-[side=right]:slide-in-from-left-2
|
|
308
|
+
data-[side=top]:slide-in-from-bottom-2
|
|
309
|
+
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
310
|
+
data-[state=closed]:zoom-out-95
|
|
311
|
+
data-[state=open]:animate-in data-[state=open]:fade-in-0
|
|
312
|
+
data-[state=open]:zoom-in-95
|
|
313
|
+
`,
|
|
228
314
|
e
|
|
229
315
|
),
|
|
230
316
|
collisionPadding: a,
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Bfismeyo.cjs"),V=require("../badge-DK9gdPpu.cjs"),p=require("../command-FBkK3fzE.cjs"),M=require("../popover-A1-x5q-F.cjs"),N=require("@phosphor-icons/react"),n=require("react"),I=require("../clasing-icon-CHt2Otn8.cjs"),k=n.createContext(null);function z({children:t,values:r,defaultValues:i,onValuesChange:u,isLoading:c,onSearchChange:a,loadingText:g="Loading...",noResultsText:d="No results found"}){const[x,f]=n.useState(!1),[b,j]=n.useState(new Set(r??i)),[y,m]=n.useState(new Map),[S,E]=n.useState("");function o(s){const h=R=>{const v=new Set(R);return v.has(s)?v.delete(s):v.add(s),v};j(h),u?.([...h(b)])}const l=n.useCallback((s,h)=>{m(R=>R.get(s)===h?R:new Map(R).set(s,h))},[]),w=n.useCallback(s=>{E(s),a?.(s)},[a]);return e.jsxRuntimeExports.jsx(k,{value:{open:x,setOpen:f,selectedValues:r?new Set(r):b,toggleValue:o,items:y,onItemAdded:l,isLoading:c,searchValue:S,onSearchChange:w,loadingText:g,noResultsText:d},children:e.jsxRuntimeExports.jsx(M.Popover,{open:x,onOpenChange:f,children:t})})}function P({className:t,children:r,size:i="md",...u}){const{open:c}=C();return e.jsxRuntimeExports.jsx(M.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{...u,role:u.role??"combobox","aria-expanded":u["aria-expanded"]??c,"data-size":i,disabled:u.disabled??void 0,className:e.cn(`
|
|
2
|
+
flex w-fit items-center justify-between gap-2 overflow-hidden
|
|
3
|
+
rounded-md border border-input bg-transparent whitespace-nowrap
|
|
4
|
+
transition-[color,box-shadow] outline-none
|
|
5
|
+
focus-visible:border-ring focus-visible:ring-[3px]
|
|
6
|
+
focus-visible:ring-ring/50
|
|
7
|
+
disabled:cursor-not-allowed disabled:opacity-50
|
|
8
|
+
aria-invalid:border-destructive-foreground
|
|
9
|
+
aria-invalid:ring-destructive-foreground/20
|
|
10
|
+
dark:bg-input/30
|
|
11
|
+
dark:hover:bg-input/50
|
|
12
|
+
dark:aria-invalid:ring-destructive-foreground/40
|
|
13
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
14
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
15
|
+
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
16
|
+
`,i==="xs"&&`
|
|
17
|
+
h-7 px-2 py-1 label-sm
|
|
18
|
+
[&_svg:not([class*="size-"])]:size-3.5
|
|
19
|
+
`,i==="sm"&&"h-8 px-2 py-1 label-md",i==="md"&&"h-12 px-3 py-1 label-lg",i==="lg"&&"h-16 px-4 py-2 label-xl",t),children:[r,e.jsxRuntimeExports.jsx(N.CaretUpDownIcon,{className:"size-4 shrink-0 opacity-50"})]})})}function q({placeholder:t,clickToRemove:r=!0,className:i,overflowBehavior:u="wrap-when-open",...c}){const{selectedValues:a,toggleValue:g,items:d,open:x}=C(),[f,b]=n.useState(0),j=n.useRef(null),y=n.useRef(null),m=n.useRef(new Set),S=u==="wrap"||u==="wrap-when-open"&&x;n.useEffect(()=>{S&&m.current.forEach(o=>o.style.removeProperty("display"))},[S]);const E=n.useCallback(()=>{if(j.current==null)return;const o=j.current,l=y.current;l!=null&&(l.style.display="none"),m.current.forEach(s=>s.style.removeProperty("display"));let w=0;for(let s=m.current.size-1;s>=0;s--){const h=[...m.current][s];if(o.scrollWidth<=o.clientWidth)break;w=m.current.size-s,h.style.display="none",l?.style.removeProperty("display")}b(w)},[]);return n.useEffect(()=>{if(j.current==null)return;const o=new ResizeObserver(E);return o.observe(j.current),()=>o.disconnect()},[E]),n.useLayoutEffect(()=>{E()},[a,E]),a.size===0&&t?e.jsxRuntimeExports.jsx("span",{className:"font-regular text-muted-foreground",children:t}):e.jsxRuntimeExports.jsxs("div",{...c,ref:j,className:e.cn("flex min-h-7 w-full gap-1.5 overflow-hidden",S&&"flex-wrap",i),children:[[...a].filter(o=>d.has(o)).map(o=>e.jsxRuntimeExports.jsxs(V.Badge,{ref:l=>{if(l!=null)return m.current.add(l),()=>{m.current.delete(l)}},variant:"outline",className:"group flex items-center gap-1",onClick:r?l=>{l.stopPropagation(),g(o)}:void 0,children:[d.get(o),r&&e.jsxRuntimeExports.jsx(N.XIcon,{className:`\r
|
|
20
|
+
size-2 text-muted-foreground\r
|
|
21
|
+
group-hover:text-destructive-foreground\r
|
|
22
|
+
`})]},o)),e.jsxRuntimeExports.jsxs(V.Badge,{style:{display:f>0&&!S?"block":"none"},variant:"outline",ref:y,children:["+",f]})]})}function O({search:t=!0,children:r,...i}){const{isLoading:u,onSearchChange:c,searchValue:a,noResultsText:g,loadingText:d}=C(),x=typeof t=="object"?!0:t;return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{style:{display:"none"},children:e.jsxRuntimeExports.jsx(p.Command,{children:e.jsxRuntimeExports.jsx(p.CommandList,{children:r})})}),e.jsxRuntimeExports.jsx(M.PopoverContent,{className:"min-w-(--radix-popover-trigger-width) p-0",children:e.jsxRuntimeExports.jsxs(p.Command,{...i,children:[x?e.jsxRuntimeExports.jsx(p.CommandInput,{placeholder:typeof t=="object"?t.placeholder:void 0,value:a,onValueChange:c}):e.jsxRuntimeExports.jsx("button",{autoFocus:!0,"aria-hidden":"true",className:"sr-only"}),e.jsxRuntimeExports.jsx(p.CommandList,{children:u?e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center py-6",children:[e.jsxRuntimeExports.jsx(I.ClasingIcon,{className:`\r
|
|
23
|
+
size-4 animate-spin text-muted-foreground\r
|
|
24
|
+
`}),e.jsxRuntimeExports.jsx("span",{className:"ml-2 paragraph-sm text-muted-foreground",children:d})]}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[x&&e.jsxRuntimeExports.jsx(p.CommandEmpty,{children:g}),r]})})]})})]})}function T({value:t,children:r,badgeLabel:i,onSelect:u,...c}){const{toggleValue:a,selectedValues:g,onItemAdded:d}=C(),x=g.has(t);return n.useEffect(()=>{d(t,i??r)},[t,r,d,i]),e.jsxRuntimeExports.jsxs(p.CommandItem,{...c,value:t,onSelect:f=>{a(f),u?.(f)},children:[e.jsxRuntimeExports.jsx(N.CheckIcon,{className:e.cn("mr-2 size-4",x?"opacity-100":"opacity-0")}),r]})}function _(t){return e.jsxRuntimeExports.jsx(p.CommandGroup,{...t})}function A(t){return e.jsxRuntimeExports.jsx(p.CommandSeparator,{...t})}function C(){const t=n.useContext(k);if(t==null)throw new Error("useMultiSelectContext must be used within a MultiSelectContext");return t}exports.MultiSelect=z;exports.MultiSelectContent=O;exports.MultiSelectGroup=_;exports.MultiSelectItem=T;exports.MultiSelectSeparator=A;exports.MultiSelectTrigger=P;exports.MultiSelectValue=q;
|