@krds.ui/vue 0.0.17 → 0.0.19
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 +41 -2
- package/dist/krds-vue.es.js +585 -588
- package/dist/krds-vue.es.js.map +1 -1
- package/dist/types/index.d.ts +173 -17
- package/global.d.ts +22 -0
- package/package.json +20 -22
package/dist/krds-vue.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Comment as je, Fragment as Ge, Teleport as Ce, Text as Ue, computed as b, defineComponent as M, getCurrentInstance as xe, h as t, inject as Xe, nextTick as ce, onBeforeUnmount as fe, onMounted as
|
|
1
|
+
import { Comment as je, Fragment as Ge, Teleport as Ce, Text as Ue, computed as b, defineComponent as M, getCurrentInstance as xe, h as t, inject as Xe, nextTick as ce, onBeforeUnmount as fe, onMounted as re, onUnmounted as ie, provide as Qe, ref as D, useId as oe, vShow as pe, watch as se, withDirectives as ve, withModifiers as ge } from "vue";
|
|
2
2
|
var be = Object.defineProperty, Je = (e, a) => {
|
|
3
3
|
let r = {};
|
|
4
4
|
for (var l in e)
|
|
@@ -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,15 +253,15 @@ 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);
|
|
264
|
-
},
|
|
264
|
+
}, p = (S) => {
|
|
265
265
|
a("keydown", S);
|
|
266
266
|
}, w = (S) => {
|
|
267
267
|
a("keyup", S);
|
|
@@ -280,9 +280,9 @@ 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
|
-
onKeydown:
|
|
285
|
+
onKeydown: p,
|
|
286
286
|
onKeyup: w
|
|
287
287
|
};
|
|
288
288
|
return e.maxlength !== void 0 && (S.maxlength = e.maxlength), e.minlength !== void 0 && (S.minlength = e.minlength), e.type === "number" && (e.max !== void 0 && (S.max = e.max), e.min !== void 0 && (S.min = e.min), e.step !== void 0 && (S.step = e.step)), S;
|
|
@@ -405,52 +405,52 @@ 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),
|
|
409
|
-
const i = r.getFullYear(),
|
|
410
|
-
for (let m = i - 10; m <= i + 10; m++)
|
|
411
|
-
return
|
|
412
|
-
}), w = b(() => Array.from({ length: 12 }, (i,
|
|
413
|
-
s.value = 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), p = b(() => {
|
|
409
|
+
const i = r.getFullYear(), v = [];
|
|
410
|
+
for (let m = i - 10; m <= i + 10; m++) v.push(m);
|
|
411
|
+
return v;
|
|
412
|
+
}), w = b(() => Array.from({ length: 12 }, (i, v) => v + 1)), c = () => {
|
|
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
|
-
},
|
|
419
|
-
if (
|
|
420
|
-
s.value = i,
|
|
421
|
-
else if (!s.value || s.value &&
|
|
422
|
-
s.value = i,
|
|
418
|
+
}, $ = (i, v = !1) => {
|
|
419
|
+
if (v)
|
|
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
|
-
yearOptions:
|
|
434
|
+
yearOptions: p,
|
|
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
|
|
450
|
+
const v = new Date(i.replace(/\./g, "-")), m = new Date(s.value.replace(/\./g, "-")), x = new Date(d.value.replace(/\./g, "-")), K = i === s.value, E = i === d.value;
|
|
451
451
|
return {
|
|
452
|
-
isInRange:
|
|
453
|
-
isStart:
|
|
452
|
+
isInRange: v >= m && v <= x,
|
|
453
|
+
isStart: K,
|
|
454
454
|
isEnd: E
|
|
455
455
|
};
|
|
456
456
|
}
|
|
@@ -458,23 +458,23 @@ 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,
|
|
462
|
-
l = (
|
|
463
|
-
const w =
|
|
461
|
+
const { ignore: n, event: s = "click" } = typeof r == "string" ? { ignore: r } : r, d = () => {
|
|
462
|
+
l = (p) => {
|
|
463
|
+
const w = p.target;
|
|
464
464
|
e.value?.contains(w) || n && w.closest(n) || a();
|
|
465
465
|
}, document.addEventListener(s, l);
|
|
466
466
|
}, h = () => {
|
|
467
467
|
if (l) {
|
|
468
|
-
const
|
|
469
|
-
document.removeEventListener(
|
|
468
|
+
const p = typeof r == "string" ? "click" : r.event || "click";
|
|
469
|
+
document.removeEventListener(p, l), l = null;
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
|
-
return
|
|
473
|
-
|
|
472
|
+
return re(() => {
|
|
473
|
+
d();
|
|
474
474
|
}), fe(() => {
|
|
475
475
|
h();
|
|
476
476
|
}), {
|
|
477
|
-
setupGlobalListeners:
|
|
477
|
+
setupGlobalListeners: d,
|
|
478
478
|
removeGlobalListeners: h
|
|
479
479
|
};
|
|
480
480
|
}
|
|
@@ -554,10 +554,10 @@ 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: p, selectedEndDate: w, yearOptions: c, monthOptions: B, prevMonth: S, nextMonth: $, handleDateSelection: f, selectToday: o, isDateInSelectedRange: i } = ct(e.initialYear, e.initialMonth), v = () => {
|
|
558
558
|
n.value && l.value?.focus(), n.value = !1, s.value = null;
|
|
559
559
|
};
|
|
560
|
-
ft(r,
|
|
560
|
+
ft(r, v, ".calendar-conts");
|
|
561
561
|
const m = b(() => {
|
|
562
562
|
const L = [
|
|
563
563
|
"krds-input",
|
|
@@ -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"]), K = 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++) {
|
|
@@ -612,7 +612,7 @@ var vt = [
|
|
|
612
612
|
class: void 0,
|
|
613
613
|
variant: "tertiary",
|
|
614
614
|
size: "small",
|
|
615
|
-
handler:
|
|
615
|
+
handler: v
|
|
616
616
|
},
|
|
617
617
|
{
|
|
618
618
|
id: "confirm-btn",
|
|
@@ -622,22 +622,22 @@ var vt = [
|
|
|
622
622
|
size: "small",
|
|
623
623
|
handler: O
|
|
624
624
|
}
|
|
625
|
-
]),
|
|
625
|
+
]), g = (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 = () => {
|
|
632
|
-
|
|
632
|
+
p.value && (w.value && p.value !== w.value ? a("update:modelValue", `${p.value} ~ ${w.value}`) : a("update:modelValue", p.value), v());
|
|
633
633
|
}, H = () => {
|
|
634
634
|
n.value = !0, s.value = null, setTimeout(() => {
|
|
635
635
|
r.value?.querySelector(".calendar-wrap")?.focus();
|
|
636
636
|
}, 50);
|
|
637
637
|
}, G = () => {
|
|
638
|
-
n.value ?
|
|
638
|
+
n.value ? v() : H();
|
|
639
639
|
}, j = (L) => {
|
|
640
|
-
L.code === "Escape" && (s.value ? s.value = null : n.value &&
|
|
640
|
+
L.code === "Escape" && (s.value ? s.value = null : n.value && v());
|
|
641
641
|
}, X = (L) => {
|
|
642
642
|
const R = L.target;
|
|
643
643
|
a("update:modelValue", R.value), a("input", L);
|
|
@@ -648,20 +648,20 @@ 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}`,
|
|
655
655
|
"aria-label": R ? "연도 선택" : "월 선택",
|
|
656
656
|
"aria-expanded": s.value === L,
|
|
657
|
-
onClick: () =>
|
|
657
|
+
onClick: () => g(L)
|
|
658
658
|
}, F(V)), ve(t("div", { class: `calendar-select ${R ? "calendar-year-wrap" : "calendar-mon-wrap"}` }, [t("ul", { class: `sel ${L}` }, Y.map((z) => t("li", { key: z }, [t("button", {
|
|
659
659
|
type: "button",
|
|
660
660
|
class: { active: z === V },
|
|
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,
|
|
@@ -698,7 +698,7 @@ var vt = [
|
|
|
698
698
|
onClick: G
|
|
699
699
|
}, [t("span", { class: "sr-only" }, "달력 열기"), t("i", { class: "svg-icon ico-calendar" })])]), t("div", {
|
|
700
700
|
ref: r,
|
|
701
|
-
class:
|
|
701
|
+
class: K.value
|
|
702
702
|
}, [ve(t("div", {
|
|
703
703
|
class: "calendar-wrap bottom",
|
|
704
704
|
"aria-label": "달력",
|
|
@@ -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,11 +820,11 @@ 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);
|
|
827
|
-
},
|
|
827
|
+
}, p = (o) => {
|
|
828
828
|
a("blur", o);
|
|
829
829
|
}, w = (o) => {
|
|
830
830
|
a("keydown", 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
|
-
onBlur:
|
|
850
|
+
onBlur: p,
|
|
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,8 +942,8 @@ var vt = [
|
|
|
942
942
|
disabled: e.disabled || e.readonly,
|
|
943
943
|
onChange: n,
|
|
944
944
|
onFocus: s,
|
|
945
|
-
onBlur:
|
|
946
|
-
})),
|
|
945
|
+
onBlur: d
|
|
946
|
+
})), p = b(() => {
|
|
947
947
|
const c = ["form-conts"];
|
|
948
948
|
return e.state !== "default" && c.push(`is-${e.state}`), c;
|
|
949
949
|
}), w = () => {
|
|
@@ -962,7 +962,7 @@ var vt = [
|
|
|
962
962
|
};
|
|
963
963
|
return () => {
|
|
964
964
|
const c = t("select", h.value, w());
|
|
965
|
-
return e.sort ? c : t("div", { class:
|
|
965
|
+
return e.sort ? c : t("div", { class: p.value }, [c]);
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
968
|
}), bt = mt, kt = 0, St = M({
|
|
@@ -1067,28 +1067,28 @@ 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 = (
|
|
1071
|
-
const A =
|
|
1070
|
+
const r = D(!1), l = D(null), n = e.id ? `${e.id}-input` : `krds-file-upload-${++kt}`, s = (g) => g < 1024 ? `${g}B` : g < 1048576 ? `${Math.round(g / 1024)}KB` : `${(g / 1048576).toFixed(1)}MB`, d = (g) => {
|
|
1071
|
+
const A = g.split(".");
|
|
1072
1072
|
return A.length > 1 ? A.pop().toLowerCase() : "";
|
|
1073
|
-
}, h = (
|
|
1074
|
-
const A =
|
|
1075
|
-
return A ? `${I} [${A}, ${s(
|
|
1076
|
-
},
|
|
1077
|
-
if (e.maxFileSize &&
|
|
1073
|
+
}, h = (g) => {
|
|
1074
|
+
const A = d(g.name), I = A ? g.name.slice(0, -(A.length + 1)) : g.name;
|
|
1075
|
+
return A ? `${I} [${A}, ${s(g.size)}]` : `${g.name} [${s(g.size)}]`;
|
|
1076
|
+
}, p = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, w = (g) => {
|
|
1077
|
+
if (e.maxFileSize && g.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(g.name)}`, O = g.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;
|
|
1084
|
-
}, c = (
|
|
1084
|
+
}, c = (g) => {
|
|
1085
1085
|
if (e.disabled || e.readonly) return;
|
|
1086
1086
|
let A = [...e.modelValue || []];
|
|
1087
1087
|
!e.multiple && A.length > 0 && (A = []);
|
|
1088
1088
|
const I = [];
|
|
1089
|
-
for (let O = 0; O <
|
|
1090
|
-
const H =
|
|
1091
|
-
id:
|
|
1089
|
+
for (let O = 0; O < g.length && !(A.length + I.length >= e.maxFiles); O++) {
|
|
1090
|
+
const H = g[O], G = w(H), j = {
|
|
1091
|
+
id: p(),
|
|
1092
1092
|
file: H,
|
|
1093
1093
|
name: H.name,
|
|
1094
1094
|
size: H.size,
|
|
@@ -1099,28 +1099,28 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1099
1099
|
I.push(j), G ? a("file-error", j, G) : a("file-added", j);
|
|
1100
1100
|
}
|
|
1101
1101
|
I.length > 0 && a("update:modelValue", [...A, ...I]);
|
|
1102
|
-
}, B = (
|
|
1103
|
-
const A =
|
|
1102
|
+
}, B = (g) => {
|
|
1103
|
+
const A = g.target;
|
|
1104
1104
|
A.files?.length && (c(A.files), A.value = "");
|
|
1105
|
-
}, S = (
|
|
1106
|
-
e.disabled || e.readonly || !e.dragAndDrop || (
|
|
1107
|
-
},
|
|
1105
|
+
}, S = (g) => {
|
|
1106
|
+
e.disabled || e.readonly || !e.dragAndDrop || (g.preventDefault(), r.value = !0);
|
|
1107
|
+
}, $ = () => {
|
|
1108
1108
|
r.value = !1;
|
|
1109
|
-
}, f = (
|
|
1110
|
-
|
|
1109
|
+
}, f = (g) => {
|
|
1110
|
+
g.preventDefault(), r.value = !1, !(e.disabled || e.readonly || !e.dragAndDrop) && g.dataTransfer?.files && c(g.dataTransfer.files);
|
|
1111
1111
|
}, o = () => {
|
|
1112
1112
|
e.disabled || e.readonly || l.value?.click();
|
|
1113
|
-
}, i = (
|
|
1114
|
-
e.disabled || e.readonly || (a("update:modelValue", (e.modelValue || []).filter((A) => A.id !==
|
|
1115
|
-
},
|
|
1113
|
+
}, i = (g) => {
|
|
1114
|
+
e.disabled || e.readonly || (a("update:modelValue", (e.modelValue || []).filter((A) => A.id !== g)), a("file-removed", g));
|
|
1115
|
+
}, v = () => {
|
|
1116
1116
|
e.disabled || e.readonly || (a("update:modelValue", []), a("clear-all"));
|
|
1117
1117
|
}, m = b(() => {
|
|
1118
|
-
const
|
|
1119
|
-
return e.class &&
|
|
1120
|
-
}),
|
|
1118
|
+
const g = ["krds-file-upload", "line"];
|
|
1119
|
+
return e.class && g.push(e.class), g;
|
|
1120
|
+
}), x = () => t("div", { class: "file-head" }, [t("h3", { class: "tit" }, e.title), t("div", null, [t("p", null, e.description)])]), K = () => 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,
|
|
@@ -1136,55 +1136,55 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1136
1136
|
class: ["krds-btn", e.size],
|
|
1137
1137
|
disabled: e.disabled || void 0,
|
|
1138
1138
|
onClick: o
|
|
1139
|
-
}, [t("i", { class: "svg-icon ico-upload" }), "파일선택"])])])]), E = (
|
|
1139
|
+
}, [t("i", { class: "svg-icon ico-upload" }), "파일선택"])])])]), E = (g) => {
|
|
1140
1140
|
const A = [];
|
|
1141
|
-
return
|
|
1141
|
+
return g.status === "uploading" ? A.push(t("span", {
|
|
1142
1142
|
class: "krds-spinner",
|
|
1143
1143
|
role: "status"
|
|
1144
|
-
}, [t("span", { class: "sr-only" }, "업로드 중")])) :
|
|
1144
|
+
}, [t("span", { class: "sr-only" }, "업로드 중")])) : g.downloadUrl ? (e.showDownload && A.push(t("button", {
|
|
1145
1145
|
type: "button",
|
|
1146
1146
|
class: "krds-btn medium text",
|
|
1147
|
-
onClick: () => a("download",
|
|
1147
|
+
onClick: () => a("download", g)
|
|
1148
1148
|
}, ["다운로드 ", t("i", { class: "svg-icon ico-down" })])), e.showPreviewButton && A.push(t("button", {
|
|
1149
1149
|
type: "button",
|
|
1150
1150
|
class: "krds-btn medium text",
|
|
1151
|
-
onClick: () => a("preview",
|
|
1152
|
-
}, ["바로보기 ", t("i", { class: "svg-icon ico-angle right" })]))) :
|
|
1151
|
+
onClick: () => a("preview", g)
|
|
1152
|
+
}, ["바로보기 ", t("i", { class: "svg-icon ico-angle right" })]))) : g.status === "completed" ? A.push(t("span", { class: "ico-invalid complete" }, [t("em", { class: "sr-only" }, "업로드 완료")])) : e.readonly || A.push(t("button", {
|
|
1153
1153
|
type: "button",
|
|
1154
1154
|
class: "krds-btn medium text",
|
|
1155
1155
|
disabled: e.disabled || void 0,
|
|
1156
|
-
onClick: () => i(
|
|
1156
|
+
onClick: () => i(g.id)
|
|
1157
1157
|
}, ["삭제 ", t("i", { class: "svg-icon ico-delete-fill" })])), A;
|
|
1158
|
-
}, T = (
|
|
1159
|
-
const A = [t("div", { class:
|
|
1160
|
-
if (
|
|
1161
|
-
const I =
|
|
1158
|
+
}, T = (g) => {
|
|
1159
|
+
const A = [t("div", { class: g.downloadUrl ? "file-info m-column" : "file-info" }, [t("div", { class: "file-name" }, h(g)), t("div", { class: "btn-wrap" }, E(g))])];
|
|
1160
|
+
if (g.status === "error" && g.errorMessage) {
|
|
1161
|
+
const I = g.errorMessage.split(`
|
|
1162
1162
|
`), O = [];
|
|
1163
1163
|
I.forEach((H, G) => {
|
|
1164
1164
|
G > 0 && O.push(t("br")), O.push(H);
|
|
1165
1165
|
}), A.push(t("p", { class: "file-hint-invalid" }, O));
|
|
1166
1166
|
}
|
|
1167
1167
|
return t("li", {
|
|
1168
|
-
key:
|
|
1169
|
-
class:
|
|
1168
|
+
key: g.id,
|
|
1169
|
+
class: g.status === "error" ? "is-error" : void 0
|
|
1170
1170
|
}, A);
|
|
1171
|
-
}, _ = (
|
|
1172
|
-
const A =
|
|
1171
|
+
}, _ = (g) => {
|
|
1172
|
+
const A = g.filter((O) => O.status !== "error").length, I = [t("div", { class: "total" }, [t("span", { class: "current" }, `${A}개`), ` / ${e.maxFiles}개`]), t("ul", { class: "upload-list" }, g.map(T))];
|
|
1173
1173
|
return e.showClearAll && !e.readonly && I.push(t("div", { class: "upload-delete-btn" }, [t("button", {
|
|
1174
1174
|
type: "button",
|
|
1175
1175
|
class: "krds-btn xsmall tertiary",
|
|
1176
1176
|
disabled: e.disabled || void 0,
|
|
1177
|
-
onClick:
|
|
1177
|
+
onClick: v
|
|
1178
1178
|
}, ["전체 파일 삭제", t("i", { class: "svg-icon ico-angle right" })])])), t("div", { class: "file-list" }, I);
|
|
1179
1179
|
};
|
|
1180
1180
|
return () => {
|
|
1181
|
-
const
|
|
1182
|
-
e.readonly ||
|
|
1181
|
+
const g = [x()];
|
|
1182
|
+
e.readonly || g.push(K());
|
|
1183
1183
|
const A = e.modelValue || [];
|
|
1184
|
-
return A.length > 0 &&
|
|
1184
|
+
return A.length > 0 && g.push(_(A)), t("div", {
|
|
1185
1185
|
class: m.value,
|
|
1186
1186
|
style: e.style || void 0
|
|
1187
|
-
},
|
|
1187
|
+
}, g);
|
|
1188
1188
|
};
|
|
1189
1189
|
}
|
|
1190
1190
|
}), wt = St, Kt = M({
|
|
@@ -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 &&
|
|
1270
|
-
const
|
|
1268
|
+
const d = [], h = r.default?.();
|
|
1269
|
+
if (h && d.push(h), e.link || d.push(s()), e.link) {
|
|
1270
|
+
const p = {
|
|
1271
1271
|
href: e.href,
|
|
1272
1272
|
class: l.value
|
|
1273
1273
|
};
|
|
1274
|
-
return e.target && (
|
|
1274
|
+
return e.target && (p.target = e.target), e.rel && (p.rel = e.rel), t("a", p, 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,9 +1371,9 @@ 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 = (p) => {
|
|
1375
1375
|
if (e.disabled) return;
|
|
1376
|
-
const w =
|
|
1376
|
+
const w = p.target.checked;
|
|
1377
1377
|
a("update:modelValue", w), a("change", w);
|
|
1378
1378
|
}, h = b(() => e.id || l);
|
|
1379
1379
|
return () => t("div", { class: s.value }, [t("input", {
|
|
@@ -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,24 +1436,24 @@ 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) => {
|
|
1443
1443
|
if (e.disabled) return;
|
|
1444
1444
|
const c = w.target.checked;
|
|
1445
1445
|
a("update:modelValue", c);
|
|
1446
|
-
},
|
|
1446
|
+
}, p = b(() => e.id || n);
|
|
1447
1447
|
return () => {
|
|
1448
1448
|
const w = [t("input", {
|
|
1449
1449
|
type: "checkbox",
|
|
1450
|
-
id:
|
|
1450
|
+
id: p.value,
|
|
1451
1451
|
checked: s.value,
|
|
1452
1452
|
disabled: e.disabled,
|
|
1453
1453
|
onChange: h,
|
|
1454
1454
|
...r
|
|
1455
|
-
}), t("label", { for:
|
|
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:
|
|
1455
|
+
}), t("label", { for: p.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: d.value }, w);
|
|
1457
1457
|
};
|
|
1458
1458
|
}
|
|
1459
1459
|
}), zt = Pt, Ft = M({
|
|
@@ -1504,24 +1504,24 @@ 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) => {
|
|
1511
1511
|
e.disabled || c.target.checked && a("update:modelValue", e.value);
|
|
1512
|
-
},
|
|
1512
|
+
}, p = b(() => e.id || n), w = b(() => e.name);
|
|
1513
1513
|
return () => {
|
|
1514
1514
|
const c = [t("input", {
|
|
1515
1515
|
type: "radio",
|
|
1516
|
-
id:
|
|
1516
|
+
id: p.value,
|
|
1517
1517
|
name: w.value,
|
|
1518
1518
|
value: String(e.value),
|
|
1519
1519
|
checked: s.value,
|
|
1520
1520
|
disabled: e.disabled,
|
|
1521
1521
|
onChange: h,
|
|
1522
1522
|
...r
|
|
1523
|
-
}), t("label", { for:
|
|
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:
|
|
1523
|
+
}), t("label", { for: p.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: d.value }, c);
|
|
1525
1525
|
};
|
|
1526
1526
|
}
|
|
1527
1527
|
}), Rt = Ft, It = Le, Ht = M({
|
|
@@ -1542,15 +1542,15 @@ var _t = M({
|
|
|
1542
1542
|
const h = ["krds-step-wrap"];
|
|
1543
1543
|
return e.class && h.push(e.class), h;
|
|
1544
1544
|
}), l = (h) => {
|
|
1545
|
-
const
|
|
1546
|
-
return h <
|
|
1545
|
+
const p = e.modelValue || 0;
|
|
1546
|
+
return h < p ? "done" : h === p ? "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,19 +1576,19 @@ 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"),
|
|
1580
|
-
const
|
|
1581
|
-
return e.class &&
|
|
1582
|
-
}), h = (
|
|
1583
|
-
a("click",
|
|
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
|
+
const p = [s.value];
|
|
1581
|
+
return e.class && p.push(e.class), p;
|
|
1582
|
+
}), h = (p) => {
|
|
1583
|
+
a("click", p, e.step);
|
|
1584
1584
|
};
|
|
1585
1585
|
return () => {
|
|
1586
|
-
const
|
|
1586
|
+
const p = s.value === "active";
|
|
1587
1587
|
return t("li", {
|
|
1588
|
-
class:
|
|
1588
|
+
class: d.value,
|
|
1589
1589
|
onClick: h
|
|
1590
1590
|
}, [t("span", [
|
|
1591
|
-
|
|
1591
|
+
p && t("em", { class: "sr-only" }, "현재단계"),
|
|
1592
1592
|
t("i", { class: "step" }, e.step),
|
|
1593
1593
|
t("span", { class: "step-tit" }, e.title),
|
|
1594
1594
|
r.default?.()
|
|
@@ -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,10 +1710,10 @@ var _t = M({
|
|
|
1710
1710
|
o.preventDefault();
|
|
1711
1711
|
const i = document.querySelector(f.href);
|
|
1712
1712
|
if (i) {
|
|
1713
|
-
const
|
|
1713
|
+
const v = d();
|
|
1714
1714
|
if (window.scrollTo({
|
|
1715
1715
|
left: 0,
|
|
1716
|
-
top: i.getBoundingClientRect().top + window.scrollY -
|
|
1716
|
+
top: i.getBoundingClientRect().top + window.scrollY - v,
|
|
1717
1717
|
behavior: "smooth"
|
|
1718
1718
|
}), l.value = f.href, o instanceof KeyboardEvent) {
|
|
1719
1719
|
const m = i.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");
|
|
@@ -1721,26 +1721,26 @@ var _t = M({
|
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
|
-
},
|
|
1724
|
+
}, p = () => {
|
|
1725
1725
|
n.value.clear(), e.items && e.items.filter((f) => f.href.startsWith("#")).forEach((f) => {
|
|
1726
1726
|
const o = document.querySelector(f.href);
|
|
1727
1727
|
o && n.value.set(f.href, o);
|
|
1728
1728
|
});
|
|
1729
1729
|
}, w = () => {
|
|
1730
1730
|
if (!e.autoActive || !e.items || n.value.size === 0) return;
|
|
1731
|
-
const f = window.innerHeight, o = Math.ceil(f / 5), i = window.scrollY + f,
|
|
1731
|
+
const f = window.innerHeight, o = Math.ceil(f / 5), i = window.scrollY + f, v = document.body.scrollHeight, m = e.items.filter((_) => _.href.startsWith("#") && n.value.has(_.href)).map((_) => ({
|
|
1732
1732
|
href: _.href,
|
|
1733
1733
|
element: n.value.get(_.href),
|
|
1734
1734
|
item: _
|
|
1735
1735
|
}));
|
|
1736
1736
|
if (m.length === 0) return;
|
|
1737
|
-
const
|
|
1737
|
+
const x = m[0], K = m[m.length - 1], E = x.element.offsetTop;
|
|
1738
1738
|
let T = "";
|
|
1739
|
-
if (i >=
|
|
1740
|
-
else if (window.scrollY <= E) T =
|
|
1739
|
+
if (i >= v) T = K.href;
|
|
1740
|
+
else if (window.scrollY <= E) T = x.href;
|
|
1741
1741
|
else for (const _ of m) {
|
|
1742
|
-
const
|
|
1743
|
-
if (window.scrollY > A && window.scrollY <= A +
|
|
1742
|
+
const g = _.element.offsetHeight, A = _.element.offsetTop - o;
|
|
1743
|
+
if (window.scrollY > A && window.scrollY <= A + g) {
|
|
1744
1744
|
T = _.href;
|
|
1745
1745
|
break;
|
|
1746
1746
|
}
|
|
@@ -1751,20 +1751,20 @@ var _t = M({
|
|
|
1751
1751
|
const f = e.items.find((o) => o.active);
|
|
1752
1752
|
f ? l.value = f.href : e.items.length > 0 && (l.value = e.items[0].href);
|
|
1753
1753
|
};
|
|
1754
|
-
|
|
1754
|
+
re(() => {
|
|
1755
1755
|
if (c(), e.autoActive) {
|
|
1756
|
-
|
|
1756
|
+
p(), w(), window.addEventListener("scroll", w, { passive: !0 });
|
|
1757
1757
|
const f = new MutationObserver(() => {
|
|
1758
|
-
|
|
1758
|
+
p();
|
|
1759
1759
|
});
|
|
1760
1760
|
f.observe(document.body, {
|
|
1761
1761
|
childList: !0,
|
|
1762
1762
|
subtree: !0
|
|
1763
|
-
}),
|
|
1763
|
+
}), ie(() => {
|
|
1764
1764
|
f.disconnect();
|
|
1765
1765
|
});
|
|
1766
1766
|
}
|
|
1767
|
-
}),
|
|
1767
|
+
}), ie(() => {
|
|
1768
1768
|
e.autoActive && (window.removeEventListener("scroll", w), n.value.clear());
|
|
1769
1769
|
});
|
|
1770
1770
|
const B = () => !e.caption && !e.title ? null : t("div", { class: "in-page-navigation-header" }, [e.caption && t("p", { class: "quick-caption" }, e.caption), e.title && t("p", { class: "quick-title" }, e.title)]), S = () => {
|
|
@@ -1774,18 +1774,18 @@ var _t = M({
|
|
|
1774
1774
|
return t("li", { key: o.href }, [t("a", {
|
|
1775
1775
|
href: o.href,
|
|
1776
1776
|
class: i ? "active" : "",
|
|
1777
|
-
onClick: (
|
|
1778
|
-
onKeydown: (
|
|
1779
|
-
(
|
|
1777
|
+
onClick: (v) => h(o, v),
|
|
1778
|
+
onKeydown: (v) => {
|
|
1779
|
+
(v.key === "Enter" || v.key === " ") && (v.preventDefault(), h(o, v));
|
|
1780
1780
|
}
|
|
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,86 +1830,83 @@ 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
|
-
}),
|
|
1840
|
-
const { max:
|
|
1841
|
-
if (
|
|
1839
|
+
}), p = b(() => {
|
|
1840
|
+
const { max: $ } = e, f = e.pageRange ?? Se, o = 1, i = [];
|
|
1841
|
+
if ($ <= f + 2) for (let v = r.value; v <= $; v++) i.push({
|
|
1842
1842
|
type: "page",
|
|
1843
|
-
key: `page-${
|
|
1844
|
-
page:
|
|
1843
|
+
key: `page-${v}`,
|
|
1844
|
+
page: v,
|
|
1845
1845
|
href: "#"
|
|
1846
1846
|
});
|
|
1847
1847
|
else {
|
|
1848
|
-
const
|
|
1849
|
-
for (let
|
|
1848
|
+
const v = Math.min(o, $), m = Math.max($ - o + 1, 1), x = Math.max(r.value, l.value - Math.floor(f / 2)), K = Math.min($, x + f - 1), E = Math.max(r.value, K - f + 1);
|
|
1849
|
+
for (let g = r.value; g <= v; g++) i.push({
|
|
1850
1850
|
type: "page",
|
|
1851
|
-
key: `page-${
|
|
1852
|
-
page:
|
|
1851
|
+
key: `page-${g}`,
|
|
1852
|
+
page: g,
|
|
1853
1853
|
href: "#"
|
|
1854
1854
|
});
|
|
1855
|
-
E >
|
|
1855
|
+
E > v + 1 && i.push({
|
|
1856
1856
|
type: "ellipsis",
|
|
1857
|
-
key: "ellipsis-left"
|
|
1858
|
-
ariaLabel: "페이지 생략"
|
|
1857
|
+
key: "ellipsis-left"
|
|
1859
1858
|
});
|
|
1860
|
-
const T = Math.max(E,
|
|
1861
|
-
for (let
|
|
1859
|
+
const T = Math.max(E, v + 1), _ = Math.min(K, m - 1);
|
|
1860
|
+
for (let g = T; g <= _; g++) i.push({
|
|
1862
1861
|
type: "page",
|
|
1863
|
-
key: `page-${
|
|
1864
|
-
page:
|
|
1862
|
+
key: `page-${g}`,
|
|
1863
|
+
page: g,
|
|
1865
1864
|
href: "#"
|
|
1866
1865
|
});
|
|
1867
|
-
|
|
1866
|
+
K < m - 1 && i.push({
|
|
1868
1867
|
type: "ellipsis",
|
|
1869
|
-
key: "ellipsis-right"
|
|
1870
|
-
ariaLabel: "페이지 생략"
|
|
1868
|
+
key: "ellipsis-right"
|
|
1871
1869
|
});
|
|
1872
|
-
for (let
|
|
1870
|
+
for (let g = m; g <= $; g++) i.push({
|
|
1873
1871
|
type: "page",
|
|
1874
|
-
key: `page-${
|
|
1875
|
-
page:
|
|
1872
|
+
key: `page-${g}`,
|
|
1873
|
+
page: g,
|
|
1876
1874
|
href: "#"
|
|
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",
|
|
@@ -1925,7 +1922,7 @@ var _t = M({
|
|
|
1925
1922
|
],
|
|
1926
1923
|
onClick: c
|
|
1927
1924
|
}, "이전"),
|
|
1928
|
-
t("div", { class: "page-links" },
|
|
1925
|
+
t("div", { class: "page-links" }, p.value.map(S)),
|
|
1929
1926
|
t(s.value ? "span" : "a", {
|
|
1930
1927
|
href: s.value ? void 0 : h.value,
|
|
1931
1928
|
class: [
|
|
@@ -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 =
|
|
1989
|
-
c(), o ||
|
|
1990
|
-
},
|
|
1991
|
-
!n.value || !l.value || (
|
|
1984
|
+
const r = D(), l = D(), n = D(), s = D(), d = D(!1), h = () => {
|
|
1985
|
+
const o = d.value;
|
|
1986
|
+
c(), o || p();
|
|
1987
|
+
}, p = () => {
|
|
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
|
-
o.forEach((
|
|
1997
|
-
|
|
1998
|
-
}), i.forEach((
|
|
1999
|
-
|
|
2000
|
-
}),
|
|
1993
|
+
o.forEach((v) => {
|
|
1994
|
+
v.style.display = "none";
|
|
1995
|
+
}), i.forEach((v) => {
|
|
1996
|
+
v.setAttribute("aria-expanded", "false");
|
|
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
|
|
2006
|
-
n.value.style.left = `-${m}px`, n.value.style.width = `${
|
|
2002
|
+
const v = getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0], m = i.getBoundingClientRect().left - parseInt(v), x = document.body.clientWidth - parseInt(v) * 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
|
-
return
|
|
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",
|
|
2018
|
-
}),
|
|
2019
|
-
document.removeEventListener("keydown", S), document.removeEventListener("click",
|
|
2013
|
+
return re(() => {
|
|
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));
|
|
2015
|
+
}), ie(() => {
|
|
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]
|
|
@@ -2070,20 +2067,20 @@ var _t = M({
|
|
|
2070
2067
|
},
|
|
2071
2068
|
setup(e, { emit: a, slots: r }) {
|
|
2072
2069
|
const l = b(() => {
|
|
2073
|
-
const
|
|
2074
|
-
return e.stepsData &&
|
|
2070
|
+
const p = e.activeStep - 1;
|
|
2071
|
+
return e.stepsData && p >= 0 && p < e.stepsData.length ? e.stepsData[p] : null;
|
|
2075
2072
|
}), n = () => {
|
|
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
|
-
const
|
|
2083
|
-
return e.modelValue !== e.activeStep || !
|
|
2079
|
+
const p = l.value;
|
|
2080
|
+
return e.modelValue !== e.activeStep || !p ? null : t("div", { class: "coach-balloon" }, [
|
|
2084
2081
|
t("h5", { class: "sr-only" }, "따라하기 가이드"),
|
|
2085
|
-
t("h6", { class: "coach-tit" }, `${e.activeStep}단계 : ${
|
|
2086
|
-
t("p", { class: "desc" },
|
|
2082
|
+
t("h6", { class: "coach-tit" }, `${e.activeStep}단계 : ${p.title}`),
|
|
2083
|
+
t("p", { class: "desc" }, p.description),
|
|
2087
2084
|
t("div", { class: "coach-controls" }, [t("div", { class: "num" }, [
|
|
2088
2085
|
t("span", { class: "sr-only" }, "현재 단계"),
|
|
2089
2086
|
t("strong", null, String(e.activeStep)),
|
|
@@ -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), p = 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: K, clientWidth: E } = l.value, { top: T, left: _, right: g, 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 -
|
|
2151
|
+
h.value || e.box || e.vertical ? (T + A > H ? (G = T - K - x, X.push("top")) : (G = T + A + x, X.push("bottom")), _ + I > O ? (j = g - 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 - K) / 2, _ + I > O ? (j = _ - E - x, X.push("right")) : j = g + 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 = {};
|
|
@@ -2166,24 +2163,24 @@ var _t = M({
|
|
|
2166
2163
|
(m.key === "Escape" || m.key === "Esc") && n.value && f();
|
|
2167
2164
|
}, i = () => {
|
|
2168
2165
|
h.value = B(), n.value && f();
|
|
2169
|
-
},
|
|
2166
|
+
}, v = () => {
|
|
2170
2167
|
n.value && f();
|
|
2171
2168
|
};
|
|
2172
|
-
return
|
|
2173
|
-
h.value = B(), document.addEventListener("keydown", o), window.addEventListener("scroll",
|
|
2174
|
-
}),
|
|
2175
|
-
document.removeEventListener("keydown", o), window.removeEventListener("scroll",
|
|
2169
|
+
return re(() => {
|
|
2170
|
+
h.value = B(), document.addEventListener("keydown", o), window.addEventListener("scroll", v), window.addEventListener("resize", i);
|
|
2171
|
+
}), ie(() => {
|
|
2172
|
+
document.removeEventListener("keydown", o), window.removeEventListener("scroll", v), window.removeEventListener("resize", i);
|
|
2176
2173
|
}), () => t("div", { ref: r }, [t("button", {
|
|
2177
2174
|
type: "button",
|
|
2178
|
-
class:
|
|
2175
|
+
class: p.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,35 +2217,35 @@ 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;
|
|
2227
|
-
},
|
|
2224
|
+
}, p = (i) => {
|
|
2228
2225
|
a("update:modelValue", i), h(), a("close"), s.value?.focus();
|
|
2229
2226
|
}, w = () => {
|
|
2230
2227
|
if (!n.value) return;
|
|
2231
2228
|
const i = n.value.querySelector(".drop-menu");
|
|
2232
2229
|
if (!i) return;
|
|
2233
|
-
const
|
|
2234
|
-
n.value.classList.remove("drop-left", "drop-right"),
|
|
2230
|
+
const v = i.getBoundingClientRect(), m = window.innerWidth;
|
|
2231
|
+
n.value.classList.remove("drop-left", "drop-right"), v.left < 0 ? n.value.classList.add("drop-left") : m < v.left + v.width && n.value.classList.add("drop-right");
|
|
2235
2232
|
}, c = (i) => {
|
|
2236
2233
|
i.key === "Escape" && (h(), s.value?.focus());
|
|
2237
2234
|
}, B = (i) => {
|
|
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";
|
|
2245
2242
|
});
|
|
2246
|
-
const
|
|
2247
|
-
|
|
2243
|
+
const v = i.target;
|
|
2244
|
+
v.style.zIndex = "1";
|
|
2248
2245
|
};
|
|
2249
2246
|
se(l, (i) => {
|
|
2250
2247
|
i ? (document.addEventListener("keydown", c), document.addEventListener("click", B)) : (document.removeEventListener("keydown", c), document.removeEventListener("click", B));
|
|
2251
|
-
}),
|
|
2248
|
+
}), ie(() => {
|
|
2252
2249
|
document.removeEventListener("keydown", c), document.removeEventListener("click", B);
|
|
2253
2250
|
});
|
|
2254
2251
|
const f = () => t("ul", { class: "drop-list" }, e.languageList.map((i) => t("li", { key: i.code }, [t("a", {
|
|
@@ -2256,8 +2253,8 @@ var _t = M({
|
|
|
2256
2253
|
class: ["item-link", { active: e.modelValue === i.code }],
|
|
2257
2254
|
lang: i.code,
|
|
2258
2255
|
"aria-selected": e.modelValue === i.code,
|
|
2259
|
-
onClick: ge(() =>
|
|
2260
|
-
onFocus:
|
|
2256
|
+
onClick: ge(() => p(i.code), ["prevent"]),
|
|
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: "작게",
|
|
@@ -2336,37 +2333,37 @@ var _t = M({
|
|
|
2336
2333
|
}
|
|
2337
2334
|
], h = () => {
|
|
2338
2335
|
r.value = !r.value, r.value && l.value && B();
|
|
2339
|
-
},
|
|
2336
|
+
}, p = () => {
|
|
2340
2337
|
r.value = !1;
|
|
2341
2338
|
}, w = (i) => {
|
|
2342
|
-
|
|
2339
|
+
p(), 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((v) => v.key === "md");
|
|
2345
2342
|
i && w(i);
|
|
2346
2343
|
}, B = () => {
|
|
2347
2344
|
if (!l.value) return;
|
|
2348
2345
|
const i = l.value.querySelector(".drop-menu");
|
|
2349
2346
|
if (!i) return;
|
|
2350
|
-
const
|
|
2351
|
-
l.value.classList.remove("drop-left", "drop-right"),
|
|
2347
|
+
const v = i.getBoundingClientRect(), m = window.innerWidth;
|
|
2348
|
+
l.value.classList.remove("drop-left", "drop-right"), v.left < 0 ? l.value.classList.add("drop-left") : m < v.left + v.width && l.value.classList.add("drop-right");
|
|
2352
2349
|
}, S = (i) => {
|
|
2353
|
-
i.key === "Escape" && (
|
|
2354
|
-
},
|
|
2355
|
-
l.value?.contains(i.target) ||
|
|
2350
|
+
i.key === "Escape" && (p(), n.value?.focus());
|
|
2351
|
+
}, $ = (i) => {
|
|
2352
|
+
l.value?.contains(i.target) || p();
|
|
2356
2353
|
}, f = (i) => {
|
|
2357
|
-
l.value?.contains(i.relatedTarget) ||
|
|
2354
|
+
l.value?.contains(i.relatedTarget) || p();
|
|
2358
2355
|
}, o = (i) => {
|
|
2359
2356
|
if (!l.value) return;
|
|
2360
2357
|
l.value.querySelectorAll(".drop-list .item-link").forEach((m) => {
|
|
2361
2358
|
m.style.position = "relative", m.style.zIndex = "0";
|
|
2362
2359
|
});
|
|
2363
|
-
const
|
|
2364
|
-
|
|
2360
|
+
const v = i.target;
|
|
2361
|
+
v.style.zIndex = "1";
|
|
2365
2362
|
};
|
|
2366
2363
|
return se(r, (i) => {
|
|
2367
|
-
i ? (document.addEventListener("keydown", S), document.addEventListener("click",
|
|
2368
|
-
}),
|
|
2369
|
-
document.removeEventListener("keydown", S), document.removeEventListener("click",
|
|
2364
|
+
i ? (document.addEventListener("keydown", S), document.addEventListener("click", $)) : (document.removeEventListener("keydown", S), document.removeEventListener("click", $));
|
|
2365
|
+
}), ie(() => {
|
|
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",
|
|
@@ -2435,53 +2432,53 @@ var _t = M({
|
|
|
2435
2432
|
setup(e, { slots: a, emit: r }) {
|
|
2436
2433
|
const l = xe()?.uid, n = b(() => e.modalId ?? `krds-modal-${l}`), s = b({
|
|
2437
2434
|
get: () => e.modelValue,
|
|
2438
|
-
set: (
|
|
2439
|
-
}),
|
|
2435
|
+
set: (v) => r("update:modelValue", v)
|
|
2436
|
+
}), d = b(() => `tit_${n.value}`), h = b(() => ({
|
|
2440
2437
|
small: "modal-sm",
|
|
2441
2438
|
medium: "modal-md",
|
|
2442
2439
|
large: "modal-lg"
|
|
2443
|
-
})[e.size]),
|
|
2440
|
+
})[e.size]), p = () => {
|
|
2444
2441
|
s.value = !1;
|
|
2445
2442
|
};
|
|
2446
2443
|
let w = "", c = null;
|
|
2447
|
-
const B = D(null), S = (
|
|
2448
|
-
if (!B.value ||
|
|
2449
|
-
const
|
|
2450
|
-
if (
|
|
2451
|
-
|
|
2444
|
+
const B = D(null), S = (v) => Array.from(v.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter((m) => !m.hasAttribute("disabled") && m.getAttribute("tabindex") !== "-1"), $ = (v) => {
|
|
2445
|
+
if (!B.value || v.key !== "Tab") return;
|
|
2446
|
+
const m = S(B.value);
|
|
2447
|
+
if (m.length === 0) {
|
|
2448
|
+
v.preventDefault();
|
|
2452
2449
|
return;
|
|
2453
2450
|
}
|
|
2454
|
-
const
|
|
2455
|
-
|
|
2456
|
-
}, f = (
|
|
2457
|
-
|
|
2451
|
+
const x = m[0], K = m[m.length - 1];
|
|
2452
|
+
v.shiftKey && document.activeElement === x ? (v.preventDefault(), K.focus()) : !v.shiftKey && document.activeElement === K && (v.preventDefault(), x.focus());
|
|
2453
|
+
}, f = (v) => {
|
|
2454
|
+
v.key === "Escape" && !e.persistent && p();
|
|
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;
|
|
2457
|
+
}, i = async () => {
|
|
2458
|
+
w = document.body.style.overflow, document.body.style.overflow = "hidden", c = document.activeElement, await ce();
|
|
2459
|
+
const v = document.getElementById(n.value);
|
|
2460
|
+
if (v) {
|
|
2461
|
+
B.value = v;
|
|
2462
|
+
const m = v.querySelector(".modal-conts");
|
|
2463
|
+
m && (m.setAttribute("tabindex", "-1"), m.focus()), document.addEventListener("keydown", $), document.addEventListener("keydown", f);
|
|
2464
|
+
}
|
|
2460
2465
|
};
|
|
2461
|
-
return se(() => e.modelValue,
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
const g = document.getElementById(n.value);
|
|
2465
|
-
if (g) {
|
|
2466
|
-
B.value = g;
|
|
2467
|
-
const m = g.querySelector(".modal-conts");
|
|
2468
|
-
m && (m.setAttribute("tabindex", "-1"), m.focus()), document.addEventListener("keydown", x), document.addEventListener("keydown", f);
|
|
2469
|
-
}
|
|
2470
|
-
} else o();
|
|
2471
|
-
}, { immediate: !0 }), fe(() => {
|
|
2466
|
+
return se(() => e.modelValue, (v) => v ? i() : o()), re(() => {
|
|
2467
|
+
e.modelValue && i();
|
|
2468
|
+
}), fe(() => {
|
|
2472
2469
|
e.modelValue && o();
|
|
2473
2470
|
}), () => {
|
|
2474
2471
|
if (!s.value) return null;
|
|
2475
|
-
const
|
|
2472
|
+
const v = {
|
|
2476
2473
|
id: n.value,
|
|
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
|
-
return e.full ?
|
|
2479
|
+
return e.full ? v["data-type"] = "full" : e.bottomSheet && (v["data-type"] = "bottom-sheet"), t(Ce, { to: "body" }, t("section", v, [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?.())]),
|
|
@@ -2489,11 +2486,11 @@ var _t = M({
|
|
|
2489
2486
|
t("button", {
|
|
2490
2487
|
type: "button",
|
|
2491
2488
|
class: "krds-btn medium icon btn-close close-modal",
|
|
2492
|
-
onClick:
|
|
2489
|
+
onClick: p
|
|
2493
2490
|
}, [t("span", { class: "sr-only" }, "닫기"), t("i", { class: "svg-icon ico-popup-close" })])
|
|
2494
2491
|
].filter(Boolean))]), t("div", {
|
|
2495
2492
|
class: e.backdrop ? "modal-back in" : "modal-back",
|
|
2496
|
-
onClick: e.persistent ? void 0 :
|
|
2493
|
+
onClick: e.persistent ? void 0 : p
|
|
2497
2494
|
})]));
|
|
2498
2495
|
};
|
|
2499
2496
|
}
|
|
@@ -2611,27 +2608,27 @@ var _t = M({
|
|
|
2611
2608
|
r.value = !0;
|
|
2612
2609
|
}, l.onend = () => {
|
|
2613
2610
|
r.value = !1, l = null, a("end");
|
|
2614
|
-
}, l.onerror = (
|
|
2615
|
-
r.value = !1, l = null,
|
|
2611
|
+
}, l.onerror = (p) => {
|
|
2612
|
+
r.value = !1, l = null, p.error !== "canceled" && a("error", new Error(p.error));
|
|
2616
2613
|
}, window.speechSynthesis.speak(l), a("play", e.text);
|
|
2617
2614
|
}
|
|
2618
|
-
},
|
|
2619
|
-
const
|
|
2620
|
-
return e.size &&
|
|
2615
|
+
}, d = b(() => {
|
|
2616
|
+
const p = ["krds-tts"];
|
|
2617
|
+
return e.size && p.push(e.size), r.value ? p.push("pause") : e.icon === "play" && p.push("play"), e.class && p.push(e.class), p;
|
|
2621
2618
|
}), h = b(() => r.value ? "ico-stop" : e.icon === "play" ? "ico-play" : "ico-volume");
|
|
2622
2619
|
return fe(() => {
|
|
2623
2620
|
n();
|
|
2624
2621
|
}), () => {
|
|
2625
|
-
const
|
|
2622
|
+
const p = [t("span", {
|
|
2626
2623
|
class: "krds-tts-icon",
|
|
2627
2624
|
"aria-hidden": "true"
|
|
2628
2625
|
}, [t("i", { class: `svg-icon ${h.value}` })])];
|
|
2629
|
-
return e.label &&
|
|
2626
|
+
return e.label && p.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
|
+
}, p);
|
|
2635
2632
|
};
|
|
2636
2633
|
}
|
|
2637
2634
|
}), ba = ma, ka = M({
|
|
@@ -2660,17 +2657,17 @@ 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) => {
|
|
2667
2664
|
if (o.style)
|
|
2668
2665
|
return typeof o.style == "function" ? o.style(f) : o.style;
|
|
2669
|
-
},
|
|
2666
|
+
}, p = (f, o) => {
|
|
2670
2667
|
const i = [];
|
|
2671
2668
|
if (o.align && i.push(`text-${o.align}`), o.classes) {
|
|
2672
|
-
const
|
|
2673
|
-
i.push(
|
|
2669
|
+
const v = typeof o.classes == "function" ? o.classes(f) : o.classes;
|
|
2670
|
+
i.push(v);
|
|
2674
2671
|
}
|
|
2675
2672
|
return i.length > 0 ? i : void 0;
|
|
2676
2673
|
}, w = () => !e.columns.length || !e.columns.some((f) => f.headerStyle && f.headerStyle.includes("width")) ? null : t("colgroup", e.columns.map((f) => {
|
|
@@ -2680,10 +2677,10 @@ 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),
|
|
2680
|
+
const i = s(o), v = d(o);
|
|
2684
2681
|
return t("th", {
|
|
2685
2682
|
scope: "col",
|
|
2686
|
-
class:
|
|
2683
|
+
class: v,
|
|
2687
2684
|
style: i
|
|
2688
2685
|
}, o.label);
|
|
2689
2686
|
});
|
|
@@ -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
|
|
2698
|
-
const
|
|
2699
|
-
return t(
|
|
2700
|
-
scope:
|
|
2694
|
+
const v = e.columns.map((m, x) => {
|
|
2695
|
+
const K = B(o, m), E = typeof K == "function" ? K() : K, T = h(o, m), _ = p(o, m);
|
|
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) }, v);
|
|
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,10 +2760,10 @@ 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(),
|
|
2769
|
-
|
|
2765
|
+
const h = l(), p = n(), w = s(), c = d(), B = [];
|
|
2766
|
+
p && B.push(p), 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", {
|
|
2772
2769
|
id: e.id,
|
|
@@ -2854,41 +2851,41 @@ 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), p = 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 = () => {
|
|
2861
2858
|
if (!h.value || !e.enableScrollDetection) return;
|
|
2862
2859
|
const f = document.querySelector("#container");
|
|
2863
2860
|
if (!f) return;
|
|
2864
|
-
const o = f.offsetTop, i = window.scrollY,
|
|
2865
|
-
i > o + Ta ?
|
|
2861
|
+
const o = f.offsetTop, i = window.scrollY, v = i > s.value, m = i < s.value;
|
|
2862
|
+
i > o + Ta ? v ? (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) => {
|
|
2874
2871
|
for (const o of f) {
|
|
2875
|
-
const { width: i, height:
|
|
2872
|
+
const { width: i, height: v } = o.contentRect;
|
|
2876
2873
|
r("resize", {
|
|
2877
2874
|
width: i,
|
|
2878
|
-
height:
|
|
2875
|
+
height: v
|
|
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
|
});
|
|
2885
|
-
return
|
|
2886
|
-
e.enableScrollDetection && (w(), window.addEventListener("scroll", B, { passive: !0 })), h.value && typeof ResizeObserver < "u" && (
|
|
2887
|
-
}),
|
|
2888
|
-
e.enableScrollDetection && window.removeEventListener("scroll", B),
|
|
2882
|
+
return re(() => {
|
|
2883
|
+
e.enableScrollDetection && (w(), window.addEventListener("scroll", B, { passive: !0 })), h.value && typeof ResizeObserver < "u" && (p.value = new ResizeObserver(S), p.value.observe(h.value));
|
|
2884
|
+
}), ie(() => {
|
|
2885
|
+
e.enableScrollDetection && window.removeEventListener("scroll", B), p.value && (p.value.disconnect(), p.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,41 +2903,41 @@ 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()),
|
|
2910
|
-
const T = `${
|
|
2911
|
-
|
|
2912
|
-
},
|
|
2913
|
-
const T = `${
|
|
2914
|
-
|
|
2915
|
-
}, w = (
|
|
2916
|
-
const T = `${
|
|
2917
|
-
|
|
2918
|
-
}, c = (
|
|
2919
|
-
a("update:modelValue", r.value.map((
|
|
2920
|
-
if (E ===
|
|
2921
|
-
const T =
|
|
2922
|
-
...
|
|
2923
|
-
expanded: !
|
|
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, K, E) => {
|
|
2907
|
+
const T = `${K}-${E}`;
|
|
2908
|
+
x ? l.value.set(T, x) : l.value.delete(T);
|
|
2909
|
+
}, p = (x, K, E) => {
|
|
2910
|
+
const T = `${K}-${E}`;
|
|
2911
|
+
x ? n.value.set(T, x) : n.value.delete(T);
|
|
2912
|
+
}, w = (x, K, E) => {
|
|
2913
|
+
const T = `${K}-${E}`;
|
|
2914
|
+
x ? s.value.set(T, x) : s.value.delete(T);
|
|
2915
|
+
}, c = (x) => {
|
|
2916
|
+
a("update:modelValue", r.value.map((K, E) => {
|
|
2917
|
+
if (E === x && K.subItems) {
|
|
2918
|
+
const T = K.expanded, _ = {
|
|
2919
|
+
...K,
|
|
2920
|
+
expanded: !K.expanded
|
|
2924
2921
|
};
|
|
2925
|
-
return T && !_.expanded && (_.subItems =
|
|
2926
|
-
...
|
|
2922
|
+
return T && !_.expanded && (_.subItems = K.subItems.map((g) => ({
|
|
2923
|
+
...g,
|
|
2927
2924
|
expanded: !1
|
|
2928
|
-
})),
|
|
2925
|
+
})), d.value = null), _;
|
|
2929
2926
|
}
|
|
2930
|
-
return
|
|
2927
|
+
return K;
|
|
2931
2928
|
}));
|
|
2932
|
-
}, B = (
|
|
2933
|
-
a("update:modelValue", r.value.map((E, T) => T ===
|
|
2929
|
+
}, B = (x, K) => {
|
|
2930
|
+
a("update:modelValue", r.value.map((E, T) => T === x && E.subItems ? {
|
|
2934
2931
|
...E,
|
|
2935
|
-
subItems: E.subItems.map((_,
|
|
2936
|
-
if (
|
|
2932
|
+
subItems: E.subItems.map((_, g) => {
|
|
2933
|
+
if (g === K && _.subItems) {
|
|
2937
2934
|
const A = {
|
|
2938
2935
|
..._,
|
|
2939
2936
|
expanded: !_.expanded
|
|
2940
2937
|
};
|
|
2941
2938
|
if (A.expanded) {
|
|
2942
|
-
const I = `${
|
|
2943
|
-
|
|
2939
|
+
const I = `${x}-${K}`;
|
|
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, K) => {
|
|
2952
|
+
a("update:modelValue", r.value.map((E, T) => T === x && E.subItems ? {
|
|
2956
2953
|
...E,
|
|
2957
|
-
subItems: E.subItems.map((_,
|
|
2958
|
-
if (
|
|
2959
|
-
if (
|
|
2960
|
-
const A =
|
|
2954
|
+
subItems: E.subItems.map((_, g) => {
|
|
2955
|
+
if (g === K && _.subItems && _.expanded) {
|
|
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,72 +2967,72 @@ var _t = M({
|
|
|
2970
2967
|
return _;
|
|
2971
2968
|
})
|
|
2972
2969
|
} : E));
|
|
2973
|
-
},
|
|
2974
|
-
const T = `${
|
|
2975
|
-
_ && !_.contains(
|
|
2976
|
-
}, f = (
|
|
2977
|
-
S(
|
|
2978
|
-
}, o = (
|
|
2979
|
-
|
|
2980
|
-
}, i = (
|
|
2981
|
-
key: `popup-item-${
|
|
2970
|
+
}, $ = (x, K, E) => {
|
|
2971
|
+
const T = `${K}-${E}`, _ = n.value.get(T);
|
|
2972
|
+
_ && !_.contains(x.relatedTarget) && S(K, E);
|
|
2973
|
+
}, f = (x, K) => {
|
|
2974
|
+
S(x, K);
|
|
2975
|
+
}, o = (x, K) => {
|
|
2976
|
+
x.onClick && x.onClick(K);
|
|
2977
|
+
}, i = (x, K, E) => x.map((T, _) => t("li", {
|
|
2978
|
+
key: `popup-item-${K}-${E}-${_}`,
|
|
2982
2979
|
role: "none"
|
|
2983
2980
|
}, t("a", {
|
|
2984
2981
|
href: T.href || "#",
|
|
2985
2982
|
class: "lnb-btn",
|
|
2986
2983
|
role: "menuitem",
|
|
2987
|
-
onClick: (
|
|
2988
|
-
}, T.text))),
|
|
2989
|
-
const _ = `lnb-subitem-${
|
|
2984
|
+
onClick: (g) => o(T, g)
|
|
2985
|
+
}, T.text))), v = (x, K) => x.map((E, T) => {
|
|
2986
|
+
const _ = `lnb-subitem-${K}-${T}`;
|
|
2990
2987
|
return t("li", {
|
|
2991
2988
|
key: _,
|
|
2992
2989
|
class: ["lnb-subitem", { active: E.expanded }],
|
|
2993
2990
|
role: "none"
|
|
2994
2991
|
}, [E.subItems ? [t("button", {
|
|
2995
|
-
ref: (
|
|
2992
|
+
ref: (g) => h(g, K, T),
|
|
2996
2993
|
type: "button",
|
|
2997
2994
|
class: "lnb-btn lnb-toggle-popup",
|
|
2998
2995
|
role: "menuitem",
|
|
2999
|
-
"aria-controls": `lnbmenu-${
|
|
2996
|
+
"aria-controls": `lnbmenu-${K}-${T}`,
|
|
3000
2997
|
"aria-expanded": E.expanded ? "true" : "false",
|
|
3001
2998
|
"aria-haspopup": "true",
|
|
3002
|
-
onClick: () => B(
|
|
2999
|
+
onClick: () => B(K, T)
|
|
3003
3000
|
}, E.text), t("div", {
|
|
3004
|
-
ref: (
|
|
3005
|
-
id: `lnbmenu-${
|
|
3001
|
+
ref: (g) => p(g, K, T),
|
|
3002
|
+
id: `lnbmenu-${K}-${T}`,
|
|
3006
3003
|
class: ["lnb-submenu-lv2", { active: E.expanded }],
|
|
3007
3004
|
role: "menu",
|
|
3008
|
-
onFocusout: (
|
|
3005
|
+
onFocusout: (g) => $(g, K, T)
|
|
3009
3006
|
}, [t("button", {
|
|
3010
|
-
ref: (
|
|
3007
|
+
ref: (g) => w(g, K, T),
|
|
3011
3008
|
type: "button",
|
|
3012
3009
|
class: "lnb-btn-tit",
|
|
3013
|
-
onClick: () => f(
|
|
3014
|
-
}, E.popupTitle || E.text), t("ul", {}, i(E.subItems || [],
|
|
3010
|
+
onClick: () => f(K, T)
|
|
3011
|
+
}, E.popupTitle || E.text), t("ul", {}, i(E.subItems || [], K, T))])] : t("a", {
|
|
3015
3012
|
href: E.href || "#",
|
|
3016
3013
|
class: ["lnb-btn", "lnb-link"],
|
|
3017
3014
|
role: "menuitem",
|
|
3018
|
-
onClick: (
|
|
3015
|
+
onClick: (g) => o(E, g)
|
|
3019
3016
|
}, E.text)]);
|
|
3020
|
-
}), m = () => r.value.map((
|
|
3021
|
-
key: `lnb-item-${
|
|
3022
|
-
class: ["lnb-item", { active:
|
|
3017
|
+
}), m = () => r.value.map((x, K) => t("li", {
|
|
3018
|
+
key: `lnb-item-${K}`,
|
|
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
|
-
"aria-controls": `lnbmenu-${
|
|
3033
|
-
"aria-expanded":
|
|
3034
|
-
onClick: () => c(
|
|
3035
|
-
},
|
|
3036
|
-
id: `lnbmenu-${
|
|
3029
|
+
"aria-controls": `lnbmenu-${K}`,
|
|
3030
|
+
"aria-expanded": x.expanded ? "true" : "false",
|
|
3031
|
+
onClick: () => c(K)
|
|
3032
|
+
}, x.text), x.subItems ? t("div", { class: "lnb-submenu" }, [t("ul", {
|
|
3033
|
+
id: `lnbmenu-${K}`,
|
|
3037
3034
|
role: "menu"
|
|
3038
|
-
},
|
|
3035
|
+
}, v(x.subItems, K))]) : 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"), p = (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
|
-
} : {},
|
|
3160
|
-
|
|
3161
|
-
}, m = D(-1),
|
|
3162
|
-
y ?
|
|
3163
|
-
},
|
|
3164
|
-
const y =
|
|
3156
|
+
} : {}, v = (u, y) => {
|
|
3157
|
+
u.onClick?.(y), a("item-click", u, y);
|
|
3158
|
+
}, m = D(-1), x = D({}), K = D(0), E = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), _ = (u, y, C) => {
|
|
3159
|
+
y ? u.set(C, y) : u.delete(C);
|
|
3160
|
+
}, g = (u) => {
|
|
3161
|
+
const y = u?.subItems?.findIndex((C) => !o(C));
|
|
3165
3162
|
return y === void 0 ? -1 : y;
|
|
3166
|
-
}, A = (
|
|
3167
|
-
const y =
|
|
3168
|
-
return y === void 0 ?
|
|
3169
|
-
}, I = (
|
|
3163
|
+
}, A = (u) => {
|
|
3164
|
+
const y = x.value[u];
|
|
3165
|
+
return y === void 0 ? g(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
|
-
|
|
3178
|
-
}, H = (
|
|
3173
|
+
const u = E.get(m.value)?.querySelector(".gnb-sub-list.active");
|
|
3174
|
+
K.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,
|
|
3182
|
-
}, G = (
|
|
3183
|
-
if (f(e.items[
|
|
3184
|
-
if (m.value ===
|
|
3178
|
+
m.value = -1, K.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,
|
|
3200
|
-
!y || !
|
|
3201
|
-
}, de = (
|
|
3202
|
-
if (
|
|
3194
|
+
!y || y.contains(u.target) || H();
|
|
3195
|
+
}, le = (u) => {
|
|
3196
|
+
const y = n.value, C = u.relatedTarget;
|
|
3197
|
+
!y || !C || y.contains(C) || H();
|
|
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
|
-
const
|
|
3205
|
+
const C = (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(), C("next");
|
|
3222
3219
|
break;
|
|
3223
3220
|
case "ArrowLeft":
|
|
3224
3221
|
case "ArrowUp":
|
|
3225
|
-
|
|
3222
|
+
u.preventDefault(), C("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, C) => {
|
|
3225
|
+
y ? u.set(C, y) : u.delete(C);
|
|
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,72 +3236,72 @@ 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
|
|
3248
|
-
|
|
3242
|
+
const Ae = (u, y) => {
|
|
3243
|
+
u.preventDefault(), ae.value = y;
|
|
3244
|
+
const C = d.value, k = V.get(y);
|
|
3245
|
+
C && k && C.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:
|
|
3251
|
+
const u = d.value;
|
|
3252
|
+
if (!u) return;
|
|
3253
|
+
const { scrollTop: y, scrollHeight: C, clientHeight: k } = u;
|
|
3257
3254
|
let P = ae.value;
|
|
3258
3255
|
V.forEach((q, W) => {
|
|
3259
|
-
(y >= q.offsetTop || y + k >=
|
|
3256
|
+
(y >= q.offsetTop || y + k >= C) && (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
|
|
3274
|
-
if (!
|
|
3275
|
-
const k =
|
|
3276
|
-
y.shiftKey && (q === k || q ===
|
|
3277
|
-
}, Fe = (
|
|
3278
|
-
if (
|
|
3269
|
+
}, ze = (u, y) => {
|
|
3270
|
+
const C = Array.from(u.querySelectorAll(Oa));
|
|
3271
|
+
if (!C.length) return;
|
|
3272
|
+
const k = C[0], P = C[C.length - 1], q = document.activeElement;
|
|
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
|
+
re(() => {
|
|
3287
3284
|
if (h.value) {
|
|
3288
3285
|
document.addEventListener("click", X);
|
|
3289
3286
|
return;
|
|
3290
3287
|
}
|
|
3291
3288
|
e.open && (R.value = !0, Y.value = !0, ue(!0));
|
|
3292
|
-
const
|
|
3293
|
-
e.items.forEach((y,
|
|
3289
|
+
const u = {};
|
|
3290
|
+
e.items.forEach((y, C) => {
|
|
3294
3291
|
y.subItems?.forEach((k, P) => {
|
|
3295
|
-
k.expanded && (
|
|
3292
|
+
k.expanded && (u[`${C}-${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), C = 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 || "#",
|
|
3306
3303
|
...q,
|
|
3307
|
-
onClick: (te) =>
|
|
3304
|
+
onClick: (te) => v(k, te)
|
|
3308
3305
|
}, [k.text, W])]), k.description ? t("p", { class: "txt" }, k.description) : null]);
|
|
3309
3306
|
const Z = k.href ? "a" : "button";
|
|
3310
3307
|
return t("li", { key: `link-${P}` }, [t(Z, {
|
|
@@ -3313,46 +3310,46 @@ var _t = M({
|
|
|
3313
3310
|
...q
|
|
3314
3311
|
} : { type: "button" },
|
|
3315
3312
|
class: { active: k.selected },
|
|
3316
|
-
onClick: (te) =>
|
|
3313
|
+
onClick: (te) => v(k, te)
|
|
3317
3314
|
}, [k.text, W])]);
|
|
3318
3315
|
});
|
|
3319
|
-
return t("ul", { class: y ? "type-description" : void 0 },
|
|
3320
|
-
}, me = (
|
|
3321
|
-
const y =
|
|
3322
|
-
href:
|
|
3316
|
+
return t("ul", { class: y ? "type-description" : void 0 }, C);
|
|
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 = (
|
|
3334
|
-
if (o(
|
|
3335
|
-
const W =
|
|
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((C, k) => {
|
|
3331
|
+
if (o(C)) {
|
|
3332
|
+
const W = C.href ? "a" : "button";
|
|
3336
3333
|
return t("li", { key: `sub-${k}` }, [t(W, {
|
|
3337
|
-
...
|
|
3338
|
-
href:
|
|
3339
|
-
...i(
|
|
3334
|
+
...C.href ? {
|
|
3335
|
+
href: C.href,
|
|
3336
|
+
...i(C.external)
|
|
3340
3337
|
} : { type: "button" },
|
|
3341
3338
|
class: [
|
|
3342
3339
|
"gnb-sub-trigger",
|
|
3343
3340
|
"is-link",
|
|
3344
3341
|
{
|
|
3345
|
-
"external-link":
|
|
3346
|
-
selected:
|
|
3342
|
+
"external-link": C.external,
|
|
3343
|
+
selected: C.selected
|
|
3347
3344
|
}
|
|
3348
3345
|
],
|
|
3349
3346
|
"data-trigger": "gnb",
|
|
3350
|
-
onClick: (Z) =>
|
|
3351
|
-
},
|
|
3347
|
+
onClick: (Z) => v(C, Z)
|
|
3348
|
+
}, C.text)]);
|
|
3352
3349
|
}
|
|
3353
|
-
const P = A(y) === k, q =
|
|
3354
|
-
item:
|
|
3355
|
-
subItem:
|
|
3350
|
+
const P = A(y) === k, q = C.banner && r.banner ? t("div", { class: "gnb-sub-banner" }, r.banner({
|
|
3351
|
+
item: u,
|
|
3352
|
+
subItem: C,
|
|
3356
3353
|
index: y,
|
|
3357
3354
|
subIndex: k
|
|
3358
3355
|
})) : null;
|
|
@@ -3360,69 +3357,69 @@ var _t = M({
|
|
|
3360
3357
|
type: "button",
|
|
3361
3358
|
class: ["gnb-sub-trigger", {
|
|
3362
3359
|
active: P,
|
|
3363
|
-
selected:
|
|
3360
|
+
selected: C.selected
|
|
3364
3361
|
}],
|
|
3365
3362
|
"data-trigger": "gnb",
|
|
3366
3363
|
"aria-controls": w(y, k),
|
|
3367
3364
|
"aria-expanded": P ? "true" : "false",
|
|
3368
3365
|
"aria-haspopup": "true",
|
|
3369
3366
|
onClick: (W) => {
|
|
3370
|
-
j(y, k),
|
|
3367
|
+
j(y, k), v(C, W);
|
|
3371
3368
|
}
|
|
3372
|
-
},
|
|
3369
|
+
}, C.text), me({
|
|
3373
3370
|
id: w(y, k),
|
|
3374
|
-
title:
|
|
3375
|
-
titleLink:
|
|
3376
|
-
linkItems:
|
|
3377
|
-
layout:
|
|
3371
|
+
title: C.title || C.text,
|
|
3372
|
+
titleLink: C.titleLink,
|
|
3373
|
+
linkItems: C.items ?? [],
|
|
3374
|
+
layout: C.layout,
|
|
3378
3375
|
active: P,
|
|
3379
3376
|
banner: q
|
|
3380
3377
|
})]);
|
|
3381
|
-
}), He = (
|
|
3382
|
-
const
|
|
3383
|
-
title:
|
|
3384
|
-
linkItems:
|
|
3385
|
-
layout:
|
|
3378
|
+
}), He = (u, y) => {
|
|
3379
|
+
const C = 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
|
|
3392
3389
|
})];
|
|
3393
3390
|
return t("div", {
|
|
3394
|
-
id:
|
|
3395
|
-
class: ["gnb-toggle-wrap", { "is-open":
|
|
3391
|
+
id: p(y),
|
|
3392
|
+
class: ["gnb-toggle-wrap", { "is-open": C }]
|
|
3396
3393
|
}, [t("div", {
|
|
3397
3394
|
ref: (q) => _(E, q, y),
|
|
3398
3395
|
class: "gnb-main-list",
|
|
3399
3396
|
...k ? { "data-has-submenu": "true" } : {},
|
|
3400
|
-
style:
|
|
3397
|
+
style: C && K.value ? { minHeight: `${K.value}px` } : void 0
|
|
3401
3398
|
}, P)]);
|
|
3402
3399
|
}, Ne = () => {
|
|
3403
|
-
const
|
|
3404
|
-
const P = f(
|
|
3400
|
+
const u = e.items.map((C, k) => {
|
|
3401
|
+
const P = f(C), q = m.value === k, W = !P && C.href ? "a" : "button", Z = t(W, {
|
|
3405
3402
|
ref: (te) => _(T, te, k),
|
|
3406
3403
|
...W === "a" ? {
|
|
3407
|
-
href:
|
|
3408
|
-
...i(
|
|
3404
|
+
href: C.href,
|
|
3405
|
+
...i(C.external)
|
|
3409
3406
|
} : { type: "button" },
|
|
3410
3407
|
class: ["gnb-main-trigger", {
|
|
3411
3408
|
active: q,
|
|
3412
3409
|
"is-link": !P,
|
|
3413
|
-
selected:
|
|
3410
|
+
selected: C.selected
|
|
3414
3411
|
}],
|
|
3415
3412
|
"data-trigger": "gnb",
|
|
3416
3413
|
...P ? {
|
|
3417
|
-
"aria-controls":
|
|
3414
|
+
"aria-controls": p(k),
|
|
3418
3415
|
"aria-expanded": q ? "true" : "false",
|
|
3419
3416
|
"aria-haspopup": "true"
|
|
3420
3417
|
} : {},
|
|
3421
3418
|
onClick: (te) => {
|
|
3422
|
-
P && G(k),
|
|
3419
|
+
P && G(k), v(C, te);
|
|
3423
3420
|
}
|
|
3424
|
-
},
|
|
3425
|
-
return t("li", { key: `main-${k}` }, [Z, P ? He(
|
|
3421
|
+
}, C.text);
|
|
3422
|
+
return t("li", { key: `main-${k}` }, [Z, P ? He(C, k) : null]);
|
|
3426
3423
|
}), y = e.backdrop && m.value !== -1 ? t(Ce, { to: "body" }, [t("div", {
|
|
3427
3424
|
class: "gnb-backdrop active",
|
|
3428
3425
|
"aria-hidden": "true"
|
|
@@ -3436,9 +3433,9 @@ 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 = (
|
|
3441
|
-
const
|
|
3436
|
+
}, u)]), y]);
|
|
3437
|
+
}, Oe = (u, y) => {
|
|
3438
|
+
const C = () => ye(y);
|
|
3442
3439
|
return t("div", {
|
|
3443
3440
|
ref: (k) => U(z, k, y),
|
|
3444
3441
|
class: ["depth4-wrap", { "is-open": L.value === y }],
|
|
@@ -3447,20 +3444,20 @@ var _t = M({
|
|
|
3447
3444
|
ref: (k) => U(N, k, y),
|
|
3448
3445
|
type: "button",
|
|
3449
3446
|
class: "krds-btn icon trigger-prev",
|
|
3450
|
-
onClick:
|
|
3447
|
+
onClick: C
|
|
3451
3448
|
}, [t("span", { class: "sr-only" }, "이전화면"), t("i", { class: "svg-icon ico-angle left" })]), t("button", {
|
|
3452
3449
|
type: "button",
|
|
3453
3450
|
class: "krds-btn icon trigger-close",
|
|
3454
|
-
onClick:
|
|
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" },
|
|
3451
|
+
onClick: C
|
|
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
|
-
onClick: (q) =>
|
|
3456
|
+
onClick: (q) => v(k, q)
|
|
3460
3457
|
}, k.text)])))])]);
|
|
3461
|
-
}, qe = (
|
|
3462
|
-
const k = (
|
|
3463
|
-
const W = `${y}-${
|
|
3458
|
+
}, qe = (u, y, C) => {
|
|
3459
|
+
const k = (u.items ?? []).map((P, q) => {
|
|
3460
|
+
const W = `${y}-${C}-${q}`, Z = !!P.items?.length;
|
|
3464
3461
|
return t("li", { key: `depth3-${q}` }, [t("a", {
|
|
3465
3462
|
ref: (te) => U(F, te, W),
|
|
3466
3463
|
href: P.href || "#",
|
|
@@ -3474,13 +3471,13 @@ var _t = M({
|
|
|
3474
3471
|
"aria-expanded": L.value === W ? "true" : "false"
|
|
3475
3472
|
} : {},
|
|
3476
3473
|
onClick: (te) => {
|
|
3477
|
-
Z && Pe(te, W),
|
|
3474
|
+
Z && Pe(te, W), v(P, te);
|
|
3478
3475
|
}
|
|
3479
3476
|
}, P.text), Z ? Oe(P, W) : null]);
|
|
3480
3477
|
});
|
|
3481
|
-
return t("div", { class: ["depth3-wrap", { "is-open": Q.value[`${y}-${
|
|
3482
|
-
}, We = (
|
|
3483
|
-
const
|
|
3478
|
+
return t("div", { class: ["depth3-wrap", { "is-open": Q.value[`${y}-${C}`] }] }, [t("ul", {}, k)]);
|
|
3479
|
+
}, We = (u, y) => {
|
|
3480
|
+
const C = (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 || "#",
|
|
@@ -3495,35 +3492,35 @@ var _t = M({
|
|
|
3495
3492
|
"aria-expanded": Q.value[q] ? "true" : "false"
|
|
3496
3493
|
} : {},
|
|
3497
3494
|
onClick: (Z) => {
|
|
3498
|
-
W && Ve(Z, q),
|
|
3495
|
+
W && Ve(Z, q), v(k, Z);
|
|
3499
3496
|
}
|
|
3500
3497
|
}, k.text), W ? qe(k, y, P) : null]);
|
|
3501
3498
|
});
|
|
3502
3499
|
return t("div", {
|
|
3503
3500
|
ref: (k) => _(V, k, y),
|
|
3504
|
-
id:
|
|
3501
|
+
id: p(y),
|
|
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", {}, C)]);
|
|
3509
3506
|
}, Ye = () => {
|
|
3510
|
-
const
|
|
3507
|
+
const u = e.items.map((C, k) => t("li", {
|
|
3511
3508
|
key: `tab-${k}`,
|
|
3512
3509
|
role: "none"
|
|
3513
3510
|
}, [t("a", {
|
|
3514
3511
|
id: c(k),
|
|
3515
|
-
href: `#${
|
|
3512
|
+
href: `#${p(k)}`,
|
|
3516
3513
|
class: ["gnb-main-trigger", { active: ae.value === k }],
|
|
3517
3514
|
role: "tab",
|
|
3518
|
-
"aria-controls":
|
|
3515
|
+
"aria-controls": p(k),
|
|
3519
3516
|
"aria-selected": ae.value === k ? "true" : "false",
|
|
3520
3517
|
onClick: (P) => {
|
|
3521
|
-
Ae(P, k),
|
|
3518
|
+
Ae(P, k), v(C, P);
|
|
3522
3519
|
}
|
|
3523
|
-
},
|
|
3520
|
+
}, C.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)), p = 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), v = () => 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,24 +3655,24 @@ 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
|
+
v();
|
|
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;
|
|
3675
3672
|
const _ = (V) => {
|
|
3676
3673
|
E.value = V.matches;
|
|
3677
|
-
},
|
|
3678
|
-
|
|
3674
|
+
}, g = b(() => E.value ? 0 : e.speed);
|
|
3675
|
+
re(() => {
|
|
3679
3676
|
typeof window < "u" && window.matchMedia && (T = window.matchMedia("(prefers-reduced-motion: reduce)"), E.value = T.matches, T.addEventListener("change", _)), e.autoplay && m();
|
|
3680
3677
|
}), fe(() => {
|
|
3681
3678
|
f(), T?.removeEventListener("change", _);
|
|
@@ -3704,7 +3701,7 @@ var _t = M({
|
|
|
3704
3701
|
gap: h.value > 0 ? `${h.value}px` : void 0,
|
|
3705
3702
|
transform: `translate3d(calc(${-V} * (100% + ${h.value}px)), 0, 0)`,
|
|
3706
3703
|
transitionProperty: "transform",
|
|
3707
|
-
transitionDuration: `${
|
|
3704
|
+
transitionDuration: `${g.value}ms`,
|
|
3708
3705
|
transitionTimingFunction: "ease-out",
|
|
3709
3706
|
willChange: "transform"
|
|
3710
3707
|
}), de = (V) => ({
|
|
@@ -3733,13 +3730,13 @@ var _t = M({
|
|
|
3733
3730
|
style: z ? de(N) : void 0,
|
|
3734
3731
|
disabled: U,
|
|
3735
3732
|
"aria-controls": n.value,
|
|
3736
|
-
onClick: N ? i :
|
|
3733
|
+
onClick: N ? i : v
|
|
3737
3734
|
}, [t("span", { class: "sr-only" }, N ? e.prevLabel : e.nextLabel)]);
|
|
3738
3735
|
}, ne = () => t("a", {
|
|
3739
3736
|
href: e.moreHref,
|
|
3740
3737
|
class: "swiper-button-more",
|
|
3741
3738
|
onClick: G
|
|
3742
|
-
}, [t("span", { class: "sr-only" }, e.moreLabel)]), L = (V, F) =>
|
|
3739
|
+
}, [t("span", { class: "sr-only" }, e.moreLabel)]), L = (V, F) => p.value === "fraction" ? t("div", { class: "swiper-pagination swiper-pagination-fraction" }, [
|
|
3743
3740
|
t("span", { class: "swiper-pagination-current" }, String(F + 1)),
|
|
3744
3741
|
t("span", { "aria-hidden": "true" }, "/"),
|
|
3745
3742
|
t("span", { class: "swiper-pagination-total" }, String(V))
|
|
@@ -3762,9 +3759,9 @@ 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
|
-
const z = e.variant === "banner", N =
|
|
3764
|
+
const z = e.variant === "banner", N = p.value !== "none", U = !!e.moreHref, J = [];
|
|
3768
3765
|
if (N && J.push(L(V, F)), e.autoplay && J.push(R()), z) {
|
|
3769
3766
|
const ee = [];
|
|
3770
3767
|
e.navigation && ee.push(Q("prev", F, !1), Q("next", F, !1)), U && ee.push(ne()), ee.length > 0 && J.push(t("div", { class: "swiper-navigation" }, ee));
|
|
@@ -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), p = (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();
|
|
@@ -3863,7 +3860,7 @@ var _t = M({
|
|
|
3863
3860
|
type: "button",
|
|
3864
3861
|
class: "btn-tab",
|
|
3865
3862
|
disabled: c.disabled || void 0,
|
|
3866
|
-
onClick: () =>
|
|
3863
|
+
onClick: () => p(c)
|
|
3867
3864
|
}, [c.label, c.id === h.value ? t("i", { class: "sr-only" }, ` ${e.selectedText}`) : null])])))]), t("div", { class: "tab-conts-wrap" }, e.tabs.map((c) => t("section", {
|
|
3868
3865
|
key: c.id,
|
|
3869
3866
|
id: s(c.id),
|
|
@@ -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.19", 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);
|