solid-baseui 0.1.0-alpha.0 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -0
- package/README.md +133 -15
- package/dist/lib/client/DialogHandle-DluOK_7u.js +521 -0
- package/dist/lib/client/DialogPopup-CfEb3F54.js +138 -0
- package/dist/lib/client/FieldControl-eDe-Jnp9.js +142 -0
- package/dist/lib/client/{FieldRootContext-izCEh80D.js → FieldRootContext-D3fuVjs3.js} +1 -1
- package/dist/lib/client/{FocusManager-grSdNHqW.js → FocusManager-q7z7PMV1.js} +94 -91
- package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
- package/dist/lib/client/{InternalBackdrop-cSK13gaM.js → InternalBackdrop-B8_lfUvf.js} +1 -1
- package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
- package/dist/lib/client/MenuSubmenuTrigger-DMb5CwTF.js +1584 -0
- package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-DyX5gY1e.js} +17 -11
- package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-BjRwcvbG.js} +138 -115
- package/dist/lib/client/PopupViewport-BanYHrD-.js +154 -0
- package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
- package/dist/lib/client/TriggerFocusGuards-Fzspp3Y1.js +51 -0
- package/dist/lib/client/accordion/index.js +1 -1
- package/dist/lib/client/accordion-CA2DfX67.js +381 -0
- package/dist/lib/client/alert-dialog/index.js +1 -1
- package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-Bup88Dpx.js} +2 -2
- package/dist/lib/client/autocomplete/index.js +1 -1
- package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-oyy_uRpU.js} +30 -25
- package/dist/lib/client/avatar/index.js +1 -1
- package/dist/lib/client/avatar-DNZ4fnBd.js +191 -0
- package/dist/lib/client/button/index.js +1 -1
- package/dist/lib/client/button-BJZYmCVv.js +88 -0
- package/dist/lib/client/checkbox/index.js +1 -1
- package/dist/lib/client/checkbox-group/index.js +1 -1
- package/dist/lib/client/checkbox-group-DGyrciZJ.js +135 -0
- package/dist/lib/client/checkbox-sQHYTbpB.js +425 -0
- package/dist/lib/client/collapsible/index.js +1 -1
- package/dist/lib/client/collapsible-BENbFFCc.js +230 -0
- package/dist/lib/client/combobox/index.js +2 -2
- package/dist/lib/client/combobox-BGH8QLXH.js +401 -0
- package/dist/lib/client/compositeNavigation-DCt1sQon.js +82 -0
- package/dist/lib/client/{constants-BYjBUIIi.js → constants-ByOMFJAe.js} +105 -101
- package/dist/lib/client/context-menu/index.js +1 -1
- package/dist/lib/client/context-menu-xQ1sBCET.js +220 -0
- package/dist/lib/client/{createAnchorPositioning-DcxDXUgB.js → createAnchorPositioning-DCXIApS1.js} +149 -146
- package/dist/lib/client/{createAnchoredPopupScrollLock-Cx0cbh1_.js → createAnchoredPopupScrollLock-BxKpJbCE.js} +2 -2
- package/dist/lib/client/{createClickInteraction-CTaIFBiV.js → createClickInteraction-BeBsTqtY.js} +1 -1
- package/dist/lib/client/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
- package/dist/lib/client/createFocusInteraction-DQPWkZe2.js +60 -0
- package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
- package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-CSNpMz5v.js} +4 -4
- package/dist/lib/client/{createTransitionStatus-B1L-whed.js → createTransitionStatus-BL_cPSEA.js} +12 -12
- package/dist/lib/client/dialog/index.js +1 -1
- package/dist/lib/client/{dialog-DkaQwIgP.js → dialog-C0EF0a5u.js} +2 -2
- package/dist/lib/client/{dom-BEAeQ9Eb.js → dom-lDdayFF_.js} +25 -15
- package/dist/lib/client/drawer/index.js +1 -1
- package/dist/lib/client/drawer-uKoNBwDU.js +1540 -0
- package/dist/lib/client/field/index.js +1 -1
- package/dist/lib/client/field-DIMrgpBW.js +483 -0
- package/dist/lib/client/fieldset/index.js +1 -1
- package/dist/lib/client/fieldset-Byqk3noT.js +70 -0
- package/dist/lib/client/form/index.js +1 -1
- package/dist/lib/client/form-Bqq8wSLY.js +109 -0
- package/dist/lib/client/index.js +44 -42
- package/dist/lib/client/input/index.js +1 -1
- package/dist/lib/client/{input-gb0ejxkm.js → input-YthuKwIE.js} +1 -1
- package/dist/lib/client/internals/composeEventHandlers.js +14 -8
- package/dist/lib/client/internals/field-root-context/index.js +2 -2
- package/dist/lib/client/internals/form-context/index.js +1 -1
- package/dist/lib/client/internals/labelable-provider/index.js +1 -1
- package/dist/lib/client/{mergeStyleValue-C4ITiiIV.js → isSolidAccessor-BH_FevwH.js} +8 -15
- package/dist/lib/client/menu/index.js +1 -1
- package/dist/lib/client/menu-4rNLN6aX.js +334 -0
- package/dist/lib/client/menubar/index.js +1 -1
- package/dist/lib/client/menubar-nFQGtNmY.js +163 -0
- package/dist/lib/client/mergeStyleValue-Dcd36yxZ.js +12 -0
- package/dist/lib/client/meter/index.js +1 -1
- package/dist/lib/client/meter-BvWdppcx.js +178 -0
- package/dist/lib/client/navigation-menu/index.js +1 -1
- package/dist/lib/client/navigation-menu-BbRyun3a.js +1070 -0
- package/dist/lib/client/number-field/index.js +1 -1
- package/dist/lib/client/number-field-hT_H0hVu.js +1043 -0
- package/dist/lib/client/otp-field/index.js +1 -1
- package/dist/lib/client/otp-field-lsy2iGID.js +584 -0
- package/dist/lib/client/popover/index.js +1 -1
- package/dist/lib/client/popover-Cmvmuf1L.js +940 -0
- package/dist/lib/client/popupStateMapping-nhukB8NK.js +371 -0
- package/dist/lib/client/preview-card/index.js +1 -1
- package/dist/lib/client/preview-card-Dtu8AnBN.js +632 -0
- package/dist/lib/client/progress/index.js +1 -1
- package/dist/lib/client/progress-AVKxvgpc.js +195 -0
- package/dist/lib/client/radio/index.js +1 -1
- package/dist/lib/client/radio-CeCU-Qqi.js +284 -0
- package/dist/lib/client/radio-group/index.js +1 -1
- package/dist/lib/client/radio-group-NbuJvjQe.js +195 -0
- package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
- package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DVAR5dQD.js} +74 -70
- package/dist/lib/client/scroll-area/index.js +1 -1
- package/dist/lib/client/scroll-area-DqbvoAd7.js +717 -0
- package/dist/lib/client/{scrollable-SRNYlhF7.js → scrollable-BVaDUXng.js} +12 -12
- package/dist/lib/client/select/index.js +1 -1
- package/dist/lib/client/select-Dad51Xbn.js +1934 -0
- package/dist/lib/client/separator/index.js +1 -1
- package/dist/lib/client/slider/index.js +1 -1
- package/dist/lib/client/slider-CLSKFq_M.js +927 -0
- package/dist/lib/client/switch/index.js +1 -1
- package/dist/lib/client/switch-Bzuu5EIg.js +306 -0
- package/dist/lib/client/tabs/index.js +1 -1
- package/dist/lib/client/tabs-DWiBDv8D.js +695 -0
- package/dist/lib/client/toast/index.js +1 -1
- package/dist/lib/client/toast-DmtPJW2k.js +1118 -0
- package/dist/lib/client/toggle/index.js +1 -1
- package/dist/lib/client/toggle-CAe-Z8Xn.js +142 -0
- package/dist/lib/client/toggle-group/index.js +1 -1
- package/dist/lib/client/toggle-group-BbQg5s-m.js +134 -0
- package/dist/lib/client/toolbar/index.js +1 -1
- package/dist/lib/client/toolbar-BXT_g-oX.js +504 -0
- package/dist/lib/client/tooltip/index.js +1 -1
- package/dist/lib/client/tooltip-h2r2_Xuo.js +850 -0
- package/dist/lib/client/use-render/index.js +2 -0
- package/dist/lib/client/useFilteredItems-BX0BEuSI.js +2301 -0
- package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
- package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-BGIISmG7.js} +37 -46
- package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-C2ZDGf42.js} +12 -15
- package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-CDMMyvuj.js} +62 -26
- package/dist/lib/server/{FieldRootContext-IC-LWzVp.js → FieldRootContext-Bfpna6gA.js} +3 -3
- package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-D-xgblGs.js} +9 -5
- package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
- package/dist/lib/server/{InternalBackdrop-C_iDPVR-.js → InternalBackdrop-D_2zAWnl.js} +1 -1
- package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
- package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-BMQKlOvU.js} +177 -210
- package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-QNj4mED2.js} +14 -5
- package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-evylvVnN.js} +42 -15
- package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-BDttjORN.js} +38 -28
- package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
- package/dist/lib/server/TriggerFocusGuards-B9GNbLrL.js +61 -0
- package/dist/lib/server/accordion/index.js +39 -77
- package/dist/lib/server/alert-dialog/index.js +2 -2
- package/dist/lib/server/autocomplete/index.js +14 -5
- package/dist/lib/server/avatar/index.js +90 -51
- package/dist/lib/server/button/index.js +14 -15
- package/dist/lib/server/checkbox/index.js +37 -64
- package/dist/lib/server/checkbox-group/index.js +21 -11
- package/dist/lib/server/collapsible/index.js +42 -49
- package/dist/lib/server/combobox/index.js +79 -50
- package/dist/lib/server/{compositeNavigation-BRVT1C38.js → compositeNavigation-D5jKM4yk.js} +32 -1
- package/dist/lib/server/{constants-9H__9xbS.js → constants-ByqXubhO.js} +10 -5
- package/dist/lib/server/context-menu/index.js +14 -16
- package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-DrQYe7RS.js} +12 -7
- package/dist/lib/server/{createAnchoredPopupScrollLock-DFuUrykR.js → createAnchoredPopupScrollLock-q6gnOSmv.js} +2 -2
- package/dist/lib/server/{createClickInteraction-BYsMgvup.js → createClickInteraction-D7oc1Vco.js} +1 -1
- package/dist/lib/server/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
- package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DFKr4G7a.js} +22 -2
- package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
- package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-Cg0-lLf4.js} +2 -2
- package/dist/lib/server/{createTransitionStatus-BTlrerSS.js → createTransitionStatus-184v7j3-.js} +2 -2
- package/dist/lib/server/dialog/index.js +2 -2
- package/dist/lib/server/{dom-Crg_2R-j.js → dom-D8_aB1yy.js} +14 -1
- package/dist/lib/server/drawer/index.js +96 -100
- package/dist/lib/server/field/index.js +110 -98
- package/dist/lib/server/fieldset/index.js +13 -16
- package/dist/lib/server/form/index.js +18 -14
- package/dist/lib/server/index.js +5 -3
- package/dist/lib/server/input/index.js +1 -1
- package/dist/lib/server/internals/composeEventHandlers.js +15 -9
- package/dist/lib/server/internals/field-root-context/index.js +1 -1
- package/dist/lib/server/internals/form-context/index.js +1 -1
- package/dist/lib/server/internals/labelable-provider/index.js +1 -1
- package/dist/lib/server/{mergeStyleValue-Db8bRCM4.js → isSolidAccessor-CZpzAH5l.js} +7 -21
- package/dist/lib/server/menu/index.js +30 -29
- package/dist/lib/server/menubar/index.js +10 -35
- package/dist/lib/server/mergeStyleValue-DecVaoac.js +20 -0
- package/dist/lib/server/meter/index.js +20 -32
- package/dist/lib/server/navigation-menu/index.js +67 -138
- package/dist/lib/server/number-field/index.js +64 -62
- package/dist/lib/server/otp-field/index.js +19 -22
- package/dist/lib/server/popover/index.js +61 -77
- package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-VHqr6M4H.js} +19 -17
- package/dist/lib/server/preview-card/index.js +39 -50
- package/dist/lib/server/progress/index.js +21 -33
- package/dist/lib/server/radio/index.js +24 -45
- package/dist/lib/server/radio-group/index.js +12 -13
- package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
- package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-B8QtiIZ3.js} +6 -1
- package/dist/lib/server/scroll-area/index.js +40 -49
- package/dist/lib/server/{scrollable-CjsSxbGr.js → scrollable-C9Pgq8T5.js} +1 -1
- package/dist/lib/server/select/index.js +128 -213
- package/dist/lib/server/separator/index.js +1 -1
- package/dist/lib/server/slider/index.js +39 -52
- package/dist/lib/server/switch/index.js +22 -32
- package/dist/lib/server/tabs/index.js +197 -137
- package/dist/lib/server/toast/index.js +78 -95
- package/dist/lib/server/toggle/index.js +11 -13
- package/dist/lib/server/toggle-group/index.js +11 -9
- package/dist/lib/server/toolbar/index.js +76 -93
- package/dist/lib/server/tooltip/index.js +53 -57
- package/dist/lib/server/use-render/index.js +2 -0
- package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-BmhL0nf1.js} +335 -316
- package/dist/lib/server/useRender-CryVdCjs.js +16 -0
- package/dist/lib/types/accordion/header/AccordionHeader.d.ts +1 -1
- package/dist/lib/types/accordion/item/AccordionItem.d.ts +1 -1
- package/dist/lib/types/accordion/panel/AccordionPanel.d.ts +1 -1
- package/dist/lib/types/accordion/root/AccordionRoot.d.ts +2 -7
- package/dist/lib/types/accordion/trigger/AccordionTrigger.d.ts +7 -7
- package/dist/lib/types/alert-dialog/trigger/AlertDialogTrigger.d.ts +1 -2
- package/dist/lib/types/autocomplete/trigger/AutocompleteTrigger.d.ts +1 -0
- package/dist/lib/types/avatar/fallback/AvatarFallback.d.ts +2 -2
- package/dist/lib/types/avatar/image/AvatarImage.d.ts +9 -3
- package/dist/lib/types/avatar/image/createImageLoadingStatus.d.ts +3 -2
- package/dist/lib/types/avatar/root/AvatarRoot.d.ts +1 -1
- package/dist/lib/types/button/Button.d.ts +1 -1
- package/dist/lib/types/checkbox-group/CheckboxGroupContext.d.ts +4 -1
- package/dist/lib/types/collapsible/panel/CollapsiblePanel.d.ts +1 -1
- package/dist/lib/types/collapsible/root/CollapsibleRoot.d.ts +1 -1
- package/dist/lib/types/collapsible/trigger/CollapsibleTrigger.d.ts +1 -1
- package/dist/lib/types/combobox/chip/ComboboxChip.d.ts +2 -0
- package/dist/lib/types/combobox/index.d.ts +2 -0
- package/dist/lib/types/combobox/index.parts.d.ts +1 -0
- package/dist/lib/types/combobox/items/createItems.d.ts +42 -0
- package/dist/lib/types/combobox/root/AriaCombobox.d.ts +4 -0
- package/dist/lib/types/combobox/root/ComboboxRoot.d.ts +17 -8
- package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
- package/dist/lib/types/combobox/store/ComboboxStore.d.ts +1 -0
- package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
- package/dist/lib/types/combobox/utils/handleInputPress.d.ts +1 -1
- package/dist/lib/types/dialog/backdrop/DialogBackdrop.d.ts +1 -1
- package/dist/lib/types/dialog/description/DialogDescription.d.ts +1 -1
- package/dist/lib/types/dialog/title/DialogTitle.d.ts +1 -1
- package/dist/lib/types/dialog/viewport/DialogViewport.d.ts +1 -1
- package/dist/lib/types/drawer/backdrop/DrawerBackdrop.d.ts +1 -1
- package/dist/lib/types/drawer/content/DrawerContent.d.ts +1 -1
- package/dist/lib/types/drawer/indent/DrawerIndent.d.ts +1 -1
- package/dist/lib/types/drawer/indent-background/DrawerIndentBackground.d.ts +1 -1
- package/dist/lib/types/field/control/FieldControl.d.ts +5 -5
- package/dist/lib/types/field/root/FieldRoot.d.ts +1 -1
- package/dist/lib/types/field/root/createFieldValidation.d.ts +3 -2
- package/dist/lib/types/fieldset/legend/FieldsetLegend.d.ts +1 -1
- package/dist/lib/types/fieldset/root/FieldsetRoot.d.ts +1 -1
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/internals/composeEventHandlers.d.ts +9 -2
- package/dist/lib/types/internals/createTransitionStatus.d.ts +1 -1
- package/dist/lib/types/internals/field-root-context/FieldRootContext.d.ts +1 -0
- package/dist/lib/types/internals/form-context/FormContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/LabelableContext.d.ts +1 -0
- package/dist/lib/types/internals/labelable-provider/createLabelableId.d.ts +3 -0
- package/dist/lib/types/internals/overlay/PopupPortal.d.ts +4 -2
- package/dist/lib/types/internals/overlay/createPopupPresence.d.ts +1 -0
- package/dist/lib/types/internals/overlay/dom.d.ts +2 -0
- package/dist/lib/types/menu/root/MenuRootContext.d.ts +1 -0
- package/dist/lib/types/meter/indicator/MeterIndicator.d.ts +1 -1
- package/dist/lib/types/meter/label/MeterLabel.d.ts +1 -1
- package/dist/lib/types/meter/root/MeterRoot.d.ts +1 -1
- package/dist/lib/types/meter/track/MeterTrack.d.ts +1 -1
- package/dist/lib/types/meter/value/MeterValue.d.ts +1 -1
- package/dist/lib/types/navigation-menu/trigger/NavigationMenuTrigger.d.ts +1 -0
- package/dist/lib/types/number-field/input/NumberFieldInput.d.ts +5 -5
- package/dist/lib/types/number-field/root/NumberFieldRootContext.d.ts +1 -0
- package/dist/lib/types/popover/arrow/PopoverArrow.d.ts +1 -1
- package/dist/lib/types/popover/backdrop/PopoverBackdrop.d.ts +1 -1
- package/dist/lib/types/popover/description/PopoverDescription.d.ts +1 -1
- package/dist/lib/types/popover/positioner/PopoverPositioner.d.ts +1 -1
- package/dist/lib/types/popover/title/PopoverTitle.d.ts +1 -1
- package/dist/lib/types/preview-card/arrow/PreviewCardArrow.d.ts +1 -1
- package/dist/lib/types/preview-card/backdrop/PreviewCardBackdrop.d.ts +1 -1
- package/dist/lib/types/preview-card/positioner/PreviewCardPositioner.d.ts +1 -1
- package/dist/lib/types/progress/indicator/ProgressIndicator.d.ts +1 -1
- package/dist/lib/types/progress/label/ProgressLabel.d.ts +1 -1
- package/dist/lib/types/progress/root/ProgressRoot.d.ts +1 -1
- package/dist/lib/types/progress/track/ProgressTrack.d.ts +1 -1
- package/dist/lib/types/progress/value/ProgressValue.d.ts +1 -1
- package/dist/lib/types/radio/indicator/RadioIndicator.d.ts +2 -2
- package/dist/lib/types/scroll-area/content/ScrollAreaContent.d.ts +1 -1
- package/dist/lib/types/scroll-area/corner/ScrollAreaCorner.d.ts +1 -1
- package/dist/lib/types/scroll-area/root/ScrollAreaRoot.d.ts +1 -1
- package/dist/lib/types/scroll-area/scrollbar/ScrollAreaScrollbar.d.ts +2 -1
- package/dist/lib/types/scroll-area/thumb/ScrollAreaThumb.d.ts +1 -1
- package/dist/lib/types/scroll-area/viewport/ScrollAreaViewport.d.ts +1 -1
- package/dist/lib/types/separator/Separator.d.ts +1 -1
- package/dist/lib/types/slider/track/SliderTrack.d.ts +2 -2
- package/dist/lib/types/tabs/indicator/prehydrationScript.d.ts +1 -1
- package/dist/lib/types/tabs/list/TabsList.d.ts +1 -1
- package/dist/lib/types/tabs/panel/TabsPanel.d.ts +1 -1
- package/dist/lib/types/tabs/root/TabsRoot.d.ts +1 -1
- package/dist/lib/types/tabs/tab/TabsTab.d.ts +1 -1
- package/dist/lib/types/toast/createToastManager.d.ts +2 -2
- package/dist/lib/types/toast/store/ToastStore.d.ts +1 -1
- package/dist/lib/types/toast/useToastManager.d.ts +1 -1
- package/dist/lib/types/toggle/Toggle.d.ts +1 -1
- package/dist/lib/types/toggle-group/ToggleGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/group/ToolbarGroup.d.ts +1 -1
- package/dist/lib/types/toolbar/link/ToolbarLink.d.ts +10 -3
- package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +10 -4
- package/dist/lib/types/toolbar/separator/ToolbarSeparator.d.ts +1 -1
- package/dist/lib/types/tooltip/arrow/TooltipArrow.d.ts +1 -1
- package/dist/lib/types/tooltip/positioner/TooltipPositioner.d.ts +1 -1
- package/dist/lib/types/types/index.d.ts +7 -3
- package/dist/lib/types/use-render/index.d.ts +2 -0
- package/dist/lib/types/use-render/useRender.d.ts +10 -0
- package/package.json +24 -11
- package/dist/lib/client/DialogHandle-DrN2YWCv.js +0 -518
- package/dist/lib/client/DialogPopup-ZlqmGfdk.js +0 -136
- package/dist/lib/client/FieldControl-Bc-z2og6.js +0 -116
- package/dist/lib/client/MenuSubmenuTrigger-QZkQ0F2v.js +0 -1570
- package/dist/lib/client/PopupViewport-DgrIqQea.js +0 -152
- package/dist/lib/client/Separator-9DboD_Si.js +0 -25
- package/dist/lib/client/TriggerFocusGuards-CQ-JuASy.js +0 -56
- package/dist/lib/client/accordion-sOXt9AlG.js +0 -399
- package/dist/lib/client/avatar-AF9vyD4q.js +0 -146
- package/dist/lib/client/button-DpUi-2g8.js +0 -82
- package/dist/lib/client/checkbox-BbAwOptH.js +0 -441
- package/dist/lib/client/checkbox-group-CSSp_805.js +0 -128
- package/dist/lib/client/collapsible-BIbje_ub.js +0 -232
- package/dist/lib/client/combobox-8O-vgTLL.js +0 -352
- package/dist/lib/client/compositeNavigation-sxniYTc7.js +0 -58
- package/dist/lib/client/context-menu-BTMkXtrs.js +0 -217
- package/dist/lib/client/createFocusInteraction-D4w1-235.js +0 -50
- package/dist/lib/client/drawer-Ce2cChLt.js +0 -1550
- package/dist/lib/client/field-C-o7jzKW.js +0 -469
- package/dist/lib/client/fieldset-BQTAWv2L.js +0 -65
- package/dist/lib/client/form-BINBiW5L.js +0 -106
- package/dist/lib/client/menu-DeMT08oD.js +0 -326
- package/dist/lib/client/menubar-C4aomSYv.js +0 -185
- package/dist/lib/client/meter-xSU37Q0m.js +0 -171
- package/dist/lib/client/navigation-menu-ZILQmdn6.js +0 -1083
- package/dist/lib/client/number-field-B8CsTb_8.js +0 -1035
- package/dist/lib/client/otp-field-DBkMcnog.js +0 -582
- package/dist/lib/client/popover-CQwyp-fs.js +0 -929
- package/dist/lib/client/popupStateMapping-C9eZl19i.js +0 -367
- package/dist/lib/client/preview-card-D_2Q8lpC.js +0 -625
- package/dist/lib/client/progress-D7r0xAC9.js +0 -188
- package/dist/lib/client/radio-CzGQ81z1.js +0 -299
- package/dist/lib/client/radio-group-DpHlBKA6.js +0 -193
- package/dist/lib/client/runOnceAnimationsFinish-15EM-Z4l.js +0 -48
- package/dist/lib/client/scroll-area-CffM4U0R.js +0 -701
- package/dist/lib/client/select-IFhiEg73.js +0 -1940
- package/dist/lib/client/slider-BCagYmGp.js +0 -921
- package/dist/lib/client/switch-RIJeDnvS.js +0 -308
- package/dist/lib/client/tabs-fOAKs7r3.js +0 -696
- package/dist/lib/client/toast-D2P8UqUs.js +0 -1108
- package/dist/lib/client/toggle-group-0Aue0owJ.js +0 -129
- package/dist/lib/client/toggle-momVEIBL.js +0 -138
- package/dist/lib/client/toolbar-Du22aKCv.js +0 -492
- package/dist/lib/client/tooltip-CyK61fl1.js +0 -844
- package/dist/lib/client/useFilteredItems-DTekHz39.js +0 -2223
- package/dist/lib/client/withoutComponentBinding-CcCW7fSc.js +0 -13
- package/dist/lib/server/TriggerFocusGuards-sbGwf45f.js +0 -63
- package/dist/lib/server/withoutComponentBinding-BHaWr5kU.js +0 -20
- package/dist/lib/types/internals/withoutComponentBinding.d.ts +0 -7
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { merge as e, untrack as t } from "solid-js";
|
|
2
|
+
//#region src/use-render/useRender.ts
|
|
3
|
+
function n(n, r, i) {
|
|
4
|
+
return (a) => {
|
|
5
|
+
let o = t(() => n.render);
|
|
6
|
+
if (!o) return t(() => i(a));
|
|
7
|
+
let s = e(r);
|
|
8
|
+
return t(() => o(a, s));
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as t };
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { t as useRender } from "./useRender-CryVdCjs.js";
|
|
1
2
|
import { getStateAttributesProps } from "./internals/getStateAttributesProps.js";
|
|
2
3
|
import { N as triggerPress, d as imperativeAction, i as closePress } from "./internals/reasons.js";
|
|
3
4
|
import { n as resolveClass, t as resolveStyle } from "./resolveStyle-XCSFDHAL.js";
|
|
4
5
|
import { createChangeEventDetails } from "./internals/createBaseUIEventDetails.js";
|
|
5
6
|
import { transitionStatusMapping } from "./internals/stateAttributesMapping.js";
|
|
6
|
-
import { composeEventHandlers } from "./internals/composeEventHandlers.js";
|
|
7
|
-
import {
|
|
8
|
-
import { n as createScrollLock, t as InternalBackdrop } from "./InternalBackdrop-
|
|
7
|
+
import { composeEventHandlers, liveEventHandler } from "./internals/composeEventHandlers.js";
|
|
8
|
+
import { i as getEventTarget, n as contains, o as isElement } from "./dom-D8_aB1yy.js";
|
|
9
|
+
import { n as createScrollLock, t as InternalBackdrop } from "./InternalBackdrop-D_2zAWnl.js";
|
|
9
10
|
import { c as useFloatingTree, i as createFloatingNode, n as FloatingTreeContext, r as FloatingTreeStore, s as useFloatingParentNodeId, t as FloatingParentNodeContext } from "./FloatingTree-z1JPD1dR.js";
|
|
10
|
-
import { a as createPopupPresence, n as createTriggerRegistration, o as createDismiss, t as PopupStore } from "./PopupStore-
|
|
11
|
-
import { a as triggerOpenStateMapping, o as PopupPortal } from "./popupStateMapping-
|
|
12
|
-
import { i as createPopupHandleStore, n as DetachedPopupStore, r as attachPopupHandle, t as BasePopupHandle } from "./PopupHandle-
|
|
13
|
-
import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "./buttonSemantics-BSwDxJhh.js";
|
|
11
|
+
import { a as createPopupPresence, n as createTriggerRegistration, o as createDismiss, t as PopupStore } from "./PopupStore-evylvVnN.js";
|
|
12
|
+
import { a as triggerOpenStateMapping, o as PopupPortal } from "./popupStateMapping-VHqr6M4H.js";
|
|
13
|
+
import { i as createPopupHandleStore, n as DetachedPopupStore, r as attachPopupHandle, t as BasePopupHandle } from "./PopupHandle-QNj4mED2.js";
|
|
14
14
|
import { t as setRef } from "./setRef-Bt70sW7c.js";
|
|
15
|
-
import {
|
|
15
|
+
import { a as stopButtonInteraction, i as preventDisabledButtonKeyDown, n as handleNonNativeButtonKeyUp, r as preventButtonInteraction, t as handleNonNativeButtonKeyDown } from "./buttonSemantics-BSwDxJhh.js";
|
|
16
|
+
import { escape, memo, mergeProps, ssrElement } from "@solidjs/web";
|
|
16
17
|
import { $REFRESH, Show, createContext, createEffect, createMemo, createSignal, createUniqueId, omit, onCleanup, untrack, useContext } from "solid-js";
|
|
17
18
|
//#region src/dialog/store/DialogStore.ts
|
|
18
19
|
var DialogStore = class extends PopupStore {
|
|
@@ -309,22 +310,20 @@ function DialogClose(props) {
|
|
|
309
310
|
const disabled = createMemo(() => internalProps.disabled ?? false);
|
|
310
311
|
const nativeButton = createMemo(() => internalProps.nativeButton ?? true);
|
|
311
312
|
const state = createMemo(() => ({ disabled: disabled() }));
|
|
313
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true));
|
|
312
314
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
313
315
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
314
316
|
const stateAttributes = createMemo(() => getStateAttributesProps(state()));
|
|
315
|
-
const others = omit(allProps, "
|
|
317
|
+
const others = omit(allProps, "render", "class", "disabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
|
|
316
318
|
function handleClick(event) {
|
|
317
319
|
if (context.store.open()) context.store.setOpen(false, createChangeEventDetails(closePress, event));
|
|
318
320
|
}
|
|
319
|
-
const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onClick,
|
|
320
|
-
const onPointerDown = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onPointerDown);
|
|
321
|
-
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown);
|
|
322
|
-
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown));
|
|
323
|
-
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
324
|
-
return
|
|
325
|
-
get component() {
|
|
326
|
-
return props.as ?? "button";
|
|
327
|
-
},
|
|
321
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onClick), handleClick);
|
|
322
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onPointerDown));
|
|
323
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onMouseDown));
|
|
324
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0)), liveEventHandler(() => internalProps.onKeyDown), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown)));
|
|
325
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp)));
|
|
326
|
+
return Render(mergeProps({
|
|
328
327
|
ref: [internalProps.ref],
|
|
329
328
|
get type() {
|
|
330
329
|
return nativeButton() ? "button" : void 0;
|
|
@@ -366,17 +365,15 @@ function DialogDescription(props) {
|
|
|
366
365
|
const generatedId = `base-ui-${createUniqueId()}`;
|
|
367
366
|
const id = createMemo(() => internalProps.id || generatedId);
|
|
368
367
|
const state = {};
|
|
368
|
+
const Render = useRender(props, () => state, (props) => ssrElement("p", props, void 0, true));
|
|
369
369
|
const classValue = createMemo(() => resolveClass(props.class, state));
|
|
370
370
|
const styleValue = createMemo(() => resolveStyle(props.style, state));
|
|
371
|
-
const others = omit(allProps, "
|
|
371
|
+
const others = omit(allProps, "render", "class", "id", "ref", "style");
|
|
372
372
|
createEffect(() => id(), (current) => {
|
|
373
373
|
context.setDescriptionId(current);
|
|
374
374
|
return () => context.setDescriptionId((existing) => existing === current ? void 0 : existing);
|
|
375
375
|
});
|
|
376
|
-
return
|
|
377
|
-
get component() {
|
|
378
|
-
return props.as ?? "p";
|
|
379
|
-
},
|
|
376
|
+
return Render(mergeProps({
|
|
380
377
|
ref: [internalProps.ref],
|
|
381
378
|
get id() {
|
|
382
379
|
return id();
|
|
@@ -410,7 +407,7 @@ function DialogPortal(props) {
|
|
|
410
407
|
const state = {};
|
|
411
408
|
const classValue = createMemo(() => resolveClass(props.class, state));
|
|
412
409
|
const styleValue = createMemo(() => resolveStyle(props.style, state));
|
|
413
|
-
const others = omit(allProps, "
|
|
410
|
+
const others = omit(allProps, "render", "class", "container", "keepMounted", "ref", "style");
|
|
414
411
|
const portalContext = { keepMounted };
|
|
415
412
|
function DialogInternalBackdrop() {
|
|
416
413
|
let element = null;
|
|
@@ -436,8 +433,8 @@ function DialogPortal(props) {
|
|
|
436
433
|
value: portalContext,
|
|
437
434
|
get children() {
|
|
438
435
|
return PopupPortal(mergeProps({
|
|
439
|
-
get
|
|
440
|
-
return props.
|
|
436
|
+
get render() {
|
|
437
|
+
return props.render;
|
|
441
438
|
},
|
|
442
439
|
get container() {
|
|
443
440
|
return internalProps.container;
|
|
@@ -480,17 +477,15 @@ function DialogTitle(props) {
|
|
|
480
477
|
const generatedId = `base-ui-${createUniqueId()}`;
|
|
481
478
|
const id = createMemo(() => internalProps.id || generatedId);
|
|
482
479
|
const state = {};
|
|
480
|
+
const Render = useRender(props, () => state, (props) => ssrElement("h2", props, void 0, true));
|
|
483
481
|
const classValue = createMemo(() => resolveClass(props.class, state));
|
|
484
482
|
const styleValue = createMemo(() => resolveStyle(props.style, state));
|
|
485
|
-
const others = omit(allProps, "
|
|
483
|
+
const others = omit(allProps, "render", "class", "id", "ref", "style");
|
|
486
484
|
createEffect(() => id(), (current) => {
|
|
487
485
|
context.setTitleId(current);
|
|
488
486
|
return () => context.setTitleId((existing) => existing === current ? void 0 : existing);
|
|
489
487
|
});
|
|
490
|
-
return
|
|
491
|
-
get component() {
|
|
492
|
-
return props.as ?? "h2";
|
|
493
|
-
},
|
|
488
|
+
return Render(mergeProps({
|
|
494
489
|
ref: [internalProps.ref],
|
|
495
490
|
get id() {
|
|
496
491
|
return id();
|
|
@@ -526,10 +521,11 @@ function DialogTrigger(props) {
|
|
|
526
521
|
disabled: disabled(),
|
|
527
522
|
open: open()
|
|
528
523
|
}));
|
|
524
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("button", props, void 0, true));
|
|
529
525
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
530
526
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
531
527
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), triggerOpenStateMapping));
|
|
532
|
-
const others = omit(allProps, "
|
|
528
|
+
const others = omit(allProps, "render", "class", "disabled", "handle", "id", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "payload", "ref", "style");
|
|
533
529
|
let pointerType = "";
|
|
534
530
|
let clickPointerType = "";
|
|
535
531
|
createTriggerRegistration(store, id, element, () => ({ payload: internalProps.payload }));
|
|
@@ -555,15 +551,12 @@ function DialogTrigger(props) {
|
|
|
555
551
|
const currentTarget = event.currentTarget;
|
|
556
552
|
if (popup && currentTarget && popup.ownerDocument !== currentTarget.ownerDocument && typeof rootHandler === "function") rootHandler(event);
|
|
557
553
|
}
|
|
558
|
-
const onClick = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0),
|
|
559
|
-
const onPointerDown = composeEventHandlers(() => untrack(() => disabled() ? preventButtonInteraction : void 0), () => internalProps.onPointerDown,
|
|
560
|
-
const onMouseDown = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onMouseDown);
|
|
561
|
-
const onKeyDown = composeEventHandlers(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0), () => internalProps.onKeyDown,
|
|
562
|
-
const onKeyUp = composeEventHandlers(() => untrack(() => disabled() ? stopButtonInteraction : void 0), () => internalProps.onKeyUp, () => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp));
|
|
563
|
-
return
|
|
564
|
-
get component() {
|
|
565
|
-
return props.as ?? "button";
|
|
566
|
-
},
|
|
554
|
+
const onClick = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), prepareClick, liveEventHandler(() => internalProps.onClick), handleClick);
|
|
555
|
+
const onPointerDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventButtonInteraction : void 0)), liveEventHandler(() => internalProps.onPointerDown), handlePointerDown);
|
|
556
|
+
const onMouseDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onMouseDown));
|
|
557
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? preventDisabledButtonKeyDown : void 0)), liveEventHandler(() => internalProps.onKeyDown), handleKeyDown, liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyDown)));
|
|
558
|
+
const onKeyUp = composeEventHandlers(liveEventHandler(() => untrack(() => disabled() ? stopButtonInteraction : void 0)), liveEventHandler(() => internalProps.onKeyUp), liveEventHandler(() => untrack(() => nativeButton() ? void 0 : handleNonNativeButtonKeyUp)));
|
|
559
|
+
return Render(mergeProps({
|
|
567
560
|
ref: [((value) => setElement(value)), internalProps.ref],
|
|
568
561
|
get id() {
|
|
569
562
|
return id();
|
|
@@ -618,13 +611,14 @@ function DialogViewport(props) {
|
|
|
618
611
|
const portal = useDialogPortalContext();
|
|
619
612
|
const context = useDialogRootContext();
|
|
620
613
|
const internalProps = props;
|
|
621
|
-
const others = omit(props, "
|
|
614
|
+
const others = omit(props, "render", "class", "ref", "style");
|
|
622
615
|
const state = createMemo(() => ({
|
|
623
616
|
open: context.store.open(),
|
|
624
617
|
transitionStatus: context.store.track().transitionStatus,
|
|
625
618
|
nested: context.nested,
|
|
626
619
|
nestedDialogOpen: context.nestedOpenDialogCount() > 0
|
|
627
620
|
}));
|
|
621
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
628
622
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
629
623
|
const styleValue = createMemo(() => mergeDialogStyles({ "pointer-events": context.store.open() ? void 0 : "none" }, resolveStyle(props.style, state())));
|
|
630
624
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), dialogStateAttributesMapping));
|
|
@@ -638,10 +632,7 @@ function DialogViewport(props) {
|
|
|
638
632
|
return shouldRender();
|
|
639
633
|
},
|
|
640
634
|
get children() {
|
|
641
|
-
return
|
|
642
|
-
get component() {
|
|
643
|
-
return props.as ?? "div";
|
|
644
|
-
},
|
|
635
|
+
return Render(mergeProps({
|
|
645
636
|
ref: [((element) => {
|
|
646
637
|
viewportElement = element;
|
|
647
638
|
context.setViewportElement(element);
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
import { t as useRender } from "./useRender-CryVdCjs.js";
|
|
1
2
|
import { getStateAttributesProps } from "./internals/getStateAttributesProps.js";
|
|
2
3
|
import { n as resolveClass, t as resolveStyle } from "./resolveStyle-XCSFDHAL.js";
|
|
3
|
-
import { composeEventHandlers } from "./internals/composeEventHandlers.js";
|
|
4
|
-
import { t as FocusManager } from "./FocusManager-
|
|
5
|
-
import { d as dialogTransitionStateAttributesMapping, f as mergeDialogStyles, h as useDialogRootContext, s as useDialogPortalContext, u as dialogStateAttributesMapping } from "./DialogHandle-
|
|
6
|
-
import {
|
|
4
|
+
import { composeEventHandlers, liveEventHandler } from "./internals/composeEventHandlers.js";
|
|
5
|
+
import { t as FocusManager } from "./FocusManager-D-xgblGs.js";
|
|
6
|
+
import { d as dialogTransitionStateAttributesMapping, f as mergeDialogStyles, h as useDialogRootContext, s as useDialogPortalContext, u as dialogStateAttributesMapping } from "./DialogHandle-BGIISmG7.js";
|
|
7
|
+
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
7
8
|
import { Show, createEffect, createMemo, omit, onCleanup } from "solid-js";
|
|
8
9
|
//#region src/dialog/backdrop/DialogBackdrop.tsx
|
|
9
10
|
/** An overlay displayed beneath the dialog popup. */
|
|
10
11
|
function DialogBackdrop(props) {
|
|
11
12
|
const context = useDialogRootContext();
|
|
12
13
|
const internalProps = props;
|
|
13
|
-
const others = omit(props, "
|
|
14
|
+
const others = omit(props, "render", "class", "forceRender", "ref", "style");
|
|
14
15
|
const state = createMemo(() => ({
|
|
15
16
|
open: context.store.open(),
|
|
16
17
|
transitionStatus: context.store.track().transitionStatus
|
|
17
18
|
}));
|
|
19
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
18
20
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
19
21
|
const styleValue = createMemo(() => mergeDialogStyles({
|
|
20
22
|
"user-select": "none",
|
|
@@ -27,10 +29,7 @@ function DialogBackdrop(props) {
|
|
|
27
29
|
onCleanup(() => {
|
|
28
30
|
if (context.backdropElement() === backdropElement) context.setBackdropElement(null);
|
|
29
31
|
});
|
|
30
|
-
return
|
|
31
|
-
get component() {
|
|
32
|
-
return props.as ?? "div";
|
|
33
|
-
},
|
|
32
|
+
return Render(mergeProps({
|
|
34
33
|
ref: [((element) => {
|
|
35
34
|
backdropElement = element;
|
|
36
35
|
context.setBackdropElement(element);
|
|
@@ -71,19 +70,20 @@ function DialogPopup(props) {
|
|
|
71
70
|
useDialogPortalContext();
|
|
72
71
|
const context = useDialogRootContext();
|
|
73
72
|
const internalProps = props;
|
|
74
|
-
const others = omit(props, "
|
|
73
|
+
const others = omit(props, "render", "class", "finalFocus", "id", "initialFocus", "onKeyDown", "ref", "style");
|
|
75
74
|
const state = createMemo(() => ({
|
|
76
75
|
open: context.store.open(),
|
|
77
76
|
transitionStatus: context.store.track().transitionStatus,
|
|
78
77
|
nested: context.nested,
|
|
79
78
|
nestedDialogOpen: context.nestedOpenDialogCount() > 0
|
|
80
79
|
}));
|
|
80
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("div", props, void 0, true));
|
|
81
81
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
82
82
|
const styleValue = createMemo(() => mergeDialogStyles({ "--nested-dialogs": context.nestedOpenDialogCount() }, resolveStyle(props.style, state())));
|
|
83
83
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), dialogStateAttributesMapping));
|
|
84
84
|
const id = createMemo(() => internalProps.id ?? context.store.context.floatingId);
|
|
85
85
|
const initialFocus = createMemo(() => internalProps.initialFocus ?? ((interactionType) => interactionType === "touch" ? context.store.state.popupElement : true));
|
|
86
|
-
const onKeyDown = composeEventHandlers(() => internalProps.onKeyDown, (
|
|
86
|
+
const onKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown), (event) => {
|
|
87
87
|
if (COMPOSITE_KEYS.has(event.key)) event.stopPropagation();
|
|
88
88
|
});
|
|
89
89
|
let popupElement = null;
|
|
@@ -93,10 +93,7 @@ function DialogPopup(props) {
|
|
|
93
93
|
onCleanup(() => {
|
|
94
94
|
if (context.store.state.popupElement === popupElement) context.store.setPopupElement(null);
|
|
95
95
|
});
|
|
96
|
-
const popup =
|
|
97
|
-
get component() {
|
|
98
|
-
return props.as ?? "div";
|
|
99
|
-
},
|
|
96
|
+
const popup = Render(mergeProps({
|
|
100
97
|
ref: [((element) => {
|
|
101
98
|
popupElement = element;
|
|
102
99
|
context.store.setPopupElement(element);
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { t as useRender } from "./useRender-CryVdCjs.js";
|
|
1
2
|
import { getStateAttributesProps } from "./internals/getStateAttributesProps.js";
|
|
2
3
|
import { w as none } from "./internals/reasons.js";
|
|
3
4
|
import { n as resolveClass, t as resolveStyle } from "./resolveStyle-XCSFDHAL.js";
|
|
4
5
|
import { createChangeEventDetails } from "./internals/createBaseUIEventDetails.js";
|
|
5
|
-
import { composeEventHandlers } from "./internals/composeEventHandlers.js";
|
|
6
|
+
import { composeEventHandlers, liveEventHandler } from "./internals/composeEventHandlers.js";
|
|
6
7
|
import { fieldStateAttributesMapping } from "./internals/field-constants.js";
|
|
7
|
-
import {
|
|
8
|
-
import { n as useFormContext } from "./FormContext-
|
|
9
|
-
import { r as useLabelableContext } from "./LabelableContext-
|
|
10
|
-
import {
|
|
8
|
+
import { r as useFieldRootContext } from "./FieldRootContext-Bfpna6gA.js";
|
|
9
|
+
import { n as useFormContext } from "./FormContext-CYwo_ZnB.js";
|
|
10
|
+
import { r as useLabelableContext } from "./LabelableContext-BTeF0IWb.js";
|
|
11
|
+
import { t as createLabelableId } from "./createLabelableId-WMUKtY6s.js";
|
|
12
|
+
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
11
13
|
import { createEffect, createMemo, createSignal, createUniqueId, omit, onCleanup, onSettled, untrack } from "solid-js";
|
|
12
14
|
//#region src/field/control/FieldControl.tsx
|
|
13
15
|
/** The native field control. Renders an `<input>` by default. */
|
|
@@ -19,11 +21,16 @@ function FieldControl(props) {
|
|
|
19
21
|
const allProps = props;
|
|
20
22
|
const source = Symbol("FieldControl");
|
|
21
23
|
let initialized = false;
|
|
22
|
-
const
|
|
24
|
+
const controlled = untrack(() => internalProps.value !== void 0);
|
|
25
|
+
const serializedValue = () => internalProps.value == null ? void 0 : String(internalProps.value);
|
|
26
|
+
let previousValue = untrack(serializedValue);
|
|
27
|
+
let enterTimeout;
|
|
28
|
+
let disposed = false;
|
|
29
|
+
const controlId = labelable.defaultControlId;
|
|
23
30
|
const fallbackId = typeof controlId === "string" ? controlId : `base-ui-${createUniqueId()}`;
|
|
24
31
|
const [element, setElement] = createSignal();
|
|
25
|
-
const others = omit(allProps, "aria-describedby", "aria-labelledby", "
|
|
26
|
-
const id =
|
|
32
|
+
const others = omit(allProps, "aria-describedby", "aria-labelledby", "render", "autofocus", "class", "defaultValue", "disabled", "id", "name", "onBlur", "onFocus", "onInput", "onKeyDown", "onValueChange", "ref", "style", "value");
|
|
33
|
+
const id = createLabelableId(() => internalProps.id, fallbackId);
|
|
27
34
|
const disabled = createMemo(() => field.disabled() || (internalProps.disabled ?? false));
|
|
28
35
|
const name = createMemo(() => field.name() ?? internalProps.name);
|
|
29
36
|
const state = createMemo(() => ({
|
|
@@ -31,10 +38,11 @@ function FieldControl(props) {
|
|
|
31
38
|
disabled: disabled()
|
|
32
39
|
}));
|
|
33
40
|
const classValue = createMemo(() => resolveClass(props.class, state()));
|
|
41
|
+
const Render = useRender(props, () => state(), (props) => ssrElement("input", props, void 0, true));
|
|
34
42
|
const styleValue = createMemo(() => resolveStyle(props.style, state()));
|
|
35
43
|
const stateAttributes = createMemo(() => getStateAttributesProps(state(), fieldStateAttributesMapping));
|
|
36
44
|
const currentValue = () => {
|
|
37
|
-
if (internalProps.value !== void 0) return
|
|
45
|
+
if (internalProps.value !== void 0) return serializedValue();
|
|
38
46
|
const currentElement = element();
|
|
39
47
|
return isNativeFieldControl(currentElement) ? currentElement.value : internalProps.defaultValue;
|
|
40
48
|
};
|
|
@@ -49,10 +57,10 @@ function FieldControl(props) {
|
|
|
49
57
|
getValue: getFormValue,
|
|
50
58
|
getControl: () => element() ?? null
|
|
51
59
|
};
|
|
52
|
-
const callExternalInput = composeEventHandlers(() => internalProps.onInput);
|
|
53
|
-
const callExternalFocus = composeEventHandlers(() => internalProps.onFocus);
|
|
54
|
-
const callExternalBlur = composeEventHandlers(() => internalProps.onBlur);
|
|
55
|
-
const callExternalKeyDown = composeEventHandlers(() => internalProps.onKeyDown);
|
|
60
|
+
const callExternalInput = composeEventHandlers(liveEventHandler(() => internalProps.onInput));
|
|
61
|
+
const callExternalFocus = composeEventHandlers(liveEventHandler(() => internalProps.onFocus));
|
|
62
|
+
const callExternalBlur = composeEventHandlers(liveEventHandler(() => internalProps.onBlur));
|
|
63
|
+
const callExternalKeyDown = composeEventHandlers(liveEventHandler(() => internalProps.onKeyDown));
|
|
56
64
|
function setControlElement(value) {
|
|
57
65
|
setElement(value);
|
|
58
66
|
if (initialized || !isNativeFieldControl(value)) return;
|
|
@@ -68,10 +76,18 @@ function FieldControl(props) {
|
|
|
68
76
|
callExternalInput.call(event.currentTarget, event);
|
|
69
77
|
if (event.baseUIHandlerPrevented) return;
|
|
70
78
|
const value = readElementValue(event.currentTarget);
|
|
71
|
-
|
|
79
|
+
const details = createChangeEventDetails(none, event);
|
|
80
|
+
internalProps.onValueChange?.(value, details);
|
|
81
|
+
if (controlled) {
|
|
82
|
+
const input = event.currentTarget;
|
|
83
|
+
queueMicrotask(() => {
|
|
84
|
+
if (!disposed && isNativeFieldControl(input)) input.value = serializedValue() ?? "";
|
|
85
|
+
});
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
72
88
|
field.setDirty(value !== (field.validityData().initialValue ?? ""));
|
|
73
89
|
field.setFilled(value !== "");
|
|
74
|
-
if (!event.defaultPrevented) {
|
|
90
|
+
if (!event.defaultPrevented && !details.isCanceled) {
|
|
75
91
|
form.clearError(name());
|
|
76
92
|
field.validation.change(value);
|
|
77
93
|
}
|
|
@@ -86,14 +102,29 @@ function FieldControl(props) {
|
|
|
86
102
|
if (event.baseUIHandlerPrevented) return;
|
|
87
103
|
field.setTouched(true);
|
|
88
104
|
field.setFocused(false);
|
|
89
|
-
if (field.validationMode() === "onBlur")
|
|
105
|
+
if (field.validationMode() === "onBlur") {
|
|
106
|
+
const value = readElementValue(event.currentTarget);
|
|
107
|
+
field.validation.commit(value);
|
|
108
|
+
if (controlled) queueMicrotask(() => {
|
|
109
|
+
if (disposed) return;
|
|
110
|
+
const next = serializedValue();
|
|
111
|
+
if (next !== void 0 && next !== value && next !== (field.validityData().initialValue ?? "")) field.validation.commit(next);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
90
114
|
}
|
|
91
115
|
function handleKeyDown(event) {
|
|
92
116
|
callExternalKeyDown.call(event.currentTarget, event);
|
|
93
117
|
if (event.baseUIHandlerPrevented) return;
|
|
94
118
|
if (event.currentTarget.tagName === "INPUT" && event.key === "Enter") {
|
|
95
119
|
field.setTouched(true);
|
|
96
|
-
|
|
120
|
+
const input = event.currentTarget;
|
|
121
|
+
if (input.form && input.form === form.formElement() && !event.defaultPrevented) {
|
|
122
|
+
const count = form.submitCount();
|
|
123
|
+
clearTimeout(enterTimeout);
|
|
124
|
+
enterTimeout = setTimeout(() => {
|
|
125
|
+
if (form.submitCount() === count) field.validation.commit(input.value);
|
|
126
|
+
}, 0);
|
|
127
|
+
} else field.validation.commit(input.value);
|
|
97
128
|
}
|
|
98
129
|
}
|
|
99
130
|
createEffect(() => ({
|
|
@@ -105,28 +136,33 @@ function FieldControl(props) {
|
|
|
105
136
|
registration.id = current.id;
|
|
106
137
|
registration.name = current.name;
|
|
107
138
|
field.registerFieldControl(source, current.disabled || !current.element ? void 0 : registration);
|
|
108
|
-
labelable.registerControlId(source, current.element ? current.id : void 0);
|
|
109
139
|
});
|
|
110
140
|
createEffect(() => element(), (currentElement) => {
|
|
111
141
|
if (!isNativeFieldControl(currentElement)) return;
|
|
112
142
|
return field.validation.registerInput(source, currentElement, () => untrack(() => element() ?? null));
|
|
113
143
|
});
|
|
114
|
-
createEffect(() =>
|
|
115
|
-
if (value !== void 0)
|
|
116
|
-
|
|
144
|
+
createEffect(serializedValue, (value) => untrack(() => {
|
|
145
|
+
if (value !== void 0) {
|
|
146
|
+
field.setFilled(value !== "");
|
|
147
|
+
if (value !== previousValue) {
|
|
148
|
+
previousValue = value;
|
|
149
|
+
form.clearError(name());
|
|
150
|
+
field.setDirty(value !== (field.validityData().initialValue ?? ""));
|
|
151
|
+
field.validation.change(value);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
117
155
|
onSettled(() => {
|
|
118
156
|
const currentElement = element();
|
|
119
157
|
if (isNativeFieldControl(currentElement)) field.setFilled(currentElement.value !== "");
|
|
120
158
|
if (internalProps.autofocus && currentElement?.ownerDocument.activeElement === currentElement) field.setFocused(true);
|
|
121
159
|
});
|
|
122
160
|
onCleanup(() => {
|
|
161
|
+
disposed = true;
|
|
162
|
+
clearTimeout(enterTimeout);
|
|
123
163
|
field.registerFieldControl(source, void 0);
|
|
124
|
-
labelable.registerControlId(source, void 0);
|
|
125
164
|
});
|
|
126
|
-
return
|
|
127
|
-
get component() {
|
|
128
|
-
return props.as ?? "input";
|
|
129
|
-
},
|
|
165
|
+
return Render(mergeProps({
|
|
130
166
|
ref: [setControlElement, internalProps.ref],
|
|
131
167
|
get id() {
|
|
132
168
|
return id();
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_FIELD_STATE, DEFAULT_VALIDITY_DATA } from "./internals/field-co
|
|
|
2
2
|
import { createContext, useContext } from "solid-js";
|
|
3
3
|
//#region src/internals/field-root-context/FieldRootContext.ts
|
|
4
4
|
var MISSING_CONTEXT = Symbol("FieldRootContext");
|
|
5
|
-
var
|
|
5
|
+
var DEFAULT_FIELD_ROOT_CONTEXT = {
|
|
6
6
|
state: () => DEFAULT_FIELD_STATE,
|
|
7
7
|
validityData: () => DEFAULT_VALIDITY_DATA,
|
|
8
8
|
name: () => void 0,
|
|
@@ -27,8 +27,8 @@ var FieldRootContext = createContext(MISSING_CONTEXT);
|
|
|
27
27
|
function useFieldRootContext(optional = false) {
|
|
28
28
|
const context = useContext(FieldRootContext);
|
|
29
29
|
if (context !== MISSING_CONTEXT) return context;
|
|
30
|
-
if (optional) return
|
|
30
|
+
if (optional) return DEFAULT_FIELD_ROOT_CONTEXT;
|
|
31
31
|
throw new Error("Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
export {
|
|
34
|
+
export { FieldRootContext as n, useFieldRootContext as r, DEFAULT_FIELD_ROOT_CONTEXT as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { u as focusOut } from "./internals/reasons.js";
|
|
2
2
|
import { createChangeEventDetails } from "./internals/createBaseUIEventDetails.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as getFloatingFocusElement, d as isShadowRoot, f as isTypeableCombobox, i as getEventTarget, l as isHTMLElement, m as ownerDocument, n as contains, p as isTypeableElement, r as containsWithPortals, s as isElementVisible, t as activeElement } from "./dom-D8_aB1yy.js";
|
|
4
4
|
import { a as getNodeAncestors, o as getNodeChildren } from "./FloatingTree-z1JPD1dR.js";
|
|
5
|
-
import { c as focusable, g as FocusGuard, h as tabbable, l as getNextTabbable, m as isTabbable, p as isOutsideFocusEvent, s as usePopupPortalContext, u as getPreviousTabbable } from "./popupStateMapping-
|
|
5
|
+
import { c as focusable, g as FocusGuard, h as tabbable, l as getNextTabbable, m as isTabbable, p as isOutsideFocusEvent, s as usePopupPortalContext, u as getPreviousTabbable } from "./popupStateMapping-VHqr6M4H.js";
|
|
6
6
|
import { applyRef, escape, memo } from "@solidjs/web";
|
|
7
7
|
import { Show, createEffect, createMemo, untrack } from "solid-js";
|
|
8
8
|
//#region src/internals/overlay/markOthers.ts
|
|
@@ -277,7 +277,7 @@ function FocusManager(props) {
|
|
|
277
277
|
resolveElement(props.nextFocusableElement)
|
|
278
278
|
].includes(relatedTarget));
|
|
279
279
|
const triggers = props.context.context.triggerElements;
|
|
280
|
-
const movedOutside = !(
|
|
280
|
+
const movedOutside = !(containsWithPortals(state.reference, relatedTarget) || containsWithPortals(state.floating, relatedTarget) || contains(relatedTarget, state.floating) || contains(portal?.portalNode(), relatedTarget) || insideElements().some((element) => element === relatedTarget || contains(element, relatedTarget)) || triggers.hasMatchingElement((trigger) => contains(trigger, relatedTarget)) || relatedIsGuard || state.tree && (getNodeChildren(state.tree.nodes, nodeId()).some((node) => containsWithPortals(node.context?.state.floatingElement, relatedTarget) || containsWithPortals(node.context?.state.domReferenceElement, relatedTarget)) || getNodeAncestors(state.tree.nodes, nodeId()).some((node) => node.context?.state.floatingElement === relatedTarget || node.context?.state.domReferenceElement === relatedTarget)));
|
|
281
281
|
if (event.currentTarget === state.reference && state.focusElement) handleTabIndex(state.focusElement);
|
|
282
282
|
if (state.restoreFocus && event.currentTarget !== state.reference && !isElementVisible(target) && activeElement(documentNode) === documentNode.body && state.focusElement) {
|
|
283
283
|
state.focusElement.focus();
|
|
@@ -295,6 +295,11 @@ function FocusManager(props) {
|
|
|
295
295
|
}
|
|
296
296
|
});
|
|
297
297
|
};
|
|
298
|
+
const handlePortalFocusOut = (event) => {
|
|
299
|
+
const target = getEventTarget(event);
|
|
300
|
+
if (!contains(state.floating, target) && !contains(state.reference, target) && (containsWithPortals(state.floating, target) || containsWithPortals(state.reference, target))) handleFocusOut(event);
|
|
301
|
+
};
|
|
302
|
+
documentNode.addEventListener("focusout", handlePortalFocusOut);
|
|
298
303
|
if (state.reference) {
|
|
299
304
|
state.reference.addEventListener("focusout", handleFocusOut);
|
|
300
305
|
state.reference.addEventListener("pointerdown", handlePointerDown);
|
|
@@ -302,6 +307,7 @@ function FocusManager(props) {
|
|
|
302
307
|
state.floating?.addEventListener("focusin", handleFocusIn);
|
|
303
308
|
state.floating?.addEventListener("focusout", handleFocusOut);
|
|
304
309
|
return () => {
|
|
310
|
+
documentNode.removeEventListener("focusout", handlePortalFocusOut);
|
|
305
311
|
if (state.reference) {
|
|
306
312
|
state.reference.removeEventListener("focusout", handleFocusOut);
|
|
307
313
|
state.reference.removeEventListener("pointerdown", handlePointerDown);
|
|
@@ -497,7 +503,6 @@ function FocusManager(props) {
|
|
|
497
503
|
preventReturnFocus = false;
|
|
498
504
|
if (isOutsideFocusEvent(event, portal.portalNode())) getNextTabbable(domReference())?.focus();
|
|
499
505
|
else (resolveElement(props.previousFocusableElement) ?? portal.beforeOutside())?.focus();
|
|
500
|
-
if (closeOnFocusOut()) props.context.setOpen(false, createChangeEventDetails(focusOut, event));
|
|
501
506
|
}
|
|
502
507
|
}
|
|
503
508
|
});
|
|
@@ -523,7 +528,6 @@ function FocusManager(props) {
|
|
|
523
528
|
if (closeOnFocusOut()) preventReturnFocus = true;
|
|
524
529
|
if (isOutsideFocusEvent(event, portal.portalNode())) getPreviousTabbable(domReference())?.focus();
|
|
525
530
|
else (resolveElement(props.nextFocusableElement) ?? portal.afterOutside())?.focus();
|
|
526
|
-
if (closeOnFocusOut()) props.context.setOpen(false, createChangeEventDetails(focusOut, event));
|
|
527
531
|
}
|
|
528
532
|
}
|
|
529
533
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as ownerWindow, m as ownerDocument } from "./dom-D8_aB1yy.js";
|
|
2
2
|
import { mergeProps, ssrElement } from "@solidjs/web";
|
|
3
3
|
import { createEffect, createSignal, omit } from "solid-js";
|
|
4
4
|
//#region src/internals/overlay/scrollLock.ts
|
|
@@ -21,14 +21,11 @@ function createLabelableContext(options = {}) {
|
|
|
21
21
|
const controlRegistrations = /* @__PURE__ */ new Map();
|
|
22
22
|
const messageRegistrations = /* @__PURE__ */ new Map();
|
|
23
23
|
function registerControlId(source, id) {
|
|
24
|
-
if (id === void 0)
|
|
25
|
-
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
controlRegistrations.set(source, id);
|
|
24
|
+
if (id === void 0) controlRegistrations.delete(source);
|
|
25
|
+
else controlRegistrations.set(source, id);
|
|
29
26
|
setControlId((current) => {
|
|
30
27
|
for (const registeredId of controlRegistrations.values()) if (registeredId === current) return current;
|
|
31
|
-
return controlRegistrations.values().next().value
|
|
28
|
+
return controlRegistrations.size ? controlRegistrations.values().next().value : generatedControlId;
|
|
32
29
|
});
|
|
33
30
|
}
|
|
34
31
|
function registerLabelId(id) {
|
|
@@ -46,6 +43,7 @@ function createLabelableContext(options = {}) {
|
|
|
46
43
|
return Array.from(new Set(ids)).join(" ") || void 0;
|
|
47
44
|
}
|
|
48
45
|
return {
|
|
46
|
+
defaultControlId: generatedControlId,
|
|
49
47
|
controlId,
|
|
50
48
|
labelId,
|
|
51
49
|
messageIds,
|