@krds.ui/vue 0.0.8 → 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 +553 -549
- 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 +2 -0
- package/package.json +23 -23
package/dist/krds-vue.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, computed as y, h as v, ref as K, onMounted as le, onBeforeUnmount as Ke, createElementBlock as
|
|
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
2
|
const Se = B({
|
|
3
3
|
name: "KrdsButton",
|
|
4
4
|
props: {
|
|
@@ -26,6 +26,10 @@ const Se = B({
|
|
|
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,34 +40,34 @@ const Se = B({
|
|
|
36
40
|
}
|
|
37
41
|
},
|
|
38
42
|
emits: ["click"],
|
|
39
|
-
setup(e, { emit:
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
return e.icon &&
|
|
43
|
-
}), t = (
|
|
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
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
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:
|
|
64
|
+
setup(e, { slots: o }) {
|
|
61
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({
|
|
@@ -120,26 +124,26 @@ const Se = B({
|
|
|
120
124
|
}
|
|
121
125
|
},
|
|
122
126
|
emits: ["click"],
|
|
123
|
-
setup(e, { emit:
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
return e.size &&
|
|
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;
|
|
127
131
|
}), t = y(() => {
|
|
128
|
-
const
|
|
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
140
|
return () => v(
|
|
137
141
|
"a",
|
|
138
142
|
{
|
|
139
143
|
...t.value,
|
|
140
|
-
onClick:
|
|
144
|
+
onClick: a
|
|
141
145
|
},
|
|
142
|
-
|
|
146
|
+
s.default?.()
|
|
143
147
|
);
|
|
144
148
|
}
|
|
145
149
|
}), we = B({
|
|
@@ -243,27 +247,27 @@ const Se = B({
|
|
|
243
247
|
}
|
|
244
248
|
},
|
|
245
249
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup"],
|
|
246
|
-
setup(e, { emit:
|
|
247
|
-
const
|
|
250
|
+
setup(e, { emit: o, slots: s }) {
|
|
251
|
+
const n = y(() => {
|
|
248
252
|
const k = ["krds-input"];
|
|
249
253
|
return e.size && k.push(e.size), e.class && k.push(e.class), k;
|
|
250
254
|
}), t = (k) => {
|
|
251
255
|
const D = k.target, p = e.type === "number" ? Number(D.value) : D.value;
|
|
252
|
-
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
},
|
|
256
|
-
|
|
257
|
-
}, c = (k) => {
|
|
258
|
-
i("blur", k);
|
|
256
|
+
o("update:modelValue", p), o("input", k);
|
|
257
|
+
}, a = (k) => {
|
|
258
|
+
o("change", k);
|
|
259
|
+
}, i = (k) => {
|
|
260
|
+
o("focus", k);
|
|
259
261
|
}, d = (k) => {
|
|
260
|
-
|
|
262
|
+
o("blur", k);
|
|
263
|
+
}, c = (k) => {
|
|
264
|
+
o("keydown", k);
|
|
261
265
|
}, m = (k) => {
|
|
262
|
-
|
|
266
|
+
o("keyup", k);
|
|
263
267
|
}, g = y(() => {
|
|
264
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,
|
|
@@ -274,20 +278,20 @@ const Se = B({
|
|
|
274
278
|
autocomplete: e.autocomplete,
|
|
275
279
|
autofocus: e.autofocus,
|
|
276
280
|
onInput: t,
|
|
277
|
-
onChange:
|
|
278
|
-
onFocus:
|
|
279
|
-
onBlur:
|
|
280
|
-
onKeydown:
|
|
281
|
+
onChange: a,
|
|
282
|
+
onFocus: i,
|
|
283
|
+
onBlur: d,
|
|
284
|
+
onKeydown: c,
|
|
281
285
|
onKeyup: m
|
|
282
286
|
};
|
|
283
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;
|
|
284
|
-
}),
|
|
288
|
+
}), x = y(() => {
|
|
285
289
|
const k = ["form-conts"];
|
|
286
290
|
return e.state !== "default" && k.push(`is-${e.state}`), e.icon && k.push("btn-ico-wrap"), k;
|
|
287
291
|
});
|
|
288
292
|
return () => {
|
|
289
293
|
const k = [v("input", g.value)];
|
|
290
|
-
return e.loading ? v("div", { class:
|
|
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({
|
|
@@ -311,9 +315,9 @@ const Se = B({
|
|
|
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
322
|
return () => v("div", { class: "form-tit" }, [
|
|
319
323
|
v(
|
|
@@ -323,9 +327,9 @@ const Se = B({
|
|
|
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
|
}
|
|
@@ -350,26 +354,26 @@ const Se = B({
|
|
|
350
354
|
}
|
|
351
355
|
},
|
|
352
356
|
emits: ["click"],
|
|
353
|
-
setup(e, { emit:
|
|
354
|
-
const
|
|
355
|
-
|
|
357
|
+
setup(e, { emit: o, slots: s }) {
|
|
358
|
+
const n = (a) => {
|
|
359
|
+
o("click", a);
|
|
356
360
|
}, t = () => {
|
|
357
|
-
let
|
|
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
378
|
return () => v(
|
|
375
379
|
"p",
|
|
@@ -377,9 +381,9 @@ const Se = B({
|
|
|
377
381
|
id: e.id,
|
|
378
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({
|
|
@@ -398,94 +402,94 @@ const Se = B({
|
|
|
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
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 Fe(e,
|
|
418
|
-
const
|
|
419
|
-
const h =
|
|
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 = [];
|
|
420
424
|
for (let f = h - 10; f <= h + 10; f++)
|
|
421
425
|
u.push(f);
|
|
422
426
|
return u;
|
|
423
427
|
}), m = y(() => Array.from({ length: 12 }, (h, u) => u + 1)), g = () => {
|
|
424
|
-
|
|
425
|
-
},
|
|
426
|
-
t.value === 1 ? (t.value = 12,
|
|
428
|
+
a.value = null, i.value = null;
|
|
429
|
+
}, x = () => {
|
|
430
|
+
t.value === 1 ? (t.value = 12, n.value -= 1) : t.value -= 1;
|
|
427
431
|
}, k = () => {
|
|
428
|
-
t.value === 12 ? (t.value = 1,
|
|
432
|
+
t.value === 12 ? (t.value = 1, n.value += 1) : t.value += 1;
|
|
429
433
|
}, D = (h, u = !1) => {
|
|
430
434
|
if (u)
|
|
431
|
-
|
|
432
|
-
else if (!
|
|
433
|
-
|
|
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 f = new Date(
|
|
436
|
-
new Date(h.replace(/\./g, "-")) < f ? (
|
|
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:
|
|
445
|
+
currentYear: n,
|
|
442
446
|
currentMonth: t,
|
|
443
|
-
selectedStartDate:
|
|
444
|
-
selectedEndDate:
|
|
445
|
-
activeDateSelector:
|
|
447
|
+
selectedStartDate: a,
|
|
448
|
+
selectedEndDate: i,
|
|
449
|
+
activeDateSelector: d,
|
|
446
450
|
// Computed
|
|
447
|
-
yearOptions:
|
|
451
|
+
yearOptions: c,
|
|
448
452
|
monthOptions: m,
|
|
449
453
|
// Methods
|
|
450
454
|
clearDateSelection: g,
|
|
451
|
-
prevMonth:
|
|
455
|
+
prevMonth: x,
|
|
452
456
|
nextMonth: k,
|
|
453
457
|
handleDateSelection: D,
|
|
454
458
|
selectToday: () => {
|
|
455
|
-
const h = `${
|
|
459
|
+
const h = `${s.getFullYear()}.${String(s.getMonth() + 1).padStart(2, "0")}.${String(s.getDate()).padStart(2, "0")}`;
|
|
456
460
|
D(h, !0);
|
|
457
461
|
},
|
|
458
462
|
isDateInSelectedRange: (h) => {
|
|
459
|
-
if (!
|
|
463
|
+
if (!a.value || !i.value)
|
|
460
464
|
return { isInRange: !1, isStart: !1, isEnd: !1 };
|
|
461
|
-
const u = new Date(h.replace(/\./g, "-")), f = new Date(
|
|
462
|
-
return { isInRange: u >= f && u <=
|
|
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 Oe(e,
|
|
467
|
-
let
|
|
468
|
-
const t = typeof
|
|
469
|
-
|
|
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) => {
|
|
470
474
|
const g = m.target;
|
|
471
|
-
e.value?.contains(g) ||
|
|
472
|
-
}, document.addEventListener(
|
|
473
|
-
},
|
|
474
|
-
if (
|
|
475
|
-
const m = typeof
|
|
476
|
-
document.removeEventListener(m,
|
|
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
483
|
return le(() => {
|
|
480
|
-
c();
|
|
481
|
-
}), Ke(() => {
|
|
482
484
|
d();
|
|
485
|
+
}), Ke(() => {
|
|
486
|
+
c();
|
|
483
487
|
}), {
|
|
484
|
-
setupGlobalListeners:
|
|
485
|
-
removeGlobalListeners:
|
|
488
|
+
setupGlobalListeners: d,
|
|
489
|
+
removeGlobalListeners: c
|
|
486
490
|
};
|
|
487
491
|
}
|
|
488
|
-
const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id", "name", "placeholder", "value", "readonly", "disabled", "required", "autofocus"], je = ["disabled", "aria-expanded"], We = { class: "calendar-head" }, Ye = { class: "calendar-switch-wrap" }, Ge = { class: "calendar-drop-down" }, Ue = ["aria-expanded"], Xe = { class: "calendar-select calendar-year-wrap" }, Je = { class: "sel year" }, Qe = ["onClick"], Ze = { class: "calendar-drop-down" }, et = ["aria-expanded"], tt = { class: "calendar-select calendar-mon-wrap" }, lt = { class: "sel month" }, at = ["onClick"],
|
|
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,12 +509,12 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["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:
|
|
512
|
+
setup(e, { emit: o }) {
|
|
513
|
+
const s = e, n = o, t = K(), a = K(), i = K(!1), d = K(null), {
|
|
514
|
+
currentYear: c,
|
|
511
515
|
currentMonth: m,
|
|
512
516
|
selectedStartDate: g,
|
|
513
|
-
selectedEndDate:
|
|
517
|
+
selectedEndDate: x,
|
|
514
518
|
yearOptions: k,
|
|
515
519
|
monthOptions: D,
|
|
516
520
|
prevMonth: p,
|
|
@@ -518,21 +522,21 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
518
522
|
handleDateSelection: h,
|
|
519
523
|
selectToday: u,
|
|
520
524
|
isDateInSelectedRange: f
|
|
521
|
-
} = Fe(
|
|
522
|
-
|
|
525
|
+
} = Fe(s.initialYear, s.initialMonth), _ = () => {
|
|
526
|
+
i.value && a.value?.focus(), i.value = !1, d.value = null;
|
|
523
527
|
};
|
|
524
|
-
Oe(t,
|
|
528
|
+
Oe(t, _, ".calendar-conts");
|
|
525
529
|
const R = y(() => {
|
|
526
|
-
const
|
|
527
|
-
return
|
|
530
|
+
const w = ["krds-input", "datepicker", "cal"];
|
|
531
|
+
return s.size && w.push(s.size), s.class && w.push(s.class), w;
|
|
528
532
|
}), E = y(() => ["form-conts", "calendar-conts"]), M = y(() => ({
|
|
529
533
|
"krds-calendar-area": !0,
|
|
530
|
-
active:
|
|
534
|
+
active: i.value
|
|
531
535
|
})), z = y(() => {
|
|
532
|
-
const
|
|
536
|
+
const w = c.value, C = m.value, $ = new Date(w, C - 1, 1), G = new Date($);
|
|
533
537
|
G.setDate(G.getDate() - $.getDay());
|
|
534
538
|
const W = [], T = new Date(G);
|
|
535
|
-
for (let
|
|
539
|
+
for (let se = 0; se < 6; se++) {
|
|
536
540
|
const pe = [];
|
|
537
541
|
for (let he = 0; he < 7; he++) {
|
|
538
542
|
const $e = `${T.getFullYear()}.${String(T.getMonth() + 1).padStart(2, "0")}.${String(T.getDate()).padStart(2, "0")}`, me = T.getDay();
|
|
@@ -550,10 +554,10 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
550
554
|
W.push(pe);
|
|
551
555
|
}
|
|
552
556
|
return W;
|
|
553
|
-
}), H = (
|
|
557
|
+
}), H = (w) => {
|
|
554
558
|
const C = [];
|
|
555
|
-
if (
|
|
556
|
-
const $ = f(
|
|
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);
|
|
557
561
|
$.isInRange && (C.push("period"), $.isStart && C.push("start"), $.isEnd && C.push("end"));
|
|
558
562
|
}
|
|
559
563
|
return C;
|
|
@@ -572,7 +576,7 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["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",
|
|
@@ -582,66 +586,66 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
582
586
|
size: "small",
|
|
583
587
|
handler: U
|
|
584
588
|
}
|
|
585
|
-
]), j = (
|
|
586
|
-
|
|
587
|
-
}, Z = (
|
|
588
|
-
|
|
589
|
-
},
|
|
590
|
-
m.value =
|
|
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;
|
|
591
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
604
|
}, O = () => {
|
|
601
|
-
|
|
605
|
+
i.value = !0, d.value = null, setTimeout(() => {
|
|
602
606
|
t.value?.querySelector(".calendar-wrap")?.focus();
|
|
603
607
|
}, 50);
|
|
604
608
|
}, q = () => {
|
|
605
|
-
|
|
606
|
-
}, ve = (
|
|
607
|
-
|
|
608
|
-
}, ee = (
|
|
609
|
-
const C =
|
|
610
|
-
|
|
611
|
-
},
|
|
612
|
-
|
|
613
|
-
},
|
|
614
|
-
|
|
615
|
-
}, Be = (
|
|
616
|
-
|
|
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 (
|
|
622
|
+
return (w, C) => (b(), S("div", qe, [
|
|
619
623
|
r("div", {
|
|
620
624
|
class: I(E.value)
|
|
621
625
|
}, [
|
|
622
626
|
r("div", Ne, [
|
|
623
627
|
r("input", {
|
|
624
|
-
id:
|
|
625
|
-
name:
|
|
628
|
+
id: e.id,
|
|
629
|
+
name: e.name,
|
|
626
630
|
class: I(R.value),
|
|
627
|
-
placeholder:
|
|
628
|
-
value:
|
|
629
|
-
readonly:
|
|
630
|
-
disabled:
|
|
631
|
-
required:
|
|
632
|
-
autofocus:
|
|
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
638
|
onInput: ee,
|
|
635
|
-
onChange:
|
|
636
|
-
onFocus:
|
|
639
|
+
onChange: xe,
|
|
640
|
+
onFocus: _e,
|
|
637
641
|
onBlur: Be
|
|
638
642
|
}, null, 42, He),
|
|
639
643
|
r("button", {
|
|
640
644
|
ref_key: "datePickerButtonRef",
|
|
641
|
-
ref:
|
|
642
|
-
class: I(`krds-btn ${
|
|
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
650
|
onClick: q
|
|
647
651
|
}, [...C[4] || (C[4] = [
|
|
@@ -675,21 +679,21 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
675
679
|
type: "button",
|
|
676
680
|
class: "btn-cal-switch year",
|
|
677
681
|
"aria-label": "연도 선택",
|
|
678
|
-
"aria-expanded":
|
|
682
|
+
"aria-expanded": d.value === "year",
|
|
679
683
|
onClick: C[1] || (C[1] = ($) => j("year"))
|
|
680
|
-
}, L(P(
|
|
684
|
+
}, L(P(c)) + "년 ", 9, Ue),
|
|
681
685
|
Q(r("div", Xe, [
|
|
682
686
|
r("ul", Je, [
|
|
683
|
-
(
|
|
687
|
+
(b(!0), S(F, null, N(P(k), ($) => (b(), S("li", { key: $ }, [
|
|
684
688
|
r("button", {
|
|
685
689
|
type: "button",
|
|
686
|
-
class: I({ active: $ === P(
|
|
690
|
+
class: I({ active: $ === P(c) }),
|
|
687
691
|
onClick: (G) => Z($)
|
|
688
692
|
}, L($) + "년", 11, Qe)
|
|
689
693
|
]))), 128))
|
|
690
694
|
])
|
|
691
695
|
], 512), [
|
|
692
|
-
[te,
|
|
696
|
+
[te, d.value === "year"]
|
|
693
697
|
])
|
|
694
698
|
]),
|
|
695
699
|
r("div", Ze, [
|
|
@@ -697,21 +701,21 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
697
701
|
type: "button",
|
|
698
702
|
class: "btn-cal-switch month",
|
|
699
703
|
"aria-label": "월 선택",
|
|
700
|
-
"aria-expanded":
|
|
704
|
+
"aria-expanded": d.value === "month",
|
|
701
705
|
onClick: C[2] || (C[2] = ($) => j("month"))
|
|
702
706
|
}, L(P(m).toString().padStart(2, "0")) + "월 ", 9, et),
|
|
703
707
|
Q(r("div", tt, [
|
|
704
708
|
r("ul", lt, [
|
|
705
|
-
(
|
|
709
|
+
(b(!0), S(F, null, N(P(D), ($) => (b(), S("li", { key: $ }, [
|
|
706
710
|
r("button", {
|
|
707
711
|
type: "button",
|
|
708
712
|
class: I({ active: $ === P(m) }),
|
|
709
|
-
onClick: (G) =>
|
|
713
|
+
onClick: (G) => ne($)
|
|
710
714
|
}, L($.toString().padStart(2, "0")) + "월 ", 11, at)
|
|
711
715
|
]))), 128))
|
|
712
716
|
])
|
|
713
717
|
], 512), [
|
|
714
|
-
[te,
|
|
718
|
+
[te, d.value === "month"]
|
|
715
719
|
])
|
|
716
720
|
])
|
|
717
721
|
]),
|
|
@@ -724,10 +728,10 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
724
728
|
r("span", { class: "sr-only" }, "다음 달", -1)
|
|
725
729
|
])])
|
|
726
730
|
]),
|
|
727
|
-
r("div",
|
|
728
|
-
r("div",
|
|
731
|
+
r("div", nt, [
|
|
732
|
+
r("div", st, [
|
|
729
733
|
r("table", ot, [
|
|
730
|
-
r("caption", null, L(P(
|
|
734
|
+
r("caption", null, L(P(c)) + "년 " + L(P(m).toString().padStart(2, "0")) + "월", 1),
|
|
731
735
|
C[7] || (C[7] = r("thead", null, [
|
|
732
736
|
r("tr", null, [
|
|
733
737
|
r("th", null, "일"),
|
|
@@ -740,8 +744,8 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
740
744
|
])
|
|
741
745
|
], -1)),
|
|
742
746
|
r("tbody", null, [
|
|
743
|
-
(
|
|
744
|
-
(
|
|
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", {
|
|
745
749
|
key: T,
|
|
746
750
|
class: I(H(W)),
|
|
747
751
|
"data-date": W.dateString
|
|
@@ -750,7 +754,7 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
750
754
|
type: "button",
|
|
751
755
|
class: "btn-set-date",
|
|
752
756
|
"aria-pressed": P(f)(W.dateString).isInRange ? "true" : "false",
|
|
753
|
-
onClick: (
|
|
757
|
+
onClick: (se) => P(h)(W.dateString)
|
|
754
758
|
}, [
|
|
755
759
|
r("span", null, L(W.day), 1)
|
|
756
760
|
], 8, rt)
|
|
@@ -762,7 +766,7 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
762
766
|
]),
|
|
763
767
|
r("div", ut, [
|
|
764
768
|
r("div", dt, [
|
|
765
|
-
(
|
|
769
|
+
(b(!0), S(F, null, N(V.value, ($) => (b(), oe(P(Se), {
|
|
766
770
|
id: $.id,
|
|
767
771
|
key: $.id,
|
|
768
772
|
class: I($.class),
|
|
@@ -778,7 +782,7 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
778
782
|
])
|
|
779
783
|
])
|
|
780
784
|
], 544), [
|
|
781
|
-
[te,
|
|
785
|
+
[te, i.value]
|
|
782
786
|
])
|
|
783
787
|
], 2)
|
|
784
788
|
], 2)
|
|
@@ -858,37 +862,37 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
858
862
|
}
|
|
859
863
|
},
|
|
860
864
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup"],
|
|
861
|
-
setup(e, { emit:
|
|
862
|
-
const
|
|
865
|
+
setup(e, { emit: o }) {
|
|
866
|
+
const s = K(0);
|
|
863
867
|
ue(
|
|
864
868
|
() => e.modelValue,
|
|
865
869
|
(l) => {
|
|
866
|
-
|
|
870
|
+
s.value = (l || "").length;
|
|
867
871
|
},
|
|
868
872
|
{ immediate: !0 }
|
|
869
873
|
);
|
|
870
|
-
const
|
|
874
|
+
const n = y(() => {
|
|
871
875
|
const l = ["krds-input"];
|
|
872
876
|
return e.size && l.push(e.size), e.class && l.push(e.class), l;
|
|
873
877
|
}), t = y(() => {
|
|
874
878
|
const l = {};
|
|
875
879
|
return e.resize && (l.resize = e.resize), l;
|
|
876
|
-
}),
|
|
880
|
+
}), a = (l) => {
|
|
877
881
|
const u = l.target.value;
|
|
878
|
-
|
|
879
|
-
},
|
|
880
|
-
|
|
881
|
-
}, c = (l) => {
|
|
882
|
-
i("focus", l);
|
|
882
|
+
s.value = u.length, o("update:modelValue", u), o("input", l);
|
|
883
|
+
}, i = (l) => {
|
|
884
|
+
o("change", l);
|
|
883
885
|
}, d = (l) => {
|
|
884
|
-
|
|
886
|
+
o("focus", l);
|
|
887
|
+
}, c = (l) => {
|
|
888
|
+
o("blur", l);
|
|
885
889
|
}, m = (l) => {
|
|
886
|
-
|
|
890
|
+
o("keydown", l);
|
|
887
891
|
}, g = (l) => {
|
|
888
|
-
|
|
889
|
-
},
|
|
892
|
+
o("keyup", l);
|
|
893
|
+
}, x = y(() => {
|
|
890
894
|
const l = {
|
|
891
|
-
class:
|
|
895
|
+
class: n.value,
|
|
892
896
|
style: t.value,
|
|
893
897
|
value: e.modelValue,
|
|
894
898
|
placeholder: e.placeholder,
|
|
@@ -900,24 +904,24 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["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
|
+
onInput: a,
|
|
908
|
+
onChange: i,
|
|
909
|
+
onFocus: d,
|
|
910
|
+
onBlur: c,
|
|
907
911
|
onKeydown: m,
|
|
908
912
|
onKeyup: g
|
|
909
913
|
};
|
|
910
914
|
return e.maxlength !== void 0 && (l.maxlength = e.maxlength), e.minlength !== void 0 && (l.minlength = e.minlength), l;
|
|
911
915
|
}), k = y(() => ["form-conts"]), D = y(() => ["textarea-wrap"]), p = y(() => {
|
|
912
916
|
if (!e.showCount) return null;
|
|
913
|
-
const l =
|
|
917
|
+
const l = s.value, h = e.maxlength;
|
|
914
918
|
return {
|
|
915
919
|
current: l,
|
|
916
920
|
max: h || ""
|
|
917
921
|
};
|
|
918
922
|
});
|
|
919
923
|
return () => {
|
|
920
|
-
const l = [v("textarea",
|
|
924
|
+
const l = [v("textarea", x.value)];
|
|
921
925
|
return p.value && l.push(
|
|
922
926
|
v("p", { class: "textarea-count" }, [
|
|
923
927
|
v("span", { class: "count-now" }, p.value.current),
|
|
@@ -975,49 +979,49 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["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
986
|
}), t = (g) => {
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
},
|
|
986
|
-
|
|
987
|
-
},
|
|
988
|
-
|
|
989
|
-
},
|
|
990
|
-
class:
|
|
987
|
+
const x = g.target, k = x.value === "" ? null : x.value;
|
|
988
|
+
o("update:modelValue", k);
|
|
989
|
+
}, a = (g) => {
|
|
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
1000
|
onChange: t,
|
|
997
|
-
onFocus:
|
|
998
|
-
onBlur:
|
|
999
|
-
})),
|
|
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(v("option", { value: "", disabled: !0, selected: !0 }, e.placeholder)), e.options && e.options.length > 0 && e.options.forEach((
|
|
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 = v("select",
|
|
1020
|
-
return e.sort ? g : v("div", { class:
|
|
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({
|
|
@@ -1123,13 +1127,13 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
1123
1127
|
"download",
|
|
1124
1128
|
"preview"
|
|
1125
1129
|
],
|
|
1126
|
-
setup(e, { emit:
|
|
1130
|
+
setup(e, { emit: o }) {
|
|
1127
1131
|
K(!1), y(() => {
|
|
1128
|
-
const
|
|
1129
|
-
return e.class &&
|
|
1132
|
+
const n = ["krds-file-upload", "line"];
|
|
1133
|
+
return e.class && n.push(e.class), n;
|
|
1130
1134
|
});
|
|
1131
|
-
const
|
|
1132
|
-
return y(() => !e.disabled &&
|
|
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",
|
|
@@ -1156,12 +1160,12 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
1156
1160
|
}
|
|
1157
1161
|
},
|
|
1158
1162
|
emits: ["click"],
|
|
1159
|
-
setup(e, { emit:
|
|
1160
|
-
const
|
|
1161
|
-
const
|
|
1162
|
-
return
|
|
1163
|
-
}), t = (
|
|
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
1170
|
return () => v(
|
|
1167
1171
|
"span",
|
|
@@ -1170,10 +1174,10 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
1170
1174
|
color: e.color,
|
|
1171
1175
|
size: e.size,
|
|
1172
1176
|
number: e.number,
|
|
1173
|
-
class:
|
|
1177
|
+
class: n.value,
|
|
1174
1178
|
onClick: t
|
|
1175
1179
|
},
|
|
1176
|
-
|
|
1180
|
+
s.default?.()
|
|
1177
1181
|
);
|
|
1178
1182
|
}
|
|
1179
1183
|
}), mt = B({
|
|
@@ -1201,13 +1205,13 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
1201
1205
|
}
|
|
1202
1206
|
},
|
|
1203
1207
|
emits: ["remove"],
|
|
1204
|
-
setup(e, { emit:
|
|
1205
|
-
const
|
|
1206
|
-
const
|
|
1207
|
-
return e.link &&
|
|
1208
|
-
}), t = (
|
|
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",
|
|
@@ -1217,20 +1221,20 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
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
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
|
}
|
|
@@ -1246,17 +1250,17 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["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
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({
|
|
@@ -1268,23 +1272,23 @@ const qe = { class: "form-conts" }, Ne = { class: "calendar-input" }, He = ["id"
|
|
|
1268
1272
|
}
|
|
1269
1273
|
},
|
|
1270
1274
|
emits: ["click"],
|
|
1271
|
-
setup(e, { emit:
|
|
1272
|
-
const
|
|
1273
|
-
const
|
|
1274
|
-
return e.class &&
|
|
1275
|
-
}), t = (
|
|
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
1282
|
return () => v(
|
|
1279
1283
|
"div",
|
|
1280
1284
|
{
|
|
1281
1285
|
id: "krds-masthead",
|
|
1282
|
-
class:
|
|
1286
|
+
class: n.value,
|
|
1283
1287
|
onClick: t
|
|
1284
1288
|
},
|
|
1285
1289
|
[
|
|
1286
1290
|
v("div", { class: "toggle-wrap" }, [
|
|
1287
|
-
v("div", { class: "toggle-head" }, [v("div", { class: "inner" }, [v("span", { class: "nuri-txt" },
|
|
1291
|
+
v("div", { class: "toggle-head" }, [v("div", { class: "inner" }, [v("span", { class: "nuri-txt" }, s.default?.())])])
|
|
1288
1292
|
])
|
|
1289
1293
|
]
|
|
1290
1294
|
);
|
|
@@ -1295,8 +1299,8 @@ function de(e = "krds") {
|
|
|
1295
1299
|
return `${e}-${++kt}`;
|
|
1296
1300
|
}
|
|
1297
1301
|
function Sl() {
|
|
1298
|
-
const e = Date.now().toString(36).slice(-4),
|
|
1299
|
-
return `${e}${
|
|
1302
|
+
const e = Date.now().toString(36).slice(-4), o = Math.random().toString(36).substring(2, 5);
|
|
1303
|
+
return `${e}${o}`;
|
|
1300
1304
|
}
|
|
1301
1305
|
function ce(...e) {
|
|
1302
1306
|
return e.filter(Boolean).join(" ");
|
|
@@ -1343,13 +1347,13 @@ const bt = B({
|
|
|
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 m =
|
|
1351
|
-
|
|
1352
|
-
},
|
|
1354
|
+
const m = d.target.checked;
|
|
1355
|
+
o("update:modelValue", m), o("change", m);
|
|
1356
|
+
}, i = y(() => e.id || de("toggle-switch"));
|
|
1353
1357
|
return () => v(
|
|
1354
1358
|
"div",
|
|
1355
1359
|
{
|
|
@@ -1358,17 +1362,17 @@ const bt = B({
|
|
|
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(
|
|
@@ -1396,15 +1400,15 @@ const bt = B({
|
|
|
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
|
}
|
|
@@ -1439,40 +1443,40 @@ const bt = B({
|
|
|
1439
1443
|
},
|
|
1440
1444
|
emits: ["update:modelValue"],
|
|
1441
1445
|
slots: Object,
|
|
1442
|
-
setup(e, { emit:
|
|
1443
|
-
const t = y(() => e.modelValue),
|
|
1444
|
-
const
|
|
1445
|
-
return ce(
|
|
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
|
|
1457
|
+
const c = [
|
|
1454
1458
|
v("input", {
|
|
1455
1459
|
type: "checkbox",
|
|
1456
|
-
id:
|
|
1460
|
+
id: d.value,
|
|
1457
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
|
}
|
|
@@ -1515,45 +1519,45 @@ const bt = B({
|
|
|
1515
1519
|
},
|
|
1516
1520
|
emits: ["update:modelValue"],
|
|
1517
1521
|
slots: Object,
|
|
1518
|
-
setup(e, { emit:
|
|
1519
|
-
const t = y(() => e.modelValue === e.value),
|
|
1522
|
+
setup(e, { emit: o, attrs: s, slots: n }) {
|
|
1523
|
+
const t = y(() => e.modelValue === e.value), a = y(() => {
|
|
1520
1524
|
const m = e.chip ? "krds-form-chip" : "krds-form-check";
|
|
1521
1525
|
return ce(m, e.size, e.class);
|
|
1522
|
-
}),
|
|
1526
|
+
}), i = (m) => {
|
|
1523
1527
|
if (e.disabled)
|
|
1524
1528
|
return;
|
|
1525
|
-
m.target.checked &&
|
|
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
1532
|
const m = [
|
|
1529
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
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 bt = B({
|
|
|
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
|
-
}, t = K(0),
|
|
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 = () => {
|
|
1577
1581
|
t.value = 0;
|
|
1578
|
-
},
|
|
1582
|
+
}, i = () => t.value++;
|
|
1579
1583
|
return De("stepIndicator", {
|
|
1580
1584
|
activeStep: y(() => e.modelValue || 0),
|
|
1581
|
-
getStepStatus:
|
|
1582
|
-
getNextStepIndex:
|
|
1583
|
-
resetStepIndex:
|
|
1584
|
-
}), () => (
|
|
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,31 +1614,31 @@ const bt = B({
|
|
|
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
|
|
1625
|
+
const c = a.value === "active";
|
|
1622
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
|
);
|
|
@@ -1667,7 +1671,7 @@ const bt = B({
|
|
|
1667
1671
|
default: "krds-skip-link"
|
|
1668
1672
|
}
|
|
1669
1673
|
},
|
|
1670
|
-
setup(e, { slots:
|
|
1674
|
+
setup(e, { slots: o }) {
|
|
1671
1675
|
return () => v(
|
|
1672
1676
|
"div",
|
|
1673
1677
|
{
|
|
@@ -1680,7 +1684,7 @@ const bt = B({
|
|
|
1680
1684
|
{
|
|
1681
1685
|
href: e.href
|
|
1682
1686
|
},
|
|
1683
|
-
|
|
1687
|
+
o.default?.()
|
|
1684
1688
|
)
|
|
1685
1689
|
]
|
|
1686
1690
|
);
|
|
@@ -1694,27 +1698,27 @@ const bt = B({
|
|
|
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
1710
|
r("ol", Kt, [
|
|
1707
|
-
(
|
|
1711
|
+
(b(!0), S(F, null, N(e.items, (c, m) => (b(), S("li", {
|
|
1708
1712
|
key: `breadcrumb-${m}`,
|
|
1709
|
-
class: I({ home: m === 0 &&
|
|
1713
|
+
class: I({ home: m === 0 && e.showHomeIcon })
|
|
1710
1714
|
}, [
|
|
1711
1715
|
r("a", {
|
|
1712
|
-
href:
|
|
1716
|
+
href: c.href || "#",
|
|
1713
1717
|
class: "txt",
|
|
1714
1718
|
"aria-current": t(m) ? "page" : void 0,
|
|
1715
|
-
onClick: (g) =>
|
|
1719
|
+
onClick: (g) => a(c, g)
|
|
1716
1720
|
}, [
|
|
1717
|
-
m === 0 &&
|
|
1721
|
+
m === 0 && e.showHomeIcon ? Y("", !0) : (b(), S("span", Vt, L(c.text), 1))
|
|
1718
1722
|
], 8, Dt)
|
|
1719
1723
|
], 2))), 128))
|
|
1720
1724
|
])
|
|
@@ -1754,30 +1758,30 @@ const bt = B({
|
|
|
1754
1758
|
},
|
|
1755
1759
|
emits: ["itemClick"],
|
|
1756
1760
|
slots: Object,
|
|
1757
|
-
setup(e, { emit:
|
|
1758
|
-
const
|
|
1761
|
+
setup(e, { emit: o, slots: s }) {
|
|
1762
|
+
const n = K(""), t = K(/* @__PURE__ */ new Map()), a = y(() => {
|
|
1759
1763
|
const p = ["krds-in-page-navigation-type"];
|
|
1760
1764
|
return e.class && p.push(e.class), p;
|
|
1761
|
-
}),
|
|
1765
|
+
}), i = () => {
|
|
1762
1766
|
const p = e.headerTopSelector, l = e.headerInnerSelector, h = document.querySelector(p)?.clientHeight || 0, u = document.querySelector(l)?.clientHeight || 0;
|
|
1763
1767
|
return h + u;
|
|
1764
|
-
},
|
|
1765
|
-
if (
|
|
1768
|
+
}, d = (p, l) => {
|
|
1769
|
+
if (o("itemClick", p, l), p.href.startsWith("#")) {
|
|
1766
1770
|
l.preventDefault();
|
|
1767
1771
|
const h = document.querySelector(p.href);
|
|
1768
1772
|
if (h) {
|
|
1769
|
-
const u =
|
|
1773
|
+
const u = i();
|
|
1770
1774
|
if (window.scrollTo({
|
|
1771
1775
|
left: 0,
|
|
1772
1776
|
top: h.getBoundingClientRect().top + window.scrollY - u,
|
|
1773
1777
|
behavior: "smooth"
|
|
1774
|
-
}),
|
|
1778
|
+
}), n.value = p.href, l instanceof KeyboardEvent) {
|
|
1775
1779
|
const f = h.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");
|
|
1776
1780
|
f && f instanceof HTMLElement && (f.setAttribute("tabindex", "-1"), f.focus({ preventScroll: !0 }));
|
|
1777
1781
|
}
|
|
1778
1782
|
}
|
|
1779
1783
|
}
|
|
1780
|
-
},
|
|
1784
|
+
}, c = () => {
|
|
1781
1785
|
t.value.clear(), e.items && e.items.filter((p) => p.href.startsWith("#")).forEach((p) => {
|
|
1782
1786
|
const l = document.querySelector(p.href);
|
|
1783
1787
|
l && t.value.set(p.href, l);
|
|
@@ -1790,12 +1794,12 @@ const bt = B({
|
|
|
1790
1794
|
item: z
|
|
1791
1795
|
}));
|
|
1792
1796
|
if (f.length === 0) return;
|
|
1793
|
-
const
|
|
1797
|
+
const _ = f[0], R = f[f.length - 1], E = _.element.offsetTop;
|
|
1794
1798
|
let M = "";
|
|
1795
1799
|
if (h >= u)
|
|
1796
1800
|
M = R.href;
|
|
1797
1801
|
else if (window.scrollY <= E)
|
|
1798
|
-
M =
|
|
1802
|
+
M = _.href;
|
|
1799
1803
|
else
|
|
1800
1804
|
for (const z of f) {
|
|
1801
1805
|
const H = z.element.offsetHeight, V = z.element.offsetTop - l;
|
|
@@ -1804,17 +1808,17 @@ const bt = B({
|
|
|
1804
1808
|
break;
|
|
1805
1809
|
}
|
|
1806
1810
|
}
|
|
1807
|
-
M && M !==
|
|
1811
|
+
M && M !== n.value && (n.value = M);
|
|
1808
1812
|
}, g = () => {
|
|
1809
1813
|
if (!e.items) return;
|
|
1810
1814
|
const p = e.items.find((l) => l.active);
|
|
1811
|
-
p ?
|
|
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
|
-
|
|
1819
|
+
c(), m(), window.addEventListener("scroll", m, { passive: !0 });
|
|
1816
1820
|
const p = new MutationObserver(() => {
|
|
1817
|
-
|
|
1821
|
+
c();
|
|
1818
1822
|
});
|
|
1819
1823
|
p.observe(document.body, {
|
|
1820
1824
|
childList: !0,
|
|
@@ -1826,22 +1830,22 @@ const bt = B({
|
|
|
1826
1830
|
}), X(() => {
|
|
1827
1831
|
e.autoActive && (window.removeEventListener("scroll", m), t.value.clear());
|
|
1828
1832
|
});
|
|
1829
|
-
const
|
|
1833
|
+
const x = () => !e.caption && !e.title ? null : v("div", { class: "in-page-navigation-header" }, [
|
|
1830
1834
|
e.caption && v("p", { class: "quick-caption" }, e.caption),
|
|
1831
1835
|
e.title && v("p", { class: "quick-title" }, e.title)
|
|
1832
1836
|
]), k = () => {
|
|
1833
1837
|
if (!e.items) return null;
|
|
1834
1838
|
const p = e.items.map((l) => {
|
|
1835
|
-
const h =
|
|
1839
|
+
const h = n.value === l.href || !e.autoActive && l.active;
|
|
1836
1840
|
return v("li", { key: l.href }, [
|
|
1837
1841
|
v(
|
|
1838
1842
|
"a",
|
|
1839
1843
|
{
|
|
1840
1844
|
href: l.href,
|
|
1841
1845
|
class: h ? "active" : "",
|
|
1842
|
-
onClick: (u) =>
|
|
1846
|
+
onClick: (u) => d(l, u),
|
|
1843
1847
|
onKeydown: (u) => {
|
|
1844
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(),
|
|
1848
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), d(l, u));
|
|
1845
1849
|
}
|
|
1846
1850
|
},
|
|
1847
1851
|
l.text
|
|
@@ -1849,9 +1853,9 @@ const bt = B({
|
|
|
1849
1853
|
]);
|
|
1850
1854
|
});
|
|
1851
1855
|
return v("nav", { class: "in-page-navigation-list" }, [v("ul", {}, p)]);
|
|
1852
|
-
}, D = () =>
|
|
1853
|
-
return () => v("div", { class:
|
|
1854
|
-
v("div", { class: "krds-in-page-navigation-area" }, [
|
|
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({
|
|
@@ -1865,15 +1869,15 @@ const bt = B({
|
|
|
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
1876
|
}), m = y(() => {
|
|
1873
|
-
if (!
|
|
1877
|
+
if (!d.value)
|
|
1874
1878
|
return "#";
|
|
1875
1879
|
}), g = y(() => {
|
|
1876
|
-
const { pageRange: p, max: l } =
|
|
1880
|
+
const { pageRange: p, max: l } = s, h = 1, u = [];
|
|
1877
1881
|
if (l <= p + 2 * h)
|
|
1878
1882
|
for (let f = t.value; f <= l; f++)
|
|
1879
1883
|
u.push({
|
|
@@ -1883,7 +1887,7 @@ const bt = B({
|
|
|
1883
1887
|
href: "#"
|
|
1884
1888
|
});
|
|
1885
1889
|
else {
|
|
1886
|
-
const f = Math.min(h, l),
|
|
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);
|
|
1887
1891
|
for (let V = t.value; V <= f; V++)
|
|
1888
1892
|
u.push({
|
|
1889
1893
|
type: "page",
|
|
@@ -1896,7 +1900,7 @@ const bt = B({
|
|
|
1896
1900
|
key: "ellipsis-left",
|
|
1897
1901
|
ariaLabel: "페이지 생략"
|
|
1898
1902
|
});
|
|
1899
|
-
const z = Math.max(M, f + 1), H = Math.min(E,
|
|
1903
|
+
const z = Math.max(M, f + 1), H = Math.min(E, _ - 1);
|
|
1900
1904
|
for (let V = z; V <= H; V++)
|
|
1901
1905
|
u.push({
|
|
1902
1906
|
type: "page",
|
|
@@ -1904,12 +1908,12 @@ const bt = B({
|
|
|
1904
1908
|
page: V,
|
|
1905
1909
|
href: "#"
|
|
1906
1910
|
});
|
|
1907
|
-
E <
|
|
1911
|
+
E < _ - 1 && u.push({
|
|
1908
1912
|
type: "ellipsis",
|
|
1909
1913
|
key: "ellipsis-right",
|
|
1910
1914
|
ariaLabel: "페이지 생략"
|
|
1911
1915
|
});
|
|
1912
|
-
for (let V =
|
|
1916
|
+
for (let V = _; V <= l; V++)
|
|
1913
1917
|
u.push({
|
|
1914
1918
|
type: "page",
|
|
1915
1919
|
key: `page-${V}`,
|
|
@@ -1918,36 +1922,36 @@ const bt = B({
|
|
|
1918
1922
|
});
|
|
1919
1923
|
}
|
|
1920
1924
|
return u;
|
|
1921
|
-
}),
|
|
1922
|
-
if (p ===
|
|
1925
|
+
}), x = (p, l) => {
|
|
1926
|
+
if (p === a.value) {
|
|
1923
1927
|
l.preventDefault();
|
|
1924
1928
|
return;
|
|
1925
1929
|
}
|
|
1926
|
-
|
|
1930
|
+
n("update:modelValue", p);
|
|
1927
1931
|
}, k = (p) => {
|
|
1928
|
-
if (
|
|
1932
|
+
if (i.value) {
|
|
1929
1933
|
p.preventDefault();
|
|
1930
1934
|
return;
|
|
1931
1935
|
}
|
|
1932
|
-
const l =
|
|
1933
|
-
|
|
1936
|
+
const l = a.value - 1;
|
|
1937
|
+
n("update:modelValue", l);
|
|
1934
1938
|
}, D = (p) => {
|
|
1935
|
-
if (
|
|
1939
|
+
if (d.value) {
|
|
1936
1940
|
p.preventDefault();
|
|
1937
1941
|
return;
|
|
1938
1942
|
}
|
|
1939
|
-
const l =
|
|
1940
|
-
|
|
1943
|
+
const l = a.value + 1;
|
|
1944
|
+
n("update:modelValue", l);
|
|
1941
1945
|
};
|
|
1942
1946
|
return (p, l) => {
|
|
1943
1947
|
const h = ze("sr-only");
|
|
1944
|
-
return
|
|
1945
|
-
id:
|
|
1948
|
+
return b(), S("div", {
|
|
1949
|
+
id: e.id,
|
|
1946
1950
|
class: "krds-pagination"
|
|
1947
1951
|
}, [
|
|
1948
|
-
(
|
|
1949
|
-
href:
|
|
1950
|
-
class: I(["page-navi", "prev", { disabled:
|
|
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 }]),
|
|
1951
1955
|
onClick: k
|
|
1952
1956
|
}, {
|
|
1953
1957
|
default: ie(() => [...l[0] || (l[0] = [
|
|
@@ -1956,32 +1960,32 @@ const bt = B({
|
|
|
1956
1960
|
_: 1
|
|
1957
1961
|
}, 8, ["href", "class"])),
|
|
1958
1962
|
r("div", Et, [
|
|
1959
|
-
(
|
|
1963
|
+
(b(!0), S(F, null, N(g.value, (u) => (b(), S(F, {
|
|
1960
1964
|
key: u.key
|
|
1961
1965
|
}, [
|
|
1962
|
-
u.type === "page" ? (
|
|
1966
|
+
u.type === "page" ? (b(), S("a", {
|
|
1963
1967
|
key: 0,
|
|
1964
1968
|
href: u.href || "#",
|
|
1965
|
-
class: I(["page-link", { active: u.page ===
|
|
1966
|
-
"aria-current": u.page ===
|
|
1967
|
-
onClick: (f) =>
|
|
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
|
-
u.page ===
|
|
1973
|
+
u.page === a.value ? Q((b(), S("span", Rt, [...l[1] || (l[1] = [
|
|
1970
1974
|
A("현재페이지", -1)
|
|
1971
1975
|
])])), [
|
|
1972
1976
|
[h]
|
|
1973
1977
|
]) : Y("", !0),
|
|
1974
1978
|
A(" " + L(u.page), 1)
|
|
1975
|
-
], 10, Mt)) : u.type === "ellipsis" ? (
|
|
1979
|
+
], 10, Mt)) : u.type === "ellipsis" ? (b(), S("span", {
|
|
1976
1980
|
key: 1,
|
|
1977
1981
|
class: "page-link link-dot",
|
|
1978
1982
|
"aria-label": u.ariaLabel
|
|
1979
1983
|
}, null, 8, Tt)) : Y("", !0)
|
|
1980
1984
|
], 64))), 128))
|
|
1981
1985
|
]),
|
|
1982
|
-
(
|
|
1983
|
-
href:
|
|
1984
|
-
class: I(["page-navi", "next", { disabled:
|
|
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 }]),
|
|
1985
1989
|
onClick: D
|
|
1986
1990
|
}, {
|
|
1987
1991
|
default: ie(() => [...l[2] || (l[2] = [
|
|
@@ -1998,21 +2002,21 @@ const bt = B({
|
|
|
1998
2002
|
modelValue: { type: Boolean, default: !1 }
|
|
1999
2003
|
},
|
|
2000
2004
|
emits: ["update:modelValue"],
|
|
2001
|
-
setup(e, { emit:
|
|
2002
|
-
const
|
|
2003
|
-
get: () =>
|
|
2004
|
-
set: (
|
|
2005
|
-
}),
|
|
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 = () => {
|
|
2006
2010
|
t.value = !0;
|
|
2007
|
-
},
|
|
2011
|
+
}, i = () => {
|
|
2008
2012
|
t.value = !1;
|
|
2009
2013
|
};
|
|
2010
|
-
return (
|
|
2014
|
+
return (d, c) => (b(), S("div", At, [
|
|
2011
2015
|
r("button", {
|
|
2012
2016
|
type: "button",
|
|
2013
2017
|
class: "krds-btn small tertiary btn-help-panel expand btn-help-exec",
|
|
2014
|
-
onClick:
|
|
2015
|
-
}, [...
|
|
2018
|
+
onClick: a
|
|
2019
|
+
}, [...c[0] || (c[0] = [
|
|
2016
2020
|
r("i", { class: "svg-icon ico-fold" }, null, -1),
|
|
2017
2021
|
A(" 도움말 ", -1)
|
|
2018
2022
|
])]),
|
|
@@ -2021,12 +2025,12 @@ const bt = B({
|
|
|
2021
2025
|
}, [
|
|
2022
2026
|
r("div", Ft, [
|
|
2023
2027
|
r("div", Ot, [
|
|
2024
|
-
J(
|
|
2028
|
+
J(d.$slots, "default"),
|
|
2025
2029
|
r("button", {
|
|
2026
2030
|
type: "button",
|
|
2027
2031
|
class: "krds-btn small tertiary btn-help-panel fold",
|
|
2028
|
-
onClick:
|
|
2029
|
-
}, [...
|
|
2032
|
+
onClick: i
|
|
2033
|
+
}, [...c[1] || (c[1] = [
|
|
2030
2034
|
r("span", { class: "sr-only" }, "도움말", -1),
|
|
2031
2035
|
A(" 접어두기 ", -1),
|
|
2032
2036
|
r("i", { class: "svg-icon ico-angle right" }, null, -1)
|
|
@@ -2050,24 +2054,24 @@ const bt = B({
|
|
|
2050
2054
|
position: { default: "top left" }
|
|
2051
2055
|
},
|
|
2052
2056
|
setup(e) {
|
|
2053
|
-
const
|
|
2054
|
-
const l =
|
|
2055
|
-
g(), l ||
|
|
2056
|
-
},
|
|
2057
|
-
if (!t.value || !
|
|
2058
|
-
|
|
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();
|
|
2059
2063
|
}, m = () => {
|
|
2060
|
-
!t.value || !
|
|
2064
|
+
!t.value || !n.value || (i.value = !1, t.value.style.display = "none", n.value.setAttribute("aria-expanded", "false"));
|
|
2061
2065
|
}, g = () => {
|
|
2062
2066
|
const l = document.querySelectorAll(".krds-contextual-help .tooltip-popover"), h = document.querySelectorAll(".krds-contextual-help .tooltip-btn");
|
|
2063
2067
|
l.forEach((u) => {
|
|
2064
2068
|
u.style.display = "none";
|
|
2065
2069
|
}), h.forEach((u) => {
|
|
2066
2070
|
u.setAttribute("aria-expanded", "false");
|
|
2067
|
-
}),
|
|
2068
|
-
},
|
|
2069
|
-
if (!
|
|
2070
|
-
const l = window.innerWidth <= 768, h =
|
|
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");
|
|
2071
2075
|
if (l) {
|
|
2072
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;
|
|
2073
2077
|
t.value.style.left = `-${R}px`, t.value.style.width = `${E}px`;
|
|
@@ -2078,27 +2082,27 @@ const bt = B({
|
|
|
2078
2082
|
}, D = (l) => {
|
|
2079
2083
|
l.target.closest(".tooltip-action") || g();
|
|
2080
2084
|
}, p = () => {
|
|
2081
|
-
|
|
2085
|
+
i.value && x();
|
|
2082
2086
|
};
|
|
2083
2087
|
return le(() => {
|
|
2084
|
-
|
|
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));
|
|
2085
2089
|
}), X(() => {
|
|
2086
2090
|
document.removeEventListener("keydown", k), document.removeEventListener("click", D), window.removeEventListener("resize", p);
|
|
2087
|
-
}), (l, h) => (
|
|
2091
|
+
}), (l, h) => (b(), S("div", {
|
|
2088
2092
|
ref_key: "containerRef",
|
|
2089
|
-
ref:
|
|
2090
|
-
class: I(["krds-contextual-help",
|
|
2093
|
+
ref: s,
|
|
2094
|
+
class: I(["krds-contextual-help", o.position])
|
|
2091
2095
|
}, [
|
|
2092
2096
|
r("div", Nt, [
|
|
2093
2097
|
r("button", {
|
|
2094
2098
|
ref_key: "tooltipBtnRef",
|
|
2095
|
-
ref:
|
|
2099
|
+
ref: n,
|
|
2096
2100
|
type: "button",
|
|
2097
2101
|
class: "krds-btn medium icon tooltip-btn",
|
|
2098
|
-
onClick:
|
|
2102
|
+
onClick: d
|
|
2099
2103
|
}, [
|
|
2100
2104
|
h[0] || (h[0] = r("span", { class: "sr-only" }, "도움말", -1)),
|
|
2101
|
-
|
|
2105
|
+
o.helpIcon ? (b(), S("i", Ht)) : (b(), S("i", jt))
|
|
2102
2106
|
], 512),
|
|
2103
2107
|
r("div", {
|
|
2104
2108
|
ref_key: "tooltipPopoverRef",
|
|
@@ -2106,13 +2110,13 @@ const bt = B({
|
|
|
2106
2110
|
class: "tooltip-popover",
|
|
2107
2111
|
role: "tooltip"
|
|
2108
2112
|
}, [
|
|
2109
|
-
r("h4", Wt, L(
|
|
2113
|
+
r("h4", Wt, L(o.tooltipTitle), 1),
|
|
2110
2114
|
r("div", Yt, [
|
|
2111
2115
|
J(l.$slots, "default")
|
|
2112
2116
|
]),
|
|
2113
2117
|
r("button", {
|
|
2114
2118
|
ref_key: "closeBtnRef",
|
|
2115
|
-
ref:
|
|
2119
|
+
ref: a,
|
|
2116
2120
|
type: "button",
|
|
2117
2121
|
class: "krds-btn xsmall icon tooltip-close",
|
|
2118
2122
|
onClick: m
|
|
@@ -2139,57 +2143,57 @@ const bt = B({
|
|
|
2139
2143
|
id: {}
|
|
2140
2144
|
},
|
|
2141
2145
|
emits: ["update:modelValue", "close"],
|
|
2142
|
-
setup(e, { emit:
|
|
2143
|
-
const
|
|
2144
|
-
const
|
|
2145
|
-
return
|
|
2146
|
-
}), t =
|
|
2147
|
-
|
|
2148
|
-
},
|
|
2149
|
-
|
|
2150
|
-
},
|
|
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 = () => {
|
|
2151
2155
|
t("close");
|
|
2152
2156
|
};
|
|
2153
|
-
return (
|
|
2154
|
-
class: I(["krds-coach-mark",
|
|
2155
|
-
style: ae(
|
|
2157
|
+
return (c, m) => (b(), S("div", {
|
|
2158
|
+
class: I(["krds-coach-mark", e.coachMarkClass]),
|
|
2159
|
+
style: ae(e.style)
|
|
2156
2160
|
}, [
|
|
2157
|
-
|
|
2161
|
+
e.modelValue === e.activeStep && n.value ? (b(), S("div", Ut, [
|
|
2158
2162
|
m[2] || (m[2] = r("h5", { class: "sr-only" }, "따라하기 가이드", -1)),
|
|
2159
|
-
r("h6", Xt, L(
|
|
2160
|
-
r("p", Jt, L(
|
|
2163
|
+
r("h6", Xt, L(e.activeStep) + "단계 : " + L(n.value.title), 1),
|
|
2164
|
+
r("p", Jt, L(n.value.description), 1),
|
|
2161
2165
|
r("div", Qt, [
|
|
2162
2166
|
r("div", Zt, [
|
|
2163
2167
|
m[0] || (m[0] = r("span", { class: "sr-only" }, "현재 단계", -1)),
|
|
2164
|
-
r("strong", null, L(
|
|
2168
|
+
r("strong", null, L(e.activeStep), 1),
|
|
2165
2169
|
m[1] || (m[1] = r("span", { class: "sr-only" }, "총 단계", -1)),
|
|
2166
|
-
r("span", null, L(
|
|
2170
|
+
r("span", null, L(e.stepsData.length), 1)
|
|
2167
2171
|
]),
|
|
2168
2172
|
r("div", el, [
|
|
2169
2173
|
r("button", {
|
|
2170
2174
|
type: "button",
|
|
2171
2175
|
class: "krds-btn small text",
|
|
2172
|
-
onClick:
|
|
2176
|
+
onClick: d
|
|
2173
2177
|
}, "그만보기"),
|
|
2174
|
-
|
|
2178
|
+
e.activeStep !== 1 ? (b(), S("button", {
|
|
2175
2179
|
key: 0,
|
|
2176
2180
|
type: "button",
|
|
2177
2181
|
class: "krds-btn small text",
|
|
2178
|
-
onClick:
|
|
2182
|
+
onClick: a
|
|
2179
2183
|
}, "이전으로")) : Y("", !0),
|
|
2180
|
-
|
|
2184
|
+
e.activeStep !== e.stepsData.length ? (b(), S("button", {
|
|
2181
2185
|
key: 1,
|
|
2182
2186
|
type: "button",
|
|
2183
2187
|
class: "krds-btn small tertiary",
|
|
2184
|
-
onClick:
|
|
2188
|
+
onClick: i
|
|
2185
2189
|
}, "다음으로")) : Y("", !0)
|
|
2186
2190
|
])
|
|
2187
2191
|
])
|
|
2188
2192
|
])) : Y("", !0),
|
|
2189
|
-
J(
|
|
2193
|
+
J(c.$slots, "coach-mark-content")
|
|
2190
2194
|
], 6));
|
|
2191
2195
|
}
|
|
2192
|
-
}), ll = ["disabled", "aria-labelledby"], al = ["id", "aria-hidden"],
|
|
2196
|
+
}), ll = ["disabled", "aria-labelledby"], al = ["id", "aria-hidden"], nl = { class: "sr-only" }, sl = /* @__PURE__ */ B({
|
|
2193
2197
|
__name: "KrdsTooltip",
|
|
2194
2198
|
props: {
|
|
2195
2199
|
type: { default: "default" },
|
|
@@ -2202,50 +2206,50 @@ const bt = B({
|
|
|
2202
2206
|
id: {}
|
|
2203
2207
|
},
|
|
2204
2208
|
setup(e) {
|
|
2205
|
-
const
|
|
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(() => {
|
|
2206
2210
|
const f = ["krds-btn", "krds-tooltip"];
|
|
2207
|
-
return
|
|
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(" ");
|
|
2208
2212
|
}), m = y(() => {
|
|
2209
2213
|
const f = [];
|
|
2210
|
-
return
|
|
2211
|
-
}), g = y(() =>
|
|
2212
|
-
if (!
|
|
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");
|
|
2214
2218
|
if (!f) return;
|
|
2215
|
-
const
|
|
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;
|
|
2216
2220
|
let U, O;
|
|
2217
2221
|
const q = [];
|
|
2218
|
-
|
|
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 + _);
|
|
2219
2223
|
const ee = window.innerWidth <= 420;
|
|
2220
|
-
|
|
2224
|
+
a.value = {
|
|
2221
2225
|
top: `${U}px`,
|
|
2222
2226
|
left: ee ? "50%" : `${O}px`,
|
|
2223
2227
|
transform: ee ? "translateX(-50%)" : "none"
|
|
2224
|
-
},
|
|
2228
|
+
}, n.value && (n.value.className = `krds-tooltip-popover ${q.join(" ")} ${m.value.join(" ")}`);
|
|
2225
2229
|
}, D = async () => {
|
|
2226
|
-
|
|
2230
|
+
o.disabled || !o.tooltipContent || (t.value = !0, await Le(), k());
|
|
2227
2231
|
}, p = () => {
|
|
2228
|
-
t.value = !1,
|
|
2232
|
+
t.value = !1, a.value = {};
|
|
2229
2233
|
}, l = (f) => {
|
|
2230
2234
|
(f.key === "Escape" || f.key === "Esc") && t.value && p();
|
|
2231
2235
|
}, h = () => {
|
|
2232
|
-
|
|
2236
|
+
d.value = x(), t.value && p();
|
|
2233
2237
|
}, u = () => {
|
|
2234
2238
|
t.value && p();
|
|
2235
2239
|
};
|
|
2236
2240
|
return le(() => {
|
|
2237
|
-
|
|
2241
|
+
d.value = x(), document.addEventListener("keydown", l), window.addEventListener("scroll", u), window.addEventListener("resize", h);
|
|
2238
2242
|
}), X(() => {
|
|
2239
2243
|
document.removeEventListener("keydown", l), window.removeEventListener("scroll", u), window.removeEventListener("resize", h);
|
|
2240
|
-
}), (f,
|
|
2244
|
+
}), (f, _) => (b(), S("div", {
|
|
2241
2245
|
ref_key: "containerRef",
|
|
2242
|
-
ref:
|
|
2246
|
+
ref: s
|
|
2243
2247
|
}, [
|
|
2244
2248
|
r("button", {
|
|
2245
2249
|
type: "button",
|
|
2246
|
-
class: I(
|
|
2247
|
-
disabled:
|
|
2248
|
-
"aria-labelledby":
|
|
2250
|
+
class: I(c.value),
|
|
2251
|
+
disabled: e.disabled,
|
|
2252
|
+
"aria-labelledby": i.value,
|
|
2249
2253
|
onMouseover: D,
|
|
2250
2254
|
onMouseout: p,
|
|
2251
2255
|
onFocusin: D,
|
|
@@ -2254,16 +2258,16 @@ const bt = B({
|
|
|
2254
2258
|
J(f.$slots, "default")
|
|
2255
2259
|
], 42, ll),
|
|
2256
2260
|
Q(r("div", {
|
|
2257
|
-
id:
|
|
2261
|
+
id: i.value,
|
|
2258
2262
|
ref_key: "popoverRef",
|
|
2259
|
-
ref:
|
|
2263
|
+
ref: n,
|
|
2260
2264
|
class: I(["krds-tooltip-popover", m.value]),
|
|
2261
|
-
style: ae(
|
|
2265
|
+
style: ae(a.value),
|
|
2262
2266
|
"aria-hidden": !t.value,
|
|
2263
2267
|
role: "tooltip"
|
|
2264
2268
|
}, [
|
|
2265
|
-
r("span",
|
|
2266
|
-
A(" " + L(
|
|
2269
|
+
r("span", nl, L(g.value), 1),
|
|
2270
|
+
A(" " + L(e.tooltipContent), 1)
|
|
2267
2271
|
], 14, al), [
|
|
2268
2272
|
[te, t.value]
|
|
2269
2273
|
])
|
|
@@ -2290,54 +2294,54 @@ const bt = B({
|
|
|
2290
2294
|
id: {}
|
|
2291
2295
|
},
|
|
2292
2296
|
emits: ["update:modelValue", "close"],
|
|
2293
|
-
setup(e, { emit:
|
|
2294
|
-
const
|
|
2295
|
-
t.value = !t.value, t.value &&
|
|
2296
|
-
},
|
|
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 = () => {
|
|
2297
2301
|
t.value = !1;
|
|
2298
2302
|
}, m = (l) => {
|
|
2299
|
-
|
|
2303
|
+
n("update:modelValue", l), c(), n("close"), i.value?.focus();
|
|
2300
2304
|
}, g = () => {
|
|
2301
|
-
if (!
|
|
2302
|
-
const l =
|
|
2305
|
+
if (!a.value) return;
|
|
2306
|
+
const l = a.value.querySelector(".drop-menu");
|
|
2303
2307
|
if (!l) return;
|
|
2304
2308
|
const h = l.getBoundingClientRect(), u = window.innerWidth;
|
|
2305
|
-
|
|
2306
|
-
},
|
|
2307
|
-
l.key === "Escape" && (
|
|
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());
|
|
2308
2312
|
}, k = (l) => {
|
|
2309
|
-
|
|
2313
|
+
a.value?.contains(l.target) || c();
|
|
2310
2314
|
}, D = (l) => {
|
|
2311
|
-
|
|
2315
|
+
a.value?.contains(l.relatedTarget) || c();
|
|
2312
2316
|
}, p = (l) => {
|
|
2313
|
-
if (!
|
|
2314
|
-
|
|
2317
|
+
if (!a.value) return;
|
|
2318
|
+
a.value.querySelectorAll(".drop-list .item-link").forEach((f) => {
|
|
2315
2319
|
f.style.position = "relative", f.style.zIndex = "0";
|
|
2316
2320
|
});
|
|
2317
2321
|
const u = l.target;
|
|
2318
2322
|
u.style.zIndex = "1";
|
|
2319
2323
|
};
|
|
2320
2324
|
return ue(t, (l) => {
|
|
2321
|
-
l ? (document.addEventListener("keydown",
|
|
2325
|
+
l ? (document.addEventListener("keydown", x), document.addEventListener("click", k)) : (document.removeEventListener("keydown", x), document.removeEventListener("click", k));
|
|
2322
2326
|
}), X(() => {
|
|
2323
|
-
document.removeEventListener("keydown",
|
|
2324
|
-
}), (l, h) => (
|
|
2327
|
+
document.removeEventListener("keydown", x), document.removeEventListener("click", k);
|
|
2328
|
+
}), (l, h) => (b(), S("div", {
|
|
2325
2329
|
ref_key: "dropdownRef",
|
|
2326
|
-
ref:
|
|
2330
|
+
ref: a,
|
|
2327
2331
|
class: I(["krds-drop-wrap krds-language", {
|
|
2328
2332
|
active: t.value,
|
|
2329
|
-
"drop-left":
|
|
2330
|
-
"drop-right":
|
|
2333
|
+
"drop-left": s.dropPosition === "left",
|
|
2334
|
+
"drop-right": s.dropPosition === "right"
|
|
2331
2335
|
}]),
|
|
2332
2336
|
onFocusout: D
|
|
2333
2337
|
}, [
|
|
2334
2338
|
r("button", {
|
|
2335
2339
|
ref_key: "buttonRef",
|
|
2336
|
-
ref:
|
|
2340
|
+
ref: i,
|
|
2337
2341
|
type: "button",
|
|
2338
2342
|
class: I(["krds-btn small text drop-btn", { active: t.value }]),
|
|
2339
2343
|
"aria-expanded": t.value,
|
|
2340
|
-
onClick:
|
|
2344
|
+
onClick: d
|
|
2341
2345
|
}, [
|
|
2342
2346
|
h[0] || (h[0] = r("i", { class: "svg-icon ico-global" }, null, -1)),
|
|
2343
2347
|
J(l.$slots, "default"),
|
|
@@ -2348,27 +2352,27 @@ const bt = B({
|
|
|
2348
2352
|
style: ae({ display: t.value ? "block" : "none" })
|
|
2349
2353
|
}, [
|
|
2350
2354
|
r("div", il, [
|
|
2351
|
-
l.$slots["prev-item"] ? (
|
|
2355
|
+
l.$slots["prev-item"] ? (b(), S("div", rl, [
|
|
2352
2356
|
J(l.$slots, "prev-item")
|
|
2353
2357
|
])) : Y("", !0),
|
|
2354
|
-
|
|
2355
|
-
(
|
|
2358
|
+
s.type === "default" ? (b(), S("ul", ul, [
|
|
2359
|
+
(b(!0), S(F, null, N(e.languageList, (u) => (b(), S("li", {
|
|
2356
2360
|
key: u.code
|
|
2357
2361
|
}, [
|
|
2358
2362
|
r("a", {
|
|
2359
2363
|
href: "#",
|
|
2360
|
-
class: I(["item-link", { active:
|
|
2364
|
+
class: I(["item-link", { active: s.modelValue === u.code }]),
|
|
2361
2365
|
lang: u.code,
|
|
2362
|
-
"aria-selected":
|
|
2366
|
+
"aria-selected": s.modelValue === u.code,
|
|
2363
2367
|
onClick: re((f) => m(u.code), ["prevent"]),
|
|
2364
2368
|
onFocus: p
|
|
2365
2369
|
}, [
|
|
2366
2370
|
A(L(u.name) + " ", 1),
|
|
2367
|
-
r("span", cl, L(
|
|
2371
|
+
r("span", cl, L(s.modelValue === u.code ? "선택됨" : ""), 1)
|
|
2368
2372
|
], 42, dl)
|
|
2369
2373
|
]))), 128))
|
|
2370
|
-
])) :
|
|
2371
|
-
(
|
|
2374
|
+
])) : s.type === "external" ? (b(), S("ul", fl, [
|
|
2375
|
+
(b(!0), S(F, null, N(e.languageList, (u) => (b(), S("li", {
|
|
2372
2376
|
key: u.code
|
|
2373
2377
|
}, [
|
|
2374
2378
|
r("a", {
|
|
@@ -2391,30 +2395,30 @@ const bt = B({
|
|
|
2391
2395
|
}), hl = { class: "drop-in" }, ml = { class: "drop-list" }, yl = ["data-adjust-scale", "onClick"], gl = { class: "drop-bottom" }, kl = /* @__PURE__ */ B({
|
|
2392
2396
|
__name: "KrdsResize",
|
|
2393
2397
|
emits: ["update:modelValue", "close"],
|
|
2394
|
-
setup(e, { emit:
|
|
2395
|
-
const
|
|
2398
|
+
setup(e, { emit: o }) {
|
|
2399
|
+
const s = o, n = K(!1), t = K(), a = K(), i = K("md"), d = [
|
|
2396
2400
|
{ key: "sm", label: "작게", zoom: "0.9" },
|
|
2397
2401
|
{ key: "md", label: "보통", zoom: "1" },
|
|
2398
2402
|
{ key: "lg", label: "조금 크게", zoom: "1.1" },
|
|
2399
2403
|
{ key: "xlg", label: "크게", zoom: "1.3" },
|
|
2400
2404
|
{ key: "xxlg", label: "가장 크게", zoom: "1.5" }
|
|
2401
|
-
],
|
|
2402
|
-
|
|
2405
|
+
], c = () => {
|
|
2406
|
+
n.value = !n.value, n.value && t.value && k();
|
|
2403
2407
|
}, m = () => {
|
|
2404
|
-
|
|
2408
|
+
n.value = !1;
|
|
2405
2409
|
}, g = (u) => {
|
|
2406
|
-
m(),
|
|
2407
|
-
},
|
|
2408
|
-
const 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");
|
|
2409
2413
|
u && g(u);
|
|
2410
2414
|
}, k = () => {
|
|
2411
2415
|
if (!t.value) return;
|
|
2412
2416
|
const u = t.value.querySelector(".drop-menu");
|
|
2413
2417
|
if (!u) return;
|
|
2414
|
-
const f = u.getBoundingClientRect(),
|
|
2415
|
-
t.value.classList.remove("drop-left", "drop-right"), f.left < 0 ? t.value.classList.add("drop-left") :
|
|
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");
|
|
2416
2420
|
}, D = (u) => {
|
|
2417
|
-
u.key === "Escape" && (m(),
|
|
2421
|
+
u.key === "Escape" && (m(), a.value?.focus());
|
|
2418
2422
|
}, p = (u) => {
|
|
2419
2423
|
t.value?.contains(u.target) || m();
|
|
2420
2424
|
}, l = (u) => {
|
|
@@ -2424,14 +2428,14 @@ const bt = B({
|
|
|
2424
2428
|
t.value.querySelectorAll(".drop-list .item-link").forEach((R) => {
|
|
2425
2429
|
R.style.position = "relative", R.style.zIndex = "0";
|
|
2426
2430
|
});
|
|
2427
|
-
const
|
|
2428
|
-
|
|
2431
|
+
const _ = u.target;
|
|
2432
|
+
_.style.zIndex = "1";
|
|
2429
2433
|
};
|
|
2430
|
-
return ue(
|
|
2434
|
+
return ue(n, (u) => {
|
|
2431
2435
|
u ? (document.addEventListener("keydown", D), document.addEventListener("click", p)) : (document.removeEventListener("keydown", D), document.removeEventListener("click", p));
|
|
2432
2436
|
}), X(() => {
|
|
2433
2437
|
document.removeEventListener("keydown", D), document.removeEventListener("click", p);
|
|
2434
|
-
}), (u, f) => (
|
|
2438
|
+
}), (u, f) => (b(), S("div", {
|
|
2435
2439
|
ref_key: "dropdownRef",
|
|
2436
2440
|
ref: t,
|
|
2437
2441
|
class: "krds-drop-wrap krds-resize",
|
|
@@ -2440,30 +2444,30 @@ const bt = B({
|
|
|
2440
2444
|
}, [
|
|
2441
2445
|
r("button", {
|
|
2442
2446
|
ref_key: "buttonRef",
|
|
2443
|
-
ref:
|
|
2447
|
+
ref: a,
|
|
2444
2448
|
type: "button",
|
|
2445
2449
|
class: "krds-btn small text drop-btn",
|
|
2446
|
-
onClick:
|
|
2450
|
+
onClick: c
|
|
2447
2451
|
}, [...f[0] || (f[0] = [
|
|
2448
2452
|
A(" 화면크기 ", -1),
|
|
2449
2453
|
r("i", { class: "svg-icon ico-toggle" }, null, -1)
|
|
2450
2454
|
])], 512),
|
|
2451
2455
|
r("div", {
|
|
2452
2456
|
class: "drop-menu",
|
|
2453
|
-
style: ae({ display:
|
|
2457
|
+
style: ae({ display: n.value ? "block" : "none" })
|
|
2454
2458
|
}, [
|
|
2455
2459
|
r("div", hl, [
|
|
2456
2460
|
r("ul", ml, [
|
|
2457
|
-
(
|
|
2458
|
-
key:
|
|
2461
|
+
(b(), S(F, null, N(d, (_) => r("li", {
|
|
2462
|
+
key: _.key
|
|
2459
2463
|
}, [
|
|
2460
2464
|
r("button", {
|
|
2461
2465
|
type: "button",
|
|
2462
|
-
class: I(["item-link", [
|
|
2463
|
-
"data-adjust-scale":
|
|
2464
|
-
onClick: re((R) => g(
|
|
2466
|
+
class: I(["item-link", [_.key, _.key === i.value ? "active" : ""]]),
|
|
2467
|
+
"data-adjust-scale": _.key,
|
|
2468
|
+
onClick: re((R) => g(_), ["prevent"]),
|
|
2465
2469
|
onFocus: h
|
|
2466
|
-
}, L(
|
|
2470
|
+
}, L(_.label), 43, yl)
|
|
2467
2471
|
])), 64))
|
|
2468
2472
|
]),
|
|
2469
2473
|
r("div", gl, [
|
|
@@ -2471,7 +2475,7 @@ const bt = B({
|
|
|
2471
2475
|
type: "button",
|
|
2472
2476
|
class: "krds-btn medium text",
|
|
2473
2477
|
"data-adjust-scale": "md",
|
|
2474
|
-
onClick: re(
|
|
2478
|
+
onClick: re(x, ["prevent"]),
|
|
2475
2479
|
onFocus: h
|
|
2476
2480
|
}, [...f[1] || (f[1] = [
|
|
2477
2481
|
r("i", { class: "svg-icon ico-reset" }, null, -1),
|
|
@@ -2510,19 +2514,19 @@ const bt = B({
|
|
|
2510
2514
|
KrdsSelect: vt,
|
|
2511
2515
|
KrdsSkipLink: Bt,
|
|
2512
2516
|
KrdsSpinner: we,
|
|
2513
|
-
KrdsStep:
|
|
2514
|
-
KrdsStepIndicator:
|
|
2517
|
+
KrdsStep: _t,
|
|
2518
|
+
KrdsStepIndicator: xt,
|
|
2515
2519
|
KrdsTag: mt,
|
|
2516
2520
|
KrdsTagGroup: yt,
|
|
2517
2521
|
KrdsTextarea: ft,
|
|
2518
2522
|
KrdsToggleSwitch: bt,
|
|
2519
|
-
KrdsTooltip:
|
|
2523
|
+
KrdsTooltip: sl
|
|
2520
2524
|
}, Symbol.toStringTag, { value: "Module" })), fe = {
|
|
2521
|
-
mounted(e,
|
|
2522
|
-
|
|
2525
|
+
mounted(e, o) {
|
|
2526
|
+
o.value !== !1 && e.classList.add("sr-only");
|
|
2523
2527
|
},
|
|
2524
|
-
updated(e,
|
|
2525
|
-
|
|
2528
|
+
updated(e, o) {
|
|
2529
|
+
o.value === !1 ? e.classList.remove("sr-only") : e.classList.add("sr-only");
|
|
2526
2530
|
},
|
|
2527
2531
|
unmounted(e) {
|
|
2528
2532
|
e.classList.remove("sr-only");
|
|
@@ -2538,15 +2542,15 @@ const bt = B({
|
|
|
2538
2542
|
installDirectives: Ce,
|
|
2539
2543
|
vSrOnly: fe
|
|
2540
2544
|
}, Symbol.toStringTag, { value: "Module" })), wl = {
|
|
2541
|
-
install(e,
|
|
2542
|
-
e.provide("krds:config",
|
|
2543
|
-
const
|
|
2544
|
-
|
|
2545
|
-
const t = ge[
|
|
2546
|
-
t && e.component(
|
|
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);
|
|
2547
2551
|
}), typeof be == "object" && be !== null && Ce(e), e.config.globalProperties.$krds = {
|
|
2548
2552
|
version: "__VERSION__"
|
|
2549
|
-
}, 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}개`);
|
|
2550
2554
|
}
|
|
2551
2555
|
}, Cl = "__VERSION__";
|
|
2552
2556
|
export {
|
|
@@ -2576,13 +2580,13 @@ export {
|
|
|
2576
2580
|
vt as KrdsSelect,
|
|
2577
2581
|
Bt as KrdsSkipLink,
|
|
2578
2582
|
we as KrdsSpinner,
|
|
2579
|
-
|
|
2580
|
-
|
|
2583
|
+
_t as KrdsStep,
|
|
2584
|
+
xt as KrdsStepIndicator,
|
|
2581
2585
|
mt as KrdsTag,
|
|
2582
2586
|
yt as KrdsTagGroup,
|
|
2583
2587
|
ft as KrdsTextarea,
|
|
2584
2588
|
bt as KrdsToggleSwitch,
|
|
2585
|
-
|
|
2589
|
+
sl as KrdsTooltip,
|
|
2586
2590
|
ce as classNames,
|
|
2587
2591
|
wl as default,
|
|
2588
2592
|
de as generateId,
|