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,1108 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
|
|
3
|
+
import { n, t as r } from "./resolveStyle-XcgAuaKR.js";
|
|
4
|
+
import { transitionStatusMapping as i } from "./internals/stateAttributesMapping.js";
|
|
5
|
+
import { composeEventHandlers as a } from "./internals/composeEventHandlers.js";
|
|
6
|
+
import { t as o } from "./runOnceAnimationsFinish-15EM-Z4l.js";
|
|
7
|
+
import { a as s, m as c, n as l, p as u, r as d, t as f } from "./dom-BEAeQ9Eb.js";
|
|
8
|
+
import { t as p } from "./createAnchorPositioning-DcxDXUgB.js";
|
|
9
|
+
import { _ as m, g as h, n as g, o as _ } from "./popupStateMapping-C9eZl19i.js";
|
|
10
|
+
import { a as v, i as y, n as b, r as x, t as S } from "./buttonSemantics-paljfpOX.js";
|
|
11
|
+
import { t as C } from "./setRef-fXF6OIo3.js";
|
|
12
|
+
import { n as w } from "./DirectionContext-BwMabICS.js";
|
|
13
|
+
import { a as ee, i as T, n as E, t as te } from "./constants-BYjBUIIi.js";
|
|
14
|
+
import { Dynamic as D, createComponent as O, effect as ne, getNextElement as k, insert as re, memo as A, mergeProps as j, style as ie, template as M } from "@solidjs/web";
|
|
15
|
+
import { For as ae, Show as N, children as P, createContext as F, createEffect as I, createMemo as L, createSignal as R, createUniqueId as z, flush as oe, omit as B, onCleanup as se, untrack as V, useContext as H } from "solid-js";
|
|
16
|
+
//#region src/toast/utils/focusVisible.ts
|
|
17
|
+
function U(e) {
|
|
18
|
+
if (!e) return !0;
|
|
19
|
+
try {
|
|
20
|
+
return e.matches(":focus-visible");
|
|
21
|
+
} catch {
|
|
22
|
+
return !0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/toast/utils/generateToastId.ts
|
|
27
|
+
var W = 0;
|
|
28
|
+
function G(e = "toast") {
|
|
29
|
+
return W += 1, `${e}-${Math.random().toString(36).slice(2, 6)}-${W}`;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/toast/utils/resolvePromiseOptions.ts
|
|
33
|
+
function K(e, t) {
|
|
34
|
+
if (typeof e == "string") return { description: e };
|
|
35
|
+
if (typeof e == "function") {
|
|
36
|
+
let n = e(t);
|
|
37
|
+
return typeof n == "string" ? { description: n } : n;
|
|
38
|
+
}
|
|
39
|
+
return e;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/toast/store/ToastStore.ts
|
|
43
|
+
function q(e) {
|
|
44
|
+
let t = /* @__PURE__ */ new Map(), n = 0, r = 0;
|
|
45
|
+
return e.forEach((e, i) => {
|
|
46
|
+
let a = e.transitionStatus === "ending";
|
|
47
|
+
t.set(e.id, {
|
|
48
|
+
value: e,
|
|
49
|
+
domIndex: i,
|
|
50
|
+
visibleIndex: a ? -1 : n,
|
|
51
|
+
offsetY: r
|
|
52
|
+
}), r += e.height || 0, a || (n += 1);
|
|
53
|
+
}), t;
|
|
54
|
+
}
|
|
55
|
+
function J(e, t) {
|
|
56
|
+
let n = 0;
|
|
57
|
+
return e.map((e) => {
|
|
58
|
+
if (e.transitionStatus === "ending") return e;
|
|
59
|
+
let r = n >= t;
|
|
60
|
+
return n += 1, e.limited === r ? e : {
|
|
61
|
+
...e,
|
|
62
|
+
limited: r
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
var Y = {
|
|
67
|
+
toasts: (e) => e.toasts,
|
|
68
|
+
isEmpty: (e) => e.toasts.length === 0,
|
|
69
|
+
toast: (e, t) => e.toastMetadata.get(t)?.value,
|
|
70
|
+
toastIndex: (e, t) => e.toastMetadata.get(t)?.domIndex ?? -1,
|
|
71
|
+
toastOffsetY: (e, t) => e.toastMetadata.get(t)?.offsetY ?? 0,
|
|
72
|
+
toastVisibleIndex: (e, t) => e.toastMetadata.get(t)?.visibleIndex ?? -1,
|
|
73
|
+
focused: (e) => e.focused,
|
|
74
|
+
expanded: (e) => e.hovering || e.focused,
|
|
75
|
+
expandedOrOutOfFocus: (e) => e.hovering || e.focused || !e.isWindowFocused,
|
|
76
|
+
prevFocusElement: (e) => e.prevFocusElement
|
|
77
|
+
}, X = class extends m {
|
|
78
|
+
timers = /* @__PURE__ */ new Map();
|
|
79
|
+
areTimersPaused = !1;
|
|
80
|
+
constructor(e) {
|
|
81
|
+
super({
|
|
82
|
+
...e,
|
|
83
|
+
toastMetadata: q(e.toasts)
|
|
84
|
+
}, {});
|
|
85
|
+
}
|
|
86
|
+
setViewport = (e) => {
|
|
87
|
+
this.set("viewport", e);
|
|
88
|
+
};
|
|
89
|
+
syncProviderProps(e, t) {
|
|
90
|
+
let n = this.state.limit !== t;
|
|
91
|
+
if (this.state.timeout === e && !n) return;
|
|
92
|
+
let r = {
|
|
93
|
+
timeout: e,
|
|
94
|
+
limit: t
|
|
95
|
+
};
|
|
96
|
+
if (n) {
|
|
97
|
+
let e = J(this.state.toasts, t);
|
|
98
|
+
r.toasts = e, r.toastMetadata = q(e);
|
|
99
|
+
}
|
|
100
|
+
this.update(r);
|
|
101
|
+
}
|
|
102
|
+
dispose = () => {
|
|
103
|
+
this.timers.forEach((e) => this.stopTimer(e)), this.timers.clear();
|
|
104
|
+
};
|
|
105
|
+
removeToast(e, t = !1) {
|
|
106
|
+
let n = Y.toastIndex(this.state, e);
|
|
107
|
+
if (n === -1) return;
|
|
108
|
+
let r = this.state.toasts[n];
|
|
109
|
+
t || r?.onRemove?.();
|
|
110
|
+
let i = [...this.state.toasts];
|
|
111
|
+
i.splice(n, 1), this.setToasts(i);
|
|
112
|
+
}
|
|
113
|
+
addToast = (e) => {
|
|
114
|
+
let { timeout: t, limit: n } = this.state, r = e.id || G();
|
|
115
|
+
if (e.id) {
|
|
116
|
+
let t = Y.toast(this.state, e.id);
|
|
117
|
+
if (t) {
|
|
118
|
+
if (t.transitionStatus === "ending") this.removeToast(e.id, !0);
|
|
119
|
+
else {
|
|
120
|
+
let t = { ...e };
|
|
121
|
+
return delete t.id, delete t.transitionStatus, this.updateToastInternal(e.id, t, !0, !0), e.id;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
let i = {
|
|
126
|
+
...e,
|
|
127
|
+
id: r,
|
|
128
|
+
updateKey: 0,
|
|
129
|
+
transitionStatus: "starting"
|
|
130
|
+
}, a = [i, ...this.state.toasts];
|
|
131
|
+
this.setToasts(J(a, n));
|
|
132
|
+
let o = i.timeout ?? t;
|
|
133
|
+
return i.type !== "loading" && o > 0 && this.scheduleTimer(r, o, () => this.closeToast(r)), Y.expandedOrOutOfFocus(this.state) && this.pauseTimers(), r;
|
|
134
|
+
};
|
|
135
|
+
updateToast = (e, t) => {
|
|
136
|
+
this.updateToastInternal(e, t, !1, !0);
|
|
137
|
+
};
|
|
138
|
+
updateToastInternal = (e, t, n = !1, r = !1) => {
|
|
139
|
+
let { timeout: i, toasts: a } = this.state, o = Y.toast(this.state, e);
|
|
140
|
+
if (!o || o.transitionStatus === "ending") return;
|
|
141
|
+
let s = {
|
|
142
|
+
...o,
|
|
143
|
+
...t,
|
|
144
|
+
...r && { updateKey: o.updateKey + 1 }
|
|
145
|
+
};
|
|
146
|
+
this.setToasts(a.map((t) => t.id === e ? s : t));
|
|
147
|
+
let c = s.timeout ?? i, l = o.timeout ?? i, u = Object.hasOwn(t, "timeout"), d = s.transitionStatus !== "ending" && s.type !== "loading" && c > 0, f = this.timers.has(e), p = l !== c, m = o.type === "loading";
|
|
148
|
+
if (!d && f) {
|
|
149
|
+
this.clearTimer(e);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
d && (!f || p || u || m || n) && (this.clearTimer(e), this.scheduleTimer(e, c, () => this.closeToast(e)), Y.expandedOrOutOfFocus(this.state) && this.pauseTimers());
|
|
153
|
+
};
|
|
154
|
+
closeToast = (e) => {
|
|
155
|
+
let t = e === void 0, { limit: n, toasts: r } = this.state, i;
|
|
156
|
+
if (t) i = r, this.clearTimers();
|
|
157
|
+
else {
|
|
158
|
+
let t = Y.toast(this.state, e);
|
|
159
|
+
if (!t) return;
|
|
160
|
+
i = [t], this.clearTimer(e);
|
|
161
|
+
}
|
|
162
|
+
let a = J(r.map((n) => t || n.id === e ? {
|
|
163
|
+
...n,
|
|
164
|
+
transitionStatus: "ending",
|
|
165
|
+
height: 0
|
|
166
|
+
} : n), n);
|
|
167
|
+
this.setToasts(a, !a.some((e) => e.transitionStatus !== "ending")), i.forEach((e) => {
|
|
168
|
+
e.transitionStatus !== "ending" && e.onClose?.();
|
|
169
|
+
}), this.handleFocusManagement(e);
|
|
170
|
+
};
|
|
171
|
+
promiseToast = (e, t) => {
|
|
172
|
+
let n = K(t.loading), r = this.addToast({
|
|
173
|
+
...n,
|
|
174
|
+
type: "loading"
|
|
175
|
+
}), i = e.then((e) => {
|
|
176
|
+
let n = K(t.success, e);
|
|
177
|
+
return this.updateToast(r, {
|
|
178
|
+
...n,
|
|
179
|
+
type: "success",
|
|
180
|
+
timeout: n.timeout
|
|
181
|
+
}), e;
|
|
182
|
+
}).catch((e) => {
|
|
183
|
+
let n = K(t.error, e);
|
|
184
|
+
return this.updateToast(r, {
|
|
185
|
+
...n,
|
|
186
|
+
type: "error",
|
|
187
|
+
timeout: n.timeout
|
|
188
|
+
}), Promise.reject(e);
|
|
189
|
+
});
|
|
190
|
+
return Object.hasOwn(t, "setPromise") && t.setPromise(i), i;
|
|
191
|
+
};
|
|
192
|
+
pauseTimers() {
|
|
193
|
+
this.areTimersPaused || (this.areTimersPaused = !0, this.timers.forEach((e) => {
|
|
194
|
+
e.scheduled && (this.stopTimer(e), e.remaining = Math.max(e.remaining - (Date.now() - e.start), 0));
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
resumeTimers() {
|
|
198
|
+
this.areTimersPaused && (this.areTimersPaused = !1, this.timers.forEach((e, t) => {
|
|
199
|
+
e.remaining = e.remaining > 0 ? e.remaining : e.delay, e.scheduled = !0, this.stopTimer(e), e.handle = setTimeout(() => {
|
|
200
|
+
e.handle = void 0, this.handleTimerFired(t), e.callback();
|
|
201
|
+
}, e.remaining), e.start = Date.now();
|
|
202
|
+
}));
|
|
203
|
+
}
|
|
204
|
+
restoreFocusToPrevElement() {
|
|
205
|
+
this.state.prevFocusElement?.focus({ preventScroll: !0 });
|
|
206
|
+
}
|
|
207
|
+
handleDocumentPointerDown = (e) => {
|
|
208
|
+
if (e.pointerType !== "touch") return;
|
|
209
|
+
let t = d(e);
|
|
210
|
+
l(this.state.viewport, t) || (this.resumeTimers(), this.update({
|
|
211
|
+
hovering: !1,
|
|
212
|
+
focused: !1
|
|
213
|
+
}));
|
|
214
|
+
};
|
|
215
|
+
scheduleTimer(e, t, n) {
|
|
216
|
+
let r = Date.now(), i = !Y.expandedOrOutOfFocus(this.state), a = {
|
|
217
|
+
scheduled: i,
|
|
218
|
+
handle: void 0,
|
|
219
|
+
start: r,
|
|
220
|
+
delay: t,
|
|
221
|
+
remaining: t,
|
|
222
|
+
callback: n
|
|
223
|
+
};
|
|
224
|
+
i && (a.handle = setTimeout(() => {
|
|
225
|
+
a.handle = void 0, this.handleTimerFired(e), n();
|
|
226
|
+
}, t)), this.timers.set(e, a);
|
|
227
|
+
}
|
|
228
|
+
stopTimer(e) {
|
|
229
|
+
e.handle !== void 0 && (clearTimeout(e.handle), e.handle = void 0);
|
|
230
|
+
}
|
|
231
|
+
clearTimers() {
|
|
232
|
+
this.timers.forEach((e) => this.stopTimer(e)), this.timers.clear(), this.areTimersPaused = !1;
|
|
233
|
+
}
|
|
234
|
+
clearTimer(e) {
|
|
235
|
+
let t = this.timers.get(e);
|
|
236
|
+
t && this.stopTimer(t), this.timers.delete(e), this.resetPausedStateIfNoTimersRemain();
|
|
237
|
+
}
|
|
238
|
+
handleTimerFired(e) {
|
|
239
|
+
this.timers.delete(e), this.resetPausedStateIfNoTimersRemain();
|
|
240
|
+
}
|
|
241
|
+
resetPausedStateIfNoTimersRemain() {
|
|
242
|
+
this.timers.size === 0 && (this.areTimersPaused = !1);
|
|
243
|
+
}
|
|
244
|
+
setToasts(e, t = e.length === 0) {
|
|
245
|
+
let n = {
|
|
246
|
+
toasts: e,
|
|
247
|
+
toastMetadata: q(e)
|
|
248
|
+
};
|
|
249
|
+
t && (n.hovering = !1, n.focused = !1), this.update(n);
|
|
250
|
+
}
|
|
251
|
+
handleFocusManagement(e) {
|
|
252
|
+
let t = f(u(this.state.viewport));
|
|
253
|
+
if (!this.state.viewport || !l(this.state.viewport, t) || !U(t)) return;
|
|
254
|
+
if (e === void 0) {
|
|
255
|
+
this.restoreFocusToPrevElement();
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
let n = Y.toasts(this.state), r = Y.toastIndex(this.state, e), i = (e, t) => {
|
|
259
|
+
for (let r = e; r >= 0 && r < n.length; r += t) if (n[r].transitionStatus !== "ending") return n[r];
|
|
260
|
+
return null;
|
|
261
|
+
}, a = i(r + 1, 1) ?? i(r - 1, -1);
|
|
262
|
+
a ? a.element?.focus() : this.restoreFocusToPrevElement();
|
|
263
|
+
}
|
|
264
|
+
}, ce = Symbol("ToastProviderContext"), le = F(ce);
|
|
265
|
+
function ue() {
|
|
266
|
+
let e = H(le);
|
|
267
|
+
if (e === ce) throw Error("Base UI: useToastManager must be used within <Toast.Provider>.");
|
|
268
|
+
return e;
|
|
269
|
+
}
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/toast/provider/ToastProvider.tsx
|
|
272
|
+
function de(e) {
|
|
273
|
+
let t = new X({
|
|
274
|
+
timeout: V(() => e.timeout ?? 5e3),
|
|
275
|
+
limit: V(() => e.limit ?? 3),
|
|
276
|
+
viewport: null,
|
|
277
|
+
toasts: [],
|
|
278
|
+
hovering: !1,
|
|
279
|
+
focused: !1,
|
|
280
|
+
isWindowFocused: !0,
|
|
281
|
+
prevFocusElement: null
|
|
282
|
+
});
|
|
283
|
+
return se(t.dispose), I(() => ({
|
|
284
|
+
timeout: e.timeout ?? 5e3,
|
|
285
|
+
limit: e.limit ?? 3
|
|
286
|
+
}), ({ timeout: e, limit: n }) => {
|
|
287
|
+
t.syncProviderProps(e, n);
|
|
288
|
+
}), I(() => e.toastManager, (e) => {
|
|
289
|
+
if (e) return e[" subscribe"](({ action: e, options: n }) => {
|
|
290
|
+
let r = n.id;
|
|
291
|
+
e === "promise" && n.promise ? t.promiseToast(n.promise, n) : e === "update" && r ? t.updateToast(r, n) : e === "close" ? t.closeToast(r) : t.addToast(n);
|
|
292
|
+
});
|
|
293
|
+
}), O(le, {
|
|
294
|
+
value: t,
|
|
295
|
+
get children() {
|
|
296
|
+
return e.children;
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region src/toast/utils/mergeToastStyles.ts
|
|
302
|
+
function fe(e, t) {
|
|
303
|
+
if (typeof t == "string") {
|
|
304
|
+
let n = Object.entries(e).filter((e) => e[1] != null).map(([e, t]) => `${e}:${String(t)}`).join(";");
|
|
305
|
+
return n ? `${n};${t}` : t;
|
|
306
|
+
}
|
|
307
|
+
return {
|
|
308
|
+
...e,
|
|
309
|
+
...t || void 0
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region src/toast/viewport/ToastViewport.tsx
|
|
314
|
+
var pe = /* @__PURE__ */ M("<div>"), me = /* @__PURE__ */ M("<div role=alert aria-atomic=true><div></div><div>"), he = {
|
|
315
|
+
"clip-path": "inset(50%)",
|
|
316
|
+
overflow: "hidden",
|
|
317
|
+
"white-space": "nowrap",
|
|
318
|
+
border: 0,
|
|
319
|
+
padding: 0,
|
|
320
|
+
width: "1px",
|
|
321
|
+
height: "1px",
|
|
322
|
+
margin: "-1px",
|
|
323
|
+
position: "fixed",
|
|
324
|
+
top: 0,
|
|
325
|
+
left: 0
|
|
326
|
+
};
|
|
327
|
+
function ge(e) {
|
|
328
|
+
let i = ue(), o = e, s = e, p = !1, m = !1, g = !1, _, v = L(() => i.track().viewport), y = L(() => Y.isEmpty(i.track())), b = L(() => Y.toasts(i.track())), x = L(() => Y.focused(i.track())), S = L(() => Y.expanded(i.track())), C = L(() => Y.prevFocusElement(i.track())), w = L(() => b()[0]?.height), ee = L(() => b().some((e) => e.transitionStatus === "ending")), T = L(() => b().filter((e) => e.priority === "high"));
|
|
329
|
+
I(() => ({
|
|
330
|
+
empty: y(),
|
|
331
|
+
viewport: v()
|
|
332
|
+
}), ({ empty: e, viewport: t }) => {
|
|
333
|
+
if (!t || e) return;
|
|
334
|
+
let n = t, r = c(n), a = u(n);
|
|
335
|
+
function o(e) {
|
|
336
|
+
e.key === "F6" && d(e) !== n && (e.preventDefault(), i.set("prevFocusElement", f(a)), n.focus({ preventScroll: !0 }), i.pauseTimers(), i.set("focused", !0));
|
|
337
|
+
}
|
|
338
|
+
function s(e) {
|
|
339
|
+
d(e) === r && (i.set("isWindowFocused", !1), i.pauseTimers());
|
|
340
|
+
}
|
|
341
|
+
function p(e) {
|
|
342
|
+
if (e.relatedTarget) return;
|
|
343
|
+
let t = d(e), a = f(u(n));
|
|
344
|
+
(t === r || !l(n, t) || !U(a)) && i.resumeTimers(), clearTimeout(_), _ = setTimeout(() => i.set("isWindowFocused", !0), 0);
|
|
345
|
+
}
|
|
346
|
+
return r.addEventListener("keydown", o), r.addEventListener("blur", s, !0), r.addEventListener("focus", p, !0), a.addEventListener("pointerdown", i.handleDocumentPointerDown, !0), () => {
|
|
347
|
+
r.removeEventListener("keydown", o), r.removeEventListener("blur", s, !0), r.removeEventListener("focus", p, !0), a.removeEventListener("pointerdown", i.handleDocumentPointerDown, !0), clearTimeout(_);
|
|
348
|
+
};
|
|
349
|
+
});
|
|
350
|
+
function E(e) {
|
|
351
|
+
p = !0;
|
|
352
|
+
let t = e.relatedTarget === i.state.viewport ? V(b).find((e) => e.transitionStatus !== "ending" && !e.limited) : void 0;
|
|
353
|
+
t ? t.element?.focus() : i.restoreFocusToPrevElement();
|
|
354
|
+
}
|
|
355
|
+
function te(e) {
|
|
356
|
+
e.key === "Tab" && e.shiftKey && d(e) === i.state.viewport && (e.preventDefault(), i.restoreFocusToPrevElement());
|
|
357
|
+
}
|
|
358
|
+
function M() {
|
|
359
|
+
i.state.toasts.some((e) => e.transitionStatus === "ending") || g || !m || (i.state.isWindowFocused && i.resumeTimers(), i.set("hovering", !1), m = !1);
|
|
360
|
+
}
|
|
361
|
+
I(() => ee(), () => {
|
|
362
|
+
M();
|
|
363
|
+
});
|
|
364
|
+
function P() {
|
|
365
|
+
i.pauseTimers(), i.set("hovering", !0), m = !1;
|
|
366
|
+
}
|
|
367
|
+
function F() {
|
|
368
|
+
i.state.isWindowFocused && i.resumeTimers();
|
|
369
|
+
}
|
|
370
|
+
function R() {
|
|
371
|
+
m = !0, M();
|
|
372
|
+
}
|
|
373
|
+
function z(e) {
|
|
374
|
+
e.pointerType === "touch" && (g = !0);
|
|
375
|
+
}
|
|
376
|
+
function oe(e) {
|
|
377
|
+
e.pointerType === "touch" && (g = !1, M());
|
|
378
|
+
}
|
|
379
|
+
function se() {
|
|
380
|
+
if (p) {
|
|
381
|
+
p = !1;
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
V(x) || U(f(u(i.state.viewport))) && (i.set("focused", !0), i.pauseTimers());
|
|
385
|
+
}
|
|
386
|
+
function H(e) {
|
|
387
|
+
!V(x) || l(i.state.viewport, e.relatedTarget) || (i.set("focused", !1), F());
|
|
388
|
+
}
|
|
389
|
+
let W = L(() => ({ expanded: S() })), G = L(() => n(e.class, W())), K = L(() => fe({ "--toast-frontmost-height": w() ? `${w()}px` : void 0 }, r(e.style, W()))), q = L(() => t(W())), J = L(() => !y() && !!C()), X = B(s, "as", "children", "class", "onBlur", "onClick", "onFocus", "onKeyDown", "onMouseEnter", "onMouseLeave", "onMouseMove", "onPointerCancel", "onPointerDown", "onPointerUp", "ref", "style"), ce = a(() => o.onBlur, () => H), le = a(() => o.onClick, () => se), de = a(() => o.onFocus, () => se), ge = a(() => o.onKeyDown, () => te), _e = a(() => o.onMouseEnter, () => P), ve = a(() => o.onMouseMove, () => P), Z = a(() => o.onMouseLeave, () => R), ye = a(() => o.onPointerDown, () => z), be = a(() => o.onPointerUp, () => oe), xe = a(() => o.onPointerCancel, () => oe);
|
|
390
|
+
return [
|
|
391
|
+
O(N, {
|
|
392
|
+
get when() {
|
|
393
|
+
return J();
|
|
394
|
+
},
|
|
395
|
+
get children() {
|
|
396
|
+
return O(h, { onFocus: E });
|
|
397
|
+
}
|
|
398
|
+
}),
|
|
399
|
+
O(D, j({
|
|
400
|
+
get component() {
|
|
401
|
+
return e.as ?? "div";
|
|
402
|
+
},
|
|
403
|
+
ref: [i.setViewport, o.ref],
|
|
404
|
+
tabIndex: -1,
|
|
405
|
+
role: "region",
|
|
406
|
+
"aria-live": "polite",
|
|
407
|
+
"aria-atomic": "false",
|
|
408
|
+
"aria-relevant": "additions text",
|
|
409
|
+
"aria-label": "Notifications",
|
|
410
|
+
get class() {
|
|
411
|
+
return G();
|
|
412
|
+
},
|
|
413
|
+
get style() {
|
|
414
|
+
return K();
|
|
415
|
+
},
|
|
416
|
+
onBlur: ce,
|
|
417
|
+
onClick: le,
|
|
418
|
+
onFocus: de,
|
|
419
|
+
onKeyDown: ge,
|
|
420
|
+
onMouseEnter: _e,
|
|
421
|
+
onMouseLeave: Z,
|
|
422
|
+
onMouseMove: ve,
|
|
423
|
+
onPointerCancel: xe,
|
|
424
|
+
onPointerDown: ye,
|
|
425
|
+
onPointerUp: be
|
|
426
|
+
}, q, X, { get children() {
|
|
427
|
+
return [
|
|
428
|
+
O(N, {
|
|
429
|
+
get when() {
|
|
430
|
+
return J();
|
|
431
|
+
},
|
|
432
|
+
get children() {
|
|
433
|
+
return O(h, { onFocus: E });
|
|
434
|
+
}
|
|
435
|
+
}),
|
|
436
|
+
A(() => e.children),
|
|
437
|
+
O(N, {
|
|
438
|
+
get when() {
|
|
439
|
+
return J();
|
|
440
|
+
},
|
|
441
|
+
get children() {
|
|
442
|
+
return O(h, { onFocus: E });
|
|
443
|
+
}
|
|
444
|
+
})
|
|
445
|
+
];
|
|
446
|
+
} })),
|
|
447
|
+
O(N, {
|
|
448
|
+
get when() {
|
|
449
|
+
return A(() => !x())() && T().length > 0;
|
|
450
|
+
},
|
|
451
|
+
get children() {
|
|
452
|
+
var e = k(pe);
|
|
453
|
+
return re(e, O(ae, {
|
|
454
|
+
get each() {
|
|
455
|
+
return T();
|
|
456
|
+
},
|
|
457
|
+
keyed: (e) => e.id,
|
|
458
|
+
children: (e) => (() => {
|
|
459
|
+
var t = k(me), n = t.firstChild, r = n.nextSibling;
|
|
460
|
+
return re(n, () => e().title), re(r, () => e().description), t;
|
|
461
|
+
})()
|
|
462
|
+
})), ne(() => he, (t, n) => {
|
|
463
|
+
ie(e, t, n);
|
|
464
|
+
}), e;
|
|
465
|
+
}
|
|
466
|
+
})
|
|
467
|
+
];
|
|
468
|
+
}
|
|
469
|
+
//#endregion
|
|
470
|
+
//#region src/toast/root/ToastRootContext.ts
|
|
471
|
+
var _e = Symbol("ToastRootContext"), ve = F(_e);
|
|
472
|
+
function Z() {
|
|
473
|
+
let e = H(ve);
|
|
474
|
+
if (e === _e) throw Error("Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.");
|
|
475
|
+
return e;
|
|
476
|
+
}
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region src/toast/root/ToastRoot.tsx
|
|
479
|
+
var ye = {
|
|
480
|
+
...i,
|
|
481
|
+
swipeDirection(e) {
|
|
482
|
+
return e ? { "data-swipe-direction": e } : null;
|
|
483
|
+
}
|
|
484
|
+
}, be = 40, xe = 10, Se = .5, Ce = 1, we = `button,a,input,textarea,[role="button"],${`${te},${E}`}`, Te = ["down", "right"];
|
|
485
|
+
function Q(e) {
|
|
486
|
+
let i = ue(), s = e, c = e, p = () => s.toast, m = () => p().positionerProps?.anchor !== void 0, h = L(() => {
|
|
487
|
+
if (m()) return [];
|
|
488
|
+
let e = s.swipeDirection ?? Te;
|
|
489
|
+
return Array.isArray(e) ? e : [e];
|
|
490
|
+
}), g = L(() => h().length > 0), [_, v] = R(null, { ownedWrite: !0 }), [y, b] = R(void 0, { ownedWrite: !0 }), [x, S] = R(!1, { ownedWrite: !0 }), [C, w] = R(!1, { ownedWrite: !0 }), [E, te] = R({
|
|
491
|
+
x: 0,
|
|
492
|
+
y: 0
|
|
493
|
+
}, { ownedWrite: !0 }), [ne, k] = R({
|
|
494
|
+
x: 0,
|
|
495
|
+
y: 0,
|
|
496
|
+
scale: 1
|
|
497
|
+
}, { ownedWrite: !0 }), [re, A] = R(void 0, { ownedWrite: !0 }), [ie, M] = R(void 0, { ownedWrite: !0 }), [ae, N] = R(null, { ownedWrite: !0 }), P, F = {
|
|
498
|
+
x: 0,
|
|
499
|
+
y: 0
|
|
500
|
+
}, z = {
|
|
501
|
+
x: 0,
|
|
502
|
+
y: 0,
|
|
503
|
+
scale: 1
|
|
504
|
+
}, H, U = 0, W = !1, G = {
|
|
505
|
+
x: 0,
|
|
506
|
+
y: 0
|
|
507
|
+
}, K = !1, q = {
|
|
508
|
+
x: 0,
|
|
509
|
+
y: 0
|
|
510
|
+
}, J = null, X = null, ce = L(() => p().id), le = L(() => p().transitionStatus), de = L(() => le() !== "ending"), pe = L(() => Y.toastIndex(i.track(), p().id)), me = L(() => Y.toastVisibleIndex(i.track(), p().id)), he = L(() => Y.toastOffsetY(i.track(), p().id)), ge = L(() => Y.focused(i.track())), _e = L(() => Y.expanded(i.track()));
|
|
511
|
+
I(() => ({
|
|
512
|
+
open: de(),
|
|
513
|
+
element: _()
|
|
514
|
+
}), ({ open: e, element: t }) => {
|
|
515
|
+
if (!t) return;
|
|
516
|
+
let n = new AbortController();
|
|
517
|
+
return o(t, () => {
|
|
518
|
+
let e = V(p);
|
|
519
|
+
e.transitionStatus === "ending" && i.removeToast(e.id);
|
|
520
|
+
}, n.signal, { waitForStartingStyleRemoved: e }), () => n.abort();
|
|
521
|
+
});
|
|
522
|
+
function Z(e = !1) {
|
|
523
|
+
let t = V(_);
|
|
524
|
+
if (!t) return;
|
|
525
|
+
let n = t.style.height;
|
|
526
|
+
t.style.height = "auto";
|
|
527
|
+
let r = t.offsetHeight;
|
|
528
|
+
t.style.height = n, i.updateToastInternal(V(p).id, {
|
|
529
|
+
element: t,
|
|
530
|
+
height: r,
|
|
531
|
+
transitionStatus: void 0
|
|
532
|
+
}), e && oe();
|
|
533
|
+
}
|
|
534
|
+
I(() => ({
|
|
535
|
+
id: ce(),
|
|
536
|
+
status: le()
|
|
537
|
+
}), ({ id: e, status: t }) => {
|
|
538
|
+
let n = P;
|
|
539
|
+
(t === "starting" || n !== e) && (n !== void 0 && (b(void 0), k({
|
|
540
|
+
x: 0,
|
|
541
|
+
y: 0,
|
|
542
|
+
scale: 1
|
|
543
|
+
}), Q({
|
|
544
|
+
x: 0,
|
|
545
|
+
y: 0
|
|
546
|
+
})), P = e, Z());
|
|
547
|
+
}), se(() => {
|
|
548
|
+
X?.abort();
|
|
549
|
+
});
|
|
550
|
+
function Q(e) {
|
|
551
|
+
q = e, te(e);
|
|
552
|
+
}
|
|
553
|
+
function Ee(e, t) {
|
|
554
|
+
let n = V(h), r = (e) => e > 0 ? e ** Se : -(Math.abs(e) ** Se), i = e > 0 && !n.includes("right") || e < 0 && !n.includes("left"), a = t > 0 && !n.includes("down") || t < 0 && !n.includes("up");
|
|
555
|
+
return {
|
|
556
|
+
x: i ? r(e) : e,
|
|
557
|
+
y: a ? r(t) : t
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
function $(e) {
|
|
561
|
+
if (e.pointerId !== J) return;
|
|
562
|
+
J = null, X?.abort(), X = null, S(!1), w(!1), N(null);
|
|
563
|
+
let t = z;
|
|
564
|
+
if (e.type === "pointercancel" || W) {
|
|
565
|
+
Q({
|
|
566
|
+
x: t.x,
|
|
567
|
+
y: t.y
|
|
568
|
+
}), b(void 0);
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
let n = q, r = n.x - t.x, a = n.y - t.y, o;
|
|
572
|
+
for (let e of V(h)) if (T(e, r, a) > be) {
|
|
573
|
+
o = e;
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
o ? (b(o), i.closeToast(V(p).id)) : (Q({
|
|
577
|
+
x: t.x,
|
|
578
|
+
y: t.y
|
|
579
|
+
}), b(void 0));
|
|
580
|
+
}
|
|
581
|
+
function De(e) {
|
|
582
|
+
if (e.button !== 0 || (e.pointerType === "touch" && i.pauseTimers(), d(e)?.closest(we))) return;
|
|
583
|
+
W = !1, H = void 0, U = 0, J = e.pointerId, F = {
|
|
584
|
+
x: e.clientX,
|
|
585
|
+
y: e.clientY
|
|
586
|
+
}, G = F;
|
|
587
|
+
let t = e.currentTarget, n = ee(t);
|
|
588
|
+
z = n, k(n), Q({
|
|
589
|
+
x: n.x,
|
|
590
|
+
y: n.y
|
|
591
|
+
}), i.set("hovering", !0), S(!0), w(!1), N(null), K = !0, X?.abort();
|
|
592
|
+
let r = new AbortController();
|
|
593
|
+
X = r;
|
|
594
|
+
let a = u(t);
|
|
595
|
+
a.addEventListener("pointerup", $, { signal: r.signal }), a.addEventListener("pointercancel", $, { signal: r.signal }), t.setPointerCapture?.(e.pointerId);
|
|
596
|
+
}
|
|
597
|
+
function Oe(e) {
|
|
598
|
+
if (e.pointerId !== J) return;
|
|
599
|
+
e.preventDefault(), K &&= (F = {
|
|
600
|
+
x: e.clientX,
|
|
601
|
+
y: e.clientY
|
|
602
|
+
}, !1);
|
|
603
|
+
let { clientY: t, clientX: n, movementX: r, movementY: i } = e, a = V(h);
|
|
604
|
+
(i < 0 && t > G.y || i > 0 && t < G.y) && (G = {
|
|
605
|
+
x: G.x,
|
|
606
|
+
y: t
|
|
607
|
+
}), (r < 0 && n > G.x || r > 0 && n < G.x) && (G = {
|
|
608
|
+
x: n,
|
|
609
|
+
y: G.y
|
|
610
|
+
});
|
|
611
|
+
let o = n - F.x, s = t - F.y, c = t - G.y, l = n - G.x, u = V(ae);
|
|
612
|
+
if (!V(C) && Math.sqrt(o * o + s * s) >= Ce) {
|
|
613
|
+
w(!0);
|
|
614
|
+
let e = a.includes("left") || a.includes("right"), t = a.includes("up") || a.includes("down");
|
|
615
|
+
e && t && (u = Math.abs(o) > Math.abs(s) ? "horizontal" : "vertical", N(u));
|
|
616
|
+
}
|
|
617
|
+
let d;
|
|
618
|
+
if (!H) u === "vertical" ? s > 0 ? d = "down" : s < 0 && (d = "up") : u === "horizontal" ? o > 0 ? d = "right" : o < 0 && (d = "left") : d = Math.abs(o) >= Math.abs(s) ? o > 0 ? "right" : "left" : s > 0 ? "down" : "up", d && a.includes(d) && (H = d, U = T(d, o, s), b(d));
|
|
619
|
+
else {
|
|
620
|
+
let e = H, t = T(e, l, c);
|
|
621
|
+
t > be ? (W = !1, b(e)) : !(a.includes("left") && a.includes("right")) && !(a.includes("up") && a.includes("down")) && U - t >= xe && (W = !0);
|
|
622
|
+
}
|
|
623
|
+
let f = Ee(o, s), p = z.x, m = z.y, g = a.includes("left") || a.includes("right"), _ = a.includes("up") || a.includes("down");
|
|
624
|
+
u !== "vertical" && g && (p += f.x), u !== "horizontal" && _ && (m += f.y), Q({
|
|
625
|
+
x: p,
|
|
626
|
+
y: m
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
function ke(e) {
|
|
630
|
+
if (e.key !== "Escape") return;
|
|
631
|
+
let t = V(_);
|
|
632
|
+
!t || !l(t, f(u(t))) || i.closeToast(V(p).id);
|
|
633
|
+
}
|
|
634
|
+
I(() => ({
|
|
635
|
+
enabled: g(),
|
|
636
|
+
element: _()
|
|
637
|
+
}), ({ enabled: e, element: t }) => {
|
|
638
|
+
if (!e || !t) return;
|
|
639
|
+
function n(e) {
|
|
640
|
+
J === null || !l(t, d(e)) || e.preventDefault();
|
|
641
|
+
}
|
|
642
|
+
return t.addEventListener("touchmove", n, { passive: !1 }), () => t.removeEventListener("touchmove", n);
|
|
643
|
+
});
|
|
644
|
+
function Ae() {
|
|
645
|
+
let e = E(), t = ne(), n = e.x - t.x, r = e.y - t.y;
|
|
646
|
+
return {
|
|
647
|
+
transition: x() ? "none" : void 0,
|
|
648
|
+
transform: x() ? `translateX(${e.x}px) translateY(${e.y}px) scale(${t.scale})` : void 0,
|
|
649
|
+
"--toast-swipe-movement-x": `${n}px`,
|
|
650
|
+
"--toast-swipe-movement-y": `${r}px`
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
let je = L(() => p().priority === "high"), Me = L(() => ({
|
|
654
|
+
transitionStatus: p().transitionStatus,
|
|
655
|
+
expanded: _e(),
|
|
656
|
+
limited: p().limited || !1,
|
|
657
|
+
type: p().type,
|
|
658
|
+
swiping: x(),
|
|
659
|
+
swipeDirection: y()
|
|
660
|
+
})), Ne = L(() => n(e.class, Me())), Pe = L(() => fe({
|
|
661
|
+
...Ae(),
|
|
662
|
+
"--toast-index": String(p().transitionStatus === "ending" ? pe() : me()),
|
|
663
|
+
"--toast-offset-y": `${he()}px`,
|
|
664
|
+
"--toast-height": p().height ? `${p().height}px` : void 0
|
|
665
|
+
}, r(e.style, Me()))), Fe = L(() => t(Me(), ye)), Ie = B(c, "as", "class", "onKeyDown", "onPointerCancel", "onPointerDown", "onPointerMove", "onPointerUp", "ref", "style", "swipeDirection", "toast"), Le = a(() => s.onKeyDown, () => ke), Re = a(() => s.onPointerDown, () => V(() => g() ? De : void 0)), ze = a(() => s.onPointerMove, () => V(() => g() ? Oe : void 0)), Be = a(() => s.onPointerUp, () => V(() => g() ? $ : void 0)), Ve = a(() => s.onPointerCancel, () => V(() => g() ? $ : void 0));
|
|
666
|
+
return O(ve, {
|
|
667
|
+
value: {
|
|
668
|
+
toast: p,
|
|
669
|
+
setTitleId: A,
|
|
670
|
+
setDescriptionId: M,
|
|
671
|
+
visibleIndex: me,
|
|
672
|
+
expanded: _e,
|
|
673
|
+
recalculateHeight: Z
|
|
674
|
+
},
|
|
675
|
+
get children() {
|
|
676
|
+
return O(D, j({
|
|
677
|
+
get component() {
|
|
678
|
+
return e.as ?? "div";
|
|
679
|
+
},
|
|
680
|
+
ref: [((e) => v(e)), s.ref],
|
|
681
|
+
get role() {
|
|
682
|
+
return je() ? "alertdialog" : "dialog";
|
|
683
|
+
},
|
|
684
|
+
tabIndex: 0,
|
|
685
|
+
"aria-modal": "false",
|
|
686
|
+
get "aria-labelledby"() {
|
|
687
|
+
return re();
|
|
688
|
+
},
|
|
689
|
+
get "aria-describedby"() {
|
|
690
|
+
return ie();
|
|
691
|
+
},
|
|
692
|
+
get "aria-hidden"() {
|
|
693
|
+
return je() && !ge() ? "true" : void 0;
|
|
694
|
+
},
|
|
695
|
+
get inert() {
|
|
696
|
+
return p().limited || void 0;
|
|
697
|
+
},
|
|
698
|
+
get class() {
|
|
699
|
+
return Ne();
|
|
700
|
+
},
|
|
701
|
+
get style() {
|
|
702
|
+
return Pe();
|
|
703
|
+
},
|
|
704
|
+
onKeyDown: Le,
|
|
705
|
+
onPointerDown: Re,
|
|
706
|
+
onPointerMove: ze,
|
|
707
|
+
onPointerUp: Be,
|
|
708
|
+
onPointerCancel: Ve
|
|
709
|
+
}, Fe, Ie));
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
//#endregion
|
|
714
|
+
//#region src/toast/content/ToastContent.tsx
|
|
715
|
+
function Ee(e) {
|
|
716
|
+
let i = Z(), a = e, o = e, [s, c] = R(null, { ownedWrite: !0 });
|
|
717
|
+
I(() => s(), (e) => {
|
|
718
|
+
if (i.recalculateHeight(), !e || typeof ResizeObserver != "function" || typeof MutationObserver != "function") return;
|
|
719
|
+
let t = new ResizeObserver(() => i.recalculateHeight(!0)), n = new MutationObserver(() => i.recalculateHeight(!0));
|
|
720
|
+
return t.observe(e), n.observe(e, {
|
|
721
|
+
childList: !0,
|
|
722
|
+
subtree: !0,
|
|
723
|
+
characterData: !0
|
|
724
|
+
}), () => {
|
|
725
|
+
t.disconnect(), n.disconnect();
|
|
726
|
+
};
|
|
727
|
+
});
|
|
728
|
+
let l = L(() => ({
|
|
729
|
+
expanded: i.expanded(),
|
|
730
|
+
behind: i.visibleIndex() > 0
|
|
731
|
+
})), u = L(() => n(e.class, l())), d = L(() => r(e.style, l())), f = L(() => t(l())), p = B(o, "as", "class", "ref", "style");
|
|
732
|
+
return O(D, j({
|
|
733
|
+
get component() {
|
|
734
|
+
return e.as ?? "div";
|
|
735
|
+
},
|
|
736
|
+
ref: [((e) => c(e)), a.ref],
|
|
737
|
+
get class() {
|
|
738
|
+
return u();
|
|
739
|
+
},
|
|
740
|
+
get style() {
|
|
741
|
+
return d();
|
|
742
|
+
}
|
|
743
|
+
}, f, p));
|
|
744
|
+
}
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region src/toast/utils/isRenderableNode.ts
|
|
747
|
+
function $(e) {
|
|
748
|
+
return e == null || typeof e == "boolean" || e === "" ? !1 : !Array.isArray(e) || e.some($);
|
|
749
|
+
}
|
|
750
|
+
//#endregion
|
|
751
|
+
//#region src/toast/utils/createToastLabelPart.ts
|
|
752
|
+
function De(e, t) {
|
|
753
|
+
let n = Z(), r = t === "title" ? n.setTitleId : n.setDescriptionId, i = `base-ui-${z()}`, a = L(() => e.id || i), o = P(() => e.children ?? (t === "title" ? n.toast().title : n.toast().description)), s = L(() => $(o()));
|
|
754
|
+
return I(() => s() ? a() : void 0, (e) => {
|
|
755
|
+
if (e !== void 0) return r(e), () => r((t) => t === e ? void 0 : t);
|
|
756
|
+
}), {
|
|
757
|
+
id: a,
|
|
758
|
+
content: o,
|
|
759
|
+
shouldRender: s,
|
|
760
|
+
type: () => n.toast().type
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
//#endregion
|
|
764
|
+
//#region src/toast/description/ToastDescription.tsx
|
|
765
|
+
function Oe(e) {
|
|
766
|
+
let i = e, a = e, o = De(e, "description"), s = L(() => ({ type: o.type() })), c = L(() => n(e.class, s())), l = L(() => r(e.style, s())), u = L(() => t(s())), d = B(a, "as", "children", "class", "id", "ref", "style");
|
|
767
|
+
return O(N, {
|
|
768
|
+
get when() {
|
|
769
|
+
return o.shouldRender();
|
|
770
|
+
},
|
|
771
|
+
get children() {
|
|
772
|
+
return O(D, j({
|
|
773
|
+
get component() {
|
|
774
|
+
return e.as ?? "p";
|
|
775
|
+
},
|
|
776
|
+
ref: [i.ref],
|
|
777
|
+
get id() {
|
|
778
|
+
return o.id();
|
|
779
|
+
},
|
|
780
|
+
get class() {
|
|
781
|
+
return c();
|
|
782
|
+
},
|
|
783
|
+
get style() {
|
|
784
|
+
return l();
|
|
785
|
+
}
|
|
786
|
+
}, u, d, { get children() {
|
|
787
|
+
return o.content();
|
|
788
|
+
} }));
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
//#endregion
|
|
793
|
+
//#region src/toast/title/ToastTitle.tsx
|
|
794
|
+
function ke(e) {
|
|
795
|
+
let i = e, a = e, o = De(e, "title"), s = L(() => ({ type: o.type() })), c = L(() => n(e.class, s())), l = L(() => r(e.style, s())), u = L(() => t(s())), d = B(a, "as", "children", "class", "id", "ref", "style");
|
|
796
|
+
return O(N, {
|
|
797
|
+
get when() {
|
|
798
|
+
return o.shouldRender();
|
|
799
|
+
},
|
|
800
|
+
get children() {
|
|
801
|
+
return O(D, j({
|
|
802
|
+
get component() {
|
|
803
|
+
return e.as ?? "h2";
|
|
804
|
+
},
|
|
805
|
+
ref: [i.ref],
|
|
806
|
+
get id() {
|
|
807
|
+
return o.id();
|
|
808
|
+
},
|
|
809
|
+
get class() {
|
|
810
|
+
return c();
|
|
811
|
+
},
|
|
812
|
+
get style() {
|
|
813
|
+
return l();
|
|
814
|
+
}
|
|
815
|
+
}, u, d, { get children() {
|
|
816
|
+
return o.content();
|
|
817
|
+
} }));
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
//#endregion
|
|
822
|
+
//#region src/toast/close/ToastClose.tsx
|
|
823
|
+
function Ae(e) {
|
|
824
|
+
let i = ue(), o = Z(), s = e, c = e, [l, u] = R(!1, { ownedWrite: !0 }), d = L(() => s.disabled ?? !1), f = L(() => s.nativeButton ?? !0), p = L(() => ({ type: o.toast().type })), m = L(() => n(e.class, p())), h = L(() => r(e.style, p())), g = L(() => t(p())), _ = B(c, "as", "class", "disabled", "nativeButton", "onBlur", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
|
|
825
|
+
function C() {
|
|
826
|
+
i.closeToast(o.toast().id);
|
|
827
|
+
}
|
|
828
|
+
let w = a(() => V(() => d() ? x : void 0), () => s.onClick, () => C), ee = a(() => s.onFocus, () => () => u(!0)), T = a(() => s.onBlur, () => () => u(!1)), E = a(() => V(() => d() ? x : void 0), () => s.onPointerDown), te = a(() => V(() => d() ? v : void 0), () => s.onMouseDown), ne = a(() => V(() => d() ? y : void 0), () => s.onKeyDown, () => V(() => f() ? void 0 : S)), k = a(() => V(() => d() ? v : void 0), () => s.onKeyUp, () => V(() => f() ? void 0 : b));
|
|
829
|
+
return O(D, j({
|
|
830
|
+
get component() {
|
|
831
|
+
return e.as ?? "button";
|
|
832
|
+
},
|
|
833
|
+
ref: [s.ref],
|
|
834
|
+
get type() {
|
|
835
|
+
return f() ? "button" : void 0;
|
|
836
|
+
},
|
|
837
|
+
get role() {
|
|
838
|
+
return f() ? void 0 : "button";
|
|
839
|
+
},
|
|
840
|
+
get tabIndex() {
|
|
841
|
+
return !f() && d() ? -1 : 0;
|
|
842
|
+
},
|
|
843
|
+
get disabled() {
|
|
844
|
+
return (A(() => !!f())() ? d() : f()) || void 0;
|
|
845
|
+
},
|
|
846
|
+
get "aria-disabled"() {
|
|
847
|
+
return !f() && d() ? "true" : void 0;
|
|
848
|
+
},
|
|
849
|
+
get "aria-hidden"() {
|
|
850
|
+
return !o.expanded() && !l() ? "true" : "false";
|
|
851
|
+
},
|
|
852
|
+
get class() {
|
|
853
|
+
return m();
|
|
854
|
+
},
|
|
855
|
+
get style() {
|
|
856
|
+
return h();
|
|
857
|
+
},
|
|
858
|
+
onBlur: T,
|
|
859
|
+
onClick: w,
|
|
860
|
+
onFocus: ee,
|
|
861
|
+
onKeyDown: ne,
|
|
862
|
+
onKeyUp: k,
|
|
863
|
+
onMouseDown: te,
|
|
864
|
+
onPointerDown: E
|
|
865
|
+
}, g, _));
|
|
866
|
+
}
|
|
867
|
+
//#endregion
|
|
868
|
+
//#region src/toast/action/ToastAction.tsx
|
|
869
|
+
function je(e) {
|
|
870
|
+
let i = Z(), o = e, s = e, c = () => i.toast().actionProps, l = P(() => c()?.children ?? e.children), u = L(() => $(l())), d = L(() => o.disabled ?? !1), f = L(() => o.nativeButton ?? !0), p = L(() => ({ type: i.toast().type })), m = L(() => n(e.class, p())), h = L(() => r(e.style, p())), g = L(() => t(p())), _ = B(s, "as", "children", "class", "disabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style"), C = L(() => {
|
|
871
|
+
let e = c();
|
|
872
|
+
if (e) return B(e, "children", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown");
|
|
873
|
+
}), w = a(() => V(() => d() ? x : void 0), () => o.onClick, () => c()?.onClick), ee = a(() => V(() => d() ? x : void 0), () => o.onPointerDown, () => c()?.onPointerDown), T = a(() => V(() => d() ? v : void 0), () => o.onMouseDown, () => c()?.onMouseDown), E = a(() => V(() => d() ? y : void 0), () => o.onKeyDown, () => c()?.onKeyDown, () => V(() => f() ? void 0 : S)), te = a(() => V(() => d() ? v : void 0), () => o.onKeyUp, () => c()?.onKeyUp, () => V(() => f() ? void 0 : b));
|
|
874
|
+
return O(N, {
|
|
875
|
+
get when() {
|
|
876
|
+
return u();
|
|
877
|
+
},
|
|
878
|
+
get children() {
|
|
879
|
+
return O(D, j({
|
|
880
|
+
get component() {
|
|
881
|
+
return e.as ?? "button";
|
|
882
|
+
},
|
|
883
|
+
ref: [o.ref],
|
|
884
|
+
get type() {
|
|
885
|
+
return f() ? "button" : void 0;
|
|
886
|
+
},
|
|
887
|
+
get role() {
|
|
888
|
+
return f() ? void 0 : "button";
|
|
889
|
+
},
|
|
890
|
+
get tabIndex() {
|
|
891
|
+
return !f() && d() ? -1 : 0;
|
|
892
|
+
},
|
|
893
|
+
get disabled() {
|
|
894
|
+
return (A(() => !!f())() ? d() : f()) || void 0;
|
|
895
|
+
},
|
|
896
|
+
get "aria-disabled"() {
|
|
897
|
+
return !f() && d() ? "true" : void 0;
|
|
898
|
+
},
|
|
899
|
+
get class() {
|
|
900
|
+
return m();
|
|
901
|
+
},
|
|
902
|
+
get style() {
|
|
903
|
+
return h();
|
|
904
|
+
},
|
|
905
|
+
onClick: w,
|
|
906
|
+
onKeyDown: E,
|
|
907
|
+
onKeyUp: te,
|
|
908
|
+
onMouseDown: T,
|
|
909
|
+
onPointerDown: ee
|
|
910
|
+
}, g, _, C, { get children() {
|
|
911
|
+
return l();
|
|
912
|
+
} }));
|
|
913
|
+
}
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
//#endregion
|
|
917
|
+
//#region src/toast/portal/ToastPortal.tsx
|
|
918
|
+
function Me(e) {
|
|
919
|
+
let t = e, i = e, a = {}, o = L(() => n(e.class, a)), s = L(() => r(e.style, a)), c = B(i, "as", "class", "container", "ref", "style");
|
|
920
|
+
return O(_, j({
|
|
921
|
+
get as() {
|
|
922
|
+
return e.as;
|
|
923
|
+
},
|
|
924
|
+
lite: !0,
|
|
925
|
+
get container() {
|
|
926
|
+
return t.container;
|
|
927
|
+
},
|
|
928
|
+
ref: (e) => {
|
|
929
|
+
t.ref && C(t.ref, e);
|
|
930
|
+
},
|
|
931
|
+
get class() {
|
|
932
|
+
return o();
|
|
933
|
+
},
|
|
934
|
+
get style() {
|
|
935
|
+
return s();
|
|
936
|
+
}
|
|
937
|
+
}, c, { get children() {
|
|
938
|
+
return e.children;
|
|
939
|
+
} }));
|
|
940
|
+
}
|
|
941
|
+
//#endregion
|
|
942
|
+
//#region src/toast/positioner/ToastPositionerContext.ts
|
|
943
|
+
var Ne = Symbol("ToastPositionerContext"), Pe = F(Ne);
|
|
944
|
+
function Fe() {
|
|
945
|
+
let e = H(Pe);
|
|
946
|
+
if (e === Ne) throw Error("Base UI: ToastPositionerContext is missing. ToastPositioner parts must be placed within <Toast.Positioner>.");
|
|
947
|
+
return e;
|
|
948
|
+
}
|
|
949
|
+
//#endregion
|
|
950
|
+
//#region src/toast/positioner/ToastPositioner.tsx
|
|
951
|
+
var Ie = {};
|
|
952
|
+
function Le(e) {
|
|
953
|
+
let i = ue(), a = w(), o = e, c = e, [l, u] = R(null, { ownedWrite: !0 }), d = () => o.toast, f = () => d().positionerProps ?? Ie, m = L(() => {
|
|
954
|
+
let e = o.anchor ?? f().anchor;
|
|
955
|
+
return s(e) ? e : null;
|
|
956
|
+
}), h = p({
|
|
957
|
+
reference: m,
|
|
958
|
+
floating: l,
|
|
959
|
+
mounted: () => !0,
|
|
960
|
+
direction: a,
|
|
961
|
+
positionMethod: () => o.positionMethod ?? f().positionMethod ?? "absolute",
|
|
962
|
+
side: () => o.side ?? f().side ?? "top",
|
|
963
|
+
sideOffset: () => o.sideOffset ?? f().sideOffset ?? 0,
|
|
964
|
+
align: () => o.align ?? f().align ?? "center",
|
|
965
|
+
alignOffset: () => o.alignOffset ?? f().alignOffset ?? 0,
|
|
966
|
+
collisionBoundary: () => o.collisionBoundary ?? f().collisionBoundary ?? "clipping-ancestors",
|
|
967
|
+
collisionPadding: () => o.collisionPadding ?? f().collisionPadding ?? 5,
|
|
968
|
+
arrowPadding: () => o.arrowPadding ?? f().arrowPadding ?? 5,
|
|
969
|
+
sticky: () => o.sticky ?? f().sticky ?? !1,
|
|
970
|
+
disableAnchorTracking: () => o.disableAnchorTracking ?? f().disableAnchorTracking ?? !1,
|
|
971
|
+
collisionAvoidance: () => o.collisionAvoidance ?? f().collisionAvoidance ?? { fallbackAxisSide: "end" }
|
|
972
|
+
}), _ = L(() => Y.toastIndex(i.track(), d().id)), v = L(() => Y.toastVisibleIndex(i.track(), d().id)), y = L(() => ({
|
|
973
|
+
side: h.renderedSide(),
|
|
974
|
+
align: h.renderedAlign(),
|
|
975
|
+
anchorHidden: h.anchorHidden()
|
|
976
|
+
})), b = L(() => n(e.class, y())), x = L(() => fe({
|
|
977
|
+
...h.styles(),
|
|
978
|
+
"--toast-index": String(d().transitionStatus === "ending" ? _() : v()),
|
|
979
|
+
...d().transitionStatus === "starting" ? { transition: "none" } : void 0
|
|
980
|
+
}, r(e.style, y()))), S = L(() => t(y(), g)), C = B(c, "align", "alignOffset", "anchor", "arrowPadding", "as", "class", "collisionAvoidance", "collisionBoundary", "collisionPadding", "disableAnchorTracking", "positionMethod", "ref", "side", "sideOffset", "sticky", "style", "toast");
|
|
981
|
+
return O(Pe, {
|
|
982
|
+
value: h,
|
|
983
|
+
get children() {
|
|
984
|
+
return O(D, j({
|
|
985
|
+
get component() {
|
|
986
|
+
return e.as ?? "div";
|
|
987
|
+
},
|
|
988
|
+
ref: [((e) => u(e)), o.ref],
|
|
989
|
+
role: "presentation",
|
|
990
|
+
get class() {
|
|
991
|
+
return b();
|
|
992
|
+
},
|
|
993
|
+
get style() {
|
|
994
|
+
return x();
|
|
995
|
+
}
|
|
996
|
+
}, S, C));
|
|
997
|
+
}
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
//#endregion
|
|
1001
|
+
//#region src/toast/arrow/ToastArrow.tsx
|
|
1002
|
+
function Re(e) {
|
|
1003
|
+
let i = Fe(), a = e, o = e, s = L(() => ({
|
|
1004
|
+
side: i.renderedSide(),
|
|
1005
|
+
align: i.renderedAlign(),
|
|
1006
|
+
uncentered: i.arrowUncentered()
|
|
1007
|
+
})), c = L(() => n(e.class, s())), l = L(() => fe(i.arrowStyles(), r(e.style, s()))), u = L(() => t(s())), d = B(o, "as", "class", "ref", "style"), f = null;
|
|
1008
|
+
return se(() => {
|
|
1009
|
+
f && i.setArrowElement(null);
|
|
1010
|
+
}), O(D, j({
|
|
1011
|
+
get component() {
|
|
1012
|
+
return e.as ?? "div";
|
|
1013
|
+
},
|
|
1014
|
+
ref: [((e) => {
|
|
1015
|
+
f = e, i.setArrowElement(e);
|
|
1016
|
+
}), a.ref],
|
|
1017
|
+
"aria-hidden": "true",
|
|
1018
|
+
get class() {
|
|
1019
|
+
return c();
|
|
1020
|
+
},
|
|
1021
|
+
get style() {
|
|
1022
|
+
return l();
|
|
1023
|
+
}
|
|
1024
|
+
}, u, d));
|
|
1025
|
+
}
|
|
1026
|
+
//#endregion
|
|
1027
|
+
//#region src/toast/index.parts.ts
|
|
1028
|
+
var ze = /* @__PURE__ */ e({
|
|
1029
|
+
Action: () => je,
|
|
1030
|
+
Arrow: () => Re,
|
|
1031
|
+
Close: () => Ae,
|
|
1032
|
+
Content: () => Ee,
|
|
1033
|
+
Description: () => Oe,
|
|
1034
|
+
Portal: () => Me,
|
|
1035
|
+
Positioner: () => Le,
|
|
1036
|
+
Provider: () => de,
|
|
1037
|
+
Root: () => Q,
|
|
1038
|
+
Title: () => ke,
|
|
1039
|
+
Viewport: () => ge
|
|
1040
|
+
});
|
|
1041
|
+
//#endregion
|
|
1042
|
+
//#region src/toast/useToastManager.ts
|
|
1043
|
+
function Be() {
|
|
1044
|
+
let e = ue();
|
|
1045
|
+
return {
|
|
1046
|
+
toasts: e.access(Y.toasts),
|
|
1047
|
+
add: e.addToast,
|
|
1048
|
+
close: e.closeToast,
|
|
1049
|
+
update: e.updateToast,
|
|
1050
|
+
promise: e.promiseToast
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
//#endregion
|
|
1054
|
+
//#region src/toast/createToastManager.ts
|
|
1055
|
+
function Ve() {
|
|
1056
|
+
let e = /* @__PURE__ */ new Set();
|
|
1057
|
+
function t(t) {
|
|
1058
|
+
e.forEach((e) => e(t));
|
|
1059
|
+
}
|
|
1060
|
+
return {
|
|
1061
|
+
" subscribe": function(t) {
|
|
1062
|
+
return e.add(t), () => {
|
|
1063
|
+
e.delete(t);
|
|
1064
|
+
};
|
|
1065
|
+
},
|
|
1066
|
+
add(e) {
|
|
1067
|
+
let n = e.id || G();
|
|
1068
|
+
return t({
|
|
1069
|
+
action: "add",
|
|
1070
|
+
options: {
|
|
1071
|
+
...e,
|
|
1072
|
+
id: n,
|
|
1073
|
+
transitionStatus: "starting"
|
|
1074
|
+
}
|
|
1075
|
+
}), n;
|
|
1076
|
+
},
|
|
1077
|
+
close(e) {
|
|
1078
|
+
t({
|
|
1079
|
+
action: "close",
|
|
1080
|
+
options: { id: e }
|
|
1081
|
+
});
|
|
1082
|
+
},
|
|
1083
|
+
update(e, n) {
|
|
1084
|
+
t({
|
|
1085
|
+
action: "update",
|
|
1086
|
+
options: {
|
|
1087
|
+
...n,
|
|
1088
|
+
id: e
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
},
|
|
1092
|
+
promise(e, n) {
|
|
1093
|
+
let r = e;
|
|
1094
|
+
return t({
|
|
1095
|
+
action: "promise",
|
|
1096
|
+
options: {
|
|
1097
|
+
...n,
|
|
1098
|
+
promise: e,
|
|
1099
|
+
setPromise(e) {
|
|
1100
|
+
r = e;
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}), r;
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
//#endregion
|
|
1108
|
+
export { Be as n, ze as r, Ve as t };
|