@cloudflare/kumo 2.13.2 → 2.14.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 +25 -0
- package/README.md +2 -2
- package/ai/component-registry.json +548 -8
- package/ai/component-registry.md +853 -19
- package/ai/schemas.ts +90 -2
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +311 -69
- package/dist/ai/schemas.js +185 -23
- package/dist/catalog.d.ts +11 -11
- package/dist/chunks/{AlertDialogTrigger-k3f8nevrda6awa4s.js → AlertDialogTrigger-dkihgpvj12si73w3.js} +5 -5
- package/dist/chunks/{AutocompleteItem-ksckpihly1c23f3j.js → AutocompleteItem-drxau0wm3735nihq.js} +17 -29
- package/dist/chunks/AutocompleteSeparator-hqtaxxxye1rfezfg.js +12 -0
- package/dist/chunks/{Button-oczevl8g75m85ew9.js → Button-ccl5r1xlbe3gh998.js} +3 -3
- package/dist/chunks/{CSPContext-guqghj8kxoukvlky.js → CSPContext-ctyrgg64girv38ls.js} +1 -7
- package/dist/chunks/{CSPProvider-f3it239kgztzgryk.js → CSPProvider-p9ensukmowjpkgc0.js} +2 -2
- package/dist/chunks/{CheckboxGroup-g5xn5gnq8ocqyoum.js → CheckboxGroup-knvypu2d1s0iz86k.js} +63 -45
- package/dist/chunks/{CheckboxGroupContext-f9wox07n2u5moq4h.js → CheckboxGroupContext-lgc9dwxou662i6zo.js} +3 -5
- package/dist/chunks/{CheckboxRoot-o5bfpje6e4p6pdgm.js → CheckboxIndicator-n982pbktfkxsa5zz.js} +128 -132
- package/dist/chunks/{CollapsiblePanel-e80n35tnsb2cskt9.js → CollapsiblePanel-jm0ni90g7wz7ppkc.js} +33 -36
- package/dist/chunks/{ComboboxClear-glm805v81uaaf3su.js → ComboboxClear-c2kvjkh9yc6xfl38.js} +83 -98
- package/dist/chunks/{ComboboxEmpty-hwv2kjxnf9un635e.js → ComboboxEmpty-o0q20j2l2syar9kx.js} +662 -586
- package/dist/chunks/{ComboboxPopup-fx7xex6g75t9u0gm.js → ComboboxPopup-oxgggc2wxy6bfmru.js} +57 -57
- package/dist/chunks/{CompositeItem-l7zee38lq5m224d5.js → CompositeItem-hzuk5x3e5zsfgnyj.js} +4 -7
- package/dist/chunks/CompositeList-lbr4enu6yzek7oa9.js +180 -0
- package/dist/chunks/{CompositeListContext-oetjj2x8li8678as.js → CompositeListContext-m9frxn53kkmr23d0.js} +2 -5
- package/dist/chunks/{CompositeRoot-l6ot8jo0umdics5m.js → CompositeRoot-g72lchaerolf5dc9.js} +61 -63
- package/dist/chunks/{CompositeRootContext-ofhzmevv7hadjhyy.js → CompositeRootContext-ixz4myr7uwvavx6w.js} +1 -1
- package/dist/chunks/DialogHandle-klk7uo1q1y8ghyx5.js +68 -0
- package/dist/chunks/{DialogPopup-mp89aob2nown2akq.js → DialogPopup-olsvyf7ulia6ekb1.js} +28 -71
- package/dist/chunks/DialogRoot-hl3genvzl9h8ridm.js +16 -0
- package/dist/chunks/{DialogTrigger-cmok07cf3ks0kzug.js → DialogTrigger-g44cuem7n4wez533.js} +23 -20
- package/dist/chunks/DialogViewport-e1tqfisqexc7o9z8.js +42 -0
- package/dist/chunks/{DirectionContext-jc1g0w645603sd6p.js → DirectionContext-opvqcb794uxicri4.js} +1 -4
- package/dist/chunks/{DirectionProvider-ihtfgxd5qpm6oth1.js → DirectionProvider-er2gibtc9a1f0kep.js} +2 -2
- package/dist/chunks/DrawerViewport-eqzib92gukr4qap3.js +1483 -0
- package/dist/chunks/{FieldControl-oz007qbkl6ejp7di.js → FieldControl-c5sahhd5xg3nr2x7.js} +58 -31
- package/dist/chunks/{FieldDescription-ju607ea6gwgzga8p.js → FieldDescription-ldfiii5bvssfib3d.js} +13 -12
- package/dist/chunks/{FieldItemContext-j85dc0ihramj5ezs.js → FieldItemContext-kpsmvqm5a98m8zpx.js} +1 -1
- package/dist/chunks/FieldLabel-j9teqs9f1exqv346.js +351 -0
- package/dist/chunks/{FieldsetLegend-j5piwq1giyhrr8s4.js → FieldsetLegend-jyy40ylt2ynkvgob.js} +7 -14
- package/dist/chunks/{FieldsetRootContext-b633e9uzilttuyfi.js → FieldsetRootContext-7nlstw7wronafxhw.js} +1 -1
- package/dist/chunks/{FloatingPortalLite-mlt7ztrvhzepwi5y.js → FloatingPortalLite-da0wdcmem7ahkle6.js} +3 -3
- package/dist/chunks/{FloatingTree-oosjswl1s9q4obvg.js → FloatingTree-lhdqtlu8s6m66n7l.js} +6 -6
- package/dist/chunks/Form-fjfbann47c7ws316.js +113 -0
- package/dist/chunks/{FormContext-xz0b4h7ue30fkkn1.js → FormContext-bsu99v8i8pwu1yxc.js} +4 -3
- package/dist/chunks/{Input-ovqfhsmpfcrg5czm.js → Input-irwtufp5t73pwnoj.js} +2 -2
- package/dist/chunks/{LabelableContext-hetas2e4y0kywfas.js → LabelableContext-ccxbhu73vrk089m1.js} +18 -45
- package/dist/chunks/ListboxSeparator-nfyv54r2v5qtmosj.js +21 -0
- package/dist/chunks/{MenuBackdrop-dlntmavtopj7wv0l.js → MenuBackdrop-ouznwyglg27bosoj.js} +7 -12
- package/dist/chunks/{MenuSubmenuTrigger-fzubf5xr7ohsgsi7.js → MenuSubmenuTrigger-mbbda6ucik6nphbq.js} +378 -292
- package/dist/chunks/{MenuTrigger-ntugq34yppc8ouwe.js → MenuTrigger-disngqnt74owi30p.js} +32 -41
- package/dist/chunks/{Menubar-d57cyjuztbge4dvv.js → Menubar-fluuxyn8c2zuz5pr.js} +12 -23
- package/dist/chunks/{MenubarContext-ei2r6vu6lmsspozo.js → MenubarContext-blatefsj42br7jh8.js} +1 -1
- package/dist/chunks/{MeterLabel-c40b0q8r81cftkjj.js → MeterLabel-k6no448jvaidaptf.js} +15 -18
- package/dist/chunks/NullStore-jwgpmovsgl47g9bv.js +109 -0
- package/dist/chunks/{PopoverClose-e91n3nkw16qnyese.js → PopoverClose-kpyt8hbqc52lnjb8.js} +183 -190
- package/dist/chunks/PrehydrationScript-j6zlrxmojrqni6b9.js +63 -0
- package/dist/chunks/{RadioGroup-lsix4haqxfigpuv8.js → RadioGroup-pok1e5qbnbujrz1e.js} +38 -35
- package/dist/chunks/{RadioGroupContext-ft0nndmzqynjz8a2.js → RadioGroupContext-galfnl2el7y2krov.js} +1 -1
- package/dist/chunks/{RadioIndicator-mwkahpwyqfc6yk1i.js → RadioIndicator-jd511oajbwmyjxbg.js} +49 -102
- package/dist/chunks/{ScrollAreaThumb-kmhan411yxfo0362.js → ScrollAreaThumb-eed3hf0pmrblshfw.js} +298 -385
- package/dist/chunks/{SelectGroupLabel-m4h5hrft9043nsd1.js → SelectSeparator-mrjooj7vmjez6fua.js} +447 -502
- package/dist/chunks/{Separator-b8wf5rea6m1cei8k.js → Separator-bcm4ezllqxvtpvuj.js} +2 -2
- package/dist/chunks/{SwitchRoot-e3hnyh3mf8qd30hj.js → SwitchRoot-gahuqddsq1s55p8m.js} +40 -85
- package/dist/chunks/{TabsList-c0inft3sf8gi2o4v.js → TabsList-ebl0v8gu8wn28zss.js} +204 -175
- package/dist/chunks/{Toggle-c8p9m3puz8l4mav7.js → Toggle-mbshs50266z9hgxp.js} +12 -13
- package/dist/chunks/{ToggleGroup-xz9zrh7t1htn6ht4.js → ToggleGroup-k2caz2ghv6zbzp5l.js} +13 -38
- package/dist/chunks/{ToggleGroupContext-cdk2zo6ciddpockn.js → ToggleGroupContext-h4v7jaf77rp2xng9.js} +3 -5
- package/dist/chunks/{ToolbarGroupContext-nriz3632ymugfj6h.js → ToolbarGroupContext-e5cg7needj0edodc.js} +3 -5
- package/dist/chunks/{ToolbarInput-er5t9irqvuwcjrir.js → ToolbarInput-i4h95tes75w0p5y2.js} +28 -33
- package/dist/chunks/{ToolbarRootContext-lvi96r1vvs93rhde.js → ToolbarRootContext-eqk40r8uh4h6r211.js} +1 -1
- package/dist/chunks/{TooltipPopup-l2zrbjavf1cqclfx.js → TooltipPopup-dm4y0hbdeylzp22y.js} +125 -127
- package/dist/chunks/{TooltipProvider-eyhgia63aq2x4frl.js → TooltipProvider-h40qf9wcn0atj15v.js} +14 -17
- package/dist/chunks/adaptiveOriginMiddleware-b8ztjthe278xq7lm.js +51 -0
- package/dist/chunks/{addEventListener-lhqvk2ahlzjsanyg.js → addEventListener-l40nxvf06iukgvnj.js} +1 -1
- package/dist/chunks/areArraysEqual-bcx201k1x9ziizym.js +15 -0
- package/dist/chunks/{autocomplete-dn6g4rc8bktdl4an.js → autocomplete-m6h1pbygknrz5div.js} +7 -7
- package/dist/chunks/{badge-xw5ydgdjx2o5qxbl.js → badge-dq8bx752b9dp7dst.js} +2 -1
- package/dist/chunks/{banner-n1ekcvrwashsgv93.js → banner-msnmqm7of2lck01x.js} +2 -2
- package/dist/chunks/{breadcrumbs-ffwe8tzqzmpyikq5.js → breadcrumbs-lhi1qrdh74mb4zsx.js} +4 -3
- package/dist/chunks/button-group-i9dh83xutyuxyry7.js +59 -0
- package/dist/chunks/{button-h36q7tklakhd38nx.js → button-pa1bq9b85hawg41a.js} +1 -1
- package/dist/chunks/{chart-qmls2klknm1pd6hs.js → chart-kd1xd6crso2i956o.js} +936 -49
- package/dist/chunks/{checkbox-jachq6akfh72x12r.js → checkbox-lbo436duy7krxcsk.js} +6 -7
- package/dist/chunks/clamp-jcjhzx71s6wt1rnc.js +7 -0
- package/dist/chunks/{clipboard-text-ms46uaujvkjmjnng.js → clipboard-text-gd6s3n1bqse9zgt8.js} +5 -5
- package/dist/chunks/{collapsible-jyajpe40jcca357s.js → collapsible-l8g94on4w7qfosmn.js} +1 -1
- package/dist/chunks/{combobox-hxarufzb1z61xnbv.js → combobox-hdxtsm2gqcxxgfju.js} +12 -11
- package/dist/chunks/{command-palette-iomiziccabzh4ogg.js → command-palette-crtm3nd32yjhuax1.js} +7 -7
- package/dist/chunks/{composite-o65hjzwwzb4kvl4w.js → composite-ab8dmdfoj6tmhcn1.js} +9 -21
- package/dist/chunks/{constants-j09lrtg73n4vlx5x.js → constants-flxfd6q03phtu007.js} +1 -1
- package/dist/chunks/{core-kjfqbvgicl9i3abf.js → core-n0de50o00ej2ecfe.js} +69 -55
- package/dist/chunks/createBaseUIEventDetails-3ob3qgs95ffm8l0w.js +49 -0
- package/dist/chunks/{ComboboxChipRemove-ksyozjezihhstmbu.js → createItems-b8n8vigg5nak6j9s.js} +113 -57
- package/dist/chunks/{createToastManager-kv89sv0xhhsvmq54.js → createToastManager-onmoqrmr8zo02rif.js} +305 -357
- package/dist/chunks/{css-d3t41yfupsmz7l1a.js → css-j501gxq1am2gnikh.js} +1 -1
- package/dist/chunks/{date-picker-fwe3vllwco4u1utz.js → date-picker-cotkexrpqu5tjikv.js} +54 -49
- package/dist/chunks/{date-range-picker-iymdx410i1hpvxai.js → date-range-picker-i6d8y1yemm7x5ins.js} +15 -14
- package/dist/chunks/{dialog-o0164pgcyc74lvp9.js → dialog-glpnivujociqs9lh.js} +13 -10
- package/dist/chunks/{dropdown-d5qrzj1w1a96w2we.js → dropdown-m53ji1d66mws89wh.js} +4 -4
- package/dist/chunks/{empty-ox60d384lkwbj5n4.js → empty-hkvg3is3uc6dj1at.js} +46 -38
- package/dist/chunks/{engine-io35xsj9fgfxtihg.js → engine-g5egnkub1ikv3wvy.js} +2 -2
- package/dist/chunks/{engine-javascript-d795u677f1802oaf.js → engine-javascript-e9xj8hhz9xfqhpnu.js} +200 -185
- package/dist/chunks/{engine-oniguruma-xjlw46ay321yj1av.js → engine-oniguruma-ias56ildu01gf939.js} +8 -7
- package/dist/chunks/error-f4f6l13zx6tynxmy.js +6 -0
- package/dist/chunks/{field-kgz7w7yixmtpg010.js → field-oqtso1v0oszlxi0e.js} +3 -3
- package/dist/chunks/{flow-fmfb3ri8cxo7w9ci.js → flow-iz8sn24h5q6q4b10.js} +76 -60
- package/dist/chunks/formatNumber-kcnmauoqxku5a84c.js +21 -0
- package/dist/chunks/{getCssDimensions-mi941fe1jvztqm6b.js → getCssDimensions-olosvhh5husavesv.js} +2 -2
- package/dist/chunks/getElementTransform-cuiqmjglkrz4db6c.js +38 -0
- package/dist/chunks/{getPseudoElementBounds-jg72lmrlwgbqhmjh.js → getPseudoElementBounds-x7b9uqi5hdb1lq2r.js} +13 -4
- package/dist/chunks/{github-light-kb466scjoy42qxpu.js → github-light-hir7yctc38258pwt.js} +1 -1
- package/dist/chunks/{graphql-gtqr4wytdf0qjybo.js → graphql-n9vlzkvcp2j19p7a.js} +1 -1
- package/dist/chunks/{html-ijyj3f9k0foag15c.js → html-nimj6ljkkifnc9ni.js} +2 -2
- package/dist/chunks/{index.parts-i4iu310eo65d7lfc.js → index.parts-b9zmk3ta77w8dy9f.js} +86 -34
- package/dist/chunks/{index.parts-mr7tgwe4pgfozkt5.js → index.parts-bq90erougcgrwlgk.js} +47 -50
- package/dist/chunks/{index.parts-7z8hqx6zl9yajzvs.js → index.parts-c1ocmbxanagpan6d.js} +206 -366
- package/dist/chunks/{index.parts-nd3mitrhxf806lsa.js → index.parts-cc0yi5vo7s4x3r9p.js} +140 -145
- package/dist/chunks/{index.parts-j2ecf25zajyd5ia3.js → index.parts-cdxa6fwtp3lpkpp4.js} +2 -2
- package/dist/chunks/{index.parts-komdbdvf823cm5jw.js → index.parts-cl2xux9bjec6cibd.js} +14 -11
- package/dist/chunks/{index.parts-bv57na43ve93uz3x.js → index.parts-d4wim8mcnl9a2n9d.js} +67 -36
- package/dist/chunks/{index.parts-gslyp9n88qdh38n1.js → index.parts-e9s1lqq3qa9l6ndm.js} +2 -2
- package/dist/chunks/{index.parts-i4lbjqdnhsnjtny6.js → index.parts-eks3uafpskcxle6j.js} +33 -22
- package/dist/chunks/{index2.parts-kiwz8e3k8utvm4zb.js → index.parts-fbip2x29k5okvypg.js} +9 -12
- package/dist/chunks/index.parts-fhza3s183grld7zq.js +102 -0
- package/dist/chunks/{index.parts-lz9cnngidxppvhz7.js → index.parts-ftxrjoy00esi3aau.js} +27 -40
- package/dist/chunks/{index.parts-kt0w73ciea6adi2i.js → index.parts-g390bxx23hdko02m.js} +2 -2
- package/dist/chunks/{index.parts-fl4zaorc97ed3keb.js → index.parts-gf9v1piz8xxt8ap1.js} +197 -244
- package/dist/chunks/{index.parts-ef9111sjk9e3al87.js → index.parts-h7wtkrxpz4m8eqn9.js} +63 -83
- package/dist/chunks/index.parts-hmx3qlh517ii56yi.js +116 -0
- package/dist/chunks/{index2.parts-mv7x6w0p2splvf6b.js → index.parts-i6gbeimeit8gzhvi.js} +2 -2
- package/dist/chunks/{index.parts-gj1k50tf9fcs7nru.js → index.parts-ioii4acz2bjrf6sb.js} +17 -21
- package/dist/chunks/{index.parts-i5twygaksh86erb7.js → index.parts-iq66xivmdw2mouvx.js} +7 -6
- package/dist/chunks/{index.parts-hxjt52jbictdzgad.js → index.parts-j6kbr29a542ya81m.js} +275 -388
- package/dist/chunks/{index.parts-lhpuh6pw7rjcddnl.js → index.parts-jjup1zgnozoxi7ky.js} +41 -57
- package/dist/chunks/index.parts-jknln7yxhdokkvd6.js +991 -0
- package/dist/chunks/{index.parts-nzwjx603vcq1kryz.js → index.parts-jpm6c0fe0gyky12m.js} +22 -54
- package/dist/chunks/{index.parts-jmb5ztstw4xlfyp9.js → index.parts-kgiqby97w6tn6jw7.js} +15 -20
- package/dist/chunks/{index.parts-c5yto0l67i7ok5fd.js → index.parts-lpafjiz853r94ydb.js} +59 -59
- package/dist/chunks/{index.parts-cpviii2nt413tb8k.js → index.parts-moguar0t0u4aumou.js} +6 -5
- package/dist/chunks/{index.parts-ieuelcd4z5e0mcb7.js → index.parts-mw0e646n3qp6v1qe.js} +11 -11
- package/dist/chunks/{index.parts-nc6jzjq91z2nye75.js → index.parts-olcmo45gi8e1qma1.js} +2 -3
- package/dist/chunks/{index.parts-bmzuqorz0tmneh7t.js → index.parts-p2lcxzhh1ll3584m.js} +41 -39
- package/dist/chunks/{inertValue-f9pgp32jxnm88df3.js → inertValue-e0o6qvuef83v78fk.js} +2 -2
- package/dist/chunks/inline-copy-text-gbd7jhwpor27l4rq.js +104 -0
- package/dist/chunks/{input-pehjmr1q131tz38w.js → input-c8lv9ulv0kortliq.js} +2 -2
- package/dist/chunks/{input-group-kshukialqry0fmra.js → input-group-fjr4r5ax0x78ppax.js} +10 -7
- package/dist/chunks/{input-ikfimmpl5sngvh9s.js → input-h5ox92gf13ge04hp.js} +11 -10
- package/dist/chunks/{isElementDisabled-ffsy1y4adxocmexb.js → isElementDisabled-o0j7po84u0xjuwgg.js} +1 -1
- package/dist/chunks/{label-ie2gpde0nco1avi7.js → label-gzyfw17u08irhdo8.js} +2 -2
- package/dist/chunks/{layer-card-dnikj7emx8qeaspz.js → layer-card-idh3863vdgprgqai.js} +5 -3
- package/dist/chunks/layer-dialog-j5ywmzs46ccg6oqy.js +381 -0
- package/dist/chunks/{link-gp4swsrd3vfnvori.js → link-cqyfjezntvr53rh7.js} +2 -2
- package/dist/chunks/locale-provider-kjlnws7jln3ak0dr.js +29 -0
- package/dist/chunks/{menubar-ljbsj2ulayebjyza.js → menubar-fjhotkmndttb8mua.js} +13 -12
- package/dist/chunks/{mergeCleanups-pexn3wul6a4zn873.js → mergeCleanups-ix8l84cgutsbotpd.js} +1 -1
- package/dist/chunks/{meter-fl03ece4glrrzizj.js → meter-majprsslwmpbmkzg.js} +1 -1
- package/dist/chunks/{pagination-i3jewbdolgru0xnr.js → pagination-oaenm9t7ou3lmcgw.js} +2 -2
- package/dist/chunks/{popover-jal8z9sv176703lf.js → popover-hr0bfgg48xzjggky.js} +2 -2
- package/dist/chunks/popupHandle-7ghmro8a5uerjwu5.js +177 -0
- package/dist/chunks/{popupStoreUtils-jrxqkz5jmlijlr91.js → popupStoreUtils-i0y57dvmcnqrh4pv.js} +178 -101
- package/dist/chunks/{popupStateMapping-hdv48wmkzb2mqful.js → popupTriggerMap-ehv0fuhnmy59j3pn.js} +167 -193
- package/dist/chunks/{portal-provider-gznk6snyqj6egd6d.js → portal-provider-eveknxf26oudn7pp.js} +4 -0
- package/dist/chunks/{radio-gvy6ekh5hu9awlru.js → radio-35dx7y6rjrezbjsp.js} +4 -4
- package/dist/chunks/reason-parts-m5ishukzeux3q0pc.js +39 -0
- package/dist/chunks/{resolveAriaLabelledBy-h9qwvo10ftlj6t9k.js → resolveAriaLabelledBy-nc8mdie5shy87nsb.js} +1 -1
- package/dist/chunks/{resolveValueLabel-bq3nrzord518kp9q.js → resolveValueLabel-hpmsash3ektitvnb.js} +44 -10
- package/dist/chunks/{safePolygon-szbj0u31i6mpt36d.js → safePolygon-kmd5wsz26l4xtj6c.js} +35 -29
- package/dist/chunks/{safeReact-bavzz23j5tex60z2.js → safeReact-hpp4cck3y2s5jg75.js} +2 -2
- package/dist/chunks/scrollable-b6m9ze1u7ps0q1qn.js +34 -0
- package/dist/chunks/{select-ndqpqpmqtmn497rq.js → select-futox5zqr3r80y9a.js} +8 -9
- package/dist/chunks/{sensitive-input-jtbp3mvdynz9wewu.js → sensitive-input-cw33yncetxk3fbrl.js} +3 -3
- package/dist/chunks/{serializeValue-ci3kihruew64i36f.js → serializeValue-ipcakiw32jb7kany.js} +1 -1
- package/dist/chunks/{sidebar-icky50wdc2b1biw8.js → sidebar-in9zhvr473afsjpp.js} +104 -31
- package/dist/chunks/{skeleton-line-hlk5vauzo7xsalbo.js → skeleton-line-m9dyh126t9k07jvg.js} +8 -5
- package/dist/chunks/{sql-do9h6435gka97c4c.js → sql-hqp2eekl7qhmxe92.js} +1 -1
- package/dist/chunks/{stringifyLocale-cl8et9xf6zon4qbs.js → stringifyLocale-bxsgxdnzaef2vcar.js} +1 -1
- package/dist/chunks/{styles-dbhgpd8fm76fdfo3.js → styles-kl02oyrlnld7arja.js} +2 -2
- package/dist/chunks/{surface-ef2kr5pn7r1y3ipk.js → surface-irf0af2mfglu4p0j.js} +1 -1
- package/dist/chunks/{switch-oghrd7f6i5jqar59.js → switch-cqsvolm7h69z7vgg.js} +3 -3
- package/dist/chunks/{table-miggde3uqhhrd5at.js → table-yf8ul2e5nbemioi1.js} +1 -1
- package/dist/chunks/{tabs-mr2dsloqfe0io4a5.js → tabs-gf57qqf1wcclaejq.js} +1 -1
- package/dist/chunks/tag-input-ohfybx5dbxy3houy.js +139 -0
- package/dist/chunks/{text-jzp4mdlr222iuzxt.js → text-f1wxz183ckq7qtl7.js} +3 -2
- package/dist/chunks/{toast-g435fvt74w5orxqo.js → toast-bzaothy2yrezh787.js} +7 -6
- package/dist/chunks/{toolbar-e0b61hr6ys6dmwhv.js → toolbar-h213d8e22yjh5cwq.js} +6 -5
- package/dist/chunks/{tooltip-jq15p5jzgfrhslpo.js → tooltip-o4natsv01lpq8oq2.js} +3 -3
- package/dist/chunks/{useAnchoredPopupScrollLock-lbrqp1zm5z821z20.js → useAnchoredPopupScrollLock-kp3kai20u91sdm7v.js} +4 -4
- package/dist/chunks/{useAnimationFrame-ssgc72hyq6sg3yit.js → useAnimationFrame-0tt315hl9n3jzl86.js} +5 -4
- package/dist/chunks/{useAriaLabelledBy-bvw56m1d7czf0w3f.js → useAriaLabelledBy-ox8dum59shmgypq1.js} +3 -6
- package/dist/chunks/{useBaseUiId-gqkl5ep5pn6hd0rw.js → useBaseUiId-lg1teubxudgin0w2.js} +2 -2
- package/dist/chunks/{useButton-cpo6u2idqcnou6vy.js → useButton-h7s9aq1sfw6arawe.js} +56 -21
- package/dist/chunks/{useClick-fvwb39qgead2jyft.js → useClick-l0p0endoxrlp0ae5.js} +8 -7
- package/dist/chunks/{useCollapsiblePanel-bw63vwvq9a3sj73q.js → useCollapsiblePanel-g6t146nqj521pild.js} +60 -71
- package/dist/chunks/{useCompositeItem-esr3n4pmlssiuxuy.js → useCompositeItem-p7090ga00dpqcg5j.js} +4 -4
- package/dist/chunks/useCompositeListItem-odg6yo4h8866b37o.js +54 -0
- package/dist/chunks/{useControlled-nlx0kk1ksgk0auvi.js → useControlled-lfns1ot6kwowa4t4.js} +3 -3
- package/dist/chunks/{useDismiss-kbtx2o3ruyh3jwgn.js → useDismiss-me91ertzzz3gly12.js} +54 -23
- package/dist/chunks/useFieldValidation-e5pc8loiwzd68g4f.js +224 -0
- package/dist/chunks/{useFilteredItems-ns32d3hpp626kt73.js → useFilteredItems-kw2za6m9bng7twr0.js} +36 -38
- package/dist/chunks/{useFloatingRootContext-o6mk8fvodtbbm2v1.js → useFloatingRootContext-c849wtis7gx013m8.js} +7 -7
- package/dist/chunks/{useFocus-gdfx28bn90keg8cf.js → useFocus-lqwrnfa1svv3bcx1.js} +14 -10
- package/dist/chunks/{useForcedRerendering-el1fbg3ib5yo0v7k.js → useForcedRerendering-i3n4ms0xose8borh.js} +1 -1
- package/dist/chunks/{useId-l9soitgw3e4jk5ie.js → useId-f8w657f9yys10abm.js} +2 -2
- package/dist/chunks/{useLabel-nh9hf8h7o6oquqn5.js → useLabel-kcggu762z3z2taeb.js} +10 -9
- package/dist/chunks/useLabelableId-gqiiuqqn2k0u62r4.js +56 -0
- package/dist/chunks/{useListNavigation-jnxpvegv3ak857b1.js → useListNavigation-3nyjs362qcau34in.js} +51 -39
- package/dist/chunks/{useOnMount-j4wobeq47l3u9olo.js → useOnMount-hadwgyauanbzrvem.js} +3 -3
- package/dist/chunks/{useOpenChangeComplete-dpkex2e23s1evpol.js → useOpenChangeComplete-lk2gfu250t7r20c6.js} +48 -38
- package/dist/chunks/usePopupHandleStore-hx871cmn66j0q7wz.js +27 -0
- package/dist/chunks/{usePopupViewport-hu0kn0ziyf1vqzrs.js → usePopupViewport-iy5j9zawjrr3pcs0.js} +89 -57
- package/dist/chunks/{usePositioner-fz9uswhkhg22lo42.js → usePositioner-k9nc7cl550bgfwzs.js} +151 -142
- package/dist/chunks/{usePreviousValue-le0grv8f43vmunn1.js → usePreviousValue-io5t1pdxehw21l85.js} +2 -2
- package/dist/chunks/{useRegisterFieldControl-m1rxsuvtpau2341n.js → useRegisterFieldControl-lvusf6vc963clx02.js} +16 -10
- package/dist/chunks/{useRegisteredLabelId-dh83mybmzy75waje.js → useRegisteredLabelId-hw6b87h1k7kow1o2.js} +4 -4
- package/dist/chunks/{useRender-gtnbrp1ityffi4xf.js → useRender-onwjigxa00uch2ip.js} +2 -2
- package/dist/chunks/{useRenderDialogRoot-hhowqeoreyr6uuc7.js → useRenderDialogRoot-lddunc01twftravv.js} +123 -110
- package/dist/chunks/{useRenderElement-m8kc7jyuczp71mq8.js → useRenderElement-lrvp2pwrpt5zq1zd.js} +56 -46
- package/dist/chunks/{useScrollLock-mpns3u42eks8hhex.js → useScrollLock-buonkbwuland9wl3.js} +65 -38
- package/dist/chunks/{useStableCallback-ninxmksdjvwl6ejj.js → useStableCallback-b1i1ghzd9k75bb85.js} +3 -3
- package/dist/chunks/{useSwipeDismiss-bpbyw2ihsw3fw6y9.js → useSwipeDismiss-m1s13x9t9ey9ax3p.js} +73 -175
- package/dist/chunks/{useTimeout-oqptmu2xmyv5ccic.js → useTimeout-cpql3c8p250cr093.js} +3 -3
- package/dist/chunks/{useTransitionStatus-ig4waxl2kervpyw4.js → useTransitionStatus-bwqaavnekreihom2.js} +9 -5
- package/dist/chunks/{useTriggerFocusGuards-j8nano0pqu9dscrz.js → useTriggerFocusGuards-lz7wt484xltizro4.js} +4 -3
- package/dist/chunks/{useTypeahead-onenwjyhgw955ygx.js → useTypeahead-kvag4w6hu2g1kbwt.js} +10 -17
- package/dist/chunks/{useValueAsRef-lrn42zari17368c9.js → useValueAsRef-o4s9ohb3aczypmnk.js} +3 -3
- package/dist/chunks/{useValueChanged-kthmz4wk7ywnjwtx.js → useValueChanged-cz5wflhe8g15n6w1.js} +5 -8
- package/dist/chunks/{valueToPercent-henpkkj3juy3ukeu.js → valueToPercent-d7gbqk1umostj7ch.js} +1 -1
- package/dist/chunks/{vendor-floating-ui-dsysdmve7iazaaes.js → vendor-floating-ui-fqblx3wa0r71mjoo.js} +87 -187
- package/dist/chunks/{vendor-utils-luqsvbyuig727bnr.js → vendor-utils-ecfbsk425x1bm0gh.js} +119 -29
- package/dist/chunks/vesper-g839e590k3dxnwh3.js +5 -0
- package/dist/chunks/{visuallyHidden-n14xllazfozg55ox.js → visuallyHidden-nous086atnlxtf74.js} +1 -1
- package/dist/chunks/{wasm-nfbosyhilcq70atf.js → wasm-cpasy0o9lsjrm39j.js} +1 -1
- package/dist/code/server.d.ts +9 -10
- package/dist/code/server.js +8 -7
- package/dist/code.d.ts +8 -8
- package/dist/code.js +18 -16
- 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.d.ts +2 -0
- package/dist/components/button-group.js +3 -0
- package/dist/components/button.js +1 -1
- package/dist/components/chart.d.ts +2 -2
- package/dist/components/chart.js +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.d.ts +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/dialog.d.ts +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/inline-copy-text.d.ts +2 -0
- package/dist/components/inline-copy-text.js +3 -0
- package/dist/components/input-group.d.ts +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/label.js +1 -1
- package/dist/components/layer-card.js +1 -1
- package/dist/components/layer-dialog.d.ts +2 -0
- package/dist/components/layer-dialog.js +3 -0
- package/dist/components/link.d.ts +8 -9
- package/dist/components/link.js +1 -1
- package/dist/components/loader.js +1 -1
- 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.d.ts +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sensitive-input.d.ts +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/surface.js +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table-of-contents.d.ts +1 -1
- package/dist/components/table.d.ts +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tag-input.d.ts +2 -0
- package/dist/components/tag-input.js +3 -0
- package/dist/components/text.d.ts +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toolbar.d.ts +1 -1
- package/dist/components/toolbar.js +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/{index-BXsHCLB82.d.ts → index--RbAKeBL.d.ts} +1 -1
- package/dist/{index-CeBzVJP8.d.ts → index-BK1tZgmP.d.ts} +1 -1
- package/dist/{index-CGbkysYW2.d.ts → index-BMe3cpLB.d.ts} +5 -4
- package/dist/{index-Di3sC6UF.d.ts → index-C0d8uwYO.d.ts} +4 -4
- package/dist/index-C7RoG_CH.d.ts +57 -0
- package/dist/{index-DBlw3E9m.d.ts → index-CNJRbVxG.d.ts} +1 -1
- package/dist/{index-BcRyiNd72.d.ts → index-ChGFA5-n.d.ts} +5 -1
- package/dist/index-CiwC1j1N.d.ts +37 -0
- package/dist/{index-BoPqM1Ia2.d.ts → index-Cqrye3KD.d.ts} +1 -1
- package/dist/{index-Bw3M24Mi.d.ts → index-CrQi3QCY.d.ts} +2 -1
- package/dist/{index-BlEUcijd.d.ts → index-CtTNoYA2.d.ts} +69 -1
- package/dist/{index-D97n4Bpf2.d.ts → index-DWZia2ui.d.ts} +1 -1
- package/dist/index-NqlNd7cQ.d.ts +144 -0
- package/dist/index-jNWPjJl9.d.ts +75 -0
- package/dist/index.d.ts +31 -26
- package/dist/index.js +49 -44
- package/dist/{input-group-DpGSsAZy.d.ts → input-group-B3M_WRqm.d.ts} +1 -1
- package/dist/locale-provider-BLGya10h.d.ts +28 -0
- package/dist/{portal-provider-4AHCxYE6.d.ts → portal-provider-BAqPpq_a.d.ts} +4 -0
- package/dist/primitives/accordion.js +1 -1
- package/dist/primitives/alert-dialog.js +1 -1
- package/dist/primitives/autocomplete.js +1 -1
- package/dist/primitives/avatar.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/checkbox-group.js +1 -1
- package/dist/primitives/checkbox.js +1 -1
- package/dist/primitives/collapsible.js +1 -1
- package/dist/primitives/combobox.js +1 -1
- package/dist/primitives/context-menu.js +1 -1
- package/dist/primitives/csp-provider.js +1 -1
- package/dist/primitives/dialog.js +1 -1
- package/dist/primitives/direction-provider.js +2 -2
- package/dist/primitives/drawer.js +1 -1
- package/dist/primitives/field.js +1 -1
- package/dist/primitives/fieldset.js +1 -1
- package/dist/primitives/form.js +1 -1
- package/dist/primitives/input.js +1 -1
- package/dist/primitives/menu.js +1 -1
- package/dist/primitives/menubar.js +1 -1
- package/dist/primitives/meter.js +1 -1
- package/dist/primitives/navigation-menu.js +1 -1
- package/dist/primitives/number-field.js +1 -1
- package/dist/primitives/otp-field.js +1 -1
- package/dist/primitives/popover.js +1 -1
- package/dist/primitives/preview-card.js +1 -1
- package/dist/primitives/progress.js +1 -1
- package/dist/primitives/radio-group.js +1 -1
- package/dist/primitives/radio.js +1 -1
- package/dist/primitives/scroll-area.js +1 -1
- package/dist/primitives/select.js +1 -1
- package/dist/primitives/separator.js +1 -1
- package/dist/primitives/slider.js +1 -1
- package/dist/primitives/switch.js +1 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/primitives/toast.js +1 -1
- package/dist/primitives/toggle-group.js +1 -1
- package/dist/primitives/toggle.js +1 -1
- package/dist/primitives/toolbar.js +1 -1
- package/dist/primitives/tooltip.js +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +41 -41
- package/dist/scripts/theme-generator/config.d.ts +4 -5
- package/dist/scripts/theme-generator/types.d.ts +12 -13
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/{index-Dzzi1o7w2.d.ts → text-B4l7S5Z0.d.ts} +60 -1
- package/dist/{tooltip-BuCo6Ki4.d.ts → tooltip-D_vhi1PN.d.ts} +1 -1
- package/dist/{types-C402rKiz.d.ts → types-C6in2C8V.d.ts} +6 -3
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +3 -2
- package/package.json +22 -5
- package/scripts/component-registry/discovery.ts +3 -0
- package/scripts/component-registry/metadata.ts +37 -0
- package/scripts/generate-globe-land-mask.mjs +80 -0
- package/dist/chunks/CheckboxIndicator-igofmpn0wcfdqooa.js +0 -49
- package/dist/chunks/CompositeList-tx08unuok7wsl2d9.js +0 -129
- package/dist/chunks/DialogHandle-b3froel96o9fwjmm.js +0 -139
- package/dist/chunks/DialogRoot-fp7d16uxogvye294.js +0 -15
- package/dist/chunks/FieldLabel-f6vwzm8nefzxwlh8.js +0 -558
- package/dist/chunks/Form-is7d5c1kbk1wn39s.js +0 -102
- package/dist/chunks/areArraysEqual-nlbeaqlzf4274zr3.js +0 -7
- package/dist/chunks/clamp-kvu4wtr1dw6b3pnd.js +0 -7
- package/dist/chunks/createBaseUIEventDetails-ddivuhl74gni72qn.js +0 -86
- package/dist/chunks/error-mm98alb8acdy93vq.js +0 -15
- package/dist/chunks/formatNumber-hjijm58g645q6a0n.js +0 -26
- package/dist/chunks/getEmptyRootContext-ekvv3rp5w16ewoqx.js +0 -18
- package/dist/chunks/index.parts-hve0zir3biaolih0.js +0 -128
- package/dist/chunks/index.parts-jv5kiaeixrjah9js.js +0 -119
- package/dist/chunks/index.parts-k7ezm98skegahepw.js +0 -2464
- package/dist/chunks/store-9b2cp7rx1dvq90fp.js +0 -88
- package/dist/chunks/useCompositeListItem-0exfww37ospqz69b.js +0 -75
- package/dist/chunks/useIsHydrating-b6whcsimonagru6u.js +0 -22
- package/dist/chunks/useLabelableId-b1kwq9st3rjrtakn.js +0 -60
- package/dist/chunks/vesper-ho3j3gt6ilwfuc1g.js +0 -5
- package/dist/cn-DCSItmT-.d.ts +0 -5
- /package/dist/{index-AMEc1MEg2.d.ts → index-AMEc1MEg.d.ts} +0 -0
- /package/dist/{index-D2Gvly0i2.d.ts → index-D2Gvly0i.d.ts} +0 -0
- /package/dist/{index-DIV3riUd2.d.ts → index-DIV3riUd.d.ts} +0 -0
- /package/dist/{index-FCkuxSvs2.d.ts → index-FCkuxSvs.d.ts} +0 -0
- /package/dist/{index-_Sl5wohy2.d.ts → index-_Sl5wohy.d.ts} +0 -0
- /package/dist/{index-bAud6rG22.d.ts → index-bAud6rG2.d.ts} +0 -0
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as EMPTY_ARRAY, c as warn, d as useRefWithInit, o as EMPTY_OBJECT, r as mergeProps,
|
|
3
|
-
import {
|
|
4
|
-
import { n as useIsoLayoutEffect, t as SafeReact } from "./safeReact-
|
|
5
|
-
import { n as useTimeout } from "./useTimeout-
|
|
6
|
-
import {
|
|
7
|
-
import { C as getParentNode, D as isLastTraversableNode, E as isHTMLElement } from "./vendor-floating-ui-
|
|
8
|
-
import { n as useHoverReferenceInteraction, r as useHoverFloatingInteraction, t as safePolygon } from "./safePolygon-
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { i as
|
|
16
|
-
import { t as
|
|
17
|
-
import {
|
|
18
|
-
import { t as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { t as
|
|
27
|
-
import { t as
|
|
28
|
-
import { t as
|
|
29
|
-
import { t as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
2
|
+
import { a as EMPTY_ARRAY, c as warn, d as useMergedRefs, f as useRefWithInit, o as EMPTY_OBJECT, r as mergeProps, s as NOOP, t as useRenderElement } from "./useRenderElement-lrvp2pwrpt5zq1zd.js";
|
|
3
|
+
import { _ as fastComponent, f as POPUP_COLLISION_AVOIDANCE, g as voiceOver, i as FloatingPortal, r as ReactStore, t as PopupTriggerMap, u as DROPDOWN_COLLISION_AVOIDANCE } from "./popupTriggerMap-ehv0fuhnmy59j3pn.js";
|
|
4
|
+
import { n as useIsoLayoutEffect, t as SafeReact } from "./safeReact-hpp4cck3y2s5jg75.js";
|
|
5
|
+
import { n as useTimeout } from "./useTimeout-cpql3c8p250cr093.js";
|
|
6
|
+
import { R as transitionStatusMapping, at as mac, j as triggerOpenStateMapping, k as popupTransitionStateMapping } from "./vendor-utils-ecfbsk425x1bm0gh.js";
|
|
7
|
+
import { C as getParentNode, D as isLastTraversableNode, E as isHTMLElement } from "./vendor-floating-ui-fqblx3wa0r71mjoo.js";
|
|
8
|
+
import { n as useHoverReferenceInteraction, r as useHoverFloatingInteraction, t as safePolygon } from "./safePolygon-kmd5wsz26l4xtj6c.js";
|
|
9
|
+
import { O as siblingOpen, d as imperativeAction, y as itemPress } from "./reason-parts-m5ishukzeux3q0pc.js";
|
|
10
|
+
import { t as createChangeEventDetails } from "./createBaseUIEventDetails-3ob3qgs95ffm8l0w.js";
|
|
11
|
+
import { t as useStableCallback } from "./useStableCallback-b1i1ghzd9k75bb85.js";
|
|
12
|
+
import { t as useDismiss } from "./useDismiss-me91ertzzz3gly12.js";
|
|
13
|
+
import { a as FloatingFocusManager, n as InternalBackdrop, r as useOpenInteractionType } from "./useScrollLock-buonkbwuland9wl3.js";
|
|
14
|
+
import { t as useId$1 } from "./useId-f8w657f9yys10abm.js";
|
|
15
|
+
import { i as useFloatingParentNodeId, n as FloatingTree, o as FloatingTreeStore, r as useFloatingNodeId, t as FloatingNode } from "./FloatingTree-lhdqtlu8s6m66n7l.js";
|
|
16
|
+
import { n as useAnimationsFinished, t as useOpenChangeComplete } from "./useOpenChangeComplete-lk2gfu250t7r20c6.js";
|
|
17
|
+
import { t as useClick } from "./useClick-l0p0endoxrlp0ae5.js";
|
|
18
|
+
import { c as useOpenStateTransitions, i as attachPreventUnmountOnClose, l as usePopupInteractionProps, m as useSyncedFloatingRootContext, n as PopupHandleAttachment, o as createPopupOpenState, p as useTriggerRegistration, s as useImplicitActiveTrigger, t as FOCUSABLE_POPUP_PROPS } from "./popupStoreUtils-i0y57dvmcnqrh4pv.js";
|
|
19
|
+
import { t as useTransitionStatus } from "./useTransitionStatus-bwqaavnekreihom2.js";
|
|
20
|
+
import { n as createInitialPopupStoreState, r as popupStoreSelectors, t as NullStore } from "./NullStore-jwgpmovsgl47g9bv.js";
|
|
21
|
+
import { n as getDisabledMountTransitionStyles, r as useAnchorPositioning, t as usePositioner } from "./usePositioner-k9nc7cl550bgfwzs.js";
|
|
22
|
+
import { t as useListNavigation } from "./useListNavigation-3nyjs362qcau34in.js";
|
|
23
|
+
import { t as useTypeahead } from "./useTypeahead-kvag4w6hu2g1kbwt.js";
|
|
24
|
+
import { t as useBaseUiId } from "./useBaseUiId-lg1teubxudgin0w2.js";
|
|
25
|
+
import { n as useDirection } from "./DirectionContext-opvqcb794uxicri4.js";
|
|
26
|
+
import { t as inertValue } from "./inertValue-e0o6qvuef83v78fk.js";
|
|
27
|
+
import { t as useControlled } from "./useControlled-lfns1ot6kwowa4t4.js";
|
|
28
|
+
import { r as dispatchClickWithModifiers, t as useButton } from "./useButton-h7s9aq1sfw6arawe.js";
|
|
29
|
+
import { t as CompositeList } from "./CompositeList-lbr4enu6yzek7oa9.js";
|
|
30
|
+
import { t as useAnchoredPopupScrollLock } from "./useAnchoredPopupScrollLock-kp3kai20u91sdm7v.js";
|
|
31
|
+
import { t as useCompositeListItem } from "./useCompositeListItem-odg6yo4h8866b37o.js";
|
|
32
|
+
import { n as useToolbarRootContext } from "./ToolbarRootContext-eqk40r8uh4h6r211.js";
|
|
33
|
+
import { t as isElementDisabled } from "./isElementDisabled-o0j7po84u0xjuwgg.js";
|
|
34
|
+
import { a as COMPOSITE_KEYS } from "./composite-ab8dmdfoj6tmhcn1.js";
|
|
35
|
+
import { n as useMenubarContext } from "./MenubarContext-blatefsj42br7jh8.js";
|
|
35
36
|
import * as React$1 from "react";
|
|
36
37
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
37
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
38
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/positioner/MenuPositionerContext.mjs
|
|
38
39
|
const MenuPositionerContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
39
40
|
MenuPositionerContext.displayName = "MenuPositionerContext";
|
|
40
41
|
function useMenuPositionerContext(optional) {
|
|
@@ -43,7 +44,7 @@ function useMenuPositionerContext(optional) {
|
|
|
43
44
|
return context;
|
|
44
45
|
}
|
|
45
46
|
//#endregion
|
|
46
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
47
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/root/MenuRootContext.mjs
|
|
47
48
|
const MenuRootContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
48
49
|
MenuRootContext.displayName = "MenuRootContext";
|
|
49
50
|
function useMenuRootContext(optional) {
|
|
@@ -52,7 +53,7 @@ function useMenuRootContext(optional) {
|
|
|
52
53
|
return context;
|
|
53
54
|
}
|
|
54
55
|
//#endregion
|
|
55
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
56
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/context-menu/root/ContextMenuRootContext.mjs
|
|
56
57
|
const ContextMenuRootContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
57
58
|
ContextMenuRootContext.displayName = "ContextMenuRootContext";
|
|
58
59
|
function useContextMenuRootContext(optional = true) {
|
|
@@ -61,7 +62,7 @@ function useContextMenuRootContext(optional = true) {
|
|
|
61
62
|
return context;
|
|
62
63
|
}
|
|
63
64
|
//#endregion
|
|
64
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
65
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/checkbox-item/MenuCheckboxItemContext.mjs
|
|
65
66
|
const MenuCheckboxItemContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
66
67
|
MenuCheckboxItemContext.displayName = "MenuCheckboxItemContext";
|
|
67
68
|
function useMenuCheckboxItemContext() {
|
|
@@ -70,7 +71,7 @@ function useMenuCheckboxItemContext() {
|
|
|
70
71
|
return context;
|
|
71
72
|
}
|
|
72
73
|
//#endregion
|
|
73
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
74
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/item/useMenuItemCommonProps.mjs
|
|
74
75
|
/**
|
|
75
76
|
* Returns common props shared by all menu item types.
|
|
76
77
|
* This hook extracts the shared logic for id, role, tabIndex, onKeyDown,
|
|
@@ -110,7 +111,7 @@ function useMenuItemCommonProps(params) {
|
|
|
110
111
|
if (isContextMenu && !mac && event.button === 2) return;
|
|
111
112
|
}
|
|
112
113
|
if (itemRef.current && store.context.allowMouseUpTriggerRef.current && (!isContextMenu || event.button === 2)) {
|
|
113
|
-
if (
|
|
114
|
+
if (itemMetadata.type === "regular-item") dispatchClickWithModifiers(itemRef.current, event, { detail: 1 });
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
}), [
|
|
@@ -129,12 +130,10 @@ function useMenuItemCommonProps(params) {
|
|
|
129
130
|
]);
|
|
130
131
|
}
|
|
131
132
|
//#endregion
|
|
132
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
133
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/item/useMenuItem.mjs
|
|
133
134
|
const REGULAR_ITEM = { type: "regular-item" };
|
|
134
135
|
function useMenuItem(params) {
|
|
135
|
-
const { closeOnClick, disabled
|
|
136
|
-
const rootDisabled = store.useState("disabled");
|
|
137
|
-
const disabled = disabledProp || rootDisabled;
|
|
136
|
+
const { closeOnClick, disabled, highlighted, id, store, typingRef = store.context.typingRef, nativeButton, itemMetadata, nodeId } = params;
|
|
138
137
|
const itemRef = React$1.useRef(null);
|
|
139
138
|
const { getButtonProps, buttonRef } = useButton({
|
|
140
139
|
disabled,
|
|
@@ -169,37 +168,26 @@ function useMenuItem(params) {
|
|
|
169
168
|
}), [getItemProps, mergedRef]);
|
|
170
169
|
}
|
|
171
170
|
//#endregion
|
|
172
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
MenuCheckboxItemDataAttributes["unchecked"] = "data-unchecked";
|
|
182
|
-
/**
|
|
183
|
-
* Present when the menu checkbox item is disabled.
|
|
184
|
-
*/
|
|
185
|
-
MenuCheckboxItemDataAttributes["disabled"] = "data-disabled";
|
|
186
|
-
/**
|
|
187
|
-
* Present when the menu checkbox item is highlighted.
|
|
188
|
-
*/
|
|
189
|
-
MenuCheckboxItemDataAttributes["highlighted"] = "data-highlighted";
|
|
190
|
-
return MenuCheckboxItemDataAttributes;
|
|
191
|
-
}({});
|
|
171
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/checkbox-item/MenuCheckboxItemDataAttributes.mjs
|
|
172
|
+
/**
|
|
173
|
+
* Present when the menu checkbox item is checked.
|
|
174
|
+
*/
|
|
175
|
+
const checked = "data-checked";
|
|
176
|
+
/**
|
|
177
|
+
* Present when the menu checkbox item is not checked.
|
|
178
|
+
*/
|
|
179
|
+
const unchecked = "data-unchecked";
|
|
192
180
|
//#endregion
|
|
193
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
181
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/utils/stateAttributesMapping.mjs
|
|
194
182
|
const itemMapping = {
|
|
195
183
|
checked(value) {
|
|
196
|
-
if (value) return { [
|
|
197
|
-
return { [
|
|
184
|
+
if (value) return { [checked]: "" };
|
|
185
|
+
return { [unchecked]: "" };
|
|
198
186
|
},
|
|
199
187
|
...transitionStatusMapping
|
|
200
188
|
};
|
|
201
189
|
//#endregion
|
|
202
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
190
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/checkbox-item/MenuCheckboxItem.mjs
|
|
203
191
|
/**
|
|
204
192
|
* A menu item that toggles a setting on or off.
|
|
205
193
|
* Renders a `<div>` element.
|
|
@@ -207,11 +195,16 @@ const itemMapping = {
|
|
|
207
195
|
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
208
196
|
*/
|
|
209
197
|
const MenuCheckboxItem = /*#__PURE__*/ React$1.forwardRef(function MenuCheckboxItem(componentProps, forwardedRef) {
|
|
210
|
-
const { render, className, id: idProp, label, nativeButton = false, disabled = false, closeOnClick = false, checked: checkedProp, defaultChecked, onCheckedChange, style, ...elementProps } = componentProps;
|
|
211
|
-
const listItem = useCompositeListItem({
|
|
198
|
+
const { render, className, id: idProp, label, nativeButton = false, disabled: disabledProp = false, closeOnClick = false, checked: checkedProp, defaultChecked, onCheckedChange, style, ...elementProps } = componentProps;
|
|
199
|
+
const listItem = useCompositeListItem({
|
|
200
|
+
guess: true,
|
|
201
|
+
label
|
|
202
|
+
});
|
|
212
203
|
const menuPositionerContext = useMenuPositionerContext(true);
|
|
213
204
|
const id = useBaseUiId(idProp);
|
|
214
205
|
const { store } = useMenuRootContext();
|
|
206
|
+
const rootDisabled = store.useState("disabled");
|
|
207
|
+
const disabled = disabledProp || rootDisabled;
|
|
215
208
|
const highlighted = store.useState("isActive", listItem.index);
|
|
216
209
|
const itemProps = store.useState("itemProps");
|
|
217
210
|
const [checked, setChecked] = useControlled({
|
|
@@ -240,7 +233,7 @@ const MenuCheckboxItem = /*#__PURE__*/ React$1.forwardRef(function MenuCheckboxI
|
|
|
240
233
|
checked
|
|
241
234
|
]);
|
|
242
235
|
function handleClick(event) {
|
|
243
|
-
const details = createChangeEventDetails(itemPress, event.nativeEvent, void 0, { preventUnmountOnClose
|
|
236
|
+
const details = createChangeEventDetails(itemPress, event.nativeEvent, void 0, { preventUnmountOnClose: NOOP });
|
|
244
237
|
onCheckedChange?.(!checked, details);
|
|
245
238
|
if (details.isCanceled) return;
|
|
246
239
|
setChecked((currentlyChecked) => !currentlyChecked);
|
|
@@ -271,7 +264,7 @@ const MenuCheckboxItem = /*#__PURE__*/ React$1.forwardRef(function MenuCheckboxI
|
|
|
271
264
|
});
|
|
272
265
|
MenuCheckboxItem.displayName = "MenuCheckboxItem";
|
|
273
266
|
//#endregion
|
|
274
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
267
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/checkbox-item-indicator/MenuCheckboxItemIndicator.mjs
|
|
275
268
|
/**
|
|
276
269
|
* Indicates whether the checkbox item is ticked.
|
|
277
270
|
* Renders a `<span>` element.
|
|
@@ -282,33 +275,36 @@ const MenuCheckboxItemIndicator = /*#__PURE__*/ React$1.forwardRef(function Menu
|
|
|
282
275
|
const { render, className, style, keepMounted = false, ...elementProps } = componentProps;
|
|
283
276
|
const item = useMenuCheckboxItemContext();
|
|
284
277
|
const indicatorRef = React$1.useRef(null);
|
|
285
|
-
const { transitionStatus, setMounted } = useTransitionStatus(item.checked);
|
|
278
|
+
const { transitionStatus, mounted, setMounted } = useTransitionStatus(item.checked);
|
|
286
279
|
useOpenChangeComplete({
|
|
280
|
+
batch: true,
|
|
281
|
+
enabled: !item.checked,
|
|
287
282
|
open: item.checked,
|
|
288
283
|
ref: indicatorRef,
|
|
289
284
|
onComplete() {
|
|
290
285
|
if (!item.checked) setMounted(false);
|
|
291
286
|
}
|
|
292
287
|
});
|
|
288
|
+
const state = {
|
|
289
|
+
checked: item.checked,
|
|
290
|
+
disabled: item.disabled,
|
|
291
|
+
highlighted: item.highlighted,
|
|
292
|
+
transitionStatus
|
|
293
|
+
};
|
|
293
294
|
return useRenderElement("span", componentProps, {
|
|
294
|
-
state
|
|
295
|
-
checked: item.checked,
|
|
296
|
-
disabled: item.disabled,
|
|
297
|
-
highlighted: item.highlighted,
|
|
298
|
-
transitionStatus
|
|
299
|
-
},
|
|
295
|
+
state,
|
|
300
296
|
ref: [forwardedRef, indicatorRef],
|
|
301
297
|
stateAttributesMapping: itemMapping,
|
|
302
298
|
props: {
|
|
303
299
|
"aria-hidden": true,
|
|
304
300
|
...elementProps
|
|
305
301
|
},
|
|
306
|
-
enabled: keepMounted ||
|
|
302
|
+
enabled: keepMounted || mounted
|
|
307
303
|
});
|
|
308
304
|
});
|
|
309
305
|
MenuCheckboxItemIndicator.displayName = "MenuCheckboxItemIndicator";
|
|
310
306
|
//#endregion
|
|
311
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
307
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/group/MenuGroupContext.mjs
|
|
312
308
|
const MenuGroupContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
313
309
|
MenuGroupContext.displayName = "MenuGroupContext";
|
|
314
310
|
function useMenuGroupRootContext() {
|
|
@@ -317,7 +313,7 @@ function useMenuGroupRootContext() {
|
|
|
317
313
|
return context;
|
|
318
314
|
}
|
|
319
315
|
//#endregion
|
|
320
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
316
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/group/MenuGroup.mjs
|
|
321
317
|
/**
|
|
322
318
|
* Groups related menu items with the corresponding label.
|
|
323
319
|
* Renders a `<div>` element.
|
|
@@ -342,7 +338,7 @@ const MenuGroup = /*#__PURE__*/ React$1.forwardRef(function MenuGroup(componentP
|
|
|
342
338
|
});
|
|
343
339
|
MenuGroup.displayName = "MenuGroup";
|
|
344
340
|
//#endregion
|
|
345
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
341
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/group-label/MenuGroupLabel.mjs
|
|
346
342
|
/**
|
|
347
343
|
* An accessible label that is automatically associated with its parent group.
|
|
348
344
|
* Renders a `<div>` element.
|
|
@@ -356,21 +352,21 @@ const MenuGroupLabel = /*#__PURE__*/ React$1.forwardRef(function MenuGroupLabel(
|
|
|
356
352
|
useIsoLayoutEffect(() => {
|
|
357
353
|
setLabelId(id);
|
|
358
354
|
return () => {
|
|
359
|
-
setLabelId(void 0);
|
|
355
|
+
setLabelId((currentId) => currentId === id ? void 0 : currentId);
|
|
360
356
|
};
|
|
361
357
|
}, [setLabelId, id]);
|
|
362
358
|
return useRenderElement("div", componentProps, {
|
|
363
359
|
ref: forwardedRef,
|
|
364
360
|
props: {
|
|
365
361
|
id,
|
|
366
|
-
|
|
362
|
+
"aria-hidden": true,
|
|
367
363
|
...elementProps
|
|
368
364
|
}
|
|
369
365
|
});
|
|
370
366
|
});
|
|
371
367
|
MenuGroupLabel.displayName = "MenuGroupLabel";
|
|
372
368
|
//#endregion
|
|
373
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
369
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/item/MenuItem.mjs
|
|
374
370
|
/**
|
|
375
371
|
* An individual interactive item in the menu.
|
|
376
372
|
* Renders a `<div>` element.
|
|
@@ -378,11 +374,16 @@ MenuGroupLabel.displayName = "MenuGroupLabel";
|
|
|
378
374
|
* Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
|
|
379
375
|
*/
|
|
380
376
|
const MenuItem = /*#__PURE__*/ React$1.forwardRef(function MenuItem(componentProps, forwardedRef) {
|
|
381
|
-
const { render, className, id: idProp, label, nativeButton = false, disabled = false, closeOnClick = true, style, ...elementProps } = componentProps;
|
|
382
|
-
const listItem = useCompositeListItem({
|
|
377
|
+
const { render, className, id: idProp, label, nativeButton = false, disabled: disabledProp = false, closeOnClick = true, style, ...elementProps } = componentProps;
|
|
378
|
+
const listItem = useCompositeListItem({
|
|
379
|
+
guess: true,
|
|
380
|
+
label
|
|
381
|
+
});
|
|
383
382
|
const menuPositionerContext = useMenuPositionerContext(true);
|
|
384
383
|
const id = useBaseUiId(idProp);
|
|
385
384
|
const { store } = useMenuRootContext();
|
|
385
|
+
const rootDisabled = store.useState("disabled");
|
|
386
|
+
const disabled = disabledProp || rootDisabled;
|
|
386
387
|
const highlighted = store.useState("isActive", listItem.index);
|
|
387
388
|
const itemProps = store.useState("itemProps");
|
|
388
389
|
const { getItemProps, itemRef } = useMenuItem({
|
|
@@ -414,7 +415,7 @@ const MenuItem = /*#__PURE__*/ React$1.forwardRef(function MenuItem(componentPro
|
|
|
414
415
|
});
|
|
415
416
|
MenuItem.displayName = "MenuItem";
|
|
416
417
|
//#endregion
|
|
417
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
418
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/link-item/MenuLinkItem.mjs
|
|
418
419
|
/**
|
|
419
420
|
* A link in the menu that can be used to navigate to a different page or section.
|
|
420
421
|
* Renders an `<a>` element.
|
|
@@ -424,7 +425,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
424
425
|
const MenuLinkItem = /*#__PURE__*/ React$1.forwardRef(function MenuLinkItem(componentProps, forwardedRef) {
|
|
425
426
|
const { render, className, id: idProp, label, closeOnClick = false, style, ...elementProps } = componentProps;
|
|
426
427
|
const linkRef = React$1.useRef(null);
|
|
427
|
-
const listItem = useCompositeListItem({
|
|
428
|
+
const listItem = useCompositeListItem({
|
|
429
|
+
guess: true,
|
|
430
|
+
label
|
|
431
|
+
});
|
|
428
432
|
const nodeId = useMenuPositionerContext(true)?.context.nodeId;
|
|
429
433
|
const id = useBaseUiId(idProp);
|
|
430
434
|
const { store } = useMenuRootContext();
|
|
@@ -442,7 +446,8 @@ const MenuLinkItem = /*#__PURE__*/ React$1.forwardRef(function MenuLinkItem(comp
|
|
|
442
446
|
nodeId,
|
|
443
447
|
store,
|
|
444
448
|
typingRef,
|
|
445
|
-
itemRef: linkRef
|
|
449
|
+
itemRef: linkRef,
|
|
450
|
+
itemMetadata: REGULAR_ITEM
|
|
446
451
|
});
|
|
447
452
|
function getItemProps(externalProps) {
|
|
448
453
|
return mergeProps(commonProps, externalProps, getButtonProps);
|
|
@@ -464,11 +469,7 @@ const MenuLinkItem = /*#__PURE__*/ React$1.forwardRef(function MenuLinkItem(comp
|
|
|
464
469
|
});
|
|
465
470
|
MenuLinkItem.displayName = "MenuLinkItem";
|
|
466
471
|
//#endregion
|
|
467
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
468
|
-
const stateAttributesMapping = {
|
|
469
|
-
...popupStateMapping,
|
|
470
|
-
...transitionStatusMapping
|
|
471
|
-
};
|
|
472
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/popup/MenuPopup.mjs
|
|
472
473
|
/**
|
|
473
474
|
* A container for the menu items.
|
|
474
475
|
* Renders a `<div>` element.
|
|
@@ -485,14 +486,13 @@ const MenuPopup = /*#__PURE__*/ React$1.forwardRef(function MenuPopup(componentP
|
|
|
485
486
|
const popupProps = store.useState("popupProps");
|
|
486
487
|
const mounted = store.useState("mounted");
|
|
487
488
|
const instantType = store.useState("instantType");
|
|
488
|
-
const
|
|
489
|
+
const activeTriggerElement = store.useState("activeTriggerElement");
|
|
489
490
|
const parent = store.useState("parent");
|
|
490
491
|
const lastOpenChangeReason = store.useState("lastOpenChangeReason");
|
|
491
492
|
const rootId = store.useState("rootId");
|
|
492
493
|
const floatingContext = store.useState("floatingRootContext");
|
|
493
494
|
const floatingTreeRoot = store.useState("floatingTreeRoot");
|
|
494
495
|
const closeDelay = store.useState("closeDelay");
|
|
495
|
-
const activeTriggerElement = store.useState("activeTriggerElement");
|
|
496
496
|
const hoverEnabled = store.useState("hoverEnabled");
|
|
497
497
|
const disabled = store.useState("disabled");
|
|
498
498
|
const openMethod = store.useState("openMethod");
|
|
@@ -517,24 +517,23 @@ const MenuPopup = /*#__PURE__*/ React$1.forwardRef(function MenuPopup(componentP
|
|
|
517
517
|
enabled: hoverEnabled && !disabled && !isContextMenu && parent.type !== "menubar",
|
|
518
518
|
closeDelay
|
|
519
519
|
});
|
|
520
|
-
const setPopupElement =
|
|
521
|
-
|
|
522
|
-
|
|
520
|
+
const setPopupElement = store.useStateSetter("popupElement");
|
|
521
|
+
const state = {
|
|
522
|
+
transitionStatus,
|
|
523
|
+
side,
|
|
524
|
+
align,
|
|
525
|
+
open,
|
|
526
|
+
nested: parent.type === "menu",
|
|
527
|
+
instant: instantType
|
|
528
|
+
};
|
|
523
529
|
const element = useRenderElement("div", componentProps, {
|
|
524
|
-
state
|
|
525
|
-
transitionStatus,
|
|
526
|
-
side,
|
|
527
|
-
align,
|
|
528
|
-
open,
|
|
529
|
-
nested: parent.type === "menu",
|
|
530
|
-
instant: instantType
|
|
531
|
-
},
|
|
530
|
+
state,
|
|
532
531
|
ref: [
|
|
533
532
|
forwardedRef,
|
|
534
533
|
store.context.popupRef,
|
|
535
534
|
setPopupElement
|
|
536
535
|
],
|
|
537
|
-
stateAttributesMapping,
|
|
536
|
+
stateAttributesMapping: popupTransitionStateMapping,
|
|
538
537
|
props: [
|
|
539
538
|
popupProps,
|
|
540
539
|
{ onKeyDown(event) {
|
|
@@ -546,7 +545,7 @@ const MenuPopup = /*#__PURE__*/ React$1.forwardRef(function MenuPopup(componentP
|
|
|
546
545
|
]
|
|
547
546
|
});
|
|
548
547
|
let returnFocus = parent.type === void 0 || isContextMenu;
|
|
549
|
-
if (
|
|
548
|
+
if (activeTriggerElement || parent.type === "menubar" && lastOpenChangeReason !== "outside-press") returnFocus = true;
|
|
550
549
|
return /*#__PURE__*/ jsx(FloatingFocusManager, {
|
|
551
550
|
context: floatingContext,
|
|
552
551
|
openInteractionType: openMethod,
|
|
@@ -564,7 +563,7 @@ const MenuPopup = /*#__PURE__*/ React$1.forwardRef(function MenuPopup(componentP
|
|
|
564
563
|
});
|
|
565
564
|
MenuPopup.displayName = "MenuPopup";
|
|
566
565
|
//#endregion
|
|
567
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
566
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/portal/MenuPortalContext.mjs
|
|
568
567
|
const MenuPortalContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
569
568
|
MenuPortalContext.displayName = "MenuPortalContext";
|
|
570
569
|
function useMenuPortalContext() {
|
|
@@ -573,7 +572,7 @@ function useMenuPortalContext() {
|
|
|
573
572
|
return value;
|
|
574
573
|
}
|
|
575
574
|
//#endregion
|
|
576
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
575
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/portal/MenuPortal.mjs
|
|
577
576
|
/**
|
|
578
577
|
* A portal element that moves the popup to a different part of the DOM.
|
|
579
578
|
* By default, the portal element is appended to `<body>`.
|
|
@@ -583,19 +582,21 @@ function useMenuPortalContext() {
|
|
|
583
582
|
*/
|
|
584
583
|
const MenuPortal = /*#__PURE__*/ React$1.forwardRef(function MenuPortal(props, forwardedRef) {
|
|
585
584
|
const { keepMounted = false, ...portalProps } = props;
|
|
586
|
-
const { store } = useMenuRootContext();
|
|
585
|
+
const { store, parent } = useMenuRootContext();
|
|
587
586
|
if (!(store.useState("mounted") || keepMounted)) return null;
|
|
587
|
+
const portalOwnerRole = parent.type === "menu" || parent.type === "menubar" ? "group" : void 0;
|
|
588
588
|
return /*#__PURE__*/ jsx(MenuPortalContext.Provider, {
|
|
589
589
|
value: keepMounted,
|
|
590
590
|
children: /*#__PURE__*/ jsx(FloatingPortal, {
|
|
591
591
|
ref: forwardedRef,
|
|
592
|
-
...portalProps
|
|
592
|
+
...portalProps,
|
|
593
|
+
portalOwnerRole
|
|
593
594
|
})
|
|
594
595
|
});
|
|
595
596
|
});
|
|
596
597
|
MenuPortal.displayName = "MenuPortal";
|
|
597
598
|
//#endregion
|
|
598
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
599
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/positioner/MenuPositioner.mjs
|
|
599
600
|
/**
|
|
600
601
|
* Positions the menu popup against the trigger.
|
|
601
602
|
* Renders a `<div>` element.
|
|
@@ -618,13 +619,13 @@ const MenuPositioner = /*#__PURE__*/ React$1.forwardRef(function MenuPositioner(
|
|
|
618
619
|
const transitionStatus = store.useState("transitionStatus");
|
|
619
620
|
const positionerElement = store.useState("positionerElement");
|
|
620
621
|
const instantType = store.useState("instantType");
|
|
621
|
-
const
|
|
622
|
+
const adaptiveOrigin = store.useState("adaptiveOrigin");
|
|
622
623
|
const lastOpenChangeReason = store.useState("lastOpenChangeReason");
|
|
623
624
|
const floatingNodeId = store.useState("floatingNodeId");
|
|
624
625
|
const floatingParentNodeId = store.useState("floatingParentNodeId");
|
|
625
626
|
const domReference = floatingRootContext.useState("domReferenceElement");
|
|
626
627
|
const previousTriggerRef = React$1.useRef(null);
|
|
627
|
-
const runOnceAnimationsFinish = useAnimationsFinished(positionerElement
|
|
628
|
+
const runOnceAnimationsFinish = useAnimationsFinished(positionerElement);
|
|
628
629
|
let anchor = anchorProp;
|
|
629
630
|
let sideOffset = sideOffsetProp;
|
|
630
631
|
let alignOffset = alignOffsetProp;
|
|
@@ -666,9 +667,12 @@ const MenuPositioner = /*#__PURE__*/ React$1.forwardRef(function MenuPositioner(
|
|
|
666
667
|
keepMounted,
|
|
667
668
|
disableAnchorTracking,
|
|
668
669
|
collisionAvoidance,
|
|
669
|
-
|
|
670
|
+
shift: contextMenu ? {
|
|
671
|
+
crossAxis: !("side" in collisionAvoidance && collisionAvoidance.side === "flip"),
|
|
672
|
+
rootBoundary: "layoutViewport"
|
|
673
|
+
} : void 0,
|
|
670
674
|
externalTree: floatingTreeRoot,
|
|
671
|
-
adaptiveOrigin
|
|
675
|
+
adaptiveOrigin
|
|
672
676
|
});
|
|
673
677
|
React$1.useEffect(() => {
|
|
674
678
|
function onMenuOpenChange(details) {
|
|
@@ -799,7 +803,7 @@ const MenuPositioner = /*#__PURE__*/ React$1.forwardRef(function MenuPositioner(
|
|
|
799
803
|
});
|
|
800
804
|
MenuPositioner.displayName = "MenuPositioner";
|
|
801
805
|
//#endregion
|
|
802
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
806
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/radio-group/MenuRadioGroupContext.mjs
|
|
803
807
|
const MenuRadioGroupContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
804
808
|
MenuRadioGroupContext.displayName = "MenuRadioGroupContext";
|
|
805
809
|
function useMenuRadioGroupContext() {
|
|
@@ -808,7 +812,7 @@ function useMenuRadioGroupContext() {
|
|
|
808
812
|
return context;
|
|
809
813
|
}
|
|
810
814
|
//#endregion
|
|
811
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
815
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/radio-group/MenuRadioGroup.mjs
|
|
812
816
|
/**
|
|
813
817
|
* Groups related radio items.
|
|
814
818
|
* Renders a `<div>` element.
|
|
@@ -857,7 +861,7 @@ const MenuRadioGroup = /*#__PURE__*/ React$1.memo(/*#__PURE__*/ React$1.forwardR
|
|
|
857
861
|
}));
|
|
858
862
|
MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
859
863
|
//#endregion
|
|
860
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
864
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/radio-item/MenuRadioItemContext.mjs
|
|
861
865
|
const MenuRadioItemContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
862
866
|
MenuRadioItemContext.displayName = "MenuRadioItemContext";
|
|
863
867
|
function useMenuRadioItemContext() {
|
|
@@ -866,7 +870,7 @@ function useMenuRadioItemContext() {
|
|
|
866
870
|
return context;
|
|
867
871
|
}
|
|
868
872
|
//#endregion
|
|
869
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
873
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/radio-item/MenuRadioItem.mjs
|
|
870
874
|
/**
|
|
871
875
|
* A menu item that works like a radio button in a given group.
|
|
872
876
|
* Renders a `<div>` element.
|
|
@@ -875,14 +879,18 @@ function useMenuRadioItemContext() {
|
|
|
875
879
|
*/
|
|
876
880
|
const MenuRadioItem = /*#__PURE__*/ React$1.forwardRef(function MenuRadioItem(componentProps, forwardedRef) {
|
|
877
881
|
const { render, className, id: idProp, label, nativeButton = false, disabled: disabledProp = false, closeOnClick = false, value, style, ...elementProps } = componentProps;
|
|
878
|
-
const listItem = useCompositeListItem({
|
|
882
|
+
const listItem = useCompositeListItem({
|
|
883
|
+
guess: true,
|
|
884
|
+
label
|
|
885
|
+
});
|
|
879
886
|
const menuPositionerContext = useMenuPositionerContext(true);
|
|
880
887
|
const id = useBaseUiId(idProp);
|
|
881
888
|
const { store } = useMenuRootContext();
|
|
882
889
|
const highlighted = store.useState("isActive", listItem.index);
|
|
883
890
|
const itemProps = store.useState("itemProps");
|
|
884
891
|
const { value: selectedValue, setValue: setSelectedValue, disabled: groupDisabled } = useMenuRadioGroupContext();
|
|
885
|
-
const
|
|
892
|
+
const rootDisabled = store.useState("disabled");
|
|
893
|
+
const disabled = disabledProp || groupDisabled || rootDisabled;
|
|
886
894
|
const checked = selectedValue === value;
|
|
887
895
|
const { getItemProps, itemRef } = useMenuItem({
|
|
888
896
|
closeOnClick,
|
|
@@ -904,7 +912,7 @@ const MenuRadioItem = /*#__PURE__*/ React$1.forwardRef(function MenuRadioItem(co
|
|
|
904
912
|
checked
|
|
905
913
|
]);
|
|
906
914
|
function handleClick(event) {
|
|
907
|
-
const details = createChangeEventDetails(itemPress, event.nativeEvent, void 0, { preventUnmountOnClose
|
|
915
|
+
const details = createChangeEventDetails(itemPress, event.nativeEvent, void 0, { preventUnmountOnClose: NOOP });
|
|
908
916
|
setSelectedValue(value, details);
|
|
909
917
|
}
|
|
910
918
|
const element = useRenderElement("div", componentProps, {
|
|
@@ -933,7 +941,7 @@ const MenuRadioItem = /*#__PURE__*/ React$1.forwardRef(function MenuRadioItem(co
|
|
|
933
941
|
});
|
|
934
942
|
MenuRadioItem.displayName = "MenuRadioItem";
|
|
935
943
|
//#endregion
|
|
936
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
944
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/radio-item-indicator/MenuRadioItemIndicator.mjs
|
|
937
945
|
/**
|
|
938
946
|
* Indicates whether the radio item is selected.
|
|
939
947
|
* Renders a `<span>` element.
|
|
@@ -944,82 +952,79 @@ const MenuRadioItemIndicator = /*#__PURE__*/ React$1.forwardRef(function MenuRad
|
|
|
944
952
|
const { render, className, style, keepMounted = false, ...elementProps } = componentProps;
|
|
945
953
|
const item = useMenuRadioItemContext();
|
|
946
954
|
const indicatorRef = React$1.useRef(null);
|
|
947
|
-
const { transitionStatus, setMounted } = useTransitionStatus(item.checked);
|
|
955
|
+
const { transitionStatus, mounted, setMounted } = useTransitionStatus(item.checked);
|
|
948
956
|
useOpenChangeComplete({
|
|
957
|
+
batch: true,
|
|
958
|
+
enabled: !item.checked,
|
|
949
959
|
open: item.checked,
|
|
950
960
|
ref: indicatorRef,
|
|
951
961
|
onComplete() {
|
|
952
962
|
if (!item.checked) setMounted(false);
|
|
953
963
|
}
|
|
954
964
|
});
|
|
965
|
+
const state = {
|
|
966
|
+
checked: item.checked,
|
|
967
|
+
disabled: item.disabled,
|
|
968
|
+
highlighted: item.highlighted,
|
|
969
|
+
transitionStatus
|
|
970
|
+
};
|
|
955
971
|
return useRenderElement("span", componentProps, {
|
|
956
|
-
state
|
|
957
|
-
checked: item.checked,
|
|
958
|
-
disabled: item.disabled,
|
|
959
|
-
highlighted: item.highlighted,
|
|
960
|
-
transitionStatus
|
|
961
|
-
},
|
|
972
|
+
state,
|
|
962
973
|
stateAttributesMapping: itemMapping,
|
|
963
974
|
ref: [forwardedRef, indicatorRef],
|
|
964
975
|
props: {
|
|
965
976
|
"aria-hidden": true,
|
|
966
977
|
...elementProps
|
|
967
978
|
},
|
|
968
|
-
enabled: keepMounted ||
|
|
979
|
+
enabled: keepMounted || mounted
|
|
969
980
|
});
|
|
970
981
|
});
|
|
971
982
|
MenuRadioItemIndicator.displayName = "MenuRadioItemIndicator";
|
|
972
983
|
//#endregion
|
|
973
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
984
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/MenuStore.mjs
|
|
974
985
|
const selectors = {
|
|
975
986
|
...popupStoreSelectors,
|
|
976
|
-
disabled:
|
|
977
|
-
modal:
|
|
978
|
-
openMethod:
|
|
979
|
-
allowMouseEnter:
|
|
980
|
-
highlightItemOnHover:
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
rootId: createSelector((state) => {
|
|
987
|
+
disabled: (state) => state.parent.type === "menubar" ? state.parent.context.disabled || state.disabled : state.disabled,
|
|
988
|
+
modal: (state) => (state.parent.type === void 0 || state.parent.type === "context-menu") && (state.modal ?? true),
|
|
989
|
+
openMethod: (state) => state.openMethod,
|
|
990
|
+
allowMouseEnter: (state) => state.allowMouseEnter,
|
|
991
|
+
highlightItemOnHover: (state) => state.highlightItemOnHover,
|
|
992
|
+
parent: (state) => state.parent,
|
|
993
|
+
rootId: (state) => {
|
|
984
994
|
if (state.parent.type === "menu") return state.parent.store.select("rootId");
|
|
985
995
|
return state.parent.type !== void 0 ? state.parent.context.rootId : state.rootId;
|
|
986
|
-
}
|
|
987
|
-
activeIndex:
|
|
988
|
-
isActive:
|
|
989
|
-
hoverEnabled:
|
|
990
|
-
instantType:
|
|
991
|
-
lastOpenChangeReason:
|
|
992
|
-
floatingTreeRoot:
|
|
996
|
+
},
|
|
997
|
+
activeIndex: (state) => state.activeIndex,
|
|
998
|
+
isActive: (state, itemIndex) => state.activeIndex === itemIndex,
|
|
999
|
+
hoverEnabled: (state) => state.hoverEnabled,
|
|
1000
|
+
instantType: (state) => state.instantType,
|
|
1001
|
+
lastOpenChangeReason: (state) => state.openChangeReason,
|
|
1002
|
+
floatingTreeRoot: (state) => {
|
|
993
1003
|
if (state.parent.type === "menu") return state.parent.store.select("floatingTreeRoot");
|
|
994
1004
|
return state.floatingTreeRoot;
|
|
995
|
-
}
|
|
996
|
-
floatingNodeId:
|
|
997
|
-
floatingParentNodeId:
|
|
998
|
-
itemProps:
|
|
999
|
-
closeDelay:
|
|
1000
|
-
|
|
1001
|
-
keyboardEventRelay:
|
|
1005
|
+
},
|
|
1006
|
+
floatingNodeId: (state) => state.floatingNodeId,
|
|
1007
|
+
floatingParentNodeId: (state) => state.floatingParentNodeId,
|
|
1008
|
+
itemProps: (state) => state.itemProps,
|
|
1009
|
+
closeDelay: (state) => state.closeDelay,
|
|
1010
|
+
adaptiveOrigin: (state) => state.adaptiveOrigin,
|
|
1011
|
+
keyboardEventRelay: (state) => {
|
|
1002
1012
|
if (state.keyboardEventRelay) return state.keyboardEventRelay;
|
|
1003
1013
|
if (state.parent.type === "menu") return state.parent.store.select("keyboardEventRelay");
|
|
1004
|
-
}
|
|
1014
|
+
}
|
|
1005
1015
|
};
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
triggerFocusTargetRef: /*#__PURE__*/ React$1.createRef(),
|
|
1019
|
-
beforeContentFocusGuardRef: /*#__PURE__*/ React$1.createRef(),
|
|
1020
|
-
onOpenChangeComplete: void 0,
|
|
1021
|
-
triggerElements: new PopupTriggerMap()
|
|
1022
|
-
}, selectors);
|
|
1016
|
+
/**
|
|
1017
|
+
* The store view that detached handle-backed triggers read from. Both the real `MenuStore` and the
|
|
1018
|
+
* inert fallback store satisfy it, so a trigger can read from whichever store the handle currently
|
|
1019
|
+
* exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus `setOpen`
|
|
1020
|
+
* (called by the focus guards) — so the exposed surface can't bypass the open-change pipeline; on
|
|
1021
|
+
* the detached fallback store every one of these mutations is a no-op.
|
|
1022
|
+
*/
|
|
1023
|
+
var MenuStore = class extends ReactStore {
|
|
1024
|
+
constructor(initialState, floatingId, nested = false) {
|
|
1025
|
+
const triggerElements = new PopupTriggerMap();
|
|
1026
|
+
const state = createInitialState(triggerElements, floatingId, nested, initialState);
|
|
1027
|
+
super(state, createInitialContext(triggerElements), selectors);
|
|
1023
1028
|
this.unsubscribeParentListener = this.observe("parent", (parent) => {
|
|
1024
1029
|
this.unsubscribeParentListener?.();
|
|
1025
1030
|
if (parent.type === "menu") {
|
|
@@ -1049,23 +1054,42 @@ var MenuStore = class MenuStore extends ReactStore {
|
|
|
1049
1054
|
eventDetails
|
|
1050
1055
|
});
|
|
1051
1056
|
}
|
|
1052
|
-
static useStore(externalStore, initialState) {
|
|
1053
|
-
const internalStore = useRefWithInit(() => {
|
|
1054
|
-
return new MenuStore(initialState);
|
|
1055
|
-
}).current;
|
|
1056
|
-
return externalStore ?? internalStore;
|
|
1057
|
-
}
|
|
1058
1057
|
unsubscribeParentListener = null;
|
|
1059
1058
|
};
|
|
1060
|
-
|
|
1059
|
+
/**
|
|
1060
|
+
* Creates the inert fallback store used by detached handle-backed triggers while no `Menu.Root` is
|
|
1061
|
+
* attached. It preserves a menu-specific trigger registry in context so detached triggers can
|
|
1062
|
+
* register before migrating to the live root store. `setOpen` is a no-op (matching the inert
|
|
1063
|
+
* reads/writes of `NullStore`), so a trigger can hand the store to focus-guard helpers that expect
|
|
1064
|
+
* `setOpen` without it ever taking effect while detached.
|
|
1065
|
+
*/
|
|
1066
|
+
function createNullMenuStore() {
|
|
1067
|
+
const triggerElements = new PopupTriggerMap();
|
|
1068
|
+
const store = new NullStore(Object.freeze(createInitialState(triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors);
|
|
1069
|
+
return Object.assign(store, { setOpen: NOOP });
|
|
1070
|
+
}
|
|
1071
|
+
function createInitialContext(triggerElements) {
|
|
1061
1072
|
return {
|
|
1062
|
-
|
|
1073
|
+
positionerRef: /*#__PURE__*/ React$1.createRef(),
|
|
1074
|
+
popupRef: /*#__PURE__*/ React$1.createRef(),
|
|
1075
|
+
typingRef: { current: false },
|
|
1076
|
+
itemDomElements: { current: [] },
|
|
1077
|
+
itemLabels: { current: [] },
|
|
1078
|
+
allowMouseUpTriggerRef: { current: false },
|
|
1079
|
+
triggerFocusTargetRef: /*#__PURE__*/ React$1.createRef(),
|
|
1080
|
+
beforeContentFocusGuardRef: /*#__PURE__*/ React$1.createRef(),
|
|
1081
|
+
onOpenChangeComplete: void 0,
|
|
1082
|
+
triggerElements
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
function createInitialState(triggerElements, floatingId, nested = false, initialState) {
|
|
1086
|
+
return {
|
|
1087
|
+
...createInitialPopupStoreState(triggerElements, floatingId, nested),
|
|
1063
1088
|
disabled: false,
|
|
1064
1089
|
modal: true,
|
|
1065
1090
|
openMethod: null,
|
|
1066
1091
|
allowMouseEnter: false,
|
|
1067
1092
|
highlightItemOnHover: true,
|
|
1068
|
-
stickIfOpen: true,
|
|
1069
1093
|
parent: { type: void 0 },
|
|
1070
1094
|
rootId: void 0,
|
|
1071
1095
|
activeIndex: null,
|
|
@@ -1078,18 +1102,19 @@ function createInitialState() {
|
|
|
1078
1102
|
itemProps: EMPTY_OBJECT,
|
|
1079
1103
|
keyboardEventRelay: void 0,
|
|
1080
1104
|
closeDelay: 0,
|
|
1081
|
-
|
|
1105
|
+
adaptiveOrigin: void 0,
|
|
1106
|
+
...initialState
|
|
1082
1107
|
};
|
|
1083
1108
|
}
|
|
1084
1109
|
//#endregion
|
|
1085
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1110
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/submenu-root/MenuSubmenuRootContext.mjs
|
|
1086
1111
|
const MenuSubmenuRootContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
1087
1112
|
MenuSubmenuRootContext.displayName = "MenuSubmenuRootContext";
|
|
1088
1113
|
function useMenuSubmenuRootContext() {
|
|
1089
1114
|
return React$1.useContext(MenuSubmenuRootContext);
|
|
1090
1115
|
}
|
|
1091
1116
|
//#endregion
|
|
1092
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1117
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/root/MenuRoot.mjs
|
|
1093
1118
|
/**
|
|
1094
1119
|
* Groups all parts of the menu.
|
|
1095
1120
|
* Doesn't render its own HTML element.
|
|
@@ -1122,22 +1147,29 @@ const MenuRoot = fastComponent(function MenuRoot(props) {
|
|
|
1122
1147
|
menubarContext,
|
|
1123
1148
|
isSubmenu
|
|
1124
1149
|
]);
|
|
1125
|
-
const
|
|
1150
|
+
const rootId = useId$1();
|
|
1151
|
+
const floatingId = useId$1();
|
|
1152
|
+
const floatingParentNodeIdFromContext = useFloatingParentNodeId();
|
|
1153
|
+
const parentMenuStore = parentFromContext.type === "menu" ? parentFromContext.store : void 0;
|
|
1154
|
+
const animateInitialOpen = (openProp ?? defaultOpen) && parentMenuStore?.state.transitionStatus === "starting";
|
|
1155
|
+
const seededInstantType = useRefWithInit(() => animateInitialOpen ? parentMenuStore?.state.instantType : void 0).current;
|
|
1156
|
+
const store = useMenuRootStore({
|
|
1126
1157
|
open: defaultOpen,
|
|
1127
1158
|
openProp,
|
|
1128
1159
|
activeTriggerId: defaultTriggerIdProp,
|
|
1129
1160
|
triggerIdProp,
|
|
1130
|
-
parent: parentFromContext
|
|
1131
|
-
|
|
1132
|
-
|
|
1161
|
+
parent: parentFromContext,
|
|
1162
|
+
disabled: disabledProp,
|
|
1163
|
+
highlightItemOnHover,
|
|
1164
|
+
modal: parentFromContext.type === void 0 ? modalProp : void 0,
|
|
1165
|
+
rootId,
|
|
1166
|
+
instantType: seededInstantType
|
|
1167
|
+
}, floatingId, floatingParentNodeIdFromContext != null);
|
|
1133
1168
|
store.useControlledProp("openProp", openProp);
|
|
1134
1169
|
store.useControlledProp("triggerIdProp", triggerIdProp);
|
|
1135
1170
|
store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
|
|
1136
|
-
const rootId = useId$1();
|
|
1137
|
-
const floatingId = useId$1();
|
|
1138
1171
|
const floatingTreeRoot = store.useState("floatingTreeRoot");
|
|
1139
1172
|
const floatingNodeIdFromContext = useFloatingNodeId(floatingTreeRoot);
|
|
1140
|
-
const floatingParentNodeIdFromContext = useFloatingParentNodeId();
|
|
1141
1173
|
const open = store.useState("open");
|
|
1142
1174
|
const activeTriggerElement = store.useState("activeTriggerElement");
|
|
1143
1175
|
const positionerElement = store.useState("positionerElement");
|
|
@@ -1164,12 +1196,36 @@ const MenuRoot = fastComponent(function MenuRoot(props) {
|
|
|
1164
1196
|
rootId
|
|
1165
1197
|
});
|
|
1166
1198
|
useImplicitActiveTrigger(store);
|
|
1167
|
-
const { forceUnmount } = useOpenStateTransitions(open, store, () => {
|
|
1168
|
-
store.
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1199
|
+
const { forceUnmount, transitionStatus } = useOpenStateTransitions(open, store, () => {
|
|
1200
|
+
store.set("allowMouseEnter", false);
|
|
1201
|
+
}, animateInitialOpen);
|
|
1202
|
+
const runOnceAnimationsFinish = useAnimationsFinished(store.context.popupRef);
|
|
1203
|
+
React$1.useEffect(() => {
|
|
1204
|
+
if (seededInstantType === void 0) return;
|
|
1205
|
+
const clearSeededInstantType = () => {
|
|
1206
|
+
if (store.state.instantType === seededInstantType) store.set("instantType", void 0);
|
|
1207
|
+
};
|
|
1208
|
+
if (!open) {
|
|
1209
|
+
clearSeededInstantType();
|
|
1210
|
+
return;
|
|
1211
|
+
}
|
|
1212
|
+
if (transitionStatus !== void 0) return;
|
|
1213
|
+
if (store.context.popupRef.current == null) {
|
|
1214
|
+
clearSeededInstantType();
|
|
1215
|
+
return;
|
|
1216
|
+
}
|
|
1217
|
+
const abortController = new AbortController();
|
|
1218
|
+
runOnceAnimationsFinish(clearSeededInstantType, abortController.signal);
|
|
1219
|
+
return () => {
|
|
1220
|
+
abortController.abort();
|
|
1221
|
+
};
|
|
1222
|
+
}, [
|
|
1223
|
+
seededInstantType,
|
|
1224
|
+
open,
|
|
1225
|
+
transitionStatus,
|
|
1226
|
+
runOnceAnimationsFinish,
|
|
1227
|
+
store
|
|
1228
|
+
]);
|
|
1173
1229
|
useIsoLayoutEffect(() => {
|
|
1174
1230
|
if (contextMenuContext && !parentMenuRootContext) store.update({
|
|
1175
1231
|
parent: {
|
|
@@ -1215,6 +1271,7 @@ const MenuRoot = fastComponent(function MenuRoot(props) {
|
|
|
1215
1271
|
]);
|
|
1216
1272
|
const setOpen = useStableCallback((nextOpen, eventDetails) => {
|
|
1217
1273
|
const reason = eventDetails.reason;
|
|
1274
|
+
if (!nextOpen && !store.select("open")) return;
|
|
1218
1275
|
if (open === nextOpen && eventDetails.trigger === activeTriggerElement && lastOpenChangeReason === reason) return;
|
|
1219
1276
|
const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);
|
|
1220
1277
|
if (!nextOpen && eventDetails.trigger == null) eventDetails.trigger = activeTriggerElement ?? void 0;
|
|
@@ -1232,27 +1289,25 @@ const MenuRoot = fastComponent(function MenuRoot(props) {
|
|
|
1232
1289
|
allowTouchToCloseRef.current = true;
|
|
1233
1290
|
allowTouchToCloseTimeout.clear();
|
|
1234
1291
|
}
|
|
1235
|
-
const isKeyboardClick = (reason === "trigger-press" || reason === "item-press") && nativeEvent.detail === 0
|
|
1292
|
+
const isKeyboardClick = (reason === "trigger-press" || reason === "item-press") && nativeEvent.detail === 0;
|
|
1236
1293
|
const isDismissClose = !nextOpen && (reason === "escape-key" || reason == null);
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
store.update(
|
|
1244
|
-
if (parent.type === "menubar" && (reason === "trigger-focus" || reason === "focus-out" || reason === "trigger-hover" || reason === "list-navigation" || reason === "sibling-open")) store.set("instantType", "group");
|
|
1245
|
-
else if (isKeyboardClick || isDismissClose) store.set("instantType", isKeyboardClick ? "click" : "dismiss");
|
|
1246
|
-
else store.set("instantType", void 0);
|
|
1294
|
+
openEventRef.current = eventDetails.event;
|
|
1295
|
+
const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());
|
|
1296
|
+
popupOpenState.openChangeReason = reason;
|
|
1297
|
+
if (parent.type === "menubar" && (reason === "trigger-focus" || reason === "focus-out" || reason === "trigger-hover" || reason === "list-navigation" || reason === "sibling-open")) popupOpenState.instantType = "group";
|
|
1298
|
+
else if (isKeyboardClick || isDismissClose) popupOpenState.instantType = isKeyboardClick ? "click" : "dismiss";
|
|
1299
|
+
else popupOpenState.instantType = void 0;
|
|
1300
|
+
store.update(popupOpenState);
|
|
1247
1301
|
});
|
|
1248
1302
|
const floatingRootContext = useSyncedFloatingRootContext({
|
|
1249
1303
|
popupStore: store,
|
|
1304
|
+
floatingRootContext: store.state.floatingRootContext,
|
|
1250
1305
|
floatingId,
|
|
1251
1306
|
nested: floatingParentNodeIdFromContext != null,
|
|
1252
1307
|
onOpenChange: setOpen
|
|
1253
1308
|
});
|
|
1254
1309
|
const floatingEvents = floatingRootContext.context.events;
|
|
1255
|
-
|
|
1310
|
+
useIsoLayoutEffect(() => {
|
|
1256
1311
|
const handleSetOpenEvent = ({ open: nextOpen, eventDetails }) => setOpen(nextOpen, eventDetails);
|
|
1257
1312
|
floatingEvents.on("setOpen", handleSetOpenEvent);
|
|
1258
1313
|
return () => {
|
|
@@ -1313,66 +1368,79 @@ const MenuRoot = fastComponent(function MenuRoot(props) {
|
|
|
1313
1368
|
},
|
|
1314
1369
|
onTyping
|
|
1315
1370
|
});
|
|
1371
|
+
const activeTriggerProps = React$1.useMemo(() => {
|
|
1372
|
+
const mergedProps = mergeProps(typeahead.reference, listNavigation$1.reference, dismiss.reference, { onMouseMove() {
|
|
1373
|
+
store.set("allowMouseEnter", true);
|
|
1374
|
+
} }, interactionTypeProps);
|
|
1375
|
+
mergedProps["aria-haspopup"] = "menu";
|
|
1376
|
+
mergedProps["aria-expanded"] = open;
|
|
1377
|
+
return mergedProps;
|
|
1378
|
+
}, [
|
|
1379
|
+
store,
|
|
1380
|
+
typeahead.reference,
|
|
1381
|
+
listNavigation$1.reference,
|
|
1382
|
+
dismiss.reference,
|
|
1383
|
+
interactionTypeProps,
|
|
1384
|
+
open
|
|
1385
|
+
]);
|
|
1386
|
+
const inactiveTriggerProps = React$1.useMemo(() => {
|
|
1387
|
+
const mergedProps = mergeProps(listNavigation$1.trigger, dismiss.trigger, interactionTypeProps);
|
|
1388
|
+
mergedProps["aria-haspopup"] = "menu";
|
|
1389
|
+
mergedProps["aria-expanded"] = false;
|
|
1390
|
+
return mergedProps;
|
|
1391
|
+
}, [
|
|
1392
|
+
listNavigation$1.trigger,
|
|
1393
|
+
dismiss.trigger,
|
|
1394
|
+
interactionTypeProps
|
|
1395
|
+
]);
|
|
1396
|
+
useRefWithInit(() => {
|
|
1397
|
+
store.update({ inactiveTriggerProps });
|
|
1398
|
+
return null;
|
|
1399
|
+
});
|
|
1400
|
+
const popupProps = React$1.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, {
|
|
1401
|
+
id: floatingId,
|
|
1402
|
+
role: "menu",
|
|
1403
|
+
"aria-orientation": orientation === "horizontal" ? "horizontal" : void 0,
|
|
1404
|
+
"aria-labelledby": activeTriggerElement?.id,
|
|
1405
|
+
onMouseMove() {
|
|
1406
|
+
store.set("allowMouseEnter", true);
|
|
1407
|
+
if (parent.type === "menu") store.set("hoverEnabled", false);
|
|
1408
|
+
},
|
|
1409
|
+
onClick() {
|
|
1410
|
+
if (store.select("hoverEnabled")) store.set("hoverEnabled", false);
|
|
1411
|
+
},
|
|
1412
|
+
onKeyDown(event) {
|
|
1413
|
+
const relay = store.select("keyboardEventRelay");
|
|
1414
|
+
if (relay && !event.isPropagationStopped()) relay(event);
|
|
1415
|
+
}
|
|
1416
|
+
}, typeahead.floating, listNavigation$1.floating, dismiss.floating), [
|
|
1417
|
+
activeTriggerElement,
|
|
1418
|
+
floatingId,
|
|
1419
|
+
orientation,
|
|
1420
|
+
parent.type,
|
|
1421
|
+
store,
|
|
1422
|
+
typeahead.floating,
|
|
1423
|
+
listNavigation$1.floating,
|
|
1424
|
+
dismiss.floating
|
|
1425
|
+
]);
|
|
1426
|
+
const itemProps = listNavigation$1.item ?? EMPTY_OBJECT;
|
|
1316
1427
|
usePopupInteractionProps(store, {
|
|
1317
1428
|
floatingRootContext,
|
|
1318
|
-
activeTriggerProps
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
mergedProps["aria-haspopup"] = "menu";
|
|
1323
|
-
mergedProps["aria-expanded"] = open;
|
|
1324
|
-
return mergedProps;
|
|
1325
|
-
}, [
|
|
1326
|
-
store,
|
|
1327
|
-
typeahead.reference,
|
|
1328
|
-
listNavigation$1.reference,
|
|
1329
|
-
dismiss.reference,
|
|
1330
|
-
interactionTypeProps,
|
|
1331
|
-
open
|
|
1332
|
-
]),
|
|
1333
|
-
inactiveTriggerProps: React$1.useMemo(() => {
|
|
1334
|
-
const mergedProps = mergeProps(listNavigation$1.trigger, dismiss.trigger, interactionTypeProps);
|
|
1335
|
-
mergedProps["aria-haspopup"] = "menu";
|
|
1336
|
-
mergedProps["aria-expanded"] = false;
|
|
1337
|
-
return mergedProps;
|
|
1338
|
-
}, [
|
|
1339
|
-
listNavigation$1.trigger,
|
|
1340
|
-
dismiss.trigger,
|
|
1341
|
-
interactionTypeProps
|
|
1342
|
-
]),
|
|
1343
|
-
popupProps: React$1.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, {
|
|
1344
|
-
id: floatingId,
|
|
1345
|
-
role: "menu",
|
|
1346
|
-
"aria-labelledby": activeTriggerElement?.id,
|
|
1347
|
-
onMouseMove() {
|
|
1348
|
-
store.set("allowMouseEnter", true);
|
|
1349
|
-
if (parent.type === "menu") store.set("hoverEnabled", false);
|
|
1350
|
-
},
|
|
1351
|
-
onClick() {
|
|
1352
|
-
if (store.select("hoverEnabled")) store.set("hoverEnabled", false);
|
|
1353
|
-
},
|
|
1354
|
-
onKeyDown(event) {
|
|
1355
|
-
const relay = store.select("keyboardEventRelay");
|
|
1356
|
-
if (relay && !event.isPropagationStopped()) relay(event);
|
|
1357
|
-
}
|
|
1358
|
-
}, typeahead.floating, listNavigation$1.floating, dismiss.floating), [
|
|
1359
|
-
activeTriggerElement,
|
|
1360
|
-
floatingId,
|
|
1361
|
-
parent.type,
|
|
1362
|
-
store,
|
|
1363
|
-
typeahead.floating,
|
|
1364
|
-
listNavigation$1.floating,
|
|
1365
|
-
dismiss.floating
|
|
1366
|
-
]),
|
|
1367
|
-
itemProps: listNavigation$1.item ?? EMPTY_OBJECT
|
|
1429
|
+
activeTriggerProps,
|
|
1430
|
+
inactiveTriggerProps,
|
|
1431
|
+
popupProps,
|
|
1432
|
+
itemProps
|
|
1368
1433
|
});
|
|
1369
1434
|
const context = React$1.useMemo(() => ({
|
|
1370
1435
|
store,
|
|
1371
1436
|
parent: parentFromContext
|
|
1372
1437
|
}), [store, parentFromContext]);
|
|
1373
|
-
const content = /*#__PURE__*/
|
|
1438
|
+
const content = /*#__PURE__*/ jsxs(MenuRootContext.Provider, {
|
|
1374
1439
|
value: context,
|
|
1375
|
-
children:
|
|
1440
|
+
children: [handle && /*#__PURE__*/ jsx(PopupHandleAttachment, {
|
|
1441
|
+
handle,
|
|
1442
|
+
store
|
|
1443
|
+
}), typeof children === "function" ? children({ payload }) : children]
|
|
1376
1444
|
});
|
|
1377
1445
|
if (parent.type === void 0 || parent.type === "context-menu") return /*#__PURE__*/ jsx(FloatingTree, {
|
|
1378
1446
|
externalTree: floatingTreeRoot,
|
|
@@ -1381,8 +1449,11 @@ const MenuRoot = fastComponent(function MenuRoot(props) {
|
|
|
1381
1449
|
return content;
|
|
1382
1450
|
});
|
|
1383
1451
|
MenuRoot.displayName = "MenuRoot";
|
|
1452
|
+
function useMenuRootStore(initialState, floatingId, nested) {
|
|
1453
|
+
return useRefWithInit(() => new MenuStore(initialState, floatingId, nested)).current;
|
|
1454
|
+
}
|
|
1384
1455
|
//#endregion
|
|
1385
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1456
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/submenu-root/MenuSubmenuRoot.mjs
|
|
1386
1457
|
/**
|
|
1387
1458
|
* Groups all parts of a submenu.
|
|
1388
1459
|
* Doesn't render its own HTML element.
|
|
@@ -1398,14 +1469,15 @@ function MenuSubmenuRoot(props) {
|
|
|
1398
1469
|
});
|
|
1399
1470
|
}
|
|
1400
1471
|
//#endregion
|
|
1401
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1472
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/utils/findRootOwnerId.mjs
|
|
1402
1473
|
function findRootOwnerId(node) {
|
|
1403
|
-
if (isHTMLElement(node) && node.hasAttribute("data-rootownerid")) return node.getAttribute("data-rootownerid")
|
|
1474
|
+
if (isHTMLElement(node) && node.hasAttribute("data-rootownerid")) return node.getAttribute("data-rootownerid");
|
|
1404
1475
|
if (isLastTraversableNode(node)) return;
|
|
1405
1476
|
return findRootOwnerId(getParentNode(node));
|
|
1406
1477
|
}
|
|
1407
1478
|
//#endregion
|
|
1408
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1479
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.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/submenu-trigger/MenuSubmenuTrigger.mjs
|
|
1480
|
+
const VOICE_OVER_EXPANDED_PROPS = { "aria-expanded": void 0 };
|
|
1409
1481
|
/**
|
|
1410
1482
|
* A menu item that opens a submenu.
|
|
1411
1483
|
* Renders a `<div>` element.
|
|
@@ -1414,7 +1486,12 @@ function findRootOwnerId(node) {
|
|
|
1414
1486
|
*/
|
|
1415
1487
|
const MenuSubmenuTrigger = /*#__PURE__*/ React$1.forwardRef(function MenuSubmenuTrigger(componentProps, forwardedRef) {
|
|
1416
1488
|
const { render, className, style, label, id: idProp, nativeButton = false, openOnHover = true, delay = 100, closeDelay = 0, disabled: disabledProp = false, ...elementProps } = componentProps;
|
|
1417
|
-
const
|
|
1489
|
+
const submenuRootContext = useMenuSubmenuRootContext();
|
|
1490
|
+
if (!submenuRootContext?.parentMenu) throw new Error("Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.");
|
|
1491
|
+
const listItem = useCompositeListItem({
|
|
1492
|
+
guess: true,
|
|
1493
|
+
label
|
|
1494
|
+
});
|
|
1418
1495
|
const menuPositionerContext = useMenuPositionerContext();
|
|
1419
1496
|
const { store } = useMenuRootContext();
|
|
1420
1497
|
const thisTriggerId = useBaseUiId(idProp);
|
|
@@ -1423,35 +1500,38 @@ const MenuSubmenuTrigger = /*#__PURE__*/ React$1.forwardRef(function MenuSubmenu
|
|
|
1423
1500
|
const floatingTreeRoot = store.useState("floatingTreeRoot");
|
|
1424
1501
|
const popupId = store.useState("triggerPopupId", thisTriggerId);
|
|
1425
1502
|
const baseRegisterTrigger = useTriggerRegistration(thisTriggerId, store);
|
|
1426
|
-
const registerTrigger =
|
|
1427
|
-
|
|
1503
|
+
const registerTrigger = useStableCallback((element) => {
|
|
1504
|
+
baseRegisterTrigger(element);
|
|
1428
1505
|
if (element !== null && store.select("open") && store.select("activeTriggerId") == null) store.update({
|
|
1429
|
-
activeTriggerId: thisTriggerId,
|
|
1506
|
+
activeTriggerId: thisTriggerId ?? null,
|
|
1430
1507
|
activeTriggerElement: element,
|
|
1431
1508
|
closeDelay
|
|
1432
1509
|
});
|
|
1433
|
-
|
|
1434
|
-
}, [
|
|
1435
|
-
baseRegisterTrigger,
|
|
1436
|
-
closeDelay,
|
|
1437
|
-
store,
|
|
1438
|
-
thisTriggerId
|
|
1439
|
-
]);
|
|
1510
|
+
});
|
|
1440
1511
|
const triggerElementRef = React$1.useRef(null);
|
|
1441
1512
|
const handleTriggerElementRef = React$1.useCallback((el) => {
|
|
1442
1513
|
triggerElementRef.current = el;
|
|
1443
1514
|
store.set("activeTriggerElement", el);
|
|
1444
1515
|
}, [store]);
|
|
1445
|
-
|
|
1446
|
-
|
|
1516
|
+
useIsoLayoutEffect(() => {
|
|
1517
|
+
registerTrigger(triggerElementRef.current);
|
|
1518
|
+
return () => registerTrigger(null);
|
|
1519
|
+
}, [
|
|
1520
|
+
registerTrigger,
|
|
1521
|
+
thisTriggerId,
|
|
1522
|
+
store
|
|
1523
|
+
]);
|
|
1447
1524
|
store.useSyncedValue("closeDelay", closeDelay);
|
|
1448
1525
|
const parentMenuStore = submenuRootContext.parentMenu;
|
|
1449
1526
|
const rootDisabled = store.useState("disabled");
|
|
1450
1527
|
const parentDisabled = parentMenuStore.useState("disabled");
|
|
1451
1528
|
const disabled = disabledProp || rootDisabled || parentDisabled;
|
|
1452
|
-
|
|
1529
|
+
React$1.useEffect(() => {
|
|
1453
1530
|
const element = triggerElementRef.current;
|
|
1454
|
-
if (element && isElementDisabled(element) && !disabled)
|
|
1531
|
+
if (element && isElementDisabled(element) && !disabled) {
|
|
1532
|
+
const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
|
|
1533
|
+
warn(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \`disabled\` prop on the component instead of setting it on the rendered element.${ownerStackMessage}`);
|
|
1534
|
+
}
|
|
1455
1535
|
});
|
|
1456
1536
|
const itemProps = parentMenuStore.useState("itemProps");
|
|
1457
1537
|
const highlighted = parentMenuStore.useState("isActive", listItem.index);
|
|
@@ -1472,8 +1552,9 @@ const MenuSubmenuTrigger = /*#__PURE__*/ React$1.forwardRef(function MenuSubmenu
|
|
|
1472
1552
|
itemMetadata,
|
|
1473
1553
|
nodeId: menuPositionerContext?.context.nodeId
|
|
1474
1554
|
});
|
|
1555
|
+
const hoverEnabled = store.useState("hoverEnabled");
|
|
1475
1556
|
const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
|
|
1476
|
-
enabled:
|
|
1557
|
+
enabled: hoverEnabled && openOnHover && !disabled,
|
|
1477
1558
|
handleClose: safePolygon({ blockPointerEvents: true }),
|
|
1478
1559
|
mouseOnly: true,
|
|
1479
1560
|
move: true,
|
|
@@ -1485,7 +1566,8 @@ const MenuSubmenuTrigger = /*#__PURE__*/ React$1.forwardRef(function MenuSubmenu
|
|
|
1485
1566
|
shouldOpen: delay > 0 ? () => parentMenuStore.select("allowMouseEnter") : void 0,
|
|
1486
1567
|
triggerElementRef,
|
|
1487
1568
|
externalTree: floatingTreeRoot,
|
|
1488
|
-
isClosing: () => store.select("transitionStatus") === "ending"
|
|
1569
|
+
isClosing: () => store.select("transitionStatus") === "ending",
|
|
1570
|
+
guardStaleOpen: true
|
|
1489
1571
|
});
|
|
1490
1572
|
const localInteractionProps = useClick(floatingRootContext, {
|
|
1491
1573
|
enabled: !disabled,
|
|
@@ -1496,18 +1578,22 @@ const MenuSubmenuTrigger = /*#__PURE__*/ React$1.forwardRef(function MenuSubmenu
|
|
|
1496
1578
|
}).reference ?? EMPTY_OBJECT;
|
|
1497
1579
|
const rootTriggerProps = store.useState("triggerProps", true);
|
|
1498
1580
|
delete rootTriggerProps.id;
|
|
1581
|
+
const state = {
|
|
1582
|
+
disabled,
|
|
1583
|
+
highlighted,
|
|
1584
|
+
open
|
|
1585
|
+
};
|
|
1586
|
+
const openMethod = store.useState("openMethod");
|
|
1587
|
+
const openedByKeyboard = store.useState("lastOpenChangeReason") === "list-navigation" || openMethod === "keyboard";
|
|
1499
1588
|
return useRenderElement("div", componentProps, {
|
|
1500
|
-
state
|
|
1501
|
-
disabled,
|
|
1502
|
-
highlighted,
|
|
1503
|
-
open
|
|
1504
|
-
},
|
|
1589
|
+
state,
|
|
1505
1590
|
stateAttributesMapping: triggerOpenStateMapping,
|
|
1506
1591
|
props: [
|
|
1507
1592
|
localInteractionProps,
|
|
1508
1593
|
hoverProps,
|
|
1509
1594
|
rootTriggerProps,
|
|
1510
1595
|
itemProps,
|
|
1596
|
+
open && openedByKeyboard && voiceOver ? VOICE_OVER_EXPANDED_PROPS : void 0,
|
|
1511
1597
|
{
|
|
1512
1598
|
"aria-controls": popupId,
|
|
1513
1599
|
tabIndex: open || highlighted ? 0 : -1,
|
|
@@ -1529,4 +1615,4 @@ const MenuSubmenuTrigger = /*#__PURE__*/ React$1.forwardRef(function MenuSubmenu
|
|
|
1529
1615
|
});
|
|
1530
1616
|
MenuSubmenuTrigger.displayName = "MenuSubmenuTrigger";
|
|
1531
1617
|
//#endregion
|
|
1532
|
-
export { useMenuPositionerContext as S, MenuCheckboxItem as _,
|
|
1618
|
+
export { useMenuPositionerContext as S, MenuCheckboxItem as _, createNullMenuStore as a, MenuRootContext as b, MenuRadioGroup as c, MenuPopup as d, MenuLinkItem as f, MenuCheckboxItemIndicator as g, MenuGroup as h, MenuRoot as i, MenuPositioner as l, MenuGroupLabel as m, findRootOwnerId as n, MenuRadioItemIndicator as o, MenuItem as p, MenuSubmenuRoot as r, MenuRadioItem as s, MenuSubmenuTrigger as t, MenuPortal as u, ContextMenuRootContext as v, useMenuRootContext as x, useContextMenuRootContext as y };
|