@slotted/react 0.1.0-beta.25 → 0.1.0-beta.27
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/{action-bar-DckD0Sug.js → action-bar-CAtXzym2.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{cascader-47GYpojH.js → cascader-CwwtJs3W.js} +189 -189
- package/dist/cascader.js +1 -1
- package/dist/{color-picker-BbyW5ALf.js → color-picker-2i3A60vD.js} +1 -1
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-Bz0bb4mq.js → column-manager-D4HIwXPi.js} +1 -1
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-BA2nvbnA.js → combobox-BpZ8i-61.js} +86 -86
- package/dist/combobox.js +1 -1
- package/dist/{command-palette-DEKWsUFR.js → command-palette-BxbhO044.js} +11 -11
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-CfEEqDKr.js → context-menu-BJyDD17g.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{dashboard-grid-WinSY-q3.js → dashboard-grid-De6al1Mj.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-Dh-oaGY7.js → data-grid-CuHnCT01.js} +33 -33
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-iw9K_oiz.js → data-list-CuzWmmGp.js} +5 -5
- package/dist/data-list.js +1 -1
- package/dist/docs/app-shell.json +1 -1
- package/dist/docs/app-shell.md +1 -1
- package/dist/docs/chart.json +2 -0
- package/dist/docs/chart.md +1 -1
- package/dist/docs/combobox.json +1 -0
- package/dist/docs/combobox.md +1 -1
- package/dist/docs/dialog.json +24 -5
- package/dist/docs/dialog.md +2 -60
- package/dist/docs/dialog.props.md +68 -0
- package/dist/docs/drawer.json +3 -1
- package/dist/docs/drawer.md +2 -2
- package/dist/docs/menu.json +1 -0
- package/dist/docs/menu.md +1 -1
- package/dist/docs/multi-select.json +1 -0
- package/dist/docs/multi-select.md +1 -1
- package/dist/docs/select.json +1 -0
- package/dist/docs/select.md +1 -1
- package/dist/docs/skills/theme-app/SKILL.md +4 -1
- package/dist/{entity-picker-BFoKN50H.js → entity-picker-BYAlDJL-.js} +25 -25
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-BaPllnNk.js → event-calendar-BuZg4ghj.js} +2 -2
- package/dist/event-calendar.js +1 -1
- package/dist/{filter-bar-CPBr_n2c.js → filter-bar-DeBYLpbg.js} +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-CzyIlQB_.js → import-export-center-CTliNoT9.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +26 -26
- package/dist/{listbox-B9cBuitS.js → listbox-BSx90S2g.js} +10 -10
- package/dist/listbox.js +1 -1
- package/dist/{menu-parts-7F8syoFE.js → menu-parts-DNQDoJnd.js} +203 -204
- package/dist/menu.js +1 -1
- package/dist/{menubar-DzVGFn_I.js → menubar-CY8oxV0V.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-DnOAXeuF.js → multi-select-Dh2gOp42.js} +68 -68
- package/dist/multi-select.js +1 -1
- package/dist/{saved-views-CsVRZTwK.js → saved-views-BKhAqvhI.js} +1 -1
- package/dist/saved-views.js +1 -1
- package/dist/{select-BTncjDuM.js → select-BcTau8q3.js} +194 -192
- package/dist/select.js +1 -1
- package/dist/{split-button-DA1wcDJB.js → split-button-CgfY606Z.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/action-sheet.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/cascader.css +1 -1
- package/dist/styles/chart.css +1 -1
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/color-picker.css +3 -3
- package/dist/styles/column-manager.css +4 -4
- package/dist/styles/combobox.css +2 -2
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/currency-field.css +1 -1
- package/dist/styles/dashboard-grid.css +2 -2
- package/dist/styles/data-grid.css +5 -5
- package/dist/styles/data-list.css +2 -2
- package/dist/styles/date-field.css +1 -1
- package/dist/styles/date-picker.css +1 -1
- package/dist/styles/date-range-picker.css +1 -1
- package/dist/styles/datetime-field.css +1 -1
- package/dist/styles/datetime-picker.css +1 -1
- package/dist/styles/datetime-range-picker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/entity-picker.css +2 -2
- package/dist/styles/event-calendar.css +4 -4
- package/dist/styles/field-group.css +1 -1
- package/dist/styles/field.css +1 -1
- package/dist/styles/filter-bar.css +6 -6
- package/dist/styles/hover-card.css +1 -1
- package/dist/styles/import-export-center.css +3 -3
- package/dist/styles/index.css +10 -10
- package/dist/styles/listbox.css +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/multi-select.css +2 -2
- package/dist/styles/notification-center.css +1 -1
- package/dist/styles/number-field.css +1 -1
- package/dist/styles/otp-input.css +1 -1
- package/dist/styles/popover.css +1 -1
- package/dist/styles/prompt-composer.css +1 -1
- package/dist/styles/radio-group.css +1 -1
- package/dist/styles/rating.css +1 -1
- package/dist/styles/saved-views.css +3 -3
- package/dist/styles/segmented-control.css +1 -1
- package/dist/styles/select.css +2 -2
- package/dist/styles/side-navigation.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/table.css +3 -3
- package/dist/styles/tags-input.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/time-field.css +1 -1
- package/dist/styles/time-picker.css +1 -1
- package/dist/styles/time-range-picker.css +1 -1
- package/dist/styles/toggle-group.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles/transfer.css +1 -1
- package/dist/styles/upload.css +2 -2
- package/dist/styles.css +1 -1
- package/dist/{table-Boy-0cjy.js → table-Dx-RQ64i.js} +208 -208
- package/dist/table.js +1 -1
- package/dist/{tags-input-DEhtpizX.js → tags-input-hZs5oaT1.js} +9 -9
- package/dist/tags-input.js +1 -1
- package/dist/{toolbar-CtSZ88HI.js → toolbar-CSiDqC8L.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{transfer-BMRyopEw.js → transfer-DHjPhRlH.js} +5 -5
- package/dist/transfer.js +1 -1
- package/dist/{tree-DBirM2v9.js → tree-D-y-0TrL.js} +14 -14
- package/dist/tree.js +1 -1
- package/dist/types/menu/menu-parts.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/select/select.types.d.ts +5 -1
- package/dist/types/select/select.types.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -9,17 +9,17 @@ import { tabbables as d } from "@slotted/core/focus";
|
|
|
9
9
|
import { createControllable as f } from "@slotted/core/state";
|
|
10
10
|
import { createContext as p, useCallback as m, useContext as h, useEffect as g, useId as _, useImperativeHandle as ee, useLayoutEffect as v, useMemo as y, useRef as b, useState as x } from "react";
|
|
11
11
|
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
12
|
-
import { createPresence as
|
|
13
|
-
import { selectMessages as
|
|
14
|
-
import { createPortalRoot as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
12
|
+
import { createPresence as T } from "@slotted/core/presence";
|
|
13
|
+
import { selectMessages as E } from "@slotted/core/i18n";
|
|
14
|
+
import { createPortalRoot as te, setPortalContainer as D } from "@slotted/core/portal";
|
|
15
|
+
import { createFilter as O, moveIndex as k, revealWithin as A } from "@slotted/core/collection";
|
|
16
|
+
import { createDismissableLayer as j } from "@slotted/core/dismissable-layer";
|
|
17
|
+
import { createPositioner as ne } from "@slotted/core/positioner";
|
|
18
|
+
import { createTypeahead as M, isPrintable as N } from "@slotted/core/typeahead";
|
|
18
19
|
import { createPortal as re } from "react-dom";
|
|
19
|
-
import {
|
|
20
|
-
import { matchRanges as P } from "@slotted/core/highlight";
|
|
20
|
+
import { matchRanges as ie } from "@slotted/core/highlight";
|
|
21
21
|
//#region src/select/select-defaults.tsx
|
|
22
|
-
var
|
|
22
|
+
var P = {
|
|
23
23
|
align: "start",
|
|
24
24
|
alignOffset: 0,
|
|
25
25
|
clearable: !1,
|
|
@@ -50,12 +50,12 @@ var F = {
|
|
|
50
50
|
typeaheadTimeout: 500,
|
|
51
51
|
variant: "outline",
|
|
52
52
|
width: "content"
|
|
53
|
-
},
|
|
54
|
-
function
|
|
55
|
-
return h(
|
|
53
|
+
}, F = p(P);
|
|
54
|
+
function I() {
|
|
55
|
+
return h(F);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
let r =
|
|
57
|
+
function L({ children: e, container: t, ...n }) {
|
|
58
|
+
let r = I();
|
|
59
59
|
g(() => {
|
|
60
60
|
if (t !== void 0) return D(t), () => D(null);
|
|
61
61
|
}, [t]);
|
|
@@ -91,20 +91,20 @@ function R({ children: e, container: t, ...n }) {
|
|
|
91
91
|
variant: n.variant ?? r.variant,
|
|
92
92
|
width: n.width ?? r.width
|
|
93
93
|
};
|
|
94
|
-
return /* @__PURE__ */ C(
|
|
94
|
+
return /* @__PURE__ */ C(F.Provider, {
|
|
95
95
|
value: i,
|
|
96
96
|
children: e
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
//#endregion
|
|
100
100
|
//#region src/select/select.tsx
|
|
101
|
-
var
|
|
102
|
-
function
|
|
103
|
-
let e = h(
|
|
101
|
+
var ae = p(void 0);
|
|
102
|
+
function R() {
|
|
103
|
+
let e = h(ae);
|
|
104
104
|
if (e === void 0) throw Error("SelectTrigger, SelectContent and every option have to be inside a Select.");
|
|
105
105
|
return e;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function z(e) {
|
|
108
108
|
return e == null ? [] : typeof e == "string" ? [e] : e;
|
|
109
109
|
}
|
|
110
110
|
function oe(e, t) {
|
|
@@ -114,16 +114,16 @@ var se = (e) => "options" in e;
|
|
|
114
114
|
function ce(e) {
|
|
115
115
|
return e === void 0 ? [] : e.flatMap((e) => se(e) ? e.options : [e]);
|
|
116
116
|
}
|
|
117
|
-
function le({ align: n, alignOffset: r, children: i, clearable: o, closeOnEscape: s, closeOnOutsidePress: c, closeOnSelect: l, collisionPadding: u, defaultHighlightedValue: d = null, defaultOpen: p = !1, defaultSearchValue: h = "", defaultValue: g, disabled: v, filter: S, flip: w, form:
|
|
118
|
-
let J =
|
|
117
|
+
function le({ align: n, alignOffset: r, children: i, clearable: o, closeOnEscape: s, closeOnOutsidePress: c, closeOnSelect: l, collisionPadding: u, defaultHighlightedValue: d = null, defaultOpen: p = !1, defaultSearchValue: h = "", defaultValue: g, disabled: v, filter: S, flip: w, form: T, fullWidth: te, hideWhenDetached: D, highlightedValue: k, highlightMatch: j, invalid: ne, items: M, loading: N, locale: re, loop: ie, messages: P, mount: F, multiple: L, name: R, onHighlightedValueChange: se, onOpenChange: le, onSearchValueChange: B, onValueChange: V, open: H, portal: U, readOnly: ue, ref: de, required: W, search: fe, searchValue: pe, shift: G, side: K, sideOffset: me, size: q, strategy: he, total: ge, typeahead: _e, typeaheadTimeout: ve, value: ye, variant: be, width: xe }) {
|
|
118
|
+
let J = I(), Y = a(), Se = t(E, P), Ce = e(), we = re ?? Ce, X = _(), Te = `${X}listbox`, Ee = `${X}list`, De = `${X}search`, Oe = Y?.ids.control ?? `${X}trigger`, [ke, Ae] = x(p), [je] = x(() => z(g)), [Me, Ne] = x(je), [Pe, Fe] = x(d), [Ie, Le] = x(h), [Re, ze] = x(null), [Be, Ve] = x(null), [He, Ue] = x(null), We = L ?? J.multiple, Ge = v ?? Y?.disabled ?? J.disabled, Ke = ue ?? Y?.readOnly ?? J.readOnly, qe = (H ?? ke) && !Ge, Je = ye === void 0 ? Me : z(ye), Ye = k === void 0 ? Pe : k, Xe = fe ?? J.search, Z = Xe ? pe === void 0 ? Ie : pe : "", Ze = b(qe);
|
|
119
119
|
qe && (Ze.current = !0);
|
|
120
120
|
let Qe = b("selected"), $e = b(/* @__PURE__ */ new Map()), [et, tt] = x(0), nt = y(() => {
|
|
121
121
|
let e = /* @__PURE__ */ new Map();
|
|
122
|
-
for (let t of ce(
|
|
122
|
+
for (let t of ce(M)) e.set(t.value, t.label);
|
|
123
123
|
return e;
|
|
124
|
-
}, [
|
|
124
|
+
}, [M]), rt = m((e, t) => {
|
|
125
125
|
$e.current.get(e) !== t && ($e.current.set(e, t), tt((e) => e + 1));
|
|
126
|
-
}, []), it = m((e) => nt.get(e) ?? $e.current.get(e), [nt, et]), at = y(() =>
|
|
126
|
+
}, []), it = m((e) => nt.get(e) ?? $e.current.get(e), [nt, et]), at = y(() => O({ locale: we }), [we]), ot = m((e) => Z === "" || S === null ? !0 : S === void 0 ? at.contains(e, Z) : S(e, Z), [
|
|
127
127
|
Z,
|
|
128
128
|
at,
|
|
129
129
|
S
|
|
@@ -132,7 +132,7 @@ function le({ align: n, alignOffset: r, children: i, clearable: o, closeOnEscape
|
|
|
132
132
|
currentOpen: qe,
|
|
133
133
|
currentQuery: Z,
|
|
134
134
|
currentSelection: Je,
|
|
135
|
-
highlightedValue:
|
|
135
|
+
highlightedValue: k,
|
|
136
136
|
onHighlightedValueChange: se,
|
|
137
137
|
onOpenChange: le,
|
|
138
138
|
onSearchValueChange: B,
|
|
@@ -194,7 +194,7 @@ function le({ align: n, alignOffset: r, children: i, clearable: o, closeOnEscape
|
|
|
194
194
|
open: () => ut(!0, "programmatic"),
|
|
195
195
|
scrollToKey: (e) => {
|
|
196
196
|
let t = Be?.querySelector(`[data-part='item'][data-value="${CSS.escape(e)}"]`);
|
|
197
|
-
t != null && Be !== null &&
|
|
197
|
+
t != null && Be !== null && A(t, Be);
|
|
198
198
|
}
|
|
199
199
|
}), [Be, ut]);
|
|
200
200
|
let ht = {
|
|
@@ -211,21 +211,21 @@ function le({ align: n, alignOffset: r, children: i, clearable: o, closeOnEscape
|
|
|
211
211
|
disabled: Ge,
|
|
212
212
|
entry: Qe,
|
|
213
213
|
flip: w ?? J.flip,
|
|
214
|
-
form:
|
|
215
|
-
fullWidth:
|
|
214
|
+
form: T,
|
|
215
|
+
fullWidth: te ?? J.fullWidth,
|
|
216
216
|
hideWhenDetached: D ?? J.hideWhenDetached,
|
|
217
217
|
highlighted: Ye,
|
|
218
|
-
highlightMatch:
|
|
219
|
-
invalid:
|
|
218
|
+
highlightMatch: j ?? J.highlightMatch,
|
|
219
|
+
invalid: ne ?? Y?.invalid ?? J.invalid,
|
|
220
220
|
labelFor: it,
|
|
221
221
|
listId: Ee,
|
|
222
|
-
loading:
|
|
222
|
+
loading: N ?? J.loading,
|
|
223
223
|
locale: we,
|
|
224
|
-
loop:
|
|
224
|
+
loop: ie ?? J.loop,
|
|
225
225
|
matches: ot,
|
|
226
|
-
mount:
|
|
226
|
+
mount: F ?? J.mount,
|
|
227
227
|
multiple: We,
|
|
228
|
-
name:
|
|
228
|
+
name: R,
|
|
229
229
|
open: qe,
|
|
230
230
|
optionId: st,
|
|
231
231
|
portal: U ?? J.portal,
|
|
@@ -260,7 +260,7 @@ function le({ align: n, alignOffset: r, children: i, clearable: o, closeOnEscape
|
|
|
260
260
|
variant: be ?? J.variant,
|
|
261
261
|
width: xe ?? J.width
|
|
262
262
|
};
|
|
263
|
-
return /* @__PURE__ */ C(
|
|
263
|
+
return /* @__PURE__ */ C(ae.Provider, {
|
|
264
264
|
value: ht,
|
|
265
265
|
children: i
|
|
266
266
|
});
|
|
@@ -282,7 +282,7 @@ function de(e) {
|
|
|
282
282
|
function W(e, t, n, r) {
|
|
283
283
|
let i = V(e);
|
|
284
284
|
if (i.length === 0) return null;
|
|
285
|
-
let a =
|
|
285
|
+
let a = k({
|
|
286
286
|
enabled: i.map(U),
|
|
287
287
|
from: t === null ? -1 : i.findIndex((e) => H(e) === t),
|
|
288
288
|
intent: n,
|
|
@@ -301,7 +301,7 @@ function fe(e, t, n, r) {
|
|
|
301
301
|
function pe(e, t) {
|
|
302
302
|
if (e === null || t === null) return;
|
|
303
303
|
let n = V(e).find((e) => H(e) === t);
|
|
304
|
-
n !== void 0 &&
|
|
304
|
+
n !== void 0 && A(n, e);
|
|
305
305
|
}
|
|
306
306
|
//#endregion
|
|
307
307
|
//#region src/select/select-parts.tsx
|
|
@@ -318,189 +318,191 @@ function K(e, t, n) {
|
|
|
318
318
|
function me(e, ...t) {
|
|
319
319
|
for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
|
|
320
320
|
}
|
|
321
|
-
function q({ children: e,
|
|
322
|
-
let
|
|
323
|
-
g(() =>
|
|
324
|
-
let [
|
|
321
|
+
function q({ children: e, className: t, ref: s, render: c, style: u, ...d }) {
|
|
322
|
+
let f = R(), p = a(), h = p?.registerControl;
|
|
323
|
+
g(() => h?.(), [h]);
|
|
324
|
+
let [_, ee] = x(null), [v, y] = x(null), T = b(!1);
|
|
325
325
|
g(() => {
|
|
326
|
-
if (
|
|
327
|
-
let e =
|
|
328
|
-
|
|
326
|
+
if (v === null) return;
|
|
327
|
+
let e = v.ownerDocument, t = () => {
|
|
328
|
+
T.current = !1;
|
|
329
329
|
}, n = () => {
|
|
330
|
-
|
|
330
|
+
T.current = !0;
|
|
331
331
|
};
|
|
332
|
-
return e.addEventListener("pointerdown", t, !0),
|
|
333
|
-
e.removeEventListener("pointerdown", t, !0),
|
|
332
|
+
return e.addEventListener("pointerdown", t, !0), v.addEventListener("pointerdown", n), () => {
|
|
333
|
+
e.removeEventListener("pointerdown", t, !0), v.removeEventListener("pointerdown", n);
|
|
334
334
|
};
|
|
335
|
-
}, [
|
|
336
|
-
let [
|
|
335
|
+
}, [v]);
|
|
336
|
+
let [E, te] = x(!1), D = b(null), O = b(null);
|
|
337
337
|
g(() => {
|
|
338
|
-
|
|
339
|
-
}, [
|
|
340
|
-
if (!
|
|
341
|
-
let e =
|
|
342
|
-
return
|
|
343
|
-
e.destroy(),
|
|
338
|
+
f.setTriggerNode(_);
|
|
339
|
+
}, [_, f]), g(() => {
|
|
340
|
+
if (!f.typeahead) return;
|
|
341
|
+
let e = M({ timeout: f.typeaheadTimeout });
|
|
342
|
+
return O.current = e, () => {
|
|
343
|
+
e.destroy(), O.current = null;
|
|
344
344
|
};
|
|
345
|
-
}, [
|
|
346
|
-
if (!
|
|
347
|
-
let e =
|
|
348
|
-
if (
|
|
349
|
-
let { elements: t, labels: n } = de(
|
|
350
|
-
r !== -1 &&
|
|
345
|
+
}, [f.typeahead, f.typeaheadTimeout]), g(() => {
|
|
346
|
+
if (!f.open || f.contentNode === null) return;
|
|
347
|
+
let e = D.current;
|
|
348
|
+
if (D.current = null, e === null || O.current === null) return;
|
|
349
|
+
let { elements: t, labels: n } = de(f.contentNode), r = O.current.match(e, n, -1);
|
|
350
|
+
r !== -1 && f.setHighlighted(H(t[r]), "keyboard");
|
|
351
351
|
}, [
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
352
|
+
f,
|
|
353
|
+
f.contentNode,
|
|
354
|
+
f.open
|
|
355
355
|
]);
|
|
356
|
-
let
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
let n = W(
|
|
360
|
-
n !== null &&
|
|
361
|
-
},
|
|
362
|
-
if (
|
|
363
|
-
t &&
|
|
356
|
+
let k = (e, t) => {
|
|
357
|
+
f.entry.current = e, f.setOpen(!0, "keyboard", t);
|
|
358
|
+
}, A = (e, t) => {
|
|
359
|
+
let n = W(f.contentNode, f.highlighted, e, f.loop);
|
|
360
|
+
n !== null && f.setHighlighted(n, "keyboard", t);
|
|
361
|
+
}, j = (e, t) => {
|
|
362
|
+
if (f.highlighted === null) {
|
|
363
|
+
t && f.setOpen(!1, "select", e);
|
|
364
364
|
return;
|
|
365
365
|
}
|
|
366
|
-
|
|
367
|
-
},
|
|
368
|
-
if (
|
|
366
|
+
f.toggle(f.highlighted, "keyboard", e), t && f.setOpen(!1, "select", e);
|
|
367
|
+
}, ne = (e) => {
|
|
368
|
+
if (f.disabled || f.readOnly) return;
|
|
369
369
|
let t = e.altKey;
|
|
370
|
-
if (!
|
|
370
|
+
if (!f.open) {
|
|
371
371
|
switch (e.key) {
|
|
372
372
|
case "ArrowDown":
|
|
373
|
-
e.preventDefault(),
|
|
373
|
+
e.preventDefault(), k(t ? "none" : "selected", e.nativeEvent);
|
|
374
374
|
return;
|
|
375
375
|
case "ArrowUp":
|
|
376
|
-
e.preventDefault(),
|
|
376
|
+
e.preventDefault(), k("last", e.nativeEvent);
|
|
377
377
|
return;
|
|
378
378
|
case "Enter":
|
|
379
379
|
case " ":
|
|
380
|
-
e.preventDefault(),
|
|
380
|
+
e.preventDefault(), k("selected", e.nativeEvent);
|
|
381
381
|
return;
|
|
382
382
|
case "Home":
|
|
383
|
-
e.preventDefault(),
|
|
383
|
+
e.preventDefault(), k("first", e.nativeEvent);
|
|
384
384
|
return;
|
|
385
385
|
case "End":
|
|
386
|
-
e.preventDefault(),
|
|
386
|
+
e.preventDefault(), k("last", e.nativeEvent);
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
389
|
-
if (!e.ctrlKey && !e.metaKey && !t &&
|
|
390
|
-
if (
|
|
391
|
-
e.preventDefault(),
|
|
389
|
+
if (!e.ctrlKey && !e.metaKey && !t && N(e.key)) {
|
|
390
|
+
if (f.search) {
|
|
391
|
+
e.preventDefault(), f.setQuery(e.key, "keyboard", e.nativeEvent), k("first", e.nativeEvent);
|
|
392
392
|
return;
|
|
393
393
|
}
|
|
394
|
-
|
|
394
|
+
f.typeahead && (e.preventDefault(), D.current = e.key, k("none", e.nativeEvent));
|
|
395
395
|
}
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
398
398
|
switch (e.key) {
|
|
399
399
|
case "ArrowDown":
|
|
400
|
-
e.preventDefault(),
|
|
400
|
+
e.preventDefault(), A("next", e.nativeEvent);
|
|
401
401
|
return;
|
|
402
402
|
case "ArrowUp":
|
|
403
|
-
e.preventDefault(), t ?
|
|
403
|
+
e.preventDefault(), t ? j(e.nativeEvent, !0) : A("previous", e.nativeEvent);
|
|
404
404
|
return;
|
|
405
405
|
case "Home":
|
|
406
|
-
e.preventDefault(),
|
|
406
|
+
e.preventDefault(), A("first", e.nativeEvent);
|
|
407
407
|
return;
|
|
408
408
|
case "End":
|
|
409
|
-
e.preventDefault(),
|
|
409
|
+
e.preventDefault(), A("last", e.nativeEvent);
|
|
410
410
|
return;
|
|
411
411
|
case "PageDown":
|
|
412
|
-
e.preventDefault(),
|
|
412
|
+
e.preventDefault(), A("pageDown", e.nativeEvent);
|
|
413
413
|
return;
|
|
414
414
|
case "PageUp":
|
|
415
|
-
e.preventDefault(),
|
|
415
|
+
e.preventDefault(), A("pageUp", e.nativeEvent);
|
|
416
416
|
return;
|
|
417
417
|
case "Enter":
|
|
418
|
-
e.preventDefault(),
|
|
418
|
+
e.preventDefault(), j(e.nativeEvent, f.closeOnSelect);
|
|
419
419
|
return;
|
|
420
420
|
case " ":
|
|
421
|
-
e.preventDefault(),
|
|
421
|
+
e.preventDefault(), j(e.nativeEvent, !f.multiple && f.closeOnSelect);
|
|
422
422
|
return;
|
|
423
423
|
case "Escape":
|
|
424
|
-
e.preventDefault(),
|
|
424
|
+
e.preventDefault(), f.setOpen(!1, "escape", e.nativeEvent);
|
|
425
425
|
return;
|
|
426
426
|
case "Tab":
|
|
427
|
-
|
|
427
|
+
j(e.nativeEvent, !0);
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
|
-
if (!
|
|
430
|
+
if (!f.typeahead || O.current === null || e.ctrlKey || e.metaKey || t || !N(e.key, O.current.query.length > 0)) return;
|
|
431
431
|
e.preventDefault();
|
|
432
|
-
let { elements: n, labels: r } = de(
|
|
433
|
-
a !== -1 &&
|
|
434
|
-
},
|
|
435
|
-
let t =
|
|
436
|
-
if (
|
|
432
|
+
let { elements: n, labels: r } = de(f.contentNode), i = n.findIndex((e) => H(e) === f.highlighted), a = O.current.match(e.key, r, i);
|
|
433
|
+
a !== -1 && f.setHighlighted(H(n[a]), "keyboard");
|
|
434
|
+
}, re = (e) => {
|
|
435
|
+
let t = T.current;
|
|
436
|
+
if (T.current = !1, e.detail > 0 && !t) {
|
|
437
437
|
e.currentTarget.focus({ preventScroll: !0 });
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
|
-
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
},
|
|
444
|
-
|
|
445
|
-
}, [
|
|
440
|
+
f.disabled || f.readOnly || (f.entry.current = "selected", f.setOpen(!f.open, "pointer", e.nativeEvent));
|
|
441
|
+
}, ie = (e) => {
|
|
442
|
+
f.clear("clear", e.nativeEvent), _?.focus({ preventScroll: !0 });
|
|
443
|
+
}, P = m((e) => {
|
|
444
|
+
ee(e), me(e, s);
|
|
445
|
+
}, [s]), F = [d["aria-describedby"], p?.describedBy].filter(Boolean).join(" "), I = f.clearable && f.selection.length > 0 && !f.disabled && !f.readOnly, L = {
|
|
446
|
+
className: t,
|
|
447
|
+
style: u,
|
|
446
448
|
"data-part": "root",
|
|
447
449
|
...l("part", "root"),
|
|
448
|
-
"data-size":
|
|
450
|
+
"data-size": f.size,
|
|
449
451
|
"data-ui": "select",
|
|
450
452
|
...l("ui", "select"),
|
|
451
|
-
"data-variant":
|
|
452
|
-
...
|
|
453
|
-
...
|
|
454
|
-
...
|
|
455
|
-
...
|
|
456
|
-
...
|
|
457
|
-
...
|
|
458
|
-
...
|
|
459
|
-
...
|
|
460
|
-
...
|
|
461
|
-
},
|
|
462
|
-
disabled:
|
|
463
|
-
frame:
|
|
464
|
-
labelFor:
|
|
453
|
+
"data-variant": f.variant,
|
|
454
|
+
...f.fullWidth ? { "data-full-width": "" } : {},
|
|
455
|
+
...f.multiple ? { "data-multiple": "" } : {},
|
|
456
|
+
...f.open ? { "data-open": "" } : {},
|
|
457
|
+
...f.disabled ? { "data-disabled": "" } : {},
|
|
458
|
+
...f.readOnly ? { "data-readonly": "" } : {},
|
|
459
|
+
...f.invalid ? { "data-invalid": "" } : {},
|
|
460
|
+
...f.required ? { "data-required": "" } : {},
|
|
461
|
+
...f.loading ? { "data-loading": "" } : {},
|
|
462
|
+
...E ? { "data-narrow": "" } : {}
|
|
463
|
+
}, ae = f.multiple && f.selection.length > 0 ? /* @__PURE__ */ C(o, {
|
|
464
|
+
disabled: f.disabled || f.readOnly,
|
|
465
|
+
frame: v,
|
|
466
|
+
labelFor: f.labelFor,
|
|
465
467
|
onNarrow: te,
|
|
466
468
|
onRemove: (e, t) => {
|
|
467
|
-
|
|
469
|
+
f.toggle(e, "select", t.nativeEvent), _?.focus({ preventScroll: !0 });
|
|
468
470
|
},
|
|
469
|
-
removeLabel: (e) =>
|
|
470
|
-
values:
|
|
471
|
-
}) : null,
|
|
471
|
+
removeLabel: (e) => f.t("remove", { label: e }),
|
|
472
|
+
values: f.selection
|
|
473
|
+
}) : null, z = /* @__PURE__ */ w(S, { children: [
|
|
472
474
|
/* @__PURE__ */ C("button", {
|
|
473
|
-
...
|
|
474
|
-
"aria-activedescendant":
|
|
475
|
-
"aria-controls":
|
|
476
|
-
"aria-describedby":
|
|
477
|
-
"aria-expanded":
|
|
478
|
-
"aria-haspopup":
|
|
479
|
-
"aria-invalid":
|
|
480
|
-
"aria-labelledby":
|
|
481
|
-
"aria-readonly":
|
|
482
|
-
"aria-required":
|
|
475
|
+
...d,
|
|
476
|
+
"aria-activedescendant": f.open && !f.search && f.highlighted !== null ? f.optionId(f.highlighted) : void 0,
|
|
477
|
+
"aria-controls": f.open ? f.contentId : void 0,
|
|
478
|
+
"aria-describedby": F === "" ? void 0 : F,
|
|
479
|
+
"aria-expanded": f.open,
|
|
480
|
+
"aria-haspopup": f.search ? "dialog" : "listbox",
|
|
481
|
+
"aria-invalid": f.invalid ? !0 : void 0,
|
|
482
|
+
"aria-labelledby": d["aria-label"] === void 0 && d["aria-labelledby"] === void 0 ? p?.ids.label : d["aria-labelledby"],
|
|
483
|
+
"aria-readonly": f.readOnly ? !0 : void 0,
|
|
484
|
+
"aria-required": f.required ? !0 : void 0,
|
|
483
485
|
"data-part": "trigger",
|
|
484
486
|
"data-part-trigger": "",
|
|
485
|
-
disabled:
|
|
486
|
-
id:
|
|
487
|
-
onClick: G(
|
|
488
|
-
onKeyDown: G(
|
|
489
|
-
ref:
|
|
487
|
+
disabled: f.disabled,
|
|
488
|
+
id: f.triggerId,
|
|
489
|
+
onClick: G(d.onClick, re),
|
|
490
|
+
onKeyDown: G(d.onKeyDown, ne),
|
|
491
|
+
ref: P,
|
|
490
492
|
role: "combobox",
|
|
491
493
|
type: "button",
|
|
492
494
|
children: e
|
|
493
495
|
}),
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
"aria-label":
|
|
496
|
+
ae,
|
|
497
|
+
I ? /* @__PURE__ */ C("button", {
|
|
498
|
+
"aria-label": f.t("clear"),
|
|
497
499
|
"data-part": "clear",
|
|
498
500
|
"data-part-clear": "",
|
|
499
|
-
onClick:
|
|
501
|
+
onClick: ie,
|
|
500
502
|
type: "button",
|
|
501
503
|
children: /* @__PURE__ */ C(r, { children: /* @__PURE__ */ C(n, { name: "x" }) })
|
|
502
504
|
}) : null,
|
|
503
|
-
|
|
505
|
+
f.loading ? /* @__PURE__ */ C("span", {
|
|
504
506
|
"aria-hidden": "true",
|
|
505
507
|
"data-part": "busy",
|
|
506
508
|
"data-part-busy": "",
|
|
@@ -514,17 +516,17 @@ function q({ children: e, ref: t, render: s, ...c }) {
|
|
|
514
516
|
}),
|
|
515
517
|
/* @__PURE__ */ C(he, {})
|
|
516
518
|
] });
|
|
517
|
-
return
|
|
518
|
-
...
|
|
519
|
-
ref:
|
|
520
|
-
children:
|
|
521
|
-
}) :
|
|
522
|
-
...
|
|
523
|
-
children:
|
|
519
|
+
return c === void 0 ? /* @__PURE__ */ C("div", {
|
|
520
|
+
...L,
|
|
521
|
+
ref: y,
|
|
522
|
+
children: z
|
|
523
|
+
}) : c({
|
|
524
|
+
...L,
|
|
525
|
+
children: z
|
|
524
526
|
});
|
|
525
527
|
}
|
|
526
528
|
function he() {
|
|
527
|
-
let e =
|
|
529
|
+
let e = R(), [t, n] = x(null), { restore: r } = e;
|
|
528
530
|
return g(() => {
|
|
529
531
|
let e = t?.form;
|
|
530
532
|
if (e == null) return;
|
|
@@ -563,7 +565,7 @@ function he() {
|
|
|
563
565
|
});
|
|
564
566
|
}
|
|
565
567
|
function ge({ children: e, placeholder: t, ...n }) {
|
|
566
|
-
let r =
|
|
568
|
+
let r = R(), i = r.selection.map((e) => r.labelFor(e)), a = i.filter((e) => e !== void 0), o = r.selection.length > 0 && a.length < r.selection.length, s = (() => {
|
|
567
569
|
if (e !== void 0) return e(r.selection, a);
|
|
568
570
|
if (r.selection.length === 0) return t;
|
|
569
571
|
let n = i[0] ?? r.selection[0];
|
|
@@ -581,7 +583,7 @@ function ge({ children: e, placeholder: t, ...n }) {
|
|
|
581
583
|
});
|
|
582
584
|
}
|
|
583
585
|
function _e({ icon: e, ref: t, render: i, ...a }) {
|
|
584
|
-
let o =
|
|
586
|
+
let o = R(), s = (e, t) => {
|
|
585
587
|
let n = W(o.contentNode, o.highlighted, e, o.loop);
|
|
586
588
|
n !== null && o.setHighlighted(n, "keyboard", t);
|
|
587
589
|
}, c = (e, t) => {
|
|
@@ -652,42 +654,42 @@ function _e({ icon: e, ref: t, render: i, ...a }) {
|
|
|
652
654
|
});
|
|
653
655
|
}
|
|
654
656
|
function ve({ children: e, empty: t, ref: n, render: r, searchProps: i, status: a, ...o }) {
|
|
655
|
-
let s =
|
|
657
|
+
let s = R(), [l, d] = x(null), [f, p] = x(null), [h, _] = x(null), [ee, y] = x("unmounted"), [E, D] = x(!1), [O, k] = x(0), A = b(null), M = b(s);
|
|
656
658
|
M.current = s, g(() => {
|
|
657
|
-
let e =
|
|
659
|
+
let e = T({
|
|
658
660
|
present: M.current.open,
|
|
659
661
|
onStatusChange: y
|
|
660
662
|
});
|
|
661
|
-
return
|
|
662
|
-
e.destroy(),
|
|
663
|
+
return A.current = e, y(e.status), () => {
|
|
664
|
+
e.destroy(), A.current = null;
|
|
663
665
|
};
|
|
664
|
-
}, []), g(() =>
|
|
666
|
+
}, []), g(() => A.current?.sync(s.open), [s.open]), g(() => A.current?.setNode(l), [l]), g(() => s.setContentNode(f), [s, f]);
|
|
665
667
|
let N = s.mount === "eager" || s.mount === "lazy" && s.seen || s.open || ee !== "unmounted";
|
|
666
668
|
g(() => {
|
|
667
669
|
let e = s.triggerNode;
|
|
668
|
-
if (e === null ||
|
|
670
|
+
if (e === null || E) return;
|
|
669
671
|
let t = () => D(!0);
|
|
670
672
|
return e.addEventListener("focusin", t), e.addEventListener("pointerdown", t), () => {
|
|
671
673
|
e.removeEventListener("focusin", t), e.removeEventListener("pointerdown", t);
|
|
672
674
|
};
|
|
673
|
-
}, [s.triggerNode,
|
|
674
|
-
let
|
|
675
|
+
}, [s.triggerNode, E]);
|
|
676
|
+
let ie = N || E;
|
|
675
677
|
v(() => {
|
|
676
|
-
if (!
|
|
678
|
+
if (!ie) {
|
|
677
679
|
_(null);
|
|
678
680
|
return;
|
|
679
681
|
}
|
|
680
|
-
let e =
|
|
682
|
+
let e = te({
|
|
681
683
|
origin: s.triggerNode,
|
|
682
684
|
disabled: !s.portal
|
|
683
685
|
});
|
|
684
686
|
return _(e.container), () => e.release();
|
|
685
687
|
}, [
|
|
686
|
-
|
|
688
|
+
ie,
|
|
687
689
|
s.portal,
|
|
688
690
|
s.triggerNode
|
|
689
691
|
]);
|
|
690
|
-
let { align:
|
|
692
|
+
let { align: P, alignOffset: F, collisionPadding: I, flip: L, hideWhenDetached: ae, shift: z, side: oe, sideOffset: se, strategy: ce, width: le } = s, B = b(null), H = b(0), U = m((e, t) => {
|
|
691
693
|
e.update().then(() => {
|
|
692
694
|
if (B.current !== e || !M.current.open) return;
|
|
693
695
|
t.setAttribute("data-open", "");
|
|
@@ -699,14 +701,14 @@ function ve({ children: e, empty: t, ref: n, render: r, searchProps: i, status:
|
|
|
699
701
|
}, []);
|
|
700
702
|
v(() => {
|
|
701
703
|
if (l === null || s.triggerNode === null) return;
|
|
702
|
-
let e = s.triggerNode.closest("[data-part='root']") ?? s.triggerNode, t =
|
|
703
|
-
align:
|
|
704
|
-
alignOffset:
|
|
705
|
-
boundaryPadding:
|
|
706
|
-
flip:
|
|
707
|
-
hideWhenDetached:
|
|
704
|
+
let e = s.triggerNode.closest("[data-part='root']") ?? s.triggerNode, t = ne(e, l, {
|
|
705
|
+
align: P,
|
|
706
|
+
alignOffset: F,
|
|
707
|
+
boundaryPadding: I,
|
|
708
|
+
flip: L,
|
|
709
|
+
hideWhenDetached: ae,
|
|
708
710
|
matchWidth: le === "anchor",
|
|
709
|
-
shift:
|
|
711
|
+
shift: z,
|
|
710
712
|
side: oe,
|
|
711
713
|
sideOffset: se,
|
|
712
714
|
strategy: ce
|
|
@@ -715,14 +717,14 @@ function ve({ children: e, empty: t, ref: n, render: r, searchProps: i, status:
|
|
|
715
717
|
t.destroy(), B.current = null, l.removeAttribute("data-open");
|
|
716
718
|
};
|
|
717
719
|
}, [
|
|
720
|
+
P,
|
|
718
721
|
F,
|
|
719
722
|
I,
|
|
720
723
|
L,
|
|
721
|
-
|
|
722
|
-
ie,
|
|
724
|
+
ae,
|
|
723
725
|
l,
|
|
724
726
|
s.triggerNode,
|
|
725
|
-
|
|
727
|
+
z,
|
|
726
728
|
oe,
|
|
727
729
|
se,
|
|
728
730
|
ce,
|
|
@@ -743,7 +745,7 @@ function ve({ children: e, empty: t, ref: n, render: r, searchProps: i, status:
|
|
|
743
745
|
s.open
|
|
744
746
|
]), g(() => {
|
|
745
747
|
if (l === null || !s.open) return;
|
|
746
|
-
let e = [s.triggerNode].filter((e) => e !== null), t =
|
|
748
|
+
let e = [s.triggerNode].filter((e) => e !== null), t = j(l, {
|
|
747
749
|
branches: e,
|
|
748
750
|
escape: s.closeOnEscape,
|
|
749
751
|
focusOutside: !1,
|
|
@@ -773,7 +775,7 @@ function ve({ children: e, empty: t, ref: n, render: r, searchProps: i, status:
|
|
|
773
775
|
t !== null && e.setHighlighted(t, "keyboard");
|
|
774
776
|
}, [s.open, f]), v(() => {
|
|
775
777
|
let e = V(f).length;
|
|
776
|
-
|
|
778
|
+
k((t) => t === e ? t : e);
|
|
777
779
|
}), g(() => {
|
|
778
780
|
l?.hasAttribute("data-open") === !0 && pe(f, s.highlighted);
|
|
779
781
|
}, [
|
|
@@ -793,7 +795,7 @@ function ve({ children: e, empty: t, ref: n, render: r, searchProps: i, status:
|
|
|
793
795
|
g(() => {
|
|
794
796
|
s.open && s.search && f !== null && de.current !== s.query && (de.current = s.query, M.current.setHighlighted(W(f, null, "first", !1), "keyboard"));
|
|
795
797
|
}, [
|
|
796
|
-
|
|
798
|
+
O,
|
|
797
799
|
s.open,
|
|
798
800
|
s.query,
|
|
799
801
|
s.search,
|
|
@@ -813,13 +815,13 @@ function ve({ children: e, empty: t, ref: n, render: r, searchProps: i, status:
|
|
|
813
815
|
K
|
|
814
816
|
]), !N) return q === null ? null : re(e, q);
|
|
815
817
|
let ve = c({
|
|
816
|
-
"data-align":
|
|
818
|
+
"data-align": P,
|
|
817
819
|
...s.open ? {} : { inert: !0 },
|
|
818
820
|
"data-part": "positioner",
|
|
819
821
|
"data-size": s.size,
|
|
820
822
|
"data-ui": "select",
|
|
821
823
|
"data-width": s.width
|
|
822
|
-
}), ye = a === void 0 ? s.loading ? s.t("loading") : !s.search ||
|
|
824
|
+
}), ye = a === void 0 ? s.loading ? s.t("loading") : !s.search || O === 0 ? null : s.t("count", { count: O }) : a, be = s.multiple && s.selection.length > 0 ? /* @__PURE__ */ C("div", {
|
|
823
825
|
"aria-hidden": "true",
|
|
824
826
|
"data-part": "chosen",
|
|
825
827
|
"data-part-chosen": "",
|
|
@@ -860,7 +862,7 @@ function ve({ children: e, empty: t, ref: n, render: r, searchProps: i, status:
|
|
|
860
862
|
"data-loading": ""
|
|
861
863
|
}) }, e))
|
|
862
864
|
}) : null,
|
|
863
|
-
!s.loading &&
|
|
865
|
+
!s.loading && O === 0 ? /* @__PURE__ */ C("div", {
|
|
864
866
|
"data-part": "empty",
|
|
865
867
|
"data-part-empty": "",
|
|
866
868
|
children: t ?? s.t("empty")
|
|
@@ -907,7 +909,7 @@ function ve({ children: e, empty: t, ref: n, render: r, searchProps: i, status:
|
|
|
907
909
|
//#endregion
|
|
908
910
|
//#region src/select/select-items.tsx
|
|
909
911
|
function ye({ children: e, description: t, disabled: i = !1, icon: a, position: o, ref: c, textValue: l, value: d, ...f }) {
|
|
910
|
-
let p =
|
|
912
|
+
let p = R(), m = b(null), h = b(null);
|
|
911
913
|
g(() => {
|
|
912
914
|
if (m.current === null) return;
|
|
913
915
|
let e = l ?? m.current.querySelector("[data-part='label']")?.textContent?.trim() ?? "";
|
|
@@ -920,7 +922,7 @@ function ye({ children: e, description: t, disabled: i = !1, icon: a, position:
|
|
|
920
922
|
]);
|
|
921
923
|
let _ = l ?? (typeof e == "string" ? e : void 0), ee = y(() => {
|
|
922
924
|
if (!p.search || !p.highlightMatch || p.query === "" || _ === void 0) return e;
|
|
923
|
-
let t =
|
|
925
|
+
let t = ie(_, p.query, { locale: p.locale });
|
|
924
926
|
return t.length === 0 ? e : /* @__PURE__ */ C(s, {
|
|
925
927
|
ranges: t,
|
|
926
928
|
text: _
|
|
@@ -936,9 +938,9 @@ function ye({ children: e, description: t, disabled: i = !1, icon: a, position:
|
|
|
936
938
|
if (_ !== void 0 && !p.matches(_)) return null;
|
|
937
939
|
let v = p.selection.includes(d), x = p.highlighted === d, S = (e) => {
|
|
938
940
|
i || p.setHighlighted(d, "pointer", e.nativeEvent);
|
|
939
|
-
}, te = (e) => {
|
|
940
|
-
f.onPointerDown?.(e), !e.defaultPrevented && e.preventDefault();
|
|
941
941
|
}, T = (e) => {
|
|
942
|
+
f.onPointerDown?.(e), !e.defaultPrevented && e.preventDefault();
|
|
943
|
+
}, E = (e) => {
|
|
942
944
|
if (!i) {
|
|
943
945
|
if (p.toggle(d, "pointer", e.nativeEvent), p.closeOnSelect && !p.multiple) {
|
|
944
946
|
p.setOpen(!1, "select", e.nativeEvent);
|
|
@@ -959,8 +961,8 @@ function ye({ children: e, description: t, disabled: i = !1, icon: a, position:
|
|
|
959
961
|
...i ? { "data-disabled": "" } : {},
|
|
960
962
|
...v ? { "data-selected": "" } : {},
|
|
961
963
|
...x ? { "data-current": "" } : {},
|
|
962
|
-
onClick:
|
|
963
|
-
onPointerDown:
|
|
964
|
+
onClick: E,
|
|
965
|
+
onPointerDown: T,
|
|
964
966
|
onPointerEnter: S,
|
|
965
967
|
ref: (e) => {
|
|
966
968
|
m.current = e, typeof c == "function" ? c(e) : c != null && (c.current = e);
|
|
@@ -991,7 +993,7 @@ function ye({ children: e, description: t, disabled: i = !1, icon: a, position:
|
|
|
991
993
|
});
|
|
992
994
|
}
|
|
993
995
|
function be({ children: e, label: t, ...n }) {
|
|
994
|
-
let r = `${_()}group`, { query: i } =
|
|
996
|
+
let r = `${_()}group`, { query: i } = R(), [a, o] = x(null), [s, c] = x(!1);
|
|
995
997
|
return g(() => {
|
|
996
998
|
a !== null && c(a.querySelector("[data-part='item']") === null);
|
|
997
999
|
}, [a, i]), /* @__PURE__ */ w("div", {
|
|
@@ -1017,4 +1019,4 @@ function xe(e) {
|
|
|
1017
1019
|
});
|
|
1018
1020
|
}
|
|
1019
1021
|
//#endregion
|
|
1020
|
-
export { _e as a, le as c,
|
|
1022
|
+
export { _e as a, le as c, L as d, I as f, ve as i, R as l, ye as n, q as o, xe as r, ge as s, be as t, P as u };
|