@arcadeai/design-system 3.39.0 → 3.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CompositeItem-CniPsjzP.js +30 -0
- package/dist/CompositeList-yq5K_yj6.js +81 -0
- package/dist/CompositeRoot-Dy-5A-Je.js +206 -0
- package/dist/DialogRoot-DDokfJcO.js +57 -0
- package/dist/DialogTrigger-CFUE8YsM.js +402 -0
- package/dist/DirectionContext-BSOheMwC.js +10 -0
- package/dist/FieldItemContext-CF2fRwBC.js +12 -0
- package/dist/FloatingPortalLite-BHsRx4XN.js +29 -0
- package/dist/InternalBackdrop-BVEfe6O1.js +610 -0
- package/dist/LabelableContext-Dzw1DWuj.js +171 -0
- package/dist/Separator-CswSYAXX.js +25 -0
- package/dist/ToolbarRootContext-D7EsmJ5f.js +10 -0
- package/dist/andromeeda-B-gfN00q.js +4 -0
- package/dist/angular-html-dA1qUKRV.js +32 -0
- package/dist/angular-ts-CXyBC0vY.js +21 -0
- package/dist/apl-CjNiDgad.js +3 -3
- package/dist/assets/icons/telegram.js +10 -0
- package/dist/assets/images/arcade-grid.d.ts.map +1 -1
- package/dist/assets/images/arcade-grid.js +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/variables.css +1 -1
- package/dist/astro--3ZkKqYU.js +18 -0
- package/dist/astro-CFFExE8Q.js +5 -5
- package/dist/aurora-x-B56eICma.js +4 -0
- package/dist/ayu-dark-DJSOaKig.js +4 -0
- package/dist/ayu-light-BPfFt4v-.js +4 -0
- package/dist/ayu-mirage-DmPLRBj7.js +4 -0
- package/dist/blade-BoRuQEEj.js +20 -0
- package/dist/blade-D0HyNvCw.js +4 -4
- package/dist/c-C4SM8H98.js +6 -0
- package/dist/cairo-DM6WF2e3.js +1 -1
- package/dist/{calendar-DreAgQKY.js → calendar-CLEnvrbp.js} +483 -482
- package/dist/catppuccin-frappe-CA5k7W3u.js +4 -0
- package/dist/catppuccin-latte-CYfkUW5v.js +4 -0
- package/dist/catppuccin-macchiato-BOj_4I3g.js +4 -0
- package/dist/catppuccin-mocha-BXpUXme4.js +4 -0
- package/dist/clamp-BxE4ZAuA.js +17 -0
- package/dist/cobol-HihOMwht.js +1 -1
- package/dist/coffee-D8Swy5yR.js +8 -0
- package/dist/components/index.js +665 -644
- package/dist/components/ui/atoms/accordion.d.ts +9 -7
- package/dist/components/ui/atoms/accordion.d.ts.map +1 -1
- package/dist/components/ui/atoms/accordion.js +454 -243
- package/dist/components/ui/atoms/alert-dialog.d.ts +13 -9
- package/dist/components/ui/atoms/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert-dialog.js +149 -183
- package/dist/components/ui/atoms/alert.d.ts +2 -1
- package/dist/components/ui/atoms/alert.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert.js +36 -25
- package/dist/components/ui/atoms/avatar.d.ts +10 -5
- package/dist/components/ui/atoms/avatar.d.ts.map +1 -1
- package/dist/components/ui/atoms/avatar.js +198 -205
- package/dist/components/ui/atoms/badge.d.ts +4 -5
- package/dist/components/ui/atoms/badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/badge.js +31 -22
- package/dist/components/ui/atoms/breadcrumb.d.ts +4 -5
- package/dist/components/ui/atoms/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/atoms/breadcrumb.js +46 -29
- package/dist/components/ui/atoms/button.d.ts +4 -6
- package/dist/components/ui/atoms/button.d.ts.map +1 -1
- package/dist/components/ui/atoms/button.js +59 -28
- package/dist/components/ui/atoms/byoc-badge.d.ts +2 -2
- package/dist/components/ui/atoms/byoc-badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/byoc-badge.js +14 -8
- package/dist/components/ui/atoms/calendar.d.ts +6 -16
- package/dist/components/ui/atoms/calendar.d.ts.map +1 -1
- package/dist/components/ui/atoms/calendar.js +1 -1
- package/dist/components/ui/atoms/card.d.ts +4 -2
- package/dist/components/ui/atoms/card.d.ts.map +1 -1
- package/dist/components/ui/atoms/card.js +46 -35
- package/dist/components/ui/atoms/chart.d.ts +24 -48
- package/dist/components/ui/atoms/chart.d.ts.map +1 -1
- package/dist/components/ui/atoms/chart.js +179 -148
- package/dist/components/ui/atoms/checkbox.d.ts +2 -3
- package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
- package/dist/components/ui/atoms/checkbox.js +269 -249
- package/dist/components/ui/atoms/code-block.js +1 -1
- package/dist/components/ui/atoms/collapsible.d.ts +5 -5
- package/dist/components/ui/atoms/collapsible.d.ts.map +1 -1
- package/dist/components/ui/atoms/collapsible.js +208 -23
- package/dist/components/ui/atoms/command.d.ts +4 -3
- package/dist/components/ui/atoms/command.d.ts.map +1 -1
- package/dist/components/ui/atoms/command.js +1655 -348
- package/dist/components/ui/atoms/dialog.d.ts +12 -10
- package/dist/components/ui/atoms/dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/dialog.js +91 -80
- package/dist/components/ui/atoms/dropdown-menu.d.ts +21 -17
- package/dist/components/ui/atoms/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/atoms/dropdown-menu.js +1507 -899
- package/dist/components/ui/atoms/form.d.ts +5 -3
- package/dist/components/ui/atoms/form.d.ts.map +1 -1
- package/dist/components/ui/atoms/form.js +36 -42
- package/dist/components/ui/atoms/hover-card.d.ts +5 -6
- package/dist/components/ui/atoms/hover-card.d.ts.map +1 -1
- package/dist/components/ui/atoms/hover-card.js +355 -193
- package/dist/components/ui/atoms/icons/index.d.ts +1 -0
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +58 -56
- package/dist/components/ui/atoms/icons/telegram.d.ts +4 -0
- package/dist/components/ui/atoms/icons/telegram.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/telegram.js +37 -0
- package/dist/components/ui/atoms/index.d.ts +1 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +566 -545
- package/dist/components/ui/atoms/input-group.d.ts +20 -0
- package/dist/components/ui/atoms/input-group.d.ts.map +1 -0
- package/dist/components/ui/atoms/input-group.js +136 -0
- package/dist/components/ui/atoms/input.d.ts.map +1 -1
- package/dist/components/ui/atoms/input.js +113 -13
- package/dist/components/ui/atoms/label.d.ts +1 -2
- package/dist/components/ui/atoms/label.d.ts.map +1 -1
- package/dist/components/ui/atoms/label.js +18 -31
- package/dist/components/ui/atoms/markdown.js +1 -1
- package/dist/components/ui/atoms/mobile-tooltip.js +4 -3
- package/dist/components/ui/atoms/popover.d.ts +8 -6
- package/dist/components/ui/atoms/popover.d.ts.map +1 -1
- package/dist/components/ui/atoms/popover.js +617 -245
- package/dist/components/ui/atoms/pro-badge.js +1 -1
- package/dist/components/ui/atoms/progress.d.ts +7 -4
- package/dist/components/ui/atoms/progress.d.ts.map +1 -1
- package/dist/components/ui/atoms/progress.js +236 -92
- package/dist/components/ui/atoms/radio-group.d.ts +4 -4
- package/dist/components/ui/atoms/radio-group.d.ts.map +1 -1
- package/dist/components/ui/atoms/radio-group.js +355 -251
- package/dist/components/ui/atoms/resizable.d.ts +3 -4
- package/dist/components/ui/atoms/resizable.d.ts.map +1 -1
- package/dist/components/ui/atoms/resizable.js +25 -27
- package/dist/components/ui/atoms/scroll-area.d.ts +5 -5
- package/dist/components/ui/atoms/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-area.js +611 -526
- package/dist/components/ui/atoms/scroll-button.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-button.js +27 -22
- package/dist/components/ui/atoms/select.d.ts +11 -11
- package/dist/components/ui/atoms/select.d.ts.map +1 -1
- package/dist/components/ui/atoms/select.js +1525 -889
- package/dist/components/ui/atoms/separator.d.ts +2 -3
- package/dist/components/ui/atoms/separator.d.ts.map +1 -1
- package/dist/components/ui/atoms/separator.js +16 -35
- package/dist/components/ui/atoms/sheet.d.ts +9 -9
- package/dist/components/ui/atoms/sheet.d.ts.map +1 -1
- package/dist/components/ui/atoms/sheet.js +65 -64
- package/dist/components/ui/atoms/sidebar.d.ts +9 -15
- package/dist/components/ui/atoms/sidebar.d.ts.map +1 -1
- package/dist/components/ui/atoms/sidebar.js +288 -283
- package/dist/components/ui/atoms/skeleton.js +4 -4
- package/dist/components/ui/atoms/slider.d.ts +2 -3
- package/dist/components/ui/atoms/slider.d.ts.map +1 -1
- package/dist/components/ui/atoms/slider.js +886 -440
- package/dist/components/ui/atoms/switch.d.ts +4 -5
- package/dist/components/ui/atoms/switch.d.ts.map +1 -1
- package/dist/components/ui/atoms/switch.js +218 -151
- package/dist/components/ui/atoms/table.d.ts +2 -4
- package/dist/components/ui/atoms/table.d.ts.map +1 -1
- package/dist/components/ui/atoms/table.js +35 -36
- package/dist/components/ui/atoms/tabs.d.ts +11 -7
- package/dist/components/ui/atoms/tabs.d.ts.map +1 -1
- package/dist/components/ui/atoms/tabs.js +492 -186
- package/dist/components/ui/atoms/textarea.d.ts.map +1 -1
- package/dist/components/ui/atoms/textarea.js +7 -7
- package/dist/components/ui/atoms/toggle.d.ts +2 -3
- package/dist/components/ui/atoms/toggle.d.ts.map +1 -1
- package/dist/components/ui/atoms/toggle.js +92 -45
- package/dist/components/ui/atoms/tooltip.d.ts +6 -9
- package/dist/components/ui/atoms/tooltip.d.ts.map +1 -1
- package/dist/components/ui/atoms/tooltip.js +625 -343
- package/dist/components/ui/atoms/view-tools-control.js +16 -15
- package/dist/components/ui/atoms/virtualized-grid.d.ts +11 -4
- package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -1
- package/dist/components/ui/atoms/virtualized-grid.js +365 -333
- package/dist/components/ui/index.js +665 -644
- package/dist/components/ui/molecules/chat-history-item.d.ts.map +1 -1
- package/dist/components/ui/molecules/chat-history-item.js +47 -40
- package/dist/components/ui/molecules/command-bar.js +1 -1
- package/dist/components/ui/molecules/confirm-popover.d.ts +2 -2
- package/dist/components/ui/molecules/confirm-popover.d.ts.map +1 -1
- package/dist/components/ui/molecules/confirm-popover.js +26 -24
- package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -1
- package/dist/components/ui/molecules/date-time-picker.js +17 -11
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/message.d.ts +2 -3
- package/dist/components/ui/molecules/message.d.ts.map +1 -1
- package/dist/components/ui/molecules/message.js +10 -16
- package/dist/components/ui/molecules/prompt-input.d.ts +1 -1
- package/dist/components/ui/molecules/prompt-input.d.ts.map +1 -1
- package/dist/components/ui/molecules/prompt-input.js +21 -22
- package/dist/components/ui/molecules/requirement-badges.d.ts.map +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +3 -3
- package/dist/components/ui/molecules/steps-progress.js +1 -0
- package/dist/components/ui/molecules/tool-call-accordion.js +1 -0
- package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/tool-card.js +60 -47
- package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/user-nav.d.ts.map +1 -1
- package/dist/components/ui/molecules/user-nav.js +62 -57
- package/dist/components/ui/templates/auth-template.js +5 -5
- package/dist/composite-BASdnlNo.js +220 -0
- package/dist/composite-BSpUD7nI.js +66 -0
- package/dist/cpp-CA4iM_wM.js +18 -0
- package/dist/createBaseUIEventDetails-CqidROtw.js +55 -0
- package/dist/crystal-CRJyc4G-.js +4 -4
- package/dist/css-M7EaDHN_.js +6 -0
- package/dist/csv-B7yqA61e.js +6 -0
- package/dist/dark-plus-B4vfALTw.js +4 -0
- package/dist/detectBrowser-Dn2N72k1.js +42 -0
- package/dist/dracula-Cb59ZzY3.js +4 -0
- package/dist/dracula-soft-aaEmszbU.js +4 -0
- package/dist/edge-BYQkOzbF.js +1 -1
- package/dist/element-DSo91iOi.js +88 -0
- package/dist/elm-BtNbw_Cd.js +1 -1
- package/dist/erlang-DNcDT8Hi.js +1 -1
- package/dist/event-BCa0Un_3.js +30 -0
- package/dist/everforest-dark-CLp_21RJ.js +4 -0
- package/dist/everforest-light-CZ0NCAAv.js +4 -0
- package/dist/floating-ui.utils-48URp89E.js +126 -0
- package/dist/floating-ui.utils.dom-jr2suqy2.js +135 -0
- package/dist/fsharp-CYOiIVNx.js +1 -1
- package/dist/getDisabledMountTransitionStyles-fmnaQYVj.js +1539 -0
- package/dist/getPseudoElementBounds-B4_miSEJ.js +364 -0
- package/dist/git-rebase-ZWUFO_T4.js +1 -1
- package/dist/github-dark-BD3lImVS.js +4 -0
- package/dist/github-dark-default-ID_nBUwl.js +4 -0
- package/dist/github-dark-dimmed-Cw4rFgde.js +4 -0
- package/dist/github-dark-high-contrast-DSby9de8.js +4 -0
- package/dist/github-light-W396yAFe.js +4 -0
- package/dist/github-light-default-DCAQ2px1.js +4 -0
- package/dist/github-light-high-contrast-ChWJGEvx.js +4 -0
- package/dist/glimmer-js-DkxNrfPT.js +2 -2
- package/dist/glimmer-ts-D6YZEmK_.js +2 -2
- package/dist/glsl-CgdqkyFp.js +8 -0
- package/dist/graphql-Bv26LTzG.js +14 -0
- package/dist/gruvbox-dark-hard-BC1GRqFa.js +4 -0
- package/dist/gruvbox-dark-medium-COLy2cDY.js +4 -0
- package/dist/gruvbox-dark-soft-B8MALL4f.js +4 -0
- package/dist/gruvbox-light-hard-Bzxr_AnB.js +4 -0
- package/dist/gruvbox-light-medium-D2fqu3Kj.js +4 -0
- package/dist/gruvbox-light-soft-atzRH3-n.js +4 -0
- package/dist/hack-ItRNKiEb.js +1 -1
- package/dist/haml-B1t5q1Sv.js +10 -0
- package/dist/haml-NZLVzu_R.js +1 -1
- package/dist/handlebars-B2fb61mr.js +14 -0
- package/dist/handlebars-mxStpSE7.js +2 -2
- package/dist/highlighted-body-OFNGDK62-Df6AJMbs.js +20 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +11 -12
- package/dist/horizon-PFtq58ZB.js +4 -0
- package/dist/horizon-bright-2WzHy-Vo.js +4 -0
- package/dist/houston-BEqUWhHr.js +4 -0
- package/dist/html-B50bmoVb.js +1 -1
- package/dist/html-CPZ3oZQ7.js +10 -0
- package/dist/html-derivative-B2qv7eyt.js +8 -0
- package/dist/http-BQ2t9cn1.js +14 -0
- package/dist/hurl-RyCMCa80.js +12 -0
- package/dist/imba-DpB-wtPB.js +6 -0
- package/dist/index-3rscXtm3.js +4708 -0
- package/dist/inertValue-kpZZDBEy.js +7 -0
- package/dist/integrations/rhf/index.js +6 -5
- package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
- package/dist/java-CbphP4lz.js +6 -0
- package/dist/javascript-CgYd5l7W.js +6 -0
- package/dist/jinja-DFCUirAg.js +11 -0
- package/dist/jison-CTEI_s6O.js +8 -0
- package/dist/json-B5-prx4F.js +6 -0
- package/dist/json5-CZ8R1oUY.js +6 -0
- package/dist/jsonc-DMboCKBJ.js +6 -0
- package/dist/jsonl-YgIUi4Dg.js +6 -0
- package/dist/jsx-D4q4E1UD.js +6 -0
- package/dist/julia-2ubi2n9a.js +16 -0
- package/dist/just-CEK2SJ_k.js +4 -4
- package/dist/kanagawa-dragon-DuYaOBBk.js +4 -0
- package/dist/kanagawa-lotus-CyjAihYC.js +4 -0
- package/dist/kanagawa-wave-BVdXUMj5.js +4 -0
- package/dist/laserwave-B_2VVKNJ.js +4 -0
- package/dist/less-MoGo8xoS.js +6 -0
- package/dist/light-plus-IB4fPeJj.js +4 -0
- package/dist/liquid-CHzkx3jT.js +2 -2
- package/dist/lua-Bp3IRv7I.js +1 -1
- package/dist/main.js +691 -670
- package/dist/markdown-B-zRtm0x.js +6 -0
- package/dist/{markdown-D0xxRbwP.js → markdown-B71Eurda.js} +10329 -8108
- package/dist/marko-BlmC3dqW.js +14 -0
- package/dist/marko-CJBA24Ri.js +2 -2
- package/dist/material-theme-CjsSdYF2.js +4 -0
- package/dist/material-theme-darker-DEk0vgdS.js +4 -0
- package/dist/material-theme-lighter-DEVB_7K5.js +4 -0
- package/dist/material-theme-ocean-DK6jm24j.js +4 -0
- package/dist/material-theme-palenight-CNkXNpHv.js +4 -0
- package/dist/mdc-C9YSUwVC.js +2 -2
- package/dist/mdc-CLNk3q28.js +12 -0
- package/dist/mdx-CiUWpBB_.js +6 -0
- package/dist/mermaid-GHXKKRXX-BkplG-MI.js +5 -0
- package/dist/metadata/toolkit-icons.d.ts.map +1 -1
- package/dist/metadata/toolkit-icons.js +40 -38
- package/dist/metadata/toolkits.d.ts.map +1 -1
- package/dist/metadata/toolkits.js +13 -0
- package/dist/min-dark-CJcHUHwu.js +4 -0
- package/dist/min-light-BAN2UR75.js +4 -0
- package/dist/monokai-BbXwpjKl.js +4 -0
- package/dist/night-owl-csViJ7u4.js +4 -0
- package/dist/night-owl-light-BC-NuMC3.js +4 -0
- package/dist/nim-QAjRdh9w.js +5 -5
- package/dist/nord-B8Sq-VQ0.js +4 -0
- package/dist/one-dark-pro-DTdrcl-J.js +4 -0
- package/dist/one-light-kPHTChCU.js +4 -0
- package/dist/owner-rKN292Q9.js +6 -0
- package/dist/perl-DkVrgJBg.js +3 -3
- package/dist/php-BIzsF_5x.js +4 -4
- package/dist/php-Kn-vgdBD.js +18 -0
- package/dist/plastic-DDweBgVs.js +4 -0
- package/dist/poimandres-Dqvs16BQ.js +4 -0
- package/dist/popupStateMapping-BT9Y_jIq.js +1849 -0
- package/dist/postcss-CwL8bLZI.js +6 -0
- package/dist/pug-CTOOvSEH.js +12 -0
- package/dist/pug-XOw9Q1Ho.js +1 -1
- package/dist/python-jjYlTiSH.js +6 -0
- package/dist/qml-rTNXsquU.js +1 -1
- package/dist/r-C8zl4zMO.js +6 -0
- package/dist/react-resizable-panels-BqIpIFl2.js +2017 -0
- package/dist/red-DBDwQkX-.js +4 -0
- package/dist/regexp-Dpy_RgoJ.js +6 -0
- package/dist/resolveAriaLabelledBy-B5vw-szP.js +11 -0
- package/dist/rose-pine-DGHrTu7e.js +4 -0
- package/dist/rose-pine-dawn-DfRVdapG.js +4 -0
- package/dist/rose-pine-moon-DFpJm5Rd.js +4 -0
- package/dist/rst-DM32Wy3O.js +5 -5
- package/dist/ruby-BeqCs27h.js +8 -8
- package/dist/safePolygon-CJcmMc0u.js +389 -0
- package/dist/safeReact-DKq-628G.js +7 -0
- package/dist/sas-fpEvgATw.js +1 -1
- package/dist/sass-BmupNt-w.js +6 -0
- package/dist/scss-BZYVIVaN.js +8 -0
- package/dist/serializeValue-BebmSzW3.js +14 -0
- package/dist/shellscript-fMxXshxv.js +6 -0
- package/dist/shellsession-DiDJNQdy.js +1 -1
- package/dist/slack-dark-noeC6QPl.js +4 -0
- package/dist/slack-ochin-3_2idqLR.js +4 -0
- package/dist/snazzy-light-B9cV359v.js +4 -0
- package/dist/solarized-dark-B6X0ILWr.js +4 -0
- package/dist/solarized-light-LxOemn3c.js +4 -0
- package/dist/sql-D30Zid36.js +6 -0
- package/dist/stata-B8c5fTjX.js +1 -1
- package/dist/styles-DU5BO7fS.js +16 -0
- package/dist/stylus-BoBcEBjx.js +6 -0
- package/dist/surrealql-CQi7GQN7.js +1 -1
- package/dist/svelte-b9PAcyUe.js +14 -0
- package/dist/svelte-rYri41WT.js +3 -3
- package/dist/synthwave-84-DzQeMpV0.js +4 -0
- package/dist/templ-Crs9Ui8q.js +1 -1
- package/dist/tex-AHxmLTL0.js +1 -1
- package/dist/tokyo-night-CLM-V_Re.js +4 -0
- package/dist/{toolkit-card-CB1oiaei.js → toolkit-card-DhpOY80l.js} +56 -36
- package/dist/ts-tags-CP1b-4Z2.js +41 -0
- package/dist/ts-tags-ioVe2PKw.js +5 -5
- package/dist/tsx-QNpb2qLW.js +6 -0
- package/dist/twig-DwV2Fi4L.js +2 -2
- package/dist/typescript-AhniRyfZ.js +6 -0
- package/dist/useAnimationFrame-DIc6eFHa.js +69 -0
- package/dist/useAriaLabelledBy-VklrCmKp.js +34 -0
- package/dist/useBaseUiId-C8Dq0BQq.js +25 -0
- package/dist/useButton-JYPKQKj4.js +150 -0
- package/dist/useCollapsiblePanel-9pDlDh3R.js +257 -0
- package/dist/useCompositeItem-D00ALGkT.js +35 -0
- package/dist/useCompositeListItem-CYQrZg5-.js +74 -0
- package/dist/useControlled-Sx-_x7Sz.js +32 -0
- package/dist/useFocus-Aj9ShMQu.js +97 -0
- package/dist/useIsoLayoutEffect-DpJo20by.js +7 -0
- package/dist/useLabelableId-DF_d91GP.js +44 -0
- package/dist/useOnFirstRender-B4aruaIA.js +9 -0
- package/dist/useOnMount-JHtE6teb.js +9 -0
- package/dist/useOpenChangeComplete-DkeH9FGJ.js +130 -0
- package/dist/useRender-BNXBkp2o.js +7 -0
- package/dist/useRenderElement-DNB2vtF1.js +274 -0
- package/dist/useRole-N-RCRzo1.js +76 -0
- package/dist/useStableCallback-CudqoENs.js +33 -0
- package/dist/useSyncedFloatingRootContext-Bc90zSTy.js +185 -0
- package/dist/useTimeout-DAqPwigF.js +33 -0
- package/dist/useValueAsRef-LhoZc6As.js +20 -0
- package/dist/useValueChanged-Bissqjjn.js +15 -0
- package/dist/valueToPercent-BBgE4D3L.js +27 -0
- package/dist/vesper-BmV7KiQ0.js +4 -0
- package/dist/visuallyHidden-PuyyGHVF.js +22 -0
- package/dist/vitesse-black-CxZz3C4s.js +4 -0
- package/dist/vitesse-dark-DVUJ0sy2.js +4 -0
- package/dist/vitesse-light-BDJohtUr.js +4 -0
- package/dist/vue-CY6W2ID0.js +31 -0
- package/dist/vue-DXEmyXn9.js +3 -3
- package/dist/vue-html-DYXHAJ2G.js +8 -0
- package/dist/vue-vine-D41-N99t.js +4 -4
- package/dist/vue-vine-DiWTpMwZ.js +18 -0
- package/dist/wasm-3y0A1Y71.js +6 -0
- package/dist/wasm-Dm9SFfrx.js +7 -0
- package/dist/web-BbvN_Lei.js +2846 -0
- package/dist/wgsl-SXl3EZUN.js +6 -0
- package/dist/wit-Cw0CTVY0.js +6 -0
- package/dist/xml-CNXGTZ6Z.js +8 -0
- package/dist/xsl-BmSZphgC.js +1 -1
- package/dist/yaml-DZqZ2PBD.js +6 -0
- package/package.json +37 -34
- package/dist/highlighted-body-TPN3WLV5-D6UnKGod.js +0 -19
- package/dist/index-0ioNhtNM.js +0 -10
- package/dist/index-437EL2iq.js +0 -52
- package/dist/index-B695uy69.js +0 -9
- package/dist/index-BEZCAdXQ.js +0 -1568
- package/dist/index-BGQepRFJ.js +0 -27
- package/dist/index-BZPx6jYI.js +0 -8
- package/dist/index-BaLuVb4t.js +0 -70
- package/dist/index-Bw62B28F.js +0 -31
- package/dist/index-By-GFSsC.js +0 -245
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-CCKe-Mpx.js +0 -6
- package/dist/index-Cv867SGx.js +0 -13
- package/dist/index-CvA4FcaC.js +0 -677
- package/dist/index-D2LZVjSn.js +0 -82
- package/dist/index-DFZozV_h.js +0 -68
- package/dist/index-DJQkmo5O.js +0 -49
- package/dist/index-DLohNuco.js +0 -36
- package/dist/index-DrFfdHac.js +0 -144
- package/dist/index-DrlYGDRT.js +0 -119
- package/dist/index-Dz8CQngS.js +0 -181
- package/dist/index-cd1ceFJg.js +0 -6973
- package/dist/index-rKs9bXHr.js +0 -6
- package/dist/mermaid-O7DHMXV3-gUrB-Xs1.js +0 -4
- package/dist/react-resizable-panels.browser-DYl0LXfw.js +0 -1510
- package/dist/web-BwFNdl01.js +0 -697
|
@@ -1,573 +1,658 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { c as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as Gt, jsx as rt } from "react/jsx-runtime";
|
|
3
|
+
import { cn as qt } from "../../../lib/utils.js";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { u as gt } from "../../../useStableCallback-CudqoENs.js";
|
|
6
|
+
import { u as Rt } from "../../../useTimeout-DAqPwigF.js";
|
|
7
|
+
import { f as Jt, u as St } from "../../../useRenderElement-DNB2vtF1.js";
|
|
8
|
+
import { s as Qt } from "../../../styles-DU5BO7fS.js";
|
|
9
|
+
import { u as de } from "../../../useBaseUiId-C8Dq0BQq.js";
|
|
10
|
+
import { u as he, c as ut } from "../../../clamp-BxE4ZAuA.js";
|
|
11
|
+
import { c as me } from "../../../element-DSo91iOi.js";
|
|
12
|
+
import { u as Wt } from "../../../useIsoLayoutEffect-DpJo20by.js";
|
|
13
|
+
import { e as pe } from "../../../detectBrowser-Dn2N72k1.js";
|
|
14
|
+
import { u as te } from "../../../DirectionContext-BSOheMwC.js";
|
|
15
|
+
const At = /* @__PURE__ */ r.createContext(void 0);
|
|
16
|
+
process.env.NODE_ENV !== "production" && (At.displayName = "ScrollAreaRootContext");
|
|
17
|
+
function Xt() {
|
|
18
|
+
const t = r.useContext(At);
|
|
19
|
+
if (t === void 0)
|
|
20
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>." : Jt(53));
|
|
21
|
+
return t;
|
|
15
22
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
23
|
+
let Ot = /* @__PURE__ */ (function(t) {
|
|
24
|
+
return t.scrollAreaCornerHeight = "--scroll-area-corner-height", t.scrollAreaCornerWidth = "--scroll-area-corner-width", t;
|
|
25
|
+
})({});
|
|
26
|
+
const yt = 500, Ft = 16;
|
|
27
|
+
function N(t, e, l) {
|
|
28
|
+
if (!t)
|
|
29
|
+
return 0;
|
|
30
|
+
const S = getComputedStyle(t), X = l === "x" ? "Inline" : "Block";
|
|
31
|
+
return l === "x" && e === "margin" ? parseFloat(S[`${e}InlineStart`]) * 2 : parseFloat(S[`${e}${X}Start`]) + parseFloat(S[`${e}${X}End`]);
|
|
32
|
+
}
|
|
33
|
+
let ve = /* @__PURE__ */ (function(t) {
|
|
34
|
+
return t.orientation = "data-orientation", t.hovering = "data-hovering", t.scrolling = "data-scrolling", t.hasOverflowX = "data-has-overflow-x", t.hasOverflowY = "data-has-overflow-y", t.overflowXStart = "data-overflow-x-start", t.overflowXEnd = "data-overflow-x-end", t.overflowYStart = "data-overflow-y-start", t.overflowYEnd = "data-overflow-y-end", t;
|
|
35
|
+
})({}), ft = /* @__PURE__ */ (function(t) {
|
|
36
|
+
return t.scrolling = "data-scrolling", t.hasOverflowX = "data-has-overflow-x", t.hasOverflowY = "data-has-overflow-y", t.overflowXStart = "data-overflow-x-start", t.overflowXEnd = "data-overflow-x-end", t.overflowYStart = "data-overflow-y-start", t.overflowYEnd = "data-overflow-y-end", t;
|
|
37
|
+
})({});
|
|
38
|
+
const Pt = {
|
|
39
|
+
hasOverflowX: (t) => t ? {
|
|
40
|
+
[ft.hasOverflowX]: ""
|
|
41
|
+
} : null,
|
|
42
|
+
hasOverflowY: (t) => t ? {
|
|
43
|
+
[ft.hasOverflowY]: ""
|
|
44
|
+
} : null,
|
|
45
|
+
overflowXStart: (t) => t ? {
|
|
46
|
+
[ft.overflowXStart]: ""
|
|
47
|
+
} : null,
|
|
48
|
+
overflowXEnd: (t) => t ? {
|
|
49
|
+
[ft.overflowXEnd]: ""
|
|
50
|
+
} : null,
|
|
51
|
+
overflowYStart: (t) => t ? {
|
|
52
|
+
[ft.overflowYStart]: ""
|
|
53
|
+
} : null,
|
|
54
|
+
overflowYEnd: (t) => t ? {
|
|
55
|
+
[ft.overflowYEnd]: ""
|
|
56
|
+
} : null,
|
|
57
|
+
cornerHidden: () => null
|
|
58
|
+
}, we = {
|
|
59
|
+
x: 0,
|
|
60
|
+
y: 0
|
|
61
|
+
}, kt = {
|
|
62
|
+
width: 0,
|
|
63
|
+
height: 0
|
|
64
|
+
}, ge = {
|
|
65
|
+
xStart: !1,
|
|
66
|
+
xEnd: !1,
|
|
67
|
+
yStart: !1,
|
|
68
|
+
yEnd: !1
|
|
69
|
+
}, Se = {
|
|
70
|
+
x: !0,
|
|
71
|
+
y: !0,
|
|
72
|
+
corner: !0
|
|
73
|
+
}, ee = /* @__PURE__ */ r.forwardRef(function(e, l) {
|
|
74
|
+
const {
|
|
75
|
+
render: S,
|
|
76
|
+
className: X,
|
|
77
|
+
overflowEdgeThreshold: s,
|
|
78
|
+
...a
|
|
79
|
+
} = e, H = Ee(s), P = de(), L = Rt(), $ = Rt(), {
|
|
80
|
+
nonce: M,
|
|
81
|
+
disableStyleElements: C
|
|
82
|
+
} = he(), [E, u] = r.useState(!1), [m, R] = r.useState(!1), [h, I] = r.useState(!1), [ot, K] = r.useState(!1), [Z, _] = r.useState(!1), [W, nt] = r.useState(kt), [j, G] = r.useState(kt), [O, lt] = r.useState(ge), [T, st] = r.useState(Se), o = r.useRef(null), n = r.useRef(null), x = r.useRef(null), d = r.useRef(null), b = r.useRef(null), y = r.useRef(null), f = r.useRef(null), p = r.useRef(!1), w = r.useRef(0), v = r.useRef(0), g = r.useRef(0), Et = r.useRef(0), Y = r.useRef("vertical"), V = r.useRef(we), U = gt((c) => {
|
|
83
|
+
const z = c.x - V.current.x, J = c.y - V.current.y;
|
|
84
|
+
V.current = c, J !== 0 && (I(!0), L.start(yt, () => {
|
|
85
|
+
I(!1);
|
|
86
|
+
})), z !== 0 && (R(!0), $.start(yt, () => {
|
|
87
|
+
R(!1);
|
|
88
|
+
}));
|
|
89
|
+
}), F = gt((c) => {
|
|
90
|
+
c.button === 0 && (p.current = !0, w.current = c.clientY, v.current = c.clientX, Y.current = c.currentTarget.getAttribute(ve.orientation), n.current && (g.current = n.current.scrollTop, Et.current = n.current.scrollLeft), b.current && Y.current === "vertical" && b.current.setPointerCapture(c.pointerId), y.current && Y.current === "horizontal" && y.current.setPointerCapture(c.pointerId));
|
|
91
|
+
}), dt = gt((c) => {
|
|
92
|
+
if (!p.current)
|
|
93
|
+
return;
|
|
94
|
+
const z = c.clientY - w.current, J = c.clientX - v.current;
|
|
95
|
+
if (n.current) {
|
|
96
|
+
const it = n.current.scrollHeight, ht = n.current.clientHeight, Nt = n.current.scrollWidth, mt = n.current.clientWidth;
|
|
97
|
+
if (b.current && x.current && Y.current === "vertical") {
|
|
98
|
+
const at = N(x.current, "padding", "y"), pt = N(b.current, "margin", "y"), vt = b.current.offsetHeight, Q = x.current.offsetHeight - vt - at - pt, tt = z / Q;
|
|
99
|
+
n.current.scrollTop = g.current + tt * (it - ht), c.preventDefault(), I(!0), L.start(yt, () => {
|
|
100
|
+
I(!1);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (y.current && d.current && Y.current === "horizontal") {
|
|
104
|
+
const at = N(d.current, "padding", "x"), pt = N(y.current, "margin", "x"), vt = y.current.offsetWidth, Q = d.current.offsetWidth - vt - at - pt, tt = J / Q;
|
|
105
|
+
n.current.scrollLeft = Et.current + tt * (Nt - mt), c.preventDefault(), R(!0), $.start(yt, () => {
|
|
106
|
+
R(!1);
|
|
107
|
+
});
|
|
62
108
|
}
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
G.displayName = B;
|
|
67
|
-
var J = "ScrollAreaViewport", K = c.forwardRef(
|
|
68
|
-
(e, o) => {
|
|
69
|
-
const { __scopeScrollArea: r, children: l, nonce: t, ...n } = e, s = v(J, r), a = c.useRef(null), i = A(o, a, s.onViewportChange);
|
|
70
|
-
return /* @__PURE__ */ j(se, { children: [
|
|
71
|
-
/* @__PURE__ */ h(
|
|
72
|
-
"style",
|
|
73
|
-
{
|
|
74
|
-
dangerouslySetInnerHTML: {
|
|
75
|
-
__html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
|
|
76
|
-
},
|
|
77
|
-
nonce: t
|
|
78
|
-
}
|
|
79
|
-
),
|
|
80
|
-
/* @__PURE__ */ h(
|
|
81
|
-
L.div,
|
|
82
|
-
{
|
|
83
|
-
"data-radix-scroll-area-viewport": "",
|
|
84
|
-
...n,
|
|
85
|
-
ref: i,
|
|
86
|
-
style: {
|
|
87
|
-
/**
|
|
88
|
-
* We don't support `visible` because the intention is to have at least one scrollbar
|
|
89
|
-
* if this component is used and `visible` will behave like `auto` in that case
|
|
90
|
-
* https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
|
|
91
|
-
*
|
|
92
|
-
* We don't handle `auto` because the intention is for the native implementation
|
|
93
|
-
* to be hidden if using this component. We just want to ensure the node is scrollable
|
|
94
|
-
* so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
|
|
95
|
-
* the browser from having to work out whether to render native scrollbars or not,
|
|
96
|
-
* we tell it to with the intention of hiding them in CSS.
|
|
97
|
-
*/
|
|
98
|
-
overflowX: s.scrollbarXEnabled ? "scroll" : "hidden",
|
|
99
|
-
overflowY: s.scrollbarYEnabled ? "scroll" : "hidden",
|
|
100
|
-
...e.style
|
|
101
|
-
},
|
|
102
|
-
children: /* @__PURE__ */ h("div", { ref: s.onContentChange, style: { minWidth: "100%", display: "table" }, children: l })
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
] });
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
K.displayName = J;
|
|
109
|
-
var g = "ScrollAreaScrollbar", Q = c.forwardRef(
|
|
110
|
-
(e, o) => {
|
|
111
|
-
const { forceMount: r, ...l } = e, t = v(g, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = t, a = e.orientation === "horizontal";
|
|
112
|
-
return c.useEffect(() => (a ? n(!0) : s(!0), () => {
|
|
113
|
-
a ? n(!1) : s(!1);
|
|
114
|
-
}), [a, n, s]), t.type === "hover" ? /* @__PURE__ */ h(be, { ...l, ref: o, forceMount: r }) : t.type === "scroll" ? /* @__PURE__ */ h(me, { ...l, ref: o, forceMount: r }) : t.type === "auto" ? /* @__PURE__ */ h(Z, { ...l, ref: o, forceMount: r }) : t.type === "always" ? /* @__PURE__ */ h(k, { ...l, ref: o }) : null;
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
Q.displayName = g;
|
|
118
|
-
var be = c.forwardRef((e, o) => {
|
|
119
|
-
const { forceMount: r, ...l } = e, t = v(g, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
120
|
-
return c.useEffect(() => {
|
|
121
|
-
const a = t.scrollArea;
|
|
122
|
-
let i = 0;
|
|
123
|
-
if (a) {
|
|
124
|
-
const f = () => {
|
|
125
|
-
window.clearTimeout(i), s(!0);
|
|
126
|
-
}, d = () => {
|
|
127
|
-
i = window.setTimeout(() => s(!1), t.scrollHideDelay);
|
|
128
|
-
};
|
|
129
|
-
return a.addEventListener("pointerenter", f), a.addEventListener("pointerleave", d), () => {
|
|
130
|
-
window.clearTimeout(i), a.removeEventListener("pointerenter", f), a.removeEventListener("pointerleave", d);
|
|
131
|
-
};
|
|
132
109
|
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
110
|
+
}), ct = gt((c) => {
|
|
111
|
+
p.current = !1, b.current && Y.current === "vertical" && b.current.releasePointerCapture(c.pointerId), y.current && Y.current === "horizontal" && y.current.releasePointerCapture(c.pointerId);
|
|
112
|
+
});
|
|
113
|
+
function k(c) {
|
|
114
|
+
K(c.pointerType === "touch");
|
|
115
|
+
}
|
|
116
|
+
function xt(c) {
|
|
117
|
+
if (k(c), c.pointerType !== "touch") {
|
|
118
|
+
const z = me(o.current, c.target);
|
|
119
|
+
u(z);
|
|
139
120
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
121
|
+
}
|
|
122
|
+
const q = r.useMemo(() => ({
|
|
123
|
+
scrolling: m || h,
|
|
124
|
+
hasOverflowX: !T.x,
|
|
125
|
+
hasOverflowY: !T.y,
|
|
126
|
+
overflowXStart: O.xStart,
|
|
127
|
+
overflowXEnd: O.xEnd,
|
|
128
|
+
overflowYStart: O.yStart,
|
|
129
|
+
overflowYEnd: O.yEnd,
|
|
130
|
+
cornerHidden: T.corner
|
|
131
|
+
}), [m, h, T.x, T.y, T.corner, O]), A = {
|
|
132
|
+
role: "presentation",
|
|
133
|
+
onPointerEnter: xt,
|
|
134
|
+
onPointerMove: xt,
|
|
135
|
+
onPointerDown: k,
|
|
136
|
+
onPointerLeave() {
|
|
137
|
+
u(!1);
|
|
153
138
|
},
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
139
|
+
style: {
|
|
140
|
+
position: "relative",
|
|
141
|
+
[Ot.scrollAreaCornerHeight]: `${W.height}px`,
|
|
142
|
+
[Ot.scrollAreaCornerWidth]: `${W.width}px`
|
|
158
143
|
}
|
|
144
|
+
}, D = St("div", e, {
|
|
145
|
+
state: q,
|
|
146
|
+
ref: [l, o],
|
|
147
|
+
props: [A, a],
|
|
148
|
+
stateAttributesMapping: Pt
|
|
149
|
+
}), Tt = r.useMemo(() => ({
|
|
150
|
+
handlePointerDown: F,
|
|
151
|
+
handlePointerMove: dt,
|
|
152
|
+
handlePointerUp: ct,
|
|
153
|
+
handleScroll: U,
|
|
154
|
+
cornerSize: W,
|
|
155
|
+
setCornerSize: nt,
|
|
156
|
+
thumbSize: j,
|
|
157
|
+
setThumbSize: G,
|
|
158
|
+
hasMeasuredScrollbar: Z,
|
|
159
|
+
setHasMeasuredScrollbar: _,
|
|
160
|
+
touchModality: ot,
|
|
161
|
+
cornerRef: f,
|
|
162
|
+
scrollingX: m,
|
|
163
|
+
setScrollingX: R,
|
|
164
|
+
scrollingY: h,
|
|
165
|
+
setScrollingY: I,
|
|
166
|
+
hovering: E,
|
|
167
|
+
setHovering: u,
|
|
168
|
+
viewportRef: n,
|
|
169
|
+
rootRef: o,
|
|
170
|
+
scrollbarYRef: x,
|
|
171
|
+
scrollbarXRef: d,
|
|
172
|
+
thumbYRef: b,
|
|
173
|
+
thumbXRef: y,
|
|
174
|
+
rootId: P,
|
|
175
|
+
hiddenState: T,
|
|
176
|
+
setHiddenState: st,
|
|
177
|
+
overflowEdges: O,
|
|
178
|
+
setOverflowEdges: lt,
|
|
179
|
+
viewportState: q,
|
|
180
|
+
overflowEdgeThreshold: H
|
|
181
|
+
}), [F, dt, ct, U, W, j, Z, ot, m, R, h, I, E, u, P, T, O, q, H]);
|
|
182
|
+
return /* @__PURE__ */ Gt(At.Provider, {
|
|
183
|
+
value: Tt,
|
|
184
|
+
children: [!C && Qt.getElement(M), D]
|
|
159
185
|
});
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
186
|
+
});
|
|
187
|
+
process.env.NODE_ENV !== "production" && (ee.displayName = "ScrollAreaRoot");
|
|
188
|
+
function Ee(t) {
|
|
189
|
+
if (typeof t == "number") {
|
|
190
|
+
const e = Math.max(0, t);
|
|
191
|
+
return {
|
|
192
|
+
xStart: e,
|
|
193
|
+
xEnd: e,
|
|
194
|
+
yStart: e,
|
|
195
|
+
yEnd: e
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
xStart: Math.max(0, t?.xStart || 0),
|
|
200
|
+
xEnd: Math.max(0, t?.xEnd || 0),
|
|
201
|
+
yStart: Math.max(0, t?.yStart || 0),
|
|
202
|
+
yEnd: Math.max(0, t?.yEnd || 0)
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
const re = /* @__PURE__ */ r.createContext(void 0);
|
|
206
|
+
process.env.NODE_ENV !== "production" && (re.displayName = "ScrollAreaViewportContext");
|
|
207
|
+
function xe(t, e) {
|
|
208
|
+
if (typeof IntersectionObserver > "u")
|
|
209
|
+
return () => {
|
|
210
|
+
};
|
|
211
|
+
const l = new IntersectionObserver((S) => {
|
|
212
|
+
S.forEach((X) => {
|
|
213
|
+
X.intersectionRatio > 0 && (e(), l.disconnect());
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
return l.observe(t), () => {
|
|
217
|
+
l.disconnect();
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
let B = /* @__PURE__ */ (function(t) {
|
|
221
|
+
return t.scrollAreaOverflowXStart = "--scroll-area-overflow-x-start", t.scrollAreaOverflowXEnd = "--scroll-area-overflow-x-end", t.scrollAreaOverflowYStart = "--scroll-area-overflow-y-start", t.scrollAreaOverflowYEnd = "--scroll-area-overflow-y-end", t;
|
|
222
|
+
})({});
|
|
223
|
+
const Bt = 1;
|
|
224
|
+
function Kt(t, e) {
|
|
225
|
+
if (e <= 0)
|
|
226
|
+
return 0;
|
|
227
|
+
const l = ut(t, 0, e), S = l, X = e - l, s = S <= Bt, a = X <= Bt;
|
|
228
|
+
return s && a ? S <= X ? 0 : e : s ? 0 : a ? e : l;
|
|
229
|
+
}
|
|
230
|
+
let Zt = !1;
|
|
231
|
+
const jt = typeof ResizeObserver < "u";
|
|
232
|
+
function be() {
|
|
233
|
+
Zt || // When `inherits: false`, specifying `inherit` on child elements doesn't work
|
|
234
|
+
// in Safari. To let CSS features work correctly, this optimization must be skipped.
|
|
235
|
+
pe || (typeof CSS < "u" && "registerProperty" in CSS && [B.scrollAreaOverflowXStart, B.scrollAreaOverflowXEnd, B.scrollAreaOverflowYStart, B.scrollAreaOverflowYEnd].forEach((t) => {
|
|
236
|
+
try {
|
|
237
|
+
CSS.registerProperty({
|
|
238
|
+
name: t,
|
|
239
|
+
syntax: "<length>",
|
|
240
|
+
inherits: !1,
|
|
241
|
+
initialValue: "0px"
|
|
242
|
+
});
|
|
243
|
+
} catch {
|
|
174
244
|
}
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
245
|
+
}), Zt = !0);
|
|
246
|
+
}
|
|
247
|
+
const oe = /* @__PURE__ */ r.forwardRef(function(e, l) {
|
|
248
|
+
const {
|
|
249
|
+
render: S,
|
|
250
|
+
className: X,
|
|
251
|
+
...s
|
|
252
|
+
} = e, {
|
|
253
|
+
viewportRef: a,
|
|
254
|
+
scrollbarYRef: H,
|
|
255
|
+
scrollbarXRef: P,
|
|
256
|
+
thumbYRef: L,
|
|
257
|
+
thumbXRef: $,
|
|
258
|
+
cornerRef: M,
|
|
259
|
+
cornerSize: C,
|
|
260
|
+
setCornerSize: E,
|
|
261
|
+
setThumbSize: u,
|
|
262
|
+
rootId: m,
|
|
263
|
+
setHiddenState: R,
|
|
264
|
+
hiddenState: h,
|
|
265
|
+
setHasMeasuredScrollbar: I,
|
|
266
|
+
handleScroll: ot,
|
|
267
|
+
setHovering: K,
|
|
268
|
+
setOverflowEdges: Z,
|
|
269
|
+
overflowEdges: _,
|
|
270
|
+
overflowEdgeThreshold: W,
|
|
271
|
+
scrollingX: nt,
|
|
272
|
+
scrollingY: j
|
|
273
|
+
} = Xt(), G = te(), O = r.useRef(!0), lt = r.useRef([NaN, NaN, NaN, NaN]), T = Rt(), st = Rt(), o = gt(() => {
|
|
274
|
+
const f = a.current, p = H.current, w = P.current, v = L.current, g = $.current, Et = M.current;
|
|
275
|
+
if (!f)
|
|
276
|
+
return;
|
|
277
|
+
const Y = f.scrollHeight, V = f.scrollWidth, U = f.clientHeight, F = f.clientWidth, dt = f.scrollTop, ct = f.scrollLeft, k = lt.current, xt = Number.isNaN(k[0]);
|
|
278
|
+
if (k[0] = U, k[1] = Y, k[2] = F, k[3] = V, xt && I(!0), Y === 0 || V === 0)
|
|
279
|
+
return;
|
|
280
|
+
const q = ye(f), A = q.y, D = q.x, Tt = F / V, c = U / Y, z = Math.max(0, V - F), J = Math.max(0, Y - U);
|
|
281
|
+
let it = 0, ht = 0;
|
|
282
|
+
if (!D) {
|
|
283
|
+
let i = 0;
|
|
284
|
+
G === "rtl" ? i = ut(-ct, 0, z) : i = ut(ct, 0, z), it = Kt(i, z), ht = z - it;
|
|
183
285
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
286
|
+
const Nt = A ? 0 : ut(dt, 0, J), mt = A ? 0 : Kt(Nt, J), at = A ? 0 : J - mt, pt = D ? 0 : F, vt = A ? 0 : U;
|
|
287
|
+
let Q = 0, tt = 0;
|
|
288
|
+
!D && !A && (Q = p?.offsetWidth || 0, tt = w?.offsetHeight || 0);
|
|
289
|
+
const It = C.width === 0 && C.height === 0, ce = It ? Q : 0, ie = It ? tt : 0, zt = N(w, "padding", "x"), _t = N(p, "padding", "y"), Vt = N(g, "margin", "x"), Dt = N(v, "margin", "y"), $t = pt - zt - Vt, Ut = vt - _t - Dt, ae = w ? Math.min(w.offsetWidth - ce, $t) : $t, fe = p ? Math.min(p.offsetHeight - ie, Ut) : Ut, Ht = Math.max(Ft, ae * Tt), Mt = Math.max(Ft, fe * c);
|
|
290
|
+
if (u((i) => i.height === Mt && i.width === Ht ? i : {
|
|
291
|
+
width: Ht,
|
|
292
|
+
height: Mt
|
|
293
|
+
}), p && v) {
|
|
294
|
+
const i = p.offsetHeight - Mt - _t - Dt, et = Y - U, bt = et === 0 ? 0 : dt / et, Ct = Math.min(i, Math.max(0, bt * i));
|
|
295
|
+
v.style.transform = `translate3d(0,${Ct}px,0)`;
|
|
190
296
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
{
|
|
195
|
-
"data-state": n ? "visible" : "hidden",
|
|
196
|
-
...t,
|
|
197
|
-
ref: o
|
|
297
|
+
if (w && g) {
|
|
298
|
+
const i = w.offsetWidth - Ht - zt - Vt, et = V - F, bt = et === 0 ? 0 : ct / et, Ct = G === "rtl" ? ut(bt * i, -i, 0) : ut(bt * i, 0, i);
|
|
299
|
+
g.style.transform = `translate3d(${Ct}px,0,0)`;
|
|
198
300
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
301
|
+
const ue = [[B.scrollAreaOverflowXStart, it], [B.scrollAreaOverflowXEnd, ht], [B.scrollAreaOverflowYStart, mt], [B.scrollAreaOverflowYEnd, at]];
|
|
302
|
+
for (const [i, et] of ue)
|
|
303
|
+
f.style.setProperty(i, `${et}px`);
|
|
304
|
+
Et && (D || A ? E({
|
|
305
|
+
width: 0,
|
|
306
|
+
height: 0
|
|
307
|
+
}) : !D && !A && E({
|
|
308
|
+
width: Q,
|
|
309
|
+
height: tt
|
|
310
|
+
})), R((i) => Re(i, q));
|
|
311
|
+
const wt = {
|
|
312
|
+
xStart: !D && it > W.xStart,
|
|
313
|
+
xEnd: !D && ht > W.xEnd,
|
|
314
|
+
yStart: !A && mt > W.yStart,
|
|
315
|
+
yEnd: !A && at > W.yEnd
|
|
316
|
+
};
|
|
317
|
+
Z((i) => i.xStart === wt.xStart && i.xEnd === wt.xEnd && i.yStart === wt.yStart && i.yEnd === wt.yEnd ? i : wt);
|
|
318
|
+
});
|
|
319
|
+
Wt(() => {
|
|
320
|
+
if (a.current && (be(), !jt))
|
|
321
|
+
return xe(a.current, () => {
|
|
322
|
+
o();
|
|
323
|
+
});
|
|
324
|
+
}, [o, a]), Wt(() => {
|
|
325
|
+
queueMicrotask(o);
|
|
326
|
+
}, [o, h, G]), Wt(() => {
|
|
327
|
+
a.current?.matches(":hover") && K(!0);
|
|
328
|
+
}, [a, K]), r.useEffect(() => {
|
|
329
|
+
const f = a.current;
|
|
330
|
+
if (!jt || !f)
|
|
331
|
+
return;
|
|
332
|
+
let p = !1;
|
|
333
|
+
const w = new ResizeObserver(() => {
|
|
334
|
+
if (!p) {
|
|
335
|
+
p = !0;
|
|
336
|
+
const v = lt.current;
|
|
337
|
+
if (v[0] === f.clientHeight && v[1] === f.scrollHeight && v[2] === f.clientWidth && v[3] === f.scrollWidth)
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
o();
|
|
341
|
+
});
|
|
342
|
+
return w.observe(f), st.start(0, () => {
|
|
343
|
+
const v = f.getAnimations({
|
|
344
|
+
subtree: !0
|
|
345
|
+
});
|
|
346
|
+
v.length !== 0 && Promise.allSettled(v.map((g) => g.finished)).then(o).catch(() => {
|
|
347
|
+
});
|
|
348
|
+
}), () => {
|
|
349
|
+
w.disconnect(), st.clear();
|
|
350
|
+
};
|
|
351
|
+
}, [o, a, st]);
|
|
352
|
+
function n() {
|
|
353
|
+
O.current = !1;
|
|
216
354
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
{
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
355
|
+
const x = {
|
|
356
|
+
role: "presentation",
|
|
357
|
+
...m && {
|
|
358
|
+
"data-id": `${m}-viewport`
|
|
359
|
+
},
|
|
360
|
+
// https://accessibilityinsights.io/info-examples/web/scrollable-region-focusable/
|
|
361
|
+
// Keep non-scrollable viewports out of tab order.
|
|
362
|
+
tabIndex: h.x && h.y ? -1 : 0,
|
|
363
|
+
className: Qt.className,
|
|
364
|
+
style: {
|
|
365
|
+
overflow: "scroll"
|
|
366
|
+
},
|
|
367
|
+
onScroll() {
|
|
368
|
+
a.current && (o(), O.current || ot({
|
|
369
|
+
x: a.current.scrollLeft,
|
|
370
|
+
y: a.current.scrollTop
|
|
371
|
+
}), T.start(100, () => {
|
|
372
|
+
O.current = !0;
|
|
373
|
+
}));
|
|
374
|
+
},
|
|
375
|
+
onWheel: n,
|
|
376
|
+
onTouchMove: n,
|
|
377
|
+
onPointerMove: n,
|
|
378
|
+
onPointerEnter: n,
|
|
379
|
+
onKeyDown: n
|
|
380
|
+
}, d = r.useMemo(() => ({
|
|
381
|
+
scrolling: nt || j,
|
|
382
|
+
hasOverflowX: !h.x,
|
|
383
|
+
hasOverflowY: !h.y,
|
|
384
|
+
overflowXStart: _.xStart,
|
|
385
|
+
overflowXEnd: _.xEnd,
|
|
386
|
+
overflowYStart: _.yStart,
|
|
387
|
+
overflowYEnd: _.yEnd,
|
|
388
|
+
cornerHidden: h.corner
|
|
389
|
+
}), [nt, j, h.x, h.y, h.corner, _]), b = St("div", e, {
|
|
390
|
+
ref: [l, a],
|
|
391
|
+
state: d,
|
|
392
|
+
props: [x, s],
|
|
393
|
+
stateAttributesMapping: Pt
|
|
394
|
+
}), y = r.useMemo(() => ({
|
|
395
|
+
computeThumbPosition: o
|
|
396
|
+
}), [o]);
|
|
397
|
+
return /* @__PURE__ */ rt(re.Provider, {
|
|
398
|
+
value: y,
|
|
399
|
+
children: b
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
process.env.NODE_ENV !== "production" && (oe.displayName = "ScrollAreaViewport");
|
|
403
|
+
function ye(t) {
|
|
404
|
+
const e = t.clientHeight >= t.scrollHeight, l = t.clientWidth >= t.scrollWidth;
|
|
405
|
+
return {
|
|
406
|
+
y: e,
|
|
407
|
+
x: l,
|
|
408
|
+
corner: e || l
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
function Re(t, e) {
|
|
412
|
+
return t.y === e.y && t.x === e.x && t.corner === e.corner ? t : e;
|
|
413
|
+
}
|
|
414
|
+
const Lt = /* @__PURE__ */ r.createContext(void 0);
|
|
415
|
+
process.env.NODE_ENV !== "production" && (Lt.displayName = "ScrollAreaScrollbarContext");
|
|
416
|
+
function Oe() {
|
|
417
|
+
const t = r.useContext(Lt);
|
|
418
|
+
if (t === void 0)
|
|
419
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>." : Jt(54));
|
|
420
|
+
return t;
|
|
421
|
+
}
|
|
422
|
+
let Yt = /* @__PURE__ */ (function(t) {
|
|
423
|
+
return t.scrollAreaThumbHeight = "--scroll-area-thumb-height", t.scrollAreaThumbWidth = "--scroll-area-thumb-width", t;
|
|
424
|
+
})({});
|
|
425
|
+
const ne = /* @__PURE__ */ r.forwardRef(function(e, l) {
|
|
426
|
+
const {
|
|
427
|
+
render: S,
|
|
428
|
+
className: X,
|
|
429
|
+
orientation: s = "vertical",
|
|
430
|
+
keepMounted: a = !1,
|
|
431
|
+
...H
|
|
432
|
+
} = e, {
|
|
433
|
+
hovering: P,
|
|
434
|
+
scrollingX: L,
|
|
435
|
+
scrollingY: $,
|
|
436
|
+
hiddenState: M,
|
|
437
|
+
overflowEdges: C,
|
|
438
|
+
scrollbarYRef: E,
|
|
439
|
+
scrollbarXRef: u,
|
|
440
|
+
viewportRef: m,
|
|
441
|
+
thumbYRef: R,
|
|
442
|
+
thumbXRef: h,
|
|
443
|
+
handlePointerDown: I,
|
|
444
|
+
handlePointerUp: ot,
|
|
445
|
+
rootId: K,
|
|
446
|
+
thumbSize: Z,
|
|
447
|
+
hasMeasuredScrollbar: _
|
|
448
|
+
} = Xt(), W = {
|
|
449
|
+
hovering: P,
|
|
450
|
+
scrolling: {
|
|
451
|
+
horizontal: L,
|
|
452
|
+
vertical: $
|
|
453
|
+
}[s],
|
|
454
|
+
orientation: s,
|
|
455
|
+
hasOverflowX: !M.x,
|
|
456
|
+
hasOverflowY: !M.y,
|
|
457
|
+
overflowXStart: C.xStart,
|
|
458
|
+
overflowXEnd: C.xEnd,
|
|
459
|
+
overflowYStart: C.yStart,
|
|
460
|
+
overflowYEnd: C.yEnd,
|
|
461
|
+
cornerHidden: M.corner
|
|
462
|
+
}, nt = te(), j = !_ && !a;
|
|
463
|
+
r.useEffect(() => {
|
|
464
|
+
const o = m.current, n = s === "vertical" ? E.current : u.current;
|
|
465
|
+
if (!n)
|
|
466
|
+
return;
|
|
467
|
+
function x(d) {
|
|
468
|
+
if (!(!o || !n || d.ctrlKey)) {
|
|
469
|
+
if (d.preventDefault(), s === "vertical") {
|
|
470
|
+
if (o.scrollTop === 0 && d.deltaY < 0)
|
|
471
|
+
return;
|
|
472
|
+
} else if (o.scrollLeft === 0 && d.deltaX < 0)
|
|
473
|
+
return;
|
|
474
|
+
if (s === "vertical") {
|
|
475
|
+
if (o.scrollTop === o.scrollHeight - o.clientHeight && d.deltaY > 0)
|
|
476
|
+
return;
|
|
477
|
+
} else if (o.scrollLeft === o.scrollWidth - o.clientWidth && d.deltaX > 0)
|
|
478
|
+
return;
|
|
479
|
+
s === "vertical" ? o.scrollTop += d.deltaY : o.scrollLeft += d.deltaX;
|
|
233
480
|
}
|
|
234
481
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
{
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
482
|
+
return n.addEventListener("wheel", x, {
|
|
483
|
+
passive: !1
|
|
484
|
+
}), () => {
|
|
485
|
+
n.removeEventListener("wheel", x);
|
|
486
|
+
};
|
|
487
|
+
}, [s, u, E, m]);
|
|
488
|
+
const G = {
|
|
489
|
+
...K && {
|
|
490
|
+
"data-id": `${K}-scrollbar`
|
|
491
|
+
},
|
|
492
|
+
onPointerDown(o) {
|
|
493
|
+
if (o.button === 0 && o.currentTarget === o.target && m.current) {
|
|
494
|
+
if (R.current && E.current && s === "vertical") {
|
|
495
|
+
const n = N(R.current, "margin", "y"), x = N(E.current, "padding", "y"), d = R.current.offsetHeight, b = E.current.getBoundingClientRect(), y = o.clientY - b.top - d / 2 - x + n / 2, f = m.current.scrollHeight, p = m.current.clientHeight, w = E.current.offsetHeight - d - x - n, g = y / w * (f - p);
|
|
496
|
+
m.current.scrollTop = g;
|
|
244
497
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
onDragScroll: (u) => {
|
|
250
|
-
t.viewport && (t.viewport.scrollTop = b(u));
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
) : null;
|
|
254
|
-
}), Se = c.forwardRef((e, o) => {
|
|
255
|
-
const { sizes: r, onSizesChange: l, ...t } = e, n = v(g, e.__scopeScrollArea), [s, a] = c.useState(), i = c.useRef(null), f = A(o, i, n.onScrollbarXChange);
|
|
256
|
-
return c.useEffect(() => {
|
|
257
|
-
i.current && a(getComputedStyle(i.current));
|
|
258
|
-
}, [i]), /* @__PURE__ */ h(
|
|
259
|
-
re,
|
|
260
|
-
{
|
|
261
|
-
"data-orientation": "horizontal",
|
|
262
|
-
...t,
|
|
263
|
-
ref: f,
|
|
264
|
-
sizes: r,
|
|
265
|
-
style: {
|
|
266
|
-
bottom: 0,
|
|
267
|
-
left: n.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
268
|
-
right: n.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
269
|
-
"--radix-scroll-area-thumb-width": X(r) + "px",
|
|
270
|
-
...e.style
|
|
271
|
-
},
|
|
272
|
-
onThumbPointerDown: (d) => e.onThumbPointerDown(d.x),
|
|
273
|
-
onDragScroll: (d) => e.onDragScroll(d.x),
|
|
274
|
-
onWheelScroll: (d, b) => {
|
|
275
|
-
if (n.viewport) {
|
|
276
|
-
const u = n.viewport.scrollLeft + d.deltaX;
|
|
277
|
-
e.onWheelScroll(u), ce(u, b) && d.preventDefault();
|
|
498
|
+
if (h.current && u.current && s === "horizontal") {
|
|
499
|
+
const n = N(h.current, "margin", "x"), x = N(u.current, "padding", "x"), d = h.current.offsetWidth, b = u.current.getBoundingClientRect(), y = o.clientX - b.left - d / 2 - x + n / 2, f = m.current.scrollWidth, p = m.current.clientWidth, w = u.current.offsetWidth - d - x - n, v = y / w;
|
|
500
|
+
let g;
|
|
501
|
+
nt === "rtl" ? (g = (1 - v) * (f - p), m.current.scrollLeft <= 0 && (g = -g)) : g = v * (f - p), m.current.scrollLeft = g;
|
|
278
502
|
}
|
|
279
|
-
|
|
280
|
-
onResize: () => {
|
|
281
|
-
i.current && n.viewport && s && l({
|
|
282
|
-
content: n.viewport.scrollWidth,
|
|
283
|
-
viewport: n.viewport.offsetWidth,
|
|
284
|
-
scrollbar: {
|
|
285
|
-
size: i.current.clientWidth,
|
|
286
|
-
paddingStart: O(s.paddingLeft),
|
|
287
|
-
paddingEnd: O(s.paddingRight)
|
|
288
|
-
}
|
|
289
|
-
});
|
|
503
|
+
I(o);
|
|
290
504
|
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
"data-orientation": "vertical",
|
|
301
|
-
...t,
|
|
302
|
-
ref: f,
|
|
303
|
-
sizes: r,
|
|
304
|
-
style: {
|
|
505
|
+
},
|
|
506
|
+
onPointerUp: ot,
|
|
507
|
+
style: {
|
|
508
|
+
position: "absolute",
|
|
509
|
+
touchAction: "none",
|
|
510
|
+
WebkitUserSelect: "none",
|
|
511
|
+
userSelect: "none",
|
|
512
|
+
visibility: j ? "hidden" : void 0,
|
|
513
|
+
...s === "vertical" && {
|
|
305
514
|
top: 0,
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
"--radix-scroll-area-thumb-height": X(r) + "px",
|
|
310
|
-
...e.style
|
|
515
|
+
bottom: `var(${Ot.scrollAreaCornerHeight})`,
|
|
516
|
+
insetInlineEnd: 0,
|
|
517
|
+
[Yt.scrollAreaThumbHeight]: `${Z.height}px`
|
|
311
518
|
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
e.onWheelScroll(u), ce(u, b) && d.preventDefault();
|
|
318
|
-
}
|
|
319
|
-
},
|
|
320
|
-
onResize: () => {
|
|
321
|
-
i.current && n.viewport && s && l({
|
|
322
|
-
content: n.viewport.scrollHeight,
|
|
323
|
-
viewport: n.viewport.offsetHeight,
|
|
324
|
-
scrollbar: {
|
|
325
|
-
size: i.current.clientHeight,
|
|
326
|
-
paddingStart: O(s.paddingTop),
|
|
327
|
-
paddingEnd: O(s.paddingBottom)
|
|
328
|
-
}
|
|
329
|
-
});
|
|
519
|
+
...s === "horizontal" && {
|
|
520
|
+
insetInlineStart: 0,
|
|
521
|
+
insetInlineEnd: `var(${Ot.scrollAreaCornerWidth})`,
|
|
522
|
+
bottom: 0,
|
|
523
|
+
[Yt.scrollAreaThumbWidth]: `${Z.width}px`
|
|
330
524
|
}
|
|
331
525
|
}
|
|
332
|
-
|
|
333
|
-
|
|
526
|
+
}, O = St("div", e, {
|
|
527
|
+
ref: [l, s === "vertical" ? E : u],
|
|
528
|
+
state: W,
|
|
529
|
+
props: [G, H],
|
|
530
|
+
stateAttributesMapping: Pt
|
|
531
|
+
}), lt = r.useMemo(() => ({
|
|
532
|
+
orientation: s
|
|
533
|
+
}), [s]), T = s === "vertical" ? M.y : M.x;
|
|
534
|
+
return a || !T ? /* @__PURE__ */ rt(Lt.Provider, {
|
|
535
|
+
value: lt,
|
|
536
|
+
children: O
|
|
537
|
+
}) : null;
|
|
538
|
+
});
|
|
539
|
+
process.env.NODE_ENV !== "production" && (ne.displayName = "ScrollAreaScrollbar");
|
|
540
|
+
const le = /* @__PURE__ */ r.forwardRef(function(e, l) {
|
|
334
541
|
const {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
onThumbChange: C(n),
|
|
366
|
-
onThumbPointerUp: C(s),
|
|
367
|
-
onThumbPositionChange: y,
|
|
368
|
-
onThumbPointerDown: C(a),
|
|
369
|
-
children: /* @__PURE__ */ h(
|
|
370
|
-
L.div,
|
|
371
|
-
{
|
|
372
|
-
...u,
|
|
373
|
-
ref: M,
|
|
374
|
-
style: { position: "absolute", ...u.style },
|
|
375
|
-
onPointerDown: R(e.onPointerDown, (S) => {
|
|
376
|
-
S.button === 0 && (S.target.setPointerCapture(S.pointerId), P.current = w.getBoundingClientRect(), _.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), H(S));
|
|
377
|
-
}),
|
|
378
|
-
onPointerMove: R(e.onPointerMove, H),
|
|
379
|
-
onPointerUp: R(e.onPointerUp, (S) => {
|
|
380
|
-
const p = S.target;
|
|
381
|
-
p.hasPointerCapture(S.pointerId) && p.releasePointerCapture(S.pointerId), document.body.style.webkitUserSelect = _.current, m.viewport && (m.viewport.style.scrollBehavior = ""), P.current = null;
|
|
382
|
-
})
|
|
383
|
-
}
|
|
384
|
-
)
|
|
385
|
-
}
|
|
386
|
-
);
|
|
387
|
-
}), z = "ScrollAreaThumb", oe = c.forwardRef(
|
|
388
|
-
(e, o) => {
|
|
389
|
-
const { forceMount: r, ...l } = e, t = ee(z, e.__scopeScrollArea);
|
|
390
|
-
return /* @__PURE__ */ h(I, { present: r || t.hasThumb, children: /* @__PURE__ */ h(we, { ref: o, ...l }) });
|
|
391
|
-
}
|
|
392
|
-
), we = c.forwardRef(
|
|
393
|
-
(e, o) => {
|
|
394
|
-
const { __scopeScrollArea: r, style: l, ...t } = e, n = v(z, r), s = ee(z, r), { onThumbPositionChange: a } = s, i = A(
|
|
395
|
-
o,
|
|
396
|
-
(b) => s.onThumbChange(b)
|
|
397
|
-
), f = c.useRef(void 0), d = Y(() => {
|
|
398
|
-
f.current && (f.current(), f.current = void 0);
|
|
399
|
-
}, 100);
|
|
400
|
-
return c.useEffect(() => {
|
|
401
|
-
const b = n.viewport;
|
|
402
|
-
if (b) {
|
|
403
|
-
const u = () => {
|
|
404
|
-
if (d(), !f.current) {
|
|
405
|
-
const m = Ce(b, a);
|
|
406
|
-
f.current = m, a();
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
return a(), b.addEventListener("scroll", u), () => b.removeEventListener("scroll", u);
|
|
410
|
-
}
|
|
411
|
-
}, [n.viewport, d, a]), /* @__PURE__ */ h(
|
|
412
|
-
L.div,
|
|
413
|
-
{
|
|
414
|
-
"data-state": s.hasThumb ? "visible" : "hidden",
|
|
415
|
-
...t,
|
|
416
|
-
ref: i,
|
|
417
|
-
style: {
|
|
418
|
-
width: "var(--radix-scroll-area-thumb-width)",
|
|
419
|
-
height: "var(--radix-scroll-area-thumb-height)",
|
|
420
|
-
...l
|
|
542
|
+
render: S,
|
|
543
|
+
className: X,
|
|
544
|
+
...s
|
|
545
|
+
} = e, {
|
|
546
|
+
thumbYRef: a,
|
|
547
|
+
thumbXRef: H,
|
|
548
|
+
handlePointerDown: P,
|
|
549
|
+
handlePointerMove: L,
|
|
550
|
+
handlePointerUp: $,
|
|
551
|
+
setScrollingX: M,
|
|
552
|
+
setScrollingY: C,
|
|
553
|
+
hasMeasuredScrollbar: E
|
|
554
|
+
} = Xt(), {
|
|
555
|
+
orientation: u
|
|
556
|
+
} = Oe();
|
|
557
|
+
return St("div", e, {
|
|
558
|
+
ref: [l, u === "vertical" ? a : H],
|
|
559
|
+
state: {
|
|
560
|
+
orientation: u
|
|
561
|
+
},
|
|
562
|
+
props: [{
|
|
563
|
+
onPointerDown: P,
|
|
564
|
+
onPointerMove: L,
|
|
565
|
+
onPointerUp(h) {
|
|
566
|
+
u === "vertical" && C(!1), u === "horizontal" && M(!1), $(h);
|
|
567
|
+
},
|
|
568
|
+
style: {
|
|
569
|
+
visibility: E ? void 0 : "hidden",
|
|
570
|
+
...u === "vertical" && {
|
|
571
|
+
height: `var(${Yt.scrollAreaThumbHeight})`
|
|
421
572
|
},
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
}),
|
|
426
|
-
onPointerUp: R(e.onPointerUp, s.onThumbPointerUp)
|
|
573
|
+
...u === "horizontal" && {
|
|
574
|
+
width: `var(${Yt.scrollAreaThumbWidth})`
|
|
575
|
+
}
|
|
427
576
|
}
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
);
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}), T(t.scrollbarY, () => {
|
|
445
|
-
const d = t.scrollbarY?.offsetWidth || 0;
|
|
446
|
-
t.onCornerWidthChange(d), s(d);
|
|
447
|
-
}), f ? /* @__PURE__ */ h(
|
|
448
|
-
L.div,
|
|
449
|
-
{
|
|
450
|
-
...l,
|
|
451
|
-
ref: o,
|
|
577
|
+
}, s]
|
|
578
|
+
});
|
|
579
|
+
});
|
|
580
|
+
process.env.NODE_ENV !== "production" && (le.displayName = "ScrollAreaThumb");
|
|
581
|
+
const se = /* @__PURE__ */ r.forwardRef(function(e, l) {
|
|
582
|
+
const {
|
|
583
|
+
render: S,
|
|
584
|
+
className: X,
|
|
585
|
+
...s
|
|
586
|
+
} = e, {
|
|
587
|
+
cornerRef: a,
|
|
588
|
+
cornerSize: H,
|
|
589
|
+
hiddenState: P
|
|
590
|
+
} = Xt(), L = St("div", e, {
|
|
591
|
+
ref: [l, a],
|
|
592
|
+
props: [{
|
|
452
593
|
style: {
|
|
453
|
-
width: n,
|
|
454
|
-
height: a,
|
|
455
594
|
position: "absolute",
|
|
456
|
-
right: t.dir === "ltr" ? 0 : void 0,
|
|
457
|
-
left: t.dir === "rtl" ? 0 : void 0,
|
|
458
595
|
bottom: 0,
|
|
459
|
-
|
|
596
|
+
insetInlineEnd: 0,
|
|
597
|
+
width: H.width,
|
|
598
|
+
height: H.height
|
|
460
599
|
}
|
|
461
|
-
}
|
|
462
|
-
)
|
|
600
|
+
}, s]
|
|
601
|
+
});
|
|
602
|
+
return P.corner ? null : L;
|
|
463
603
|
});
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
function X(e) {
|
|
472
|
-
const o = ne(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, l = (e.scrollbar.size - r) * o;
|
|
473
|
-
return Math.max(l, 18);
|
|
474
|
-
}
|
|
475
|
-
function Pe(e, o, r, l = "ltr") {
|
|
476
|
-
const t = X(r), n = t / 2, s = o || n, a = t - s, i = r.scrollbar.paddingStart + s, f = r.scrollbar.size - r.scrollbar.paddingEnd - a, d = r.content - r.viewport, b = l === "ltr" ? [0, d] : [d * -1, 0];
|
|
477
|
-
return le([i, f], b)(e);
|
|
478
|
-
}
|
|
479
|
-
function $(e, o, r = "ltr") {
|
|
480
|
-
const l = X(o), t = o.scrollbar.paddingStart + o.scrollbar.paddingEnd, n = o.scrollbar.size - t, s = o.content - o.viewport, a = n - l, i = r === "ltr" ? [0, s] : [s * -1, 0], f = ue(e, i);
|
|
481
|
-
return le([0, s], [0, a])(f);
|
|
482
|
-
}
|
|
483
|
-
function le(e, o) {
|
|
484
|
-
return (r) => {
|
|
485
|
-
if (e[0] === e[1] || o[0] === o[1]) return o[0];
|
|
486
|
-
const l = (o[1] - o[0]) / (e[1] - e[0]);
|
|
487
|
-
return o[0] + l * (r - e[0]);
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
function ce(e, o) {
|
|
491
|
-
return e > 0 && e < o;
|
|
492
|
-
}
|
|
493
|
-
var Ce = (e, o = () => {
|
|
494
|
-
}) => {
|
|
495
|
-
let r = { left: e.scrollLeft, top: e.scrollTop }, l = 0;
|
|
496
|
-
return (function t() {
|
|
497
|
-
const n = { left: e.scrollLeft, top: e.scrollTop }, s = r.left !== n.left, a = r.top !== n.top;
|
|
498
|
-
(s || a) && o(), r = n, l = window.requestAnimationFrame(t);
|
|
499
|
-
})(), () => window.cancelAnimationFrame(l);
|
|
604
|
+
process.env.NODE_ENV !== "production" && (se.displayName = "ScrollAreaCorner");
|
|
605
|
+
const Ye = {
|
|
606
|
+
always: "",
|
|
607
|
+
auto: "",
|
|
608
|
+
hover: "opacity-0 data-hovering:opacity-100 data-scrolling:opacity-100 transition-opacity duration-150",
|
|
609
|
+
scroll: "opacity-0 data-scrolling:opacity-100 transition-opacity duration-150"
|
|
500
610
|
};
|
|
501
|
-
function
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
function T(e, o) {
|
|
508
|
-
const r = C(o);
|
|
509
|
-
de(() => {
|
|
510
|
-
let l = 0;
|
|
511
|
-
if (e) {
|
|
512
|
-
const t = new ResizeObserver(() => {
|
|
513
|
-
cancelAnimationFrame(l), l = window.requestAnimationFrame(r);
|
|
514
|
-
});
|
|
515
|
-
return t.observe(e), () => {
|
|
516
|
-
window.cancelAnimationFrame(l), t.unobserve(e);
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
}, [e, r]);
|
|
520
|
-
}
|
|
521
|
-
var Re = G, Ee = K, Te = te;
|
|
522
|
-
function Ye({
|
|
523
|
-
className: e,
|
|
524
|
-
children: o,
|
|
525
|
-
viewPortClassName: r,
|
|
526
|
-
...l
|
|
611
|
+
function Ve({
|
|
612
|
+
className: t,
|
|
613
|
+
children: e,
|
|
614
|
+
type: l = "auto",
|
|
615
|
+
...S
|
|
527
616
|
}) {
|
|
528
|
-
return /* @__PURE__ */
|
|
529
|
-
|
|
617
|
+
return /* @__PURE__ */ Gt(
|
|
618
|
+
ee,
|
|
530
619
|
{
|
|
531
|
-
className:
|
|
620
|
+
className: qt("relative", t),
|
|
532
621
|
"data-slot": "scroll-area",
|
|
533
|
-
...
|
|
622
|
+
...S,
|
|
534
623
|
children: [
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
|
|
624
|
+
/* @__PURE__ */ rt(
|
|
625
|
+
oe,
|
|
537
626
|
{
|
|
538
|
-
className:
|
|
539
|
-
"size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
540
|
-
r
|
|
541
|
-
),
|
|
627
|
+
className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
542
628
|
"data-slot": "scroll-area-viewport",
|
|
543
|
-
children:
|
|
629
|
+
children: e
|
|
544
630
|
}
|
|
545
631
|
),
|
|
546
|
-
/* @__PURE__ */
|
|
547
|
-
/* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ rt(Xe, { className: Ye[l] }),
|
|
633
|
+
/* @__PURE__ */ rt(se, {})
|
|
548
634
|
]
|
|
549
635
|
}
|
|
550
636
|
);
|
|
551
637
|
}
|
|
552
|
-
function
|
|
553
|
-
className:
|
|
554
|
-
orientation:
|
|
555
|
-
...
|
|
638
|
+
function Xe({
|
|
639
|
+
className: t,
|
|
640
|
+
orientation: e = "vertical",
|
|
641
|
+
...l
|
|
556
642
|
}) {
|
|
557
|
-
return /* @__PURE__ */
|
|
558
|
-
|
|
643
|
+
return /* @__PURE__ */ rt(
|
|
644
|
+
ne,
|
|
559
645
|
{
|
|
560
|
-
className:
|
|
561
|
-
"flex touch-none select-none p-px transition-colors",
|
|
562
|
-
|
|
563
|
-
o === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
564
|
-
e
|
|
646
|
+
className: qt(
|
|
647
|
+
"flex touch-none select-none p-px transition-colors data-[orientation=horizontal]:h-2.5 data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent",
|
|
648
|
+
t
|
|
565
649
|
),
|
|
650
|
+
"data-orientation": e,
|
|
566
651
|
"data-slot": "scroll-area-scrollbar",
|
|
567
|
-
orientation:
|
|
568
|
-
...
|
|
569
|
-
children: /* @__PURE__ */
|
|
570
|
-
|
|
652
|
+
orientation: e,
|
|
653
|
+
...l,
|
|
654
|
+
children: /* @__PURE__ */ rt(
|
|
655
|
+
le,
|
|
571
656
|
{
|
|
572
657
|
className: "relative flex-1 rounded-full bg-border",
|
|
573
658
|
"data-slot": "scroll-area-thumb"
|
|
@@ -577,6 +662,6 @@ function Ae({
|
|
|
577
662
|
);
|
|
578
663
|
}
|
|
579
664
|
export {
|
|
580
|
-
|
|
581
|
-
|
|
665
|
+
Ve as ScrollArea,
|
|
666
|
+
Xe as ScrollBar
|
|
582
667
|
};
|