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,1035 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
|
|
3
|
+
import { F as n, O as r, _ as i, b as a, f as o, g as s, h as c, m as l, o as u, w as d } from "./reasons-Co5CzjKq.js";
|
|
4
|
+
import { n as f, t as p } from "./resolveStyle-XcgAuaKR.js";
|
|
5
|
+
import { createChangeEventDetails as m, createGenericEventDetails as h } from "./internals/createBaseUIEventDetails.js";
|
|
6
|
+
import { composeEventHandlers as g } from "./internals/composeEventHandlers.js";
|
|
7
|
+
import { fieldValidityMapping as _ } from "./internals/field-constants.js";
|
|
8
|
+
import { n as v } from "./FieldRootContext-izCEh80D.js";
|
|
9
|
+
import { n as y } from "./FormContext-BB05lWOI.js";
|
|
10
|
+
import { r as b } from "./LabelableContext-DKsB0fIx.js";
|
|
11
|
+
import { mergeStyles as x } from "./internals/mergeStyles.js";
|
|
12
|
+
import { Dynamic as S, Portal as C, createComponent as w, delegateEvents as T, effect as E, getNextElement as D, memo as O, mergeProps as k, ref as ee, runHydrationEvents as A, setAttribute as j, style as M, template as N } from "@solidjs/web";
|
|
13
|
+
import { Show as P, createContext as F, createEffect as I, createMemo as L, createSignal as R, createUniqueId as z, flush as te, omit as B, onCleanup as V, onSettled as H, untrack as U, useContext as W } from "solid-js";
|
|
14
|
+
//#region src/number-field/utils/parse.ts
|
|
15
|
+
var G = "零〇一二三四五六七八九", ne = /[٠-٩۰-۹0-9]/g, K = /[零〇一二三四五六七八九]/g, re = [
|
|
16
|
+
"%",
|
|
17
|
+
"٪",
|
|
18
|
+
"%",
|
|
19
|
+
"﹪"
|
|
20
|
+
], ie = ["‰", "؉"], ae = /[%٪%﹪]/, q = /[‰؉]/, oe = /[%٪%﹪]/g, se = /[‰؉]/g, ce = /[٠-٩۰-۹]/, J = /[零〇一二三四五六七八九]/, le = /[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;
|
|
21
|
+
function ue(e) {
|
|
22
|
+
return le.test(e);
|
|
23
|
+
}
|
|
24
|
+
var de = [
|
|
25
|
+
".",
|
|
26
|
+
",",
|
|
27
|
+
".",
|
|
28
|
+
",",
|
|
29
|
+
"٫",
|
|
30
|
+
"٬"
|
|
31
|
+
], fe = /\p{Zs}/u, pe = /\p{Cf}/u, me = /\p{Cf}/gu, he = [
|
|
32
|
+
"+",
|
|
33
|
+
"+",
|
|
34
|
+
"﹢"
|
|
35
|
+
], ge = [
|
|
36
|
+
"-",
|
|
37
|
+
"−",
|
|
38
|
+
"-",
|
|
39
|
+
"‒",
|
|
40
|
+
"–",
|
|
41
|
+
"—",
|
|
42
|
+
"﹣"
|
|
43
|
+
], Y = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
44
|
+
function X(e, t) {
|
|
45
|
+
return new Intl.NumberFormat(e, t);
|
|
46
|
+
}
|
|
47
|
+
function _e(e, t) {
|
|
48
|
+
let [n, r = "0"] = String(e).split("e");
|
|
49
|
+
return Number(`${n}e${Number(r) + t}`);
|
|
50
|
+
}
|
|
51
|
+
var ve = /[-−-‒–—﹣]/gu, Z = /[++﹢]/gu, ye = /[-−-‒–—﹣]/, be = /[++﹢]/, xe = 11111.1;
|
|
52
|
+
function Se(e, t) {
|
|
53
|
+
return X(e, t).formatToParts(xe);
|
|
54
|
+
}
|
|
55
|
+
function Ce(e, t) {
|
|
56
|
+
let n = Se(e, t), r = {};
|
|
57
|
+
n.forEach((e) => {
|
|
58
|
+
r[e.type] = e.value;
|
|
59
|
+
});
|
|
60
|
+
let i = ".";
|
|
61
|
+
return X(e).formatToParts(.1).forEach((e) => {
|
|
62
|
+
e.type === "decimal" && (i = e.value);
|
|
63
|
+
}), {
|
|
64
|
+
...r,
|
|
65
|
+
decimal: i
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function Q(e, t, n) {
|
|
69
|
+
let r = e.replace(me, "").trim();
|
|
70
|
+
r = r.replace(ve, "-").replace(Z, "+");
|
|
71
|
+
let i = !1, a = (e, t) => (t === "-" && (i = !0), "");
|
|
72
|
+
r = r.replace(/([+-])\s*$/, a).replace(/^\s*([+-])/, a);
|
|
73
|
+
let o = t;
|
|
74
|
+
o === void 0 && (ce.test(r) ? o = "ar" : J.test(r) && (o = "zh"));
|
|
75
|
+
let { group: s, decimal: c, currency: l, exponentSeparator: u } = Ce(o, n), d = X(o, n).formatToParts(1).filter((e) => e.type === "unit").map((e) => Y(e.value)), f = d.length ? new RegExp(d.join("|"), "g") : null, p = null;
|
|
76
|
+
s && (p = /\p{Zs}/u.test(s) ? /\p{Zs}/gu : s === "'" || s === "’" ? /['’]/g : new RegExp(Y(s), "g"));
|
|
77
|
+
let m = [
|
|
78
|
+
[p, ""],
|
|
79
|
+
[new RegExp(Y(c), "g"), "."],
|
|
80
|
+
[/[.٫]/g, "."],
|
|
81
|
+
[/[,٬]/g, ""],
|
|
82
|
+
[l ? new RegExp(Y(l), "g") : null, ""],
|
|
83
|
+
[f, ""],
|
|
84
|
+
[oe, ""],
|
|
85
|
+
[se, ""],
|
|
86
|
+
[u ? new RegExp(Y(u), "g") : null, "e"],
|
|
87
|
+
[ne, (e) => String(e.charCodeAt(0) % 16)],
|
|
88
|
+
[K, (e) => String(Math.max(G.indexOf(e) - 1, 0))]
|
|
89
|
+
].reduce((e, [t, n]) => t ? e.replace(t, n) : e, r), h = m.lastIndexOf(".");
|
|
90
|
+
if (h !== -1 && (m = `${m.slice(0, h).replace(/\./g, "")}.${m.slice(h + 1).replace(/\./g, "")}`), /^[-+]?Infinity$/i.test(r) || r.includes("∞")) return null;
|
|
91
|
+
let g = (i ? "-" : "") + m, _ = parseFloat(g), v = n?.style, y = v === "unit" && n?.unit === "percent", b = ae.test(e) || v === "percent";
|
|
92
|
+
return q.test(e) ? _ = _e(_, -3) : !y && b && (_ = _e(_, -2)), Number.isFinite(_) ? _ : null;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/number-field/utils/format.ts
|
|
96
|
+
var we = /* @__PURE__ */ new Map();
|
|
97
|
+
function Te(e) {
|
|
98
|
+
if (e !== void 0) return Array.isArray(e) ? e.map((e) => e.toString()).join(",") : e.toString();
|
|
99
|
+
}
|
|
100
|
+
function Ee(e, t) {
|
|
101
|
+
let n = JSON.stringify({
|
|
102
|
+
locale: Te(e),
|
|
103
|
+
options: t
|
|
104
|
+
}), r = we.get(n);
|
|
105
|
+
return r || (r = new Intl.NumberFormat(e, t), we.set(n, r)), r;
|
|
106
|
+
}
|
|
107
|
+
function De(e, t, n) {
|
|
108
|
+
return e === null ? "" : Ee(t, n).format(e);
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/number-field/utils/platform.ts
|
|
112
|
+
function Oe() {
|
|
113
|
+
return typeof navigator > "u" ? "" : navigator.platform.toLowerCase();
|
|
114
|
+
}
|
|
115
|
+
function ke() {
|
|
116
|
+
return typeof navigator > "u" ? "" : navigator.userAgent.toLowerCase();
|
|
117
|
+
}
|
|
118
|
+
function Ae() {
|
|
119
|
+
let e = Oe(), t = typeof navigator > "u" ? 0 : navigator.maxTouchPoints;
|
|
120
|
+
return /^i(os$|p)/.test(e) || e === "macintel" && t > 1;
|
|
121
|
+
}
|
|
122
|
+
function je() {
|
|
123
|
+
return typeof CSS < "u" && !!CSS.supports?.("-webkit-backdrop-filter:none");
|
|
124
|
+
}
|
|
125
|
+
function Me() {
|
|
126
|
+
return !je() && ke().includes("firefox");
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/number-field/utils/stateAttributesMapping.ts
|
|
130
|
+
var $ = {
|
|
131
|
+
inputValue: () => null,
|
|
132
|
+
value: () => null,
|
|
133
|
+
..._
|
|
134
|
+
}, Ne = 1e-10, Pe = 1e-10;
|
|
135
|
+
function Fe(e) {
|
|
136
|
+
return e?.maximumFractionDigits != null || e?.minimumFractionDigits != null || e?.maximumSignificantDigits != null || e?.minimumSignificantDigits != null || e?.roundingIncrement != null || e?.roundingMode != null || e?.roundingPriority != null;
|
|
137
|
+
}
|
|
138
|
+
function Ie(e, t) {
|
|
139
|
+
if (!Number.isFinite(e)) return e;
|
|
140
|
+
if (!Fe(t)) {
|
|
141
|
+
let t = parseFloat(e.toPrecision(15));
|
|
142
|
+
return Math.abs(t - e) <= Math.min(2 ** -52 * Math.max(1, Math.abs(e)), Pe) ? t : e;
|
|
143
|
+
}
|
|
144
|
+
let n = new Intl.NumberFormat("en-US", {
|
|
145
|
+
...t,
|
|
146
|
+
signDisplay: "auto",
|
|
147
|
+
currencySign: "standard",
|
|
148
|
+
notation: t.notation === "compact" ? "standard" : t.notation,
|
|
149
|
+
useGrouping: !1
|
|
150
|
+
}), r = n.format(e), i = Q(r, "en-US", t);
|
|
151
|
+
return i === null ? e : n.format(i) === r ? i : e;
|
|
152
|
+
}
|
|
153
|
+
function Le(e, t, n, r) {
|
|
154
|
+
let i = Math.abs(n), a = Math.sign(n), o = i * Ne * a, s = e - t + o;
|
|
155
|
+
return r ? t + Math.round(s / n) * n : t + (a > 0 ? Math.floor(s / i) : Math.ceil(s / i)) * i;
|
|
156
|
+
}
|
|
157
|
+
function Re(e, t, n) {
|
|
158
|
+
return Math.max(t, Math.min(e, n));
|
|
159
|
+
}
|
|
160
|
+
function ze(e, t, n, r, i, a, o, s, c) {
|
|
161
|
+
if (e === null) return e;
|
|
162
|
+
let l = e;
|
|
163
|
+
if (t != null && o && t !== 0 && (l = Le(l, s || n === -(2 ** 53 - 1) ? i : n, t, s)), c && (l = Re(l, n, r)), t == null && !Fe(a)) return l;
|
|
164
|
+
let u = Ie(l, a);
|
|
165
|
+
return c ? Re(u, n, r) : u;
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/number-field/root/NumberFieldRootContext.ts
|
|
169
|
+
var Be = Symbol("NumberFieldRootContext"), Ve = F(Be);
|
|
170
|
+
function He() {
|
|
171
|
+
let e = W(Ve);
|
|
172
|
+
if (e === Be) throw Error("Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.");
|
|
173
|
+
return e;
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/number-field/root/NumberFieldRoot.tsx
|
|
177
|
+
var Ue = /* @__PURE__ */ N("<input type=number aria-hidden=true tabindex=-1>"), We = {
|
|
178
|
+
"clip-path": "inset(50%)",
|
|
179
|
+
overflow: "hidden",
|
|
180
|
+
"white-space": "nowrap",
|
|
181
|
+
border: "0",
|
|
182
|
+
padding: "0",
|
|
183
|
+
width: "1px",
|
|
184
|
+
height: "1px",
|
|
185
|
+
margin: "-1px",
|
|
186
|
+
position: "fixed",
|
|
187
|
+
top: "0",
|
|
188
|
+
left: "0"
|
|
189
|
+
}, Ge = {
|
|
190
|
+
...We,
|
|
191
|
+
position: "absolute"
|
|
192
|
+
};
|
|
193
|
+
function Ke(e) {
|
|
194
|
+
let r = v(!0), i = y(), a = b(), o = e, s = e, c = Symbol("NumberField"), l = U(a.controlId), u = typeof l == "string" ? l : `base-ui-${z()}`, g = U(() => o.value !== void 0), [_, x] = R(() => U(() => o.defaultValue ?? null)), [C, T] = R(), [O, N] = R(), [P, F] = R(!1), [te, V] = R("numeric"), H = !0, W = null, G = !1, ne = B(s, "allowOutOfRange", "allowWheelScrub", "as", "class", "defaultValue", "disabled", "form", "format", "id", "inputRef", "largeStep", "locale", "max", "min", "name", "onChange", "onValueChange", "onValueCommitted", "readOnly", "ref", "required", "smallStep", "snapOnStep", "step", "style", "value"), K = L(() => g ? o.value ?? null : _()), ae = L(() => o.id ?? u), q = L(() => o.min), oe = L(() => o.max), se = L(() => q() ?? -(2 ** 53 - 1)), ce = L(() => oe() ?? 2 ** 53 - 1), J = L(() => r.disabled() || (o.disabled ?? !1)), le = L(() => o.readOnly ?? !1), ue = L(() => o.required ?? !1), pe = L(() => o.name), me = L(() => r.name() ?? pe()), Y = L(() => o.locale), X = L(() => o.format), [_e, ve] = R(() => De(U(K), U(Y), U(X))), Z = L(() => ({
|
|
195
|
+
...r.state(),
|
|
196
|
+
disabled: J(),
|
|
197
|
+
readOnly: le(),
|
|
198
|
+
required: ue(),
|
|
199
|
+
value: K(),
|
|
200
|
+
inputValue: _e(),
|
|
201
|
+
scrubbing: P()
|
|
202
|
+
})), ye = L(() => f(e.class, Z())), be = L(() => p(e.style, Z())), xe = L(() => t(Z(), $));
|
|
203
|
+
function Q(e) {
|
|
204
|
+
ve(e);
|
|
205
|
+
}
|
|
206
|
+
function we() {
|
|
207
|
+
let e = X(), t = Se(Y(), e), n = new Set(de), r = (e) => {
|
|
208
|
+
for (let t of e) n.add(t);
|
|
209
|
+
}, i = t.find((e) => e.type === "decimal")?.value ?? Ce(Y(), e).decimal;
|
|
210
|
+
n.add(i);
|
|
211
|
+
for (let e of t) e.type !== "integer" && e.type !== "fraction" && e.type !== "exponentInteger" && e.type !== "compact" && (r(Array.from(e.value)), fe.test(e.value) && n.add(" "));
|
|
212
|
+
let a = e?.style;
|
|
213
|
+
return (a === "percent" || a === "unit" && e?.unit === "percent") && r(re), (a === "percent" || a === "unit" && e?.unit === "permille") && r(ie), r(he), (se() < 0 || (o.allowOutOfRange ?? !1)) && r(ge), n;
|
|
214
|
+
}
|
|
215
|
+
function Te(e) {
|
|
216
|
+
if (e?.altKey) return o.smallStep ?? .1;
|
|
217
|
+
if (e?.shiftKey) return o.largeStep ?? 10;
|
|
218
|
+
let t = o.step ?? 1;
|
|
219
|
+
return t === "any" ? 1 : t;
|
|
220
|
+
}
|
|
221
|
+
function Ee(e, t) {
|
|
222
|
+
let n = t.direction, i = t.event, a = t.reason.startsWith("input-") || t.reason === "none", s = ze(e, n ? Te(i) * n : void 0, se(), ce(), q() ?? 0, X(), o.snapOnStep ?? !1, i.altKey ?? !1, !(o.allowOutOfRange && a)), c = s !== K() || a && (e !== K() || !H);
|
|
223
|
+
if (c) {
|
|
224
|
+
if (o.onValueChange?.(s, t), t.isCanceled) return !1;
|
|
225
|
+
g || x(s), r.setDirty(s !== r.validityData().initialValue), G = !0;
|
|
226
|
+
}
|
|
227
|
+
return W = s, H && Q(De(s, Y(), X())), c;
|
|
228
|
+
}
|
|
229
|
+
function Oe(e, { direction: t, currentValue: n, event: r, reason: i }) {
|
|
230
|
+
let a = n ?? K(), o = r;
|
|
231
|
+
return typeof a == "number" ? Ee(a + e * t, m(i, o, void 0, { direction: t })) : Ee(0, m(i, o));
|
|
232
|
+
}
|
|
233
|
+
function ke(e, t) {
|
|
234
|
+
G = !1, o.onValueCommitted?.(e, t);
|
|
235
|
+
}
|
|
236
|
+
function je(e) {
|
|
237
|
+
let t = C();
|
|
238
|
+
e.ctrlKey || !t || t.ownerDocument.activeElement !== t || (e.preventDefault(), H = !0, Oe(Te(e), {
|
|
239
|
+
direction: e.deltaY > 0 ? -1 : 1,
|
|
240
|
+
event: e,
|
|
241
|
+
reason: "wheel"
|
|
242
|
+
}) && ke(W, h(n, e)));
|
|
243
|
+
}
|
|
244
|
+
function Me(e) {
|
|
245
|
+
if (e.defaultPrevented || J() || le()) return;
|
|
246
|
+
let t = e.currentTarget.valueAsNumber, n = Number.isNaN(t) ? null : t;
|
|
247
|
+
Ee(n, m(d, e)), i.clearError(me()), r.validation.change(W ?? n);
|
|
248
|
+
}
|
|
249
|
+
return I(() => K(), (e) => {
|
|
250
|
+
r.setFilled(e !== null);
|
|
251
|
+
}), I(() => ({
|
|
252
|
+
currentValue: _e(),
|
|
253
|
+
formattedValue: De(K(), Y(), X())
|
|
254
|
+
}), (e) => {
|
|
255
|
+
H && e.formattedValue !== e.currentValue && Q(e.formattedValue);
|
|
256
|
+
}), I(() => se(), (e) => {
|
|
257
|
+
Ae() && V(e >= 0 ? "decimal" : "text");
|
|
258
|
+
}), I(() => ({
|
|
259
|
+
allowWheelScrub: o.allowWheelScrub ?? !1,
|
|
260
|
+
disabled: J(),
|
|
261
|
+
input: C(),
|
|
262
|
+
readOnly: le()
|
|
263
|
+
}), (e) => {
|
|
264
|
+
if (!e.allowWheelScrub || e.disabled || e.readOnly || !e.input) return;
|
|
265
|
+
let t = e.input;
|
|
266
|
+
return t.addEventListener("wheel", je, { passive: !1 }), () => t.removeEventListener("wheel", je);
|
|
267
|
+
}), I(() => ({
|
|
268
|
+
disabled: J(),
|
|
269
|
+
hidden: O()
|
|
270
|
+
}), (e) => {
|
|
271
|
+
if (!(!e.hidden || e.disabled)) return r.validation.registerInput(c, e.hidden, () => U(() => C() ?? null));
|
|
272
|
+
}), w(Ve, {
|
|
273
|
+
value: {
|
|
274
|
+
controlSource: c,
|
|
275
|
+
minWithDefault: se,
|
|
276
|
+
maxWithDefault: ce,
|
|
277
|
+
id: ae,
|
|
278
|
+
setValue: Ee,
|
|
279
|
+
getStepAmount: Te,
|
|
280
|
+
incrementValue: Oe,
|
|
281
|
+
inputElement: C,
|
|
282
|
+
setInputElement: (e) => T(e),
|
|
283
|
+
allowInputSync: () => H,
|
|
284
|
+
setAllowInputSync: (e) => {
|
|
285
|
+
H = e;
|
|
286
|
+
},
|
|
287
|
+
formatOptions: X,
|
|
288
|
+
value: K,
|
|
289
|
+
lastChangedValue: () => W,
|
|
290
|
+
setLastChangedValue: (e) => {
|
|
291
|
+
W = e;
|
|
292
|
+
},
|
|
293
|
+
hasPendingCommit: () => G,
|
|
294
|
+
setHasPendingCommit: (e) => {
|
|
295
|
+
G = e;
|
|
296
|
+
},
|
|
297
|
+
name: me,
|
|
298
|
+
nameProp: pe,
|
|
299
|
+
inputMode: te,
|
|
300
|
+
getAllowedNonNumericKeys: we,
|
|
301
|
+
min: q,
|
|
302
|
+
max: oe,
|
|
303
|
+
inputValue: _e,
|
|
304
|
+
setInputValue: Q,
|
|
305
|
+
locale: Y,
|
|
306
|
+
setIsScrubbing: (e) => F(e),
|
|
307
|
+
state: Z,
|
|
308
|
+
onValueCommitted: ke
|
|
309
|
+
},
|
|
310
|
+
get children() {
|
|
311
|
+
return [w(S, k({
|
|
312
|
+
get component() {
|
|
313
|
+
return e.as ?? "div";
|
|
314
|
+
},
|
|
315
|
+
ref: [o.ref],
|
|
316
|
+
get class() {
|
|
317
|
+
return ye();
|
|
318
|
+
},
|
|
319
|
+
get style() {
|
|
320
|
+
return be();
|
|
321
|
+
}
|
|
322
|
+
}, xe, ne)), (() => {
|
|
323
|
+
var e = D(Ue);
|
|
324
|
+
return e.$$input = Me, e.addEventListener("focus", () => C()?.focus()), ee(() => [((e) => N(e)), o.inputRef], e), E(() => ({
|
|
325
|
+
e: o.form,
|
|
326
|
+
t: me(),
|
|
327
|
+
a: K() ?? "",
|
|
328
|
+
o: q(),
|
|
329
|
+
i: oe(),
|
|
330
|
+
n: o.step ?? 1,
|
|
331
|
+
s: J(),
|
|
332
|
+
h: le(),
|
|
333
|
+
r: ue(),
|
|
334
|
+
d: me() ? Ge : We
|
|
335
|
+
}), ({ e: t, t: n, a: r, o: i, i: a, n: o, s, h: c, r: l, d: u }, d) => {
|
|
336
|
+
t !== d?.e && j(e, "form", t), n !== d?.t && j(e, "name", n), e.value = r ?? "", i !== d?.o && j(e, "min", i), a !== d?.i && j(e, "max", a), o !== d?.n && j(e, "step", o), s !== d?.s && j(e, "disabled", s), c !== d?.h && j(e, "readonly", c), l !== d?.r && j(e, "required", l), M(e, u, d?.d);
|
|
337
|
+
}), A(), e;
|
|
338
|
+
})()];
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
T(["input"]);
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region src/number-field/group/NumberFieldGroup.tsx
|
|
345
|
+
function qe(e) {
|
|
346
|
+
let n = He(), r = B(e, "as", "class", "style"), i = n.state, a = L(() => f(e.class, i())), o = L(() => p(e.style, i())), s = L(() => t(i(), $));
|
|
347
|
+
return w(S, k({
|
|
348
|
+
get component() {
|
|
349
|
+
return e.as ?? "div";
|
|
350
|
+
},
|
|
351
|
+
get class() {
|
|
352
|
+
return a();
|
|
353
|
+
},
|
|
354
|
+
get style() {
|
|
355
|
+
return o();
|
|
356
|
+
},
|
|
357
|
+
role: "group"
|
|
358
|
+
}, s, r));
|
|
359
|
+
}
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region src/number-field/root/createPressAndHold.ts
|
|
362
|
+
var Je = 60, Ye = 400, Xe = 8, Ze = 50, Qe = 3;
|
|
363
|
+
function $e(e) {
|
|
364
|
+
return e === "touch" || e === "pen";
|
|
365
|
+
}
|
|
366
|
+
function et(e) {
|
|
367
|
+
let t = !1, n = 0, r = 0, i = 0, a = !1, o = !1, s = "", c, l, u, d, f, p, m = () => void 0, h = () => void 0;
|
|
368
|
+
function g() {
|
|
369
|
+
f !== void 0 && (p?.clearTimeout(f), f = void 0, p = void 0), c !== void 0 && (l?.clearTimeout(c), c = void 0, l = void 0), u !== void 0 && (d?.clearInterval(u), u = void 0, d = void 0), m(), m = () => void 0, n = 0;
|
|
370
|
+
}
|
|
371
|
+
function _(n) {
|
|
372
|
+
g();
|
|
373
|
+
let r = e.element(), i = r?.ownerDocument.defaultView;
|
|
374
|
+
if (!r || !i) return;
|
|
375
|
+
function a(e) {
|
|
376
|
+
e.preventDefault();
|
|
377
|
+
}
|
|
378
|
+
i.addEventListener("contextmenu", a), m = () => {
|
|
379
|
+
i.removeEventListener("contextmenu", a);
|
|
380
|
+
}, h();
|
|
381
|
+
let o = { once: !0 };
|
|
382
|
+
function s(n) {
|
|
383
|
+
t = !1, g(), e.onStop()?.(n);
|
|
384
|
+
}
|
|
385
|
+
if (i.addEventListener("pointerup", s, o), h = () => {
|
|
386
|
+
i.removeEventListener("pointerup", s, o);
|
|
387
|
+
}, !e.tick()(n)) {
|
|
388
|
+
g();
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
l = i, c = i.setTimeout(() => {
|
|
392
|
+
c = void 0, l = void 0, d = i, u = i.setInterval(() => {
|
|
393
|
+
e.tick()(n) || g();
|
|
394
|
+
}, Je);
|
|
395
|
+
}, Ye);
|
|
396
|
+
}
|
|
397
|
+
let v = {
|
|
398
|
+
onTouchStart() {
|
|
399
|
+
a = !0;
|
|
400
|
+
},
|
|
401
|
+
onTouchEnd() {
|
|
402
|
+
a = !1;
|
|
403
|
+
},
|
|
404
|
+
onPointerDown(a) {
|
|
405
|
+
if (a.defaultPrevented || a.button || e.disabled()) return;
|
|
406
|
+
if (s = a.pointerType, o = !1, t = !0, r = a.clientX, i = a.clientY, !$e(a.pointerType)) {
|
|
407
|
+
a.preventDefault(), _(a);
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
let c = a.currentTarget?.ownerDocument.defaultView ?? e.element()?.ownerDocument.defaultView;
|
|
411
|
+
c && (f !== void 0 && p?.clearTimeout(f), p = c, f = c.setTimeout(() => {
|
|
412
|
+
f = void 0, p = void 0;
|
|
413
|
+
let e = n;
|
|
414
|
+
n = 0, t && e < Qe ? (_(a), o = !0) : (o = !1, g());
|
|
415
|
+
}, Ze));
|
|
416
|
+
},
|
|
417
|
+
onPointerUp(e) {
|
|
418
|
+
$e(e.pointerType) && (t = !1);
|
|
419
|
+
},
|
|
420
|
+
onPointerMove(a) {
|
|
421
|
+
if (e.disabled() || !$e(a.pointerType) || !t) return;
|
|
422
|
+
n += 1;
|
|
423
|
+
let o = r - a.clientX, s = i - a.clientY;
|
|
424
|
+
o ** 2 + s ** 2 > Xe ** 2 && g();
|
|
425
|
+
},
|
|
426
|
+
onMouseEnter(n) {
|
|
427
|
+
n.defaultPrevented || e.disabled() || !t || a || $e(s) || _(n);
|
|
428
|
+
},
|
|
429
|
+
onMouseLeave() {
|
|
430
|
+
a || g();
|
|
431
|
+
},
|
|
432
|
+
onMouseUp() {
|
|
433
|
+
a || g();
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
function y(e) {
|
|
437
|
+
return e.defaultPrevented ? !0 : $e(s) ? o : e.detail !== 0;
|
|
438
|
+
}
|
|
439
|
+
return V(() => {
|
|
440
|
+
g(), h();
|
|
441
|
+
}), {
|
|
442
|
+
pointerHandlers: v,
|
|
443
|
+
shouldSkipClick: y
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region src/number-field/increment/NumberFieldStepperButton.tsx
|
|
448
|
+
var tt = {
|
|
449
|
+
"-webkit-user-select": "none",
|
|
450
|
+
"user-select": "none"
|
|
451
|
+
};
|
|
452
|
+
function nt(e, n) {
|
|
453
|
+
let r = He(), i = e, a = e, s = null, c = !1, l = B(a, "as", "class", "disabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "onPointerDown", "onPointerMove", "onPointerUp", "onTouchEnd", "onTouchStart", "ref", "style"), d = r.state, _ = L(() => i.nativeButton ?? !0), v = L(() => {
|
|
454
|
+
let e = d(), t = e.value !== null && (n ? e.value >= r.maxWithDefault() : e.value <= r.minWithDefault());
|
|
455
|
+
return (i.disabled ?? !1) || e.disabled || t;
|
|
456
|
+
}), y = L(() => v() || d().readOnly), b = L(() => ({
|
|
457
|
+
...d(),
|
|
458
|
+
disabled: v()
|
|
459
|
+
})), C = L(() => f(e.class, b())), T = L(() => {
|
|
460
|
+
let t = p(e.style, b());
|
|
461
|
+
return typeof t == "string" ? `-webkit-user-select:none;user-select:none;${t}` : x(tt, t === !1 ? void 0 : t) ?? tt;
|
|
462
|
+
}), E = L(() => t(b(), $)), D = n ? o : u;
|
|
463
|
+
function ee(e) {
|
|
464
|
+
let t = !r.allowInputSync();
|
|
465
|
+
if (r.setAllowInputSync(!0), !t) {
|
|
466
|
+
let e = r.value();
|
|
467
|
+
return r.setLastChangedValue(e), e;
|
|
468
|
+
}
|
|
469
|
+
let n = Q(r.inputValue(), r.locale(), r.formatOptions());
|
|
470
|
+
if (n !== null) {
|
|
471
|
+
let t = m(D, e);
|
|
472
|
+
if (r.setValue(n, t), !t.isCanceled) return n;
|
|
473
|
+
}
|
|
474
|
+
return r.value();
|
|
475
|
+
}
|
|
476
|
+
function A(e) {
|
|
477
|
+
let t = c ? s : void 0;
|
|
478
|
+
return c = !1, r.incrementValue(r.getStepAmount(e), {
|
|
479
|
+
direction: n ? 1 : -1,
|
|
480
|
+
currentValue: t,
|
|
481
|
+
event: e,
|
|
482
|
+
reason: D
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
function j(e) {
|
|
486
|
+
let t = r.lastChangedValue() ?? r.value();
|
|
487
|
+
r.onValueCommitted(t, h(D, e));
|
|
488
|
+
}
|
|
489
|
+
let M = et({
|
|
490
|
+
disabled: y,
|
|
491
|
+
element: r.inputElement,
|
|
492
|
+
tick: () => A,
|
|
493
|
+
onStop: () => j
|
|
494
|
+
});
|
|
495
|
+
function N(e) {
|
|
496
|
+
if (e.defaultPrevented || y() || M.shouldSkipClick(e)) return;
|
|
497
|
+
let t = ee(e);
|
|
498
|
+
r.incrementValue(r.getStepAmount(e), {
|
|
499
|
+
direction: n ? 1 : -1,
|
|
500
|
+
currentValue: t,
|
|
501
|
+
event: e,
|
|
502
|
+
reason: D
|
|
503
|
+
});
|
|
504
|
+
let i = r.lastChangedValue() ?? r.value();
|
|
505
|
+
i !== t && r.onValueCommitted(i, h(D, e));
|
|
506
|
+
}
|
|
507
|
+
function P(e) {
|
|
508
|
+
e.defaultPrevented || d().readOnly || e.button || v() || (s = ee(e), c = !0, r.setLastChangedValue(null), $e(e.pointerType) || r.inputElement()?.focus(), M.pointerHandlers.onPointerDown(e));
|
|
509
|
+
}
|
|
510
|
+
let F = g(() => U(y) ? rt : void 0, () => i.onClick, () => N), I = g(() => U(y) ? rt : void 0, () => i.onPointerDown, () => P), R = g(() => U(y) ? it : void 0, () => i.onMouseDown), z = g(() => U(y) ? at : void 0, () => i.onKeyDown, () => U(_) ? void 0 : ot), te = g(() => U(y) ? it : void 0, () => i.onKeyUp, () => U(_) ? void 0 : st), V = g(() => i.onPointerUp, () => M.pointerHandlers.onPointerUp), W = g(() => i.onPointerMove, () => M.pointerHandlers.onPointerMove), G = g(() => i.onTouchStart, () => M.pointerHandlers.onTouchStart), ne = g(() => i.onTouchEnd, () => M.pointerHandlers.onTouchEnd), K = g(() => i.onMouseEnter, () => M.pointerHandlers.onMouseEnter), re = g(() => i.onMouseLeave, () => M.pointerHandlers.onMouseLeave), ie = g(() => i.onMouseUp, () => M.pointerHandlers.onMouseUp);
|
|
511
|
+
return H(() => {}), w(S, k({
|
|
512
|
+
get component() {
|
|
513
|
+
return e.as ?? "button";
|
|
514
|
+
},
|
|
515
|
+
ref: [((e) => e), i.ref],
|
|
516
|
+
get class() {
|
|
517
|
+
return C();
|
|
518
|
+
},
|
|
519
|
+
get style() {
|
|
520
|
+
return T();
|
|
521
|
+
},
|
|
522
|
+
get type() {
|
|
523
|
+
return _() ? "button" : void 0;
|
|
524
|
+
},
|
|
525
|
+
get role() {
|
|
526
|
+
return _() ? void 0 : "button";
|
|
527
|
+
},
|
|
528
|
+
tabIndex: -1,
|
|
529
|
+
get disabled() {
|
|
530
|
+
return _() && v() ? !0 : void 0;
|
|
531
|
+
},
|
|
532
|
+
get "aria-disabled"() {
|
|
533
|
+
return O(() => !!y())() ? "true" : _() ? "false" : void 0;
|
|
534
|
+
},
|
|
535
|
+
"aria-label": n ? "Increase" : "Decrease",
|
|
536
|
+
get "aria-controls"() {
|
|
537
|
+
return r.id();
|
|
538
|
+
},
|
|
539
|
+
onClick: F,
|
|
540
|
+
onMouseDown: R,
|
|
541
|
+
onKeyDown: z,
|
|
542
|
+
onKeyUp: te,
|
|
543
|
+
onPointerDown: I,
|
|
544
|
+
onPointerUp: V,
|
|
545
|
+
onPointerMove: W,
|
|
546
|
+
onTouchStart: G,
|
|
547
|
+
onTouchEnd: ne,
|
|
548
|
+
onMouseEnter: K,
|
|
549
|
+
onMouseLeave: re,
|
|
550
|
+
onMouseUp: ie
|
|
551
|
+
}, E, l));
|
|
552
|
+
}
|
|
553
|
+
function rt(e) {
|
|
554
|
+
e.preventDefault(), e.preventBaseUIHandler();
|
|
555
|
+
}
|
|
556
|
+
function it(e) {
|
|
557
|
+
e.preventBaseUIHandler();
|
|
558
|
+
}
|
|
559
|
+
function at(e) {
|
|
560
|
+
e.key !== "Tab" && e.preventDefault(), e.preventBaseUIHandler();
|
|
561
|
+
}
|
|
562
|
+
function ot(e) {
|
|
563
|
+
if (e.target !== e.currentTarget) return;
|
|
564
|
+
let t = ct(e.currentTarget), n = e.key === "Enter", r = e.key === " ";
|
|
565
|
+
if (t || !n && !r) {
|
|
566
|
+
t && r && e.preventDefault();
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
e.defaultPrevented || (e.preventDefault(), n && (e.preventBaseUIHandler(), lt(e.currentTarget, e)));
|
|
570
|
+
}
|
|
571
|
+
function st(e) {
|
|
572
|
+
e.target === e.currentTarget && !e.defaultPrevented && e.key === " " && (e.preventBaseUIHandler(), lt(e.currentTarget, e));
|
|
573
|
+
}
|
|
574
|
+
function ct(e) {
|
|
575
|
+
return e.tagName === "A" && !!e.href;
|
|
576
|
+
}
|
|
577
|
+
function lt(e, t) {
|
|
578
|
+
let n = e.ownerDocument.defaultView;
|
|
579
|
+
if (!n) return;
|
|
580
|
+
let r = n.PointerEvent ?? n.MouseEvent;
|
|
581
|
+
e.dispatchEvent(new r("click", {
|
|
582
|
+
bubbles: !0,
|
|
583
|
+
cancelable: !0,
|
|
584
|
+
composed: !0,
|
|
585
|
+
detail: 0,
|
|
586
|
+
shiftKey: t.shiftKey,
|
|
587
|
+
ctrlKey: t.ctrlKey,
|
|
588
|
+
altKey: t.altKey,
|
|
589
|
+
metaKey: t.metaKey
|
|
590
|
+
}));
|
|
591
|
+
}
|
|
592
|
+
//#endregion
|
|
593
|
+
//#region src/number-field/increment/NumberFieldIncrement.tsx
|
|
594
|
+
function ut(e) {
|
|
595
|
+
return nt(e, !0);
|
|
596
|
+
}
|
|
597
|
+
//#endregion
|
|
598
|
+
//#region src/number-field/decrement/NumberFieldDecrement.tsx
|
|
599
|
+
function dt(e) {
|
|
600
|
+
return nt(e, !1);
|
|
601
|
+
}
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/number-field/input/NumberFieldInput.tsx
|
|
604
|
+
var ft = /* @__PURE__ */ new Set([
|
|
605
|
+
"Backspace",
|
|
606
|
+
"Delete",
|
|
607
|
+
"ArrowLeft",
|
|
608
|
+
"ArrowRight",
|
|
609
|
+
"Tab",
|
|
610
|
+
"Enter",
|
|
611
|
+
"Escape"
|
|
612
|
+
]);
|
|
613
|
+
function pt(e) {
|
|
614
|
+
let n = He(), r = v(!0), o = y(), u = b(), d = e, _ = e, [x, C] = R(), T = !1, E = !1, D = null, O = U(n.value), ee = B(_, "as", "aria-describedby", "aria-labelledby", "aria-roledescription", "class", "onBlur", "onFocus", "onInput", "onKeyDown", "onPaste", "ref", "style"), A = n.state, j = L(() => f(e.class, A())), M = L(() => p(e.style, A())), N = L(() => t(A(), $)), P = L(() => d["aria-labelledby"] ?? u.labelId()), F = L(() => u.getAriaDescribedBy(d["aria-describedby"])), z = {
|
|
615
|
+
id: void 0,
|
|
616
|
+
name: void 0,
|
|
617
|
+
value: n.value,
|
|
618
|
+
getControl: () => x() ?? null
|
|
619
|
+
};
|
|
620
|
+
function te(e) {
|
|
621
|
+
if (e.defaultPrevented || A().disabled || (r.setFocused(!0), T)) return;
|
|
622
|
+
T = !0;
|
|
623
|
+
let t = e.currentTarget.value.length;
|
|
624
|
+
e.currentTarget.setSelectionRange(t, t);
|
|
625
|
+
}
|
|
626
|
+
function H(e) {
|
|
627
|
+
let t = A();
|
|
628
|
+
if (e.defaultPrevented || t.disabled || (r.setTouched(!0), r.setFocused(!1), t.readOnly)) return;
|
|
629
|
+
let i = !n.allowInputSync(), a = n.hasPendingCommit(), o = n.value(), c = n.inputValue();
|
|
630
|
+
if (n.setAllowInputSync(!0), c.trim() === "") {
|
|
631
|
+
let t = m(s, e);
|
|
632
|
+
if (n.setValue(null, t), t.isCanceled) return;
|
|
633
|
+
r.validationMode() === "onBlur" && r.validation.commit(null), (i || a || o !== null) && n.onValueCommitted(null, h(s, e));
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
let u = n.formatOptions(), d = Q(c, n.locale(), u);
|
|
637
|
+
if (d === null) return;
|
|
638
|
+
let f = Fe(u), p;
|
|
639
|
+
p = !i && !f ? o : f ? Ie(d, u) : d;
|
|
640
|
+
let g = o !== p, _ = i || g || a, v = p;
|
|
641
|
+
if (g) {
|
|
642
|
+
let t = m(l, e);
|
|
643
|
+
if (E = !0, n.setValue(p, t), t.isCanceled) {
|
|
644
|
+
E = !1;
|
|
645
|
+
return;
|
|
646
|
+
}
|
|
647
|
+
v = n.lastChangedValue(), v === o && (E = !1);
|
|
648
|
+
}
|
|
649
|
+
r.validationMode() === "onBlur" && r.validation.commit(v), _ && n.onValueCommitted(v, h(l, e));
|
|
650
|
+
let y = De(v, n.locale(), u);
|
|
651
|
+
c !== y && n.setInputValue(y);
|
|
652
|
+
}
|
|
653
|
+
function W(e) {
|
|
654
|
+
if (e.defaultPrevented) {
|
|
655
|
+
e.currentTarget.value = n.inputValue();
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
n.setAllowInputSync(!1);
|
|
659
|
+
let t = e.currentTarget.value;
|
|
660
|
+
if (t.trim() === "") {
|
|
661
|
+
n.setInputValue(t), n.setValue(null, m(s, e));
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
let r = n.getAllowedNonNumericKeys();
|
|
665
|
+
if (!Array.from(t).every((e) => ue(e) || ye.test(e) || r.has(e) || pe.test(e))) {
|
|
666
|
+
e.currentTarget.value = n.inputValue();
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
let i = Q(t, n.locale(), n.formatOptions());
|
|
670
|
+
n.setInputValue(t), i !== null && n.setValue(i, m(c, e));
|
|
671
|
+
}
|
|
672
|
+
function G(e) {
|
|
673
|
+
let t = A();
|
|
674
|
+
if (e.defaultPrevented || t.readOnly || t.disabled) return;
|
|
675
|
+
let r = n.inputValue(), i = !n.allowInputSync(), o = n.getAllowedNonNumericKeys(), s = o.has(e.key), { decimal: c, currency: l, percentSign: u } = Ce(n.locale(), n.formatOptions()), d = e.currentTarget.selectionStart, f = e.currentTarget.selectionEnd, p = d === 0 && f === r.length, g = (e) => d !== null && f !== null && e >= d && e < f, _ = [[ye, ve], [be, Z]];
|
|
676
|
+
for (let [t, n] of _) if (t.test(e.key) && Array.from(o).some((e) => t.test(e))) {
|
|
677
|
+
let e = r.search(n), t = e !== -1 && g(e);
|
|
678
|
+
s = !(ye.test(r) || be.test(r)) || p || t;
|
|
679
|
+
}
|
|
680
|
+
for (let t of [
|
|
681
|
+
c,
|
|
682
|
+
l,
|
|
683
|
+
u
|
|
684
|
+
]) if (t && e.key === t) {
|
|
685
|
+
let e = r.indexOf(t);
|
|
686
|
+
s = e === -1 || p || g(e);
|
|
687
|
+
}
|
|
688
|
+
let v = e.key === "ArrowUp" || e.key === "ArrowDown";
|
|
689
|
+
if (e.which === 229 || e.altKey && !v || e.ctrlKey || e.metaKey || s || ue(e.key) || ft.has(e.key)) return;
|
|
690
|
+
let y = null;
|
|
691
|
+
if (e.key === "Home" && n.min() !== void 0 ? y = n.min() ?? null : e.key === "End" && n.max() !== void 0 && (y = n.max() ?? null), e.key.length > 1 && !v && y === null) return;
|
|
692
|
+
let b = i ? Q(r, n.locale(), n.formatOptions()) : null;
|
|
693
|
+
e.preventDefault(), e.stopPropagation();
|
|
694
|
+
let x = !1;
|
|
695
|
+
(v || y !== null) && n.setAllowInputSync(!0), v ? (i || n.setLastChangedValue(n.value()), x = n.incrementValue(n.getStepAmount(e), {
|
|
696
|
+
direction: e.key === "ArrowUp" ? 1 : -1,
|
|
697
|
+
currentValue: b,
|
|
698
|
+
event: e,
|
|
699
|
+
reason: a
|
|
700
|
+
})) : y !== null && (x = n.setValue(y, m(a, e))), x && n.onValueCommitted(n.lastChangedValue(), h(a, e));
|
|
701
|
+
}
|
|
702
|
+
function ne(e) {
|
|
703
|
+
let t = A();
|
|
704
|
+
if (e.defaultPrevented || t.readOnly || t.disabled) return;
|
|
705
|
+
let r = "";
|
|
706
|
+
try {
|
|
707
|
+
r = e.clipboardData?.getData("text/plain") ?? "";
|
|
708
|
+
} catch {
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
e.preventDefault();
|
|
712
|
+
let a = e.currentTarget.selectionStart ?? 0, o = e.currentTarget.selectionEnd ?? a, s = n.inputValue(), c = s.slice(0, a) + r + s.slice(o), l = Q(c, n.locale(), n.formatOptions());
|
|
713
|
+
l !== null && (n.setAllowInputSync(!1), D = a + r.length, n.setValue(l, m(i, e)), n.setInputValue(c));
|
|
714
|
+
}
|
|
715
|
+
let K = g(() => d.onFocus, () => te), re = g(() => d.onBlur, () => H), ie = g(() => d.onInput, () => W), ae = g(() => d.onKeyDown, () => G), q = g(() => d.onPaste, () => ne);
|
|
716
|
+
return I(() => ({
|
|
717
|
+
element: x(),
|
|
718
|
+
inputValue: n.inputValue()
|
|
719
|
+
}), (e) => {
|
|
720
|
+
if (D === null) return;
|
|
721
|
+
let t = D;
|
|
722
|
+
D = null, e.element?.setSelectionRange(t, t);
|
|
723
|
+
}), I(() => ({
|
|
724
|
+
disabled: A().disabled,
|
|
725
|
+
element: x(),
|
|
726
|
+
id: n.id(),
|
|
727
|
+
name: n.nameProp()
|
|
728
|
+
}), (e) => {
|
|
729
|
+
z.id = e.id, z.name = e.name, r.registerFieldControl(n.controlSource, e.disabled || !e.element ? void 0 : z), u.registerControlId(n.controlSource, e.element ? e.id : void 0);
|
|
730
|
+
}), I(() => ({
|
|
731
|
+
name: n.name(),
|
|
732
|
+
shouldValidateOnChange: r.shouldValidateOnChange(),
|
|
733
|
+
value: n.value()
|
|
734
|
+
}), (e) => {
|
|
735
|
+
if (e.value !== O) {
|
|
736
|
+
if (O = e.value, o.clearError(e.name), E && !e.shouldValidateOnChange) {
|
|
737
|
+
E = !1;
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
U(() => r.validation.change(e.value));
|
|
741
|
+
}
|
|
742
|
+
}), V(() => {
|
|
743
|
+
n.setInputElement(void 0), r.registerFieldControl(n.controlSource, void 0), u.registerControlId(n.controlSource, void 0);
|
|
744
|
+
}), w(S, k({
|
|
745
|
+
get component() {
|
|
746
|
+
return e.as ?? "input";
|
|
747
|
+
},
|
|
748
|
+
ref: [((e) => {
|
|
749
|
+
C(e), n.setInputElement(e);
|
|
750
|
+
}), d.ref],
|
|
751
|
+
get id() {
|
|
752
|
+
return n.id();
|
|
753
|
+
},
|
|
754
|
+
get class() {
|
|
755
|
+
return j();
|
|
756
|
+
},
|
|
757
|
+
get style() {
|
|
758
|
+
return M();
|
|
759
|
+
},
|
|
760
|
+
get required() {
|
|
761
|
+
return A().required;
|
|
762
|
+
},
|
|
763
|
+
get disabled() {
|
|
764
|
+
return A().disabled;
|
|
765
|
+
},
|
|
766
|
+
get readonly() {
|
|
767
|
+
return A().readOnly;
|
|
768
|
+
},
|
|
769
|
+
get inputMode() {
|
|
770
|
+
return n.inputMode();
|
|
771
|
+
},
|
|
772
|
+
get value() {
|
|
773
|
+
return n.inputValue();
|
|
774
|
+
},
|
|
775
|
+
type: "text",
|
|
776
|
+
autocomplete: "off",
|
|
777
|
+
autocorrect: "off",
|
|
778
|
+
spellcheck: "false",
|
|
779
|
+
get "aria-roledescription"() {
|
|
780
|
+
return d["aria-roledescription"] ?? "Number field";
|
|
781
|
+
},
|
|
782
|
+
get "aria-invalid"() {
|
|
783
|
+
return !A().disabled && A().valid === !1 ? "true" : void 0;
|
|
784
|
+
},
|
|
785
|
+
get "aria-labelledby"() {
|
|
786
|
+
return P();
|
|
787
|
+
},
|
|
788
|
+
get "aria-describedby"() {
|
|
789
|
+
return F();
|
|
790
|
+
},
|
|
791
|
+
onFocus: K,
|
|
792
|
+
onBlur: re,
|
|
793
|
+
onInput: ie,
|
|
794
|
+
onKeyDown: ae,
|
|
795
|
+
onPaste: q
|
|
796
|
+
}, N, ee));
|
|
797
|
+
}
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region src/number-field/utils/getViewportRect.ts
|
|
800
|
+
function mt(e, t) {
|
|
801
|
+
let n = t.ownerDocument.defaultView ?? window;
|
|
802
|
+
if (e != null) {
|
|
803
|
+
let n = t.getBoundingClientRect();
|
|
804
|
+
return {
|
|
805
|
+
left: n.left - e / 2,
|
|
806
|
+
top: n.top - e / 2,
|
|
807
|
+
right: n.right + e / 2,
|
|
808
|
+
bottom: n.bottom + e / 2
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
let r = n.visualViewport;
|
|
812
|
+
return r ? {
|
|
813
|
+
left: r.offsetLeft,
|
|
814
|
+
top: r.offsetTop,
|
|
815
|
+
right: r.offsetLeft + r.width,
|
|
816
|
+
bottom: r.offsetTop + r.height
|
|
817
|
+
} : {
|
|
818
|
+
left: 0,
|
|
819
|
+
top: 0,
|
|
820
|
+
right: n.document.documentElement.clientWidth,
|
|
821
|
+
bottom: n.document.documentElement.clientHeight
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
//#endregion
|
|
825
|
+
//#region src/number-field/scrub-area/NumberFieldScrubAreaContext.ts
|
|
826
|
+
var ht = Symbol("NumberFieldScrubAreaContext"), gt = F(ht);
|
|
827
|
+
function _t() {
|
|
828
|
+
let e = W(gt);
|
|
829
|
+
if (e === ht) throw Error("Base UI: NumberFieldScrubAreaContext is missing. NumberFieldScrubArea parts must be placed within <NumberField.ScrubArea>.");
|
|
830
|
+
return e;
|
|
831
|
+
}
|
|
832
|
+
//#endregion
|
|
833
|
+
//#region src/number-field/scrub-area/NumberFieldScrubArea.tsx
|
|
834
|
+
var vt = {
|
|
835
|
+
"touch-action": "none",
|
|
836
|
+
"-webkit-user-select": "none",
|
|
837
|
+
"user-select": "none"
|
|
838
|
+
};
|
|
839
|
+
function yt(e) {
|
|
840
|
+
let n = He(), i = e, a = e, [o, s] = R(), [c, l] = R(), [u, d] = R(!1), [m, _] = R(!1), [v, y] = R(!1), b = L(() => n.state().disabled), C = L(() => n.state().readOnly), T = n.state, E = B(a, "as", "class", "direction", "onPointerDown", "pixelSensitivity", "ref", "style", "teleportDistance"), D = L(() => f(e.class, T())), O = L(() => {
|
|
841
|
+
let t = p(e.style, T());
|
|
842
|
+
return typeof t == "string" ? `touch-action:none;-webkit-user-select:none;user-select:none;${t}` : x(vt, t === !1 ? void 0 : t);
|
|
843
|
+
}), ee = L(() => t(T(), $)), A = {
|
|
844
|
+
x: 0,
|
|
845
|
+
y: 0
|
|
846
|
+
}, j = !1, M = !1, N = null, P, F;
|
|
847
|
+
function z() {
|
|
848
|
+
P !== void 0 && (F?.clearTimeout(P), P = void 0, F = void 0);
|
|
849
|
+
}
|
|
850
|
+
function H(e, t, n) {
|
|
851
|
+
let r = e.ownerDocument.defaultView?.visualViewport?.scale ?? 1;
|
|
852
|
+
e.style.transform = `translate3d(${t}px,${n}px,0) scale(${1 / r})`;
|
|
853
|
+
}
|
|
854
|
+
function U(e) {
|
|
855
|
+
let t = c(), n = o();
|
|
856
|
+
if (!t || !n) return;
|
|
857
|
+
let r = mt(i.teleportDistance, n), a = (e, t, n, r) => e + t < n ? r - t : e + t > r ? n - t : e;
|
|
858
|
+
A.x = a(Math.round(A.x + e.movementX), t.offsetWidth / 2, r.left, r.right), A.y = a(Math.round(A.y + e.movementY), t.offsetHeight / 2, r.top, r.bottom), H(t, A.x, A.y);
|
|
859
|
+
}
|
|
860
|
+
function W(e, t) {
|
|
861
|
+
let r = () => {
|
|
862
|
+
y(e), n.setIsScrubbing(e);
|
|
863
|
+
};
|
|
864
|
+
if (!e) {
|
|
865
|
+
r();
|
|
866
|
+
return;
|
|
867
|
+
}
|
|
868
|
+
te(r);
|
|
869
|
+
let i = c();
|
|
870
|
+
i && (A.x = t.clientX - i.offsetWidth / 2, A.y = t.clientY - i.offsetHeight / 2, H(i, A.x, A.y));
|
|
871
|
+
}
|
|
872
|
+
function G(e, t) {
|
|
873
|
+
try {
|
|
874
|
+
o()?.ownerDocument.exitPointerLock();
|
|
875
|
+
} catch {} finally {
|
|
876
|
+
if (j = !1, W(!1, e), n.onValueCommitted(n.lastChangedValue() ?? n.value(), h(r, e)), !M && N != null) {
|
|
877
|
+
let e = t.ownerDocument.defaultView;
|
|
878
|
+
e && N.dispatchEvent(new e.MouseEvent("click", {
|
|
879
|
+
bubbles: !0,
|
|
880
|
+
cancelable: !0
|
|
881
|
+
}));
|
|
882
|
+
}
|
|
883
|
+
M = !1, N = null;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
I(() => ({
|
|
887
|
+
direction: i.direction ?? "horizontal",
|
|
888
|
+
disabled: b(),
|
|
889
|
+
input: n.inputElement(),
|
|
890
|
+
pixelSensitivity: i.pixelSensitivity ?? 2,
|
|
891
|
+
readOnly: C(),
|
|
892
|
+
scrubbing: v()
|
|
893
|
+
}), (e) => {
|
|
894
|
+
if (!e.input || e.disabled || e.readOnly || !e.scrubbing) return;
|
|
895
|
+
let t = e.input, i = t.ownerDocument.defaultView;
|
|
896
|
+
if (!i) return;
|
|
897
|
+
let a = i, o = 0;
|
|
898
|
+
function s(e) {
|
|
899
|
+
j && (Me() ? (z(), F = a, P = a.setTimeout(G, 20, e, t)) : G(e, t));
|
|
900
|
+
}
|
|
901
|
+
function c(t) {
|
|
902
|
+
if (!j) return;
|
|
903
|
+
t.preventDefault(), U(t);
|
|
904
|
+
let { movementX: i, movementY: a } = t;
|
|
905
|
+
if (o += e.direction === "vertical" ? a : i, Math.abs(o) >= e.pixelSensitivity) {
|
|
906
|
+
o = 0, M = !0;
|
|
907
|
+
let s = (e.direction === "vertical" ? -a : i) * n.getStepAmount(t);
|
|
908
|
+
s !== 0 && (n.setAllowInputSync(!0), n.incrementValue(Math.abs(s), {
|
|
909
|
+
direction: s >= 0 ? 1 : -1,
|
|
910
|
+
event: t,
|
|
911
|
+
reason: r
|
|
912
|
+
}));
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
return a.addEventListener("pointerup", s, !0), a.addEventListener("pointermove", c, !0), () => {
|
|
916
|
+
P !== void 0 && (F?.clearTimeout(P), P = void 0, F = void 0), a.removeEventListener("pointerup", s, !0), a.removeEventListener("pointermove", c, !0);
|
|
917
|
+
};
|
|
918
|
+
}), I(() => ({
|
|
919
|
+
disabled: b(),
|
|
920
|
+
element: o(),
|
|
921
|
+
readOnly: C()
|
|
922
|
+
}), (e) => {
|
|
923
|
+
if (!e.element || e.disabled || e.readOnly) return;
|
|
924
|
+
let t = (e) => {
|
|
925
|
+
e.touches.length === 1 && e.preventDefault();
|
|
926
|
+
};
|
|
927
|
+
return e.element.addEventListener("touchstart", t), () => e.element?.removeEventListener("touchstart", t);
|
|
928
|
+
});
|
|
929
|
+
async function ne(e) {
|
|
930
|
+
if (e.defaultPrevented || C() || e.button !== 0 || b()) return;
|
|
931
|
+
let t = e.pointerType === "touch";
|
|
932
|
+
if (d(t), e.pointerType === "mouse" && (e.preventDefault(), n.inputElement()?.focus()), j = !0, M = !1, N = bt(e), W(!0, e), !t && !je()) {
|
|
933
|
+
let t = o() ?? e.currentTarget;
|
|
934
|
+
try {
|
|
935
|
+
await t.ownerDocument.body.requestPointerLock(), _(!1);
|
|
936
|
+
} catch {
|
|
937
|
+
_(!0);
|
|
938
|
+
} finally {
|
|
939
|
+
j && W(!0, e);
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
let K = g(() => i.onPointerDown, () => ne);
|
|
944
|
+
return V(() => {
|
|
945
|
+
if (z(), l(void 0), j) {
|
|
946
|
+
j = !1, n.setIsScrubbing(!1);
|
|
947
|
+
try {
|
|
948
|
+
o()?.ownerDocument.exitPointerLock();
|
|
949
|
+
} catch {}
|
|
950
|
+
}
|
|
951
|
+
}), w(gt, {
|
|
952
|
+
value: {
|
|
953
|
+
isScrubbing: v,
|
|
954
|
+
isTouchInput: u,
|
|
955
|
+
isPointerLockDenied: m,
|
|
956
|
+
scrubAreaElement: o,
|
|
957
|
+
scrubAreaCursorElement: c,
|
|
958
|
+
setScrubAreaCursorElement: l
|
|
959
|
+
},
|
|
960
|
+
get children() {
|
|
961
|
+
return w(S, k({
|
|
962
|
+
get component() {
|
|
963
|
+
return e.as ?? "span";
|
|
964
|
+
},
|
|
965
|
+
ref: [((e) => s(e)), i.ref],
|
|
966
|
+
role: "presentation",
|
|
967
|
+
get class() {
|
|
968
|
+
return D();
|
|
969
|
+
},
|
|
970
|
+
get style() {
|
|
971
|
+
return O();
|
|
972
|
+
},
|
|
973
|
+
onPointerDown: K
|
|
974
|
+
}, ee, E));
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
function bt(e) {
|
|
979
|
+
return e.composedPath?.()[0] ?? e.target;
|
|
980
|
+
}
|
|
981
|
+
//#endregion
|
|
982
|
+
//#region src/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.tsx
|
|
983
|
+
var xt = {
|
|
984
|
+
position: "fixed",
|
|
985
|
+
top: "0",
|
|
986
|
+
left: "0",
|
|
987
|
+
"pointer-events": "none"
|
|
988
|
+
};
|
|
989
|
+
function St(e) {
|
|
990
|
+
let n = He(), r = _t(), i = e, a = B(e, "as", "class", "ref", "style"), o = n.state, s = L(() => r.isScrubbing() && !je() && !r.isTouchInput() && !r.isPointerLockDenied()), c = () => r.scrubAreaElement()?.ownerDocument.body, l = L(() => f(e.class, o())), u = L(() => {
|
|
991
|
+
let t = p(e.style, o());
|
|
992
|
+
return typeof t == "string" ? `position:fixed;top:0;left:0;pointer-events:none;${t}` : x(xt, t === !1 ? void 0 : t);
|
|
993
|
+
}), d = L(() => t(o(), $));
|
|
994
|
+
return I(s, (e) => {
|
|
995
|
+
e || r.setScrubAreaCursorElement(void 0);
|
|
996
|
+
}), V(() => {
|
|
997
|
+
r.setScrubAreaCursorElement(void 0);
|
|
998
|
+
}), w(P, {
|
|
999
|
+
get when() {
|
|
1000
|
+
return O(() => !!s())() ? c() : void 0;
|
|
1001
|
+
},
|
|
1002
|
+
keyed: !0,
|
|
1003
|
+
children: (t) => w(C, {
|
|
1004
|
+
mount: t,
|
|
1005
|
+
get children() {
|
|
1006
|
+
return w(S, k({
|
|
1007
|
+
get component() {
|
|
1008
|
+
return e.as ?? "span";
|
|
1009
|
+
},
|
|
1010
|
+
ref: [((e) => r.setScrubAreaCursorElement(e)), i.ref],
|
|
1011
|
+
role: "presentation",
|
|
1012
|
+
get class() {
|
|
1013
|
+
return l();
|
|
1014
|
+
},
|
|
1015
|
+
get style() {
|
|
1016
|
+
return u();
|
|
1017
|
+
}
|
|
1018
|
+
}, d, a));
|
|
1019
|
+
}
|
|
1020
|
+
})
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
//#endregion
|
|
1024
|
+
//#region src/number-field/index.parts.ts
|
|
1025
|
+
var Ct = /* @__PURE__ */ e({
|
|
1026
|
+
Decrement: () => dt,
|
|
1027
|
+
Group: () => qe,
|
|
1028
|
+
Increment: () => ut,
|
|
1029
|
+
Input: () => pt,
|
|
1030
|
+
Root: () => Ke,
|
|
1031
|
+
ScrubArea: () => yt,
|
|
1032
|
+
ScrubAreaCursor: () => St
|
|
1033
|
+
});
|
|
1034
|
+
//#endregion
|
|
1035
|
+
export { Ct as t };
|