impact-nova 1.2.2 → 1.2.4
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/column-menu/column-settings-menu.js +52 -51
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +170 -155
- package/dist/components/ui/calendar.js +2 -3
- package/dist/components/ui/data-table/data-table-column-list.d.ts +1 -2
- package/dist/components/ui/data-table/data-table-column-list.js +120 -121
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/select/select.js +242 -229
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/icons/assets/PivotMode.svg.js +2 -1
- package/dist/icons/assets/alan.svg.js +3 -2
- package/dist/icons/assets/alerts.svg.js +3 -2
- package/dist/icons/assets/analyticalSearch.svg.js +3 -2
- package/dist/icons/assets/back.svg.js +3 -2
- package/dist/icons/assets/backdrop.svg.js +13 -2
- package/dist/icons/assets/backdrop.svg2.js +2 -13
- package/dist/icons/assets/bell.svg.js +3 -2
- package/dist/icons/assets/bin.svg.js +2 -1
- package/dist/icons/assets/blocks.svg.js +3 -2
- package/dist/icons/assets/bookmark.svg.js +3 -2
- package/dist/icons/assets/bookmarkFilled.svg.js +3 -2
- package/dist/icons/assets/box.svg.js +3 -2
- package/dist/icons/assets/calender-month.svg.js +2 -1
- package/dist/icons/assets/calender.svg.js +3 -2
- package/dist/icons/assets/chart.svg.js +3 -2
- package/dist/icons/assets/checkmark.svg.js +3 -2
- package/dist/icons/assets/chevronRight.svg.js +3 -2
- package/dist/icons/assets/collapse.svg.js +3 -2
- package/dist/icons/assets/column.svg.js +3 -2
- package/dist/icons/assets/copy.svg.js +3 -2
- package/dist/icons/assets/createNewDocument.svg.js +3 -2
- package/dist/icons/assets/cross.svg.js +2 -1
- package/dist/icons/assets/delete.svg.js +3 -2
- package/dist/icons/assets/density.svg.js +3 -2
- package/dist/icons/assets/document.svg.js +3 -2
- package/dist/icons/assets/download.svg.js +3 -2
- package/dist/icons/assets/drag.svg.js +3 -2
- package/dist/icons/assets/draw.svg.js +3 -2
- package/dist/icons/assets/email.svg.js +3 -2
- package/dist/icons/assets/errorCircle.svg.js +3 -2
- package/dist/icons/assets/expand.svg.js +3 -2
- package/dist/icons/assets/filter.svg.js +2 -1
- package/dist/icons/assets/fiveSideStar.svg.js +3 -2
- package/dist/icons/assets/floppy.svg.js +2 -1
- package/dist/icons/assets/font.svg.js +3 -2
- package/dist/icons/assets/funnel-hide.svg.js +2 -1
- package/dist/icons/assets/funnel-show.svg.js +3 -2
- package/dist/icons/assets/globe.svg.js +3 -2
- package/dist/icons/assets/hamburger-closed.svg.js +3 -2
- package/dist/icons/assets/hamburger-open.svg.js +3 -2
- package/dist/icons/assets/help-icon.svg.js +3 -2
- package/dist/icons/assets/ia-logo.svg.js +3 -2
- package/dist/icons/assets/illustration_1.svg.js +3 -2
- package/dist/icons/assets/info-icon.svg.js +3 -2
- package/dist/icons/assets/loadingSpinner.svg.js +3 -2
- package/dist/icons/assets/locked.svg.js +3 -2
- package/dist/icons/assets/loginArrow.svg.js +3 -2
- package/dist/icons/assets/matchWith.svg.js +3 -2
- package/dist/icons/assets/message-icon.svg.js +3 -2
- package/dist/icons/assets/more.svg.js +3 -2
- package/dist/icons/assets/multi-color-filter.svg.js +3 -2
- package/dist/icons/assets/paperrocket.svg.js +3 -2
- package/dist/icons/assets/pencil.svg.js +3 -2
- package/dist/icons/assets/person.svg.js +2 -1
- package/dist/icons/assets/pin.svg.js +3 -2
- package/dist/icons/assets/plus.svg.js +3 -2
- package/dist/icons/assets/reset.svg.js +3 -2
- package/dist/icons/assets/rocket.svg.js +3 -2
- package/dist/icons/assets/search.svg.js +3 -2
- package/dist/icons/assets/settings.svg.js +3 -2
- package/dist/icons/assets/shapes.svg.js +3 -2
- package/dist/icons/assets/stack-comfort.svg.js +3 -2
- package/dist/icons/assets/stack-compact.svg.js +3 -2
- package/dist/icons/assets/stack.svg.js +3 -2
- package/dist/icons/assets/store.svg.js +3 -2
- package/dist/icons/assets/table.svg.js +2 -1
- package/dist/icons/assets/three-dots.svg.js +3 -2
- package/dist/icons/assets/trendingDown.svg.js +3 -2
- package/dist/icons/assets/trendingFlat.svg.js +2 -1
- package/dist/icons/assets/trendingNeutral.svg.js +3 -2
- package/dist/icons/assets/trendingUp.svg.js +3 -2
- package/dist/icons/assets/unpin.svg.js +3 -2
- package/dist/icons/assets/upload.svg.js +3 -2
- package/dist/icons/index.js +231 -377
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
- package/dist/icons/assets/PivotMode.svg2.js +0 -5
- package/dist/icons/assets/alan.svg2.js +0 -5
- package/dist/icons/assets/alerts.svg2.js +0 -5
- package/dist/icons/assets/analyticalSearch.svg2.js +0 -5
- package/dist/icons/assets/back.svg2.js +0 -5
- package/dist/icons/assets/bell.svg2.js +0 -5
- package/dist/icons/assets/bin.svg2.js +0 -5
- package/dist/icons/assets/blocks.svg2.js +0 -5
- package/dist/icons/assets/bookmark.svg2.js +0 -5
- package/dist/icons/assets/bookmarkFilled.svg2.js +0 -5
- package/dist/icons/assets/box.svg2.js +0 -5
- package/dist/icons/assets/calender-month.svg2.js +0 -5
- package/dist/icons/assets/calender.svg2.js +0 -5
- package/dist/icons/assets/chart.svg2.js +0 -5
- package/dist/icons/assets/checkmark.svg2.js +0 -5
- package/dist/icons/assets/chevronRight.svg2.js +0 -5
- package/dist/icons/assets/collapse.svg2.js +0 -5
- package/dist/icons/assets/column.svg2.js +0 -5
- package/dist/icons/assets/copy.svg2.js +0 -5
- package/dist/icons/assets/createNewDocument.svg2.js +0 -5
- package/dist/icons/assets/cross.svg2.js +0 -5
- package/dist/icons/assets/delete.svg2.js +0 -5
- package/dist/icons/assets/density.svg2.js +0 -5
- package/dist/icons/assets/document.svg2.js +0 -5
- package/dist/icons/assets/download.svg2.js +0 -5
- package/dist/icons/assets/drag.svg2.js +0 -5
- package/dist/icons/assets/draw.svg2.js +0 -5
- package/dist/icons/assets/email.svg2.js +0 -5
- package/dist/icons/assets/errorCircle.svg2.js +0 -5
- package/dist/icons/assets/expand.svg2.js +0 -5
- package/dist/icons/assets/filter.svg2.js +0 -5
- package/dist/icons/assets/fiveSideStar.svg2.js +0 -5
- package/dist/icons/assets/floppy.svg2.js +0 -5
- package/dist/icons/assets/font.svg2.js +0 -5
- package/dist/icons/assets/funnel-hide.svg2.js +0 -5
- package/dist/icons/assets/funnel-show.svg2.js +0 -5
- package/dist/icons/assets/globe.svg2.js +0 -5
- package/dist/icons/assets/hamburger-closed.svg2.js +0 -5
- package/dist/icons/assets/hamburger-open.svg2.js +0 -5
- package/dist/icons/assets/help-icon.svg2.js +0 -5
- package/dist/icons/assets/ia-logo.svg2.js +0 -5
- package/dist/icons/assets/illustration_1.svg2.js +0 -5
- package/dist/icons/assets/info-icon.svg2.js +0 -5
- package/dist/icons/assets/loadingSpinner.svg2.js +0 -5
- package/dist/icons/assets/locked.svg2.js +0 -5
- package/dist/icons/assets/loginArrow.svg2.js +0 -5
- package/dist/icons/assets/matchWith.svg2.js +0 -5
- package/dist/icons/assets/message-icon.svg2.js +0 -5
- package/dist/icons/assets/more.svg2.js +0 -5
- package/dist/icons/assets/multi-color-filter.svg2.js +0 -5
- package/dist/icons/assets/paperrocket.svg2.js +0 -5
- package/dist/icons/assets/pencil.svg2.js +0 -5
- package/dist/icons/assets/person.svg2.js +0 -5
- package/dist/icons/assets/pin.svg2.js +0 -5
- package/dist/icons/assets/plus.svg2.js +0 -5
- package/dist/icons/assets/reset.svg2.js +0 -5
- package/dist/icons/assets/rocket.svg2.js +0 -5
- package/dist/icons/assets/search.svg2.js +0 -5
- package/dist/icons/assets/settings.svg2.js +0 -5
- package/dist/icons/assets/shapes.svg2.js +0 -5
- package/dist/icons/assets/stack-comfort.svg2.js +0 -5
- package/dist/icons/assets/stack-compact.svg2.js +0 -5
- package/dist/icons/assets/stack.svg2.js +0 -5
- package/dist/icons/assets/store.svg2.js +0 -5
- package/dist/icons/assets/table.svg2.js +0 -5
- package/dist/icons/assets/three-dots.svg2.js +0 -5
- package/dist/icons/assets/trendingDown.svg2.js +0 -5
- package/dist/icons/assets/trendingFlat.svg2.js +0 -5
- package/dist/icons/assets/trendingNeutral.svg2.js +0 -5
- package/dist/icons/assets/trendingUp.svg2.js +0 -5
- package/dist/icons/assets/unpin.svg2.js +0 -5
- package/dist/icons/assets/upload.svg2.js +0 -5
|
@@ -1,114 +1,122 @@
|
|
|
1
|
-
import { jsxs as p, jsx as a, Fragment as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as p, jsx as a, Fragment as st } from "react/jsx-runtime";
|
|
2
|
+
import { useState as q, useRef as M, useEffect as F } from "react";
|
|
3
3
|
import * as Y from "@radix-ui/react-popover";
|
|
4
|
-
import { useVirtualizer as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { LoadingSpinner as
|
|
8
|
-
import { Checkbox as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { cn as
|
|
11
|
-
import { isInvertedSelection as k, isOptionArray as y, isSelected as
|
|
12
|
-
import { useFlattenOptions as
|
|
13
|
-
import { useSelectionModel as
|
|
14
|
-
import { useVisibleStats as
|
|
15
|
-
const
|
|
4
|
+
import { useVirtualizer as it } from "@tanstack/react-virtual";
|
|
5
|
+
import at from "./components/LabelWithSequence.js";
|
|
6
|
+
import rt from "./components/Submenu.js";
|
|
7
|
+
import { LoadingSpinner as ot, Cross as ct, ChevronRight as Ve, Search as ut, Info as se } from "../../../icons/index.js";
|
|
8
|
+
import { Checkbox as Ne } from "../checkbox.js";
|
|
9
|
+
import { Button as dt } from "../button.js";
|
|
10
|
+
import { cn as O } from "../../../lib/utils.js";
|
|
11
|
+
import { isInvertedSelection as k, isOptionArray as y, isSelected as ft, getSequence as mt, getLeafOptions as pt } from "./utils/select.js";
|
|
12
|
+
import { useFlattenOptions as ht } from "./hooks/useFlattenOptions.js";
|
|
13
|
+
import { useSelectionModel as xt } from "./hooks/useSelectionModel.js";
|
|
14
|
+
import { useVisibleStats as bt } from "./hooks/useVisibleStats.js";
|
|
15
|
+
const gt = (ie) => {
|
|
16
16
|
const {
|
|
17
17
|
options: $,
|
|
18
18
|
value: J,
|
|
19
|
-
defaultValue:
|
|
19
|
+
defaultValue: Pe,
|
|
20
20
|
onChange: u,
|
|
21
21
|
isMulti: f,
|
|
22
|
-
isDisabled:
|
|
22
|
+
isDisabled: C,
|
|
23
23
|
isLoading: A,
|
|
24
|
-
isClearable:
|
|
24
|
+
isClearable: Oe = !0,
|
|
25
25
|
isSearchable: E = !0,
|
|
26
|
-
placeholder:
|
|
26
|
+
placeholder: Ce = "Select...",
|
|
27
27
|
// menuPortalTarget is kept for API compatibility but no longer used (Radix handles portalling)
|
|
28
|
-
menuPortalTarget:
|
|
29
|
-
autoFocus:
|
|
30
|
-
closeMenuOnSelect:
|
|
31
|
-
defaultMenuIsOpen:
|
|
32
|
-
scrollToSelectedOnOpen:
|
|
28
|
+
menuPortalTarget: vt,
|
|
29
|
+
autoFocus: ke,
|
|
30
|
+
closeMenuOnSelect: Ae = !f,
|
|
31
|
+
defaultMenuIsOpen: De = !1,
|
|
32
|
+
scrollToSelectedOnOpen: ae = !1,
|
|
33
33
|
maxSelectableOptions: h,
|
|
34
|
-
showSequence:
|
|
35
|
-
selectionOrder:
|
|
36
|
-
label:
|
|
37
|
-
isRequired:
|
|
34
|
+
showSequence: re,
|
|
35
|
+
selectionOrder: Te,
|
|
36
|
+
label: oe,
|
|
37
|
+
isRequired: $e,
|
|
38
38
|
error: K,
|
|
39
|
-
helperText:
|
|
40
|
-
id:
|
|
41
|
-
className:
|
|
42
|
-
parentClassName:
|
|
39
|
+
helperText: ce,
|
|
40
|
+
id: V,
|
|
41
|
+
className: Ge,
|
|
42
|
+
parentClassName: Ie,
|
|
43
43
|
onMenuScrollToBottom: Q,
|
|
44
|
-
name:
|
|
45
|
-
isSelectAllEnabled:
|
|
44
|
+
name: ze,
|
|
45
|
+
isSelectAllEnabled: ue = !0,
|
|
46
46
|
isReadOnly: b = !1,
|
|
47
47
|
searchPosition: R = "menu",
|
|
48
|
-
footerContent:
|
|
49
|
-
onInputChange:
|
|
50
|
-
getOptionLabel:
|
|
51
|
-
renderOption:
|
|
52
|
-
onMenuOpen:
|
|
53
|
-
onMenuClose:
|
|
54
|
-
labelOrientation:
|
|
55
|
-
leftContent:
|
|
56
|
-
ignoreCase:
|
|
57
|
-
ignoreAccents:
|
|
58
|
-
matchFrom:
|
|
59
|
-
stringify:
|
|
60
|
-
trim:
|
|
61
|
-
filterOption:
|
|
48
|
+
footerContent: de,
|
|
49
|
+
onInputChange: Me,
|
|
50
|
+
getOptionLabel: fe,
|
|
51
|
+
renderOption: me,
|
|
52
|
+
onMenuOpen: Fe,
|
|
53
|
+
onMenuClose: pe,
|
|
54
|
+
labelOrientation: he = "top",
|
|
55
|
+
leftContent: xe,
|
|
56
|
+
ignoreCase: Ee,
|
|
57
|
+
ignoreAccents: Re,
|
|
58
|
+
matchFrom: Le,
|
|
59
|
+
stringify: je,
|
|
60
|
+
trim: qe,
|
|
61
|
+
filterOption: He,
|
|
62
62
|
enableSubMenus: v = !1,
|
|
63
|
-
enableGroups:
|
|
64
|
-
fetchError:
|
|
65
|
-
onRefetch:
|
|
66
|
-
menuWidth:
|
|
67
|
-
onClearAll:
|
|
68
|
-
onFocus:
|
|
69
|
-
onBlur:
|
|
70
|
-
} =
|
|
71
|
-
|
|
63
|
+
enableGroups: N = !1,
|
|
64
|
+
fetchError: H,
|
|
65
|
+
onRefetch: be,
|
|
66
|
+
menuWidth: _e,
|
|
67
|
+
onClearAll: ge,
|
|
68
|
+
onFocus: Be,
|
|
69
|
+
onBlur: We
|
|
70
|
+
} = ie, [S, ve] = q(De), [L, _] = q(""), [Ue, Se] = q(null), [d, g] = q(Pe || (f ? [] : null)), [Ye, X] = q(null), Je = M(null), Z = M(null), Ke = M(null), j = M(null), ee = M(null);
|
|
71
|
+
F(() => {
|
|
72
72
|
J !== void 0 && g(J);
|
|
73
|
-
}, [J]),
|
|
73
|
+
}, [J]), F(() => {
|
|
74
74
|
let e;
|
|
75
|
-
return
|
|
76
|
-
|
|
75
|
+
return S && E && R === "menu" && ee.current && (e = setTimeout(() => {
|
|
76
|
+
ee.current?.focus();
|
|
77
77
|
}, 50)), () => {
|
|
78
78
|
e && clearTimeout(e);
|
|
79
79
|
};
|
|
80
|
-
}, [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
}, [S, E, R]), F(() => {
|
|
81
|
+
if (S) {
|
|
82
|
+
const e = requestAnimationFrame(() => {
|
|
83
|
+
Z.current && Se(Z.current.offsetHeight);
|
|
84
|
+
});
|
|
85
|
+
return () => cancelAnimationFrame(e);
|
|
86
|
+
} else
|
|
87
|
+
Se(null);
|
|
88
|
+
}, [S]);
|
|
89
|
+
const { flatOptions: x, isProcessing: P, totalOptionsCount: we, workerSelectAll: Qe } = ht($, L, {
|
|
90
|
+
ignoreCase: Ee,
|
|
91
|
+
ignoreAccents: Re,
|
|
92
|
+
matchFrom: Le,
|
|
93
|
+
stringify: je,
|
|
94
|
+
trim: qe,
|
|
95
|
+
filterOption: He,
|
|
88
96
|
enableSubMenus: v,
|
|
89
|
-
enableGroups:
|
|
90
|
-
}),
|
|
97
|
+
enableGroups: N
|
|
98
|
+
}), w = xt(d, f ?? !1), { stats: G, getGroupStats: te } = bt(
|
|
91
99
|
x,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
100
|
+
we,
|
|
101
|
+
L,
|
|
102
|
+
w,
|
|
95
103
|
d,
|
|
96
104
|
f ?? !1
|
|
97
|
-
), D =
|
|
105
|
+
), D = it({
|
|
98
106
|
count: x.length,
|
|
99
|
-
getScrollElement: () =>
|
|
107
|
+
getScrollElement: () => j.current,
|
|
100
108
|
estimateSize: () => 40,
|
|
101
109
|
overscan: 5
|
|
102
110
|
});
|
|
103
|
-
|
|
104
|
-
if (!
|
|
111
|
+
F(() => {
|
|
112
|
+
if (!S) return;
|
|
105
113
|
const e = requestAnimationFrame(() => {
|
|
106
114
|
D.measure();
|
|
107
115
|
});
|
|
108
116
|
return () => cancelAnimationFrame(e);
|
|
109
|
-
}, [
|
|
110
|
-
if (
|
|
111
|
-
const e = x.findIndex((t) => f ?
|
|
117
|
+
}, [S, D]), F(() => {
|
|
118
|
+
if (S && ae && !P && x.length > 0) {
|
|
119
|
+
const e = x.findIndex((t) => f ? w.mode === "exclude" ? !w.set.has(t.value) : w.set.has(t.value) : d?.value === t.value);
|
|
112
120
|
if (e !== -1) {
|
|
113
121
|
const t = setTimeout(() => {
|
|
114
122
|
D.scrollToIndex(e, { align: "center" });
|
|
@@ -116,47 +124,47 @@ const xt = (se) => {
|
|
|
116
124
|
return () => clearTimeout(t);
|
|
117
125
|
}
|
|
118
126
|
}
|
|
119
|
-
}, [
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
if (!
|
|
127
|
+
}, [S, ae, P, x.length, f, w.mode, w.set, d, D]);
|
|
128
|
+
const I = M(null);
|
|
129
|
+
F(() => {
|
|
130
|
+
if (!j.current || !Q) return;
|
|
123
131
|
const e = () => {
|
|
124
|
-
if (A ||
|
|
125
|
-
const { scrollTop: n, scrollHeight: r, clientHeight: s } =
|
|
132
|
+
if (A || P) return;
|
|
133
|
+
const { scrollTop: n, scrollHeight: r, clientHeight: s } = j.current;
|
|
126
134
|
if (r - n - s <= 10) {
|
|
127
|
-
if (
|
|
128
|
-
Q(),
|
|
129
|
-
|
|
135
|
+
if (I.current) return;
|
|
136
|
+
Q(), I.current = setTimeout(() => {
|
|
137
|
+
I.current = null;
|
|
130
138
|
}, 500);
|
|
131
139
|
}
|
|
132
|
-
}, t =
|
|
133
|
-
return t.addEventListener("scroll", e), !A && !
|
|
134
|
-
t.removeEventListener("scroll", e),
|
|
140
|
+
}, t = j.current;
|
|
141
|
+
return t.addEventListener("scroll", e), !A && !P && e(), () => {
|
|
142
|
+
t.removeEventListener("scroll", e), I.current && (clearTimeout(I.current), I.current = null);
|
|
135
143
|
};
|
|
136
144
|
}, [
|
|
137
145
|
Q,
|
|
138
146
|
x.length,
|
|
139
|
-
|
|
147
|
+
S,
|
|
140
148
|
A,
|
|
141
|
-
|
|
149
|
+
P
|
|
142
150
|
]);
|
|
143
|
-
const
|
|
144
|
-
if (!
|
|
145
|
-
if (
|
|
146
|
-
|
|
151
|
+
const Xe = (e) => {
|
|
152
|
+
if (!C)
|
|
153
|
+
if (ve(e), e)
|
|
154
|
+
Fe?.();
|
|
147
155
|
else {
|
|
148
156
|
const t = d, n = f && y(d) ? d.map((r) => r.value) : void 0;
|
|
149
|
-
|
|
157
|
+
pe?.(t, n), _(""), X(null);
|
|
150
158
|
}
|
|
151
|
-
},
|
|
152
|
-
if (!(
|
|
159
|
+
}, ye = (e) => {
|
|
160
|
+
if (!(C || b || e.isDisabled || ("children" in e || "options" in e) && e.isParentSelectable === !1))
|
|
153
161
|
if (f) {
|
|
154
162
|
const n = d || [];
|
|
155
163
|
if ("children" in e || "options" in e) {
|
|
156
|
-
const s =
|
|
164
|
+
const s = pt(
|
|
157
165
|
e,
|
|
158
166
|
v,
|
|
159
|
-
|
|
167
|
+
N
|
|
160
168
|
).filter((l) => !l.isDisabled);
|
|
161
169
|
if (k(n)) {
|
|
162
170
|
const l = n.excludedValues, i = s.every(
|
|
@@ -166,7 +174,7 @@ const xt = (se) => {
|
|
|
166
174
|
i ? s.forEach((m) => {
|
|
167
175
|
c.includes(m.value) || c.push(m.value);
|
|
168
176
|
}) : c = c.filter(
|
|
169
|
-
(m) => !s.some((
|
|
177
|
+
(m) => !s.some((W) => W.value === m)
|
|
170
178
|
);
|
|
171
179
|
const o = {
|
|
172
180
|
isAllSelected: !0,
|
|
@@ -205,7 +213,7 @@ const xt = (se) => {
|
|
|
205
213
|
option: e
|
|
206
214
|
});
|
|
207
215
|
} else if (y(n)) {
|
|
208
|
-
const r = n, s = f ?
|
|
216
|
+
const r = n, s = f ? w.mode === "exclude" ? !w.set.has(e.value) : w.set.has(e.value) : d?.value === e.value;
|
|
209
217
|
let l = [];
|
|
210
218
|
if (s)
|
|
211
219
|
l = r.filter((i) => i.value !== e.value);
|
|
@@ -223,12 +231,12 @@ const xt = (se) => {
|
|
|
223
231
|
g(e), u && u(e, {
|
|
224
232
|
action: "select-option",
|
|
225
233
|
option: e
|
|
226
|
-
}),
|
|
227
|
-
},
|
|
228
|
-
if (!(!f ||
|
|
234
|
+
}), Ae && (ve(!1), pe?.(e, void 0), _(""));
|
|
235
|
+
}, Ze = async () => {
|
|
236
|
+
if (!(!f || C || b)) {
|
|
229
237
|
if ($.length > 3e3) {
|
|
230
238
|
try {
|
|
231
|
-
const e = await
|
|
239
|
+
const e = await Qe(
|
|
232
240
|
d,
|
|
233
241
|
k(d),
|
|
234
242
|
h
|
|
@@ -238,7 +246,7 @@ const xt = (se) => {
|
|
|
238
246
|
}
|
|
239
247
|
return;
|
|
240
248
|
}
|
|
241
|
-
if (
|
|
249
|
+
if (L) {
|
|
242
250
|
let e = !1;
|
|
243
251
|
for (const n of x)
|
|
244
252
|
if (!n.isGroup && !n.isSubmenuParent && !n.isDisabled) {
|
|
@@ -303,7 +311,7 @@ const xt = (se) => {
|
|
|
303
311
|
}
|
|
304
312
|
} else {
|
|
305
313
|
const e = d, t = k(e) && e.excludedValues.length === 0;
|
|
306
|
-
if (
|
|
314
|
+
if (ie.enableInvertedSelection)
|
|
307
315
|
if (t) {
|
|
308
316
|
const n = y(e) ? e.filter((r) => r.isDisabled) : [];
|
|
309
317
|
g(n), u && u(n, {
|
|
@@ -336,12 +344,12 @@ const xt = (se) => {
|
|
|
336
344
|
}
|
|
337
345
|
}
|
|
338
346
|
}
|
|
339
|
-
},
|
|
347
|
+
}, et = (e) => {
|
|
340
348
|
if (e.stopPropagation(), !b)
|
|
341
349
|
if (f) {
|
|
342
350
|
const t = [], n = (s) => {
|
|
343
351
|
for (const l of s) {
|
|
344
|
-
if (
|
|
352
|
+
if (N && "options" in l) {
|
|
345
353
|
n(
|
|
346
354
|
l.options
|
|
347
355
|
);
|
|
@@ -352,12 +360,12 @@ const xt = (se) => {
|
|
|
352
360
|
continue;
|
|
353
361
|
}
|
|
354
362
|
const i = l;
|
|
355
|
-
i.isDisabled && (
|
|
363
|
+
i.isDisabled && (w.mode === "exclude" ? !w.set.has(i.value) : w.set.has(i.value)) && t.push(i);
|
|
356
364
|
}
|
|
357
365
|
};
|
|
358
366
|
n($);
|
|
359
367
|
const r = t;
|
|
360
|
-
g(r), u && u(r, { action: "clear" }),
|
|
368
|
+
g(r), u && u(r, { action: "clear" }), ge?.();
|
|
361
369
|
} else {
|
|
362
370
|
const t = d;
|
|
363
371
|
if (t) {
|
|
@@ -365,7 +373,7 @@ const xt = (se) => {
|
|
|
365
373
|
const s = (l) => {
|
|
366
374
|
for (const i of l) {
|
|
367
375
|
if (r) return;
|
|
368
|
-
if (
|
|
376
|
+
if (N && "options" in i) {
|
|
369
377
|
if (s(
|
|
370
378
|
i.options
|
|
371
379
|
), r) return;
|
|
@@ -388,19 +396,19 @@ const xt = (se) => {
|
|
|
388
396
|
return;
|
|
389
397
|
}
|
|
390
398
|
const n = null;
|
|
391
|
-
g(n), u && u(n, { action: "clear" }),
|
|
399
|
+
g(n), u && u(n, { action: "clear" }), ge?.();
|
|
392
400
|
}
|
|
393
|
-
},
|
|
401
|
+
}, tt = (e) => mt(
|
|
394
402
|
e,
|
|
395
|
-
|
|
403
|
+
re ?? !1,
|
|
396
404
|
f ?? !1,
|
|
397
|
-
|
|
405
|
+
Te,
|
|
398
406
|
d
|
|
399
|
-
), B = (e) =>
|
|
407
|
+
), B = (e) => fe ? fe(e) : e.label, lt = () => {
|
|
400
408
|
if (f) {
|
|
401
409
|
const e = d || [];
|
|
402
410
|
let t = 0;
|
|
403
|
-
return k(e) ? t =
|
|
411
|
+
return k(e) ? t = we - e.excludedValues.length : y(e) && (t = e.length), t === 0 ? null : t === 1 && y(e) ? /* @__PURE__ */ a("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: B(e[0]) }) : /* @__PURE__ */ p("span", { className: "text-[#1f2b4d] text-[14px] font-medium truncate min-w-0 block", children: [
|
|
404
412
|
"Selected (",
|
|
405
413
|
t,
|
|
406
414
|
")"
|
|
@@ -413,101 +421,101 @@ const xt = (se) => {
|
|
|
413
421
|
return /* @__PURE__ */ p(
|
|
414
422
|
"div",
|
|
415
423
|
{
|
|
416
|
-
className:
|
|
424
|
+
className: O(
|
|
417
425
|
"flex gap-[6px]",
|
|
418
|
-
|
|
419
|
-
|
|
426
|
+
he === "left" ? "w-fit flex-row items-center" : "w-full flex-col",
|
|
427
|
+
Ie
|
|
420
428
|
),
|
|
421
|
-
onFocus:
|
|
422
|
-
onBlur:
|
|
423
|
-
tabIndex:
|
|
424
|
-
"data-testid": `select-${
|
|
429
|
+
onFocus: Be,
|
|
430
|
+
onBlur: We,
|
|
431
|
+
tabIndex: C ? -1 : 0,
|
|
432
|
+
"data-testid": `select-${V || "default"}`,
|
|
425
433
|
"data-component": "select",
|
|
426
434
|
children: [
|
|
427
|
-
|
|
435
|
+
oe && /* @__PURE__ */ p(
|
|
428
436
|
"label",
|
|
429
437
|
{
|
|
430
|
-
className:
|
|
438
|
+
className: O(
|
|
431
439
|
"text-[12px] font-medium text-[#60697d] leading-[18px]",
|
|
432
|
-
|
|
440
|
+
he === "left" ? "shrink-0" : ""
|
|
433
441
|
),
|
|
434
442
|
children: [
|
|
435
|
-
|
|
443
|
+
oe,
|
|
436
444
|
" ",
|
|
437
|
-
|
|
445
|
+
$e && /* @__PURE__ */ a("span", { className: "text-[red]", children: "*" })
|
|
438
446
|
]
|
|
439
447
|
}
|
|
440
448
|
),
|
|
441
|
-
/* @__PURE__ */ p(Y.Root, { open:
|
|
449
|
+
/* @__PURE__ */ p(Y.Root, { open: S, onOpenChange: Xe, children: [
|
|
442
450
|
/* @__PURE__ */ a(Y.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
|
|
443
451
|
"div",
|
|
444
452
|
{
|
|
445
|
-
ref:
|
|
446
|
-
className:
|
|
453
|
+
ref: Je,
|
|
454
|
+
className: O(
|
|
447
455
|
"relative h-[32px] w-full cursor-pointer rounded-[8px] border border-solid px-3 py-1 text-left shadow-sm focus:outline-none sm:text-sm transition-all flex items-center overflow-hidden",
|
|
448
456
|
K ? "border-[#e15554] focus:ring-[#e15554]" : "border-[#c3c8d4] hover:border-gray-400 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500",
|
|
449
|
-
|
|
457
|
+
C ? "bg-[#f2f4fb] cursor-not-allowed opacity-75" : "",
|
|
450
458
|
b ? "cursor-default bg-[#f2f4fb]" : "",
|
|
451
|
-
|
|
452
|
-
!
|
|
453
|
-
|
|
459
|
+
S ? "ring-1 ring-indigo-500 border-indigo-500" : "",
|
|
460
|
+
!C && !b && "bg-white",
|
|
461
|
+
Ge
|
|
454
462
|
),
|
|
455
|
-
id:
|
|
463
|
+
id: V,
|
|
456
464
|
"data-component": "select-trigger",
|
|
457
|
-
"data-disabled":
|
|
458
|
-
"data-state":
|
|
465
|
+
"data-disabled": C || void 0,
|
|
466
|
+
"data-state": S ? "open" : "closed",
|
|
459
467
|
children: /* @__PURE__ */ p("div", { className: "flex items-center justify-between w-full min-w-0 max-w-full", children: [
|
|
460
|
-
|
|
468
|
+
xe && /* @__PURE__ */ a("div", { className: "flex items-center text-gray-500 shrink-0", children: xe }),
|
|
461
469
|
/* @__PURE__ */ p(
|
|
462
470
|
"div",
|
|
463
471
|
{
|
|
464
472
|
className: "flex-1 flex items-center overflow-hidden min-w-0 max-w-full",
|
|
465
|
-
"data-testid": `select-value-${
|
|
473
|
+
"data-testid": `select-value-${V || "default"}`,
|
|
466
474
|
children: [
|
|
467
|
-
|
|
475
|
+
lt() || /* @__PURE__ */ a(
|
|
468
476
|
"span",
|
|
469
477
|
{
|
|
470
478
|
className: "text-[#b4bac7] font-normal text-[14px] truncate min-w-0 block",
|
|
471
|
-
"data-testid": `select-placeholder-${
|
|
479
|
+
"data-testid": `select-placeholder-${V || "default"}`,
|
|
472
480
|
"data-has-value": !1,
|
|
473
|
-
children:
|
|
481
|
+
children: Ce
|
|
474
482
|
}
|
|
475
483
|
),
|
|
476
|
-
E &&
|
|
484
|
+
E && S && R === "trigger" && !b && /* @__PURE__ */ a(
|
|
477
485
|
"input",
|
|
478
486
|
{
|
|
479
|
-
ref:
|
|
487
|
+
ref: Ke,
|
|
480
488
|
type: "text",
|
|
481
489
|
className: "flex-1 min-w-[50px] border-none p-0 focus:ring-0 text-sm outline-none h-full",
|
|
482
|
-
value:
|
|
490
|
+
value: L,
|
|
483
491
|
onChange: (e) => _(e.target.value),
|
|
484
492
|
onClick: (e) => e.stopPropagation(),
|
|
485
|
-
autoFocus:
|
|
486
|
-
name:
|
|
493
|
+
autoFocus: ke,
|
|
494
|
+
name: ze || void 0
|
|
487
495
|
}
|
|
488
496
|
)
|
|
489
497
|
]
|
|
490
498
|
}
|
|
491
499
|
),
|
|
492
|
-
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !
|
|
493
|
-
|
|
500
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !S && (A || P) ? /* @__PURE__ */ a(ot, { size: "14px" }) : /* @__PURE__ */ p(st, { children: [
|
|
501
|
+
Oe && !b && (f && (k(
|
|
494
502
|
d
|
|
495
503
|
) && d.isAllSelected || y(d) && d.length > 0) || !f && d) && /* @__PURE__ */ a(
|
|
496
504
|
"div",
|
|
497
505
|
{
|
|
498
506
|
role: "button",
|
|
499
|
-
onClick:
|
|
507
|
+
onClick: et,
|
|
500
508
|
className: "hover:text-gray-600 p-0.5",
|
|
501
|
-
children: /* @__PURE__ */ a(
|
|
509
|
+
children: /* @__PURE__ */ a(ct, { size: "11px", color: "#758490" })
|
|
502
510
|
}
|
|
503
511
|
),
|
|
504
512
|
/* @__PURE__ */ a(
|
|
505
|
-
|
|
513
|
+
Ve,
|
|
506
514
|
{
|
|
507
515
|
size: "16px",
|
|
508
|
-
className:
|
|
516
|
+
className: O(
|
|
509
517
|
"transition-transform duration-200",
|
|
510
|
-
|
|
518
|
+
S ? "-rotate-90" : "rotate-90"
|
|
511
519
|
)
|
|
512
520
|
}
|
|
513
521
|
)
|
|
@@ -518,7 +526,7 @@ const xt = (se) => {
|
|
|
518
526
|
/* @__PURE__ */ a(Y.Portal, { children: /* @__PURE__ */ p(
|
|
519
527
|
Y.Content,
|
|
520
528
|
{
|
|
521
|
-
ref:
|
|
529
|
+
ref: Z,
|
|
522
530
|
side: "bottom",
|
|
523
531
|
sideOffset: 4,
|
|
524
532
|
align: "start",
|
|
@@ -527,64 +535,67 @@ const xt = (se) => {
|
|
|
527
535
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
528
536
|
onInteractOutside: () => {
|
|
529
537
|
},
|
|
538
|
+
onWheel: (e) => e.stopPropagation(),
|
|
539
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
530
540
|
style: {
|
|
531
|
-
width:
|
|
541
|
+
width: _e || "var(--radix-popover-trigger-width)",
|
|
542
|
+
minHeight: Ue ?? void 0
|
|
532
543
|
},
|
|
533
|
-
className:
|
|
544
|
+
className: O(
|
|
534
545
|
"z-50 max-h-80 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",
|
|
535
546
|
b ? "bg-[#f5f5f5]" : "bg-white"
|
|
536
547
|
),
|
|
537
|
-
"data-testid": `select-menu-${
|
|
548
|
+
"data-testid": `select-menu-${V || "default"}`,
|
|
538
549
|
"data-component": "select-menu",
|
|
539
550
|
children: [
|
|
540
551
|
/* @__PURE__ */ p(
|
|
541
552
|
"div",
|
|
542
553
|
{
|
|
543
|
-
className:
|
|
554
|
+
className: O(
|
|
544
555
|
"flex flex-col z-10 sticky top-0 px-[6px] pt-[8px]",
|
|
545
556
|
b ? "bg-[#f5f5f5]" : "bg-white",
|
|
546
|
-
!
|
|
557
|
+
!H && (E && R === "menu" && !b || f && ue && !b && x.length > 0) ? "border-b border-solid border-gray-100" : ""
|
|
547
558
|
),
|
|
548
559
|
children: [
|
|
549
|
-
E && R === "menu" && !b && !
|
|
560
|
+
E && R === "menu" && !b && !H && /* @__PURE__ */ a(
|
|
550
561
|
"div",
|
|
551
562
|
{
|
|
552
563
|
className: "p-0",
|
|
553
|
-
"data-testid": `select-search-container-${
|
|
564
|
+
"data-testid": `select-search-container-${V || "default"}`,
|
|
554
565
|
children: /* @__PURE__ */ p("div", { className: "relative", children: [
|
|
555
|
-
/* @__PURE__ */ a("div", { className: "absolute inset-y-0 left-[12px] flex items-center pointer-events-none", children: /* @__PURE__ */ a(
|
|
566
|
+
/* @__PURE__ */ a("div", { className: "absolute inset-y-0 left-[12px] flex items-center pointer-events-none", children: /* @__PURE__ */ a(ut, { size: "14px", color: "#AFAFAF" }) }),
|
|
556
567
|
/* @__PURE__ */ a(
|
|
557
568
|
"input",
|
|
558
569
|
{
|
|
559
|
-
ref:
|
|
570
|
+
ref: ee,
|
|
560
571
|
type: "text",
|
|
561
572
|
className: "block w-full pl-[34px] pr-4 h-[35px] border-none border-b border-primary text-sm outline-none focus:ring-0",
|
|
562
573
|
placeholder: "Search here...",
|
|
563
|
-
value:
|
|
574
|
+
value: L,
|
|
564
575
|
onChange: (e) => {
|
|
565
|
-
_(e.target.value),
|
|
576
|
+
_(e.target.value), Me?.(e.target.value);
|
|
566
577
|
},
|
|
567
578
|
onClick: (e) => e.stopPropagation(),
|
|
568
|
-
"data-testid": `select-search-input-${
|
|
579
|
+
"data-testid": `select-search-input-${V || "default"}`
|
|
569
580
|
}
|
|
570
581
|
)
|
|
571
582
|
] })
|
|
572
583
|
}
|
|
573
584
|
),
|
|
574
|
-
!A && !
|
|
585
|
+
!A && !P && !H && f && ue && !b && x.length > 0 && /* @__PURE__ */ a(
|
|
575
586
|
"div",
|
|
576
587
|
{
|
|
577
588
|
className: "pb-1",
|
|
578
|
-
"data-testid": `select-select-all-container-${
|
|
589
|
+
"data-testid": `select-select-all-container-${V || "default"}`,
|
|
579
590
|
children: /* @__PURE__ */ a(
|
|
580
591
|
"div",
|
|
581
592
|
{
|
|
582
593
|
className: "flex items-center justify-between cursor-pointer rounded-md hover:bg-gray-100 transition-colors py-[6px] px-3 w-full",
|
|
583
|
-
onClick:
|
|
584
|
-
"data-testid": `select-select-all-button-${
|
|
594
|
+
onClick: Ze,
|
|
595
|
+
"data-testid": `select-select-all-button-${V || "default"}`,
|
|
585
596
|
children: /* @__PURE__ */ p("div", { className: "flex items-center flex-1", children: [
|
|
586
597
|
/* @__PURE__ */ a("div", { className: "pointer-events-none flex", children: /* @__PURE__ */ a(
|
|
587
|
-
|
|
598
|
+
Ne,
|
|
588
599
|
{
|
|
589
600
|
checked: (() => {
|
|
590
601
|
const { totalVisible: e, selectedVisible: t } = G;
|
|
@@ -592,17 +603,17 @@ const xt = (se) => {
|
|
|
592
603
|
const n = h ? Math.min(e, h) : e;
|
|
593
604
|
return t > 0 && t < n ? "indeterminate" : t >= n;
|
|
594
605
|
})(),
|
|
595
|
-
disabled:
|
|
606
|
+
disabled: C || b,
|
|
596
607
|
onChange: () => {
|
|
597
608
|
},
|
|
598
|
-
"data-testid": `select-select-all-checkbox-${
|
|
609
|
+
"data-testid": `select-select-all-checkbox-${V || "default"}`
|
|
599
610
|
}
|
|
600
611
|
) }),
|
|
601
612
|
/* @__PURE__ */ a(
|
|
602
613
|
"span",
|
|
603
614
|
{
|
|
604
615
|
className: "text-sm font-medium text-gray-700",
|
|
605
|
-
"data-testid": `select-select-all-label-${
|
|
616
|
+
"data-testid": `select-select-all-label-${V || "default"}`,
|
|
606
617
|
children: (() => {
|
|
607
618
|
const { totalVisible: e, selectedVisible: t } = G, n = h ? Math.min(e, h) : e;
|
|
608
619
|
return e > 0 && t >= n ? "Unselect All" : "Select All";
|
|
@@ -620,21 +631,23 @@ const xt = (se) => {
|
|
|
620
631
|
/* @__PURE__ */ a(
|
|
621
632
|
"div",
|
|
622
633
|
{
|
|
623
|
-
ref:
|
|
634
|
+
ref: j,
|
|
624
635
|
className: "flex-1 overflow-auto py-1 px-[6px]",
|
|
625
|
-
style: { maxHeight: "300px" },
|
|
626
|
-
|
|
636
|
+
style: { maxHeight: "300px", overscrollBehavior: "contain" },
|
|
637
|
+
onWheel: (e) => e.stopPropagation(),
|
|
638
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
639
|
+
children: H ? /* @__PURE__ */ p("div", { className: "flex flex-col items-center justify-center py-8 px-4 text-center", children: [
|
|
627
640
|
/* @__PURE__ */ a("p", { className: "text-sm text-gray-500 font-medium mb-3", children: "Something went wrong" }),
|
|
628
|
-
|
|
629
|
-
|
|
641
|
+
be && /* @__PURE__ */ a(
|
|
642
|
+
dt,
|
|
630
643
|
{
|
|
631
644
|
size: "sm",
|
|
632
645
|
variant: "outline",
|
|
633
|
-
onClick: () =>
|
|
646
|
+
onClick: () => be(),
|
|
634
647
|
children: "Refetch"
|
|
635
648
|
}
|
|
636
649
|
)
|
|
637
|
-
] }) : x.length === 0 && !A && !
|
|
650
|
+
] }) : x.length === 0 && !A && !P ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-8 text-sm text-gray-500", children: "No options found" }) : A || P ? /* @__PURE__ */ a("div", { className: "px-1 py-1 space-y-1", children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ p(
|
|
638
651
|
"div",
|
|
639
652
|
{
|
|
640
653
|
className: "flex items-center gap-2 px-3 py-2 animate-pulse",
|
|
@@ -653,9 +666,9 @@ const xt = (se) => {
|
|
|
653
666
|
position: "relative"
|
|
654
667
|
},
|
|
655
668
|
children: D.getVirtualItems().map((e) => {
|
|
656
|
-
const t = x[e.index], n = f ?
|
|
669
|
+
const t = x[e.index], n = f ? w.mode === "exclude" ? !w.set.has(t.value) : w.set.has(t.value) : d?.value === t.value, r = d || [], s = f && h ? k(r) ? !1 : y(r) && r.length >= h : !1, l = t.isDisabled || s && !n && !(N && t.isGroup) && !(v && t.isSubmenuParent), i = N && t.isGroup || v && t.isSubmenuParent ? te(t.original) : void 0, c = i?.selected || 0, o = i?.total || 0, m = c > 0 && c < o, W = t.isParentSelectable !== !1, le = V || "default", U = String(t.value || ""), ne = B(
|
|
657
670
|
t
|
|
658
|
-
),
|
|
671
|
+
), nt = typeof ne == "string" ? ne : U;
|
|
659
672
|
return /* @__PURE__ */ p(
|
|
660
673
|
"div",
|
|
661
674
|
{
|
|
@@ -666,35 +679,35 @@ const xt = (se) => {
|
|
|
666
679
|
transform: `translateY(${e.start}px)`,
|
|
667
680
|
width: "100%"
|
|
668
681
|
},
|
|
669
|
-
"data-testid": `select-option-wrapper-${
|
|
682
|
+
"data-testid": `select-option-wrapper-${le}-${U}`,
|
|
670
683
|
children: [
|
|
671
684
|
/* @__PURE__ */ a(
|
|
672
685
|
"div",
|
|
673
686
|
{
|
|
674
|
-
className:
|
|
687
|
+
className: O(
|
|
675
688
|
"cursor-default select-none py-[6px] px-3 flex items-center justify-between transition-colors rounded-md",
|
|
676
689
|
l ? "opacity-50 cursor-not-allowed bg-[#f5f5f5]" : b ? "cursor-default" : "hover:bg-gray-100 cursor-pointer",
|
|
677
|
-
n && !l && !(
|
|
690
|
+
n && !l && !(N && t.isGroup) && !(v && t.isSubmenuParent) ? "bg-[#edf0ff] text-[#1f2b4d]" : "text-[#1f2b4d]"
|
|
678
691
|
),
|
|
679
692
|
style: {
|
|
680
693
|
paddingLeft: `${t.depth * 16 + 12}px`
|
|
681
694
|
},
|
|
682
695
|
onClick: () => {
|
|
683
|
-
l || (
|
|
696
|
+
l || (N && t.isGroup || v && t.isSubmenuParent) && !W || ye(t);
|
|
684
697
|
},
|
|
685
698
|
onMouseEnter: (T) => {
|
|
686
699
|
if (v && t.isSubmenuParent) {
|
|
687
700
|
X(t.value);
|
|
688
|
-
const
|
|
689
|
-
t.rect =
|
|
701
|
+
const z = T.currentTarget.getBoundingClientRect();
|
|
702
|
+
t.rect = z;
|
|
690
703
|
} else
|
|
691
704
|
X(null);
|
|
692
705
|
},
|
|
693
|
-
"data-testid": `select-option-${
|
|
706
|
+
"data-testid": `select-option-${le}-${U}`,
|
|
694
707
|
"data-state": n ? "checked" : "unchecked",
|
|
695
708
|
"data-disabled": l || void 0,
|
|
696
709
|
"data-component": "select-option",
|
|
697
|
-
children:
|
|
710
|
+
children: me ? me(
|
|
698
711
|
{
|
|
699
712
|
onClick: () => {
|
|
700
713
|
},
|
|
@@ -704,8 +717,8 @@ const xt = (se) => {
|
|
|
704
717
|
},
|
|
705
718
|
t
|
|
706
719
|
) : /* @__PURE__ */ p("div", { className: "flex items-center flex-1 overflow-hidden", children: [
|
|
707
|
-
f && (
|
|
708
|
-
|
|
720
|
+
f && (N && t.isGroup || v && t.isSubmenuParent ? W : !0) && /* @__PURE__ */ a(
|
|
721
|
+
Ne,
|
|
709
722
|
{
|
|
710
723
|
checked: m ? "indeterminate" : n,
|
|
711
724
|
disabled: l || b,
|
|
@@ -713,33 +726,33 @@ const xt = (se) => {
|
|
|
713
726
|
}
|
|
714
727
|
}
|
|
715
728
|
),
|
|
716
|
-
|
|
717
|
-
|
|
729
|
+
re && !(N && t.isGroup) && !(v && t.isSubmenuParent) ? /* @__PURE__ */ a(
|
|
730
|
+
at,
|
|
718
731
|
{
|
|
719
732
|
label: B(
|
|
720
733
|
t
|
|
721
734
|
),
|
|
722
|
-
sequence:
|
|
735
|
+
sequence: tt(t)
|
|
723
736
|
}
|
|
724
737
|
) : /* @__PURE__ */ p("div", { className: "flex items-center gap-2 overflow-hidden w-full", children: [
|
|
725
738
|
/* @__PURE__ */ a(
|
|
726
739
|
"span",
|
|
727
740
|
{
|
|
728
|
-
className:
|
|
741
|
+
className: O(
|
|
729
742
|
"block truncate",
|
|
730
|
-
|
|
731
|
-
!(
|
|
743
|
+
N && t.isGroup ? "text-xs font-semibold text-gray-400 uppercase tracking-wider" : n && !(v && t.isSubmenuParent) ? "font-medium" : "font-normal",
|
|
744
|
+
!(N && t.isGroup) && "text-[14px]"
|
|
732
745
|
),
|
|
733
|
-
"data-testid": `select-option-label-${
|
|
746
|
+
"data-testid": `select-option-label-${le}-${U}`,
|
|
734
747
|
"data-state": n ? "checked" : "unchecked",
|
|
735
|
-
title:
|
|
736
|
-
children:
|
|
748
|
+
title: nt,
|
|
749
|
+
children: ne
|
|
737
750
|
}
|
|
738
751
|
),
|
|
739
|
-
(
|
|
752
|
+
(N && t.isGroup || v && t.isSubmenuParent) && c > 0 && /* @__PURE__ */ a("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 })
|
|
740
753
|
] }),
|
|
741
754
|
v && t.isSubmenuParent && /* @__PURE__ */ a(
|
|
742
|
-
|
|
755
|
+
Ve,
|
|
743
756
|
{
|
|
744
757
|
size: "12px",
|
|
745
758
|
className: "text-gray-400"
|
|
@@ -748,20 +761,20 @@ const xt = (se) => {
|
|
|
748
761
|
] })
|
|
749
762
|
}
|
|
750
763
|
),
|
|
751
|
-
v &&
|
|
752
|
-
|
|
764
|
+
v && Ye === t.value && t.isSubmenuParent && t.rect && /* @__PURE__ */ a(
|
|
765
|
+
rt,
|
|
753
766
|
{
|
|
754
767
|
parentOption: t,
|
|
755
768
|
isMulti: !!f,
|
|
756
769
|
isReadOnly: !!b,
|
|
757
|
-
isSelected: (T) =>
|
|
770
|
+
isSelected: (T) => ft(T, d, !!f),
|
|
758
771
|
getIndeterminateState: (T) => {
|
|
759
|
-
const
|
|
760
|
-
return
|
|
772
|
+
const z = te(T);
|
|
773
|
+
return z ? z.selected > 0 && z.selected < z.total : !1;
|
|
761
774
|
},
|
|
762
|
-
getSelectedCount: (T) =>
|
|
763
|
-
handleSelect:
|
|
764
|
-
id:
|
|
775
|
+
getSelectedCount: (T) => te(T)?.selected || 0,
|
|
776
|
+
handleSelect: ye,
|
|
777
|
+
id: V
|
|
765
778
|
}
|
|
766
779
|
)
|
|
767
780
|
]
|
|
@@ -773,31 +786,31 @@ const xt = (se) => {
|
|
|
773
786
|
)
|
|
774
787
|
}
|
|
775
788
|
),
|
|
776
|
-
(
|
|
777
|
-
/* @__PURE__ */ a(
|
|
789
|
+
(de || h || $.length > 5e3) && /* @__PURE__ */ a("div", { className: "px-3 py-[10px] border-t border-solid border-gray-100 z-10 sticky bottom-0 bg-white", children: h ? /* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
|
|
790
|
+
/* @__PURE__ */ a(se, { size: "12px", className: "text-gray-400" }),
|
|
778
791
|
/* @__PURE__ */ p("span", { className: "text-xs font-medium leading-4 text-[#60697d]", children: [
|
|
779
792
|
"Maximum ",
|
|
780
793
|
h,
|
|
781
794
|
" selections"
|
|
782
795
|
] })
|
|
783
796
|
] }) : $.length > 5e3 ? /* @__PURE__ */ p("div", { className: "flex items-center gap-2 text-gray-500 px-2", children: [
|
|
784
|
-
/* @__PURE__ */ a(
|
|
797
|
+
/* @__PURE__ */ a(se, { size: "12px", className: "text-gray-400" }),
|
|
785
798
|
/* @__PURE__ */ a("span", { className: "text-xs font-medium leading-4 text-[#60697d]", children: "Large dataset detected. Operations might be slower." })
|
|
786
|
-
] }) :
|
|
799
|
+
] }) : de })
|
|
787
800
|
]
|
|
788
801
|
}
|
|
789
802
|
) })
|
|
790
803
|
] }),
|
|
791
|
-
|
|
804
|
+
ce && /* @__PURE__ */ p(
|
|
792
805
|
"p",
|
|
793
806
|
{
|
|
794
|
-
className:
|
|
807
|
+
className: O(
|
|
795
808
|
"text-[12px] mt-1 flex items-center gap-1",
|
|
796
809
|
K ? "text-[#e15554]" : "text-gray-500"
|
|
797
810
|
),
|
|
798
811
|
children: [
|
|
799
|
-
K && /* @__PURE__ */ a(
|
|
800
|
-
|
|
812
|
+
K && /* @__PURE__ */ a(se, { size: "12px" }),
|
|
813
|
+
ce
|
|
801
814
|
]
|
|
802
815
|
}
|
|
803
816
|
)
|
|
@@ -805,7 +818,7 @@ const xt = (se) => {
|
|
|
805
818
|
}
|
|
806
819
|
);
|
|
807
820
|
};
|
|
808
|
-
|
|
821
|
+
gt.displayName = "Select";
|
|
809
822
|
export {
|
|
810
|
-
|
|
823
|
+
gt as default
|
|
811
824
|
};
|