solid-baseui 0.1.0-alpha.0 → 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 +72 -0
- package/README.md +133 -15
- 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-grSdNHqW.js → FocusManager-q7z7PMV1.js} +94 -91
- package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
- package/dist/lib/client/{InternalBackdrop-cSK13gaM.js → InternalBackdrop-B8_lfUvf.js} +1 -1
- package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
- package/dist/lib/client/MenuSubmenuTrigger-DMb5CwTF.js +1584 -0
- package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-DyX5gY1e.js} +17 -11
- package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-BjRwcvbG.js} +138 -115
- package/dist/lib/client/PopupViewport-BanYHrD-.js +154 -0
- package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
- package/dist/lib/client/TriggerFocusGuards-Fzspp3Y1.js +51 -0
- package/dist/lib/client/accordion/index.js +1 -1
- package/dist/lib/client/accordion-CA2DfX67.js +381 -0
- package/dist/lib/client/alert-dialog/index.js +1 -1
- package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-Bup88Dpx.js} +2 -2
- package/dist/lib/client/autocomplete/index.js +1 -1
- package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-oyy_uRpU.js} +30 -25
- 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-DGyrciZJ.js +135 -0
- 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 +2 -2
- package/dist/lib/client/combobox-BGH8QLXH.js +401 -0
- package/dist/lib/client/compositeNavigation-DCt1sQon.js +82 -0
- package/dist/lib/client/{constants-BYjBUIIi.js → constants-ByOMFJAe.js} +105 -101
- 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-DcxDXUgB.js → createAnchorPositioning-DCXIApS1.js} +149 -146
- 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/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
- package/dist/lib/client/createFocusInteraction-DQPWkZe2.js +60 -0
- package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
- package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-CSNpMz5v.js} +4 -4
- package/dist/lib/client/{createTransitionStatus-B1L-whed.js → createTransitionStatus-BL_cPSEA.js} +12 -12
- package/dist/lib/client/dialog/index.js +1 -1
- package/dist/lib/client/{dialog-DkaQwIgP.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-uKoNBwDU.js +1540 -0
- package/dist/lib/client/field/index.js +1 -1
- package/dist/lib/client/field-DIMrgpBW.js +483 -0
- package/dist/lib/client/fieldset/index.js +1 -1
- package/dist/lib/client/fieldset-Byqk3noT.js +70 -0
- package/dist/lib/client/form/index.js +1 -1
- package/dist/lib/client/form-Bqq8wSLY.js +109 -0
- package/dist/lib/client/index.js +44 -42
- package/dist/lib/client/input/index.js +1 -1
- package/dist/lib/client/{input-gb0ejxkm.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/internals/form-context/index.js +1 -1
- package/dist/lib/client/internals/labelable-provider/index.js +1 -1
- package/dist/lib/client/{mergeStyleValue-C4ITiiIV.js → isSolidAccessor-BH_FevwH.js} +8 -15
- package/dist/lib/client/menu/index.js +1 -1
- package/dist/lib/client/menu-4rNLN6aX.js +334 -0
- 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/meter/index.js +1 -1
- package/dist/lib/client/meter-BvWdppcx.js +178 -0
- package/dist/lib/client/navigation-menu/index.js +1 -1
- package/dist/lib/client/navigation-menu-BbRyun3a.js +1070 -0
- package/dist/lib/client/number-field/index.js +1 -1
- package/dist/lib/client/number-field-hT_H0hVu.js +1043 -0
- 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-Cmvmuf1L.js +940 -0
- package/dist/lib/client/popupStateMapping-nhukB8NK.js +371 -0
- package/dist/lib/client/preview-card/index.js +1 -1
- package/dist/lib/client/preview-card-Dtu8AnBN.js +632 -0
- package/dist/lib/client/progress/index.js +1 -1
- package/dist/lib/client/progress-AVKxvgpc.js +195 -0
- package/dist/lib/client/radio/index.js +1 -1
- package/dist/lib/client/radio-CeCU-Qqi.js +284 -0
- package/dist/lib/client/radio-group/index.js +1 -1
- package/dist/lib/client/radio-group-NbuJvjQe.js +195 -0
- package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
- package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DVAR5dQD.js} +74 -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-Dad51Xbn.js +1934 -0
- package/dist/lib/client/separator/index.js +1 -1
- 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-Bzuu5EIg.js +306 -0
- package/dist/lib/client/tabs/index.js +1 -1
- package/dist/lib/client/tabs-DWiBDv8D.js +695 -0
- package/dist/lib/client/toast/index.js +1 -1
- package/dist/lib/client/toast-DmtPJW2k.js +1118 -0
- package/dist/lib/client/toggle/index.js +1 -1
- package/dist/lib/client/toggle-CAe-Z8Xn.js +142 -0
- package/dist/lib/client/toggle-group/index.js +1 -1
- package/dist/lib/client/toggle-group-BbQg5s-m.js +134 -0
- package/dist/lib/client/toolbar/index.js +1 -1
- package/dist/lib/client/toolbar-BXT_g-oX.js +504 -0
- package/dist/lib/client/tooltip/index.js +1 -1
- package/dist/lib/client/tooltip-h2r2_Xuo.js +850 -0
- package/dist/lib/client/use-render/index.js +2 -0
- package/dist/lib/client/useFilteredItems-BX0BEuSI.js +2301 -0
- package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
- package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-BGIISmG7.js} +37 -46
- package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-C2ZDGf42.js} +12 -15
- package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-CDMMyvuj.js} +62 -26
- package/dist/lib/server/{FieldRootContext-IC-LWzVp.js → FieldRootContext-Bfpna6gA.js} +3 -3
- package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-D-xgblGs.js} +9 -5
- package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
- package/dist/lib/server/{InternalBackdrop-C_iDPVR-.js → InternalBackdrop-D_2zAWnl.js} +1 -1
- package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
- package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-BMQKlOvU.js} +177 -210
- package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-QNj4mED2.js} +14 -5
- package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-evylvVnN.js} +42 -15
- package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-BDttjORN.js} +38 -28
- package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
- package/dist/lib/server/TriggerFocusGuards-B9GNbLrL.js +61 -0
- package/dist/lib/server/accordion/index.js +39 -77
- package/dist/lib/server/alert-dialog/index.js +2 -2
- package/dist/lib/server/autocomplete/index.js +14 -5
- package/dist/lib/server/avatar/index.js +90 -51
- package/dist/lib/server/button/index.js +14 -15
- package/dist/lib/server/checkbox/index.js +37 -64
- package/dist/lib/server/checkbox-group/index.js +21 -11
- package/dist/lib/server/collapsible/index.js +42 -49
- package/dist/lib/server/combobox/index.js +79 -50
- package/dist/lib/server/{compositeNavigation-BRVT1C38.js → compositeNavigation-D5jKM4yk.js} +32 -1
- package/dist/lib/server/{constants-9H__9xbS.js → constants-ByqXubhO.js} +10 -5
- package/dist/lib/server/context-menu/index.js +14 -16
- package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-DrQYe7RS.js} +12 -7
- 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/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
- package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DFKr4G7a.js} +22 -2
- package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
- package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-Cg0-lLf4.js} +2 -2
- package/dist/lib/server/{createTransitionStatus-BTlrerSS.js → createTransitionStatus-184v7j3-.js} +2 -2
- 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 +96 -100
- package/dist/lib/server/field/index.js +110 -98
- package/dist/lib/server/fieldset/index.js +13 -16
- package/dist/lib/server/form/index.js +18 -14
- package/dist/lib/server/index.js +5 -3
- 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/internals/form-context/index.js +1 -1
- package/dist/lib/server/internals/labelable-provider/index.js +1 -1
- package/dist/lib/server/{mergeStyleValue-Db8bRCM4.js → isSolidAccessor-CZpzAH5l.js} +7 -21
- package/dist/lib/server/menu/index.js +30 -29
- package/dist/lib/server/menubar/index.js +10 -35
- package/dist/lib/server/mergeStyleValue-DecVaoac.js +20 -0
- package/dist/lib/server/meter/index.js +20 -32
- package/dist/lib/server/navigation-menu/index.js +67 -138
- package/dist/lib/server/number-field/index.js +64 -62
- package/dist/lib/server/otp-field/index.js +19 -22
- package/dist/lib/server/popover/index.js +61 -77
- package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-VHqr6M4H.js} +19 -17
- package/dist/lib/server/preview-card/index.js +39 -50
- package/dist/lib/server/progress/index.js +21 -33
- package/dist/lib/server/radio/index.js +24 -45
- package/dist/lib/server/radio-group/index.js +12 -13
- package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
- package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-B8QtiIZ3.js} +6 -1
- package/dist/lib/server/scroll-area/index.js +40 -49
- package/dist/lib/server/{scrollable-CjsSxbGr.js → scrollable-C9Pgq8T5.js} +1 -1
- package/dist/lib/server/select/index.js +128 -213
- package/dist/lib/server/separator/index.js +1 -1
- package/dist/lib/server/slider/index.js +39 -52
- package/dist/lib/server/switch/index.js +22 -32
- package/dist/lib/server/tabs/index.js +197 -137
- package/dist/lib/server/toast/index.js +78 -95
- package/dist/lib/server/toggle/index.js +11 -13
- package/dist/lib/server/toggle-group/index.js +11 -9
- package/dist/lib/server/toolbar/index.js +76 -93
- package/dist/lib/server/tooltip/index.js +53 -57
- package/dist/lib/server/use-render/index.js +2 -0
- package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-BmhL0nf1.js} +335 -316
- package/dist/lib/server/useRender-CryVdCjs.js +16 -0
- package/dist/lib/types/accordion/header/AccordionHeader.d.ts +1 -1
- package/dist/lib/types/accordion/item/AccordionItem.d.ts +1 -1
- package/dist/lib/types/accordion/panel/AccordionPanel.d.ts +1 -1
- package/dist/lib/types/accordion/root/AccordionRoot.d.ts +2 -7
- package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +7 -7
- package/dist/lib/types/alert-dialog/trigger/AlertDialogTrigger.d.ts +1 -2
- package/dist/lib/types/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -0
- package/dist/lib/types/avatar/fallback/AvatarFallback.d.ts +2 -2
- package/dist/lib/types/avatar/image/AvatarImage.d.ts +9 -3
- package/dist/lib/types/avatar/image/createImageLoadingStatus.d.ts +3 -2
- package/dist/lib/types/avatar/root/AvatarRoot.d.ts +1 -1
- package/dist/lib/types/button/Button.d.ts +1 -1
- package/dist/lib/types/checkbox-group/CheckboxGroupContext.d.ts +4 -1
- package/dist/lib/types/collapsible/panel/CollapsiblePanel.d.ts +1 -1
- package/dist/lib/types/collapsible/root/CollapsibleRoot.d.ts +1 -1
- package/dist/lib/types/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
- package/dist/lib/types/combobox/chip/ComboboxChip.d.ts +2 -0
- package/dist/lib/types/combobox/index.d.ts +2 -0
- package/dist/lib/types/combobox/index.parts.d.ts +1 -0
- package/dist/lib/types/combobox/items/createItems.d.ts +42 -0
- package/dist/lib/types/combobox/root/AriaCombobox.d.ts +4 -0
- package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +17 -8
- package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
- package/dist/lib/types/combobox/store/ComboboxStore.d.ts +1 -0
- package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
- package/dist/lib/types/combobox/utils/handleInputPress.d.ts +1 -1
- package/dist/lib/types/dialog/backdrop/DialogBackdrop.d.ts +1 -1
- package/dist/lib/types/dialog/description/DialogDescription.d.ts +1 -1
- package/dist/lib/types/dialog/title/DialogTitle.d.ts +1 -1
- package/dist/lib/types/dialog/viewport/DialogViewport.d.ts +1 -1
- package/dist/lib/types/drawer/backdrop/DrawerBackdrop.d.ts +1 -1
- package/dist/lib/types/drawer/content/DrawerContent.d.ts +1 -1
- package/dist/lib/types/drawer/indent/DrawerIndent.d.ts +1 -1
- package/dist/lib/types/drawer/indent-background/DrawerIndentBackground.d.ts +1 -1
- package/dist/lib/types/field/control/FieldControl.d.ts +5 -5
- package/dist/lib/types/field/root/FieldRoot.d.ts +1 -1
- package/dist/lib/types/field/root/createFieldValidation.d.ts +3 -2
- package/dist/lib/types/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/dist/lib/types/fieldset/root/FieldsetRoot.d.ts +1 -1
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/internals/composeEventHandlers.d.ts +9 -2
- package/dist/lib/types/internals/createTransitionStatus.d.ts +1 -1
- package/dist/lib/types/internals/field-root-context/FieldRootContext.d.ts +1 -0
- package/dist/lib/types/internals/form-context/FormContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/LabelableContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/createLabelableId.d.ts +3 -0
- package/dist/lib/types/internals/overlay/PopupPortal.d.ts +4 -2
- package/dist/lib/types/internals/overlay/createPopupPresence.d.ts +1 -0
- package/dist/lib/types/internals/overlay/dom.d.ts +2 -0
- package/dist/lib/types/menu/root/MenuRootContext.d.ts +1 -0
- package/dist/lib/types/meter/indicator/MeterIndicator.d.ts +1 -1
- package/dist/lib/types/meter/label/MeterLabel.d.ts +1 -1
- package/dist/lib/types/meter/root/MeterRoot.d.ts +1 -1
- package/dist/lib/types/meter/track/MeterTrack.d.ts +1 -1
- package/dist/lib/types/meter/value/MeterValue.d.ts +1 -1
- package/dist/lib/types/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -0
- package/dist/lib/types/number-field/input/NumberFieldInput.d.ts +5 -5
- package/dist/lib/types/number-field/root/NumberFieldRootContext.d.ts +1 -0
- package/dist/lib/types/popover/arrow/PopoverArrow.d.ts +1 -1
- package/dist/lib/types/popover/backdrop/PopoverBackdrop.d.ts +1 -1
- package/dist/lib/types/popover/description/PopoverDescription.d.ts +1 -1
- package/dist/lib/types/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/dist/lib/types/popover/title/PopoverTitle.d.ts +1 -1
- package/dist/lib/types/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/dist/lib/types/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/dist/lib/types/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
- package/dist/lib/types/progress/indicator/ProgressIndicator.d.ts +1 -1
- package/dist/lib/types/progress/label/ProgressLabel.d.ts +1 -1
- package/dist/lib/types/progress/root/ProgressRoot.d.ts +1 -1
- package/dist/lib/types/progress/track/ProgressTrack.d.ts +1 -1
- package/dist/lib/types/progress/value/ProgressValue.d.ts +1 -1
- package/dist/lib/types/radio/indicator/RadioIndicator.d.ts +2 -2
- package/dist/lib/types/scroll-area/content/ScrollAreaContent.d.ts +1 -1
- package/dist/lib/types/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/dist/lib/types/scroll-area/root/ScrollAreaRoot.d.ts +1 -1
- package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +2 -1
- package/dist/lib/types/scroll-area/thumb/ScrollAreaThumb.d.ts +1 -1
- package/dist/lib/types/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
- package/dist/lib/types/separator/Separator.d.ts +1 -1
- package/dist/lib/types/slider/track/SliderTrack.d.ts +2 -2
- package/dist/lib/types/tabs/indicator/prehydrationScript.d.ts +1 -1
- package/dist/lib/types/tabs/list/TabsList.d.ts +1 -1
- package/dist/lib/types/tabs/panel/TabsPanel.d.ts +1 -1
- package/dist/lib/types/tabs/root/TabsRoot.d.ts +1 -1
- package/dist/lib/types/tabs/tab/TabsTab.d.ts +1 -1
- package/dist/lib/types/toast/createToastManager.d.ts +2 -2
- package/dist/lib/types/toast/store/ToastStore.d.ts +1 -1
- package/dist/lib/types/toast/useToastManager.d.ts +1 -1
- package/dist/lib/types/toggle/Toggle.d.ts +1 -1
- package/dist/lib/types/toggle-group/ToggleGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/group/ToolbarGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +10 -3
- package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +10 -4
- package/dist/lib/types/toolbar/separator/ToolbarSeparator.d.ts +1 -1
- package/dist/lib/types/tooltip/arrow/TooltipArrow.d.ts +1 -1
- package/dist/lib/types/tooltip/positioner/TooltipPositioner.d.ts +1 -1
- package/dist/lib/types/types/index.d.ts +7 -3
- package/dist/lib/types/use-render/index.d.ts +2 -0
- package/dist/lib/types/use-render/useRender.d.ts +10 -0
- package/package.json +24 -11
- package/dist/lib/client/DialogHandle-DrN2YWCv.js +0 -518
- package/dist/lib/client/DialogPopup-ZlqmGfdk.js +0 -136
- package/dist/lib/client/FieldControl-Bc-z2og6.js +0 -116
- package/dist/lib/client/MenuSubmenuTrigger-QZkQ0F2v.js +0 -1570
- package/dist/lib/client/PopupViewport-DgrIqQea.js +0 -152
- package/dist/lib/client/Separator-9DboD_Si.js +0 -25
- package/dist/lib/client/TriggerFocusGuards-CQ-JuASy.js +0 -56
- package/dist/lib/client/accordion-sOXt9AlG.js +0 -399
- package/dist/lib/client/avatar-AF9vyD4q.js +0 -146
- package/dist/lib/client/button-DpUi-2g8.js +0 -82
- package/dist/lib/client/checkbox-BbAwOptH.js +0 -441
- package/dist/lib/client/checkbox-group-CSSp_805.js +0 -128
- package/dist/lib/client/collapsible-BIbje_ub.js +0 -232
- package/dist/lib/client/combobox-8O-vgTLL.js +0 -352
- package/dist/lib/client/compositeNavigation-sxniYTc7.js +0 -58
- package/dist/lib/client/context-menu-BTMkXtrs.js +0 -217
- package/dist/lib/client/createFocusInteraction-D4w1-235.js +0 -50
- package/dist/lib/client/drawer-Ce2cChLt.js +0 -1550
- package/dist/lib/client/field-C-o7jzKW.js +0 -469
- package/dist/lib/client/fieldset-BQTAWv2L.js +0 -65
- package/dist/lib/client/form-BINBiW5L.js +0 -106
- package/dist/lib/client/menu-DeMT08oD.js +0 -326
- package/dist/lib/client/menubar-C4aomSYv.js +0 -185
- package/dist/lib/client/meter-xSU37Q0m.js +0 -171
- package/dist/lib/client/navigation-menu-ZILQmdn6.js +0 -1083
- package/dist/lib/client/number-field-B8CsTb_8.js +0 -1035
- package/dist/lib/client/otp-field-DBkMcnog.js +0 -582
- package/dist/lib/client/popover-CQwyp-fs.js +0 -929
- package/dist/lib/client/popupStateMapping-C9eZl19i.js +0 -367
- package/dist/lib/client/preview-card-D_2Q8lpC.js +0 -625
- package/dist/lib/client/progress-D7r0xAC9.js +0 -188
- package/dist/lib/client/radio-CzGQ81z1.js +0 -299
- package/dist/lib/client/radio-group-DpHlBKA6.js +0 -193
- package/dist/lib/client/runOnceAnimationsFinish-15EM-Z4l.js +0 -48
- package/dist/lib/client/scroll-area-CffM4U0R.js +0 -701
- package/dist/lib/client/select-IFhiEg73.js +0 -1940
- package/dist/lib/client/slider-BCagYmGp.js +0 -921
- package/dist/lib/client/switch-RIJeDnvS.js +0 -308
- package/dist/lib/client/tabs-fOAKs7r3.js +0 -696
- package/dist/lib/client/toast-D2P8UqUs.js +0 -1108
- package/dist/lib/client/toggle-group-0Aue0owJ.js +0 -129
- package/dist/lib/client/toggle-momVEIBL.js +0 -138
- package/dist/lib/client/toolbar-Du22aKCv.js +0 -492
- package/dist/lib/client/tooltip-CyK61fl1.js +0 -844
- package/dist/lib/client/useFilteredItems-DTekHz39.js +0 -2223
- package/dist/lib/client/withoutComponentBinding-CcCW7fSc.js +0 -13
- package/dist/lib/server/TriggerFocusGuards-sbGwf45f.js +0 -63
- package/dist/lib/server/withoutComponentBinding-BHaWr5kU.js +0 -20
- package/dist/lib/types/internals/withoutComponentBinding.d.ts +0 -7
|
@@ -0,0 +1,1540 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { t } from "./useRender-CxZ8PI-g.js";
|
|
3
|
+
import { getStateAttributesProps as n } from "./internals/getStateAttributesProps.js";
|
|
4
|
+
import { A as r, a as i } from "./reasons-Co5CzjKq.js";
|
|
5
|
+
import { n as a, t as o } from "./resolveStyle-XcgAuaKR.js";
|
|
6
|
+
import { createChangeEventDetails as s } from "./internals/createBaseUIEventDetails.js";
|
|
7
|
+
import { TransitionStatusDataAttributes as c } from "./internals/stateAttributesMapping.js";
|
|
8
|
+
import { composeEventHandlers as l, liveEventHandler as u } from "./internals/composeEventHandlers.js";
|
|
9
|
+
import { h as d, i as f, l as p, m, n as h, o as g, t as _, u as v } from "./dom-lDdayFF_.js";
|
|
10
|
+
import { n as y } from "./PopupStore-BjRwcvbG.js";
|
|
11
|
+
import { r as b, t as x } from "./popupStateMapping-nhukB8NK.js";
|
|
12
|
+
import { t as S } from "./FocusManager-q7z7PMV1.js";
|
|
13
|
+
import { a as C, c as w, d as T, f as E, h as D, i as O, l as k, m as A, o as j, r as M, s as N, t as P } from "./DialogHandle-DluOK_7u.js";
|
|
14
|
+
import { n as F, t as I } from "./scrollable-BVaDUXng.js";
|
|
15
|
+
import { t as L } from "./platform-Bk5Q32mf.js";
|
|
16
|
+
import { a as ee, i as R, o as te, r as ne, s as z, t as re } from "./constants-ByOMFJAe.js";
|
|
17
|
+
import { createComponent as B, getNextElement as ie, mergeProps as ae, runHydrationEvents as V, spread as H, template as U } from "@solidjs/web";
|
|
18
|
+
import { Show as oe, createContext as se, createEffect as W, createMemo as G, createSignal as K, createUniqueId as ce, flush as le, merge as q, omit as ue, onCleanup as de, onSettled as fe, untrack as J, useContext as pe } from "solid-js";
|
|
19
|
+
//#region src/drawer/popup/DrawerPopupCssVars.ts
|
|
20
|
+
var Y = /* @__PURE__ */ function(e) {
|
|
21
|
+
return e.nestedDrawers = "--nested-drawers", e.height = "--drawer-height", e.frontmostHeight = "--drawer-frontmost-height", e.swipeMovementX = "--drawer-swipe-movement-x", e.swipeMovementY = "--drawer-swipe-movement-y", e.snapPointOffset = "--drawer-snap-point-offset", e.swipeStrength = "--drawer-swipe-strength", e;
|
|
22
|
+
}({}), X = /* @__PURE__ */ function(e) {
|
|
23
|
+
return e.swipeProgress = "--drawer-swipe-progress", e;
|
|
24
|
+
}({}), me = /* @__PURE__ */ U("<div>");
|
|
25
|
+
function Z(e) {
|
|
26
|
+
let r = D(), i = e, s = ue(e, "render", "class", "forceRender", "ref", "style"), c = G(() => ({
|
|
27
|
+
open: r.store.open(),
|
|
28
|
+
transitionStatus: r.presence.transitionStatus()
|
|
29
|
+
})), l = t(e, () => c(), (e) => (() => {
|
|
30
|
+
var t = ie(me);
|
|
31
|
+
return H(t, e, !1), V(), t;
|
|
32
|
+
})()), u = G(() => a(e.class, c())), d = G(() => E({
|
|
33
|
+
"pointer-events": r.store.open() ? void 0 : "none",
|
|
34
|
+
"user-select": "none",
|
|
35
|
+
"-webkit-user-select": "none",
|
|
36
|
+
[X.swipeProgress]: "0",
|
|
37
|
+
[Y.swipeStrength]: "1"
|
|
38
|
+
}, o(e.style, c()))), f = G(() => n(c(), T)), p = G(() => !!i.forceRender || !r.nested);
|
|
39
|
+
function m() {
|
|
40
|
+
let e = null;
|
|
41
|
+
return de(() => {
|
|
42
|
+
r.backdropElement() === e && r.setBackdropElement(null);
|
|
43
|
+
}), B(l, ae({
|
|
44
|
+
ref: [((t) => {
|
|
45
|
+
e = t, r.setBackdropElement(t);
|
|
46
|
+
}), i.ref],
|
|
47
|
+
role: "presentation",
|
|
48
|
+
get hidden() {
|
|
49
|
+
return !r.presence.mounted();
|
|
50
|
+
},
|
|
51
|
+
get class() {
|
|
52
|
+
return u();
|
|
53
|
+
},
|
|
54
|
+
get style() {
|
|
55
|
+
return d();
|
|
56
|
+
}
|
|
57
|
+
}, f, s));
|
|
58
|
+
}
|
|
59
|
+
return B(oe, {
|
|
60
|
+
get when() {
|
|
61
|
+
return p();
|
|
62
|
+
},
|
|
63
|
+
get children() {
|
|
64
|
+
return B(m, {});
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/drawer/content/DrawerContentDataAttributes.ts
|
|
70
|
+
var he = "data-drawer-content", ge = /* @__PURE__ */ U("<div>");
|
|
71
|
+
function _e(e) {
|
|
72
|
+
D();
|
|
73
|
+
let n = e, r = ue(e, "render", "class", "ref", "style"), i = {}, s = t(e, () => i, (e) => (() => {
|
|
74
|
+
var t = ie(ge);
|
|
75
|
+
return H(t, e, !1), V(), t;
|
|
76
|
+
})()), c = G(() => a(e.class, i)), l = G(() => o(e.style, i));
|
|
77
|
+
return B(s, ae({ ref: [n.ref] }, { [he]: "" }, {
|
|
78
|
+
get class() {
|
|
79
|
+
return c();
|
|
80
|
+
},
|
|
81
|
+
get style() {
|
|
82
|
+
return l();
|
|
83
|
+
}
|
|
84
|
+
}, r));
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/drawer/provider/DrawerProviderContext.ts
|
|
88
|
+
var ve = Symbol("DrawerProviderContext"), Q = se(ve);
|
|
89
|
+
function ye() {
|
|
90
|
+
let e = pe(Q);
|
|
91
|
+
return e === ve ? void 0 : e;
|
|
92
|
+
}
|
|
93
|
+
function be() {
|
|
94
|
+
let e = {
|
|
95
|
+
swipeProgress: 0,
|
|
96
|
+
frontmostHeight: 0
|
|
97
|
+
}, t = /* @__PURE__ */ new Set();
|
|
98
|
+
return {
|
|
99
|
+
getSnapshot: () => e,
|
|
100
|
+
set(n) {
|
|
101
|
+
let r = e.swipeProgress;
|
|
102
|
+
n.swipeProgress !== void 0 && (r = Number.isFinite(n.swipeProgress) ? n.swipeProgress : 0);
|
|
103
|
+
let i = e.frontmostHeight;
|
|
104
|
+
n.frontmostHeight !== void 0 && (i = Number.isFinite(n.frontmostHeight) ? n.frontmostHeight : 0), (r !== e.swipeProgress || i !== e.frontmostHeight) && (e = {
|
|
105
|
+
swipeProgress: r,
|
|
106
|
+
frontmostHeight: i
|
|
107
|
+
}, t.forEach((e) => {
|
|
108
|
+
e();
|
|
109
|
+
}));
|
|
110
|
+
},
|
|
111
|
+
subscribe(e) {
|
|
112
|
+
return t.add(e), () => {
|
|
113
|
+
t.delete(e);
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/drawer/indent-background/DrawerIndentBackground.tsx
|
|
120
|
+
var xe = /* @__PURE__ */ U("<div>"), Se = { "data-active": "" }, Ce = { "data-inactive": "" }, we = { active: (e) => e ? Se : Ce };
|
|
121
|
+
function Te(e) {
|
|
122
|
+
let r = ye(), i = e, s = ue(e, "render", "class", "ref", "style"), c = () => ({ active: r?.active() ?? !1 }), l = () => a(e.class, c()), u = () => o(e.style, c()), d = () => n(c(), we), f = t(e, c, (e) => (() => {
|
|
123
|
+
var t = ie(xe);
|
|
124
|
+
return H(t, e, !1), V(), t;
|
|
125
|
+
})());
|
|
126
|
+
return B(f, ae({
|
|
127
|
+
ref: [i.ref],
|
|
128
|
+
get class() {
|
|
129
|
+
return l();
|
|
130
|
+
},
|
|
131
|
+
get style() {
|
|
132
|
+
return u();
|
|
133
|
+
}
|
|
134
|
+
}, d, s));
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/drawer/indent/DrawerIndent.tsx
|
|
138
|
+
var Ee = /* @__PURE__ */ U("<div>");
|
|
139
|
+
function De(e) {
|
|
140
|
+
let r = ye(), i = e, s = ue(e, "render", "class", "ref", "style"), c = () => ({ active: r?.active() ?? !1 }), l = () => a(e.class, c()), u = () => E({ [X.swipeProgress]: "0" }, o(e.style, c())), d = () => n(c(), we), f = null, p = [((e) => {
|
|
141
|
+
f = e;
|
|
142
|
+
}), i.ref], m = t(e, c, (e) => (() => {
|
|
143
|
+
var t = ie(Ee);
|
|
144
|
+
return H(t, e, !1), V(), t;
|
|
145
|
+
})()), h = B(m, ae({
|
|
146
|
+
ref: p,
|
|
147
|
+
get class() {
|
|
148
|
+
return l();
|
|
149
|
+
},
|
|
150
|
+
get style() {
|
|
151
|
+
return u();
|
|
152
|
+
}
|
|
153
|
+
}, d, s));
|
|
154
|
+
return W(() => r?.visualStateStore, (e) => {
|
|
155
|
+
let t = f;
|
|
156
|
+
if (!t || !e) return;
|
|
157
|
+
function n() {
|
|
158
|
+
let { swipeProgress: n, frontmostHeight: r } = e.getSnapshot();
|
|
159
|
+
t.style.setProperty(X.swipeProgress, n <= 0 ? "0" : `${n}`), r <= 0 ? t.style.removeProperty(Y.height) : t.style.setProperty(Y.height, `${r}px`);
|
|
160
|
+
}
|
|
161
|
+
n();
|
|
162
|
+
let r = e.subscribe(n);
|
|
163
|
+
return () => {
|
|
164
|
+
r(), t.style.setProperty(X.swipeProgress, "0"), t.style.removeProperty(Y.height);
|
|
165
|
+
};
|
|
166
|
+
}), h;
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/drawer/root/DrawerRootContext.ts
|
|
170
|
+
var Oe = Symbol("DrawerRootContext"), ke = se(Oe);
|
|
171
|
+
function Ae(e = !1) {
|
|
172
|
+
let t = pe(ke);
|
|
173
|
+
if (t === Oe) {
|
|
174
|
+
if (e) return;
|
|
175
|
+
throw Error("Base UI: DrawerRootContext is missing. Drawer parts must be placed within <Drawer.Root>.");
|
|
176
|
+
}
|
|
177
|
+
return t;
|
|
178
|
+
}
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/drawer/root/createDrawerSnapPoints.ts
|
|
181
|
+
function je(e, t) {
|
|
182
|
+
let n = e + t;
|
|
183
|
+
return n >= 0 ? t : -Math.sqrt(-n) - e;
|
|
184
|
+
}
|
|
185
|
+
function Me(e, t, n) {
|
|
186
|
+
if (!Number.isFinite(t) || t <= 0) return null;
|
|
187
|
+
if (typeof e == "number") return Number.isFinite(e) ? e <= 1 ? z(e, 0, 1) * t : e : null;
|
|
188
|
+
let r = e.trim();
|
|
189
|
+
if (r.endsWith("px")) {
|
|
190
|
+
let e = Number.parseFloat(r);
|
|
191
|
+
return Number.isFinite(e) ? e : null;
|
|
192
|
+
}
|
|
193
|
+
if (r.endsWith("rem")) {
|
|
194
|
+
let e = Number.parseFloat(r);
|
|
195
|
+
return Number.isFinite(e) ? e * n : null;
|
|
196
|
+
}
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
function Ne(e, t) {
|
|
200
|
+
let n = -1, r = Infinity;
|
|
201
|
+
for (let i = 0; i < e.length; i += 1) {
|
|
202
|
+
let a = Math.abs(e[i] - t);
|
|
203
|
+
a < r && (r = a, n = i);
|
|
204
|
+
}
|
|
205
|
+
return n;
|
|
206
|
+
}
|
|
207
|
+
function Pe() {
|
|
208
|
+
let e = D(), t = Ae(), [n, r] = K(0, { ownedWrite: !0 }), [i, a] = K(16, { ownedWrite: !0 });
|
|
209
|
+
W(() => e.viewportElement(), (e) => {
|
|
210
|
+
function t() {
|
|
211
|
+
let t = m(e).documentElement;
|
|
212
|
+
r(e ? e.offsetHeight : t.clientHeight);
|
|
213
|
+
let n = Number.parseFloat(d(t).getComputedStyle(t).fontSize);
|
|
214
|
+
Number.isFinite(n) && a(n);
|
|
215
|
+
}
|
|
216
|
+
if (t(), !e || typeof ResizeObserver != "function") return;
|
|
217
|
+
let n = new ResizeObserver(t);
|
|
218
|
+
return n.observe(e), () => n.disconnect();
|
|
219
|
+
});
|
|
220
|
+
let o = G(() => {
|
|
221
|
+
let e = t.snapPoints(), r = n(), a = t.popupHeight();
|
|
222
|
+
if (!e || e.length === 0 || r <= 0 || a <= 0) return [];
|
|
223
|
+
let o = i(), s = Math.min(a, r), c = e.map((e) => {
|
|
224
|
+
let t = Me(e, r, o);
|
|
225
|
+
if (t === null) return null;
|
|
226
|
+
let n = z(t, 0, s);
|
|
227
|
+
return {
|
|
228
|
+
value: e,
|
|
229
|
+
height: n,
|
|
230
|
+
offset: Math.max(0, a - n)
|
|
231
|
+
};
|
|
232
|
+
}).filter((e) => !!e);
|
|
233
|
+
if (c.length <= 1) return c;
|
|
234
|
+
let l = [], u = [];
|
|
235
|
+
for (let e = c.length - 1; e >= 0; --e) {
|
|
236
|
+
let t = c[e];
|
|
237
|
+
u.some((e) => Math.abs(e - t.height) <= 1) || (u.push(t.height), l.push(t));
|
|
238
|
+
}
|
|
239
|
+
return l.reverse(), l;
|
|
240
|
+
}), s = G(() => {
|
|
241
|
+
let e = t.activeSnapPoint();
|
|
242
|
+
if (e === null) return;
|
|
243
|
+
let r = o(), a = r.find((t) => Object.is(t.value, e));
|
|
244
|
+
if (a) return a;
|
|
245
|
+
let s = n(), c = Math.min(t.popupHeight(), s), l = Me(e, s, i());
|
|
246
|
+
if (l === null) return;
|
|
247
|
+
let u = z(l, 0, c);
|
|
248
|
+
return r[Ne(r.map((e) => e.height), u)];
|
|
249
|
+
});
|
|
250
|
+
return {
|
|
251
|
+
snapPoints: t.snapPoints,
|
|
252
|
+
activeSnapPoint: t.activeSnapPoint,
|
|
253
|
+
setActiveSnapPoint: t.setActiveSnapPoint,
|
|
254
|
+
popupHeight: t.popupHeight,
|
|
255
|
+
viewportHeight: n,
|
|
256
|
+
resolvedSnapPoints: o,
|
|
257
|
+
activeSnapPointOffset: () => s()?.offset ?? null
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/drawer/viewport/DrawerViewportContext.ts
|
|
262
|
+
var Fe = Symbol("DrawerViewportContext"), Ie = se(Fe);
|
|
263
|
+
function Le() {
|
|
264
|
+
let e = pe(Ie);
|
|
265
|
+
return e === Fe ? void 0 : e;
|
|
266
|
+
}
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/drawer/popup/DrawerPopupDataAttributes.ts
|
|
269
|
+
var $ = /* @__PURE__ */ function(e) {
|
|
270
|
+
return e[e.open = x.open] = "open", e[e.closed = x.closed] = "closed", e[e.startingStyle = x.startingStyle] = "startingStyle", e[e.endingStyle = x.endingStyle] = "endingStyle", e.expanded = "data-expanded", e.nestedDrawerOpen = "data-nested-drawer-open", e.nestedDrawerSwiping = "data-nested-drawer-swiping", e.swipeDismiss = "data-swipe-dismiss", e.swipeDirection = "data-swipe-direction", e.swiping = "data-swiping", e;
|
|
271
|
+
}({}), Re = /* @__PURE__ */ U("<div>"), ze = /* @__PURE__ */ new Set([
|
|
272
|
+
"ArrowUp",
|
|
273
|
+
"ArrowDown",
|
|
274
|
+
"ArrowLeft",
|
|
275
|
+
"ArrowRight",
|
|
276
|
+
"Home",
|
|
277
|
+
"End"
|
|
278
|
+
]), Be = !1;
|
|
279
|
+
function Ve() {
|
|
280
|
+
if (!Be) {
|
|
281
|
+
if (typeof CSS < "u" && "registerProperty" in CSS) {
|
|
282
|
+
for (let e of [
|
|
283
|
+
Y.swipeMovementX,
|
|
284
|
+
Y.swipeMovementY,
|
|
285
|
+
Y.snapPointOffset
|
|
286
|
+
]) try {
|
|
287
|
+
CSS.registerProperty({
|
|
288
|
+
name: e,
|
|
289
|
+
syntax: "<length>",
|
|
290
|
+
inherits: !1,
|
|
291
|
+
initialValue: "0px"
|
|
292
|
+
});
|
|
293
|
+
} catch {}
|
|
294
|
+
for (let { name: e, initialValue: t } of [{
|
|
295
|
+
name: X.swipeProgress,
|
|
296
|
+
initialValue: "0"
|
|
297
|
+
}, {
|
|
298
|
+
name: Y.swipeStrength,
|
|
299
|
+
initialValue: "1"
|
|
300
|
+
}]) try {
|
|
301
|
+
CSS.registerProperty({
|
|
302
|
+
name: e,
|
|
303
|
+
syntax: "<number>",
|
|
304
|
+
inherits: !1,
|
|
305
|
+
initialValue: t
|
|
306
|
+
});
|
|
307
|
+
} catch {}
|
|
308
|
+
}
|
|
309
|
+
Be = !0;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
var He = { [$.expanded]: "" }, Ue = { [$.nestedDrawerOpen]: "" }, We = { [$.nestedDrawerSwiping]: "" }, Ge = { [$.swiping]: "" }, Ke = {
|
|
313
|
+
...b,
|
|
314
|
+
expanded: (e) => e ? He : null,
|
|
315
|
+
nestedDrawerOpen: (e) => e ? Ue : null,
|
|
316
|
+
nestedDrawerSwiping: (e) => e ? We : null,
|
|
317
|
+
swipeDirection: (e) => ({ [$.swipeDirection]: e }),
|
|
318
|
+
swiping: (e) => e ? Ge : null
|
|
319
|
+
};
|
|
320
|
+
function qe(e) {
|
|
321
|
+
N();
|
|
322
|
+
let r = D(), i = Ae(), s = Le(), c = Pe(), d = e, f = ue(e, "render", "class", "finalFocus", "id", "initialFocus", "onKeyDown", "ref", "style"), p = G(() => r.nestedOpenDrawerCount() > 0), m = G(() => s?.swiping() ?? !1), h = null, g = 0;
|
|
323
|
+
function _() {
|
|
324
|
+
if (!h) return;
|
|
325
|
+
let e = h.offsetHeight, t = J(i.frontmostHeight);
|
|
326
|
+
if (!(g > 0 && t > g && e > g)) {
|
|
327
|
+
if (g > 0 && J(i.hasNestedDrawer)) {
|
|
328
|
+
i.onPopupHeightChange(g);
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
e !== g && (g = e, i.onPopupHeightChange(e));
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
let v = G(() => r.store.track().popupElement), y = G(() => r.store.open());
|
|
335
|
+
W(() => ({
|
|
336
|
+
mounted: r.presence.mounted(),
|
|
337
|
+
nestedDrawerOpen: p(),
|
|
338
|
+
element: v()
|
|
339
|
+
}), (e) => {
|
|
340
|
+
if (!e.mounted) {
|
|
341
|
+
g = 0, i.onPopupHeightChange(0);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
if (!e.element || (Ve(), _(), typeof ResizeObserver != "function")) return;
|
|
345
|
+
let t = new ResizeObserver(_);
|
|
346
|
+
return t.observe(e.element), () => t.disconnect();
|
|
347
|
+
}), W(v, (e) => {
|
|
348
|
+
function t() {
|
|
349
|
+
if (!e) return;
|
|
350
|
+
let t = i.nestedSwipeProgressStore.getSnapshot();
|
|
351
|
+
e.style.setProperty(X.swipeProgress, t > 0 ? `${t}` : "0");
|
|
352
|
+
}
|
|
353
|
+
t();
|
|
354
|
+
let n = i.nestedSwipeProgressStore.subscribe(t);
|
|
355
|
+
return () => {
|
|
356
|
+
n(), e?.style.setProperty(X.swipeProgress, "0");
|
|
357
|
+
};
|
|
358
|
+
}), W(() => ({
|
|
359
|
+
open: y(),
|
|
360
|
+
frontmostHeight: i.frontmostHeight()
|
|
361
|
+
}), (e) => {
|
|
362
|
+
if (e.open) return i.notifyParentFrontmostHeight?.(e.frontmostHeight), () => i.notifyParentFrontmostHeight?.(0);
|
|
363
|
+
}), W(() => ({
|
|
364
|
+
open: y(),
|
|
365
|
+
transitionStatus: r.presence.transitionStatus()
|
|
366
|
+
}), (e) => {
|
|
367
|
+
if (i.notifyParentHasNestedDrawer) return i.notifyParentHasNestedDrawer(e.open || e.transitionStatus === "ending"), () => i.notifyParentHasNestedDrawer?.(!1);
|
|
368
|
+
});
|
|
369
|
+
let b = G(() => ({
|
|
370
|
+
open: r.store.open(),
|
|
371
|
+
transitionStatus: r.presence.transitionStatus(),
|
|
372
|
+
expanded: i.activeSnapPoint() === 1,
|
|
373
|
+
nested: r.nested,
|
|
374
|
+
nestedDrawerOpen: p(),
|
|
375
|
+
nestedDrawerSwiping: i.nestedSwiping(),
|
|
376
|
+
swipeDirection: i.swipeDirection(),
|
|
377
|
+
swiping: m()
|
|
378
|
+
})), x = t(e, () => b(), (e) => (() => {
|
|
379
|
+
var t = ie(Re);
|
|
380
|
+
return H(t, e, !1), V(), t;
|
|
381
|
+
})()), C = G(() => a(e.class, b())), w = G(() => n(b(), Ke)), T = G(() => {
|
|
382
|
+
let e = c.snapPoints(), t = i.swipeDirection(), n = e && e.length > 0 && (t === "down" || t === "up"), r = c.activeSnapPointOffset();
|
|
383
|
+
return !n || r === null ? null : t === "up" ? -r : r;
|
|
384
|
+
}), O = G(() => {
|
|
385
|
+
let e = s ? s.getDragStyles() : {}, t = c.snapPoints(), n = i.swipeDirection();
|
|
386
|
+
if (!(t && t.length > 0 && (n === "down" || n === "up")) || n !== "down") return e;
|
|
387
|
+
let r = Number.parseFloat(String(e[Y.swipeMovementY]));
|
|
388
|
+
return m() && Number.isFinite(r) ? {
|
|
389
|
+
...e,
|
|
390
|
+
transform: void 0,
|
|
391
|
+
[Y.swipeMovementY]: `${je(c.activeSnapPointOffset() ?? 0, r)}px`
|
|
392
|
+
} : {
|
|
393
|
+
...e,
|
|
394
|
+
transform: void 0
|
|
395
|
+
};
|
|
396
|
+
}), k = G(() => {
|
|
397
|
+
let t = i.frontmostHeight(), n = !i.hasNestedDrawer() && r.presence.transitionStatus() !== "ending", a = i.popupHeight(), c = s?.swipeStrength() ?? null, l = T();
|
|
398
|
+
return E({
|
|
399
|
+
...O(),
|
|
400
|
+
[X.swipeProgress]: "0",
|
|
401
|
+
[Y.nestedDrawers]: r.nestedOpenDrawerCount(),
|
|
402
|
+
[Y.height]: a && !n ? `${a}px` : void 0,
|
|
403
|
+
[Y.snapPointOffset]: typeof l == "number" ? `${l}px` : "0px",
|
|
404
|
+
[Y.frontmostHeight]: t ? `${t}px` : void 0,
|
|
405
|
+
[Y.swipeStrength]: typeof c == "number" && Number.isFinite(c) && c > 0 ? `${c}` : "1"
|
|
406
|
+
}, o(e.style, b()));
|
|
407
|
+
}), A = G(() => d.id ?? r.store.context.floatingId), j = G(() => d.initialFocus ?? (() => r.store.state.popupElement)), M = l(u(() => d.onKeyDown), (e) => {
|
|
408
|
+
ze.has(e.key) && e.stopPropagation();
|
|
409
|
+
});
|
|
410
|
+
W(() => A(), (e) => {
|
|
411
|
+
r.store.setPopupId(e);
|
|
412
|
+
}), de(() => {
|
|
413
|
+
r.store.state.popupElement === h && r.store.setPopupElement(null);
|
|
414
|
+
});
|
|
415
|
+
let P = B(x, ae({
|
|
416
|
+
ref: [((e) => {
|
|
417
|
+
h = e, r.store.setPopupElement(e);
|
|
418
|
+
}), d.ref],
|
|
419
|
+
get id() {
|
|
420
|
+
return A();
|
|
421
|
+
},
|
|
422
|
+
get role() {
|
|
423
|
+
return r.role;
|
|
424
|
+
},
|
|
425
|
+
tabIndex: -1,
|
|
426
|
+
"data-base-ui-focusable": "",
|
|
427
|
+
get hidden() {
|
|
428
|
+
return !r.presence.mounted();
|
|
429
|
+
},
|
|
430
|
+
get "aria-labelledby"() {
|
|
431
|
+
return r.titleId();
|
|
432
|
+
},
|
|
433
|
+
get "aria-describedby"() {
|
|
434
|
+
return r.descriptionId();
|
|
435
|
+
},
|
|
436
|
+
get class() {
|
|
437
|
+
return C();
|
|
438
|
+
},
|
|
439
|
+
get style() {
|
|
440
|
+
return k();
|
|
441
|
+
},
|
|
442
|
+
onKeyDown: M
|
|
443
|
+
}, w, f));
|
|
444
|
+
return B(S, {
|
|
445
|
+
get context() {
|
|
446
|
+
return r.store.context.floatingRoot;
|
|
447
|
+
},
|
|
448
|
+
get tree() {
|
|
449
|
+
return r.tree;
|
|
450
|
+
},
|
|
451
|
+
get disabled() {
|
|
452
|
+
return !r.presence.mounted();
|
|
453
|
+
},
|
|
454
|
+
get closeOnFocusOut() {
|
|
455
|
+
return !r.disablePointerDismissal();
|
|
456
|
+
},
|
|
457
|
+
get initialFocus() {
|
|
458
|
+
return j();
|
|
459
|
+
},
|
|
460
|
+
get returnFocus() {
|
|
461
|
+
return d.finalFocus;
|
|
462
|
+
},
|
|
463
|
+
get modal() {
|
|
464
|
+
return r.modal() !== !1;
|
|
465
|
+
},
|
|
466
|
+
restoreFocus: "popup",
|
|
467
|
+
get openInteractionType() {
|
|
468
|
+
return r.store.openMethod();
|
|
469
|
+
},
|
|
470
|
+
children: P
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
//#endregion
|
|
474
|
+
//#region src/drawer/provider/DrawerProvider.tsx
|
|
475
|
+
function Je(e) {
|
|
476
|
+
let [t, n] = K(0, {
|
|
477
|
+
equals: !1,
|
|
478
|
+
ownedWrite: !0
|
|
479
|
+
}), r = /* @__PURE__ */ new Set(), i = be(), a = () => (t(), r.size > 0);
|
|
480
|
+
function o(e, t) {
|
|
481
|
+
r.has(e) !== t && (t ? r.add(e) : r.delete(e), n((e) => e + 1));
|
|
482
|
+
}
|
|
483
|
+
return B(Q, {
|
|
484
|
+
value: {
|
|
485
|
+
setDrawerOpen: o,
|
|
486
|
+
removeDrawer: (e) => o(e, !1),
|
|
487
|
+
active: a,
|
|
488
|
+
visualStateStore: i
|
|
489
|
+
},
|
|
490
|
+
get children() {
|
|
491
|
+
return e.children;
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
//#endregion
|
|
496
|
+
//#region src/drawer/root/DrawerRoot.tsx
|
|
497
|
+
function Ye() {
|
|
498
|
+
let e = 0, t = /* @__PURE__ */ new Set();
|
|
499
|
+
return {
|
|
500
|
+
getSnapshot: () => e,
|
|
501
|
+
set(n) {
|
|
502
|
+
let r = Number.isFinite(n) ? n : 0;
|
|
503
|
+
r !== e && (e = r, t.forEach((e) => {
|
|
504
|
+
e();
|
|
505
|
+
}));
|
|
506
|
+
},
|
|
507
|
+
subscribe(e) {
|
|
508
|
+
return t.add(e), () => {
|
|
509
|
+
t.delete(e);
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
function Xe(e) {
|
|
515
|
+
let t = Ae(!0), [n, r] = K(0, { ownedWrite: !0 }), [i, a] = K(0, { ownedWrite: !0 }), [o, c] = K(!1, { ownedWrite: !0 }), [l, u] = K(!1, { ownedWrite: !0 }), d = Ye(), f = () => e.snapPoints, p = () => e.defaultSnapPoint === void 0 ? f()?.[0] ?? null : e.defaultSnapPoint, m = J(() => e.snapPoint !== void 0), [h, g] = K(J(p), { ownedWrite: !0 }), _ = () => m ? e.snapPoint ?? null : h(), v = !1;
|
|
516
|
+
function y(t, n) {
|
|
517
|
+
let r = n ?? s("none");
|
|
518
|
+
e.onSnapPointChange?.(t, r), !r.isCanceled && g(() => t);
|
|
519
|
+
}
|
|
520
|
+
let b = () => {
|
|
521
|
+
let e = _();
|
|
522
|
+
if (m) return e;
|
|
523
|
+
let t = f();
|
|
524
|
+
return !t || t.length === 0 ? e : e === null || !t.some((t) => Object.is(t, e)) ? p() : e;
|
|
525
|
+
};
|
|
526
|
+
function x(e) {
|
|
527
|
+
r(e), !v && e > 0 && a(e);
|
|
528
|
+
}
|
|
529
|
+
function S(e) {
|
|
530
|
+
if (e > 0) {
|
|
531
|
+
v = !0, a(e);
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
v = !1;
|
|
535
|
+
let t = J(n);
|
|
536
|
+
t > 0 && a(t);
|
|
537
|
+
}
|
|
538
|
+
function C(e) {
|
|
539
|
+
d.set(e), t?.onNestedSwipeProgressChange(e);
|
|
540
|
+
}
|
|
541
|
+
function w(e) {
|
|
542
|
+
u(e), t?.onNestedSwipingChange(e);
|
|
543
|
+
}
|
|
544
|
+
function T(t, n) {
|
|
545
|
+
if (e.onOpenChange?.(t, n), n.isCanceled) return;
|
|
546
|
+
let r = J(f);
|
|
547
|
+
!t && r && r.length > 0 && y(J(p), s(n.reason, n.event, n.trigger));
|
|
548
|
+
}
|
|
549
|
+
let E = {
|
|
550
|
+
swipeDirection: () => e.swipeDirection ?? "down",
|
|
551
|
+
swipeAreaActive: { current: !1 },
|
|
552
|
+
snapToSequentialPoints: () => e.snapToSequentialPoints ?? !1,
|
|
553
|
+
snapPoints: f,
|
|
554
|
+
activeSnapPoint: b,
|
|
555
|
+
setActiveSnapPoint: y,
|
|
556
|
+
frontmostHeight: i,
|
|
557
|
+
popupHeight: n,
|
|
558
|
+
hasNestedDrawer: o,
|
|
559
|
+
onPopupHeightChange: x,
|
|
560
|
+
nestedSwiping: l,
|
|
561
|
+
nestedSwipeProgressStore: d,
|
|
562
|
+
onNestedDrawerPresenceChange: c,
|
|
563
|
+
onNestedFrontmostHeightChange: S,
|
|
564
|
+
onNestedSwipingChange: w,
|
|
565
|
+
onNestedSwipeProgressChange: C,
|
|
566
|
+
notifyParentFrontmostHeight: t ? (e) => t.onNestedFrontmostHeightChange(e) : void 0,
|
|
567
|
+
notifyParentSwipingChange: t ? (e) => t.onNestedSwipingChange(e) : void 0,
|
|
568
|
+
notifyParentSwipeProgressChange: t ? (e) => t.onNestedSwipeProgressChange(e) : void 0,
|
|
569
|
+
notifyParentHasNestedDrawer: t ? (e) => t.onNestedDrawerPresenceChange(e) : void 0
|
|
570
|
+
}, D = q(e, { onOpenChange: T });
|
|
571
|
+
function O() {
|
|
572
|
+
return A("drawer", D, { extraContent: () => B(Ze, {}) });
|
|
573
|
+
}
|
|
574
|
+
return B(ke, {
|
|
575
|
+
value: E,
|
|
576
|
+
get children() {
|
|
577
|
+
return B(O, {});
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
function Ze() {
|
|
582
|
+
let e = ye(), t = D(), n = t.store, r = {};
|
|
583
|
+
return W(() => n.open(), (t) => {
|
|
584
|
+
e?.setDrawerOpen(r, t);
|
|
585
|
+
}), W(() => e, (e) => () => e?.removeDrawer(r)), W(() => ({
|
|
586
|
+
open: n.open(),
|
|
587
|
+
topmost: t.nestedOpenDialogCount() === 0,
|
|
588
|
+
popupElement: n.track().popupElement
|
|
589
|
+
}), (e) => {
|
|
590
|
+
if (!e.open || !e.topmost || !L()) return;
|
|
591
|
+
let t = d(e.popupElement).CloseWatcher;
|
|
592
|
+
if (!t) return;
|
|
593
|
+
function r(e) {
|
|
594
|
+
n.open() && n.setOpen(!1, s(i, e));
|
|
595
|
+
}
|
|
596
|
+
let a = new t();
|
|
597
|
+
return a.addEventListener("close", r), () => {
|
|
598
|
+
a.removeEventListener("close", r), a.destroy();
|
|
599
|
+
};
|
|
600
|
+
}), null;
|
|
601
|
+
}
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/drawer/swipe-area/DrawerSwipeAreaDataAttributes.ts
|
|
604
|
+
var Qe = /* @__PURE__ */ function(e) {
|
|
605
|
+
return e[e.open = x.open] = "open", e[e.closed = x.closed] = "closed", e.disabled = "data-disabled", e.swipeDirection = "data-swipe-direction", e.swiping = "data-swiping", e;
|
|
606
|
+
}({}), $e = /* @__PURE__ */ U("<div>"), et = .5, tt = 1, nt = .1, rt = 40, it = { [Qe.open]: "" }, at = { [Qe.closed]: "" }, ot = { [Qe.swiping]: "" }, st = { [Qe.disabled]: "" }, ct = {
|
|
607
|
+
open: (e) => e ? it : at,
|
|
608
|
+
swiping: (e) => e ? ot : null,
|
|
609
|
+
swipeDirection: (e) => ({ [Qe.swipeDirection]: e }),
|
|
610
|
+
disabled: (e) => e ? st : null
|
|
611
|
+
}, lt = {
|
|
612
|
+
up: "down",
|
|
613
|
+
down: "up",
|
|
614
|
+
left: "right",
|
|
615
|
+
right: "left"
|
|
616
|
+
};
|
|
617
|
+
function ut(e) {
|
|
618
|
+
return e === "left" || e === "right" ? "pan-y" : "pan-x";
|
|
619
|
+
}
|
|
620
|
+
function dt(e) {
|
|
621
|
+
return e.mozInputSource === 0 ? e.isTrusted : e.detail === 0 && !e.pointerType;
|
|
622
|
+
}
|
|
623
|
+
function ft(e) {
|
|
624
|
+
let i = D(), c = i.store, d = Ae(), f = ye(), p = e, h = ue(e, "render", "class", "disabled", "id", "onPointerCancel", "onPointerDown", "onPointerMove", "onPointerUp", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart", "ref", "style", "swipeDirection"), g = `base-ui-${ce()}`, _ = G(() => p.id || g), v = G(() => p.disabled ?? !1), [b, x] = K(null, { ownedWrite: !0 }), [S, C] = K(!1, { ownedWrite: !0 }), w = null, T = !1, O = {
|
|
625
|
+
x: 0,
|
|
626
|
+
y: 0
|
|
627
|
+
}, k = null, A = !1, j = null, M = null, N = null, P = null, F = G(() => p.swipeDirection ?? lt[d.swipeDirection()]), I = G(() => lt[F()]), L = G(() => !v() && (!c.open() || S())), [te, z] = K(!1, { ownedWrite: !0 });
|
|
628
|
+
fe(() => {
|
|
629
|
+
let e = !1;
|
|
630
|
+
return queueMicrotask(() => {
|
|
631
|
+
e || z(!0);
|
|
632
|
+
}), () => {
|
|
633
|
+
e = !0;
|
|
634
|
+
};
|
|
635
|
+
}), y(() => c, _, () => te() ? b() : null);
|
|
636
|
+
function re() {
|
|
637
|
+
O.x = 0, O.y = 0;
|
|
638
|
+
}
|
|
639
|
+
function U() {
|
|
640
|
+
P?.(), i.outsidePressEnabled.current = !1;
|
|
641
|
+
}
|
|
642
|
+
function oe() {
|
|
643
|
+
P?.();
|
|
644
|
+
let e = m(b());
|
|
645
|
+
function t(n) {
|
|
646
|
+
n?.type === "click" && n.detail !== 0 && !dt(n) || (P = null, e.removeEventListener("pointerdown", t, !0), e.removeEventListener("click", t, !0), i.outsidePressEnabled.current = !0);
|
|
647
|
+
}
|
|
648
|
+
P = t, e.addEventListener("pointerdown", t, !0), e.addEventListener("click", t, !0);
|
|
649
|
+
}
|
|
650
|
+
function se(e) {
|
|
651
|
+
let t = I(), n = t === "left" || t === "right" ? e.offsetWidth : e.offsetHeight;
|
|
652
|
+
return n <= 0 ? null : n;
|
|
653
|
+
}
|
|
654
|
+
function le() {
|
|
655
|
+
let e = c.state.popupElement;
|
|
656
|
+
return e ? se(e) : null;
|
|
657
|
+
}
|
|
658
|
+
function q(e) {
|
|
659
|
+
let t = se(e);
|
|
660
|
+
if (t == null) return null;
|
|
661
|
+
let n = I(), r = n === "left" || n === "right", i = ee(e), a = r ? i.x : i.y;
|
|
662
|
+
return Number.isFinite(a) && Math.abs(a) > .5 ? Math.min(t, Math.abs(a)) : t;
|
|
663
|
+
}
|
|
664
|
+
function pe() {
|
|
665
|
+
let e = le();
|
|
666
|
+
return e == null ? rt : e * et;
|
|
667
|
+
}
|
|
668
|
+
function me() {
|
|
669
|
+
let e = c.state.popupElement;
|
|
670
|
+
if (!e || !c.open() || !i.presence.mounted() || (k ??= q(e), k === null)) return;
|
|
671
|
+
let t = F(), n = I(), r = Math.max(0, R(t, O.x, O.y)), a = r > k ? k + Math.sqrt(r - k) : r, o = (k - a) * (n === "left" || n === "up" ? -1 : 1), s = n === "left" || n === "right", l = s ? o : 0, u = s ? 0 : o, p = Math.max(0, Math.min(1, r / k)), m = Math.max(0, Math.min(1, 1 - p)), h = d.frontmostHeight();
|
|
672
|
+
e.style.setProperty(Y.swipeMovementX, `${l}px`), e.style.setProperty(Y.swipeMovementY, `${u}px`), e.setAttribute($.swiping, ""), j = e, N ??= e.style.transition, e.style.transition = "none";
|
|
673
|
+
let g = i.backdropElement();
|
|
674
|
+
g && (g.setAttribute($.swiping, ""), M = g, g.style.setProperty(X.swipeProgress, `${m}`), p > 0 && h > 0 ? g.style.setProperty(Y.height, `${h}px`) : g.style.removeProperty(Y.height)), f?.visualStateStore.set({
|
|
675
|
+
swipeProgress: p,
|
|
676
|
+
frontmostHeight: p > 0 ? h : 0
|
|
677
|
+
}), A = !0, d.swipeAreaActive.current = !0;
|
|
678
|
+
}
|
|
679
|
+
function Z() {
|
|
680
|
+
j && (j.style.removeProperty(Y.swipeMovementX), j.style.removeProperty(Y.swipeMovementY), j.removeAttribute($.swiping), N !== null && (j.style.transition = N, N = null)), M && (M.removeAttribute($.swiping), M.style.setProperty(X.swipeProgress, "0"), M.style.removeProperty(Y.height)), f?.visualStateStore.set({
|
|
681
|
+
swipeProgress: 0,
|
|
682
|
+
frontmostHeight: 0
|
|
683
|
+
}), A = !1, j = null, M = null, d.swipeAreaActive.current = !1;
|
|
684
|
+
}
|
|
685
|
+
function he(e) {
|
|
686
|
+
T = !0, c.setOpen(!0, s(r, e, b() ?? void 0));
|
|
687
|
+
}
|
|
688
|
+
function ge(e) {
|
|
689
|
+
c.setOpen(!1, s(r, e, b() ?? void 0));
|
|
690
|
+
}
|
|
691
|
+
function _e() {
|
|
692
|
+
w = null, T = !1, k = null, C(!1);
|
|
693
|
+
}
|
|
694
|
+
function ve() {
|
|
695
|
+
_e(), oe(), re(), Z();
|
|
696
|
+
}
|
|
697
|
+
let Q = ne({
|
|
698
|
+
enabled: L,
|
|
699
|
+
directions: () => [F()],
|
|
700
|
+
element: b,
|
|
701
|
+
trackDrag: !1,
|
|
702
|
+
movementCssVars: {
|
|
703
|
+
x: Y.swipeMovementX,
|
|
704
|
+
y: Y.swipeMovementY
|
|
705
|
+
},
|
|
706
|
+
onSwipeStart(e) {
|
|
707
|
+
U(), w = e, T = !1, C(!0), re();
|
|
708
|
+
},
|
|
709
|
+
onProgress(e, t) {
|
|
710
|
+
if (!t || !w) return;
|
|
711
|
+
O.x = t.deltaX, O.y = t.deltaY;
|
|
712
|
+
let n = F();
|
|
713
|
+
if (t.direction !== n) return;
|
|
714
|
+
let r = R(n, t.deltaX, t.deltaY);
|
|
715
|
+
!T && r < tt || (!T && !c.open() && he(w), me());
|
|
716
|
+
},
|
|
717
|
+
onRelease({ event: e, direction: t, deltaX: n, deltaY: r, releaseVelocityX: i, releaseVelocityY: a }) {
|
|
718
|
+
let o = F(), s = R(o, n, r), l = R(o, i, a), u = s >= pe();
|
|
719
|
+
return t === o && (u || l >= nt) && !v() ? c.open() || he(e) : T && c.open() && ge(e), ve(), !1;
|
|
720
|
+
},
|
|
721
|
+
onCancel: ve
|
|
722
|
+
});
|
|
723
|
+
W(() => ({
|
|
724
|
+
active: S(),
|
|
725
|
+
open: c.open(),
|
|
726
|
+
mounted: i.presence.mounted(),
|
|
727
|
+
popupElement: c.track().popupElement,
|
|
728
|
+
frontmostHeight: d.frontmostHeight()
|
|
729
|
+
}), (e) => {
|
|
730
|
+
e.active && A && J(me);
|
|
731
|
+
}), W(() => L(), (e) => {
|
|
732
|
+
e || J(() => {
|
|
733
|
+
S() && oe(), Q.reset(), re(), Z(), _e();
|
|
734
|
+
});
|
|
735
|
+
}), de(() => {
|
|
736
|
+
P?.(), i.outsidePressEnabled.current = !0;
|
|
737
|
+
});
|
|
738
|
+
let be = G(() => ({
|
|
739
|
+
open: c.open(),
|
|
740
|
+
swiping: Q.swiping(),
|
|
741
|
+
swipeDirection: F(),
|
|
742
|
+
disabled: v()
|
|
743
|
+
})), xe = t(e, () => be(), (e) => (() => {
|
|
744
|
+
var t = ie($e);
|
|
745
|
+
return H(t, e, !1), V(), t;
|
|
746
|
+
})()), Se = G(() => a(e.class, be())), Ce = G(() => E({
|
|
747
|
+
"pointer-events": L() ? void 0 : "none",
|
|
748
|
+
"touch-action": ut(F())
|
|
749
|
+
}, o(e.style, be()))), we = G(() => n(be(), ct)), Te = l(u(() => p.onPointerDown), (e) => {
|
|
750
|
+
e.pointerType !== "touch" && (Q.pointerHandlers.onPointerDown(e), e.cancelable && e.preventDefault());
|
|
751
|
+
}), Ee = l(u(() => p.onPointerMove), (e) => {
|
|
752
|
+
e.pointerType !== "touch" && Q.pointerHandlers.onPointerMove(e);
|
|
753
|
+
}), De = l(u(() => p.onPointerUp), (e) => {
|
|
754
|
+
e.pointerType !== "touch" && Q.pointerHandlers.onPointerUp(e);
|
|
755
|
+
}), Oe = l(u(() => p.onPointerCancel), (e) => {
|
|
756
|
+
e.pointerType !== "touch" && Q.pointerHandlers.onPointerCancel(e);
|
|
757
|
+
}), ke = l(u(() => p.onTouchStart), (e) => Q.touchHandlers.onTouchStart(e)), je = l(u(() => p.onTouchMove), (e) => Q.touchHandlers.onTouchMove(e)), Me = l(u(() => p.onTouchEnd), (e) => Q.touchHandlers.onTouchEnd(e)), Ne = l(u(() => p.onTouchCancel), (e) => Q.touchHandlers.onTouchCancel(e));
|
|
758
|
+
return B(xe, ae({
|
|
759
|
+
ref: [((e) => x(e)), p.ref],
|
|
760
|
+
get id() {
|
|
761
|
+
return _();
|
|
762
|
+
},
|
|
763
|
+
role: "presentation",
|
|
764
|
+
"aria-hidden": "true",
|
|
765
|
+
get class() {
|
|
766
|
+
return Se();
|
|
767
|
+
},
|
|
768
|
+
get style() {
|
|
769
|
+
return Ce();
|
|
770
|
+
},
|
|
771
|
+
onPointerDown: Te,
|
|
772
|
+
onPointerMove: Ee,
|
|
773
|
+
onPointerUp: De,
|
|
774
|
+
onPointerCancel: Oe,
|
|
775
|
+
onTouchStart: ke,
|
|
776
|
+
onTouchMove: je,
|
|
777
|
+
onTouchEnd: Me,
|
|
778
|
+
onTouchCancel: Ne
|
|
779
|
+
}, we, h));
|
|
780
|
+
}
|
|
781
|
+
//#endregion
|
|
782
|
+
//#region src/drawer/virtual-keyboard-provider/DrawerVirtualKeyboardContext.ts
|
|
783
|
+
var pt = Symbol("DrawerVirtualKeyboardContext"), mt = se(pt);
|
|
784
|
+
function ht() {
|
|
785
|
+
let e = pe(mt);
|
|
786
|
+
return e === pt ? void 0 : e;
|
|
787
|
+
}
|
|
788
|
+
//#endregion
|
|
789
|
+
//#region src/drawer/viewport/DrawerViewport.tsx
|
|
790
|
+
var gt = 10, _t = .5, vt = .5, yt = 300, bt = 4, xt = .2, St = 4, Ct = 80, wt = 360, Tt = .1, Et = 6, Dt = 2, Ot = `[${he}]`;
|
|
791
|
+
function kt(e) {
|
|
792
|
+
let t = D(), n = t.store, i = Ae(), a = ye(), o = Pe(), p = ht(), _ = e, v = ue(e, "children", "onPointerCancel", "onPointerDown", "onPointerMove", "onPointerUp", "onTouchCancel", "onTouchEnd", "onTouchStart"), y = () => n.open(), b = () => t.presence.mounted(), x = () => t.nestedOpenDrawerCount() > 0, S = () => i.swipeDirection(), C = () => S() === "left" || S() === "right" ? "horizontal" : "vertical", w = () => C() === "vertical" ? "horizontal" : "vertical", [T, E] = K(null, { ownedWrite: !0 }), O, k, A = !1, j = !1, N = "", P = !1, F = !1, L = null, ee = G(() => {
|
|
793
|
+
let e = i.snapPoints(), t = o.resolvedSnapPoints(), n = S();
|
|
794
|
+
if (!e || e.length < 2 || t.length < 2 || n !== "down" && n !== "up") return null;
|
|
795
|
+
let r = t.map((e) => e.offset).sort((e, t) => e - t);
|
|
796
|
+
return {
|
|
797
|
+
minOffset: r[0],
|
|
798
|
+
range: r[1] - r[0]
|
|
799
|
+
};
|
|
800
|
+
}), re = G(() => {
|
|
801
|
+
let e = ee(), t = o.activeSnapPointOffset();
|
|
802
|
+
return !e || t === null ? null : z((t - e.minOffset) / e.range, 0, 1);
|
|
803
|
+
}), ie = G(() => {
|
|
804
|
+
let e = i.snapPoints(), t = S();
|
|
805
|
+
return e && e.length > 0 && (t === "down" || t === "up") ? t === "down" ? ["down", "up"] : ["up", "down"] : [t];
|
|
806
|
+
});
|
|
807
|
+
function V(e) {
|
|
808
|
+
n.state.popupElement?.toggleAttribute($.swipeDismiss, e), t.backdropElement()?.toggleAttribute($.swipeDismiss, e);
|
|
809
|
+
}
|
|
810
|
+
function H() {
|
|
811
|
+
V(!1), n.state.popupElement?.removeAttribute(c.endingStyle), E(null);
|
|
812
|
+
}
|
|
813
|
+
function U() {
|
|
814
|
+
j && (j = !1, i.notifyParentSwipingChange?.(!1));
|
|
815
|
+
}
|
|
816
|
+
function oe(e, n, r) {
|
|
817
|
+
let o = y() && !t.nested && n, s = o ? e : 0, c = y() && n ? e : 0, l = i.frontmostHeight();
|
|
818
|
+
r && i.notifyParentSwipeProgressChange && (i.notifyParentSwipeProgressChange(c), c <= 0 && U()), a?.visualStateStore.set({
|
|
819
|
+
swipeProgress: s,
|
|
820
|
+
frontmostHeight: s > 0 ? l : 0
|
|
821
|
+
});
|
|
822
|
+
let u = t.backdropElement();
|
|
823
|
+
if (!u) return;
|
|
824
|
+
let d = o && s > 0;
|
|
825
|
+
u.style.setProperty(X.swipeProgress, d ? `${s}` : "0"), d && l > 0 ? u.style.setProperty(Y.height, `${l}px`) : u.style.removeProperty(Y.height);
|
|
826
|
+
}
|
|
827
|
+
function se(e, t, n, r, a, s, c, l) {
|
|
828
|
+
let u = Nt(e, t);
|
|
829
|
+
if (u <= 0) return null;
|
|
830
|
+
let d = i.snapPoints(), f = ((t === "down" || t === "up") && d && d.length > 0 ? o.activeSnapPointOffset() ?? 0 : 0) + R(t, n, r), p = Math.max(0, u - f);
|
|
831
|
+
if (p <= 0) return null;
|
|
832
|
+
let m = R(t, c, l), h = Math.abs(m) > 0 ? m : R(t, a, s);
|
|
833
|
+
if (h <= xt) return null;
|
|
834
|
+
let g = z(h, xt, St);
|
|
835
|
+
return Tt + (z(p / g, Ct, wt) - Ct) / 280 * .9;
|
|
836
|
+
}
|
|
837
|
+
function ce(e) {
|
|
838
|
+
if (j || !e) return;
|
|
839
|
+
let t = e.direction ?? S();
|
|
840
|
+
Math.abs(R(t, e.deltaX, e.deltaY)) < gt || (j = !0, i.notifyParentSwipingChange?.(!0));
|
|
841
|
+
}
|
|
842
|
+
let q = ne({
|
|
843
|
+
enabled: () => b() && !x(),
|
|
844
|
+
directions: ie,
|
|
845
|
+
element: () => n.track().popupElement,
|
|
846
|
+
ignoreSelectorWhenTouch: !1,
|
|
847
|
+
ignoreScrollableAncestors: !0,
|
|
848
|
+
movementCssVars: {
|
|
849
|
+
x: Y.swipeMovementX,
|
|
850
|
+
y: Y.swipeMovementY
|
|
851
|
+
},
|
|
852
|
+
swipeThreshold: ({ element: e, direction: t }) => Pt(e, t),
|
|
853
|
+
onSwipeStart(e) {
|
|
854
|
+
if ("touches" in e || e.pointerType === "touch") return;
|
|
855
|
+
let t = n.state.popupElement, r = m(t).getSelection?.();
|
|
856
|
+
if (!r || r.isCollapsed) return;
|
|
857
|
+
let i = g(r.anchorNode) ? r.anchorNode : r.anchorNode?.parentElement, a = g(r.focusNode) ? r.focusNode : r.focusNode?.parentElement;
|
|
858
|
+
!h(t, i) && !h(t, a) || r.removeAllRanges();
|
|
859
|
+
},
|
|
860
|
+
onSwipingChange(e) {
|
|
861
|
+
A = e, At(t.backdropElement(), e), !e && !i.notifyParentSwipeProgressChange && U();
|
|
862
|
+
},
|
|
863
|
+
canStart(e, t) {
|
|
864
|
+
let r = n.state.popupElement;
|
|
865
|
+
if (!r) return !1;
|
|
866
|
+
let i = te(r.getRootNode(), e.x, e.y);
|
|
867
|
+
if (!i || !h(r, i)) return !1;
|
|
868
|
+
let a = t.nativeEvent;
|
|
869
|
+
return !(("touches" in a || a.pointerType === "touch") && Rt(r.ownerDocument, r));
|
|
870
|
+
},
|
|
871
|
+
onProgress(e, t) {
|
|
872
|
+
A && ce(t);
|
|
873
|
+
let r = i.snapPoints(), a = !!(r && r.length > 0);
|
|
874
|
+
if (A && S() === "down" && a && t) {
|
|
875
|
+
let e = n.state.popupElement;
|
|
876
|
+
e && (e.style.removeProperty("transform"), e.style.setProperty(Y.swipeMovementY, `${je(o.activeSnapPointOffset() ?? 0, t.deltaY)}px`));
|
|
877
|
+
}
|
|
878
|
+
let s = e, c = ee(), l = o.popupHeight();
|
|
879
|
+
if (c && l > 0) {
|
|
880
|
+
let e = o.activeSnapPointOffset() ?? c.minOffset, n = (e) => z((e - c.minOffset) / c.range, 0, 1);
|
|
881
|
+
if (A && t && Number.isFinite(t.deltaY)) s = n(z(e + t.deltaY, 0, l));
|
|
882
|
+
else {
|
|
883
|
+
let e = re();
|
|
884
|
+
e !== null && (s = e);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
A || (i.notifyParentSwipeProgressChange?.(0), U()), oe(s, !0, A);
|
|
888
|
+
},
|
|
889
|
+
onRelease({ event: e, deltaX: t, deltaY: a, direction: l, velocityX: u, velocityY: d, releaseVelocityX: f, releaseVelocityY: p }) {
|
|
890
|
+
let m = n.state.popupElement;
|
|
891
|
+
if (!m) {
|
|
892
|
+
H();
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
function h(e) {
|
|
896
|
+
U(), V(!0), m.style.removeProperty("transition"), m.setAttribute(c.endingStyle, ""), E(se(m, e, t, a, u, d, f, p)), le();
|
|
897
|
+
}
|
|
898
|
+
let g = i.snapPoints(), _ = S();
|
|
899
|
+
if (!g || g.length === 0) {
|
|
900
|
+
if (!l) {
|
|
901
|
+
H();
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
let e = R(l, t, a);
|
|
905
|
+
if (e <= 0) return H(), !1;
|
|
906
|
+
if (R(l, u, d) >= _t) return h(l), !0;
|
|
907
|
+
let n = e > Pt(m, l);
|
|
908
|
+
return n ? h(l) : H(), n;
|
|
909
|
+
}
|
|
910
|
+
if (_ !== "down" && _ !== "up") {
|
|
911
|
+
H();
|
|
912
|
+
return;
|
|
913
|
+
}
|
|
914
|
+
let v = o.popupHeight();
|
|
915
|
+
if (!v) return H(), !1;
|
|
916
|
+
let y = o.resolvedSnapPoints();
|
|
917
|
+
if (y.length === 0) {
|
|
918
|
+
H();
|
|
919
|
+
return;
|
|
920
|
+
}
|
|
921
|
+
let b = _ === "down" ? a : -a, x = Math.sign(b), C = _ === "down" ? p : -p, w = _ === "down" ? d : -d, T = C;
|
|
922
|
+
if (x !== 0 && Math.abs(b) >= gt) {
|
|
923
|
+
let e = Math.sign(T);
|
|
924
|
+
e !== 0 && e !== x && (T = w);
|
|
925
|
+
}
|
|
926
|
+
let D = o.activeSnapPointOffset() ?? 0, k = z(D + b, 0, v), A = Math.abs(T) >= vt ? z(T, -4, bt) * yt : 0, j = i.snapToSequentialPoints() ? k : z(k + A, 0, v), M = s(r, e), N = () => (oe(0, !0, !0), H(), !1), P = (e) => (i.setActiveSnapPoint(e.value, M), N()), F = (e) => {
|
|
927
|
+
if (!l) return P(e);
|
|
928
|
+
let t = o.activeSnapPoint();
|
|
929
|
+
return i.setActiveSnapPoint(null, M), M.isCanceled ? N() : (O = t, h(_), !0);
|
|
930
|
+
};
|
|
931
|
+
if (i.snapToSequentialPoints()) {
|
|
932
|
+
let e = [...y].sort((e, t) => e.offset - t.offset), t = e.map((e) => e.offset), n = Ne(t, D), r = e[Ne(t, j)], i = Math.sign(T), a = x !== 0 && i !== 0 && i === x && Math.abs(T) >= vt, o = j;
|
|
933
|
+
if (a) {
|
|
934
|
+
let t = z(n + x, 0, e.length - 1);
|
|
935
|
+
if (t !== n) {
|
|
936
|
+
let n = e[t];
|
|
937
|
+
(x > 0 ? j < n.offset : j > n.offset) && (r = n, o = n.offset);
|
|
938
|
+
} else if (x > 0) return F(r);
|
|
939
|
+
}
|
|
940
|
+
return Math.abs(o - v) < Math.abs(o - r.offset) ? F(r) : P(r);
|
|
941
|
+
}
|
|
942
|
+
let I = y[Ne(y.map((e) => e.offset), j)], L = Math.abs(j - v);
|
|
943
|
+
return T >= _t && b > 0 || L < Math.abs(j - I.offset) ? F(I) : P(I);
|
|
944
|
+
},
|
|
945
|
+
onDismiss(e) {
|
|
946
|
+
a?.visualStateStore.set({
|
|
947
|
+
swipeProgress: 0,
|
|
948
|
+
frontmostHeight: 0
|
|
949
|
+
});
|
|
950
|
+
let o = t.backdropElement();
|
|
951
|
+
o && (o.style.setProperty(X.swipeProgress, "0"), o.style.removeProperty(Y.height));
|
|
952
|
+
let c = s(r, e);
|
|
953
|
+
if (n.setOpen(!1, c), c.isCanceled) {
|
|
954
|
+
O !== void 0 && i.setActiveSnapPoint(O, s(r, e)), O = void 0, q.reset(), H();
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
if (n.open()) {
|
|
958
|
+
let t = e;
|
|
959
|
+
k = requestAnimationFrame(() => {
|
|
960
|
+
k = void 0, n.open() ? (O !== void 0 && i.setActiveSnapPoint(O, s(r, t)), O = void 0, H(), q.reset()) : O = void 0;
|
|
961
|
+
});
|
|
962
|
+
return;
|
|
963
|
+
}
|
|
964
|
+
O = void 0, V(!0);
|
|
965
|
+
}
|
|
966
|
+
}), fe = G(y), pe = G(() => t.viewportElement() ?? n.track().popupElement);
|
|
967
|
+
W(() => ({
|
|
968
|
+
mounted: b(),
|
|
969
|
+
nestedDrawerOpen: x(),
|
|
970
|
+
open: fe(),
|
|
971
|
+
rootElement: pe(),
|
|
972
|
+
axis: C(),
|
|
973
|
+
direction: S()
|
|
974
|
+
}), (e) => {
|
|
975
|
+
let t = e.rootElement;
|
|
976
|
+
if (!t) return;
|
|
977
|
+
let n = e.axis === "vertical", r = m(t);
|
|
978
|
+
function i(i, a, o) {
|
|
979
|
+
let s = n ? o.clientY - a.lastY : o.clientX - a.lastX;
|
|
980
|
+
if (i.touches.length === 2 || Rt(r, t) || !e.open || !e.mounted || e.nestedDrawerOpen || Bt(a, i, o, n)) return;
|
|
981
|
+
let c = a.scrollTarget;
|
|
982
|
+
if (!c || c === r.documentElement || c === r.body) {
|
|
983
|
+
i.cancelable && i.preventDefault(), i.stopPropagation(), q.moveNative(i, t);
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
if (!Vt(c, e.axis)) {
|
|
987
|
+
i.cancelable && i.preventDefault(), i.stopPropagation();
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
if (s !== 0) {
|
|
991
|
+
let t = Wt(c, e.axis, e.direction, s);
|
|
992
|
+
a.allowSwipe ? i.cancelable && i.preventDefault() : i.cancelable && t ? (a.allowSwipe = !0, i.preventDefault()) : a.allowSwipe = !1;
|
|
993
|
+
}
|
|
994
|
+
a.allowSwipe === !0 && (i.stopPropagation(), q.moveNative(i, t));
|
|
995
|
+
}
|
|
996
|
+
function a(e) {
|
|
997
|
+
if (p?.onTouchMove(e), F) return;
|
|
998
|
+
let t = e.touches[0];
|
|
999
|
+
!t || !L || (i(e, L, t), L.lastX = t.clientX, L.lastY = t.clientY);
|
|
1000
|
+
}
|
|
1001
|
+
return r.addEventListener("touchmove", a, {
|
|
1002
|
+
passive: !1,
|
|
1003
|
+
capture: !0
|
|
1004
|
+
}), () => r.removeEventListener("touchmove", a, { capture: !0 });
|
|
1005
|
+
}), W(() => ({
|
|
1006
|
+
range: ee(),
|
|
1007
|
+
swiping: q.swiping(),
|
|
1008
|
+
open: y(),
|
|
1009
|
+
nested: t.nested,
|
|
1010
|
+
progress: re(),
|
|
1011
|
+
frontmostHeight: i.frontmostHeight()
|
|
1012
|
+
}), (e) => {
|
|
1013
|
+
!e.range || e.swiping || J(() => oe(!e.open || e.nested ? 0 : e.progress ?? 0, !0, !1));
|
|
1014
|
+
}), W(fe, (e) => {
|
|
1015
|
+
if (i.notifyParentSwipeProgressChange) return e || i.notifyParentSwipeProgressChange(0), () => i.notifyParentSwipeProgressChange?.(0);
|
|
1016
|
+
}), W(() => y(), (e, t) => {
|
|
1017
|
+
!e || e === t || J(() => {
|
|
1018
|
+
i.swipeAreaActive.current || q.reset(), H();
|
|
1019
|
+
});
|
|
1020
|
+
}), de(() => {
|
|
1021
|
+
k !== void 0 && cancelAnimationFrame(k), a?.visualStateStore.set({
|
|
1022
|
+
swipeProgress: 0,
|
|
1023
|
+
frontmostHeight: 0
|
|
1024
|
+
}), At(t.backdropElement(), !1), U();
|
|
1025
|
+
});
|
|
1026
|
+
let me = {
|
|
1027
|
+
swiping: q.swiping,
|
|
1028
|
+
getDragStyles: q.getDragStyles,
|
|
1029
|
+
swipeStrength: T,
|
|
1030
|
+
setSwipeDismissed: V
|
|
1031
|
+
};
|
|
1032
|
+
function Z(e) {
|
|
1033
|
+
F = e, L = null;
|
|
1034
|
+
}
|
|
1035
|
+
function he() {
|
|
1036
|
+
Z(!1), N = "", P = !1;
|
|
1037
|
+
}
|
|
1038
|
+
function ge(e) {
|
|
1039
|
+
return N = "", e.pointerType !== "touch";
|
|
1040
|
+
}
|
|
1041
|
+
let _e = l(u(() => _.onPointerDown), (e) => {
|
|
1042
|
+
if (N = e.pointerType, P = e.pointerType === "pen", !y() || !b() || x()) return;
|
|
1043
|
+
let t = e.currentTarget, n = te(t.getRootNode(), e.clientX, e.clientY);
|
|
1044
|
+
jt(n) || Mt(n) || e.pointerType !== "touch" && q.pointerHandlers.onPointerDown(e);
|
|
1045
|
+
}), ve = l(u(() => _.onPointerMove), (e) => {
|
|
1046
|
+
e.pointerType !== "touch" && q.pointerHandlers.onPointerMove(e);
|
|
1047
|
+
}), Q = l(u(() => _.onPointerUp), (e) => {
|
|
1048
|
+
ge(e) && q.pointerHandlers.onPointerUp(e);
|
|
1049
|
+
}), be = l(u(() => _.onPointerCancel), (e) => {
|
|
1050
|
+
ge(e) && q.pointerHandlers.onPointerCancel(e);
|
|
1051
|
+
}), xe = l(u(() => _.onTouchStart), (e) => {
|
|
1052
|
+
if (N === "pen" && P) {
|
|
1053
|
+
P = !1, Z(!1);
|
|
1054
|
+
return;
|
|
1055
|
+
}
|
|
1056
|
+
if (!y() || !b() || x()) {
|
|
1057
|
+
Z(!1);
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
1060
|
+
let t = e.touches[0];
|
|
1061
|
+
if (!t) return;
|
|
1062
|
+
let n = e.currentTarget;
|
|
1063
|
+
if (zt(e, d(n))) {
|
|
1064
|
+
Z(!1);
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1067
|
+
let r = te(n.getRootNode(), t.clientX, t.clientY), i = f(e), a = g(i) ? i : n;
|
|
1068
|
+
if (!h(n, a)) {
|
|
1069
|
+
Z(!0);
|
|
1070
|
+
return;
|
|
1071
|
+
}
|
|
1072
|
+
if (p?.onTouchStart(e), jt(r)) {
|
|
1073
|
+
Z(!0);
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
F = !1;
|
|
1077
|
+
let o = C(), s = I(a, n, o), c = I(a, n, w()) != null, l = null;
|
|
1078
|
+
s && (l = Ut(s, o, S()) ? null : !1), L = {
|
|
1079
|
+
startX: t.clientX,
|
|
1080
|
+
startY: t.clientY,
|
|
1081
|
+
lastX: t.clientX,
|
|
1082
|
+
lastY: t.clientY,
|
|
1083
|
+
scrollTarget: s,
|
|
1084
|
+
hasCrossAxisScrollableContent: c,
|
|
1085
|
+
allowSwipe: l,
|
|
1086
|
+
preserveNativeCrossAxisScroll: !1,
|
|
1087
|
+
drawerAxisAttributed: !1
|
|
1088
|
+
}, q.touchHandlers.onTouchStart(e);
|
|
1089
|
+
}), Se = l(u(() => _.onTouchEnd), (e) => {
|
|
1090
|
+
p?.onTouchEnd(e), he(), q.touchHandlers.onTouchEnd(e);
|
|
1091
|
+
}), Ce = l(u(() => _.onTouchCancel), (e) => {
|
|
1092
|
+
p?.onTouchCancel(), he(), q.touchHandlers.onTouchCancel(e);
|
|
1093
|
+
});
|
|
1094
|
+
return B(M, ae(v, {
|
|
1095
|
+
onPointerDown: _e,
|
|
1096
|
+
onPointerMove: ve,
|
|
1097
|
+
onPointerUp: Q,
|
|
1098
|
+
onPointerCancel: be,
|
|
1099
|
+
onTouchStart: xe,
|
|
1100
|
+
onTouchEnd: Se,
|
|
1101
|
+
onTouchCancel: Ce,
|
|
1102
|
+
"data-nested-dialog-open": void 0,
|
|
1103
|
+
get children() {
|
|
1104
|
+
return B(Ie, {
|
|
1105
|
+
value: me,
|
|
1106
|
+
get children() {
|
|
1107
|
+
return e.children;
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
}));
|
|
1112
|
+
}
|
|
1113
|
+
function At(e, t) {
|
|
1114
|
+
e?.toggleAttribute($.swiping, t);
|
|
1115
|
+
}
|
|
1116
|
+
function jt(e) {
|
|
1117
|
+
return !!e?.closest(re);
|
|
1118
|
+
}
|
|
1119
|
+
function Mt(e) {
|
|
1120
|
+
return !!e?.closest(Ot);
|
|
1121
|
+
}
|
|
1122
|
+
function Nt(e, t) {
|
|
1123
|
+
return t === "left" || t === "right" ? e.offsetWidth : e.offsetHeight;
|
|
1124
|
+
}
|
|
1125
|
+
function Pt(e, t) {
|
|
1126
|
+
return Math.max(Nt(e, t) * .5, gt);
|
|
1127
|
+
}
|
|
1128
|
+
function Ft(e, t) {
|
|
1129
|
+
return e instanceof t.HTMLInputElement && e.type === "range";
|
|
1130
|
+
}
|
|
1131
|
+
function It(e) {
|
|
1132
|
+
return e.tagName === "INPUT" || e.tagName === "TEXTAREA";
|
|
1133
|
+
}
|
|
1134
|
+
function Lt(e, t) {
|
|
1135
|
+
let n = g(e.anchorNode) ? e.anchorNode : e.anchorNode?.parentElement, r = g(e.focusNode) ? e.focusNode : e.focusNode?.parentElement;
|
|
1136
|
+
return e.containsNode(t, !0) || h(t, n) || h(t, r);
|
|
1137
|
+
}
|
|
1138
|
+
function Rt(e, t) {
|
|
1139
|
+
let n = _(e);
|
|
1140
|
+
if (n && h(t, n) && It(n)) {
|
|
1141
|
+
let { selectionStart: e, selectionEnd: t } = n;
|
|
1142
|
+
if (e != null && t != null && e < t) return !0;
|
|
1143
|
+
}
|
|
1144
|
+
let r = e.getSelection?.();
|
|
1145
|
+
return !r || r.isCollapsed ? !1 : Lt(r, t);
|
|
1146
|
+
}
|
|
1147
|
+
function zt(e, t) {
|
|
1148
|
+
return e.composedPath().some((e) => Ft(e, t));
|
|
1149
|
+
}
|
|
1150
|
+
function Bt(e, t, n, r) {
|
|
1151
|
+
if (e.preserveNativeCrossAxisScroll) return !0;
|
|
1152
|
+
if (e.drawerAxisAttributed || e.allowSwipe === !0 || !e.hasCrossAxisScrollableContent) return !1;
|
|
1153
|
+
if (!t.cancelable) return e.preserveNativeCrossAxisScroll = !0, !0;
|
|
1154
|
+
let i = r ? n.clientY - e.startY : n.clientX - e.startX, a = r ? n.clientX - e.startX : n.clientY - e.startY, o = Math.abs(i), s = Math.abs(a);
|
|
1155
|
+
return s >= Et && s > o + Dt ? (e.preserveNativeCrossAxisScroll = !0, !0) : o >= Et ? (e.drawerAxisAttributed = !0, !1) : !0;
|
|
1156
|
+
}
|
|
1157
|
+
function Vt(e, t) {
|
|
1158
|
+
return Ht(e, t).max > 0;
|
|
1159
|
+
}
|
|
1160
|
+
function Ht(e, t) {
|
|
1161
|
+
return t === "vertical" ? {
|
|
1162
|
+
offset: e.scrollTop,
|
|
1163
|
+
max: Math.max(0, e.scrollHeight - e.clientHeight)
|
|
1164
|
+
} : {
|
|
1165
|
+
offset: e.scrollLeft,
|
|
1166
|
+
max: Math.max(0, e.scrollWidth - e.clientWidth)
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
function Ut(e, t, n) {
|
|
1170
|
+
let r = Gt(n, t), { offset: i, max: a } = Ht(e, t);
|
|
1171
|
+
return r ? i <= 0 : i >= a;
|
|
1172
|
+
}
|
|
1173
|
+
function Wt(e, t, n, r) {
|
|
1174
|
+
return (Gt(n, t) ? r > 0 : r < 0) && Ut(e, t, n);
|
|
1175
|
+
}
|
|
1176
|
+
function Gt(e, t) {
|
|
1177
|
+
return t === "vertical" ? e === "down" : e === "right";
|
|
1178
|
+
}
|
|
1179
|
+
//#endregion
|
|
1180
|
+
//#region src/drawer/viewport/DrawerViewportCssVars.ts
|
|
1181
|
+
var Kt = /* @__PURE__ */ function(e) {
|
|
1182
|
+
return e.keyboardInset = "--drawer-keyboard-inset", e;
|
|
1183
|
+
}({}), qt = 60, Jt = 16, Yt = 48, Xt = 150, Zt = 4, Qt = 60, $t = 10, en = 16, tn = /* @__PURE__ */ new Set([
|
|
1184
|
+
"email",
|
|
1185
|
+
"number",
|
|
1186
|
+
"password",
|
|
1187
|
+
"search",
|
|
1188
|
+
"tel",
|
|
1189
|
+
"text",
|
|
1190
|
+
"url"
|
|
1191
|
+
]), nn = Symbol("KeyboardTapBlocked");
|
|
1192
|
+
function rn(e) {
|
|
1193
|
+
let t = D(), n = t.store, r = !1, i = null, a = null, o = null, s = !1, c, l;
|
|
1194
|
+
function u() {
|
|
1195
|
+
c !== void 0 && (cancelAnimationFrame(c), c = void 0);
|
|
1196
|
+
}
|
|
1197
|
+
function p() {
|
|
1198
|
+
l !== void 0 && (clearTimeout(l), l = void 0);
|
|
1199
|
+
}
|
|
1200
|
+
function g() {
|
|
1201
|
+
let e = o;
|
|
1202
|
+
e && (e.element.style.overflowAnchor = e.overflowAnchor, e.element.style.paddingBottom = e.paddingBottom, e.element.style.scrollPaddingBottom = e.scrollPaddingBottom, o = null);
|
|
1203
|
+
}
|
|
1204
|
+
function v(e, t) {
|
|
1205
|
+
let n = Math.max(0, Math.ceil(t)), r = o;
|
|
1206
|
+
if (r && !r.element.isConnected && (g(), r = null), n === 0) {
|
|
1207
|
+
g();
|
|
1208
|
+
return;
|
|
1209
|
+
}
|
|
1210
|
+
if (r && r.element !== e && (g(), r = null), !r) {
|
|
1211
|
+
let t = d(e).getComputedStyle(e);
|
|
1212
|
+
r = {
|
|
1213
|
+
element: e,
|
|
1214
|
+
overflowAnchor: e.style.overflowAnchor,
|
|
1215
|
+
paddingBottom: e.style.paddingBottom,
|
|
1216
|
+
scrollPaddingBottom: e.style.scrollPaddingBottom,
|
|
1217
|
+
computedPaddingBottom: Number.parseFloat(t.paddingBottom) || 0,
|
|
1218
|
+
computedScrollPaddingBottom: Number.parseFloat(t.scrollPaddingBottom) || 0
|
|
1219
|
+
}, o = r;
|
|
1220
|
+
}
|
|
1221
|
+
e.style.overflowAnchor = "none", e.style.paddingBottom = `${r.computedPaddingBottom + n}px`, e.style.scrollPaddingBottom = `${r.computedScrollPaddingBottom + Jt}px`;
|
|
1222
|
+
}
|
|
1223
|
+
function y(e, t) {
|
|
1224
|
+
let n = d(e).matchMedia?.("(prefers-reduced-motion: reduce)")?.matches ? "auto" : "smooth";
|
|
1225
|
+
e.scrollTo({
|
|
1226
|
+
top: t,
|
|
1227
|
+
behavior: n
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
function b() {
|
|
1231
|
+
r = !1, i = null;
|
|
1232
|
+
}
|
|
1233
|
+
W(() => ({
|
|
1234
|
+
mounted: t.presence.mounted(),
|
|
1235
|
+
open: n.open(),
|
|
1236
|
+
modal: t.modal(),
|
|
1237
|
+
nestedDrawerOpen: t.nestedOpenDialogCount() > 0,
|
|
1238
|
+
rootElement: t.viewportElement()
|
|
1239
|
+
}), (e) => {
|
|
1240
|
+
if (!e.mounted || !e.open) {
|
|
1241
|
+
a = null, g(), u();
|
|
1242
|
+
return;
|
|
1243
|
+
}
|
|
1244
|
+
let t = e.rootElement;
|
|
1245
|
+
if (!t) {
|
|
1246
|
+
g();
|
|
1247
|
+
return;
|
|
1248
|
+
}
|
|
1249
|
+
let n = m(t), r = d(t), i = r.visualViewport, o = e.nestedDrawerOpen, b = null, x = 0, S = 0, C = -1;
|
|
1250
|
+
function w(e) {
|
|
1251
|
+
t.style.setProperty(Kt.keyboardInset, `${Math.max(0, Math.ceil(e))}px`);
|
|
1252
|
+
}
|
|
1253
|
+
function T() {
|
|
1254
|
+
a = null, b = null, w(0), g(), u(), p();
|
|
1255
|
+
}
|
|
1256
|
+
let E = r.scrollX, D = r.scrollY;
|
|
1257
|
+
function O() {
|
|
1258
|
+
return e.modal !== !0 || o || !a || mn(r) == null ? !1 : r.scrollX !== E || r.scrollY !== D ? (r.scrollTo({
|
|
1259
|
+
left: E,
|
|
1260
|
+
top: D,
|
|
1261
|
+
behavior: "instant"
|
|
1262
|
+
}), !0) : !1;
|
|
1263
|
+
}
|
|
1264
|
+
let k = null;
|
|
1265
|
+
function A() {
|
|
1266
|
+
k?.(), k = null;
|
|
1267
|
+
}
|
|
1268
|
+
function j(e, t) {
|
|
1269
|
+
A();
|
|
1270
|
+
let n = e.getBoundingClientRect();
|
|
1271
|
+
k = fn(e, (t.top + t.bottom - n.top - n.bottom) / 2);
|
|
1272
|
+
}
|
|
1273
|
+
function M() {
|
|
1274
|
+
u(), A();
|
|
1275
|
+
let e = a;
|
|
1276
|
+
if (o || !e || !h(t, e)) {
|
|
1277
|
+
w(0), g();
|
|
1278
|
+
return;
|
|
1279
|
+
}
|
|
1280
|
+
O();
|
|
1281
|
+
let n = mn(r);
|
|
1282
|
+
if (!n) {
|
|
1283
|
+
w(0), g();
|
|
1284
|
+
return;
|
|
1285
|
+
}
|
|
1286
|
+
w(Math.max(0, r.innerHeight - n.bottom));
|
|
1287
|
+
let i = pn(e, t);
|
|
1288
|
+
if (!i) {
|
|
1289
|
+
g();
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
let s = i.getBoundingClientRect(), c = Math.min(s.bottom, n.bottom), l = Math.max(0, s.bottom - n.bottom);
|
|
1293
|
+
v(i, l > 0 ? l + Yt : 0);
|
|
1294
|
+
let d = Math.max(0, i.scrollHeight - i.clientHeight);
|
|
1295
|
+
if (d <= 0) return;
|
|
1296
|
+
let f = Math.max(s.top, n.top) + Jt, p = c - Jt;
|
|
1297
|
+
if (p <= f) return;
|
|
1298
|
+
let m = e.getBoundingClientRect(), _ = i.scrollTop + (m.top + m.bottom - f - p) / 2, T = Math.round(z(_, 0, d));
|
|
1299
|
+
if (!(b === i && Math.abs(x - T) <= 1)) {
|
|
1300
|
+
let e = b === i ? S + 1 : 1;
|
|
1301
|
+
if (b = i, x = T, S = e, C = -1, e <= Qt) {
|
|
1302
|
+
N();
|
|
1303
|
+
return;
|
|
1304
|
+
}
|
|
1305
|
+
} else if (C >= 0) {
|
|
1306
|
+
let e = i.scrollTop;
|
|
1307
|
+
if (Math.abs(e - T) <= 1) return;
|
|
1308
|
+
if (e !== C) {
|
|
1309
|
+
C = e;
|
|
1310
|
+
return;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
b = i, x = T, S = 0, C = i.scrollTop, y(i, T);
|
|
1314
|
+
}
|
|
1315
|
+
function N() {
|
|
1316
|
+
u(), c = requestAnimationFrame(M);
|
|
1317
|
+
}
|
|
1318
|
+
function P() {
|
|
1319
|
+
let e = Zt, t = () => {
|
|
1320
|
+
l = void 0, M(), --e, e > 0 && (l = setTimeout(t, Xt));
|
|
1321
|
+
};
|
|
1322
|
+
p(), l = setTimeout(t, Xt);
|
|
1323
|
+
}
|
|
1324
|
+
function F(e) {
|
|
1325
|
+
if (o) return !1;
|
|
1326
|
+
let n = on(e);
|
|
1327
|
+
return !n || !h(t, n) ? !1 : (a !== n && (b = null), a = n, !0);
|
|
1328
|
+
}
|
|
1329
|
+
function I(e) {
|
|
1330
|
+
if (s = !1, A(), !F(f(e))) {
|
|
1331
|
+
T();
|
|
1332
|
+
return;
|
|
1333
|
+
}
|
|
1334
|
+
mn(r) != null && P(), N();
|
|
1335
|
+
}
|
|
1336
|
+
function L(e) {
|
|
1337
|
+
if (!s) {
|
|
1338
|
+
if (F(e.relatedTarget)) {
|
|
1339
|
+
let e = a, t = mn(r);
|
|
1340
|
+
e && t && j(e, t), N();
|
|
1341
|
+
return;
|
|
1342
|
+
}
|
|
1343
|
+
T();
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
function ee() {
|
|
1347
|
+
(a || F(_(n))) && N();
|
|
1348
|
+
}
|
|
1349
|
+
function R() {
|
|
1350
|
+
O() && N();
|
|
1351
|
+
}
|
|
1352
|
+
function te() {
|
|
1353
|
+
u(), p(), b = null;
|
|
1354
|
+
}
|
|
1355
|
+
return i?.addEventListener("resize", ee), i?.addEventListener("scroll", ee), n.addEventListener("focusin", I, !0), n.addEventListener("focusout", L, !0), r.addEventListener("scroll", R), n.addEventListener("pointerdown", te, !0), F(_(n)) && N(), () => {
|
|
1356
|
+
i?.removeEventListener("resize", ee), i?.removeEventListener("scroll", ee), n.removeEventListener("focusin", I, !0), n.removeEventListener("focusout", L, !0), r.removeEventListener("scroll", R), n.removeEventListener("pointerdown", te, !0), A(), T(), t.style.removeProperty(Kt.keyboardInset);
|
|
1357
|
+
};
|
|
1358
|
+
});
|
|
1359
|
+
function x(e) {
|
|
1360
|
+
let t = e.touches[0];
|
|
1361
|
+
r = !1, i = t ? {
|
|
1362
|
+
x: t.clientX,
|
|
1363
|
+
y: t.clientY
|
|
1364
|
+
} : null;
|
|
1365
|
+
}
|
|
1366
|
+
function S(e) {
|
|
1367
|
+
let t = e.touches[0];
|
|
1368
|
+
!t || !i || r || (Math.abs(t.clientX - i.x) > $t || Math.abs(t.clientY - i.y) > $t) && (r = !0);
|
|
1369
|
+
}
|
|
1370
|
+
function C(e) {
|
|
1371
|
+
let a = t.viewportElement();
|
|
1372
|
+
if (!n.open() || !t.presence.mounted() || t.nestedOpenDialogCount() > 0 || !a || !i || r) {
|
|
1373
|
+
b();
|
|
1374
|
+
return;
|
|
1375
|
+
}
|
|
1376
|
+
let o = e.changedTouches[0] ?? e.touches[0], c = a.getRootNode(), l = o ? ln(c, o.clientX, o.clientY) : null;
|
|
1377
|
+
if (l === nn) {
|
|
1378
|
+
b();
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
let u = o && (l ?? sn(f(e)));
|
|
1382
|
+
if (u && (!h(a, u.focusTarget) || !h(a, u.clickTarget))) {
|
|
1383
|
+
b();
|
|
1384
|
+
return;
|
|
1385
|
+
}
|
|
1386
|
+
if (u) {
|
|
1387
|
+
let { clickTarget: t, focusTarget: n } = u, r = d(n);
|
|
1388
|
+
if (r.visualViewport && r.visualViewport.scale !== 1) {
|
|
1389
|
+
b();
|
|
1390
|
+
return;
|
|
1391
|
+
}
|
|
1392
|
+
if (_(m(n)) === n && (!r.visualViewport || mn(r) != null)) {
|
|
1393
|
+
b();
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
e.preventDefault(), s = !0;
|
|
1397
|
+
try {
|
|
1398
|
+
dn(n);
|
|
1399
|
+
} finally {
|
|
1400
|
+
s = !1;
|
|
1401
|
+
}
|
|
1402
|
+
un(t, o), b();
|
|
1403
|
+
return;
|
|
1404
|
+
}
|
|
1405
|
+
b();
|
|
1406
|
+
}
|
|
1407
|
+
return B(mt, {
|
|
1408
|
+
value: {
|
|
1409
|
+
onTouchStart: x,
|
|
1410
|
+
onTouchMove: S,
|
|
1411
|
+
onTouchEnd: C,
|
|
1412
|
+
onTouchCancel: b
|
|
1413
|
+
},
|
|
1414
|
+
get children() {
|
|
1415
|
+
return e.children;
|
|
1416
|
+
}
|
|
1417
|
+
});
|
|
1418
|
+
}
|
|
1419
|
+
function an(e) {
|
|
1420
|
+
if (e.isContentEditable) return !0;
|
|
1421
|
+
let t = d(e);
|
|
1422
|
+
return e instanceof t.HTMLTextAreaElement || e instanceof t.HTMLInputElement && tn.has(e.type) ? !e.matches(":disabled") : !1;
|
|
1423
|
+
}
|
|
1424
|
+
function on(e) {
|
|
1425
|
+
if (!p(e)) return null;
|
|
1426
|
+
if (an(e)) return e.isContentEditable ? cn(e) : e;
|
|
1427
|
+
let t = e.closest("label")?.control ?? null;
|
|
1428
|
+
return p(t) && an(t) ? t : null;
|
|
1429
|
+
}
|
|
1430
|
+
function sn(e) {
|
|
1431
|
+
if (!p(e)) return null;
|
|
1432
|
+
let t = on(e);
|
|
1433
|
+
return t ? {
|
|
1434
|
+
focusTarget: t,
|
|
1435
|
+
clickTarget: e
|
|
1436
|
+
} : null;
|
|
1437
|
+
}
|
|
1438
|
+
function cn(e) {
|
|
1439
|
+
let t = e;
|
|
1440
|
+
for (; t.parentElement?.isContentEditable;) t = t.parentElement;
|
|
1441
|
+
return t;
|
|
1442
|
+
}
|
|
1443
|
+
function ln(e, t, n) {
|
|
1444
|
+
let r = te(e, t, n);
|
|
1445
|
+
if (p(r)) {
|
|
1446
|
+
let e = on(r);
|
|
1447
|
+
if (e) return {
|
|
1448
|
+
focusTarget: e,
|
|
1449
|
+
clickTarget: r
|
|
1450
|
+
};
|
|
1451
|
+
}
|
|
1452
|
+
if (v(r) || r?.closest("label") != null) return nn;
|
|
1453
|
+
for (let [r, i] of [
|
|
1454
|
+
[0, en],
|
|
1455
|
+
[0, -16],
|
|
1456
|
+
[en, 0],
|
|
1457
|
+
[-16, 0]
|
|
1458
|
+
]) {
|
|
1459
|
+
let a = on(te(e, t + r, n + i));
|
|
1460
|
+
if (a) return {
|
|
1461
|
+
focusTarget: a,
|
|
1462
|
+
clickTarget: a
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
return null;
|
|
1466
|
+
}
|
|
1467
|
+
function un(e, t) {
|
|
1468
|
+
let n = d(e), r = n.PointerEvent ?? n.MouseEvent, i = {
|
|
1469
|
+
bubbles: !0,
|
|
1470
|
+
cancelable: !0,
|
|
1471
|
+
clientX: t.clientX,
|
|
1472
|
+
clientY: t.clientY,
|
|
1473
|
+
detail: 1
|
|
1474
|
+
}, a;
|
|
1475
|
+
try {
|
|
1476
|
+
a = new r("click", {
|
|
1477
|
+
...i,
|
|
1478
|
+
view: n
|
|
1479
|
+
});
|
|
1480
|
+
} catch {
|
|
1481
|
+
a = new r("click", i);
|
|
1482
|
+
}
|
|
1483
|
+
e.dispatchEvent(a);
|
|
1484
|
+
}
|
|
1485
|
+
function dn(e) {
|
|
1486
|
+
let t = _(m(e)) === e, n = fn(e, -2e3);
|
|
1487
|
+
try {
|
|
1488
|
+
t && e.blur(), e.focus({ preventScroll: !0 });
|
|
1489
|
+
} finally {
|
|
1490
|
+
n();
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
function fn(e, t) {
|
|
1494
|
+
let n = e.style.opacity, r = e.style.transform, i = e.style.transition;
|
|
1495
|
+
return e.style.transition = "none", e.style.opacity = "0", e.style.transform = `translateY(${t}px)`, () => {
|
|
1496
|
+
e.style.opacity = n, e.style.transform = r, e.style.transition = i;
|
|
1497
|
+
};
|
|
1498
|
+
}
|
|
1499
|
+
function pn(e, t) {
|
|
1500
|
+
let n = F(e);
|
|
1501
|
+
return I(n, t, "vertical") ?? I(n, t, "vertical", !0);
|
|
1502
|
+
}
|
|
1503
|
+
function mn(e) {
|
|
1504
|
+
let t = e.visualViewport;
|
|
1505
|
+
if (!t || t.scale !== 1 || e.innerHeight - t.height <= qt) return null;
|
|
1506
|
+
let n = Math.max(0, t.offsetTop);
|
|
1507
|
+
return {
|
|
1508
|
+
top: n,
|
|
1509
|
+
bottom: Math.min(e.innerHeight, n + t.height)
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
//#endregion
|
|
1513
|
+
//#region src/drawer/handle.ts
|
|
1514
|
+
var hn = class extends P {};
|
|
1515
|
+
function gn() {
|
|
1516
|
+
return new hn();
|
|
1517
|
+
}
|
|
1518
|
+
//#endregion
|
|
1519
|
+
//#region src/drawer/index.parts.ts
|
|
1520
|
+
var _n = /* @__PURE__ */ e({
|
|
1521
|
+
Backdrop: () => Z,
|
|
1522
|
+
Close: () => k,
|
|
1523
|
+
Content: () => _e,
|
|
1524
|
+
Description: () => w,
|
|
1525
|
+
Handle: () => hn,
|
|
1526
|
+
Indent: () => De,
|
|
1527
|
+
IndentBackground: () => Te,
|
|
1528
|
+
Popup: () => qe,
|
|
1529
|
+
Portal: () => j,
|
|
1530
|
+
Provider: () => Je,
|
|
1531
|
+
Root: () => Xe,
|
|
1532
|
+
SwipeArea: () => ft,
|
|
1533
|
+
Title: () => C,
|
|
1534
|
+
Trigger: () => O,
|
|
1535
|
+
Viewport: () => kt,
|
|
1536
|
+
VirtualKeyboardProvider: () => rn,
|
|
1537
|
+
createHandle: () => gn
|
|
1538
|
+
});
|
|
1539
|
+
//#endregion
|
|
1540
|
+
export { _n as t };
|