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,521 @@
|
|
|
1
|
+
import { t as e } from "./useRender-CxZ8PI-g.js";
|
|
2
|
+
import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
|
|
3
|
+
import { P as n, d as r, i } from "./reasons-Co5CzjKq.js";
|
|
4
|
+
import { n as a, t as o } from "./resolveStyle-XcgAuaKR.js";
|
|
5
|
+
import { createChangeEventDetails as s } from "./internals/createBaseUIEventDetails.js";
|
|
6
|
+
import { transitionStatusMapping as c } from "./internals/stateAttributesMapping.js";
|
|
7
|
+
import { composeEventHandlers as l, liveEventHandler as u } from "./internals/composeEventHandlers.js";
|
|
8
|
+
import { i as d, n as f, o as p } from "./dom-lDdayFF_.js";
|
|
9
|
+
import { n as m, t as h } from "./InternalBackdrop-B8_lfUvf.js";
|
|
10
|
+
import { c as g, i as _, n as ee, r as v, s as y, t as b } from "./FloatingTree-23B7KKPD.js";
|
|
11
|
+
import { a as te, n as x, o as ne, t as S } from "./PopupStore-BjRwcvbG.js";
|
|
12
|
+
import { a as C, o as re } from "./popupStateMapping-nhukB8NK.js";
|
|
13
|
+
import { i as w, n as T, r as E, t as D } from "./PopupHandle-DyX5gY1e.js";
|
|
14
|
+
import { t as ie } from "./setRef-fXF6OIo3.js";
|
|
15
|
+
import { a as O, i as ae, n as k, r as A, t as oe } from "./buttonSemantics-paljfpOX.js";
|
|
16
|
+
import { createComponent as j, getNextElement as M, memo as N, mergeProps as P, runHydrationEvents as F, spread as I, template as L } from "@solidjs/web";
|
|
17
|
+
import { $REFRESH as se, Show as R, createContext as z, createEffect as B, createMemo as V, createSignal as H, createUniqueId as U, omit as W, onCleanup as G, untrack as K, useContext as q } from "solid-js";
|
|
18
|
+
//#region src/dialog/store/DialogStore.ts
|
|
19
|
+
var ce = class extends S {
|
|
20
|
+
openMethodAccessor;
|
|
21
|
+
setOpenMethodSignal;
|
|
22
|
+
openMethodRevisionAccessor;
|
|
23
|
+
setOpenMethodRevision;
|
|
24
|
+
constructor(e = {}) {
|
|
25
|
+
super(e);
|
|
26
|
+
let [t, n] = H(null, { ownedWrite: !0 });
|
|
27
|
+
this.openMethodAccessor = t, this.setOpenMethodSignal = n;
|
|
28
|
+
let [r, i] = H(0, { ownedWrite: !0 });
|
|
29
|
+
this.openMethodRevisionAccessor = r, this.setOpenMethodRevision = i;
|
|
30
|
+
}
|
|
31
|
+
openMethod() {
|
|
32
|
+
return this.openMethodAccessor();
|
|
33
|
+
}
|
|
34
|
+
setOpenMethod(e) {
|
|
35
|
+
this.setOpenMethodSignal(e), this.setOpenMethodRevision((e) => e + 1);
|
|
36
|
+
}
|
|
37
|
+
openMethodRevision() {
|
|
38
|
+
return this.openMethodRevisionAccessor();
|
|
39
|
+
}
|
|
40
|
+
setPayload(e) {
|
|
41
|
+
this.set("payload", e);
|
|
42
|
+
}
|
|
43
|
+
setOpen(e, t) {
|
|
44
|
+
return !e && t.trigger == null && this.activeTriggerId() != null && (t.trigger = this.state.activeTriggerElement ?? void 0), super.setOpen(e, t);
|
|
45
|
+
}
|
|
46
|
+
}, J = class extends T {
|
|
47
|
+
openMethod() {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
setOpenMethod(e) {}
|
|
51
|
+
setPayload(e) {}
|
|
52
|
+
}, Y = Symbol("DialogRootContext"), le = z(Y);
|
|
53
|
+
function X(e = !1) {
|
|
54
|
+
let t = q(le);
|
|
55
|
+
if (t === Y) {
|
|
56
|
+
if (e) return;
|
|
57
|
+
throw Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");
|
|
58
|
+
}
|
|
59
|
+
return t;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/dialog/root/DialogRoot.tsx
|
|
63
|
+
function ue(e) {
|
|
64
|
+
return Z("dialog", e);
|
|
65
|
+
}
|
|
66
|
+
function Z(e, t, n = {}) {
|
|
67
|
+
let i = X(!0), a = g(), o = y(), c = a ?? new v(), l = U(), u = U(), h = K(() => t.open !== void 0), x = K(() => t.triggerId !== void 0), S = i !== void 0, C = e === "alert-dialog", re = e === "drawer", w = V(() => C ? !0 : t.modal ?? !0), T = V(() => C || (t.disablePointerDismissal ?? !1)), D = new ce({
|
|
68
|
+
controlledOpen: () => h ? t.open : void 0,
|
|
69
|
+
controlledTriggerId: () => x ? t.triggerId : void 0,
|
|
70
|
+
floatingId: u,
|
|
71
|
+
nested: o !== null,
|
|
72
|
+
nodeId: l,
|
|
73
|
+
onOpenChange: () => t.onOpenChange,
|
|
74
|
+
onOpenChangeComplete: () => t.onOpenChangeComplete
|
|
75
|
+
});
|
|
76
|
+
D.update({
|
|
77
|
+
open: h ? !!K(() => t.open) : !!K(() => t.defaultOpen),
|
|
78
|
+
activeTriggerId: K(() => t.defaultTriggerId ?? null)
|
|
79
|
+
});
|
|
80
|
+
let ie = D.access((e) => e.payload), O = _({
|
|
81
|
+
tree: c,
|
|
82
|
+
id: l,
|
|
83
|
+
parentId: o,
|
|
84
|
+
context: () => D.context.floatingRoot
|
|
85
|
+
}), [ae, k] = H(), [A, oe] = H(), [M, P] = H(null, { ownedWrite: !0 }), [F, I] = H(null, { ownedWrite: !0 }), [L, R] = H(null, { ownedWrite: !0 }), [z, W] = H(0, {
|
|
86
|
+
equals: !1,
|
|
87
|
+
ownedWrite: !0
|
|
88
|
+
}), q = /* @__PURE__ */ new Map(), J = V(() => {
|
|
89
|
+
z();
|
|
90
|
+
let e = 0;
|
|
91
|
+
for (let t of q.values()) e += t.dialogCount;
|
|
92
|
+
return e;
|
|
93
|
+
}), Y = V(() => {
|
|
94
|
+
z();
|
|
95
|
+
let e = 0;
|
|
96
|
+
for (let t of q.values()) e += t.drawerCount;
|
|
97
|
+
return e;
|
|
98
|
+
}), ue = { current: !0 }, Z = te(D, () => D.track().popupElement, { onUnmount: () => D.setOpenMethod(null) });
|
|
99
|
+
function de(e, t, n) {
|
|
100
|
+
let r = q.get(e);
|
|
101
|
+
(r?.dialogCount !== t || r.drawerCount !== n) && (q.set(e, {
|
|
102
|
+
dialogCount: t,
|
|
103
|
+
drawerCount: n
|
|
104
|
+
}), W((e) => e + 1));
|
|
105
|
+
}
|
|
106
|
+
function fe(e) {
|
|
107
|
+
q.delete(e) && W((e) => e + 1);
|
|
108
|
+
}
|
|
109
|
+
let pe = {
|
|
110
|
+
store: D,
|
|
111
|
+
tree: c,
|
|
112
|
+
nested: S,
|
|
113
|
+
role: C ? "alertdialog" : "dialog",
|
|
114
|
+
modal: w,
|
|
115
|
+
disablePointerDismissal: T,
|
|
116
|
+
nestedOpenDialogCount: J,
|
|
117
|
+
nestedOpenDrawerCount: Y,
|
|
118
|
+
outsidePressEnabled: ue,
|
|
119
|
+
titleId: ae,
|
|
120
|
+
setTitleId: k,
|
|
121
|
+
descriptionId: A,
|
|
122
|
+
setDescriptionId: oe,
|
|
123
|
+
backdropElement: M,
|
|
124
|
+
setBackdropElement: P,
|
|
125
|
+
internalBackdropElement: F,
|
|
126
|
+
setInternalBackdropElement: I,
|
|
127
|
+
viewportElement: L,
|
|
128
|
+
setViewportElement: R,
|
|
129
|
+
presence: Z,
|
|
130
|
+
updateNestedLayer: de,
|
|
131
|
+
removeNestedLayer: fe
|
|
132
|
+
};
|
|
133
|
+
D.context.floatingRoot.context.data.insideElements = () => [
|
|
134
|
+
M(),
|
|
135
|
+
F(),
|
|
136
|
+
L()
|
|
137
|
+
], D.configureTriggerUnmount({ closeOnActiveTriggerUnmount: !1 }), E(() => t.handle, D);
|
|
138
|
+
let me = ne({
|
|
139
|
+
context: D.context.floatingRoot,
|
|
140
|
+
tree: () => c,
|
|
141
|
+
escapeKey: () => J() === 0,
|
|
142
|
+
outsidePress: () => (e) => {
|
|
143
|
+
if (!ue.current || T() || J() > 0 || "button" in e && e.button !== 0) return !1;
|
|
144
|
+
if ("touches" in e) {
|
|
145
|
+
if (e.type === "touchend") {
|
|
146
|
+
if (e.changedTouches.length !== 1 || e.touches.length !== 0) return !1;
|
|
147
|
+
} else if (e.touches.length !== 1) return !1;
|
|
148
|
+
}
|
|
149
|
+
if (w() === !1) return !0;
|
|
150
|
+
let t = d(e), n = F(), r = M();
|
|
151
|
+
return !n && !r || t === n || t === r || p(t) && f(t, D.state.popupElement) && !t.hasAttribute("data-base-ui-portal");
|
|
152
|
+
},
|
|
153
|
+
outsidePressEvent: () => F() || M() ? "intentional" : {
|
|
154
|
+
mouse: w() === "trap-focus" ? "sloppy" : "intentional",
|
|
155
|
+
touch: "sloppy"
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
D.setInteractionProps({
|
|
159
|
+
activeTriggerProps: { onKeyDown: me.onKeyDown },
|
|
160
|
+
inactiveTriggerProps: { onKeyDown: me.onKeyDown },
|
|
161
|
+
popupProps: {}
|
|
162
|
+
}), m(() => D.open() && w() === !0, () => D.track().popupElement), B(() => ({
|
|
163
|
+
open: D.open(),
|
|
164
|
+
activeTriggerId: D.activeTriggerId()
|
|
165
|
+
}), () => K(() => D.reconcileTriggers()));
|
|
166
|
+
let Q = K(() => D.open()), $ = K(() => D.openMethodRevision());
|
|
167
|
+
B(() => ({
|
|
168
|
+
open: D.open(),
|
|
169
|
+
openMethodRevision: D.openMethodRevision()
|
|
170
|
+
}), (e) => {
|
|
171
|
+
!e.open && Q ? $ = e.openMethodRevision : e.open && !Q && e.openMethodRevision === $ && D.setOpenMethod(null), Q = e.open;
|
|
172
|
+
});
|
|
173
|
+
let he = Symbol("DialogRoot");
|
|
174
|
+
B(() => ({
|
|
175
|
+
open: D.open(),
|
|
176
|
+
nestedDialogs: J(),
|
|
177
|
+
nestedDrawers: Y()
|
|
178
|
+
}), (e) => {
|
|
179
|
+
i?.updateNestedLayer(he, e.open ? e.nestedDialogs + 1 : 0, e.open ? e.nestedDrawers + +!!re : 0);
|
|
180
|
+
});
|
|
181
|
+
let ge = {
|
|
182
|
+
unmount: Z.forceUnmount,
|
|
183
|
+
close() {
|
|
184
|
+
D.setOpen(!1, s(r));
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
B(() => t.actionsRef, (e) => {
|
|
188
|
+
e?.(ge);
|
|
189
|
+
});
|
|
190
|
+
function _e() {
|
|
191
|
+
let e = V(() => t.children), n = K(e), r = n;
|
|
192
|
+
return typeof n == "function" && (r = n.name === "bound read" && Object.prototype.hasOwnProperty.call(n, se) ? N(() => e()) : K(() => n({ payload: ie }))), r;
|
|
193
|
+
}
|
|
194
|
+
return G(() => {
|
|
195
|
+
i?.removeNestedLayer(he), D.clearInteractionProps(), delete D.context.floatingRoot.context.data.insideElements;
|
|
196
|
+
}), j(le, {
|
|
197
|
+
value: pe,
|
|
198
|
+
get children() {
|
|
199
|
+
return j(ee, {
|
|
200
|
+
value: c,
|
|
201
|
+
get children() {
|
|
202
|
+
return j(b, {
|
|
203
|
+
get value() {
|
|
204
|
+
return O.id ?? null;
|
|
205
|
+
},
|
|
206
|
+
get children() {
|
|
207
|
+
return [N(() => n.extraContent?.()), j(_e, {})];
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/dialog/utils/mergeDialogStyles.ts
|
|
217
|
+
function de(e, t) {
|
|
218
|
+
if (typeof t == "string") {
|
|
219
|
+
let n = Object.entries(e).filter((e) => e[1] != null).map(([e, t]) => `${e}:${String(t)}`).join(";");
|
|
220
|
+
return n ? `${n};${t}` : t;
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
...e,
|
|
224
|
+
...t || void 0
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/dialog/utils/stateAttributesMapping.ts
|
|
229
|
+
var fe = { "data-open": "" }, pe = { "data-closed": "" }, me = { "data-nested-dialog-open": "" }, Q = {
|
|
230
|
+
open: (e) => e ? fe : pe,
|
|
231
|
+
...c
|
|
232
|
+
}, $ = {
|
|
233
|
+
...Q,
|
|
234
|
+
nestedDialogOpen: (e) => e ? me : null
|
|
235
|
+
}, he = /* @__PURE__ */ L("<button>");
|
|
236
|
+
function ge(n) {
|
|
237
|
+
let r = X(), c = n, d = n, f = V(() => c.disabled ?? !1), p = V(() => c.nativeButton ?? !0), m = V(() => ({ disabled: f() })), h = e(n, () => m(), (e) => (() => {
|
|
238
|
+
var t = M(he);
|
|
239
|
+
return I(t, e, !1), F(), t;
|
|
240
|
+
})()), g = V(() => a(n.class, m())), _ = V(() => o(n.style, m())), ee = V(() => t(m())), v = W(d, "render", "class", "disabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
|
|
241
|
+
function y(e) {
|
|
242
|
+
r.store.open() && r.store.setOpen(!1, s(i, e));
|
|
243
|
+
}
|
|
244
|
+
let b = l(u(() => K(() => f() ? A : void 0)), u(() => c.onClick), y), te = l(u(() => K(() => f() ? A : void 0)), u(() => c.onPointerDown)), x = l(u(() => K(() => f() ? O : void 0)), u(() => c.onMouseDown)), ne = l(u(() => K(() => f() ? ae : void 0)), u(() => c.onKeyDown), u(() => K(() => p() ? void 0 : oe))), S = l(u(() => K(() => f() ? O : void 0)), u(() => c.onKeyUp), u(() => K(() => p() ? void 0 : k)));
|
|
245
|
+
return j(h, P({
|
|
246
|
+
ref: [c.ref],
|
|
247
|
+
get type() {
|
|
248
|
+
return p() ? "button" : void 0;
|
|
249
|
+
},
|
|
250
|
+
get role() {
|
|
251
|
+
return p() ? void 0 : "button";
|
|
252
|
+
},
|
|
253
|
+
get tabIndex() {
|
|
254
|
+
return !p() && f() ? -1 : 0;
|
|
255
|
+
},
|
|
256
|
+
get disabled() {
|
|
257
|
+
return (N(() => !!p())() ? f() : p()) || void 0;
|
|
258
|
+
},
|
|
259
|
+
get "aria-disabled"() {
|
|
260
|
+
return !p() && f() ? "true" : void 0;
|
|
261
|
+
},
|
|
262
|
+
get class() {
|
|
263
|
+
return g();
|
|
264
|
+
},
|
|
265
|
+
get style() {
|
|
266
|
+
return _();
|
|
267
|
+
},
|
|
268
|
+
onClick: b,
|
|
269
|
+
onKeyDown: ne,
|
|
270
|
+
onKeyUp: S,
|
|
271
|
+
onMouseDown: x,
|
|
272
|
+
onPointerDown: te
|
|
273
|
+
}, ee, v));
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/dialog/description/DialogDescription.tsx
|
|
277
|
+
var _e = /* @__PURE__ */ L("<p>");
|
|
278
|
+
function ve(t) {
|
|
279
|
+
let n = X(), r = t, i = t, s = `base-ui-${U()}`, c = V(() => r.id || s), l = {}, u = e(t, () => l, (e) => (() => {
|
|
280
|
+
var t = M(_e);
|
|
281
|
+
return I(t, e, !1), F(), t;
|
|
282
|
+
})()), d = V(() => a(t.class, l)), f = V(() => o(t.style, l)), p = W(i, "render", "class", "id", "ref", "style");
|
|
283
|
+
return B(() => c(), (e) => (n.setDescriptionId(e), () => n.setDescriptionId((t) => t === e ? void 0 : t))), j(u, P({
|
|
284
|
+
ref: [r.ref],
|
|
285
|
+
get id() {
|
|
286
|
+
return c();
|
|
287
|
+
},
|
|
288
|
+
get class() {
|
|
289
|
+
return d();
|
|
290
|
+
},
|
|
291
|
+
get style() {
|
|
292
|
+
return f();
|
|
293
|
+
}
|
|
294
|
+
}, p));
|
|
295
|
+
}
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region src/dialog/portal/DialogPortalContext.ts
|
|
298
|
+
var ye = Symbol("DialogPortalContext"), be = z(ye);
|
|
299
|
+
function xe() {
|
|
300
|
+
let e = q(be);
|
|
301
|
+
if (e === ye) throw Error("Base UI: <Dialog.Portal> is missing.");
|
|
302
|
+
return e;
|
|
303
|
+
}
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region src/dialog/portal/DialogPortal.tsx
|
|
306
|
+
function Se(e) {
|
|
307
|
+
let t = X(), n = e, r = e, i = V(() => n.keepMounted ?? !1), s = V(() => t.presence.mounted() || i()), c = {}, l = V(() => a(e.class, c)), u = V(() => o(e.style, c)), d = W(r, "render", "class", "container", "keepMounted", "ref", "style"), f = { keepMounted: i };
|
|
308
|
+
function p() {
|
|
309
|
+
let e = null;
|
|
310
|
+
return G(() => {
|
|
311
|
+
t.internalBackdropElement() === e && t.setInternalBackdropElement(null);
|
|
312
|
+
}), j(h, {
|
|
313
|
+
ref: (n) => {
|
|
314
|
+
e = n, t.setInternalBackdropElement(n);
|
|
315
|
+
},
|
|
316
|
+
get open() {
|
|
317
|
+
return t.store.open();
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
return j(R, {
|
|
322
|
+
get when() {
|
|
323
|
+
return s();
|
|
324
|
+
},
|
|
325
|
+
get children() {
|
|
326
|
+
return j(be, {
|
|
327
|
+
value: f,
|
|
328
|
+
get children() {
|
|
329
|
+
return j(re, P({
|
|
330
|
+
get render() {
|
|
331
|
+
return e.render;
|
|
332
|
+
},
|
|
333
|
+
get container() {
|
|
334
|
+
return n.container;
|
|
335
|
+
},
|
|
336
|
+
ref: (e) => {
|
|
337
|
+
n.ref && ie(n.ref, e);
|
|
338
|
+
},
|
|
339
|
+
get class() {
|
|
340
|
+
return l();
|
|
341
|
+
},
|
|
342
|
+
get style() {
|
|
343
|
+
return u();
|
|
344
|
+
}
|
|
345
|
+
}, d, { get children() {
|
|
346
|
+
return [j(R, {
|
|
347
|
+
get when() {
|
|
348
|
+
return N(() => !!t.presence.mounted())() ? t.modal() === !0 : t.presence.mounted();
|
|
349
|
+
},
|
|
350
|
+
get children() {
|
|
351
|
+
return j(p, {});
|
|
352
|
+
}
|
|
353
|
+
}), N(() => e.children)];
|
|
354
|
+
} }));
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region src/dialog/title/DialogTitle.tsx
|
|
362
|
+
var Ce = /* @__PURE__ */ L("<h2>");
|
|
363
|
+
function we(t) {
|
|
364
|
+
let n = X(), r = t, i = t, s = `base-ui-${U()}`, c = V(() => r.id || s), l = {}, u = e(t, () => l, (e) => (() => {
|
|
365
|
+
var t = M(Ce);
|
|
366
|
+
return I(t, e, !1), F(), t;
|
|
367
|
+
})()), d = V(() => a(t.class, l)), f = V(() => o(t.style, l)), p = W(i, "render", "class", "id", "ref", "style");
|
|
368
|
+
return B(() => c(), (e) => (n.setTitleId(e), () => n.setTitleId((t) => t === e ? void 0 : t))), j(u, P({
|
|
369
|
+
ref: [r.ref],
|
|
370
|
+
get id() {
|
|
371
|
+
return c();
|
|
372
|
+
},
|
|
373
|
+
get class() {
|
|
374
|
+
return d();
|
|
375
|
+
},
|
|
376
|
+
get style() {
|
|
377
|
+
return f();
|
|
378
|
+
}
|
|
379
|
+
}, p));
|
|
380
|
+
}
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/dialog/trigger/DialogTrigger.tsx
|
|
383
|
+
var Te = /* @__PURE__ */ L("<button>");
|
|
384
|
+
function Ee(r) {
|
|
385
|
+
let i = X(!0), c = r;
|
|
386
|
+
if (!i && !K(() => c.handle)) throw Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");
|
|
387
|
+
let d = r, f = `base-ui-${U()}`, p = V(() => c.id || f), m = V(() => c.disabled ?? !1), h = V(() => c.nativeButton ?? !0), [g, _] = H(null, { ownedWrite: !0 }), ee = w(() => c.handle), v = V(() => ee() ?? i?.store), y = V(() => {
|
|
388
|
+
let e = v();
|
|
389
|
+
return !!(e?.open() && e.activeTriggerId() === p());
|
|
390
|
+
}), b = V(() => ({
|
|
391
|
+
disabled: m(),
|
|
392
|
+
open: y()
|
|
393
|
+
})), te = e(r, () => b(), (e) => (() => {
|
|
394
|
+
var t = M(Te);
|
|
395
|
+
return I(t, e, !1), F(), t;
|
|
396
|
+
})()), ne = V(() => a(r.class, b())), S = V(() => o(r.style, b())), re = V(() => t(b(), C)), T = W(d, "render", "class", "disabled", "handle", "id", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "payload", "ref", "style"), E = "", D = "";
|
|
397
|
+
x(v, p, g, () => ({ payload: c.payload }));
|
|
398
|
+
function ie(e) {
|
|
399
|
+
let t = v(), r = g();
|
|
400
|
+
!t || !r || e.button !== 0 || (t.open() || t.setOpenMethod(D || (e.detail === 0 ? "keyboard" : De() ? "touch" : "mouse")), t.setOpen(!(t.open() && t.activeTriggerId() === p()), s(n, e, r)));
|
|
401
|
+
}
|
|
402
|
+
function L() {
|
|
403
|
+
D = E, E = "";
|
|
404
|
+
}
|
|
405
|
+
function se(e) {
|
|
406
|
+
E = e.pointerType;
|
|
407
|
+
}
|
|
408
|
+
function R(e) {
|
|
409
|
+
E = "keyboard";
|
|
410
|
+
let t = v(), n = t?.state.popupElement, r = t ? (t.activeTriggerId() === p() ? t.state.activeTriggerProps : t.state.inactiveTriggerProps).onKeyDown : void 0, i = e.currentTarget;
|
|
411
|
+
n && i && n.ownerDocument !== i.ownerDocument && typeof r == "function" && r(e);
|
|
412
|
+
}
|
|
413
|
+
let z = l(u(() => K(() => m() ? A : void 0)), L, u(() => c.onClick), ie), B = l(u(() => K(() => m() ? A : void 0)), u(() => c.onPointerDown), se), G = l(u(() => K(() => m() ? O : void 0)), u(() => c.onMouseDown)), q = l(u(() => K(() => m() ? ae : void 0)), u(() => c.onKeyDown), R, u(() => K(() => h() ? void 0 : oe))), ce = l(u(() => K(() => m() ? O : void 0)), u(() => c.onKeyUp), u(() => K(() => h() ? void 0 : k)));
|
|
414
|
+
return j(te, P({
|
|
415
|
+
ref: [((e) => _(e)), c.ref],
|
|
416
|
+
get id() {
|
|
417
|
+
return p();
|
|
418
|
+
},
|
|
419
|
+
get type() {
|
|
420
|
+
return h() ? "button" : void 0;
|
|
421
|
+
},
|
|
422
|
+
get role() {
|
|
423
|
+
return h() ? void 0 : "button";
|
|
424
|
+
},
|
|
425
|
+
get tabIndex() {
|
|
426
|
+
return !h() && m() ? -1 : 0;
|
|
427
|
+
},
|
|
428
|
+
get disabled() {
|
|
429
|
+
return (N(() => !!h())() ? m() : h()) || void 0;
|
|
430
|
+
},
|
|
431
|
+
get "aria-disabled"() {
|
|
432
|
+
return !h() && m() ? "true" : void 0;
|
|
433
|
+
},
|
|
434
|
+
"aria-haspopup": "dialog",
|
|
435
|
+
get "aria-expanded"() {
|
|
436
|
+
return y() ? "true" : "false";
|
|
437
|
+
},
|
|
438
|
+
get "aria-controls"() {
|
|
439
|
+
return v()?.triggerPopupId(p());
|
|
440
|
+
},
|
|
441
|
+
"data-base-ui-click-trigger": "",
|
|
442
|
+
get class() {
|
|
443
|
+
return ne();
|
|
444
|
+
},
|
|
445
|
+
get style() {
|
|
446
|
+
return S();
|
|
447
|
+
},
|
|
448
|
+
onClick: z,
|
|
449
|
+
onKeyDown: q,
|
|
450
|
+
onKeyUp: ce,
|
|
451
|
+
onMouseDown: G,
|
|
452
|
+
onPointerDown: B
|
|
453
|
+
}, re, T));
|
|
454
|
+
}
|
|
455
|
+
function De() {
|
|
456
|
+
if (typeof navigator > "u") return !1;
|
|
457
|
+
let e = navigator.platform.toLowerCase();
|
|
458
|
+
return /^i(os$|p)/.test(e) || e === "macintel" && navigator.maxTouchPoints > 1;
|
|
459
|
+
}
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region src/dialog/viewport/DialogViewport.tsx
|
|
462
|
+
var Oe = /* @__PURE__ */ L("<div>");
|
|
463
|
+
function ke(n) {
|
|
464
|
+
let r = xe(), i = X(), s = n, c = W(n, "render", "class", "ref", "style"), l = V(() => ({
|
|
465
|
+
open: i.store.open(),
|
|
466
|
+
transitionStatus: i.store.track().transitionStatus,
|
|
467
|
+
nested: i.nested,
|
|
468
|
+
nestedDialogOpen: i.nestedOpenDialogCount() > 0
|
|
469
|
+
})), u = e(n, () => l(), (e) => (() => {
|
|
470
|
+
var t = M(Oe);
|
|
471
|
+
return I(t, e, !1), F(), t;
|
|
472
|
+
})()), d = V(() => a(n.class, l())), f = V(() => de({ "pointer-events": i.store.open() ? void 0 : "none" }, o(n.style, l()))), p = V(() => t(l(), $)), m = V(() => r.keepMounted() || i.presence.mounted()), h = null;
|
|
473
|
+
return G(() => {
|
|
474
|
+
i.viewportElement() === h && i.setViewportElement(null);
|
|
475
|
+
}), j(R, {
|
|
476
|
+
get when() {
|
|
477
|
+
return m();
|
|
478
|
+
},
|
|
479
|
+
get children() {
|
|
480
|
+
return j(u, P({
|
|
481
|
+
ref: [((e) => {
|
|
482
|
+
h = e, i.setViewportElement(e);
|
|
483
|
+
}), s.ref],
|
|
484
|
+
role: "presentation",
|
|
485
|
+
get hidden() {
|
|
486
|
+
return !i.presence.mounted();
|
|
487
|
+
},
|
|
488
|
+
get class() {
|
|
489
|
+
return d();
|
|
490
|
+
},
|
|
491
|
+
get style() {
|
|
492
|
+
return f();
|
|
493
|
+
}
|
|
494
|
+
}, p, c));
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region src/dialog/store/DialogHandle.ts
|
|
500
|
+
var Ae = class extends D {
|
|
501
|
+
constructor() {
|
|
502
|
+
super("Dialog", !1, new J());
|
|
503
|
+
}
|
|
504
|
+
open(e) {
|
|
505
|
+
this.openByTrigger(e);
|
|
506
|
+
}
|
|
507
|
+
openWithPayload(e) {
|
|
508
|
+
this.attachedStore && (this.attachedStore.setPayload(e), this.attachedStore.setOpen(!0, s(r)));
|
|
509
|
+
}
|
|
510
|
+
close() {
|
|
511
|
+
this.closePopup();
|
|
512
|
+
}
|
|
513
|
+
get isOpen() {
|
|
514
|
+
return this.attachedStore?.open() ?? !1;
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
function je() {
|
|
518
|
+
return new Ae();
|
|
519
|
+
}
|
|
520
|
+
//#endregion
|
|
521
|
+
export { we as a, ve as c, Q as d, de as f, X as h, Ee as i, ge as l, Z as m, je as n, Se as o, ue as p, ke as r, xe as s, Ae as t, $ as u };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { t as e } from "./useRender-CxZ8PI-g.js";
|
|
2
|
+
import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
|
|
3
|
+
import { n, t as r } from "./resolveStyle-XcgAuaKR.js";
|
|
4
|
+
import { composeEventHandlers as i, liveEventHandler as a } from "./internals/composeEventHandlers.js";
|
|
5
|
+
import { t as o } from "./FocusManager-q7z7PMV1.js";
|
|
6
|
+
import { d as s, f as c, h as l, s as u, u as d } from "./DialogHandle-DluOK_7u.js";
|
|
7
|
+
import { createComponent as f, getNextElement as p, mergeProps as m, runHydrationEvents as h, spread as g, template as _ } from "@solidjs/web";
|
|
8
|
+
import { Show as v, createEffect as y, createMemo as b, omit as x, onCleanup as S } from "solid-js";
|
|
9
|
+
//#region src/dialog/backdrop/DialogBackdrop.tsx
|
|
10
|
+
var C = /* @__PURE__ */ _("<div>");
|
|
11
|
+
function w(i) {
|
|
12
|
+
let a = l(), o = i, u = x(i, "render", "class", "forceRender", "ref", "style"), d = b(() => ({
|
|
13
|
+
open: a.store.open(),
|
|
14
|
+
transitionStatus: a.store.track().transitionStatus
|
|
15
|
+
})), _ = e(i, () => d(), (e) => (() => {
|
|
16
|
+
var t = p(C);
|
|
17
|
+
return g(t, e, !1), h(), t;
|
|
18
|
+
})()), y = b(() => n(i.class, d())), w = b(() => c({
|
|
19
|
+
"user-select": "none",
|
|
20
|
+
"-webkit-user-select": "none"
|
|
21
|
+
}, r(i.style, d()))), T = b(() => t(d(), s)), E = b(() => !!o.forceRender || !a.nested);
|
|
22
|
+
function D() {
|
|
23
|
+
let e = null;
|
|
24
|
+
return S(() => {
|
|
25
|
+
a.backdropElement() === e && a.setBackdropElement(null);
|
|
26
|
+
}), f(_, m({
|
|
27
|
+
ref: [((t) => {
|
|
28
|
+
e = t, a.setBackdropElement(t);
|
|
29
|
+
}), o.ref],
|
|
30
|
+
role: "presentation",
|
|
31
|
+
get hidden() {
|
|
32
|
+
return !a.presence.mounted();
|
|
33
|
+
},
|
|
34
|
+
get class() {
|
|
35
|
+
return y();
|
|
36
|
+
},
|
|
37
|
+
get style() {
|
|
38
|
+
return w();
|
|
39
|
+
}
|
|
40
|
+
}, T, u));
|
|
41
|
+
}
|
|
42
|
+
return f(v, {
|
|
43
|
+
get when() {
|
|
44
|
+
return E();
|
|
45
|
+
},
|
|
46
|
+
get children() {
|
|
47
|
+
return f(D, {});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/dialog/popup/DialogPopup.tsx
|
|
53
|
+
var T = /* @__PURE__ */ _("<div>"), E = /* @__PURE__ */ new Set([
|
|
54
|
+
"ArrowUp",
|
|
55
|
+
"ArrowDown",
|
|
56
|
+
"ArrowLeft",
|
|
57
|
+
"ArrowRight",
|
|
58
|
+
"Home",
|
|
59
|
+
"End"
|
|
60
|
+
]);
|
|
61
|
+
function D(s) {
|
|
62
|
+
u();
|
|
63
|
+
let _ = l(), v = s, C = x(s, "render", "class", "finalFocus", "id", "initialFocus", "onKeyDown", "ref", "style"), w = b(() => ({
|
|
64
|
+
open: _.store.open(),
|
|
65
|
+
transitionStatus: _.store.track().transitionStatus,
|
|
66
|
+
nested: _.nested,
|
|
67
|
+
nestedDialogOpen: _.nestedOpenDialogCount() > 0
|
|
68
|
+
})), D = e(s, () => w(), (e) => (() => {
|
|
69
|
+
var t = p(T);
|
|
70
|
+
return g(t, e, !1), h(), t;
|
|
71
|
+
})()), O = b(() => n(s.class, w())), k = b(() => c({ "--nested-dialogs": _.nestedOpenDialogCount() }, r(s.style, w()))), A = b(() => t(w(), d)), j = b(() => v.id ?? _.store.context.floatingId), M = b(() => v.initialFocus ?? ((e) => e !== "touch" || _.store.state.popupElement)), N = i(a(() => v.onKeyDown), (e) => {
|
|
72
|
+
E.has(e.key) && e.stopPropagation();
|
|
73
|
+
}), P = null;
|
|
74
|
+
y(() => j(), (e) => {
|
|
75
|
+
_.store.setPopupId(e);
|
|
76
|
+
}), S(() => {
|
|
77
|
+
_.store.state.popupElement === P && _.store.setPopupElement(null);
|
|
78
|
+
});
|
|
79
|
+
let F = f(D, m({
|
|
80
|
+
ref: [((e) => {
|
|
81
|
+
P = e, _.store.setPopupElement(e);
|
|
82
|
+
}), v.ref],
|
|
83
|
+
get id() {
|
|
84
|
+
return j();
|
|
85
|
+
},
|
|
86
|
+
get role() {
|
|
87
|
+
return _.role;
|
|
88
|
+
},
|
|
89
|
+
tabIndex: -1,
|
|
90
|
+
"data-base-ui-focusable": "",
|
|
91
|
+
get hidden() {
|
|
92
|
+
return !_.presence.mounted();
|
|
93
|
+
},
|
|
94
|
+
get "aria-labelledby"() {
|
|
95
|
+
return _.titleId();
|
|
96
|
+
},
|
|
97
|
+
get "aria-describedby"() {
|
|
98
|
+
return _.descriptionId();
|
|
99
|
+
},
|
|
100
|
+
get class() {
|
|
101
|
+
return O();
|
|
102
|
+
},
|
|
103
|
+
get style() {
|
|
104
|
+
return k();
|
|
105
|
+
},
|
|
106
|
+
onKeyDown: N
|
|
107
|
+
}, A, C));
|
|
108
|
+
return f(o, {
|
|
109
|
+
get context() {
|
|
110
|
+
return _.store.context.floatingRoot;
|
|
111
|
+
},
|
|
112
|
+
get tree() {
|
|
113
|
+
return _.tree;
|
|
114
|
+
},
|
|
115
|
+
get disabled() {
|
|
116
|
+
return !_.presence.mounted();
|
|
117
|
+
},
|
|
118
|
+
get closeOnFocusOut() {
|
|
119
|
+
return !_.disablePointerDismissal();
|
|
120
|
+
},
|
|
121
|
+
get initialFocus() {
|
|
122
|
+
return M();
|
|
123
|
+
},
|
|
124
|
+
get returnFocus() {
|
|
125
|
+
return v.finalFocus;
|
|
126
|
+
},
|
|
127
|
+
get modal() {
|
|
128
|
+
return _.modal() !== !1;
|
|
129
|
+
},
|
|
130
|
+
restoreFocus: "popup",
|
|
131
|
+
get openInteractionType() {
|
|
132
|
+
return _.store.openMethod();
|
|
133
|
+
},
|
|
134
|
+
children: F
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { w as n, D as t };
|