@cloudflare/kumo 2.14.0 → 2.15.0
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 +51 -0
- package/ai/component-registry.json +231 -43
- package/ai/component-registry.md +774 -166
- package/ai/schemas.ts +22 -3
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +51 -2
- package/dist/ai/schemas.js +32 -1
- package/dist/blocks-source/delete-resource/delete-resource.test.tsx +21 -0
- package/dist/blocks-source/delete-resource/delete-resource.tsx +14 -8
- package/dist/chunks/{index.parts-h7wtkrxpz4m8eqn9.js → AccordionPanelDataAttributes-mmrmkky28u1010l5.js} +150 -61
- package/dist/chunks/{AlertDialogTrigger-dkihgpvj12si73w3.js → AlertDialogTrigger-l1r1gbxcky1xq889.js} +4 -4
- package/dist/chunks/{index.parts-kgiqby97w6tn6jw7.js → AlertDialogTriggerDataAttributes-go49qon601catpgn.js} +24 -9
- package/dist/chunks/{AutocompleteItem-drxau0wm3735nihq.js → AutocompleteItem-36ysm5nwbsd0snr6.js} +5 -5
- package/dist/chunks/AutocompleteItemDataAttributes-n5rigpf0s9ylnwi3.js +232 -0
- package/dist/chunks/{AutocompleteSeparator-hqtaxxxye1rfezfg.js → AutocompleteSeparator-bnqeqh7i983d92gx.js} +2 -2
- package/dist/chunks/{index.parts-b9zmk3ta77w8dy9f.js → AvatarImageDataAttributes-jw70u384c83lhqfp.js} +39 -15
- package/dist/chunks/{Button-ccl5r1xlbe3gh998.js → ButtonDataAttributes-nceand1fi7lvnmkb.js} +12 -4
- package/dist/chunks/{CSPContext-ctyrgg64girv38ls.js → CSPContext-iv67i0qqhihg8mur.js} +1 -1
- package/dist/chunks/{CSPProvider-p9ensukmowjpkgc0.js → CSPProvider-finau3a8hnc9o2td.js} +2 -2
- package/dist/chunks/{CheckboxGroup-knvypu2d1s0iz86k.js → CheckboxGroup-581mfftu99wvjb3a.js} +18 -23
- package/dist/chunks/{CheckboxGroupContext-lgc9dwxou662i6zo.js → CheckboxGroupContext-jf1bt3znvqlhrql6.js} +1 -1
- package/dist/chunks/CheckboxGroupDataAttributes-nskqcxts64symbvf.js +10 -0
- package/dist/chunks/{CheckboxIndicator-n982pbktfkxsa5zz.js → CheckboxIndicator-i13dmhacfgqo328c.js} +86 -29
- package/dist/chunks/CheckboxIndicatorDataAttributes-3p29ju7nkczz1l2y.js +85 -0
- package/dist/chunks/{CollapsiblePanel-jm0ni90g7wz7ppkc.js → CollapsiblePanel-md5suzmtnsyz1kab.js} +17 -13
- package/dist/chunks/CollapsibleRootDataAttributes-bynmgxmt4jikaoha.js +36 -0
- package/dist/chunks/{ComboboxClear-c2kvjkh9yc6xfl38.js → ComboboxClear-ioejwvtnmqanph88.js} +31 -24
- package/dist/chunks/ComboboxClearDataAttributes-lo0enstdmrqpywsy.js +402 -0
- package/dist/chunks/{ComboboxEmpty-o0q20j2l2syar9kx.js → ComboboxEmpty-gkt1y5b81a4983v7.js} +207 -215
- package/dist/chunks/ComboboxItemIndicatorDataAttributes-iku7l9ig0ve09an4.js +259 -0
- package/dist/chunks/{ComboboxPopup-oxgggc2wxy6bfmru.js → ComboboxPopup-n8cbgys9st446j1i.js} +15 -15
- package/dist/chunks/{CompositeItem-hzuk5x3e5zsfgnyj.js → CompositeItem-kepwg8jtvgap06o6.js} +3 -3
- package/dist/chunks/{CompositeList-lbr4enu6yzek7oa9.js → CompositeList-gwuaf6d14s4da0j0.js} +9 -7
- package/dist/chunks/{CompositeListContext-m9frxn53kkmr23d0.js → CompositeListContext-bejvmlu39hsfjzgu.js} +1 -1
- package/dist/chunks/{CompositeRoot-g72lchaerolf5dc9.js → CompositeRoot-dnlkb27uw4g5aocf.js} +12 -12
- package/dist/chunks/{CompositeRootContext-ixz4myr7uwvavx6w.js → CompositeRootContext-obm54j7y6s86qwhq.js} +1 -1
- package/dist/chunks/{index.parts-d4wim8mcnl9a2n9d.js → ContextMenuTriggerDataAttributes-xwozccynxv6pk5s0.js} +29 -15
- package/dist/chunks/DialogBackdropDataAttributes-jwqxd6jla03xh8ke.js +28 -0
- package/dist/chunks/{DialogHandle-klk7uo1q1y8ghyx5.js → DialogCloseDataAttributes-12m7gwh3i6fd7d05.js} +14 -6
- package/dist/chunks/{DialogPopup-olsvyf7ulia6ekb1.js → DialogPopup-n6w7b389e7bs0472.js} +13 -11
- package/dist/chunks/{DialogRoot-hl3genvzl9h8ridm.js → DialogRoot-hkkqj7vcjpkx8qk8.js} +3 -3
- package/dist/chunks/{DialogTrigger-g44cuem7n4wez533.js → DialogTrigger-kpugfkbfswqrus4u.js} +16 -16
- package/dist/chunks/DialogTriggerDataAttributes-bp9bu13cvwuddh5b.js +18 -0
- package/dist/chunks/DialogViewportDataAttributes-mma9emv1edsc1vuy.js +78 -0
- package/dist/chunks/{DirectionContext-opvqcb794uxicri4.js → DirectionContext-kpby968j030psajn.js} +1 -1
- package/dist/chunks/{DirectionProvider-er2gibtc9a1f0kep.js → DirectionProvider-cg0pwzgdyg6r73r6.js} +2 -2
- package/dist/chunks/{DrawerViewport-eqzib92gukr4qap3.js → DrawerViewport-mzqpwvqtylnad8ib.js} +110 -61
- package/dist/chunks/{index.parts-jknln7yxhdokkvd6.js → DrawerViewportDataAttributes-dd9593zm9fl9vcsm.js} +166 -85
- package/dist/chunks/{FieldControl-c5sahhd5xg3nr2x7.js → FieldControl-hjj2tcqruozadgdi.js} +18 -27
- package/dist/chunks/{FieldDescription-ldfiii5bvssfib3d.js → FieldDescription-orix2gepowrp5ni4.js} +11 -11
- package/dist/chunks/{FieldItemContext-kpsmvqm5a98m8zpx.js → FieldItemContext-ohsf45im6xhpay40.js} +1 -1
- package/dist/chunks/FieldItemDataAttributes-m52srx69pispz49i.js +283 -0
- package/dist/chunks/{FieldLabel-j9teqs9f1exqv346.js → FieldLabel-fjc7tdis7rcbq8o4.js} +17 -15
- package/dist/chunks/{FieldsetLegend-jyy40ylt2ynkvgob.js → FieldsetLegend-gl9z9eezr0xg9zr7.js} +5 -5
- package/dist/chunks/FieldsetLegendDataAttributes-fn20251jxjqkpkxm.js +17 -0
- package/dist/chunks/{FieldsetRootContext-7nlstw7wronafxhw.js → FieldsetRootContext-fphwizvcm55ydg94.js} +1 -1
- package/dist/chunks/{FloatingPortalLite-da0wdcmem7ahkle6.js → FloatingPortalLite-j7dsy7gokbxdoe1i.js} +2 -2
- package/dist/chunks/{popupTriggerMap-ehv0fuhnmy59j3pn.js → FloatingRootStore-men6ufp3a2b296fh.js} +117 -119
- package/dist/chunks/{FloatingTree-lhdqtlu8s6m66n7l.js → FloatingTree-kiyzavvaum442o1s.js} +6 -6
- package/dist/chunks/{Form-fjfbann47c7ws316.js → Form-oz425k7r4abea8o4.js} +7 -7
- package/dist/chunks/{FormContext-bsu99v8i8pwu1yxc.js → FormContext-jv19engyccpf6xcl.js} +2 -2
- package/dist/chunks/{Input-irwtufp5t73pwnoj.js → Input-ozudotydd679ly63.js} +2 -2
- package/dist/chunks/InputDataAttributes-oy8t6q5y5t8ik02j.js +42 -0
- package/dist/chunks/ItemIndicator-cvf8cw5fv5l3cd8j.js +37 -0
- package/dist/chunks/{LabelableContext-ccxbhu73vrk089m1.js → LabelableContext-dz4wz3lu3lgqusu7.js} +37 -6
- package/dist/chunks/{ListboxSeparator-nfyv54r2v5qtmosj.js → ListboxSeparator-skazx18vzzj7i9zp.js} +2 -2
- package/dist/chunks/MenuClearDataAttributes-fo0pekd36n56mdxu.js +1645 -0
- package/dist/chunks/{MenuSubmenuTrigger-mbbda6ucik6nphbq.js → MenuSubmenuTrigger-hm5xbgik6aq95x35.js} +639 -281
- package/dist/chunks/MenuSubmenuTriggerDataAttributes-gdfxdjymgmnaxdds.js +372 -0
- package/dist/chunks/{MenuTrigger-disngqnt74owi30p.js → MenuTrigger-dlfvicsaggss0o9m.js} +36 -28
- package/dist/chunks/{Menubar-fluuxyn8c2zuz5pr.js → Menubar-ja5int05ihjj0ra4.js} +24 -14
- package/dist/chunks/{MenubarContext-blatefsj42br7jh8.js → MenubarContext-ooz0h08i55c8oip5.js} +1 -1
- package/dist/chunks/{MeterLabel-k6no448jvaidaptf.js → MeterLabel-cykbkvqys5263z05.js} +12 -12
- package/dist/chunks/{index.parts-gf9v1piz8xxt8ap1.js → NavigationMenuIconDataAttributes-l82pkpm61d0meqxf.js} +333 -94
- package/dist/chunks/{NullStore-jwgpmovsgl47g9bv.js → NullStore-my62xo2vfcfkerri.js} +7 -6
- package/dist/chunks/{index.parts-c1ocmbxanagpan6d.js → NumberFieldScrubAreaCursorDataAttributes-k2lsbk35svshnwf5.js} +439 -215
- package/dist/chunks/{index.parts-p2lcxzhh1ll3584m.js → OTPFieldInputDataAttributes-gvgtu2gg85kgjzwr.js} +173 -56
- package/dist/chunks/{PopoverClose-kpyt8hbqc52lnjb8.js → PopoverViewport-peh28i8q4hqfjy97.js} +135 -81
- package/dist/chunks/PopoverViewportDataAttributes-gplhq9d7ffp9q8u3.js +329 -0
- package/dist/chunks/{PrehydrationScript-j6zlrxmojrqni6b9.js → PrehydrationScript-hs2je3mndbxuts7w.js} +29 -14
- package/dist/chunks/{index.parts-cc0yi5vo7s4x3r9p.js → PreviewCardViewportDataAttributes-bgfwmyshey7fx6nr.js} +263 -36
- package/dist/chunks/{index.parts-lpafjiz853r94ydb.js → ProgressLabelDataAttributes-j8mutcz11ei0ohvj.js} +103 -22
- package/dist/chunks/{RadioGroup-pok1e5qbnbujrz1e.js → RadioGroup-kioqngmmuo7a1lfa.js} +37 -42
- package/dist/chunks/{RadioGroupContext-galfnl2el7y2krov.js → RadioGroupContext-dr6uihsj7oky0eol.js} +1 -1
- package/dist/chunks/RadioGroupDataAttributes-dpdr6xe4ve204qwb.js +10 -0
- package/dist/chunks/{RadioIndicator-jd511oajbwmyjxbg.js → RadioIndicator-bhxqih8wzv7hyrec.js} +83 -27
- package/dist/chunks/RadioIndicatorDataAttributes-n5yupp5psifu0d4f.js +80 -0
- package/dist/chunks/{ScrollAreaThumb-eed3hf0pmrblshfw.js → ScrollAreaThumb-hxig41yn4lrurd3o.js} +114 -43
- package/dist/chunks/ScrollAreaThumbDataAttributes-gup5wfxvqye6jj27.js +137 -0
- package/dist/chunks/SelectScrollUpArrowDataAttributes-fce5i1afjkb0necr.js +473 -0
- package/dist/chunks/{SelectSeparator-mrjooj7vmjez6fua.js → SelectSeparator-nnak70azojox8b2b.js} +249 -162
- package/dist/chunks/{Separator-bcm4ezllqxvtpvuj.js → Separator-fhwve0tfny3tht3a.js} +2 -2
- package/dist/chunks/SeparatorDataAttributes-ch6e63bas7zflw00.js +11 -0
- package/dist/chunks/{index.parts-j6kbr29a542ya81m.js → SliderIndicator-h1o3qbrvr8x0t4t2.js} +129 -74
- package/dist/chunks/SliderIndicatorDataAttributes-ff2f1cjealif5nvo.js +240 -0
- package/dist/chunks/{SwitchRoot-gahuqddsq1s55p8m.js → SwitchRoot-m4t2tq5zn5wibyxk.js} +74 -22
- package/dist/chunks/SwitchThumbDataAttributes-f95ld864on9y6ptk.js +90 -0
- package/dist/chunks/{TabsList-ebl0v8gu8wn28zss.js → TabsList-n5n93rxr4sy704u8.js} +48 -30
- package/dist/chunks/TabsListDataAttributes-e03a7kbubuf02z1l.js +183 -0
- package/dist/chunks/ToastArrowDataAttributes-jbnvz3kp6a35slgj.js +136 -0
- package/dist/chunks/{Toggle-mbshs50266z9hgxp.js → ToggleDataAttributes-jl9ojyvwgrvefke6.js} +26 -11
- package/dist/chunks/{ToggleGroupContext-h4v7jaf77rp2xng9.js → ToggleGroupContext-hg8zbkgqpscqhz83.js} +1 -1
- package/dist/chunks/{ToggleGroup-k2caz2ghv6zbzp5l.js → ToggleGroupDataAttributes-n1dwona1alvabstl.js} +30 -9
- package/dist/chunks/{ToolbarGroupContext-e5cg7needj0edodc.js → ToolbarGroupContext-eawva8xkxb4osbxb.js} +1 -1
- package/dist/chunks/{ToolbarInput-i4h95tes75w0p5y2.js → ToolbarInput-kyxl1be0p3cyuayp.js} +10 -10
- package/dist/chunks/ToolbarInputDataAttributes-n4a18a4km735du04.js +150 -0
- package/dist/chunks/{ToolbarRootContext-eqk40r8uh4h6r211.js → ToolbarRootContext-difqbj720teyt8lu.js} +1 -1
- package/dist/chunks/{TooltipPopup-dm4y0hbdeylzp22y.js → TooltipPopup-furysmeyb68uycbz.js} +41 -68
- package/dist/chunks/{TooltipProvider-h40qf9wcn0atj15v.js → TooltipProvider-hyans0ens4axh1y8.js} +5 -5
- package/dist/chunks/TooltipViewportDataAttributes-gkwbezdq40ssuevg.js +312 -0
- package/dist/chunks/{adaptiveOriginMiddleware-b8ztjthe278xq7lm.js → adaptiveOriginMiddleware-m9tqzw58wya9sdds.js} +3 -3
- package/dist/chunks/{addEventListener-l40nxvf06iukgvnj.js → addEventListener-ku3x23446prmd1kz.js} +1 -1
- package/dist/chunks/{areArraysEqual-bcx201k1x9ziizym.js → areArraysEqual-nnpg93s9g7aqcaoh.js} +1 -1
- package/dist/chunks/{autocomplete-m6h1pbygknrz5div.js → autocomplete-kgp17p6oz4pczxt9.js} +9 -9
- package/dist/chunks/{badge-dq8bx752b9dp7dst.js → badge-kyz53p7p0ng393bs.js} +2 -1
- package/dist/chunks/{banner-msnmqm7of2lck01x.js → banner-cpla8vqjxaulggyd.js} +3 -3
- package/dist/chunks/{breadcrumbs-lhi1qrdh74mb4zsx.js → breadcrumbs-oyuqwb09l08uhok2.js} +7 -16
- package/dist/chunks/{button-group-i9dh83xutyuxyry7.js → button-group-biv43ksvaipc3p5n.js} +2 -2
- package/dist/chunks/{button-pa1bq9b85hawg41a.js → button-oxy32x5w9x9az80g.js} +25 -6
- package/dist/chunks/{chart-kd1xd6crso2i956o.js → chart-foxl6xbubuoshfcs.js} +14 -10
- package/dist/chunks/{checkbox-lbo436duy7krxcsk.js → checkbox-o9627970y7c9ciqy.js} +90 -36
- package/dist/chunks/{clamp-jcjhzx71s6wt1rnc.js → clamp-rcpupxvhqrn8uuyf.js} +1 -1
- package/dist/chunks/{clipboard-text-gd6s3n1bqse9zgt8.js → clipboard-text-bhy88tgvk1o6wmyl.js} +6 -6
- package/dist/chunks/{cloudflare-logo-boafurcbm5ttoo4o.js → cloudflare-logo-d8mid9xr190h78cu.js} +3 -3
- package/dist/chunks/{code-eu8kzwqnlhoyin24.js → code-nj2nu6qzxhz6qnkk.js} +1 -1
- package/dist/chunks/{collapsible-l8g94on4w7qfosmn.js → collapsible-ic6813hc4yv5s5hv.js} +2 -2
- package/dist/chunks/{combobox-hdxtsm2gqcxxgfju.js → combobox-hwrq8etkr7p2id0x.js} +7 -7
- package/dist/chunks/{command-palette-crtm3nd32yjhuax1.js → command-palette-el4x943vpmid0po0.js} +8 -8
- package/dist/chunks/{composite-ab8dmdfoj6tmhcn1.js → composite-c11t1ok72s3cggjc.js} +1 -1
- package/dist/chunks/{constants-flxfd6q03phtu007.js → constants-l10cgj6pyqg27jod.js} +1 -1
- package/dist/chunks/{createBaseUIEventDetails-3ob3qgs95ffm8l0w.js → createBaseUIEventDetails-nvee6bghv2reeqdb.js} +3 -2
- package/dist/chunks/{createItems-b8n8vigg5nak6j9s.js → createItems-n07tfwx89cdoar18.js} +42 -77
- package/dist/chunks/{createToastManager-onmoqrmr8zo02rif.js → createToastManager-cxjmn4jx3ejh85fs.js} +86 -42
- package/dist/chunks/{date-picker-cotkexrpqu5tjikv.js → date-picker-oee5ehsrepnlmltj.js} +4 -2
- package/dist/chunks/{date-range-picker-i6d8y1yemm7x5ins.js → date-range-picker-hpx3cdu9ve01jx6d.js} +1 -1
- package/dist/chunks/{dialog-glpnivujociqs9lh.js → dialog-lgrwmsumwpftp2u8.js} +7 -7
- package/dist/chunks/{dropdown-m53ji1d66mws89wh.js → dropdown-o875yxeqod7qp871.js} +133 -30
- package/dist/chunks/{empty-hkvg3is3uc6dj1at.js → empty-ft85jcbs7fd5t3tn.js} +11 -12
- package/dist/chunks/{engine-g5egnkub1ikv3wvy.js → engine-hzmefiqm63hu0c7i.js} +2 -2
- package/dist/chunks/{error-f4f6l13zx6tynxmy.js → error-lbnic2b20qr3mukp.js} +2 -2
- package/dist/chunks/{field-oqtso1v0oszlxi0e.js → field-jzzlgre0jmrr38o2.js} +4 -4
- package/dist/chunks/{flow-iz8sn24h5q6q4b10.js → flow-imvwzp5p2f8y2dxm.js} +7 -3
- package/dist/chunks/{formatNumber-kcnmauoqxku5a84c.js → formatNumber-b4kjdsebslm2b3t0.js} +2 -2
- package/dist/chunks/{getCssDimensions-olosvhh5husavesv.js → getCssDimensions-gckwdrp86f73cv51.js} +1 -1
- package/dist/chunks/{getElementTransform-cuiqmjglkrz4db6c.js → getElementTransform-cz3jyftv0x5io95f.js} +1 -1
- package/dist/chunks/getFiniteAnimations-jwd833ybtz81j5f0.js +13 -0
- package/dist/chunks/getHighlightReason-fhc53kq6qakcct9s.js +15 -0
- package/dist/chunks/{getPseudoElementBounds-x7b9uqi5hdb1lq2r.js → getPseudoElementBounds-csuw8kwsoeyxd5tv.js} +2 -2
- package/dist/chunks/{grid-fjlo3wlpkwgw56y9.js → grid-nwiczrab3r4w0zr2.js} +1 -1
- package/dist/chunks/{index.parts-ftxrjoy00esi3aau.js → index.parts-db9pzsm9rrs9tp0t.js} +12 -12
- package/dist/chunks/{index.parts-iq66xivmdw2mouvx.js → index.parts-ggacwr0yakuemead.js} +7 -7
- package/dist/chunks/{index.parts-g390bxx23hdko02m.js → index.parts-pcg3pmf3yyro841t.js} +2 -2
- package/dist/chunks/{inertValue-e0o6qvuef83v78fk.js → inertValue-n09gkjvwwa1kddov.js} +2 -2
- package/dist/chunks/{inline-copy-text-gbd7jhwpor27l4rq.js → inline-copy-text-57r67slswfqvgbaf.js} +2 -2
- package/dist/chunks/{input-group-fjr4r5ax0x78ppax.js → input-group-n08mcd8b36wbylro.js} +5 -5
- package/dist/chunks/{input-h5ox92gf13ge04hp.js → input-il37wjigy2xtgdo2.js} +4 -4
- package/dist/chunks/{input-c8lv9ulv0kortliq.js → input-ksy1w6j1m6olz6ck.js} +3 -3
- package/dist/chunks/{isElementDisabled-o0j7po84u0xjuwgg.js → isElementDisabled-dyqutxpzdfppbohx.js} +1 -1
- package/dist/chunks/itemEquality-ki3x4tzdhjlqjey6.js +56 -0
- package/dist/chunks/{label-gzyfw17u08irhdo8.js → label-hugrtzreeqk5mtqu.js} +10 -6
- package/dist/chunks/{layer-card-idh3863vdgprgqai.js → layer-card-mar4dya5kl1vvie6.js} +3 -3
- package/dist/chunks/{layer-dialog-j5ywmzs46ccg6oqy.js → layer-dialog-dwrrgv1wasrerow4.js} +71 -46
- package/dist/chunks/{link-cqyfjezntvr53rh7.js → link-h84bkh8eem39p529.js} +4 -4
- package/dist/chunks/{loader-j2v6fab8iucuxz1z.js → loader-kv5nk8j8tsuesxqo.js} +2 -6
- package/dist/chunks/{locale-provider-kjlnws7jln3ak0dr.js → locale-provider-e3310bgo4lnffqkd.js} +20 -8
- package/dist/chunks/{menubar-fjhotkmndttb8mua.js → menubar-m5pqhx7lu5z7mkks.js} +2 -2
- package/dist/chunks/{mergeCleanups-ix8l84cgutsbotpd.js → mergeCleanups-nw73c6jfwl5tyhw4.js} +1 -1
- package/dist/chunks/{meter-majprsslwmpbmkzg.js → meter-poh8jpe0qtq6mvee.js} +2 -2
- package/dist/chunks/{pagination-oaenm9t7ou3lmcgw.js → pagination-h24on80p2z5ugqdb.js} +3 -3
- package/dist/chunks/{popover-hr0bfgg48xzjggky.js → popover-nqrt3ykqv6sic8pz.js} +70 -16
- package/dist/chunks/{popupHandle-7ghmro8a5uerjwu5.js → popupHandle-dk3ixgc8flr7v971.js} +4 -4
- package/dist/chunks/popupStoreUtils-czfnxn051xakask5.js +868 -0
- package/dist/chunks/radio-d3pkrvsldfbdefav.js +203 -0
- package/dist/chunks/{reason-parts-m5ishukzeux3q0pc.js → reason-parts-hssx64rmlxyn6gw5.js} +3 -2
- package/dist/chunks/{resolveAriaLabelledBy-nc8mdie5shy87nsb.js → resolveAriaLabelledBy-knaucrjrjwnk7tvs.js} +1 -1
- package/dist/chunks/resolveValueLabel-ntacnb58mhka5gg0.js +70 -0
- package/dist/chunks/{safePolygon-kmd5wsz26l4xtj6c.js → safePolygon-ep4133qogeu5vjf3.js} +34 -38
- package/dist/chunks/{safeReact-hpp4cck3y2s5jg75.js → safeReact-ek77ilng4ekk7mgz.js} +2 -2
- package/dist/chunks/{scrollable-b6m9ze1u7ps0q1qn.js → scrollable-k784b35i80aolmvg.js} +8 -13
- package/dist/chunks/{select-futox5zqr3r80y9a.js → select-ey03k4630uckf1rk.js} +8 -8
- package/dist/chunks/{sensitive-input-cw33yncetxk3fbrl.js → sensitive-input-lfrrtyg9n5ulq3tb.js} +23 -28
- package/dist/chunks/{serializeValue-ipcakiw32jb7kany.js → serializeValue-d1otz2i7h5tygrwf.js} +1 -1
- package/dist/chunks/{sidebar-in9zhvr473afsjpp.js → sidebar-gluq5b5oacrdk4m4.js} +23 -16
- package/dist/chunks/{skeleton-line-m9dyh126t9k07jvg.js → skeleton-line-gjf1fecmyy82aejz.js} +1 -1
- package/dist/chunks/slider-juwif2d8xa5n0429.js +87 -0
- package/dist/chunks/{stringifyLocale-bxsgxdnzaef2vcar.js → stringifyLocale-gbxouqj7ol627jxh.js} +1 -1
- package/dist/chunks/{styles-kl02oyrlnld7arja.js → styles-eb8bvypmayf578jf.js} +2 -2
- package/dist/chunks/{surface-irf0af2mfglu4p0j.js → surface-ginwpan1pz61l6k2.js} +2 -2
- package/dist/chunks/{switch-cqsvolm7h69z7vgg.js → switch-mqf1ulvle4nd6d2t.js} +4 -4
- package/dist/chunks/{table-yf8ul2e5nbemioi1.js → table-nysse5tiwf47gg4k.js} +2 -2
- package/dist/chunks/{table-of-contents-cvduqgssxdcbpagh.js → table-of-contents-gkjv9ck8etbz64ej.js} +5 -2
- package/dist/chunks/{tabs-gf57qqf1wcclaejq.js → tabs-mmkz7q5rofnmogwt.js} +3 -3
- package/dist/chunks/{tag-input-ohfybx5dbxy3houy.js → tag-input-b10gfxoob9vcizpm.js} +6 -5
- package/dist/chunks/{text-f1wxz183ckq7qtl7.js → text-me99rjbjkaff98gp.js} +1 -2
- package/dist/chunks/{toast-bzaothy2yrezh787.js → toast-b4t9rt9y1sumcmy2.js} +4 -4
- package/dist/chunks/{toolbar-h213d8e22yjh5cwq.js → toolbar-hov6sa3ui366f447.js} +5 -5
- package/dist/chunks/{tooltip-o4natsv01lpq8oq2.js → tooltip-lguwh8bjhxwnjfus.js} +3 -3
- package/dist/chunks/use-copy-feedback-gl55ghst0csvpv4j.js +55 -0
- package/dist/chunks/{useAnchoredPopupScrollLock-kp3kai20u91sdm7v.js → useAnchoredPopupScrollLock-msm8tzkewysnunut.js} +4 -4
- package/dist/chunks/{useAnimationFrame-0tt315hl9n3jzl86.js → useAnimationFrame-k9lqdj9quln3sd85.js} +3 -3
- package/dist/chunks/{useAriaLabelledBy-ox8dum59shmgypq1.js → useAriaLabelledBy-j3j9jqlr9ukyk08s.js} +7 -6
- package/dist/chunks/{useBaseUiId-lg1teubxudgin0w2.js → useBaseUiId-nk4k7nj9h1cy76ny.js} +2 -2
- package/dist/chunks/{useButton-h7s9aq1sfw6arawe.js → useButton-lklvdzuhvj22bx07.js} +14 -12
- package/dist/chunks/{useClick-l0p0endoxrlp0ae5.js → useClick-pcbkcc7r620v1smu.js} +12 -12
- package/dist/chunks/{useCollapsiblePanel-g6t146nqj521pild.js → useCollapsiblePanel-lrfsgx21ds36cwlp.js} +75 -28
- package/dist/chunks/{useCompositeItem-p7090ga00dpqcg5j.js → useCompositeItem-2juex3zh9gyrs8e9.js} +4 -4
- package/dist/chunks/{useCompositeListItem-odg6yo4h8866b37o.js → useCompositeListItem-ekwo2j2rjkggg7xj.js} +3 -3
- package/dist/chunks/{useControlled-lfns1ot6kwowa4t4.js → useControlled-i3srnkxy598s0au9.js} +3 -3
- package/dist/chunks/{useFieldValidation-e5pc8loiwzd68g4f.js → useFieldValidation-oe16jiigp971yrzr.js} +7 -7
- package/dist/chunks/{useFloatingRootContext-c849wtis7gx013m8.js → useFloatingRootContext-k676b6m7f80bdapd.js} +6 -6
- package/dist/chunks/{useFocus-lqwrnfa1svv3bcx1.js → useFocus-mn7a9t9v6fnlb4mf.js} +12 -14
- package/dist/chunks/useId-82z8yqlmc1hy1c5t.js +50 -0
- package/dist/chunks/useInitialLiveRegionTextMutation-nl2hus7zx1h7ggno.js +86 -0
- package/dist/chunks/{useLabel-kcggu762z3z2taeb.js → useLabel-me6zzfvkypo458pi.js} +19 -9
- package/dist/chunks/{useLabelableId-gqiiuqqn2k0u62r4.js → useLabelableId-bjeh6q3pgrqjb7er.js} +6 -6
- package/dist/chunks/{useListNavigation-3nyjs362qcau34in.js → useListNavigation-hpddbd0cc9pvt461.js} +56 -74
- package/dist/chunks/{useOnMount-hadwgyauanbzrvem.js → useOnMount-gxggz1m0n869s6r0.js} +2 -2
- package/dist/chunks/{useOpenChangeComplete-lk2gfu250t7r20c6.js → useOpenChangeComplete-edtabjwqmechsyv6.js} +10 -8
- package/dist/chunks/{usePopupHandleStore-hx871cmn66j0q7wz.js → usePopupHandleStore-gawjmfjf1xdgiph3.js} +2 -2
- package/dist/chunks/{usePopupViewport-iy5j9zawjrr3pcs0.js → usePopupViewport-l6w01iohvzloghy8.js} +28 -36
- package/dist/chunks/{usePositioner-k9nc7cl550bgfwzs.js → usePositioner-mzvgnazldqvy44z2.js} +41 -72
- package/dist/chunks/usePressAndHold-k9ynk78pgf677kpx.js +179 -0
- package/dist/chunks/{usePreviousValue-io5t1pdxehw21l85.js → usePreviousValue-o6swt5tb7xhpdu4e.js} +1 -1
- package/dist/chunks/{useRegisterFieldControl-lvusf6vc963clx02.js → useRegisterFieldControl-m1stc9l9y4cndf0k.js} +4 -4
- package/dist/chunks/{useRegisteredLabelId-hw6b87h1k7kow1o2.js → useRegisteredLabelId-b7u9ygya03448zzn.js} +3 -3
- package/dist/chunks/{useRender-onwjigxa00uch2ip.js → useRender-h9ktka9xt4obdv6y.js} +2 -2
- package/dist/chunks/{useRenderDialogRoot-lddunc01twftravv.js → useRenderDialogRoot-bsqrqpc1ddau7xg4.js} +57 -20
- package/dist/chunks/{useRenderElement-lrvp2pwrpt5zq1zd.js → useRenderElement-nkklxbq1rp7h2kw0.js} +17 -24
- package/dist/chunks/{useScrollLock-buonkbwuland9wl3.js → useScrollLock-le7ajwlt7oh6fzxi.js} +68 -72
- package/dist/chunks/useSetFieldFocused-fbvj7gcv67dqfkp0.js +35 -0
- package/dist/chunks/{useStableCallback-b1i1ghzd9k75bb85.js → useStableCallback-le5qgj6p9l04729n.js} +3 -3
- package/dist/chunks/{useSwipeDismiss-m1s13x9t9ey9ax3p.js → useSwipeDismiss-e8tfxzlp05p86mgb.js} +35 -54
- package/dist/chunks/{useTimeout-cpql3c8p250cr093.js → useTimeout-f0ayn2l2l9aop4l8.js} +3 -3
- package/dist/chunks/{useTransitionStatus-bwqaavnekreihom2.js → useTransitionStatus-disysoblzgk34w14.js} +9 -5
- package/dist/chunks/{useTriggerFocusGuards-lz7wt484xltizro4.js → useTriggerFocusGuards-dyd3hb1m8en8ct50.js} +12 -22
- package/dist/chunks/useTriggerSwitchTransition-hk5j36hd5dq2ok6w.js +62 -0
- package/dist/chunks/{useTypeahead-kvag4w6hu2g1kbwt.js → useTypeahead-kfdsw1ksl5bgvvzl.js} +16 -12
- package/dist/chunks/{useValueAsRef-o4s9ohb3aczypmnk.js → useValueAsRef-dv0tmfr1xlpzdlru.js} +3 -3
- package/dist/chunks/{useValueChanged-cz5wflhe8g15n6w1.js → useValueChanged-fjssa2v6d4w8y332.js} +3 -3
- package/dist/chunks/{utils-0i7gujfv3f3e9dqh.js → utils-o44zfmzz9z7uyj1v.js} +0 -1
- package/dist/chunks/{valueToPercent-d7gbqk1umostj7ch.js → valueToPercent-djk2mqnihth2uvf6.js} +1 -1
- package/dist/chunks/vendor-styling-gs32v7xt5znc8kg0.js +1167 -0
- package/dist/chunks/{vendor-utils-ecfbsk425x1bm0gh.js → vendor-utils-io8z5lsfxq8m2dcc.js} +88 -30
- package/dist/chunks/{visuallyHidden-nous086atnlxtf74.js → visuallyHidden-kzzs9hbe93is3rci.js} +2 -1
- package/dist/code.js +6 -11
- package/dist/components/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button-group.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/cloudflare-logo.js +1 -1
- package/dist/components/code.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown.d.ts +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/flow.js +1 -1
- package/dist/components/grid.js +1 -1
- package/dist/components/inline-copy-text.js +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/label.d.ts +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/layer-card.js +1 -1
- package/dist/components/layer-dialog.d.ts +2 -2
- package/dist/components/layer-dialog.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/loader.js +2 -2
- package/dist/components/menubar.js +1 -1
- package/dist/components/meter.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/radio.d.ts +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sensitive-input.js +1 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/slider.d.ts +2 -0
- package/dist/components/slider.js +3 -0
- package/dist/components/surface.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table-of-contents.js +1 -1
- package/dist/components/table.d.ts +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tag-input.js +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toolbar.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/{index-NqlNd7cQ.d.ts → index-5bJAnzUo.d.ts} +19 -7
- package/dist/{index-Cqrye3KD.d.ts → index-AUC5xRcO.d.ts} +64 -7
- package/dist/{index-C0d8uwYO.d.ts → index-BW1HVU7T.d.ts} +33 -5
- package/dist/index-BWe6haHU.d.ts +64 -0
- package/dist/{index-ChGFA5-n.d.ts → index-BvNXYn7u.d.ts} +4 -1
- package/dist/{index-D-y1ktn-.d.ts → index-CE09bLNb.d.ts} +5 -1
- package/dist/{index-bAud6rG2.d.ts → index-CU_lnxg7.d.ts} +13 -4
- package/dist/{index-Vj9ZzRh0.d.ts → index-DNsSKNUe.d.ts} +4 -1
- package/dist/{index-J1qdw9mL.d.ts → index-DjSGDESy.d.ts} +36 -2
- package/dist/{index-_Sl5wohy.d.ts → index-RP_rt8vB.d.ts} +1 -1
- package/dist/{index-Cp0aQngm.d.ts → index-T1sSoiWG.d.ts} +3 -1
- package/dist/{index-CtTNoYA2.d.ts → index-fsZE0vPs.d.ts} +12 -0
- package/dist/index.d.ts +14 -13
- package/dist/index.js +68 -63
- package/dist/{locale-provider-BLGya10h.d.ts → locale-provider-CAjVN3_0.d.ts} +6 -2
- package/dist/primitives/accordion.js +2 -2
- package/dist/primitives/alert-dialog.js +7 -2
- package/dist/primitives/autocomplete.js +5 -2
- package/dist/primitives/avatar.js +2 -2
- package/dist/primitives/button.js +2 -2
- package/dist/primitives/checkbox-group.js +3 -2
- package/dist/primitives/checkbox.js +3 -2
- package/dist/primitives/collapsible.js +4 -2
- package/dist/primitives/combobox.js +5 -2
- package/dist/primitives/context-menu.js +5 -2
- package/dist/primitives/csp-provider.js +1 -1
- package/dist/primitives/dialog.js +8 -2
- package/dist/primitives/direction-provider.js +2 -2
- package/dist/primitives/drawer.js +5 -2
- package/dist/primitives/field.js +3 -2
- package/dist/primitives/fieldset.js +2 -2
- package/dist/primitives/form.js +1 -1
- package/dist/primitives/input.js +3 -2
- package/dist/primitives/menu.js +5 -2
- package/dist/primitives/menubar.js +2 -2
- package/dist/primitives/meter.js +1 -1
- package/dist/primitives/navigation-menu.js +2 -2
- package/dist/primitives/number-field.js +2 -2
- package/dist/primitives/otp-field.js +3 -2
- package/dist/primitives/popover.js +2 -2
- package/dist/primitives/preview-card.js +2 -2
- package/dist/primitives/progress.js +2 -2
- package/dist/primitives/radio-group.js +3 -2
- package/dist/primitives/radio.js +3 -2
- package/dist/primitives/scroll-area.js +3 -2
- package/dist/primitives/select.js +4 -2
- package/dist/primitives/separator.js +3 -2
- package/dist/primitives/slider.js +3 -2
- package/dist/primitives/switch.js +3 -2
- package/dist/primitives/tabs.js +3 -2
- package/dist/primitives/toast.js +4 -2
- package/dist/primitives/toggle-group.js +2 -2
- package/dist/primitives/toggle.js +2 -2
- package/dist/primitives/toolbar.js +2 -2
- package/dist/primitives/tooltip.js +3 -2
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +70 -42
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +3 -3
- package/package.json +7 -3
- package/scripts/component-registry/discovery.ts +1 -0
- package/scripts/component-registry/metadata.ts +38 -0
- package/dist/chunks/DialogViewport-e1tqfisqexc7o9z8.js +0 -42
- package/dist/chunks/MenuBackdrop-ouznwyglg27bosoj.js +0 -73
- package/dist/chunks/index.parts-bq90erougcgrwlgk.js +0 -242
- package/dist/chunks/index.parts-cdxa6fwtp3lpkpp4.js +0 -11
- package/dist/chunks/index.parts-cl2xux9bjec6cibd.js +0 -44
- package/dist/chunks/index.parts-e9s1lqq3qa9l6ndm.js +0 -10
- package/dist/chunks/index.parts-eks3uafpskcxle6j.js +0 -99
- package/dist/chunks/index.parts-fbip2x29k5okvypg.js +0 -64
- package/dist/chunks/index.parts-fhza3s183grld7zq.js +0 -102
- package/dist/chunks/index.parts-hmx3qlh517ii56yi.js +0 -116
- package/dist/chunks/index.parts-i6gbeimeit8gzhvi.js +0 -10
- package/dist/chunks/index.parts-ioii4acz2bjrf6sb.js +0 -77
- package/dist/chunks/index.parts-jjup1zgnozoxi7ky.js +0 -140
- package/dist/chunks/index.parts-jpm6c0fe0gyky12m.js +0 -95
- package/dist/chunks/index.parts-moguar0t0u4aumou.js +0 -31
- package/dist/chunks/index.parts-mw0e646n3qp6v1qe.js +0 -73
- package/dist/chunks/index.parts-olcmo45gi8e1qma1.js +0 -10
- package/dist/chunks/popupStoreUtils-i0y57dvmcnqrh4pv.js +0 -444
- package/dist/chunks/radio-35dx7y6rjrezbjsp.js +0 -173
- package/dist/chunks/resolveValueLabel-hpmsash3ektitvnb.js +0 -123
- package/dist/chunks/useDismiss-me91ertzzz3gly12.js +0 -384
- package/dist/chunks/useFilteredItems-kw2za6m9bng7twr0.js +0 -181
- package/dist/chunks/useForcedRerendering-i3n4ms0xose8borh.js +0 -14
- package/dist/chunks/useId-f8w657f9yys10abm.js +0 -32
- package/dist/chunks/vendor-styling-da1xibnxfkjmtglr.js +0 -3631
|
@@ -0,0 +1,1645 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-hi7ti5xiuxsegr96.js";
|
|
3
|
+
import { c as NOOP, f as useMergedRefs, i as mergeProps, l as warn, n as useRenderElement, o as EMPTY_ARRAY, p as useRefWithInit, s as EMPTY_OBJECT, t as unwrapLazyRenderProp } from "./useRenderElement-nkklxbq1rp7h2kw0.js";
|
|
4
|
+
import { n as ReactStore, r as useStore } from "./FloatingRootStore-men6ufp3a2b296fh.js";
|
|
5
|
+
import { n as useIsoLayoutEffect } from "./safeReact-ek77ilng4ekk7mgz.js";
|
|
6
|
+
import { $ as getTarget, N as popupOpen$1, P as pressed$1, Q as contains, T as isTypeableElement, X as activeElement, at as stopEvent, f as getMaxListIndex, it as isVirtualPointerEvent, m as getNextListIndex, p as getMinListIndex, st as android, v as ownerDocument } from "./vendor-utils-io8z5lsfxq8m2dcc.js";
|
|
7
|
+
import { E as isHTMLElement, T as isElement, w as getWindow } from "./vendor-floating-ui-fqblx3wa0r71mjoo.js";
|
|
8
|
+
import { t as createChangeEventDetails } from "./createBaseUIEventDetails-nvee6bghv2reeqdb.js";
|
|
9
|
+
import { D as popupClose, S as listNavigation, b as keyboard, g as inputClear, h as inputChange, r as clearPress, u as focusOut, w as none } from "./reason-parts-hssx64rmlxyn6gw5.js";
|
|
10
|
+
import { t as useValueAsRef } from "./useValueAsRef-dv0tmfr1xlpzdlru.js";
|
|
11
|
+
import { t as useStableCallback } from "./useStableCallback-le5qgj6p9l04729n.js";
|
|
12
|
+
import { a as useEnhancedClickHandler } from "./useScrollLock-le7ajwlt7oh6fzxi.js";
|
|
13
|
+
import { t as BasePopupHandle } from "./popupHandle-dk3ixgc8flr7v971.js";
|
|
14
|
+
import { i as isMainOrientationToEndKey, n as isCrossOrientationOpenKey, r as isMainOrientationKey, t as isCrossOrientationCloseKey } from "./useListNavigation-hpddbd0cc9pvt461.js";
|
|
15
|
+
import { t as useBaseUiId } from "./useBaseUiId-nk4k7nj9h1cy76ny.js";
|
|
16
|
+
import { n as useDirection } from "./DirectionContext-kpby968j030psajn.js";
|
|
17
|
+
import { n as usePopupViewport, t as popupViewportStateMapping } from "./usePopupViewport-l6w01iohvzloghy8.js";
|
|
18
|
+
import { t as useControlled } from "./useControlled-i3srnkxy598s0au9.js";
|
|
19
|
+
import { r as dispatchClickWithModifiers, t as useButton } from "./useButton-lklvdzuhvj22bx07.js";
|
|
20
|
+
import { n as getFilter, t as useInitialLiveRegionTextMutation } from "./useInitialLiveRegionTextMutation-nl2hus7zx1h7ggno.js";
|
|
21
|
+
import { n as useCompositeListContext } from "./CompositeListContext-bejvmlu39hsfjzgu.js";
|
|
22
|
+
import { t as Separator } from "./Separator-fhwve0tfny3tht3a.js";
|
|
23
|
+
import { A as useMenuFilterImpl, C as MenuGroupLabel, D as MenuCheckboxItem, E as MenuCheckboxItemIndicator, F as useMenuRootContext, I as useMenuPositionerContext, S as MenuItem, T as MenuGroupPlain, _ as resolvePopupLabel, a as MenuRootInternal, b as useMenuSubmenuRootContext, c as createNullMenuStore, d as MenuRadioGroup, f as MenuRadioGroupPlain, g as MenuPopupPlain, h as MenuPopup, i as MenuRoot, j as useMenuFilterPart, k as MenuFilterImplContext, l as MenuRadioItemIndicator, m as MenuPortal, o as isKeyboardOpen, p as MenuPositioner, r as MenuSubmenuRoot, s as MenuFilterProviderContext, t as MenuSubmenuTrigger, u as MenuRadioItem, v as useRenderedId, w as MenuGroup, x as MenuLinkItem, y as MenuSubmenuRootContext } from "./MenuSubmenuTrigger-hm5xbgik6aq95x35.js";
|
|
24
|
+
import { f as MenuBackdrop, p as MenuArrow } from "./MenuSubmenuTriggerDataAttributes-gdfxdjymgmnaxdds.js";
|
|
25
|
+
import { n as useMenubarContext } from "./MenubarContext-ooz0h08i55c8oip5.js";
|
|
26
|
+
import { t as MenuTrigger } from "./MenuTrigger-dlfvicsaggss0o9m.js";
|
|
27
|
+
import * as React$1 from "react";
|
|
28
|
+
import { jsx } from "react/jsx-runtime";
|
|
29
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/viewport/MenuViewport.mjs
|
|
30
|
+
/**
|
|
31
|
+
* A viewport for displaying content transitions.
|
|
32
|
+
* This component is only required if one popup can be opened by multiple triggers, its content
|
|
33
|
+
* changes based on the trigger, and switching between them is animated.
|
|
34
|
+
* Renders a `<div>` element.
|
|
35
|
+
*
|
|
36
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
37
|
+
*/
|
|
38
|
+
const MenuViewport = /*#__PURE__*/ React$1.forwardRef(function MenuViewport(componentProps, forwardedRef) {
|
|
39
|
+
const { render, className, style, children, ...elementProps } = componentProps;
|
|
40
|
+
const { store } = useMenuRootContext();
|
|
41
|
+
const { side } = useMenuPositionerContext();
|
|
42
|
+
const instantType = store.useState("instantType");
|
|
43
|
+
const { children: childrenToRender, state: viewportState } = usePopupViewport({
|
|
44
|
+
store,
|
|
45
|
+
side,
|
|
46
|
+
children
|
|
47
|
+
});
|
|
48
|
+
const state = {
|
|
49
|
+
activationDirection: viewportState.activationDirection,
|
|
50
|
+
transitioning: viewportState.transitioning,
|
|
51
|
+
instant: instantType
|
|
52
|
+
};
|
|
53
|
+
return useRenderElement("div", componentProps, {
|
|
54
|
+
state,
|
|
55
|
+
ref: forwardedRef,
|
|
56
|
+
props: [elementProps, { children: childrenToRender }],
|
|
57
|
+
stateAttributesMapping: popupViewportStateMapping
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
MenuViewport.displayName = "MenuViewport";
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/store/MenuHandle.mjs
|
|
63
|
+
/**
|
|
64
|
+
* Controls a Menu imperatively and associates detached `Menu.Trigger` components with a `Menu.Root`.
|
|
65
|
+
* Create one with `Menu.createHandle()` and pass it to the `handle` prop of the root and of any
|
|
66
|
+
* triggers rendered outside of it.
|
|
67
|
+
*
|
|
68
|
+
* The imperative methods take effect only while a root using this handle is mounted; calls made
|
|
69
|
+
* before a root attaches (or after it unmounts) are ignored.
|
|
70
|
+
*/
|
|
71
|
+
var MenuHandle = class extends BasePopupHandle {
|
|
72
|
+
constructor() {
|
|
73
|
+
super(createNullMenuStore(), "Menu");
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Opens the menu and associates it with the trigger with the given id.
|
|
77
|
+
*
|
|
78
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
79
|
+
*
|
|
80
|
+
* @param triggerId ID of the trigger to associate with the menu. The trigger must be a matching
|
|
81
|
+
* `Menu.Trigger` with this handle passed as a prop.
|
|
82
|
+
*/
|
|
83
|
+
open(triggerId) {
|
|
84
|
+
this.openByTrigger(triggerId);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Closes the menu.
|
|
88
|
+
*
|
|
89
|
+
* This method should only be called in an event handler or an effect (not during rendering).
|
|
90
|
+
*/
|
|
91
|
+
close() {
|
|
92
|
+
this.closePopup();
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Whether the menu is currently open. Returns `false` while no root is attached to the handle.
|
|
96
|
+
*/
|
|
97
|
+
get isOpen() {
|
|
98
|
+
return this.attachedStore?.select("open") ?? false;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Creates a new handle to connect a Menu.Root with detached Menu.Trigger components.
|
|
103
|
+
*/
|
|
104
|
+
function createMenuHandle() {
|
|
105
|
+
return new MenuHandle();
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/internals/useItemRegistry.mjs
|
|
109
|
+
/**
|
|
110
|
+
* Collects item registrations into one immutable snapshot per React commit.
|
|
111
|
+
* Also returns the live registry for reads that must include the registrations of the current
|
|
112
|
+
* commit before its snapshot is published.
|
|
113
|
+
*/
|
|
114
|
+
function useItemRegistry() {
|
|
115
|
+
const itemRegistry = useRefWithInit(() => /* @__PURE__ */ new Map()).current;
|
|
116
|
+
const [registryVersion, setRegistryVersion] = React$1.useState(0);
|
|
117
|
+
const isUpdateScheduledRef = React$1.useRef(false);
|
|
118
|
+
const scheduleRegistryUpdate = useStableCallback(() => {
|
|
119
|
+
if (isUpdateScheduledRef.current) return;
|
|
120
|
+
isUpdateScheduledRef.current = true;
|
|
121
|
+
setRegistryVersion((version) => version + 1);
|
|
122
|
+
});
|
|
123
|
+
const registerItem = useStableCallback((key, item) => {
|
|
124
|
+
itemRegistry.set(key, item);
|
|
125
|
+
scheduleRegistryUpdate();
|
|
126
|
+
return () => {
|
|
127
|
+
itemRegistry.delete(key);
|
|
128
|
+
scheduleRegistryUpdate();
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
const registeredItems = React$1.useMemo(() => new Map(itemRegistry), [registryVersion]);
|
|
132
|
+
useIsoLayoutEffect(() => {
|
|
133
|
+
isUpdateScheduledRef.current = false;
|
|
134
|
+
}, [registryVersion]);
|
|
135
|
+
return {
|
|
136
|
+
items: registeredItems,
|
|
137
|
+
registerItem,
|
|
138
|
+
liveItems: itemRegistry
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/root/FilterDropdownRootContext.mjs
|
|
143
|
+
function throwMissingFilterRoot() {
|
|
144
|
+
throw new Error("Base UI: Filter parts are missing their filter context and cannot access the query or items. Wrap the component root in its filter provider.");
|
|
145
|
+
}
|
|
146
|
+
const FilterDropdownItemContext = /*#__PURE__*/ React$1.createContext(null);
|
|
147
|
+
FilterDropdownItemContext.displayName = "FilterDropdownItemContext";
|
|
148
|
+
function useFilterDropdownItemContext(optional = false) {
|
|
149
|
+
const context = React$1.useContext(FilterDropdownItemContext);
|
|
150
|
+
if (context === null && !optional) throwMissingFilterRoot();
|
|
151
|
+
return context;
|
|
152
|
+
}
|
|
153
|
+
const FilterDropdownRootContext = /*#__PURE__*/ React$1.createContext(null);
|
|
154
|
+
FilterDropdownRootContext.displayName = "FilterDropdownRootContext";
|
|
155
|
+
function useFilterDropdownRootContext(optional = false) {
|
|
156
|
+
const context = React$1.useContext(FilterDropdownRootContext);
|
|
157
|
+
if (context === null && !optional) throwMissingFilterRoot();
|
|
158
|
+
return context;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Finds the dropdown that owns the given item list, walking out through nested roots.
|
|
162
|
+
*/
|
|
163
|
+
function useFilterContextForList(listRef) {
|
|
164
|
+
let context = React$1.useContext(FilterDropdownItemContext);
|
|
165
|
+
if (listRef === null) return null;
|
|
166
|
+
while (context !== null && context.listRef !== listRef) context = context.parent;
|
|
167
|
+
return context;
|
|
168
|
+
}
|
|
169
|
+
const FilterDropdownValueContext = /*#__PURE__*/ React$1.createContext("");
|
|
170
|
+
FilterDropdownValueContext.displayName = "FilterDropdownValueContext";
|
|
171
|
+
function useFilterDropdownValueContext() {
|
|
172
|
+
return React$1.useContext(FilterDropdownValueContext);
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/store.mjs
|
|
176
|
+
const selectors = {
|
|
177
|
+
isEmpty: (state) => state.visibleItemIds === null ? state.registeredItemCount === 0 : state.visibleItemIds.size === 0,
|
|
178
|
+
isItemVisible: (state, id) => state.visibleItemIds === null || state.visibleItemIds.has(id)
|
|
179
|
+
};
|
|
180
|
+
var FilterDropdownStore = class extends ReactStore {
|
|
181
|
+
constructor() {
|
|
182
|
+
super({
|
|
183
|
+
visibleItemIds: null,
|
|
184
|
+
registeredItemCount: 0
|
|
185
|
+
}, EMPTY_OBJECT, selectors);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Stand-in for an item whose owning dropdown is absent, such as a filterable submenu's trigger
|
|
190
|
+
* inside a plain parent menu. Nothing registers and every item stays visible.
|
|
191
|
+
*/
|
|
192
|
+
const DETACHED_OWNER = {
|
|
193
|
+
registerItem: () => NOOP,
|
|
194
|
+
store: new FilterDropdownStore()
|
|
195
|
+
};
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/root/FilterDropdownRoot.mjs
|
|
198
|
+
/**
|
|
199
|
+
* Holds the filter query, matches it against the registered items, and publishes the result. The
|
|
200
|
+
* host owns list navigation; this root moves the highlight through `setActiveIndex`.
|
|
201
|
+
*
|
|
202
|
+
* @internal
|
|
203
|
+
*/
|
|
204
|
+
function FilterDropdownRoot(props) {
|
|
205
|
+
const { children, open, disabled = false, openedByKeyboard = false, locale, value, query, onValueChange, filter, autoHighlight = false, triggerId: triggerIdProp, listRef, getActiveIndex, setActiveIndex, focusOwnerRef: focusOwnerRefProp } = props;
|
|
206
|
+
const parentItemContext = React$1.useContext(FilterDropdownItemContext);
|
|
207
|
+
const [renderedListId, setRenderedListId] = React$1.useState(void 0);
|
|
208
|
+
const [inputFocusVisible, setInputFocusVisible] = React$1.useState(openedByKeyboard);
|
|
209
|
+
const [keyboardModality, setKeyboardModality] = React$1.useState(openedByKeyboard);
|
|
210
|
+
const [previousOpenedByKeyboard, setPreviousOpenedByKeyboard] = React$1.useState(openedByKeyboard);
|
|
211
|
+
if (openedByKeyboard !== previousOpenedByKeyboard) {
|
|
212
|
+
setPreviousOpenedByKeyboard(openedByKeyboard);
|
|
213
|
+
setInputFocusVisible(openedByKeyboard);
|
|
214
|
+
setKeyboardModality(openedByKeyboard);
|
|
215
|
+
}
|
|
216
|
+
const { items: registeredItems, registerItem: registerInRegistry, liveItems } = useItemRegistry();
|
|
217
|
+
const defaultId = useBaseUiId();
|
|
218
|
+
const store = useRefWithInit(() => new FilterDropdownStore()).current;
|
|
219
|
+
const registerItem = useStableCallback((id, item) => {
|
|
220
|
+
const unregister = registerInRegistry(id, item);
|
|
221
|
+
store.set("registeredItemCount", liveItems.size);
|
|
222
|
+
return () => {
|
|
223
|
+
unregister();
|
|
224
|
+
store.set("registeredItemCount", liveItems.size);
|
|
225
|
+
};
|
|
226
|
+
});
|
|
227
|
+
const fallbackFocusOwnerRef = React$1.useRef(null);
|
|
228
|
+
const lastFilterQueryRef = React$1.useRef(null);
|
|
229
|
+
const defaultMatchItem = React$1.useMemo(() => getFilter({ locale }).contains, [locale]);
|
|
230
|
+
const focusOwnerRef = focusOwnerRefProp ?? fallbackFocusOwnerRef;
|
|
231
|
+
const filterQuery = (query ?? value).trim();
|
|
232
|
+
const matchItem = filterQuery === "" || filter === null ? null : filter ?? defaultMatchItem;
|
|
233
|
+
const autoHighlightEnabled = open && (autoHighlight === "always" || autoHighlight && filterQuery !== "");
|
|
234
|
+
const defaultListId = defaultId ? `${defaultId}-list` : void 0;
|
|
235
|
+
const listId = (renderedListId ?? defaultListId) || void 0;
|
|
236
|
+
const triggerId = triggerIdProp || void 0;
|
|
237
|
+
const handleValueChange = useStableCallback((nextValue, eventDetails) => {
|
|
238
|
+
onValueChange?.(nextValue, eventDetails);
|
|
239
|
+
if (!eventDetails.isCanceled && !autoHighlight) setActiveIndex(null);
|
|
240
|
+
});
|
|
241
|
+
const handleItemsChange = useStableCallback((previousItems) => {
|
|
242
|
+
const items = listRef.current;
|
|
243
|
+
const activeIndex = getActiveIndex();
|
|
244
|
+
if (activeIndex != null && items[activeIndex] != null && items[activeIndex] === previousItems[activeIndex]) return;
|
|
245
|
+
setActiveIndex(autoHighlightEnabled && items.length > 0 ? 0 : null);
|
|
246
|
+
});
|
|
247
|
+
useIsoLayoutEffect(() => {
|
|
248
|
+
if (!open && query === void 0) return;
|
|
249
|
+
const queryChanged = lastFilterQueryRef.current !== null && lastFilterQueryRef.current !== filterQuery;
|
|
250
|
+
lastFilterQueryRef.current = filterQuery;
|
|
251
|
+
if (matchItem === null) {
|
|
252
|
+
store.set("visibleItemIds", null);
|
|
253
|
+
if (autoHighlightEnabled && liveItems.size > 0) {
|
|
254
|
+
if (queryChanged || getActiveIndex() == null) setActiveIndex(0);
|
|
255
|
+
} else if (filterQuery === "" && queryChanged) setActiveIndex(null);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
const currentIds = store.state.visibleItemIds;
|
|
259
|
+
if (currentIds === null && liveItems.size === 0) return;
|
|
260
|
+
const nextIds = /* @__PURE__ */ new Set();
|
|
261
|
+
let hasNewMatch = currentIds === null;
|
|
262
|
+
liveItems.forEach(({ getText }, id) => {
|
|
263
|
+
const text = getText();
|
|
264
|
+
if (text != null && matchItem(text, filterQuery)) {
|
|
265
|
+
nextIds.add(id);
|
|
266
|
+
hasNewMatch ||= !currentIds?.has(id);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
if (hasNewMatch || currentIds?.size !== nextIds.size) {
|
|
270
|
+
if (autoHighlightEnabled && nextIds.size > 0) setActiveIndex(0);
|
|
271
|
+
else if (currentIds !== null || queryChanged) setActiveIndex(null);
|
|
272
|
+
store.set("visibleItemIds", nextIds);
|
|
273
|
+
} else if (autoHighlightEnabled && queryChanged && nextIds.size > 0) setActiveIndex(0);
|
|
274
|
+
}, [
|
|
275
|
+
open,
|
|
276
|
+
query,
|
|
277
|
+
filterQuery,
|
|
278
|
+
registeredItems,
|
|
279
|
+
liveItems,
|
|
280
|
+
matchItem,
|
|
281
|
+
autoHighlightEnabled,
|
|
282
|
+
store,
|
|
283
|
+
setActiveIndex,
|
|
284
|
+
getActiveIndex
|
|
285
|
+
]);
|
|
286
|
+
const contextValue = React$1.useMemo(() => ({
|
|
287
|
+
open,
|
|
288
|
+
disabled,
|
|
289
|
+
inputFocusVisible,
|
|
290
|
+
setInputFocusVisible,
|
|
291
|
+
keyboardModality,
|
|
292
|
+
setKeyboardModality,
|
|
293
|
+
autoHighlight,
|
|
294
|
+
triggerId,
|
|
295
|
+
defaultListId,
|
|
296
|
+
listId,
|
|
297
|
+
setRenderedListId,
|
|
298
|
+
focusOwnerRef,
|
|
299
|
+
setActiveIndex,
|
|
300
|
+
onItemsChange: handleItemsChange,
|
|
301
|
+
onValueChange: handleValueChange
|
|
302
|
+
}), [
|
|
303
|
+
open,
|
|
304
|
+
disabled,
|
|
305
|
+
inputFocusVisible,
|
|
306
|
+
keyboardModality,
|
|
307
|
+
autoHighlight,
|
|
308
|
+
triggerId,
|
|
309
|
+
defaultListId,
|
|
310
|
+
listId,
|
|
311
|
+
focusOwnerRef,
|
|
312
|
+
setActiveIndex,
|
|
313
|
+
handleItemsChange,
|
|
314
|
+
handleValueChange
|
|
315
|
+
]);
|
|
316
|
+
const itemContextValue = React$1.useMemo(() => ({
|
|
317
|
+
parent: parentItemContext,
|
|
318
|
+
store,
|
|
319
|
+
registerItem,
|
|
320
|
+
listRef
|
|
321
|
+
}), [
|
|
322
|
+
parentItemContext,
|
|
323
|
+
store,
|
|
324
|
+
registerItem,
|
|
325
|
+
listRef
|
|
326
|
+
]);
|
|
327
|
+
return /*#__PURE__*/ jsx(FilterDropdownItemContext.Provider, {
|
|
328
|
+
value: itemContextValue,
|
|
329
|
+
children: /*#__PURE__*/ jsx(FilterDropdownRootContext.Provider, {
|
|
330
|
+
value: contextValue,
|
|
331
|
+
children: /*#__PURE__*/ jsx(FilterDropdownValueContext.Provider, {
|
|
332
|
+
value: query ?? value,
|
|
333
|
+
children
|
|
334
|
+
})
|
|
335
|
+
})
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/root/useFilterDropdownCloseQuery.mjs
|
|
340
|
+
/**
|
|
341
|
+
* Clears the committed value when a filter popup closes while retaining the displayed query and
|
|
342
|
+
* filtered items until the exit transition completes.
|
|
343
|
+
*/
|
|
344
|
+
function useFilterDropdownCloseQuery(parameters) {
|
|
345
|
+
const { open, mounted, value, onValueChange } = parameters;
|
|
346
|
+
const [closeQuery, setCloseQuery] = React$1.useState(null);
|
|
347
|
+
const previousOpenRef = React$1.useRef(open);
|
|
348
|
+
useIsoLayoutEffect(() => {
|
|
349
|
+
const wasOpen = previousOpenRef.current;
|
|
350
|
+
previousOpenRef.current = open;
|
|
351
|
+
if (wasOpen && !open && value !== "") {
|
|
352
|
+
setCloseQuery(value);
|
|
353
|
+
onValueChange("", createChangeEventDetails(popupClose));
|
|
354
|
+
} else if ((open || !mounted) && closeQuery !== null) setCloseQuery(null);
|
|
355
|
+
}, [
|
|
356
|
+
open,
|
|
357
|
+
mounted,
|
|
358
|
+
value,
|
|
359
|
+
closeQuery,
|
|
360
|
+
onValueChange
|
|
361
|
+
]);
|
|
362
|
+
return !open && closeQuery !== null ? closeQuery : value;
|
|
363
|
+
}
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/utils/refocusOwner.mjs
|
|
366
|
+
let refocusing = false;
|
|
367
|
+
/**
|
|
368
|
+
* Hands focus back to the input that owns it while the user keeps interacting: the pointer entered
|
|
369
|
+
* its popup, or the list replays a key that landed on it. Focus handlers that run during the call
|
|
370
|
+
* see `isRefocusingOwner()` and treat the move as a continuation rather than the user leaving.
|
|
371
|
+
* A module-level flag suffices because `focus()` dispatches its events synchronously, and it also
|
|
372
|
+
* reaches the handlers of enclosing popups that a nested input's focus event bubbles through.
|
|
373
|
+
*/
|
|
374
|
+
function refocusOwner(owner) {
|
|
375
|
+
refocusing = true;
|
|
376
|
+
try {
|
|
377
|
+
owner.focus({ preventScroll: true });
|
|
378
|
+
} finally {
|
|
379
|
+
refocusing = false;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function isRefocusingOwner() {
|
|
383
|
+
return refocusing;
|
|
384
|
+
}
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/useMenuFilterPopup.mjs
|
|
387
|
+
function useMenuFilterPopup(orientation) {
|
|
388
|
+
const context = useFilterDropdownRootContext();
|
|
389
|
+
const direction = useDirection();
|
|
390
|
+
const { focusOwnerRef } = context;
|
|
391
|
+
const nestedFocusRef = React$1.useRef(null);
|
|
392
|
+
const pointerTypeRef = React$1.useRef("mouse");
|
|
393
|
+
function trackPointerType(event) {
|
|
394
|
+
pointerTypeRef.current = event.pointerType || "mouse";
|
|
395
|
+
}
|
|
396
|
+
React$1.useEffect(() => {
|
|
397
|
+
if (context.open && focusOwnerRef.current === null) warn("A filterable menu opened without a <Menu.Input>. Render the input inside <Menu.Popup>, or drop <Menu.FilterProvider> for a menu that does not filter.");
|
|
398
|
+
}, [context.open, focusOwnerRef]);
|
|
399
|
+
function restoreInputFocus(event, enteredTrigger) {
|
|
400
|
+
const focusOwner = focusOwnerRef.current;
|
|
401
|
+
if (!context.open || !focusOwner) return;
|
|
402
|
+
const activeEl = activeElement(ownerDocument(event.currentTarget));
|
|
403
|
+
if (activeEl === focusOwner || contains(event.currentTarget, activeEl)) return;
|
|
404
|
+
let submenuTrigger = null;
|
|
405
|
+
if (event.nativeEvent.composedPath().find((node) => {
|
|
406
|
+
if (!isHTMLElement(node)) return false;
|
|
407
|
+
if (node.getAttribute("role") === "dialog" || node.hasAttribute("data-rootownerid")) return true;
|
|
408
|
+
if (node.hasAttribute("aria-haspopup")) submenuTrigger = node;
|
|
409
|
+
return false;
|
|
410
|
+
}) !== event.currentTarget) return;
|
|
411
|
+
if (nestedFocusRef.current && !(enteredTrigger && submenuTrigger)) return;
|
|
412
|
+
if (enteredTrigger && submenuTrigger && isElement(event.relatedTarget) && contains(submenuTrigger, event.relatedTarget)) return;
|
|
413
|
+
refocusOwner(focusOwner);
|
|
414
|
+
}
|
|
415
|
+
return {
|
|
416
|
+
"aria-activedescendant": void 0,
|
|
417
|
+
"aria-orientation": void 0,
|
|
418
|
+
onMouseDown(event) {
|
|
419
|
+
if (getTarget(event.nativeEvent) === event.currentTarget) event.preventDefault();
|
|
420
|
+
},
|
|
421
|
+
onPointerDown: trackPointerType,
|
|
422
|
+
onPointerOver: trackPointerType,
|
|
423
|
+
onPointerMove: trackPointerType,
|
|
424
|
+
onMouseMove(event) {
|
|
425
|
+
if (pointerTypeRef.current === "mouse") restoreInputFocus(event, false);
|
|
426
|
+
},
|
|
427
|
+
onMouseOver(event) {
|
|
428
|
+
if (pointerTypeRef.current === "mouse" && nestedFocusRef.current) restoreInputFocus(event, true);
|
|
429
|
+
},
|
|
430
|
+
onFocus(event) {
|
|
431
|
+
const target = getTarget(event.nativeEvent);
|
|
432
|
+
if (target === focusOwnerRef.current) nestedFocusRef.current = null;
|
|
433
|
+
else if (isHTMLElement(target) && !contains(event.currentTarget, target) && !isRefocusingOwner()) nestedFocusRef.current = target;
|
|
434
|
+
if (context.open && target === event.currentTarget) focusOwnerRef.current?.focus({ preventScroll: true });
|
|
435
|
+
},
|
|
436
|
+
onKeyDown(event) {
|
|
437
|
+
const target = getTarget(event.nativeEvent);
|
|
438
|
+
if (target === focusOwnerRef.current || isTypeableElement(target)) return;
|
|
439
|
+
if (isCrossOrientationCloseKey(event.key, orientation, direction === "rtl", false)) {
|
|
440
|
+
focusOwnerRef.current?.focus({ preventScroll: true });
|
|
441
|
+
event.stopPropagation();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/MenuFilterPopup.mjs
|
|
448
|
+
/**
|
|
449
|
+
* A container for the filter input and item list.
|
|
450
|
+
* Renders a `<div>` element with a `dialog` role.
|
|
451
|
+
*/
|
|
452
|
+
const MenuFilterPopup = /*#__PURE__*/ React$1.forwardRef(function MenuFilterPopup(props, forwardedRef) {
|
|
453
|
+
const { store, orientation } = useMenuRootContext();
|
|
454
|
+
const open = store.useState("open");
|
|
455
|
+
const parent = store.useState("parent");
|
|
456
|
+
const openMethod = store.useState("openMethod");
|
|
457
|
+
const lastOpenChangeReason = store.useState("lastOpenChangeReason");
|
|
458
|
+
const interactionProps = useMenuFilterPopup(orientation);
|
|
459
|
+
const openedByHover = open && lastOpenChangeReason === "trigger-hover";
|
|
460
|
+
const mayFocusInput = parent.type !== "menu" || open && (openMethod === "keyboard" || lastOpenChangeReason === "list-navigation" || lastOpenChangeReason === "trigger-hover" || lastOpenChangeReason === "trigger-press");
|
|
461
|
+
let initialFocus = false;
|
|
462
|
+
if (mayFocusInput) initialFocus = () => {
|
|
463
|
+
const touchOpen = (openMethod === "touch" || openMethod === "pen") && !store.context.virtualPress;
|
|
464
|
+
if (openedByHover || touchOpen) return false;
|
|
465
|
+
return store.context.virtualFocusRef?.current ?? false;
|
|
466
|
+
};
|
|
467
|
+
const popupProps = mergeProps(interactionProps, props);
|
|
468
|
+
return /*#__PURE__*/ jsx(MenuPopupPlain, {
|
|
469
|
+
...popupProps,
|
|
470
|
+
role: "dialog",
|
|
471
|
+
initialFocus,
|
|
472
|
+
ref: forwardedRef
|
|
473
|
+
});
|
|
474
|
+
});
|
|
475
|
+
MenuFilterPopup.displayName = "MenuFilterPopup";
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/group/FilterDropdownGroupContext.mjs
|
|
478
|
+
const FilterDropdownGroupContext = /*#__PURE__*/ React$1.createContext(null);
|
|
479
|
+
FilterDropdownGroupContext.displayName = "FilterDropdownGroupContext";
|
|
480
|
+
function useFilterDropdownGroupContext() {
|
|
481
|
+
return React$1.useContext(FilterDropdownGroupContext);
|
|
482
|
+
}
|
|
483
|
+
//#endregion
|
|
484
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/list/FilterDropdownList.mjs
|
|
485
|
+
/**
|
|
486
|
+
* @internal
|
|
487
|
+
*/
|
|
488
|
+
const FilterDropdownList = /*#__PURE__*/ React$1.forwardRef(function FilterDropdownList(componentProps, forwardedRef) {
|
|
489
|
+
const { render, className, style, id: idProp, ...elementProps } = componentProps;
|
|
490
|
+
const context = useFilterDropdownRootContext();
|
|
491
|
+
const [id, registerIdRef] = useRenderedId(componentProps, context.defaultListId, context.setRenderedListId);
|
|
492
|
+
return useRenderElement("div", componentProps, {
|
|
493
|
+
ref: [forwardedRef, registerIdRef],
|
|
494
|
+
props: [
|
|
495
|
+
{
|
|
496
|
+
tabIndex: -1,
|
|
497
|
+
id,
|
|
498
|
+
onFocus(event) {
|
|
499
|
+
const owner = context.focusOwnerRef.current;
|
|
500
|
+
if (owner && event.relatedTarget === owner && getTarget(event.nativeEvent) === event.currentTarget) refocusOwner(owner);
|
|
501
|
+
},
|
|
502
|
+
onPointerMove() {
|
|
503
|
+
context.setKeyboardModality(false);
|
|
504
|
+
},
|
|
505
|
+
onPointerDown() {
|
|
506
|
+
context.setKeyboardModality(false);
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
elementProps,
|
|
510
|
+
{ children: /*#__PURE__*/ jsx(FilterDropdownGroupContext.Provider, {
|
|
511
|
+
value: null,
|
|
512
|
+
children: elementProps.children
|
|
513
|
+
}) }
|
|
514
|
+
]
|
|
515
|
+
});
|
|
516
|
+
});
|
|
517
|
+
FilterDropdownList.displayName = "FilterDropdownList";
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/useMenuFilterKeyDown.mjs
|
|
520
|
+
/**
|
|
521
|
+
* Decides what a key does while the filter input owns the keyboard.
|
|
522
|
+
*/
|
|
523
|
+
function getMenuFilterKeyAction(event, context) {
|
|
524
|
+
const { orientation, rtl, hasActiveItem, activeItemOpensSubmenu, hasValue } = context;
|
|
525
|
+
const { key } = event;
|
|
526
|
+
if (event.which === 229) return "ignore";
|
|
527
|
+
if (key === "Tab") return event.shiftKey ? "close" : "ignore";
|
|
528
|
+
if (key === "Enter") return hasActiveItem ? "activate" : "navigate";
|
|
529
|
+
const isArrow = key.startsWith("Arrow");
|
|
530
|
+
const isBoundary = key === "Home" || key === "End";
|
|
531
|
+
if (event.shiftKey || event.ctrlKey || event.altKey || event.metaKey) return isArrow || isBoundary || key.length === 1 ? "edit" : "navigate";
|
|
532
|
+
if (key.length === 1) return "edit";
|
|
533
|
+
if (isBoundary) return hasActiveItem && !hasValue ? "navigate" : "edit";
|
|
534
|
+
if (!isArrow) return "navigate";
|
|
535
|
+
if (isMainOrientationKey(key, orientation)) return orientation === "horizontal" && !hasActiveItem && hasValue ? "edit" : "navigate";
|
|
536
|
+
if (activeItemOpensSubmenu && (isCrossOrientationOpenKey(key, orientation, rtl) || isCrossOrientationCloseKey(key, orientation, rtl, false))) return "submenu";
|
|
537
|
+
if (orientation === "horizontal" && !hasActiveItem) return "enter-list";
|
|
538
|
+
return hasValue ? "edit" : "navigate";
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Routes keys for a filterable menu's input, which holds real focus while the list is navigated
|
|
542
|
+
* with `aria-activedescendant`. Keys reaching the input, and those an item that received real
|
|
543
|
+
* focus from assistive technology hands back, go through here; the trigger relays only the
|
|
544
|
+
* vertical arrows while the popup is open. Navigation runs the menu's own `useListNavigation`
|
|
545
|
+
* handler directly.
|
|
546
|
+
*/
|
|
547
|
+
function useMenuFilterKeyDown(hasValue) {
|
|
548
|
+
const { orientation, store } = useMenuRootContext();
|
|
549
|
+
const submenuContext = useMenuSubmenuRootContext();
|
|
550
|
+
const direction = useDirection();
|
|
551
|
+
return useStableCallback((event) => {
|
|
552
|
+
if (!store.select("open")) return;
|
|
553
|
+
const activeItem = store.state.highlightedItem;
|
|
554
|
+
switch (getMenuFilterKeyAction(event, {
|
|
555
|
+
orientation,
|
|
556
|
+
rtl: direction === "rtl",
|
|
557
|
+
hasActiveItem: activeItem != null,
|
|
558
|
+
activeItemOpensSubmenu: activeItem?.hasAttribute("aria-haspopup") ?? false,
|
|
559
|
+
hasValue
|
|
560
|
+
})) {
|
|
561
|
+
case "edit":
|
|
562
|
+
event.stopPropagation();
|
|
563
|
+
if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) store.state.inputProps.onKeyDown?.(event);
|
|
564
|
+
break;
|
|
565
|
+
case "navigate":
|
|
566
|
+
if (isMainOrientationKey(event.key, orientation)) event.stopPropagation();
|
|
567
|
+
store.state.inputProps.onKeyDown?.(event);
|
|
568
|
+
break;
|
|
569
|
+
case "enter-list": {
|
|
570
|
+
event.stopPropagation();
|
|
571
|
+
const listRef = store.context.itemDomElements;
|
|
572
|
+
const index = event.key === "ArrowDown" ? getMinListIndex(listRef, EMPTY_ARRAY) : getMaxListIndex(listRef, EMPTY_ARRAY);
|
|
573
|
+
if (listRef.current[index]) {
|
|
574
|
+
event.preventDefault();
|
|
575
|
+
store.setActiveIndex(index, keyboard, event.nativeEvent);
|
|
576
|
+
}
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
case "submenu": {
|
|
580
|
+
stopEvent(event);
|
|
581
|
+
const KeyboardEventConstructor = getWindow(activeItem).KeyboardEvent;
|
|
582
|
+
activeItem.dispatchEvent(new KeyboardEventConstructor(event.type, event.nativeEvent));
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
585
|
+
case "activate":
|
|
586
|
+
event.preventDefault();
|
|
587
|
+
dispatchClickWithModifiers(activeItem, event);
|
|
588
|
+
break;
|
|
589
|
+
case "close": {
|
|
590
|
+
stopEvent(event);
|
|
591
|
+
const returnElement = store.state.parent.type === "menu" && submenuContext?.getReturnElement?.() || store.state.activeTriggerElement;
|
|
592
|
+
const details = createChangeEventDetails(focusOut, event.nativeEvent);
|
|
593
|
+
store.setOpen(false, details);
|
|
594
|
+
if (!details.isCanceled && isHTMLElement(returnElement)) returnElement.focus();
|
|
595
|
+
break;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/moveHighlightFrom.mjs
|
|
602
|
+
/**
|
|
603
|
+
* Moves a menu's highlight from `item` one step in the direction of a main-orientation arrow key,
|
|
604
|
+
* with the same step as the menu's own list navigation, and returns the newly highlighted item.
|
|
605
|
+
* A step that would leave a menu whose navigation escapes to its input keeps the highlight.
|
|
606
|
+
*/
|
|
607
|
+
function moveHighlightFrom(store, item, event, options) {
|
|
608
|
+
const { orientation, rtl, loopFocus, allowEscape } = options;
|
|
609
|
+
const listRef = store.context.itemDomElements;
|
|
610
|
+
const items = listRef.current;
|
|
611
|
+
const { index } = getNextListIndex(items, items.indexOf(item), {
|
|
612
|
+
decrement: !isMainOrientationToEndKey(event.key, orientation, rtl),
|
|
613
|
+
loopFocus,
|
|
614
|
+
allowEscape,
|
|
615
|
+
disabledIndices: EMPTY_ARRAY,
|
|
616
|
+
minIndex: getMinListIndex(listRef, EMPTY_ARRAY),
|
|
617
|
+
maxIndex: getMaxListIndex(listRef, EMPTY_ARRAY)
|
|
618
|
+
});
|
|
619
|
+
const next = items[index];
|
|
620
|
+
if (next) {
|
|
621
|
+
store.setActiveIndex(index, keyboard, event.nativeEvent);
|
|
622
|
+
next.scrollIntoView?.({
|
|
623
|
+
block: "nearest",
|
|
624
|
+
inline: "nearest"
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
return next ?? void 0;
|
|
628
|
+
}
|
|
629
|
+
//#endregion
|
|
630
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/MenuFilterList.mjs
|
|
631
|
+
/**
|
|
632
|
+
* The list of a filterable menu: it takes the `menu` role while the popup is a dialog holding
|
|
633
|
+
* the input, and it forwards keys that land on it to the input.
|
|
634
|
+
*/
|
|
635
|
+
const MenuFilterList = /*#__PURE__*/ React$1.forwardRef(function MenuFilterList(componentProps, forwardedRef) {
|
|
636
|
+
const { store, orientation, loopFocus, allowEscape } = useMenuRootContext();
|
|
637
|
+
const direction = useDirection();
|
|
638
|
+
const { onItemsChange, focusOwnerRef, triggerId } = useFilterDropdownRootContext();
|
|
639
|
+
const { listRef } = useFilterDropdownItemContext();
|
|
640
|
+
const { subscribeMapChange } = useCompositeListContext();
|
|
641
|
+
const handleInputKeyDown = useMenuFilterKeyDown(useFilterDropdownValueContext() !== "");
|
|
642
|
+
const handleKeyDown = useStableCallback((event) => {
|
|
643
|
+
const owner = focusOwnerRef.current;
|
|
644
|
+
const target = getTarget(event.nativeEvent);
|
|
645
|
+
const ownerFocused = owner != null && activeElement(ownerDocument(owner)) === owner;
|
|
646
|
+
const fromNestedPopup = !contains(event.currentTarget, target);
|
|
647
|
+
if (owner == null || ownerFocused || fromNestedPopup) {
|
|
648
|
+
if (event.which !== 229 && !event.shiftKey && !event.ctrlKey && !event.metaKey && !event.altKey && isMainOrientationKey(event.key, orientation)) {
|
|
649
|
+
event.stopPropagation();
|
|
650
|
+
const trigger = fromNestedPopup && ownerFocused ? getNestedPopupTrigger(target) : void 0;
|
|
651
|
+
if (trigger) moveHighlightFrom(store, trigger, event, {
|
|
652
|
+
orientation,
|
|
653
|
+
rtl: direction === "rtl",
|
|
654
|
+
loopFocus,
|
|
655
|
+
allowEscape
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
if (event.defaultPrevented) return;
|
|
661
|
+
refocusOwner(owner);
|
|
662
|
+
handleInputKeyDown(event);
|
|
663
|
+
});
|
|
664
|
+
function getNestedPopupTrigger(target) {
|
|
665
|
+
const root = target.getRootNode();
|
|
666
|
+
return listRef.current.find((item) => {
|
|
667
|
+
const popupId = item?.getAttribute("aria-controls");
|
|
668
|
+
return popupId != null && isHTMLElement(item) && contains(root.getElementById(popupId), target);
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
const previousItemsRef = React$1.useRef(null);
|
|
672
|
+
const handleItemMapChange = useStableCallback(() => {
|
|
673
|
+
const items = [...listRef.current];
|
|
674
|
+
const previousItems = previousItemsRef.current;
|
|
675
|
+
if ((previousItems === null || previousItems.length !== items.length || items.some((item, index) => item !== previousItems[index])) && previousItems !== null) onItemsChange(previousItems);
|
|
676
|
+
previousItemsRef.current = items;
|
|
677
|
+
});
|
|
678
|
+
useIsoLayoutEffect(() => {
|
|
679
|
+
return subscribeMapChange(handleItemMapChange);
|
|
680
|
+
}, [subscribeMapChange, handleItemMapChange]);
|
|
681
|
+
const ariaLabelledBy = resolvePopupLabel(componentProps, null, triggerId ?? null);
|
|
682
|
+
const listProps = mergeProps({
|
|
683
|
+
role: "menu",
|
|
684
|
+
"aria-labelledby": ariaLabelledBy,
|
|
685
|
+
"aria-orientation": orientation === "horizontal" ? "horizontal" : void 0,
|
|
686
|
+
onKeyDown: handleKeyDown
|
|
687
|
+
}, componentProps);
|
|
688
|
+
return /*#__PURE__*/ jsx(FilterDropdownList, {
|
|
689
|
+
...listProps,
|
|
690
|
+
ref: forwardedRef
|
|
691
|
+
});
|
|
692
|
+
});
|
|
693
|
+
MenuFilterList.displayName = "MenuFilterList";
|
|
694
|
+
//#endregion
|
|
695
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/group/useFilterDropdownGroup.mjs
|
|
696
|
+
function isGroupHidden(state, items) {
|
|
697
|
+
if (state.visibleItemIds === null || items.size === 0) return false;
|
|
698
|
+
for (const [id, retained] of items) if (retained || state.visibleItemIds.has(id)) return false;
|
|
699
|
+
return true;
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Tracks which items belong to a group and hides the group once none of them match.
|
|
703
|
+
*
|
|
704
|
+
* @internal
|
|
705
|
+
*/
|
|
706
|
+
function useFilterDropdownGroup() {
|
|
707
|
+
const { store } = useFilterDropdownItemContext();
|
|
708
|
+
const parentContext = useFilterDropdownGroupContext();
|
|
709
|
+
const { items, registerItem } = useItemRegistry();
|
|
710
|
+
const hidden = useStore(store, isGroupHidden, items);
|
|
711
|
+
const groupId = useRefWithInit(() => Symbol("filter-dropdown-group")).current;
|
|
712
|
+
const registerInParent = parentContext?.registerItem;
|
|
713
|
+
useIsoLayoutEffect(() => registerInParent?.(groupId, !hidden), [
|
|
714
|
+
registerInParent,
|
|
715
|
+
groupId,
|
|
716
|
+
hidden
|
|
717
|
+
]);
|
|
718
|
+
return {
|
|
719
|
+
hidden,
|
|
720
|
+
context: React$1.useMemo(() => ({ registerItem }), [registerItem])
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
//#endregion
|
|
724
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/MenuFilterGroup.mjs
|
|
725
|
+
/**
|
|
726
|
+
* `Menu.Group` in a filterable menu: hidden, label included, once the query filters out all of
|
|
727
|
+
* its items.
|
|
728
|
+
*
|
|
729
|
+
* @internal
|
|
730
|
+
*/
|
|
731
|
+
const MenuFilterGroup = /*#__PURE__*/ React$1.forwardRef(function MenuFilterGroup(props, forwardedRef) {
|
|
732
|
+
const { hidden, context } = useFilterDropdownGroup();
|
|
733
|
+
return /*#__PURE__*/ jsx(FilterDropdownGroupContext.Provider, {
|
|
734
|
+
value: context,
|
|
735
|
+
children: /*#__PURE__*/ jsx(MenuGroupPlain, {
|
|
736
|
+
...props,
|
|
737
|
+
hidden: hidden || props.hidden || void 0,
|
|
738
|
+
ref: forwardedRef
|
|
739
|
+
})
|
|
740
|
+
});
|
|
741
|
+
});
|
|
742
|
+
MenuFilterGroup.displayName = "MenuFilterGroup";
|
|
743
|
+
const MenuFilterRadioGroup = /*#__PURE__*/ React$1.forwardRef(function MenuFilterRadioGroup(props, forwardedRef) {
|
|
744
|
+
const { hidden, context } = useFilterDropdownGroup();
|
|
745
|
+
return /*#__PURE__*/ jsx(FilterDropdownGroupContext.Provider, {
|
|
746
|
+
value: context,
|
|
747
|
+
children: /*#__PURE__*/ jsx(MenuRadioGroupPlain, {
|
|
748
|
+
...props,
|
|
749
|
+
hidden: hidden || props.hidden || void 0,
|
|
750
|
+
ref: forwardedRef
|
|
751
|
+
})
|
|
752
|
+
});
|
|
753
|
+
});
|
|
754
|
+
MenuFilterRadioGroup.displayName = "MenuFilterRadioGroup";
|
|
755
|
+
//#endregion
|
|
756
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/item/useFilterDropdownItem.mjs
|
|
757
|
+
/** Text of the rendered children, for when the element is filtered out and has no DOM node. */
|
|
758
|
+
function childrenText(children) {
|
|
759
|
+
if (typeof children === "string" || typeof children === "number") return String(children);
|
|
760
|
+
if (Array.isArray(children)) return children.map(childrenText).join("");
|
|
761
|
+
if (/*#__PURE__*/ React$1.isValidElement(children)) return childrenText(children.props.children);
|
|
762
|
+
return "";
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Registers an item with the enclosing filter root and reports whether the query keeps it.
|
|
766
|
+
*
|
|
767
|
+
* The item renders once before it is registered so its rendered text can be read and cached: a
|
|
768
|
+
* popup can open with a query that already excludes the item, and a hidden item has no text left
|
|
769
|
+
* to match against.
|
|
770
|
+
*
|
|
771
|
+
* @internal
|
|
772
|
+
*/
|
|
773
|
+
function useFilterDropdownItem(params) {
|
|
774
|
+
const { label, retainGroup = false, children, render, context } = params;
|
|
775
|
+
const nearestContext = useFilterDropdownItemContext(context !== void 0);
|
|
776
|
+
const groupContext = useFilterDropdownGroupContext();
|
|
777
|
+
const { registerItem, store } = (context === void 0 ? nearestContext : context) ?? DETACHED_OWNER;
|
|
778
|
+
const registerGroupItem = groupContext?.registerItem;
|
|
779
|
+
const itemId = useRefWithInit(() => Symbol("filter-dropdown-item")).current;
|
|
780
|
+
const ref = React$1.useRef(null);
|
|
781
|
+
const registeredTextRef = React$1.useRef(void 0);
|
|
782
|
+
const matched = useStore(store, selectors.isItemVisible, itemId);
|
|
783
|
+
const [registered, setRegistered] = React$1.useState(matched);
|
|
784
|
+
const childrenRef = useValueAsRef(children);
|
|
785
|
+
const renderRef = useValueAsRef(render);
|
|
786
|
+
const childrenTextRef = React$1.useRef(void 0);
|
|
787
|
+
const resolveText = React$1.useCallback(() => {
|
|
788
|
+
if (label != null) return label;
|
|
789
|
+
const fromChildren = childrenText(childrenRef.current ?? unwrapLazyRenderProp(renderRef.current));
|
|
790
|
+
const previousChildrenText = childrenTextRef.current;
|
|
791
|
+
childrenTextRef.current = fromChildren;
|
|
792
|
+
if (ref.current !== null) return ref.current.textContent ?? "";
|
|
793
|
+
if (registeredTextRef.current !== void 0 && fromChildren === previousChildrenText) return registeredTextRef.current;
|
|
794
|
+
return fromChildren;
|
|
795
|
+
}, [
|
|
796
|
+
label,
|
|
797
|
+
childrenRef,
|
|
798
|
+
renderRef
|
|
799
|
+
]);
|
|
800
|
+
const register = React$1.useCallback((resolvedText) => {
|
|
801
|
+
const text = resolvedText ?? resolveText();
|
|
802
|
+
if (text) registeredTextRef.current = text;
|
|
803
|
+
return registerItem(itemId, { getText() {
|
|
804
|
+
if (label == null && ref.current) registeredTextRef.current = ref.current.textContent ?? "";
|
|
805
|
+
return registeredTextRef.current;
|
|
806
|
+
} });
|
|
807
|
+
}, [
|
|
808
|
+
itemId,
|
|
809
|
+
label,
|
|
810
|
+
registerItem,
|
|
811
|
+
resolveText
|
|
812
|
+
]);
|
|
813
|
+
useIsoLayoutEffect(() => {
|
|
814
|
+
const unregister = register();
|
|
815
|
+
setRegistered(true);
|
|
816
|
+
return unregister;
|
|
817
|
+
}, [register]);
|
|
818
|
+
useIsoLayoutEffect(() => registerGroupItem?.(itemId, retainGroup), [
|
|
819
|
+
registerGroupItem,
|
|
820
|
+
itemId,
|
|
821
|
+
retainGroup
|
|
822
|
+
]);
|
|
823
|
+
useIsoLayoutEffect(() => {
|
|
824
|
+
const text = resolveText();
|
|
825
|
+
if (text !== registeredTextRef.current) {
|
|
826
|
+
registeredTextRef.current = text;
|
|
827
|
+
register(text);
|
|
828
|
+
}
|
|
829
|
+
}, [
|
|
830
|
+
register,
|
|
831
|
+
resolveText,
|
|
832
|
+
children,
|
|
833
|
+
render,
|
|
834
|
+
label
|
|
835
|
+
]);
|
|
836
|
+
return {
|
|
837
|
+
visible: !registered || matched,
|
|
838
|
+
ref
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
//#endregion
|
|
842
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/useMenuFilterSubmenuTrigger.mjs
|
|
843
|
+
/**
|
|
844
|
+
* Registers a submenu trigger with the parent menu's filter and adapts it to a filterable
|
|
845
|
+
* submenu: the trigger lives inside its own submenu root, but it is an item of the parent list.
|
|
846
|
+
*/
|
|
847
|
+
function useMenuFilterSubmenuTrigger(params) {
|
|
848
|
+
const { store, virtualFocus } = useMenuRootContext();
|
|
849
|
+
const open = store.useState("open");
|
|
850
|
+
const mounted = store.useState("mounted");
|
|
851
|
+
const parent = store.useState("parent");
|
|
852
|
+
const parentContext = useFilterContextForList(parent.type === "menu" ? parent.store.context.itemDomElements : null);
|
|
853
|
+
const { visible, ref } = useFilterDropdownItem({
|
|
854
|
+
...params,
|
|
855
|
+
context: parentContext,
|
|
856
|
+
retainGroup: mounted
|
|
857
|
+
});
|
|
858
|
+
useIsoLayoutEffect(() => {
|
|
859
|
+
if (visible || !open) return;
|
|
860
|
+
store.setOpen(false, createChangeEventDetails(none));
|
|
861
|
+
}, [
|
|
862
|
+
visible,
|
|
863
|
+
open,
|
|
864
|
+
store
|
|
865
|
+
]);
|
|
866
|
+
const clickProps = useEnhancedClickHandler((event, interactionType) => {
|
|
867
|
+
if (event.type === "click" && store.select("open") && (interactionType === "keyboard" || interactionType === "mouse" && store.select("lastOpenChangeReason") === "trigger-press")) store.context.virtualFocusRef?.current?.focus({ preventScroll: true });
|
|
868
|
+
});
|
|
869
|
+
const props = {
|
|
870
|
+
...virtualFocus ? { "aria-haspopup": "dialog" } : void 0,
|
|
871
|
+
...clickProps,
|
|
872
|
+
onPointerDown(event) {
|
|
873
|
+
clickProps.onPointerDown(event);
|
|
874
|
+
store.context.virtualPress = isVirtualPointerEvent(event.nativeEvent);
|
|
875
|
+
},
|
|
876
|
+
onFocus(event) {
|
|
877
|
+
const focusOwner = store.context.virtualFocusRef?.current;
|
|
878
|
+
if (focusOwner && store.select("open") && event.relatedTarget === focusOwner) {
|
|
879
|
+
event.preventBaseUIHandler();
|
|
880
|
+
focusOwner.focus({ preventScroll: true });
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
if (parentContext === null) return {
|
|
885
|
+
visible: true,
|
|
886
|
+
ref: null,
|
|
887
|
+
props
|
|
888
|
+
};
|
|
889
|
+
return {
|
|
890
|
+
visible: visible || mounted,
|
|
891
|
+
ref,
|
|
892
|
+
props
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
//#endregion
|
|
896
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/useVirtualFocusParentHandoff.mjs
|
|
897
|
+
/**
|
|
898
|
+
* A plain submenu whose parent is filterable. The parent keeps real focus on its input, so its
|
|
899
|
+
* trigger never blurs and its return focus waits for this popup's exit animation. The submenu
|
|
900
|
+
* hands focus and the parent's highlight back itself.
|
|
901
|
+
*/
|
|
902
|
+
function useVirtualFocusParentHandoff(store, parent, open, virtualFocus) {
|
|
903
|
+
const parentStore = parent.type === "menu" ? parent.store : null;
|
|
904
|
+
const parentVirtualFocusRef = parentStore?.context.virtualFocusRef;
|
|
905
|
+
const returnToParent = useStableCallback((trigger, reason) => {
|
|
906
|
+
const focusOwner = parentVirtualFocusRef?.current;
|
|
907
|
+
if (virtualFocus || store.select("open") || !parentStore?.select("open") || !focusOwner) return;
|
|
908
|
+
if (contains(store.context.popupRef.current, activeElement(ownerDocument(focusOwner)))) focusOwner.focus({ preventScroll: true });
|
|
909
|
+
if ((reason === "list-navigation" || reason === "escape-key") && parentStore.state.activeIndex == null) parentStore.highlightItem(trigger, none);
|
|
910
|
+
});
|
|
911
|
+
useIsoLayoutEffect(() => {
|
|
912
|
+
if (!open) {
|
|
913
|
+
const trigger = store.state.activeTriggerElement;
|
|
914
|
+
const reason = store.select("lastOpenChangeReason");
|
|
915
|
+
queueMicrotask(() => returnToParent(trigger, reason));
|
|
916
|
+
}
|
|
917
|
+
}, [
|
|
918
|
+
open,
|
|
919
|
+
store,
|
|
920
|
+
returnToParent
|
|
921
|
+
]);
|
|
922
|
+
function handleFocus() {
|
|
923
|
+
if (!virtualFocus && parentVirtualFocusRef && parentStore?.state.activeIndex != null) parentStore.setActiveIndex(null, none);
|
|
924
|
+
}
|
|
925
|
+
return {
|
|
926
|
+
parentVirtualFocusRef,
|
|
927
|
+
handleFocus
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/MenuFilterImpl.mjs
|
|
932
|
+
const MENU_FILTER_IMPL = {
|
|
933
|
+
Popup: MenuFilterPopup,
|
|
934
|
+
List: MenuFilterList,
|
|
935
|
+
Group: MenuFilterGroup,
|
|
936
|
+
RadioGroup: MenuFilterRadioGroup,
|
|
937
|
+
useItem: useFilterDropdownItem,
|
|
938
|
+
useSubmenuTrigger: useMenuFilterSubmenuTrigger,
|
|
939
|
+
useParentHandoff: useVirtualFocusParentHandoff
|
|
940
|
+
};
|
|
941
|
+
//#endregion
|
|
942
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/MenuFilterDropdown.mjs
|
|
943
|
+
/**
|
|
944
|
+
* Reads the menu store, which is only available below the menu root, and hands the filter
|
|
945
|
+
* engine the list the menu navigates and the command that moves its highlight. The query is
|
|
946
|
+
* owned here; the menu root keeps sole ownership of the open state.
|
|
947
|
+
*/
|
|
948
|
+
function MenuFilterDropdown(props) {
|
|
949
|
+
const { value: valueProp, defaultValue = "", onValueChange, ...dropdownProps } = props;
|
|
950
|
+
const { store } = useMenuRootContext();
|
|
951
|
+
const open = store.useState("open");
|
|
952
|
+
const mounted = store.useState("mounted");
|
|
953
|
+
const keyboardOpen = store.useState("keyboardOpen");
|
|
954
|
+
const activeTriggerId = store.useState("activeTriggerId");
|
|
955
|
+
const activeTriggerElement = store.useState("activeTriggerElement");
|
|
956
|
+
const disabled = store.useState("disabled");
|
|
957
|
+
const [value, setValue] = useControlled({
|
|
958
|
+
controlled: valueProp,
|
|
959
|
+
default: defaultValue,
|
|
960
|
+
name: "MenuFilterProvider",
|
|
961
|
+
state: "value"
|
|
962
|
+
});
|
|
963
|
+
const handleValueChange = useStableCallback((nextValue, eventDetails) => {
|
|
964
|
+
onValueChange?.(nextValue, eventDetails);
|
|
965
|
+
if (!eventDetails.isCanceled) setValue(nextValue);
|
|
966
|
+
});
|
|
967
|
+
const getActiveIndex = useStableCallback(() => store.state.activeIndex);
|
|
968
|
+
const setActiveIndex = useStableCallback((index) => {
|
|
969
|
+
store.setActiveIndex(index, none);
|
|
970
|
+
});
|
|
971
|
+
const query = useFilterDropdownCloseQuery({
|
|
972
|
+
open,
|
|
973
|
+
mounted,
|
|
974
|
+
value,
|
|
975
|
+
onValueChange: handleValueChange
|
|
976
|
+
});
|
|
977
|
+
const filterTriggerProps = useFilterTriggerProps(value !== "");
|
|
978
|
+
useRefWithInit(() => {
|
|
979
|
+
store.set("filterTriggerProps", filterTriggerProps);
|
|
980
|
+
return null;
|
|
981
|
+
});
|
|
982
|
+
store.useSyncedValue("filterTriggerProps", filterTriggerProps);
|
|
983
|
+
useIsoLayoutEffect(() => {
|
|
984
|
+
if (!open) store.set("keyboardOpen", false);
|
|
985
|
+
}, [open, store]);
|
|
986
|
+
const triggerId = activeTriggerElement ? activeTriggerElement.id || null : activeTriggerId;
|
|
987
|
+
return /*#__PURE__*/ jsx(MenuFilterImplContext.Provider, {
|
|
988
|
+
value: MENU_FILTER_IMPL,
|
|
989
|
+
children: /*#__PURE__*/ jsx(FilterDropdownRoot, {
|
|
990
|
+
...dropdownProps,
|
|
991
|
+
open,
|
|
992
|
+
openedByKeyboard: keyboardOpen,
|
|
993
|
+
disabled,
|
|
994
|
+
value,
|
|
995
|
+
query,
|
|
996
|
+
onValueChange: handleValueChange,
|
|
997
|
+
triggerId,
|
|
998
|
+
listRef: store.context.itemDomElements,
|
|
999
|
+
getActiveIndex,
|
|
1000
|
+
setActiveIndex,
|
|
1001
|
+
focusOwnerRef: store.context.virtualFocusRef
|
|
1002
|
+
})
|
|
1003
|
+
});
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
* The props a filterable menu adds to its triggers: dialog semantics, screen reader press
|
|
1007
|
+
* tracking, and a relay of list navigation typed on the trigger to the input, since the input
|
|
1008
|
+
* holds real focus while the popup is open.
|
|
1009
|
+
*/
|
|
1010
|
+
function useFilterTriggerProps(hasValue) {
|
|
1011
|
+
const { store } = useMenuRootContext();
|
|
1012
|
+
const isInMenubar = useMenubarContext(true) != null;
|
|
1013
|
+
const handleInputKeyDown = useMenuFilterKeyDown(hasValue);
|
|
1014
|
+
return React$1.useMemo(() => ({
|
|
1015
|
+
"aria-haspopup": "dialog",
|
|
1016
|
+
onPointerDown(event) {
|
|
1017
|
+
store.context.virtualPress = isVirtualPointerEvent(event.nativeEvent);
|
|
1018
|
+
},
|
|
1019
|
+
onKeyDown(event) {
|
|
1020
|
+
const focusOwner = store.context.virtualFocusRef?.current;
|
|
1021
|
+
if (!store.select("open") || !focusOwner || isInMenubar) return;
|
|
1022
|
+
if (event.key === "ArrowUp" || event.key === "ArrowDown") {
|
|
1023
|
+
focusOwner.focus({ preventScroll: true });
|
|
1024
|
+
handleInputKeyDown(event);
|
|
1025
|
+
event.preventDefault();
|
|
1026
|
+
event.preventBaseUIHandler();
|
|
1027
|
+
} else if (event.key === "ArrowLeft" || event.key === "ArrowRight") event.preventBaseUIHandler();
|
|
1028
|
+
else if (isTypeaheadKey(event)) focusOwner.focus({ preventScroll: true });
|
|
1029
|
+
}
|
|
1030
|
+
}), [
|
|
1031
|
+
store,
|
|
1032
|
+
isInMenubar,
|
|
1033
|
+
handleInputKeyDown
|
|
1034
|
+
]);
|
|
1035
|
+
}
|
|
1036
|
+
function isTypeaheadKey(event) {
|
|
1037
|
+
return event.key.length === 1 && event.key !== " " && !event.ctrlKey && !event.metaKey && !event.altKey;
|
|
1038
|
+
}
|
|
1039
|
+
//#endregion
|
|
1040
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/useMenuFilterRoot.mjs
|
|
1041
|
+
/** Splits a filterable root's props between the menu root and the filter below it. */
|
|
1042
|
+
function useMenuFilterRoot(props) {
|
|
1043
|
+
const { children, value, defaultValue, onValueChange, filter, autoHighlight = false, locale, ...otherProps } = props;
|
|
1044
|
+
const virtualFocusRef = React$1.useRef(null);
|
|
1045
|
+
return {
|
|
1046
|
+
children,
|
|
1047
|
+
rootProps: {
|
|
1048
|
+
...otherProps,
|
|
1049
|
+
virtualFocus: true,
|
|
1050
|
+
virtualFocusRef,
|
|
1051
|
+
allowEscape: !autoHighlight,
|
|
1052
|
+
resetOnPointerLeave: autoHighlight !== "always"
|
|
1053
|
+
},
|
|
1054
|
+
dropdownProps: {
|
|
1055
|
+
value,
|
|
1056
|
+
defaultValue,
|
|
1057
|
+
onValueChange,
|
|
1058
|
+
filter,
|
|
1059
|
+
autoHighlight,
|
|
1060
|
+
locale
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
//#endregion
|
|
1065
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-root/MenuFilterRoot.mjs
|
|
1066
|
+
/**
|
|
1067
|
+
* The filterable implementation of `Menu.Root`, rendered in its place when the root sits inside
|
|
1068
|
+
* `Menu.FilterProvider`. Reached through the provider only, so a plain menu never bundles it.
|
|
1069
|
+
*
|
|
1070
|
+
* @internal
|
|
1071
|
+
*/
|
|
1072
|
+
function MenuFilterRoot(props) {
|
|
1073
|
+
const { children, rootProps, dropdownProps } = useMenuFilterRoot(props);
|
|
1074
|
+
return /*#__PURE__*/ jsx(MenuRootInternal, {
|
|
1075
|
+
...rootProps,
|
|
1076
|
+
children: (payload) => /*#__PURE__*/ jsx(MenuFilterDropdown, {
|
|
1077
|
+
...dropdownProps,
|
|
1078
|
+
children: typeof children === "function" ? children(payload) : children
|
|
1079
|
+
})
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
//#endregion
|
|
1083
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-submenu-root/MenuFilterSubmenuRoot.mjs
|
|
1084
|
+
/**
|
|
1085
|
+
* The filterable implementation of `Menu.SubmenuRoot`, rendered in its place when the submenu
|
|
1086
|
+
* root sits inside `Menu.FilterProvider`.
|
|
1087
|
+
*
|
|
1088
|
+
* @internal
|
|
1089
|
+
*/
|
|
1090
|
+
function MenuFilterSubmenuRoot(props) {
|
|
1091
|
+
const parent = useMenuRootContext();
|
|
1092
|
+
const parentStore = parent.store;
|
|
1093
|
+
const parentDisabled = parentStore.useState("disabled");
|
|
1094
|
+
const { rootProps, dropdownProps } = useMenuFilterRoot(props);
|
|
1095
|
+
const parentReferenceRef = React$1.useRef(null);
|
|
1096
|
+
function handleSubmenuEnter(trigger, event) {
|
|
1097
|
+
const focusedElement = parent.virtualFocus ? parentStore.context.virtualFocusRef?.current : activeElement(ownerDocument(trigger));
|
|
1098
|
+
if (isHTMLElement(focusedElement)) {
|
|
1099
|
+
parentReferenceRef.current = {
|
|
1100
|
+
reference: focusedElement,
|
|
1101
|
+
trigger
|
|
1102
|
+
};
|
|
1103
|
+
parentStore.setActiveIndex(null, event ? keyboard : none, event);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
function highlightTrigger(trigger, event) {
|
|
1107
|
+
parentStore.highlightItem(trigger, keyboard, event);
|
|
1108
|
+
}
|
|
1109
|
+
function handleSubmenuExit(event) {
|
|
1110
|
+
const parentReference = parentReferenceRef.current;
|
|
1111
|
+
if (!parentReference) return;
|
|
1112
|
+
parentReference.reference.focus({ preventScroll: true });
|
|
1113
|
+
highlightTrigger(parentReference.trigger, event);
|
|
1114
|
+
}
|
|
1115
|
+
function handleOpenChange(nextOpen, details) {
|
|
1116
|
+
rootProps.onOpenChange?.(nextOpen, details);
|
|
1117
|
+
if (details.isCanceled) return;
|
|
1118
|
+
if (!nextOpen) {
|
|
1119
|
+
if (details.reason === "escape-key" && isHTMLElement(details.trigger)) {
|
|
1120
|
+
highlightTrigger(details.trigger, details.event);
|
|
1121
|
+
parentReferenceRef.current = {
|
|
1122
|
+
reference: parent.virtualFocus ? parentStore.context.virtualFocusRef?.current ?? details.trigger : details.trigger,
|
|
1123
|
+
trigger: details.trigger
|
|
1124
|
+
};
|
|
1125
|
+
}
|
|
1126
|
+
return;
|
|
1127
|
+
}
|
|
1128
|
+
parentReferenceRef.current = null;
|
|
1129
|
+
if (isHTMLElement(details.trigger) && isKeyboardOpen(details.reason, details.event)) handleSubmenuEnter(details.trigger, details.reason === "list-navigation" ? details.event : void 0);
|
|
1130
|
+
}
|
|
1131
|
+
return /*#__PURE__*/ jsx(MenuRootInternal, {
|
|
1132
|
+
...rootProps,
|
|
1133
|
+
isSubmenu: true,
|
|
1134
|
+
disabled: parentDisabled || props.disabled,
|
|
1135
|
+
onOpenChange: handleOpenChange,
|
|
1136
|
+
children: /*#__PURE__*/ jsx(MenuFilterSubmenuNavigation, {
|
|
1137
|
+
parentStore,
|
|
1138
|
+
parentVirtualFocus: parent.virtualFocus,
|
|
1139
|
+
parentAllowEscape: parent.virtualFocus && parent.allowEscape,
|
|
1140
|
+
parentOrientation: parent.orientation,
|
|
1141
|
+
parentLoopFocus: parent.loopFocus,
|
|
1142
|
+
getReturnElement: () => parentReferenceRef.current?.reference ?? (parent.virtualFocus ? parentStore.context.virtualFocusRef?.current : null) ?? null,
|
|
1143
|
+
onSubmenuEnter: handleSubmenuEnter,
|
|
1144
|
+
onSubmenuExit: handleSubmenuExit,
|
|
1145
|
+
children: /*#__PURE__*/ jsx(MenuFilterDropdown, {
|
|
1146
|
+
...dropdownProps,
|
|
1147
|
+
children: props.children
|
|
1148
|
+
})
|
|
1149
|
+
})
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
function MenuFilterSubmenuNavigation(props) {
|
|
1153
|
+
const { children, parentStore, parentVirtualFocus, parentAllowEscape, parentOrientation, parentLoopFocus, onSubmenuEnter, onSubmenuExit, getReturnElement } = props;
|
|
1154
|
+
const { store, orientation } = useMenuRootContext();
|
|
1155
|
+
const direction = useDirection();
|
|
1156
|
+
const mounted = store.useState("mounted");
|
|
1157
|
+
const wasMountedRef = React$1.useRef(false);
|
|
1158
|
+
const handleReturnFocus = useStableCallback(() => {
|
|
1159
|
+
const [ownTrigger] = store.context.triggerElements.elements();
|
|
1160
|
+
return getReturnElement() ?? (isHTMLElement(ownTrigger) ? ownTrigger : null);
|
|
1161
|
+
});
|
|
1162
|
+
useIsoLayoutEffect(() => {
|
|
1163
|
+
const wasMounted = wasMountedRef.current;
|
|
1164
|
+
wasMountedRef.current = mounted;
|
|
1165
|
+
if (mounted || !wasMounted) return;
|
|
1166
|
+
const returnElement = handleReturnFocus();
|
|
1167
|
+
if (!returnElement || !parentStore.select("open")) return;
|
|
1168
|
+
const doc = ownerDocument(returnElement);
|
|
1169
|
+
const activeEl = activeElement(doc);
|
|
1170
|
+
if (activeEl === doc.body || contains(store.select("popupElement"), activeEl)) returnElement.focus({ preventScroll: true });
|
|
1171
|
+
}, [
|
|
1172
|
+
mounted,
|
|
1173
|
+
store,
|
|
1174
|
+
parentStore,
|
|
1175
|
+
handleReturnFocus
|
|
1176
|
+
]);
|
|
1177
|
+
function moveInParent(from, event) {
|
|
1178
|
+
const item = moveHighlightFrom(parentStore, from, event, {
|
|
1179
|
+
orientation: parentOrientation,
|
|
1180
|
+
rtl: direction === "rtl",
|
|
1181
|
+
loopFocus: parentLoopFocus,
|
|
1182
|
+
allowEscape: parentAllowEscape
|
|
1183
|
+
});
|
|
1184
|
+
if (!parentVirtualFocus) item?.focus({ preventScroll: true });
|
|
1185
|
+
}
|
|
1186
|
+
function close(event) {
|
|
1187
|
+
if (!store.select("open")) return;
|
|
1188
|
+
stopEvent(event);
|
|
1189
|
+
const trigger = store.select("activeTriggerElement");
|
|
1190
|
+
const eventDetails = createChangeEventDetails(listNavigation, event.nativeEvent);
|
|
1191
|
+
store.setOpen(false, eventDetails);
|
|
1192
|
+
if (!eventDetails.isCanceled) onSubmenuExit(event.nativeEvent);
|
|
1193
|
+
const returnElement = getReturnElement() ?? store.select("activeTriggerElement");
|
|
1194
|
+
if (!store.select("open") && isHTMLElement(returnElement) && activeElement(ownerDocument(returnElement)) !== returnElement) returnElement.focus();
|
|
1195
|
+
if (!store.select("open") && isHTMLElement(trigger) && isMainOrientationKey(event.key, parentOrientation)) moveInParent(trigger, event);
|
|
1196
|
+
}
|
|
1197
|
+
const handleTriggerKeyDown = useStableCallback((event) => {
|
|
1198
|
+
if (isMainOrientationKey(event.key, parentOrientation)) {
|
|
1199
|
+
moveInParent(event.currentTarget, event);
|
|
1200
|
+
event.preventBaseUIHandler();
|
|
1201
|
+
stopEvent(event);
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1204
|
+
const open = store.select("open");
|
|
1205
|
+
const isRtl = direction === "rtl";
|
|
1206
|
+
const isCloseKey = isCrossOrientationCloseKey(event.key, orientation, isRtl, false);
|
|
1207
|
+
if (open && isCloseKey) {
|
|
1208
|
+
close(event);
|
|
1209
|
+
return;
|
|
1210
|
+
}
|
|
1211
|
+
if (!isCrossOrientationOpenKey(event.key, parentOrientation, isRtl)) return;
|
|
1212
|
+
stopEvent(event);
|
|
1213
|
+
if (open) {
|
|
1214
|
+
onSubmenuEnter(event.currentTarget, event.nativeEvent);
|
|
1215
|
+
store.context.virtualFocusRef?.current?.focus({ preventScroll: true });
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
store.setOpen(true, createChangeEventDetails(listNavigation, event.nativeEvent, event.currentTarget));
|
|
1219
|
+
});
|
|
1220
|
+
const handlePopupKeyDown = useStableCallback((event) => {
|
|
1221
|
+
if (event.which === 229) return;
|
|
1222
|
+
if (isCrossOrientationCloseKey(event.key, orientation, direction === "rtl", false)) close(event);
|
|
1223
|
+
});
|
|
1224
|
+
const contextValue = React$1.useMemo(() => ({
|
|
1225
|
+
getReturnElement: handleReturnFocus,
|
|
1226
|
+
onTriggerKeyDown: handleTriggerKeyDown,
|
|
1227
|
+
onPopupKeyDown: handlePopupKeyDown
|
|
1228
|
+
}), [
|
|
1229
|
+
handleReturnFocus,
|
|
1230
|
+
handleTriggerKeyDown,
|
|
1231
|
+
handlePopupKeyDown
|
|
1232
|
+
]);
|
|
1233
|
+
return /*#__PURE__*/ jsx(MenuSubmenuRootContext.Provider, {
|
|
1234
|
+
value: contextValue,
|
|
1235
|
+
children
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
//#endregion
|
|
1239
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/filter-provider/MenuFilterProvider.mjs
|
|
1240
|
+
/**
|
|
1241
|
+
* Enables filtering for the menu or submenu it wraps. Add `Menu.Input` to the popup and place
|
|
1242
|
+
* its items in `Menu.List`.
|
|
1243
|
+
* Wrap each searchable submenu in its own provider.
|
|
1244
|
+
* Doesn't render its own HTML element.
|
|
1245
|
+
*
|
|
1246
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1247
|
+
*/
|
|
1248
|
+
function MenuFilterProvider(props) {
|
|
1249
|
+
const { children, filter, value, defaultValue, onValueChange, autoHighlight, locale } = props;
|
|
1250
|
+
const contextValue = React$1.useMemo(() => ({
|
|
1251
|
+
Root: MenuFilterRoot,
|
|
1252
|
+
SubmenuRoot: MenuFilterSubmenuRoot,
|
|
1253
|
+
options: {
|
|
1254
|
+
filter,
|
|
1255
|
+
value,
|
|
1256
|
+
defaultValue,
|
|
1257
|
+
onValueChange,
|
|
1258
|
+
autoHighlight,
|
|
1259
|
+
locale
|
|
1260
|
+
}
|
|
1261
|
+
}), [
|
|
1262
|
+
filter,
|
|
1263
|
+
value,
|
|
1264
|
+
defaultValue,
|
|
1265
|
+
onValueChange,
|
|
1266
|
+
autoHighlight,
|
|
1267
|
+
locale
|
|
1268
|
+
]);
|
|
1269
|
+
return /*#__PURE__*/ jsx(MenuFilterProviderContext.Provider, {
|
|
1270
|
+
value: contextValue,
|
|
1271
|
+
children
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
//#endregion
|
|
1275
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/input/FilterDropdownInput.mjs
|
|
1276
|
+
/**
|
|
1277
|
+
* @internal
|
|
1278
|
+
*/
|
|
1279
|
+
const FilterDropdownInput = /*#__PURE__*/ React$1.forwardRef(function FilterDropdownInput(componentProps, forwardedRef) {
|
|
1280
|
+
const { render, className, style, id: idProp, disabled, activeItemId, navigationProps, ...elementProps } = componentProps;
|
|
1281
|
+
const id = useBaseUiId(idProp);
|
|
1282
|
+
const context = useFilterDropdownRootContext();
|
|
1283
|
+
const { listRef } = useFilterDropdownItemContext();
|
|
1284
|
+
const value = useFilterDropdownValueContext();
|
|
1285
|
+
const [composingValue, setComposingValue] = React$1.useState(null);
|
|
1286
|
+
const isComposingRef = React$1.useRef(false);
|
|
1287
|
+
function commitValue(nextValue, nativeEvent) {
|
|
1288
|
+
if (!context.open) return;
|
|
1289
|
+
const reason = nextValue === "" ? inputClear : inputChange;
|
|
1290
|
+
context.onValueChange(nextValue, createChangeEventDetails(reason, nativeEvent));
|
|
1291
|
+
}
|
|
1292
|
+
const state = { highlighted: context.inputFocusVisible && (!context.keyboardModality || activeItemId == null) };
|
|
1293
|
+
return useRenderElement("input", componentProps, {
|
|
1294
|
+
state,
|
|
1295
|
+
ref: [forwardedRef, context.focusOwnerRef],
|
|
1296
|
+
props: [
|
|
1297
|
+
navigationProps,
|
|
1298
|
+
{
|
|
1299
|
+
id,
|
|
1300
|
+
type: "text",
|
|
1301
|
+
disabled: context.disabled || disabled,
|
|
1302
|
+
"aria-activedescendant": activeItemId,
|
|
1303
|
+
role: "searchbox",
|
|
1304
|
+
inputMode: "search",
|
|
1305
|
+
autoComplete: "off",
|
|
1306
|
+
spellCheck: "false",
|
|
1307
|
+
autoCorrect: "off",
|
|
1308
|
+
autoCapitalize: "none",
|
|
1309
|
+
"aria-autocomplete": void 0,
|
|
1310
|
+
"aria-controls": context.listId,
|
|
1311
|
+
value: composingValue ?? value,
|
|
1312
|
+
onCompositionStart(event) {
|
|
1313
|
+
if (android) return;
|
|
1314
|
+
isComposingRef.current = true;
|
|
1315
|
+
setComposingValue(event.currentTarget.value);
|
|
1316
|
+
},
|
|
1317
|
+
onCompositionEnd(event) {
|
|
1318
|
+
if (!isComposingRef.current) return;
|
|
1319
|
+
isComposingRef.current = false;
|
|
1320
|
+
setComposingValue(null);
|
|
1321
|
+
commitValue(event.currentTarget.value, event.nativeEvent);
|
|
1322
|
+
},
|
|
1323
|
+
onChange(event) {
|
|
1324
|
+
if (isComposingRef.current) {
|
|
1325
|
+
setComposingValue(event.currentTarget.value);
|
|
1326
|
+
return;
|
|
1327
|
+
}
|
|
1328
|
+
commitValue(event.currentTarget.value, event.nativeEvent);
|
|
1329
|
+
},
|
|
1330
|
+
onKeyDown() {
|
|
1331
|
+
context.setKeyboardModality(true);
|
|
1332
|
+
},
|
|
1333
|
+
onPointerDown() {
|
|
1334
|
+
context.setKeyboardModality(false);
|
|
1335
|
+
},
|
|
1336
|
+
onMouseEnter(event) {
|
|
1337
|
+
context.setKeyboardModality(false);
|
|
1338
|
+
if (context.open) refocusOwner(event.currentTarget);
|
|
1339
|
+
},
|
|
1340
|
+
onFocus(event) {
|
|
1341
|
+
context.setInputFocusVisible(true);
|
|
1342
|
+
if (context.autoHighlight === "always" || isRefocusingOwner()) return;
|
|
1343
|
+
const from = event.relatedTarget;
|
|
1344
|
+
if (from !== null && listRef.current.includes(from)) context.setActiveIndex(null);
|
|
1345
|
+
},
|
|
1346
|
+
onBlur() {
|
|
1347
|
+
context.setInputFocusVisible(false);
|
|
1348
|
+
}
|
|
1349
|
+
},
|
|
1350
|
+
elementProps
|
|
1351
|
+
]
|
|
1352
|
+
});
|
|
1353
|
+
});
|
|
1354
|
+
FilterDropdownInput.displayName = "FilterDropdownInput";
|
|
1355
|
+
//#endregion
|
|
1356
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/input/MenuInput.mjs
|
|
1357
|
+
/**
|
|
1358
|
+
* A search field that filters the menu items.
|
|
1359
|
+
* Requires the menu to be wrapped in `Menu.FilterProvider`.
|
|
1360
|
+
* Renders an `<input>` element.
|
|
1361
|
+
*
|
|
1362
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1363
|
+
*/
|
|
1364
|
+
const MenuInput = /*#__PURE__*/ React$1.forwardRef(function MenuInput(componentProps, forwardedRef) {
|
|
1365
|
+
useMenuFilterPart("Input");
|
|
1366
|
+
const { store } = useMenuRootContext();
|
|
1367
|
+
const value = useFilterDropdownValueContext();
|
|
1368
|
+
const { onKeyDown, ...navigationProps } = store.useState("inputProps");
|
|
1369
|
+
const activeItemId = store.useState("highlightedItemId");
|
|
1370
|
+
const handleKeyDown = useMenuFilterKeyDown(value !== "");
|
|
1371
|
+
const handleInputRef = React$1.useCallback((input) => {
|
|
1372
|
+
store.set("inputFocused", input !== null && activeElement(ownerDocument(input)) === input);
|
|
1373
|
+
}, [store]);
|
|
1374
|
+
const mergedRefs = useMergedRefs(forwardedRef, handleInputRef);
|
|
1375
|
+
const inputProps = mergeProps({
|
|
1376
|
+
onKeyDown: handleKeyDown,
|
|
1377
|
+
onFocus() {
|
|
1378
|
+
store.set("inputFocused", true);
|
|
1379
|
+
},
|
|
1380
|
+
onBlur() {
|
|
1381
|
+
store.set("inputFocused", false);
|
|
1382
|
+
}
|
|
1383
|
+
}, componentProps);
|
|
1384
|
+
return /*#__PURE__*/ jsx(FilterDropdownInput, {
|
|
1385
|
+
...inputProps,
|
|
1386
|
+
activeItemId,
|
|
1387
|
+
navigationProps,
|
|
1388
|
+
ref: mergedRefs
|
|
1389
|
+
});
|
|
1390
|
+
});
|
|
1391
|
+
MenuInput.displayName = "MenuInput";
|
|
1392
|
+
//#endregion
|
|
1393
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/list/MenuList.mjs
|
|
1394
|
+
const MenuListPlain = /*#__PURE__*/ React$1.forwardRef(function MenuListPlain(componentProps, forwardedRef) {
|
|
1395
|
+
const { render, className, style, id: idProp, ...elementProps } = componentProps;
|
|
1396
|
+
const { store, orientation } = useMenuRootContext();
|
|
1397
|
+
const activeTriggerId = store.useState("activeTriggerId");
|
|
1398
|
+
const activeTriggerElement = store.useState("activeTriggerElement");
|
|
1399
|
+
const setListElement = store.useStateSetter("listElement");
|
|
1400
|
+
const id = useBaseUiId(idProp);
|
|
1401
|
+
const renderedIdRef = React$1.useRef(id);
|
|
1402
|
+
useIsoLayoutEffect(() => {
|
|
1403
|
+
if (renderedIdRef.current !== id) {
|
|
1404
|
+
renderedIdRef.current = id;
|
|
1405
|
+
store.notifyAll();
|
|
1406
|
+
}
|
|
1407
|
+
}, [id, store]);
|
|
1408
|
+
const ariaLabelledBy = resolvePopupLabel(componentProps, activeTriggerElement, activeTriggerId);
|
|
1409
|
+
return useRenderElement("div", componentProps, {
|
|
1410
|
+
ref: [forwardedRef, setListElement],
|
|
1411
|
+
props: [{
|
|
1412
|
+
id,
|
|
1413
|
+
role: "menu",
|
|
1414
|
+
tabIndex: -1,
|
|
1415
|
+
"aria-orientation": orientation === "horizontal" ? "horizontal" : void 0,
|
|
1416
|
+
"aria-labelledby": ariaLabelledBy
|
|
1417
|
+
}, elementProps]
|
|
1418
|
+
});
|
|
1419
|
+
});
|
|
1420
|
+
MenuListPlain.displayName = "MenuListPlain";
|
|
1421
|
+
const MenuList = /*#__PURE__*/ React$1.forwardRef(function MenuList(props, forwardedRef) {
|
|
1422
|
+
const List = useMenuFilterImpl()?.List ?? MenuListPlain;
|
|
1423
|
+
return /*#__PURE__*/ jsx(List, {
|
|
1424
|
+
...props,
|
|
1425
|
+
ref: forwardedRef
|
|
1426
|
+
});
|
|
1427
|
+
});
|
|
1428
|
+
MenuList.displayName = "MenuList";
|
|
1429
|
+
//#endregion
|
|
1430
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/clear/FilterDropdownClear.mjs
|
|
1431
|
+
/**
|
|
1432
|
+
* @internal
|
|
1433
|
+
*/
|
|
1434
|
+
const FilterDropdownClear = /*#__PURE__*/ React$1.forwardRef(function FilterDropdownClear(componentProps, forwardedRef) {
|
|
1435
|
+
const { render, className, style, disabled: disabledProp = false, nativeButton = true, ...elementProps } = componentProps;
|
|
1436
|
+
const context = useFilterDropdownRootContext();
|
|
1437
|
+
const value = useFilterDropdownValueContext();
|
|
1438
|
+
const disabled = context.disabled || disabledProp;
|
|
1439
|
+
const visible = value !== "";
|
|
1440
|
+
const { buttonRef, getButtonProps } = useButton({
|
|
1441
|
+
disabled,
|
|
1442
|
+
native: nativeButton
|
|
1443
|
+
});
|
|
1444
|
+
return useRenderElement("button", componentProps, {
|
|
1445
|
+
enabled: visible,
|
|
1446
|
+
state: { disabled },
|
|
1447
|
+
ref: [forwardedRef, buttonRef],
|
|
1448
|
+
props: [
|
|
1449
|
+
{
|
|
1450
|
+
tabIndex: -1,
|
|
1451
|
+
"aria-hidden": true,
|
|
1452
|
+
onMouseDown(event) {
|
|
1453
|
+
event.preventDefault();
|
|
1454
|
+
},
|
|
1455
|
+
onClick(event) {
|
|
1456
|
+
const eventDetails = createChangeEventDetails(clearPress, event.nativeEvent);
|
|
1457
|
+
context.onValueChange("", eventDetails);
|
|
1458
|
+
context.focusOwnerRef.current?.focus({ preventScroll: true });
|
|
1459
|
+
}
|
|
1460
|
+
},
|
|
1461
|
+
elementProps,
|
|
1462
|
+
getButtonProps
|
|
1463
|
+
]
|
|
1464
|
+
});
|
|
1465
|
+
});
|
|
1466
|
+
FilterDropdownClear.displayName = "FilterDropdownClear";
|
|
1467
|
+
//#endregion
|
|
1468
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/clear/MenuClear.mjs
|
|
1469
|
+
/**
|
|
1470
|
+
* A button that clears the input text.
|
|
1471
|
+
* Requires the menu to be wrapped in `Menu.FilterProvider`.
|
|
1472
|
+
* Renders a `<button>` element when the input has text.
|
|
1473
|
+
*
|
|
1474
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1475
|
+
*/
|
|
1476
|
+
const MenuClear = /*#__PURE__*/ React$1.forwardRef(function MenuClear(props, forwardedRef) {
|
|
1477
|
+
useMenuFilterPart("Clear");
|
|
1478
|
+
return /*#__PURE__*/ jsx(FilterDropdownClear, {
|
|
1479
|
+
...props,
|
|
1480
|
+
ref: forwardedRef
|
|
1481
|
+
});
|
|
1482
|
+
});
|
|
1483
|
+
MenuClear.displayName = "MenuClear";
|
|
1484
|
+
//#endregion
|
|
1485
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/filter-dropdown/empty/FilterDropdownEmpty.mjs
|
|
1486
|
+
/**
|
|
1487
|
+
* @internal
|
|
1488
|
+
*/
|
|
1489
|
+
const FilterDropdownEmpty = /*#__PURE__*/ React$1.forwardRef(function FilterDropdownEmpty(componentProps, forwardedRef) {
|
|
1490
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
1491
|
+
const { store } = useFilterDropdownItemContext();
|
|
1492
|
+
const isEmpty = useStore(store, selectors.isEmpty);
|
|
1493
|
+
const [ready, setReady] = React$1.useState(false);
|
|
1494
|
+
useIsoLayoutEffect(() => {
|
|
1495
|
+
setReady(true);
|
|
1496
|
+
}, []);
|
|
1497
|
+
const visible = ready && isEmpty;
|
|
1498
|
+
const emptyRef = useInitialLiveRegionTextMutation(visible);
|
|
1499
|
+
return useRenderElement("div", componentProps, {
|
|
1500
|
+
enabled: visible,
|
|
1501
|
+
ref: [forwardedRef, emptyRef],
|
|
1502
|
+
props: [{
|
|
1503
|
+
role: "status",
|
|
1504
|
+
"aria-live": "polite",
|
|
1505
|
+
"aria-atomic": true
|
|
1506
|
+
}, elementProps]
|
|
1507
|
+
});
|
|
1508
|
+
});
|
|
1509
|
+
FilterDropdownEmpty.displayName = "FilterDropdownEmpty";
|
|
1510
|
+
//#endregion
|
|
1511
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/empty/MenuEmpty.mjs
|
|
1512
|
+
/**
|
|
1513
|
+
* A message shown when the menu has no matching items.
|
|
1514
|
+
* Requires the menu to be wrapped in `Menu.FilterProvider`.
|
|
1515
|
+
* Renders a `<div>` element.
|
|
1516
|
+
*
|
|
1517
|
+
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
1518
|
+
*/
|
|
1519
|
+
const MenuEmpty = /*#__PURE__*/ React$1.forwardRef(function MenuEmpty(props, forwardedRef) {
|
|
1520
|
+
useMenuFilterPart("Empty");
|
|
1521
|
+
return /*#__PURE__*/ jsx(FilterDropdownEmpty, {
|
|
1522
|
+
...props,
|
|
1523
|
+
ref: forwardedRef
|
|
1524
|
+
});
|
|
1525
|
+
});
|
|
1526
|
+
MenuEmpty.displayName = "MenuEmpty";
|
|
1527
|
+
//#endregion
|
|
1528
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/index.parts.mjs
|
|
1529
|
+
var index_parts_exports = /* @__PURE__ */ __exportAll({
|
|
1530
|
+
Arrow: () => MenuArrow,
|
|
1531
|
+
Backdrop: () => MenuBackdrop,
|
|
1532
|
+
CheckboxItem: () => MenuCheckboxItem,
|
|
1533
|
+
CheckboxItemIndicator: () => MenuCheckboxItemIndicator,
|
|
1534
|
+
Clear: () => MenuClear,
|
|
1535
|
+
Empty: () => MenuEmpty,
|
|
1536
|
+
FilterProvider: () => MenuFilterProvider,
|
|
1537
|
+
Group: () => MenuGroup,
|
|
1538
|
+
GroupLabel: () => MenuGroupLabel,
|
|
1539
|
+
Handle: () => MenuHandle,
|
|
1540
|
+
Input: () => MenuInput,
|
|
1541
|
+
Item: () => MenuItem,
|
|
1542
|
+
LinkItem: () => MenuLinkItem,
|
|
1543
|
+
List: () => MenuList,
|
|
1544
|
+
Popup: () => MenuPopup,
|
|
1545
|
+
Portal: () => MenuPortal,
|
|
1546
|
+
Positioner: () => MenuPositioner,
|
|
1547
|
+
RadioGroup: () => MenuRadioGroup,
|
|
1548
|
+
RadioItem: () => MenuRadioItem,
|
|
1549
|
+
RadioItemIndicator: () => MenuRadioItemIndicator,
|
|
1550
|
+
Root: () => MenuRoot,
|
|
1551
|
+
Separator: () => Separator,
|
|
1552
|
+
SubmenuRoot: () => MenuSubmenuRoot,
|
|
1553
|
+
SubmenuTrigger: () => MenuSubmenuTrigger,
|
|
1554
|
+
Trigger: () => MenuTrigger,
|
|
1555
|
+
Viewport: () => MenuViewport,
|
|
1556
|
+
createHandle: () => createMenuHandle,
|
|
1557
|
+
useFilter: () => getFilter
|
|
1558
|
+
});
|
|
1559
|
+
//#endregion
|
|
1560
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/trigger/MenuTriggerDataAttributes.mjs
|
|
1561
|
+
var MenuTriggerDataAttributes_exports = /* @__PURE__ */ __exportAll({
|
|
1562
|
+
disabled: () => disabled$1,
|
|
1563
|
+
popupOpen: () => popupOpen,
|
|
1564
|
+
pressed: () => pressed
|
|
1565
|
+
});
|
|
1566
|
+
/**
|
|
1567
|
+
* Present when the corresponding menu is open.
|
|
1568
|
+
*/
|
|
1569
|
+
const popupOpen = popupOpen$1;
|
|
1570
|
+
/**
|
|
1571
|
+
* Present when the trigger is pressed.
|
|
1572
|
+
*/
|
|
1573
|
+
const pressed = pressed$1;
|
|
1574
|
+
/**
|
|
1575
|
+
* Present when the trigger is disabled.
|
|
1576
|
+
*/
|
|
1577
|
+
const disabled$1 = "data-disabled";
|
|
1578
|
+
//#endregion
|
|
1579
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/viewport/MenuViewportCssVars.mjs
|
|
1580
|
+
var MenuViewportCssVars_exports = /* @__PURE__ */ __exportAll({
|
|
1581
|
+
popupHeight: () => popupHeight,
|
|
1582
|
+
popupWidth: () => popupWidth
|
|
1583
|
+
});
|
|
1584
|
+
/**
|
|
1585
|
+
* The width of the parent popup.
|
|
1586
|
+
* This variable is placed on the 'previous' container and stores the width of the popup when the previous content was rendered.
|
|
1587
|
+
* It can be used to freeze the dimensions of the popup when animating between different content.
|
|
1588
|
+
*/
|
|
1589
|
+
const popupWidth = "--popup-width";
|
|
1590
|
+
/**
|
|
1591
|
+
* The height of the parent popup.
|
|
1592
|
+
* This variable is placed on the 'previous' container and stores the height of the popup when the previous content was rendered.
|
|
1593
|
+
* It can be used to freeze the dimensions of the popup when animating between different content.
|
|
1594
|
+
*/
|
|
1595
|
+
const popupHeight = "--popup-height";
|
|
1596
|
+
//#endregion
|
|
1597
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/viewport/MenuViewportDataAttributes.mjs
|
|
1598
|
+
var MenuViewportDataAttributes_exports = /* @__PURE__ */ __exportAll({
|
|
1599
|
+
activationDirection: () => activationDirection,
|
|
1600
|
+
current: () => current,
|
|
1601
|
+
instant: () => instant,
|
|
1602
|
+
previous: () => previous,
|
|
1603
|
+
transitioning: () => transitioning
|
|
1604
|
+
});
|
|
1605
|
+
/**
|
|
1606
|
+
* Applied to the direct child of the viewport when no transitions are present or the new content when it's entering.
|
|
1607
|
+
*/
|
|
1608
|
+
const current = "data-current";
|
|
1609
|
+
/**
|
|
1610
|
+
* Applied to the direct child of the viewport that contains the exiting content when transitions are present.
|
|
1611
|
+
*/
|
|
1612
|
+
const previous = "data-previous";
|
|
1613
|
+
/**
|
|
1614
|
+
* Indicates the direction from which the popup was activated.
|
|
1615
|
+
* This can be used to create directional animations based on how the popup was triggered.
|
|
1616
|
+
* Contains space-separated values for both horizontal and vertical axes.
|
|
1617
|
+
* @type {`${'left' | 'right' | ''} ${'down' | 'up' | ''}`}
|
|
1618
|
+
*/
|
|
1619
|
+
const activationDirection = "data-activation-direction";
|
|
1620
|
+
/**
|
|
1621
|
+
* Indicates that the viewport is currently transitioning between old and new content.
|
|
1622
|
+
*/
|
|
1623
|
+
const transitioning = "data-transitioning";
|
|
1624
|
+
/**
|
|
1625
|
+
* Present if animations should be instant.
|
|
1626
|
+
* @type {'click' | 'dismiss' | 'group' | 'trigger-change'}
|
|
1627
|
+
*/
|
|
1628
|
+
const instant = "data-instant";
|
|
1629
|
+
//#endregion
|
|
1630
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/input/MenuInputDataAttributes.mjs
|
|
1631
|
+
var MenuInputDataAttributes_exports = /* @__PURE__ */ __exportAll({ highlighted: () => highlighted });
|
|
1632
|
+
/**
|
|
1633
|
+
* Present while the input shows its focus ring.
|
|
1634
|
+
* Cleared when keyboard navigation highlights an item.
|
|
1635
|
+
*/
|
|
1636
|
+
const highlighted = "data-highlighted";
|
|
1637
|
+
//#endregion
|
|
1638
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.9.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/menu/clear/MenuClearDataAttributes.mjs
|
|
1639
|
+
var MenuClearDataAttributes_exports = /* @__PURE__ */ __exportAll({ disabled: () => disabled });
|
|
1640
|
+
/**
|
|
1641
|
+
* Present when the button is disabled.
|
|
1642
|
+
*/
|
|
1643
|
+
const disabled = "data-disabled";
|
|
1644
|
+
//#endregion
|
|
1645
|
+
export { MenuTriggerDataAttributes_exports as a, MenuViewportCssVars_exports as i, MenuInputDataAttributes_exports as n, index_parts_exports as o, MenuViewportDataAttributes_exports as r, MenuClearDataAttributes_exports as t };
|