@gv-tech/ui-web 2.29.2 → 2.29.4

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.
Files changed (265) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.mjs +53 -1
  3. package/dist/alert-dialog.cjs +1 -1
  4. package/dist/alert-dialog.mjs +99 -1
  5. package/dist/alert.cjs +1 -1
  6. package/dist/alert.mjs +1 -1
  7. package/dist/aspect-ratio.cjs +1 -1
  8. package/dist/aspect-ratio.mjs +10 -1
  9. package/dist/attachment.cjs +1 -1
  10. package/dist/attachment.mjs +25 -24
  11. package/dist/avatar.cjs +1 -1
  12. package/dist/avatar.mjs +49 -1
  13. package/dist/badge.cjs +1 -1
  14. package/dist/badge.mjs +5 -4
  15. package/dist/breadcrumb.cjs +1 -1
  16. package/dist/breadcrumb.mjs +12 -11
  17. package/dist/bubble.cjs +1 -1
  18. package/dist/bubble.mjs +4 -3
  19. package/dist/button-group.cjs +1 -1
  20. package/dist/button-group.mjs +12 -11
  21. package/dist/button.cjs +1 -1
  22. package/dist/button.mjs +4 -3
  23. package/dist/calendar.cjs +1 -1
  24. package/dist/calendar.mjs +97 -1
  25. package/dist/card.cjs +1 -1
  26. package/dist/card.mjs +1 -1
  27. package/dist/carousel.cjs +1 -1
  28. package/dist/carousel.mjs +107 -1
  29. package/dist/chart.cjs +2 -2
  30. package/dist/chart.mjs +1 -1
  31. package/dist/checkbox.cjs +1 -1
  32. package/dist/checkbox.mjs +19 -1
  33. package/dist/collapsible.cjs +1 -1
  34. package/dist/collapsible.mjs +12 -12
  35. package/dist/combobox.cjs +1 -1
  36. package/dist/combobox.mjs +161 -1
  37. package/dist/command.cjs +1 -1
  38. package/dist/command.mjs +89 -1
  39. package/dist/context-menu.cjs +1 -1
  40. package/dist/context-menu.mjs +123 -1
  41. package/dist/dialog.cjs +1 -1
  42. package/dist/dialog.mjs +40 -40
  43. package/dist/direction.cjs +1 -1
  44. package/dist/direction.mjs +7 -7
  45. package/dist/drawer.cjs +1 -1
  46. package/dist/drawer.mjs +1 -1
  47. package/dist/dropdown-menu.cjs +1 -1
  48. package/dist/dropdown-menu.mjs +126 -1
  49. package/dist/empty.cjs +1 -1
  50. package/dist/empty.mjs +1 -1
  51. package/dist/field.cjs +1 -1
  52. package/dist/field.mjs +36 -36
  53. package/dist/form.cjs +1 -1
  54. package/dist/form.mjs +36 -36
  55. package/dist/hover-card.cjs +1 -1
  56. package/dist/hover-card.mjs +30 -1
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.mjs +36 -36
  59. package/dist/input-group.cjs +1 -1
  60. package/dist/input-group.mjs +26 -26
  61. package/dist/input-otp.cjs +1 -1
  62. package/dist/input-otp.mjs +45 -1
  63. package/dist/input.cjs +1 -1
  64. package/dist/input.mjs +1 -1
  65. package/dist/item.cjs +1 -1
  66. package/dist/item.mjs +28 -27
  67. package/dist/kbd.cjs +1 -1
  68. package/dist/kbd.mjs +1 -1
  69. package/dist/label.cjs +1 -1
  70. package/dist/label.mjs +13 -1
  71. package/dist/marker.cjs +1 -1
  72. package/dist/marker.mjs +4 -3
  73. package/dist/menubar.cjs +1 -1
  74. package/dist/menubar.mjs +133 -1
  75. package/dist/message-scroller.cjs +1 -1
  76. package/dist/message-scroller.mjs +59 -1
  77. package/dist/message.cjs +1 -1
  78. package/dist/message.mjs +1 -1
  79. package/dist/native-select.cjs +1 -1
  80. package/dist/native-select.mjs +1 -1
  81. package/dist/navigation-menu.cjs +1 -1
  82. package/dist/navigation-menu.mjs +79 -1
  83. package/dist/pagination.cjs +1 -1
  84. package/dist/pagination.mjs +14 -14
  85. package/dist/popover.cjs +1 -1
  86. package/dist/popover.mjs +54 -1
  87. package/dist/progress.cjs +1 -1
  88. package/dist/progress.mjs +19 -1
  89. package/dist/questionnaire.cjs +1 -1
  90. package/dist/questionnaire.mjs +168 -1
  91. package/dist/radio-group.cjs +1 -1
  92. package/dist/radio-group.mjs +25 -1
  93. package/dist/resizable.cjs +1 -1
  94. package/dist/resizable.mjs +26 -1
  95. package/dist/rolldown-runtime-BocRIvOZ.js +1 -0
  96. package/dist/scroll-area.cjs +1 -1
  97. package/dist/scroll-area.mjs +35 -1
  98. package/dist/scroll-to-top.cjs +1 -1
  99. package/dist/search.cjs +1 -1
  100. package/dist/search.mjs +1 -1
  101. package/dist/select.cjs +1 -1
  102. package/dist/select.mjs +98 -1
  103. package/dist/separator.cjs +1 -1
  104. package/dist/separator.mjs +15 -1
  105. package/dist/sheet.cjs +1 -1
  106. package/dist/sheet.mjs +38 -38
  107. package/dist/{sidebar-C2ax_A0G.mjs → sidebar-DrU3nKaL.mjs} +138 -134
  108. package/dist/sidebar-uOtFHnBs.js +1 -0
  109. package/dist/sidebar.cjs +1 -1
  110. package/dist/sidebar.mjs +3 -1
  111. package/dist/skeleton.cjs +1 -1
  112. package/dist/skeleton.mjs +1 -1
  113. package/dist/slider.cjs +1 -1
  114. package/dist/slider.mjs +34 -1
  115. package/dist/spinner.cjs +1 -1
  116. package/dist/spinner.mjs +1 -1
  117. package/dist/support-fab.cjs +1 -1
  118. package/dist/switch.cjs +1 -1
  119. package/dist/switch.mjs +18 -1
  120. package/dist/table-of-contents.cjs +1 -1
  121. package/dist/table.cjs +1 -1
  122. package/dist/table.mjs +1 -1
  123. package/dist/tabs.cjs +1 -1
  124. package/dist/tabs.mjs +44 -1
  125. package/dist/text.cjs +1 -1
  126. package/dist/textarea.cjs +1 -1
  127. package/dist/textarea.mjs +1 -1
  128. package/dist/{theme-toggle-BSMwXb8o.mjs → theme-toggle-9KtAIRxy.mjs} +6 -6
  129. package/dist/theme-toggle-DkNI3bfh.js +1 -0
  130. package/dist/theme-toggle.cjs +1 -1
  131. package/dist/theme-toggle.mjs +2 -1
  132. package/dist/toast.cjs +1 -1
  133. package/dist/toast.mjs +52 -1
  134. package/dist/{toaster-D2BV6jez.mjs → toaster-8RrHPtlc.mjs} +8 -8
  135. package/dist/toaster-AFud4l6l.js +1 -0
  136. package/dist/toaster.cjs +1 -1
  137. package/dist/toaster.mjs +2 -1
  138. package/dist/toggle-group.cjs +1 -1
  139. package/dist/toggle-group.mjs +49 -1
  140. package/dist/toggle.cjs +1 -1
  141. package/dist/toggle.mjs +35 -1
  142. package/dist/tooltip.cjs +1 -1
  143. package/dist/tooltip.mjs +34 -1
  144. package/package.json +2 -1
  145. package/dist/accordion-Bd0-CZQn.js +0 -1
  146. package/dist/accordion-Cf6DNbLH.mjs +0 -244
  147. package/dist/alert-dialog-BxFH0Lwn.mjs +0 -180
  148. package/dist/alert-dialog-C6vNmGBL.js +0 -1
  149. package/dist/aspect-ratio-CdQevcDV.mjs +0 -38
  150. package/dist/aspect-ratio-Z4Nkc56X.js +0 -1
  151. package/dist/avatar-B5PWwGhY.mjs +0 -136
  152. package/dist/avatar-CFhYRM52.js +0 -1
  153. package/dist/calendar-D5qgt2o2.js +0 -1
  154. package/dist/calendar-DIqXNjOR.mjs +0 -3029
  155. package/dist/carousel-D-xEqRCX.js +0 -1
  156. package/dist/carousel-DPjWmM_A.mjs +0 -1169
  157. package/dist/checkbox-DEPm1BBc.mjs +0 -184
  158. package/dist/checkbox-DI9Hn_e_.js +0 -1
  159. package/dist/chunk-HBS6WEDP-D2-yWzIN.js +0 -1
  160. package/dist/chunk-HBS6WEDP-DD8ZmxRM.mjs +0 -62
  161. package/dist/combobox-C4y8AbZX.mjs +0 -5644
  162. package/dist/combobox-boXp-mix.js +0 -3
  163. package/dist/command-BnW6UIVk.js +0 -1
  164. package/dist/command-Cbsp7PBx.mjs +0 -542
  165. package/dist/context-menu-CwsdFpx1.js +0 -1
  166. package/dist/context-menu-FNgV55ZV.mjs +0 -315
  167. package/dist/dist-7YyzJonC.mjs +0 -39
  168. package/dist/dist-AlmToDtO.mjs +0 -17
  169. package/dist/dist-B76UOZbx.mjs +0 -40
  170. package/dist/dist-B7Ph9-T6.mjs +0 -44
  171. package/dist/dist-B7jnFMko.js +0 -1
  172. package/dist/dist-BOiFyvyS.mjs +0 -10
  173. package/dist/dist-BQkDLAY7.js +0 -1
  174. package/dist/dist-Bal96K8t.js +0 -1
  175. package/dist/dist-Blgp9lfa.js +0 -1
  176. package/dist/dist-BnlI08Je.mjs +0 -96
  177. package/dist/dist-Bu-uFV1C.mjs +0 -191
  178. package/dist/dist-C2BHd5i1.mjs +0 -460
  179. package/dist/dist-C516Vwxy.mjs +0 -116
  180. package/dist/dist-CBlqVBTk.js +0 -1
  181. package/dist/dist-CDcZ8WMF.js +0 -1
  182. package/dist/dist-CDksSmTD.mjs +0 -189
  183. package/dist/dist-CF-qVmmV.js +0 -1
  184. package/dist/dist-CIgGRTmJ.js +0 -1
  185. package/dist/dist-CJqVmdrU.js +0 -1
  186. package/dist/dist-COqM3IM6.mjs +0 -89
  187. package/dist/dist-CbWpCWog.mjs +0 -180
  188. package/dist/dist-CcGLWbPa.mjs +0 -19
  189. package/dist/dist-Cn4F8XlY.mjs +0 -220
  190. package/dist/dist-CoTs6T03.js +0 -1
  191. package/dist/dist-Co_xSt6d.js +0 -1
  192. package/dist/dist-Cu0GG-3j.mjs +0 -15
  193. package/dist/dist-DJqkhIXb.js +0 -1
  194. package/dist/dist-DKI-XYwI.mjs +0 -98
  195. package/dist/dist-DQeXXRYL.mjs +0 -201
  196. package/dist/dist-DW2ltK5-.js +0 -1
  197. package/dist/dist-DWcKY_sJ.js +0 -1
  198. package/dist/dist-DZiOPWLp.js +0 -1
  199. package/dist/dist-DdAeWIwf.js +0 -1
  200. package/dist/dist-DhubV_gU.mjs +0 -4
  201. package/dist/dist-DmY7elIQ.js +0 -1
  202. package/dist/dist-DoWtzxYc.mjs +0 -684
  203. package/dist/dist-DuQlxGyN.js +0 -1
  204. package/dist/dist-KFF7QKuL.js +0 -1
  205. package/dist/dist-RXrZgzkO.js +0 -1
  206. package/dist/dist-R_G5UQRm.js +0 -1
  207. package/dist/dist-dwRwxUPt.mjs +0 -22
  208. package/dist/dist-fzmUl3YX.mjs +0 -553
  209. package/dist/dist-hBsne-A2.mjs +0 -92
  210. package/dist/dist-ljiGYyay.mjs +0 -29
  211. package/dist/dist-pqMcQ1Nk.js +0 -1
  212. package/dist/dist-zmnQp5Xf.js +0 -1
  213. package/dist/dropdown-menu-ChuqZeix.js +0 -1
  214. package/dist/dropdown-menu-DU7KNoXP.mjs +0 -311
  215. package/dist/es2015-BooeZGhO.mjs +0 -554
  216. package/dist/es2015-Dggv0vx3.js +0 -41
  217. package/dist/floating-ui.react-dom-2hihjuTL.mjs +0 -1057
  218. package/dist/floating-ui.react-dom-BtFIezY4.js +0 -1
  219. package/dist/hover-card-BeqCs_2R.js +0 -1
  220. package/dist/hover-card-w8PmCyw2.mjs +0 -176
  221. package/dist/input-otp-Bn_Uy1mR.mjs +0 -398
  222. package/dist/input-otp-CTRB_0Xp.js +0 -20
  223. package/dist/label-Da0kELfR.mjs +0 -26
  224. package/dist/label-JMa1tFfC.js +0 -1
  225. package/dist/menubar-B7sRxpE4.mjs +0 -405
  226. package/dist/menubar-Bd-QKMcw.js +0 -1
  227. package/dist/message-scroller-B8AU0v3Y.mjs +0 -805
  228. package/dist/message-scroller-BJb4Mh_I.js +0 -1
  229. package/dist/navigation-menu-B-RwfscB.mjs +0 -638
  230. package/dist/navigation-menu-kPwxYZCR.js +0 -1
  231. package/dist/popover-Cq5cTNtC.js +0 -1
  232. package/dist/popover-T6Ra737i.mjs +0 -241
  233. package/dist/progress-e9YzxvRo.mjs +0 -90
  234. package/dist/progress-iUSEI7J9.js +0 -6
  235. package/dist/questionnaire-BLCvUX1C.mjs +0 -1137
  236. package/dist/questionnaire-CcymIPae.js +0 -1
  237. package/dist/radio-group-BKpiDcIb.mjs +0 -264
  238. package/dist/radio-group-DPEzCmxe.js +0 -1
  239. package/dist/resizable-ByF0NmN9.mjs +0 -2153
  240. package/dist/resizable-oL3v42zT.js +0 -1
  241. package/dist/rolldown-runtime-D7yIeQp2.mjs +0 -13
  242. package/dist/rolldown-runtime-DbbDpzbe.js +0 -1
  243. package/dist/scroll-area-BzNeOQ6C.mjs +0 -568
  244. package/dist/scroll-area-s4_ZJK59.js +0 -1
  245. package/dist/select-B_nRxX2Y.mjs +0 -831
  246. package/dist/select-j5_dph9S.js +0 -1
  247. package/dist/separator-Bn-3XUSJ.js +0 -1
  248. package/dist/separator-CCcMNS78.mjs +0 -38
  249. package/dist/sidebar-Cnem2n5A.js +0 -1
  250. package/dist/slider-B2PUTc7W.mjs +0 -484
  251. package/dist/slider-wZuXwuib.js +0 -1
  252. package/dist/switch-CD675xU7.js +0 -1
  253. package/dist/switch-ikzIzrme.mjs +0 -172
  254. package/dist/tabs-DCm5zOYB.mjs +0 -158
  255. package/dist/tabs-fcahDQDp.js +0 -1
  256. package/dist/theme-toggle-BGTJsIA-.js +0 -1
  257. package/dist/toast-C31v9P1K.js +0 -1
  258. package/dist/toast-vU5ISM03.mjs +0 -445
  259. package/dist/toaster-CaJyOCyC.js +0 -1
  260. package/dist/toggle-CSZdCCwX.js +0 -1
  261. package/dist/toggle-Cv9YYwLI.mjs +0 -58
  262. package/dist/toggle-group-RT8wyBwK.js +0 -1
  263. package/dist/toggle-group-qvjasXS-.mjs +0 -166
  264. package/dist/tooltip-7ERoN5mV.mjs +0 -386
  265. package/dist/tooltip-CC9_spXT.js +0 -1
