@vlrc-fe/components 1.0.9 → 1.0.11
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/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/index100.js +30 -17
- package/dist/index101.cjs +1 -1
- package/dist/index102.js +35 -19
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +29 -19
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +98 -55
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +86 -48
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +12 -6
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +23 -16
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +205 -120
- package/dist/index109.cjs +1 -1
- package/dist/index11.js +105 -53
- package/dist/index113.js +12 -6
- package/dist/index114.cjs +1 -1
- package/dist/index115.js +18 -10
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +82 -41
- package/dist/index117.cjs +1 -1
- package/dist/index118.js +42 -21
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +12 -6
- package/dist/index12.cjs +1 -1
- package/dist/index120.cjs +1 -1
- package/dist/index121.js +18 -12
- package/dist/index122.cjs +1 -1
- package/dist/index123.js +42 -28
- package/dist/index124.cjs +1 -1
- package/dist/index126.js +86 -57
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +30 -17
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +42 -27
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +31 -18
- package/dist/index130.cjs +1 -1
- package/dist/index132.js +50 -23
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +28 -14
- package/dist/index134.cjs +1 -1
- package/dist/index135.js +147 -99
- package/dist/index136.cjs +1 -1
- package/dist/index138.js +242 -170
- package/dist/index139.cjs +1 -1
- package/dist/index14.js +9 -5
- package/dist/index141.js +21 -10
- package/dist/index142.cjs +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index18.js +32 -16
- package/dist/index186.js +57 -44
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +56 -48
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +16 -12
- package/dist/index189.cjs +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index191.js +36 -23
- package/dist/index192.cjs +1 -1
- package/dist/index197.js +18 -15
- package/dist/index198.cjs +1 -1
- package/dist/index20.js +79 -41
- package/dist/index200.js +49 -33
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +20 -11
- package/dist/index202.cjs +1 -1
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +30 -23
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +75 -39
- package/dist/index23.cjs +1 -1
- package/dist/index26.js +39 -28
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +20 -12
- package/dist/index28.cjs +1 -1
- package/dist/index33.js +23 -13
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +87 -49
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +86 -45
- package/dist/index36.cjs +1 -1
- package/dist/index4.js +49 -26
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +34 -18
- package/dist/index6.cjs +1 -1
- package/dist/index75.js +142 -77
- package/dist/index76.cjs +1 -1
- package/dist/index77.js +96 -49
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +137 -77
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +13 -7
- package/dist/index80.cjs +1 -1
- package/dist/index81.js +130 -63
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +201 -158
- package/dist/index83.cjs +1 -1
- package/dist/index84.js +97 -59
- package/dist/index85.cjs +1 -1
- package/dist/index86.js +17 -10
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +13 -7
- package/dist/index88.cjs +1 -1
- package/dist/index89.js +54 -28
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +94 -53
- package/dist/index91.cjs +1 -1
- package/dist/index92.js +156 -89
- package/dist/index93.cjs +1 -1
- package/dist/index96.js +89 -47
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +78 -43
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +27 -17
- package/dist/index99.cjs +1 -1
- package/package.json +1 -1
package/dist/index138.js
CHANGED
|
@@ -7,215 +7,287 @@ import { isGroupedOptions as d } from "./index137.js";
|
|
|
7
7
|
import { CheckIcon as f, ChevronDown as p, XCircle as m, XIcon as h } from "lucide-react";
|
|
8
8
|
import "react";
|
|
9
9
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
10
|
+
import { c as y } from "react/compiler-runtime";
|
|
10
11
|
//#region src/MultiSelect/renderers.tsx
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var b = (e) => {
|
|
13
|
+
let t = y(7), { politeMessage: n, assertiveMessage: r } = e, i;
|
|
14
|
+
t[0] === n ? i = t[1] : (i = /* @__PURE__ */ _("div", {
|
|
14
15
|
"aria-live": "polite",
|
|
15
16
|
"aria-atomic": "true",
|
|
16
17
|
role: "status",
|
|
17
|
-
children:
|
|
18
|
-
}),
|
|
18
|
+
children: n
|
|
19
|
+
}), t[0] = n, t[1] = i);
|
|
20
|
+
let a;
|
|
21
|
+
t[2] === r ? a = t[3] : (a = /* @__PURE__ */ _("div", {
|
|
19
22
|
"aria-live": "assertive",
|
|
20
23
|
"aria-atomic": "true",
|
|
21
24
|
role: "alert",
|
|
22
|
-
children:
|
|
23
|
-
})]
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
children: r
|
|
26
|
+
}), t[2] = r, t[3] = a);
|
|
27
|
+
let o;
|
|
28
|
+
return t[4] !== i || t[5] !== a ? (o = /* @__PURE__ */ v("div", {
|
|
29
|
+
className: "sr-only",
|
|
30
|
+
children: [i, a]
|
|
31
|
+
}), t[4] = i, t[5] = a, t[6] = o) : o = t[6], o;
|
|
32
|
+
}, x = (n) => {
|
|
33
|
+
let r = y(62), { selectedValues: i, responsiveSettings: a, screenSize: o, singleLine: s, animation: c, animationConfig: d, badgeAnimationClass: f, variant: g, getOptionByValue: b, toggleOption: x, clearExtraOptions: S, handleClear: C } = n, w = s ? "overflow-x-auto multiselect-singleline-scroll" : "flex-wrap", T = a.compactMode && "gap-0.5", E;
|
|
34
|
+
r[0] !== w || r[1] !== T ? (E = e("flex items-center gap-1", w, T), r[0] = w, r[1] = T, r[2] = E) : E = r[2];
|
|
35
|
+
let D;
|
|
36
|
+
r[3] === s ? D = r[4] : (D = s ? { paddingBottom: "4px" } : {}, r[3] = s, r[4] = D);
|
|
37
|
+
let O;
|
|
38
|
+
if (r[5] !== c || r[6] !== d?.delay || r[7] !== d?.duration || r[8] !== f || r[9] !== b || r[10] !== a.compactMode || r[11] !== a.hideIcons || r[12] !== a.maxCount || r[13] !== o || r[14] !== i || r[15] !== s || r[16] !== x || r[17] !== g) {
|
|
39
|
+
let n;
|
|
40
|
+
r[19] !== c || r[20] !== d?.delay || r[21] !== d?.duration || r[22] !== f || r[23] !== b || r[24] !== a.compactMode || r[25] !== a.hideIcons || r[26] !== o || r[27] !== s || r[28] !== x || r[29] !== g ? (n = (n) => {
|
|
41
|
+
let r = b(n), i = r?.icon, l = r?.style;
|
|
42
|
+
if (!r) return null;
|
|
43
|
+
let p = {
|
|
44
|
+
animationDuration: `${c}s`,
|
|
45
|
+
...l?.badgeColor && { backgroundColor: l.badgeColor },
|
|
46
|
+
...l?.gradient && {
|
|
47
|
+
background: l.gradient,
|
|
37
48
|
color: "white"
|
|
38
49
|
}
|
|
39
50
|
};
|
|
40
51
|
return /* @__PURE__ */ v(t, {
|
|
41
|
-
className: e(
|
|
52
|
+
className: e(f, u({ variant: g }), l?.gradient && "text-white border-transparent", a.compactMode && "text-xs px-1.5 py-0.5", o === "mobile" && "max-w-30 truncate", s && "shrink-0 whitespace-nowrap", "[&>svg]:pointer-events-auto"),
|
|
42
53
|
style: {
|
|
43
|
-
...
|
|
44
|
-
animationDuration: `${
|
|
45
|
-
animationDelay: `${
|
|
54
|
+
...p,
|
|
55
|
+
animationDuration: `${d?.duration || c}s`,
|
|
56
|
+
animationDelay: `${d?.delay || 0}s`
|
|
46
57
|
},
|
|
47
58
|
children: [
|
|
48
|
-
|
|
49
|
-
className: e("h-4 w-4 mr-2",
|
|
50
|
-
...
|
|
59
|
+
i && !a.hideIcons && /* @__PURE__ */ _(i, {
|
|
60
|
+
className: e("h-4 w-4 mr-2", a.compactMode && "h-3 w-3 mr-1", l?.iconColor && "text-current"),
|
|
61
|
+
...l?.iconColor && { style: { color: l.iconColor } }
|
|
51
62
|
}),
|
|
52
63
|
/* @__PURE__ */ _("span", {
|
|
53
|
-
className: e(
|
|
54
|
-
children:
|
|
64
|
+
className: e(o === "mobile" && "truncate"),
|
|
65
|
+
children: r.label
|
|
55
66
|
}),
|
|
56
67
|
/* @__PURE__ */ _("div", {
|
|
57
68
|
role: "button",
|
|
58
69
|
tabIndex: 0,
|
|
59
70
|
onClick: (e) => {
|
|
60
|
-
e.stopPropagation(),
|
|
71
|
+
e.stopPropagation(), x(n);
|
|
61
72
|
},
|
|
62
73
|
onKeyDown: (e) => {
|
|
63
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(),
|
|
74
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), x(n));
|
|
64
75
|
},
|
|
65
|
-
"aria-label": `Remove ${
|
|
76
|
+
"aria-label": `Remove ${r.label} from selection`,
|
|
66
77
|
className: "ml-2 h-4 w-4 cursor-pointer hover:bg-white/20 rounded-sm p-0.5 -m-0.5 focus:outline-none focus:ring-1 focus:ring-white/50",
|
|
67
|
-
children: /* @__PURE__ */ _(m, { className: e("h-3 w-3",
|
|
78
|
+
children: /* @__PURE__ */ _(m, { className: e("h-3 w-3", a.compactMode && "h-2.5 w-2.5") })
|
|
68
79
|
})
|
|
69
80
|
]
|
|
70
81
|
}, n);
|
|
71
|
-
}).filter(Boolean),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
}, r[19] = c, r[20] = d?.delay, r[21] = d?.duration, r[22] = f, r[23] = b, r[24] = a.compactMode, r[25] = a.hideIcons, r[26] = o, r[27] = s, r[28] = x, r[29] = g, r[30] = n) : n = r[30], O = i.slice(0, a.maxCount).map(n).filter(Boolean), r[5] = c, r[6] = d?.delay, r[7] = d?.duration, r[8] = f, r[9] = b, r[10] = a.compactMode, r[11] = a.hideIcons, r[12] = a.maxCount, r[13] = o, r[14] = i, r[15] = s, r[16] = x, r[17] = g, r[18] = O;
|
|
83
|
+
} else O = r[18];
|
|
84
|
+
let k;
|
|
85
|
+
r[31] !== c || r[32] !== d?.delay || r[33] !== d?.duration || r[34] !== f || r[35] !== S || r[36] !== a.compactMode || r[37] !== a.maxCount || r[38] !== i.length || r[39] !== s || r[40] !== g ? (k = i.length > a.maxCount && /* @__PURE__ */ v(t, {
|
|
86
|
+
className: e("bg-transparent text-foreground border-foreground/1 hover:bg-transparent", f, u({ variant: g }), a.compactMode && "text-xs px-1.5 py-0.5", s && "shrink-0 whitespace-nowrap", "[&>svg]:pointer-events-auto"),
|
|
87
|
+
style: {
|
|
88
|
+
animationDuration: `${d?.duration || c}s`,
|
|
89
|
+
animationDelay: `${d?.delay || 0}s`
|
|
90
|
+
},
|
|
91
|
+
children: [`+ ${i.length - a.maxCount} more`, /* @__PURE__ */ _(m, {
|
|
92
|
+
className: e("ml-2 h-4 w-4 cursor-pointer", a.compactMode && "ml-1 h-3 w-3"),
|
|
93
|
+
onClick: (e) => {
|
|
94
|
+
e.stopPropagation(), S();
|
|
95
|
+
}
|
|
83
96
|
})]
|
|
84
|
-
}),
|
|
97
|
+
}), r[31] = c, r[32] = d?.delay, r[33] = d?.duration, r[34] = f, r[35] = S, r[36] = a.compactMode, r[37] = a.maxCount, r[38] = i.length, r[39] = s, r[40] = g, r[41] = k) : k = r[41];
|
|
98
|
+
let A;
|
|
99
|
+
r[42] !== E || r[43] !== D || r[44] !== O || r[45] !== k ? (A = /* @__PURE__ */ v("div", {
|
|
100
|
+
className: E,
|
|
101
|
+
style: D,
|
|
102
|
+
children: [O, k]
|
|
103
|
+
}), r[42] = E, r[43] = D, r[44] = O, r[45] = k, r[46] = A) : A = r[46];
|
|
104
|
+
let j, M;
|
|
105
|
+
r[47] === C ? (j = r[48], M = r[49]) : (j = (e) => {
|
|
106
|
+
e.stopPropagation(), C();
|
|
107
|
+
}, M = (e) => {
|
|
108
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), C());
|
|
109
|
+
}, r[47] = C, r[48] = j, r[49] = M);
|
|
110
|
+
let N = `Clear all ${i.length} selected options`, P;
|
|
111
|
+
r[50] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ _(h, { className: "h-4 w-4" }), r[50] = P) : P = r[50];
|
|
112
|
+
let F;
|
|
113
|
+
r[51] !== N || r[52] !== j || r[53] !== M ? (F = /* @__PURE__ */ _("div", {
|
|
114
|
+
role: "button",
|
|
115
|
+
tabIndex: 0,
|
|
116
|
+
onClick: j,
|
|
117
|
+
onKeyDown: M,
|
|
118
|
+
"aria-label": N,
|
|
119
|
+
className: "flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 rounded-sm",
|
|
120
|
+
children: P
|
|
121
|
+
}), r[51] = N, r[52] = j, r[53] = M, r[54] = F) : F = r[54];
|
|
122
|
+
let I, L;
|
|
123
|
+
r[55] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ _(l, {
|
|
124
|
+
orientation: "vertical",
|
|
125
|
+
className: "flex min-h-6 h-full"
|
|
126
|
+
}), L = /* @__PURE__ */ _(p, {
|
|
127
|
+
className: "h-4 mx-2 cursor-pointer text-muted-foreground",
|
|
128
|
+
"aria-hidden": "true"
|
|
129
|
+
}), r[55] = I, r[56] = L) : (I = r[55], L = r[56]);
|
|
130
|
+
let R;
|
|
131
|
+
r[57] === F ? R = r[58] : (R = /* @__PURE__ */ v("div", {
|
|
85
132
|
className: "flex items-center justify-between",
|
|
86
133
|
children: [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
onClick: (e) => {
|
|
91
|
-
e.stopPropagation(), b();
|
|
92
|
-
},
|
|
93
|
-
onKeyDown: (e) => {
|
|
94
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), b());
|
|
95
|
-
},
|
|
96
|
-
"aria-label": `Clear all ${n.length} selected options`,
|
|
97
|
-
className: "flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 rounded-sm",
|
|
98
|
-
children: /* @__PURE__ */ _(h, { className: "h-4 w-4" })
|
|
99
|
-
}),
|
|
100
|
-
/* @__PURE__ */ _(l, {
|
|
101
|
-
orientation: "vertical",
|
|
102
|
-
className: "flex min-h-6 h-full"
|
|
103
|
-
}),
|
|
104
|
-
/* @__PURE__ */ _(p, {
|
|
105
|
-
className: "h-4 mx-2 cursor-pointer text-muted-foreground",
|
|
106
|
-
"aria-hidden": "true"
|
|
107
|
-
})
|
|
134
|
+
F,
|
|
135
|
+
I,
|
|
136
|
+
L
|
|
108
137
|
]
|
|
109
|
-
})]
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
138
|
+
}), r[57] = F, r[58] = R);
|
|
139
|
+
let z;
|
|
140
|
+
return r[59] !== R || r[60] !== A ? (z = /* @__PURE__ */ v("div", {
|
|
141
|
+
className: "flex justify-between items-center w-full",
|
|
142
|
+
children: [A, R]
|
|
143
|
+
}), r[59] = R, r[60] = A, r[61] = z) : z = r[61], z;
|
|
144
|
+
}, S = (e) => {
|
|
145
|
+
let t = y(5), { placeholder: n } = e, r;
|
|
146
|
+
t[0] === n ? r = t[1] : (r = /* @__PURE__ */ _("span", {
|
|
113
147
|
className: "text-sm text-muted-foreground mx-3",
|
|
114
|
-
children:
|
|
115
|
-
}),
|
|
116
|
-
|
|
117
|
-
|
|
148
|
+
children: n
|
|
149
|
+
}), t[0] = n, t[1] = r);
|
|
150
|
+
let i;
|
|
151
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ _(p, { className: "h-4 cursor-pointer text-muted-foreground mx-2" }), t[2] = i) : i = t[2];
|
|
152
|
+
let a;
|
|
153
|
+
return t[3] === r ? a = t[4] : (a = /* @__PURE__ */ v("div", {
|
|
154
|
+
className: "flex items-center justify-between w-full mx-auto",
|
|
155
|
+
children: [r, i]
|
|
156
|
+
}), t[3] = r, t[4] = a), a;
|
|
157
|
+
}, C = (t) => {
|
|
158
|
+
let u = y(42), { filteredOptions: p, hideSelectAll: m, searchValue: h, searchable: b, selectedValues: x, getAllOptions: S, toggleAll: C, toggleOption: E, handleClear: D, setIsPopoverOpen: O, handleInputKeyDown: k, setSearchValue: A, multiSelectId: j, emptyIndicator: M, screenSize: N } = t, P;
|
|
159
|
+
u[0] !== k || u[1] !== j || u[2] !== h || u[3] !== b || u[4] !== A ? (P = b && /* @__PURE__ */ _(a, {
|
|
118
160
|
placeholder: "Search options...",
|
|
119
|
-
onKeyDown:
|
|
120
|
-
value:
|
|
121
|
-
onValueChange:
|
|
161
|
+
onKeyDown: k,
|
|
162
|
+
value: h,
|
|
163
|
+
onValueChange: A,
|
|
122
164
|
"aria-label": "Search through available options",
|
|
123
|
-
"aria-describedby": `${
|
|
124
|
-
}),
|
|
125
|
-
|
|
126
|
-
|
|
165
|
+
"aria-describedby": `${j}-search-help`
|
|
166
|
+
}), u[0] = k, u[1] = j, u[2] = h, u[3] = b, u[4] = A, u[5] = P) : P = u[5];
|
|
167
|
+
let F;
|
|
168
|
+
u[6] !== j || u[7] !== b ? (F = b && /* @__PURE__ */ _("div", {
|
|
169
|
+
id: `${j}-search-help`,
|
|
127
170
|
className: "sr-only",
|
|
128
171
|
children: "Type to filter options. Use arrow keys to navigate results."
|
|
129
|
-
}),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
172
|
+
}), u[6] = j, u[7] = b, u[8] = F) : F = u[8];
|
|
173
|
+
let I = N === "mobile" && "max-h-[50vh]", L;
|
|
174
|
+
u[9] === I ? L = u[10] : (L = e("max-h-[40vh] overflow-y-auto multiselect-scrollbar", I, "overscroll-behavior-y-contain"), u[9] = I, u[10] = L);
|
|
175
|
+
let R = M || "No results found.", z;
|
|
176
|
+
u[11] === R ? z = u[12] : (z = /* @__PURE__ */ _(r, { children: R }), u[11] = R, u[12] = z);
|
|
177
|
+
let B;
|
|
178
|
+
u[13] !== S || u[14] !== m || u[15] !== h || u[16] !== x.length || u[17] !== C ? (B = !m && !h && /* @__PURE__ */ _(i, { children: /* @__PURE__ */ v(o, {
|
|
179
|
+
onSelect: C,
|
|
180
|
+
role: "option",
|
|
181
|
+
"aria-selected": x.length === S().filter(w).length,
|
|
182
|
+
"aria-label": `Select all ${S().length} options`,
|
|
183
|
+
className: "cursor-pointer",
|
|
184
|
+
children: [/* @__PURE__ */ _("div", {
|
|
185
|
+
className: e("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", x.length === S().filter(T).length ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
|
|
186
|
+
"aria-hidden": "true",
|
|
187
|
+
children: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
|
|
188
|
+
}), /* @__PURE__ */ v("span", { children: [
|
|
189
|
+
"(Select All",
|
|
190
|
+
S().length > 20 ? ` - ${S().length} options` : "",
|
|
191
|
+
")"
|
|
192
|
+
] })]
|
|
193
|
+
}, "all") }), u[13] = S, u[14] = m, u[15] = h, u[16] = x.length, u[17] = C, u[18] = B) : B = u[18];
|
|
194
|
+
let V;
|
|
195
|
+
u[19] !== p || u[20] !== x || u[21] !== E ? (V = d(p) ? p.map((t) => /* @__PURE__ */ _(i, {
|
|
196
|
+
heading: t.heading,
|
|
197
|
+
children: t.options.map((t) => {
|
|
198
|
+
let n = x.includes(t.value);
|
|
199
|
+
return /* @__PURE__ */ v(o, {
|
|
200
|
+
onSelect: () => E(t.value),
|
|
137
201
|
role: "option",
|
|
138
|
-
"aria-selected":
|
|
139
|
-
"aria-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
202
|
+
"aria-selected": n,
|
|
203
|
+
"aria-disabled": t.disabled,
|
|
204
|
+
"aria-label": `${t.label}${n ? ", selected" : ", not selected"}${t.disabled ? ", disabled" : ""}`,
|
|
205
|
+
className: e("cursor-pointer", t.disabled && "opacity-50 cursor-not-allowed"),
|
|
206
|
+
disabled: t.disabled,
|
|
207
|
+
children: [
|
|
208
|
+
/* @__PURE__ */ _("div", {
|
|
209
|
+
className: e("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", n ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
|
|
210
|
+
"aria-hidden": "true",
|
|
211
|
+
children: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
|
|
212
|
+
}),
|
|
213
|
+
t.icon && /* @__PURE__ */ _(t.icon, {
|
|
214
|
+
className: "mr-2 h-4 w-4 text-muted-foreground",
|
|
215
|
+
"aria-hidden": "true"
|
|
216
|
+
}),
|
|
217
|
+
/* @__PURE__ */ _("span", { children: t.label })
|
|
218
|
+
]
|
|
219
|
+
}, t.value);
|
|
220
|
+
})
|
|
221
|
+
}, t.heading)) : /* @__PURE__ */ _(i, { children: p.map((t) => {
|
|
222
|
+
let n = x.includes(t.value);
|
|
223
|
+
return /* @__PURE__ */ v(o, {
|
|
224
|
+
onSelect: () => E(t.value),
|
|
225
|
+
role: "option",
|
|
226
|
+
"aria-selected": n,
|
|
227
|
+
"aria-disabled": t.disabled,
|
|
228
|
+
"aria-label": `${t.label}${n ? ", selected" : ", not selected"}${t.disabled ? ", disabled" : ""}`,
|
|
229
|
+
className: e("cursor-pointer", t.disabled && "opacity-50 cursor-not-allowed"),
|
|
230
|
+
disabled: t.disabled,
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ _("div", {
|
|
233
|
+
className: e("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", n ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
|
|
143
234
|
"aria-hidden": "true",
|
|
144
235
|
children: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
|
|
145
|
-
}),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
disabled: t.disabled,
|
|
187
|
-
children: [
|
|
188
|
-
/* @__PURE__ */ _("div", {
|
|
189
|
-
className: e("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", n ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
|
|
190
|
-
"aria-hidden": "true",
|
|
191
|
-
children: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
|
|
192
|
-
}),
|
|
193
|
-
t.icon && /* @__PURE__ */ _(t.icon, {
|
|
194
|
-
className: "mr-2 h-4 w-4 text-muted-foreground",
|
|
195
|
-
"aria-hidden": "true"
|
|
196
|
-
}),
|
|
197
|
-
/* @__PURE__ */ _("span", { children: t.label })
|
|
198
|
-
]
|
|
199
|
-
}, t.value);
|
|
200
|
-
}) }),
|
|
201
|
-
/* @__PURE__ */ _(c, {}),
|
|
202
|
-
/* @__PURE__ */ _(i, { children: /* @__PURE__ */ v("div", {
|
|
203
|
-
className: "flex items-center justify-between",
|
|
204
|
-
children: [h.length > 0 && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(o, {
|
|
205
|
-
onSelect: S,
|
|
206
|
-
className: "flex-1 justify-center cursor-pointer",
|
|
207
|
-
children: "Clear"
|
|
208
|
-
}), /* @__PURE__ */ _(l, {
|
|
209
|
-
orientation: "vertical",
|
|
210
|
-
className: "flex min-h-6 h-full"
|
|
211
|
-
})] }), /* @__PURE__ */ _(o, {
|
|
212
|
-
onSelect: () => C(!1),
|
|
213
|
-
className: "flex-1 justify-center cursor-pointer max-w-full",
|
|
214
|
-
children: "Close"
|
|
215
|
-
})]
|
|
216
|
-
}) })
|
|
236
|
+
}),
|
|
237
|
+
t.icon && /* @__PURE__ */ _(t.icon, {
|
|
238
|
+
className: "mr-2 h-4 w-4 text-muted-foreground",
|
|
239
|
+
"aria-hidden": "true"
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ _("span", { children: t.label })
|
|
242
|
+
]
|
|
243
|
+
}, t.value);
|
|
244
|
+
}) }), u[19] = p, u[20] = x, u[21] = E, u[22] = V) : V = u[22];
|
|
245
|
+
let H;
|
|
246
|
+
u[23] === Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ _(c, {}), u[23] = H) : H = u[23];
|
|
247
|
+
let U;
|
|
248
|
+
u[24] !== D || u[25] !== x.length ? (U = x.length > 0 && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(o, {
|
|
249
|
+
onSelect: D,
|
|
250
|
+
className: "flex-1 justify-center cursor-pointer",
|
|
251
|
+
children: "Clear"
|
|
252
|
+
}), /* @__PURE__ */ _(l, {
|
|
253
|
+
orientation: "vertical",
|
|
254
|
+
className: "flex min-h-6 h-full"
|
|
255
|
+
})] }), u[24] = D, u[25] = x.length, u[26] = U) : U = u[26];
|
|
256
|
+
let W;
|
|
257
|
+
u[27] === O ? W = u[28] : (W = /* @__PURE__ */ _(o, {
|
|
258
|
+
onSelect: () => O(!1),
|
|
259
|
+
className: "flex-1 justify-center cursor-pointer max-w-full",
|
|
260
|
+
children: "Close"
|
|
261
|
+
}), u[27] = O, u[28] = W);
|
|
262
|
+
let G;
|
|
263
|
+
u[29] !== U || u[30] !== W ? (G = /* @__PURE__ */ _(i, { children: /* @__PURE__ */ v("div", {
|
|
264
|
+
className: "flex items-center justify-between",
|
|
265
|
+
children: [U, W]
|
|
266
|
+
}) }), u[29] = U, u[30] = W, u[31] = G) : G = u[31];
|
|
267
|
+
let K;
|
|
268
|
+
u[32] !== G || u[33] !== L || u[34] !== z || u[35] !== B || u[36] !== V ? (K = /* @__PURE__ */ v(s, {
|
|
269
|
+
className: L,
|
|
270
|
+
children: [
|
|
271
|
+
z,
|
|
272
|
+
" ",
|
|
273
|
+
B,
|
|
274
|
+
V,
|
|
275
|
+
H,
|
|
276
|
+
G
|
|
217
277
|
]
|
|
218
|
-
})
|
|
219
|
-
|
|
278
|
+
}), u[32] = G, u[33] = L, u[34] = z, u[35] = B, u[36] = V, u[37] = K) : K = u[37];
|
|
279
|
+
let q;
|
|
280
|
+
return u[38] !== P || u[39] !== K || u[40] !== F ? (q = /* @__PURE__ */ v(n, { children: [
|
|
281
|
+
P,
|
|
282
|
+
F,
|
|
283
|
+
K
|
|
284
|
+
] }), u[38] = P, u[39] = K, u[40] = F, u[41] = q) : q = u[41], q;
|
|
285
|
+
};
|
|
286
|
+
function w(e) {
|
|
287
|
+
return !e.disabled;
|
|
288
|
+
}
|
|
289
|
+
function T(e) {
|
|
290
|
+
return !e.disabled;
|
|
291
|
+
}
|
|
220
292
|
//#endregion
|
|
221
|
-
export {
|
|
293
|
+
export { b as LiveRegion, C as OptionsContent, S as PlaceholderContent, x as SelectedValuesContent };
|
package/dist/index139.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./index4.cjs"),t=require("./index20.cjs"),n=require("./index36.cjs"),r=require("./index81.cjs"),i=require("./index137.cjs"),a=require("./index138.cjs");let o=require("lucide-react");require("react");let s=require("react/jsx-runtime");var c=({politeMessage:e,assertiveMessage:t})=>(0,s.jsxs)(`div`,{className:`sr-only`,children:[(0,s.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,role:`status`,children:e}),(0,s.jsx)(`div`,{"aria-live":`assertive`,"aria-atomic":`true`,role:`alert`,children:t})]}),l=({selectedValues:n,responsiveSettings:a,screenSize:c,singleLine:l,animation:u,animationConfig:d,badgeAnimationClass:f,variant:p,getOptionByValue:m,toggleOption:h,clearExtraOptions:g,handleClear:_})=>(0,s.jsxs)(`div`,{className:`flex justify-between items-center w-full`,children:[(0,s.jsxs)(`div`,{className:e.cn(`flex items-center gap-1`,l?`overflow-x-auto multiselect-singleline-scroll`:`flex-wrap`,a.compactMode&&`gap-0.5`),style:l?{paddingBottom:`4px`}:{},children:[n.slice(0,a.maxCount).map(n=>{let r=m(n),g=r?.icon,_=r?.style;if(!r)return null;let v={animationDuration:`${u}s`,..._?.badgeColor&&{backgroundColor:_.badgeColor},..._?.gradient&&{background:_.gradient,color:`white`}};return(0,s.jsxs)(t.Badge,{className:e.cn(f,i.multiSelectVariants({variant:p}),_?.gradient&&`text-white border-transparent`,a.compactMode&&`text-xs px-1.5 py-0.5`,c===`mobile`&&`max-w-30 truncate`,l&&`shrink-0 whitespace-nowrap`,`[&>svg]:pointer-events-auto`),style:{...v,animationDuration:`${d?.duration||u}s`,animationDelay:`${d?.delay||0}s`},children:[g&&!a.hideIcons&&(0,s.jsx)(g,{className:e.cn(`h-4 w-4 mr-2`,a.compactMode&&`h-3 w-3 mr-1`,_?.iconColor&&`text-current`),..._?.iconColor&&{style:{color:_.iconColor}}}),(0,s.jsx)(`span`,{className:e.cn(c===`mobile`&&`truncate`),children:r.label}),(0,s.jsx)(`div`,{role:`button`,tabIndex:0,onClick:e=>{e.stopPropagation(),h(n)},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),h(n))},"aria-label":`Remove ${r.label} from selection`,className:`ml-2 h-4 w-4 cursor-pointer hover:bg-white/20 rounded-sm p-0.5 -m-0.5 focus:outline-none focus:ring-1 focus:ring-white/50`,children:(0,s.jsx)(o.XCircle,{className:e.cn(`h-3 w-3`,a.compactMode&&`h-2.5 w-2.5`)})})]},n)}).filter(Boolean),n.length>a.maxCount&&(0,s.jsxs)(t.Badge,{className:e.cn(`bg-transparent text-foreground border-foreground/1 hover:bg-transparent`,f,i.multiSelectVariants({variant:p}),a.compactMode&&`text-xs px-1.5 py-0.5`,l&&`shrink-0 whitespace-nowrap`,`[&>svg]:pointer-events-auto`),style:{animationDuration:`${d?.duration||u}s`,animationDelay:`${d?.delay||0}s`},children:[`+ ${n.length-a.maxCount} more`,(0,s.jsx)(o.XCircle,{className:e.cn(`ml-2 h-4 w-4 cursor-pointer`,a.compactMode&&`ml-1 h-3 w-3`),onClick:e=>{e.stopPropagation(),g()}})]})]}),(0,s.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,s.jsx)(`div`,{role:`button`,tabIndex:0,onClick:e=>{e.stopPropagation(),_()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),_())},"aria-label":`Clear all ${n.length} selected options`,className:`flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 rounded-sm`,children:(0,s.jsx)(o.XIcon,{className:`h-4 w-4`})}),(0,s.jsx)(r.Separator,{orientation:`vertical`,className:`flex min-h-6 h-full`}),(0,s.jsx)(o.ChevronDown,{className:`h-4 mx-2 cursor-pointer text-muted-foreground`,"aria-hidden":`true`})]})]}),u=({placeholder:e})=>(0,s.jsxs)(`div`,{className:`flex items-center justify-between w-full mx-auto`,children:[(0,s.jsx)(`span`,{className:`text-sm text-muted-foreground mx-3`,children:e}),(0,s.jsx)(o.ChevronDown,{className:`h-4 cursor-pointer text-muted-foreground mx-2`})]}),d=({filteredOptions:t,hideSelectAll:i,searchValue:c,searchable:l,selectedValues:u,getAllOptions:d,toggleAll:f,toggleOption:p,handleClear:m,setIsPopoverOpen:h,handleInputKeyDown:g,setSearchValue:_,multiSelectId:v,emptyIndicator:y,screenSize:b})=>(0,s.jsxs)(n.Command,{children:[l&&(0,s.jsx)(n.CommandInput,{placeholder:`Search options...`,onKeyDown:g,value:c,onValueChange:_,"aria-label":`Search through available options`,"aria-describedby":`${v}-search-help`}),l&&(0,s.jsx)(`div`,{id:`${v}-search-help`,className:`sr-only`,children:`Type to filter options. Use arrow keys to navigate results.`}),(0,s.jsxs)(n.CommandList,{className:e.cn(`max-h-[40vh] overflow-y-auto multiselect-scrollbar`,b===`mobile`&&`max-h-[50vh]`,`overscroll-behavior-y-contain`),children:[(0,s.jsx)(n.CommandEmpty,{children:y||`No results found.`}),` `,!i&&!c&&(0,s.jsx)(n.CommandGroup,{children:(0,s.jsxs)(n.CommandItem,{onSelect:f,role:`option`,"aria-selected":u.length===d().filter(e=>!e.disabled).length,"aria-label":`Select all ${d().length} options`,className:`cursor-pointer`,children:[(0,s.jsx)(`div`,{className:e.cn(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,u.length===d().filter(e=>!e.disabled).length?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),"aria-hidden":`true`,children:(0,s.jsx)(o.CheckIcon,{className:`h-4 w-4`})}),(0,s.jsxs)(`span`,{children:[`(Select All`,d().length>20?` - ${d().length} options`:``,`)`]})]},`all`)}),a.isGroupedOptions(t)?t.map(t=>(0,s.jsx)(n.CommandGroup,{heading:t.heading,children:t.options.map(t=>{let r=u.includes(t.value);return(0,s.jsxs)(n.CommandItem,{onSelect:()=>p(t.value),role:`option`,"aria-selected":r,"aria-disabled":t.disabled,"aria-label":`${t.label}${r?`, selected`:`, not selected`}${t.disabled?`, disabled`:``}`,className:e.cn(`cursor-pointer`,t.disabled&&`opacity-50 cursor-not-allowed`),disabled:t.disabled,children:[(0,s.jsx)(`div`,{className:e.cn(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,r?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),"aria-hidden":`true`,children:(0,s.jsx)(o.CheckIcon,{className:`h-4 w-4`})}),t.icon&&(0,s.jsx)(t.icon,{className:`mr-2 h-4 w-4 text-muted-foreground`,"aria-hidden":`true`}),(0,s.jsx)(`span`,{children:t.label})]},t.value)})},t.heading)):(0,s.jsx)(n.CommandGroup,{children:t.map(t=>{let r=u.includes(t.value);return(0,s.jsxs)(n.CommandItem,{onSelect:()=>p(t.value),role:`option`,"aria-selected":r,"aria-disabled":t.disabled,"aria-label":`${t.label}${r?`, selected`:`, not selected`}${t.disabled?`, disabled`:``}`,className:e.cn(`cursor-pointer`,t.disabled&&`opacity-50 cursor-not-allowed`),disabled:t.disabled,children:[(0,s.jsx)(`div`,{className:e.cn(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,r?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),"aria-hidden":`true`,children:(0,s.jsx)(o.CheckIcon,{className:`h-4 w-4`})}),t.icon&&(0,s.jsx)(t.icon,{className:`mr-2 h-4 w-4 text-muted-foreground`,"aria-hidden":`true`}),(0,s.jsx)(`span`,{children:t.label})]},t.value)})}),(0,s.jsx)(n.CommandSeparator,{}),(0,s.jsx)(n.CommandGroup,{children:(0,s.jsxs)(`div`,{className:`flex items-center justify-between`,children:[u.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.CommandItem,{onSelect:m,className:`flex-1 justify-center cursor-pointer`,children:`Clear`}),(0,s.jsx)(r.Separator,{orientation:`vertical`,className:`flex min-h-6 h-full`})]}),(0,s.jsx)(n.CommandItem,{onSelect:()=>h(!1),className:`flex-1 justify-center cursor-pointer max-w-full`,children:`Close`})]})})]})]});exports.LiveRegion=c,exports.OptionsContent=d,exports.PlaceholderContent=u,exports.SelectedValuesContent=l;
|
|
1
|
+
const e=require("./index4.cjs"),t=require("./index20.cjs"),n=require("./index36.cjs"),r=require("./index81.cjs"),i=require("./index137.cjs"),a=require("./index138.cjs");let o=require("lucide-react");require("react");let s=require("react/jsx-runtime"),c=require("react/compiler-runtime");var l=e=>{let t=(0,c.c)(7),{politeMessage:n,assertiveMessage:r}=e,i;t[0]===n?i=t[1]:(i=(0,s.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,role:`status`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,s.jsx)(`div`,{"aria-live":`assertive`,"aria-atomic":`true`,role:`alert`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,s.jsxs)(`div`,{className:`sr-only`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o},u=n=>{let a=(0,c.c)(62),{selectedValues:l,responsiveSettings:u,screenSize:d,singleLine:f,animation:p,animationConfig:m,badgeAnimationClass:h,variant:g,getOptionByValue:_,toggleOption:v,clearExtraOptions:y,handleClear:b}=n,x=f?`overflow-x-auto multiselect-singleline-scroll`:`flex-wrap`,S=u.compactMode&&`gap-0.5`,C;a[0]!==x||a[1]!==S?(C=e.cn(`flex items-center gap-1`,x,S),a[0]=x,a[1]=S,a[2]=C):C=a[2];let w;a[3]===f?w=a[4]:(w=f?{paddingBottom:`4px`}:{},a[3]=f,a[4]=w);let T;if(a[5]!==p||a[6]!==m?.delay||a[7]!==m?.duration||a[8]!==h||a[9]!==_||a[10]!==u.compactMode||a[11]!==u.hideIcons||a[12]!==u.maxCount||a[13]!==d||a[14]!==l||a[15]!==f||a[16]!==v||a[17]!==g){let n;a[19]!==p||a[20]!==m?.delay||a[21]!==m?.duration||a[22]!==h||a[23]!==_||a[24]!==u.compactMode||a[25]!==u.hideIcons||a[26]!==d||a[27]!==f||a[28]!==v||a[29]!==g?(n=n=>{let r=_(n),a=r?.icon,c=r?.style;if(!r)return null;let l={animationDuration:`${p}s`,...c?.badgeColor&&{backgroundColor:c.badgeColor},...c?.gradient&&{background:c.gradient,color:`white`}};return(0,s.jsxs)(t.Badge,{className:e.cn(h,i.multiSelectVariants({variant:g}),c?.gradient&&`text-white border-transparent`,u.compactMode&&`text-xs px-1.5 py-0.5`,d===`mobile`&&`max-w-30 truncate`,f&&`shrink-0 whitespace-nowrap`,`[&>svg]:pointer-events-auto`),style:{...l,animationDuration:`${m?.duration||p}s`,animationDelay:`${m?.delay||0}s`},children:[a&&!u.hideIcons&&(0,s.jsx)(a,{className:e.cn(`h-4 w-4 mr-2`,u.compactMode&&`h-3 w-3 mr-1`,c?.iconColor&&`text-current`),...c?.iconColor&&{style:{color:c.iconColor}}}),(0,s.jsx)(`span`,{className:e.cn(d===`mobile`&&`truncate`),children:r.label}),(0,s.jsx)(`div`,{role:`button`,tabIndex:0,onClick:e=>{e.stopPropagation(),v(n)},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),v(n))},"aria-label":`Remove ${r.label} from selection`,className:`ml-2 h-4 w-4 cursor-pointer hover:bg-white/20 rounded-sm p-0.5 -m-0.5 focus:outline-none focus:ring-1 focus:ring-white/50`,children:(0,s.jsx)(o.XCircle,{className:e.cn(`h-3 w-3`,u.compactMode&&`h-2.5 w-2.5`)})})]},n)},a[19]=p,a[20]=m?.delay,a[21]=m?.duration,a[22]=h,a[23]=_,a[24]=u.compactMode,a[25]=u.hideIcons,a[26]=d,a[27]=f,a[28]=v,a[29]=g,a[30]=n):n=a[30],T=l.slice(0,u.maxCount).map(n).filter(Boolean),a[5]=p,a[6]=m?.delay,a[7]=m?.duration,a[8]=h,a[9]=_,a[10]=u.compactMode,a[11]=u.hideIcons,a[12]=u.maxCount,a[13]=d,a[14]=l,a[15]=f,a[16]=v,a[17]=g,a[18]=T}else T=a[18];let E;a[31]!==p||a[32]!==m?.delay||a[33]!==m?.duration||a[34]!==h||a[35]!==y||a[36]!==u.compactMode||a[37]!==u.maxCount||a[38]!==l.length||a[39]!==f||a[40]!==g?(E=l.length>u.maxCount&&(0,s.jsxs)(t.Badge,{className:e.cn(`bg-transparent text-foreground border-foreground/1 hover:bg-transparent`,h,i.multiSelectVariants({variant:g}),u.compactMode&&`text-xs px-1.5 py-0.5`,f&&`shrink-0 whitespace-nowrap`,`[&>svg]:pointer-events-auto`),style:{animationDuration:`${m?.duration||p}s`,animationDelay:`${m?.delay||0}s`},children:[`+ ${l.length-u.maxCount} more`,(0,s.jsx)(o.XCircle,{className:e.cn(`ml-2 h-4 w-4 cursor-pointer`,u.compactMode&&`ml-1 h-3 w-3`),onClick:e=>{e.stopPropagation(),y()}})]}),a[31]=p,a[32]=m?.delay,a[33]=m?.duration,a[34]=h,a[35]=y,a[36]=u.compactMode,a[37]=u.maxCount,a[38]=l.length,a[39]=f,a[40]=g,a[41]=E):E=a[41];let D;a[42]!==C||a[43]!==w||a[44]!==T||a[45]!==E?(D=(0,s.jsxs)(`div`,{className:C,style:w,children:[T,E]}),a[42]=C,a[43]=w,a[44]=T,a[45]=E,a[46]=D):D=a[46];let O,k;a[47]===b?(O=a[48],k=a[49]):(O=e=>{e.stopPropagation(),b()},k=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),b())},a[47]=b,a[48]=O,a[49]=k);let A=`Clear all ${l.length} selected options`,j;a[50]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,s.jsx)(o.XIcon,{className:`h-4 w-4`}),a[50]=j):j=a[50];let M;a[51]!==A||a[52]!==O||a[53]!==k?(M=(0,s.jsx)(`div`,{role:`button`,tabIndex:0,onClick:O,onKeyDown:k,"aria-label":A,className:`flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 rounded-sm`,children:j}),a[51]=A,a[52]=O,a[53]=k,a[54]=M):M=a[54];let N,P;a[55]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,s.jsx)(r.Separator,{orientation:`vertical`,className:`flex min-h-6 h-full`}),P=(0,s.jsx)(o.ChevronDown,{className:`h-4 mx-2 cursor-pointer text-muted-foreground`,"aria-hidden":`true`}),a[55]=N,a[56]=P):(N=a[55],P=a[56]);let F;a[57]===M?F=a[58]:(F=(0,s.jsxs)(`div`,{className:`flex items-center justify-between`,children:[M,N,P]}),a[57]=M,a[58]=F);let I;return a[59]!==F||a[60]!==D?(I=(0,s.jsxs)(`div`,{className:`flex justify-between items-center w-full`,children:[D,F]}),a[59]=F,a[60]=D,a[61]=I):I=a[61],I},d=e=>{let t=(0,c.c)(5),{placeholder:n}=e,r;t[0]===n?r=t[1]:(r=(0,s.jsx)(`span`,{className:`text-sm text-muted-foreground mx-3`,children:n}),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,s.jsx)(o.ChevronDown,{className:`h-4 cursor-pointer text-muted-foreground mx-2`}),t[2]=i):i=t[2];let a;return t[3]===r?a=t[4]:(a=(0,s.jsxs)(`div`,{className:`flex items-center justify-between w-full mx-auto`,children:[r,i]}),t[3]=r,t[4]=a),a},f=t=>{let i=(0,c.c)(42),{filteredOptions:l,hideSelectAll:u,searchValue:d,searchable:f,selectedValues:h,getAllOptions:g,toggleAll:_,toggleOption:v,handleClear:y,setIsPopoverOpen:b,handleInputKeyDown:x,setSearchValue:S,multiSelectId:C,emptyIndicator:w,screenSize:T}=t,E;i[0]!==x||i[1]!==C||i[2]!==d||i[3]!==f||i[4]!==S?(E=f&&(0,s.jsx)(n.CommandInput,{placeholder:`Search options...`,onKeyDown:x,value:d,onValueChange:S,"aria-label":`Search through available options`,"aria-describedby":`${C}-search-help`}),i[0]=x,i[1]=C,i[2]=d,i[3]=f,i[4]=S,i[5]=E):E=i[5];let D;i[6]!==C||i[7]!==f?(D=f&&(0,s.jsx)(`div`,{id:`${C}-search-help`,className:`sr-only`,children:`Type to filter options. Use arrow keys to navigate results.`}),i[6]=C,i[7]=f,i[8]=D):D=i[8];let O=T===`mobile`&&`max-h-[50vh]`,k;i[9]===O?k=i[10]:(k=e.cn(`max-h-[40vh] overflow-y-auto multiselect-scrollbar`,O,`overscroll-behavior-y-contain`),i[9]=O,i[10]=k);let A=w||`No results found.`,j;i[11]===A?j=i[12]:(j=(0,s.jsx)(n.CommandEmpty,{children:A}),i[11]=A,i[12]=j);let M;i[13]!==g||i[14]!==u||i[15]!==d||i[16]!==h.length||i[17]!==_?(M=!u&&!d&&(0,s.jsx)(n.CommandGroup,{children:(0,s.jsxs)(n.CommandItem,{onSelect:_,role:`option`,"aria-selected":h.length===g().filter(p).length,"aria-label":`Select all ${g().length} options`,className:`cursor-pointer`,children:[(0,s.jsx)(`div`,{className:e.cn(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,h.length===g().filter(m).length?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),"aria-hidden":`true`,children:(0,s.jsx)(o.CheckIcon,{className:`h-4 w-4`})}),(0,s.jsxs)(`span`,{children:[`(Select All`,g().length>20?` - ${g().length} options`:``,`)`]})]},`all`)}),i[13]=g,i[14]=u,i[15]=d,i[16]=h.length,i[17]=_,i[18]=M):M=i[18];let N;i[19]!==l||i[20]!==h||i[21]!==v?(N=a.isGroupedOptions(l)?l.map(t=>(0,s.jsx)(n.CommandGroup,{heading:t.heading,children:t.options.map(t=>{let r=h.includes(t.value);return(0,s.jsxs)(n.CommandItem,{onSelect:()=>v(t.value),role:`option`,"aria-selected":r,"aria-disabled":t.disabled,"aria-label":`${t.label}${r?`, selected`:`, not selected`}${t.disabled?`, disabled`:``}`,className:e.cn(`cursor-pointer`,t.disabled&&`opacity-50 cursor-not-allowed`),disabled:t.disabled,children:[(0,s.jsx)(`div`,{className:e.cn(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,r?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),"aria-hidden":`true`,children:(0,s.jsx)(o.CheckIcon,{className:`h-4 w-4`})}),t.icon&&(0,s.jsx)(t.icon,{className:`mr-2 h-4 w-4 text-muted-foreground`,"aria-hidden":`true`}),(0,s.jsx)(`span`,{children:t.label})]},t.value)})},t.heading)):(0,s.jsx)(n.CommandGroup,{children:l.map(t=>{let r=h.includes(t.value);return(0,s.jsxs)(n.CommandItem,{onSelect:()=>v(t.value),role:`option`,"aria-selected":r,"aria-disabled":t.disabled,"aria-label":`${t.label}${r?`, selected`:`, not selected`}${t.disabled?`, disabled`:``}`,className:e.cn(`cursor-pointer`,t.disabled&&`opacity-50 cursor-not-allowed`),disabled:t.disabled,children:[(0,s.jsx)(`div`,{className:e.cn(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,r?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),"aria-hidden":`true`,children:(0,s.jsx)(o.CheckIcon,{className:`h-4 w-4`})}),t.icon&&(0,s.jsx)(t.icon,{className:`mr-2 h-4 w-4 text-muted-foreground`,"aria-hidden":`true`}),(0,s.jsx)(`span`,{children:t.label})]},t.value)})}),i[19]=l,i[20]=h,i[21]=v,i[22]=N):N=i[22];let P;i[23]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,s.jsx)(n.CommandSeparator,{}),i[23]=P):P=i[23];let F;i[24]!==y||i[25]!==h.length?(F=h.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.CommandItem,{onSelect:y,className:`flex-1 justify-center cursor-pointer`,children:`Clear`}),(0,s.jsx)(r.Separator,{orientation:`vertical`,className:`flex min-h-6 h-full`})]}),i[24]=y,i[25]=h.length,i[26]=F):F=i[26];let I;i[27]===b?I=i[28]:(I=(0,s.jsx)(n.CommandItem,{onSelect:()=>b(!1),className:`flex-1 justify-center cursor-pointer max-w-full`,children:`Close`}),i[27]=b,i[28]=I);let L;i[29]!==F||i[30]!==I?(L=(0,s.jsx)(n.CommandGroup,{children:(0,s.jsxs)(`div`,{className:`flex items-center justify-between`,children:[F,I]})}),i[29]=F,i[30]=I,i[31]=L):L=i[31];let R;i[32]!==L||i[33]!==k||i[34]!==j||i[35]!==M||i[36]!==N?(R=(0,s.jsxs)(n.CommandList,{className:k,children:[j,` `,M,N,P,L]}),i[32]=L,i[33]=k,i[34]=j,i[35]=M,i[36]=N,i[37]=R):R=i[37];let z;return i[38]!==E||i[39]!==R||i[40]!==D?(z=(0,s.jsxs)(n.Command,{children:[E,D,R]}),i[38]=E,i[39]=R,i[40]=D,i[41]=z):z=i[41],z};function p(e){return!e.disabled}function m(e){return!e.disabled}exports.LiveRegion=l,exports.OptionsContent=f,exports.PlaceholderContent=d,exports.SelectedValuesContent=u;
|
package/dist/index14.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Root as e } from "./index13.js";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { c as n } from "react/compiler-runtime";
|
|
4
5
|
//#region src/ui/aspect-ratio.tsx
|
|
5
|
-
function
|
|
6
|
-
|
|
6
|
+
function r(r) {
|
|
7
|
+
let i = n(4), a;
|
|
8
|
+
i[0] === r ? a = i[1] : ({...a} = r, i[0] = r, i[1] = a);
|
|
9
|
+
let o;
|
|
10
|
+
return i[2] === a ? o = i[3] : (o = /* @__PURE__ */ t(e, {
|
|
7
11
|
"data-slot": "aspect-ratio",
|
|
8
|
-
...
|
|
9
|
-
});
|
|
12
|
+
...a
|
|
13
|
+
}), i[2] = a, i[3] = o), o;
|
|
10
14
|
}
|
|
11
15
|
//#endregion
|
|
12
|
-
export {
|
|
16
|
+
export { r as AspectRatio };
|
package/dist/index141.js
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { FormBase as e } from "./index135.js";
|
|
2
2
|
import t from "./index140.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { c as r } from "react/compiler-runtime";
|
|
4
5
|
//#region src/Form/FormMultiSelect/FormMultiSelect.tsx
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
var i = (i) => {
|
|
7
|
+
let a = r(8), o, s;
|
|
8
|
+
a[0] === i ? (o = a[1], s = a[2]) : ({options: o, ...s} = i, a[0] = i, a[1] = o, a[2] = s);
|
|
9
|
+
let c;
|
|
10
|
+
a[3] === o ? c = a[4] : (c = (e) => {
|
|
11
|
+
let { onChange: r, value: i, ...a } = e;
|
|
12
|
+
return /* @__PURE__ */ n(t, {
|
|
13
|
+
...a,
|
|
14
|
+
options: o,
|
|
15
|
+
onValueChange: r,
|
|
16
|
+
value: i
|
|
17
|
+
});
|
|
18
|
+
}, a[3] = o, a[4] = c);
|
|
19
|
+
let l;
|
|
20
|
+
return a[5] !== s || a[6] !== c ? (l = /* @__PURE__ */ n(e, {
|
|
21
|
+
...s,
|
|
22
|
+
children: c
|
|
23
|
+
}), a[5] = s, a[6] = c, a[7] = l) : l = a[7], l;
|
|
24
|
+
};
|
|
14
25
|
//#endregion
|
|
15
|
-
export {
|
|
26
|
+
export { i as default };
|
package/dist/index142.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./index136.cjs"),t=require("./index141.cjs");let n=require("react/jsx-runtime");var
|
|
1
|
+
const e=require("./index136.cjs"),t=require("./index141.cjs");let n=require("react/jsx-runtime"),r=require("react/compiler-runtime");var i=i=>{let a=(0,r.c)(8),o,s;a[0]===i?(o=a[1],s=a[2]):({options:o,...s}=i,a[0]=i,a[1]=o,a[2]=s);let c;a[3]===o?c=a[4]:(c=e=>{let{onChange:r,value:i,...a}=e;return(0,n.jsx)(t.default,{...a,options:o,onValueChange:r,value:i})},a[3]=o,a[4]=c);let l;return a[5]!==s||a[6]!==c?(l=(0,n.jsx)(e.FormBase,{...s,children:c}),a[5]=s,a[6]=c,a[7]=l):l=a[7],l};exports.default=i;
|
package/dist/index15.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";const e=require("./index14.cjs");let t=require("react/jsx-runtime");function n({...
|
|
1
|
+
"use client";const e=require("./index14.cjs");let t=require("react/jsx-runtime"),n=require("react/compiler-runtime");function r(r){let i=(0,n.c)(4),a;i[0]===r?a=i[1]:({...a}=r,i[0]=r,i[1]=a);let o;return i[2]===a?o=i[3]:(o=(0,t.jsx)(e.Root,{"data-slot":`aspect-ratio`,...a}),i[2]=a,i[3]=o),o}exports.AspectRatio=r;
|