solid-baseui 0.1.0-alpha.0 → 0.1.0-alpha.1
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 +30 -0
- package/README.md +95 -8
- package/dist/lib/client/DialogHandle-BGyIbcvg.js +521 -0
- package/dist/lib/client/DialogPopup-Df7MC358.js +138 -0
- package/dist/lib/client/FieldControl-C0PATyKV.js +142 -0
- package/dist/lib/client/{FocusManager-grSdNHqW.js → FocusManager-NP1uPXTi.js} +5 -5
- package/dist/lib/client/{FormContext-BB05lWOI.js → FormContext-CwLBtm_d.js} +1 -0
- package/dist/lib/client/{LabelableContext-DKsB0fIx.js → LabelableContext-CmQF-TX2.js} +3 -6
- package/dist/lib/client/MenuSubmenuTrigger-yfncqM-D.js +1584 -0
- package/dist/lib/client/{PopupHandle-CcJG4NMy.js → PopupHandle-CQI6Om1Z.js} +1 -1
- package/dist/lib/client/{PopupStore-DjB-wO88.js → PopupStore-Du0O57fL.js} +118 -98
- package/dist/lib/client/{PopupViewport-DgrIqQea.js → PopupViewport-IS4XU03s.js} +2 -2
- package/dist/lib/client/Separator-D5oJzlA3.js +27 -0
- package/dist/lib/client/TriggerFocusGuards-Cs8LVBj5.js +51 -0
- package/dist/lib/client/accordion/index.js +1 -1
- package/dist/lib/client/accordion-BFeZFpJZ.js +381 -0
- package/dist/lib/client/alert-dialog/index.js +1 -1
- package/dist/lib/client/{alert-dialog-BH_3ndio.js → alert-dialog-BxGUF8_Q.js} +2 -2
- package/dist/lib/client/autocomplete/index.js +1 -1
- package/dist/lib/client/{autocomplete-Cob_FZEP.js → autocomplete-C9QA98XD.js} +30 -25
- package/dist/lib/client/avatar/index.js +1 -1
- package/dist/lib/client/avatar-BQoEzzav.js +191 -0
- package/dist/lib/client/button/index.js +1 -1
- package/dist/lib/client/button-akYS6FyY.js +88 -0
- package/dist/lib/client/checkbox/index.js +1 -1
- package/dist/lib/client/checkbox-DOXtzBhA.js +425 -0
- package/dist/lib/client/checkbox-group/index.js +1 -1
- package/dist/lib/client/checkbox-group-CwMDoSTK.js +135 -0
- package/dist/lib/client/collapsible/index.js +1 -1
- package/dist/lib/client/collapsible-t8YReaIp.js +230 -0
- package/dist/lib/client/combobox/index.js +2 -2
- package/dist/lib/client/combobox-6DhOdzit.js +399 -0
- package/dist/lib/client/{constants-BYjBUIIi.js → constants-cOVxAoxB.js} +5 -1
- package/dist/lib/client/context-menu/index.js +1 -1
- package/dist/lib/client/context-menu-CplDpqmi.js +220 -0
- package/dist/lib/client/{createAnchorPositioning-DcxDXUgB.js → createAnchorPositioning-D96gu-Dz.js} +148 -145
- package/dist/lib/client/{createCollapsiblePanel-DeDu0O2t.js → createCollapsiblePanel-BQ8r4RTi.js} +1 -1
- package/dist/lib/client/createFocusInteraction--s9_qBf3.js +60 -0
- package/dist/lib/client/createLabelableId-DxJRwMUJ.js +14 -0
- package/dist/lib/client/{createPopupAutoResize-CGNiLhGq.js → createPopupAutoResize-Dn-stj-8.js} +1 -1
- 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-B9tR9X48.js} +2 -2
- package/dist/lib/client/drawer/index.js +1 -1
- package/dist/lib/client/drawer-dyr3_sKQ.js +1539 -0
- package/dist/lib/client/field/index.js +1 -1
- package/dist/lib/client/field-CjUAjp1m.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-6Ne_bWQX.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-_QHvSSqM.js} +1 -1
- 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/menu/index.js +1 -1
- package/dist/lib/client/menu-DLqUBmMK.js +334 -0
- package/dist/lib/client/menubar/index.js +1 -1
- package/dist/lib/client/menubar-DhPRUQZ6.js +163 -0
- package/dist/lib/client/{mergeStyleValue-C4ITiiIV.js → mergeStyleValue-DhTA9Nwe.js} +7 -3
- 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-mVHV41Ky.js +1070 -0
- package/dist/lib/client/number-field/index.js +1 -1
- package/dist/lib/client/number-field-DusLw_0X.js +1043 -0
- package/dist/lib/client/otp-field/index.js +1 -1
- package/dist/lib/client/otp-field-D-B9tZzF.js +584 -0
- package/dist/lib/client/popover/index.js +1 -1
- package/dist/lib/client/popover-Cv7xn0nW.js +938 -0
- package/dist/lib/client/popupStateMapping-C6jQ_LKo.js +371 -0
- package/dist/lib/client/preview-card/index.js +1 -1
- package/dist/lib/client/preview-card-FTN_aafM.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-DA_oZhQT.js +284 -0
- package/dist/lib/client/radio-group/index.js +1 -1
- package/dist/lib/client/radio-group-CWtQxWDl.js +195 -0
- package/dist/lib/client/runOnceAnimationsFinish-CFADb4CN.js +49 -0
- package/dist/lib/client/{safePolygon--bbKn0c8.js → safePolygon-DJG0VIVo.js} +4 -0
- package/dist/lib/client/scroll-area/index.js +1 -1
- package/dist/lib/client/scroll-area-NCr49LkD.js +717 -0
- package/dist/lib/client/select/index.js +1 -1
- package/dist/lib/client/select-DSPJt7Rk.js +1933 -0
- package/dist/lib/client/separator/index.js +1 -1
- package/dist/lib/client/slider/index.js +1 -1
- package/dist/lib/client/slider-CWq9hxFf.js +927 -0
- package/dist/lib/client/switch/index.js +1 -1
- package/dist/lib/client/switch-CPl7QHKI.js +306 -0
- package/dist/lib/client/tabs/index.js +1 -1
- package/dist/lib/client/tabs-Bn4rZDyZ.js +692 -0
- package/dist/lib/client/toast/index.js +1 -1
- package/dist/lib/client/toast-7LdqZWOs.js +1118 -0
- package/dist/lib/client/toggle/index.js +1 -1
- package/dist/lib/client/toggle-CsC37e3e.js +142 -0
- package/dist/lib/client/toggle-group/index.js +1 -1
- package/dist/lib/client/toggle-group-DSWb9HxN.js +134 -0
- package/dist/lib/client/toolbar/index.js +1 -1
- package/dist/lib/client/toolbar-DcCi3HNp.js +504 -0
- package/dist/lib/client/tooltip/index.js +1 -1
- package/dist/lib/client/tooltip-D-PkGco9.js +849 -0
- package/dist/lib/client/use-render/index.js +2 -0
- package/dist/lib/client/useFilteredItems-B7z2CGMV.js +2270 -0
- package/dist/lib/client/useRender-CxZ8PI-g.js +12 -0
- package/dist/lib/server/{DialogHandle-ATZlm9RC.js → DialogHandle-nJSSy_jM.js} +24 -33
- package/dist/lib/server/{DialogPopup-BebI-w5P.js → DialogPopup-Da1aIxVA.js} +10 -13
- package/dist/lib/server/{FieldControl-Y_kI7ARp.js → FieldControl-BDeNR3ug.js} +56 -20
- package/dist/lib/server/{FocusManager-BrbZVWME.js → FocusManager-1LfoCsya.js} +1 -3
- package/dist/lib/server/{FormContext-pvESt85v.js → FormContext-CYwo_ZnB.js} +1 -0
- package/dist/lib/server/{LabelableContext-DZP3rgAY.js → LabelableContext-BTeF0IWb.js} +4 -6
- package/dist/lib/server/{MenuSubmenuTrigger-DA4gsv6z.js → MenuSubmenuTrigger-rR8ZN7YR.js} +133 -166
- package/dist/lib/server/{PopupHandle-DthPgNjy.js → PopupHandle-Ct6wywmP.js} +1 -1
- package/dist/lib/server/{PopupStore-DEs3FAEe.js → PopupStore-kHjFPiQ5.js} +38 -14
- package/dist/lib/server/{PopupViewport-3r_KTFwX.js → PopupViewport-DftN5VUp.js} +2 -2
- package/dist/lib/server/{Separator-vhhYxWGr.js → Separator-DTvtnxzP.js} +4 -6
- package/dist/lib/server/TriggerFocusGuards-CvoGfft9.js +61 -0
- package/dist/lib/server/accordion/index.js +32 -70
- 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 +8 -9
- package/dist/lib/server/checkbox/index.js +30 -57
- package/dist/lib/server/checkbox-group/index.js +20 -10
- package/dist/lib/server/collapsible/index.js +36 -43
- package/dist/lib/server/combobox/index.js +64 -35
- package/dist/lib/server/{constants-9H__9xbS.js → constants-D7ciIzsV.js} +8 -3
- package/dist/lib/server/context-menu/index.js +7 -9
- package/dist/lib/server/{createAnchorPositioning-C-cVOPwz.js → createAnchorPositioning-B5Y0WEev.js} +11 -6
- package/dist/lib/server/{createCollapsiblePanel-DTyVJz0G.js → createCollapsiblePanel-B45kTe6v.js} +1 -1
- package/dist/lib/server/{createFocusInteraction-EIS0QOel.js → createFocusInteraction-DMyKsniI.js} +22 -2
- package/dist/lib/server/createLabelableId-WMUKtY6s.js +18 -0
- package/dist/lib/server/{createPopupAutoResize-DO50jjNX.js → createPopupAutoResize-ImBjwdj_.js} +1 -1
- 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/drawer/index.js +63 -71
- package/dist/lib/server/field/index.js +105 -93
- package/dist/lib/server/fieldset/index.js +13 -16
- package/dist/lib/server/form/index.js +16 -12
- package/dist/lib/server/index.js +5 -3
- package/dist/lib/server/input/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/menu/index.js +21 -20
- package/dist/lib/server/menubar/index.js +6 -31
- package/dist/lib/server/{mergeStyleValue-Db8bRCM4.js → mergeStyleValue-BwJ10_X2.js} +6 -1
- package/dist/lib/server/meter/index.js +20 -32
- package/dist/lib/server/navigation-menu/index.js +53 -124
- package/dist/lib/server/number-field/index.js +44 -42
- package/dist/lib/server/otp-field/index.js +11 -14
- package/dist/lib/server/popover/index.js +42 -59
- package/dist/lib/server/{popupStateMapping-nKoUwoke.js → popupStateMapping-B2KsiiLb.js} +18 -16
- package/dist/lib/server/preview-card/index.js +30 -41
- package/dist/lib/server/progress/index.js +21 -33
- package/dist/lib/server/radio/index.js +18 -39
- package/dist/lib/server/radio-group/index.js +7 -8
- package/dist/lib/server/{runOnceAnimationsFinish-DCHzXWZU.js → runOnceAnimationsFinish-CYq38H8J.js} +2 -1
- package/dist/lib/server/{safePolygon-CAm5RJGv.js → safePolygon-C1GNJbKR.js} +5 -0
- package/dist/lib/server/scroll-area/index.js +23 -32
- package/dist/lib/server/select/index.js +95 -181
- package/dist/lib/server/separator/index.js +1 -1
- package/dist/lib/server/slider/index.js +25 -38
- package/dist/lib/server/switch/index.js +13 -23
- package/dist/lib/server/tabs/index.js +185 -129
- package/dist/lib/server/toast/index.js +49 -66
- package/dist/lib/server/toggle/index.js +4 -6
- package/dist/lib/server/toggle-group/index.js +9 -7
- package/dist/lib/server/toolbar/index.js +62 -79
- package/dist/lib/server/tooltip/index.js +28 -37
- package/dist/lib/server/use-render/index.js +2 -0
- package/dist/lib/server/{useFilteredItems-DvuctLt3.js → useFilteredItems-DCxq20Is.js} +164 -189
- 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 +1 -1
- 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/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 +12 -8
- package/dist/lib/types/combobox/root/ComboboxRootContext.d.ts +2 -0
- package/dist/lib/types/combobox/trigger/ComboboxTrigger.d.ts +1 -0
- 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/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/createTransitionStatus.d.ts +1 -1
- 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/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/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/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 +1 -1
- package/dist/lib/types/toolbar/root/ToolbarRoot.d.ts +1 -1
- 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/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/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,938 @@
|
|
|
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 { d as r, 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 } from "./internals/composeEventHandlers.js";
|
|
8
|
+
import { t as l } from "./runOnceAnimationsFinish-CFADb4CN.js";
|
|
9
|
+
import { c as u } from "./dom-BEAeQ9Eb.js";
|
|
10
|
+
import { t as d } from "./PopupViewport-IS4XU03s.js";
|
|
11
|
+
import { t as f } from "./createAnchorPositioning-D96gu-Dz.js";
|
|
12
|
+
import { t as p } from "./InternalBackdrop-cSK13gaM.js";
|
|
13
|
+
import { t as m } from "./createAnchoredPopupScrollLock-Cx0cbh1_.js";
|
|
14
|
+
import { t as h } from "./createClickInteraction-CTaIFBiV.js";
|
|
15
|
+
import { c as g, i as _, n as v, r as y, s as b, t as x } from "./FloatingTree-23B7KKPD.js";
|
|
16
|
+
import { a as S, n as C, o as w, t as T } from "./PopupStore-Du0O57fL.js";
|
|
17
|
+
import { n as E, r as D, t as O } from "./safePolygon-DJG0VIVo.js";
|
|
18
|
+
import { a as ee, i as te, n as k, o as A, r as j } from "./popupStateMapping-C6jQ_LKo.js";
|
|
19
|
+
import { t as M } from "./FocusManager-NP1uPXTi.js";
|
|
20
|
+
import { i as ne, n as N, r as re, t as ie } from "./PopupHandle-CQI6Om1Z.js";
|
|
21
|
+
import { t as ae } from "./setRef-fXF6OIo3.js";
|
|
22
|
+
import { t as oe } from "./TriggerFocusGuards-Cs8LVBj5.js";
|
|
23
|
+
import { a as P, i as se, n as ce, r as F, t as le } from "./buttonSemantics-paljfpOX.js";
|
|
24
|
+
import { n as ue } from "./DirectionContext-BwMabICS.js";
|
|
25
|
+
import { n as de } from "./ToolbarRootContext-88yZoAOy.js";
|
|
26
|
+
import { createComponent as I, getNextElement as L, memo as R, mergeProps as z, runHydrationEvents as B, spread as V, template as H } from "@solidjs/web";
|
|
27
|
+
import { $REFRESH as fe, Show as U, createContext as W, createEffect as G, createMemo as K, createSignal as q, createUniqueId as J, omit as Y, onCleanup as X, untrack as Z, useContext as Q } from "solid-js";
|
|
28
|
+
//#region src/popover/store/PopoverStore.ts
|
|
29
|
+
var pe = class extends T {
|
|
30
|
+
triggerData = /* @__PURE__ */ new Map();
|
|
31
|
+
openMethodAccessor;
|
|
32
|
+
setOpenMethodSignal;
|
|
33
|
+
openReasonAccessor;
|
|
34
|
+
setOpenReason;
|
|
35
|
+
instantTypeAccessor;
|
|
36
|
+
setInstantTypeSignal;
|
|
37
|
+
stickIfOpenAccessor;
|
|
38
|
+
setStickIfOpenSignal;
|
|
39
|
+
focusManagerModalAccessor;
|
|
40
|
+
setFocusManagerModalSignal;
|
|
41
|
+
disabledAccessor;
|
|
42
|
+
setDisabledSignal;
|
|
43
|
+
openOnHoverAccessor;
|
|
44
|
+
setOpenOnHoverSignal;
|
|
45
|
+
patientClickTimer;
|
|
46
|
+
constructor(e = {}) {
|
|
47
|
+
super(e);
|
|
48
|
+
let [t, n] = q(null, { ownedWrite: !0 });
|
|
49
|
+
this.openMethodAccessor = t, this.setOpenMethodSignal = n;
|
|
50
|
+
let [r, i] = q(null, { ownedWrite: !0 });
|
|
51
|
+
this.openReasonAccessor = r, this.setOpenReason = i;
|
|
52
|
+
let [a, o] = q(void 0, { ownedWrite: !0 });
|
|
53
|
+
this.instantTypeAccessor = a, this.setInstantTypeSignal = o;
|
|
54
|
+
let [s, c] = q(!0, { ownedWrite: !0 });
|
|
55
|
+
this.stickIfOpenAccessor = s, this.setStickIfOpenSignal = c;
|
|
56
|
+
let [l, u] = q(!1, { ownedWrite: !0 });
|
|
57
|
+
this.focusManagerModalAccessor = l, this.setFocusManagerModalSignal = u;
|
|
58
|
+
let [d, f] = q(!1, { ownedWrite: !0 });
|
|
59
|
+
this.disabledAccessor = d, this.setDisabledSignal = f;
|
|
60
|
+
let [p, m] = q(!1, { ownedWrite: !0 });
|
|
61
|
+
this.openOnHoverAccessor = p, this.setOpenOnHoverSignal = m;
|
|
62
|
+
}
|
|
63
|
+
openMethod() {
|
|
64
|
+
return this.openMethodAccessor();
|
|
65
|
+
}
|
|
66
|
+
setOpenMethod(e) {
|
|
67
|
+
this.setOpenMethodSignal(e);
|
|
68
|
+
}
|
|
69
|
+
openChangeReason() {
|
|
70
|
+
return this.openReasonAccessor();
|
|
71
|
+
}
|
|
72
|
+
instantType() {
|
|
73
|
+
return this.instantTypeAccessor();
|
|
74
|
+
}
|
|
75
|
+
setInstantType(e) {
|
|
76
|
+
this.setInstantTypeSignal(e);
|
|
77
|
+
}
|
|
78
|
+
stickIfOpen() {
|
|
79
|
+
return this.stickIfOpenAccessor();
|
|
80
|
+
}
|
|
81
|
+
focusManagerModal() {
|
|
82
|
+
return this.focusManagerModalAccessor();
|
|
83
|
+
}
|
|
84
|
+
setFocusManagerModal(e) {
|
|
85
|
+
this.setFocusManagerModalSignal(e);
|
|
86
|
+
}
|
|
87
|
+
disabled() {
|
|
88
|
+
return this.disabledAccessor();
|
|
89
|
+
}
|
|
90
|
+
openOnHover() {
|
|
91
|
+
return this.openOnHoverAccessor();
|
|
92
|
+
}
|
|
93
|
+
closeDelay() {
|
|
94
|
+
return this.track().closeDelay;
|
|
95
|
+
}
|
|
96
|
+
floatingElement() {
|
|
97
|
+
let e = this.track();
|
|
98
|
+
return e.positionerElement ?? e.popupElement;
|
|
99
|
+
}
|
|
100
|
+
setTriggerData(e, t) {
|
|
101
|
+
this.triggerData.set(e, t);
|
|
102
|
+
}
|
|
103
|
+
removeTriggerData(e) {
|
|
104
|
+
this.triggerData.delete(e);
|
|
105
|
+
}
|
|
106
|
+
syncTriggerData(e = this.activeTriggerId(), t = this.open()) {
|
|
107
|
+
let n = this.triggerData.get(e ?? "");
|
|
108
|
+
this.setDisabledSignal(n?.disabled ?? !1), this.setOpenOnHoverSignal(n?.openOnHover ?? !1), this.set("closeDelay", n?.closeDelay ?? 0), n && t && this.set("payload", n.payload);
|
|
109
|
+
}
|
|
110
|
+
resetAfterUnmount() {
|
|
111
|
+
clearTimeout(this.patientClickTimer), this.setStickIfOpenSignal(!0), this.setOpenReason(null);
|
|
112
|
+
}
|
|
113
|
+
dispose() {
|
|
114
|
+
clearTimeout(this.patientClickTimer);
|
|
115
|
+
}
|
|
116
|
+
reconcileTriggers() {
|
|
117
|
+
super.reconcileTriggers(), this.syncTriggerData();
|
|
118
|
+
}
|
|
119
|
+
setOpen(e, t) {
|
|
120
|
+
return !e && t.reason === "close-press" && t.trigger == null && this.activeTriggerId() != null && (t.trigger = this.context.triggerElements.getById(this.activeTriggerId()) ?? this.state.activeTriggerElement ?? void 0), super.setOpen(e, t) ? (this.setOpenReason(t.reason), t.reason === "trigger-hover" ? (this.setStickIfOpenSignal(!0), clearTimeout(this.patientClickTimer), this.patientClickTimer = setTimeout(() => this.setStickIfOpenSignal(!1), 500)) : e || clearTimeout(this.patientClickTimer), t.reason === "trigger-press" && t.event instanceof MouseEvent && t.event.detail === 0 ? this.setInstantTypeSignal("click") : !e && (t.reason === "escape-key" || t.reason === "none") ? this.setInstantTypeSignal("dismiss") : t.reason === "focus-out" ? this.setInstantTypeSignal("focus") : this.setInstantTypeSignal(void 0), this.syncTriggerData(), !0) : !1;
|
|
121
|
+
}
|
|
122
|
+
}, me = class extends N {
|
|
123
|
+
openMethod() {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
setOpenMethod(e) {}
|
|
127
|
+
openChangeReason() {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
instantType() {}
|
|
131
|
+
setInstantType(e) {}
|
|
132
|
+
stickIfOpen() {
|
|
133
|
+
return !0;
|
|
134
|
+
}
|
|
135
|
+
focusManagerModal() {
|
|
136
|
+
return !1;
|
|
137
|
+
}
|
|
138
|
+
setFocusManagerModal(e) {}
|
|
139
|
+
disabled() {
|
|
140
|
+
return !1;
|
|
141
|
+
}
|
|
142
|
+
openOnHover() {
|
|
143
|
+
return !1;
|
|
144
|
+
}
|
|
145
|
+
closeDelay() {
|
|
146
|
+
return 0;
|
|
147
|
+
}
|
|
148
|
+
floatingElement() {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
isMountedByTrigger(e) {
|
|
152
|
+
return !1;
|
|
153
|
+
}
|
|
154
|
+
setTriggerData(e, t) {}
|
|
155
|
+
removeTriggerData(e) {}
|
|
156
|
+
syncTriggerData(e, t) {}
|
|
157
|
+
}, he = Symbol("PopoverRootContext"), ge = W(he);
|
|
158
|
+
function $(e = !1) {
|
|
159
|
+
let t = Q(ge);
|
|
160
|
+
if (t === he) {
|
|
161
|
+
if (e) return;
|
|
162
|
+
throw Error("Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.");
|
|
163
|
+
}
|
|
164
|
+
return t;
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/popover/root/PopoverRoot.tsx
|
|
168
|
+
function _e(e) {
|
|
169
|
+
let t = g(), n = b(), i = t ?? new y(), a = J(), o = J(), c = Z(() => e.open !== void 0), l = Z(() => e.triggerId !== void 0), u = K(() => e.modal ?? !1), d = new pe({
|
|
170
|
+
controlledOpen: () => c ? e.open : void 0,
|
|
171
|
+
controlledTriggerId: () => l ? e.triggerId : void 0,
|
|
172
|
+
floatingId: o,
|
|
173
|
+
nested: n !== null,
|
|
174
|
+
nodeId: a,
|
|
175
|
+
onOpenChange: () => e.onOpenChange,
|
|
176
|
+
onOpenChangeComplete: () => e.onOpenChangeComplete
|
|
177
|
+
});
|
|
178
|
+
d.update({
|
|
179
|
+
open: c ? !!Z(() => e.open) : !!Z(() => e.defaultOpen),
|
|
180
|
+
activeTriggerId: Z(() => e.defaultTriggerId ?? null)
|
|
181
|
+
});
|
|
182
|
+
let f = d.access((e) => e.payload), p = _({
|
|
183
|
+
tree: i,
|
|
184
|
+
id: a,
|
|
185
|
+
parentId: n,
|
|
186
|
+
context: () => d.context.floatingRoot
|
|
187
|
+
}), [m, h] = q(), [C, T] = q(), [E, D] = q(null, { ownedWrite: !0 }), [O, ee] = q(null, { ownedWrite: !0 }), [te, k] = q(null, { ownedWrite: !0 }), [A, j] = q(null, { ownedWrite: !0 }), M = S(d, () => d.track().popupElement, { onUnmount: () => d.resetAfterUnmount() }), ne = {
|
|
188
|
+
store: d,
|
|
189
|
+
tree: i,
|
|
190
|
+
modal: u,
|
|
191
|
+
titleId: m,
|
|
192
|
+
setTitleId: h,
|
|
193
|
+
descriptionId: C,
|
|
194
|
+
setDescriptionId: T,
|
|
195
|
+
backdropElement: E,
|
|
196
|
+
setBackdropElement: D,
|
|
197
|
+
internalBackdropElement: O,
|
|
198
|
+
setInternalBackdropElement: ee,
|
|
199
|
+
beforeContentGuard: te,
|
|
200
|
+
setBeforeContentGuard: k,
|
|
201
|
+
afterTriggerGuard: A,
|
|
202
|
+
setAfterTriggerGuard: j,
|
|
203
|
+
presence: M
|
|
204
|
+
};
|
|
205
|
+
d.context.floatingRoot.context.data.insideElements = () => [E(), O()], d.configureTriggerUnmount({ closeOnActiveTriggerUnmount: !1 }), re(() => e.handle, d);
|
|
206
|
+
let N = w({
|
|
207
|
+
context: d.context.floatingRoot,
|
|
208
|
+
tree: () => i,
|
|
209
|
+
outsidePressEvent: () => ({
|
|
210
|
+
mouse: u() === "trap-focus" ? "sloppy" : "intentional",
|
|
211
|
+
touch: "sloppy"
|
|
212
|
+
})
|
|
213
|
+
});
|
|
214
|
+
d.setInteractionProps({
|
|
215
|
+
activeTriggerProps: { onKeyDown: N.onKeyDown },
|
|
216
|
+
inactiveTriggerProps: { onKeyDown: N.onKeyDown },
|
|
217
|
+
popupProps: { onKeyDown: N.onKeyDown }
|
|
218
|
+
}), G(() => ({
|
|
219
|
+
open: d.open(),
|
|
220
|
+
activeTriggerId: d.activeTriggerId()
|
|
221
|
+
}), () => Z(() => d.reconcileTriggers()));
|
|
222
|
+
let ie = {
|
|
223
|
+
unmount: M.forceUnmount,
|
|
224
|
+
close() {
|
|
225
|
+
d.setOpen(!1, s(r));
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
G(() => e.actionsRef, (e) => {
|
|
229
|
+
e?.(ie);
|
|
230
|
+
});
|
|
231
|
+
function ae() {
|
|
232
|
+
let t = K(() => e.children), n = Z(t), r = n;
|
|
233
|
+
return typeof n == "function" && (r = n.name === "bound read" && Object.prototype.hasOwnProperty.call(n, fe) ? R(() => t()) : Z(() => n({ payload: f }))), r;
|
|
234
|
+
}
|
|
235
|
+
return X(() => {
|
|
236
|
+
d.dispose(), d.clearInteractionProps(), delete d.context.floatingRoot.context.data.insideElements;
|
|
237
|
+
}), I(ge, {
|
|
238
|
+
value: ne,
|
|
239
|
+
get children() {
|
|
240
|
+
return I(v, {
|
|
241
|
+
value: i,
|
|
242
|
+
get children() {
|
|
243
|
+
return I(x, {
|
|
244
|
+
get value() {
|
|
245
|
+
return p.id ?? null;
|
|
246
|
+
},
|
|
247
|
+
get children() {
|
|
248
|
+
return I(ae, {});
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/popover/trigger/PopoverTrigger.tsx
|
|
258
|
+
var ve = /* @__PURE__ */ H("<button>");
|
|
259
|
+
function ye(e) {
|
|
260
|
+
let r = $(!0), i = e;
|
|
261
|
+
if (!r && !Z(() => i.handle)) throw Error("Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.");
|
|
262
|
+
let s = e, l = `base-ui-${J()}`, u = K(() => i.id || l), d = K(() => i.disabled ?? !1), f = K(() => i.nativeButton ?? !0), p = K(() => i.openOnHover ?? !1), m = K(() => i.delay ?? 300), h = K(() => i.closeDelay ?? 0), [g, _] = q(null, { ownedWrite: !0 }), v = ne(() => i.handle), y = K(() => v() ?? r?.store), b = K(() => {
|
|
263
|
+
let e = y();
|
|
264
|
+
return e instanceof pe ? e : void 0;
|
|
265
|
+
}), x = K(() => {
|
|
266
|
+
let e = y();
|
|
267
|
+
return !!(e?.open() && e.activeTriggerId() === u());
|
|
268
|
+
}), S = K(() => ({
|
|
269
|
+
disabled: d(),
|
|
270
|
+
open: x()
|
|
271
|
+
})), w = t(e, () => S(), (e) => (() => {
|
|
272
|
+
var t = L(ve);
|
|
273
|
+
return V(t, e, !1), B(), t;
|
|
274
|
+
})()), T = K(() => a(e.class, S())), E = K(() => o(e.style, S())), D = K(() => n(S(), y()?.openChangeReason() === "trigger-press" ? te : ee)), O = Y(s, "render", "class", "closeDelay", "delay", "disabled", "handle", "id", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "openOnHover", "payload", "ref", "style"), k, A = "", j = "";
|
|
275
|
+
C(y, u, g, () => ({ payload: i.payload }));
|
|
276
|
+
let M = K(() => ({
|
|
277
|
+
payload: i.payload,
|
|
278
|
+
disabled: d(),
|
|
279
|
+
openOnHover: p(),
|
|
280
|
+
closeDelay: h()
|
|
281
|
+
}));
|
|
282
|
+
G(() => {
|
|
283
|
+
let e = y();
|
|
284
|
+
return e ? {
|
|
285
|
+
store: e,
|
|
286
|
+
id: u(),
|
|
287
|
+
data: M(),
|
|
288
|
+
activeId: e.activeTriggerId(),
|
|
289
|
+
open: e.open()
|
|
290
|
+
} : void 0;
|
|
291
|
+
}, (e) => {
|
|
292
|
+
if (e) return e.store.setTriggerData(e.id, e.data), e.store.syncTriggerData(e.activeId, e.open), () => e.store.removeTriggerData(e.id);
|
|
293
|
+
});
|
|
294
|
+
function N(e) {
|
|
295
|
+
A = e.pointerType, k?.onPointerDown(e);
|
|
296
|
+
}
|
|
297
|
+
function re(e) {
|
|
298
|
+
k?.onMouseDown(e);
|
|
299
|
+
}
|
|
300
|
+
function ie() {
|
|
301
|
+
j = A, A = "";
|
|
302
|
+
}
|
|
303
|
+
function ae(e) {
|
|
304
|
+
let t = b();
|
|
305
|
+
t && (t.open() || t.setOpenMethod(j || (e.detail === 0 ? "keyboard" : xe() ? "touch" : "mouse")), k?.onClick(e));
|
|
306
|
+
}
|
|
307
|
+
function ue(e) {
|
|
308
|
+
A = "keyboard";
|
|
309
|
+
let t = y(), n = t?.state.popupElement, r = t ? t.state[t.activeTriggerId() === u() ? "activeTriggerProps" : "inactiveTriggerProps"].onKeyDown : void 0, i = e.currentTarget;
|
|
310
|
+
n && i && n.ownerDocument !== i.ownerDocument && typeof r == "function" && r(e);
|
|
311
|
+
}
|
|
312
|
+
let de = c(() => Z(() => d() ? F : void 0), () => ie, () => i.onClick, () => ae), H = c(() => Z(() => d() ? F : void 0), () => i.onPointerDown, () => N), fe = c(() => Z(() => d() ? P : void 0), () => i.onMouseDown, () => re), W = c(() => Z(() => d() ? se : void 0), () => i.onKeyDown, () => ue, () => Z(() => f() ? void 0 : le)), X = c(() => Z(() => d() ? P : void 0), () => i.onKeyUp, () => Z(() => f() ? void 0 : ce));
|
|
313
|
+
function Q() {
|
|
314
|
+
return I(U, {
|
|
315
|
+
keyed: !0,
|
|
316
|
+
get when() {
|
|
317
|
+
return b();
|
|
318
|
+
},
|
|
319
|
+
children: (e) => I(be, {
|
|
320
|
+
store: e,
|
|
321
|
+
element: g,
|
|
322
|
+
id: u,
|
|
323
|
+
disabled: d,
|
|
324
|
+
openOnHover: p,
|
|
325
|
+
delay: m,
|
|
326
|
+
closeDelay: h,
|
|
327
|
+
tree: () => r?.tree,
|
|
328
|
+
setClickHandlers: (e) => k = e
|
|
329
|
+
})
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
let me = I(w, z({
|
|
333
|
+
ref: [((e) => _(e)), i.ref],
|
|
334
|
+
get id() {
|
|
335
|
+
return u();
|
|
336
|
+
},
|
|
337
|
+
get type() {
|
|
338
|
+
return f() ? "button" : void 0;
|
|
339
|
+
},
|
|
340
|
+
get role() {
|
|
341
|
+
return f() ? void 0 : "button";
|
|
342
|
+
},
|
|
343
|
+
get tabIndex() {
|
|
344
|
+
return !f() && d() ? -1 : 0;
|
|
345
|
+
},
|
|
346
|
+
get disabled() {
|
|
347
|
+
return (R(() => !!f())() ? d() : f()) || void 0;
|
|
348
|
+
},
|
|
349
|
+
get "aria-disabled"() {
|
|
350
|
+
return !f() && d() ? "true" : void 0;
|
|
351
|
+
},
|
|
352
|
+
"aria-haspopup": "dialog",
|
|
353
|
+
get "aria-expanded"() {
|
|
354
|
+
return x() ? "true" : "false";
|
|
355
|
+
},
|
|
356
|
+
get "aria-controls"() {
|
|
357
|
+
return y()?.triggerPopupId(u());
|
|
358
|
+
},
|
|
359
|
+
"data-base-ui-click-trigger": "",
|
|
360
|
+
get "data-trigger-disabled"() {
|
|
361
|
+
return d() ? "" : void 0;
|
|
362
|
+
},
|
|
363
|
+
get class() {
|
|
364
|
+
return T();
|
|
365
|
+
},
|
|
366
|
+
get style() {
|
|
367
|
+
return E();
|
|
368
|
+
},
|
|
369
|
+
onClick: de,
|
|
370
|
+
onKeyDown: W,
|
|
371
|
+
onKeyUp: X,
|
|
372
|
+
onMouseDown: fe,
|
|
373
|
+
onPointerDown: H
|
|
374
|
+
}, D, O));
|
|
375
|
+
return [I(Q, {}), I(U, {
|
|
376
|
+
get when() {
|
|
377
|
+
return b();
|
|
378
|
+
},
|
|
379
|
+
fallback: me,
|
|
380
|
+
children: (e) => I(oe, {
|
|
381
|
+
get context() {
|
|
382
|
+
return e().context.floatingRoot;
|
|
383
|
+
},
|
|
384
|
+
get enabled() {
|
|
385
|
+
return R(() => !!e().isMountedByTrigger(u()))() ? !e().focusManagerModal() : e().isMountedByTrigger(u());
|
|
386
|
+
},
|
|
387
|
+
trigger: g,
|
|
388
|
+
positioner: () => e().track().positionerElement,
|
|
389
|
+
beforeContentGuard: () => r?.beforeContentGuard() ?? null,
|
|
390
|
+
afterGuardRef: (e) => r?.setAfterTriggerGuard(e),
|
|
391
|
+
children: me
|
|
392
|
+
})
|
|
393
|
+
})];
|
|
394
|
+
}
|
|
395
|
+
function be(e) {
|
|
396
|
+
let t = Z(() => e.store), n = Z(() => e.setClickHandlers), r = Z(() => e.element), i = Z(() => e.tree), a = Z(() => e.delay);
|
|
397
|
+
return n(h({
|
|
398
|
+
context: t.context.floatingRoot,
|
|
399
|
+
enabled: () => !e.disabled(),
|
|
400
|
+
stickIfOpen: () => t.stickIfOpen()
|
|
401
|
+
})), X(() => n(void 0)), D({
|
|
402
|
+
context: t.context.floatingRoot,
|
|
403
|
+
reference: r,
|
|
404
|
+
floating: () => t.floatingElement(),
|
|
405
|
+
tree: i,
|
|
406
|
+
enabled: () => !e.disabled() && e.openOnHover() && (t.openMethod() !== "touch" || t.openChangeReason() !== "trigger-press"),
|
|
407
|
+
floatingEnabled: () => !1,
|
|
408
|
+
delay: () => ({ close: e.closeDelay() }),
|
|
409
|
+
restMs: a,
|
|
410
|
+
restOnly: () => !0,
|
|
411
|
+
handleClose: () => O(),
|
|
412
|
+
mouseOnly: () => !0
|
|
413
|
+
}), null;
|
|
414
|
+
}
|
|
415
|
+
function xe() {
|
|
416
|
+
if (typeof navigator > "u") return !1;
|
|
417
|
+
let e = navigator.platform.toLowerCase();
|
|
418
|
+
return /^i(os$|p)/.test(e) || e === "macintel" && navigator.maxTouchPoints > 1;
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/popover/portal/PopoverPortalContext.ts
|
|
422
|
+
var Se = Symbol("PopoverPortalContext"), Ce = W(Se);
|
|
423
|
+
function we() {
|
|
424
|
+
let e = Q(Ce);
|
|
425
|
+
if (e === Se) throw Error("Base UI: <Popover.Portal> is missing.");
|
|
426
|
+
return e;
|
|
427
|
+
}
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region src/popover/portal/PopoverPortal.tsx
|
|
430
|
+
function Te(e) {
|
|
431
|
+
let t = $(), 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 = Y(r, "render", "class", "container", "keepMounted", "ref", "style"), f = { keepMounted: i };
|
|
432
|
+
return I(U, {
|
|
433
|
+
get when() {
|
|
434
|
+
return s();
|
|
435
|
+
},
|
|
436
|
+
get children() {
|
|
437
|
+
return I(Ce, {
|
|
438
|
+
value: f,
|
|
439
|
+
get children() {
|
|
440
|
+
return I(A, z({
|
|
441
|
+
get render() {
|
|
442
|
+
return e.render;
|
|
443
|
+
},
|
|
444
|
+
get container() {
|
|
445
|
+
return n.container;
|
|
446
|
+
},
|
|
447
|
+
ref: (e) => {
|
|
448
|
+
n.ref && ae(n.ref, e);
|
|
449
|
+
},
|
|
450
|
+
get class() {
|
|
451
|
+
return l();
|
|
452
|
+
},
|
|
453
|
+
get style() {
|
|
454
|
+
return u();
|
|
455
|
+
}
|
|
456
|
+
}, d, { get children() {
|
|
457
|
+
return e.children;
|
|
458
|
+
} }));
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
//#endregion
|
|
465
|
+
//#region src/popover/utils/mergePopoverStyles.ts
|
|
466
|
+
function Ee(e, t) {
|
|
467
|
+
if (typeof t == "string") {
|
|
468
|
+
let n = Object.entries(e).filter((e) => e[1] != null).map(([e, t]) => `${e}:${String(t)}`).join(";");
|
|
469
|
+
return n ? `${n};${t}` : t;
|
|
470
|
+
}
|
|
471
|
+
return {
|
|
472
|
+
...e,
|
|
473
|
+
...t || void 0
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region src/popover/utils/stateAttributesMapping.ts
|
|
478
|
+
var De = k, Oe = j, ke = { activationDirection: (e) => e ? { "data-activation-direction": e } : null }, Ae = Symbol("PopoverPositionerContext"), je = W(Ae);
|
|
479
|
+
function Me() {
|
|
480
|
+
let e = Q(je);
|
|
481
|
+
if (e === Ae) throw Error("Base UI: <Popover.Positioner> is missing.");
|
|
482
|
+
return e;
|
|
483
|
+
}
|
|
484
|
+
//#endregion
|
|
485
|
+
//#region src/popover/positioner/PopoverPositioner.tsx
|
|
486
|
+
var Ne = /* @__PURE__ */ H("<div>");
|
|
487
|
+
function Pe(e) {
|
|
488
|
+
we();
|
|
489
|
+
let r = $(), i = ue(), s = e, c = e, [u, d] = q(null, { ownedWrite: !0 }), h = K(() => Fe(s.anchor) ?? r.store.context.floatingRoot.referenceElement()), g = f({
|
|
490
|
+
reference: h,
|
|
491
|
+
floating: u,
|
|
492
|
+
mounted: r.presence.mounted,
|
|
493
|
+
direction: i,
|
|
494
|
+
positionMethod: () => s.positionMethod ?? "absolute",
|
|
495
|
+
side: () => s.side ?? "bottom",
|
|
496
|
+
sideOffset: () => s.sideOffset ?? 0,
|
|
497
|
+
align: () => s.align ?? "center",
|
|
498
|
+
alignOffset: () => s.alignOffset ?? 0,
|
|
499
|
+
collisionBoundary: () => s.collisionBoundary ?? "clipping-ancestors",
|
|
500
|
+
collisionPadding: () => s.collisionPadding ?? 5,
|
|
501
|
+
arrowPadding: () => s.arrowPadding ?? 5,
|
|
502
|
+
sticky: () => s.sticky ?? !1,
|
|
503
|
+
disableAnchorTracking: () => s.disableAnchorTracking ?? !1,
|
|
504
|
+
collisionAvoidance: () => s.collisionAvoidance ?? { fallbackAxisSide: "end" },
|
|
505
|
+
adaptiveOriginMiddleware: () => r.store.track().adaptiveOriginMiddleware
|
|
506
|
+
}), _ = E(() => r.store.open(), () => g.state().isPositioned), v = K(() => ({
|
|
507
|
+
open: r.store.open(),
|
|
508
|
+
side: g.renderedSide(),
|
|
509
|
+
align: g.renderedAlign(),
|
|
510
|
+
anchorHidden: g.anchorHidden(),
|
|
511
|
+
instant: r.store.instantType() ?? (_() ? "initial" : void 0)
|
|
512
|
+
})), y = t(e, () => v(), (e) => (() => {
|
|
513
|
+
var t = L(Ne);
|
|
514
|
+
return V(t, e, !1), B(), t;
|
|
515
|
+
})()), b = K(() => a(e.class, v())), x = K(() => Ee({
|
|
516
|
+
...g.styles(),
|
|
517
|
+
"pointer-events": r.store.open() ? void 0 : "none"
|
|
518
|
+
}, o(e.style, v()))), S = K(() => n(v(), De)), C = Y(c, "align", "alignOffset", "anchor", "arrowPadding", "render", "class", "collisionAvoidance", "collisionBoundary", "collisionPadding", "disableAnchorTracking", "positionMethod", "ref", "side", "sideOffset", "sticky", "style"), w = K(() => r.modal() === !0 && r.store.openChangeReason() !== "trigger-hover"), T = null, D;
|
|
519
|
+
m({
|
|
520
|
+
enabled: () => r.store.open() && w(),
|
|
521
|
+
touchOpen: () => r.store.openMethod() === "touch",
|
|
522
|
+
positioner: u,
|
|
523
|
+
reference: () => r.store.track().activeTriggerElement
|
|
524
|
+
}), G(() => g.state().placement, (e) => {
|
|
525
|
+
r.store.context.floatingRoot.context.data.placement = e;
|
|
526
|
+
}), G(() => ({
|
|
527
|
+
trigger: r.store.track().activeTriggerElement,
|
|
528
|
+
positioner: u()
|
|
529
|
+
}), ({ trigger: e, positioner: t }) => {
|
|
530
|
+
let n = T;
|
|
531
|
+
if (e && (T = e), !n || !e || n === e || !t) return;
|
|
532
|
+
r.store.setInstantType(void 0), D?.abort();
|
|
533
|
+
let i = new AbortController();
|
|
534
|
+
return D = i, l(t, () => r.store.setInstantType("trigger-change"), i.signal), () => i.abort();
|
|
535
|
+
}), X(() => {
|
|
536
|
+
D?.abort(), delete r.store.context.floatingRoot.context.data.placement, r.store.state.positionerElement === Z(u) && r.store.setPositionerElement(null);
|
|
537
|
+
});
|
|
538
|
+
function O() {
|
|
539
|
+
let e = null;
|
|
540
|
+
return X(() => {
|
|
541
|
+
r.internalBackdropElement() === e && r.setInternalBackdropElement(null);
|
|
542
|
+
}), I(p, {
|
|
543
|
+
ref: (t) => {
|
|
544
|
+
e = t, r.setInternalBackdropElement(t);
|
|
545
|
+
},
|
|
546
|
+
get cutout() {
|
|
547
|
+
return r.store.track().activeTriggerElement;
|
|
548
|
+
},
|
|
549
|
+
get open() {
|
|
550
|
+
return r.store.open();
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
return I(je, {
|
|
555
|
+
value: g,
|
|
556
|
+
get children() {
|
|
557
|
+
return [I(U, {
|
|
558
|
+
get when() {
|
|
559
|
+
return R(() => !!r.presence.mounted())() ? w() : r.presence.mounted();
|
|
560
|
+
},
|
|
561
|
+
get children() {
|
|
562
|
+
return I(O, {});
|
|
563
|
+
}
|
|
564
|
+
}), I(y, z({
|
|
565
|
+
ref: [((e) => {
|
|
566
|
+
d(e), r.store.setPositionerElement(e);
|
|
567
|
+
}), s.ref],
|
|
568
|
+
role: "presentation",
|
|
569
|
+
get hidden() {
|
|
570
|
+
return !r.presence.mounted();
|
|
571
|
+
},
|
|
572
|
+
get class() {
|
|
573
|
+
return b();
|
|
574
|
+
},
|
|
575
|
+
get style() {
|
|
576
|
+
return x();
|
|
577
|
+
}
|
|
578
|
+
}, S, C))];
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
function Fe(e) {
|
|
583
|
+
return typeof e == "function" ? e() : e && "current" in e ? e.current : e;
|
|
584
|
+
}
|
|
585
|
+
//#endregion
|
|
586
|
+
//#region src/popover/utils/ClosePartContext.ts
|
|
587
|
+
var Ie = Symbol("PopoverClosePartContext"), Le = W(Ie);
|
|
588
|
+
function Re() {
|
|
589
|
+
let [e, t] = q(0, { ownedWrite: !0 });
|
|
590
|
+
return {
|
|
591
|
+
hasClosePart: () => e() > 0,
|
|
592
|
+
register() {
|
|
593
|
+
t((e) => e + 1);
|
|
594
|
+
let e = !0;
|
|
595
|
+
return () => {
|
|
596
|
+
e && (e = !1, t((e) => Math.max(0, e - 1)));
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
function ze() {
|
|
602
|
+
let e = Q(Le);
|
|
603
|
+
if (e === Ie) return;
|
|
604
|
+
let t = e.register();
|
|
605
|
+
X(t);
|
|
606
|
+
}
|
|
607
|
+
//#endregion
|
|
608
|
+
//#region src/popover/popup/PopoverPopup.tsx
|
|
609
|
+
var Be = /* @__PURE__ */ H("<div>"), Ve = /* @__PURE__ */ new Set([
|
|
610
|
+
"ArrowUp",
|
|
611
|
+
"ArrowDown",
|
|
612
|
+
"ArrowLeft",
|
|
613
|
+
"ArrowRight",
|
|
614
|
+
"Home",
|
|
615
|
+
"End"
|
|
616
|
+
]);
|
|
617
|
+
function He(e) {
|
|
618
|
+
let r = $(), i = Me(), s = de(!0) !== void 0, l = Re(), d = e, f = e, p = K(() => ({
|
|
619
|
+
open: r.store.open(),
|
|
620
|
+
side: i.renderedSide(),
|
|
621
|
+
align: i.renderedAlign(),
|
|
622
|
+
transitionStatus: r.store.track().transitionStatus,
|
|
623
|
+
instant: r.store.instantType()
|
|
624
|
+
})), m = t(e, () => p(), (e) => (() => {
|
|
625
|
+
var t = L(Be);
|
|
626
|
+
return V(t, e, !1), B(), t;
|
|
627
|
+
})()), h = K(() => a(e.class, p())), g = K(() => o(e.style, p())), _ = K(() => n(p(), Oe)), v = K(() => d.id ?? r.store.context.floatingId), y = K(() => r.modal() !== !1 && l.hasClosePart()), b = K(() => d.initialFocus ?? ((e) => e !== "touch" || r.store.state.popupElement)), x = Y(f, "render", "class", "finalFocus", "id", "initialFocus", "onKeyDown", "ref", "style"), S = c(() => d.onKeyDown, () => (e) => {
|
|
628
|
+
let t = r.store.state.popupProps.onKeyDown;
|
|
629
|
+
typeof t == "function" && t(e);
|
|
630
|
+
}, () => (e) => {
|
|
631
|
+
s && Ve.has(e.key) && e.stopPropagation();
|
|
632
|
+
}), C = null;
|
|
633
|
+
D({
|
|
634
|
+
context: r.store.context.floatingRoot,
|
|
635
|
+
reference: () => r.store.track().activeTriggerElement,
|
|
636
|
+
floating: () => r.store.track().positionerElement,
|
|
637
|
+
tree: () => r.tree,
|
|
638
|
+
enabled: () => !1,
|
|
639
|
+
floatingEnabled: () => r.store.openOnHover() && !r.store.disabled(),
|
|
640
|
+
delay: () => ({ close: r.store.closeDelay() }),
|
|
641
|
+
handleClose: () => O(),
|
|
642
|
+
mouseOnly: () => !0
|
|
643
|
+
}), G(() => v(), (e) => r.store.setPopupId(e)), G(() => y(), (e) => r.store.setFocusManagerModal(e)), X(() => {
|
|
644
|
+
r.store.setFocusManagerModal(!1), r.store.state.popupElement === C && r.store.setPopupElement(null);
|
|
645
|
+
});
|
|
646
|
+
function w() {
|
|
647
|
+
return I(m, z({
|
|
648
|
+
ref: [((e) => {
|
|
649
|
+
C = e, r.store.setPopupElement(e);
|
|
650
|
+
}), d.ref],
|
|
651
|
+
get id() {
|
|
652
|
+
return v();
|
|
653
|
+
},
|
|
654
|
+
role: "dialog",
|
|
655
|
+
tabIndex: -1,
|
|
656
|
+
"data-base-ui-focusable": "",
|
|
657
|
+
get "aria-labelledby"() {
|
|
658
|
+
return r.titleId();
|
|
659
|
+
},
|
|
660
|
+
get "aria-describedby"() {
|
|
661
|
+
return r.descriptionId();
|
|
662
|
+
},
|
|
663
|
+
get class() {
|
|
664
|
+
return h();
|
|
665
|
+
},
|
|
666
|
+
get style() {
|
|
667
|
+
return g();
|
|
668
|
+
},
|
|
669
|
+
onKeyDown: S
|
|
670
|
+
}, _, x));
|
|
671
|
+
}
|
|
672
|
+
return I(M, {
|
|
673
|
+
get context() {
|
|
674
|
+
return r.store.context.floatingRoot;
|
|
675
|
+
},
|
|
676
|
+
get tree() {
|
|
677
|
+
return r.tree;
|
|
678
|
+
},
|
|
679
|
+
get disabled() {
|
|
680
|
+
return !r.presence.mounted() || r.store.openChangeReason() === "trigger-hover";
|
|
681
|
+
},
|
|
682
|
+
get initialFocus() {
|
|
683
|
+
return b();
|
|
684
|
+
},
|
|
685
|
+
get returnFocus() {
|
|
686
|
+
return d.finalFocus;
|
|
687
|
+
},
|
|
688
|
+
get modal() {
|
|
689
|
+
return y();
|
|
690
|
+
},
|
|
691
|
+
restoreFocus: "popup",
|
|
692
|
+
get openInteractionType() {
|
|
693
|
+
return r.store.openMethod();
|
|
694
|
+
},
|
|
695
|
+
get previousFocusableElement() {
|
|
696
|
+
return R(() => !!u(r.store.track().activeTriggerElement))() ? r.store.track().activeTriggerElement : null;
|
|
697
|
+
},
|
|
698
|
+
get nextFocusableElement() {
|
|
699
|
+
return r.afterTriggerGuard;
|
|
700
|
+
},
|
|
701
|
+
get beforeContentGuardRef() {
|
|
702
|
+
return r.setBeforeContentGuard;
|
|
703
|
+
},
|
|
704
|
+
get children() {
|
|
705
|
+
return I(Le, {
|
|
706
|
+
value: l,
|
|
707
|
+
get children() {
|
|
708
|
+
return I(w, {});
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
//#endregion
|
|
715
|
+
//#region src/popover/arrow/PopoverArrow.tsx
|
|
716
|
+
var Ue = /* @__PURE__ */ H("<div>");
|
|
717
|
+
function We(e) {
|
|
718
|
+
let r = $(), i = Me(), s = e, c = e, l = K(() => ({
|
|
719
|
+
open: r.store.open(),
|
|
720
|
+
side: i.renderedSide(),
|
|
721
|
+
align: i.renderedAlign(),
|
|
722
|
+
uncentered: i.arrowUncentered()
|
|
723
|
+
})), u = t(e, () => l(), (e) => (() => {
|
|
724
|
+
var t = L(Ue);
|
|
725
|
+
return V(t, e, !1), B(), t;
|
|
726
|
+
})()), d = K(() => a(e.class, l())), f = K(() => Ee(i.arrowStyles(), o(e.style, l()))), p = K(() => n(l(), k)), m = Y(c, "render", "class", "ref", "style"), h = null;
|
|
727
|
+
return X(() => {
|
|
728
|
+
h && i.setArrowElement(null);
|
|
729
|
+
}), I(u, z({
|
|
730
|
+
ref: [((e) => {
|
|
731
|
+
h = e, i.setArrowElement(e);
|
|
732
|
+
}), s.ref],
|
|
733
|
+
"aria-hidden": "true",
|
|
734
|
+
get class() {
|
|
735
|
+
return d();
|
|
736
|
+
},
|
|
737
|
+
get style() {
|
|
738
|
+
return f();
|
|
739
|
+
}
|
|
740
|
+
}, p, m));
|
|
741
|
+
}
|
|
742
|
+
//#endregion
|
|
743
|
+
//#region src/popover/backdrop/PopoverBackdrop.tsx
|
|
744
|
+
var Ge = /* @__PURE__ */ H("<div>");
|
|
745
|
+
function Ke(e) {
|
|
746
|
+
let r = $(), i = e, s = e, c = K(() => ({
|
|
747
|
+
open: r.store.open(),
|
|
748
|
+
transitionStatus: r.store.track().transitionStatus
|
|
749
|
+
})), l = t(e, () => c(), (e) => (() => {
|
|
750
|
+
var t = L(Ge);
|
|
751
|
+
return V(t, e, !1), B(), t;
|
|
752
|
+
})()), u = K(() => a(e.class, c())), d = K(() => Ee({
|
|
753
|
+
"pointer-events": r.store.openChangeReason() === "trigger-hover" ? "none" : void 0,
|
|
754
|
+
"user-select": "none",
|
|
755
|
+
"-webkit-user-select": "none"
|
|
756
|
+
}, o(e.style, c()))), f = K(() => n(c(), Oe)), p = Y(s, "render", "class", "ref", "style"), m = null;
|
|
757
|
+
return X(() => {
|
|
758
|
+
r.backdropElement() === m && r.setBackdropElement(null);
|
|
759
|
+
}), I(l, z({
|
|
760
|
+
ref: [((e) => {
|
|
761
|
+
m = e, r.setBackdropElement(e);
|
|
762
|
+
}), i.ref],
|
|
763
|
+
role: "presentation",
|
|
764
|
+
get hidden() {
|
|
765
|
+
return !r.presence.mounted();
|
|
766
|
+
},
|
|
767
|
+
get class() {
|
|
768
|
+
return u();
|
|
769
|
+
},
|
|
770
|
+
get style() {
|
|
771
|
+
return d();
|
|
772
|
+
}
|
|
773
|
+
}, f, p));
|
|
774
|
+
}
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region src/popover/title/PopoverTitle.tsx
|
|
777
|
+
var qe = /* @__PURE__ */ H("<h2>");
|
|
778
|
+
function Je(e) {
|
|
779
|
+
let n = $(), r = e, i = e, s = `base-ui-${J()}`, c = K(() => r.id || s), l = {}, u = t(e, () => l, (e) => (() => {
|
|
780
|
+
var t = L(qe);
|
|
781
|
+
return V(t, e, !1), B(), t;
|
|
782
|
+
})()), d = K(() => a(e.class, l)), f = K(() => o(e.style, l)), p = Y(i, "render", "class", "id", "ref", "style");
|
|
783
|
+
return G(() => c(), (e) => (n.setTitleId(e), () => n.setTitleId((t) => t === e ? void 0 : t))), I(u, z({
|
|
784
|
+
ref: [r.ref],
|
|
785
|
+
get id() {
|
|
786
|
+
return c();
|
|
787
|
+
},
|
|
788
|
+
get class() {
|
|
789
|
+
return d();
|
|
790
|
+
},
|
|
791
|
+
get style() {
|
|
792
|
+
return f();
|
|
793
|
+
}
|
|
794
|
+
}, p));
|
|
795
|
+
}
|
|
796
|
+
//#endregion
|
|
797
|
+
//#region src/popover/description/PopoverDescription.tsx
|
|
798
|
+
var Ye = /* @__PURE__ */ H("<p>");
|
|
799
|
+
function Xe(e) {
|
|
800
|
+
let n = $(), r = e, i = e, s = `base-ui-${J()}`, c = K(() => r.id || s), l = {}, u = t(e, () => l, (e) => (() => {
|
|
801
|
+
var t = L(Ye);
|
|
802
|
+
return V(t, e, !1), B(), t;
|
|
803
|
+
})()), d = K(() => a(e.class, l)), f = K(() => o(e.style, l)), p = Y(i, "render", "class", "id", "ref", "style");
|
|
804
|
+
return G(() => c(), (e) => (n.setDescriptionId(e), () => n.setDescriptionId((t) => t === e ? void 0 : t))), I(u, z({
|
|
805
|
+
ref: [r.ref],
|
|
806
|
+
get id() {
|
|
807
|
+
return c();
|
|
808
|
+
},
|
|
809
|
+
get class() {
|
|
810
|
+
return d();
|
|
811
|
+
},
|
|
812
|
+
get style() {
|
|
813
|
+
return f();
|
|
814
|
+
}
|
|
815
|
+
}, p));
|
|
816
|
+
}
|
|
817
|
+
//#endregion
|
|
818
|
+
//#region src/popover/close/PopoverClose.tsx
|
|
819
|
+
var Ze = /* @__PURE__ */ H("<button>");
|
|
820
|
+
function Qe(e) {
|
|
821
|
+
let n = $();
|
|
822
|
+
ze();
|
|
823
|
+
let r = e, l = e, u = K(() => r.disabled ?? !1), d = K(() => r.nativeButton ?? !0), f = {}, p = t(e, () => f, (e) => (() => {
|
|
824
|
+
var t = L(Ze);
|
|
825
|
+
return V(t, e, !1), B(), t;
|
|
826
|
+
})()), m = K(() => a(e.class, f)), h = K(() => o(e.style, f)), g = Y(l, "render", "class", "disabled", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "ref", "style");
|
|
827
|
+
function _(e) {
|
|
828
|
+
n.store.open() && n.store.setOpen(!1, s(i, e));
|
|
829
|
+
}
|
|
830
|
+
let v = c(() => Z(() => u() ? F : void 0), () => r.onClick, () => _), y = c(() => Z(() => u() ? F : void 0), () => r.onPointerDown), b = c(() => Z(() => u() ? P : void 0), () => r.onMouseDown), x = c(() => Z(() => u() ? se : void 0), () => r.onKeyDown, () => Z(() => d() ? void 0 : le)), S = c(() => Z(() => u() ? P : void 0), () => r.onKeyUp, () => Z(() => d() ? void 0 : ce));
|
|
831
|
+
return I(p, z({
|
|
832
|
+
ref: [r.ref],
|
|
833
|
+
get type() {
|
|
834
|
+
return d() ? "button" : void 0;
|
|
835
|
+
},
|
|
836
|
+
get role() {
|
|
837
|
+
return d() ? void 0 : "button";
|
|
838
|
+
},
|
|
839
|
+
get tabIndex() {
|
|
840
|
+
return !d() && u() ? -1 : 0;
|
|
841
|
+
},
|
|
842
|
+
get disabled() {
|
|
843
|
+
return (R(() => !!d())() ? u() : d()) || void 0;
|
|
844
|
+
},
|
|
845
|
+
get "aria-disabled"() {
|
|
846
|
+
return !d() && u() ? "true" : void 0;
|
|
847
|
+
},
|
|
848
|
+
get class() {
|
|
849
|
+
return m();
|
|
850
|
+
},
|
|
851
|
+
get style() {
|
|
852
|
+
return h();
|
|
853
|
+
},
|
|
854
|
+
onClick: v,
|
|
855
|
+
onKeyDown: x,
|
|
856
|
+
onKeyUp: S,
|
|
857
|
+
onMouseDown: b,
|
|
858
|
+
onPointerDown: y
|
|
859
|
+
}, g));
|
|
860
|
+
}
|
|
861
|
+
//#endregion
|
|
862
|
+
//#region src/popover/viewport/PopoverViewport.tsx
|
|
863
|
+
var $e = /* @__PURE__ */ H("<div>");
|
|
864
|
+
function et(e) {
|
|
865
|
+
let r = $(), i = Me(), s = ue(), c = e, l = e, [u, f] = q({
|
|
866
|
+
activationDirection: void 0,
|
|
867
|
+
transitioning: !1
|
|
868
|
+
}, { ownedWrite: !0 }), p = K(() => ({
|
|
869
|
+
...u(),
|
|
870
|
+
instant: r.store.instantType()
|
|
871
|
+
})), m = t(e, () => p(), (e) => (() => {
|
|
872
|
+
var t = L($e);
|
|
873
|
+
return V(t, e, !1), B(), t;
|
|
874
|
+
})()), h = K(() => a(e.class, p())), g = K(() => o(e.style, p())), _ = K(() => n(p(), ke)), v = Y(l, "render", "children", "class", "ref", "style");
|
|
875
|
+
return I(m, z({
|
|
876
|
+
ref: [c.ref],
|
|
877
|
+
get class() {
|
|
878
|
+
return h();
|
|
879
|
+
},
|
|
880
|
+
get style() {
|
|
881
|
+
return g();
|
|
882
|
+
}
|
|
883
|
+
}, _, v, { get children() {
|
|
884
|
+
return I(d, {
|
|
885
|
+
get store() {
|
|
886
|
+
return r.store;
|
|
887
|
+
},
|
|
888
|
+
get side() {
|
|
889
|
+
return i.renderedSide();
|
|
890
|
+
},
|
|
891
|
+
get direction() {
|
|
892
|
+
return s();
|
|
893
|
+
},
|
|
894
|
+
onStateChange: f,
|
|
895
|
+
get children() {
|
|
896
|
+
return e.children;
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
} }));
|
|
900
|
+
}
|
|
901
|
+
//#endregion
|
|
902
|
+
//#region src/popover/store/PopoverHandle.ts
|
|
903
|
+
var tt = class extends ie {
|
|
904
|
+
constructor() {
|
|
905
|
+
super("Popover", !0, new me());
|
|
906
|
+
}
|
|
907
|
+
open(e) {
|
|
908
|
+
this.openByTrigger(e);
|
|
909
|
+
}
|
|
910
|
+
close() {
|
|
911
|
+
this.closePopup();
|
|
912
|
+
}
|
|
913
|
+
get isOpen() {
|
|
914
|
+
return this.attachedStore?.open() ?? !1;
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
function nt() {
|
|
918
|
+
return new tt();
|
|
919
|
+
}
|
|
920
|
+
//#endregion
|
|
921
|
+
//#region src/popover/index.parts.ts
|
|
922
|
+
var rt = /* @__PURE__ */ e({
|
|
923
|
+
Arrow: () => We,
|
|
924
|
+
Backdrop: () => Ke,
|
|
925
|
+
Close: () => Qe,
|
|
926
|
+
Description: () => Xe,
|
|
927
|
+
Handle: () => tt,
|
|
928
|
+
Popup: () => He,
|
|
929
|
+
Portal: () => Te,
|
|
930
|
+
Positioner: () => Pe,
|
|
931
|
+
Root: () => _e,
|
|
932
|
+
Title: () => Je,
|
|
933
|
+
Trigger: () => ye,
|
|
934
|
+
Viewport: () => et,
|
|
935
|
+
createHandle: () => nt
|
|
936
|
+
});
|
|
937
|
+
//#endregion
|
|
938
|
+
export { rt as t };
|