@krds.ui/vue 0.0.17 → 0.0.18
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 +2 -1
- package/dist/krds-vue.es.js +303 -306
- package/dist/krds-vue.es.js.map +1 -1
- package/package.json +8 -8
package/dist/krds-vue.es.js
CHANGED
|
@@ -126,16 +126,16 @@ var be = Object.defineProperty, Je = (e, a) => {
|
|
|
126
126
|
emits: { click: (e) => !0 },
|
|
127
127
|
setup(e, { emit: a, slots: r }) {
|
|
128
128
|
const l = b(() => {
|
|
129
|
-
const
|
|
130
|
-
return e.size &&
|
|
129
|
+
const d = ["krds-btn"];
|
|
130
|
+
return e.size && d.push(e.size), e.link && d.push("link"), e.basic && d.push("basic"), e.pure && d.push("pure"), e.class && d.push(e.class), d;
|
|
131
131
|
}), n = b(() => {
|
|
132
|
-
const
|
|
132
|
+
const d = {
|
|
133
133
|
href: e.href,
|
|
134
134
|
class: l.value
|
|
135
135
|
};
|
|
136
|
-
return e.target && (
|
|
137
|
-
}), s = (
|
|
138
|
-
a("click",
|
|
136
|
+
return e.target && (d.target = e.target), e.title && (d.title = e.title), e.target === "_blank" && (d.rel = "noopener noreferrer"), d;
|
|
137
|
+
}), s = (d) => {
|
|
138
|
+
a("click", d);
|
|
139
139
|
};
|
|
140
140
|
return () => t("a", {
|
|
141
141
|
...n.value,
|
|
@@ -253,11 +253,11 @@ var be = Object.defineProperty, Je = (e, a) => {
|
|
|
253
253
|
const S = ["krds-input"];
|
|
254
254
|
return e.size && S.push(e.size), e.class && S.push(e.class), S;
|
|
255
255
|
}), n = (S) => {
|
|
256
|
-
const
|
|
257
|
-
a("update:modelValue", e.type === "number" ? Number(
|
|
256
|
+
const $ = S.target;
|
|
257
|
+
a("update:modelValue", e.type === "number" ? Number($.value) : $.value), a("input", S);
|
|
258
258
|
}, s = (S) => {
|
|
259
259
|
a("change", S);
|
|
260
|
-
},
|
|
260
|
+
}, d = (S) => {
|
|
261
261
|
a("focus", S);
|
|
262
262
|
}, h = (S) => {
|
|
263
263
|
a("blur", S);
|
|
@@ -280,7 +280,7 @@ var be = Object.defineProperty, Je = (e, a) => {
|
|
|
280
280
|
autofocus: e.autofocus,
|
|
281
281
|
onInput: n,
|
|
282
282
|
onChange: s,
|
|
283
|
-
onFocus:
|
|
283
|
+
onFocus: d,
|
|
284
284
|
onBlur: h,
|
|
285
285
|
onKeydown: v,
|
|
286
286
|
onKeyup: w
|
|
@@ -405,51 +405,51 @@ var be = Object.defineProperty, Je = (e, a) => {
|
|
|
405
405
|
}
|
|
406
406
|
}), dt = ut;
|
|
407
407
|
function ct(e, a) {
|
|
408
|
-
const r = /* @__PURE__ */ new Date(), l = D(e || r.getFullYear()), n = D(a || r.getMonth() + 1), s = D(null),
|
|
408
|
+
const r = /* @__PURE__ */ new Date(), l = D(e || r.getFullYear()), n = D(a || r.getMonth() + 1), s = D(null), d = D(null), h = D(null), v = b(() => {
|
|
409
409
|
const i = r.getFullYear(), g = [];
|
|
410
410
|
for (let m = i - 10; m <= i + 10; m++) g.push(m);
|
|
411
411
|
return g;
|
|
412
412
|
}), w = b(() => Array.from({ length: 12 }, (i, g) => g + 1)), c = () => {
|
|
413
|
-
s.value = null,
|
|
413
|
+
s.value = null, d.value = null;
|
|
414
414
|
}, B = () => {
|
|
415
415
|
n.value === 1 ? (n.value = 12, l.value -= 1) : n.value -= 1;
|
|
416
416
|
}, S = () => {
|
|
417
417
|
n.value === 12 ? (n.value = 1, l.value += 1) : n.value += 1;
|
|
418
|
-
},
|
|
418
|
+
}, $ = (i, g = !1) => {
|
|
419
419
|
if (g)
|
|
420
|
-
s.value = i,
|
|
421
|
-
else if (!s.value || s.value &&
|
|
422
|
-
s.value = i,
|
|
420
|
+
s.value = i, d.value = i;
|
|
421
|
+
else if (!s.value || s.value && d.value)
|
|
422
|
+
s.value = i, d.value = null;
|
|
423
423
|
else {
|
|
424
424
|
const m = new Date(s.value.replace(/\./g, "-"));
|
|
425
|
-
new Date(i.replace(/\./g, "-")) < m ? (s.value = i,
|
|
425
|
+
new Date(i.replace(/\./g, "-")) < m ? (s.value = i, d.value = null) : d.value = i;
|
|
426
426
|
}
|
|
427
427
|
};
|
|
428
428
|
return {
|
|
429
429
|
currentYear: l,
|
|
430
430
|
currentMonth: n,
|
|
431
431
|
selectedStartDate: s,
|
|
432
|
-
selectedEndDate:
|
|
432
|
+
selectedEndDate: d,
|
|
433
433
|
activeDateSelector: h,
|
|
434
434
|
yearOptions: v,
|
|
435
435
|
monthOptions: w,
|
|
436
436
|
clearDateSelection: c,
|
|
437
437
|
prevMonth: B,
|
|
438
438
|
nextMonth: S,
|
|
439
|
-
handleDateSelection:
|
|
439
|
+
handleDateSelection: $,
|
|
440
440
|
selectToday: () => {
|
|
441
441
|
const i = `${r.getFullYear()}.${String(r.getMonth() + 1).padStart(2, "0")}.${String(r.getDate()).padStart(2, "0")}`;
|
|
442
|
-
|
|
442
|
+
$(i, !0);
|
|
443
443
|
},
|
|
444
444
|
isDateInSelectedRange: (i) => {
|
|
445
|
-
if (!s.value || !
|
|
445
|
+
if (!s.value || !d.value) return {
|
|
446
446
|
isInRange: !1,
|
|
447
447
|
isStart: !1,
|
|
448
448
|
isEnd: !1
|
|
449
449
|
};
|
|
450
|
-
const g = new Date(i.replace(/\./g, "-")), m = new Date(s.value.replace(/\./g, "-")),
|
|
450
|
+
const g = new Date(i.replace(/\./g, "-")), m = new Date(s.value.replace(/\./g, "-")), x = new Date(d.value.replace(/\./g, "-")), C = i === s.value, E = i === d.value;
|
|
451
451
|
return {
|
|
452
|
-
isInRange: g >= m && g <=
|
|
452
|
+
isInRange: g >= m && g <= x,
|
|
453
453
|
isStart: C,
|
|
454
454
|
isEnd: E
|
|
455
455
|
};
|
|
@@ -458,7 +458,7 @@ function ct(e, a) {
|
|
|
458
458
|
}
|
|
459
459
|
function ft(e, a, r = {}) {
|
|
460
460
|
let l = null;
|
|
461
|
-
const { ignore: n, event: s = "click" } = typeof r == "string" ? { ignore: r } : r,
|
|
461
|
+
const { ignore: n, event: s = "click" } = typeof r == "string" ? { ignore: r } : r, d = () => {
|
|
462
462
|
l = (v) => {
|
|
463
463
|
const w = v.target;
|
|
464
464
|
e.value?.contains(w) || n && w.closest(n) || a();
|
|
@@ -470,11 +470,11 @@ function ft(e, a, r = {}) {
|
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
472
|
return ie(() => {
|
|
473
|
-
|
|
473
|
+
d();
|
|
474
474
|
}), fe(() => {
|
|
475
475
|
h();
|
|
476
476
|
}), {
|
|
477
|
-
setupGlobalListeners:
|
|
477
|
+
setupGlobalListeners: d,
|
|
478
478
|
removeGlobalListeners: h
|
|
479
479
|
};
|
|
480
480
|
}
|
|
@@ -554,7 +554,7 @@ var vt = [
|
|
|
554
554
|
blur: (e) => !0
|
|
555
555
|
},
|
|
556
556
|
setup(e, { emit: a }) {
|
|
557
|
-
const r = D(), l = D(), n = D(!1), s = D(null), { currentYear:
|
|
557
|
+
const r = D(), l = D(), n = D(!1), s = D(null), { currentYear: d, currentMonth: h, selectedStartDate: v, selectedEndDate: w, yearOptions: c, monthOptions: B, prevMonth: S, nextMonth: $, handleDateSelection: f, selectToday: o, isDateInSelectedRange: i } = ct(e.initialYear, e.initialMonth), g = () => {
|
|
558
558
|
n.value && l.value?.focus(), n.value = !1, s.value = null;
|
|
559
559
|
};
|
|
560
560
|
ft(r, g, ".calendar-conts");
|
|
@@ -565,11 +565,11 @@ var vt = [
|
|
|
565
565
|
"cal"
|
|
566
566
|
];
|
|
567
567
|
return e.size && L.push(e.size), e.class && L.push(e.class), L;
|
|
568
|
-
}),
|
|
568
|
+
}), x = b(() => ["form-conts", "calendar-conts"]), C = b(() => ({
|
|
569
569
|
"krds-calendar-area": !0,
|
|
570
570
|
active: n.value
|
|
571
571
|
})), E = b(() => {
|
|
572
|
-
const L =
|
|
572
|
+
const L = d.value, R = h.value, Y = new Date(L, R - 1, 1), V = new Date(Y);
|
|
573
573
|
V.setDate(V.getDate() - Y.getDay());
|
|
574
574
|
const F = [], z = new Date(V);
|
|
575
575
|
for (let N = 0; N < 6; N++) {
|
|
@@ -625,7 +625,7 @@ var vt = [
|
|
|
625
625
|
]), p = (L) => {
|
|
626
626
|
s.value === L ? s.value = null : s.value = L;
|
|
627
627
|
}, A = (L) => {
|
|
628
|
-
|
|
628
|
+
d.value = L, s.value = null;
|
|
629
629
|
}, I = (L) => {
|
|
630
630
|
h.value = L, s.value = null;
|
|
631
631
|
}, O = () => {
|
|
@@ -648,7 +648,7 @@ var vt = [
|
|
|
648
648
|
}, ae = (L) => {
|
|
649
649
|
a("blur", L);
|
|
650
650
|
}, Q = (L) => {
|
|
651
|
-
const R = L === "year", Y = R ? c.value : B.value, V = R ?
|
|
651
|
+
const R = L === "year", Y = R ? c.value : B.value, V = R ? d.value : h.value, F = (z) => R ? `${z}년` : `${z.toString().padStart(2, "0")}월`;
|
|
652
652
|
return t("div", { class: "calendar-drop-down" }, [t("button", {
|
|
653
653
|
type: "button",
|
|
654
654
|
class: `btn-cal-switch ${L}`,
|
|
@@ -661,7 +661,7 @@ var vt = [
|
|
|
661
661
|
onClick: () => R ? A(z) : I(z)
|
|
662
662
|
}, F(z))])))]), [[pe, s.value === L]])]);
|
|
663
663
|
}, ne = () => t("table", { class: "calendar-tbl" }, [
|
|
664
|
-
t("caption", null, `${
|
|
664
|
+
t("caption", null, `${d.value}년 ${h.value.toString().padStart(2, "0")}월`),
|
|
665
665
|
t("thead", null, [t("tr", null, vt.map((L) => t("th", null, L)))]),
|
|
666
666
|
t("tbody", null, E.value.map((L, R) => t("tr", { key: R }, L.map((Y, V) => t("td", {
|
|
667
667
|
key: V,
|
|
@@ -674,7 +674,7 @@ var vt = [
|
|
|
674
674
|
onClick: () => f(Y.dateString)
|
|
675
675
|
}, [t("span", null, String(Y.day))])])))))
|
|
676
676
|
]);
|
|
677
|
-
return () => t("div", { class: "form-conts" }, [t("div", { class:
|
|
677
|
+
return () => t("div", { class: "form-conts" }, [t("div", { class: x.value }, [t("div", { class: "calendar-input" }, [t("input", {
|
|
678
678
|
id: e.id,
|
|
679
679
|
name: e.name,
|
|
680
680
|
class: m.value,
|
|
@@ -715,7 +715,7 @@ var vt = [
|
|
|
715
715
|
t("button", {
|
|
716
716
|
type: "button",
|
|
717
717
|
class: "btn-cal-move next",
|
|
718
|
-
onClick:
|
|
718
|
+
onClick: $
|
|
719
719
|
}, [t("span", { class: "sr-only" }, "다음 달")])
|
|
720
720
|
]),
|
|
721
721
|
t("div", { class: "calendar-body" }, [t("div", { class: "calendar-table-wrap" }, [ne()])]),
|
|
@@ -820,7 +820,7 @@ var vt = [
|
|
|
820
820
|
}), s = (o) => {
|
|
821
821
|
const i = o.target.value;
|
|
822
822
|
r.value = i.length, a("update:modelValue", i), a("input", o);
|
|
823
|
-
},
|
|
823
|
+
}, d = (o) => {
|
|
824
824
|
a("change", o);
|
|
825
825
|
}, h = (o) => {
|
|
826
826
|
a("focus", o);
|
|
@@ -845,20 +845,20 @@ var vt = [
|
|
|
845
845
|
rows: e.rows,
|
|
846
846
|
cols: e.cols,
|
|
847
847
|
onInput: s,
|
|
848
|
-
onChange:
|
|
848
|
+
onChange: d,
|
|
849
849
|
onFocus: h,
|
|
850
850
|
onBlur: v,
|
|
851
851
|
onKeydown: w,
|
|
852
852
|
onKeyup: c
|
|
853
853
|
};
|
|
854
854
|
return e.maxlength !== void 0 && (o.maxlength = e.maxlength), e.minlength !== void 0 && (o.minlength = e.minlength), o;
|
|
855
|
-
}), S = b(() => ["form-conts"]),
|
|
855
|
+
}), S = b(() => ["form-conts"]), $ = b(() => ["textarea-wrap"]), f = b(() => e.showCount ? {
|
|
856
856
|
current: r.value,
|
|
857
857
|
max: e.maxlength || ""
|
|
858
858
|
} : null);
|
|
859
859
|
return () => {
|
|
860
860
|
const o = [t("textarea", B.value)];
|
|
861
|
-
return f.value && o.push(t("p", { class: "textarea-count" }, [t("span", { class: "count-now" }, f.value.current), t("span", { class: "count-total" }, f.value.max ? `/${f.value.max}` : "")])), t("div", { class: S.value }, [t("div", { class:
|
|
861
|
+
return f.value && o.push(t("p", { class: "textarea-count" }, [t("span", { class: "count-now" }, f.value.current), t("span", { class: "count-total" }, f.value.max ? `/${f.value.max}` : "")])), t("div", { class: S.value }, [t("div", { class: $.value }, o)]);
|
|
862
862
|
};
|
|
863
863
|
}
|
|
864
864
|
}), yt = ht, mt = M({
|
|
@@ -931,7 +931,7 @@ var vt = [
|
|
|
931
931
|
a("update:modelValue", B.value === "" ? null : B.value);
|
|
932
932
|
}, s = (c) => {
|
|
933
933
|
a("focus", c);
|
|
934
|
-
},
|
|
934
|
+
}, d = (c) => {
|
|
935
935
|
a("blur", c);
|
|
936
936
|
}, h = b(() => ({
|
|
937
937
|
class: l.value,
|
|
@@ -942,7 +942,7 @@ var vt = [
|
|
|
942
942
|
disabled: e.disabled || e.readonly,
|
|
943
943
|
onChange: n,
|
|
944
944
|
onFocus: s,
|
|
945
|
-
onBlur:
|
|
945
|
+
onBlur: d
|
|
946
946
|
})), v = b(() => {
|
|
947
947
|
const c = ["form-conts"];
|
|
948
948
|
return e.state !== "default" && c.push(`is-${e.state}`), c;
|
|
@@ -1067,17 +1067,17 @@ var vt = [
|
|
|
1067
1067
|
preview: (e) => !0
|
|
1068
1068
|
},
|
|
1069
1069
|
setup(e, { emit: a }) {
|
|
1070
|
-
const r = D(!1), l = D(null), n = e.id ? `${e.id}-input` : `krds-file-upload-${++kt}`, s = (p) => p < 1024 ? `${p}B` : p < 1048576 ? `${Math.round(p / 1024)}KB` : `${(p / 1048576).toFixed(1)}MB`,
|
|
1070
|
+
const r = D(!1), l = D(null), n = e.id ? `${e.id}-input` : `krds-file-upload-${++kt}`, s = (p) => p < 1024 ? `${p}B` : p < 1048576 ? `${Math.round(p / 1024)}KB` : `${(p / 1048576).toFixed(1)}MB`, d = (p) => {
|
|
1071
1071
|
const A = p.split(".");
|
|
1072
1072
|
return A.length > 1 ? A.pop().toLowerCase() : "";
|
|
1073
1073
|
}, h = (p) => {
|
|
1074
|
-
const A =
|
|
1074
|
+
const A = d(p.name), I = A ? p.name.slice(0, -(A.length + 1)) : p.name;
|
|
1075
1075
|
return A ? `${I} [${A}, ${s(p.size)}]` : `${p.name} [${s(p.size)}]`;
|
|
1076
1076
|
}, v = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, w = (p) => {
|
|
1077
1077
|
if (e.maxFileSize && p.size > e.maxFileSize) return `등록 가능한 파일 용량을 초과하였습니다.
|
|
1078
1078
|
${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
1079
1079
|
if (e.accept) {
|
|
1080
|
-
const A = e.accept.split(",").map((H) => H.trim().toLowerCase()), I = `.${
|
|
1080
|
+
const A = e.accept.split(",").map((H) => H.trim().toLowerCase()), I = `.${d(p.name)}`, O = p.type;
|
|
1081
1081
|
if (!A.some((H) => H.startsWith(".") ? I === H : H.endsWith("/*") ? O.startsWith(H.replace("/*", "/")) : O === H)) return "허용되지 않는 파일 형식입니다.";
|
|
1082
1082
|
}
|
|
1083
1083
|
return null;
|
|
@@ -1104,7 +1104,7 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1104
1104
|
A.files?.length && (c(A.files), A.value = "");
|
|
1105
1105
|
}, S = (p) => {
|
|
1106
1106
|
e.disabled || e.readonly || !e.dragAndDrop || (p.preventDefault(), r.value = !0);
|
|
1107
|
-
},
|
|
1107
|
+
}, $ = () => {
|
|
1108
1108
|
r.value = !1;
|
|
1109
1109
|
}, f = (p) => {
|
|
1110
1110
|
p.preventDefault(), r.value = !1, !(e.disabled || e.readonly || !e.dragAndDrop) && p.dataTransfer?.files && c(p.dataTransfer.files);
|
|
@@ -1117,10 +1117,10 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1117
1117
|
}, m = b(() => {
|
|
1118
1118
|
const p = ["krds-file-upload", "line"];
|
|
1119
1119
|
return e.class && p.push(e.class), p;
|
|
1120
|
-
}),
|
|
1120
|
+
}), x = () => t("div", { class: "file-head" }, [t("h3", { class: "tit" }, e.title), t("div", null, [t("p", null, e.description)])]), C = () => t("div", {
|
|
1121
1121
|
class: "file-upload",
|
|
1122
1122
|
onDragover: S,
|
|
1123
|
-
onDragleave:
|
|
1123
|
+
onDragleave: $,
|
|
1124
1124
|
onDrop: f
|
|
1125
1125
|
}, [t("p", { class: "txt" }, e.placeholder), t("div", { class: "file-upload-btn-wrap" }, [t("input", {
|
|
1126
1126
|
ref: l,
|
|
@@ -1178,7 +1178,7 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1178
1178
|
}, ["전체 파일 삭제", t("i", { class: "svg-icon ico-angle right" })])])), t("div", { class: "file-list" }, I);
|
|
1179
1179
|
};
|
|
1180
1180
|
return () => {
|
|
1181
|
-
const p = [
|
|
1181
|
+
const p = [x()];
|
|
1182
1182
|
e.readonly || p.push(C());
|
|
1183
1183
|
const A = e.modelValue || [];
|
|
1184
1184
|
return A.length > 0 && p.push(_(A)), t("div", {
|
|
@@ -1255,25 +1255,25 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1255
1255
|
emits: { remove: (e) => !0 },
|
|
1256
1256
|
setup(e, { emit: a, slots: r }) {
|
|
1257
1257
|
const l = b(() => {
|
|
1258
|
-
const
|
|
1259
|
-
return e.link &&
|
|
1260
|
-
}), n = (
|
|
1261
|
-
a("remove",
|
|
1258
|
+
const d = ["krds-btn-tag"];
|
|
1259
|
+
return e.link && d.push("link"), e.class && d.push(e.class), d;
|
|
1260
|
+
}), n = (d) => {
|
|
1261
|
+
a("remove", d);
|
|
1262
1262
|
}, s = () => t("button", {
|
|
1263
1263
|
type: "button",
|
|
1264
1264
|
class: "btn-delete",
|
|
1265
1265
|
onClick: n
|
|
1266
1266
|
}, [t("span", { class: "sr-only" }, "삭제")]);
|
|
1267
1267
|
return () => {
|
|
1268
|
-
const
|
|
1269
|
-
if (h &&
|
|
1268
|
+
const d = [], h = r.default?.();
|
|
1269
|
+
if (h && d.push(h), e.link || d.push(s()), e.link) {
|
|
1270
1270
|
const v = {
|
|
1271
1271
|
href: e.href,
|
|
1272
1272
|
class: l.value
|
|
1273
1273
|
};
|
|
1274
|
-
return e.target && (v.target = e.target), e.rel && (v.rel = e.rel), t("a", v,
|
|
1274
|
+
return e.target && (v.target = e.target), e.rel && (v.rel = e.rel), t("a", v, d);
|
|
1275
1275
|
}
|
|
1276
|
-
return t("span", { class: l.value },
|
|
1276
|
+
return t("span", { class: l.value }, d);
|
|
1277
1277
|
};
|
|
1278
1278
|
}
|
|
1279
1279
|
}), $t = xt, Lt = M({
|
|
@@ -1371,7 +1371,7 @@ var _t = M({
|
|
|
1371
1371
|
change: (e) => !0
|
|
1372
1372
|
},
|
|
1373
1373
|
setup(e, { emit: a, attrs: r }) {
|
|
1374
|
-
const l = `toggle-switch-${oe()}`, n = b(() => e.modelValue), s = b(() => he("krds-form-toggle-switch", e.size, e.class)),
|
|
1374
|
+
const l = `toggle-switch-${oe()}`, n = b(() => e.modelValue), s = b(() => he("krds-form-toggle-switch", e.size, e.class)), d = (v) => {
|
|
1375
1375
|
if (e.disabled) return;
|
|
1376
1376
|
const w = v.target.checked;
|
|
1377
1377
|
a("update:modelValue", w), a("change", w);
|
|
@@ -1382,7 +1382,7 @@ var _t = M({
|
|
|
1382
1382
|
name: e.name,
|
|
1383
1383
|
checked: n.value,
|
|
1384
1384
|
disabled: e.disabled,
|
|
1385
|
-
onChange:
|
|
1385
|
+
onChange: d,
|
|
1386
1386
|
...r
|
|
1387
1387
|
}), t("label", { for: h.value }, [t("span", { class: "switch-toggle" }, [t("i")]), e.label || ""])]);
|
|
1388
1388
|
}
|
|
@@ -1436,7 +1436,7 @@ var _t = M({
|
|
|
1436
1436
|
emits: { "update:modelValue": (e) => !0 },
|
|
1437
1437
|
slots: Object,
|
|
1438
1438
|
setup(e, { emit: a, attrs: r, slots: l }) {
|
|
1439
|
-
const n = `checkbox-${oe()}`, s = b(() => e.modelValue),
|
|
1439
|
+
const n = `checkbox-${oe()}`, s = b(() => e.modelValue), d = b(() => {
|
|
1440
1440
|
const w = e.chip ? "krds-form-chip" : "krds-form-check";
|
|
1441
1441
|
return he(w, e.size, e.class);
|
|
1442
1442
|
}), h = (w) => {
|
|
@@ -1453,7 +1453,7 @@ var _t = M({
|
|
|
1453
1453
|
onChange: h,
|
|
1454
1454
|
...r
|
|
1455
1455
|
}), t("label", { for: v.value }, l.default?.())];
|
|
1456
|
-
return l.description && !e.chip && w.push(t("div", { class: "krds-form-check-cnt" }, t("p", { class: "krds-form-check-p" }, l.description()))), t("div", { class:
|
|
1456
|
+
return l.description && !e.chip && w.push(t("div", { class: "krds-form-check-cnt" }, t("p", { class: "krds-form-check-p" }, l.description()))), t("div", { class: d.value }, w);
|
|
1457
1457
|
};
|
|
1458
1458
|
}
|
|
1459
1459
|
}), zt = Pt, Ft = M({
|
|
@@ -1504,7 +1504,7 @@ var _t = M({
|
|
|
1504
1504
|
emits: { "update:modelValue": (e) => !0 },
|
|
1505
1505
|
slots: Object,
|
|
1506
1506
|
setup(e, { emit: a, attrs: r, slots: l }) {
|
|
1507
|
-
const n = `radio-${oe()}`, s = b(() => e.modelValue === e.value),
|
|
1507
|
+
const n = `radio-${oe()}`, s = b(() => e.modelValue === e.value), d = b(() => {
|
|
1508
1508
|
const c = e.chip ? "krds-form-chip" : "krds-form-check";
|
|
1509
1509
|
return he(c, e.size, e.class);
|
|
1510
1510
|
}), h = (c) => {
|
|
@@ -1521,7 +1521,7 @@ var _t = M({
|
|
|
1521
1521
|
onChange: h,
|
|
1522
1522
|
...r
|
|
1523
1523
|
}), t("label", { for: v.value }, l.default?.())];
|
|
1524
|
-
return l.description && !e.chip && c.push(t("div", { class: "krds-form-check-cnt" }, t("p", { class: "krds-form-check-p" }, l.description()))), t("div", { class:
|
|
1524
|
+
return l.description && !e.chip && c.push(t("div", { class: "krds-form-check-cnt" }, t("p", { class: "krds-form-check-p" }, l.description()))), t("div", { class: d.value }, c);
|
|
1525
1525
|
};
|
|
1526
1526
|
}
|
|
1527
1527
|
}), Rt = Ft, It = Le, Ht = M({
|
|
@@ -1546,11 +1546,11 @@ var _t = M({
|
|
|
1546
1546
|
return h < v ? "done" : h === v ? "active" : "pending";
|
|
1547
1547
|
}, n = D(0), s = () => {
|
|
1548
1548
|
n.value = 0;
|
|
1549
|
-
},
|
|
1549
|
+
}, d = () => n.value++;
|
|
1550
1550
|
return Qe("stepIndicator", {
|
|
1551
1551
|
activeStep: b(() => e.modelValue || 0),
|
|
1552
1552
|
getStepStatus: l,
|
|
1553
|
-
getNextStepIndex:
|
|
1553
|
+
getNextStepIndex: d,
|
|
1554
1554
|
resetStepIndex: s
|
|
1555
1555
|
}), () => (s(), t("ol", { class: r.value }, a.default?.()));
|
|
1556
1556
|
}
|
|
@@ -1576,7 +1576,7 @@ var _t = M({
|
|
|
1576
1576
|
},
|
|
1577
1577
|
emits: { click: (e, a) => !0 },
|
|
1578
1578
|
setup(e, { emit: a, slots: r }) {
|
|
1579
|
-
const l = Xe("stepIndicator"), n = l ? l.getNextStepIndex() : -1, s = b(() => e.status ? e.status : l && n >= 0 ? l.getStepStatus(n) : "pending"),
|
|
1579
|
+
const l = Xe("stepIndicator"), n = l ? l.getNextStepIndex() : -1, s = b(() => e.status ? e.status : l && n >= 0 ? l.getStepStatus(n) : "pending"), d = b(() => {
|
|
1580
1580
|
const v = [s.value];
|
|
1581
1581
|
return e.class && v.push(e.class), v;
|
|
1582
1582
|
}), h = (v) => {
|
|
@@ -1585,7 +1585,7 @@ var _t = M({
|
|
|
1585
1585
|
return () => {
|
|
1586
1586
|
const v = s.value === "active";
|
|
1587
1587
|
return t("li", {
|
|
1588
|
-
class:
|
|
1588
|
+
class: d.value,
|
|
1589
1589
|
onClick: h
|
|
1590
1590
|
}, [t("span", [
|
|
1591
1591
|
v && t("em", { class: "sr-only" }, "현재단계"),
|
|
@@ -1652,16 +1652,16 @@ var _t = M({
|
|
|
1652
1652
|
class: "krds-breadcrumb-wrap",
|
|
1653
1653
|
"aria-label": e.ariaLabel
|
|
1654
1654
|
}, [t("ol", { class: "breadcrumb" }, e.items.map((n, s) => {
|
|
1655
|
-
const
|
|
1655
|
+
const d = s === 0 && e.showHomeIcon;
|
|
1656
1656
|
return t("li", {
|
|
1657
1657
|
key: `breadcrumb-${s}`,
|
|
1658
|
-
class: { home:
|
|
1658
|
+
class: { home: d }
|
|
1659
1659
|
}, [t("a", {
|
|
1660
1660
|
href: n.href || "#",
|
|
1661
1661
|
class: "txt",
|
|
1662
1662
|
"aria-current": r(s) ? "page" : void 0,
|
|
1663
1663
|
onClick: (h) => l(n, h)
|
|
1664
|
-
},
|
|
1664
|
+
}, [t("span", null, n.text)])]);
|
|
1665
1665
|
}))]);
|
|
1666
1666
|
}
|
|
1667
1667
|
}), Gt = jt, Ut = M({
|
|
@@ -1702,7 +1702,7 @@ var _t = M({
|
|
|
1702
1702
|
const l = D(""), n = D(/* @__PURE__ */ new Map()), s = b(() => {
|
|
1703
1703
|
const f = ["krds-in-page-navigation-type"];
|
|
1704
1704
|
return e.class && f.push(e.class), f;
|
|
1705
|
-
}),
|
|
1705
|
+
}), d = () => {
|
|
1706
1706
|
const f = e.headerTopSelector, o = e.headerInnerSelector;
|
|
1707
1707
|
return (document.querySelector(f)?.clientHeight || 0) + (document.querySelector(o)?.clientHeight || 0);
|
|
1708
1708
|
}, h = (f, o) => {
|
|
@@ -1710,7 +1710,7 @@ var _t = M({
|
|
|
1710
1710
|
o.preventDefault();
|
|
1711
1711
|
const i = document.querySelector(f.href);
|
|
1712
1712
|
if (i) {
|
|
1713
|
-
const g =
|
|
1713
|
+
const g = d();
|
|
1714
1714
|
if (window.scrollTo({
|
|
1715
1715
|
left: 0,
|
|
1716
1716
|
top: i.getBoundingClientRect().top + window.scrollY - g,
|
|
@@ -1734,10 +1734,10 @@ var _t = M({
|
|
|
1734
1734
|
item: _
|
|
1735
1735
|
}));
|
|
1736
1736
|
if (m.length === 0) return;
|
|
1737
|
-
const
|
|
1737
|
+
const x = m[0], C = m[m.length - 1], E = x.element.offsetTop;
|
|
1738
1738
|
let T = "";
|
|
1739
1739
|
if (i >= g) T = C.href;
|
|
1740
|
-
else if (window.scrollY <= E) T =
|
|
1740
|
+
else if (window.scrollY <= E) T = x.href;
|
|
1741
1741
|
else for (const _ of m) {
|
|
1742
1742
|
const p = _.element.offsetHeight, A = _.element.offsetTop - o;
|
|
1743
1743
|
if (window.scrollY > A && window.scrollY <= A + p) {
|
|
@@ -1781,11 +1781,11 @@ var _t = M({
|
|
|
1781
1781
|
}, o.text)]);
|
|
1782
1782
|
});
|
|
1783
1783
|
return t("nav", { class: "in-page-navigation-list" }, [t("ul", {}, f)]);
|
|
1784
|
-
},
|
|
1784
|
+
}, $ = () => r.action ? t("div", { class: "in-page-navigation-action" }, [r.action()]) : null;
|
|
1785
1785
|
return () => t("div", { class: s.value }, [t("div", { class: "krds-in-page-navigation-area" }, [
|
|
1786
1786
|
B(),
|
|
1787
1787
|
S(),
|
|
1788
|
-
|
|
1788
|
+
$()
|
|
1789
1789
|
].filter(Boolean))]);
|
|
1790
1790
|
}
|
|
1791
1791
|
}), Xt = Ut, De = {
|
|
@@ -1830,22 +1830,22 @@ var _t = M({
|
|
|
1830
1830
|
},
|
|
1831
1831
|
emits: { "update:modelValue": (e) => !0 },
|
|
1832
1832
|
setup(e, { emit: a }) {
|
|
1833
|
-
const r = b(() => Math.max(1, e.min ?? ke)), l = b(() => e.modelValue ?? r.value), n = b(() => l.value <= r.value), s = b(() => l.value >= e.max),
|
|
1833
|
+
const r = b(() => Math.max(1, e.min ?? ke)), l = b(() => e.modelValue ?? r.value), n = b(() => l.value <= r.value), s = b(() => l.value >= e.max), d = b(() => {
|
|
1834
1834
|
if (!n.value)
|
|
1835
1835
|
return "#";
|
|
1836
1836
|
}), h = b(() => {
|
|
1837
1837
|
if (!s.value)
|
|
1838
1838
|
return "#";
|
|
1839
1839
|
}), v = b(() => {
|
|
1840
|
-
const { max:
|
|
1841
|
-
if (
|
|
1840
|
+
const { max: $ } = e, f = e.pageRange ?? Se, o = 1, i = [];
|
|
1841
|
+
if ($ <= f + 2) for (let g = r.value; g <= $; g++) i.push({
|
|
1842
1842
|
type: "page",
|
|
1843
1843
|
key: `page-${g}`,
|
|
1844
1844
|
page: g,
|
|
1845
1845
|
href: "#"
|
|
1846
1846
|
});
|
|
1847
1847
|
else {
|
|
1848
|
-
const g = Math.min(o,
|
|
1848
|
+
const g = Math.min(o, $), m = Math.max($ - o + 1, 1), x = Math.max(r.value, l.value - Math.floor(f / 2)), C = Math.min($, x + f - 1), E = Math.max(r.value, C - f + 1);
|
|
1849
1849
|
for (let p = r.value; p <= g; p++) i.push({
|
|
1850
1850
|
type: "page",
|
|
1851
1851
|
key: `page-${p}`,
|
|
@@ -1854,8 +1854,7 @@ var _t = M({
|
|
|
1854
1854
|
});
|
|
1855
1855
|
E > g + 1 && i.push({
|
|
1856
1856
|
type: "ellipsis",
|
|
1857
|
-
key: "ellipsis-left"
|
|
1858
|
-
ariaLabel: "페이지 생략"
|
|
1857
|
+
key: "ellipsis-left"
|
|
1859
1858
|
});
|
|
1860
1859
|
const T = Math.max(E, g + 1), _ = Math.min(C, m - 1);
|
|
1861
1860
|
for (let p = T; p <= _; p++) i.push({
|
|
@@ -1866,10 +1865,9 @@ var _t = M({
|
|
|
1866
1865
|
});
|
|
1867
1866
|
C < m - 1 && i.push({
|
|
1868
1867
|
type: "ellipsis",
|
|
1869
|
-
key: "ellipsis-right"
|
|
1870
|
-
ariaLabel: "페이지 생략"
|
|
1868
|
+
key: "ellipsis-right"
|
|
1871
1869
|
});
|
|
1872
|
-
for (let p = m; p <=
|
|
1870
|
+
for (let p = m; p <= $; p++) i.push({
|
|
1873
1871
|
type: "page",
|
|
1874
1872
|
key: `page-${p}`,
|
|
1875
1873
|
page: p,
|
|
@@ -1877,39 +1875,38 @@ var _t = M({
|
|
|
1877
1875
|
});
|
|
1878
1876
|
}
|
|
1879
1877
|
return i;
|
|
1880
|
-
}), w = (
|
|
1881
|
-
if (
|
|
1878
|
+
}), w = ($, f) => {
|
|
1879
|
+
if ($ === l.value) {
|
|
1882
1880
|
f.preventDefault();
|
|
1883
1881
|
return;
|
|
1884
1882
|
}
|
|
1885
|
-
a("update:modelValue",
|
|
1886
|
-
}, c = (
|
|
1883
|
+
a("update:modelValue", $);
|
|
1884
|
+
}, c = ($) => {
|
|
1887
1885
|
if (n.value) {
|
|
1888
|
-
|
|
1886
|
+
$.preventDefault();
|
|
1889
1887
|
return;
|
|
1890
1888
|
}
|
|
1891
1889
|
a("update:modelValue", l.value - 1);
|
|
1892
|
-
}, B = (
|
|
1890
|
+
}, B = ($) => {
|
|
1893
1891
|
if (s.value) {
|
|
1894
|
-
|
|
1892
|
+
$.preventDefault();
|
|
1895
1893
|
return;
|
|
1896
1894
|
}
|
|
1897
1895
|
a("update:modelValue", l.value + 1);
|
|
1898
|
-
}, S = (
|
|
1899
|
-
if (
|
|
1900
|
-
const f =
|
|
1896
|
+
}, S = ($) => {
|
|
1897
|
+
if ($.type === "page") {
|
|
1898
|
+
const f = $.page === l.value;
|
|
1901
1899
|
return t("a", {
|
|
1902
|
-
key:
|
|
1903
|
-
href:
|
|
1900
|
+
key: $.key,
|
|
1901
|
+
href: $.href || "#",
|
|
1904
1902
|
class: ["page-link", { active: f }],
|
|
1905
1903
|
"aria-current": f ? "page" : void 0,
|
|
1906
|
-
onClick: (o) => w(
|
|
1907
|
-
}, [f ? ve(t("span", null, "현재페이지"), [[De]]) : null, ` ${
|
|
1904
|
+
onClick: (o) => w($.page, o)
|
|
1905
|
+
}, [f ? ve(t("span", null, "현재페이지"), [[De]]) : null, ` ${$.page} `]);
|
|
1908
1906
|
}
|
|
1909
1907
|
return t("span", {
|
|
1910
|
-
key:
|
|
1911
|
-
class: "page-link link-dot"
|
|
1912
|
-
"aria-label": x.ariaLabel
|
|
1908
|
+
key: $.key,
|
|
1909
|
+
class: "page-link link-dot"
|
|
1913
1910
|
});
|
|
1914
1911
|
};
|
|
1915
1912
|
return () => t("div", {
|
|
@@ -1917,7 +1914,7 @@ var _t = M({
|
|
|
1917
1914
|
class: "krds-pagination"
|
|
1918
1915
|
}, [
|
|
1919
1916
|
t(n.value ? "span" : "a", {
|
|
1920
|
-
href: n.value ? void 0 :
|
|
1917
|
+
href: n.value ? void 0 : d.value,
|
|
1921
1918
|
class: [
|
|
1922
1919
|
"page-navi",
|
|
1923
1920
|
"prev",
|
|
@@ -1947,7 +1944,7 @@ var _t = M({
|
|
|
1947
1944
|
setup(e, { emit: a, slots: r }) {
|
|
1948
1945
|
const l = b({
|
|
1949
1946
|
get: () => e.modelValue,
|
|
1950
|
-
set: (
|
|
1947
|
+
set: (d) => a("update:modelValue", d)
|
|
1951
1948
|
}), n = () => {
|
|
1952
1949
|
l.value = !0;
|
|
1953
1950
|
}, s = () => {
|
|
@@ -1984,39 +1981,39 @@ var _t = M({
|
|
|
1984
1981
|
}
|
|
1985
1982
|
},
|
|
1986
1983
|
setup(e, { slots: a }) {
|
|
1987
|
-
const r = D(), l = D(), n = D(), s = D(),
|
|
1988
|
-
const o =
|
|
1984
|
+
const r = D(), l = D(), n = D(), s = D(), d = D(!1), h = () => {
|
|
1985
|
+
const o = d.value;
|
|
1989
1986
|
c(), o || v();
|
|
1990
1987
|
}, v = () => {
|
|
1991
|
-
!n.value || !l.value || (
|
|
1988
|
+
!n.value || !l.value || (d.value = !0, n.value.style.display = "block", l.value.setAttribute("aria-expanded", "true"), n.value.querySelector('a, button, [tabindex="0"], input, textarea, select')?.focus(), B());
|
|
1992
1989
|
}, w = () => {
|
|
1993
|
-
!n.value || !l.value || (
|
|
1990
|
+
!n.value || !l.value || (d.value = !1, n.value.style.display = "none", l.value.setAttribute("aria-expanded", "false"));
|
|
1994
1991
|
}, c = () => {
|
|
1995
1992
|
const o = document.querySelectorAll(".krds-contextual-help .tooltip-popover"), i = document.querySelectorAll(".krds-contextual-help .tooltip-btn");
|
|
1996
1993
|
o.forEach((g) => {
|
|
1997
1994
|
g.style.display = "none";
|
|
1998
1995
|
}), i.forEach((g) => {
|
|
1999
1996
|
g.setAttribute("aria-expanded", "false");
|
|
2000
|
-
}),
|
|
1997
|
+
}), d.value = !1;
|
|
2001
1998
|
}, B = () => {
|
|
2002
1999
|
if (!r.value || !n.value) return;
|
|
2003
2000
|
const o = window.innerWidth <= 768, i = r.value.querySelector(".tooltip-action");
|
|
2004
2001
|
if (o) {
|
|
2005
|
-
const g = getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0], m = i.getBoundingClientRect().left - parseInt(g),
|
|
2006
|
-
n.value.style.left = `-${m}px`, n.value.style.width = `${
|
|
2002
|
+
const g = getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0], m = i.getBoundingClientRect().left - parseInt(g), x = document.body.clientWidth - parseInt(g) * 2;
|
|
2003
|
+
n.value.style.left = `-${m}px`, n.value.style.width = `${x}px`;
|
|
2007
2004
|
} else
|
|
2008
2005
|
n.value.style.left = "", n.value.style.right = "", n.value.style.width = "360px";
|
|
2009
2006
|
}, S = (o) => {
|
|
2010
2007
|
(o.key === "Escape" || o.key === "Esc") && c();
|
|
2011
|
-
},
|
|
2008
|
+
}, $ = (o) => {
|
|
2012
2009
|
o.target.closest(".tooltip-action") || c();
|
|
2013
2010
|
}, f = () => {
|
|
2014
|
-
|
|
2011
|
+
d.value && B();
|
|
2015
2012
|
};
|
|
2016
2013
|
return ie(() => {
|
|
2017
|
-
r.value && (l.value && l.value.setAttribute("aria-expanded", "false"), n.value && n.value.setAttribute("role", "tooltip"), document.addEventListener("keydown", S), document.addEventListener("click",
|
|
2014
|
+
r.value && (l.value && l.value.setAttribute("aria-expanded", "false"), n.value && n.value.setAttribute("role", "tooltip"), document.addEventListener("keydown", S), document.addEventListener("click", $), window.addEventListener("resize", f));
|
|
2018
2015
|
}), re(() => {
|
|
2019
|
-
document.removeEventListener("keydown", S), document.removeEventListener("click",
|
|
2016
|
+
document.removeEventListener("keydown", S), document.removeEventListener("click", $), window.removeEventListener("resize", f);
|
|
2020
2017
|
}), () => t("div", {
|
|
2021
2018
|
ref: r,
|
|
2022
2019
|
class: ["krds-contextual-help", e.position]
|
|
@@ -2076,7 +2073,7 @@ var _t = M({
|
|
|
2076
2073
|
e.activeStep > 1 && a("update:modelValue", e.activeStep - 1);
|
|
2077
2074
|
}, s = () => {
|
|
2078
2075
|
e.activeStep < e.stepsData.length && a("update:modelValue", e.activeStep + 1);
|
|
2079
|
-
},
|
|
2076
|
+
}, d = () => {
|
|
2080
2077
|
a("close");
|
|
2081
2078
|
}, h = () => {
|
|
2082
2079
|
const v = l.value;
|
|
@@ -2093,7 +2090,7 @@ var _t = M({
|
|
|
2093
2090
|
t("button", {
|
|
2094
2091
|
type: "button",
|
|
2095
2092
|
class: "krds-btn small text",
|
|
2096
|
-
onClick:
|
|
2093
|
+
onClick: d
|
|
2097
2094
|
}, "그만보기"),
|
|
2098
2095
|
e.activeStep !== 1 ? t("button", {
|
|
2099
2096
|
type: "button",
|
|
@@ -2138,7 +2135,7 @@ var _t = M({
|
|
|
2138
2135
|
}
|
|
2139
2136
|
},
|
|
2140
2137
|
setup(e, { slots: a }) {
|
|
2141
|
-
const r = D(null), l = D(null), n = D(!1), s = D({}),
|
|
2138
|
+
const r = D(null), l = D(null), n = D(!1), s = D({}), d = `tooltip-popover-${oe()}`, h = D(!1), v = b(() => {
|
|
2142
2139
|
const m = ["krds-btn", "krds-tooltip"];
|
|
2143
2140
|
return e.type === "default" ? m.push("small", "text") : e.type === "icon" ? m.push("icon") : e.type === "button" && m.push(""), !e.box && e.vertical && m.push("tooltip-vertical"), e.box && !e.vertical && m.push("tooltip-box"), m.join(" ");
|
|
2144
2141
|
}), w = b(() => {
|
|
@@ -2148,17 +2145,17 @@ var _t = M({
|
|
|
2148
2145
|
if (!r.value || !l.value) return;
|
|
2149
2146
|
const m = r.value.querySelector("button");
|
|
2150
2147
|
if (!m) return;
|
|
2151
|
-
const
|
|
2148
|
+
const x = 12, { clientHeight: C, clientWidth: E } = l.value, { top: T, left: _, right: p, height: A, width: I } = m.getBoundingClientRect(), O = window.innerWidth / 2, H = window.innerHeight / 2;
|
|
2152
2149
|
let G, j;
|
|
2153
2150
|
const X = [];
|
|
2154
|
-
h.value || e.box || e.vertical ? (T + A > H ? (G = T - C -
|
|
2151
|
+
h.value || e.box || e.vertical ? (T + A > H ? (G = T - C - x, X.push("top")) : (G = T + A + x, X.push("bottom")), _ + I > O ? (j = p - E, X.push("right"), window.innerWidth - (_ + I) > E / 2 && (j = _ + (I - E) / 2, X.splice(X.indexOf("right"), 1))) : (j = _ + (I - E) / 2, j < 0 && (j = _, X.push("left")))) : (G = T + (A - C) / 2, _ + I > O ? (j = _ - E - x, X.push("right")) : j = p + x);
|
|
2155
2152
|
const le = window.innerWidth <= 420;
|
|
2156
2153
|
s.value = {
|
|
2157
2154
|
top: `${G}px`,
|
|
2158
2155
|
left: le ? "50%" : `${j}px`,
|
|
2159
2156
|
transform: le ? "translateX(-50%)" : "none"
|
|
2160
2157
|
}, l.value && (l.value.className = `krds-tooltip-popover ${X.join(" ")} ${w.value.join(" ")}`);
|
|
2161
|
-
},
|
|
2158
|
+
}, $ = async () => {
|
|
2162
2159
|
e.disabled || !e.tooltipContent || (n.value = !0, await ce(), S());
|
|
2163
2160
|
}, f = () => {
|
|
2164
2161
|
n.value = !1, s.value = {};
|
|
@@ -2177,13 +2174,13 @@ var _t = M({
|
|
|
2177
2174
|
type: "button",
|
|
2178
2175
|
class: v.value,
|
|
2179
2176
|
disabled: e.disabled,
|
|
2180
|
-
"aria-labelledby":
|
|
2181
|
-
onMouseover:
|
|
2177
|
+
"aria-labelledby": d,
|
|
2178
|
+
onMouseover: $,
|
|
2182
2179
|
onMouseout: f,
|
|
2183
|
-
onFocusin:
|
|
2180
|
+
onFocusin: $,
|
|
2184
2181
|
onFocusout: f
|
|
2185
2182
|
}, a.default?.()), ve(t("div", {
|
|
2186
|
-
id:
|
|
2183
|
+
id: d,
|
|
2187
2184
|
ref: l,
|
|
2188
2185
|
class: ["krds-tooltip-popover", w.value],
|
|
2189
2186
|
style: s.value,
|
|
@@ -2220,7 +2217,7 @@ var _t = M({
|
|
|
2220
2217
|
close: () => !0
|
|
2221
2218
|
},
|
|
2222
2219
|
setup(e, { emit: a, slots: r }) {
|
|
2223
|
-
const l = D(!1), n = D(), s = D(),
|
|
2220
|
+
const l = D(!1), n = D(), s = D(), d = () => {
|
|
2224
2221
|
l.value = !l.value, l.value && n.value && w();
|
|
2225
2222
|
}, h = () => {
|
|
2226
2223
|
l.value = !1;
|
|
@@ -2238,7 +2235,7 @@ var _t = M({
|
|
|
2238
2235
|
n.value?.contains(i.target) || h();
|
|
2239
2236
|
}, S = (i) => {
|
|
2240
2237
|
n.value?.contains(i.relatedTarget) || h();
|
|
2241
|
-
},
|
|
2238
|
+
}, $ = (i) => {
|
|
2242
2239
|
if (!n.value) return;
|
|
2243
2240
|
n.value.querySelectorAll(".drop-list .item-link").forEach((m) => {
|
|
2244
2241
|
m.style.position = "relative", m.style.zIndex = "0";
|
|
@@ -2257,7 +2254,7 @@ var _t = M({
|
|
|
2257
2254
|
lang: i.code,
|
|
2258
2255
|
"aria-selected": e.modelValue === i.code,
|
|
2259
2256
|
onClick: ge(() => v(i.code), ["prevent"]),
|
|
2260
|
-
onFocus:
|
|
2257
|
+
onFocus: $
|
|
2261
2258
|
}, [
|
|
2262
2259
|
i.name,
|
|
2263
2260
|
" ",
|
|
@@ -2268,7 +2265,7 @@ var _t = M({
|
|
|
2268
2265
|
lang: i.code,
|
|
2269
2266
|
target: "_blank",
|
|
2270
2267
|
title: "새 창 열림",
|
|
2271
|
-
onFocus:
|
|
2268
|
+
onFocus: $
|
|
2272
2269
|
}, [
|
|
2273
2270
|
i.name,
|
|
2274
2271
|
" ",
|
|
@@ -2291,7 +2288,7 @@ var _t = M({
|
|
|
2291
2288
|
type: "button",
|
|
2292
2289
|
class: ["krds-btn small text drop-btn", { active: l.value }],
|
|
2293
2290
|
"aria-expanded": l.value,
|
|
2294
|
-
onClick:
|
|
2291
|
+
onClick: d
|
|
2295
2292
|
}, [
|
|
2296
2293
|
t("i", { class: "svg-icon ico-global" }),
|
|
2297
2294
|
r.default?.(),
|
|
@@ -2308,7 +2305,7 @@ var _t = M({
|
|
|
2308
2305
|
close: () => !0
|
|
2309
2306
|
},
|
|
2310
2307
|
setup(e, { emit: a }) {
|
|
2311
|
-
const r = D(!1), l = D(), n = D(), s = D("md"),
|
|
2308
|
+
const r = D(!1), l = D(), n = D(), s = D("md"), d = [
|
|
2312
2309
|
{
|
|
2313
2310
|
key: "sm",
|
|
2314
2311
|
label: "작게",
|
|
@@ -2341,7 +2338,7 @@ var _t = M({
|
|
|
2341
2338
|
}, w = (i) => {
|
|
2342
2339
|
v(), a("close"), n.value?.focus(), s.value = i.key, document.body.style.zoom = i?.zoom;
|
|
2343
2340
|
}, c = () => {
|
|
2344
|
-
const i =
|
|
2341
|
+
const i = d.find((g) => g.key === "md");
|
|
2345
2342
|
i && w(i);
|
|
2346
2343
|
}, B = () => {
|
|
2347
2344
|
if (!l.value) return;
|
|
@@ -2351,7 +2348,7 @@ var _t = M({
|
|
|
2351
2348
|
l.value.classList.remove("drop-left", "drop-right"), g.left < 0 ? l.value.classList.add("drop-left") : m < g.left + g.width && l.value.classList.add("drop-right");
|
|
2352
2349
|
}, S = (i) => {
|
|
2353
2350
|
i.key === "Escape" && (v(), n.value?.focus());
|
|
2354
|
-
},
|
|
2351
|
+
}, $ = (i) => {
|
|
2355
2352
|
l.value?.contains(i.target) || v();
|
|
2356
2353
|
}, f = (i) => {
|
|
2357
2354
|
l.value?.contains(i.relatedTarget) || v();
|
|
@@ -2364,9 +2361,9 @@ var _t = M({
|
|
|
2364
2361
|
g.style.zIndex = "1";
|
|
2365
2362
|
};
|
|
2366
2363
|
return se(r, (i) => {
|
|
2367
|
-
i ? (document.addEventListener("keydown", S), document.addEventListener("click",
|
|
2364
|
+
i ? (document.addEventListener("keydown", S), document.addEventListener("click", $)) : (document.removeEventListener("keydown", S), document.removeEventListener("click", $));
|
|
2368
2365
|
}), re(() => {
|
|
2369
|
-
document.removeEventListener("keydown", S), document.removeEventListener("click",
|
|
2366
|
+
document.removeEventListener("keydown", S), document.removeEventListener("click", $);
|
|
2370
2367
|
}), () => t("div", {
|
|
2371
2368
|
ref: l,
|
|
2372
2369
|
class: "krds-drop-wrap krds-resize",
|
|
@@ -2380,7 +2377,7 @@ var _t = M({
|
|
|
2380
2377
|
}, ["화면크기 ", t("i", { class: "svg-icon ico-toggle" })]), t("div", {
|
|
2381
2378
|
class: "drop-menu",
|
|
2382
2379
|
style: { display: r.value ? "block" : "none" }
|
|
2383
|
-
}, [t("div", { class: "drop-in" }, [t("ul", { class: "drop-list" },
|
|
2380
|
+
}, [t("div", { class: "drop-in" }, [t("ul", { class: "drop-list" }, d.map((i) => t("li", { key: i.key }, [t("button", {
|
|
2384
2381
|
type: "button",
|
|
2385
2382
|
class: [
|
|
2386
2383
|
"item-link",
|
|
@@ -2436,7 +2433,7 @@ var _t = M({
|
|
|
2436
2433
|
const l = xe()?.uid, n = b(() => e.modalId ?? `krds-modal-${l}`), s = b({
|
|
2437
2434
|
get: () => e.modelValue,
|
|
2438
2435
|
set: (i) => r("update:modelValue", i)
|
|
2439
|
-
}),
|
|
2436
|
+
}), d = b(() => `tit_${n.value}`), h = b(() => ({
|
|
2440
2437
|
small: "modal-sm",
|
|
2441
2438
|
medium: "modal-md",
|
|
2442
2439
|
large: "modal-lg"
|
|
@@ -2444,19 +2441,19 @@ var _t = M({
|
|
|
2444
2441
|
s.value = !1;
|
|
2445
2442
|
};
|
|
2446
2443
|
let w = "", c = null;
|
|
2447
|
-
const B = D(null), S = (i) => Array.from(i.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter((g) => !g.hasAttribute("disabled") && g.getAttribute("tabindex") !== "-1"),
|
|
2444
|
+
const B = D(null), S = (i) => Array.from(i.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter((g) => !g.hasAttribute("disabled") && g.getAttribute("tabindex") !== "-1"), $ = (i) => {
|
|
2448
2445
|
if (!B.value || i.key !== "Tab") return;
|
|
2449
2446
|
const g = S(B.value);
|
|
2450
2447
|
if (g.length === 0) {
|
|
2451
2448
|
i.preventDefault();
|
|
2452
2449
|
return;
|
|
2453
2450
|
}
|
|
2454
|
-
const m = g[0],
|
|
2455
|
-
i.shiftKey && document.activeElement === m ? (i.preventDefault(),
|
|
2451
|
+
const m = g[0], x = g[g.length - 1];
|
|
2452
|
+
i.shiftKey && document.activeElement === m ? (i.preventDefault(), x.focus()) : !i.shiftKey && document.activeElement === x && (i.preventDefault(), m.focus());
|
|
2456
2453
|
}, f = (i) => {
|
|
2457
2454
|
i.key === "Escape" && !e.persistent && v();
|
|
2458
2455
|
}, o = () => {
|
|
2459
|
-
document.body.style.overflow = w, document.removeEventListener("keydown",
|
|
2456
|
+
document.body.style.overflow = w, document.removeEventListener("keydown", $), document.removeEventListener("keydown", f), c && (c.focus(), c = null), B.value = null;
|
|
2460
2457
|
};
|
|
2461
2458
|
return se(() => e.modelValue, async (i) => {
|
|
2462
2459
|
if (i) {
|
|
@@ -2465,7 +2462,7 @@ var _t = M({
|
|
|
2465
2462
|
if (g) {
|
|
2466
2463
|
B.value = g;
|
|
2467
2464
|
const m = g.querySelector(".modal-conts");
|
|
2468
|
-
m && (m.setAttribute("tabindex", "-1"), m.focus()), document.addEventListener("keydown",
|
|
2465
|
+
m && (m.setAttribute("tabindex", "-1"), m.focus()), document.addEventListener("keydown", $), document.addEventListener("keydown", f);
|
|
2469
2466
|
}
|
|
2470
2467
|
} else o();
|
|
2471
2468
|
}, { immediate: !0 }), fe(() => {
|
|
@@ -2477,11 +2474,11 @@ var _t = M({
|
|
|
2477
2474
|
class: "krds-modal fade in shown",
|
|
2478
2475
|
role: "dialog",
|
|
2479
2476
|
"aria-modal": !0,
|
|
2480
|
-
"aria-labelledby":
|
|
2477
|
+
"aria-labelledby": d.value
|
|
2481
2478
|
};
|
|
2482
2479
|
return e.full ? i["data-type"] = "full" : e.bottomSheet && (i["data-type"] = "bottom-sheet"), t(Ce, { to: "body" }, t("section", i, [t("div", { class: `modal-dialog ${h.value}` }, [t("div", { class: "modal-content" }, [
|
|
2483
2480
|
a.title ? t("div", { class: "modal-header" }, [t("h2", {
|
|
2484
|
-
id:
|
|
2481
|
+
id: d.value,
|
|
2485
2482
|
class: "modal-title"
|
|
2486
2483
|
}, a.title())]) : null,
|
|
2487
2484
|
t("div", { class: "modal-conts" }, [t("div", { class: "conts-area" }, a.default?.())]),
|
|
@@ -2615,7 +2612,7 @@ var _t = M({
|
|
|
2615
2612
|
r.value = !1, l = null, v.error !== "canceled" && a("error", new Error(v.error));
|
|
2616
2613
|
}, window.speechSynthesis.speak(l), a("play", e.text);
|
|
2617
2614
|
}
|
|
2618
|
-
},
|
|
2615
|
+
}, d = b(() => {
|
|
2619
2616
|
const v = ["krds-tts"];
|
|
2620
2617
|
return e.size && v.push(e.size), r.value ? v.push("pause") : e.icon === "play" && v.push("play"), e.class && v.push(e.class), v;
|
|
2621
2618
|
}), h = b(() => r.value ? "ico-stop" : e.icon === "play" ? "ico-play" : "ico-volume");
|
|
@@ -2628,7 +2625,7 @@ var _t = M({
|
|
|
2628
2625
|
}, [t("i", { class: `svg-icon ${h.value}` })])];
|
|
2629
2626
|
return e.label && v.push(t("span", { class: "krds-tts-text" }, e.label)), t("button", {
|
|
2630
2627
|
type: "button",
|
|
2631
|
-
class:
|
|
2628
|
+
class: d.value,
|
|
2632
2629
|
disabled: e.disabled || void 0,
|
|
2633
2630
|
onClick: s
|
|
2634
2631
|
}, v);
|
|
@@ -2660,7 +2657,7 @@ var _t = M({
|
|
|
2660
2657
|
const l = b(() => {
|
|
2661
2658
|
const f = ["tbl"];
|
|
2662
2659
|
return e.class && f.push(e.class), f;
|
|
2663
|
-
}), n = b(() => ["krds-table-wrap"]), s = (f) => f.headerStyle || void 0,
|
|
2660
|
+
}), n = b(() => ["krds-table-wrap"]), s = (f) => f.headerStyle || void 0, d = (f) => {
|
|
2664
2661
|
const o = [];
|
|
2665
2662
|
return f.align && o.push(`text-${f.align}`), f.headerClasses && o.push(f.headerClasses), o.length > 0 ? o : void 0;
|
|
2666
2663
|
}, h = (f, o) => {
|
|
@@ -2680,7 +2677,7 @@ var _t = M({
|
|
|
2680
2677
|
})), c = () => {
|
|
2681
2678
|
if (!e.columns.length) return null;
|
|
2682
2679
|
const f = e.columns.map((o) => {
|
|
2683
|
-
const i = s(o), g =
|
|
2680
|
+
const i = s(o), g = d(o);
|
|
2684
2681
|
return t("th", {
|
|
2685
2682
|
scope: "col",
|
|
2686
2683
|
class: g,
|
|
@@ -2694,18 +2691,18 @@ var _t = M({
|
|
|
2694
2691
|
class: "text-center"
|
|
2695
2692
|
}, r["no-data"] ? r["no-data"]() : "데이터가 없습니다.")])]);
|
|
2696
2693
|
const f = e.rows.map((o, i) => {
|
|
2697
|
-
const g = e.columns.map((m,
|
|
2694
|
+
const g = e.columns.map((m, x) => {
|
|
2698
2695
|
const C = B(o, m), E = typeof C == "function" ? C() : C, T = h(o, m), _ = v(o, m);
|
|
2699
|
-
return t(
|
|
2700
|
-
scope:
|
|
2696
|
+
return t(x === 0 ? "th" : "td", {
|
|
2697
|
+
scope: x === 0 ? "row" : void 0,
|
|
2701
2698
|
class: _,
|
|
2702
2699
|
style: T
|
|
2703
2700
|
}, E);
|
|
2704
2701
|
});
|
|
2705
|
-
return t("tr", { onClick: () =>
|
|
2702
|
+
return t("tr", { onClick: () => $(o, i) }, g);
|
|
2706
2703
|
});
|
|
2707
2704
|
return t("tbody", f);
|
|
2708
|
-
},
|
|
2705
|
+
}, $ = (f, o) => {
|
|
2709
2706
|
a("row-click", f, o);
|
|
2710
2707
|
};
|
|
2711
2708
|
return () => t("div", { class: n.value }, [t("table", { class: l.value }, [
|
|
@@ -2763,9 +2760,9 @@ var _t = M({
|
|
|
2763
2760
|
const r = b(() => {
|
|
2764
2761
|
const h = [];
|
|
2765
2762
|
return e.class && h.push(e.class), h;
|
|
2766
|
-
}), l = () => a.top ? t("div", { class: "foot-quick" }, [t("div", { class: "inner" }, a.top())]) : null, n = () => a.logo ? t("div", { class: "f-logo" }, a.logo()) : null, s = () => a.content ? t("div", { class: "f-cnt" }, a.content()) : null,
|
|
2763
|
+
}), l = () => a.top ? t("div", { class: "foot-quick" }, [t("div", { class: "inner" }, a.top())]) : null, n = () => a.logo ? t("div", { class: "f-logo" }, a.logo()) : null, s = () => a.content ? t("div", { class: "f-cnt" }, a.content()) : null, d = () => a.bottom ? t("div", { class: "f-btm" }, a.bottom()) : null;
|
|
2767
2764
|
return () => {
|
|
2768
|
-
const h = l(), v = n(), w = s(), c =
|
|
2765
|
+
const h = l(), v = n(), w = s(), c = d(), B = [];
|
|
2769
2766
|
v && B.push(v), w && B.push(w), c && B.push(c);
|
|
2770
2767
|
const S = [];
|
|
2771
2768
|
return h && S.push(h), B.length > 0 && S.push(t("div", { class: "inner" }, B)), t("footer", {
|
|
@@ -2854,7 +2851,7 @@ var _t = M({
|
|
|
2854
2851
|
"scroll-height": (e) => !0
|
|
2855
2852
|
},
|
|
2856
2853
|
setup(e, { slots: a, emit: r }) {
|
|
2857
|
-
const l = D(0), n = D(0), s = D(0),
|
|
2854
|
+
const l = D(0), n = D(0), s = D(0), d = D(null), h = D(null), v = D(null), w = () => {
|
|
2858
2855
|
const f = n.value;
|
|
2859
2856
|
l.value = window.scrollY, n.value = document.body.scrollHeight, f !== n.value && f > 0 && r("scroll-height", n.value);
|
|
2860
2857
|
}, c = () => {
|
|
@@ -2862,12 +2859,12 @@ var _t = M({
|
|
|
2862
2859
|
const f = document.querySelector("#container");
|
|
2863
2860
|
if (!f) return;
|
|
2864
2861
|
const o = f.offsetTop, i = window.scrollY, g = i > s.value, m = i < s.value;
|
|
2865
|
-
i > o + Ta ? g ? (h.value.classList.add("scroll-down"), h.value.classList.remove("scroll-up"),
|
|
2862
|
+
i > o + Ta ? g ? (h.value.classList.add("scroll-down"), h.value.classList.remove("scroll-up"), d.value = "down") : m && (h.value.classList.add("scroll-up"), h.value.classList.remove("scroll-down"), d.value = "up") : (h.value.classList.remove("scroll-down", "scroll-up"), d.value = null), s.value = i;
|
|
2866
2863
|
}, B = () => {
|
|
2867
2864
|
w(), c(), r("scroll", {
|
|
2868
2865
|
scrollY: l.value,
|
|
2869
2866
|
scrollHeight: n.value,
|
|
2870
|
-
direction:
|
|
2867
|
+
direction: d.value,
|
|
2871
2868
|
timestamp: Date.now()
|
|
2872
2869
|
});
|
|
2873
2870
|
}, S = (f) => {
|
|
@@ -2878,7 +2875,7 @@ var _t = M({
|
|
|
2878
2875
|
height: g
|
|
2879
2876
|
});
|
|
2880
2877
|
}
|
|
2881
|
-
},
|
|
2878
|
+
}, $ = b(() => {
|
|
2882
2879
|
const f = ["g-wrap"];
|
|
2883
2880
|
return e.class && f.push(e.class), f;
|
|
2884
2881
|
});
|
|
@@ -2888,7 +2885,7 @@ var _t = M({
|
|
|
2888
2885
|
e.enableScrollDetection && window.removeEventListener("scroll", B), v.value && (v.value.disconnect(), v.value = null);
|
|
2889
2886
|
}), () => t("div", {
|
|
2890
2887
|
id: e.id,
|
|
2891
|
-
class:
|
|
2888
|
+
class: $.value,
|
|
2892
2889
|
ref: h
|
|
2893
2890
|
}, a.default?.());
|
|
2894
2891
|
}
|
|
@@ -2906,18 +2903,18 @@ var _t = M({
|
|
|
2906
2903
|
},
|
|
2907
2904
|
emits: { "update:modelValue": (e) => !0 },
|
|
2908
2905
|
setup(e, { emit: a }) {
|
|
2909
|
-
const r = b(() => e.modelValue || []), l = D(/* @__PURE__ */ new Map()), n = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Map()),
|
|
2906
|
+
const r = b(() => e.modelValue || []), l = D(/* @__PURE__ */ new Map()), n = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Map()), d = D(null), h = (x, C, E) => {
|
|
2910
2907
|
const T = `${C}-${E}`;
|
|
2911
|
-
|
|
2912
|
-
}, v = (
|
|
2908
|
+
x ? l.value.set(T, x) : l.value.delete(T);
|
|
2909
|
+
}, v = (x, C, E) => {
|
|
2913
2910
|
const T = `${C}-${E}`;
|
|
2914
|
-
|
|
2915
|
-
}, w = (
|
|
2911
|
+
x ? n.value.set(T, x) : n.value.delete(T);
|
|
2912
|
+
}, w = (x, C, E) => {
|
|
2916
2913
|
const T = `${C}-${E}`;
|
|
2917
|
-
|
|
2918
|
-
}, c = (
|
|
2914
|
+
x ? s.value.set(T, x) : s.value.delete(T);
|
|
2915
|
+
}, c = (x) => {
|
|
2919
2916
|
a("update:modelValue", r.value.map((C, E) => {
|
|
2920
|
-
if (E ===
|
|
2917
|
+
if (E === x && C.subItems) {
|
|
2921
2918
|
const T = C.expanded, _ = {
|
|
2922
2919
|
...C,
|
|
2923
2920
|
expanded: !C.expanded
|
|
@@ -2925,12 +2922,12 @@ var _t = M({
|
|
|
2925
2922
|
return T && !_.expanded && (_.subItems = C.subItems.map((p) => ({
|
|
2926
2923
|
...p,
|
|
2927
2924
|
expanded: !1
|
|
2928
|
-
})),
|
|
2925
|
+
})), d.value = null), _;
|
|
2929
2926
|
}
|
|
2930
2927
|
return C;
|
|
2931
2928
|
}));
|
|
2932
|
-
}, B = (
|
|
2933
|
-
a("update:modelValue", r.value.map((E, T) => T ===
|
|
2929
|
+
}, B = (x, C) => {
|
|
2930
|
+
a("update:modelValue", r.value.map((E, T) => T === x && E.subItems ? {
|
|
2934
2931
|
...E,
|
|
2935
2932
|
subItems: E.subItems.map((_, p) => {
|
|
2936
2933
|
if (p === C && _.subItems) {
|
|
@@ -2939,8 +2936,8 @@ var _t = M({
|
|
|
2939
2936
|
expanded: !_.expanded
|
|
2940
2937
|
};
|
|
2941
2938
|
if (A.expanded) {
|
|
2942
|
-
const I = `${
|
|
2943
|
-
|
|
2939
|
+
const I = `${x}-${C}`;
|
|
2940
|
+
d.value = l.value.get(I) || null;
|
|
2944
2941
|
const O = n.value.get(I), H = s.value.get(I);
|
|
2945
2942
|
O && H && O.addEventListener("transitionend", () => {
|
|
2946
2943
|
H.focus();
|
|
@@ -2951,16 +2948,16 @@ var _t = M({
|
|
|
2951
2948
|
return _;
|
|
2952
2949
|
})
|
|
2953
2950
|
} : E));
|
|
2954
|
-
}, S = (
|
|
2955
|
-
a("update:modelValue", r.value.map((E, T) => T ===
|
|
2951
|
+
}, S = (x, C) => {
|
|
2952
|
+
a("update:modelValue", r.value.map((E, T) => T === x && E.subItems ? {
|
|
2956
2953
|
...E,
|
|
2957
2954
|
subItems: E.subItems.map((_, p) => {
|
|
2958
2955
|
if (p === C && _.subItems && _.expanded) {
|
|
2959
|
-
if (
|
|
2960
|
-
const A =
|
|
2956
|
+
if (d.value) {
|
|
2957
|
+
const A = d.value;
|
|
2961
2958
|
requestAnimationFrame(() => {
|
|
2962
2959
|
A.focus();
|
|
2963
|
-
}),
|
|
2960
|
+
}), d.value = null;
|
|
2964
2961
|
}
|
|
2965
2962
|
return {
|
|
2966
2963
|
..._,
|
|
@@ -2970,14 +2967,14 @@ var _t = M({
|
|
|
2970
2967
|
return _;
|
|
2971
2968
|
})
|
|
2972
2969
|
} : E));
|
|
2973
|
-
},
|
|
2970
|
+
}, $ = (x, C, E) => {
|
|
2974
2971
|
const T = `${C}-${E}`, _ = n.value.get(T);
|
|
2975
|
-
_ && !_.contains(
|
|
2976
|
-
}, f = (
|
|
2977
|
-
S(
|
|
2978
|
-
}, o = (
|
|
2979
|
-
|
|
2980
|
-
}, i = (
|
|
2972
|
+
_ && !_.contains(x.relatedTarget) && S(C, E);
|
|
2973
|
+
}, f = (x, C) => {
|
|
2974
|
+
S(x, C);
|
|
2975
|
+
}, o = (x, C) => {
|
|
2976
|
+
x.onClick && x.onClick(C);
|
|
2977
|
+
}, i = (x, C, E) => x.map((T, _) => t("li", {
|
|
2981
2978
|
key: `popup-item-${C}-${E}-${_}`,
|
|
2982
2979
|
role: "none"
|
|
2983
2980
|
}, t("a", {
|
|
@@ -2985,7 +2982,7 @@ var _t = M({
|
|
|
2985
2982
|
class: "lnb-btn",
|
|
2986
2983
|
role: "menuitem",
|
|
2987
2984
|
onClick: (p) => o(T, p)
|
|
2988
|
-
}, T.text))), g = (
|
|
2985
|
+
}, T.text))), g = (x, C) => x.map((E, T) => {
|
|
2989
2986
|
const _ = `lnb-subitem-${C}-${T}`;
|
|
2990
2987
|
return t("li", {
|
|
2991
2988
|
key: _,
|
|
@@ -3005,7 +3002,7 @@ var _t = M({
|
|
|
3005
3002
|
id: `lnbmenu-${C}-${T}`,
|
|
3006
3003
|
class: ["lnb-submenu-lv2", { active: E.expanded }],
|
|
3007
3004
|
role: "menu",
|
|
3008
|
-
onFocusout: (p) =>
|
|
3005
|
+
onFocusout: (p) => $(p, C, T)
|
|
3009
3006
|
}, [t("button", {
|
|
3010
3007
|
ref: (p) => w(p, C, T),
|
|
3011
3008
|
type: "button",
|
|
@@ -3017,25 +3014,25 @@ var _t = M({
|
|
|
3017
3014
|
role: "menuitem",
|
|
3018
3015
|
onClick: (p) => o(E, p)
|
|
3019
3016
|
}, E.text)]);
|
|
3020
|
-
}), m = () => r.value.map((
|
|
3017
|
+
}), m = () => r.value.map((x, C) => t("li", {
|
|
3021
3018
|
key: `lnb-item-${C}`,
|
|
3022
|
-
class: ["lnb-item", { active:
|
|
3019
|
+
class: ["lnb-item", { active: x.expanded }],
|
|
3023
3020
|
role: "none"
|
|
3024
3021
|
}, [t("button", {
|
|
3025
3022
|
type: "button",
|
|
3026
3023
|
class: [
|
|
3027
3024
|
"lnb-btn",
|
|
3028
3025
|
"lnb-toggle",
|
|
3029
|
-
{ active:
|
|
3026
|
+
{ active: x.expanded }
|
|
3030
3027
|
],
|
|
3031
3028
|
role: "menuitem",
|
|
3032
3029
|
"aria-controls": `lnbmenu-${C}`,
|
|
3033
|
-
"aria-expanded":
|
|
3030
|
+
"aria-expanded": x.expanded ? "true" : "false",
|
|
3034
3031
|
onClick: () => c(C)
|
|
3035
|
-
},
|
|
3032
|
+
}, x.text), x.subItems ? t("div", { class: "lnb-submenu" }, [t("ul", {
|
|
3036
3033
|
id: `lnbmenu-${C}`,
|
|
3037
3034
|
role: "menu"
|
|
3038
|
-
}, g(
|
|
3035
|
+
}, g(x.subItems, C))]) : null]));
|
|
3039
3036
|
return () => t("nav", { class: "krds-side-navigation" }, [t("h2", { class: "lnb-tit" }, e.title), t("ul", {
|
|
3040
3037
|
class: "lnb-list",
|
|
3041
3038
|
role: "menubar"
|
|
@@ -3050,13 +3047,13 @@ var _t = M({
|
|
|
3050
3047
|
slots: Object,
|
|
3051
3048
|
setup(e, { slots: a }) {
|
|
3052
3049
|
return () => {
|
|
3053
|
-
const r = a.cardTop?.(), l = a.cardBody?.(), n = a.cardBtm?.(), s = a.cardBtn?.(),
|
|
3050
|
+
const r = a.cardTop?.(), l = a.cardBody?.(), n = a.cardBtm?.(), s = a.cardBtn?.(), d = t("li", { class: "structured-item" }, [t("div", { class: "in" }, [
|
|
3054
3051
|
r && t("div", { class: "card-top" }, r),
|
|
3055
3052
|
l && t("div", { class: "card-body" }, l),
|
|
3056
3053
|
n && t("div", { class: "card-btm" }, n),
|
|
3057
3054
|
s && t("div", { class: "card-btn" }, s)
|
|
3058
3055
|
].filter(Boolean))]);
|
|
3059
|
-
return t("ul", { class: ["krds-structured-list", e.full ? "type-full" : ""] }, [
|
|
3056
|
+
return t("ul", { class: ["krds-structured-list", e.full ? "type-full" : ""] }, [d]);
|
|
3060
3057
|
};
|
|
3061
3058
|
}
|
|
3062
3059
|
}), Pa = Va, za = M({
|
|
@@ -3152,84 +3149,84 @@ var _t = M({
|
|
|
3152
3149
|
},
|
|
3153
3150
|
slots: Object,
|
|
3154
3151
|
setup(e, { emit: a, slots: r }) {
|
|
3155
|
-
const l = oe(), n = D(null), s = D(null),
|
|
3152
|
+
const l = oe(), n = D(null), s = D(null), d = D(null), h = b(() => e.variant === "pc"), v = (u) => `${l}-gnb-panel-${u}`, w = (u, y) => `${l}-gnb-sub-${u}-${y}`, c = (u) => `${l}-gnb-tab-${u}`, B = (u, y) => `${l}-gnb-depth3-${u}-${y}`, S = (u) => !!u?.subItems?.length, $ = (u) => !S(u) && !!u?.items?.length, f = (u) => S(u) || $(u), o = (u) => !u.items?.length, i = (u) => u ? {
|
|
3156
3153
|
target: "_blank",
|
|
3157
3154
|
rel: "noopener noreferrer",
|
|
3158
3155
|
title: Ha
|
|
3159
|
-
} : {}, g = (
|
|
3160
|
-
|
|
3161
|
-
}, m = D(-1),
|
|
3162
|
-
y ?
|
|
3163
|
-
}, p = (
|
|
3164
|
-
const y =
|
|
3156
|
+
} : {}, g = (u, y) => {
|
|
3157
|
+
u.onClick?.(y), a("item-click", u, y);
|
|
3158
|
+
}, m = D(-1), x = D({}), C = D(0), E = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), _ = (u, y, K) => {
|
|
3159
|
+
y ? u.set(K, y) : u.delete(K);
|
|
3160
|
+
}, p = (u) => {
|
|
3161
|
+
const y = u?.subItems?.findIndex((K) => !o(K));
|
|
3165
3162
|
return y === void 0 ? -1 : y;
|
|
3166
|
-
}, A = (
|
|
3167
|
-
const y =
|
|
3168
|
-
return y === void 0 ? p(e.items[
|
|
3169
|
-
}, I = (
|
|
3163
|
+
}, A = (u) => {
|
|
3164
|
+
const y = x.value[u];
|
|
3165
|
+
return y === void 0 ? p(e.items[u]) : y;
|
|
3166
|
+
}, I = (u) => {
|
|
3170
3167
|
if (typeof document > "u") return;
|
|
3171
|
-
document.body.classList.toggle("is-gnb-web",
|
|
3168
|
+
document.body.classList.toggle("is-gnb-web", u);
|
|
3172
3169
|
const y = document.body.scrollHeight > window.innerHeight;
|
|
3173
|
-
document.body.classList.toggle("hasScrollY",
|
|
3170
|
+
document.body.classList.toggle("hasScrollY", u && y);
|
|
3174
3171
|
}, O = async () => {
|
|
3175
3172
|
await ce();
|
|
3176
|
-
const
|
|
3177
|
-
C.value =
|
|
3178
|
-
}, H = (
|
|
3173
|
+
const u = E.get(m.value)?.querySelector(".gnb-sub-list.active");
|
|
3174
|
+
C.value = u?.scrollHeight ?? 0;
|
|
3175
|
+
}, H = (u = !1) => {
|
|
3179
3176
|
if (m.value === -1) return;
|
|
3180
3177
|
const y = m.value;
|
|
3181
|
-
m.value = -1, C.value = 0, I(!1), a("menu-toggle", y, !1),
|
|
3182
|
-
}, G = (
|
|
3183
|
-
if (f(e.items[
|
|
3184
|
-
if (m.value ===
|
|
3178
|
+
m.value = -1, C.value = 0, I(!1), a("menu-toggle", y, !1), u && T.get(y)?.focus();
|
|
3179
|
+
}, G = (u) => {
|
|
3180
|
+
if (f(e.items[u])) {
|
|
3181
|
+
if (m.value === u) {
|
|
3185
3182
|
H();
|
|
3186
3183
|
return;
|
|
3187
3184
|
}
|
|
3188
|
-
m.value =
|
|
3185
|
+
m.value = u, I(!0), a("menu-toggle", u, !0), O();
|
|
3189
3186
|
}
|
|
3190
|
-
}, j = (
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
[
|
|
3187
|
+
}, j = (u, y) => {
|
|
3188
|
+
x.value = {
|
|
3189
|
+
...x.value,
|
|
3190
|
+
[u]: y
|
|
3194
3191
|
}, O();
|
|
3195
|
-
}, X = (
|
|
3192
|
+
}, X = (u) => {
|
|
3196
3193
|
const y = n.value;
|
|
3197
|
-
!y || y.contains(
|
|
3198
|
-
}, le = (
|
|
3199
|
-
const y = n.value, K =
|
|
3194
|
+
!y || y.contains(u.target) || H();
|
|
3195
|
+
}, le = (u) => {
|
|
3196
|
+
const y = n.value, K = u.relatedTarget;
|
|
3200
3197
|
!y || !K || y.contains(K) || H();
|
|
3201
|
-
}, de = (
|
|
3202
|
-
if (
|
|
3198
|
+
}, de = (u) => {
|
|
3199
|
+
if (u.key === "Escape") {
|
|
3203
3200
|
H(!0);
|
|
3204
3201
|
return;
|
|
3205
3202
|
}
|
|
3206
|
-
const y =
|
|
3203
|
+
const y = u.target;
|
|
3207
3204
|
if (!y?.dataset.trigger) return;
|
|
3208
3205
|
const K = (k) => {
|
|
3209
3206
|
const P = y.closest("li");
|
|
3210
3207
|
(k === "next" ? P?.nextElementSibling : P?.previousElementSibling)?.querySelector("[data-trigger]")?.focus();
|
|
3211
3208
|
};
|
|
3212
|
-
switch (
|
|
3209
|
+
switch (u.key) {
|
|
3213
3210
|
case "Home":
|
|
3214
|
-
|
|
3211
|
+
u.preventDefault(), T.get(0)?.focus();
|
|
3215
3212
|
break;
|
|
3216
3213
|
case "End":
|
|
3217
|
-
|
|
3214
|
+
u.preventDefault(), T.get(e.items.length - 1)?.focus();
|
|
3218
3215
|
break;
|
|
3219
3216
|
case "ArrowRight":
|
|
3220
3217
|
case "ArrowDown":
|
|
3221
|
-
|
|
3218
|
+
u.preventDefault(), K("next");
|
|
3222
3219
|
break;
|
|
3223
3220
|
case "ArrowLeft":
|
|
3224
3221
|
case "ArrowUp":
|
|
3225
|
-
|
|
3222
|
+
u.preventDefault(), K("prev");
|
|
3226
3223
|
}
|
|
3227
|
-
}, ae = D(0), Q = D({}), ne = D(null), L = D(null), R = D(e.open), Y = D(e.open), V = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), U = (
|
|
3228
|
-
y ?
|
|
3224
|
+
}, ae = D(0), Q = D({}), ne = D(null), L = D(null), R = D(e.open), Y = D(e.open), V = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Map(), U = (u, y, K) => {
|
|
3225
|
+
y ? u.set(K, y) : u.delete(K);
|
|
3229
3226
|
};
|
|
3230
3227
|
let J, ee;
|
|
3231
|
-
const ue = (
|
|
3232
|
-
typeof document > "u" || document.body.classList.toggle("is-gnb-mobile",
|
|
3228
|
+
const ue = (u) => {
|
|
3229
|
+
typeof document > "u" || document.body.classList.toggle("is-gnb-mobile", u);
|
|
3233
3230
|
}, Ee = () => {
|
|
3234
3231
|
ee && clearTimeout(ee), R.value = !0, J = setTimeout(() => {
|
|
3235
3232
|
Y.value = !0, ue(!0), s.value?.focus();
|
|
@@ -3239,49 +3236,49 @@ var _t = M({
|
|
|
3239
3236
|
R.value = !1, ue(!1);
|
|
3240
3237
|
}, we);
|
|
3241
3238
|
};
|
|
3242
|
-
se(() => e.open, (
|
|
3243
|
-
|
|
3239
|
+
se(() => e.open, (u) => {
|
|
3240
|
+
u ? Ee() : _e();
|
|
3244
3241
|
});
|
|
3245
|
-
const Ae = (
|
|
3246
|
-
|
|
3247
|
-
const K =
|
|
3242
|
+
const Ae = (u, y) => {
|
|
3243
|
+
u.preventDefault(), ae.value = y;
|
|
3244
|
+
const K = d.value, k = V.get(y);
|
|
3248
3245
|
K && k && K.scrollTo({
|
|
3249
3246
|
left: 0,
|
|
3250
3247
|
top: k.offsetTop,
|
|
3251
3248
|
behavior: "smooth"
|
|
3252
3249
|
});
|
|
3253
3250
|
}, Me = () => {
|
|
3254
|
-
const
|
|
3255
|
-
if (!
|
|
3256
|
-
const { scrollTop: y, scrollHeight: K, clientHeight: k } =
|
|
3251
|
+
const u = d.value;
|
|
3252
|
+
if (!u) return;
|
|
3253
|
+
const { scrollTop: y, scrollHeight: K, clientHeight: k } = u;
|
|
3257
3254
|
let P = ae.value;
|
|
3258
3255
|
V.forEach((q, W) => {
|
|
3259
3256
|
(y >= q.offsetTop || y + k >= K) && (P = W);
|
|
3260
3257
|
}), ae.value = P;
|
|
3261
|
-
}, Ve = (
|
|
3262
|
-
|
|
3258
|
+
}, Ve = (u, y) => {
|
|
3259
|
+
u.preventDefault(), Q.value = {
|
|
3263
3260
|
...Q.value,
|
|
3264
3261
|
[y]: !Q.value[y]
|
|
3265
3262
|
};
|
|
3266
|
-
}, Pe = async (
|
|
3267
|
-
|
|
3268
|
-
}, ye = (
|
|
3269
|
-
L.value = null, F.get(
|
|
3263
|
+
}, Pe = async (u, y) => {
|
|
3264
|
+
u.preventDefault(), ne.value = y, await ce(), L.value = y, await ce(), N.get(y)?.focus();
|
|
3265
|
+
}, ye = (u) => {
|
|
3266
|
+
L.value = null, F.get(u)?.focus(), setTimeout(() => {
|
|
3270
3267
|
L.value || (ne.value = null);
|
|
3271
3268
|
}, we);
|
|
3272
|
-
}, ze = (
|
|
3273
|
-
const K = Array.from(
|
|
3269
|
+
}, ze = (u, y) => {
|
|
3270
|
+
const K = Array.from(u.querySelectorAll(Oa));
|
|
3274
3271
|
if (!K.length) return;
|
|
3275
3272
|
const k = K[0], P = K[K.length - 1], q = document.activeElement;
|
|
3276
|
-
y.shiftKey && (q === k || q ===
|
|
3277
|
-
}, Fe = (
|
|
3278
|
-
if (
|
|
3273
|
+
y.shiftKey && (q === k || q === u) ? (y.preventDefault(), P.focus()) : !y.shiftKey && q === P && (y.preventDefault(), k.focus());
|
|
3274
|
+
}, Fe = (u) => {
|
|
3275
|
+
if (u.key === "Escape") {
|
|
3279
3276
|
L.value ? ye(L.value) : a("update:open", !1);
|
|
3280
3277
|
return;
|
|
3281
3278
|
}
|
|
3282
|
-
if (
|
|
3279
|
+
if (u.key !== "Tab") return;
|
|
3283
3280
|
const y = L.value ? z.get(L.value) : s.value;
|
|
3284
|
-
y && ze(y,
|
|
3281
|
+
y && ze(y, u);
|
|
3285
3282
|
};
|
|
3286
3283
|
ie(() => {
|
|
3287
3284
|
if (h.value) {
|
|
@@ -3289,17 +3286,17 @@ var _t = M({
|
|
|
3289
3286
|
return;
|
|
3290
3287
|
}
|
|
3291
3288
|
e.open && (R.value = !0, Y.value = !0, ue(!0));
|
|
3292
|
-
const
|
|
3289
|
+
const u = {};
|
|
3293
3290
|
e.items.forEach((y, K) => {
|
|
3294
3291
|
y.subItems?.forEach((k, P) => {
|
|
3295
|
-
k.expanded && (
|
|
3292
|
+
k.expanded && (u[`${K}-${P}`] = !0);
|
|
3296
3293
|
});
|
|
3297
|
-
}), Q.value =
|
|
3294
|
+
}), Q.value = u;
|
|
3298
3295
|
}), fe(() => {
|
|
3299
3296
|
typeof document < "u" && (document.removeEventListener("click", X), document.body.classList.remove("is-gnb-web", "hasScrollY", "is-gnb-mobile")), J && clearTimeout(J), ee && clearTimeout(ee);
|
|
3300
3297
|
});
|
|
3301
|
-
const Re = (
|
|
3302
|
-
const y =
|
|
3298
|
+
const Re = (u) => {
|
|
3299
|
+
const y = u.some((k) => !!k.description), K = u.map((k, P) => {
|
|
3303
3300
|
const q = i(k.external), W = k.external ? t("i", { class: "svg-icon ico-go" }) : null;
|
|
3304
3301
|
if (y) return t("li", { key: `link-${P}` }, [t("h3", { class: "tit" }, [t("a", {
|
|
3305
3302
|
href: k.href || "#",
|
|
@@ -3317,20 +3314,20 @@ var _t = M({
|
|
|
3317
3314
|
}, [k.text, W])]);
|
|
3318
3315
|
});
|
|
3319
3316
|
return t("ul", { class: y ? "type-description" : void 0 }, K);
|
|
3320
|
-
}, me = (
|
|
3321
|
-
const y =
|
|
3322
|
-
href:
|
|
3317
|
+
}, me = (u) => {
|
|
3318
|
+
const y = u.titleLink ? [u.title, t("a", {
|
|
3319
|
+
href: u.titleLink.href,
|
|
3323
3320
|
class: "krds-btn link basic small"
|
|
3324
|
-
}, [t("span", { class: "underline" },
|
|
3321
|
+
}, [t("span", { class: "underline" }, u.titleLink.text || "바로가기"), t("i", { class: "svg-icon ico-angle right" })])] : [t("span", u.title)];
|
|
3325
3322
|
return t("div", {
|
|
3326
|
-
id:
|
|
3323
|
+
id: u.id,
|
|
3327
3324
|
class: ["gnb-sub-list", {
|
|
3328
|
-
active:
|
|
3329
|
-
between:
|
|
3330
|
-
"single-list":
|
|
3325
|
+
active: u.active,
|
|
3326
|
+
between: u.layout === "between",
|
|
3327
|
+
"single-list": u.single
|
|
3331
3328
|
}]
|
|
3332
|
-
}, [t("div", { class: "gnb-sub-content" }, [t("h2", { class: "sub-title" }, y), Re(
|
|
3333
|
-
}, Ie = (
|
|
3329
|
+
}, [t("div", { class: "gnb-sub-content" }, [t("h2", { class: "sub-title" }, y), Re(u.linkItems)]), u.banner]);
|
|
3330
|
+
}, Ie = (u, y) => (u.subItems ?? []).map((K, k) => {
|
|
3334
3331
|
if (o(K)) {
|
|
3335
3332
|
const W = K.href ? "a" : "button";
|
|
3336
3333
|
return t("li", { key: `sub-${k}` }, [t(W, {
|
|
@@ -3351,7 +3348,7 @@ var _t = M({
|
|
|
3351
3348
|
}, K.text)]);
|
|
3352
3349
|
}
|
|
3353
3350
|
const P = A(y) === k, q = K.banner && r.banner ? t("div", { class: "gnb-sub-banner" }, r.banner({
|
|
3354
|
-
item:
|
|
3351
|
+
item: u,
|
|
3355
3352
|
subItem: K,
|
|
3356
3353
|
index: y,
|
|
3357
3354
|
subIndex: k
|
|
@@ -3378,14 +3375,14 @@ var _t = M({
|
|
|
3378
3375
|
active: P,
|
|
3379
3376
|
banner: q
|
|
3380
3377
|
})]);
|
|
3381
|
-
}), He = (
|
|
3382
|
-
const K = m.value === y, k = S(
|
|
3383
|
-
title:
|
|
3384
|
-
linkItems:
|
|
3385
|
-
layout:
|
|
3378
|
+
}), He = (u, y) => {
|
|
3379
|
+
const K = m.value === y, k = S(u), P = k ? [t("ul", {}, Ie(u, y))] : [me({
|
|
3380
|
+
title: u.title || u.text,
|
|
3381
|
+
linkItems: u.items ?? [],
|
|
3382
|
+
layout: u.layout,
|
|
3386
3383
|
single: !0,
|
|
3387
|
-
banner:
|
|
3388
|
-
item:
|
|
3384
|
+
banner: u.banner && r.banner ? t("div", { class: "gnb-sub-banner" }, r.banner({
|
|
3385
|
+
item: u,
|
|
3389
3386
|
index: y,
|
|
3390
3387
|
subIndex: -1
|
|
3391
3388
|
})) : null
|
|
@@ -3400,7 +3397,7 @@ var _t = M({
|
|
|
3400
3397
|
style: K && C.value ? { minHeight: `${C.value}px` } : void 0
|
|
3401
3398
|
}, P)]);
|
|
3402
3399
|
}, Ne = () => {
|
|
3403
|
-
const
|
|
3400
|
+
const u = e.items.map((K, k) => {
|
|
3404
3401
|
const P = f(K), q = m.value === k, W = !P && K.href ? "a" : "button", Z = t(W, {
|
|
3405
3402
|
ref: (te) => _(T, te, k),
|
|
3406
3403
|
...W === "a" ? {
|
|
@@ -3436,8 +3433,8 @@ var _t = M({
|
|
|
3436
3433
|
}, [t("div", { class: "inner" }, [t("ul", {
|
|
3437
3434
|
class: "gnb-menu",
|
|
3438
3435
|
"aria-label": e.ariaLabel
|
|
3439
|
-
},
|
|
3440
|
-
}, Oe = (
|
|
3436
|
+
}, u)]), y]);
|
|
3437
|
+
}, Oe = (u, y) => {
|
|
3441
3438
|
const K = () => ye(y);
|
|
3442
3439
|
return t("div", {
|
|
3443
3440
|
ref: (k) => U(z, k, y),
|
|
@@ -3452,14 +3449,14 @@ var _t = M({
|
|
|
3452
3449
|
type: "button",
|
|
3453
3450
|
class: "krds-btn icon trigger-close",
|
|
3454
3451
|
onClick: K
|
|
3455
|
-
}, [t("span", { class: "sr-only" }, e.closeLabel), t("i", { class: "svg-icon ico-popup-close" })])]), t("div", { class: "depth4-body" }, [t("h4", { class: "sub-title" },
|
|
3452
|
+
}, [t("span", { class: "sr-only" }, e.closeLabel), t("i", { class: "svg-icon ico-popup-close" })])]), t("div", { class: "depth4-body" }, [t("h4", { class: "sub-title" }, u.panelTitle || u.text), t("ul", { class: "depth4-ul" }, (u.items ?? []).map((k, P) => t("li", { key: `depth4-${P}` }, [t("a", {
|
|
3456
3453
|
href: k.href || "#",
|
|
3457
3454
|
...i(k.external),
|
|
3458
3455
|
class: { selected: k.selected },
|
|
3459
3456
|
onClick: (q) => g(k, q)
|
|
3460
3457
|
}, k.text)])))])]);
|
|
3461
|
-
}, qe = (
|
|
3462
|
-
const k = (
|
|
3458
|
+
}, qe = (u, y, K) => {
|
|
3459
|
+
const k = (u.items ?? []).map((P, q) => {
|
|
3463
3460
|
const W = `${y}-${K}-${q}`, Z = !!P.items?.length;
|
|
3464
3461
|
return t("li", { key: `depth3-${q}` }, [t("a", {
|
|
3465
3462
|
ref: (te) => U(F, te, W),
|
|
@@ -3479,8 +3476,8 @@ var _t = M({
|
|
|
3479
3476
|
}, P.text), Z ? Oe(P, W) : null]);
|
|
3480
3477
|
});
|
|
3481
3478
|
return t("div", { class: ["depth3-wrap", { "is-open": Q.value[`${y}-${K}`] }] }, [t("ul", {}, k)]);
|
|
3482
|
-
}, We = (
|
|
3483
|
-
const K = (
|
|
3479
|
+
}, We = (u, y) => {
|
|
3480
|
+
const K = (u.subItems ?? []).map((k, P) => {
|
|
3484
3481
|
const q = `${y}-${P}`, W = !!k.items?.length;
|
|
3485
3482
|
return t("li", { key: `sub-${P}` }, [t("a", {
|
|
3486
3483
|
href: k.href || "#",
|
|
@@ -3505,9 +3502,9 @@ var _t = M({
|
|
|
3505
3502
|
class: "gnb-sub-list",
|
|
3506
3503
|
role: "tabpanel",
|
|
3507
3504
|
"aria-labelledby": c(y)
|
|
3508
|
-
}, [t("h2", { class: "sub-title" },
|
|
3505
|
+
}, [t("h2", { class: "sub-title" }, u.title || u.text), t("ul", {}, K)]);
|
|
3509
3506
|
}, Ye = () => {
|
|
3510
|
-
const
|
|
3507
|
+
const u = e.items.map((K, k) => t("li", {
|
|
3511
3508
|
key: `tab-${k}`,
|
|
3512
3509
|
role: "none"
|
|
3513
3510
|
}, [t("a", {
|
|
@@ -3523,7 +3520,7 @@ var _t = M({
|
|
|
3523
3520
|
}, K.text)])), y = [t("div", { class: "gnb-menu" }, [t("div", { class: "menu-wrap" }, [t("ul", {
|
|
3524
3521
|
role: "tablist",
|
|
3525
3522
|
"aria-label": e.ariaLabel
|
|
3526
|
-
},
|
|
3523
|
+
}, u)]), t("div", { class: "submenu-wrap" }, e.items.map(We))]), r.bottom ? t("div", { class: "gnb-bottom" }, r.bottom()) : null];
|
|
3527
3524
|
return t("div", {
|
|
3528
3525
|
ref: n,
|
|
3529
3526
|
id: e.mobileId,
|
|
@@ -3540,7 +3537,7 @@ var _t = M({
|
|
|
3540
3537
|
}, [
|
|
3541
3538
|
t("div", { class: "gnb-header" }, r.header ? r.header() : []),
|
|
3542
3539
|
t("div", {
|
|
3543
|
-
ref:
|
|
3540
|
+
ref: d,
|
|
3544
3541
|
class: "gnb-body",
|
|
3545
3542
|
onScroll: Me
|
|
3546
3543
|
}, y),
|
|
@@ -3640,17 +3637,17 @@ var _t = M({
|
|
|
3640
3637
|
setup(e, { emit: a, slots: r }) {
|
|
3641
3638
|
const l = xe()?.uid, n = b(() => `${e.id ?? `krds-carousel-${l}`}-wrapper`);
|
|
3642
3639
|
let s = 0;
|
|
3643
|
-
const
|
|
3644
|
-
let
|
|
3640
|
+
const d = D(e.activeIndex ?? 0), h = b(() => e.spaceBetween ?? (e.variant === "banner" ? Ua : Ga)), v = b(() => e.pagination ?? (e.variant === "banner" ? "fraction" : "bullets")), w = D(!1), c = D(!1), B = D(!1), S = b(() => c.value || B.value);
|
|
3641
|
+
let $;
|
|
3645
3642
|
const f = () => {
|
|
3646
|
-
|
|
3643
|
+
$ !== void 0 && (clearInterval($), $ = void 0);
|
|
3647
3644
|
}, o = (V) => {
|
|
3648
3645
|
if (s <= 0) return;
|
|
3649
3646
|
const F = e.loop ? (V % s + s) % s : Math.min(Math.max(V, 0), s - 1);
|
|
3650
|
-
F !==
|
|
3651
|
-
}, i = () => o(
|
|
3647
|
+
F !== d.value && (d.value = F, a("update:activeIndex", F), a("change", F));
|
|
3648
|
+
}, i = () => o(d.value - 1), g = () => o(d.value + 1), m = () => {
|
|
3652
3649
|
w.value || (w.value = !0, a("play"));
|
|
3653
|
-
},
|
|
3650
|
+
}, x = () => {
|
|
3654
3651
|
w.value && (w.value = !1, a("stop"));
|
|
3655
3652
|
};
|
|
3656
3653
|
se([
|
|
@@ -3658,17 +3655,17 @@ var _t = M({
|
|
|
3658
3655
|
S,
|
|
3659
3656
|
() => e.autoplayDelay
|
|
3660
3657
|
], () => {
|
|
3661
|
-
f(), !(!w.value || S.value) && (
|
|
3662
|
-
if (!e.loop && s > 0 &&
|
|
3663
|
-
|
|
3658
|
+
f(), !(!w.value || S.value) && ($ = setInterval(() => {
|
|
3659
|
+
if (!e.loop && s > 0 && d.value >= s - 1) {
|
|
3660
|
+
x();
|
|
3664
3661
|
return;
|
|
3665
3662
|
}
|
|
3666
3663
|
g();
|
|
3667
3664
|
}, e.autoplayDelay));
|
|
3668
3665
|
}), se(() => e.autoplay, (V) => {
|
|
3669
|
-
V ? m() :
|
|
3666
|
+
V ? m() : x();
|
|
3670
3667
|
}), se(() => e.activeIndex, (V) => {
|
|
3671
|
-
typeof V != "number" || V ===
|
|
3668
|
+
typeof V != "number" || V === d.value || (d.value = s > 0 ? Math.min(Math.max(V, 0), s - 1) : V);
|
|
3672
3669
|
});
|
|
3673
3670
|
const E = D(!1);
|
|
3674
3671
|
let T;
|
|
@@ -3762,7 +3759,7 @@ var _t = M({
|
|
|
3762
3759
|
class: "swiper-button-stop",
|
|
3763
3760
|
style: w.value ? void 0 : { display: "none" },
|
|
3764
3761
|
"aria-controls": n.value,
|
|
3765
|
-
onClick:
|
|
3762
|
+
onClick: x
|
|
3766
3763
|
}, [t("span", { class: "sr-only" }, e.stopLabel)])]), Y = (V, F) => {
|
|
3767
3764
|
const z = e.variant === "banner", N = v.value !== "none", U = !!e.moreHref, J = [];
|
|
3768
3765
|
if (N && J.push(L(V, F)), e.autoplay && J.push(R()), z) {
|
|
@@ -3774,7 +3771,7 @@ var _t = M({
|
|
|
3774
3771
|
return () => {
|
|
3775
3772
|
const V = Be(r.default?.()), F = V.length;
|
|
3776
3773
|
s = F;
|
|
3777
|
-
const z = F > 0 ? Math.min(Math.max(
|
|
3774
|
+
const z = F > 0 ? Math.min(Math.max(d.value, 0), F - 1) : 0, N = e.variant === "banner";
|
|
3778
3775
|
return t("div", {
|
|
3779
3776
|
id: e.id,
|
|
3780
3777
|
class: ["krds-carousel", N ? "main-d-ban-swiper" : "vb-swiper"],
|
|
@@ -3835,8 +3832,8 @@ var _t = M({
|
|
|
3835
3832
|
change: (e) => !0
|
|
3836
3833
|
},
|
|
3837
3834
|
setup(e, { emit: a, slots: r }) {
|
|
3838
|
-
const l = oe(), n = (c) => `tab-${l}-${c}`, s = (c) => `panel-${l}-${c}`,
|
|
3839
|
-
c.disabled || c.id === h.value || (
|
|
3835
|
+
const l = oe(), n = (c) => `tab-${l}-${c}`, s = (c) => `panel-${l}-${c}`, d = D(e.tabs.find((c) => !c.disabled)?.id), h = b(() => e.modelValue ?? d.value), v = (c) => {
|
|
3836
|
+
c.disabled || c.id === h.value || (d.value = c.id, a("update:modelValue", c.id), a("change", c.id));
|
|
3840
3837
|
}, w = (c) => {
|
|
3841
3838
|
if (c.key !== "ArrowRight" && c.key !== "ArrowLeft") return;
|
|
3842
3839
|
c.preventDefault();
|
|
@@ -3923,7 +3920,7 @@ var _t = M({
|
|
|
3923
3920
|
KrdsToggleSwitch: () => At,
|
|
3924
3921
|
KrdsTooltip: () => ia,
|
|
3925
3922
|
KrdsTts: () => ba
|
|
3926
|
-
}), Te = "0.0.
|
|
3923
|
+
}), Te = "0.0.18", ll = { install(e, a = {}) {
|
|
3927
3924
|
e.provide("krds:config", a), (a.components || Object.keys(Ke)).forEach((r) => {
|
|
3928
3925
|
const l = Ke[r];
|
|
3929
3926
|
l && e.component(r, l);
|