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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { t as useRender } from "../useRender-CryVdCjs.js";
|
|
3
3
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
4
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
4
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
5
5
|
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-CYq38H8J.js";
|
|
6
6
|
import { t as createTransitionStatus } from "../createTransitionStatus-184v7j3-.js";
|
|
7
7
|
import { isServer, mergeProps, ssrElement } from "@solidjs/web";
|
|
@@ -110,10 +110,10 @@ function AvatarImage(props) {
|
|
|
110
110
|
}));
|
|
111
111
|
const classValue = createMemo(() => props.keepMounted || transition.mounted() ? resolveClass(props.class, state()) : void 0);
|
|
112
112
|
const styleValue = createMemo(() => props.keepMounted || transition.mounted() ? resolveStyle(props.style, state()) : void 0);
|
|
113
|
-
const onLoad = composeEventHandlers(() => props.onLoad, () =>
|
|
113
|
+
const onLoad = composeEventHandlers(liveEventHandler(() => props.onLoad), () => {
|
|
114
114
|
if (props.keepMounted) setImageLoadingStatus("loaded");
|
|
115
115
|
});
|
|
116
|
-
const onError = composeEventHandlers(() => props.onError, () =>
|
|
116
|
+
const onError = composeEventHandlers(liveEventHandler(() => props.onError), () => {
|
|
117
117
|
if (props.keepMounted) setImageLoadingStatus("error");
|
|
118
118
|
});
|
|
119
119
|
createEffect(() => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as useRender } from "../useRender-CryVdCjs.js";
|
|
2
2
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
3
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
3
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
4
4
|
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
5
5
|
import { createMemo, omit, onSettled, untrack } from "solid-js";
|
|
6
6
|
//#region src/button/Button.tsx
|
|
@@ -23,11 +23,11 @@ function Button(props) {
|
|
|
23
23
|
return disabled() ? "true" : void 0;
|
|
24
24
|
});
|
|
25
25
|
const tabIndex = createMemo(() => !nativeButton() && disabled() && !focusableWhenDisabled() ? -1 : 0);
|
|
26
|
-
const onClick = composeEventHandlers(() => untrack(() => props.disabled ?? false ? preventInteraction : void 0), () => eventProps.onClick);
|
|
27
|
-
const onMouseDown = composeEventHandlers(() => untrack(() => props.disabled ?? false ? stopInteraction : void 0), () => eventProps.onMouseDown);
|
|
28
|
-
const onPointerDown = composeEventHandlers(() => untrack(() => props.disabled ?? false ? preventInteraction : void 0), () => eventProps.onPointerDown);
|
|
29
|
-
const onKeyDown = composeEventHandlers(() => untrack(() => props.disabled ?? false ? props.focusableWhenDisabled ?? false ? preventFocusableDisabledKeyDown : stopInteraction : void 0), () => eventProps.onKeyDown, () => untrack(() => props.nativeButton ?? true ? void 0 : handleNonNativeKeyDown));
|
|
30
|
-
const onKeyUp = composeEventHandlers(() => untrack(() => props.disabled ?? false ? stopInteraction : void 0), () => eventProps.onKeyUp, () => untrack(() => props.nativeButton ?? true ? void 0 : handleNonNativeKeyUp));
|
|
26
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => props.disabled ?? false ? preventInteraction : void 0)), liveEventHandler(() => eventProps.onClick));
|
|
27
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(() => props.disabled ?? false ? stopInteraction : void 0)), liveEventHandler(() => eventProps.onMouseDown));
|
|
28
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(() => props.disabled ?? false ? preventInteraction : void 0)), liveEventHandler(() => eventProps.onPointerDown));
|
|
29
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(() => props.disabled ?? false ? props.focusableWhenDisabled ?? false ? preventFocusableDisabledKeyDown : stopInteraction : void 0)), liveEventHandler(() => eventProps.onKeyDown), liveEventHandler(() => untrack(() => props.nativeButton ?? true ? void 0 : handleNonNativeKeyDown)));
|
|
30
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => props.disabled ?? false ? stopInteraction : void 0)), liveEventHandler(() => eventProps.onKeyUp), liveEventHandler(() => untrack(() => props.nativeButton ?? true ? void 0 : handleNonNativeKeyUp)));
|
|
31
31
|
onSettled(() => {});
|
|
32
32
|
return useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true))(mergeProps({
|
|
33
33
|
ref: [((value) => value), eventProps.ref],
|
|
@@ -3,11 +3,11 @@ 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 { fieldStateAttributesMapping } 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 createLabelableId } from "../createLabelableId-WMUKtY6s.js";
|
|
@@ -136,11 +136,11 @@ function CheckboxRoot(props) {
|
|
|
136
136
|
value: checked,
|
|
137
137
|
getControl: () => rootElement() ?? null
|
|
138
138
|
};
|
|
139
|
-
const callExternalBlur = composeEventHandlers(() => internalProps.onBlur);
|
|
140
|
-
const callExternalClick = composeEventHandlers(() => internalProps.onClick);
|
|
141
|
-
const callExternalFocus = composeEventHandlers(() => internalProps.onFocus);
|
|
142
|
-
const callExternalKeyDown = composeEventHandlers(() => internalProps.onKeyDown);
|
|
143
|
-
const callExternalKeyUp = composeEventHandlers(() => internalProps.onKeyUp);
|
|
139
|
+
const callExternalBlur = composeEventHandlers(liveEventHandler(() => internalProps.onBlur));
|
|
140
|
+
const callExternalClick = composeEventHandlers(liveEventHandler(() => internalProps.onClick));
|
|
141
|
+
const callExternalFocus = composeEventHandlers(liveEventHandler(() => internalProps.onFocus));
|
|
142
|
+
const callExternalKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown));
|
|
143
|
+
const callExternalKeyUp = composeEventHandlers(liveEventHandler(() => internalProps.onKeyUp));
|
|
144
144
|
function handleClick(event) {
|
|
145
145
|
if (suppressEnterClick) {
|
|
146
146
|
event.preventDefault();
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { fieldStateAttributesMapping } from "../internals/field-constants.js";
|
|
5
|
-
import {
|
|
5
|
+
import { r as useFieldRootContext } from "../FieldRootContext-Bfpna6gA.js";
|
|
6
6
|
import { n as useFormContext } from "../FormContext-CYwo_ZnB.js";
|
|
7
7
|
import { r as useLabelableContext } from "../LabelableContext-BTeF0IWb.js";
|
|
8
8
|
import { t as createLabelableId } from "../createLabelableId-WMUKtY6s.js";
|
|
@@ -6,7 +6,7 @@ import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.j
|
|
|
6
6
|
import { n as createCollapsibleTransitionStatus, t as createCollapsiblePanel } from "../createCollapsiblePanel-B45kTe6v.js";
|
|
7
7
|
import { createChangeEventDetails } from "../internals/createBaseUIEventDetails.js";
|
|
8
8
|
import { transitionStatusMapping } from "../internals/stateAttributesMapping.js";
|
|
9
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
9
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
10
10
|
import { memo, mergeProps, ssrElement } from "@solidjs/web";
|
|
11
11
|
import { Show, createContext, createEffect, createMemo, createSignal, createUniqueId, flush, omit, onCleanup, untrack, useContext } from "solid-js";
|
|
12
12
|
//#region src/collapsible/root/CollapsibleRootContext.ts
|
|
@@ -109,13 +109,13 @@ function CollapsibleTrigger(props) {
|
|
|
109
109
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
110
110
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
111
111
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), collapsibleTriggerStateAttributesMapping));
|
|
112
|
-
const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventInteraction : void 0), () => internalProps.onClick, (
|
|
112
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventInteraction : void 0)), liveEventHandler(() => internalProps.onClick), (event) => {
|
|
113
113
|
context.requestOpenChange(!context.open(), event, triggerPress);
|
|
114
114
|
});
|
|
115
|
-
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopInteraction : void 0), () => internalProps.onMouseDown);
|
|
116
|
-
const onPointerDown = composeEventHandlers(() => untrack(() => disabled() ? preventInteraction : void 0), () => internalProps.onPointerDown);
|
|
117
|
-
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledKeyDown : void 0), () => internalProps.onKeyDown, () => untrack(() => nativeButton() ? void 0 : handleNonNativeKeyDown));
|
|
118
|
-
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeKeyUp));
|
|
115
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopInteraction : void 0)), liveEventHandler(() => internalProps.onMouseDown));
|
|
116
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventInteraction : void 0)), liveEventHandler(() => internalProps.onPointerDown));
|
|
117
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventDisabledKeyDown : void 0)), liveEventHandler(() => internalProps.onKeyDown), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeKeyDown)));
|
|
118
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeKeyUp)));
|
|
119
119
|
const ariaDisabled = createMemo(() => nativeButton() ? disabled() ? "true" : "false" : disabled() ? "true" : void 0);
|
|
120
120
|
const ariaExpanded = createMemo(() => context.open() ? "true" : "false");
|
|
121
121
|
return useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true))(mergeProps({
|
|
@@ -5,22 +5,18 @@ import { E as pointer, S as listNavigation, b as keyboard, n as chipRemovePress,
|
|
|
5
5
|
import { n as resolveClass, t as resolveStyle } from "../resolveStyle-XCSFDHAL.js";
|
|
6
6
|
import { createChangeEventDetails } from "../internals/createBaseUIEventDetails.js";
|
|
7
7
|
import { transitionStatusMapping } from "../internals/stateAttributesMapping.js";
|
|
8
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
8
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
9
9
|
import { t as runOnceAnimationsFinish } from "../runOnceAnimationsFinish-CYq38H8J.js";
|
|
10
|
-
import { A as getFilter, C as getIndexAfterChipRemoval, D as ComboboxTrigger, E as useRequiredComboboxChipsContext, F as stringifyAsLabel, M as hasNullItemLabel, N as resolveMultipleLabels, O as AriaCombobox, P as resolveSelectedLabel, S as getChipNavigationKeys, T as ComboboxChipsContext, _ as ComboboxClear, a as ComboboxItem, b as handleInputPress, c as ComboboxGroup, d as ComboboxPositioner, f as ComboboxBackdrop, g as ComboboxCollection, h as ComboboxList, i as ComboboxRow, j as flattenItems, k as useComboboxRootContext, l as ComboboxArrow, m as ComboboxStatus, n as ComboboxSeparator, o as useComboboxItemContext, p as ComboboxPortal, r as ComboboxEmpty, s as ComboboxGroupLabel, t as useFilteredItems, u as ComboboxPopup, v as ComboboxIcon, w as ComboboxChipRegistry, x as ComboboxInput, y as ComboboxInputGroup } from "../useFilteredItems-
|
|
10
|
+
import { A as getFilter, C as getIndexAfterChipRemoval, D as ComboboxTrigger, E as useRequiredComboboxChipsContext, F as stringifyAsLabel, M as hasNullItemLabel, N as resolveMultipleLabels, O as AriaCombobox, P as resolveSelectedLabel, S as getChipNavigationKeys, T as ComboboxChipsContext, _ as ComboboxClear, a as ComboboxItem, b as handleInputPress, c as ComboboxGroup, d as ComboboxPositioner, f as ComboboxBackdrop, g as ComboboxCollection, h as ComboboxList, i as ComboboxRow, j as flattenItems, k as useComboboxRootContext, l as ComboboxArrow, m as ComboboxStatus, n as ComboboxSeparator, o as useComboboxItemContext, p as ComboboxPortal, r as ComboboxEmpty, s as ComboboxGroupLabel, t as useFilteredItems, u as ComboboxPopup, v as ComboboxIcon, w as ComboboxChipRegistry, x as ComboboxInput, y as ComboboxInputGroup } from "../useFilteredItems-BmhL0nf1.js";
|
|
11
11
|
import { t as createTransitionStatus } from "../createTransitionStatus-184v7j3-.js";
|
|
12
12
|
import { a as stopButtonInteraction, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "../buttonSemantics-BSwDxJhh.js";
|
|
13
13
|
import { n as useDirection } from "../DirectionContext-YORWLF08.js";
|
|
14
14
|
import { fieldStateAttributesMapping } from "../internals/field-constants.js";
|
|
15
|
-
import { a as
|
|
15
|
+
import { a as findItemIndex, i as defaultItemEquality, r as compareItemEquality, t as isSolidAccessor } from "../isSolidAccessor-CZpzAH5l.js";
|
|
16
16
|
import { r as useLabelableContext } from "../LabelableContext-BTeF0IWb.js";
|
|
17
17
|
import { memo, mergeProps, ssrElement } from "@solidjs/web";
|
|
18
18
|
import { Show, createContext, createEffect, createMemo, createSignal, flush, omit, onCleanup, untrack, useContext } from "solid-js";
|
|
19
19
|
//#region src/combobox/root/ComboboxRoot.tsx
|
|
20
|
-
/**
|
|
21
|
-
* Groups all parts of the combobox.
|
|
22
|
-
* Doesn't render its own HTML element.
|
|
23
|
-
*/
|
|
24
20
|
function ComboboxRoot(rawProps) {
|
|
25
21
|
const props = rawProps;
|
|
26
22
|
const others = omit(props, "multiple", "value", "defaultValue", "onValueChange", "autoComplete", "items");
|
|
@@ -79,8 +75,8 @@ function ComboboxLabel(props) {
|
|
|
79
75
|
function preventPointerFocus(event) {
|
|
80
76
|
event.preventDefault();
|
|
81
77
|
}
|
|
82
|
-
const onClick = composeEventHandlers(() => internalProps.onClick,
|
|
83
|
-
const onPointerDown = composeEventHandlers(() => internalProps.onPointerDown,
|
|
78
|
+
const onClick = composeEventHandlers(liveEventHandler(() => internalProps.onClick), focusControl);
|
|
79
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => internalProps.onPointerDown), preventPointerFocus);
|
|
84
80
|
createEffect(id, (currentId) => {
|
|
85
81
|
context.store.setLabelId(currentId);
|
|
86
82
|
const unregister = labelable.registerLabelId(currentId);
|
|
@@ -187,7 +183,7 @@ function ComboboxChips(props) {
|
|
|
187
183
|
const classValue = createMemo(() => resolveClass(props.class, state));
|
|
188
184
|
const styleValue = createMemo(() => resolveStyle(props.style, state));
|
|
189
185
|
const others = omit(allProps, "render", "class", "onMouseDown", "ref", "style");
|
|
190
|
-
const onMouseDown = composeEventHandlers(() => internalProps.onMouseDown, (
|
|
186
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => internalProps.onMouseDown), (event) => handleInputPress(event, context, context.disabled()));
|
|
191
187
|
createEffect(() => context.store.open(), (open) => {
|
|
192
188
|
if (open) setHighlightedChipIndex(void 0);
|
|
193
189
|
});
|
|
@@ -249,7 +245,7 @@ function ComboboxChip(props) {
|
|
|
249
245
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
250
246
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
251
247
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
252
|
-
const others = omit(allProps, "render", "class", "onKeyDown", "ref", "style");
|
|
248
|
+
const others = omit(allProps, "render", "class", "onContextMenu", "onKeyDown", "onMouseDown", "ref", "style");
|
|
253
249
|
function resolveNextIndex(event) {
|
|
254
250
|
const current = index();
|
|
255
251
|
const [previousChipKey, nextChipKey] = getChipNavigationKeys(direction());
|
|
@@ -297,7 +293,9 @@ function ComboboxChip(props) {
|
|
|
297
293
|
if (nextIndex === void 0) context.focusInput();
|
|
298
294
|
else chips.chips.elements()[nextIndex]?.focus();
|
|
299
295
|
}
|
|
300
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown,
|
|
296
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), handleKeyDown);
|
|
297
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => internalProps.onMouseDown));
|
|
298
|
+
const onContextMenu = composeEventHandlers(liveEventHandler(() => internalProps.onContextMenu));
|
|
301
299
|
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
302
300
|
return ComboboxChipContext({
|
|
303
301
|
value: { index },
|
|
@@ -320,7 +318,9 @@ function ComboboxChip(props) {
|
|
|
320
318
|
get style() {
|
|
321
319
|
return styleValue();
|
|
322
320
|
},
|
|
323
|
-
onKeyDown
|
|
321
|
+
onKeyDown,
|
|
322
|
+
onMouseDown,
|
|
323
|
+
onContextMenu
|
|
324
324
|
}, stateAttributes, others));
|
|
325
325
|
}
|
|
326
326
|
});
|
|
@@ -374,10 +374,10 @@ function ComboboxChipRemove(props) {
|
|
|
374
374
|
event.preventDefault();
|
|
375
375
|
if (!details.isPropagationAllowed) event.stopPropagation();
|
|
376
376
|
}
|
|
377
|
-
const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onClick,
|
|
378
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown,
|
|
379
|
-
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
380
|
-
const onMouseDown = composeEventHandlers(() => internalProps.onMouseDown, (
|
|
377
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onClick), handleClick);
|
|
378
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), handleKeyDown, liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown)));
|
|
379
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp)));
|
|
380
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => internalProps.onMouseDown), (event) => event.preventDefault());
|
|
381
381
|
return useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true))(mergeProps({
|
|
382
382
|
ref: [internalProps.ref],
|
|
383
383
|
get type() {
|
|
@@ -385,7 +385,7 @@ function ComboboxChipRemove(props) {
|
|
|
385
385
|
},
|
|
386
386
|
tabindex: -1,
|
|
387
387
|
get ["aria-disabled"]() {
|
|
388
|
-
return
|
|
388
|
+
return disabled() || context.readOnly() ? "true" : void 0;
|
|
389
389
|
},
|
|
390
390
|
get ["class"]() {
|
|
391
391
|
return classValue();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as isElementVisible } from "./dom-D8_aB1yy.js";
|
|
2
2
|
//#region src/internals/overlay/compositeNavigation.ts
|
|
3
3
|
function isListIndexDisabled(list, index, disabledIndices) {
|
|
4
4
|
if (typeof disabledIndices === "function" ? disabledIndices(index) : disabledIndices?.includes(index) ?? false) return true;
|
|
@@ -39,6 +39,37 @@ function getNavigatedIndex(options) {
|
|
|
39
39
|
} else if (orientation !== "vertical" && (key === "ArrowRight" || key === "ArrowLeft")) direction = key === "ArrowRight" !== rtl ? 1 : -1;
|
|
40
40
|
if (!direction) return currentIndex;
|
|
41
41
|
if (currentIndex === -1) return direction === 1 ? min : max;
|
|
42
|
+
if (orientation === "both" && (key === "ArrowDown" || key === "ArrowUp")) {
|
|
43
|
+
const rows = [];
|
|
44
|
+
let previousRow = null;
|
|
45
|
+
let hasRows = false;
|
|
46
|
+
list.forEach((element, index) => {
|
|
47
|
+
if (!element) return;
|
|
48
|
+
const row = element.closest("[role=\"row\"]");
|
|
49
|
+
hasRows ||= row !== null;
|
|
50
|
+
if (row !== previousRow || rows.length === 0) rows.push([]);
|
|
51
|
+
rows[rows.length - 1].push(index);
|
|
52
|
+
previousRow = row;
|
|
53
|
+
});
|
|
54
|
+
const rowIndex = rows.findIndex((row) => row.includes(currentIndex));
|
|
55
|
+
if (hasRows && rowIndex !== -1) {
|
|
56
|
+
const column = rows[rowIndex].indexOf(currentIndex);
|
|
57
|
+
let nextRow = rowIndex;
|
|
58
|
+
for (let remaining = rows.length; remaining > 0; remaining--) {
|
|
59
|
+
nextRow += direction;
|
|
60
|
+
if (nextRow < 0 || nextRow >= rows.length) {
|
|
61
|
+
if (!loop || list.some((element) => !element)) return currentIndex;
|
|
62
|
+
nextRow = nextRow < 0 ? rows.length - 1 : 0;
|
|
63
|
+
}
|
|
64
|
+
const row = rows[nextRow];
|
|
65
|
+
for (let col = Math.min(column, row.length - 1); col >= 0; col--) {
|
|
66
|
+
const candidate = row[col];
|
|
67
|
+
if (!isListIndexDisabled(list, candidate, disabledIndices)) return candidate;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return currentIndex;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
42
73
|
const next = findNonDisabledListIndex(list, {
|
|
43
74
|
startingIndex: currentIndex,
|
|
44
75
|
decrement: direction === -1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as hasScrollableAncestor, t as findScrollableTouchTarget } from "./scrollable-
|
|
1
|
+
import { h as ownerWindow, i as getEventTarget, l as isHTMLElement, m as ownerDocument, n as contains } from "./dom-D8_aB1yy.js";
|
|
2
|
+
import { r as hasScrollableAncestor, t as findScrollableTouchTarget } from "./scrollable-C9Pgq8T5.js";
|
|
3
3
|
import { createSignal } from "solid-js";
|
|
4
4
|
//#region src/internals/clamp.ts
|
|
5
5
|
function clamp(value, min, max) {
|
|
@@ -4,10 +4,10 @@ import { getStateAttributesProps } from "../internals/getStateAttributesProps.js
|
|
|
4
4
|
import { N as triggerPress, t as cancelOpen } 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 {
|
|
9
|
-
import { i as pressableTriggerOpenStateMapping } from "../popupStateMapping-
|
|
10
|
-
import { C as useMenuRootContext, E as useContextMenuRootContext, S as MenuRootContext, T as ContextMenuRootContext, a as MenuRadioGroup, b as mergeMenuStyles, c as MenuCheckboxItem, d as MenuGroupLabel, f as MenuGroup, 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, v as MenuPortal, x as MenuRoot, y as MenuBackdrop } from "../MenuSubmenuTrigger-
|
|
7
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
8
|
+
import { i as getEventTarget, n as contains } from "../dom-D8_aB1yy.js";
|
|
9
|
+
import { i as pressableTriggerOpenStateMapping } from "../popupStateMapping-VHqr6M4H.js";
|
|
10
|
+
import { C as useMenuRootContext, E as useContextMenuRootContext, S as MenuRootContext, T as ContextMenuRootContext, a as MenuRadioGroup, b as mergeMenuStyles, c as MenuCheckboxItem, d as MenuGroupLabel, f as MenuGroup, 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, v as MenuPortal, x as MenuRoot, y as MenuBackdrop } from "../MenuSubmenuTrigger-BMQKlOvU.js";
|
|
11
11
|
import { t as Separator } from "../Separator-DTvtnxzP.js";
|
|
12
12
|
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
13
13
|
import { createEffect, createMemo, createSignal, omit, onCleanup } from "solid-js";
|
|
@@ -176,11 +176,11 @@ function ContextMenuTrigger(props) {
|
|
|
176
176
|
const touch = event.touches[0];
|
|
177
177
|
if (Math.abs(touch.clientX - touchPosition.x) > 10 || Math.abs(touch.clientY - touchPosition.y) > 10) cancelLongPress();
|
|
178
178
|
}
|
|
179
|
-
const onContextMenu = composeEventHandlers(() => internalProps.onContextMenu,
|
|
180
|
-
const onTouchStart = composeEventHandlers(() => internalProps.onTouchStart,
|
|
181
|
-
const onTouchMove = composeEventHandlers(() => internalProps.onTouchMove,
|
|
182
|
-
const onTouchEnd = composeEventHandlers(() => internalProps.onTouchEnd,
|
|
183
|
-
const onTouchCancel = composeEventHandlers(() => internalProps.onTouchCancel,
|
|
179
|
+
const onContextMenu = composeEventHandlers(liveEventHandler(() => internalProps.onContextMenu), handleContextMenu);
|
|
180
|
+
const onTouchStart = composeEventHandlers(liveEventHandler(() => internalProps.onTouchStart), handleTouchStart);
|
|
181
|
+
const onTouchMove = composeEventHandlers(liveEventHandler(() => internalProps.onTouchMove), handleTouchMove);
|
|
182
|
+
const onTouchEnd = composeEventHandlers(liveEventHandler(() => internalProps.onTouchEnd), cancelLongPress);
|
|
183
|
+
const onTouchCancel = composeEventHandlers(liveEventHandler(() => internalProps.onTouchCancel), cancelLongPress);
|
|
184
184
|
createEffect(() => ({
|
|
185
185
|
trigger: element(),
|
|
186
186
|
disabled: disabled(),
|
package/dist/lib/server/{createAnchorPositioning-B5Y0WEev.js → createAnchorPositioning-DrQYe7RS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as ownerWindow, m as ownerDocument } from "./dom-D8_aB1yy.js";
|
|
2
2
|
import { createEffect, createMemo, createSignal } from "solid-js";
|
|
3
3
|
import { autoUpdate, computePosition, detectOverflow, flip, limitShift, offset, shift, size } from "@floating-ui/dom";
|
|
4
4
|
//#region src/internals/overlay/createFloatingPosition.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as createScrollLock } from "./InternalBackdrop-
|
|
1
|
+
import { m as ownerDocument } from "./dom-D8_aB1yy.js";
|
|
2
|
+
import { n as createScrollLock } from "./InternalBackdrop-D_2zAWnl.js";
|
|
3
3
|
//#region src/internals/overlay/createAnchoredPopupScrollLock.ts
|
|
4
4
|
function shouldLockAnchoredPopup(options) {
|
|
5
5
|
if (!options.enabled) return false;
|
package/dist/lib/server/{createClickInteraction-BYsMgvup.js → createClickInteraction-D7oc1Vco.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./internals/reasons.js";
|
|
2
2
|
import { createChangeEventDetails } from "./internals/createBaseUIEventDetails.js";
|
|
3
|
-
import {
|
|
3
|
+
import { p as isTypeableElement } from "./dom-D8_aB1yy.js";
|
|
4
4
|
import { onCleanup } from "solid-js";
|
|
5
5
|
//#region src/internals/overlay/createClickInteraction.ts
|
|
6
6
|
function clickLike(event) {
|
package/dist/lib/server/{createFocusInteraction-DMyKsniI.js → createFocusInteraction-DFKr4G7a.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as triggerFocus } from "./internals/reasons.js";
|
|
2
2
|
import { createChangeEventDetails } from "./internals/createBaseUIEventDetails.js";
|
|
3
|
-
import {
|
|
3
|
+
import { h as ownerWindow, m as ownerDocument, n as contains, t as activeElement } from "./dom-D8_aB1yy.js";
|
|
4
4
|
import { createEffect, onCleanup } from "solid-js";
|
|
5
5
|
//#region src/internals/overlay/createFocusInteraction.ts
|
|
6
6
|
function matchesFocusVisible(element) {
|
package/dist/lib/server/{createPopupAutoResize-ImBjwdj_.js → createPopupAutoResize-Cg0-lLf4.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as runOnceAnimationsFinish } from "./runOnceAnimationsFinish-CYq38H8J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { h as ownerWindow, l as isHTMLElement } from "./dom-D8_aB1yy.js";
|
|
3
3
|
import { createEffect, untrack } from "solid-js";
|
|
4
4
|
//#region src/internals/overlay/createPopupAutoResize.ts
|
|
5
5
|
function getCssDimensions(element) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as DialogTitle, c as DialogDescription, i as DialogTrigger, l as DialogClose, n as createDialogHandle, o as DialogPortal, p as DialogRoot, r as DialogViewport, t as DialogHandle } from "../DialogHandle-
|
|
3
|
-
import { n as DialogBackdrop, t as DialogPopup } from "../DialogPopup-
|
|
2
|
+
import { a as DialogTitle, c as DialogDescription, i as DialogTrigger, l as DialogClose, n as createDialogHandle, o as DialogPortal, p as DialogRoot, r as DialogViewport, t as DialogHandle } from "../DialogHandle-BGIISmG7.js";
|
|
3
|
+
import { n as DialogBackdrop, t as DialogPopup } from "../DialogPopup-C2ZDGf42.js";
|
|
4
4
|
//#region src/dialog/index.parts.ts
|
|
5
5
|
var index_parts_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
Backdrop: () => DialogBackdrop,
|
|
@@ -25,6 +25,19 @@ function contains(parent, child) {
|
|
|
25
25
|
function getEventTarget(event) {
|
|
26
26
|
return event.composedPath?.()[0] ?? event.target;
|
|
27
27
|
}
|
|
28
|
+
/** Solid RC.6 Portal exposes a live logical parent through each inserted root's _$host. */
|
|
29
|
+
function containsWithPortals(parent, child) {
|
|
30
|
+
if (!parent || !child?.nodeType) return false;
|
|
31
|
+
if (parent.contains(child)) return true;
|
|
32
|
+
let current = child;
|
|
33
|
+
const visited = /* @__PURE__ */ new Set();
|
|
34
|
+
while (current && !visited.has(current)) {
|
|
35
|
+
if (current === parent) return true;
|
|
36
|
+
visited.add(current);
|
|
37
|
+
current = current._$host || current.parentNode || (isShadowRoot(current) ? current.host : null);
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
28
41
|
function isEventTargetWithin(event, node) {
|
|
29
42
|
if (!node) return false;
|
|
30
43
|
const path = event.composedPath?.();
|
|
@@ -64,4 +77,4 @@ function isTypeableCombobox(element) {
|
|
|
64
77
|
return element?.getAttribute("role") === "combobox" && isTypeableElement(element);
|
|
65
78
|
}
|
|
66
79
|
//#endregion
|
|
67
|
-
export {
|
|
80
|
+
export { getFloatingFocusElement as a, isEventTargetWithin as c, isShadowRoot as d, isTypeableCombobox as f, ownerWindow as h, getEventTarget as i, isHTMLElement as l, ownerDocument as m, contains as n, isElement as o, isTypeableElement as p, containsWithPortals as r, isElementVisible as s, activeElement as t, isInteractiveElement as u };
|
|
@@ -5,15 +5,15 @@ import { a as closeWatcher, k as swipe } 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
7
|
import { TransitionStatusDataAttributes } from "../internals/stateAttributesMapping.js";
|
|
8
|
-
import { composeEventHandlers } from "../internals/composeEventHandlers.js";
|
|
9
|
-
import {
|
|
10
|
-
import { n as createTriggerRegistration } from "../PopupStore-
|
|
11
|
-
import { r as popupTransitionStateMapping, t as CommonPopupDataAttributes } from "../popupStateMapping-
|
|
12
|
-
import { t as FocusManager } from "../FocusManager-
|
|
13
|
-
import { a as DialogTitle, c as DialogDescription, d as dialogTransitionStateAttributesMapping, f as mergeDialogStyles, h as useDialogRootContext, i as DialogTrigger, l as DialogClose, m as renderDialogRoot, o as DialogPortal, r as DialogViewport, s as useDialogPortalContext, t as DialogHandle } from "../DialogHandle-
|
|
14
|
-
import { n as getComposedParentNode, t as findScrollableTouchTarget } from "../scrollable-
|
|
8
|
+
import { composeEventHandlers, liveEventHandler } from "../internals/composeEventHandlers.js";
|
|
9
|
+
import { h as ownerWindow, i as getEventTarget, l as isHTMLElement, m as ownerDocument, n as contains, o as isElement, t as activeElement, u as isInteractiveElement } from "../dom-D8_aB1yy.js";
|
|
10
|
+
import { n as createTriggerRegistration } from "../PopupStore-evylvVnN.js";
|
|
11
|
+
import { r as popupTransitionStateMapping, t as CommonPopupDataAttributes } from "../popupStateMapping-VHqr6M4H.js";
|
|
12
|
+
import { t as FocusManager } from "../FocusManager-D-xgblGs.js";
|
|
13
|
+
import { a as DialogTitle, c as DialogDescription, d as dialogTransitionStateAttributesMapping, f as mergeDialogStyles, h as useDialogRootContext, i as DialogTrigger, l as DialogClose, m as renderDialogRoot, o as DialogPortal, r as DialogViewport, s as useDialogPortalContext, t as DialogHandle } from "../DialogHandle-BGIISmG7.js";
|
|
14
|
+
import { n as getComposedParentNode, t as findScrollableTouchTarget } from "../scrollable-C9Pgq8T5.js";
|
|
15
15
|
import { t as isAndroid } from "../platform-DYukKUir.js";
|
|
16
|
-
import { a as getElementTransform, i as getDisplacement, o as getElementAtPoint, r as createSwipeDismiss, s as clamp, t as BASE_UI_SWIPE_IGNORE_SELECTOR } from "../constants-
|
|
16
|
+
import { a as getElementTransform, i as getDisplacement, o as getElementAtPoint, r as createSwipeDismiss, s as clamp, t as BASE_UI_SWIPE_IGNORE_SELECTOR } from "../constants-ByqXubhO.js";
|
|
17
17
|
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
18
18
|
import { Show, createContext, createEffect, createMemo, createSignal, createUniqueId, flush, merge, omit, onCleanup, onSettled, untrack, useContext } from "solid-js";
|
|
19
19
|
//#region src/drawer/popup/DrawerPopupCssVars.ts
|
|
@@ -502,10 +502,12 @@ function DrawerPopup(props) {
|
|
|
502
502
|
measuredPopupHeight = offsetHeight;
|
|
503
503
|
drawer.onPopupHeightChange(offsetHeight);
|
|
504
504
|
}
|
|
505
|
+
const lifecycleElement = createMemo(() => context.store.track().popupElement);
|
|
506
|
+
const lifecycleOpen = createMemo(() => context.store.open());
|
|
505
507
|
createEffect(() => ({
|
|
506
508
|
mounted: context.presence.mounted(),
|
|
507
509
|
nestedDrawerOpen: nestedDrawerOpen(),
|
|
508
|
-
element:
|
|
510
|
+
element: lifecycleElement()
|
|
509
511
|
}), (state) => {
|
|
510
512
|
if (!state.mounted) {
|
|
511
513
|
measuredPopupHeight = 0;
|
|
@@ -520,7 +522,7 @@ function DrawerPopup(props) {
|
|
|
520
522
|
resizeObserver.observe(state.element);
|
|
521
523
|
return () => resizeObserver.disconnect();
|
|
522
524
|
});
|
|
523
|
-
createEffect(
|
|
525
|
+
createEffect(lifecycleElement, (element) => {
|
|
524
526
|
function syncNestedSwipeProgress() {
|
|
525
527
|
if (!element) return;
|
|
526
528
|
const progress = drawer.nestedSwipeProgressStore.getSnapshot();
|
|
@@ -534,7 +536,7 @@ function DrawerPopup(props) {
|
|
|
534
536
|
};
|
|
535
537
|
});
|
|
536
538
|
createEffect(() => ({
|
|
537
|
-
open:
|
|
539
|
+
open: lifecycleOpen(),
|
|
538
540
|
frontmostHeight: drawer.frontmostHeight()
|
|
539
541
|
}), (state) => {
|
|
540
542
|
if (!state.open) return;
|
|
@@ -542,7 +544,7 @@ function DrawerPopup(props) {
|
|
|
542
544
|
return () => drawer.notifyParentFrontmostHeight?.(0);
|
|
543
545
|
});
|
|
544
546
|
createEffect(() => ({
|
|
545
|
-
open:
|
|
547
|
+
open: lifecycleOpen(),
|
|
546
548
|
transitionStatus: context.presence.transitionStatus()
|
|
547
549
|
}), (state) => {
|
|
548
550
|
if (!drawer.notifyParentHasNestedDrawer) return;
|
|
@@ -604,7 +606,7 @@ function DrawerPopup(props) {
|
|
|
604
606
|
});
|
|
605
607
|
const id = createMemo(() => internalProps.id ?? context.store.context.floatingId);
|
|
606
608
|
const initialFocus = createMemo(() => internalProps.initialFocus ?? (() => context.store.state.popupElement));
|
|
607
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, (
|
|
609
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), (event) => {
|
|
608
610
|
if (COMPOSITE_KEYS.has(event.key)) event.stopPropagation();
|
|
609
611
|
});
|
|
610
612
|
createEffect(() => id(), (currentId) => {
|
|
@@ -1140,27 +1142,27 @@ function DrawerSwipeArea(props) {
|
|
|
1140
1142
|
"touch-action": resolveTouchAction(resolvedSwipeDirection())
|
|
1141
1143
|
}, resolveStyle(props.style, state())));
|
|
1142
1144
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), stateAttributesMapping));
|
|
1143
|
-
const onPointerDown = composeEventHandlers(() => internalProps.onPointerDown, (
|
|
1145
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => internalProps.onPointerDown), (event) => {
|
|
1144
1146
|
if (event.pointerType === "touch") return;
|
|
1145
1147
|
swipe$2.pointerHandlers.onPointerDown(event);
|
|
1146
1148
|
if (event.cancelable) event.preventDefault();
|
|
1147
1149
|
});
|
|
1148
|
-
const onPointerMove = composeEventHandlers(() => internalProps.onPointerMove, (
|
|
1150
|
+
const onPointerMove = composeEventHandlers(liveEventHandler(() => internalProps.onPointerMove), (event) => {
|
|
1149
1151
|
if (event.pointerType === "touch") return;
|
|
1150
1152
|
swipe$2.pointerHandlers.onPointerMove(event);
|
|
1151
1153
|
});
|
|
1152
|
-
const onPointerUp = composeEventHandlers(() => internalProps.onPointerUp, (
|
|
1154
|
+
const onPointerUp = composeEventHandlers(liveEventHandler(() => internalProps.onPointerUp), (event) => {
|
|
1153
1155
|
if (event.pointerType === "touch") return;
|
|
1154
1156
|
swipe$2.pointerHandlers.onPointerUp(event);
|
|
1155
1157
|
});
|
|
1156
|
-
const onPointerCancel = composeEventHandlers(() => internalProps.onPointerCancel, (
|
|
1158
|
+
const onPointerCancel = composeEventHandlers(liveEventHandler(() => internalProps.onPointerCancel), (event) => {
|
|
1157
1159
|
if (event.pointerType === "touch") return;
|
|
1158
1160
|
swipe$2.pointerHandlers.onPointerCancel(event);
|
|
1159
1161
|
});
|
|
1160
|
-
const onTouchStart = composeEventHandlers(() => internalProps.onTouchStart, (
|
|
1161
|
-
const onTouchMove = composeEventHandlers(() => internalProps.onTouchMove, (
|
|
1162
|
-
const onTouchEnd = composeEventHandlers(() => internalProps.onTouchEnd, (
|
|
1163
|
-
const onTouchCancel = composeEventHandlers(() => internalProps.onTouchCancel, (
|
|
1162
|
+
const onTouchStart = composeEventHandlers(liveEventHandler(() => internalProps.onTouchStart), (event) => swipe$2.touchHandlers.onTouchStart(event));
|
|
1163
|
+
const onTouchMove = composeEventHandlers(liveEventHandler(() => internalProps.onTouchMove), (event) => swipe$2.touchHandlers.onTouchMove(event));
|
|
1164
|
+
const onTouchEnd = composeEventHandlers(liveEventHandler(() => internalProps.onTouchEnd), (event) => swipe$2.touchHandlers.onTouchEnd(event));
|
|
1165
|
+
const onTouchCancel = composeEventHandlers(liveEventHandler(() => internalProps.onTouchCancel), (event) => swipe$2.touchHandlers.onTouchCancel(event));
|
|
1164
1166
|
return Render(mergeProps({
|
|
1165
1167
|
ref: [((element) => setSwipeAreaElement(element)), internalProps.ref],
|
|
1166
1168
|
get id() {
|
|
@@ -1517,11 +1519,13 @@ function DrawerViewport(props) {
|
|
|
1517
1519
|
setSwipeDismissed(true);
|
|
1518
1520
|
}
|
|
1519
1521
|
});
|
|
1522
|
+
const lifecycleOpen = createMemo(open);
|
|
1523
|
+
const touchRootElement = createMemo(() => context.viewportElement() ?? store.track().popupElement);
|
|
1520
1524
|
createEffect(() => ({
|
|
1521
1525
|
mounted: mounted(),
|
|
1522
1526
|
nestedDrawerOpen: nestedDrawerOpen(),
|
|
1523
|
-
open:
|
|
1524
|
-
rootElement:
|
|
1527
|
+
open: lifecycleOpen(),
|
|
1528
|
+
rootElement: touchRootElement(),
|
|
1525
1529
|
axis: scrollAxis(),
|
|
1526
1530
|
direction: swipeDirection()
|
|
1527
1531
|
}), (state) => {
|
|
@@ -1587,13 +1591,13 @@ function DrawerViewport(props) {
|
|
|
1587
1591
|
if (!state.range || state.swiping) return;
|
|
1588
1592
|
untrack(() => applySwipeProgress(!state.open || state.nested ? 0 : state.progress ?? 0, true, false));
|
|
1589
1593
|
});
|
|
1590
|
-
createEffect(
|
|
1594
|
+
createEffect(lifecycleOpen, (isOpen) => {
|
|
1591
1595
|
if (!drawer.notifyParentSwipeProgressChange) return;
|
|
1592
1596
|
if (!isOpen) drawer.notifyParentSwipeProgressChange(0);
|
|
1593
1597
|
return () => drawer.notifyParentSwipeProgressChange?.(0);
|
|
1594
1598
|
});
|
|
1595
|
-
createEffect(() => open(), (isOpen) => {
|
|
1596
|
-
if (!isOpen) return;
|
|
1599
|
+
createEffect(() => open(), (isOpen, wasOpen) => {
|
|
1600
|
+
if (!isOpen || isOpen === wasOpen) return;
|
|
1597
1601
|
untrack(() => {
|
|
1598
1602
|
if (!drawer.swipeAreaActive.current) swipe$1.reset();
|
|
1599
1603
|
clearSwipeRelease();
|
|
@@ -1627,7 +1631,7 @@ function DrawerViewport(props) {
|
|
|
1627
1631
|
lastPointerType = "";
|
|
1628
1632
|
return event.pointerType !== "touch";
|
|
1629
1633
|
}
|
|
1630
|
-
const onPointerDown = composeEventHandlers(() => internalProps.onPointerDown, (
|
|
1634
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => internalProps.onPointerDown), (event) => {
|
|
1631
1635
|
lastPointerType = event.pointerType;
|
|
1632
1636
|
ignoreNextTouchStartFromPen = event.pointerType === "pen";
|
|
1633
1637
|
if (!open() || !mounted() || nestedDrawerOpen()) return;
|
|
@@ -1637,17 +1641,17 @@ function DrawerViewport(props) {
|
|
|
1637
1641
|
if (event.pointerType === "touch") return;
|
|
1638
1642
|
swipe$1.pointerHandlers.onPointerDown(event);
|
|
1639
1643
|
});
|
|
1640
|
-
const onPointerMove = composeEventHandlers(() => internalProps.onPointerMove, (
|
|
1644
|
+
const onPointerMove = composeEventHandlers(liveEventHandler(() => internalProps.onPointerMove), (event) => {
|
|
1641
1645
|
if (event.pointerType === "touch") return;
|
|
1642
1646
|
swipe$1.pointerHandlers.onPointerMove(event);
|
|
1643
1647
|
});
|
|
1644
|
-
const onPointerUp = composeEventHandlers(() => internalProps.onPointerUp, (
|
|
1648
|
+
const onPointerUp = composeEventHandlers(liveEventHandler(() => internalProps.onPointerUp), (event) => {
|
|
1645
1649
|
if (handlePointerEnd(event)) swipe$1.pointerHandlers.onPointerUp(event);
|
|
1646
1650
|
});
|
|
1647
|
-
const onPointerCancel = composeEventHandlers(() => internalProps.onPointerCancel, (
|
|
1651
|
+
const onPointerCancel = composeEventHandlers(liveEventHandler(() => internalProps.onPointerCancel), (event) => {
|
|
1648
1652
|
if (handlePointerEnd(event)) swipe$1.pointerHandlers.onPointerCancel(event);
|
|
1649
1653
|
});
|
|
1650
|
-
const onTouchStart = composeEventHandlers(() => internalProps.onTouchStart, (
|
|
1654
|
+
const onTouchStart = composeEventHandlers(liveEventHandler(() => internalProps.onTouchStart), (event) => {
|
|
1651
1655
|
if (lastPointerType === "pen" && ignoreNextTouchStartFromPen) {
|
|
1652
1656
|
ignoreNextTouchStartFromPen = false;
|
|
1653
1657
|
resetTouchSwipeState(false);
|
|
@@ -1695,12 +1699,12 @@ function DrawerViewport(props) {
|
|
|
1695
1699
|
};
|
|
1696
1700
|
swipe$1.touchHandlers.onTouchStart(event);
|
|
1697
1701
|
});
|
|
1698
|
-
const onTouchEnd = composeEventHandlers(() => internalProps.onTouchEnd, (
|
|
1702
|
+
const onTouchEnd = composeEventHandlers(liveEventHandler(() => internalProps.onTouchEnd), (event) => {
|
|
1699
1703
|
virtualKeyboard?.onTouchEnd(event);
|
|
1700
1704
|
resetTouchTrackingState();
|
|
1701
1705
|
swipe$1.touchHandlers.onTouchEnd(event);
|
|
1702
1706
|
});
|
|
1703
|
-
const onTouchCancel = composeEventHandlers(() => internalProps.onTouchCancel, (
|
|
1707
|
+
const onTouchCancel = composeEventHandlers(liveEventHandler(() => internalProps.onTouchCancel), (event) => {
|
|
1704
1708
|
virtualKeyboard?.onTouchCancel();
|
|
1705
1709
|
resetTouchTrackingState();
|
|
1706
1710
|
swipe$1.touchHandlers.onTouchCancel(event);
|
|
@@ -1988,7 +1992,7 @@ function DrawerVirtualKeyboardProvider(props) {
|
|
|
1988
1992
|
restorePreemptedFocus = overrideGeometryDuringFocus(target, (keyboardViewport.top + keyboardViewport.bottom - rect.top - rect.bottom) / 2);
|
|
1989
1993
|
}
|
|
1990
1994
|
function alignFocusedKeyboardTarget() {
|
|
1991
|
-
|
|
1995
|
+
cancelKeyboardFocusFrame();
|
|
1992
1996
|
consumePreemptedFocus();
|
|
1993
1997
|
const target = focusedKeyboardTarget;
|
|
1994
1998
|
if (nestedDrawerOpen || !target || !contains(rootElement, target)) {
|