@clasing/ui 2.0.6 → 2.0.8
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-DgjaD6g5.js → badge-B4oRxQ-G.js} +9 -10
- package/dist/badge-CS2XfLYQ.cjs +1 -0
- package/dist/{button-D8hlW1CJ.js → button-DiOH2ngV.js} +12 -13
- package/dist/button-t0WrANXO.cjs +1 -0
- package/dist/{card-DPaMJS2f.js → card-BNTyYiyA.js} +15 -16
- package/dist/card-Dj2wgH-P.cjs +1 -0
- package/dist/{chip-C5OWe3FG.js → chip-CK2VBBsV.js} +10 -11
- package/dist/chip-DVKpteyL.cjs +1 -0
- package/dist/{command-RWDkdfba.js → command-CGUB58ej.js} +43 -44
- package/dist/command-CHisYTN-.cjs +1 -0
- package/dist/components/accordion.cjs.js +1 -1
- package/dist/components/accordion.es.js +22 -23
- package/dist/components/alert-dialog.cjs.js +1 -1
- package/dist/components/alert-dialog.es.js +26 -27
- package/dist/components/alert.cjs.js +1 -1
- package/dist/components/alert.es.js +15 -16
- package/dist/components/avatar.cjs.js +1 -1
- package/dist/components/avatar.es.js +13 -14
- package/dist/components/badge.cjs.js +1 -1
- package/dist/components/badge.es.js +1 -1
- package/dist/components/blocks/interactive-card.cjs.js +1 -1
- package/dist/components/blocks/interactive-card.es.js +38 -39
- package/dist/components/blocks/selectable-chips.cjs.js +1 -1
- package/dist/components/blocks/selectable-chips.es.js +8 -9
- package/dist/components/breadcrumb.cjs.js +1 -1
- package/dist/components/breadcrumb.es.js +14 -15
- package/dist/components/button.cjs.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs.js +1 -1
- package/dist/components/calendar.es.js +5 -6
- package/dist/components/card.cjs.js +1 -1
- package/dist/components/card.es.js +1 -1
- package/dist/components/chart.cjs.js +3 -3
- package/dist/components/chart.es.js +11 -12
- package/dist/components/checkbox.cjs.js +1 -1
- package/dist/components/checkbox.es.js +4 -5
- package/dist/components/chip.cjs.js +1 -1
- package/dist/components/chip.es.js +1 -1
- package/dist/components/collapsible.cjs.js +1 -1
- package/dist/components/collapsible.d.ts +1 -1
- package/dist/components/collapsible.es.js +23 -18
- 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 +32 -33
- 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 +7 -8
- package/dist/components/drawer.cjs.js +1 -1
- package/dist/components/drawer.es.js +17 -18
- package/dist/components/dropdown-menu.cjs.js +1 -1
- package/dist/components/dropdown-menu.es.js +32 -33
- package/dist/components/form.cjs.js +1 -1
- package/dist/components/form.es.js +29 -30
- package/dist/components/hover-card.cjs.js +1 -1
- package/dist/components/hover-card.es.js +17 -18
- package/dist/components/icon-component.cjs.js +1 -1
- package/dist/components/icon-component.es.js +1 -1
- package/dist/components/input-otp.cjs.js +1 -1
- package/dist/components/input-otp.es.js +19 -20
- package/dist/components/input.cjs.js +1 -1
- 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 +32 -33
- package/dist/components/multi-select.cjs.js +1 -1
- package/dist/components/multi-select.d.ts +5 -1
- package/dist/components/multi-select.es.js +174 -150
- package/dist/components/navigation-menu.cjs.js +1 -1
- package/dist/components/navigation-menu.es.js +17 -18
- package/dist/components/phone-input.cjs.js +1 -1
- package/dist/components/phone-input.es.js +20 -21
- package/dist/components/popover.cjs.js +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/progress.cjs.js +1 -1
- package/dist/components/progress.es.js +3 -4
- package/dist/components/resizable.cjs.js +1 -1
- package/dist/components/resizable.es.js +8 -9
- 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 +16 -17
- package/dist/components/sheet.cjs.js +1 -1
- package/dist/components/sheet.es.js +18 -19
- package/dist/components/skeleton.cjs.js +1 -1
- package/dist/components/skeleton.es.js +6 -7
- package/dist/components/slider.cjs.js +1 -1
- package/dist/components/slider.es.js +9 -10
- package/dist/components/sonner.cjs.js +1 -1
- package/dist/components/sonner.es.js +13 -14
- package/dist/components/switch.cjs.js +1 -1
- package/dist/components/switch.es.js +7 -8
- package/dist/components/table.cjs.js +1 -1
- package/dist/components/table.es.js +15 -16
- package/dist/components/textarea.cjs.js +1 -1
- package/dist/components/textarea.es.js +10 -11
- package/dist/components/toggle-group.cjs.js +1 -1
- package/dist/components/toggle-group.es.js +21 -22
- package/dist/components/toggle.cjs.js +1 -1
- package/dist/components/toggle.es.js +1 -1
- package/dist/components/tooltip.cjs.js +1 -1
- package/dist/components/tooltip.es.js +1 -1
- package/dist/{dialog-BSEMFrzb.js → dialog-CEttcpWT.js} +16 -17
- package/dist/dialog-Chh5qAxR.cjs +1 -0
- package/dist/icon-component-DGImZz3K.js +49 -0
- package/dist/icon-component-DTlgy__B.cjs +1 -0
- package/dist/{index-C8P6Mn4U.cjs → index-BVmT9wZC.cjs} +1 -1
- package/dist/{index-BqtVL8d-.js → index-CwXB7YIx.js} +1 -1
- package/dist/{index-CRiPKpXj.js → index-DBpnlzOP.js} +759 -477
- package/dist/index-DSjHHn1r.cjs +22 -0
- package/dist/{input-CUpmfQgR.js → input-B6wjJM4O.js} +14 -15
- package/dist/input-Dpz3zGIU.cjs +1 -0
- package/dist/{label-CKObiJEl.js → label-Bp4qkqFq.js} +7 -8
- package/dist/label-eHraXPfy.cjs +1 -0
- package/dist/popover-BnLx2OY6.cjs +1 -0
- package/dist/{popover-CHAUhJda.js → popover-C6pozFVL.js} +13 -14
- package/dist/scroll-area-CJpVshOm.cjs +1 -0
- package/dist/{scroll-area-DwBiu3Jn.js → scroll-area-Dj0Szbw6.js} +3 -4
- package/dist/toggle-CJLDdFRo.cjs +1 -0
- package/dist/{toggle-DkQSX3ux.js → toggle-owj9AHVO.js} +9 -10
- package/dist/tooltip-BvdeurjC.cjs +1 -0
- package/dist/{tooltip-DgWl3klK.js → tooltip-CUaxcngn.js} +7 -8
- package/package.json +1 -1
- package/dist/badge-DuEEk3J_.cjs +0 -1
- package/dist/button-U1793OQ4.cjs +0 -1
- package/dist/card-BJMc0row.cjs +0 -1
- package/dist/chip-CXa6E8Cf.cjs +0 -1
- package/dist/command-B7wbtmbM.cjs +0 -1
- package/dist/dialog-aYmcf_6q.cjs +0 -1
- package/dist/icon-component-4lyl8wE_.cjs +0 -1
- package/dist/icon-component-Db_44zX2.js +0 -50
- package/dist/index-DoxiiusW.cjs +0 -1
- package/dist/input-belq5zLm.cjs +0 -1
- package/dist/jsx-runtime-BuHQgaKs.cjs +0 -22
- package/dist/jsx-runtime-DywqP_6a.js +0 -284
- package/dist/label-RxaHfl3U.cjs +0 -1
- package/dist/popover-4V87msIT.cjs +0 -1
- package/dist/scroll-area-hg-bGoRe.cjs +0 -1
- package/dist/toggle-v18XjPC4.cjs +0 -1
- package/dist/tooltip-__VfWmJD.cjs +0 -1
|
@@ -1,71 +1,84 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { B as
|
|
3
|
-
import { C as
|
|
4
|
-
import { P as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { j as e, c as z } from "../index-DBpnlzOP.js";
|
|
2
|
+
import { B as E } from "../badge-B4oRxQ-G.js";
|
|
3
|
+
import { C as P, f as R, d as _, b as A, c as L, e as F, g as W } from "../command-CGUB58ej.js";
|
|
4
|
+
import { P as G, b as T, c as B } from "../popover-C6pozFVL.js";
|
|
5
|
+
import { createContext as X, useState as y, useCallback as I, useEffect as k, useRef as V, useLayoutEffect as q, useContext as D } from "react";
|
|
6
|
+
import { I as N } from "../icon-component-DGImZz3K.js";
|
|
7
|
+
const O = X(null);
|
|
8
|
+
function Z({
|
|
9
|
+
children: t,
|
|
10
|
+
values: r,
|
|
11
|
+
defaultValues: o,
|
|
12
|
+
onValuesChange: a,
|
|
13
|
+
isLoading: u,
|
|
14
|
+
onSearchChange: l,
|
|
15
|
+
loadingText: p = "Loading...",
|
|
16
|
+
noResultsText: c = "No results found"
|
|
14
17
|
}) {
|
|
15
|
-
const [
|
|
16
|
-
new Set(
|
|
17
|
-
), [
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
return
|
|
18
|
+
const [h, m] = y(!1), [b, f] = y(
|
|
19
|
+
new Set(r ?? o)
|
|
20
|
+
), [v, d] = y(/* @__PURE__ */ new Map()), [g, j] = y("");
|
|
21
|
+
function s(n) {
|
|
22
|
+
const x = (w) => {
|
|
23
|
+
const C = new Set(w);
|
|
24
|
+
return C.has(n) ? C.delete(n) : C.add(n), C;
|
|
22
25
|
};
|
|
23
|
-
|
|
26
|
+
f(x), a?.([...x(b)]);
|
|
24
27
|
}
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
}, [])
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const i = I((n, x) => {
|
|
29
|
+
d((w) => w.get(n) === x ? w : new Map(w).set(n, x));
|
|
30
|
+
}, []), S = I(
|
|
31
|
+
(n) => {
|
|
32
|
+
j(n), l?.(n);
|
|
33
|
+
},
|
|
34
|
+
[l]
|
|
35
|
+
);
|
|
36
|
+
return /* @__PURE__ */ e.jsx(
|
|
37
|
+
O,
|
|
30
38
|
{
|
|
31
39
|
value: {
|
|
32
|
-
open:
|
|
40
|
+
open: h,
|
|
33
41
|
setOpen: m,
|
|
34
|
-
selectedValues:
|
|
35
|
-
toggleValue:
|
|
36
|
-
items:
|
|
37
|
-
onItemAdded:
|
|
42
|
+
selectedValues: r ? new Set(r) : b,
|
|
43
|
+
toggleValue: s,
|
|
44
|
+
items: v,
|
|
45
|
+
onItemAdded: i,
|
|
46
|
+
isLoading: u,
|
|
47
|
+
searchValue: g,
|
|
48
|
+
onSearchChange: S,
|
|
49
|
+
loadingText: p,
|
|
50
|
+
noResultsText: c
|
|
38
51
|
},
|
|
39
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ e.jsx(G, { open: h, onOpenChange: m, children: t })
|
|
40
53
|
}
|
|
41
54
|
);
|
|
42
55
|
}
|
|
43
|
-
function
|
|
44
|
-
className:
|
|
45
|
-
children:
|
|
46
|
-
size:
|
|
47
|
-
...
|
|
56
|
+
function $({
|
|
57
|
+
className: t,
|
|
58
|
+
children: r,
|
|
59
|
+
size: o = "md",
|
|
60
|
+
...a
|
|
48
61
|
}) {
|
|
49
|
-
const { open:
|
|
50
|
-
return /* @__PURE__ */
|
|
62
|
+
const { open: u } = M();
|
|
63
|
+
return /* @__PURE__ */ e.jsx(B, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
51
64
|
"button",
|
|
52
65
|
{
|
|
53
|
-
...
|
|
54
|
-
role:
|
|
55
|
-
"aria-expanded":
|
|
56
|
-
"data-size":
|
|
57
|
-
className:
|
|
66
|
+
...a,
|
|
67
|
+
role: a.role ?? "combobox",
|
|
68
|
+
"aria-expanded": a["aria-expanded"] ?? u,
|
|
69
|
+
"data-size": o,
|
|
70
|
+
className: z(
|
|
58
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",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
72
|
+
o === "xs" && 'label-sm h-7 px-2 py-1 [&_svg:not([class*="size-"])]:size-3.5',
|
|
73
|
+
o === "sm" && "label-md h-8 px-2 py-1",
|
|
74
|
+
o === "md" && "label-lg h-12 px-3 py-1",
|
|
75
|
+
o === "lg" && "label-xl h-16 px-4 py-2",
|
|
76
|
+
t
|
|
64
77
|
),
|
|
65
78
|
children: [
|
|
66
|
-
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
79
|
+
r,
|
|
80
|
+
/* @__PURE__ */ e.jsx(
|
|
81
|
+
N,
|
|
69
82
|
{
|
|
70
83
|
iconName: "IconSelector",
|
|
71
84
|
className: "size-4 shrink-0 opacity-50"
|
|
@@ -75,65 +88,65 @@ function Z({
|
|
|
75
88
|
}
|
|
76
89
|
) });
|
|
77
90
|
}
|
|
78
|
-
function
|
|
79
|
-
placeholder:
|
|
80
|
-
clickToRemove:
|
|
81
|
-
className:
|
|
82
|
-
overflowBehavior:
|
|
83
|
-
...
|
|
91
|
+
function ee({
|
|
92
|
+
placeholder: t,
|
|
93
|
+
clickToRemove: r = !0,
|
|
94
|
+
className: o,
|
|
95
|
+
overflowBehavior: a = "wrap-when-open",
|
|
96
|
+
...u
|
|
84
97
|
}) {
|
|
85
|
-
const { selectedValues:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, [
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
for (let
|
|
95
|
-
const
|
|
96
|
-
if (
|
|
98
|
+
const { selectedValues: l, toggleValue: p, items: c, open: h } = M(), [m, b] = y(0), f = V(null), v = V(null), d = V(/* @__PURE__ */ new Set()), g = a === "wrap" || a === "wrap-when-open" && h;
|
|
99
|
+
k(() => {
|
|
100
|
+
g && d.current.forEach((s) => s.style.removeProperty("display"));
|
|
101
|
+
}, [g]);
|
|
102
|
+
const j = I(() => {
|
|
103
|
+
if (f.current == null) return;
|
|
104
|
+
const s = f.current, i = v.current;
|
|
105
|
+
i != null && (i.style.display = "none"), d.current.forEach((n) => n.style.removeProperty("display"));
|
|
106
|
+
let S = 0;
|
|
107
|
+
for (let n = d.current.size - 1; n >= 0; n--) {
|
|
108
|
+
const x = [...d.current][n];
|
|
109
|
+
if (s.scrollWidth <= s.clientWidth)
|
|
97
110
|
break;
|
|
98
|
-
|
|
111
|
+
S = d.current.size - n, x.style.display = "none", i?.style.removeProperty("display");
|
|
99
112
|
}
|
|
100
|
-
b(
|
|
113
|
+
b(S);
|
|
101
114
|
}, []);
|
|
102
|
-
return
|
|
103
|
-
if (
|
|
104
|
-
const
|
|
105
|
-
return
|
|
106
|
-
}, [
|
|
107
|
-
|
|
108
|
-
}, [
|
|
115
|
+
return k(() => {
|
|
116
|
+
if (f.current == null) return;
|
|
117
|
+
const s = new ResizeObserver(j);
|
|
118
|
+
return s.observe(f.current), () => s.disconnect();
|
|
119
|
+
}, [j]), q(() => {
|
|
120
|
+
j();
|
|
121
|
+
}, [l, j]), l.size === 0 && t ? /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground font-normal", children: t }) : /* @__PURE__ */ e.jsxs(
|
|
109
122
|
"div",
|
|
110
123
|
{
|
|
111
|
-
...
|
|
112
|
-
ref:
|
|
113
|
-
className:
|
|
124
|
+
...u,
|
|
125
|
+
ref: f,
|
|
126
|
+
className: z(
|
|
114
127
|
"flex min-h-[1.75rem] w-full gap-1.5 overflow-hidden",
|
|
115
|
-
|
|
116
|
-
|
|
128
|
+
g && "flex-wrap",
|
|
129
|
+
o
|
|
117
130
|
),
|
|
118
131
|
children: [
|
|
119
|
-
[...
|
|
120
|
-
|
|
132
|
+
[...l].filter((s) => c.has(s)).map((s) => /* @__PURE__ */ e.jsxs(
|
|
133
|
+
E,
|
|
121
134
|
{
|
|
122
|
-
ref: (
|
|
123
|
-
if (
|
|
124
|
-
return
|
|
125
|
-
|
|
135
|
+
ref: (i) => {
|
|
136
|
+
if (i != null)
|
|
137
|
+
return d.current.add(i), () => {
|
|
138
|
+
d.current.delete(i);
|
|
126
139
|
};
|
|
127
140
|
},
|
|
128
141
|
variant: "outline",
|
|
129
142
|
className: "group flex items-center gap-1",
|
|
130
|
-
onClick:
|
|
131
|
-
|
|
143
|
+
onClick: r ? (i) => {
|
|
144
|
+
i.stopPropagation(), p(s);
|
|
132
145
|
} : void 0,
|
|
133
146
|
children: [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
147
|
+
c.get(s),
|
|
148
|
+
r && /* @__PURE__ */ e.jsx(
|
|
149
|
+
N,
|
|
137
150
|
{
|
|
138
151
|
iconName: "IconX",
|
|
139
152
|
className: "text-muted-foreground group-hover:text-destructive size-2"
|
|
@@ -141,19 +154,19 @@ function $({
|
|
|
141
154
|
)
|
|
142
155
|
]
|
|
143
156
|
},
|
|
144
|
-
|
|
157
|
+
s
|
|
145
158
|
)),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
159
|
+
/* @__PURE__ */ e.jsxs(
|
|
160
|
+
E,
|
|
148
161
|
{
|
|
149
162
|
style: {
|
|
150
|
-
display:
|
|
163
|
+
display: m > 0 && !g ? "block" : "none"
|
|
151
164
|
},
|
|
152
165
|
variant: "outline",
|
|
153
|
-
ref:
|
|
166
|
+
ref: v,
|
|
154
167
|
children: [
|
|
155
168
|
"+",
|
|
156
|
-
|
|
169
|
+
m
|
|
157
170
|
]
|
|
158
171
|
}
|
|
159
172
|
)
|
|
@@ -161,79 +174,90 @@ function $({
|
|
|
161
174
|
}
|
|
162
175
|
);
|
|
163
176
|
}
|
|
164
|
-
function
|
|
165
|
-
search:
|
|
166
|
-
children:
|
|
167
|
-
...
|
|
177
|
+
function te({
|
|
178
|
+
search: t = !0,
|
|
179
|
+
children: r,
|
|
180
|
+
...o
|
|
168
181
|
}) {
|
|
169
|
-
const
|
|
170
|
-
return /* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
|
|
174
|
-
|
|
182
|
+
const { isLoading: a, onSearchChange: u, searchValue: l, noResultsText: p } = M(), c = typeof t == "object" ? !0 : t;
|
|
183
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
184
|
+
/* @__PURE__ */ e.jsx("div", { style: { display: "none" }, children: /* @__PURE__ */ e.jsx(P, { children: /* @__PURE__ */ e.jsx(R, { children: r }) }) }),
|
|
185
|
+
/* @__PURE__ */ e.jsx(T, { className: "min-w-[var(--radix-popover-trigger-width)] p-0", children: /* @__PURE__ */ e.jsxs(P, { ...o, children: [
|
|
186
|
+
c ? /* @__PURE__ */ e.jsx(
|
|
187
|
+
_,
|
|
175
188
|
{
|
|
176
|
-
placeholder: typeof
|
|
189
|
+
placeholder: typeof t == "object" ? t.placeholder : void 0,
|
|
190
|
+
value: l,
|
|
191
|
+
onValueChange: u
|
|
177
192
|
}
|
|
178
|
-
) : /* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
193
|
+
) : /* @__PURE__ */ e.jsx("button", { autoFocus: !0, "aria-hidden": "true", className: "sr-only" }),
|
|
194
|
+
/* @__PURE__ */ e.jsx(R, { children: a ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center py-6", children: [
|
|
195
|
+
/* @__PURE__ */ e.jsx(
|
|
196
|
+
N,
|
|
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 })
|
|
203
|
+
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
204
|
+
c && /* @__PURE__ */ e.jsx(A, { children: p }),
|
|
205
|
+
r
|
|
206
|
+
] }) })
|
|
183
207
|
] }) })
|
|
184
208
|
] });
|
|
185
209
|
}
|
|
186
|
-
function
|
|
187
|
-
value:
|
|
188
|
-
children:
|
|
189
|
-
badgeLabel:
|
|
190
|
-
onSelect:
|
|
191
|
-
...
|
|
210
|
+
function ne({
|
|
211
|
+
value: t,
|
|
212
|
+
children: r,
|
|
213
|
+
badgeLabel: o,
|
|
214
|
+
onSelect: a,
|
|
215
|
+
...u
|
|
192
216
|
}) {
|
|
193
|
-
const { toggleValue:
|
|
194
|
-
return
|
|
195
|
-
|
|
196
|
-
}, [
|
|
197
|
-
|
|
217
|
+
const { toggleValue: l, selectedValues: p, onItemAdded: c } = M(), h = p.has(t);
|
|
218
|
+
return k(() => {
|
|
219
|
+
c(t, o ?? r);
|
|
220
|
+
}, [t, r, c, o]), /* @__PURE__ */ e.jsxs(
|
|
221
|
+
F,
|
|
198
222
|
{
|
|
199
|
-
...
|
|
200
|
-
value:
|
|
201
|
-
onSelect: (
|
|
202
|
-
m
|
|
223
|
+
...u,
|
|
224
|
+
value: t,
|
|
225
|
+
onSelect: (m) => {
|
|
226
|
+
l(m), a?.(m);
|
|
203
227
|
},
|
|
204
228
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
|
|
229
|
+
/* @__PURE__ */ e.jsx(
|
|
230
|
+
N,
|
|
207
231
|
{
|
|
208
232
|
iconName: "IconCheck",
|
|
209
|
-
className:
|
|
233
|
+
className: z("mr-2 size-4", h ? "opacity-100" : "opacity-0")
|
|
210
234
|
}
|
|
211
235
|
),
|
|
212
|
-
|
|
236
|
+
r
|
|
213
237
|
]
|
|
214
238
|
}
|
|
215
239
|
);
|
|
216
240
|
}
|
|
217
|
-
function
|
|
218
|
-
return /* @__PURE__ */
|
|
241
|
+
function re(t) {
|
|
242
|
+
return /* @__PURE__ */ e.jsx(L, { ...t });
|
|
219
243
|
}
|
|
220
|
-
function
|
|
221
|
-
return /* @__PURE__ */
|
|
244
|
+
function se(t) {
|
|
245
|
+
return /* @__PURE__ */ e.jsx(W, { ...t });
|
|
222
246
|
}
|
|
223
247
|
function M() {
|
|
224
|
-
const
|
|
225
|
-
if (
|
|
248
|
+
const t = D(O);
|
|
249
|
+
if (t == null)
|
|
226
250
|
throw new Error(
|
|
227
251
|
"useMultiSelectContext must be used within a MultiSelectContext"
|
|
228
252
|
);
|
|
229
|
-
return
|
|
253
|
+
return t;
|
|
230
254
|
}
|
|
231
255
|
export {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
256
|
+
Z as MultiSelect,
|
|
257
|
+
te as MultiSelectContent,
|
|
258
|
+
re as MultiSelectGroup,
|
|
259
|
+
ne as MultiSelectItem,
|
|
260
|
+
se as MultiSelectSeparator,
|
|
261
|
+
$ as MultiSelectTrigger,
|
|
262
|
+
ee as MultiSelectValue
|
|
239
263
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-DSjHHn1r.cjs"),u=require("@radix-ui/react-navigation-menu"),d=require("../index-BVmT9wZC.cjs"),c=require("../icon-component-DTlgy__B.cjs");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.IconComponent,{iconName:"IconChevronDown",className:"relative top-[1px] 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-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--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,9 +1,8 @@
|
|
|
1
|
-
import { j as e } from "../
|
|
1
|
+
import { j as e, c as o } from "../index-DBpnlzOP.js";
|
|
2
2
|
import * as n from "@radix-ui/react-navigation-menu";
|
|
3
|
-
import { c as s } from "../index-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
function f({
|
|
3
|
+
import { c as s } from "../index-CwXB7YIx.js";
|
|
4
|
+
import { I as u } from "../icon-component-DGImZz3K.js";
|
|
5
|
+
function v({
|
|
7
6
|
className: t,
|
|
8
7
|
children: a,
|
|
9
8
|
viewport: i = !0,
|
|
@@ -26,7 +25,7 @@ function f({
|
|
|
26
25
|
}
|
|
27
26
|
);
|
|
28
27
|
}
|
|
29
|
-
function
|
|
28
|
+
function f({
|
|
30
29
|
className: t,
|
|
31
30
|
...a
|
|
32
31
|
}) {
|
|
@@ -42,7 +41,7 @@ function p({
|
|
|
42
41
|
}
|
|
43
42
|
);
|
|
44
43
|
}
|
|
45
|
-
function
|
|
44
|
+
function p({
|
|
46
45
|
className: t,
|
|
47
46
|
...a
|
|
48
47
|
}) {
|
|
@@ -58,7 +57,7 @@ function x({
|
|
|
58
57
|
const d = s(
|
|
59
58
|
"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"
|
|
60
59
|
);
|
|
61
|
-
function
|
|
60
|
+
function x({
|
|
62
61
|
className: t,
|
|
63
62
|
children: a,
|
|
64
63
|
...i
|
|
@@ -84,7 +83,7 @@ function w({
|
|
|
84
83
|
}
|
|
85
84
|
);
|
|
86
85
|
}
|
|
87
|
-
function
|
|
86
|
+
function w({
|
|
88
87
|
className: t,
|
|
89
88
|
...a
|
|
90
89
|
}) {
|
|
@@ -125,7 +124,7 @@ function l({
|
|
|
125
124
|
}
|
|
126
125
|
);
|
|
127
126
|
}
|
|
128
|
-
function
|
|
127
|
+
function h({
|
|
129
128
|
className: t,
|
|
130
129
|
...a
|
|
131
130
|
}) {
|
|
@@ -141,7 +140,7 @@ function b({
|
|
|
141
140
|
}
|
|
142
141
|
);
|
|
143
142
|
}
|
|
144
|
-
function
|
|
143
|
+
function b({
|
|
145
144
|
className: t,
|
|
146
145
|
...a
|
|
147
146
|
}) {
|
|
@@ -159,13 +158,13 @@ function N({
|
|
|
159
158
|
);
|
|
160
159
|
}
|
|
161
160
|
export {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
v as NavigationMenu,
|
|
162
|
+
w as NavigationMenuContent,
|
|
163
|
+
b as NavigationMenuIndicator,
|
|
164
|
+
p as NavigationMenuItem,
|
|
165
|
+
h as NavigationMenuLink,
|
|
166
|
+
f as NavigationMenuList,
|
|
167
|
+
x as NavigationMenuTrigger,
|
|
169
168
|
l as NavigationMenuViewport,
|
|
170
169
|
d as navigationMenuTriggerStyle
|
|
171
170
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-DSjHHn1r.cjs"),c=require("../command-CHisYTN-.cjs"),N=require("../input-Dpz3zGIU.cjs"),x=require("../popover-BnLx2OY6.cjs"),S=require("../scroll-area-CJpVshOm.cjs"),I=require("react"),w=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"),h=require("../icon-component-DTlgy__B.cjs");function b(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>n[o]})}}return t.default=n,Object.freeze(t)}const d=b(I),R=b(w),y=d.forwardRef(({className:n,onChange:t,value:o,size:r="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:o||void 0,onChange:u=>t?.(u||""),countrySelectProps:{size:r,rounded:s},numberInputProps:{size:r,rounded:s},...i}));y.displayName="PhoneInput";const C=d.forwardRef(({className:n,rounded:t="default",error:o,touched:r,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":o&&r,"border-blue-800":r&&!o,"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:o,onChange:r,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.IconComponent,{iconName:"IconChevronDown",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:o.map(({value:a,label:m})=>a?e.jsxRuntimeExports.jsx(k,{country:a,countryName:m,selectedCountry:t,onChange:r,onSelectComplete:()=>g(!1)},a):null)})]})})]})})]})},k=({country:n,countryName:t,selectedCountry:o,onChange:r,onSelectComplete:s})=>{const l=()=>{r(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.IconComponent,{iconName:"IconCheck",className:`ml-auto size-4 ${n===o?"opacity-100":"opacity-0"}`})]})},f=({country:n,countryName:t,disabled:o})=>{const r=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":o}),children:r&&e.jsxRuntimeExports.jsx(r,{title:t})})};exports.PhoneInput=y;
|