@clasing/ui 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -12
- package/dist/{badge-Cprh3bik.js → badge-C29hQNIG.js} +2 -2
- package/dist/{button-D6LWWLE8.js → button-Bn-b-nVw.js} +62 -81
- package/dist/button-C7U_D8vv.cjs +1 -0
- package/dist/{card-CbF9kVVs.js → card-Cv2M4wv8.js} +1 -1
- package/dist/chip-C_Uh7fe6.cjs +1 -0
- package/dist/{chip-B7Mqq278.js → chip-ZryYiiU1.js} +9 -9
- package/dist/clasing-icon-BIYMLc8o.js +91 -0
- package/dist/clasing-icon-Bym32_-4.cjs +1 -0
- package/dist/{command-ev4m9IoQ.js → command-CGrOI2Z9.js} +2 -2
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert-dialog.cjs.js +1 -1
- package/dist/components/alert-dialog.es.js +2 -2
- package/dist/components/alert.es.js +2 -2
- package/dist/components/avatar.es.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.es.js +5 -5
- package/dist/components/blocks/selectable-chips.cjs.js +1 -1
- package/dist/components/blocks/selectable-chips.es.js +3 -3
- package/dist/components/breadcrumb.es.js +1 -1
- package/dist/components/button-group.cjs.js +1 -0
- package/dist/components/button-group.d.ts +11 -0
- package/dist/components/button-group.es.js +75 -0
- package/dist/components/button.cjs.js +1 -1
- package/dist/components/button.d.ts +0 -3
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs.js +1 -1
- package/dist/components/calendar.es.js +2 -2
- package/dist/components/card.es.js +1 -1
- package/dist/components/chart.es.js +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/chip.cjs.js +1 -1
- package/dist/components/chip.es.js +1 -1
- package/dist/components/clasing-icon.cjs.js +1 -0
- package/dist/components/clasing-icon.d.ts +6 -0
- package/dist/components/clasing-icon.es.js +4 -0
- package/dist/components/collapsible.es.js +1 -1
- package/dist/components/command.es.js +1 -1
- package/dist/components/context-menu.es.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 +2 -18
- package/dist/components/drawer.es.js +1 -1
- package/dist/components/dropdown-menu.es.js +1 -1
- package/dist/components/form.es.js +2 -2
- package/dist/components/hover-card.es.js +1 -1
- package/dist/components/input-otp.es.js +1 -1
- package/dist/components/input.cjs.js +1 -1
- package/dist/components/input.es.js +1 -1
- package/dist/components/kbd.cjs.js +1 -0
- package/dist/components/kbd.d.ts +3 -0
- package/dist/components/kbd.es.js +30 -0
- package/dist/components/label.es.js +1 -1
- package/dist/components/menubar.es.js +1 -1
- package/dist/components/multi-select.cjs.js +1 -1
- package/dist/components/multi-select.es.js +98 -97
- package/dist/components/navigation-menu.es.js +2 -2
- package/dist/components/phone-input.cjs.js +1 -1
- package/dist/components/phone-input.es.js +5 -5
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress.es.js +1 -1
- package/dist/components/resizable.es.js +1 -1
- package/dist/components/scroll-area.es.js +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/sheet.es.js +1 -1
- package/dist/components/skeleton.es.js +1 -1
- package/dist/components/slider.es.js +1 -1
- package/dist/components/sonner.es.js +1 -1
- package/dist/components/switch.es.js +2 -2
- package/dist/components/table.es.js +1 -1
- package/dist/components/textarea.es.js +2 -2
- package/dist/components/toggle-group.es.js +2 -2
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.es.js +1 -1
- package/dist/components/tooltip.es.js +1 -1
- package/dist/{dialog-CXbzQHxn.js → dialog-CH4VxKX4.js} +1 -1
- package/dist/divider-BMxVoyPg.js +20 -0
- package/dist/divider-BcIwJzm7.cjs +1 -0
- package/dist/entries/button-group.d.ts +2 -0
- package/dist/entries/clasing-icon.d.ts +2 -0
- package/dist/entries/kbd.d.ts +2 -0
- package/dist/{index-D5lmpham.js → index-BCEGphus.js} +2 -2
- package/dist/{index-DN28Pf0m.js → index-DEha_UuN.js} +1 -1
- package/dist/{input-DjbpoQwv.js → input-BvfRiqqw.js} +3 -3
- package/dist/{input-DeItm2eC.cjs → input-Dtd0sjiW.cjs} +1 -1
- package/dist/{label-DDxTPxHk.js → label-Bl6V6esj.js} +1 -1
- package/dist/{popover-BdDS9aoy.js → popover-1_WpciTS.js} +1 -1
- package/dist/{scroll-area-oS6ZJIMN.js → scroll-area-CxpVQq0v.js} +1 -1
- package/dist/{toggle-BNzrNg1r.js → toggle-99EXLQgX.js} +2 -2
- package/dist/{tooltip-rv-jVOxy.js → tooltip-BS84dkwx.js} +1 -1
- package/dist/ui.css +1 -1
- package/package.json +373 -352
- package/dist/button-BT7pXfhd.cjs +0 -1
- package/dist/chip-BG4NEZUv.cjs +0 -1
|
@@ -1,71 +1,72 @@
|
|
|
1
|
-
import { j as e, c as I } from "../index-
|
|
2
|
-
import { B as z } from "../badge-
|
|
3
|
-
import { C as E, f as P, d as O, b as _, c as A, e as F, g as L } from "../command-
|
|
4
|
-
import { P as
|
|
5
|
-
import {
|
|
6
|
-
import { createContext as
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { j as e, c as I } from "../index-BCEGphus.js";
|
|
2
|
+
import { B as z } from "../badge-C29hQNIG.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-CGrOI2Z9.js";
|
|
4
|
+
import { P as T, b as W, c as G } from "../popover-1_WpciTS.js";
|
|
5
|
+
import { CheckIcon as B, CaretUpDownIcon as D, XIcon as U } from "@phosphor-icons/react";
|
|
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";
|
|
7
|
+
import { C as J } from "../clasing-icon-BIYMLc8o.js";
|
|
8
|
+
const R = X(null);
|
|
9
|
+
function ne({
|
|
9
10
|
children: t,
|
|
10
11
|
values: r,
|
|
11
12
|
defaultValues: o,
|
|
12
|
-
onValuesChange:
|
|
13
|
-
isLoading:
|
|
14
|
-
onSearchChange:
|
|
15
|
-
loadingText:
|
|
16
|
-
noResultsText:
|
|
13
|
+
onValuesChange: a,
|
|
14
|
+
isLoading: c,
|
|
15
|
+
onSearchChange: l,
|
|
16
|
+
loadingText: f = "Loading...",
|
|
17
|
+
noResultsText: u = "No results found"
|
|
17
18
|
}) {
|
|
18
|
-
const [
|
|
19
|
+
const [d, p] = y(!1), [b, x] = y(
|
|
19
20
|
new Set(r ?? o)
|
|
20
|
-
), [v,
|
|
21
|
+
), [v, m] = y(/* @__PURE__ */ new Map()), [g, j] = y("");
|
|
21
22
|
function s(n) {
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
return
|
|
23
|
+
const h = (w) => {
|
|
24
|
+
const S = new Set(w);
|
|
25
|
+
return S.has(n) ? S.delete(n) : S.add(n), S;
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
+
x(h), a?.([...h(b)]);
|
|
27
28
|
}
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
}, []),
|
|
29
|
+
const i = V((n, h) => {
|
|
30
|
+
m((w) => w.get(n) === h ? w : new Map(w).set(n, h));
|
|
31
|
+
}, []), C = V(
|
|
31
32
|
(n) => {
|
|
32
|
-
j(n),
|
|
33
|
+
j(n), l?.(n);
|
|
33
34
|
},
|
|
34
|
-
[
|
|
35
|
+
[l]
|
|
35
36
|
);
|
|
36
37
|
return /* @__PURE__ */ e.jsx(
|
|
37
38
|
R,
|
|
38
39
|
{
|
|
39
40
|
value: {
|
|
40
|
-
open:
|
|
41
|
-
setOpen:
|
|
41
|
+
open: d,
|
|
42
|
+
setOpen: p,
|
|
42
43
|
selectedValues: r ? new Set(r) : b,
|
|
43
44
|
toggleValue: s,
|
|
44
45
|
items: v,
|
|
45
|
-
onItemAdded:
|
|
46
|
-
isLoading:
|
|
46
|
+
onItemAdded: i,
|
|
47
|
+
isLoading: c,
|
|
47
48
|
searchValue: g,
|
|
48
|
-
onSearchChange:
|
|
49
|
-
loadingText:
|
|
50
|
-
noResultsText:
|
|
49
|
+
onSearchChange: C,
|
|
50
|
+
loadingText: f,
|
|
51
|
+
noResultsText: u
|
|
51
52
|
},
|
|
52
|
-
children: /* @__PURE__ */ e.jsx(
|
|
53
|
+
children: /* @__PURE__ */ e.jsx(T, { open: d, onOpenChange: p, children: t })
|
|
53
54
|
}
|
|
54
55
|
);
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function re({
|
|
57
58
|
className: t,
|
|
58
59
|
children: r,
|
|
59
60
|
size: o = "md",
|
|
60
|
-
...
|
|
61
|
+
...a
|
|
61
62
|
}) {
|
|
62
|
-
const { open:
|
|
63
|
-
return /* @__PURE__ */ e.jsx(
|
|
63
|
+
const { open: c } = N();
|
|
64
|
+
return /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
64
65
|
"button",
|
|
65
66
|
{
|
|
66
|
-
...
|
|
67
|
-
role:
|
|
68
|
-
"aria-expanded":
|
|
67
|
+
...a,
|
|
68
|
+
role: a.role ?? "combobox",
|
|
69
|
+
"aria-expanded": a["aria-expanded"] ?? c,
|
|
69
70
|
"data-size": o,
|
|
70
71
|
className: I(
|
|
71
72
|
"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",
|
|
@@ -77,69 +78,69 @@ function ne({
|
|
|
77
78
|
),
|
|
78
79
|
children: [
|
|
79
80
|
r,
|
|
80
|
-
/* @__PURE__ */ e.jsx(
|
|
81
|
+
/* @__PURE__ */ e.jsx(D, { className: "size-4 shrink-0 opacity-50" })
|
|
81
82
|
]
|
|
82
83
|
}
|
|
83
84
|
) });
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function se({
|
|
86
87
|
placeholder: t,
|
|
87
88
|
clickToRemove: r = !0,
|
|
88
89
|
className: o,
|
|
89
|
-
overflowBehavior:
|
|
90
|
-
...
|
|
90
|
+
overflowBehavior: a = "wrap-when-open",
|
|
91
|
+
...c
|
|
91
92
|
}) {
|
|
92
|
-
const { selectedValues:
|
|
93
|
+
const { selectedValues: l, toggleValue: f, items: u, open: d } = N(), [p, b] = y(0), x = M(null), v = M(null), m = M(/* @__PURE__ */ new Set()), g = a === "wrap" || a === "wrap-when-open" && d;
|
|
93
94
|
k(() => {
|
|
94
|
-
g &&
|
|
95
|
+
g && m.current.forEach((s) => s.style.removeProperty("display"));
|
|
95
96
|
}, [g]);
|
|
96
97
|
const j = V(() => {
|
|
97
|
-
if (
|
|
98
|
-
const s =
|
|
99
|
-
|
|
100
|
-
let
|
|
101
|
-
for (let n =
|
|
102
|
-
const
|
|
98
|
+
if (x.current == null) return;
|
|
99
|
+
const s = x.current, i = v.current;
|
|
100
|
+
i != null && (i.style.display = "none"), m.current.forEach((n) => n.style.removeProperty("display"));
|
|
101
|
+
let C = 0;
|
|
102
|
+
for (let n = m.current.size - 1; n >= 0; n--) {
|
|
103
|
+
const h = [...m.current][n];
|
|
103
104
|
if (s.scrollWidth <= s.clientWidth)
|
|
104
105
|
break;
|
|
105
|
-
|
|
106
|
+
C = m.current.size - n, h.style.display = "none", i?.style.removeProperty("display");
|
|
106
107
|
}
|
|
107
|
-
b(
|
|
108
|
+
b(C);
|
|
108
109
|
}, []);
|
|
109
110
|
return k(() => {
|
|
110
|
-
if (
|
|
111
|
+
if (x.current == null) return;
|
|
111
112
|
const s = new ResizeObserver(j);
|
|
112
|
-
return s.observe(
|
|
113
|
-
}, [j]),
|
|
113
|
+
return s.observe(x.current), () => s.disconnect();
|
|
114
|
+
}, [j]), q(() => {
|
|
114
115
|
j();
|
|
115
|
-
}, [
|
|
116
|
+
}, [l, j]), l.size === 0 && t ? /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground font-normal", children: t }) : /* @__PURE__ */ e.jsxs(
|
|
116
117
|
"div",
|
|
117
118
|
{
|
|
118
|
-
...
|
|
119
|
-
ref:
|
|
119
|
+
...c,
|
|
120
|
+
ref: x,
|
|
120
121
|
className: I(
|
|
121
122
|
"flex min-h-7 w-full gap-1.5 overflow-hidden",
|
|
122
123
|
g && "flex-wrap",
|
|
123
124
|
o
|
|
124
125
|
),
|
|
125
126
|
children: [
|
|
126
|
-
[...
|
|
127
|
+
[...l].filter((s) => u.has(s)).map((s) => /* @__PURE__ */ e.jsxs(
|
|
127
128
|
z,
|
|
128
129
|
{
|
|
129
|
-
ref: (
|
|
130
|
-
if (
|
|
131
|
-
return
|
|
132
|
-
|
|
130
|
+
ref: (i) => {
|
|
131
|
+
if (i != null)
|
|
132
|
+
return m.current.add(i), () => {
|
|
133
|
+
m.current.delete(i);
|
|
133
134
|
};
|
|
134
135
|
},
|
|
135
136
|
variant: "outline",
|
|
136
137
|
className: "group flex items-center gap-1",
|
|
137
|
-
onClick: r ? (
|
|
138
|
-
|
|
138
|
+
onClick: r ? (i) => {
|
|
139
|
+
i.stopPropagation(), f(s);
|
|
139
140
|
} : void 0,
|
|
140
141
|
children: [
|
|
141
|
-
|
|
142
|
-
r && /* @__PURE__ */ e.jsx(
|
|
142
|
+
u.get(s),
|
|
143
|
+
r && /* @__PURE__ */ e.jsx(U, { className: "text-muted-foreground group-hover:text-destructive size-2" })
|
|
143
144
|
]
|
|
144
145
|
},
|
|
145
146
|
s
|
|
@@ -148,13 +149,13 @@ function re({
|
|
|
148
149
|
z,
|
|
149
150
|
{
|
|
150
151
|
style: {
|
|
151
|
-
display:
|
|
152
|
+
display: p > 0 && !g ? "block" : "none"
|
|
152
153
|
},
|
|
153
154
|
variant: "outline",
|
|
154
155
|
ref: v,
|
|
155
156
|
children: [
|
|
156
157
|
"+",
|
|
157
|
-
|
|
158
|
+
p
|
|
158
159
|
]
|
|
159
160
|
}
|
|
160
161
|
)
|
|
@@ -162,56 +163,56 @@ function re({
|
|
|
162
163
|
}
|
|
163
164
|
);
|
|
164
165
|
}
|
|
165
|
-
function
|
|
166
|
+
function oe({
|
|
166
167
|
search: t = !0,
|
|
167
168
|
children: r,
|
|
168
169
|
...o
|
|
169
170
|
}) {
|
|
170
|
-
const { isLoading:
|
|
171
|
+
const { isLoading: a, onSearchChange: c, searchValue: l, noResultsText: f, loadingText: u } = N(), d = typeof t == "object" ? !0 : t;
|
|
171
172
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
172
173
|
/* @__PURE__ */ e.jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsx(P, { children: r }) }) }),
|
|
173
|
-
/* @__PURE__ */ e.jsx(
|
|
174
|
-
|
|
174
|
+
/* @__PURE__ */ e.jsx(W, { className: "min-w-(--radix-popover-trigger-width) p-0", children: /* @__PURE__ */ e.jsxs(E, { ...o, children: [
|
|
175
|
+
d ? /* @__PURE__ */ e.jsx(
|
|
175
176
|
O,
|
|
176
177
|
{
|
|
177
178
|
placeholder: typeof t == "object" ? t.placeholder : void 0,
|
|
178
|
-
value:
|
|
179
|
-
onValueChange:
|
|
179
|
+
value: l,
|
|
180
|
+
onValueChange: c
|
|
180
181
|
}
|
|
181
182
|
) : /* @__PURE__ */ e.jsx("button", { autoFocus: !0, "aria-hidden": "true", className: "sr-only" }),
|
|
182
|
-
/* @__PURE__ */ e.jsx(P, { children:
|
|
183
|
-
/* @__PURE__ */ e.jsx(
|
|
184
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground ml-2
|
|
183
|
+
/* @__PURE__ */ e.jsx(P, { children: a ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center py-6", children: [
|
|
184
|
+
/* @__PURE__ */ e.jsx(J, { className: "text-muted-foreground size-4 animate-spin" }),
|
|
185
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground paragraph-sm ml-2", children: u })
|
|
185
186
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
186
|
-
|
|
187
|
+
d && /* @__PURE__ */ e.jsx(_, { children: f }),
|
|
187
188
|
r
|
|
188
189
|
] }) })
|
|
189
190
|
] }) })
|
|
190
191
|
] });
|
|
191
192
|
}
|
|
192
|
-
function
|
|
193
|
+
function ae({
|
|
193
194
|
value: t,
|
|
194
195
|
children: r,
|
|
195
196
|
badgeLabel: o,
|
|
196
|
-
onSelect:
|
|
197
|
-
...
|
|
197
|
+
onSelect: a,
|
|
198
|
+
...c
|
|
198
199
|
}) {
|
|
199
|
-
const { toggleValue:
|
|
200
|
+
const { toggleValue: l, selectedValues: f, onItemAdded: u } = N(), d = f.has(t);
|
|
200
201
|
return k(() => {
|
|
201
|
-
|
|
202
|
-
}, [t, r,
|
|
202
|
+
u(t, o ?? r);
|
|
203
|
+
}, [t, r, u, o]), /* @__PURE__ */ e.jsxs(
|
|
203
204
|
F,
|
|
204
205
|
{
|
|
205
|
-
...
|
|
206
|
+
...c,
|
|
206
207
|
value: t,
|
|
207
|
-
onSelect: (
|
|
208
|
-
|
|
208
|
+
onSelect: (p) => {
|
|
209
|
+
l(p), a?.(p);
|
|
209
210
|
},
|
|
210
211
|
children: [
|
|
211
212
|
/* @__PURE__ */ e.jsx(
|
|
212
|
-
|
|
213
|
+
B,
|
|
213
214
|
{
|
|
214
|
-
className: I("mr-2 size-4",
|
|
215
|
+
className: I("mr-2 size-4", d ? "opacity-100" : "opacity-0")
|
|
215
216
|
}
|
|
216
217
|
),
|
|
217
218
|
r
|
|
@@ -226,7 +227,7 @@ function le(t) {
|
|
|
226
227
|
return /* @__PURE__ */ e.jsx(L, { ...t });
|
|
227
228
|
}
|
|
228
229
|
function N() {
|
|
229
|
-
const t =
|
|
230
|
+
const t = H(R);
|
|
230
231
|
if (t == null)
|
|
231
232
|
throw new Error(
|
|
232
233
|
"useMultiSelectContext must be used within a MultiSelectContext"
|
|
@@ -234,11 +235,11 @@ function N() {
|
|
|
234
235
|
return t;
|
|
235
236
|
}
|
|
236
237
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
ne as MultiSelect,
|
|
239
|
+
oe as MultiSelectContent,
|
|
239
240
|
ie as MultiSelectGroup,
|
|
240
|
-
|
|
241
|
+
ae as MultiSelectItem,
|
|
241
242
|
le as MultiSelectSeparator,
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
re as MultiSelectTrigger,
|
|
244
|
+
se as MultiSelectValue
|
|
244
245
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as e, c as o } from "../index-
|
|
1
|
+
import { j as e, c as o } from "../index-BCEGphus.js";
|
|
2
2
|
import * as n from "@radix-ui/react-navigation-menu";
|
|
3
|
-
import { c as s } from "../index-
|
|
3
|
+
import { c as s } from "../index-DEha_UuN.js";
|
|
4
4
|
import { CaretDownIcon as u } from "@phosphor-icons/react";
|
|
5
5
|
function v({
|
|
6
6
|
className: t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),c=require("../command-CrtCQpi_.cjs"),N=require("../input-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-9HRzXEQf.cjs"),c=require("../command-CrtCQpi_.cjs"),N=require("../input-Dtd0sjiW.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;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as e, c as u } from "../index-
|
|
2
|
-
import { C as y, d as v, f as N, b as S, c as w, e as I } from "../command-
|
|
3
|
-
import { I as P } from "../input-
|
|
4
|
-
import { P as R, c as O, b as E } from "../popover-
|
|
5
|
-
import { S as T } from "../scroll-area-
|
|
1
|
+
import { j as e, c as u } from "../index-BCEGphus.js";
|
|
2
|
+
import { C as y, d as v, f as N, b as S, c as w, e as I } from "../command-CGrOI2Z9.js";
|
|
3
|
+
import { I as P } from "../input-BvfRiqqw.js";
|
|
4
|
+
import { P as R, c as O, b as E } from "../popover-1_WpciTS.js";
|
|
5
|
+
import { S as T } from "../scroll-area-CxpVQq0v.js";
|
|
6
6
|
import { CaretDownIcon as V, CheckIcon as k } from "@phosphor-icons/react";
|
|
7
7
|
import * as p from "react";
|
|
8
8
|
import * as h from "react-phone-number-input";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as o, c as m } from "../index-
|
|
2
|
-
import { c as r } from "../index-
|
|
1
|
+
import { j as o, c as m } from "../index-BCEGphus.js";
|
|
2
|
+
import { c as r } from "../index-DEha_UuN.js";
|
|
3
3
|
import { forwardRef as b, useState as x } from "react";
|
|
4
4
|
const g = r(
|
|
5
5
|
"border-neutral-000 focus-visible:ring-ring-default inline-flex shrink-0 cursor-pointer items-center rounded-full border bg-white transition-colors focus-visible:ring-[1.5px] focus-visible:ring-offset-1 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-800 data-[state=unchecked]:bg-white",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as r, c as t } from "../index-
|
|
2
|
-
import { c as v } from "../index-
|
|
1
|
+
import { j as r, c as t } from "../index-BCEGphus.js";
|
|
2
|
+
import { c as v } from "../index-DEha_UuN.js";
|
|
3
3
|
const c = v(
|
|
4
4
|
"placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 rounded-md border bg-transparent transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
5
5
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as i, c as s } from "../index-
|
|
1
|
+
import { j as i, c as s } from "../index-BCEGphus.js";
|
|
2
2
|
import * as d from "@radix-ui/react-toggle-group";
|
|
3
3
|
import * as l from "react";
|
|
4
|
-
import { t as m } from "../toggle-
|
|
4
|
+
import { t as m } from "../toggle-99EXLQgX.js";
|
|
5
5
|
const u = l.createContext({
|
|
6
6
|
size: "md",
|
|
7
7
|
variant: "default"
|
|
@@ -2,7 +2,7 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { j as i, c as t } from "./index-BCEGphus.js";
|
|
2
|
+
import { forwardRef as l } from "react";
|
|
3
|
+
const o = l(
|
|
4
|
+
({ className: a, orientation: r = "horizontal", ...s }, e) => /* @__PURE__ */ i.jsx(
|
|
5
|
+
"span",
|
|
6
|
+
{
|
|
7
|
+
ref: e,
|
|
8
|
+
className: t("bg-neutral-050", a, {
|
|
9
|
+
"h-px! w-full": r === "horizontal",
|
|
10
|
+
"h-full w-px!": r === "vertical"
|
|
11
|
+
}),
|
|
12
|
+
...s
|
|
13
|
+
}
|
|
14
|
+
)
|
|
15
|
+
);
|
|
16
|
+
o.displayName = "Divider";
|
|
17
|
+
const m = o;
|
|
18
|
+
export {
|
|
19
|
+
m as D
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("./index-9HRzXEQf.cjs"),a=require("react"),i=a.forwardRef(({className:s,orientation:e="horizontal",...t},n)=>r.jsxRuntimeExports.jsx("span",{ref:n,className:r.cn("bg-neutral-050",s,{"h-px! w-full":e==="horizontal","h-full w-px!":e==="vertical"}),...t}));i.displayName="Divider";const l=i;exports.Divider=l;
|
|
@@ -4,7 +4,7 @@ var ge;
|
|
|
4
4
|
function Le() {
|
|
5
5
|
if (ge) return re;
|
|
6
6
|
ge = 1;
|
|
7
|
-
var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
7
|
+
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
8
|
function t(o, s, c) {
|
|
9
9
|
var i = null;
|
|
10
10
|
if (c !== void 0 && (i = "" + c), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
@@ -219,7 +219,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
219
219
|
function E(r) {
|
|
220
220
|
return typeof r == "object" && r !== null && r.$$typeof === C;
|
|
221
221
|
}
|
|
222
|
-
var T = Ge, C = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), U = Symbol.for("react.profiler"), W = Symbol.for("react.consumer"), G = Symbol.for("react.context"), L = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), $ = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), ne = Symbol.for("react.activity"), se = Symbol.for("react.client.reference"), F = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, Q = Array.isArray, P = console.createTask ? console.createTask : function() {
|
|
222
|
+
var T = Ge, C = /* @__PURE__ */ Symbol.for("react.transitional.element"), _ = /* @__PURE__ */ Symbol.for("react.portal"), v = /* @__PURE__ */ Symbol.for("react.fragment"), O = /* @__PURE__ */ Symbol.for("react.strict_mode"), U = /* @__PURE__ */ Symbol.for("react.profiler"), W = /* @__PURE__ */ Symbol.for("react.consumer"), G = /* @__PURE__ */ Symbol.for("react.context"), L = /* @__PURE__ */ Symbol.for("react.forward_ref"), j = /* @__PURE__ */ Symbol.for("react.suspense"), $ = /* @__PURE__ */ Symbol.for("react.suspense_list"), m = /* @__PURE__ */ Symbol.for("react.memo"), A = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), se = /* @__PURE__ */ Symbol.for("react.client.reference"), F = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Z = Object.prototype.hasOwnProperty, Q = Array.isArray, P = console.createTask ? console.createTask : function() {
|
|
223
223
|
return null;
|
|
224
224
|
};
|
|
225
225
|
T = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as e, c as n } from "./index-
|
|
1
|
+
import { j as e, c as n } from "./index-BCEGphus.js";
|
|
2
2
|
import { EyeSlashIcon as f, EyeIcon as b } from "@phosphor-icons/react";
|
|
3
|
-
import { c as m } from "./index-
|
|
3
|
+
import { c as m } from "./index-DEha_UuN.js";
|
|
4
4
|
import * as x from "react";
|
|
5
|
-
import { B as c } from "./button-
|
|
5
|
+
import { B as c } from "./button-Bn-b-nVw.js";
|
|
6
6
|
const o = m(
|
|
7
7
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input file:paragraph-sm flex w-full min-w-0 rounded-md border bg-transparent transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
8
8
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("./index-9HRzXEQf.cjs"),o=require("@phosphor-icons/react"),c=require("./index-ECyCsPX0.cjs"),x=require("react"),b=require("./button-
|
|
1
|
+
"use strict";const r=require("./index-9HRzXEQf.cjs"),o=require("@phosphor-icons/react"),c=require("./index-ECyCsPX0.cjs"),x=require("react"),b=require("./button-C7U_D8vv.cjs");function f(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const s in i)if(s!=="default"){const t=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(e,s,t.get?t:{enumerable:!0,get:()=>i[s]})}}return e.default=i,Object.freeze(e)}const g=f(x),d=c.cva("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input file:paragraph-sm flex w-full min-w-0 rounded-md border bg-transparent transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"label-sm h-7 px-2 py-1",sm:"label-md h-8 px-2 py-1",md:"label-lg h-12 px-3 py-1",lg:"label-xl h-16 px-4 py-2"}},defaultVariants:{size:"md"}});function m({className:i,type:e,size:s,icon:t,iconPosition:a="left",...l}){const[n,u]=g.useState(!1),p=()=>{u(!n)};return!t&&e!=="password"?r.jsxRuntimeExports.jsx("input",{type:e,"data-slot":"input",className:r.cn(d({size:s}),"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),...l}):r.jsxRuntimeExports.jsxs("div",{className:"relative w-full",children:[t&&a==="left"&&r.jsxRuntimeExports.jsx("span",{className:"text-muted-foreground absolute top-1/2 left-3 -translate-y-1/2",children:t}),r.jsxRuntimeExports.jsx("input",{type:e==="password"?n?"text":"password":e,"data-slot":"input",className:r.cn(d({size:s}),"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t&&a==="left"?"pl-10":"",t&&a==="right"||e==="password"?"pr-10":"",i),...l}),e==="password"&&r.jsxRuntimeExports.jsx(b.Button,{variant:"inverse",type:"button",size:s==="xs"||s==="sm"?"xs":"md",tabIndex:-1,"aria-label":n?"Hide password":"Show password",className:"absolute top-1/2 right-3 -translate-y-1/2",onClick:p,children:n?r.jsxRuntimeExports.jsx(o.EyeSlashIcon,{}):r.jsxRuntimeExports.jsx(o.EyeIcon,{})}),t&&a==="right"&&e!=="password"&&r.jsxRuntimeExports.jsx("span",{className:"text-muted-foreground absolute top-1/2 right-3 -translate-y-1/2",children:t})]})}exports.Input=m;
|