solid-baseui 0.1.0-alpha.1 → 0.1.0-alpha.3
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/CHANGELOG.md +56 -0
- package/README.md +30 -35
- package/dist/lib/client/DialogHandle-DluOK_7u.js +521 -0
- package/dist/lib/client/DialogPopup-CfEb3F54.js +138 -0
- package/dist/lib/client/FieldControl-eDe-Jnp9.js +142 -0
- package/dist/lib/client/{FieldRootContext-izCEh80D.js → FieldRootContext-D3fuVjs3.js} +1 -1
- package/dist/lib/client/{FocusManager-NP1uPXTi.js → FocusManager-q7z7PMV1.js} +92 -89
- package/dist/lib/client/{InternalBackdrop-cSK13gaM.js → InternalBackdrop-B8_lfUvf.js} +1 -1
- package/dist/lib/client/{MenuSubmenuTrigger-yfncqM-D.js → MenuSubmenuTrigger-DMb5CwTF.js} +386 -386
- package/dist/lib/client/{PopupHandle-CQI6Om1Z.js → PopupHandle-DyX5gY1e.js} +17 -11
- package/dist/lib/client/{PopupStore-Du0O57fL.js → PopupStore-BjRwcvbG.js} +91 -88
- package/dist/lib/client/PopupViewport-BanYHrD-.js +154 -0
- package/dist/lib/client/{TriggerFocusGuards-Cs8LVBj5.js → TriggerFocusGuards-Fzspp3Y1.js} +2 -2
- package/dist/lib/client/accordion/index.js +1 -1
- package/dist/lib/client/{accordion-BFeZFpJZ.js → accordion-CA2DfX67.js} +144 -144
- package/dist/lib/client/alert-dialog/index.js +1 -1
- package/dist/lib/client/{alert-dialog-BxGUF8_Q.js → alert-dialog-Bup88Dpx.js} +2 -2
- package/dist/lib/client/autocomplete/index.js +1 -1
- package/dist/lib/client/{autocomplete-C9QA98XD.js → autocomplete-oyy_uRpU.js} +2 -2
- package/dist/lib/client/avatar/index.js +1 -1
- package/dist/lib/client/avatar-DNZ4fnBd.js +191 -0
- package/dist/lib/client/button/index.js +1 -1
- package/dist/lib/client/button-BJZYmCVv.js +88 -0
- package/dist/lib/client/checkbox/index.js +1 -1
- package/dist/lib/client/checkbox-group/index.js +1 -1
- package/dist/lib/client/{checkbox-group-CwMDoSTK.js → checkbox-group-DGyrciZJ.js} +1 -1
- package/dist/lib/client/checkbox-sQHYTbpB.js +425 -0
- package/dist/lib/client/collapsible/index.js +1 -1
- package/dist/lib/client/collapsible-BENbFFCc.js +230 -0
- package/dist/lib/client/combobox/index.js +1 -1
- package/dist/lib/client/{combobox-6DhOdzit.js → combobox-BGH8QLXH.js} +143 -141
- package/dist/lib/client/compositeNavigation-DCt1sQon.js +82 -0
- package/dist/lib/client/{constants-cOVxAoxB.js → constants-ByOMFJAe.js} +100 -100
- package/dist/lib/client/context-menu/index.js +1 -1
- package/dist/lib/client/context-menu-xQ1sBCET.js +220 -0
- package/dist/lib/client/{createAnchorPositioning-D96gu-Dz.js → createAnchorPositioning-DCXIApS1.js} +1 -1
- package/dist/lib/client/{createAnchoredPopupScrollLock-Cx0cbh1_.js → createAnchoredPopupScrollLock-BxKpJbCE.js} +2 -2
- package/dist/lib/client/{createClickInteraction-CTaIFBiV.js → createClickInteraction-BeBsTqtY.js} +1 -1
- package/dist/lib/client/{createFocusInteraction--s9_qBf3.js → createFocusInteraction-DQPWkZe2.js} +7 -7
- package/dist/lib/client/{createPopupAutoResize-Dn-stj-8.js → createPopupAutoResize-CSNpMz5v.js} +3 -3
- package/dist/lib/client/dialog/index.js +1 -1
- package/dist/lib/client/{dialog-B9tR9X48.js → dialog-C0EF0a5u.js} +2 -2
- package/dist/lib/client/{dom-BEAeQ9Eb.js → dom-lDdayFF_.js} +25 -15
- package/dist/lib/client/drawer/index.js +1 -1
- package/dist/lib/client/{drawer-dyr3_sKQ.js → drawer-uKoNBwDU.js} +519 -518
- package/dist/lib/client/field/index.js +1 -1
- package/dist/lib/client/{field-CjUAjp1m.js → field-DIMrgpBW.js} +144 -144
- package/dist/lib/client/form/index.js +1 -1
- package/dist/lib/client/form-Bqq8wSLY.js +109 -0
- package/dist/lib/client/index.js +34 -34
- package/dist/lib/client/input/index.js +1 -1
- package/dist/lib/client/{input-_QHvSSqM.js → input-YthuKwIE.js} +1 -1
- package/dist/lib/client/internals/composeEventHandlers.js +14 -8
- package/dist/lib/client/internals/field-root-context/index.js +2 -2
- package/dist/lib/client/{mergeStyleValue-DhTA9Nwe.js → isSolidAccessor-BH_FevwH.js} +1 -12
- package/dist/lib/client/menu/index.js +1 -1
- package/dist/lib/client/{menu-DLqUBmMK.js → menu-4rNLN6aX.js} +79 -79
- package/dist/lib/client/menubar/index.js +1 -1
- package/dist/lib/client/menubar-nFQGtNmY.js +163 -0
- package/dist/lib/client/mergeStyleValue-Dcd36yxZ.js +12 -0
- package/dist/lib/client/navigation-menu/index.js +1 -1
- package/dist/lib/client/{navigation-menu-mVHV41Ky.js → navigation-menu-BbRyun3a.js} +284 -284
- package/dist/lib/client/number-field/index.js +1 -1
- package/dist/lib/client/{number-field-DusLw_0X.js → number-field-hT_H0hVu.js} +356 -356
- package/dist/lib/client/otp-field/index.js +1 -1
- package/dist/lib/client/otp-field-lsy2iGID.js +584 -0
- package/dist/lib/client/popover/index.js +1 -1
- package/dist/lib/client/{popover-Cv7xn0nW.js → popover-Cmvmuf1L.js} +250 -248
- package/dist/lib/client/{popupStateMapping-C6jQ_LKo.js → popupStateMapping-nhukB8NK.js} +51 -51
- package/dist/lib/client/preview-card/index.js +1 -1
- package/dist/lib/client/{preview-card-FTN_aafM.js → preview-card-Dtu8AnBN.js} +168 -168
- package/dist/lib/client/radio/index.js +1 -1
- package/dist/lib/client/{radio-DA_oZhQT.js → radio-CeCU-Qqi.js} +77 -77
- package/dist/lib/client/radio-group/index.js +1 -1
- package/dist/lib/client/radio-group-NbuJvjQe.js +195 -0
- package/dist/lib/client/{safePolygon-DJG0VIVo.js → safePolygon-DVAR5dQD.js} +70 -70
- package/dist/lib/client/scroll-area/index.js +1 -1
- package/dist/lib/client/scroll-area-DqbvoAd7.js +717 -0
- package/dist/lib/client/{scrollable-SRNYlhF7.js → scrollable-BVaDUXng.js} +12 -12
- package/dist/lib/client/select/index.js +1 -1
- package/dist/lib/client/{select-DSPJt7Rk.js → select-Dad51Xbn.js} +635 -634
- package/dist/lib/client/slider/index.js +1 -1
- package/dist/lib/client/slider-CLSKFq_M.js +927 -0
- package/dist/lib/client/switch/index.js +1 -1
- package/dist/lib/client/{switch-CPl7QHKI.js → switch-Bzuu5EIg.js} +61 -61
- package/dist/lib/client/tabs/index.js +1 -1
- package/dist/lib/client/{tabs-Bn4rZDyZ.js → tabs-DWiBDv8D.js} +252 -249
- package/dist/lib/client/toast/index.js +1 -1
- package/dist/lib/client/{toast-7LdqZWOs.js → toast-DmtPJW2k.js} +353 -353
- package/dist/lib/client/toggle/index.js +1 -1
- package/dist/lib/client/{toggle-CsC37e3e.js → toggle-CAe-Z8Xn.js} +33 -33
- package/dist/lib/client/toggle-group/index.js +1 -1
- package/dist/lib/client/{toggle-group-DSWb9HxN.js → toggle-group-BbQg5s-m.js} +44 -44
- package/dist/lib/client/toolbar/index.js +1 -1
- package/dist/lib/client/{toolbar-DcCi3HNp.js → toolbar-BXT_g-oX.js} +218 -218
- package/dist/lib/client/tooltip/index.js +1 -1
- package/dist/lib/client/{tooltip-D-PkGco9.js → tooltip-h2r2_Xuo.js} +250 -249
- package/dist/lib/client/{useFilteredItems-B7z2CGMV.js → useFilteredItems-BX0BEuSI.js} +850 -819
- package/dist/lib/server/{DialogHandle-nJSSy_jM.js → DialogHandle-BGIISmG7.js} +16 -16
- package/dist/lib/server/{DialogPopup-Da1aIxVA.js → DialogPopup-C2ZDGf42.js} +4 -4
- package/dist/lib/server/{FieldControl-BDeNR3ug.js → FieldControl-CDMMyvuj.js} +6 -6
- package/dist/lib/server/{FieldRootContext-IC-LWzVp.js → FieldRootContext-Bfpna6gA.js} +3 -3
- package/dist/lib/server/{FocusManager-1LfoCsya.js → FocusManager-D-xgblGs.js} +9 -3
- package/dist/lib/server/{InternalBackdrop-C_iDPVR-.js → InternalBackdrop-D_2zAWnl.js} +1 -1
- package/dist/lib/server/{MenuSubmenuTrigger-rR8ZN7YR.js → MenuSubmenuTrigger-BMQKlOvU.js} +50 -50
- package/dist/lib/server/{PopupHandle-Ct6wywmP.js → PopupHandle-QNj4mED2.js} +14 -5
- package/dist/lib/server/{PopupStore-kHjFPiQ5.js → PopupStore-evylvVnN.js} +5 -2
- package/dist/lib/server/{PopupViewport-DftN5VUp.js → PopupViewport-BDttjORN.js} +37 -27
- package/dist/lib/server/{TriggerFocusGuards-CvoGfft9.js → TriggerFocusGuards-B9GNbLrL.js} +2 -2
- package/dist/lib/server/accordion/index.js +7 -7
- package/dist/lib/server/alert-dialog/index.js +2 -2
- package/dist/lib/server/autocomplete/index.js +2 -2
- package/dist/lib/server/avatar/index.js +3 -3
- package/dist/lib/server/button/index.js +6 -6
- package/dist/lib/server/checkbox/index.js +7 -7
- package/dist/lib/server/checkbox-group/index.js +1 -1
- package/dist/lib/server/collapsible/index.js +6 -6
- package/dist/lib/server/combobox/index.js +18 -18
- package/dist/lib/server/{compositeNavigation-BRVT1C38.js → compositeNavigation-D5jKM4yk.js} +32 -1
- package/dist/lib/server/{constants-D7ciIzsV.js → constants-ByqXubhO.js} +2 -2
- package/dist/lib/server/context-menu/index.js +9 -9
- package/dist/lib/server/{createAnchorPositioning-B5Y0WEev.js → createAnchorPositioning-DrQYe7RS.js} +1 -1
- package/dist/lib/server/{createAnchoredPopupScrollLock-DFuUrykR.js → createAnchoredPopupScrollLock-q6gnOSmv.js} +2 -2
- package/dist/lib/server/{createClickInteraction-BYsMgvup.js → createClickInteraction-D7oc1Vco.js} +1 -1
- package/dist/lib/server/{createFocusInteraction-DMyKsniI.js → createFocusInteraction-DFKr4G7a.js} +1 -1
- package/dist/lib/server/{createPopupAutoResize-ImBjwdj_.js → createPopupAutoResize-Cg0-lLf4.js} +1 -1
- package/dist/lib/server/dialog/index.js +2 -2
- package/dist/lib/server/{dom-Crg_2R-j.js → dom-D8_aB1yy.js} +14 -1
- package/dist/lib/server/drawer/index.js +38 -34
- package/dist/lib/server/field/index.js +6 -6
- package/dist/lib/server/form/index.js +2 -2
- package/dist/lib/server/input/index.js +1 -1
- package/dist/lib/server/internals/composeEventHandlers.js +15 -9
- package/dist/lib/server/internals/field-root-context/index.js +1 -1
- package/dist/lib/server/{mergeStyleValue-BwJ10_X2.js → isSolidAccessor-CZpzAH5l.js} +1 -20
- package/dist/lib/server/menu/index.js +17 -17
- package/dist/lib/server/menubar/index.js +4 -4
- package/dist/lib/server/mergeStyleValue-DecVaoac.js +20 -0
- package/dist/lib/server/navigation-menu/index.js +21 -21
- package/dist/lib/server/number-field/index.js +21 -21
- package/dist/lib/server/otp-field/index.js +8 -8
- package/dist/lib/server/popover/index.js +27 -26
- package/dist/lib/server/{popupStateMapping-B2KsiiLb.js → popupStateMapping-VHqr6M4H.js} +1 -1
- package/dist/lib/server/preview-card/index.js +16 -16
- package/dist/lib/server/radio/index.js +6 -6
- package/dist/lib/server/radio-group/index.js +5 -5
- package/dist/lib/server/{safePolygon-C1GNJbKR.js → safePolygon-B8QtiIZ3.js} +1 -1
- package/dist/lib/server/scroll-area/index.js +18 -18
- package/dist/lib/server/{scrollable-CjsSxbGr.js → scrollable-C9Pgq8T5.js} +1 -1
- package/dist/lib/server/select/index.js +39 -38
- package/dist/lib/server/slider/index.js +14 -14
- package/dist/lib/server/switch/index.js +9 -9
- package/dist/lib/server/tabs/index.js +12 -8
- package/dist/lib/server/toast/index.js +32 -32
- package/dist/lib/server/toggle/index.js +7 -7
- package/dist/lib/server/toggle-group/index.js +2 -2
- package/dist/lib/server/toolbar/index.js +14 -14
- package/dist/lib/server/tooltip/index.js +32 -27
- package/dist/lib/server/{useFilteredItems-DCxq20Is.js → useFilteredItems-BmhL0nf1.js} +181 -137
- package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +7 -7
- package/dist/lib/types/combobox/chip/ComboboxChip.d.ts +2 -0
- package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +6 -1
- package/dist/lib/types/combobox/store/ComboboxStore.d.ts +1 -0
- package/dist/lib/types/combobox/utils/handleInputPress.d.ts +1 -1
- package/dist/lib/types/field/control/FieldControl.d.ts +5 -5
- package/dist/lib/types/internals/composeEventHandlers.d.ts +9 -2
- package/dist/lib/types/internals/field-root-context/FieldRootContext.d.ts +1 -0
- package/dist/lib/types/internals/overlay/dom.d.ts +2 -0
- package/dist/lib/types/number-field/input/NumberFieldInput.d.ts +5 -5
- package/dist/lib/types/slider/track/SliderTrack.d.ts +2 -2
- package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +10 -3
- package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +10 -4
- package/package.json +2 -2
- package/dist/lib/client/DialogHandle-BGyIbcvg.js +0 -521
- package/dist/lib/client/DialogPopup-Df7MC358.js +0 -138
- package/dist/lib/client/FieldControl-C0PATyKV.js +0 -142
- package/dist/lib/client/PopupViewport-IS4XU03s.js +0 -152
- package/dist/lib/client/avatar-BQoEzzav.js +0 -191
- package/dist/lib/client/button-akYS6FyY.js +0 -88
- package/dist/lib/client/checkbox-DOXtzBhA.js +0 -425
- package/dist/lib/client/collapsible-t8YReaIp.js +0 -230
- package/dist/lib/client/compositeNavigation-sxniYTc7.js +0 -58
- package/dist/lib/client/context-menu-CplDpqmi.js +0 -220
- package/dist/lib/client/form-6Ne_bWQX.js +0 -109
- package/dist/lib/client/menubar-DhPRUQZ6.js +0 -163
- package/dist/lib/client/otp-field-D-B9tZzF.js +0 -584
- package/dist/lib/client/radio-group-CWtQxWDl.js +0 -195
- package/dist/lib/client/scroll-area-NCr49LkD.js +0 -717
- package/dist/lib/client/slider-CWq9hxFf.js +0 -927
|
@@ -4,36 +4,37 @@ import { E as n, S as r, b as i, g as a, h as o, i as s, l as c, r as l, t as u,
|
|
|
4
4
|
import { n as m, t as h } from "./resolveStyle-XcgAuaKR.js";
|
|
5
5
|
import { createChangeEventDetails as g, createGenericEventDetails as _ } from "./internals/createBaseUIEventDetails.js";
|
|
6
6
|
import { transitionStatusMapping as v } from "./internals/stateAttributesMapping.js";
|
|
7
|
-
import { composeEventHandlers as y } from "./internals/composeEventHandlers.js";
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import { i as E, n as D, r as O, t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as A } from "./createAnchoredPopupScrollLock-
|
|
14
|
-
import { t as
|
|
15
|
-
import { c as
|
|
16
|
-
import { a as
|
|
17
|
-
import { t as
|
|
18
|
-
import { a as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { a as
|
|
7
|
+
import { composeEventHandlers as y, liveEventHandler as b } from "./internals/composeEventHandlers.js";
|
|
8
|
+
import { t as x } from "./runOnceAnimationsFinish-CFADb4CN.js";
|
|
9
|
+
import { l as ee, m as te, n as S, o as C, s as w, u as T } from "./dom-lDdayFF_.js";
|
|
10
|
+
import { i as E, n as D, r as O, t as k } from "./compositeNavigation-DCt1sQon.js";
|
|
11
|
+
import { t as ne } from "./createAnchorPositioning-DCXIApS1.js";
|
|
12
|
+
import { t as re } from "./InternalBackdrop-B8_lfUvf.js";
|
|
13
|
+
import { t as A } from "./createAnchoredPopupScrollLock-BxKpJbCE.js";
|
|
14
|
+
import { t as ie } from "./createClickInteraction-BeBsTqtY.js";
|
|
15
|
+
import { c as ae, i as oe, n as se, r as ce, s as le, t as ue } from "./FloatingTree-23B7KKPD.js";
|
|
16
|
+
import { a as de, n as fe, o as pe, t as me } from "./PopupStore-BjRwcvbG.js";
|
|
17
|
+
import { t as he } from "./createTransitionStatus-BL_cPSEA.js";
|
|
18
|
+
import { a as j, i as ge, n as _e, o as ve, r as M } from "./popupStateMapping-nhukB8NK.js";
|
|
19
|
+
import { t as ye } from "./FocusManager-q7z7PMV1.js";
|
|
20
|
+
import { t as be } from "./setRef-fXF6OIo3.js";
|
|
21
|
+
import { a as xe, i as Se, n as N, r as Ce, t as P } from "./buttonSemantics-paljfpOX.js";
|
|
22
22
|
import { n as we } from "./DirectionContext-BwMabICS.js";
|
|
23
23
|
import { DEFAULT_FIELD_STATE_ATTRIBUTES as Te, fieldStateAttributesMapping as Ee } from "./internals/field-constants.js";
|
|
24
|
-
import { n as De } from "./FieldRootContext-
|
|
25
|
-
import { n as
|
|
26
|
-
import { a as
|
|
27
|
-
import { r as
|
|
28
|
-
import { i as
|
|
29
|
-
import { t as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
24
|
+
import { n as De, r as Oe, t as ke } from "./FieldRootContext-D3fuVjs3.js";
|
|
25
|
+
import { n as Ae } from "./FormContext-CwLBtm_d.js";
|
|
26
|
+
import { a as je, c as Me, i as Ne, n as Pe, o as Fe, r as Ie, s as Le, t as Re } from "./isSolidAccessor-BH_FevwH.js";
|
|
27
|
+
import { r as ze } from "./LabelableContext-CmQF-TX2.js";
|
|
28
|
+
import { i as Be } from "./scrollable-BVaDUXng.js";
|
|
29
|
+
import { t as Ve } from "./platform-Bk5Q32mf.js";
|
|
30
|
+
import { t as He } from "./mergeStyleValue-Dcd36yxZ.js";
|
|
31
|
+
import { createComponent as F, delegateEvents as I, effect as Ue, getNextElement as L, memo as We, mergeProps as R, ref as Ge, runHydrationEvents as z, setAttribute as B, setProperty as Ke, spread as V, style as qe, template as H } from "@solidjs/web";
|
|
32
|
+
import { For as Je, Show as Ye, createContext as U, createEffect as W, createMemo as G, createSignal as K, createUniqueId as Xe, flush as Ze, omit as q, onCleanup as J, untrack as Y, useContext as Qe } from "solid-js";
|
|
32
33
|
//#region src/internals/overlay/createListNavigation.ts
|
|
33
|
-
function
|
|
34
|
+
function $e(e) {
|
|
34
35
|
let t = () => e.enabled?.() ?? !0, n = () => e.orientation?.() ?? "vertical", i = (e) => e === "Home" || e === "End" || n() !== "horizontal" && (e === "ArrowDown" || e === "ArrowUp") || n() !== "vertical" && (e === "ArrowLeft" || e === "ArrowRight"), a = null, o = (t) => t === "Home" || t === "ArrowDown" ? !0 : t === "End" || t === "ArrowUp" ? !1 : t === (e.rtl?.() ?? !1 ? "ArrowLeft" : "ArrowRight"), s = (t, r, i = !1) => {
|
|
35
36
|
let a = e.activeIndex() ?? e.selectedIndex?.() ?? -1;
|
|
36
|
-
if (i) a = o(t.key) ? D(r, e.disabledIndices?.()) :
|
|
37
|
+
if (i) a = o(t.key) ? D(r, e.disabledIndices?.()) : k(r, e.disabledIndices?.());
|
|
37
38
|
else {
|
|
38
39
|
let i = e.loopFocus?.() ?? !1, o = i && (e.allowEscape?.() ?? !1), s = O({
|
|
39
40
|
list: r,
|
|
@@ -49,13 +50,13 @@ function Qe(e) {
|
|
|
49
50
|
}
|
|
50
51
|
e.onNavigate(a === -1 ? null : a, t), !(e.virtual?.() ?? !1) && a >= 0 && r[a]?.focus({ preventScroll: !0 });
|
|
51
52
|
};
|
|
52
|
-
return
|
|
53
|
+
return W(() => ({
|
|
53
54
|
open: e.context.track().open,
|
|
54
55
|
list: e.list()
|
|
55
56
|
}), (e) => {
|
|
56
57
|
if (!a || !e.open || e.list.length === 0) return;
|
|
57
58
|
let t = a;
|
|
58
|
-
a = null,
|
|
59
|
+
a = null, Y(() => s(t.event, e.list, !0));
|
|
59
60
|
}), {
|
|
60
61
|
onKeyDown(n) {
|
|
61
62
|
if (!t() || !i(n.key)) return;
|
|
@@ -85,11 +86,11 @@ function Qe(e) {
|
|
|
85
86
|
}
|
|
86
87
|
//#endregion
|
|
87
88
|
//#region src/internals/overlay/createTypeahead.ts
|
|
88
|
-
function
|
|
89
|
-
let t = "", n =
|
|
89
|
+
function et(e) {
|
|
90
|
+
let t = "", n = Y(() => e.selectedIndex?.() ?? e.activeIndex() ?? -1), r = null, i, a = () => {
|
|
90
91
|
clearTimeout(i), t = "", n = r ?? n, e.onTyping?.(!1);
|
|
91
92
|
};
|
|
92
|
-
|
|
93
|
+
J(a), W(() => ({
|
|
93
94
|
open: e.context.track().open,
|
|
94
95
|
selected: e.selectedIndex?.() ?? null
|
|
95
96
|
}), (e) => {
|
|
@@ -122,13 +123,13 @@ function $e(e) {
|
|
|
122
123
|
},
|
|
123
124
|
onBlur(t) {
|
|
124
125
|
let n = t.relatedTarget;
|
|
125
|
-
!
|
|
126
|
+
!S(e.context.state.domReferenceElement, n) && !S(e.context.state.floatingElement, n) && a();
|
|
126
127
|
}
|
|
127
128
|
};
|
|
128
129
|
}
|
|
129
130
|
//#endregion
|
|
130
131
|
//#region src/internals/valueLabel.ts
|
|
131
|
-
function
|
|
132
|
+
function tt(e) {
|
|
132
133
|
if (e == null) return "";
|
|
133
134
|
if (typeof e == "string") return e;
|
|
134
135
|
try {
|
|
@@ -137,39 +138,39 @@ function et(e) {
|
|
|
137
138
|
return String(e);
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
|
-
function tt(e) {
|
|
141
|
-
return Array.isArray(e) && e.length > 0 && typeof e[0] == "object" && e[0] != null && Array.isArray(e[0].items);
|
|
142
|
-
}
|
|
143
141
|
function nt(e) {
|
|
144
|
-
return Array.isArray(e)
|
|
142
|
+
return Array.isArray(e) && e.length > 0 && typeof e[0] == "object" && e[0] != null && Array.isArray(e[0].items);
|
|
145
143
|
}
|
|
146
144
|
function rt(e) {
|
|
145
|
+
return Array.isArray(e) ? nt(e) ? e.flatMap((e) => e.items) : e : [];
|
|
146
|
+
}
|
|
147
|
+
function it(e) {
|
|
147
148
|
if (e == null) return !1;
|
|
148
149
|
if (!Array.isArray(e)) return Object.hasOwn(e, "null");
|
|
149
|
-
for (let t of
|
|
150
|
+
for (let t of rt(e)) {
|
|
150
151
|
let e = t;
|
|
151
152
|
if (e && typeof e == "object" && e.value == null && e.label != null) return !0;
|
|
152
153
|
}
|
|
153
154
|
return !1;
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
+
function at(e, t) {
|
|
156
157
|
if (t && e != null) return t(e) ?? "";
|
|
157
158
|
if (e && typeof e == "object") {
|
|
158
159
|
if ("label" in e && e.label != null) return String(e.label);
|
|
159
160
|
if ("value" in e) return String(e.value);
|
|
160
161
|
}
|
|
161
|
-
return
|
|
162
|
+
return tt(e);
|
|
162
163
|
}
|
|
163
|
-
function
|
|
164
|
-
return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ?
|
|
164
|
+
function ot(e, t) {
|
|
165
|
+
return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? tt(e.value) : tt(e);
|
|
165
166
|
}
|
|
166
|
-
function
|
|
167
|
-
let r = () =>
|
|
167
|
+
function st(e, t, n) {
|
|
168
|
+
let r = () => at(e, n);
|
|
168
169
|
if (n && e != null) return n(e);
|
|
169
170
|
if (e && typeof e == "object" && "label" in e && e.label != null) return e.label;
|
|
170
171
|
if (t && !Array.isArray(t)) return Object.hasOwn(t, String(e)) ? t[String(e)] ?? r() : r();
|
|
171
172
|
if (Array.isArray(t)) {
|
|
172
|
-
let n =
|
|
173
|
+
let n = rt(t);
|
|
173
174
|
if (typeof e != "object" || !e) {
|
|
174
175
|
let t = n.find((t) => t && t.value === e);
|
|
175
176
|
return t && t.label != null ? t.label : r();
|
|
@@ -181,55 +182,55 @@ function ot(e, t, n) {
|
|
|
181
182
|
}
|
|
182
183
|
return r();
|
|
183
184
|
}
|
|
184
|
-
function
|
|
185
|
+
function ct(e, t, n) {
|
|
185
186
|
return e.flatMap((e, r) => {
|
|
186
|
-
let i =
|
|
187
|
+
let i = st(e, t, n);
|
|
187
188
|
return r === 0 ? [i] : [", ", i];
|
|
188
189
|
});
|
|
189
190
|
}
|
|
190
191
|
//#endregion
|
|
191
192
|
//#region src/internals/filter.ts
|
|
192
|
-
var
|
|
193
|
-
function
|
|
194
|
-
return Array.isArray(e) ? e.map((e) =>
|
|
193
|
+
var lt = /* @__PURE__ */ new Map();
|
|
194
|
+
function ut(e) {
|
|
195
|
+
return Array.isArray(e) ? e.map((e) => ut(e)).join(",") : e == null ? "" : String(e);
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function dt(e = {}) {
|
|
197
198
|
let t = {
|
|
198
199
|
usage: "search",
|
|
199
200
|
sensitivity: "base",
|
|
200
201
|
ignorePunctuation: !0,
|
|
201
202
|
...e
|
|
202
|
-
}, n = `${
|
|
203
|
+
}, n = `${ut(e.locale)}|${JSON.stringify(t)}`, r = lt.get(n);
|
|
203
204
|
if (r) return r;
|
|
204
205
|
let i = new Intl.Collator(e.locale, t), a = {
|
|
205
206
|
contains(e, t, n) {
|
|
206
207
|
if (!t) return !0;
|
|
207
|
-
let r =
|
|
208
|
+
let r = at(e, n);
|
|
208
209
|
for (let e = 0; e <= r.length - t.length; e += 1) if (i.compare(r.slice(e, e + t.length), t) === 0) return !0;
|
|
209
210
|
return !1;
|
|
210
211
|
},
|
|
211
212
|
startsWith(e, t, n) {
|
|
212
213
|
if (!t) return !0;
|
|
213
|
-
let r =
|
|
214
|
+
let r = at(e, n);
|
|
214
215
|
return i.compare(r.slice(0, t.length), t) === 0;
|
|
215
216
|
},
|
|
216
217
|
endsWith(e, t, n) {
|
|
217
218
|
if (!t) return !0;
|
|
218
|
-
let r =
|
|
219
|
+
let r = at(e, n), a = t.length;
|
|
219
220
|
return r.length >= a && i.compare(r.slice(r.length - a), t) === 0;
|
|
220
221
|
}
|
|
221
222
|
};
|
|
222
|
-
return
|
|
223
|
+
return lt.set(n, a), a;
|
|
223
224
|
}
|
|
224
225
|
//#endregion
|
|
225
226
|
//#region src/combobox/store/ComboboxItemRegistry.ts
|
|
226
|
-
var
|
|
227
|
+
var ft = class {
|
|
227
228
|
registrations = /* @__PURE__ */ new Map();
|
|
228
229
|
revision;
|
|
229
230
|
setRevision;
|
|
230
231
|
order = 0;
|
|
231
232
|
constructor() {
|
|
232
|
-
let [e, t] =
|
|
233
|
+
let [e, t] = K(0, { ownedWrite: !0 });
|
|
233
234
|
this.revision = e, this.setRevision = t;
|
|
234
235
|
}
|
|
235
236
|
register(e) {
|
|
@@ -245,7 +246,7 @@ var dt = class {
|
|
|
245
246
|
this.setRevision((e) => e + 1);
|
|
246
247
|
}
|
|
247
248
|
items() {
|
|
248
|
-
return this.revision(), Array.from(this.registrations.values()).sort(
|
|
249
|
+
return this.revision(), Array.from(this.registrations.values()).sort(pt);
|
|
249
250
|
}
|
|
250
251
|
indexOf(e) {
|
|
251
252
|
let t = this.items(), n = t.findIndex((t) => t.token === e);
|
|
@@ -275,7 +276,7 @@ var dt = class {
|
|
|
275
276
|
return this.items().length;
|
|
276
277
|
}
|
|
277
278
|
};
|
|
278
|
-
function
|
|
279
|
+
function pt(e, t) {
|
|
279
280
|
let n = e.index(), r = t.index();
|
|
280
281
|
if (n !== void 0 && r !== void 0) return n - r;
|
|
281
282
|
let i = e.element(), a = t.element();
|
|
@@ -288,14 +289,14 @@ function ft(e, t) {
|
|
|
288
289
|
}
|
|
289
290
|
//#endregion
|
|
290
291
|
//#region src/combobox/store/ComboboxStore.ts
|
|
291
|
-
function
|
|
292
|
-
let [t, n] =
|
|
292
|
+
function mt(e) {
|
|
293
|
+
let [t, n] = K(() => e, { ownedWrite: !0 });
|
|
293
294
|
return [t, (e) => {
|
|
294
295
|
n(() => e);
|
|
295
296
|
}];
|
|
296
297
|
}
|
|
297
|
-
var
|
|
298
|
-
collection = new
|
|
298
|
+
var ht = class extends me {
|
|
299
|
+
collection = new ft();
|
|
299
300
|
keyboardActive = !0;
|
|
300
301
|
pointerDownItem = null;
|
|
301
302
|
selectionEvent = null;
|
|
@@ -323,7 +324,7 @@ var pt = class extends pe {
|
|
|
323
324
|
inputOwnsFormValue;
|
|
324
325
|
setInputOwnsFormValue;
|
|
325
326
|
constructor(e) {
|
|
326
|
-
super(e), [this.activeIndex, this.setActiveIndex] =
|
|
327
|
+
super(e), [this.activeIndex, this.setActiveIndex] = mt(null), [this.selectedIndex, this.setSelectedIndex] = mt(null), [this.forceMounted, this.setForceMounted] = mt(!1), [this.labelId, this.setLabelId] = mt(void 0), [this.listElement, this.setListElement] = mt(null), [this.popupSide, this.setPopupSide] = mt(null), [this.openMethod, this.setOpenMethod] = mt(null), [this.inputInsidePopup, this.setInputInsidePopup] = mt(!0), [this.inputOwnsFormValue, this.setInputOwnsFormValue] = mt(e.inputOwnsFormValue ?? !1);
|
|
327
328
|
}
|
|
328
329
|
elements() {
|
|
329
330
|
return this.collection.elements();
|
|
@@ -334,20 +335,20 @@ var pt = class extends pe {
|
|
|
334
335
|
resetAfterClose() {
|
|
335
336
|
this.setOpenMethod(null), this.pointerDownItem = null, this.selectionEvent = null;
|
|
336
337
|
}
|
|
337
|
-
},
|
|
338
|
-
function
|
|
339
|
-
let e =
|
|
340
|
-
if (e ===
|
|
338
|
+
}, gt = Symbol("ComboboxRootContext"), _t = U(gt);
|
|
339
|
+
function X() {
|
|
340
|
+
let e = Qe(_t);
|
|
341
|
+
if (e === gt) throw Error("Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.");
|
|
341
342
|
return e;
|
|
342
343
|
}
|
|
343
|
-
var
|
|
344
|
-
function
|
|
345
|
-
let e =
|
|
346
|
-
return e ===
|
|
344
|
+
var vt = Symbol("ComboboxGroupCollectionContext"), yt = U(vt);
|
|
345
|
+
function bt() {
|
|
346
|
+
let e = Qe(yt);
|
|
347
|
+
return e === vt ? void 0 : e;
|
|
347
348
|
}
|
|
348
349
|
//#endregion
|
|
349
350
|
//#region src/combobox/root/AriaCombobox.tsx
|
|
350
|
-
var
|
|
351
|
+
var xt = /* @__PURE__ */ H("<input tabindex=-1 aria-hidden=true>"), St = /* @__PURE__ */ H("<input type=hidden>"), Ct = {
|
|
351
352
|
"clip-path": "inset(50%)",
|
|
352
353
|
overflow: "hidden",
|
|
353
354
|
"white-space": "nowrap",
|
|
@@ -359,41 +360,41 @@ var yt = /* @__PURE__ */ B("<input tabindex=-1 aria-hidden=true>"), bt = /* @__P
|
|
|
359
360
|
position: "fixed",
|
|
360
361
|
top: "0",
|
|
361
362
|
left: "0"
|
|
362
|
-
},
|
|
363
|
-
...
|
|
363
|
+
}, wt = {
|
|
364
|
+
...Ct,
|
|
364
365
|
position: "absolute"
|
|
365
|
-
},
|
|
366
|
-
value:
|
|
366
|
+
}, Tt = Symbol("none"), Et = {
|
|
367
|
+
value: Tt,
|
|
367
368
|
index: -1
|
|
368
369
|
};
|
|
369
|
-
function
|
|
370
|
-
let t =
|
|
370
|
+
function Dt(e) {
|
|
371
|
+
let t = Oe(!0), r = Ae(), o = ze(), s = we(), c = ae(), l = le(), u = c ?? new ce(), m = Symbol("Combobox"), h = `base-ui-${Xe()}`, v = `base-ui-${Xe()}`, y = Xe(), b = Y(() => e.selectedValue !== void 0), x = Y(() => e.inputValue !== void 0), te = Y(() => e.open !== void 0), C = Y(() => e.inputValue !== void 0 || e.defaultInputValue !== void 0), w = G(() => e.selectionMode), T = G(() => e.selectionMode === "multiple"), E = G(() => e.selectionMode === "single"), D = G(() => e.isItemEqualToValue ?? Ne), O = () => e.itemCollection ? k : e.itemToStringLabel;
|
|
371
372
|
function k(t) {
|
|
372
373
|
let n = e.itemCollection;
|
|
373
|
-
if (!n) return
|
|
374
|
-
if (!n.hasValue(t,
|
|
375
|
-
let r =
|
|
374
|
+
if (!n) return at(t, e.itemToStringLabel);
|
|
375
|
+
if (!n.hasValue(t, D())) {
|
|
376
|
+
let r = rt(e.filteredItems).find((e) => Ie(n.value(e), t, D()));
|
|
376
377
|
if (r !== void 0) return n.itemLabel(r);
|
|
377
378
|
}
|
|
378
|
-
return n.label(t,
|
|
379
|
+
return n.label(t, D(), e.itemToStringLabel);
|
|
379
380
|
}
|
|
380
|
-
let ne = (t) => e.itemCollection ? e.itemCollection.value(t) : t,
|
|
381
|
+
let ne = (t) => e.itemCollection ? e.itemCollection.value(t) : t, re = () => e.itemCollection?.itemLabel ?? e.itemToStringLabel, A = () => e.itemToStringValue, fe = Y(() => {
|
|
381
382
|
let t = e.defaultSelectedValue;
|
|
382
|
-
return t == null ? e.selectionMode === "multiple" ? [] : t ?? null : Array.isArray(t) ? t.slice() : t;
|
|
383
|
-
}), [me, he] =
|
|
383
|
+
return t == null ? e.selectionMode === "multiple" ? [] : t ?? null : e.selectionMode === "multiple" && Array.isArray(t) ? t.slice() : t;
|
|
384
|
+
}), [me, he] = K(() => fe), j = G(() => b ? e.selectedValue ?? null : me()), ge = Y(() => C ? e.defaultInputValue ?? e.inputValue ?? "" : e.selectionMode === "single" ? k(j()) : ""), [_e, ve] = K(ge), M = G(() => x ? e.inputValue ?? "" : _e()), [ye, be] = K(!1), [xe, Se] = K(null), [N, Ce] = K(null, { ownedWrite: !0 }), [P, Te] = K(null, { ownedWrite: !0 }), [Ee, De] = K(null, { ownedWrite: !0 }), [ke, Pe] = K(null, { ownedWrite: !0 }), [Re, Ve] = K(null, { ownedWrite: !0 }), He = G(() => e.id ?? h), I = G(() => t.disabled() || (e.disabled ?? !1)), R = G(() => e.readOnly ?? !1), z = G(() => e.required ?? !1), V = G(() => e.modal ?? !1), H = G(() => e.grid ?? !1), Ye = G(() => e.virtualized ?? !1), U = G(() => e.inline ?? !1), Ze = G(() => e.openOnInputClick ?? !0), q = G(() => e.keepHighlight ?? !1), Qe = G(() => e.highlightItemOnHover ?? !0), et = G(() => e.loopFocus ?? !0), tt = G(() => e.submitOnItemClick ?? !1), it = G(() => e.autoComplete ?? "list"), st = G(() => e.limit ?? -1), ct = G(() => t.name() ?? e.name), lt = G(() => e.form), ut = G(() => e.items !== void 0), ft = G(() => e.filteredItems !== void 0), pt = G(() => e.autoHighlight === "always" ? "always" : e.autoHighlight ? "input-change" : !1), mt = G(() => dt({ locale: e.locale })), gt = G(() => {
|
|
384
385
|
if (e.filter === null) return () => !0;
|
|
385
386
|
if (e.filter !== void 0) return e.filter;
|
|
386
|
-
let t =
|
|
387
|
+
let t = mt(), n = re();
|
|
387
388
|
return (e, r) => e != null && t.contains(e, r, n);
|
|
388
|
-
}),
|
|
389
|
-
let e =
|
|
390
|
-
return
|
|
391
|
-
}),
|
|
392
|
-
if (e.filteredItems !== void 0 && !
|
|
389
|
+
}), X = G(() => xe() ?? String(M()).trim()), vt = G(() => E() ? k(j()) : ""), yt = G(() => {
|
|
390
|
+
let e = vt(), t = X();
|
|
391
|
+
return E() && !ye() && t !== "" && e.length === t.length && mt().contains(e, t);
|
|
392
|
+
}), bt = G(() => e.filterQuery ?? (yt() ? "" : X())), Dt = G(() => ut() && ft() && yt() && (!e.itemCollection || e.itemCollection.hasValue(j(), D()))), jt = G(() => rt(e.items)), Mt = G(() => {
|
|
393
|
+
if (e.filteredItems !== void 0 && !Dt()) return e.filteredItems;
|
|
393
394
|
let t = e.items;
|
|
394
395
|
if (t === void 0) return [];
|
|
395
|
-
let n =
|
|
396
|
-
if (
|
|
396
|
+
let n = bt(), r = st(), i = gt(), a = re();
|
|
397
|
+
if (nt(t)) {
|
|
397
398
|
let e = [], o = 0;
|
|
398
399
|
for (let s of t) {
|
|
399
400
|
if (r > -1 && o >= r) break;
|
|
@@ -409,7 +410,7 @@ function Tt(e) {
|
|
|
409
410
|
}
|
|
410
411
|
return e;
|
|
411
412
|
}
|
|
412
|
-
let o =
|
|
413
|
+
let o = jt();
|
|
413
414
|
if (n === "") return r > -1 ? o.slice(0, r) : o;
|
|
414
415
|
let s = [];
|
|
415
416
|
for (let e of o) {
|
|
@@ -417,537 +418,546 @@ function Tt(e) {
|
|
|
417
418
|
i(e, n, a) && s.push(e);
|
|
418
419
|
}
|
|
419
420
|
return s;
|
|
420
|
-
}),
|
|
421
|
-
let e =
|
|
422
|
-
return
|
|
423
|
-
}),
|
|
424
|
-
|
|
421
|
+
}), Nt = G(() => {
|
|
422
|
+
let e = Mt();
|
|
423
|
+
return nt(e) ? e.flatMap((e) => e.items) : e;
|
|
424
|
+
}), Pt = G(() => Mt().length === 0), Ft = !1, It = Et, Lt = f, Rt = null, zt = null, Bt = Y(() => !!(e.open ?? e.defaultOpen) && e.autoHighlight === !0), Vt = Ot(Y(j)), Ht = Y(M), Ut = Y(X), Z = new ht({
|
|
425
|
+
inputOwnsFormValue: Y(() => e.selectionMode === "none"),
|
|
426
|
+
controlledOpen: () => te ? e.open : void 0,
|
|
425
427
|
floatingId: v,
|
|
426
428
|
nodeId: y,
|
|
427
429
|
onOpenChange: () => (t, n) => {
|
|
428
|
-
|
|
430
|
+
Z.open() !== t && (!t && e.actionsRef && n.preventUnmountOnClose(), n.reason === "escape-key" && ut() && Nt().length === 0 && !Z.emptyElement && n.allowPropagation(), e.onOpenChange?.(t, n), !n.isCanceled && sn(t, n));
|
|
429
431
|
},
|
|
430
432
|
onOpenChangeComplete: () => e.onOpenChangeComplete
|
|
431
433
|
});
|
|
432
|
-
|
|
433
|
-
let Wt =
|
|
434
|
+
Z.update({ open: Y(() => e.open ?? e.defaultOpen ?? !1) }), Z.configureTriggerUnmount({ closeOnActiveTriggerUnmount: !1 }), W(() => w() === "none" && (e.inline || !Z.inputInsidePopup()), (e) => Z.setInputOwnsFormValue(!!e));
|
|
435
|
+
let Wt = oe({
|
|
434
436
|
tree: u,
|
|
435
437
|
id: y,
|
|
436
438
|
parentId: l,
|
|
437
|
-
context: () =>
|
|
438
|
-
}), Gt =
|
|
439
|
+
context: () => Z.context.floatingRoot
|
|
440
|
+
}), Gt = de(Z, () => Kt(), { onUnmount: () => mn() });
|
|
439
441
|
function Kt() {
|
|
440
|
-
return
|
|
442
|
+
return U() ? Z.track().positionerElement?.closest("[role=\"dialog\"]") ?? null : Z.track().popupElement;
|
|
441
443
|
}
|
|
442
|
-
let
|
|
444
|
+
let Q = G(() => ut() || ft() ? Nt().map(ne) : Z.collection.values());
|
|
443
445
|
function qt() {
|
|
444
|
-
let e =
|
|
445
|
-
if (!
|
|
446
|
-
let t =
|
|
447
|
-
return
|
|
446
|
+
let e = Z.collection.labels();
|
|
447
|
+
if (!ut()) return e;
|
|
448
|
+
let t = Nt().map((e) => at(e, re()));
|
|
449
|
+
return Z.forceMounted() ? t.map((t, n) => e[n] ?? t) : t;
|
|
448
450
|
}
|
|
449
|
-
let Jt =
|
|
450
|
-
let e =
|
|
451
|
+
let Jt = G(() => {
|
|
452
|
+
let e = Z.collection.elements(), t = Q().length;
|
|
451
453
|
return e.length < t && (e.length = t), e;
|
|
452
|
-
}), Yt =
|
|
453
|
-
if (!
|
|
454
|
-
|
|
455
|
-
let e =
|
|
454
|
+
}), Yt = G(() => {
|
|
455
|
+
if (!H()) return 1;
|
|
456
|
+
Z.collection.items();
|
|
457
|
+
let e = Z.listElement()?.querySelector("[role=\"row\"]");
|
|
456
458
|
return Math.max(1, e?.childElementCount ?? 1);
|
|
457
|
-
}), Xt =
|
|
459
|
+
}), Xt = G(() => {
|
|
458
460
|
let e = j();
|
|
459
|
-
return e == null ? !1 :
|
|
460
|
-
}), Zt =
|
|
461
|
+
return e == null ? !1 : T() && Array.isArray(e) ? e.length > 0 : !0;
|
|
462
|
+
}), Zt = G(() => {
|
|
461
463
|
let e = j();
|
|
462
464
|
return Array.isArray(e) && e.length > 0;
|
|
463
|
-
}), Qt =
|
|
464
|
-
if (
|
|
465
|
+
}), Qt = G(() => w() === "none" ? M() : j()), $t = G(() => {
|
|
466
|
+
if (w() === "none") return M();
|
|
465
467
|
let t = j();
|
|
466
|
-
return Array.isArray(t) ? t.map((t) =>
|
|
467
|
-
}), en =
|
|
468
|
+
return T() && Array.isArray(t) ? t.map((t) => ot(t, e.itemToStringValue)) : ot(t, e.itemToStringValue);
|
|
469
|
+
}), en = G(() => {
|
|
468
470
|
let t = Qt();
|
|
469
|
-
return Array.isArray(t) ? "" :
|
|
470
|
-
}), tn =
|
|
471
|
+
return T() && Array.isArray(t) ? "" : ot(t, e.itemToStringValue);
|
|
472
|
+
}), tn = G(() => T() || w() === "none" && Z.inputOwnsFormValue() ? void 0 : ct());
|
|
471
473
|
function nn(t, n, r) {
|
|
472
|
-
if (n === -1) {
|
|
473
|
-
if (
|
|
474
|
-
|
|
475
|
-
} else
|
|
474
|
+
if (Lt = r, n === -1) {
|
|
475
|
+
if (It === Et) return;
|
|
476
|
+
It = Et;
|
|
477
|
+
} else It = {
|
|
476
478
|
value: t,
|
|
477
479
|
index: n
|
|
478
480
|
};
|
|
479
481
|
e.onItemHighlighted?.(t, _(r, void 0, { index: n }));
|
|
480
482
|
}
|
|
481
|
-
function
|
|
482
|
-
if (e.selectedIndex !== void 0 &&
|
|
483
|
-
|
|
483
|
+
function $(e) {
|
|
484
|
+
if (e.selectedIndex !== void 0 && Z.setSelectedIndex(e.selectedIndex), e.activeIndex === void 0) return;
|
|
485
|
+
Z.setActiveIndex(e.activeIndex);
|
|
484
486
|
let t = e.type || "none";
|
|
485
|
-
e.activeIndex === null ? nn(void 0, -1, t) : nn(
|
|
487
|
+
e.activeIndex === null ? nn(void 0, -1, t) : nn(Y(Q)[e.activeIndex], e.activeIndex, t);
|
|
486
488
|
}
|
|
487
489
|
function rn() {
|
|
488
|
-
let e =
|
|
489
|
-
if (
|
|
490
|
-
let t =
|
|
491
|
-
for (; ee(n) && !(t ? !
|
|
492
|
-
if (
|
|
490
|
+
let e = Z.listElement();
|
|
491
|
+
if (Ye() || !e) return;
|
|
492
|
+
let t = Z.track().popupElement, n = e.firstElementChild ?? e;
|
|
493
|
+
for (; ee(n) && !(t ? !S(t, n) : n.getAttribute("role") === "dialog");) {
|
|
494
|
+
if (Be(n)) {
|
|
493
495
|
n.scrollTop = 0;
|
|
494
496
|
break;
|
|
495
497
|
}
|
|
496
498
|
n = n.parentElement;
|
|
497
499
|
}
|
|
498
500
|
}
|
|
499
|
-
function
|
|
501
|
+
function an(t, n) {
|
|
500
502
|
if (e.onInputValueChange?.(t, n), !n.isCanceled) {
|
|
501
|
-
if (
|
|
502
|
-
|
|
503
|
+
if (Ft = n.reason === a, n.reason === "input-change") {
|
|
504
|
+
Z.open() && xe() !== null && Se(null);
|
|
503
505
|
let e = n.event, r = e.inputType;
|
|
504
506
|
if (e.type === "compositionend" || r != null && r !== "" && r !== "insertReplacementText") {
|
|
505
507
|
let e = t.trim() !== "";
|
|
506
|
-
e && be(!0), Rt = { hasQuery: e }, rn(), e &&
|
|
508
|
+
e && be(!0), Rt = { hasQuery: e }, rn(), e && pt() && Z.activeIndex() == null && (Z.open() || U()) && Z.setActiveIndex(0);
|
|
507
509
|
}
|
|
508
|
-
} else n.reason === "input-clear" && t === "" &&
|
|
510
|
+
} else n.reason === "input-clear" && t === "" && Z.inputInsidePopup() && (Rt = {
|
|
509
511
|
hasQuery: !1,
|
|
510
512
|
selection: !0
|
|
511
513
|
});
|
|
512
514
|
x || ve(t);
|
|
513
515
|
}
|
|
514
516
|
}
|
|
515
|
-
function
|
|
516
|
-
return
|
|
517
|
+
function on(e, t) {
|
|
518
|
+
return Z.setOpen(e, t);
|
|
517
519
|
}
|
|
518
|
-
function
|
|
519
|
-
if (e &&
|
|
520
|
-
let e =
|
|
521
|
-
|
|
520
|
+
function sn(e, n) {
|
|
521
|
+
if (e && Z.inputInsidePopup() && !U() && xe() !== null && (be(!1), Se(null), M() !== "" && n.reason !== "input-change" && an("", g(a, n.event))), !e && ye()) {
|
|
522
|
+
let e = X();
|
|
523
|
+
E() ? (U() || Se(e), e === "" && be(!1)) : T() && (U() || Se(e), Z.inputInsidePopup() && $({ activeIndex: null }), (!Z.inputInsidePopup() || U()) && an("", g(a, n.event, void 0, { isItemPress: n.reason === p })));
|
|
522
524
|
}
|
|
523
|
-
!e &&
|
|
525
|
+
!e && Z.inputInsidePopup() && (n.reason === "focus-out" || n.reason === "outside-press") && (t.setTouched(!0), t.setFocused(!1), t.validationMode() === "onBlur" && t.validation.commit(Y(Qt)));
|
|
524
526
|
}
|
|
525
|
-
function
|
|
526
|
-
e.onSelectedValueChange?.(t, n), !n.isCanceled && (b || he(() => t), (
|
|
527
|
+
function cn(t, n) {
|
|
528
|
+
e.onSelectedValueChange?.(t, n), !n.isCanceled && (b || he(() => t), (w() === "none" && Z.track().popupElement != null && (e.fillInputOnItemPress ?? !0) || E() && !Z.inputInsidePopup()) && an(k(t), g(n.reason, n.event)));
|
|
527
529
|
}
|
|
528
|
-
function
|
|
529
|
-
let n = e.target, r =
|
|
530
|
-
|
|
530
|
+
function ln(e, t) {
|
|
531
|
+
let n = e.target, r = Z.selectionEvent ?? e;
|
|
532
|
+
Z.selectionEvent = null;
|
|
531
533
|
let i = g(p, r), o = n?.closest("a")?.getAttribute("href");
|
|
532
534
|
if (o) {
|
|
533
|
-
o.startsWith("#") &&
|
|
535
|
+
o.startsWith("#") && on(!1, i);
|
|
534
536
|
return;
|
|
535
537
|
}
|
|
536
|
-
if (
|
|
537
|
-
let e = Array.isArray(j()) ? j() : [], n = Me(e, t,
|
|
538
|
-
if (
|
|
539
|
-
|
|
538
|
+
if (T()) {
|
|
539
|
+
let e = Array.isArray(j()) ? j() : [], n = Me(e, t, D());
|
|
540
|
+
if (cn(n ? Le(e, t, D()) : [...e, t], i), i.isCanceled || (N()?.value.trim() ?? "") === "") return;
|
|
541
|
+
Z.inputInsidePopup() ? (an("", g(a, i.event, void 0, { isItemPress: !0 })), Rt && !n && (Rt.toggledValue = t)) : on(!1, i);
|
|
540
542
|
return;
|
|
541
543
|
}
|
|
542
|
-
|
|
543
|
-
}
|
|
544
|
-
function ln() {
|
|
545
|
-
let e = t.validation.getInputControl()?.closest("form") ?? Ve()?.form ?? N()?.form;
|
|
546
|
-
e && typeof e.requestSubmit == "function" && e.requestSubmit();
|
|
544
|
+
cn(t, i), !i.isCanceled && on(!1, i);
|
|
547
545
|
}
|
|
548
546
|
function un() {
|
|
549
|
-
e
|
|
547
|
+
let e = t.validation.getInputControl()?.closest("form") ?? Re()?.form ?? N()?.form;
|
|
548
|
+
e && typeof e.requestSubmit == "function" && e.requestSubmit();
|
|
550
549
|
}
|
|
551
550
|
function dn() {
|
|
551
|
+
e.items || Z.setForceMounted(!0);
|
|
552
|
+
}
|
|
553
|
+
function fn() {
|
|
552
554
|
N()?.focus();
|
|
553
555
|
}
|
|
554
|
-
function
|
|
555
|
-
let n =
|
|
556
|
-
n && (
|
|
556
|
+
function pn(e, t) {
|
|
557
|
+
let n = Y(Jt)[e];
|
|
558
|
+
n && (Z.selectionEvent = t, n.click(), Z.selectionEvent = null);
|
|
557
559
|
}
|
|
558
|
-
function
|
|
559
|
-
be(!1), Se(null),
|
|
560
|
-
activeIndex: null,
|
|
560
|
+
function mn() {
|
|
561
|
+
be(!1), Se(null), Z.resetAfterClose(), w() === "none" ? $({
|
|
562
|
+
activeIndex: pt() === "always" && Z.listElement() && !Z.track().popupElement && Q().length > 0 ? 0 : null,
|
|
561
563
|
selectedIndex: null
|
|
562
|
-
}) :
|
|
564
|
+
}) : $({ activeIndex: null });
|
|
563
565
|
let e = N();
|
|
564
|
-
if (
|
|
565
|
-
if (
|
|
566
|
+
if (T() && e && e.value !== "" && !Ft && an("", g(a)), E()) {
|
|
567
|
+
if (Z.inputInsidePopup()) e && e.value !== "" && an("", g(a));
|
|
566
568
|
else {
|
|
567
569
|
let t = k(j());
|
|
568
|
-
e && e.value !== t &&
|
|
570
|
+
e && e.value !== t && an(t, g(t === "" ? a : f));
|
|
569
571
|
}
|
|
570
572
|
}
|
|
571
573
|
}
|
|
572
|
-
let
|
|
574
|
+
let hn = { unmount() {
|
|
573
575
|
Gt.forceUnmount();
|
|
574
|
-
} },
|
|
575
|
-
let e = N(), t = e?.tagName === "INPUT", n = e == null || t, r = n ||
|
|
576
|
+
} }, gn = G(() => Z.open() || U()), _n = G(() => {
|
|
577
|
+
let e = N(), t = e?.tagName === "INPUT", n = e == null || t, r = n || gn(), i = n ? {
|
|
576
578
|
autocomplete: "off",
|
|
577
579
|
spellcheck: "false",
|
|
578
580
|
autocorrect: "off",
|
|
579
581
|
autocapitalize: "none"
|
|
580
582
|
} : {};
|
|
581
|
-
return r && (i.role = "combobox", i["aria-expanded"] =
|
|
582
|
-
}),
|
|
583
|
-
context:
|
|
584
|
-
enabled: () => !
|
|
583
|
+
return r && (i.role = "combobox", i["aria-expanded"] = gn() ? "true" : "false", i["aria-haspopup"] = H() ? "grid" : "listbox", i["aria-controls"] = gn() ? Z.listElement()?.id : void 0, i["aria-autocomplete"] = R() ? "none" : it()), i;
|
|
584
|
+
}), vn = ie({
|
|
585
|
+
context: Z.context.floatingRoot,
|
|
586
|
+
enabled: () => !I() && Ze(),
|
|
585
587
|
event: () => "mousedown-only",
|
|
586
588
|
toggle: () => !1,
|
|
587
589
|
reason: () => d,
|
|
588
|
-
touchOpenDelay: () =>
|
|
589
|
-
}),
|
|
590
|
-
context:
|
|
590
|
+
touchOpenDelay: () => Z.inputInsidePopup() ? 0 : 100
|
|
591
|
+
}), yn = pe({
|
|
592
|
+
context: Z.context.floatingRoot,
|
|
591
593
|
tree: () => u,
|
|
592
|
-
enabled: () => !
|
|
594
|
+
enabled: () => !I() && !U(),
|
|
593
595
|
outsidePressEvent: () => ({
|
|
594
596
|
mouse: "sloppy",
|
|
595
597
|
touch: "intentional"
|
|
596
598
|
}),
|
|
597
|
-
bubbles: () =>
|
|
599
|
+
bubbles: () => U(),
|
|
598
600
|
outsidePress: () => (e) => {
|
|
599
601
|
let t = e.target;
|
|
600
|
-
return !
|
|
602
|
+
return !S(P(), t) && !S(Z.clearElement, t) && !S(Z.chipsContainerElement, t) && !S(Ee(), t);
|
|
601
603
|
}
|
|
602
|
-
}),
|
|
603
|
-
context:
|
|
604
|
-
enabled: () => !
|
|
604
|
+
}), bn = $e({
|
|
605
|
+
context: Z.context.floatingRoot,
|
|
606
|
+
enabled: () => !I(),
|
|
605
607
|
list: Jt,
|
|
606
|
-
activeIndex:
|
|
607
|
-
selectedIndex:
|
|
608
|
+
activeIndex: Z.activeIndex,
|
|
609
|
+
selectedIndex: Z.selectedIndex,
|
|
608
610
|
virtual: () => !0,
|
|
609
|
-
loopFocus:
|
|
610
|
-
allowEscape: () =>
|
|
611
|
-
focusItemOnHover:
|
|
612
|
-
orientation: () =>
|
|
611
|
+
loopFocus: et,
|
|
612
|
+
allowEscape: () => et() && !pt(),
|
|
613
|
+
focusItemOnHover: Qe,
|
|
614
|
+
orientation: () => H() ? "both" : "vertical",
|
|
613
615
|
cols: Yt,
|
|
614
616
|
rtl: () => s() === "rtl",
|
|
615
617
|
openOnArrowKeyDown: () => !1,
|
|
616
618
|
disabledIndices: () => [],
|
|
617
619
|
onNavigate(e, t) {
|
|
618
|
-
if (!(!t && !
|
|
620
|
+
if (!(!t && !Z.open() || Z.track().transitionStatus === "ending")) {
|
|
619
621
|
if (!t) {
|
|
620
|
-
|
|
622
|
+
$({ activeIndex: e });
|
|
621
623
|
return;
|
|
622
624
|
}
|
|
623
|
-
|
|
625
|
+
$({
|
|
624
626
|
activeIndex: e,
|
|
625
|
-
type:
|
|
627
|
+
type: Z.keyboardActive ? i : n
|
|
626
628
|
});
|
|
627
629
|
}
|
|
628
630
|
}
|
|
629
|
-
}),
|
|
630
|
-
store:
|
|
631
|
+
}), xn = {
|
|
632
|
+
store: Z,
|
|
631
633
|
tree: u,
|
|
632
634
|
node: Wt,
|
|
633
635
|
presence: Gt,
|
|
634
|
-
id:
|
|
636
|
+
id: He,
|
|
635
637
|
items: () => e.items,
|
|
636
|
-
hasItems:
|
|
637
|
-
query:
|
|
638
|
-
filteredItems:
|
|
639
|
-
flatFilteredItems:
|
|
640
|
-
listEmpty:
|
|
641
|
-
itemValues:
|
|
638
|
+
hasItems: ut,
|
|
639
|
+
query: X,
|
|
640
|
+
filteredItems: Mt,
|
|
641
|
+
flatFilteredItems: Nt,
|
|
642
|
+
listEmpty: Pt,
|
|
643
|
+
itemValues: Q,
|
|
642
644
|
itemLabels: qt,
|
|
643
645
|
hasItemCollection: () => e.itemCollection !== void 0,
|
|
644
646
|
selectedValue: j,
|
|
645
647
|
inputValue: M,
|
|
646
648
|
hasSelectedValue: Xt,
|
|
647
649
|
hasSelectionChips: Zt,
|
|
648
|
-
selectionMode:
|
|
649
|
-
multiple:
|
|
650
|
-
single:
|
|
651
|
-
disabled:
|
|
652
|
-
readOnly:
|
|
653
|
-
required:
|
|
654
|
-
modal:
|
|
655
|
-
grid:
|
|
656
|
-
virtualized:
|
|
657
|
-
inline:
|
|
658
|
-
openOnInputClick:
|
|
659
|
-
autoHighlight:
|
|
660
|
-
keepHighlight:
|
|
661
|
-
highlightItemOnHover:
|
|
662
|
-
loopFocus:
|
|
663
|
-
autoComplete:
|
|
664
|
-
submitOnItemClick:
|
|
665
|
-
hasInputValueProp: () =>
|
|
666
|
-
name:
|
|
667
|
-
form:
|
|
668
|
-
itemToStringLabel:
|
|
669
|
-
itemToStringValue:
|
|
670
|
-
comparator:
|
|
650
|
+
selectionMode: w,
|
|
651
|
+
multiple: T,
|
|
652
|
+
single: E,
|
|
653
|
+
disabled: I,
|
|
654
|
+
readOnly: R,
|
|
655
|
+
required: z,
|
|
656
|
+
modal: V,
|
|
657
|
+
grid: H,
|
|
658
|
+
virtualized: Ye,
|
|
659
|
+
inline: U,
|
|
660
|
+
openOnInputClick: Ze,
|
|
661
|
+
autoHighlight: pt,
|
|
662
|
+
keepHighlight: q,
|
|
663
|
+
highlightItemOnHover: Qe,
|
|
664
|
+
loopFocus: et,
|
|
665
|
+
autoComplete: it,
|
|
666
|
+
submitOnItemClick: tt,
|
|
667
|
+
hasInputValueProp: () => C,
|
|
668
|
+
name: ct,
|
|
669
|
+
form: lt,
|
|
670
|
+
itemToStringLabel: O,
|
|
671
|
+
itemToStringValue: A,
|
|
672
|
+
comparator: D,
|
|
671
673
|
inputElement: N,
|
|
672
674
|
setInputElement: Ce,
|
|
673
|
-
triggerElement:
|
|
674
|
-
setTriggerElement:
|
|
675
|
-
inputGroupElement:
|
|
676
|
-
setInputGroupElement:
|
|
677
|
-
internalBackdropElement:
|
|
678
|
-
setInternalBackdropElement:
|
|
679
|
-
setOpen:
|
|
680
|
-
setInputValue:
|
|
681
|
-
setSelectedValue:
|
|
682
|
-
setIndices:
|
|
683
|
-
handleSelection:
|
|
684
|
-
forceMount:
|
|
685
|
-
requestSubmit:
|
|
686
|
-
focusInput:
|
|
687
|
-
clickHighlightedItem:
|
|
688
|
-
listNavigation:
|
|
689
|
-
dismiss:
|
|
690
|
-
click:
|
|
675
|
+
triggerElement: P,
|
|
676
|
+
setTriggerElement: Te,
|
|
677
|
+
inputGroupElement: Ee,
|
|
678
|
+
setInputGroupElement: De,
|
|
679
|
+
internalBackdropElement: ke,
|
|
680
|
+
setInternalBackdropElement: Pe,
|
|
681
|
+
setOpen: on,
|
|
682
|
+
setInputValue: an,
|
|
683
|
+
setSelectedValue: cn,
|
|
684
|
+
setIndices: $,
|
|
685
|
+
handleSelection: ln,
|
|
686
|
+
forceMount: dn,
|
|
687
|
+
requestSubmit: un,
|
|
688
|
+
focusInput: fn,
|
|
689
|
+
clickHighlightedItem: pn,
|
|
690
|
+
listNavigation: bn,
|
|
691
|
+
dismiss: yn,
|
|
692
|
+
click: vn,
|
|
691
693
|
cols: Yt,
|
|
692
|
-
referenceAria:
|
|
693
|
-
expanded:
|
|
694
|
+
referenceAria: _n,
|
|
695
|
+
expanded: gn,
|
|
694
696
|
field: t,
|
|
695
697
|
formContext: r
|
|
696
|
-
},
|
|
698
|
+
}, Sn = {
|
|
697
699
|
id: h,
|
|
698
700
|
name: void 0,
|
|
699
701
|
value: Qt,
|
|
700
702
|
getValue: $t,
|
|
701
|
-
getControl: () =>
|
|
703
|
+
getControl: () => Z.inputInsidePopup() ? P() : N()
|
|
702
704
|
};
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
],
|
|
708
|
-
open:
|
|
709
|
-
activeTriggerId:
|
|
710
|
-
}), () =>
|
|
711
|
-
inline:
|
|
712
|
-
open:
|
|
705
|
+
Z.context.floatingRoot.context.data.insideElements = () => [
|
|
706
|
+
ke(),
|
|
707
|
+
Z.startDismissElement,
|
|
708
|
+
Z.endDismissElement
|
|
709
|
+
], W(() => ({
|
|
710
|
+
open: Z.open(),
|
|
711
|
+
activeTriggerId: Z.activeTriggerId()
|
|
712
|
+
}), () => Y(() => Z.reconcileTriggers())), W(() => ({
|
|
713
|
+
inline: U(),
|
|
714
|
+
open: Z.open()
|
|
713
715
|
}), (e) => {
|
|
714
|
-
e.inline &&
|
|
715
|
-
}),
|
|
716
|
-
mode:
|
|
717
|
-
inline:
|
|
718
|
-
insidePopup:
|
|
719
|
-
}), (e) =>
|
|
720
|
-
open:
|
|
716
|
+
e.inline && Z.context.floatingRoot.update({ open: !0 });
|
|
717
|
+
}), W(() => ({
|
|
718
|
+
mode: w(),
|
|
719
|
+
inline: U(),
|
|
720
|
+
insidePopup: Z.inputInsidePopup()
|
|
721
|
+
}), (e) => Z.setInputOwnsFormValue(e.mode === "none" && (e.inline || !e.insidePopup))), W(() => ({
|
|
722
|
+
open: Z.open(),
|
|
721
723
|
selected: j(),
|
|
722
|
-
mode:
|
|
723
|
-
values:
|
|
724
|
-
compare:
|
|
725
|
-
isMultiple:
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}),
|
|
729
|
-
|
|
730
|
-
|
|
724
|
+
mode: w(),
|
|
725
|
+
values: Q(),
|
|
726
|
+
compare: D(),
|
|
727
|
+
isMultiple: T(),
|
|
728
|
+
mounted: Gt.mounted(),
|
|
729
|
+
hasItems: ut() || ft()
|
|
730
|
+
}), (e, t) => {
|
|
731
|
+
e.open || (Z.pointerDownItem = null, e.mode !== "none" && (!e.hasItems && !e.mounted && e.values.length === 0 && t && kt(e.selected, t.selected, e.compare) || Y(() => $({ selectedIndex: Fe(e.values, e.selected, e.compare, e.isMultiple) }))));
|
|
732
|
+
}), W(() => ({
|
|
733
|
+
activeIndex: Z.activeIndex(),
|
|
734
|
+
values: Q(),
|
|
731
735
|
input: M(),
|
|
732
|
-
open:
|
|
733
|
-
inline:
|
|
734
|
-
highlight:
|
|
735
|
-
}), (e) =>
|
|
736
|
-
function
|
|
737
|
-
let t = Rt;
|
|
738
|
-
if (
|
|
739
|
-
let
|
|
740
|
-
if (
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
if (
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
736
|
+
open: Z.open(),
|
|
737
|
+
inline: U(),
|
|
738
|
+
highlight: pt()
|
|
739
|
+
}), (e) => Y(() => Cn(e)));
|
|
740
|
+
function Cn(e) {
|
|
741
|
+
let t = e.activeIndex, n = Rt;
|
|
742
|
+
if (n) {
|
|
743
|
+
let r = e.open || e.inline || Z.track().positionerElement?.hidden === !1;
|
|
744
|
+
if (n.hasQuery) {
|
|
745
|
+
if (e.values.length === 0 && !ut() && !ft()) return;
|
|
746
|
+
e.highlight && r && (Z.setActiveIndex(0), t = 0), Rt = null;
|
|
747
|
+
} else if (String(e.input).trim() === "" && (Rt = null, r)) {
|
|
748
|
+
let r = n.selection;
|
|
749
|
+
e.highlight === "always" && !r && w() === "none" && (Z.setActiveIndex(0), t = 0), queueMicrotask(() => Y(() => {
|
|
750
|
+
if (!Z.open() && !U() || (N()?.value.trim() ?? "") !== "") return;
|
|
751
|
+
let e = j(), t = T(), i = t && Array.isArray(e) ? e.length > 0 : w() !== "none" && e != null;
|
|
752
|
+
if (i || r) {
|
|
753
|
+
let r = je(Q(), n.toggledValue, D());
|
|
754
|
+
Z.setActiveIndex(i ? r === -1 ? Fe(Q(), e, D(), t) : r : null);
|
|
755
|
+
} else pt() === "always" && Z.setActiveIndex(0);
|
|
750
756
|
}));
|
|
751
757
|
}
|
|
752
758
|
}
|
|
753
759
|
if (!e.open && !e.inline) return;
|
|
754
|
-
if (
|
|
760
|
+
if (t == null) {
|
|
755
761
|
if (e.highlight === "always" && e.values.length > 0) {
|
|
756
|
-
|
|
762
|
+
Z.setActiveIndex(0);
|
|
757
763
|
return;
|
|
758
764
|
}
|
|
759
765
|
nn(void 0, -1, f);
|
|
760
766
|
return;
|
|
761
767
|
}
|
|
762
|
-
if (
|
|
763
|
-
nn(void 0, -1, f),
|
|
768
|
+
if (t >= e.values.length) {
|
|
769
|
+
nn(void 0, -1, f), Z.setActiveIndex(null);
|
|
764
770
|
return;
|
|
765
771
|
}
|
|
766
|
-
let
|
|
767
|
-
(
|
|
772
|
+
let r = e.values[t], i = It.value, a = i !== Tt && Ie(r, i, D());
|
|
773
|
+
(It.index !== t || !a) && nn(r, t, f);
|
|
768
774
|
}
|
|
769
|
-
|
|
770
|
-
index:
|
|
775
|
+
W(() => ({
|
|
776
|
+
index: Z.activeIndex(),
|
|
771
777
|
elements: Jt()
|
|
772
778
|
}), (e) => {
|
|
773
|
-
e.index
|
|
779
|
+
e.index != null && Lt !== "pointer" && e.elements[e.index]?.scrollIntoView?.({
|
|
774
780
|
block: "nearest",
|
|
775
781
|
inline: "nearest"
|
|
776
782
|
});
|
|
777
|
-
}),
|
|
778
|
-
open:
|
|
783
|
+
}), W(() => ({
|
|
784
|
+
open: Z.open(),
|
|
779
785
|
mounted: Gt.mounted(),
|
|
780
|
-
count:
|
|
786
|
+
count: Q().length
|
|
781
787
|
}), (e) => {
|
|
782
788
|
if (!e.open) {
|
|
783
789
|
Bt = !1, zt = null;
|
|
784
790
|
return;
|
|
785
791
|
}
|
|
786
|
-
!e.mounted || e.count === 0 || Bt || (Bt = !0,
|
|
792
|
+
!e.mounted || e.count === 0 || Bt || (Bt = !0, Y(() => {
|
|
787
793
|
let t = zt;
|
|
788
|
-
if (zt = null,
|
|
789
|
-
let n =
|
|
794
|
+
if (zt = null, Z.activeIndex() != null || ye()) return;
|
|
795
|
+
let n = w() === "none" ? null : Fe(Q(), j(), D(), T());
|
|
790
796
|
if (n != null) {
|
|
791
|
-
|
|
797
|
+
$({
|
|
792
798
|
activeIndex: n,
|
|
793
799
|
selectedIndex: n
|
|
794
800
|
});
|
|
795
801
|
return;
|
|
796
802
|
}
|
|
797
|
-
if (t && (
|
|
798
|
-
|
|
803
|
+
if (t && (w() !== "none" || pt() !== !1)) {
|
|
804
|
+
$({ activeIndex: t === "first" ? 0 : e.count - 1 });
|
|
799
805
|
return;
|
|
800
806
|
}
|
|
801
|
-
|
|
807
|
+
pt() === "always" && $({ activeIndex: 0 });
|
|
802
808
|
}));
|
|
803
|
-
}),
|
|
804
|
-
mode:
|
|
809
|
+
}), W(() => ({
|
|
810
|
+
mode: w(),
|
|
805
811
|
input: M(),
|
|
806
812
|
selected: j(),
|
|
807
|
-
isMultiple:
|
|
813
|
+
isMultiple: T()
|
|
808
814
|
}), (e) => {
|
|
809
815
|
if (e.mode === "none") {
|
|
810
816
|
t.setFilled(String(e.input) !== "");
|
|
811
817
|
return;
|
|
812
818
|
}
|
|
813
819
|
t.setFilled(e.isMultiple ? Array.isArray(e.selected) && e.selected.length > 0 : e.selected != null);
|
|
814
|
-
}),
|
|
815
|
-
hasItems:
|
|
816
|
-
highlight:
|
|
817
|
-
count:
|
|
820
|
+
}), W(() => ({
|
|
821
|
+
hasItems: ut(),
|
|
822
|
+
highlight: pt(),
|
|
823
|
+
count: Nt().length
|
|
818
824
|
}), (e) => {
|
|
819
|
-
e.hasItems && e.highlight && e.count === 0 &&
|
|
820
|
-
}),
|
|
821
|
-
query:
|
|
822
|
-
open:
|
|
825
|
+
e.hasItems && e.highlight && e.count === 0 && Y(() => $({ activeIndex: null }));
|
|
826
|
+
}), W(() => ({
|
|
827
|
+
query: X(),
|
|
828
|
+
open: Z.open()
|
|
823
829
|
}), (e) => {
|
|
824
830
|
let t = Ut;
|
|
825
831
|
Ut = e.query, !(t === e.query || !e.open) && e.query !== "" && e.query !== String(ge) && be(!0);
|
|
826
832
|
});
|
|
827
|
-
function
|
|
833
|
+
function wn() {
|
|
828
834
|
let e = k(j());
|
|
829
|
-
M() !== e &&
|
|
835
|
+
M() !== e && an(e, g(f));
|
|
830
836
|
}
|
|
831
|
-
|
|
837
|
+
W(() => ({
|
|
832
838
|
selected: j(),
|
|
833
|
-
mode:
|
|
834
|
-
compare:
|
|
839
|
+
mode: w(),
|
|
840
|
+
compare: D()
|
|
835
841
|
}), (e) => {
|
|
836
842
|
let n = Vt;
|
|
837
|
-
|
|
838
|
-
r.clearError(
|
|
843
|
+
kt(e.selected, n, e.compare) || (Vt = Ot(e.selected), e.mode !== "none" && Y(() => {
|
|
844
|
+
r.clearError(ct()), t.setDirty(!At(e.selected, t.validityData().initialValue, e.compare)), t.validation.change(e.selected), E() && !C && !Z.inputInsidePopup() && wn();
|
|
839
845
|
}));
|
|
840
|
-
}),
|
|
846
|
+
}), W(() => ({
|
|
841
847
|
input: M(),
|
|
842
|
-
mode:
|
|
848
|
+
mode: w()
|
|
843
849
|
}), (e) => {
|
|
844
850
|
let n = Ht;
|
|
845
|
-
Ht = e.input, n !== e.input && e.mode === "none" &&
|
|
846
|
-
r.clearError(
|
|
851
|
+
Ht = e.input, n !== e.input && e.mode === "none" && Y(() => {
|
|
852
|
+
r.clearError(ct()), t.setDirty(e.input !== t.validityData().initialValue), t.validation.change(e.input);
|
|
847
853
|
});
|
|
848
|
-
}),
|
|
854
|
+
}), W(() => ({
|
|
849
855
|
items: e.items,
|
|
850
|
-
label:
|
|
856
|
+
label: vt()
|
|
851
857
|
}), (e, t) => {
|
|
852
|
-
!t || e.items === t.items && e.label === t.label ||
|
|
853
|
-
!
|
|
858
|
+
!t || e.items === t.items && e.label === t.label || Y(() => {
|
|
859
|
+
!E() || C || Z.inputInsidePopup() || ye() || wn();
|
|
854
860
|
});
|
|
855
|
-
}),
|
|
856
|
-
disabled:
|
|
857
|
-
id:
|
|
861
|
+
}), W(() => ({
|
|
862
|
+
disabled: I(),
|
|
863
|
+
id: He(),
|
|
858
864
|
name: e.name,
|
|
859
|
-
control:
|
|
865
|
+
control: Z.inputInsidePopup() ? P() : N()
|
|
860
866
|
}), (e) => {
|
|
861
|
-
|
|
862
|
-
}),
|
|
863
|
-
if (e) return t.validation.registerInput(m, e, () =>
|
|
864
|
-
}),
|
|
865
|
-
e?.(
|
|
867
|
+
Sn.id = e.id, Sn.name = e.name, t.registerFieldControl(m, e.disabled || !e.control ? void 0 : Sn);
|
|
868
|
+
}), W(Re, (e) => {
|
|
869
|
+
if (e) return t.validation.registerInput(m, e, () => Z.inputInsidePopup() ? P() : N());
|
|
870
|
+
}), W(() => e.actionsRef, (e) => {
|
|
871
|
+
e?.(hn);
|
|
866
872
|
});
|
|
867
|
-
function
|
|
868
|
-
zt = e,
|
|
873
|
+
function Tn(e, t) {
|
|
874
|
+
zt = e, Z.setOpenMethod("keyboard"), on(!0, g("list-navigation", t, P() ?? void 0)) || (zt = null);
|
|
869
875
|
}
|
|
870
|
-
function
|
|
871
|
-
if (!
|
|
872
|
-
if (!
|
|
876
|
+
function En(e) {
|
|
877
|
+
if (!I()) {
|
|
878
|
+
if (!Z.open() && !U()) {
|
|
873
879
|
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
874
|
-
e.preventDefault(), e.stopPropagation(),
|
|
880
|
+
e.preventDefault(), e.stopPropagation(), Tn(e.key === "ArrowDown" ? "first" : "last", e);
|
|
875
881
|
return;
|
|
876
882
|
}
|
|
877
|
-
|
|
883
|
+
bn.onKeyDown(e);
|
|
878
884
|
}
|
|
879
885
|
}
|
|
880
|
-
|
|
881
|
-
...
|
|
882
|
-
onKeyDown:
|
|
886
|
+
xn.listNavigation = {
|
|
887
|
+
...bn,
|
|
888
|
+
onKeyDown: En
|
|
883
889
|
};
|
|
884
|
-
function
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
890
|
+
function Dn(t) {
|
|
891
|
+
let n = t.currentTarget;
|
|
892
|
+
if (t.defaultPrevented || I() || R()) {
|
|
893
|
+
n.value = en();
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
let r = n.value, i = r.toLowerCase(), a = g(f, t), o = () => Y(Q).findIndex((t) => ot(t, e.itemToStringValue).toLowerCase() === i || k(t).toLowerCase() === i);
|
|
897
|
+
E() && (dn(), e.items && o() === -1 && Z.setForceMounted(!0)), queueMicrotask(() => Y(() => {
|
|
898
|
+
if (T()) return;
|
|
899
|
+
if (w() === "none") {
|
|
900
|
+
an(r, a);
|
|
891
901
|
return;
|
|
892
902
|
}
|
|
893
|
-
let e =
|
|
894
|
-
e === -1 && (e = qt().findIndex((e) => e != null && e.toLowerCase() ===
|
|
895
|
-
let t = e === -1 ? void 0 :
|
|
896
|
-
t != null &&
|
|
903
|
+
let e = o();
|
|
904
|
+
e === -1 && (e = qt().findIndex((e) => e != null && e.toLowerCase() === i));
|
|
905
|
+
let t = e === -1 ? void 0 : Q()[e];
|
|
906
|
+
t != null && cn(t, a);
|
|
897
907
|
}));
|
|
898
908
|
}
|
|
899
|
-
return
|
|
900
|
-
t.registerFieldControl(m, void 0),
|
|
901
|
-
}),
|
|
902
|
-
value:
|
|
909
|
+
return J(() => {
|
|
910
|
+
t.registerFieldControl(m, void 0), Z.clearInteractionProps(), delete Z.context.floatingRoot.context.data.insideElements;
|
|
911
|
+
}), F(_t, {
|
|
912
|
+
value: xn,
|
|
903
913
|
get children() {
|
|
904
|
-
return
|
|
914
|
+
return F(se, {
|
|
905
915
|
value: u,
|
|
906
916
|
get children() {
|
|
907
|
-
return
|
|
917
|
+
return F(ue, {
|
|
908
918
|
get value() {
|
|
909
919
|
return Wt.id ?? null;
|
|
910
920
|
},
|
|
911
921
|
get children() {
|
|
912
922
|
return [
|
|
913
|
-
|
|
923
|
+
We(() => e.children),
|
|
914
924
|
(() => {
|
|
915
|
-
var n =
|
|
916
|
-
return n.addEventListener("change",
|
|
917
|
-
if (
|
|
918
|
-
|
|
925
|
+
var n = L(xt);
|
|
926
|
+
return n.addEventListener("change", Dn), n.addEventListener("focus", () => {
|
|
927
|
+
if (Z.inputInsidePopup()) {
|
|
928
|
+
P()?.focus();
|
|
919
929
|
return;
|
|
920
930
|
}
|
|
921
|
-
(N() ??
|
|
922
|
-
}),
|
|
923
|
-
e: tn() == null ? `${
|
|
924
|
-
t:
|
|
931
|
+
(N() ?? P())?.focus();
|
|
932
|
+
}), Ge(() => [((e) => Ve(e)), e.inputRef], n), Ue(() => ({
|
|
933
|
+
e: tn() == null ? `${He()}-hidden-input` : void 0,
|
|
934
|
+
t: lt(),
|
|
925
935
|
a: tn(),
|
|
926
936
|
o: e.formAutoComplete,
|
|
927
937
|
i: en(),
|
|
928
|
-
n:
|
|
929
|
-
s:
|
|
930
|
-
h:
|
|
931
|
-
r: tn() ?
|
|
938
|
+
n: I(),
|
|
939
|
+
s: z() && !(T() && Zt()),
|
|
940
|
+
h: R(),
|
|
941
|
+
r: tn() ? wt : Ct,
|
|
932
942
|
d: o.getAriaDescribedBy(void 0),
|
|
933
|
-
l: t.state().valid === !1 && !
|
|
943
|
+
l: t.state().valid === !1 && !I() ? "true" : void 0
|
|
934
944
|
}), ({ e, t, a: r, o: i, i: a, n: o, s, h: c, r: l, d: u, l: d }, f) => {
|
|
935
|
-
e !== f?.e &&
|
|
945
|
+
e !== f?.e && B(n, "id", e), t !== f?.t && B(n, "form", t), r !== f?.a && B(n, "name", r), i !== f?.o && B(n, "autocomplete", i), Ke(n, "value", a), o !== f?.n && B(n, "disabled", o), s !== f?.s && B(n, "required", s), c !== f?.h && B(n, "readonly", c), qe(n, l, f?.r), u !== f?.d && B(n, "aria-describedby", u), d !== f?.l && B(n, "aria-invalid", d);
|
|
936
946
|
}), n;
|
|
937
947
|
})(),
|
|
938
|
-
|
|
948
|
+
F(Je, {
|
|
939
949
|
get each() {
|
|
940
|
-
return
|
|
950
|
+
return We(() => !!(T() && ct()))() ? j() ?? [] : [];
|
|
941
951
|
},
|
|
942
952
|
children: (t) => (() => {
|
|
943
|
-
var n =
|
|
944
|
-
return
|
|
945
|
-
e:
|
|
946
|
-
t:
|
|
947
|
-
a:
|
|
948
|
-
o:
|
|
953
|
+
var n = L(St);
|
|
954
|
+
return Ue(() => ({
|
|
955
|
+
e: lt(),
|
|
956
|
+
t: ct(),
|
|
957
|
+
a: ot(t, e.itemToStringValue),
|
|
958
|
+
o: I()
|
|
949
959
|
}), ({ e, t, a: r, o: i }, a) => {
|
|
950
|
-
e !== a?.e &&
|
|
960
|
+
e !== a?.e && B(n, "form", e), t !== a?.t && B(n, "name", t), Ke(n, "value", r), i !== a?.o && B(n, "disabled", i);
|
|
951
961
|
}), n;
|
|
952
962
|
})()
|
|
953
963
|
})
|
|
@@ -959,41 +969,44 @@ function Tt(e) {
|
|
|
959
969
|
}
|
|
960
970
|
});
|
|
961
971
|
}
|
|
962
|
-
function
|
|
972
|
+
function Ot(e) {
|
|
963
973
|
return Array.isArray(e) ? e.slice() : e;
|
|
964
974
|
}
|
|
965
|
-
function
|
|
966
|
-
return Array.isArray(e) && Array.isArray(t) ?
|
|
975
|
+
function kt(e, t, n) {
|
|
976
|
+
return Array.isArray(e) && Array.isArray(t) ? Pe(e, t, n) : Object.is(e, t);
|
|
967
977
|
}
|
|
968
|
-
function
|
|
969
|
-
return Array.isArray(e) && Array.isArray(t) ?
|
|
978
|
+
function At(e, t, n) {
|
|
979
|
+
return Array.isArray(e) && Array.isArray(t) ? Pe(e, t, n) : e === t;
|
|
970
980
|
}
|
|
971
981
|
//#endregion
|
|
972
982
|
//#region src/combobox/utils/comboboxPopupId.ts
|
|
973
|
-
function
|
|
983
|
+
function jt(e) {
|
|
974
984
|
return e == null ? void 0 : `${e}-popup`;
|
|
975
985
|
}
|
|
976
986
|
//#endregion
|
|
977
987
|
//#region src/combobox/utils/stateAttributesMapping.ts
|
|
978
|
-
var
|
|
979
|
-
...
|
|
988
|
+
var Mt = {
|
|
989
|
+
...ge,
|
|
980
990
|
...Ee,
|
|
981
991
|
popupSide: (e) => e ? { "data-popup-side": e } : null,
|
|
982
992
|
listEmpty: (e) => e ? { "data-list-empty": "" } : null
|
|
983
|
-
},
|
|
984
|
-
...
|
|
993
|
+
}, Nt = { ..._e }, Pt = {
|
|
994
|
+
...M,
|
|
985
995
|
instant: (e) => e ? { "data-instant": e } : null
|
|
986
|
-
},
|
|
987
|
-
open: (e) => e ?
|
|
996
|
+
}, Ft = { "data-open": "" }, It = { "data-closed": "" }, Lt = {
|
|
997
|
+
open: (e) => e ? Ft : It,
|
|
988
998
|
...v
|
|
989
|
-
},
|
|
990
|
-
...
|
|
999
|
+
}, Rt = {
|
|
1000
|
+
...j,
|
|
991
1001
|
...v
|
|
992
|
-
},
|
|
993
|
-
function
|
|
994
|
-
let i =
|
|
995
|
-
if (i.store.open()) return v() ? i.store.popupId() ??
|
|
996
|
-
}),
|
|
1002
|
+
}, zt = /* @__PURE__ */ H("<button>");
|
|
1003
|
+
function Bt(n) {
|
|
1004
|
+
let i = X(), a = ze(), o = n, s = n, c = Symbol("ComboboxTrigger"), [l, d] = K(null, { ownedWrite: !0 }), p = G(() => o.nativeButton ?? !0), _ = G(() => i.disabled() || (o.disabled ?? !1)), v = G(() => i.store.inputInsidePopup()), x = G(() => v() ? o.id ?? i.id() : o.id), ee = G(() => {
|
|
1005
|
+
if (i.store.open()) return v() ? i.store.popupId() ?? jt(i.id()) : i.store.listElement()?.id;
|
|
1006
|
+
}), C = G(() => o["aria-labelledby"] ?? a.labelId() ?? i.store.labelId()), w = G(() => {
|
|
1007
|
+
let e = o["aria-describedby"];
|
|
1008
|
+
return e !== !1 && a.getAriaDescribedBy(e);
|
|
1009
|
+
}), T = G(() => ({
|
|
997
1010
|
...i.field.state(),
|
|
998
1011
|
readOnly: i.readOnly(),
|
|
999
1012
|
open: i.store.open(),
|
|
@@ -1001,76 +1014,76 @@ function Rt(n) {
|
|
|
1001
1014
|
popupSide: i.store.resolvedPopupSide(),
|
|
1002
1015
|
listEmpty: i.listEmpty(),
|
|
1003
1016
|
placeholder: i.selectionMode() !== "none" && !i.hasSelectedValue()
|
|
1004
|
-
})),
|
|
1017
|
+
})), E = G(() => m(n.class, T())), D = G(() => h(n.style, T())), O = G(() => t(T(), Mt)), k = q(s, "aria-describedby", "aria-labelledby", "render", "class", "disabled", "id", "nativeButton", "onBlur", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "onPointerEnter", "ref", "style"), ne = ie({
|
|
1005
1018
|
context: i.store.context.floatingRoot,
|
|
1006
1019
|
enabled: () => !i.disabled(),
|
|
1007
1020
|
event: () => "mousedown"
|
|
1008
|
-
}),
|
|
1021
|
+
}), re = et({
|
|
1009
1022
|
context: i.store.context.floatingRoot,
|
|
1010
1023
|
enabled: () => !i.store.open() && !i.readOnly() && !i.disabled() && i.selectionMode() === "single",
|
|
1011
1024
|
list: i.itemLabels,
|
|
1012
|
-
|
|
1025
|
+
disabledIndices: () => i.store.collection.disabledIndices(),
|
|
1013
1026
|
activeIndex: i.store.activeIndex,
|
|
1014
1027
|
selectedIndex: i.store.selectedIndex,
|
|
1015
1028
|
onMatch(e) {
|
|
1016
1029
|
let t = i.itemValues()[e];
|
|
1017
1030
|
t !== void 0 && i.setSelectedValue(t, g(f));
|
|
1018
1031
|
}
|
|
1019
|
-
}),
|
|
1020
|
-
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1032
|
+
}), A = "", ae, oe;
|
|
1033
|
+
fe(() => i.store, x, l);
|
|
1034
|
+
function se(e) {
|
|
1035
|
+
A = e.pointerType || "", ne.onPointerDown(e);
|
|
1023
1036
|
}
|
|
1024
|
-
function
|
|
1025
|
-
i.field.setFocused(!0), !_() && (clearTimeout(
|
|
1037
|
+
function ce() {
|
|
1038
|
+
i.field.setFocused(!0), !_() && (clearTimeout(ae), ae = setTimeout(() => i.forceMount(), 0));
|
|
1026
1039
|
}
|
|
1027
|
-
function
|
|
1028
|
-
|
|
1029
|
-
|
|
1040
|
+
function le(e) {
|
|
1041
|
+
Y(() => {
|
|
1042
|
+
S(i.store.track().positionerElement, e.relatedTarget) || (i.field.setTouched(!0), i.field.setFocused(!1), i.field.validationMode() === "onBlur" && i.field.validation.commit(i.selectionMode() === "none" ? i.inputValue() : i.selectedValue()), re.onBlur(e));
|
|
1030
1043
|
});
|
|
1031
1044
|
}
|
|
1032
|
-
function
|
|
1033
|
-
|
|
1034
|
-
let t =
|
|
1035
|
-
|
|
1045
|
+
function ue(e) {
|
|
1046
|
+
oe?.();
|
|
1047
|
+
let t = te(e), n = (t) => {
|
|
1048
|
+
oe = void 0;
|
|
1036
1049
|
let n = t.target;
|
|
1037
|
-
if (
|
|
1050
|
+
if (S(e, n) || S(i.store.track().positionerElement, n) || S(i.store.listElement(), n)) return;
|
|
1038
1051
|
let r = e.getBoundingClientRect();
|
|
1039
1052
|
t.clientX >= r.left && t.clientX <= r.right && t.clientY >= r.top && t.clientY <= r.bottom || i.setOpen(!1, g(u, t));
|
|
1040
1053
|
};
|
|
1041
|
-
t.addEventListener("mouseup", n, { once: !0 }),
|
|
1054
|
+
t.addEventListener("mouseup", n, { once: !0 }), oe = () => t.removeEventListener("mouseup", n);
|
|
1042
1055
|
}
|
|
1043
|
-
function
|
|
1056
|
+
function de(e) {
|
|
1044
1057
|
if (_()) return;
|
|
1045
1058
|
let t = e.currentTarget;
|
|
1046
|
-
v() || i.store.context.floatingRoot.update({ domReferenceElement: t }), i.forceMount(),
|
|
1059
|
+
v() || i.store.context.floatingRoot.update({ domReferenceElement: t }), i.forceMount(), A !== "touch" && (i.focusInput(), v() || e.preventDefault()), i.store.open() || (i.store.setOpenMethod(A || "mouse"), v() && ue(t)), ne.onMouseDown(e);
|
|
1047
1060
|
}
|
|
1048
|
-
function
|
|
1049
|
-
e.detail === 0 && i.store.setOpenMethod("keyboard"),
|
|
1061
|
+
function pe(e) {
|
|
1062
|
+
e.detail === 0 && i.store.setOpenMethod("keyboard"), ne.onClick(e);
|
|
1050
1063
|
}
|
|
1051
|
-
function
|
|
1052
|
-
_() || (
|
|
1064
|
+
function me(e) {
|
|
1065
|
+
_() || (re.onKeyDown(e), (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), e.stopPropagation(), i.store.setOpenMethod("keyboard"), i.setOpen(!0, g(r, e)), i.focusInput()));
|
|
1053
1066
|
}
|
|
1054
|
-
let
|
|
1055
|
-
|
|
1067
|
+
let he = y(b(() => o.onBlur), le), j = y(b(() => Y(() => _() ? Ce : void 0)), b(() => o.onClick), pe), ge = y(b(() => o.onFocus), ce), _e = y(b(() => Y(() => _() ? Se : void 0)), b(() => o.onKeyDown), me, b(() => Y(() => p() ? void 0 : P))), ve = y(b(() => Y(() => _() ? xe : void 0)), b(() => o.onKeyUp), b(() => Y(() => p() ? void 0 : N))), M = y(b(() => Y(() => _() ? xe : void 0)), b(() => o.onMouseDown), de), ye = y(b(() => Y(() => _() ? Ce : void 0)), b(() => o.onPointerDown), se), be = y(b(() => o.onPointerEnter), (e) => {
|
|
1068
|
+
A = e.pointerType || "";
|
|
1056
1069
|
});
|
|
1057
|
-
|
|
1058
|
-
id:
|
|
1070
|
+
W(() => ({
|
|
1071
|
+
id: x(),
|
|
1059
1072
|
element: l(),
|
|
1060
1073
|
insidePopup: v()
|
|
1061
1074
|
}), (e) => (i.setTriggerElement(e.element), a.registerControlId(c, e.insidePopup ? e.id : void 0), () => {
|
|
1062
|
-
|
|
1063
|
-
})),
|
|
1064
|
-
clearTimeout(
|
|
1075
|
+
Y(i.triggerElement) === e.element && i.setTriggerElement(null);
|
|
1076
|
+
})), J(() => {
|
|
1077
|
+
clearTimeout(ae), oe?.(), a.registerControlId(c, void 0);
|
|
1065
1078
|
});
|
|
1066
|
-
let
|
|
1067
|
-
var t =
|
|
1068
|
-
return
|
|
1079
|
+
let we = e(n, () => T(), (e) => (() => {
|
|
1080
|
+
var t = L(zt);
|
|
1081
|
+
return V(t, e, !1), z(), t;
|
|
1069
1082
|
})());
|
|
1070
|
-
return
|
|
1083
|
+
return F(we, R({
|
|
1071
1084
|
ref: [((e) => d(e)), o.ref],
|
|
1072
1085
|
get id() {
|
|
1073
|
-
return
|
|
1086
|
+
return x();
|
|
1074
1087
|
},
|
|
1075
1088
|
get type() {
|
|
1076
1089
|
return p() ? "button" : void 0;
|
|
@@ -1094,7 +1107,7 @@ function Rt(n) {
|
|
|
1094
1107
|
return v() ? "dialog" : "listbox";
|
|
1095
1108
|
},
|
|
1096
1109
|
get "aria-controls"() {
|
|
1097
|
-
return
|
|
1110
|
+
return ee();
|
|
1098
1111
|
},
|
|
1099
1112
|
get "aria-required"() {
|
|
1100
1113
|
return v() && i.required() ? "true" : void 0;
|
|
@@ -1103,38 +1116,41 @@ function Rt(n) {
|
|
|
1103
1116
|
return v() && i.readOnly() ? "true" : void 0;
|
|
1104
1117
|
},
|
|
1105
1118
|
get "aria-labelledby"() {
|
|
1106
|
-
return
|
|
1119
|
+
return C();
|
|
1120
|
+
},
|
|
1121
|
+
get "aria-describedby"() {
|
|
1122
|
+
return w();
|
|
1107
1123
|
},
|
|
1108
1124
|
get "aria-invalid"() {
|
|
1109
|
-
return
|
|
1125
|
+
return T().valid === !1 && !_() ? "true" : void 0;
|
|
1110
1126
|
},
|
|
1111
1127
|
"data-base-ui-click-trigger": "",
|
|
1112
1128
|
get class() {
|
|
1113
|
-
return w();
|
|
1114
|
-
},
|
|
1115
|
-
get style() {
|
|
1116
1129
|
return E();
|
|
1117
1130
|
},
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1131
|
+
get style() {
|
|
1132
|
+
return D();
|
|
1133
|
+
},
|
|
1134
|
+
onBlur: he,
|
|
1135
|
+
onClick: j,
|
|
1136
|
+
onFocus: ge,
|
|
1137
|
+
onKeyDown: _e,
|
|
1138
|
+
onKeyUp: ve,
|
|
1139
|
+
onMouseDown: M,
|
|
1140
|
+
onPointerDown: ye,
|
|
1141
|
+
onPointerEnter: be
|
|
1142
|
+
}, O, k));
|
|
1127
1143
|
}
|
|
1128
1144
|
//#endregion
|
|
1129
1145
|
//#region src/combobox/chips/ComboboxChipsContext.ts
|
|
1130
|
-
var
|
|
1146
|
+
var Vt = class {
|
|
1131
1147
|
registrations = /* @__PURE__ */ new Map();
|
|
1132
1148
|
revision;
|
|
1133
1149
|
setRevision;
|
|
1134
1150
|
order = 0;
|
|
1135
1151
|
orders = /* @__PURE__ */ new Map();
|
|
1136
1152
|
constructor() {
|
|
1137
|
-
let [e, t] =
|
|
1153
|
+
let [e, t] = K(0, { ownedWrite: !0 });
|
|
1138
1154
|
this.revision = e, this.setRevision = t;
|
|
1139
1155
|
}
|
|
1140
1156
|
register(e, t) {
|
|
@@ -1165,22 +1181,22 @@ var zt = class {
|
|
|
1165
1181
|
size() {
|
|
1166
1182
|
return this.tokens().length;
|
|
1167
1183
|
}
|
|
1168
|
-
},
|
|
1169
|
-
function
|
|
1170
|
-
let e =
|
|
1171
|
-
return e ===
|
|
1184
|
+
}, Ht = Symbol("ComboboxChipsContext"), Ut = U(Ht);
|
|
1185
|
+
function Z() {
|
|
1186
|
+
let e = Qe(Ut);
|
|
1187
|
+
return e === Ht ? void 0 : e;
|
|
1172
1188
|
}
|
|
1173
|
-
function
|
|
1174
|
-
let e =
|
|
1189
|
+
function Wt() {
|
|
1190
|
+
let e = Z();
|
|
1175
1191
|
if (!e) throw Error("Base UI: ComboboxChipsContext is missing. Chip parts must be placed within <Combobox.Chips>.");
|
|
1176
1192
|
return e;
|
|
1177
1193
|
}
|
|
1178
1194
|
//#endregion
|
|
1179
1195
|
//#region src/combobox/positioner/ComboboxPositionerContext.ts
|
|
1180
|
-
var
|
|
1181
|
-
function
|
|
1182
|
-
let t =
|
|
1183
|
-
if (t ===
|
|
1196
|
+
var Gt = Symbol("ComboboxPositionerContext"), Kt = U(Gt);
|
|
1197
|
+
function Q(e = !1) {
|
|
1198
|
+
let t = Qe(Kt);
|
|
1199
|
+
if (t === Gt) {
|
|
1184
1200
|
if (e) return;
|
|
1185
1201
|
throw Error("Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component.");
|
|
1186
1202
|
}
|
|
@@ -1188,7 +1204,7 @@ function Gt(e = !1) {
|
|
|
1188
1204
|
}
|
|
1189
1205
|
//#endregion
|
|
1190
1206
|
//#region src/combobox/utils/ComboboxInternalDismissButton.tsx
|
|
1191
|
-
var
|
|
1207
|
+
var qt = /* @__PURE__ */ H("<span role=button aria-label=Dismiss>"), Jt = {
|
|
1192
1208
|
"clip-path": "inset(50%)",
|
|
1193
1209
|
overflow: "hidden",
|
|
1194
1210
|
"white-space": "nowrap",
|
|
@@ -1201,82 +1217,92 @@ var Kt = /* @__PURE__ */ B("<span role=button aria-label=Dismiss>"), Z = {
|
|
|
1201
1217
|
top: "0",
|
|
1202
1218
|
left: "0"
|
|
1203
1219
|
};
|
|
1204
|
-
function
|
|
1205
|
-
let t =
|
|
1220
|
+
function Yt(e) {
|
|
1221
|
+
let t = X();
|
|
1206
1222
|
function n(e) {
|
|
1207
1223
|
t.setOpen(!1, g(s, e, e.currentTarget));
|
|
1208
1224
|
}
|
|
1209
|
-
var r =
|
|
1225
|
+
var r = L(qt);
|
|
1210
1226
|
return r.$$keydown = (e) => {
|
|
1211
1227
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
|
|
1212
|
-
}, r.$$click = n,
|
|
1213
|
-
|
|
1214
|
-
}),
|
|
1228
|
+
}, r.$$click = n, Ge(() => (t) => e.ref?.(t), r), Ue(() => Jt, (e, t) => {
|
|
1229
|
+
qe(r, e, t);
|
|
1230
|
+
}), z(), r;
|
|
1215
1231
|
}
|
|
1216
|
-
|
|
1232
|
+
I(["click", "keydown"]);
|
|
1217
1233
|
//#endregion
|
|
1218
1234
|
//#region src/combobox/utils/parts.ts
|
|
1219
|
-
function
|
|
1235
|
+
function Xt(e) {
|
|
1220
1236
|
return e === "rtl" ? ["ArrowRight", "ArrowLeft"] : ["ArrowLeft", "ArrowRight"];
|
|
1221
1237
|
}
|
|
1222
|
-
function
|
|
1238
|
+
function Zt(e, t) {
|
|
1223
1239
|
let n = e >= t - 1 ? t - 2 : e;
|
|
1224
1240
|
return n >= 0 ? n : void 0;
|
|
1225
1241
|
}
|
|
1226
1242
|
//#endregion
|
|
1227
1243
|
//#region src/combobox/input/ComboboxInput.tsx
|
|
1228
|
-
var
|
|
1229
|
-
function
|
|
1230
|
-
let s =
|
|
1244
|
+
var Qt = /* @__PURE__ */ H("<input>");
|
|
1245
|
+
function $t(r) {
|
|
1246
|
+
let s = X(), l = Z(), u = Q(!0), d = ze(), p = we(), _ = r, v = r, x = `base-ui-${Xe()}`, ee = u !== void 0, te = G(() => ee || s.inline()), S = G(() => !te() || s.modal()), C = G(() => _.id ?? (te() ? x : s.id())), w = G(() => s.field.disabled() || s.disabled() || (_.disabled ?? !1)), T = G(() => s.selectionMode() === "none" && !ee), [E, D] = K(null), O = !1, k = null, ne = !1, re = G(() => ee ? {
|
|
1231
1247
|
...s.field.state(),
|
|
1232
1248
|
...Te
|
|
1233
|
-
} : s.field.state()), A =
|
|
1234
|
-
...
|
|
1249
|
+
} : s.field.state()), A = G(() => ({
|
|
1250
|
+
...re(),
|
|
1235
1251
|
open: s.store.open(),
|
|
1236
1252
|
disabled: w(),
|
|
1237
1253
|
readOnly: s.readOnly(),
|
|
1238
1254
|
popupSide: s.store.resolvedPopupSide(),
|
|
1239
1255
|
listEmpty: s.listEmpty()
|
|
1240
|
-
})),
|
|
1256
|
+
})), ie = G(() => m(r.class, A())), ae = G(() => h(r.style, A())), oe = G(() => t(A(), Mt)), se = G(() => {
|
|
1241
1257
|
let e = s.store.activeIndex();
|
|
1242
1258
|
return e == null ? void 0 : `${s.id()}-${e}`;
|
|
1243
|
-
}),
|
|
1244
|
-
|
|
1259
|
+
}), ce = G(() => {
|
|
1260
|
+
let e = _["aria-describedby"];
|
|
1261
|
+
return ee || e === !1 ? e : d.getAriaDescribedBy(e);
|
|
1262
|
+
}), le = q(v, "aria-describedby", "render", "class", "disabled", "id", "onBlur", "onCompositionEnd", "onCompositionStart", "onFocus", "onInput", "onKeyDown", "onMouseDown", "onPointerDown", "onPointerMove", "ref", "style");
|
|
1263
|
+
function ue() {
|
|
1245
1264
|
s.setIndices({
|
|
1246
1265
|
activeIndex: null,
|
|
1247
1266
|
selectedIndex: null,
|
|
1248
1267
|
type: s.store.keyboardActive ? i : n
|
|
1249
1268
|
});
|
|
1250
1269
|
}
|
|
1251
|
-
function
|
|
1252
|
-
if (s.field.setFocused(!0), !s.inline() || !
|
|
1253
|
-
|
|
1254
|
-
let e =
|
|
1270
|
+
function de() {
|
|
1271
|
+
if (s.field.setFocused(!0), !s.inline() || !ne) return;
|
|
1272
|
+
ne = !1;
|
|
1273
|
+
let e = k;
|
|
1255
1274
|
e != null && s.itemValues()[e] !== void 0 && s.setIndices({ activeIndex: e });
|
|
1256
1275
|
}
|
|
1257
|
-
function
|
|
1276
|
+
function fe() {
|
|
1258
1277
|
s.field.setTouched(!0), s.field.setFocused(!1);
|
|
1259
1278
|
let e = s.store.activeIndex();
|
|
1260
|
-
s.inline() && e !== null && s.autoHighlight() !== "always" && (
|
|
1279
|
+
s.inline() && e !== null && s.autoHighlight() !== "always" && (k = e, ne = !0, s.setIndices({ activeIndex: null })), s.field.validationMode() === "onBlur" && s.field.validation.commit(s.selectionMode() === "none" ? s.inputValue() : s.selectedValue());
|
|
1261
1280
|
}
|
|
1262
|
-
function
|
|
1263
|
-
|
|
1281
|
+
function pe(e) {
|
|
1282
|
+
Ve() || (O = !0, D(e.currentTarget.value));
|
|
1264
1283
|
}
|
|
1265
|
-
function
|
|
1284
|
+
function me(e) {
|
|
1266
1285
|
O = !1;
|
|
1267
1286
|
let t = e.currentTarget.value;
|
|
1268
|
-
D(null), s.setInputValue(t, g(o, e));
|
|
1287
|
+
D(null), s.setInputValue(t, g(o, e)), he(e.currentTarget);
|
|
1269
1288
|
}
|
|
1270
|
-
function
|
|
1271
|
-
|
|
1289
|
+
function he(e) {
|
|
1290
|
+
queueMicrotask(() => Y(() => {
|
|
1291
|
+
if (O || s.inputElement() !== e) return;
|
|
1292
|
+
let t = s.inputValue();
|
|
1293
|
+
e.value !== t && (e.value = t);
|
|
1294
|
+
}));
|
|
1272
1295
|
}
|
|
1273
|
-
function
|
|
1296
|
+
function j(e, t, n) {
|
|
1297
|
+
s.readOnly() || w() || !e || !n || (s.setOpen(!0, g(o, t)), s.autoHighlight() || ue());
|
|
1298
|
+
}
|
|
1299
|
+
function ge(e) {
|
|
1274
1300
|
let t = e.currentTarget, n = !e.inputType || e.inputType === "insertReplacementText", r = O || !n;
|
|
1275
1301
|
if (O) {
|
|
1276
1302
|
let n = t.value;
|
|
1277
1303
|
D(n), n === "" && !s.openOnInputClick() && !s.store.inputInsidePopup() && s.setOpen(!1, g(a, e));
|
|
1278
1304
|
let i = n.trim(), o = !!s.autoHighlight() && i !== "";
|
|
1279
|
-
|
|
1305
|
+
j(i, e, r), s.store.open() && s.store.activeIndex() !== null && !o && ue();
|
|
1280
1306
|
return;
|
|
1281
1307
|
}
|
|
1282
1308
|
let i = g(o, e);
|
|
@@ -1285,28 +1311,28 @@ function Zt(r) {
|
|
|
1285
1311
|
return;
|
|
1286
1312
|
}
|
|
1287
1313
|
let c = t.value === "", l = g(a, e);
|
|
1288
|
-
c && !s.store.inputInsidePopup() && (s.selectionMode() === "single" && s.setSelectedValue(null, l), s.openOnInputClick() || s.setOpen(!1, l)),
|
|
1314
|
+
c && !s.store.inputInsidePopup() && (s.selectionMode() === "single" && s.setSelectedValue(null, l), s.openOnInputClick() || s.setOpen(!1, l)), j(t.value.trim(), e, r), s.store.open() && s.store.activeIndex() !== null && !s.autoHighlight() && ue(), he(t);
|
|
1289
1315
|
}
|
|
1290
|
-
function
|
|
1316
|
+
function _e(e) {
|
|
1291
1317
|
if (!l) return;
|
|
1292
|
-
let t = e.currentTarget, n = l.highlightedChipIndex(), r = l.chips.size(), [i, a] =
|
|
1318
|
+
let t = e.currentTarget, n = l.highlightedChipIndex(), r = l.chips.size(), [i, a] = Xt(p()), o = s.selectedValue(), c = Array.isArray(o) ? o : [];
|
|
1293
1319
|
if (n !== void 0) {
|
|
1294
1320
|
if (e.key === i) return e.preventDefault(), n > 0 ? n - 1 : void 0;
|
|
1295
1321
|
if (e.key === a) return e.preventDefault(), n < r - 1 ? n + 1 : void 0;
|
|
1296
1322
|
if (e.key === "Backspace" || e.key === "Delete") {
|
|
1297
1323
|
e.preventDefault();
|
|
1298
|
-
let t =
|
|
1299
|
-
return
|
|
1324
|
+
let t = Zt(n, c.length);
|
|
1325
|
+
return ue(), t;
|
|
1300
1326
|
}
|
|
1301
1327
|
return;
|
|
1302
1328
|
}
|
|
1303
1329
|
if (e.key === i && (t.selectionStart ?? 0) === 0 && c.length > 0) return e.preventDefault(), r > 0 ? r - 1 : void 0;
|
|
1304
1330
|
}
|
|
1305
|
-
function
|
|
1331
|
+
function ve(e) {
|
|
1306
1332
|
let t = s.selectedValue(), n = s.selectionMode() === "multiple" && Array.isArray(t) ? t.length === 0 : t === null, r = g(c, e);
|
|
1307
1333
|
s.setInputValue("", r), s.setSelectedValue(s.selectionMode() === "multiple" ? [] : null, r), !n && !s.inline() && !r.isPropagationAllowed && e.stopPropagation();
|
|
1308
1334
|
}
|
|
1309
|
-
function
|
|
1335
|
+
function M(e) {
|
|
1310
1336
|
let t = !w() && !s.readOnly(), n = e.ctrlKey || e.shiftKey || e.altKey || e.metaKey;
|
|
1311
1337
|
if (!w() && !n && (s.store.keyboardActive = !0), s.grid() && s.store.activeIndex() == null && (e.key === "ArrowLeft" || e.key === "ArrowRight") || s.listNavigation.onKeyDown(e), s.dismiss.onKeyDown(e), !t || n) {
|
|
1312
1338
|
s.readOnly() && e.key === "Enter" && s.store.open() && s.store.activeIndex() !== null && (e.preventDefault(), e.stopPropagation());
|
|
@@ -1315,21 +1341,21 @@ function Zt(r) {
|
|
|
1315
1341
|
let r = e.currentTarget, i = p() === "rtl";
|
|
1316
1342
|
if (e.key === "Home" || e.key === "End") {
|
|
1317
1343
|
e.preventDefault(), e.stopPropagation();
|
|
1318
|
-
let t = r.scrollWidth - r.clientWidth, n = e.key === "Home", a =
|
|
1344
|
+
let t = r.scrollWidth - r.clientWidth, n = e.key === "Home", a = (en() && i ? !n : n) ? 0 : r.value.length;
|
|
1319
1345
|
r.setSelectionRange(a, a), r.scrollLeft = n ? 0 : i ? -t : t;
|
|
1320
1346
|
return;
|
|
1321
1347
|
}
|
|
1322
1348
|
if (!s.presence.mounted() && e.key === "Escape") {
|
|
1323
|
-
|
|
1349
|
+
ve(e);
|
|
1324
1350
|
return;
|
|
1325
1351
|
}
|
|
1326
1352
|
if (l && e.key === "Backspace" && r.value === "" && l.highlightedChipIndex() === void 0 && Array.isArray(s.selectedValue()) && s.selectedValue().length > 0) {
|
|
1327
1353
|
let t = s.selectedValue(), n = l.chips.size(), r = n > 0 ? n - 1 : t.length - 1;
|
|
1328
|
-
|
|
1354
|
+
ue(), s.setSelectedValue(t.filter((e, t) => t !== r), g(f, e));
|
|
1329
1355
|
return;
|
|
1330
1356
|
}
|
|
1331
1357
|
if (l) {
|
|
1332
|
-
let t = l.highlightedChipIndex() !== void 0, n =
|
|
1358
|
+
let t = l.highlightedChipIndex() !== void 0, n = _e(e);
|
|
1333
1359
|
l.setHighlightedChipIndex(n), n === void 0 ? t && s.focusInput() : l.chips.elements()[n]?.focus();
|
|
1334
1360
|
}
|
|
1335
1361
|
if (e.keyCode !== 229 && e.key === "Enter" && s.store.open()) {
|
|
@@ -1342,109 +1368,116 @@ function Zt(r) {
|
|
|
1342
1368
|
e.preventDefault(), e.stopPropagation(), s.clickHighlightedItem(t, e);
|
|
1343
1369
|
}
|
|
1344
1370
|
}
|
|
1345
|
-
function
|
|
1371
|
+
function ye() {
|
|
1346
1372
|
s.store.keyboardActive = !1;
|
|
1347
1373
|
}
|
|
1348
|
-
let
|
|
1349
|
-
|
|
1350
|
-
}),
|
|
1351
|
-
|
|
1352
|
-
insidePopup:
|
|
1374
|
+
let be = y(b(() => _.onBlur), fe), xe = y(b(() => _.onCompositionEnd), me), Se = y(b(() => _.onCompositionStart), pe), N = y(b(() => _.onFocus), de), Ce = y(b(() => _.onInput), ge), P = y(b(() => _.onKeyDown), M), Ee = y(b(() => _.onMouseDown), (e) => s.click.onMouseDown(e)), Oe = y(b(() => _.onPointerDown), (e) => {
|
|
1375
|
+
ye(), s.click.onPointerDown(e);
|
|
1376
|
+
}), Ae = y(b(() => _.onPointerMove), ye);
|
|
1377
|
+
W(() => ({
|
|
1378
|
+
insidePopup: te(),
|
|
1353
1379
|
owns: T()
|
|
1354
1380
|
}), (e) => {
|
|
1355
|
-
s.store.setInputInsidePopup(e.insidePopup), s.store.setInputOwnsFormValue(e.owns), e.insidePopup && !s.hasInputValueProp() &&
|
|
1356
|
-
}),
|
|
1357
|
-
|
|
1381
|
+
s.store.setInputInsidePopup(e.insidePopup), s.store.setInputOwnsFormValue(e.owns), e.insidePopup && !s.hasInputValueProp() && Y(() => s.setInputValue("", g(f)));
|
|
1382
|
+
}), J(() => {
|
|
1383
|
+
Y(s.inputElement) === je && s.setInputElement(null);
|
|
1358
1384
|
});
|
|
1359
|
-
let
|
|
1360
|
-
var t =
|
|
1361
|
-
return
|
|
1385
|
+
let je = null, Me = e(r, () => A(), (e) => (() => {
|
|
1386
|
+
var t = L(Qt);
|
|
1387
|
+
return V(t, e, !1), z(), t;
|
|
1362
1388
|
})());
|
|
1363
|
-
return [
|
|
1389
|
+
return [F(Ye, {
|
|
1364
1390
|
get when() {
|
|
1365
|
-
return
|
|
1391
|
+
return We(() => !!s.store.open())() ? S() : s.store.open();
|
|
1366
1392
|
},
|
|
1367
1393
|
get children() {
|
|
1368
|
-
return
|
|
1394
|
+
return F(Yt, { ref: (e) => {
|
|
1369
1395
|
s.store.startDismissElement = e;
|
|
1370
1396
|
} });
|
|
1371
1397
|
}
|
|
1372
|
-
}),
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1398
|
+
}), F((e) => ee ? F(De, {
|
|
1399
|
+
value: ke,
|
|
1400
|
+
get children() {
|
|
1401
|
+
return e.children;
|
|
1402
|
+
}
|
|
1403
|
+
}) : We(() => e.children), { get children() {
|
|
1404
|
+
return F(Me, R({
|
|
1405
|
+
ref: [((e) => {
|
|
1406
|
+
je = e, s.setInputElement(e);
|
|
1407
|
+
}), _.ref],
|
|
1408
|
+
get id() {
|
|
1409
|
+
return C();
|
|
1410
|
+
},
|
|
1411
|
+
get value() {
|
|
1412
|
+
return E() ?? s.inputValue();
|
|
1413
|
+
},
|
|
1414
|
+
get disabled() {
|
|
1415
|
+
return w();
|
|
1416
|
+
},
|
|
1417
|
+
get readonly() {
|
|
1418
|
+
return s.readOnly();
|
|
1419
|
+
},
|
|
1420
|
+
get required() {
|
|
1421
|
+
return We(() => s.selectionMode() === "none")() ? s.required() : void 0;
|
|
1422
|
+
},
|
|
1423
|
+
get form() {
|
|
1424
|
+
return s.form();
|
|
1425
|
+
},
|
|
1426
|
+
get name() {
|
|
1427
|
+
return We(() => !!T())() ? s.name() : void 0;
|
|
1428
|
+
},
|
|
1429
|
+
get "aria-readonly"() {
|
|
1430
|
+
return s.readOnly() ? "true" : void 0;
|
|
1431
|
+
},
|
|
1432
|
+
get "aria-required"() {
|
|
1433
|
+
return s.required() ? "true" : void 0;
|
|
1434
|
+
},
|
|
1435
|
+
get "aria-labelledby"() {
|
|
1436
|
+
return d.labelId();
|
|
1437
|
+
},
|
|
1438
|
+
get "aria-describedby"() {
|
|
1439
|
+
return ce();
|
|
1440
|
+
},
|
|
1441
|
+
get "aria-activedescendant"() {
|
|
1442
|
+
return se();
|
|
1443
|
+
},
|
|
1444
|
+
get "aria-invalid"() {
|
|
1445
|
+
return A().valid === !1 && !w() ? "true" : void 0;
|
|
1446
|
+
},
|
|
1447
|
+
"data-base-ui-click-trigger": "",
|
|
1448
|
+
get class() {
|
|
1449
|
+
return ie();
|
|
1450
|
+
},
|
|
1451
|
+
get style() {
|
|
1452
|
+
return ae();
|
|
1453
|
+
},
|
|
1454
|
+
onBlur: be,
|
|
1455
|
+
onCompositionEnd: xe,
|
|
1456
|
+
onCompositionStart: Se,
|
|
1457
|
+
onFocus: N,
|
|
1458
|
+
onInput: Ce,
|
|
1459
|
+
onKeyDown: P,
|
|
1460
|
+
onMouseDown: Ee,
|
|
1461
|
+
onPointerDown: Oe,
|
|
1462
|
+
onPointerMove: Ae
|
|
1463
|
+
}, () => s.referenceAria(), oe, le));
|
|
1464
|
+
} })];
|
|
1432
1465
|
}
|
|
1433
|
-
function
|
|
1466
|
+
function en() {
|
|
1434
1467
|
return typeof navigator < "u" && navigator.userAgent.includes("Firefox");
|
|
1435
1468
|
}
|
|
1436
1469
|
//#endregion
|
|
1437
1470
|
//#region src/combobox/utils/handleInputPress.ts
|
|
1438
|
-
function
|
|
1439
|
-
if (e.baseUIHandlerPrevented
|
|
1440
|
-
let
|
|
1441
|
-
|
|
1471
|
+
function tn(e, t, n, r) {
|
|
1472
|
+
if (e.baseUIHandlerPrevented) return;
|
|
1473
|
+
let i = e.target, a = C(i) ? i : null;
|
|
1474
|
+
a !== e.currentTarget && (r?.(a) || T(a)) || (e.preventDefault(), !n && (t.focusInput(), t.openOnInputClick() && t.setOpen(!0, g(d, e))));
|
|
1442
1475
|
}
|
|
1443
1476
|
//#endregion
|
|
1444
1477
|
//#region src/combobox/input-group/ComboboxInputGroup.tsx
|
|
1445
|
-
var
|
|
1446
|
-
function
|
|
1447
|
-
let r =
|
|
1478
|
+
var nn = /* @__PURE__ */ H("<div>");
|
|
1479
|
+
function $(n) {
|
|
1480
|
+
let r = X(), i = n, a = n, o = G(() => ({
|
|
1448
1481
|
...r.field.state(),
|
|
1449
1482
|
open: r.store.open(),
|
|
1450
1483
|
disabled: r.disabled(),
|
|
@@ -1452,15 +1485,15 @@ function tn(n) {
|
|
|
1452
1485
|
popupSide: r.store.resolvedPopupSide(),
|
|
1453
1486
|
listEmpty: r.listEmpty(),
|
|
1454
1487
|
placeholder: r.selectionMode() !== "none" && !r.hasSelectedValue()
|
|
1455
|
-
})), s =
|
|
1456
|
-
|
|
1457
|
-
|
|
1488
|
+
})), s = G(() => m(n.class, o())), c = G(() => h(n.style, o())), l = G(() => t(o(), Mt)), u = q(a, "render", "class", "onMouseDown", "ref", "style"), d = y(b(() => i.onMouseDown), (e) => tn(e, r, r.disabled(), (e) => S(r.store.chipsContainerElement, e)));
|
|
1489
|
+
J(() => {
|
|
1490
|
+
Y(r.inputGroupElement) === f && r.setInputGroupElement(null);
|
|
1458
1491
|
});
|
|
1459
1492
|
let f = null, p = e(n, () => o(), (e) => (() => {
|
|
1460
|
-
var t =
|
|
1461
|
-
return
|
|
1493
|
+
var t = L(nn);
|
|
1494
|
+
return V(t, e, !1), z(), t;
|
|
1462
1495
|
})());
|
|
1463
|
-
return
|
|
1496
|
+
return F(p, R({
|
|
1464
1497
|
ref: [((e) => {
|
|
1465
1498
|
f = e, r.setInputGroupElement(e);
|
|
1466
1499
|
}), i.ref],
|
|
@@ -1476,13 +1509,13 @@ function tn(n) {
|
|
|
1476
1509
|
}
|
|
1477
1510
|
//#endregion
|
|
1478
1511
|
//#region src/combobox/icon/ComboboxIcon.tsx
|
|
1479
|
-
var
|
|
1480
|
-
function
|
|
1481
|
-
let r =
|
|
1482
|
-
var t =
|
|
1483
|
-
return
|
|
1512
|
+
var rn = /* @__PURE__ */ H("<span>");
|
|
1513
|
+
function an(n) {
|
|
1514
|
+
let r = X(), i = n, a = n, o = G(() => ({ open: r.store.open() })), s = G(() => m(n.class, o())), c = G(() => h(n.style, o())), l = G(() => t(o(), j)), u = q(a, "render", "class", "ref", "style"), d = e(n, () => o(), (e) => (() => {
|
|
1515
|
+
var t = L(rn);
|
|
1516
|
+
return V(t, e, !1), z(), t;
|
|
1484
1517
|
})());
|
|
1485
|
-
return
|
|
1518
|
+
return F(d, R({
|
|
1486
1519
|
ref: [i.ref],
|
|
1487
1520
|
"aria-hidden": "true",
|
|
1488
1521
|
get class() {
|
|
@@ -1497,26 +1530,26 @@ function Q(n) {
|
|
|
1497
1530
|
}
|
|
1498
1531
|
//#endregion
|
|
1499
1532
|
//#region src/combobox/clear/ComboboxClear.tsx
|
|
1500
|
-
var
|
|
1501
|
-
function
|
|
1502
|
-
let a =
|
|
1533
|
+
var on = /* @__PURE__ */ H("<button>");
|
|
1534
|
+
function sn(r) {
|
|
1535
|
+
let a = X(), o = r, s = r, c = G(() => o.nativeButton ?? !0), u = G(() => a.field.disabled() || a.disabled() || (o.disabled ?? !1)), d = G(() => {
|
|
1503
1536
|
let e = a.selectionMode();
|
|
1504
1537
|
return e === "none" ? a.inputValue() !== "" : e === "single" ? a.selectedValue() != null : a.hasSelectionChips();
|
|
1505
|
-
}), f =
|
|
1538
|
+
}), f = he(() => d()), p = G(() => (o.keepMounted ?? !1) || f.mounted()), _ = G(() => ({
|
|
1506
1539
|
open: a.store.open(),
|
|
1507
1540
|
disabled: u(),
|
|
1508
1541
|
visible: d(),
|
|
1509
1542
|
transitionStatus: f.transitionStatus()
|
|
1510
|
-
})), v =
|
|
1511
|
-
|
|
1543
|
+
})), v = G(() => m(r.class, _())), ee = G(() => h(r.style, _())), te = G(() => t(_(), Rt)), S = q(s, "render", "class", "disabled", "keepMounted", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "ref", "style"), C = null;
|
|
1544
|
+
W(() => ({
|
|
1512
1545
|
visible: d(),
|
|
1513
1546
|
status: f.transitionStatus(),
|
|
1514
1547
|
element: C
|
|
1515
1548
|
}), (e) => {
|
|
1516
1549
|
if (e.visible || e.status !== "ending" || !e.element) return;
|
|
1517
1550
|
let t = new AbortController();
|
|
1518
|
-
return
|
|
1519
|
-
|
|
1551
|
+
return x(e.element, () => {
|
|
1552
|
+
Y(d) || f.setMounted(!1);
|
|
1520
1553
|
}, t.signal), () => t.abort();
|
|
1521
1554
|
});
|
|
1522
1555
|
function w(e) {
|
|
@@ -1525,22 +1558,22 @@ function $(r) {
|
|
|
1525
1558
|
a.setInputValue("", g(l, e)), a.selectionMode() === "none" ? a.setIndices({
|
|
1526
1559
|
activeIndex: null,
|
|
1527
1560
|
type: t
|
|
1528
|
-
}) : (a.setSelectedValue(
|
|
1561
|
+
}) : (a.setSelectedValue(a.multiple() ? [] : null, g(l, e)), a.setIndices({
|
|
1529
1562
|
activeIndex: null,
|
|
1530
1563
|
selectedIndex: null,
|
|
1531
1564
|
type: t
|
|
1532
1565
|
})), a.focusInput();
|
|
1533
1566
|
}
|
|
1534
|
-
let T = y(() =>
|
|
1535
|
-
var t =
|
|
1536
|
-
return
|
|
1567
|
+
let T = y(b(() => Y(() => u() ? Ce : void 0)), b(() => o.onClick), w), E = y(b(() => o.onKeyDown), b(() => Y(() => c() ? void 0 : P))), D = y(b(() => Y(() => u() ? xe : void 0)), b(() => o.onKeyUp), b(() => Y(() => c() ? void 0 : N))), O = y(b(() => o.onMouseDown), (e) => e.preventDefault()), k = e(r, () => _(), (e) => (() => {
|
|
1568
|
+
var t = L(on);
|
|
1569
|
+
return V(t, e, !1), z(), t;
|
|
1537
1570
|
})());
|
|
1538
|
-
return
|
|
1571
|
+
return F(Ye, {
|
|
1539
1572
|
get when() {
|
|
1540
1573
|
return p();
|
|
1541
1574
|
},
|
|
1542
1575
|
get children() {
|
|
1543
|
-
return
|
|
1576
|
+
return F(k, R({
|
|
1544
1577
|
ref: [((e) => {
|
|
1545
1578
|
C = e, a.store.clearElement = e;
|
|
1546
1579
|
}), o.ref],
|
|
@@ -1558,13 +1591,13 @@ function $(r) {
|
|
|
1558
1591
|
return v();
|
|
1559
1592
|
},
|
|
1560
1593
|
get style() {
|
|
1561
|
-
return
|
|
1594
|
+
return ee();
|
|
1562
1595
|
},
|
|
1563
1596
|
onClick: T,
|
|
1564
1597
|
onKeyDown: E,
|
|
1565
1598
|
onKeyUp: D,
|
|
1566
1599
|
onMouseDown: O
|
|
1567
|
-
},
|
|
1600
|
+
}, te, S, { get children() {
|
|
1568
1601
|
return r.children ?? "x";
|
|
1569
1602
|
} }));
|
|
1570
1603
|
}
|
|
@@ -1572,9 +1605,9 @@ function $(r) {
|
|
|
1572
1605
|
}
|
|
1573
1606
|
//#endregion
|
|
1574
1607
|
//#region src/combobox/collection/ComboboxCollection.tsx
|
|
1575
|
-
function
|
|
1576
|
-
let t =
|
|
1577
|
-
return
|
|
1608
|
+
function cn(e) {
|
|
1609
|
+
let t = X(), n = bt(), r = G(() => n?.items() ?? t.filteredItems());
|
|
1610
|
+
return F(Je, {
|
|
1578
1611
|
get each() {
|
|
1579
1612
|
return r();
|
|
1580
1613
|
},
|
|
@@ -1585,16 +1618,16 @@ function an(e) {
|
|
|
1585
1618
|
}
|
|
1586
1619
|
//#endregion
|
|
1587
1620
|
//#region src/combobox/list/ComboboxList.tsx
|
|
1588
|
-
var
|
|
1589
|
-
function
|
|
1590
|
-
let n =
|
|
1621
|
+
var ln = /* @__PURE__ */ H("<div>");
|
|
1622
|
+
function un(t) {
|
|
1623
|
+
let n = X(), r = Q(!0), i = t, a = t, o = G(() => ({ empty: n.listEmpty() })), s = G(() => m(t.class, o())), c = G(() => h(t.style, o())), l = q(a, "render", "children", "class", "id", "onKeyDown", "ref", "style");
|
|
1591
1624
|
function u(e) {
|
|
1592
1625
|
if (n.disabled() || n.readOnly() || (n.store.keyboardActive = !0, e.key !== "Enter")) return;
|
|
1593
1626
|
let t = n.store.activeIndex();
|
|
1594
1627
|
t != null && (e.preventDefault(), e.stopPropagation(), n.clickHighlightedItem(t, e));
|
|
1595
1628
|
}
|
|
1596
|
-
let d = y(() => i.onKeyDown,
|
|
1597
|
-
|
|
1629
|
+
let d = y(b(() => i.onKeyDown), u), [f, p] = K(null, { ownedWrite: !0 });
|
|
1630
|
+
W(f, (e) => {
|
|
1598
1631
|
if (!e) return;
|
|
1599
1632
|
let t = () => {
|
|
1600
1633
|
n.store.keyboardActive = !1;
|
|
@@ -1604,18 +1637,18 @@ function sn(t) {
|
|
|
1604
1637
|
return e.addEventListener("pointermove", t, !0), e.addEventListener("keydown", r, !0), () => {
|
|
1605
1638
|
e.removeEventListener("pointermove", t, !0), e.removeEventListener("keydown", r, !0);
|
|
1606
1639
|
};
|
|
1607
|
-
}),
|
|
1608
|
-
let e =
|
|
1640
|
+
}), J(() => {
|
|
1641
|
+
let e = Y(f);
|
|
1609
1642
|
n.store.listElement() === e && n.store.setListElement(null), !r && n.store.state.positionerElement === e && n.store.setPositionerElement(null);
|
|
1610
1643
|
});
|
|
1611
|
-
let g =
|
|
1644
|
+
let g = G(() => {
|
|
1612
1645
|
let e = t.children;
|
|
1613
|
-
return typeof e == "function" && !
|
|
1646
|
+
return typeof e == "function" && !Re(e) && !("$ll" in e) ? F(cn, { children: e }) : e;
|
|
1614
1647
|
}), _ = e(t, () => o(), (e) => (() => {
|
|
1615
|
-
var t =
|
|
1616
|
-
return
|
|
1648
|
+
var t = L(ln);
|
|
1649
|
+
return V(t, e, !1), z(), t;
|
|
1617
1650
|
})());
|
|
1618
|
-
return
|
|
1651
|
+
return F(_, R({
|
|
1619
1652
|
ref: [((e) => {
|
|
1620
1653
|
p(e), n.store.setListElement(e), r || n.store.setPositionerElement(e);
|
|
1621
1654
|
}), i.ref],
|
|
@@ -1645,8 +1678,8 @@ function sn(t) {
|
|
|
1645
1678
|
}
|
|
1646
1679
|
//#endregion
|
|
1647
1680
|
//#region src/combobox/utils/createInitialLiveRegionTextMutation.ts
|
|
1648
|
-
var
|
|
1649
|
-
function
|
|
1681
|
+
var dn = "";
|
|
1682
|
+
function fn(e) {
|
|
1650
1683
|
let t = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_TEXT), n = null;
|
|
1651
1684
|
for (; t.nextNode();) {
|
|
1652
1685
|
let e = t.currentNode;
|
|
@@ -1654,17 +1687,17 @@ function ln(e) {
|
|
|
1654
1687
|
}
|
|
1655
1688
|
return n;
|
|
1656
1689
|
}
|
|
1657
|
-
function
|
|
1690
|
+
function pn() {
|
|
1658
1691
|
if (typeof navigator > "u") return !1;
|
|
1659
1692
|
let e = navigator.platform.toLowerCase();
|
|
1660
1693
|
return /^i(os$|p)/.test(e) || e === "macintel" && navigator.maxTouchPoints > 1;
|
|
1661
1694
|
}
|
|
1662
|
-
function
|
|
1663
|
-
|
|
1664
|
-
if (!e ||
|
|
1665
|
-
let t =
|
|
1695
|
+
function mn(e) {
|
|
1696
|
+
W(e, (e) => {
|
|
1697
|
+
if (!e || pn()) return;
|
|
1698
|
+
let t = fn(e);
|
|
1666
1699
|
if (!t) return;
|
|
1667
|
-
let n = t.data, r = `${n}${
|
|
1700
|
+
let n = t.data, r = `${n}${dn}`;
|
|
1668
1701
|
t.nodeValue = r;
|
|
1669
1702
|
let i = () => {
|
|
1670
1703
|
t.nodeValue === r && (t.nodeValue = n);
|
|
@@ -1676,15 +1709,15 @@ function dn(e) {
|
|
|
1676
1709
|
}
|
|
1677
1710
|
//#endregion
|
|
1678
1711
|
//#region src/combobox/status/ComboboxStatus.tsx
|
|
1679
|
-
var
|
|
1680
|
-
function
|
|
1681
|
-
let n = t, r = t, i = {}, a =
|
|
1682
|
-
|
|
1712
|
+
var hn = /* @__PURE__ */ H("<div>");
|
|
1713
|
+
function gn(t) {
|
|
1714
|
+
let n = t, r = t, i = {}, a = G(() => m(t.class, i)), o = G(() => h(t.style, i)), s = q(r, "render", "class", "ref", "style"), [c, l] = K(null, { ownedWrite: !0 });
|
|
1715
|
+
mn(c);
|
|
1683
1716
|
let u = e(t, () => i, (e) => (() => {
|
|
1684
|
-
var t =
|
|
1685
|
-
return
|
|
1717
|
+
var t = L(hn);
|
|
1718
|
+
return V(t, e, !1), z(), t;
|
|
1686
1719
|
})());
|
|
1687
|
-
return
|
|
1720
|
+
return F(u, R({
|
|
1688
1721
|
ref: [((e) => l(e)), n.ref],
|
|
1689
1722
|
role: "status",
|
|
1690
1723
|
"aria-live": "polite",
|
|
@@ -1699,34 +1732,34 @@ function pn(t) {
|
|
|
1699
1732
|
}
|
|
1700
1733
|
//#endregion
|
|
1701
1734
|
//#region src/combobox/portal/ComboboxPortalContext.ts
|
|
1702
|
-
var
|
|
1703
|
-
function
|
|
1704
|
-
let e =
|
|
1705
|
-
if (e ===
|
|
1735
|
+
var _n = Symbol("ComboboxPortalContext"), vn = U(_n);
|
|
1736
|
+
function yn() {
|
|
1737
|
+
let e = Qe(vn);
|
|
1738
|
+
if (e === _n) throw Error("Base UI: <Combobox.Portal> is missing.");
|
|
1706
1739
|
return e;
|
|
1707
1740
|
}
|
|
1708
1741
|
//#endregion
|
|
1709
1742
|
//#region src/combobox/portal/ComboboxPortal.tsx
|
|
1710
|
-
function
|
|
1711
|
-
let t =
|
|
1712
|
-
return
|
|
1743
|
+
function bn(e) {
|
|
1744
|
+
let t = X(), n = e, r = e, i = G(() => n.keepMounted ?? !1), a = G(() => t.presence.mounted() || i() || t.store.forceMounted()), o = {}, s = G(() => m(e.class, o)), c = G(() => h(e.style, o)), l = q(r, "render", "class", "container", "keepMounted", "ref", "style");
|
|
1745
|
+
return F(Ye, {
|
|
1713
1746
|
get when() {
|
|
1714
1747
|
return a();
|
|
1715
1748
|
},
|
|
1716
1749
|
get children() {
|
|
1717
|
-
return
|
|
1750
|
+
return F(vn, {
|
|
1718
1751
|
get value() {
|
|
1719
|
-
return
|
|
1752
|
+
return Y(i);
|
|
1720
1753
|
},
|
|
1721
1754
|
get children() {
|
|
1722
|
-
return
|
|
1755
|
+
return F(ve, R({
|
|
1723
1756
|
get render() {
|
|
1724
1757
|
return e.render;
|
|
1725
1758
|
},
|
|
1726
1759
|
get container() {
|
|
1727
1760
|
return n.container;
|
|
1728
1761
|
},
|
|
1729
|
-
ref: (e) =>
|
|
1762
|
+
ref: (e) => be(n.ref, e),
|
|
1730
1763
|
get class() {
|
|
1731
1764
|
return s();
|
|
1732
1765
|
},
|
|
@@ -1743,19 +1776,19 @@ function _n(e) {
|
|
|
1743
1776
|
}
|
|
1744
1777
|
//#endregion
|
|
1745
1778
|
//#region src/combobox/backdrop/ComboboxBackdrop.tsx
|
|
1746
|
-
var
|
|
1747
|
-
function
|
|
1748
|
-
let r =
|
|
1779
|
+
var xn = /* @__PURE__ */ H("<div>");
|
|
1780
|
+
function Sn(n) {
|
|
1781
|
+
let r = X(), i = n, a = n, o = G(() => ({
|
|
1749
1782
|
open: r.store.open(),
|
|
1750
1783
|
transitionStatus: r.store.track().transitionStatus
|
|
1751
|
-
})), s =
|
|
1784
|
+
})), s = G(() => m(n.class, o())), c = G(() => He({
|
|
1752
1785
|
"user-select": "none",
|
|
1753
1786
|
"-webkit-user-select": "none"
|
|
1754
|
-
}, h(n.style, o()))), l =
|
|
1755
|
-
var t =
|
|
1756
|
-
return
|
|
1787
|
+
}, h(n.style, o()))), l = G(() => t(o(), Lt)), u = q(a, "render", "class", "ref", "style"), d = e(n, () => o(), (e) => (() => {
|
|
1788
|
+
var t = L(xn);
|
|
1789
|
+
return V(t, e, !1), z(), t;
|
|
1757
1790
|
})());
|
|
1758
|
-
return
|
|
1791
|
+
return F(d, R({
|
|
1759
1792
|
ref: [i.ref],
|
|
1760
1793
|
role: "presentation",
|
|
1761
1794
|
get hidden() {
|
|
@@ -1771,13 +1804,13 @@ function yn(n) {
|
|
|
1771
1804
|
}
|
|
1772
1805
|
//#endregion
|
|
1773
1806
|
//#region src/combobox/positioner/ComboboxPositioner.tsx
|
|
1774
|
-
var
|
|
1807
|
+
var Cn = /* @__PURE__ */ H("<div>"), wn = {
|
|
1775
1808
|
side: "flip",
|
|
1776
1809
|
align: "flip",
|
|
1777
1810
|
fallbackAxisSide: "none"
|
|
1778
1811
|
};
|
|
1779
|
-
function
|
|
1780
|
-
let r =
|
|
1812
|
+
function Tn(n) {
|
|
1813
|
+
let r = yn(), i = X(), a = we(), o = n, s = n, [c, l] = K(null, { ownedWrite: !0 }), u = G(() => En(o.anchor) ?? (i.store.inputInsidePopup() ? i.triggerElement() : i.inputGroupElement() ?? i.inputElement()) ?? null), d = ne({
|
|
1781
1814
|
reference: u,
|
|
1782
1815
|
floating: c,
|
|
1783
1816
|
mounted: () => i.presence.mounted() || r,
|
|
@@ -1792,25 +1825,25 @@ function Sn(n) {
|
|
|
1792
1825
|
arrowPadding: () => o.arrowPadding ?? 5,
|
|
1793
1826
|
sticky: () => o.sticky ?? !1,
|
|
1794
1827
|
disableAnchorTracking: () => o.disableAnchorTracking ?? !1,
|
|
1795
|
-
collisionAvoidance: () => o.collisionAvoidance ??
|
|
1796
|
-
}), f =
|
|
1828
|
+
collisionAvoidance: () => o.collisionAvoidance ?? wn
|
|
1829
|
+
}), f = G(() => ({
|
|
1797
1830
|
open: i.store.open(),
|
|
1798
1831
|
side: d.renderedSide(),
|
|
1799
1832
|
align: d.renderedAlign(),
|
|
1800
1833
|
anchorHidden: d.anchorHidden(),
|
|
1801
1834
|
empty: i.listEmpty()
|
|
1802
|
-
})), p =
|
|
1835
|
+
})), p = G(() => m(n.class, f())), g = G(() => He({
|
|
1803
1836
|
...d.styles(),
|
|
1804
1837
|
"pointer-events": i.store.open() ? void 0 : "none",
|
|
1805
1838
|
transition: i.store.track().transitionStatus === "starting" ? "none" : void 0
|
|
1806
|
-
}, h(n.style, f()))), _ =
|
|
1839
|
+
}, h(n.style, f()))), _ = G(() => t(f(), Nt)), v = q(s, "align", "alignOffset", "anchor", "arrowPadding", "render", "class", "collisionAvoidance", "collisionBoundary", "collisionPadding", "disableAnchorTracking", "positionMethod", "ref", "side", "sideOffset", "sticky", "style");
|
|
1807
1840
|
A({
|
|
1808
1841
|
enabled: () => i.store.open() && i.modal(),
|
|
1809
1842
|
touchOpen: () => i.store.openMethod() === "touch",
|
|
1810
1843
|
positioner: c,
|
|
1811
1844
|
reference: () => i.triggerElement() ?? i.inputElement()
|
|
1812
|
-
}),
|
|
1813
|
-
i.store.state.positionerElement ===
|
|
1845
|
+
}), W(d.renderedSide, (e) => i.store.setPopupSide(e)), J(() => {
|
|
1846
|
+
i.store.state.positionerElement === Y(c) && i.store.setPositionerElement(null);
|
|
1814
1847
|
});
|
|
1815
1848
|
let y = {
|
|
1816
1849
|
...d,
|
|
@@ -1819,9 +1852,9 @@ function Sn(n) {
|
|
|
1819
1852
|
};
|
|
1820
1853
|
function b() {
|
|
1821
1854
|
let e = null;
|
|
1822
|
-
return
|
|
1855
|
+
return J(() => {
|
|
1823
1856
|
i.internalBackdropElement() === e && i.setInternalBackdropElement(null);
|
|
1824
|
-
}),
|
|
1857
|
+
}), F(re, {
|
|
1825
1858
|
ref: (t) => {
|
|
1826
1859
|
e = t, i.setInternalBackdropElement(t);
|
|
1827
1860
|
},
|
|
@@ -1834,20 +1867,20 @@ function Sn(n) {
|
|
|
1834
1867
|
});
|
|
1835
1868
|
}
|
|
1836
1869
|
let x = e(n, () => f(), (e) => (() => {
|
|
1837
|
-
var t =
|
|
1838
|
-
return
|
|
1870
|
+
var t = L(Cn);
|
|
1871
|
+
return V(t, e, !1), z(), t;
|
|
1839
1872
|
})());
|
|
1840
|
-
return
|
|
1873
|
+
return F(Kt, {
|
|
1841
1874
|
value: y,
|
|
1842
1875
|
get children() {
|
|
1843
|
-
return [
|
|
1876
|
+
return [F(Ye, {
|
|
1844
1877
|
get when() {
|
|
1845
|
-
return
|
|
1878
|
+
return We(() => !!i.presence.mounted())() ? i.modal() : i.presence.mounted();
|
|
1846
1879
|
},
|
|
1847
1880
|
get children() {
|
|
1848
|
-
return
|
|
1881
|
+
return F(b, {});
|
|
1849
1882
|
}
|
|
1850
|
-
}),
|
|
1883
|
+
}), F(x, R({
|
|
1851
1884
|
ref: [((e) => {
|
|
1852
1885
|
l(e), i.store.setPositionerElement(e);
|
|
1853
1886
|
}), o.ref],
|
|
@@ -1868,14 +1901,14 @@ function Sn(n) {
|
|
|
1868
1901
|
}
|
|
1869
1902
|
});
|
|
1870
1903
|
}
|
|
1871
|
-
function
|
|
1904
|
+
function En(e) {
|
|
1872
1905
|
return typeof e == "function" ? e() : e && "current" in e ? e.current : e;
|
|
1873
1906
|
}
|
|
1874
1907
|
//#endregion
|
|
1875
1908
|
//#region src/combobox/popup/ComboboxPopup.tsx
|
|
1876
|
-
var
|
|
1877
|
-
function
|
|
1878
|
-
let r =
|
|
1909
|
+
var Dn = /* @__PURE__ */ H("<div>");
|
|
1910
|
+
function On(n) {
|
|
1911
|
+
let r = X(), i = Q(), a = n, o = n, s = G(() => a.id ?? (r.store.inputInsidePopup() ? jt(r.id()) : void 0)), c = G(() => ({
|
|
1879
1912
|
open: r.store.open(),
|
|
1880
1913
|
side: i.side(),
|
|
1881
1914
|
align: i.align(),
|
|
@@ -1883,20 +1916,20 @@ function Tn(n) {
|
|
|
1883
1916
|
transitionStatus: r.store.track().transitionStatus,
|
|
1884
1917
|
empty: r.listEmpty(),
|
|
1885
1918
|
instant: r.store.track().instantType
|
|
1886
|
-
})), l =
|
|
1919
|
+
})), l = G(() => m(n.class, c())), u = G(() => He({ transition: c().transitionStatus === "starting" ? "none" : void 0 }, h(n.style, c()))), d = G(() => t(c(), Pt)), f = q(o, "render", "class", "finalFocus", "id", "initialFocus", "onFocus", "ref", "style"), p = G(() => !r.store.inputInsidePopup() || r.modal()), g = G(() => a.initialFocus === void 0 ? r.store.inputInsidePopup() ? (e) => e === "touch" ? r.store.track().popupElement : r.inputElement() : !1 : a.initialFocus), _ = G(() => a.finalFocus == null ? !!r.store.inputInsidePopup() : a.finalFocus);
|
|
1887
1920
|
function v(e) {
|
|
1888
1921
|
let t = e.target;
|
|
1889
|
-
r.store.openMethod() !== "touch" && (
|
|
1922
|
+
r.store.openMethod() !== "touch" && (S(r.store.listElement(), t) || t === e.currentTarget) && r.focusInput();
|
|
1890
1923
|
}
|
|
1891
1924
|
let y = null;
|
|
1892
|
-
|
|
1925
|
+
W(s, (e) => (r.store.setPopupId(y?.id || e), () => r.store.setPopupId(void 0))), J(() => {
|
|
1893
1926
|
r.store.state.popupElement === y && r.store.setPopupElement(null);
|
|
1894
1927
|
});
|
|
1895
1928
|
let b = e(n, () => c(), (e) => (() => {
|
|
1896
|
-
var t =
|
|
1897
|
-
return
|
|
1929
|
+
var t = L(Dn);
|
|
1930
|
+
return V(t, e, !1), z(), t;
|
|
1898
1931
|
})());
|
|
1899
|
-
return
|
|
1932
|
+
return F(ye, {
|
|
1900
1933
|
get context() {
|
|
1901
1934
|
return r.store.context.floatingRoot;
|
|
1902
1935
|
},
|
|
@@ -1924,7 +1957,7 @@ function Tn(n) {
|
|
|
1924
1957
|
referenceElement: () => r.store.inputInsidePopup() ? r.triggerElement() : r.inputElement(),
|
|
1925
1958
|
getInsideElements: () => [r.store.startDismissElement, r.store.endDismissElement],
|
|
1926
1959
|
get children() {
|
|
1927
|
-
return [
|
|
1960
|
+
return [F(b, R({
|
|
1928
1961
|
ref: [((e) => {
|
|
1929
1962
|
y = e, r.store.setPopupElement(e);
|
|
1930
1963
|
}), a.ref],
|
|
@@ -1948,13 +1981,13 @@ function Tn(n) {
|
|
|
1948
1981
|
return a.onFocus;
|
|
1949
1982
|
},
|
|
1950
1983
|
onFocusIn: v
|
|
1951
|
-
}, d, f)),
|
|
1984
|
+
}, d, f)), F(Ye, {
|
|
1952
1985
|
get when() {
|
|
1953
1986
|
return p();
|
|
1954
1987
|
},
|
|
1955
1988
|
get children() {
|
|
1956
|
-
return
|
|
1957
|
-
|
|
1989
|
+
return F(Yt, { ref: (e) => {
|
|
1990
|
+
Y(() => {
|
|
1958
1991
|
r.store.endDismissElement = e;
|
|
1959
1992
|
});
|
|
1960
1993
|
} });
|
|
@@ -1965,22 +1998,22 @@ function Tn(n) {
|
|
|
1965
1998
|
}
|
|
1966
1999
|
//#endregion
|
|
1967
2000
|
//#region src/combobox/arrow/ComboboxArrow.tsx
|
|
1968
|
-
var
|
|
1969
|
-
function
|
|
1970
|
-
let r =
|
|
2001
|
+
var kn = /* @__PURE__ */ H("<div>");
|
|
2002
|
+
function An(n) {
|
|
2003
|
+
let r = X(), i = Q(), a = n, o = n, s = G(() => ({
|
|
1971
2004
|
open: r.store.open(),
|
|
1972
2005
|
side: i.side(),
|
|
1973
2006
|
align: i.align(),
|
|
1974
2007
|
uncentered: i.arrowUncentered()
|
|
1975
|
-
})), c =
|
|
1976
|
-
|
|
2008
|
+
})), c = G(() => m(n.class, s())), l = G(() => He(i.arrowStyles(), h(n.style, s()))), u = G(() => t(s(), _e)), d = q(o, "render", "class", "ref", "style"), f = null;
|
|
2009
|
+
J(() => {
|
|
1977
2010
|
f && i.setArrowElement(null);
|
|
1978
2011
|
});
|
|
1979
2012
|
let p = e(n, () => s(), (e) => (() => {
|
|
1980
|
-
var t =
|
|
1981
|
-
return
|
|
2013
|
+
var t = L(kn);
|
|
2014
|
+
return V(t, e, !1), z(), t;
|
|
1982
2015
|
})());
|
|
1983
|
-
return
|
|
2016
|
+
return F(p, R({
|
|
1984
2017
|
ref: [((e) => {
|
|
1985
2018
|
f = e, i.setArrowElement(e);
|
|
1986
2019
|
}), a.ref],
|
|
@@ -1995,30 +2028,30 @@ function Dn(n) {
|
|
|
1995
2028
|
}
|
|
1996
2029
|
//#endregion
|
|
1997
2030
|
//#region src/combobox/group/ComboboxGroupContext.ts
|
|
1998
|
-
var
|
|
1999
|
-
function
|
|
2000
|
-
let e =
|
|
2001
|
-
if (e ===
|
|
2031
|
+
var jn = Symbol("ComboboxGroupContext"), Mn = U(jn);
|
|
2032
|
+
function Nn() {
|
|
2033
|
+
let e = Qe(Mn);
|
|
2034
|
+
if (e === jn) throw Error("Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.");
|
|
2002
2035
|
return e;
|
|
2003
2036
|
}
|
|
2004
2037
|
//#endregion
|
|
2005
2038
|
//#region src/combobox/group/ComboboxGroup.tsx
|
|
2006
|
-
var
|
|
2007
|
-
function
|
|
2008
|
-
let n =
|
|
2009
|
-
var t =
|
|
2010
|
-
return
|
|
2039
|
+
var Pn = /* @__PURE__ */ H("<div>");
|
|
2040
|
+
function Fn(t) {
|
|
2041
|
+
let n = X(), r = t, i = t, [a, o] = K(void 0, { ownedWrite: !0 }), s = {}, c = G(() => m(t.class, s)), l = G(() => h(t.style, s)), u = q(i, "render", "class", "items", "ref", "style"), d = e(t, () => s, (e) => (() => {
|
|
2042
|
+
var t = L(Pn);
|
|
2043
|
+
return V(t, e, !1), z(), t;
|
|
2011
2044
|
})());
|
|
2012
|
-
return
|
|
2045
|
+
return F(yt, {
|
|
2013
2046
|
value: { items: () => r.items },
|
|
2014
2047
|
get children() {
|
|
2015
|
-
return
|
|
2048
|
+
return F(Mn, {
|
|
2016
2049
|
value: {
|
|
2017
2050
|
labelId: a,
|
|
2018
2051
|
setLabelId: o
|
|
2019
2052
|
},
|
|
2020
2053
|
get children() {
|
|
2021
|
-
return
|
|
2054
|
+
return F(d, R({
|
|
2022
2055
|
ref: [r.ref],
|
|
2023
2056
|
get role() {
|
|
2024
2057
|
return n.grid() ? "rowgroup" : "group";
|
|
@@ -2040,17 +2073,17 @@ function Mn(t) {
|
|
|
2040
2073
|
}
|
|
2041
2074
|
//#endregion
|
|
2042
2075
|
//#region src/combobox/group-label/ComboboxGroupLabel.tsx
|
|
2043
|
-
var
|
|
2044
|
-
function
|
|
2045
|
-
let n =
|
|
2046
|
-
|
|
2076
|
+
var In = /* @__PURE__ */ H("<div>");
|
|
2077
|
+
function Ln(t) {
|
|
2078
|
+
let n = Nn(), r = t, i = t, a = `base-ui-${Xe()}`, o = G(() => r.id ?? a), s = {}, c = G(() => m(t.class, s)), l = G(() => h(t.style, s)), u = q(i, "render", "class", "id", "ref", "style");
|
|
2079
|
+
W(o, (e) => (n.setLabelId(e), () => {
|
|
2047
2080
|
n.labelId() === e && n.setLabelId(void 0);
|
|
2048
2081
|
}));
|
|
2049
2082
|
let d = e(t, () => s, (e) => (() => {
|
|
2050
|
-
var t =
|
|
2051
|
-
return
|
|
2083
|
+
var t = L(In);
|
|
2084
|
+
return V(t, e, !1), z(), t;
|
|
2052
2085
|
})());
|
|
2053
|
-
return
|
|
2086
|
+
return F(d, R({
|
|
2054
2087
|
ref: [r.ref],
|
|
2055
2088
|
get id() {
|
|
2056
2089
|
return o();
|
|
@@ -2066,42 +2099,40 @@ function Pn(t) {
|
|
|
2066
2099
|
}
|
|
2067
2100
|
//#endregion
|
|
2068
2101
|
//#region src/combobox/row/ComboboxRowContext.ts
|
|
2069
|
-
var
|
|
2070
|
-
function
|
|
2071
|
-
return
|
|
2102
|
+
var Rn = U(!1);
|
|
2103
|
+
function zn() {
|
|
2104
|
+
return Qe(Rn);
|
|
2072
2105
|
}
|
|
2073
2106
|
//#endregion
|
|
2074
2107
|
//#region src/combobox/item/ComboboxItemContext.ts
|
|
2075
|
-
var
|
|
2076
|
-
function
|
|
2077
|
-
let e =
|
|
2078
|
-
if (e ===
|
|
2108
|
+
var Bn = Symbol("ComboboxItemContext"), Vn = U(Bn);
|
|
2109
|
+
function Hn() {
|
|
2110
|
+
let e = Qe(Vn);
|
|
2111
|
+
if (e === Bn) throw Error("Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.");
|
|
2079
2112
|
return e;
|
|
2080
2113
|
}
|
|
2081
2114
|
//#endregion
|
|
2082
2115
|
//#region src/combobox/item/ComboboxItem.tsx
|
|
2083
|
-
var
|
|
2084
|
-
function
|
|
2085
|
-
let r =
|
|
2116
|
+
var Un = /* @__PURE__ */ H("<div>");
|
|
2117
|
+
function Wn(n) {
|
|
2118
|
+
let r = X(), i = zn(), a = n, o = n, s = Symbol("ComboboxItem"), [c, l] = K(null, { ownedWrite: !0 }), u = G(() => a.value ?? null), d = G(() => r.disabled() || (a.disabled ?? !1)), f = G(() => a.nativeButton ?? !1), p = G(() => r.selectionMode() !== "none"), g = G(() => {
|
|
2086
2119
|
if (a.index != null) return a.index;
|
|
2087
|
-
if (
|
|
2088
|
-
let e = Pe(r.itemValues(), u(), r.comparator());
|
|
2089
|
-
return e === -1 ? void 0 : e;
|
|
2120
|
+
if (r.virtualized()) return je(r.itemValues(), u(), r.comparator());
|
|
2090
2121
|
}), _ = r.store.collection.register({
|
|
2091
2122
|
token: s,
|
|
2092
2123
|
element: c,
|
|
2093
2124
|
value: u,
|
|
2094
2125
|
index: g,
|
|
2095
2126
|
disabled: d
|
|
2096
|
-
}), v =
|
|
2127
|
+
}), v = G(() => g() ?? r.store.collection.indexOf(s)), x = G(() => v() !== -1), ee = G(() => x() ? `${r.id()}-${v()}` : void 0), te = G(() => {
|
|
2097
2128
|
if (!p()) return !1;
|
|
2098
2129
|
let e = r.selectedValue();
|
|
2099
|
-
return Array.isArray(e) ? Me(e, u(), r.comparator()) :
|
|
2100
|
-
}), S =
|
|
2130
|
+
return r.multiple() && Array.isArray(e) ? Me(e, u(), r.comparator()) : Ie(u(), e, r.comparator());
|
|
2131
|
+
}), S = G(() => r.store.activeIndex() === v()), C = G(() => ({
|
|
2101
2132
|
disabled: d(),
|
|
2102
|
-
selected:
|
|
2133
|
+
selected: te(),
|
|
2103
2134
|
highlighted: S()
|
|
2104
|
-
})), w =
|
|
2135
|
+
})), w = G(() => m(n.class, C())), T = G(() => h(n.style, C())), E = G(() => t(C())), D = q(o, "render", "class", "disabled", "id", "index", "nativeButton", "onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerLeave", "onPointerMove", "ref", "style", "value");
|
|
2105
2136
|
function O(e) {
|
|
2106
2137
|
if (r.submitOnItemClick()) {
|
|
2107
2138
|
r.handleSelection(e, u()), Ze(), r.requestSubmit();
|
|
@@ -2109,59 +2140,59 @@ function Vn(n) {
|
|
|
2109
2140
|
}
|
|
2110
2141
|
r.handleSelection(e, u());
|
|
2111
2142
|
}
|
|
2112
|
-
function
|
|
2143
|
+
function k(e) {
|
|
2113
2144
|
e.isPrimary && (r.store.pointerDownItem = e.currentTarget), e.preventDefault();
|
|
2114
2145
|
}
|
|
2115
|
-
function
|
|
2146
|
+
function ne(e) {
|
|
2116
2147
|
e.preventDefault();
|
|
2117
2148
|
}
|
|
2118
|
-
function
|
|
2149
|
+
function re(e) {
|
|
2119
2150
|
d() || r.readOnly() || O(e);
|
|
2120
2151
|
}
|
|
2121
2152
|
function A(e) {
|
|
2122
2153
|
let t = r.store.pointerDownItem === e.currentTarget;
|
|
2123
2154
|
r.store.pointerDownItem = null, !(d() || r.readOnly() || e.button !== 0 || t || !S()) && O(e);
|
|
2124
2155
|
}
|
|
2125
|
-
function re(e) {
|
|
2126
|
-
e.pointerType !== "touch" && (r.store.keyboardActive = !1, !d() && r.listNavigation.onItemPointerMove(e, v()));
|
|
2127
|
-
}
|
|
2128
2156
|
function ie(e) {
|
|
2157
|
+
e.pointerType !== "touch" && (r.store.keyboardActive = !1, !(d() || !x()) && r.listNavigation.onItemPointerMove(e, v()));
|
|
2158
|
+
}
|
|
2159
|
+
function ae(e) {
|
|
2129
2160
|
r.keepHighlight() || r.listNavigation.onItemPointerLeave(e);
|
|
2130
2161
|
}
|
|
2131
|
-
let
|
|
2132
|
-
|
|
2133
|
-
registered:
|
|
2162
|
+
let oe = y(b(() => Y(() => d() ? Ce : void 0)), b(() => a.onClick), re), se = y(b(() => a.onMouseDown), ne), ce = y(b(() => a.onMouseUp), A), le = y(b(() => a.onPointerDown), k), ue = y(b(() => a.onPointerMove), ie), de = y(b(() => a.onPointerLeave), ae);
|
|
2163
|
+
W(() => ({
|
|
2164
|
+
registered: x(),
|
|
2134
2165
|
hasItems: r.hasItems(),
|
|
2135
2166
|
index: v(),
|
|
2136
2167
|
value: u(),
|
|
2137
2168
|
selected: r.selectedValue(),
|
|
2138
2169
|
compare: r.comparator()
|
|
2139
2170
|
}), (e) => {
|
|
2140
|
-
!e.registered || e.hasItems ||
|
|
2141
|
-
}),
|
|
2142
|
-
let
|
|
2143
|
-
selected:
|
|
2171
|
+
!e.registered || e.hasItems || Y(() => r.store.setSelectedIndex(Fe(r.store.collection.values(), e.selected, e.compare, r.multiple())));
|
|
2172
|
+
}), W(c, () => r.store.collection.touch()), J(_);
|
|
2173
|
+
let fe = {
|
|
2174
|
+
selected: te,
|
|
2144
2175
|
index: v
|
|
2145
|
-
},
|
|
2146
|
-
var t =
|
|
2147
|
-
return
|
|
2176
|
+
}, pe = e(n, () => C(), (e) => (() => {
|
|
2177
|
+
var t = L(Un);
|
|
2178
|
+
return V(t, e, !1), z(), t;
|
|
2148
2179
|
})());
|
|
2149
|
-
return
|
|
2150
|
-
value:
|
|
2180
|
+
return F(Vn, {
|
|
2181
|
+
value: fe,
|
|
2151
2182
|
get children() {
|
|
2152
|
-
return
|
|
2183
|
+
return F(pe, R({
|
|
2153
2184
|
ref: [((e) => {
|
|
2154
2185
|
l(e), r.store.collection.touch();
|
|
2155
2186
|
}), a.ref],
|
|
2156
2187
|
get id() {
|
|
2157
|
-
return
|
|
2188
|
+
return ee();
|
|
2158
2189
|
},
|
|
2159
2190
|
get type() {
|
|
2160
2191
|
return f() ? "button" : void 0;
|
|
2161
2192
|
},
|
|
2162
2193
|
role: i ? "gridcell" : "option",
|
|
2163
2194
|
get "aria-selected"() {
|
|
2164
|
-
return
|
|
2195
|
+
return We(() => !!p())() ? te() ? "true" : "false" : void 0;
|
|
2165
2196
|
},
|
|
2166
2197
|
get "aria-disabled"() {
|
|
2167
2198
|
return d() ? "true" : void 0;
|
|
@@ -2172,28 +2203,28 @@ function Vn(n) {
|
|
|
2172
2203
|
get style() {
|
|
2173
2204
|
return T();
|
|
2174
2205
|
},
|
|
2175
|
-
onClick:
|
|
2176
|
-
onMouseDown:
|
|
2177
|
-
onMouseUp:
|
|
2178
|
-
onPointerDown:
|
|
2179
|
-
onPointerLeave:
|
|
2180
|
-
onPointerMove:
|
|
2206
|
+
onClick: oe,
|
|
2207
|
+
onMouseDown: se,
|
|
2208
|
+
onMouseUp: ce,
|
|
2209
|
+
onPointerDown: le,
|
|
2210
|
+
onPointerLeave: de,
|
|
2211
|
+
onPointerMove: ue
|
|
2181
2212
|
}, E, D));
|
|
2182
2213
|
}
|
|
2183
2214
|
});
|
|
2184
2215
|
}
|
|
2185
2216
|
//#endregion
|
|
2186
2217
|
//#region src/combobox/row/ComboboxRow.tsx
|
|
2187
|
-
var
|
|
2188
|
-
function
|
|
2189
|
-
let n = t, r = t, i = {}, a =
|
|
2190
|
-
var t =
|
|
2191
|
-
return
|
|
2218
|
+
var Gn = /* @__PURE__ */ H("<div>");
|
|
2219
|
+
function Kn(t) {
|
|
2220
|
+
let n = t, r = t, i = {}, a = G(() => m(t.class, i)), o = G(() => h(t.style, i)), s = q(r, "render", "class", "ref", "style"), c = e(t, () => i, (e) => (() => {
|
|
2221
|
+
var t = L(Gn);
|
|
2222
|
+
return V(t, e, !1), z(), t;
|
|
2192
2223
|
})());
|
|
2193
|
-
return
|
|
2224
|
+
return F(Rn, {
|
|
2194
2225
|
value: !0,
|
|
2195
2226
|
get children() {
|
|
2196
|
-
return
|
|
2227
|
+
return F(c, R({
|
|
2197
2228
|
ref: [n.ref],
|
|
2198
2229
|
role: "row",
|
|
2199
2230
|
get class() {
|
|
@@ -2208,17 +2239,17 @@ function Un(t) {
|
|
|
2208
2239
|
}
|
|
2209
2240
|
//#endregion
|
|
2210
2241
|
//#region src/combobox/empty/ComboboxEmpty.tsx
|
|
2211
|
-
var
|
|
2212
|
-
function
|
|
2213
|
-
let n =
|
|
2214
|
-
|
|
2242
|
+
var qn = /* @__PURE__ */ H("<div>");
|
|
2243
|
+
function Jn(t) {
|
|
2244
|
+
let n = X(), r = t, i = t, a = {}, o = G(() => m(t.class, a)), s = G(() => h(t.style, a)), c = q(i, "render", "children", "class", "ref", "style"), [l, u] = K(null, { ownedWrite: !0 });
|
|
2245
|
+
mn(l), J(() => {
|
|
2215
2246
|
n.store.emptyElement === l() && (n.store.emptyElement = null);
|
|
2216
2247
|
});
|
|
2217
2248
|
let d = e(t, () => a, (e) => (() => {
|
|
2218
|
-
var t =
|
|
2219
|
-
return
|
|
2249
|
+
var t = L(qn);
|
|
2250
|
+
return V(t, e, !1), z(), t;
|
|
2220
2251
|
})());
|
|
2221
|
-
return
|
|
2252
|
+
return F(d, R({
|
|
2222
2253
|
ref: [((e) => {
|
|
2223
2254
|
u(e), n.store.emptyElement = e;
|
|
2224
2255
|
}), r.ref],
|
|
@@ -2232,7 +2263,7 @@ function Gn(t) {
|
|
|
2232
2263
|
return s();
|
|
2233
2264
|
}
|
|
2234
2265
|
}, c, { get children() {
|
|
2235
|
-
return
|
|
2266
|
+
return F(Ye, {
|
|
2236
2267
|
get when() {
|
|
2237
2268
|
return n.listEmpty();
|
|
2238
2269
|
},
|
|
@@ -2244,13 +2275,13 @@ function Gn(t) {
|
|
|
2244
2275
|
}
|
|
2245
2276
|
//#endregion
|
|
2246
2277
|
//#region src/combobox/separator/ComboboxSeparator.tsx
|
|
2247
|
-
var
|
|
2248
|
-
function
|
|
2249
|
-
let r = n, i = n, a =
|
|
2250
|
-
var t =
|
|
2251
|
-
return
|
|
2278
|
+
var Yn = /* @__PURE__ */ H("<div>");
|
|
2279
|
+
function Xn(n) {
|
|
2280
|
+
let r = n, i = n, a = G(() => r.orientation ?? "horizontal"), o = G(() => ({ orientation: a() })), s = G(() => m(n.class, o())), c = G(() => h(n.style, o())), l = G(() => t(o())), u = q(i, "render", "class", "orientation", "ref", "style"), d = e(n, () => o(), (e) => (() => {
|
|
2281
|
+
var t = L(Yn);
|
|
2282
|
+
return V(t, e, !1), z(), t;
|
|
2252
2283
|
})());
|
|
2253
|
-
return
|
|
2284
|
+
return F(d, R({
|
|
2254
2285
|
ref: [r.ref],
|
|
2255
2286
|
role: "presentation",
|
|
2256
2287
|
get class() {
|
|
@@ -2263,8 +2294,8 @@ function qn(n) {
|
|
|
2263
2294
|
}
|
|
2264
2295
|
//#endregion
|
|
2265
2296
|
//#region src/combobox/root/utils/useFilteredItems.ts
|
|
2266
|
-
function
|
|
2267
|
-
return
|
|
2297
|
+
function Zn() {
|
|
2298
|
+
return X().filteredItems;
|
|
2268
2299
|
}
|
|
2269
2300
|
//#endregion
|
|
2270
|
-
export {
|
|
2301
|
+
export { dt as A, Zt as C, Bt as D, Wt as E, at as F, it as M, ct as N, Dt as O, st as P, Xt as S, Ut as T, sn as _, Wn as a, tn as b, Fn as c, Tn as d, Sn as f, cn as g, un as h, Kn as i, rt as j, X as k, An as l, gn as m, Xn as n, Hn as o, bn as p, Jn as r, Ln as s, Zn as t, On as u, an as v, Vt as w, $t as x, $ as y };
|