solid-baseui 0.1.0-alpha.1 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/README.md +51 -20
- 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 +1 -1
- 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
|
@@ -3,17 +3,17 @@ import { t as useRender } from "../useRender-CryVdCjs.js";
|
|
|
3
3
|
import { getStateAttributesProps } from "../internals/getStateAttributesProps.js";
|
|
4
4
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
5
5
|
import { transitionStatusMapping } from "../internals/stateAttributesMapping.js";
|
|
6
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
6
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
7
7
|
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-CYq38H8J.js";
|
|
8
8
|
import { t as createTransitionStatus } from "../createTransitionStatus-184v7j3-.js";
|
|
9
9
|
import { DEFAULT_VALIDITY_DATA, DEFAULT_VALIDITY_STATE, VALIDITY_KEYS, copyNativeValidity, fieldStateAttributesMapping } from "../internals/field-constants.js";
|
|
10
|
-
import { n as
|
|
10
|
+
import { n as FieldRootContext, r as useFieldRootContext } from "../FieldRootContext-Bfpna6gA.js";
|
|
11
11
|
import { n as useFormContext } from "../FormContext-CYwo_ZnB.js";
|
|
12
12
|
import { n as createLabelableContext, r as useLabelableContext, t as LabelableContext } from "../LabelableContext-BTeF0IWb.js";
|
|
13
13
|
import { n as useFieldItemContext, t as FieldItemContext } from "../FieldItemContext-x-C7ZlmX.js";
|
|
14
14
|
import { n as useFieldsetRootContext } from "../FieldsetRootContext-DyNqCjK6.js";
|
|
15
15
|
import { t as hasFormError } from "../form-types-P7-SCWyr.js";
|
|
16
|
-
import { t as FieldControl } from "../FieldControl-
|
|
16
|
+
import { t as FieldControl } from "../FieldControl-CDMMyvuj.js";
|
|
17
17
|
import { escape, memo, mergeProps, ssr, ssrElement, ssrHydrationKey } from "@solidjs/web";
|
|
18
18
|
import { For, Show, createEffect, createMemo, createSignal, createUniqueId, omit, onCleanup, onSettled, untrack } from "solid-js";
|
|
19
19
|
//#region src/field/root/createFieldValidation.ts
|
|
@@ -394,9 +394,9 @@ function FieldLabel(props) {
|
|
|
394
394
|
const Render = useRender(props, () => state(), (props) => ssrElement("label", props, void 0, true));
|
|
395
395
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
396
396
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), fieldStateAttributesMapping));
|
|
397
|
-
const callExternalClick = composeEventHandlers(() => internalProps.onClick);
|
|
398
|
-
const callExternalMouseDown = composeEventHandlers(() => internalProps.onMouseDown);
|
|
399
|
-
const callExternalPointerDown = composeEventHandlers(() => internalProps.onPointerDown);
|
|
397
|
+
const callExternalClick = composeEventHandlers(liveEventHandler(() => internalProps.onClick));
|
|
398
|
+
const callExternalMouseDown = composeEventHandlers(liveEventHandler(() => internalProps.onMouseDown));
|
|
399
|
+
const callExternalPointerDown = composeEventHandlers(liveEventHandler(() => internalProps.onPointerDown));
|
|
400
400
|
function isInteractiveTarget(target) {
|
|
401
401
|
return target instanceof Element && Boolean(target.closest("button,input,select,textarea"));
|
|
402
402
|
}
|
|
@@ -2,7 +2,7 @@ import { t as useRender } from "../useRender-CryVdCjs.js";
|
|
|
2
2
|
import { w as none } from "../internals/reasons.js";
|
|
3
3
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
4
4
|
import { createGenericEventDetails } from "../internals/createBaseUIEventDetails.js";
|
|
5
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
5
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
6
6
|
import { t as FormContext } from "../FormContext-CYwo_ZnB.js";
|
|
7
7
|
import { t as hasFormError } from "../form-types-P7-SCWyr.js";
|
|
8
8
|
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
@@ -73,7 +73,7 @@ function Form(props) {
|
|
|
73
73
|
}
|
|
74
74
|
for (const field of fields.values()) field.validate();
|
|
75
75
|
} };
|
|
76
|
-
const callExternalSubmit = composeEventHandlers(() => internalProps.onSubmit);
|
|
76
|
+
const callExternalSubmit = composeEventHandlers(liveEventHandler(() => internalProps.onSubmit));
|
|
77
77
|
function handleSubmit(event) {
|
|
78
78
|
submitAttempted = true;
|
|
79
79
|
submitCount += 1;
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
//#region src/internals/composeEventHandlers.ts
|
|
2
2
|
/**
|
|
3
|
-
* Composes
|
|
3
|
+
* Composes handlers in argument order, enhancing the native event before dispatch. Calling
|
|
4
4
|
* `event.preventBaseUIHandler()` prevents the remaining handlers from running.
|
|
5
|
+
* Use `liveEventHandler` for replaceable callback props instead of snapshotting them.
|
|
5
6
|
*/
|
|
6
|
-
function composeEventHandlers(...
|
|
7
|
+
function composeEventHandlers(...handlers) {
|
|
7
8
|
return function composedEventHandler(event) {
|
|
8
9
|
const baseEvent = makeEventPreventable(event);
|
|
9
|
-
for (
|
|
10
|
-
|
|
10
|
+
for (let handler of handlers) {
|
|
11
|
+
if (handler && typeof handler === "object" && "getHandler" in handler) {
|
|
12
|
+
const getHandler = handler.getHandler;
|
|
13
|
+
handler = getHandler();
|
|
14
|
+
}
|
|
15
|
+
callHandler(handler, this, baseEvent);
|
|
11
16
|
if (baseEvent.baseUIHandlerPrevented) break;
|
|
12
17
|
}
|
|
13
18
|
};
|
|
14
19
|
}
|
|
20
|
+
/** Resolves a replaceable handler at dispatch time; pass the adapter to `composeEventHandlers`. */
|
|
21
|
+
function liveEventHandler(getHandler) {
|
|
22
|
+
return { getHandler };
|
|
23
|
+
}
|
|
15
24
|
function callHandler(handler, receiver, event) {
|
|
16
25
|
if (typeof handler === "function") Reflect.apply(handler, receiver, [event]);
|
|
17
|
-
else if (
|
|
18
|
-
}
|
|
19
|
-
function isBoundHandler(handler) {
|
|
20
|
-
return Array.isArray(handler) && handler.length === 2 && typeof handler[0] === "function";
|
|
26
|
+
else if (Array.isArray(handler) && handler.length === 2 && typeof handler[0] === "function") Reflect.apply(handler[0], receiver, [handler[1], event]);
|
|
21
27
|
}
|
|
22
28
|
function makeEventPreventable(event) {
|
|
23
29
|
const baseEvent = event;
|
|
@@ -57,4 +63,4 @@ function setHandlerPrevented(event) {
|
|
|
57
63
|
});
|
|
58
64
|
}
|
|
59
65
|
//#endregion
|
|
60
|
-
export { composeEventHandlers, makeEventPreventable };
|
|
66
|
+
export { composeEventHandlers, liveEventHandler, makeEventPreventable };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as
|
|
1
|
+
import { n as FieldRootContext, r as useFieldRootContext } from "../../FieldRootContext-Bfpna6gA.js";
|
|
2
2
|
export { FieldRootContext, useFieldRootContext };
|
|
@@ -50,23 +50,4 @@ function isSolidAccessor(value) {
|
|
|
50
50
|
return typeof value === "function" && value.name === "bound read" && Object.prototype.hasOwnProperty.call(value, $REFRESH);
|
|
51
51
|
}
|
|
52
52
|
//#endregion
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Merges functional styles a part owns with the caller's `style` value, which wins.
|
|
56
|
-
*
|
|
57
|
-
* Unlike `mergeStyles` this accepts the resolved `StyleValue` shape, where a caller may pass a
|
|
58
|
-
* CSS string; the internal object is serialized ahead of it so the string still overrides.
|
|
59
|
-
*/
|
|
60
|
-
function mergeStyleValue(internal, external) {
|
|
61
|
-
if (typeof external === "string") return `${serializeStyle(internal)}${external}`;
|
|
62
|
-
if (!external) return internal;
|
|
63
|
-
return {
|
|
64
|
-
...internal,
|
|
65
|
-
...external
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function serializeStyle(style) {
|
|
69
|
-
return Object.entries(style).filter((entry) => entry[1] != null).map(([property, value]) => `${property}:${value};`).join("");
|
|
70
|
-
}
|
|
71
|
-
//#endregion
|
|
72
|
-
export { defaultItemEquality as a, removeItem as c, compareItemEquality as i, selectedValueIncludes as l, isSolidAccessor as n, findItemIndex as o, areItemArraysEqual as r, findSelectionIndex as s, mergeStyleValue as t };
|
|
53
|
+
export { findItemIndex as a, selectedValueIncludes as c, defaultItemEquality as i, areItemArraysEqual as n, findSelectionIndex as o, compareItemEquality as r, removeItem as s, isSolidAccessor as t };
|
|
@@ -4,17 +4,17 @@ import { getStateAttributesProps } from "../internals/getStateAttributesProps.js
|
|
|
4
4
|
import { N as triggerPress, j as triggerFocus, t as cancelOpen, u as focusOut } from "../internals/reasons.js";
|
|
5
5
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
6
6
|
import { createChangeEventDetails } from "../internals/createBaseUIEventDetails.js";
|
|
7
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
8
|
-
import { n as contains } from "../dom-
|
|
9
|
-
import { t as PopupViewport } from "../PopupViewport-
|
|
10
|
-
import { n as createTriggerRegistration } from "../PopupStore-
|
|
11
|
-
import { r as createHoverInteraction, t as safePolygon } from "../safePolygon-
|
|
12
|
-
import { i as pressableTriggerOpenStateMapping } from "../popupStateMapping-
|
|
13
|
-
import { i as createPopupHandleStore, n as DetachedPopupStore, t as BasePopupHandle } from "../PopupHandle-
|
|
14
|
-
import { t as TriggerFocusGuards } from "../TriggerFocusGuards-
|
|
7
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
8
|
+
import { n as contains } from "../dom-D8_aB1yy.js";
|
|
9
|
+
import { t as PopupViewport } from "../PopupViewport-BDttjORN.js";
|
|
10
|
+
import { n as createTriggerRegistration } from "../PopupStore-evylvVnN.js";
|
|
11
|
+
import { r as createHoverInteraction, t as safePolygon } from "../safePolygon-B8QtiIZ3.js";
|
|
12
|
+
import { i as pressableTriggerOpenStateMapping } from "../popupStateMapping-VHqr6M4H.js";
|
|
13
|
+
import { i as createPopupHandleStore, n as DetachedPopupStore, t as BasePopupHandle } from "../PopupHandle-QNj4mED2.js";
|
|
14
|
+
import { t as TriggerFocusGuards } from "../TriggerFocusGuards-B9GNbLrL.js";
|
|
15
15
|
import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "../buttonSemantics-BSwDxJhh.js";
|
|
16
16
|
import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
17
|
-
import { C as useMenuRootContext, _ as menuViewportStateMapping, a as MenuRadioGroup, c as MenuCheckboxItem, d as MenuGroupLabel, f as MenuGroup, g as useMenuPositionerContext, h as MenuPositioner, i as MenuRadioItem, l as MenuItem, m as MenuPopup, n as MenuSubmenuRoot, o as MenuLinkItem, p as MenuArrow, r as MenuRadioItemIndicator, s as MenuCheckboxItemIndicator, t as MenuSubmenuTrigger, u as dispatchClickWithModifiers, v as MenuPortal, w as MenuStore, x as MenuRoot, y as MenuBackdrop } from "../MenuSubmenuTrigger-
|
|
17
|
+
import { C as useMenuRootContext, _ as menuViewportStateMapping, a as MenuRadioGroup, c as MenuCheckboxItem, d as MenuGroupLabel, f as MenuGroup, g as useMenuPositionerContext, h as MenuPositioner, i as MenuRadioItem, l as MenuItem, m as MenuPopup, n as MenuSubmenuRoot, o as MenuLinkItem, p as MenuArrow, r as MenuRadioItemIndicator, s as MenuCheckboxItemIndicator, t as MenuSubmenuTrigger, u as dispatchClickWithModifiers, v as MenuPortal, w as MenuStore, x as MenuRoot, y as MenuBackdrop } from "../MenuSubmenuTrigger-BMQKlOvU.js";
|
|
18
18
|
import { n as useMenubarContext } from "../MenubarContext-C-62rMnO.js";
|
|
19
19
|
import { t as Separator } from "../Separator-DTvtnxzP.js";
|
|
20
20
|
import { memo, mergeProps, ssrElement } from "@solidjs/web";
|
|
@@ -212,16 +212,16 @@ function MenuTrigger(props) {
|
|
|
212
212
|
current.setPendingFocus("first");
|
|
213
213
|
current.setOpen(true, createChangeEventDetails(triggerFocus, event, trigger));
|
|
214
214
|
}
|
|
215
|
-
const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onClick,
|
|
216
|
-
const onFocus = composeEventHandlers(() => internalProps.onFocus,
|
|
217
|
-
const onBlur = composeEventHandlers(() => internalProps.onBlur);
|
|
218
|
-
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown,
|
|
219
|
-
const onMouseMove = composeEventHandlers(() => internalProps.onMouseMove, () =>
|
|
220
|
-
const onPointerDown = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onPointerDown, (
|
|
215
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onClick), handleClick);
|
|
216
|
+
const onFocus = composeEventHandlers(liveEventHandler(() => internalProps.onFocus), handleFocus);
|
|
217
|
+
const onBlur = composeEventHandlers(liveEventHandler(() => internalProps.onBlur));
|
|
218
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onMouseDown), handleMouseDown);
|
|
219
|
+
const onMouseMove = composeEventHandlers(liveEventHandler(() => internalProps.onMouseMove), () => liveStore()?.setAllowMouseEnter(true));
|
|
220
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onPointerDown), (event) => {
|
|
221
221
|
pointerType = event.pointerType || "";
|
|
222
222
|
});
|
|
223
|
-
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown,
|
|
224
|
-
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
223
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0)), liveEventHandler(() => internalProps.onKeyDown), handleDismissKeyDown, handleRootKeyDown, handleKeyboardPress, liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown)));
|
|
224
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp)));
|
|
225
225
|
function TriggerInteractions(props) {
|
|
226
226
|
const interactionStore = untrack(() => props.store);
|
|
227
227
|
createHoverInteraction({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as useRender } from "../useRender-CryVdCjs.js";
|
|
2
2
|
import { getStateAttributesProps } from "../internals/getStateAttributesProps.js";
|
|
3
3
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
4
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
5
|
-
import { r as getNavigatedIndex } from "../compositeNavigation-
|
|
4
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
5
|
+
import { r as getNavigatedIndex } from "../compositeNavigation-D5jKM4yk.js";
|
|
6
6
|
import { i as createFloatingNode, r as FloatingTreeStore } from "../FloatingTree-z1JPD1dR.js";
|
|
7
7
|
import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
8
8
|
import { t as MenubarContext } from "../MenubarContext-C-62rMnO.js";
|
|
@@ -111,11 +111,11 @@ function Menubar(props) {
|
|
|
111
111
|
setActiveTrigger(next);
|
|
112
112
|
next.element()?.focus({ preventScroll: true });
|
|
113
113
|
}
|
|
114
|
-
const onFocusIn = composeEventHandlers(() => internalProps.onFocusIn, (
|
|
114
|
+
const onFocusIn = composeEventHandlers(liveEventHandler(() => internalProps.onFocusIn), (event) => {
|
|
115
115
|
const item = findEventItem(event);
|
|
116
116
|
if (item) setActiveTrigger(item);
|
|
117
117
|
});
|
|
118
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown,
|
|
118
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), relayKeyboardEvent);
|
|
119
119
|
const context = {
|
|
120
120
|
modal,
|
|
121
121
|
disabled,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/internals/mergeStyleValue.ts
|
|
2
|
+
/**
|
|
3
|
+
* Merges functional styles a part owns with the caller's `style` value, which wins.
|
|
4
|
+
*
|
|
5
|
+
* Unlike `mergeStyles` this accepts the resolved `StyleValue` shape, where a caller may pass a
|
|
6
|
+
* CSS string; the internal object is serialized ahead of it so the string still overrides.
|
|
7
|
+
*/
|
|
8
|
+
function mergeStyleValue(internal, external) {
|
|
9
|
+
if (typeof external === "string") return `${serializeStyle(internal)}${external}`;
|
|
10
|
+
if (!external) return internal;
|
|
11
|
+
return {
|
|
12
|
+
...internal,
|
|
13
|
+
...external
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function serializeStyle(style) {
|
|
17
|
+
return Object.entries(style).filter((entry) => entry[1] != null).map(([property, value]) => `${property}:${value};`).join("");
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { mergeStyleValue as t };
|
|
@@ -4,20 +4,20 @@ import { getStateAttributesProps } from "../internals/getStateAttributesProps.js
|
|
|
4
4
|
import { S as listNavigation, x as linkPress } from "../internals/reasons.js";
|
|
5
5
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
6
6
|
import { createChangeEventDetails } from "../internals/createBaseUIEventDetails.js";
|
|
7
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
7
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
8
8
|
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-CYq38H8J.js";
|
|
9
|
-
import { n as contains } from "../dom-
|
|
10
|
-
import { t as createAnchorPositioning } from "../createAnchorPositioning-
|
|
11
|
-
import { t as createClickInteraction } from "../createClickInteraction-
|
|
9
|
+
import { n as contains } from "../dom-D8_aB1yy.js";
|
|
10
|
+
import { t as createAnchorPositioning } from "../createAnchorPositioning-DrQYe7RS.js";
|
|
11
|
+
import { t as createClickInteraction } from "../createClickInteraction-D7oc1Vco.js";
|
|
12
12
|
import { c as useFloatingTree, i as createFloatingNode, n as FloatingTreeContext, r as FloatingTreeStore, s as useFloatingParentNodeId, t as FloatingParentNodeContext } from "../FloatingTree-z1JPD1dR.js";
|
|
13
|
-
import { a as createPopupPresence, o as createDismiss, t as PopupStore } from "../PopupStore-
|
|
14
|
-
import { n as createInitialPositioning, r as createHoverInteraction, t as safePolygon } from "../safePolygon-
|
|
15
|
-
import { n as createPopupAutoResize } from "../createPopupAutoResize-
|
|
13
|
+
import { a as createPopupPresence, o as createDismiss, t as PopupStore } from "../PopupStore-evylvVnN.js";
|
|
14
|
+
import { n as createInitialPositioning, r as createHoverInteraction, t as safePolygon } from "../safePolygon-B8QtiIZ3.js";
|
|
15
|
+
import { n as createPopupAutoResize } from "../createPopupAutoResize-Cg0-lLf4.js";
|
|
16
16
|
import { t as createTransitionStatus } from "../createTransitionStatus-184v7j3-.js";
|
|
17
|
-
import { a as triggerOpenStateMapping, d as getTabbableAfterElement, g as FocusGuard, h as tabbable, i as pressableTriggerOpenStateMapping, n as popupStateMapping, o as PopupPortal, r as popupTransitionStateMapping } from "../popupStateMapping-
|
|
18
|
-
import { t as FocusManager } from "../FocusManager-
|
|
17
|
+
import { a as triggerOpenStateMapping, d as getTabbableAfterElement, g as FocusGuard, h as tabbable, i as pressableTriggerOpenStateMapping, n as popupStateMapping, o as PopupPortal, r as popupTransitionStateMapping } from "../popupStateMapping-VHqr6M4H.js";
|
|
18
|
+
import { t as FocusManager } from "../FocusManager-D-xgblGs.js";
|
|
19
19
|
import { t as setRef } from "../setRef-Bt70sW7c.js";
|
|
20
|
-
import { t as TriggerFocusGuards } from "../TriggerFocusGuards-
|
|
20
|
+
import { t as TriggerFocusGuards } from "../TriggerFocusGuards-B9GNbLrL.js";
|
|
21
21
|
import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "../buttonSemantics-BSwDxJhh.js";
|
|
22
22
|
import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
23
23
|
import { Portal, escape, memo, mergeProps, scope, ssr, ssrElement, ssrHydrationKey } from "@solidjs/web";
|
|
@@ -443,7 +443,7 @@ function NavigationMenuList(props) {
|
|
|
443
443
|
orientation: root.store.orientation,
|
|
444
444
|
direction
|
|
445
445
|
});
|
|
446
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, (
|
|
446
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), (event) => {
|
|
447
447
|
if (!root.nested) composite.handleKeyDown(event);
|
|
448
448
|
});
|
|
449
449
|
const Render = useRender(props, () => state(), (props) => ssrElement("ul", props, void 0, true));
|
|
@@ -626,12 +626,12 @@ function NavigationMenuTrigger(props) {
|
|
|
626
626
|
root.store.setValue(item.value(), createChangeEventDetails(listNavigation, event, element() ?? void 0));
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onClick,
|
|
630
|
-
const onFocus = composeEventHandlers(() => internalProps.onFocus,
|
|
631
|
-
const onPointerDown = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onPointerDown,
|
|
632
|
-
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown,
|
|
633
|
-
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown,
|
|
634
|
-
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
629
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onClick), handleClick);
|
|
630
|
+
const onFocus = composeEventHandlers(liveEventHandler(() => internalProps.onFocus), handleFocus);
|
|
631
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onPointerDown), handlePointerDown);
|
|
632
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onMouseDown), handleMouseDown);
|
|
633
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0)), liveEventHandler(() => internalProps.onKeyDown), handleKeyDown, liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown)));
|
|
634
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp)));
|
|
635
635
|
const trigger = useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true))(mergeProps({
|
|
636
636
|
ref: [((value) => setElement(value)), internalProps.ref],
|
|
637
637
|
get id() {
|
|
@@ -777,7 +777,7 @@ function NavigationMenuContent(props) {
|
|
|
777
777
|
} : {}, resolveStyle(props.style, state())));
|
|
778
778
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), contentStateMapping));
|
|
779
779
|
const others = omit(allProps, "render", "class", "keepMounted", "onKeyDown", "ref", "style");
|
|
780
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, (
|
|
780
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), (event) => composite.handleKeyDown(event));
|
|
781
781
|
createEffect(() => ({
|
|
782
782
|
open: open(),
|
|
783
783
|
mounted: transition.mounted(),
|
|
@@ -898,8 +898,8 @@ function NavigationMenuLink(props) {
|
|
|
898
898
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
899
899
|
const others = omit(allProps, "active", "render", "class", "closeOnClick", "onClick", "onFocus", "ref", "style");
|
|
900
900
|
createEffect(element, () => composite?.notifyItemChange());
|
|
901
|
-
const onFocus = composeEventHandlers(() => internalProps.onFocus, () =>
|
|
902
|
-
const onClick = composeEventHandlers(() => internalProps.onClick, (
|
|
901
|
+
const onFocus = composeEventHandlers(liveEventHandler(() => internalProps.onFocus), () => composite?.setActiveItem(registration));
|
|
902
|
+
const onClick = composeEventHandlers(liveEventHandler(() => internalProps.onClick), (event) => {
|
|
903
903
|
if (internalProps.closeOnClick) root.store.setValue(null, createChangeEventDetails(linkPress, event));
|
|
904
904
|
});
|
|
905
905
|
onCleanup(() => unregister?.());
|
|
@@ -1165,7 +1165,7 @@ function NavigationMenuPopup(props) {
|
|
|
1165
1165
|
const styleValue = createMemo(() => mergeNavigationMenuStyles(originStyle(), resolveStyle(props.style, state())));
|
|
1166
1166
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), popupTransitionStateMapping));
|
|
1167
1167
|
const others = omit(allProps, "render", "class", "id", "onKeyDown", "ref", "style");
|
|
1168
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, (
|
|
1168
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), (event) => {
|
|
1169
1169
|
const handler = root.store.state.popupProps.onKeyDown;
|
|
1170
1170
|
if (typeof handler === "function") handler(event);
|
|
1171
1171
|
});
|
|
@@ -4,9 +4,9 @@ import { getStateAttributesProps } from "../internals/getStateAttributesProps.js
|
|
|
4
4
|
import { D as scrub, P as wheel, _ as inputPaste, b as keyboard, f as incrementPress, g as inputClear, h as inputChange, m as inputBlur, o as decrementPress } from "../internals/reasons.js";
|
|
5
5
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
6
6
|
import { createChangeEventDetails, createGenericEventDetails } from "../internals/createBaseUIEventDetails.js";
|
|
7
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
7
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
8
8
|
import { fieldValidityMapping } from "../internals/field-constants.js";
|
|
9
|
-
import {
|
|
9
|
+
import { r as useFieldRootContext } from "../FieldRootContext-Bfpna6gA.js";
|
|
10
10
|
import { n as useFormContext } from "../FormContext-CYwo_ZnB.js";
|
|
11
11
|
import { r as useLabelableContext } from "../LabelableContext-BTeF0IWb.js";
|
|
12
12
|
import { mergeStyles } from "../internals/mergeStyles.js";
|
|
@@ -776,18 +776,18 @@ function NumberFieldStepperButton(props, isIncrement) {
|
|
|
776
776
|
if (!isTouchLikePointerType(event.pointerType)) context.focusInput();
|
|
777
777
|
pressAndHold.pointerHandlers.onPointerDown(event);
|
|
778
778
|
}
|
|
779
|
-
const onClick = composeEventHandlers(() => untrack(buttonDisabled) ? preventInteraction : void 0, () => internalProps.onClick,
|
|
780
|
-
const onPointerDown = composeEventHandlers(() => untrack(buttonDisabled) ? preventInteraction : void 0, () => internalProps.onPointerDown,
|
|
781
|
-
const onMouseDown = composeEventHandlers(() => untrack(buttonDisabled) ? stopInteraction : void 0, () => internalProps.onMouseDown);
|
|
782
|
-
const onKeyDown = composeEventHandlers(() => untrack(buttonDisabled) ? preventFocusableDisabledKeyDown : void 0, () => internalProps.onKeyDown, () => untrack(nativeButton) ? void 0 : handleNonNativeKeyDown);
|
|
783
|
-
const onKeyUp = composeEventHandlers(() => untrack(buttonDisabled) ? stopInteraction : void 0, () => internalProps.onKeyUp, () => untrack(nativeButton) ? void 0 : handleNonNativeKeyUp);
|
|
784
|
-
const onPointerUp = composeEventHandlers(() => internalProps.onPointerUp, () => pressAndHold.pointerHandlers.onPointerUp);
|
|
785
|
-
const onPointerMove = composeEventHandlers(() => internalProps.onPointerMove, () => pressAndHold.pointerHandlers.onPointerMove);
|
|
786
|
-
const onTouchStart = composeEventHandlers(() => internalProps.onTouchStart, () => pressAndHold.pointerHandlers.onTouchStart);
|
|
787
|
-
const onTouchEnd = composeEventHandlers(() => internalProps.onTouchEnd, () => pressAndHold.pointerHandlers.onTouchEnd);
|
|
788
|
-
const onMouseEnter = composeEventHandlers(() => internalProps.onMouseEnter, () => pressAndHold.pointerHandlers.onMouseEnter);
|
|
789
|
-
const onMouseLeave = composeEventHandlers(() => internalProps.onMouseLeave, () => pressAndHold.pointerHandlers.onMouseLeave);
|
|
790
|
-
const onMouseUp = composeEventHandlers(() => internalProps.onMouseUp, () => pressAndHold.pointerHandlers.onMouseUp);
|
|
779
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(buttonDisabled) ? preventInteraction : void 0), liveEventHandler(() => internalProps.onClick), handleClick);
|
|
780
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(buttonDisabled) ? preventInteraction : void 0), liveEventHandler(() => internalProps.onPointerDown), handlePointerDown);
|
|
781
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(buttonDisabled) ? stopInteraction : void 0), liveEventHandler(() => internalProps.onMouseDown));
|
|
782
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(buttonDisabled) ? preventFocusableDisabledKeyDown : void 0), liveEventHandler(() => internalProps.onKeyDown), liveEventHandler(() => untrack(nativeButton) ? void 0 : handleNonNativeKeyDown));
|
|
783
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(buttonDisabled) ? stopInteraction : void 0), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(nativeButton) ? void 0 : handleNonNativeKeyUp));
|
|
784
|
+
const onPointerUp = composeEventHandlers(liveEventHandler(() => internalProps.onPointerUp), liveEventHandler(() => pressAndHold.pointerHandlers.onPointerUp));
|
|
785
|
+
const onPointerMove = composeEventHandlers(liveEventHandler(() => internalProps.onPointerMove), liveEventHandler(() => pressAndHold.pointerHandlers.onPointerMove));
|
|
786
|
+
const onTouchStart = composeEventHandlers(liveEventHandler(() => internalProps.onTouchStart), liveEventHandler(() => pressAndHold.pointerHandlers.onTouchStart));
|
|
787
|
+
const onTouchEnd = composeEventHandlers(liveEventHandler(() => internalProps.onTouchEnd), liveEventHandler(() => pressAndHold.pointerHandlers.onTouchEnd));
|
|
788
|
+
const onMouseEnter = composeEventHandlers(liveEventHandler(() => internalProps.onMouseEnter), liveEventHandler(() => pressAndHold.pointerHandlers.onMouseEnter));
|
|
789
|
+
const onMouseLeave = composeEventHandlers(liveEventHandler(() => internalProps.onMouseLeave), liveEventHandler(() => pressAndHold.pointerHandlers.onMouseLeave));
|
|
790
|
+
const onMouseUp = composeEventHandlers(liveEventHandler(() => internalProps.onMouseUp), liveEventHandler(() => pressAndHold.pointerHandlers.onMouseUp));
|
|
791
791
|
onSettled(() => {});
|
|
792
792
|
return Render(mergeProps({
|
|
793
793
|
ref: [((value) => value), internalProps.ref],
|
|
@@ -1071,11 +1071,11 @@ function NumberFieldInput(props) {
|
|
|
1071
1071
|
context.setInputValue(nextText);
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
|
-
const onFocus = composeEventHandlers(() => internalProps.onFocus,
|
|
1075
|
-
const onBlur = composeEventHandlers(() => internalProps.onBlur,
|
|
1076
|
-
const onInput = composeEventHandlers(() => internalProps.onInput,
|
|
1077
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown,
|
|
1078
|
-
const onPaste = composeEventHandlers(() => internalProps.onPaste,
|
|
1074
|
+
const onFocus = composeEventHandlers(liveEventHandler(() => internalProps.onFocus), handleFocus);
|
|
1075
|
+
const onBlur = composeEventHandlers(liveEventHandler(() => internalProps.onBlur), handleBlur);
|
|
1076
|
+
const onInput = composeEventHandlers(liveEventHandler(() => internalProps.onInput), handleInput);
|
|
1077
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), handleKeyDown);
|
|
1078
|
+
const onPaste = composeEventHandlers(liveEventHandler(() => internalProps.onPaste), handlePaste);
|
|
1079
1079
|
createEffect(() => ({
|
|
1080
1080
|
element: element(),
|
|
1081
1081
|
inputValue: context.inputValue()
|
|
@@ -1161,7 +1161,7 @@ function NumberFieldInput(props) {
|
|
|
1161
1161
|
return ariaDescribedBy();
|
|
1162
1162
|
},
|
|
1163
1163
|
onFocus,
|
|
1164
|
-
onBlur: (event) => untrack(() => onBlur(event)),
|
|
1164
|
+
onBlur: (event) => untrack(() => onBlur.call(event.currentTarget, event)),
|
|
1165
1165
|
onInput,
|
|
1166
1166
|
onKeyDown,
|
|
1167
1167
|
onPaste
|
|
@@ -1390,7 +1390,7 @@ function NumberFieldScrubArea(props) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
const onPointerDown = composeEventHandlers(() => internalProps.onPointerDown,
|
|
1393
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => internalProps.onPointerDown), handlePointerDown);
|
|
1394
1394
|
onCleanup(() => {
|
|
1395
1395
|
clearExitPointerLockTimer();
|
|
1396
1396
|
setCursorElement(void 0);
|
|
@@ -4,10 +4,10 @@ import { getStateAttributesProps } from "../internals/getStateAttributesProps.js
|
|
|
4
4
|
import { _ as inputPaste, b as keyboard, g as inputClear, h as inputChange } from "../internals/reasons.js";
|
|
5
5
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
6
6
|
import { createChangeEventDetails, createGenericEventDetails } from "../internals/createBaseUIEventDetails.js";
|
|
7
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
7
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
8
8
|
import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
9
9
|
import { fieldValidityMapping } from "../internals/field-constants.js";
|
|
10
|
-
import {
|
|
10
|
+
import { r as useFieldRootContext } from "../FieldRootContext-Bfpna6gA.js";
|
|
11
11
|
import { n as useFormContext } from "../FormContext-CYwo_ZnB.js";
|
|
12
12
|
import { r as useLabelableContext } from "../LabelableContext-BTeF0IWb.js";
|
|
13
13
|
import { t as Separator } from "../Separator-DTvtnxzP.js";
|
|
@@ -593,12 +593,12 @@ function OTPFieldInput(props) {
|
|
|
593
593
|
const ariaLabel = createMemo(() => index() === 0 ? void 0 : internalProps["aria-label"]);
|
|
594
594
|
const inheritedLabel = createMemo(() => internalProps["aria-labelledby"] ?? root.inputAriaLabelledBy());
|
|
595
595
|
const [inputElement, setInputElement] = createSignal();
|
|
596
|
-
const onMouseDown = composeEventHandlers(() => internalProps.onMouseDown,
|
|
597
|
-
const onFocus = composeEventHandlers(() => internalProps.onFocus,
|
|
598
|
-
const onBlur = composeEventHandlers(() => internalProps.onBlur,
|
|
599
|
-
const onInput = composeEventHandlers(() => internalProps.onInput,
|
|
600
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown,
|
|
601
|
-
const onPaste = composeEventHandlers(() => internalProps.onPaste,
|
|
596
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => internalProps.onMouseDown), handleMouseDown);
|
|
597
|
+
const onFocus = composeEventHandlers(liveEventHandler(() => internalProps.onFocus), handleFocus);
|
|
598
|
+
const onBlur = composeEventHandlers(liveEventHandler(() => internalProps.onBlur), handleBlur);
|
|
599
|
+
const onInput = composeEventHandlers(liveEventHandler(() => internalProps.onInput), handleInput);
|
|
600
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), handleKeyDown);
|
|
601
|
+
const onPaste = composeEventHandlers(liveEventHandler(() => internalProps.onPaste), handlePaste);
|
|
602
602
|
function handleMouseDown(event) {
|
|
603
603
|
if (event.defaultPrevented || root.disabled()) return;
|
|
604
604
|
event.preventDefault();
|
|
@@ -4,22 +4,22 @@ import { getStateAttributesProps } from "../internals/getStateAttributesProps.js
|
|
|
4
4
|
import { d as imperativeAction, i as closePress } from "../internals/reasons.js";
|
|
5
5
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
6
6
|
import { createChangeEventDetails } from "../internals/createBaseUIEventDetails.js";
|
|
7
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
7
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
8
8
|
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-CYq38H8J.js";
|
|
9
|
-
import {
|
|
10
|
-
import { t as PopupViewport } from "../PopupViewport-
|
|
11
|
-
import { t as createAnchorPositioning } from "../createAnchorPositioning-
|
|
12
|
-
import { t as InternalBackdrop } from "../InternalBackdrop-
|
|
13
|
-
import { t as createAnchoredPopupScrollLock } from "../createAnchoredPopupScrollLock-
|
|
14
|
-
import { t as createClickInteraction } from "../createClickInteraction-
|
|
9
|
+
import { l as isHTMLElement } from "../dom-D8_aB1yy.js";
|
|
10
|
+
import { t as PopupViewport } from "../PopupViewport-BDttjORN.js";
|
|
11
|
+
import { t as createAnchorPositioning } from "../createAnchorPositioning-DrQYe7RS.js";
|
|
12
|
+
import { t as InternalBackdrop } from "../InternalBackdrop-D_2zAWnl.js";
|
|
13
|
+
import { t as createAnchoredPopupScrollLock } from "../createAnchoredPopupScrollLock-q6gnOSmv.js";
|
|
14
|
+
import { t as createClickInteraction } from "../createClickInteraction-D7oc1Vco.js";
|
|
15
15
|
import { c as useFloatingTree, i as createFloatingNode, n as FloatingTreeContext, r as FloatingTreeStore, s as useFloatingParentNodeId, t as FloatingParentNodeContext } from "../FloatingTree-z1JPD1dR.js";
|
|
16
|
-
import { a as createPopupPresence, n as createTriggerRegistration, o as createDismiss, t as PopupStore } from "../PopupStore-
|
|
17
|
-
import { n as createInitialPositioning, r as createHoverInteraction, t as safePolygon } from "../safePolygon-
|
|
18
|
-
import { a as triggerOpenStateMapping, i as pressableTriggerOpenStateMapping, n as popupStateMapping, o as PopupPortal, r as popupTransitionStateMapping } from "../popupStateMapping-
|
|
19
|
-
import { t as FocusManager } from "../FocusManager-
|
|
20
|
-
import { i as createPopupHandleStore, n as DetachedPopupStore, r as attachPopupHandle, t as BasePopupHandle } from "../PopupHandle-
|
|
16
|
+
import { a as createPopupPresence, n as createTriggerRegistration, o as createDismiss, t as PopupStore } from "../PopupStore-evylvVnN.js";
|
|
17
|
+
import { n as createInitialPositioning, r as createHoverInteraction, t as safePolygon } from "../safePolygon-B8QtiIZ3.js";
|
|
18
|
+
import { a as triggerOpenStateMapping, i as pressableTriggerOpenStateMapping, n as popupStateMapping, o as PopupPortal, r as popupTransitionStateMapping } from "../popupStateMapping-VHqr6M4H.js";
|
|
19
|
+
import { t as FocusManager } from "../FocusManager-D-xgblGs.js";
|
|
20
|
+
import { i as createPopupHandleStore, n as DetachedPopupStore, r as attachPopupHandle, t as BasePopupHandle } from "../PopupHandle-QNj4mED2.js";
|
|
21
21
|
import { t as setRef } from "../setRef-Bt70sW7c.js";
|
|
22
|
-
import { t as TriggerFocusGuards } from "../TriggerFocusGuards-
|
|
22
|
+
import { t as TriggerFocusGuards } from "../TriggerFocusGuards-B9GNbLrL.js";
|
|
23
23
|
import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "../buttonSemantics-BSwDxJhh.js";
|
|
24
24
|
import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
25
25
|
import { n as useToolbarRootContext } from "../ToolbarRootContext-DD-qe7s8.js";
|
|
@@ -398,11 +398,11 @@ function PopoverTrigger(props) {
|
|
|
398
398
|
const currentTarget = event.currentTarget;
|
|
399
399
|
if (popup && currentTarget && popup.ownerDocument !== currentTarget.ownerDocument && typeof rootHandler === "function") rootHandler(event);
|
|
400
400
|
}
|
|
401
|
-
const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0),
|
|
402
|
-
const onPointerDown = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onPointerDown,
|
|
403
|
-
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown,
|
|
404
|
-
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown,
|
|
405
|
-
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
401
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), prepareClick, liveEventHandler(() => internalProps.onClick), handleClick);
|
|
402
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onPointerDown), handlePointerDown);
|
|
403
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onMouseDown), handleMouseDown);
|
|
404
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0)), liveEventHandler(() => internalProps.onKeyDown), handleKeyDown, liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown)));
|
|
405
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp)));
|
|
406
406
|
function TriggerInteractions() {
|
|
407
407
|
return Show({
|
|
408
408
|
keyed: true,
|
|
@@ -659,8 +659,9 @@ function PopoverPositioner(props) {
|
|
|
659
659
|
createEffect(() => positioning.state().placement, (placement) => {
|
|
660
660
|
context.store.context.floatingRoot.context.data.placement = placement;
|
|
661
661
|
});
|
|
662
|
+
const handoffTrigger = createMemo(() => context.store.open() ? context.store.track().activeTriggerElement : null);
|
|
662
663
|
createEffect(() => ({
|
|
663
|
-
trigger:
|
|
664
|
+
trigger: handoffTrigger(),
|
|
664
665
|
positioner: element()
|
|
665
666
|
}), ({ trigger, positioner }) => {
|
|
666
667
|
const previous = previousTrigger;
|
|
@@ -791,10 +792,10 @@ function PopoverPopup(props) {
|
|
|
791
792
|
const focusManagerModal = createMemo(() => context.modal() !== false && closePartContext.hasClosePart());
|
|
792
793
|
const initialFocus = createMemo(() => internalProps.initialFocus ?? ((interactionType) => interactionType === "touch" ? context.store.state.popupElement : true));
|
|
793
794
|
const others = omit(allProps, "render", "class", "finalFocus", "id", "initialFocus", "onKeyDown", "ref", "style");
|
|
794
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, (
|
|
795
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), (event) => {
|
|
795
796
|
const handler = context.store.state.popupProps.onKeyDown;
|
|
796
797
|
if (typeof handler === "function") handler(event);
|
|
797
|
-
}, (
|
|
798
|
+
}, (event) => {
|
|
798
799
|
if (insideToolbar && COMPOSITE_KEYS.has(event.key)) event.stopPropagation();
|
|
799
800
|
});
|
|
800
801
|
let popupElement = null;
|
|
@@ -1044,11 +1045,11 @@ function PopoverClose(props) {
|
|
|
1044
1045
|
function handleClick(event) {
|
|
1045
1046
|
if (context.store.open()) context.store.setOpen(false, createChangeEventDetails(closePress, event));
|
|
1046
1047
|
}
|
|
1047
|
-
const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onClick,
|
|
1048
|
-
const onPointerDown = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onPointerDown);
|
|
1049
|
-
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown);
|
|
1050
|
-
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown));
|
|
1051
|
-
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
1048
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onClick), handleClick);
|
|
1049
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onPointerDown));
|
|
1050
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onMouseDown));
|
|
1051
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0)), liveEventHandler(() => internalProps.onKeyDown), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown)));
|
|
1052
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp)));
|
|
1052
1053
|
return Render(mergeProps({
|
|
1053
1054
|
ref: [internalProps.ref],
|
|
1054
1055
|
get type() {
|
|
@@ -2,7 +2,7 @@ import { t as useRender } from "./useRender-CryVdCjs.js";
|
|
|
2
2
|
import { u as focusOut } from "./internals/reasons.js";
|
|
3
3
|
import { createChangeEventDetails } from "./internals/createBaseUIEventDetails.js";
|
|
4
4
|
import { transitionStatusMapping } from "./internals/stateAttributesMapping.js";
|
|
5
|
-
import {
|
|
5
|
+
import { d as isShadowRoot, h as ownerWindow, l as isHTMLElement, m as ownerDocument, n as contains, s as isElementVisible, t as activeElement } from "./dom-D8_aB1yy.js";
|
|
6
6
|
import { Portal, escape, mergeProps, ssr, ssrAttribute, ssrElement, ssrGroup, ssrHydrationKey, ssrStyle } from "@solidjs/web";
|
|
7
7
|
import { Show, createContext, createEffect, createMemo, createSignal, createUniqueId, omit, useContext } from "solid-js";
|
|
8
8
|
//#region src/internals/overlay/ReactiveStore.ts
|