@krds.ui/vue 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/krds-vue.es.js +1300 -798
- package/dist/krds-vue.es.js.map +1 -1
- package/dist/krds-vue.umd.js +1 -1
- package/dist/krds-vue.umd.js.map +1 -1
- package/dist/types/index.d.ts +223 -0
- package/package.json +1 -1
package/dist/krds-vue.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as B, computed as y, h as v, ref as K, onMounted as le, onBeforeUnmount as Ke, createElementBlock as w, openBlock as S, createElementVNode as r, normalizeClass as I, withDirectives as Q, unref as P, toDisplayString as L, Fragment as F, renderList as N, vShow as te, createBlock as oe, withCtx as ie, createTextVNode as A, watch as ue, provide as De, inject as Ve, createCommentVNode as Y, onUnmounted as X, resolveDirective as ze, resolveDynamicComponent as ye, renderSlot as J, normalizeStyle as ae, nextTick as Le, withModifiers as re } from "vue";
|
|
2
|
+
const Se = B({
|
|
3
3
|
name: "KrdsButton",
|
|
4
4
|
props: {
|
|
5
5
|
type: {
|
|
@@ -36,37 +36,37 @@ const de = w({
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
emits: ["click"],
|
|
39
|
-
setup(e, { emit:
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
return e.icon &&
|
|
43
|
-
}),
|
|
44
|
-
e.disabled ||
|
|
39
|
+
setup(e, { emit: i, slots: n }) {
|
|
40
|
+
const a = y(() => {
|
|
41
|
+
const s = ["krds-btn"];
|
|
42
|
+
return e.icon && s.push("icon"), e.border && s.push("border"), e.pure && s.push("pure"), e.variant && !e.icon && s.push(e.variant), e.size && s.push(e.size), e.class && s.push(e.class), s;
|
|
43
|
+
}), t = (s) => {
|
|
44
|
+
e.disabled || i("click", s);
|
|
45
45
|
};
|
|
46
|
-
return () =>
|
|
46
|
+
return () => v(
|
|
47
47
|
"button",
|
|
48
48
|
{
|
|
49
49
|
type: e.type,
|
|
50
|
-
class:
|
|
50
|
+
class: a.value,
|
|
51
51
|
disabled: e.disabled,
|
|
52
|
-
onClick:
|
|
52
|
+
onClick: t
|
|
53
53
|
},
|
|
54
54
|
n.default?.()
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
57
|
+
}), Ie = B({
|
|
58
58
|
name: "KrdsButtonGroup",
|
|
59
59
|
props: {},
|
|
60
|
-
setup(e, { slots:
|
|
61
|
-
return () =>
|
|
60
|
+
setup(e, { slots: i }) {
|
|
61
|
+
return () => v(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
64
|
class: "btn-group"
|
|
65
65
|
},
|
|
66
|
-
|
|
66
|
+
i.default?.()
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
|
-
}),
|
|
69
|
+
}), Ee = B({
|
|
70
70
|
name: "KrdsIcon",
|
|
71
71
|
props: {
|
|
72
72
|
name: {
|
|
@@ -79,11 +79,11 @@ const de = w({
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
setup(e) {
|
|
82
|
-
return () =>
|
|
82
|
+
return () => v("i", {
|
|
83
83
|
class: ["svg-icon", e.name, e.class].filter(Boolean).join(" ")
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
}),
|
|
86
|
+
}), Me = B({
|
|
87
87
|
name: "KrdsLink",
|
|
88
88
|
props: {
|
|
89
89
|
href: {
|
|
@@ -120,29 +120,29 @@ const de = w({
|
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
emits: ["click"],
|
|
123
|
-
setup(e, { emit:
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
return e.size &&
|
|
127
|
-
}),
|
|
128
|
-
const
|
|
123
|
+
setup(e, { emit: i, slots: n }) {
|
|
124
|
+
const a = y(() => {
|
|
125
|
+
const o = ["krds-btn"];
|
|
126
|
+
return e.size && o.push(e.size), e.link && o.push("link"), e.basic && o.push("basic"), e.pure && o.push("pure"), e.class && o.push(e.class), o;
|
|
127
|
+
}), t = y(() => {
|
|
128
|
+
const o = {
|
|
129
129
|
href: e.href,
|
|
130
|
-
class:
|
|
130
|
+
class: a.value
|
|
131
131
|
};
|
|
132
|
-
return e.target && (
|
|
133
|
-
}),
|
|
134
|
-
|
|
132
|
+
return e.target && (o.target = e.target), e.title && (o.title = e.title), e.target === "_blank" && (o.rel = "noopener noreferrer"), o;
|
|
133
|
+
}), s = (o) => {
|
|
134
|
+
i("click", o);
|
|
135
135
|
};
|
|
136
|
-
return () =>
|
|
136
|
+
return () => v(
|
|
137
137
|
"a",
|
|
138
138
|
{
|
|
139
|
-
...
|
|
140
|
-
onClick:
|
|
139
|
+
...t.value,
|
|
140
|
+
onClick: s
|
|
141
141
|
},
|
|
142
142
|
n.default?.()
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
|
-
}),
|
|
145
|
+
}), we = B({
|
|
146
146
|
name: "KrdsSpinner",
|
|
147
147
|
props: {
|
|
148
148
|
label: {
|
|
@@ -151,10 +151,10 @@ const de = w({
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
render() {
|
|
154
|
-
const e = [
|
|
155
|
-
return this.label && e.push(
|
|
154
|
+
const e = [v("span", { class: "sr-only" }, "로딩 중")];
|
|
155
|
+
return this.label && e.push(v("span", this.label)), v("div", { class: "krds-spinner", role: "status" }, e);
|
|
156
156
|
}
|
|
157
|
-
}),
|
|
157
|
+
}), Re = B({
|
|
158
158
|
name: "KrdsInput",
|
|
159
159
|
props: {
|
|
160
160
|
modelValue: {
|
|
@@ -243,27 +243,27 @@ const de = w({
|
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
245
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup"],
|
|
246
|
-
setup(e, { emit:
|
|
247
|
-
const
|
|
248
|
-
const
|
|
249
|
-
return e.size &&
|
|
250
|
-
}),
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
},
|
|
256
|
-
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
},
|
|
262
|
-
|
|
263
|
-
}, g =
|
|
264
|
-
const
|
|
246
|
+
setup(e, { emit: i, slots: n }) {
|
|
247
|
+
const a = y(() => {
|
|
248
|
+
const k = ["krds-input"];
|
|
249
|
+
return e.size && k.push(e.size), e.class && k.push(e.class), k;
|
|
250
|
+
}), t = (k) => {
|
|
251
|
+
const D = k.target, p = e.type === "number" ? Number(D.value) : D.value;
|
|
252
|
+
i("update:modelValue", p), i("input", k);
|
|
253
|
+
}, s = (k) => {
|
|
254
|
+
i("change", k);
|
|
255
|
+
}, o = (k) => {
|
|
256
|
+
i("focus", k);
|
|
257
|
+
}, c = (k) => {
|
|
258
|
+
i("blur", k);
|
|
259
|
+
}, d = (k) => {
|
|
260
|
+
i("keydown", k);
|
|
261
|
+
}, m = (k) => {
|
|
262
|
+
i("keyup", k);
|
|
263
|
+
}, g = y(() => {
|
|
264
|
+
const k = {
|
|
265
265
|
type: e.type,
|
|
266
|
-
class:
|
|
266
|
+
class: a.value,
|
|
267
267
|
value: e.modelValue,
|
|
268
268
|
placeholder: e.placeholder,
|
|
269
269
|
name: e.name,
|
|
@@ -273,24 +273,24 @@ const de = w({
|
|
|
273
273
|
disabled: e.disabled,
|
|
274
274
|
autocomplete: e.autocomplete,
|
|
275
275
|
autofocus: e.autofocus,
|
|
276
|
-
onInput:
|
|
277
|
-
onChange:
|
|
278
|
-
onFocus:
|
|
279
|
-
onBlur:
|
|
280
|
-
onKeydown:
|
|
281
|
-
onKeyup:
|
|
276
|
+
onInput: t,
|
|
277
|
+
onChange: s,
|
|
278
|
+
onFocus: o,
|
|
279
|
+
onBlur: c,
|
|
280
|
+
onKeydown: d,
|
|
281
|
+
onKeyup: m
|
|
282
282
|
};
|
|
283
|
-
return e.maxlength !== void 0 && (
|
|
284
|
-
}), _ =
|
|
285
|
-
const
|
|
286
|
-
return e.state !== "default" &&
|
|
283
|
+
return e.maxlength !== void 0 && (k.maxlength = e.maxlength), e.minlength !== void 0 && (k.minlength = e.minlength), e.type === "number" && (e.max !== void 0 && (k.max = e.max), e.min !== void 0 && (k.min = e.min), e.step !== void 0 && (k.step = e.step)), k;
|
|
284
|
+
}), _ = y(() => {
|
|
285
|
+
const k = ["form-conts"];
|
|
286
|
+
return e.state !== "default" && k.push(`is-${e.state}`), e.icon && k.push("btn-ico-wrap"), k;
|
|
287
287
|
});
|
|
288
288
|
return () => {
|
|
289
|
-
const
|
|
290
|
-
return e.loading ?
|
|
289
|
+
const k = [v("input", g.value)];
|
|
290
|
+
return e.loading ? v("div", { class: _.value }, [v("div", { class: "form-spinner" }, [...k, v(we)])]) : (n.default && k.push(...n.default()), v("div", { class: _.value }, k));
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
}),
|
|
293
|
+
}), Te = B({
|
|
294
294
|
name: "KrdsFormLabel",
|
|
295
295
|
props: {
|
|
296
296
|
for: {
|
|
@@ -311,25 +311,25 @@ const de = w({
|
|
|
311
311
|
}
|
|
312
312
|
},
|
|
313
313
|
emits: ["click"],
|
|
314
|
-
setup(e, { emit:
|
|
315
|
-
const
|
|
316
|
-
|
|
314
|
+
setup(e, { emit: i, slots: n }) {
|
|
315
|
+
const a = (t) => {
|
|
316
|
+
i("click", t);
|
|
317
317
|
};
|
|
318
|
-
return () =>
|
|
319
|
-
|
|
318
|
+
return () => v("div", { class: "form-tit" }, [
|
|
319
|
+
v(
|
|
320
320
|
"label",
|
|
321
321
|
{
|
|
322
322
|
for: e.for,
|
|
323
323
|
id: e.id,
|
|
324
324
|
class: e.class,
|
|
325
325
|
style: e.style,
|
|
326
|
-
onClick:
|
|
326
|
+
onClick: a
|
|
327
327
|
},
|
|
328
328
|
n.default?.()
|
|
329
329
|
)
|
|
330
330
|
]);
|
|
331
331
|
}
|
|
332
|
-
}),
|
|
332
|
+
}), Pe = B({
|
|
333
333
|
name: "KrdsFormHint",
|
|
334
334
|
props: {
|
|
335
335
|
type: {
|
|
@@ -350,39 +350,39 @@ const de = w({
|
|
|
350
350
|
}
|
|
351
351
|
},
|
|
352
352
|
emits: ["click"],
|
|
353
|
-
setup(e, { emit:
|
|
354
|
-
const
|
|
355
|
-
|
|
356
|
-
},
|
|
357
|
-
let
|
|
353
|
+
setup(e, { emit: i, slots: n }) {
|
|
354
|
+
const a = (s) => {
|
|
355
|
+
i("click", s);
|
|
356
|
+
}, t = () => {
|
|
357
|
+
let s;
|
|
358
358
|
switch (e.type) {
|
|
359
359
|
case "error":
|
|
360
|
-
|
|
360
|
+
s = "form-hint-invalid";
|
|
361
361
|
break;
|
|
362
362
|
case "success":
|
|
363
|
-
|
|
363
|
+
s = "form-hint-success";
|
|
364
364
|
break;
|
|
365
365
|
case "information":
|
|
366
|
-
|
|
366
|
+
s = "form-hint-information";
|
|
367
367
|
break;
|
|
368
368
|
default:
|
|
369
|
-
|
|
369
|
+
s = "form-hint";
|
|
370
370
|
break;
|
|
371
371
|
}
|
|
372
|
-
return e.class ? `${
|
|
372
|
+
return e.class ? `${s} ${e.class}` : s;
|
|
373
373
|
};
|
|
374
|
-
return () =>
|
|
374
|
+
return () => v(
|
|
375
375
|
"p",
|
|
376
376
|
{
|
|
377
377
|
id: e.id,
|
|
378
|
-
class:
|
|
378
|
+
class: t(),
|
|
379
379
|
style: e.style,
|
|
380
|
-
onClick:
|
|
380
|
+
onClick: a
|
|
381
381
|
},
|
|
382
382
|
n.default?.()
|
|
383
383
|
);
|
|
384
384
|
}
|
|
385
|
-
}),
|
|
385
|
+
}), Ae = B({
|
|
386
386
|
name: "KrdsFormGroup",
|
|
387
387
|
props: {
|
|
388
388
|
class: {
|
|
@@ -398,94 +398,94 @@ const de = w({
|
|
|
398
398
|
default: void 0
|
|
399
399
|
}
|
|
400
400
|
},
|
|
401
|
-
setup(e, { slots:
|
|
402
|
-
const n =
|
|
403
|
-
const
|
|
404
|
-
return e.class &&
|
|
401
|
+
setup(e, { slots: i }) {
|
|
402
|
+
const n = y(() => {
|
|
403
|
+
const a = ["form-group"];
|
|
404
|
+
return e.class && a.push(e.class), a;
|
|
405
405
|
});
|
|
406
|
-
return () =>
|
|
406
|
+
return () => v(
|
|
407
407
|
"div",
|
|
408
408
|
{
|
|
409
409
|
id: e.id,
|
|
410
410
|
class: n.value,
|
|
411
411
|
style: e.style
|
|
412
412
|
},
|
|
413
|
-
|
|
413
|
+
i.default?.()
|
|
414
414
|
);
|
|
415
415
|
}
|
|
416
416
|
});
|
|
417
|
-
function
|
|
418
|
-
const n = /* @__PURE__ */ new Date(),
|
|
419
|
-
const
|
|
420
|
-
for (let
|
|
421
|
-
|
|
422
|
-
return
|
|
423
|
-
}),
|
|
424
|
-
|
|
417
|
+
function Fe(e, i) {
|
|
418
|
+
const n = /* @__PURE__ */ new Date(), a = K(e || n.getFullYear()), t = K(i || n.getMonth() + 1), s = K(null), o = K(null), c = K(null), d = y(() => {
|
|
419
|
+
const h = n.getFullYear(), u = [];
|
|
420
|
+
for (let f = h - 10; f <= h + 10; f++)
|
|
421
|
+
u.push(f);
|
|
422
|
+
return u;
|
|
423
|
+
}), m = y(() => Array.from({ length: 12 }, (h, u) => u + 1)), g = () => {
|
|
424
|
+
s.value = null, o.value = null;
|
|
425
425
|
}, _ = () => {
|
|
426
|
-
|
|
427
|
-
},
|
|
428
|
-
|
|
429
|
-
},
|
|
430
|
-
if (
|
|
431
|
-
|
|
432
|
-
else if (!
|
|
433
|
-
|
|
426
|
+
t.value === 1 ? (t.value = 12, a.value -= 1) : t.value -= 1;
|
|
427
|
+
}, k = () => {
|
|
428
|
+
t.value === 12 ? (t.value = 1, a.value += 1) : t.value += 1;
|
|
429
|
+
}, D = (h, u = !1) => {
|
|
430
|
+
if (u)
|
|
431
|
+
s.value = h, o.value = h;
|
|
432
|
+
else if (!s.value || s.value && o.value)
|
|
433
|
+
s.value = h, o.value = null;
|
|
434
434
|
else {
|
|
435
|
-
const
|
|
436
|
-
new Date(
|
|
435
|
+
const f = new Date(s.value.replace(/\./g, "-"));
|
|
436
|
+
new Date(h.replace(/\./g, "-")) < f ? (s.value = h, o.value = null) : o.value = h;
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
439
|
return {
|
|
440
440
|
// State
|
|
441
|
-
currentYear:
|
|
442
|
-
currentMonth:
|
|
443
|
-
selectedStartDate:
|
|
444
|
-
selectedEndDate:
|
|
445
|
-
activeDateSelector:
|
|
441
|
+
currentYear: a,
|
|
442
|
+
currentMonth: t,
|
|
443
|
+
selectedStartDate: s,
|
|
444
|
+
selectedEndDate: o,
|
|
445
|
+
activeDateSelector: c,
|
|
446
446
|
// Computed
|
|
447
|
-
yearOptions:
|
|
448
|
-
monthOptions:
|
|
447
|
+
yearOptions: d,
|
|
448
|
+
monthOptions: m,
|
|
449
449
|
// Methods
|
|
450
450
|
clearDateSelection: g,
|
|
451
451
|
prevMonth: _,
|
|
452
|
-
nextMonth:
|
|
453
|
-
handleDateSelection:
|
|
452
|
+
nextMonth: k,
|
|
453
|
+
handleDateSelection: D,
|
|
454
454
|
selectToday: () => {
|
|
455
|
-
const
|
|
456
|
-
|
|
455
|
+
const h = `${n.getFullYear()}.${String(n.getMonth() + 1).padStart(2, "0")}.${String(n.getDate()).padStart(2, "0")}`;
|
|
456
|
+
D(h, !0);
|
|
457
457
|
},
|
|
458
|
-
isDateInSelectedRange: (
|
|
459
|
-
if (!
|
|
458
|
+
isDateInSelectedRange: (h) => {
|
|
459
|
+
if (!s.value || !o.value)
|
|
460
460
|
return { isInRange: !1, isStart: !1, isEnd: !1 };
|
|
461
|
-
const
|
|
462
|
-
return { isInRange:
|
|
461
|
+
const u = new Date(h.replace(/\./g, "-")), f = new Date(s.value.replace(/\./g, "-")), x = new Date(o.value.replace(/\./g, "-")), R = h === s.value, E = h === o.value;
|
|
462
|
+
return { isInRange: u >= f && u <= x, isStart: R, isEnd: E };
|
|
463
463
|
}
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
let
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
const g =
|
|
471
|
-
e.value?.contains(g) ||
|
|
472
|
-
}, document.addEventListener(
|
|
473
|
-
},
|
|
474
|
-
if (
|
|
475
|
-
const
|
|
476
|
-
document.removeEventListener(
|
|
466
|
+
function Oe(e, i, n = {}) {
|
|
467
|
+
let a = null;
|
|
468
|
+
const t = typeof n == "string" ? { ignore: n } : n, { ignore: s, event: o = "click" } = t, c = () => {
|
|
469
|
+
a = (m) => {
|
|
470
|
+
const g = m.target;
|
|
471
|
+
e.value?.contains(g) || s && g.closest(s) || i();
|
|
472
|
+
}, document.addEventListener(o, a);
|
|
473
|
+
}, d = () => {
|
|
474
|
+
if (a) {
|
|
475
|
+
const m = typeof n == "string" ? "click" : n.event || "click";
|
|
476
|
+
document.removeEventListener(m, a), a = null;
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
|
-
return
|
|
480
|
-
|
|
481
|
-
}),
|
|
482
|
-
|
|
479
|
+
return le(() => {
|
|
480
|
+
c();
|
|
481
|
+
}), Ke(() => {
|
|
482
|
+
d();
|
|
483
483
|
}), {
|
|
484
|
-
setupGlobalListeners:
|
|
485
|
-
removeGlobalListeners:
|
|
484
|
+
setupGlobalListeners: c,
|
|
485
|
+
removeGlobalListeners: d
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
const
|
|
488
|
+
const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id", "name", "placeholder", "value", "readonly", "disabled", "required", "autofocus"], je = ["disabled", "aria-expanded"], We = { class: "calendar-head" }, Ye = { class: "calendar-switch-wrap" }, Ge = { class: "calendar-drop-down" }, Ue = ["aria-expanded"], Xe = { class: "calendar-select calendar-year-wrap" }, Je = { class: "sel year" }, Qe = ["onClick"], Ze = { class: "calendar-drop-down" }, et = ["aria-expanded"], tt = { class: "calendar-select calendar-mon-wrap" }, lt = { class: "sel month" }, at = ["onClick"], st = { class: "calendar-body" }, nt = { class: "calendar-table-wrap" }, ot = { class: "calendar-tbl" }, it = ["data-date"], rt = ["aria-pressed", "onClick"], ut = { class: "calendar-footer" }, dt = { class: "calendar-btn-wrap" }, ct = /* @__PURE__ */ B({
|
|
489
489
|
__name: "KrdsDateInput",
|
|
490
490
|
props: {
|
|
491
491
|
modelValue: { default: void 0 },
|
|
@@ -505,66 +505,66 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
505
505
|
id: { default: void 0 }
|
|
506
506
|
},
|
|
507
507
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
508
|
-
setup(e, { emit:
|
|
509
|
-
const n = e,
|
|
510
|
-
currentYear:
|
|
511
|
-
currentMonth:
|
|
508
|
+
setup(e, { emit: i }) {
|
|
509
|
+
const n = e, a = i, t = K(), s = K(), o = K(!1), c = K(null), {
|
|
510
|
+
currentYear: d,
|
|
511
|
+
currentMonth: m,
|
|
512
512
|
selectedStartDate: g,
|
|
513
513
|
selectedEndDate: _,
|
|
514
|
-
yearOptions:
|
|
515
|
-
monthOptions:
|
|
516
|
-
prevMonth:
|
|
517
|
-
nextMonth:
|
|
518
|
-
handleDateSelection:
|
|
519
|
-
selectToday:
|
|
520
|
-
isDateInSelectedRange:
|
|
521
|
-
} =
|
|
522
|
-
|
|
514
|
+
yearOptions: k,
|
|
515
|
+
monthOptions: D,
|
|
516
|
+
prevMonth: p,
|
|
517
|
+
nextMonth: l,
|
|
518
|
+
handleDateSelection: h,
|
|
519
|
+
selectToday: u,
|
|
520
|
+
isDateInSelectedRange: f
|
|
521
|
+
} = Fe(n.initialYear, n.initialMonth), x = () => {
|
|
522
|
+
o.value && s.value?.focus(), o.value = !1, c.value = null;
|
|
523
523
|
};
|
|
524
|
-
|
|
525
|
-
const
|
|
526
|
-
const
|
|
527
|
-
return n.size &&
|
|
528
|
-
}),
|
|
524
|
+
Oe(t, x, ".calendar-conts");
|
|
525
|
+
const R = y(() => {
|
|
526
|
+
const b = ["krds-input", "datepicker", "cal"];
|
|
527
|
+
return n.size && b.push(n.size), n.class && b.push(n.class), b;
|
|
528
|
+
}), E = y(() => ["form-conts", "calendar-conts"]), M = y(() => ({
|
|
529
529
|
"krds-calendar-area": !0,
|
|
530
|
-
active:
|
|
531
|
-
})), z =
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
const
|
|
535
|
-
for (let
|
|
536
|
-
const
|
|
537
|
-
for (let
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
day:
|
|
541
|
-
dateString:
|
|
542
|
-
isCurrentMonth:
|
|
543
|
-
isToday:
|
|
544
|
-
isPrevMonth:
|
|
545
|
-
isNextMonth:
|
|
546
|
-
isSunday:
|
|
547
|
-
isSaturday:
|
|
548
|
-
}),
|
|
530
|
+
active: o.value
|
|
531
|
+
})), z = y(() => {
|
|
532
|
+
const b = d.value, C = m.value, $ = new Date(b, C - 1, 1), G = new Date($);
|
|
533
|
+
G.setDate(G.getDate() - $.getDay());
|
|
534
|
+
const W = [], T = new Date(G);
|
|
535
|
+
for (let ne = 0; ne < 6; ne++) {
|
|
536
|
+
const pe = [];
|
|
537
|
+
for (let he = 0; he < 7; he++) {
|
|
538
|
+
const $e = `${T.getFullYear()}.${String(T.getMonth() + 1).padStart(2, "0")}.${String(T.getDate()).padStart(2, "0")}`, me = T.getDay();
|
|
539
|
+
pe.push({
|
|
540
|
+
day: T.getDate(),
|
|
541
|
+
dateString: $e,
|
|
542
|
+
isCurrentMonth: T.getMonth() === C - 1,
|
|
543
|
+
isToday: T.toDateString() === (/* @__PURE__ */ new Date()).toDateString(),
|
|
544
|
+
isPrevMonth: T.getMonth() < C - 1 || T.getMonth() === 11 && C === 1,
|
|
545
|
+
isNextMonth: T.getMonth() > C - 1 || T.getMonth() === 0 && C === 12,
|
|
546
|
+
isSunday: me === 0,
|
|
547
|
+
isSaturday: me === 6
|
|
548
|
+
}), T.setDate(T.getDate() + 1);
|
|
549
549
|
}
|
|
550
|
-
|
|
550
|
+
W.push(pe);
|
|
551
551
|
}
|
|
552
|
-
return
|
|
553
|
-
}),
|
|
554
|
-
const
|
|
555
|
-
if (
|
|
556
|
-
const
|
|
557
|
-
|
|
552
|
+
return W;
|
|
553
|
+
}), H = (b) => {
|
|
554
|
+
const C = [];
|
|
555
|
+
if (b.isPrevMonth && C.push("old"), b.isNextMonth && C.push("new"), b.isToday && C.push("today"), b.isSunday && C.push("day-off"), n.holidays?.includes(b.dateString) && C.push("day-off"), n.eventDates?.includes(b.dateString) && C.push("day-event"), b.isCurrentMonth) {
|
|
556
|
+
const $ = f(b.dateString);
|
|
557
|
+
$.isInRange && (C.push("period"), $.isStart && C.push("start"), $.isEnd && C.push("end"));
|
|
558
558
|
}
|
|
559
|
-
return
|
|
560
|
-
},
|
|
559
|
+
return C;
|
|
560
|
+
}, V = y(() => [
|
|
561
561
|
{
|
|
562
562
|
id: "get-today",
|
|
563
563
|
label: "오늘",
|
|
564
564
|
class: "text",
|
|
565
565
|
variant: void 0,
|
|
566
566
|
size: "small",
|
|
567
|
-
handler:
|
|
567
|
+
handler: u
|
|
568
568
|
},
|
|
569
569
|
{
|
|
570
570
|
id: "cancel-btn",
|
|
@@ -580,211 +580,211 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
580
580
|
class: void 0,
|
|
581
581
|
variant: "primary",
|
|
582
582
|
size: "small",
|
|
583
|
-
handler:
|
|
583
|
+
handler: U
|
|
584
584
|
}
|
|
585
|
-
]),
|
|
586
|
-
|
|
587
|
-
},
|
|
588
|
-
|
|
589
|
-
},
|
|
590
|
-
|
|
591
|
-
},
|
|
585
|
+
]), j = (b) => {
|
|
586
|
+
c.value === b ? c.value = null : c.value = b;
|
|
587
|
+
}, Z = (b) => {
|
|
588
|
+
d.value = b, c.value = null;
|
|
589
|
+
}, se = (b) => {
|
|
590
|
+
m.value = b, c.value = null;
|
|
591
|
+
}, U = () => {
|
|
592
592
|
if (g.value) {
|
|
593
593
|
if (_.value && g.value !== _.value) {
|
|
594
|
-
const
|
|
595
|
-
|
|
594
|
+
const b = `${g.value} ~ ${_.value}`;
|
|
595
|
+
a("update:modelValue", b);
|
|
596
596
|
} else
|
|
597
|
-
|
|
597
|
+
a("update:modelValue", g.value);
|
|
598
598
|
x();
|
|
599
599
|
}
|
|
600
|
-
},
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
}, O = () => {
|
|
601
|
+
o.value = !0, c.value = null, setTimeout(() => {
|
|
602
|
+
t.value?.querySelector(".calendar-wrap")?.focus();
|
|
603
603
|
}, 50);
|
|
604
|
-
},
|
|
605
|
-
|
|
606
|
-
},
|
|
607
|
-
|
|
608
|
-
},
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
},
|
|
612
|
-
|
|
613
|
-
},
|
|
614
|
-
|
|
615
|
-
},
|
|
616
|
-
|
|
604
|
+
}, q = () => {
|
|
605
|
+
o.value ? x() : O();
|
|
606
|
+
}, ve = (b) => {
|
|
607
|
+
b.code === "Escape" && (c.value ? c.value = null : o.value && x());
|
|
608
|
+
}, ee = (b) => {
|
|
609
|
+
const C = b.target;
|
|
610
|
+
a("update:modelValue", C.value), a("input", b);
|
|
611
|
+
}, _e = (b) => {
|
|
612
|
+
a("change", b);
|
|
613
|
+
}, xe = (b) => {
|
|
614
|
+
a("focus", b);
|
|
615
|
+
}, Be = (b) => {
|
|
616
|
+
a("blur", b);
|
|
617
617
|
};
|
|
618
|
-
return (
|
|
619
|
-
|
|
620
|
-
class:
|
|
618
|
+
return (b, C) => (S(), w("div", qe, [
|
|
619
|
+
r("div", {
|
|
620
|
+
class: I(E.value)
|
|
621
621
|
}, [
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
id:
|
|
625
|
-
name:
|
|
626
|
-
class:
|
|
627
|
-
placeholder:
|
|
628
|
-
value:
|
|
629
|
-
readonly:
|
|
630
|
-
disabled:
|
|
631
|
-
required:
|
|
632
|
-
autofocus:
|
|
622
|
+
r("div", Ne, [
|
|
623
|
+
r("input", {
|
|
624
|
+
id: b.id,
|
|
625
|
+
name: b.name,
|
|
626
|
+
class: I(R.value),
|
|
627
|
+
placeholder: b.placeholder,
|
|
628
|
+
value: b.modelValue,
|
|
629
|
+
readonly: b.readonly,
|
|
630
|
+
disabled: b.disabled,
|
|
631
|
+
required: b.required,
|
|
632
|
+
autofocus: b.autofocus,
|
|
633
633
|
type: "text",
|
|
634
|
-
onInput:
|
|
635
|
-
onChange:
|
|
636
|
-
onFocus:
|
|
637
|
-
onBlur:
|
|
638
|
-
}, null, 42,
|
|
639
|
-
|
|
634
|
+
onInput: ee,
|
|
635
|
+
onChange: _e,
|
|
636
|
+
onFocus: xe,
|
|
637
|
+
onBlur: Be
|
|
638
|
+
}, null, 42, He),
|
|
639
|
+
r("button", {
|
|
640
640
|
ref_key: "datePickerButtonRef",
|
|
641
|
-
ref:
|
|
642
|
-
class:
|
|
643
|
-
disabled:
|
|
644
|
-
"aria-expanded":
|
|
641
|
+
ref: s,
|
|
642
|
+
class: I(`krds-btn ${b.size || "medium"} icon form-btn-datepicker`),
|
|
643
|
+
disabled: b.disabled,
|
|
644
|
+
"aria-expanded": o.value,
|
|
645
645
|
type: "button",
|
|
646
|
-
onClick:
|
|
647
|
-
}, [...
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
])], 10,
|
|
646
|
+
onClick: q
|
|
647
|
+
}, [...C[4] || (C[4] = [
|
|
648
|
+
r("span", { class: "sr-only" }, "달력 열기", -1),
|
|
649
|
+
r("i", { class: "svg-icon ico-calendar" }, null, -1)
|
|
650
|
+
])], 10, je)
|
|
651
651
|
]),
|
|
652
|
-
|
|
652
|
+
r("div", {
|
|
653
653
|
ref_key: "datePickerAreaRef",
|
|
654
|
-
ref:
|
|
655
|
-
class:
|
|
654
|
+
ref: t,
|
|
655
|
+
class: I(M.value)
|
|
656
656
|
}, [
|
|
657
|
-
|
|
657
|
+
Q(r("div", {
|
|
658
658
|
class: "calendar-wrap bottom",
|
|
659
659
|
"aria-label": "달력",
|
|
660
660
|
tabindex: "0",
|
|
661
|
-
onKeydown:
|
|
661
|
+
onKeydown: ve
|
|
662
662
|
}, [
|
|
663
|
-
|
|
664
|
-
|
|
663
|
+
r("div", We, [
|
|
664
|
+
r("button", {
|
|
665
665
|
type: "button",
|
|
666
666
|
class: "btn-cal-move prev",
|
|
667
|
-
onClick:
|
|
668
|
-
(
|
|
669
|
-
}, [...
|
|
670
|
-
|
|
667
|
+
onClick: C[0] || (C[0] = //@ts-ignore
|
|
668
|
+
(...$) => P(p) && P(p)(...$))
|
|
669
|
+
}, [...C[5] || (C[5] = [
|
|
670
|
+
r("span", { class: "sr-only" }, "이전 달", -1)
|
|
671
671
|
])]),
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
672
|
+
r("div", Ye, [
|
|
673
|
+
r("div", Ge, [
|
|
674
|
+
r("button", {
|
|
675
675
|
type: "button",
|
|
676
676
|
class: "btn-cal-switch year",
|
|
677
677
|
"aria-label": "연도 선택",
|
|
678
|
-
"aria-expanded":
|
|
679
|
-
onClick:
|
|
680
|
-
}, L(
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
(
|
|
684
|
-
|
|
678
|
+
"aria-expanded": c.value === "year",
|
|
679
|
+
onClick: C[1] || (C[1] = ($) => j("year"))
|
|
680
|
+
}, L(P(d)) + "년 ", 9, Ue),
|
|
681
|
+
Q(r("div", Xe, [
|
|
682
|
+
r("ul", Je, [
|
|
683
|
+
(S(!0), w(F, null, N(P(k), ($) => (S(), w("li", { key: $ }, [
|
|
684
|
+
r("button", {
|
|
685
685
|
type: "button",
|
|
686
|
-
class:
|
|
687
|
-
onClick: (
|
|
688
|
-
}, L(
|
|
686
|
+
class: I({ active: $ === P(d) }),
|
|
687
|
+
onClick: (G) => Z($)
|
|
688
|
+
}, L($) + "년", 11, Qe)
|
|
689
689
|
]))), 128))
|
|
690
690
|
])
|
|
691
691
|
], 512), [
|
|
692
|
-
[
|
|
692
|
+
[te, c.value === "year"]
|
|
693
693
|
])
|
|
694
694
|
]),
|
|
695
|
-
|
|
696
|
-
|
|
695
|
+
r("div", Ze, [
|
|
696
|
+
r("button", {
|
|
697
697
|
type: "button",
|
|
698
698
|
class: "btn-cal-switch month",
|
|
699
699
|
"aria-label": "월 선택",
|
|
700
|
-
"aria-expanded":
|
|
701
|
-
onClick:
|
|
702
|
-
}, L(
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
(
|
|
706
|
-
|
|
700
|
+
"aria-expanded": c.value === "month",
|
|
701
|
+
onClick: C[2] || (C[2] = ($) => j("month"))
|
|
702
|
+
}, L(P(m).toString().padStart(2, "0")) + "월 ", 9, et),
|
|
703
|
+
Q(r("div", tt, [
|
|
704
|
+
r("ul", lt, [
|
|
705
|
+
(S(!0), w(F, null, N(P(D), ($) => (S(), w("li", { key: $ }, [
|
|
706
|
+
r("button", {
|
|
707
707
|
type: "button",
|
|
708
|
-
class:
|
|
709
|
-
onClick: (
|
|
710
|
-
}, L(
|
|
708
|
+
class: I({ active: $ === P(m) }),
|
|
709
|
+
onClick: (G) => se($)
|
|
710
|
+
}, L($.toString().padStart(2, "0")) + "월 ", 11, at)
|
|
711
711
|
]))), 128))
|
|
712
712
|
])
|
|
713
713
|
], 512), [
|
|
714
|
-
[
|
|
714
|
+
[te, c.value === "month"]
|
|
715
715
|
])
|
|
716
716
|
])
|
|
717
717
|
]),
|
|
718
|
-
|
|
718
|
+
r("button", {
|
|
719
719
|
type: "button",
|
|
720
720
|
class: "btn-cal-move next",
|
|
721
|
-
onClick:
|
|
722
|
-
(
|
|
723
|
-
}, [...
|
|
724
|
-
|
|
721
|
+
onClick: C[3] || (C[3] = //@ts-ignore
|
|
722
|
+
(...$) => P(l) && P(l)(...$))
|
|
723
|
+
}, [...C[6] || (C[6] = [
|
|
724
|
+
r("span", { class: "sr-only" }, "다음 달", -1)
|
|
725
725
|
])])
|
|
726
726
|
]),
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
727
|
+
r("div", st, [
|
|
728
|
+
r("div", nt, [
|
|
729
|
+
r("table", ot, [
|
|
730
|
+
r("caption", null, L(P(d)) + "년 " + L(P(m).toString().padStart(2, "0")) + "월", 1),
|
|
731
|
+
C[7] || (C[7] = r("thead", null, [
|
|
732
|
+
r("tr", null, [
|
|
733
|
+
r("th", null, "일"),
|
|
734
|
+
r("th", null, "월"),
|
|
735
|
+
r("th", null, "화"),
|
|
736
|
+
r("th", null, "수"),
|
|
737
|
+
r("th", null, "목"),
|
|
738
|
+
r("th", null, "금"),
|
|
739
|
+
r("th", null, "토")
|
|
740
740
|
])
|
|
741
741
|
], -1)),
|
|
742
|
-
|
|
743
|
-
(
|
|
744
|
-
(
|
|
745
|
-
key:
|
|
746
|
-
class:
|
|
747
|
-
"data-date":
|
|
742
|
+
r("tbody", null, [
|
|
743
|
+
(S(!0), w(F, null, N(z.value, ($, G) => (S(), w("tr", { key: G }, [
|
|
744
|
+
(S(!0), w(F, null, N($, (W, T) => (S(), w("td", {
|
|
745
|
+
key: T,
|
|
746
|
+
class: I(H(W)),
|
|
747
|
+
"data-date": W.dateString
|
|
748
748
|
}, [
|
|
749
|
-
|
|
749
|
+
r("button", {
|
|
750
750
|
type: "button",
|
|
751
751
|
class: "btn-set-date",
|
|
752
|
-
"aria-pressed":
|
|
753
|
-
onClick: (
|
|
752
|
+
"aria-pressed": P(f)(W.dateString).isInRange ? "true" : "false",
|
|
753
|
+
onClick: (ne) => P(h)(W.dateString)
|
|
754
754
|
}, [
|
|
755
|
-
|
|
756
|
-
], 8,
|
|
757
|
-
], 10,
|
|
755
|
+
r("span", null, L(W.day), 1)
|
|
756
|
+
], 8, rt)
|
|
757
|
+
], 10, it))), 128))
|
|
758
758
|
]))), 128))
|
|
759
759
|
])
|
|
760
760
|
])
|
|
761
761
|
])
|
|
762
762
|
]),
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
(
|
|
766
|
-
id:
|
|
767
|
-
key:
|
|
768
|
-
class:
|
|
769
|
-
variant:
|
|
770
|
-
size:
|
|
771
|
-
onClick:
|
|
763
|
+
r("div", ut, [
|
|
764
|
+
r("div", dt, [
|
|
765
|
+
(S(!0), w(F, null, N(V.value, ($) => (S(), oe(P(Se), {
|
|
766
|
+
id: $.id,
|
|
767
|
+
key: $.id,
|
|
768
|
+
class: I($.class),
|
|
769
|
+
variant: $.variant,
|
|
770
|
+
size: $.size,
|
|
771
|
+
onClick: $.handler
|
|
772
772
|
}, {
|
|
773
|
-
default:
|
|
774
|
-
|
|
773
|
+
default: ie(() => [
|
|
774
|
+
A(L($.label), 1)
|
|
775
775
|
]),
|
|
776
776
|
_: 2
|
|
777
777
|
}, 1032, ["id", "class", "variant", "size", "onClick"]))), 128))
|
|
778
778
|
])
|
|
779
779
|
])
|
|
780
780
|
], 544), [
|
|
781
|
-
[
|
|
781
|
+
[te, o.value]
|
|
782
782
|
])
|
|
783
783
|
], 2)
|
|
784
784
|
], 2)
|
|
785
785
|
]));
|
|
786
786
|
}
|
|
787
|
-
}),
|
|
787
|
+
}), ft = B({
|
|
788
788
|
name: "KrdsTextarea",
|
|
789
789
|
props: {
|
|
790
790
|
modelValue: {
|
|
@@ -858,38 +858,38 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
858
858
|
}
|
|
859
859
|
},
|
|
860
860
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup"],
|
|
861
|
-
setup(e, { emit:
|
|
862
|
-
const n =
|
|
863
|
-
|
|
861
|
+
setup(e, { emit: i }) {
|
|
862
|
+
const n = K(0);
|
|
863
|
+
ue(
|
|
864
864
|
() => e.modelValue,
|
|
865
|
-
(
|
|
866
|
-
n.value = (
|
|
865
|
+
(l) => {
|
|
866
|
+
n.value = (l || "").length;
|
|
867
867
|
},
|
|
868
868
|
{ immediate: !0 }
|
|
869
869
|
);
|
|
870
|
-
const
|
|
871
|
-
const
|
|
872
|
-
return e.size &&
|
|
873
|
-
}),
|
|
874
|
-
const
|
|
875
|
-
return e.resize && (
|
|
876
|
-
}),
|
|
877
|
-
const
|
|
878
|
-
n.value =
|
|
879
|
-
},
|
|
880
|
-
|
|
881
|
-
},
|
|
882
|
-
|
|
883
|
-
},
|
|
884
|
-
|
|
885
|
-
},
|
|
886
|
-
|
|
887
|
-
}, g = (
|
|
888
|
-
|
|
889
|
-
}, _ =
|
|
890
|
-
const
|
|
891
|
-
class:
|
|
892
|
-
style:
|
|
870
|
+
const a = y(() => {
|
|
871
|
+
const l = ["krds-input"];
|
|
872
|
+
return e.size && l.push(e.size), e.class && l.push(e.class), l;
|
|
873
|
+
}), t = y(() => {
|
|
874
|
+
const l = {};
|
|
875
|
+
return e.resize && (l.resize = e.resize), l;
|
|
876
|
+
}), s = (l) => {
|
|
877
|
+
const u = l.target.value;
|
|
878
|
+
n.value = u.length, i("update:modelValue", u), i("input", l);
|
|
879
|
+
}, o = (l) => {
|
|
880
|
+
i("change", l);
|
|
881
|
+
}, c = (l) => {
|
|
882
|
+
i("focus", l);
|
|
883
|
+
}, d = (l) => {
|
|
884
|
+
i("blur", l);
|
|
885
|
+
}, m = (l) => {
|
|
886
|
+
i("keydown", l);
|
|
887
|
+
}, g = (l) => {
|
|
888
|
+
i("keyup", l);
|
|
889
|
+
}, _ = y(() => {
|
|
890
|
+
const l = {
|
|
891
|
+
class: a.value,
|
|
892
|
+
style: t.value,
|
|
893
893
|
value: e.modelValue,
|
|
894
894
|
placeholder: e.placeholder,
|
|
895
895
|
name: e.name,
|
|
@@ -900,33 +900,33 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
900
900
|
autofocus: e.autofocus,
|
|
901
901
|
rows: e.rows,
|
|
902
902
|
cols: e.cols,
|
|
903
|
-
onInput:
|
|
904
|
-
onChange:
|
|
905
|
-
onFocus:
|
|
906
|
-
onBlur:
|
|
907
|
-
onKeydown:
|
|
903
|
+
onInput: s,
|
|
904
|
+
onChange: o,
|
|
905
|
+
onFocus: c,
|
|
906
|
+
onBlur: d,
|
|
907
|
+
onKeydown: m,
|
|
908
908
|
onKeyup: g
|
|
909
909
|
};
|
|
910
|
-
return e.maxlength !== void 0 && (
|
|
911
|
-
}),
|
|
910
|
+
return e.maxlength !== void 0 && (l.maxlength = e.maxlength), e.minlength !== void 0 && (l.minlength = e.minlength), l;
|
|
911
|
+
}), k = y(() => ["form-conts"]), D = y(() => ["textarea-wrap"]), p = y(() => {
|
|
912
912
|
if (!e.showCount) return null;
|
|
913
|
-
const
|
|
913
|
+
const l = n.value, h = e.maxlength;
|
|
914
914
|
return {
|
|
915
|
-
current:
|
|
916
|
-
max:
|
|
915
|
+
current: l,
|
|
916
|
+
max: h || ""
|
|
917
917
|
};
|
|
918
918
|
});
|
|
919
919
|
return () => {
|
|
920
|
-
const
|
|
921
|
-
return
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
920
|
+
const l = [v("textarea", _.value)];
|
|
921
|
+
return p.value && l.push(
|
|
922
|
+
v("p", { class: "textarea-count" }, [
|
|
923
|
+
v("span", { class: "count-now" }, p.value.current),
|
|
924
|
+
v("span", { class: "count-total" }, p.value.max ? `/${p.value.max}` : "")
|
|
925
925
|
])
|
|
926
|
-
),
|
|
926
|
+
), v("div", { class: k.value }, [v("div", { class: D.value }, l)]);
|
|
927
927
|
};
|
|
928
928
|
}
|
|
929
|
-
}),
|
|
929
|
+
}), vt = B({
|
|
930
930
|
name: "KrdsSelect",
|
|
931
931
|
props: {
|
|
932
932
|
modelValue: {
|
|
@@ -975,35 +975,35 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
975
975
|
}
|
|
976
976
|
},
|
|
977
977
|
emits: ["update:modelValue", "focus", "blur"],
|
|
978
|
-
setup(e, { emit:
|
|
979
|
-
const
|
|
978
|
+
setup(e, { emit: i, slots: n }) {
|
|
979
|
+
const a = y(() => {
|
|
980
980
|
const g = [];
|
|
981
981
|
return e.sort ? g.push("krds-form-select-sort") : g.push("krds-form-select"), e.size && g.push(e.size), e.class && g.push(e.class), g;
|
|
982
|
-
}),
|
|
983
|
-
const _ = g.target,
|
|
984
|
-
|
|
985
|
-
},
|
|
986
|
-
|
|
987
|
-
},
|
|
988
|
-
|
|
989
|
-
},
|
|
990
|
-
class:
|
|
982
|
+
}), t = (g) => {
|
|
983
|
+
const _ = g.target, k = _.value === "" ? null : _.value;
|
|
984
|
+
i("update:modelValue", k);
|
|
985
|
+
}, s = (g) => {
|
|
986
|
+
i("focus", g);
|
|
987
|
+
}, o = (g) => {
|
|
988
|
+
i("blur", g);
|
|
989
|
+
}, c = y(() => ({
|
|
990
|
+
class: a.value,
|
|
991
991
|
value: e.modelValue ?? "",
|
|
992
992
|
title: e.title || e.placeholder,
|
|
993
993
|
name: e.name,
|
|
994
994
|
id: e.id,
|
|
995
995
|
disabled: e.disabled || e.readonly,
|
|
996
|
-
onChange:
|
|
997
|
-
onFocus:
|
|
998
|
-
onBlur:
|
|
999
|
-
})),
|
|
996
|
+
onChange: t,
|
|
997
|
+
onFocus: s,
|
|
998
|
+
onBlur: o
|
|
999
|
+
})), d = y(() => {
|
|
1000
1000
|
const g = ["form-conts"];
|
|
1001
1001
|
return e.state !== "default" && g.push(`is-${e.state}`), g;
|
|
1002
|
-
}),
|
|
1002
|
+
}), m = () => {
|
|
1003
1003
|
const g = [];
|
|
1004
|
-
return e.placeholder && !e.modelValue && g.push(
|
|
1004
|
+
return e.placeholder && !e.modelValue && g.push(v("option", { value: "", disabled: !0, selected: !0 }, e.placeholder)), e.options && e.options.length > 0 && e.options.forEach((_) => {
|
|
1005
1005
|
g.push(
|
|
1006
|
-
|
|
1006
|
+
v(
|
|
1007
1007
|
"option",
|
|
1008
1008
|
{
|
|
1009
1009
|
value: _.value,
|
|
@@ -1016,11 +1016,11 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
1016
1016
|
}), n.default && g.push(...n.default()), g;
|
|
1017
1017
|
};
|
|
1018
1018
|
return () => {
|
|
1019
|
-
const g =
|
|
1020
|
-
return e.sort ? g :
|
|
1019
|
+
const g = v("select", c.value, m());
|
|
1020
|
+
return e.sort ? g : v("div", { class: d.value }, [g]);
|
|
1021
1021
|
};
|
|
1022
1022
|
}
|
|
1023
|
-
}),
|
|
1023
|
+
}), pt = B({
|
|
1024
1024
|
name: "KrdsFileUpload",
|
|
1025
1025
|
props: {
|
|
1026
1026
|
modelValue: {
|
|
@@ -1123,15 +1123,15 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
1123
1123
|
"download",
|
|
1124
1124
|
"preview"
|
|
1125
1125
|
],
|
|
1126
|
-
setup(e, { emit:
|
|
1127
|
-
|
|
1128
|
-
const
|
|
1129
|
-
return e.class &&
|
|
1126
|
+
setup(e, { emit: i }) {
|
|
1127
|
+
K(!1), y(() => {
|
|
1128
|
+
const a = ["krds-file-upload", "line"];
|
|
1129
|
+
return e.class && a.push(e.class), a;
|
|
1130
1130
|
});
|
|
1131
|
-
const n =
|
|
1132
|
-
return
|
|
1131
|
+
const n = y(() => e.modelValue?.length || 0);
|
|
1132
|
+
return y(() => !e.disabled && n.value < e.maxFiles), () => null;
|
|
1133
1133
|
}
|
|
1134
|
-
}),
|
|
1134
|
+
}), ht = B({
|
|
1135
1135
|
name: "KrdsBadge",
|
|
1136
1136
|
props: {
|
|
1137
1137
|
type: {
|
|
@@ -1156,27 +1156,27 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
1156
1156
|
}
|
|
1157
1157
|
},
|
|
1158
1158
|
emits: ["click"],
|
|
1159
|
-
setup(e, { emit:
|
|
1160
|
-
const
|
|
1161
|
-
const
|
|
1162
|
-
return
|
|
1163
|
-
}),
|
|
1164
|
-
|
|
1159
|
+
setup(e, { emit: i, slots: n }) {
|
|
1160
|
+
const a = y(() => {
|
|
1161
|
+
const s = ["krds-badge"];
|
|
1162
|
+
return s.push(`${e.type}-${e.color}`), e.size && s.push(e.size), e.number && s.push("number"), e.class && s.push(e.class), s;
|
|
1163
|
+
}), t = (s) => {
|
|
1164
|
+
i("click", s);
|
|
1165
1165
|
};
|
|
1166
|
-
return () =>
|
|
1166
|
+
return () => v(
|
|
1167
1167
|
"span",
|
|
1168
1168
|
{
|
|
1169
1169
|
type: e.type,
|
|
1170
1170
|
color: e.color,
|
|
1171
1171
|
size: e.size,
|
|
1172
1172
|
number: e.number,
|
|
1173
|
-
class:
|
|
1174
|
-
onClick:
|
|
1173
|
+
class: a.value,
|
|
1174
|
+
onClick: t
|
|
1175
1175
|
},
|
|
1176
1176
|
n.default?.()
|
|
1177
1177
|
);
|
|
1178
1178
|
}
|
|
1179
|
-
}),
|
|
1179
|
+
}), mt = B({
|
|
1180
1180
|
name: "KrdsTag",
|
|
1181
1181
|
props: {
|
|
1182
1182
|
link: {
|
|
@@ -1201,40 +1201,40 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
1201
1201
|
}
|
|
1202
1202
|
},
|
|
1203
1203
|
emits: ["remove"],
|
|
1204
|
-
setup(e, { emit:
|
|
1205
|
-
const
|
|
1206
|
-
const
|
|
1207
|
-
return e.link &&
|
|
1208
|
-
}),
|
|
1209
|
-
|
|
1210
|
-
},
|
|
1204
|
+
setup(e, { emit: i, slots: n }) {
|
|
1205
|
+
const a = y(() => {
|
|
1206
|
+
const o = ["krds-btn-tag"];
|
|
1207
|
+
return e.link && o.push("link"), e.class && o.push(e.class), o;
|
|
1208
|
+
}), t = (o) => {
|
|
1209
|
+
i("remove", o);
|
|
1210
|
+
}, s = () => v(
|
|
1211
1211
|
"button",
|
|
1212
1212
|
{
|
|
1213
1213
|
type: "button",
|
|
1214
1214
|
class: "btn-delete",
|
|
1215
|
-
onClick:
|
|
1215
|
+
onClick: t
|
|
1216
1216
|
},
|
|
1217
|
-
[
|
|
1217
|
+
[v("span", { class: "sr-only" }, "삭제")]
|
|
1218
1218
|
);
|
|
1219
1219
|
return () => {
|
|
1220
|
-
const
|
|
1221
|
-
if (
|
|
1222
|
-
const
|
|
1220
|
+
const o = [], c = n.default?.();
|
|
1221
|
+
if (c && o.push(c), e.link || o.push(s()), e.link) {
|
|
1222
|
+
const d = {
|
|
1223
1223
|
href: e.href,
|
|
1224
|
-
class:
|
|
1224
|
+
class: a.value
|
|
1225
1225
|
};
|
|
1226
|
-
return e.target && (
|
|
1226
|
+
return e.target && (d.target = e.target), e.rel && (d.rel = e.rel), v("a", d, o);
|
|
1227
1227
|
}
|
|
1228
|
-
return
|
|
1228
|
+
return v(
|
|
1229
1229
|
"span",
|
|
1230
1230
|
{
|
|
1231
|
-
class:
|
|
1231
|
+
class: a.value
|
|
1232
1232
|
},
|
|
1233
|
-
|
|
1233
|
+
o
|
|
1234
1234
|
);
|
|
1235
1235
|
};
|
|
1236
1236
|
}
|
|
1237
|
-
}),
|
|
1237
|
+
}), yt = B({
|
|
1238
1238
|
name: "KrdsTagGroup",
|
|
1239
1239
|
props: {
|
|
1240
1240
|
size: {
|
|
@@ -1246,20 +1246,20 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
1246
1246
|
default: void 0
|
|
1247
1247
|
}
|
|
1248
1248
|
},
|
|
1249
|
-
setup(e, { slots:
|
|
1250
|
-
const n =
|
|
1251
|
-
const
|
|
1252
|
-
return e.size &&
|
|
1249
|
+
setup(e, { slots: i }) {
|
|
1250
|
+
const n = y(() => {
|
|
1251
|
+
const a = ["krds-tag-wrap"];
|
|
1252
|
+
return e.size && a.push(e.size), e.class && a.push(e.class), a;
|
|
1253
1253
|
});
|
|
1254
|
-
return () =>
|
|
1254
|
+
return () => v(
|
|
1255
1255
|
"div",
|
|
1256
1256
|
{
|
|
1257
1257
|
class: n.value
|
|
1258
1258
|
},
|
|
1259
|
-
|
|
1259
|
+
i.default?.()
|
|
1260
1260
|
);
|
|
1261
1261
|
}
|
|
1262
|
-
}),
|
|
1262
|
+
}), gt = B({
|
|
1263
1263
|
name: "KrdsMasthead",
|
|
1264
1264
|
props: {
|
|
1265
1265
|
class: {
|
|
@@ -1268,40 +1268,40 @@ const Ee = { class: "form-conts" }, Oe = { class: "calendar-input" }, Ae = ["id"
|
|
|
1268
1268
|
}
|
|
1269
1269
|
},
|
|
1270
1270
|
emits: ["click"],
|
|
1271
|
-
setup(e, { emit:
|
|
1272
|
-
const
|
|
1273
|
-
const
|
|
1274
|
-
return e.class &&
|
|
1275
|
-
}),
|
|
1276
|
-
|
|
1271
|
+
setup(e, { emit: i, slots: n }) {
|
|
1272
|
+
const a = y(() => {
|
|
1273
|
+
const s = [""];
|
|
1274
|
+
return e.class && s.push(e.class), s;
|
|
1275
|
+
}), t = (s) => {
|
|
1276
|
+
i("click", s);
|
|
1277
1277
|
};
|
|
1278
|
-
return () =>
|
|
1278
|
+
return () => v(
|
|
1279
1279
|
"div",
|
|
1280
1280
|
{
|
|
1281
1281
|
id: "krds-masthead",
|
|
1282
|
-
class:
|
|
1283
|
-
onClick:
|
|
1282
|
+
class: a.value,
|
|
1283
|
+
onClick: t
|
|
1284
1284
|
},
|
|
1285
1285
|
[
|
|
1286
|
-
|
|
1287
|
-
|
|
1286
|
+
v("div", { class: "toggle-wrap" }, [
|
|
1287
|
+
v("div", { class: "toggle-head" }, [v("div", { class: "inner" }, [v("span", { class: "nuri-txt" }, n.default?.())])])
|
|
1288
1288
|
])
|
|
1289
1289
|
]
|
|
1290
1290
|
);
|
|
1291
1291
|
}
|
|
1292
1292
|
});
|
|
1293
|
-
let
|
|
1294
|
-
function
|
|
1295
|
-
return `${e}-${++
|
|
1293
|
+
let kt = 0;
|
|
1294
|
+
function de(e = "krds") {
|
|
1295
|
+
return `${e}-${++kt}`;
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1298
|
-
const e = Date.now().toString(36).slice(-4),
|
|
1299
|
-
return `${e}${
|
|
1297
|
+
function Sl() {
|
|
1298
|
+
const e = Date.now().toString(36).slice(-4), i = Math.random().toString(36).substring(2, 5);
|
|
1299
|
+
return `${e}${i}`;
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1301
|
+
function ce(...e) {
|
|
1302
1302
|
return e.filter(Boolean).join(" ");
|
|
1303
1303
|
}
|
|
1304
|
-
const
|
|
1304
|
+
const bt = B({
|
|
1305
1305
|
name: "KrdsToggleSwitch",
|
|
1306
1306
|
props: {
|
|
1307
1307
|
modelValue: {
|
|
@@ -1343,40 +1343,40 @@ const mt = w({
|
|
|
1343
1343
|
}
|
|
1344
1344
|
},
|
|
1345
1345
|
emits: ["update:modelValue", "change"],
|
|
1346
|
-
setup(e, { emit:
|
|
1347
|
-
const
|
|
1346
|
+
setup(e, { emit: i, attrs: n }) {
|
|
1347
|
+
const a = y(() => e.modelValue), t = y(() => ce("krds-form-toggle-switch", e.size, e.class)), s = (c) => {
|
|
1348
1348
|
if (e.disabled)
|
|
1349
1349
|
return;
|
|
1350
|
-
const
|
|
1351
|
-
|
|
1352
|
-
},
|
|
1353
|
-
return () =>
|
|
1350
|
+
const m = c.target.checked;
|
|
1351
|
+
i("update:modelValue", m), i("change", m);
|
|
1352
|
+
}, o = y(() => e.id || de("toggle-switch"));
|
|
1353
|
+
return () => v(
|
|
1354
1354
|
"div",
|
|
1355
1355
|
{
|
|
1356
|
-
class:
|
|
1356
|
+
class: t.value
|
|
1357
1357
|
},
|
|
1358
1358
|
[
|
|
1359
|
-
|
|
1359
|
+
v("input", {
|
|
1360
1360
|
type: "checkbox",
|
|
1361
|
-
id:
|
|
1361
|
+
id: o.value,
|
|
1362
1362
|
name: e.name,
|
|
1363
|
-
checked:
|
|
1363
|
+
checked: a.value,
|
|
1364
1364
|
disabled: e.disabled,
|
|
1365
|
-
onChange:
|
|
1365
|
+
onChange: s,
|
|
1366
1366
|
...n
|
|
1367
1367
|
}),
|
|
1368
|
-
|
|
1368
|
+
v(
|
|
1369
1369
|
"label",
|
|
1370
1370
|
{
|
|
1371
|
-
for:
|
|
1371
|
+
for: o.value
|
|
1372
1372
|
},
|
|
1373
1373
|
[
|
|
1374
|
-
|
|
1374
|
+
v(
|
|
1375
1375
|
"span",
|
|
1376
1376
|
{
|
|
1377
1377
|
class: "switch-toggle"
|
|
1378
1378
|
},
|
|
1379
|
-
[
|
|
1379
|
+
[v("i")]
|
|
1380
1380
|
),
|
|
1381
1381
|
e.label || ""
|
|
1382
1382
|
]
|
|
@@ -1384,7 +1384,7 @@ const mt = w({
|
|
|
1384
1384
|
]
|
|
1385
1385
|
);
|
|
1386
1386
|
}
|
|
1387
|
-
}),
|
|
1387
|
+
}), St = B({
|
|
1388
1388
|
name: "KrdsCheckArea",
|
|
1389
1389
|
props: {
|
|
1390
1390
|
class: {
|
|
@@ -1396,19 +1396,19 @@ const mt = w({
|
|
|
1396
1396
|
default: !1
|
|
1397
1397
|
}
|
|
1398
1398
|
},
|
|
1399
|
-
setup(e, { slots:
|
|
1399
|
+
setup(e, { slots: i }) {
|
|
1400
1400
|
return () => {
|
|
1401
1401
|
const n = ["krds-check-area"];
|
|
1402
|
-
return e.column && n.push("chk-column"), e.class && n.push(e.class),
|
|
1402
|
+
return e.column && n.push("chk-column"), e.class && n.push(e.class), v(
|
|
1403
1403
|
"div",
|
|
1404
1404
|
{
|
|
1405
1405
|
class: n
|
|
1406
1406
|
},
|
|
1407
|
-
|
|
1407
|
+
i.default?.()
|
|
1408
1408
|
);
|
|
1409
1409
|
};
|
|
1410
1410
|
}
|
|
1411
|
-
}),
|
|
1411
|
+
}), wt = B({
|
|
1412
1412
|
name: "KrdsCheckbox",
|
|
1413
1413
|
props: {
|
|
1414
1414
|
modelValue: {
|
|
@@ -1439,44 +1439,44 @@ const mt = w({
|
|
|
1439
1439
|
},
|
|
1440
1440
|
emits: ["update:modelValue"],
|
|
1441
1441
|
slots: Object,
|
|
1442
|
-
setup(e, { emit:
|
|
1443
|
-
const
|
|
1444
|
-
const
|
|
1445
|
-
return
|
|
1446
|
-
}),
|
|
1442
|
+
setup(e, { emit: i, attrs: n, slots: a }) {
|
|
1443
|
+
const t = y(() => e.modelValue), s = y(() => {
|
|
1444
|
+
const d = e.chip ? "krds-form-chip" : "krds-form-check";
|
|
1445
|
+
return ce(d, e.size, e.class);
|
|
1446
|
+
}), o = (d) => {
|
|
1447
1447
|
if (e.disabled)
|
|
1448
1448
|
return;
|
|
1449
|
-
const g =
|
|
1450
|
-
|
|
1451
|
-
},
|
|
1449
|
+
const g = d.target.checked;
|
|
1450
|
+
i("update:modelValue", g);
|
|
1451
|
+
}, c = y(() => e.id || de("checkbox"));
|
|
1452
1452
|
return () => {
|
|
1453
|
-
const
|
|
1454
|
-
|
|
1453
|
+
const d = [
|
|
1454
|
+
v("input", {
|
|
1455
1455
|
type: "checkbox",
|
|
1456
|
-
id:
|
|
1457
|
-
checked:
|
|
1456
|
+
id: c.value,
|
|
1457
|
+
checked: t.value,
|
|
1458
1458
|
disabled: e.disabled,
|
|
1459
|
-
onChange:
|
|
1459
|
+
onChange: o,
|
|
1460
1460
|
...n
|
|
1461
1461
|
}),
|
|
1462
|
-
|
|
1462
|
+
v(
|
|
1463
1463
|
"label",
|
|
1464
1464
|
{
|
|
1465
|
-
for:
|
|
1465
|
+
for: c.value
|
|
1466
1466
|
},
|
|
1467
|
-
|
|
1467
|
+
a.default?.()
|
|
1468
1468
|
)
|
|
1469
1469
|
];
|
|
1470
|
-
return
|
|
1470
|
+
return a.description && !e.chip && d.push(v("div", { class: "krds-form-check-cnt" }, v("p", { class: "krds-form-check-p" }, a.description()))), v(
|
|
1471
1471
|
"div",
|
|
1472
1472
|
{
|
|
1473
|
-
class:
|
|
1473
|
+
class: s.value
|
|
1474
1474
|
},
|
|
1475
|
-
|
|
1475
|
+
d
|
|
1476
1476
|
);
|
|
1477
1477
|
};
|
|
1478
1478
|
}
|
|
1479
|
-
}),
|
|
1479
|
+
}), Ct = B({
|
|
1480
1480
|
name: "KrdsRadio",
|
|
1481
1481
|
props: {
|
|
1482
1482
|
modelValue: {
|
|
@@ -1515,45 +1515,45 @@ const mt = w({
|
|
|
1515
1515
|
},
|
|
1516
1516
|
emits: ["update:modelValue"],
|
|
1517
1517
|
slots: Object,
|
|
1518
|
-
setup(e, { emit:
|
|
1519
|
-
const
|
|
1520
|
-
const
|
|
1521
|
-
return
|
|
1522
|
-
}),
|
|
1518
|
+
setup(e, { emit: i, attrs: n, slots: a }) {
|
|
1519
|
+
const t = y(() => e.modelValue === e.value), s = y(() => {
|
|
1520
|
+
const m = e.chip ? "krds-form-chip" : "krds-form-check";
|
|
1521
|
+
return ce(m, e.size, e.class);
|
|
1522
|
+
}), o = (m) => {
|
|
1523
1523
|
if (e.disabled)
|
|
1524
1524
|
return;
|
|
1525
|
-
|
|
1526
|
-
},
|
|
1525
|
+
m.target.checked && i("update:modelValue", e.value);
|
|
1526
|
+
}, c = y(() => e.id || de("radio")), d = y(() => e.name);
|
|
1527
1527
|
return () => {
|
|
1528
|
-
const
|
|
1529
|
-
|
|
1528
|
+
const m = [
|
|
1529
|
+
v("input", {
|
|
1530
1530
|
type: "radio",
|
|
1531
|
-
id:
|
|
1532
|
-
name:
|
|
1531
|
+
id: c.value,
|
|
1532
|
+
name: d.value,
|
|
1533
1533
|
value: String(e.value),
|
|
1534
|
-
checked:
|
|
1534
|
+
checked: t.value,
|
|
1535
1535
|
disabled: e.disabled,
|
|
1536
|
-
onChange:
|
|
1536
|
+
onChange: o,
|
|
1537
1537
|
...n
|
|
1538
1538
|
}),
|
|
1539
|
-
|
|
1539
|
+
v(
|
|
1540
1540
|
"label",
|
|
1541
1541
|
{
|
|
1542
|
-
for:
|
|
1542
|
+
for: c.value
|
|
1543
1543
|
},
|
|
1544
|
-
|
|
1544
|
+
a.default?.()
|
|
1545
1545
|
)
|
|
1546
1546
|
];
|
|
1547
|
-
return
|
|
1547
|
+
return a.description && !e.chip && m.push(v("div", { class: "krds-form-check-cnt" }, v("p", { class: "krds-form-check-p" }, a.description()))), v(
|
|
1548
1548
|
"div",
|
|
1549
1549
|
{
|
|
1550
|
-
class:
|
|
1550
|
+
class: s.value
|
|
1551
1551
|
},
|
|
1552
|
-
|
|
1552
|
+
m
|
|
1553
1553
|
);
|
|
1554
1554
|
};
|
|
1555
1555
|
}
|
|
1556
|
-
}),
|
|
1556
|
+
}), _t = B({
|
|
1557
1557
|
name: "KrdsStepIndicator",
|
|
1558
1558
|
props: {
|
|
1559
1559
|
modelValue: {
|
|
@@ -1566,30 +1566,30 @@ const mt = w({
|
|
|
1566
1566
|
}
|
|
1567
1567
|
},
|
|
1568
1568
|
emits: ["update:modelValue"],
|
|
1569
|
-
setup(e, { slots:
|
|
1570
|
-
const n =
|
|
1571
|
-
const
|
|
1572
|
-
return e.class &&
|
|
1573
|
-
}),
|
|
1574
|
-
const
|
|
1575
|
-
return
|
|
1576
|
-
},
|
|
1577
|
-
|
|
1578
|
-
},
|
|
1569
|
+
setup(e, { slots: i }) {
|
|
1570
|
+
const n = y(() => {
|
|
1571
|
+
const c = ["krds-step-wrap"];
|
|
1572
|
+
return e.class && c.push(e.class), c;
|
|
1573
|
+
}), a = (c) => {
|
|
1574
|
+
const d = e.modelValue || 0;
|
|
1575
|
+
return c < d ? "done" : c === d ? "active" : "pending";
|
|
1576
|
+
}, t = K(0), s = () => {
|
|
1577
|
+
t.value = 0;
|
|
1578
|
+
}, o = () => t.value++;
|
|
1579
1579
|
return De("stepIndicator", {
|
|
1580
|
-
activeStep:
|
|
1581
|
-
getStepStatus:
|
|
1582
|
-
getNextStepIndex:
|
|
1583
|
-
resetStepIndex:
|
|
1584
|
-
}), () => (
|
|
1580
|
+
activeStep: y(() => e.modelValue || 0),
|
|
1581
|
+
getStepStatus: a,
|
|
1582
|
+
getNextStepIndex: o,
|
|
1583
|
+
resetStepIndex: s
|
|
1584
|
+
}), () => (s(), v(
|
|
1585
1585
|
"ol",
|
|
1586
1586
|
{
|
|
1587
1587
|
class: n.value
|
|
1588
1588
|
},
|
|
1589
|
-
|
|
1589
|
+
i.default?.()
|
|
1590
1590
|
));
|
|
1591
1591
|
}
|
|
1592
|
-
}),
|
|
1592
|
+
}), xt = B({
|
|
1593
1593
|
name: "KrdsStep",
|
|
1594
1594
|
props: {
|
|
1595
1595
|
step: {
|
|
@@ -1610,29 +1610,29 @@ const mt = w({
|
|
|
1610
1610
|
}
|
|
1611
1611
|
},
|
|
1612
1612
|
emits: ["click"],
|
|
1613
|
-
setup(e, { emit:
|
|
1614
|
-
const
|
|
1615
|
-
const
|
|
1616
|
-
return e.class &&
|
|
1617
|
-
}),
|
|
1618
|
-
|
|
1613
|
+
setup(e, { emit: i, slots: n }) {
|
|
1614
|
+
const a = Ve("stepIndicator"), t = a ? a.getNextStepIndex() : -1, s = y(() => e.status ? e.status : a && t >= 0 ? a.getStepStatus(t) : "pending"), o = y(() => {
|
|
1615
|
+
const d = [s.value];
|
|
1616
|
+
return e.class && d.push(e.class), d;
|
|
1617
|
+
}), c = (d) => {
|
|
1618
|
+
i("click", d, e.step);
|
|
1619
1619
|
};
|
|
1620
1620
|
return () => {
|
|
1621
|
-
const
|
|
1622
|
-
return
|
|
1621
|
+
const d = s.value === "active";
|
|
1622
|
+
return v(
|
|
1623
1623
|
"li",
|
|
1624
1624
|
{
|
|
1625
|
-
class:
|
|
1626
|
-
onClick:
|
|
1625
|
+
class: o.value,
|
|
1626
|
+
onClick: c
|
|
1627
1627
|
},
|
|
1628
1628
|
[
|
|
1629
|
-
|
|
1629
|
+
v("span", [
|
|
1630
1630
|
// 현재 단계 표시 (활성 상태일 때만)
|
|
1631
|
-
|
|
1631
|
+
d && v("em", { class: "sr-only" }, "현재단계"),
|
|
1632
1632
|
// 단계 번호
|
|
1633
|
-
|
|
1633
|
+
v("i", { class: "step" }, e.step),
|
|
1634
1634
|
// 단계 제목
|
|
1635
|
-
|
|
1635
|
+
v("span", { class: "step-tit" }, e.title),
|
|
1636
1636
|
// 슬롯 내용 (추가 콘텐츠가 있는 경우)
|
|
1637
1637
|
n.default?.()
|
|
1638
1638
|
])
|
|
@@ -1640,7 +1640,7 @@ const mt = w({
|
|
|
1640
1640
|
);
|
|
1641
1641
|
};
|
|
1642
1642
|
}
|
|
1643
|
-
}),
|
|
1643
|
+
}), Bt = B({
|
|
1644
1644
|
name: "KrdsSkipLink",
|
|
1645
1645
|
props: {
|
|
1646
1646
|
/**
|
|
@@ -1667,25 +1667,25 @@ const mt = w({
|
|
|
1667
1667
|
default: "krds-skip-link"
|
|
1668
1668
|
}
|
|
1669
1669
|
},
|
|
1670
|
-
setup(e, { slots:
|
|
1671
|
-
return () =>
|
|
1670
|
+
setup(e, { slots: i }) {
|
|
1671
|
+
return () => v(
|
|
1672
1672
|
"div",
|
|
1673
1673
|
{
|
|
1674
1674
|
id: e.id,
|
|
1675
1675
|
class: e.class
|
|
1676
1676
|
},
|
|
1677
1677
|
[
|
|
1678
|
-
|
|
1678
|
+
v(
|
|
1679
1679
|
"a",
|
|
1680
1680
|
{
|
|
1681
1681
|
href: e.href
|
|
1682
1682
|
},
|
|
1683
|
-
|
|
1683
|
+
i.default?.()
|
|
1684
1684
|
)
|
|
1685
1685
|
]
|
|
1686
1686
|
);
|
|
1687
1687
|
}
|
|
1688
|
-
}),
|
|
1688
|
+
}), $t = ["id", "aria-label"], Kt = { class: "breadcrumb" }, Dt = ["href", "aria-current", "onClick"], Vt = { key: 0 }, zt = /* @__PURE__ */ B({
|
|
1689
1689
|
__name: "KrdsBreadcrumb",
|
|
1690
1690
|
props: {
|
|
1691
1691
|
items: {},
|
|
@@ -1694,33 +1694,33 @@ const mt = w({
|
|
|
1694
1694
|
showHomeIcon: { type: Boolean, default: !0 }
|
|
1695
1695
|
},
|
|
1696
1696
|
emits: ["item-click"],
|
|
1697
|
-
setup(e, { emit:
|
|
1698
|
-
const n = e,
|
|
1699
|
-
|
|
1697
|
+
setup(e, { emit: i }) {
|
|
1698
|
+
const n = e, a = i, t = (o) => o === n.items.length - 1, s = (o, c) => {
|
|
1699
|
+
o.onClick && o.onClick(c), a("item-click", o, c);
|
|
1700
1700
|
};
|
|
1701
|
-
return (
|
|
1702
|
-
id:
|
|
1701
|
+
return (o, c) => (S(), w("nav", {
|
|
1702
|
+
id: o.id,
|
|
1703
1703
|
class: "krds-breadcrumb-wrap",
|
|
1704
|
-
"aria-label":
|
|
1704
|
+
"aria-label": o.ariaLabel
|
|
1705
1705
|
}, [
|
|
1706
|
-
|
|
1707
|
-
(
|
|
1708
|
-
key: `breadcrumb-${
|
|
1709
|
-
class:
|
|
1706
|
+
r("ol", Kt, [
|
|
1707
|
+
(S(!0), w(F, null, N(o.items, (d, m) => (S(), w("li", {
|
|
1708
|
+
key: `breadcrumb-${m}`,
|
|
1709
|
+
class: I({ home: m === 0 && o.showHomeIcon })
|
|
1710
1710
|
}, [
|
|
1711
|
-
|
|
1712
|
-
href:
|
|
1711
|
+
r("a", {
|
|
1712
|
+
href: d.href || "#",
|
|
1713
1713
|
class: "txt",
|
|
1714
|
-
"aria-current":
|
|
1715
|
-
onClick: (g) =>
|
|
1714
|
+
"aria-current": t(m) ? "page" : void 0,
|
|
1715
|
+
onClick: (g) => s(d, g)
|
|
1716
1716
|
}, [
|
|
1717
|
-
|
|
1718
|
-
], 8,
|
|
1717
|
+
m === 0 && o.showHomeIcon ? Y("", !0) : (S(), w("span", Vt, L(d.text), 1))
|
|
1718
|
+
], 8, Dt)
|
|
1719
1719
|
], 2))), 128))
|
|
1720
1720
|
])
|
|
1721
|
-
], 8,
|
|
1721
|
+
], 8, $t));
|
|
1722
1722
|
}
|
|
1723
|
-
}),
|
|
1723
|
+
}), Lt = B({
|
|
1724
1724
|
name: "KrdsInPageNavigation",
|
|
1725
1725
|
props: {
|
|
1726
1726
|
title: {
|
|
@@ -1754,107 +1754,107 @@ const mt = w({
|
|
|
1754
1754
|
},
|
|
1755
1755
|
emits: ["itemClick"],
|
|
1756
1756
|
slots: Object,
|
|
1757
|
-
setup(e, { emit:
|
|
1758
|
-
const
|
|
1759
|
-
const
|
|
1760
|
-
return e.class &&
|
|
1761
|
-
}),
|
|
1762
|
-
const
|
|
1763
|
-
return
|
|
1764
|
-
},
|
|
1765
|
-
if (
|
|
1766
|
-
|
|
1767
|
-
const
|
|
1768
|
-
if (
|
|
1769
|
-
const
|
|
1757
|
+
setup(e, { emit: i, slots: n }) {
|
|
1758
|
+
const a = K(""), t = K(/* @__PURE__ */ new Map()), s = y(() => {
|
|
1759
|
+
const p = ["krds-in-page-navigation-type"];
|
|
1760
|
+
return e.class && p.push(e.class), p;
|
|
1761
|
+
}), o = () => {
|
|
1762
|
+
const p = e.headerTopSelector, l = e.headerInnerSelector, h = document.querySelector(p)?.clientHeight || 0, u = document.querySelector(l)?.clientHeight || 0;
|
|
1763
|
+
return h + u;
|
|
1764
|
+
}, c = (p, l) => {
|
|
1765
|
+
if (i("itemClick", p, l), p.href.startsWith("#")) {
|
|
1766
|
+
l.preventDefault();
|
|
1767
|
+
const h = document.querySelector(p.href);
|
|
1768
|
+
if (h) {
|
|
1769
|
+
const u = o();
|
|
1770
1770
|
if (window.scrollTo({
|
|
1771
1771
|
left: 0,
|
|
1772
|
-
top:
|
|
1772
|
+
top: h.getBoundingClientRect().top + window.scrollY - u,
|
|
1773
1773
|
behavior: "smooth"
|
|
1774
|
-
}),
|
|
1775
|
-
const
|
|
1776
|
-
|
|
1774
|
+
}), a.value = p.href, l instanceof KeyboardEvent) {
|
|
1775
|
+
const f = h.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");
|
|
1776
|
+
f && f instanceof HTMLElement && (f.setAttribute("tabindex", "-1"), f.focus({ preventScroll: !0 }));
|
|
1777
1777
|
}
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
|
-
},
|
|
1781
|
-
|
|
1782
|
-
const
|
|
1783
|
-
|
|
1780
|
+
}, d = () => {
|
|
1781
|
+
t.value.clear(), e.items && e.items.filter((p) => p.href.startsWith("#")).forEach((p) => {
|
|
1782
|
+
const l = document.querySelector(p.href);
|
|
1783
|
+
l && t.value.set(p.href, l);
|
|
1784
1784
|
});
|
|
1785
|
-
},
|
|
1786
|
-
if (!e.autoActive || !e.items ||
|
|
1787
|
-
const
|
|
1785
|
+
}, m = () => {
|
|
1786
|
+
if (!e.autoActive || !e.items || t.value.size === 0) return;
|
|
1787
|
+
const p = window.innerHeight, l = Math.ceil(p / 5), h = window.scrollY + p, u = document.body.scrollHeight, f = e.items.filter((z) => z.href.startsWith("#") && t.value.has(z.href)).map((z) => ({
|
|
1788
1788
|
href: z.href,
|
|
1789
|
-
element:
|
|
1789
|
+
element: t.value.get(z.href),
|
|
1790
1790
|
item: z
|
|
1791
1791
|
}));
|
|
1792
|
-
if (
|
|
1793
|
-
const x =
|
|
1794
|
-
let
|
|
1795
|
-
if (
|
|
1796
|
-
|
|
1797
|
-
else if (window.scrollY <=
|
|
1798
|
-
|
|
1792
|
+
if (f.length === 0) return;
|
|
1793
|
+
const x = f[0], R = f[f.length - 1], E = x.element.offsetTop;
|
|
1794
|
+
let M = "";
|
|
1795
|
+
if (h >= u)
|
|
1796
|
+
M = R.href;
|
|
1797
|
+
else if (window.scrollY <= E)
|
|
1798
|
+
M = x.href;
|
|
1799
1799
|
else
|
|
1800
|
-
for (const z of
|
|
1801
|
-
const
|
|
1802
|
-
if (window.scrollY >
|
|
1803
|
-
|
|
1800
|
+
for (const z of f) {
|
|
1801
|
+
const H = z.element.offsetHeight, V = z.element.offsetTop - l;
|
|
1802
|
+
if (window.scrollY > V && window.scrollY <= V + H) {
|
|
1803
|
+
M = z.href;
|
|
1804
1804
|
break;
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
1807
|
-
|
|
1807
|
+
M && M !== a.value && (a.value = M);
|
|
1808
1808
|
}, g = () => {
|
|
1809
1809
|
if (!e.items) return;
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1810
|
+
const p = e.items.find((l) => l.active);
|
|
1811
|
+
p ? a.value = p.href : e.items.length > 0 && (a.value = e.items[0].href);
|
|
1812
1812
|
};
|
|
1813
|
-
|
|
1813
|
+
le(() => {
|
|
1814
1814
|
if (g(), e.autoActive) {
|
|
1815
|
-
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1815
|
+
d(), m(), window.addEventListener("scroll", m, { passive: !0 });
|
|
1816
|
+
const p = new MutationObserver(() => {
|
|
1817
|
+
d();
|
|
1818
1818
|
});
|
|
1819
|
-
|
|
1819
|
+
p.observe(document.body, {
|
|
1820
1820
|
childList: !0,
|
|
1821
1821
|
subtree: !0
|
|
1822
|
-
}),
|
|
1823
|
-
|
|
1822
|
+
}), X(() => {
|
|
1823
|
+
p.disconnect();
|
|
1824
1824
|
});
|
|
1825
1825
|
}
|
|
1826
|
-
}),
|
|
1827
|
-
e.autoActive && (window.removeEventListener("scroll",
|
|
1826
|
+
}), X(() => {
|
|
1827
|
+
e.autoActive && (window.removeEventListener("scroll", m), t.value.clear());
|
|
1828
1828
|
});
|
|
1829
|
-
const _ = () => !e.caption && !e.title ? null :
|
|
1830
|
-
e.caption &&
|
|
1831
|
-
e.title &&
|
|
1832
|
-
]),
|
|
1829
|
+
const _ = () => !e.caption && !e.title ? null : v("div", { class: "in-page-navigation-header" }, [
|
|
1830
|
+
e.caption && v("p", { class: "quick-caption" }, e.caption),
|
|
1831
|
+
e.title && v("p", { class: "quick-title" }, e.title)
|
|
1832
|
+
]), k = () => {
|
|
1833
1833
|
if (!e.items) return null;
|
|
1834
|
-
const
|
|
1835
|
-
const
|
|
1836
|
-
return
|
|
1837
|
-
|
|
1834
|
+
const p = e.items.map((l) => {
|
|
1835
|
+
const h = a.value === l.href || !e.autoActive && l.active;
|
|
1836
|
+
return v("li", { key: l.href }, [
|
|
1837
|
+
v(
|
|
1838
1838
|
"a",
|
|
1839
1839
|
{
|
|
1840
|
-
href:
|
|
1841
|
-
class:
|
|
1842
|
-
onClick: (
|
|
1843
|
-
onKeydown: (
|
|
1844
|
-
(
|
|
1840
|
+
href: l.href,
|
|
1841
|
+
class: h ? "active" : "",
|
|
1842
|
+
onClick: (u) => c(l, u),
|
|
1843
|
+
onKeydown: (u) => {
|
|
1844
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), c(l, u));
|
|
1845
1845
|
}
|
|
1846
1846
|
},
|
|
1847
|
-
|
|
1847
|
+
l.text
|
|
1848
1848
|
)
|
|
1849
1849
|
]);
|
|
1850
1850
|
});
|
|
1851
|
-
return
|
|
1852
|
-
},
|
|
1853
|
-
return () =>
|
|
1854
|
-
|
|
1851
|
+
return v("nav", { class: "in-page-navigation-list" }, [v("ul", {}, p)]);
|
|
1852
|
+
}, D = () => n.action ? v("div", { class: "in-page-navigation-action" }, [n.action()]) : null;
|
|
1853
|
+
return () => v("div", { class: s.value }, [
|
|
1854
|
+
v("div", { class: "krds-in-page-navigation-area" }, [_(), k(), D()].filter(Boolean))
|
|
1855
1855
|
]);
|
|
1856
1856
|
}
|
|
1857
|
-
}),
|
|
1857
|
+
}), It = ["id"], Et = { class: "page-links" }, Mt = ["href", "aria-current", "onClick"], Rt = { key: 0 }, Tt = ["aria-label"], Pt = /* @__PURE__ */ B({
|
|
1858
1858
|
__name: "KrdsPagination",
|
|
1859
1859
|
props: {
|
|
1860
1860
|
modelValue: { default: 1 },
|
|
@@ -1865,226 +1865,728 @@ const mt = w({
|
|
|
1865
1865
|
pageRange: { default: 8 }
|
|
1866
1866
|
},
|
|
1867
1867
|
emits: ["update:modelValue"],
|
|
1868
|
-
setup(e, { emit:
|
|
1869
|
-
const n = e,
|
|
1870
|
-
if (!
|
|
1868
|
+
setup(e, { emit: i }) {
|
|
1869
|
+
const n = e, a = i, t = y(() => Math.max(1, n.min)), s = y(() => n.modelValue ?? t.value), o = y(() => s.value <= t.value), c = y(() => s.value >= n.max), d = y(() => {
|
|
1870
|
+
if (!o.value)
|
|
1871
1871
|
return "#";
|
|
1872
|
-
}),
|
|
1873
|
-
if (!
|
|
1872
|
+
}), m = y(() => {
|
|
1873
|
+
if (!c.value)
|
|
1874
1874
|
return "#";
|
|
1875
|
-
}), g =
|
|
1876
|
-
const { pageRange:
|
|
1877
|
-
if (
|
|
1878
|
-
for (let
|
|
1879
|
-
|
|
1875
|
+
}), g = y(() => {
|
|
1876
|
+
const { pageRange: p, max: l } = n, h = 1, u = [];
|
|
1877
|
+
if (l <= p + 2 * h)
|
|
1878
|
+
for (let f = t.value; f <= l; f++)
|
|
1879
|
+
u.push({
|
|
1880
1880
|
type: "page",
|
|
1881
|
-
key: `page-${
|
|
1882
|
-
page:
|
|
1881
|
+
key: `page-${f}`,
|
|
1882
|
+
page: f,
|
|
1883
1883
|
href: "#"
|
|
1884
1884
|
});
|
|
1885
1885
|
else {
|
|
1886
|
-
const
|
|
1887
|
-
for (let
|
|
1888
|
-
|
|
1886
|
+
const f = Math.min(h, l), x = Math.max(l - h + 1, 1), R = Math.max(t.value, s.value - Math.floor(p / 2)), E = Math.min(l, R + p - 1), M = Math.max(t.value, E - p + 1);
|
|
1887
|
+
for (let V = t.value; V <= f; V++)
|
|
1888
|
+
u.push({
|
|
1889
1889
|
type: "page",
|
|
1890
|
-
key: `page-${
|
|
1891
|
-
page:
|
|
1890
|
+
key: `page-${V}`,
|
|
1891
|
+
page: V,
|
|
1892
1892
|
href: "#"
|
|
1893
1893
|
});
|
|
1894
|
-
|
|
1894
|
+
M > f + 1 && u.push({
|
|
1895
1895
|
type: "ellipsis",
|
|
1896
1896
|
key: "ellipsis-left",
|
|
1897
1897
|
ariaLabel: "페이지 생략"
|
|
1898
1898
|
});
|
|
1899
|
-
const z = Math.max(
|
|
1900
|
-
for (let
|
|
1901
|
-
|
|
1899
|
+
const z = Math.max(M, f + 1), H = Math.min(E, x - 1);
|
|
1900
|
+
for (let V = z; V <= H; V++)
|
|
1901
|
+
u.push({
|
|
1902
1902
|
type: "page",
|
|
1903
|
-
key: `page-${
|
|
1904
|
-
page:
|
|
1903
|
+
key: `page-${V}`,
|
|
1904
|
+
page: V,
|
|
1905
1905
|
href: "#"
|
|
1906
1906
|
});
|
|
1907
|
-
|
|
1907
|
+
E < x - 1 && u.push({
|
|
1908
1908
|
type: "ellipsis",
|
|
1909
1909
|
key: "ellipsis-right",
|
|
1910
1910
|
ariaLabel: "페이지 생략"
|
|
1911
1911
|
});
|
|
1912
|
-
for (let
|
|
1913
|
-
|
|
1912
|
+
for (let V = x; V <= l; V++)
|
|
1913
|
+
u.push({
|
|
1914
1914
|
type: "page",
|
|
1915
|
-
key: `page-${
|
|
1916
|
-
page:
|
|
1915
|
+
key: `page-${V}`,
|
|
1916
|
+
page: V,
|
|
1917
1917
|
href: "#"
|
|
1918
1918
|
});
|
|
1919
1919
|
}
|
|
1920
|
-
return
|
|
1921
|
-
}), _ = (
|
|
1922
|
-
if (
|
|
1923
|
-
|
|
1920
|
+
return u;
|
|
1921
|
+
}), _ = (p, l) => {
|
|
1922
|
+
if (p === s.value) {
|
|
1923
|
+
l.preventDefault();
|
|
1924
1924
|
return;
|
|
1925
1925
|
}
|
|
1926
|
-
|
|
1927
|
-
},
|
|
1928
|
-
if (
|
|
1929
|
-
|
|
1926
|
+
a("update:modelValue", p);
|
|
1927
|
+
}, k = (p) => {
|
|
1928
|
+
if (o.value) {
|
|
1929
|
+
p.preventDefault();
|
|
1930
1930
|
return;
|
|
1931
1931
|
}
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1934
|
-
},
|
|
1935
|
-
if (
|
|
1936
|
-
|
|
1932
|
+
const l = s.value - 1;
|
|
1933
|
+
a("update:modelValue", l);
|
|
1934
|
+
}, D = (p) => {
|
|
1935
|
+
if (c.value) {
|
|
1936
|
+
p.preventDefault();
|
|
1937
1937
|
return;
|
|
1938
1938
|
}
|
|
1939
|
-
const
|
|
1940
|
-
|
|
1939
|
+
const l = s.value + 1;
|
|
1940
|
+
a("update:modelValue", l);
|
|
1941
1941
|
};
|
|
1942
|
-
return (
|
|
1943
|
-
const
|
|
1944
|
-
return
|
|
1945
|
-
id:
|
|
1942
|
+
return (p, l) => {
|
|
1943
|
+
const h = ze("sr-only");
|
|
1944
|
+
return S(), w("div", {
|
|
1945
|
+
id: p.id,
|
|
1946
1946
|
class: "krds-pagination"
|
|
1947
1947
|
}, [
|
|
1948
|
-
(
|
|
1949
|
-
href:
|
|
1950
|
-
class:
|
|
1951
|
-
onClick:
|
|
1948
|
+
(S(), oe(ye(o.value ? "span" : "a"), {
|
|
1949
|
+
href: o.value ? void 0 : d.value,
|
|
1950
|
+
class: I(["page-navi", "prev", { disabled: o.value }]),
|
|
1951
|
+
onClick: k
|
|
1952
1952
|
}, {
|
|
1953
|
-
default:
|
|
1954
|
-
|
|
1953
|
+
default: ie(() => [...l[0] || (l[0] = [
|
|
1954
|
+
A(" 이전 ", -1)
|
|
1955
1955
|
])]),
|
|
1956
1956
|
_: 1
|
|
1957
1957
|
}, 8, ["href", "class"])),
|
|
1958
|
-
|
|
1959
|
-
(
|
|
1960
|
-
key:
|
|
1958
|
+
r("div", Et, [
|
|
1959
|
+
(S(!0), w(F, null, N(g.value, (u) => (S(), w(F, {
|
|
1960
|
+
key: u.key
|
|
1961
1961
|
}, [
|
|
1962
|
-
|
|
1962
|
+
u.type === "page" ? (S(), w("a", {
|
|
1963
1963
|
key: 0,
|
|
1964
|
-
href:
|
|
1965
|
-
class:
|
|
1966
|
-
"aria-current":
|
|
1967
|
-
onClick: (
|
|
1964
|
+
href: u.href || "#",
|
|
1965
|
+
class: I(["page-link", { active: u.page === s.value }]),
|
|
1966
|
+
"aria-current": u.page === s.value ? "page" : void 0,
|
|
1967
|
+
onClick: (f) => _(u.page, f)
|
|
1968
1968
|
}, [
|
|
1969
|
-
|
|
1970
|
-
|
|
1969
|
+
u.page === s.value ? Q((S(), w("span", Rt, [...l[1] || (l[1] = [
|
|
1970
|
+
A("현재페이지", -1)
|
|
1971
1971
|
])])), [
|
|
1972
|
-
[
|
|
1973
|
-
]) :
|
|
1974
|
-
|
|
1975
|
-
], 10,
|
|
1972
|
+
[h]
|
|
1973
|
+
]) : Y("", !0),
|
|
1974
|
+
A(" " + L(u.page), 1)
|
|
1975
|
+
], 10, Mt)) : u.type === "ellipsis" ? (S(), w("span", {
|
|
1976
1976
|
key: 1,
|
|
1977
1977
|
class: "page-link link-dot",
|
|
1978
|
-
"aria-label":
|
|
1979
|
-
}, null, 8,
|
|
1978
|
+
"aria-label": u.ariaLabel
|
|
1979
|
+
}, null, 8, Tt)) : Y("", !0)
|
|
1980
1980
|
], 64))), 128))
|
|
1981
1981
|
]),
|
|
1982
|
-
(
|
|
1983
|
-
href:
|
|
1984
|
-
class:
|
|
1985
|
-
onClick:
|
|
1982
|
+
(S(), oe(ye(c.value ? "span" : "a"), {
|
|
1983
|
+
href: c.value ? void 0 : m.value,
|
|
1984
|
+
class: I(["page-navi", "next", { disabled: c.value }]),
|
|
1985
|
+
onClick: D
|
|
1986
1986
|
}, {
|
|
1987
|
-
default:
|
|
1988
|
-
|
|
1987
|
+
default: ie(() => [...l[2] || (l[2] = [
|
|
1988
|
+
A(" 다음 ", -1)
|
|
1989
1989
|
])]),
|
|
1990
1990
|
_: 1
|
|
1991
1991
|
}, 8, ["href", "class"]))
|
|
1992
|
-
], 8,
|
|
1992
|
+
], 8, It);
|
|
1993
|
+
};
|
|
1994
|
+
}
|
|
1995
|
+
}), At = { class: "inner help-panel-flexible" }, Ft = { class: "help-panel-wrap" }, Ot = { class: "help-conts-area" }, qt = /* @__PURE__ */ B({
|
|
1996
|
+
__name: "KrdsPanel",
|
|
1997
|
+
props: {
|
|
1998
|
+
modelValue: { type: Boolean, default: !1 }
|
|
1999
|
+
},
|
|
2000
|
+
emits: ["update:modelValue"],
|
|
2001
|
+
setup(e, { emit: i }) {
|
|
2002
|
+
const n = e, a = i, t = y({
|
|
2003
|
+
get: () => n.modelValue,
|
|
2004
|
+
set: (c) => a("update:modelValue", c)
|
|
2005
|
+
}), s = () => {
|
|
2006
|
+
t.value = !0;
|
|
2007
|
+
}, o = () => {
|
|
2008
|
+
t.value = !1;
|
|
2009
|
+
};
|
|
2010
|
+
return (c, d) => (S(), w("div", At, [
|
|
2011
|
+
r("button", {
|
|
2012
|
+
type: "button",
|
|
2013
|
+
class: "krds-btn small tertiary btn-help-panel expand btn-help-exec",
|
|
2014
|
+
onClick: s
|
|
2015
|
+
}, [...d[0] || (d[0] = [
|
|
2016
|
+
r("i", { class: "svg-icon ico-fold" }, null, -1),
|
|
2017
|
+
A(" 도움말 ", -1)
|
|
2018
|
+
])]),
|
|
2019
|
+
r("div", {
|
|
2020
|
+
class: I(["krds-help-panel", { expand: t.value }])
|
|
2021
|
+
}, [
|
|
2022
|
+
r("div", Ft, [
|
|
2023
|
+
r("div", Ot, [
|
|
2024
|
+
J(c.$slots, "default"),
|
|
2025
|
+
r("button", {
|
|
2026
|
+
type: "button",
|
|
2027
|
+
class: "krds-btn small tertiary btn-help-panel fold",
|
|
2028
|
+
onClick: o
|
|
2029
|
+
}, [...d[1] || (d[1] = [
|
|
2030
|
+
r("span", { class: "sr-only" }, "도움말", -1),
|
|
2031
|
+
A(" 접어두기 ", -1),
|
|
2032
|
+
r("i", { class: "svg-icon ico-angle right" }, null, -1)
|
|
2033
|
+
])])
|
|
2034
|
+
])
|
|
2035
|
+
])
|
|
2036
|
+
], 2)
|
|
2037
|
+
]));
|
|
2038
|
+
}
|
|
2039
|
+
}), Nt = { class: "tooltip-action" }, Ht = {
|
|
2040
|
+
key: 0,
|
|
2041
|
+
class: "svg-icon ico-help"
|
|
2042
|
+
}, jt = {
|
|
2043
|
+
key: 1,
|
|
2044
|
+
class: "svg-icon ico-tooltip"
|
|
2045
|
+
}, Wt = { class: "tooltip-title" }, Yt = { class: "tooltip-contents" }, Gt = /* @__PURE__ */ B({
|
|
2046
|
+
__name: "KrdsContextualHelp",
|
|
2047
|
+
props: {
|
|
2048
|
+
tooltipTitle: { default: "도움말 제목" },
|
|
2049
|
+
helpIcon: { type: Boolean },
|
|
2050
|
+
position: { default: "top left" }
|
|
2051
|
+
},
|
|
2052
|
+
setup(e) {
|
|
2053
|
+
const i = e, n = K(), a = K(), t = K(), s = K(), o = K(!1), c = () => {
|
|
2054
|
+
const l = o.value;
|
|
2055
|
+
g(), l || d();
|
|
2056
|
+
}, d = () => {
|
|
2057
|
+
if (!t.value || !a.value) return;
|
|
2058
|
+
o.value = !0, t.value.style.display = "block", a.value.setAttribute("aria-expanded", "true"), t.value.querySelector('a, button, [tabindex="0"], input, textarea, select')?.focus(), _();
|
|
2059
|
+
}, m = () => {
|
|
2060
|
+
!t.value || !a.value || (o.value = !1, t.value.style.display = "none", a.value.setAttribute("aria-expanded", "false"));
|
|
2061
|
+
}, g = () => {
|
|
2062
|
+
const l = document.querySelectorAll(".krds-contextual-help .tooltip-popover"), h = document.querySelectorAll(".krds-contextual-help .tooltip-btn");
|
|
2063
|
+
l.forEach((u) => {
|
|
2064
|
+
u.style.display = "none";
|
|
2065
|
+
}), h.forEach((u) => {
|
|
2066
|
+
u.setAttribute("aria-expanded", "false");
|
|
2067
|
+
}), o.value = !1;
|
|
2068
|
+
}, _ = () => {
|
|
2069
|
+
if (!n.value || !t.value) return;
|
|
2070
|
+
const l = window.innerWidth <= 768, h = n.value.querySelector(".tooltip-action");
|
|
2071
|
+
if (l) {
|
|
2072
|
+
const f = getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0], R = h.getBoundingClientRect().left - parseInt(f), E = document.body.clientWidth - parseInt(f) * 2;
|
|
2073
|
+
t.value.style.left = `-${R}px`, t.value.style.width = `${E}px`;
|
|
2074
|
+
} else
|
|
2075
|
+
t.value.style.left = "", t.value.style.right = "", t.value.style.width = "360px";
|
|
2076
|
+
}, k = (l) => {
|
|
2077
|
+
(l.key === "Escape" || l.key === "Esc") && g();
|
|
2078
|
+
}, D = (l) => {
|
|
2079
|
+
l.target.closest(".tooltip-action") || g();
|
|
2080
|
+
}, p = () => {
|
|
2081
|
+
o.value && _();
|
|
2082
|
+
};
|
|
2083
|
+
return le(() => {
|
|
2084
|
+
n.value && (a.value && a.value.setAttribute("aria-expanded", "false"), t.value && t.value.setAttribute("role", "tooltip"), document.addEventListener("keydown", k), document.addEventListener("click", D), window.addEventListener("resize", p));
|
|
2085
|
+
}), X(() => {
|
|
2086
|
+
document.removeEventListener("keydown", k), document.removeEventListener("click", D), window.removeEventListener("resize", p);
|
|
2087
|
+
}), (l, h) => (S(), w("div", {
|
|
2088
|
+
ref_key: "containerRef",
|
|
2089
|
+
ref: n,
|
|
2090
|
+
class: I(["krds-contextual-help", i.position])
|
|
2091
|
+
}, [
|
|
2092
|
+
r("div", Nt, [
|
|
2093
|
+
r("button", {
|
|
2094
|
+
ref_key: "tooltipBtnRef",
|
|
2095
|
+
ref: a,
|
|
2096
|
+
type: "button",
|
|
2097
|
+
class: "krds-btn medium icon tooltip-btn",
|
|
2098
|
+
onClick: c
|
|
2099
|
+
}, [
|
|
2100
|
+
h[0] || (h[0] = r("span", { class: "sr-only" }, "도움말", -1)),
|
|
2101
|
+
i.helpIcon ? (S(), w("i", Ht)) : (S(), w("i", jt))
|
|
2102
|
+
], 512),
|
|
2103
|
+
r("div", {
|
|
2104
|
+
ref_key: "tooltipPopoverRef",
|
|
2105
|
+
ref: t,
|
|
2106
|
+
class: "tooltip-popover",
|
|
2107
|
+
role: "tooltip"
|
|
2108
|
+
}, [
|
|
2109
|
+
r("h4", Wt, L(i.tooltipTitle), 1),
|
|
2110
|
+
r("div", Yt, [
|
|
2111
|
+
J(l.$slots, "default")
|
|
2112
|
+
]),
|
|
2113
|
+
r("button", {
|
|
2114
|
+
ref_key: "closeBtnRef",
|
|
2115
|
+
ref: s,
|
|
2116
|
+
type: "button",
|
|
2117
|
+
class: "krds-btn xsmall icon tooltip-close",
|
|
2118
|
+
onClick: m
|
|
2119
|
+
}, [...h[1] || (h[1] = [
|
|
2120
|
+
r("span", { class: "sr-only" }, "닫기", -1),
|
|
2121
|
+
r("i", { class: "svg-icon ico-modal-close" }, null, -1)
|
|
2122
|
+
])], 512)
|
|
2123
|
+
], 512)
|
|
2124
|
+
])
|
|
2125
|
+
], 2));
|
|
2126
|
+
}
|
|
2127
|
+
}), Ut = {
|
|
2128
|
+
key: 0,
|
|
2129
|
+
class: "coach-balloon"
|
|
2130
|
+
}, Xt = { class: "coach-tit" }, Jt = { class: "desc" }, Qt = { class: "coach-controls" }, Zt = { class: "num" }, el = { class: "btn-wrap" }, tl = /* @__PURE__ */ B({
|
|
2131
|
+
__name: "KrdsCoachMark",
|
|
2132
|
+
props: {
|
|
2133
|
+
coachMarkClass: { default: "" },
|
|
2134
|
+
stepsData: {},
|
|
2135
|
+
activeStep: {},
|
|
2136
|
+
modelValue: { default: null },
|
|
2137
|
+
class: {},
|
|
2138
|
+
style: {},
|
|
2139
|
+
id: {}
|
|
2140
|
+
},
|
|
2141
|
+
emits: ["update:modelValue", "close"],
|
|
2142
|
+
setup(e, { emit: i }) {
|
|
2143
|
+
const n = e, a = y(() => {
|
|
2144
|
+
const d = n.activeStep - 1;
|
|
2145
|
+
return n.stepsData && d >= 0 && d < n.stepsData.length ? n.stepsData[d] : null;
|
|
2146
|
+
}), t = i, s = () => {
|
|
2147
|
+
n.activeStep > 1 && t("update:modelValue", n.activeStep - 1);
|
|
2148
|
+
}, o = () => {
|
|
2149
|
+
n.activeStep < n.stepsData.length && t("update:modelValue", n.activeStep + 1);
|
|
2150
|
+
}, c = () => {
|
|
2151
|
+
t("close");
|
|
1993
2152
|
};
|
|
2153
|
+
return (d, m) => (S(), w("div", {
|
|
2154
|
+
class: I(["krds-coach-mark", d.coachMarkClass]),
|
|
2155
|
+
style: ae(d.style)
|
|
2156
|
+
}, [
|
|
2157
|
+
d.modelValue === d.activeStep && a.value ? (S(), w("div", Ut, [
|
|
2158
|
+
m[2] || (m[2] = r("h5", { class: "sr-only" }, "따라하기 가이드", -1)),
|
|
2159
|
+
r("h6", Xt, L(d.activeStep) + "단계 : " + L(a.value.title), 1),
|
|
2160
|
+
r("p", Jt, L(a.value.description), 1),
|
|
2161
|
+
r("div", Qt, [
|
|
2162
|
+
r("div", Zt, [
|
|
2163
|
+
m[0] || (m[0] = r("span", { class: "sr-only" }, "현재 단계", -1)),
|
|
2164
|
+
r("strong", null, L(d.activeStep), 1),
|
|
2165
|
+
m[1] || (m[1] = r("span", { class: "sr-only" }, "총 단계", -1)),
|
|
2166
|
+
r("span", null, L(d.stepsData.length), 1)
|
|
2167
|
+
]),
|
|
2168
|
+
r("div", el, [
|
|
2169
|
+
r("button", {
|
|
2170
|
+
type: "button",
|
|
2171
|
+
class: "krds-btn small text",
|
|
2172
|
+
onClick: c
|
|
2173
|
+
}, "그만보기"),
|
|
2174
|
+
d.activeStep !== 1 ? (S(), w("button", {
|
|
2175
|
+
key: 0,
|
|
2176
|
+
type: "button",
|
|
2177
|
+
class: "krds-btn small text",
|
|
2178
|
+
onClick: s
|
|
2179
|
+
}, "이전으로")) : Y("", !0),
|
|
2180
|
+
d.activeStep !== d.stepsData.length ? (S(), w("button", {
|
|
2181
|
+
key: 1,
|
|
2182
|
+
type: "button",
|
|
2183
|
+
class: "krds-btn small tertiary",
|
|
2184
|
+
onClick: o
|
|
2185
|
+
}, "다음으로")) : Y("", !0)
|
|
2186
|
+
])
|
|
2187
|
+
])
|
|
2188
|
+
])) : Y("", !0),
|
|
2189
|
+
J(d.$slots, "coach-mark-content")
|
|
2190
|
+
], 6));
|
|
2191
|
+
}
|
|
2192
|
+
}), ll = ["disabled", "aria-labelledby"], al = ["id", "aria-hidden"], sl = { class: "sr-only" }, nl = /* @__PURE__ */ B({
|
|
2193
|
+
__name: "KrdsTooltip",
|
|
2194
|
+
props: {
|
|
2195
|
+
type: { default: "default" },
|
|
2196
|
+
tooltipContent: {},
|
|
2197
|
+
vertical: { type: Boolean },
|
|
2198
|
+
box: { type: Boolean },
|
|
2199
|
+
disabled: { type: Boolean, default: !1 },
|
|
2200
|
+
class: {},
|
|
2201
|
+
style: {},
|
|
2202
|
+
id: {}
|
|
2203
|
+
},
|
|
2204
|
+
setup(e) {
|
|
2205
|
+
const i = e, n = K(null), a = K(null), t = K(!1), s = K({}), o = K(`tooltip-popover-${Math.random().toString(36).substring(2, 9)}`), c = K(!1), d = y(() => {
|
|
2206
|
+
const f = ["krds-btn", "krds-tooltip"];
|
|
2207
|
+
return i.type === "default" ? f.push("small", "text") : i.type === "icon" ? f.push("icon") : i.type === "button" && f.push(""), !i.box && i.vertical && f.push("tooltip-vertical"), i.box && !i.vertical && f.push("tooltip-box"), f.join(" ");
|
|
2208
|
+
}), m = y(() => {
|
|
2209
|
+
const f = [];
|
|
2210
|
+
return i.box && f.push("tooltip-box"), i.vertical && f.push("tooltip-vertical"), t.value && f.push("active"), f;
|
|
2211
|
+
}), g = y(() => n.value?.querySelector("button")?.textContent?.trim() || ""), _ = () => window.innerWidth <= 768, k = () => {
|
|
2212
|
+
if (!n.value || !a.value) return;
|
|
2213
|
+
const f = n.value.querySelector("button");
|
|
2214
|
+
if (!f) return;
|
|
2215
|
+
const x = 12, { clientHeight: R, clientWidth: E } = a.value, { top: M, left: z, right: H, height: V, width: j } = f.getBoundingClientRect(), Z = window.innerWidth / 2, se = window.innerHeight / 2;
|
|
2216
|
+
let U, O;
|
|
2217
|
+
const q = [];
|
|
2218
|
+
c.value || i.box || i.vertical ? (M + V > se ? (U = M - R - x, q.push("top")) : (U = M + V + x, q.push("bottom")), z + j > Z ? (O = H - E, q.push("right"), window.innerWidth - (z + j) > E / 2 && (O = z + (j - E) / 2, q.splice(q.indexOf("right"), 1))) : (O = z + (j - E) / 2, O < 0 && (O = z, q.push("left")))) : (U = M + (V - R) / 2, z + j > Z ? (O = z - E - x, q.push("right")) : O = H + x);
|
|
2219
|
+
const ee = window.innerWidth <= 420;
|
|
2220
|
+
s.value = {
|
|
2221
|
+
top: `${U}px`,
|
|
2222
|
+
left: ee ? "50%" : `${O}px`,
|
|
2223
|
+
transform: ee ? "translateX(-50%)" : "none"
|
|
2224
|
+
}, a.value && (a.value.className = `krds-tooltip-popover ${q.join(" ")} ${m.value.join(" ")}`);
|
|
2225
|
+
}, D = async () => {
|
|
2226
|
+
i.disabled || !i.tooltipContent || (t.value = !0, await Le(), k());
|
|
2227
|
+
}, p = () => {
|
|
2228
|
+
t.value = !1, s.value = {};
|
|
2229
|
+
}, l = (f) => {
|
|
2230
|
+
(f.key === "Escape" || f.key === "Esc") && t.value && p();
|
|
2231
|
+
}, h = () => {
|
|
2232
|
+
c.value = _(), t.value && p();
|
|
2233
|
+
}, u = () => {
|
|
2234
|
+
t.value && p();
|
|
2235
|
+
};
|
|
2236
|
+
return le(() => {
|
|
2237
|
+
c.value = _(), document.addEventListener("keydown", l), window.addEventListener("scroll", u), window.addEventListener("resize", h);
|
|
2238
|
+
}), X(() => {
|
|
2239
|
+
document.removeEventListener("keydown", l), window.removeEventListener("scroll", u), window.removeEventListener("resize", h);
|
|
2240
|
+
}), (f, x) => (S(), w("div", {
|
|
2241
|
+
ref_key: "containerRef",
|
|
2242
|
+
ref: n
|
|
2243
|
+
}, [
|
|
2244
|
+
r("button", {
|
|
2245
|
+
type: "button",
|
|
2246
|
+
class: I(d.value),
|
|
2247
|
+
disabled: f.disabled,
|
|
2248
|
+
"aria-labelledby": o.value,
|
|
2249
|
+
onMouseover: D,
|
|
2250
|
+
onMouseout: p,
|
|
2251
|
+
onFocusin: D,
|
|
2252
|
+
onFocusout: p
|
|
2253
|
+
}, [
|
|
2254
|
+
J(f.$slots, "default")
|
|
2255
|
+
], 42, ll),
|
|
2256
|
+
Q(r("div", {
|
|
2257
|
+
id: o.value,
|
|
2258
|
+
ref_key: "popoverRef",
|
|
2259
|
+
ref: a,
|
|
2260
|
+
class: I(["krds-tooltip-popover", m.value]),
|
|
2261
|
+
style: ae(s.value),
|
|
2262
|
+
"aria-hidden": !t.value,
|
|
2263
|
+
role: "tooltip"
|
|
2264
|
+
}, [
|
|
2265
|
+
r("span", sl, L(g.value), 1),
|
|
2266
|
+
A(" " + L(f.tooltipContent), 1)
|
|
2267
|
+
], 14, al), [
|
|
2268
|
+
[te, t.value]
|
|
2269
|
+
])
|
|
2270
|
+
], 512));
|
|
2271
|
+
}
|
|
2272
|
+
}), ol = ["aria-expanded"], il = { class: "drop-in" }, rl = {
|
|
2273
|
+
key: 0,
|
|
2274
|
+
class: "drop-top"
|
|
2275
|
+
}, ul = {
|
|
2276
|
+
key: 1,
|
|
2277
|
+
class: "drop-list"
|
|
2278
|
+
}, dl = ["lang", "aria-selected", "onClick"], cl = { class: "sr-only" }, fl = {
|
|
2279
|
+
key: 2,
|
|
2280
|
+
class: "drop-list"
|
|
2281
|
+
}, vl = ["href", "lang"], pl = /* @__PURE__ */ B({
|
|
2282
|
+
__name: "KrdsLanguageSwitcher",
|
|
2283
|
+
props: {
|
|
2284
|
+
languageList: {},
|
|
2285
|
+
modelValue: { default: "" },
|
|
2286
|
+
type: { default: "default" },
|
|
2287
|
+
dropPosition: { default: "center" },
|
|
2288
|
+
class: {},
|
|
2289
|
+
style: {},
|
|
2290
|
+
id: {}
|
|
2291
|
+
},
|
|
2292
|
+
emits: ["update:modelValue", "close"],
|
|
2293
|
+
setup(e, { emit: i }) {
|
|
2294
|
+
const n = e, a = i, t = K(!1), s = K(), o = K(), c = () => {
|
|
2295
|
+
t.value = !t.value, t.value && s.value && g();
|
|
2296
|
+
}, d = () => {
|
|
2297
|
+
t.value = !1;
|
|
2298
|
+
}, m = (l) => {
|
|
2299
|
+
a("update:modelValue", l), d(), a("close"), o.value?.focus();
|
|
2300
|
+
}, g = () => {
|
|
2301
|
+
if (!s.value) return;
|
|
2302
|
+
const l = s.value.querySelector(".drop-menu");
|
|
2303
|
+
if (!l) return;
|
|
2304
|
+
const h = l.getBoundingClientRect(), u = window.innerWidth;
|
|
2305
|
+
s.value.classList.remove("drop-left", "drop-right"), h.left < 0 ? s.value.classList.add("drop-left") : u < h.left + h.width && s.value.classList.add("drop-right");
|
|
2306
|
+
}, _ = (l) => {
|
|
2307
|
+
l.key === "Escape" && (d(), o.value?.focus());
|
|
2308
|
+
}, k = (l) => {
|
|
2309
|
+
s.value?.contains(l.target) || d();
|
|
2310
|
+
}, D = (l) => {
|
|
2311
|
+
s.value?.contains(l.relatedTarget) || d();
|
|
2312
|
+
}, p = (l) => {
|
|
2313
|
+
if (!s.value) return;
|
|
2314
|
+
s.value.querySelectorAll(".drop-list .item-link").forEach((f) => {
|
|
2315
|
+
f.style.position = "relative", f.style.zIndex = "0";
|
|
2316
|
+
});
|
|
2317
|
+
const u = l.target;
|
|
2318
|
+
u.style.zIndex = "1";
|
|
2319
|
+
};
|
|
2320
|
+
return ue(t, (l) => {
|
|
2321
|
+
l ? (document.addEventListener("keydown", _), document.addEventListener("click", k)) : (document.removeEventListener("keydown", _), document.removeEventListener("click", k));
|
|
2322
|
+
}), X(() => {
|
|
2323
|
+
document.removeEventListener("keydown", _), document.removeEventListener("click", k);
|
|
2324
|
+
}), (l, h) => (S(), w("div", {
|
|
2325
|
+
ref_key: "dropdownRef",
|
|
2326
|
+
ref: s,
|
|
2327
|
+
class: I(["krds-drop-wrap krds-language", {
|
|
2328
|
+
active: t.value,
|
|
2329
|
+
"drop-left": n.dropPosition === "left",
|
|
2330
|
+
"drop-right": n.dropPosition === "right"
|
|
2331
|
+
}]),
|
|
2332
|
+
onFocusout: D
|
|
2333
|
+
}, [
|
|
2334
|
+
r("button", {
|
|
2335
|
+
ref_key: "buttonRef",
|
|
2336
|
+
ref: o,
|
|
2337
|
+
type: "button",
|
|
2338
|
+
class: I(["krds-btn small text drop-btn", { active: t.value }]),
|
|
2339
|
+
"aria-expanded": t.value,
|
|
2340
|
+
onClick: c
|
|
2341
|
+
}, [
|
|
2342
|
+
h[0] || (h[0] = r("i", { class: "svg-icon ico-global" }, null, -1)),
|
|
2343
|
+
J(l.$slots, "default"),
|
|
2344
|
+
h[1] || (h[1] = r("i", { class: "svg-icon ico-toggle" }, null, -1))
|
|
2345
|
+
], 10, ol),
|
|
2346
|
+
r("div", {
|
|
2347
|
+
class: "drop-menu",
|
|
2348
|
+
style: ae({ display: t.value ? "block" : "none" })
|
|
2349
|
+
}, [
|
|
2350
|
+
r("div", il, [
|
|
2351
|
+
l.$slots["prev-item"] ? (S(), w("div", rl, [
|
|
2352
|
+
J(l.$slots, "prev-item")
|
|
2353
|
+
])) : Y("", !0),
|
|
2354
|
+
n.type === "default" ? (S(), w("ul", ul, [
|
|
2355
|
+
(S(!0), w(F, null, N(l.languageList, (u) => (S(), w("li", {
|
|
2356
|
+
key: u.code
|
|
2357
|
+
}, [
|
|
2358
|
+
r("a", {
|
|
2359
|
+
href: "#",
|
|
2360
|
+
class: I(["item-link", { active: n.modelValue === u.code }]),
|
|
2361
|
+
lang: u.code,
|
|
2362
|
+
"aria-selected": n.modelValue === u.code,
|
|
2363
|
+
onClick: re((f) => m(u.code), ["prevent"]),
|
|
2364
|
+
onFocus: p
|
|
2365
|
+
}, [
|
|
2366
|
+
A(L(u.name) + " ", 1),
|
|
2367
|
+
r("span", cl, L(n.modelValue === u.code ? "선택됨" : ""), 1)
|
|
2368
|
+
], 42, dl)
|
|
2369
|
+
]))), 128))
|
|
2370
|
+
])) : n.type === "external" ? (S(), w("ul", fl, [
|
|
2371
|
+
(S(!0), w(F, null, N(l.languageList, (u) => (S(), w("li", {
|
|
2372
|
+
key: u.code
|
|
2373
|
+
}, [
|
|
2374
|
+
r("a", {
|
|
2375
|
+
href: u.url || "#",
|
|
2376
|
+
class: "item-link",
|
|
2377
|
+
lang: u.code,
|
|
2378
|
+
target: "_blank",
|
|
2379
|
+
title: "새 창 열림",
|
|
2380
|
+
onFocus: p
|
|
2381
|
+
}, [
|
|
2382
|
+
A(L(u.name) + " ", 1),
|
|
2383
|
+
h[2] || (h[2] = r("i", { class: "svg-icon ico-go" }, null, -1))
|
|
2384
|
+
], 40, vl)
|
|
2385
|
+
]))), 128))
|
|
2386
|
+
])) : Y("", !0)
|
|
2387
|
+
])
|
|
2388
|
+
], 4)
|
|
2389
|
+
], 34));
|
|
2390
|
+
}
|
|
2391
|
+
}), hl = { class: "drop-in" }, ml = { class: "drop-list" }, yl = ["data-adjust-scale", "onClick"], gl = { class: "drop-bottom" }, kl = /* @__PURE__ */ B({
|
|
2392
|
+
__name: "KrdsResize",
|
|
2393
|
+
emits: ["update:modelValue", "close"],
|
|
2394
|
+
setup(e, { emit: i }) {
|
|
2395
|
+
const n = i, a = K(!1), t = K(), s = K(), o = K("md"), c = [
|
|
2396
|
+
{ key: "sm", label: "작게", zoom: "0.9" },
|
|
2397
|
+
{ key: "md", label: "보통", zoom: "1" },
|
|
2398
|
+
{ key: "lg", label: "조금 크게", zoom: "1.1" },
|
|
2399
|
+
{ key: "xlg", label: "크게", zoom: "1.3" },
|
|
2400
|
+
{ key: "xxlg", label: "가장 크게", zoom: "1.5" }
|
|
2401
|
+
], d = () => {
|
|
2402
|
+
a.value = !a.value, a.value && t.value && k();
|
|
2403
|
+
}, m = () => {
|
|
2404
|
+
a.value = !1;
|
|
2405
|
+
}, g = (u) => {
|
|
2406
|
+
m(), n("close"), s.value?.focus(), o.value = u.key, document.body.style.zoom = u?.zoom;
|
|
2407
|
+
}, _ = () => {
|
|
2408
|
+
const u = c.find((f) => f.key === "md");
|
|
2409
|
+
u && g(u);
|
|
2410
|
+
}, k = () => {
|
|
2411
|
+
if (!t.value) return;
|
|
2412
|
+
const u = t.value.querySelector(".drop-menu");
|
|
2413
|
+
if (!u) return;
|
|
2414
|
+
const f = u.getBoundingClientRect(), x = window.innerWidth;
|
|
2415
|
+
t.value.classList.remove("drop-left", "drop-right"), f.left < 0 ? t.value.classList.add("drop-left") : x < f.left + f.width && t.value.classList.add("drop-right");
|
|
2416
|
+
}, D = (u) => {
|
|
2417
|
+
u.key === "Escape" && (m(), s.value?.focus());
|
|
2418
|
+
}, p = (u) => {
|
|
2419
|
+
t.value?.contains(u.target) || m();
|
|
2420
|
+
}, l = (u) => {
|
|
2421
|
+
t.value?.contains(u.relatedTarget) || m();
|
|
2422
|
+
}, h = (u) => {
|
|
2423
|
+
if (!t.value) return;
|
|
2424
|
+
t.value.querySelectorAll(".drop-list .item-link").forEach((R) => {
|
|
2425
|
+
R.style.position = "relative", R.style.zIndex = "0";
|
|
2426
|
+
});
|
|
2427
|
+
const x = u.target;
|
|
2428
|
+
x.style.zIndex = "1";
|
|
2429
|
+
};
|
|
2430
|
+
return ue(a, (u) => {
|
|
2431
|
+
u ? (document.addEventListener("keydown", D), document.addEventListener("click", p)) : (document.removeEventListener("keydown", D), document.removeEventListener("click", p));
|
|
2432
|
+
}), X(() => {
|
|
2433
|
+
document.removeEventListener("keydown", D), document.removeEventListener("click", p);
|
|
2434
|
+
}), (u, f) => (S(), w("div", {
|
|
2435
|
+
ref_key: "dropdownRef",
|
|
2436
|
+
ref: t,
|
|
2437
|
+
class: "krds-drop-wrap krds-resize",
|
|
2438
|
+
"data-adjust": "scale",
|
|
2439
|
+
onFocusout: l
|
|
2440
|
+
}, [
|
|
2441
|
+
r("button", {
|
|
2442
|
+
ref_key: "buttonRef",
|
|
2443
|
+
ref: s,
|
|
2444
|
+
type: "button",
|
|
2445
|
+
class: "krds-btn small text drop-btn",
|
|
2446
|
+
onClick: d
|
|
2447
|
+
}, [...f[0] || (f[0] = [
|
|
2448
|
+
A(" 화면크기 ", -1),
|
|
2449
|
+
r("i", { class: "svg-icon ico-toggle" }, null, -1)
|
|
2450
|
+
])], 512),
|
|
2451
|
+
r("div", {
|
|
2452
|
+
class: "drop-menu",
|
|
2453
|
+
style: ae({ display: a.value ? "block" : "none" })
|
|
2454
|
+
}, [
|
|
2455
|
+
r("div", hl, [
|
|
2456
|
+
r("ul", ml, [
|
|
2457
|
+
(S(), w(F, null, N(c, (x) => r("li", {
|
|
2458
|
+
key: x.key
|
|
2459
|
+
}, [
|
|
2460
|
+
r("button", {
|
|
2461
|
+
type: "button",
|
|
2462
|
+
class: I(["item-link", [x.key, x.key === o.value ? "active" : ""]]),
|
|
2463
|
+
"data-adjust-scale": x.key,
|
|
2464
|
+
onClick: re((R) => g(x), ["prevent"]),
|
|
2465
|
+
onFocus: h
|
|
2466
|
+
}, L(x.label), 43, yl)
|
|
2467
|
+
])), 64))
|
|
2468
|
+
]),
|
|
2469
|
+
r("div", gl, [
|
|
2470
|
+
r("button", {
|
|
2471
|
+
type: "button",
|
|
2472
|
+
class: "krds-btn medium text",
|
|
2473
|
+
"data-adjust-scale": "md",
|
|
2474
|
+
onClick: re(_, ["prevent"]),
|
|
2475
|
+
onFocus: h
|
|
2476
|
+
}, [...f[1] || (f[1] = [
|
|
2477
|
+
r("i", { class: "svg-icon ico-reset" }, null, -1),
|
|
2478
|
+
A(" 초기화 ", -1)
|
|
2479
|
+
])], 32)
|
|
2480
|
+
])
|
|
2481
|
+
])
|
|
2482
|
+
], 4)
|
|
2483
|
+
], 544));
|
|
1994
2484
|
}
|
|
1995
|
-
}),
|
|
2485
|
+
}), ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1996
2486
|
__proto__: null,
|
|
1997
|
-
KrdsBadge:
|
|
1998
|
-
KrdsBreadcrumb:
|
|
1999
|
-
KrdsButton:
|
|
2000
|
-
KrdsButtonGroup:
|
|
2001
|
-
KrdsCheckArea:
|
|
2002
|
-
KrdsCheckbox:
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2487
|
+
KrdsBadge: ht,
|
|
2488
|
+
KrdsBreadcrumb: zt,
|
|
2489
|
+
KrdsButton: Se,
|
|
2490
|
+
KrdsButtonGroup: Ie,
|
|
2491
|
+
KrdsCheckArea: St,
|
|
2492
|
+
KrdsCheckbox: wt,
|
|
2493
|
+
KrdsCoachMark: tl,
|
|
2494
|
+
KrdsContextualHelp: Gt,
|
|
2495
|
+
KrdsDateInput: ct,
|
|
2496
|
+
KrdsFileUpload: pt,
|
|
2497
|
+
KrdsFormGroup: Ae,
|
|
2498
|
+
KrdsFormHint: Pe,
|
|
2499
|
+
KrdsFormLabel: Te,
|
|
2500
|
+
KrdsIcon: Ee,
|
|
2501
|
+
KrdsInPageNavigation: Lt,
|
|
2502
|
+
KrdsInput: Re,
|
|
2503
|
+
KrdsLanguageSwitcher: pl,
|
|
2504
|
+
KrdsLink: Me,
|
|
2505
|
+
KrdsMasthead: gt,
|
|
2506
|
+
KrdsPagination: Pt,
|
|
2507
|
+
KrdsPanel: qt,
|
|
2508
|
+
KrdsRadio: Ct,
|
|
2509
|
+
KrdsResize: kl,
|
|
2510
|
+
KrdsSelect: vt,
|
|
2511
|
+
KrdsSkipLink: Bt,
|
|
2512
|
+
KrdsSpinner: we,
|
|
2513
|
+
KrdsStep: xt,
|
|
2514
|
+
KrdsStepIndicator: _t,
|
|
2515
|
+
KrdsTag: mt,
|
|
2516
|
+
KrdsTagGroup: yt,
|
|
2517
|
+
KrdsTextarea: ft,
|
|
2518
|
+
KrdsToggleSwitch: bt,
|
|
2519
|
+
KrdsTooltip: nl
|
|
2520
|
+
}, Symbol.toStringTag, { value: "Module" })), fe = {
|
|
2521
|
+
mounted(e, i) {
|
|
2522
|
+
i.value !== !1 && e.classList.add("sr-only");
|
|
2027
2523
|
},
|
|
2028
|
-
updated(e,
|
|
2029
|
-
|
|
2524
|
+
updated(e, i) {
|
|
2525
|
+
i.value === !1 ? e.classList.remove("sr-only") : e.classList.add("sr-only");
|
|
2030
2526
|
},
|
|
2031
2527
|
unmounted(e) {
|
|
2032
2528
|
e.classList.remove("sr-only");
|
|
2033
2529
|
}
|
|
2034
|
-
},
|
|
2035
|
-
"sr-only":
|
|
2036
|
-
},
|
|
2037
|
-
e.directive("sr-only",
|
|
2038
|
-
},
|
|
2530
|
+
}, ke = {
|
|
2531
|
+
"sr-only": fe
|
|
2532
|
+
}, Ce = (e) => {
|
|
2533
|
+
e.directive("sr-only", fe);
|
|
2534
|
+
}, be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2039
2535
|
__proto__: null,
|
|
2040
|
-
default:
|
|
2041
|
-
directives:
|
|
2042
|
-
installDirectives:
|
|
2043
|
-
vSrOnly:
|
|
2044
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2045
|
-
install(e,
|
|
2046
|
-
e.provide("krds:config",
|
|
2047
|
-
const n =
|
|
2048
|
-
n.forEach((
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2051
|
-
}), typeof
|
|
2536
|
+
default: ke,
|
|
2537
|
+
directives: ke,
|
|
2538
|
+
installDirectives: Ce,
|
|
2539
|
+
vSrOnly: fe
|
|
2540
|
+
}, Symbol.toStringTag, { value: "Module" })), wl = {
|
|
2541
|
+
install(e, i = {}) {
|
|
2542
|
+
e.provide("krds:config", i);
|
|
2543
|
+
const n = i.components || Object.keys(ge);
|
|
2544
|
+
n.forEach((a) => {
|
|
2545
|
+
const t = ge[a];
|
|
2546
|
+
t && e.component(a, t);
|
|
2547
|
+
}), typeof be == "object" && be !== null && Ce(e), e.config.globalProperties.$krds = {
|
|
2052
2548
|
version: "__VERSION__"
|
|
2053
2549
|
}, process.env.NODE_ENV !== "production" && console.log(`[KRDS Vue] v__VERSION__ 설치 완료 - 컴포넌트: ${n.length}개`);
|
|
2054
2550
|
}
|
|
2055
|
-
},
|
|
2551
|
+
}, Cl = "__VERSION__";
|
|
2056
2552
|
export {
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2553
|
+
ht as KrdsBadge,
|
|
2554
|
+
zt as KrdsBreadcrumb,
|
|
2555
|
+
Se as KrdsButton,
|
|
2556
|
+
Ie as KrdsButtonGroup,
|
|
2557
|
+
St as KrdsCheckArea,
|
|
2558
|
+
wt as KrdsCheckbox,
|
|
2559
|
+
tl as KrdsCoachMark,
|
|
2560
|
+
Gt as KrdsContextualHelp,
|
|
2561
|
+
ct as KrdsDateInput,
|
|
2562
|
+
pt as KrdsFileUpload,
|
|
2563
|
+
Ae as KrdsFormGroup,
|
|
2564
|
+
Pe as KrdsFormHint,
|
|
2565
|
+
Te as KrdsFormLabel,
|
|
2566
|
+
Ee as KrdsIcon,
|
|
2567
|
+
Lt as KrdsInPageNavigation,
|
|
2568
|
+
Re as KrdsInput,
|
|
2569
|
+
pl as KrdsLanguageSwitcher,
|
|
2570
|
+
Me as KrdsLink,
|
|
2571
|
+
gt as KrdsMasthead,
|
|
2572
|
+
Pt as KrdsPagination,
|
|
2573
|
+
qt as KrdsPanel,
|
|
2574
|
+
Ct as KrdsRadio,
|
|
2575
|
+
kl as KrdsResize,
|
|
2576
|
+
vt as KrdsSelect,
|
|
2577
|
+
Bt as KrdsSkipLink,
|
|
2578
|
+
we as KrdsSpinner,
|
|
2579
|
+
xt as KrdsStep,
|
|
2580
|
+
_t as KrdsStepIndicator,
|
|
2581
|
+
mt as KrdsTag,
|
|
2582
|
+
yt as KrdsTagGroup,
|
|
2583
|
+
ft as KrdsTextarea,
|
|
2584
|
+
bt as KrdsToggleSwitch,
|
|
2585
|
+
nl as KrdsTooltip,
|
|
2586
|
+
ce as classNames,
|
|
2587
|
+
wl as default,
|
|
2588
|
+
de as generateId,
|
|
2589
|
+
Sl as generateUid,
|
|
2590
|
+
Cl as version
|
|
2089
2591
|
};
|
|
2090
2592
|
//# sourceMappingURL=krds-vue.es.js.map
|