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,2301 @@
|
|
|
1
|
+
import { t as e } from "./useRender-CxZ8PI-g.js";
|
|
2
|
+
import { getStateAttributesProps as t } from "./internals/getStateAttributesProps.js";
|
|
3
|
+
import { E as n, S as r, b as i, g as a, h as o, i as s, l as c, r as l, t as u, v as d, w as f, y as p } from "./reasons-Co5CzjKq.js";
|
|
4
|
+
import { n as m, t as h } from "./resolveStyle-XcgAuaKR.js";
|
|
5
|
+
import { createChangeEventDetails as g, createGenericEventDetails as _ } from "./internals/createBaseUIEventDetails.js";
|
|
6
|
+
import { transitionStatusMapping as v } from "./internals/stateAttributesMapping.js";
|
|
7
|
+
import { composeEventHandlers as y, liveEventHandler as b } from "./internals/composeEventHandlers.js";
|
|
8
|
+
import { t as x } from "./runOnceAnimationsFinish-CFADb4CN.js";
|
|
9
|
+
import { l as ee, m as te, n as S, o as C, s as w, u as T } from "./dom-lDdayFF_.js";
|
|
10
|
+
import { i as E, n as D, r as O, t as k } from "./compositeNavigation-DCt1sQon.js";
|
|
11
|
+
import { t as ne } from "./createAnchorPositioning-DCXIApS1.js";
|
|
12
|
+
import { t as re } from "./InternalBackdrop-B8_lfUvf.js";
|
|
13
|
+
import { t as A } from "./createAnchoredPopupScrollLock-BxKpJbCE.js";
|
|
14
|
+
import { t as ie } from "./createClickInteraction-BeBsTqtY.js";
|
|
15
|
+
import { c as ae, i as oe, n as se, r as ce, s as le, t as ue } from "./FloatingTree-23B7KKPD.js";
|
|
16
|
+
import { a as de, n as fe, o as pe, t as me } from "./PopupStore-BjRwcvbG.js";
|
|
17
|
+
import { t as he } from "./createTransitionStatus-BL_cPSEA.js";
|
|
18
|
+
import { a as j, i as ge, n as _e, o as ve, r as M } from "./popupStateMapping-nhukB8NK.js";
|
|
19
|
+
import { t as ye } from "./FocusManager-q7z7PMV1.js";
|
|
20
|
+
import { t as be } from "./setRef-fXF6OIo3.js";
|
|
21
|
+
import { a as xe, i as Se, n as N, r as Ce, t as P } from "./buttonSemantics-paljfpOX.js";
|
|
22
|
+
import { n as we } from "./DirectionContext-BwMabICS.js";
|
|
23
|
+
import { DEFAULT_FIELD_STATE_ATTRIBUTES as Te, fieldStateAttributesMapping as Ee } from "./internals/field-constants.js";
|
|
24
|
+
import { n as De, r as Oe, t as ke } from "./FieldRootContext-D3fuVjs3.js";
|
|
25
|
+
import { n as Ae } from "./FormContext-CwLBtm_d.js";
|
|
26
|
+
import { a as je, c as Me, i as Ne, n as Pe, o as Fe, r as Ie, s as Le, t as Re } from "./isSolidAccessor-BH_FevwH.js";
|
|
27
|
+
import { r as ze } from "./LabelableContext-CmQF-TX2.js";
|
|
28
|
+
import { i as Be } from "./scrollable-BVaDUXng.js";
|
|
29
|
+
import { t as Ve } from "./platform-Bk5Q32mf.js";
|
|
30
|
+
import { t as He } from "./mergeStyleValue-Dcd36yxZ.js";
|
|
31
|
+
import { createComponent as F, delegateEvents as I, effect as Ue, getNextElement as L, memo as We, mergeProps as R, ref as Ge, runHydrationEvents as z, setAttribute as B, setProperty as Ke, spread as V, style as qe, template as H } from "@solidjs/web";
|
|
32
|
+
import { For as Je, Show as Ye, createContext as U, createEffect as W, createMemo as G, createSignal as K, createUniqueId as Xe, flush as Ze, omit as q, onCleanup as J, untrack as Y, useContext as Qe } from "solid-js";
|
|
33
|
+
//#region src/internals/overlay/createListNavigation.ts
|
|
34
|
+
function $e(e) {
|
|
35
|
+
let t = () => e.enabled?.() ?? !0, n = () => e.orientation?.() ?? "vertical", i = (e) => e === "Home" || e === "End" || n() !== "horizontal" && (e === "ArrowDown" || e === "ArrowUp") || n() !== "vertical" && (e === "ArrowLeft" || e === "ArrowRight"), a = null, o = (t) => t === "Home" || t === "ArrowDown" ? !0 : t === "End" || t === "ArrowUp" ? !1 : t === (e.rtl?.() ?? !1 ? "ArrowLeft" : "ArrowRight"), s = (t, r, i = !1) => {
|
|
36
|
+
let a = e.activeIndex() ?? e.selectedIndex?.() ?? -1;
|
|
37
|
+
if (i) a = o(t.key) ? D(r, e.disabledIndices?.()) : k(r, e.disabledIndices?.());
|
|
38
|
+
else {
|
|
39
|
+
let i = e.loopFocus?.() ?? !1, o = i && (e.allowEscape?.() ?? !1), s = O({
|
|
40
|
+
list: r,
|
|
41
|
+
currentIndex: a,
|
|
42
|
+
key: t.key,
|
|
43
|
+
orientation: n(),
|
|
44
|
+
rtl: e.rtl?.() ?? !1,
|
|
45
|
+
loop: o ? a === -1 : i,
|
|
46
|
+
cols: e.cols?.() ?? 1,
|
|
47
|
+
disabledIndices: e.disabledIndices?.()
|
|
48
|
+
}), c = t.key === "Home" || t.key === "End";
|
|
49
|
+
a = s === a && o && a !== -1 && !c ? -1 : s;
|
|
50
|
+
}
|
|
51
|
+
e.onNavigate(a === -1 ? null : a, t), !(e.virtual?.() ?? !1) && a >= 0 && r[a]?.focus({ preventScroll: !0 });
|
|
52
|
+
};
|
|
53
|
+
return W(() => ({
|
|
54
|
+
open: e.context.track().open,
|
|
55
|
+
list: e.list()
|
|
56
|
+
}), (e) => {
|
|
57
|
+
if (!a || !e.open || e.list.length === 0) return;
|
|
58
|
+
let t = a;
|
|
59
|
+
a = null, Y(() => s(t.event, e.list, !0));
|
|
60
|
+
}), {
|
|
61
|
+
onKeyDown(n) {
|
|
62
|
+
if (!t() || !i(n.key)) return;
|
|
63
|
+
if (n.preventDefault(), n.stopPropagation(), !e.context.state.open) {
|
|
64
|
+
let t = n.key.startsWith("Arrow");
|
|
65
|
+
if (!(e.openOnArrowKeyDown?.() ?? !0) || !t) return;
|
|
66
|
+
a = { event: n };
|
|
67
|
+
let i = g(r, n, e.context.state.domReferenceElement ?? void 0);
|
|
68
|
+
if (e.context.setOpen(!0, i), i.isCanceled) {
|
|
69
|
+
a = null;
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let o = e.list();
|
|
73
|
+
e.context.state.open && o.length > 0 && (a = null, s(n, o, !0));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
let o = e.list();
|
|
77
|
+
o.length > 0 && s(n, o);
|
|
78
|
+
},
|
|
79
|
+
onItemPointerMove(n, r) {
|
|
80
|
+
!t() || !(e.focusItemOnHover?.() ?? !0) || E(e.list(), r, e.disabledIndices?.()) || (e.onNavigate(r, n), (e.virtual?.() ?? !1) || e.list()[r]?.focus({ preventScroll: !0 }));
|
|
81
|
+
},
|
|
82
|
+
onItemPointerLeave(n) {
|
|
83
|
+
t() && (e.virtual?.() ?? !1) && e.onNavigate(null, n);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/internals/overlay/createTypeahead.ts
|
|
89
|
+
function et(e) {
|
|
90
|
+
let t = "", n = Y(() => e.selectedIndex?.() ?? e.activeIndex() ?? -1), r = null, i, a = () => {
|
|
91
|
+
clearTimeout(i), t = "", n = r ?? n, e.onTyping?.(!1);
|
|
92
|
+
};
|
|
93
|
+
J(a), W(() => ({
|
|
94
|
+
open: e.context.track().open,
|
|
95
|
+
selected: e.selectedIndex?.() ?? null
|
|
96
|
+
}), (e) => {
|
|
97
|
+
(e.open || e.selected === null) && (clearTimeout(i), r = null, t = "");
|
|
98
|
+
});
|
|
99
|
+
let o = (t) => {
|
|
100
|
+
let n = e.elements?.()[t];
|
|
101
|
+
if (n && !w(n) || n?.matches(":disabled")) return !1;
|
|
102
|
+
let r = e.disabledIndices?.();
|
|
103
|
+
return !r || !E([], t, r);
|
|
104
|
+
}, s = (t, n) => {
|
|
105
|
+
let r = e.list();
|
|
106
|
+
if (!r.length) return -1;
|
|
107
|
+
let i = (n % r.length + r.length) % r.length, a = t.toLowerCase();
|
|
108
|
+
for (let e = 0; e < r.length; e += 1) {
|
|
109
|
+
let t = (i + e) % r.length;
|
|
110
|
+
if (r[t]?.toLowerCase().startsWith(a) && o(t)) return t;
|
|
111
|
+
}
|
|
112
|
+
return -1;
|
|
113
|
+
};
|
|
114
|
+
return {
|
|
115
|
+
onKeyDown(c) {
|
|
116
|
+
if (!(e.enabled?.() ?? !0) || c.key.length !== 1 || c.ctrlKey || c.metaKey || c.altKey) return;
|
|
117
|
+
let l = e.list();
|
|
118
|
+
t && c.key === " " && (c.preventDefault(), c.stopPropagation(), e.onTyping?.(!0));
|
|
119
|
+
let u = t === "";
|
|
120
|
+
u && (n = e.selectedIndex?.() ?? e.activeIndex() ?? -1), l.every((e, t) => e && o(t) ? e[0]?.toLowerCase() !== e[1]?.toLowerCase() : !0) && t === c.key && (t = "", n = r ?? n), t += c.key, clearTimeout(i), i = setTimeout(a, e.resetMs?.() ?? 750);
|
|
121
|
+
let d = (u ? e.selectedIndex?.() ?? e.activeIndex() ?? -1 : n) + 1, f = s(t, d);
|
|
122
|
+
f === -1 ? c.key !== " " && a() : (e.context.state.open && c.key !== " " && (c.preventDefault(), c.stopPropagation()), e.onTyping?.(!0), e.onMatch(f), r = f);
|
|
123
|
+
},
|
|
124
|
+
onBlur(t) {
|
|
125
|
+
let n = t.relatedTarget;
|
|
126
|
+
!S(e.context.state.domReferenceElement, n) && !S(e.context.state.floatingElement, n) && a();
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/internals/valueLabel.ts
|
|
132
|
+
function tt(e) {
|
|
133
|
+
if (e == null) return "";
|
|
134
|
+
if (typeof e == "string") return e;
|
|
135
|
+
try {
|
|
136
|
+
return JSON.stringify(e) ?? String(e);
|
|
137
|
+
} catch {
|
|
138
|
+
return String(e);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function nt(e) {
|
|
142
|
+
return Array.isArray(e) && e.length > 0 && typeof e[0] == "object" && e[0] != null && Array.isArray(e[0].items);
|
|
143
|
+
}
|
|
144
|
+
function rt(e) {
|
|
145
|
+
return Array.isArray(e) ? nt(e) ? e.flatMap((e) => e.items) : e : [];
|
|
146
|
+
}
|
|
147
|
+
function it(e) {
|
|
148
|
+
if (e == null) return !1;
|
|
149
|
+
if (!Array.isArray(e)) return Object.hasOwn(e, "null");
|
|
150
|
+
for (let t of rt(e)) {
|
|
151
|
+
let e = t;
|
|
152
|
+
if (e && typeof e == "object" && e.value == null && e.label != null) return !0;
|
|
153
|
+
}
|
|
154
|
+
return !1;
|
|
155
|
+
}
|
|
156
|
+
function at(e, t) {
|
|
157
|
+
if (t && e != null) return t(e) ?? "";
|
|
158
|
+
if (e && typeof e == "object") {
|
|
159
|
+
if ("label" in e && e.label != null) return String(e.label);
|
|
160
|
+
if ("value" in e) return String(e.value);
|
|
161
|
+
}
|
|
162
|
+
return tt(e);
|
|
163
|
+
}
|
|
164
|
+
function ot(e, t) {
|
|
165
|
+
return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? tt(e.value) : tt(e);
|
|
166
|
+
}
|
|
167
|
+
function st(e, t, n) {
|
|
168
|
+
let r = () => at(e, n);
|
|
169
|
+
if (n && e != null) return n(e);
|
|
170
|
+
if (e && typeof e == "object" && "label" in e && e.label != null) return e.label;
|
|
171
|
+
if (t && !Array.isArray(t)) return Object.hasOwn(t, String(e)) ? t[String(e)] ?? r() : r();
|
|
172
|
+
if (Array.isArray(t)) {
|
|
173
|
+
let n = rt(t);
|
|
174
|
+
if (typeof e != "object" || !e) {
|
|
175
|
+
let t = n.find((t) => t && t.value === e);
|
|
176
|
+
return t && t.label != null ? t.label : r();
|
|
177
|
+
}
|
|
178
|
+
if ("value" in e) {
|
|
179
|
+
let t = n.find((t) => t && t.value === e.value);
|
|
180
|
+
if (t && t.label != null) return t.label;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return r();
|
|
184
|
+
}
|
|
185
|
+
function ct(e, t, n) {
|
|
186
|
+
return e.flatMap((e, r) => {
|
|
187
|
+
let i = st(e, t, n);
|
|
188
|
+
return r === 0 ? [i] : [", ", i];
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/internals/filter.ts
|
|
193
|
+
var lt = /* @__PURE__ */ new Map();
|
|
194
|
+
function ut(e) {
|
|
195
|
+
return Array.isArray(e) ? e.map((e) => ut(e)).join(",") : e == null ? "" : String(e);
|
|
196
|
+
}
|
|
197
|
+
function dt(e = {}) {
|
|
198
|
+
let t = {
|
|
199
|
+
usage: "search",
|
|
200
|
+
sensitivity: "base",
|
|
201
|
+
ignorePunctuation: !0,
|
|
202
|
+
...e
|
|
203
|
+
}, n = `${ut(e.locale)}|${JSON.stringify(t)}`, r = lt.get(n);
|
|
204
|
+
if (r) return r;
|
|
205
|
+
let i = new Intl.Collator(e.locale, t), a = {
|
|
206
|
+
contains(e, t, n) {
|
|
207
|
+
if (!t) return !0;
|
|
208
|
+
let r = at(e, n);
|
|
209
|
+
for (let e = 0; e <= r.length - t.length; e += 1) if (i.compare(r.slice(e, e + t.length), t) === 0) return !0;
|
|
210
|
+
return !1;
|
|
211
|
+
},
|
|
212
|
+
startsWith(e, t, n) {
|
|
213
|
+
if (!t) return !0;
|
|
214
|
+
let r = at(e, n);
|
|
215
|
+
return i.compare(r.slice(0, t.length), t) === 0;
|
|
216
|
+
},
|
|
217
|
+
endsWith(e, t, n) {
|
|
218
|
+
if (!t) return !0;
|
|
219
|
+
let r = at(e, n), a = t.length;
|
|
220
|
+
return r.length >= a && i.compare(r.slice(r.length - a), t) === 0;
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
return lt.set(n, a), a;
|
|
224
|
+
}
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region src/combobox/store/ComboboxItemRegistry.ts
|
|
227
|
+
var ft = class {
|
|
228
|
+
registrations = /* @__PURE__ */ new Map();
|
|
229
|
+
revision;
|
|
230
|
+
setRevision;
|
|
231
|
+
order = 0;
|
|
232
|
+
constructor() {
|
|
233
|
+
let [e, t] = K(0, { ownedWrite: !0 });
|
|
234
|
+
this.revision = e, this.setRevision = t;
|
|
235
|
+
}
|
|
236
|
+
register(e) {
|
|
237
|
+
let t = {
|
|
238
|
+
...e,
|
|
239
|
+
order: this.order
|
|
240
|
+
};
|
|
241
|
+
return this.order += 1, this.registrations.set(e.token, t), this.touch(), () => {
|
|
242
|
+
this.registrations.delete(e.token) && this.touch();
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
touch() {
|
|
246
|
+
this.setRevision((e) => e + 1);
|
|
247
|
+
}
|
|
248
|
+
items() {
|
|
249
|
+
return this.revision(), Array.from(this.registrations.values()).sort(pt);
|
|
250
|
+
}
|
|
251
|
+
indexOf(e) {
|
|
252
|
+
let t = this.items(), n = t.findIndex((t) => t.token === e);
|
|
253
|
+
return n === -1 ? -1 : t[n]?.index() ?? n;
|
|
254
|
+
}
|
|
255
|
+
elements() {
|
|
256
|
+
let e = this.items(), t = [];
|
|
257
|
+
e.forEach((e, n) => {
|
|
258
|
+
t[e.index() ?? n] = e.element();
|
|
259
|
+
});
|
|
260
|
+
for (let e = 0; e < t.length; e += 1) t[e] ??= null;
|
|
261
|
+
return t;
|
|
262
|
+
}
|
|
263
|
+
values() {
|
|
264
|
+
let e = this.items(), t = [];
|
|
265
|
+
return e.forEach((e, n) => {
|
|
266
|
+
t[e.index() ?? n] = e.value();
|
|
267
|
+
}), t;
|
|
268
|
+
}
|
|
269
|
+
labels() {
|
|
270
|
+
return this.elements().map((e) => e?.textContent ?? null);
|
|
271
|
+
}
|
|
272
|
+
disabledIndices() {
|
|
273
|
+
return this.items().flatMap((e, t) => e.disabled() ? [e.index() ?? t] : []);
|
|
274
|
+
}
|
|
275
|
+
size() {
|
|
276
|
+
return this.items().length;
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
function pt(e, t) {
|
|
280
|
+
let n = e.index(), r = t.index();
|
|
281
|
+
if (n !== void 0 && r !== void 0) return n - r;
|
|
282
|
+
let i = e.element(), a = t.element();
|
|
283
|
+
if (i && a && i !== a && i.isConnected && a.isConnected) {
|
|
284
|
+
let e = i.compareDocumentPosition(a);
|
|
285
|
+
if (e & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
|
|
286
|
+
if (e & Node.DOCUMENT_POSITION_PRECEDING) return 1;
|
|
287
|
+
}
|
|
288
|
+
return e.order - t.order;
|
|
289
|
+
}
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/combobox/store/ComboboxStore.ts
|
|
292
|
+
function mt(e) {
|
|
293
|
+
let [t, n] = K(() => e, { ownedWrite: !0 });
|
|
294
|
+
return [t, (e) => {
|
|
295
|
+
n(() => e);
|
|
296
|
+
}];
|
|
297
|
+
}
|
|
298
|
+
var ht = class extends me {
|
|
299
|
+
collection = new ft();
|
|
300
|
+
keyboardActive = !0;
|
|
301
|
+
pointerDownItem = null;
|
|
302
|
+
selectionEvent = null;
|
|
303
|
+
chipsContainerElement = null;
|
|
304
|
+
clearElement = null;
|
|
305
|
+
emptyElement = null;
|
|
306
|
+
startDismissElement = null;
|
|
307
|
+
endDismissElement = null;
|
|
308
|
+
activeIndex;
|
|
309
|
+
setActiveIndex;
|
|
310
|
+
selectedIndex;
|
|
311
|
+
setSelectedIndex;
|
|
312
|
+
forceMounted;
|
|
313
|
+
setForceMounted;
|
|
314
|
+
labelId;
|
|
315
|
+
setLabelId;
|
|
316
|
+
listElement;
|
|
317
|
+
setListElement;
|
|
318
|
+
popupSide;
|
|
319
|
+
setPopupSide;
|
|
320
|
+
openMethod;
|
|
321
|
+
setOpenMethod;
|
|
322
|
+
inputInsidePopup;
|
|
323
|
+
setInputInsidePopup;
|
|
324
|
+
inputOwnsFormValue;
|
|
325
|
+
setInputOwnsFormValue;
|
|
326
|
+
constructor(e) {
|
|
327
|
+
super(e), [this.activeIndex, this.setActiveIndex] = mt(null), [this.selectedIndex, this.setSelectedIndex] = mt(null), [this.forceMounted, this.setForceMounted] = mt(!1), [this.labelId, this.setLabelId] = mt(void 0), [this.listElement, this.setListElement] = mt(null), [this.popupSide, this.setPopupSide] = mt(null), [this.openMethod, this.setOpenMethod] = mt(null), [this.inputInsidePopup, this.setInputInsidePopup] = mt(!0), [this.inputOwnsFormValue, this.setInputOwnsFormValue] = mt(e.inputOwnsFormValue ?? !1);
|
|
328
|
+
}
|
|
329
|
+
elements() {
|
|
330
|
+
return this.collection.elements();
|
|
331
|
+
}
|
|
332
|
+
resolvedPopupSide() {
|
|
333
|
+
return this.track().mounted && this.track().positionerElement ? this.popupSide() : null;
|
|
334
|
+
}
|
|
335
|
+
resetAfterClose() {
|
|
336
|
+
this.setOpenMethod(null), this.pointerDownItem = null, this.selectionEvent = null;
|
|
337
|
+
}
|
|
338
|
+
}, gt = Symbol("ComboboxRootContext"), _t = U(gt);
|
|
339
|
+
function X() {
|
|
340
|
+
let e = Qe(_t);
|
|
341
|
+
if (e === gt) throw Error("Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.");
|
|
342
|
+
return e;
|
|
343
|
+
}
|
|
344
|
+
var vt = Symbol("ComboboxGroupCollectionContext"), yt = U(vt);
|
|
345
|
+
function bt() {
|
|
346
|
+
let e = Qe(yt);
|
|
347
|
+
return e === vt ? void 0 : e;
|
|
348
|
+
}
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/combobox/root/AriaCombobox.tsx
|
|
351
|
+
var xt = /* @__PURE__ */ H("<input tabindex=-1 aria-hidden=true>"), St = /* @__PURE__ */ H("<input type=hidden>"), Ct = {
|
|
352
|
+
"clip-path": "inset(50%)",
|
|
353
|
+
overflow: "hidden",
|
|
354
|
+
"white-space": "nowrap",
|
|
355
|
+
border: "0",
|
|
356
|
+
padding: "0",
|
|
357
|
+
width: "1px",
|
|
358
|
+
height: "1px",
|
|
359
|
+
margin: "-1px",
|
|
360
|
+
position: "fixed",
|
|
361
|
+
top: "0",
|
|
362
|
+
left: "0"
|
|
363
|
+
}, wt = {
|
|
364
|
+
...Ct,
|
|
365
|
+
position: "absolute"
|
|
366
|
+
}, Tt = Symbol("none"), Et = {
|
|
367
|
+
value: Tt,
|
|
368
|
+
index: -1
|
|
369
|
+
};
|
|
370
|
+
function Dt(e) {
|
|
371
|
+
let t = Oe(!0), r = Ae(), o = ze(), s = we(), c = ae(), l = le(), u = c ?? new ce(), m = Symbol("Combobox"), h = `base-ui-${Xe()}`, v = `base-ui-${Xe()}`, y = Xe(), b = Y(() => e.selectedValue !== void 0), x = Y(() => e.inputValue !== void 0), te = Y(() => e.open !== void 0), C = Y(() => e.inputValue !== void 0 || e.defaultInputValue !== void 0), w = G(() => e.selectionMode), T = G(() => e.selectionMode === "multiple"), E = G(() => e.selectionMode === "single"), D = G(() => e.isItemEqualToValue ?? Ne), O = () => e.itemCollection ? k : e.itemToStringLabel;
|
|
372
|
+
function k(t) {
|
|
373
|
+
let n = e.itemCollection;
|
|
374
|
+
if (!n) return at(t, e.itemToStringLabel);
|
|
375
|
+
if (!n.hasValue(t, D())) {
|
|
376
|
+
let r = rt(e.filteredItems).find((e) => Ie(n.value(e), t, D()));
|
|
377
|
+
if (r !== void 0) return n.itemLabel(r);
|
|
378
|
+
}
|
|
379
|
+
return n.label(t, D(), e.itemToStringLabel);
|
|
380
|
+
}
|
|
381
|
+
let ne = (t) => e.itemCollection ? e.itemCollection.value(t) : t, re = () => e.itemCollection?.itemLabel ?? e.itemToStringLabel, A = () => e.itemToStringValue, fe = Y(() => {
|
|
382
|
+
let t = e.defaultSelectedValue;
|
|
383
|
+
return t == null ? e.selectionMode === "multiple" ? [] : t ?? null : e.selectionMode === "multiple" && Array.isArray(t) ? t.slice() : t;
|
|
384
|
+
}), [me, he] = K(() => fe), j = G(() => b ? e.selectedValue ?? null : me()), ge = Y(() => C ? e.defaultInputValue ?? e.inputValue ?? "" : e.selectionMode === "single" ? k(j()) : ""), [_e, ve] = K(ge), M = G(() => x ? e.inputValue ?? "" : _e()), [ye, be] = K(!1), [xe, Se] = K(null), [N, Ce] = K(null, { ownedWrite: !0 }), [P, Te] = K(null, { ownedWrite: !0 }), [Ee, De] = K(null, { ownedWrite: !0 }), [ke, Pe] = K(null, { ownedWrite: !0 }), [Re, Ve] = K(null, { ownedWrite: !0 }), He = G(() => e.id ?? h), I = G(() => t.disabled() || (e.disabled ?? !1)), R = G(() => e.readOnly ?? !1), z = G(() => e.required ?? !1), V = G(() => e.modal ?? !1), H = G(() => e.grid ?? !1), Ye = G(() => e.virtualized ?? !1), U = G(() => e.inline ?? !1), Ze = G(() => e.openOnInputClick ?? !0), q = G(() => e.keepHighlight ?? !1), Qe = G(() => e.highlightItemOnHover ?? !0), et = G(() => e.loopFocus ?? !0), tt = G(() => e.submitOnItemClick ?? !1), it = G(() => e.autoComplete ?? "list"), st = G(() => e.limit ?? -1), ct = G(() => t.name() ?? e.name), lt = G(() => e.form), ut = G(() => e.items !== void 0), ft = G(() => e.filteredItems !== void 0), pt = G(() => e.autoHighlight === "always" ? "always" : e.autoHighlight ? "input-change" : !1), mt = G(() => dt({ locale: e.locale })), gt = G(() => {
|
|
385
|
+
if (e.filter === null) return () => !0;
|
|
386
|
+
if (e.filter !== void 0) return e.filter;
|
|
387
|
+
let t = mt(), n = re();
|
|
388
|
+
return (e, r) => e != null && t.contains(e, r, n);
|
|
389
|
+
}), X = G(() => xe() ?? String(M()).trim()), vt = G(() => E() ? k(j()) : ""), yt = G(() => {
|
|
390
|
+
let e = vt(), t = X();
|
|
391
|
+
return E() && !ye() && t !== "" && e.length === t.length && mt().contains(e, t);
|
|
392
|
+
}), bt = G(() => e.filterQuery ?? (yt() ? "" : X())), Dt = G(() => ut() && ft() && yt() && (!e.itemCollection || e.itemCollection.hasValue(j(), D()))), jt = G(() => rt(e.items)), Mt = G(() => {
|
|
393
|
+
if (e.filteredItems !== void 0 && !Dt()) return e.filteredItems;
|
|
394
|
+
let t = e.items;
|
|
395
|
+
if (t === void 0) return [];
|
|
396
|
+
let n = bt(), r = st(), i = gt(), a = re();
|
|
397
|
+
if (nt(t)) {
|
|
398
|
+
let e = [], o = 0;
|
|
399
|
+
for (let s of t) {
|
|
400
|
+
if (r > -1 && o >= r) break;
|
|
401
|
+
let t = r > -1 ? r - o : Infinity, c = n === "" ? s.items.slice(0, t) : [];
|
|
402
|
+
if (n !== "") for (let e of s.items) {
|
|
403
|
+
if (c.length >= t) break;
|
|
404
|
+
i(e, n, a) && c.push(e);
|
|
405
|
+
}
|
|
406
|
+
c.length > 0 && (e.push({
|
|
407
|
+
...s,
|
|
408
|
+
items: c
|
|
409
|
+
}), o += c.length);
|
|
410
|
+
}
|
|
411
|
+
return e;
|
|
412
|
+
}
|
|
413
|
+
let o = jt();
|
|
414
|
+
if (n === "") return r > -1 ? o.slice(0, r) : o;
|
|
415
|
+
let s = [];
|
|
416
|
+
for (let e of o) {
|
|
417
|
+
if (r > -1 && s.length >= r) break;
|
|
418
|
+
i(e, n, a) && s.push(e);
|
|
419
|
+
}
|
|
420
|
+
return s;
|
|
421
|
+
}), Nt = G(() => {
|
|
422
|
+
let e = Mt();
|
|
423
|
+
return nt(e) ? e.flatMap((e) => e.items) : e;
|
|
424
|
+
}), Pt = G(() => Mt().length === 0), Ft = !1, It = Et, Lt = f, Rt = null, zt = null, Bt = Y(() => !!(e.open ?? e.defaultOpen) && e.autoHighlight === !0), Vt = Ot(Y(j)), Ht = Y(M), Ut = Y(X), Z = new ht({
|
|
425
|
+
inputOwnsFormValue: Y(() => e.selectionMode === "none"),
|
|
426
|
+
controlledOpen: () => te ? e.open : void 0,
|
|
427
|
+
floatingId: v,
|
|
428
|
+
nodeId: y,
|
|
429
|
+
onOpenChange: () => (t, n) => {
|
|
430
|
+
Z.open() !== t && (!t && e.actionsRef && n.preventUnmountOnClose(), n.reason === "escape-key" && ut() && Nt().length === 0 && !Z.emptyElement && n.allowPropagation(), e.onOpenChange?.(t, n), !n.isCanceled && sn(t, n));
|
|
431
|
+
},
|
|
432
|
+
onOpenChangeComplete: () => e.onOpenChangeComplete
|
|
433
|
+
});
|
|
434
|
+
Z.update({ open: Y(() => e.open ?? e.defaultOpen ?? !1) }), Z.configureTriggerUnmount({ closeOnActiveTriggerUnmount: !1 }), W(() => w() === "none" && (e.inline || !Z.inputInsidePopup()), (e) => Z.setInputOwnsFormValue(!!e));
|
|
435
|
+
let Wt = oe({
|
|
436
|
+
tree: u,
|
|
437
|
+
id: y,
|
|
438
|
+
parentId: l,
|
|
439
|
+
context: () => Z.context.floatingRoot
|
|
440
|
+
}), Gt = de(Z, () => Kt(), { onUnmount: () => mn() });
|
|
441
|
+
function Kt() {
|
|
442
|
+
return U() ? Z.track().positionerElement?.closest("[role=\"dialog\"]") ?? null : Z.track().popupElement;
|
|
443
|
+
}
|
|
444
|
+
let Q = G(() => ut() || ft() ? Nt().map(ne) : Z.collection.values());
|
|
445
|
+
function qt() {
|
|
446
|
+
let e = Z.collection.labels();
|
|
447
|
+
if (!ut()) return e;
|
|
448
|
+
let t = Nt().map((e) => at(e, re()));
|
|
449
|
+
return Z.forceMounted() ? t.map((t, n) => e[n] ?? t) : t;
|
|
450
|
+
}
|
|
451
|
+
let Jt = G(() => {
|
|
452
|
+
let e = Z.collection.elements(), t = Q().length;
|
|
453
|
+
return e.length < t && (e.length = t), e;
|
|
454
|
+
}), Yt = G(() => {
|
|
455
|
+
if (!H()) return 1;
|
|
456
|
+
Z.collection.items();
|
|
457
|
+
let e = Z.listElement()?.querySelector("[role=\"row\"]");
|
|
458
|
+
return Math.max(1, e?.childElementCount ?? 1);
|
|
459
|
+
}), Xt = G(() => {
|
|
460
|
+
let e = j();
|
|
461
|
+
return e == null ? !1 : T() && Array.isArray(e) ? e.length > 0 : !0;
|
|
462
|
+
}), Zt = G(() => {
|
|
463
|
+
let e = j();
|
|
464
|
+
return Array.isArray(e) && e.length > 0;
|
|
465
|
+
}), Qt = G(() => w() === "none" ? M() : j()), $t = G(() => {
|
|
466
|
+
if (w() === "none") return M();
|
|
467
|
+
let t = j();
|
|
468
|
+
return T() && Array.isArray(t) ? t.map((t) => ot(t, e.itemToStringValue)) : ot(t, e.itemToStringValue);
|
|
469
|
+
}), en = G(() => {
|
|
470
|
+
let t = Qt();
|
|
471
|
+
return T() && Array.isArray(t) ? "" : ot(t, e.itemToStringValue);
|
|
472
|
+
}), tn = G(() => T() || w() === "none" && Z.inputOwnsFormValue() ? void 0 : ct());
|
|
473
|
+
function nn(t, n, r) {
|
|
474
|
+
if (Lt = r, n === -1) {
|
|
475
|
+
if (It === Et) return;
|
|
476
|
+
It = Et;
|
|
477
|
+
} else It = {
|
|
478
|
+
value: t,
|
|
479
|
+
index: n
|
|
480
|
+
};
|
|
481
|
+
e.onItemHighlighted?.(t, _(r, void 0, { index: n }));
|
|
482
|
+
}
|
|
483
|
+
function $(e) {
|
|
484
|
+
if (e.selectedIndex !== void 0 && Z.setSelectedIndex(e.selectedIndex), e.activeIndex === void 0) return;
|
|
485
|
+
Z.setActiveIndex(e.activeIndex);
|
|
486
|
+
let t = e.type || "none";
|
|
487
|
+
e.activeIndex === null ? nn(void 0, -1, t) : nn(Y(Q)[e.activeIndex], e.activeIndex, t);
|
|
488
|
+
}
|
|
489
|
+
function rn() {
|
|
490
|
+
let e = Z.listElement();
|
|
491
|
+
if (Ye() || !e) return;
|
|
492
|
+
let t = Z.track().popupElement, n = e.firstElementChild ?? e;
|
|
493
|
+
for (; ee(n) && !(t ? !S(t, n) : n.getAttribute("role") === "dialog");) {
|
|
494
|
+
if (Be(n)) {
|
|
495
|
+
n.scrollTop = 0;
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
n = n.parentElement;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
function an(t, n) {
|
|
502
|
+
if (e.onInputValueChange?.(t, n), !n.isCanceled) {
|
|
503
|
+
if (Ft = n.reason === a, n.reason === "input-change") {
|
|
504
|
+
Z.open() && xe() !== null && Se(null);
|
|
505
|
+
let e = n.event, r = e.inputType;
|
|
506
|
+
if (e.type === "compositionend" || r != null && r !== "" && r !== "insertReplacementText") {
|
|
507
|
+
let e = t.trim() !== "";
|
|
508
|
+
e && be(!0), Rt = { hasQuery: e }, rn(), e && pt() && Z.activeIndex() == null && (Z.open() || U()) && Z.setActiveIndex(0);
|
|
509
|
+
}
|
|
510
|
+
} else n.reason === "input-clear" && t === "" && Z.inputInsidePopup() && (Rt = {
|
|
511
|
+
hasQuery: !1,
|
|
512
|
+
selection: !0
|
|
513
|
+
});
|
|
514
|
+
x || ve(t);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
function on(e, t) {
|
|
518
|
+
return Z.setOpen(e, t);
|
|
519
|
+
}
|
|
520
|
+
function sn(e, n) {
|
|
521
|
+
if (e && Z.inputInsidePopup() && !U() && xe() !== null && (be(!1), Se(null), M() !== "" && n.reason !== "input-change" && an("", g(a, n.event))), !e && ye()) {
|
|
522
|
+
let e = X();
|
|
523
|
+
E() ? (U() || Se(e), e === "" && be(!1)) : T() && (U() || Se(e), Z.inputInsidePopup() && $({ activeIndex: null }), (!Z.inputInsidePopup() || U()) && an("", g(a, n.event, void 0, { isItemPress: n.reason === p })));
|
|
524
|
+
}
|
|
525
|
+
!e && Z.inputInsidePopup() && (n.reason === "focus-out" || n.reason === "outside-press") && (t.setTouched(!0), t.setFocused(!1), t.validationMode() === "onBlur" && t.validation.commit(Y(Qt)));
|
|
526
|
+
}
|
|
527
|
+
function cn(t, n) {
|
|
528
|
+
e.onSelectedValueChange?.(t, n), !n.isCanceled && (b || he(() => t), (w() === "none" && Z.track().popupElement != null && (e.fillInputOnItemPress ?? !0) || E() && !Z.inputInsidePopup()) && an(k(t), g(n.reason, n.event)));
|
|
529
|
+
}
|
|
530
|
+
function ln(e, t) {
|
|
531
|
+
let n = e.target, r = Z.selectionEvent ?? e;
|
|
532
|
+
Z.selectionEvent = null;
|
|
533
|
+
let i = g(p, r), o = n?.closest("a")?.getAttribute("href");
|
|
534
|
+
if (o) {
|
|
535
|
+
o.startsWith("#") && on(!1, i);
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
if (T()) {
|
|
539
|
+
let e = Array.isArray(j()) ? j() : [], n = Me(e, t, D());
|
|
540
|
+
if (cn(n ? Le(e, t, D()) : [...e, t], i), i.isCanceled || (N()?.value.trim() ?? "") === "") return;
|
|
541
|
+
Z.inputInsidePopup() ? (an("", g(a, i.event, void 0, { isItemPress: !0 })), Rt && !n && (Rt.toggledValue = t)) : on(!1, i);
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
cn(t, i), !i.isCanceled && on(!1, i);
|
|
545
|
+
}
|
|
546
|
+
function un() {
|
|
547
|
+
let e = t.validation.getInputControl()?.closest("form") ?? Re()?.form ?? N()?.form;
|
|
548
|
+
e && typeof e.requestSubmit == "function" && e.requestSubmit();
|
|
549
|
+
}
|
|
550
|
+
function dn() {
|
|
551
|
+
e.items || Z.setForceMounted(!0);
|
|
552
|
+
}
|
|
553
|
+
function fn() {
|
|
554
|
+
N()?.focus();
|
|
555
|
+
}
|
|
556
|
+
function pn(e, t) {
|
|
557
|
+
let n = Y(Jt)[e];
|
|
558
|
+
n && (Z.selectionEvent = t, n.click(), Z.selectionEvent = null);
|
|
559
|
+
}
|
|
560
|
+
function mn() {
|
|
561
|
+
be(!1), Se(null), Z.resetAfterClose(), w() === "none" ? $({
|
|
562
|
+
activeIndex: pt() === "always" && Z.listElement() && !Z.track().popupElement && Q().length > 0 ? 0 : null,
|
|
563
|
+
selectedIndex: null
|
|
564
|
+
}) : $({ activeIndex: null });
|
|
565
|
+
let e = N();
|
|
566
|
+
if (T() && e && e.value !== "" && !Ft && an("", g(a)), E()) {
|
|
567
|
+
if (Z.inputInsidePopup()) e && e.value !== "" && an("", g(a));
|
|
568
|
+
else {
|
|
569
|
+
let t = k(j());
|
|
570
|
+
e && e.value !== t && an(t, g(t === "" ? a : f));
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
let hn = { unmount() {
|
|
575
|
+
Gt.forceUnmount();
|
|
576
|
+
} }, gn = G(() => Z.open() || U()), _n = G(() => {
|
|
577
|
+
let e = N(), t = e?.tagName === "INPUT", n = e == null || t, r = n || gn(), i = n ? {
|
|
578
|
+
autocomplete: "off",
|
|
579
|
+
spellcheck: "false",
|
|
580
|
+
autocorrect: "off",
|
|
581
|
+
autocapitalize: "none"
|
|
582
|
+
} : {};
|
|
583
|
+
return r && (i.role = "combobox", i["aria-expanded"] = gn() ? "true" : "false", i["aria-haspopup"] = H() ? "grid" : "listbox", i["aria-controls"] = gn() ? Z.listElement()?.id : void 0, i["aria-autocomplete"] = R() ? "none" : it()), i;
|
|
584
|
+
}), vn = ie({
|
|
585
|
+
context: Z.context.floatingRoot,
|
|
586
|
+
enabled: () => !I() && Ze(),
|
|
587
|
+
event: () => "mousedown-only",
|
|
588
|
+
toggle: () => !1,
|
|
589
|
+
reason: () => d,
|
|
590
|
+
touchOpenDelay: () => Z.inputInsidePopup() ? 0 : 100
|
|
591
|
+
}), yn = pe({
|
|
592
|
+
context: Z.context.floatingRoot,
|
|
593
|
+
tree: () => u,
|
|
594
|
+
enabled: () => !I() && !U(),
|
|
595
|
+
outsidePressEvent: () => ({
|
|
596
|
+
mouse: "sloppy",
|
|
597
|
+
touch: "intentional"
|
|
598
|
+
}),
|
|
599
|
+
bubbles: () => U(),
|
|
600
|
+
outsidePress: () => (e) => {
|
|
601
|
+
let t = e.target;
|
|
602
|
+
return !S(P(), t) && !S(Z.clearElement, t) && !S(Z.chipsContainerElement, t) && !S(Ee(), t);
|
|
603
|
+
}
|
|
604
|
+
}), bn = $e({
|
|
605
|
+
context: Z.context.floatingRoot,
|
|
606
|
+
enabled: () => !I(),
|
|
607
|
+
list: Jt,
|
|
608
|
+
activeIndex: Z.activeIndex,
|
|
609
|
+
selectedIndex: Z.selectedIndex,
|
|
610
|
+
virtual: () => !0,
|
|
611
|
+
loopFocus: et,
|
|
612
|
+
allowEscape: () => et() && !pt(),
|
|
613
|
+
focusItemOnHover: Qe,
|
|
614
|
+
orientation: () => H() ? "both" : "vertical",
|
|
615
|
+
cols: Yt,
|
|
616
|
+
rtl: () => s() === "rtl",
|
|
617
|
+
openOnArrowKeyDown: () => !1,
|
|
618
|
+
disabledIndices: () => [],
|
|
619
|
+
onNavigate(e, t) {
|
|
620
|
+
if (!(!t && !Z.open() || Z.track().transitionStatus === "ending")) {
|
|
621
|
+
if (!t) {
|
|
622
|
+
$({ activeIndex: e });
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
$({
|
|
626
|
+
activeIndex: e,
|
|
627
|
+
type: Z.keyboardActive ? i : n
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}), xn = {
|
|
632
|
+
store: Z,
|
|
633
|
+
tree: u,
|
|
634
|
+
node: Wt,
|
|
635
|
+
presence: Gt,
|
|
636
|
+
id: He,
|
|
637
|
+
items: () => e.items,
|
|
638
|
+
hasItems: ut,
|
|
639
|
+
query: X,
|
|
640
|
+
filteredItems: Mt,
|
|
641
|
+
flatFilteredItems: Nt,
|
|
642
|
+
listEmpty: Pt,
|
|
643
|
+
itemValues: Q,
|
|
644
|
+
itemLabels: qt,
|
|
645
|
+
hasItemCollection: () => e.itemCollection !== void 0,
|
|
646
|
+
selectedValue: j,
|
|
647
|
+
inputValue: M,
|
|
648
|
+
hasSelectedValue: Xt,
|
|
649
|
+
hasSelectionChips: Zt,
|
|
650
|
+
selectionMode: w,
|
|
651
|
+
multiple: T,
|
|
652
|
+
single: E,
|
|
653
|
+
disabled: I,
|
|
654
|
+
readOnly: R,
|
|
655
|
+
required: z,
|
|
656
|
+
modal: V,
|
|
657
|
+
grid: H,
|
|
658
|
+
virtualized: Ye,
|
|
659
|
+
inline: U,
|
|
660
|
+
openOnInputClick: Ze,
|
|
661
|
+
autoHighlight: pt,
|
|
662
|
+
keepHighlight: q,
|
|
663
|
+
highlightItemOnHover: Qe,
|
|
664
|
+
loopFocus: et,
|
|
665
|
+
autoComplete: it,
|
|
666
|
+
submitOnItemClick: tt,
|
|
667
|
+
hasInputValueProp: () => C,
|
|
668
|
+
name: ct,
|
|
669
|
+
form: lt,
|
|
670
|
+
itemToStringLabel: O,
|
|
671
|
+
itemToStringValue: A,
|
|
672
|
+
comparator: D,
|
|
673
|
+
inputElement: N,
|
|
674
|
+
setInputElement: Ce,
|
|
675
|
+
triggerElement: P,
|
|
676
|
+
setTriggerElement: Te,
|
|
677
|
+
inputGroupElement: Ee,
|
|
678
|
+
setInputGroupElement: De,
|
|
679
|
+
internalBackdropElement: ke,
|
|
680
|
+
setInternalBackdropElement: Pe,
|
|
681
|
+
setOpen: on,
|
|
682
|
+
setInputValue: an,
|
|
683
|
+
setSelectedValue: cn,
|
|
684
|
+
setIndices: $,
|
|
685
|
+
handleSelection: ln,
|
|
686
|
+
forceMount: dn,
|
|
687
|
+
requestSubmit: un,
|
|
688
|
+
focusInput: fn,
|
|
689
|
+
clickHighlightedItem: pn,
|
|
690
|
+
listNavigation: bn,
|
|
691
|
+
dismiss: yn,
|
|
692
|
+
click: vn,
|
|
693
|
+
cols: Yt,
|
|
694
|
+
referenceAria: _n,
|
|
695
|
+
expanded: gn,
|
|
696
|
+
field: t,
|
|
697
|
+
formContext: r
|
|
698
|
+
}, Sn = {
|
|
699
|
+
id: h,
|
|
700
|
+
name: void 0,
|
|
701
|
+
value: Qt,
|
|
702
|
+
getValue: $t,
|
|
703
|
+
getControl: () => Z.inputInsidePopup() ? P() : N()
|
|
704
|
+
};
|
|
705
|
+
Z.context.floatingRoot.context.data.insideElements = () => [
|
|
706
|
+
ke(),
|
|
707
|
+
Z.startDismissElement,
|
|
708
|
+
Z.endDismissElement
|
|
709
|
+
], W(() => ({
|
|
710
|
+
open: Z.open(),
|
|
711
|
+
activeTriggerId: Z.activeTriggerId()
|
|
712
|
+
}), () => Y(() => Z.reconcileTriggers())), W(() => ({
|
|
713
|
+
inline: U(),
|
|
714
|
+
open: Z.open()
|
|
715
|
+
}), (e) => {
|
|
716
|
+
e.inline && Z.context.floatingRoot.update({ open: !0 });
|
|
717
|
+
}), W(() => ({
|
|
718
|
+
mode: w(),
|
|
719
|
+
inline: U(),
|
|
720
|
+
insidePopup: Z.inputInsidePopup()
|
|
721
|
+
}), (e) => Z.setInputOwnsFormValue(e.mode === "none" && (e.inline || !e.insidePopup))), W(() => ({
|
|
722
|
+
open: Z.open(),
|
|
723
|
+
selected: j(),
|
|
724
|
+
mode: w(),
|
|
725
|
+
values: Q(),
|
|
726
|
+
compare: D(),
|
|
727
|
+
isMultiple: T(),
|
|
728
|
+
mounted: Gt.mounted(),
|
|
729
|
+
hasItems: ut() || ft()
|
|
730
|
+
}), (e, t) => {
|
|
731
|
+
e.open || (Z.pointerDownItem = null, e.mode !== "none" && (!e.hasItems && !e.mounted && e.values.length === 0 && t && kt(e.selected, t.selected, e.compare) || Y(() => $({ selectedIndex: Fe(e.values, e.selected, e.compare, e.isMultiple) }))));
|
|
732
|
+
}), W(() => ({
|
|
733
|
+
activeIndex: Z.activeIndex(),
|
|
734
|
+
values: Q(),
|
|
735
|
+
input: M(),
|
|
736
|
+
open: Z.open(),
|
|
737
|
+
inline: U(),
|
|
738
|
+
highlight: pt()
|
|
739
|
+
}), (e) => Y(() => Cn(e)));
|
|
740
|
+
function Cn(e) {
|
|
741
|
+
let t = e.activeIndex, n = Rt;
|
|
742
|
+
if (n) {
|
|
743
|
+
let r = e.open || e.inline || Z.track().positionerElement?.hidden === !1;
|
|
744
|
+
if (n.hasQuery) {
|
|
745
|
+
if (e.values.length === 0 && !ut() && !ft()) return;
|
|
746
|
+
e.highlight && r && (Z.setActiveIndex(0), t = 0), Rt = null;
|
|
747
|
+
} else if (String(e.input).trim() === "" && (Rt = null, r)) {
|
|
748
|
+
let r = n.selection;
|
|
749
|
+
e.highlight === "always" && !r && w() === "none" && (Z.setActiveIndex(0), t = 0), queueMicrotask(() => Y(() => {
|
|
750
|
+
if (!Z.open() && !U() || (N()?.value.trim() ?? "") !== "") return;
|
|
751
|
+
let e = j(), t = T(), i = t && Array.isArray(e) ? e.length > 0 : w() !== "none" && e != null;
|
|
752
|
+
if (i || r) {
|
|
753
|
+
let r = je(Q(), n.toggledValue, D());
|
|
754
|
+
Z.setActiveIndex(i ? r === -1 ? Fe(Q(), e, D(), t) : r : null);
|
|
755
|
+
} else pt() === "always" && Z.setActiveIndex(0);
|
|
756
|
+
}));
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
if (!e.open && !e.inline) return;
|
|
760
|
+
if (t == null) {
|
|
761
|
+
if (e.highlight === "always" && e.values.length > 0) {
|
|
762
|
+
Z.setActiveIndex(0);
|
|
763
|
+
return;
|
|
764
|
+
}
|
|
765
|
+
nn(void 0, -1, f);
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
if (t >= e.values.length) {
|
|
769
|
+
nn(void 0, -1, f), Z.setActiveIndex(null);
|
|
770
|
+
return;
|
|
771
|
+
}
|
|
772
|
+
let r = e.values[t], i = It.value, a = i !== Tt && Ie(r, i, D());
|
|
773
|
+
(It.index !== t || !a) && nn(r, t, f);
|
|
774
|
+
}
|
|
775
|
+
W(() => ({
|
|
776
|
+
index: Z.activeIndex(),
|
|
777
|
+
elements: Jt()
|
|
778
|
+
}), (e) => {
|
|
779
|
+
e.index != null && Lt !== "pointer" && e.elements[e.index]?.scrollIntoView?.({
|
|
780
|
+
block: "nearest",
|
|
781
|
+
inline: "nearest"
|
|
782
|
+
});
|
|
783
|
+
}), W(() => ({
|
|
784
|
+
open: Z.open(),
|
|
785
|
+
mounted: Gt.mounted(),
|
|
786
|
+
count: Q().length
|
|
787
|
+
}), (e) => {
|
|
788
|
+
if (!e.open) {
|
|
789
|
+
Bt = !1, zt = null;
|
|
790
|
+
return;
|
|
791
|
+
}
|
|
792
|
+
!e.mounted || e.count === 0 || Bt || (Bt = !0, Y(() => {
|
|
793
|
+
let t = zt;
|
|
794
|
+
if (zt = null, Z.activeIndex() != null || ye()) return;
|
|
795
|
+
let n = w() === "none" ? null : Fe(Q(), j(), D(), T());
|
|
796
|
+
if (n != null) {
|
|
797
|
+
$({
|
|
798
|
+
activeIndex: n,
|
|
799
|
+
selectedIndex: n
|
|
800
|
+
});
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
if (t && (w() !== "none" || pt() !== !1)) {
|
|
804
|
+
$({ activeIndex: t === "first" ? 0 : e.count - 1 });
|
|
805
|
+
return;
|
|
806
|
+
}
|
|
807
|
+
pt() === "always" && $({ activeIndex: 0 });
|
|
808
|
+
}));
|
|
809
|
+
}), W(() => ({
|
|
810
|
+
mode: w(),
|
|
811
|
+
input: M(),
|
|
812
|
+
selected: j(),
|
|
813
|
+
isMultiple: T()
|
|
814
|
+
}), (e) => {
|
|
815
|
+
if (e.mode === "none") {
|
|
816
|
+
t.setFilled(String(e.input) !== "");
|
|
817
|
+
return;
|
|
818
|
+
}
|
|
819
|
+
t.setFilled(e.isMultiple ? Array.isArray(e.selected) && e.selected.length > 0 : e.selected != null);
|
|
820
|
+
}), W(() => ({
|
|
821
|
+
hasItems: ut(),
|
|
822
|
+
highlight: pt(),
|
|
823
|
+
count: Nt().length
|
|
824
|
+
}), (e) => {
|
|
825
|
+
e.hasItems && e.highlight && e.count === 0 && Y(() => $({ activeIndex: null }));
|
|
826
|
+
}), W(() => ({
|
|
827
|
+
query: X(),
|
|
828
|
+
open: Z.open()
|
|
829
|
+
}), (e) => {
|
|
830
|
+
let t = Ut;
|
|
831
|
+
Ut = e.query, !(t === e.query || !e.open) && e.query !== "" && e.query !== String(ge) && be(!0);
|
|
832
|
+
});
|
|
833
|
+
function wn() {
|
|
834
|
+
let e = k(j());
|
|
835
|
+
M() !== e && an(e, g(f));
|
|
836
|
+
}
|
|
837
|
+
W(() => ({
|
|
838
|
+
selected: j(),
|
|
839
|
+
mode: w(),
|
|
840
|
+
compare: D()
|
|
841
|
+
}), (e) => {
|
|
842
|
+
let n = Vt;
|
|
843
|
+
kt(e.selected, n, e.compare) || (Vt = Ot(e.selected), e.mode !== "none" && Y(() => {
|
|
844
|
+
r.clearError(ct()), t.setDirty(!At(e.selected, t.validityData().initialValue, e.compare)), t.validation.change(e.selected), E() && !C && !Z.inputInsidePopup() && wn();
|
|
845
|
+
}));
|
|
846
|
+
}), W(() => ({
|
|
847
|
+
input: M(),
|
|
848
|
+
mode: w()
|
|
849
|
+
}), (e) => {
|
|
850
|
+
let n = Ht;
|
|
851
|
+
Ht = e.input, n !== e.input && e.mode === "none" && Y(() => {
|
|
852
|
+
r.clearError(ct()), t.setDirty(e.input !== t.validityData().initialValue), t.validation.change(e.input);
|
|
853
|
+
});
|
|
854
|
+
}), W(() => ({
|
|
855
|
+
items: e.items,
|
|
856
|
+
label: vt()
|
|
857
|
+
}), (e, t) => {
|
|
858
|
+
!t || e.items === t.items && e.label === t.label || Y(() => {
|
|
859
|
+
!E() || C || Z.inputInsidePopup() || ye() || wn();
|
|
860
|
+
});
|
|
861
|
+
}), W(() => ({
|
|
862
|
+
disabled: I(),
|
|
863
|
+
id: He(),
|
|
864
|
+
name: e.name,
|
|
865
|
+
control: Z.inputInsidePopup() ? P() : N()
|
|
866
|
+
}), (e) => {
|
|
867
|
+
Sn.id = e.id, Sn.name = e.name, t.registerFieldControl(m, e.disabled || !e.control ? void 0 : Sn);
|
|
868
|
+
}), W(Re, (e) => {
|
|
869
|
+
if (e) return t.validation.registerInput(m, e, () => Z.inputInsidePopup() ? P() : N());
|
|
870
|
+
}), W(() => e.actionsRef, (e) => {
|
|
871
|
+
e?.(hn);
|
|
872
|
+
});
|
|
873
|
+
function Tn(e, t) {
|
|
874
|
+
zt = e, Z.setOpenMethod("keyboard"), on(!0, g("list-navigation", t, P() ?? void 0)) || (zt = null);
|
|
875
|
+
}
|
|
876
|
+
function En(e) {
|
|
877
|
+
if (!I()) {
|
|
878
|
+
if (!Z.open() && !U()) {
|
|
879
|
+
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
880
|
+
e.preventDefault(), e.stopPropagation(), Tn(e.key === "ArrowDown" ? "first" : "last", e);
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
bn.onKeyDown(e);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
xn.listNavigation = {
|
|
887
|
+
...bn,
|
|
888
|
+
onKeyDown: En
|
|
889
|
+
};
|
|
890
|
+
function Dn(t) {
|
|
891
|
+
let n = t.currentTarget;
|
|
892
|
+
if (t.defaultPrevented || I() || R()) {
|
|
893
|
+
n.value = en();
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
let r = n.value, i = r.toLowerCase(), a = g(f, t), o = () => Y(Q).findIndex((t) => ot(t, e.itemToStringValue).toLowerCase() === i || k(t).toLowerCase() === i);
|
|
897
|
+
E() && (dn(), e.items && o() === -1 && Z.setForceMounted(!0)), queueMicrotask(() => Y(() => {
|
|
898
|
+
if (T()) return;
|
|
899
|
+
if (w() === "none") {
|
|
900
|
+
an(r, a);
|
|
901
|
+
return;
|
|
902
|
+
}
|
|
903
|
+
let e = o();
|
|
904
|
+
e === -1 && (e = qt().findIndex((e) => e != null && e.toLowerCase() === i));
|
|
905
|
+
let t = e === -1 ? void 0 : Q()[e];
|
|
906
|
+
t != null && cn(t, a);
|
|
907
|
+
}));
|
|
908
|
+
}
|
|
909
|
+
return J(() => {
|
|
910
|
+
t.registerFieldControl(m, void 0), Z.clearInteractionProps(), delete Z.context.floatingRoot.context.data.insideElements;
|
|
911
|
+
}), F(_t, {
|
|
912
|
+
value: xn,
|
|
913
|
+
get children() {
|
|
914
|
+
return F(se, {
|
|
915
|
+
value: u,
|
|
916
|
+
get children() {
|
|
917
|
+
return F(ue, {
|
|
918
|
+
get value() {
|
|
919
|
+
return Wt.id ?? null;
|
|
920
|
+
},
|
|
921
|
+
get children() {
|
|
922
|
+
return [
|
|
923
|
+
We(() => e.children),
|
|
924
|
+
(() => {
|
|
925
|
+
var n = L(xt);
|
|
926
|
+
return n.addEventListener("change", Dn), n.addEventListener("focus", () => {
|
|
927
|
+
if (Z.inputInsidePopup()) {
|
|
928
|
+
P()?.focus();
|
|
929
|
+
return;
|
|
930
|
+
}
|
|
931
|
+
(N() ?? P())?.focus();
|
|
932
|
+
}), Ge(() => [((e) => Ve(e)), e.inputRef], n), Ue(() => ({
|
|
933
|
+
e: tn() == null ? `${He()}-hidden-input` : void 0,
|
|
934
|
+
t: lt(),
|
|
935
|
+
a: tn(),
|
|
936
|
+
o: e.formAutoComplete,
|
|
937
|
+
i: en(),
|
|
938
|
+
n: I(),
|
|
939
|
+
s: z() && !(T() && Zt()),
|
|
940
|
+
h: R(),
|
|
941
|
+
r: tn() ? wt : Ct,
|
|
942
|
+
d: o.getAriaDescribedBy(void 0),
|
|
943
|
+
l: t.state().valid === !1 && !I() ? "true" : void 0
|
|
944
|
+
}), ({ e, t, a: r, o: i, i: a, n: o, s, h: c, r: l, d: u, l: d }, f) => {
|
|
945
|
+
e !== f?.e && B(n, "id", e), t !== f?.t && B(n, "form", t), r !== f?.a && B(n, "name", r), i !== f?.o && B(n, "autocomplete", i), Ke(n, "value", a), o !== f?.n && B(n, "disabled", o), s !== f?.s && B(n, "required", s), c !== f?.h && B(n, "readonly", c), qe(n, l, f?.r), u !== f?.d && B(n, "aria-describedby", u), d !== f?.l && B(n, "aria-invalid", d);
|
|
946
|
+
}), n;
|
|
947
|
+
})(),
|
|
948
|
+
F(Je, {
|
|
949
|
+
get each() {
|
|
950
|
+
return We(() => !!(T() && ct()))() ? j() ?? [] : [];
|
|
951
|
+
},
|
|
952
|
+
children: (t) => (() => {
|
|
953
|
+
var n = L(St);
|
|
954
|
+
return Ue(() => ({
|
|
955
|
+
e: lt(),
|
|
956
|
+
t: ct(),
|
|
957
|
+
a: ot(t, e.itemToStringValue),
|
|
958
|
+
o: I()
|
|
959
|
+
}), ({ e, t, a: r, o: i }, a) => {
|
|
960
|
+
e !== a?.e && B(n, "form", e), t !== a?.t && B(n, "name", t), Ke(n, "value", r), i !== a?.o && B(n, "disabled", i);
|
|
961
|
+
}), n;
|
|
962
|
+
})()
|
|
963
|
+
})
|
|
964
|
+
];
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
function Ot(e) {
|
|
973
|
+
return Array.isArray(e) ? e.slice() : e;
|
|
974
|
+
}
|
|
975
|
+
function kt(e, t, n) {
|
|
976
|
+
return Array.isArray(e) && Array.isArray(t) ? Pe(e, t, n) : Object.is(e, t);
|
|
977
|
+
}
|
|
978
|
+
function At(e, t, n) {
|
|
979
|
+
return Array.isArray(e) && Array.isArray(t) ? Pe(e, t, n) : e === t;
|
|
980
|
+
}
|
|
981
|
+
//#endregion
|
|
982
|
+
//#region src/combobox/utils/comboboxPopupId.ts
|
|
983
|
+
function jt(e) {
|
|
984
|
+
return e == null ? void 0 : `${e}-popup`;
|
|
985
|
+
}
|
|
986
|
+
//#endregion
|
|
987
|
+
//#region src/combobox/utils/stateAttributesMapping.ts
|
|
988
|
+
var Mt = {
|
|
989
|
+
...ge,
|
|
990
|
+
...Ee,
|
|
991
|
+
popupSide: (e) => e ? { "data-popup-side": e } : null,
|
|
992
|
+
listEmpty: (e) => e ? { "data-list-empty": "" } : null
|
|
993
|
+
}, Nt = { ..._e }, Pt = {
|
|
994
|
+
...M,
|
|
995
|
+
instant: (e) => e ? { "data-instant": e } : null
|
|
996
|
+
}, Ft = { "data-open": "" }, It = { "data-closed": "" }, Lt = {
|
|
997
|
+
open: (e) => e ? Ft : It,
|
|
998
|
+
...v
|
|
999
|
+
}, Rt = {
|
|
1000
|
+
...j,
|
|
1001
|
+
...v
|
|
1002
|
+
}, zt = /* @__PURE__ */ H("<button>");
|
|
1003
|
+
function Bt(n) {
|
|
1004
|
+
let i = X(), a = ze(), o = n, s = n, c = Symbol("ComboboxTrigger"), [l, d] = K(null, { ownedWrite: !0 }), p = G(() => o.nativeButton ?? !0), _ = G(() => i.disabled() || (o.disabled ?? !1)), v = G(() => i.store.inputInsidePopup()), x = G(() => v() ? o.id ?? i.id() : o.id), ee = G(() => {
|
|
1005
|
+
if (i.store.open()) return v() ? i.store.popupId() ?? jt(i.id()) : i.store.listElement()?.id;
|
|
1006
|
+
}), C = G(() => o["aria-labelledby"] ?? a.labelId() ?? i.store.labelId()), w = G(() => {
|
|
1007
|
+
let e = o["aria-describedby"];
|
|
1008
|
+
return e !== !1 && a.getAriaDescribedBy(e);
|
|
1009
|
+
}), T = G(() => ({
|
|
1010
|
+
...i.field.state(),
|
|
1011
|
+
readOnly: i.readOnly(),
|
|
1012
|
+
open: i.store.open(),
|
|
1013
|
+
disabled: _(),
|
|
1014
|
+
popupSide: i.store.resolvedPopupSide(),
|
|
1015
|
+
listEmpty: i.listEmpty(),
|
|
1016
|
+
placeholder: i.selectionMode() !== "none" && !i.hasSelectedValue()
|
|
1017
|
+
})), E = G(() => m(n.class, T())), D = G(() => h(n.style, T())), O = G(() => t(T(), Mt)), k = q(s, "aria-describedby", "aria-labelledby", "render", "class", "disabled", "id", "nativeButton", "onBlur", "onClick", "onFocus", "onKeyDown", "onKeyUp", "onMouseDown", "onPointerDown", "onPointerEnter", "ref", "style"), ne = ie({
|
|
1018
|
+
context: i.store.context.floatingRoot,
|
|
1019
|
+
enabled: () => !i.disabled(),
|
|
1020
|
+
event: () => "mousedown"
|
|
1021
|
+
}), re = et({
|
|
1022
|
+
context: i.store.context.floatingRoot,
|
|
1023
|
+
enabled: () => !i.store.open() && !i.readOnly() && !i.disabled() && i.selectionMode() === "single",
|
|
1024
|
+
list: i.itemLabels,
|
|
1025
|
+
disabledIndices: () => i.store.collection.disabledIndices(),
|
|
1026
|
+
activeIndex: i.store.activeIndex,
|
|
1027
|
+
selectedIndex: i.store.selectedIndex,
|
|
1028
|
+
onMatch(e) {
|
|
1029
|
+
let t = i.itemValues()[e];
|
|
1030
|
+
t !== void 0 && i.setSelectedValue(t, g(f));
|
|
1031
|
+
}
|
|
1032
|
+
}), A = "", ae, oe;
|
|
1033
|
+
fe(() => i.store, x, l);
|
|
1034
|
+
function se(e) {
|
|
1035
|
+
A = e.pointerType || "", ne.onPointerDown(e);
|
|
1036
|
+
}
|
|
1037
|
+
function ce() {
|
|
1038
|
+
i.field.setFocused(!0), !_() && (clearTimeout(ae), ae = setTimeout(() => i.forceMount(), 0));
|
|
1039
|
+
}
|
|
1040
|
+
function le(e) {
|
|
1041
|
+
Y(() => {
|
|
1042
|
+
S(i.store.track().positionerElement, e.relatedTarget) || (i.field.setTouched(!0), i.field.setFocused(!1), i.field.validationMode() === "onBlur" && i.field.validation.commit(i.selectionMode() === "none" ? i.inputValue() : i.selectedValue()), re.onBlur(e));
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
function ue(e) {
|
|
1046
|
+
oe?.();
|
|
1047
|
+
let t = te(e), n = (t) => {
|
|
1048
|
+
oe = void 0;
|
|
1049
|
+
let n = t.target;
|
|
1050
|
+
if (S(e, n) || S(i.store.track().positionerElement, n) || S(i.store.listElement(), n)) return;
|
|
1051
|
+
let r = e.getBoundingClientRect();
|
|
1052
|
+
t.clientX >= r.left && t.clientX <= r.right && t.clientY >= r.top && t.clientY <= r.bottom || i.setOpen(!1, g(u, t));
|
|
1053
|
+
};
|
|
1054
|
+
t.addEventListener("mouseup", n, { once: !0 }), oe = () => t.removeEventListener("mouseup", n);
|
|
1055
|
+
}
|
|
1056
|
+
function de(e) {
|
|
1057
|
+
if (_()) return;
|
|
1058
|
+
let t = e.currentTarget;
|
|
1059
|
+
v() || i.store.context.floatingRoot.update({ domReferenceElement: t }), i.forceMount(), A !== "touch" && (i.focusInput(), v() || e.preventDefault()), i.store.open() || (i.store.setOpenMethod(A || "mouse"), v() && ue(t)), ne.onMouseDown(e);
|
|
1060
|
+
}
|
|
1061
|
+
function pe(e) {
|
|
1062
|
+
e.detail === 0 && i.store.setOpenMethod("keyboard"), ne.onClick(e);
|
|
1063
|
+
}
|
|
1064
|
+
function me(e) {
|
|
1065
|
+
_() || (re.onKeyDown(e), (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), e.stopPropagation(), i.store.setOpenMethod("keyboard"), i.setOpen(!0, g(r, e)), i.focusInput()));
|
|
1066
|
+
}
|
|
1067
|
+
let he = y(b(() => o.onBlur), le), j = y(b(() => Y(() => _() ? Ce : void 0)), b(() => o.onClick), pe), ge = y(b(() => o.onFocus), ce), _e = y(b(() => Y(() => _() ? Se : void 0)), b(() => o.onKeyDown), me, b(() => Y(() => p() ? void 0 : P))), ve = y(b(() => Y(() => _() ? xe : void 0)), b(() => o.onKeyUp), b(() => Y(() => p() ? void 0 : N))), M = y(b(() => Y(() => _() ? xe : void 0)), b(() => o.onMouseDown), de), ye = y(b(() => Y(() => _() ? Ce : void 0)), b(() => o.onPointerDown), se), be = y(b(() => o.onPointerEnter), (e) => {
|
|
1068
|
+
A = e.pointerType || "";
|
|
1069
|
+
});
|
|
1070
|
+
W(() => ({
|
|
1071
|
+
id: x(),
|
|
1072
|
+
element: l(),
|
|
1073
|
+
insidePopup: v()
|
|
1074
|
+
}), (e) => (i.setTriggerElement(e.element), a.registerControlId(c, e.insidePopup ? e.id : void 0), () => {
|
|
1075
|
+
Y(i.triggerElement) === e.element && i.setTriggerElement(null);
|
|
1076
|
+
})), J(() => {
|
|
1077
|
+
clearTimeout(ae), oe?.(), a.registerControlId(c, void 0);
|
|
1078
|
+
});
|
|
1079
|
+
let we = e(n, () => T(), (e) => (() => {
|
|
1080
|
+
var t = L(zt);
|
|
1081
|
+
return V(t, e, !1), z(), t;
|
|
1082
|
+
})());
|
|
1083
|
+
return F(we, R({
|
|
1084
|
+
ref: [((e) => d(e)), o.ref],
|
|
1085
|
+
get id() {
|
|
1086
|
+
return x();
|
|
1087
|
+
},
|
|
1088
|
+
get type() {
|
|
1089
|
+
return p() ? "button" : void 0;
|
|
1090
|
+
},
|
|
1091
|
+
get tabindex() {
|
|
1092
|
+
return v() ? 0 : -1;
|
|
1093
|
+
},
|
|
1094
|
+
get role() {
|
|
1095
|
+
return v() ? "combobox" : void 0;
|
|
1096
|
+
},
|
|
1097
|
+
get disabled() {
|
|
1098
|
+
return p() && _() ? !0 : void 0;
|
|
1099
|
+
},
|
|
1100
|
+
get "aria-disabled"() {
|
|
1101
|
+
return !p() && _() ? "true" : void 0;
|
|
1102
|
+
},
|
|
1103
|
+
get "aria-expanded"() {
|
|
1104
|
+
return i.store.open() ? "true" : "false";
|
|
1105
|
+
},
|
|
1106
|
+
get "aria-haspopup"() {
|
|
1107
|
+
return v() ? "dialog" : "listbox";
|
|
1108
|
+
},
|
|
1109
|
+
get "aria-controls"() {
|
|
1110
|
+
return ee();
|
|
1111
|
+
},
|
|
1112
|
+
get "aria-required"() {
|
|
1113
|
+
return v() && i.required() ? "true" : void 0;
|
|
1114
|
+
},
|
|
1115
|
+
get "aria-readonly"() {
|
|
1116
|
+
return v() && i.readOnly() ? "true" : void 0;
|
|
1117
|
+
},
|
|
1118
|
+
get "aria-labelledby"() {
|
|
1119
|
+
return C();
|
|
1120
|
+
},
|
|
1121
|
+
get "aria-describedby"() {
|
|
1122
|
+
return w();
|
|
1123
|
+
},
|
|
1124
|
+
get "aria-invalid"() {
|
|
1125
|
+
return T().valid === !1 && !_() ? "true" : void 0;
|
|
1126
|
+
},
|
|
1127
|
+
"data-base-ui-click-trigger": "",
|
|
1128
|
+
get class() {
|
|
1129
|
+
return E();
|
|
1130
|
+
},
|
|
1131
|
+
get style() {
|
|
1132
|
+
return D();
|
|
1133
|
+
},
|
|
1134
|
+
onBlur: he,
|
|
1135
|
+
onClick: j,
|
|
1136
|
+
onFocus: ge,
|
|
1137
|
+
onKeyDown: _e,
|
|
1138
|
+
onKeyUp: ve,
|
|
1139
|
+
onMouseDown: M,
|
|
1140
|
+
onPointerDown: ye,
|
|
1141
|
+
onPointerEnter: be
|
|
1142
|
+
}, O, k));
|
|
1143
|
+
}
|
|
1144
|
+
//#endregion
|
|
1145
|
+
//#region src/combobox/chips/ComboboxChipsContext.ts
|
|
1146
|
+
var Vt = class {
|
|
1147
|
+
registrations = /* @__PURE__ */ new Map();
|
|
1148
|
+
revision;
|
|
1149
|
+
setRevision;
|
|
1150
|
+
order = 0;
|
|
1151
|
+
orders = /* @__PURE__ */ new Map();
|
|
1152
|
+
constructor() {
|
|
1153
|
+
let [e, t] = K(0, { ownedWrite: !0 });
|
|
1154
|
+
this.revision = e, this.setRevision = t;
|
|
1155
|
+
}
|
|
1156
|
+
register(e, t) {
|
|
1157
|
+
return this.registrations.set(e, t), this.orders.set(e, this.order), this.order += 1, this.touch(), () => {
|
|
1158
|
+
this.registrations.delete(e) && (this.orders.delete(e), this.touch());
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
touch() {
|
|
1162
|
+
this.setRevision((e) => e + 1);
|
|
1163
|
+
}
|
|
1164
|
+
tokens() {
|
|
1165
|
+
return this.revision(), Array.from(this.registrations.keys()).sort((e, t) => {
|
|
1166
|
+
let n = this.registrations.get(e)?.() ?? null, r = this.registrations.get(t)?.() ?? null;
|
|
1167
|
+
if (n && r && n !== r) {
|
|
1168
|
+
let e = n.compareDocumentPosition(r);
|
|
1169
|
+
if (e & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
|
|
1170
|
+
if (e & Node.DOCUMENT_POSITION_PRECEDING) return 1;
|
|
1171
|
+
}
|
|
1172
|
+
return (this.orders.get(e) ?? 0) - (this.orders.get(t) ?? 0);
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
elements() {
|
|
1176
|
+
return this.tokens().map((e) => this.registrations.get(e)?.() ?? null);
|
|
1177
|
+
}
|
|
1178
|
+
indexOf(e) {
|
|
1179
|
+
return this.tokens().indexOf(e);
|
|
1180
|
+
}
|
|
1181
|
+
size() {
|
|
1182
|
+
return this.tokens().length;
|
|
1183
|
+
}
|
|
1184
|
+
}, Ht = Symbol("ComboboxChipsContext"), Ut = U(Ht);
|
|
1185
|
+
function Z() {
|
|
1186
|
+
let e = Qe(Ut);
|
|
1187
|
+
return e === Ht ? void 0 : e;
|
|
1188
|
+
}
|
|
1189
|
+
function Wt() {
|
|
1190
|
+
let e = Z();
|
|
1191
|
+
if (!e) throw Error("Base UI: ComboboxChipsContext is missing. Chip parts must be placed within <Combobox.Chips>.");
|
|
1192
|
+
return e;
|
|
1193
|
+
}
|
|
1194
|
+
//#endregion
|
|
1195
|
+
//#region src/combobox/positioner/ComboboxPositionerContext.ts
|
|
1196
|
+
var Gt = Symbol("ComboboxPositionerContext"), Kt = U(Gt);
|
|
1197
|
+
function Q(e = !1) {
|
|
1198
|
+
let t = Qe(Kt);
|
|
1199
|
+
if (t === Gt) {
|
|
1200
|
+
if (e) return;
|
|
1201
|
+
throw Error("Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component.");
|
|
1202
|
+
}
|
|
1203
|
+
return t;
|
|
1204
|
+
}
|
|
1205
|
+
//#endregion
|
|
1206
|
+
//#region src/combobox/utils/ComboboxInternalDismissButton.tsx
|
|
1207
|
+
var qt = /* @__PURE__ */ H("<span role=button aria-label=Dismiss>"), Jt = {
|
|
1208
|
+
"clip-path": "inset(50%)",
|
|
1209
|
+
overflow: "hidden",
|
|
1210
|
+
"white-space": "nowrap",
|
|
1211
|
+
border: "0",
|
|
1212
|
+
padding: "0",
|
|
1213
|
+
width: "1px",
|
|
1214
|
+
height: "1px",
|
|
1215
|
+
margin: "-1px",
|
|
1216
|
+
position: "absolute",
|
|
1217
|
+
top: "0",
|
|
1218
|
+
left: "0"
|
|
1219
|
+
};
|
|
1220
|
+
function Yt(e) {
|
|
1221
|
+
let t = X();
|
|
1222
|
+
function n(e) {
|
|
1223
|
+
t.setOpen(!1, g(s, e, e.currentTarget));
|
|
1224
|
+
}
|
|
1225
|
+
var r = L(qt);
|
|
1226
|
+
return r.$$keydown = (e) => {
|
|
1227
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
|
|
1228
|
+
}, r.$$click = n, Ge(() => (t) => e.ref?.(t), r), Ue(() => Jt, (e, t) => {
|
|
1229
|
+
qe(r, e, t);
|
|
1230
|
+
}), z(), r;
|
|
1231
|
+
}
|
|
1232
|
+
I(["click", "keydown"]);
|
|
1233
|
+
//#endregion
|
|
1234
|
+
//#region src/combobox/utils/parts.ts
|
|
1235
|
+
function Xt(e) {
|
|
1236
|
+
return e === "rtl" ? ["ArrowRight", "ArrowLeft"] : ["ArrowLeft", "ArrowRight"];
|
|
1237
|
+
}
|
|
1238
|
+
function Zt(e, t) {
|
|
1239
|
+
let n = e >= t - 1 ? t - 2 : e;
|
|
1240
|
+
return n >= 0 ? n : void 0;
|
|
1241
|
+
}
|
|
1242
|
+
//#endregion
|
|
1243
|
+
//#region src/combobox/input/ComboboxInput.tsx
|
|
1244
|
+
var Qt = /* @__PURE__ */ H("<input>");
|
|
1245
|
+
function $t(r) {
|
|
1246
|
+
let s = X(), l = Z(), u = Q(!0), d = ze(), p = we(), _ = r, v = r, x = `base-ui-${Xe()}`, ee = u !== void 0, te = G(() => ee || s.inline()), S = G(() => !te() || s.modal()), C = G(() => _.id ?? (te() ? x : s.id())), w = G(() => s.field.disabled() || s.disabled() || (_.disabled ?? !1)), T = G(() => s.selectionMode() === "none" && !ee), [E, D] = K(null), O = !1, k = null, ne = !1, re = G(() => ee ? {
|
|
1247
|
+
...s.field.state(),
|
|
1248
|
+
...Te
|
|
1249
|
+
} : s.field.state()), A = G(() => ({
|
|
1250
|
+
...re(),
|
|
1251
|
+
open: s.store.open(),
|
|
1252
|
+
disabled: w(),
|
|
1253
|
+
readOnly: s.readOnly(),
|
|
1254
|
+
popupSide: s.store.resolvedPopupSide(),
|
|
1255
|
+
listEmpty: s.listEmpty()
|
|
1256
|
+
})), ie = G(() => m(r.class, A())), ae = G(() => h(r.style, A())), oe = G(() => t(A(), Mt)), se = G(() => {
|
|
1257
|
+
let e = s.store.activeIndex();
|
|
1258
|
+
return e == null ? void 0 : `${s.id()}-${e}`;
|
|
1259
|
+
}), ce = G(() => {
|
|
1260
|
+
let e = _["aria-describedby"];
|
|
1261
|
+
return ee || e === !1 ? e : d.getAriaDescribedBy(e);
|
|
1262
|
+
}), le = q(v, "aria-describedby", "render", "class", "disabled", "id", "onBlur", "onCompositionEnd", "onCompositionStart", "onFocus", "onInput", "onKeyDown", "onMouseDown", "onPointerDown", "onPointerMove", "ref", "style");
|
|
1263
|
+
function ue() {
|
|
1264
|
+
s.setIndices({
|
|
1265
|
+
activeIndex: null,
|
|
1266
|
+
selectedIndex: null,
|
|
1267
|
+
type: s.store.keyboardActive ? i : n
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
function de() {
|
|
1271
|
+
if (s.field.setFocused(!0), !s.inline() || !ne) return;
|
|
1272
|
+
ne = !1;
|
|
1273
|
+
let e = k;
|
|
1274
|
+
e != null && s.itemValues()[e] !== void 0 && s.setIndices({ activeIndex: e });
|
|
1275
|
+
}
|
|
1276
|
+
function fe() {
|
|
1277
|
+
s.field.setTouched(!0), s.field.setFocused(!1);
|
|
1278
|
+
let e = s.store.activeIndex();
|
|
1279
|
+
s.inline() && e !== null && s.autoHighlight() !== "always" && (k = e, ne = !0, s.setIndices({ activeIndex: null })), s.field.validationMode() === "onBlur" && s.field.validation.commit(s.selectionMode() === "none" ? s.inputValue() : s.selectedValue());
|
|
1280
|
+
}
|
|
1281
|
+
function pe(e) {
|
|
1282
|
+
Ve() || (O = !0, D(e.currentTarget.value));
|
|
1283
|
+
}
|
|
1284
|
+
function me(e) {
|
|
1285
|
+
O = !1;
|
|
1286
|
+
let t = e.currentTarget.value;
|
|
1287
|
+
D(null), s.setInputValue(t, g(o, e)), he(e.currentTarget);
|
|
1288
|
+
}
|
|
1289
|
+
function he(e) {
|
|
1290
|
+
queueMicrotask(() => Y(() => {
|
|
1291
|
+
if (O || s.inputElement() !== e) return;
|
|
1292
|
+
let t = s.inputValue();
|
|
1293
|
+
e.value !== t && (e.value = t);
|
|
1294
|
+
}));
|
|
1295
|
+
}
|
|
1296
|
+
function j(e, t, n) {
|
|
1297
|
+
s.readOnly() || w() || !e || !n || (s.setOpen(!0, g(o, t)), s.autoHighlight() || ue());
|
|
1298
|
+
}
|
|
1299
|
+
function ge(e) {
|
|
1300
|
+
let t = e.currentTarget, n = !e.inputType || e.inputType === "insertReplacementText", r = O || !n;
|
|
1301
|
+
if (O) {
|
|
1302
|
+
let n = t.value;
|
|
1303
|
+
D(n), n === "" && !s.openOnInputClick() && !s.store.inputInsidePopup() && s.setOpen(!1, g(a, e));
|
|
1304
|
+
let i = n.trim(), o = !!s.autoHighlight() && i !== "";
|
|
1305
|
+
j(i, e, r), s.store.open() && s.store.activeIndex() !== null && !o && ue();
|
|
1306
|
+
return;
|
|
1307
|
+
}
|
|
1308
|
+
let i = g(o, e);
|
|
1309
|
+
if (s.setInputValue(t.value, i), i.isCanceled) {
|
|
1310
|
+
t.value = s.inputValue();
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
let c = t.value === "", l = g(a, e);
|
|
1314
|
+
c && !s.store.inputInsidePopup() && (s.selectionMode() === "single" && s.setSelectedValue(null, l), s.openOnInputClick() || s.setOpen(!1, l)), j(t.value.trim(), e, r), s.store.open() && s.store.activeIndex() !== null && !s.autoHighlight() && ue(), he(t);
|
|
1315
|
+
}
|
|
1316
|
+
function _e(e) {
|
|
1317
|
+
if (!l) return;
|
|
1318
|
+
let t = e.currentTarget, n = l.highlightedChipIndex(), r = l.chips.size(), [i, a] = Xt(p()), o = s.selectedValue(), c = Array.isArray(o) ? o : [];
|
|
1319
|
+
if (n !== void 0) {
|
|
1320
|
+
if (e.key === i) return e.preventDefault(), n > 0 ? n - 1 : void 0;
|
|
1321
|
+
if (e.key === a) return e.preventDefault(), n < r - 1 ? n + 1 : void 0;
|
|
1322
|
+
if (e.key === "Backspace" || e.key === "Delete") {
|
|
1323
|
+
e.preventDefault();
|
|
1324
|
+
let t = Zt(n, c.length);
|
|
1325
|
+
return ue(), t;
|
|
1326
|
+
}
|
|
1327
|
+
return;
|
|
1328
|
+
}
|
|
1329
|
+
if (e.key === i && (t.selectionStart ?? 0) === 0 && c.length > 0) return e.preventDefault(), r > 0 ? r - 1 : void 0;
|
|
1330
|
+
}
|
|
1331
|
+
function ve(e) {
|
|
1332
|
+
let t = s.selectedValue(), n = s.selectionMode() === "multiple" && Array.isArray(t) ? t.length === 0 : t === null, r = g(c, e);
|
|
1333
|
+
s.setInputValue("", r), s.setSelectedValue(s.selectionMode() === "multiple" ? [] : null, r), !n && !s.inline() && !r.isPropagationAllowed && e.stopPropagation();
|
|
1334
|
+
}
|
|
1335
|
+
function M(e) {
|
|
1336
|
+
let t = !w() && !s.readOnly(), n = e.ctrlKey || e.shiftKey || e.altKey || e.metaKey;
|
|
1337
|
+
if (!w() && !n && (s.store.keyboardActive = !0), s.grid() && s.store.activeIndex() == null && (e.key === "ArrowLeft" || e.key === "ArrowRight") || s.listNavigation.onKeyDown(e), s.dismiss.onKeyDown(e), !t || n) {
|
|
1338
|
+
s.readOnly() && e.key === "Enter" && s.store.open() && s.store.activeIndex() !== null && (e.preventDefault(), e.stopPropagation());
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
let r = e.currentTarget, i = p() === "rtl";
|
|
1342
|
+
if (e.key === "Home" || e.key === "End") {
|
|
1343
|
+
e.preventDefault(), e.stopPropagation();
|
|
1344
|
+
let t = r.scrollWidth - r.clientWidth, n = e.key === "Home", a = (en() && i ? !n : n) ? 0 : r.value.length;
|
|
1345
|
+
r.setSelectionRange(a, a), r.scrollLeft = n ? 0 : i ? -t : t;
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1348
|
+
if (!s.presence.mounted() && e.key === "Escape") {
|
|
1349
|
+
ve(e);
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
if (l && e.key === "Backspace" && r.value === "" && l.highlightedChipIndex() === void 0 && Array.isArray(s.selectedValue()) && s.selectedValue().length > 0) {
|
|
1353
|
+
let t = s.selectedValue(), n = l.chips.size(), r = n > 0 ? n - 1 : t.length - 1;
|
|
1354
|
+
ue(), s.setSelectedValue(t.filter((e, t) => t !== r), g(f, e));
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1357
|
+
if (l) {
|
|
1358
|
+
let t = l.highlightedChipIndex() !== void 0, n = _e(e);
|
|
1359
|
+
l.setHighlightedChipIndex(n), n === void 0 ? t && s.focusInput() : l.chips.elements()[n]?.focus();
|
|
1360
|
+
}
|
|
1361
|
+
if (e.keyCode !== 229 && e.key === "Enter" && s.store.open()) {
|
|
1362
|
+
let t = s.store.activeIndex();
|
|
1363
|
+
if (t === null) {
|
|
1364
|
+
if (s.inline()) return;
|
|
1365
|
+
s.setOpen(!1, g(f, e));
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
e.preventDefault(), e.stopPropagation(), s.clickHighlightedItem(t, e);
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
function ye() {
|
|
1372
|
+
s.store.keyboardActive = !1;
|
|
1373
|
+
}
|
|
1374
|
+
let be = y(b(() => _.onBlur), fe), xe = y(b(() => _.onCompositionEnd), me), Se = y(b(() => _.onCompositionStart), pe), N = y(b(() => _.onFocus), de), Ce = y(b(() => _.onInput), ge), P = y(b(() => _.onKeyDown), M), Ee = y(b(() => _.onMouseDown), (e) => s.click.onMouseDown(e)), Oe = y(b(() => _.onPointerDown), (e) => {
|
|
1375
|
+
ye(), s.click.onPointerDown(e);
|
|
1376
|
+
}), Ae = y(b(() => _.onPointerMove), ye);
|
|
1377
|
+
W(() => ({
|
|
1378
|
+
insidePopup: te(),
|
|
1379
|
+
owns: T()
|
|
1380
|
+
}), (e) => {
|
|
1381
|
+
s.store.setInputInsidePopup(e.insidePopup), s.store.setInputOwnsFormValue(e.owns), e.insidePopup && !s.hasInputValueProp() && Y(() => s.setInputValue("", g(f)));
|
|
1382
|
+
}), J(() => {
|
|
1383
|
+
Y(s.inputElement) === je && s.setInputElement(null);
|
|
1384
|
+
});
|
|
1385
|
+
let je = null, Me = e(r, () => A(), (e) => (() => {
|
|
1386
|
+
var t = L(Qt);
|
|
1387
|
+
return V(t, e, !1), z(), t;
|
|
1388
|
+
})());
|
|
1389
|
+
return [F(Ye, {
|
|
1390
|
+
get when() {
|
|
1391
|
+
return We(() => !!s.store.open())() ? S() : s.store.open();
|
|
1392
|
+
},
|
|
1393
|
+
get children() {
|
|
1394
|
+
return F(Yt, { ref: (e) => {
|
|
1395
|
+
s.store.startDismissElement = e;
|
|
1396
|
+
} });
|
|
1397
|
+
}
|
|
1398
|
+
}), F((e) => ee ? F(De, {
|
|
1399
|
+
value: ke,
|
|
1400
|
+
get children() {
|
|
1401
|
+
return e.children;
|
|
1402
|
+
}
|
|
1403
|
+
}) : We(() => e.children), { get children() {
|
|
1404
|
+
return F(Me, R({
|
|
1405
|
+
ref: [((e) => {
|
|
1406
|
+
je = e, s.setInputElement(e);
|
|
1407
|
+
}), _.ref],
|
|
1408
|
+
get id() {
|
|
1409
|
+
return C();
|
|
1410
|
+
},
|
|
1411
|
+
get value() {
|
|
1412
|
+
return E() ?? s.inputValue();
|
|
1413
|
+
},
|
|
1414
|
+
get disabled() {
|
|
1415
|
+
return w();
|
|
1416
|
+
},
|
|
1417
|
+
get readonly() {
|
|
1418
|
+
return s.readOnly();
|
|
1419
|
+
},
|
|
1420
|
+
get required() {
|
|
1421
|
+
return We(() => s.selectionMode() === "none")() ? s.required() : void 0;
|
|
1422
|
+
},
|
|
1423
|
+
get form() {
|
|
1424
|
+
return s.form();
|
|
1425
|
+
},
|
|
1426
|
+
get name() {
|
|
1427
|
+
return We(() => !!T())() ? s.name() : void 0;
|
|
1428
|
+
},
|
|
1429
|
+
get "aria-readonly"() {
|
|
1430
|
+
return s.readOnly() ? "true" : void 0;
|
|
1431
|
+
},
|
|
1432
|
+
get "aria-required"() {
|
|
1433
|
+
return s.required() ? "true" : void 0;
|
|
1434
|
+
},
|
|
1435
|
+
get "aria-labelledby"() {
|
|
1436
|
+
return d.labelId();
|
|
1437
|
+
},
|
|
1438
|
+
get "aria-describedby"() {
|
|
1439
|
+
return ce();
|
|
1440
|
+
},
|
|
1441
|
+
get "aria-activedescendant"() {
|
|
1442
|
+
return se();
|
|
1443
|
+
},
|
|
1444
|
+
get "aria-invalid"() {
|
|
1445
|
+
return A().valid === !1 && !w() ? "true" : void 0;
|
|
1446
|
+
},
|
|
1447
|
+
"data-base-ui-click-trigger": "",
|
|
1448
|
+
get class() {
|
|
1449
|
+
return ie();
|
|
1450
|
+
},
|
|
1451
|
+
get style() {
|
|
1452
|
+
return ae();
|
|
1453
|
+
},
|
|
1454
|
+
onBlur: be,
|
|
1455
|
+
onCompositionEnd: xe,
|
|
1456
|
+
onCompositionStart: Se,
|
|
1457
|
+
onFocus: N,
|
|
1458
|
+
onInput: Ce,
|
|
1459
|
+
onKeyDown: P,
|
|
1460
|
+
onMouseDown: Ee,
|
|
1461
|
+
onPointerDown: Oe,
|
|
1462
|
+
onPointerMove: Ae
|
|
1463
|
+
}, () => s.referenceAria(), oe, le));
|
|
1464
|
+
} })];
|
|
1465
|
+
}
|
|
1466
|
+
function en() {
|
|
1467
|
+
return typeof navigator < "u" && navigator.userAgent.includes("Firefox");
|
|
1468
|
+
}
|
|
1469
|
+
//#endregion
|
|
1470
|
+
//#region src/combobox/utils/handleInputPress.ts
|
|
1471
|
+
function tn(e, t, n, r) {
|
|
1472
|
+
if (e.baseUIHandlerPrevented) return;
|
|
1473
|
+
let i = e.target, a = C(i) ? i : null;
|
|
1474
|
+
a !== e.currentTarget && (r?.(a) || T(a)) || (e.preventDefault(), !n && (t.focusInput(), t.openOnInputClick() && t.setOpen(!0, g(d, e))));
|
|
1475
|
+
}
|
|
1476
|
+
//#endregion
|
|
1477
|
+
//#region src/combobox/input-group/ComboboxInputGroup.tsx
|
|
1478
|
+
var nn = /* @__PURE__ */ H("<div>");
|
|
1479
|
+
function $(n) {
|
|
1480
|
+
let r = X(), i = n, a = n, o = G(() => ({
|
|
1481
|
+
...r.field.state(),
|
|
1482
|
+
open: r.store.open(),
|
|
1483
|
+
disabled: r.disabled(),
|
|
1484
|
+
readOnly: r.readOnly(),
|
|
1485
|
+
popupSide: r.store.resolvedPopupSide(),
|
|
1486
|
+
listEmpty: r.listEmpty(),
|
|
1487
|
+
placeholder: r.selectionMode() !== "none" && !r.hasSelectedValue()
|
|
1488
|
+
})), s = G(() => m(n.class, o())), c = G(() => h(n.style, o())), l = G(() => t(o(), Mt)), u = q(a, "render", "class", "onMouseDown", "ref", "style"), d = y(b(() => i.onMouseDown), (e) => tn(e, r, r.disabled(), (e) => S(r.store.chipsContainerElement, e)));
|
|
1489
|
+
J(() => {
|
|
1490
|
+
Y(r.inputGroupElement) === f && r.setInputGroupElement(null);
|
|
1491
|
+
});
|
|
1492
|
+
let f = null, p = e(n, () => o(), (e) => (() => {
|
|
1493
|
+
var t = L(nn);
|
|
1494
|
+
return V(t, e, !1), z(), t;
|
|
1495
|
+
})());
|
|
1496
|
+
return F(p, R({
|
|
1497
|
+
ref: [((e) => {
|
|
1498
|
+
f = e, r.setInputGroupElement(e);
|
|
1499
|
+
}), i.ref],
|
|
1500
|
+
role: "group",
|
|
1501
|
+
get class() {
|
|
1502
|
+
return s();
|
|
1503
|
+
},
|
|
1504
|
+
get style() {
|
|
1505
|
+
return c();
|
|
1506
|
+
},
|
|
1507
|
+
onMouseDown: d
|
|
1508
|
+
}, l, u));
|
|
1509
|
+
}
|
|
1510
|
+
//#endregion
|
|
1511
|
+
//#region src/combobox/icon/ComboboxIcon.tsx
|
|
1512
|
+
var rn = /* @__PURE__ */ H("<span>");
|
|
1513
|
+
function an(n) {
|
|
1514
|
+
let r = X(), i = n, a = n, o = G(() => ({ open: r.store.open() })), s = G(() => m(n.class, o())), c = G(() => h(n.style, o())), l = G(() => t(o(), j)), u = q(a, "render", "class", "ref", "style"), d = e(n, () => o(), (e) => (() => {
|
|
1515
|
+
var t = L(rn);
|
|
1516
|
+
return V(t, e, !1), z(), t;
|
|
1517
|
+
})());
|
|
1518
|
+
return F(d, R({
|
|
1519
|
+
ref: [i.ref],
|
|
1520
|
+
"aria-hidden": "true",
|
|
1521
|
+
get class() {
|
|
1522
|
+
return s();
|
|
1523
|
+
},
|
|
1524
|
+
get style() {
|
|
1525
|
+
return c();
|
|
1526
|
+
}
|
|
1527
|
+
}, l, u, { get children() {
|
|
1528
|
+
return n.children ?? "▼";
|
|
1529
|
+
} }));
|
|
1530
|
+
}
|
|
1531
|
+
//#endregion
|
|
1532
|
+
//#region src/combobox/clear/ComboboxClear.tsx
|
|
1533
|
+
var on = /* @__PURE__ */ H("<button>");
|
|
1534
|
+
function sn(r) {
|
|
1535
|
+
let a = X(), o = r, s = r, c = G(() => o.nativeButton ?? !0), u = G(() => a.field.disabled() || a.disabled() || (o.disabled ?? !1)), d = G(() => {
|
|
1536
|
+
let e = a.selectionMode();
|
|
1537
|
+
return e === "none" ? a.inputValue() !== "" : e === "single" ? a.selectedValue() != null : a.hasSelectionChips();
|
|
1538
|
+
}), f = he(() => d()), p = G(() => (o.keepMounted ?? !1) || f.mounted()), _ = G(() => ({
|
|
1539
|
+
open: a.store.open(),
|
|
1540
|
+
disabled: u(),
|
|
1541
|
+
visible: d(),
|
|
1542
|
+
transitionStatus: f.transitionStatus()
|
|
1543
|
+
})), v = G(() => m(r.class, _())), ee = G(() => h(r.style, _())), te = G(() => t(_(), Rt)), S = q(s, "render", "class", "disabled", "keepMounted", "nativeButton", "onClick", "onKeyDown", "onKeyUp", "onMouseDown", "ref", "style"), C = null;
|
|
1544
|
+
W(() => ({
|
|
1545
|
+
visible: d(),
|
|
1546
|
+
status: f.transitionStatus(),
|
|
1547
|
+
element: C
|
|
1548
|
+
}), (e) => {
|
|
1549
|
+
if (e.visible || e.status !== "ending" || !e.element) return;
|
|
1550
|
+
let t = new AbortController();
|
|
1551
|
+
return x(e.element, () => {
|
|
1552
|
+
Y(d) || f.setMounted(!1);
|
|
1553
|
+
}, t.signal), () => t.abort();
|
|
1554
|
+
});
|
|
1555
|
+
function w(e) {
|
|
1556
|
+
if (u() || a.readOnly()) return;
|
|
1557
|
+
let t = a.store.keyboardActive ? i : n;
|
|
1558
|
+
a.setInputValue("", g(l, e)), a.selectionMode() === "none" ? a.setIndices({
|
|
1559
|
+
activeIndex: null,
|
|
1560
|
+
type: t
|
|
1561
|
+
}) : (a.setSelectedValue(a.multiple() ? [] : null, g(l, e)), a.setIndices({
|
|
1562
|
+
activeIndex: null,
|
|
1563
|
+
selectedIndex: null,
|
|
1564
|
+
type: t
|
|
1565
|
+
})), a.focusInput();
|
|
1566
|
+
}
|
|
1567
|
+
let T = y(b(() => Y(() => u() ? Ce : void 0)), b(() => o.onClick), w), E = y(b(() => o.onKeyDown), b(() => Y(() => c() ? void 0 : P))), D = y(b(() => Y(() => u() ? xe : void 0)), b(() => o.onKeyUp), b(() => Y(() => c() ? void 0 : N))), O = y(b(() => o.onMouseDown), (e) => e.preventDefault()), k = e(r, () => _(), (e) => (() => {
|
|
1568
|
+
var t = L(on);
|
|
1569
|
+
return V(t, e, !1), z(), t;
|
|
1570
|
+
})());
|
|
1571
|
+
return F(Ye, {
|
|
1572
|
+
get when() {
|
|
1573
|
+
return p();
|
|
1574
|
+
},
|
|
1575
|
+
get children() {
|
|
1576
|
+
return F(k, R({
|
|
1577
|
+
ref: [((e) => {
|
|
1578
|
+
C = e, a.store.clearElement = e;
|
|
1579
|
+
}), o.ref],
|
|
1580
|
+
get type() {
|
|
1581
|
+
return c() ? "button" : void 0;
|
|
1582
|
+
},
|
|
1583
|
+
tabindex: -1,
|
|
1584
|
+
get disabled() {
|
|
1585
|
+
return c() && u() ? !0 : void 0;
|
|
1586
|
+
},
|
|
1587
|
+
get "aria-disabled"() {
|
|
1588
|
+
return !c() && u() ? "true" : void 0;
|
|
1589
|
+
},
|
|
1590
|
+
get class() {
|
|
1591
|
+
return v();
|
|
1592
|
+
},
|
|
1593
|
+
get style() {
|
|
1594
|
+
return ee();
|
|
1595
|
+
},
|
|
1596
|
+
onClick: T,
|
|
1597
|
+
onKeyDown: E,
|
|
1598
|
+
onKeyUp: D,
|
|
1599
|
+
onMouseDown: O
|
|
1600
|
+
}, te, S, { get children() {
|
|
1601
|
+
return r.children ?? "x";
|
|
1602
|
+
} }));
|
|
1603
|
+
}
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1606
|
+
//#endregion
|
|
1607
|
+
//#region src/combobox/collection/ComboboxCollection.tsx
|
|
1608
|
+
function cn(e) {
|
|
1609
|
+
let t = X(), n = bt(), r = G(() => n?.items() ?? t.filteredItems());
|
|
1610
|
+
return F(Je, {
|
|
1611
|
+
get each() {
|
|
1612
|
+
return r();
|
|
1613
|
+
},
|
|
1614
|
+
get children() {
|
|
1615
|
+
return e.children;
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
}
|
|
1619
|
+
//#endregion
|
|
1620
|
+
//#region src/combobox/list/ComboboxList.tsx
|
|
1621
|
+
var ln = /* @__PURE__ */ H("<div>");
|
|
1622
|
+
function un(t) {
|
|
1623
|
+
let n = X(), r = Q(!0), i = t, a = t, o = G(() => ({ empty: n.listEmpty() })), s = G(() => m(t.class, o())), c = G(() => h(t.style, o())), l = q(a, "render", "children", "class", "id", "onKeyDown", "ref", "style");
|
|
1624
|
+
function u(e) {
|
|
1625
|
+
if (n.disabled() || n.readOnly() || (n.store.keyboardActive = !0, e.key !== "Enter")) return;
|
|
1626
|
+
let t = n.store.activeIndex();
|
|
1627
|
+
t != null && (e.preventDefault(), e.stopPropagation(), n.clickHighlightedItem(t, e));
|
|
1628
|
+
}
|
|
1629
|
+
let d = y(b(() => i.onKeyDown), u), [f, p] = K(null, { ownedWrite: !0 });
|
|
1630
|
+
W(f, (e) => {
|
|
1631
|
+
if (!e) return;
|
|
1632
|
+
let t = () => {
|
|
1633
|
+
n.store.keyboardActive = !1;
|
|
1634
|
+
}, r = () => {
|
|
1635
|
+
n.store.keyboardActive = !0;
|
|
1636
|
+
};
|
|
1637
|
+
return e.addEventListener("pointermove", t, !0), e.addEventListener("keydown", r, !0), () => {
|
|
1638
|
+
e.removeEventListener("pointermove", t, !0), e.removeEventListener("keydown", r, !0);
|
|
1639
|
+
};
|
|
1640
|
+
}), J(() => {
|
|
1641
|
+
let e = Y(f);
|
|
1642
|
+
n.store.listElement() === e && n.store.setListElement(null), !r && n.store.state.positionerElement === e && n.store.setPositionerElement(null);
|
|
1643
|
+
});
|
|
1644
|
+
let g = G(() => {
|
|
1645
|
+
let e = t.children;
|
|
1646
|
+
return typeof e == "function" && !Re(e) && !("$ll" in e) ? F(cn, { children: e }) : e;
|
|
1647
|
+
}), _ = e(t, () => o(), (e) => (() => {
|
|
1648
|
+
var t = L(ln);
|
|
1649
|
+
return V(t, e, !1), z(), t;
|
|
1650
|
+
})());
|
|
1651
|
+
return F(_, R({
|
|
1652
|
+
ref: [((e) => {
|
|
1653
|
+
p(e), n.store.setListElement(e), r || n.store.setPositionerElement(e);
|
|
1654
|
+
}), i.ref],
|
|
1655
|
+
get id() {
|
|
1656
|
+
return i.id ?? n.store.context.floatingId;
|
|
1657
|
+
},
|
|
1658
|
+
get role() {
|
|
1659
|
+
return n.grid() ? "grid" : "listbox";
|
|
1660
|
+
},
|
|
1661
|
+
tabindex: -1,
|
|
1662
|
+
get "aria-multiselectable"() {
|
|
1663
|
+
return n.multiple() ? "true" : void 0;
|
|
1664
|
+
},
|
|
1665
|
+
get "aria-readonly"() {
|
|
1666
|
+
return !n.grid() && n.readOnly() ? "true" : void 0;
|
|
1667
|
+
},
|
|
1668
|
+
get class() {
|
|
1669
|
+
return s();
|
|
1670
|
+
},
|
|
1671
|
+
get style() {
|
|
1672
|
+
return c();
|
|
1673
|
+
},
|
|
1674
|
+
onKeyDown: d
|
|
1675
|
+
}, l, { get children() {
|
|
1676
|
+
return g();
|
|
1677
|
+
} }));
|
|
1678
|
+
}
|
|
1679
|
+
//#endregion
|
|
1680
|
+
//#region src/combobox/utils/createInitialLiveRegionTextMutation.ts
|
|
1681
|
+
var dn = "";
|
|
1682
|
+
function fn(e) {
|
|
1683
|
+
let t = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_TEXT), n = null;
|
|
1684
|
+
for (; t.nextNode();) {
|
|
1685
|
+
let e = t.currentNode;
|
|
1686
|
+
e.nodeValue !== "" && (n = e);
|
|
1687
|
+
}
|
|
1688
|
+
return n;
|
|
1689
|
+
}
|
|
1690
|
+
function pn() {
|
|
1691
|
+
if (typeof navigator > "u") return !1;
|
|
1692
|
+
let e = navigator.platform.toLowerCase();
|
|
1693
|
+
return /^i(os$|p)/.test(e) || e === "macintel" && navigator.maxTouchPoints > 1;
|
|
1694
|
+
}
|
|
1695
|
+
function mn(e) {
|
|
1696
|
+
W(e, (e) => {
|
|
1697
|
+
if (!e || pn()) return;
|
|
1698
|
+
let t = fn(e);
|
|
1699
|
+
if (!t) return;
|
|
1700
|
+
let n = t.data, r = `${n}${dn}`;
|
|
1701
|
+
t.nodeValue = r;
|
|
1702
|
+
let i = () => {
|
|
1703
|
+
t.nodeValue === r && (t.nodeValue = n);
|
|
1704
|
+
}, a = setTimeout(i, 200);
|
|
1705
|
+
return () => {
|
|
1706
|
+
clearTimeout(a), i();
|
|
1707
|
+
};
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
1710
|
+
//#endregion
|
|
1711
|
+
//#region src/combobox/status/ComboboxStatus.tsx
|
|
1712
|
+
var hn = /* @__PURE__ */ H("<div>");
|
|
1713
|
+
function gn(t) {
|
|
1714
|
+
let n = t, r = t, i = {}, a = G(() => m(t.class, i)), o = G(() => h(t.style, i)), s = q(r, "render", "class", "ref", "style"), [c, l] = K(null, { ownedWrite: !0 });
|
|
1715
|
+
mn(c);
|
|
1716
|
+
let u = e(t, () => i, (e) => (() => {
|
|
1717
|
+
var t = L(hn);
|
|
1718
|
+
return V(t, e, !1), z(), t;
|
|
1719
|
+
})());
|
|
1720
|
+
return F(u, R({
|
|
1721
|
+
ref: [((e) => l(e)), n.ref],
|
|
1722
|
+
role: "status",
|
|
1723
|
+
"aria-live": "polite",
|
|
1724
|
+
"aria-atomic": "true",
|
|
1725
|
+
get class() {
|
|
1726
|
+
return a();
|
|
1727
|
+
},
|
|
1728
|
+
get style() {
|
|
1729
|
+
return o();
|
|
1730
|
+
}
|
|
1731
|
+
}, s));
|
|
1732
|
+
}
|
|
1733
|
+
//#endregion
|
|
1734
|
+
//#region src/combobox/portal/ComboboxPortalContext.ts
|
|
1735
|
+
var _n = Symbol("ComboboxPortalContext"), vn = U(_n);
|
|
1736
|
+
function yn() {
|
|
1737
|
+
let e = Qe(vn);
|
|
1738
|
+
if (e === _n) throw Error("Base UI: <Combobox.Portal> is missing.");
|
|
1739
|
+
return e;
|
|
1740
|
+
}
|
|
1741
|
+
//#endregion
|
|
1742
|
+
//#region src/combobox/portal/ComboboxPortal.tsx
|
|
1743
|
+
function bn(e) {
|
|
1744
|
+
let t = X(), n = e, r = e, i = G(() => n.keepMounted ?? !1), a = G(() => t.presence.mounted() || i() || t.store.forceMounted()), o = {}, s = G(() => m(e.class, o)), c = G(() => h(e.style, o)), l = q(r, "render", "class", "container", "keepMounted", "ref", "style");
|
|
1745
|
+
return F(Ye, {
|
|
1746
|
+
get when() {
|
|
1747
|
+
return a();
|
|
1748
|
+
},
|
|
1749
|
+
get children() {
|
|
1750
|
+
return F(vn, {
|
|
1751
|
+
get value() {
|
|
1752
|
+
return Y(i);
|
|
1753
|
+
},
|
|
1754
|
+
get children() {
|
|
1755
|
+
return F(ve, R({
|
|
1756
|
+
get render() {
|
|
1757
|
+
return e.render;
|
|
1758
|
+
},
|
|
1759
|
+
get container() {
|
|
1760
|
+
return n.container;
|
|
1761
|
+
},
|
|
1762
|
+
ref: (e) => be(n.ref, e),
|
|
1763
|
+
get class() {
|
|
1764
|
+
return s();
|
|
1765
|
+
},
|
|
1766
|
+
get style() {
|
|
1767
|
+
return c();
|
|
1768
|
+
}
|
|
1769
|
+
}, l, { get children() {
|
|
1770
|
+
return e.children;
|
|
1771
|
+
} }));
|
|
1772
|
+
}
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
//#endregion
|
|
1778
|
+
//#region src/combobox/backdrop/ComboboxBackdrop.tsx
|
|
1779
|
+
var xn = /* @__PURE__ */ H("<div>");
|
|
1780
|
+
function Sn(n) {
|
|
1781
|
+
let r = X(), i = n, a = n, o = G(() => ({
|
|
1782
|
+
open: r.store.open(),
|
|
1783
|
+
transitionStatus: r.store.track().transitionStatus
|
|
1784
|
+
})), s = G(() => m(n.class, o())), c = G(() => He({
|
|
1785
|
+
"user-select": "none",
|
|
1786
|
+
"-webkit-user-select": "none"
|
|
1787
|
+
}, h(n.style, o()))), l = G(() => t(o(), Lt)), u = q(a, "render", "class", "ref", "style"), d = e(n, () => o(), (e) => (() => {
|
|
1788
|
+
var t = L(xn);
|
|
1789
|
+
return V(t, e, !1), z(), t;
|
|
1790
|
+
})());
|
|
1791
|
+
return F(d, R({
|
|
1792
|
+
ref: [i.ref],
|
|
1793
|
+
role: "presentation",
|
|
1794
|
+
get hidden() {
|
|
1795
|
+
return !r.presence.mounted();
|
|
1796
|
+
},
|
|
1797
|
+
get class() {
|
|
1798
|
+
return s();
|
|
1799
|
+
},
|
|
1800
|
+
get style() {
|
|
1801
|
+
return c();
|
|
1802
|
+
}
|
|
1803
|
+
}, l, u));
|
|
1804
|
+
}
|
|
1805
|
+
//#endregion
|
|
1806
|
+
//#region src/combobox/positioner/ComboboxPositioner.tsx
|
|
1807
|
+
var Cn = /* @__PURE__ */ H("<div>"), wn = {
|
|
1808
|
+
side: "flip",
|
|
1809
|
+
align: "flip",
|
|
1810
|
+
fallbackAxisSide: "none"
|
|
1811
|
+
};
|
|
1812
|
+
function Tn(n) {
|
|
1813
|
+
let r = yn(), i = X(), a = we(), o = n, s = n, [c, l] = K(null, { ownedWrite: !0 }), u = G(() => En(o.anchor) ?? (i.store.inputInsidePopup() ? i.triggerElement() : i.inputGroupElement() ?? i.inputElement()) ?? null), d = ne({
|
|
1814
|
+
reference: u,
|
|
1815
|
+
floating: c,
|
|
1816
|
+
mounted: () => i.presence.mounted() || r,
|
|
1817
|
+
direction: a,
|
|
1818
|
+
positionMethod: () => o.positionMethod ?? "absolute",
|
|
1819
|
+
side: () => o.side ?? "bottom",
|
|
1820
|
+
sideOffset: () => o.sideOffset ?? 0,
|
|
1821
|
+
align: () => o.align ?? "center",
|
|
1822
|
+
alignOffset: () => o.alignOffset ?? 0,
|
|
1823
|
+
collisionBoundary: () => o.collisionBoundary ?? "clipping-ancestors",
|
|
1824
|
+
collisionPadding: () => o.collisionPadding ?? 5,
|
|
1825
|
+
arrowPadding: () => o.arrowPadding ?? 5,
|
|
1826
|
+
sticky: () => o.sticky ?? !1,
|
|
1827
|
+
disableAnchorTracking: () => o.disableAnchorTracking ?? !1,
|
|
1828
|
+
collisionAvoidance: () => o.collisionAvoidance ?? wn
|
|
1829
|
+
}), f = G(() => ({
|
|
1830
|
+
open: i.store.open(),
|
|
1831
|
+
side: d.renderedSide(),
|
|
1832
|
+
align: d.renderedAlign(),
|
|
1833
|
+
anchorHidden: d.anchorHidden(),
|
|
1834
|
+
empty: i.listEmpty()
|
|
1835
|
+
})), p = G(() => m(n.class, f())), g = G(() => He({
|
|
1836
|
+
...d.styles(),
|
|
1837
|
+
"pointer-events": i.store.open() ? void 0 : "none",
|
|
1838
|
+
transition: i.store.track().transitionStatus === "starting" ? "none" : void 0
|
|
1839
|
+
}, h(n.style, f()))), _ = G(() => t(f(), Nt)), v = q(s, "align", "alignOffset", "anchor", "arrowPadding", "render", "class", "collisionAvoidance", "collisionBoundary", "collisionPadding", "disableAnchorTracking", "positionMethod", "ref", "side", "sideOffset", "sticky", "style");
|
|
1840
|
+
A({
|
|
1841
|
+
enabled: () => i.store.open() && i.modal(),
|
|
1842
|
+
touchOpen: () => i.store.openMethod() === "touch",
|
|
1843
|
+
positioner: c,
|
|
1844
|
+
reference: () => i.triggerElement() ?? i.inputElement()
|
|
1845
|
+
}), W(d.renderedSide, (e) => i.store.setPopupSide(e)), J(() => {
|
|
1846
|
+
i.store.state.positionerElement === Y(c) && i.store.setPositionerElement(null);
|
|
1847
|
+
});
|
|
1848
|
+
let y = {
|
|
1849
|
+
...d,
|
|
1850
|
+
side: d.renderedSide,
|
|
1851
|
+
align: d.renderedAlign
|
|
1852
|
+
};
|
|
1853
|
+
function b() {
|
|
1854
|
+
let e = null;
|
|
1855
|
+
return J(() => {
|
|
1856
|
+
i.internalBackdropElement() === e && i.setInternalBackdropElement(null);
|
|
1857
|
+
}), F(re, {
|
|
1858
|
+
ref: (t) => {
|
|
1859
|
+
e = t, i.setInternalBackdropElement(t);
|
|
1860
|
+
},
|
|
1861
|
+
get cutout() {
|
|
1862
|
+
return i.inputGroupElement() ?? i.inputElement() ?? i.triggerElement();
|
|
1863
|
+
},
|
|
1864
|
+
get open() {
|
|
1865
|
+
return i.store.open();
|
|
1866
|
+
}
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1869
|
+
let x = e(n, () => f(), (e) => (() => {
|
|
1870
|
+
var t = L(Cn);
|
|
1871
|
+
return V(t, e, !1), z(), t;
|
|
1872
|
+
})());
|
|
1873
|
+
return F(Kt, {
|
|
1874
|
+
value: y,
|
|
1875
|
+
get children() {
|
|
1876
|
+
return [F(Ye, {
|
|
1877
|
+
get when() {
|
|
1878
|
+
return We(() => !!i.presence.mounted())() ? i.modal() : i.presence.mounted();
|
|
1879
|
+
},
|
|
1880
|
+
get children() {
|
|
1881
|
+
return F(b, {});
|
|
1882
|
+
}
|
|
1883
|
+
}), F(x, R({
|
|
1884
|
+
ref: [((e) => {
|
|
1885
|
+
l(e), i.store.setPositionerElement(e);
|
|
1886
|
+
}), o.ref],
|
|
1887
|
+
role: "presentation",
|
|
1888
|
+
get hidden() {
|
|
1889
|
+
return !i.presence.mounted();
|
|
1890
|
+
},
|
|
1891
|
+
get inert() {
|
|
1892
|
+
return !i.store.open() || void 0;
|
|
1893
|
+
},
|
|
1894
|
+
get class() {
|
|
1895
|
+
return p();
|
|
1896
|
+
},
|
|
1897
|
+
get style() {
|
|
1898
|
+
return g();
|
|
1899
|
+
}
|
|
1900
|
+
}, _, v))];
|
|
1901
|
+
}
|
|
1902
|
+
});
|
|
1903
|
+
}
|
|
1904
|
+
function En(e) {
|
|
1905
|
+
return typeof e == "function" ? e() : e && "current" in e ? e.current : e;
|
|
1906
|
+
}
|
|
1907
|
+
//#endregion
|
|
1908
|
+
//#region src/combobox/popup/ComboboxPopup.tsx
|
|
1909
|
+
var Dn = /* @__PURE__ */ H("<div>");
|
|
1910
|
+
function On(n) {
|
|
1911
|
+
let r = X(), i = Q(), a = n, o = n, s = G(() => a.id ?? (r.store.inputInsidePopup() ? jt(r.id()) : void 0)), c = G(() => ({
|
|
1912
|
+
open: r.store.open(),
|
|
1913
|
+
side: i.side(),
|
|
1914
|
+
align: i.align(),
|
|
1915
|
+
anchorHidden: i.anchorHidden(),
|
|
1916
|
+
transitionStatus: r.store.track().transitionStatus,
|
|
1917
|
+
empty: r.listEmpty(),
|
|
1918
|
+
instant: r.store.track().instantType
|
|
1919
|
+
})), l = G(() => m(n.class, c())), u = G(() => He({ transition: c().transitionStatus === "starting" ? "none" : void 0 }, h(n.style, c()))), d = G(() => t(c(), Pt)), f = q(o, "render", "class", "finalFocus", "id", "initialFocus", "onFocus", "ref", "style"), p = G(() => !r.store.inputInsidePopup() || r.modal()), g = G(() => a.initialFocus === void 0 ? r.store.inputInsidePopup() ? (e) => e === "touch" ? r.store.track().popupElement : r.inputElement() : !1 : a.initialFocus), _ = G(() => a.finalFocus == null ? !!r.store.inputInsidePopup() : a.finalFocus);
|
|
1920
|
+
function v(e) {
|
|
1921
|
+
let t = e.target;
|
|
1922
|
+
r.store.openMethod() !== "touch" && (S(r.store.listElement(), t) || t === e.currentTarget) && r.focusInput();
|
|
1923
|
+
}
|
|
1924
|
+
let y = null;
|
|
1925
|
+
W(s, (e) => (r.store.setPopupId(y?.id || e), () => r.store.setPopupId(void 0))), J(() => {
|
|
1926
|
+
r.store.state.popupElement === y && r.store.setPopupElement(null);
|
|
1927
|
+
});
|
|
1928
|
+
let b = e(n, () => c(), (e) => (() => {
|
|
1929
|
+
var t = L(Dn);
|
|
1930
|
+
return V(t, e, !1), z(), t;
|
|
1931
|
+
})());
|
|
1932
|
+
return F(ye, {
|
|
1933
|
+
get context() {
|
|
1934
|
+
return r.store.context.floatingRoot;
|
|
1935
|
+
},
|
|
1936
|
+
get tree() {
|
|
1937
|
+
return r.tree;
|
|
1938
|
+
},
|
|
1939
|
+
get disabled() {
|
|
1940
|
+
return !r.presence.mounted();
|
|
1941
|
+
},
|
|
1942
|
+
get modal() {
|
|
1943
|
+
return p();
|
|
1944
|
+
},
|
|
1945
|
+
get openInteractionType() {
|
|
1946
|
+
return r.store.openMethod();
|
|
1947
|
+
},
|
|
1948
|
+
get initialFocus() {
|
|
1949
|
+
return g();
|
|
1950
|
+
},
|
|
1951
|
+
get returnFocus() {
|
|
1952
|
+
return _();
|
|
1953
|
+
},
|
|
1954
|
+
get previousFocusableElement() {
|
|
1955
|
+
return r.triggerElement;
|
|
1956
|
+
},
|
|
1957
|
+
referenceElement: () => r.store.inputInsidePopup() ? r.triggerElement() : r.inputElement(),
|
|
1958
|
+
getInsideElements: () => [r.store.startDismissElement, r.store.endDismissElement],
|
|
1959
|
+
get children() {
|
|
1960
|
+
return [F(b, R({
|
|
1961
|
+
ref: [((e) => {
|
|
1962
|
+
y = e, r.store.setPopupElement(e);
|
|
1963
|
+
}), a.ref],
|
|
1964
|
+
get id() {
|
|
1965
|
+
return s();
|
|
1966
|
+
},
|
|
1967
|
+
get role() {
|
|
1968
|
+
return r.store.inputInsidePopup() ? "dialog" : "presentation";
|
|
1969
|
+
},
|
|
1970
|
+
"data-base-ui-focusable": "",
|
|
1971
|
+
get "data-rootownerid"() {
|
|
1972
|
+
return r.node.id;
|
|
1973
|
+
},
|
|
1974
|
+
get class() {
|
|
1975
|
+
return l();
|
|
1976
|
+
},
|
|
1977
|
+
get style() {
|
|
1978
|
+
return u();
|
|
1979
|
+
},
|
|
1980
|
+
get onFocus() {
|
|
1981
|
+
return a.onFocus;
|
|
1982
|
+
},
|
|
1983
|
+
onFocusIn: v
|
|
1984
|
+
}, d, f)), F(Ye, {
|
|
1985
|
+
get when() {
|
|
1986
|
+
return p();
|
|
1987
|
+
},
|
|
1988
|
+
get children() {
|
|
1989
|
+
return F(Yt, { ref: (e) => {
|
|
1990
|
+
Y(() => {
|
|
1991
|
+
r.store.endDismissElement = e;
|
|
1992
|
+
});
|
|
1993
|
+
} });
|
|
1994
|
+
}
|
|
1995
|
+
})];
|
|
1996
|
+
}
|
|
1997
|
+
});
|
|
1998
|
+
}
|
|
1999
|
+
//#endregion
|
|
2000
|
+
//#region src/combobox/arrow/ComboboxArrow.tsx
|
|
2001
|
+
var kn = /* @__PURE__ */ H("<div>");
|
|
2002
|
+
function An(n) {
|
|
2003
|
+
let r = X(), i = Q(), a = n, o = n, s = G(() => ({
|
|
2004
|
+
open: r.store.open(),
|
|
2005
|
+
side: i.side(),
|
|
2006
|
+
align: i.align(),
|
|
2007
|
+
uncentered: i.arrowUncentered()
|
|
2008
|
+
})), c = G(() => m(n.class, s())), l = G(() => He(i.arrowStyles(), h(n.style, s()))), u = G(() => t(s(), _e)), d = q(o, "render", "class", "ref", "style"), f = null;
|
|
2009
|
+
J(() => {
|
|
2010
|
+
f && i.setArrowElement(null);
|
|
2011
|
+
});
|
|
2012
|
+
let p = e(n, () => s(), (e) => (() => {
|
|
2013
|
+
var t = L(kn);
|
|
2014
|
+
return V(t, e, !1), z(), t;
|
|
2015
|
+
})());
|
|
2016
|
+
return F(p, R({
|
|
2017
|
+
ref: [((e) => {
|
|
2018
|
+
f = e, i.setArrowElement(e);
|
|
2019
|
+
}), a.ref],
|
|
2020
|
+
"aria-hidden": "true",
|
|
2021
|
+
get class() {
|
|
2022
|
+
return c();
|
|
2023
|
+
},
|
|
2024
|
+
get style() {
|
|
2025
|
+
return l();
|
|
2026
|
+
}
|
|
2027
|
+
}, u, d));
|
|
2028
|
+
}
|
|
2029
|
+
//#endregion
|
|
2030
|
+
//#region src/combobox/group/ComboboxGroupContext.ts
|
|
2031
|
+
var jn = Symbol("ComboboxGroupContext"), Mn = U(jn);
|
|
2032
|
+
function Nn() {
|
|
2033
|
+
let e = Qe(Mn);
|
|
2034
|
+
if (e === jn) throw Error("Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.");
|
|
2035
|
+
return e;
|
|
2036
|
+
}
|
|
2037
|
+
//#endregion
|
|
2038
|
+
//#region src/combobox/group/ComboboxGroup.tsx
|
|
2039
|
+
var Pn = /* @__PURE__ */ H("<div>");
|
|
2040
|
+
function Fn(t) {
|
|
2041
|
+
let n = X(), r = t, i = t, [a, o] = K(void 0, { ownedWrite: !0 }), s = {}, c = G(() => m(t.class, s)), l = G(() => h(t.style, s)), u = q(i, "render", "class", "items", "ref", "style"), d = e(t, () => s, (e) => (() => {
|
|
2042
|
+
var t = L(Pn);
|
|
2043
|
+
return V(t, e, !1), z(), t;
|
|
2044
|
+
})());
|
|
2045
|
+
return F(yt, {
|
|
2046
|
+
value: { items: () => r.items },
|
|
2047
|
+
get children() {
|
|
2048
|
+
return F(Mn, {
|
|
2049
|
+
value: {
|
|
2050
|
+
labelId: a,
|
|
2051
|
+
setLabelId: o
|
|
2052
|
+
},
|
|
2053
|
+
get children() {
|
|
2054
|
+
return F(d, R({
|
|
2055
|
+
ref: [r.ref],
|
|
2056
|
+
get role() {
|
|
2057
|
+
return n.grid() ? "rowgroup" : "group";
|
|
2058
|
+
},
|
|
2059
|
+
get "aria-labelledby"() {
|
|
2060
|
+
return a();
|
|
2061
|
+
},
|
|
2062
|
+
get class() {
|
|
2063
|
+
return c();
|
|
2064
|
+
},
|
|
2065
|
+
get style() {
|
|
2066
|
+
return l();
|
|
2067
|
+
}
|
|
2068
|
+
}, u));
|
|
2069
|
+
}
|
|
2070
|
+
});
|
|
2071
|
+
}
|
|
2072
|
+
});
|
|
2073
|
+
}
|
|
2074
|
+
//#endregion
|
|
2075
|
+
//#region src/combobox/group-label/ComboboxGroupLabel.tsx
|
|
2076
|
+
var In = /* @__PURE__ */ H("<div>");
|
|
2077
|
+
function Ln(t) {
|
|
2078
|
+
let n = Nn(), r = t, i = t, a = `base-ui-${Xe()}`, o = G(() => r.id ?? a), s = {}, c = G(() => m(t.class, s)), l = G(() => h(t.style, s)), u = q(i, "render", "class", "id", "ref", "style");
|
|
2079
|
+
W(o, (e) => (n.setLabelId(e), () => {
|
|
2080
|
+
n.labelId() === e && n.setLabelId(void 0);
|
|
2081
|
+
}));
|
|
2082
|
+
let d = e(t, () => s, (e) => (() => {
|
|
2083
|
+
var t = L(In);
|
|
2084
|
+
return V(t, e, !1), z(), t;
|
|
2085
|
+
})());
|
|
2086
|
+
return F(d, R({
|
|
2087
|
+
ref: [r.ref],
|
|
2088
|
+
get id() {
|
|
2089
|
+
return o();
|
|
2090
|
+
},
|
|
2091
|
+
"aria-hidden": "true",
|
|
2092
|
+
get class() {
|
|
2093
|
+
return c();
|
|
2094
|
+
},
|
|
2095
|
+
get style() {
|
|
2096
|
+
return l();
|
|
2097
|
+
}
|
|
2098
|
+
}, u));
|
|
2099
|
+
}
|
|
2100
|
+
//#endregion
|
|
2101
|
+
//#region src/combobox/row/ComboboxRowContext.ts
|
|
2102
|
+
var Rn = U(!1);
|
|
2103
|
+
function zn() {
|
|
2104
|
+
return Qe(Rn);
|
|
2105
|
+
}
|
|
2106
|
+
//#endregion
|
|
2107
|
+
//#region src/combobox/item/ComboboxItemContext.ts
|
|
2108
|
+
var Bn = Symbol("ComboboxItemContext"), Vn = U(Bn);
|
|
2109
|
+
function Hn() {
|
|
2110
|
+
let e = Qe(Vn);
|
|
2111
|
+
if (e === Bn) throw Error("Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.");
|
|
2112
|
+
return e;
|
|
2113
|
+
}
|
|
2114
|
+
//#endregion
|
|
2115
|
+
//#region src/combobox/item/ComboboxItem.tsx
|
|
2116
|
+
var Un = /* @__PURE__ */ H("<div>");
|
|
2117
|
+
function Wn(n) {
|
|
2118
|
+
let r = X(), i = zn(), a = n, o = n, s = Symbol("ComboboxItem"), [c, l] = K(null, { ownedWrite: !0 }), u = G(() => a.value ?? null), d = G(() => r.disabled() || (a.disabled ?? !1)), f = G(() => a.nativeButton ?? !1), p = G(() => r.selectionMode() !== "none"), g = G(() => {
|
|
2119
|
+
if (a.index != null) return a.index;
|
|
2120
|
+
if (r.virtualized()) return je(r.itemValues(), u(), r.comparator());
|
|
2121
|
+
}), _ = r.store.collection.register({
|
|
2122
|
+
token: s,
|
|
2123
|
+
element: c,
|
|
2124
|
+
value: u,
|
|
2125
|
+
index: g,
|
|
2126
|
+
disabled: d
|
|
2127
|
+
}), v = G(() => g() ?? r.store.collection.indexOf(s)), x = G(() => v() !== -1), ee = G(() => x() ? `${r.id()}-${v()}` : void 0), te = G(() => {
|
|
2128
|
+
if (!p()) return !1;
|
|
2129
|
+
let e = r.selectedValue();
|
|
2130
|
+
return r.multiple() && Array.isArray(e) ? Me(e, u(), r.comparator()) : Ie(u(), e, r.comparator());
|
|
2131
|
+
}), S = G(() => r.store.activeIndex() === v()), C = G(() => ({
|
|
2132
|
+
disabled: d(),
|
|
2133
|
+
selected: te(),
|
|
2134
|
+
highlighted: S()
|
|
2135
|
+
})), w = G(() => m(n.class, C())), T = G(() => h(n.style, C())), E = G(() => t(C())), D = q(o, "render", "class", "disabled", "id", "index", "nativeButton", "onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerLeave", "onPointerMove", "ref", "style", "value");
|
|
2136
|
+
function O(e) {
|
|
2137
|
+
if (r.submitOnItemClick()) {
|
|
2138
|
+
r.handleSelection(e, u()), Ze(), r.requestSubmit();
|
|
2139
|
+
return;
|
|
2140
|
+
}
|
|
2141
|
+
r.handleSelection(e, u());
|
|
2142
|
+
}
|
|
2143
|
+
function k(e) {
|
|
2144
|
+
e.isPrimary && (r.store.pointerDownItem = e.currentTarget), e.preventDefault();
|
|
2145
|
+
}
|
|
2146
|
+
function ne(e) {
|
|
2147
|
+
e.preventDefault();
|
|
2148
|
+
}
|
|
2149
|
+
function re(e) {
|
|
2150
|
+
d() || r.readOnly() || O(e);
|
|
2151
|
+
}
|
|
2152
|
+
function A(e) {
|
|
2153
|
+
let t = r.store.pointerDownItem === e.currentTarget;
|
|
2154
|
+
r.store.pointerDownItem = null, !(d() || r.readOnly() || e.button !== 0 || t || !S()) && O(e);
|
|
2155
|
+
}
|
|
2156
|
+
function ie(e) {
|
|
2157
|
+
e.pointerType !== "touch" && (r.store.keyboardActive = !1, !(d() || !x()) && r.listNavigation.onItemPointerMove(e, v()));
|
|
2158
|
+
}
|
|
2159
|
+
function ae(e) {
|
|
2160
|
+
r.keepHighlight() || r.listNavigation.onItemPointerLeave(e);
|
|
2161
|
+
}
|
|
2162
|
+
let oe = y(b(() => Y(() => d() ? Ce : void 0)), b(() => a.onClick), re), se = y(b(() => a.onMouseDown), ne), ce = y(b(() => a.onMouseUp), A), le = y(b(() => a.onPointerDown), k), ue = y(b(() => a.onPointerMove), ie), de = y(b(() => a.onPointerLeave), ae);
|
|
2163
|
+
W(() => ({
|
|
2164
|
+
registered: x(),
|
|
2165
|
+
hasItems: r.hasItems(),
|
|
2166
|
+
index: v(),
|
|
2167
|
+
value: u(),
|
|
2168
|
+
selected: r.selectedValue(),
|
|
2169
|
+
compare: r.comparator()
|
|
2170
|
+
}), (e) => {
|
|
2171
|
+
!e.registered || e.hasItems || Y(() => r.store.setSelectedIndex(Fe(r.store.collection.values(), e.selected, e.compare, r.multiple())));
|
|
2172
|
+
}), W(c, () => r.store.collection.touch()), J(_);
|
|
2173
|
+
let fe = {
|
|
2174
|
+
selected: te,
|
|
2175
|
+
index: v
|
|
2176
|
+
}, pe = e(n, () => C(), (e) => (() => {
|
|
2177
|
+
var t = L(Un);
|
|
2178
|
+
return V(t, e, !1), z(), t;
|
|
2179
|
+
})());
|
|
2180
|
+
return F(Vn, {
|
|
2181
|
+
value: fe,
|
|
2182
|
+
get children() {
|
|
2183
|
+
return F(pe, R({
|
|
2184
|
+
ref: [((e) => {
|
|
2185
|
+
l(e), r.store.collection.touch();
|
|
2186
|
+
}), a.ref],
|
|
2187
|
+
get id() {
|
|
2188
|
+
return ee();
|
|
2189
|
+
},
|
|
2190
|
+
get type() {
|
|
2191
|
+
return f() ? "button" : void 0;
|
|
2192
|
+
},
|
|
2193
|
+
role: i ? "gridcell" : "option",
|
|
2194
|
+
get "aria-selected"() {
|
|
2195
|
+
return We(() => !!p())() ? te() ? "true" : "false" : void 0;
|
|
2196
|
+
},
|
|
2197
|
+
get "aria-disabled"() {
|
|
2198
|
+
return d() ? "true" : void 0;
|
|
2199
|
+
},
|
|
2200
|
+
get class() {
|
|
2201
|
+
return w();
|
|
2202
|
+
},
|
|
2203
|
+
get style() {
|
|
2204
|
+
return T();
|
|
2205
|
+
},
|
|
2206
|
+
onClick: oe,
|
|
2207
|
+
onMouseDown: se,
|
|
2208
|
+
onMouseUp: ce,
|
|
2209
|
+
onPointerDown: le,
|
|
2210
|
+
onPointerLeave: de,
|
|
2211
|
+
onPointerMove: ue
|
|
2212
|
+
}, E, D));
|
|
2213
|
+
}
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
//#endregion
|
|
2217
|
+
//#region src/combobox/row/ComboboxRow.tsx
|
|
2218
|
+
var Gn = /* @__PURE__ */ H("<div>");
|
|
2219
|
+
function Kn(t) {
|
|
2220
|
+
let n = t, r = t, i = {}, a = G(() => m(t.class, i)), o = G(() => h(t.style, i)), s = q(r, "render", "class", "ref", "style"), c = e(t, () => i, (e) => (() => {
|
|
2221
|
+
var t = L(Gn);
|
|
2222
|
+
return V(t, e, !1), z(), t;
|
|
2223
|
+
})());
|
|
2224
|
+
return F(Rn, {
|
|
2225
|
+
value: !0,
|
|
2226
|
+
get children() {
|
|
2227
|
+
return F(c, R({
|
|
2228
|
+
ref: [n.ref],
|
|
2229
|
+
role: "row",
|
|
2230
|
+
get class() {
|
|
2231
|
+
return a();
|
|
2232
|
+
},
|
|
2233
|
+
get style() {
|
|
2234
|
+
return o();
|
|
2235
|
+
}
|
|
2236
|
+
}, s));
|
|
2237
|
+
}
|
|
2238
|
+
});
|
|
2239
|
+
}
|
|
2240
|
+
//#endregion
|
|
2241
|
+
//#region src/combobox/empty/ComboboxEmpty.tsx
|
|
2242
|
+
var qn = /* @__PURE__ */ H("<div>");
|
|
2243
|
+
function Jn(t) {
|
|
2244
|
+
let n = X(), r = t, i = t, a = {}, o = G(() => m(t.class, a)), s = G(() => h(t.style, a)), c = q(i, "render", "children", "class", "ref", "style"), [l, u] = K(null, { ownedWrite: !0 });
|
|
2245
|
+
mn(l), J(() => {
|
|
2246
|
+
n.store.emptyElement === l() && (n.store.emptyElement = null);
|
|
2247
|
+
});
|
|
2248
|
+
let d = e(t, () => a, (e) => (() => {
|
|
2249
|
+
var t = L(qn);
|
|
2250
|
+
return V(t, e, !1), z(), t;
|
|
2251
|
+
})());
|
|
2252
|
+
return F(d, R({
|
|
2253
|
+
ref: [((e) => {
|
|
2254
|
+
u(e), n.store.emptyElement = e;
|
|
2255
|
+
}), r.ref],
|
|
2256
|
+
role: "status",
|
|
2257
|
+
"aria-live": "polite",
|
|
2258
|
+
"aria-atomic": "true",
|
|
2259
|
+
get class() {
|
|
2260
|
+
return o();
|
|
2261
|
+
},
|
|
2262
|
+
get style() {
|
|
2263
|
+
return s();
|
|
2264
|
+
}
|
|
2265
|
+
}, c, { get children() {
|
|
2266
|
+
return F(Ye, {
|
|
2267
|
+
get when() {
|
|
2268
|
+
return n.listEmpty();
|
|
2269
|
+
},
|
|
2270
|
+
get children() {
|
|
2271
|
+
return t.children;
|
|
2272
|
+
}
|
|
2273
|
+
});
|
|
2274
|
+
} }));
|
|
2275
|
+
}
|
|
2276
|
+
//#endregion
|
|
2277
|
+
//#region src/combobox/separator/ComboboxSeparator.tsx
|
|
2278
|
+
var Yn = /* @__PURE__ */ H("<div>");
|
|
2279
|
+
function Xn(n) {
|
|
2280
|
+
let r = n, i = n, a = G(() => r.orientation ?? "horizontal"), o = G(() => ({ orientation: a() })), s = G(() => m(n.class, o())), c = G(() => h(n.style, o())), l = G(() => t(o())), u = q(i, "render", "class", "orientation", "ref", "style"), d = e(n, () => o(), (e) => (() => {
|
|
2281
|
+
var t = L(Yn);
|
|
2282
|
+
return V(t, e, !1), z(), t;
|
|
2283
|
+
})());
|
|
2284
|
+
return F(d, R({
|
|
2285
|
+
ref: [r.ref],
|
|
2286
|
+
role: "presentation",
|
|
2287
|
+
get class() {
|
|
2288
|
+
return s();
|
|
2289
|
+
},
|
|
2290
|
+
get style() {
|
|
2291
|
+
return c();
|
|
2292
|
+
}
|
|
2293
|
+
}, l, u));
|
|
2294
|
+
}
|
|
2295
|
+
//#endregion
|
|
2296
|
+
//#region src/combobox/root/utils/useFilteredItems.ts
|
|
2297
|
+
function Zn() {
|
|
2298
|
+
return X().filteredItems;
|
|
2299
|
+
}
|
|
2300
|
+
//#endregion
|
|
2301
|
+
export { dt as A, Zt as C, Bt as D, Wt as E, at as F, it as M, ct as N, Dt as O, st as P, Xt as S, Ut as T, sn as _, Wn as a, tn as b, Fn as c, Tn as d, Sn as f, cn as g, un as h, Kn as i, rt as j, X as k, An as l, gn as m, Xn as n, Hn as o, bn as p, Jn as r, Ln as s, Zn as t, On as u, an as v, Vt as w, $t as x, $ as y };
|