@clasing/ui 2.7.0 → 2.7.1
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/{command-FBkK3fzE.cjs → command-DNjJookC.cjs} +7 -8
- package/dist/{command-Vk11GgqU.js → command-peXi2dFX.js} +29 -30
- package/dist/components/command.cjs.js +1 -1
- package/dist/components/command.es.js +1 -1
- package/dist/components/context-menu.cjs.js +3 -4
- package/dist/components/context-menu.es.js +2 -3
- package/dist/components/dropdown-menu.cjs.js +7 -6
- package/dist/components/dropdown-menu.es.js +56 -55
- package/dist/components/menubar.cjs.js +0 -1
- package/dist/components/menubar.es.js +4 -5
- package/dist/components/multi-select.cjs.js +2 -4
- package/dist/components/multi-select.es.js +2 -9
- package/dist/components/navigation-menu.cjs.js +1 -2
- package/dist/components/navigation-menu.es.js +1 -2
- package/dist/components/phone-input.cjs.js +1 -1
- package/dist/components/phone-input.es.js +1 -1
- package/dist/components/select.cjs.js +0 -1
- package/dist/components/select.es.js +4 -5
- package/dist/ui.css +1 -1
- package/package.json +1 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";const e=require("./index-Bfismeyo.cjs"),o=require("cmdk"),a=require("./dialog-BUaX7IId.cjs"),c=require("@phosphor-icons/react");function r({className:t
|
|
2
|
-
flex
|
|
1
|
+
"use strict";const e=require("./index-Bfismeyo.cjs"),o=require("cmdk"),a=require("./dialog-BUaX7IId.cjs"),c=require("@phosphor-icons/react");function r({className:n,...t}){return e.jsxRuntimeExports.jsx(o.Command,{"data-slot":"command",className:e.cn(`
|
|
2
|
+
flex size-full flex-col overflow-hidden rounded-md bg-popover
|
|
3
3
|
text-popover-foreground
|
|
4
|
-
`,
|
|
4
|
+
`,n),...t})}function p({title:n="Command Palette",description:t="Search for a command to run...",children:m,className:s,showCloseButton:d=!0,...i}){return e.jsxRuntimeExports.jsxs(a.Dialog,{...i,children:[e.jsxRuntimeExports.jsxs(a.DialogHeader,{className:"sr-only",children:[e.jsxRuntimeExports.jsx(a.DialogTitle,{children:n}),e.jsxRuntimeExports.jsx(a.DialogDescription,{children:t})]}),e.jsxRuntimeExports.jsx(a.DialogContent,{className:e.cn("overflow-hidden p-0",s),showCloseButton:d,children:e.jsxRuntimeExports.jsx(r,{className:`\r
|
|
5
5
|
**:data-[slot=command-input-wrapper]:h-12\r
|
|
6
6
|
[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0\r
|
|
7
7
|
[&_[cmdk-input-wrapper]_svg]:size-5\r
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
**:[[cmdk-group]]:px-2\r
|
|
13
13
|
**:[[cmdk-input]]:h-12\r
|
|
14
14
|
**:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3\r
|
|
15
|
-
`,children:m})})]})}function
|
|
15
|
+
`,children:m})})]})}function u({className:n,...t}){return e.jsxRuntimeExports.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[e.jsxRuntimeExports.jsx(c.MagnifyingGlassIcon,{className:"size-4 shrink-0 opacity-50"}),e.jsxRuntimeExports.jsx(o.Command.Input,{"data-slot":"command-input",className:e.cn(`
|
|
16
16
|
flex h-10 w-full rounded-md bg-transparent py-3 paragraph-sm
|
|
17
17
|
outline-hidden
|
|
18
18
|
placeholder:text-muted-foreground
|
|
19
19
|
disabled:cursor-not-allowed disabled:opacity-50
|
|
20
|
-
`,
|
|
20
|
+
`,n),...t})]})}function l({className:n,...t}){return e.jsxRuntimeExports.jsx(o.Command.List,{"data-slot":"command-list",className:e.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),...t})}function x({...n}){return e.jsxRuntimeExports.jsx(o.Command.Empty,{"data-slot":"command-empty",className:"py-6 text-center paragraph-sm",...n})}function g({className:n,...t}){return e.jsxRuntimeExports.jsx(o.Command.Group,{"data-slot":"command-group",className:e.cn(`
|
|
21
21
|
overflow-hidden p-1 text-foreground
|
|
22
22
|
**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5
|
|
23
23
|
**:[[cmdk-group-heading]]:paragraph-xs
|
|
24
24
|
**:[[cmdk-group-heading]]:font-semibold
|
|
25
25
|
**:[[cmdk-group-heading]]:text-muted-foreground
|
|
26
|
-
`,
|
|
26
|
+
`,n),...t})}function h({className:n,...t}){return e.jsxRuntimeExports.jsx(o.Command.Separator,{"data-slot":"command-separator",className:e.cn("-mx-1 h-px bg-border",n),...t})}function f({className:n,...t}){return e.jsxRuntimeExports.jsx(o.Command.Item,{"data-slot":"command-item",className:e.cn(`
|
|
27
27
|
relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
|
|
28
28
|
paragraph-sm outline-hidden select-none
|
|
29
29
|
data-[disabled=true]:pointer-events-none
|
|
@@ -32,5 +32,4 @@
|
|
|
32
32
|
data-[selected=true]:text-accent-foreground
|
|
33
33
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
34
34
|
[&_svg:not([class*='size-'])]:size-4
|
|
35
|
-
|
|
36
|
-
`,t),...n})}function j({className:t,...n}){return e.jsxRuntimeExports.jsx("span",{"data-slot":"command-shortcut",className:e.cn("ml-auto paragraph-xs tracking-widest text-muted-foreground",t),...n})}exports.Command=r;exports.CommandDialog=u;exports.CommandEmpty=x;exports.CommandGroup=g;exports.CommandInput=p;exports.CommandItem=f;exports.CommandList=l;exports.CommandSeparator=h;exports.CommandShortcut=j;
|
|
35
|
+
`,n),...t})}function j({className:n,...t}){return e.jsxRuntimeExports.jsx("span",{"data-slot":"command-shortcut",className:e.cn("ml-auto paragraph-xs tracking-widest text-muted-foreground",n),...t})}exports.Command=r;exports.CommandDialog=p;exports.CommandEmpty=x;exports.CommandGroup=g;exports.CommandInput=u;exports.CommandItem=f;exports.CommandList=l;exports.CommandSeparator=h;exports.CommandShortcut=j;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { j as e, c as
|
|
1
|
+
import { j as e, c as t } from "./index-CwFDnnd3.js";
|
|
2
2
|
import { Command as r } from "cmdk";
|
|
3
|
-
import { D as
|
|
3
|
+
import { D as i, e as c, h as p, c as l, b as u } from "./dialog-CdmsVmRe.js";
|
|
4
4
|
import { MagnifyingGlassIcon as g } from "@phosphor-icons/react";
|
|
5
5
|
function x({
|
|
6
6
|
className: a,
|
|
7
|
-
...
|
|
7
|
+
...o
|
|
8
8
|
}) {
|
|
9
9
|
return /* @__PURE__ */ e.jsx(
|
|
10
10
|
r,
|
|
11
11
|
{
|
|
12
12
|
"data-slot": "command",
|
|
13
|
-
className:
|
|
13
|
+
className: t(
|
|
14
14
|
`
|
|
15
|
-
flex
|
|
15
|
+
flex size-full flex-col overflow-hidden rounded-md bg-popover
|
|
16
16
|
text-popover-foreground
|
|
17
17
|
`,
|
|
18
18
|
a
|
|
19
19
|
),
|
|
20
|
-
...
|
|
20
|
+
...o
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
function v({
|
|
25
25
|
title: a = "Command Palette",
|
|
26
|
-
description:
|
|
26
|
+
description: o = "Search for a command to run...",
|
|
27
27
|
children: n,
|
|
28
28
|
className: s,
|
|
29
29
|
showCloseButton: d = !0,
|
|
30
30
|
...m
|
|
31
31
|
}) {
|
|
32
|
-
return /* @__PURE__ */ e.jsxs(
|
|
33
|
-
/* @__PURE__ */ e.jsxs(
|
|
32
|
+
return /* @__PURE__ */ e.jsxs(i, { ...m, children: [
|
|
33
|
+
/* @__PURE__ */ e.jsxs(c, { className: "sr-only", children: [
|
|
34
34
|
/* @__PURE__ */ e.jsx(p, { children: a }),
|
|
35
|
-
/* @__PURE__ */ e.jsx(l, { children:
|
|
35
|
+
/* @__PURE__ */ e.jsx(l, { children: o })
|
|
36
36
|
] }),
|
|
37
37
|
/* @__PURE__ */ e.jsx(
|
|
38
38
|
u,
|
|
39
39
|
{
|
|
40
|
-
className:
|
|
40
|
+
className: t("overflow-hidden p-0", s),
|
|
41
41
|
showCloseButton: d,
|
|
42
42
|
children: /* @__PURE__ */ e.jsx(
|
|
43
43
|
x,
|
|
@@ -63,7 +63,7 @@ function v({
|
|
|
63
63
|
}
|
|
64
64
|
function b({
|
|
65
65
|
className: a,
|
|
66
|
-
...
|
|
66
|
+
...o
|
|
67
67
|
}) {
|
|
68
68
|
return /* @__PURE__ */ e.jsxs(
|
|
69
69
|
"div",
|
|
@@ -76,7 +76,7 @@ function b({
|
|
|
76
76
|
r.Input,
|
|
77
77
|
{
|
|
78
78
|
"data-slot": "command-input",
|
|
79
|
-
className:
|
|
79
|
+
className: t(
|
|
80
80
|
`
|
|
81
81
|
flex h-10 w-full rounded-md bg-transparent py-3 paragraph-sm
|
|
82
82
|
outline-hidden
|
|
@@ -85,7 +85,7 @@ function b({
|
|
|
85
85
|
`,
|
|
86
86
|
a
|
|
87
87
|
),
|
|
88
|
-
...
|
|
88
|
+
...o
|
|
89
89
|
}
|
|
90
90
|
)
|
|
91
91
|
]
|
|
@@ -94,17 +94,17 @@ function b({
|
|
|
94
94
|
}
|
|
95
95
|
function y({
|
|
96
96
|
className: a,
|
|
97
|
-
...
|
|
97
|
+
...o
|
|
98
98
|
}) {
|
|
99
99
|
return /* @__PURE__ */ e.jsx(
|
|
100
100
|
r.List,
|
|
101
101
|
{
|
|
102
102
|
"data-slot": "command-list",
|
|
103
|
-
className:
|
|
103
|
+
className: t(
|
|
104
104
|
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
105
105
|
a
|
|
106
106
|
),
|
|
107
|
-
...
|
|
107
|
+
...o
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
110
|
}
|
|
@@ -122,13 +122,13 @@ function C({
|
|
|
122
122
|
}
|
|
123
123
|
function N({
|
|
124
124
|
className: a,
|
|
125
|
-
...
|
|
125
|
+
...o
|
|
126
126
|
}) {
|
|
127
127
|
return /* @__PURE__ */ e.jsx(
|
|
128
128
|
r.Group,
|
|
129
129
|
{
|
|
130
130
|
"data-slot": "command-group",
|
|
131
|
-
className:
|
|
131
|
+
className: t(
|
|
132
132
|
`
|
|
133
133
|
overflow-hidden p-1 text-foreground
|
|
134
134
|
**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5
|
|
@@ -138,32 +138,32 @@ function N({
|
|
|
138
138
|
`,
|
|
139
139
|
a
|
|
140
140
|
),
|
|
141
|
-
...
|
|
141
|
+
...o
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
function w({
|
|
146
146
|
className: a,
|
|
147
|
-
...
|
|
147
|
+
...o
|
|
148
148
|
}) {
|
|
149
149
|
return /* @__PURE__ */ e.jsx(
|
|
150
150
|
r.Separator,
|
|
151
151
|
{
|
|
152
152
|
"data-slot": "command-separator",
|
|
153
|
-
className:
|
|
154
|
-
...
|
|
153
|
+
className: t("-mx-1 h-px bg-border", a),
|
|
154
|
+
...o
|
|
155
155
|
}
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
function _({
|
|
159
159
|
className: a,
|
|
160
|
-
...
|
|
160
|
+
...o
|
|
161
161
|
}) {
|
|
162
162
|
return /* @__PURE__ */ e.jsx(
|
|
163
163
|
r.Item,
|
|
164
164
|
{
|
|
165
165
|
"data-slot": "command-item",
|
|
166
|
-
className:
|
|
166
|
+
className: t(
|
|
167
167
|
`
|
|
168
168
|
relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
|
|
169
169
|
paragraph-sm outline-hidden select-none
|
|
@@ -173,27 +173,26 @@ function _({
|
|
|
173
173
|
data-[selected=true]:text-accent-foreground
|
|
174
174
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
175
175
|
[&_svg:not([class*='size-'])]:size-4
|
|
176
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
177
176
|
`,
|
|
178
177
|
a
|
|
179
178
|
),
|
|
180
|
-
...
|
|
179
|
+
...o
|
|
181
180
|
}
|
|
182
181
|
);
|
|
183
182
|
}
|
|
184
183
|
function D({
|
|
185
184
|
className: a,
|
|
186
|
-
...
|
|
185
|
+
...o
|
|
187
186
|
}) {
|
|
188
187
|
return /* @__PURE__ */ e.jsx(
|
|
189
188
|
"span",
|
|
190
189
|
{
|
|
191
190
|
"data-slot": "command-shortcut",
|
|
192
|
-
className:
|
|
191
|
+
className: t(
|
|
193
192
|
"ml-auto paragraph-xs tracking-widest text-muted-foreground",
|
|
194
193
|
a
|
|
195
194
|
),
|
|
196
|
-
...
|
|
195
|
+
...o
|
|
197
196
|
}
|
|
198
197
|
);
|
|
199
198
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../command-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../command-DNjJookC.cjs");exports.Command=m.Command;exports.CommandDialog=m.CommandDialog;exports.CommandEmpty=m.CommandEmpty;exports.CommandGroup=m.CommandGroup;exports.CommandInput=m.CommandInput;exports.CommandItem=m.CommandItem;exports.CommandList=m.CommandList;exports.CommandSeparator=m.CommandSeparator;exports.CommandShortcut=m.CommandShortcut;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as o, a as d, b as n, c as s, d as C, e as t, f as r, g as p, h as e } from "../command-
|
|
1
|
+
import { C as o, a as d, b as n, c as s, d as C, e as t, f as r, g as p, h as e } from "../command-peXi2dFX.js";
|
|
2
2
|
export {
|
|
3
3
|
o as Command,
|
|
4
4
|
d as CommandDialog,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
data-[state=closed]:zoom-out-95
|
|
32
32
|
data-[state=open]:animate-in data-[state=open]:fade-in-0
|
|
33
33
|
data-[state=open]:zoom-in-95
|
|
34
|
-
`,t),collisionPadding:n,...a})})}function
|
|
34
|
+
`,t),collisionPadding:n,...a})})}function j({className:t,inset:n,variant:a="default",...s}){return e.jsxRuntimeExports.jsx(o.Item,{"data-slot":"context-menu-item","data-inset":n,"data-variant":a,className:e.cn(`
|
|
35
35
|
relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
|
|
36
36
|
paragraph-sm outline-hidden select-none
|
|
37
37
|
focus:bg-accent focus:text-accent-foreground
|
|
@@ -43,9 +43,8 @@
|
|
|
43
43
|
dark:data-[variant=destructive]:focus:bg-destructive/20
|
|
44
44
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
45
45
|
[&_svg:not([class*='size-'])]:size-4
|
|
46
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
47
46
|
data-[variant=destructive]:*:[svg]:text-destructive!
|
|
48
|
-
`,t),...s})}function
|
|
47
|
+
`,t),...s})}function v({className:t,children:n,checked:a,...s}){return e.jsxRuntimeExports.jsxs(o.CheckboxItem,{"data-slot":"context-menu-checkbox-item",className:e.cn(`
|
|
49
48
|
relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2
|
|
50
49
|
pl-8 paragraph-sm outline-hidden select-none
|
|
51
50
|
focus:bg-accent focus:text-accent-foreground
|
|
@@ -68,4 +67,4 @@
|
|
|
68
67
|
`,children:e.jsxRuntimeExports.jsx(o.ItemIndicator,{children:e.jsxRuntimeExports.jsx(r.CircleIcon,{weight:"fill",className:"size-2 fill-current"})})}),n]})}function C({className:t,inset:n,...a}){return e.jsxRuntimeExports.jsx(o.Label,{"data-slot":"context-menu-label","data-inset":n,className:e.cn(`
|
|
69
68
|
px-2 py-1.5 paragraph-sm font-semibold text-foreground
|
|
70
69
|
data-inset:pl-8
|
|
71
|
-
`,t),...a})}function M({className:t,...n}){return e.jsxRuntimeExports.jsx(o.Separator,{"data-slot":"context-menu-separator",className:e.cn("-mx-1 my-1 h-px bg-border",t),...n})}function R({className:t,...n}){return e.jsxRuntimeExports.jsx("span",{"data-slot":"context-menu-shortcut",className:e.cn("ml-auto paragraph-xs tracking-widest text-muted-foreground",t),...n})}exports.ContextMenu=d;exports.ContextMenuCheckboxItem=
|
|
70
|
+
`,t),...a})}function M({className:t,...n}){return e.jsxRuntimeExports.jsx(o.Separator,{"data-slot":"context-menu-separator",className:e.cn("-mx-1 my-1 h-px bg-border",t),...n})}function R({className:t,...n}){return e.jsxRuntimeExports.jsx("span",{"data-slot":"context-menu-shortcut",className:e.cn("ml-auto paragraph-xs tracking-widest text-muted-foreground",t),...n})}exports.ContextMenu=d;exports.ContextMenuCheckboxItem=v;exports.ContextMenuContent=b;exports.ContextMenuGroup=x;exports.ContextMenuItem=j;exports.ContextMenuLabel=C;exports.ContextMenuPortal=l;exports.ContextMenuRadioGroup=p;exports.ContextMenuRadioItem=h;exports.ContextMenuSeparator=M;exports.ContextMenuShortcut=R;exports.ContextMenuSub=m;exports.ContextMenuSubContent=g;exports.ContextMenuSubTrigger=f;exports.ContextMenuTrigger=c;
|
|
@@ -152,7 +152,6 @@ function C({
|
|
|
152
152
|
dark:data-[variant=destructive]:focus:bg-destructive/20
|
|
153
153
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
154
154
|
[&_svg:not([class*='size-'])]:size-4
|
|
155
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
156
155
|
data-[variant=destructive]:*:[svg]:text-destructive!
|
|
157
156
|
`,
|
|
158
157
|
t
|
|
@@ -271,7 +270,7 @@ function I({
|
|
|
271
270
|
}
|
|
272
271
|
);
|
|
273
272
|
}
|
|
274
|
-
function
|
|
273
|
+
function y({
|
|
275
274
|
className: t,
|
|
276
275
|
...n
|
|
277
276
|
}) {
|
|
@@ -298,7 +297,7 @@ export {
|
|
|
298
297
|
v as ContextMenuRadioGroup,
|
|
299
298
|
M as ContextMenuRadioItem,
|
|
300
299
|
I as ContextMenuSeparator,
|
|
301
|
-
|
|
300
|
+
y as ContextMenuShortcut,
|
|
302
301
|
g as ContextMenuSub,
|
|
303
302
|
h as ContextMenuSubContent,
|
|
304
303
|
b as ContextMenuSubTrigger,
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
dark:data-[variant=destructive]:focus:bg-destructive
|
|
24
24
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
25
25
|
[&_svg:not([class*='size-'])]:size-4
|
|
26
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
27
26
|
data-[variant=destructive]:*:[svg]:text-destructive!
|
|
28
27
|
`,e),...a})}function f({className:e,children:n,checked:r,...a}){return t.jsxRuntimeExports.jsxs(o.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:t.cn(`
|
|
29
28
|
relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2
|
|
@@ -48,12 +47,14 @@
|
|
|
48
47
|
`,children:t.jsxRuntimeExports.jsx(o.ItemIndicator,{children:t.jsxRuntimeExports.jsx(s.CircleIcon,{weight:"fill",className:"size-2 fill-current"})})}),n]})}function b({className:e,inset:n,...r}){return t.jsxRuntimeExports.jsx(o.Label,{"data-slot":"dropdown-menu-label","data-inset":n,className:t.cn(`
|
|
49
48
|
px-2 py-1.5 paragraph-sm font-semibold
|
|
50
49
|
data-inset:pl-8
|
|
51
|
-
`,e),...r})}function
|
|
52
|
-
flex cursor-default items-center rounded-sm px-2 py-1.5
|
|
53
|
-
outline-hidden select-none
|
|
50
|
+
`,e),...r})}function v({className:e,...n}){return t.jsxRuntimeExports.jsx(o.Separator,{"data-slot":"dropdown-menu-separator",className:t.cn("-mx-1 my-1 h-px bg-border",e),...n})}function j({className:e,...n}){return t.jsxRuntimeExports.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:t.cn("ml-auto paragraph-xs tracking-widest text-muted-foreground",e),...n})}function h({...e}){return t.jsxRuntimeExports.jsx(o.Sub,{"data-slot":"dropdown-menu-sub",...e})}function D({className:e,inset:n,children:r,...a}){return t.jsxRuntimeExports.jsxs(o.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":n,className:t.cn(`
|
|
51
|
+
relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
|
|
52
|
+
paragraph-sm outline-hidden select-none
|
|
54
53
|
focus:bg-accent focus:text-accent-foreground
|
|
54
|
+
data-disabled:pointer-events-none data-disabled:opacity-50
|
|
55
55
|
data-inset:pl-8
|
|
56
|
-
|
|
56
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
57
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
57
58
|
`,e),...a,children:[r,t.jsxRuntimeExports.jsx(s.CaretRightIcon,{className:"ml-auto size-4"})]})}function M({className:e,...n}){return t.jsxRuntimeExports.jsx(o.SubContent,{"data-slot":"dropdown-menu-sub-content",className:t.cn(`
|
|
58
59
|
z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin)
|
|
59
60
|
overflow-hidden rounded-md border bg-popover p-1
|
|
@@ -66,4 +67,4 @@
|
|
|
66
67
|
data-[state=closed]:zoom-out-95
|
|
67
68
|
data-[state=open]:animate-in data-[state=open]:fade-in-0
|
|
68
69
|
data-[state=open]:zoom-in-95
|
|
69
|
-
`,e),...n})}exports.DropdownMenu=u;exports.DropdownMenuCheckboxItem=f;exports.DropdownMenuContent=l;exports.DropdownMenuGroup=m;exports.DropdownMenuItem=x;exports.DropdownMenuLabel=b;exports.DropdownMenuPortal=p;exports.DropdownMenuRadioGroup=g;exports.DropdownMenuRadioItem=w;exports.DropdownMenuSeparator=
|
|
70
|
+
`,e),...n})}exports.DropdownMenu=u;exports.DropdownMenuCheckboxItem=f;exports.DropdownMenuContent=l;exports.DropdownMenuGroup=m;exports.DropdownMenuItem=x;exports.DropdownMenuLabel=b;exports.DropdownMenuPortal=p;exports.DropdownMenuRadioGroup=g;exports.DropdownMenuRadioItem=w;exports.DropdownMenuSeparator=v;exports.DropdownMenuShortcut=j;exports.DropdownMenuSub=h;exports.DropdownMenuSubContent=M;exports.DropdownMenuSubTrigger=D;exports.DropdownMenuTrigger=c;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as t, c as r } from "../index-CwFDnnd3.js";
|
|
2
|
-
import * as
|
|
3
|
-
import { CheckIcon as
|
|
2
|
+
import * as o from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
import { CheckIcon as d, CircleIcon as i, CaretRightIcon as u } from "@phosphor-icons/react";
|
|
4
4
|
function p({
|
|
5
5
|
...e
|
|
6
6
|
}) {
|
|
7
|
-
return /* @__PURE__ */ t.jsx(
|
|
7
|
+
return /* @__PURE__ */ t.jsx(o.Root, { "data-slot": "dropdown-menu", ...e });
|
|
8
8
|
}
|
|
9
9
|
function m({
|
|
10
10
|
...e
|
|
11
11
|
}) {
|
|
12
|
-
return /* @__PURE__ */ t.jsx(
|
|
12
|
+
return /* @__PURE__ */ t.jsx(o.Portal, { "data-slot": "dropdown-menu-portal", ...e });
|
|
13
13
|
}
|
|
14
14
|
function f({
|
|
15
15
|
...e
|
|
16
16
|
}) {
|
|
17
17
|
return /* @__PURE__ */ t.jsx(
|
|
18
|
-
|
|
18
|
+
o.Trigger,
|
|
19
19
|
{
|
|
20
20
|
"data-slot": "dropdown-menu-trigger",
|
|
21
21
|
...e
|
|
@@ -24,15 +24,15 @@ function f({
|
|
|
24
24
|
}
|
|
25
25
|
function g({
|
|
26
26
|
className: e,
|
|
27
|
-
sideOffset:
|
|
27
|
+
sideOffset: n = 4,
|
|
28
28
|
collisionPadding: a = 24,
|
|
29
|
-
...
|
|
29
|
+
...s
|
|
30
30
|
}) {
|
|
31
|
-
return /* @__PURE__ */ t.jsx(
|
|
32
|
-
|
|
31
|
+
return /* @__PURE__ */ t.jsx(o.Portal, { children: /* @__PURE__ */ t.jsx(
|
|
32
|
+
o.Content,
|
|
33
33
|
{
|
|
34
34
|
"data-slot": "dropdown-menu-content",
|
|
35
|
-
sideOffset:
|
|
35
|
+
sideOffset: n,
|
|
36
36
|
className: r(
|
|
37
37
|
`
|
|
38
38
|
z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32
|
|
@@ -51,26 +51,26 @@ function g({
|
|
|
51
51
|
e
|
|
52
52
|
),
|
|
53
53
|
collisionPadding: a,
|
|
54
|
-
...
|
|
54
|
+
...s
|
|
55
55
|
}
|
|
56
56
|
) });
|
|
57
57
|
}
|
|
58
58
|
function x({
|
|
59
59
|
...e
|
|
60
60
|
}) {
|
|
61
|
-
return /* @__PURE__ */ t.jsx(
|
|
61
|
+
return /* @__PURE__ */ t.jsx(o.Group, { "data-slot": "dropdown-menu-group", ...e });
|
|
62
62
|
}
|
|
63
63
|
function v({
|
|
64
64
|
className: e,
|
|
65
|
-
inset:
|
|
65
|
+
inset: n,
|
|
66
66
|
variant: a = "default",
|
|
67
|
-
...
|
|
67
|
+
...s
|
|
68
68
|
}) {
|
|
69
69
|
return /* @__PURE__ */ t.jsx(
|
|
70
|
-
|
|
70
|
+
o.Item,
|
|
71
71
|
{
|
|
72
72
|
"data-slot": "dropdown-menu-item",
|
|
73
|
-
"data-inset":
|
|
73
|
+
"data-inset": n,
|
|
74
74
|
"data-variant": a,
|
|
75
75
|
className: r(
|
|
76
76
|
`
|
|
@@ -85,23 +85,22 @@ function v({
|
|
|
85
85
|
dark:data-[variant=destructive]:focus:bg-destructive
|
|
86
86
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
87
87
|
[&_svg:not([class*='size-'])]:size-4
|
|
88
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
89
88
|
data-[variant=destructive]:*:[svg]:text-destructive!
|
|
90
89
|
`,
|
|
91
90
|
e
|
|
92
91
|
),
|
|
93
|
-
...
|
|
92
|
+
...s
|
|
94
93
|
}
|
|
95
94
|
);
|
|
96
95
|
}
|
|
97
|
-
function
|
|
96
|
+
function b({
|
|
98
97
|
className: e,
|
|
99
|
-
children:
|
|
98
|
+
children: n,
|
|
100
99
|
checked: a,
|
|
101
|
-
...
|
|
100
|
+
...s
|
|
102
101
|
}) {
|
|
103
102
|
return /* @__PURE__ */ t.jsxs(
|
|
104
|
-
|
|
103
|
+
o.CheckboxItem,
|
|
105
104
|
{
|
|
106
105
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
107
106
|
className: r(
|
|
@@ -116,7 +115,7 @@ function w({
|
|
|
116
115
|
e
|
|
117
116
|
),
|
|
118
117
|
checked: a,
|
|
119
|
-
...
|
|
118
|
+
...s,
|
|
120
119
|
children: [
|
|
121
120
|
/* @__PURE__ */ t.jsx(
|
|
122
121
|
"span",
|
|
@@ -125,19 +124,19 @@ function w({
|
|
|
125
124
|
pointer-events-none absolute left-2 flex size-3.5 items-center\r
|
|
126
125
|
justify-center\r
|
|
127
126
|
`,
|
|
128
|
-
children: /* @__PURE__ */ t.jsx(
|
|
127
|
+
children: /* @__PURE__ */ t.jsx(o.ItemIndicator, { children: /* @__PURE__ */ t.jsx(d, { className: "size-4" }) })
|
|
129
128
|
}
|
|
130
129
|
),
|
|
131
|
-
|
|
130
|
+
n
|
|
132
131
|
]
|
|
133
132
|
}
|
|
134
133
|
);
|
|
135
134
|
}
|
|
136
|
-
function
|
|
135
|
+
function w({
|
|
137
136
|
...e
|
|
138
137
|
}) {
|
|
139
138
|
return /* @__PURE__ */ t.jsx(
|
|
140
|
-
|
|
139
|
+
o.RadioGroup,
|
|
141
140
|
{
|
|
142
141
|
"data-slot": "dropdown-menu-radio-group",
|
|
143
142
|
...e
|
|
@@ -146,11 +145,11 @@ function b({
|
|
|
146
145
|
}
|
|
147
146
|
function h({
|
|
148
147
|
className: e,
|
|
149
|
-
children:
|
|
148
|
+
children: n,
|
|
150
149
|
...a
|
|
151
150
|
}) {
|
|
152
151
|
return /* @__PURE__ */ t.jsxs(
|
|
153
|
-
|
|
152
|
+
o.RadioItem,
|
|
154
153
|
{
|
|
155
154
|
"data-slot": "dropdown-menu-radio-item",
|
|
156
155
|
className: r(
|
|
@@ -173,24 +172,24 @@ function h({
|
|
|
173
172
|
pointer-events-none absolute left-2 flex size-3.5 items-center\r
|
|
174
173
|
justify-center\r
|
|
175
174
|
`,
|
|
176
|
-
children: /* @__PURE__ */ t.jsx(
|
|
175
|
+
children: /* @__PURE__ */ t.jsx(o.ItemIndicator, { children: /* @__PURE__ */ t.jsx(i, { weight: "fill", className: "size-2 fill-current" }) })
|
|
177
176
|
}
|
|
178
177
|
),
|
|
179
|
-
|
|
178
|
+
n
|
|
180
179
|
]
|
|
181
180
|
}
|
|
182
181
|
);
|
|
183
182
|
}
|
|
184
183
|
function j({
|
|
185
184
|
className: e,
|
|
186
|
-
inset:
|
|
185
|
+
inset: n,
|
|
187
186
|
...a
|
|
188
187
|
}) {
|
|
189
188
|
return /* @__PURE__ */ t.jsx(
|
|
190
|
-
|
|
189
|
+
o.Label,
|
|
191
190
|
{
|
|
192
191
|
"data-slot": "dropdown-menu-label",
|
|
193
|
-
"data-inset":
|
|
192
|
+
"data-inset": n,
|
|
194
193
|
className: r(
|
|
195
194
|
`
|
|
196
195
|
px-2 py-1.5 paragraph-sm font-semibold
|
|
@@ -204,20 +203,20 @@ function j({
|
|
|
204
203
|
}
|
|
205
204
|
function z({
|
|
206
205
|
className: e,
|
|
207
|
-
...
|
|
206
|
+
...n
|
|
208
207
|
}) {
|
|
209
208
|
return /* @__PURE__ */ t.jsx(
|
|
210
|
-
|
|
209
|
+
o.Separator,
|
|
211
210
|
{
|
|
212
211
|
"data-slot": "dropdown-menu-separator",
|
|
213
212
|
className: r("-mx-1 my-1 h-px bg-border", e),
|
|
214
|
-
...
|
|
213
|
+
...n
|
|
215
214
|
}
|
|
216
215
|
);
|
|
217
216
|
}
|
|
218
217
|
function D({
|
|
219
218
|
className: e,
|
|
220
|
-
...
|
|
219
|
+
...n
|
|
221
220
|
}) {
|
|
222
221
|
return /* @__PURE__ */ t.jsx(
|
|
223
222
|
"span",
|
|
@@ -227,37 +226,39 @@ function D({
|
|
|
227
226
|
"ml-auto paragraph-xs tracking-widest text-muted-foreground",
|
|
228
227
|
e
|
|
229
228
|
),
|
|
230
|
-
...
|
|
229
|
+
...n
|
|
231
230
|
}
|
|
232
231
|
);
|
|
233
232
|
}
|
|
234
233
|
function M({
|
|
235
234
|
...e
|
|
236
235
|
}) {
|
|
237
|
-
return /* @__PURE__ */ t.jsx(
|
|
236
|
+
return /* @__PURE__ */ t.jsx(o.Sub, { "data-slot": "dropdown-menu-sub", ...e });
|
|
238
237
|
}
|
|
239
238
|
function N({
|
|
240
239
|
className: e,
|
|
241
|
-
inset:
|
|
240
|
+
inset: n,
|
|
242
241
|
children: a,
|
|
243
|
-
...
|
|
242
|
+
...s
|
|
244
243
|
}) {
|
|
245
244
|
return /* @__PURE__ */ t.jsxs(
|
|
246
|
-
|
|
245
|
+
o.SubTrigger,
|
|
247
246
|
{
|
|
248
247
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
249
|
-
"data-inset":
|
|
248
|
+
"data-inset": n,
|
|
250
249
|
className: r(
|
|
251
250
|
`
|
|
252
|
-
flex cursor-default items-center rounded-sm px-2 py-1.5
|
|
253
|
-
outline-hidden select-none
|
|
251
|
+
relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5
|
|
252
|
+
paragraph-sm outline-hidden select-none
|
|
254
253
|
focus:bg-accent focus:text-accent-foreground
|
|
254
|
+
data-disabled:pointer-events-none data-disabled:opacity-50
|
|
255
255
|
data-inset:pl-8
|
|
256
|
-
|
|
256
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
257
|
+
[&_svg:not([class*='size-'])]:size-4
|
|
257
258
|
`,
|
|
258
259
|
e
|
|
259
260
|
),
|
|
260
|
-
...
|
|
261
|
+
...s,
|
|
261
262
|
children: [
|
|
262
263
|
a,
|
|
263
264
|
/* @__PURE__ */ t.jsx(u, { className: "ml-auto size-4" })
|
|
@@ -265,12 +266,12 @@ function N({
|
|
|
265
266
|
}
|
|
266
267
|
);
|
|
267
268
|
}
|
|
268
|
-
function
|
|
269
|
+
function y({
|
|
269
270
|
className: e,
|
|
270
|
-
...
|
|
271
|
+
...n
|
|
271
272
|
}) {
|
|
272
273
|
return /* @__PURE__ */ t.jsx(
|
|
273
|
-
|
|
274
|
+
o.SubContent,
|
|
274
275
|
{
|
|
275
276
|
"data-slot": "dropdown-menu-sub-content",
|
|
276
277
|
className: r(
|
|
@@ -289,24 +290,24 @@ function I({
|
|
|
289
290
|
`,
|
|
290
291
|
e
|
|
291
292
|
),
|
|
292
|
-
...
|
|
293
|
+
...n
|
|
293
294
|
}
|
|
294
295
|
);
|
|
295
296
|
}
|
|
296
297
|
export {
|
|
297
298
|
p as DropdownMenu,
|
|
298
|
-
|
|
299
|
+
b as DropdownMenuCheckboxItem,
|
|
299
300
|
g as DropdownMenuContent,
|
|
300
301
|
x as DropdownMenuGroup,
|
|
301
302
|
v as DropdownMenuItem,
|
|
302
303
|
j as DropdownMenuLabel,
|
|
303
304
|
m as DropdownMenuPortal,
|
|
304
|
-
|
|
305
|
+
w as DropdownMenuRadioGroup,
|
|
305
306
|
h as DropdownMenuRadioItem,
|
|
306
307
|
z as DropdownMenuSeparator,
|
|
307
308
|
D as DropdownMenuShortcut,
|
|
308
309
|
M as DropdownMenuSub,
|
|
309
|
-
|
|
310
|
+
y as DropdownMenuSubContent,
|
|
310
311
|
N as DropdownMenuSubTrigger,
|
|
311
312
|
f as DropdownMenuTrigger
|
|
312
313
|
};
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
dark:data-[variant=destructive]:focus:bg-destructive
|
|
30
30
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
31
31
|
[&_svg:not([class*='size-'])]:size-4
|
|
32
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
33
32
|
data-[variant=destructive]:*:[svg]:text-destructive-foreground!
|
|
34
33
|
`,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
34
|
relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2
|
|
@@ -119,7 +119,6 @@ function j({
|
|
|
119
119
|
dark:data-[variant=destructive]:focus:bg-destructive
|
|
120
120
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
121
121
|
[&_svg:not([class*='size-'])]:size-4
|
|
122
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
123
122
|
data-[variant=destructive]:*:[svg]:text-destructive-foreground!
|
|
124
123
|
`,
|
|
125
124
|
e
|
|
@@ -259,7 +258,7 @@ function k({
|
|
|
259
258
|
}) {
|
|
260
259
|
return /* @__PURE__ */ t.jsx(n.Sub, { "data-slot": "menubar-sub", ...e });
|
|
261
260
|
}
|
|
262
|
-
function
|
|
261
|
+
function w({
|
|
263
262
|
className: e,
|
|
264
263
|
inset: a,
|
|
265
264
|
children: r,
|
|
@@ -288,7 +287,7 @@ function _({
|
|
|
288
287
|
}
|
|
289
288
|
);
|
|
290
289
|
}
|
|
291
|
-
function
|
|
290
|
+
function C({
|
|
292
291
|
className: e,
|
|
293
292
|
collisionPadding: a = 24,
|
|
294
293
|
...r
|
|
@@ -332,7 +331,7 @@ export {
|
|
|
332
331
|
I as MenubarSeparator,
|
|
333
332
|
y as MenubarShortcut,
|
|
334
333
|
k as MenubarSub,
|
|
335
|
-
|
|
336
|
-
|
|
334
|
+
C as MenubarSubContent,
|
|
335
|
+
w as MenubarSubTrigger,
|
|
337
336
|
v as MenubarTrigger
|
|
338
337
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Bfismeyo.cjs"),V=require("../badge-DK9gdPpu.cjs"),p=require("../command-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Bfismeyo.cjs"),V=require("../badge-DK9gdPpu.cjs"),p=require("../command-DNjJookC.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
2
|
flex w-fit items-center justify-between gap-2 overflow-hidden
|
|
3
3
|
rounded-md border border-input bg-transparent whitespace-nowrap
|
|
4
4
|
transition-[color,box-shadow] outline-none
|
|
@@ -19,6 +19,4 @@
|
|
|
19
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
20
|
size-2 text-muted-foreground\r
|
|
21
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
|
|
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;
|
|
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:"size-4 animate-spin text-muted-foreground"}),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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e, c as I } from "../index-CwFDnnd3.js";
|
|
2
2
|
import { B as z } from "../badge-aFyTFGVU.js";
|
|
3
|
-
import { C as E, f as P, d as O, b as _, c as A, e as F, g as L } from "../command-
|
|
3
|
+
import { C as E, f as P, d as O, b as _, c as A, e as F, g as L } from "../command-peXi2dFX.js";
|
|
4
4
|
import { P as T, b as W, c as G } from "../popover-eQq2Is-I.js";
|
|
5
5
|
import { CheckIcon as B, CaretUpDownIcon as D, XIcon as U } from "@phosphor-icons/react";
|
|
6
6
|
import { createContext as X, useState as y, useCallback as V, useEffect as k, useRef as M, useLayoutEffect as q, useContext as H } from "react";
|
|
@@ -208,14 +208,7 @@ function oe({
|
|
|
208
208
|
}
|
|
209
209
|
) : /* @__PURE__ */ e.jsx("button", { autoFocus: !0, "aria-hidden": "true", className: "sr-only" }),
|
|
210
210
|
/* @__PURE__ */ e.jsx(P, { children: a ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center py-6", children: [
|
|
211
|
-
/* @__PURE__ */ e.jsx(
|
|
212
|
-
J,
|
|
213
|
-
{
|
|
214
|
-
className: `\r
|
|
215
|
-
size-4 animate-spin text-muted-foreground\r
|
|
216
|
-
`
|
|
217
|
-
}
|
|
218
|
-
),
|
|
211
|
+
/* @__PURE__ */ e.jsx(J, { className: "size-4 animate-spin text-muted-foreground" }),
|
|
219
212
|
/* @__PURE__ */ e.jsx("span", { className: "ml-2 paragraph-sm text-muted-foreground", children: u })
|
|
220
213
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
221
214
|
d && /* @__PURE__ */ e.jsx(_, { children: f }),
|
|
@@ -61,11 +61,10 @@
|
|
|
61
61
|
data-[active=true]:hover:bg-accent
|
|
62
62
|
data-[active=true]:focus:bg-accent
|
|
63
63
|
[&_svg:not([class*='size-'])]:size-4
|
|
64
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
65
64
|
`,t),...a})}function b({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Indicator,{"data-slot":"navigation-menu-indicator",className:e.cn(`
|
|
66
65
|
top-full z-1 flex h-1.5 items-end justify-center overflow-hidden
|
|
67
66
|
data-[state=hidden]:animate-out data-[state=hidden]:fade-out
|
|
68
67
|
data-[state=visible]:animate-in data-[state=visible]:fade-in
|
|
69
68
|
`,t),...a,children:e.jsxRuntimeExports.jsx("div",{className:`\r
|
|
70
|
-
relative top-[60%]
|
|
69
|
+
relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-border shadow-md\r
|
|
71
70
|
`})})}exports.NavigationMenu=l;exports.NavigationMenuContent=f;exports.NavigationMenuIndicator=b;exports.NavigationMenuItem=v;exports.NavigationMenuLink=x;exports.NavigationMenuList=m;exports.NavigationMenuTrigger=p;exports.NavigationMenuViewport=s;exports.navigationMenuTriggerStyle=r;
|
|
@@ -195,7 +195,6 @@ function b({
|
|
|
195
195
|
data-[active=true]:hover:bg-accent
|
|
196
196
|
data-[active=true]:focus:bg-accent
|
|
197
197
|
[&_svg:not([class*='size-'])]:size-4
|
|
198
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
199
198
|
`,
|
|
200
199
|
t
|
|
201
200
|
),
|
|
@@ -224,7 +223,7 @@ function h({
|
|
|
224
223
|
"div",
|
|
225
224
|
{
|
|
226
225
|
className: `\r
|
|
227
|
-
relative top-[60%]
|
|
226
|
+
relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-border shadow-md\r
|
|
228
227
|
`
|
|
229
228
|
}
|
|
230
229
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Bfismeyo.cjs"),m=require("../command-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Bfismeyo.cjs"),m=require("../command-DNjJookC.cjs"),D=require("../input-u-OTHOPe.cjs"),C=require("../popover-A1-x5q-F.cjs"),M=require("../scroll-area-DFyIQG6Z.cjs"),S=require("@phosphor-icons/react"),F=require("react"),L=require("react-phone-number-input"),H=require("react-phone-number-input/flags"),G=require("react-phone-number-input/locale/en"),W=require("react-phone-number-input/locale/es"),$=require("react-phone-number-input/locale/fr");function N(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const s=N(F),I=N(L);function z(t,r){const[n,o]=s.useState(t);return s.useEffect(()=>{const l=setTimeout(()=>{o(t)},r);return()=>{clearTimeout(l)}},[t,r]),n}const P=s.forwardRef(({className:t,onChange:r,value:n,size:o="md",rounded:l="default",locale:c="en",...u},d)=>e.jsxRuntimeExports.jsx(I.default,{ref:d,className:e.cn("flex",t),flagComponent:B,countrySelectComponent:O,inputComponent:q,smartCaret:!1,labels:c==="es"?W:c==="fr"?$:G,value:n||void 0,onChange:f=>r?.(f||""),countrySelectProps:{size:o,rounded:l,...u},numberInputProps:{size:o,rounded:l,...u},...u}));P.displayName="PhoneInput";const q=s.forwardRef(({className:t,rounded:r="default",size:n,...o},l)=>{const{"data-country":c,...u}=o;return e.jsxRuntimeExports.jsx(D.Input,{size:n,className:e.cn("w-full",{"rounded-s-none rounded-e-lg":r!=="full","rounded-s-none rounded-e-full":r==="full","rounded-e-sm":n==="sm","rounded-e-md":n==="md","rounded-e-lg":n==="lg"},t),...u,ref:l})});q.displayName="InputComponent";const O=s.memo(({disabled:t,value:r,options:n,onChange:o,size:l="md",rounded:c="default",...u})=>{const d=s.useRef(null),[f,E]=s.useState(""),[b,R]=s.useState(!1),[y,v]=s.useState(20),x=z(f,100),p=s.useMemo(()=>x?n.filter(({label:a,value:i})=>i&&(a.toLowerCase().includes(x.toLowerCase())||i.toLowerCase().includes(x.toLowerCase()))):n,[n,x]),g=s.useMemo(()=>p.slice(0,y),[p,y]);return s.useEffect(()=>{v(20)},[x]),s.useEffect(()=>{if(!b)return;const a=setTimeout(()=>{if(!d.current)return;const h=d.current.querySelector("[data-radix-scroll-area-viewport]");if(!h)return;const w=()=>{const{scrollTop:_,scrollHeight:V,clientHeight:k}=h;_+k>=V-100&&v(A=>Math.min(A+20,p.length))};h.addEventListener("scroll",w,{passive:!0}),window.__scrollCleanup=()=>{h.removeEventListener("scroll",w)}},100);return()=>{clearTimeout(a);const i=window.__scrollCleanup;i&&i()}},[b,p.length]),e.jsxRuntimeExports.jsxs(C.Popover,{open:b,modal:!0,onOpenChange:a=>{R(a),a&&E("")},children:[e.jsxRuntimeExports.jsx(C.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button","aria-invalid":u["aria-invalid"],className:e.cn(`
|
|
2
2
|
flex w-fit min-w-0 items-center justify-center border border-r-0
|
|
3
3
|
border-input bg-transparent paragraph-md
|
|
4
4
|
transition-[color,box-shadow] outline-none
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e, c as p } from "../index-CwFDnnd3.js";
|
|
2
|
-
import { C as k, d as A, f as F, b as L, c as D, e as N } from "../command-
|
|
2
|
+
import { C as k, d as A, f as F, b as L, c as D, e as N } from "../command-peXi2dFX.js";
|
|
3
3
|
import { I as M } from "../input-kOA9xJIa.js";
|
|
4
4
|
import { P as q, c as H, b as G } from "../popover-eQq2Is-I.js";
|
|
5
5
|
import { S as W } from "../scroll-area-CJy_EOqT.js";
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
dark:aria-invalid:ring-destructive-foreground/40
|
|
18
18
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
19
19
|
[&_svg:not([class*='size-'])]:size-4
|
|
20
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
21
20
|
`,n==="filter"&&`
|
|
22
21
|
not-data-placeholder:border-ring not-data-placeholder:text-ring
|
|
23
22
|
dark:not-data-placeholder:text-blue-300
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as e, c as r } from "../index-CwFDnnd3.js";
|
|
2
2
|
import * as s from "@radix-ui/react-select";
|
|
3
3
|
import { CheckIcon as d, CaretDownIcon as i, CaretUpIcon as c } from "@phosphor-icons/react";
|
|
4
|
-
function
|
|
4
|
+
function f({
|
|
5
5
|
...t
|
|
6
6
|
}) {
|
|
7
7
|
return /* @__PURE__ */ e.jsx(s.Root, { "data-slot": "select", ...t });
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function g({
|
|
10
10
|
...t
|
|
11
11
|
}) {
|
|
12
12
|
return /* @__PURE__ */ e.jsx(s.Group, { "data-slot": "select-group", ...t });
|
|
@@ -49,7 +49,6 @@ function b({
|
|
|
49
49
|
dark:aria-invalid:ring-destructive-foreground/40
|
|
50
50
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
51
51
|
[&_svg:not([class*='size-'])]:size-4
|
|
52
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
53
52
|
`,
|
|
54
53
|
// Variante de filtro: cuando hay valor seleccionado, texto y borde en color ring
|
|
55
54
|
l === "filter" && `
|
|
@@ -224,9 +223,9 @@ function p({
|
|
|
224
223
|
);
|
|
225
224
|
}
|
|
226
225
|
export {
|
|
227
|
-
|
|
226
|
+
f as Select,
|
|
228
227
|
v as SelectContent,
|
|
229
|
-
|
|
228
|
+
g as SelectGroup,
|
|
230
229
|
y as SelectItem,
|
|
231
230
|
j as SelectLabel,
|
|
232
231
|
p as SelectScrollDownButton,
|
package/dist/ui.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clasing/ui",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.umd.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -325,7 +325,6 @@
|
|
|
325
325
|
"next-themes": "^0.4.6",
|
|
326
326
|
"prettier": "3.7.4",
|
|
327
327
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
328
|
-
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
329
328
|
"react-docgen": "^8.0.2",
|
|
330
329
|
"rollup-plugin-visualizer": "^6.0.11",
|
|
331
330
|
"standard-version": "^9.5.0",
|