@arcadeai/design-system 3.39.0 → 3.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CompositeItem-CniPsjzP.js +30 -0
- package/dist/CompositeList-yq5K_yj6.js +81 -0
- package/dist/CompositeRoot-Dy-5A-Je.js +206 -0
- package/dist/DialogRoot-DDokfJcO.js +57 -0
- package/dist/DialogTrigger-CFUE8YsM.js +402 -0
- package/dist/DirectionContext-BSOheMwC.js +10 -0
- package/dist/FieldItemContext-CF2fRwBC.js +12 -0
- package/dist/FloatingPortalLite-BHsRx4XN.js +29 -0
- package/dist/InternalBackdrop-BVEfe6O1.js +610 -0
- package/dist/LabelableContext-Dzw1DWuj.js +171 -0
- package/dist/Separator-CswSYAXX.js +25 -0
- package/dist/ToolbarRootContext-D7EsmJ5f.js +10 -0
- package/dist/andromeeda-B-gfN00q.js +4 -0
- package/dist/angular-html-dA1qUKRV.js +32 -0
- package/dist/angular-ts-CXyBC0vY.js +21 -0
- package/dist/apl-CjNiDgad.js +3 -3
- package/dist/assets/icons/telegram.js +10 -0
- package/dist/assets/images/arcade-grid.d.ts.map +1 -1
- package/dist/assets/images/arcade-grid.js +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/variables.css +1 -1
- package/dist/astro--3ZkKqYU.js +18 -0
- package/dist/astro-CFFExE8Q.js +5 -5
- package/dist/aurora-x-B56eICma.js +4 -0
- package/dist/ayu-dark-DJSOaKig.js +4 -0
- package/dist/ayu-light-BPfFt4v-.js +4 -0
- package/dist/ayu-mirage-DmPLRBj7.js +4 -0
- package/dist/blade-BoRuQEEj.js +20 -0
- package/dist/blade-D0HyNvCw.js +4 -4
- package/dist/c-C4SM8H98.js +6 -0
- package/dist/cairo-DM6WF2e3.js +1 -1
- package/dist/{calendar-DreAgQKY.js → calendar-CLEnvrbp.js} +483 -482
- package/dist/catppuccin-frappe-CA5k7W3u.js +4 -0
- package/dist/catppuccin-latte-CYfkUW5v.js +4 -0
- package/dist/catppuccin-macchiato-BOj_4I3g.js +4 -0
- package/dist/catppuccin-mocha-BXpUXme4.js +4 -0
- package/dist/clamp-BxE4ZAuA.js +17 -0
- package/dist/cobol-HihOMwht.js +1 -1
- package/dist/coffee-D8Swy5yR.js +8 -0
- package/dist/components/index.js +665 -644
- package/dist/components/ui/atoms/accordion.d.ts +9 -7
- package/dist/components/ui/atoms/accordion.d.ts.map +1 -1
- package/dist/components/ui/atoms/accordion.js +454 -243
- package/dist/components/ui/atoms/alert-dialog.d.ts +13 -9
- package/dist/components/ui/atoms/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert-dialog.js +149 -183
- package/dist/components/ui/atoms/alert.d.ts +2 -1
- package/dist/components/ui/atoms/alert.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert.js +36 -25
- package/dist/components/ui/atoms/avatar.d.ts +10 -5
- package/dist/components/ui/atoms/avatar.d.ts.map +1 -1
- package/dist/components/ui/atoms/avatar.js +198 -205
- package/dist/components/ui/atoms/badge.d.ts +4 -5
- package/dist/components/ui/atoms/badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/badge.js +31 -22
- package/dist/components/ui/atoms/breadcrumb.d.ts +4 -5
- package/dist/components/ui/atoms/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/atoms/breadcrumb.js +46 -29
- package/dist/components/ui/atoms/button.d.ts +4 -6
- package/dist/components/ui/atoms/button.d.ts.map +1 -1
- package/dist/components/ui/atoms/button.js +59 -28
- package/dist/components/ui/atoms/byoc-badge.d.ts +2 -2
- package/dist/components/ui/atoms/byoc-badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/byoc-badge.js +14 -8
- package/dist/components/ui/atoms/calendar.d.ts +6 -16
- package/dist/components/ui/atoms/calendar.d.ts.map +1 -1
- package/dist/components/ui/atoms/calendar.js +1 -1
- package/dist/components/ui/atoms/card.d.ts +4 -2
- package/dist/components/ui/atoms/card.d.ts.map +1 -1
- package/dist/components/ui/atoms/card.js +46 -35
- package/dist/components/ui/atoms/chart.d.ts +24 -48
- package/dist/components/ui/atoms/chart.d.ts.map +1 -1
- package/dist/components/ui/atoms/chart.js +179 -148
- package/dist/components/ui/atoms/checkbox.d.ts +2 -3
- package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
- package/dist/components/ui/atoms/checkbox.js +269 -249
- package/dist/components/ui/atoms/code-block.js +1 -1
- package/dist/components/ui/atoms/collapsible.d.ts +5 -5
- package/dist/components/ui/atoms/collapsible.d.ts.map +1 -1
- package/dist/components/ui/atoms/collapsible.js +208 -23
- package/dist/components/ui/atoms/command.d.ts +4 -3
- package/dist/components/ui/atoms/command.d.ts.map +1 -1
- package/dist/components/ui/atoms/command.js +1655 -348
- package/dist/components/ui/atoms/dialog.d.ts +12 -10
- package/dist/components/ui/atoms/dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/dialog.js +91 -80
- package/dist/components/ui/atoms/dropdown-menu.d.ts +21 -17
- package/dist/components/ui/atoms/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/atoms/dropdown-menu.js +1507 -899
- package/dist/components/ui/atoms/form.d.ts +5 -3
- package/dist/components/ui/atoms/form.d.ts.map +1 -1
- package/dist/components/ui/atoms/form.js +36 -42
- package/dist/components/ui/atoms/hover-card.d.ts +5 -6
- package/dist/components/ui/atoms/hover-card.d.ts.map +1 -1
- package/dist/components/ui/atoms/hover-card.js +355 -193
- package/dist/components/ui/atoms/icons/index.d.ts +1 -0
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +58 -56
- package/dist/components/ui/atoms/icons/telegram.d.ts +4 -0
- package/dist/components/ui/atoms/icons/telegram.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/telegram.js +37 -0
- package/dist/components/ui/atoms/index.d.ts +1 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +566 -545
- package/dist/components/ui/atoms/input-group.d.ts +20 -0
- package/dist/components/ui/atoms/input-group.d.ts.map +1 -0
- package/dist/components/ui/atoms/input-group.js +136 -0
- package/dist/components/ui/atoms/input.d.ts.map +1 -1
- package/dist/components/ui/atoms/input.js +113 -13
- package/dist/components/ui/atoms/label.d.ts +1 -2
- package/dist/components/ui/atoms/label.d.ts.map +1 -1
- package/dist/components/ui/atoms/label.js +18 -31
- package/dist/components/ui/atoms/markdown.js +1 -1
- package/dist/components/ui/atoms/mobile-tooltip.js +4 -3
- package/dist/components/ui/atoms/popover.d.ts +8 -6
- package/dist/components/ui/atoms/popover.d.ts.map +1 -1
- package/dist/components/ui/atoms/popover.js +617 -245
- package/dist/components/ui/atoms/pro-badge.js +1 -1
- package/dist/components/ui/atoms/progress.d.ts +7 -4
- package/dist/components/ui/atoms/progress.d.ts.map +1 -1
- package/dist/components/ui/atoms/progress.js +236 -92
- package/dist/components/ui/atoms/radio-group.d.ts +4 -4
- package/dist/components/ui/atoms/radio-group.d.ts.map +1 -1
- package/dist/components/ui/atoms/radio-group.js +355 -251
- package/dist/components/ui/atoms/resizable.d.ts +3 -4
- package/dist/components/ui/atoms/resizable.d.ts.map +1 -1
- package/dist/components/ui/atoms/resizable.js +25 -27
- package/dist/components/ui/atoms/scroll-area.d.ts +5 -5
- package/dist/components/ui/atoms/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-area.js +611 -526
- package/dist/components/ui/atoms/scroll-button.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-button.js +27 -22
- package/dist/components/ui/atoms/select.d.ts +11 -11
- package/dist/components/ui/atoms/select.d.ts.map +1 -1
- package/dist/components/ui/atoms/select.js +1525 -889
- package/dist/components/ui/atoms/separator.d.ts +2 -3
- package/dist/components/ui/atoms/separator.d.ts.map +1 -1
- package/dist/components/ui/atoms/separator.js +16 -35
- package/dist/components/ui/atoms/sheet.d.ts +9 -9
- package/dist/components/ui/atoms/sheet.d.ts.map +1 -1
- package/dist/components/ui/atoms/sheet.js +65 -64
- package/dist/components/ui/atoms/sidebar.d.ts +9 -15
- package/dist/components/ui/atoms/sidebar.d.ts.map +1 -1
- package/dist/components/ui/atoms/sidebar.js +288 -283
- package/dist/components/ui/atoms/skeleton.js +4 -4
- package/dist/components/ui/atoms/slider.d.ts +2 -3
- package/dist/components/ui/atoms/slider.d.ts.map +1 -1
- package/dist/components/ui/atoms/slider.js +886 -440
- package/dist/components/ui/atoms/switch.d.ts +4 -5
- package/dist/components/ui/atoms/switch.d.ts.map +1 -1
- package/dist/components/ui/atoms/switch.js +218 -151
- package/dist/components/ui/atoms/table.d.ts +2 -4
- package/dist/components/ui/atoms/table.d.ts.map +1 -1
- package/dist/components/ui/atoms/table.js +35 -36
- package/dist/components/ui/atoms/tabs.d.ts +11 -7
- package/dist/components/ui/atoms/tabs.d.ts.map +1 -1
- package/dist/components/ui/atoms/tabs.js +492 -186
- package/dist/components/ui/atoms/textarea.d.ts.map +1 -1
- package/dist/components/ui/atoms/textarea.js +7 -7
- package/dist/components/ui/atoms/toggle.d.ts +2 -3
- package/dist/components/ui/atoms/toggle.d.ts.map +1 -1
- package/dist/components/ui/atoms/toggle.js +92 -45
- package/dist/components/ui/atoms/tooltip.d.ts +6 -9
- package/dist/components/ui/atoms/tooltip.d.ts.map +1 -1
- package/dist/components/ui/atoms/tooltip.js +625 -343
- package/dist/components/ui/atoms/view-tools-control.js +16 -15
- package/dist/components/ui/atoms/virtualized-grid.d.ts +11 -4
- package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -1
- package/dist/components/ui/atoms/virtualized-grid.js +365 -333
- package/dist/components/ui/index.js +665 -644
- package/dist/components/ui/molecules/chat-history-item.d.ts.map +1 -1
- package/dist/components/ui/molecules/chat-history-item.js +47 -40
- package/dist/components/ui/molecules/command-bar.js +1 -1
- package/dist/components/ui/molecules/confirm-popover.d.ts +2 -2
- package/dist/components/ui/molecules/confirm-popover.d.ts.map +1 -1
- package/dist/components/ui/molecules/confirm-popover.js +26 -24
- package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -1
- package/dist/components/ui/molecules/date-time-picker.js +17 -11
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/message.d.ts +2 -3
- package/dist/components/ui/molecules/message.d.ts.map +1 -1
- package/dist/components/ui/molecules/message.js +10 -16
- package/dist/components/ui/molecules/prompt-input.d.ts +1 -1
- package/dist/components/ui/molecules/prompt-input.d.ts.map +1 -1
- package/dist/components/ui/molecules/prompt-input.js +21 -22
- package/dist/components/ui/molecules/requirement-badges.d.ts.map +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +3 -3
- package/dist/components/ui/molecules/steps-progress.js +1 -0
- package/dist/components/ui/molecules/tool-call-accordion.js +1 -0
- package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/tool-card.js +60 -47
- package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/user-nav.d.ts.map +1 -1
- package/dist/components/ui/molecules/user-nav.js +62 -57
- package/dist/components/ui/templates/auth-template.js +5 -5
- package/dist/composite-BASdnlNo.js +220 -0
- package/dist/composite-BSpUD7nI.js +66 -0
- package/dist/cpp-CA4iM_wM.js +18 -0
- package/dist/createBaseUIEventDetails-CqidROtw.js +55 -0
- package/dist/crystal-CRJyc4G-.js +4 -4
- package/dist/css-M7EaDHN_.js +6 -0
- package/dist/csv-B7yqA61e.js +6 -0
- package/dist/dark-plus-B4vfALTw.js +4 -0
- package/dist/detectBrowser-Dn2N72k1.js +42 -0
- package/dist/dracula-Cb59ZzY3.js +4 -0
- package/dist/dracula-soft-aaEmszbU.js +4 -0
- package/dist/edge-BYQkOzbF.js +1 -1
- package/dist/element-DSo91iOi.js +88 -0
- package/dist/elm-BtNbw_Cd.js +1 -1
- package/dist/erlang-DNcDT8Hi.js +1 -1
- package/dist/event-BCa0Un_3.js +30 -0
- package/dist/everforest-dark-CLp_21RJ.js +4 -0
- package/dist/everforest-light-CZ0NCAAv.js +4 -0
- package/dist/floating-ui.utils-48URp89E.js +126 -0
- package/dist/floating-ui.utils.dom-jr2suqy2.js +135 -0
- package/dist/fsharp-CYOiIVNx.js +1 -1
- package/dist/getDisabledMountTransitionStyles-fmnaQYVj.js +1539 -0
- package/dist/getPseudoElementBounds-B4_miSEJ.js +364 -0
- package/dist/git-rebase-ZWUFO_T4.js +1 -1
- package/dist/github-dark-BD3lImVS.js +4 -0
- package/dist/github-dark-default-ID_nBUwl.js +4 -0
- package/dist/github-dark-dimmed-Cw4rFgde.js +4 -0
- package/dist/github-dark-high-contrast-DSby9de8.js +4 -0
- package/dist/github-light-W396yAFe.js +4 -0
- package/dist/github-light-default-DCAQ2px1.js +4 -0
- package/dist/github-light-high-contrast-ChWJGEvx.js +4 -0
- package/dist/glimmer-js-DkxNrfPT.js +2 -2
- package/dist/glimmer-ts-D6YZEmK_.js +2 -2
- package/dist/glsl-CgdqkyFp.js +8 -0
- package/dist/graphql-Bv26LTzG.js +14 -0
- package/dist/gruvbox-dark-hard-BC1GRqFa.js +4 -0
- package/dist/gruvbox-dark-medium-COLy2cDY.js +4 -0
- package/dist/gruvbox-dark-soft-B8MALL4f.js +4 -0
- package/dist/gruvbox-light-hard-Bzxr_AnB.js +4 -0
- package/dist/gruvbox-light-medium-D2fqu3Kj.js +4 -0
- package/dist/gruvbox-light-soft-atzRH3-n.js +4 -0
- package/dist/hack-ItRNKiEb.js +1 -1
- package/dist/haml-B1t5q1Sv.js +10 -0
- package/dist/haml-NZLVzu_R.js +1 -1
- package/dist/handlebars-B2fb61mr.js +14 -0
- package/dist/handlebars-mxStpSE7.js +2 -2
- package/dist/highlighted-body-OFNGDK62-Df6AJMbs.js +20 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +11 -12
- package/dist/horizon-PFtq58ZB.js +4 -0
- package/dist/horizon-bright-2WzHy-Vo.js +4 -0
- package/dist/houston-BEqUWhHr.js +4 -0
- package/dist/html-B50bmoVb.js +1 -1
- package/dist/html-CPZ3oZQ7.js +10 -0
- package/dist/html-derivative-B2qv7eyt.js +8 -0
- package/dist/http-BQ2t9cn1.js +14 -0
- package/dist/hurl-RyCMCa80.js +12 -0
- package/dist/imba-DpB-wtPB.js +6 -0
- package/dist/index-3rscXtm3.js +4708 -0
- package/dist/inertValue-kpZZDBEy.js +7 -0
- package/dist/integrations/rhf/index.js +6 -5
- package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
- package/dist/java-CbphP4lz.js +6 -0
- package/dist/javascript-CgYd5l7W.js +6 -0
- package/dist/jinja-DFCUirAg.js +11 -0
- package/dist/jison-CTEI_s6O.js +8 -0
- package/dist/json-B5-prx4F.js +6 -0
- package/dist/json5-CZ8R1oUY.js +6 -0
- package/dist/jsonc-DMboCKBJ.js +6 -0
- package/dist/jsonl-YgIUi4Dg.js +6 -0
- package/dist/jsx-D4q4E1UD.js +6 -0
- package/dist/julia-2ubi2n9a.js +16 -0
- package/dist/just-CEK2SJ_k.js +4 -4
- package/dist/kanagawa-dragon-DuYaOBBk.js +4 -0
- package/dist/kanagawa-lotus-CyjAihYC.js +4 -0
- package/dist/kanagawa-wave-BVdXUMj5.js +4 -0
- package/dist/laserwave-B_2VVKNJ.js +4 -0
- package/dist/less-MoGo8xoS.js +6 -0
- package/dist/light-plus-IB4fPeJj.js +4 -0
- package/dist/liquid-CHzkx3jT.js +2 -2
- package/dist/lua-Bp3IRv7I.js +1 -1
- package/dist/main.js +691 -670
- package/dist/markdown-B-zRtm0x.js +6 -0
- package/dist/{markdown-D0xxRbwP.js → markdown-B71Eurda.js} +10329 -8108
- package/dist/marko-BlmC3dqW.js +14 -0
- package/dist/marko-CJBA24Ri.js +2 -2
- package/dist/material-theme-CjsSdYF2.js +4 -0
- package/dist/material-theme-darker-DEk0vgdS.js +4 -0
- package/dist/material-theme-lighter-DEVB_7K5.js +4 -0
- package/dist/material-theme-ocean-DK6jm24j.js +4 -0
- package/dist/material-theme-palenight-CNkXNpHv.js +4 -0
- package/dist/mdc-C9YSUwVC.js +2 -2
- package/dist/mdc-CLNk3q28.js +12 -0
- package/dist/mdx-CiUWpBB_.js +6 -0
- package/dist/mermaid-GHXKKRXX-BkplG-MI.js +5 -0
- package/dist/metadata/toolkit-icons.d.ts.map +1 -1
- package/dist/metadata/toolkit-icons.js +40 -38
- package/dist/metadata/toolkits.d.ts.map +1 -1
- package/dist/metadata/toolkits.js +13 -0
- package/dist/min-dark-CJcHUHwu.js +4 -0
- package/dist/min-light-BAN2UR75.js +4 -0
- package/dist/monokai-BbXwpjKl.js +4 -0
- package/dist/night-owl-csViJ7u4.js +4 -0
- package/dist/night-owl-light-BC-NuMC3.js +4 -0
- package/dist/nim-QAjRdh9w.js +5 -5
- package/dist/nord-B8Sq-VQ0.js +4 -0
- package/dist/one-dark-pro-DTdrcl-J.js +4 -0
- package/dist/one-light-kPHTChCU.js +4 -0
- package/dist/owner-rKN292Q9.js +6 -0
- package/dist/perl-DkVrgJBg.js +3 -3
- package/dist/php-BIzsF_5x.js +4 -4
- package/dist/php-Kn-vgdBD.js +18 -0
- package/dist/plastic-DDweBgVs.js +4 -0
- package/dist/poimandres-Dqvs16BQ.js +4 -0
- package/dist/popupStateMapping-BT9Y_jIq.js +1849 -0
- package/dist/postcss-CwL8bLZI.js +6 -0
- package/dist/pug-CTOOvSEH.js +12 -0
- package/dist/pug-XOw9Q1Ho.js +1 -1
- package/dist/python-jjYlTiSH.js +6 -0
- package/dist/qml-rTNXsquU.js +1 -1
- package/dist/r-C8zl4zMO.js +6 -0
- package/dist/react-resizable-panels-BqIpIFl2.js +2017 -0
- package/dist/red-DBDwQkX-.js +4 -0
- package/dist/regexp-Dpy_RgoJ.js +6 -0
- package/dist/resolveAriaLabelledBy-B5vw-szP.js +11 -0
- package/dist/rose-pine-DGHrTu7e.js +4 -0
- package/dist/rose-pine-dawn-DfRVdapG.js +4 -0
- package/dist/rose-pine-moon-DFpJm5Rd.js +4 -0
- package/dist/rst-DM32Wy3O.js +5 -5
- package/dist/ruby-BeqCs27h.js +8 -8
- package/dist/safePolygon-CJcmMc0u.js +389 -0
- package/dist/safeReact-DKq-628G.js +7 -0
- package/dist/sas-fpEvgATw.js +1 -1
- package/dist/sass-BmupNt-w.js +6 -0
- package/dist/scss-BZYVIVaN.js +8 -0
- package/dist/serializeValue-BebmSzW3.js +14 -0
- package/dist/shellscript-fMxXshxv.js +6 -0
- package/dist/shellsession-DiDJNQdy.js +1 -1
- package/dist/slack-dark-noeC6QPl.js +4 -0
- package/dist/slack-ochin-3_2idqLR.js +4 -0
- package/dist/snazzy-light-B9cV359v.js +4 -0
- package/dist/solarized-dark-B6X0ILWr.js +4 -0
- package/dist/solarized-light-LxOemn3c.js +4 -0
- package/dist/sql-D30Zid36.js +6 -0
- package/dist/stata-B8c5fTjX.js +1 -1
- package/dist/styles-DU5BO7fS.js +16 -0
- package/dist/stylus-BoBcEBjx.js +6 -0
- package/dist/surrealql-CQi7GQN7.js +1 -1
- package/dist/svelte-b9PAcyUe.js +14 -0
- package/dist/svelte-rYri41WT.js +3 -3
- package/dist/synthwave-84-DzQeMpV0.js +4 -0
- package/dist/templ-Crs9Ui8q.js +1 -1
- package/dist/tex-AHxmLTL0.js +1 -1
- package/dist/tokyo-night-CLM-V_Re.js +4 -0
- package/dist/{toolkit-card-CB1oiaei.js → toolkit-card-DhpOY80l.js} +56 -36
- package/dist/ts-tags-CP1b-4Z2.js +41 -0
- package/dist/ts-tags-ioVe2PKw.js +5 -5
- package/dist/tsx-QNpb2qLW.js +6 -0
- package/dist/twig-DwV2Fi4L.js +2 -2
- package/dist/typescript-AhniRyfZ.js +6 -0
- package/dist/useAnimationFrame-DIc6eFHa.js +69 -0
- package/dist/useAriaLabelledBy-VklrCmKp.js +34 -0
- package/dist/useBaseUiId-C8Dq0BQq.js +25 -0
- package/dist/useButton-JYPKQKj4.js +150 -0
- package/dist/useCollapsiblePanel-9pDlDh3R.js +257 -0
- package/dist/useCompositeItem-D00ALGkT.js +35 -0
- package/dist/useCompositeListItem-CYQrZg5-.js +74 -0
- package/dist/useControlled-Sx-_x7Sz.js +32 -0
- package/dist/useFocus-Aj9ShMQu.js +97 -0
- package/dist/useIsoLayoutEffect-DpJo20by.js +7 -0
- package/dist/useLabelableId-DF_d91GP.js +44 -0
- package/dist/useOnFirstRender-B4aruaIA.js +9 -0
- package/dist/useOnMount-JHtE6teb.js +9 -0
- package/dist/useOpenChangeComplete-DkeH9FGJ.js +130 -0
- package/dist/useRender-BNXBkp2o.js +7 -0
- package/dist/useRenderElement-DNB2vtF1.js +274 -0
- package/dist/useRole-N-RCRzo1.js +76 -0
- package/dist/useStableCallback-CudqoENs.js +33 -0
- package/dist/useSyncedFloatingRootContext-Bc90zSTy.js +185 -0
- package/dist/useTimeout-DAqPwigF.js +33 -0
- package/dist/useValueAsRef-LhoZc6As.js +20 -0
- package/dist/useValueChanged-Bissqjjn.js +15 -0
- package/dist/valueToPercent-BBgE4D3L.js +27 -0
- package/dist/vesper-BmV7KiQ0.js +4 -0
- package/dist/visuallyHidden-PuyyGHVF.js +22 -0
- package/dist/vitesse-black-CxZz3C4s.js +4 -0
- package/dist/vitesse-dark-DVUJ0sy2.js +4 -0
- package/dist/vitesse-light-BDJohtUr.js +4 -0
- package/dist/vue-CY6W2ID0.js +31 -0
- package/dist/vue-DXEmyXn9.js +3 -3
- package/dist/vue-html-DYXHAJ2G.js +8 -0
- package/dist/vue-vine-D41-N99t.js +4 -4
- package/dist/vue-vine-DiWTpMwZ.js +18 -0
- package/dist/wasm-3y0A1Y71.js +6 -0
- package/dist/wasm-Dm9SFfrx.js +7 -0
- package/dist/web-BbvN_Lei.js +2846 -0
- package/dist/wgsl-SXl3EZUN.js +6 -0
- package/dist/wit-Cw0CTVY0.js +6 -0
- package/dist/xml-CNXGTZ6Z.js +8 -0
- package/dist/xsl-BmSZphgC.js +1 -1
- package/dist/yaml-DZqZ2PBD.js +6 -0
- package/package.json +37 -34
- package/dist/highlighted-body-TPN3WLV5-D6UnKGod.js +0 -19
- package/dist/index-0ioNhtNM.js +0 -10
- package/dist/index-437EL2iq.js +0 -52
- package/dist/index-B695uy69.js +0 -9
- package/dist/index-BEZCAdXQ.js +0 -1568
- package/dist/index-BGQepRFJ.js +0 -27
- package/dist/index-BZPx6jYI.js +0 -8
- package/dist/index-BaLuVb4t.js +0 -70
- package/dist/index-Bw62B28F.js +0 -31
- package/dist/index-By-GFSsC.js +0 -245
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-CCKe-Mpx.js +0 -6
- package/dist/index-Cv867SGx.js +0 -13
- package/dist/index-CvA4FcaC.js +0 -677
- package/dist/index-D2LZVjSn.js +0 -82
- package/dist/index-DFZozV_h.js +0 -68
- package/dist/index-DJQkmo5O.js +0 -49
- package/dist/index-DLohNuco.js +0 -36
- package/dist/index-DrFfdHac.js +0 -144
- package/dist/index-DrlYGDRT.js +0 -119
- package/dist/index-Dz8CQngS.js +0 -181
- package/dist/index-cd1ceFJg.js +0 -6973
- package/dist/index-rKs9bXHr.js +0 -6
- package/dist/mermaid-O7DHMXV3-gUrB-Xs1.js +0 -4
- package/dist/react-resizable-panels.browser-DYl0LXfw.js +0 -1510
- package/dist/web-BwFNdl01.js +0 -697
|
@@ -1,944 +1,1596 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { u as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { u as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { u as
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as f, jsxs as xe } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon as ut, ChevronRightIcon as qt } from "lucide-react";
|
|
4
|
+
import { cn as ce } from "../../../lib/utils.js";
|
|
5
|
+
import * as n from "react";
|
|
6
|
+
import { u as he } from "../../../useTimeout-DAqPwigF.js";
|
|
7
|
+
import { u as de } from "../../../useStableCallback-CudqoENs.js";
|
|
8
|
+
import { u as ge, a as Wt } from "../../../useBaseUiId-C8Dq0BQq.js";
|
|
9
|
+
import { u as ve } from "../../../useIsoLayoutEffect-DpJo20by.js";
|
|
10
|
+
import { u as Xt } from "../../../useOnFirstRender-B4aruaIA.js";
|
|
11
|
+
import { F as $t, I as Jt, u as Qt, a as Zt, b as ct } from "../../../InternalBackdrop-BVEfe6O1.js";
|
|
12
|
+
import { f as ie, m as Oe, c as en, u as q, a as tn, E as _e, b as nn } from "../../../useRenderElement-DNB2vtF1.js";
|
|
13
|
+
import { x as dt, z as on, L as rn, s as sn, w as an, R as un, P as cn, M as lt, d as G, H as dn, v as pt, u as ft, p as ln, T as pn, q as Ve, o as fn, J as mn, b as gn, E as bn, j as hn, G as vn, k as xn, B as ot, i as rt, A as Mn, r as Cn } from "../../../popupStateMapping-BT9Y_jIq.js";
|
|
14
|
+
import { u as Rn } from "../../../DirectionContext-BSOheMwC.js";
|
|
15
|
+
import { r as Ee, c as ae, o as yn, b as ye, s as be, t as st, a as En, e as In, f as ke, l as Pn, i as Nn, q as Tn } from "../../../createBaseUIEventDetails-CqidROtw.js";
|
|
16
|
+
import { p as wn, c as Sn, a as On, b as kn, u as Dn, d as _n, e as Vn } from "../../../useSyncedFloatingRootContext-Bc90zSTy.js";
|
|
17
|
+
import { u as Fn } from "../../../useRole-N-RCRzo1.js";
|
|
18
|
+
import { u as An, a as Un, g as Bn } from "../../../getPseudoElementBounds-B4_miSEJ.js";
|
|
19
|
+
import { u as mt } from "../../../useControlled-Sx-_x7Sz.js";
|
|
20
|
+
import { b as Gn } from "../../../detectBrowser-Dn2N72k1.js";
|
|
21
|
+
import { a as gt, u as Ln } from "../../../useButton-JYPKQKj4.js";
|
|
22
|
+
import { u as Ie } from "../../../useCompositeListItem-CYQrZg5-.js";
|
|
23
|
+
import { t as bt, u as ht, a as Fe, b as Hn } from "../../../useOpenChangeComplete-DkeH9FGJ.js";
|
|
24
|
+
import { i as zn } from "../../../inertValue-kpZZDBEy.js";
|
|
25
|
+
import { g as vt, u as Kn, a as Yn } from "../../../getDisabledMountTransitionStyles-fmnaQYVj.js";
|
|
26
|
+
import { C as jn } from "../../../CompositeList-yq5K_yj6.js";
|
|
27
|
+
import { u as qn } from "../../../ToolbarRootContext-D7EsmJ5f.js";
|
|
28
|
+
import { C as Wn } from "../../../composite-BSpUD7nI.js";
|
|
29
|
+
import { a as Xn, u as xt, s as Mt } from "../../../safePolygon-CJcmMc0u.js";
|
|
30
|
+
import { S as $n } from "../../../Separator-CswSYAXX.js";
|
|
31
|
+
import * as at from "react-dom";
|
|
32
|
+
import { o as De } from "../../../owner-rKN292Q9.js";
|
|
33
|
+
import { C as Jn } from "../../../CompositeItem-CniPsjzP.js";
|
|
34
|
+
import { i as Qn, n as Zn, m as eo } from "../../../floating-ui.utils.dom-jr2suqy2.js";
|
|
35
|
+
import { u as to } from "../../../useFocus-Aj9ShMQu.js";
|
|
36
|
+
import { c as Se } from "../../../element-DSo91iOi.js";
|
|
37
|
+
const Ae = /* @__PURE__ */ n.createContext(void 0);
|
|
38
|
+
process.env.NODE_ENV !== "production" && (Ae.displayName = "MenuPositionerContext");
|
|
39
|
+
function Me(e) {
|
|
40
|
+
const t = n.useContext(Ae);
|
|
41
|
+
if (t === void 0 && !e)
|
|
42
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>." : ie(33));
|
|
43
|
+
return t;
|
|
44
|
+
}
|
|
45
|
+
const Ue = /* @__PURE__ */ n.createContext(void 0);
|
|
46
|
+
process.env.NODE_ENV !== "production" && (Ue.displayName = "MenuRootContext");
|
|
47
|
+
function ee(e) {
|
|
48
|
+
const t = n.useContext(Ue);
|
|
49
|
+
if (t === void 0 && !e)
|
|
50
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>." : ie(36));
|
|
51
|
+
return t;
|
|
52
|
+
}
|
|
53
|
+
const Ct = /* @__PURE__ */ n.createContext(void 0);
|
|
54
|
+
process.env.NODE_ENV !== "production" && (Ct.displayName = "ContextMenuRootContext");
|
|
55
|
+
function Pe(e = !0) {
|
|
56
|
+
const t = n.useContext(Ct);
|
|
57
|
+
if (t === void 0 && !e)
|
|
58
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>." : ie(25));
|
|
59
|
+
return t;
|
|
60
|
+
}
|
|
61
|
+
const Be = /* @__PURE__ */ n.createContext(void 0);
|
|
62
|
+
process.env.NODE_ENV !== "production" && (Be.displayName = "MenuCheckboxItemContext");
|
|
63
|
+
function no() {
|
|
64
|
+
const e = n.useContext(Be);
|
|
65
|
+
if (e === void 0)
|
|
66
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>." : ie(30));
|
|
67
|
+
return e;
|
|
68
|
+
}
|
|
69
|
+
function oo(e) {
|
|
70
|
+
const {
|
|
71
|
+
closeOnClick: t,
|
|
72
|
+
highlighted: o,
|
|
73
|
+
id: u,
|
|
74
|
+
nodeId: p,
|
|
75
|
+
store: d,
|
|
76
|
+
typingRef: b,
|
|
77
|
+
itemRef: r,
|
|
78
|
+
itemMetadata: c
|
|
79
|
+
} = e, {
|
|
80
|
+
events: y
|
|
81
|
+
} = d.useState("floatingTreeRoot"), m = Pe(!0), x = m !== void 0;
|
|
82
|
+
return n.useMemo(() => ({
|
|
83
|
+
id: u,
|
|
84
|
+
role: "menuitem",
|
|
85
|
+
tabIndex: o ? 0 : -1,
|
|
86
|
+
onKeyDown(g) {
|
|
87
|
+
g.key === " " && b?.current && g.preventDefault();
|
|
88
|
+
},
|
|
89
|
+
onMouseMove(g) {
|
|
90
|
+
p && y.emit("itemhover", {
|
|
91
|
+
nodeId: p,
|
|
92
|
+
target: g.currentTarget
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
onClick(g) {
|
|
96
|
+
t && y.emit("close", {
|
|
97
|
+
domEvent: g,
|
|
98
|
+
reason: Ee
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
onMouseUp(g) {
|
|
102
|
+
if (m) {
|
|
103
|
+
const P = m.initialCursorPointRef.current;
|
|
104
|
+
if (m.initialCursorPointRef.current = null, x && P && Math.abs(g.clientX - P.x) <= 1 && Math.abs(g.clientY - P.y) <= 1 || x && !Gn && g.button === 2)
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
r.current && d.context.allowMouseUpTriggerRef.current && (!x || g.button === 2) && (!c || c.type === "regular-item") && r.current.click();
|
|
57
108
|
}
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
(e, t) => {
|
|
63
|
-
const { __scopeMenu: n, ...o } = e, a = K(n);
|
|
64
|
-
return /* @__PURE__ */ r(kn, { ...a, ...o, ref: t });
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
oe.displayName = Yn;
|
|
68
|
-
var re = "MenuPortal", [Hn, Pe] = D(re, {
|
|
69
|
-
forceMount: void 0
|
|
70
|
-
}), Ee = (e) => {
|
|
71
|
-
const { __scopeMenu: t, forceMount: n, children: o, container: a } = e, c = b(re, t);
|
|
72
|
-
return /* @__PURE__ */ r(Hn, { scope: t, forceMount: n, children: /* @__PURE__ */ r(Y, { present: n || c.open, children: /* @__PURE__ */ r(En, { asChild: !0, container: a, children: o }) }) });
|
|
109
|
+
}), [t, o, u, y, p, d, b, r, m, x, c]);
|
|
110
|
+
}
|
|
111
|
+
const Ge = {
|
|
112
|
+
type: "regular-item"
|
|
73
113
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
return /* @__PURE__ */ r(
|
|
106
|
-
se,
|
|
107
|
-
{
|
|
108
|
-
...e,
|
|
109
|
-
ref: t,
|
|
110
|
-
trapFocus: !1,
|
|
111
|
-
disableOutsidePointerEvents: !1,
|
|
112
|
-
disableOutsideScroll: !1,
|
|
113
|
-
onDismiss: () => n.onOpenChange(!1)
|
|
114
|
+
function Ne(e) {
|
|
115
|
+
const {
|
|
116
|
+
closeOnClick: t,
|
|
117
|
+
disabled: o = !1,
|
|
118
|
+
highlighted: u,
|
|
119
|
+
id: p,
|
|
120
|
+
store: d,
|
|
121
|
+
typingRef: b = d.context.typingRef,
|
|
122
|
+
nativeButton: r,
|
|
123
|
+
itemMetadata: c,
|
|
124
|
+
nodeId: y
|
|
125
|
+
} = e, m = n.useRef(null), {
|
|
126
|
+
getButtonProps: x,
|
|
127
|
+
buttonRef: g
|
|
128
|
+
} = gt({
|
|
129
|
+
disabled: o,
|
|
130
|
+
focusableWhenDisabled: !0,
|
|
131
|
+
native: r,
|
|
132
|
+
composite: !0
|
|
133
|
+
}), P = oo({
|
|
134
|
+
closeOnClick: t,
|
|
135
|
+
highlighted: u,
|
|
136
|
+
id: p,
|
|
137
|
+
nodeId: y,
|
|
138
|
+
store: d,
|
|
139
|
+
typingRef: b,
|
|
140
|
+
itemRef: m,
|
|
141
|
+
itemMetadata: c
|
|
142
|
+
}), O = n.useCallback((C) => Oe(P, {
|
|
143
|
+
onMouseEnter() {
|
|
144
|
+
c.type === "submenu-trigger" && c.setActive();
|
|
114
145
|
}
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
onDismiss: C,
|
|
131
|
-
disableOutsideScroll: M,
|
|
132
|
-
...S
|
|
133
|
-
} = e, N = b(_, n), I = $(_, n), mn = K(n), vn = De(n), le = Vn(n), [gn, pe] = s.useState(null), U = s.useRef(null), Mn = G(t, U, N.onContentChange), z = s.useRef(0), B = s.useRef(""), hn = s.useRef(0), Z = s.useRef(null), fe = s.useRef("right"), q = s.useRef(0), wn = M ? An : s.Fragment, Cn = M ? { as: Jn, allowPinchZoom: !0 } : void 0, _n = (l) => {
|
|
134
|
-
const E = B.current + l, x = le().filter((w) => !w.disabled), T = document.activeElement, J = x.find((w) => w.ref.current === T)?.textValue, Q = x.map((w) => w.textValue), me = dt(Q, E, J), A = x.find((w) => w.textValue === me)?.ref.current;
|
|
135
|
-
(function w(ve) {
|
|
136
|
-
B.current = ve, window.clearTimeout(z.current), ve !== "" && (z.current = window.setTimeout(() => w(""), 1e3));
|
|
137
|
-
})(E), A && setTimeout(() => A.focus());
|
|
146
|
+
}, C, x), [P, x, c]), i = en(m, g);
|
|
147
|
+
return n.useMemo(() => ({
|
|
148
|
+
getItemProps: O,
|
|
149
|
+
itemRef: i
|
|
150
|
+
}), [O, i]);
|
|
151
|
+
}
|
|
152
|
+
let it = /* @__PURE__ */ (function(e) {
|
|
153
|
+
return e.checked = "data-checked", e.unchecked = "data-unchecked", e.disabled = "data-disabled", e.highlighted = "data-highlighted", e;
|
|
154
|
+
})({});
|
|
155
|
+
const Te = {
|
|
156
|
+
checked(e) {
|
|
157
|
+
return e ? {
|
|
158
|
+
[it.checked]: ""
|
|
159
|
+
} : {
|
|
160
|
+
[it.unchecked]: ""
|
|
138
161
|
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
onPointerDownOutside: p,
|
|
184
|
-
onFocusOutside: u,
|
|
185
|
-
onInteractOutside: v,
|
|
186
|
-
onDismiss: C,
|
|
187
|
-
children: /* @__PURE__ */ r(
|
|
188
|
-
Kn,
|
|
189
|
-
{
|
|
190
|
-
asChild: !0,
|
|
191
|
-
...vn,
|
|
192
|
-
dir: I.dir,
|
|
193
|
-
orientation: "vertical",
|
|
194
|
-
loop: o,
|
|
195
|
-
currentTabStopId: gn,
|
|
196
|
-
onCurrentTabStopIdChange: pe,
|
|
197
|
-
onEntryFocus: g(f, (l) => {
|
|
198
|
-
I.isUsingKeyboardRef.current || l.preventDefault();
|
|
199
|
-
}),
|
|
200
|
-
preventScrollOnEntryFocus: !0,
|
|
201
|
-
children: /* @__PURE__ */ r(
|
|
202
|
-
Ln,
|
|
203
|
-
{
|
|
204
|
-
role: "menu",
|
|
205
|
-
"aria-orientation": "vertical",
|
|
206
|
-
"data-state": Ye(N.open),
|
|
207
|
-
"data-radix-menu-content": "",
|
|
208
|
-
dir: I.dir,
|
|
209
|
-
...mn,
|
|
210
|
-
...S,
|
|
211
|
-
ref: Mn,
|
|
212
|
-
style: { outline: "none", ...S.style },
|
|
213
|
-
onKeyDown: g(S.onKeyDown, (l) => {
|
|
214
|
-
const x = l.target.closest("[data-radix-menu-content]") === l.currentTarget, T = l.ctrlKey || l.altKey || l.metaKey, J = l.key.length === 1;
|
|
215
|
-
x && (l.key === "Tab" && l.preventDefault(), !T && J && _n(l.key));
|
|
216
|
-
const Q = U.current;
|
|
217
|
-
if (l.target !== Q || !Un.includes(l.key)) return;
|
|
218
|
-
l.preventDefault();
|
|
219
|
-
const A = le().filter((w) => !w.disabled).map((w) => w.ref.current);
|
|
220
|
-
be.includes(l.key) && A.reverse(), ut(A);
|
|
221
|
-
}),
|
|
222
|
-
onBlur: g(e.onBlur, (l) => {
|
|
223
|
-
l.currentTarget.contains(l.target) || (window.clearTimeout(z.current), B.current = "");
|
|
224
|
-
}),
|
|
225
|
-
onPointerMove: g(
|
|
226
|
-
e.onPointerMove,
|
|
227
|
-
L((l) => {
|
|
228
|
-
const E = l.target, x = q.current !== l.clientX;
|
|
229
|
-
if (l.currentTarget.contains(E) && x) {
|
|
230
|
-
const T = l.clientX > q.current ? "right" : "left";
|
|
231
|
-
fe.current = T, q.current = l.clientX;
|
|
232
|
-
}
|
|
233
|
-
})
|
|
234
|
-
)
|
|
235
|
-
}
|
|
236
|
-
)
|
|
237
|
-
}
|
|
238
|
-
)
|
|
239
|
-
}
|
|
240
|
-
)
|
|
241
|
-
}
|
|
242
|
-
) })
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
);
|
|
247
|
-
ye.displayName = _;
|
|
248
|
-
var Qn = "MenuGroup", ce = s.forwardRef(
|
|
249
|
-
(e, t) => {
|
|
250
|
-
const { __scopeMenu: n, ...o } = e;
|
|
251
|
-
return /* @__PURE__ */ r(y.div, { role: "group", ...o, ref: t });
|
|
252
|
-
}
|
|
253
|
-
);
|
|
254
|
-
ce.displayName = Qn;
|
|
255
|
-
var et = "MenuLabel", Ne = s.forwardRef(
|
|
256
|
-
(e, t) => {
|
|
257
|
-
const { __scopeMenu: n, ...o } = e;
|
|
258
|
-
return /* @__PURE__ */ r(y.div, { ...o, ref: t });
|
|
259
|
-
}
|
|
260
|
-
);
|
|
261
|
-
Ne.displayName = et;
|
|
262
|
-
var j = "MenuItem", ge = "menu.itemSelect", H = s.forwardRef(
|
|
263
|
-
(e, t) => {
|
|
264
|
-
const { disabled: n = !1, onSelect: o, ...a } = e, c = s.useRef(null), i = $(j, e.__scopeMenu), d = ae(j, e.__scopeMenu), f = G(t, c), m = s.useRef(!1), p = () => {
|
|
265
|
-
const u = c.current;
|
|
266
|
-
if (!n && u) {
|
|
267
|
-
const v = new CustomEvent(ge, { bubbles: !0, cancelable: !0 });
|
|
268
|
-
u.addEventListener(ge, (C) => o?.(C), { once: !0 }), Sn(u, v), v.defaultPrevented ? m.current = !1 : i.onClose();
|
|
162
|
+
},
|
|
163
|
+
...bt
|
|
164
|
+
}, Rt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
165
|
+
const {
|
|
166
|
+
render: u,
|
|
167
|
+
className: p,
|
|
168
|
+
id: d,
|
|
169
|
+
label: b,
|
|
170
|
+
nativeButton: r = !1,
|
|
171
|
+
disabled: c = !1,
|
|
172
|
+
closeOnClick: y = !1,
|
|
173
|
+
checked: m,
|
|
174
|
+
defaultChecked: x,
|
|
175
|
+
onCheckedChange: g,
|
|
176
|
+
...P
|
|
177
|
+
} = t, O = Ie({
|
|
178
|
+
label: b
|
|
179
|
+
}), i = Me(!0), C = ge(d), {
|
|
180
|
+
store: h
|
|
181
|
+
} = ee(), a = h.useState("isActive", O.index), S = h.useState("itemProps"), [k, l] = mt({
|
|
182
|
+
controlled: m,
|
|
183
|
+
default: x ?? !1,
|
|
184
|
+
name: "MenuCheckboxItem",
|
|
185
|
+
state: "checked"
|
|
186
|
+
}), {
|
|
187
|
+
getItemProps: s,
|
|
188
|
+
itemRef: N
|
|
189
|
+
} = Ne({
|
|
190
|
+
closeOnClick: y,
|
|
191
|
+
disabled: c,
|
|
192
|
+
highlighted: a,
|
|
193
|
+
id: C,
|
|
194
|
+
store: h,
|
|
195
|
+
nativeButton: r,
|
|
196
|
+
nodeId: i?.nodeId,
|
|
197
|
+
itemMetadata: Ge
|
|
198
|
+
}), T = n.useMemo(() => ({
|
|
199
|
+
disabled: c,
|
|
200
|
+
highlighted: a,
|
|
201
|
+
checked: k
|
|
202
|
+
}), [c, a, k]), R = de((A) => {
|
|
203
|
+
const L = {
|
|
204
|
+
...ae(Ee, A.nativeEvent),
|
|
205
|
+
preventUnmountOnClose: () => {
|
|
269
206
|
}
|
|
270
207
|
};
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
(
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
);
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
)
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
208
|
+
g?.(!k, L), !L.isCanceled && l((_) => !_);
|
|
209
|
+
}), D = q("div", t, {
|
|
210
|
+
state: T,
|
|
211
|
+
stateAttributesMapping: Te,
|
|
212
|
+
props: [S, {
|
|
213
|
+
role: "menuitemcheckbox",
|
|
214
|
+
"aria-checked": k,
|
|
215
|
+
onClick: R
|
|
216
|
+
}, P, s],
|
|
217
|
+
ref: [N, o, O.ref]
|
|
218
|
+
});
|
|
219
|
+
return /* @__PURE__ */ f(Be.Provider, {
|
|
220
|
+
value: T,
|
|
221
|
+
children: D
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
process.env.NODE_ENV !== "production" && (Rt.displayName = "MenuCheckboxItem");
|
|
225
|
+
const yt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
226
|
+
const {
|
|
227
|
+
render: u,
|
|
228
|
+
className: p,
|
|
229
|
+
keepMounted: d = !1,
|
|
230
|
+
...b
|
|
231
|
+
} = t, r = no(), c = n.useRef(null), {
|
|
232
|
+
transitionStatus: y,
|
|
233
|
+
setMounted: m
|
|
234
|
+
} = ht(r.checked);
|
|
235
|
+
Fe({
|
|
236
|
+
open: r.checked,
|
|
237
|
+
ref: c,
|
|
238
|
+
onComplete() {
|
|
239
|
+
r.checked || m(!1);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
const x = {
|
|
243
|
+
checked: r.checked,
|
|
244
|
+
disabled: r.disabled,
|
|
245
|
+
highlighted: r.highlighted,
|
|
246
|
+
transitionStatus: y
|
|
247
|
+
};
|
|
248
|
+
return q("span", t, {
|
|
249
|
+
state: x,
|
|
250
|
+
ref: [o, c],
|
|
251
|
+
stateAttributesMapping: Te,
|
|
252
|
+
props: {
|
|
253
|
+
"aria-hidden": !0,
|
|
254
|
+
...b
|
|
255
|
+
},
|
|
256
|
+
enabled: d || r.checked
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
process.env.NODE_ENV !== "production" && (yt.displayName = "MenuCheckboxItemIndicator");
|
|
260
|
+
const Le = /* @__PURE__ */ n.createContext(void 0);
|
|
261
|
+
process.env.NODE_ENV !== "production" && (Le.displayName = "MenuGroupContext");
|
|
262
|
+
function ro() {
|
|
263
|
+
const e = n.useContext(Le);
|
|
264
|
+
if (e === void 0)
|
|
265
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>." : ie(31));
|
|
266
|
+
return e;
|
|
267
|
+
}
|
|
268
|
+
const He = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
269
|
+
const {
|
|
270
|
+
render: u,
|
|
271
|
+
className: p,
|
|
272
|
+
...d
|
|
273
|
+
} = t, [b, r] = n.useState(void 0), c = n.useMemo(() => ({
|
|
274
|
+
setLabelId: r
|
|
275
|
+
}), [r]), y = q("div", t, {
|
|
276
|
+
ref: o,
|
|
277
|
+
props: {
|
|
278
|
+
role: "group",
|
|
279
|
+
"aria-labelledby": b,
|
|
280
|
+
...d
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
return /* @__PURE__ */ f(Le.Provider, {
|
|
284
|
+
value: c,
|
|
285
|
+
children: y
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
process.env.NODE_ENV !== "production" && (He.displayName = "MenuGroup");
|
|
289
|
+
const Et = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
290
|
+
const {
|
|
291
|
+
className: u,
|
|
292
|
+
render: p,
|
|
293
|
+
id: d,
|
|
294
|
+
...b
|
|
295
|
+
} = t, r = ge(d), {
|
|
296
|
+
setLabelId: c
|
|
297
|
+
} = ro();
|
|
298
|
+
return ve(() => (c(r), () => {
|
|
299
|
+
c(void 0);
|
|
300
|
+
}), [c, r]), q("div", t, {
|
|
301
|
+
ref: o,
|
|
302
|
+
props: {
|
|
303
|
+
id: r,
|
|
304
|
+
role: "presentation",
|
|
305
|
+
...b
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
process.env.NODE_ENV !== "production" && (Et.displayName = "MenuGroupLabel");
|
|
310
|
+
const It = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
311
|
+
const {
|
|
312
|
+
render: u,
|
|
313
|
+
className: p,
|
|
314
|
+
id: d,
|
|
315
|
+
label: b,
|
|
316
|
+
nativeButton: r = !1,
|
|
317
|
+
disabled: c = !1,
|
|
318
|
+
closeOnClick: y = !0,
|
|
319
|
+
...m
|
|
320
|
+
} = t, x = Ie({
|
|
321
|
+
label: b
|
|
322
|
+
}), g = Me(!0), P = ge(d), {
|
|
323
|
+
store: O
|
|
324
|
+
} = ee(), i = O.useState("isActive", x.index), C = O.useState("itemProps"), {
|
|
325
|
+
getItemProps: h,
|
|
326
|
+
itemRef: a
|
|
327
|
+
} = Ne({
|
|
328
|
+
closeOnClick: y,
|
|
329
|
+
disabled: c,
|
|
330
|
+
highlighted: i,
|
|
331
|
+
id: P,
|
|
332
|
+
store: O,
|
|
333
|
+
nativeButton: r,
|
|
334
|
+
nodeId: g?.nodeId,
|
|
335
|
+
itemMetadata: Ge
|
|
336
|
+
});
|
|
337
|
+
return q("div", t, {
|
|
338
|
+
state: {
|
|
339
|
+
disabled: c,
|
|
340
|
+
highlighted: i
|
|
341
|
+
},
|
|
342
|
+
props: [C, m, h],
|
|
343
|
+
ref: [a, o, x.ref]
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
process.env.NODE_ENV !== "production" && (It.displayName = "MenuItem");
|
|
347
|
+
const so = {
|
|
348
|
+
...dt,
|
|
349
|
+
...bt
|
|
350
|
+
}, Pt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
351
|
+
const {
|
|
352
|
+
render: u,
|
|
353
|
+
className: p,
|
|
354
|
+
finalFocus: d,
|
|
355
|
+
...b
|
|
356
|
+
} = t, {
|
|
357
|
+
store: r
|
|
358
|
+
} = ee(), {
|
|
359
|
+
side: c,
|
|
360
|
+
align: y
|
|
361
|
+
} = Me(), m = qn() != null, x = r.useState("open"), g = r.useState("transitionStatus"), P = r.useState("popupProps"), O = r.useState("mounted"), i = r.useState("instantType"), C = r.useState("activeTriggerElement"), h = r.useState("parent"), a = r.useState("lastOpenChangeReason"), S = r.useState("rootId"), k = r.useState("floatingRootContext"), l = r.useState("floatingTreeRoot"), s = r.useState("closeDelay"), N = r.useState("activeTriggerElement"), T = h.type === "context-menu";
|
|
362
|
+
Fe({
|
|
363
|
+
open: x,
|
|
364
|
+
ref: r.context.popupRef,
|
|
365
|
+
onComplete() {
|
|
366
|
+
x && r.context.onOpenChangeComplete?.(!0);
|
|
367
|
+
}
|
|
368
|
+
}), n.useEffect(() => {
|
|
369
|
+
function U(W) {
|
|
370
|
+
r.setOpen(!1, ae(W.reason, W.domEvent));
|
|
371
|
+
}
|
|
372
|
+
return l.events.on("close", U), () => {
|
|
373
|
+
l.events.off("close", U);
|
|
374
|
+
};
|
|
375
|
+
}, [l.events, r]);
|
|
376
|
+
const R = r.useState("hoverEnabled"), D = r.useState("disabled");
|
|
377
|
+
Xn(k, {
|
|
378
|
+
enabled: R && !D && !T && h.type !== "menubar",
|
|
379
|
+
closeDelay: s
|
|
380
|
+
});
|
|
381
|
+
const A = {
|
|
382
|
+
transitionStatus: g,
|
|
383
|
+
side: c,
|
|
384
|
+
align: y,
|
|
385
|
+
open: x,
|
|
386
|
+
nested: h.type === "menu",
|
|
387
|
+
instant: i
|
|
388
|
+
}, L = n.useCallback((U) => {
|
|
389
|
+
r.set("popupElement", U);
|
|
390
|
+
}, [r]), _ = q("div", t, {
|
|
391
|
+
state: A,
|
|
392
|
+
ref: [o, r.context.popupRef, L],
|
|
393
|
+
stateAttributesMapping: so,
|
|
394
|
+
props: [P, {
|
|
395
|
+
onKeyDown(U) {
|
|
396
|
+
m && Wn.has(U.key) && U.stopPropagation();
|
|
379
397
|
}
|
|
380
|
-
)
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
398
|
+
}, vt(g), b, {
|
|
399
|
+
"data-rootownerid": S
|
|
400
|
+
}]
|
|
401
|
+
});
|
|
402
|
+
let K = h.type === void 0 || T;
|
|
403
|
+
return (C || h.type === "menubar" && a !== yn) && (K = !0), /* @__PURE__ */ f($t, {
|
|
404
|
+
context: k,
|
|
405
|
+
modal: T,
|
|
406
|
+
disabled: !O,
|
|
407
|
+
returnFocus: d === void 0 ? K : d,
|
|
408
|
+
initialFocus: h.type !== "menu",
|
|
409
|
+
restoreFocus: !0,
|
|
410
|
+
externalTree: h.type !== "menubar" ? l : void 0,
|
|
411
|
+
previousFocusableElement: N,
|
|
412
|
+
nextFocusableElement: h.type === void 0 ? r.context.triggerFocusTargetRef : void 0,
|
|
413
|
+
beforeContentFocusGuardRef: h.type === void 0 ? r.context.beforeContentFocusGuardRef : void 0,
|
|
414
|
+
children: _
|
|
415
|
+
});
|
|
416
|
+
});
|
|
417
|
+
process.env.NODE_ENV !== "production" && (Pt.displayName = "MenuPopup");
|
|
418
|
+
const ze = /* @__PURE__ */ n.createContext(void 0);
|
|
419
|
+
process.env.NODE_ENV !== "production" && (ze.displayName = "MenuPortalContext");
|
|
420
|
+
function ao() {
|
|
421
|
+
const e = n.useContext(ze);
|
|
422
|
+
if (e === void 0)
|
|
423
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Menu.Portal> is missing." : ie(32));
|
|
424
|
+
return e;
|
|
425
|
+
}
|
|
426
|
+
const Ke = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
427
|
+
const {
|
|
428
|
+
keepMounted: u = !1,
|
|
429
|
+
...p
|
|
430
|
+
} = t, {
|
|
431
|
+
store: d
|
|
432
|
+
} = ee();
|
|
433
|
+
return d.useState("mounted") || u ? /* @__PURE__ */ f(ze.Provider, {
|
|
434
|
+
value: u,
|
|
435
|
+
children: /* @__PURE__ */ f(on, {
|
|
436
|
+
ref: o,
|
|
437
|
+
...p
|
|
438
|
+
})
|
|
439
|
+
}) : null;
|
|
440
|
+
});
|
|
441
|
+
process.env.NODE_ENV !== "production" && (Ke.displayName = "MenuPortal");
|
|
442
|
+
const Nt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
443
|
+
const {
|
|
444
|
+
anchor: u,
|
|
445
|
+
positionMethod: p = "absolute",
|
|
446
|
+
className: d,
|
|
447
|
+
render: b,
|
|
448
|
+
side: r,
|
|
449
|
+
align: c,
|
|
450
|
+
sideOffset: y = 0,
|
|
451
|
+
alignOffset: m = 0,
|
|
452
|
+
collisionBoundary: x = "clipping-ancestors",
|
|
453
|
+
collisionPadding: g = 5,
|
|
454
|
+
arrowPadding: P = 5,
|
|
455
|
+
sticky: O = !1,
|
|
456
|
+
disableAnchorTracking: i = !1,
|
|
457
|
+
collisionAvoidance: C = rn,
|
|
458
|
+
...h
|
|
459
|
+
} = t, {
|
|
460
|
+
store: a
|
|
461
|
+
} = ee(), S = ao(), k = Pe(!0), l = a.useState("parent"), s = a.useState("floatingRootContext"), N = a.useState("floatingTreeRoot"), T = a.useState("mounted"), R = a.useState("open"), D = a.useState("modal"), A = a.useState("activeTriggerElement"), L = a.useState("transitionStatus"), _ = a.useState("positionerElement"), K = a.useState("instantType"), U = a.useState("hasViewport"), W = a.useState("lastOpenChangeReason"), E = a.useState("floatingNodeId"), H = a.useState("floatingParentNodeId"), ue = s.useState("domReferenceElement"), te = n.useRef(null), Y = Hn(_, !1, !1);
|
|
462
|
+
let ne = u, X = y, le = m, B = c, $ = C;
|
|
463
|
+
l.type === "context-menu" && (ne = u ?? l.context?.anchor, B = B ?? "start", !r && B !== "center" && (le = t.alignOffset ?? 2, X = t.sideOffset ?? -5));
|
|
464
|
+
let J = r, Q = B;
|
|
465
|
+
l.type === "menu" ? (J = J ?? "inline-end", Q = Q ?? "start", $ = t.collisionAvoidance ?? sn) : l.type === "menubar" && (J = J ?? "bottom", Q = Q ?? "start");
|
|
466
|
+
const oe = l.type === "context-menu", V = Kn({
|
|
467
|
+
anchor: ne,
|
|
468
|
+
floatingRootContext: s,
|
|
469
|
+
positionMethod: k ? "fixed" : p,
|
|
470
|
+
mounted: T,
|
|
471
|
+
side: J,
|
|
472
|
+
sideOffset: X,
|
|
473
|
+
align: Q,
|
|
474
|
+
alignOffset: le,
|
|
475
|
+
arrowPadding: oe ? 0 : P,
|
|
476
|
+
collisionBoundary: x,
|
|
477
|
+
collisionPadding: g,
|
|
478
|
+
sticky: O,
|
|
479
|
+
nodeId: E,
|
|
480
|
+
keepMounted: S,
|
|
481
|
+
disableAnchorTracking: i,
|
|
482
|
+
collisionAvoidance: $,
|
|
483
|
+
shiftCrossAxis: oe && !("side" in $ && $.side === "flip"),
|
|
484
|
+
externalTree: N,
|
|
485
|
+
adaptiveOrigin: U ? Yn : void 0
|
|
486
|
+
}), re = n.useMemo(() => {
|
|
487
|
+
const M = {};
|
|
488
|
+
return R || (M.pointerEvents = "none"), {
|
|
489
|
+
role: "presentation",
|
|
490
|
+
hidden: !T,
|
|
491
|
+
style: {
|
|
492
|
+
...V.positionerStyles,
|
|
493
|
+
...M
|
|
402
494
|
}
|
|
403
|
-
|
|
404
|
-
}
|
|
405
|
-
)
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
495
|
+
};
|
|
496
|
+
}, [R, T, V.positionerStyles]);
|
|
497
|
+
n.useEffect(() => {
|
|
498
|
+
function M(I) {
|
|
499
|
+
I.open && (I.parentNodeId === E && a.set("hoverEnabled", !1), I.nodeId !== E && I.parentNodeId === a.select("floatingParentNodeId") && a.setOpen(!1, ae(be)));
|
|
500
|
+
}
|
|
501
|
+
return N.events.on("menuopenchange", M), () => {
|
|
502
|
+
N.events.off("menuopenchange", M);
|
|
503
|
+
};
|
|
504
|
+
}, [a, N.events, E]), n.useEffect(() => {
|
|
505
|
+
if (a.select("floatingParentNodeId") == null)
|
|
506
|
+
return;
|
|
507
|
+
function M(I) {
|
|
508
|
+
if (I.open || I.nodeId !== a.select("floatingParentNodeId"))
|
|
509
|
+
return;
|
|
510
|
+
const Z = I.reason ?? be;
|
|
511
|
+
a.setOpen(!1, ae(Z));
|
|
512
|
+
}
|
|
513
|
+
return N.events.on("menuopenchange", M), () => {
|
|
514
|
+
N.events.off("menuopenchange", M);
|
|
515
|
+
};
|
|
516
|
+
}, [N.events, a]);
|
|
517
|
+
const j = he();
|
|
518
|
+
n.useEffect(() => {
|
|
519
|
+
R || j.clear();
|
|
520
|
+
}, [R, j]), n.useEffect(() => {
|
|
521
|
+
function M(I) {
|
|
522
|
+
if (!(!R || I.nodeId !== a.select("floatingParentNodeId")))
|
|
523
|
+
if (I.target && A && A !== I.target) {
|
|
524
|
+
const Z = a.select("closeDelay");
|
|
525
|
+
Z > 0 ? j.isStarted() || j.start(Z, () => {
|
|
526
|
+
a.setOpen(!1, ae(be));
|
|
527
|
+
}) : a.setOpen(!1, ae(be));
|
|
528
|
+
} else
|
|
529
|
+
j.clear();
|
|
530
|
+
}
|
|
531
|
+
return N.events.on("itemhover", M), () => {
|
|
532
|
+
N.events.off("itemhover", M);
|
|
533
|
+
};
|
|
534
|
+
}, [N.events, R, A, a, j]), n.useEffect(() => {
|
|
535
|
+
const M = {
|
|
536
|
+
open: R,
|
|
537
|
+
nodeId: E,
|
|
538
|
+
parentNodeId: H,
|
|
539
|
+
reason: a.select("lastOpenChangeReason")
|
|
540
|
+
};
|
|
541
|
+
N.events.emit("menuopenchange", M);
|
|
542
|
+
}, [N.events, R, a, E, H]), ve(() => {
|
|
543
|
+
const M = ue, I = te.current;
|
|
544
|
+
if (M && (te.current = M), I && M && M !== I) {
|
|
545
|
+
a.set("instantType", void 0);
|
|
546
|
+
const Z = new AbortController();
|
|
547
|
+
return Y(() => {
|
|
548
|
+
a.set("instantType", "trigger-change");
|
|
549
|
+
}, Z.signal), () => {
|
|
550
|
+
Z.abort();
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
}, [ue, Y, a]);
|
|
554
|
+
const pe = {
|
|
555
|
+
open: R,
|
|
556
|
+
side: V.side,
|
|
557
|
+
align: V.align,
|
|
558
|
+
anchorHidden: V.anchorHidden,
|
|
559
|
+
nested: l.type === "menu",
|
|
560
|
+
instant: K
|
|
561
|
+
}, fe = n.useMemo(() => ({
|
|
562
|
+
side: V.side,
|
|
563
|
+
align: V.align,
|
|
564
|
+
arrowRef: V.arrowRef,
|
|
565
|
+
arrowUncentered: V.arrowUncentered,
|
|
566
|
+
arrowStyles: V.arrowStyles,
|
|
567
|
+
nodeId: V.context.nodeId
|
|
568
|
+
}), [V.side, V.align, V.arrowRef, V.arrowUncentered, V.arrowStyles, V.context.nodeId]), se = q("div", t, {
|
|
569
|
+
state: pe,
|
|
570
|
+
stateAttributesMapping: dt,
|
|
571
|
+
ref: [o, a.useStateSetter("positionerElement")],
|
|
572
|
+
props: [re, vt(L), h]
|
|
573
|
+
}), me = T && l.type !== "menu" && (l.type !== "menubar" && D && W !== ye || l.type === "menubar" && l.context.modal);
|
|
574
|
+
let F = null;
|
|
575
|
+
return l.type === "menubar" ? F = l.context.contentElement : l.type === void 0 && (F = A), /* @__PURE__ */ xe(Ae.Provider, {
|
|
576
|
+
value: fe,
|
|
577
|
+
children: [me && /* @__PURE__ */ f(Jt, {
|
|
578
|
+
ref: l.type === "context-menu" || l.type === "nested-context-menu" ? l.context.internalBackdropRef : null,
|
|
579
|
+
inert: zn(!R),
|
|
580
|
+
cutout: F
|
|
581
|
+
}), /* @__PURE__ */ f(an, {
|
|
582
|
+
id: E,
|
|
583
|
+
children: /* @__PURE__ */ f(jn, {
|
|
584
|
+
elementsRef: a.context.itemDomElements,
|
|
585
|
+
labelsRef: a.context.itemLabels,
|
|
586
|
+
children: se
|
|
587
|
+
})
|
|
588
|
+
})]
|
|
589
|
+
});
|
|
590
|
+
});
|
|
591
|
+
process.env.NODE_ENV !== "production" && (Nt.displayName = "MenuPositioner");
|
|
592
|
+
const Ye = /* @__PURE__ */ n.createContext(void 0);
|
|
593
|
+
process.env.NODE_ENV !== "production" && (Ye.displayName = "MenuRadioGroupContext");
|
|
594
|
+
function io() {
|
|
595
|
+
const e = n.useContext(Ye);
|
|
596
|
+
if (e === void 0)
|
|
597
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>." : ie(34));
|
|
598
|
+
return e;
|
|
599
|
+
}
|
|
600
|
+
const Tt = /* @__PURE__ */ n.memo(/* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
601
|
+
const {
|
|
602
|
+
render: u,
|
|
603
|
+
className: p,
|
|
604
|
+
value: d,
|
|
605
|
+
defaultValue: b,
|
|
606
|
+
onValueChange: r,
|
|
607
|
+
disabled: c = !1,
|
|
608
|
+
...y
|
|
609
|
+
} = t, [m, x] = mt({
|
|
610
|
+
controlled: d,
|
|
611
|
+
default: b,
|
|
612
|
+
name: "MenuRadioGroup"
|
|
613
|
+
}), g = de(r), P = de((h, a) => {
|
|
614
|
+
g?.(h, a), !a.isCanceled && x(h);
|
|
615
|
+
}), i = q("div", t, {
|
|
616
|
+
state: {
|
|
617
|
+
disabled: c
|
|
618
|
+
},
|
|
619
|
+
ref: o,
|
|
620
|
+
props: {
|
|
621
|
+
role: "group",
|
|
622
|
+
"aria-disabled": c || void 0,
|
|
623
|
+
...y
|
|
624
|
+
}
|
|
625
|
+
}), C = n.useMemo(() => ({
|
|
626
|
+
value: m,
|
|
627
|
+
setValue: P,
|
|
628
|
+
disabled: c
|
|
629
|
+
}), [m, P, c]);
|
|
630
|
+
return /* @__PURE__ */ f(Ye.Provider, {
|
|
631
|
+
value: C,
|
|
632
|
+
children: i
|
|
633
|
+
});
|
|
634
|
+
}));
|
|
635
|
+
process.env.NODE_ENV !== "production" && (Tt.displayName = "MenuRadioGroup");
|
|
636
|
+
const je = /* @__PURE__ */ n.createContext(void 0);
|
|
637
|
+
process.env.NODE_ENV !== "production" && (je.displayName = "MenuRadioItemContext");
|
|
638
|
+
function uo() {
|
|
639
|
+
const e = n.useContext(je);
|
|
640
|
+
if (e === void 0)
|
|
641
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>." : ie(35));
|
|
642
|
+
return e;
|
|
643
|
+
}
|
|
644
|
+
const wt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
645
|
+
const {
|
|
646
|
+
render: u,
|
|
647
|
+
className: p,
|
|
648
|
+
id: d,
|
|
649
|
+
label: b,
|
|
650
|
+
nativeButton: r = !1,
|
|
651
|
+
disabled: c = !1,
|
|
652
|
+
closeOnClick: y = !1,
|
|
653
|
+
value: m,
|
|
654
|
+
...x
|
|
655
|
+
} = t, g = Ie({
|
|
656
|
+
label: b
|
|
657
|
+
}), P = Me(!0), O = ge(d), {
|
|
658
|
+
store: i
|
|
659
|
+
} = ee(), C = i.useState("isActive", g.index), h = i.useState("itemProps"), {
|
|
660
|
+
value: a,
|
|
661
|
+
setValue: S,
|
|
662
|
+
disabled: k
|
|
663
|
+
} = io(), l = k || c, s = a === m, {
|
|
664
|
+
getItemProps: N,
|
|
665
|
+
itemRef: T
|
|
666
|
+
} = Ne({
|
|
667
|
+
closeOnClick: y,
|
|
668
|
+
disabled: l,
|
|
669
|
+
highlighted: C,
|
|
670
|
+
id: O,
|
|
671
|
+
store: i,
|
|
672
|
+
nativeButton: r,
|
|
673
|
+
nodeId: P?.nodeId,
|
|
674
|
+
itemMetadata: Ge
|
|
675
|
+
}), R = n.useMemo(() => ({
|
|
676
|
+
disabled: l,
|
|
677
|
+
highlighted: C,
|
|
678
|
+
checked: s
|
|
679
|
+
}), [l, C, s]), D = de((L) => {
|
|
680
|
+
const _ = {
|
|
681
|
+
...ae(Ee, L.nativeEvent),
|
|
682
|
+
preventUnmountOnClose: () => {
|
|
417
683
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
)
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
684
|
+
};
|
|
685
|
+
S(m, _);
|
|
686
|
+
}), A = q("div", t, {
|
|
687
|
+
state: R,
|
|
688
|
+
stateAttributesMapping: Te,
|
|
689
|
+
props: [h, {
|
|
690
|
+
role: "menuitemradio",
|
|
691
|
+
"aria-checked": s,
|
|
692
|
+
onClick: D
|
|
693
|
+
}, x, N],
|
|
694
|
+
ref: [T, o, g.ref]
|
|
695
|
+
});
|
|
696
|
+
return /* @__PURE__ */ f(je.Provider, {
|
|
697
|
+
value: R,
|
|
698
|
+
children: A
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
process.env.NODE_ENV !== "production" && (wt.displayName = "MenuRadioItem");
|
|
702
|
+
const St = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
703
|
+
const {
|
|
704
|
+
render: u,
|
|
705
|
+
className: p,
|
|
706
|
+
keepMounted: d = !1,
|
|
707
|
+
...b
|
|
708
|
+
} = t, r = uo(), c = n.useRef(null), {
|
|
709
|
+
transitionStatus: y,
|
|
710
|
+
setMounted: m
|
|
711
|
+
} = ht(r.checked);
|
|
712
|
+
Fe({
|
|
713
|
+
open: r.checked,
|
|
714
|
+
ref: c,
|
|
715
|
+
onComplete() {
|
|
716
|
+
r.checked || m(!1);
|
|
450
717
|
}
|
|
451
|
-
|
|
718
|
+
});
|
|
719
|
+
const x = {
|
|
720
|
+
checked: r.checked,
|
|
721
|
+
disabled: r.disabled,
|
|
722
|
+
highlighted: r.highlighted,
|
|
723
|
+
transitionStatus: y
|
|
724
|
+
};
|
|
725
|
+
return q("span", t, {
|
|
726
|
+
state: x,
|
|
727
|
+
stateAttributesMapping: Te,
|
|
728
|
+
ref: [o, c],
|
|
729
|
+
props: {
|
|
730
|
+
"aria-hidden": !0,
|
|
731
|
+
...b
|
|
732
|
+
},
|
|
733
|
+
enabled: d || r.checked
|
|
734
|
+
});
|
|
735
|
+
});
|
|
736
|
+
process.env.NODE_ENV !== "production" && (St.displayName = "MenuRadioItemIndicator");
|
|
737
|
+
const Ot = /* @__PURE__ */ n.createContext(null);
|
|
738
|
+
process.env.NODE_ENV !== "production" && (Ot.displayName = "MenubarContext");
|
|
739
|
+
function kt(e) {
|
|
740
|
+
return n.useContext(Ot);
|
|
741
|
+
}
|
|
742
|
+
const co = {
|
|
743
|
+
...wn,
|
|
744
|
+
disabled: G((e) => e.parent.type === "menubar" && e.parent.context.disabled || e.disabled),
|
|
745
|
+
modal: G((e) => (e.parent.type === void 0 || e.parent.type === "context-menu") && (e.modal ?? !0)),
|
|
746
|
+
allowMouseEnter: G((e) => e.allowMouseEnter),
|
|
747
|
+
stickIfOpen: G((e) => e.stickIfOpen),
|
|
748
|
+
parent: G((e) => e.parent),
|
|
749
|
+
rootId: G((e) => e.parent.type === "menu" ? e.parent.store.select("rootId") : e.parent.type !== void 0 ? e.parent.context.rootId : e.rootId),
|
|
750
|
+
activeIndex: G((e) => e.activeIndex),
|
|
751
|
+
isActive: G((e, t) => e.activeIndex === t),
|
|
752
|
+
hoverEnabled: G((e) => e.hoverEnabled),
|
|
753
|
+
instantType: G((e) => e.instantType),
|
|
754
|
+
lastOpenChangeReason: G((e) => e.openChangeReason),
|
|
755
|
+
floatingTreeRoot: G((e) => e.parent.type === "menu" ? e.parent.store.select("floatingTreeRoot") : e.floatingTreeRoot),
|
|
756
|
+
floatingNodeId: G((e) => e.floatingNodeId),
|
|
757
|
+
floatingParentNodeId: G((e) => e.floatingParentNodeId),
|
|
758
|
+
itemProps: G((e) => e.itemProps),
|
|
759
|
+
closeDelay: G((e) => e.closeDelay),
|
|
760
|
+
hasViewport: G((e) => e.hasViewport),
|
|
761
|
+
keyboardEventRelay: G((e) => {
|
|
762
|
+
if (e.keyboardEventRelay)
|
|
763
|
+
return e.keyboardEventRelay;
|
|
764
|
+
if (e.parent.type === "menu")
|
|
765
|
+
return e.parent.store.select("keyboardEventRelay");
|
|
766
|
+
})
|
|
452
767
|
};
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
},
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
onPointerLeave: g(
|
|
486
|
-
e.onPointerLeave,
|
|
487
|
-
L((u) => {
|
|
488
|
-
p();
|
|
489
|
-
const v = n.content?.getBoundingClientRect();
|
|
490
|
-
if (v) {
|
|
491
|
-
const C = n.content?.dataset.side, M = C === "right", S = M ? -5 : 5, N = v[M ? "left" : "right"], I = v[M ? "right" : "left"];
|
|
492
|
-
c.onPointerGraceIntentChange({
|
|
493
|
-
area: [
|
|
494
|
-
// Apply a bleed on clientX to ensure that our exit point is
|
|
495
|
-
// consistently within polygon bounds
|
|
496
|
-
{ x: u.clientX + S, y: u.clientY },
|
|
497
|
-
{ x: N, y: v.top },
|
|
498
|
-
{ x: I, y: v.top },
|
|
499
|
-
{ x: I, y: v.bottom },
|
|
500
|
-
{ x: N, y: v.bottom }
|
|
501
|
-
],
|
|
502
|
-
side: C
|
|
503
|
-
}), window.clearTimeout(d.current), d.current = window.setTimeout(
|
|
504
|
-
() => c.onPointerGraceIntentChange(null),
|
|
505
|
-
300
|
|
506
|
-
);
|
|
507
|
-
} else {
|
|
508
|
-
if (c.onTriggerLeave(u), u.defaultPrevented) return;
|
|
509
|
-
c.onPointerGraceIntentChange(null);
|
|
510
|
-
}
|
|
511
|
-
})
|
|
512
|
-
),
|
|
513
|
-
onKeyDown: g(e.onKeyDown, (u) => {
|
|
514
|
-
const v = c.searchRef.current !== "";
|
|
515
|
-
e.disabled || v && u.key === " " || zn[o.dir].includes(u.key) && (n.onOpenChange(!0), n.content?.focus(), u.preventDefault());
|
|
516
|
-
})
|
|
768
|
+
class qe extends un {
|
|
769
|
+
constructor(t) {
|
|
770
|
+
super({
|
|
771
|
+
...lo(),
|
|
772
|
+
...t
|
|
773
|
+
}, {
|
|
774
|
+
positionerRef: /* @__PURE__ */ n.createRef(),
|
|
775
|
+
popupRef: /* @__PURE__ */ n.createRef(),
|
|
776
|
+
typingRef: {
|
|
777
|
+
current: !1
|
|
778
|
+
},
|
|
779
|
+
itemDomElements: {
|
|
780
|
+
current: []
|
|
781
|
+
},
|
|
782
|
+
itemLabels: {
|
|
783
|
+
current: []
|
|
784
|
+
},
|
|
785
|
+
allowMouseUpTriggerRef: {
|
|
786
|
+
current: !1
|
|
787
|
+
},
|
|
788
|
+
triggerFocusTargetRef: /* @__PURE__ */ n.createRef(),
|
|
789
|
+
beforeContentFocusGuardRef: /* @__PURE__ */ n.createRef(),
|
|
790
|
+
onOpenChangeComplete: void 0,
|
|
791
|
+
triggerElements: new cn()
|
|
792
|
+
}, co), this.unsubscribeParentListener = this.observe("parent", (o) => {
|
|
793
|
+
if (this.unsubscribeParentListener?.(), o.type === "menu") {
|
|
794
|
+
let u = o.store.select("rootId"), p = o.store.select("floatingTreeRoot"), d = o.store.select("keyboardEventRelay");
|
|
795
|
+
this.unsubscribeParentListener = o.store.subscribe(() => {
|
|
796
|
+
const b = o.store.select("rootId"), r = o.store.select("floatingTreeRoot"), c = o.store.select("keyboardEventRelay");
|
|
797
|
+
u === b && p === r && d === c || (u = b, p = r, d = c, this.notifyAll());
|
|
798
|
+
}), this.context.allowMouseUpTriggerRef = o.store.context.allowMouseUpTriggerRef;
|
|
799
|
+
return;
|
|
517
800
|
}
|
|
518
|
-
|
|
801
|
+
o.type !== void 0 && (this.context.allowMouseUpTriggerRef = o.context.allowMouseUpTriggerRef), this.unsubscribeParentListener = null;
|
|
802
|
+
});
|
|
519
803
|
}
|
|
520
|
-
)
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
return /* @__PURE__ */ r(k.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ r(Y, { present: o || c.open, children: /* @__PURE__ */ r(k.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ r(
|
|
526
|
-
se,
|
|
527
|
-
{
|
|
528
|
-
id: d.contentId,
|
|
529
|
-
"aria-labelledby": d.triggerId,
|
|
530
|
-
...a,
|
|
531
|
-
ref: m,
|
|
532
|
-
align: "start",
|
|
533
|
-
side: i.dir === "rtl" ? "left" : "right",
|
|
534
|
-
disableOutsidePointerEvents: !1,
|
|
535
|
-
disableOutsideScroll: !1,
|
|
536
|
-
trapFocus: !1,
|
|
537
|
-
onOpenAutoFocus: (p) => {
|
|
538
|
-
i.isUsingKeyboardRef.current && f.current?.focus(), p.preventDefault();
|
|
539
|
-
},
|
|
540
|
-
onCloseAutoFocus: (p) => p.preventDefault(),
|
|
541
|
-
onFocusOutside: g(e.onFocusOutside, (p) => {
|
|
542
|
-
p.target !== d.trigger && c.onOpenChange(!1);
|
|
543
|
-
}),
|
|
544
|
-
onEscapeKeyDown: g(e.onEscapeKeyDown, (p) => {
|
|
545
|
-
i.onClose(), p.preventDefault();
|
|
546
|
-
}),
|
|
547
|
-
onKeyDown: g(e.onKeyDown, (p) => {
|
|
548
|
-
const u = p.currentTarget.contains(p.target), v = Bn[i.dir].includes(p.key);
|
|
549
|
-
u && v && (c.onOpenChange(!1), d.trigger?.focus(), p.preventDefault());
|
|
550
|
-
})
|
|
551
|
-
}
|
|
552
|
-
) }) }) });
|
|
804
|
+
setOpen(t, o) {
|
|
805
|
+
this.state.floatingRootContext.context.events.emit("setOpen", {
|
|
806
|
+
open: t,
|
|
807
|
+
eventDetails: o
|
|
808
|
+
});
|
|
553
809
|
}
|
|
554
|
-
)
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
return e ? "open" : "closed";
|
|
558
|
-
}
|
|
559
|
-
function X(e) {
|
|
560
|
-
return e === "indeterminate";
|
|
561
|
-
}
|
|
562
|
-
function de(e) {
|
|
563
|
-
return X(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
564
|
-
}
|
|
565
|
-
function ut(e) {
|
|
566
|
-
const t = document.activeElement;
|
|
567
|
-
for (const n of e)
|
|
568
|
-
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
569
|
-
}
|
|
570
|
-
function it(e, t) {
|
|
571
|
-
return e.map((n, o) => e[(t + o) % e.length]);
|
|
572
|
-
}
|
|
573
|
-
function dt(e, t, n) {
|
|
574
|
-
const a = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, c = n ? e.indexOf(n) : -1;
|
|
575
|
-
let i = it(e, Math.max(c, 0));
|
|
576
|
-
a.length === 1 && (i = i.filter((m) => m !== n));
|
|
577
|
-
const f = i.find(
|
|
578
|
-
(m) => m.toLowerCase().startsWith(a.toLowerCase())
|
|
579
|
-
);
|
|
580
|
-
return f !== n ? f : void 0;
|
|
581
|
-
}
|
|
582
|
-
function lt(e, t) {
|
|
583
|
-
const { x: n, y: o } = e;
|
|
584
|
-
let a = !1;
|
|
585
|
-
for (let c = 0, i = t.length - 1; c < t.length; i = c++) {
|
|
586
|
-
const d = t[c], f = t[i], m = d.x, p = d.y, u = f.x, v = f.y;
|
|
587
|
-
p > o != v > o && n < (u - m) * (o - p) / (v - p) + m && (a = !a);
|
|
810
|
+
static useStore(t, o) {
|
|
811
|
+
const u = tn(() => new qe(o)).current;
|
|
812
|
+
return t ?? u;
|
|
588
813
|
}
|
|
589
|
-
|
|
814
|
+
unsubscribeParentListener = null;
|
|
590
815
|
}
|
|
591
|
-
function
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
816
|
+
function lo() {
|
|
817
|
+
return {
|
|
818
|
+
...Sn(),
|
|
819
|
+
disabled: !1,
|
|
820
|
+
modal: !0,
|
|
821
|
+
allowMouseEnter: !1,
|
|
822
|
+
stickIfOpen: !0,
|
|
823
|
+
parent: {
|
|
824
|
+
type: void 0
|
|
825
|
+
},
|
|
826
|
+
rootId: void 0,
|
|
827
|
+
activeIndex: null,
|
|
828
|
+
hoverEnabled: !0,
|
|
829
|
+
instantType: void 0,
|
|
830
|
+
openChangeReason: null,
|
|
831
|
+
floatingTreeRoot: new lt(),
|
|
832
|
+
floatingNodeId: void 0,
|
|
833
|
+
floatingParentNodeId: null,
|
|
834
|
+
itemProps: _e,
|
|
835
|
+
keyboardEventRelay: void 0,
|
|
836
|
+
closeDelay: 0,
|
|
837
|
+
hasViewport: !1
|
|
838
|
+
};
|
|
595
839
|
}
|
|
596
|
-
|
|
597
|
-
|
|
840
|
+
const We = /* @__PURE__ */ n.createContext(void 0);
|
|
841
|
+
process.env.NODE_ENV !== "production" && (We.displayName = "MenuSubmenuRootContext");
|
|
842
|
+
function Dt() {
|
|
843
|
+
return n.useContext(We);
|
|
598
844
|
}
|
|
599
|
-
|
|
600
|
-
W,
|
|
601
|
-
[xe]
|
|
602
|
-
), h = xe(), [yt, He] = Et(W), We = (e) => {
|
|
845
|
+
const Xe = dn(function(t) {
|
|
603
846
|
const {
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
defaultOpen:
|
|
609
|
-
|
|
610
|
-
modal:
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
847
|
+
children: o,
|
|
848
|
+
open: u,
|
|
849
|
+
onOpenChange: p,
|
|
850
|
+
onOpenChangeComplete: d,
|
|
851
|
+
defaultOpen: b = !1,
|
|
852
|
+
disabled: r = !1,
|
|
853
|
+
modal: c,
|
|
854
|
+
loopFocus: y = !0,
|
|
855
|
+
orientation: m = "vertical",
|
|
856
|
+
actionsRef: x,
|
|
857
|
+
closeParentOnEsc: g = !1,
|
|
858
|
+
handle: P,
|
|
859
|
+
triggerId: O,
|
|
860
|
+
defaultTriggerId: i = null,
|
|
861
|
+
highlightItemOnHover: C = !0
|
|
862
|
+
} = t, h = Pe(!0), a = ee(!0), S = kt(!0), k = Dt(), l = n.useMemo(() => k && a ? {
|
|
863
|
+
type: "menu",
|
|
864
|
+
store: a.store
|
|
865
|
+
} : S ? {
|
|
866
|
+
type: "menubar",
|
|
867
|
+
context: S
|
|
868
|
+
} : h && !a ? {
|
|
869
|
+
type: "context-menu",
|
|
870
|
+
context: h
|
|
871
|
+
} : {
|
|
872
|
+
type: void 0
|
|
873
|
+
}, [h, a, S, k]), s = qe.useStore(P?.store, {
|
|
874
|
+
open: b,
|
|
875
|
+
openProp: u,
|
|
876
|
+
activeTriggerId: i,
|
|
877
|
+
triggerIdProp: O,
|
|
878
|
+
parent: l
|
|
616
879
|
});
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
880
|
+
Xt(() => {
|
|
881
|
+
u === void 0 && s.state.open === !1 && b === !0 && s.update({
|
|
882
|
+
open: !0,
|
|
883
|
+
activeTriggerId: i
|
|
884
|
+
});
|
|
885
|
+
}), s.useControlledProp("openProp", u), s.useControlledProp("triggerIdProp", O), s.useContextCallback("onOpenChangeComplete", d);
|
|
886
|
+
const N = s.useState("floatingTreeRoot"), T = pt(N), R = ft();
|
|
887
|
+
ve(() => {
|
|
888
|
+
h && !a ? s.update({
|
|
889
|
+
parent: {
|
|
890
|
+
type: "context-menu",
|
|
891
|
+
context: h
|
|
892
|
+
},
|
|
893
|
+
floatingNodeId: T,
|
|
894
|
+
floatingParentNodeId: R
|
|
895
|
+
}) : a && s.update({
|
|
896
|
+
floatingNodeId: T,
|
|
897
|
+
floatingParentNodeId: R
|
|
898
|
+
});
|
|
899
|
+
}, [h, a, T, R, s]);
|
|
900
|
+
const D = s.useState("open"), A = s.useState("activeTriggerElement"), L = s.useState("positionerElement"), _ = s.useState("hoverEnabled"), K = s.useState("modal"), U = s.useState("disabled"), W = s.useState("lastOpenChangeReason"), E = s.useState("parent"), H = s.useState("activeIndex"), ue = s.useState("payload"), te = s.useState("floatingParentNodeId"), Y = n.useRef(null), ne = te != null;
|
|
901
|
+
let X;
|
|
902
|
+
process.env.NODE_ENV !== "production" && E.type !== void 0 && c !== void 0 && console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored."), s.useSyncedValues({
|
|
903
|
+
disabled: r,
|
|
904
|
+
modal: E.type === void 0 ? c : void 0,
|
|
905
|
+
rootId: Wt()
|
|
906
|
+
});
|
|
907
|
+
const {
|
|
908
|
+
openMethod: le,
|
|
909
|
+
triggerProps: B
|
|
910
|
+
} = Qt(D);
|
|
911
|
+
On(s);
|
|
912
|
+
const {
|
|
913
|
+
forceUnmount: $
|
|
914
|
+
} = kn(D, s, () => {
|
|
915
|
+
s.update({
|
|
916
|
+
allowMouseEnter: !1,
|
|
917
|
+
stickIfOpen: !0
|
|
918
|
+
});
|
|
919
|
+
}), J = n.useRef(E.type !== "context-menu"), Q = he();
|
|
920
|
+
n.useEffect(() => {
|
|
921
|
+
if (D || (Y.current = null), E.type === "context-menu") {
|
|
922
|
+
if (!D) {
|
|
923
|
+
Q.clear(), J.current = !1;
|
|
924
|
+
return;
|
|
655
925
|
}
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
);
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
926
|
+
Q.start(500, () => {
|
|
927
|
+
J.current = !0;
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
}, [Q, D, E.type]), Zt(D && K && W !== ye && le !== "touch", L), ve(() => {
|
|
931
|
+
!D && !_ && s.set("hoverEnabled", !0);
|
|
932
|
+
}, [D, _, s]);
|
|
933
|
+
const oe = n.useRef(!0), V = he(), re = de((v, w) => {
|
|
934
|
+
const z = w.reason;
|
|
935
|
+
if (D === v && w.trigger === A && W === z || (w.preventUnmountOnClose = () => {
|
|
936
|
+
s.set("preventUnmountingOnClose", !0);
|
|
937
|
+
}, !v && w.trigger == null && (w.trigger = A ?? void 0), p?.(v, w), w.isCanceled))
|
|
938
|
+
return;
|
|
939
|
+
const Kt = {
|
|
940
|
+
open: v,
|
|
941
|
+
nativeEvent: w.event,
|
|
942
|
+
reason: w.reason,
|
|
943
|
+
nested: ne
|
|
944
|
+
};
|
|
945
|
+
X?.emit("openchange", Kt);
|
|
946
|
+
const Ce = w.event;
|
|
947
|
+
if (v === !1 && Ce?.type === "click" && Ce.pointerType === "touch" && !oe.current)
|
|
948
|
+
return;
|
|
949
|
+
if (!v && H !== null) {
|
|
950
|
+
const jt = s.context.itemDomElements.current[H];
|
|
951
|
+
queueMicrotask(() => {
|
|
952
|
+
jt?.setAttribute("tabindex", "-1");
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
v && z === st ? (oe.current = !1, V.start(300, () => {
|
|
956
|
+
oe.current = !0;
|
|
957
|
+
})) : (oe.current = !0, V.clear());
|
|
958
|
+
const tt = (z === En || z === Ee) && Ce.detail === 0 && Ce?.isTrusted, Yt = !v && (z === In || z == null), we = {
|
|
959
|
+
open: v,
|
|
960
|
+
openChangeReason: z
|
|
961
|
+
};
|
|
962
|
+
Y.current = w.event ?? null;
|
|
963
|
+
const nt = w.trigger?.id ?? null;
|
|
964
|
+
(nt || v) && (we.activeTriggerId = nt, we.activeTriggerElement = w.trigger ?? null), s.update(we), E.type === "menubar" && (z === st || z === ke || z === ye || z === Pn || z === be) ? s.set("instantType", "group") : tt || Yt ? s.set("instantType", tt ? "click" : "dismiss") : s.set("instantType", void 0);
|
|
965
|
+
}), j = n.useCallback((v) => {
|
|
966
|
+
const w = ae(v);
|
|
967
|
+
return w.preventUnmountOnClose = () => {
|
|
968
|
+
s.set("preventUnmountingOnClose", !0);
|
|
969
|
+
}, w;
|
|
970
|
+
}, [s]), pe = n.useCallback(() => {
|
|
971
|
+
s.setOpen(!1, j(Nn));
|
|
972
|
+
}, [s, j]);
|
|
973
|
+
n.useImperativeHandle(x, () => ({
|
|
974
|
+
unmount: $,
|
|
975
|
+
close: pe
|
|
976
|
+
}), [$, pe]);
|
|
977
|
+
let fe;
|
|
978
|
+
E.type === "context-menu" && (fe = E.context), n.useImperativeHandle(fe?.positionerRef, () => L, [L]), n.useImperativeHandle(fe?.actionsRef, () => ({
|
|
979
|
+
setOpen: re
|
|
980
|
+
}), [re]);
|
|
981
|
+
const se = Dn({
|
|
982
|
+
popupStore: s,
|
|
983
|
+
onOpenChange: re
|
|
984
|
+
});
|
|
985
|
+
X = se.context.events, n.useEffect(() => {
|
|
986
|
+
const v = ({
|
|
987
|
+
open: w,
|
|
988
|
+
eventDetails: z
|
|
989
|
+
}) => re(w, z);
|
|
990
|
+
return X.on("setOpen", v), () => {
|
|
991
|
+
X?.off("setOpen", v);
|
|
992
|
+
};
|
|
993
|
+
}, [X, re]);
|
|
994
|
+
const me = ln(se, {
|
|
995
|
+
enabled: !U,
|
|
996
|
+
bubbles: {
|
|
997
|
+
escapeKey: g && E.type === "menu"
|
|
998
|
+
},
|
|
999
|
+
outsidePress() {
|
|
1000
|
+
return E.type !== "context-menu" || Y.current?.type === "contextmenu" ? !0 : J.current;
|
|
1001
|
+
},
|
|
1002
|
+
externalTree: ne ? N : void 0
|
|
1003
|
+
}), F = Fn(se, {
|
|
1004
|
+
role: "menu"
|
|
1005
|
+
}), M = Rn(), I = n.useCallback((v) => {
|
|
1006
|
+
s.select("activeIndex") !== v && s.set("activeIndex", v);
|
|
1007
|
+
}, [s]), Z = An(se, {
|
|
1008
|
+
enabled: !U,
|
|
1009
|
+
listRef: s.context.itemDomElements,
|
|
1010
|
+
activeIndex: H,
|
|
1011
|
+
nested: E.type !== void 0,
|
|
1012
|
+
loopFocus: y,
|
|
1013
|
+
orientation: m,
|
|
1014
|
+
parentOrientation: E.type === "menubar" ? E.context.orientation : void 0,
|
|
1015
|
+
rtl: M === "rtl",
|
|
1016
|
+
disabledIndices: nn,
|
|
1017
|
+
onNavigate: I,
|
|
1018
|
+
openOnArrowKeyDown: E.type !== "context-menu",
|
|
1019
|
+
externalTree: ne ? N : void 0,
|
|
1020
|
+
focusItemOnHover: C
|
|
1021
|
+
}), At = n.useCallback((v) => {
|
|
1022
|
+
s.context.typingRef.current = v;
|
|
1023
|
+
}, [s]), Ut = Un(se, {
|
|
1024
|
+
listRef: s.context.itemLabels,
|
|
1025
|
+
elementsRef: s.context.itemDomElements,
|
|
1026
|
+
activeIndex: H,
|
|
1027
|
+
resetMs: pn,
|
|
1028
|
+
onMatch: (v) => {
|
|
1029
|
+
D && v !== H && s.set("activeIndex", v);
|
|
1030
|
+
},
|
|
1031
|
+
onTypingChange: At
|
|
1032
|
+
}), {
|
|
1033
|
+
getReferenceProps: $e,
|
|
1034
|
+
getFloatingProps: Je,
|
|
1035
|
+
getItemProps: Qe,
|
|
1036
|
+
getTriggerProps: Ze
|
|
1037
|
+
} = Ve([me, F, Z, Ut]), Bt = n.useMemo(() => {
|
|
1038
|
+
const v = Oe($e(), {
|
|
1039
|
+
onMouseMove() {
|
|
1040
|
+
s.set("allowMouseEnter", !0);
|
|
691
1041
|
}
|
|
692
|
-
);
|
|
693
|
-
|
|
694
|
-
)
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
const
|
|
699
|
-
return
|
|
700
|
-
}
|
|
701
|
-
)
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
);
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
var Gt = "DropdownMenuRadioItem", sn = s.forwardRef((e, t) => {
|
|
728
|
-
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
729
|
-
return /* @__PURE__ */ r(Rt, { ...a, ...o, ref: t });
|
|
730
|
-
});
|
|
731
|
-
sn.displayName = Gt;
|
|
732
|
-
var Ft = "DropdownMenuItemIndicator", cn = s.forwardRef((e, t) => {
|
|
733
|
-
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
734
|
-
return /* @__PURE__ */ r(bt, { ...a, ...o, ref: t });
|
|
735
|
-
});
|
|
736
|
-
cn.displayName = Ft;
|
|
737
|
-
var Kt = "DropdownMenuSeparator", un = s.forwardRef((e, t) => {
|
|
738
|
-
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
739
|
-
return /* @__PURE__ */ r(xt, { ...a, ...o, ref: t });
|
|
740
|
-
});
|
|
741
|
-
un.displayName = Kt;
|
|
742
|
-
var $t = "DropdownMenuArrow", Ut = s.forwardRef(
|
|
743
|
-
(e, t) => {
|
|
744
|
-
const { __scopeDropdownMenu: n, ...o } = e, a = h(n);
|
|
745
|
-
return /* @__PURE__ */ r(Dt, { ...a, ...o, ref: t });
|
|
746
|
-
}
|
|
747
|
-
);
|
|
748
|
-
Ut.displayName = $t;
|
|
749
|
-
var zt = (e) => {
|
|
750
|
-
const { __scopeDropdownMenu: t, children: n, open: o, onOpenChange: a, defaultOpen: c } = e, i = h(t), [d, f] = we({
|
|
751
|
-
prop: o,
|
|
752
|
-
defaultProp: c ?? !1,
|
|
753
|
-
onChange: a,
|
|
754
|
-
caller: "DropdownMenuSub"
|
|
1042
|
+
}, B);
|
|
1043
|
+
return delete v.role, v;
|
|
1044
|
+
}, [$e, s, B]), Gt = n.useMemo(() => {
|
|
1045
|
+
const v = Ze();
|
|
1046
|
+
if (!v)
|
|
1047
|
+
return v;
|
|
1048
|
+
const w = Oe(v, B);
|
|
1049
|
+
return delete w.role, delete w["aria-controls"], w;
|
|
1050
|
+
}, [Ze, B]), Lt = n.useMemo(() => Je({
|
|
1051
|
+
onMouseMove() {
|
|
1052
|
+
s.set("allowMouseEnter", !0), E.type === "menu" && s.set("hoverEnabled", !1);
|
|
1053
|
+
},
|
|
1054
|
+
onClick() {
|
|
1055
|
+
s.select("hoverEnabled") && s.set("hoverEnabled", !1);
|
|
1056
|
+
},
|
|
1057
|
+
onKeyDown(v) {
|
|
1058
|
+
const w = s.select("keyboardEventRelay");
|
|
1059
|
+
w && !v.isPropagationStopped() && w(v);
|
|
1060
|
+
}
|
|
1061
|
+
}), [Je, E.type, s]), Ht = n.useMemo(() => Qe(), [Qe]);
|
|
1062
|
+
s.useSyncedValues({
|
|
1063
|
+
floatingRootContext: se,
|
|
1064
|
+
activeTriggerProps: Bt,
|
|
1065
|
+
inactiveTriggerProps: Gt,
|
|
1066
|
+
popupProps: Lt,
|
|
1067
|
+
itemProps: Ht
|
|
1068
|
+
});
|
|
1069
|
+
const zt = n.useMemo(() => ({
|
|
1070
|
+
store: s,
|
|
1071
|
+
parent: l
|
|
1072
|
+
}), [s, l]), et = /* @__PURE__ */ f(Ue.Provider, {
|
|
1073
|
+
value: zt,
|
|
1074
|
+
children: typeof o == "function" ? o({
|
|
1075
|
+
payload: ue
|
|
1076
|
+
}) : o
|
|
755
1077
|
});
|
|
756
|
-
return
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
1078
|
+
return E.type === void 0 || E.type === "context-menu" ? /* @__PURE__ */ f(fn, {
|
|
1079
|
+
externalTree: N,
|
|
1080
|
+
children: et
|
|
1081
|
+
}) : et;
|
|
760
1082
|
});
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
1083
|
+
process.env.NODE_ENV !== "production" && (Xe.displayName = "MenuRoot");
|
|
1084
|
+
function po(e) {
|
|
1085
|
+
const t = ee().store, o = n.useMemo(() => ({
|
|
1086
|
+
parentMenu: t
|
|
1087
|
+
}), [t]);
|
|
1088
|
+
return /* @__PURE__ */ f(We.Provider, {
|
|
1089
|
+
value: o,
|
|
1090
|
+
children: /* @__PURE__ */ f(Xe, {
|
|
1091
|
+
...e
|
|
1092
|
+
})
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
function _t(e) {
|
|
1096
|
+
if (Qn(e) && e.hasAttribute("data-rootownerid"))
|
|
1097
|
+
return e.getAttribute("data-rootownerid") ?? void 0;
|
|
1098
|
+
if (!Zn(e))
|
|
1099
|
+
return _t(eo(e));
|
|
1100
|
+
}
|
|
1101
|
+
function fo(e) {
|
|
1102
|
+
const {
|
|
1103
|
+
enabled: t = !0,
|
|
1104
|
+
mouseDownAction: o,
|
|
1105
|
+
open: u
|
|
1106
|
+
} = e, p = n.useRef(!1);
|
|
1107
|
+
return n.useMemo(() => t ? {
|
|
1108
|
+
onMouseDown: (d) => {
|
|
1109
|
+
(o === "open" && !u || o === "close" && u) && (p.current = !0, De(d.currentTarget).addEventListener("click", () => {
|
|
1110
|
+
p.current = !1;
|
|
1111
|
+
}, {
|
|
1112
|
+
once: !0
|
|
1113
|
+
}));
|
|
1114
|
+
},
|
|
1115
|
+
onClick: (d) => {
|
|
1116
|
+
p.current && (p.current = !1, d.preventBaseUIHandler());
|
|
1117
|
+
}
|
|
1118
|
+
} : _e, [t, o, u]);
|
|
1119
|
+
}
|
|
1120
|
+
const Re = 2, Vt = mn(function(t, o) {
|
|
1121
|
+
const {
|
|
1122
|
+
render: u,
|
|
1123
|
+
className: p,
|
|
1124
|
+
disabled: d = !1,
|
|
1125
|
+
nativeButton: b = !0,
|
|
1126
|
+
id: r,
|
|
1127
|
+
openOnHover: c,
|
|
1128
|
+
delay: y = 100,
|
|
1129
|
+
closeDelay: m = 0,
|
|
1130
|
+
handle: x,
|
|
1131
|
+
payload: g,
|
|
1132
|
+
...P
|
|
1133
|
+
} = t, O = ee(!0), i = x?.store ?? O?.store;
|
|
1134
|
+
if (!i)
|
|
1135
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle." : ie(85));
|
|
1136
|
+
const C = ge(r), h = i.useState("isTriggerActive", C), a = i.useState("floatingRootContext"), S = i.useState("isOpenedByTrigger", C), k = n.useRef(null), l = go(), s = Ln(!0), N = gn(), T = n.useMemo(() => N ?? new lt(), [N]), R = pt(T), D = ft(), {
|
|
1137
|
+
registerTrigger: A,
|
|
1138
|
+
isMountedByThisTrigger: L
|
|
1139
|
+
} = _n(C, k, i, {
|
|
1140
|
+
payload: g,
|
|
1141
|
+
closeDelay: m,
|
|
1142
|
+
parent: l,
|
|
1143
|
+
floatingTreeRoot: T,
|
|
1144
|
+
floatingNodeId: R,
|
|
1145
|
+
floatingParentNodeId: D,
|
|
1146
|
+
keyboardEventRelay: s?.relayKeyboardEvent
|
|
1147
|
+
}), _ = l.type === "menubar", K = i.useState("disabled"), U = d || K || _ && l.context.disabled, {
|
|
1148
|
+
getButtonProps: W,
|
|
1149
|
+
buttonRef: E
|
|
1150
|
+
} = gt({
|
|
1151
|
+
disabled: U,
|
|
1152
|
+
native: b
|
|
1153
|
+
});
|
|
1154
|
+
n.useEffect(() => {
|
|
1155
|
+
!S && l.type === void 0 && (i.context.allowMouseUpTriggerRef.current = !1);
|
|
1156
|
+
}, [i, S, l.type]);
|
|
1157
|
+
const H = n.useRef(null), ue = he(), te = de((F) => {
|
|
1158
|
+
if (!H.current)
|
|
1159
|
+
return;
|
|
1160
|
+
ue.clear(), i.context.allowMouseUpTriggerRef.current = !1;
|
|
1161
|
+
const M = F.target;
|
|
1162
|
+
if (Se(H.current, M) || Se(i.select("positionerElement"), M) || M === H.current || M != null && _t(M) === i.select("rootId"))
|
|
1163
|
+
return;
|
|
1164
|
+
const I = Bn(H.current);
|
|
1165
|
+
F.clientX >= I.left - Re && F.clientX <= I.right + Re && F.clientY >= I.top - Re && F.clientY <= I.bottom + Re || T.events.emit("close", {
|
|
1166
|
+
domEvent: F,
|
|
1167
|
+
reason: Tn
|
|
1168
|
+
});
|
|
1169
|
+
});
|
|
1170
|
+
n.useEffect(() => {
|
|
1171
|
+
S && i.select("lastOpenChangeReason") === ye && De(H.current).addEventListener("mouseup", te, {
|
|
1172
|
+
once: !0
|
|
1173
|
+
});
|
|
1174
|
+
}, [S, te, i]);
|
|
1175
|
+
const Y = _ && l.context.hasSubmenuOpen, X = xt(a, {
|
|
1176
|
+
enabled: (c ?? Y) && !U && l.type !== "context-menu" && (!_ || Y && !L),
|
|
1177
|
+
handleClose: Mt({
|
|
1178
|
+
blockPointerEvents: !_
|
|
1179
|
+
}),
|
|
1180
|
+
mouseOnly: !0,
|
|
1181
|
+
move: !1,
|
|
1182
|
+
restMs: l.type === void 0 ? y : void 0,
|
|
1183
|
+
delay: {
|
|
1184
|
+
close: m
|
|
1185
|
+
},
|
|
1186
|
+
triggerElementRef: k,
|
|
1187
|
+
externalTree: T,
|
|
1188
|
+
isActiveTrigger: h
|
|
1189
|
+
}), le = mo(S, i.select("lastOpenChangeReason")), B = ct(a, {
|
|
1190
|
+
enabled: !U && l.type !== "context-menu",
|
|
1191
|
+
event: S && _ ? "click" : "mousedown",
|
|
1192
|
+
toggle: !0,
|
|
1193
|
+
ignoreMouse: !1,
|
|
1194
|
+
stickIfOpen: l.type === void 0 ? le : !1
|
|
1195
|
+
}), $ = to(a, {
|
|
1196
|
+
enabled: !U && Y
|
|
1197
|
+
}), J = fo({
|
|
1198
|
+
open: S,
|
|
1199
|
+
enabled: _,
|
|
1200
|
+
mouseDownAction: "open"
|
|
1201
|
+
}), Q = Ve([B, $]), oe = {
|
|
1202
|
+
disabled: U,
|
|
1203
|
+
open: S
|
|
1204
|
+
}, V = i.useState("triggerProps", L), re = [H, o, E, A, k], j = [Q.getReferenceProps(), X ?? _e, V, {
|
|
1205
|
+
"aria-haspopup": "menu",
|
|
1206
|
+
id: C,
|
|
1207
|
+
onMouseDown: (F) => {
|
|
1208
|
+
if (i.select("open"))
|
|
1209
|
+
return;
|
|
1210
|
+
ue.start(200, () => {
|
|
1211
|
+
i.context.allowMouseUpTriggerRef.current = !0;
|
|
1212
|
+
}), De(F.currentTarget).addEventListener("mouseup", te, {
|
|
1213
|
+
once: !0
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
}, _ ? {
|
|
1217
|
+
role: "menuitem"
|
|
1218
|
+
} : {}, J, P, W], pe = n.useRef(null), fe = de((F) => {
|
|
1219
|
+
at.flushSync(() => {
|
|
1220
|
+
i.setOpen(!1, ae(ke, F.nativeEvent, F.currentTarget));
|
|
1221
|
+
}), bn(pe.current)?.focus();
|
|
1222
|
+
}), se = de((F) => {
|
|
1223
|
+
const M = i.select("positionerElement");
|
|
1224
|
+
if (M && hn(F, M))
|
|
1225
|
+
i.context.beforeContentFocusGuardRef.current?.focus();
|
|
1226
|
+
else {
|
|
1227
|
+
at.flushSync(() => {
|
|
1228
|
+
i.setOpen(!1, ae(ke, F.nativeEvent, F.currentTarget));
|
|
1229
|
+
});
|
|
1230
|
+
let I = vn(i.context.triggerFocusTargetRef.current || k.current);
|
|
1231
|
+
for (; I !== null && Se(M, I); ) {
|
|
1232
|
+
const Z = I;
|
|
1233
|
+
if (I = xn(I), I === Z)
|
|
1234
|
+
break;
|
|
777
1235
|
}
|
|
1236
|
+
I?.focus();
|
|
778
1237
|
}
|
|
779
|
-
)
|
|
1238
|
+
}), me = q("button", t, {
|
|
1239
|
+
enabled: !_,
|
|
1240
|
+
stateAttributesMapping: ot,
|
|
1241
|
+
state: oe,
|
|
1242
|
+
ref: re,
|
|
1243
|
+
props: j
|
|
1244
|
+
});
|
|
1245
|
+
return _ ? /* @__PURE__ */ f(Jn, {
|
|
1246
|
+
tag: "button",
|
|
1247
|
+
render: u,
|
|
1248
|
+
className: p,
|
|
1249
|
+
state: oe,
|
|
1250
|
+
refs: re,
|
|
1251
|
+
props: j,
|
|
1252
|
+
stateAttributesMapping: ot
|
|
1253
|
+
}) : S ? /* @__PURE__ */ xe(n.Fragment, {
|
|
1254
|
+
children: [/* @__PURE__ */ f(rt, {
|
|
1255
|
+
ref: pe,
|
|
1256
|
+
onFocus: fe
|
|
1257
|
+
}, `${C}-pre-focus-guard`), /* @__PURE__ */ f(n.Fragment, {
|
|
1258
|
+
children: me
|
|
1259
|
+
}, C), /* @__PURE__ */ f(rt, {
|
|
1260
|
+
ref: i.context.triggerFocusTargetRef,
|
|
1261
|
+
onFocus: se
|
|
1262
|
+
}, `${C}-post-focus-guard`)]
|
|
1263
|
+
}) : /* @__PURE__ */ f(n.Fragment, {
|
|
1264
|
+
children: me
|
|
1265
|
+
}, C);
|
|
780
1266
|
});
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
1267
|
+
process.env.NODE_ENV !== "production" && (Vt.displayName = "MenuTrigger");
|
|
1268
|
+
function mo(e, t) {
|
|
1269
|
+
const o = he(), [u, p] = n.useState(!1);
|
|
1270
|
+
return ve(() => {
|
|
1271
|
+
e && t === "trigger-hover" ? (p(!0), o.start(Mn, () => {
|
|
1272
|
+
p(!1);
|
|
1273
|
+
})) : e || (o.clear(), p(!1));
|
|
1274
|
+
}, [e, t, o]), u;
|
|
787
1275
|
}
|
|
788
|
-
function
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
1276
|
+
function go() {
|
|
1277
|
+
const e = Pe(!0), t = ee(!0), o = kt();
|
|
1278
|
+
return n.useMemo(() => o ? {
|
|
1279
|
+
type: "menubar",
|
|
1280
|
+
context: o
|
|
1281
|
+
} : e && !t ? {
|
|
1282
|
+
type: "context-menu",
|
|
1283
|
+
context: e
|
|
1284
|
+
} : {
|
|
1285
|
+
type: void 0
|
|
1286
|
+
}, [e, t, o]);
|
|
1287
|
+
}
|
|
1288
|
+
const Ft = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1289
|
+
const {
|
|
1290
|
+
render: u,
|
|
1291
|
+
className: p,
|
|
1292
|
+
label: d,
|
|
1293
|
+
id: b,
|
|
1294
|
+
nativeButton: r = !1,
|
|
1295
|
+
openOnHover: c = !0,
|
|
1296
|
+
delay: y = 100,
|
|
1297
|
+
closeDelay: m = 0,
|
|
1298
|
+
disabled: x = !1,
|
|
1299
|
+
...g
|
|
1300
|
+
} = t, P = Ie(), O = Me(), {
|
|
1301
|
+
store: i
|
|
1302
|
+
} = ee(), C = ge(b), h = i.useState("open"), a = i.useState("floatingRootContext"), S = i.useState("floatingTreeRoot"), k = Vn(C, i), l = n.useCallback((B) => {
|
|
1303
|
+
const $ = k(B);
|
|
1304
|
+
return B !== null && i.select("open") && i.select("activeTriggerId") == null && i.update({
|
|
1305
|
+
activeTriggerId: C,
|
|
1306
|
+
activeTriggerElement: B,
|
|
1307
|
+
closeDelay: m
|
|
1308
|
+
}), $;
|
|
1309
|
+
}, [k, m, i, C]), s = n.useRef(null), N = n.useCallback((B) => {
|
|
1310
|
+
s.current = B, i.set("activeTriggerElement", B);
|
|
1311
|
+
}, [i]), T = Dt();
|
|
1312
|
+
if (!T?.parentMenu)
|
|
1313
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>." : ie(37));
|
|
1314
|
+
i.useSyncedValue("closeDelay", m);
|
|
1315
|
+
const R = T.parentMenu, D = R.useState("itemProps"), A = R.useState("isActive", P.index), L = n.useMemo(() => ({
|
|
1316
|
+
type: "submenu-trigger",
|
|
1317
|
+
setActive() {
|
|
1318
|
+
R.set("activeIndex", P.index);
|
|
1319
|
+
}
|
|
1320
|
+
}), [R, P.index]), _ = i.useState("disabled"), K = x || _, {
|
|
1321
|
+
getItemProps: U,
|
|
1322
|
+
itemRef: W
|
|
1323
|
+
} = Ne({
|
|
1324
|
+
closeOnClick: !1,
|
|
1325
|
+
disabled: K,
|
|
1326
|
+
highlighted: A,
|
|
1327
|
+
id: C,
|
|
1328
|
+
store: i,
|
|
1329
|
+
typingRef: R.context.typingRef,
|
|
1330
|
+
nativeButton: r,
|
|
1331
|
+
itemMetadata: L,
|
|
1332
|
+
nodeId: O?.nodeId
|
|
1333
|
+
}), E = i.useState("hoverEnabled"), H = R.useState("allowMouseEnter"), ue = xt(a, {
|
|
1334
|
+
enabled: E && c && !K,
|
|
1335
|
+
handleClose: Mt({
|
|
1336
|
+
blockPointerEvents: !0
|
|
1337
|
+
}),
|
|
1338
|
+
mouseOnly: !0,
|
|
1339
|
+
move: !0,
|
|
1340
|
+
restMs: y,
|
|
1341
|
+
delay: H ? {
|
|
1342
|
+
open: y,
|
|
1343
|
+
close: m
|
|
1344
|
+
} : 0,
|
|
1345
|
+
triggerElementRef: s,
|
|
1346
|
+
externalTree: S
|
|
1347
|
+
}), te = ct(a, {
|
|
1348
|
+
enabled: !K,
|
|
1349
|
+
event: "mousedown",
|
|
1350
|
+
toggle: !c,
|
|
1351
|
+
ignoreMouse: c,
|
|
1352
|
+
stickIfOpen: !1
|
|
1353
|
+
}), Y = Ve([te]), ne = i.useState("triggerProps", !0);
|
|
1354
|
+
return delete ne.id, q("div", t, {
|
|
1355
|
+
state: {
|
|
1356
|
+
disabled: K,
|
|
1357
|
+
highlighted: A,
|
|
1358
|
+
open: h
|
|
1359
|
+
},
|
|
1360
|
+
stateAttributesMapping: Cn,
|
|
1361
|
+
props: [Y.getReferenceProps(), ue, ne, D, {
|
|
1362
|
+
tabIndex: h || A ? 0 : -1,
|
|
1363
|
+
onBlur() {
|
|
1364
|
+
A && R.set("activeIndex", null);
|
|
1365
|
+
}
|
|
1366
|
+
}, g, U],
|
|
1367
|
+
ref: [o, P.ref, W, l, N]
|
|
1368
|
+
});
|
|
1369
|
+
});
|
|
1370
|
+
process.env.NODE_ENV !== "production" && (Ft.displayName = "MenuSubmenuTrigger");
|
|
1371
|
+
function $o({ ...e }) {
|
|
1372
|
+
return /* @__PURE__ */ f(Xe, { "data-slot": "dropdown-menu", ...e });
|
|
1373
|
+
}
|
|
1374
|
+
function Jo({ ...e }) {
|
|
1375
|
+
return /* @__PURE__ */ f(Ke, { "data-slot": "dropdown-menu-portal", ...e });
|
|
1376
|
+
}
|
|
1377
|
+
function Qo({ ...e }) {
|
|
1378
|
+
return /* @__PURE__ */ f(Vt, { "data-slot": "dropdown-menu-trigger", ...e });
|
|
792
1379
|
}
|
|
793
|
-
function
|
|
794
|
-
|
|
1380
|
+
function bo({
|
|
1381
|
+
align: e = "start",
|
|
1382
|
+
alignOffset: t = 0,
|
|
1383
|
+
side: o = "bottom",
|
|
1384
|
+
sideOffset: u = 4,
|
|
1385
|
+
className: p,
|
|
1386
|
+
...d
|
|
795
1387
|
}) {
|
|
796
|
-
return /* @__PURE__ */
|
|
797
|
-
|
|
1388
|
+
return /* @__PURE__ */ f(Ke, { children: /* @__PURE__ */ f(
|
|
1389
|
+
Nt,
|
|
798
1390
|
{
|
|
799
|
-
|
|
800
|
-
|
|
1391
|
+
align: e,
|
|
1392
|
+
alignOffset: t,
|
|
1393
|
+
className: "isolate z-50 outline-none",
|
|
1394
|
+
side: o,
|
|
1395
|
+
sideOffset: u,
|
|
1396
|
+
children: /* @__PURE__ */ f(
|
|
1397
|
+
Pt,
|
|
1398
|
+
{
|
|
1399
|
+
className: ce(
|
|
1400
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-y-auto overflow-x-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-md outline-none ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in data-closed:overflow-hidden",
|
|
1401
|
+
p
|
|
1402
|
+
),
|
|
1403
|
+
"data-slot": "dropdown-menu-content",
|
|
1404
|
+
...d
|
|
1405
|
+
}
|
|
1406
|
+
)
|
|
801
1407
|
}
|
|
802
|
-
);
|
|
1408
|
+
) });
|
|
1409
|
+
}
|
|
1410
|
+
function Zo({ ...e }) {
|
|
1411
|
+
return /* @__PURE__ */ f(He, { "data-slot": "dropdown-menu-group", ...e });
|
|
803
1412
|
}
|
|
804
|
-
function
|
|
1413
|
+
function er({
|
|
805
1414
|
className: e,
|
|
806
|
-
|
|
807
|
-
...
|
|
1415
|
+
inset: t,
|
|
1416
|
+
...o
|
|
808
1417
|
}) {
|
|
809
|
-
return /* @__PURE__ */
|
|
810
|
-
|
|
1418
|
+
return /* @__PURE__ */ f(He, { children: /* @__PURE__ */ f(
|
|
1419
|
+
Et,
|
|
811
1420
|
{
|
|
812
|
-
className:
|
|
813
|
-
"
|
|
1421
|
+
className: ce(
|
|
1422
|
+
"px-2 py-1.5 font-medium text-muted-foreground text-xs data-inset:pl-8",
|
|
814
1423
|
e
|
|
815
1424
|
),
|
|
816
|
-
"data-
|
|
817
|
-
|
|
818
|
-
...
|
|
1425
|
+
"data-inset": t,
|
|
1426
|
+
"data-slot": "dropdown-menu-label",
|
|
1427
|
+
...o
|
|
819
1428
|
}
|
|
820
1429
|
) });
|
|
821
1430
|
}
|
|
822
|
-
function
|
|
823
|
-
...e
|
|
824
|
-
}) {
|
|
825
|
-
return /* @__PURE__ */ r(Ht, { "data-slot": "dropdown-menu-group", ...e });
|
|
826
|
-
}
|
|
827
|
-
function Io({
|
|
1431
|
+
function tr({
|
|
828
1432
|
className: e,
|
|
829
1433
|
inset: t,
|
|
830
|
-
variant:
|
|
831
|
-
...
|
|
1434
|
+
variant: o = "default",
|
|
1435
|
+
...u
|
|
832
1436
|
}) {
|
|
833
|
-
return /* @__PURE__ */
|
|
834
|
-
|
|
1437
|
+
return /* @__PURE__ */ f(
|
|
1438
|
+
It,
|
|
835
1439
|
{
|
|
836
|
-
className:
|
|
837
|
-
"
|
|
1440
|
+
className: ce(
|
|
1441
|
+
"group/dropdown-menu-item relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-8 data-[variant=destructive]:text-destructive data-disabled:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
838
1442
|
e
|
|
839
1443
|
),
|
|
840
1444
|
"data-inset": t,
|
|
841
1445
|
"data-slot": "dropdown-menu-item",
|
|
842
|
-
"data-variant":
|
|
843
|
-
...
|
|
1446
|
+
"data-variant": o,
|
|
1447
|
+
...u
|
|
844
1448
|
}
|
|
845
1449
|
);
|
|
846
1450
|
}
|
|
847
|
-
function
|
|
1451
|
+
function nr({ ...e }) {
|
|
1452
|
+
return /* @__PURE__ */ f(po, { "data-slot": "dropdown-menu-sub", ...e });
|
|
1453
|
+
}
|
|
1454
|
+
function or({
|
|
848
1455
|
className: e,
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
...
|
|
1456
|
+
inset: t,
|
|
1457
|
+
children: o,
|
|
1458
|
+
...u
|
|
852
1459
|
}) {
|
|
853
|
-
return /* @__PURE__ */
|
|
854
|
-
|
|
1460
|
+
return /* @__PURE__ */ xe(
|
|
1461
|
+
Ft,
|
|
855
1462
|
{
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
1463
|
+
className: ce(
|
|
1464
|
+
"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-open:bg-accent data-popup-open:bg-accent data-inset:pl-8 data-open:text-accent-foreground data-popup-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
859
1465
|
e
|
|
860
1466
|
),
|
|
861
|
-
"data-
|
|
862
|
-
|
|
1467
|
+
"data-inset": t,
|
|
1468
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1469
|
+
...u,
|
|
863
1470
|
children: [
|
|
864
|
-
|
|
865
|
-
|
|
1471
|
+
o,
|
|
1472
|
+
/* @__PURE__ */ f(qt, { className: "ml-auto" })
|
|
866
1473
|
]
|
|
867
1474
|
}
|
|
868
1475
|
);
|
|
869
1476
|
}
|
|
870
|
-
function
|
|
871
|
-
|
|
1477
|
+
function rr({
|
|
1478
|
+
align: e = "start",
|
|
1479
|
+
alignOffset: t = -3,
|
|
1480
|
+
side: o = "right",
|
|
1481
|
+
sideOffset: u = 0,
|
|
1482
|
+
className: p,
|
|
1483
|
+
...d
|
|
872
1484
|
}) {
|
|
873
|
-
return /* @__PURE__ */
|
|
874
|
-
|
|
1485
|
+
return /* @__PURE__ */ f(
|
|
1486
|
+
bo,
|
|
875
1487
|
{
|
|
876
|
-
|
|
877
|
-
|
|
1488
|
+
align: e,
|
|
1489
|
+
alignOffset: t,
|
|
1490
|
+
className: ce(
|
|
1491
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in",
|
|
1492
|
+
p
|
|
1493
|
+
),
|
|
1494
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1495
|
+
side: o,
|
|
1496
|
+
sideOffset: u,
|
|
1497
|
+
...d
|
|
878
1498
|
}
|
|
879
1499
|
);
|
|
880
1500
|
}
|
|
881
|
-
function
|
|
1501
|
+
function sr({
|
|
882
1502
|
className: e,
|
|
883
1503
|
children: t,
|
|
884
|
-
|
|
1504
|
+
checked: o,
|
|
1505
|
+
inset: u,
|
|
1506
|
+
...p
|
|
885
1507
|
}) {
|
|
886
|
-
return /* @__PURE__ */
|
|
887
|
-
|
|
1508
|
+
return /* @__PURE__ */ xe(
|
|
1509
|
+
Rt,
|
|
888
1510
|
{
|
|
889
|
-
|
|
890
|
-
|
|
1511
|
+
checked: o,
|
|
1512
|
+
className: ce(
|
|
1513
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-8 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
891
1514
|
e
|
|
892
1515
|
),
|
|
893
|
-
"data-
|
|
894
|
-
|
|
1516
|
+
"data-inset": u,
|
|
1517
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
1518
|
+
...p,
|
|
895
1519
|
children: [
|
|
896
|
-
/* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ f(
|
|
1521
|
+
"span",
|
|
1522
|
+
{
|
|
1523
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1524
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
1525
|
+
children: /* @__PURE__ */ f(yt, { children: /* @__PURE__ */ f(ut, {}) })
|
|
1526
|
+
}
|
|
1527
|
+
),
|
|
897
1528
|
t
|
|
898
1529
|
]
|
|
899
1530
|
}
|
|
900
1531
|
);
|
|
901
1532
|
}
|
|
902
|
-
function
|
|
1533
|
+
function ar({ ...e }) {
|
|
1534
|
+
return /* @__PURE__ */ f(
|
|
1535
|
+
Tt,
|
|
1536
|
+
{
|
|
1537
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
1538
|
+
...e
|
|
1539
|
+
}
|
|
1540
|
+
);
|
|
1541
|
+
}
|
|
1542
|
+
function ir({
|
|
903
1543
|
className: e,
|
|
904
|
-
|
|
905
|
-
|
|
1544
|
+
children: t,
|
|
1545
|
+
inset: o,
|
|
1546
|
+
...u
|
|
906
1547
|
}) {
|
|
907
|
-
return /* @__PURE__ */
|
|
908
|
-
|
|
1548
|
+
return /* @__PURE__ */ xe(
|
|
1549
|
+
wt,
|
|
909
1550
|
{
|
|
910
|
-
className:
|
|
911
|
-
"
|
|
1551
|
+
className: ce(
|
|
1552
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-8 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
912
1553
|
e
|
|
913
1554
|
),
|
|
914
|
-
"data-inset":
|
|
915
|
-
"data-slot": "dropdown-menu-
|
|
916
|
-
...
|
|
1555
|
+
"data-inset": o,
|
|
1556
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
1557
|
+
...u,
|
|
1558
|
+
children: [
|
|
1559
|
+
/* @__PURE__ */ f(
|
|
1560
|
+
"span",
|
|
1561
|
+
{
|
|
1562
|
+
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
1563
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
1564
|
+
children: /* @__PURE__ */ f(St, { children: /* @__PURE__ */ f(ut, {}) })
|
|
1565
|
+
}
|
|
1566
|
+
),
|
|
1567
|
+
t
|
|
1568
|
+
]
|
|
917
1569
|
}
|
|
918
1570
|
);
|
|
919
1571
|
}
|
|
920
|
-
function
|
|
1572
|
+
function ur({
|
|
921
1573
|
className: e,
|
|
922
1574
|
...t
|
|
923
1575
|
}) {
|
|
924
|
-
return /* @__PURE__ */
|
|
925
|
-
|
|
1576
|
+
return /* @__PURE__ */ f(
|
|
1577
|
+
$n,
|
|
926
1578
|
{
|
|
927
|
-
className:
|
|
1579
|
+
className: ce("-mx-1 my-1 h-px bg-border", e),
|
|
928
1580
|
"data-slot": "dropdown-menu-separator",
|
|
929
1581
|
...t
|
|
930
1582
|
}
|
|
931
1583
|
);
|
|
932
1584
|
}
|
|
933
|
-
function
|
|
1585
|
+
function cr({
|
|
934
1586
|
className: e,
|
|
935
1587
|
...t
|
|
936
1588
|
}) {
|
|
937
|
-
return /* @__PURE__ */
|
|
1589
|
+
return /* @__PURE__ */ f(
|
|
938
1590
|
"span",
|
|
939
1591
|
{
|
|
940
|
-
className:
|
|
941
|
-
"ml-auto text-muted-foreground text-xs tracking-widest",
|
|
1592
|
+
className: ce(
|
|
1593
|
+
"ml-auto text-muted-foreground text-xs tracking-widest group-focus/dropdown-menu-item:text-accent-foreground",
|
|
942
1594
|
e
|
|
943
1595
|
),
|
|
944
1596
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -946,64 +1598,20 @@ function Ao({
|
|
|
946
1598
|
}
|
|
947
1599
|
);
|
|
948
1600
|
}
|
|
949
|
-
function Oo({
|
|
950
|
-
...e
|
|
951
|
-
}) {
|
|
952
|
-
return /* @__PURE__ */ r(no, { "data-slot": "dropdown-menu-sub", ...e });
|
|
953
|
-
}
|
|
954
|
-
function ko({
|
|
955
|
-
className: e,
|
|
956
|
-
inset: t,
|
|
957
|
-
children: n,
|
|
958
|
-
...o
|
|
959
|
-
}) {
|
|
960
|
-
return /* @__PURE__ */ ne(
|
|
961
|
-
to,
|
|
962
|
-
{
|
|
963
|
-
className: R(
|
|
964
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[inset]:pl-8 data-[state=open]:text-accent-foreground",
|
|
965
|
-
e
|
|
966
|
-
),
|
|
967
|
-
"data-inset": t,
|
|
968
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
969
|
-
...o,
|
|
970
|
-
children: [
|
|
971
|
-
n,
|
|
972
|
-
/* @__PURE__ */ r(xn, { className: "ml-auto size-4" })
|
|
973
|
-
]
|
|
974
|
-
}
|
|
975
|
-
);
|
|
976
|
-
}
|
|
977
|
-
function Lo({
|
|
978
|
-
className: e,
|
|
979
|
-
...t
|
|
980
|
-
}) {
|
|
981
|
-
return /* @__PURE__ */ r(
|
|
982
|
-
oo,
|
|
983
|
-
{
|
|
984
|
-
className: R(
|
|
985
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
986
|
-
e
|
|
987
|
-
),
|
|
988
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
989
|
-
...t
|
|
990
|
-
}
|
|
991
|
-
);
|
|
992
|
-
}
|
|
993
1601
|
export {
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1602
|
+
$o as DropdownMenu,
|
|
1603
|
+
sr as DropdownMenuCheckboxItem,
|
|
1604
|
+
bo as DropdownMenuContent,
|
|
1605
|
+
Zo as DropdownMenuGroup,
|
|
1606
|
+
tr as DropdownMenuItem,
|
|
1607
|
+
er as DropdownMenuLabel,
|
|
1608
|
+
Jo as DropdownMenuPortal,
|
|
1609
|
+
ar as DropdownMenuRadioGroup,
|
|
1610
|
+
ir as DropdownMenuRadioItem,
|
|
1611
|
+
ur as DropdownMenuSeparator,
|
|
1612
|
+
cr as DropdownMenuShortcut,
|
|
1613
|
+
nr as DropdownMenuSub,
|
|
1614
|
+
rr as DropdownMenuSubContent,
|
|
1615
|
+
or as DropdownMenuSubTrigger,
|
|
1616
|
+
Qo as DropdownMenuTrigger
|
|
1009
1617
|
};
|