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,1070 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { t } from "./useRender-CxZ8PI-g.js";
|
|
3
|
+
import { getStateAttributesProps as n } from "./internals/getStateAttributesProps.js";
|
|
4
|
+
import { S as r, x as i } from "./reasons-Co5CzjKq.js";
|
|
5
|
+
import { n as a, t as o } from "./resolveStyle-XcgAuaKR.js";
|
|
6
|
+
import { createChangeEventDetails as s } from "./internals/createBaseUIEventDetails.js";
|
|
7
|
+
import { composeEventHandlers as c, liveEventHandler as l } from "./internals/composeEventHandlers.js";
|
|
8
|
+
import { t as u } from "./runOnceAnimationsFinish-CFADb4CN.js";
|
|
9
|
+
import { n as d } from "./dom-lDdayFF_.js";
|
|
10
|
+
import { t as f } from "./createAnchorPositioning-DCXIApS1.js";
|
|
11
|
+
import { t as p } from "./createClickInteraction-BeBsTqtY.js";
|
|
12
|
+
import { c as m, i as h, n as g, r as _, s as v, t as y } from "./FloatingTree-23B7KKPD.js";
|
|
13
|
+
import { a as b, o as x, t as S } from "./PopupStore-BjRwcvbG.js";
|
|
14
|
+
import { n as C, r as w, t as ee } from "./safePolygon-DVAR5dQD.js";
|
|
15
|
+
import { n as T } from "./createPopupAutoResize-CSNpMz5v.js";
|
|
16
|
+
import { t as te } from "./createTransitionStatus-BL_cPSEA.js";
|
|
17
|
+
import { a as E, d as ne, g as D, h as re, i as ie, n as ae, o as O, r as k } from "./popupStateMapping-nhukB8NK.js";
|
|
18
|
+
import { t as A } from "./FocusManager-q7z7PMV1.js";
|
|
19
|
+
import { t as j } from "./setRef-fXF6OIo3.js";
|
|
20
|
+
import { t as M } from "./TriggerFocusGuards-Fzspp3Y1.js";
|
|
21
|
+
import { a as oe, i as se, n as ce, r as le, t as ue } from "./buttonSemantics-paljfpOX.js";
|
|
22
|
+
import { n as N } from "./DirectionContext-BwMabICS.js";
|
|
23
|
+
import { Portal as P, claimElement as F, createComponent as I, getNextElement as L, insert as de, memo as R, mergeProps as z, ref as fe, runHydrationEvents as B, scope as pe, spread as V, template as H } from "@solidjs/web";
|
|
24
|
+
import { Show as U, createContext as W, createEffect as G, createMemo as K, createSignal as q, createUniqueId as me, omit as J, onCleanup as Y, untrack as X, useContext as Z } from "solid-js";
|
|
25
|
+
//#region src/navigation-menu/store/NavigationMenuStore.ts
|
|
26
|
+
var he = class extends S {
|
|
27
|
+
tree;
|
|
28
|
+
parentStore;
|
|
29
|
+
orientation;
|
|
30
|
+
delay;
|
|
31
|
+
closeDelay;
|
|
32
|
+
controlled;
|
|
33
|
+
controlledValue;
|
|
34
|
+
onValueChange;
|
|
35
|
+
valueAccessor;
|
|
36
|
+
setValueSignal;
|
|
37
|
+
reasonAccessor;
|
|
38
|
+
setReasonSignal;
|
|
39
|
+
openMethodAccessor;
|
|
40
|
+
setOpenMethodSignal;
|
|
41
|
+
activationDirectionAccessor;
|
|
42
|
+
setActivationDirectionSignal;
|
|
43
|
+
viewportElementAccessor;
|
|
44
|
+
setViewportElementSignal;
|
|
45
|
+
viewportTargetAccessor;
|
|
46
|
+
setViewportTargetSignal;
|
|
47
|
+
contentVersionAccessor;
|
|
48
|
+
setContentVersionSignal;
|
|
49
|
+
valueTriggers = /* @__PURE__ */ new Map();
|
|
50
|
+
previousTrigger = null;
|
|
51
|
+
returnFocusTarget = null;
|
|
52
|
+
constructor(e) {
|
|
53
|
+
super(e), this.tree = e.tree, this.parentStore = e.parentStore, this.orientation = e.orientation, this.delay = e.delay, this.closeDelay = e.closeDelay, this.controlled = e.controlled, this.controlledValue = e.value, this.onValueChange = e.onValueChange;
|
|
54
|
+
let [t, n] = q(() => e.defaultValue, { ownedWrite: !0 });
|
|
55
|
+
this.valueAccessor = t, this.setValueSignal = n;
|
|
56
|
+
let [r, i] = q(null, { ownedWrite: !0 });
|
|
57
|
+
this.reasonAccessor = r, this.setReasonSignal = i;
|
|
58
|
+
let [a, o] = q(null, { ownedWrite: !0 });
|
|
59
|
+
this.openMethodAccessor = a, this.setOpenMethodSignal = o;
|
|
60
|
+
let [s, c] = q(null, { ownedWrite: !0 });
|
|
61
|
+
this.activationDirectionAccessor = s, this.setActivationDirectionSignal = c;
|
|
62
|
+
let [l, u] = q(null, { ownedWrite: !0 });
|
|
63
|
+
this.viewportElementAccessor = l, this.setViewportElementSignal = u;
|
|
64
|
+
let [d, f] = q(null, { ownedWrite: !0 });
|
|
65
|
+
this.viewportTargetAccessor = d, this.setViewportTargetSignal = f;
|
|
66
|
+
let [p, m] = q(0, { ownedWrite: !0 });
|
|
67
|
+
this.contentVersionAccessor = p, this.setContentVersionSignal = m;
|
|
68
|
+
}
|
|
69
|
+
value() {
|
|
70
|
+
return this.controlled ? this.controlledValue() ?? null : this.valueAccessor();
|
|
71
|
+
}
|
|
72
|
+
openChangeReason() {
|
|
73
|
+
return this.reasonAccessor();
|
|
74
|
+
}
|
|
75
|
+
openMethod() {
|
|
76
|
+
return this.openMethodAccessor();
|
|
77
|
+
}
|
|
78
|
+
setOpenMethod(e) {
|
|
79
|
+
this.setOpenMethodSignal(e);
|
|
80
|
+
}
|
|
81
|
+
activationDirection() {
|
|
82
|
+
return this.open() ? this.activationDirectionAccessor() : null;
|
|
83
|
+
}
|
|
84
|
+
viewportElement() {
|
|
85
|
+
return this.viewportElementAccessor();
|
|
86
|
+
}
|
|
87
|
+
setViewportElement(e) {
|
|
88
|
+
this.setViewportElementSignal(e);
|
|
89
|
+
}
|
|
90
|
+
viewportTarget() {
|
|
91
|
+
return this.viewportTargetAccessor();
|
|
92
|
+
}
|
|
93
|
+
setViewportTarget(e) {
|
|
94
|
+
this.setViewportTargetSignal(e);
|
|
95
|
+
}
|
|
96
|
+
contentVersion() {
|
|
97
|
+
return this.contentVersionAccessor();
|
|
98
|
+
}
|
|
99
|
+
returnFocusElement() {
|
|
100
|
+
return this.returnFocusTarget?.isConnected ? this.returnFocusTarget : null;
|
|
101
|
+
}
|
|
102
|
+
touchContent() {
|
|
103
|
+
this.setContentVersionSignal((e) => e + 1);
|
|
104
|
+
}
|
|
105
|
+
registerValueTrigger(e, t, n, r) {
|
|
106
|
+
return this.valueTriggers.set(e, {
|
|
107
|
+
id: t,
|
|
108
|
+
element: n,
|
|
109
|
+
value: r
|
|
110
|
+
}), this.syncValue(), () => {
|
|
111
|
+
this.valueTriggers.delete(e), this.syncValue();
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
updateValueTrigger(e, t, n, r) {
|
|
115
|
+
this.valueTriggers.set(e, {
|
|
116
|
+
id: t,
|
|
117
|
+
element: n,
|
|
118
|
+
value: r
|
|
119
|
+
}), this.syncValue();
|
|
120
|
+
}
|
|
121
|
+
syncValue() {
|
|
122
|
+
let e = this.value(), t = e != null, n = t ? Array.from(this.valueTriggers.values()).find((t) => Object.is(t.value, e)) : void 0;
|
|
123
|
+
this.update({
|
|
124
|
+
open: t,
|
|
125
|
+
activeTriggerId: n?.id ?? (t ? this.state.activeTriggerId : null),
|
|
126
|
+
activeTriggerElement: n?.element ?? (t ? this.state.activeTriggerElement : null)
|
|
127
|
+
}), t ? n && this.updateActivationDirection(n.element) : (this.setActivationDirectionSignal(null), this.previousTrigger = null, this.setOpenMethodSignal(null)), this.reconcileTriggers();
|
|
128
|
+
}
|
|
129
|
+
setValue(e, t) {
|
|
130
|
+
let n = this.value();
|
|
131
|
+
if (Object.is(e, n) || this.onValueChange()?.(e, t), t.isCanceled) return !1;
|
|
132
|
+
let r = e == null ? void 0 : Array.from(this.valueTriggers.values()).find((t) => Object.is(t.value, e));
|
|
133
|
+
r && !t.trigger && (t.trigger = r.element), this.controlled || this.setValueSignal(() => e), this.setReasonSignal(t.reason), e != null && t.trigger instanceof HTMLElement && (this.returnFocusTarget = t.trigger, this.updateActivationDirection(t.trigger));
|
|
134
|
+
let i = super.setOpen(e != null, t);
|
|
135
|
+
return i && !this.controlled && this.syncValue(), i && e == null && t.reason === "link-press" && this.parentStore && this.parentStore.setValue(null, t), i;
|
|
136
|
+
}
|
|
137
|
+
setOpen(e, t) {
|
|
138
|
+
if (!e) return this.setValue(null, t);
|
|
139
|
+
let n = t.trigger, r = Array.from(this.valueTriggers.values()).find((e) => e.element === n || e.id === n?.id);
|
|
140
|
+
return r ? this.setValue(r.value, t) : !1;
|
|
141
|
+
}
|
|
142
|
+
updateActivationDirection(e) {
|
|
143
|
+
let t = this.previousTrigger;
|
|
144
|
+
if (this.previousTrigger = e, !t || t === e || !t.isConnected) return;
|
|
145
|
+
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
146
|
+
this.orientation() === "horizontal" && r.left !== n.left ? this.setActivationDirectionSignal(r.left > n.left ? "right" : "left") : this.orientation() === "vertical" && r.top !== n.top && this.setActivationDirectionSignal(r.top > n.top ? "down" : "up");
|
|
147
|
+
}
|
|
148
|
+
}, ge = Symbol("NavigationMenuRootContext"), _e = W(ge);
|
|
149
|
+
function Q(e = !1) {
|
|
150
|
+
let t = Z(_e);
|
|
151
|
+
if (t === ge) {
|
|
152
|
+
if (e) return;
|
|
153
|
+
throw Error("Base UI: NavigationMenuRootContext is missing. Navigation Menu parts must be placed within <NavigationMenu.Root>.");
|
|
154
|
+
}
|
|
155
|
+
return t;
|
|
156
|
+
}
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/navigation-menu/root/NavigationMenuRoot.tsx
|
|
159
|
+
var ve = /* @__PURE__ */ H("<div>"), ye = /* @__PURE__ */ H("<nav>");
|
|
160
|
+
function be(e) {
|
|
161
|
+
let r = Q(!0), i = m(), s = v(), c = e, l = e, u = X(() => c.value !== void 0), d = s !== null && r !== void 0, f = i ?? new _(), p = me(), S = me(), C = K(() => c.orientation ?? "horizontal"), w = K(() => c.delay ?? 50), ee = K(() => c.closeDelay ?? 50), T = new he({
|
|
162
|
+
controlled: u,
|
|
163
|
+
value: () => c.value,
|
|
164
|
+
defaultValue: X(() => c.defaultValue ?? null),
|
|
165
|
+
onValueChange: () => c.onValueChange,
|
|
166
|
+
controlledOpen: () => u ? c.value != null : void 0,
|
|
167
|
+
floatingId: S,
|
|
168
|
+
nested: d,
|
|
169
|
+
nodeId: p,
|
|
170
|
+
onOpenChangeComplete: () => c.onOpenChangeComplete,
|
|
171
|
+
orientation: C,
|
|
172
|
+
delay: w,
|
|
173
|
+
closeDelay: ee,
|
|
174
|
+
tree: f,
|
|
175
|
+
parentStore: r?.store
|
|
176
|
+
});
|
|
177
|
+
T.update({ open: X(() => T.value() != null) });
|
|
178
|
+
let te = h({
|
|
179
|
+
tree: f,
|
|
180
|
+
id: p,
|
|
181
|
+
parentId: s,
|
|
182
|
+
context: () => T.context.floatingRoot
|
|
183
|
+
}), [E, ne] = q(null, { ownedWrite: !0 }), [D, re] = q(null, { ownedWrite: !0 }), [ie, ae] = q(null, { ownedWrite: !0 }), [O, k] = q(null, { ownedWrite: !0 }), A = b(T, () => T.track().popupElement), j = {
|
|
184
|
+
store: T,
|
|
185
|
+
nested: d,
|
|
186
|
+
presence: A,
|
|
187
|
+
rootElement: E,
|
|
188
|
+
beforeContentGuard: D,
|
|
189
|
+
setBeforeContentGuard: re,
|
|
190
|
+
afterTriggerGuard: ie,
|
|
191
|
+
setAfterTriggerGuard: ae,
|
|
192
|
+
backdropElement: O,
|
|
193
|
+
setBackdropElement: k
|
|
194
|
+
}, M = K(() => ({
|
|
195
|
+
open: T.open(),
|
|
196
|
+
nested: d
|
|
197
|
+
})), oe = K(() => a(e.class, M())), se = K(() => o(e.style, M())), ce = K(() => n(M())), le = J(l, "actionsRef", "render", "class", "closeDelay", "defaultValue", "delay", "onOpenChangeComplete", "onValueChange", "orientation", "ref", "style", "value");
|
|
198
|
+
T.context.floatingRoot.context.data.insideElements = () => [O()];
|
|
199
|
+
let ue = x({
|
|
200
|
+
context: T.context.floatingRoot,
|
|
201
|
+
tree: () => f,
|
|
202
|
+
outsidePressEvent: () => "intentional"
|
|
203
|
+
});
|
|
204
|
+
T.setInteractionProps({
|
|
205
|
+
activeTriggerProps: { onKeyDown: ue.onKeyDown },
|
|
206
|
+
inactiveTriggerProps: { onKeyDown: ue.onKeyDown },
|
|
207
|
+
popupProps: { onKeyDown: ue.onKeyDown }
|
|
208
|
+
}), G(() => ({
|
|
209
|
+
value: T.value(),
|
|
210
|
+
manualUnmount: c.actionsRef !== void 0
|
|
211
|
+
}), (e) => X(() => {
|
|
212
|
+
e.value == null && e.manualUnmount && T.set("preventUnmountingOnClose", !0), T.syncValue();
|
|
213
|
+
}));
|
|
214
|
+
let N = { unmount: A.forceUnmount };
|
|
215
|
+
G(() => c.actionsRef, (e) => {
|
|
216
|
+
e?.(N);
|
|
217
|
+
});
|
|
218
|
+
let P = 0;
|
|
219
|
+
G(() => ({
|
|
220
|
+
mounted: A.mounted(),
|
|
221
|
+
open: T.open(),
|
|
222
|
+
reason: T.openChangeReason()
|
|
223
|
+
}), (e) => {
|
|
224
|
+
if (!(e.open || e.mounted || e.reason == null || e.reason === "trigger-hover" || e.reason === "outside-press" || e.reason === "focus-out")) return P = requestAnimationFrame(() => {
|
|
225
|
+
X(() => T.returnFocusElement())?.focus({ preventScroll: !0 });
|
|
226
|
+
}), () => {
|
|
227
|
+
typeof cancelAnimationFrame == "function" && cancelAnimationFrame(P);
|
|
228
|
+
};
|
|
229
|
+
}), Y(() => {
|
|
230
|
+
typeof cancelAnimationFrame == "function" && cancelAnimationFrame(P), T.clearInteractionProps(), delete T.context.floatingRoot.context.data.insideElements;
|
|
231
|
+
});
|
|
232
|
+
let F = t(e, () => M(), (e) => d ? (() => {
|
|
233
|
+
var t = L(ve);
|
|
234
|
+
return V(t, e, !1), B(), t;
|
|
235
|
+
})() : (() => {
|
|
236
|
+
var t = L(ye);
|
|
237
|
+
return V(t, e, !1), B(), t;
|
|
238
|
+
})());
|
|
239
|
+
return I(_e, {
|
|
240
|
+
value: j,
|
|
241
|
+
get children() {
|
|
242
|
+
return I(g, {
|
|
243
|
+
value: f,
|
|
244
|
+
get children() {
|
|
245
|
+
return I(y, {
|
|
246
|
+
get value() {
|
|
247
|
+
return te.id ?? null;
|
|
248
|
+
},
|
|
249
|
+
get children() {
|
|
250
|
+
return I(F, z({
|
|
251
|
+
ref: [((e) => ne(e)), c.ref],
|
|
252
|
+
get class() {
|
|
253
|
+
return oe();
|
|
254
|
+
},
|
|
255
|
+
get style() {
|
|
256
|
+
return se();
|
|
257
|
+
}
|
|
258
|
+
}, ce, le));
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region src/navigation-menu/composite/NavigationMenuCompositeContext.ts
|
|
268
|
+
var xe = Symbol("NavigationMenuCompositeContext"), Se = W(xe);
|
|
269
|
+
function Ce() {
|
|
270
|
+
let e = Z(Se);
|
|
271
|
+
return e === xe ? void 0 : e;
|
|
272
|
+
}
|
|
273
|
+
function we(e) {
|
|
274
|
+
let [t, n] = q(), [r, i] = q(0), a = /* @__PURE__ */ new Map(), o = 0, s = !1;
|
|
275
|
+
function c() {
|
|
276
|
+
s || (s = !0, queueMicrotask(() => {
|
|
277
|
+
s = !1, i((e) => e + 1);
|
|
278
|
+
}));
|
|
279
|
+
}
|
|
280
|
+
function l(e) {
|
|
281
|
+
return e.order = o, o += 1, a.set(e.token, e), c(), () => {
|
|
282
|
+
a.delete(e.token), c();
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
function u() {
|
|
286
|
+
return r(), Array.from(a.values()).filter((e) => {
|
|
287
|
+
let t = e.element();
|
|
288
|
+
return !!(t?.isConnected && !e.disabled() && !t.matches(":disabled"));
|
|
289
|
+
}).sort((e, t) => {
|
|
290
|
+
let n = e.element(), r = t.element();
|
|
291
|
+
if (n && r && n !== r) {
|
|
292
|
+
let e = n.compareDocumentPosition(r);
|
|
293
|
+
if ((e & Node.DOCUMENT_POSITION_DISCONNECTED) === 0) {
|
|
294
|
+
if (e & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
|
|
295
|
+
if (e & Node.DOCUMENT_POSITION_PRECEDING) return 1;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return e.order - t.order;
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function d(e) {
|
|
302
|
+
let t = e.composedPath();
|
|
303
|
+
return u().find((e) => {
|
|
304
|
+
let n = e.element();
|
|
305
|
+
return !!(n && t.includes(n));
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
return {
|
|
309
|
+
isTabStop(e) {
|
|
310
|
+
let n = u();
|
|
311
|
+
return (n.find((e) => e.token === t()) ?? n[0])?.token === e.token;
|
|
312
|
+
},
|
|
313
|
+
notifyItemChange: c,
|
|
314
|
+
registerItem: l,
|
|
315
|
+
setActiveItem(e) {
|
|
316
|
+
e.disabled() || n(e.token);
|
|
317
|
+
},
|
|
318
|
+
handleKeyDown(t) {
|
|
319
|
+
if (t.shiftKey || t.ctrlKey || t.altKey || t.metaKey) return !1;
|
|
320
|
+
let r = e.orientation() === "vertical" ? "ArrowDown" : e.direction() === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
321
|
+
if (![
|
|
322
|
+
r,
|
|
323
|
+
e.orientation() === "vertical" ? "ArrowUp" : e.direction() === "rtl" ? "ArrowRight" : "ArrowLeft",
|
|
324
|
+
"Home",
|
|
325
|
+
"End"
|
|
326
|
+
].includes(t.key)) return !1;
|
|
327
|
+
let i = u();
|
|
328
|
+
if (i.length === 0) return !0;
|
|
329
|
+
let a = d(t), o = a ? i.indexOf(a) : -1;
|
|
330
|
+
o = t.key === "Home" ? 0 : t.key === "End" ? i.length - 1 : Math.max(0, Math.min(i.length - 1, o + (t.key === r ? 1 : -1)));
|
|
331
|
+
let s = i[o];
|
|
332
|
+
return t.preventDefault(), t.stopPropagation(), s && (n(s.token), queueMicrotask(() => s.element()?.focus({ preventScroll: !0 }))), !0;
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region src/navigation-menu/list/NavigationMenuList.tsx
|
|
338
|
+
var Te = /* @__PURE__ */ H("<ul>");
|
|
339
|
+
function Ee(e) {
|
|
340
|
+
let r = Q(), i = N(), s = e, u = e, d = K(() => ({ open: r.store.open() })), f = K(() => a(e.class, d())), p = K(() => o(e.style, d())), m = K(() => n(d())), h = J(u, "render", "class", "onKeyDown", "ref", "style"), g = we({
|
|
341
|
+
orientation: r.store.orientation,
|
|
342
|
+
direction: i
|
|
343
|
+
}), _ = c(l(() => s.onKeyDown), (e) => {
|
|
344
|
+
r.nested || g.handleKeyDown(e);
|
|
345
|
+
}), v = t(e, () => d(), (e) => (() => {
|
|
346
|
+
var t = L(Te);
|
|
347
|
+
return V(t, e, !1), B(), t;
|
|
348
|
+
})());
|
|
349
|
+
function y() {
|
|
350
|
+
return I(v, z({
|
|
351
|
+
ref: [s.ref],
|
|
352
|
+
get class() {
|
|
353
|
+
return f();
|
|
354
|
+
},
|
|
355
|
+
get style() {
|
|
356
|
+
return p();
|
|
357
|
+
},
|
|
358
|
+
onKeyDown: _
|
|
359
|
+
}, m, h));
|
|
360
|
+
}
|
|
361
|
+
return r.nested ? I(y, {}) : I(Se, {
|
|
362
|
+
value: g,
|
|
363
|
+
get children() {
|
|
364
|
+
return I(y, {});
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
//#endregion
|
|
369
|
+
//#region src/navigation-menu/item/NavigationMenuItemContext.ts
|
|
370
|
+
var De = Symbol("NavigationMenuItemContext"), Oe = W(De);
|
|
371
|
+
function ke() {
|
|
372
|
+
let e = Z(Oe);
|
|
373
|
+
if (e === De) throw Error("Base UI: NavigationMenuItem parts must be used within a <NavigationMenu.Item>.");
|
|
374
|
+
return e;
|
|
375
|
+
}
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/navigation-menu/item/NavigationMenuItem.tsx
|
|
378
|
+
var Ae = /* @__PURE__ */ H("<li>");
|
|
379
|
+
function je(e) {
|
|
380
|
+
let n = `base-ui-${me()}`, r = e, i = e, s = K(() => r.value ?? n), c = {}, l = K(() => a(e.class, c)), u = K(() => o(e.style, c)), d = J(i, "render", "class", "ref", "style", "value"), f = { value: s }, p = t(e, () => c, (e) => (() => {
|
|
381
|
+
var t = L(Ae);
|
|
382
|
+
return V(t, e, !1), B(), t;
|
|
383
|
+
})());
|
|
384
|
+
return I(Oe, {
|
|
385
|
+
value: f,
|
|
386
|
+
get children() {
|
|
387
|
+
return I(p, z({
|
|
388
|
+
ref: [r.ref],
|
|
389
|
+
get class() {
|
|
390
|
+
return l();
|
|
391
|
+
},
|
|
392
|
+
get style() {
|
|
393
|
+
return u();
|
|
394
|
+
}
|
|
395
|
+
}, d));
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
//#endregion
|
|
400
|
+
//#region src/navigation-menu/trigger/NavigationMenuTrigger.tsx
|
|
401
|
+
var Me = /* @__PURE__ */ H("<button>");
|
|
402
|
+
function Ne(e) {
|
|
403
|
+
let i = Q(), u = ke(), d = Ce(), f = N(), m = e, h = e, g = `base-ui-${me()}`, _ = K(() => m.id ?? g), v = K(() => m.disabled ?? !1), y = K(() => m.nativeButton ?? !0), [b, x] = q(null, { ownedWrite: !0 }), S = K(() => i.store.open() && Object.is(i.store.value(), u.value())), C = K(() => ({
|
|
404
|
+
open: S(),
|
|
405
|
+
disabled: v()
|
|
406
|
+
})), T = K(() => a(e.class, C())), te = K(() => o(e.style, C())), E = K(() => n(C(), ie)), ne = J(h, "render", "class", "disabled", "id", "nativeButton", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style"), D = {
|
|
407
|
+
token: Symbol("NavigationMenuTrigger"),
|
|
408
|
+
order: 0,
|
|
409
|
+
element: b,
|
|
410
|
+
disabled: v
|
|
411
|
+
}, re = Symbol("NavigationMenuValueTrigger"), ae = d?.registerItem(D), O, k, A, j = "", P = !0, F;
|
|
412
|
+
G(() => ({
|
|
413
|
+
element: b(),
|
|
414
|
+
id: _(),
|
|
415
|
+
value: u.value()
|
|
416
|
+
}), (e) => {
|
|
417
|
+
if (O?.(), k?.(), e.element) return X(() => {
|
|
418
|
+
O = i.store.registerTrigger(e.id, e.element), k = i.store.registerValueTrigger(re, e.id, e.element, e.value);
|
|
419
|
+
}), () => {
|
|
420
|
+
X(() => {
|
|
421
|
+
O?.(), k?.();
|
|
422
|
+
}), O = void 0, k = void 0;
|
|
423
|
+
};
|
|
424
|
+
}), G(() => ({
|
|
425
|
+
open: S(),
|
|
426
|
+
reason: i.store.openChangeReason()
|
|
427
|
+
}), (e) => {
|
|
428
|
+
clearTimeout(F), P = e.open && e.reason === "trigger-hover", P && (F = setTimeout(() => {
|
|
429
|
+
P = !1;
|
|
430
|
+
}, 500));
|
|
431
|
+
}), G(() => ({
|
|
432
|
+
element: b(),
|
|
433
|
+
disabled: v()
|
|
434
|
+
}), () => d?.notifyItemChange()), A = p({
|
|
435
|
+
context: i.store.context.floatingRoot,
|
|
436
|
+
enabled: () => !v(),
|
|
437
|
+
stickIfOpen: () => P
|
|
438
|
+
}), w({
|
|
439
|
+
context: i.store.context.floatingRoot,
|
|
440
|
+
reference: b,
|
|
441
|
+
floating: () => i.store.track().positionerElement ?? i.store.viewportElement(),
|
|
442
|
+
tree: () => i.store.tree,
|
|
443
|
+
enabled: () => !v(),
|
|
444
|
+
floatingEnabled: () => !v(),
|
|
445
|
+
delay: () => ({ close: i.store.closeDelay() }),
|
|
446
|
+
restMs: () => i.store.open() ? 0 : i.store.delay(),
|
|
447
|
+
restOnly: () => !0,
|
|
448
|
+
handleClose: () => ee({ blockPointerEvents: !0 }),
|
|
449
|
+
mouseOnly: () => !0,
|
|
450
|
+
blockPointerEventsScope: () => (i.nested && i.store.track().positionerElement, b()?.closest("ul"))
|
|
451
|
+
});
|
|
452
|
+
function de(e) {
|
|
453
|
+
j = e.pointerType, A?.onPointerDown(e);
|
|
454
|
+
}
|
|
455
|
+
function fe(e) {
|
|
456
|
+
A?.onMouseDown(e);
|
|
457
|
+
}
|
|
458
|
+
function pe(e) {
|
|
459
|
+
i.store.setOpenMethod(j || (e.detail === 0 ? "keyboard" : "mouse")), A?.onClick(e), j = "";
|
|
460
|
+
}
|
|
461
|
+
function H() {
|
|
462
|
+
d?.setActiveItem(D);
|
|
463
|
+
}
|
|
464
|
+
function U(e) {
|
|
465
|
+
let t = i.store.state[S() ? "activeTriggerProps" : "inactiveTriggerProps"].onKeyDown;
|
|
466
|
+
if (typeof t == "function" && t(e), e.defaultPrevented || v() || d?.handleKeyDown(e) || i.nested) return;
|
|
467
|
+
let n = i.store.orientation() === "horizontal" ? "ArrowDown" : f() === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
468
|
+
e.key === n && (e.preventDefault(), e.stopPropagation(), i.store.setOpenMethod("keyboard"), i.store.setValue(u.value(), s(r, e, b() ?? void 0)));
|
|
469
|
+
}
|
|
470
|
+
let W = c(l(() => X(() => v() ? le : void 0)), l(() => m.onClick), pe), Z = c(l(() => m.onFocus), H), he = c(l(() => X(() => v() ? le : void 0)), l(() => m.onPointerDown), de), ge = c(l(() => X(() => v() ? oe : void 0)), l(() => m.onMouseDown), fe), _e = c(l(() => X(() => v() ? se : void 0)), l(() => m.onKeyDown), U, l(() => X(() => y() ? void 0 : ue))), ve = c(l(() => X(() => v() ? oe : void 0)), l(() => m.onKeyUp), l(() => X(() => y() ? void 0 : ce))), ye = t(e, () => C(), (e) => (() => {
|
|
471
|
+
var t = L(Me);
|
|
472
|
+
return V(t, e, !1), B(), t;
|
|
473
|
+
})()), be = I(ye, z({
|
|
474
|
+
ref: [((e) => x(e)), m.ref],
|
|
475
|
+
get id() {
|
|
476
|
+
return _();
|
|
477
|
+
},
|
|
478
|
+
get type() {
|
|
479
|
+
return y() ? "button" : void 0;
|
|
480
|
+
},
|
|
481
|
+
get role() {
|
|
482
|
+
return y() ? void 0 : "button";
|
|
483
|
+
},
|
|
484
|
+
get tabIndex() {
|
|
485
|
+
return d ? d.isTabStop(D) ? 0 : -1 : 0;
|
|
486
|
+
},
|
|
487
|
+
get disabled() {
|
|
488
|
+
return (R(() => !!y())() ? v() : y()) || void 0;
|
|
489
|
+
},
|
|
490
|
+
get "aria-disabled"() {
|
|
491
|
+
return !y() && v() ? "true" : void 0;
|
|
492
|
+
},
|
|
493
|
+
get "aria-expanded"() {
|
|
494
|
+
return S() ? "true" : "false";
|
|
495
|
+
},
|
|
496
|
+
get "aria-controls"() {
|
|
497
|
+
return R(() => !!S())() ? i.store.popupId() : void 0;
|
|
498
|
+
},
|
|
499
|
+
"data-base-ui-navigation-menu-trigger": "",
|
|
500
|
+
get "data-trigger-disabled"() {
|
|
501
|
+
return v() ? "" : void 0;
|
|
502
|
+
},
|
|
503
|
+
get class() {
|
|
504
|
+
return T();
|
|
505
|
+
},
|
|
506
|
+
get style() {
|
|
507
|
+
return te();
|
|
508
|
+
},
|
|
509
|
+
onClick: W,
|
|
510
|
+
onFocus: Z,
|
|
511
|
+
onKeyDown: _e,
|
|
512
|
+
onKeyUp: ve,
|
|
513
|
+
onMouseDown: ge,
|
|
514
|
+
onPointerDown: he
|
|
515
|
+
}, E, ne));
|
|
516
|
+
return Y(() => {
|
|
517
|
+
clearTimeout(F), ae?.(), O?.(), k?.();
|
|
518
|
+
}), I(M, {
|
|
519
|
+
get context() {
|
|
520
|
+
return i.store.context.floatingRoot;
|
|
521
|
+
},
|
|
522
|
+
get enabled() {
|
|
523
|
+
return R(() => !!S())() ? i.presence.mounted() : S();
|
|
524
|
+
},
|
|
525
|
+
trigger: b,
|
|
526
|
+
positioner: () => i.store.track().positionerElement ?? i.store.viewportElement(),
|
|
527
|
+
get beforeContentGuard() {
|
|
528
|
+
return i.beforeContentGuard;
|
|
529
|
+
},
|
|
530
|
+
get afterGuardRef() {
|
|
531
|
+
return i.setAfterTriggerGuard;
|
|
532
|
+
},
|
|
533
|
+
children: be
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region src/navigation-menu/icon/NavigationMenuIcon.tsx
|
|
538
|
+
var Pe = /* @__PURE__ */ H("<span>");
|
|
539
|
+
function Fe(e) {
|
|
540
|
+
let r = Q(), i = ke(), s = e, c = e, l = K(() => ({ open: r.store.open() && Object.is(r.store.value(), i.value()) })), u = K(() => a(e.class, l())), d = K(() => o(e.style, l())), f = K(() => n(l(), E)), p = J(c, "render", "class", "ref", "style"), m = t(e, () => l(), (e) => (() => {
|
|
541
|
+
var t = L(Pe);
|
|
542
|
+
return V(t, e, !1), B(), t;
|
|
543
|
+
})());
|
|
544
|
+
return I(m, z({
|
|
545
|
+
ref: [s.ref],
|
|
546
|
+
"aria-hidden": "true",
|
|
547
|
+
get class() {
|
|
548
|
+
return u();
|
|
549
|
+
},
|
|
550
|
+
get style() {
|
|
551
|
+
return d();
|
|
552
|
+
}
|
|
553
|
+
}, f, p, { get children() {
|
|
554
|
+
return e.children ?? "▼";
|
|
555
|
+
} }));
|
|
556
|
+
}
|
|
557
|
+
//#endregion
|
|
558
|
+
//#region src/navigation-menu/utils/mergeNavigationMenuStyles.ts
|
|
559
|
+
function $(e, t) {
|
|
560
|
+
if (typeof t == "string") {
|
|
561
|
+
let n = Object.entries(e).filter((e) => e[1] != null).map(([e, t]) => `${e}:${String(t)}`).join(";");
|
|
562
|
+
return n ? `${n};${t}` : t;
|
|
563
|
+
}
|
|
564
|
+
return {
|
|
565
|
+
...e,
|
|
566
|
+
...t || void 0
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/navigation-menu/content/NavigationMenuContent.tsx
|
|
571
|
+
var Ie = /* @__PURE__ */ H("<div>"), Le = {
|
|
572
|
+
...k,
|
|
573
|
+
activationDirection: (e) => e ? { "data-activation-direction": e } : null
|
|
574
|
+
};
|
|
575
|
+
function Re(e) {
|
|
576
|
+
let r = Q(), i = ke(), s = N(), d = e, f = e, p = K(() => r.presence.mounted() && Object.is(r.store.value(), i.value())), m = te(p), [h, g] = q(null, { ownedWrite: !0 }), [_, v] = q(!1, { ownedWrite: !0 }), y = we({
|
|
577
|
+
orientation: () => "vertical",
|
|
578
|
+
direction: s
|
|
579
|
+
}), b = K(() => ({
|
|
580
|
+
open: p(),
|
|
581
|
+
transitionStatus: m.transitionStatus(),
|
|
582
|
+
activationDirection: r.store.activationDirection()
|
|
583
|
+
})), x = K(() => a(e.class, b())), S = K(() => $(!p() && m.mounted() ? {
|
|
584
|
+
position: "absolute",
|
|
585
|
+
top: 0,
|
|
586
|
+
left: 0
|
|
587
|
+
} : {}, o(e.style, b()))), C = K(() => n(b(), Le)), w = J(f, "render", "class", "keepMounted", "onKeyDown", "ref", "style"), ee = c(l(() => d.onKeyDown), (e) => y.handleKeyDown(e));
|
|
588
|
+
G(() => ({
|
|
589
|
+
open: p(),
|
|
590
|
+
mounted: m.mounted(),
|
|
591
|
+
element: h()
|
|
592
|
+
}), (e) => {
|
|
593
|
+
if (!e.mounted || e.open) return;
|
|
594
|
+
if (!e.element) {
|
|
595
|
+
queueMicrotask(() => m.setMounted(!1));
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
let t = new AbortController();
|
|
599
|
+
return u(e.element, () => m.setMounted(!1), t.signal), () => t.abort();
|
|
600
|
+
}), G(() => r.presence.mounted(), (e) => {
|
|
601
|
+
e || m.setMounted(!1);
|
|
602
|
+
}), G(() => ({
|
|
603
|
+
target: r.store.viewportTarget(),
|
|
604
|
+
open: p()
|
|
605
|
+
}), (e) => {
|
|
606
|
+
e.target && v(!0), e.open && X(() => r.store.touchContent());
|
|
607
|
+
}), G(() => h(), (e) => {
|
|
608
|
+
if (!e || typeof MutationObserver > "u") return;
|
|
609
|
+
let t = new MutationObserver(() => r.store.touchContent());
|
|
610
|
+
return t.observe(e, {
|
|
611
|
+
attributes: !0,
|
|
612
|
+
childList: !0,
|
|
613
|
+
subtree: !0,
|
|
614
|
+
characterData: !0,
|
|
615
|
+
attributeFilter: ["hidden"]
|
|
616
|
+
}), () => t.disconnect();
|
|
617
|
+
}), Y(() => {
|
|
618
|
+
X(h) && g(null);
|
|
619
|
+
});
|
|
620
|
+
function T() {
|
|
621
|
+
return I(Se, {
|
|
622
|
+
value: y,
|
|
623
|
+
get children() {
|
|
624
|
+
return I(E, z({
|
|
625
|
+
ref: [((e) => g(e)), d.ref],
|
|
626
|
+
get hidden() {
|
|
627
|
+
return (R(() => !!(d.keepMounted ?? !1))() ? !m.mounted() : d.keepMounted ?? !1) || void 0;
|
|
628
|
+
},
|
|
629
|
+
get inert() {
|
|
630
|
+
return R(() => !p())() && m.mounted() || void 0;
|
|
631
|
+
},
|
|
632
|
+
get class() {
|
|
633
|
+
return x();
|
|
634
|
+
},
|
|
635
|
+
get style() {
|
|
636
|
+
return S();
|
|
637
|
+
},
|
|
638
|
+
onKeyDown: ee
|
|
639
|
+
}, C, w));
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
let E = t(e, () => b(), (e) => (() => {
|
|
644
|
+
var t = L(Ie);
|
|
645
|
+
return V(t, e, !1), B(), t;
|
|
646
|
+
})());
|
|
647
|
+
return I(U, {
|
|
648
|
+
get when() {
|
|
649
|
+
return R(() => !!r.store.viewportTarget())() ? m.mounted() || d.keepMounted : r.store.viewportTarget();
|
|
650
|
+
},
|
|
651
|
+
get fallback() {
|
|
652
|
+
return I(U, {
|
|
653
|
+
get when() {
|
|
654
|
+
return R(() => !!d.keepMounted)() ? !_() : d.keepMounted;
|
|
655
|
+
},
|
|
656
|
+
get children() {
|
|
657
|
+
return I(T, {});
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
},
|
|
661
|
+
get children() {
|
|
662
|
+
return I(P, {
|
|
663
|
+
get mount() {
|
|
664
|
+
return r.store.viewportTarget();
|
|
665
|
+
},
|
|
666
|
+
get children() {
|
|
667
|
+
return I(T, {});
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region src/navigation-menu/link/NavigationMenuLink.tsx
|
|
675
|
+
var ze = /* @__PURE__ */ H("<a>");
|
|
676
|
+
function Be(e) {
|
|
677
|
+
let r = Q(), u = Ce(), d = e, f = e, [p, m] = q(null, { ownedWrite: !0 }), h = {
|
|
678
|
+
token: Symbol("NavigationMenuLink"),
|
|
679
|
+
order: 0,
|
|
680
|
+
element: p,
|
|
681
|
+
disabled: () => !1
|
|
682
|
+
}, g = u?.registerItem(h), _ = K(() => ({ active: d.active ?? !1 })), v = K(() => a(e.class, _())), y = K(() => o(e.style, _())), b = K(() => n(_())), x = J(f, "active", "render", "class", "closeOnClick", "onClick", "onFocus", "ref", "style");
|
|
683
|
+
G(p, () => u?.notifyItemChange());
|
|
684
|
+
let S = c(l(() => d.onFocus), () => u?.setActiveItem(h)), C = c(l(() => d.onClick), (e) => {
|
|
685
|
+
d.closeOnClick && r.store.setValue(null, s(i, e));
|
|
686
|
+
});
|
|
687
|
+
Y(() => g?.());
|
|
688
|
+
let w = t(e, () => _(), (e) => (() => {
|
|
689
|
+
var t = L(ze);
|
|
690
|
+
return F(t), V(t, e, !1), B(), t;
|
|
691
|
+
})());
|
|
692
|
+
return I(w, z({
|
|
693
|
+
ref: [((e) => m(e)), d.ref],
|
|
694
|
+
get "aria-current"() {
|
|
695
|
+
return _().active ? "page" : void 0;
|
|
696
|
+
},
|
|
697
|
+
get tabIndex() {
|
|
698
|
+
return u ? u.isTabStop(h) ? 0 : -1 : void 0;
|
|
699
|
+
},
|
|
700
|
+
get class() {
|
|
701
|
+
return v();
|
|
702
|
+
},
|
|
703
|
+
get style() {
|
|
704
|
+
return y();
|
|
705
|
+
},
|
|
706
|
+
onClick: C,
|
|
707
|
+
onFocus: S
|
|
708
|
+
}, b, x));
|
|
709
|
+
}
|
|
710
|
+
//#endregion
|
|
711
|
+
//#region src/navigation-menu/portal/NavigationMenuPortalContext.ts
|
|
712
|
+
var Ve = Symbol("NavigationMenuPortalContext"), He = W(Ve);
|
|
713
|
+
function Ue() {
|
|
714
|
+
let e = Z(He);
|
|
715
|
+
if (e === Ve) throw Error("Base UI: <NavigationMenu.Portal> is missing.");
|
|
716
|
+
return e;
|
|
717
|
+
}
|
|
718
|
+
//#endregion
|
|
719
|
+
//#region src/navigation-menu/portal/NavigationMenuPortal.tsx
|
|
720
|
+
function We(e) {
|
|
721
|
+
let t = Q(), n = e, r = e, i = K(() => n.keepMounted ?? !1), s = K(() => t.presence.mounted() || i()), c = {}, l = K(() => a(e.class, c)), u = K(() => o(e.style, c)), d = J(r, "render", "class", "container", "keepMounted", "ref", "style"), f = { keepMounted: i };
|
|
722
|
+
return I(U, {
|
|
723
|
+
get when() {
|
|
724
|
+
return s();
|
|
725
|
+
},
|
|
726
|
+
get children() {
|
|
727
|
+
return I(He, {
|
|
728
|
+
value: f,
|
|
729
|
+
get children() {
|
|
730
|
+
return I(O, z({
|
|
731
|
+
get render() {
|
|
732
|
+
return e.render;
|
|
733
|
+
},
|
|
734
|
+
get container() {
|
|
735
|
+
return n.container;
|
|
736
|
+
},
|
|
737
|
+
ref: (e) => j(n.ref, e),
|
|
738
|
+
get class() {
|
|
739
|
+
return l();
|
|
740
|
+
},
|
|
741
|
+
get style() {
|
|
742
|
+
return u();
|
|
743
|
+
}
|
|
744
|
+
}, d, { get children() {
|
|
745
|
+
return e.children;
|
|
746
|
+
} }));
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
//#endregion
|
|
753
|
+
//#region src/navigation-menu/backdrop/NavigationMenuBackdrop.tsx
|
|
754
|
+
var Ge = /* @__PURE__ */ H("<div>");
|
|
755
|
+
function Ke(e) {
|
|
756
|
+
let r = Q(), i = e, s = e, c = K(() => ({
|
|
757
|
+
open: r.store.open(),
|
|
758
|
+
transitionStatus: r.store.track().transitionStatus
|
|
759
|
+
})), l = K(() => a(e.class, c())), u = K(() => $({
|
|
760
|
+
"user-select": "none",
|
|
761
|
+
"-webkit-user-select": "none"
|
|
762
|
+
}, o(e.style, c()))), d = K(() => n(c(), k)), f = J(s, "render", "class", "ref", "style"), p = null;
|
|
763
|
+
Y(() => {
|
|
764
|
+
r.backdropElement() === p && r.setBackdropElement(null);
|
|
765
|
+
});
|
|
766
|
+
let m = t(e, () => c(), (e) => (() => {
|
|
767
|
+
var t = L(Ge);
|
|
768
|
+
return V(t, e, !1), B(), t;
|
|
769
|
+
})());
|
|
770
|
+
return I(m, z({
|
|
771
|
+
ref: [((e) => {
|
|
772
|
+
p = e, r.setBackdropElement(e);
|
|
773
|
+
}), i.ref],
|
|
774
|
+
role: "presentation",
|
|
775
|
+
get hidden() {
|
|
776
|
+
return !r.presence.mounted();
|
|
777
|
+
},
|
|
778
|
+
get class() {
|
|
779
|
+
return l();
|
|
780
|
+
},
|
|
781
|
+
get style() {
|
|
782
|
+
return u();
|
|
783
|
+
}
|
|
784
|
+
}, d, f));
|
|
785
|
+
}
|
|
786
|
+
//#endregion
|
|
787
|
+
//#region src/navigation-menu/positioner/NavigationMenuPositionerContext.ts
|
|
788
|
+
var qe = Symbol("NavigationMenuPositionerContext"), Je = W(qe);
|
|
789
|
+
function Ye(e = !1) {
|
|
790
|
+
let t = Z(Je);
|
|
791
|
+
if (t === qe) {
|
|
792
|
+
if (e) return;
|
|
793
|
+
throw Error("Base UI: NavigationMenuPositionerContext is missing. NavigationMenuPositioner parts must be placed within <NavigationMenu.Positioner>.");
|
|
794
|
+
}
|
|
795
|
+
return t;
|
|
796
|
+
}
|
|
797
|
+
//#endregion
|
|
798
|
+
//#region src/navigation-menu/positioner/NavigationMenuPositioner.tsx
|
|
799
|
+
var Xe = /* @__PURE__ */ H("<div>");
|
|
800
|
+
function Ze(e) {
|
|
801
|
+
Ue();
|
|
802
|
+
let r = Q(), i = N(), s = e, c = e, [l, u] = q(null, { ownedWrite: !0 }), [d, p] = q(!1, { ownedWrite: !0 }), m = K(() => Qe(s.anchor) ?? r.store.context.floatingRoot.referenceElement()), h = f({
|
|
803
|
+
reference: m,
|
|
804
|
+
floating: l,
|
|
805
|
+
mounted: r.presence.mounted,
|
|
806
|
+
direction: i,
|
|
807
|
+
positionMethod: () => s.positionMethod ?? "absolute",
|
|
808
|
+
side: () => s.side ?? (r.nested ? "inline-end" : "bottom"),
|
|
809
|
+
sideOffset: () => s.sideOffset ?? 0,
|
|
810
|
+
align: () => s.align ?? (r.nested ? "start" : "center"),
|
|
811
|
+
alignOffset: () => s.alignOffset ?? 0,
|
|
812
|
+
collisionBoundary: () => s.collisionBoundary ?? "clipping-ancestors",
|
|
813
|
+
collisionPadding: () => s.collisionPadding ?? 5,
|
|
814
|
+
arrowPadding: () => s.arrowPadding ?? 5,
|
|
815
|
+
sticky: () => s.sticky ?? !1,
|
|
816
|
+
disableAnchorTracking: () => s.disableAnchorTracking ?? !1,
|
|
817
|
+
collisionAvoidance: () => s.collisionAvoidance ?? { fallbackAxisSide: r.nested ? "end" : "none" },
|
|
818
|
+
shiftRootBoundary: () => "layoutViewport",
|
|
819
|
+
adaptiveOriginMiddleware: () => r.store.track().adaptiveOriginMiddleware
|
|
820
|
+
}), g = C(() => r.store.open(), () => h.state().isPositioned), _ = K(() => ({
|
|
821
|
+
open: r.store.open(),
|
|
822
|
+
side: h.renderedSide(),
|
|
823
|
+
align: h.renderedAlign(),
|
|
824
|
+
anchorHidden: h.anchorHidden(),
|
|
825
|
+
instant: d() ? "resize" : g() ? "initial" : void 0
|
|
826
|
+
})), v = K(() => a(e.class, _())), y = K(() => $({
|
|
827
|
+
...h.styles(),
|
|
828
|
+
"pointer-events": r.store.open() ? void 0 : "none"
|
|
829
|
+
}, o(e.style, _()))), b = K(() => n(_(), ae)), x = J(c, "align", "alignOffset", "anchor", "arrowPadding", "render", "class", "collisionAvoidance", "collisionBoundary", "collisionPadding", "disableAnchorTracking", "positionMethod", "ref", "side", "sideOffset", "sticky", "style"), S;
|
|
830
|
+
T({
|
|
831
|
+
popup: () => r.store.track().popupElement,
|
|
832
|
+
positioner: l,
|
|
833
|
+
mounted: r.presence.mounted,
|
|
834
|
+
content: () => ({
|
|
835
|
+
value: r.store.value(),
|
|
836
|
+
version: r.store.contentVersion()
|
|
837
|
+
}),
|
|
838
|
+
side: h.renderedSide,
|
|
839
|
+
direction: i
|
|
840
|
+
}), G(() => h.state().placement, (e) => {
|
|
841
|
+
r.store.context.floatingRoot.context.data.placement = e;
|
|
842
|
+
}), G(() => ({
|
|
843
|
+
element: l(),
|
|
844
|
+
open: r.store.open()
|
|
845
|
+
}), (e) => {
|
|
846
|
+
if (!e.element || !e.open) return;
|
|
847
|
+
let t = () => {
|
|
848
|
+
p(!0), clearTimeout(S), S = setTimeout(() => p(!1), 100), r.store.touchContent();
|
|
849
|
+
};
|
|
850
|
+
return e.element.ownerDocument.defaultView?.addEventListener("resize", t), () => e.element?.ownerDocument.defaultView?.removeEventListener("resize", t);
|
|
851
|
+
}), Y(() => {
|
|
852
|
+
clearTimeout(S), delete r.store.context.floatingRoot.context.data.placement, r.store.state.positionerElement === X(l) && r.store.setPositionerElement(null);
|
|
853
|
+
});
|
|
854
|
+
let w = t(e, () => _(), (e) => (() => {
|
|
855
|
+
var t = L(Xe);
|
|
856
|
+
return V(t, e, !1), B(), t;
|
|
857
|
+
})());
|
|
858
|
+
return I(Je, {
|
|
859
|
+
value: h,
|
|
860
|
+
get children() {
|
|
861
|
+
return I(w, z({
|
|
862
|
+
ref: [((e) => {
|
|
863
|
+
u(e), r.store.setPositionerElement(e);
|
|
864
|
+
}), s.ref],
|
|
865
|
+
role: "presentation",
|
|
866
|
+
get hidden() {
|
|
867
|
+
return !r.presence.mounted();
|
|
868
|
+
},
|
|
869
|
+
get inert() {
|
|
870
|
+
return !r.store.open() || void 0;
|
|
871
|
+
},
|
|
872
|
+
get class() {
|
|
873
|
+
return v();
|
|
874
|
+
},
|
|
875
|
+
get style() {
|
|
876
|
+
return y();
|
|
877
|
+
}
|
|
878
|
+
}, b, x));
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
function Qe(e) {
|
|
883
|
+
return typeof e == "function" ? e() : e && "current" in e ? e.current : e;
|
|
884
|
+
}
|
|
885
|
+
//#endregion
|
|
886
|
+
//#region src/navigation-menu/popup/NavigationMenuPopup.tsx
|
|
887
|
+
var $e = /* @__PURE__ */ H("<nav>");
|
|
888
|
+
function et(e) {
|
|
889
|
+
let r = Q(), i = Ye(), s = e, u = e, d = K(() => s.id ?? r.store.context.floatingId), f = K(() => ({
|
|
890
|
+
open: r.store.open(),
|
|
891
|
+
transitionStatus: r.store.track().transitionStatus,
|
|
892
|
+
side: i.renderedSide(),
|
|
893
|
+
align: i.renderedAlign(),
|
|
894
|
+
anchorHidden: i.anchorHidden()
|
|
895
|
+
})), p = K(() => a(e.class, f())), m = K(() => {
|
|
896
|
+
let e = i.renderedSide(), t = e === "left" || e === "inline-start";
|
|
897
|
+
return e === "top" || t ? {
|
|
898
|
+
position: "absolute",
|
|
899
|
+
[e === "top" ? "bottom" : "top"]: "0",
|
|
900
|
+
[t ? "right" : "left"]: "0"
|
|
901
|
+
} : {};
|
|
902
|
+
}), h = K(() => $(m(), o(e.style, f()))), g = K(() => n(f(), k)), _ = J(u, "render", "class", "id", "onKeyDown", "ref", "style"), v = c(l(() => s.onKeyDown), (e) => {
|
|
903
|
+
let t = r.store.state.popupProps.onKeyDown;
|
|
904
|
+
typeof t == "function" && t(e);
|
|
905
|
+
}), y = null;
|
|
906
|
+
G(() => d(), (e) => r.store.setPopupId(e)), Y(() => {
|
|
907
|
+
r.store.state.popupElement === y && r.store.setPopupElement(null);
|
|
908
|
+
});
|
|
909
|
+
let b = () => X(() => {
|
|
910
|
+
let e = r.store.openChangeReason();
|
|
911
|
+
return e !== "trigger-hover" && e !== "outside-press" && e !== "focus-out";
|
|
912
|
+
}), x = t(e, () => f(), (e) => (() => {
|
|
913
|
+
var t = L($e);
|
|
914
|
+
return V(t, e, !1), B(), t;
|
|
915
|
+
})());
|
|
916
|
+
return I(A, {
|
|
917
|
+
get context() {
|
|
918
|
+
return r.store.context.floatingRoot;
|
|
919
|
+
},
|
|
920
|
+
get tree() {
|
|
921
|
+
return r.store.tree;
|
|
922
|
+
},
|
|
923
|
+
get disabled() {
|
|
924
|
+
return !r.presence.mounted();
|
|
925
|
+
},
|
|
926
|
+
initialFocus: !1,
|
|
927
|
+
returnFocus: b,
|
|
928
|
+
restoreFocus: "popup",
|
|
929
|
+
modal: !1,
|
|
930
|
+
get openInteractionType() {
|
|
931
|
+
return r.store.openMethod();
|
|
932
|
+
},
|
|
933
|
+
get previousFocusableElement() {
|
|
934
|
+
return r.store.track().activeTriggerElement;
|
|
935
|
+
},
|
|
936
|
+
get nextFocusableElement() {
|
|
937
|
+
return r.afterTriggerGuard;
|
|
938
|
+
},
|
|
939
|
+
get beforeContentGuardRef() {
|
|
940
|
+
return r.setBeforeContentGuard;
|
|
941
|
+
},
|
|
942
|
+
get children() {
|
|
943
|
+
return I(x, z({
|
|
944
|
+
ref: [((e) => {
|
|
945
|
+
y = e, r.store.setPopupElement(e);
|
|
946
|
+
}), s.ref],
|
|
947
|
+
get id() {
|
|
948
|
+
return d();
|
|
949
|
+
},
|
|
950
|
+
tabIndex: -1,
|
|
951
|
+
"data-base-ui-focusable": "",
|
|
952
|
+
get class() {
|
|
953
|
+
return p();
|
|
954
|
+
},
|
|
955
|
+
get style() {
|
|
956
|
+
return h();
|
|
957
|
+
},
|
|
958
|
+
onKeyDown: v
|
|
959
|
+
}, g, _));
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region src/navigation-menu/viewport/NavigationMenuViewport.tsx
|
|
965
|
+
var tt = /* @__PURE__ */ H("<div>");
|
|
966
|
+
function nt(e) {
|
|
967
|
+
let n = Q(), r = Ye(!0) !== void 0, i = e, s = e, c = {}, l = K(() => a(e.class, c)), u = K(() => o(e.style, c)), f = J(s, "render", "children", "class", "ref", "style"), p = null, m = null, h = null, g = (e) => {
|
|
968
|
+
p = e, n.store.setViewportElement(e), r && (m = e, n.store.setViewportTarget(e));
|
|
969
|
+
};
|
|
970
|
+
Y(() => {
|
|
971
|
+
n.store.viewportElement() === p && n.store.setViewportElement(null), n.store.viewportTarget() === m && n.store.setViewportTarget(null), !r && n.beforeContentGuard() && n.setBeforeContentGuard(null);
|
|
972
|
+
});
|
|
973
|
+
let _ = t(e, () => c, (e) => (() => {
|
|
974
|
+
var t = L(tt);
|
|
975
|
+
return V(t, e, !1), B(), t;
|
|
976
|
+
})()), v = I(_, z({
|
|
977
|
+
ref: [g, i.ref],
|
|
978
|
+
get class() {
|
|
979
|
+
return l();
|
|
980
|
+
},
|
|
981
|
+
get style() {
|
|
982
|
+
return u();
|
|
983
|
+
}
|
|
984
|
+
}, f, { get children() {
|
|
985
|
+
return I(U, {
|
|
986
|
+
when: !r,
|
|
987
|
+
get fallback() {
|
|
988
|
+
return e.children;
|
|
989
|
+
},
|
|
990
|
+
get children() {
|
|
991
|
+
var t = L(tt);
|
|
992
|
+
return fe(() => (e) => {
|
|
993
|
+
m = e, n.store.setViewportTarget(e);
|
|
994
|
+
}, t), de(t, pe(() => e.children)), t;
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
} }));
|
|
998
|
+
return r ? v : [
|
|
999
|
+
I(D, {
|
|
1000
|
+
ref: (e) => n.setBeforeContentGuard(e),
|
|
1001
|
+
onFocus: (e) => {
|
|
1002
|
+
let t = n.store.viewportTarget();
|
|
1003
|
+
t && (d(t, e.relatedTarget) ? n.store.track().activeTriggerElement?.focus() : re(t)[0]?.focus());
|
|
1004
|
+
}
|
|
1005
|
+
}),
|
|
1006
|
+
v,
|
|
1007
|
+
I(D, {
|
|
1008
|
+
ref: (e) => h = e,
|
|
1009
|
+
onFocus: (e) => {
|
|
1010
|
+
let t = n.store.viewportTarget();
|
|
1011
|
+
if (t) {
|
|
1012
|
+
if (d(t, e.relatedTarget)) ne(h)?.focus();
|
|
1013
|
+
else {
|
|
1014
|
+
let e = re(t);
|
|
1015
|
+
e[e.length - 1]?.focus();
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
})
|
|
1020
|
+
];
|
|
1021
|
+
}
|
|
1022
|
+
//#endregion
|
|
1023
|
+
//#region src/navigation-menu/arrow/NavigationMenuArrow.tsx
|
|
1024
|
+
var rt = /* @__PURE__ */ H("<div>");
|
|
1025
|
+
function it(e) {
|
|
1026
|
+
let r = Q(), i = Ye(), s = e, c = e, l = K(() => ({
|
|
1027
|
+
open: r.store.open(),
|
|
1028
|
+
side: i.renderedSide(),
|
|
1029
|
+
align: i.renderedAlign(),
|
|
1030
|
+
uncentered: i.arrowUncentered()
|
|
1031
|
+
})), u = K(() => a(e.class, l())), d = K(() => $(i.arrowStyles(), o(e.style, l()))), f = K(() => n(l(), ae)), p = J(c, "render", "class", "ref", "style"), m = null;
|
|
1032
|
+
Y(() => {
|
|
1033
|
+
m && i.setArrowElement(null);
|
|
1034
|
+
});
|
|
1035
|
+
let h = t(e, () => l(), (e) => (() => {
|
|
1036
|
+
var t = L(rt);
|
|
1037
|
+
return V(t, e, !1), B(), t;
|
|
1038
|
+
})());
|
|
1039
|
+
return I(h, z({
|
|
1040
|
+
ref: [((e) => {
|
|
1041
|
+
m = e, i.setArrowElement(e);
|
|
1042
|
+
}), s.ref],
|
|
1043
|
+
"aria-hidden": "true",
|
|
1044
|
+
get class() {
|
|
1045
|
+
return u();
|
|
1046
|
+
},
|
|
1047
|
+
get style() {
|
|
1048
|
+
return d();
|
|
1049
|
+
}
|
|
1050
|
+
}, f, p));
|
|
1051
|
+
}
|
|
1052
|
+
//#endregion
|
|
1053
|
+
//#region src/navigation-menu/index.parts.ts
|
|
1054
|
+
var at = /* @__PURE__ */ e({
|
|
1055
|
+
Arrow: () => it,
|
|
1056
|
+
Backdrop: () => Ke,
|
|
1057
|
+
Content: () => Re,
|
|
1058
|
+
Icon: () => Fe,
|
|
1059
|
+
Item: () => je,
|
|
1060
|
+
Link: () => Be,
|
|
1061
|
+
List: () => Ee,
|
|
1062
|
+
Popup: () => et,
|
|
1063
|
+
Portal: () => We,
|
|
1064
|
+
Positioner: () => Ze,
|
|
1065
|
+
Root: () => be,
|
|
1066
|
+
Trigger: () => Ne,
|
|
1067
|
+
Viewport: () => nt
|
|
1068
|
+
});
|
|
1069
|
+
//#endregion
|
|
1070
|
+
export { at as t };
|