@arcadeai/design-system 3.39.1 → 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/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 -646
- 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/index.d.ts +1 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +566 -547
- 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 -646
- 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 -672
- 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/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,977 +1,1613 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as R, jsxs as ze } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon as ln, ChevronDownIcon as Ct, ChevronUpIcon as an } from "lucide-react";
|
|
4
|
+
import { cn as Pe } from "../../../lib/utils.js";
|
|
4
5
|
import * as n from "react";
|
|
5
|
-
import
|
|
6
|
-
import { c as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
10
|
-
import {
|
|
11
|
-
import { u as pt } from "../../../
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { u as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { u as
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as
|
|
21
|
-
import {
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
});
|
|
84
|
-
}, []),
|
|
85
|
-
children: e
|
|
86
|
-
}
|
|
87
|
-
) }),
|
|
88
|
-
V ? /* @__PURE__ */ Q(
|
|
89
|
-
nt,
|
|
90
|
-
{
|
|
91
|
-
"aria-hidden": !0,
|
|
92
|
-
required: b,
|
|
93
|
-
tabIndex: -1,
|
|
94
|
-
name: g,
|
|
95
|
-
autoComplete: x,
|
|
96
|
-
value: z,
|
|
97
|
-
onChange: (_) => X(_.target.value),
|
|
98
|
-
disabled: N,
|
|
99
|
-
form: y,
|
|
100
|
-
children: [
|
|
101
|
-
z === void 0 ? /* @__PURE__ */ s("option", { value: "" }) : null,
|
|
102
|
-
Array.from(K)
|
|
103
|
-
]
|
|
104
|
-
},
|
|
105
|
-
U
|
|
106
|
-
) : null
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
) });
|
|
110
|
-
};
|
|
111
|
-
Ae.displayName = ee;
|
|
112
|
-
var Oe = "SelectTrigger", De = n.forwardRef(
|
|
113
|
-
(t, o) => {
|
|
114
|
-
const { __scopeSelect: e, disabled: c = !1, ...l } = t, u = pe(e), r = Y(Oe, e), a = r.disabled || c, i = k(o, r.onTriggerChange), f = ue(e), g = n.useRef("touch"), [x, N, b] = st((d) => {
|
|
115
|
-
const h = f().filter((v) => !v.disabled), S = h.find((v) => v.value === r.value), m = at(h, d, S);
|
|
116
|
-
m !== void 0 && r.onValueChange(m.value);
|
|
117
|
-
}), y = (d) => {
|
|
118
|
-
a || (r.onOpenChange(!0), b()), d && (r.triggerPointerDownPosRef.current = {
|
|
119
|
-
x: Math.round(d.pageX),
|
|
120
|
-
y: Math.round(d.pageY)
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
return /* @__PURE__ */ s(xt, { asChild: !0, ...u, children: /* @__PURE__ */ s(
|
|
124
|
-
M.button,
|
|
125
|
-
{
|
|
126
|
-
type: "button",
|
|
127
|
-
role: "combobox",
|
|
128
|
-
"aria-controls": r.contentId,
|
|
129
|
-
"aria-expanded": r.open,
|
|
130
|
-
"aria-required": r.required,
|
|
131
|
-
"aria-autocomplete": "none",
|
|
132
|
-
dir: r.dir,
|
|
133
|
-
"data-state": r.open ? "open" : "closed",
|
|
134
|
-
disabled: a,
|
|
135
|
-
"data-disabled": a ? "" : void 0,
|
|
136
|
-
"data-placeholder": rt(r.value) ? "" : void 0,
|
|
137
|
-
...l,
|
|
138
|
-
ref: i,
|
|
139
|
-
onClick: P(l.onClick, (d) => {
|
|
140
|
-
d.currentTarget.focus(), g.current !== "mouse" && y(d);
|
|
141
|
-
}),
|
|
142
|
-
onPointerDown: P(l.onPointerDown, (d) => {
|
|
143
|
-
g.current = d.pointerType;
|
|
144
|
-
const h = d.target;
|
|
145
|
-
h.hasPointerCapture(d.pointerId) && h.releasePointerCapture(d.pointerId), d.button === 0 && d.ctrlKey === !1 && d.pointerType === "mouse" && (y(d), d.preventDefault());
|
|
146
|
-
}),
|
|
147
|
-
onKeyDown: P(l.onKeyDown, (d) => {
|
|
148
|
-
const h = x.current !== "";
|
|
149
|
-
!(d.ctrlKey || d.altKey || d.metaKey) && d.key.length === 1 && N(d.key), !(h && d.key === " ") && Pt.includes(d.key) && (y(), d.preventDefault());
|
|
150
|
-
})
|
|
151
|
-
}
|
|
152
|
-
) });
|
|
6
|
+
import { v as cn, a as un } from "../../../visuallyHidden-PuyyGHVF.js";
|
|
7
|
+
import { f as Xe, b as Rt, a as dn, m as Vt, E as fn, c as Pt, u as be } from "../../../useRenderElement-DNB2vtF1.js";
|
|
8
|
+
import { u as pn } from "../../../useOnFirstRender-B4aruaIA.js";
|
|
9
|
+
import { u as Et } from "../../../useControlled-Sx-_x7Sz.js";
|
|
10
|
+
import { u as Se } from "../../../useIsoLayoutEffect-DpJo20by.js";
|
|
11
|
+
import { u as Ce } from "../../../useStableCallback-CudqoENs.js";
|
|
12
|
+
import { u as pt } from "../../../useValueAsRef-LhoZc6As.js";
|
|
13
|
+
import { c as mn, a as Dt, b as gn, u as hn, f as Sn } from "../../../LabelableContext-Dzw1DWuj.js";
|
|
14
|
+
import { u as Ot } from "../../../useLabelableId-DF_d91GP.js";
|
|
15
|
+
import { u as mt, a as ot, t as Lt } from "../../../useOpenChangeComplete-DkeH9FGJ.js";
|
|
16
|
+
import { s as ut } from "../../../serializeValue-BebmSzW3.js";
|
|
17
|
+
import { d as A, S as bn, K as f, p as xn, q as vn, B as yn, r as In, z as wn, L as Rn, x as Ht } from "../../../popupStateMapping-BT9Y_jIq.js";
|
|
18
|
+
import { f as En, o as Tn, c as Ve, n as gt, q as Mn, w as Nn, r as it } from "../../../createBaseUIEventDetails-CqidROtw.js";
|
|
19
|
+
import { u as An } from "../../../useValueChanged-Bissqjjn.js";
|
|
20
|
+
import { u as Cn, b as Vn, a as Pn, I as Dn, F as On } from "../../../InternalBackdrop-BVEfe6O1.js";
|
|
21
|
+
import { b as Ln, u as Hn, g as Ut, p as Un } from "../../../getDisabledMountTransitionStyles-fmnaQYVj.js";
|
|
22
|
+
import { u as Bn, a as Fn, g as _n } from "../../../getPseudoElementBounds-B4_miSEJ.js";
|
|
23
|
+
import { i as kn } from "../../../inertValue-kpZZDBEy.js";
|
|
24
|
+
import { C as zn } from "../../../CompositeList-yq5K_yj6.js";
|
|
25
|
+
import * as Wn from "react-dom";
|
|
26
|
+
import { r as qn } from "../../../floating-ui.utils-48URp89E.js";
|
|
27
|
+
import { u as Le } from "../../../useTimeout-DAqPwigF.js";
|
|
28
|
+
import { e as Yn } from "../../../detectBrowser-Dn2N72k1.js";
|
|
29
|
+
import { o as dt } from "../../../owner-rKN292Q9.js";
|
|
30
|
+
import { u as Gn } from "../../../useAnimationFrame-DIc6eFHa.js";
|
|
31
|
+
import { s as ft } from "../../../styles-DU5BO7fS.js";
|
|
32
|
+
import { u as $n } from "../../../ToolbarRootContext-D7EsmJ5f.js";
|
|
33
|
+
import { C as jn } from "../../../composite-BSpUD7nI.js";
|
|
34
|
+
import { u as Xn, c as at } from "../../../clamp-BxE4ZAuA.js";
|
|
35
|
+
import { g as Tt } from "../../../floating-ui.utils.dom-jr2suqy2.js";
|
|
36
|
+
import { u as Kn, I as Jn } from "../../../useCompositeListItem-CYQrZg5-.js";
|
|
37
|
+
import { a as Bt } from "../../../useButton-JYPKQKj4.js";
|
|
38
|
+
import { u as Zn } from "../../../useBaseUiId-C8Dq0BQq.js";
|
|
39
|
+
import { S as Qn } from "../../../Separator-CswSYAXX.js";
|
|
40
|
+
import { r as eo } from "../../../resolveAriaLabelledBy-B5vw-szP.js";
|
|
41
|
+
import { g as to, c as ct } from "../../../element-DSo91iOi.js";
|
|
42
|
+
const ht = /* @__PURE__ */ n.createContext(null);
|
|
43
|
+
process.env.NODE_ENV !== "production" && (ht.displayName = "SelectRootContext");
|
|
44
|
+
const St = /* @__PURE__ */ n.createContext(null);
|
|
45
|
+
process.env.NODE_ENV !== "production" && (St.displayName = "SelectFloatingContext");
|
|
46
|
+
function Ee() {
|
|
47
|
+
const e = n.useContext(ht);
|
|
48
|
+
if (e === null)
|
|
49
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>." : Xe(60));
|
|
50
|
+
return e;
|
|
51
|
+
}
|
|
52
|
+
function Ft() {
|
|
53
|
+
const e = n.useContext(St);
|
|
54
|
+
if (e === null)
|
|
55
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>." : Xe(61));
|
|
56
|
+
return e;
|
|
57
|
+
}
|
|
58
|
+
const no = (e, t) => Object.is(e, t);
|
|
59
|
+
function ke(e, t, o) {
|
|
60
|
+
return e == null || t == null ? Object.is(e, t) : o(e, t);
|
|
61
|
+
}
|
|
62
|
+
function oo(e, t, o) {
|
|
63
|
+
return !e || e.length === 0 ? !1 : e.some((s) => s === void 0 ? !1 : ke(t, s, o));
|
|
64
|
+
}
|
|
65
|
+
function je(e, t, o) {
|
|
66
|
+
return !e || e.length === 0 ? -1 : e.findIndex((s) => s === void 0 ? !1 : ke(s, t, o));
|
|
67
|
+
}
|
|
68
|
+
function ro(e, t, o) {
|
|
69
|
+
return e.filter((s) => !ke(t, s, o));
|
|
70
|
+
}
|
|
71
|
+
function _t(e) {
|
|
72
|
+
return e != null && e.length > 0 && typeof e[0] == "object" && e[0] != null && "items" in e[0];
|
|
73
|
+
}
|
|
74
|
+
function so(e) {
|
|
75
|
+
if (!Array.isArray(e))
|
|
76
|
+
return e != null && "null" in e;
|
|
77
|
+
const t = e;
|
|
78
|
+
if (_t(t)) {
|
|
79
|
+
for (const o of t)
|
|
80
|
+
for (const s of o.items)
|
|
81
|
+
if (s && s.value == null && s.label != null)
|
|
82
|
+
return !0;
|
|
83
|
+
return !1;
|
|
153
84
|
}
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
children: rt(i.value) ? /* @__PURE__ */ s(be, { children: r }) : u
|
|
168
|
-
}
|
|
169
|
-
);
|
|
85
|
+
for (const o of t)
|
|
86
|
+
if (o && o.value == null && o.label != null)
|
|
87
|
+
return !0;
|
|
88
|
+
return !1;
|
|
89
|
+
}
|
|
90
|
+
function lo(e, t) {
|
|
91
|
+
if (t && e != null)
|
|
92
|
+
return t(e) ?? "";
|
|
93
|
+
if (e && typeof e == "object") {
|
|
94
|
+
if ("label" in e && e.label != null)
|
|
95
|
+
return String(e.label);
|
|
96
|
+
if ("value" in e)
|
|
97
|
+
return String(e.value);
|
|
170
98
|
}
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
99
|
+
return ut(e);
|
|
100
|
+
}
|
|
101
|
+
function _e(e, t) {
|
|
102
|
+
return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? ut(e.value) : ut(e);
|
|
103
|
+
}
|
|
104
|
+
function kt(e, t, o) {
|
|
105
|
+
function s() {
|
|
106
|
+
return lo(e, o);
|
|
177
107
|
}
|
|
178
|
-
)
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
108
|
+
if (o && e != null)
|
|
109
|
+
return o(e);
|
|
110
|
+
if (e && typeof e == "object" && "label" in e && e.label != null)
|
|
111
|
+
return e.label;
|
|
112
|
+
if (t && !Array.isArray(t))
|
|
113
|
+
return t[e] ?? s();
|
|
114
|
+
if (Array.isArray(t)) {
|
|
115
|
+
const x = t, l = _t(x) ? x.flatMap((c) => c.items) : x;
|
|
116
|
+
if (e == null || typeof e != "object") {
|
|
117
|
+
const c = l.find((u) => u.value === e);
|
|
118
|
+
return c && c.label != null ? c.label : s();
|
|
119
|
+
}
|
|
120
|
+
if ("value" in e) {
|
|
121
|
+
const c = l.find((u) => u && u.value === e.value);
|
|
122
|
+
if (c && c.label != null)
|
|
123
|
+
return c.label;
|
|
193
124
|
}
|
|
194
|
-
return /* @__PURE__ */ s(Fe, { ...t, ref: o });
|
|
195
125
|
}
|
|
196
|
-
);
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
(
|
|
126
|
+
return s();
|
|
127
|
+
}
|
|
128
|
+
function io(e, t, o) {
|
|
129
|
+
return e.reduce((s, x, l) => (l > 0 && s.push(", "), s.push(/* @__PURE__ */ R(n.Fragment, {
|
|
130
|
+
children: kt(x, t, o)
|
|
131
|
+
}, l)), s), []);
|
|
132
|
+
}
|
|
133
|
+
const a = {
|
|
134
|
+
id: A((e) => e.id),
|
|
135
|
+
labelId: A((e) => e.labelId),
|
|
136
|
+
modal: A((e) => e.modal),
|
|
137
|
+
multiple: A((e) => e.multiple),
|
|
138
|
+
items: A((e) => e.items),
|
|
139
|
+
itemToStringLabel: A((e) => e.itemToStringLabel),
|
|
140
|
+
itemToStringValue: A((e) => e.itemToStringValue),
|
|
141
|
+
isItemEqualToValue: A((e) => e.isItemEqualToValue),
|
|
142
|
+
value: A((e) => e.value),
|
|
143
|
+
hasSelectedValue: A((e) => {
|
|
200
144
|
const {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
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
|
-
// flex layout so we can place the scroll buttons properly
|
|
339
|
-
display: "flex",
|
|
340
|
-
flexDirection: "column",
|
|
341
|
-
// reset the outline by default as the content MAY get focused
|
|
342
|
-
outline: "none",
|
|
343
|
-
...S.style
|
|
344
|
-
},
|
|
345
|
-
onKeyDown: P(S.onKeyDown, (p) => {
|
|
346
|
-
const I = p.ctrlKey || p.altKey || p.metaKey;
|
|
347
|
-
if (p.key === "Tab" && p.preventDefault(), !I && p.key.length === 1 && le(p.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(p.key)) {
|
|
348
|
-
let w = V().filter((C) => !C.disabled).map((C) => C.ref.current);
|
|
349
|
-
if (["ArrowUp", "End"].includes(p.key) && (w = w.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(p.key)) {
|
|
350
|
-
const C = p.target, T = w.indexOf(C);
|
|
351
|
-
w = w.slice(T + 1);
|
|
352
|
-
}
|
|
353
|
-
setTimeout(() => _(w)), p.preventDefault();
|
|
354
|
-
}
|
|
355
|
-
})
|
|
356
|
-
}
|
|
357
|
-
)
|
|
358
|
-
}
|
|
359
|
-
)
|
|
360
|
-
}
|
|
361
|
-
) })
|
|
362
|
-
}
|
|
363
|
-
);
|
|
364
|
-
}
|
|
365
|
-
);
|
|
366
|
-
Fe.displayName = Dt;
|
|
367
|
-
var kt = "SelectItemAlignedPosition", We = n.forwardRef((t, o) => {
|
|
368
|
-
const { __scopeSelect: e, onPlaced: c, ...l } = t, u = Y(te, e), r = q(te, e), [a, i] = n.useState(null), [f, g] = n.useState(null), x = k(o, (R) => g(R)), N = ue(e), b = n.useRef(!1), y = n.useRef(!0), { viewport: d, selectedItem: h, selectedItemText: S, focusSelectedItem: m } = r, v = n.useCallback(() => {
|
|
369
|
-
if (u.trigger && u.valueNode && a && f && d && h && S) {
|
|
370
|
-
const R = u.trigger.getBoundingClientRect(), D = f.getBoundingClientRect(), z = u.valueNode.getBoundingClientRect(), X = S.getBoundingClientRect();
|
|
371
|
-
if (u.dir !== "rtl") {
|
|
372
|
-
const C = X.left - D.left, T = z.left - C, Z = R.left - T, J = R.width + Z, ve = Math.max(J, D.width), ge = window.innerWidth - O, Se = Ne(T, [
|
|
373
|
-
O,
|
|
374
|
-
// Prevents the content from going off the starting edge of the
|
|
375
|
-
// viewport. It may still go off the ending edge, but this can be
|
|
376
|
-
// controlled by the user since they may want to manage overflow in a
|
|
377
|
-
// specific way.
|
|
378
|
-
// https://github.com/radix-ui/primitives/issues/2049
|
|
379
|
-
Math.max(O, ge - ve)
|
|
380
|
-
]);
|
|
381
|
-
a.style.minWidth = J + "px", a.style.left = Se + "px";
|
|
382
|
-
} else {
|
|
383
|
-
const C = D.right - X.right, T = window.innerWidth - z.right - C, Z = window.innerWidth - R.right - T, J = R.width + Z, ve = Math.max(J, D.width), ge = window.innerWidth - O, Se = Ne(T, [
|
|
384
|
-
O,
|
|
385
|
-
Math.max(O, ge - ve)
|
|
386
|
-
]);
|
|
387
|
-
a.style.minWidth = J + "px", a.style.right = Se + "px";
|
|
388
|
-
}
|
|
389
|
-
const B = N(), V = window.innerHeight - O * 2, K = d.scrollHeight, H = window.getComputedStyle(f), U = parseInt(H.borderTopWidth, 10), _ = parseInt(H.paddingTop, 10), L = parseInt(H.borderBottomWidth, 10), F = parseInt(H.paddingBottom, 10), $ = U + _ + K + F + L, fe = Math.min(h.offsetHeight * 5, $), le = window.getComputedStyle(d), me = parseInt(le.paddingTop, 10), he = parseInt(le.paddingBottom, 10), oe = R.top + R.height / 2 - O, ce = V - oe, se = h.offsetHeight / 2, p = h.offsetTop + se, I = U + _ + p, E = $ - I;
|
|
390
|
-
if (I <= oe) {
|
|
391
|
-
const C = B.length > 0 && h === B[B.length - 1].ref.current;
|
|
392
|
-
a.style.bottom = "0px";
|
|
393
|
-
const T = f.clientHeight - d.offsetTop - d.offsetHeight, Z = Math.max(
|
|
394
|
-
ce,
|
|
395
|
-
se + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
396
|
-
(C ? he : 0) + T + L
|
|
397
|
-
), J = I + Z;
|
|
398
|
-
a.style.height = J + "px";
|
|
399
|
-
} else {
|
|
400
|
-
const C = B.length > 0 && h === B[0].ref.current;
|
|
401
|
-
a.style.top = "0px";
|
|
402
|
-
const Z = Math.max(
|
|
403
|
-
oe,
|
|
404
|
-
U + d.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
405
|
-
(C ? me : 0) + se
|
|
406
|
-
) + E;
|
|
407
|
-
a.style.height = Z + "px", d.scrollTop = I - oe + d.offsetTop;
|
|
145
|
+
value: t,
|
|
146
|
+
multiple: o,
|
|
147
|
+
itemToStringValue: s
|
|
148
|
+
} = e;
|
|
149
|
+
return t == null ? !1 : o && Array.isArray(t) ? t.length > 0 : _e(t, s) !== "";
|
|
150
|
+
}),
|
|
151
|
+
hasNullItemLabel: A((e, t) => t ? so(e.items) : !1),
|
|
152
|
+
open: A((e) => e.open),
|
|
153
|
+
mounted: A((e) => e.mounted),
|
|
154
|
+
forceMount: A((e) => e.forceMount),
|
|
155
|
+
transitionStatus: A((e) => e.transitionStatus),
|
|
156
|
+
openMethod: A((e) => e.openMethod),
|
|
157
|
+
activeIndex: A((e) => e.activeIndex),
|
|
158
|
+
selectedIndex: A((e) => e.selectedIndex),
|
|
159
|
+
isActive: A((e, t) => e.activeIndex === t),
|
|
160
|
+
isSelected: A((e, t, o) => {
|
|
161
|
+
const s = e.isItemEqualToValue, x = e.value;
|
|
162
|
+
return e.multiple ? Array.isArray(x) && x.some((l) => ke(o, l, s)) : e.selectedIndex === t && e.selectedIndex !== null ? !0 : ke(o, x, s);
|
|
163
|
+
}),
|
|
164
|
+
isSelectedByFocus: A((e, t) => e.selectedIndex === t),
|
|
165
|
+
popupProps: A((e) => e.popupProps),
|
|
166
|
+
triggerProps: A((e) => e.triggerProps),
|
|
167
|
+
triggerElement: A((e) => e.triggerElement),
|
|
168
|
+
positionerElement: A((e) => e.positionerElement),
|
|
169
|
+
listElement: A((e) => e.listElement),
|
|
170
|
+
scrollUpArrowVisible: A((e) => e.scrollUpArrowVisible),
|
|
171
|
+
scrollDownArrowVisible: A((e) => e.scrollDownArrowVisible),
|
|
172
|
+
hasScrollArrows: A((e) => e.hasScrollArrows)
|
|
173
|
+
};
|
|
174
|
+
function ao(e) {
|
|
175
|
+
const {
|
|
176
|
+
id: t,
|
|
177
|
+
value: o,
|
|
178
|
+
defaultValue: s = null,
|
|
179
|
+
onValueChange: x,
|
|
180
|
+
open: l,
|
|
181
|
+
defaultOpen: c = !1,
|
|
182
|
+
onOpenChange: u,
|
|
183
|
+
name: d,
|
|
184
|
+
autoComplete: U,
|
|
185
|
+
disabled: N = !1,
|
|
186
|
+
readOnly: T = !1,
|
|
187
|
+
required: S = !1,
|
|
188
|
+
modal: B = !0,
|
|
189
|
+
actionsRef: te,
|
|
190
|
+
inputRef: v,
|
|
191
|
+
onOpenChangeComplete: $,
|
|
192
|
+
items: C,
|
|
193
|
+
multiple: y = !1,
|
|
194
|
+
itemToStringLabel: h,
|
|
195
|
+
itemToStringValue: b,
|
|
196
|
+
isItemEqualToValue: q = no,
|
|
197
|
+
highlightItemOnHover: ge = !0,
|
|
198
|
+
children: oe
|
|
199
|
+
} = e, {
|
|
200
|
+
clearErrors: k
|
|
201
|
+
} = mn(), {
|
|
202
|
+
setDirty: K,
|
|
203
|
+
setTouched: ie,
|
|
204
|
+
setFocused: z,
|
|
205
|
+
shouldValidateOnChange: Y,
|
|
206
|
+
validityData: j,
|
|
207
|
+
setFilled: m,
|
|
208
|
+
name: ce,
|
|
209
|
+
disabled: W,
|
|
210
|
+
validation: F,
|
|
211
|
+
validationMode: V
|
|
212
|
+
} = Dt(), r = Ot({
|
|
213
|
+
id: t
|
|
214
|
+
}), M = W || N, O = ce ?? d, [i, P] = Et({
|
|
215
|
+
controlled: o,
|
|
216
|
+
default: y ? s ?? Rt : s,
|
|
217
|
+
name: "Select",
|
|
218
|
+
state: "value"
|
|
219
|
+
}), [I, re] = Et({
|
|
220
|
+
controlled: l,
|
|
221
|
+
default: c,
|
|
222
|
+
name: "Select",
|
|
223
|
+
state: "open"
|
|
224
|
+
}), p = n.useRef([]), L = n.useRef([]), se = n.useRef(null), ue = n.useRef(null), Te = n.useRef(0), w = n.useRef(null), J = n.useRef([]), ae = n.useRef(!1), _ = n.useRef(!1), xe = n.useRef(null), ye = n.useRef({
|
|
225
|
+
allowSelectedMouseUp: !1,
|
|
226
|
+
allowUnselectedMouseUp: !1
|
|
227
|
+
}), H = n.useRef(!1), {
|
|
228
|
+
mounted: X,
|
|
229
|
+
setMounted: Z,
|
|
230
|
+
transitionStatus: G
|
|
231
|
+
} = mt(I), {
|
|
232
|
+
openMethod: ne,
|
|
233
|
+
triggerProps: Q
|
|
234
|
+
} = Cn(I), g = dn(() => new bn({
|
|
235
|
+
id: r,
|
|
236
|
+
labelId: void 0,
|
|
237
|
+
modal: B,
|
|
238
|
+
multiple: y,
|
|
239
|
+
itemToStringLabel: h,
|
|
240
|
+
itemToStringValue: b,
|
|
241
|
+
isItemEqualToValue: q,
|
|
242
|
+
value: i,
|
|
243
|
+
open: I,
|
|
244
|
+
mounted: X,
|
|
245
|
+
transitionStatus: G,
|
|
246
|
+
items: C,
|
|
247
|
+
forceMount: !1,
|
|
248
|
+
openMethod: null,
|
|
249
|
+
activeIndex: null,
|
|
250
|
+
selectedIndex: null,
|
|
251
|
+
popupProps: {},
|
|
252
|
+
triggerProps: {},
|
|
253
|
+
triggerElement: null,
|
|
254
|
+
positionerElement: null,
|
|
255
|
+
listElement: null,
|
|
256
|
+
scrollUpArrowVisible: !1,
|
|
257
|
+
scrollDownArrowVisible: !1,
|
|
258
|
+
hasScrollArrows: !1
|
|
259
|
+
})).current, Me = f(g, a.activeIndex), Ie = f(g, a.selectedIndex), we = f(g, a.triggerElement), De = f(g, a.positionerElement), He = n.useMemo(() => y && Array.isArray(i) && i.length === 0 ? "" : _e(i, b), [y, i, b]), ee = n.useMemo(() => y && Array.isArray(i) ? i.map((E) => _e(E, b)) : _e(i, b), [y, i, b]), de = pt(g.state.triggerElement);
|
|
260
|
+
gn({
|
|
261
|
+
id: r,
|
|
262
|
+
commit: F.commit,
|
|
263
|
+
value: i,
|
|
264
|
+
controlRef: de,
|
|
265
|
+
name: O,
|
|
266
|
+
getValue: () => ee
|
|
267
|
+
});
|
|
268
|
+
const le = n.useRef(i);
|
|
269
|
+
Se(() => {
|
|
270
|
+
i !== le.current && g.set("forceMount", !0);
|
|
271
|
+
}, [g, i]), Se(() => {
|
|
272
|
+
m(y ? Array.isArray(i) && i.length > 0 : i != null);
|
|
273
|
+
}, [y, i, m]), Se(function() {
|
|
274
|
+
if (I)
|
|
275
|
+
return;
|
|
276
|
+
const D = J.current;
|
|
277
|
+
if (y) {
|
|
278
|
+
const he = Array.isArray(i) ? i : [];
|
|
279
|
+
if (he.length === 0) {
|
|
280
|
+
g.set("selectedIndex", null);
|
|
281
|
+
return;
|
|
408
282
|
}
|
|
409
|
-
|
|
283
|
+
const me = he[he.length - 1], Oe = je(D, me, q);
|
|
284
|
+
g.set("selectedIndex", Oe === -1 ? null : Oe);
|
|
285
|
+
return;
|
|
410
286
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
287
|
+
const pe = je(D, i, q);
|
|
288
|
+
g.set("selectedIndex", pe === -1 ? null : pe);
|
|
289
|
+
}, [y, I, i, J, q, g]), An(i, () => {
|
|
290
|
+
k(O), K(i !== j.initialValue), Y() ? F.commit(i) : F.commit(i, !0);
|
|
291
|
+
});
|
|
292
|
+
const fe = Ce((E, D) => {
|
|
293
|
+
if (u?.(E, D), !D.isCanceled && (re(E), !E && (D.reason === En || D.reason === Tn) && (ie(!0), z(!1), V === "onBlur" && F.commit(i)), !E && g.state.activeIndex !== null)) {
|
|
294
|
+
const pe = p.current[g.state.activeIndex];
|
|
295
|
+
queueMicrotask(() => {
|
|
296
|
+
pe?.setAttribute("tabindex", "-1");
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}), We = Ce(() => {
|
|
300
|
+
Z(!1), g.set("activeIndex", null), $?.(!1);
|
|
301
|
+
});
|
|
302
|
+
ot({
|
|
303
|
+
enabled: !te,
|
|
304
|
+
open: I,
|
|
305
|
+
ref: se,
|
|
306
|
+
onComplete() {
|
|
307
|
+
I || We();
|
|
308
|
+
}
|
|
309
|
+
}), n.useImperativeHandle(te, () => ({
|
|
310
|
+
unmount: We
|
|
311
|
+
}), [We]);
|
|
312
|
+
const Ue = Ce((E, D) => {
|
|
313
|
+
x?.(E, D), !D.isCanceled && P(E);
|
|
314
|
+
}), qe = Ce(() => {
|
|
315
|
+
const E = g.state.listElement || se.current;
|
|
316
|
+
if (!E)
|
|
317
|
+
return;
|
|
318
|
+
const D = E.scrollTop, pe = E.scrollTop + E.clientHeight, he = D > 1, me = pe < E.scrollHeight - 1;
|
|
319
|
+
g.state.scrollUpArrowVisible !== he && g.set("scrollUpArrowVisible", he), g.state.scrollDownArrowVisible !== me && g.set("scrollDownArrowVisible", me);
|
|
320
|
+
}), Re = Ln({
|
|
321
|
+
open: I,
|
|
322
|
+
onOpenChange: fe,
|
|
323
|
+
elements: {
|
|
324
|
+
reference: we,
|
|
325
|
+
floating: De
|
|
326
|
+
}
|
|
327
|
+
}), Ne = Vn(Re, {
|
|
328
|
+
enabled: !T && !M,
|
|
329
|
+
event: "mousedown"
|
|
330
|
+
}), Ke = xn(Re, {
|
|
331
|
+
bubbles: !1
|
|
332
|
+
}), Je = Bn(Re, {
|
|
333
|
+
enabled: !T && !M,
|
|
334
|
+
listRef: p,
|
|
335
|
+
activeIndex: Me,
|
|
336
|
+
selectedIndex: Ie,
|
|
337
|
+
disabledIndices: Rt,
|
|
338
|
+
onNavigate(E) {
|
|
339
|
+
E === null && !I || g.set("activeIndex", E);
|
|
431
340
|
},
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
341
|
+
// Implement our own listeners since `onPointerLeave` on each option fires while scrolling with
|
|
342
|
+
// the `alignItemWithTrigger=true`, causing a performance issue on Chrome.
|
|
343
|
+
focusItemOnHover: !1
|
|
344
|
+
}), Ye = Fn(Re, {
|
|
345
|
+
enabled: !T && !M && (I || !y),
|
|
346
|
+
listRef: L,
|
|
347
|
+
activeIndex: Me,
|
|
348
|
+
selectedIndex: Ie,
|
|
349
|
+
onMatch(E) {
|
|
350
|
+
I ? g.set("activeIndex", E) : Ue(J.current[E], Ve("none"));
|
|
351
|
+
},
|
|
352
|
+
onTypingChange(E) {
|
|
353
|
+
ae.current = E;
|
|
354
|
+
}
|
|
355
|
+
}), {
|
|
356
|
+
getReferenceProps: ve,
|
|
357
|
+
getFloatingProps: Ge,
|
|
358
|
+
getItemProps: Be
|
|
359
|
+
} = vn([Ne, Ke, Je, Ye]), Fe = n.useMemo(() => Vt(ve(), Q, r ? {
|
|
360
|
+
id: r
|
|
361
|
+
} : fn), [ve, Q, r]);
|
|
362
|
+
pn(() => {
|
|
363
|
+
g.update({
|
|
364
|
+
popupProps: Ge(),
|
|
365
|
+
triggerProps: Fe
|
|
366
|
+
});
|
|
367
|
+
}), Se(() => {
|
|
368
|
+
g.update({
|
|
369
|
+
id: r,
|
|
370
|
+
modal: B,
|
|
371
|
+
multiple: y,
|
|
372
|
+
value: i,
|
|
373
|
+
open: I,
|
|
374
|
+
mounted: X,
|
|
375
|
+
transitionStatus: G,
|
|
376
|
+
popupProps: Ge(),
|
|
377
|
+
triggerProps: Fe,
|
|
378
|
+
items: C,
|
|
379
|
+
itemToStringLabel: h,
|
|
380
|
+
itemToStringValue: b,
|
|
381
|
+
isItemEqualToValue: q,
|
|
382
|
+
openMethod: ne
|
|
383
|
+
});
|
|
384
|
+
}, [g, r, B, y, i, I, X, G, Ge, Fe, C, h, b, q, ne]);
|
|
385
|
+
const rt = n.useMemo(() => ({
|
|
386
|
+
store: g,
|
|
387
|
+
name: O,
|
|
388
|
+
required: S,
|
|
389
|
+
disabled: M,
|
|
390
|
+
readOnly: T,
|
|
391
|
+
multiple: y,
|
|
392
|
+
itemToStringLabel: h,
|
|
393
|
+
itemToStringValue: b,
|
|
394
|
+
highlightItemOnHover: ge,
|
|
395
|
+
setValue: Ue,
|
|
396
|
+
setOpen: fe,
|
|
397
|
+
listRef: p,
|
|
398
|
+
popupRef: se,
|
|
399
|
+
scrollHandlerRef: ue,
|
|
400
|
+
handleScrollArrowVisibility: qe,
|
|
401
|
+
scrollArrowsMountedCountRef: Te,
|
|
402
|
+
getItemProps: Be,
|
|
403
|
+
events: Re.context.events,
|
|
404
|
+
valueRef: w,
|
|
405
|
+
valuesRef: J,
|
|
406
|
+
labelsRef: L,
|
|
407
|
+
typingRef: ae,
|
|
408
|
+
selectionRef: ye,
|
|
409
|
+
selectedItemTextRef: xe,
|
|
410
|
+
validation: F,
|
|
411
|
+
onOpenChangeComplete: $,
|
|
412
|
+
keyboardActiveRef: _,
|
|
413
|
+
alignItemWithTriggerActiveRef: H,
|
|
414
|
+
initialValueRef: le
|
|
415
|
+
}), [g, O, S, M, T, y, h, b, ge, Ue, fe, Be, Re.context.events, F, $, qe]), st = Pt(v, F.inputRef), Ze = y && Array.isArray(i) && i.length > 0, $e = y ? void 0 : O, lt = n.useMemo(() => !y || !Array.isArray(i) || !O ? null : i.map((E) => {
|
|
416
|
+
const D = _e(E, b);
|
|
417
|
+
return /* @__PURE__ */ R("input", {
|
|
418
|
+
type: "hidden",
|
|
419
|
+
name: O,
|
|
420
|
+
value: D
|
|
421
|
+
}, D);
|
|
422
|
+
}), [y, i, O, b]);
|
|
423
|
+
return /* @__PURE__ */ R(ht.Provider, {
|
|
424
|
+
value: rt,
|
|
425
|
+
children: /* @__PURE__ */ ze(St.Provider, {
|
|
426
|
+
value: Re,
|
|
427
|
+
children: [oe, /* @__PURE__ */ R("input", {
|
|
428
|
+
...F.getInputValidationProps({
|
|
429
|
+
onFocus() {
|
|
430
|
+
g.state.triggerElement?.focus({
|
|
431
|
+
// Supported in Chrome from 144 (January 2026)
|
|
432
|
+
// @ts-expect-error - focusVisible is not yet in the lib.dom.d.ts
|
|
433
|
+
focusVisible: !0
|
|
434
|
+
});
|
|
450
435
|
},
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
maxHeight: "100%",
|
|
462
|
-
...l.style
|
|
463
|
-
}
|
|
436
|
+
// Handle browser autofill.
|
|
437
|
+
onChange(E) {
|
|
438
|
+
if (E.nativeEvent.defaultPrevented)
|
|
439
|
+
return;
|
|
440
|
+
const D = E.target.value, pe = Ve(gt, E.nativeEvent);
|
|
441
|
+
function he() {
|
|
442
|
+
if (y)
|
|
443
|
+
return;
|
|
444
|
+
const me = J.current.find((Oe) => _e(Oe, b).toLowerCase() === D.toLowerCase());
|
|
445
|
+
me != null && (K(me !== j.initialValue), Ue(me, pe), Y() && F.commit(me));
|
|
464
446
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
447
|
+
g.set("forceMount", !0), queueMicrotask(he);
|
|
448
|
+
}
|
|
449
|
+
}),
|
|
450
|
+
id: r && $e == null ? `${r}-hidden-input` : void 0,
|
|
451
|
+
name: $e,
|
|
452
|
+
autoComplete: U,
|
|
453
|
+
value: He,
|
|
454
|
+
disabled: M,
|
|
455
|
+
required: S && !Ze,
|
|
456
|
+
readOnly: T,
|
|
457
|
+
ref: st,
|
|
458
|
+
style: O ? cn : un,
|
|
459
|
+
tabIndex: -1,
|
|
460
|
+
"aria-hidden": !0
|
|
461
|
+
}), lt]
|
|
462
|
+
})
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
const Qe = 2, co = 400, Mt = 200, uo = {
|
|
466
|
+
...yn,
|
|
467
|
+
...Sn,
|
|
468
|
+
value: () => null
|
|
469
|
+
}, zt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
470
|
+
const {
|
|
471
|
+
render: s,
|
|
472
|
+
className: x,
|
|
473
|
+
id: l,
|
|
474
|
+
disabled: c = !1,
|
|
475
|
+
nativeButton: u = !0,
|
|
476
|
+
...d
|
|
477
|
+
} = t, {
|
|
478
|
+
setTouched: U,
|
|
479
|
+
setFocused: N,
|
|
480
|
+
validationMode: T,
|
|
481
|
+
state: S,
|
|
482
|
+
disabled: B
|
|
483
|
+
} = Dt(), {
|
|
484
|
+
labelId: te
|
|
485
|
+
} = hn(), {
|
|
486
|
+
store: v,
|
|
487
|
+
setOpen: $,
|
|
488
|
+
selectionRef: C,
|
|
489
|
+
validation: y,
|
|
490
|
+
readOnly: h,
|
|
491
|
+
required: b,
|
|
492
|
+
alignItemWithTriggerActiveRef: q,
|
|
493
|
+
disabled: ge,
|
|
494
|
+
keyboardActiveRef: oe
|
|
495
|
+
} = Ee(), k = B || ge || c, K = f(v, a.open), ie = f(v, a.value), z = f(v, a.triggerProps), Y = f(v, a.positionerElement), j = f(v, a.listElement), m = f(v, a.id), ce = f(v, a.labelId), W = f(v, a.hasSelectedValue), F = !W && K, V = f(v, a.hasNullItemLabel, F), r = l ?? m, M = eo(te, ce);
|
|
496
|
+
Ot({
|
|
497
|
+
id: r
|
|
498
|
+
});
|
|
499
|
+
const O = pt(Y), i = n.useRef(null), {
|
|
500
|
+
getButtonProps: P,
|
|
501
|
+
buttonRef: I
|
|
502
|
+
} = Bt({
|
|
503
|
+
disabled: k,
|
|
504
|
+
native: u
|
|
505
|
+
}), re = Ce((_) => {
|
|
506
|
+
v.set("triggerElement", _);
|
|
507
|
+
}), p = Pt(o, i, I, re), L = Le(), se = Le(), ue = Le(), Te = Le();
|
|
508
|
+
n.useEffect(() => {
|
|
509
|
+
if (K)
|
|
510
|
+
return !(W || V) ? ue.start(co, () => {
|
|
511
|
+
C.current.allowUnselectedMouseUp = !0, C.current.allowSelectedMouseUp = !0;
|
|
512
|
+
}) : Te.start(Mt, () => {
|
|
513
|
+
C.current.allowUnselectedMouseUp = !0, ue.start(Mt, () => {
|
|
514
|
+
C.current.allowSelectedMouseUp = !0;
|
|
515
|
+
});
|
|
516
|
+
}), () => {
|
|
517
|
+
ue.clear(), Te.clear();
|
|
518
|
+
};
|
|
519
|
+
C.current = {
|
|
520
|
+
allowSelectedMouseUp: !1,
|
|
521
|
+
allowUnselectedMouseUp: !1
|
|
522
|
+
}, se.clear();
|
|
523
|
+
}, [K, W, V, C, se, ue, Te]);
|
|
524
|
+
const w = n.useMemo(() => j?.id ?? to(Y)?.id, [j, Y]), J = Vt(z, {
|
|
525
|
+
id: r,
|
|
526
|
+
role: "combobox",
|
|
527
|
+
"aria-expanded": K ? "true" : "false",
|
|
528
|
+
"aria-haspopup": "listbox",
|
|
529
|
+
"aria-controls": K ? w : void 0,
|
|
530
|
+
"aria-labelledby": M,
|
|
531
|
+
"aria-readonly": h || void 0,
|
|
532
|
+
"aria-required": b || void 0,
|
|
533
|
+
tabIndex: k ? -1 : 0,
|
|
534
|
+
ref: p,
|
|
535
|
+
onFocus(_) {
|
|
536
|
+
N(!0), K && q.current && $(!1, Ve(gt, _.nativeEvent)), L.start(0, () => {
|
|
537
|
+
v.set("forceMount", !0);
|
|
538
|
+
});
|
|
539
|
+
},
|
|
540
|
+
onBlur(_) {
|
|
541
|
+
ct(Y, _.relatedTarget) || (U(!0), N(!1), T === "onBlur" && y.commit(ie));
|
|
542
|
+
},
|
|
543
|
+
onPointerMove() {
|
|
544
|
+
oe.current = !1;
|
|
545
|
+
},
|
|
546
|
+
onKeyDown() {
|
|
547
|
+
oe.current = !0;
|
|
548
|
+
},
|
|
549
|
+
onMouseDown(_) {
|
|
550
|
+
if (K)
|
|
551
|
+
return;
|
|
552
|
+
const xe = dt(_.currentTarget);
|
|
553
|
+
function ye(H) {
|
|
554
|
+
if (!i.current)
|
|
555
|
+
return;
|
|
556
|
+
const X = H.target;
|
|
557
|
+
if (ct(i.current, X) || ct(O.current, X) || X === i.current)
|
|
558
|
+
return;
|
|
559
|
+
const Z = _n(i.current);
|
|
560
|
+
H.clientX >= Z.left - Qe && H.clientX <= Z.right + Qe && H.clientY >= Z.top - Qe && H.clientY <= Z.bottom + Qe || $(!1, Ve(Mn, H));
|
|
561
|
+
}
|
|
562
|
+
se.start(0, () => {
|
|
563
|
+
xe.addEventListener("mouseup", ye, {
|
|
564
|
+
once: !0
|
|
565
|
+
});
|
|
566
|
+
});
|
|
468
567
|
}
|
|
469
|
-
);
|
|
568
|
+
}, y.getValidationProps, d, P);
|
|
569
|
+
J.role = "combobox";
|
|
570
|
+
const ae = {
|
|
571
|
+
...S,
|
|
572
|
+
open: K,
|
|
573
|
+
disabled: k,
|
|
574
|
+
value: ie,
|
|
575
|
+
readOnly: h,
|
|
576
|
+
placeholder: !W
|
|
577
|
+
};
|
|
578
|
+
return be("button", t, {
|
|
579
|
+
ref: [o, i],
|
|
580
|
+
state: ae,
|
|
581
|
+
stateAttributesMapping: uo,
|
|
582
|
+
props: J
|
|
583
|
+
});
|
|
470
584
|
});
|
|
471
|
-
|
|
472
|
-
|
|
585
|
+
process.env.NODE_ENV !== "production" && (zt.displayName = "SelectTrigger");
|
|
586
|
+
const fo = {
|
|
587
|
+
value: () => null
|
|
588
|
+
}, Wt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
473
589
|
const {
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
590
|
+
className: s,
|
|
591
|
+
render: x,
|
|
592
|
+
children: l,
|
|
593
|
+
placeholder: c,
|
|
477
594
|
...u
|
|
478
|
-
} = t,
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
595
|
+
} = t, {
|
|
596
|
+
store: d,
|
|
597
|
+
valueRef: U
|
|
598
|
+
} = Ee(), N = f(d, a.value), T = f(d, a.items), S = f(d, a.itemToStringLabel), B = f(d, a.hasSelectedValue), te = !B && c != null && l == null, v = f(d, a.hasNullItemLabel, te), $ = {
|
|
599
|
+
value: N,
|
|
600
|
+
placeholder: !B
|
|
601
|
+
};
|
|
602
|
+
let C = null;
|
|
603
|
+
return typeof l == "function" ? C = l(N) : l != null ? C = l : !B && c != null && !v ? C = c : Array.isArray(N) ? C = io(N, T, S) : C = kt(N, T, S), be("span", t, {
|
|
604
|
+
state: $,
|
|
605
|
+
ref: [o, U],
|
|
606
|
+
props: [{
|
|
607
|
+
children: C
|
|
608
|
+
}, u],
|
|
609
|
+
stateAttributesMapping: fo
|
|
610
|
+
});
|
|
611
|
+
});
|
|
612
|
+
process.env.NODE_ENV !== "production" && (Wt.displayName = "SelectValue");
|
|
613
|
+
const qt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
614
|
+
const {
|
|
615
|
+
className: s,
|
|
616
|
+
render: x,
|
|
617
|
+
...l
|
|
618
|
+
} = t, {
|
|
619
|
+
store: c
|
|
620
|
+
} = Ee(), d = {
|
|
621
|
+
open: f(c, a.open)
|
|
622
|
+
};
|
|
623
|
+
return be("span", t, {
|
|
624
|
+
state: d,
|
|
625
|
+
ref: o,
|
|
626
|
+
props: [{
|
|
627
|
+
"aria-hidden": !0,
|
|
628
|
+
children: "▼"
|
|
629
|
+
}, l],
|
|
630
|
+
stateAttributesMapping: In
|
|
631
|
+
});
|
|
632
|
+
});
|
|
633
|
+
process.env.NODE_ENV !== "production" && (qt.displayName = "SelectIcon");
|
|
634
|
+
const Yt = /* @__PURE__ */ n.createContext(void 0);
|
|
635
|
+
process.env.NODE_ENV !== "production" && (Yt.displayName = "SelectPortalContext");
|
|
636
|
+
const Gt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
637
|
+
const {
|
|
638
|
+
store: s
|
|
639
|
+
} = Ee(), x = f(s, a.mounted), l = f(s, a.forceMount);
|
|
640
|
+
return x || l ? /* @__PURE__ */ R(Yt.Provider, {
|
|
641
|
+
value: !0,
|
|
642
|
+
children: /* @__PURE__ */ R(wn, {
|
|
484
643
|
ref: o,
|
|
485
|
-
|
|
486
|
-
|
|
644
|
+
...t
|
|
645
|
+
})
|
|
646
|
+
}) : null;
|
|
647
|
+
});
|
|
648
|
+
process.env.NODE_ENV !== "production" && (Gt.displayName = "SelectPortal");
|
|
649
|
+
const bt = /* @__PURE__ */ n.createContext(void 0);
|
|
650
|
+
process.env.NODE_ENV !== "production" && (bt.displayName = "SelectPositionerContext");
|
|
651
|
+
function xt() {
|
|
652
|
+
const e = n.useContext(bt);
|
|
653
|
+
if (!e)
|
|
654
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>." : Xe(59));
|
|
655
|
+
return e;
|
|
656
|
+
}
|
|
657
|
+
function nt(e, t) {
|
|
658
|
+
e && Object.assign(e.style, t);
|
|
659
|
+
}
|
|
660
|
+
const $t = {
|
|
661
|
+
position: "relative",
|
|
662
|
+
maxHeight: "100%",
|
|
663
|
+
overflowX: "hidden",
|
|
664
|
+
overflowY: "auto"
|
|
665
|
+
}, po = {
|
|
666
|
+
position: "fixed"
|
|
667
|
+
}, jt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
668
|
+
const {
|
|
669
|
+
anchor: s,
|
|
670
|
+
positionMethod: x = "absolute",
|
|
671
|
+
className: l,
|
|
672
|
+
render: c,
|
|
673
|
+
side: u = "bottom",
|
|
674
|
+
align: d = "center",
|
|
675
|
+
sideOffset: U = 0,
|
|
676
|
+
alignOffset: N = 0,
|
|
677
|
+
collisionBoundary: T = "clipping-ancestors",
|
|
678
|
+
collisionPadding: S,
|
|
679
|
+
arrowPadding: B = 5,
|
|
680
|
+
sticky: te = !1,
|
|
681
|
+
disableAnchorTracking: v,
|
|
682
|
+
alignItemWithTrigger: $ = !0,
|
|
683
|
+
collisionAvoidance: C = Rn,
|
|
684
|
+
...y
|
|
685
|
+
} = t, {
|
|
686
|
+
store: h,
|
|
687
|
+
listRef: b,
|
|
688
|
+
labelsRef: q,
|
|
689
|
+
alignItemWithTriggerActiveRef: ge,
|
|
690
|
+
selectedItemTextRef: oe,
|
|
691
|
+
valuesRef: k,
|
|
692
|
+
initialValueRef: K,
|
|
693
|
+
popupRef: ie,
|
|
694
|
+
setValue: z
|
|
695
|
+
} = Ee(), Y = Ft(), j = f(h, a.open), m = f(h, a.mounted), ce = f(h, a.modal), W = f(h, a.value), F = f(h, a.openMethod), V = f(h, a.positionerElement), r = f(h, a.triggerElement), M = f(h, a.isItemEqualToValue), O = f(h, a.transitionStatus), i = n.useRef(null), P = n.useRef(null), [I, re] = n.useState($), p = m && I && F !== "touch";
|
|
696
|
+
!m && I !== $ && re($), Se(() => {
|
|
697
|
+
m || (a.scrollUpArrowVisible(h.state) && h.set("scrollUpArrowVisible", !1), a.scrollDownArrowVisible(h.state) && h.set("scrollDownArrowVisible", !1));
|
|
698
|
+
}, [h, m]), n.useImperativeHandle(ge, () => p), Pn((p || ce) && j && F !== "touch", r);
|
|
699
|
+
const L = Hn({
|
|
700
|
+
anchor: s,
|
|
701
|
+
floatingRootContext: Y,
|
|
702
|
+
positionMethod: x,
|
|
703
|
+
mounted: m,
|
|
704
|
+
side: u,
|
|
705
|
+
sideOffset: U,
|
|
706
|
+
align: d,
|
|
707
|
+
alignOffset: N,
|
|
708
|
+
arrowPadding: B,
|
|
709
|
+
collisionBoundary: T,
|
|
710
|
+
collisionPadding: S,
|
|
711
|
+
sticky: te,
|
|
712
|
+
disableAnchorTracking: v ?? p,
|
|
713
|
+
collisionAvoidance: C,
|
|
714
|
+
keepMounted: !0
|
|
715
|
+
}), se = p ? "none" : L.side, ue = p ? po : L.positionerStyles, Te = n.useMemo(() => {
|
|
716
|
+
const H = {};
|
|
717
|
+
return j || (H.pointerEvents = "none"), {
|
|
718
|
+
role: "presentation",
|
|
719
|
+
hidden: !m,
|
|
487
720
|
style: {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
...u.style,
|
|
491
|
-
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
492
|
-
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
493
|
-
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
494
|
-
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
|
495
|
-
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
721
|
+
...ue,
|
|
722
|
+
...H
|
|
496
723
|
}
|
|
724
|
+
};
|
|
725
|
+
}, [j, m, ue]), w = {
|
|
726
|
+
open: j,
|
|
727
|
+
side: se,
|
|
728
|
+
align: L.align,
|
|
729
|
+
anchorHidden: L.anchorHidden
|
|
730
|
+
}, J = Ce((H) => {
|
|
731
|
+
h.set("positionerElement", H);
|
|
732
|
+
}), ae = be("div", t, {
|
|
733
|
+
ref: [o, J],
|
|
734
|
+
state: w,
|
|
735
|
+
stateAttributesMapping: Ht,
|
|
736
|
+
props: [Te, Ut(O), y]
|
|
737
|
+
}), _ = n.useRef(0), xe = Ce((H) => {
|
|
738
|
+
if (H.size === 0 && _.current === 0 || k.current.length === 0)
|
|
739
|
+
return;
|
|
740
|
+
const X = _.current;
|
|
741
|
+
if (_.current = H.size, H.size === X)
|
|
742
|
+
return;
|
|
743
|
+
const Z = Ve(gt);
|
|
744
|
+
if (X !== 0 && !h.state.multiple && W !== null && je(k.current, W, M) === -1) {
|
|
745
|
+
const ne = K.current, g = ne != null && je(k.current, ne, M) !== -1 ? ne : null;
|
|
746
|
+
z(g, Z), g === null && (h.set("selectedIndex", null), oe.current = null);
|
|
497
747
|
}
|
|
498
|
-
|
|
748
|
+
if (X !== 0 && h.state.multiple && Array.isArray(W)) {
|
|
749
|
+
const G = (Q) => je(k.current, Q, M) !== -1, ne = W.filter((Q) => G(Q));
|
|
750
|
+
(ne.length !== W.length || ne.some((Q) => !oo(W, Q, M))) && (z(ne, Z), ne.length === 0 && (h.set("selectedIndex", null), oe.current = null));
|
|
751
|
+
}
|
|
752
|
+
if (j && p) {
|
|
753
|
+
h.update({
|
|
754
|
+
scrollUpArrowVisible: !1,
|
|
755
|
+
scrollDownArrowVisible: !1
|
|
756
|
+
});
|
|
757
|
+
const G = {
|
|
758
|
+
height: ""
|
|
759
|
+
};
|
|
760
|
+
nt(V, G), nt(ie.current, G);
|
|
761
|
+
}
|
|
762
|
+
}), ye = n.useMemo(() => ({
|
|
763
|
+
...L,
|
|
764
|
+
side: se,
|
|
765
|
+
alignItemWithTriggerActive: p,
|
|
766
|
+
setControlledAlignItemWithTrigger: re,
|
|
767
|
+
scrollUpArrowRef: i,
|
|
768
|
+
scrollDownArrowRef: P
|
|
769
|
+
}), [L, se, p, re]);
|
|
770
|
+
return /* @__PURE__ */ R(zn, {
|
|
771
|
+
elementsRef: b,
|
|
772
|
+
labelsRef: q,
|
|
773
|
+
onMapChange: xe,
|
|
774
|
+
children: /* @__PURE__ */ ze(bt.Provider, {
|
|
775
|
+
value: ye,
|
|
776
|
+
children: [m && ce && /* @__PURE__ */ R(Dn, {
|
|
777
|
+
inert: kn(!j),
|
|
778
|
+
cutout: r
|
|
779
|
+
}), ae]
|
|
780
|
+
})
|
|
781
|
+
});
|
|
499
782
|
});
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
)
|
|
550
|
-
] });
|
|
551
|
-
}
|
|
552
|
-
);
|
|
553
|
-
ze.displayName = xe;
|
|
554
|
-
var Ke = "SelectGroup", [Ht, Ut] = ne(Ke), $e = n.forwardRef(
|
|
555
|
-
(t, o) => {
|
|
556
|
-
const { __scopeSelect: e, ...c } = t, l = Te();
|
|
557
|
-
return /* @__PURE__ */ s(Ht, { scope: e, id: l, children: /* @__PURE__ */ s(M.div, { role: "group", "aria-labelledby": l, ...c, ref: o }) });
|
|
558
|
-
}
|
|
559
|
-
);
|
|
560
|
-
$e.displayName = Ke;
|
|
561
|
-
var Ge = "SelectLabel", je = n.forwardRef(
|
|
562
|
-
(t, o) => {
|
|
563
|
-
const { __scopeSelect: e, ...c } = t, l = Ut(Ge, e);
|
|
564
|
-
return /* @__PURE__ */ s(M.div, { id: l.id, ...c, ref: o });
|
|
565
|
-
}
|
|
566
|
-
);
|
|
567
|
-
je.displayName = Ge;
|
|
568
|
-
var ie = "SelectItem", [Ft, Ye] = ne(ie), qe = n.forwardRef(
|
|
569
|
-
(t, o) => {
|
|
570
|
-
const {
|
|
571
|
-
__scopeSelect: e,
|
|
572
|
-
value: c,
|
|
573
|
-
disabled: l = !1,
|
|
574
|
-
textValue: u,
|
|
575
|
-
...r
|
|
576
|
-
} = t, a = Y(ie, e), i = q(ie, e), f = a.value === c, [g, x] = n.useState(u ?? ""), [N, b] = n.useState(!1), y = k(
|
|
577
|
-
o,
|
|
578
|
-
(m) => i.itemRefCallback?.(m, c, l)
|
|
579
|
-
), d = Te(), h = n.useRef("touch"), S = () => {
|
|
580
|
-
l || (a.onValueChange(c), a.onOpenChange(!1));
|
|
783
|
+
process.env.NODE_ENV !== "production" && (jt.displayName = "SelectPositioner");
|
|
784
|
+
function Xt(e) {
|
|
785
|
+
const t = e.currentTarget.getBoundingClientRect();
|
|
786
|
+
return t.top + 1 <= e.clientY && e.clientY <= t.bottom - 1 && t.left + 1 <= e.clientX && e.clientX <= t.right - 1;
|
|
787
|
+
}
|
|
788
|
+
const Ae = 1, mo = {
|
|
789
|
+
...Ht,
|
|
790
|
+
...Lt
|
|
791
|
+
}, Kt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
792
|
+
const {
|
|
793
|
+
render: s,
|
|
794
|
+
className: x,
|
|
795
|
+
finalFocus: l,
|
|
796
|
+
...c
|
|
797
|
+
} = t, {
|
|
798
|
+
store: u,
|
|
799
|
+
popupRef: d,
|
|
800
|
+
onOpenChangeComplete: U,
|
|
801
|
+
setOpen: N,
|
|
802
|
+
valueRef: T,
|
|
803
|
+
selectedItemTextRef: S,
|
|
804
|
+
keyboardActiveRef: B,
|
|
805
|
+
multiple: te,
|
|
806
|
+
handleScrollArrowVisibility: v,
|
|
807
|
+
scrollHandlerRef: $,
|
|
808
|
+
highlightItemOnHover: C
|
|
809
|
+
} = Ee(), {
|
|
810
|
+
side: y,
|
|
811
|
+
align: h,
|
|
812
|
+
alignItemWithTriggerActive: b,
|
|
813
|
+
setControlledAlignItemWithTrigger: q,
|
|
814
|
+
scrollDownArrowRef: ge,
|
|
815
|
+
scrollUpArrowRef: oe
|
|
816
|
+
} = xt(), k = $n() != null, K = Ft(), {
|
|
817
|
+
nonce: ie,
|
|
818
|
+
disableStyleElements: z
|
|
819
|
+
} = Xn(), Y = Le(), j = f(u, a.id), m = f(u, a.open), ce = f(u, a.mounted), W = f(u, a.popupProps), F = f(u, a.transitionStatus), V = f(u, a.triggerElement), r = f(u, a.positionerElement), M = f(u, a.listElement), O = n.useRef(0), i = n.useRef(!1), P = n.useRef(0), I = n.useRef(!1), re = n.useRef({}), p = Gn(), L = Ce((w) => {
|
|
820
|
+
if (!r || !d.current || !I.current)
|
|
821
|
+
return;
|
|
822
|
+
if (i.current || !b) {
|
|
823
|
+
v();
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
const J = r.style.top === "0px", ae = r.style.bottom === "0px", _ = r.getBoundingClientRect().height, xe = dt(r), ye = getComputedStyle(r), H = parseFloat(ye.marginTop), X = parseFloat(ye.marginBottom), Z = Nt(getComputedStyle(d.current)), G = Math.min(xe.documentElement.clientHeight - H - X, Z), ne = w.scrollTop, Q = et(w);
|
|
827
|
+
let g = 0, Me = null, Ie = !1, we = !1;
|
|
828
|
+
const De = (ee) => {
|
|
829
|
+
r.style.height = `${ee}px`;
|
|
830
|
+
}, He = (ee, de) => {
|
|
831
|
+
const le = at(ee, 0, G - _);
|
|
832
|
+
le > 0 && De(_ + le), w.scrollTop = de, G - (_ + le) <= Ae && (i.current = !0), v();
|
|
581
833
|
};
|
|
582
|
-
if (
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
Ft,
|
|
588
|
-
{
|
|
589
|
-
scope: e,
|
|
590
|
-
value: c,
|
|
591
|
-
disabled: l,
|
|
592
|
-
textId: d,
|
|
593
|
-
isSelected: f,
|
|
594
|
-
onItemTextChange: n.useCallback((m) => {
|
|
595
|
-
x((v) => v || (m?.textContent ?? "").trim());
|
|
596
|
-
}, []),
|
|
597
|
-
children: /* @__PURE__ */ s(
|
|
598
|
-
de.ItemSlot,
|
|
599
|
-
{
|
|
600
|
-
scope: e,
|
|
601
|
-
value: c,
|
|
602
|
-
disabled: l,
|
|
603
|
-
textValue: g,
|
|
604
|
-
children: /* @__PURE__ */ s(
|
|
605
|
-
M.div,
|
|
606
|
-
{
|
|
607
|
-
role: "option",
|
|
608
|
-
"aria-labelledby": d,
|
|
609
|
-
"data-highlighted": N ? "" : void 0,
|
|
610
|
-
"aria-selected": f && N,
|
|
611
|
-
"data-state": f ? "checked" : "unchecked",
|
|
612
|
-
"aria-disabled": l || void 0,
|
|
613
|
-
"data-disabled": l ? "" : void 0,
|
|
614
|
-
tabIndex: l ? void 0 : -1,
|
|
615
|
-
...r,
|
|
616
|
-
ref: y,
|
|
617
|
-
onFocus: P(r.onFocus, () => b(!0)),
|
|
618
|
-
onBlur: P(r.onBlur, () => b(!1)),
|
|
619
|
-
onClick: P(r.onClick, () => {
|
|
620
|
-
h.current !== "mouse" && S();
|
|
621
|
-
}),
|
|
622
|
-
onPointerUp: P(r.onPointerUp, () => {
|
|
623
|
-
h.current === "mouse" && S();
|
|
624
|
-
}),
|
|
625
|
-
onPointerDown: P(r.onPointerDown, (m) => {
|
|
626
|
-
h.current = m.pointerType;
|
|
627
|
-
}),
|
|
628
|
-
onPointerMove: P(r.onPointerMove, (m) => {
|
|
629
|
-
h.current = m.pointerType, l ? i.onItemLeave?.() : h.current === "mouse" && m.currentTarget.focus({ preventScroll: !0 });
|
|
630
|
-
}),
|
|
631
|
-
onPointerLeave: P(r.onPointerLeave, (m) => {
|
|
632
|
-
m.currentTarget === document.activeElement && i.onItemLeave?.();
|
|
633
|
-
}),
|
|
634
|
-
onKeyDown: P(r.onKeyDown, (m) => {
|
|
635
|
-
i.searchRef?.current !== "" && m.key === " " || (Nt.includes(m.key) && S(), m.key === " " && m.preventDefault());
|
|
636
|
-
})
|
|
637
|
-
}
|
|
638
|
-
)
|
|
639
|
-
}
|
|
640
|
-
)
|
|
834
|
+
if (J) {
|
|
835
|
+
const ee = Q - ne, de = _ + ee, le = Math.min(de, G);
|
|
836
|
+
if (g = le, ee <= Ae) {
|
|
837
|
+
He(ee, Q);
|
|
838
|
+
return;
|
|
641
839
|
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
);
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
(S) => x(S),
|
|
651
|
-
i.onItemTextChange,
|
|
652
|
-
(S) => a.itemTextRefCallback?.(S, i.value, i.disabled)
|
|
653
|
-
), b = g?.textContent, y = n.useMemo(
|
|
654
|
-
() => /* @__PURE__ */ s("option", { value: i.value, disabled: i.disabled, children: b }, i.value),
|
|
655
|
-
[i.disabled, i.value, b]
|
|
656
|
-
), { onNativeOptionAdd: d, onNativeOptionRemove: h } = f;
|
|
657
|
-
return j(() => (d(y), () => h(y)), [d, h, y]), /* @__PURE__ */ Q(be, { children: [
|
|
658
|
-
/* @__PURE__ */ s(M.span, { id: i.textId, ...u, ref: N }),
|
|
659
|
-
i.isSelected && r.valueNode && !r.valueNodeHasChildren ? Ee.createPortal(u.children, r.valueNode) : null
|
|
660
|
-
] });
|
|
661
|
-
}
|
|
662
|
-
);
|
|
663
|
-
Xe.displayName = ae;
|
|
664
|
-
var Ze = "SelectItemIndicator", Je = n.forwardRef(
|
|
665
|
-
(t, o) => {
|
|
666
|
-
const { __scopeSelect: e, ...c } = t;
|
|
667
|
-
return Ye(Ze, e).isSelected ? /* @__PURE__ */ s(M.span, { "aria-hidden": !0, ...c, ref: o }) : null;
|
|
668
|
-
}
|
|
669
|
-
);
|
|
670
|
-
Je.displayName = Ze;
|
|
671
|
-
var Ce = "SelectScrollUpButton", Qe = n.forwardRef((t, o) => {
|
|
672
|
-
const e = q(Ce, t.__scopeSelect), c = Pe(Ce, t.__scopeSelect), [l, u] = n.useState(!1), r = k(o, c.onScrollButtonChange);
|
|
673
|
-
return j(() => {
|
|
674
|
-
if (e.viewport && e.isPositioned) {
|
|
675
|
-
let a = function() {
|
|
676
|
-
const f = i.scrollTop > 0;
|
|
677
|
-
u(f);
|
|
678
|
-
};
|
|
679
|
-
const i = e.viewport;
|
|
680
|
-
return a(), i.addEventListener("scroll", a), () => i.removeEventListener("scroll", a);
|
|
840
|
+
G - le > Ae ? we = !0 : Ie = !0;
|
|
841
|
+
} else if (ae) {
|
|
842
|
+
const ee = ne, de = _ + ee, le = Math.min(de, G), fe = de - G;
|
|
843
|
+
if (g = le, ee <= Ae) {
|
|
844
|
+
He(ee, 0);
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
G - le > Ae ? Me = 0 : (Ie = !0, ne < Q && (Me = ne - (ee - fe)));
|
|
681
848
|
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
849
|
+
if (g = Math.ceil(g), g !== 0 && De(g), we || Me != null) {
|
|
850
|
+
const ee = et(w), de = we ? ee : at(Me, 0, ee);
|
|
851
|
+
Math.abs(w.scrollTop - de) > Ae && (w.scrollTop = de);
|
|
852
|
+
}
|
|
853
|
+
(Ie || g >= G - Ae) && (i.current = !0), v();
|
|
854
|
+
});
|
|
855
|
+
n.useImperativeHandle($, () => L, [L]), ot({
|
|
856
|
+
open: m,
|
|
857
|
+
ref: d,
|
|
858
|
+
onComplete() {
|
|
859
|
+
m && U?.(!0);
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
const se = {
|
|
863
|
+
open: m,
|
|
864
|
+
transitionStatus: F,
|
|
865
|
+
side: y,
|
|
866
|
+
align: h
|
|
867
|
+
};
|
|
868
|
+
Se(() => {
|
|
869
|
+
!r || !d.current || Object.keys(re.current).length || (re.current = {
|
|
870
|
+
top: r.style.top || "0",
|
|
871
|
+
left: r.style.left || "0",
|
|
872
|
+
right: r.style.right,
|
|
873
|
+
height: r.style.height,
|
|
874
|
+
bottom: r.style.bottom,
|
|
875
|
+
minHeight: r.style.minHeight,
|
|
876
|
+
maxHeight: r.style.maxHeight,
|
|
877
|
+
marginTop: r.style.marginTop,
|
|
878
|
+
marginBottom: r.style.marginBottom
|
|
879
|
+
});
|
|
880
|
+
}, [d, r]), Se(() => {
|
|
881
|
+
m || b || (I.current = !1, i.current = !1, O.current = 0, P.current = 0, nt(r, re.current));
|
|
882
|
+
}, [m, b, r, d]), Se(() => {
|
|
883
|
+
const w = d.current;
|
|
884
|
+
if (!(!m || !V || !r || !w || u.state.transitionStatus === "ending")) {
|
|
885
|
+
if (!b) {
|
|
886
|
+
I.current = !0, p.request(v), w.style.removeProperty("--transform-origin");
|
|
887
|
+
return;
|
|
690
888
|
}
|
|
889
|
+
queueMicrotask(() => {
|
|
890
|
+
const J = ho(w);
|
|
891
|
+
w.style.removeProperty("--transform-origin");
|
|
892
|
+
try {
|
|
893
|
+
const ae = getComputedStyle(r), _ = getComputedStyle(w), xe = dt(V), ye = Tt(r), H = go(V), X = tt(V.getBoundingClientRect(), H), Z = tt(r.getBoundingClientRect(), H), G = X.left, ne = X.height, Q = M || w, g = Q.scrollHeight, Me = parseFloat(_.borderBottomWidth), Ie = parseFloat(ae.marginTop) || 10, we = parseFloat(ae.marginBottom) || 10, De = parseFloat(ae.minHeight) || 100, He = Nt(_), ee = 5, de = 5, le = 20, fe = xe.documentElement.clientHeight - Ie - we, We = xe.documentElement.clientWidth, Ue = fe - X.bottom + ne, qe = S.current, Re = T.current;
|
|
894
|
+
let Ne, Ke = 0, Je = 0;
|
|
895
|
+
if (qe && Re) {
|
|
896
|
+
const D = tt(Re.getBoundingClientRect(), H);
|
|
897
|
+
Ne = tt(qe.getBoundingClientRect(), H);
|
|
898
|
+
const pe = D.left - G, he = Ne.left - Z.left, me = D.top - X.top + D.height / 2, Oe = Ne.top - Z.top + Ne.height / 2;
|
|
899
|
+
Ke = pe - he, Je = Oe - me;
|
|
900
|
+
}
|
|
901
|
+
const Ye = Ue + Je + we + Me;
|
|
902
|
+
let ve = Math.min(fe, Ye);
|
|
903
|
+
const Ge = fe - Ie - we, Be = Ye - ve, Fe = Math.max(ee, G + Ke), rt = We - de, st = Math.max(0, Fe + Z.width - rt);
|
|
904
|
+
r.style.left = `${Fe - st}px`, r.style.height = `${ve}px`, r.style.maxHeight = "auto", r.style.marginTop = `${Ie}px`, r.style.marginBottom = `${we}px`, w.style.height = "100%";
|
|
905
|
+
const Ze = et(Q), $e = Be >= Ze - Ae;
|
|
906
|
+
$e && (ve = Math.min(fe, Z.height) - (Be - Ze));
|
|
907
|
+
const lt = X.top < le || X.bottom > fe - le || Math.ceil(ve) + Ae < Math.min(g, De), E = (ye.visualViewport?.scale ?? 1) !== 1 && Yn;
|
|
908
|
+
if (lt || E) {
|
|
909
|
+
I.current = !0, nt(r, re.current), Wn.flushSync(() => q(!1));
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
912
|
+
if ($e) {
|
|
913
|
+
const D = Math.max(0, fe - Ye);
|
|
914
|
+
r.style.top = Z.height >= Ge ? "0" : `${D}px`, r.style.height = `${ve}px`, Q.scrollTop = et(Q), O.current = Math.max(De, ve);
|
|
915
|
+
} else
|
|
916
|
+
r.style.bottom = "0", O.current = Math.max(De, ve), Q.scrollTop = Be;
|
|
917
|
+
if (Ne) {
|
|
918
|
+
const D = Z.top, pe = Z.height, he = Ne.top + Ne.height / 2, me = pe > 0 ? (he - D) / pe * 100 : 50, Oe = at(me, 0, 100);
|
|
919
|
+
w.style.setProperty("--transform-origin", `50% ${Oe}%`);
|
|
920
|
+
}
|
|
921
|
+
(O.current === fe || ve >= He) && (i.current = !0), v(), setTimeout(() => {
|
|
922
|
+
I.current = !0;
|
|
923
|
+
});
|
|
924
|
+
} finally {
|
|
925
|
+
J();
|
|
926
|
+
}
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
}, [u, m, r, V, T, S, d, v, b, q, p, ge, oe, M]), n.useEffect(() => {
|
|
930
|
+
if (!b || !r || !m)
|
|
931
|
+
return;
|
|
932
|
+
const w = Tt(r);
|
|
933
|
+
function J(ae) {
|
|
934
|
+
N(!1, Ve(Nn, ae));
|
|
935
|
+
}
|
|
936
|
+
return w.addEventListener("resize", J), () => {
|
|
937
|
+
w.removeEventListener("resize", J);
|
|
938
|
+
};
|
|
939
|
+
}, [N, b, r, m]);
|
|
940
|
+
const ue = {
|
|
941
|
+
...M ? {
|
|
942
|
+
role: "presentation",
|
|
943
|
+
"aria-orientation": void 0
|
|
944
|
+
} : {
|
|
945
|
+
role: "listbox",
|
|
946
|
+
"aria-multiselectable": te || void 0,
|
|
947
|
+
id: `${j}-list`
|
|
948
|
+
},
|
|
949
|
+
onKeyDown(w) {
|
|
950
|
+
B.current = !0, k && jn.has(w.key) && w.stopPropagation();
|
|
951
|
+
},
|
|
952
|
+
onMouseMove() {
|
|
953
|
+
B.current = !1;
|
|
954
|
+
},
|
|
955
|
+
onPointerLeave(w) {
|
|
956
|
+
if (!C || Xt(w) || w.pointerType === "touch")
|
|
957
|
+
return;
|
|
958
|
+
const J = w.currentTarget;
|
|
959
|
+
Y.start(0, () => {
|
|
960
|
+
u.set("activeIndex", null), J.focus({
|
|
961
|
+
preventScroll: !0
|
|
962
|
+
});
|
|
963
|
+
});
|
|
964
|
+
},
|
|
965
|
+
onScroll(w) {
|
|
966
|
+
M || L(w.currentTarget);
|
|
967
|
+
},
|
|
968
|
+
...b && {
|
|
969
|
+
style: M ? {
|
|
970
|
+
height: "100%"
|
|
971
|
+
} : $t
|
|
691
972
|
}
|
|
692
|
-
|
|
973
|
+
}, Te = be("div", t, {
|
|
974
|
+
ref: [o, d],
|
|
975
|
+
state: se,
|
|
976
|
+
stateAttributesMapping: mo,
|
|
977
|
+
props: [W, ue, Ut(F), {
|
|
978
|
+
className: !M && b ? ft.className : void 0
|
|
979
|
+
}, c]
|
|
980
|
+
});
|
|
981
|
+
return /* @__PURE__ */ ze(n.Fragment, {
|
|
982
|
+
children: [!z && ft.getElement(ie), /* @__PURE__ */ R(On, {
|
|
983
|
+
context: K,
|
|
984
|
+
modal: !1,
|
|
985
|
+
disabled: !ce,
|
|
986
|
+
returnFocus: l,
|
|
987
|
+
restoreFocus: !0,
|
|
988
|
+
children: Te
|
|
989
|
+
})]
|
|
990
|
+
});
|
|
693
991
|
});
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
const
|
|
697
|
-
return
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
992
|
+
process.env.NODE_ENV !== "production" && (Kt.displayName = "SelectPopup");
|
|
993
|
+
function Nt(e) {
|
|
994
|
+
const t = e.maxHeight || "";
|
|
995
|
+
return t.endsWith("px") && parseFloat(t) || 1 / 0;
|
|
996
|
+
}
|
|
997
|
+
function et(e) {
|
|
998
|
+
return Math.max(0, e.scrollHeight - e.clientHeight);
|
|
999
|
+
}
|
|
1000
|
+
function go(e) {
|
|
1001
|
+
return Un.getScale(e);
|
|
1002
|
+
}
|
|
1003
|
+
function tt(e, t) {
|
|
1004
|
+
return qn({
|
|
1005
|
+
x: e.x / t.x,
|
|
1006
|
+
y: e.y / t.y,
|
|
1007
|
+
width: e.width / t.x,
|
|
1008
|
+
height: e.height / t.y
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
const At = [["transform", "none"], ["scale", "1"], ["translate", "0 0"]];
|
|
1012
|
+
function ho(e) {
|
|
1013
|
+
const {
|
|
1014
|
+
style: t
|
|
1015
|
+
} = e, o = {};
|
|
1016
|
+
for (const [s, x] of At)
|
|
1017
|
+
o[s] = t.getPropertyValue(s), t.setProperty(s, x, "important");
|
|
1018
|
+
return () => {
|
|
1019
|
+
for (const [s] of At) {
|
|
1020
|
+
const x = o[s];
|
|
1021
|
+
x ? t.setProperty(s, x) : t.removeProperty(s);
|
|
705
1022
|
}
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
const Jt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1026
|
+
const {
|
|
1027
|
+
className: s,
|
|
1028
|
+
render: x,
|
|
1029
|
+
...l
|
|
1030
|
+
} = t, {
|
|
1031
|
+
store: c,
|
|
1032
|
+
scrollHandlerRef: u
|
|
1033
|
+
} = Ee(), {
|
|
1034
|
+
alignItemWithTriggerActive: d
|
|
1035
|
+
} = xt(), U = f(c, a.hasScrollArrows), N = f(c, a.openMethod), T = f(c, a.multiple), B = {
|
|
1036
|
+
id: `${f(c, a.id)}-list`,
|
|
1037
|
+
role: "listbox",
|
|
1038
|
+
"aria-multiselectable": T || void 0,
|
|
1039
|
+
onScroll(v) {
|
|
1040
|
+
u.current?.(v.currentTarget);
|
|
1041
|
+
},
|
|
1042
|
+
...d && {
|
|
1043
|
+
style: $t
|
|
1044
|
+
},
|
|
1045
|
+
className: U && N !== "touch" ? ft.className : void 0
|
|
1046
|
+
}, te = Ce((v) => {
|
|
1047
|
+
c.set("listElement", v);
|
|
1048
|
+
});
|
|
1049
|
+
return be("div", t, {
|
|
1050
|
+
ref: [o, te],
|
|
1051
|
+
props: [B, l]
|
|
1052
|
+
});
|
|
1053
|
+
});
|
|
1054
|
+
process.env.NODE_ENV !== "production" && (Jt.displayName = "SelectList");
|
|
1055
|
+
const vt = /* @__PURE__ */ n.createContext(void 0);
|
|
1056
|
+
process.env.NODE_ENV !== "production" && (vt.displayName = "SelectItemContext");
|
|
1057
|
+
function yt() {
|
|
1058
|
+
const e = n.useContext(vt);
|
|
1059
|
+
if (!e)
|
|
1060
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>." : Xe(57));
|
|
1061
|
+
return e;
|
|
1062
|
+
}
|
|
1063
|
+
const Zt = /* @__PURE__ */ n.memo(/* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1064
|
+
const {
|
|
1065
|
+
render: s,
|
|
1066
|
+
className: x,
|
|
1067
|
+
value: l = null,
|
|
1068
|
+
label: c,
|
|
1069
|
+
disabled: u = !1,
|
|
1070
|
+
nativeButton: d = !1,
|
|
1071
|
+
...U
|
|
1072
|
+
} = t, N = n.useRef(null), T = Kn({
|
|
1073
|
+
label: c,
|
|
1074
|
+
textRef: N,
|
|
1075
|
+
indexGuessBehavior: Jn.GuessFromOrder
|
|
1076
|
+
}), {
|
|
1077
|
+
store: S,
|
|
1078
|
+
getItemProps: B,
|
|
1079
|
+
setOpen: te,
|
|
1080
|
+
setValue: v,
|
|
1081
|
+
selectionRef: $,
|
|
1082
|
+
typingRef: C,
|
|
1083
|
+
valuesRef: y,
|
|
1084
|
+
keyboardActiveRef: h,
|
|
1085
|
+
multiple: b,
|
|
1086
|
+
highlightItemOnHover: q
|
|
1087
|
+
} = Ee(), ge = Le(), oe = f(S, a.isActive, T.index), k = f(S, a.isSelected, T.index, l), K = f(S, a.isSelectedByFocus, T.index), ie = f(S, a.isItemEqualToValue), z = T.index, Y = z !== -1, j = n.useRef(null), m = pt(z);
|
|
1088
|
+
Se(() => {
|
|
1089
|
+
if (!Y)
|
|
1090
|
+
return;
|
|
1091
|
+
const p = y.current;
|
|
1092
|
+
return p[z] = l, () => {
|
|
1093
|
+
delete p[z];
|
|
1094
|
+
};
|
|
1095
|
+
}, [Y, z, l, y]), Se(() => {
|
|
1096
|
+
if (!Y)
|
|
1097
|
+
return;
|
|
1098
|
+
const p = S.state.value;
|
|
1099
|
+
let L = p;
|
|
1100
|
+
b && Array.isArray(p) && p.length > 0 && (L = p[p.length - 1]), L !== void 0 && ke(l, L, ie) && S.set("selectedIndex", z);
|
|
1101
|
+
}, [Y, z, b, ie, S, l]);
|
|
1102
|
+
const ce = {
|
|
1103
|
+
disabled: u,
|
|
1104
|
+
selected: k,
|
|
1105
|
+
highlighted: oe
|
|
1106
|
+
}, W = B({
|
|
1107
|
+
active: oe,
|
|
1108
|
+
selected: k
|
|
1109
|
+
});
|
|
1110
|
+
W.onFocus = void 0, W.id = void 0;
|
|
1111
|
+
const F = n.useRef(null), V = n.useRef("mouse"), r = n.useRef(!1), {
|
|
1112
|
+
getButtonProps: M,
|
|
1113
|
+
buttonRef: O
|
|
1114
|
+
} = Bt({
|
|
1115
|
+
disabled: u,
|
|
1116
|
+
focusableWhenDisabled: !0,
|
|
1117
|
+
native: d,
|
|
1118
|
+
composite: !0
|
|
1119
|
+
});
|
|
1120
|
+
function i(p) {
|
|
1121
|
+
const L = S.state.value;
|
|
1122
|
+
if (b) {
|
|
1123
|
+
const se = Array.isArray(L) ? L : [], ue = k ? ro(se, l, ie) : [...se, l];
|
|
1124
|
+
v(ue, Ve(it, p));
|
|
1125
|
+
} else
|
|
1126
|
+
v(l, Ve(it, p)), te(!1, Ve(it, p));
|
|
1127
|
+
}
|
|
1128
|
+
const P = {
|
|
1129
|
+
role: "option",
|
|
1130
|
+
"aria-selected": k,
|
|
1131
|
+
tabIndex: oe ? 0 : -1,
|
|
1132
|
+
onFocus() {
|
|
1133
|
+
S.set("activeIndex", z);
|
|
1134
|
+
},
|
|
1135
|
+
onMouseEnter() {
|
|
1136
|
+
!h.current && S.state.selectedIndex === null && q && S.set("activeIndex", z);
|
|
1137
|
+
},
|
|
1138
|
+
onMouseMove() {
|
|
1139
|
+
q && S.set("activeIndex", z);
|
|
1140
|
+
},
|
|
1141
|
+
onMouseLeave(p) {
|
|
1142
|
+
!q || h.current || Xt(p) || ge.start(0, () => {
|
|
1143
|
+
S.state.activeIndex === z && S.set("activeIndex", null);
|
|
1144
|
+
});
|
|
1145
|
+
},
|
|
1146
|
+
onTouchStart() {
|
|
1147
|
+
$.current = {
|
|
1148
|
+
allowSelectedMouseUp: !1,
|
|
1149
|
+
allowUnselectedMouseUp: !1
|
|
1150
|
+
};
|
|
1151
|
+
},
|
|
1152
|
+
onKeyDown(p) {
|
|
1153
|
+
F.current = p.key, S.set("activeIndex", z), p.key === " " && C.current && p.preventDefault();
|
|
1154
|
+
},
|
|
1155
|
+
onClick(p) {
|
|
1156
|
+
r.current = !1, !(p.type === "keydown" && F.current === null) && (u || p.type === "keydown" && F.current === " " && C.current || V.current !== "touch" && !oe || (F.current = null, i(p.nativeEvent)));
|
|
1157
|
+
},
|
|
1158
|
+
onPointerEnter(p) {
|
|
1159
|
+
V.current = p.pointerType;
|
|
1160
|
+
},
|
|
1161
|
+
onPointerDown(p) {
|
|
1162
|
+
V.current = p.pointerType, r.current = !0;
|
|
1163
|
+
},
|
|
1164
|
+
onMouseUp() {
|
|
1165
|
+
if (u)
|
|
1166
|
+
return;
|
|
1167
|
+
if (r.current) {
|
|
1168
|
+
r.current = !1;
|
|
1169
|
+
return;
|
|
714
1170
|
}
|
|
1171
|
+
const p = !$.current.allowSelectedMouseUp && k, L = !$.current.allowUnselectedMouseUp && !k;
|
|
1172
|
+
p || L || V.current !== "touch" && !oe || j.current?.click();
|
|
715
1173
|
}
|
|
716
|
-
|
|
1174
|
+
}, I = be("div", t, {
|
|
1175
|
+
ref: [O, o, T.ref, j],
|
|
1176
|
+
state: ce,
|
|
1177
|
+
props: [W, P, U, M]
|
|
1178
|
+
}), re = n.useMemo(() => ({
|
|
1179
|
+
selected: k,
|
|
1180
|
+
indexRef: m,
|
|
1181
|
+
textRef: N,
|
|
1182
|
+
selectedByFocus: K,
|
|
1183
|
+
hasRegistered: Y
|
|
1184
|
+
}), [k, m, N, K, Y]);
|
|
1185
|
+
return /* @__PURE__ */ R(vt.Provider, {
|
|
1186
|
+
value: re,
|
|
1187
|
+
children: I
|
|
1188
|
+
});
|
|
1189
|
+
}));
|
|
1190
|
+
process.env.NODE_ENV !== "production" && (Zt.displayName = "SelectItem");
|
|
1191
|
+
const Qt = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1192
|
+
const s = t.keepMounted ?? !1, {
|
|
1193
|
+
selected: x
|
|
1194
|
+
} = yt();
|
|
1195
|
+
return s || x ? /* @__PURE__ */ R(en, {
|
|
1196
|
+
...t,
|
|
1197
|
+
ref: o
|
|
1198
|
+
}) : null;
|
|
717
1199
|
});
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
const {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
|
|
1200
|
+
process.env.NODE_ENV !== "production" && (Qt.displayName = "SelectItemIndicator");
|
|
1201
|
+
const en = /* @__PURE__ */ n.memo(/* @__PURE__ */ n.forwardRef((e, t) => {
|
|
1202
|
+
const {
|
|
1203
|
+
render: o,
|
|
1204
|
+
className: s,
|
|
1205
|
+
keepMounted: x,
|
|
1206
|
+
...l
|
|
1207
|
+
} = e, {
|
|
1208
|
+
selected: c
|
|
1209
|
+
} = yt(), u = n.useRef(null), {
|
|
1210
|
+
transitionStatus: d,
|
|
1211
|
+
setMounted: U
|
|
1212
|
+
} = mt(c), T = be("span", e, {
|
|
1213
|
+
ref: [t, u],
|
|
1214
|
+
state: {
|
|
1215
|
+
selected: c,
|
|
1216
|
+
transitionStatus: d
|
|
1217
|
+
},
|
|
1218
|
+
props: [{
|
|
728
1219
|
"aria-hidden": !0,
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
onPointerLeave: P(l.onPointerLeave, () => {
|
|
739
|
-
i();
|
|
740
|
-
})
|
|
1220
|
+
children: "✔️"
|
|
1221
|
+
}, l],
|
|
1222
|
+
stateAttributesMapping: Lt
|
|
1223
|
+
});
|
|
1224
|
+
return ot({
|
|
1225
|
+
open: c,
|
|
1226
|
+
ref: u,
|
|
1227
|
+
onComplete() {
|
|
1228
|
+
c || U(!1);
|
|
741
1229
|
}
|
|
742
|
-
);
|
|
743
|
-
})
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
(
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
1230
|
+
}), T;
|
|
1231
|
+
}));
|
|
1232
|
+
process.env.NODE_ENV !== "production" && (en.displayName = "Inner");
|
|
1233
|
+
const tn = /* @__PURE__ */ n.memo(/* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1234
|
+
const {
|
|
1235
|
+
indexRef: s,
|
|
1236
|
+
textRef: x,
|
|
1237
|
+
selectedByFocus: l,
|
|
1238
|
+
hasRegistered: c
|
|
1239
|
+
} = yt(), {
|
|
1240
|
+
selectedItemTextRef: u
|
|
1241
|
+
} = Ee(), {
|
|
1242
|
+
className: d,
|
|
1243
|
+
render: U,
|
|
1244
|
+
...N
|
|
1245
|
+
} = t, T = n.useCallback((B) => {
|
|
1246
|
+
if (!B || !c)
|
|
1247
|
+
return;
|
|
1248
|
+
const te = u.current === null || !u.current.isConnected;
|
|
1249
|
+
(l || te && s.current === 0) && (u.current = B);
|
|
1250
|
+
}, [u, s, l, c]);
|
|
1251
|
+
return be("div", t, {
|
|
1252
|
+
ref: [T, o, x],
|
|
1253
|
+
props: N
|
|
1254
|
+
});
|
|
1255
|
+
}));
|
|
1256
|
+
process.env.NODE_ENV !== "production" && (tn.displayName = "SelectItemText");
|
|
1257
|
+
const It = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1258
|
+
const {
|
|
1259
|
+
render: s,
|
|
1260
|
+
className: x,
|
|
1261
|
+
direction: l,
|
|
1262
|
+
keepMounted: c = !1,
|
|
1263
|
+
...u
|
|
1264
|
+
} = t, {
|
|
1265
|
+
store: d,
|
|
1266
|
+
popupRef: U,
|
|
1267
|
+
listRef: N,
|
|
1268
|
+
handleScrollArrowVisibility: T,
|
|
1269
|
+
scrollArrowsMountedCountRef: S
|
|
1270
|
+
} = Ee(), {
|
|
1271
|
+
side: B,
|
|
1272
|
+
scrollDownArrowRef: te,
|
|
1273
|
+
scrollUpArrowRef: v
|
|
1274
|
+
} = xt(), $ = l === "up" ? a.scrollUpArrowVisible : a.scrollDownArrowVisible, C = f(d, $), y = f(d, a.openMethod), h = C && y !== "touch", b = Le(), q = l === "up" ? v : te, {
|
|
1275
|
+
transitionStatus: ge,
|
|
1276
|
+
setMounted: oe
|
|
1277
|
+
} = mt(h);
|
|
1278
|
+
Se(() => (S.current += 1, d.state.hasScrollArrows || d.set("hasScrollArrows", !0), () => {
|
|
1279
|
+
S.current = Math.max(0, S.current - 1), S.current === 0 && d.state.hasScrollArrows && d.set("hasScrollArrows", !1);
|
|
1280
|
+
}), [d, S]), ot({
|
|
1281
|
+
open: h,
|
|
1282
|
+
ref: q,
|
|
1283
|
+
onComplete() {
|
|
1284
|
+
h || oe(!1);
|
|
1285
|
+
}
|
|
1286
|
+
});
|
|
1287
|
+
const ie = be("div", t, {
|
|
1288
|
+
ref: [o, q],
|
|
1289
|
+
state: {
|
|
1290
|
+
direction: l,
|
|
1291
|
+
visible: h,
|
|
1292
|
+
side: B,
|
|
1293
|
+
transitionStatus: ge
|
|
793
1294
|
},
|
|
794
|
-
[
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
1295
|
+
props: [{
|
|
1296
|
+
"aria-hidden": !0,
|
|
1297
|
+
children: l === "up" ? "▲" : "▼",
|
|
1298
|
+
style: {
|
|
1299
|
+
position: "absolute"
|
|
1300
|
+
},
|
|
1301
|
+
onMouseMove(Y) {
|
|
1302
|
+
if (Y.movementX === 0 && Y.movementY === 0 || b.isStarted())
|
|
1303
|
+
return;
|
|
1304
|
+
d.set("activeIndex", null);
|
|
1305
|
+
function j() {
|
|
1306
|
+
const m = d.state.listElement ?? U.current;
|
|
1307
|
+
if (!m)
|
|
1308
|
+
return;
|
|
1309
|
+
d.set("activeIndex", null), T();
|
|
1310
|
+
const ce = m.scrollTop === 0, W = Math.round(m.scrollTop + m.clientHeight) >= m.scrollHeight;
|
|
1311
|
+
if (N.current.length === 0 && (l === "up" ? d.set("scrollUpArrowVisible", !ce) : d.set("scrollDownArrowVisible", !W)), l === "up" && ce || l === "down" && W) {
|
|
1312
|
+
b.clear();
|
|
1313
|
+
return;
|
|
1314
|
+
}
|
|
1315
|
+
if ((d.state.listElement || U.current) && N.current && N.current.length > 0) {
|
|
1316
|
+
const V = N.current, r = q.current?.offsetHeight || 0;
|
|
1317
|
+
if (l === "up") {
|
|
1318
|
+
let M = 0;
|
|
1319
|
+
const O = m.scrollTop + r;
|
|
1320
|
+
for (let P = 0; P < V.length; P += 1) {
|
|
1321
|
+
const I = V[P];
|
|
1322
|
+
if (I && I.offsetTop >= O) {
|
|
1323
|
+
M = P;
|
|
1324
|
+
break;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
const i = Math.max(0, M - 1);
|
|
1328
|
+
if (i < M) {
|
|
1329
|
+
const P = V[i];
|
|
1330
|
+
P && (m.scrollTop = Math.max(0, P.offsetTop - r));
|
|
1331
|
+
} else
|
|
1332
|
+
m.scrollTop = 0;
|
|
1333
|
+
} else {
|
|
1334
|
+
let M = V.length - 1;
|
|
1335
|
+
const O = m.scrollTop + m.clientHeight - r;
|
|
1336
|
+
for (let P = 0; P < V.length; P += 1) {
|
|
1337
|
+
const I = V[P];
|
|
1338
|
+
if (I && I.offsetTop + I.offsetHeight > O) {
|
|
1339
|
+
M = Math.max(0, P - 1);
|
|
1340
|
+
break;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
const i = Math.min(V.length - 1, M + 1);
|
|
1344
|
+
if (i > M) {
|
|
1345
|
+
const P = V[i];
|
|
1346
|
+
P && (m.scrollTop = P.offsetTop + P.offsetHeight - m.clientHeight + r);
|
|
1347
|
+
} else
|
|
1348
|
+
m.scrollTop = m.scrollHeight - m.clientHeight;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
b.start(40, j);
|
|
1352
|
+
}
|
|
1353
|
+
b.start(40, j);
|
|
1354
|
+
},
|
|
1355
|
+
onMouseLeave() {
|
|
1356
|
+
b.clear();
|
|
1357
|
+
}
|
|
1358
|
+
}, u]
|
|
1359
|
+
});
|
|
1360
|
+
return h || c ? ie : null;
|
|
1361
|
+
});
|
|
1362
|
+
process.env.NODE_ENV !== "production" && (It.displayName = "SelectScrollArrow");
|
|
1363
|
+
const nn = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1364
|
+
return /* @__PURE__ */ R(It, {
|
|
1365
|
+
...t,
|
|
1366
|
+
ref: o,
|
|
1367
|
+
direction: "down"
|
|
1368
|
+
});
|
|
1369
|
+
});
|
|
1370
|
+
process.env.NODE_ENV !== "production" && (nn.displayName = "SelectScrollDownArrow");
|
|
1371
|
+
const on = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1372
|
+
return /* @__PURE__ */ R(It, {
|
|
1373
|
+
...t,
|
|
1374
|
+
ref: o,
|
|
1375
|
+
direction: "up"
|
|
1376
|
+
});
|
|
1377
|
+
});
|
|
1378
|
+
process.env.NODE_ENV !== "production" && (on.displayName = "SelectScrollUpArrow");
|
|
1379
|
+
const wt = /* @__PURE__ */ n.createContext(void 0);
|
|
1380
|
+
process.env.NODE_ENV !== "production" && (wt.displayName = "SelectGroupContext");
|
|
1381
|
+
function So() {
|
|
1382
|
+
const e = n.useContext(wt);
|
|
1383
|
+
if (e === void 0)
|
|
1384
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>." : Xe(56));
|
|
1385
|
+
return e;
|
|
822
1386
|
}
|
|
823
|
-
function
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1387
|
+
const rn = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1388
|
+
const {
|
|
1389
|
+
className: s,
|
|
1390
|
+
render: x,
|
|
1391
|
+
...l
|
|
1392
|
+
} = t, [c, u] = n.useState(), d = n.useMemo(() => ({
|
|
1393
|
+
labelId: c,
|
|
1394
|
+
setLabelId: u
|
|
1395
|
+
}), [c, u]), U = be("div", t, {
|
|
1396
|
+
ref: o,
|
|
1397
|
+
props: [{
|
|
1398
|
+
role: "group",
|
|
1399
|
+
"aria-labelledby": c
|
|
1400
|
+
}, l]
|
|
1401
|
+
});
|
|
1402
|
+
return /* @__PURE__ */ R(wt.Provider, {
|
|
1403
|
+
value: d,
|
|
1404
|
+
children: U
|
|
1405
|
+
});
|
|
1406
|
+
});
|
|
1407
|
+
process.env.NODE_ENV !== "production" && (rn.displayName = "SelectGroup");
|
|
1408
|
+
const sn = /* @__PURE__ */ n.forwardRef(function(t, o) {
|
|
1409
|
+
const {
|
|
1410
|
+
className: s,
|
|
1411
|
+
render: x,
|
|
1412
|
+
id: l,
|
|
1413
|
+
...c
|
|
1414
|
+
} = t, {
|
|
1415
|
+
setLabelId: u
|
|
1416
|
+
} = So(), d = Zn(l);
|
|
1417
|
+
return Se(() => {
|
|
1418
|
+
u(d);
|
|
1419
|
+
}, [d, u]), be("div", t, {
|
|
1420
|
+
ref: o,
|
|
1421
|
+
props: [{
|
|
1422
|
+
id: d
|
|
1423
|
+
}, c]
|
|
1424
|
+
});
|
|
1425
|
+
});
|
|
1426
|
+
process.env.NODE_ENV !== "production" && (sn.displayName = "SelectGroupLabel");
|
|
1427
|
+
const sr = ao;
|
|
1428
|
+
function lr({ className: e, ...t }) {
|
|
1429
|
+
return /* @__PURE__ */ R(
|
|
1430
|
+
rn,
|
|
1431
|
+
{
|
|
1432
|
+
className: Pe("scroll-my-1 p-1", e),
|
|
1433
|
+
"data-slot": "select-group",
|
|
1434
|
+
...t
|
|
1435
|
+
}
|
|
1436
|
+
);
|
|
827
1437
|
}
|
|
828
|
-
function
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
children: e,
|
|
832
|
-
...c
|
|
833
|
-
}) {
|
|
834
|
-
return /* @__PURE__ */ Q(
|
|
835
|
-
jt,
|
|
1438
|
+
function ir({ className: e, ...t }) {
|
|
1439
|
+
return /* @__PURE__ */ R(
|
|
1440
|
+
Wt,
|
|
836
1441
|
{
|
|
837
|
-
className:
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
),
|
|
841
|
-
"data-size": o,
|
|
842
|
-
"data-slot": "select-trigger",
|
|
843
|
-
...c,
|
|
844
|
-
children: [
|
|
845
|
-
e,
|
|
846
|
-
/* @__PURE__ */ s(qt, { asChild: !0, children: /* @__PURE__ */ s(_e, { className: "size-4 opacity-50" }) })
|
|
847
|
-
]
|
|
1442
|
+
className: Pe("flex flex-1 text-left", e),
|
|
1443
|
+
"data-slot": "select-value",
|
|
1444
|
+
...t
|
|
848
1445
|
}
|
|
849
1446
|
);
|
|
850
1447
|
}
|
|
851
|
-
function
|
|
852
|
-
className:
|
|
1448
|
+
function ar({
|
|
1449
|
+
className: e,
|
|
1450
|
+
size: t = "default",
|
|
853
1451
|
children: o,
|
|
854
|
-
|
|
855
|
-
...c
|
|
1452
|
+
...s
|
|
856
1453
|
}) {
|
|
857
|
-
return /* @__PURE__ */
|
|
858
|
-
|
|
1454
|
+
return /* @__PURE__ */ ze(
|
|
1455
|
+
zt,
|
|
859
1456
|
{
|
|
860
|
-
className:
|
|
861
|
-
"
|
|
862
|
-
e
|
|
863
|
-
t
|
|
1457
|
+
className: Pe(
|
|
1458
|
+
"flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
1459
|
+
e
|
|
864
1460
|
),
|
|
865
|
-
"data-
|
|
866
|
-
|
|
867
|
-
...
|
|
1461
|
+
"data-size": t,
|
|
1462
|
+
"data-slot": "select-trigger",
|
|
1463
|
+
...s,
|
|
868
1464
|
children: [
|
|
869
|
-
|
|
870
|
-
/* @__PURE__ */
|
|
871
|
-
|
|
1465
|
+
o,
|
|
1466
|
+
/* @__PURE__ */ R(
|
|
1467
|
+
qt,
|
|
872
1468
|
{
|
|
873
|
-
className:
|
|
874
|
-
"p-1",
|
|
875
|
-
e === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
876
|
-
),
|
|
877
|
-
children: o
|
|
1469
|
+
render: /* @__PURE__ */ R(Ct, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
878
1470
|
}
|
|
879
|
-
)
|
|
880
|
-
/* @__PURE__ */ s(co, {})
|
|
1471
|
+
)
|
|
881
1472
|
]
|
|
882
1473
|
}
|
|
1474
|
+
);
|
|
1475
|
+
}
|
|
1476
|
+
function cr({
|
|
1477
|
+
className: e,
|
|
1478
|
+
children: t,
|
|
1479
|
+
side: o = "bottom",
|
|
1480
|
+
sideOffset: s = 4,
|
|
1481
|
+
align: x = "center",
|
|
1482
|
+
alignOffset: l = 0,
|
|
1483
|
+
alignItemWithTrigger: c = !1,
|
|
1484
|
+
...u
|
|
1485
|
+
}) {
|
|
1486
|
+
return /* @__PURE__ */ R(Gt, { children: /* @__PURE__ */ R(
|
|
1487
|
+
jt,
|
|
1488
|
+
{
|
|
1489
|
+
align: x,
|
|
1490
|
+
alignItemWithTrigger: c,
|
|
1491
|
+
alignOffset: l,
|
|
1492
|
+
className: "isolate z-50",
|
|
1493
|
+
side: o,
|
|
1494
|
+
sideOffset: s,
|
|
1495
|
+
children: /* @__PURE__ */ ze(
|
|
1496
|
+
Kt,
|
|
1497
|
+
{
|
|
1498
|
+
className: Pe(
|
|
1499
|
+
"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 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-y-auto overflow-x-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-closed:animate-out data-open:animate-in",
|
|
1500
|
+
e
|
|
1501
|
+
),
|
|
1502
|
+
"data-align-trigger": c,
|
|
1503
|
+
"data-slot": "select-content",
|
|
1504
|
+
...u,
|
|
1505
|
+
children: [
|
|
1506
|
+
/* @__PURE__ */ R(bo, {}),
|
|
1507
|
+
/* @__PURE__ */ R(Jt, { children: t }),
|
|
1508
|
+
/* @__PURE__ */ R(xo, {})
|
|
1509
|
+
]
|
|
1510
|
+
}
|
|
1511
|
+
)
|
|
1512
|
+
}
|
|
883
1513
|
) });
|
|
884
1514
|
}
|
|
885
|
-
function
|
|
886
|
-
className:
|
|
887
|
-
...
|
|
1515
|
+
function ur({
|
|
1516
|
+
className: e,
|
|
1517
|
+
...t
|
|
888
1518
|
}) {
|
|
889
|
-
return /* @__PURE__ */
|
|
890
|
-
|
|
1519
|
+
return /* @__PURE__ */ R(
|
|
1520
|
+
sn,
|
|
891
1521
|
{
|
|
892
|
-
className:
|
|
1522
|
+
className: Pe("px-2 py-1.5 text-muted-foreground text-xs", e),
|
|
893
1523
|
"data-slot": "select-label",
|
|
894
|
-
...
|
|
1524
|
+
...t
|
|
895
1525
|
}
|
|
896
1526
|
);
|
|
897
1527
|
}
|
|
898
|
-
function
|
|
899
|
-
className:
|
|
900
|
-
children:
|
|
901
|
-
...
|
|
1528
|
+
function dr({
|
|
1529
|
+
className: e,
|
|
1530
|
+
children: t,
|
|
1531
|
+
...o
|
|
902
1532
|
}) {
|
|
903
|
-
return /* @__PURE__ */
|
|
904
|
-
|
|
1533
|
+
return /* @__PURE__ */ ze(
|
|
1534
|
+
Zt,
|
|
905
1535
|
{
|
|
906
|
-
className:
|
|
907
|
-
"relative flex w-full 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 data-[
|
|
908
|
-
|
|
1536
|
+
className: Pe(
|
|
1537
|
+
"relative flex w-full 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 not-data-[variant=destructive]: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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1538
|
+
e
|
|
909
1539
|
),
|
|
910
1540
|
"data-slot": "select-item",
|
|
911
|
-
...
|
|
1541
|
+
...o,
|
|
912
1542
|
children: [
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */
|
|
1543
|
+
/* @__PURE__ */ R(tn, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children: t }),
|
|
1544
|
+
/* @__PURE__ */ R(
|
|
1545
|
+
Qt,
|
|
1546
|
+
{
|
|
1547
|
+
render: /* @__PURE__ */ R("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
1548
|
+
children: /* @__PURE__ */ R(ln, { className: "pointer-events-none" })
|
|
1549
|
+
}
|
|
1550
|
+
)
|
|
915
1551
|
]
|
|
916
1552
|
}
|
|
917
1553
|
);
|
|
918
1554
|
}
|
|
919
|
-
function
|
|
920
|
-
className:
|
|
921
|
-
...
|
|
1555
|
+
function fr({
|
|
1556
|
+
className: e,
|
|
1557
|
+
...t
|
|
922
1558
|
}) {
|
|
923
|
-
return /* @__PURE__ */
|
|
924
|
-
|
|
1559
|
+
return /* @__PURE__ */ R(
|
|
1560
|
+
Qn,
|
|
925
1561
|
{
|
|
926
|
-
className:
|
|
1562
|
+
className: Pe("pointer-events-none -mx-1 my-1 h-px bg-border", e),
|
|
927
1563
|
"data-slot": "select-separator",
|
|
928
|
-
...
|
|
1564
|
+
...t
|
|
929
1565
|
}
|
|
930
1566
|
);
|
|
931
1567
|
}
|
|
932
|
-
function
|
|
933
|
-
className:
|
|
934
|
-
...
|
|
1568
|
+
function bo({
|
|
1569
|
+
className: e,
|
|
1570
|
+
...t
|
|
935
1571
|
}) {
|
|
936
|
-
return /* @__PURE__ */
|
|
937
|
-
|
|
1572
|
+
return /* @__PURE__ */ R(
|
|
1573
|
+
on,
|
|
938
1574
|
{
|
|
939
|
-
className:
|
|
940
|
-
"flex cursor-default items-center justify-center py-1",
|
|
941
|
-
|
|
1575
|
+
className: Pe(
|
|
1576
|
+
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
1577
|
+
e
|
|
942
1578
|
),
|
|
943
1579
|
"data-slot": "select-scroll-up-button",
|
|
944
|
-
...
|
|
945
|
-
children: /* @__PURE__ */
|
|
1580
|
+
...t,
|
|
1581
|
+
children: /* @__PURE__ */ R(an, {})
|
|
946
1582
|
}
|
|
947
1583
|
);
|
|
948
1584
|
}
|
|
949
|
-
function
|
|
950
|
-
className:
|
|
951
|
-
...
|
|
1585
|
+
function xo({
|
|
1586
|
+
className: e,
|
|
1587
|
+
...t
|
|
952
1588
|
}) {
|
|
953
|
-
return /* @__PURE__ */
|
|
954
|
-
|
|
1589
|
+
return /* @__PURE__ */ R(
|
|
1590
|
+
nn,
|
|
955
1591
|
{
|
|
956
|
-
className:
|
|
957
|
-
"flex cursor-default items-center justify-center py-1",
|
|
958
|
-
|
|
1592
|
+
className: Pe(
|
|
1593
|
+
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
1594
|
+
e
|
|
959
1595
|
),
|
|
960
1596
|
"data-slot": "select-scroll-down-button",
|
|
961
|
-
...
|
|
962
|
-
children: /* @__PURE__ */
|
|
1597
|
+
...t,
|
|
1598
|
+
children: /* @__PURE__ */ R(Ct, {})
|
|
963
1599
|
}
|
|
964
1600
|
);
|
|
965
1601
|
}
|
|
966
1602
|
export {
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1603
|
+
sr as Select,
|
|
1604
|
+
cr as SelectContent,
|
|
1605
|
+
lr as SelectGroup,
|
|
1606
|
+
dr as SelectItem,
|
|
1607
|
+
ur as SelectLabel,
|
|
1608
|
+
xo as SelectScrollDownButton,
|
|
1609
|
+
bo as SelectScrollUpButton,
|
|
1610
|
+
fr as SelectSeparator,
|
|
1611
|
+
ar as SelectTrigger,
|
|
1612
|
+
ir as SelectValue
|
|
977
1613
|
};
|