@hua-labs/ui 1.1.0-alpha.0.1 → 1.1.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/advanced-dashboard.js.map +1 -1
- package/dist/advanced-dashboard.mjs +1 -1
- package/dist/advanced.js.map +1 -1
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-VPOFRDYL.mjs → chunk-627HOIRV.mjs} +2 -2
- package/dist/{chunk-VPOFRDYL.mjs.map → chunk-627HOIRV.mjs.map} +1 -1
- package/dist/{chunk-SGCVGEDR.mjs → chunk-E5PN4LUS.mjs} +2 -2
- package/dist/{chunk-SGCVGEDR.mjs.map → chunk-E5PN4LUS.mjs.map} +1 -1
- package/dist/{chunk-ZQAAB3P4.mjs → chunk-MXGXBG63.mjs} +2 -2
- package/dist/{chunk-ZQAAB3P4.mjs.map → chunk-MXGXBG63.mjs.map} +1 -1
- package/dist/{chunk-YY6ZBUVJ.mjs → chunk-R5KCFRYV.mjs} +2 -2
- package/dist/{chunk-YY6ZBUVJ.mjs.map → chunk-R5KCFRYV.mjs.map} +1 -1
- package/dist/{chunk-DMYT7RZ4.mjs → chunk-UGSYQDR4.mjs} +2 -2
- package/dist/{chunk-DMYT7RZ4.mjs.map → chunk-UGSYQDR4.mjs.map} +1 -1
- package/dist/{chunk-6NXF6ATP.mjs → chunk-ZFS4B5QT.mjs} +2 -2
- package/dist/{chunk-6NXF6ATP.mjs.map → chunk-ZFS4B5QT.mjs.map} +1 -1
- package/dist/form.js.map +1 -1
- package/dist/form.mjs +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lib/icon-providers.d.ts +2 -3
- package/dist/lib/icon-providers.d.ts.map +1 -1
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-ACEKLG37.mjs';import {l}from'./chunk-DMYT7RZ4.mjs';import {a}from'./chunk-UUHAXGMO.mjs';import A from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var oe=A.forwardRef(({className:r,type:l,...t},n)=>{let g=t["aria-invalid"],s=g!==void 0?g:false;return jsx("input",{type:l,className:a("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200 hover:border-blue-400 hover:shadow-sm",s&&"border-red-500 focus-visible:ring-red-500",r),ref:n,"aria-invalid":s||void 0,...t})});oe.displayName="Input";var le=A.forwardRef(({className:r,children:l,trigger:t,open:n,onOpenChange:g,position:s="bottom",align:o="center",offset:c=8,disabled:f=false,...k},d)=>{let[i,N]=A.useState(false),y=A.useRef(null),x=A.useRef(null),m=n!==void 0,b=m?n:i,h=v=>{f||(m||N(v),g==null||g(v));},D=()=>{h(!b);};A.useEffect(()=>{let v=I=>{y.current&&x.current&&!y.current.contains(I.target)&&!x.current.contains(I.target)&&h(false);};if(b)return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v);}},[b]);let M=()=>{let v="absolute z-50";switch(s){case "top":return a(v,"bottom-full left-0",`mb-${Math.max(1,Math.floor(c/4))}`);case "bottom":return a(v,"top-full left-0",`mt-${Math.max(1,Math.floor(c/4))}`);case "left":return a(v,"right-full top-0",`mr-${Math.max(1,Math.floor(c/4))}`);case "right":return a(v,"left-full top-0",`ml-${Math.max(1,Math.floor(c/4))}`);default:return a(v,"top-full left-0",`mt-${Math.max(1,Math.floor(c/4))}`)}},R=()=>{switch(o){case "start":return s==="top"||s==="bottom"?"left-0":"top-0";case "end":return s==="top"||s==="bottom"?"right-0":"bottom-0";default:return s==="top"||s==="bottom"?"left-1/2 -translate-x-1/2":"top-1/2 -translate-y-1/2"}},F=()=>{let v="absolute w-0 h-0 border-4 border-transparent";switch(s){case "top":return `${v} top-full left-1/2 -translate-x-1/2 border-t-gray-200 dark:border-t-gray-700`;case "bottom":return `${v} bottom-full left-1/2 -translate-x-1/2 border-b-gray-200 dark:border-b-gray-700`;case "left":return `${v} left-full top-1/2 -translate-y-1/2 border-l-gray-200 dark:border-l-gray-700`;case "right":return `${v} right-full top-1/2 -translate-y-1/2 border-r-gray-200 dark:border-r-gray-700`;default:return `${v} bottom-full left-1/2 -translate-x-1/2 border-b-gray-200 dark:border-b-gray-700`}};return jsxs("div",{ref:d,className:a("relative",r),...k,children:[jsx("div",{ref:y,onClick:D,className:"inline-block cursor-pointer",children:t}),b&&jsxs("div",{ref:x,className:a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg p-4 min-w-[200px]",M(),R()),children:[jsx("div",{className:F()}),jsx("div",{className:"relative z-10",children:l})]})]})});le.displayName="Popover";var Me=A.forwardRef(({className:r,children:l,...t},n)=>jsx("div",{ref:n,className:a("inline-block cursor-pointer",r),...t,children:l}));Me.displayName="PopoverTrigger";var De=A.forwardRef(({className:r,children:l,...t},n)=>jsx("div",{ref:n,className:a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg p-4",r),...t,children:l}));De.displayName="PopoverContent";var Re=A.forwardRef(({className:r,children:l,onSubmit:t,variant:n="default",...g},s)=>jsx("form",{ref:s,onSubmit:f=>{f.preventDefault(),t==null||t(f);},className:a({default:"space-y-6",glass:"space-y-6 bg-white/10 backdrop-blur-sm border border-white/20 rounded-xl p-6 shadow-xl dark:bg-slate-800/20 dark:border-slate-700/50"}[n],r),...g,children:l}));Re.displayName="Form";var Te=A.forwardRef(({className:r,children:l,error:t,required:n,...g},s)=>{let o=A.useId(),c=A.Children.map(l,f=>{if(A.isValidElement(f)){let k=f.props,d=f.type,i=false;if(typeof d=="object"&&d!==null){let y=d,x=y.displayName,m=y.name;i=x==="Input"||x==="Select"||x==="Textarea"||m==="Input"||m==="Select"||m==="Textarea";}let N=typeof d=="string"&&["input","select","textarea"].includes(d.toLowerCase());if(i||N){let y=k["aria-describedby"],x=t?y?`${y} ${o}`:o:y;return A.cloneElement(f,{"aria-describedby":x,"aria-invalid":t?true:k["aria-invalid"],required:n||k.required})}}return f});return jsxs("div",{ref:s,className:a("space-y-2",r),...g,children:[c,t&&jsx("p",{id:o,className:"text-sm text-red-600 dark:text-red-400",role:"alert","aria-live":"polite",children:t})]})});Te.displayName="FormField";var Le=A.forwardRef(({className:r,children:l,inline:t=false,...n},g)=>jsx("div",{ref:g,className:a(t?"flex gap-4":"space-y-4",r),...n,children:l}));Le.displayName="FormGroup";var Ie=A.forwardRef(({className:r,children:l,required:t=false,error:n=false,disabled:g=false,variant:s="default",...o},c)=>{let f={default:a("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n&&"text-red-600 dark:text-red-400",g&&"text-slate-400 dark:text-slate-500",!n&&!g&&"text-slate-700 dark:text-slate-300"),glass:a("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n&&"text-red-400",g&&"text-white/50",!n&&!g&&"text-white")};return jsxs("label",{ref:c,className:a(f[s],r),"aria-required":t?true:void 0,...o,children:[l,t&&jsx("span",{className:s==="glass"?"text-red-400 ml-1":"text-red-500 ml-1","aria-label":"\uD544\uC218 \uD544\uB4DC",children:"*"})]})});Ie.displayName="Label";var Se=A.forwardRef(({className:r,variant:l$1="default",size:t="md",error:n=false,success:g=false,label:s,description:o,id:c,...f},k)=>{var D;let d=c||A.useId(),i=s?`${d}-label`:void 0,N=o?`${d}-description`:void 0,y={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},x={sm:12,md:14,lg:16},m={default:"border-gray-300 bg-white text-blue-600 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:focus:ring-blue-400",outline:"border-2 border-gray-200 bg-transparent text-blue-600 focus:ring-blue-500 dark:border-gray-700 dark:focus:ring-blue-400",filled:"border-transparent bg-gray-50 text-blue-600 focus:bg-white focus:ring-blue-500 dark:bg-gray-700 dark:focus:bg-gray-800 dark:focus:ring-blue-400",glass:"border-white/30 bg-white/10 backdrop-blur-sm text-white focus:ring-blue-400/50 focus:bg-white/20 dark:border-slate-600/50 dark:bg-slate-800/10 dark:focus:ring-blue-400/50 dark:focus:bg-slate-700/20"},b=n?"border-red-500 focus:ring-red-500 dark:border-red-400 dark:focus:ring-red-400":g?"border-green-500 focus:ring-green-500 dark:border-green-400 dark:focus:ring-green-400":"",h=(D=f.checked)!=null?D:false;return jsxs("div",{className:"flex items-start space-x-3",children:[jsxs("div",{className:"relative",children:[jsx("input",{type:"checkbox",id:d,className:a("peer absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",r),ref:k,"aria-checked":h,"aria-invalid":n,"aria-label":s?void 0:f["aria-label"],"aria-labelledby":s?i:void 0,"aria-describedby":N,role:"checkbox",...f}),jsx("div",{className:a("flex items-center justify-center rounded border transition-all duration-200 cursor-pointer relative","peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2","peer-hover:border-blue-400 peer-hover:shadow-sm","peer-disabled:cursor-not-allowed peer-disabled:opacity-50 peer-disabled:hover:border-gray-300",y[t],m[l$1],b,h&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500 shadow-md shadow-blue-500/20",!h&&"bg-white dark:bg-gray-800"),children:jsx(l,{name:"check",size:x[t],className:a("text-white transition-all duration-200",h?"opacity-100 scale-100":"opacity-0 scale-0")})})]}),(s||o)&&jsxs("div",{className:"flex flex-col",children:[s&&jsx("label",{htmlFor:d,id:i,className:"text-sm font-medium text-gray-900 dark:text-white cursor-pointer",children:s}),o&&jsx("p",{id:N,className:"text-sm text-gray-500 dark:text-gray-400",children:o})]})]})});Se.displayName="Checkbox";var Pe=A.forwardRef(({className:r,variant:l="default",size:t="md",error:n=false,success:g=false,label:s,description:o,id:c,...f},k)=>{var h;let d=c||A.useId(),i=s?`${d}-label`:void 0,N=o?`${d}-description`:void 0,y={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},x={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"},m={default:"border-gray-300 bg-white text-blue-600 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:focus:ring-blue-400",outline:"border-2 border-gray-200 bg-transparent text-blue-600 focus:ring-blue-500 dark:border-gray-700 dark:focus:ring-blue-400",filled:"border-transparent bg-gray-50 text-blue-600 focus:bg-white focus:ring-blue-500 dark:bg-gray-700 dark:focus:bg-gray-800 dark:focus:ring-blue-400",glass:"border-white/30 bg-white/10 backdrop-blur-sm text-white focus:ring-blue-400/50 focus:bg-white/20 dark:border-slate-600/50 dark:bg-slate-800/10 dark:focus:ring-blue-400/50 dark:focus:bg-slate-700/20"},b=n?"border-red-500 focus:ring-red-500 dark:border-red-400 dark:focus:ring-red-400":g?"border-green-500 focus:ring-green-500 dark:border-green-400 dark:focus:ring-green-400":"";return jsxs("div",{className:"flex items-start space-x-3",children:[jsxs("div",{className:"relative",children:[jsx("input",{type:"radio",id:d,className:a("peer sr-only",r),ref:k,"aria-checked":(h=f.checked)!=null?h:false,"aria-invalid":n,"aria-label":s?void 0:f["aria-label"],"aria-labelledby":s?i:void 0,"aria-describedby":N,role:"radio",...f}),jsx("div",{className:a("flex items-center justify-center rounded-full border transition-all duration-200 cursor-pointer","peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",y[t],m[l],b,"peer-checked:border-blue-600 dark:peer-checked:border-blue-500"),children:jsx("div",{className:a("rounded-full bg-blue-600 dark:bg-blue-500 opacity-0 peer-checked:opacity-100 transition-opacity duration-200",x[t])})})]}),(s||o)&&jsxs("div",{className:"flex flex-col",children:[s&&jsx("label",{htmlFor:d,id:i,className:"text-sm font-medium text-gray-900 dark:text-white cursor-pointer",children:s}),o&&jsx("p",{id:N,className:"text-sm text-gray-500 dark:text-gray-400",children:o})]})]})});Pe.displayName="Radio";var Ae=A.forwardRef(({className:r,variant:l$1="default",size:t="md",error:n=false,success:g=false,leftIcon:s,placeholder:o,children:c,"aria-label":f,"aria-invalid":k,...d},i)=>{let N={default:"border-gray-300 bg-white text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:focus:border-blue-400 dark:focus:ring-blue-400",outline:"border-2 border-gray-200 bg-transparent text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-700 dark:text-white dark:focus:border-blue-400 dark:focus:ring-blue-400",filled:"border-transparent bg-gray-50 text-gray-900 focus:bg-white focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-700 dark:text-white dark:focus:bg-gray-800 dark:focus:border-blue-400 dark:focus:ring-blue-400",ghost:"border-transparent bg-transparent text-gray-900 focus:bg-gray-50 focus:border-gray-300 focus:ring-gray-500 dark:text-white dark:focus:bg-gray-800 dark:focus:border-gray-600 dark:focus:ring-gray-400",glass:"border-white/30 bg-white/10 backdrop-blur-sm text-white focus:border-blue-400/50 focus:ring-blue-400/20 focus:bg-white/20 dark:border-slate-600/50 dark:bg-slate-800/10 dark:text-slate-200 dark:focus:border-blue-400/50 dark:focus:ring-blue-400/20 dark:focus:bg-slate-700/20"},y={sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-4 text-lg"},x=n?"border-red-500 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:focus:border-red-400 dark:focus:ring-red-400":g?"border-green-500 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:focus:border-green-400 dark:focus:ring-green-400":"",m=A.useRef(null),b=A.useCallback(M=>{m.current=M,typeof i=="function"?i(M):i&&(i.current=M);},[i]),[h,D]=A.useState(false);return jsxs("div",{className:"relative",children:[s&&jsx("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500 pointer-events-none z-10",children:s}),jsxs("select",{ref:b,className:a("flex w-full appearance-none rounded-md border transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-offset-2","hover:border-blue-400 hover:shadow-sm","disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-gray-300",N[l$1],y[t],x,s?"pl-10":"","pr-10",r),"aria-label":f||(o?void 0:"\uC120\uD0DD"),"aria-invalid":k!==void 0?k:n||void 0,onFocus:M=>{var R;D(true),(R=d.onFocus)==null||R.call(d,M);},onBlur:M=>{var R;D(false),(R=d.onBlur)==null||R.call(d,M);},...d,children:[o&&jsx("option",{value:"",disabled:true,children:o}),c]}),jsx("div",{className:a("absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500 pointer-events-none transition-transform duration-200",h&&"rotate-180"),children:jsx(l,{name:"chevronDown",size:16})})]})});Ae.displayName="Select";var $e=A.forwardRef(({className:r,...l},t)=>jsx("option",{className:r||"",ref:t,...l}));$e.displayName="SelectOption";var ze=A.forwardRef(({className:r,variant:l="default",size:t="md",error:n=false,success:g=false,label:s,description:o,id:c,...f},k)=>{var h;let d=c||A.useId(),i=s?`${d}-label`:void 0,N=o?`${d}-description`:void 0,y={sm:"w-8 h-4",md:"w-11 h-6",lg:"w-14 h-7"},x={sm:"w-3 h-3",md:"w-5 h-5",lg:"w-6 h-6"},m={default:"bg-gray-200 peer-checked:bg-blue-600 dark:bg-gray-700 dark:peer-checked:bg-blue-500",outline:"bg-transparent border-2 border-gray-300 peer-checked:border-blue-600 peer-checked:bg-blue-600 dark:border-gray-600 dark:peer-checked:border-blue-500 dark:peer-checked:bg-blue-500",filled:"bg-gray-100 peer-checked:bg-blue-600 dark:bg-gray-800 dark:peer-checked:bg-blue-500",glass:"bg-white/20 backdrop-blur-sm border border-white/30 peer-checked:bg-blue-400/50 peer-checked:border-blue-300/50 dark:bg-slate-800/20 dark:border-slate-700/50 dark:peer-checked:bg-blue-400/50 dark:peer-checked:border-blue-300/50"},b=n?"bg-red-200 peer-checked:bg-red-600 dark:bg-red-800 dark:peer-checked:bg-red-500":g?"bg-green-200 peer-checked:bg-green-600 dark:bg-green-800 dark:peer-checked:bg-green-500":"";return jsxs("div",{className:"flex items-start space-x-3",children:[jsxs("div",{className:"relative",children:[jsx("input",{type:"checkbox",id:d,className:a("peer sr-only",r),ref:k,"aria-checked":(h=f.checked)!=null?h:false,"aria-invalid":n,"aria-label":s?void 0:f["aria-label"],"aria-labelledby":s?i:void 0,"aria-describedby":N,role:"switch",...f}),jsx("div",{className:a("relative inline-flex cursor-pointer items-center rounded-full transition-colors duration-200 ease-in-out","peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-blue-500 peer-focus:ring-offset-2","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",y[t],m[l],b),children:jsx("div",{className:a("pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 ease-in-out","peer-checked:translate-x-full",x[t],t==="sm"?"translate-x-0.5 peer-checked:translate-x-4.5":"",t==="md"?"translate-x-0.5 peer-checked:translate-x-5.5":"",t==="lg"?"translate-x-0.5 peer-checked:translate-x-7":"")})})]}),(s||o)&&jsxs("div",{className:"flex flex-col",children:[s&&jsx("label",{htmlFor:d,id:i,className:"text-sm font-medium text-gray-900 dark:text-white cursor-pointer",children:s}),o&&jsx("p",{id:N,className:"text-sm text-gray-500 dark:text-gray-400",children:o})]})]})});ze.displayName="Switch";var Ye=A.forwardRef(({className:r,variant:l="default",size:t="md",showValue:n=false,showLabel:g=false,label:s,min:o=0,max:c=100,step:f=1,value:k=0,onValueChange:d,orientation:i="horizontal",disabled:N=false,...y},x)=>{let m=Array.isArray(k),b=m?k:[k],h=w=>{let T=parseFloat(w.target.value);if(d)if(m){let O=parseInt(w.target.dataset.index||"0"),$=[...b];$[O]=T,d($);}else d(T);},D={default:"bg-gray-200 dark:bg-gray-700",primary:"bg-blue-200 dark:bg-blue-700",success:"bg-green-200 dark:bg-green-700",warning:"bg-yellow-200 dark:bg-yellow-700",danger:"bg-red-200 dark:bg-red-700"},M={default:"bg-gray-400 hover:bg-gray-500 dark:bg-gray-500 dark:hover:bg-gray-400",primary:"bg-blue-500 hover:bg-blue-600 dark:bg-blue-400 dark:hover:bg-blue-500",success:"bg-green-500 hover:bg-green-600 dark:bg-green-400 dark:hover:bg-green-500",warning:"bg-yellow-500 hover:bg-yellow-600 dark:bg-yellow-400 dark:hover:bg-yellow-500",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500"},R={sm:i==="horizontal"?"h-1":"w-1",md:i==="horizontal"?"h-2":"w-2",lg:i==="horizontal"?"h-3":"w-3"},F={sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6"},v=i==="vertical"?"flex-col h-full":"flex-row w-full",I=(w=0)=>jsx("input",{ref:w===0?x:void 0,type:"range",min:o,max:c,step:f,value:b[w],onChange:h,"data-index":w,disabled:N,className:a("appearance-none cursor-pointer rounded-full transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",R[t],D[l],i==="vertical"?"writing-mode: bt-lr; -webkit-appearance: slider-vertical":"",r),style:{...i==="vertical"&&{writingMode:"vertical-rl",WebkitAppearance:"slider-vertical"}},...y},w),u=()=>n?m?jsx("div",{className:"flex gap-2 text-sm text-gray-600 dark:text-gray-400",children:b.map((w,T)=>jsx("span",{className:"font-mono",children:w},T))}):jsx("span",{className:"text-sm font-mono text-gray-600 dark:text-gray-400",children:b[0]}):null;return jsxs("div",{className:a("flex items-center gap-4",v),children:[g&&s&&jsx("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 min-w-0",children:s}),jsxs("div",{className:"flex-1 relative",children:[jsxs("div",{className:a("relative",i==="vertical"?"h-full":"w-full"),children:[jsx("div",{className:a("absolute rounded-full",R[t],D[l],i==="vertical"?"w-full bottom-0":"h-full left-0")}),m?jsx("div",{className:a("absolute rounded-full bg-blue-500 dark:bg-blue-400",R[t],i==="vertical"?"w-full bottom-0":"h-full left-0"),style:{...i==="vertical"?{bottom:`${(b[0]-o)/(c-o)*100}%`,height:`${(b[1]-b[0])/(c-o)*100}%`}:{left:`${(b[0]-o)/(c-o)*100}%`,width:`${(b[1]-b[0])/(c-o)*100}%`}}}):jsx("div",{className:a("absolute rounded-full bg-blue-500 dark:bg-blue-400",R[t],i==="vertical"?"w-full bottom-0":"h-full left-0"),style:{...i==="vertical"?{height:`${(b[0]-o)/(c-o)*100}%`}:{width:`${(b[0]-o)/(c-o)*100}%`}}}),m?b.map((w,T)=>jsx("div",{className:a("absolute rounded-full border-2 border-white shadow-lg transition-all duration-200 hover:scale-110",F[t],M[l],i==="vertical"?"left-1/2 transform -translate-x-1/2":"top-1/2 transform -translate-y-1/2"),style:{...i==="vertical"?{bottom:`${(b[T]-o)/(c-o)*100}%`}:{left:`${(b[T]-o)/(c-o)*100}%`}}},T)):jsx("div",{className:a("absolute rounded-full border-2 border-white shadow-lg transition-all duration-200 hover:scale-110",F[t],M[l],i==="vertical"?"left-1/2 transform -translate-x-1/2":"top-1/2 transform -translate-y-1/2"),style:{...i==="vertical"?{bottom:`${(b[0]-o)/(c-o)*100}%`}:{left:`${(b[0]-o)/(c-o)*100}%`}}})]}),jsx("div",{className:"absolute inset-0 opacity-0",children:m?b.map((w,T)=>I(T)):I()})]}),u()]})});Ye.displayName="Slider";var Ue=A.forwardRef(({className:r,variant:l="default",size:t="md",error:n=false,success:g=false,resize:s="vertical",...o},c)=>{let f={default:"border-gray-300 bg-white text-gray-900 placeholder-gray-500 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-400 dark:focus:ring-blue-400 transition-all duration-200 hover:border-blue-400 hover:shadow-sm",outline:"border-2 border-gray-200 bg-transparent text-gray-900 placeholder-gray-500 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-400 dark:focus:ring-blue-400 transition-all duration-200 hover:border-blue-400 hover:shadow-sm",filled:"border-transparent bg-gray-50 text-gray-900 placeholder-gray-500 focus:bg-white focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:bg-gray-800 dark:focus:border-blue-400 dark:focus:ring-blue-400 transition-all duration-200 hover:bg-gray-100 dark:hover:bg-gray-600",ghost:"border-transparent bg-transparent text-gray-900 placeholder-gray-500 focus:bg-gray-50 focus:border-gray-300 focus:ring-gray-500 dark:text-white dark:placeholder-gray-400 dark:focus:bg-gray-800 dark:focus:border-gray-600 dark:focus:ring-gray-400 transition-all duration-200 hover:bg-gray-50 dark:hover:bg-gray-800",glass:"border-white/30 bg-white/10 backdrop-blur-sm text-white placeholder-white/60 focus:border-blue-400/50 focus:ring-blue-400/20 focus:bg-white/20 dark:border-slate-600/50 dark:bg-slate-800/10 dark:text-slate-200 dark:placeholder-slate-400 dark:focus:border-blue-400/50 dark:focus:ring-blue-400/20 dark:focus:bg-slate-700/20 transition-all duration-200 hover:border-blue-400/40 hover:bg-white/15 dark:hover:bg-slate-700/15"},k={sm:"px-3 py-2 text-sm min-h-[80px]",md:"px-4 py-3 text-base min-h-[100px]",lg:"px-4 py-3 text-lg min-h-[120px]"},d={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},i=n?"border-red-500 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:focus:border-red-400 dark:focus:ring-red-400":g?"border-green-500 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:focus:border-green-400 dark:focus:ring-green-400":"",N=o["aria-invalid"],y=n||(N!==void 0?N:false);return jsx("textarea",{className:a("flex w-full rounded-md border transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",f[l],k[t],d[s],i,r),ref:c,"aria-invalid":y||void 0,...o})});Ue.displayName="Textarea";var Ke={sm:"h-8 text-sm px-3",md:"h-10 text-sm px-4",lg:"h-12 text-base px-5"},qe=(r,l="YYYY-MM-DD",t="ko-KR")=>{if(!r)return "";let n=r.getFullYear(),g=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0");return l.replace("YYYY",String(n)).replace("MM",g).replace("DD",s)},Ge=(r,l)=>new Date(r,l+1,0).getDate(),We=(r,l)=>new Date(r,l,1).getDay(),_e=A.forwardRef(({value:r,onChange:l$1,minDate:t,maxDate:n,placeholder:g="\uB0A0\uC9DC\uB97C \uC120\uD0DD\uD558\uC138\uC694",disabled:s=false,error:o=false,dateFormat:c="YYYY-MM-DD",locale:f="ko-KR",size:k="md",className:d,...i},N)=>{let[y,x]=A.useState(false),[m,b]=A.useState(r?new Date(r.getFullYear(),r.getMonth()):new Date),[h,D]=A.useState(null),M=r?qe(r,c,f):"",R=e=>{t&&e<t||n&&e>n||(l$1==null||l$1(e),x(false));},F=()=>{b(new Date(m.getFullYear(),m.getMonth()-1));},v=()=>{b(new Date(m.getFullYear(),m.getMonth()+1));},I=()=>{let e=new Date;e.setHours(0,0,0,0),R(e);},u=m.getFullYear(),w=m.getMonth(),T=Ge(u,w),O=We(u,w),$=f==="ko-KR"?["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],j=e=>!!(t&&e<t||n&&e>n),ee=e=>r?e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate():false,re=e=>{let p=new Date;return e.getFullYear()===p.getFullYear()&&e.getMonth()===p.getMonth()&&e.getDate()===p.getDate()},Y=[];for(let e=O-1;e>=0;e--){let p=new Date(u,w,-e);Y.push(p);}for(let e=1;e<=T;e++)Y.push(new Date(u,w,e));let te=42-Y.length;for(let e=1;e<=te;e++)Y.push(new Date(u,w+1,e));let ae=jsxs("button",{type:"button",disabled:s,className:a("flex w-full items-center justify-between rounded-lg border bg-white px-4 py-2 text-left text-sm transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700",o&&"border-red-500 focus:ring-red-500",s&&"cursor-not-allowed opacity-50",Ke[k]),"aria-label":M||g,children:[jsx("span",{className:a("flex-1",!M&&"text-gray-400 dark:text-gray-500"),children:M||g}),jsx(l,{name:"calendar",className:a("ml-2 h-4 w-4 transition-transform",y&&"rotate-180")})]});return jsx("div",{ref:N,className:a("relative",d),...i,children:jsx(le,{open:y,onOpenChange:x,trigger:ae,position:"bottom",align:"start",children:jsx("div",{className:"w-auto p-0",children:jsxs("div",{className:"p-4",children:[jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsx("button",{type:"button",onClick:F,className:"rounded-lg p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"\uC774\uC804 \uB2EC",children:jsx(l,{name:"chevronLeft",className:"h-4 w-4"})}),jsxs("div",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:[u,"\uB144 ",w+1,"\uC6D4"]}),jsx("button",{type:"button",onClick:v,className:"rounded-lg p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"\uB2E4\uC74C \uB2EC",children:jsx(l,{name:"chevronRight",className:"h-4 w-4"})})]}),jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:$.map((e,p)=>jsx("div",{className:a("text-center text-xs font-medium py-2",p===0&&"text-red-500 dark:text-red-400",p===6&&"text-blue-500 dark:text-blue-400"),children:e},p))}),jsx("div",{className:"grid grid-cols-7 gap-1",children:Y.map((e,p)=>{if(!e)return jsx("div",{},p);let S=e.getMonth()===w,V=j(e),se=ee(e),ke=re(e),xe=h&&e.getFullYear()===h.getFullYear()&&e.getMonth()===h.getMonth()&&e.getDate()===h.getDate();return jsx("button",{type:"button",disabled:V,onClick:()=>R(e),onMouseEnter:()=>D(e),onMouseLeave:()=>D(null),className:a("relative h-9 w-9 rounded-lg text-sm font-medium transition-all","hover:bg-blue-50 dark:hover:bg-blue-900/20","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1",!S&&"text-gray-400 dark:text-gray-500",V&&"cursor-not-allowed opacity-30",se&&"bg-blue-600 text-white hover:bg-blue-700 shadow-md",ke&&!se&&"ring-2 ring-blue-500",xe&&!se&&"bg-blue-100 dark:bg-blue-900/30"),"aria-label":`${u}\uB144 ${w+1}\uC6D4 ${e.getDate()}\uC77C`,children:e.getDate()},p)})}),jsx("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:jsx(a$1,{variant:"outline",size:"sm",onClick:I,className:"w-full",children:"\uC624\uB298"})})]})})})})});_e.displayName="DatePicker";var ge=r=>{if(r===0)return "0 Bytes";let l=1024,t=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(r)/Math.log(l));return Math.round(r/Math.pow(l,n)*100)/100+" "+t[n]},Je=r=>r.startsWith("image/")?"image":r.startsWith("video/")?"video":r.includes("pdf")||r.includes("word")||r.includes("document")||r.includes("excel")||r.includes("spreadsheet")?"fileText":"file",Qe=A.forwardRef(({files:r=[],onChange:l$1,onRemove:t,multiple:n=false,accept:g,maxSize:s,maxFiles:o,disabled:c=false,dragDrop:f=true,placeholder:k="\uD30C\uC77C\uC744 \uC120\uD0DD\uD558\uAC70\uB098 \uC5EC\uAE30\uC5D0 \uB4DC\uB798\uADF8\uD558\uC138\uC694",size:d="md",className:i,...N},y)=>{let x=A.useRef(null),[m,b]=A.useState(false),h=u=>{if(!u||u.length===0)return;let w=Array.from(u);if(o&&r.length+w.length>o){alert(`\uCD5C\uB300 ${o}\uAC1C\uC758 \uD30C\uC77C\uB9CC \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);return}let T=w.filter(O=>s&&O.size>s?(alert(`\uD30C\uC77C \uD06C\uAE30\uB294 ${ge(s)}\uB97C \uCD08\uACFC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${O.name}`),false):true);T.length>0&&(l$1==null||l$1(T));},D=()=>{var u;c||(u=x.current)==null||u.click();},M=u=>{u.preventDefault(),!c&&f&&b(true);},R=u=>{u.preventDefault(),b(false);},F=u=>{u.preventDefault(),b(false),!c&&f&&h(u.dataTransfer.files);},v=u=>{t==null||t(u);},I={sm:"p-4",md:"p-6",lg:"p-8"};return jsxs("div",{ref:y,className:a("w-full",i),...N,children:[jsxs("div",{onClick:D,onDragOver:M,onDragLeave:R,onDrop:F,className:a("relative border-2 border-dashed rounded-xl transition-all cursor-pointer","bg-gray-50 dark:bg-gray-900/50","border-gray-300 dark:border-gray-700",m&&"border-blue-500 bg-blue-50 dark:bg-blue-900/20",c&&"cursor-not-allowed opacity-50",I[d]),children:[jsx("input",{ref:x,type:"file",multiple:n,accept:g,disabled:c,onChange:u=>h(u.target.files),className:"hidden","aria-label":"\uD30C\uC77C \uC120\uD0DD"}),jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[jsx("div",{className:a("rounded-full bg-blue-100 dark:bg-blue-900/30 p-4 mb-4",m&&"bg-blue-200 dark:bg-blue-900/50"),children:jsx(l,{name:"upload",className:a("h-8 w-8 text-blue-600 dark:text-blue-400",m&&"scale-110")})}),jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:k}),jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[g&&`\uC9C0\uC6D0 \uD615\uC2DD: ${g}`,s&&` \u2022 \uCD5C\uB300 \uD06C\uAE30: ${ge(s)}`,o&&` \u2022 \uCD5C\uB300 ${o}\uAC1C`]})]})]}),r.length>0&&jsx("div",{className:"mt-4 space-y-2",children:r.map(u=>jsxs("div",{className:a("flex items-center gap-3 p-3 rounded-lg border","bg-white dark:bg-gray-800","border-gray-200 dark:border-gray-700",u.status==="error"&&"border-red-300 dark:border-red-700 bg-red-50 dark:bg-red-900/20"),children:[jsx("div",{className:"flex-shrink-0",children:jsx("div",{className:"rounded-lg bg-gray-100 dark:bg-gray-700 p-2",children:jsx(l,{name:Je(u.type),className:"h-5 w-5 text-gray-600 dark:text-gray-400"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:u.name}),jsxs("div",{className:"flex items-center gap-2 mt-1",children:[jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:ge(u.size)}),u.status==="uploading"&&u.progress!==void 0&&jsxs(Fragment,{children:[jsx("div",{className:"flex-1 h-1.5 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",children:jsx("div",{className:"h-full bg-blue-600 transition-all duration-300",style:{width:`${u.progress}%`}})}),jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[u.progress,"%"]})]}),u.status==="success"&&jsxs("span",{className:"text-xs text-green-600 dark:text-green-400 flex items-center gap-1",children:[jsx(l,{name:"check",className:"h-3 w-3"}),"\uC644\uB8CC"]}),u.status==="error"&&jsx("span",{className:"text-xs text-red-600 dark:text-red-400",children:u.error||"\uC5C5\uB85C\uB4DC \uC2E4\uD328"})]})]}),t&&jsx("button",{type:"button",onClick:()=>v(u),className:"flex-shrink-0 rounded-lg p-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"\uD30C\uC77C \uC81C\uAC70",children:jsx(l,{name:"close",className:"h-4 w-4 text-gray-500 dark:text-gray-400"})})]},u.id))})]})});Qe.displayName="Upload";var Ze={sm:"h-8 text-sm",md:"h-10 text-sm",lg:"h-12 text-base"},je=A.forwardRef(({options:r,value:l$1,onChange:t,placeholder:n="\uAC80\uC0C9\uD558\uAC70\uB098 \uC120\uD0DD\uD558\uC138\uC694",disabled:g=false,error:s=false,loading:o=false,maxHeight:c=300,clearable:f=true,filterable:k=true,onSearch:d,emptyText:i="\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",size:N="md",className:y,...x},m)=>{let[b,h]=A.useState(false),[D,M]=A.useState(""),[R,F]=A.useState(r),[v,I]=A.useState(-1),[u,w]=A.useState(false),T=A.useRef(null),O=A.useRef(null),$=A.useMemo(()=>r.find(e=>e.value===l$1),[r,l$1]);A.useEffect(()=>{$?M($.label):l$1||M("");},[$,l$1]),A.useEffect(()=>{if(d){w(true);let e=d(D);e instanceof Promise?e.then(p=>{F(p),w(false);}):(F(e),w(false));}else if(k)if(!D.trim())F(r);else {let e=r.filter(p=>{var S;return p.label.toLowerCase().includes(D.toLowerCase())||p.value.toLowerCase().includes(D.toLowerCase())||((S=p.description)==null?void 0:S.toLowerCase().includes(D.toLowerCase()))});F(e);}else F(r);},[D,r,k,d]);let j=e=>{let p=e.target.value;M(p),h(true),I(-1),!p&&f&&(t==null||t(""));},ee=()=>{h(true);},re=e=>{var p;(p=O.current)!=null&&p.contains(e.relatedTarget)||(h(false),I(-1),$&&M($.label));},Y=e=>{var p;M(e.label),t==null||t(e.value,e),h(false),(p=T.current)==null||p.blur();},te=()=>{var e;M(""),t==null||t(""),(e=T.current)==null||e.focus();},ae=e=>{var p;if(!b||R.length===0){e.key==="ArrowDown"&&h(true);return}switch(e.key){case "ArrowDown":e.preventDefault(),I(S=>S<R.length-1?S+1:S);break;case "ArrowUp":e.preventDefault(),I(S=>S>0?S-1:-1);break;case "Enter":e.preventDefault(),v>=0&&R[v]&&Y(R[v]);break;case "Escape":h(false),(p=T.current)==null||p.blur();break}};return jsxs("div",{ref:m,className:a("relative w-full",y),...x,children:[jsxs("div",{className:"relative",children:[jsx(oe,{ref:T,type:"text",value:D,onChange:j,onFocus:ee,onBlur:re,onKeyDown:ae,placeholder:n,disabled:g,"aria-invalid":s,"aria-autocomplete":"list","aria-expanded":b,"aria-controls":"autocomplete-list",className:a(Ze[N],"pr-10")}),jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1",children:o||u?jsx(l,{name:"loader",className:"h-4 w-4 animate-spin text-gray-400"}):f&&D?jsx("button",{type:"button",onClick:te,className:"rounded p-1 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"\uC9C0\uC6B0\uAE30",children:jsx(l,{name:"close",className:"h-4 w-4 text-gray-400"})}):jsx(l,{name:"chevronDown",className:"h-4 w-4 text-gray-400"})})]}),b&&jsx("div",{ref:O,id:"autocomplete-list",role:"listbox",className:a("absolute z-50 w-full mt-1 rounded-lg border shadow-lg","bg-white dark:bg-gray-800","border-gray-200 dark:border-gray-700","overflow-hidden"),style:{maxHeight:`${c}px`},children:jsx("div",{className:"overflow-y-auto",style:{maxHeight:`${c}px`},children:R.length===0?jsx("div",{className:"px-4 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:i}):R.map((e,p)=>{let S=v===p,V=l$1===e.value;return jsx("div",{role:"option","aria-selected":V,onClick:()=>Y(e),onMouseEnter:()=>I(p),className:a("px-4 py-3 cursor-pointer transition-colors","hover:bg-gray-100 dark:hover:bg-gray-700",S&&"bg-blue-50 dark:bg-blue-900/20",V&&"bg-blue-100 dark:bg-blue-900/30"),children:jsxs("div",{className:"flex items-center gap-3",children:[e.icon&&jsx("div",{className:"flex-shrink-0 text-gray-400",children:e.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:e.label}),V&&jsx(l,{name:"check",className:"h-4 w-4 text-blue-600 dark:text-blue-400 flex-shrink-0"})]}),e.description&&jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:e.description})]})]})},e.value)})})})]})});je.displayName="Autocomplete";export{oe as a,le as b,Me as c,De as d,Re as e,Te as f,Le as g,Ie as h,Se as i,Pe as j,Ae as k,$e as l,ze as m,Ye as n,Ue as o,_e as p,Qe as q,je as r};//# sourceMappingURL=chunk-6NXF6ATP.mjs.map
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-ACEKLG37.mjs';import {l}from'./chunk-UGSYQDR4.mjs';import {a}from'./chunk-UUHAXGMO.mjs';import A from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var oe=A.forwardRef(({className:r,type:l,...t},n)=>{let g=t["aria-invalid"],s=g!==void 0?g:false;return jsx("input",{type:l,className:a("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200 hover:border-blue-400 hover:shadow-sm",s&&"border-red-500 focus-visible:ring-red-500",r),ref:n,"aria-invalid":s||void 0,...t})});oe.displayName="Input";var le=A.forwardRef(({className:r,children:l,trigger:t,open:n,onOpenChange:g,position:s="bottom",align:o="center",offset:c=8,disabled:f=false,...k},d)=>{let[i,N]=A.useState(false),y=A.useRef(null),x=A.useRef(null),m=n!==void 0,b=m?n:i,h=v=>{f||(m||N(v),g==null||g(v));},D=()=>{h(!b);};A.useEffect(()=>{let v=I=>{y.current&&x.current&&!y.current.contains(I.target)&&!x.current.contains(I.target)&&h(false);};if(b)return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v);}},[b]);let M=()=>{let v="absolute z-50";switch(s){case "top":return a(v,"bottom-full left-0",`mb-${Math.max(1,Math.floor(c/4))}`);case "bottom":return a(v,"top-full left-0",`mt-${Math.max(1,Math.floor(c/4))}`);case "left":return a(v,"right-full top-0",`mr-${Math.max(1,Math.floor(c/4))}`);case "right":return a(v,"left-full top-0",`ml-${Math.max(1,Math.floor(c/4))}`);default:return a(v,"top-full left-0",`mt-${Math.max(1,Math.floor(c/4))}`)}},R=()=>{switch(o){case "start":return s==="top"||s==="bottom"?"left-0":"top-0";case "end":return s==="top"||s==="bottom"?"right-0":"bottom-0";default:return s==="top"||s==="bottom"?"left-1/2 -translate-x-1/2":"top-1/2 -translate-y-1/2"}},F=()=>{let v="absolute w-0 h-0 border-4 border-transparent";switch(s){case "top":return `${v} top-full left-1/2 -translate-x-1/2 border-t-gray-200 dark:border-t-gray-700`;case "bottom":return `${v} bottom-full left-1/2 -translate-x-1/2 border-b-gray-200 dark:border-b-gray-700`;case "left":return `${v} left-full top-1/2 -translate-y-1/2 border-l-gray-200 dark:border-l-gray-700`;case "right":return `${v} right-full top-1/2 -translate-y-1/2 border-r-gray-200 dark:border-r-gray-700`;default:return `${v} bottom-full left-1/2 -translate-x-1/2 border-b-gray-200 dark:border-b-gray-700`}};return jsxs("div",{ref:d,className:a("relative",r),...k,children:[jsx("div",{ref:y,onClick:D,className:"inline-block cursor-pointer",children:t}),b&&jsxs("div",{ref:x,className:a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg p-4 min-w-[200px]",M(),R()),children:[jsx("div",{className:F()}),jsx("div",{className:"relative z-10",children:l})]})]})});le.displayName="Popover";var Me=A.forwardRef(({className:r,children:l,...t},n)=>jsx("div",{ref:n,className:a("inline-block cursor-pointer",r),...t,children:l}));Me.displayName="PopoverTrigger";var De=A.forwardRef(({className:r,children:l,...t},n)=>jsx("div",{ref:n,className:a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg p-4",r),...t,children:l}));De.displayName="PopoverContent";var Re=A.forwardRef(({className:r,children:l,onSubmit:t,variant:n="default",...g},s)=>jsx("form",{ref:s,onSubmit:f=>{f.preventDefault(),t==null||t(f);},className:a({default:"space-y-6",glass:"space-y-6 bg-white/10 backdrop-blur-sm border border-white/20 rounded-xl p-6 shadow-xl dark:bg-slate-800/20 dark:border-slate-700/50"}[n],r),...g,children:l}));Re.displayName="Form";var Te=A.forwardRef(({className:r,children:l,error:t,required:n,...g},s)=>{let o=A.useId(),c=A.Children.map(l,f=>{if(A.isValidElement(f)){let k=f.props,d=f.type,i=false;if(typeof d=="object"&&d!==null){let y=d,x=y.displayName,m=y.name;i=x==="Input"||x==="Select"||x==="Textarea"||m==="Input"||m==="Select"||m==="Textarea";}let N=typeof d=="string"&&["input","select","textarea"].includes(d.toLowerCase());if(i||N){let y=k["aria-describedby"],x=t?y?`${y} ${o}`:o:y;return A.cloneElement(f,{"aria-describedby":x,"aria-invalid":t?true:k["aria-invalid"],required:n||k.required})}}return f});return jsxs("div",{ref:s,className:a("space-y-2",r),...g,children:[c,t&&jsx("p",{id:o,className:"text-sm text-red-600 dark:text-red-400",role:"alert","aria-live":"polite",children:t})]})});Te.displayName="FormField";var Le=A.forwardRef(({className:r,children:l,inline:t=false,...n},g)=>jsx("div",{ref:g,className:a(t?"flex gap-4":"space-y-4",r),...n,children:l}));Le.displayName="FormGroup";var Ie=A.forwardRef(({className:r,children:l,required:t=false,error:n=false,disabled:g=false,variant:s="default",...o},c)=>{let f={default:a("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n&&"text-red-600 dark:text-red-400",g&&"text-slate-400 dark:text-slate-500",!n&&!g&&"text-slate-700 dark:text-slate-300"),glass:a("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n&&"text-red-400",g&&"text-white/50",!n&&!g&&"text-white")};return jsxs("label",{ref:c,className:a(f[s],r),"aria-required":t?true:void 0,...o,children:[l,t&&jsx("span",{className:s==="glass"?"text-red-400 ml-1":"text-red-500 ml-1","aria-label":"\uD544\uC218 \uD544\uB4DC",children:"*"})]})});Ie.displayName="Label";var Se=A.forwardRef(({className:r,variant:l$1="default",size:t="md",error:n=false,success:g=false,label:s,description:o,id:c,...f},k)=>{var D;let d=c||A.useId(),i=s?`${d}-label`:void 0,N=o?`${d}-description`:void 0,y={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},x={sm:12,md:14,lg:16},m={default:"border-gray-300 bg-white text-blue-600 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:focus:ring-blue-400",outline:"border-2 border-gray-200 bg-transparent text-blue-600 focus:ring-blue-500 dark:border-gray-700 dark:focus:ring-blue-400",filled:"border-transparent bg-gray-50 text-blue-600 focus:bg-white focus:ring-blue-500 dark:bg-gray-700 dark:focus:bg-gray-800 dark:focus:ring-blue-400",glass:"border-white/30 bg-white/10 backdrop-blur-sm text-white focus:ring-blue-400/50 focus:bg-white/20 dark:border-slate-600/50 dark:bg-slate-800/10 dark:focus:ring-blue-400/50 dark:focus:bg-slate-700/20"},b=n?"border-red-500 focus:ring-red-500 dark:border-red-400 dark:focus:ring-red-400":g?"border-green-500 focus:ring-green-500 dark:border-green-400 dark:focus:ring-green-400":"",h=(D=f.checked)!=null?D:false;return jsxs("div",{className:"flex items-start space-x-3",children:[jsxs("div",{className:"relative",children:[jsx("input",{type:"checkbox",id:d,className:a("peer absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",r),ref:k,"aria-checked":h,"aria-invalid":n,"aria-label":s?void 0:f["aria-label"],"aria-labelledby":s?i:void 0,"aria-describedby":N,role:"checkbox",...f}),jsx("div",{className:a("flex items-center justify-center rounded border transition-all duration-200 cursor-pointer relative","peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2","peer-hover:border-blue-400 peer-hover:shadow-sm","peer-disabled:cursor-not-allowed peer-disabled:opacity-50 peer-disabled:hover:border-gray-300",y[t],m[l$1],b,h&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500 shadow-md shadow-blue-500/20",!h&&"bg-white dark:bg-gray-800"),children:jsx(l,{name:"check",size:x[t],className:a("text-white transition-all duration-200",h?"opacity-100 scale-100":"opacity-0 scale-0")})})]}),(s||o)&&jsxs("div",{className:"flex flex-col",children:[s&&jsx("label",{htmlFor:d,id:i,className:"text-sm font-medium text-gray-900 dark:text-white cursor-pointer",children:s}),o&&jsx("p",{id:N,className:"text-sm text-gray-500 dark:text-gray-400",children:o})]})]})});Se.displayName="Checkbox";var Pe=A.forwardRef(({className:r,variant:l="default",size:t="md",error:n=false,success:g=false,label:s,description:o,id:c,...f},k)=>{var h;let d=c||A.useId(),i=s?`${d}-label`:void 0,N=o?`${d}-description`:void 0,y={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},x={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"},m={default:"border-gray-300 bg-white text-blue-600 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:focus:ring-blue-400",outline:"border-2 border-gray-200 bg-transparent text-blue-600 focus:ring-blue-500 dark:border-gray-700 dark:focus:ring-blue-400",filled:"border-transparent bg-gray-50 text-blue-600 focus:bg-white focus:ring-blue-500 dark:bg-gray-700 dark:focus:bg-gray-800 dark:focus:ring-blue-400",glass:"border-white/30 bg-white/10 backdrop-blur-sm text-white focus:ring-blue-400/50 focus:bg-white/20 dark:border-slate-600/50 dark:bg-slate-800/10 dark:focus:ring-blue-400/50 dark:focus:bg-slate-700/20"},b=n?"border-red-500 focus:ring-red-500 dark:border-red-400 dark:focus:ring-red-400":g?"border-green-500 focus:ring-green-500 dark:border-green-400 dark:focus:ring-green-400":"";return jsxs("div",{className:"flex items-start space-x-3",children:[jsxs("div",{className:"relative",children:[jsx("input",{type:"radio",id:d,className:a("peer sr-only",r),ref:k,"aria-checked":(h=f.checked)!=null?h:false,"aria-invalid":n,"aria-label":s?void 0:f["aria-label"],"aria-labelledby":s?i:void 0,"aria-describedby":N,role:"radio",...f}),jsx("div",{className:a("flex items-center justify-center rounded-full border transition-all duration-200 cursor-pointer","peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",y[t],m[l],b,"peer-checked:border-blue-600 dark:peer-checked:border-blue-500"),children:jsx("div",{className:a("rounded-full bg-blue-600 dark:bg-blue-500 opacity-0 peer-checked:opacity-100 transition-opacity duration-200",x[t])})})]}),(s||o)&&jsxs("div",{className:"flex flex-col",children:[s&&jsx("label",{htmlFor:d,id:i,className:"text-sm font-medium text-gray-900 dark:text-white cursor-pointer",children:s}),o&&jsx("p",{id:N,className:"text-sm text-gray-500 dark:text-gray-400",children:o})]})]})});Pe.displayName="Radio";var Ae=A.forwardRef(({className:r,variant:l$1="default",size:t="md",error:n=false,success:g=false,leftIcon:s,placeholder:o,children:c,"aria-label":f,"aria-invalid":k,...d},i)=>{let N={default:"border-gray-300 bg-white text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:focus:border-blue-400 dark:focus:ring-blue-400",outline:"border-2 border-gray-200 bg-transparent text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-700 dark:text-white dark:focus:border-blue-400 dark:focus:ring-blue-400",filled:"border-transparent bg-gray-50 text-gray-900 focus:bg-white focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-700 dark:text-white dark:focus:bg-gray-800 dark:focus:border-blue-400 dark:focus:ring-blue-400",ghost:"border-transparent bg-transparent text-gray-900 focus:bg-gray-50 focus:border-gray-300 focus:ring-gray-500 dark:text-white dark:focus:bg-gray-800 dark:focus:border-gray-600 dark:focus:ring-gray-400",glass:"border-white/30 bg-white/10 backdrop-blur-sm text-white focus:border-blue-400/50 focus:ring-blue-400/20 focus:bg-white/20 dark:border-slate-600/50 dark:bg-slate-800/10 dark:text-slate-200 dark:focus:border-blue-400/50 dark:focus:ring-blue-400/20 dark:focus:bg-slate-700/20"},y={sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-4 text-lg"},x=n?"border-red-500 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:focus:border-red-400 dark:focus:ring-red-400":g?"border-green-500 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:focus:border-green-400 dark:focus:ring-green-400":"",m=A.useRef(null),b=A.useCallback(M=>{m.current=M,typeof i=="function"?i(M):i&&(i.current=M);},[i]),[h,D]=A.useState(false);return jsxs("div",{className:"relative",children:[s&&jsx("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500 pointer-events-none z-10",children:s}),jsxs("select",{ref:b,className:a("flex w-full appearance-none rounded-md border transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-offset-2","hover:border-blue-400 hover:shadow-sm","disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-gray-300",N[l$1],y[t],x,s?"pl-10":"","pr-10",r),"aria-label":f||(o?void 0:"\uC120\uD0DD"),"aria-invalid":k!==void 0?k:n||void 0,onFocus:M=>{var R;D(true),(R=d.onFocus)==null||R.call(d,M);},onBlur:M=>{var R;D(false),(R=d.onBlur)==null||R.call(d,M);},...d,children:[o&&jsx("option",{value:"",disabled:true,children:o}),c]}),jsx("div",{className:a("absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500 pointer-events-none transition-transform duration-200",h&&"rotate-180"),children:jsx(l,{name:"chevronDown",size:16})})]})});Ae.displayName="Select";var $e=A.forwardRef(({className:r,...l},t)=>jsx("option",{className:r||"",ref:t,...l}));$e.displayName="SelectOption";var ze=A.forwardRef(({className:r,variant:l="default",size:t="md",error:n=false,success:g=false,label:s,description:o,id:c,...f},k)=>{var h;let d=c||A.useId(),i=s?`${d}-label`:void 0,N=o?`${d}-description`:void 0,y={sm:"w-8 h-4",md:"w-11 h-6",lg:"w-14 h-7"},x={sm:"w-3 h-3",md:"w-5 h-5",lg:"w-6 h-6"},m={default:"bg-gray-200 peer-checked:bg-blue-600 dark:bg-gray-700 dark:peer-checked:bg-blue-500",outline:"bg-transparent border-2 border-gray-300 peer-checked:border-blue-600 peer-checked:bg-blue-600 dark:border-gray-600 dark:peer-checked:border-blue-500 dark:peer-checked:bg-blue-500",filled:"bg-gray-100 peer-checked:bg-blue-600 dark:bg-gray-800 dark:peer-checked:bg-blue-500",glass:"bg-white/20 backdrop-blur-sm border border-white/30 peer-checked:bg-blue-400/50 peer-checked:border-blue-300/50 dark:bg-slate-800/20 dark:border-slate-700/50 dark:peer-checked:bg-blue-400/50 dark:peer-checked:border-blue-300/50"},b=n?"bg-red-200 peer-checked:bg-red-600 dark:bg-red-800 dark:peer-checked:bg-red-500":g?"bg-green-200 peer-checked:bg-green-600 dark:bg-green-800 dark:peer-checked:bg-green-500":"";return jsxs("div",{className:"flex items-start space-x-3",children:[jsxs("div",{className:"relative",children:[jsx("input",{type:"checkbox",id:d,className:a("peer sr-only",r),ref:k,"aria-checked":(h=f.checked)!=null?h:false,"aria-invalid":n,"aria-label":s?void 0:f["aria-label"],"aria-labelledby":s?i:void 0,"aria-describedby":N,role:"switch",...f}),jsx("div",{className:a("relative inline-flex cursor-pointer items-center rounded-full transition-colors duration-200 ease-in-out","peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-blue-500 peer-focus:ring-offset-2","peer-disabled:cursor-not-allowed peer-disabled:opacity-50",y[t],m[l],b),children:jsx("div",{className:a("pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 ease-in-out","peer-checked:translate-x-full",x[t],t==="sm"?"translate-x-0.5 peer-checked:translate-x-4.5":"",t==="md"?"translate-x-0.5 peer-checked:translate-x-5.5":"",t==="lg"?"translate-x-0.5 peer-checked:translate-x-7":"")})})]}),(s||o)&&jsxs("div",{className:"flex flex-col",children:[s&&jsx("label",{htmlFor:d,id:i,className:"text-sm font-medium text-gray-900 dark:text-white cursor-pointer",children:s}),o&&jsx("p",{id:N,className:"text-sm text-gray-500 dark:text-gray-400",children:o})]})]})});ze.displayName="Switch";var Ye=A.forwardRef(({className:r,variant:l="default",size:t="md",showValue:n=false,showLabel:g=false,label:s,min:o=0,max:c=100,step:f=1,value:k=0,onValueChange:d,orientation:i="horizontal",disabled:N=false,...y},x)=>{let m=Array.isArray(k),b=m?k:[k],h=w=>{let T=parseFloat(w.target.value);if(d)if(m){let O=parseInt(w.target.dataset.index||"0"),$=[...b];$[O]=T,d($);}else d(T);},D={default:"bg-gray-200 dark:bg-gray-700",primary:"bg-blue-200 dark:bg-blue-700",success:"bg-green-200 dark:bg-green-700",warning:"bg-yellow-200 dark:bg-yellow-700",danger:"bg-red-200 dark:bg-red-700"},M={default:"bg-gray-400 hover:bg-gray-500 dark:bg-gray-500 dark:hover:bg-gray-400",primary:"bg-blue-500 hover:bg-blue-600 dark:bg-blue-400 dark:hover:bg-blue-500",success:"bg-green-500 hover:bg-green-600 dark:bg-green-400 dark:hover:bg-green-500",warning:"bg-yellow-500 hover:bg-yellow-600 dark:bg-yellow-400 dark:hover:bg-yellow-500",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500"},R={sm:i==="horizontal"?"h-1":"w-1",md:i==="horizontal"?"h-2":"w-2",lg:i==="horizontal"?"h-3":"w-3"},F={sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6"},v=i==="vertical"?"flex-col h-full":"flex-row w-full",I=(w=0)=>jsx("input",{ref:w===0?x:void 0,type:"range",min:o,max:c,step:f,value:b[w],onChange:h,"data-index":w,disabled:N,className:a("appearance-none cursor-pointer rounded-full transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",R[t],D[l],i==="vertical"?"writing-mode: bt-lr; -webkit-appearance: slider-vertical":"",r),style:{...i==="vertical"&&{writingMode:"vertical-rl",WebkitAppearance:"slider-vertical"}},...y},w),u=()=>n?m?jsx("div",{className:"flex gap-2 text-sm text-gray-600 dark:text-gray-400",children:b.map((w,T)=>jsx("span",{className:"font-mono",children:w},T))}):jsx("span",{className:"text-sm font-mono text-gray-600 dark:text-gray-400",children:b[0]}):null;return jsxs("div",{className:a("flex items-center gap-4",v),children:[g&&s&&jsx("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 min-w-0",children:s}),jsxs("div",{className:"flex-1 relative",children:[jsxs("div",{className:a("relative",i==="vertical"?"h-full":"w-full"),children:[jsx("div",{className:a("absolute rounded-full",R[t],D[l],i==="vertical"?"w-full bottom-0":"h-full left-0")}),m?jsx("div",{className:a("absolute rounded-full bg-blue-500 dark:bg-blue-400",R[t],i==="vertical"?"w-full bottom-0":"h-full left-0"),style:{...i==="vertical"?{bottom:`${(b[0]-o)/(c-o)*100}%`,height:`${(b[1]-b[0])/(c-o)*100}%`}:{left:`${(b[0]-o)/(c-o)*100}%`,width:`${(b[1]-b[0])/(c-o)*100}%`}}}):jsx("div",{className:a("absolute rounded-full bg-blue-500 dark:bg-blue-400",R[t],i==="vertical"?"w-full bottom-0":"h-full left-0"),style:{...i==="vertical"?{height:`${(b[0]-o)/(c-o)*100}%`}:{width:`${(b[0]-o)/(c-o)*100}%`}}}),m?b.map((w,T)=>jsx("div",{className:a("absolute rounded-full border-2 border-white shadow-lg transition-all duration-200 hover:scale-110",F[t],M[l],i==="vertical"?"left-1/2 transform -translate-x-1/2":"top-1/2 transform -translate-y-1/2"),style:{...i==="vertical"?{bottom:`${(b[T]-o)/(c-o)*100}%`}:{left:`${(b[T]-o)/(c-o)*100}%`}}},T)):jsx("div",{className:a("absolute rounded-full border-2 border-white shadow-lg transition-all duration-200 hover:scale-110",F[t],M[l],i==="vertical"?"left-1/2 transform -translate-x-1/2":"top-1/2 transform -translate-y-1/2"),style:{...i==="vertical"?{bottom:`${(b[0]-o)/(c-o)*100}%`}:{left:`${(b[0]-o)/(c-o)*100}%`}}})]}),jsx("div",{className:"absolute inset-0 opacity-0",children:m?b.map((w,T)=>I(T)):I()})]}),u()]})});Ye.displayName="Slider";var Ue=A.forwardRef(({className:r,variant:l="default",size:t="md",error:n=false,success:g=false,resize:s="vertical",...o},c)=>{let f={default:"border-gray-300 bg-white text-gray-900 placeholder-gray-500 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-400 dark:focus:ring-blue-400 transition-all duration-200 hover:border-blue-400 hover:shadow-sm",outline:"border-2 border-gray-200 bg-transparent text-gray-900 placeholder-gray-500 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-400 dark:focus:ring-blue-400 transition-all duration-200 hover:border-blue-400 hover:shadow-sm",filled:"border-transparent bg-gray-50 text-gray-900 placeholder-gray-500 focus:bg-white focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:bg-gray-800 dark:focus:border-blue-400 dark:focus:ring-blue-400 transition-all duration-200 hover:bg-gray-100 dark:hover:bg-gray-600",ghost:"border-transparent bg-transparent text-gray-900 placeholder-gray-500 focus:bg-gray-50 focus:border-gray-300 focus:ring-gray-500 dark:text-white dark:placeholder-gray-400 dark:focus:bg-gray-800 dark:focus:border-gray-600 dark:focus:ring-gray-400 transition-all duration-200 hover:bg-gray-50 dark:hover:bg-gray-800",glass:"border-white/30 bg-white/10 backdrop-blur-sm text-white placeholder-white/60 focus:border-blue-400/50 focus:ring-blue-400/20 focus:bg-white/20 dark:border-slate-600/50 dark:bg-slate-800/10 dark:text-slate-200 dark:placeholder-slate-400 dark:focus:border-blue-400/50 dark:focus:ring-blue-400/20 dark:focus:bg-slate-700/20 transition-all duration-200 hover:border-blue-400/40 hover:bg-white/15 dark:hover:bg-slate-700/15"},k={sm:"px-3 py-2 text-sm min-h-[80px]",md:"px-4 py-3 text-base min-h-[100px]",lg:"px-4 py-3 text-lg min-h-[120px]"},d={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},i=n?"border-red-500 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:focus:border-red-400 dark:focus:ring-red-400":g?"border-green-500 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:focus:border-green-400 dark:focus:ring-green-400":"",N=o["aria-invalid"],y=n||(N!==void 0?N:false);return jsx("textarea",{className:a("flex w-full rounded-md border transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",f[l],k[t],d[s],i,r),ref:c,"aria-invalid":y||void 0,...o})});Ue.displayName="Textarea";var Ke={sm:"h-8 text-sm px-3",md:"h-10 text-sm px-4",lg:"h-12 text-base px-5"},qe=(r,l="YYYY-MM-DD",t="ko-KR")=>{if(!r)return "";let n=r.getFullYear(),g=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0");return l.replace("YYYY",String(n)).replace("MM",g).replace("DD",s)},Ge=(r,l)=>new Date(r,l+1,0).getDate(),We=(r,l)=>new Date(r,l,1).getDay(),_e=A.forwardRef(({value:r,onChange:l$1,minDate:t,maxDate:n,placeholder:g="\uB0A0\uC9DC\uB97C \uC120\uD0DD\uD558\uC138\uC694",disabled:s=false,error:o=false,dateFormat:c="YYYY-MM-DD",locale:f="ko-KR",size:k="md",className:d,...i},N)=>{let[y,x]=A.useState(false),[m,b]=A.useState(r?new Date(r.getFullYear(),r.getMonth()):new Date),[h,D]=A.useState(null),M=r?qe(r,c,f):"",R=e=>{t&&e<t||n&&e>n||(l$1==null||l$1(e),x(false));},F=()=>{b(new Date(m.getFullYear(),m.getMonth()-1));},v=()=>{b(new Date(m.getFullYear(),m.getMonth()+1));},I=()=>{let e=new Date;e.setHours(0,0,0,0),R(e);},u=m.getFullYear(),w=m.getMonth(),T=Ge(u,w),O=We(u,w),$=f==="ko-KR"?["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],j=e=>!!(t&&e<t||n&&e>n),ee=e=>r?e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate():false,re=e=>{let p=new Date;return e.getFullYear()===p.getFullYear()&&e.getMonth()===p.getMonth()&&e.getDate()===p.getDate()},Y=[];for(let e=O-1;e>=0;e--){let p=new Date(u,w,-e);Y.push(p);}for(let e=1;e<=T;e++)Y.push(new Date(u,w,e));let te=42-Y.length;for(let e=1;e<=te;e++)Y.push(new Date(u,w+1,e));let ae=jsxs("button",{type:"button",disabled:s,className:a("flex w-full items-center justify-between rounded-lg border bg-white px-4 py-2 text-left text-sm transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700",o&&"border-red-500 focus:ring-red-500",s&&"cursor-not-allowed opacity-50",Ke[k]),"aria-label":M||g,children:[jsx("span",{className:a("flex-1",!M&&"text-gray-400 dark:text-gray-500"),children:M||g}),jsx(l,{name:"calendar",className:a("ml-2 h-4 w-4 transition-transform",y&&"rotate-180")})]});return jsx("div",{ref:N,className:a("relative",d),...i,children:jsx(le,{open:y,onOpenChange:x,trigger:ae,position:"bottom",align:"start",children:jsx("div",{className:"w-auto p-0",children:jsxs("div",{className:"p-4",children:[jsxs("div",{className:"flex items-center justify-between mb-4",children:[jsx("button",{type:"button",onClick:F,className:"rounded-lg p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"\uC774\uC804 \uB2EC",children:jsx(l,{name:"chevronLeft",className:"h-4 w-4"})}),jsxs("div",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:[u,"\uB144 ",w+1,"\uC6D4"]}),jsx("button",{type:"button",onClick:v,className:"rounded-lg p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"\uB2E4\uC74C \uB2EC",children:jsx(l,{name:"chevronRight",className:"h-4 w-4"})})]}),jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:$.map((e,p)=>jsx("div",{className:a("text-center text-xs font-medium py-2",p===0&&"text-red-500 dark:text-red-400",p===6&&"text-blue-500 dark:text-blue-400"),children:e},p))}),jsx("div",{className:"grid grid-cols-7 gap-1",children:Y.map((e,p)=>{if(!e)return jsx("div",{},p);let S=e.getMonth()===w,V=j(e),se=ee(e),ke=re(e),xe=h&&e.getFullYear()===h.getFullYear()&&e.getMonth()===h.getMonth()&&e.getDate()===h.getDate();return jsx("button",{type:"button",disabled:V,onClick:()=>R(e),onMouseEnter:()=>D(e),onMouseLeave:()=>D(null),className:a("relative h-9 w-9 rounded-lg text-sm font-medium transition-all","hover:bg-blue-50 dark:hover:bg-blue-900/20","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1",!S&&"text-gray-400 dark:text-gray-500",V&&"cursor-not-allowed opacity-30",se&&"bg-blue-600 text-white hover:bg-blue-700 shadow-md",ke&&!se&&"ring-2 ring-blue-500",xe&&!se&&"bg-blue-100 dark:bg-blue-900/30"),"aria-label":`${u}\uB144 ${w+1}\uC6D4 ${e.getDate()}\uC77C`,children:e.getDate()},p)})}),jsx("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:jsx(a$1,{variant:"outline",size:"sm",onClick:I,className:"w-full",children:"\uC624\uB298"})})]})})})})});_e.displayName="DatePicker";var ge=r=>{if(r===0)return "0 Bytes";let l=1024,t=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(r)/Math.log(l));return Math.round(r/Math.pow(l,n)*100)/100+" "+t[n]},Je=r=>r.startsWith("image/")?"image":r.startsWith("video/")?"video":r.includes("pdf")||r.includes("word")||r.includes("document")||r.includes("excel")||r.includes("spreadsheet")?"fileText":"file",Qe=A.forwardRef(({files:r=[],onChange:l$1,onRemove:t,multiple:n=false,accept:g,maxSize:s,maxFiles:o,disabled:c=false,dragDrop:f=true,placeholder:k="\uD30C\uC77C\uC744 \uC120\uD0DD\uD558\uAC70\uB098 \uC5EC\uAE30\uC5D0 \uB4DC\uB798\uADF8\uD558\uC138\uC694",size:d="md",className:i,...N},y)=>{let x=A.useRef(null),[m,b]=A.useState(false),h=u=>{if(!u||u.length===0)return;let w=Array.from(u);if(o&&r.length+w.length>o){alert(`\uCD5C\uB300 ${o}\uAC1C\uC758 \uD30C\uC77C\uB9CC \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);return}let T=w.filter(O=>s&&O.size>s?(alert(`\uD30C\uC77C \uD06C\uAE30\uB294 ${ge(s)}\uB97C \uCD08\uACFC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${O.name}`),false):true);T.length>0&&(l$1==null||l$1(T));},D=()=>{var u;c||(u=x.current)==null||u.click();},M=u=>{u.preventDefault(),!c&&f&&b(true);},R=u=>{u.preventDefault(),b(false);},F=u=>{u.preventDefault(),b(false),!c&&f&&h(u.dataTransfer.files);},v=u=>{t==null||t(u);},I={sm:"p-4",md:"p-6",lg:"p-8"};return jsxs("div",{ref:y,className:a("w-full",i),...N,children:[jsxs("div",{onClick:D,onDragOver:M,onDragLeave:R,onDrop:F,className:a("relative border-2 border-dashed rounded-xl transition-all cursor-pointer","bg-gray-50 dark:bg-gray-900/50","border-gray-300 dark:border-gray-700",m&&"border-blue-500 bg-blue-50 dark:bg-blue-900/20",c&&"cursor-not-allowed opacity-50",I[d]),children:[jsx("input",{ref:x,type:"file",multiple:n,accept:g,disabled:c,onChange:u=>h(u.target.files),className:"hidden","aria-label":"\uD30C\uC77C \uC120\uD0DD"}),jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[jsx("div",{className:a("rounded-full bg-blue-100 dark:bg-blue-900/30 p-4 mb-4",m&&"bg-blue-200 dark:bg-blue-900/50"),children:jsx(l,{name:"upload",className:a("h-8 w-8 text-blue-600 dark:text-blue-400",m&&"scale-110")})}),jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:k}),jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[g&&`\uC9C0\uC6D0 \uD615\uC2DD: ${g}`,s&&` \u2022 \uCD5C\uB300 \uD06C\uAE30: ${ge(s)}`,o&&` \u2022 \uCD5C\uB300 ${o}\uAC1C`]})]})]}),r.length>0&&jsx("div",{className:"mt-4 space-y-2",children:r.map(u=>jsxs("div",{className:a("flex items-center gap-3 p-3 rounded-lg border","bg-white dark:bg-gray-800","border-gray-200 dark:border-gray-700",u.status==="error"&&"border-red-300 dark:border-red-700 bg-red-50 dark:bg-red-900/20"),children:[jsx("div",{className:"flex-shrink-0",children:jsx("div",{className:"rounded-lg bg-gray-100 dark:bg-gray-700 p-2",children:jsx(l,{name:Je(u.type),className:"h-5 w-5 text-gray-600 dark:text-gray-400"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:u.name}),jsxs("div",{className:"flex items-center gap-2 mt-1",children:[jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:ge(u.size)}),u.status==="uploading"&&u.progress!==void 0&&jsxs(Fragment,{children:[jsx("div",{className:"flex-1 h-1.5 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",children:jsx("div",{className:"h-full bg-blue-600 transition-all duration-300",style:{width:`${u.progress}%`}})}),jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[u.progress,"%"]})]}),u.status==="success"&&jsxs("span",{className:"text-xs text-green-600 dark:text-green-400 flex items-center gap-1",children:[jsx(l,{name:"check",className:"h-3 w-3"}),"\uC644\uB8CC"]}),u.status==="error"&&jsx("span",{className:"text-xs text-red-600 dark:text-red-400",children:u.error||"\uC5C5\uB85C\uB4DC \uC2E4\uD328"})]})]}),t&&jsx("button",{type:"button",onClick:()=>v(u),className:"flex-shrink-0 rounded-lg p-1.5 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"\uD30C\uC77C \uC81C\uAC70",children:jsx(l,{name:"close",className:"h-4 w-4 text-gray-500 dark:text-gray-400"})})]},u.id))})]})});Qe.displayName="Upload";var Ze={sm:"h-8 text-sm",md:"h-10 text-sm",lg:"h-12 text-base"},je=A.forwardRef(({options:r,value:l$1,onChange:t,placeholder:n="\uAC80\uC0C9\uD558\uAC70\uB098 \uC120\uD0DD\uD558\uC138\uC694",disabled:g=false,error:s=false,loading:o=false,maxHeight:c=300,clearable:f=true,filterable:k=true,onSearch:d,emptyText:i="\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",size:N="md",className:y,...x},m)=>{let[b,h]=A.useState(false),[D,M]=A.useState(""),[R,F]=A.useState(r),[v,I]=A.useState(-1),[u,w]=A.useState(false),T=A.useRef(null),O=A.useRef(null),$=A.useMemo(()=>r.find(e=>e.value===l$1),[r,l$1]);A.useEffect(()=>{$?M($.label):l$1||M("");},[$,l$1]),A.useEffect(()=>{if(d){w(true);let e=d(D);e instanceof Promise?e.then(p=>{F(p),w(false);}):(F(e),w(false));}else if(k)if(!D.trim())F(r);else {let e=r.filter(p=>{var S;return p.label.toLowerCase().includes(D.toLowerCase())||p.value.toLowerCase().includes(D.toLowerCase())||((S=p.description)==null?void 0:S.toLowerCase().includes(D.toLowerCase()))});F(e);}else F(r);},[D,r,k,d]);let j=e=>{let p=e.target.value;M(p),h(true),I(-1),!p&&f&&(t==null||t(""));},ee=()=>{h(true);},re=e=>{var p;(p=O.current)!=null&&p.contains(e.relatedTarget)||(h(false),I(-1),$&&M($.label));},Y=e=>{var p;M(e.label),t==null||t(e.value,e),h(false),(p=T.current)==null||p.blur();},te=()=>{var e;M(""),t==null||t(""),(e=T.current)==null||e.focus();},ae=e=>{var p;if(!b||R.length===0){e.key==="ArrowDown"&&h(true);return}switch(e.key){case "ArrowDown":e.preventDefault(),I(S=>S<R.length-1?S+1:S);break;case "ArrowUp":e.preventDefault(),I(S=>S>0?S-1:-1);break;case "Enter":e.preventDefault(),v>=0&&R[v]&&Y(R[v]);break;case "Escape":h(false),(p=T.current)==null||p.blur();break}};return jsxs("div",{ref:m,className:a("relative w-full",y),...x,children:[jsxs("div",{className:"relative",children:[jsx(oe,{ref:T,type:"text",value:D,onChange:j,onFocus:ee,onBlur:re,onKeyDown:ae,placeholder:n,disabled:g,"aria-invalid":s,"aria-autocomplete":"list","aria-expanded":b,"aria-controls":"autocomplete-list",className:a(Ze[N],"pr-10")}),jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1",children:o||u?jsx(l,{name:"loader",className:"h-4 w-4 animate-spin text-gray-400"}):f&&D?jsx("button",{type:"button",onClick:te,className:"rounded p-1 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","aria-label":"\uC9C0\uC6B0\uAE30",children:jsx(l,{name:"close",className:"h-4 w-4 text-gray-400"})}):jsx(l,{name:"chevronDown",className:"h-4 w-4 text-gray-400"})})]}),b&&jsx("div",{ref:O,id:"autocomplete-list",role:"listbox",className:a("absolute z-50 w-full mt-1 rounded-lg border shadow-lg","bg-white dark:bg-gray-800","border-gray-200 dark:border-gray-700","overflow-hidden"),style:{maxHeight:`${c}px`},children:jsx("div",{className:"overflow-y-auto",style:{maxHeight:`${c}px`},children:R.length===0?jsx("div",{className:"px-4 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:i}):R.map((e,p)=>{let S=v===p,V=l$1===e.value;return jsx("div",{role:"option","aria-selected":V,onClick:()=>Y(e),onMouseEnter:()=>I(p),className:a("px-4 py-3 cursor-pointer transition-colors","hover:bg-gray-100 dark:hover:bg-gray-700",S&&"bg-blue-50 dark:bg-blue-900/20",V&&"bg-blue-100 dark:bg-blue-900/30"),children:jsxs("div",{className:"flex items-center gap-3",children:[e.icon&&jsx("div",{className:"flex-shrink-0 text-gray-400",children:e.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:e.label}),V&&jsx(l,{name:"check",className:"h-4 w-4 text-blue-600 dark:text-blue-400 flex-shrink-0"})]}),e.description&&jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:e.description})]})]})},e.value)})})})]})});je.displayName="Autocomplete";export{oe as a,le as b,Me as c,De as d,Re as e,Te as f,Le as g,Ie as h,Se as i,Pe as j,Ae as k,$e as l,ze as m,Ye as n,Ue as o,_e as p,Qe as q,je as r};//# sourceMappingURL=chunk-ZFS4B5QT.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-ZFS4B5QT.mjs.map
|