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