@@ -1 +0,0 @@
1
- const e=require("./rolldown-runtime-DbbDpzbe.js"),t=require("./chunk-HBS6WEDP-D2-yWzIN.js"),n=require("./dist-CoTs6T03.js"),r=require("./button.cjs");let i=require("lucide-react"),a=require("react"),o=e.r(a,1);a=e.r(a);let s=require("react/jsx-runtime");var c=8,l=64,u=0,d=.5,f=180,p=new Set([`ArrowDown`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`,` `]),m={start:!1,end:!1},h={currentAnchorId:null,visibleMessageIds:[]};function g({content:e,scrollEdgeThreshold:t,spacer:n,viewport:r}){if(!r||!e)return m;let i=D({content:e,spacer:n,viewport:r});return{start:r.scrollTop>t,end:i-r.scrollTop-r.clientHeight>t}}function _({content:e,scrollMargin:t,scrollPreviousItemPeek:n,spacer:r,viewport:i,visibleMessageIds:a}){if(!e||!i)return h;let o=i.getBoundingClientRect(),s=o.top+t+n,c=typeof IntersectionObserver>`u`,l=[],u=null;for(let t of v(e,r)){let e=t.dataset.messageId;if(!e)continue;let n=t.dataset.scrollAnchor===`true`,r=n||c?t.getBoundingClientRect():null;(c&&r?r.bottom>s&&r.top<o.bottom:a.has(e))&&l.push(e),n&&r&&r.top<=s+d&&(u=e)}return l.length===0&&u===null?h:{currentAnchorId:u,visibleMessageIds:l}}function v(e,t){return Array.from(e.children).filter(e=>e instanceof HTMLElement&&e!==t)}function y(e,t){for(let n=t;n<e.length;n++){let t=e[n];if(t?.dataset.scrollAnchor===`true`)return t}return null}function b(e,t){for(let n of e)if(n.dataset.scrollAnchor===`true`&&!t.has(n))return n;return null}function x(e,t){let n=0;for(let r=t;r<e.length;r++)if(e[r]?.dataset.scrollAnchor===`true`&&(n+=1,n>1))return!0;return!1}function S(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.dataset.scrollAnchor===`true`)return n}return null}function C({content:e,spacer:t,viewport:n}){let r=n.getBoundingClientRect();for(let n of v(e,t)){if(!n.dataset.messageId)continue;let e=n.getBoundingClientRect();if(e.bottom>r.top&&e.top<r.bottom)return n}return null}function w({align:e,element:t,scrollMargin:n,spacer:r,viewport:i}){let a=T(t,i),o=t.getBoundingClientRect().height,s=A(r);if(e===`center`){let e=Math.max(0,i.clientHeight-s.start-s.end);return a-s.start-(e-o)/2-n}if(e===`end`)return a-i.clientHeight+o+s.end+n;if(e===`nearest`){let e=a+o,t=i.scrollTop+s.start,r=i.scrollTop+i.clientHeight-s.end;return a>=t&&e<=r?i.scrollTop:a<t?a-s.start-n:e-i.clientHeight+s.end+n}return a-s.start-n}function T(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top-r.top+t.scrollTop}function E(e,t){return e.getBoundingClientRect().top-t.getBoundingClientRect().top}function ee({content:e,scrollTop:t,spacer:n,viewport:r}){let i=D({content:e,spacer:n,viewport:r});return t+r.clientHeight-i}function D({content:e,spacer:t,viewport:n}){let r=v(e,t),i=k(e),a=n.getBoundingClientRect(),o=n.scrollTop,s=i.start+i.end;for(let e of r){let t=e.getBoundingClientRect();s=Math.max(s,t.bottom-a.top+o+i.end)}return s}function O(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function k(e){let t=window.getComputedStyle(e);return{end:M(t.paddingBlockEnd||t.paddingBottom),start:M(t.paddingBlockStart||t.paddingTop)}}function A(e){let t=e?.parentElement;return t?k(t):{end:0,start:0}}function j(e){if(!e)return 0;let t=window.getComputedStyle(e);return M(t.rowGap===`normal`?t.gap:t.rowGap)}function M(e){if(!e)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function N(e,t){let n=e,r=new Set;return{getSnapshot:()=>n,hasListeners:()=>r.size>0,setSnapshot:e=>{t(n,e)||(n=e,r.forEach(e=>e()))},subscribe:(e,t,n)=>{let i=r.size===0;return r.add(e),i&&t?.(),()=>{r.delete(e),r.size===0&&n?.()}}}}function P(e,t){return N(e,t)}function te(){return N(h,F)}function ne(e,t){return e.start===t.start&&e.end===t.end}function F(e,t){return e.currentAnchorId!==t.currentAnchorId||e.visibleMessageIds.length!==t.visibleMessageIds.length?!1:e.visibleMessageIds.every((e,n)=>e===t.visibleMessageIds[n])}function re({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:r,scrollPreviousItemPeek:i}){let a=o.useRef(e),s=o.useRef(!1),c=o.useRef(null),l=o.useRef(!1),u=o.useRef(n),d=o.useRef(0),f=o.useRef(null),p=o.useRef(0),h=o.useRef(e?`following-bottom`:`free-scrolling`),g=o.useRef(new Map),_=o.useRef(null),v=o.useRef(null),y=o.useRef(null),b=o.useRef(i),x=o.useRef(!0),S=o.useRef(null),C=o.useRef(r),w=o.useRef(null),T=o.useRef(0),E=o.useRef(0),ee=o.useRef(null),D=o.useRef(null),O=o.useRef(null),k=o.useRef(null),A=o.useRef(null),j=o.useRef(null),M=o.useRef(null),N=o.useRef(null),F=o.useRef(null),re=o.useRef(new Set),ie=o.useRef(new WeakSet);return O.current===null&&(O.current=P(t===`end`||t===`last-anchor`,(e,t)=>e===t)),k.current===null&&(k.current=P(m,ne)),F.current===null&&(F.current=te()),a.current=e,u.current=n,C.current=r,b.current=i,{autoScrollRef:a,autoscrollingRef:s,autoscrollingTimeoutRef:A,streamingTurnRef:y,contentRef:c,defaultScrollPositionAppliedRef:l,firstItemRef:f,itemCountRef:d,lastScrollTopRef:p,messageElementsRef:g,modeRef:h,pendingScrollFrameRef:w,pendingScrollToMessageRef:_,prependRestoreRef:v,preserveScrollOnPrependRef:x,pendingDefaultScrollStore:O.current,rootRef:S,scrollEdgeThresholdRef:u,scrollMarginRef:C,scrollPreviousItemPeekRef:b,spacerGapRef:T,spacerHeightRef:E,spacerRef:ee,stateFrameRef:D,stateStore:k.current,viewportRef:j,visibilityFrameRef:M,visibilityObserverRef:N,visibilityStore:F.current,visibleMessageIdsRef:re,handledScrollAnchorsRef:ie}}function ie(e){e.pendingDefaultScrollStore.setSnapshot(!1)}function ae(e){e.defaultScrollPositionAppliedRef.current=!0,ie(e)}function oe({refs:e,commitScrollState:t,scheduleStateCommit:n,scheduleVisibilitySync:r}){let{streamingTurnRef:i,autoScrollRef:a,autoscrollingRef:s,autoscrollingTimeoutRef:c,contentRef:l,itemCountRef:u,messageElementsRef:p,modeRef:m,pendingScrollToMessageRef:h,prependRestoreRef:g,scrollMarginRef:_,scrollPreviousItemPeekRef:v,spacerGapRef:y,spacerHeightRef:b,spacerRef:x,viewportRef:S}=e,C=o.useCallback(e=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null),s.current!==e&&(s.current=e,t()),e&&(c.current=window.setTimeout(()=>{c.current=null,s.current=!1,t()},f))},[t]),T=o.useCallback(e=>{let t=x.current;if(!t)return;let n=Math.max(0,Math.ceil(e));b.current!==n&&(b.current=n,t.hidden=n===0,t.style.height=`${n}px`,t.style.marginTop=n>0?`${-y.current}px`:``)},[]),D=o.useCallback((e,{behavior:r=`auto`,autoscrolling:i=!1}={})=>{let a=S.current;if(!a)return;let o=Math.max(0,e);Math.abs(a.scrollTop-o)<=d?(a.scrollTop=o,t()):(i&&C(!0),a.scrollTo({top:o,behavior:r}),n())},[t,n,C]),k=o.useCallback(({behavior:e=`auto`}={})=>S.current?(T(0),i.current=null,m.current=`free-scrolling`,D(0,{behavior:e}),r(),!0):!1,[r,D,T]),A=o.useCallback(({behavior:e=`auto`}={})=>{let t=S.current;return t?(T(0),i.current=null,m.current=a.current?`following-bottom`:`free-scrolling`,D(O(t),{autoscrolling:!0,behavior:e}),r(),!0):!1},[r,D,T]),j=o.useCallback((e,{align:t=`start`,behavior:n=`auto`,scrollMargin:a=_.current}={},{keepPreviousPeek:o=!1}={})=>{let s=l.current,c=S.current;if(!s||!c||!s.contains(e))return!1;let u=w({align:t,element:e,scrollMargin:o?a+v.current:a,spacer:x.current,viewport:c}),d=ee({content:s,scrollTop:u,spacer:x.current,viewport:c});return T(d),g.current={element:e,viewportTop:E(e,c)},m.current=o?`anchored-to-message`:`settling-jump`,i.current=o?e:null,D(u,{behavior:n}),r(),!0},[r,D,T]),M=o.useCallback(()=>{let e=i.current;return!e||!e.isConnected||m.current!==`anchored-to-message`?!1:j(e,{align:`start`},{keepPreviousPeek:!0})},[j]),N=o.useCallback((t,n)=>{let r=p.current.get(t);return r?(ae(e),j(r,n)?(h.current=null,!0):(h.current={messageId:t,options:n},!0)):u.current===0&&(h.current={messageId:t,options:n},ae(e),!0)},[j]);return{flushPendingScrollToMessage:o.useCallback(()=>{let t=h.current;if(!t)return!1;let n=p.current.get(t.messageId);return!n||!j(n,t.options)?!1:(h.current=null,ae(e),!0)},[j]),reanchorToAnchoredMessage:M,scrollToElement:j,scrollToEnd:A,scrollToMessage:N,scrollToStart:k}}function se(e,t){return o.useCallback(n=>{e.current=n,n&&t()},[e,t])}function ce({autoScroll:e=!1,defaultScrollPosition:t=`end`,scrollEdgeThreshold:n=c,scrollPreviousItemPeek:r=l,scrollMargin:i=u}){let a=re({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:i,scrollPreviousItemPeek:r}),{streamingTurnRef:s,autoScrollRef:f,autoscrollingRef:p,autoscrollingTimeoutRef:m,contentRef:w,defaultScrollPositionAppliedRef:ee,firstItemRef:O,itemCountRef:k,lastScrollTopRef:A,messageElementsRef:M,modeRef:N,pendingScrollFrameRef:P,pendingScrollToMessageRef:te,prependRestoreRef:ne,preserveScrollOnPrependRef:F,pendingDefaultScrollStore:ce,rootRef:le,scrollEdgeThresholdRef:ue,scrollMarginRef:de,scrollPreviousItemPeekRef:I,spacerGapRef:fe,spacerHeightRef:pe,spacerRef:L,stateFrameRef:R,stateStore:z,viewportRef:B,visibilityFrameRef:V,visibilityObserverRef:H,visibilityStore:U,visibleMessageIdsRef:W,handledScrollAnchorsRef:me}=a,G=o.useRef(t);G.current!==t&&(G.current=t,ee.current=!1);let K=o.useCallback(e=>{let t=le.current,n=B.current,r=[e.start&&`start`,e.end&&`end`].filter(Boolean).join(` `),i=p.current;for(let e of[t,n])e&&(r?e.setAttribute(`data-scrollable`,r):e.removeAttribute(`data-scrollable`),e.toggleAttribute(`data-autoscrolling`,i))},[]),he=o.useCallback(e=>{let t=B.current?.scrollTop??0,n=t<A.current-d;A.current=t,f.current&&!e.end&&N.current!==`settling-jump`&&N.current!==`anchored-to-message`?N.current=`following-bottom`:N.current===`following-bottom`&&e.end&&n&&!p.current&&(N.current=`free-scrolling`)},[]),q=o.useCallback(()=>{let e=g({content:w.current,scrollEdgeThreshold:ue.current,spacer:L.current,viewport:B.current});he(e);let t=N.current===`following-bottom`?{...e,end:!1}:e;K(t),z.setSnapshot(t)},[he,z,K]),J=o.useCallback(()=>{R.current===null&&(R.current=window.requestAnimationFrame(()=>{R.current=null,q()}))},[q]),Y=o.useCallback(()=>{U.hasListeners()&&V.current===null&&(V.current=window.requestAnimationFrame(()=>{V.current=null,U.hasListeners()&&U.setSnapshot(_({content:w.current,scrollMargin:de.current,scrollPreviousItemPeek:I.current,spacer:L.current,viewport:B.current,visibleMessageIds:W.current}))}))},[U]),{flushPendingScrollToMessage:X,reanchorToAnchoredMessage:ge,scrollToElement:Z,scrollToEnd:Q,scrollToMessage:_e,scrollToStart:ve}=oe({refs:a,commitScrollState:q,scheduleStateCommit:J,scheduleVisibilitySync:Y}),ye=o.useCallback(()=>{let e=ne.current,t=B.current;if(!e||!t||!e.element.isConnected)return!1;let n=E(e.element,t)-e.viewportTop;return Math.abs(n)<=d?!1:(t.scrollTop+=n,e.viewportTop=E(e.element,t),J(),Y(),!0)},[J,Y]),$=o.useCallback(()=>{let e=w.current,t=B.current;if(!e||!t){ne.current=null;return}let n=C({content:e,spacer:L.current,viewport:t});ne.current=n?{element:n,viewportTop:E(n,t)}:null},[]),be=o.useCallback(()=>{P.current===null&&(P.current=window.requestAnimationFrame(()=>{P.current=null,X()&&$()}))},[$,X]),xe=o.useCallback(()=>{if(!t||ee.current||k.current===0)return!1;let e=!1;if(t===`last-anchor`){let t=w.current,n=B.current,r=t&&n?S(v(t,L.current)):null;if(!t||!n||!r)e=Q({behavior:`auto`});else{let i=T(r,n);e=D({content:t,spacer:L.current,viewport:n})-i<=n.clientHeight?Q({behavior:`auto`}):Z(r,{align:`start`},{keepPreviousPeek:!0})}}else e=t===`end`?Q({behavior:`auto`}):ve({behavior:`auto`});return e?(ae(a),!0):!1},[t,Z,Q,ve]),Se=o.useCallback(()=>{let e=w.current;if(!e)return;let t=v(e,L.current),n=k.current,r=O.current;k.current=t.length,O.current=t[0]??null,(()=>{if(X())return;if(n===0){if(xe()||t.length>0&&f.current&&Q({behavior:`auto`}))return;q(),Y();return}let e=r?t.indexOf(r):-1;if(F.current&&e>0)ye();else{if(t.length>n){let e=y(t,n);if(e){if(f.current&&N.current===`following-bottom`&&x(t,n)){Q({behavior:`auto`});return}Z(e,{align:`start`},{keepPreviousPeek:!0}),me.current.add(e);return}}if(t.length===n){let e=b(t,me.current);if(e){Z(e,{align:`start`},{keepPreviousPeek:!0}),me.current.add(e);return}}N.current===`following-bottom`&&f.current?Q({behavior:`auto`}):(q(),Y())}})(),$()},[xe,$,q,X,ye,Y,Z,Q]),Ce=o.useCallback(()=>{if(N.current===`following-bottom`&&f.current){Q({behavior:`auto`});return}let e=pe.current;ge()?f.current&&e>0&&pe.current===0&&Q({behavior:`auto`}):(J(),Y())},[ge,J,Y,Q]),we=o.useCallback(()=>{let e=B.current;if(e&&U.hasListeners()){if(typeof IntersectionObserver>`u`){Y();return}H.current||=new IntersectionObserver(e=>{for(let t of e){let e=t.target.dataset.messageId;e&&(t.isIntersecting?W.current.add(e):W.current.delete(e))}Y()},{root:e,rootMargin:`${-(de.current+I.current)}px 0px 0px 0px`,threshold:[0,.01,.5,1]}),M.current.forEach(e=>{H.current?.observe(e)}),Y()}},[Y,U]),Te=o.useCallback(()=>{V.current!==null&&(window.cancelAnimationFrame(V.current),V.current=null),H.current?.disconnect(),H.current=null,W.current.clear(),U.setSnapshot(h)},[U]),Ee=o.useCallback((e,t,n)=>{t?(M.current.set(e,t),H.current?.observe(t),Y(),te.current?.messageId===e&&be()):n&&M.current.get(e)===n&&(M.current.delete(e),W.current.delete(e),H.current?.unobserve(n),Y())},[be,Y]),De=o.useCallback(()=>{(N.current===`following-bottom`||N.current===`anchored-to-message`||N.current===`settling-jump`)&&(s.current=null,N.current=`free-scrolling`)},[]),Oe=o.useCallback(()=>K(z.getSnapshot()),[z,K]),ke=se(le,Oe),Ae=se(B,Oe),je=o.useCallback(e=>{w.current=e},[]),Me=o.useCallback(e=>{L.current=e,fe.current=j(e?.parentElement??null)},[]),Ne=o.useCallback(()=>{q(),Y(),$()},[$,q,Y]),Pe=o.useMemo(()=>({handleContentChange:Se,handleResize:Ce,observeVisibility:we,pendingDefaultScrollStore:ce,preserveScrollOnPrependRef:F,scrollToEnd:Q,scrollToMessage:_e,scrollToStart:ve,setContentElement:je,setRootElement:ke,setSpacerElement:Me,setViewportElement:Ae,stateStore:z,syncAfterScroll:Ne,unobserveVisibility:Te,userScrollIntent:De,viewportRef:B,visibilityStore:U}),[Se,Ce,we,ce,Q,_e,ve,je,ke,Me,Ae,z,Ne,Te,De,U]);return o.useLayoutEffect(()=>{xe()||k.current===0&&ie(a)},[xe]),o.useEffect(()=>()=>{R.current!==null&&(window.cancelAnimationFrame(R.current),R.current=null),V.current!==null&&(window.cancelAnimationFrame(V.current),V.current=null),m.current!==null&&(window.clearTimeout(m.current),m.current=null),P.current!==null&&(window.cancelAnimationFrame(P.current),P.current=null),H.current?.disconnect(),H.current=null},[]),o.useLayoutEffect(()=>{e&&N.current===`following-bottom`&&k.current>0?Q({behavior:`auto`}):q()},[e,q,Q]),{context:Pe,registerMessage:Ee}}function le(e){let t=o.useRef(e);return t.current=e,t}var ue=o.createContext(null),de=o.createContext(null);function I(){let e=o.useContext(ue);if(!e)throw Error(`useMessageScroller must be used within a MessageScroller.`);return e}function fe(){let e=o.useContext(de);if(!e)throw Error(`MessageScrollerItem must be used within a MessageScroller.`);return e}function pe(){let{scrollToEnd:e,scrollToMessage:t,scrollToStart:n}=I();return o.useMemo(()=>({scrollToEnd:e,scrollToMessage:t,scrollToStart:n}),[e,t,n])}function L(){let{stateStore:e}=I();return o.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function R(){let{observeVisibility:e,unobserveVisibility:t,visibilityStore:n}=I(),r=o.useCallback(r=>n.subscribe(r,e,t),[e,t,n]);return o.useSyncExternalStore(r,n.getSnapshot,n.getSnapshot)}function z({autoScroll:e=!1,children:t,defaultScrollPosition:n=`end`,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a}){let{context:o,registerMessage:c}=ce({autoScroll:e,defaultScrollPosition:n,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a});return(0,s.jsx)(ue.Provider,{value:o,children:(0,s.jsx)(de.Provider,{value:c,children:t})})}function B(){let{pendingDefaultScrollStore:e}=I();return o.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function V({children:e,...t}){let{setRootElement:n}=I(),r=B();return(0,s.jsx)(`div`,{ref:n,...t,...r?{"data-pending-scroll":``}:null,children:e})}function H({"aria-label":e,children:n,onKeyDown:r,onScroll:i,onTouchMove:a,onWheel:c,preserveScrollOnPrepend:l=!0,ref:u,role:d,tabIndex:f,...m}){let{handleResize:h,preserveScrollOnPrependRef:g,setViewportElement:_,syncAfterScroll:v,userScrollIntent:y,viewportRef:b}=I(),x=B();g.current=l;let S=o.useCallback(e=>{_(e),t.r(u)?.(e)},[u,_]);function C(e){v(),i?.(e)}function w(e){y(),c?.(e)}function T(e){y(),a?.(e)}function E(e){p.has(e.key)&&y(),r?.(e)}return o.useEffect(()=>{let e=b.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(h)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[h,b]),(0,s.jsx)(`div`,{ref:S,role:d??`region`,"aria-label":e??`Messages`,tabIndex:f??0,onKeyDown:E,onScroll:C,onTouchMove:T,onWheel:w,...m,...x?{"data-pending-scroll":``}:null,children:n})}function U({"aria-relevant":e,children:n,ref:r,role:i,spacerClassName:a,...c}){let{handleContentChange:l,handleResize:u,setContentElement:d,setSpacerElement:f}=I(),p=o.useRef(null),m=o.useCallback(e=>{p.current=e,d(e),t.r(r)?.(e)},[r,d]);return o.useLayoutEffect(()=>{let e=p.current;if(!e||(l(),typeof MutationObserver>`u`))return;let t=new MutationObserver(()=>{l()});return t.observe(e,{childList:!0}),()=>t.disconnect()},[l]),o.useEffect(()=>{let e=p.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(u)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[u]),(0,s.jsxs)(`div`,{ref:m,role:i??`log`,"aria-relevant":e??`additions`,...c,children:[n,(0,s.jsx)(`div`,{ref:f,"aria-hidden":`true`,"data-message-scroller-spacer":``,hidden:!0,className:a})]})}function W({messageId:e,ref:n,scrollAnchor:r=!1,...i}){let a=fe(),c=o.useRef(null),l=o.useCallback(r=>{let i=c.current;c.current=r,e&&a(e,r,i),t.r(n)?.(r)},[e,n,a]);return(0,s.jsx)(`div`,{ref:l,"data-message-id":e,"data-scroll-anchor":r?`true`:`false`,...i})}function me({behavior:e=`smooth`,children:n,direction:r=`end`,onClick:i,render:a,tabIndex:c,type:l=`button`,...u}){let{scrollToEnd:d,scrollToStart:f,stateStore:p}=I(),m=le(i),h=o.useCallback(e=>p.subscribe(e),[p]),g=o.useCallback(()=>{let e=p.getSnapshot();return r===`start`?e.start:e.end},[r,p]),_=o.useSyncExternalStore(h,g,g),v=o.useCallback(t=>{_&&(m.current?.(t),t.defaultPrevented||(t.currentTarget.blur(),r===`start`?f({behavior:e}):d({behavior:e})))},[e,r,_,m,d,f]);return t.t({defaultTagName:`button`,props:t.n({type:l,inert:!_,tabIndex:_?c:-1,children:n??(0,s.jsxs)(`span`,{children:[`Scroll to `,r]}),onClick:v},u),render:a,state:{active:_,direction:r},stateAttributesMapping:{active:e=>({"data-active":e?`true`:`false`})}})}var G={Provider:z,Root:V,Viewport:H,Content:U,Item:W,Button:me};function K(e){return(0,s.jsx)(G.Provider,{...e})}function he({className:e,...t}){return(0,s.jsx)(G.Root,{"data-slot":`message-scroller`,className:n.t(`group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden`,e),...t})}function q({className:e,...t}){return(0,s.jsx)(G.Viewport,{"data-slot":`message-scroller-viewport`,className:n.t(`scroll-fade-b size-full min-h-0 min-w-0 scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible`,e),...t})}function J({className:e,...t}){return(0,s.jsx)(G.Content,{"data-slot":`message-scroller-content`,className:n.t(`flex h-max min-h-full flex-col gap-6`,e),...t})}function Y({className:e,scrollAnchor:t=!1,...r}){return(0,s.jsx)(G.Item,{"data-slot":`message-scroller-item`,scrollAnchor:t,className:n.t(`min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]`,e),...r})}function X({direction:e=`end`,className:t,children:a,render:o,variant:c=`secondary`,size:l=`icon-sm`,...u}){return(0,s.jsx)(G.Button,{"data-slot":`message-scroller-button`,"data-direction":e,"data-variant":c,"data-size":l,direction:e,className:n.t(`border-border bg-background text-foreground hover:bg-muted hover:text-foreground absolute inset-s-1/2 -translate-x-1/2 transition-[translate,scale,opacity] duration-200 data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180`,t),render:o??(0,s.jsx)(r.Button,{variant:c,size:l}),...u,children:a??(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.ArrowDownIcon,{}),(0,s.jsx)(`span`,{className:`sr-only`,children:e===`end`?`Scroll to end`:`Scroll to start`})]})})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return he}});
@@ -1,638 +0,0 @@
1
- import { t as e } from "./dist-DoWtzxYc.mjs";
2
- import { t } from "./dist-COqM3IM6.mjs";
3
- import { t as n } from "./dist-B76UOZbx.mjs";
4
- import { n as r, t as i } from "./dist-B7Ph9-T6.mjs";
5
- import { t as a } from "./dist-DKI-XYwI.mjs";
6
- import { a as o, r as s } from "./dist-C516Vwxy.mjs";
7
- import { n as c } from "./dist-dwRwxUPt.mjs";
8
- import { t as l } from "./dist-BnlI08Je.mjs";
9
- import { t as u } from "./dist-Cu0GG-3j.mjs";
10
- import { t as d } from "./dist-C2BHd5i1.mjs";
11
- import { t as f } from "./dist-CbWpCWog.mjs";
12
- import { t as p } from "./dist-DhubV_gU.mjs";
13
- import { t as m } from "./dist-AlmToDtO.mjs";
14
- import { n as h } from "./dist-ljiGYyay.mjs";
15
- import { ChevronDownIcon as g } from "lucide-react";
16
- import * as _ from "react";
17
- import * as v from "react-dom";
18
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
19
- import { cva as S } from "class-variance-authority";
20
- // ../../node_modules/.bun/@radix-ui+react-use-previous@1.1.4+0ac650c021fb1b59/node_modules/@radix-ui/react-use-previous/dist/index.mjs
21
- var C = Object.defineProperty, w = (e, t) => C(e, "name", {
22
- value: t,
23
- configurable: !0
24
- });
25
- function T(e) {
26
- let t = _.useRef({
27
- value: e,
28
- previous: e
29
- });
30
- return _.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
31
- }
32
- w(T, "usePrevious");
33
- // ../../node_modules/.bun/@radix-ui+react-navigation-menu@1.4.1+2b23df507bdda662/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
34
- var E = Object.defineProperty, D = (e, t) => E(e, "name", {
35
- value: t,
36
- configurable: !0
37
- }), O = {
38
- Automatic: "automatic",
39
- Manual: "manual"
40
- }, ee = {
41
- Vertical: "vertical",
42
- Horizontal: "horizontal"
43
- }, k = {
44
- LTR: "ltr",
45
- RTL: "rtl"
46
- }, A = "NavigationMenu", [j, M, N] = d(A), [P, te, ne] = d(A), [F, re] = t(A, [N, ne]), [ie, I] = F(A), [ae, oe] = F(A), se = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
47
- let { __scopeNavigationMenu: n, value: r, onValueChange: s, defaultValue: l, delayDuration: u = 200, skipDelayDuration: d = 300, orientation: f = ee.Horizontal, dir: p, activationMode: m = O.Automatic, ...h } = e, [g, v] = _.useState(null), y = o(t, v), x = c(p), S = _.useRef(0), C = _.useRef(0), w = _.useRef(0), [T, E] = _.useState(!0), [k, j] = a({
48
- prop: r,
49
- onChange: /* @__PURE__ */ D((e) => {
50
- let t = e !== "", n = d > 0;
51
- t ? (window.clearTimeout(w.current), n && E(!1)) : (window.clearTimeout(w.current), w.current = window.setTimeout(() => E(!0), d)), s?.(e);
52
- }, "onChange"),
53
- defaultProp: l ?? "",
54
- caller: A
55
- }), M = _.useCallback(() => {
56
- window.clearTimeout(C.current), C.current = window.setTimeout(() => j(""), 150);
57
- }, [j]), N = _.useCallback((e) => {
58
- window.clearTimeout(C.current), j(e);
59
- }, [j]), P = _.useCallback((e) => {
60
- k === e ? window.clearTimeout(C.current) : S.current = window.setTimeout(() => {
61
- window.clearTimeout(C.current), j(e);
62
- }, u);
63
- }, [
64
- k,
65
- j,
66
- u
67
- ]);
68
- return _.useEffect(() => () => {
69
- window.clearTimeout(S.current), window.clearTimeout(C.current), window.clearTimeout(w.current);
70
- }, []), /* @__PURE__ */ b(ce, {
71
- scope: n,
72
- isRootMenu: !0,
73
- value: k,
74
- dir: x,
75
- orientation: f,
76
- activationMode: m,
77
- rootNavigationMenu: g,
78
- onTriggerEnter: (e) => {
79
- m === O.Automatic && (window.clearTimeout(S.current), T ? P(e) : N(e));
80
- },
81
- onTriggerLeave: () => {
82
- m === O.Automatic && (window.clearTimeout(S.current), M());
83
- },
84
- onContentEnter: () => {
85
- m === O.Automatic && window.clearTimeout(C.current);
86
- },
87
- onContentLeave: () => {
88
- m === O.Automatic && M();
89
- },
90
- onItemSelect: (e) => {
91
- j((t) => t === e ? "" : e);
92
- },
93
- onItemDismiss: () => j(""),
94
- children: /* @__PURE__ */ b(i.nav, {
95
- "aria-label": "Main",
96
- "data-orientation": f,
97
- dir: x,
98
- ...h,
99
- ref: y
100
- })
101
- });
102
- }, "NavigationMenu")), ce = /* @__PURE__ */ D((e) => {
103
- let { scope: t, isRootMenu: n, rootNavigationMenu: r, dir: i, orientation: a, activationMode: o, children: s, value: c, onItemSelect: l, onItemDismiss: d, onTriggerEnter: f, onTriggerLeave: p, onContentEnter: h, onContentLeave: g } = e, [v, y] = _.useState(null), [x, S] = _.useState(/* @__PURE__ */ new Map()), [C, w] = _.useState(null);
104
- return /* @__PURE__ */ b(ie, {
105
- scope: t,
106
- isRootMenu: n,
107
- rootNavigationMenu: r,
108
- value: c,
109
- previousValue: T(c),
110
- baseId: u(),
111
- dir: i,
112
- orientation: a,
113
- activationMode: o,
114
- viewport: v,
115
- onViewportChange: y,
116
- indicatorTrack: C,
117
- onIndicatorTrackChange: w,
118
- onTriggerEnter: m(f),
119
- onTriggerLeave: m(p),
120
- onContentEnter: m(h),
121
- onContentLeave: m(g),
122
- onItemSelect: m(l),
123
- onItemDismiss: m(d),
124
- onViewportContentChange: _.useCallback((e, t) => {
125
- S((n) => (n.set(e, t), new Map(n)));
126
- }, []),
127
- onViewportContentRemove: _.useCallback((e) => {
128
- S((t) => t.has(e) ? (t.delete(e), new Map(t)) : t);
129
- }, []),
130
- children: /* @__PURE__ */ b(j.Provider, {
131
- scope: t,
132
- children: /* @__PURE__ */ b(ae, {
133
- scope: t,
134
- items: x,
135
- children: s
136
- })
137
- })
138
- });
139
- }, "NavigationMenuProvider"), le = "NavigationMenuList", ue = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
140
- let { __scopeNavigationMenu: n, ...r } = e, a = I(le, n), o = /* @__PURE__ */ b(i.ul, {
141
- "data-orientation": a.orientation,
142
- ...r,
143
- ref: t
144
- });
145
- return /* @__PURE__ */ b(i.div, {
146
- style: { position: "relative" },
147
- ref: a.onIndicatorTrackChange,
148
- children: /* @__PURE__ */ b(j.Slot, {
149
- scope: n,
150
- children: a.isRootMenu ? /* @__PURE__ */ b(we, {
151
- asChild: !0,
152
- children: o
153
- }) : o
154
- })
155
- });
156
- }, "NavigationMenuList")), [de, L] = F("NavigationMenuItem"), fe = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
157
- let { __scopeNavigationMenu: n, value: r, ...a } = e, o = u(), s = r || o || "LEGACY_REACT_AUTO_VALUE", c = _.useRef(null), l = _.useRef(null), d = _.useRef(null), f = _.useRef(() => {}), p = _.useRef(!1), m = _.useCallback((e = "start") => {
158
- if (c.current) {
159
- f.current();
160
- let t = G(c.current);
161
- t.length && K(e === "start" ? t : t.reverse());
162
- }
163
- }, []), h = _.useCallback(() => {
164
- if (c.current) {
165
- let e = G(c.current);
166
- e.length && (f.current = Oe(e));
167
- }
168
- }, []);
169
- return /* @__PURE__ */ b(de, {
170
- scope: n,
171
- value: s,
172
- triggerRef: l,
173
- contentRef: c,
174
- focusProxyRef: d,
175
- wasEscapeCloseRef: p,
176
- onEntryKeyDown: m,
177
- onFocusProxyEnter: m,
178
- onRootContentClose: h,
179
- onContentFocusOutside: h,
180
- children: /* @__PURE__ */ b(i.li, {
181
- ...a,
182
- ref: t
183
- })
184
- });
185
- }, "NavigationMenuItem")), R = "NavigationMenuTrigger", pe = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
186
- let { __scopeNavigationMenu: r, disabled: a, ...s } = e, c = I(R, e.__scopeNavigationMenu), l = L(R, e.__scopeNavigationMenu), u = _.useRef(null), d = o(u, l.triggerRef, t), f = Y(c.baseId, l.value), p = X(c.baseId, l.value), m = _.useRef(!1), g = _.useRef(!1), v = l.value === c.value;
187
- return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(j.ItemSlot, {
188
- scope: r,
189
- value: l.value,
190
- children: /* @__PURE__ */ b(De, {
191
- asChild: !0,
192
- children: /* @__PURE__ */ b(i.button, {
193
- id: f,
194
- disabled: a,
195
- "data-disabled": a ? "" : void 0,
196
- "data-state": J(v),
197
- "aria-expanded": v,
198
- "aria-controls": v ? p : void 0,
199
- ...s,
200
- ref: d,
201
- onPointerEnter: n(e.onPointerEnter, () => {
202
- g.current = !1, l.wasEscapeCloseRef.current = !1;
203
- }),
204
- onPointerMove: n(e.onPointerMove, Z(() => {
205
- a || g.current || l.wasEscapeCloseRef.current || m.current || (c.onTriggerEnter(l.value), m.current = !0);
206
- })),
207
- onPointerLeave: n(e.onPointerLeave, Z(() => {
208
- a || (c.onTriggerLeave(), m.current = !1);
209
- })),
210
- onClick: n(e.onClick, () => {
211
- c.onItemSelect(l.value), g.current = v;
212
- }),
213
- onKeyDown: n(e.onKeyDown, (e) => {
214
- let t = {
215
- horizontal: "ArrowDown",
216
- vertical: c.dir === k.RTL ? "ArrowLeft" : "ArrowRight"
217
- }[c.orientation];
218
- v && e.key === t && (l.onEntryKeyDown(), e.preventDefault());
219
- })
220
- })
221
- })
222
- }), v && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(h, {
223
- "aria-hidden": !0,
224
- tabIndex: 0,
225
- ref: l.focusProxyRef,
226
- onFocus: (e) => {
227
- let t = l.contentRef.current, n = e.relatedTarget, r = n === u.current, i = t?.contains(n);
228
- (r || !i) && l.onFocusProxyEnter(r ? "start" : "end");
229
- }
230
- }), c.viewport && /* @__PURE__ */ b("span", { "aria-owns": p })] })] });
231
- }, "NavigationMenuTrigger")), z = "navigationMenu.linkSelect", me = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
232
- let { __scopeNavigationMenu: a, active: o, onSelect: s, ...c } = e;
233
- return /* @__PURE__ */ b(De, {
234
- asChild: !0,
235
- children: /* @__PURE__ */ b(i.a, {
236
- "data-active": o ? "" : void 0,
237
- "aria-current": o ? "page" : void 0,
238
- ...c,
239
- ref: t,
240
- onClick: n(e.onClick, (e) => {
241
- let t = e.target, n = new CustomEvent(z, {
242
- bubbles: !0,
243
- cancelable: !0
244
- });
245
- if (t.addEventListener(z, (e) => s?.(e), { once: !0 }), r(t, n), !n.defaultPrevented && !e.metaKey) {
246
- let e = new CustomEvent(H, {
247
- bubbles: !0,
248
- cancelable: !0
249
- });
250
- r(t, e);
251
- }
252
- }, { checkForDefaultPrevented: !1 })
253
- })
254
- });
255
- }, "NavigationMenuLink")), B = "NavigationMenuIndicator", he = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
256
- let { forceMount: n, ...r } = e, i = I(B, e.__scopeNavigationMenu), a = !!i.value;
257
- return i.indicatorTrack ? v.createPortal(/* @__PURE__ */ b(l, {
258
- present: n || a,
259
- children: /* @__PURE__ */ b(ge, {
260
- ...r,
261
- ref: t
262
- })
263
- }), i.indicatorTrack) : null;
264
- }, "NavigationMenuIndicator")), ge = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
265
- let { __scopeNavigationMenu: n, ...r } = e, a = I(B, n), o = M(n), [s, c] = _.useState(null), [l, u] = _.useState(null), d = a.orientation === ee.Horizontal, f = !!a.value;
266
- _.useEffect(() => {
267
- let e = o().find((e) => e.value === a.value)?.ref.current;
268
- e && c(e);
269
- }, [o, a.value]);
270
- let p = /* @__PURE__ */ D(() => {
271
- s && u({
272
- size: d ? s.offsetWidth : s.offsetHeight,
273
- offset: d ? s.offsetLeft : s.offsetTop
274
- });
275
- }, "handlePositionChange");
276
- return q(s, p), q(a.indicatorTrack, p), l ? /* @__PURE__ */ b(i.div, {
277
- "aria-hidden": !0,
278
- "data-state": f ? "visible" : "hidden",
279
- "data-orientation": a.orientation,
280
- ...r,
281
- ref: t,
282
- style: {
283
- position: "absolute",
284
- ...d ? {
285
- left: 0,
286
- width: l.size + "px",
287
- transform: `translateX(${l.offset}px)`,
288
- "--radix-navigation-menu-indicator-translate-x": `${l.offset}px`
289
- } : {
290
- top: 0,
291
- height: l.size + "px",
292
- transform: `translateY(${l.offset}px)`,
293
- "--radix-navigation-menu-indicator-translate-y": `${l.offset}px`
294
- },
295
- ...r.style
296
- }
297
- }) : null;
298
- }, "NavigationMenuIndicatorImpl")), V = "NavigationMenuContent", _e = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
299
- let { forceMount: r, ...i } = e, a = I(V, e.__scopeNavigationMenu), s = L(V, e.__scopeNavigationMenu), c = o(s.contentRef, t), u = s.value === a.value, d = J(u), f = {
300
- value: s.value,
301
- triggerRef: s.triggerRef,
302
- focusProxyRef: s.focusProxyRef,
303
- wasEscapeCloseRef: s.wasEscapeCloseRef,
304
- onContentFocusOutside: s.onContentFocusOutside,
305
- onRootContentClose: s.onRootContentClose,
306
- ...i
307
- };
308
- return a.viewport ? /* @__PURE__ */ b(ve, {
309
- "data-state": d,
310
- forceMount: r,
311
- ...f,
312
- ref: c
313
- }) : /* @__PURE__ */ b(l, {
314
- present: r || u,
315
- children: /* @__PURE__ */ b(U, {
316
- "data-state": d,
317
- ...f,
318
- ref: c,
319
- onPointerEnter: n(e.onPointerEnter, a.onContentEnter),
320
- onPointerLeave: n(e.onPointerLeave, Z(a.onContentLeave)),
321
- style: {
322
- pointerEvents: !u && a.isRootMenu ? "none" : void 0,
323
- ...f.style
324
- }
325
- })
326
- });
327
- }, "NavigationMenuContent")), ve = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
328
- let { onViewportContentChange: n, onViewportContentRemove: r } = I(V, e.__scopeNavigationMenu);
329
- return p(() => {
330
- n(e.value, {
331
- ref: t,
332
- ...e
333
- });
334
- }, [
335
- e,
336
- t,
337
- n
338
- ]), p(() => () => r(e.value), [e.value, r]), null;
339
- }, "ViewportContentMounter")), H = "navigationMenu.rootContentDismiss", U = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
340
- let { __scopeNavigationMenu: r, value: i, triggerRef: a, focusProxyRef: s, wasEscapeCloseRef: c, onRootContentClose: l, onContentFocusOutside: u, ...d } = e, p = I(V, r), m = _.useRef(null), h = o(m, t), g = Y(p.baseId, i), v = X(p.baseId, i), y = M(r), x = _.useRef(null), { onItemDismiss: S } = p;
341
- _.useEffect(() => {
342
- let e = m.current;
343
- if (p.isRootMenu && e) {
344
- let t = /* @__PURE__ */ D(() => {
345
- S(), l(), e.contains(document.activeElement) && a.current?.focus();
346
- }, "handleClose");
347
- return e.addEventListener(H, t), () => e.removeEventListener(H, t);
348
- }
349
- }, [
350
- p.isRootMenu,
351
- e.value,
352
- a,
353
- S,
354
- l
355
- ]);
356
- let C = _.useMemo(() => {
357
- let e = y().map((e) => e.value);
358
- p.dir === k.RTL && e.reverse();
359
- let t = e.indexOf(p.value), n = e.indexOf(p.previousValue), r = i === p.value, a = n === e.indexOf(i);
360
- if (!r && !a) return x.current;
361
- let o = (() => {
362
- if (t !== n) {
363
- if (r && n !== -1) return t > n ? "from-end" : "from-start";
364
- if (a && t !== -1) return t > n ? "to-start" : "to-end";
365
- }
366
- return null;
367
- })();
368
- return x.current = o, o;
369
- }, [
370
- p.previousValue,
371
- p.value,
372
- p.dir,
373
- y,
374
- i
375
- ]);
376
- return /* @__PURE__ */ b(we, {
377
- asChild: !0,
378
- children: /* @__PURE__ */ b(f, {
379
- id: v,
380
- "aria-labelledby": g,
381
- "data-motion": C,
382
- "data-orientation": p.orientation,
383
- ...d,
384
- ref: h,
385
- disableOutsidePointerEvents: !1,
386
- onDismiss: () => {
387
- let e = new Event(H, {
388
- bubbles: !0,
389
- cancelable: !0
390
- });
391
- m.current?.dispatchEvent(e);
392
- },
393
- onFocusOutside: n(e.onFocusOutside, (e) => {
394
- u();
395
- let t = e.target, n = e.detail.originalEvent.relatedTarget, r = p.rootNavigationMenu?.contains(t), i = p.rootNavigationMenu?.contains(n);
396
- (r || !i) && e.preventDefault();
397
- }),
398
- onPointerDownOutside: n(e.onPointerDownOutside, (e) => {
399
- let t = e.target, n = y().some((e) => e.ref.current?.contains(t)), r = p.isRootMenu && p.viewport?.contains(t);
400
- (n || r || !p.isRootMenu) && e.preventDefault();
401
- }),
402
- onKeyDown: n(e.onKeyDown, (e) => {
403
- let t = e.altKey || e.ctrlKey || e.metaKey;
404
- if (e.key === "Tab" && !t) {
405
- let t = G(e.currentTarget), n = document.activeElement, r = t.findIndex((e) => e === n);
406
- K(e.shiftKey ? t.slice(0, r).reverse() : t.slice(r + 1, t.length)) ? e.preventDefault() : s.current?.focus();
407
- }
408
- }),
409
- onEscapeKeyDown: n(e.onEscapeKeyDown, (e) => {
410
- c.current = !0;
411
- })
412
- })
413
- });
414
- }, "NavigationMenuContentImpl")), W = "NavigationMenuViewport", ye = s(W), be = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
415
- let { forceMount: n, ...r } = e, i = !!I(W, e.__scopeNavigationMenu).value;
416
- return /* @__PURE__ */ b(l, {
417
- present: n || i,
418
- children: /* @__PURE__ */ b(xe, {
419
- ...r,
420
- ref: t
421
- })
422
- });
423
- }, "NavigationMenuViewport")), xe = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
424
- let { __scopeNavigationMenu: r, children: a, ...s } = e, c = I(W, r), u = o(t, c.onViewportChange), d = oe(V, e.__scopeNavigationMenu), [f, p] = _.useState(null), [m, h] = _.useState(null), g = f ? f?.width + "px" : void 0, v = f ? f?.height + "px" : void 0, y = !!c.value, S = y ? c.value : c.previousValue;
425
- return q(m, /* @__PURE__ */ D(() => {
426
- m && p({
427
- width: m.offsetWidth,
428
- height: m.offsetHeight
429
- });
430
- }, "handleSizeChange")), /* @__PURE__ */ x(i.div, {
431
- "data-state": J(y),
432
- "data-orientation": c.orientation,
433
- ...s,
434
- ref: u,
435
- style: {
436
- pointerEvents: !y && c.isRootMenu ? "none" : void 0,
437
- "--radix-navigation-menu-viewport-width": g,
438
- "--radix-navigation-menu-viewport-height": v,
439
- ...s.style
440
- },
441
- onPointerEnter: n(e.onPointerEnter, c.onContentEnter),
442
- onPointerLeave: n(e.onPointerLeave, Z(c.onContentLeave)),
443
- children: [/* @__PURE__ */ b(ye, { children: a }), Array.from(d.items).map(([e, { ref: t, forceMount: n, ...r }]) => {
444
- let i = S === e;
445
- return /* @__PURE__ */ b(l, {
446
- present: n || i,
447
- children: /* @__PURE__ */ b(Se, {
448
- ...r,
449
- contentRef: t,
450
- isActive: i,
451
- onActiveContentChange: h
452
- })
453
- }, e);
454
- })]
455
- });
456
- }, "NavigationMenuViewportImpl")), Se = /* @__PURE__ */ D(({ contentRef: e, isActive: t, onActiveContentChange: n, ...r }) => {
457
- let i = _.useCallback((e) => {
458
- t && e && n(e);
459
- }, [t, n]), a = o(e, i);
460
- return /* @__PURE__ */ b(U, {
461
- ...r,
462
- ref: a
463
- });
464
- }, "NavigationMenuViewportItem"), Ce = "FocusGroup", we = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
465
- let { __scopeNavigationMenu: n, ...r } = e, a = I(Ce, n);
466
- return /* @__PURE__ */ b(P.Provider, {
467
- scope: n,
468
- children: /* @__PURE__ */ b(P.Slot, {
469
- scope: n,
470
- children: /* @__PURE__ */ b(i.div, {
471
- dir: a.dir,
472
- ...r,
473
- ref: t
474
- })
475
- })
476
- });
477
- }, "FocusGroup")), Te = [
478
- "ArrowRight",
479
- "ArrowLeft",
480
- "ArrowUp",
481
- "ArrowDown"
482
- ], Ee = "FocusGroupItem", De = /* @__PURE__ */ _.forwardRef(/* @__PURE__ */ D(function(e, t) {
483
- let { __scopeNavigationMenu: r, ...a } = e, o = te(r), s = I(Ee, r);
484
- return /* @__PURE__ */ b(P.ItemSlot, {
485
- scope: r,
486
- children: /* @__PURE__ */ b(i.button, {
487
- ...a,
488
- ref: t,
489
- onKeyDown: n(e.onKeyDown, (e) => {
490
- if ([
491
- "Home",
492
- "End",
493
- ...Te
494
- ].includes(e.key)) {
495
- let t = o().map((e) => e.ref.current);
496
- if ([
497
- s.dir === k.RTL ? "ArrowRight" : "ArrowLeft",
498
- "ArrowUp",
499
- "End"
500
- ].includes(e.key) && t.reverse(), Te.includes(e.key)) {
501
- let n = t.indexOf(e.currentTarget);
502
- t = t.slice(n + 1);
503
- }
504
- setTimeout(() => K(t)), e.preventDefault();
505
- }
506
- })
507
- })
508
- });
509
- }, "FocusGroupItem"));
510
- function G(e) {
511
- let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ D((e) => {
512
- let t = e.tagName === "INPUT" && e.type === "hidden";
513
- return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
514
- }, "acceptNode") });
515
- for (; n.nextNode();) t.push(n.currentNode);
516
- return t;
517
- }
518
- D(G, "getTabbableCandidates");
519
- function K(e) {
520
- let t = document.activeElement;
521
- return e.some((e) => e === t || (e.focus(), document.activeElement !== t));
522
- }
523
- D(K, "focusFirst");
524
- function Oe(e) {
525
- return e.forEach((e) => {
526
- e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
527
- }), () => {
528
- e.forEach((e) => {
529
- let t = e.dataset.tabindex;
530
- e.setAttribute("tabindex", t);
531
- });
532
- };
533
- }
534
- D(Oe, "removeFromTabOrder");
535
- function q(e, t) {
536
- let n = m(t);
537
- p(() => {
538
- let t = 0;
539
- if (e) {
540
- let r = new ResizeObserver(() => {
541
- cancelAnimationFrame(t), t = window.requestAnimationFrame(n);
542
- });
543
- return r.observe(e), () => {
544
- window.cancelAnimationFrame(t), r.unobserve(e);
545
- };
546
- }
547
- }, [e, n]);
548
- }
549
- D(q, "useResizeObserver");
550
- function J(e) {
551
- return e ? "open" : "closed";
552
- }
553
- D(J, "getOpenState");
554
- function Y(e, t) {
555
- return `${e}-trigger-${t}`;
556
- }
557
- D(Y, "makeTriggerId");
558
- function X(e, t) {
559
- return `${e}-content-${t}`;
560
- }
561
- D(X, "makeContentId");
562
- function Z(e) {
563
- return (t) => t.pointerType === "mouse" ? e(t) : void 0;
564
- }
565
- D(Z, "whenMouse");
566
- // src/navigation-menu.tsx
567
- function ke({ className: t, children: n, viewport: r = !0, ...i }) {
568
- return /* @__PURE__ */ x(se, {
569
- "data-slot": "navigation-menu",
570
- "data-viewport": r,
571
- className: e("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", t),
572
- ...i,
573
- children: [n, r && /* @__PURE__ */ b($, {})]
574
- });
575
- }
576
- function Ae({ className: t, ...n }) {
577
- return /* @__PURE__ */ b(ue, {
578
- "data-slot": "navigation-menu-list",
579
- className: e("group flex flex-1 list-none items-center justify-center gap-0", t),
580
- ...n
581
- });
582
- }
583
- function je({ className: t, ...n }) {
584
- return /* @__PURE__ */ b(fe, {
585
- "data-slot": "navigation-menu-item",
586
- className: e("relative", t),
587
- ...n
588
- });
589
- }
590
- var Q = S("group/navigation-menu-trigger hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50");
591
- function Me({ className: t, children: n, ...r }) {
592
- return /* @__PURE__ */ x(pe, {
593
- "data-slot": "navigation-menu-trigger",
594
- className: e(Q(), "group", t),
595
- ...r,
596
- children: [
597
- n,
598
- " ",
599
- /* @__PURE__ */ b(g, {
600
- className: "relative top-px ms-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180",
601
- "aria-hidden": "true"
602
- })
603
- ]
604
- });
605
- }
606
- function Ne({ className: t, ...n }) {
607
- return /* @__PURE__ */ b(_e, {
608
- "data-slot": "navigation-menu-content",
609
- className: e("group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:ring-foreground/10 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 start-0 top-0 w-full p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto", t),
610
- ...n
611
- });
612
- }
613
- function $({ className: t, ...n }) {
614
- return /* @__PURE__ */ b("div", {
615
- className: e("absolute start-0 top-full isolate z-50 flex justify-center"),
616
- children: /* @__PURE__ */ b(be, {
617
- "data-slot": "navigation-menu-viewport",
618
- className: e("origin-top-center bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-90 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg shadow ring-1 duration-100 md:w-(--radix-navigation-menu-viewport-width)", t),
619
- ...n
620
- })
621
- });
622
- }
623
- function Pe({ className: t, ...n }) {
624
- return /* @__PURE__ */ b(me, {
625
- "data-slot": "navigation-menu-link",
626
- className: e("hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md [&_svg:not([class*='size-'])]:size-4", t),
627
- ...n
628
- });
629
- }
630
- function Fe({ className: t, ...n }) {
631
- return /* @__PURE__ */ b(he, {
632
- "data-slot": "navigation-menu-indicator",
633
- className: e("data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden", t),
634
- ...n,
635
- children: /* @__PURE__ */ b("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-ss-sm shadow-md" })
636
- });
637
- }
638
- export { Pe as a, $ as c, je as i, Q as l, Ne as n, Ae as o, Fe as r, Me as s, ke as t };