@clasing/ui 2.1.0 → 2.2.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-Ds17GJH4.js → badge-Cprh3bik.js} +24 -32
- package/dist/badge-Da_xHgvC.cjs +1 -0
- package/dist/button-B4yT3Gcz.cjs +1 -0
- package/dist/button-CUrfGF3Y.js +232 -0
- package/dist/{card-Dj2wgH-P.cjs → card-COFAc2zN.cjs} +1 -1
- package/dist/{card-BNTyYiyA.js → card-CbF9kVVs.js} +1 -1
- package/dist/chip-B7Mqq278.js +89 -0
- package/dist/chip-BG4NEZUv.cjs +1 -0
- package/dist/command-CrtCQpi_.cjs +1 -0
- package/dist/{command-CGUB58ej.js → command-ev4m9IoQ.js} +18 -24
- package/dist/components/accordion.cjs.js +1 -1
- package/dist/components/accordion.es.js +24 -30
- package/dist/components/alert-dialog.cjs.js +1 -1
- package/dist/components/alert-dialog.es.js +3 -3
- package/dist/components/alert.cjs.js +1 -1
- package/dist/components/alert.d.ts +3 -4
- package/dist/components/alert.es.js +38 -39
- 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 +2 -6
- package/dist/components/badge.es.js +1 -1
- package/dist/components/blocks/interactive-card.cjs.js +1 -1
- package/dist/components/blocks/interactive-card.d.ts +2 -4
- package/dist/components/blocks/interactive-card.es.js +65 -80
- package/dist/components/blocks/selectable-chips.cjs.js +1 -1
- package/dist/components/blocks/selectable-chips.es.js +19 -16
- package/dist/components/breadcrumb.cjs.js +1 -1
- package/dist/components/breadcrumb.es.js +22 -22
- package/dist/components/button.cjs.js +1 -1
- package/dist/components/button.d.ts +13 -15
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs.js +1 -1
- package/dist/components/calendar.es.js +33 -54
- package/dist/components/card.cjs.js +1 -1
- package/dist/components/card.es.js +1 -1
- package/dist/components/chart.cjs.js +1 -1
- package/dist/components/chart.es.js +1 -1
- package/dist/components/checkbox.cjs.js +1 -1
- package/dist/components/checkbox.es.js +6 -6
- package/dist/components/chip.cjs.js +1 -1
- package/dist/components/chip.d.ts +1 -10
- package/dist/components/chip.es.js +1 -1
- package/dist/components/collapsible.cjs.js +1 -1
- package/dist/components/collapsible.es.js +1 -1
- package/dist/components/command.cjs.js +1 -1
- package/dist/components/command.es.js +1 -1
- package/dist/components/context-menu.cjs.js +1 -1
- package/dist/components/context-menu.es.js +42 -48
- 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 +1 -1
- package/dist/components/drawer.es.js +1 -1
- package/dist/components/dropdown-menu.cjs.js +1 -1
- package/dist/components/dropdown-menu.es.js +40 -46
- package/dist/components/form.cjs.js +1 -1
- package/dist/components/form.es.js +2 -2
- package/dist/components/hover-card.cjs.js +1 -1
- package/dist/components/hover-card.es.js +1 -1
- package/dist/components/input-otp.cjs.js +1 -1
- package/dist/components/input-otp.es.js +16 -16
- package/dist/components/input.cjs.js +1 -1
- package/dist/components/input.d.ts +2 -6
- package/dist/components/input.es.js +1 -1
- package/dist/components/label.cjs.js +1 -1
- package/dist/components/label.es.js +1 -1
- package/dist/components/menubar.cjs.js +1 -1
- package/dist/components/menubar.es.js +66 -72
- package/dist/components/multi-select.cjs.js +1 -1
- package/dist/components/multi-select.es.js +77 -96
- package/dist/components/navigation-menu.cjs.js +1 -1
- package/dist/components/navigation-menu.es.js +10 -11
- package/dist/components/phone-input.cjs.js +1 -1
- package/dist/components/phone-input.es.js +77 -79
- 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 +1 -1
- package/dist/components/resizable.cjs.js +1 -1
- package/dist/components/resizable.es.js +3 -3
- package/dist/components/scroll-area.cjs.js +1 -1
- package/dist/components/scroll-area.es.js +1 -1
- package/dist/components/select.cjs.js +1 -1
- package/dist/components/select.es.js +47 -53
- package/dist/components/sheet.cjs.js +1 -1
- package/dist/components/sheet.es.js +29 -29
- package/dist/components/skeleton.cjs.js +1 -1
- package/dist/components/skeleton.es.js +1 -1
- package/dist/components/slider.cjs.js +1 -1
- package/dist/components/slider.es.js +1 -1
- package/dist/components/sonner.cjs.js +1 -1
- package/dist/components/sonner.es.js +1 -1
- package/dist/components/switch.cjs.js +1 -1
- package/dist/components/switch.es.js +2 -2
- package/dist/components/table.cjs.js +1 -1
- package/dist/components/table.es.js +1 -1
- package/dist/components/textarea.cjs.js +1 -1
- package/dist/components/textarea.d.ts +2 -6
- package/dist/components/textarea.es.js +28 -36
- package/dist/components/toggle-group.cjs.js +1 -1
- package/dist/components/toggle-group.es.js +2 -2
- package/dist/components/toggle.cjs.js +1 -1
- package/dist/components/toggle.d.ts +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-CEttcpWT.js → dialog-CXbzQHxn.js} +9 -9
- package/dist/dialog-DHZARK1o.cjs +1 -0
- package/dist/index-9HRzXEQf.cjs +6 -0
- package/dist/{index-DBpnlzOP.js → index-D5lmpham.js} +677 -664
- package/dist/{index-CwXB7YIx.js → index-DN28Pf0m.js} +1 -1
- package/dist/{index-BVmT9wZC.cjs → index-ECyCsPX0.cjs} +1 -1
- package/dist/input-C144z_Is.cjs +1 -0
- package/dist/{input-B5HLfVv0.js → input-fvzEG6zH.js} +33 -47
- package/dist/{label-eHraXPfy.cjs → label-D3iN3bzS.cjs} +1 -1
- package/dist/{label-Bp4qkqFq.js → label-DDxTPxHk.js} +1 -1
- package/dist/{popover-Dvf9oQaX.js → popover-BdDS9aoy.js} +1 -1
- package/dist/{popover-DifOajI4.cjs → popover-CeOAAwBQ.cjs} +1 -1
- package/dist/{scroll-area-CJpVshOm.cjs → scroll-area-D74XszlE.cjs} +1 -1
- package/dist/{scroll-area-Dj0Szbw6.js → scroll-area-oS6ZJIMN.js} +1 -1
- package/dist/{toggle-owj9AHVO.js → toggle-BNzrNg1r.js} +2 -2
- package/dist/{toggle-CJLDdFRo.cjs → toggle-CtoQhQby.cjs} +1 -1
- package/dist/{tooltip-C9FWg102.cjs → tooltip-BccdAn4x.cjs} +1 -1
- package/dist/{tooltip-CGSL9pFZ.js → tooltip-rv-jVOxy.js} +1 -1
- package/package.json +352 -357
- package/dist/badge-oQqEF2X5.cjs +0 -1
- package/dist/button-B-JHlR-n.cjs +0 -1
- package/dist/button-ozL8afps.js +0 -573
- package/dist/chip-CK2VBBsV.js +0 -126
- package/dist/chip-DVKpteyL.cjs +0 -1
- package/dist/command-CHisYTN-.cjs +0 -1
- package/dist/components/icon-component.cjs.js +0 -1
- package/dist/components/icon-component.d.ts +0 -12
- package/dist/components/icon-component.es.js +0 -4
- package/dist/dialog-Chh5qAxR.cjs +0 -1
- package/dist/entries/icon-component.d.ts +0 -2
- package/dist/icon-component-DGImZz3K.js +0 -49
- package/dist/icon-component-DTlgy__B.cjs +0 -1
- package/dist/index-DSjHHn1r.cjs +0 -22
- package/dist/input-BqT_fuUN.cjs +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { j as e, c as
|
|
2
|
-
import { B as
|
|
3
|
-
import { C as
|
|
4
|
-
import { P as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
function
|
|
1
|
+
import { j as e, c as I } from "../index-D5lmpham.js";
|
|
2
|
+
import { B as z } from "../badge-Cprh3bik.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-ev4m9IoQ.js";
|
|
4
|
+
import { P as W, b as G, c as T } from "../popover-BdDS9aoy.js";
|
|
5
|
+
import { SpinnerIcon as B, CheckIcon as D, CaretUpDownIcon as U, XIcon as X } from "@phosphor-icons/react";
|
|
6
|
+
import { createContext as q, useState as y, useCallback as V, useEffect as k, useRef as M, useLayoutEffect as H, useContext as J } from "react";
|
|
7
|
+
const R = q(null);
|
|
8
|
+
function te({
|
|
9
9
|
children: t,
|
|
10
10
|
values: r,
|
|
11
11
|
defaultValues: o,
|
|
12
|
-
onValuesChange:
|
|
12
|
+
onValuesChange: i,
|
|
13
13
|
isLoading: u,
|
|
14
|
-
onSearchChange:
|
|
14
|
+
onSearchChange: a,
|
|
15
15
|
loadingText: p = "Loading...",
|
|
16
16
|
noResultsText: c = "No results found"
|
|
17
17
|
}) {
|
|
@@ -23,18 +23,18 @@ function Z({
|
|
|
23
23
|
const C = new Set(w);
|
|
24
24
|
return C.has(n) ? C.delete(n) : C.add(n), C;
|
|
25
25
|
};
|
|
26
|
-
f(x),
|
|
26
|
+
f(x), i?.([...x(b)]);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const l = V((n, x) => {
|
|
29
29
|
d((w) => w.get(n) === x ? w : new Map(w).set(n, x));
|
|
30
|
-
}, []), S =
|
|
30
|
+
}, []), S = V(
|
|
31
31
|
(n) => {
|
|
32
|
-
j(n),
|
|
32
|
+
j(n), a?.(n);
|
|
33
33
|
},
|
|
34
|
-
[
|
|
34
|
+
[a]
|
|
35
35
|
);
|
|
36
36
|
return /* @__PURE__ */ e.jsx(
|
|
37
|
-
|
|
37
|
+
R,
|
|
38
38
|
{
|
|
39
39
|
value: {
|
|
40
40
|
open: h,
|
|
@@ -42,32 +42,32 @@ function Z({
|
|
|
42
42
|
selectedValues: r ? new Set(r) : b,
|
|
43
43
|
toggleValue: s,
|
|
44
44
|
items: v,
|
|
45
|
-
onItemAdded:
|
|
45
|
+
onItemAdded: l,
|
|
46
46
|
isLoading: u,
|
|
47
47
|
searchValue: g,
|
|
48
48
|
onSearchChange: S,
|
|
49
49
|
loadingText: p,
|
|
50
50
|
noResultsText: c
|
|
51
51
|
},
|
|
52
|
-
children: /* @__PURE__ */ e.jsx(
|
|
52
|
+
children: /* @__PURE__ */ e.jsx(W, { open: h, onOpenChange: m, children: t })
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function ne({
|
|
57
57
|
className: t,
|
|
58
58
|
children: r,
|
|
59
59
|
size: o = "md",
|
|
60
|
-
...
|
|
60
|
+
...i
|
|
61
61
|
}) {
|
|
62
|
-
const { open: u } =
|
|
63
|
-
return /* @__PURE__ */ e.jsx(
|
|
62
|
+
const { open: u } = N();
|
|
63
|
+
return /* @__PURE__ */ e.jsx(T, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
64
64
|
"button",
|
|
65
65
|
{
|
|
66
|
-
...
|
|
67
|
-
role:
|
|
68
|
-
"aria-expanded":
|
|
66
|
+
...i,
|
|
67
|
+
role: i.role ?? "combobox",
|
|
68
|
+
"aria-expanded": i["aria-expanded"] ?? u,
|
|
69
69
|
"data-size": o,
|
|
70
|
-
className:
|
|
70
|
+
className: I(
|
|
71
71
|
"border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='text-'])]:text-muted-foreground flex w-fit items-center justify-between gap-2 overflow-hidden rounded-md border bg-transparent whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
72
72
|
o === "xs" && 'label-sm h-7 px-2 py-1 [&_svg:not([class*="size-"])]:size-3.5',
|
|
73
73
|
o === "sm" && "label-md h-8 px-2 py-1",
|
|
@@ -77,38 +77,32 @@ function $({
|
|
|
77
77
|
),
|
|
78
78
|
children: [
|
|
79
79
|
r,
|
|
80
|
-
/* @__PURE__ */ e.jsx(
|
|
81
|
-
N,
|
|
82
|
-
{
|
|
83
|
-
iconName: "IconSelector",
|
|
84
|
-
className: "size-4 shrink-0 opacity-50"
|
|
85
|
-
}
|
|
86
|
-
)
|
|
80
|
+
/* @__PURE__ */ e.jsx(U, { className: "size-4 shrink-0 opacity-50" })
|
|
87
81
|
]
|
|
88
82
|
}
|
|
89
83
|
) });
|
|
90
84
|
}
|
|
91
|
-
function
|
|
85
|
+
function re({
|
|
92
86
|
placeholder: t,
|
|
93
87
|
clickToRemove: r = !0,
|
|
94
88
|
className: o,
|
|
95
|
-
overflowBehavior:
|
|
89
|
+
overflowBehavior: i = "wrap-when-open",
|
|
96
90
|
...u
|
|
97
91
|
}) {
|
|
98
|
-
const { selectedValues:
|
|
92
|
+
const { selectedValues: a, toggleValue: p, items: c, open: h } = N(), [m, b] = y(0), f = M(null), v = M(null), d = M(/* @__PURE__ */ new Set()), g = i === "wrap" || i === "wrap-when-open" && h;
|
|
99
93
|
k(() => {
|
|
100
94
|
g && d.current.forEach((s) => s.style.removeProperty("display"));
|
|
101
95
|
}, [g]);
|
|
102
|
-
const j =
|
|
96
|
+
const j = V(() => {
|
|
103
97
|
if (f.current == null) return;
|
|
104
|
-
const s = f.current,
|
|
105
|
-
|
|
98
|
+
const s = f.current, l = v.current;
|
|
99
|
+
l != null && (l.style.display = "none"), d.current.forEach((n) => n.style.removeProperty("display"));
|
|
106
100
|
let S = 0;
|
|
107
101
|
for (let n = d.current.size - 1; n >= 0; n--) {
|
|
108
102
|
const x = [...d.current][n];
|
|
109
103
|
if (s.scrollWidth <= s.clientWidth)
|
|
110
104
|
break;
|
|
111
|
-
S = d.current.size - n, x.style.display = "none",
|
|
105
|
+
S = d.current.size - n, x.style.display = "none", l?.style.removeProperty("display");
|
|
112
106
|
}
|
|
113
107
|
b(S);
|
|
114
108
|
}, []);
|
|
@@ -116,48 +110,42 @@ function ee({
|
|
|
116
110
|
if (f.current == null) return;
|
|
117
111
|
const s = new ResizeObserver(j);
|
|
118
112
|
return s.observe(f.current), () => s.disconnect();
|
|
119
|
-
}, [j]),
|
|
113
|
+
}, [j]), H(() => {
|
|
120
114
|
j();
|
|
121
|
-
}, [
|
|
115
|
+
}, [a, j]), a.size === 0 && t ? /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground font-normal", children: t }) : /* @__PURE__ */ e.jsxs(
|
|
122
116
|
"div",
|
|
123
117
|
{
|
|
124
118
|
...u,
|
|
125
119
|
ref: f,
|
|
126
|
-
className:
|
|
127
|
-
"flex min-h-
|
|
120
|
+
className: I(
|
|
121
|
+
"flex min-h-7 w-full gap-1.5 overflow-hidden",
|
|
128
122
|
g && "flex-wrap",
|
|
129
123
|
o
|
|
130
124
|
),
|
|
131
125
|
children: [
|
|
132
|
-
[...
|
|
133
|
-
|
|
126
|
+
[...a].filter((s) => c.has(s)).map((s) => /* @__PURE__ */ e.jsxs(
|
|
127
|
+
z,
|
|
134
128
|
{
|
|
135
|
-
ref: (
|
|
136
|
-
if (
|
|
137
|
-
return d.current.add(
|
|
138
|
-
d.current.delete(
|
|
129
|
+
ref: (l) => {
|
|
130
|
+
if (l != null)
|
|
131
|
+
return d.current.add(l), () => {
|
|
132
|
+
d.current.delete(l);
|
|
139
133
|
};
|
|
140
134
|
},
|
|
141
135
|
variant: "outline",
|
|
142
136
|
className: "group flex items-center gap-1",
|
|
143
|
-
onClick: r ? (
|
|
144
|
-
|
|
137
|
+
onClick: r ? (l) => {
|
|
138
|
+
l.stopPropagation(), p(s);
|
|
145
139
|
} : void 0,
|
|
146
140
|
children: [
|
|
147
141
|
c.get(s),
|
|
148
|
-
r && /* @__PURE__ */ e.jsx(
|
|
149
|
-
N,
|
|
150
|
-
{
|
|
151
|
-
iconName: "IconX",
|
|
152
|
-
className: "text-muted-foreground group-hover:text-destructive size-2"
|
|
153
|
-
}
|
|
154
|
-
)
|
|
142
|
+
r && /* @__PURE__ */ e.jsx(X, { className: "text-muted-foreground group-hover:text-destructive size-2" })
|
|
155
143
|
]
|
|
156
144
|
},
|
|
157
145
|
s
|
|
158
146
|
)),
|
|
159
147
|
/* @__PURE__ */ e.jsxs(
|
|
160
|
-
|
|
148
|
+
z,
|
|
161
149
|
{
|
|
162
150
|
style: {
|
|
163
151
|
display: m > 0 && !g ? "block" : "none"
|
|
@@ -174,47 +162,41 @@ function ee({
|
|
|
174
162
|
}
|
|
175
163
|
);
|
|
176
164
|
}
|
|
177
|
-
function
|
|
165
|
+
function se({
|
|
178
166
|
search: t = !0,
|
|
179
167
|
children: r,
|
|
180
168
|
...o
|
|
181
169
|
}) {
|
|
182
|
-
const { isLoading:
|
|
170
|
+
const { isLoading: i, onSearchChange: u, searchValue: a, noResultsText: p } = N(), c = typeof t == "object" ? !0 : t;
|
|
183
171
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
184
|
-
/* @__PURE__ */ e.jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ e.jsx(
|
|
185
|
-
/* @__PURE__ */ e.jsx(
|
|
172
|
+
/* @__PURE__ */ e.jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsx(P, { children: r }) }) }),
|
|
173
|
+
/* @__PURE__ */ e.jsx(G, { className: "min-w-(--radix-popover-trigger-width) p-0", children: /* @__PURE__ */ e.jsxs(E, { ...o, children: [
|
|
186
174
|
c ? /* @__PURE__ */ e.jsx(
|
|
187
|
-
|
|
175
|
+
O,
|
|
188
176
|
{
|
|
189
177
|
placeholder: typeof t == "object" ? t.placeholder : void 0,
|
|
190
|
-
value:
|
|
178
|
+
value: a,
|
|
191
179
|
onValueChange: u
|
|
192
180
|
}
|
|
193
181
|
) : /* @__PURE__ */ e.jsx("button", { autoFocus: !0, "aria-hidden": "true", className: "sr-only" }),
|
|
194
|
-
/* @__PURE__ */ e.jsx(
|
|
195
|
-
/* @__PURE__ */ e.jsx(
|
|
196
|
-
|
|
197
|
-
{
|
|
198
|
-
iconName: "IconLoader2",
|
|
199
|
-
className: "text-muted-foreground size-4 animate-spin"
|
|
200
|
-
}
|
|
201
|
-
),
|
|
202
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground ml-2 text-sm", children: a })
|
|
182
|
+
/* @__PURE__ */ e.jsx(P, { children: i ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center py-6", children: [
|
|
183
|
+
/* @__PURE__ */ e.jsx(B, { className: "text-muted-foreground size-4 animate-spin" }),
|
|
184
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground ml-2 text-sm", children: i })
|
|
203
185
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
204
|
-
c && /* @__PURE__ */ e.jsx(
|
|
186
|
+
c && /* @__PURE__ */ e.jsx(_, { children: p }),
|
|
205
187
|
r
|
|
206
188
|
] }) })
|
|
207
189
|
] }) })
|
|
208
190
|
] });
|
|
209
191
|
}
|
|
210
|
-
function
|
|
192
|
+
function oe({
|
|
211
193
|
value: t,
|
|
212
194
|
children: r,
|
|
213
195
|
badgeLabel: o,
|
|
214
|
-
onSelect:
|
|
196
|
+
onSelect: i,
|
|
215
197
|
...u
|
|
216
198
|
}) {
|
|
217
|
-
const { toggleValue:
|
|
199
|
+
const { toggleValue: a, selectedValues: p, onItemAdded: c } = N(), h = p.has(t);
|
|
218
200
|
return k(() => {
|
|
219
201
|
c(t, o ?? r);
|
|
220
202
|
}, [t, r, c, o]), /* @__PURE__ */ e.jsxs(
|
|
@@ -223,14 +205,13 @@ function ne({
|
|
|
223
205
|
...u,
|
|
224
206
|
value: t,
|
|
225
207
|
onSelect: (m) => {
|
|
226
|
-
|
|
208
|
+
a(m), i?.(m);
|
|
227
209
|
},
|
|
228
210
|
children: [
|
|
229
211
|
/* @__PURE__ */ e.jsx(
|
|
230
|
-
|
|
212
|
+
D,
|
|
231
213
|
{
|
|
232
|
-
|
|
233
|
-
className: z("mr-2 size-4", h ? "opacity-100" : "opacity-0")
|
|
214
|
+
className: I("mr-2 size-4", h ? "opacity-100" : "opacity-0")
|
|
234
215
|
}
|
|
235
216
|
),
|
|
236
217
|
r
|
|
@@ -238,14 +219,14 @@ function ne({
|
|
|
238
219
|
}
|
|
239
220
|
);
|
|
240
221
|
}
|
|
241
|
-
function
|
|
242
|
-
return /* @__PURE__ */ e.jsx(
|
|
222
|
+
function ie(t) {
|
|
223
|
+
return /* @__PURE__ */ e.jsx(A, { ...t });
|
|
243
224
|
}
|
|
244
|
-
function
|
|
245
|
-
return /* @__PURE__ */ e.jsx(
|
|
225
|
+
function le(t) {
|
|
226
|
+
return /* @__PURE__ */ e.jsx(L, { ...t });
|
|
246
227
|
}
|
|
247
|
-
function
|
|
248
|
-
const t =
|
|
228
|
+
function N() {
|
|
229
|
+
const t = J(R);
|
|
249
230
|
if (t == null)
|
|
250
231
|
throw new Error(
|
|
251
232
|
"useMultiSelectContext must be used within a MultiSelectContext"
|
|
@@ -253,11 +234,11 @@ function M() {
|
|
|
253
234
|
return t;
|
|
254
235
|
}
|
|
255
236
|
export {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
237
|
+
te as MultiSelect,
|
|
238
|
+
se as MultiSelectContent,
|
|
239
|
+
ie as MultiSelectGroup,
|
|
240
|
+
oe as MultiSelectItem,
|
|
241
|
+
le as MultiSelectSeparator,
|
|
242
|
+
ne as MultiSelectTrigger,
|
|
243
|
+
re as MultiSelectValue
|
|
263
244
|
};
|
|
@@ -1 +1 @@
|
|
|
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-9HRzXEQf.cjs"),u=require("@radix-ui/react-navigation-menu"),d=require("../index-ECyCsPX0.cjs"),c=require("@phosphor-icons/react");function g(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const o=g(u);function l({className:t,children:a,viewport:n=!0,...i}){return e.jsxRuntimeExports.jsxs(o.Root,{"data-slot":"navigation-menu","data-viewport":n,className:e.cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),...i,children:[a,n&&e.jsxRuntimeExports.jsx(s,{})]})}function m({className:t,...a}){return e.jsxRuntimeExports.jsx(o.List,{"data-slot":"navigation-menu-list",className:e.cn("group flex flex-1 list-none items-center justify-center gap-1",t),...a})}function v({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Item,{"data-slot":"navigation-menu-item",className:e.cn("relative",t),...a})}const r=d.cva("group bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 paragraph-sm inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 font-medium transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50");function p({className:t,children:a,...n}){return e.jsxRuntimeExports.jsxs(o.Trigger,{"data-slot":"navigation-menu-trigger",className:e.cn(r(),"group",t),...n,children:[a," ",e.jsxRuntimeExports.jsx(c.CaretDownIcon,{className:"relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function f({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Content,{"data-slot":"navigation-menu-content",className:e.cn("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",t),...a})}function s({className:t,...a}){return e.jsxRuntimeExports.jsx("div",{className:e.cn("absolute top-full left-0 isolate z-50 flex justify-center"),children:e.jsxRuntimeExports.jsx(o.Viewport,{"data-slot":"navigation-menu-viewport",className:e.cn("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border shadow md:w-(--radix-navigation-menu-viewport-width)",t),...a})})}function x({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Link,{"data-slot":"navigation-menu-link",className:e.cn("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground paragraph-sm flex flex-col gap-1 rounded-sm p-2 transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",t),...a})}function b({className:t,...a}){return e.jsxRuntimeExports.jsx(o.Indicator,{"data-slot":"navigation-menu-indicator",className:e.cn("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden",t),...a,children:e.jsxRuntimeExports.jsx("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})})}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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as e, c as o } from "../index-
|
|
1
|
+
import { j as e, c as o } from "../index-D5lmpham.js";
|
|
2
2
|
import * as n from "@radix-ui/react-navigation-menu";
|
|
3
|
-
import { c as s } from "../index-
|
|
4
|
-
import {
|
|
3
|
+
import { c as s } from "../index-DN28Pf0m.js";
|
|
4
|
+
import { CaretDownIcon as u } from "@phosphor-icons/react";
|
|
5
5
|
function v({
|
|
6
6
|
className: t,
|
|
7
7
|
children: a,
|
|
@@ -74,8 +74,7 @@ function x({
|
|
|
74
74
|
/* @__PURE__ */ e.jsx(
|
|
75
75
|
u,
|
|
76
76
|
{
|
|
77
|
-
|
|
78
|
-
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
77
|
+
className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
79
78
|
"aria-hidden": "true"
|
|
80
79
|
}
|
|
81
80
|
)
|
|
@@ -115,7 +114,7 @@ function l({
|
|
|
115
114
|
{
|
|
116
115
|
"data-slot": "navigation-menu-viewport",
|
|
117
116
|
className: o(
|
|
118
|
-
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-
|
|
117
|
+
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border shadow md:w-(--radix-navigation-menu-viewport-width)",
|
|
119
118
|
t
|
|
120
119
|
),
|
|
121
120
|
...a
|
|
@@ -124,7 +123,7 @@ function l({
|
|
|
124
123
|
}
|
|
125
124
|
);
|
|
126
125
|
}
|
|
127
|
-
function
|
|
126
|
+
function b({
|
|
128
127
|
className: t,
|
|
129
128
|
...a
|
|
130
129
|
}) {
|
|
@@ -140,7 +139,7 @@ function h({
|
|
|
140
139
|
}
|
|
141
140
|
);
|
|
142
141
|
}
|
|
143
|
-
function
|
|
142
|
+
function h({
|
|
144
143
|
className: t,
|
|
145
144
|
...a
|
|
146
145
|
}) {
|
|
@@ -149,7 +148,7 @@ function b({
|
|
|
149
148
|
{
|
|
150
149
|
"data-slot": "navigation-menu-indicator",
|
|
151
150
|
className: o(
|
|
152
|
-
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-
|
|
151
|
+
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden",
|
|
153
152
|
t
|
|
154
153
|
),
|
|
155
154
|
...a,
|
|
@@ -160,9 +159,9 @@ function b({
|
|
|
160
159
|
export {
|
|
161
160
|
v as NavigationMenu,
|
|
162
161
|
w as NavigationMenuContent,
|
|
163
|
-
|
|
162
|
+
h as NavigationMenuIndicator,
|
|
164
163
|
p as NavigationMenuItem,
|
|
165
|
-
|
|
164
|
+
b as NavigationMenuLink,
|
|
166
165
|
f as NavigationMenuList,
|
|
167
166
|
x as NavigationMenuTrigger,
|
|
168
167
|
l as NavigationMenuViewport,
|
|
@@ -1 +1 @@
|
|
|
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-9HRzXEQf.cjs"),c=require("../command-CrtCQpi_.cjs"),N=require("../input-C144z_Is.cjs"),x=require("../popover-CeOAAwBQ.cjs"),S=require("../scroll-area-D74XszlE.cjs"),h=require("@phosphor-icons/react"),w=require("react"),I=require("react-phone-number-input"),P=require("react-phone-number-input/flags"),q=require("react-phone-number-input/locale/en"),O=require("react-phone-number-input/locale/es"),_=require("react-phone-number-input/locale/fr");function b(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>n[r]})}}return t.default=n,Object.freeze(t)}const d=b(w),R=b(I),y=d.forwardRef(({className:n,onChange:t,value:r,size:o="md",rounded:s="default",locale:l="en",...i},p)=>e.jsxRuntimeExports.jsx(R.default,{ref:p,className:e.cn("flex",n),flagComponent:f,countrySelectComponent:T,inputComponent:C,smartCaret:!1,labels:l==="es"?O:l==="fr"?_:q,value:r||void 0,onChange:u=>t?.(u||""),countrySelectProps:{size:o,rounded:s},numberInputProps:{size:o,rounded:s},...i}));y.displayName="PhoneInput";const C=d.forwardRef(({className:n,rounded:t="default",error:r,touched:o,size:s,...l},i)=>{const{"data-country":p,...u}=l;return e.jsxRuntimeExports.jsx(N.Input,{size:s,className:e.cn("w-full",{"border-destructive":r&&o,"border-blue-800":o&&!r,"rounded-s-none rounded-e-lg":t!=="full","rounded-s-none rounded-e-full":t==="full","rounded-e-sm":s==="sm","rounded-e-md":s==="md","rounded-e-lg":s==="lg"},n),...u,ref:i})});C.displayName="InputComponent";const T=({disabled:n,value:t,options:r,onChange:o,size:s="md",rounded:l="default",error:i,touched:p})=>{const u=d.useRef(null),[E,j]=d.useState(""),[v,g]=d.useState(!1);return e.jsxRuntimeExports.jsxs(x.Popover,{open:v,modal:!0,onOpenChange:a=>{g(a),a&&j("")},children:[e.jsxRuntimeExports.jsx(x.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 file:paragraph-sm md:paragraph-sm paragraph-md flex w-fit min-w-0 items-center justify-center border border-r-0 bg-transparent transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-semibold focus-visible:z-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",l==="default"?"rounded-e-none":"rounded-s-full rounded-e-none",{"outline-destructive":i&&p,"outline-blue-800":p&&!i,"label-md h-8 rounded-s-sm px-2 py-1":s==="sm","label-lg h-12 rounded-s-md px-3 py-1":s==="md","label-xl h-16 rounded-s-lg px-4 py-2":s==="lg"}),disabled:n,children:[e.jsxRuntimeExports.jsx(f,{country:t,countryName:t,disabled:n}),e.jsxRuntimeExports.jsx(h.CaretDownIcon,{className:e.cn("-mr-2 size-4 opacity-50",n?"hidden":"opacity-100")})]})}),e.jsxRuntimeExports.jsx(x.PopoverContent,{className:"w-[300px] p-0",children:e.jsxRuntimeExports.jsxs(c.Command,{children:[e.jsxRuntimeExports.jsx(c.CommandInput,{value:E,onValueChange:a=>{j(a),setTimeout(()=>{if(u.current){const m=u.current.querySelector("[data-radix-scroll-area-viewport]");m&&(m.scrollTop=0)}},0)},placeholder:"Search country..."}),e.jsxRuntimeExports.jsx(c.CommandList,{children:e.jsxRuntimeExports.jsxs(S.ScrollArea,{ref:u,className:"h-72",children:[e.jsxRuntimeExports.jsx(c.CommandEmpty,{children:"No country found."}),e.jsxRuntimeExports.jsx(c.CommandGroup,{children:r.map(({value:a,label:m})=>a?e.jsxRuntimeExports.jsx(k,{country:a,countryName:m,selectedCountry:t,onChange:o,onSelectComplete:()=>g(!1)},a):null)})]})})]})})]})},k=({country:n,countryName:t,selectedCountry:r,onChange:o,onSelectComplete:s})=>{const l=()=>{o(n),s()};return e.jsxRuntimeExports.jsxs(c.CommandItem,{className:"gap-2",onSelect:l,children:[e.jsxRuntimeExports.jsx(f,{country:n,countryName:t}),e.jsxRuntimeExports.jsx("span",{className:"paragraph-sm flex-1",children:t}),e.jsxRuntimeExports.jsx("span",{className:"text-foreground/50 paragraph-sm",children:`+${R.getCountryCallingCode(n)}`}),e.jsxRuntimeExports.jsx(h.CheckIcon,{className:`ml-auto size-4 ${n===r?"opacity-100":"opacity-0"}`})]})},f=({country:n,countryName:t,disabled:r})=>{const o=P[n];return e.jsxRuntimeExports.jsx("span",{className:e.cn("bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-[4px] [&_svg:not([class*='size-'])]:size-full",{"opacity-50":r}),children:o&&e.jsxRuntimeExports.jsx(o,{title:t})})};exports.PhoneInput=y;
|