PageSourceSearch

https://soulmessages-lab.lovable.app/assets/tabs-DploLokH.js

js soulmessages-lab.lovable.app collected 2026-10-03 03:45:23 UTC 6,820 bytes, 1 lines download raw bytes

vendor: 1,821 bytes, line 1
1import{r as a,j as i}from"./index-Co_COyci.js";import{P as x,c as T,a as k,u as K}from"./index-ClhDynps.js";import{c as de,u as L}from"./index-D4YAOlz_.js";import{u as fe}from"./index-BVi1qgC0.js";import{u as O}from"./index-Dk27SgpW.js";import{u as ve}from"./index-C9aTaZWx.js";import{P as me}from"./index-zIssVxW5.js";import{c as j}from"./utils-BQHNewu7.js";var N="rovingFocusGroup.onEntryFocus",be={bubbles:!1,cancelable:!0},C="RovingFocusGroup",[P,V,pe]=de(C),[ge,U]=k(C,[pe]),[Te,Ie]=ge(C),$=a.forwardRef((e,t)=>i.jsx(P.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(P.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Fe,{...e,ref:t})})}));$.displayName=C;var Fe=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:l=!1,dir:d,currentTabStopId:s,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:g,onEntryFocus:m,preventScrollOnEntryFocus:r=!1,...c}=e,b=a.useRef(null),w=fe(t,b),h=L(d),[y,u]=K({prop:s,defaultProp:v??null,onChange:g,caller:C}),[I,S]=a.useState(!1),p=ve(m),F=V(n),_=a.useRef(!1),[se,M]=a.useState(0);return a.useEffect(()=>{const f=b.current;if(f)return f.addEventListener(N,p),()=>f.removeEventListener(N,p)},[p]),i.jsx(Te,{scope:n,orientation:o,dir:h,loop:l,currentTabStopId:y,onItemFocus:a.useCallback(f=>u(f),[u]),onItemShiftTab:a.useCallback(()=>S(!0),[]),onFocusableItemAdd:a.useCallback(()=>M(f=>f+1),[]),onFocusableItemRemove:a.useCallback(()=>M(f=>f-1),[]),children:i.jsx(x.div,{tabIndex:I||se===0?-1:0,"data-orientation":o,...c,ref:w,style:{outline:"none",...e.style},onMouseDown:T(e.onMouseDown,()=>{_.current=!0}),onFocus:T(e.onFocus,f=>{const ie=!_.current;if(f.target===f.currentTarget&&ie&&!I){const G=new CustomEvent(N,be);if(f.currentTarget.dispatchEvent(G),!G.defaultPrevented){const A=F().filter(R=>R.focusable),ce=A.find(R=>R.active),ue=A.find(R=>
vendor: 4,683 bytes, line 1
1R.id===y),le=[ce,ue,...A].filter(Boolean).map(R=>R.ref.current);z(le,r)}}_.current=!1}),onBlur:T(e.onBlur,()=>S(!1))})})}),B="RovingFocusGroupItem",Y=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:l=!1,tabStopId:d,children:s,...v}=e,g=O(),m=d||g,r=Ie(B,n),c=r.currentTabStopId===m,b=V(n),{onFocusableItemAdd:w,onFocusableItemRemove:h,currentTabStopId:y}=r;return a.useEffect(()=>{if(o)return w(),()=>h()},[o,w,h]),i.jsx(P.ItemSlot,{scope:n,id:m,focusable:o,active:l,children:i.jsx(x.span,{tabIndex:c?0:-1,"data-orientation":r.orientation,...v,ref:t,onMouseDown:T(e.onMouseDown,u=>{o?r.onItemFocus(m):u.preventDefault()}),onFocus:T(e.onFocus,()=>r.onItemFocus(m)),onKeyDown:T(e.onKeyDown,u=>{if(u.key==="Tab"&&u.shiftKey){r.onItemShiftTab();return}if(u.target!==u.currentTarget)return;const I=Ce(u,r.orientation,r.dir);if(I!==void 0){if(u.metaKey||u.ctrlKey||u.altKey||u.shiftKey)return;u.preventDefault();let p=b().filter(F=>F.focusable).map(F=>F.ref.current);if(I==="last")p.reverse();else if(I==="prev"||I==="next"){I==="prev"&&p.reverse();const F=p.indexOf(u.currentTarget);p=r.loop?we(p,F+1):p.slice(F+1)}setTimeout(()=>z(p))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:y!=null}):s})})});Y.displayName=B;var Re={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ce(e,t,n){const o=xe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Re[o]}function z(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function we(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var he=$,ye=Y,E="Tabs",[Ee]=k(E,[U]),H=U(),[Se,D]=Ee(E),q=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:l,defaultValue:d,orientation:s="horizontal",dir:v,activationMode:g="automatic",...m}=e,r=L(v),[c,b]=K({prop:o,onChange:l,defaultProp:d??"",caller:E});return i.jsx(Se,{scope:n,baseId:O(),value:c,onValueChange:b,orientation:s,dir:r,activationMode:g,children:i.jsx(x.div,{dir:r,"data-orientation":s,...m,ref:t})})});q.displayName=E;var J="TabsList",Q=a.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...l}=e,d=D(J,n),s=H(n);return i.jsx(he,{asChild:!0,...s,orientation:d.orientation,dir:d.dir,loop:o,children:i.jsx(x.div,{role:"tablist","aria-orientation":d.orientation,...l,ref:t})})});Q.displayName=J;var W="TabsTrigger",X=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:l=!1,...d}=e,s=D(W,n),v=H(n),g=te(s.baseId,o),m=oe(s.baseId,o),r=o===s.value;return i.jsx(ye,{asChild:!0,...v,focusable:!l,active:r,children:i.jsx(x.button,{type:"button",role:"tab","aria-selected":r,"aria-controls":m,"data-state":r?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:g,...d,ref:t,onMouseDown:T(e.onMouseDown,c=>{!l&&c.button===0&&c.ctrlKey===!1?s.onValueChange(o):c.preventDefault()}),onKeyDown:T(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(o)}),onFocus:T(e.onFocus,()=>{const c=s.activationMode!=="manual";!r&&!l&&c&&s.onValueChange(o)})})})});X.displayName=W;var Z="TabsContent",ee=a.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:l,children:d,...s}=e,v=D(Z,n),g=te(v.baseId,o),m=oe(v.baseId,o),r=o===v.value,c=a.useRef(r);return a.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),i.jsx(me,{present:l||r,children:({present:b})=>i.jsx(x.div,{"data-state":r?"active":"inactive","data-orientation":v.orientation,role:"tabpanel","aria-labelledby":g,hidden:!b,id:m,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:b&&d})})});ee.displayName=Z;function te(e,t){return`${e}-trigger-${t}`}function oe(e,t){return`${e}-content-${t}`}var _e=q,ne=Q,re=X,ae=ee;const Ue=_e,Ae=a.forwardRef(({className:e,...t},n)=>i.jsx(ne,{ref:n,className:j("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Ae.displayName=ne.displayName;const Ne=a.forwardRef(({className:e,...t},n)=>i.jsx(re,{ref:n,className:j("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background cursor-pointer transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));
1Ne.displayName=re.displayName;const Pe=a.forwardRef(({className:e,...t},n)=>i.jsx(ae,{ref:n,className:j("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Pe.displayName=ae.displayName;export{Ue as T,Ae as a,Ne as b,Pe as c};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.