@snagset/server 0.1.40 → 0.1.41

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 (86) hide show
  1. package/dist/app.js +5 -0
  2. package/dist/app.js.map +1 -1
  3. package/dist/config.generated.js +2 -1
  4. package/dist/config.generated.js.map +1 -1
  5. package/package.json +1 -1
  6. package/static/dashboard/assets/CompositeItem-B_Ebe9qQ.js +1 -0
  7. package/static/dashboard/assets/CompositeList-CDAPQTbv.js +1 -0
  8. package/static/dashboard/assets/{ConfirmDialog-D7eZU5Z6.js → ConfirmDialog-D1II2uNE.js} +1 -1
  9. package/static/dashboard/assets/{CopyButton-_X7ITEaj.js → CopyButton-qbA2ZHWn.js} +1 -1
  10. package/static/dashboard/assets/{FieldItemContext-BgajCxI_.js → FieldItemContext-BM_KzVUj.js} +1 -1
  11. package/static/dashboard/assets/{InstallTag-Bxq5AWM0.js → InstallTag-DTpNoMn9.js} +1 -1
  12. package/static/dashboard/assets/InstanceRows-B1z-L92-.js +1 -0
  13. package/static/dashboard/assets/{McpTokens-D_0BEsPb.js → McpTokens-DE2t0iiS.js} +1 -1
  14. package/static/dashboard/assets/{SaveState-WYxHW3VJ.js → SaveState-QQHqDSgx.js} +1 -1
  15. package/static/dashboard/assets/_app-B_DiSFIt.js +61 -0
  16. package/static/dashboard/assets/{_app-Bv20PwQa.js → _app-CaDt6CPJ.js} +1 -1
  17. package/static/dashboard/assets/{activity-Ch0XQ9sf.js → activity-CzEy_J8-.js} +1 -1
  18. package/static/dashboard/assets/{arrow-left-BVcH0ZD5.js → arrow-left-RqdORgcq.js} +1 -1
  19. package/static/dashboard/assets/avatar-D8S5EME4.js +1 -0
  20. package/static/dashboard/assets/{badge-D4-0NV1D.js → badge-anHWhPFa.js} +1 -1
  21. package/static/dashboard/assets/{card-_fRmCPLn.js → card-C01exIzZ.js} +1 -1
  22. package/static/dashboard/assets/{check-BTd2LoGN.js → check-Gm9Xu4rH.js} +1 -1
  23. package/static/dashboard/assets/chevron-down-C-pVPOKU.js +6 -0
  24. package/static/dashboard/assets/{chevron-right-Co0UMSkz.js → chevron-right-BQmYcugl.js} +1 -1
  25. package/static/dashboard/assets/{copy-CEpGdeGb.js → copy-Ckk__4oN.js} +1 -1
  26. package/static/dashboard/assets/{dialog-C7r1DbuZ.js → dialog-D5G50pSW.js} +2 -2
  27. package/static/dashboard/assets/dropdown-menu-Bm_opJ2p.js +11 -0
  28. package/static/dashboard/assets/{forgot-nTWEgSRm.js → forgot-R7JqXxs5.js} +1 -1
  29. package/static/dashboard/assets/{image-off-DP5YbLdB.js → image-off-BtbHLgOM.js} +1 -1
  30. package/static/dashboard/assets/index-CoiIx5MR.css +1 -0
  31. package/static/dashboard/assets/{index-Ddw_j6S-.js → index-p-qD6BlY.js} +21 -21
  32. package/static/dashboard/assets/{invite-CHU_LQYP.js → invite-9eotNL9V.js} +1 -1
  33. package/static/dashboard/assets/label-CuvYMIVd.js +1 -0
  34. package/static/dashboard/assets/{labels-BuZpvtvw.js → labels-DLMjYGNJ.js} +1 -1
  35. package/static/dashboard/assets/{layout-grid-DpWj1k0D.js → layout-grid-D5ek58h7.js} +1 -1
  36. package/static/dashboard/assets/{parts-DuhvDJGT.js → parts-CN1uQywE.js} +1 -1
  37. package/static/dashboard/assets/{plus-fom7ulPf.js → plus-BsxOLtMA.js} +1 -1
  38. package/static/dashboard/assets/{reset-CQMD1ToU.js → reset-8K76tpdp.js} +1 -1
  39. package/static/dashboard/assets/s._site-egkPDOj9.js +1 -0
  40. package/static/dashboard/assets/s._site.comments-DmrtKLHb.js +49 -0
  41. package/static/dashboard/assets/s._site.reviewers-CGKj-NQo.js +1 -0
  42. package/static/dashboard/assets/s._site.settings-DvWbfMac.js +1 -0
  43. package/static/dashboard/assets/serializeValue-DRMAHja_.js +1 -0
  44. package/static/dashboard/assets/{setup-nee74nI7.js → setup-BDZJmgIB.js} +1 -1
  45. package/static/dashboard/assets/{sign-in-DJSdsL9I.js → sign-in-BmweKwDv.js} +1 -1
  46. package/static/dashboard/assets/{sign-up-DeQDeqC_.js → sign-up-C06mQl-c.js} +1 -1
  47. package/static/dashboard/assets/{sites-l8LQQwZW.js → sites-CkGgns1o.js} +1 -1
  48. package/static/dashboard/assets/{studio-CL5TjGsb.js → studio-BHpeuJSq.js} +1 -1
  49. package/static/dashboard/assets/studio-CG1QMBSK.js +1 -0
  50. package/static/dashboard/assets/studio.index-BOkmM7I5.js +1 -0
  51. package/static/dashboard/assets/{studio.integrations-BLkBekJf.js → studio.integrations-BBik3DdK.js} +1 -1
  52. package/static/dashboard/assets/studio.members-CEKrbJHp.js +11 -0
  53. package/static/dashboard/assets/studio.plan-CkOzUaJM.js +1 -0
  54. package/static/dashboard/assets/{sun-C6_OdtRI.js → sun-DXwtJyi5.js} +1 -1
  55. package/static/dashboard/assets/switch-cgJL6ATv.js +1 -0
  56. package/static/dashboard/assets/{table-WdFx8YPW.js → table-B8VTYpZO.js} +1 -1
  57. package/static/dashboard/assets/{useAriaLabelledBy-CYXdXCKz.js → useAriaLabelledBy-BT5NtL2E.js} +1 -1
  58. package/static/dashboard/assets/{useBaseQuery-bYBwKcW7.js → useBaseQuery-DaFWLbWu.js} +1 -1
  59. package/static/dashboard/assets/useQuery-D-9vXtOo.js +1 -0
  60. package/static/dashboard/assets/useRender-BBzDGtxq.js +1 -0
  61. package/static/dashboard/assets/{useValueChanged-DCX5-3sY.js → useValueChanged-cwqHWzY1.js} +1 -1
  62. package/static/dashboard/assets/{users-BSiXsvcu.js → users-CGY0g3mg.js} +1 -1
  63. package/static/dashboard/assets/{welcome-C96YFTXf.js → welcome-CNtwDQMd.js} +1 -1
  64. package/static/dashboard/assets/{widget-signin-DIvRFGYL.js → widget-signin-BOUMPGXt.js} +1 -1
  65. package/static/dashboard/assets/{you-CNN1L9wO.js → you-DH4QMiND.js} +1 -1
  66. package/static/dashboard/assets/{zod-BXAKx0ML.js → zod-DfHlfdUJ.js} +1 -1
  67. package/static/dashboard/index.html +2 -2
  68. package/static/widget/build.json +2 -2
  69. package/static/widget/snag.js +1 -1
  70. package/static/widget/snag.runtime.js +1 -1
  71. package/static/dashboard/assets/CompositeItem-CP7pxc5U.js +0 -1
  72. package/static/dashboard/assets/_app-C4LQnv_m.js +0 -56
  73. package/static/dashboard/assets/avatar-B4uC-2Rd.js +0 -1
  74. package/static/dashboard/assets/dropdown-menu-Clnp0fwC.js +0 -11
  75. package/static/dashboard/assets/index-Do3jpVIF.css +0 -1
  76. package/static/dashboard/assets/label-CeY5IHdJ.js +0 -1
  77. package/static/dashboard/assets/s._site-XzH7h0kY.js +0 -1
  78. package/static/dashboard/assets/s._site.comments-D_QbkDGk.js +0 -54
  79. package/static/dashboard/assets/s._site.reviewers-DKQj9ftE.js +0 -1
  80. package/static/dashboard/assets/s._site.settings-DGhg9pWK.js +0 -1
  81. package/static/dashboard/assets/studio-CLnwa1jr.js +0 -1
  82. package/static/dashboard/assets/studio.index-D4sAU91A.js +0 -1
  83. package/static/dashboard/assets/studio.members-KzPokmYW.js +0 -6
  84. package/static/dashboard/assets/switch-CGYNLqP6.js +0 -1
  85. package/static/dashboard/assets/useQuery-CaIu0ohN.js +0 -1
  86. package/static/dashboard/assets/useRender-Rh7x0Dwc.js +0 -1
