@tapflowio/relay 0.11.0 → 0.12.0
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/api/builds.d.ts +19 -3
- package/dist/api/builds.d.ts.map +1 -1
- package/dist/api/builds.js +203 -42
- package/dist/api/builds.js.map +1 -1
- package/package.json +3 -3
- package/public/assets/AppCenter-DbFf7BKA.js +21 -0
- package/public/assets/AppCenter-DbFf7BKA.js.br +0 -0
- package/public/assets/{Default-B8SzMopQ.js → Default-BXiTKHz2.js} +1 -1
- package/public/assets/Default-BXiTKHz2.js.br +0 -0
- package/public/assets/{Invite-BmR_FIA1.js → Invite-Dw4wdx9j.js} +1 -1
- package/public/assets/Invite-Dw4wdx9j.js.br +0 -0
- package/public/assets/{MacResources-CXzOp5kx.js → MacResources-D-j1pG9s.js} +1 -1
- package/public/assets/MacResources-D-j1pG9s.js.br +0 -0
- package/public/assets/{NotFound-BWw23bIi.js → NotFound-BwAREUV8.js} +1 -1
- package/public/assets/NotFound-BwAREUV8.js.br +2 -0
- package/public/assets/QASession-Du5LOUTZ.js +130 -0
- package/public/assets/QASession-Du5LOUTZ.js.br +0 -0
- package/public/assets/{ResetPassword-D7mOzqBK.js → ResetPassword-C6cya_7-.js} +1 -1
- package/public/assets/ResetPassword-C6cya_7-.js.br +0 -0
- package/public/assets/{Setup-D6qB6jS1.js → Setup-DHS2ZvMu.js} +1 -1
- package/public/assets/Setup-DHS2ZvMu.js.br +0 -0
- package/public/assets/{Team-3bucAohO.js → Team-DkIXb37o.js} +1 -1
- package/public/assets/Team-DkIXb37o.js.br +0 -0
- package/public/assets/{Tokens-1zCnFy4g.js → Tokens-DxZUmUPI.js} +1 -1
- package/public/assets/Tokens-DxZUmUPI.js.br +0 -0
- package/public/assets/{alert-dialog-DzfatoQp.js → alert-dialog-CPQLr1ij.js} +1 -1
- package/public/assets/alert-dialog-CPQLr1ij.js.br +0 -0
- package/public/assets/{badge-D5qRpMwq.js → badge-B63ynAZJ.js} +1 -1
- package/public/assets/badge-B63ynAZJ.js.br +0 -0
- package/public/assets/{build-format-B2WV0b00.js → build-format-CcGvUI_j.js} +1 -1
- package/public/assets/build-format-CcGvUI_j.js.br +0 -0
- package/public/assets/dialog-CEEdc-Oq.js +11 -0
- package/public/assets/dialog-CEEdc-Oq.js.br +0 -0
- package/public/assets/index-D8ViYmeP.js +274 -0
- package/public/assets/index-D8ViYmeP.js.br +0 -0
- package/public/assets/{pencil-CrdUncgI.js → pencil-BAhJ8VF-.js} +1 -1
- package/public/assets/pencil-BAhJ8VF-.js.br +0 -0
- package/public/assets/{table-7RY_yHv1.js → table-IfQacRqI.js} +1 -1
- package/public/assets/table-IfQacRqI.js.br +0 -0
- package/public/assets/{tabs-D37o4iWA.js → tabs-DKQ2XF1o.js} +1 -1
- package/public/assets/tabs-DKQ2XF1o.js.br +0 -0
- package/public/assets/{trash-2-DrcWqmOA.js → trash-2-Bfw6hch4.js} +1 -1
- package/public/assets/trash-2-Bfw6hch4.js.br +0 -0
- package/public/index.html +1 -1
- package/public/index.html.br +0 -0
- package/public/assets/AppCenter-Cxb5PqES.js +0 -21
- package/public/assets/AppCenter-Cxb5PqES.js.br +0 -0
- package/public/assets/Default-B8SzMopQ.js.br +0 -0
- package/public/assets/Invite-BmR_FIA1.js.br +0 -0
- package/public/assets/MacResources-CXzOp5kx.js.br +0 -0
- package/public/assets/NotFound-BWw23bIi.js.br +0 -2
- package/public/assets/QASession-t4xyvUvC.js +0 -130
- package/public/assets/QASession-t4xyvUvC.js.br +0 -0
- package/public/assets/ResetPassword-D7mOzqBK.js.br +0 -0
- package/public/assets/Setup-D6qB6jS1.js.br +0 -0
- package/public/assets/Team-3bucAohO.js.br +0 -0
- package/public/assets/Tokens-1zCnFy4g.js.br +0 -0
- package/public/assets/alert-dialog-DzfatoQp.js.br +0 -0
- package/public/assets/badge-D5qRpMwq.js.br +0 -0
- package/public/assets/build-format-B2WV0b00.js.br +0 -0
- package/public/assets/dialog-CjJMa7RN.js +0 -11
- package/public/assets/dialog-CjJMa7RN.js.br +0 -0
- package/public/assets/index-Ci2ltCHF.js +0 -274
- package/public/assets/index-Ci2ltCHF.js.br +0 -0
- package/public/assets/pencil-CrdUncgI.js.br +0 -0
- package/public/assets/table-7RY_yHv1.js.br +0 -0
- package/public/assets/tabs-D37o4iWA.js.br +0 -0
- package/public/assets/trash-2-DrcWqmOA.js.br +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{Y as Oe,a7 as n,a4 as r,ae as B,ak as z,u as D,ag as gt,af as De,aj as Ne,w as xt,V as vt,A as St,N as P,P as wt,t as yt,a6 as Ae,Z as ke,O as Ct,ad as Nt,Q as bt,a3 as Tt,ah as It,R as Pt,F as Rt,q as _t,a0 as Et,h as jt,a as Dt,K as E,f as Mt,D as Ot,p as At,n as kt,k as Le,j as Lt,X as Vt,o as Ve,m as Be,l as He}from"./index-Ci2ltCHF.js";/**
|
|
2
|
-
* @license lucide-react v0.577.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Bt=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fe=Oe("chevron-down",Bt);/**
|
|
7
|
-
* @license lucide-react v0.577.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Ht=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ft=Oe("chevron-up",Ht);function Me(t,[o,e]){return Math.min(e,Math.max(o,t))}function Ut(t){const o=n.useRef({value:t,previous:t});return n.useMemo(()=>(o.current.value!==t&&(o.current.previous=o.current.value,o.current.value=t),o.current.previous),[t])}var Wt=[" ","Enter","ArrowUp","ArrowDown"],Kt=[" ","Enter"],te="Select",[pe,fe,$t]=Ct(te),[oe]=bt(te,[$t,ke]),me=ke(),[zt,Y]=oe(te),[Gt,Yt]=oe(te),qt="SelectProvider";function Ue(t){const{__scopeSelect:o,children:e,open:s,defaultOpen:a,onOpenChange:f,value:c,defaultValue:i,onValueChange:l,dir:p,name:x,autoComplete:w,disabled:C,required:I,form:b,internal_do_not_use_render:d}=t,g=me(o),[S,u]=n.useState(null),[m,M]=n.useState(null),[R,X]=n.useState(!1),_=gt(p),[A,ne]=De({prop:s,defaultProp:a??!1,onChange:f,caller:te}),[re,H]=De({prop:c,defaultProp:i,onChange:l,caller:te}),F=n.useRef(null),Z=S?!!b||!!S.closest("form"):!0,[U,k]=n.useState(new Set),W=Ne(),K=Array.from(U).map(V=>V.props.value).join(";"),$=n.useCallback(V=>{k(Q=>new Set(Q).add(V))},[]),L=n.useCallback(V=>{k(Q=>{const ae=new Set(Q);return ae.delete(V),ae})},[]),se={required:I,trigger:S,onTriggerChange:u,valueNode:m,onValueNodeChange:M,valueNodeHasChildren:R,onValueNodeHasChildrenChange:X,contentId:W,value:re,onValueChange:H,open:A,onOpenChange:ne,dir:_,triggerPointerDownPosRef:F,disabled:C,name:x,autoComplete:w,form:b,nativeOptions:U,nativeSelectKey:K,isFormControl:Z};return r.jsx(xt,{...g,children:r.jsx(zt,{scope:o,...se,children:r.jsx(pe.Provider,{scope:o,children:r.jsx(Gt,{scope:o,onNativeOptionAdd:$,onNativeOptionRemove:L,children:uo(d)?d(se):e})})})})}Ue.displayName=qt;var We=t=>{const{__scopeSelect:o,children:e,...s}=t;return r.jsx(Ue,{__scopeSelect:o,...s,internal_do_not_use_render:({isFormControl:a})=>r.jsxs(r.Fragment,{children:[e,a?r.jsx(dt,{__scopeSelect:o}):null]})})};We.displayName=te;var Ke="SelectTrigger",be=n.forwardRef((t,o)=>{const{__scopeSelect:e,disabled:s=!1,...a}=t,f=me(e),c=Y(Ke,e),i=c.disabled||s,l=B(o,c.onTriggerChange),p=fe(e),x=n.useRef("touch"),[w,C,I]=ut(d=>{const g=p().filter(m=>!m.disabled),S=g.find(m=>m.value===c.value),u=pt(g,d,S);u!==void 0&&c.onValueChange(u.value)}),b=d=>{i||(c.onOpenChange(!0),I()),d&&(c.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return r.jsx(St,{asChild:!0,...f,children:r.jsx(D.button,{type:"button",role:"combobox","aria-controls":c.open?c.contentId:void 0,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":he(c.value)?"":void 0,...a,ref:l,onClick:P(a.onClick,d=>{d.currentTarget.focus(),x.current!=="mouse"&&b(d)}),onPointerDown:P(a.onPointerDown,d=>{x.current=d.pointerType;const g=d.target;g.hasPointerCapture(d.pointerId)&&g.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(b(d),d.preventDefault())}),onKeyDown:P(a.onKeyDown,d=>{const g=w.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&C(d.key),!(g&&d.key===" ")&&Wt.includes(d.key)&&(b(),d.preventDefault())})})})});be.displayName=Ke;var $e="SelectValue",ze=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:s,style:a,children:f,placeholder:c="",...i}=t,l=Y($e,e),{onValueNodeHasChildrenChange:p}=l,x=f!==void 0,w=B(o,l.onValueNodeChange);z(()=>{p(x)},[p,x]);const C=he(l.value);return r.jsx(D.span,{...i,asChild:C?!1:i.asChild,ref:w,style:{pointerEvents:"none"},children:r.jsx(n.Fragment,{children:C?c:f},C?"placeholder":"value")})});ze.displayName=$e;var Xt="SelectIcon",Ge=n.forwardRef((t,o)=>{const{__scopeSelect:e,children:s,...a}=t;return r.jsx(D.span,{"aria-hidden":!0,...a,ref:o,children:s||"▼"})});Ge.displayName=Xt;var Ye="SelectPortal",[Zt,Qt]=oe(Ye,{forceMount:void 0}),qe=t=>{const{__scopeSelect:o,forceMount:e,...s}=t;return r.jsx(Zt,{scope:t.__scopeSelect,forceMount:e,children:r.jsx(wt,{asChild:!0,...s})})};qe.displayName=Ye;var G="SelectContent",Te=n.forwardRef((t,o)=>{const e=Qt(G,t.__scopeSelect),{forceMount:s=e.forceMount,...a}=t,f=Y(G,t.__scopeSelect),[c,i]=n.useState();return z(()=>{i(new DocumentFragment)},[]),r.jsx(yt,{present:s||f.open,children:({present:l})=>l?r.jsx(Qe,{...a,ref:o}):r.jsx(Xe,{...a,fragment:c})})});Te.displayName=G;var Xe=n.forwardRef((t,o)=>{const{__scopeSelect:e,children:s,fragment:a}=t;return a?Ae.createPortal(r.jsx(Ze,{scope:e,children:r.jsx(pe.Slot,{scope:e,children:r.jsx("div",{ref:o,children:s})})}),a):null});Xe.displayName="SelectContentFragment";var O=10,[Ze,q]=oe(G),Jt="SelectContentImpl",eo=Et("SelectContent.RemoveScroll"),Qe=n.forwardRef((t,o)=>{const{__scopeSelect:e}=t,{position:s="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:f,onPointerDownOutside:c,side:i,sideOffset:l,align:p,alignOffset:x,arrowPadding:w,collisionBoundary:C,collisionPadding:I,sticky:b,hideWhenDetached:d,avoidCollisions:g,...S}=t,u=Y(G,e),[m,M]=n.useState(null),[R,X]=n.useState(null),_=B(o,h=>M(h)),[A,ne]=n.useState(null),[re,H]=n.useState(null),F=fe(e),[Z,U]=n.useState(!1),k=n.useRef(!1);n.useEffect(()=>{if(m)return Tt(m)},[m]),It();const W=n.useCallback(h=>{const[T,...j]=F().map(y=>y.ref.current),[N]=j.slice(-1),v=document.activeElement;for(const y of h)if(y===v||(y==null||y.scrollIntoView({block:"nearest"}),y===T&&R&&(R.scrollTop=0),y===N&&R&&(R.scrollTop=R.scrollHeight),y==null||y.focus(),document.activeElement!==v))return},[F,R]),K=n.useCallback(()=>W([A,m]),[W,A,m]);n.useEffect(()=>{Z&&K()},[Z,K]);const{onOpenChange:$,triggerPointerDownPosRef:L}=u;n.useEffect(()=>{if(m){let h={x:0,y:0};const T=N=>{var v,y;h={x:Math.abs(Math.round(N.pageX)-(((v=L.current)==null?void 0:v.x)??0)),y:Math.abs(Math.round(N.pageY)-(((y=L.current)==null?void 0:y.y)??0))}},j=N=>{h.x<=10&&h.y<=10?N.preventDefault():N.composedPath().includes(m)||$(!1),document.removeEventListener("pointermove",T),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",j,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",j,{capture:!0})}}},[m,$,L]),n.useEffect(()=>{const h=()=>$(!1);return window.addEventListener("blur",h),window.addEventListener("resize",h),()=>{window.removeEventListener("blur",h),window.removeEventListener("resize",h)}},[$]);const[se,V]=ut(h=>{const T=F().filter(v=>!v.disabled),j=T.find(v=>v.ref.current===document.activeElement),N=pt(T,h,j);N&&setTimeout(()=>{var v;return(v=N.ref.current)==null?void 0:v.focus()})}),Q=n.useCallback((h,T,j)=>{const N=!k.current&&!j;(u.value!==void 0&&u.value===T||N)&&(ne(h),N&&(k.current=!0))},[u.value]),ae=n.useCallback(()=>m==null?void 0:m.focus(),[m]),le=n.useCallback((h,T,j)=>{const N=!k.current&&!j;(u.value!==void 0&&u.value===T||N)&&H(h)},[u.value]),de=s==="popper"?Se:Je,ce=de===Se?{side:i,sideOffset:l,align:p,alignOffset:x,arrowPadding:w,collisionBoundary:C,collisionPadding:I,sticky:b,hideWhenDetached:d,avoidCollisions:g}:{};return r.jsx(Ze,{scope:e,content:m,viewport:R,onViewportChange:X,itemRefCallback:Q,selectedItem:A,onItemLeave:ae,itemTextRefCallback:le,focusSelectedItem:K,selectedItemText:re,position:s,isPositioned:Z,searchRef:se,children:r.jsx(Pt,{as:eo,allowPinchZoom:!0,children:r.jsx(Rt,{asChild:!0,trapped:u.open,onMountAutoFocus:h=>{h.preventDefault()},onUnmountAutoFocus:P(a,h=>{var T;(T=u.trigger)==null||T.focus({preventScroll:!0}),h.preventDefault()}),children:r.jsx(_t,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:c,onFocusOutside:h=>h.preventDefault(),onDismiss:()=>u.onOpenChange(!1),children:r.jsx(de,{role:"listbox",id:u.contentId,"data-state":u.open?"open":"closed",dir:u.dir,onContextMenu:h=>h.preventDefault(),...S,...ce,onPlaced:()=>U(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:P(S.onKeyDown,h=>{const T=h.ctrlKey||h.altKey||h.metaKey;if(h.key==="Tab"&&h.preventDefault(),!T&&h.key.length===1&&V(h.key),["ArrowUp","ArrowDown","Home","End"].includes(h.key)){let N=F().filter(v=>!v.disabled).map(v=>v.ref.current);if(["ArrowUp","End"].includes(h.key)&&(N=N.slice().reverse()),["ArrowUp","ArrowDown"].includes(h.key)){const v=h.target,y=N.indexOf(v);N=N.slice(y+1)}setTimeout(()=>W(N)),h.preventDefault()}})})})})})})});Qe.displayName=Jt;var to="SelectItemAlignedPosition",Je=n.forwardRef((t,o)=>{const{__scopeSelect:e,onPlaced:s,...a}=t,f=Y(G,e),c=q(G,e),[i,l]=n.useState(null),[p,x]=n.useState(null),w=B(o,_=>x(_)),C=fe(e),I=n.useRef(!1),b=n.useRef(!0),{viewport:d,selectedItem:g,selectedItemText:S,focusSelectedItem:u}=c,m=n.useCallback(()=>{if(f.trigger&&f.valueNode&&i&&p&&d&&g&&S){const _=f.trigger.getBoundingClientRect(),A=p.getBoundingClientRect(),ne=f.valueNode.getBoundingClientRect(),re=S.getBoundingClientRect();if(f.dir!=="rtl"){const v=re.left-A.left,y=ne.left-v,J=_.left-y,ee=_.width+J,ge=Math.max(ee,A.width),xe=window.innerWidth-O,ve=Me(y,[O,Math.max(O,xe-ge)]);i.style.minWidth=ee+"px",i.style.left=ve+"px"}else{const v=A.right-re.right,y=window.innerWidth-ne.right-v,J=window.innerWidth-_.right-y,ee=_.width+J,ge=Math.max(ee,A.width),xe=window.innerWidth-O,ve=Me(y,[O,Math.max(O,xe-ge)]);i.style.minWidth=ee+"px",i.style.right=ve+"px"}const H=C(),F=window.innerHeight-O*2,Z=d.scrollHeight,U=window.getComputedStyle(p),k=parseInt(U.borderTopWidth,10),W=parseInt(U.paddingTop,10),K=parseInt(U.borderBottomWidth,10),$=parseInt(U.paddingBottom,10),L=k+W+Z+$+K,se=Math.min(g.offsetHeight*5,L),V=window.getComputedStyle(d),Q=parseInt(V.paddingTop,10),ae=parseInt(V.paddingBottom,10),le=_.top+_.height/2-O,de=F-le,ce=g.offsetHeight/2,h=g.offsetTop+ce,T=k+W+h,j=L-T;if(T<=le){const v=H.length>0&&g===H[H.length-1].ref.current;i.style.bottom="0px";const y=p.clientHeight-d.offsetTop-d.offsetHeight,J=Math.max(de,ce+(v?ae:0)+y+K),ee=T+J;i.style.height=ee+"px"}else{const v=H.length>0&&g===H[0].ref.current;i.style.top="0px";const J=Math.max(le,k+d.offsetTop+(v?Q:0)+ce)+j;i.style.height=J+"px",d.scrollTop=T-le+d.offsetTop}i.style.margin=`${O}px 0`,i.style.minHeight=se+"px",i.style.maxHeight=F+"px",s==null||s(),requestAnimationFrame(()=>I.current=!0)}},[C,f.trigger,f.valueNode,i,p,d,g,S,f.dir,s]);z(()=>m(),[m]);const[M,R]=n.useState();z(()=>{p&&R(window.getComputedStyle(p).zIndex)},[p]);const X=n.useCallback(_=>{_&&b.current===!0&&(m(),u==null||u(),b.current=!1)},[m,u]);return r.jsx(no,{scope:e,contentWrapper:i,shouldExpandOnScrollRef:I,onScrollButtonChange:X,children:r.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:r.jsx(D.div,{...a,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Je.displayName=to;var oo="SelectPopperPosition",Se=n.forwardRef((t,o)=>{const{__scopeSelect:e,align:s="start",collisionPadding:a=O,...f}=t,c=me(e);return r.jsx(jt,{...c,...f,ref:o,align:s,collisionPadding:a,style:{boxSizing:"border-box",...f.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=oo;var[no,Ie]=oe(G,{}),we="SelectViewport",et=n.forwardRef((t,o)=>{const{__scopeSelect:e,nonce:s,...a}=t,f=q(we,e),c=Ie(we,e),i=B(o,f.onViewportChange),l=n.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),r.jsx(pe.Slot,{scope:e,children:r.jsx(D.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:P(a.onScroll,p=>{const x=p.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:C}=c;if(C!=null&&C.current&&w){const I=Math.abs(l.current-x.scrollTop);if(I>0){const b=window.innerHeight-O*2,d=parseFloat(w.style.minHeight),g=parseFloat(w.style.height),S=Math.max(d,g);if(S<b){const u=S+I,m=Math.min(b,u),M=u-m;w.style.height=m+"px",w.style.bottom==="0px"&&(x.scrollTop=M>0?M:0,w.style.justifyContent="flex-end")}}}l.current=x.scrollTop})})})]})});et.displayName=we;var tt="SelectGroup",[ro,so]=oe(tt),ao=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,a=Ne();return r.jsx(ro,{scope:e,id:a,children:r.jsx(D.div,{role:"group","aria-labelledby":a,...s,ref:o})})});ao.displayName=tt;var ot="SelectLabel",Pe=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,a=so(ot,e);return r.jsx(D.div,{id:a.id,...s,ref:o})});Pe.displayName=ot;var ue="SelectItem",[lo,nt]=oe(ue),Re=n.forwardRef((t,o)=>{const{__scopeSelect:e,value:s,disabled:a=!1,textValue:f,...c}=t,i=Y(ue,e),l=q(ue,e),p=i.value===s,[x,w]=n.useState(f??""),[C,I]=n.useState(!1),b=B(o,u=>{var m;return(m=l.itemRefCallback)==null?void 0:m.call(l,u,s,a)}),d=Ne(),g=n.useRef("touch"),S=()=>{a||(i.onValueChange(s),i.onOpenChange(!1))};return r.jsx(lo,{scope:e,value:s,disabled:a,textId:d,isSelected:p,onItemTextChange:n.useCallback(u=>{w(m=>m||((u==null?void 0:u.textContent)??"").trim())},[]),children:r.jsx(pe.ItemSlot,{scope:e,value:s,disabled:a,textValue:x,children:r.jsx(D.div,{role:"option","aria-labelledby":d,"data-highlighted":C?"":void 0,"aria-selected":p&&C,"data-state":p?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...c,ref:b,onFocus:P(c.onFocus,()=>I(!0)),onBlur:P(c.onBlur,()=>I(!1)),onClick:P(c.onClick,()=>{g.current!=="mouse"&&S()}),onPointerUp:P(c.onPointerUp,()=>{g.current==="mouse"&&S()}),onPointerDown:P(c.onPointerDown,u=>{g.current=u.pointerType}),onPointerMove:P(c.onPointerMove,u=>{var m;g.current=u.pointerType,a?(m=l.onItemLeave)==null||m.call(l):g.current==="mouse"&&u.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(c.onPointerLeave,u=>{var m;u.currentTarget===document.activeElement&&((m=l.onItemLeave)==null||m.call(l))}),onKeyDown:P(c.onKeyDown,u=>{var M;((M=l.searchRef)==null?void 0:M.current)!==""&&u.key===" "||(Kt.includes(u.key)&&S(),u.key===" "&&u.preventDefault())})})})})});Re.displayName=ue;var ie="SelectItemText",rt=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:s,style:a,...f}=t,c=Y(ie,e),i=q(ie,e),l=nt(ie,e),p=Yt(ie,e),[x,w]=n.useState(null),C=B(o,S=>w(S),l.onItemTextChange,S=>{var u;return(u=i.itemTextRefCallback)==null?void 0:u.call(i,S,l.value,l.disabled)}),I=x==null?void 0:x.textContent,b=n.useMemo(()=>r.jsx("option",{value:l.value,disabled:l.disabled,children:I},l.value),[l.disabled,l.value,I]),{onNativeOptionAdd:d,onNativeOptionRemove:g}=p;return z(()=>(d(b),()=>g(b)),[d,g,b]),r.jsxs(r.Fragment,{children:[r.jsx(D.span,{id:l.textId,...f,ref:C}),l.isSelected&&c.valueNode&&!c.valueNodeHasChildren&&!he(c.value)?Ae.createPortal(f.children,c.valueNode):null]})});rt.displayName=ie;var st="SelectItemIndicator",at=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t;return nt(st,e).isSelected?r.jsx(D.span,{"aria-hidden":!0,...s,ref:o}):null});at.displayName=st;var ye="SelectScrollUpButton",_e=n.forwardRef((t,o)=>{const e=q(ye,t.__scopeSelect),s=Ie(ye,t.__scopeSelect),[a,f]=n.useState(!1),c=B(o,s.onScrollButtonChange);return z(()=>{if(e.viewport&&e.isPositioned){let i=function(){const p=l.scrollTop>0;f(p)};const l=e.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[e.viewport,e.isPositioned]),a?r.jsx(lt,{...t,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=e;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});_e.displayName=ye;var Ce="SelectScrollDownButton",Ee=n.forwardRef((t,o)=>{const e=q(Ce,t.__scopeSelect),s=Ie(Ce,t.__scopeSelect),[a,f]=n.useState(!1),c=B(o,s.onScrollButtonChange);return z(()=>{if(e.viewport&&e.isPositioned){let i=function(){const p=l.scrollHeight-l.clientHeight,x=Math.ceil(l.scrollTop)<p;f(x)};const l=e.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[e.viewport,e.isPositioned]),a?r.jsx(lt,{...t,ref:c,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=e;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Ee.displayName=Ce;var lt=n.forwardRef((t,o)=>{const{__scopeSelect:e,onAutoScroll:s,...a}=t,f=q("SelectScrollButton",e),c=n.useRef(null),i=fe(e),l=n.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return n.useEffect(()=>()=>l(),[l]),z(()=>{var x;const p=i().find(w=>w.ref.current===document.activeElement);(x=p==null?void 0:p.ref.current)==null||x.scrollIntoView({block:"nearest"})},[i]),r.jsx(D.div,{"aria-hidden":!0,...a,ref:o,style:{flexShrink:0,...a.style},onPointerDown:P(a.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(s,50))}),onPointerMove:P(a.onPointerMove,()=>{var p;(p=f.onItemLeave)==null||p.call(f),c.current===null&&(c.current=window.setInterval(s,50))}),onPointerLeave:P(a.onPointerLeave,()=>{l()})})}),co="SelectSeparator",je=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t;return r.jsx(D.div,{"aria-hidden":!0,...s,ref:o})});je.displayName=co;var ct="SelectArrow",io=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,a=me(e);return q(ct,e).position==="popper"?r.jsx(Dt,{...a,...s,ref:o}):null});io.displayName=ct;var it="SelectBubbleInput",dt=n.forwardRef(({__scopeSelect:t,...o},e)=>{const s=Y(it,t),{value:a,onValueChange:f,required:c,disabled:i,name:l,autoComplete:p,form:x}=s,{nativeOptions:w,nativeSelectKey:C}=s,I=n.useRef(null),b=B(e,I),d=a??"",g=Ut(d),S=Array.from(w).some(u=>(u.props.value??"")==="");return n.useEffect(()=>{const u=I.current;if(!u)return;const m=window.HTMLSelectElement.prototype,R=Object.getOwnPropertyDescriptor(m,"value").set;if(g!==d&&R){const X=new Event("change",{bubbles:!0});R.call(u,d),u.dispatchEvent(X)}},[g,d]),r.jsxs(D.select,{"aria-hidden":!0,required:c,tabIndex:-1,name:l,autoComplete:p,disabled:i,form:x,onChange:u=>f(u.target.value),...o,style:{...vt,...o.style},ref:b,defaultValue:d,children:[he(a)&&!S?r.jsx("option",{value:""}):null,Array.from(w)]},C)});dt.displayName=it;function uo(t){return typeof t=="function"}function he(t){return t===""||t===void 0}function ut(t){const o=Nt(t),e=n.useRef(""),s=n.useRef(0),a=n.useCallback(c=>{const i=e.current+c;o(i),(function l(p){e.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>l(""),1e3))})(i)},[o]),f=n.useCallback(()=>{e.current="",window.clearTimeout(s.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(s.current),[]),[e,a,f]}function pt(t,o,e){const a=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,f=e?t.indexOf(e):-1;let c=po(t,Math.max(f,0));a.length===1&&(c=c.filter(p=>p!==e));const l=c.find(p=>p.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==e?l:void 0}function po(t,o){return t.map((e,s)=>t[(o+s)%t.length])}const To=We,Io=ze,fo=n.forwardRef(({className:t,children:o,...e},s)=>r.jsxs(be,{ref:s,className:E("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...e,children:[o,r.jsx(Ge,{asChild:!0,children:r.jsx(Fe,{className:"h-4 w-4 opacity-50"})})]}));fo.displayName=be.displayName;const ft=n.forwardRef(({className:t,...o},e)=>r.jsx(_e,{ref:e,className:E("flex cursor-default items-center justify-center py-1",t),...o,children:r.jsx(Ft,{className:"h-4 w-4"})}));ft.displayName=_e.displayName;const mt=n.forwardRef(({className:t,...o},e)=>r.jsx(Ee,{ref:e,className:E("flex cursor-default items-center justify-center py-1",t),...o,children:r.jsx(Fe,{className:"h-4 w-4"})}));mt.displayName=Ee.displayName;const mo=n.forwardRef(({className:t,children:o,position:e="popper",...s},a)=>r.jsx(qe,{children:r.jsxs(Te,{ref:a,className:E("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",e==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:e,...s,children:[r.jsx(ft,{}),r.jsx(et,{className:E("p-1",e==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),r.jsx(mt,{})]})}));mo.displayName=Te.displayName;const ho=n.forwardRef(({className:t,...o},e)=>r.jsx(Pe,{ref:e,className:E("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...o}));ho.displayName=Pe.displayName;const go=n.forwardRef(({className:t,children:o,...e},s)=>r.jsxs(Re,{ref:s,className:E("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...e,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(at,{children:r.jsx(Mt,{className:"h-4 w-4"})})}),r.jsx(rt,{children:o})]}));go.displayName=Re.displayName;const xo=n.forwardRef(({className:t,...o},e)=>r.jsx(je,{ref:e,className:E("-mx-1 my-1 h-px bg-muted",t),...o}));xo.displayName=je.displayName;const Po=Ot,Ro=At,vo=kt,ht=n.forwardRef(({className:t,...o},e)=>r.jsx(Be,{ref:e,className:E("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...o}));ht.displayName=Be.displayName;const So=n.forwardRef(({className:t,children:o,...e},s)=>r.jsxs(vo,{children:[r.jsx(ht,{}),r.jsxs(Le,{ref:s,className:E("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...e,children:[o,r.jsxs(Lt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(Vt,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));So.displayName=Le.displayName;const wo=({className:t,...o})=>r.jsx("div",{className:E("flex flex-col space-y-1.5 text-center sm:text-left",t),...o});wo.displayName="DialogHeader";const yo=({className:t,...o})=>r.jsx("div",{className:E("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...o});yo.displayName="DialogFooter";const Co=n.forwardRef(({className:t,...o},e)=>r.jsx(Ve,{ref:e,className:E("text-lg font-semibold leading-none tracking-tight",t),...o}));Co.displayName=Ve.displayName;const No=n.forwardRef(({className:t,...o},e)=>r.jsx(He,{ref:e,className:E("text-sm text-muted-foreground",t),...o}));No.displayName=He.displayName;export{Fe as C,Po as D,To as S,So as a,No as b,yo as c,wo as d,Co as e,Ro as f,mo as g,go as h,fo as i,Io as j,Me as k,Ut as u};
|
|
Binary file
|