@slotted/react 0.1.0-beta.0 → 0.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/{action-sheet-D8Glxl7l.js → action-sheet-DgwzC3iY.js} +1 -1
- package/dist/action-sheet.js +1 -1
- package/dist/{chart-BNzfIfQe.js → chart-Gb_P3Kdq.js} +344 -333
- package/dist/chart.js +1 -1
- package/dist/{column-manager-CNZ7Xk5_.js → column-manager-B7_a_jDK.js} +1 -1
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-C46GRqAA.js → combobox-C66dNlMR.js} +176 -172
- package/dist/combobox.js +1 -1
- package/dist/dashboard-grid-CKdyO4j6.js +1043 -0
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-BUgOJuGp.js → data-grid-rWMDNl-6.js} +2 -2
- package/dist/data-grid.js +1 -1
- package/dist/docs/AGENTS.snippet.md +10 -0
- package/dist/docs/event-calendar.json +7 -0
- package/dist/docs/event-calendar.md +1 -0
- package/dist/docs/guidelines/README.md +27 -0
- package/dist/docs/guidelines/async-feedback.md +108 -0
- package/dist/docs/guidelines/browsing.md +74 -0
- package/dist/docs/guidelines/builders.md +97 -0
- package/dist/docs/guidelines/composition.md +129 -0
- package/dist/docs/guidelines/conversations.md +59 -0
- package/dist/docs/guidelines/errors-and-conflicts.md +71 -0
- package/dist/docs/guidelines/forms.md +192 -0
- package/dist/docs/guidelines/index.md +121 -0
- package/dist/docs/guidelines/layout-alignment.md +95 -0
- package/dist/docs/guidelines/ledgers.md +45 -0
- package/dist/docs/guidelines/list-pages.md +165 -0
- package/dist/docs/guidelines/overviews.md +66 -0
- package/dist/docs/guidelines/own-elements.md +115 -0
- package/dist/docs/guidelines/reading-permissions.md +55 -0
- package/dist/docs/guidelines/record-pages.md +178 -0
- package/dist/docs/guidelines/reports.md +123 -0
- package/dist/docs/guidelines/shell-composition.md +94 -0
- package/dist/docs/guidelines/workspaces.md +46 -0
- package/dist/docs/index.md +12 -0
- package/dist/docs/progress-indicator.json +1 -2
- package/dist/docs/progress-indicator.md +2 -2
- package/dist/docs/skills/build-own-element/SKILL.md +90 -0
- package/dist/docs/skills/compose-screen/SKILL.md +76 -0
- package/dist/docs/skills/index.md +9 -0
- package/dist/docs/skills/review-screen/SKILL.md +70 -0
- package/dist/docs/skills/theme-app/SKILL.md +74 -0
- package/dist/docs/skills/waiting-states/SKILL.md +139 -0
- package/dist/docs/stat-card.json +1 -0
- package/dist/docs/stat-card.md +1 -1
- package/dist/docs/tabs.json +1 -4
- package/dist/docs/tabs.md +1 -1
- package/dist/docs/tokens.md +424 -0
- package/dist/{drawer-Ci3wuCVa.js → drawer-Dtospdqk.js} +1 -1
- package/dist/drawer.js +1 -1
- package/dist/{entity-picker-UGhbVwkC.js → entity-picker-Dm-y0RNE.js} +1 -1
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-BFdeGfC-.js → event-calendar-DYjVwTI6.js} +387 -386
- package/dist/event-calendar.js +1 -1
- package/dist/{filter-bar-b2Q9BZHf.js → filter-bar-Bh7cbqDE.js} +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-D8xbCLWs.js → import-export-center-CkZ_Ar9w.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +14 -14
- package/dist/{multi-select-CfzsvAeI.js → multi-select-B-tuIwAu.js} +226 -231
- package/dist/multi-select.js +1 -1
- package/dist/{select-UTwKjheK.js → select-hRFp8nCj.js} +128 -141
- package/dist/select.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table-CzBIw9ng.js → table-Bd79IwDC.js} +1 -1
- package/dist/table.js +1 -1
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/combobox/combobox-collection.d.ts +1 -0
- package/dist/types/combobox/combobox-collection.d.ts.map +1 -1
- package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
- package/dist/types/combobox/combobox.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
- package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
- package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
- package/dist/types/event-calendar/event-calendar.d.ts +1 -1
- package/dist/types/event-calendar/event-calendar.d.ts.map +1 -1
- package/dist/types/event-calendar/event-calendar.types.d.ts +6 -0
- package/dist/types/event-calendar/event-calendar.types.d.ts.map +1 -1
- package/dist/types/menu/menu.types.d.ts +3 -1
- package/dist/types/menu/menu.types.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-collection.d.ts +0 -2
- package/dist/types/multi-select/multi-select-collection.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select.d.ts.map +1 -1
- package/dist/types/select/select-collection.d.ts +0 -2
- package/dist/types/select/select-collection.d.ts.map +1 -1
- package/dist/types/select/select.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/dashboard-grid-nfhEewA4.js +0 -1005
|
@@ -18,49 +18,10 @@ import { createPositioner as k } from "@slotted/core/positioner";
|
|
|
18
18
|
import { multiSelectMessages as A } from "@slotted/core/i18n";
|
|
19
19
|
import { createWidthGate as j } from "@slotted/core/measure";
|
|
20
20
|
import { getLiveAnnouncer as M } from "@slotted/core/live-announcer";
|
|
21
|
-
import { createFilter as ee, moveIndex as N } from "@slotted/core/collection";
|
|
22
|
-
import { matchRanges as
|
|
23
|
-
//#region src/multi-select/multi-select-
|
|
24
|
-
var
|
|
25
|
-
function I(e) {
|
|
26
|
-
return e === null ? [] : [...e.querySelectorAll(F)];
|
|
27
|
-
}
|
|
28
|
-
var L = (e) => e.dataset.value ?? "", R = (e) => e.dataset.disabled === void 0 && e.getAttribute("aria-disabled") !== "true";
|
|
29
|
-
function z(e, t) {
|
|
30
|
-
return e !== null && e.querySelector(`[data-part='item'][data-value="${CSS.escape(t)}"]`)?.hasAttribute("data-create") === !0;
|
|
31
|
-
}
|
|
32
|
-
function B(e, t, n, r) {
|
|
33
|
-
let i = I(e);
|
|
34
|
-
if (i.length === 0) return null;
|
|
35
|
-
let a = N({
|
|
36
|
-
enabled: i.map(R),
|
|
37
|
-
from: t === null ? -1 : i.findIndex((e) => L(e) === t),
|
|
38
|
-
intent: n,
|
|
39
|
-
loop: r
|
|
40
|
-
});
|
|
41
|
-
return a === -1 ? null : L(i[a]);
|
|
42
|
-
}
|
|
43
|
-
function te(e, t, n) {
|
|
44
|
-
return t === "none" ? null : B(e, null, t, n);
|
|
45
|
-
}
|
|
46
|
-
function V(e, t) {
|
|
47
|
-
if (e === null || t === null) return;
|
|
48
|
-
let n = I(e).find((e) => L(e) === t);
|
|
49
|
-
n !== void 0 && ne(n, e);
|
|
50
|
-
}
|
|
51
|
-
function ne(e, t) {
|
|
52
|
-
let n = t;
|
|
53
|
-
for (let r = e.parentElement; r !== null && r !== t; r = r.parentElement) {
|
|
54
|
-
let e = getComputedStyle(r).overflowY;
|
|
55
|
-
if (e === "auto" || e === "scroll") {
|
|
56
|
-
n = r;
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
let r = e.getBoundingClientRect(), i = n.getBoundingClientRect().top + n.clientTop, a = i + n.clientHeight;
|
|
61
|
-
r.top < i ? n.scrollTop -= i - r.top : r.bottom > a && (n.scrollTop += Math.min(r.bottom - a, r.top - i));
|
|
62
|
-
}
|
|
63
|
-
var H = "[data-part='chips'] > [role='gridcell']:not([data-part='field'])", U = {
|
|
21
|
+
import { createFilter as ee, moveIndex as N, revealWithin as P } from "@slotted/core/collection";
|
|
22
|
+
import { matchRanges as F } from "@slotted/core/highlight";
|
|
23
|
+
//#region src/multi-select/multi-select-defaults.tsx
|
|
24
|
+
var I = {
|
|
64
25
|
addOnPaste: !0,
|
|
65
26
|
align: "start",
|
|
66
27
|
alignOffset: 0,
|
|
@@ -98,12 +59,12 @@ var H = "[data-part='chips'] > [role='gridcell']:not([data-part='field'])", U =
|
|
|
98
59
|
strategy: "absolute",
|
|
99
60
|
variant: "outline",
|
|
100
61
|
width: "content"
|
|
101
|
-
},
|
|
102
|
-
function
|
|
103
|
-
return f(
|
|
62
|
+
}, L = u(I);
|
|
63
|
+
function R() {
|
|
64
|
+
return f(L);
|
|
104
65
|
}
|
|
105
|
-
function
|
|
106
|
-
let r =
|
|
66
|
+
function z({ children: e, container: t, ...n }) {
|
|
67
|
+
let r = R();
|
|
107
68
|
p(() => {
|
|
108
69
|
if (t !== void 0) return E(t), () => E(null);
|
|
109
70
|
}, [t]);
|
|
@@ -146,84 +107,84 @@ function re({ children: e, container: t, ...n }) {
|
|
|
146
107
|
variant: n.variant ?? r.variant,
|
|
147
108
|
width: n.width ?? r.width
|
|
148
109
|
};
|
|
149
|
-
return /* @__PURE__ */ x(
|
|
110
|
+
return /* @__PURE__ */ x(L.Provider, {
|
|
150
111
|
value: i,
|
|
151
112
|
children: e
|
|
152
113
|
});
|
|
153
114
|
}
|
|
154
115
|
//#endregion
|
|
155
116
|
//#region src/multi-select/multi-select.tsx
|
|
156
|
-
var
|
|
157
|
-
function
|
|
158
|
-
let e = f(
|
|
117
|
+
var B = u(void 0);
|
|
118
|
+
function V() {
|
|
119
|
+
let e = f(B);
|
|
159
120
|
if (e === void 0) throw Error("MultiSelectControl, MultiSelectContent and every option have to be inside a MultiSelect.");
|
|
160
121
|
return e;
|
|
161
122
|
}
|
|
162
|
-
var
|
|
163
|
-
function
|
|
164
|
-
return e === void 0 ? [] : e.flatMap((e) =>
|
|
123
|
+
var H = (e) => "options" in e;
|
|
124
|
+
function U(e) {
|
|
125
|
+
return e === void 0 ? [] : e.flatMap((e) => H(e) ? e.options : [e]);
|
|
165
126
|
}
|
|
166
|
-
var
|
|
167
|
-
function
|
|
168
|
-
let
|
|
169
|
-
|
|
170
|
-
let
|
|
127
|
+
var te = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
|
|
128
|
+
function W({ children: e, defaultHighlightedValue: t = null, defaultInputValue: n = "", defaultOpen: o = !1, defaultValue: s = [], filter: c, form: u, highlightedValue: f, inputValue: p, items: g, locale: b, messages: S, name: C, onHighlightedValueChange: w, onInputValueChange: T, onLoadMore: E, onOpenChange: D, onValueChange: O, onValueRefuse: k, open: j, ref: N, total: F, validateValue: I, value: L, ...z }) {
|
|
129
|
+
let V = R(), H = a(), W = i(A, S), ne = r(), G = b ?? ne, K = m(), q = `${K}listbox`, re = `${K}input`, [ie, ae] = y(o), [oe, se] = y(s), [J] = y(s), [ce, le] = y(n), [ue, de] = y(t), [Y, fe] = y(null), [X, pe] = y(null), [me, he] = y(null), [ge, _e] = y(!1), ve = z.disabled ?? H?.disabled ?? V.disabled, ye = z.readOnly ?? H?.readOnly ?? V.readOnly, Z = z.max ?? V.max, be = z.allowDuplicates ?? V.allowDuplicates, xe = (j ?? ie) && !ve, Se = L ?? oe, Ce = p ?? ce, we = f === void 0 ? ue : f, Te = v(xe);
|
|
130
|
+
xe && (Te.current = !0);
|
|
131
|
+
let Ee = v("none"), De = v(/* @__PURE__ */ new Map()), [Oe, ke] = y(0), Ae = _(() => {
|
|
171
132
|
let e = /* @__PURE__ */ new Map();
|
|
172
|
-
for (let t of
|
|
133
|
+
for (let t of U(g)) e.set(t.value, t.label);
|
|
173
134
|
return e;
|
|
174
|
-
}, [g]),
|
|
175
|
-
|
|
176
|
-
}, []),
|
|
135
|
+
}, [g]), je = d((e, t) => {
|
|
136
|
+
De.current.get(e) !== t && (De.current.set(e, t), ke((e) => e + 1));
|
|
137
|
+
}, []), Me = d((e) => Ae.get(e) ?? De.current.get(e), [Ae, Oe]), Ne = d((e) => `${K}option-${encodeURIComponent(e)}`, [K]), Pe = Ce, Fe = _(() => ee({ locale: G }), [G]), Ie = d((e) => Pe === "" || c === null ? !0 : c === void 0 ? Fe.contains(e, Pe) : c(e, Pe), [
|
|
177
138
|
Fe,
|
|
178
139
|
c,
|
|
179
|
-
|
|
140
|
+
Pe
|
|
180
141
|
]), Le = d((e) => {
|
|
181
|
-
e !== "" && M(
|
|
182
|
-
}, [
|
|
183
|
-
allowDuplicates:
|
|
142
|
+
e !== "" && M(Y?.ownerDocument).announce(e, { repeat: !0 });
|
|
143
|
+
}, [Y]), Q = v({
|
|
144
|
+
allowDuplicates: be,
|
|
184
145
|
announcer: Le,
|
|
185
146
|
collator: Fe,
|
|
186
|
-
currentHighlighted:
|
|
187
|
-
currentInput:
|
|
188
|
-
currentOpen:
|
|
189
|
-
currentValue:
|
|
147
|
+
currentHighlighted: we,
|
|
148
|
+
currentInput: Ce,
|
|
149
|
+
currentOpen: xe,
|
|
150
|
+
currentValue: Se,
|
|
190
151
|
highlightedValue: f,
|
|
191
|
-
inputNode:
|
|
152
|
+
inputNode: Y,
|
|
192
153
|
inputValue: p,
|
|
193
|
-
labelFor:
|
|
194
|
-
max:
|
|
154
|
+
labelFor: Me,
|
|
155
|
+
max: Z,
|
|
195
156
|
onHighlightedValueChange: w,
|
|
196
157
|
onInputValueChange: T,
|
|
197
158
|
onOpenChange: D,
|
|
198
159
|
onValueChange: O,
|
|
199
160
|
onValueRefuse: k,
|
|
200
161
|
open: j,
|
|
201
|
-
t:
|
|
202
|
-
validateValue:
|
|
203
|
-
value:
|
|
162
|
+
t: W,
|
|
163
|
+
validateValue: I,
|
|
164
|
+
value: L
|
|
204
165
|
});
|
|
205
166
|
Q.current = {
|
|
206
|
-
allowDuplicates:
|
|
167
|
+
allowDuplicates: be,
|
|
207
168
|
announcer: Le,
|
|
208
169
|
collator: Fe,
|
|
209
|
-
currentHighlighted:
|
|
210
|
-
currentInput:
|
|
211
|
-
currentOpen:
|
|
212
|
-
currentValue:
|
|
170
|
+
currentHighlighted: we,
|
|
171
|
+
currentInput: Ce,
|
|
172
|
+
currentOpen: xe,
|
|
173
|
+
currentValue: Se,
|
|
213
174
|
highlightedValue: f,
|
|
214
|
-
inputNode:
|
|
175
|
+
inputNode: Y,
|
|
215
176
|
inputValue: p,
|
|
216
|
-
labelFor:
|
|
217
|
-
max:
|
|
177
|
+
labelFor: Me,
|
|
178
|
+
max: Z,
|
|
218
179
|
onHighlightedValueChange: w,
|
|
219
180
|
onInputValueChange: T,
|
|
220
181
|
onOpenChange: D,
|
|
221
182
|
onValueChange: O,
|
|
222
183
|
onValueRefuse: k,
|
|
223
184
|
open: j,
|
|
224
|
-
t:
|
|
225
|
-
validateValue:
|
|
226
|
-
value:
|
|
185
|
+
t: W,
|
|
186
|
+
validateValue: I,
|
|
187
|
+
value: L
|
|
227
188
|
};
|
|
228
189
|
let Re = d((e, t, n) => {
|
|
229
190
|
let r = Q.current;
|
|
@@ -231,28 +192,28 @@ function ce({ children: e, defaultHighlightedValue: t = null, defaultInputValue:
|
|
|
231
192
|
controlled: r.open,
|
|
232
193
|
initial: r.currentOpen,
|
|
233
194
|
onRequest: (e) => r.onOpenChange?.(e.value, e)
|
|
234
|
-
}).request(e, t, n) && (
|
|
195
|
+
}).request(e, t, n) && (ae(e), e || (de(null), Ee.current = "none"));
|
|
235
196
|
}, []), ze = d((e, t, n) => {
|
|
236
197
|
let r = Q.current;
|
|
237
198
|
e !== r.currentHighlighted && l({
|
|
238
199
|
controlled: r.highlightedValue,
|
|
239
200
|
initial: r.currentHighlighted,
|
|
240
201
|
onRequest: (e) => r.onHighlightedValueChange?.(e.value, e)
|
|
241
|
-
}).request(e, t, n) &&
|
|
202
|
+
}).request(e, t, n) && de(e);
|
|
242
203
|
}, []), Be = d((e, t, n) => {
|
|
243
204
|
let r = Q.current;
|
|
244
205
|
e !== r.currentInput && l({
|
|
245
206
|
controlled: r.inputValue,
|
|
246
207
|
initial: r.currentInput,
|
|
247
208
|
onRequest: (e) => r.onInputValueChange?.(e.value, e)
|
|
248
|
-
}).request(e, t, n) &&
|
|
209
|
+
}).request(e, t, n) && le(e);
|
|
249
210
|
}, []), $ = d((e, t, n) => {
|
|
250
211
|
let r = Q.current;
|
|
251
|
-
return
|
|
212
|
+
return te(e, r.currentValue) || !l({
|
|
252
213
|
controlled: r.value,
|
|
253
214
|
initial: r.currentValue,
|
|
254
215
|
onRequest: (e) => r.onValueChange?.(e.value, e)
|
|
255
|
-
}).request(e, t, n) ? !1 : (
|
|
216
|
+
}).request(e, t, n) ? !1 : (se(e), !0);
|
|
256
217
|
}, []), Ve = d((e, t) => {
|
|
257
218
|
let n = Q.current, r = [...t], i = {
|
|
258
219
|
duplicate: [],
|
|
@@ -295,7 +256,7 @@ function ce({ children: e, defaultHighlightedValue: t = null, defaultInputValue:
|
|
|
295
256
|
cause: t,
|
|
296
257
|
source: n
|
|
297
258
|
});
|
|
298
|
-
t !== null &&
|
|
259
|
+
t !== null && he(t), e.limit.length > 0 && r.max !== null && r.announcer(r.t("counter", {
|
|
299
260
|
count: r.max,
|
|
300
261
|
max: r.max
|
|
301
262
|
}));
|
|
@@ -331,10 +292,10 @@ function ce({ children: e, defaultHighlightedValue: t = null, defaultInputValue:
|
|
|
331
292
|
}, [Ue, Ge]), qe = d((e) => {
|
|
332
293
|
$([], "clear", e), Be("", "clear", e);
|
|
333
294
|
}, [$, Be]), Je = d((e) => {
|
|
334
|
-
$(
|
|
295
|
+
$(J, "programmatic", e), Be("", "programmatic", e);
|
|
335
296
|
}, [
|
|
336
297
|
$,
|
|
337
|
-
|
|
298
|
+
J,
|
|
338
299
|
Be
|
|
339
300
|
]), Ye = d((e, t, n) => {
|
|
340
301
|
let r = Q.current, i = r.currentValue;
|
|
@@ -349,105 +310,134 @@ function ce({ children: e, defaultHighlightedValue: t = null, defaultInputValue:
|
|
|
349
310
|
focus: () => Q.current.inputNode?.focus({ preventScroll: !0 }),
|
|
350
311
|
open: () => Re(!0, "programmatic"),
|
|
351
312
|
scrollToKey: (e) => {
|
|
352
|
-
let t =
|
|
353
|
-
t != null &&
|
|
313
|
+
let t = X?.querySelector(`[data-part='item'][data-value="${CSS.escape(e)}"]`);
|
|
314
|
+
t != null && X !== null && P(t, X);
|
|
354
315
|
},
|
|
355
316
|
setValue: (e, t = "programmatic") => $([...e], t)
|
|
356
317
|
}), [
|
|
357
318
|
$,
|
|
358
|
-
|
|
319
|
+
X,
|
|
359
320
|
Re
|
|
360
321
|
]);
|
|
361
322
|
let Xe = {
|
|
362
|
-
addOnPaste:
|
|
323
|
+
addOnPaste: z.addOnPaste ?? V.addOnPaste,
|
|
363
324
|
admit: Ue,
|
|
364
|
-
align:
|
|
365
|
-
alignOffset:
|
|
325
|
+
align: z.align ?? V.align,
|
|
326
|
+
alignOffset: z.alignOffset ?? V.alignOffset,
|
|
366
327
|
announce: Le,
|
|
367
|
-
chosenOptions:
|
|
328
|
+
chosenOptions: z.chosenOptions ?? V.chosenOptions,
|
|
368
329
|
clear: qe,
|
|
369
|
-
clearable:
|
|
370
|
-
closeOnEscape:
|
|
371
|
-
closeOnOutsidePress:
|
|
372
|
-
closeOnSelect:
|
|
373
|
-
collisionPadding:
|
|
374
|
-
commitOnBlur:
|
|
375
|
-
contentId:
|
|
376
|
-
contentNode:
|
|
377
|
-
creatable:
|
|
378
|
-
delimiters:
|
|
379
|
-
disabled:
|
|
380
|
-
duplicate:
|
|
381
|
-
editable:
|
|
382
|
-
entry:
|
|
383
|
-
flip:
|
|
330
|
+
clearable: z.clearable ?? V.clearable,
|
|
331
|
+
closeOnEscape: z.closeOnEscape ?? V.closeOnEscape,
|
|
332
|
+
closeOnOutsidePress: z.closeOnOutsidePress ?? V.closeOnOutsidePress,
|
|
333
|
+
closeOnSelect: z.closeOnSelect ?? V.closeOnSelect,
|
|
334
|
+
collisionPadding: z.collisionPadding ?? V.collisionPadding,
|
|
335
|
+
commitOnBlur: z.commitOnBlur ?? V.commitOnBlur,
|
|
336
|
+
contentId: q,
|
|
337
|
+
contentNode: X,
|
|
338
|
+
creatable: z.creatable ?? V.creatable,
|
|
339
|
+
delimiters: z.delimiters ?? V.delimiters,
|
|
340
|
+
disabled: ve,
|
|
341
|
+
duplicate: me,
|
|
342
|
+
editable: z.editable ?? V.editable,
|
|
343
|
+
entry: Ee,
|
|
344
|
+
flip: z.flip ?? V.flip,
|
|
384
345
|
form: u,
|
|
385
|
-
full:
|
|
386
|
-
fullWidth:
|
|
387
|
-
hideWhenDetached:
|
|
388
|
-
highlighted:
|
|
389
|
-
highlightMatch:
|
|
390
|
-
inputId:
|
|
391
|
-
inputNode:
|
|
392
|
-
inputValue:
|
|
393
|
-
invalid:
|
|
394
|
-
labelFor:
|
|
395
|
-
loading:
|
|
396
|
-
locale:
|
|
397
|
-
loop:
|
|
346
|
+
full: Z !== null && Se.length >= Z,
|
|
347
|
+
fullWidth: z.fullWidth ?? V.fullWidth,
|
|
348
|
+
hideWhenDetached: z.hideWhenDetached ?? V.hideWhenDetached,
|
|
349
|
+
highlighted: we,
|
|
350
|
+
highlightMatch: z.highlightMatch ?? V.highlightMatch,
|
|
351
|
+
inputId: re,
|
|
352
|
+
inputNode: Y,
|
|
353
|
+
inputValue: Ce,
|
|
354
|
+
invalid: z.invalid ?? H?.invalid ?? V.invalid,
|
|
355
|
+
labelFor: Me,
|
|
356
|
+
loading: z.loading ?? V.loading,
|
|
357
|
+
locale: G,
|
|
358
|
+
loop: z.loop ?? V.loop,
|
|
398
359
|
matches: Ie,
|
|
399
|
-
max:
|
|
400
|
-
mount:
|
|
360
|
+
max: Z,
|
|
361
|
+
mount: z.mount ?? V.mount,
|
|
401
362
|
move: Ye,
|
|
402
363
|
name: C,
|
|
403
|
-
narrow:
|
|
364
|
+
narrow: ge,
|
|
404
365
|
onLoadMore: E,
|
|
405
|
-
open:
|
|
406
|
-
openOn:
|
|
407
|
-
optionId:
|
|
408
|
-
overflow:
|
|
409
|
-
portal:
|
|
410
|
-
query:
|
|
411
|
-
readOnly:
|
|
412
|
-
registerLabel:
|
|
366
|
+
open: xe,
|
|
367
|
+
openOn: z.openOn ?? V.openOn,
|
|
368
|
+
optionId: Ne,
|
|
369
|
+
overflow: z.overflow ?? V.overflow,
|
|
370
|
+
portal: z.portal ?? V.portal,
|
|
371
|
+
query: Pe,
|
|
372
|
+
readOnly: ye,
|
|
373
|
+
registerLabel: je,
|
|
413
374
|
remove: Ge,
|
|
414
375
|
replace: We,
|
|
415
376
|
restore: Je,
|
|
416
|
-
reorderable:
|
|
417
|
-
required:
|
|
418
|
-
seen:
|
|
419
|
-
setContentNode:
|
|
420
|
-
setDuplicate:
|
|
377
|
+
reorderable: z.reorderable ?? V.reorderable,
|
|
378
|
+
required: z.required ?? H?.required ?? V.required,
|
|
379
|
+
seen: Te.current,
|
|
380
|
+
setContentNode: pe,
|
|
381
|
+
setDuplicate: he,
|
|
421
382
|
setHighlighted: ze,
|
|
422
|
-
setInputNode:
|
|
383
|
+
setInputNode: fe,
|
|
423
384
|
setInputValue: Be,
|
|
424
|
-
setNarrow:
|
|
385
|
+
setNarrow: _e,
|
|
425
386
|
setOpen: Re,
|
|
426
|
-
shift:
|
|
427
|
-
side:
|
|
428
|
-
sideOffset:
|
|
429
|
-
size:
|
|
430
|
-
strategy:
|
|
387
|
+
shift: z.shift ?? V.shift,
|
|
388
|
+
side: z.side ?? V.side,
|
|
389
|
+
sideOffset: z.sideOffset ?? V.sideOffset,
|
|
390
|
+
size: z.size ?? H?.size ?? V.size,
|
|
391
|
+
strategy: z.strategy ?? V.strategy,
|
|
431
392
|
toggle: Ke,
|
|
432
|
-
t:
|
|
433
|
-
total:
|
|
434
|
-
value:
|
|
435
|
-
variant:
|
|
436
|
-
width:
|
|
393
|
+
t: W,
|
|
394
|
+
total: F,
|
|
395
|
+
value: Se,
|
|
396
|
+
variant: z.variant ?? V.variant,
|
|
397
|
+
width: z.width ?? V.width
|
|
437
398
|
};
|
|
438
|
-
return /* @__PURE__ */ x(
|
|
399
|
+
return /* @__PURE__ */ x(B.Provider, {
|
|
439
400
|
value: Xe,
|
|
440
401
|
children: e
|
|
441
402
|
});
|
|
442
403
|
}
|
|
443
404
|
//#endregion
|
|
405
|
+
//#region src/multi-select/multi-select-collection.ts
|
|
406
|
+
var ne = e(), G = "[data-part='item']";
|
|
407
|
+
function K(e) {
|
|
408
|
+
return e === null ? [] : [...e.querySelectorAll(G)];
|
|
409
|
+
}
|
|
410
|
+
var q = (e) => e.dataset.value ?? "", re = (e) => e.dataset.disabled === void 0 && e.getAttribute("aria-disabled") !== "true";
|
|
411
|
+
function ie(e, t) {
|
|
412
|
+
return e !== null && e.querySelector(`[data-part='item'][data-value="${CSS.escape(t)}"]`)?.hasAttribute("data-create") === !0;
|
|
413
|
+
}
|
|
414
|
+
function ae(e, t, n, r) {
|
|
415
|
+
let i = K(e);
|
|
416
|
+
if (i.length === 0) return null;
|
|
417
|
+
let a = N({
|
|
418
|
+
enabled: i.map(re),
|
|
419
|
+
from: t === null ? -1 : i.findIndex((e) => q(e) === t),
|
|
420
|
+
intent: n,
|
|
421
|
+
loop: r
|
|
422
|
+
});
|
|
423
|
+
return a === -1 ? null : q(i[a]);
|
|
424
|
+
}
|
|
425
|
+
function oe(e, t, n) {
|
|
426
|
+
return t === "none" ? null : ae(e, null, t, n);
|
|
427
|
+
}
|
|
428
|
+
function se(e, t) {
|
|
429
|
+
if (e === null || t === null) return;
|
|
430
|
+
let n = K(e).find((e) => q(e) === t);
|
|
431
|
+
n !== void 0 && P(n, e);
|
|
432
|
+
}
|
|
433
|
+
var J = "[data-part='chips'] > [role='gridcell']:not([data-part='field'])";
|
|
434
|
+
//#endregion
|
|
444
435
|
//#region src/multi-select/multi-select-chips.tsx
|
|
445
|
-
|
|
446
|
-
function ue(e, t) {
|
|
436
|
+
function ce(e, t) {
|
|
447
437
|
return e || t;
|
|
448
438
|
}
|
|
449
|
-
function
|
|
450
|
-
let o =
|
|
439
|
+
function le({ count: e, index: r, label: i, value: a }) {
|
|
440
|
+
let o = V(), [s, c] = y(null), l = v(null), u = ce(o.readOnly, o.disabled);
|
|
451
441
|
p(() => {
|
|
452
442
|
o.duplicate === a && (l.current?.focus({ preventScroll: !0 }), o.setDuplicate(null));
|
|
453
443
|
}, [o, a]);
|
|
@@ -548,13 +538,13 @@ function de({ count: e, index: r, label: i, value: a }) {
|
|
|
548
538
|
})
|
|
549
539
|
});
|
|
550
540
|
}
|
|
551
|
-
function
|
|
552
|
-
let t =
|
|
541
|
+
function ue({ children: e }) {
|
|
542
|
+
let t = V(), n = v(null), r = v(null), i = v(null), [a, o] = y(0), l = t.overflow === "collapse";
|
|
553
543
|
return p(() => {
|
|
554
544
|
let e = n.current;
|
|
555
545
|
if (e === null) return;
|
|
556
546
|
let t = s(e, {
|
|
557
|
-
itemSelector: `${
|
|
547
|
+
itemSelector: `${J}, [data-part='field'] > [data-part='input']`,
|
|
558
548
|
loop: !1,
|
|
559
549
|
ownedKeys: (e) => e instanceof HTMLInputElement && e.value !== "" ? [
|
|
560
550
|
"ArrowLeft",
|
|
@@ -569,7 +559,7 @@ function fe({ children: e }) {
|
|
|
569
559
|
if (e === null) return;
|
|
570
560
|
let r = c(e, {
|
|
571
561
|
fallback: () => t.inputNode,
|
|
572
|
-
itemSelector:
|
|
562
|
+
itemSelector: J
|
|
573
563
|
});
|
|
574
564
|
return () => r.destroy();
|
|
575
565
|
}, [t.inputNode]), p(() => {
|
|
@@ -582,7 +572,7 @@ function fe({ children: e }) {
|
|
|
582
572
|
collapsible: () => !0,
|
|
583
573
|
onChange: (e) => o(e.length),
|
|
584
574
|
trigger: () => r.current,
|
|
585
|
-
units: () => [...e.querySelectorAll(
|
|
575
|
+
units: () => [...e.querySelectorAll(J)].filter((e) => !e.hasAttribute("data-count"))
|
|
586
576
|
});
|
|
587
577
|
return i.current = t, () => {
|
|
588
578
|
t.destroy(), i.current = null, o(0);
|
|
@@ -594,7 +584,7 @@ function fe({ children: e }) {
|
|
|
594
584
|
ref: n,
|
|
595
585
|
role: "row",
|
|
596
586
|
children: [
|
|
597
|
-
t.value.map((e, n) => /* @__PURE__ */ x(
|
|
587
|
+
t.value.map((e, n) => /* @__PURE__ */ x(le, {
|
|
598
588
|
count: t.value.length,
|
|
599
589
|
index: n,
|
|
600
590
|
label: t.labelFor(e) ?? e,
|
|
@@ -625,17 +615,17 @@ function fe({ children: e }) {
|
|
|
625
615
|
}
|
|
626
616
|
//#endregion
|
|
627
617
|
//#region src/multi-select/multi-select-parts.tsx
|
|
628
|
-
var
|
|
629
|
-
function
|
|
618
|
+
var de = 120;
|
|
619
|
+
function Y(e, t) {
|
|
630
620
|
return (n) => {
|
|
631
621
|
e?.(n), n.defaultPrevented || t(n);
|
|
632
622
|
};
|
|
633
623
|
}
|
|
634
|
-
function
|
|
624
|
+
function fe(e, ...t) {
|
|
635
625
|
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
636
626
|
}
|
|
637
|
-
function
|
|
638
|
-
let o =
|
|
627
|
+
function X({ ref: e, render: r, ...i }) {
|
|
628
|
+
let o = V(), s = a(), [c, l] = y(null), u = v(null);
|
|
639
629
|
p(() => {
|
|
640
630
|
o.setInputNode(c);
|
|
641
631
|
}, [o, c]);
|
|
@@ -666,7 +656,7 @@ function J({ ref: e, render: r, ...i }) {
|
|
|
666
656
|
o.entry.current = e === "previous" || e === "pageUp" ? "last" : "first";
|
|
667
657
|
return;
|
|
668
658
|
}
|
|
669
|
-
let n =
|
|
659
|
+
let n = ae(o.contentNode, o.highlighted, e, o.loop);
|
|
670
660
|
n !== null && o.setHighlighted(n, "keyboard", t);
|
|
671
661
|
}, _ = (e) => {
|
|
672
662
|
let t = o.delimiters;
|
|
@@ -679,7 +669,7 @@ function J({ ref: e, render: r, ...i }) {
|
|
|
679
669
|
return t.trim() !== "" && (o.admit(_(t), "submit", e), o.setInputValue("", "submit", e), !0);
|
|
680
670
|
}, w = (e) => {
|
|
681
671
|
let t = o.highlighted;
|
|
682
|
-
return t === null ? !1 :
|
|
672
|
+
return t === null ? !1 : ie(o.contentNode, t) ? (C(e), !0) : (o.toggle(t, "select", e), o.setInputValue("", "select", e), o.closeOnSelect && o.setOpen(!1, "select", e), !0);
|
|
683
673
|
}, T = (e, t) => {
|
|
684
674
|
o.entry.current = e, o.setOpen(!0, "keyboard", t);
|
|
685
675
|
}, E = (e) => {
|
|
@@ -753,11 +743,11 @@ function J({ ref: e, render: r, ...i }) {
|
|
|
753
743
|
}, P = (e) => {
|
|
754
744
|
o.disabled || o.readOnly || (o.entry.current = "none", o.setOpen(!o.open, "pointer", e.nativeEvent), c?.focus({ preventScroll: !0 }));
|
|
755
745
|
}, F = d((t) => {
|
|
756
|
-
l(t),
|
|
746
|
+
l(t), fe(t, e);
|
|
757
747
|
}, [e]), I = [i["aria-describedby"], s?.describedBy].filter(Boolean).join(" "), L = o.clearable && (o.value.length > 0 || o.inputValue !== "") && !o.disabled && !o.readOnly, R = o.max === null ? o.narrow && o.value.length > 0 ? o.t("chosen", { count: o.value.length }) : null : o.t("counter", {
|
|
758
748
|
count: o.value.length,
|
|
759
749
|
max: o.max
|
|
760
|
-
}),
|
|
750
|
+
}), z = {
|
|
761
751
|
ref: u,
|
|
762
752
|
"data-overflow": o.overflow,
|
|
763
753
|
"data-part": "root",
|
|
@@ -773,12 +763,17 @@ function J({ ref: e, render: r, ...i }) {
|
|
|
773
763
|
...o.loading ? { "data-loading": "" } : {},
|
|
774
764
|
...o.full ? { "data-complete": "" } : {},
|
|
775
765
|
...o.narrow ? { "data-narrow": "" } : {}
|
|
776
|
-
},
|
|
766
|
+
}, B = o.t("chosen", { count: o.value.length }), H = `${i.id ?? s?.ids.control ?? o.inputId}-chosen`, U = i["aria-labelledby"] ?? s?.ids.label, te = i["aria-label"] === void 0 ? U === void 0 ? { "aria-label": B } : { "aria-labelledby": `${U} ${H}` } : { "aria-label": `${i["aria-label"]}, ${B}` }, W = /* @__PURE__ */ S(b, { children: [
|
|
767
|
+
/* @__PURE__ */ x("span", {
|
|
768
|
+
hidden: !0,
|
|
769
|
+
id: H,
|
|
770
|
+
children: B
|
|
771
|
+
}),
|
|
777
772
|
/* @__PURE__ */ x("div", {
|
|
778
|
-
|
|
773
|
+
...te,
|
|
779
774
|
"data-part": "control",
|
|
780
775
|
role: "grid",
|
|
781
|
-
children: /* @__PURE__ */ x(
|
|
776
|
+
children: /* @__PURE__ */ x(ue, { children: /* @__PURE__ */ x("span", {
|
|
782
777
|
"data-part": "field",
|
|
783
778
|
role: "gridcell",
|
|
784
779
|
children: /* @__PURE__ */ x("input", {
|
|
@@ -793,12 +788,12 @@ function J({ ref: e, render: r, ...i }) {
|
|
|
793
788
|
"data-part": "input",
|
|
794
789
|
disabled: o.disabled,
|
|
795
790
|
id: i.id ?? s?.ids.control ?? o.inputId,
|
|
796
|
-
onBlur:
|
|
797
|
-
onChange:
|
|
798
|
-
onClick:
|
|
799
|
-
onFocus:
|
|
800
|
-
onKeyDown:
|
|
801
|
-
onPaste:
|
|
791
|
+
onBlur: Y(i.onBlur, ee),
|
|
792
|
+
onChange: Y(i.onChange, D),
|
|
793
|
+
onClick: Y(i.onClick, A),
|
|
794
|
+
onFocus: Y(i.onFocus, k),
|
|
795
|
+
onKeyDown: Y(i.onKeyDown, E),
|
|
796
|
+
onPaste: Y(i.onPaste, M),
|
|
802
797
|
placeholder: o.value.length === 0 ? i.placeholder : void 0,
|
|
803
798
|
readOnly: o.readOnly,
|
|
804
799
|
ref: F,
|
|
@@ -859,15 +854,15 @@ function J({ ref: e, render: r, ...i }) {
|
|
|
859
854
|
}, e))
|
|
860
855
|
] });
|
|
861
856
|
return r === void 0 ? /* @__PURE__ */ x("div", {
|
|
862
|
-
...
|
|
863
|
-
children:
|
|
857
|
+
...z,
|
|
858
|
+
children: W
|
|
864
859
|
}) : r({
|
|
865
|
-
...
|
|
866
|
-
children:
|
|
860
|
+
...z,
|
|
861
|
+
children: W
|
|
867
862
|
});
|
|
868
863
|
}
|
|
869
|
-
function
|
|
870
|
-
let l =
|
|
864
|
+
function pe({ children: e, chosen: r = !0, empty: i, ref: a, render: o, status: s, ...c }) {
|
|
865
|
+
let l = V(), [u, d] = y(null), [f, m] = y(null), [h, _] = y(null), [b, C] = y("unmounted"), [E, O] = y(!1), [A, j] = y(0), M = v(null), ee = v(null), N = v(l);
|
|
871
866
|
N.current = l, p(() => {
|
|
872
867
|
let e = w({
|
|
873
868
|
present: N.current.open,
|
|
@@ -893,20 +888,20 @@ function he({ children: e, chosen: r = !0, empty: i, ref: a, render: o, status:
|
|
|
893
888
|
l.portal,
|
|
894
889
|
P
|
|
895
890
|
]);
|
|
896
|
-
let { align: F, alignOffset:
|
|
891
|
+
let { align: F, alignOffset: I, collisionPadding: L, flip: R, hideWhenDetached: z, shift: B, side: H, sideOffset: U, strategy: te, width: W } = l;
|
|
897
892
|
if (p(() => {
|
|
898
893
|
if (u === null || l.inputNode === null) return;
|
|
899
894
|
let e = !0, t = l.inputNode.closest("[data-part='root']") ?? l.inputNode, n = k(t, u, {
|
|
900
895
|
align: F,
|
|
901
|
-
alignOffset:
|
|
902
|
-
boundaryPadding:
|
|
903
|
-
flip:
|
|
904
|
-
hideWhenDetached:
|
|
905
|
-
matchWidth:
|
|
906
|
-
shift:
|
|
907
|
-
side:
|
|
908
|
-
sideOffset:
|
|
909
|
-
strategy:
|
|
896
|
+
alignOffset: I,
|
|
897
|
+
boundaryPadding: L,
|
|
898
|
+
flip: R,
|
|
899
|
+
hideWhenDetached: z,
|
|
900
|
+
matchWidth: W === "anchor",
|
|
901
|
+
shift: B,
|
|
902
|
+
side: H,
|
|
903
|
+
sideOffset: U,
|
|
904
|
+
strategy: te
|
|
910
905
|
});
|
|
911
906
|
return n.update().then(() => {
|
|
912
907
|
e && O(!0);
|
|
@@ -915,17 +910,17 @@ function he({ children: e, chosen: r = !0, empty: i, ref: a, render: o, status:
|
|
|
915
910
|
};
|
|
916
911
|
}, [
|
|
917
912
|
F,
|
|
913
|
+
I,
|
|
914
|
+
L,
|
|
918
915
|
R,
|
|
919
916
|
z,
|
|
920
|
-
B,
|
|
921
|
-
ne,
|
|
922
917
|
u,
|
|
923
918
|
l.inputNode,
|
|
919
|
+
B,
|
|
924
920
|
H,
|
|
925
921
|
U,
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
re
|
|
922
|
+
te,
|
|
923
|
+
W
|
|
929
924
|
]), p(() => {
|
|
930
925
|
if (u === null || !l.open) return;
|
|
931
926
|
let e = [l.inputNode?.closest("[data-part='root']") ?? null].filter((e) => e !== null), t = D(u, {
|
|
@@ -947,24 +942,24 @@ function he({ children: e, chosen: r = !0, empty: i, ref: a, render: o, status:
|
|
|
947
942
|
l.open,
|
|
948
943
|
u
|
|
949
944
|
]), g(() => {
|
|
950
|
-
let e =
|
|
945
|
+
let e = K(f).filter((e) => e.dataset.create === void 0).length;
|
|
951
946
|
j((t) => t === e ? t : e);
|
|
952
947
|
}), g(() => {
|
|
953
948
|
let e = N.current;
|
|
954
949
|
if (e.open && f !== null) {
|
|
955
950
|
if (e.entry.current !== "none") {
|
|
956
|
-
let t =
|
|
951
|
+
let t = oe(f, e.entry.current, e.loop);
|
|
957
952
|
e.entry.current = "none", t !== null && e.setHighlighted(t, "keyboard");
|
|
958
953
|
return;
|
|
959
954
|
}
|
|
960
|
-
e.highlighted !== null && (
|
|
955
|
+
e.highlighted !== null && (K(f).some((t) => q(t) === e.highlighted) || e.setHighlighted(null, "keyboard"));
|
|
961
956
|
}
|
|
962
957
|
}, [
|
|
963
958
|
l.open,
|
|
964
959
|
A,
|
|
965
960
|
f
|
|
966
961
|
]), p(() => {
|
|
967
|
-
|
|
962
|
+
se(f, l.highlighted);
|
|
968
963
|
}, [
|
|
969
964
|
l.highlighted,
|
|
970
965
|
E,
|
|
@@ -981,7 +976,7 @@ function he({ children: e, chosen: r = !0, empty: i, ref: a, render: o, status:
|
|
|
981
976
|
A,
|
|
982
977
|
f
|
|
983
978
|
]), !P) return null;
|
|
984
|
-
let
|
|
979
|
+
let G = {
|
|
985
980
|
"data-align": F,
|
|
986
981
|
...l.open ? {} : { inert: !0 },
|
|
987
982
|
...l.open && E ? { "data-open": "" } : {},
|
|
@@ -989,10 +984,10 @@ function he({ children: e, chosen: r = !0, empty: i, ref: a, render: o, status:
|
|
|
989
984
|
"data-size": l.size,
|
|
990
985
|
"data-ui": "multi-select",
|
|
991
986
|
"data-width": l.width
|
|
992
|
-
},
|
|
993
|
-
...
|
|
987
|
+
}, re = s === void 0 ? l.loading ? l.t("loading") : A === 0 ? null : l.t("count", { count: A }) : s, ie = !l.loading && A === 0 && l.creatable && !l.full && l.query.trim() !== "", ae = /* @__PURE__ */ x("div", {
|
|
988
|
+
...G,
|
|
994
989
|
ref: (e) => {
|
|
995
|
-
d(e),
|
|
990
|
+
d(e), fe(e, a);
|
|
996
991
|
},
|
|
997
992
|
children: /* @__PURE__ */ S("div", {
|
|
998
993
|
...c,
|
|
@@ -1022,7 +1017,7 @@ function he({ children: e, chosen: r = !0, empty: i, ref: a, render: o, status:
|
|
|
1022
1017
|
}) : null,
|
|
1023
1018
|
e,
|
|
1024
1019
|
/* @__PURE__ */ x("div", { ref: ee }),
|
|
1025
|
-
|
|
1020
|
+
ie ? /* @__PURE__ */ S("div", {
|
|
1026
1021
|
"data-create": "",
|
|
1027
1022
|
"data-part": "item",
|
|
1028
1023
|
"data-value": l.query,
|
|
@@ -1049,7 +1044,7 @@ function he({ children: e, chosen: r = !0, empty: i, ref: a, render: o, status:
|
|
|
1049
1044
|
})
|
|
1050
1045
|
]
|
|
1051
1046
|
}) : null,
|
|
1052
|
-
!l.loading && A === 0 && !
|
|
1047
|
+
!l.loading && A === 0 && !ie ? /* @__PURE__ */ x("div", {
|
|
1053
1048
|
"data-part": "empty",
|
|
1054
1049
|
children: i ?? l.t("empty")
|
|
1055
1050
|
}) : null,
|
|
@@ -1072,20 +1067,20 @@ function he({ children: e, chosen: r = !0, empty: i, ref: a, render: o, status:
|
|
|
1072
1067
|
"data-part": "status",
|
|
1073
1068
|
...l.loading ? { "data-loading": "" } : {},
|
|
1074
1069
|
role: "status",
|
|
1075
|
-
children:
|
|
1070
|
+
children: re
|
|
1076
1071
|
})
|
|
1077
1072
|
]
|
|
1078
1073
|
})
|
|
1079
|
-
}),
|
|
1080
|
-
...
|
|
1074
|
+
}), J = o === void 0 ? ae : o({
|
|
1075
|
+
...G,
|
|
1081
1076
|
children: e
|
|
1082
1077
|
});
|
|
1083
|
-
return h === null ?
|
|
1078
|
+
return h === null ? J : (0, ne.createPortal)(J, h);
|
|
1084
1079
|
}
|
|
1085
1080
|
//#endregion
|
|
1086
1081
|
//#region src/multi-select/multi-select-items.tsx
|
|
1087
|
-
function
|
|
1088
|
-
let f =
|
|
1082
|
+
function me({ children: e, description: r, disabled: i = !1, icon: a, position: s, ref: c, textValue: l, value: u, ...d }) {
|
|
1083
|
+
let f = V(), [m, h] = y(null), g = v(null), b = l ?? (typeof e == "string" ? e : void 0);
|
|
1089
1084
|
p(() => {
|
|
1090
1085
|
if (m === null) return;
|
|
1091
1086
|
let e = b ?? m.querySelector("[data-part='label']")?.textContent?.trim() ?? "";
|
|
@@ -1098,7 +1093,7 @@ function ge({ children: e, description: r, disabled: i = !1, icon: a, position:
|
|
|
1098
1093
|
]);
|
|
1099
1094
|
let C = _(() => {
|
|
1100
1095
|
if (!f.highlightMatch || f.query === "" || b === void 0) return e;
|
|
1101
|
-
let t =
|
|
1096
|
+
let t = F(b, f.query, { locale: f.locale });
|
|
1102
1097
|
return t.length === 0 ? e : /* @__PURE__ */ x(o, {
|
|
1103
1098
|
ranges: t,
|
|
1104
1099
|
text: b
|
|
@@ -1160,8 +1155,8 @@ function ge({ children: e, description: r, disabled: i = !1, icon: a, position:
|
|
|
1160
1155
|
]
|
|
1161
1156
|
});
|
|
1162
1157
|
}
|
|
1163
|
-
function
|
|
1164
|
-
let r = `${m()}group`, { query: i, value: a } =
|
|
1158
|
+
function he({ children: e, label: t, ...n }) {
|
|
1159
|
+
let r = `${m()}group`, { query: i, value: a } = V(), [o, s] = y(null), [c, l] = y(!1);
|
|
1165
1160
|
return p(() => {
|
|
1166
1161
|
o !== null && l(o.querySelector("[data-part='item']") === null);
|
|
1167
1162
|
}, [
|
|
@@ -1182,7 +1177,7 @@ function _e({ children: e, label: t, ...n }) {
|
|
|
1182
1177
|
}), e]
|
|
1183
1178
|
});
|
|
1184
1179
|
}
|
|
1185
|
-
function
|
|
1180
|
+
function ge(e) {
|
|
1186
1181
|
return /* @__PURE__ */ x("div", {
|
|
1187
1182
|
"data-part": "separator",
|
|
1188
1183
|
ref: e.ref,
|
|
@@ -1190,4 +1185,4 @@ function ve(e) {
|
|
|
1190
1185
|
});
|
|
1191
1186
|
}
|
|
1192
1187
|
//#endregion
|
|
1193
|
-
export {
|
|
1188
|
+
export { X as a, V as c, R as d, pe as i, I as l, me as n, de as o, ge as r, W as s, he as t, z as u };
|