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