impact-nova 1.7.5 → 1.7.7
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/components/ui/ag-grid-react/headers/components/truncated-text.d.ts +15 -0
- package/dist/components/ui/ag-grid-react/headers/components/truncated-text.js +27 -0
- package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +22 -15
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +47 -43
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/button-group.d.ts +3 -0
- package/dist/components/ui/button-group.js +129 -78
- package/dist/components/ui/checkbox.d.ts +3 -0
- package/dist/components/ui/checkbox.js +64 -53
- package/dist/components/ui/command-palette/index.d.ts +3 -0
- package/dist/components/ui/command-palette/index.js +18 -13
- package/dist/components/ui/command-palette/shortcut-overlay-context.d.ts +23 -0
- package/dist/components/ui/command-palette/shortcut-overlay-context.js +28 -0
- package/dist/components/ui/command-palette/shortcut-overlay.d.ts +19 -0
- package/dist/components/ui/command-palette/shortcut-overlay.js +151 -0
- package/dist/components/ui/date-picker/date-range-picker.js +239 -196
- package/dist/components/ui/date-picker/month-range-picker.js +226 -183
- package/dist/components/ui/date-picker/week-range-picker.js +265 -222
- package/dist/components/ui/dialog.js +6 -6
- package/dist/components/ui/filter-panel/filter-panel.js +16 -8
- package/dist/components/ui/filter-strip/filter-strip.d.ts +1 -1
- package/dist/components/ui/filter-strip/filter-strip.js +27 -26
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +107 -43
- package/dist/components/ui/notification-panel/notification-panel.d.ts +4 -4
- package/dist/components/ui/notification-panel/notification-panel.js +78 -16
- package/dist/components/ui/radio-group.d.ts +3 -0
- package/dist/components/ui/radio-group.js +101 -52
- package/dist/components/ui/select/select.js +579 -554
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +104 -58
- package/dist/components/ui/types/filter-panel.types.d.ts +2 -0
- package/dist/components/ui/types/filter-strip.types.d.ts +5 -0
- package/dist/components/ui/types/helper-text.types.d.ts +5 -0
- package/dist/components/ui/types/select.types.d.ts +6 -0
- package/dist/icons/assets/createNewDocument.svg.js +2 -2
- package/dist/icons/assets/drawBrush.svg.js +5 -0
- package/dist/icons/assets/info-badge.svg.js +5 -0
- package/dist/icons/assets/priority-alert.svg.js +5 -0
- package/dist/icons/assets/webp/sales.webp.js +4 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +253 -245
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +194 -189
- package/package.json +1 -1
|
@@ -1,77 +1,78 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as K, useRef as
|
|
3
|
-
import * as
|
|
4
|
-
import { useVirtualizer as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { LoadingSpinner as
|
|
1
|
+
import { jsxs as x, jsx as r, Fragment as pt } from "react/jsx-runtime";
|
|
2
|
+
import { useState as K, useRef as M, useEffect as L } from "react";
|
|
3
|
+
import * as se from "@radix-ui/react-popover";
|
|
4
|
+
import { useVirtualizer as ht } from "@tanstack/react-virtual";
|
|
5
|
+
import xt from "./components/LabelWithSequence.js";
|
|
6
|
+
import gt from "./components/Submenu.js";
|
|
7
|
+
import { LoadingSpinner as bt, Cross as vt, ChevronRight as ze, Search as yt, Info as ie } from "../../../icons/index.js";
|
|
8
8
|
import { Checkbox as Ge } from "../checkbox.js";
|
|
9
|
-
import { Button as
|
|
10
|
-
import { cn as
|
|
11
|
-
import { isInvertedSelection as T, isOptionArray as
|
|
12
|
-
import { useFlattenOptions as
|
|
13
|
-
import { useSelectionModel as
|
|
9
|
+
import { Button as St } from "../button.js";
|
|
10
|
+
import { cn as w } from "../../../lib/utils.js";
|
|
11
|
+
import { isInvertedSelection as T, isOptionArray as V, isSelected as wt, getSequence as Vt, getLeafOptions as Nt } from "./utils/select.js";
|
|
12
|
+
import { useFlattenOptions as kt } from "./hooks/useFlattenOptions.js";
|
|
13
|
+
import { useSelectionModel as Pt } from "./hooks/useSelectionModel.js";
|
|
14
14
|
import { useVisibleStats as Dt } from "./hooks/useVisibleStats.js";
|
|
15
|
-
import { useImpactNovaI18n as
|
|
16
|
-
const
|
|
15
|
+
import { useImpactNovaI18n as At } from "../../../i18n/ImpactNovaI18nContext.js";
|
|
16
|
+
const Ot = (Se) => {
|
|
17
17
|
const {
|
|
18
18
|
options: F,
|
|
19
|
-
value:
|
|
19
|
+
value: re,
|
|
20
20
|
defaultValue: Me,
|
|
21
21
|
onChange: u,
|
|
22
22
|
isMulti: f,
|
|
23
|
-
isDisabled:
|
|
23
|
+
isDisabled: N,
|
|
24
24
|
isLoading: I,
|
|
25
|
-
isClearable:
|
|
25
|
+
isClearable: Le = !0,
|
|
26
26
|
isSearchable: E = !0,
|
|
27
|
-
placeholder:
|
|
27
|
+
placeholder: Fe,
|
|
28
28
|
// menuPortalTarget is kept for API compatibility but no longer used (Radix handles portalling)
|
|
29
|
-
menuPortalTarget:
|
|
30
|
-
autoFocus:
|
|
31
|
-
closeMenuOnSelect:
|
|
32
|
-
defaultMenuIsOpen:
|
|
33
|
-
scrollToSelectedOnOpen:
|
|
34
|
-
maxSelectableOptions:
|
|
35
|
-
showSequence:
|
|
36
|
-
selectionOrder:
|
|
29
|
+
menuPortalTarget: Ct,
|
|
30
|
+
autoFocus: Re,
|
|
31
|
+
closeMenuOnSelect: He = !f,
|
|
32
|
+
defaultMenuIsOpen: je = !1,
|
|
33
|
+
scrollToSelectedOnOpen: we = !1,
|
|
34
|
+
maxSelectableOptions: g,
|
|
35
|
+
showSequence: Ve,
|
|
36
|
+
selectionOrder: qe,
|
|
37
37
|
label: R,
|
|
38
|
-
isRequired:
|
|
39
|
-
error:
|
|
40
|
-
helperText:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
isRequired: _e,
|
|
39
|
+
error: ae,
|
|
40
|
+
helperText: U,
|
|
41
|
+
helperTextPosition: oe = "absolute",
|
|
42
|
+
id: k,
|
|
43
|
+
className: Be,
|
|
44
|
+
parentClassName: Ke,
|
|
45
|
+
onMenuScrollToBottom: ce,
|
|
46
|
+
name: Ue,
|
|
47
|
+
isSelectAllEnabled: J = !0,
|
|
48
|
+
isReadOnly: p = !1,
|
|
48
49
|
searchPosition: $ = "menu",
|
|
49
|
-
footerContent:
|
|
50
|
-
onInputChange:
|
|
51
|
-
getOptionLabel:
|
|
52
|
-
renderOption:
|
|
53
|
-
onMenuOpen:
|
|
54
|
-
onMenuClose:
|
|
55
|
-
labelOrientation:
|
|
56
|
-
leftContent:
|
|
57
|
-
ignoreCase:
|
|
58
|
-
ignoreAccents:
|
|
59
|
-
matchFrom:
|
|
60
|
-
stringify:
|
|
61
|
-
trim:
|
|
62
|
-
filterOption:
|
|
50
|
+
footerContent: Ne,
|
|
51
|
+
onInputChange: We,
|
|
52
|
+
getOptionLabel: ke,
|
|
53
|
+
renderOption: Pe,
|
|
54
|
+
onMenuOpen: Xe,
|
|
55
|
+
onMenuClose: De,
|
|
56
|
+
labelOrientation: ue = "top",
|
|
57
|
+
leftContent: Ae,
|
|
58
|
+
ignoreCase: Ye,
|
|
59
|
+
ignoreAccents: Je,
|
|
60
|
+
matchFrom: Qe,
|
|
61
|
+
stringify: Ze,
|
|
62
|
+
trim: et,
|
|
63
|
+
filterOption: tt,
|
|
63
64
|
enableSubMenus: y = !1,
|
|
64
|
-
enableGroups:
|
|
65
|
+
enableGroups: P = !1,
|
|
65
66
|
fetchError: H,
|
|
66
|
-
onRefetch:
|
|
67
|
-
menuWidth:
|
|
68
|
-
onClearAll:
|
|
69
|
-
onFocus:
|
|
70
|
-
onBlur:
|
|
71
|
-
} =
|
|
67
|
+
onRefetch: Oe,
|
|
68
|
+
menuWidth: lt,
|
|
69
|
+
onClearAll: Ce,
|
|
70
|
+
onFocus: nt,
|
|
71
|
+
onBlur: st
|
|
72
|
+
} = Se, { t: W } = At(), de = Fe ?? W("select.placeholder"), [b, Ie] = K(je), [z, Q] = K(""), [Te, fe] = K(void 0), [d, v] = K(Me || (f ? [] : null)), [it, me] = K(null), X = -2, [D, C] = K(-1), pe = M(!1), he = M(null), xe = M(null), rt = M(null), Y = M(null), j = M(null);
|
|
72
73
|
L(() => {
|
|
73
|
-
|
|
74
|
-
}, [
|
|
74
|
+
re !== void 0 && v(re);
|
|
75
|
+
}, [re]), L(() => {
|
|
75
76
|
if (!(b && E && $ === "menu")) return;
|
|
76
77
|
let e = !1;
|
|
77
78
|
const t = () => {
|
|
@@ -83,107 +84,107 @@ const At = (ge) => {
|
|
|
83
84
|
e = !0, clearTimeout(l);
|
|
84
85
|
};
|
|
85
86
|
}, [b, E, $]);
|
|
86
|
-
const { flatOptions:
|
|
87
|
-
ignoreCase:
|
|
88
|
-
ignoreAccents:
|
|
89
|
-
matchFrom:
|
|
90
|
-
stringify:
|
|
91
|
-
trim:
|
|
92
|
-
filterOption:
|
|
87
|
+
const { flatOptions: m, isProcessing: O, totalOptionsCount: Ee, workerSelectAll: at } = kt(F, z, {
|
|
88
|
+
ignoreCase: Ye,
|
|
89
|
+
ignoreAccents: Je,
|
|
90
|
+
matchFrom: Qe,
|
|
91
|
+
stringify: Ze,
|
|
92
|
+
trim: et,
|
|
93
|
+
filterOption: tt,
|
|
93
94
|
enableSubMenus: y,
|
|
94
|
-
enableGroups:
|
|
95
|
-
}), S =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
enableGroups: P
|
|
96
|
+
}), S = Pt(d, f ?? !1), { stats: q, getGroupStats: ge } = Dt(
|
|
97
|
+
m,
|
|
98
|
+
Ee,
|
|
99
|
+
z,
|
|
99
100
|
S,
|
|
100
101
|
d,
|
|
101
102
|
f ?? !1
|
|
102
|
-
),
|
|
103
|
-
count:
|
|
104
|
-
getScrollElement: () =>
|
|
103
|
+
), A = ht({
|
|
104
|
+
count: m.length,
|
|
105
|
+
getScrollElement: () => Y.current,
|
|
105
106
|
estimateSize: () => 34,
|
|
106
107
|
overscan: 5
|
|
107
108
|
});
|
|
108
109
|
L(() => {
|
|
109
110
|
if (!b)
|
|
110
|
-
|
|
111
|
-
else if (
|
|
112
|
-
if (
|
|
111
|
+
fe(void 0), C(-1);
|
|
112
|
+
else if (pe.current)
|
|
113
|
+
if (pe.current = !1, E && $ === "menu" && !p)
|
|
113
114
|
C(-1);
|
|
114
115
|
else {
|
|
115
|
-
const e = !I && !O && !H && f &&
|
|
116
|
-
C(e ?
|
|
116
|
+
const e = !I && !O && !H && f && J && !p && m.length > 0;
|
|
117
|
+
C(e ? X : 0);
|
|
117
118
|
}
|
|
118
119
|
}, [b]), L(() => {
|
|
119
120
|
D !== -1 && C(0);
|
|
120
|
-
}, [
|
|
121
|
+
}, [z]), L(() => {
|
|
121
122
|
if (!b) return;
|
|
122
123
|
const e = requestAnimationFrame(() => {
|
|
123
|
-
|
|
124
|
+
A.measure();
|
|
124
125
|
});
|
|
125
126
|
return () => cancelAnimationFrame(e);
|
|
126
|
-
}, [b,
|
|
127
|
-
if (b &&
|
|
128
|
-
const e =
|
|
127
|
+
}, [b, A]), L(() => {
|
|
128
|
+
if (b && we && !O && m.length > 0) {
|
|
129
|
+
const e = m.findIndex((t) => f ? S.mode === "exclude" ? !S.set.has(t.value) : S.set.has(t.value) : d?.value === t.value);
|
|
129
130
|
if (e !== -1) {
|
|
130
131
|
const t = setTimeout(() => {
|
|
131
|
-
|
|
132
|
+
A.scrollToIndex(e, { align: "center" });
|
|
132
133
|
}, 50);
|
|
133
134
|
return () => clearTimeout(t);
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
|
-
}, [b,
|
|
137
|
-
const _ =
|
|
137
|
+
}, [b, we, O, m.length, f, S.mode, S.set, d, A]);
|
|
138
|
+
const _ = M(null);
|
|
138
139
|
L(() => {
|
|
139
|
-
if (!
|
|
140
|
+
if (!Y.current || !ce) return;
|
|
140
141
|
const e = () => {
|
|
141
142
|
if (I || O) return;
|
|
142
|
-
const { scrollTop: l, scrollHeight: s, clientHeight: n } =
|
|
143
|
+
const { scrollTop: l, scrollHeight: s, clientHeight: n } = Y.current;
|
|
143
144
|
if (s - l - n <= 10) {
|
|
144
145
|
if (_.current) return;
|
|
145
|
-
|
|
146
|
+
ce(), _.current = setTimeout(() => {
|
|
146
147
|
_.current = null;
|
|
147
148
|
}, 500);
|
|
148
149
|
}
|
|
149
|
-
}, t =
|
|
150
|
+
}, t = Y.current;
|
|
150
151
|
return t.addEventListener("scroll", e), !I && !O && e(), () => {
|
|
151
152
|
t.removeEventListener("scroll", e), _.current && (clearTimeout(_.current), _.current = null);
|
|
152
153
|
};
|
|
153
154
|
}, [
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
ce,
|
|
156
|
+
m.length,
|
|
156
157
|
b,
|
|
157
158
|
I,
|
|
158
159
|
O
|
|
159
160
|
]);
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
162
|
-
if (
|
|
163
|
-
|
|
161
|
+
const Z = (e) => {
|
|
162
|
+
if (!N)
|
|
163
|
+
if (Ie(e), e)
|
|
164
|
+
Xe?.();
|
|
164
165
|
else {
|
|
165
|
-
const t = d, l = f &&
|
|
166
|
-
|
|
166
|
+
const t = d, l = f && V(d) ? d.map((s) => s.value) : void 0;
|
|
167
|
+
De?.(t, l), Q(""), me(null);
|
|
167
168
|
}
|
|
168
|
-
},
|
|
169
|
-
if (!(
|
|
169
|
+
}, ee = (e) => {
|
|
170
|
+
if (!(N || p || e.isDisabled || ("children" in e || "options" in e) && e.isParentSelectable === !1))
|
|
170
171
|
if (f) {
|
|
171
172
|
const l = d || [];
|
|
172
173
|
if ("children" in e || "options" in e) {
|
|
173
|
-
const n =
|
|
174
|
+
const n = Nt(
|
|
174
175
|
e,
|
|
175
176
|
y,
|
|
176
|
-
|
|
177
|
+
P
|
|
177
178
|
).filter((i) => !i.isDisabled);
|
|
178
179
|
if (T(l)) {
|
|
179
|
-
const i = l.excludedValues,
|
|
180
|
+
const i = l.excludedValues, a = n.every(
|
|
180
181
|
(h) => !i.includes(h.value)
|
|
181
182
|
);
|
|
182
183
|
let c = [...i];
|
|
183
|
-
|
|
184
|
+
a ? n.forEach((h) => {
|
|
184
185
|
c.includes(h.value) || c.push(h.value);
|
|
185
186
|
}) : c = c.filter(
|
|
186
|
-
(h) => !n.some((
|
|
187
|
+
(h) => !n.some((le) => le.value === h)
|
|
187
188
|
);
|
|
188
189
|
const o = {
|
|
189
190
|
isAllSelected: !0,
|
|
@@ -193,16 +194,16 @@ const At = (ge) => {
|
|
|
193
194
|
action: "select-option",
|
|
194
195
|
option: e
|
|
195
196
|
});
|
|
196
|
-
} else if (
|
|
197
|
-
const i = l,
|
|
197
|
+
} else if (V(l)) {
|
|
198
|
+
const i = l, a = n.every(
|
|
198
199
|
(o) => i.some((h) => h.value === o.value)
|
|
199
200
|
);
|
|
200
201
|
let c = [...i];
|
|
201
|
-
if (
|
|
202
|
+
if (a ? c = c.filter(
|
|
202
203
|
(o) => !n.some((h) => h.value === o.value)
|
|
203
204
|
) : n.forEach((o) => {
|
|
204
205
|
c.some((h) => h.value === o.value) || c.push(o);
|
|
205
|
-
}),
|
|
206
|
+
}), g && c.length > g)
|
|
206
207
|
return;
|
|
207
208
|
v(c), u && u(c, {
|
|
208
209
|
action: "select-option",
|
|
@@ -213,21 +214,21 @@ const At = (ge) => {
|
|
|
213
214
|
const s = l.excludedValues, n = s.includes(e.value);
|
|
214
215
|
let i = [...s];
|
|
215
216
|
n ? i = i.filter((c) => c !== e.value) : i.push(e.value);
|
|
216
|
-
const
|
|
217
|
+
const a = {
|
|
217
218
|
isAllSelected: !0,
|
|
218
219
|
excludedValues: i
|
|
219
220
|
};
|
|
220
|
-
v(
|
|
221
|
+
v(a), u && u(a, {
|
|
221
222
|
action: n ? "select-option" : "deselect-option",
|
|
222
223
|
option: e
|
|
223
224
|
});
|
|
224
|
-
} else if (
|
|
225
|
+
} else if (V(l)) {
|
|
225
226
|
const s = l, n = f ? S.mode === "exclude" ? !S.set.has(e.value) : S.set.has(e.value) : d?.value === e.value;
|
|
226
227
|
let i = [];
|
|
227
228
|
if (n)
|
|
228
|
-
i = s.filter((
|
|
229
|
+
i = s.filter((a) => a.value !== e.value);
|
|
229
230
|
else {
|
|
230
|
-
if (
|
|
231
|
+
if (g && l.length >= g)
|
|
231
232
|
return;
|
|
232
233
|
i = [...s, e];
|
|
233
234
|
}
|
|
@@ -240,24 +241,24 @@ const At = (ge) => {
|
|
|
240
241
|
v(e), u && u(e, {
|
|
241
242
|
action: "select-option",
|
|
242
243
|
option: e
|
|
243
|
-
}),
|
|
244
|
-
},
|
|
245
|
-
if (!(!f ||
|
|
244
|
+
}), He && (Ie(!1), De?.(e, void 0), Q(""));
|
|
245
|
+
}, be = async () => {
|
|
246
|
+
if (!(!f || N || p)) {
|
|
246
247
|
if (F.length > 3e3) {
|
|
247
248
|
try {
|
|
248
|
-
const e = await
|
|
249
|
+
const e = await at(
|
|
249
250
|
d,
|
|
250
251
|
T(d),
|
|
251
|
-
|
|
252
|
+
g
|
|
252
253
|
);
|
|
253
254
|
v(e), u && u(e, { action: "select-option" });
|
|
254
255
|
} catch {
|
|
255
256
|
}
|
|
256
257
|
return;
|
|
257
258
|
}
|
|
258
|
-
if (
|
|
259
|
+
if (z) {
|
|
259
260
|
let e = !1;
|
|
260
|
-
for (const l of
|
|
261
|
+
for (const l of m)
|
|
261
262
|
if (!l.isGroup && !l.isSubmenuParent && !l.isDisabled) {
|
|
262
263
|
e = !0;
|
|
263
264
|
break;
|
|
@@ -267,52 +268,52 @@ const At = (ge) => {
|
|
|
267
268
|
const t = d || [];
|
|
268
269
|
if (T(t)) {
|
|
269
270
|
const l = t.excludedValues, { totalVisible: s, selectedVisible: n } = q, i = s > 0 && s === n;
|
|
270
|
-
let
|
|
271
|
+
let a = [...l];
|
|
271
272
|
if (i)
|
|
272
|
-
for (const o of
|
|
273
|
-
!o.isGroup && !o.isSubmenuParent && !o.isDisabled && (
|
|
273
|
+
for (const o of m)
|
|
274
|
+
!o.isGroup && !o.isSubmenuParent && !o.isDisabled && (a.includes(o.value) || a.push(o.value));
|
|
274
275
|
else {
|
|
275
276
|
const o = /* @__PURE__ */ new Set();
|
|
276
|
-
for (const h of
|
|
277
|
+
for (const h of m)
|
|
277
278
|
!h.isGroup && !h.isSubmenuParent && !h.isDisabled && o.add(h.value);
|
|
278
|
-
|
|
279
|
+
a = a.filter((h) => !o.has(h));
|
|
279
280
|
}
|
|
280
281
|
const c = {
|
|
281
282
|
isAllSelected: !0,
|
|
282
|
-
excludedValues:
|
|
283
|
+
excludedValues: a
|
|
283
284
|
};
|
|
284
285
|
v(c), u && u(c, { action: "select-option" });
|
|
285
|
-
} else if (
|
|
286
|
+
} else if (V(t)) {
|
|
286
287
|
const l = t, { totalVisible: s, selectedVisible: n } = q, i = s > 0 && s === n;
|
|
287
|
-
let
|
|
288
|
+
let a = [...l];
|
|
288
289
|
if (i) {
|
|
289
290
|
const c = /* @__PURE__ */ new Set();
|
|
290
|
-
for (const o of
|
|
291
|
+
for (const o of m)
|
|
291
292
|
!o.isGroup && !o.isSubmenuParent && !o.isDisabled && c.add(o.value);
|
|
292
|
-
|
|
293
|
+
a = a.filter((o) => !c.has(o.value));
|
|
293
294
|
} else {
|
|
294
|
-
const c = new Set(
|
|
295
|
-
for (const o of
|
|
296
|
-
!o.isGroup && !o.isSubmenuParent && !o.isDisabled && (c.has(o.value) || (
|
|
295
|
+
const c = new Set(a.map((o) => o.value));
|
|
296
|
+
for (const o of m)
|
|
297
|
+
!o.isGroup && !o.isSubmenuParent && !o.isDisabled && (c.has(o.value) || (a.push(o), c.add(o.value)));
|
|
297
298
|
}
|
|
298
|
-
if (
|
|
299
|
+
if (g && a.length > g)
|
|
299
300
|
return;
|
|
300
|
-
v(
|
|
301
|
+
v(a), u && u(a, { action: "select-option" });
|
|
301
302
|
}
|
|
302
|
-
} else if (
|
|
303
|
-
const e = d, { totalVisible: t } = q, l =
|
|
304
|
-
if (
|
|
303
|
+
} else if (g) {
|
|
304
|
+
const e = d, { totalVisible: t } = q, l = V(e) ? e.length : 0, s = Math.min(t, g);
|
|
305
|
+
if (V(e) && l >= s && l > 0) {
|
|
305
306
|
const n = e.filter((i) => i.isDisabled);
|
|
306
307
|
v(n), u && u(n, {
|
|
307
308
|
action: "select-option"
|
|
308
309
|
});
|
|
309
|
-
} else if (
|
|
310
|
+
} else if (V(e)) {
|
|
310
311
|
const n = e.filter(
|
|
311
|
-
(
|
|
312
|
+
(a) => a.isDisabled
|
|
312
313
|
);
|
|
313
314
|
let i = n.length;
|
|
314
|
-
for (const
|
|
315
|
-
if (!
|
|
315
|
+
for (const a of m)
|
|
316
|
+
if (!a.isGroup && !a.isSubmenuParent && !a.isDisabled && (n.push(a), i++, i >= g))
|
|
316
317
|
break;
|
|
317
318
|
v(n), u && u(n, {
|
|
318
319
|
action: "select-option"
|
|
@@ -320,17 +321,17 @@ const At = (ge) => {
|
|
|
320
321
|
}
|
|
321
322
|
} else {
|
|
322
323
|
const e = d, t = T(e) && e.excludedValues.length === 0;
|
|
323
|
-
if (
|
|
324
|
+
if (Se.enableInvertedSelection)
|
|
324
325
|
if (t) {
|
|
325
|
-
const l =
|
|
326
|
+
const l = V(e) ? e.filter((s) => s.isDisabled) : [];
|
|
326
327
|
v(l), u && u(l, {
|
|
327
328
|
action: "select-option"
|
|
328
329
|
});
|
|
329
330
|
} else {
|
|
330
331
|
const s = {
|
|
331
332
|
isAllSelected: !0,
|
|
332
|
-
excludedValues:
|
|
333
|
-
(n) => n.isDisabled && (
|
|
333
|
+
excludedValues: m.filter(
|
|
334
|
+
(n) => n.isDisabled && (V(e) ? !e.some((i) => i.value === n.value) : !0)
|
|
334
335
|
).map((n) => n.value)
|
|
335
336
|
};
|
|
336
337
|
v(s), u && u(s, { action: "select-option" });
|
|
@@ -338,13 +339,13 @@ const At = (ge) => {
|
|
|
338
339
|
else {
|
|
339
340
|
const { totalVisible: l, selectedVisible: s } = q;
|
|
340
341
|
if (l > 0 && l === s) {
|
|
341
|
-
const n =
|
|
342
|
+
const n = V(e) ? e.filter((i) => i.isDisabled) : [];
|
|
342
343
|
v(n), u && u(n, {
|
|
343
344
|
action: "select-option"
|
|
344
345
|
});
|
|
345
346
|
} else {
|
|
346
|
-
const n =
|
|
347
|
-
for (const i of
|
|
347
|
+
const n = V(e) ? e.filter((i) => i.isDisabled) : [];
|
|
348
|
+
for (const i of m)
|
|
348
349
|
!i.isGroup && !i.isSubmenuParent && !i.isDisabled && n.push(i);
|
|
349
350
|
v(n), u && u(n, {
|
|
350
351
|
action: "select-option"
|
|
@@ -353,12 +354,12 @@ const At = (ge) => {
|
|
|
353
354
|
}
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
|
-
},
|
|
357
|
-
if (e.stopPropagation(), !
|
|
357
|
+
}, ot = (e) => {
|
|
358
|
+
if (e.stopPropagation(), !p)
|
|
358
359
|
if (f) {
|
|
359
360
|
const t = [], l = (n) => {
|
|
360
361
|
for (const i of n) {
|
|
361
|
-
if (
|
|
362
|
+
if (P && "options" in i) {
|
|
362
363
|
l(
|
|
363
364
|
i.options
|
|
364
365
|
);
|
|
@@ -368,33 +369,33 @@ const At = (ge) => {
|
|
|
368
369
|
l(i.children);
|
|
369
370
|
continue;
|
|
370
371
|
}
|
|
371
|
-
const
|
|
372
|
-
|
|
372
|
+
const a = i;
|
|
373
|
+
a.isDisabled && (S.mode === "exclude" ? !S.set.has(a.value) : S.set.has(a.value)) && t.push(a);
|
|
373
374
|
}
|
|
374
375
|
};
|
|
375
376
|
l(F);
|
|
376
377
|
const s = t;
|
|
377
|
-
v(s), u && u(s, { action: "clear" }),
|
|
378
|
+
v(s), u && u(s, { action: "clear" }), Ce?.();
|
|
378
379
|
} else {
|
|
379
380
|
const t = d;
|
|
380
381
|
if (t) {
|
|
381
382
|
let s;
|
|
382
383
|
const n = (i) => {
|
|
383
|
-
for (const
|
|
384
|
+
for (const a of i) {
|
|
384
385
|
if (s) return;
|
|
385
|
-
if (
|
|
386
|
+
if (P && "options" in a) {
|
|
386
387
|
if (n(
|
|
387
|
-
|
|
388
|
+
a.options
|
|
388
389
|
), s) return;
|
|
389
390
|
continue;
|
|
390
391
|
}
|
|
391
|
-
if (y && "children" in
|
|
392
|
+
if (y && "children" in a && Array.isArray(a.children)) {
|
|
392
393
|
if (n(
|
|
393
|
-
|
|
394
|
+
a.children
|
|
394
395
|
), s) return;
|
|
395
396
|
continue;
|
|
396
397
|
}
|
|
397
|
-
const c =
|
|
398
|
+
const c = a;
|
|
398
399
|
if (c.value === t.value) {
|
|
399
400
|
s = c;
|
|
400
401
|
return;
|
|
@@ -405,496 +406,520 @@ const At = (ge) => {
|
|
|
405
406
|
return;
|
|
406
407
|
}
|
|
407
408
|
const l = null;
|
|
408
|
-
v(l), u && u(l, { action: "clear" }),
|
|
409
|
+
v(l), u && u(l, { action: "clear" }), Ce?.();
|
|
409
410
|
}
|
|
410
|
-
},
|
|
411
|
+
}, ct = (e) => Vt(
|
|
411
412
|
e,
|
|
412
|
-
|
|
413
|
+
Ve ?? !1,
|
|
413
414
|
f ?? !1,
|
|
414
|
-
|
|
415
|
+
qe,
|
|
415
416
|
d
|
|
416
|
-
),
|
|
417
|
+
), te = (e) => ke ? ke(e) : e.label, $e = () => {
|
|
417
418
|
const e = [];
|
|
418
|
-
return !I && !O && !H && f &&
|
|
419
|
+
return !I && !O && !H && f && J && !p && m.length > 0 && e.push(X), m.forEach((l, s) => {
|
|
419
420
|
!l.isGroup && !(y && l.isSubmenuParent) && !l.isDisabled && e.push(s);
|
|
420
421
|
}), e;
|
|
421
|
-
},
|
|
422
|
-
if (
|
|
422
|
+
}, ut = (e) => {
|
|
423
|
+
if (N || p) return;
|
|
423
424
|
if (!b) {
|
|
424
|
-
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(),
|
|
425
|
+
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), pe.current = !0, Z(!0));
|
|
425
426
|
return;
|
|
426
427
|
}
|
|
427
|
-
if (E && $ === "menu" && !
|
|
428
|
+
if (E && $ === "menu" && !p && j.current) {
|
|
428
429
|
document.activeElement !== j.current && j.current.focus();
|
|
429
430
|
return;
|
|
430
431
|
}
|
|
431
|
-
const t =
|
|
432
|
+
const t = $e();
|
|
432
433
|
if (t.length === 0) return;
|
|
433
434
|
const l = t.indexOf(D);
|
|
434
435
|
if (e.key === "ArrowDown") {
|
|
435
436
|
e.preventDefault();
|
|
436
437
|
const s = l < t.length - 1 ? l + 1 : 0, n = t[s];
|
|
437
|
-
C(n), n >= 0 &&
|
|
438
|
+
C(n), n >= 0 && A.scrollToIndex(n, { align: "auto" });
|
|
438
439
|
} else if (e.key === "ArrowUp") {
|
|
439
440
|
e.preventDefault();
|
|
440
441
|
const s = l > 0 ? l - 1 : t.length - 1, n = t[s];
|
|
441
|
-
C(n), n >= 0 &&
|
|
442
|
+
C(n), n >= 0 && A.scrollToIndex(n, { align: "auto" });
|
|
442
443
|
} else if (e.key === "Enter" || e.key === " ") {
|
|
443
|
-
if (e.preventDefault(), D ===
|
|
444
|
-
|
|
445
|
-
else if (D >= 0 && D <
|
|
446
|
-
const s =
|
|
447
|
-
s.isDisabled ||
|
|
444
|
+
if (e.preventDefault(), D === X)
|
|
445
|
+
be();
|
|
446
|
+
else if (D >= 0 && D < m.length) {
|
|
447
|
+
const s = m[D];
|
|
448
|
+
s.isDisabled || ee(s);
|
|
448
449
|
}
|
|
449
450
|
} else if (e.key === "Escape")
|
|
450
|
-
e.preventDefault(),
|
|
451
|
+
e.preventDefault(), Z(!1), he.current?.focus();
|
|
451
452
|
else if (e.key === "Home")
|
|
452
|
-
e.preventDefault(), t.length > 0 && (C(t[0]), t[0] >= 0 &&
|
|
453
|
+
e.preventDefault(), t.length > 0 && (C(t[0]), t[0] >= 0 && A.scrollToIndex(t[0], { align: "auto" }));
|
|
453
454
|
else if (e.key === "End" && (e.preventDefault(), t.length > 0)) {
|
|
454
455
|
const s = t[t.length - 1];
|
|
455
|
-
C(s), s >= 0 &&
|
|
456
|
+
C(s), s >= 0 && A.scrollToIndex(s, { align: "auto" });
|
|
456
457
|
}
|
|
457
|
-
},
|
|
458
|
-
const t =
|
|
458
|
+
}, dt = (e) => {
|
|
459
|
+
const t = $e();
|
|
459
460
|
if (t.length === 0) return;
|
|
460
461
|
const l = t.indexOf(D);
|
|
461
462
|
if (e.key === "ArrowDown") {
|
|
462
463
|
e.preventDefault();
|
|
463
464
|
const s = l < t.length - 1 ? l + 1 : 0, n = t[s];
|
|
464
|
-
C(n), n >= 0 &&
|
|
465
|
+
C(n), n >= 0 && A.scrollToIndex(n, { align: "auto" });
|
|
465
466
|
} else if (e.key === "ArrowUp") {
|
|
466
467
|
e.preventDefault();
|
|
467
468
|
const s = l > 0 ? l - 1 : t.length - 1, n = t[s];
|
|
468
|
-
C(n), n >= 0 &&
|
|
469
|
+
C(n), n >= 0 && A.scrollToIndex(n, { align: "auto" });
|
|
469
470
|
} else if (e.key === "Enter") {
|
|
470
|
-
if (e.preventDefault(), D ===
|
|
471
|
-
|
|
472
|
-
else if (D >= 0 && D <
|
|
473
|
-
const s =
|
|
474
|
-
s.isDisabled ||
|
|
471
|
+
if (e.preventDefault(), D === X)
|
|
472
|
+
be();
|
|
473
|
+
else if (D >= 0 && D < m.length) {
|
|
474
|
+
const s = m[D];
|
|
475
|
+
s.isDisabled || ee(s);
|
|
475
476
|
}
|
|
476
|
-
} else e.key === "Escape" && (e.preventDefault(),
|
|
477
|
-
},
|
|
477
|
+
} else e.key === "Escape" && (e.preventDefault(), Z(!1), he.current?.focus());
|
|
478
|
+
}, ft = () => {
|
|
478
479
|
if (f) {
|
|
479
480
|
const e = d || [];
|
|
480
481
|
let t = 0;
|
|
481
|
-
return T(e) ? t =
|
|
482
|
+
return T(e) ? t = Ee - e.excludedValues.length : V(e) && (t = e.length), t === 0 ? null : t === 1 && V(e) ? /* @__PURE__ */ r("span", { className: w("text-[14px] font-medium truncate min-w-0 block", N ? "text-disabled-foreground" : "text-[#1f2b4d]"), children: te(e[0]) }) : /* @__PURE__ */ r("span", { className: w("text-[14px] font-medium truncate min-w-0 block", N ? "text-disabled-foreground" : "text-[#1f2b4d]"), children: W("select.selectedCount", { count: t }) });
|
|
482
483
|
} else {
|
|
483
484
|
const e = d;
|
|
484
|
-
return e ? /* @__PURE__ */
|
|
485
|
+
return e ? /* @__PURE__ */ r("span", { className: w("text-[14px] font-medium truncate min-w-0 block", N ? "text-disabled-foreground" : "text-[#1f2b4d]"), children: te(e) }) : null;
|
|
485
486
|
}
|
|
486
487
|
};
|
|
487
|
-
return /* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ x(
|
|
488
489
|
"div",
|
|
489
490
|
{
|
|
490
|
-
className:
|
|
491
|
+
className: w(
|
|
491
492
|
"flex gap-[6px]",
|
|
492
|
-
|
|
493
|
-
|
|
493
|
+
ue === "left" ? "w-fit flex-row items-center" : "w-full flex-col",
|
|
494
|
+
Ke
|
|
494
495
|
),
|
|
495
|
-
"data-testid": `select-${
|
|
496
|
+
"data-testid": `select-${k || "default"}`,
|
|
496
497
|
"data-component": "select",
|
|
497
498
|
children: [
|
|
498
|
-
R && /* @__PURE__ */
|
|
499
|
+
R && /* @__PURE__ */ x(
|
|
499
500
|
"label",
|
|
500
501
|
{
|
|
501
|
-
className:
|
|
502
|
+
className: w(
|
|
502
503
|
"text-[12px] font-medium text-[#60697d] leading-[18px]",
|
|
503
|
-
|
|
504
|
+
ue === "left" ? "shrink-0" : ""
|
|
504
505
|
),
|
|
505
506
|
children: [
|
|
506
507
|
R,
|
|
507
508
|
" ",
|
|
508
|
-
|
|
509
|
+
_e && /* @__PURE__ */ r("span", { className: "text-[red]", children: "*" })
|
|
509
510
|
]
|
|
510
511
|
}
|
|
511
512
|
),
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
b ? "ring-1 ring-indigo-500 border-indigo-500" : "",
|
|
523
|
-
!V && !m && "bg-white",
|
|
524
|
-
_e
|
|
525
|
-
),
|
|
526
|
-
id: N,
|
|
527
|
-
tabIndex: V ? -1 : 0,
|
|
528
|
-
onFocus: lt,
|
|
529
|
-
onBlur: nt,
|
|
530
|
-
role: "combobox",
|
|
531
|
-
"aria-expanded": b,
|
|
532
|
-
"aria-haspopup": "listbox",
|
|
533
|
-
"aria-label": R ? String(R) : re,
|
|
534
|
-
"data-component": "select-trigger",
|
|
535
|
-
"data-disabled": V || void 0,
|
|
536
|
-
"data-state": b ? "open" : "closed",
|
|
537
|
-
onKeyDown: ct,
|
|
538
|
-
children: /* @__PURE__ */ g("div", { className: "flex items-center justify-between w-full min-w-0 max-w-full", children: [
|
|
539
|
-
Pe && /* @__PURE__ */ a("div", { className: "flex items-center text-gray-500 shrink-0", children: Pe }),
|
|
540
|
-
/* @__PURE__ */ g(
|
|
541
|
-
"div",
|
|
542
|
-
{
|
|
543
|
-
className: "flex-1 flex items-center overflow-hidden min-w-0 max-w-full",
|
|
544
|
-
"data-testid": `select-value-${N || "default"}`,
|
|
545
|
-
children: [
|
|
546
|
-
dt() || /* @__PURE__ */ a(
|
|
547
|
-
"span",
|
|
548
|
-
{
|
|
549
|
-
className: "text-[#b4bac7] font-normal text-[14px] truncate min-w-0 block",
|
|
550
|
-
"data-testid": `select-placeholder-${N || "default"}`,
|
|
551
|
-
"data-has-value": !1,
|
|
552
|
-
children: re
|
|
553
|
-
}
|
|
554
|
-
),
|
|
555
|
-
E && b && $ === "trigger" && !m && /* @__PURE__ */ a(
|
|
556
|
-
"input",
|
|
557
|
-
{
|
|
558
|
-
ref: it,
|
|
559
|
-
type: "text",
|
|
560
|
-
className: "flex-1 min-w-[50px] border-none p-0 focus:ring-0 text-sm outline-none h-full",
|
|
561
|
-
value: G,
|
|
562
|
-
onChange: (e) => J(e.target.value),
|
|
563
|
-
onClick: (e) => e.stopPropagation(),
|
|
564
|
-
autoFocus: Fe,
|
|
565
|
-
name: Ke || void 0
|
|
566
|
-
}
|
|
567
|
-
)
|
|
568
|
-
]
|
|
569
|
-
}
|
|
570
|
-
),
|
|
571
|
-
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !b && (I || O) ? /* @__PURE__ */ a(gt, { size: "14px" }) : /* @__PURE__ */ g(pt, { children: [
|
|
572
|
-
ze && !m && !V && (f && (T(
|
|
573
|
-
d
|
|
574
|
-
) && d.isAllSelected || w(d) && d.length > 0) || !f && d) && /* @__PURE__ */ a(
|
|
575
|
-
"div",
|
|
576
|
-
{
|
|
577
|
-
role: "button",
|
|
578
|
-
onClick: at,
|
|
579
|
-
className: "hover:text-gray-600 p-0.5",
|
|
580
|
-
children: /* @__PURE__ */ a(bt, { size: "11px", color: "#758490" })
|
|
581
|
-
}
|
|
582
|
-
),
|
|
583
|
-
/* @__PURE__ */ a(
|
|
584
|
-
$e,
|
|
585
|
-
{
|
|
586
|
-
size: "16px",
|
|
587
|
-
className: A(
|
|
588
|
-
"transition-transform duration-200",
|
|
589
|
-
b ? "-rotate-90" : "rotate-90"
|
|
590
|
-
)
|
|
591
|
-
}
|
|
592
|
-
)
|
|
593
|
-
] }) })
|
|
594
|
-
] })
|
|
595
|
-
}
|
|
596
|
-
) }),
|
|
597
|
-
/* @__PURE__ */ a(ne.Portal, { children: /* @__PURE__ */ g(
|
|
598
|
-
ne.Content,
|
|
599
|
-
{
|
|
600
|
-
ref: de,
|
|
601
|
-
side: "bottom",
|
|
602
|
-
sideOffset: 4,
|
|
603
|
-
align: "start",
|
|
604
|
-
avoidCollisions: !0,
|
|
605
|
-
collisionPadding: 8,
|
|
606
|
-
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
607
|
-
onWheel: (e) => e.stopPropagation(),
|
|
608
|
-
style: {
|
|
609
|
-
width: tt || "var(--radix-popover-trigger-width)",
|
|
610
|
-
maxHeight: "var(--radix-popover-content-available-height)",
|
|
611
|
-
minHeight: Ie ? `${Ie}px` : void 0
|
|
612
|
-
},
|
|
613
|
-
className: A(
|
|
614
|
-
"z-50 overflow-hidden rounded-[12px] text-base shadow-[0px_1px_6px_0px_rgba(26,39,124,0.14)] focus:outline-none sm:text-sm flex flex-col border-none pointer-events-auto",
|
|
615
|
-
m ? "bg-[#f5f5f5]" : "bg-white"
|
|
616
|
-
),
|
|
617
|
-
"data-testid": `select-menu-${N || "default"}`,
|
|
618
|
-
"data-component": "select-menu",
|
|
619
|
-
children: [
|
|
620
|
-
/* @__PURE__ */ g(
|
|
513
|
+
/* @__PURE__ */ x(
|
|
514
|
+
"div",
|
|
515
|
+
{
|
|
516
|
+
className: w(
|
|
517
|
+
ue === "left" ? "min-w-0 flex-1" : "w-full min-w-0",
|
|
518
|
+
U && oe === "absolute" && "relative"
|
|
519
|
+
),
|
|
520
|
+
children: [
|
|
521
|
+
/* @__PURE__ */ x(se.Root, { open: b, onOpenChange: Z, children: [
|
|
522
|
+
/* @__PURE__ */ r(se.Trigger, { asChild: !0, children: /* @__PURE__ */ r(
|
|
621
523
|
"div",
|
|
622
524
|
{
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
525
|
+
ref: he,
|
|
526
|
+
className: w(
|
|
527
|
+
"relative h-[32px] w-full cursor-pointer rounded-[8px] border border-solid px-3 py-1 text-left shadow-sm sm:text-sm transition-all flex items-center overflow-hidden",
|
|
528
|
+
ae ? "border-[#e15554] focus-visible:ring-[#e15554]" : "border-[#c3c8d4] hover:border-gray-400 focus-visible:border-indigo-500 focus-visible:ring-1 focus-visible:ring-indigo-500",
|
|
529
|
+
N ? "bg-[#f2f4fb] cursor-not-allowed opacity-75" : "",
|
|
530
|
+
p ? "cursor-default bg-[#f2f4fb]" : "",
|
|
531
|
+
b ? "ring-1 ring-indigo-500 border-indigo-500" : "",
|
|
532
|
+
!N && !p && "bg-white",
|
|
533
|
+
Be
|
|
627
534
|
),
|
|
628
|
-
|
|
629
|
-
|
|
535
|
+
id: k,
|
|
536
|
+
tabIndex: N ? -1 : 0,
|
|
537
|
+
onFocus: nt,
|
|
538
|
+
onBlur: st,
|
|
539
|
+
role: "combobox",
|
|
540
|
+
"aria-expanded": b,
|
|
541
|
+
"aria-haspopup": "listbox",
|
|
542
|
+
"aria-label": R ? String(R) : de,
|
|
543
|
+
"data-component": "select-trigger",
|
|
544
|
+
"data-disabled": N || void 0,
|
|
545
|
+
"data-state": b ? "open" : "closed",
|
|
546
|
+
onKeyDown: ut,
|
|
547
|
+
children: /* @__PURE__ */ x("div", { className: "flex items-center justify-between w-full min-w-0 max-w-full", children: [
|
|
548
|
+
Ae && /* @__PURE__ */ r("div", { className: "flex items-center text-gray-500 shrink-0", children: Ae }),
|
|
549
|
+
/* @__PURE__ */ x(
|
|
630
550
|
"div",
|
|
631
551
|
{
|
|
632
|
-
className: "
|
|
633
|
-
"data-testid": `select-
|
|
634
|
-
children:
|
|
635
|
-
|
|
636
|
-
|
|
552
|
+
className: "flex-1 flex items-center overflow-hidden min-w-0 max-w-full",
|
|
553
|
+
"data-testid": `select-value-${k || "default"}`,
|
|
554
|
+
children: [
|
|
555
|
+
ft() || /* @__PURE__ */ r(
|
|
556
|
+
"span",
|
|
557
|
+
{
|
|
558
|
+
className: "text-[#b4bac7] font-normal text-[14px] truncate min-w-0 block",
|
|
559
|
+
"data-testid": `select-placeholder-${k || "default"}`,
|
|
560
|
+
"data-has-value": !1,
|
|
561
|
+
children: de
|
|
562
|
+
}
|
|
563
|
+
),
|
|
564
|
+
E && b && $ === "trigger" && !p && /* @__PURE__ */ r(
|
|
637
565
|
"input",
|
|
638
566
|
{
|
|
639
|
-
ref:
|
|
567
|
+
ref: rt,
|
|
640
568
|
type: "text",
|
|
641
|
-
className: "
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
onKeyDown: ut,
|
|
645
|
-
onChange: (e) => {
|
|
646
|
-
const t = e.target.value;
|
|
647
|
-
G === "" && t !== "" ? de.current && ae(de.current.offsetHeight) : t === "" && ae(void 0), J(t), Ue?.(t);
|
|
648
|
-
},
|
|
569
|
+
className: "flex-1 min-w-[50px] border-none p-0 focus:ring-0 text-sm outline-none h-full",
|
|
570
|
+
value: z,
|
|
571
|
+
onChange: (e) => Q(e.target.value),
|
|
649
572
|
onClick: (e) => e.stopPropagation(),
|
|
650
|
-
|
|
573
|
+
autoFocus: Re,
|
|
574
|
+
name: Ue || void 0
|
|
651
575
|
}
|
|
652
576
|
)
|
|
653
|
-
]
|
|
577
|
+
]
|
|
654
578
|
}
|
|
655
579
|
),
|
|
656
|
-
|
|
580
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !b && (I || O) ? /* @__PURE__ */ r(bt, { size: "14px" }) : /* @__PURE__ */ x(pt, { children: [
|
|
581
|
+
Le && !p && !N && (f && (T(
|
|
582
|
+
d
|
|
583
|
+
) && d.isAllSelected || V(d) && d.length > 0) || !f && d) && /* @__PURE__ */ r(
|
|
584
|
+
"div",
|
|
585
|
+
{
|
|
586
|
+
role: "button",
|
|
587
|
+
onClick: ot,
|
|
588
|
+
className: "hover:text-gray-600 p-0.5",
|
|
589
|
+
children: /* @__PURE__ */ r(vt, { size: "11px", color: "#758490" })
|
|
590
|
+
}
|
|
591
|
+
),
|
|
592
|
+
/* @__PURE__ */ r(
|
|
593
|
+
ze,
|
|
594
|
+
{
|
|
595
|
+
size: "16px",
|
|
596
|
+
className: w(
|
|
597
|
+
"transition-transform duration-200",
|
|
598
|
+
b ? "-rotate-90" : "rotate-90"
|
|
599
|
+
)
|
|
600
|
+
}
|
|
601
|
+
)
|
|
602
|
+
] }) })
|
|
603
|
+
] })
|
|
604
|
+
}
|
|
605
|
+
) }),
|
|
606
|
+
/* @__PURE__ */ r(se.Portal, { children: /* @__PURE__ */ x(
|
|
607
|
+
se.Content,
|
|
608
|
+
{
|
|
609
|
+
ref: xe,
|
|
610
|
+
side: "bottom",
|
|
611
|
+
sideOffset: 4,
|
|
612
|
+
align: "start",
|
|
613
|
+
avoidCollisions: !0,
|
|
614
|
+
collisionPadding: 8,
|
|
615
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
616
|
+
onWheel: (e) => e.stopPropagation(),
|
|
617
|
+
style: {
|
|
618
|
+
width: lt || "var(--radix-popover-trigger-width)",
|
|
619
|
+
maxHeight: "var(--radix-popover-content-available-height)",
|
|
620
|
+
minHeight: Te ? `${Te}px` : void 0
|
|
621
|
+
},
|
|
622
|
+
className: w(
|
|
623
|
+
"z-50 overflow-hidden rounded-[12px] text-base shadow-[0px_1px_6px_0px_rgba(26,39,124,0.14)] focus:outline-none sm:text-sm flex flex-col border-none pointer-events-auto",
|
|
624
|
+
p ? "bg-[#f5f5f5]" : "bg-white"
|
|
625
|
+
),
|
|
626
|
+
"data-testid": `select-menu-${k || "default"}`,
|
|
627
|
+
"data-component": "select-menu",
|
|
628
|
+
children: [
|
|
629
|
+
/* @__PURE__ */ x(
|
|
657
630
|
"div",
|
|
658
631
|
{
|
|
659
|
-
className:
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
"
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
632
|
+
className: w(
|
|
633
|
+
"flex flex-col z-10 sticky top-0 px-[6px] pt-[8px]",
|
|
634
|
+
p ? "bg-[#f5f5f5]" : "bg-white",
|
|
635
|
+
!H && (E && $ === "menu" && !p || f && J && !p && m.length > 0) ? "border-b border-solid border-gray-100" : ""
|
|
636
|
+
),
|
|
637
|
+
children: [
|
|
638
|
+
E && $ === "menu" && !p && !H && /* @__PURE__ */ r(
|
|
639
|
+
"div",
|
|
640
|
+
{
|
|
641
|
+
className: "p-0",
|
|
642
|
+
"data-testid": `select-search-container-${k || "default"}`,
|
|
643
|
+
children: /* @__PURE__ */ x("div", { className: "relative", children: [
|
|
644
|
+
/* @__PURE__ */ r("div", { className: "absolute inset-y-0 left-[12px] flex items-center pointer-events-none", children: /* @__PURE__ */ r(yt, { size: "14px", color: "#AFAFAF" }) }),
|
|
645
|
+
/* @__PURE__ */ r(
|
|
646
|
+
"input",
|
|
647
|
+
{
|
|
648
|
+
ref: j,
|
|
649
|
+
type: "text",
|
|
650
|
+
className: "block w-full pl-[34px] pr-4 h-[35px] border-none border-b border-primary text-sm outline-none focus-visible:ring-1 focus-visible:ring-indigo-500 focus-visible:rounded-md",
|
|
651
|
+
placeholder: W("select.searchHere"),
|
|
652
|
+
value: z,
|
|
653
|
+
onKeyDown: dt,
|
|
654
|
+
onChange: (e) => {
|
|
655
|
+
const t = e.target.value;
|
|
656
|
+
z === "" && t !== "" ? xe.current && fe(xe.current.offsetHeight) : t === "" && fe(void 0), Q(t), We?.(t);
|
|
657
|
+
},
|
|
658
|
+
onClick: (e) => e.stopPropagation(),
|
|
659
|
+
"data-testid": `select-search-input-${k || "default"}`
|
|
660
|
+
}
|
|
661
|
+
)
|
|
662
|
+
] })
|
|
663
|
+
}
|
|
664
|
+
),
|
|
665
|
+
!I && !O && !H && f && J && !p && m.length > 0 && /* @__PURE__ */ r(
|
|
666
|
+
"div",
|
|
667
|
+
{
|
|
668
|
+
className: "pb-1",
|
|
669
|
+
"data-testid": `select-select-all-container-${k || "default"}`,
|
|
670
|
+
children: /* @__PURE__ */ r(
|
|
671
|
+
"div",
|
|
690
672
|
{
|
|
691
|
-
className:
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
673
|
+
className: w(
|
|
674
|
+
"flex items-center justify-between cursor-pointer rounded-md hover:bg-gray-100 transition-colors py-[6px] px-3 w-full",
|
|
675
|
+
D === X && "ring-2 ring-inset ring-primary bg-[#edf0ff]"
|
|
676
|
+
),
|
|
677
|
+
onClick: be,
|
|
678
|
+
role: "option",
|
|
679
|
+
"aria-selected": !1,
|
|
680
|
+
"data-testid": `select-select-all-button-${k || "default"}`,
|
|
681
|
+
children: /* @__PURE__ */ x("div", { className: "flex items-center flex-1", children: [
|
|
682
|
+
/* @__PURE__ */ r("div", { className: "pointer-events-none flex", children: /* @__PURE__ */ r(
|
|
683
|
+
Ge,
|
|
684
|
+
{
|
|
685
|
+
checked: (() => {
|
|
686
|
+
const { totalVisible: e, selectedVisible: t } = q;
|
|
687
|
+
if (e === 0) return !1;
|
|
688
|
+
const l = g ? Math.min(e, g) : e;
|
|
689
|
+
return t > 0 && t < l ? "indeterminate" : t >= l;
|
|
690
|
+
})(),
|
|
691
|
+
disabled: N || p,
|
|
692
|
+
onChange: () => {
|
|
693
|
+
},
|
|
694
|
+
"data-testid": `select-select-all-checkbox-${k || "default"}`
|
|
695
|
+
}
|
|
696
|
+
) }),
|
|
697
|
+
/* @__PURE__ */ r(
|
|
698
|
+
"span",
|
|
699
|
+
{
|
|
700
|
+
className: "text-sm font-medium text-gray-700",
|
|
701
|
+
"data-testid": `select-select-all-label-${k || "default"}`,
|
|
702
|
+
children: (() => {
|
|
703
|
+
const { totalVisible: e, selectedVisible: t } = q, l = g ? Math.min(e, g) : e, s = e > 0 && t >= l;
|
|
704
|
+
return W(s ? "select.unselectAll" : "select.selectAll");
|
|
705
|
+
})()
|
|
706
|
+
}
|
|
707
|
+
)
|
|
708
|
+
] })
|
|
697
709
|
}
|
|
698
710
|
)
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
711
|
+
}
|
|
712
|
+
)
|
|
713
|
+
]
|
|
702
714
|
}
|
|
703
|
-
)
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
),
|
|
707
|
-
/* @__PURE__ */ a(
|
|
708
|
-
"div",
|
|
709
|
-
{
|
|
710
|
-
ref: X,
|
|
711
|
-
role: "listbox",
|
|
712
|
-
"aria-label": R ? String(R) : re,
|
|
713
|
-
className: "flex-1 overflow-auto py-1 px-[6px]",
|
|
714
|
-
style: {
|
|
715
|
-
maxHeight: "297px",
|
|
716
|
-
overscrollBehavior: "contain"
|
|
717
|
-
},
|
|
718
|
-
onWheel: (e) => e.stopPropagation(),
|
|
719
|
-
children: H ? /* @__PURE__ */ g("div", { className: "flex flex-col items-center justify-center py-8 px-4 text-center", children: [
|
|
720
|
-
/* @__PURE__ */ a("p", { className: "text-sm text-gray-500 font-medium mb-3", children: "Something went wrong" }),
|
|
721
|
-
Ae && /* @__PURE__ */ a(
|
|
722
|
-
yt,
|
|
715
|
+
),
|
|
716
|
+
/* @__PURE__ */ r(
|
|
717
|
+
"div",
|
|
723
718
|
{
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
719
|
+
ref: Y,
|
|
720
|
+
role: "listbox",
|
|
721
|
+
"aria-label": R ? String(R) : de,
|
|
722
|
+
className: "flex-1 overflow-auto py-1 px-[6px]",
|
|
723
|
+
style: {
|
|
724
|
+
maxHeight: "297px",
|
|
725
|
+
overscrollBehavior: "contain"
|
|
726
|
+
},
|
|
727
|
+
onWheel: (e) => e.stopPropagation(),
|
|
728
|
+
children: H ? /* @__PURE__ */ x("div", { className: "flex flex-col items-center justify-center py-8 px-4 text-center", children: [
|
|
729
|
+
/* @__PURE__ */ r("p", { className: "text-sm text-gray-500 font-medium mb-3", children: "Something went wrong" }),
|
|
730
|
+
Oe && /* @__PURE__ */ r(
|
|
731
|
+
St,
|
|
732
|
+
{
|
|
733
|
+
size: "sm",
|
|
734
|
+
variant: "outline",
|
|
735
|
+
onClick: () => Oe(),
|
|
736
|
+
children: "Refetch"
|
|
737
|
+
}
|
|
738
|
+
)
|
|
739
|
+
] }) : m.length === 0 && !I && !O ? /* @__PURE__ */ r("div", { className: "flex items-center justify-center py-8 text-sm text-gray-500", children: "No options found" }) : I || O ? /* @__PURE__ */ r("div", { className: "px-1 py-1 space-y-1", children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ x(
|
|
740
|
+
"div",
|
|
741
|
+
{
|
|
742
|
+
className: "flex items-center gap-2 px-3 py-2 animate-pulse",
|
|
743
|
+
children: [
|
|
744
|
+
f && /* @__PURE__ */ r("div", { className: "w-4 h-4 bg-gray-200 rounded shrink-0" }),
|
|
745
|
+
/* @__PURE__ */ r("div", { className: "h-4 bg-gray-200 rounded w-full" })
|
|
746
|
+
]
|
|
747
|
+
},
|
|
750
748
|
t
|
|
751
|
-
)
|
|
752
|
-
return /* @__PURE__ */ g(
|
|
749
|
+
)) }) : /* @__PURE__ */ r(
|
|
753
750
|
"div",
|
|
754
751
|
{
|
|
755
|
-
"data-index": e.index,
|
|
756
|
-
ref: P.measureElement,
|
|
757
|
-
className: "absolute left-0 w-full pb-[2px]",
|
|
758
752
|
style: {
|
|
759
|
-
|
|
760
|
-
width: "100%"
|
|
753
|
+
height: `${A.getTotalSize()}px`,
|
|
754
|
+
width: "100%",
|
|
755
|
+
position: "relative"
|
|
761
756
|
},
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
757
|
+
children: A.getVirtualItems().map((e) => {
|
|
758
|
+
const t = m[e.index], l = f ? S.mode === "exclude" ? !S.set.has(t.value) : S.set.has(t.value) : d?.value === t.value, s = d || [], n = f && g ? T(s) ? !1 : V(s) && s.length >= g : !1, i = t.isDisabled || n && !l && !(P && t.isGroup) && !(y && t.isSubmenuParent), a = P && t.isGroup || y && t.isSubmenuParent ? ge(t.original) : void 0, c = a?.selected || 0, o = a?.total || 0, h = c > 0 && c < o, le = t.isParentSelectable !== !1, ve = k || "default", ne = String(t.value || ""), ye = te(
|
|
759
|
+
t
|
|
760
|
+
), mt = typeof ye == "string" ? ye : ne;
|
|
761
|
+
return /* @__PURE__ */ x(
|
|
765
762
|
"div",
|
|
766
763
|
{
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
l && !i && !(k && t.isGroup) && !(y && t.isSubmenuParent) ? "bg-[#edf0ff] text-[#1f2b4d]" : "text-[#1f2b4d]",
|
|
771
|
-
D === e.index && !i && "ring-2 ring-inset ring-primary bg-[#edf0ff]"
|
|
772
|
-
),
|
|
764
|
+
"data-index": e.index,
|
|
765
|
+
ref: A.measureElement,
|
|
766
|
+
className: "absolute left-0 w-full pb-[2px]",
|
|
773
767
|
style: {
|
|
774
|
-
|
|
768
|
+
transform: `translateY(${e.start}px)`,
|
|
769
|
+
width: "100%"
|
|
775
770
|
},
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
if (y && t.isSubmenuParent) {
|
|
781
|
-
oe(t.value);
|
|
782
|
-
const B = M.currentTarget.getBoundingClientRect();
|
|
783
|
-
t.rect = B;
|
|
784
|
-
} else
|
|
785
|
-
oe(null);
|
|
786
|
-
},
|
|
787
|
-
"data-testid": `select-option-${me}-${le}`,
|
|
788
|
-
"data-state": l ? "checked" : "unchecked",
|
|
789
|
-
"data-disabled": i || void 0,
|
|
790
|
-
"data-component": "select-option",
|
|
791
|
-
role: "option",
|
|
792
|
-
"aria-selected": l,
|
|
793
|
-
"aria-disabled": i || void 0,
|
|
794
|
-
children: Ne ? Ne(
|
|
795
|
-
{
|
|
796
|
-
onClick: () => {
|
|
797
|
-
},
|
|
798
|
-
className: "w-full",
|
|
799
|
-
selected: l,
|
|
800
|
-
disabled: i
|
|
801
|
-
},
|
|
802
|
-
t
|
|
803
|
-
) : /* @__PURE__ */ g("div", { className: "flex items-center flex-1 overflow-hidden", children: [
|
|
804
|
-
f && (k && t.isGroup || y && t.isSubmenuParent ? te : !0) && /* @__PURE__ */ a(
|
|
805
|
-
Ge,
|
|
806
|
-
{
|
|
807
|
-
checked: h ? "indeterminate" : l,
|
|
808
|
-
disabled: i || m,
|
|
809
|
-
onChange: () => {
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
),
|
|
813
|
-
ve && !(k && t.isGroup) && !(y && t.isSubmenuParent) ? /* @__PURE__ */ a(
|
|
814
|
-
ht,
|
|
771
|
+
"data-testid": `select-option-wrapper-${ve}-${ne}`,
|
|
772
|
+
children: [
|
|
773
|
+
/* @__PURE__ */ r(
|
|
774
|
+
"div",
|
|
815
775
|
{
|
|
816
|
-
|
|
817
|
-
|
|
776
|
+
className: w(
|
|
777
|
+
"cursor-default select-none py-[6px] px-3 flex items-center justify-between transition-colors rounded-md",
|
|
778
|
+
i ? "opacity-50 cursor-not-allowed bg-[#f5f5f5]" : p ? "cursor-default" : "hover:bg-gray-100 cursor-pointer",
|
|
779
|
+
l && !i && !(P && t.isGroup) && !(y && t.isSubmenuParent) ? "bg-[#edf0ff] text-[#1f2b4d]" : "text-[#1f2b4d]",
|
|
780
|
+
D === e.index && !i && "ring-2 ring-inset ring-primary bg-[#edf0ff]"
|
|
818
781
|
),
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
782
|
+
style: {
|
|
783
|
+
paddingLeft: `${t.depth * 16 + 12}px`
|
|
784
|
+
},
|
|
785
|
+
onClick: () => {
|
|
786
|
+
i || (P && t.isGroup || y && t.isSubmenuParent) && !le || ee(t);
|
|
787
|
+
},
|
|
788
|
+
onMouseEnter: (G) => {
|
|
789
|
+
if (y && t.isSubmenuParent) {
|
|
790
|
+
me(t.value);
|
|
791
|
+
const B = G.currentTarget.getBoundingClientRect();
|
|
792
|
+
t.rect = B;
|
|
793
|
+
} else
|
|
794
|
+
me(null);
|
|
795
|
+
},
|
|
796
|
+
"data-testid": `select-option-${ve}-${ne}`,
|
|
797
|
+
"data-state": l ? "checked" : "unchecked",
|
|
798
|
+
"data-disabled": i || void 0,
|
|
799
|
+
"data-component": "select-option",
|
|
800
|
+
role: "option",
|
|
801
|
+
"aria-selected": l,
|
|
802
|
+
"aria-disabled": i || void 0,
|
|
803
|
+
children: Pe ? Pe(
|
|
804
|
+
{
|
|
805
|
+
onClick: () => {
|
|
806
|
+
},
|
|
807
|
+
className: "w-full",
|
|
808
|
+
selected: l,
|
|
809
|
+
disabled: i
|
|
810
|
+
},
|
|
811
|
+
t
|
|
812
|
+
) : /* @__PURE__ */ x("div", { className: "flex items-center flex-1 overflow-hidden", children: [
|
|
813
|
+
f && (P && t.isGroup || y && t.isSubmenuParent ? le : !0) && /* @__PURE__ */ r(
|
|
814
|
+
Ge,
|
|
815
|
+
{
|
|
816
|
+
checked: h ? "indeterminate" : l,
|
|
817
|
+
disabled: i || p,
|
|
818
|
+
onChange: () => {
|
|
819
|
+
}
|
|
820
|
+
}
|
|
829
821
|
),
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
822
|
+
Ve && !(P && t.isGroup) && !(y && t.isSubmenuParent) ? /* @__PURE__ */ r(
|
|
823
|
+
xt,
|
|
824
|
+
{
|
|
825
|
+
label: te(
|
|
826
|
+
t
|
|
827
|
+
),
|
|
828
|
+
sequence: ct(t)
|
|
829
|
+
}
|
|
830
|
+
) : /* @__PURE__ */ x("div", { className: "flex items-center gap-2 overflow-hidden w-full", children: [
|
|
831
|
+
/* @__PURE__ */ r(
|
|
832
|
+
"span",
|
|
833
|
+
{
|
|
834
|
+
className: w(
|
|
835
|
+
"block truncate",
|
|
836
|
+
P && t.isGroup ? "text-xs font-semibold text-gray-400 uppercase tracking-wider" : l && !(y && t.isSubmenuParent) ? "font-medium" : "font-normal",
|
|
837
|
+
!(P && t.isGroup) && "text-[14px]"
|
|
838
|
+
),
|
|
839
|
+
"data-testid": `select-option-label-${ve}-${ne}`,
|
|
840
|
+
"data-state": l ? "checked" : "unchecked",
|
|
841
|
+
title: mt,
|
|
842
|
+
children: ye
|
|
843
|
+
}
|
|
844
|
+
),
|
|
845
|
+
(P && t.isGroup || y && t.isSubmenuParent) && c > 0 && /* @__PURE__ */ r("span", { className: "inline-flex items-center justify-center px-1.5 py-0.5 rounded-full text-xs font-medium bg-indigo-100 text-indigo-800", children: c })
|
|
846
|
+
] }),
|
|
847
|
+
y && t.isSubmenuParent && /* @__PURE__ */ r(
|
|
848
|
+
ze,
|
|
849
|
+
{
|
|
850
|
+
size: "12px",
|
|
851
|
+
className: "text-gray-400"
|
|
852
|
+
}
|
|
853
|
+
)
|
|
854
|
+
] })
|
|
855
|
+
}
|
|
856
|
+
),
|
|
857
|
+
y && it === t.value && t.isSubmenuParent && t.rect && /* @__PURE__ */ r(
|
|
858
|
+
gt,
|
|
840
859
|
{
|
|
841
|
-
|
|
842
|
-
|
|
860
|
+
parentOption: t,
|
|
861
|
+
isMulti: !!f,
|
|
862
|
+
isReadOnly: !!p,
|
|
863
|
+
isSelected: (G) => wt(G, d, !!f),
|
|
864
|
+
getIndeterminateState: (G) => {
|
|
865
|
+
const B = ge(G);
|
|
866
|
+
return B ? B.selected > 0 && B.selected < B.total : !1;
|
|
867
|
+
},
|
|
868
|
+
getSelectedCount: (G) => ge(G)?.selected || 0,
|
|
869
|
+
handleSelect: ee,
|
|
870
|
+
id: k
|
|
843
871
|
}
|
|
844
872
|
)
|
|
845
|
-
]
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
e.key
|
|
867
|
-
);
|
|
868
|
-
})
|
|
869
|
-
}
|
|
870
|
-
)
|
|
873
|
+
]
|
|
874
|
+
},
|
|
875
|
+
e.key
|
|
876
|
+
);
|
|
877
|
+
})
|
|
878
|
+
}
|
|
879
|
+
)
|
|
880
|
+
}
|
|
881
|
+
),
|
|
882
|
+
(Ne || g || F.length > 5e3) && /* @__PURE__ */ r("div", { className: "px-3 py-[10px] border-t border-solid border-gray-100 z-10 sticky bottom-0 bg-white", children: g ? /* @__PURE__ */ x("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
|
|
883
|
+
/* @__PURE__ */ r(ie, { size: "12px", className: "text-gray-400" }),
|
|
884
|
+
/* @__PURE__ */ x("span", { className: "text-xs font-medium leading-4 text-[#60697d]", children: [
|
|
885
|
+
"Maximum ",
|
|
886
|
+
g,
|
|
887
|
+
" selections"
|
|
888
|
+
] })
|
|
889
|
+
] }) : F.length > 5e3 ? /* @__PURE__ */ x("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
|
|
890
|
+
/* @__PURE__ */ r(ie, { size: "12px", className: "text-gray-400" }),
|
|
891
|
+
/* @__PURE__ */ r("span", { className: "text-xs font-medium leading-4 text-[#60697d]", children: "Large dataset detected. Operations might be slower." })
|
|
892
|
+
] }) : Ne })
|
|
893
|
+
]
|
|
871
894
|
}
|
|
872
|
-
)
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
"
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
895
|
+
) })
|
|
896
|
+
] }),
|
|
897
|
+
U && oe === "absolute" && /* @__PURE__ */ x(
|
|
898
|
+
"p",
|
|
899
|
+
{
|
|
900
|
+
className: w(
|
|
901
|
+
"absolute left-0 top-full z-10 mt-1 flex min-w-0 max-w-full items-center gap-1 text-[12px] font-medium leading-[18px]",
|
|
902
|
+
ae ? "text-[#e15554]" : "text-gray-500"
|
|
903
|
+
),
|
|
904
|
+
children: [
|
|
905
|
+
/* @__PURE__ */ r(ie, { size: "xs", className: "shrink-0" }),
|
|
906
|
+
/* @__PURE__ */ r("span", { className: "min-w-0", children: U })
|
|
907
|
+
]
|
|
908
|
+
}
|
|
909
|
+
)
|
|
910
|
+
]
|
|
911
|
+
}
|
|
912
|
+
),
|
|
913
|
+
U && oe === "flow" && /* @__PURE__ */ x(
|
|
889
914
|
"p",
|
|
890
915
|
{
|
|
891
|
-
className:
|
|
892
|
-
"text-[12px] mt-1 flex items-center gap-1",
|
|
893
|
-
|
|
916
|
+
className: w(
|
|
917
|
+
"text-[12px] font-medium leading-[18px] mt-1 flex items-center gap-1",
|
|
918
|
+
ae ? "text-[#e15554]" : "text-gray-500"
|
|
894
919
|
),
|
|
895
920
|
children: [
|
|
896
|
-
/* @__PURE__ */
|
|
897
|
-
|
|
921
|
+
/* @__PURE__ */ r(ie, { size: "xs" }),
|
|
922
|
+
U
|
|
898
923
|
]
|
|
899
924
|
}
|
|
900
925
|
)
|
|
@@ -902,7 +927,7 @@ const At = (ge) => {
|
|
|
902
927
|
}
|
|
903
928
|
);
|
|
904
929
|
};
|
|
905
|
-
|
|
930
|
+
Ot.displayName = "Select";
|
|
906
931
|
export {
|
|
907
|
-
|
|
932
|
+
Ot as default
|
|
908
933
|
};
|