@krds.ui/vue 0.0.21 → 0.0.22
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 +4 -0
- package/dist/krds-vue.es.js +924 -889
- package/dist/krds-vue.es.js.map +1 -1
- package/dist/types/index.d.ts +154 -57
- package/global.d.ts +54 -2
- package/package.json +11 -4
- package/style.d.ts +5 -0
package/dist/krds-vue.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Comment as Je, Fragment as Ze, Teleport as Ce, Text as et, computed as C, defineComponent as
|
|
1
|
+
import { Comment as Je, Fragment as Ze, Teleport as Ce, Text as et, computed as C, defineComponent as M, getCurrentInstance as xe, h as t, inject as tt, mergeProps as Ee, nextTick as pe, onActivated as at, onBeforeUnmount as ie, onMounted as te, onUnmounted as ue, onUpdated as lt, provide as nt, ref as B, shallowRef as st, useId as de, vShow as Se, watch as se, withDirectives as ge, withModifiers as Ke } from "vue";
|
|
2
2
|
var De = Object.defineProperty, rt = (e, a) => {
|
|
3
3
|
let r = {};
|
|
4
4
|
for (var l in e)
|
|
@@ -7,7 +7,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
7
7
|
enumerable: !0
|
|
8
8
|
});
|
|
9
9
|
return a || De(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
10
|
-
}, Fe = /* @__PURE__ */
|
|
10
|
+
}, Fe = /* @__PURE__ */ M({
|
|
11
11
|
name: "KrdsButton",
|
|
12
12
|
props: {
|
|
13
13
|
type: {
|
|
@@ -48,6 +48,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
emits: { click: (e) => !0 },
|
|
51
|
+
slots: Object,
|
|
51
52
|
setup(e, { emit: a, slots: r }) {
|
|
52
53
|
const l = C(() => {
|
|
53
54
|
const s = ["krds-btn"];
|
|
@@ -62,13 +63,14 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
62
63
|
onClick: n
|
|
63
64
|
}, r.default?.());
|
|
64
65
|
}
|
|
65
|
-
}),
|
|
66
|
+
}), ot = Fe, it = /* @__PURE__ */ M({
|
|
66
67
|
name: "KrdsButtonGroup",
|
|
67
68
|
props: {},
|
|
69
|
+
slots: Object,
|
|
68
70
|
setup(e, { slots: a }) {
|
|
69
71
|
return () => t("div", { class: "btn-group" }, a.default?.());
|
|
70
72
|
}
|
|
71
|
-
}), ut = /* @__PURE__ */
|
|
73
|
+
}), ut = /* @__PURE__ */ M({
|
|
72
74
|
name: "KrdsIcon",
|
|
73
75
|
props: {
|
|
74
76
|
name: {
|
|
@@ -87,7 +89,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
87
89
|
e.class
|
|
88
90
|
].filter(Boolean).join(" ") });
|
|
89
91
|
}
|
|
90
|
-
}), dt = /* @__PURE__ */
|
|
92
|
+
}), dt = /* @__PURE__ */ M({
|
|
91
93
|
name: "KrdsFloatingButton",
|
|
92
94
|
inheritAttrs: !1,
|
|
93
95
|
props: {
|
|
@@ -121,16 +123,16 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
121
123
|
select: (e, a, r) => !0
|
|
122
124
|
},
|
|
123
125
|
setup(e, { emit: a, attrs: r }) {
|
|
124
|
-
const l =
|
|
126
|
+
const l = B(null), n = B(null), s = `floating-list-${de()}`, u = B(!1), g = (S = !1) => {
|
|
125
127
|
u.value = !1, S && n.value?.focus();
|
|
126
128
|
}, h = (S) => {
|
|
127
129
|
S.key === "Escape" && u.value && g(!0);
|
|
128
130
|
};
|
|
129
|
-
|
|
131
|
+
te(() => document.addEventListener("keydown", h)), ue(() => document.removeEventListener("keydown", h));
|
|
130
132
|
const y = (S) => {
|
|
131
133
|
const k = S.relatedTarget;
|
|
132
134
|
k && !l.value?.contains(k) && g();
|
|
133
|
-
},
|
|
135
|
+
}, c = (S, k, K = !1, m = {}) => t(S.href ? "a" : "button", Ee({
|
|
134
136
|
class: "floating-action",
|
|
135
137
|
...S.href ? {
|
|
136
138
|
href: S.href,
|
|
@@ -152,7 +154,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
152
154
|
return t("div", {
|
|
153
155
|
class: ["krds-floating-button", k],
|
|
154
156
|
style: K
|
|
155
|
-
}, [
|
|
157
|
+
}, [c({
|
|
156
158
|
label: e.label,
|
|
157
159
|
icon: e.icon,
|
|
158
160
|
href: e.href,
|
|
@@ -187,7 +189,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
187
189
|
ge(t("ul", {
|
|
188
190
|
id: s,
|
|
189
191
|
class: "floating-list"
|
|
190
|
-
}, S.map((k, K) => t("li", { key: K }, [
|
|
192
|
+
}, S.map((k, K) => t("li", { key: K }, [c(k, (m) => {
|
|
191
193
|
g(!0), a("select", k, K, m);
|
|
192
194
|
const v = k.href?.startsWith("#") ? decodeURIComponent(k.href.slice(1)) : "";
|
|
193
195
|
v && !m.defaultPrevented && document.getElementById(v) && document.activeElement === n.value && n.value?.blur();
|
|
@@ -195,7 +197,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
195
197
|
]);
|
|
196
198
|
};
|
|
197
199
|
}
|
|
198
|
-
}), ct = dt, ft = /* @__PURE__ */
|
|
200
|
+
}), ct = dt, ft = /* @__PURE__ */ M({
|
|
199
201
|
name: "KrdsLink",
|
|
200
202
|
props: {
|
|
201
203
|
href: {
|
|
@@ -232,6 +234,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
232
234
|
}
|
|
233
235
|
},
|
|
234
236
|
emits: { click: (e) => !0 },
|
|
237
|
+
slots: Object,
|
|
235
238
|
setup(e, { emit: a, slots: r }) {
|
|
236
239
|
const l = C(() => {
|
|
237
240
|
const u = ["krds-btn"];
|
|
@@ -250,7 +253,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
250
253
|
onClick: s
|
|
251
254
|
}, r.default?.());
|
|
252
255
|
}
|
|
253
|
-
}), Pe = /* @__PURE__ */
|
|
256
|
+
}), Pe = /* @__PURE__ */ M({
|
|
254
257
|
name: "KrdsSpinner",
|
|
255
258
|
props: { label: {
|
|
256
259
|
type: String,
|
|
@@ -263,7 +266,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
263
266
|
role: "status"
|
|
264
267
|
}, e);
|
|
265
268
|
}
|
|
266
|
-
}), vt = /* @__PURE__ */
|
|
269
|
+
}), vt = /* @__PURE__ */ M({
|
|
267
270
|
name: "KrdsInput",
|
|
268
271
|
props: {
|
|
269
272
|
modelValue: {
|
|
@@ -356,6 +359,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
356
359
|
keydown: (e) => !0,
|
|
357
360
|
keyup: (e) => !0
|
|
358
361
|
},
|
|
362
|
+
slots: Object,
|
|
359
363
|
setup(e, { emit: a, slots: r }) {
|
|
360
364
|
const l = C(() => {
|
|
361
365
|
const k = ["krds-input"];
|
|
@@ -373,7 +377,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
373
377
|
a("keydown", k);
|
|
374
378
|
}, y = (k) => {
|
|
375
379
|
a("keyup", k);
|
|
376
|
-
},
|
|
380
|
+
}, c = C(() => {
|
|
377
381
|
const k = {
|
|
378
382
|
type: e.type,
|
|
379
383
|
class: l.value,
|
|
@@ -399,11 +403,11 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
399
403
|
return e.state !== "default" && k.push(`is-${e.state}`), e.icon && k.push("btn-ico-wrap"), k;
|
|
400
404
|
});
|
|
401
405
|
return () => {
|
|
402
|
-
const k = [t("input",
|
|
406
|
+
const k = [t("input", c.value)];
|
|
403
407
|
return e.loading ? t("div", { class: S.value }, [t("div", { class: "form-spinner" }, [...k, t(Pe)])]) : (r.default && k.push(...r.default()), t("div", { class: S.value }, k));
|
|
404
408
|
};
|
|
405
409
|
}
|
|
406
|
-
}), pt = vt, ht = /* @__PURE__ */
|
|
410
|
+
}), pt = vt, ht = /* @__PURE__ */ M({
|
|
407
411
|
name: "KrdsFormLabel",
|
|
408
412
|
props: {
|
|
409
413
|
for: {
|
|
@@ -424,6 +428,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
424
428
|
}
|
|
425
429
|
},
|
|
426
430
|
emits: { click: (e) => !0 },
|
|
431
|
+
slots: Object,
|
|
427
432
|
setup(e, { emit: a, slots: r }) {
|
|
428
433
|
const l = (n) => {
|
|
429
434
|
a("click", n);
|
|
@@ -436,7 +441,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
436
441
|
onClick: l
|
|
437
442
|
}, r.default?.())]);
|
|
438
443
|
}
|
|
439
|
-
}), gt = ht, yt = /* @__PURE__ */
|
|
444
|
+
}), gt = ht, yt = /* @__PURE__ */ M({
|
|
440
445
|
name: "KrdsFormHint",
|
|
441
446
|
props: {
|
|
442
447
|
type: {
|
|
@@ -457,6 +462,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
457
462
|
}
|
|
458
463
|
},
|
|
459
464
|
emits: { click: (e) => !0 },
|
|
465
|
+
slots: Object,
|
|
460
466
|
setup(e, { emit: a, slots: r }) {
|
|
461
467
|
const l = (s) => {
|
|
462
468
|
a("click", s);
|
|
@@ -484,7 +490,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
484
490
|
onClick: l
|
|
485
491
|
}, r.default?.());
|
|
486
492
|
}
|
|
487
|
-
}), mt = yt, bt = /* @__PURE__ */
|
|
493
|
+
}), mt = yt, bt = /* @__PURE__ */ M({
|
|
488
494
|
name: "KrdsFormGroup",
|
|
489
495
|
props: {
|
|
490
496
|
class: {
|
|
@@ -500,6 +506,7 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
500
506
|
default: void 0
|
|
501
507
|
}
|
|
502
508
|
},
|
|
509
|
+
slots: Object,
|
|
503
510
|
setup(e, { slots: a }) {
|
|
504
511
|
const r = C(() => {
|
|
505
512
|
const l = ["form-group"];
|
|
@@ -513,24 +520,24 @@ var De = Object.defineProperty, rt = (e, a) => {
|
|
|
513
520
|
}
|
|
514
521
|
}), kt = bt;
|
|
515
522
|
function St(e, a) {
|
|
516
|
-
const r = /* @__PURE__ */ new Date(), l =
|
|
517
|
-
const
|
|
518
|
-
for (let p =
|
|
519
|
-
return
|
|
520
|
-
}), y = C(() => Array.from({ length: 12 }, (
|
|
523
|
+
const r = /* @__PURE__ */ new Date(), l = B(e || r.getFullYear()), n = B(a || r.getMonth() + 1), s = B(null), u = B(null), g = B(null), h = C(() => {
|
|
524
|
+
const i = r.getFullYear(), o = [];
|
|
525
|
+
for (let p = i - 10; p <= i + 10; p++) o.push(p);
|
|
526
|
+
return o;
|
|
527
|
+
}), y = C(() => Array.from({ length: 12 }, (i, o) => o + 1)), c = () => {
|
|
521
528
|
s.value = null, u.value = null;
|
|
522
529
|
}, S = () => {
|
|
523
530
|
n.value === 1 ? (n.value = 12, l.value -= 1) : n.value -= 1;
|
|
524
531
|
}, k = () => {
|
|
525
532
|
n.value === 12 ? (n.value = 1, l.value += 1) : n.value += 1;
|
|
526
|
-
}, K = (
|
|
527
|
-
if (
|
|
528
|
-
s.value =
|
|
533
|
+
}, K = (i, o = !1) => {
|
|
534
|
+
if (o)
|
|
535
|
+
s.value = i, u.value = i;
|
|
529
536
|
else if (!s.value || s.value && u.value)
|
|
530
|
-
s.value =
|
|
537
|
+
s.value = i, u.value = null;
|
|
531
538
|
else {
|
|
532
539
|
const p = new Date(s.value.replace(/\./g, "-"));
|
|
533
|
-
new Date(
|
|
540
|
+
new Date(i.replace(/\./g, "-")) < p ? (s.value = i, u.value = null) : u.value = i;
|
|
534
541
|
}
|
|
535
542
|
};
|
|
536
543
|
return {
|
|
@@ -541,31 +548,31 @@ function St(e, a) {
|
|
|
541
548
|
activeDateSelector: g,
|
|
542
549
|
yearOptions: h,
|
|
543
550
|
monthOptions: y,
|
|
544
|
-
clearDateSelection:
|
|
551
|
+
clearDateSelection: c,
|
|
545
552
|
prevMonth: S,
|
|
546
553
|
nextMonth: k,
|
|
547
554
|
handleDateSelection: K,
|
|
548
555
|
selectToday: () => {
|
|
549
|
-
const
|
|
550
|
-
K(
|
|
556
|
+
const i = `${r.getFullYear()}.${String(r.getMonth() + 1).padStart(2, "0")}.${String(r.getDate()).padStart(2, "0")}`;
|
|
557
|
+
K(i, !0);
|
|
551
558
|
},
|
|
552
|
-
isDateInSelectedRange: (
|
|
559
|
+
isDateInSelectedRange: (i) => {
|
|
553
560
|
if (!s.value) return {
|
|
554
561
|
isInRange: !1,
|
|
555
562
|
isStart: !1,
|
|
556
563
|
isEnd: !1
|
|
557
564
|
};
|
|
558
|
-
const
|
|
565
|
+
const o = i === s.value;
|
|
559
566
|
if (!u.value) return {
|
|
560
|
-
isInRange:
|
|
561
|
-
isStart:
|
|
567
|
+
isInRange: o,
|
|
568
|
+
isStart: o,
|
|
562
569
|
isEnd: !1
|
|
563
570
|
};
|
|
564
|
-
const p = new Date(
|
|
571
|
+
const p = new Date(i.replace(/\./g, "-")), V = new Date(s.value.replace(/\./g, "-")), A = new Date(u.value.replace(/\./g, "-")), E = i === u.value;
|
|
565
572
|
return {
|
|
566
|
-
isInRange: p >=
|
|
567
|
-
isStart:
|
|
568
|
-
isEnd:
|
|
573
|
+
isInRange: p >= V && p <= A,
|
|
574
|
+
isStart: o,
|
|
575
|
+
isEnd: E
|
|
569
576
|
};
|
|
570
577
|
}
|
|
571
578
|
};
|
|
@@ -583,9 +590,9 @@ function wt(e, a, r = {}) {
|
|
|
583
590
|
document.removeEventListener(h, l), l = null;
|
|
584
591
|
}
|
|
585
592
|
};
|
|
586
|
-
return
|
|
593
|
+
return te(() => {
|
|
587
594
|
u();
|
|
588
|
-
}),
|
|
595
|
+
}), ie(() => {
|
|
589
596
|
g();
|
|
590
597
|
}), {
|
|
591
598
|
setupGlobalListeners: u,
|
|
@@ -600,7 +607,7 @@ var Kt = [
|
|
|
600
607
|
"목",
|
|
601
608
|
"금",
|
|
602
609
|
"토"
|
|
603
|
-
], ke = /* @__PURE__ */ new Set(), Ct = /* @__PURE__ */
|
|
610
|
+
], ke = /* @__PURE__ */ new Set(), Ct = /* @__PURE__ */ M({
|
|
604
611
|
name: "KrdsDateInput",
|
|
605
612
|
props: {
|
|
606
613
|
modelValue: {
|
|
@@ -672,8 +679,8 @@ var Kt = [
|
|
|
672
679
|
blur: (e) => !0
|
|
673
680
|
},
|
|
674
681
|
setup(e, { emit: a }) {
|
|
675
|
-
const r =
|
|
676
|
-
|
|
682
|
+
const r = B(), l = B(), n = B(!1), s = B(null), u = B(!0), g = B(), h = B(!1);
|
|
683
|
+
te(() => h.value = !0);
|
|
677
684
|
const y = () => {
|
|
678
685
|
const w = l.value?.parentElement?.getBoundingClientRect();
|
|
679
686
|
w && (g.value = {
|
|
@@ -682,22 +689,22 @@ var Kt = [
|
|
|
682
689
|
left: `${w.left + window.scrollX}px`,
|
|
683
690
|
width: `${w.width}px`
|
|
684
691
|
});
|
|
685
|
-
},
|
|
686
|
-
const w = l.value?.parentElement?.getBoundingClientRect(),
|
|
687
|
-
if (!w || !
|
|
688
|
-
const
|
|
689
|
-
u.value =
|
|
692
|
+
}, c = () => {
|
|
693
|
+
const w = l.value?.parentElement?.getBoundingClientRect(), F = r.value?.querySelector(".calendar-wrap");
|
|
694
|
+
if (!w || !F) return;
|
|
695
|
+
const R = w.top, ee = window.innerHeight - w.bottom;
|
|
696
|
+
u.value = R >= F.offsetHeight || R >= ee, e.teleport && y();
|
|
690
697
|
}, S = (w) => {
|
|
691
|
-
const
|
|
692
|
-
window[
|
|
698
|
+
const F = w ? "addEventListener" : "removeEventListener";
|
|
699
|
+
window[F]("scroll", y, { capture: !0 }), window[F]("resize", y);
|
|
693
700
|
};
|
|
694
701
|
se(n, async (w) => {
|
|
695
|
-
e.teleport && S(w), w && (await pe(),
|
|
696
|
-
}),
|
|
697
|
-
const { currentYear: k, currentMonth: K, selectedStartDate: m, selectedEndDate: v, yearOptions:
|
|
698
|
-
n.value && l.value?.focus(), n.value = !1, s.value = null, ke.delete(
|
|
702
|
+
e.teleport && S(w), w && (await pe(), c());
|
|
703
|
+
}), ie(() => S(!1));
|
|
704
|
+
const { currentYear: k, currentMonth: K, selectedStartDate: m, selectedEndDate: v, yearOptions: i, monthOptions: o, prevMonth: p, nextMonth: V, handleDateSelection: A, selectToday: E, isDateInSelectedRange: $ } = St(e.initialYear, e.initialMonth), x = () => {
|
|
705
|
+
n.value && l.value?.focus(), n.value = !1, s.value = null, ke.delete(x);
|
|
699
706
|
};
|
|
700
|
-
|
|
707
|
+
ie(() => ke.delete(x)), wt(r, x, ".calendar-conts");
|
|
701
708
|
const f = C(() => {
|
|
702
709
|
const w = [
|
|
703
710
|
"krds-input",
|
|
@@ -705,46 +712,46 @@ var Kt = [
|
|
|
705
712
|
"cal"
|
|
706
713
|
];
|
|
707
714
|
return e.size && w.push(e.size), e.class && w.push(e.class), w;
|
|
708
|
-
}),
|
|
715
|
+
}), D = C(() => ["form-conts", "calendar-conts"]), z = C(() => ({
|
|
709
716
|
"krds-calendar-area": !0,
|
|
710
717
|
active: n.value
|
|
711
|
-
})),
|
|
712
|
-
const w = k.value,
|
|
713
|
-
|
|
714
|
-
const
|
|
715
|
-
for (let
|
|
718
|
+
})), I = C(() => {
|
|
719
|
+
const w = k.value, F = K.value, R = new Date(w, F - 1, 1), ee = new Date(R);
|
|
720
|
+
ee.setDate(ee.getDate() - R.getDay());
|
|
721
|
+
const oe = [], X = new Date(ee);
|
|
722
|
+
for (let le = 0; le < 6; le++) {
|
|
716
723
|
const ye = [];
|
|
717
724
|
for (let me = 0; me < 7; me++) {
|
|
718
725
|
const we = `${X.getFullYear()}.${String(X.getMonth() + 1).padStart(2, "0")}.${String(X.getDate()).padStart(2, "0")}`, be = X.getDay();
|
|
719
726
|
ye.push({
|
|
720
727
|
day: X.getDate(),
|
|
721
728
|
dateString: we,
|
|
722
|
-
isCurrentMonth: X.getMonth() ===
|
|
729
|
+
isCurrentMonth: X.getMonth() === F - 1,
|
|
723
730
|
isToday: X.toDateString() === (/* @__PURE__ */ new Date()).toDateString(),
|
|
724
|
-
isPrevMonth: X <
|
|
725
|
-
isNextMonth: X.getMonth() !==
|
|
731
|
+
isPrevMonth: X < R,
|
|
732
|
+
isNextMonth: X.getMonth() !== F - 1 && X > R,
|
|
726
733
|
isSunday: be === 0,
|
|
727
734
|
isSaturday: be === 6
|
|
728
735
|
}), X.setDate(X.getDate() + 1);
|
|
729
736
|
}
|
|
730
|
-
|
|
737
|
+
oe.push(ye);
|
|
731
738
|
}
|
|
732
|
-
return
|
|
733
|
-
}),
|
|
734
|
-
const
|
|
735
|
-
if (w.isPrevMonth &&
|
|
736
|
-
const
|
|
737
|
-
|
|
739
|
+
return oe;
|
|
740
|
+
}), H = (w) => {
|
|
741
|
+
const F = [];
|
|
742
|
+
if (w.isPrevMonth && F.push("old"), w.isNextMonth && F.push("new"), w.isToday && F.push("today"), w.isSunday && F.push("day-off"), e.holidays?.includes(w.dateString) && F.push("day-off"), e.eventDates?.includes(w.dateString) && F.push("day-event"), w.isCurrentMonth) {
|
|
743
|
+
const R = $(w.dateString);
|
|
744
|
+
R.isInRange && (F.push("period"), R.isStart && F.push("start"), R.isEnd && F.push("end"));
|
|
738
745
|
}
|
|
739
|
-
return
|
|
740
|
-
},
|
|
746
|
+
return F;
|
|
747
|
+
}, j = C(() => [
|
|
741
748
|
{
|
|
742
749
|
id: "get-today",
|
|
743
750
|
label: "오늘",
|
|
744
751
|
class: "text",
|
|
745
752
|
variant: void 0,
|
|
746
753
|
size: "small",
|
|
747
|
-
handler:
|
|
754
|
+
handler: E
|
|
748
755
|
},
|
|
749
756
|
{
|
|
750
757
|
id: "cancel-btn",
|
|
@@ -752,7 +759,7 @@ var Kt = [
|
|
|
752
759
|
class: void 0,
|
|
753
760
|
variant: "tertiary",
|
|
754
761
|
size: "small",
|
|
755
|
-
handler:
|
|
762
|
+
handler: x
|
|
756
763
|
},
|
|
757
764
|
{
|
|
758
765
|
id: "confirm-btn",
|
|
@@ -762,7 +769,7 @@ var Kt = [
|
|
|
762
769
|
size: "small",
|
|
763
770
|
handler: re
|
|
764
771
|
}
|
|
765
|
-
]),
|
|
772
|
+
]), W = (w) => {
|
|
766
773
|
r.value?.querySelector(`.btn-cal-switch.${w}`)?.focus();
|
|
767
774
|
}, U = (w) => {
|
|
768
775
|
s.value === w ? s.value = null : s.value = w;
|
|
@@ -771,58 +778,58 @@ var Kt = [
|
|
|
771
778
|
}, he = (w) => {
|
|
772
779
|
K.value = w, s.value = null;
|
|
773
780
|
}, re = () => {
|
|
774
|
-
m.value && (v.value && m.value !== v.value ? a("update:modelValue", `${m.value} ~ ${v.value}`) : a("update:modelValue", m.value),
|
|
775
|
-
},
|
|
776
|
-
ke.forEach((w) => w()), ke.add(
|
|
781
|
+
m.value && (v.value && m.value !== v.value ? a("update:modelValue", `${m.value} ~ ${v.value}`) : a("update:modelValue", m.value), x());
|
|
782
|
+
}, Z = () => {
|
|
783
|
+
ke.forEach((w) => w()), ke.add(x), n.value = !0, s.value = null, setTimeout(() => {
|
|
777
784
|
r.value?.querySelector(".calendar-wrap")?.focus();
|
|
778
785
|
}, 50);
|
|
779
786
|
}, fe = () => {
|
|
780
|
-
n.value ?
|
|
781
|
-
},
|
|
782
|
-
w.code === "Escape" && (s.value ? s.value = null : n.value &&
|
|
787
|
+
n.value ? x() : Z();
|
|
788
|
+
}, ae = (w) => {
|
|
789
|
+
w.code === "Escape" && (s.value ? s.value = null : n.value && x());
|
|
783
790
|
}, ve = (w) => {
|
|
784
|
-
const
|
|
785
|
-
a("update:modelValue",
|
|
791
|
+
const F = w.target;
|
|
792
|
+
a("update:modelValue", F.value), a("input", w);
|
|
786
793
|
}, ne = (w) => {
|
|
787
794
|
a("change", w);
|
|
788
795
|
}, P = (w) => {
|
|
789
796
|
a("focus", w);
|
|
790
|
-
},
|
|
797
|
+
}, O = (w) => {
|
|
791
798
|
a("blur", w);
|
|
792
|
-
},
|
|
793
|
-
const
|
|
799
|
+
}, Y = (w) => {
|
|
800
|
+
const F = w === "year", R = F ? i.value : o.value, ee = F ? k.value : K.value, oe = (le) => F ? `${le}년` : `${le.toString().padStart(2, "0")}월`, X = s.value === w;
|
|
794
801
|
return t("div", { class: "calendar-drop-down" }, [t("button", {
|
|
795
802
|
type: "button",
|
|
796
803
|
class: `btn-cal-switch ${w}`,
|
|
797
|
-
"aria-label":
|
|
804
|
+
"aria-label": F ? "연도 선택" : "월 선택",
|
|
798
805
|
"aria-expanded": X,
|
|
799
806
|
onClick: () => U(w)
|
|
800
|
-
},
|
|
807
|
+
}, oe(ee)), ge(t("div", { class: [
|
|
801
808
|
"calendar-select",
|
|
802
|
-
|
|
809
|
+
F ? "calendar-year-wrap" : "calendar-mon-wrap",
|
|
803
810
|
{ active: X }
|
|
804
|
-
] }, [t("ul", { class: `sel ${w}` },
|
|
811
|
+
] }, [t("ul", { class: `sel ${w}` }, R.map((le) => t("li", { key: le }, [t("button", {
|
|
805
812
|
type: "button",
|
|
806
|
-
class: { active:
|
|
813
|
+
class: { active: le === ee },
|
|
807
814
|
onClick: () => {
|
|
808
|
-
|
|
815
|
+
F ? ce(le) : he(le), W(w);
|
|
809
816
|
}
|
|
810
|
-
},
|
|
817
|
+
}, oe(le))])))]), [[Se, X]])]);
|
|
811
818
|
}, q = () => t("table", { class: "calendar-tbl" }, [
|
|
812
819
|
t("caption", null, `${k.value}년 ${K.value.toString().padStart(2, "0")}월`),
|
|
813
820
|
t("thead", null, [t("tr", null, Kt.map((w) => t("th", null, w)))]),
|
|
814
|
-
t("tbody", null,
|
|
815
|
-
key:
|
|
816
|
-
class:
|
|
817
|
-
"data-date":
|
|
821
|
+
t("tbody", null, I.value.map((w, F) => t("tr", { key: F }, w.map((R, ee) => t("td", {
|
|
822
|
+
key: ee,
|
|
823
|
+
class: H(R),
|
|
824
|
+
"data-date": R.dateString
|
|
818
825
|
}, [t("button", {
|
|
819
826
|
type: "button",
|
|
820
827
|
class: "btn-set-date",
|
|
821
|
-
"aria-pressed":
|
|
822
|
-
onClick: () => A(
|
|
823
|
-
}, [t("span", null, String(
|
|
828
|
+
"aria-pressed": $(R.dateString).isInRange ? "true" : "false",
|
|
829
|
+
onClick: () => A(R.dateString)
|
|
830
|
+
}, [t("span", null, String(R.day))])])))))
|
|
824
831
|
]);
|
|
825
|
-
return () => t("div", { class: "form-conts" }, [t("div", { class:
|
|
832
|
+
return () => t("div", { class: "form-conts" }, [t("div", { class: D.value }, [t("div", { class: "calendar-input" }, [t("input", {
|
|
826
833
|
id: e.id,
|
|
827
834
|
name: e.name,
|
|
828
835
|
class: f.value,
|
|
@@ -836,7 +843,7 @@ var Kt = [
|
|
|
836
843
|
onInput: ve,
|
|
837
844
|
onChange: ne,
|
|
838
845
|
onFocus: P,
|
|
839
|
-
onBlur:
|
|
846
|
+
onBlur: O
|
|
840
847
|
}), t("button", {
|
|
841
848
|
ref: l,
|
|
842
849
|
class: `krds-btn ${e.size || "medium"} icon form-btn-datepicker`,
|
|
@@ -849,13 +856,13 @@ var Kt = [
|
|
|
849
856
|
disabled: !(e.teleport && h.value)
|
|
850
857
|
}, [t("div", {
|
|
851
858
|
ref: r,
|
|
852
|
-
class:
|
|
859
|
+
class: z.value,
|
|
853
860
|
style: e.teleport ? g.value : void 0
|
|
854
861
|
}, [ge(t("div", {
|
|
855
862
|
class: ["calendar-wrap", { bottom: u.value }],
|
|
856
863
|
"aria-label": "달력",
|
|
857
864
|
tabindex: "0",
|
|
858
|
-
onKeydown:
|
|
865
|
+
onKeydown: ae
|
|
859
866
|
}, [
|
|
860
867
|
t("div", { class: "calendar-head" }, [
|
|
861
868
|
t("button", {
|
|
@@ -863,15 +870,15 @@ var Kt = [
|
|
|
863
870
|
class: "btn-cal-move prev",
|
|
864
871
|
onClick: p
|
|
865
872
|
}, [t("span", { class: "sr-only" }, "이전 달")]),
|
|
866
|
-
t("div", { class: "calendar-switch-wrap" }, [
|
|
873
|
+
t("div", { class: "calendar-switch-wrap" }, [Y("year"), Y("month")]),
|
|
867
874
|
t("button", {
|
|
868
875
|
type: "button",
|
|
869
876
|
class: "btn-cal-move next",
|
|
870
|
-
onClick:
|
|
877
|
+
onClick: V
|
|
871
878
|
}, [t("span", { class: "sr-only" }, "다음 달")])
|
|
872
879
|
]),
|
|
873
880
|
t("div", { class: "calendar-body" }, [t("div", { class: "calendar-table-wrap" }, [q()])]),
|
|
874
|
-
t("div", { class: "calendar-footer" }, [t("div", { class: "calendar-btn-wrap" },
|
|
881
|
+
t("div", { class: "calendar-footer" }, [t("div", { class: "calendar-btn-wrap" }, j.value.map((w) => t(Fe, {
|
|
875
882
|
id: w.id,
|
|
876
883
|
key: w.id,
|
|
877
884
|
class: w.class,
|
|
@@ -881,7 +888,7 @@ var Kt = [
|
|
|
881
888
|
}, { default: () => w.label })))])
|
|
882
889
|
]), [[Se, n.value]])])])])]);
|
|
883
890
|
}
|
|
884
|
-
}), xt = Ct, $t = /* @__PURE__ */
|
|
891
|
+
}), xt = Ct, $t = /* @__PURE__ */ M({
|
|
885
892
|
name: "KrdsTextarea",
|
|
886
893
|
props: {
|
|
887
894
|
modelValue: {
|
|
@@ -959,7 +966,7 @@ var Kt = [
|
|
|
959
966
|
keyup: (e) => !0
|
|
960
967
|
},
|
|
961
968
|
setup(e, { emit: a }) {
|
|
962
|
-
const r =
|
|
969
|
+
const r = B(0);
|
|
963
970
|
se(() => e.modelValue, (v) => {
|
|
964
971
|
r.value = (v || "").length;
|
|
965
972
|
}, { immediate: !0 });
|
|
@@ -970,8 +977,8 @@ var Kt = [
|
|
|
970
977
|
const v = {};
|
|
971
978
|
return e.resize && (v.resize = e.resize), v;
|
|
972
979
|
}), s = (v) => {
|
|
973
|
-
const
|
|
974
|
-
r.value =
|
|
980
|
+
const i = v.target.value;
|
|
981
|
+
r.value = i.length, a("update:modelValue", i), a("input", v);
|
|
975
982
|
}, u = (v) => {
|
|
976
983
|
a("change", v);
|
|
977
984
|
}, g = (v) => {
|
|
@@ -980,7 +987,7 @@ var Kt = [
|
|
|
980
987
|
a("blur", v);
|
|
981
988
|
}, y = (v) => {
|
|
982
989
|
a("keydown", v);
|
|
983
|
-
},
|
|
990
|
+
}, c = (v) => {
|
|
984
991
|
a("keyup", v);
|
|
985
992
|
}, S = C(() => {
|
|
986
993
|
const v = {
|
|
@@ -1001,7 +1008,7 @@ var Kt = [
|
|
|
1001
1008
|
onFocus: g,
|
|
1002
1009
|
onBlur: h,
|
|
1003
1010
|
onKeydown: y,
|
|
1004
|
-
onKeyup:
|
|
1011
|
+
onKeyup: c
|
|
1005
1012
|
};
|
|
1006
1013
|
return e.maxlength !== void 0 && (v.maxlength = e.maxlength), e.minlength !== void 0 && (v.minlength = e.minlength), v;
|
|
1007
1014
|
}), k = C(() => ["form-conts"]), K = C(() => ["textarea-wrap"]), m = C(() => e.showCount ? {
|
|
@@ -1013,7 +1020,7 @@ var Kt = [
|
|
|
1013
1020
|
return m.value && v.push(t("p", { class: "textarea-count" }, [t("span", { class: "count-now" }, m.value.current), t("span", { class: "count-total" }, m.value.max ? `/${m.value.max}` : "")])), t("div", { class: k.value }, [t("div", { class: K.value }, v)]);
|
|
1014
1021
|
};
|
|
1015
1022
|
}
|
|
1016
|
-
}), Lt = $t, Bt = /* @__PURE__ */
|
|
1023
|
+
}), Lt = $t, Bt = /* @__PURE__ */ M({
|
|
1017
1024
|
name: "KrdsSelect",
|
|
1018
1025
|
props: {
|
|
1019
1026
|
modelValue: {
|
|
@@ -1074,17 +1081,18 @@ var Kt = [
|
|
|
1074
1081
|
focus: (e) => !0,
|
|
1075
1082
|
blur: (e) => !0
|
|
1076
1083
|
},
|
|
1084
|
+
slots: Object,
|
|
1077
1085
|
setup(e, { emit: a, slots: r }) {
|
|
1078
1086
|
const l = C(() => {
|
|
1079
|
-
const
|
|
1080
|
-
return e.sort ?
|
|
1081
|
-
}), n = (
|
|
1082
|
-
const S =
|
|
1087
|
+
const c = [];
|
|
1088
|
+
return e.sort ? c.push("krds-form-select-sort") : c.push("krds-form-select"), e.size && c.push(e.size), e.class && c.push(e.class), c;
|
|
1089
|
+
}), n = (c) => {
|
|
1090
|
+
const S = c.target;
|
|
1083
1091
|
a("update:modelValue", S.value === "" ? null : S.value);
|
|
1084
|
-
}, s = (
|
|
1085
|
-
a("focus",
|
|
1086
|
-
}, u = (
|
|
1087
|
-
a("blur",
|
|
1092
|
+
}, s = (c) => {
|
|
1093
|
+
a("focus", c);
|
|
1094
|
+
}, u = (c) => {
|
|
1095
|
+
a("blur", c);
|
|
1088
1096
|
}, g = C(() => ({
|
|
1089
1097
|
class: l.value,
|
|
1090
1098
|
value: e.modelValue ?? "",
|
|
@@ -1096,28 +1104,28 @@ var Kt = [
|
|
|
1096
1104
|
onFocus: s,
|
|
1097
1105
|
onBlur: u
|
|
1098
1106
|
})), h = C(() => {
|
|
1099
|
-
const
|
|
1100
|
-
return e.state !== "default" &&
|
|
1107
|
+
const c = ["form-conts"];
|
|
1108
|
+
return e.state !== "default" && c.push(`is-${e.state}`), c;
|
|
1101
1109
|
}), y = () => {
|
|
1102
|
-
const
|
|
1103
|
-
return e.placeholder && !e.modelValue &&
|
|
1110
|
+
const c = [];
|
|
1111
|
+
return e.placeholder && !e.modelValue && c.push(t("option", {
|
|
1104
1112
|
value: "",
|
|
1105
1113
|
disabled: !0,
|
|
1106
1114
|
selected: !0
|
|
1107
1115
|
}, e.placeholder)), e.options && e.options.length > 0 && e.options.forEach((S) => {
|
|
1108
|
-
|
|
1116
|
+
c.push(t("option", {
|
|
1109
1117
|
value: S.value,
|
|
1110
1118
|
disabled: S.disabled,
|
|
1111
1119
|
selected: S.value === e.modelValue
|
|
1112
1120
|
}, S.label));
|
|
1113
|
-
}), r.default &&
|
|
1121
|
+
}), r.default && c.push(...r.default()), c;
|
|
1114
1122
|
};
|
|
1115
1123
|
return () => {
|
|
1116
|
-
const
|
|
1117
|
-
return e.sort ?
|
|
1124
|
+
const c = t("select", g.value, y());
|
|
1125
|
+
return e.sort ? c : t("div", { class: h.value }, [c]);
|
|
1118
1126
|
};
|
|
1119
1127
|
}
|
|
1120
|
-
}), Et = Bt, Dt = 0, Tt = /* @__PURE__ */
|
|
1128
|
+
}), Et = Bt, Dt = 0, Tt = /* @__PURE__ */ M({
|
|
1121
1129
|
name: "KrdsFileUpload",
|
|
1122
1130
|
props: {
|
|
1123
1131
|
modelValue: {
|
|
@@ -1219,62 +1227,62 @@ var Kt = [
|
|
|
1219
1227
|
preview: (e) => !0
|
|
1220
1228
|
},
|
|
1221
1229
|
setup(e, { emit: a }) {
|
|
1222
|
-
const r =
|
|
1223
|
-
const
|
|
1224
|
-
return
|
|
1230
|
+
const r = B(!1), l = B(null), n = e.id ? `${e.id}-input` : `krds-file-upload-${++Dt}`, s = (f) => f < 1024 ? `${f}B` : f < 1048576 ? `${Math.round(f / 1024)}KB` : `${Number((f / 1048576).toFixed(1))}MB`, u = (f) => {
|
|
1231
|
+
const D = f.split(".");
|
|
1232
|
+
return D.length > 1 ? D.pop().toLowerCase() : "";
|
|
1225
1233
|
}, g = (f) => {
|
|
1226
|
-
const
|
|
1227
|
-
return
|
|
1234
|
+
const D = u(f.name), z = D ? f.name.slice(0, -(D.length + 1)) : f.name;
|
|
1235
|
+
return D ? `${z} [${D}, ${s(f.size)}]` : `${f.name} [${s(f.size)}]`;
|
|
1228
1236
|
}, h = () => `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`, y = (f) => {
|
|
1229
1237
|
if (e.maxFileSize && f.size >= e.maxFileSize) return `등록 가능한 파일 용량을 초과하였습니다.
|
|
1230
1238
|
${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
1231
1239
|
if (e.accept) {
|
|
1232
|
-
const
|
|
1233
|
-
if (!
|
|
1240
|
+
const D = e.accept.split(",").map((H) => H.trim().toLowerCase()), z = `.${u(f.name)}`, I = f.type;
|
|
1241
|
+
if (!D.some((H) => H.startsWith(".") ? z === H : H.endsWith("/*") ? I.startsWith(H.replace("/*", "/")) : I === H)) return "허용되지 않는 파일 형식입니다.";
|
|
1234
1242
|
}
|
|
1235
1243
|
return null;
|
|
1236
|
-
},
|
|
1244
|
+
}, c = (f) => {
|
|
1237
1245
|
if (e.disabled || e.readonly) return;
|
|
1238
|
-
let
|
|
1239
|
-
!e.multiple &&
|
|
1240
|
-
const
|
|
1241
|
-
let
|
|
1242
|
-
const
|
|
1243
|
-
for (const
|
|
1244
|
-
if (
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1246
|
+
let D = [...e.modelValue || []];
|
|
1247
|
+
!e.multiple && D.length > 0 && (D = []);
|
|
1248
|
+
const z = [];
|
|
1249
|
+
let I = D.filter((j) => j.status !== "error").length;
|
|
1250
|
+
const H = e.multiple ? Array.from(f) : Array.from(f).slice(0, 1);
|
|
1251
|
+
for (const j of H) {
|
|
1252
|
+
if (I >= e.maxFiles) break;
|
|
1253
|
+
const W = y(j);
|
|
1254
|
+
W || I++;
|
|
1247
1255
|
const U = {
|
|
1248
1256
|
id: h(),
|
|
1249
|
-
file:
|
|
1250
|
-
name:
|
|
1251
|
-
size:
|
|
1252
|
-
type:
|
|
1253
|
-
status:
|
|
1254
|
-
errorMessage:
|
|
1257
|
+
file: j,
|
|
1258
|
+
name: j.name,
|
|
1259
|
+
size: j.size,
|
|
1260
|
+
type: j.type,
|
|
1261
|
+
status: W ? "error" : "pending",
|
|
1262
|
+
errorMessage: W || void 0
|
|
1255
1263
|
};
|
|
1256
|
-
|
|
1264
|
+
z.push(U), W ? a("file-error", U, W) : a("file-added", U);
|
|
1257
1265
|
}
|
|
1258
|
-
|
|
1266
|
+
z.length > 0 && a("update:modelValue", [...D, ...z]);
|
|
1259
1267
|
}, S = (f) => {
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1268
|
+
const D = f.target;
|
|
1269
|
+
D.files?.length && (c(D.files), D.value = "");
|
|
1262
1270
|
}, k = (f) => {
|
|
1263
1271
|
e.disabled || e.readonly || !e.dragAndDrop || (f.preventDefault(), r.value = !0);
|
|
1264
1272
|
}, K = () => {
|
|
1265
1273
|
r.value = !1;
|
|
1266
1274
|
}, m = (f) => {
|
|
1267
|
-
f.preventDefault(), r.value = !1, !(e.disabled || e.readonly || !e.dragAndDrop) && f.dataTransfer?.files &&
|
|
1275
|
+
f.preventDefault(), r.value = !1, !(e.disabled || e.readonly || !e.dragAndDrop) && f.dataTransfer?.files && c(f.dataTransfer.files);
|
|
1268
1276
|
}, v = () => {
|
|
1269
1277
|
e.disabled || e.readonly || l.value?.click();
|
|
1270
|
-
},
|
|
1271
|
-
e.disabled || e.readonly || (a("update:modelValue", (e.modelValue || []).filter((
|
|
1272
|
-
},
|
|
1278
|
+
}, i = (f) => {
|
|
1279
|
+
e.disabled || e.readonly || (a("update:modelValue", (e.modelValue || []).filter((D) => D.id !== f)), a("file-removed", f));
|
|
1280
|
+
}, o = () => {
|
|
1273
1281
|
e.disabled || e.readonly || (a("update:modelValue", []), a("clear-all"));
|
|
1274
1282
|
}, p = C(() => {
|
|
1275
1283
|
const f = ["krds-file-upload", "line"];
|
|
1276
1284
|
return e.class && f.push(e.class), f;
|
|
1277
|
-
}),
|
|
1285
|
+
}), V = () => t("div", { class: "file-head" }, [t("h3", { class: "tit" }, e.title), t("div", null, [t("p", null, e.description)])]), A = () => t("div", {
|
|
1278
1286
|
class: ["file-upload", { active: r.value }],
|
|
1279
1287
|
onDragover: k,
|
|
1280
1288
|
onDragleave: K,
|
|
@@ -1293,58 +1301,58 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1293
1301
|
class: ["krds-btn", e.size],
|
|
1294
1302
|
disabled: e.disabled || void 0,
|
|
1295
1303
|
onClick: v
|
|
1296
|
-
}, [t("i", { class: "svg-icon ico-upload" }), "파일선택"])])])]),
|
|
1297
|
-
const
|
|
1298
|
-
return f.status === "uploading" ?
|
|
1304
|
+
}, [t("i", { class: "svg-icon ico-upload" }), "파일선택"])])])]), E = (f) => {
|
|
1305
|
+
const D = [];
|
|
1306
|
+
return f.status === "uploading" ? D.push(t("span", {
|
|
1299
1307
|
class: "krds-spinner",
|
|
1300
1308
|
role: "status"
|
|
1301
|
-
}, [t("span", { class: "sr-only" }, "업로드 중")])) : f.downloadUrl ? (e.showDownload &&
|
|
1309
|
+
}, [t("span", { class: "sr-only" }, "업로드 중")])) : f.downloadUrl ? (e.showDownload && D.push(t("button", {
|
|
1302
1310
|
type: "button",
|
|
1303
1311
|
class: "krds-btn medium text",
|
|
1304
1312
|
onClick: () => a("download", f)
|
|
1305
|
-
}, ["다운로드 ", t("i", { class: "svg-icon ico-down" })])), e.showPreviewButton &&
|
|
1313
|
+
}, ["다운로드 ", t("i", { class: "svg-icon ico-down" })])), e.showPreviewButton && D.push(t("button", {
|
|
1306
1314
|
type: "button",
|
|
1307
1315
|
class: "krds-btn medium text",
|
|
1308
1316
|
onClick: () => a("preview", f)
|
|
1309
|
-
}, ["바로보기 ", t("i", { class: "svg-icon ico-angle right" })]))) : f.status === "completed" ?
|
|
1317
|
+
}, ["바로보기 ", t("i", { class: "svg-icon ico-angle right" })]))) : f.status === "completed" ? D.push(t("span", { class: "ico-invalid complete" }, [t("em", { class: "sr-only" }, "업로드 완료")])) : e.readonly || D.push(t("button", {
|
|
1310
1318
|
type: "button",
|
|
1311
1319
|
class: "krds-btn medium text",
|
|
1312
1320
|
disabled: e.disabled || void 0,
|
|
1313
|
-
onClick: () =>
|
|
1314
|
-
}, ["삭제 ", t("i", { class: "svg-icon ico-delete-fill" })])),
|
|
1315
|
-
},
|
|
1316
|
-
const
|
|
1321
|
+
onClick: () => i(f.id)
|
|
1322
|
+
}, ["삭제 ", t("i", { class: "svg-icon ico-delete-fill" })])), D;
|
|
1323
|
+
}, $ = (f) => {
|
|
1324
|
+
const D = [t("div", { class: f.downloadUrl ? "file-info m-column" : "file-info" }, [t("div", { class: "file-name" }, g(f)), t("div", { class: "btn-wrap" }, E(f))])];
|
|
1317
1325
|
if (f.status === "error" && f.errorMessage) {
|
|
1318
|
-
const
|
|
1319
|
-
`),
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
}),
|
|
1326
|
+
const z = f.errorMessage.split(`
|
|
1327
|
+
`), I = [];
|
|
1328
|
+
z.forEach((H, j) => {
|
|
1329
|
+
j > 0 && I.push(t("br")), I.push(H);
|
|
1330
|
+
}), D.push(t("p", { class: "file-hint-invalid" }, I));
|
|
1323
1331
|
}
|
|
1324
1332
|
return t("li", {
|
|
1325
1333
|
key: f.id,
|
|
1326
1334
|
class: f.status === "error" ? "is-error" : void 0
|
|
1327
|
-
},
|
|
1328
|
-
},
|
|
1329
|
-
const
|
|
1330
|
-
return e.showClearAll && !e.readonly &&
|
|
1335
|
+
}, D);
|
|
1336
|
+
}, x = (f) => {
|
|
1337
|
+
const D = f.filter((I) => I.status !== "error").length, z = [t("div", { class: "total" }, [t("span", { class: "current" }, `${D}개`), ` / ${e.maxFiles}개`]), t("ul", { class: "upload-list" }, f.map($))];
|
|
1338
|
+
return e.showClearAll && !e.readonly && z.push(t("div", { class: "upload-delete-btn" }, [t("button", {
|
|
1331
1339
|
type: "button",
|
|
1332
1340
|
class: "krds-btn xsmall tertiary",
|
|
1333
1341
|
disabled: e.disabled || void 0,
|
|
1334
|
-
onClick:
|
|
1335
|
-
}, ["전체 파일 삭제", t("i", { class: "svg-icon ico-angle right" })])])), t("div", { class: "file-list" },
|
|
1342
|
+
onClick: o
|
|
1343
|
+
}, ["전체 파일 삭제", t("i", { class: "svg-icon ico-angle right" })])])), t("div", { class: "file-list" }, z);
|
|
1336
1344
|
};
|
|
1337
1345
|
return () => {
|
|
1338
|
-
const f = [
|
|
1346
|
+
const f = [V()];
|
|
1339
1347
|
e.readonly || f.push(A());
|
|
1340
|
-
const
|
|
1341
|
-
return
|
|
1348
|
+
const D = e.modelValue || [];
|
|
1349
|
+
return D.length > 0 && f.push(x(D)), t("div", {
|
|
1342
1350
|
class: p.value,
|
|
1343
1351
|
style: e.style || void 0
|
|
1344
1352
|
}, f);
|
|
1345
1353
|
};
|
|
1346
1354
|
}
|
|
1347
|
-
}), At = Tt, _t = /* @__PURE__ */
|
|
1355
|
+
}), At = Tt, _t = /* @__PURE__ */ M({
|
|
1348
1356
|
name: "KrdsBadge",
|
|
1349
1357
|
props: {
|
|
1350
1358
|
type: {
|
|
@@ -1369,6 +1377,7 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1369
1377
|
}
|
|
1370
1378
|
},
|
|
1371
1379
|
emits: { click: (e) => !0 },
|
|
1380
|
+
slots: Object,
|
|
1372
1381
|
setup(e, { emit: a, slots: r }) {
|
|
1373
1382
|
const l = C(() => {
|
|
1374
1383
|
const s = ["krds-badge"];
|
|
@@ -1385,7 +1394,7 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1385
1394
|
onClick: n
|
|
1386
1395
|
}, r.default?.());
|
|
1387
1396
|
}
|
|
1388
|
-
}), Mt = _t, Vt = /* @__PURE__ */
|
|
1397
|
+
}), Mt = _t, Vt = /* @__PURE__ */ M({
|
|
1389
1398
|
name: "KrdsTag",
|
|
1390
1399
|
props: {
|
|
1391
1400
|
link: {
|
|
@@ -1410,6 +1419,7 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1410
1419
|
}
|
|
1411
1420
|
},
|
|
1412
1421
|
emits: { remove: (e) => !0 },
|
|
1422
|
+
slots: Object,
|
|
1413
1423
|
setup(e, { emit: a, slots: r }) {
|
|
1414
1424
|
const l = C(() => {
|
|
1415
1425
|
const u = ["krds-btn-tag"];
|
|
@@ -1433,7 +1443,7 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1433
1443
|
return t("span", { class: l.value }, u);
|
|
1434
1444
|
};
|
|
1435
1445
|
}
|
|
1436
|
-
}), Ft = Vt, Pt = /* @__PURE__ */
|
|
1446
|
+
}), Ft = Vt, Pt = /* @__PURE__ */ M({
|
|
1437
1447
|
name: "KrdsTagGroup",
|
|
1438
1448
|
props: {
|
|
1439
1449
|
size: {
|
|
@@ -1445,6 +1455,7 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1445
1455
|
default: void 0
|
|
1446
1456
|
}
|
|
1447
1457
|
},
|
|
1458
|
+
slots: Object,
|
|
1448
1459
|
setup(e, { slots: a }) {
|
|
1449
1460
|
const r = C(() => {
|
|
1450
1461
|
const l = ["krds-tag-wrap"];
|
|
@@ -1452,13 +1463,14 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1452
1463
|
});
|
|
1453
1464
|
return () => t("div", { class: r.value }, a.default?.());
|
|
1454
1465
|
}
|
|
1455
|
-
}),
|
|
1466
|
+
}), Ot = Pt, zt = /* @__PURE__ */ M({
|
|
1456
1467
|
name: "KrdsMasthead",
|
|
1457
1468
|
props: { class: {
|
|
1458
1469
|
type: String,
|
|
1459
1470
|
default: void 0
|
|
1460
1471
|
} },
|
|
1461
1472
|
emits: { click: (e) => !0 },
|
|
1473
|
+
slots: Object,
|
|
1462
1474
|
setup(e, { emit: a, slots: r }) {
|
|
1463
1475
|
const l = C(() => {
|
|
1464
1476
|
const s = [""];
|
|
@@ -1472,9 +1484,9 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1472
1484
|
onClick: n
|
|
1473
1485
|
}, [t("div", { class: "toggle-wrap" }, [t("div", { class: "toggle-head" }, [t("div", { class: "inner" }, [t("span", { class: "nuri-txt" }, r.default?.())])])])]);
|
|
1474
1486
|
}
|
|
1475
|
-
}),
|
|
1487
|
+
}), Rt = zt, It = 0;
|
|
1476
1488
|
function cl(e = "krds") {
|
|
1477
|
-
return `${e}-${++
|
|
1489
|
+
return `${e}-${++It}`;
|
|
1478
1490
|
}
|
|
1479
1491
|
function fl() {
|
|
1480
1492
|
return `${Date.now().toString(36).slice(-4)}${Math.random().toString(36).substring(2, 5)}`;
|
|
@@ -1482,7 +1494,7 @@ function fl() {
|
|
|
1482
1494
|
function $e(...e) {
|
|
1483
1495
|
return e.filter(Boolean).join(" ");
|
|
1484
1496
|
}
|
|
1485
|
-
var
|
|
1497
|
+
var Ht = /* @__PURE__ */ M({
|
|
1486
1498
|
name: "KrdsToggleSwitch",
|
|
1487
1499
|
props: {
|
|
1488
1500
|
modelValue: {
|
|
@@ -1543,7 +1555,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1543
1555
|
...r
|
|
1544
1556
|
}), t("label", { for: g.value }, [t("span", { class: "switch-toggle" }, [t("i")]), e.label || ""])]);
|
|
1545
1557
|
}
|
|
1546
|
-
}), qt =
|
|
1558
|
+
}), qt = Ht, Nt = /* @__PURE__ */ M({
|
|
1547
1559
|
name: "KrdsCheckArea",
|
|
1548
1560
|
props: {
|
|
1549
1561
|
class: {
|
|
@@ -1555,13 +1567,14 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1555
1567
|
default: !1
|
|
1556
1568
|
}
|
|
1557
1569
|
},
|
|
1570
|
+
slots: Object,
|
|
1558
1571
|
setup(e, { slots: a }) {
|
|
1559
1572
|
return () => {
|
|
1560
1573
|
const r = ["krds-check-area"];
|
|
1561
1574
|
return e.column && r.push("chk-column"), e.class && r.push(e.class), t("div", { class: r }, a.default?.());
|
|
1562
1575
|
};
|
|
1563
1576
|
}
|
|
1564
|
-
}),
|
|
1577
|
+
}), jt = Nt, Wt = /* @__PURE__ */ M({
|
|
1565
1578
|
name: "KrdsCheckbox",
|
|
1566
1579
|
props: {
|
|
1567
1580
|
modelValue: {
|
|
@@ -1598,8 +1611,8 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1598
1611
|
return $e(y, e.size, e.class);
|
|
1599
1612
|
}), g = (y) => {
|
|
1600
1613
|
if (e.disabled) return;
|
|
1601
|
-
const
|
|
1602
|
-
a("update:modelValue",
|
|
1614
|
+
const c = y.target.checked;
|
|
1615
|
+
a("update:modelValue", c);
|
|
1603
1616
|
}, h = C(() => e.id || n);
|
|
1604
1617
|
return () => {
|
|
1605
1618
|
const y = [t("input", {
|
|
@@ -1613,7 +1626,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1613
1626
|
return l.description && !e.chip && y.push(t("div", { class: "krds-form-check-cnt" }, t("p", { class: "krds-form-check-p" }, l.description()))), t("div", { class: u.value }, y);
|
|
1614
1627
|
};
|
|
1615
1628
|
}
|
|
1616
|
-
}),
|
|
1629
|
+
}), Yt = Wt, Gt = /* @__PURE__ */ M({
|
|
1617
1630
|
name: "KrdsRadio",
|
|
1618
1631
|
props: {
|
|
1619
1632
|
modelValue: {
|
|
@@ -1662,13 +1675,13 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1662
1675
|
slots: Object,
|
|
1663
1676
|
setup(e, { emit: a, attrs: r, slots: l }) {
|
|
1664
1677
|
const n = `radio-${de()}`, s = C(() => e.modelValue === e.value), u = C(() => {
|
|
1665
|
-
const
|
|
1666
|
-
return $e(
|
|
1667
|
-
}), g = (
|
|
1668
|
-
e.disabled ||
|
|
1678
|
+
const c = e.chip ? "krds-form-chip" : "krds-form-check";
|
|
1679
|
+
return $e(c, e.size, e.class);
|
|
1680
|
+
}), g = (c) => {
|
|
1681
|
+
e.disabled || c.target.checked && a("update:modelValue", e.value);
|
|
1669
1682
|
}, h = C(() => e.id || n), y = C(() => e.name);
|
|
1670
1683
|
return () => {
|
|
1671
|
-
const
|
|
1684
|
+
const c = [t("input", {
|
|
1672
1685
|
type: "radio",
|
|
1673
1686
|
id: h.value,
|
|
1674
1687
|
name: y.value,
|
|
@@ -1678,10 +1691,10 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1678
1691
|
onChange: g,
|
|
1679
1692
|
...r
|
|
1680
1693
|
}), t("label", { for: h.value }, l.default?.())];
|
|
1681
|
-
return l.description && !e.chip &&
|
|
1694
|
+
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: u.value }, c);
|
|
1682
1695
|
};
|
|
1683
1696
|
}
|
|
1684
|
-
}), Ut = Gt, Xt = Pe, Qt = /* @__PURE__ */
|
|
1697
|
+
}), Ut = Gt, Xt = Pe, Qt = /* @__PURE__ */ M({
|
|
1685
1698
|
name: "KrdsStepIndicator",
|
|
1686
1699
|
props: {
|
|
1687
1700
|
modelValue: {
|
|
@@ -1694,22 +1707,23 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1694
1707
|
}
|
|
1695
1708
|
},
|
|
1696
1709
|
emits: { "update:modelValue": (e) => !0 },
|
|
1710
|
+
slots: Object,
|
|
1697
1711
|
setup(e, { slots: a }) {
|
|
1698
|
-
const r =
|
|
1712
|
+
const r = B(null), l = C(() => e.modelValue || 0), n = st(null), s = /* @__PURE__ */ new WeakSet(), u = () => {
|
|
1699
1713
|
n.value = r.value ? Array.from(r.value.children).filter((y) => s.has(y)) : null;
|
|
1700
1714
|
};
|
|
1701
1715
|
let g = 0, h;
|
|
1702
|
-
return
|
|
1716
|
+
return te(() => {
|
|
1703
1717
|
u(), h = new MutationObserver(u), h.observe(r.value, { childList: !0 });
|
|
1704
|
-
}), lt(u),
|
|
1718
|
+
}), lt(u), ie(() => h?.disconnect()), nt("stepIndicator", {
|
|
1705
1719
|
register: () => g++,
|
|
1706
1720
|
track: (y) => s.add(y),
|
|
1707
1721
|
untrack: (y) => {
|
|
1708
1722
|
s.delete(y), u();
|
|
1709
1723
|
},
|
|
1710
|
-
indexOf: (y,
|
|
1724
|
+
indexOf: (y, c) => {
|
|
1711
1725
|
const S = y && n.value ? n.value.indexOf(y) : -1;
|
|
1712
|
-
return S >= 0 ? S :
|
|
1726
|
+
return S >= 0 ? S : c;
|
|
1713
1727
|
},
|
|
1714
1728
|
statusAt: (y) => y < l.value ? "done" : y === l.value ? "active" : "pending"
|
|
1715
1729
|
}), () => (g = 0, t("ol", {
|
|
@@ -1717,7 +1731,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1717
1731
|
class: ["krds-step-wrap", e.class]
|
|
1718
1732
|
}, a.default?.()));
|
|
1719
1733
|
}
|
|
1720
|
-
}), Jt = Qt, Zt = /* @__PURE__ */
|
|
1734
|
+
}), Jt = Qt, Zt = /* @__PURE__ */ M({
|
|
1721
1735
|
name: "KrdsStep",
|
|
1722
1736
|
props: {
|
|
1723
1737
|
step: {
|
|
@@ -1738,9 +1752,10 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1738
1752
|
}
|
|
1739
1753
|
},
|
|
1740
1754
|
emits: { click: (e, a) => !0 },
|
|
1755
|
+
slots: Object,
|
|
1741
1756
|
setup(e, { emit: a, slots: r }) {
|
|
1742
|
-
const l = tt("stepIndicator", null), n = l ? l.register() : -1, s =
|
|
1743
|
-
|
|
1757
|
+
const l = tt("stepIndicator", null), n = l ? l.register() : -1, s = B(null);
|
|
1758
|
+
te(() => s.value && l?.track(s.value)), ie(() => s.value && l?.untrack(s.value));
|
|
1744
1759
|
const u = C(() => e.status || (l ? l.statusAt(l.indexOf(s.value, n)) : "pending")), g = C(() => {
|
|
1745
1760
|
const y = [u.value];
|
|
1746
1761
|
return e.class && y.push(e.class), y;
|
|
@@ -1761,7 +1776,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1761
1776
|
])]);
|
|
1762
1777
|
};
|
|
1763
1778
|
}
|
|
1764
|
-
}), ea = Zt, ta = /* @__PURE__ */
|
|
1779
|
+
}), ea = Zt, ta = /* @__PURE__ */ M({
|
|
1765
1780
|
name: "KrdsSkipLink",
|
|
1766
1781
|
props: {
|
|
1767
1782
|
href: {
|
|
@@ -1787,13 +1802,14 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1787
1802
|
default: "krds-skip-link"
|
|
1788
1803
|
}
|
|
1789
1804
|
},
|
|
1805
|
+
slots: Object,
|
|
1790
1806
|
setup(e, { slots: a }) {
|
|
1791
1807
|
return () => t("div", {
|
|
1792
1808
|
id: e.id,
|
|
1793
1809
|
class: e.class
|
|
1794
1810
|
}, e.links ? e.links.map((r) => t("a", { href: r.href }, r.label)) : [t("a", { href: e.href }, a.default?.())]);
|
|
1795
1811
|
}
|
|
1796
|
-
}), aa = ta, la = /* @__PURE__ */
|
|
1812
|
+
}), aa = ta, la = /* @__PURE__ */ M({
|
|
1797
1813
|
name: "KrdsBreadcrumb",
|
|
1798
1814
|
props: {
|
|
1799
1815
|
items: {
|
|
@@ -1835,7 +1851,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1835
1851
|
}, [t("span", null, n.text)])]);
|
|
1836
1852
|
}))]);
|
|
1837
1853
|
}
|
|
1838
|
-
}), na = la, sa = /* @__PURE__ */
|
|
1854
|
+
}), na = la, sa = /* @__PURE__ */ M({
|
|
1839
1855
|
name: "KrdsInPageNavigation",
|
|
1840
1856
|
props: {
|
|
1841
1857
|
title: {
|
|
@@ -1870,7 +1886,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1870
1886
|
emits: { itemClick: (e, a) => !0 },
|
|
1871
1887
|
slots: Object,
|
|
1872
1888
|
setup(e, { emit: a, slots: r }) {
|
|
1873
|
-
const l =
|
|
1889
|
+
const l = B(""), n = B(/* @__PURE__ */ new Map()), s = C(() => {
|
|
1874
1890
|
const m = ["krds-in-page-navigation-type"];
|
|
1875
1891
|
return e.class && m.push(e.class), m;
|
|
1876
1892
|
}), u = () => {
|
|
@@ -1879,15 +1895,15 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1879
1895
|
}, g = (m, v) => {
|
|
1880
1896
|
if (a("itemClick", m, v), m.href.startsWith("#")) {
|
|
1881
1897
|
v.preventDefault();
|
|
1882
|
-
const
|
|
1883
|
-
if (
|
|
1884
|
-
const
|
|
1898
|
+
const i = document.querySelector(m.href);
|
|
1899
|
+
if (i) {
|
|
1900
|
+
const o = u();
|
|
1885
1901
|
if (window.scrollTo({
|
|
1886
1902
|
left: 0,
|
|
1887
|
-
top:
|
|
1903
|
+
top: i.getBoundingClientRect().top + window.scrollY - o,
|
|
1888
1904
|
behavior: "smooth"
|
|
1889
1905
|
}), l.value = m.href, v instanceof KeyboardEvent) {
|
|
1890
|
-
const p =
|
|
1906
|
+
const p = i.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");
|
|
1891
1907
|
p && p instanceof HTMLElement && (p.setAttribute("tabindex", "-1"), p.focus({ preventScroll: !0 }));
|
|
1892
1908
|
}
|
|
1893
1909
|
}
|
|
@@ -1899,31 +1915,31 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1899
1915
|
});
|
|
1900
1916
|
}, y = () => {
|
|
1901
1917
|
if (!e.autoActive || !e.items || n.value.size === 0) return;
|
|
1902
|
-
const m = window.innerHeight, v = Math.ceil(m / 5),
|
|
1903
|
-
href:
|
|
1904
|
-
element: n.value.get(
|
|
1905
|
-
item:
|
|
1918
|
+
const m = window.innerHeight, v = Math.ceil(m / 5), i = window.scrollY + m, o = document.body.scrollHeight, p = e.items.filter((x) => x.href.startsWith("#") && n.value.has(x.href)).map((x) => ({
|
|
1919
|
+
href: x.href,
|
|
1920
|
+
element: n.value.get(x.href),
|
|
1921
|
+
item: x
|
|
1906
1922
|
}));
|
|
1907
1923
|
if (p.length === 0) return;
|
|
1908
|
-
const
|
|
1909
|
-
let
|
|
1910
|
-
if (
|
|
1911
|
-
else if (window.scrollY <=
|
|
1912
|
-
else for (const
|
|
1913
|
-
const f =
|
|
1914
|
-
if (window.scrollY >
|
|
1915
|
-
|
|
1924
|
+
const V = p[0], A = p[p.length - 1], E = V.element.offsetTop;
|
|
1925
|
+
let $ = "";
|
|
1926
|
+
if (i >= o) $ = A.href;
|
|
1927
|
+
else if (window.scrollY <= E) $ = V.href;
|
|
1928
|
+
else for (const x of p) {
|
|
1929
|
+
const f = x.element.offsetHeight, D = x.element.offsetTop - v;
|
|
1930
|
+
if (window.scrollY > D && window.scrollY <= D + f) {
|
|
1931
|
+
$ = x.href;
|
|
1916
1932
|
break;
|
|
1917
1933
|
}
|
|
1918
1934
|
}
|
|
1919
|
-
|
|
1920
|
-
},
|
|
1935
|
+
$ && $ !== l.value && (l.value = $);
|
|
1936
|
+
}, c = () => {
|
|
1921
1937
|
if (!e.items) return;
|
|
1922
1938
|
const m = e.items.find((v) => v.active);
|
|
1923
1939
|
m ? l.value = m.href : e.items.length > 0 && (l.value = e.items[0].href);
|
|
1924
1940
|
};
|
|
1925
|
-
|
|
1926
|
-
if (
|
|
1941
|
+
te(() => {
|
|
1942
|
+
if (c(), e.autoActive) {
|
|
1927
1943
|
h(), y(), window.addEventListener("scroll", y, { passive: !0 });
|
|
1928
1944
|
const m = new MutationObserver(() => {
|
|
1929
1945
|
h();
|
|
@@ -1941,13 +1957,13 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1941
1957
|
const S = () => !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)]), k = () => {
|
|
1942
1958
|
if (!e.items) return null;
|
|
1943
1959
|
const m = e.items.map((v) => {
|
|
1944
|
-
const
|
|
1960
|
+
const i = l.value === v.href || !e.autoActive && v.active;
|
|
1945
1961
|
return t("li", { key: v.href }, [t("a", {
|
|
1946
1962
|
href: v.href,
|
|
1947
|
-
class:
|
|
1948
|
-
onClick: (
|
|
1949
|
-
onKeydown: (
|
|
1950
|
-
(
|
|
1963
|
+
class: i ? "active" : "",
|
|
1964
|
+
onClick: (o) => g(v, o),
|
|
1965
|
+
onKeydown: (o) => {
|
|
1966
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), g(v, o));
|
|
1951
1967
|
}
|
|
1952
1968
|
}, v.text)]);
|
|
1953
1969
|
});
|
|
@@ -1959,7 +1975,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1959
1975
|
K()
|
|
1960
1976
|
].filter(Boolean))]);
|
|
1961
1977
|
}
|
|
1962
|
-
}), ra = sa,
|
|
1978
|
+
}), ra = sa, Oe = {
|
|
1963
1979
|
mounted(e, a) {
|
|
1964
1980
|
a.value !== !1 && e.classList.add("sr-only");
|
|
1965
1981
|
},
|
|
@@ -1969,9 +1985,9 @@ var Ot = /* @__PURE__ */ _({
|
|
|
1969
1985
|
unmounted(e) {
|
|
1970
1986
|
e.classList.remove("sr-only");
|
|
1971
1987
|
}
|
|
1972
|
-
},
|
|
1973
|
-
e.directive("sr-only",
|
|
1974
|
-
}, Te = 1, Ae = 8,
|
|
1988
|
+
}, oa = (e) => {
|
|
1989
|
+
e.directive("sr-only", Oe);
|
|
1990
|
+
}, Te = 1, Ae = 8, ia = /* @__PURE__ */ M({
|
|
1975
1991
|
name: "KrdsPagination",
|
|
1976
1992
|
props: {
|
|
1977
1993
|
modelValue: {
|
|
@@ -2008,51 +2024,51 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2008
2024
|
if (!s.value)
|
|
2009
2025
|
return "#";
|
|
2010
2026
|
}), h = C(() => {
|
|
2011
|
-
const { max: K } = e, m = e.pageRange ?? Ae, v = 1,
|
|
2012
|
-
if (K <= m + 2) for (let
|
|
2027
|
+
const { max: K } = e, m = e.pageRange ?? Ae, v = 1, i = [];
|
|
2028
|
+
if (K <= m + 2) for (let o = r.value; o <= K; o++) i.push({
|
|
2013
2029
|
type: "page",
|
|
2014
|
-
key: `page-${
|
|
2015
|
-
page:
|
|
2030
|
+
key: `page-${o}`,
|
|
2031
|
+
page: o,
|
|
2016
2032
|
href: "#"
|
|
2017
2033
|
});
|
|
2018
2034
|
else {
|
|
2019
|
-
const
|
|
2020
|
-
for (let f = r.value; f <=
|
|
2035
|
+
const o = Math.min(v, K), p = Math.max(K - v + 1, 1), V = Math.max(r.value, l.value - Math.floor(m / 2)), A = Math.min(K, V + m - 1), E = Math.max(r.value, A - m + 1);
|
|
2036
|
+
for (let f = r.value; f <= o; f++) i.push({
|
|
2021
2037
|
type: "page",
|
|
2022
2038
|
key: `page-${f}`,
|
|
2023
2039
|
page: f,
|
|
2024
2040
|
href: "#"
|
|
2025
2041
|
});
|
|
2026
|
-
|
|
2042
|
+
E > o + 1 && i.push({
|
|
2027
2043
|
type: "ellipsis",
|
|
2028
2044
|
key: "ellipsis-left"
|
|
2029
2045
|
});
|
|
2030
|
-
const
|
|
2031
|
-
for (let f =
|
|
2046
|
+
const $ = Math.max(E, o + 1), x = Math.min(A, p - 1);
|
|
2047
|
+
for (let f = $; f <= x; f++) i.push({
|
|
2032
2048
|
type: "page",
|
|
2033
2049
|
key: `page-${f}`,
|
|
2034
2050
|
page: f,
|
|
2035
2051
|
href: "#"
|
|
2036
2052
|
});
|
|
2037
|
-
A < p - 1 &&
|
|
2053
|
+
A < p - 1 && i.push({
|
|
2038
2054
|
type: "ellipsis",
|
|
2039
2055
|
key: "ellipsis-right"
|
|
2040
2056
|
});
|
|
2041
|
-
for (let f = p; f <= K; f++)
|
|
2057
|
+
for (let f = p; f <= K; f++) i.push({
|
|
2042
2058
|
type: "page",
|
|
2043
2059
|
key: `page-${f}`,
|
|
2044
2060
|
page: f,
|
|
2045
2061
|
href: "#"
|
|
2046
2062
|
});
|
|
2047
2063
|
}
|
|
2048
|
-
return
|
|
2064
|
+
return i;
|
|
2049
2065
|
}), y = (K, m) => {
|
|
2050
2066
|
if (K === l.value) {
|
|
2051
2067
|
m.preventDefault();
|
|
2052
2068
|
return;
|
|
2053
2069
|
}
|
|
2054
2070
|
a("update:modelValue", K);
|
|
2055
|
-
},
|
|
2071
|
+
}, c = (K) => {
|
|
2056
2072
|
if (n.value) {
|
|
2057
2073
|
K.preventDefault();
|
|
2058
2074
|
return;
|
|
@@ -2073,7 +2089,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2073
2089
|
class: ["page-link", { active: m }],
|
|
2074
2090
|
"aria-current": m ? "page" : void 0,
|
|
2075
2091
|
onClick: (v) => y(K.page, v)
|
|
2076
|
-
}, [m ? ge(t("span", null, "현재페이지"), [[
|
|
2092
|
+
}, [m ? ge(t("span", null, "현재페이지"), [[Oe]]) : null, ` ${K.page} `]);
|
|
2077
2093
|
}
|
|
2078
2094
|
return t("span", {
|
|
2079
2095
|
key: K.key,
|
|
@@ -2091,7 +2107,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2091
2107
|
"prev",
|
|
2092
2108
|
{ disabled: n.value }
|
|
2093
2109
|
],
|
|
2094
|
-
onClick:
|
|
2110
|
+
onClick: c
|
|
2095
2111
|
}, "이전"),
|
|
2096
2112
|
t("div", { class: "page-links" }, h.value.map(k)),
|
|
2097
2113
|
t(s.value ? "span" : "a", {
|
|
@@ -2105,7 +2121,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2105
2121
|
}, "다음")
|
|
2106
2122
|
]);
|
|
2107
2123
|
}
|
|
2108
|
-
}), ua =
|
|
2124
|
+
}), ua = ia, _e = null, da = /* @__PURE__ */ M({
|
|
2109
2125
|
name: "KrdsPanel",
|
|
2110
2126
|
props: {
|
|
2111
2127
|
modelValue: {
|
|
@@ -2122,6 +2138,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2122
2138
|
}
|
|
2123
2139
|
},
|
|
2124
2140
|
emits: { "update:modelValue": (e) => !0 },
|
|
2141
|
+
slots: Object,
|
|
2125
2142
|
setup(e, { emit: a, slots: r }) {
|
|
2126
2143
|
const l = C({
|
|
2127
2144
|
get: () => e.modelValue,
|
|
@@ -2130,22 +2147,22 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2130
2147
|
l.value = !0;
|
|
2131
2148
|
}, s = () => {
|
|
2132
2149
|
l.value = !1;
|
|
2133
|
-
}, u =
|
|
2150
|
+
}, u = B(0), g = B(null), h = /* @__PURE__ */ Symbol("KrdsPanel");
|
|
2134
2151
|
let y = 0;
|
|
2135
|
-
const
|
|
2152
|
+
const c = () => {
|
|
2136
2153
|
cancelAnimationFrame(y), y = requestAnimationFrame(() => {
|
|
2137
2154
|
const S = document.querySelector(e.headerTopSelector), k = document.querySelector(e.headerInnerSelector), K = !!S && S.getBoundingClientRect().bottom > 0, m = !!document.querySelector(".g-wrap.scroll-down");
|
|
2138
2155
|
u.value = k ? K ? S.offsetHeight + k.offsetHeight : m ? 0 : k.offsetHeight : 0;
|
|
2139
2156
|
const v = g.value;
|
|
2140
2157
|
if (!v?.isConnected) return;
|
|
2141
|
-
const
|
|
2142
|
-
Number.isFinite(
|
|
2158
|
+
const i = parseFloat(getComputedStyle(v).top) + u.value + v.offsetHeight;
|
|
2159
|
+
Number.isFinite(i) && (document.documentElement.style.setProperty("--krds-help-panel--button-bottom", `${i}px`), _e = h);
|
|
2143
2160
|
});
|
|
2144
2161
|
};
|
|
2145
|
-
return
|
|
2146
|
-
|
|
2147
|
-
}), at(
|
|
2148
|
-
cancelAnimationFrame(y), _e === h && document.documentElement.style.removeProperty("--krds-help-panel--button-bottom"), window.removeEventListener("scroll",
|
|
2162
|
+
return te(() => {
|
|
2163
|
+
c(), window.addEventListener("scroll", c, { passive: !0 }), window.addEventListener("resize", c);
|
|
2164
|
+
}), at(c), ue(() => {
|
|
2165
|
+
cancelAnimationFrame(y), _e === h && document.documentElement.style.removeProperty("--krds-help-panel--button-bottom"), window.removeEventListener("scroll", c), window.removeEventListener("resize", c);
|
|
2149
2166
|
}), () => t("div", {
|
|
2150
2167
|
class: "inner help-panel-flexible",
|
|
2151
2168
|
style: { "--krds-help-panel--header-offset": `${u.value}px` }
|
|
@@ -2153,7 +2170,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2153
2170
|
ref: g,
|
|
2154
2171
|
type: "button",
|
|
2155
2172
|
class: "krds-btn small tertiary btn-help-panel expand btn-help-exec",
|
|
2156
|
-
onTransitionend:
|
|
2173
|
+
onTransitionend: c,
|
|
2157
2174
|
onClick: n
|
|
2158
2175
|
}, [t("i", { class: "svg-icon ico-fold" }), " 도움말"]), t("div", { class: ["krds-help-panel", { expand: l.value }] }, [t("div", { class: "help-panel-wrap" }, [t("div", { class: "help-conts-area" }, [r.default?.(), t("button", {
|
|
2159
2176
|
type: "button",
|
|
@@ -2165,7 +2182,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2165
2182
|
t("i", { class: "svg-icon ico-angle right" })
|
|
2166
2183
|
])])])])]);
|
|
2167
2184
|
}
|
|
2168
|
-
}), ca = da, fa = /* @__PURE__ */
|
|
2185
|
+
}), ca = da, fa = /* @__PURE__ */ M({
|
|
2169
2186
|
name: "KrdsContextualHelp",
|
|
2170
2187
|
props: {
|
|
2171
2188
|
tooltipTitle: {
|
|
@@ -2181,37 +2198,38 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2181
2198
|
default: "top left"
|
|
2182
2199
|
}
|
|
2183
2200
|
},
|
|
2201
|
+
slots: Object,
|
|
2184
2202
|
setup(e, { slots: a }) {
|
|
2185
|
-
const r =
|
|
2203
|
+
const r = B(), l = B(), n = B(), s = B(), u = B(!1), g = () => {
|
|
2186
2204
|
const v = u.value;
|
|
2187
|
-
|
|
2205
|
+
c(), v || h();
|
|
2188
2206
|
}, h = () => {
|
|
2189
2207
|
!n.value || !l.value || (u.value = !0, n.value.style.display = "block", l.value.setAttribute("aria-expanded", "true"), n.value.querySelector('a, button, [tabindex="0"], input, textarea, select')?.focus(), S());
|
|
2190
2208
|
}, y = () => {
|
|
2191
2209
|
!n.value || !l.value || (u.value = !1, n.value.style.display = "none", l.value.setAttribute("aria-expanded", "false"));
|
|
2192
|
-
},
|
|
2193
|
-
const v = document.querySelectorAll(".krds-contextual-help .tooltip-popover"),
|
|
2194
|
-
v.forEach((
|
|
2195
|
-
|
|
2196
|
-
}),
|
|
2197
|
-
|
|
2210
|
+
}, c = () => {
|
|
2211
|
+
const v = document.querySelectorAll(".krds-contextual-help .tooltip-popover"), i = document.querySelectorAll(".krds-contextual-help .tooltip-btn");
|
|
2212
|
+
v.forEach((o) => {
|
|
2213
|
+
o.style.display = "none";
|
|
2214
|
+
}), i.forEach((o) => {
|
|
2215
|
+
o.setAttribute("aria-expanded", "false");
|
|
2198
2216
|
}), u.value = !1;
|
|
2199
2217
|
}, S = () => {
|
|
2200
2218
|
if (!r.value || !n.value) return;
|
|
2201
|
-
const v = window.innerWidth <= 768,
|
|
2219
|
+
const v = window.innerWidth <= 768, i = r.value.querySelector(".tooltip-action");
|
|
2202
2220
|
if (v) {
|
|
2203
|
-
const
|
|
2204
|
-
n.value.style.left = `-${p}px`, n.value.style.width = `${
|
|
2221
|
+
const o = getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0], p = i.getBoundingClientRect().left - parseInt(o), V = document.body.clientWidth - parseInt(o) * 2;
|
|
2222
|
+
n.value.style.left = `-${p}px`, n.value.style.width = `${V}px`;
|
|
2205
2223
|
} else
|
|
2206
2224
|
n.value.style.left = "", n.value.style.right = "", n.value.style.width = "360px";
|
|
2207
2225
|
}, k = (v) => {
|
|
2208
|
-
(v.key === "Escape" || v.key === "Esc") &&
|
|
2226
|
+
(v.key === "Escape" || v.key === "Esc") && c();
|
|
2209
2227
|
}, K = (v) => {
|
|
2210
|
-
v.target.closest(".tooltip-action") ||
|
|
2228
|
+
v.target.closest(".tooltip-action") || c();
|
|
2211
2229
|
}, m = () => {
|
|
2212
2230
|
u.value && S();
|
|
2213
2231
|
};
|
|
2214
|
-
return
|
|
2232
|
+
return te(() => {
|
|
2215
2233
|
r.value && (l.value && l.value.setAttribute("aria-expanded", "false"), n.value && n.value.setAttribute("role", "tooltip"), document.addEventListener("keydown", k), document.addEventListener("click", K), window.addEventListener("resize", m));
|
|
2216
2234
|
}), ue(() => {
|
|
2217
2235
|
document.removeEventListener("keydown", k), document.removeEventListener("click", K), window.removeEventListener("resize", m);
|
|
@@ -2238,7 +2256,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2238
2256
|
}, [t("span", { class: "sr-only" }, "닫기"), t("i", { class: "svg-icon ico-modal-close" })])
|
|
2239
2257
|
])])]);
|
|
2240
2258
|
}
|
|
2241
|
-
}), va = fa, pa = /* @__PURE__ */
|
|
2259
|
+
}), va = fa, pa = /* @__PURE__ */ M({
|
|
2242
2260
|
name: "KrdsCoachMark",
|
|
2243
2261
|
props: {
|
|
2244
2262
|
coachMarkClass: {
|
|
@@ -2266,6 +2284,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2266
2284
|
"update:modelValue": (e) => !0,
|
|
2267
2285
|
close: () => !0
|
|
2268
2286
|
},
|
|
2287
|
+
slots: Object,
|
|
2269
2288
|
setup(e, { emit: a, slots: r }) {
|
|
2270
2289
|
const l = C(() => {
|
|
2271
2290
|
const h = e.activeStep - 1;
|
|
@@ -2311,7 +2330,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2311
2330
|
style: e.style
|
|
2312
2331
|
}, [g(), r["coach-mark-content"]?.()]);
|
|
2313
2332
|
}
|
|
2314
|
-
}), ha = pa, ga = /* @__PURE__ */
|
|
2333
|
+
}), ha = pa, ga = /* @__PURE__ */ M({
|
|
2315
2334
|
name: "KrdsTooltip",
|
|
2316
2335
|
props: {
|
|
2317
2336
|
type: {
|
|
@@ -2335,25 +2354,26 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2335
2354
|
default: !1
|
|
2336
2355
|
}
|
|
2337
2356
|
},
|
|
2357
|
+
slots: Object,
|
|
2338
2358
|
setup(e, { slots: a }) {
|
|
2339
|
-
const r =
|
|
2359
|
+
const r = B(null), l = B(null), n = B(!1), s = B({}), u = `tooltip-popover-${de()}`, g = B(!1), h = C(() => {
|
|
2340
2360
|
const p = ["krds-btn", "krds-tooltip"];
|
|
2341
2361
|
return e.type === "default" ? p.push("small", "text") : e.type === "icon" ? p.push("icon") : e.type === "button" && p.push(""), !e.box && e.vertical && p.push("tooltip-vertical"), e.box && !e.vertical && p.push("tooltip-box"), p.join(" ");
|
|
2342
2362
|
}), y = C(() => {
|
|
2343
2363
|
const p = [];
|
|
2344
2364
|
return e.box && p.push("tooltip-box"), e.vertical && p.push("tooltip-vertical"), n.value && p.push("active"), p;
|
|
2345
|
-
}),
|
|
2365
|
+
}), c = C(() => r.value?.querySelector("button")?.textContent?.trim() || ""), S = () => window.innerWidth <= 768, k = () => {
|
|
2346
2366
|
if (!r.value || !l.value) return;
|
|
2347
2367
|
const p = r.value.querySelector("button");
|
|
2348
2368
|
if (!p) return;
|
|
2349
|
-
const
|
|
2350
|
-
let
|
|
2369
|
+
const V = 12, { clientHeight: A, clientWidth: E } = l.value, { top: $, left: x, right: f, height: D, width: z } = p.getBoundingClientRect(), I = window.innerWidth / 2, H = window.innerHeight / 2;
|
|
2370
|
+
let j, W;
|
|
2351
2371
|
const U = [];
|
|
2352
|
-
g.value || e.box || e.vertical ? (
|
|
2372
|
+
g.value || e.box || e.vertical ? ($ + D > H ? (j = $ - A - V, U.push("top")) : (j = $ + D + V, U.push("bottom")), x + z > I ? (W = f - E, U.push("right"), window.innerWidth - (x + z) > E / 2 && (W = x + (z - E) / 2, U.splice(U.indexOf("right"), 1))) : (W = x + (z - E) / 2, W < 0 && (W = x, U.push("left")))) : (j = $ + (D - A) / 2, x + z > I ? (W = x - E - V, U.push("right")) : W = f + V);
|
|
2353
2373
|
const ce = window.innerWidth <= 420;
|
|
2354
2374
|
s.value = {
|
|
2355
|
-
top: `${
|
|
2356
|
-
left: ce ? "50%" : `${
|
|
2375
|
+
top: `${j}px`,
|
|
2376
|
+
left: ce ? "50%" : `${W}px`,
|
|
2357
2377
|
transform: ce ? "translateX(-50%)" : "none"
|
|
2358
2378
|
}, l.value && (l.value.className = `krds-tooltip-popover ${U.join(" ")} ${y.value.join(" ")}`);
|
|
2359
2379
|
}, K = async () => {
|
|
@@ -2362,15 +2382,15 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2362
2382
|
n.value = !1, s.value = {};
|
|
2363
2383
|
}, v = (p) => {
|
|
2364
2384
|
(p.key === "Escape" || p.key === "Esc") && n.value && m();
|
|
2365
|
-
}, o = () => {
|
|
2366
|
-
g.value = S(), n.value && m();
|
|
2367
2385
|
}, i = () => {
|
|
2386
|
+
g.value = S(), n.value && m();
|
|
2387
|
+
}, o = () => {
|
|
2368
2388
|
n.value && m();
|
|
2369
2389
|
};
|
|
2370
|
-
return
|
|
2371
|
-
g.value = S(), document.addEventListener("keydown", v), window.addEventListener("scroll",
|
|
2390
|
+
return te(() => {
|
|
2391
|
+
g.value = S(), document.addEventListener("keydown", v), window.addEventListener("scroll", o), window.addEventListener("resize", i);
|
|
2372
2392
|
}), ue(() => {
|
|
2373
|
-
document.removeEventListener("keydown", v), window.removeEventListener("scroll",
|
|
2393
|
+
document.removeEventListener("keydown", v), window.removeEventListener("scroll", o), window.removeEventListener("resize", i);
|
|
2374
2394
|
}), () => t("div", { ref: r }, [t("button", {
|
|
2375
2395
|
type: "button",
|
|
2376
2396
|
class: h.value,
|
|
@@ -2388,12 +2408,12 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2388
2408
|
"aria-hidden": !n.value,
|
|
2389
2409
|
role: "tooltip"
|
|
2390
2410
|
}, [
|
|
2391
|
-
t("span", { class: "sr-only" },
|
|
2411
|
+
t("span", { class: "sr-only" }, c.value),
|
|
2392
2412
|
" ",
|
|
2393
2413
|
e.tooltipContent
|
|
2394
2414
|
]), [[Se, n.value]])]);
|
|
2395
2415
|
}
|
|
2396
|
-
}), ya = ga, ma = /* @__PURE__ */
|
|
2416
|
+
}), ya = ga, ma = /* @__PURE__ */ M({
|
|
2397
2417
|
name: "KrdsLanguageSwitcher",
|
|
2398
2418
|
props: {
|
|
2399
2419
|
languageList: {
|
|
@@ -2417,58 +2437,59 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2417
2437
|
"update:modelValue": (e) => !0,
|
|
2418
2438
|
close: () => !0
|
|
2419
2439
|
},
|
|
2440
|
+
slots: Object,
|
|
2420
2441
|
setup(e, { emit: a, slots: r }) {
|
|
2421
|
-
const l =
|
|
2442
|
+
const l = B(!1), n = B(), s = B(), u = () => {
|
|
2422
2443
|
l.value = !l.value, l.value && n.value && y();
|
|
2423
2444
|
}, g = () => {
|
|
2424
2445
|
l.value = !1;
|
|
2425
|
-
}, h = (
|
|
2426
|
-
a("update:modelValue",
|
|
2446
|
+
}, h = (i) => {
|
|
2447
|
+
a("update:modelValue", i), g(), a("close"), s.value?.focus();
|
|
2427
2448
|
}, y = () => {
|
|
2428
2449
|
if (!n.value) return;
|
|
2429
|
-
const
|
|
2430
|
-
if (!
|
|
2431
|
-
const
|
|
2432
|
-
n.value.classList.remove("drop-left", "drop-right"),
|
|
2433
|
-
},
|
|
2434
|
-
|
|
2435
|
-
}, S = (
|
|
2436
|
-
n.value?.contains(
|
|
2437
|
-
}, k = (
|
|
2438
|
-
n.value?.contains(
|
|
2439
|
-
}, K = (
|
|
2450
|
+
const i = n.value.querySelector(".drop-menu");
|
|
2451
|
+
if (!i) return;
|
|
2452
|
+
const o = i.getBoundingClientRect(), p = window.innerWidth;
|
|
2453
|
+
n.value.classList.remove("drop-left", "drop-right"), o.left < 0 ? n.value.classList.add("drop-left") : p < o.left + o.width && n.value.classList.add("drop-right");
|
|
2454
|
+
}, c = (i) => {
|
|
2455
|
+
i.key === "Escape" && (g(), s.value?.focus());
|
|
2456
|
+
}, S = (i) => {
|
|
2457
|
+
n.value?.contains(i.target) || g();
|
|
2458
|
+
}, k = (i) => {
|
|
2459
|
+
n.value?.contains(i.relatedTarget) || g();
|
|
2460
|
+
}, K = (i) => {
|
|
2440
2461
|
if (!n.value) return;
|
|
2441
2462
|
n.value.querySelectorAll(".drop-list .item-link").forEach((p) => {
|
|
2442
2463
|
p.style.position = "relative", p.style.zIndex = "0";
|
|
2443
2464
|
});
|
|
2444
|
-
const
|
|
2445
|
-
|
|
2465
|
+
const o = i.target;
|
|
2466
|
+
o.style.zIndex = "1";
|
|
2446
2467
|
};
|
|
2447
|
-
se(l, (
|
|
2448
|
-
|
|
2468
|
+
se(l, (i) => {
|
|
2469
|
+
i ? (document.addEventListener("keydown", c), document.addEventListener("click", S)) : (document.removeEventListener("keydown", c), document.removeEventListener("click", S));
|
|
2449
2470
|
}), ue(() => {
|
|
2450
|
-
document.removeEventListener("keydown",
|
|
2471
|
+
document.removeEventListener("keydown", c), document.removeEventListener("click", S);
|
|
2451
2472
|
});
|
|
2452
|
-
const m = () => t("ul", { class: "drop-list" }, e.languageList.map((
|
|
2473
|
+
const m = () => t("ul", { class: "drop-list" }, e.languageList.map((i) => t("li", { key: i.code }, [t("a", {
|
|
2453
2474
|
href: "#",
|
|
2454
|
-
class: ["item-link", { active: e.modelValue ===
|
|
2455
|
-
lang:
|
|
2456
|
-
"aria-selected": e.modelValue ===
|
|
2457
|
-
onClick: Ke(() => h(
|
|
2475
|
+
class: ["item-link", { active: e.modelValue === i.code }],
|
|
2476
|
+
lang: i.code,
|
|
2477
|
+
"aria-selected": e.modelValue === i.code,
|
|
2478
|
+
onClick: Ke(() => h(i.code), ["prevent"]),
|
|
2458
2479
|
onFocus: K
|
|
2459
2480
|
}, [
|
|
2460
|
-
|
|
2481
|
+
i.name,
|
|
2461
2482
|
" ",
|
|
2462
|
-
t("span", { class: "sr-only" }, e.modelValue ===
|
|
2463
|
-
])]))), v = () => t("ul", { class: "drop-list" }, e.languageList.map((
|
|
2464
|
-
href:
|
|
2483
|
+
t("span", { class: "sr-only" }, e.modelValue === i.code ? "선택됨" : "")
|
|
2484
|
+
])]))), v = () => t("ul", { class: "drop-list" }, e.languageList.map((i) => t("li", { key: i.code }, [t("a", {
|
|
2485
|
+
href: i.url || "#",
|
|
2465
2486
|
class: "item-link",
|
|
2466
|
-
lang:
|
|
2487
|
+
lang: i.code,
|
|
2467
2488
|
target: "_blank",
|
|
2468
2489
|
title: "새 창 열림",
|
|
2469
2490
|
onFocus: K
|
|
2470
2491
|
}, [
|
|
2471
|
-
|
|
2492
|
+
i.name,
|
|
2472
2493
|
" ",
|
|
2473
2494
|
t("i", { class: "svg-icon ico-go" })
|
|
2474
2495
|
])])));
|
|
@@ -2499,7 +2520,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2499
2520
|
style: { display: l.value ? "block" : "none" }
|
|
2500
2521
|
}, [t("div", { class: "drop-in" }, [r["prev-item"] ? t("div", { class: "drop-top" }, r["prev-item"]()) : null, e.type === "default" ? m() : e.type === "external" ? v() : null])])]);
|
|
2501
2522
|
}
|
|
2502
|
-
}), ba = ma, ka = /* @__PURE__ */
|
|
2523
|
+
}), ba = ma, ka = /* @__PURE__ */ M({
|
|
2503
2524
|
name: "KrdsResize",
|
|
2504
2525
|
props: { modelValue: {
|
|
2505
2526
|
type: String,
|
|
@@ -2510,7 +2531,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2510
2531
|
close: () => !0
|
|
2511
2532
|
},
|
|
2512
2533
|
setup(e, { emit: a }) {
|
|
2513
|
-
const r =
|
|
2534
|
+
const r = B(!1), l = B(), n = B(), s = B(e.modelValue ?? "md"), u = [
|
|
2514
2535
|
{
|
|
2515
2536
|
key: "sm",
|
|
2516
2537
|
label: "작게",
|
|
@@ -2540,38 +2561,38 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2540
2561
|
r.value = !r.value, r.value && l.value && k();
|
|
2541
2562
|
}, h = () => {
|
|
2542
2563
|
r.value = !1;
|
|
2543
|
-
}, y = (
|
|
2544
|
-
const p = u.find((
|
|
2564
|
+
}, y = (o) => {
|
|
2565
|
+
const p = u.find((V) => V.key === o);
|
|
2545
2566
|
p && (s.value = p.key, document.body.style.zoom = p.zoom);
|
|
2546
|
-
},
|
|
2547
|
-
h(), a("close"), n.value?.focus(), y(
|
|
2567
|
+
}, c = (o) => {
|
|
2568
|
+
h(), a("close"), n.value?.focus(), y(o.key), a("update:modelValue", o.key);
|
|
2548
2569
|
};
|
|
2549
|
-
|
|
2570
|
+
te(() => e.modelValue && y(e.modelValue)), se(() => e.modelValue, (o) => o && y(o));
|
|
2550
2571
|
const S = () => {
|
|
2551
|
-
const
|
|
2552
|
-
|
|
2572
|
+
const o = u.find((p) => p.key === "md");
|
|
2573
|
+
o && c(o);
|
|
2553
2574
|
}, k = () => {
|
|
2554
2575
|
if (!l.value) return;
|
|
2555
|
-
const
|
|
2556
|
-
if (!
|
|
2557
|
-
const p =
|
|
2558
|
-
l.value.classList.remove("drop-left", "drop-right"), p.left < 0 ? l.value.classList.add("drop-left") :
|
|
2559
|
-
}, K = (
|
|
2560
|
-
|
|
2561
|
-
}, m = (
|
|
2562
|
-
l.value?.contains(
|
|
2563
|
-
}, v = (
|
|
2564
|
-
l.value?.contains(
|
|
2565
|
-
},
|
|
2576
|
+
const o = l.value.querySelector(".drop-menu");
|
|
2577
|
+
if (!o) return;
|
|
2578
|
+
const p = o.getBoundingClientRect(), V = window.innerWidth;
|
|
2579
|
+
l.value.classList.remove("drop-left", "drop-right"), p.left < 0 ? l.value.classList.add("drop-left") : V < p.left + p.width && l.value.classList.add("drop-right");
|
|
2580
|
+
}, K = (o) => {
|
|
2581
|
+
o.key === "Escape" && (h(), n.value?.focus());
|
|
2582
|
+
}, m = (o) => {
|
|
2583
|
+
l.value?.contains(o.target) || h();
|
|
2584
|
+
}, v = (o) => {
|
|
2585
|
+
l.value?.contains(o.relatedTarget) || h();
|
|
2586
|
+
}, i = (o) => {
|
|
2566
2587
|
if (!l.value) return;
|
|
2567
|
-
l.value.querySelectorAll(".drop-list .item-link").forEach((
|
|
2568
|
-
|
|
2588
|
+
l.value.querySelectorAll(".drop-list .item-link").forEach((V) => {
|
|
2589
|
+
V.style.position = "relative", V.style.zIndex = "0";
|
|
2569
2590
|
});
|
|
2570
|
-
const p =
|
|
2591
|
+
const p = o.target;
|
|
2571
2592
|
p.style.zIndex = "1";
|
|
2572
2593
|
};
|
|
2573
|
-
return se(r, (
|
|
2574
|
-
|
|
2594
|
+
return se(r, (o) => {
|
|
2595
|
+
o ? (document.addEventListener("keydown", K), document.addEventListener("click", m)) : (document.removeEventListener("keydown", K), document.removeEventListener("click", m));
|
|
2575
2596
|
}), ue(() => {
|
|
2576
2597
|
document.removeEventListener("keydown", K), document.removeEventListener("click", m);
|
|
2577
2598
|
}), () => t("div", {
|
|
@@ -2587,25 +2608,25 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2587
2608
|
}, ["화면크기 ", t("i", { class: "svg-icon ico-toggle" })]), t("div", {
|
|
2588
2609
|
class: "drop-menu",
|
|
2589
2610
|
style: { display: r.value ? "block" : "none" }
|
|
2590
|
-
}, [t("div", { class: "drop-in" }, [t("ul", { class: "drop-list" }, u.map((
|
|
2611
|
+
}, [t("div", { class: "drop-in" }, [t("ul", { class: "drop-list" }, u.map((o) => t("li", { key: o.key }, [t("button", {
|
|
2591
2612
|
type: "button",
|
|
2592
2613
|
class: [
|
|
2593
2614
|
"item-link",
|
|
2594
|
-
|
|
2595
|
-
|
|
2615
|
+
o.key,
|
|
2616
|
+
o.key === s.value ? "active" : ""
|
|
2596
2617
|
],
|
|
2597
|
-
"data-adjust-scale":
|
|
2598
|
-
onClick: Ke(() =>
|
|
2599
|
-
onFocus:
|
|
2600
|
-
},
|
|
2618
|
+
"data-adjust-scale": o.key,
|
|
2619
|
+
onClick: Ke(() => c(o), ["prevent"]),
|
|
2620
|
+
onFocus: i
|
|
2621
|
+
}, o.label)]))), t("div", { class: "drop-bottom" }, [t("button", {
|
|
2601
2622
|
type: "button",
|
|
2602
2623
|
class: "krds-btn medium text",
|
|
2603
2624
|
"data-adjust-scale": "md",
|
|
2604
2625
|
onClick: Ke(S, ["prevent"]),
|
|
2605
|
-
onFocus:
|
|
2626
|
+
onFocus: i
|
|
2606
2627
|
}, [t("i", { class: "svg-icon ico-reset" }), " 초기화"])])])])]);
|
|
2607
2628
|
}
|
|
2608
|
-
}), Sa = ka, wa = /* @__PURE__ */
|
|
2629
|
+
}), Sa = ka, wa = /* @__PURE__ */ M({
|
|
2609
2630
|
name: "KrdsModal",
|
|
2610
2631
|
props: {
|
|
2611
2632
|
modelValue: {
|
|
@@ -2642,7 +2663,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2642
2663
|
setup(e, { slots: a, emit: r }) {
|
|
2643
2664
|
const l = xe()?.uid, n = C(() => e.modalId ?? `krds-modal-${l}`), s = C({
|
|
2644
2665
|
get: () => e.modelValue,
|
|
2645
|
-
set: (
|
|
2666
|
+
set: (o) => r("update:modelValue", o)
|
|
2646
2667
|
}), u = C(() => `tit_${n.value}`), g = C(() => ({
|
|
2647
2668
|
small: "modal-sm",
|
|
2648
2669
|
medium: "modal-md",
|
|
@@ -2650,43 +2671,43 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2650
2671
|
})[e.size]), h = () => {
|
|
2651
2672
|
s.value = !1;
|
|
2652
2673
|
};
|
|
2653
|
-
let y = "",
|
|
2654
|
-
const S =
|
|
2655
|
-
if (!S.value ||
|
|
2674
|
+
let y = "", c = null;
|
|
2675
|
+
const S = B(null), k = (o) => Array.from(o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter((p) => !p.hasAttribute("disabled") && p.getAttribute("tabindex") !== "-1"), K = (o) => {
|
|
2676
|
+
if (!S.value || o.key !== "Tab") return;
|
|
2656
2677
|
const p = k(S.value);
|
|
2657
2678
|
if (p.length === 0) {
|
|
2658
|
-
|
|
2679
|
+
o.preventDefault();
|
|
2659
2680
|
return;
|
|
2660
2681
|
}
|
|
2661
|
-
const
|
|
2662
|
-
|
|
2663
|
-
}, m = (
|
|
2664
|
-
|
|
2682
|
+
const V = p[0], A = p[p.length - 1];
|
|
2683
|
+
o.shiftKey && document.activeElement === V ? (o.preventDefault(), A.focus()) : !o.shiftKey && document.activeElement === A && (o.preventDefault(), V.focus());
|
|
2684
|
+
}, m = (o) => {
|
|
2685
|
+
o.key === "Escape" && !e.persistent && h();
|
|
2665
2686
|
}, v = () => {
|
|
2666
|
-
document.body.style.overflow = y, document.removeEventListener("keydown", K), document.removeEventListener("keydown", m),
|
|
2667
|
-
},
|
|
2668
|
-
y = document.body.style.overflow, document.body.style.overflow = "hidden",
|
|
2669
|
-
const
|
|
2670
|
-
if (
|
|
2671
|
-
S.value =
|
|
2672
|
-
const p =
|
|
2687
|
+
document.body.style.overflow = y, document.removeEventListener("keydown", K), document.removeEventListener("keydown", m), c && (c.focus(), c = null), S.value = null;
|
|
2688
|
+
}, i = async () => {
|
|
2689
|
+
y = document.body.style.overflow, document.body.style.overflow = "hidden", c = document.activeElement, await pe();
|
|
2690
|
+
const o = document.getElementById(n.value);
|
|
2691
|
+
if (o) {
|
|
2692
|
+
S.value = o;
|
|
2693
|
+
const p = o.querySelector(".modal-conts");
|
|
2673
2694
|
p && (p.setAttribute("tabindex", "-1"), p.focus()), document.addEventListener("keydown", K), document.addEventListener("keydown", m);
|
|
2674
2695
|
}
|
|
2675
2696
|
};
|
|
2676
|
-
return se(() => e.modelValue, (
|
|
2677
|
-
e.modelValue &&
|
|
2678
|
-
}),
|
|
2697
|
+
return se(() => e.modelValue, (o) => o ? i() : v()), te(() => {
|
|
2698
|
+
e.modelValue && i();
|
|
2699
|
+
}), ie(() => {
|
|
2679
2700
|
e.modelValue && v();
|
|
2680
2701
|
}), () => {
|
|
2681
2702
|
if (!s.value) return null;
|
|
2682
|
-
const
|
|
2703
|
+
const o = {
|
|
2683
2704
|
id: n.value,
|
|
2684
2705
|
class: "krds-modal fade in shown",
|
|
2685
2706
|
role: "dialog",
|
|
2686
2707
|
"aria-modal": !0,
|
|
2687
2708
|
"aria-labelledby": u.value
|
|
2688
2709
|
};
|
|
2689
|
-
return e.full ?
|
|
2710
|
+
return e.full ? o["data-type"] = "full" : e.bottomSheet && (o["data-type"] = "bottom-sheet"), t(Ce, { to: "body" }, t("section", o, [t("div", { class: `modal-dialog ${g.value}` }, [t("div", { class: "modal-content" }, [
|
|
2690
2711
|
a.title ? t("div", { class: "modal-header" }, [t("h2", {
|
|
2691
2712
|
id: u.value,
|
|
2692
2713
|
class: "modal-title"
|
|
@@ -2704,7 +2725,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2704
2725
|
})]));
|
|
2705
2726
|
};
|
|
2706
2727
|
}
|
|
2707
|
-
}), Ka = wa, Ca = /* @__PURE__ */
|
|
2728
|
+
}), Ka = wa, Ca = /* @__PURE__ */ M({
|
|
2708
2729
|
name: "KrdsAccordionGroup",
|
|
2709
2730
|
props: {
|
|
2710
2731
|
typeLine: {
|
|
@@ -2716,6 +2737,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2716
2737
|
default: void 0
|
|
2717
2738
|
}
|
|
2718
2739
|
},
|
|
2740
|
+
slots: Object,
|
|
2719
2741
|
setup(e, { slots: a }) {
|
|
2720
2742
|
const r = C(() => {
|
|
2721
2743
|
const l = ["krds-accordion"];
|
|
@@ -2723,7 +2745,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2723
2745
|
});
|
|
2724
2746
|
return () => t("div", { class: r.value }, a.default?.());
|
|
2725
2747
|
}
|
|
2726
|
-
}), xa = Ca, $a = /* @__PURE__ */
|
|
2748
|
+
}), xa = Ca, $a = /* @__PURE__ */ M({
|
|
2727
2749
|
name: "KrdsAccordionItem",
|
|
2728
2750
|
props: {
|
|
2729
2751
|
id: {
|
|
@@ -2744,6 +2766,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2744
2766
|
}
|
|
2745
2767
|
},
|
|
2746
2768
|
emits: { toggle: (e) => !0 },
|
|
2769
|
+
slots: Object,
|
|
2747
2770
|
setup(e, { emit: a, slots: r }) {
|
|
2748
2771
|
const l = C(() => e.openItem === e.id), n = () => {
|
|
2749
2772
|
a("toggle", e.id);
|
|
@@ -2765,7 +2788,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2765
2788
|
"aria-labelledby": `accordion-header-${e.id}`
|
|
2766
2789
|
}, [t("div", { class: "accordion-body" }, r.content?.() ?? e.content)])]);
|
|
2767
2790
|
}
|
|
2768
|
-
}), La = $a, Ba = /* @__PURE__ */
|
|
2791
|
+
}), La = $a, Ba = /* @__PURE__ */ M({
|
|
2769
2792
|
name: "KrdsTts",
|
|
2770
2793
|
props: {
|
|
2771
2794
|
text: {
|
|
@@ -2800,7 +2823,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2800
2823
|
error: (e) => !0
|
|
2801
2824
|
},
|
|
2802
2825
|
setup(e, { emit: a }) {
|
|
2803
|
-
const r =
|
|
2826
|
+
const r = B(!1);
|
|
2804
2827
|
let l = null;
|
|
2805
2828
|
const n = () => {
|
|
2806
2829
|
typeof window < "u" && window.speechSynthesis && window.speechSynthesis.cancel(), r.value = !1, l = null;
|
|
@@ -2826,7 +2849,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2826
2849
|
const h = ["krds-tts"];
|
|
2827
2850
|
return e.size && h.push(e.size), r.value ? h.push("pause") : e.icon === "play" && h.push("play"), e.class && h.push(e.class), h;
|
|
2828
2851
|
}), g = C(() => r.value ? "ico-stop" : e.icon === "play" ? "ico-play" : "ico-volume");
|
|
2829
|
-
return
|
|
2852
|
+
return ie(() => {
|
|
2830
2853
|
n();
|
|
2831
2854
|
}), () => {
|
|
2832
2855
|
const h = [t("span", {
|
|
@@ -2841,7 +2864,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2841
2864
|
}, h);
|
|
2842
2865
|
};
|
|
2843
2866
|
}
|
|
2844
|
-
}), Ea = Ba, Da = /* @__PURE__ */
|
|
2867
|
+
}), Ea = Ba, Da = /* @__PURE__ */ M({
|
|
2845
2868
|
name: "KrdsTable",
|
|
2846
2869
|
props: {
|
|
2847
2870
|
caption: {
|
|
@@ -2865,70 +2888,70 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2865
2888
|
slots: Object,
|
|
2866
2889
|
setup(e, { emit: a, slots: r }) {
|
|
2867
2890
|
const l = xe(), n = C(() => {
|
|
2868
|
-
const
|
|
2869
|
-
return e.class &&
|
|
2870
|
-
}), s = C(() => ["krds-table-wrap"]), u = (
|
|
2871
|
-
const
|
|
2872
|
-
return
|
|
2873
|
-
}, h = (
|
|
2874
|
-
if (
|
|
2875
|
-
return typeof
|
|
2876
|
-
}, y = (
|
|
2891
|
+
const i = ["tbl"];
|
|
2892
|
+
return e.class && i.push(e.class), i;
|
|
2893
|
+
}), s = C(() => ["krds-table-wrap"]), u = (i) => i.headerStyle || void 0, g = (i) => {
|
|
2894
|
+
const o = [];
|
|
2895
|
+
return i.align && o.push(`text-${i.align}`), i.headerClasses && o.push(i.headerClasses), o.length > 0 ? o : void 0;
|
|
2896
|
+
}, h = (i, o) => {
|
|
2897
|
+
if (o.style)
|
|
2898
|
+
return typeof o.style == "function" ? o.style(i) : o.style;
|
|
2899
|
+
}, y = (i, o) => {
|
|
2877
2900
|
const p = [];
|
|
2878
|
-
if (
|
|
2879
|
-
const
|
|
2880
|
-
p.push(
|
|
2901
|
+
if (o.align && p.push(`text-${o.align}`), o.classes) {
|
|
2902
|
+
const V = typeof o.classes == "function" ? o.classes(i) : o.classes;
|
|
2903
|
+
p.push(V);
|
|
2881
2904
|
}
|
|
2882
2905
|
return p.length > 0 ? p : void 0;
|
|
2883
|
-
},
|
|
2884
|
-
if (!
|
|
2885
|
-
const
|
|
2886
|
-
return t("col", { style:
|
|
2906
|
+
}, c = () => !e.columns.length || !e.columns.some((i) => i.headerStyle && i.headerStyle.includes("width")) ? null : t("colgroup", e.columns.map((i) => {
|
|
2907
|
+
if (!i.headerStyle) return t("col");
|
|
2908
|
+
const o = i.headerStyle.match(/width\s*:\s*([^;]+)/i);
|
|
2909
|
+
return t("col", { style: o ? { width: o[1].trim() } : void 0 });
|
|
2887
2910
|
})), S = () => {
|
|
2888
2911
|
if (!e.columns.length) return null;
|
|
2889
|
-
const
|
|
2890
|
-
const p = u(
|
|
2912
|
+
const i = e.columns.map((o) => {
|
|
2913
|
+
const p = u(o), V = g(o);
|
|
2891
2914
|
return t("th", {
|
|
2892
2915
|
scope: "col",
|
|
2893
|
-
class:
|
|
2916
|
+
class: V,
|
|
2894
2917
|
style: p
|
|
2895
|
-
},
|
|
2918
|
+
}, o.label);
|
|
2896
2919
|
});
|
|
2897
|
-
return t("thead", [t("tr",
|
|
2898
|
-
}, k = (
|
|
2920
|
+
return t("thead", [t("tr", i)]);
|
|
2921
|
+
}, k = (i, o) => typeof o.field == "function" ? o.field(i) : i[o.field], K = () => {
|
|
2899
2922
|
if (!e.rows.length) return t("tbody", [t("tr", [t("td", {
|
|
2900
2923
|
colspan: e.columns.length || 1,
|
|
2901
2924
|
class: "text-center"
|
|
2902
2925
|
}, r["no-data"] ? r["no-data"]() : "데이터가 없습니다.")])]);
|
|
2903
|
-
const
|
|
2904
|
-
const
|
|
2905
|
-
const f = k(
|
|
2906
|
-
return t(
|
|
2907
|
-
scope:
|
|
2908
|
-
class:
|
|
2909
|
-
style:
|
|
2910
|
-
},
|
|
2926
|
+
const i = l?.vnode.props, o = !!(i?.onRowClick || i?.["onRow-click"]), p = e.rows.map((V, A) => {
|
|
2927
|
+
const E = e.columns.map(($, x) => {
|
|
2928
|
+
const f = k(V, $), D = typeof f == "function" ? f() : f, z = h(V, $), I = y(V, $);
|
|
2929
|
+
return t(x === 0 ? "th" : "td", {
|
|
2930
|
+
scope: x === 0 ? "row" : void 0,
|
|
2931
|
+
class: I,
|
|
2932
|
+
style: z
|
|
2933
|
+
}, D);
|
|
2911
2934
|
});
|
|
2912
|
-
return t("tr",
|
|
2935
|
+
return t("tr", o ? {
|
|
2913
2936
|
tabindex: 0,
|
|
2914
|
-
onClick: () => m(
|
|
2915
|
-
onKeydown: (
|
|
2916
|
-
} : null,
|
|
2937
|
+
onClick: () => m(V, A),
|
|
2938
|
+
onKeydown: ($) => v($, V, A)
|
|
2939
|
+
} : null, E);
|
|
2917
2940
|
});
|
|
2918
2941
|
return t("tbody", p);
|
|
2919
|
-
}, m = (
|
|
2920
|
-
a("row-click",
|
|
2921
|
-
}, v = (
|
|
2922
|
-
|
|
2942
|
+
}, m = (i, o) => {
|
|
2943
|
+
a("row-click", i, o);
|
|
2944
|
+
}, v = (i, o, p) => {
|
|
2945
|
+
i.target !== i.currentTarget || i.key !== "Enter" && i.key !== " " || (i.preventDefault(), m(o, p));
|
|
2923
2946
|
};
|
|
2924
2947
|
return () => t("div", { class: s.value }, [t("table", { class: n.value }, [
|
|
2925
2948
|
e.caption && t("caption", e.caption),
|
|
2926
|
-
|
|
2949
|
+
c(),
|
|
2927
2950
|
S(),
|
|
2928
2951
|
K()
|
|
2929
2952
|
])]);
|
|
2930
2953
|
}
|
|
2931
|
-
}), Ta = Da, Aa = /* @__PURE__ */
|
|
2954
|
+
}), Ta = Da, Aa = /* @__PURE__ */ M({
|
|
2932
2955
|
name: "KrdsHeader",
|
|
2933
2956
|
props: {
|
|
2934
2957
|
id: {
|
|
@@ -2960,7 +2983,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2960
2983
|
}, n);
|
|
2961
2984
|
};
|
|
2962
2985
|
}
|
|
2963
|
-
}), _a = Aa, Ma = /* @__PURE__ */
|
|
2986
|
+
}), _a = Aa, Ma = /* @__PURE__ */ M({
|
|
2964
2987
|
name: "KrdsFooter",
|
|
2965
2988
|
props: {
|
|
2966
2989
|
id: {
|
|
@@ -2972,14 +2995,15 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2972
2995
|
default: void 0
|
|
2973
2996
|
}
|
|
2974
2997
|
},
|
|
2998
|
+
slots: Object,
|
|
2975
2999
|
setup(e, { slots: a }) {
|
|
2976
3000
|
const r = C(() => {
|
|
2977
3001
|
const g = [];
|
|
2978
3002
|
return e.class && g.push(e.class), g;
|
|
2979
3003
|
}), 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, u = () => a.bottom ? t("div", { class: "f-btm" }, a.bottom()) : null;
|
|
2980
3004
|
return () => {
|
|
2981
|
-
const g = l(), h = n(), y = s(),
|
|
2982
|
-
h && S.push(h), y && S.push(y),
|
|
3005
|
+
const g = l(), h = n(), y = s(), c = u(), S = [];
|
|
3006
|
+
h && S.push(h), y && S.push(y), c && S.push(c);
|
|
2983
3007
|
const k = [];
|
|
2984
3008
|
return g && k.push(g), S.length > 0 && k.push(t("div", { class: "inner" }, S)), t("footer", {
|
|
2985
3009
|
id: e.id,
|
|
@@ -2987,7 +3011,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
2987
3011
|
}, k);
|
|
2988
3012
|
};
|
|
2989
3013
|
}
|
|
2990
|
-
}), Va = Ma, Fa = /* @__PURE__ */
|
|
3014
|
+
}), Va = Ma, Fa = /* @__PURE__ */ M({
|
|
2991
3015
|
name: "KrdsDisclosure",
|
|
2992
3016
|
props: {
|
|
2993
3017
|
title: {
|
|
@@ -3000,6 +3024,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3000
3024
|
}
|
|
3001
3025
|
},
|
|
3002
3026
|
emits: { "update:modelValue": (e) => !0 },
|
|
3027
|
+
slots: Object,
|
|
3003
3028
|
setup(e, { emit: a, slots: r }) {
|
|
3004
3029
|
const l = `disclosure-${de()}`, n = C(() => e.modelValue), s = () => {
|
|
3005
3030
|
a("update:modelValue", !e.modelValue);
|
|
@@ -3020,7 +3045,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3020
3045
|
inert: !n.value
|
|
3021
3046
|
}, [t("div", { class: "expand-in" }, r.default?.())])]);
|
|
3022
3047
|
}
|
|
3023
|
-
}), Pa = Fa,
|
|
3048
|
+
}), Pa = Fa, Oa = /* @__PURE__ */ M({
|
|
3024
3049
|
name: "KrdsIdentifier",
|
|
3025
3050
|
props: {
|
|
3026
3051
|
class: {
|
|
@@ -3033,6 +3058,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3033
3058
|
}
|
|
3034
3059
|
},
|
|
3035
3060
|
emits: { click: (e) => !0 },
|
|
3061
|
+
slots: Object,
|
|
3036
3062
|
setup(e, { emit: a, slots: r }) {
|
|
3037
3063
|
const l = C(() => {
|
|
3038
3064
|
const s = ["krds-identifier"];
|
|
@@ -3045,7 +3071,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3045
3071
|
onClick: n
|
|
3046
3072
|
}, [t("span", { class: "logo" }, [t("span", { class: "sr-only" }, e.logoLabel)]), t("span", { class: "ban-txt" }, r.default?.())]);
|
|
3047
3073
|
}
|
|
3048
|
-
}),
|
|
3074
|
+
}), za = Oa, Ra = 50, Ia = /* @__PURE__ */ M({
|
|
3049
3075
|
name: "KrdsLayout",
|
|
3050
3076
|
props: {
|
|
3051
3077
|
id: {
|
|
@@ -3066,18 +3092,19 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3066
3092
|
scroll: (e) => !0,
|
|
3067
3093
|
"scroll-height": (e) => !0
|
|
3068
3094
|
},
|
|
3095
|
+
slots: Object,
|
|
3069
3096
|
setup(e, { slots: a, emit: r }) {
|
|
3070
|
-
const l =
|
|
3097
|
+
const l = B(0), n = B(0), s = B(0), u = B(null), g = B(null), h = B(null), y = () => {
|
|
3071
3098
|
const m = n.value;
|
|
3072
3099
|
l.value = window.scrollY, n.value = document.body.scrollHeight, m !== n.value && m > 0 && r("scroll-height", n.value);
|
|
3073
|
-
},
|
|
3100
|
+
}, c = () => {
|
|
3074
3101
|
if (!g.value || !e.enableScrollDetection) return;
|
|
3075
3102
|
const m = document.querySelector("#container");
|
|
3076
3103
|
if (!m) return;
|
|
3077
|
-
const v = m.offsetTop,
|
|
3078
|
-
|
|
3104
|
+
const v = m.offsetTop, i = window.scrollY, o = i > s.value, p = i < s.value;
|
|
3105
|
+
i > v + Ra ? o ? (g.value.classList.add("scroll-down"), g.value.classList.remove("scroll-up"), u.value = "down") : p && (g.value.classList.add("scroll-up"), g.value.classList.remove("scroll-down"), u.value = "up") : (g.value.classList.remove("scroll-down", "scroll-up"), u.value = null), s.value = i;
|
|
3079
3106
|
}, S = () => {
|
|
3080
|
-
y(),
|
|
3107
|
+
y(), c(), r("scroll", {
|
|
3081
3108
|
scrollY: l.value,
|
|
3082
3109
|
scrollHeight: n.value,
|
|
3083
3110
|
direction: u.value,
|
|
@@ -3085,17 +3112,17 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3085
3112
|
});
|
|
3086
3113
|
}, k = (m) => {
|
|
3087
3114
|
for (const v of m) {
|
|
3088
|
-
const { width:
|
|
3115
|
+
const { width: i, height: o } = v.contentRect;
|
|
3089
3116
|
r("resize", {
|
|
3090
|
-
width:
|
|
3091
|
-
height:
|
|
3117
|
+
width: i,
|
|
3118
|
+
height: o
|
|
3092
3119
|
});
|
|
3093
3120
|
}
|
|
3094
3121
|
}, K = C(() => {
|
|
3095
3122
|
const m = ["g-wrap"];
|
|
3096
3123
|
return e.class && m.push(e.class), m;
|
|
3097
3124
|
});
|
|
3098
|
-
return
|
|
3125
|
+
return te(() => {
|
|
3099
3126
|
e.enableScrollDetection && (y(), window.addEventListener("scroll", S, { passive: !0 })), g.value && typeof ResizeObserver < "u" && (h.value = new ResizeObserver(k), h.value.observe(g.value));
|
|
3100
3127
|
}), ue(() => {
|
|
3101
3128
|
e.enableScrollDetection && window.removeEventListener("scroll", S), h.value && (h.value.disconnect(), h.value = null);
|
|
@@ -3105,7 +3132,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3105
3132
|
ref: g
|
|
3106
3133
|
}, a.default?.());
|
|
3107
3134
|
}
|
|
3108
|
-
}),
|
|
3135
|
+
}), Ha = Ia, qa = /* @__PURE__ */ M({
|
|
3109
3136
|
name: "KrdsSideNavigation",
|
|
3110
3137
|
props: {
|
|
3111
3138
|
title: {
|
|
@@ -3119,62 +3146,62 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3119
3146
|
},
|
|
3120
3147
|
emits: { "update:modelValue": (e) => !0 },
|
|
3121
3148
|
setup(e, { emit: a }) {
|
|
3122
|
-
const r = C(() => e.modelValue || []), l = de(), n =
|
|
3123
|
-
const
|
|
3124
|
-
A ? n.value.set(
|
|
3125
|
-
}, y = (A,
|
|
3126
|
-
const
|
|
3127
|
-
A ? s.value.set(
|
|
3128
|
-
},
|
|
3129
|
-
const
|
|
3130
|
-
A ? u.value.set(
|
|
3149
|
+
const r = C(() => e.modelValue || []), l = de(), n = B(/* @__PURE__ */ new Map()), s = B(/* @__PURE__ */ new Map()), u = B(/* @__PURE__ */ new Map()), g = B(null), h = (A, E, $) => {
|
|
3150
|
+
const x = `${E}-${$}`;
|
|
3151
|
+
A ? n.value.set(x, A) : n.value.delete(x);
|
|
3152
|
+
}, y = (A, E, $) => {
|
|
3153
|
+
const x = `${E}-${$}`;
|
|
3154
|
+
A ? s.value.set(x, A) : s.value.delete(x);
|
|
3155
|
+
}, c = (A, E, $) => {
|
|
3156
|
+
const x = `${E}-${$}`;
|
|
3157
|
+
A ? u.value.set(x, A) : u.value.delete(x);
|
|
3131
3158
|
}, S = (A) => {
|
|
3132
|
-
a("update:modelValue", r.value.map((
|
|
3133
|
-
if (
|
|
3134
|
-
const
|
|
3135
|
-
...
|
|
3136
|
-
expanded: !
|
|
3159
|
+
a("update:modelValue", r.value.map((E, $) => {
|
|
3160
|
+
if ($ === A && E.subItems) {
|
|
3161
|
+
const x = E.expanded, f = {
|
|
3162
|
+
...E,
|
|
3163
|
+
expanded: !E.expanded
|
|
3137
3164
|
};
|
|
3138
|
-
return
|
|
3139
|
-
...
|
|
3165
|
+
return x && !f.expanded && (f.subItems = E.subItems.map((D) => ({
|
|
3166
|
+
...D,
|
|
3140
3167
|
expanded: !1
|
|
3141
3168
|
})), g.value = null), f;
|
|
3142
3169
|
}
|
|
3143
|
-
return
|
|
3170
|
+
return E;
|
|
3144
3171
|
}));
|
|
3145
|
-
}, k = (A,
|
|
3146
|
-
a("update:modelValue", r.value.map((
|
|
3147
|
-
|
|
3148
|
-
subItems:
|
|
3149
|
-
if (
|
|
3150
|
-
const
|
|
3172
|
+
}, k = (A, E) => {
|
|
3173
|
+
a("update:modelValue", r.value.map(($, x) => x === A && $.subItems ? {
|
|
3174
|
+
...$,
|
|
3175
|
+
subItems: $.subItems.map((f, D) => {
|
|
3176
|
+
if (D === E && f.subItems) {
|
|
3177
|
+
const z = {
|
|
3151
3178
|
...f,
|
|
3152
3179
|
expanded: !f.expanded
|
|
3153
3180
|
};
|
|
3154
|
-
if (
|
|
3155
|
-
const
|
|
3156
|
-
g.value = n.value.get(
|
|
3157
|
-
const
|
|
3158
|
-
|
|
3159
|
-
|
|
3181
|
+
if (z.expanded) {
|
|
3182
|
+
const I = `${A}-${E}`;
|
|
3183
|
+
g.value = n.value.get(I) || null;
|
|
3184
|
+
const H = s.value.get(I), j = u.value.get(I);
|
|
3185
|
+
H && j && (H.addEventListener("transitionend", () => {
|
|
3186
|
+
j.focus();
|
|
3160
3187
|
}, { once: !0 }), requestAnimationFrame(() => {
|
|
3161
|
-
|
|
3188
|
+
H.getAnimations({ subtree: !0 }).length || j.focus();
|
|
3162
3189
|
}));
|
|
3163
3190
|
}
|
|
3164
|
-
return
|
|
3191
|
+
return z;
|
|
3165
3192
|
}
|
|
3166
3193
|
return f;
|
|
3167
3194
|
})
|
|
3168
|
-
} :
|
|
3169
|
-
}, K = (A,
|
|
3170
|
-
a("update:modelValue", r.value.map((
|
|
3171
|
-
|
|
3172
|
-
subItems:
|
|
3173
|
-
if (
|
|
3195
|
+
} : $));
|
|
3196
|
+
}, K = (A, E) => {
|
|
3197
|
+
a("update:modelValue", r.value.map(($, x) => x === A && $.subItems ? {
|
|
3198
|
+
...$,
|
|
3199
|
+
subItems: $.subItems.map((f, D) => {
|
|
3200
|
+
if (D === E && f.subItems && f.expanded) {
|
|
3174
3201
|
if (g.value) {
|
|
3175
|
-
const
|
|
3202
|
+
const z = g.value;
|
|
3176
3203
|
requestAnimationFrame(() => {
|
|
3177
|
-
|
|
3204
|
+
z.focus();
|
|
3178
3205
|
}), g.value = null;
|
|
3179
3206
|
}
|
|
3180
3207
|
return {
|
|
@@ -3184,56 +3211,56 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3184
3211
|
}
|
|
3185
3212
|
return f;
|
|
3186
3213
|
})
|
|
3187
|
-
} :
|
|
3188
|
-
}, m = (A,
|
|
3189
|
-
const
|
|
3190
|
-
f && !f.contains(A.relatedTarget) && K(
|
|
3191
|
-
}, v = (A,
|
|
3192
|
-
K(A,
|
|
3193
|
-
},
|
|
3194
|
-
A.onClick && A.onClick(
|
|
3195
|
-
},
|
|
3196
|
-
key: `popup-item-${
|
|
3214
|
+
} : $));
|
|
3215
|
+
}, m = (A, E, $) => {
|
|
3216
|
+
const x = `${E}-${$}`, f = s.value.get(x);
|
|
3217
|
+
f && !f.contains(A.relatedTarget) && K(E, $);
|
|
3218
|
+
}, v = (A, E) => {
|
|
3219
|
+
K(A, E);
|
|
3220
|
+
}, i = (A, E) => {
|
|
3221
|
+
A.onClick && A.onClick(E);
|
|
3222
|
+
}, o = (A, E, $) => A.map((x, f) => t("li", {
|
|
3223
|
+
key: `popup-item-${E}-${$}-${f}`,
|
|
3197
3224
|
role: "none"
|
|
3198
3225
|
}, t("a", {
|
|
3199
|
-
href:
|
|
3226
|
+
href: x.href || "#",
|
|
3200
3227
|
class: "lnb-btn",
|
|
3201
3228
|
role: "menuitem",
|
|
3202
|
-
onClick: (
|
|
3203
|
-
},
|
|
3204
|
-
const f = `lnb-subitem-${
|
|
3229
|
+
onClick: (D) => i(x, D)
|
|
3230
|
+
}, x.text))), p = (A, E) => A.map(($, x) => {
|
|
3231
|
+
const f = `lnb-subitem-${E}-${x}`;
|
|
3205
3232
|
return t("li", {
|
|
3206
3233
|
key: f,
|
|
3207
|
-
class: ["lnb-subitem", { active:
|
|
3234
|
+
class: ["lnb-subitem", { active: $.expanded }],
|
|
3208
3235
|
role: "none"
|
|
3209
|
-
}, [
|
|
3210
|
-
ref: (
|
|
3236
|
+
}, [$.subItems ? [t("button", {
|
|
3237
|
+
ref: (D) => h(D, E, x),
|
|
3211
3238
|
type: "button",
|
|
3212
3239
|
class: "lnb-btn lnb-toggle-popup",
|
|
3213
3240
|
role: "menuitem",
|
|
3214
|
-
"aria-controls": `${l}-lnbmenu-${
|
|
3215
|
-
"aria-expanded":
|
|
3241
|
+
"aria-controls": `${l}-lnbmenu-${E}-${x}`,
|
|
3242
|
+
"aria-expanded": $.expanded ? "true" : "false",
|
|
3216
3243
|
"aria-haspopup": "true",
|
|
3217
|
-
onClick: () => k(
|
|
3218
|
-
},
|
|
3219
|
-
ref: (
|
|
3220
|
-
id: `${l}-lnbmenu-${
|
|
3221
|
-
class: ["lnb-submenu-lv2", { active:
|
|
3244
|
+
onClick: () => k(E, x)
|
|
3245
|
+
}, $.text), t("div", {
|
|
3246
|
+
ref: (D) => y(D, E, x),
|
|
3247
|
+
id: `${l}-lnbmenu-${E}-${x}`,
|
|
3248
|
+
class: ["lnb-submenu-lv2", { active: $.expanded }],
|
|
3222
3249
|
role: "menu",
|
|
3223
|
-
onFocusout: (
|
|
3250
|
+
onFocusout: (D) => m(D, E, x)
|
|
3224
3251
|
}, [t("button", {
|
|
3225
|
-
ref: (
|
|
3252
|
+
ref: (D) => c(D, E, x),
|
|
3226
3253
|
type: "button",
|
|
3227
3254
|
class: "lnb-btn-tit",
|
|
3228
|
-
onClick: () => v(
|
|
3229
|
-
},
|
|
3230
|
-
href:
|
|
3255
|
+
onClick: () => v(E, x)
|
|
3256
|
+
}, $.popupTitle || $.text), t("ul", {}, o($.subItems || [], E, x))])] : t("a", {
|
|
3257
|
+
href: $.href || "#",
|
|
3231
3258
|
class: ["lnb-btn", "lnb-link"],
|
|
3232
3259
|
role: "menuitem",
|
|
3233
|
-
onClick: (
|
|
3234
|
-
},
|
|
3235
|
-
}),
|
|
3236
|
-
key: `lnb-item-${
|
|
3260
|
+
onClick: (D) => i($, D)
|
|
3261
|
+
}, $.text)]);
|
|
3262
|
+
}), V = () => r.value.map((A, E) => t("li", {
|
|
3263
|
+
key: `lnb-item-${E}`,
|
|
3237
3264
|
class: ["lnb-item", { active: A.expanded }],
|
|
3238
3265
|
role: "none"
|
|
3239
3266
|
}, [A.subItems ? t("button", {
|
|
@@ -3244,24 +3271,24 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3244
3271
|
{ active: A.expanded }
|
|
3245
3272
|
],
|
|
3246
3273
|
role: "menuitem",
|
|
3247
|
-
"aria-controls": `${l}-lnbmenu-${
|
|
3274
|
+
"aria-controls": `${l}-lnbmenu-${E}`,
|
|
3248
3275
|
"aria-expanded": A.expanded ? "true" : "false",
|
|
3249
|
-
onClick: () => S(
|
|
3276
|
+
onClick: () => S(E)
|
|
3250
3277
|
}, A.text) : t("a", {
|
|
3251
3278
|
href: A.href || "#",
|
|
3252
3279
|
class: ["lnb-btn", "lnb-link"],
|
|
3253
3280
|
role: "menuitem",
|
|
3254
|
-
onClick: (
|
|
3281
|
+
onClick: ($) => i(A, $)
|
|
3255
3282
|
}, A.text), A.subItems ? t("div", { class: "lnb-submenu" }, [t("ul", {
|
|
3256
|
-
id: `${l}-lnbmenu-${
|
|
3283
|
+
id: `${l}-lnbmenu-${E}`,
|
|
3257
3284
|
role: "menu"
|
|
3258
|
-
}, p(A.subItems,
|
|
3285
|
+
}, p(A.subItems, E))]) : null]));
|
|
3259
3286
|
return () => t("nav", { class: "krds-side-navigation" }, [t("h2", { class: "lnb-tit" }, e.title), t("ul", {
|
|
3260
3287
|
class: "lnb-list",
|
|
3261
3288
|
role: "menubar"
|
|
3262
|
-
},
|
|
3289
|
+
}, V())]);
|
|
3263
3290
|
}
|
|
3264
|
-
}), Na = qa,
|
|
3291
|
+
}), Na = qa, ja = /* @__PURE__ */ M({
|
|
3265
3292
|
name: "KrdsStructuredList",
|
|
3266
3293
|
props: { full: {
|
|
3267
3294
|
type: Boolean,
|
|
@@ -3279,7 +3306,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3279
3306
|
return t("ul", { class: ["krds-structured-list", e.full ? "type-full" : ""] }, [u]);
|
|
3280
3307
|
};
|
|
3281
3308
|
}
|
|
3282
|
-
}),
|
|
3309
|
+
}), Wa = ja, Ya = /* @__PURE__ */ M({
|
|
3283
3310
|
name: "KrdsTextList",
|
|
3284
3311
|
props: {
|
|
3285
3312
|
type: {
|
|
@@ -3291,10 +3318,11 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3291
3318
|
default: "dash"
|
|
3292
3319
|
}
|
|
3293
3320
|
},
|
|
3321
|
+
slots: Object,
|
|
3294
3322
|
setup(e, { slots: a }) {
|
|
3295
3323
|
return () => t(e.type, { class: ["krds-info-list", e.variant] }, a.default?.());
|
|
3296
3324
|
}
|
|
3297
|
-
}), Ga =
|
|
3325
|
+
}), Ga = Ya, Ua = /* @__PURE__ */ M({
|
|
3298
3326
|
name: "KrdsCriticalAlerts",
|
|
3299
3327
|
props: {
|
|
3300
3328
|
type: {
|
|
@@ -3333,7 +3361,7 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3333
3361
|
}, [t("span", { class: "m-hide" }, e.linkText), t("i", { class: "svg-icon ico-angle right" })])
|
|
3334
3362
|
])])]);
|
|
3335
3363
|
}
|
|
3336
|
-
}), Xa = Ua, Qa = "새 창 열림", Ja = 100, Me = 400, Za = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', el = /* @__PURE__ */
|
|
3364
|
+
}), Xa = Ua, Qa = "새 창 열림", Ja = 100, Me = 400, Za = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', el = /* @__PURE__ */ M({
|
|
3337
3365
|
name: "KrdsMainMenu",
|
|
3338
3366
|
props: {
|
|
3339
3367
|
items: {
|
|
@@ -3372,282 +3400,282 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3372
3400
|
},
|
|
3373
3401
|
slots: Object,
|
|
3374
3402
|
setup(e, { emit: a, slots: r }) {
|
|
3375
|
-
const l = de(), n =
|
|
3403
|
+
const l = de(), n = B(null), s = B(null), u = B(null), g = C(() => e.variant === "pc"), h = (d) => `${l}-gnb-panel-${d}`, y = (d, b) => `${l}-gnb-sub-${d}-${b}`, c = (d) => `${l}-gnb-tab-${d}`, S = (d, b) => `${l}-gnb-depth3-${d}-${b}`, k = (d) => !!d?.subItems?.length, K = (d) => !k(d) && !!d?.items?.length, m = (d) => k(d) || K(d), v = (d) => !d.items?.length, i = (d) => d ? {
|
|
3376
3404
|
target: "_blank",
|
|
3377
3405
|
rel: "noopener noreferrer",
|
|
3378
3406
|
title: Qa
|
|
3379
|
-
} : {},
|
|
3380
|
-
|
|
3381
|
-
}, p =
|
|
3382
|
-
b ?
|
|
3383
|
-
}, f = (
|
|
3384
|
-
const b =
|
|
3407
|
+
} : {}, o = (d, b) => {
|
|
3408
|
+
d.onClick?.(b), a("item-click", d, b);
|
|
3409
|
+
}, p = B(-1), V = B({}), A = B(0), E = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map(), x = (d, b, L) => {
|
|
3410
|
+
b ? d.set(L, b) : d.delete(L);
|
|
3411
|
+
}, f = (d) => {
|
|
3412
|
+
const b = d?.subItems?.findIndex((L) => !v(L));
|
|
3385
3413
|
return b === void 0 ? -1 : b;
|
|
3386
|
-
},
|
|
3387
|
-
const b =
|
|
3388
|
-
return b === void 0 ? f(e.items[
|
|
3389
|
-
},
|
|
3414
|
+
}, D = (d) => {
|
|
3415
|
+
const b = V.value[d];
|
|
3416
|
+
return b === void 0 ? f(e.items[d]) : b;
|
|
3417
|
+
}, z = (d) => {
|
|
3390
3418
|
if (typeof document > "u") return;
|
|
3391
|
-
document.body.classList.toggle("is-gnb-web",
|
|
3419
|
+
document.body.classList.toggle("is-gnb-web", d);
|
|
3392
3420
|
const b = document.body.scrollHeight > window.innerHeight;
|
|
3393
|
-
document.body.classList.toggle("hasScrollY",
|
|
3394
|
-
},
|
|
3421
|
+
document.body.classList.toggle("hasScrollY", d && b);
|
|
3422
|
+
}, I = async () => {
|
|
3395
3423
|
await pe();
|
|
3396
|
-
const
|
|
3397
|
-
A.value =
|
|
3398
|
-
},
|
|
3424
|
+
const d = E.get(p.value)?.querySelector(".gnb-sub-list.active");
|
|
3425
|
+
A.value = d?.scrollHeight ?? 0;
|
|
3426
|
+
}, H = (d = !1) => {
|
|
3399
3427
|
if (p.value === -1) return;
|
|
3400
3428
|
const b = p.value;
|
|
3401
|
-
p.value = -1, A.value = 0,
|
|
3402
|
-
},
|
|
3403
|
-
if (m(e.items[
|
|
3404
|
-
if (p.value ===
|
|
3405
|
-
|
|
3429
|
+
p.value = -1, A.value = 0, z(!1), a("menu-toggle", b, !1), d && $.get(b)?.focus();
|
|
3430
|
+
}, j = (d) => {
|
|
3431
|
+
if (m(e.items[d])) {
|
|
3432
|
+
if (p.value === d) {
|
|
3433
|
+
H();
|
|
3406
3434
|
return;
|
|
3407
3435
|
}
|
|
3408
|
-
|
|
3436
|
+
H(), p.value = d, z(!0), a("menu-toggle", d, !0), I();
|
|
3409
3437
|
}
|
|
3410
|
-
},
|
|
3411
|
-
|
|
3412
|
-
...
|
|
3413
|
-
[
|
|
3414
|
-
},
|
|
3415
|
-
}, U = (
|
|
3438
|
+
}, W = (d, b) => {
|
|
3439
|
+
V.value = {
|
|
3440
|
+
...V.value,
|
|
3441
|
+
[d]: b
|
|
3442
|
+
}, I();
|
|
3443
|
+
}, U = (d) => {
|
|
3416
3444
|
const b = n.value;
|
|
3417
|
-
!b || b.contains(
|
|
3418
|
-
}, ce = (
|
|
3419
|
-
const b = n.value,
|
|
3420
|
-
!b || !
|
|
3421
|
-
}, he = (
|
|
3422
|
-
if (
|
|
3423
|
-
|
|
3445
|
+
!b || b.contains(d.target) || H();
|
|
3446
|
+
}, ce = (d) => {
|
|
3447
|
+
const b = n.value, L = d.relatedTarget;
|
|
3448
|
+
!b || !L || b.contains(L) || H();
|
|
3449
|
+
}, he = (d) => {
|
|
3450
|
+
if (d.key === "Escape") {
|
|
3451
|
+
H(!0);
|
|
3424
3452
|
return;
|
|
3425
3453
|
}
|
|
3426
|
-
const b =
|
|
3454
|
+
const b = d.target;
|
|
3427
3455
|
if (!b?.dataset.trigger) return;
|
|
3428
|
-
const
|
|
3429
|
-
const
|
|
3430
|
-
(
|
|
3456
|
+
const L = (T) => {
|
|
3457
|
+
const _ = b.closest("li");
|
|
3458
|
+
(T === "next" ? _?.nextElementSibling : _?.previousElementSibling)?.querySelector("[data-trigger]")?.focus();
|
|
3431
3459
|
};
|
|
3432
|
-
switch (
|
|
3460
|
+
switch (d.key) {
|
|
3433
3461
|
case "Home":
|
|
3434
|
-
|
|
3462
|
+
d.preventDefault(), $.get(0)?.focus();
|
|
3435
3463
|
break;
|
|
3436
3464
|
case "End":
|
|
3437
|
-
|
|
3465
|
+
d.preventDefault(), $.get(e.items.length - 1)?.focus();
|
|
3438
3466
|
break;
|
|
3439
3467
|
case "ArrowRight":
|
|
3440
3468
|
case "ArrowDown":
|
|
3441
|
-
|
|
3469
|
+
d.preventDefault(), L("next");
|
|
3442
3470
|
break;
|
|
3443
3471
|
case "ArrowLeft":
|
|
3444
3472
|
case "ArrowUp":
|
|
3445
|
-
|
|
3473
|
+
d.preventDefault(), L("prev");
|
|
3446
3474
|
}
|
|
3447
|
-
}, re =
|
|
3448
|
-
b ?
|
|
3475
|
+
}, re = B(0), Z = B({}), fe = B(null), ae = B(null), ve = B(e.open), ne = B(e.open), P = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), w = (d, b, L) => {
|
|
3476
|
+
b ? d.set(L, b) : d.delete(L);
|
|
3449
3477
|
};
|
|
3450
|
-
let
|
|
3451
|
-
const
|
|
3452
|
-
typeof document > "u" || document.body.classList.toggle("is-gnb-mobile",
|
|
3478
|
+
let F, R, ee = null;
|
|
3479
|
+
const oe = (d) => {
|
|
3480
|
+
typeof document > "u" || document.body.classList.toggle("is-gnb-mobile", d);
|
|
3453
3481
|
}, X = () => {
|
|
3454
3482
|
ne.value && s.value?.focus();
|
|
3455
|
-
},
|
|
3456
|
-
|
|
3457
|
-
ne.value = !0,
|
|
3483
|
+
}, le = () => {
|
|
3484
|
+
R && clearTimeout(R), ee = document.activeElement, ve.value = !0, F = setTimeout(() => {
|
|
3485
|
+
ne.value = !0, oe(!0), n.value?.addEventListener("transitionend", X, { once: !0 }), requestAnimationFrame(() => {
|
|
3458
3486
|
n.value?.getAnimations().length || X();
|
|
3459
3487
|
});
|
|
3460
3488
|
}, Ja);
|
|
3461
3489
|
}, ye = () => {
|
|
3462
|
-
|
|
3463
|
-
ve.value = !1,
|
|
3490
|
+
F && clearTimeout(F), ne.value = !1, ee?.focus(), ee = null, R = setTimeout(() => {
|
|
3491
|
+
ve.value = !1, oe(!1);
|
|
3464
3492
|
}, Me);
|
|
3465
3493
|
};
|
|
3466
|
-
se(() => e.open, (
|
|
3467
|
-
|
|
3494
|
+
se(() => e.open, (d) => {
|
|
3495
|
+
d ? le() : ye();
|
|
3468
3496
|
});
|
|
3469
|
-
const me = (
|
|
3470
|
-
|
|
3471
|
-
const
|
|
3472
|
-
|
|
3497
|
+
const me = (d, b) => {
|
|
3498
|
+
d.preventDefault(), re.value = b;
|
|
3499
|
+
const L = u.value, T = P.get(b);
|
|
3500
|
+
L && T && L.scrollTo({
|
|
3473
3501
|
left: 0,
|
|
3474
|
-
top:
|
|
3502
|
+
top: T.offsetTop,
|
|
3475
3503
|
behavior: "smooth"
|
|
3476
3504
|
});
|
|
3477
3505
|
}, we = () => {
|
|
3478
|
-
const
|
|
3479
|
-
if (!
|
|
3480
|
-
const { scrollTop: b, scrollHeight:
|
|
3481
|
-
let
|
|
3482
|
-
P.forEach((
|
|
3483
|
-
(b >=
|
|
3484
|
-
}), re.value =
|
|
3485
|
-
}, be = (
|
|
3486
|
-
|
|
3487
|
-
...
|
|
3488
|
-
[b]: !
|
|
3506
|
+
const d = u.value;
|
|
3507
|
+
if (!d) return;
|
|
3508
|
+
const { scrollTop: b, scrollHeight: L, clientHeight: T } = d;
|
|
3509
|
+
let _ = re.value;
|
|
3510
|
+
P.forEach((N, G) => {
|
|
3511
|
+
(b >= N.offsetTop || b + T >= L) && (_ = G);
|
|
3512
|
+
}), re.value = _;
|
|
3513
|
+
}, be = (d, b) => {
|
|
3514
|
+
d.preventDefault(), Z.value = {
|
|
3515
|
+
...Z.value,
|
|
3516
|
+
[b]: !Z.value[b]
|
|
3489
3517
|
};
|
|
3490
|
-
},
|
|
3491
|
-
|
|
3492
|
-
}, Le = (
|
|
3493
|
-
|
|
3494
|
-
|
|
3518
|
+
}, Ie = async (d, b) => {
|
|
3519
|
+
d.preventDefault(), fe.value = b, await pe(), ae.value = b, await pe(), q.get(b)?.focus();
|
|
3520
|
+
}, Le = (d) => {
|
|
3521
|
+
ae.value = null, O.get(d)?.focus(), setTimeout(() => {
|
|
3522
|
+
ae.value || (fe.value = null);
|
|
3495
3523
|
}, Me);
|
|
3496
|
-
},
|
|
3497
|
-
const
|
|
3498
|
-
if (!
|
|
3499
|
-
const
|
|
3500
|
-
b.shiftKey && (
|
|
3501
|
-
}, qe = (
|
|
3502
|
-
if (
|
|
3503
|
-
|
|
3524
|
+
}, He = (d, b) => {
|
|
3525
|
+
const L = Array.from(d.querySelectorAll(Za));
|
|
3526
|
+
if (!L.length) return;
|
|
3527
|
+
const T = L[0], _ = L[L.length - 1], N = document.activeElement;
|
|
3528
|
+
b.shiftKey && (N === T || N === d) ? (b.preventDefault(), _.focus()) : !b.shiftKey && N === _ && (b.preventDefault(), T.focus());
|
|
3529
|
+
}, qe = (d) => {
|
|
3530
|
+
if (d.key === "Escape") {
|
|
3531
|
+
ae.value ? Le(ae.value) : a("update:open", !1);
|
|
3504
3532
|
return;
|
|
3505
3533
|
}
|
|
3506
|
-
if (
|
|
3507
|
-
const b =
|
|
3508
|
-
b &&
|
|
3534
|
+
if (d.key !== "Tab") return;
|
|
3535
|
+
const b = ae.value ? Y.get(ae.value) : s.value;
|
|
3536
|
+
b && He(b, d);
|
|
3509
3537
|
};
|
|
3510
|
-
|
|
3538
|
+
te(() => {
|
|
3511
3539
|
if (g.value) {
|
|
3512
3540
|
document.addEventListener("click", U);
|
|
3513
3541
|
return;
|
|
3514
3542
|
}
|
|
3515
|
-
e.open && (ve.value = !0, ne.value = !0,
|
|
3516
|
-
const
|
|
3517
|
-
e.items.forEach((b,
|
|
3518
|
-
b.subItems?.forEach((
|
|
3519
|
-
|
|
3543
|
+
e.open && (ve.value = !0, ne.value = !0, oe(!0));
|
|
3544
|
+
const d = {};
|
|
3545
|
+
e.items.forEach((b, L) => {
|
|
3546
|
+
b.subItems?.forEach((T, _) => {
|
|
3547
|
+
T.expanded && (d[`${L}-${_}`] = !0);
|
|
3520
3548
|
});
|
|
3521
|
-
}),
|
|
3522
|
-
}),
|
|
3523
|
-
typeof document < "u" && (document.removeEventListener("click", U), document.body.classList.remove("is-gnb-web", "hasScrollY", "is-gnb-mobile")),
|
|
3549
|
+
}), Z.value = d;
|
|
3550
|
+
}), ie(() => {
|
|
3551
|
+
typeof document < "u" && (document.removeEventListener("click", U), document.body.classList.remove("is-gnb-web", "hasScrollY", "is-gnb-mobile")), F && clearTimeout(F), R && clearTimeout(R);
|
|
3524
3552
|
});
|
|
3525
|
-
const Ne = (
|
|
3526
|
-
const b =
|
|
3527
|
-
const
|
|
3528
|
-
if (b) return t("li", { key: `link-${
|
|
3529
|
-
href:
|
|
3530
|
-
...
|
|
3531
|
-
class: { active:
|
|
3532
|
-
onClick: (
|
|
3533
|
-
}, [
|
|
3534
|
-
const
|
|
3535
|
-
return t("li", { key: `link-${
|
|
3536
|
-
...
|
|
3537
|
-
href:
|
|
3538
|
-
...
|
|
3553
|
+
const Ne = (d) => {
|
|
3554
|
+
const b = d.some((T) => !!T.description), L = d.map((T, _) => {
|
|
3555
|
+
const N = i(T.external), G = T.external ? t("i", { class: "svg-icon ico-go" }) : null;
|
|
3556
|
+
if (b) return t("li", { key: `link-${_}` }, [t("h3", { class: "tit" }, [t("a", {
|
|
3557
|
+
href: T.href || "#",
|
|
3558
|
+
...N,
|
|
3559
|
+
class: { active: T.selected },
|
|
3560
|
+
onClick: (J) => o(T, J)
|
|
3561
|
+
}, [T.text, G])]), T.description ? t("p", { class: "txt" }, T.description) : null]);
|
|
3562
|
+
const Q = T.href ? "a" : "button";
|
|
3563
|
+
return t("li", { key: `link-${_}` }, [t(Q, {
|
|
3564
|
+
...T.href ? {
|
|
3565
|
+
href: T.href,
|
|
3566
|
+
...N
|
|
3539
3567
|
} : { type: "button" },
|
|
3540
|
-
class: { active:
|
|
3541
|
-
onClick: (
|
|
3542
|
-
}, [
|
|
3568
|
+
class: { active: T.selected },
|
|
3569
|
+
onClick: (J) => o(T, J)
|
|
3570
|
+
}, [T.text, G])]);
|
|
3543
3571
|
});
|
|
3544
|
-
return t("ul", { class: b ? "type-description" : void 0 },
|
|
3545
|
-
}, Be = (
|
|
3546
|
-
const b =
|
|
3547
|
-
href:
|
|
3572
|
+
return t("ul", { class: b ? "type-description" : void 0 }, L);
|
|
3573
|
+
}, Be = (d) => {
|
|
3574
|
+
const b = d.titleLink ? [d.title, t("a", {
|
|
3575
|
+
href: d.titleLink.href,
|
|
3548
3576
|
class: "krds-btn link basic small"
|
|
3549
|
-
}, [t("span", { class: "underline" },
|
|
3577
|
+
}, [t("span", { class: "underline" }, d.titleLink.text || "바로가기"), t("i", { class: "svg-icon ico-angle right" })])] : [t("span", d.title)];
|
|
3550
3578
|
return t("div", {
|
|
3551
|
-
id:
|
|
3579
|
+
id: d.id,
|
|
3552
3580
|
class: ["gnb-sub-list", {
|
|
3553
|
-
active:
|
|
3554
|
-
between:
|
|
3555
|
-
"single-list":
|
|
3581
|
+
active: d.active,
|
|
3582
|
+
between: d.layout === "between",
|
|
3583
|
+
"single-list": d.single
|
|
3556
3584
|
}]
|
|
3557
|
-
}, [t("div", { class: "gnb-sub-content" }, [t("h2", { class: "sub-title" }, b), Ne(
|
|
3558
|
-
},
|
|
3559
|
-
if (v(
|
|
3560
|
-
const
|
|
3561
|
-
return t("li", { key: `sub-${
|
|
3562
|
-
...
|
|
3563
|
-
href:
|
|
3564
|
-
...
|
|
3585
|
+
}, [t("div", { class: "gnb-sub-content" }, [t("h2", { class: "sub-title" }, b), Ne(d.linkItems)]), d.banner]);
|
|
3586
|
+
}, je = (d, b) => (d.subItems ?? []).map((L, T) => {
|
|
3587
|
+
if (v(L)) {
|
|
3588
|
+
const G = L.href ? "a" : "button";
|
|
3589
|
+
return t("li", { key: `sub-${T}` }, [t(G, {
|
|
3590
|
+
...L.href ? {
|
|
3591
|
+
href: L.href,
|
|
3592
|
+
...i(L.external)
|
|
3565
3593
|
} : { type: "button" },
|
|
3566
3594
|
class: [
|
|
3567
3595
|
"gnb-sub-trigger",
|
|
3568
3596
|
"is-link",
|
|
3569
3597
|
{
|
|
3570
|
-
"external-link":
|
|
3571
|
-
selected:
|
|
3598
|
+
"external-link": L.external,
|
|
3599
|
+
selected: L.selected
|
|
3572
3600
|
}
|
|
3573
3601
|
],
|
|
3574
3602
|
"data-trigger": "gnb",
|
|
3575
|
-
onClick: (
|
|
3576
|
-
},
|
|
3603
|
+
onClick: (Q) => o(L, Q)
|
|
3604
|
+
}, L.text)]);
|
|
3577
3605
|
}
|
|
3578
|
-
const
|
|
3579
|
-
item:
|
|
3580
|
-
subItem:
|
|
3606
|
+
const _ = D(b) === T, N = L.banner && r.banner ? t("div", { class: "gnb-sub-banner" }, r.banner({
|
|
3607
|
+
item: d,
|
|
3608
|
+
subItem: L,
|
|
3581
3609
|
index: b,
|
|
3582
|
-
subIndex:
|
|
3610
|
+
subIndex: T
|
|
3583
3611
|
})) : null;
|
|
3584
|
-
return t("li", { key: `sub-${
|
|
3612
|
+
return t("li", { key: `sub-${T}` }, [t("button", {
|
|
3585
3613
|
type: "button",
|
|
3586
3614
|
class: ["gnb-sub-trigger", {
|
|
3587
|
-
active:
|
|
3588
|
-
selected:
|
|
3615
|
+
active: _,
|
|
3616
|
+
selected: L.selected
|
|
3589
3617
|
}],
|
|
3590
3618
|
"data-trigger": "gnb",
|
|
3591
|
-
"aria-controls": y(b,
|
|
3592
|
-
"aria-expanded":
|
|
3619
|
+
"aria-controls": y(b, T),
|
|
3620
|
+
"aria-expanded": _ ? "true" : "false",
|
|
3593
3621
|
"aria-haspopup": "true",
|
|
3594
|
-
onClick: (
|
|
3595
|
-
|
|
3622
|
+
onClick: (G) => {
|
|
3623
|
+
W(b, T), o(L, G);
|
|
3596
3624
|
}
|
|
3597
|
-
},
|
|
3598
|
-
id: y(b,
|
|
3599
|
-
title:
|
|
3600
|
-
titleLink:
|
|
3601
|
-
linkItems:
|
|
3602
|
-
layout:
|
|
3603
|
-
active:
|
|
3604
|
-
banner:
|
|
3625
|
+
}, L.text), Be({
|
|
3626
|
+
id: y(b, T),
|
|
3627
|
+
title: L.title || L.text,
|
|
3628
|
+
titleLink: L.titleLink,
|
|
3629
|
+
linkItems: L.items ?? [],
|
|
3630
|
+
layout: L.layout,
|
|
3631
|
+
active: _,
|
|
3632
|
+
banner: N
|
|
3605
3633
|
})]);
|
|
3606
|
-
}),
|
|
3607
|
-
const
|
|
3608
|
-
title:
|
|
3609
|
-
linkItems:
|
|
3610
|
-
layout:
|
|
3634
|
+
}), We = (d, b) => {
|
|
3635
|
+
const L = p.value === b, T = k(d), _ = T ? [t("ul", {}, je(d, b))] : [Be({
|
|
3636
|
+
title: d.title || d.text,
|
|
3637
|
+
linkItems: d.items ?? [],
|
|
3638
|
+
layout: d.layout,
|
|
3611
3639
|
single: !0,
|
|
3612
|
-
banner:
|
|
3613
|
-
item:
|
|
3640
|
+
banner: d.banner && r.banner ? t("div", { class: "gnb-sub-banner" }, r.banner({
|
|
3641
|
+
item: d,
|
|
3614
3642
|
index: b,
|
|
3615
3643
|
subIndex: -1
|
|
3616
3644
|
})) : null
|
|
3617
3645
|
})];
|
|
3618
3646
|
return t("div", {
|
|
3619
3647
|
id: h(b),
|
|
3620
|
-
class: ["gnb-toggle-wrap", { "is-open":
|
|
3648
|
+
class: ["gnb-toggle-wrap", { "is-open": L }]
|
|
3621
3649
|
}, [t("div", {
|
|
3622
|
-
ref: (
|
|
3650
|
+
ref: (N) => x(E, N, b),
|
|
3623
3651
|
class: "gnb-main-list",
|
|
3624
|
-
...
|
|
3625
|
-
style:
|
|
3626
|
-
},
|
|
3627
|
-
},
|
|
3628
|
-
const
|
|
3629
|
-
const
|
|
3630
|
-
ref: (
|
|
3631
|
-
...
|
|
3632
|
-
href:
|
|
3633
|
-
...
|
|
3652
|
+
...T ? { "data-has-submenu": "true" } : {},
|
|
3653
|
+
style: L && A.value ? { minHeight: `${A.value}px` } : void 0
|
|
3654
|
+
}, _)]);
|
|
3655
|
+
}, Ye = () => {
|
|
3656
|
+
const d = e.items.map((L, T) => {
|
|
3657
|
+
const _ = m(L), N = p.value === T, G = !_ && L.href ? "a" : "button", Q = t(G, {
|
|
3658
|
+
ref: (J) => x($, J, T),
|
|
3659
|
+
...G === "a" ? {
|
|
3660
|
+
href: L.href,
|
|
3661
|
+
...i(L.external)
|
|
3634
3662
|
} : { type: "button" },
|
|
3635
3663
|
class: ["gnb-main-trigger", {
|
|
3636
|
-
active:
|
|
3637
|
-
"is-link": !
|
|
3638
|
-
selected:
|
|
3664
|
+
active: N,
|
|
3665
|
+
"is-link": !_,
|
|
3666
|
+
selected: L.selected
|
|
3639
3667
|
}],
|
|
3640
3668
|
"data-trigger": "gnb",
|
|
3641
|
-
...
|
|
3642
|
-
"aria-controls": h(
|
|
3643
|
-
"aria-expanded":
|
|
3669
|
+
..._ ? {
|
|
3670
|
+
"aria-controls": h(T),
|
|
3671
|
+
"aria-expanded": N ? "true" : "false",
|
|
3644
3672
|
"aria-haspopup": "true"
|
|
3645
3673
|
} : {},
|
|
3646
|
-
onClick: (
|
|
3647
|
-
|
|
3674
|
+
onClick: (J) => {
|
|
3675
|
+
_ && j(T), o(L, J);
|
|
3648
3676
|
}
|
|
3649
|
-
},
|
|
3650
|
-
return t("li", { key: `main-${
|
|
3677
|
+
}, L.text);
|
|
3678
|
+
return t("li", { key: `main-${T}` }, [Q, _ ? We(L, T) : null]);
|
|
3651
3679
|
}), b = e.backdrop && p.value !== -1 ? t(Ce, { to: "body" }, [t("div", {
|
|
3652
3680
|
class: "gnb-backdrop active",
|
|
3653
3681
|
"aria-hidden": "true"
|
|
@@ -3661,97 +3689,102 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3661
3689
|
}, [t("div", { class: "inner" }, [t("ul", {
|
|
3662
3690
|
class: "gnb-menu",
|
|
3663
3691
|
"aria-label": e.ariaLabel
|
|
3664
|
-
},
|
|
3665
|
-
}, Ge = (
|
|
3666
|
-
const
|
|
3692
|
+
}, d)]), b]);
|
|
3693
|
+
}, Ge = (d, b) => {
|
|
3694
|
+
const L = () => Le(b);
|
|
3667
3695
|
return t("div", {
|
|
3668
|
-
ref: (
|
|
3669
|
-
class: ["depth4-wrap", { "is-open":
|
|
3696
|
+
ref: (T) => w(Y, T, b),
|
|
3697
|
+
class: ["depth4-wrap", { "is-open": ae.value === b }],
|
|
3670
3698
|
style: fe.value === b ? { display: "block" } : void 0
|
|
3671
3699
|
}, [t("div", { class: "depth4-head" }, [t("button", {
|
|
3672
|
-
ref: (
|
|
3700
|
+
ref: (T) => w(q, T, b),
|
|
3673
3701
|
type: "button",
|
|
3674
3702
|
class: "krds-btn icon trigger-prev",
|
|
3675
|
-
onClick:
|
|
3703
|
+
onClick: L
|
|
3676
3704
|
}, [t("span", { class: "sr-only" }, "이전화면"), t("i", { class: "svg-icon ico-angle left" })]), t("button", {
|
|
3677
3705
|
type: "button",
|
|
3678
3706
|
class: "krds-btn icon trigger-close",
|
|
3679
|
-
onClick:
|
|
3680
|
-
}, [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" },
|
|
3681
|
-
href:
|
|
3682
|
-
...
|
|
3683
|
-
class: { selected:
|
|
3684
|
-
onClick: (
|
|
3685
|
-
},
|
|
3686
|
-
}, Ue = (
|
|
3687
|
-
const
|
|
3688
|
-
const
|
|
3689
|
-
return t("li", { key: `depth3-${
|
|
3690
|
-
ref: (
|
|
3691
|
-
href:
|
|
3692
|
-
...
|
|
3707
|
+
onClick: L
|
|
3708
|
+
}, [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" }, d.panelTitle || d.text), t("ul", { class: "depth4-ul" }, (d.items ?? []).map((T, _) => t("li", { key: `depth4-${_}` }, [t("a", {
|
|
3709
|
+
href: T.href || "#",
|
|
3710
|
+
...i(T.external),
|
|
3711
|
+
class: { selected: T.selected },
|
|
3712
|
+
onClick: (N) => o(T, N)
|
|
3713
|
+
}, T.text)])))])]);
|
|
3714
|
+
}, Ue = (d, b, L) => {
|
|
3715
|
+
const T = (d.items ?? []).map((_, N) => {
|
|
3716
|
+
const G = `${b}-${L}-${N}`, Q = !!_.items?.length;
|
|
3717
|
+
return t("li", { key: `depth3-${N}` }, [t("a", {
|
|
3718
|
+
ref: (J) => w(O, J, G),
|
|
3719
|
+
href: _.href || "#",
|
|
3720
|
+
...Q ? {} : i(_.external),
|
|
3693
3721
|
class: ["depth3-trigger", {
|
|
3694
|
-
"has-depth4":
|
|
3695
|
-
selected:
|
|
3722
|
+
"has-depth4": Q,
|
|
3723
|
+
selected: _.selected
|
|
3696
3724
|
}],
|
|
3697
|
-
...
|
|
3725
|
+
...Q ? {
|
|
3698
3726
|
"aria-haspopup": "true",
|
|
3699
|
-
"aria-expanded":
|
|
3727
|
+
"aria-expanded": ae.value === G ? "true" : "false"
|
|
3700
3728
|
} : {},
|
|
3701
|
-
onClick: (
|
|
3702
|
-
|
|
3729
|
+
onClick: (J) => {
|
|
3730
|
+
Q && Ie(J, G), o(_, J);
|
|
3703
3731
|
}
|
|
3704
|
-
},
|
|
3732
|
+
}, _.text), Q ? Ge(_, G) : null]);
|
|
3705
3733
|
});
|
|
3706
3734
|
return t("div", {
|
|
3707
|
-
id: S(b,
|
|
3708
|
-
class: ["depth3-wrap", { "is-open":
|
|
3709
|
-
}, [t("ul", {},
|
|
3710
|
-
}, Xe = (
|
|
3711
|
-
const
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3735
|
+
id: S(b, L),
|
|
3736
|
+
class: ["depth3-wrap", { "is-open": Z.value[`${b}-${L}`] }]
|
|
3737
|
+
}, [t("ul", {}, T)]);
|
|
3738
|
+
}, Xe = (d, b) => {
|
|
3739
|
+
const L = (_) => ({
|
|
3740
|
+
text: _.text,
|
|
3741
|
+
href: _.href,
|
|
3742
|
+
external: _.external,
|
|
3743
|
+
selected: _.selected
|
|
3744
|
+
}), T = (d.subItems ?? (d.items ?? (d.href ? [d] : [])).map(L)).map((_, N) => {
|
|
3745
|
+
const G = `${b}-${N}`, Q = !!_.items?.length;
|
|
3746
|
+
return t("li", { key: `sub-${N}` }, [t("a", {
|
|
3747
|
+
href: _.href || "#",
|
|
3748
|
+
...Q ? {} : i(_.external),
|
|
3716
3749
|
class: ["gnb-sub-trigger", {
|
|
3717
|
-
"has-depth3":
|
|
3718
|
-
active:
|
|
3719
|
-
selected:
|
|
3750
|
+
"has-depth3": Q,
|
|
3751
|
+
active: Q && Z.value[G],
|
|
3752
|
+
selected: _.selected
|
|
3720
3753
|
}],
|
|
3721
|
-
...
|
|
3722
|
-
"aria-controls": S(b,
|
|
3723
|
-
"aria-expanded":
|
|
3754
|
+
...Q ? {
|
|
3755
|
+
"aria-controls": S(b, N),
|
|
3756
|
+
"aria-expanded": Z.value[G] ? "true" : "false"
|
|
3724
3757
|
} : {},
|
|
3725
|
-
onClick: (
|
|
3726
|
-
|
|
3758
|
+
onClick: (J) => {
|
|
3759
|
+
Q && be(J, G), o(_, J);
|
|
3727
3760
|
}
|
|
3728
|
-
},
|
|
3761
|
+
}, _.text), Q ? Ue(_, b, N) : null]);
|
|
3729
3762
|
});
|
|
3730
3763
|
return t("div", {
|
|
3731
|
-
ref: (
|
|
3764
|
+
ref: (_) => x(P, _, b),
|
|
3732
3765
|
id: h(b),
|
|
3733
3766
|
class: "gnb-sub-list",
|
|
3734
3767
|
role: "tabpanel",
|
|
3735
|
-
"aria-labelledby":
|
|
3736
|
-
}, [t("h2", { class: "sub-title" },
|
|
3768
|
+
"aria-labelledby": c(b)
|
|
3769
|
+
}, [t("h2", { class: "sub-title" }, d.title || d.text), t("ul", {}, T)]);
|
|
3737
3770
|
}, Qe = () => {
|
|
3738
|
-
const
|
|
3739
|
-
key: `tab-${
|
|
3771
|
+
const d = e.items.map((L, T) => t("li", {
|
|
3772
|
+
key: `tab-${T}`,
|
|
3740
3773
|
role: "none"
|
|
3741
3774
|
}, [t("a", {
|
|
3742
|
-
id:
|
|
3743
|
-
href: `#${h(
|
|
3744
|
-
class: ["gnb-main-trigger", { active: re.value ===
|
|
3775
|
+
id: c(T),
|
|
3776
|
+
href: `#${h(T)}`,
|
|
3777
|
+
class: ["gnb-main-trigger", { active: re.value === T }],
|
|
3745
3778
|
role: "tab",
|
|
3746
|
-
"aria-controls": h(
|
|
3747
|
-
"aria-selected": re.value ===
|
|
3748
|
-
onClick: (
|
|
3749
|
-
me(
|
|
3779
|
+
"aria-controls": h(T),
|
|
3780
|
+
"aria-selected": re.value === T ? "true" : "false",
|
|
3781
|
+
onClick: (_) => {
|
|
3782
|
+
me(_, T), o(L, _);
|
|
3750
3783
|
}
|
|
3751
|
-
},
|
|
3784
|
+
}, L.text)])), b = [t("div", { class: "gnb-menu" }, [t("div", { class: "menu-wrap" }, [t("ul", {
|
|
3752
3785
|
role: "tablist",
|
|
3753
3786
|
"aria-label": e.ariaLabel
|
|
3754
|
-
},
|
|
3787
|
+
}, d)]), t("div", { class: "submenu-wrap" }, e.items.map(Xe))]), r.bottom ? t("div", { class: "gnb-bottom" }, r.bottom()) : null];
|
|
3755
3788
|
return t("div", {
|
|
3756
3789
|
ref: n,
|
|
3757
3790
|
id: e.mobileId,
|
|
@@ -3780,9 +3813,9 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3780
3813
|
}, [t("span", { class: "sr-only" }, e.closeLabel), t("i", { class: "svg-icon ico-popup-close" })])
|
|
3781
3814
|
])]);
|
|
3782
3815
|
};
|
|
3783
|
-
return () => g.value ?
|
|
3816
|
+
return () => g.value ? Ye() : Qe();
|
|
3784
3817
|
}
|
|
3785
|
-
}), tl = el, al = 400, ll = 2500, nl = 0, sl = 16,
|
|
3818
|
+
}), tl = el, al = 400, ll = 2500, nl = 0, sl = 16, ze = (e) => e ? e.flatMap((a) => a.type === Ze ? Array.isArray(a.children) ? ze(a.children) : [] : a.type === Je ? [] : a.type === et && typeof a.children == "string" && a.children.trim() === "" ? [] : [a]) : [], rl = /* @__PURE__ */ M({
|
|
3786
3819
|
name: "KrdsCarousel",
|
|
3787
3820
|
props: {
|
|
3788
3821
|
variant: {
|
|
@@ -3865,20 +3898,21 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3865
3898
|
stop: () => !0,
|
|
3866
3899
|
"more-click": (e) => !0
|
|
3867
3900
|
},
|
|
3901
|
+
slots: Object,
|
|
3868
3902
|
setup(e, { emit: a, slots: r }) {
|
|
3869
3903
|
const l = xe()?.uid, n = C(() => `${e.id ?? `krds-carousel-${l}`}-wrapper`);
|
|
3870
3904
|
let s = 0;
|
|
3871
|
-
const u =
|
|
3905
|
+
const u = B(e.activeIndex ?? 0), g = C(() => e.spaceBetween ?? (e.variant === "banner" ? sl : nl)), h = C(() => e.pagination ?? (e.variant === "banner" ? "fraction" : "bullets")), y = B(!1), c = B(!1), S = B(!1), k = C(() => c.value || S.value);
|
|
3872
3906
|
let K;
|
|
3873
3907
|
const m = () => {
|
|
3874
3908
|
K !== void 0 && (clearInterval(K), K = void 0);
|
|
3875
3909
|
}, v = (P) => {
|
|
3876
3910
|
if (s <= 0) return;
|
|
3877
|
-
const
|
|
3878
|
-
|
|
3879
|
-
},
|
|
3911
|
+
const O = e.loop ? (P % s + s) % s : Math.min(Math.max(P, 0), s - 1);
|
|
3912
|
+
O !== u.value && (u.value = O, a("update:activeIndex", O), a("change", O));
|
|
3913
|
+
}, i = () => v(u.value - 1), o = () => v(u.value + 1), p = () => {
|
|
3880
3914
|
y.value || (y.value = !0, a("play"));
|
|
3881
|
-
},
|
|
3915
|
+
}, V = () => {
|
|
3882
3916
|
y.value && (y.value = !1, a("stop"));
|
|
3883
3917
|
};
|
|
3884
3918
|
se([
|
|
@@ -3888,38 +3922,38 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3888
3922
|
], () => {
|
|
3889
3923
|
m(), !(!y.value || k.value) && (K = setInterval(() => {
|
|
3890
3924
|
if (!e.loop && s > 0 && u.value >= s - 1) {
|
|
3891
|
-
|
|
3925
|
+
V();
|
|
3892
3926
|
return;
|
|
3893
3927
|
}
|
|
3894
|
-
|
|
3928
|
+
o();
|
|
3895
3929
|
}, e.autoplayDelay));
|
|
3896
3930
|
}), se(() => e.autoplay, (P) => {
|
|
3897
|
-
P ? p() :
|
|
3931
|
+
P ? p() : V();
|
|
3898
3932
|
}), se(() => e.activeIndex, (P) => {
|
|
3899
3933
|
typeof P != "number" || P === u.value || (u.value = s > 0 ? Math.min(Math.max(P, 0), s - 1) : P);
|
|
3900
3934
|
});
|
|
3901
|
-
const
|
|
3902
|
-
let
|
|
3903
|
-
const
|
|
3904
|
-
|
|
3905
|
-
}, f = C(() =>
|
|
3906
|
-
|
|
3907
|
-
typeof window < "u" && window.matchMedia && (
|
|
3908
|
-
}),
|
|
3909
|
-
m(),
|
|
3935
|
+
const E = B(!1);
|
|
3936
|
+
let $;
|
|
3937
|
+
const x = (P) => {
|
|
3938
|
+
E.value = P.matches;
|
|
3939
|
+
}, f = C(() => E.value ? 0 : e.speed);
|
|
3940
|
+
te(() => {
|
|
3941
|
+
typeof window < "u" && window.matchMedia && ($ = window.matchMedia("(prefers-reduced-motion: reduce)"), E.value = $.matches, $.addEventListener("change", x)), e.autoplay && p();
|
|
3942
|
+
}), ie(() => {
|
|
3943
|
+
m(), $?.removeEventListener("change", x);
|
|
3910
3944
|
});
|
|
3911
|
-
const
|
|
3912
|
-
e.pauseOnHover && (
|
|
3913
|
-
},
|
|
3914
|
-
|
|
3915
|
-
},
|
|
3945
|
+
const D = () => {
|
|
3946
|
+
e.pauseOnHover && (c.value = !0);
|
|
3947
|
+
}, z = () => {
|
|
3948
|
+
c.value = !1;
|
|
3949
|
+
}, I = () => {
|
|
3916
3950
|
S.value = !0;
|
|
3917
|
-
},
|
|
3918
|
-
const
|
|
3919
|
-
|
|
3920
|
-
},
|
|
3951
|
+
}, H = (P) => {
|
|
3952
|
+
const O = P.currentTarget;
|
|
3953
|
+
O && O.contains(P.relatedTarget) || (S.value = !1);
|
|
3954
|
+
}, j = (P) => {
|
|
3921
3955
|
a("more-click", P);
|
|
3922
|
-
},
|
|
3956
|
+
}, W = {
|
|
3923
3957
|
position: "relative",
|
|
3924
3958
|
overflow: "hidden",
|
|
3925
3959
|
width: "100%"
|
|
@@ -3942,41 +3976,41 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3942
3976
|
right: P ? void 0 : "0",
|
|
3943
3977
|
transform: "translateY(-50%)",
|
|
3944
3978
|
zIndex: 10
|
|
3945
|
-
}), re = (P,
|
|
3946
|
-
const w = q ===
|
|
3979
|
+
}), re = (P, O) => P.map((Y, q) => {
|
|
3980
|
+
const w = q === O;
|
|
3947
3981
|
return t("li", {
|
|
3948
|
-
key:
|
|
3982
|
+
key: Y.key ?? `krds-carousel-slide-${q}`,
|
|
3949
3983
|
class: ["swiper-slide", { "swiper-slide-active": w }],
|
|
3950
3984
|
style: U,
|
|
3951
3985
|
"aria-roledescription": "slide",
|
|
3952
3986
|
"aria-label": `${q + 1} / ${P.length}`,
|
|
3953
3987
|
"aria-hidden": w ? void 0 : "true",
|
|
3954
3988
|
inert: w ? void 0 : !0
|
|
3955
|
-
}, [
|
|
3956
|
-
}),
|
|
3957
|
-
const q = P === "prev", w = !e.loop && (q ?
|
|
3989
|
+
}, [Y]);
|
|
3990
|
+
}), Z = (P, O, Y) => {
|
|
3991
|
+
const q = P === "prev", w = !e.loop && (q ? O <= 0 : O >= s - 1);
|
|
3958
3992
|
return t("button", {
|
|
3959
3993
|
type: "button",
|
|
3960
3994
|
class: [`swiper-button-${P}`, { "swiper-button-disabled": w }],
|
|
3961
|
-
style:
|
|
3995
|
+
style: Y ? he(q) : void 0,
|
|
3962
3996
|
disabled: w,
|
|
3963
3997
|
"aria-controls": n.value,
|
|
3964
|
-
onClick: q ?
|
|
3998
|
+
onClick: q ? i : o
|
|
3965
3999
|
}, [t("span", { class: "sr-only" }, q ? e.prevLabel : e.nextLabel)]);
|
|
3966
4000
|
}, fe = () => t("a", {
|
|
3967
4001
|
href: e.moreHref,
|
|
3968
4002
|
class: "swiper-button-more",
|
|
3969
|
-
onClick:
|
|
3970
|
-
}, [t("span", { class: "sr-only" }, e.moreLabel)]),
|
|
3971
|
-
t("span", { class: "swiper-pagination-current" }, String(
|
|
4003
|
+
onClick: j
|
|
4004
|
+
}, [t("span", { class: "sr-only" }, e.moreLabel)]), ae = (P, O) => h.value === "fraction" ? t("div", { class: "swiper-pagination swiper-pagination-fraction" }, [
|
|
4005
|
+
t("span", { class: "swiper-pagination-current" }, String(O + 1)),
|
|
3972
4006
|
t("span", { "aria-hidden": "true" }, "/"),
|
|
3973
4007
|
t("span", { class: "swiper-pagination-total" }, String(P))
|
|
3974
|
-
]) : t("div", { class: "swiper-pagination" }, Array.from({ length: P }, (
|
|
4008
|
+
]) : t("div", { class: "swiper-pagination" }, Array.from({ length: P }, (Y, q) => t("button", {
|
|
3975
4009
|
key: `krds-carousel-bullet-${q}`,
|
|
3976
4010
|
type: "button",
|
|
3977
|
-
class: ["swiper-pagination-bullet", { "swiper-pagination-bullet-active": q ===
|
|
4011
|
+
class: ["swiper-pagination-bullet", { "swiper-pagination-bullet-active": q === O }],
|
|
3978
4012
|
"aria-label": `${q + 1}번째 슬라이드로 이동`,
|
|
3979
|
-
"aria-current": q ===
|
|
4013
|
+
"aria-current": q === O ? "true" : void 0,
|
|
3980
4014
|
"aria-controls": n.value,
|
|
3981
4015
|
onClick: () => v(q)
|
|
3982
4016
|
}))), ve = () => t("div", { class: "swiper-controller" }, [t("button", {
|
|
@@ -3990,19 +4024,19 @@ var Ot = /* @__PURE__ */ _({
|
|
|
3990
4024
|
class: "swiper-button-stop",
|
|
3991
4025
|
style: y.value ? void 0 : { display: "none" },
|
|
3992
4026
|
"aria-controls": n.value,
|
|
3993
|
-
onClick:
|
|
3994
|
-
}, [t("span", { class: "sr-only" }, e.stopLabel)])]), ne = (P,
|
|
3995
|
-
const
|
|
3996
|
-
if (q &&
|
|
3997
|
-
const
|
|
3998
|
-
e.navigation &&
|
|
3999
|
-
} else w &&
|
|
4000
|
-
return
|
|
4027
|
+
onClick: V
|
|
4028
|
+
}, [t("span", { class: "sr-only" }, e.stopLabel)])]), ne = (P, O) => {
|
|
4029
|
+
const Y = e.variant === "banner", q = h.value !== "none", w = !!e.moreHref, F = [];
|
|
4030
|
+
if (q && F.push(ae(P, O)), e.autoplay && F.push(ve()), Y) {
|
|
4031
|
+
const R = [];
|
|
4032
|
+
e.navigation && R.push(Z("prev", O, !1), Z("next", O, !1)), w && R.push(fe()), R.length > 0 && F.push(t("div", { class: "swiper-navigation" }, R));
|
|
4033
|
+
} else w && F.push(fe());
|
|
4034
|
+
return F.length === 0 ? null : t("div", { class: ["swiper-indicator", { "text-center": !Y }] }, F);
|
|
4001
4035
|
};
|
|
4002
4036
|
return () => {
|
|
4003
|
-
const P =
|
|
4004
|
-
s =
|
|
4005
|
-
const
|
|
4037
|
+
const P = ze(r.default?.()), O = P.length;
|
|
4038
|
+
s = O;
|
|
4039
|
+
const Y = O > 0 ? Math.min(Math.max(u.value, 0), O - 1) : 0, q = e.variant === "banner";
|
|
4006
4040
|
return t("div", {
|
|
4007
4041
|
id: e.id,
|
|
4008
4042
|
class: ["krds-carousel", q ? "main-d-ban-swiper" : "vb-swiper"],
|
|
@@ -4010,27 +4044,27 @@ var Ot = /* @__PURE__ */ _({
|
|
|
4010
4044
|
role: "region",
|
|
4011
4045
|
"aria-roledescription": "carousel",
|
|
4012
4046
|
"aria-label": e.ariaLabel,
|
|
4013
|
-
onMouseenter:
|
|
4014
|
-
onMouseleave:
|
|
4015
|
-
onFocusin:
|
|
4016
|
-
onFocusout:
|
|
4047
|
+
onMouseenter: D,
|
|
4048
|
+
onMouseleave: z,
|
|
4049
|
+
onFocusin: I,
|
|
4050
|
+
onFocusout: H
|
|
4017
4051
|
}, [
|
|
4018
4052
|
t("div", {
|
|
4019
4053
|
class: "swiper",
|
|
4020
|
-
style:
|
|
4054
|
+
style: W,
|
|
4021
4055
|
"aria-live": y.value ? "off" : "polite"
|
|
4022
4056
|
}, [t("ul", {
|
|
4023
4057
|
id: n.value,
|
|
4024
4058
|
class: "swiper-wrapper",
|
|
4025
|
-
style: ce(
|
|
4026
|
-
}, re(P,
|
|
4027
|
-
!q && e.navigation &&
|
|
4028
|
-
!q && e.navigation &&
|
|
4029
|
-
|
|
4059
|
+
style: ce(Y)
|
|
4060
|
+
}, re(P, Y))]),
|
|
4061
|
+
!q && e.navigation && O > 0 ? Z("prev", Y, !0) : null,
|
|
4062
|
+
!q && e.navigation && O > 0 ? Z("next", Y, !0) : null,
|
|
4063
|
+
O > 0 ? ne(O, Y) : null
|
|
4030
4064
|
]);
|
|
4031
4065
|
};
|
|
4032
4066
|
}
|
|
4033
|
-
}),
|
|
4067
|
+
}), ol = rl, il = /* @__PURE__ */ M({
|
|
4034
4068
|
name: "KrdsTabs",
|
|
4035
4069
|
props: {
|
|
4036
4070
|
tabs: {
|
|
@@ -4062,14 +4096,15 @@ var Ot = /* @__PURE__ */ _({
|
|
|
4062
4096
|
"update:modelValue": (e) => !0,
|
|
4063
4097
|
change: (e) => !0
|
|
4064
4098
|
},
|
|
4099
|
+
slots: Object,
|
|
4065
4100
|
setup(e, { emit: a, slots: r }) {
|
|
4066
|
-
const l = de(), n = (
|
|
4067
|
-
|
|
4068
|
-
}, y = (
|
|
4069
|
-
if (
|
|
4070
|
-
|
|
4071
|
-
const S =
|
|
4072
|
-
(
|
|
4101
|
+
const l = de(), n = (c) => `tab-${l}-${c}`, s = (c) => `panel-${l}-${c}`, u = B(e.tabs.find((c) => !c.disabled)?.id), g = C(() => e.modelValue ?? u.value), h = (c) => {
|
|
4102
|
+
c.disabled || c.id === g.value || (u.value = c.id, a("update:modelValue", c.id), a("change", c.id));
|
|
4103
|
+
}, y = (c) => {
|
|
4104
|
+
if (c.key !== "ArrowRight" && c.key !== "ArrowLeft") return;
|
|
4105
|
+
c.preventDefault();
|
|
4106
|
+
const S = c.currentTarget;
|
|
4107
|
+
(c.key === "ArrowRight" ? S.nextElementSibling : S.previousElementSibling)?.querySelector("button")?.focus();
|
|
4073
4108
|
};
|
|
4074
4109
|
return () => t("div", { class: [
|
|
4075
4110
|
"krds-tab-area",
|
|
@@ -4079,37 +4114,37 @@ var Ot = /* @__PURE__ */ _({
|
|
|
4079
4114
|
"tab",
|
|
4080
4115
|
e.variant,
|
|
4081
4116
|
{ full: e.full }
|
|
4082
|
-
] }, [t("ul", { role: "tablist" }, e.tabs.map((
|
|
4083
|
-
key:
|
|
4084
|
-
id: n(
|
|
4117
|
+
] }, [t("ul", { role: "tablist" }, e.tabs.map((c) => t("li", {
|
|
4118
|
+
key: c.id,
|
|
4119
|
+
id: n(c.id),
|
|
4085
4120
|
role: "tab",
|
|
4086
|
-
"aria-selected":
|
|
4087
|
-
"aria-controls": s(
|
|
4088
|
-
class: { active:
|
|
4121
|
+
"aria-selected": c.id === g.value,
|
|
4122
|
+
"aria-controls": s(c.id),
|
|
4123
|
+
class: { active: c.id === g.value },
|
|
4089
4124
|
onKeydown: y
|
|
4090
4125
|
}, [t("button", {
|
|
4091
4126
|
type: "button",
|
|
4092
4127
|
class: "btn-tab",
|
|
4093
|
-
disabled:
|
|
4094
|
-
onClick: () => h(
|
|
4095
|
-
}, [
|
|
4096
|
-
key:
|
|
4097
|
-
id: s(
|
|
4128
|
+
disabled: c.disabled || void 0,
|
|
4129
|
+
onClick: () => h(c)
|
|
4130
|
+
}, [c.label, c.id === g.value ? t("i", { class: "sr-only" }, ` ${e.selectedText}`) : null])])))]), t("div", { class: "tab-conts-wrap" }, e.tabs.map((c) => t("section", {
|
|
4131
|
+
key: c.id,
|
|
4132
|
+
id: s(c.id),
|
|
4098
4133
|
role: "tabpanel",
|
|
4099
|
-
"aria-labelledby": n(
|
|
4100
|
-
class: ["tab-conts", { active:
|
|
4101
|
-
}, r[
|
|
4134
|
+
"aria-labelledby": n(c.id),
|
|
4135
|
+
class: ["tab-conts", { active: c.id === g.value }]
|
|
4136
|
+
}, r[c.id]?.())))]);
|
|
4102
4137
|
}
|
|
4103
|
-
}), ul =
|
|
4138
|
+
}), ul = il, Ve = /* @__PURE__ */ rt({
|
|
4104
4139
|
KrdsAccordionGroup: () => xa,
|
|
4105
4140
|
KrdsAccordionItem: () => La,
|
|
4106
4141
|
KrdsBadge: () => Mt,
|
|
4107
4142
|
KrdsBreadcrumb: () => na,
|
|
4108
|
-
KrdsButton: () =>
|
|
4109
|
-
KrdsButtonGroup: () =>
|
|
4110
|
-
KrdsCarousel: () =>
|
|
4111
|
-
KrdsCheckArea: () =>
|
|
4112
|
-
KrdsCheckbox: () =>
|
|
4143
|
+
KrdsButton: () => ot,
|
|
4144
|
+
KrdsButtonGroup: () => it,
|
|
4145
|
+
KrdsCarousel: () => ol,
|
|
4146
|
+
KrdsCheckArea: () => jt,
|
|
4147
|
+
KrdsCheckbox: () => Yt,
|
|
4113
4148
|
KrdsCoachMark: () => ha,
|
|
4114
4149
|
KrdsContextualHelp: () => va,
|
|
4115
4150
|
KrdsCriticalAlerts: () => Xa,
|
|
@@ -4123,14 +4158,14 @@ var Ot = /* @__PURE__ */ _({
|
|
|
4123
4158
|
KrdsFormLabel: () => gt,
|
|
4124
4159
|
KrdsHeader: () => _a,
|
|
4125
4160
|
KrdsIcon: () => ut,
|
|
4126
|
-
KrdsIdentifier: () =>
|
|
4161
|
+
KrdsIdentifier: () => za,
|
|
4127
4162
|
KrdsInPageNavigation: () => ra,
|
|
4128
4163
|
KrdsInput: () => pt,
|
|
4129
4164
|
KrdsLanguageSwitcher: () => ba,
|
|
4130
|
-
KrdsLayout: () =>
|
|
4165
|
+
KrdsLayout: () => Ha,
|
|
4131
4166
|
KrdsLink: () => ft,
|
|
4132
4167
|
KrdsMainMenu: () => tl,
|
|
4133
|
-
KrdsMasthead: () =>
|
|
4168
|
+
KrdsMasthead: () => Rt,
|
|
4134
4169
|
KrdsModal: () => Ka,
|
|
4135
4170
|
KrdsPagination: () => ua,
|
|
4136
4171
|
KrdsPanel: () => ca,
|
|
@@ -4142,32 +4177,32 @@ var Ot = /* @__PURE__ */ _({
|
|
|
4142
4177
|
KrdsSpinner: () => Xt,
|
|
4143
4178
|
KrdsStep: () => ea,
|
|
4144
4179
|
KrdsStepIndicator: () => Jt,
|
|
4145
|
-
KrdsStructuredList: () =>
|
|
4180
|
+
KrdsStructuredList: () => Wa,
|
|
4146
4181
|
KrdsTable: () => Ta,
|
|
4147
4182
|
KrdsTabs: () => ul,
|
|
4148
4183
|
KrdsTag: () => Ft,
|
|
4149
|
-
KrdsTagGroup: () =>
|
|
4184
|
+
KrdsTagGroup: () => Ot,
|
|
4150
4185
|
KrdsTextList: () => Ga,
|
|
4151
4186
|
KrdsTextarea: () => Lt,
|
|
4152
4187
|
KrdsToggleSwitch: () => qt,
|
|
4153
4188
|
KrdsTooltip: () => ya,
|
|
4154
4189
|
KrdsTts: () => Ea
|
|
4155
|
-
}),
|
|
4190
|
+
}), Re = "0.0.22", vl = { install(e, a = {}) {
|
|
4156
4191
|
e.provide("krds:config", a), (a.components || Object.keys(Ve)).forEach((r) => {
|
|
4157
4192
|
const l = Ve[r];
|
|
4158
4193
|
l && e.component(r, l);
|
|
4159
|
-
}),
|
|
4160
|
-
} }, pl =
|
|
4194
|
+
}), oa(e), e.config.globalProperties.$krds = { version: Re };
|
|
4195
|
+
} }, pl = Re;
|
|
4161
4196
|
export {
|
|
4162
4197
|
xa as KrdsAccordionGroup,
|
|
4163
4198
|
La as KrdsAccordionItem,
|
|
4164
4199
|
Mt as KrdsBadge,
|
|
4165
4200
|
na as KrdsBreadcrumb,
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4201
|
+
ot as KrdsButton,
|
|
4202
|
+
it as KrdsButtonGroup,
|
|
4203
|
+
ol as KrdsCarousel,
|
|
4204
|
+
jt as KrdsCheckArea,
|
|
4205
|
+
Yt as KrdsCheckbox,
|
|
4171
4206
|
ha as KrdsCoachMark,
|
|
4172
4207
|
va as KrdsContextualHelp,
|
|
4173
4208
|
Xa as KrdsCriticalAlerts,
|
|
@@ -4181,14 +4216,14 @@ export {
|
|
|
4181
4216
|
gt as KrdsFormLabel,
|
|
4182
4217
|
_a as KrdsHeader,
|
|
4183
4218
|
ut as KrdsIcon,
|
|
4184
|
-
|
|
4219
|
+
za as KrdsIdentifier,
|
|
4185
4220
|
ra as KrdsInPageNavigation,
|
|
4186
4221
|
pt as KrdsInput,
|
|
4187
4222
|
ba as KrdsLanguageSwitcher,
|
|
4188
|
-
|
|
4223
|
+
Ha as KrdsLayout,
|
|
4189
4224
|
ft as KrdsLink,
|
|
4190
4225
|
tl as KrdsMainMenu,
|
|
4191
|
-
|
|
4226
|
+
Rt as KrdsMasthead,
|
|
4192
4227
|
Ka as KrdsModal,
|
|
4193
4228
|
ua as KrdsPagination,
|
|
4194
4229
|
ca as KrdsPanel,
|
|
@@ -4200,11 +4235,11 @@ export {
|
|
|
4200
4235
|
Xt as KrdsSpinner,
|
|
4201
4236
|
ea as KrdsStep,
|
|
4202
4237
|
Jt as KrdsStepIndicator,
|
|
4203
|
-
|
|
4238
|
+
Wa as KrdsStructuredList,
|
|
4204
4239
|
Ta as KrdsTable,
|
|
4205
4240
|
ul as KrdsTabs,
|
|
4206
4241
|
Ft as KrdsTag,
|
|
4207
|
-
|
|
4242
|
+
Ot as KrdsTagGroup,
|
|
4208
4243
|
Ga as KrdsTextList,
|
|
4209
4244
|
Lt as KrdsTextarea,
|
|
4210
4245
|
qt as KrdsToggleSwitch,
|