solid-baseui 0.1.0-alpha.0 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -0
- package/README.md +133 -15
- package/dist/lib/client/DialogHandle-DluOK_7u.js +521 -0
- package/dist/lib/client/DialogPopup-CfEb3F54.js +138 -0
- package/dist/lib/client/FieldControl-eDe-Jnp9.js +142 -0
- package/dist/lib/client/{FieldRootContext-izCEh80D.js → FieldRootContext-D3fuVjs3.js} +1 -1
- package/dist/lib/client/{FocusManager-grSdNHqW.js → FocusManager-q7z7PMV1.js} +94 -91
- package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
- package/dist/lib/client/{InternalBackdrop-cSK13gaM.js → InternalBackdrop-B8_lfUvf.js} +1 -1
- package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
- package/dist/lib/client/MenuSubmenuTrigger-DMb5CwTF.js +1584 -0
- package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-DyX5gY1e.js} +17 -11
- package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-BjRwcvbG.js} +138 -115
- package/dist/lib/client/PopupViewport-BanYHrD-.js +154 -0
- package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
- package/dist/lib/client/TriggerFocusGuards-Fzspp3Y1.js +51 -0
- package/dist/lib/client/accordion/index.js +1 -1
- package/dist/lib/client/accordion-CA2DfX67.js +381 -0
- package/dist/lib/client/alert-dialog/index.js +1 -1
- package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-Bup88Dpx.js} +2 -2
- package/dist/lib/client/autocomplete/index.js +1 -1
- package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-oyy_uRpU.js} +30 -25
- package/dist/lib/client/avatar/index.js +1 -1
- package/dist/lib/client/avatar-DNZ4fnBd.js +191 -0
- package/dist/lib/client/button/index.js +1 -1
- package/dist/lib/client/button-BJZYmCVv.js +88 -0
- package/dist/lib/client/checkbox/index.js +1 -1
- package/dist/lib/client/checkbox-group/index.js +1 -1
- package/dist/lib/client/checkbox-group-DGyrciZJ.js +135 -0
- package/dist/lib/client/checkbox-sQHYTbpB.js +425 -0
- package/dist/lib/client/collapsible/index.js +1 -1
- package/dist/lib/client/collapsible-BENbFFCc.js +230 -0
- package/dist/lib/client/combobox/index.js +2 -2
- package/dist/lib/client/combobox-BGH8QLXH.js +401 -0
- package/dist/lib/client/compositeNavigation-DCt1sQon.js +82 -0
- package/dist/lib/client/{constants-BYjBUIIi.js → constants-ByOMFJAe.js} +105 -101
- package/dist/lib/client/context-menu/index.js +1 -1
- package/dist/lib/client/context-menu-xQ1sBCET.js +220 -0
- package/dist/lib/client/{createAnchorPositioning-DcxDXUgB.js → createAnchorPositioning-DCXIApS1.js} +149 -146
- package/dist/lib/client/{createAnchoredPopupScrollLock-Cx0cbh1_.js → createAnchoredPopupScrollLock-BxKpJbCE.js} +2 -2
- package/dist/lib/client/{createClickInteraction-CTaIFBiV.js → createClickInteraction-BeBsTqtY.js} +1 -1
- package/dist/lib/client/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
- package/dist/lib/client/createFocusInteraction-DQPWkZe2.js +60 -0
- package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
- package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-CSNpMz5v.js} +4 -4
- package/dist/lib/client/{createTransitionStatus-B1L-whed.js → createTransitionStatus-BL_cPSEA.js} +12 -12
- package/dist/lib/client/dialog/index.js +1 -1
- package/dist/lib/client/{dialog-DkaQwIgP.js → dialog-C0EF0a5u.js} +2 -2
- package/dist/lib/client/{dom-BEAeQ9Eb.js → dom-lDdayFF_.js} +25 -15
- package/dist/lib/client/drawer/index.js +1 -1
- package/dist/lib/client/drawer-uKoNBwDU.js +1540 -0
- package/dist/lib/client/field/index.js +1 -1
- package/dist/lib/client/field-DIMrgpBW.js +483 -0
- package/dist/lib/client/fieldset/index.js +1 -1
- package/dist/lib/client/fieldset-Byqk3noT.js +70 -0
- package/dist/lib/client/form/index.js +1 -1
- package/dist/lib/client/form-Bqq8wSLY.js +109 -0
- package/dist/lib/client/index.js +44 -42
- package/dist/lib/client/input/index.js +1 -1
- package/dist/lib/client/{input-gb0ejxkm.js → input-YthuKwIE.js} +1 -1
- package/dist/lib/client/internals/composeEventHandlers.js +14 -8
- package/dist/lib/client/internals/field-root-context/index.js +2 -2
- package/dist/lib/client/internals/form-context/index.js +1 -1
- package/dist/lib/client/internals/labelable-provider/index.js +1 -1
- package/dist/lib/client/{mergeStyleValue-C4ITiiIV.js → isSolidAccessor-BH_FevwH.js} +8 -15
- package/dist/lib/client/menu/index.js +1 -1
- package/dist/lib/client/menu-4rNLN6aX.js +334 -0
- package/dist/lib/client/menubar/index.js +1 -1
- package/dist/lib/client/menubar-nFQGtNmY.js +163 -0
- package/dist/lib/client/mergeStyleValue-Dcd36yxZ.js +12 -0
- package/dist/lib/client/meter/index.js +1 -1
- package/dist/lib/client/meter-BvWdppcx.js +178 -0
- package/dist/lib/client/navigation-menu/index.js +1 -1
- package/dist/lib/client/navigation-menu-BbRyun3a.js +1070 -0
- package/dist/lib/client/number-field/index.js +1 -1
- package/dist/lib/client/number-field-hT_H0hVu.js +1043 -0
- package/dist/lib/client/otp-field/index.js +1 -1
- package/dist/lib/client/otp-field-lsy2iGID.js +584 -0
- package/dist/lib/client/popover/index.js +1 -1
- package/dist/lib/client/popover-Cmvmuf1L.js +940 -0
- package/dist/lib/client/popupStateMapping-nhukB8NK.js +371 -0
- package/dist/lib/client/preview-card/index.js +1 -1
- package/dist/lib/client/preview-card-Dtu8AnBN.js +632 -0
- package/dist/lib/client/progress/index.js +1 -1
- package/dist/lib/client/progress-AVKxvgpc.js +195 -0
- package/dist/lib/client/radio/index.js +1 -1
- package/dist/lib/client/radio-CeCU-Qqi.js +284 -0
- package/dist/lib/client/radio-group/index.js +1 -1
- package/dist/lib/client/radio-group-NbuJvjQe.js +195 -0
- package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
- package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DVAR5dQD.js} +74 -70
- package/dist/lib/client/scroll-area/index.js +1 -1
- package/dist/lib/client/scroll-area-DqbvoAd7.js +717 -0
- package/dist/lib/client/{scrollable-SRNYlhF7.js → scrollable-BVaDUXng.js} +12 -12
- package/dist/lib/client/select/index.js +1 -1
- package/dist/lib/client/select-Dad51Xbn.js +1934 -0
- package/dist/lib/client/separator/index.js +1 -1
- package/dist/lib/client/slider/index.js +1 -1
- package/dist/lib/client/slider-CLSKFq_M.js +927 -0
- package/dist/lib/client/switch/index.js +1 -1
- package/dist/lib/client/switch-Bzuu5EIg.js +306 -0
- package/dist/lib/client/tabs/index.js +1 -1
- package/dist/lib/client/tabs-DWiBDv8D.js +695 -0
- package/dist/lib/client/toast/index.js +1 -1
- package/dist/lib/client/toast-DmtPJW2k.js +1118 -0
- package/dist/lib/client/toggle/index.js +1 -1
- package/dist/lib/client/toggle-CAe-Z8Xn.js +142 -0
- package/dist/lib/client/toggle-group/index.js +1 -1
- package/dist/lib/client/toggle-group-BbQg5s-m.js +134 -0
- package/dist/lib/client/toolbar/index.js +1 -1
- package/dist/lib/client/toolbar-BXT_g-oX.js +504 -0
- package/dist/lib/client/tooltip/index.js +1 -1
- package/dist/lib/client/tooltip-h2r2_Xuo.js +850 -0
- package/dist/lib/client/use-render/index.js +2 -0
- package/dist/lib/client/useFilteredItems-BX0BEuSI.js +2301 -0
- package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
- package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-BGIISmG7.js} +37 -46
- package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-C2ZDGf42.js} +12 -15
- package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-CDMMyvuj.js} +62 -26
- package/dist/lib/server/{FieldRootContext-IC-LWzVp.js → FieldRootContext-Bfpna6gA.js} +3 -3
- package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-D-xgblGs.js} +9 -5
- package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
- package/dist/lib/server/{InternalBackdrop-C_iDPVR-.js → InternalBackdrop-D_2zAWnl.js} +1 -1
- package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
- package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-BMQKlOvU.js} +177 -210
- package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-QNj4mED2.js} +14 -5
- package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-evylvVnN.js} +42 -15
- package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-BDttjORN.js} +38 -28
- package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
- package/dist/lib/server/TriggerFocusGuards-B9GNbLrL.js +61 -0
- package/dist/lib/server/accordion/index.js +39 -77
- package/dist/lib/server/alert-dialog/index.js +2 -2
- package/dist/lib/server/autocomplete/index.js +14 -5
- package/dist/lib/server/avatar/index.js +90 -51
- package/dist/lib/server/button/index.js +14 -15
- package/dist/lib/server/checkbox/index.js +37 -64
- package/dist/lib/server/checkbox-group/index.js +21 -11
- package/dist/lib/server/collapsible/index.js +42 -49
- package/dist/lib/server/combobox/index.js +79 -50
- package/dist/lib/server/{compositeNavigation-BRVT1C38.js → compositeNavigation-D5jKM4yk.js} +32 -1
- package/dist/lib/server/{constants-9H__9xbS.js → constants-ByqXubhO.js} +10 -5
- package/dist/lib/server/context-menu/index.js +14 -16
- package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-DrQYe7RS.js} +12 -7
- package/dist/lib/server/{createAnchoredPopupScrollLock-DFuUrykR.js → createAnchoredPopupScrollLock-q6gnOSmv.js} +2 -2
- package/dist/lib/server/{createClickInteraction-BYsMgvup.js → createClickInteraction-D7oc1Vco.js} +1 -1
- package/dist/lib/server/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
- package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DFKr4G7a.js} +22 -2
- package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
- package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-Cg0-lLf4.js} +2 -2
- package/dist/lib/server/{createTransitionStatus-BTlrerSS.js → createTransitionStatus-184v7j3-.js} +2 -2
- package/dist/lib/server/dialog/index.js +2 -2
- package/dist/lib/server/{dom-Crg_2R-j.js → dom-D8_aB1yy.js} +14 -1
- package/dist/lib/server/drawer/index.js +96 -100
- package/dist/lib/server/field/index.js +110 -98
- package/dist/lib/server/fieldset/index.js +13 -16
- package/dist/lib/server/form/index.js +18 -14
- package/dist/lib/server/index.js +5 -3
- package/dist/lib/server/input/index.js +1 -1
- package/dist/lib/server/internals/composeEventHandlers.js +15 -9
- package/dist/lib/server/internals/field-root-context/index.js +1 -1
- package/dist/lib/server/internals/form-context/index.js +1 -1
- package/dist/lib/server/internals/labelable-provider/index.js +1 -1
- package/dist/lib/server/{mergeStyleValue-Db8bRCM4.js → isSolidAccessor-CZpzAH5l.js} +7 -21
- package/dist/lib/server/menu/index.js +30 -29
- package/dist/lib/server/menubar/index.js +10 -35
- package/dist/lib/server/mergeStyleValue-DecVaoac.js +20 -0
- package/dist/lib/server/meter/index.js +20 -32
- package/dist/lib/server/navigation-menu/index.js +67 -138
- package/dist/lib/server/number-field/index.js +64 -62
- package/dist/lib/server/otp-field/index.js +19 -22
- package/dist/lib/server/popover/index.js +61 -77
- package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-VHqr6M4H.js} +19 -17
- package/dist/lib/server/preview-card/index.js +39 -50
- package/dist/lib/server/progress/index.js +21 -33
- package/dist/lib/server/radio/index.js +24 -45
- package/dist/lib/server/radio-group/index.js +12 -13
- package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
- package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-B8QtiIZ3.js} +6 -1
- package/dist/lib/server/scroll-area/index.js +40 -49
- package/dist/lib/server/{scrollable-CjsSxbGr.js → scrollable-C9Pgq8T5.js} +1 -1
- package/dist/lib/server/select/index.js +128 -213
- package/dist/lib/server/separator/index.js +1 -1
- package/dist/lib/server/slider/index.js +39 -52
- package/dist/lib/server/switch/index.js +22 -32
- package/dist/lib/server/tabs/index.js +197 -137
- package/dist/lib/server/toast/index.js +78 -95
- package/dist/lib/server/toggle/index.js +11 -13
- package/dist/lib/server/toggle-group/index.js +11 -9
- package/dist/lib/server/toolbar/index.js +76 -93
- package/dist/lib/server/tooltip/index.js +53 -57
- package/dist/lib/server/use-render/index.js +2 -0
- package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-BmhL0nf1.js} +335 -316
- package/dist/lib/server/useRender-CryVdCjs.js +16 -0
- package/dist/lib/types/accordion/header/AccordionHeader.d.ts +1 -1
- package/dist/lib/types/accordion/item/AccordionItem.d.ts +1 -1
- package/dist/lib/types/accordion/panel/AccordionPanel.d.ts +1 -1
- package/dist/lib/types/accordion/root/AccordionRoot.d.ts +2 -7
- package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +7 -7
- package/dist/lib/types/alert-dialog/trigger/AlertDialogTrigger.d.ts +1 -2
- package/dist/lib/types/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -0
- package/dist/lib/types/avatar/fallback/AvatarFallback.d.ts +2 -2
- package/dist/lib/types/avatar/image/AvatarImage.d.ts +9 -3
- package/dist/lib/types/avatar/image/createImageLoadingStatus.d.ts +3 -2
- package/dist/lib/types/avatar/root/AvatarRoot.d.ts +1 -1
- package/dist/lib/types/button/Button.d.ts +1 -1
- package/dist/lib/types/checkbox-group/CheckboxGroupContext.d.ts +4 -1
- package/dist/lib/types/collapsible/panel/CollapsiblePanel.d.ts +1 -1
- package/dist/lib/types/collapsible/root/CollapsibleRoot.d.ts +1 -1
- package/dist/lib/types/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
- package/dist/lib/types/combobox/chip/ComboboxChip.d.ts +2 -0
- package/dist/lib/types/combobox/index.d.ts +2 -0
- package/dist/lib/types/combobox/index.parts.d.ts +1 -0
- package/dist/lib/types/combobox/items/createItems.d.ts +42 -0
- package/dist/lib/types/combobox/root/AriaCombobox.d.ts +4 -0
- package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +17 -8
- package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
- package/dist/lib/types/combobox/store/ComboboxStore.d.ts +1 -0
- package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
- package/dist/lib/types/combobox/utils/handleInputPress.d.ts +1 -1
- package/dist/lib/types/dialog/backdrop/DialogBackdrop.d.ts +1 -1
- package/dist/lib/types/dialog/description/DialogDescription.d.ts +1 -1
- package/dist/lib/types/dialog/title/DialogTitle.d.ts +1 -1
- package/dist/lib/types/dialog/viewport/DialogViewport.d.ts +1 -1
- package/dist/lib/types/drawer/backdrop/DrawerBackdrop.d.ts +1 -1
- package/dist/lib/types/drawer/content/DrawerContent.d.ts +1 -1
- package/dist/lib/types/drawer/indent/DrawerIndent.d.ts +1 -1
- package/dist/lib/types/drawer/indent-background/DrawerIndentBackground.d.ts +1 -1
- package/dist/lib/types/field/control/FieldControl.d.ts +5 -5
- package/dist/lib/types/field/root/FieldRoot.d.ts +1 -1
- package/dist/lib/types/field/root/createFieldValidation.d.ts +3 -2
- package/dist/lib/types/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/dist/lib/types/fieldset/root/FieldsetRoot.d.ts +1 -1
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/internals/composeEventHandlers.d.ts +9 -2
- package/dist/lib/types/internals/createTransitionStatus.d.ts +1 -1
- package/dist/lib/types/internals/field-root-context/FieldRootContext.d.ts +1 -0
- package/dist/lib/types/internals/form-context/FormContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/LabelableContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/createLabelableId.d.ts +3 -0
- package/dist/lib/types/internals/overlay/PopupPortal.d.ts +4 -2
- package/dist/lib/types/internals/overlay/createPopupPresence.d.ts +1 -0
- package/dist/lib/types/internals/overlay/dom.d.ts +2 -0
- package/dist/lib/types/menu/root/MenuRootContext.d.ts +1 -0
- package/dist/lib/types/meter/indicator/MeterIndicator.d.ts +1 -1
- package/dist/lib/types/meter/label/MeterLabel.d.ts +1 -1
- package/dist/lib/types/meter/root/MeterRoot.d.ts +1 -1
- package/dist/lib/types/meter/track/MeterTrack.d.ts +1 -1
- package/dist/lib/types/meter/value/MeterValue.d.ts +1 -1
- package/dist/lib/types/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -0
- package/dist/lib/types/number-field/input/NumberFieldInput.d.ts +5 -5
- package/dist/lib/types/number-field/root/NumberFieldRootContext.d.ts +1 -0
- package/dist/lib/types/popover/arrow/PopoverArrow.d.ts +1 -1
- package/dist/lib/types/popover/backdrop/PopoverBackdrop.d.ts +1 -1
- package/dist/lib/types/popover/description/PopoverDescription.d.ts +1 -1
- package/dist/lib/types/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/dist/lib/types/popover/title/PopoverTitle.d.ts +1 -1
- package/dist/lib/types/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/dist/lib/types/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/dist/lib/types/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
- package/dist/lib/types/progress/indicator/ProgressIndicator.d.ts +1 -1
- package/dist/lib/types/progress/label/ProgressLabel.d.ts +1 -1
- package/dist/lib/types/progress/root/ProgressRoot.d.ts +1 -1
- package/dist/lib/types/progress/track/ProgressTrack.d.ts +1 -1
- package/dist/lib/types/progress/value/ProgressValue.d.ts +1 -1
- package/dist/lib/types/radio/indicator/RadioIndicator.d.ts +2 -2
- package/dist/lib/types/scroll-area/content/ScrollAreaContent.d.ts +1 -1
- package/dist/lib/types/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/dist/lib/types/scroll-area/root/ScrollAreaRoot.d.ts +1 -1
- package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +2 -1
- package/dist/lib/types/scroll-area/thumb/ScrollAreaThumb.d.ts +1 -1
- package/dist/lib/types/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
- package/dist/lib/types/separator/Separator.d.ts +1 -1
- package/dist/lib/types/slider/track/SliderTrack.d.ts +2 -2
- package/dist/lib/types/tabs/indicator/prehydrationScript.d.ts +1 -1
- package/dist/lib/types/tabs/list/TabsList.d.ts +1 -1
- package/dist/lib/types/tabs/panel/TabsPanel.d.ts +1 -1
- package/dist/lib/types/tabs/root/TabsRoot.d.ts +1 -1
- package/dist/lib/types/tabs/tab/TabsTab.d.ts +1 -1
- package/dist/lib/types/toast/createToastManager.d.ts +2 -2
- package/dist/lib/types/toast/store/ToastStore.d.ts +1 -1
- package/dist/lib/types/toast/useToastManager.d.ts +1 -1
- package/dist/lib/types/toggle/Toggle.d.ts +1 -1
- package/dist/lib/types/toggle-group/ToggleGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/group/ToolbarGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +10 -3
- package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +10 -4
- package/dist/lib/types/toolbar/separator/ToolbarSeparator.d.ts +1 -1
- package/dist/lib/types/tooltip/arrow/TooltipArrow.d.ts +1 -1
- package/dist/lib/types/tooltip/positioner/TooltipPositioner.d.ts +1 -1
- package/dist/lib/types/types/index.d.ts +7 -3
- package/dist/lib/types/use-render/index.d.ts +2 -0
- package/dist/lib/types/use-render/useRender.d.ts +10 -0
- package/package.json +24 -11
- package/dist/lib/client/DialogHandle-DrN2YWCv.js +0 -518
- package/dist/lib/client/DialogPopup-ZlqmGfdk.js +0 -136
- package/dist/lib/client/FieldControl-Bc-z2og6.js +0 -116
- package/dist/lib/client/MenuSubmenuTrigger-QZkQ0F2v.js +0 -1570
- package/dist/lib/client/PopupViewport-DgrIqQea.js +0 -152
- package/dist/lib/client/Separator-9DboD_Si.js +0 -25
- package/dist/lib/client/TriggerFocusGuards-CQ-JuASy.js +0 -56
- package/dist/lib/client/accordion-sOXt9AlG.js +0 -399
- package/dist/lib/client/avatar-AF9vyD4q.js +0 -146
- package/dist/lib/client/button-DpUi-2g8.js +0 -82
- package/dist/lib/client/checkbox-BbAwOptH.js +0 -441
- package/dist/lib/client/checkbox-group-CSSp_805.js +0 -128
- package/dist/lib/client/collapsible-BIbje_ub.js +0 -232
- package/dist/lib/client/combobox-8O-vgTLL.js +0 -352
- package/dist/lib/client/compositeNavigation-sxniYTc7.js +0 -58
- package/dist/lib/client/context-menu-BTMkXtrs.js +0 -217
- package/dist/lib/client/createFocusInteraction-D4w1-235.js +0 -50
- package/dist/lib/client/drawer-Ce2cChLt.js +0 -1550
- package/dist/lib/client/field-C-o7jzKW.js +0 -469
- package/dist/lib/client/fieldset-BQTAWv2L.js +0 -65
- package/dist/lib/client/form-BINBiW5L.js +0 -106
- package/dist/lib/client/menu-DeMT08oD.js +0 -326
- package/dist/lib/client/menubar-C4aomSYv.js +0 -185
- package/dist/lib/client/meter-xSU37Q0m.js +0 -171
- package/dist/lib/client/navigation-menu-ZILQmdn6.js +0 -1083
- package/dist/lib/client/number-field-B8CsTb_8.js +0 -1035
- package/dist/lib/client/otp-field-DBkMcnog.js +0 -582
- package/dist/lib/client/popover-CQwyp-fs.js +0 -929
- package/dist/lib/client/popupStateMapping-C9eZl19i.js +0 -367
- package/dist/lib/client/preview-card-D_2Q8lpC.js +0 -625
- package/dist/lib/client/progress-D7r0xAC9.js +0 -188
- package/dist/lib/client/radio-CzGQ81z1.js +0 -299
- package/dist/lib/client/radio-group-DpHlBKA6.js +0 -193
- package/dist/lib/client/runOnceAnimationsFinish-15EM-Z4l.js +0 -48
- package/dist/lib/client/scroll-area-CffM4U0R.js +0 -701
- package/dist/lib/client/select-IFhiEg73.js +0 -1940
- package/dist/lib/client/slider-BCagYmGp.js +0 -921
- package/dist/lib/client/switch-RIJeDnvS.js +0 -308
- package/dist/lib/client/tabs-fOAKs7r3.js +0 -696
- package/dist/lib/client/toast-D2P8UqUs.js +0 -1108
- package/dist/lib/client/toggle-group-0Aue0owJ.js +0 -129
- package/dist/lib/client/toggle-momVEIBL.js +0 -138
- package/dist/lib/client/toolbar-Du22aKCv.js +0 -492
- package/dist/lib/client/tooltip-CyK61fl1.js +0 -844
- package/dist/lib/client/useFilteredItems-DTekHz39.js +0 -2223
- package/dist/lib/client/withoutComponentBinding-CcCW7fSc.js +0 -13
- package/dist/lib/server/TriggerFocusGuards-sbGwf45f.js +0 -63
- package/dist/lib/server/withoutComponentBinding-BHaWr5kU.js +0 -20
- package/dist/lib/types/internals/withoutComponentBinding.d.ts +0 -7
|
@@ -1,921 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
|
|
3
|
-
import { b as n, c as r, h as i, j as a, w as o } from "./reasons-Co5CzjKq.js";
|
|
4
|
-
import { n as s, t as c } from "./resolveStyle-XcgAuaKR.js";
|
|
5
|
-
import { createChangeEventDetails as l, createGenericEventDetails as u } from "./internals/createBaseUIEventDetails.js";
|
|
6
|
-
import { composeEventHandlers as d } from "./internals/composeEventHandlers.js";
|
|
7
|
-
import { n as f } from "./DirectionContext-BwMabICS.js";
|
|
8
|
-
import { fieldStateAttributesMapping as p } from "./internals/field-constants.js";
|
|
9
|
-
import { n as m } from "./FieldRootContext-izCEh80D.js";
|
|
10
|
-
import { n as h } from "./FormContext-BB05lWOI.js";
|
|
11
|
-
import { r as g } from "./LabelableContext-DKsB0fIx.js";
|
|
12
|
-
import { n as _ } from "./CSPContext-faVzToiT.js";
|
|
13
|
-
import { mergeStyles as v } from "./internals/mergeStyles.js";
|
|
14
|
-
import { Dynamic as y, addEvent as b, createComponent as x, delegateEvents as ee, effect as S, getNextElement as C, isServer as w, memo as T, mergeProps as E, ref as D, runHydrationEvents as O, setAttribute as k, spread as A, style as te, template as j } from "@solidjs/web";
|
|
15
|
-
import { createContext as M, createEffect as N, createMemo as P, createSignal as F, createUniqueId as I, flush as ne, omit as L, onCleanup as re, onSettled as ie, sharedConfig as ae, untrack as R, useContext as z } from "solid-js";
|
|
16
|
-
//#region src/slider/stateAttributesMapping.ts
|
|
17
|
-
var B = () => null, V = {
|
|
18
|
-
activeThumbIndex: B,
|
|
19
|
-
max: B,
|
|
20
|
-
min: B,
|
|
21
|
-
minStepsBetweenValues: B,
|
|
22
|
-
step: B,
|
|
23
|
-
values: B,
|
|
24
|
-
...p
|
|
25
|
-
};
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/slider/utils/dom.ts
|
|
28
|
-
function oe(e, t) {
|
|
29
|
-
let n = e.getBoundingClientRect();
|
|
30
|
-
return t ? (n.top + n.bottom) / 2 : (n.left + n.right) / 2;
|
|
31
|
-
}
|
|
32
|
-
function se(e) {
|
|
33
|
-
let t = e.composedPath()[0] ?? e.target;
|
|
34
|
-
if (!t || typeof t.nodeType != "number") return null;
|
|
35
|
-
let n = t;
|
|
36
|
-
return n.nodeType === 1 ? n : n.parentElement;
|
|
37
|
-
}
|
|
38
|
-
function ce(e, t) {
|
|
39
|
-
if (!e || !t || typeof t.nodeType != "number") return !1;
|
|
40
|
-
let n = t;
|
|
41
|
-
for (; n;) {
|
|
42
|
-
if (e.contains(n)) return !0;
|
|
43
|
-
let t = n.getRootNode();
|
|
44
|
-
n = t.nodeType === 11 && "host" in t ? t.host : null;
|
|
45
|
-
}
|
|
46
|
-
return !1;
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/slider/utils/math.ts
|
|
50
|
-
function H(e, t, n) {
|
|
51
|
-
return Math.min(Math.max(e, t), n);
|
|
52
|
-
}
|
|
53
|
-
function le(e, t) {
|
|
54
|
-
return e === t ? !0 : !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => e === t[n]);
|
|
55
|
-
}
|
|
56
|
-
function ue(e, t, n) {
|
|
57
|
-
return (e - t) * 100 / (n - t);
|
|
58
|
-
}
|
|
59
|
-
function de(e, t, n) {
|
|
60
|
-
return new Intl.NumberFormat(t, n).format(e);
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/slider/utils/getSliderValue.ts
|
|
64
|
-
function fe(e, t, n, r, i, a) {
|
|
65
|
-
let o = H(e, n, r);
|
|
66
|
-
if (!i) return o;
|
|
67
|
-
let s = a.slice();
|
|
68
|
-
return s[t] = H(o, a[t - 1] ?? -Infinity, a[t + 1] ?? Infinity), s.sort((e, t) => e - t);
|
|
69
|
-
}
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region src/slider/utils/validateMinimumDistance.ts
|
|
72
|
-
function pe(e, t, n) {
|
|
73
|
-
if (!Array.isArray(e)) return !0;
|
|
74
|
-
let r = t * n;
|
|
75
|
-
for (let t = 0; t < e.length - 1; t += 1) if (!(Math.abs(e[t] - e[t + 1]) >= r)) return !1;
|
|
76
|
-
return !0;
|
|
77
|
-
}
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/slider/root/SliderRootContext.ts
|
|
80
|
-
var U = Symbol("SliderRootContext"), me = M(U);
|
|
81
|
-
function W() {
|
|
82
|
-
let e = z(me);
|
|
83
|
-
if (e === U) throw Error("Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.");
|
|
84
|
-
return e;
|
|
85
|
-
}
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region src/slider/root/SliderRoot.tsx
|
|
88
|
-
function G(e) {
|
|
89
|
-
let r = m(!0), a = h(), d = g(), f = e, p = e, _ = Symbol("Slider"), v = Symbol("SliderControl"), b = `base-ui-${I()}`, ee = `base-ui-${I()}`, S = R(d.controlId), C = typeof S == "string" ? S : ee, w = R(() => f.value !== void 0), T = R(() => f.defaultValue ?? f.min ?? 0), [D, O] = F(() => T), [k, A] = F(), [te, j] = F(), [M, ie] = F(-1), [ae, z] = F(-1), [B, oe] = F(!1), [se, ue] = F(), [de, U] = F([void 0, void 0]), [W, G] = F(0, { ownedWrite: !0 }), K = [], ye = 0, q = {
|
|
90
|
-
pressedThumbCenterOffset: null,
|
|
91
|
-
pressedThumbIndex: -1,
|
|
92
|
-
pressedValues: null,
|
|
93
|
-
lastChangeReason: o
|
|
94
|
-
}, be = L(p, "aria-describedby", "aria-labelledby", "as", "class", "defaultValue", "disabled", "format", "form", "id", "largeStep", "locale", "max", "min", "minStepsBetweenValues", "name", "onValueChange", "onValueCommitted", "orientation", "ref", "step", "style", "thumbAlignment", "thumbCollisionBehavior", "value"), J = P(() => f.id ?? b), Y = P(() => f.min ?? 0), X = P(() => f.max ?? 100), Z = P(() => f.step ?? 1), xe = P(() => f.largeStep ?? 10), Q = P(() => f.minStepsBetweenValues ?? 0), Se = P(() => f.orientation ?? "horizontal"), Ce = P(() => f.thumbAlignment ?? "center"), we = P(() => f.thumbCollisionBehavior ?? "push"), Te = P(() => r.disabled() || (f.disabled ?? !1)), Ee = P(() => r.name() ?? f.name), De = P(() => w ? f.value : D()), $ = P(() => {
|
|
95
|
-
let e = De();
|
|
96
|
-
return Array.isArray(e) ? e.map((e) => H(e, Y(), X())).sort((e, t) => e - t) : [H(e, Y(), X())];
|
|
97
|
-
}), Oe = P(() => Array.isArray(De())), ke = P(() => Oe() ? $() : $()[0]), Ae = P(() => `${J()}-label`), je = P(() => f["aria-labelledby"] ?? d.labelId() ?? se()), Me = P(() => ({
|
|
98
|
-
...r.state(),
|
|
99
|
-
activeThumbIndex: M(),
|
|
100
|
-
disabled: Te(),
|
|
101
|
-
dragging: B(),
|
|
102
|
-
max: X(),
|
|
103
|
-
min: Y(),
|
|
104
|
-
minStepsBetweenValues: Q(),
|
|
105
|
-
orientation: Se(),
|
|
106
|
-
step: Z(),
|
|
107
|
-
values: $()
|
|
108
|
-
})), Ne = P(() => s(e.class, Me())), Pe = P(() => c(e.style, Me())), Fe = P(() => t(Me(), V)), Ie = P(() => d.getAriaDescribedBy(f["aria-describedby"])), Le = P(() => (W(), K.slice().sort(he))), Re = _e(R(ke)), ze = {
|
|
109
|
-
id: b,
|
|
110
|
-
name: f.name,
|
|
111
|
-
value: ke,
|
|
112
|
-
getControl: () => Le().find((e) => !e.input()?.disabled)?.input() ?? te() ?? k() ?? null
|
|
113
|
-
};
|
|
114
|
-
function Be(e) {
|
|
115
|
-
ie(e), e !== -1 && z(e);
|
|
116
|
-
}
|
|
117
|
-
function Ve(e) {
|
|
118
|
-
return e.order = ye, ye += 1, K.push(e), G((e) => e + 1), () => {
|
|
119
|
-
let t = K.indexOf(e);
|
|
120
|
-
t !== -1 && (K.splice(t, 1), G((e) => e + 1));
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function He(e, t) {
|
|
124
|
-
U((n) => n[e] === t ? n : e === 0 ? [t, n[1]] : [n[0], t]);
|
|
125
|
-
}
|
|
126
|
-
function Ue(e, t) {
|
|
127
|
-
if (Number.isNaN(e) || le(e, R(De))) return !1;
|
|
128
|
-
let n = t.event, r = ve(n);
|
|
129
|
-
return Object.defineProperty(r, "target", {
|
|
130
|
-
configurable: !0,
|
|
131
|
-
writable: !0,
|
|
132
|
-
value: {
|
|
133
|
-
value: e,
|
|
134
|
-
name: R(Ee)
|
|
135
|
-
}
|
|
136
|
-
}), t.event = r, f.onValueChange?.(e, t), w && ne(), !t.isCanceled && (q.lastChangeReason = t.reason, w || O(() => e), !0);
|
|
137
|
-
}
|
|
138
|
-
function We(e, t) {
|
|
139
|
-
f.onValueCommitted?.(e, t);
|
|
140
|
-
}
|
|
141
|
-
function Ge(e, t, a) {
|
|
142
|
-
let o = R($), s = fe(e, t, R(Y), R(X), R(Oe), o);
|
|
143
|
-
if (!pe(s, R(Z), R(Q))) {
|
|
144
|
-
queueMicrotask(Ke);
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
let c = "key" in a ? n : i, d = Ue(s, l(c, a, void 0, { activeThumbIndex: t }));
|
|
148
|
-
r.setTouched(!0), d && We(s, u(c, a)), queueMicrotask(Ke);
|
|
149
|
-
}
|
|
150
|
-
function Ke() {
|
|
151
|
-
let e = R($);
|
|
152
|
-
for (let t of R(Le)) {
|
|
153
|
-
let n = t.input(), r = e[t.index()];
|
|
154
|
-
n && r !== void 0 && n.valueAsNumber !== r && (n.value = String(r));
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
let qe = {
|
|
158
|
-
active: M,
|
|
159
|
-
controlElement: te,
|
|
160
|
-
disabled: Te,
|
|
161
|
-
dragging: B,
|
|
162
|
-
fieldControlSource: _,
|
|
163
|
-
format: () => f.format,
|
|
164
|
-
form: () => f.form,
|
|
165
|
-
handleInputChange: Ge,
|
|
166
|
-
indicatorPosition: de,
|
|
167
|
-
inset: () => Ce() !== "center",
|
|
168
|
-
interaction: q,
|
|
169
|
-
labelId: je,
|
|
170
|
-
largeStep: xe,
|
|
171
|
-
lastUsedThumbIndex: ae,
|
|
172
|
-
locale: () => f.locale,
|
|
173
|
-
max: X,
|
|
174
|
-
min: Y,
|
|
175
|
-
minStepsBetweenValues: Q,
|
|
176
|
-
name: Ee,
|
|
177
|
-
onValueCommitted: We,
|
|
178
|
-
orientation: Se,
|
|
179
|
-
orderedThumbs: Le,
|
|
180
|
-
range: Oe,
|
|
181
|
-
registerThumb: Ve,
|
|
182
|
-
renderBeforeHydration: () => Ce() === "edge",
|
|
183
|
-
rootId: J,
|
|
184
|
-
rootLabelId: Ae,
|
|
185
|
-
setActive: Be,
|
|
186
|
-
setControlElement: j,
|
|
187
|
-
setDragging: oe,
|
|
188
|
-
setIndicatorPosition: He,
|
|
189
|
-
setLocalLabelId: ue,
|
|
190
|
-
setValue: Ue,
|
|
191
|
-
singleInputId: C,
|
|
192
|
-
state: Me,
|
|
193
|
-
step: Z,
|
|
194
|
-
syncInputs: Ke,
|
|
195
|
-
thumbCollisionBehavior: we,
|
|
196
|
-
values: $
|
|
197
|
-
};
|
|
198
|
-
return N(() => ({
|
|
199
|
-
disabled: Te(),
|
|
200
|
-
element: k(),
|
|
201
|
-
id: J(),
|
|
202
|
-
name: f.name
|
|
203
|
-
}), (e) => {
|
|
204
|
-
ze.id = e.id, ze.name = e.name, r.registerFieldControl(_, e.disabled || !e.element ? void 0 : ze);
|
|
205
|
-
}), N(ke, (e) => {
|
|
206
|
-
le(e, Re) || (Re = _e(e), R(() => {
|
|
207
|
-
a.clearError(Ee()), r.validation.change(e), r.setDirty(!le(e, r.validityData().initialValue));
|
|
208
|
-
}));
|
|
209
|
-
}), N(() => ({
|
|
210
|
-
disabled: Te(),
|
|
211
|
-
element: k()
|
|
212
|
-
}), (e) => {
|
|
213
|
-
if (!e.disabled || !e.element) return;
|
|
214
|
-
let t = ge(e.element.ownerDocument);
|
|
215
|
-
t && ce(e.element, t) && t.blur(), Be(-1), oe(!1);
|
|
216
|
-
}), N(() => ({
|
|
217
|
-
range: Oe(),
|
|
218
|
-
inputId: Le()[0]?.input()?.id
|
|
219
|
-
}), (e) => {
|
|
220
|
-
d.registerControlId(v, e.range ? void 0 : e.inputId);
|
|
221
|
-
}), N(k, (e) => {
|
|
222
|
-
let t = e?.ownerDocument.defaultView?.MutationObserver;
|
|
223
|
-
if (!e || !t) return;
|
|
224
|
-
let n = new t(() => G((e) => e + 1));
|
|
225
|
-
return n.observe(e, {
|
|
226
|
-
childList: !0,
|
|
227
|
-
subtree: !0
|
|
228
|
-
}), () => n.disconnect();
|
|
229
|
-
}), N(() => ({
|
|
230
|
-
max: X(),
|
|
231
|
-
min: Y()
|
|
232
|
-
}), (e) => {}), re(() => {
|
|
233
|
-
r.registerFieldControl(_, void 0), d.registerControlId(v, void 0);
|
|
234
|
-
}), x(me, {
|
|
235
|
-
value: qe,
|
|
236
|
-
get children() {
|
|
237
|
-
return x(y, E({
|
|
238
|
-
get component() {
|
|
239
|
-
return e.as ?? "div";
|
|
240
|
-
},
|
|
241
|
-
ref: [((e) => A(e)), f.ref],
|
|
242
|
-
get id() {
|
|
243
|
-
return J();
|
|
244
|
-
},
|
|
245
|
-
role: "group",
|
|
246
|
-
get class() {
|
|
247
|
-
return Ne();
|
|
248
|
-
},
|
|
249
|
-
get style() {
|
|
250
|
-
return Pe();
|
|
251
|
-
},
|
|
252
|
-
get "aria-labelledby"() {
|
|
253
|
-
return je();
|
|
254
|
-
},
|
|
255
|
-
get "aria-describedby"() {
|
|
256
|
-
return Ie();
|
|
257
|
-
},
|
|
258
|
-
get "aria-invalid"() {
|
|
259
|
-
return Me().valid === !1 && !Te() ? "true" : void 0;
|
|
260
|
-
}
|
|
261
|
-
}, Fe, be));
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
function he(e, t) {
|
|
266
|
-
let n = e.element(), r = t.element();
|
|
267
|
-
if (n && r && n !== r) {
|
|
268
|
-
let e = n.compareDocumentPosition(r);
|
|
269
|
-
if (e & 4) return -1;
|
|
270
|
-
if (e & 2) return 1;
|
|
271
|
-
}
|
|
272
|
-
return e.order - t.order;
|
|
273
|
-
}
|
|
274
|
-
function ge(e) {
|
|
275
|
-
let t = e.activeElement;
|
|
276
|
-
for (; t?.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
|
|
277
|
-
return t;
|
|
278
|
-
}
|
|
279
|
-
function _e(e) {
|
|
280
|
-
return Array.isArray(e) ? e.slice() : e;
|
|
281
|
-
}
|
|
282
|
-
function ve(e) {
|
|
283
|
-
let t = e.constructor;
|
|
284
|
-
try {
|
|
285
|
-
return new t(e.type, e);
|
|
286
|
-
} catch {
|
|
287
|
-
return new Event(e.type, {
|
|
288
|
-
bubbles: e.bubbles,
|
|
289
|
-
cancelable: e.cancelable,
|
|
290
|
-
composed: e.composed
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
//#endregion
|
|
295
|
-
//#region src/slider/label/SliderLabel.tsx
|
|
296
|
-
function K(e) {
|
|
297
|
-
let n = W(), r = g(), i = e, a = L(e, "as", "class", "id", "onClick", "onPointerDown", "ref", "style"), o = P(() => n.state()), l = P(() => s(e.class, o())), u = P(() => c(e.style, o())), f = P(() => t(o(), V));
|
|
298
|
-
function p(e) {
|
|
299
|
-
let t = e.composedPath()[0];
|
|
300
|
-
if (t instanceof Element && t.closest("button,input,select,textarea")) return;
|
|
301
|
-
!e.defaultPrevented && e.detail > 1 && e.preventDefault();
|
|
302
|
-
let i = e.currentTarget, a = r.controlId(), o = a ? i.ownerDocument.getElementById(a) : null;
|
|
303
|
-
if (o instanceof HTMLElement) {
|
|
304
|
-
o.focus({ focusVisible: !0 });
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
let s = n.controlElement()?.querySelectorAll("input[type=\"range\"]");
|
|
308
|
-
s?.length === 1 && s[0]?.focus({ focusVisible: !0 });
|
|
309
|
-
}
|
|
310
|
-
function m(e) {
|
|
311
|
-
e.preventDefault();
|
|
312
|
-
}
|
|
313
|
-
let h = d(() => i.onClick, () => p), _ = d(() => i.onPointerDown, () => m);
|
|
314
|
-
return N(n.rootLabelId, (e) => {
|
|
315
|
-
n.setLocalLabelId(e);
|
|
316
|
-
let t = r.registerLabelId(e);
|
|
317
|
-
return () => {
|
|
318
|
-
t(), R(n.labelId) === e && n.setLocalLabelId(void 0);
|
|
319
|
-
};
|
|
320
|
-
}), x(y, E({
|
|
321
|
-
get component() {
|
|
322
|
-
return e.as ?? "div";
|
|
323
|
-
},
|
|
324
|
-
ref: [i.ref],
|
|
325
|
-
get id() {
|
|
326
|
-
return n.rootLabelId();
|
|
327
|
-
},
|
|
328
|
-
get class() {
|
|
329
|
-
return l();
|
|
330
|
-
},
|
|
331
|
-
get style() {
|
|
332
|
-
return u();
|
|
333
|
-
},
|
|
334
|
-
onClick: h,
|
|
335
|
-
onPointerDown: _
|
|
336
|
-
}, f, a));
|
|
337
|
-
}
|
|
338
|
-
//#endregion
|
|
339
|
-
//#region src/slider/value/SliderValue.tsx
|
|
340
|
-
function ye(e) {
|
|
341
|
-
let n = W(), r = e, i = L(e, "aria-live", "as", "children", "class", "ref", "style"), a = P(() => n.state()), o = P(() => s(e.class, a())), l = P(() => c(e.style, a())), u = P(() => t(a(), V)), d = P(() => n.values().map((e) => de(e, n.locale(), n.format()))), f = P(() => typeof r.children == "function" ? r.children(d(), n.values()) : d().join(" – ")), p = P(() => n.orderedThumbs().map((e) => e.inputId()).join(" ").trim() || void 0);
|
|
342
|
-
return x(y, E({
|
|
343
|
-
get component() {
|
|
344
|
-
return e.as ?? "output";
|
|
345
|
-
},
|
|
346
|
-
ref: [r.ref],
|
|
347
|
-
get class() {
|
|
348
|
-
return o();
|
|
349
|
-
},
|
|
350
|
-
get style() {
|
|
351
|
-
return l();
|
|
352
|
-
},
|
|
353
|
-
get "aria-live"() {
|
|
354
|
-
return r["aria-live"] ?? "off";
|
|
355
|
-
},
|
|
356
|
-
get for() {
|
|
357
|
-
return p();
|
|
358
|
-
}
|
|
359
|
-
}, u, i, { get children() {
|
|
360
|
-
return f();
|
|
361
|
-
} }));
|
|
362
|
-
}
|
|
363
|
-
//#endregion
|
|
364
|
-
//#region src/slider/utils/getPushedThumbValues.ts
|
|
365
|
-
function q(e, t, n, r, i, a, o, s) {
|
|
366
|
-
let c = e.slice(), l = a * o, u = c.length - 1, d = s ?? e;
|
|
367
|
-
c[t] = H(n, r + t * l, i - (u - t) * l);
|
|
368
|
-
for (let e = t + 1; e <= u; e += 1) {
|
|
369
|
-
let t = c[e - 1] + l, n = i - (u - e) * l, r = Math.max(c[e], t);
|
|
370
|
-
d[e] < r && (r = Math.max(d[e], t)), c[e] = H(r, t, n);
|
|
371
|
-
}
|
|
372
|
-
for (let e = t - 1; e >= 0; --e) {
|
|
373
|
-
let t = c[e + 1] - l, n = r + e * l, i = Math.min(c[e], t);
|
|
374
|
-
d[e] > i && (i = Math.min(d[e], t)), c[e] = H(i, n, t);
|
|
375
|
-
}
|
|
376
|
-
return c.map((e) => Number(e.toFixed(12)));
|
|
377
|
-
}
|
|
378
|
-
//#endregion
|
|
379
|
-
//#region src/slider/utils/resolveThumbCollision.ts
|
|
380
|
-
function be(e, t, n, r, i, a, o, s, c, l) {
|
|
381
|
-
let u = n ?? t, d = r ?? t;
|
|
382
|
-
if (u.length <= 1) return {
|
|
383
|
-
value: a,
|
|
384
|
-
thumbIndex: 0,
|
|
385
|
-
didSwap: !1
|
|
386
|
-
};
|
|
387
|
-
let f = c * l;
|
|
388
|
-
if (e === "push") return {
|
|
389
|
-
value: q(u, i, a, o, s, c, l),
|
|
390
|
-
thumbIndex: i,
|
|
391
|
-
didSwap: !1
|
|
392
|
-
};
|
|
393
|
-
let p = u.slice(), m = p[i - 1], h = p[i + 1], g = m == null ? o : m + f, _ = h == null ? s : h - f, v = Number(H(a, g, _).toFixed(12));
|
|
394
|
-
if (p[i] = v, e !== "swap") return {
|
|
395
|
-
value: p,
|
|
396
|
-
thumbIndex: i,
|
|
397
|
-
didSwap: !1
|
|
398
|
-
};
|
|
399
|
-
let y = u[i], b = 1e-7, x = a > y && h != null && a >= h - b, ee = a < y && m != null && a <= m + b;
|
|
400
|
-
if (!x && !ee) return {
|
|
401
|
-
value: p,
|
|
402
|
-
thumbIndex: i,
|
|
403
|
-
didSwap: !1
|
|
404
|
-
};
|
|
405
|
-
let S = x ? i + 1 : i - 1, C = p.map((e, t) => t === i ? v : d[t] ?? u[t]), w = q(p, S, x ? Math.max(a, p[S]) : Math.min(a, p[S]), o, s, c, l, C), T = x ? S - 1 : S + 1, E = w[T - 1], D = w[T + 1], O = Math.max(E == null ? o : E + f, o + T * f), k = Math.min(D == null ? s : D - f, s - (w.length - 1 - T) * f);
|
|
406
|
-
return w[T] = Number(H(v, O, k).toFixed(12)), {
|
|
407
|
-
value: w,
|
|
408
|
-
thumbIndex: S,
|
|
409
|
-
didSwap: !0
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
//#endregion
|
|
413
|
-
//#region src/slider/utils/roundValueToStep.ts
|
|
414
|
-
function J(e) {
|
|
415
|
-
if (e === 0) return 0;
|
|
416
|
-
if (Math.abs(e) < 1) {
|
|
417
|
-
let t = e.toExponential().split("e-");
|
|
418
|
-
return (t[0]?.split(".")[1]?.length ?? 0) + Number.parseInt(t[1] ?? "0", 10);
|
|
419
|
-
}
|
|
420
|
-
return e.toString().split(".")[1]?.length ?? 0;
|
|
421
|
-
}
|
|
422
|
-
function Y(e, t, n) {
|
|
423
|
-
let r = Math.round((e - n) / t) * t + n;
|
|
424
|
-
return Number(r.toFixed(Math.max(J(t), J(n))));
|
|
425
|
-
}
|
|
426
|
-
//#endregion
|
|
427
|
-
//#region src/slider/control/SliderControl.tsx
|
|
428
|
-
var X = 2;
|
|
429
|
-
function Z(e) {
|
|
430
|
-
let n = W(), i = f(), o = e, p = e, [m, h] = F(), g = L(p, "as", "class", "onPointerDown", "onTouchStart", "ref", "style"), _ = P(() => n.state()), v = P(() => s(e.class, _())), b = P(() => c(e.style, _())), ee = P(() => t(_(), V)), S = null, C = 0, w = 0, T = null, D = null, O = null, k = null, A;
|
|
431
|
-
function te(e) {
|
|
432
|
-
return n.orderedThumbs()[e]?.input();
|
|
433
|
-
}
|
|
434
|
-
function j(e) {
|
|
435
|
-
n.interaction.pressedThumbIndex = e, n.orderedThumbs()[e]?.element() || (n.interaction.pressedThumbCenterOffset = null);
|
|
436
|
-
}
|
|
437
|
-
function M() {
|
|
438
|
-
n.interaction.pressedThumbIndex = -1, n.interaction.pressedThumbCenterOffset = null;
|
|
439
|
-
}
|
|
440
|
-
function I(e) {
|
|
441
|
-
return n.orderedThumbs().some((t) => ce(t.element(), e) && t.input()?.disabled === !0);
|
|
442
|
-
}
|
|
443
|
-
function ne(e) {
|
|
444
|
-
let t = n.values(), r = t.length > 1;
|
|
445
|
-
n.interaction.pressedValues = r ? t.slice() : null, T = null, D = t;
|
|
446
|
-
let i = n.interaction.pressedThumbIndex, a = i;
|
|
447
|
-
if (i >= 0 && i < t.length) {
|
|
448
|
-
if (t[i] === n.max()) for (; a > 0 && t[a - 1] === n.max();) --a;
|
|
449
|
-
} else {
|
|
450
|
-
a = -1;
|
|
451
|
-
let t, r = n.orientation() === "vertical" ? "y" : "x";
|
|
452
|
-
for (let i = 0; i < n.orderedThumbs().length; i += 1) {
|
|
453
|
-
let o = n.orderedThumbs()[i], s = o?.element();
|
|
454
|
-
if (!s || o.input()?.disabled) continue;
|
|
455
|
-
let c = Math.abs(e[r] - oe(s, n.orientation() === "vertical"));
|
|
456
|
-
(t === void 0 || c <= t) && (t = c, a = i);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
if (a >= 0 && a !== i && j(a), n.inset()) {
|
|
460
|
-
let e = n.orderedThumbs()[a]?.element()?.getBoundingClientRect();
|
|
461
|
-
w = e ? (n.orientation() === "vertical" ? e.height : e.width) / 2 : 0;
|
|
462
|
-
} else w = 0;
|
|
463
|
-
}
|
|
464
|
-
function ie(e) {
|
|
465
|
-
let t = m(), r = n.values(), a = n.interaction.pressedThumbIndex;
|
|
466
|
-
if (!t || a < 0 || a >= r.length) return a >= r.length && (T = null), null;
|
|
467
|
-
let o = n.orientation() === "vertical", s = t.getBoundingClientRect(), c = xe(t.ownerDocument.defaultView?.getComputedStyle(t) ?? null, o), l = (o ? s.height : s.width) - c.start - c.end - w * 2, u = n.interaction.pressedThumbCenterOffset ?? 0, d = e.x - u, f = e.y - u, p = H(((o ? s.bottom - f - c.end : (i() === "rtl" ? s.right - d : d - s.left) - c.start) - w) / l, 0, 1), h = H(Y((n.max() - n.min()) * p + n.min(), n.step(), n.min()), n.min(), n.max());
|
|
468
|
-
return r.length <= 1 ? {
|
|
469
|
-
value: h,
|
|
470
|
-
thumbIndex: a,
|
|
471
|
-
didSwap: !1
|
|
472
|
-
} : be(n.thumbCollisionBehavior(), r, D, n.interaction.pressedValues, a, h, n.min(), n.max(), n.step(), n.minStepsBetweenValues());
|
|
473
|
-
}
|
|
474
|
-
function ae(e, t = !1) {
|
|
475
|
-
te(e)?.focus({
|
|
476
|
-
preventScroll: !0,
|
|
477
|
-
focusVisible: t
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
function R(e, t, r) {
|
|
481
|
-
let i = n.setValue(e.value, l(t, r, void 0, { activeThumbIndex: e.thumbIndex }));
|
|
482
|
-
return i && (T = e.value, D = Array.isArray(e.value) ? e.value : [e.value], e.didSwap && (j(e.thumbIndex), ae(e.thumbIndex))), i;
|
|
483
|
-
}
|
|
484
|
-
function z(e) {
|
|
485
|
-
let t = Q(e, S);
|
|
486
|
-
if (!t) return;
|
|
487
|
-
if (C += 1, e.type === "pointermove" && e.buttons === 0) {
|
|
488
|
-
B(e);
|
|
489
|
-
return;
|
|
490
|
-
}
|
|
491
|
-
let i = ie(t);
|
|
492
|
-
!i || !pe(i.value, n.step(), n.minStepsBetweenValues()) || (!n.dragging() && C > X && n.setDragging(!0), R(i, r, e));
|
|
493
|
-
}
|
|
494
|
-
function B(e) {
|
|
495
|
-
if ("changedTouches" in e && S != null && !Se(e, S)) return;
|
|
496
|
-
n.setActive(-1), n.setDragging(!1), n.interaction.pressedThumbCenterOffset = null;
|
|
497
|
-
let t = n.values();
|
|
498
|
-
Array.isArray(T) && T.length !== t.length && (T = null), T != null && n.onValueCommitted(T, u(n.interaction.lastChangeReason, e));
|
|
499
|
-
let r = m();
|
|
500
|
-
if ("pointerId" in e && r) try {
|
|
501
|
-
r.hasPointerCapture(e.pointerId) && r.releasePointerCapture(e.pointerId);
|
|
502
|
-
} catch {}
|
|
503
|
-
M(), S = null, O = null, fe();
|
|
504
|
-
}
|
|
505
|
-
function le(e) {
|
|
506
|
-
if (n.disabled()) return;
|
|
507
|
-
if (I(se(e))) {
|
|
508
|
-
M();
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
|
-
let t = e.changedTouches[0];
|
|
512
|
-
if (!t) return;
|
|
513
|
-
S = t.identifier;
|
|
514
|
-
let r = {
|
|
515
|
-
x: t.clientX,
|
|
516
|
-
y: t.clientY
|
|
517
|
-
};
|
|
518
|
-
ne(r);
|
|
519
|
-
let i = ie(r);
|
|
520
|
-
i && (ae(i.thumbIndex), R(i, a, e), C = 0, de(m()?.ownerDocument, "touch"));
|
|
521
|
-
}
|
|
522
|
-
function ue(e) {
|
|
523
|
-
let t = m(), r = se(e);
|
|
524
|
-
if (!t || n.disabled() || e.defaultPrevented || !r || e.button !== 0) return;
|
|
525
|
-
if (I(r)) {
|
|
526
|
-
M();
|
|
527
|
-
return;
|
|
528
|
-
}
|
|
529
|
-
let i = {
|
|
530
|
-
x: e.clientX,
|
|
531
|
-
y: e.clientY
|
|
532
|
-
};
|
|
533
|
-
ne(i);
|
|
534
|
-
let o = ie(i);
|
|
535
|
-
if (!o) return;
|
|
536
|
-
let s = Ce(t.ownerDocument);
|
|
537
|
-
if (ce(n.orderedThumbs()[o.thumbIndex]?.element(), s)) e.preventDefault();
|
|
538
|
-
else {
|
|
539
|
-
let e = t.ownerDocument.defaultView;
|
|
540
|
-
A !== void 0 && e?.cancelAnimationFrame(A), A = e?.requestAnimationFrame(() => ae(o.thumbIndex));
|
|
541
|
-
}
|
|
542
|
-
if (n.setDragging(!0), n.interaction.pressedThumbCenterOffset ?? R(o, a, e), e.pointerId) {
|
|
543
|
-
O = e.pointerId;
|
|
544
|
-
try {
|
|
545
|
-
t.setPointerCapture(e.pointerId);
|
|
546
|
-
} catch {}
|
|
547
|
-
}
|
|
548
|
-
C = 0, de(t.ownerDocument, "pointer");
|
|
549
|
-
}
|
|
550
|
-
function de(e, t) {
|
|
551
|
-
U(), e && (k = e, t === "touch" ? (e.addEventListener("touchmove", z, { passive: !0 }), e.addEventListener("touchend", B, { passive: !0 }), e.addEventListener("touchcancel", B, { passive: !0 })) : (e.addEventListener("pointermove", z, { passive: !0 }), e.addEventListener("pointerup", B), e.addEventListener("pointercancel", B)));
|
|
552
|
-
}
|
|
553
|
-
function fe() {
|
|
554
|
-
U(), n.interaction.pressedValues = null, T = null, D = null;
|
|
555
|
-
}
|
|
556
|
-
function U() {
|
|
557
|
-
let e = k;
|
|
558
|
-
e && (e.removeEventListener("pointermove", z), e.removeEventListener("pointerup", B), e.removeEventListener("pointercancel", B), e.removeEventListener("touchmove", z), e.removeEventListener("touchend", B), e.removeEventListener("touchcancel", B)), k = null;
|
|
559
|
-
}
|
|
560
|
-
let me = d(() => o.onPointerDown, () => ue), G = d(() => o.onTouchStart, () => le);
|
|
561
|
-
return N(m, (e) => {
|
|
562
|
-
if (n.setControlElement(e), !e) return;
|
|
563
|
-
let t = (t) => G.call(e, t);
|
|
564
|
-
return e.addEventListener("touchstart", t, { passive: !0 }), () => {
|
|
565
|
-
e.removeEventListener("touchstart", t), n.controlElement() === e && n.setControlElement(void 0);
|
|
566
|
-
};
|
|
567
|
-
}), N(n.disabled, (e) => {
|
|
568
|
-
e && (n.setDragging(!1), M(), fe());
|
|
569
|
-
}), re(() => {
|
|
570
|
-
let e = m()?.ownerDocument.defaultView;
|
|
571
|
-
if (A !== void 0 && e?.cancelAnimationFrame(A), O != null) try {
|
|
572
|
-
m()?.hasPointerCapture(O) && m()?.releasePointerCapture(O);
|
|
573
|
-
} catch {}
|
|
574
|
-
fe();
|
|
575
|
-
}), x(y, E({
|
|
576
|
-
get component() {
|
|
577
|
-
return e.as ?? "div";
|
|
578
|
-
},
|
|
579
|
-
ref: [((e) => h(e)), o.ref],
|
|
580
|
-
get class() {
|
|
581
|
-
return v();
|
|
582
|
-
},
|
|
583
|
-
get style() {
|
|
584
|
-
return b();
|
|
585
|
-
},
|
|
586
|
-
get "data-base-ui-slider-control"() {
|
|
587
|
-
return n.renderBeforeHydration() ? "" : void 0;
|
|
588
|
-
},
|
|
589
|
-
onPointerDown: me
|
|
590
|
-
}, ee, g));
|
|
591
|
-
}
|
|
592
|
-
function xe(e, t) {
|
|
593
|
-
let n = (e) => {
|
|
594
|
-
let t = e == null ? 0 : Number.parseFloat(e);
|
|
595
|
-
return Number.isNaN(t) ? 0 : t;
|
|
596
|
-
};
|
|
597
|
-
return e ? t ? {
|
|
598
|
-
start: n(e.borderTopWidth) + n(e.paddingTop),
|
|
599
|
-
end: n(e.borderBottomWidth) + n(e.paddingBottom)
|
|
600
|
-
} : {
|
|
601
|
-
start: n(e.borderInlineStartWidth) + n(e.paddingInlineStart),
|
|
602
|
-
end: n(e.borderInlineEndWidth) + n(e.paddingInlineEnd)
|
|
603
|
-
} : {
|
|
604
|
-
start: 0,
|
|
605
|
-
end: 0
|
|
606
|
-
};
|
|
607
|
-
}
|
|
608
|
-
function Q(e, t) {
|
|
609
|
-
if (t != null && "changedTouches" in e) {
|
|
610
|
-
for (let n of e.changedTouches) if (n.identifier === t) return {
|
|
611
|
-
x: n.clientX,
|
|
612
|
-
y: n.clientY
|
|
613
|
-
};
|
|
614
|
-
return null;
|
|
615
|
-
}
|
|
616
|
-
return {
|
|
617
|
-
x: e.clientX,
|
|
618
|
-
y: e.clientY
|
|
619
|
-
};
|
|
620
|
-
}
|
|
621
|
-
function Se(e, t) {
|
|
622
|
-
for (let n of e.changedTouches) if (n.identifier === t) return !0;
|
|
623
|
-
return !1;
|
|
624
|
-
}
|
|
625
|
-
function Ce(e) {
|
|
626
|
-
let t = e.activeElement;
|
|
627
|
-
for (; t?.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
|
|
628
|
-
return t;
|
|
629
|
-
}
|
|
630
|
-
//#endregion
|
|
631
|
-
//#region src/slider/track/SliderTrack.tsx
|
|
632
|
-
function we(e) {
|
|
633
|
-
let n = W(), r = e, i = L(e, "as", "class", "ref", "style"), a = P(() => n.state()), o = P(() => s(e.class, a())), l = P(() => v({ position: "relative" }, c(e.style, a()))), u = P(() => t(a(), V));
|
|
634
|
-
return x(y, E({
|
|
635
|
-
get component() {
|
|
636
|
-
return e.as ?? "div";
|
|
637
|
-
},
|
|
638
|
-
ref: [r.ref],
|
|
639
|
-
get class() {
|
|
640
|
-
return o();
|
|
641
|
-
},
|
|
642
|
-
get style() {
|
|
643
|
-
return l();
|
|
644
|
-
}
|
|
645
|
-
}, u, i));
|
|
646
|
-
}
|
|
647
|
-
//#endregion
|
|
648
|
-
//#region src/slider/thumb/SliderThumbDataAttributes.ts
|
|
649
|
-
var Te = /* @__PURE__ */ function(e) {
|
|
650
|
-
return e.index = "data-index", e.dragging = "data-dragging", e.orientation = "data-orientation", e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.focused = "data-focused", e;
|
|
651
|
-
}({}), Ee = /* @__PURE__ */ j("<input type=range>"), De = /* @__PURE__ */ j("<script>"), $ = /* @__PURE__ */ new Set([
|
|
652
|
-
"ArrowDown",
|
|
653
|
-
"ArrowLeft",
|
|
654
|
-
"ArrowRight",
|
|
655
|
-
"ArrowUp",
|
|
656
|
-
"End",
|
|
657
|
-
"Home",
|
|
658
|
-
"PageDown",
|
|
659
|
-
"PageUp"
|
|
660
|
-
]), Oe = /* @__PURE__ */ new Set([
|
|
661
|
-
"ArrowDown",
|
|
662
|
-
"ArrowLeft",
|
|
663
|
-
"ArrowRight",
|
|
664
|
-
"ArrowUp",
|
|
665
|
-
"End",
|
|
666
|
-
"Home"
|
|
667
|
-
]), ke = {
|
|
668
|
-
position: "fixed",
|
|
669
|
-
width: "1px",
|
|
670
|
-
height: "1px",
|
|
671
|
-
padding: "0",
|
|
672
|
-
margin: "-1px",
|
|
673
|
-
overflow: "hidden",
|
|
674
|
-
clip: "rect(0, 0, 0, 0)",
|
|
675
|
-
"white-space": "nowrap",
|
|
676
|
-
border: "0"
|
|
677
|
-
};
|
|
678
|
-
function Ae(e) {
|
|
679
|
-
let n = W(), r = m(!0), i = g(), a = f(), o = _(), l = e, u = e, p = `base-ui-${I()}`, h = `base-ui-${I()}`, ee = Symbol("SliderThumb"), [j, M] = F(), [ne, z] = F(), [B, se] = F(), [H, le] = F(w || ae.hydrating), pe = { innerHTML: "" }, U = !1, me, G = () => -1, he = P(() => n.range() ? h : n.singleInputId), ge = {
|
|
680
|
-
token: ee,
|
|
681
|
-
order: 0,
|
|
682
|
-
element: j,
|
|
683
|
-
input: ne,
|
|
684
|
-
inputId: he,
|
|
685
|
-
index: () => G()
|
|
686
|
-
}, _e = n.registerThumb(ge), ve = P(() => n.orderedThumbs().indexOf(ge)), K = P(() => n.range() ? l.index ?? ve() : 0);
|
|
687
|
-
G = K;
|
|
688
|
-
let ye = L(u, "aria-describedby", "aria-label", "aria-labelledby", "aria-valuetext", "as", "children", "class", "disabled", "getAriaLabel", "getAriaValueText", "id", "index", "inputRef", "onBlur", "onFocus", "onKeyDown", "onPointerDown", "ref", "style", "tabIndex"), q = P(() => n.values()[K()]), be = P(() => ue(q(), n.min(), n.max())), J = n.range, X = P(() => n.orientation() === "vertical"), Z = P(() => n.disabled() || (l.disabled ?? !1)), xe = P(() => K() === n.values().length - 1), Q = P(() => n.state()), Se = P(() => s(e.class, Q())), Ce = P(() => {
|
|
689
|
-
let e = be();
|
|
690
|
-
if (!n.inset() && !Number.isFinite(e)) return ke;
|
|
691
|
-
let t = n.lastUsedThumbIndex() >= 0 && n.lastUsedThumbIndex() < n.values().length ? n.lastUsedThumbIndex() : -1, r;
|
|
692
|
-
return J() ? n.active() === K() ? r = 2 : t === K() && (r = 1) : n.active() === K() && (r = 1), {
|
|
693
|
-
position: "absolute",
|
|
694
|
-
[X() ? "bottom" : "inset-inline-start"]: n.inset() ? "var(--position)" : `${e}%`,
|
|
695
|
-
[X() ? "left" : "top"]: "50%",
|
|
696
|
-
translate: `${(X() || a() !== "rtl" ? -1 : 1) * 50}% ${(X() ? 1 : -1) * 50}%`,
|
|
697
|
-
"z-index": r,
|
|
698
|
-
...n.inset() ? {
|
|
699
|
-
"--position": `${B() ?? 0}%`,
|
|
700
|
-
visibility: n.renderBeforeHydration() && H() || B() === void 0 ? "hidden" : void 0
|
|
701
|
-
} : {}
|
|
702
|
-
};
|
|
703
|
-
}), we = P(() => v(Ce(), c(e.style, Q()))), Ae = P(() => t(Q(), V)), Ne = P(() => ({ [Te.index]: String(K()) })), Pe = P(() => de(q(), n.locale(), n.format())), Fe = P(() => typeof l.getAriaLabel == "function" ? l.getAriaLabel(K()) : l["aria-label"]), Ie = P(() => {
|
|
704
|
-
let e = q();
|
|
705
|
-
if (!(e === void 0 || K() < 0)) return typeof l.getAriaValueText == "function" ? l.getAriaValueText(Pe(), e, K()) : l["aria-valuetext"] === void 0 ? n.values().length === 2 ? `${Pe()} ${K() === 0 ? "start" : "end"} range` : n.format() ? Pe() : void 0 : l["aria-valuetext"];
|
|
706
|
-
}), Le = P(() => ({
|
|
707
|
-
...ke,
|
|
708
|
-
width: "100%",
|
|
709
|
-
height: "100%",
|
|
710
|
-
"writing-mode": X() ? a() === "rtl" ? "vertical-rl" : "vertical-lr" : void 0
|
|
711
|
-
}));
|
|
712
|
-
function Re() {
|
|
713
|
-
if (!n.inset()) return;
|
|
714
|
-
let e = n.controlElement(), t = j();
|
|
715
|
-
if (!e || !t) return;
|
|
716
|
-
let r = t.getBoundingClientRect(), i = e.getBoundingClientRect(), a = X() ? "height" : "width", o = i[a] - r[a], s = (r[a] / 2 + o * be() / 100) / i[a] * 100, c = Number.isFinite(s) ? s : void 0;
|
|
717
|
-
se(c), K() === 0 ? n.setIndicatorPosition(0, c) : xe() && n.setIndicatorPosition(1, c);
|
|
718
|
-
}
|
|
719
|
-
function ze(e) {
|
|
720
|
-
let t = U;
|
|
721
|
-
if (U = !1, n.setActive(K()), r.setFocused(!0), t) {
|
|
722
|
-
e.stopPropagation();
|
|
723
|
-
return;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
function Be(e) {
|
|
727
|
-
if (U) {
|
|
728
|
-
e.stopPropagation();
|
|
729
|
-
return;
|
|
730
|
-
}
|
|
731
|
-
if (n.setActive(-1), !n.orderedThumbs().some((t) => ce(t.element(), e.relatedTarget)) && (r.setTouched(!0), r.setFocused(!1), r.validationMode() === "onBlur")) {
|
|
732
|
-
let e = q();
|
|
733
|
-
e !== void 0 && r.validation.commit(fe(e, K(), n.min(), n.max(), J(), n.values()));
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
function Ve(e) {
|
|
737
|
-
if (Z() || e.defaultPrevented || !$.has(e.key)) return;
|
|
738
|
-
Oe.has(e.key) && e.stopPropagation();
|
|
739
|
-
let t = q();
|
|
740
|
-
if (t === void 0) return;
|
|
741
|
-
let r = null, i = 0, o = e.shiftKey ? n.largeStep() : n.step(), s = Y(t, n.step(), n.min());
|
|
742
|
-
switch (e.key) {
|
|
743
|
-
case "ArrowUp":
|
|
744
|
-
i = 1;
|
|
745
|
-
break;
|
|
746
|
-
case "ArrowRight":
|
|
747
|
-
i = a() === "rtl" ? -1 : 1;
|
|
748
|
-
break;
|
|
749
|
-
case "ArrowDown":
|
|
750
|
-
i = -1;
|
|
751
|
-
break;
|
|
752
|
-
case "ArrowLeft":
|
|
753
|
-
i = a() === "rtl" ? 1 : -1;
|
|
754
|
-
break;
|
|
755
|
-
case "PageUp":
|
|
756
|
-
o = n.largeStep(), i = 1;
|
|
757
|
-
break;
|
|
758
|
-
case "PageDown":
|
|
759
|
-
o = n.largeStep(), i = -1;
|
|
760
|
-
break;
|
|
761
|
-
case "End":
|
|
762
|
-
r = J() && Number.isFinite(n.values()[K() + 1]) ? n.values()[K() + 1] - n.step() * n.minStepsBetweenValues() : n.max();
|
|
763
|
-
break;
|
|
764
|
-
case "Home": r = J() && Number.isFinite(n.values()[K() - 1]) ? n.values()[K() - 1] + n.step() * n.minStepsBetweenValues() : n.min();
|
|
765
|
-
}
|
|
766
|
-
if (i !== 0 && (r = je(s, o, i, n.min(), n.max())), r === null) return;
|
|
767
|
-
let c = ne();
|
|
768
|
-
c && !Me(c) && (U = !0, c.blur(), c.focus({
|
|
769
|
-
preventScroll: !0,
|
|
770
|
-
focusVisible: !0
|
|
771
|
-
})), n.handleInputChange(r, K(), e), e.preventDefault();
|
|
772
|
-
}
|
|
773
|
-
function He(e) {
|
|
774
|
-
Z() || (n.interaction.pressedThumbIndex = K(), n.interaction.pressedThumbCenterOffset = (X() ? e.clientY : e.clientX) - oe(e.currentTarget, X()));
|
|
775
|
-
}
|
|
776
|
-
function Ue(e) {
|
|
777
|
-
if (Z()) {
|
|
778
|
-
queueMicrotask(n.syncInputs);
|
|
779
|
-
return;
|
|
780
|
-
}
|
|
781
|
-
n.handleInputChange(e.currentTarget.valueAsNumber, K(), e);
|
|
782
|
-
}
|
|
783
|
-
function We(e) {
|
|
784
|
-
me = e.currentTarget.valueAsNumber, Ue(e);
|
|
785
|
-
}
|
|
786
|
-
function Ge(e) {
|
|
787
|
-
if (me === e.currentTarget.valueAsNumber) {
|
|
788
|
-
me = void 0;
|
|
789
|
-
return;
|
|
790
|
-
}
|
|
791
|
-
Ue(e);
|
|
792
|
-
}
|
|
793
|
-
let Ke = d(() => U ? void 0 : l.onFocus, () => ze), qe = d(() => U ? void 0 : l.onBlur, () => Be), Je = d(() => l.onKeyDown, () => Ve), Ye = d(() => l.onPointerDown, () => He);
|
|
794
|
-
return N(() => ({
|
|
795
|
-
control: n.controlElement(),
|
|
796
|
-
inset: n.inset(),
|
|
797
|
-
percent: be(),
|
|
798
|
-
thumb: j()
|
|
799
|
-
}), (e) => {
|
|
800
|
-
if (!e.inset || !e.control || !e.thumb) return;
|
|
801
|
-
queueMicrotask(() => R(Re)), R(Re);
|
|
802
|
-
let t = e.control.ownerDocument.defaultView?.ResizeObserver;
|
|
803
|
-
if (!t) return;
|
|
804
|
-
let n = new t(Re);
|
|
805
|
-
return n.observe(e.control), n.observe(e.thumb), () => n.disconnect();
|
|
806
|
-
}), N(ne, (e) => {
|
|
807
|
-
if (e) return r.validation.registerInput(n.fieldControlSource, e, () => e);
|
|
808
|
-
}), ie(() => {
|
|
809
|
-
le(!1);
|
|
810
|
-
}), re(_e), x(y, E({
|
|
811
|
-
get component() {
|
|
812
|
-
return e.as ?? "div";
|
|
813
|
-
},
|
|
814
|
-
ref: [((e) => {
|
|
815
|
-
M(e);
|
|
816
|
-
let t = Number.parseFloat(e.style.getPropertyValue("--position"));
|
|
817
|
-
Number.isFinite(t) && se(t);
|
|
818
|
-
}), l.ref],
|
|
819
|
-
get id() {
|
|
820
|
-
return l.id ?? p;
|
|
821
|
-
},
|
|
822
|
-
get class() {
|
|
823
|
-
return Se();
|
|
824
|
-
},
|
|
825
|
-
get style() {
|
|
826
|
-
return we();
|
|
827
|
-
},
|
|
828
|
-
onPointerDown: Ye
|
|
829
|
-
}, Ne, Ae, ye, { get children() {
|
|
830
|
-
return [
|
|
831
|
-
T(() => l.children),
|
|
832
|
-
(() => {
|
|
833
|
-
var e = C(Ee);
|
|
834
|
-
return b(e, "keydown", Je, !0), b(e, "blur", qe), b(e, "focus", Ke), e.addEventListener("change", Ge), e.$$input = We, D(() => [((e) => z(e)), l.inputRef], e), S(() => ({
|
|
835
|
-
e: he(),
|
|
836
|
-
t: n.name(),
|
|
837
|
-
a: n.form(),
|
|
838
|
-
o: n.min(),
|
|
839
|
-
i: n.max(),
|
|
840
|
-
n: n.step(),
|
|
841
|
-
s: q() ?? "",
|
|
842
|
-
h: Z(),
|
|
843
|
-
r: l.tabIndex,
|
|
844
|
-
d: Le(),
|
|
845
|
-
l: Fe(),
|
|
846
|
-
u: l["aria-labelledby"] ?? (Fe() == null ? n.labelId() : void 0),
|
|
847
|
-
c: i.getAriaDescribedBy(l["aria-describedby"]),
|
|
848
|
-
w: n.orientation(),
|
|
849
|
-
m: q(),
|
|
850
|
-
f: Ie(),
|
|
851
|
-
y: Q().valid === !1 && !Z() ? "true" : void 0
|
|
852
|
-
}), ({ e: t, t: n, a: r, o: i, i: a, n: o, s, h: c, r: l, d: u, l: d, u: f, c: p, w: m, m: h, f: g, y: _ }, v) => {
|
|
853
|
-
t !== v?.e && k(e, "id", t), n !== v?.t && k(e, "name", n), r !== v?.a && k(e, "form", r), i !== v?.o && k(e, "min", i), a !== v?.i && k(e, "max", a), o !== v?.n && k(e, "step", o), e.value = s ?? "", c !== v?.h && k(e, "disabled", c), l !== v?.r && k(e, "tabindex", l), te(e, u, v?.d), d !== v?.l && k(e, "aria-label", d), f !== v?.u && k(e, "aria-labelledby", f), p !== v?.c && k(e, "aria-describedby", p), m !== v?.w && k(e, "aria-orientation", m), h !== v?.m && k(e, "aria-valuenow", h), g !== v?.f && k(e, "aria-valuetext", g), _ !== v?.y && k(e, "aria-invalid", _);
|
|
854
|
-
}), O(), e;
|
|
855
|
-
})(),
|
|
856
|
-
T(() => T(() => !!(n.inset() && xe() && n.renderBeforeHydration() && H()))() ? (() => {
|
|
857
|
-
var e = C(De);
|
|
858
|
-
return A(e, E({ get nonce() {
|
|
859
|
-
return o.nonce();
|
|
860
|
-
} }, pe), !1), O(), e;
|
|
861
|
-
})() : n.inset() && xe() && n.renderBeforeHydration() && H())
|
|
862
|
-
];
|
|
863
|
-
} }));
|
|
864
|
-
}
|
|
865
|
-
function je(e, t, n, r, i) {
|
|
866
|
-
let a = e + t * n;
|
|
867
|
-
return H(Number(a.toFixed(Math.max(J(e), J(t), J(r)))), r, i);
|
|
868
|
-
}
|
|
869
|
-
function Me(e) {
|
|
870
|
-
try {
|
|
871
|
-
return e.matches(":focus-visible");
|
|
872
|
-
} catch {
|
|
873
|
-
return !1;
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
ee(["input", "keydown"]);
|
|
877
|
-
//#endregion
|
|
878
|
-
//#region src/slider/indicator/SliderIndicator.tsx
|
|
879
|
-
function Ne(e) {
|
|
880
|
-
let n = W(), r = e, i = e, [a, o] = F(w || ae.hydrating), l = L(i, "as", "class", "ref", "style"), u = P(() => n.state()), d = P(() => s(e.class, u())), f = P(() => {
|
|
881
|
-
let e = n.values(), t = n.orientation() === "vertical", r = e.length > 1, i = n.indicatorPosition(), o = n.inset() ? i[0] : ue(e[0], n.min(), n.max()), s = n.inset() ? i[1] : ue(e[e.length - 1], n.min(), n.max()), c = `${o ?? 0}%`, l = `${(s ?? 0) - (o ?? 0)}%`, u = {
|
|
882
|
-
visibility: n.inset() && n.renderBeforeHydration() && a() || n.inset() && (o === void 0 || r && s === void 0) ? "hidden" : void 0,
|
|
883
|
-
position: t ? "absolute" : "relative",
|
|
884
|
-
[t ? "width" : "height"]: "inherit"
|
|
885
|
-
};
|
|
886
|
-
return n.inset() && (u["--start-position"] = c, c = "var(--start-position)", r && (u["--relative-size"] = l, l = "var(--relative-size)")), u[t ? "bottom" : "inset-inline-start"] = r ? c : 0, u[t ? "height" : "width"] = r ? l : c, u;
|
|
887
|
-
}), p = P(() => v(f(), c(e.style, u()))), m = P(() => t(u(), V));
|
|
888
|
-
return ie(() => {
|
|
889
|
-
o(!1);
|
|
890
|
-
}), x(y, E({
|
|
891
|
-
get component() {
|
|
892
|
-
return e.as ?? "div";
|
|
893
|
-
},
|
|
894
|
-
ref: [((e) => {
|
|
895
|
-
let t = Number.parseFloat(e.style.getPropertyValue("--start-position")), r = Number.parseFloat(e.style.getPropertyValue("--relative-size"));
|
|
896
|
-
Number.isFinite(t) && n.setIndicatorPosition(0, t), Number.isFinite(t) && Number.isFinite(r) && n.setIndicatorPosition(1, t + r);
|
|
897
|
-
}), r.ref],
|
|
898
|
-
get class() {
|
|
899
|
-
return d();
|
|
900
|
-
},
|
|
901
|
-
get style() {
|
|
902
|
-
return p();
|
|
903
|
-
},
|
|
904
|
-
get "data-base-ui-slider-indicator"() {
|
|
905
|
-
return n.renderBeforeHydration() ? "" : void 0;
|
|
906
|
-
}
|
|
907
|
-
}, m, l));
|
|
908
|
-
}
|
|
909
|
-
//#endregion
|
|
910
|
-
//#region src/slider/index.parts.ts
|
|
911
|
-
var Pe = /* @__PURE__ */ e({
|
|
912
|
-
Control: () => Z,
|
|
913
|
-
Indicator: () => Ne,
|
|
914
|
-
Label: () => K,
|
|
915
|
-
Root: () => G,
|
|
916
|
-
Thumb: () => Ae,
|
|
917
|
-
Track: () => we,
|
|
918
|
-
Value: () => ye
|
|
919
|
-
});
|
|
920
|
-
//#endregion
|
|
921
|
-
export { Pe as t };
|