@@ -1,6 +0,0 @@
1
- import{c as Q,j as e,h as U,q as L,a8 as W,r as j,B as h,a9 as g,aa as M,a1 as k,H as X,C as Z,ab as ee,ac as se,ad as te,D as ie,z as C}from"./index-Ddw_j6S-.js";import{u as S}from"./useQuery-CaIu0ohN.js";import{u as ae,a as ne}from"./zod-BXAKx0ML.js";import{A as le,a as re}from"./avatar-B4uC-2Rd.js";import{B as oe}from"./badge-D4-0NV1D.js";import{C as $}from"./card-_fRmCPLn.js";import{X as de,E as me,G as ce,I as R,H as A,J as I,K as D}from"./dialog-C7r1DbuZ.js";import{L as E,I as xe}from"./label-CeY5IHdJ.js";import{T as B,a as P,b as f,c,d as T,e as x}from"./table-WdFx8YPW.js";import{C as he}from"./ConfirmDialog-D7eZU5Z6.js";import{C as ue}from"./CopyButton-_X7ITEaj.js";import{A as pe,P as je,b as fe}from"./parts-DuhvDJGT.js";import{u as O,a as ve}from"./labels-BuZpvtvw.js";import{c as ge,d as be,e as ye,f as we,g as Ne}from"./studio-CL5TjGsb.js";import{P as ke}from"./plus-fom7ulPf.js";import"./useBaseQuery-bYBwKcW7.js";import"./useRender-Rh7x0Dwc.js";import"./check-BTd2LoGN.js";import"./copy-CEpGdeGb.js";/**
2
- * @license lucide-react v1.39.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 Ce=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Se=Q("mail",Ce);function z({className:s,...n}){return e.jsx("select",{className:U("h-8 rounded-md border border-input bg-card px-2.5 text-[13.5px] text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",s),...n})}function Re(){const s=O(),n=L(s.user.role,"people"),l=W(s.user.role),m=S(C.members()),t=S(C.invites()),[d,r]=j.useState(!1),o=s.limits.members.limit,i=o!==null&&s.limits.members.used>=o;return e.jsxs("div",{className:"p-7",children:[e.jsx(je,{title:"Members",sub:`${n?"Only owners change roles or remove people.":"Admins invite members. Ask an owner to change a role or remove someone."}${o!==null?` ${s.limits.members.used} of ${o} members.`:""}`,actions:l.length?e.jsxs(h,{onClick:()=>r(!0),disabled:i,title:i?`This studio's plan allows ${o} members.`:void 0,children:[e.jsx(ke,{}),"Invite"]}):void 0}),e.jsx($,{className:"max-w-[1040px] overflow-hidden py-0",children:e.jsxs(B,{children:[e.jsx(P,{children:e.jsxs(f,{children:[e.jsx(c,{children:"Name"}),e.jsx(c,{children:"Email"}),e.jsx(c,{children:"Role"}),n&&e.jsx(c,{className:"w-0"})]})}),e.jsx(T,{children:(m.data?.data??[]).map(u=>e.jsx(De,{m:u,owner:n},u.email))})]})}),e.jsx(Ae,{}),(t.data?.data.length??0)>0&&e.jsx(Ie,{invites:t.data.data,roles:l}),e.jsxs("p",{className:"m-0 mt-3 max-w-[1040px] text-[12.5px] text-muted-foreground",children:["People join through an invite link and choose their own password. A forgotten one is reset on the server with ",e.jsx("code",{className:"font-mono text-[12px]",children:"snagset passwd"}),"."]}),l.length>0&&e.jsx(Le,{open:d,onOpenChange:r,mail:t.data?.mail??!1,roles:l})]})}const _=s=>new Date(s).toLocaleDateString(void 0,{day:"numeric",month:"short"}),b={owner:"Owner",admin:"Admin",member:"Member"};function Ae(){return e.jsx("dl",{className:"m-0 mt-3 grid max-w-[1040px] grid-cols-[70px_1fr] gap-x-3 gap-y-1 text-[12.5px]","aria-label":"Roles",children:g.map(s=>e.jsxs("div",{className:"contents",children:[e.jsx("dt",{className:"font-medium",children:b[s]}),e.jsx("dd",{className:"m-0 text-muted-foreground",children:M[s]})]},s))})}function Ie({invites:s,roles:n}){const l=ye(),m=n.length>0;return e.jsxs("section",{className:"mt-6 max-w-[1040px]","aria-labelledby":"pending-invites",children:[e.jsx("div",{id:"pending-invites",className:"mb-2",children:e.jsx(fe,{children:"Pending invites"})}),e.jsx($,{className:"overflow-hidden py-0",children:e.jsxs(B,{children:[e.jsx(P,{children:e.jsxs(f,{children:[e.jsx(c,{children:"For"}),e.jsx(c,{children:"Role"}),e.jsx(c,{children:"Invited by"}),e.jsx(c,{children:"Expires"}),m&&e.jsx(c,{className:"w-0"})]})}),e.jsx(T,{children:s.map(t=>e.jsxs(f,{children:[e.jsx(x,{className:t.email?"":"text-muted-foreground",children:t.email??"Anyone with the link"}),e.jsx(x,{className:"capitalize",children:t.role}),e.jsx(x,{className:"text-muted-foreground",children:t.createdBy?t.createdBy.name||t.createdBy.email:"—"}),e.jsx(x,{className:"text-muted-foreground",children:_(t.expiresAt)}),m&&e.jsx(x,{className:"text-right",children:n.includes(t.role)&&e.jsx(h,{variant:"ghost",size:"sm","aria-label":`Revoke the invite for ${t.email??"anyone with the link"}`,disabled:l.isPending&&l.variables===t.id,onClick:()=>l.mutate(t.id),children:"Revoke"})})]},t.id))})]})})]})}function De({m:s,owner:n}){const l=ge(),m=be(),[t,d]=j.useState(!1);return e.jsxs(f,{children:[e.jsx(x,{children:e.jsxs("span",{className:"flex items-center gap-2.5",children:[e.jsx(le,{className:"size-6",children:e.jsx(re,{className:"bg-brand-soft text-[10px] font-semibold text-brand",children:ve(s.name,s.email)})}),e.jsx("span",{className:"font-medium",children:s.name||s.email}),s.you&&e.jsx(oe,{variant:"outline",className:"text-[11px]",children:"you"})]})}),e.jsx(x,{className:"text-muted-foreground",children:s.email}),e.jsx(x,{children:n?e.jsx(z,{"aria-label":`Role for ${s.email}`,value:s.role,onChange:r=>l.mutate({email:s.email,role:r.target.value}),children:g.map(r=>e.jsx("option",{value:r,children:b[r]},r))}):e.jsx("span",{className:"capitalize",children:s.role})}),n&&e.jsxs(x,{className:"text-right",children:[!s.you&&e.jsx(h,{variant:"ghost",size:"icon-sm","aria-label":`Remove ${s.email}`,onClick:()=>d(!0),children:e.jsx(de,{})}),e.jsx(he,{open:t,onOpenChange:d,title:`Remove ${s.name||s.email}?`,description:"Every session of theirs ends now. Nothing they wrote is destroyed.",confirmLabel:"Remove",busy:m.isPending,onConfirm:()=>{d(!1),m.mutate(s.email)}})]})]})}const Ee=Z({email:se([te(""),ie().trim().email("An email address, or leave it empty")]),role:ee(g)});function Le({open:s,onOpenChange:n,mail:l,roles:m}){const t=we(),d=Ne(),[r,o]=j.useState(""),[i,u]=j.useState(null),[y,w]=j.useState(null),{register:N,handleSubmit:F,formState:p,reset:H,watch:q}=ae({resolver:ne(Ee),defaultValues:{role:"member",email:""}}),G=q("role"),v=a=>{n(a),a||(u(null),w(null),o(""),d.reset(),H())},V=F(async a=>{o("");try{u(await t.mutateAsync({role:a.role,...a.email?{email:a.email}:{}}))}catch(K){o(k(K))}}),Y=async()=>{if(i){o("");try{w((await d.mutateAsync({id:i.invite.id,token:i.token})).to)}catch(a){o(k(a))}}},J=(i?.mail??l)&&!!i?.invite.email;return e.jsx(me,{open:s,onOpenChange:v,children:e.jsx(ce,{children:i?e.jsxs("div",{className:"flex min-w-0 flex-col gap-4",children:[e.jsxs(R,{children:[e.jsx(A,{children:"Invite link"}),e.jsxs(I,{children:[i.invite.email?`${i.invite.email} can`:"Anyone with this link can"," join as ",X(i.invite.role)," ","until ",_(i.invite.expiresAt),". It works once, and this is the only time it is shown."]})]}),r&&e.jsx("p",{role:"alert",className:"m-0 rounded-md border border-destructive/40 bg-warn-soft px-3 py-2 text-[13px] text-destructive",children:r}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"min-w-0 flex-1 truncate rounded-md bg-muted px-2 py-1.5 font-mono text-[12px]","data-testid":"invite-url",children:i.url}),e.jsx(ue,{text:i.url,label:"Copy link",withText:!0})]}),J&&(y?e.jsxs("p",{role:"status",className:"m-0 text-[13px] [overflow-wrap:anywhere] text-muted-foreground",children:["Sent to ",y,"."]}):e.jsxs(h,{type:"button",variant:"outline",className:"max-w-full min-w-0 self-start",title:i.invite.email?`Send by email to ${i.invite.email}`:void 0,loading:d.isPending,onClick:()=>void Y(),children:[e.jsx(Se,{}),e.jsx("span",{className:"min-w-0 truncate",children:d.isPending?"Sending…":`Send by email to ${i.invite.email}`})]})),e.jsx(D,{children:e.jsx(h,{type:"button",onClick:()=>v(!1),children:"Done"})})]}):e.jsxs("form",{onSubmit:V,className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs(R,{children:[e.jsx(A,{children:"Invite someone"}),e.jsx(I,{children:"You get a link to send them. Whoever opens it chooses their own name and password, and is signed in. It works once and lasts seven days."})]}),r&&e.jsx("p",{role:"alert",className:"m-0 rounded-md border border-destructive/40 bg-warn-soft px-3 py-2 text-[13px] text-destructive",children:r}),e.jsxs("fieldset",{disabled:p.isSubmitting,className:"m-0 flex min-w-0 flex-col gap-4 border-0 p-0",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(E,{htmlFor:"invite-role",children:"Role"}),e.jsx(z,{id:"invite-role",className:"w-full",...N("role"),children:["member","admin","owner"].filter(a=>m.includes(a)).map(a=>e.jsx("option",{value:a,children:b[a]},a))}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground","data-testid":"invite-role-summary",children:M[G]??""})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs(E,{htmlFor:"invite-email",children:["Email ",e.jsx("span",{className:"font-normal text-muted-foreground",children:"optional"})]}),e.jsx(xe,{id:"invite-email",type:"email",autoComplete:"off","aria-invalid":!!p.errors.email,...N("email")}),e.jsx("p",{className:"m-0 text-[12px] text-muted-foreground",children:p.errors.email?.message??(l?"Given, only that address can use the link, and you can mail it to them.":"Given, only that address can use the link.")})]}),e.jsxs(D,{children:[e.jsx(h,{type:"button",variant:"outline",onClick:()=>v(!1),children:"Cancel"}),e.jsx(h,{type:"submit",loading:p.isSubmitting,children:p.isSubmitting?"Creating…":"Create invite"})]})]})]})})})}const Xe=()=>L(O().user.role,"settings")?e.jsx(Re,{}):e.jsx(pe,{title:"Members"});export{Xe as component};
@@ -1 +0,0 @@
1
- import{r as s,i as ae,ah as re,e as ie,af as se,E as ne,k as M,j as f,ai as oe,h as de}from"./index-Ddw_j6S-.js";import{f as ce,e as le,h as ue,j as fe,u as he,A as pe,k as be,l as ge,c as me,n as ve}from"./label-CeY5IHdJ.js";import{L as ke,M as xe}from"./dialog-C7r1DbuZ.js";import{u as we}from"./useAriaLabelledBy-CYXdXCKz.js";import{u as ye}from"./useValueChanged-DCX5-3sY.js";const j=s.createContext(void 0);function Ce(){const r=s.useContext(j);if(r===void 0)throw new Error(ae(63));return r}const D={...ce,checked(r){return r?{"data-checked":""}:{"data-unchecked":""}}},Re=s.forwardRef(function(i,o){const{checked:k,className:F,defaultChecked:x,"aria-labelledby":m,form:h,id:L,inputRef:T,name:w,nativeButton:p=!1,onCheckedChange:V,readOnly:d=!1,required:b=!1,disabled:N=!1,render:ze,uncheckedValue:y,value:C,style:Ee,...A}=i,{clearErrors:H}=le(),{state:R,setTouched:q,setDirty:O,validityData:W,setFilled:v,setFocused:P,validationMode:J,disabled:U,name:Y,validation:c}=ue(),{labelId:_}=fe(),t=U||N,l=Y??w,n=s.useRef(null),G=re(n,T,c.inputRef),g=s.useRef(null),z=he(),E=pe({id:L,implicit:!1,controlRef:g}),B=p?void 0:E,[a,K]=be({controlled:k,default:!!x,name:"Switch",state:"checked"});ge(g,z,a,void 0,!t,w),ie(()=>{n.current&&v(n.current.checked)},[v]),ye(a,()=>{H(l),O(a!==W.initialValue),v(a),c.change(a)});const{getButtonProps:Q,buttonRef:X}=se({disabled:t,native:p}),Z=we(m,_,n,!p,B),$={id:p?E:z,role:"switch","aria-checked":a,"aria-readonly":d||void 0,"aria-required":b||void 0,"aria-labelledby":Z,onFocus(){t||P(!0)},onBlur(){const e=n.current;!e||t||(q(!0),P(!1),J==="onBlur"&&c.commit(e.checked))},onClick(e){if(d||t)return;e.preventDefault();const u=n.current;u&&oe(u,e)}},ee={...c.getValidationProps(t),checked:a,disabled:t,form:h,id:B,name:l,required:b,style:l?ke:xe,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:G,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(d){e.preventDefault();return}const u=e.currentTarget.checked,S=me(ve,e.nativeEvent);V?.(u,S),!S.isCanceled&&K(u)},onClick(e){e.stopPropagation()},onFocus(){g.current?.focus()},...C!==void 0?{value:C}:ne},I=s.useMemo(()=>({...R,checked:a,disabled:t,readOnly:d,required:b}),[R,a,t,d,b]),te=M("span",i,{state:I,ref:[o,g,X],props:[$,A,Q,e=>c.getValidationProps(t,e)],stateAttributesMapping:D});return f.jsxs(j.Provider,{value:I,children:[te,!a&&l&&y!==void 0&&f.jsx("input",{type:"hidden",form:h,name:l,value:y,disabled:t}),f.jsx("input",{...ee,suppressHydrationWarning:!0})]})}),Pe=s.forwardRef(function(i,o){const{render:k,className:F,style:x,...m}=i,h=Ce();return M("span",i,{state:h,ref:o,stateAttributesMapping:D,props:m})});function De({className:r,size:i="default",...o}){return f.jsx(Re,{"data-slot":"switch","data-size":i,className:de("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",r),...o,children:f.jsx(Pe,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}export{De as S};
@@ -1 +0,0 @@
1
- import{u as r,Q as u}from"./useBaseQuery-bYBwKcW7.js";function a(e,s){return r(e,u)}export{a as u};
@@ -1 +0,0 @@
1
- import{k as n}from"./index-Ddw_j6S-.js";function u(e){return n(e.defaultTagName??"div",e,e)}export{u};