Anons79 Mini Shell

Directory : /home/aplikasiposinfo/public_html/talent.gosepakat.id/public/build/assets/
Upload File :
Current File : /home/aplikasiposinfo/public_html/talent.gosepakat.id/public/build/assets/switch-Cq78FAGx.js

import{r as s,j as r}from"./app-DOZ8oS45.js";import{u as _,a as H,c as I,P as g,b as M}from"./index-G-mLrgfE.js";import{u as B}from"./index-B6RC1W12.js";import{u as q}from"./index-D8T7FMne.js";import{c as S}from"./utils-CytzSlOG.js";var v="Switch",[z,J]=I(v),[A,O]=z(v),x=s.forwardRef((e,o)=>{const{__scopeSwitch:t,name:a,checked:n,defaultChecked:l,required:i,disabled:c,value:d="on",onCheckedChange:b,form:m,...p}=e,[u,E]=s.useState(null),R=_(o,f=>E(f)),k=s.useRef(!1),w=u?m||!!u.closest("form"):!0,[h=!1,N]=H({prop:n,defaultProp:l,onChange:b});return r.jsxs(A,{scope:t,checked:h,disabled:c,children:[r.jsx(g.button,{type:"button",role:"switch","aria-checked":h,"aria-required":i,"data-state":P(h),"data-disabled":c?"":void 0,disabled:c,value:d,...p,ref:R,onClick:M(e.onClick,f=>{N(T=>!T),w&&(k.current=f.isPropagationStopped(),k.current||f.stopPropagation())})}),w&&r.jsx(D,{control:u,bubbles:!k.current,name:a,value:d,checked:h,required:i,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});x.displayName=v;var C="SwitchThumb",y=s.forwardRef((e,o)=>{const{__scopeSwitch:t,...a}=e,n=O(C,t);return r.jsx(g.span,{"data-state":P(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:o})});y.displayName=C;var D=e=>{const{control:o,checked:t,bubbles:a=!0,...n}=e,l=s.useRef(null),i=B(t),c=q(o);return s.useEffect(()=>{const d=l.current,b=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(b,"checked").set;if(i!==t&&p){const u=new Event("click",{bubbles:a});p.call(d,t),d.dispatchEvent(u)}},[i,t,a]),r.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...n,tabIndex:-1,ref:l,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function P(e){return e?"checked":"unchecked"}var j=x,F=y;const L=s.forwardRef(({className:e,...o},t)=>r.jsx(j,{className:S("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...o,ref:t,children:r.jsx(F,{className:S("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));L.displayName=j.displayName;export{L as S};

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]