@krds.ui/vue 0.0.8 → 0.0.10
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/README.md +123 -27
- package/dist/krds-vue.es.js +1121 -991
- package/dist/krds-vue.es.js.map +1 -1
- package/dist/krds-vue.umd.js +1 -1
- package/dist/krds-vue.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +91 -0
- package/package.json +24 -24
package/dist/krds-vue.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.KrdsVue={},b.Vue))})(this,(function(b,e){"use strict";const O=e.defineComponent({name:"KrdsButton",props:{type:{type:String,default:"button"},size:{type:String,default:void 0},variant:{type:String,default:"primary"},icon:{type:Boolean,default:!1},border:{type:Boolean,default:!1},pure:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:r,slots:s}){const a=e.computed(()=>{const o=["krds-btn"];return t.icon&&o.push("icon"),t.border&&o.push("border"),t.pure&&o.push("pure"),t.variant&&!t.icon&&o.push(t.variant),t.size&&o.push(t.size),t.class&&o.push(t.class),o}),n=o=>{t.disabled||r("click",o)};return()=>e.h("button",{type:t.type,class:a.value,disabled:t.disabled,onClick:n},s.default?.())}}),Y=e.defineComponent({name:"KrdsButtonGroup",props:{},setup(t,{slots:r}){return()=>e.h("div",{class:"btn-group"},r.default?.())}}),G=e.defineComponent({name:"KrdsIcon",props:{name:{type:String,required:!0},class:{type:String,default:void 0}},setup(t){return()=>e.h("i",{class:["svg-icon",t.name,t.class].filter(Boolean).join(" ")})}}),U=e.defineComponent({name:"KrdsLink",props:{href:{type:String,default:"#!"},target:{type:String,default:void 0},title:{type:String,default:void 0},size:{type:String,default:void 0},link:{type:Boolean,default:!0},basic:{type:Boolean,default:!1},pure:{type:Boolean,default:!1},class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:r,slots:s}){const a=e.computed(()=>{const i=["krds-btn"];return t.size&&i.push(t.size),t.link&&i.push("link"),t.basic&&i.push("basic"),t.pure&&i.push("pure"),t.class&&i.push(t.class),i}),n=e.computed(()=>{const i={href:t.href,class:a.value};return t.target&&(i.target=t.target),t.title&&(i.title=t.title),t.target==="_blank"&&(i.rel="noopener noreferrer"),i}),o=i=>{r("click",i)};return()=>e.h("a",{...n.value,onClick:o},s.default?.())}}),q=e.defineComponent({name:"KrdsSpinner",props:{label:{type:String,default:void 0}},render(){const t=[e.h("span",{class:"sr-only"},"로딩 중")];return this.label&&t.push(e.h("span",this.label)),e.h("div",{class:"krds-spinner",role:"status"},t)}}),X=e.defineComponent({name:"KrdsInput",props:{modelValue:{type:[String,Number],default:void 0},type:{type:String,default:"text"},size:{type:String,default:void 0},placeholder:{type:String,default:void 0},maxlength:{type:Number,default:void 0},minlength:{type:Number,default:void 0},max:{type:Number,default:void 0},min:{type:Number,default:void 0},step:{type:Number,default:void 0},autocomplete:{type:String,default:void 0},autofocus:{type:Boolean,default:!1},name:{type:String,default:void 0},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},error:{type:String,default:void 0},state:{type:String,default:"default"},icon:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","input","change","focus","blur","keydown","keyup"],setup(t,{emit:r,slots:s}){const a=e.computed(()=>{const g=["krds-input"];return t.size&&g.push(t.size),t.class&&g.push(t.class),g}),n=g=>{const w=g.target,m=t.type==="number"?Number(w.value):w.value;r("update:modelValue",m),r("input",g)},o=g=>{r("change",g)},i=g=>{r("focus",g)},u=g=>{r("blur",g)},d=g=>{r("keydown",g)},h=g=>{r("keyup",g)},y=e.computed(()=>{const g={type:t.type,class:a.value,value:t.modelValue,placeholder:t.placeholder,name:t.name,id:t.id,required:t.required,readonly:t.readonly,disabled:t.disabled,autocomplete:t.autocomplete,autofocus:t.autofocus,onInput:n,onChange:o,onFocus:i,onBlur:u,onKeydown:d,onKeyup:h};return t.maxlength!==void 0&&(g.maxlength=t.maxlength),t.minlength!==void 0&&(g.minlength=t.minlength),t.type==="number"&&(t.max!==void 0&&(g.max=t.max),t.min!==void 0&&(g.min=t.min),t.step!==void 0&&(g.step=t.step)),g}),C=e.computed(()=>{const g=["form-conts"];return t.state!=="default"&&g.push(`is-${t.state}`),t.icon&&g.push("btn-ico-wrap"),g});return()=>{const g=[e.h("input",y.value)];return t.loading?e.h("div",{class:C.value},[e.h("div",{class:"form-spinner"},[...g,e.h(q)])]):(s.default&&g.push(...s.default()),e.h("div",{class:C.value},g))}}}),J=e.defineComponent({name:"KrdsFormLabel",props:{for:{type:String,default:void 0},class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},emits:["click"],setup(t,{emit:r,slots:s}){const a=n=>{r("click",n)};return()=>e.h("div",{class:"form-tit"},[e.h("label",{for:t.for,id:t.id,class:t.class,style:t.style,onClick:a},s.default?.())])}}),Q=e.defineComponent({name:"KrdsFormHint",props:{type:{type:String,default:"hint"},class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},emits:["click"],setup(t,{emit:r,slots:s}){const a=o=>{r("click",o)},n=()=>{let o;switch(t.type){case"error":o="form-hint-invalid";break;case"success":o="form-hint-success";break;case"information":o="form-hint-information";break;default:o="form-hint";break}return t.class?`${o} ${t.class}`:o};return()=>e.h("p",{id:t.id,class:n(),style:t.style,onClick:a},s.default?.())}}),Z=e.defineComponent({name:"KrdsFormGroup",props:{class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},setup(t,{slots:r}){const s=e.computed(()=>{const a=["form-group"];return t.class&&a.push(t.class),a});return()=>e.h("div",{id:t.id,class:s.value,style:t.style},r.default?.())}});function $e(t,r){const s=new Date,a=e.ref(t||s.getFullYear()),n=e.ref(r||s.getMonth()+1),o=e.ref(null),i=e.ref(null),u=e.ref(null),d=e.computed(()=>{const p=s.getFullYear(),c=[];for(let f=p-10;f<=p+10;f++)c.push(f);return c}),h=e.computed(()=>Array.from({length:12},(p,c)=>c+1)),y=()=>{o.value=null,i.value=null},C=()=>{n.value===1?(n.value=12,a.value-=1):n.value-=1},g=()=>{n.value===12?(n.value=1,a.value+=1):n.value+=1},w=(p,c=!1)=>{if(c)o.value=p,i.value=p;else if(!o.value||o.value&&i.value)o.value=p,i.value=null;else{const f=new Date(o.value.replace(/\./g,"-"));new Date(p.replace(/\./g,"-"))<f?(o.value=p,i.value=null):i.value=p}};return{currentYear:a,currentMonth:n,selectedStartDate:o,selectedEndDate:i,activeDateSelector:u,yearOptions:d,monthOptions:h,clearDateSelection:y,prevMonth:C,nextMonth:g,handleDateSelection:w,selectToday:()=>{const p=`${s.getFullYear()}.${String(s.getMonth()+1).padStart(2,"0")}.${String(s.getDate()).padStart(2,"0")}`;w(p,!0)},isDateInSelectedRange:p=>{if(!o.value||!i.value)return{isInRange:!1,isStart:!1,isEnd:!1};const c=new Date(p.replace(/\./g,"-")),f=new Date(o.value.replace(/\./g,"-")),E=new Date(i.value.replace(/\./g,"-")),K=p===o.value,v=p===i.value;return{isInRange:c>=f&&c<=E,isStart:K,isEnd:v}}}}function Le(t,r,s={}){let a=null;const n=typeof s=="string"?{ignore:s}:s,{ignore:o,event:i="click"}=n,u=()=>{a=h=>{const y=h.target;t.value?.contains(y)||o&&y.closest(o)||r()},document.addEventListener(i,a)},d=()=>{if(a){const h=typeof s=="string"?"click":s.event||"click";document.removeEventListener(h,a),a=null}};return e.onMounted(()=>{u()}),e.onBeforeUnmount(()=>{d()}),{setupGlobalListeners:u,removeGlobalListeners:d}}const xe={class:"form-conts"},Ie={class:"calendar-input"},Te=["id","name","placeholder","value","readonly","disabled","required","autofocus"],Me=["disabled","aria-expanded"],Re={class:"calendar-head"},Fe={class:"calendar-switch-wrap"},Pe={class:"calendar-drop-down"},Ae=["aria-expanded"],Oe={class:"calendar-select calendar-year-wrap"},qe={class:"sel year"},He=["onClick"],je={class:"calendar-drop-down"},We=["aria-expanded"],Ye={class:"calendar-select calendar-mon-wrap"},Ge={class:"sel month"},Ue=["onClick"],Xe={class:"calendar-body"},Je={class:"calendar-table-wrap"},Qe={class:"calendar-tbl"},Ze=["data-date"],et=["aria-pressed","onClick"],tt={class:"calendar-footer"},nt={class:"calendar-btn-wrap"},ee=e.defineComponent({__name:"KrdsDateInput",props:{modelValue:{default:void 0},size:{default:"medium"},placeholder:{default:"YYYY.MM.DD"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},eventDates:{default:()=>[]},holidays:{default:()=>[]},initialYear:{default:void 0},initialMonth:{default:void 0},name:{default:void 0},required:{type:Boolean,default:!1},class:{default:void 0},style:{},id:{default:void 0}},emits:["update:modelValue","input","change","focus","blur"],setup(t,{emit:r}){const s=t,a=r,n=e.ref(),o=e.ref(),i=e.ref(!1),u=e.ref(null),{currentYear:d,currentMonth:h,selectedStartDate:y,selectedEndDate:C,yearOptions:g,monthOptions:w,prevMonth:m,nextMonth:l,handleDateSelection:p,selectToday:c,isDateInSelectedRange:f}=$e(s.initialYear,s.initialMonth),E=()=>{i.value&&o.value?.focus(),i.value=!1,u.value=null};Le(n,E,".calendar-conts");const K=e.computed(()=>{const k=["krds-input","datepicker","cal"];return s.size&&k.push(s.size),s.class&&k.push(s.class),k}),v=e.computed(()=>["form-conts","calendar-conts"]),_=e.computed(()=>({"krds-calendar-area":!0,active:i.value})),N=e.computed(()=>{const k=d.value,S=h.value,V=new Date(k,S-1,1),T=new Date(V);T.setDate(T.getDate()-V.getDay());const I=[],D=new Date(T);for(let W=0;W<6;W++){const Ke=[];for(let De=0;De<7;De++){const Gt=`${D.getFullYear()}.${String(D.getMonth()+1).padStart(2,"0")}.${String(D.getDate()).padStart(2,"0")}`,ze=D.getDay();Ke.push({day:D.getDate(),dateString:Gt,isCurrentMonth:D.getMonth()===S-1,isToday:D.toDateString()===new Date().toDateString(),isPrevMonth:D.getMonth()<S-1||D.getMonth()===11&&S===1,isNextMonth:D.getMonth()>S-1||D.getMonth()===0&&S===12,isSunday:ze===0,isSaturday:ze===6}),D.setDate(D.getDate()+1)}I.push(Ke)}return I}),L=k=>{const S=[];if(k.isPrevMonth&&S.push("old"),k.isNextMonth&&S.push("new"),k.isToday&&S.push("today"),k.isSunday&&S.push("day-off"),s.holidays?.includes(k.dateString)&&S.push("day-off"),s.eventDates?.includes(k.dateString)&&S.push("day-event"),k.isCurrentMonth){const V=f(k.dateString);V.isInRange&&(S.push("period"),V.isStart&&S.push("start"),V.isEnd&&S.push("end"))}return S},B=e.computed(()=>[{id:"get-today",label:"오늘",class:"text",variant:void 0,size:"small",handler:c},{id:"cancel-btn",label:"취소",class:void 0,variant:"tertiary",size:"small",handler:E},{id:"confirm-btn",label:"확인",class:void 0,variant:"primary",size:"small",handler:M}]),x=k=>{u.value===k?u.value=null:u.value=k},P=k=>{d.value=k,u.value=null},j=k=>{h.value=k,u.value=null},M=()=>{if(y.value){if(C.value&&y.value!==C.value){const k=`${y.value} ~ ${C.value}`;a("update:modelValue",k)}else a("update:modelValue",y.value);E()}},z=()=>{i.value=!0,u.value=null,setTimeout(()=>{n.value?.querySelector(".calendar-wrap")?.focus()},50)},$=()=>{i.value?E():z()},_e=k=>{k.code==="Escape"&&(u.value?u.value=null:i.value&&E())},A=k=>{const S=k.target;a("update:modelValue",S.value),a("input",k)},jt=k=>{a("change",k)},Wt=k=>{a("focus",k)},Yt=k=>{a("blur",k)};return(k,S)=>(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("div",{class:e.normalizeClass(v.value)},[e.createElementVNode("div",Ie,[e.createElementVNode("input",{id:k.id,name:k.name,class:e.normalizeClass(K.value),placeholder:k.placeholder,value:k.modelValue,readonly:k.readonly,disabled:k.disabled,required:k.required,autofocus:k.autofocus,type:"text",onInput:A,onChange:jt,onFocus:Wt,onBlur:Yt},null,42,Te),e.createElementVNode("button",{ref_key:"datePickerButtonRef",ref:o,class:e.normalizeClass(`krds-btn ${k.size||"medium"} icon form-btn-datepicker`),disabled:k.disabled,"aria-expanded":i.value,type:"button",onClick:$},[...S[4]||(S[4]=[e.createElementVNode("span",{class:"sr-only"},"달력 열기",-1),e.createElementVNode("i",{class:"svg-icon ico-calendar"},null,-1)])],10,Me)]),e.createElementVNode("div",{ref_key:"datePickerAreaRef",ref:n,class:e.normalizeClass(_.value)},[e.withDirectives(e.createElementVNode("div",{class:"calendar-wrap bottom","aria-label":"달력",tabindex:"0",onKeydown:_e},[e.createElementVNode("div",Re,[e.createElementVNode("button",{type:"button",class:"btn-cal-move prev",onClick:S[0]||(S[0]=(...V)=>e.unref(m)&&e.unref(m)(...V))},[...S[5]||(S[5]=[e.createElementVNode("span",{class:"sr-only"},"이전 달",-1)])]),e.createElementVNode("div",Fe,[e.createElementVNode("div",Pe,[e.createElementVNode("button",{type:"button",class:"btn-cal-switch year","aria-label":"연도 선택","aria-expanded":u.value==="year",onClick:S[1]||(S[1]=V=>x("year"))},e.toDisplayString(e.unref(d))+"년 ",9,Ae),e.withDirectives(e.createElementVNode("div",Oe,[e.createElementVNode("ul",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),V=>(e.openBlock(),e.createElementBlock("li",{key:V},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:V===e.unref(d)}),onClick:T=>P(V)},e.toDisplayString(V)+"년",11,He)]))),128))])],512),[[e.vShow,u.value==="year"]])]),e.createElementVNode("div",je,[e.createElementVNode("button",{type:"button",class:"btn-cal-switch month","aria-label":"월 선택","aria-expanded":u.value==="month",onClick:S[2]||(S[2]=V=>x("month"))},e.toDisplayString(e.unref(h).toString().padStart(2,"0"))+"월 ",9,We),e.withDirectives(e.createElementVNode("div",Ye,[e.createElementVNode("ul",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),V=>(e.openBlock(),e.createElementBlock("li",{key:V},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:V===e.unref(h)}),onClick:T=>j(V)},e.toDisplayString(V.toString().padStart(2,"0"))+"월 ",11,Ue)]))),128))])],512),[[e.vShow,u.value==="month"]])])]),e.createElementVNode("button",{type:"button",class:"btn-cal-move next",onClick:S[3]||(S[3]=(...V)=>e.unref(l)&&e.unref(l)(...V))},[...S[6]||(S[6]=[e.createElementVNode("span",{class:"sr-only"},"다음 달",-1)])])]),e.createElementVNode("div",Xe,[e.createElementVNode("div",Je,[e.createElementVNode("table",Qe,[e.createElementVNode("caption",null,e.toDisplayString(e.unref(d))+"년 "+e.toDisplayString(e.unref(h).toString().padStart(2,"0"))+"월",1),S[7]||(S[7]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,"일"),e.createElementVNode("th",null,"월"),e.createElementVNode("th",null,"화"),e.createElementVNode("th",null,"수"),e.createElementVNode("th",null,"목"),e.createElementVNode("th",null,"금"),e.createElementVNode("th",null,"토")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(V,T)=>(e.openBlock(),e.createElementBlock("tr",{key:T},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V,(I,D)=>(e.openBlock(),e.createElementBlock("td",{key:D,class:e.normalizeClass(L(I)),"data-date":I.dateString},[e.createElementVNode("button",{type:"button",class:"btn-set-date","aria-pressed":e.unref(f)(I.dateString).isInRange?"true":"false",onClick:W=>e.unref(p)(I.dateString)},[e.createElementVNode("span",null,e.toDisplayString(I.day),1)],8,et)],10,Ze))),128))]))),128))])])])]),e.createElementVNode("div",tt,[e.createElementVNode("div",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,V=>(e.openBlock(),e.createBlock(e.unref(O),{id:V.id,key:V.id,class:e.normalizeClass(V.class),variant:V.variant,size:V.size,onClick:V.handler},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.label),1)]),_:2},1032,["id","class","variant","size","onClick"]))),128))])])],544),[[e.vShow,i.value]])],2)],2)]))}}),te=e.defineComponent({name:"KrdsTextarea",props:{modelValue:{type:String,default:""},size:{type:String,default:void 0},placeholder:{type:String,default:void 0},maxlength:{type:Number,default:void 0},minlength:{type:Number,default:void 0},rows:{type:Number,default:4},cols:{type:Number,default:void 0},autofocus:{type:Boolean,default:!1},name:{type:String,default:void 0},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showCount:{type:Boolean,default:!0},resize:{type:String,default:"vertical"},class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","input","change","focus","blur","keydown","keyup"],setup(t,{emit:r}){const s=e.ref(0);e.watch(()=>t.modelValue,l=>{s.value=(l||"").length},{immediate:!0});const a=e.computed(()=>{const l=["krds-input"];return t.size&&l.push(t.size),t.class&&l.push(t.class),l}),n=e.computed(()=>{const l={};return t.resize&&(l.resize=t.resize),l}),o=l=>{const c=l.target.value;s.value=c.length,r("update:modelValue",c),r("input",l)},i=l=>{r("change",l)},u=l=>{r("focus",l)},d=l=>{r("blur",l)},h=l=>{r("keydown",l)},y=l=>{r("keyup",l)},C=e.computed(()=>{const l={class:a.value,style:n.value,value:t.modelValue,placeholder:t.placeholder,name:t.name,id:t.id,required:t.required,readonly:t.readonly,disabled:t.disabled,autofocus:t.autofocus,rows:t.rows,cols:t.cols,onInput:o,onChange:i,onFocus:u,onBlur:d,onKeydown:h,onKeyup:y};return t.maxlength!==void 0&&(l.maxlength=t.maxlength),t.minlength!==void 0&&(l.minlength=t.minlength),l}),g=e.computed(()=>["form-conts"]),w=e.computed(()=>["textarea-wrap"]),m=e.computed(()=>{if(!t.showCount)return null;const l=s.value,p=t.maxlength;return{current:l,max:p||""}});return()=>{const l=[e.h("textarea",C.value)];return m.value&&l.push(e.h("p",{class:"textarea-count"},[e.h("span",{class:"count-now"},m.value.current),e.h("span",{class:"count-total"},m.value.max?`/${m.value.max}`:"")])),e.h("div",{class:g.value},[e.h("div",{class:w.value},l)])}}}),ne=e.defineComponent({name:"KrdsSelect",props:{modelValue:{type:[String,Number,null],default:null},size:{type:String,default:"medium"},title:{type:String,default:void 0},options:{type:Array,default:()=>[]},placeholder:{type:String,default:"선택"},name:{type:String,default:void 0},disabled:{type:Boolean,default:!1},state:{type:String,default:"default"},sort:{type:Boolean,default:!1},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","focus","blur"],setup(t,{emit:r,slots:s}){const a=e.computed(()=>{const y=[];return t.sort?y.push("krds-form-select-sort"):y.push("krds-form-select"),t.size&&y.push(t.size),t.class&&y.push(t.class),y}),n=y=>{const C=y.target,g=C.value===""?null:C.value;r("update:modelValue",g)},o=y=>{r("focus",y)},i=y=>{r("blur",y)},u=e.computed(()=>({class:a.value,value:t.modelValue??"",title:t.title||t.placeholder,name:t.name,id:t.id,disabled:t.disabled||t.readonly,onChange:n,onFocus:o,onBlur:i})),d=e.computed(()=>{const y=["form-conts"];return t.state!=="default"&&y.push(`is-${t.state}`),y}),h=()=>{const y=[];return t.placeholder&&!t.modelValue&&y.push(e.h("option",{value:"",disabled:!0,selected:!0},t.placeholder)),t.options&&t.options.length>0&&t.options.forEach(C=>{y.push(e.h("option",{value:C.value,disabled:C.disabled,selected:C.value===t.modelValue},C.label))}),s.default&&y.push(...s.default()),y};return()=>{const y=e.h("select",u.value,h());return t.sort?y:e.h("div",{class:d.value},[y])}}}),le=e.defineComponent({name:"KrdsFileUpload",props:{modelValue:{type:Array,default:()=>[]},size:{type:String,default:"medium"},accept:{type:String,default:void 0},maxFiles:{type:Number,default:10},maxFileSize:{type:Number,default:20*1024*1024},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},dragAndDrop:{type:Boolean,default:!0},title:{type:String,default:"타이틀영역"},description:{type:String,default:"컨텐츠 영역"},placeholder:{type:String,default:"첨부할 파일을 여기에 끌어다 놓거나, 파일 선택 버튼을 눌러 파일을 직접 선택해주세요."},showPreview:{type:Boolean,default:!0},showDownload:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showClearAll:{type:Boolean,default:!0},name:{type:String,default:void 0},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","file-added","file-removed","file-error","upload-start","upload-progress","upload-complete","upload-error","clear-all","download","preview"],setup(t,{emit:r}){e.ref(!1),e.computed(()=>{const a=["krds-file-upload","line"];return t.class&&a.push(t.class),a});const s=e.computed(()=>t.modelValue?.length||0);return e.computed(()=>!t.disabled&&s.value<t.maxFiles),()=>null}}),ae=e.defineComponent({name:"KrdsBadge",props:{type:{type:String,default:"outline"},color:{type:String,default:"primary"},size:{type:String,default:"large"},number:{type:Boolean,default:!1},class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:r,slots:s}){const a=e.computed(()=>{const o=["krds-badge"];return o.push(`${t.type}-${t.color}`),t.size&&o.push(t.size),t.number&&o.push("number"),t.class&&o.push(t.class),o}),n=o=>{r("click",o)};return()=>e.h("span",{type:t.type,color:t.color,size:t.size,number:t.number,class:a.value,onClick:n},s.default?.())}}),oe=e.defineComponent({name:"KrdsTag",props:{link:{type:Boolean,default:!1},href:{type:String,default:"#"},target:{type:String,default:void 0},rel:{type:String,default:void 0},class:{type:String,default:void 0}},emits:["remove"],setup(t,{emit:r,slots:s}){const a=e.computed(()=>{const i=["krds-btn-tag"];return t.link&&i.push("link"),t.class&&i.push(t.class),i}),n=i=>{r("remove",i)},o=()=>e.h("button",{type:"button",class:"btn-delete",onClick:n},[e.h("span",{class:"sr-only"},"삭제")]);return()=>{const i=[],u=s.default?.();if(u&&i.push(u),t.link||i.push(o()),t.link){const d={href:t.href,class:a.value};return t.target&&(d.target=t.target),t.rel&&(d.rel=t.rel),e.h("a",d,i)}return e.h("span",{class:a.value},i)}}}),se=e.defineComponent({name:"KrdsTagGroup",props:{size:{type:String,default:"medium"},class:{type:String,default:void 0}},setup(t,{slots:r}){const s=e.computed(()=>{const a=["krds-tag-wrap"];return t.size&&a.push(t.size),t.class&&a.push(t.class),a});return()=>e.h("div",{class:s.value},r.default?.())}}),ie=e.defineComponent({name:"KrdsMasthead",props:{class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:r,slots:s}){const a=e.computed(()=>{const o=[""];return t.class&&o.push(t.class),o}),n=o=>{r("click",o)};return()=>e.h("div",{id:"krds-masthead",class:a.value,onClick:n},[e.h("div",{class:"toggle-wrap"},[e.h("div",{class:"toggle-head"},[e.h("div",{class:"inner"},[e.h("span",{class:"nuri-txt"},s.default?.())])])])])}});let lt=0;function R(t="krds"){return`${t}-${++lt}`}function at(){const t=Date.now().toString(36).slice(-4),r=Math.random().toString(36).substring(2,5);return`${t}${r}`}function F(...t){return t.filter(Boolean).join(" ")}const re=e.defineComponent({name:"KrdsToggleSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},size:{type:String,default:"medium",validator:t=>["medium","large"].includes(t)},name:{type:String,default:void 0},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","change"],setup(t,{emit:r,attrs:s}){const a=e.computed(()=>t.modelValue),n=e.computed(()=>F("krds-form-toggle-switch",t.size,t.class)),o=u=>{if(t.disabled)return;const h=u.target.checked;r("update:modelValue",h),r("change",h)},i=e.computed(()=>t.id||R("toggle-switch"));return()=>e.h("div",{class:n.value},[e.h("input",{type:"checkbox",id:i.value,name:t.name,checked:a.value,disabled:t.disabled,onChange:o,...s}),e.h("label",{for:i.value},[e.h("span",{class:"switch-toggle"},[e.h("i")]),t.label||""])])}}),ce=e.defineComponent({name:"KrdsCheckArea",props:{class:{type:String,default:void 0},column:{type:Boolean,default:!1}},setup(t,{slots:r}){return()=>{const s=["krds-check-area"];return t.column&&s.push("chk-column"),t.class&&s.push(t.class),e.h("div",{class:s},r.default?.())}}}),de=e.defineComponent({name:"KrdsCheckbox",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:t=>["medium","large"].includes(t)},chip:{type:Boolean,default:!1},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue"],slots:Object,setup(t,{emit:r,attrs:s,slots:a}){const n=e.computed(()=>t.modelValue),o=e.computed(()=>{const d=t.chip?"krds-form-chip":"krds-form-check";return F(d,t.size,t.class)}),i=d=>{if(t.disabled)return;const y=d.target.checked;r("update:modelValue",y)},u=e.computed(()=>t.id||R("checkbox"));return()=>{const d=[e.h("input",{type:"checkbox",id:u.value,checked:n.value,disabled:t.disabled,onChange:i,...s}),e.h("label",{for:u.value},a.default?.())];return a.description&&!t.chip&&d.push(e.h("div",{class:"krds-form-check-cnt"},e.h("p",{class:"krds-form-check-p"},a.description()))),e.h("div",{class:o.value},d)}}}),ue=e.defineComponent({name:"KrdsRadio",props:{modelValue:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],required:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:t=>["medium","large"].includes(t)},chip:{type:Boolean,default:!1},name:{type:String,default:void 0},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue"],slots:Object,setup(t,{emit:r,attrs:s,slots:a}){const n=e.computed(()=>t.modelValue===t.value),o=e.computed(()=>{const h=t.chip?"krds-form-chip":"krds-form-check";return F(h,t.size,t.class)}),i=h=>{if(t.disabled)return;h.target.checked&&r("update:modelValue",t.value)},u=e.computed(()=>t.id||R("radio")),d=e.computed(()=>t.name);return()=>{const h=[e.h("input",{type:"radio",id:u.value,name:d.value,value:String(t.value),checked:n.value,disabled:t.disabled,onChange:i,...s}),e.h("label",{for:u.value},a.default?.())];return a.description&&!t.chip&&h.push(e.h("div",{class:"krds-form-check-cnt"},e.h("p",{class:"krds-form-check-p"},a.description()))),e.h("div",{class:o.value},h)}}}),fe=e.defineComponent({name:"KrdsStepIndicator",props:{modelValue:{type:Number,default:0},class:{type:String,default:void 0}},emits:["update:modelValue"],setup(t,{slots:r}){const s=e.computed(()=>{const u=["krds-step-wrap"];return t.class&&u.push(t.class),u}),a=u=>{const d=t.modelValue||0;return u<d?"done":u===d?"active":"pending"},n=e.ref(0),o=()=>{n.value=0},i=()=>n.value++;return e.provide("stepIndicator",{activeStep:e.computed(()=>t.modelValue||0),getStepStatus:a,getNextStepIndex:i,resetStepIndex:o}),()=>(o(),e.h("ol",{class:s.value},r.default?.()))}}),me=e.defineComponent({name:"KrdsStep",props:{step:{type:[String,Number],required:!0},title:{type:String,required:!0},status:{type:String,default:void 0},class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:r,slots:s}){const a=e.inject("stepIndicator"),n=a?a.getNextStepIndex():-1,o=e.computed(()=>t.status?t.status:a&&n>=0?a.getStepStatus(n):"pending"),i=e.computed(()=>{const d=[o.value];return t.class&&d.push(t.class),d}),u=d=>{r("click",d,t.step)};return()=>{const d=o.value==="active";return e.h("li",{class:i.value,onClick:u},[e.h("span",[d&&e.h("em",{class:"sr-only"},"현재단계"),e.h("i",{class:"step"},t.step),e.h("span",{class:"step-tit"},t.title),s.default?.()])])}}}),pe=e.defineComponent({name:"KrdsSkipLink",props:{href:{type:String,required:!0,validator:t=>t.startsWith("#")},class:{type:[String,Array,Object],default:void 0},id:{type:String,default:"krds-skip-link"}},setup(t,{slots:r}){return()=>e.h("div",{id:t.id,class:t.class},[e.h("a",{href:t.href},r.default?.())])}}),ot=["id","aria-label"],st={class:"breadcrumb"},it=["href","aria-current","onClick"],rt={key:0},he=e.defineComponent({__name:"KrdsBreadcrumb",props:{items:{},id:{default:void 0},ariaLabel:{default:"현재 경로"},showHomeIcon:{type:Boolean,default:!0}},emits:["item-click"],setup(t,{emit:r}){const s=t,a=r,n=i=>i===s.items.length-1,o=(i,u)=>{i.onClick&&i.onClick(u),a("item-click",i,u)};return(i,u)=>(e.openBlock(),e.createElementBlock("nav",{id:i.id,class:"krds-breadcrumb-wrap","aria-label":i.ariaLabel},[e.createElementVNode("ol",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.items,(d,h)=>(e.openBlock(),e.createElementBlock("li",{key:`breadcrumb-${h}`,class:e.normalizeClass({home:h===0&&i.showHomeIcon})},[e.createElementVNode("a",{href:d.href||"#",class:"txt","aria-current":n(h)?"page":void 0,onClick:y=>o(d,y)},[h===0&&i.showHomeIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",rt,e.toDisplayString(d.text),1))],8,it)],2))),128))])],8,ot))}}),ye=e.defineComponent({name:"KrdsInPageNavigation",props:{title:{type:String,default:void 0},caption:{type:String,default:"이 페이지의 구성"},items:{type:Array,default:()=>[]},autoActive:{type:Boolean,default:!0},headerTopSelector:{type:String,default:"#krds-masthead"},headerInnerSelector:{type:String,default:"#krds-header .header-in"},class:{type:String,default:void 0}},emits:["itemClick"],slots:Object,setup(t,{emit:r,slots:s}){const a=e.ref(""),n=e.ref(new Map),o=e.computed(()=>{const m=["krds-in-page-navigation-type"];return t.class&&m.push(t.class),m}),i=()=>{const m=t.headerTopSelector,l=t.headerInnerSelector,p=document.querySelector(m)?.clientHeight||0,c=document.querySelector(l)?.clientHeight||0;return p+c},u=(m,l)=>{if(r("itemClick",m,l),m.href.startsWith("#")){l.preventDefault();const p=document.querySelector(m.href);if(p){const c=i();if(window.scrollTo({left:0,top:p.getBoundingClientRect().top+window.scrollY-c,behavior:"smooth"}),a.value=m.href,l instanceof KeyboardEvent){const f=p.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");f&&f instanceof HTMLElement&&(f.setAttribute("tabindex","-1"),f.focus({preventScroll:!0}))}}}},d=()=>{n.value.clear(),t.items&&t.items.filter(m=>m.href.startsWith("#")).forEach(m=>{const l=document.querySelector(m.href);l&&n.value.set(m.href,l)})},h=()=>{if(!t.autoActive||!t.items||n.value.size===0)return;const m=window.innerHeight,l=Math.ceil(m/5),p=window.scrollY+m,c=document.body.scrollHeight,f=t.items.filter(N=>N.href.startsWith("#")&&n.value.has(N.href)).map(N=>({href:N.href,element:n.value.get(N.href),item:N}));if(f.length===0)return;const E=f[0],K=f[f.length-1],v=E.element.offsetTop;let _="";if(p>=c)_=K.href;else if(window.scrollY<=v)_=E.href;else for(const N of f){const L=N.element.offsetHeight,B=N.element.offsetTop-l;if(window.scrollY>B&&window.scrollY<=B+L){_=N.href;break}}_&&_!==a.value&&(a.value=_)},y=()=>{if(!t.items)return;const m=t.items.find(l=>l.active);m?a.value=m.href:t.items.length>0&&(a.value=t.items[0].href)};e.onMounted(()=>{if(y(),t.autoActive){d(),h(),window.addEventListener("scroll",h,{passive:!0});const m=new MutationObserver(()=>{d()});m.observe(document.body,{childList:!0,subtree:!0}),e.onUnmounted(()=>{m.disconnect()})}}),e.onUnmounted(()=>{t.autoActive&&(window.removeEventListener("scroll",h),n.value.clear())});const C=()=>!t.caption&&!t.title?null:e.h("div",{class:"in-page-navigation-header"},[t.caption&&e.h("p",{class:"quick-caption"},t.caption),t.title&&e.h("p",{class:"quick-title"},t.title)]),g=()=>{if(!t.items)return null;const m=t.items.map(l=>{const p=a.value===l.href||!t.autoActive&&l.active;return e.h("li",{key:l.href},[e.h("a",{href:l.href,class:p?"active":"",onClick:c=>u(l,c),onKeydown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),u(l,c))}},l.text)])});return e.h("nav",{class:"in-page-navigation-list"},[e.h("ul",{},m)])},w=()=>s.action?e.h("div",{class:"in-page-navigation-action"},[s.action()]):null;return()=>e.h("div",{class:o.value},[e.h("div",{class:"krds-in-page-navigation-area"},[C(),g(),w()].filter(Boolean))])}}),ct=["id"],dt={class:"page-links"},ut=["href","aria-current","onClick"],ft={key:0},mt=["aria-label"],ge=e.defineComponent({__name:"KrdsPagination",props:{modelValue:{default:1},min:{default:1},max:{},id:{default:void 0},ariaLabel:{default:"페이지 내비게이션"},pageRange:{default:8}},emits:["update:modelValue"],setup(t,{emit:r}){const s=t,a=r,n=e.computed(()=>Math.max(1,s.min)),o=e.computed(()=>s.modelValue??n.value),i=e.computed(()=>o.value<=n.value),u=e.computed(()=>o.value>=s.max),d=e.computed(()=>{if(!i.value)return"#"}),h=e.computed(()=>{if(!u.value)return"#"}),y=e.computed(()=>{const{pageRange:m,max:l}=s,p=1,c=[];if(l<=m+2*p)for(let f=n.value;f<=l;f++)c.push({type:"page",key:`page-${f}`,page:f,href:"#"});else{const f=Math.min(p,l),E=Math.max(l-p+1,1),K=Math.max(n.value,o.value-Math.floor(m/2)),v=Math.min(l,K+m-1),_=Math.max(n.value,v-m+1);for(let B=n.value;B<=f;B++)c.push({type:"page",key:`page-${B}`,page:B,href:"#"});_>f+1&&c.push({type:"ellipsis",key:"ellipsis-left",ariaLabel:"페이지 생략"});const N=Math.max(_,f+1),L=Math.min(v,E-1);for(let B=N;B<=L;B++)c.push({type:"page",key:`page-${B}`,page:B,href:"#"});v<E-1&&c.push({type:"ellipsis",key:"ellipsis-right",ariaLabel:"페이지 생략"});for(let B=E;B<=l;B++)c.push({type:"page",key:`page-${B}`,page:B,href:"#"})}return c}),C=(m,l)=>{if(m===o.value){l.preventDefault();return}a("update:modelValue",m)},g=m=>{if(i.value){m.preventDefault();return}const l=o.value-1;a("update:modelValue",l)},w=m=>{if(u.value){m.preventDefault();return}const l=o.value+1;a("update:modelValue",l)};return(m,l)=>{const p=e.resolveDirective("sr-only");return e.openBlock(),e.createElementBlock("div",{id:m.id,class:"krds-pagination"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value?"span":"a"),{href:i.value?void 0:d.value,class:e.normalizeClass(["page-navi","prev",{disabled:i.value}]),onClick:g},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode(" 이전 ",-1)])]),_:1},8,["href","class"])),e.createElementVNode("div",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,c=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c.key},[c.type==="page"?(e.openBlock(),e.createElementBlock("a",{key:0,href:c.href||"#",class:e.normalizeClass(["page-link",{active:c.page===o.value}]),"aria-current":c.page===o.value?"page":void 0,onClick:f=>C(c.page,f)},[c.page===o.value?e.withDirectives((e.openBlock(),e.createElementBlock("span",ft,[...l[1]||(l[1]=[e.createTextVNode("현재페이지",-1)])])),[[p]]):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(c.page),1)],10,ut)):c.type==="ellipsis"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"page-link link-dot","aria-label":c.ariaLabel},null,8,mt)):e.createCommentVNode("",!0)],64))),128))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value?"span":"a"),{href:u.value?void 0:h.value,class:e.normalizeClass(["page-navi","next",{disabled:u.value}]),onClick:w},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode(" 다음 ",-1)])]),_:1},8,["href","class"]))],8,ct)}}}),pt={class:"inner help-panel-flexible"},ht={class:"help-panel-wrap"},yt={class:"help-conts-area"},ke=e.defineComponent({__name:"KrdsPanel",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:r}){const s=t,a=r,n=e.computed({get:()=>s.modelValue,set:u=>a("update:modelValue",u)}),o=()=>{n.value=!0},i=()=>{n.value=!1};return(u,d)=>(e.openBlock(),e.createElementBlock("div",pt,[e.createElementVNode("button",{type:"button",class:"krds-btn small tertiary btn-help-panel expand btn-help-exec",onClick:o},[...d[0]||(d[0]=[e.createElementVNode("i",{class:"svg-icon ico-fold"},null,-1),e.createTextVNode(" 도움말 ",-1)])]),e.createElementVNode("div",{class:e.normalizeClass(["krds-help-panel",{expand:n.value}])},[e.createElementVNode("div",ht,[e.createElementVNode("div",yt,[e.renderSlot(u.$slots,"default"),e.createElementVNode("button",{type:"button",class:"krds-btn small tertiary btn-help-panel fold",onClick:i},[...d[1]||(d[1]=[e.createElementVNode("span",{class:"sr-only"},"도움말",-1),e.createTextVNode(" 접어두기 ",-1),e.createElementVNode("i",{class:"svg-icon ico-angle right"},null,-1)])])])])],2)]))}}),gt={class:"tooltip-action"},kt={key:0,class:"svg-icon ico-help"},bt={key:1,class:"svg-icon ico-tooltip"},St={class:"tooltip-title"},Ct={class:"tooltip-contents"},be=e.defineComponent({__name:"KrdsContextualHelp",props:{tooltipTitle:{default:"도움말 제목"},helpIcon:{type:Boolean},position:{default:"top left"}},setup(t){const r=t,s=e.ref(),a=e.ref(),n=e.ref(),o=e.ref(),i=e.ref(!1),u=()=>{const l=i.value;y(),l||d()},d=()=>{if(!n.value||!a.value)return;i.value=!0,n.value.style.display="block",a.value.setAttribute("aria-expanded","true"),n.value.querySelector('a, button, [tabindex="0"], input, textarea, select')?.focus(),C()},h=()=>{!n.value||!a.value||(i.value=!1,n.value.style.display="none",a.value.setAttribute("aria-expanded","false"))},y=()=>{const l=document.querySelectorAll(".krds-contextual-help .tooltip-popover"),p=document.querySelectorAll(".krds-contextual-help .tooltip-btn");l.forEach(c=>{c.style.display="none"}),p.forEach(c=>{c.setAttribute("aria-expanded","false")}),i.value=!1},C=()=>{if(!s.value||!n.value)return;const l=window.innerWidth<=768,p=s.value.querySelector(".tooltip-action");if(l){const f=getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0],K=p.getBoundingClientRect().left-parseInt(f),v=document.body.clientWidth-parseInt(f)*2;n.value.style.left=`-${K}px`,n.value.style.width=`${v}px`}else n.value.style.left="",n.value.style.right="",n.value.style.width="360px"},g=l=>{(l.key==="Escape"||l.key==="Esc")&&y()},w=l=>{l.target.closest(".tooltip-action")||y()},m=()=>{i.value&&C()};return e.onMounted(()=>{s.value&&(a.value&&a.value.setAttribute("aria-expanded","false"),n.value&&n.value.setAttribute("role","tooltip"),document.addEventListener("keydown",g),document.addEventListener("click",w),window.addEventListener("resize",m))}),e.onUnmounted(()=>{document.removeEventListener("keydown",g),document.removeEventListener("click",w),window.removeEventListener("resize",m)}),(l,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:s,class:e.normalizeClass(["krds-contextual-help",r.position])},[e.createElementVNode("div",gt,[e.createElementVNode("button",{ref_key:"tooltipBtnRef",ref:a,type:"button",class:"krds-btn medium icon tooltip-btn",onClick:u},[p[0]||(p[0]=e.createElementVNode("span",{class:"sr-only"},"도움말",-1)),r.helpIcon?(e.openBlock(),e.createElementBlock("i",kt)):(e.openBlock(),e.createElementBlock("i",bt))],512),e.createElementVNode("div",{ref_key:"tooltipPopoverRef",ref:n,class:"tooltip-popover",role:"tooltip"},[e.createElementVNode("h4",St,e.toDisplayString(r.tooltipTitle),1),e.createElementVNode("div",Ct,[e.renderSlot(l.$slots,"default")]),e.createElementVNode("button",{ref_key:"closeBtnRef",ref:o,type:"button",class:"krds-btn xsmall icon tooltip-close",onClick:h},[...p[1]||(p[1]=[e.createElementVNode("span",{class:"sr-only"},"닫기",-1),e.createElementVNode("i",{class:"svg-icon ico-modal-close"},null,-1)])],512)],512)])],2))}}),Et={key:0,class:"coach-balloon"},Vt={class:"coach-tit"},wt={class:"desc"},Bt={class:"coach-controls"},Nt={class:"num"},vt={class:"btn-wrap"},Se=e.defineComponent({__name:"KrdsCoachMark",props:{coachMarkClass:{default:""},stepsData:{},activeStep:{},modelValue:{default:null},class:{},style:{},id:{}},emits:["update:modelValue","close"],setup(t,{emit:r}){const s=t,a=e.computed(()=>{const d=s.activeStep-1;return s.stepsData&&d>=0&&d<s.stepsData.length?s.stepsData[d]:null}),n=r,o=()=>{s.activeStep>1&&n("update:modelValue",s.activeStep-1)},i=()=>{s.activeStep<s.stepsData.length&&n("update:modelValue",s.activeStep+1)},u=()=>{n("close")};return(d,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["krds-coach-mark",d.coachMarkClass]),style:e.normalizeStyle(d.style)},[d.modelValue===d.activeStep&&a.value?(e.openBlock(),e.createElementBlock("div",Et,[h[2]||(h[2]=e.createElementVNode("h5",{class:"sr-only"},"따라하기 가이드",-1)),e.createElementVNode("h6",Vt,e.toDisplayString(d.activeStep)+"단계 : "+e.toDisplayString(a.value.title),1),e.createElementVNode("p",wt,e.toDisplayString(a.value.description),1),e.createElementVNode("div",Bt,[e.createElementVNode("div",Nt,[h[0]||(h[0]=e.createElementVNode("span",{class:"sr-only"},"현재 단계",-1)),e.createElementVNode("strong",null,e.toDisplayString(d.activeStep),1),h[1]||(h[1]=e.createElementVNode("span",{class:"sr-only"},"총 단계",-1)),e.createElementVNode("span",null,e.toDisplayString(d.stepsData.length),1)]),e.createElementVNode("div",vt,[e.createElementVNode("button",{type:"button",class:"krds-btn small text",onClick:u},"그만보기"),d.activeStep!==1?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"krds-btn small text",onClick:o},"이전으로")):e.createCommentVNode("",!0),d.activeStep!==d.stepsData.length?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"krds-btn small tertiary",onClick:i},"다음으로")):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"coach-mark-content")],6))}}),_t=["disabled","aria-labelledby"],Kt=["id","aria-hidden"],Dt={class:"sr-only"},Ce=e.defineComponent({__name:"KrdsTooltip",props:{type:{default:"default"},tooltipContent:{},vertical:{type:Boolean},box:{type:Boolean},disabled:{type:Boolean,default:!1},class:{},style:{},id:{}},setup(t){const r=t,s=e.ref(null),a=e.ref(null),n=e.ref(!1),o=e.ref({}),i=e.ref(`tooltip-popover-${Math.random().toString(36).substring(2,9)}`),u=e.ref(!1),d=e.computed(()=>{const f=["krds-btn","krds-tooltip"];return r.type==="default"?f.push("small","text"):r.type==="icon"?f.push("icon"):r.type==="button"&&f.push(""),!r.box&&r.vertical&&f.push("tooltip-vertical"),r.box&&!r.vertical&&f.push("tooltip-box"),f.join(" ")}),h=e.computed(()=>{const f=[];return r.box&&f.push("tooltip-box"),r.vertical&&f.push("tooltip-vertical"),n.value&&f.push("active"),f}),y=e.computed(()=>s.value?.querySelector("button")?.textContent?.trim()||""),C=()=>window.innerWidth<=768,g=()=>{if(!s.value||!a.value)return;const f=s.value.querySelector("button");if(!f)return;const E=12,{clientHeight:K,clientWidth:v}=a.value,{top:_,left:N,right:L,height:B,width:x}=f.getBoundingClientRect(),P=window.innerWidth/2,j=window.innerHeight/2;let M,z;const $=[];u.value||r.box||r.vertical?(_+B>j?(M=_-K-E,$.push("top")):(M=_+B+E,$.push("bottom")),N+x>P?(z=L-v,$.push("right"),window.innerWidth-(N+x)>v/2&&(z=N+(x-v)/2,$.splice($.indexOf("right"),1))):(z=N+(x-v)/2,z<0&&(z=N,$.push("left")))):(M=_+(B-K)/2,N+x>P?(z=N-v-E,$.push("right")):z=L+E);const A=window.innerWidth<=420;o.value={top:`${M}px`,left:A?"50%":`${z}px`,transform:A?"translateX(-50%)":"none"},a.value&&(a.value.className=`krds-tooltip-popover ${$.join(" ")} ${h.value.join(" ")}`)},w=async()=>{r.disabled||!r.tooltipContent||(n.value=!0,await e.nextTick(),g())},m=()=>{n.value=!1,o.value={}},l=f=>{(f.key==="Escape"||f.key==="Esc")&&n.value&&m()},p=()=>{u.value=C(),n.value&&m()},c=()=>{n.value&&m()};return e.onMounted(()=>{u.value=C(),document.addEventListener("keydown",l),window.addEventListener("scroll",c),window.addEventListener("resize",p)}),e.onUnmounted(()=>{document.removeEventListener("keydown",l),window.removeEventListener("scroll",c),window.removeEventListener("resize",p)}),(f,E)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:s},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(d.value),disabled:f.disabled,"aria-labelledby":i.value,onMouseover:w,onMouseout:m,onFocusin:w,onFocusout:m},[e.renderSlot(f.$slots,"default")],42,_t),e.withDirectives(e.createElementVNode("div",{id:i.value,ref_key:"popoverRef",ref:a,class:e.normalizeClass(["krds-tooltip-popover",h.value]),style:e.normalizeStyle(o.value),"aria-hidden":!n.value,role:"tooltip"},[e.createElementVNode("span",Dt,e.toDisplayString(y.value),1),e.createTextVNode(" "+e.toDisplayString(f.tooltipContent),1)],14,Kt),[[e.vShow,n.value]])],512))}}),zt=["aria-expanded"],$t={class:"drop-in"},Lt={key:0,class:"drop-top"},xt={key:1,class:"drop-list"},It=["lang","aria-selected","onClick"],Tt={class:"sr-only"},Mt={key:2,class:"drop-list"},Rt=["href","lang"],Ee=e.defineComponent({__name:"KrdsLanguageSwitcher",props:{languageList:{},modelValue:{default:""},type:{default:"default"},dropPosition:{default:"center"},class:{},style:{},id:{}},emits:["update:modelValue","close"],setup(t,{emit:r}){const s=t,a=r,n=e.ref(!1),o=e.ref(),i=e.ref(),u=()=>{n.value=!n.value,n.value&&o.value&&y()},d=()=>{n.value=!1},h=l=>{a("update:modelValue",l),d(),a("close"),i.value?.focus()},y=()=>{if(!o.value)return;const l=o.value.querySelector(".drop-menu");if(!l)return;const p=l.getBoundingClientRect(),c=window.innerWidth;o.value.classList.remove("drop-left","drop-right"),p.left<0?o.value.classList.add("drop-left"):c<p.left+p.width&&o.value.classList.add("drop-right")},C=l=>{l.key==="Escape"&&(d(),i.value?.focus())},g=l=>{o.value?.contains(l.target)||d()},w=l=>{o.value?.contains(l.relatedTarget)||d()},m=l=>{if(!o.value)return;o.value.querySelectorAll(".drop-list .item-link").forEach(f=>{f.style.position="relative",f.style.zIndex="0"});const c=l.target;c.style.zIndex="1"};return e.watch(n,l=>{l?(document.addEventListener("keydown",C),document.addEventListener("click",g)):(document.removeEventListener("keydown",C),document.removeEventListener("click",g))}),e.onUnmounted(()=>{document.removeEventListener("keydown",C),document.removeEventListener("click",g)}),(l,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:o,class:e.normalizeClass(["krds-drop-wrap krds-language",{active:n.value,"drop-left":s.dropPosition==="left","drop-right":s.dropPosition==="right"}]),onFocusout:w},[e.createElementVNode("button",{ref_key:"buttonRef",ref:i,type:"button",class:e.normalizeClass(["krds-btn small text drop-btn",{active:n.value}]),"aria-expanded":n.value,onClick:u},[p[0]||(p[0]=e.createElementVNode("i",{class:"svg-icon ico-global"},null,-1)),e.renderSlot(l.$slots,"default"),p[1]||(p[1]=e.createElementVNode("i",{class:"svg-icon ico-toggle"},null,-1))],10,zt),e.createElementVNode("div",{class:"drop-menu",style:e.normalizeStyle({display:n.value?"block":"none"})},[e.createElementVNode("div",$t,[l.$slots["prev-item"]?(e.openBlock(),e.createElementBlock("div",Lt,[e.renderSlot(l.$slots,"prev-item")])):e.createCommentVNode("",!0),s.type==="default"?(e.openBlock(),e.createElementBlock("ul",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.languageList,c=>(e.openBlock(),e.createElementBlock("li",{key:c.code},[e.createElementVNode("a",{href:"#",class:e.normalizeClass(["item-link",{active:s.modelValue===c.code}]),lang:c.code,"aria-selected":s.modelValue===c.code,onClick:e.withModifiers(f=>h(c.code),["prevent"]),onFocus:m},[e.createTextVNode(e.toDisplayString(c.name)+" ",1),e.createElementVNode("span",Tt,e.toDisplayString(s.modelValue===c.code?"선택됨":""),1)],42,It)]))),128))])):s.type==="external"?(e.openBlock(),e.createElementBlock("ul",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.languageList,c=>(e.openBlock(),e.createElementBlock("li",{key:c.code},[e.createElementVNode("a",{href:c.url||"#",class:"item-link",lang:c.code,target:"_blank",title:"새 창 열림",onFocus:m},[e.createTextVNode(e.toDisplayString(c.name)+" ",1),p[2]||(p[2]=e.createElementVNode("i",{class:"svg-icon ico-go"},null,-1))],40,Rt)]))),128))])):e.createCommentVNode("",!0)])],4)],34))}}),Ft={class:"drop-in"},Pt={class:"drop-list"},At=["data-adjust-scale","onClick"],Ot={class:"drop-bottom"},Ve=e.defineComponent({__name:"KrdsResize",emits:["update:modelValue","close"],setup(t,{emit:r}){const s=r,a=e.ref(!1),n=e.ref(),o=e.ref(),i=e.ref("md"),u=[{key:"sm",label:"작게",zoom:"0.9"},{key:"md",label:"보통",zoom:"1"},{key:"lg",label:"조금 크게",zoom:"1.1"},{key:"xlg",label:"크게",zoom:"1.3"},{key:"xxlg",label:"가장 크게",zoom:"1.5"}],d=()=>{a.value=!a.value,a.value&&n.value&&g()},h=()=>{a.value=!1},y=c=>{h(),s("close"),o.value?.focus(),i.value=c.key,document.body.style.zoom=c?.zoom},C=()=>{const c=u.find(f=>f.key==="md");c&&y(c)},g=()=>{if(!n.value)return;const c=n.value.querySelector(".drop-menu");if(!c)return;const f=c.getBoundingClientRect(),E=window.innerWidth;n.value.classList.remove("drop-left","drop-right"),f.left<0?n.value.classList.add("drop-left"):E<f.left+f.width&&n.value.classList.add("drop-right")},w=c=>{c.key==="Escape"&&(h(),o.value?.focus())},m=c=>{n.value?.contains(c.target)||h()},l=c=>{n.value?.contains(c.relatedTarget)||h()},p=c=>{if(!n.value)return;n.value.querySelectorAll(".drop-list .item-link").forEach(K=>{K.style.position="relative",K.style.zIndex="0"});const E=c.target;E.style.zIndex="1"};return e.watch(a,c=>{c?(document.addEventListener("keydown",w),document.addEventListener("click",m)):(document.removeEventListener("keydown",w),document.removeEventListener("click",m))}),e.onUnmounted(()=>{document.removeEventListener("keydown",w),document.removeEventListener("click",m)}),(c,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:n,class:"krds-drop-wrap krds-resize","data-adjust":"scale",onFocusout:l},[e.createElementVNode("button",{ref_key:"buttonRef",ref:o,type:"button",class:"krds-btn small text drop-btn",onClick:d},[...f[0]||(f[0]=[e.createTextVNode(" 화면크기 ",-1),e.createElementVNode("i",{class:"svg-icon ico-toggle"},null,-1)])],512),e.createElementVNode("div",{class:"drop-menu",style:e.normalizeStyle({display:a.value?"block":"none"})},[e.createElementVNode("div",Ft,[e.createElementVNode("ul",Pt,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(u,E=>e.createElementVNode("li",{key:E.key},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["item-link",[E.key,E.key===i.value?"active":""]]),"data-adjust-scale":E.key,onClick:e.withModifiers(K=>y(E),["prevent"]),onFocus:p},e.toDisplayString(E.label),43,At)])),64))]),e.createElementVNode("div",Ot,[e.createElementVNode("button",{type:"button",class:"krds-btn medium text","data-adjust-scale":"md",onClick:e.withModifiers(C,["prevent"]),onFocus:p},[...f[1]||(f[1]=[e.createElementVNode("i",{class:"svg-icon ico-reset"},null,-1),e.createTextVNode(" 초기화 ",-1)])],32)])])],4)],544))}}),we=Object.freeze(Object.defineProperty({__proto__:null,KrdsBadge:ae,KrdsBreadcrumb:he,KrdsButton:O,KrdsButtonGroup:Y,KrdsCheckArea:ce,KrdsCheckbox:de,KrdsCoachMark:Se,KrdsContextualHelp:be,KrdsDateInput:ee,KrdsFileUpload:le,KrdsFormGroup:Z,KrdsFormHint:Q,KrdsFormLabel:J,KrdsIcon:G,KrdsInPageNavigation:ye,KrdsInput:X,KrdsLanguageSwitcher:Ee,KrdsLink:U,KrdsMasthead:ie,KrdsPagination:ge,KrdsPanel:ke,KrdsRadio:ue,KrdsResize:Ve,KrdsSelect:ne,KrdsSkipLink:pe,KrdsSpinner:q,KrdsStep:me,KrdsStepIndicator:fe,KrdsTag:oe,KrdsTagGroup:se,KrdsTextarea:te,KrdsToggleSwitch:re,KrdsTooltip:Ce},Symbol.toStringTag,{value:"Module"})),H={mounted(t,r){r.value!==!1&&t.classList.add("sr-only")},updated(t,r){r.value===!1?t.classList.remove("sr-only"):t.classList.add("sr-only")},unmounted(t){t.classList.remove("sr-only")}},Be={"sr-only":H},Ne=t=>{t.directive("sr-only",H)},ve=Object.freeze(Object.defineProperty({__proto__:null,default:Be,directives:Be,installDirectives:Ne,vSrOnly:H},Symbol.toStringTag,{value:"Module"})),qt={install(t,r={}){t.provide("krds:config",r);const s=r.components||Object.keys(we);s.forEach(a=>{const n=we[a];n&&t.component(a,n)}),typeof ve=="object"&&ve!==null&&Ne(t),t.config.globalProperties.$krds={version:"__VERSION__"},process.env.NODE_ENV!=="production"&&console.log(`[KRDS Vue] v__VERSION__ 설치 완료 - 컴포넌트: ${s.length}개`)}},Ht="__VERSION__";b.KrdsBadge=ae,b.KrdsBreadcrumb=he,b.KrdsButton=O,b.KrdsButtonGroup=Y,b.KrdsCheckArea=ce,b.KrdsCheckbox=de,b.KrdsCoachMark=Se,b.KrdsContextualHelp=be,b.KrdsDateInput=ee,b.KrdsFileUpload=le,b.KrdsFormGroup=Z,b.KrdsFormHint=Q,b.KrdsFormLabel=J,b.KrdsIcon=G,b.KrdsInPageNavigation=ye,b.KrdsInput=X,b.KrdsLanguageSwitcher=Ee,b.KrdsLink=U,b.KrdsMasthead=ie,b.KrdsPagination=ge,b.KrdsPanel=ke,b.KrdsRadio=ue,b.KrdsResize=Ve,b.KrdsSelect=ne,b.KrdsSkipLink=pe,b.KrdsSpinner=q,b.KrdsStep=me,b.KrdsStepIndicator=fe,b.KrdsTag=oe,b.KrdsTagGroup=se,b.KrdsTextarea=te,b.KrdsToggleSwitch=re,b.KrdsTooltip=Ce,b.classNames=F,b.default=qt,b.generateId=R,b.generateUid=at,b.version=Ht,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(k,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(k=typeof globalThis<"u"?globalThis:k||self,e(k.KrdsVue={},k.Vue))})(this,(function(k,e){"use strict";const O=e.defineComponent({name:"KrdsButton",props:{type:{type:String,default:"button"},size:{type:String,default:void 0},variant:{type:String,default:"primary"},icon:{type:Boolean,default:!1},border:{type:Boolean,default:!1},pure:{type:Boolean,default:!1},text:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:i,slots:s}){const o=e.computed(()=>{const a=["krds-btn"];return t.icon&&a.push("icon"),t.border&&a.push("border"),t.pure&&a.push("pure"),t.text&&a.push("text"),t.variant&&!t.icon&&a.push(t.variant),t.size&&a.push(t.size),t.class&&a.push(t.class),a}),l=a=>{t.disabled||i("click",a)};return()=>e.h("button",{type:t.type,class:o.value,disabled:t.disabled,onClick:l},s.default?.())}}),Y=e.defineComponent({name:"KrdsButtonGroup",props:{},setup(t,{slots:i}){return()=>e.h("div",{class:"btn-group"},i.default?.())}}),G=e.defineComponent({name:"KrdsIcon",props:{name:{type:String,required:!0},class:{type:String,default:void 0}},setup(t){return()=>e.h("i",{class:["svg-icon",t.name,t.class].filter(Boolean).join(" ")})}}),U=e.defineComponent({name:"KrdsLink",props:{href:{type:String,default:"#!"},target:{type:String,default:void 0},title:{type:String,default:void 0},size:{type:String,default:void 0},link:{type:Boolean,default:!0},basic:{type:Boolean,default:!1},pure:{type:Boolean,default:!1},class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:i,slots:s}){const o=e.computed(()=>{const c=["krds-btn"];return t.size&&c.push(t.size),t.link&&c.push("link"),t.basic&&c.push("basic"),t.pure&&c.push("pure"),t.class&&c.push(t.class),c}),l=e.computed(()=>{const c={href:t.href,class:o.value};return t.target&&(c.target=t.target),t.title&&(c.title=t.title),t.target==="_blank"&&(c.rel="noopener noreferrer"),c}),a=c=>{i("click",c)};return()=>e.h("a",{...l.value,onClick:a},s.default?.())}}),q=e.defineComponent({name:"KrdsSpinner",props:{label:{type:String,default:void 0}},render(){const t=[e.h("span",{class:"sr-only"},"로딩 중")];return this.label&&t.push(e.h("span",this.label)),e.h("div",{class:"krds-spinner",role:"status"},t)}}),X=e.defineComponent({name:"KrdsInput",props:{modelValue:{type:[String,Number],default:void 0},type:{type:String,default:"text"},size:{type:String,default:void 0},placeholder:{type:String,default:void 0},maxlength:{type:Number,default:void 0},minlength:{type:Number,default:void 0},max:{type:Number,default:void 0},min:{type:Number,default:void 0},step:{type:Number,default:void 0},autocomplete:{type:String,default:void 0},autofocus:{type:Boolean,default:!1},name:{type:String,default:void 0},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},error:{type:String,default:void 0},state:{type:String,default:"default"},icon:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","input","change","focus","blur","keydown","keyup"],setup(t,{emit:i,slots:s}){const o=e.computed(()=>{const g=["krds-input"];return t.size&&g.push(t.size),t.class&&g.push(t.class),g}),l=g=>{const w=g.target,p=t.type==="number"?Number(w.value):w.value;i("update:modelValue",p),i("input",g)},a=g=>{i("change",g)},c=g=>{i("focus",g)},f=g=>{i("blur",g)},m=g=>{i("keydown",g)},h=g=>{i("keyup",g)},y=e.computed(()=>{const g={type:t.type,class:o.value,value:t.modelValue,placeholder:t.placeholder,name:t.name,id:t.id,required:t.required,readonly:t.readonly,disabled:t.disabled,autocomplete:t.autocomplete,autofocus:t.autofocus,onInput:l,onChange:a,onFocus:c,onBlur:f,onKeydown:m,onKeyup:h};return t.maxlength!==void 0&&(g.maxlength=t.maxlength),t.minlength!==void 0&&(g.minlength=t.minlength),t.type==="number"&&(t.max!==void 0&&(g.max=t.max),t.min!==void 0&&(g.min=t.min),t.step!==void 0&&(g.step=t.step)),g}),b=e.computed(()=>{const g=["form-conts"];return t.state!=="default"&&g.push(`is-${t.state}`),t.icon&&g.push("btn-ico-wrap"),g});return()=>{const g=[e.h("input",y.value)];return t.loading?e.h("div",{class:b.value},[e.h("div",{class:"form-spinner"},[...g,e.h(q)])]):(s.default&&g.push(...s.default()),e.h("div",{class:b.value},g))}}}),J=e.defineComponent({name:"KrdsFormLabel",props:{for:{type:String,default:void 0},class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},emits:["click"],setup(t,{emit:i,slots:s}){const o=l=>{i("click",l)};return()=>e.h("div",{class:"form-tit"},[e.h("label",{for:t.for,id:t.id,class:t.class,style:t.style,onClick:o},s.default?.())])}}),Q=e.defineComponent({name:"KrdsFormHint",props:{type:{type:String,default:"hint"},class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},emits:["click"],setup(t,{emit:i,slots:s}){const o=a=>{i("click",a)},l=()=>{let a;switch(t.type){case"error":a="form-hint-invalid";break;case"success":a="form-hint-success";break;case"information":a="form-hint-information";break;default:a="form-hint";break}return t.class?`${a} ${t.class}`:a};return()=>e.h("p",{id:t.id,class:l(),style:t.style,onClick:o},s.default?.())}}),Z=e.defineComponent({name:"KrdsFormGroup",props:{class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},setup(t,{slots:i}){const s=e.computed(()=>{const o=["form-group"];return t.class&&o.push(t.class),o});return()=>e.h("div",{id:t.id,class:s.value,style:t.style},i.default?.())}});function $e(t,i){const s=new Date,o=e.ref(t||s.getFullYear()),l=e.ref(i||s.getMonth()+1),a=e.ref(null),c=e.ref(null),f=e.ref(null),m=e.computed(()=>{const d=s.getFullYear(),r=[];for(let u=d-10;u<=d+10;u++)r.push(u);return r}),h=e.computed(()=>Array.from({length:12},(d,r)=>r+1)),y=()=>{a.value=null,c.value=null},b=()=>{l.value===1?(l.value=12,o.value-=1):l.value-=1},g=()=>{l.value===12?(l.value=1,o.value+=1):l.value+=1},w=(d,r=!1)=>{if(r)a.value=d,c.value=d;else if(!a.value||a.value&&c.value)a.value=d,c.value=null;else{const u=new Date(a.value.replace(/\./g,"-"));new Date(d.replace(/\./g,"-"))<u?(a.value=d,c.value=null):c.value=d}};return{currentYear:o,currentMonth:l,selectedStartDate:a,selectedEndDate:c,activeDateSelector:f,yearOptions:m,monthOptions:h,clearDateSelection:y,prevMonth:b,nextMonth:g,handleDateSelection:w,selectToday:()=>{const d=`${s.getFullYear()}.${String(s.getMonth()+1).padStart(2,"0")}.${String(s.getDate()).padStart(2,"0")}`;w(d,!0)},isDateInSelectedRange:d=>{if(!a.value||!c.value)return{isInRange:!1,isStart:!1,isEnd:!1};const r=new Date(d.replace(/\./g,"-")),u=new Date(a.value.replace(/\./g,"-")),C=new Date(c.value.replace(/\./g,"-")),D=d===a.value,N=d===c.value;return{isInRange:r>=u&&r<=C,isStart:D,isEnd:N}}}}function Le(t,i,s={}){let o=null;const l=typeof s=="string"?{ignore:s}:s,{ignore:a,event:c="click"}=l,f=()=>{o=h=>{const y=h.target;t.value?.contains(y)||a&&y.closest(a)||i()},document.addEventListener(c,o)},m=()=>{if(o){const h=typeof s=="string"?"click":s.event||"click";document.removeEventListener(h,o),o=null}};return e.onMounted(()=>{f()}),e.onBeforeUnmount(()=>{m()}),{setupGlobalListeners:f,removeGlobalListeners:m}}const Ie={class:"form-conts"},Te={class:"calendar-input"},Me=["id","name","placeholder","value","readonly","disabled","required","autofocus"],Re=["disabled","aria-expanded"],Fe={class:"calendar-head"},Pe={class:"calendar-switch-wrap"},Ae={class:"calendar-drop-down"},Oe=["aria-expanded"],qe={class:"calendar-select calendar-year-wrap"},He={class:"sel year"},je=["onClick"],We={class:"calendar-drop-down"},Ye=["aria-expanded"],Ge={class:"calendar-select calendar-mon-wrap"},Ue={class:"sel month"},Xe=["onClick"],Je={class:"calendar-body"},Qe={class:"calendar-table-wrap"},Ze={class:"calendar-tbl"},et=["data-date"],tt=["aria-pressed","onClick"],lt={class:"calendar-footer"},nt={class:"calendar-btn-wrap"},ee=e.defineComponent({__name:"KrdsDateInput",props:{modelValue:{default:void 0},size:{default:"medium"},placeholder:{default:"YYYY.MM.DD"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},eventDates:{default:()=>[]},holidays:{default:()=>[]},initialYear:{default:void 0},initialMonth:{default:void 0},name:{default:void 0},required:{type:Boolean,default:!1},class:{default:void 0},style:{},id:{default:void 0}},emits:["update:modelValue","input","change","focus","blur"],setup(t,{emit:i}){const s=t,o=i,l=e.ref(),a=e.ref(),c=e.ref(!1),f=e.ref(null),{currentYear:m,currentMonth:h,selectedStartDate:y,selectedEndDate:b,yearOptions:g,monthOptions:w,prevMonth:p,nextMonth:n,handleDateSelection:d,selectToday:r,isDateInSelectedRange:u}=$e(s.initialYear,s.initialMonth),C=()=>{c.value&&a.value?.focus(),c.value=!1,f.value=null};Le(l,C,".calendar-conts");const D=e.computed(()=>{const S=["krds-input","datepicker","cal"];return s.size&&S.push(s.size),s.class&&S.push(s.class),S}),N=e.computed(()=>["form-conts","calendar-conts"]),K=e.computed(()=>({"krds-calendar-area":!0,active:c.value})),v=e.computed(()=>{const S=m.value,E=h.value,V=new Date(S,E-1,1),T=new Date(V);T.setDate(T.getDate()-V.getDay());const I=[],x=new Date(T);for(let W=0;W<6;W++){const xe=[];for(let _e=0;_e<7;_e++){const Ut=`${x.getFullYear()}.${String(x.getMonth()+1).padStart(2,"0")}.${String(x.getDate()).padStart(2,"0")}`,ze=x.getDay();xe.push({day:x.getDate(),dateString:Ut,isCurrentMonth:x.getMonth()===E-1,isToday:x.toDateString()===new Date().toDateString(),isPrevMonth:x.getMonth()<E-1||x.getMonth()===11&&E===1,isNextMonth:x.getMonth()>E-1||x.getMonth()===0&&E===12,isSunday:ze===0,isSaturday:ze===6}),x.setDate(x.getDate()+1)}I.push(xe)}return I}),$=S=>{const E=[];if(S.isPrevMonth&&E.push("old"),S.isNextMonth&&E.push("new"),S.isToday&&E.push("today"),S.isSunday&&E.push("day-off"),s.holidays?.includes(S.dateString)&&E.push("day-off"),s.eventDates?.includes(S.dateString)&&E.push("day-event"),S.isCurrentMonth){const V=u(S.dateString);V.isInRange&&(E.push("period"),V.isStart&&E.push("start"),V.isEnd&&E.push("end"))}return E},B=e.computed(()=>[{id:"get-today",label:"오늘",class:"text",variant:void 0,size:"small",handler:r},{id:"cancel-btn",label:"취소",class:void 0,variant:"tertiary",size:"small",handler:C},{id:"confirm-btn",label:"확인",class:void 0,variant:"primary",size:"small",handler:M}]),L=S=>{f.value===S?f.value=null:f.value=S},P=S=>{m.value=S,f.value=null},j=S=>{h.value=S,f.value=null},M=()=>{if(y.value){if(b.value&&y.value!==b.value){const S=`${y.value} ~ ${b.value}`;o("update:modelValue",S)}else o("update:modelValue",y.value);C()}},_=()=>{c.value=!0,f.value=null,setTimeout(()=>{l.value?.querySelector(".calendar-wrap")?.focus()},50)},z=()=>{c.value?C():_()},De=S=>{S.code==="Escape"&&(f.value?f.value=null:c.value&&C())},A=S=>{const E=S.target;o("update:modelValue",E.value),o("input",S)},Wt=S=>{o("change",S)},Yt=S=>{o("focus",S)},Gt=S=>{o("blur",S)};return(S,E)=>(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",{class:e.normalizeClass(N.value)},[e.createElementVNode("div",Te,[e.createElementVNode("input",{id:t.id,name:t.name,class:e.normalizeClass(D.value),placeholder:t.placeholder,value:t.modelValue,readonly:t.readonly,disabled:t.disabled,required:t.required,autofocus:t.autofocus,type:"text",onInput:A,onChange:Wt,onFocus:Yt,onBlur:Gt},null,42,Me),e.createElementVNode("button",{ref_key:"datePickerButtonRef",ref:a,class:e.normalizeClass(`krds-btn ${t.size||"medium"} icon form-btn-datepicker`),disabled:t.disabled,"aria-expanded":c.value,type:"button",onClick:z},[...E[4]||(E[4]=[e.createElementVNode("span",{class:"sr-only"},"달력 열기",-1),e.createElementVNode("i",{class:"svg-icon ico-calendar"},null,-1)])],10,Re)]),e.createElementVNode("div",{ref_key:"datePickerAreaRef",ref:l,class:e.normalizeClass(K.value)},[e.withDirectives(e.createElementVNode("div",{class:"calendar-wrap bottom","aria-label":"달력",tabindex:"0",onKeydown:De},[e.createElementVNode("div",Fe,[e.createElementVNode("button",{type:"button",class:"btn-cal-move prev",onClick:E[0]||(E[0]=(...V)=>e.unref(p)&&e.unref(p)(...V))},[...E[5]||(E[5]=[e.createElementVNode("span",{class:"sr-only"},"이전 달",-1)])]),e.createElementVNode("div",Pe,[e.createElementVNode("div",Ae,[e.createElementVNode("button",{type:"button",class:"btn-cal-switch year","aria-label":"연도 선택","aria-expanded":f.value==="year",onClick:E[1]||(E[1]=V=>L("year"))},e.toDisplayString(e.unref(m))+"년 ",9,Oe),e.withDirectives(e.createElementVNode("div",qe,[e.createElementVNode("ul",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g),V=>(e.openBlock(),e.createElementBlock("li",{key:V},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:V===e.unref(m)}),onClick:T=>P(V)},e.toDisplayString(V)+"년",11,je)]))),128))])],512),[[e.vShow,f.value==="year"]])]),e.createElementVNode("div",We,[e.createElementVNode("button",{type:"button",class:"btn-cal-switch month","aria-label":"월 선택","aria-expanded":f.value==="month",onClick:E[2]||(E[2]=V=>L("month"))},e.toDisplayString(e.unref(h).toString().padStart(2,"0"))+"월 ",9,Ye),e.withDirectives(e.createElementVNode("div",Ge,[e.createElementVNode("ul",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),V=>(e.openBlock(),e.createElementBlock("li",{key:V},[e.createElementVNode("button",{type:"button",class:e.normalizeClass({active:V===e.unref(h)}),onClick:T=>j(V)},e.toDisplayString(V.toString().padStart(2,"0"))+"월 ",11,Xe)]))),128))])],512),[[e.vShow,f.value==="month"]])])]),e.createElementVNode("button",{type:"button",class:"btn-cal-move next",onClick:E[3]||(E[3]=(...V)=>e.unref(n)&&e.unref(n)(...V))},[...E[6]||(E[6]=[e.createElementVNode("span",{class:"sr-only"},"다음 달",-1)])])]),e.createElementVNode("div",Je,[e.createElementVNode("div",Qe,[e.createElementVNode("table",Ze,[e.createElementVNode("caption",null,e.toDisplayString(e.unref(m))+"년 "+e.toDisplayString(e.unref(h).toString().padStart(2,"0"))+"월",1),E[7]||(E[7]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,"일"),e.createElementVNode("th",null,"월"),e.createElementVNode("th",null,"화"),e.createElementVNode("th",null,"수"),e.createElementVNode("th",null,"목"),e.createElementVNode("th",null,"금"),e.createElementVNode("th",null,"토")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(V,T)=>(e.openBlock(),e.createElementBlock("tr",{key:T},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V,(I,x)=>(e.openBlock(),e.createElementBlock("td",{key:x,class:e.normalizeClass($(I)),"data-date":I.dateString},[e.createElementVNode("button",{type:"button",class:"btn-set-date","aria-pressed":e.unref(u)(I.dateString).isInRange?"true":"false",onClick:W=>e.unref(d)(I.dateString)},[e.createElementVNode("span",null,e.toDisplayString(I.day),1)],8,tt)],10,et))),128))]))),128))])])])]),e.createElementVNode("div",lt,[e.createElementVNode("div",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,V=>(e.openBlock(),e.createBlock(e.unref(O),{id:V.id,key:V.id,class:e.normalizeClass(V.class),variant:V.variant,size:V.size,onClick:V.handler},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.label),1)]),_:2},1032,["id","class","variant","size","onClick"]))),128))])])],544),[[e.vShow,c.value]])],2)],2)]))}}),te=e.defineComponent({name:"KrdsTextarea",props:{modelValue:{type:String,default:""},size:{type:String,default:void 0},placeholder:{type:String,default:void 0},maxlength:{type:Number,default:void 0},minlength:{type:Number,default:void 0},rows:{type:Number,default:4},cols:{type:Number,default:void 0},autofocus:{type:Boolean,default:!1},name:{type:String,default:void 0},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showCount:{type:Boolean,default:!0},resize:{type:String,default:"vertical"},class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","input","change","focus","blur","keydown","keyup"],setup(t,{emit:i}){const s=e.ref(0);e.watch(()=>t.modelValue,n=>{s.value=(n||"").length},{immediate:!0});const o=e.computed(()=>{const n=["krds-input"];return t.size&&n.push(t.size),t.class&&n.push(t.class),n}),l=e.computed(()=>{const n={};return t.resize&&(n.resize=t.resize),n}),a=n=>{const r=n.target.value;s.value=r.length,i("update:modelValue",r),i("input",n)},c=n=>{i("change",n)},f=n=>{i("focus",n)},m=n=>{i("blur",n)},h=n=>{i("keydown",n)},y=n=>{i("keyup",n)},b=e.computed(()=>{const n={class:o.value,style:l.value,value:t.modelValue,placeholder:t.placeholder,name:t.name,id:t.id,required:t.required,readonly:t.readonly,disabled:t.disabled,autofocus:t.autofocus,rows:t.rows,cols:t.cols,onInput:a,onChange:c,onFocus:f,onBlur:m,onKeydown:h,onKeyup:y};return t.maxlength!==void 0&&(n.maxlength=t.maxlength),t.minlength!==void 0&&(n.minlength=t.minlength),n}),g=e.computed(()=>["form-conts"]),w=e.computed(()=>["textarea-wrap"]),p=e.computed(()=>{if(!t.showCount)return null;const n=s.value,d=t.maxlength;return{current:n,max:d||""}});return()=>{const n=[e.h("textarea",b.value)];return p.value&&n.push(e.h("p",{class:"textarea-count"},[e.h("span",{class:"count-now"},p.value.current),e.h("span",{class:"count-total"},p.value.max?`/${p.value.max}`:"")])),e.h("div",{class:g.value},[e.h("div",{class:w.value},n)])}}}),le=e.defineComponent({name:"KrdsSelect",props:{modelValue:{type:[String,Number,null],default:null},size:{type:String,default:"medium"},title:{type:String,default:void 0},options:{type:Array,default:()=>[]},placeholder:{type:String,default:"선택"},name:{type:String,default:void 0},disabled:{type:Boolean,default:!1},state:{type:String,default:"default"},sort:{type:Boolean,default:!1},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","focus","blur"],setup(t,{emit:i,slots:s}){const o=e.computed(()=>{const y=[];return t.sort?y.push("krds-form-select-sort"):y.push("krds-form-select"),t.size&&y.push(t.size),t.class&&y.push(t.class),y}),l=y=>{const b=y.target,g=b.value===""?null:b.value;i("update:modelValue",g)},a=y=>{i("focus",y)},c=y=>{i("blur",y)},f=e.computed(()=>({class:o.value,value:t.modelValue??"",title:t.title||t.placeholder,name:t.name,id:t.id,disabled:t.disabled||t.readonly,onChange:l,onFocus:a,onBlur:c})),m=e.computed(()=>{const y=["form-conts"];return t.state!=="default"&&y.push(`is-${t.state}`),y}),h=()=>{const y=[];return t.placeholder&&!t.modelValue&&y.push(e.h("option",{value:"",disabled:!0,selected:!0},t.placeholder)),t.options&&t.options.length>0&&t.options.forEach(b=>{y.push(e.h("option",{value:b.value,disabled:b.disabled,selected:b.value===t.modelValue},b.label))}),s.default&&y.push(...s.default()),y};return()=>{const y=e.h("select",f.value,h());return t.sort?y:e.h("div",{class:m.value},[y])}}}),ne=e.defineComponent({name:"KrdsFileUpload",props:{modelValue:{type:Array,default:()=>[]},size:{type:String,default:"medium"},accept:{type:String,default:void 0},maxFiles:{type:Number,default:10},maxFileSize:{type:Number,default:20*1024*1024},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},dragAndDrop:{type:Boolean,default:!0},title:{type:String,default:"타이틀영역"},description:{type:String,default:"컨텐츠 영역"},placeholder:{type:String,default:"첨부할 파일을 여기에 끌어다 놓거나, 파일 선택 버튼을 눌러 파일을 직접 선택해주세요."},showPreview:{type:Boolean,default:!0},showDownload:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showClearAll:{type:Boolean,default:!0},name:{type:String,default:void 0},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},class:{type:String,default:void 0},style:{type:[String,Object],default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","file-added","file-removed","file-error","upload-start","upload-progress","upload-complete","upload-error","clear-all","download","preview"],setup(t,{emit:i}){e.ref(!1),e.computed(()=>{const o=["krds-file-upload","line"];return t.class&&o.push(t.class),o});const s=e.computed(()=>t.modelValue?.length||0);return e.computed(()=>!t.disabled&&s.value<t.maxFiles),()=>null}}),ae=e.defineComponent({name:"KrdsBadge",props:{type:{type:String,default:"outline"},color:{type:String,default:"primary"},size:{type:String,default:"large"},number:{type:Boolean,default:!1},class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:i,slots:s}){const o=e.computed(()=>{const a=["krds-badge"];return a.push(`${t.type}-${t.color}`),t.size&&a.push(t.size),t.number&&a.push("number"),t.class&&a.push(t.class),a}),l=a=>{i("click",a)};return()=>e.h("span",{type:t.type,color:t.color,size:t.size,number:t.number,class:o.value,onClick:l},s.default?.())}}),oe=e.defineComponent({name:"KrdsTag",props:{link:{type:Boolean,default:!1},href:{type:String,default:"#"},target:{type:String,default:void 0},rel:{type:String,default:void 0},class:{type:String,default:void 0}},emits:["remove"],setup(t,{emit:i,slots:s}){const o=e.computed(()=>{const c=["krds-btn-tag"];return t.link&&c.push("link"),t.class&&c.push(t.class),c}),l=c=>{i("remove",c)},a=()=>e.h("button",{type:"button",class:"btn-delete",onClick:l},[e.h("span",{class:"sr-only"},"삭제")]);return()=>{const c=[],f=s.default?.();if(f&&c.push(f),t.link||c.push(a()),t.link){const m={href:t.href,class:o.value};return t.target&&(m.target=t.target),t.rel&&(m.rel=t.rel),e.h("a",m,c)}return e.h("span",{class:o.value},c)}}}),se=e.defineComponent({name:"KrdsTagGroup",props:{size:{type:String,default:"medium"},class:{type:String,default:void 0}},setup(t,{slots:i}){const s=e.computed(()=>{const o=["krds-tag-wrap"];return t.size&&o.push(t.size),t.class&&o.push(t.class),o});return()=>e.h("div",{class:s.value},i.default?.())}}),ie=e.defineComponent({name:"KrdsMasthead",props:{class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:i,slots:s}){const o=e.computed(()=>{const a=[""];return t.class&&a.push(t.class),a}),l=a=>{i("click",a)};return()=>e.h("div",{id:"krds-masthead",class:o.value,onClick:l},[e.h("div",{class:"toggle-wrap"},[e.h("div",{class:"toggle-head"},[e.h("div",{class:"inner"},[e.h("span",{class:"nuri-txt"},s.default?.())])])])])}});let at=0;function R(t="krds"){return`${t}-${++at}`}function ot(){const t=Date.now().toString(36).slice(-4),i=Math.random().toString(36).substring(2,5);return`${t}${i}`}function F(...t){return t.filter(Boolean).join(" ")}const re=e.defineComponent({name:"KrdsToggleSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},size:{type:String,default:"medium",validator:t=>["medium","large"].includes(t)},name:{type:String,default:void 0},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue","change"],setup(t,{emit:i,attrs:s}){const o=e.computed(()=>t.modelValue),l=e.computed(()=>F("krds-form-toggle-switch",t.size,t.class)),a=f=>{if(t.disabled)return;const h=f.target.checked;i("update:modelValue",h),i("change",h)},c=e.computed(()=>t.id||R("toggle-switch"));return()=>e.h("div",{class:l.value},[e.h("input",{type:"checkbox",id:c.value,name:t.name,checked:o.value,disabled:t.disabled,onChange:a,...s}),e.h("label",{for:c.value},[e.h("span",{class:"switch-toggle"},[e.h("i")]),t.label||""])])}}),ce=e.defineComponent({name:"KrdsCheckArea",props:{class:{type:String,default:void 0},column:{type:Boolean,default:!1}},setup(t,{slots:i}){return()=>{const s=["krds-check-area"];return t.column&&s.push("chk-column"),t.class&&s.push(t.class),e.h("div",{class:s},i.default?.())}}}),de=e.defineComponent({name:"KrdsCheckbox",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:t=>["medium","large"].includes(t)},chip:{type:Boolean,default:!1},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue"],slots:Object,setup(t,{emit:i,attrs:s,slots:o}){const l=e.computed(()=>t.modelValue),a=e.computed(()=>{const m=t.chip?"krds-form-chip":"krds-form-check";return F(m,t.size,t.class)}),c=m=>{if(t.disabled)return;const y=m.target.checked;i("update:modelValue",y)},f=e.computed(()=>t.id||R("checkbox"));return()=>{const m=[e.h("input",{type:"checkbox",id:f.value,checked:l.value,disabled:t.disabled,onChange:c,...s}),e.h("label",{for:f.value},o.default?.())];return o.description&&!t.chip&&m.push(e.h("div",{class:"krds-form-check-cnt"},e.h("p",{class:"krds-form-check-p"},o.description()))),e.h("div",{class:a.value},m)}}}),ue=e.defineComponent({name:"KrdsRadio",props:{modelValue:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],required:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:t=>["medium","large"].includes(t)},chip:{type:Boolean,default:!1},name:{type:String,default:void 0},class:{type:String,default:void 0},id:{type:String,default:void 0}},emits:["update:modelValue"],slots:Object,setup(t,{emit:i,attrs:s,slots:o}){const l=e.computed(()=>t.modelValue===t.value),a=e.computed(()=>{const h=t.chip?"krds-form-chip":"krds-form-check";return F(h,t.size,t.class)}),c=h=>{if(t.disabled)return;h.target.checked&&i("update:modelValue",t.value)},f=e.computed(()=>t.id||R("radio")),m=e.computed(()=>t.name);return()=>{const h=[e.h("input",{type:"radio",id:f.value,name:m.value,value:String(t.value),checked:l.value,disabled:t.disabled,onChange:c,...s}),e.h("label",{for:f.value},o.default?.())];return o.description&&!t.chip&&h.push(e.h("div",{class:"krds-form-check-cnt"},e.h("p",{class:"krds-form-check-p"},o.description()))),e.h("div",{class:a.value},h)}}}),fe=e.defineComponent({name:"KrdsStepIndicator",props:{modelValue:{type:Number,default:0},class:{type:String,default:void 0}},emits:["update:modelValue"],setup(t,{slots:i}){const s=e.computed(()=>{const f=["krds-step-wrap"];return t.class&&f.push(t.class),f}),o=f=>{const m=t.modelValue||0;return f<m?"done":f===m?"active":"pending"},l=e.ref(0),a=()=>{l.value=0},c=()=>l.value++;return e.provide("stepIndicator",{activeStep:e.computed(()=>t.modelValue||0),getStepStatus:o,getNextStepIndex:c,resetStepIndex:a}),()=>(a(),e.h("ol",{class:s.value},i.default?.()))}}),me=e.defineComponent({name:"KrdsStep",props:{step:{type:[String,Number],required:!0},title:{type:String,required:!0},status:{type:String,default:void 0},class:{type:String,default:void 0}},emits:["click"],setup(t,{emit:i,slots:s}){const o=e.inject("stepIndicator"),l=o?o.getNextStepIndex():-1,a=e.computed(()=>t.status?t.status:o&&l>=0?o.getStepStatus(l):"pending"),c=e.computed(()=>{const m=[a.value];return t.class&&m.push(t.class),m}),f=m=>{i("click",m,t.step)};return()=>{const m=a.value==="active";return e.h("li",{class:c.value,onClick:f},[e.h("span",[m&&e.h("em",{class:"sr-only"},"현재단계"),e.h("i",{class:"step"},t.step),e.h("span",{class:"step-tit"},t.title),s.default?.()])])}}}),pe=e.defineComponent({name:"KrdsSkipLink",props:{href:{type:String,required:!0,validator:t=>t.startsWith("#")},class:{type:[String,Array,Object],default:void 0},id:{type:String,default:"krds-skip-link"}},setup(t,{slots:i}){return()=>e.h("div",{id:t.id,class:t.class},[e.h("a",{href:t.href},i.default?.())])}}),st=["id","aria-label"],it={class:"breadcrumb"},rt=["href","aria-current","onClick"],ct={key:0},he=e.defineComponent({__name:"KrdsBreadcrumb",props:{items:{},id:{default:void 0},ariaLabel:{default:"현재 경로"},showHomeIcon:{type:Boolean,default:!0}},emits:["item-click"],setup(t,{emit:i}){const s=t,o=i,l=c=>c===s.items.length-1,a=(c,f)=>{c.onClick&&c.onClick(f),o("item-click",c,f)};return(c,f)=>(e.openBlock(),e.createElementBlock("nav",{id:t.id,class:"krds-breadcrumb-wrap","aria-label":t.ariaLabel},[e.createElementVNode("ol",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(m,h)=>(e.openBlock(),e.createElementBlock("li",{key:`breadcrumb-${h}`,class:e.normalizeClass({home:h===0&&t.showHomeIcon})},[e.createElementVNode("a",{href:m.href||"#",class:"txt","aria-current":l(h)?"page":void 0,onClick:y=>a(m,y)},[h===0&&t.showHomeIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(m.text),1))],8,rt)],2))),128))])],8,st))}}),ye=e.defineComponent({name:"KrdsInPageNavigation",props:{title:{type:String,default:void 0},caption:{type:String,default:"이 페이지의 구성"},items:{type:Array,default:()=>[]},autoActive:{type:Boolean,default:!0},headerTopSelector:{type:String,default:"#krds-masthead"},headerInnerSelector:{type:String,default:"#krds-header .header-in"},class:{type:String,default:void 0}},emits:["itemClick"],slots:Object,setup(t,{emit:i,slots:s}){const o=e.ref(""),l=e.ref(new Map),a=e.computed(()=>{const p=["krds-in-page-navigation-type"];return t.class&&p.push(t.class),p}),c=()=>{const p=t.headerTopSelector,n=t.headerInnerSelector,d=document.querySelector(p)?.clientHeight||0,r=document.querySelector(n)?.clientHeight||0;return d+r},f=(p,n)=>{if(i("itemClick",p,n),p.href.startsWith("#")){n.preventDefault();const d=document.querySelector(p.href);if(d){const r=c();if(window.scrollTo({left:0,top:d.getBoundingClientRect().top+window.scrollY-r,behavior:"smooth"}),o.value=p.href,n instanceof KeyboardEvent){const u=d.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");u&&u instanceof HTMLElement&&(u.setAttribute("tabindex","-1"),u.focus({preventScroll:!0}))}}}},m=()=>{l.value.clear(),t.items&&t.items.filter(p=>p.href.startsWith("#")).forEach(p=>{const n=document.querySelector(p.href);n&&l.value.set(p.href,n)})},h=()=>{if(!t.autoActive||!t.items||l.value.size===0)return;const p=window.innerHeight,n=Math.ceil(p/5),d=window.scrollY+p,r=document.body.scrollHeight,u=t.items.filter(v=>v.href.startsWith("#")&&l.value.has(v.href)).map(v=>({href:v.href,element:l.value.get(v.href),item:v}));if(u.length===0)return;const C=u[0],D=u[u.length-1],N=C.element.offsetTop;let K="";if(d>=r)K=D.href;else if(window.scrollY<=N)K=C.href;else for(const v of u){const $=v.element.offsetHeight,B=v.element.offsetTop-n;if(window.scrollY>B&&window.scrollY<=B+$){K=v.href;break}}K&&K!==o.value&&(o.value=K)},y=()=>{if(!t.items)return;const p=t.items.find(n=>n.active);p?o.value=p.href:t.items.length>0&&(o.value=t.items[0].href)};e.onMounted(()=>{if(y(),t.autoActive){m(),h(),window.addEventListener("scroll",h,{passive:!0});const p=new MutationObserver(()=>{m()});p.observe(document.body,{childList:!0,subtree:!0}),e.onUnmounted(()=>{p.disconnect()})}}),e.onUnmounted(()=>{t.autoActive&&(window.removeEventListener("scroll",h),l.value.clear())});const b=()=>!t.caption&&!t.title?null:e.h("div",{class:"in-page-navigation-header"},[t.caption&&e.h("p",{class:"quick-caption"},t.caption),t.title&&e.h("p",{class:"quick-title"},t.title)]),g=()=>{if(!t.items)return null;const p=t.items.map(n=>{const d=o.value===n.href||!t.autoActive&&n.active;return e.h("li",{key:n.href},[e.h("a",{href:n.href,class:d?"active":"",onClick:r=>f(n,r),onKeydown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),f(n,r))}},n.text)])});return e.h("nav",{class:"in-page-navigation-list"},[e.h("ul",{},p)])},w=()=>s.action?e.h("div",{class:"in-page-navigation-action"},[s.action()]):null;return()=>e.h("div",{class:a.value},[e.h("div",{class:"krds-in-page-navigation-area"},[b(),g(),w()].filter(Boolean))])}}),dt=["id"],ut={class:"page-links"},ft=["href","aria-current","onClick"],mt={key:0},pt=["aria-label"],ge=e.defineComponent({__name:"KrdsPagination",props:{modelValue:{default:1},min:{default:1},max:{},id:{default:void 0},ariaLabel:{default:"페이지 내비게이션"},pageRange:{default:8}},emits:["update:modelValue"],setup(t,{emit:i}){const s=t,o=i,l=e.computed(()=>Math.max(1,s.min)),a=e.computed(()=>s.modelValue??l.value),c=e.computed(()=>a.value<=l.value),f=e.computed(()=>a.value>=s.max),m=e.computed(()=>{if(!c.value)return"#"}),h=e.computed(()=>{if(!f.value)return"#"}),y=e.computed(()=>{const{pageRange:p,max:n}=s,d=1,r=[];if(n<=p+2*d)for(let u=l.value;u<=n;u++)r.push({type:"page",key:`page-${u}`,page:u,href:"#"});else{const u=Math.min(d,n),C=Math.max(n-d+1,1),D=Math.max(l.value,a.value-Math.floor(p/2)),N=Math.min(n,D+p-1),K=Math.max(l.value,N-p+1);for(let B=l.value;B<=u;B++)r.push({type:"page",key:`page-${B}`,page:B,href:"#"});K>u+1&&r.push({type:"ellipsis",key:"ellipsis-left",ariaLabel:"페이지 생략"});const v=Math.max(K,u+1),$=Math.min(N,C-1);for(let B=v;B<=$;B++)r.push({type:"page",key:`page-${B}`,page:B,href:"#"});N<C-1&&r.push({type:"ellipsis",key:"ellipsis-right",ariaLabel:"페이지 생략"});for(let B=C;B<=n;B++)r.push({type:"page",key:`page-${B}`,page:B,href:"#"})}return r}),b=(p,n)=>{if(p===a.value){n.preventDefault();return}o("update:modelValue",p)},g=p=>{if(c.value){p.preventDefault();return}const n=a.value-1;o("update:modelValue",n)},w=p=>{if(f.value){p.preventDefault();return}const n=a.value+1;o("update:modelValue",n)};return(p,n)=>{const d=e.resolveDirective("sr-only");return e.openBlock(),e.createElementBlock("div",{id:t.id,class:"krds-pagination"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value?"span":"a"),{href:c.value?void 0:m.value,class:e.normalizeClass(["page-navi","prev",{disabled:c.value}]),onClick:g},{default:e.withCtx(()=>[...n[0]||(n[0]=[e.createTextVNode(" 이전 ",-1)])]),_:1},8,["href","class"])),e.createElementVNode("div",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.key},[r.type==="page"?(e.openBlock(),e.createElementBlock("a",{key:0,href:r.href||"#",class:e.normalizeClass(["page-link",{active:r.page===a.value}]),"aria-current":r.page===a.value?"page":void 0,onClick:u=>b(r.page,u)},[r.page===a.value?e.withDirectives((e.openBlock(),e.createElementBlock("span",mt,[...n[1]||(n[1]=[e.createTextVNode("현재페이지",-1)])])),[[d]]):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.page),1)],10,ft)):r.type==="ellipsis"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"page-link link-dot","aria-label":r.ariaLabel},null,8,pt)):e.createCommentVNode("",!0)],64))),128))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.value?"span":"a"),{href:f.value?void 0:h.value,class:e.normalizeClass(["page-navi","next",{disabled:f.value}]),onClick:w},{default:e.withCtx(()=>[...n[2]||(n[2]=[e.createTextVNode(" 다음 ",-1)])]),_:1},8,["href","class"]))],8,dt)}}}),ht={class:"inner help-panel-flexible"},yt={class:"help-panel-wrap"},gt={class:"help-conts-area"},ke=e.defineComponent({__name:"KrdsPanel",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:i}){const s=t,o=i,l=e.computed({get:()=>s.modelValue,set:f=>o("update:modelValue",f)}),a=()=>{l.value=!0},c=()=>{l.value=!1};return(f,m)=>(e.openBlock(),e.createElementBlock("div",ht,[e.createElementVNode("button",{type:"button",class:"krds-btn small tertiary btn-help-panel expand btn-help-exec",onClick:a},[...m[0]||(m[0]=[e.createElementVNode("i",{class:"svg-icon ico-fold"},null,-1),e.createTextVNode(" 도움말 ",-1)])]),e.createElementVNode("div",{class:e.normalizeClass(["krds-help-panel",{expand:l.value}])},[e.createElementVNode("div",yt,[e.createElementVNode("div",gt,[e.renderSlot(f.$slots,"default"),e.createElementVNode("button",{type:"button",class:"krds-btn small tertiary btn-help-panel fold",onClick:c},[...m[1]||(m[1]=[e.createElementVNode("span",{class:"sr-only"},"도움말",-1),e.createTextVNode(" 접어두기 ",-1),e.createElementVNode("i",{class:"svg-icon ico-angle right"},null,-1)])])])])],2)]))}}),kt={class:"tooltip-action"},bt={key:0,class:"svg-icon ico-help"},St={key:1,class:"svg-icon ico-tooltip"},Ct={class:"tooltip-title"},Et={class:"tooltip-contents"},be=e.defineComponent({__name:"KrdsContextualHelp",props:{tooltipTitle:{default:"도움말 제목"},helpIcon:{type:Boolean},position:{default:"top left"}},setup(t){const i=t,s=e.ref(),o=e.ref(),l=e.ref(),a=e.ref(),c=e.ref(!1),f=()=>{const n=c.value;y(),n||m()},m=()=>{if(!l.value||!o.value)return;c.value=!0,l.value.style.display="block",o.value.setAttribute("aria-expanded","true"),l.value.querySelector('a, button, [tabindex="0"], input, textarea, select')?.focus(),b()},h=()=>{!l.value||!o.value||(c.value=!1,l.value.style.display="none",o.value.setAttribute("aria-expanded","false"))},y=()=>{const n=document.querySelectorAll(".krds-contextual-help .tooltip-popover"),d=document.querySelectorAll(".krds-contextual-help .tooltip-btn");n.forEach(r=>{r.style.display="none"}),d.forEach(r=>{r.setAttribute("aria-expanded","false")}),c.value=!1},b=()=>{if(!s.value||!l.value)return;const n=window.innerWidth<=768,d=s.value.querySelector(".tooltip-action");if(n){const u=getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0],D=d.getBoundingClientRect().left-parseInt(u),N=document.body.clientWidth-parseInt(u)*2;l.value.style.left=`-${D}px`,l.value.style.width=`${N}px`}else l.value.style.left="",l.value.style.right="",l.value.style.width="360px"},g=n=>{(n.key==="Escape"||n.key==="Esc")&&y()},w=n=>{n.target.closest(".tooltip-action")||y()},p=()=>{c.value&&b()};return e.onMounted(()=>{s.value&&(o.value&&o.value.setAttribute("aria-expanded","false"),l.value&&l.value.setAttribute("role","tooltip"),document.addEventListener("keydown",g),document.addEventListener("click",w),window.addEventListener("resize",p))}),e.onUnmounted(()=>{document.removeEventListener("keydown",g),document.removeEventListener("click",w),window.removeEventListener("resize",p)}),(n,d)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:s,class:e.normalizeClass(["krds-contextual-help",i.position])},[e.createElementVNode("div",kt,[e.createElementVNode("button",{ref_key:"tooltipBtnRef",ref:o,type:"button",class:"krds-btn medium icon tooltip-btn",onClick:f},[d[0]||(d[0]=e.createElementVNode("span",{class:"sr-only"},"도움말",-1)),i.helpIcon?(e.openBlock(),e.createElementBlock("i",bt)):(e.openBlock(),e.createElementBlock("i",St))],512),e.createElementVNode("div",{ref_key:"tooltipPopoverRef",ref:l,class:"tooltip-popover",role:"tooltip"},[e.createElementVNode("h4",Ct,e.toDisplayString(i.tooltipTitle),1),e.createElementVNode("div",Et,[e.renderSlot(n.$slots,"default")]),e.createElementVNode("button",{ref_key:"closeBtnRef",ref:a,type:"button",class:"krds-btn xsmall icon tooltip-close",onClick:h},[...d[1]||(d[1]=[e.createElementVNode("span",{class:"sr-only"},"닫기",-1),e.createElementVNode("i",{class:"svg-icon ico-modal-close"},null,-1)])],512)],512)])],2))}}),Vt={key:0,class:"coach-balloon"},wt={class:"coach-tit"},Bt={class:"desc"},vt={class:"coach-controls"},Nt={class:"num"},Kt={class:"btn-wrap"},Se=e.defineComponent({__name:"KrdsCoachMark",props:{coachMarkClass:{default:""},stepsData:{},activeStep:{},modelValue:{default:null},class:{},style:{},id:{}},emits:["update:modelValue","close"],setup(t,{emit:i}){const s=t,o=e.computed(()=>{const m=s.activeStep-1;return s.stepsData&&m>=0&&m<s.stepsData.length?s.stepsData[m]:null}),l=i,a=()=>{s.activeStep>1&&l("update:modelValue",s.activeStep-1)},c=()=>{s.activeStep<s.stepsData.length&&l("update:modelValue",s.activeStep+1)},f=()=>{l("close")};return(m,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["krds-coach-mark",t.coachMarkClass]),style:e.normalizeStyle(t.style)},[t.modelValue===t.activeStep&&o.value?(e.openBlock(),e.createElementBlock("div",Vt,[h[2]||(h[2]=e.createElementVNode("h5",{class:"sr-only"},"따라하기 가이드",-1)),e.createElementVNode("h6",wt,e.toDisplayString(t.activeStep)+"단계 : "+e.toDisplayString(o.value.title),1),e.createElementVNode("p",Bt,e.toDisplayString(o.value.description),1),e.createElementVNode("div",vt,[e.createElementVNode("div",Nt,[h[0]||(h[0]=e.createElementVNode("span",{class:"sr-only"},"현재 단계",-1)),e.createElementVNode("strong",null,e.toDisplayString(t.activeStep),1),h[1]||(h[1]=e.createElementVNode("span",{class:"sr-only"},"총 단계",-1)),e.createElementVNode("span",null,e.toDisplayString(t.stepsData.length),1)]),e.createElementVNode("div",Kt,[e.createElementVNode("button",{type:"button",class:"krds-btn small text",onClick:f},"그만보기"),t.activeStep!==1?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"krds-btn small text",onClick:a},"이전으로")):e.createCommentVNode("",!0),t.activeStep!==t.stepsData.length?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"krds-btn small tertiary",onClick:c},"다음으로")):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"coach-mark-content")],6))}}),Dt=["disabled","aria-labelledby"],xt=["id","aria-hidden"],_t={class:"sr-only"},Ce=e.defineComponent({__name:"KrdsTooltip",props:{type:{default:"default"},tooltipContent:{},vertical:{type:Boolean},box:{type:Boolean},disabled:{type:Boolean,default:!1},class:{},style:{},id:{}},setup(t){const i=t,s=e.ref(null),o=e.ref(null),l=e.ref(!1),a=e.ref({}),c=e.ref(`tooltip-popover-${Math.random().toString(36).substring(2,9)}`),f=e.ref(!1),m=e.computed(()=>{const u=["krds-btn","krds-tooltip"];return i.type==="default"?u.push("small","text"):i.type==="icon"?u.push("icon"):i.type==="button"&&u.push(""),!i.box&&i.vertical&&u.push("tooltip-vertical"),i.box&&!i.vertical&&u.push("tooltip-box"),u.join(" ")}),h=e.computed(()=>{const u=[];return i.box&&u.push("tooltip-box"),i.vertical&&u.push("tooltip-vertical"),l.value&&u.push("active"),u}),y=e.computed(()=>s.value?.querySelector("button")?.textContent?.trim()||""),b=()=>window.innerWidth<=768,g=()=>{if(!s.value||!o.value)return;const u=s.value.querySelector("button");if(!u)return;const C=12,{clientHeight:D,clientWidth:N}=o.value,{top:K,left:v,right:$,height:B,width:L}=u.getBoundingClientRect(),P=window.innerWidth/2,j=window.innerHeight/2;let M,_;const z=[];f.value||i.box||i.vertical?(K+B>j?(M=K-D-C,z.push("top")):(M=K+B+C,z.push("bottom")),v+L>P?(_=$-N,z.push("right"),window.innerWidth-(v+L)>N/2&&(_=v+(L-N)/2,z.splice(z.indexOf("right"),1))):(_=v+(L-N)/2,_<0&&(_=v,z.push("left")))):(M=K+(B-D)/2,v+L>P?(_=v-N-C,z.push("right")):_=$+C);const A=window.innerWidth<=420;a.value={top:`${M}px`,left:A?"50%":`${_}px`,transform:A?"translateX(-50%)":"none"},o.value&&(o.value.className=`krds-tooltip-popover ${z.join(" ")} ${h.value.join(" ")}`)},w=async()=>{i.disabled||!i.tooltipContent||(l.value=!0,await e.nextTick(),g())},p=()=>{l.value=!1,a.value={}},n=u=>{(u.key==="Escape"||u.key==="Esc")&&l.value&&p()},d=()=>{f.value=b(),l.value&&p()},r=()=>{l.value&&p()};return e.onMounted(()=>{f.value=b(),document.addEventListener("keydown",n),window.addEventListener("scroll",r),window.addEventListener("resize",d)}),e.onUnmounted(()=>{document.removeEventListener("keydown",n),window.removeEventListener("scroll",r),window.removeEventListener("resize",d)}),(u,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:s},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(m.value),disabled:t.disabled,"aria-labelledby":c.value,onMouseover:w,onMouseout:p,onFocusin:w,onFocusout:p},[e.renderSlot(u.$slots,"default")],42,Dt),e.withDirectives(e.createElementVNode("div",{id:c.value,ref_key:"popoverRef",ref:o,class:e.normalizeClass(["krds-tooltip-popover",h.value]),style:e.normalizeStyle(a.value),"aria-hidden":!l.value,role:"tooltip"},[e.createElementVNode("span",_t,e.toDisplayString(y.value),1),e.createTextVNode(" "+e.toDisplayString(t.tooltipContent),1)],14,xt),[[e.vShow,l.value]])],512))}}),zt=["aria-expanded"],$t={class:"drop-in"},Lt={key:0,class:"drop-top"},It={key:1,class:"drop-list"},Tt=["lang","aria-selected","onClick"],Mt={class:"sr-only"},Rt={key:2,class:"drop-list"},Ft=["href","lang"],Ee=e.defineComponent({__name:"KrdsLanguageSwitcher",props:{languageList:{},modelValue:{default:""},type:{default:"default"},dropPosition:{default:"center"},class:{},style:{},id:{}},emits:["update:modelValue","close"],setup(t,{emit:i}){const s=t,o=i,l=e.ref(!1),a=e.ref(),c=e.ref(),f=()=>{l.value=!l.value,l.value&&a.value&&y()},m=()=>{l.value=!1},h=n=>{o("update:modelValue",n),m(),o("close"),c.value?.focus()},y=()=>{if(!a.value)return;const n=a.value.querySelector(".drop-menu");if(!n)return;const d=n.getBoundingClientRect(),r=window.innerWidth;a.value.classList.remove("drop-left","drop-right"),d.left<0?a.value.classList.add("drop-left"):r<d.left+d.width&&a.value.classList.add("drop-right")},b=n=>{n.key==="Escape"&&(m(),c.value?.focus())},g=n=>{a.value?.contains(n.target)||m()},w=n=>{a.value?.contains(n.relatedTarget)||m()},p=n=>{if(!a.value)return;a.value.querySelectorAll(".drop-list .item-link").forEach(u=>{u.style.position="relative",u.style.zIndex="0"});const r=n.target;r.style.zIndex="1"};return e.watch(l,n=>{n?(document.addEventListener("keydown",b),document.addEventListener("click",g)):(document.removeEventListener("keydown",b),document.removeEventListener("click",g))}),e.onUnmounted(()=>{document.removeEventListener("keydown",b),document.removeEventListener("click",g)}),(n,d)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:a,class:e.normalizeClass(["krds-drop-wrap krds-language",{active:l.value,"drop-left":s.dropPosition==="left","drop-right":s.dropPosition==="right"}]),onFocusout:w},[e.createElementVNode("button",{ref_key:"buttonRef",ref:c,type:"button",class:e.normalizeClass(["krds-btn small text drop-btn",{active:l.value}]),"aria-expanded":l.value,onClick:f},[d[0]||(d[0]=e.createElementVNode("i",{class:"svg-icon ico-global"},null,-1)),e.renderSlot(n.$slots,"default"),d[1]||(d[1]=e.createElementVNode("i",{class:"svg-icon ico-toggle"},null,-1))],10,zt),e.createElementVNode("div",{class:"drop-menu",style:e.normalizeStyle({display:l.value?"block":"none"})},[e.createElementVNode("div",$t,[n.$slots["prev-item"]?(e.openBlock(),e.createElementBlock("div",Lt,[e.renderSlot(n.$slots,"prev-item")])):e.createCommentVNode("",!0),s.type==="default"?(e.openBlock(),e.createElementBlock("ul",It,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.languageList,r=>(e.openBlock(),e.createElementBlock("li",{key:r.code},[e.createElementVNode("a",{href:"#",class:e.normalizeClass(["item-link",{active:s.modelValue===r.code}]),lang:r.code,"aria-selected":s.modelValue===r.code,onClick:e.withModifiers(u=>h(r.code),["prevent"]),onFocus:p},[e.createTextVNode(e.toDisplayString(r.name)+" ",1),e.createElementVNode("span",Mt,e.toDisplayString(s.modelValue===r.code?"선택됨":""),1)],42,Tt)]))),128))])):s.type==="external"?(e.openBlock(),e.createElementBlock("ul",Rt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.languageList,r=>(e.openBlock(),e.createElementBlock("li",{key:r.code},[e.createElementVNode("a",{href:r.url||"#",class:"item-link",lang:r.code,target:"_blank",title:"새 창 열림",onFocus:p},[e.createTextVNode(e.toDisplayString(r.name)+" ",1),d[2]||(d[2]=e.createElementVNode("i",{class:"svg-icon ico-go"},null,-1))],40,Ft)]))),128))])):e.createCommentVNode("",!0)])],4)],34))}}),Pt={class:"drop-in"},At={class:"drop-list"},Ot=["data-adjust-scale","onClick"],qt={class:"drop-bottom"},Ve=e.defineComponent({__name:"KrdsResize",emits:["update:modelValue","close"],setup(t,{emit:i}){const s=i,o=e.ref(!1),l=e.ref(),a=e.ref(),c=e.ref("md"),f=[{key:"sm",label:"작게",zoom:"0.9"},{key:"md",label:"보통",zoom:"1"},{key:"lg",label:"조금 크게",zoom:"1.1"},{key:"xlg",label:"크게",zoom:"1.3"},{key:"xxlg",label:"가장 크게",zoom:"1.5"}],m=()=>{o.value=!o.value,o.value&&l.value&&g()},h=()=>{o.value=!1},y=r=>{h(),s("close"),a.value?.focus(),c.value=r.key,document.body.style.zoom=r?.zoom},b=()=>{const r=f.find(u=>u.key==="md");r&&y(r)},g=()=>{if(!l.value)return;const r=l.value.querySelector(".drop-menu");if(!r)return;const u=r.getBoundingClientRect(),C=window.innerWidth;l.value.classList.remove("drop-left","drop-right"),u.left<0?l.value.classList.add("drop-left"):C<u.left+u.width&&l.value.classList.add("drop-right")},w=r=>{r.key==="Escape"&&(h(),a.value?.focus())},p=r=>{l.value?.contains(r.target)||h()},n=r=>{l.value?.contains(r.relatedTarget)||h()},d=r=>{if(!l.value)return;l.value.querySelectorAll(".drop-list .item-link").forEach(D=>{D.style.position="relative",D.style.zIndex="0"});const C=r.target;C.style.zIndex="1"};return e.watch(o,r=>{r?(document.addEventListener("keydown",w),document.addEventListener("click",p)):(document.removeEventListener("keydown",w),document.removeEventListener("click",p))}),e.onUnmounted(()=>{document.removeEventListener("keydown",w),document.removeEventListener("click",p)}),(r,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropdownRef",ref:l,class:"krds-drop-wrap krds-resize","data-adjust":"scale",onFocusout:n},[e.createElementVNode("button",{ref_key:"buttonRef",ref:a,type:"button",class:"krds-btn small text drop-btn",onClick:m},[...u[0]||(u[0]=[e.createTextVNode(" 화면크기 ",-1),e.createElementVNode("i",{class:"svg-icon ico-toggle"},null,-1)])],512),e.createElementVNode("div",{class:"drop-menu",style:e.normalizeStyle({display:o.value?"block":"none"})},[e.createElementVNode("div",Pt,[e.createElementVNode("ul",At,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(f,C=>e.createElementVNode("li",{key:C.key},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["item-link",[C.key,C.key===c.value?"active":""]]),"data-adjust-scale":C.key,onClick:e.withModifiers(D=>y(C),["prevent"]),onFocus:d},e.toDisplayString(C.label),43,Ot)])),64))]),e.createElementVNode("div",qt,[e.createElementVNode("button",{type:"button",class:"krds-btn medium text","data-adjust-scale":"md",onClick:e.withModifiers(b,["prevent"]),onFocus:d},[...u[1]||(u[1]=[e.createElementVNode("i",{class:"svg-icon ico-reset"},null,-1),e.createTextVNode(" 초기화 ",-1)])],32)])])],4)],544))}}),we=e.defineComponent({name:"KrdsModal",props:{modelValue:{type:Boolean,default:!1},modalId:{type:String,default:void 0},backdrop:{type:Boolean,default:!0},size:{type:String,default:"medium"},full:{type:Boolean,default:!1},bottomSheet:{type:Boolean,default:!1},persistent:{type:Boolean,default:!1}},emits:["update:modelValue"],slots:Object,setup(t,{slots:i,emit:s}){const o=e.getCurrentInstance()?.uid,l=e.computed(()=>t.modalId??`krds-modal-${o}`),a=e.computed({get:()=>t.modelValue,set:d=>s("update:modelValue",d)}),c=e.computed(()=>`tit_${l.value}`),f=e.computed(()=>({small:"modal-sm",medium:"modal-md",large:"modal-lg"})[t.size]),m=()=>{a.value=!1};let h="",y=null;const b=e.ref(null),g=d=>Array.from(d.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(u=>!u.hasAttribute("disabled")&&u.getAttribute("tabindex")!=="-1"),w=d=>{if(!b.value||d.key!=="Tab")return;const r=g(b.value);if(r.length===0){d.preventDefault();return}const u=r[0],C=r[r.length-1];d.shiftKey&&document.activeElement===u?(d.preventDefault(),C.focus()):!d.shiftKey&&document.activeElement===C&&(d.preventDefault(),u.focus())},p=d=>{d.key==="Escape"&&!t.persistent&&m()},n=()=>{document.body.style.overflow=h,document.removeEventListener("keydown",w),document.removeEventListener("keydown",p),y&&(y.focus(),y=null),b.value=null};return e.watch(()=>t.modelValue,async d=>{if(d){h=document.body.style.overflow,document.body.style.overflow="hidden",y=document.activeElement,await e.nextTick();const r=document.getElementById(l.value);if(r){b.value=r;const u=r.querySelector(".modal-conts");u&&(u.setAttribute("tabindex","-1"),u.focus()),document.addEventListener("keydown",w),document.addEventListener("keydown",p)}}else n()},{immediate:!0}),e.onBeforeUnmount(()=>{t.modelValue&&n()}),()=>{if(!a.value)return null;const d={id:l.value,class:"krds-modal fade in shown",role:"dialog","aria-modal":!0,"aria-labelledby":c.value};return t.full?d["data-type"]="full":t.bottomSheet&&(d["data-type"]="bottom-sheet"),e.h(e.Teleport,{to:"body"},e.h("section",d,[e.h("div",{class:`modal-dialog ${f.value}`},[e.h("div",{class:"modal-content"},[i.title?e.h("div",{class:"modal-header"},[e.h("h2",{id:c.value,class:"modal-title"},i.title())]):null,e.h("div",{class:"modal-conts"},[e.h("div",{class:"conts-area"},i.default?.())]),i.footer?e.h("div",{class:"modal-btn btn-wrap"},i.footer()):null,e.h("button",{type:"button",class:"krds-btn medium icon btn-close close-modal",onClick:m},[e.h("span",{class:"sr-only"},"닫기"),e.h("i",{class:"svg-icon ico-popup-close"})])].filter(Boolean))]),e.h("div",{class:t.backdrop?"modal-back in":"modal-back",onClick:t.persistent?void 0:m})]))}}}),Be=Object.freeze(Object.defineProperty({__proto__:null,KrdsBadge:ae,KrdsBreadcrumb:he,KrdsButton:O,KrdsButtonGroup:Y,KrdsCheckArea:ce,KrdsCheckbox:de,KrdsCoachMark:Se,KrdsContextualHelp:be,KrdsDateInput:ee,KrdsFileUpload:ne,KrdsFormGroup:Z,KrdsFormHint:Q,KrdsFormLabel:J,KrdsIcon:G,KrdsInPageNavigation:ye,KrdsInput:X,KrdsLanguageSwitcher:Ee,KrdsLink:U,KrdsMasthead:ie,KrdsModal:we,KrdsPagination:ge,KrdsPanel:ke,KrdsRadio:ue,KrdsResize:Ve,KrdsSelect:le,KrdsSkipLink:pe,KrdsSpinner:q,KrdsStep:me,KrdsStepIndicator:fe,KrdsTag:oe,KrdsTagGroup:se,KrdsTextarea:te,KrdsToggleSwitch:re,KrdsTooltip:Ce},Symbol.toStringTag,{value:"Module"})),H={mounted(t,i){i.value!==!1&&t.classList.add("sr-only")},updated(t,i){i.value===!1?t.classList.remove("sr-only"):t.classList.add("sr-only")},unmounted(t){t.classList.remove("sr-only")}},ve={"sr-only":H},Ne=t=>{t.directive("sr-only",H)},Ke=Object.freeze(Object.defineProperty({__proto__:null,default:ve,directives:ve,installDirectives:Ne,vSrOnly:H},Symbol.toStringTag,{value:"Module"})),Ht={install(t,i={}){t.provide("krds:config",i);const s=i.components||Object.keys(Be);s.forEach(o=>{const l=Be[o];l&&t.component(o,l)}),typeof Ke=="object"&&Ke!==null&&Ne(t),t.config.globalProperties.$krds={version:"__VERSION__"},process.env.NODE_ENV!=="production"&&console.log(`[KRDS Vue] v__VERSION__ 설치 완료 - 컴포넌트: ${s.length}개`)}},jt="__VERSION__";k.KrdsBadge=ae,k.KrdsBreadcrumb=he,k.KrdsButton=O,k.KrdsButtonGroup=Y,k.KrdsCheckArea=ce,k.KrdsCheckbox=de,k.KrdsCoachMark=Se,k.KrdsContextualHelp=be,k.KrdsDateInput=ee,k.KrdsFileUpload=ne,k.KrdsFormGroup=Z,k.KrdsFormHint=Q,k.KrdsFormLabel=J,k.KrdsIcon=G,k.KrdsInPageNavigation=ye,k.KrdsInput=X,k.KrdsLanguageSwitcher=Ee,k.KrdsLink=U,k.KrdsMasthead=ie,k.KrdsModal=we,k.KrdsPagination=ge,k.KrdsPanel=ke,k.KrdsRadio=ue,k.KrdsResize=Ve,k.KrdsSelect=le,k.KrdsSkipLink=pe,k.KrdsSpinner=q,k.KrdsStep=me,k.KrdsStepIndicator=fe,k.KrdsTag=oe,k.KrdsTagGroup=se,k.KrdsTextarea=te,k.KrdsToggleSwitch=re,k.KrdsTooltip=Ce,k.classNames=F,k.default=Ht,k.generateId=R,k.generateUid=ot,k.version=jt,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
2
2
|
//# sourceMappingURL=krds-vue.umd.js.map
|