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/checkbox-1oIpzD28.js

import{r as i,j as n}from"./app-DiP2eDol.js";import{P,u as S,c as N}from"./index-DKUBOKhx.js";import{c as H,u as z,a as w}from"./index-hVpyGAX_.js";import{u as G}from"./index-DmaicniP.js";import{u as K}from"./index-ClI6zOFo.js";import{P as U}from"./toaster-D3F29IGj.js";import{C as X}from"./Combination-DPJEV6AP.js";var g="Checkbox",[$,se]=H(g),[J,_]=$(g);function Q(t){const{__scopeCheckbox:s,checked:r,children:l,defaultChecked:c,disabled:e,form:f,name:h,onCheckedChange:d,required:m,value:k="on",internal_do_not_use_render:u}=t,[p,v]=z({prop:r,defaultProp:c??!1,onChange:d,caller:g}),[C,x]=i.useState(null),[y,o]=i.useState(null),a=i.useRef(!1),E=C?!!f||!!C.closest("form"):!0,R={checked:p,disabled:e,setChecked:v,control:C,setControl:x,name:h,form:f,value:k,hasConsumerStoppedPropagationRef:a,required:m,defaultChecked:b(c)?!1:c,isFormControl:E,bubbleInput:y,setBubbleInput:o};return n.jsx(J,{scope:s,...R,children:V(u)?u(R):l})}var B="CheckboxTrigger",M=i.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:r,...l},c)=>{const{control:e,value:f,disabled:h,checked:d,required:m,setControl:k,setChecked:u,hasConsumerStoppedPropagationRef:p,isFormControl:v,bubbleInput:C}=_(B,t),x=S(c,k),y=i.useRef(d);return i.useEffect(()=>{const o=e==null?void 0:e.form;if(o){const a=()=>u(y.current);return o.addEventListener("reset",a),()=>o.removeEventListener("reset",a)}},[e,u]),n.jsx(P.button,{type:"button",role:"checkbox","aria-checked":b(d)?"mixed":d,"aria-required":m,"data-state":F(d),"data-disabled":h?"":void 0,disabled:h,value:f,...l,ref:x,onKeyDown:w(s,o=>{o.key==="Enter"&&o.preventDefault()}),onClick:w(r,o=>{u(a=>b(a)?!0:!a),C&&v&&(p.current=o.isPropagationStopped(),p.current||o.stopPropagation())})})});M.displayName=B;var I=i.forwardRef((t,s)=>{const{__scopeCheckbox:r,name:l,checked:c,defaultChecked:e,required:f,disabled:h,value:d,onCheckedChange:m,form:k,...u}=t;return n.jsx(Q,{__scopeCheckbox:r,checked:c,defaultChecked:e,disabled:h,required:f,onCheckedChange:m,name:l,form:k,value:d,internal_do_not_use_render:({isFormControl:p})=>n.jsxs(n.Fragment,{children:[n.jsx(M,{...u,ref:s,__scopeCheckbox:r}),p&&n.jsx(D,{__scopeCheckbox:r})]})})});I.displayName=g;var T="CheckboxIndicator",q=i.forwardRef((t,s)=>{const{__scopeCheckbox:r,forceMount:l,...c}=t,e=_(T,r);return n.jsx(U,{present:l||b(e.checked)||e.checked===!0,children:n.jsx(P.span,{"data-state":F(e.checked),"data-disabled":e.disabled?"":void 0,...c,ref:s,style:{pointerEvents:"none",...t.style}})})});q.displayName=T;var A="CheckboxBubbleInput",D=i.forwardRef(({__scopeCheckbox:t,...s},r)=>{const{control:l,hasConsumerStoppedPropagationRef:c,checked:e,defaultChecked:f,required:h,disabled:d,name:m,value:k,form:u,bubbleInput:p,setBubbleInput:v}=_(A,t),C=S(r,v),x=G(e),y=K(l);i.useEffect(()=>{const a=p;if(!a)return;const E=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(E,"checked").set,L=!c.current;if(x!==e&&j){const O=new Event("click",{bubbles:L});a.indeterminate=b(e),j.call(a,b(e)?!1:e),a.dispatchEvent(O)}},[p,x,e,c]);const o=i.useRef(b(e)?!1:e);return n.jsx(P.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??o.current,required:h,disabled:d,name:m,value:k,form:u,...s,tabIndex:-1,ref:C,style:{...s.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});D.displayName=A;function V(t){return typeof t=="function"}function b(t){return t==="indeterminate"}function F(t){return b(t)?"indeterminate":t?"checked":"unchecked"}const W=i.forwardRef(({className:t,...s},r)=>n.jsx(I,{ref:r,className:N("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...s,children:n.jsx(q,{className:N("flex items-center justify-center text-current"),children:n.jsx(X,{className:"h-4 w-4"})})}));W.displayName=I.displayName;export{W as C};

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