@krds.ui/vue 0.0.12 → 0.0.14

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.
@@ -1,5 +1,13 @@
1
- import { defineComponent as _, computed as h, h as u, ref as B, onMounted as le, onBeforeUnmount as Se, createElementBlock as S, openBlock as k, createElementVNode as r, normalizeClass as E, withDirectives as Q, unref as A, toDisplayString as V, Fragment as F, renderList as N, vShow as te, createBlock as ie, withCtx as de, createTextVNode as P, watch as ae, provide as Ve, inject as Ie, createCommentVNode as Y, onUnmounted as J, resolveDirective as ze, resolveDynamicComponent as ye, renderSlot as G, normalizeStyle as ne, nextTick as we, withModifiers as re, getCurrentInstance as Ee, Teleport as Le } from "vue";
2
- const Ce = _({
1
+ import { Fragment as W, Teleport as ze, computed as k, createBlock as de, createCommentVNode as X, createElementBlock as T, createElementVNode as p, createTextVNode as N, defineComponent as B, getCurrentInstance as Ie, h as t, inject as Ee, nextTick as Ke, normalizeClass as R, normalizeStyle as ne, onBeforeUnmount as fe, onMounted as te, onUnmounted as Z, openBlock as D, provide as Fe, ref as L, renderList as Y, renderSlot as J, resolveDirective as Me, resolveDynamicComponent as ge, toDisplayString as M, unref as q, useId as ae, vShow as se, watch as re, withCtx as ue, withDirectives as ee, withModifiers as ce } from "vue";
2
+ var be = Object.defineProperty, we = (e, a) => {
3
+ let n = {};
4
+ for (var l in e)
5
+ be(n, l, {
6
+ get: e[l],
7
+ enumerable: !0
8
+ });
9
+ return a || be(n, Symbol.toStringTag, { value: "Module" }), n;
10
+ }, _e = B({
3
11
  name: "KrdsButton",
4
12
  props: {
5
13
  type: {
@@ -40,37 +48,27 @@ const Ce = _({
40
48
  }
41
49
  },
42
50
  emits: ["click"],
43
- setup(e, { emit: o, slots: a }) {
44
- const l = h(() => {
45
- const n = ["krds-btn"];
46
- return e.icon && n.push("icon"), e.border && n.push("border"), e.pure && n.push("pure"), e.text && n.push("text"), e.variant && !e.icon && n.push(e.variant), e.size && n.push(e.size), e.class && n.push(e.class), n;
47
- }), t = (n) => {
48
- e.disabled || o("click", n);
51
+ setup(e, { emit: a, slots: n }) {
52
+ const l = k(() => {
53
+ const r = ["krds-btn"];
54
+ return e.icon && r.push("icon"), e.border && r.push("border"), e.pure && r.push("pure"), e.text && r.push("text"), e.variant && !e.icon && r.push(e.variant), e.size && r.push(e.size), e.class && r.push(e.class), r;
55
+ }), s = (r) => {
56
+ e.disabled || a("click", r);
49
57
  };
50
- return () => u(
51
- "button",
52
- {
53
- type: e.type,
54
- class: l.value,
55
- disabled: e.disabled,
56
- onClick: t
57
- },
58
- a.default?.()
59
- );
58
+ return () => t("button", {
59
+ type: e.type,
60
+ class: l.value,
61
+ disabled: e.disabled,
62
+ onClick: s
63
+ }, n.default?.());
60
64
  }
61
- }), Me = _({
65
+ }), Ae = _e, Re = B({
62
66
  name: "KrdsButtonGroup",
63
67
  props: {},
64
- setup(e, { slots: o }) {
65
- return () => u(
66
- "div",
67
- {
68
- class: "btn-group"
69
- },
70
- o.default?.()
71
- );
68
+ setup(e, { slots: a }) {
69
+ return () => t("div", { class: "btn-group" }, a.default?.());
72
70
  }
73
- }), Re = _({
71
+ }), Pe = B({
74
72
  name: "KrdsIcon",
75
73
  props: {
76
74
  name: {
@@ -83,11 +81,13 @@ const Ce = _({
83
81
  }
84
82
  },
85
83
  setup(e) {
86
- return () => u("i", {
87
- class: ["svg-icon", e.name, e.class].filter(Boolean).join(" ")
88
- });
84
+ return () => t("i", { class: [
85
+ "svg-icon",
86
+ e.name,
87
+ e.class
88
+ ].filter(Boolean).join(" ") });
89
89
  }
90
- }), Te = _({
90
+ }), He = B({
91
91
  name: "KrdsLink",
92
92
  props: {
93
93
  href: {
@@ -124,41 +124,38 @@ const Ce = _({
124
124
  }
125
125
  },
126
126
  emits: ["click"],
127
- setup(e, { emit: o, slots: a }) {
128
- const l = h(() => {
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 = h(() => {
132
- const i = {
127
+ setup(e, { emit: a, slots: n }) {
128
+ const l = k(() => {
129
+ const o = ["krds-btn"];
130
+ return e.size && o.push(e.size), e.link && o.push("link"), e.basic && o.push("basic"), e.pure && o.push("pure"), e.class && o.push(e.class), o;
131
+ }), s = k(() => {
132
+ const o = {
133
133
  href: e.href,
134
134
  class: l.value
135
135
  };
136
- return e.target && (i.target = e.target), e.title && (i.title = e.title), e.target === "_blank" && (i.rel = "noopener noreferrer"), i;
137
- }), n = (i) => {
138
- o("click", i);
136
+ return e.target && (o.target = e.target), e.title && (o.title = e.title), e.target === "_blank" && (o.rel = "noopener noreferrer"), o;
137
+ }), r = (o) => {
138
+ a("click", o);
139
139
  };
140
- return () => u(
141
- "a",
142
- {
143
- ...t.value,
144
- onClick: n
145
- },
146
- a.default?.()
147
- );
140
+ return () => t("a", {
141
+ ...s.value,
142
+ onClick: r
143
+ }, n.default?.());
148
144
  }
149
- }), xe = _({
145
+ }), Ce = B({
150
146
  name: "KrdsSpinner",
151
- props: {
152
- label: {
153
- type: String,
154
- default: void 0
155
- }
156
- },
147
+ props: { label: {
148
+ type: String,
149
+ default: void 0
150
+ } },
157
151
  render() {
158
- const e = [u("span", { class: "sr-only" }, "로딩 중")];
159
- return this.label && e.push(u("span", this.label)), u("div", { class: "krds-spinner", role: "status" }, e);
152
+ const e = [t("span", { class: "sr-only" }, "로딩 중")];
153
+ return this.label && e.push(t("span", this.label)), t("div", {
154
+ class: "krds-spinner",
155
+ role: "status"
156
+ }, e);
160
157
  }
161
- }), Ae = _({
158
+ }), qe = B({
162
159
  name: "KrdsInput",
163
160
  props: {
164
161
  modelValue: {
@@ -246,26 +243,34 @@ const Ce = _({
246
243
  default: void 0
247
244
  }
248
245
  },
249
- emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup"],
250
- setup(e, { emit: o, slots: a }) {
251
- const l = h(() => {
252
- const b = ["krds-input"];
253
- return e.size && b.push(e.size), e.class && b.push(e.class), b;
254
- }), t = (b) => {
255
- const D = b.target, m = e.type === "number" ? Number(D.value) : D.value;
256
- o("update:modelValue", m), o("input", b);
257
- }, n = (b) => {
258
- o("change", b);
259
- }, i = (b) => {
260
- o("focus", b);
261
- }, v = (b) => {
262
- o("blur", b);
263
- }, p = (b) => {
264
- o("keydown", b);
265
- }, y = (b) => {
266
- o("keyup", b);
267
- }, g = h(() => {
268
- const b = {
246
+ emits: [
247
+ "update:modelValue",
248
+ "input",
249
+ "change",
250
+ "focus",
251
+ "blur",
252
+ "keydown",
253
+ "keyup"
254
+ ],
255
+ setup(e, { emit: a, slots: n }) {
256
+ const l = k(() => {
257
+ const S = ["krds-input"];
258
+ return e.size && S.push(e.size), e.class && S.push(e.class), S;
259
+ }), s = (S) => {
260
+ const V = S.target;
261
+ a("update:modelValue", e.type === "number" ? Number(V.value) : V.value), a("input", S);
262
+ }, r = (S) => {
263
+ a("change", S);
264
+ }, o = (S) => {
265
+ a("focus", S);
266
+ }, v = (S) => {
267
+ a("blur", S);
268
+ }, f = (S) => {
269
+ a("keydown", S);
270
+ }, b = (S) => {
271
+ a("keyup", S);
272
+ }, g = k(() => {
273
+ const S = {
269
274
  type: e.type,
270
275
  class: l.value,
271
276
  value: e.modelValue,
@@ -277,24 +282,24 @@ const Ce = _({
277
282
  disabled: e.disabled,
278
283
  autocomplete: e.autocomplete,
279
284
  autofocus: e.autofocus,
280
- onInput: t,
281
- onChange: n,
282
- onFocus: i,
285
+ onInput: s,
286
+ onChange: r,
287
+ onFocus: o,
283
288
  onBlur: v,
284
- onKeydown: p,
285
- onKeyup: y
289
+ onKeydown: f,
290
+ onKeyup: b
286
291
  };
287
- return e.maxlength !== void 0 && (b.maxlength = e.maxlength), e.minlength !== void 0 && (b.minlength = e.minlength), e.type === "number" && (e.max !== void 0 && (b.max = e.max), e.min !== void 0 && (b.min = e.min), e.step !== void 0 && (b.step = e.step)), b;
288
- }), w = h(() => {
289
- const b = ["form-conts"];
290
- return e.state !== "default" && b.push(`is-${e.state}`), e.icon && b.push("btn-ico-wrap"), b;
292
+ return e.maxlength !== void 0 && (S.maxlength = e.maxlength), e.minlength !== void 0 && (S.minlength = e.minlength), e.type === "number" && (e.max !== void 0 && (S.max = e.max), e.min !== void 0 && (S.min = e.min), e.step !== void 0 && (S.step = e.step)), S;
293
+ }), _ = k(() => {
294
+ const S = ["form-conts"];
295
+ return e.state !== "default" && S.push(`is-${e.state}`), e.icon && S.push("btn-ico-wrap"), S;
291
296
  });
292
297
  return () => {
293
- const b = [u("input", g.value)];
294
- return e.loading ? u("div", { class: w.value }, [u("div", { class: "form-spinner" }, [...b, u(xe)])]) : (a.default && b.push(...a.default()), u("div", { class: w.value }, b));
298
+ const S = [t("input", g.value)];
299
+ return e.loading ? t("div", { class: _.value }, [t("div", { class: "form-spinner" }, [...S, t(Ce)])]) : (n.default && S.push(...n.default()), t("div", { class: _.value }, S));
295
300
  };
296
301
  }
297
- }), Pe = _({
302
+ }), Oe = qe, Ne = B({
298
303
  name: "KrdsFormLabel",
299
304
  props: {
300
305
  for: {
@@ -315,25 +320,19 @@ const Ce = _({
315
320
  }
316
321
  },
317
322
  emits: ["click"],
318
- setup(e, { emit: o, slots: a }) {
319
- const l = (t) => {
320
- o("click", t);
323
+ setup(e, { emit: a, slots: n }) {
324
+ const l = (s) => {
325
+ a("click", s);
321
326
  };
322
- return () => u("div", { class: "form-tit" }, [
323
- u(
324
- "label",
325
- {
326
- for: e.for,
327
- id: e.id,
328
- class: e.class,
329
- style: e.style,
330
- onClick: l
331
- },
332
- a.default?.()
333
- )
334
- ]);
327
+ return () => t("div", { class: "form-tit" }, [t("label", {
328
+ for: e.for,
329
+ id: e.id,
330
+ class: e.class,
331
+ style: e.style,
332
+ onClick: l
333
+ }, n.default?.())]);
335
334
  }
336
- }), Fe = _({
335
+ }), je = Ne, We = B({
337
336
  name: "KrdsFormHint",
338
337
  props: {
339
338
  type: {
@@ -354,39 +353,35 @@ const Ce = _({
354
353
  }
355
354
  },
356
355
  emits: ["click"],
357
- setup(e, { emit: o, slots: a }) {
358
- const l = (n) => {
359
- o("click", n);
360
- }, t = () => {
361
- let n;
356
+ setup(e, { emit: a, slots: n }) {
357
+ const l = (r) => {
358
+ a("click", r);
359
+ }, s = () => {
360
+ let r;
362
361
  switch (e.type) {
363
362
  case "error":
364
- n = "form-hint-invalid";
363
+ r = "form-hint-invalid";
365
364
  break;
366
365
  case "success":
367
- n = "form-hint-success";
366
+ r = "form-hint-success";
368
367
  break;
369
368
  case "information":
370
- n = "form-hint-information";
369
+ r = "form-hint-information";
371
370
  break;
372
371
  default:
373
- n = "form-hint";
372
+ r = "form-hint";
374
373
  break;
375
374
  }
376
- return e.class ? `${n} ${e.class}` : n;
375
+ return e.class ? `${r} ${e.class}` : r;
377
376
  };
378
- return () => u(
379
- "p",
380
- {
381
- id: e.id,
382
- class: t(),
383
- style: e.style,
384
- onClick: l
385
- },
386
- a.default?.()
387
- );
377
+ return () => t("p", {
378
+ id: e.id,
379
+ class: s(),
380
+ style: e.style,
381
+ onClick: l
382
+ }, n.default?.());
388
383
  }
389
- }), Oe = _({
384
+ }), Ge = We, Ye = B({
390
385
  name: "KrdsFormGroup",
391
386
  props: {
392
387
  class: {
@@ -402,173 +397,190 @@ const Ce = _({
402
397
  default: void 0
403
398
  }
404
399
  },
405
- setup(e, { slots: o }) {
406
- const a = h(() => {
400
+ setup(e, { slots: a }) {
401
+ const n = k(() => {
407
402
  const l = ["form-group"];
408
403
  return e.class && l.push(e.class), l;
409
404
  });
410
- return () => u(
411
- "div",
412
- {
413
- id: e.id,
414
- class: a.value,
415
- style: e.style
416
- },
417
- o.default?.()
418
- );
405
+ return () => t("div", {
406
+ id: e.id,
407
+ class: n.value,
408
+ style: e.style
409
+ }, a.default?.());
419
410
  }
420
- });
421
- function qe(e, o) {
422
- const a = /* @__PURE__ */ new Date(), l = B(e || a.getFullYear()), t = B(o || a.getMonth() + 1), n = B(null), i = B(null), v = B(null), p = h(() => {
423
- const c = a.getFullYear(), d = [];
424
- for (let f = c - 10; f <= c + 10; f++)
425
- d.push(f);
426
- return d;
427
- }), y = h(() => Array.from({ length: 12 }, (c, d) => d + 1)), g = () => {
428
- n.value = null, i.value = null;
429
- }, w = () => {
430
- t.value === 1 ? (t.value = 12, l.value -= 1) : t.value -= 1;
431
- }, b = () => {
432
- t.value === 12 ? (t.value = 1, l.value += 1) : t.value += 1;
433
- }, D = (c, d = !1) => {
434
- if (d)
435
- n.value = c, i.value = c;
436
- else if (!n.value || n.value && i.value)
437
- n.value = c, i.value = null;
411
+ }), Ue = Ye;
412
+ function Xe(e, a) {
413
+ const n = /* @__PURE__ */ new Date(), l = L(e || n.getFullYear()), s = L(a || n.getMonth() + 1), r = L(null), o = L(null), v = L(null), f = k(() => {
414
+ const c = n.getFullYear(), u = [];
415
+ for (let h = c - 10; h <= c + 10; h++) u.push(h);
416
+ return u;
417
+ }), b = k(() => Array.from({ length: 12 }, (c, u) => u + 1)), g = () => {
418
+ r.value = null, o.value = null;
419
+ }, _ = () => {
420
+ s.value === 1 ? (s.value = 12, l.value -= 1) : s.value -= 1;
421
+ }, S = () => {
422
+ s.value === 12 ? (s.value = 1, l.value += 1) : s.value += 1;
423
+ }, V = (c, u = !1) => {
424
+ if (u)
425
+ r.value = c, o.value = c;
426
+ else if (!r.value || r.value && o.value)
427
+ r.value = c, o.value = null;
438
428
  else {
439
- const f = new Date(n.value.replace(/\./g, "-"));
440
- new Date(c.replace(/\./g, "-")) < f ? (n.value = c, i.value = null) : i.value = c;
429
+ const h = new Date(r.value.replace(/\./g, "-"));
430
+ new Date(c.replace(/\./g, "-")) < h ? (r.value = c, o.value = null) : o.value = c;
441
431
  }
442
432
  };
443
433
  return {
444
- // State
445
434
  currentYear: l,
446
- currentMonth: t,
447
- selectedStartDate: n,
448
- selectedEndDate: i,
435
+ currentMonth: s,
436
+ selectedStartDate: r,
437
+ selectedEndDate: o,
449
438
  activeDateSelector: v,
450
- // Computed
451
- yearOptions: p,
452
- monthOptions: y,
453
- // Methods
439
+ yearOptions: f,
440
+ monthOptions: b,
454
441
  clearDateSelection: g,
455
- prevMonth: w,
456
- nextMonth: b,
457
- handleDateSelection: D,
442
+ prevMonth: _,
443
+ nextMonth: S,
444
+ handleDateSelection: V,
458
445
  selectToday: () => {
459
- const c = `${a.getFullYear()}.${String(a.getMonth() + 1).padStart(2, "0")}.${String(a.getDate()).padStart(2, "0")}`;
460
- D(c, !0);
446
+ V(`${n.getFullYear()}.${String(n.getMonth() + 1).padStart(2, "0")}.${String(n.getDate()).padStart(2, "0")}`, !0);
461
447
  },
462
448
  isDateInSelectedRange: (c) => {
463
- if (!n.value || !i.value)
464
- return { isInRange: !1, isStart: !1, isEnd: !1 };
465
- const d = new Date(c.replace(/\./g, "-")), f = new Date(n.value.replace(/\./g, "-")), x = new Date(i.value.replace(/\./g, "-")), R = c === n.value, L = c === i.value;
466
- return { isInRange: d >= f && d <= x, isStart: R, isEnd: L };
449
+ if (!r.value || !o.value) return {
450
+ isInRange: !1,
451
+ isStart: !1,
452
+ isEnd: !1
453
+ };
454
+ const u = new Date(c.replace(/\./g, "-")), h = new Date(r.value.replace(/\./g, "-")), m = new Date(o.value.replace(/\./g, "-")), w = c === r.value, C = c === o.value;
455
+ return {
456
+ isInRange: u >= h && u <= m,
457
+ isStart: w,
458
+ isEnd: C
459
+ };
467
460
  }
468
461
  };
469
462
  }
470
- function Ne(e, o, a = {}) {
463
+ function Je(e, a, n = {}) {
471
464
  let l = null;
472
- const t = typeof a == "string" ? { ignore: a } : a, { ignore: n, event: i = "click" } = t, v = () => {
473
- l = (y) => {
474
- const g = y.target;
475
- e.value?.contains(g) || n && g.closest(n) || o();
476
- }, document.addEventListener(i, l);
477
- }, p = () => {
465
+ const { ignore: s, event: r = "click" } = typeof n == "string" ? { ignore: n } : n, o = () => {
466
+ l = (f) => {
467
+ const b = f.target;
468
+ e.value?.contains(b) || s && b.closest(s) || a();
469
+ }, document.addEventListener(r, l);
470
+ }, v = () => {
478
471
  if (l) {
479
- const y = typeof a == "string" ? "click" : a.event || "click";
480
- document.removeEventListener(y, l), l = null;
472
+ const f = typeof n == "string" ? "click" : n.event || "click";
473
+ document.removeEventListener(f, l), l = null;
481
474
  }
482
475
  };
483
- return le(() => {
476
+ return te(() => {
477
+ o();
478
+ }), fe(() => {
484
479
  v();
485
- }), Se(() => {
486
- p();
487
480
  }), {
488
- setupGlobalListeners: v,
489
- removeGlobalListeners: p
481
+ setupGlobalListeners: o,
482
+ removeGlobalListeners: v
490
483
  };
491
484
  }
492
- const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id", "name", "placeholder", "value", "readonly", "disabled", "required", "autofocus"], Ye = ["disabled", "aria-expanded"], Ge = { class: "calendar-head" }, Ue = { class: "calendar-switch-wrap" }, Xe = { class: "calendar-drop-down" }, Je = ["aria-expanded"], Qe = { class: "calendar-select calendar-year-wrap" }, Ze = { class: "sel year" }, et = ["onClick"], tt = { class: "calendar-drop-down" }, lt = ["aria-expanded"], at = { class: "calendar-select calendar-mon-wrap" }, nt = { class: "sel month" }, st = ["onClick"], ot = { class: "calendar-body" }, it = { class: "calendar-table-wrap" }, dt = { class: "calendar-tbl" }, rt = ["data-date"], ct = ["aria-pressed", "onClick"], ut = { class: "calendar-footer" }, ft = { class: "calendar-btn-wrap" }, vt = /* @__PURE__ */ _({
485
+ var Qe = { class: "form-conts" }, Ze = { class: "calendar-input" }, et = [
486
+ "id",
487
+ "name",
488
+ "placeholder",
489
+ "value",
490
+ "readonly",
491
+ "disabled",
492
+ "required",
493
+ "autofocus"
494
+ ], tt = ["disabled", "aria-expanded"], at = { class: "calendar-head" }, lt = { class: "calendar-switch-wrap" }, st = { class: "calendar-drop-down" }, nt = ["aria-expanded"], rt = { class: "calendar-select calendar-year-wrap" }, it = { class: "sel year" }, ot = ["onClick"], dt = { class: "calendar-drop-down" }, ut = ["aria-expanded"], ct = { class: "calendar-select calendar-mon-wrap" }, ft = { class: "sel month" }, vt = ["onClick"], pt = { class: "calendar-body" }, ht = { class: "calendar-table-wrap" }, mt = { class: "calendar-tbl" }, yt = ["data-date"], gt = ["aria-pressed", "onClick"], bt = { class: "calendar-footer" }, kt = { class: "calendar-btn-wrap" }, St = /* @__PURE__ */ B({
493
495
  __name: "KrdsDateInput",
494
496
  props: {
495
497
  modelValue: { default: void 0 },
496
498
  size: { default: "medium" },
497
499
  placeholder: { default: "YYYY.MM.DD" },
498
- disabled: { type: Boolean, default: !1 },
499
- readonly: { type: Boolean, default: !1 },
500
- autofocus: { type: Boolean, default: !1 },
500
+ disabled: {
501
+ type: Boolean,
502
+ default: !1
503
+ },
504
+ readonly: {
505
+ type: Boolean,
506
+ default: !1
507
+ },
508
+ autofocus: {
509
+ type: Boolean,
510
+ default: !1
511
+ },
501
512
  eventDates: { default: () => [] },
502
513
  holidays: { default: () => [] },
503
514
  initialYear: { default: void 0 },
504
515
  initialMonth: { default: void 0 },
505
516
  name: { default: void 0 },
506
- required: { type: Boolean, default: !1 },
517
+ required: {
518
+ type: Boolean,
519
+ default: !1
520
+ },
507
521
  class: { default: void 0 },
508
522
  style: {},
509
523
  id: { default: void 0 }
510
524
  },
511
- emits: ["update:modelValue", "input", "change", "focus", "blur"],
512
- setup(e, { emit: o }) {
513
- const a = e, l = o, t = B(), n = B(), i = B(!1), v = B(null), {
514
- currentYear: p,
515
- currentMonth: y,
516
- selectedStartDate: g,
517
- selectedEndDate: w,
518
- yearOptions: b,
519
- monthOptions: D,
520
- prevMonth: m,
521
- nextMonth: s,
522
- handleDateSelection: c,
523
- selectToday: d,
524
- isDateInSelectedRange: f
525
- } = qe(a.initialYear, a.initialMonth), x = () => {
526
- i.value && n.value?.focus(), i.value = !1, v.value = null;
525
+ emits: [
526
+ "update:modelValue",
527
+ "input",
528
+ "change",
529
+ "focus",
530
+ "blur"
531
+ ],
532
+ setup(e, { emit: a }) {
533
+ const n = e, l = a, s = L(), r = L(), o = L(!1), v = L(null), { currentYear: f, currentMonth: b, selectedStartDate: g, selectedEndDate: _, yearOptions: S, monthOptions: V, prevMonth: d, nextMonth: i, handleDateSelection: c, selectToday: u, isDateInSelectedRange: h } = Xe(n.initialYear, n.initialMonth), m = () => {
534
+ o.value && r.value?.focus(), o.value = !1, v.value = null;
527
535
  };
528
- Ne(t, x, ".calendar-conts");
529
- const R = h(() => {
530
- const C = ["krds-input", "datepicker", "cal"];
531
- return a.size && C.push(a.size), a.class && C.push(a.class), C;
532
- }), L = h(() => ["form-conts", "calendar-conts"]), M = h(() => ({
536
+ Je(s, m, ".calendar-conts");
537
+ const w = k(() => {
538
+ const I = [
539
+ "krds-input",
540
+ "datepicker",
541
+ "cal"
542
+ ];
543
+ return n.size && I.push(n.size), n.class && I.push(n.class), I;
544
+ }), C = k(() => ["form-conts", "calendar-conts"]), x = k(() => ({
533
545
  "krds-calendar-area": !0,
534
- active: i.value
535
- })), z = h(() => {
536
- const C = p.value, $ = y.value, K = new Date(C, $ - 1, 1), U = new Date(K);
537
- U.setDate(U.getDate() - K.getDay());
538
- const W = [], T = new Date(U);
539
- for (let oe = 0; oe < 6; oe++) {
540
- const pe = [];
546
+ active: o.value
547
+ })), $ = k(() => {
548
+ const I = f.value, z = b.value, E = new Date(I, z - 1, 1), Q = new Date(E);
549
+ Q.setDate(Q.getDate() - E.getDay());
550
+ const U = [], H = new Date(Q);
551
+ for (let ie = 0; ie < 6; ie++) {
552
+ const he = [];
541
553
  for (let me = 0; me < 7; me++) {
542
- const De = `${T.getFullYear()}.${String(T.getMonth() + 1).padStart(2, "0")}.${String(T.getDate()).padStart(2, "0")}`, he = T.getDay();
543
- pe.push({
544
- day: T.getDate(),
545
- dateString: De,
546
- isCurrentMonth: T.getMonth() === $ - 1,
547
- isToday: T.toDateString() === (/* @__PURE__ */ new Date()).toDateString(),
548
- isPrevMonth: T.getMonth() < $ - 1 || T.getMonth() === 11 && $ === 1,
549
- isNextMonth: T.getMonth() > $ - 1 || T.getMonth() === 0 && $ === 12,
550
- isSunday: he === 0,
551
- isSaturday: he === 6
552
- }), T.setDate(T.getDate() + 1);
554
+ const Ve = `${H.getFullYear()}.${String(H.getMonth() + 1).padStart(2, "0")}.${String(H.getDate()).padStart(2, "0")}`, ye = H.getDay();
555
+ he.push({
556
+ day: H.getDate(),
557
+ dateString: Ve,
558
+ isCurrentMonth: H.getMonth() === z - 1,
559
+ isToday: H.toDateString() === (/* @__PURE__ */ new Date()).toDateString(),
560
+ isPrevMonth: H.getMonth() < z - 1 || H.getMonth() === 11 && z === 1,
561
+ isNextMonth: H.getMonth() > z - 1 || H.getMonth() === 0 && z === 12,
562
+ isSunday: ye === 0,
563
+ isSaturday: ye === 6
564
+ }), H.setDate(H.getDate() + 1);
553
565
  }
554
- W.push(pe);
566
+ U.push(he);
555
567
  }
556
- return W;
557
- }), H = (C) => {
558
- const $ = [];
559
- if (C.isPrevMonth && $.push("old"), C.isNextMonth && $.push("new"), C.isToday && $.push("today"), C.isSunday && $.push("day-off"), a.holidays?.includes(C.dateString) && $.push("day-off"), a.eventDates?.includes(C.dateString) && $.push("day-event"), C.isCurrentMonth) {
560
- const K = f(C.dateString);
561
- K.isInRange && ($.push("period"), K.isStart && $.push("start"), K.isEnd && $.push("end"));
568
+ return U;
569
+ }), y = (I) => {
570
+ const z = [];
571
+ if (I.isPrevMonth && z.push("old"), I.isNextMonth && z.push("new"), I.isToday && z.push("today"), I.isSunday && z.push("day-off"), n.holidays?.includes(I.dateString) && z.push("day-off"), n.eventDates?.includes(I.dateString) && z.push("day-event"), I.isCurrentMonth) {
572
+ const E = h(I.dateString);
573
+ E.isInRange && (z.push("period"), E.isStart && z.push("start"), E.isEnd && z.push("end"));
562
574
  }
563
- return $;
564
- }, I = h(() => [
575
+ return z;
576
+ }, K = k(() => [
565
577
  {
566
578
  id: "get-today",
567
579
  label: "오늘",
568
580
  class: "text",
569
581
  variant: void 0,
570
582
  size: "small",
571
- handler: d
583
+ handler: u
572
584
  },
573
585
  {
574
586
  id: "cancel-btn",
@@ -576,7 +588,7 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
576
588
  class: void 0,
577
589
  variant: "tertiary",
578
590
  size: "small",
579
- handler: x
591
+ handler: m
580
592
  },
581
593
  {
582
594
  id: "confirm-btn",
@@ -584,211 +596,142 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
584
596
  class: void 0,
585
597
  variant: "primary",
586
598
  size: "small",
587
- handler: X
588
- }
589
- ]), j = (C) => {
590
- v.value === C ? v.value = null : v.value = C;
591
- }, Z = (C) => {
592
- p.value = C, v.value = null;
593
- }, se = (C) => {
594
- y.value = C, v.value = null;
595
- }, X = () => {
596
- if (g.value) {
597
- if (w.value && g.value !== w.value) {
598
- const C = `${g.value} ~ ${w.value}`;
599
- l("update:modelValue", C);
600
- } else
601
- l("update:modelValue", g.value);
602
- x();
599
+ handler: j
603
600
  }
601
+ ]), F = (I) => {
602
+ v.value === I ? v.value = null : v.value = I;
603
+ }, P = (I) => {
604
+ f.value = I, v.value = null;
605
+ }, A = (I) => {
606
+ b.value = I, v.value = null;
607
+ }, j = () => {
608
+ g.value && (_.value && g.value !== _.value ? l("update:modelValue", `${g.value} ~ ${_.value}`) : l("update:modelValue", g.value), m());
604
609
  }, O = () => {
605
- i.value = !0, v.value = null, setTimeout(() => {
606
- t.value?.querySelector(".calendar-wrap")?.focus();
610
+ o.value = !0, v.value = null, setTimeout(() => {
611
+ s.value?.querySelector(".calendar-wrap")?.focus();
607
612
  }, 50);
608
- }, q = () => {
609
- i.value ? x() : O();
610
- }, ve = (C) => {
611
- C.code === "Escape" && (v.value ? v.value = null : i.value && x());
612
- }, ee = (C) => {
613
- const $ = C.target;
614
- l("update:modelValue", $.value), l("input", C);
615
- }, _e = (C) => {
616
- l("change", C);
617
- }, Be = (C) => {
618
- l("focus", C);
619
- }, Ke = (C) => {
620
- l("blur", C);
613
+ }, G = () => {
614
+ o.value ? m() : O();
615
+ }, le = (I) => {
616
+ I.code === "Escape" && (v.value ? v.value = null : o.value && m());
617
+ }, Be = (I) => {
618
+ const z = I.target;
619
+ l("update:modelValue", z.value), l("input", I);
620
+ }, Le = (I) => {
621
+ l("change", I);
622
+ }, De = (I) => {
623
+ l("focus", I);
624
+ }, Te = (I) => {
625
+ l("blur", I);
621
626
  };
622
- return (C, $) => (k(), S("div", He, [
623
- r("div", {
624
- class: E(L.value)
625
- }, [
626
- r("div", je, [
627
- r("input", {
628
- id: e.id,
629
- name: e.name,
630
- class: E(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,
637
- type: "text",
638
- onInput: ee,
639
- onChange: _e,
640
- onFocus: Be,
641
- onBlur: Ke
642
- }, null, 42, We),
643
- r("button", {
644
- ref_key: "datePickerButtonRef",
645
- ref: n,
646
- class: E(`krds-btn ${e.size || "medium"} icon form-btn-datepicker`),
647
- disabled: e.disabled,
648
- "aria-expanded": i.value,
649
- type: "button",
650
- onClick: q
651
- }, [...$[4] || ($[4] = [
652
- r("span", { class: "sr-only" }, "달력 열기", -1),
653
- r("i", { class: "svg-icon ico-calendar" }, null, -1)
654
- ])], 10, Ye)
655
- ]),
656
- r("div", {
657
- ref_key: "datePickerAreaRef",
658
- ref: t,
659
- class: E(M.value)
660
- }, [
661
- Q(r("div", {
662
- class: "calendar-wrap bottom",
663
- "aria-label": "달력",
664
- tabindex: "0",
665
- onKeydown: ve
666
- }, [
667
- r("div", Ge, [
668
- r("button", {
669
- type: "button",
670
- class: "btn-cal-move prev",
671
- onClick: $[0] || ($[0] = //@ts-ignore
672
- (...K) => A(m) && A(m)(...K))
673
- }, [...$[5] || ($[5] = [
674
- r("span", { class: "sr-only" }, "이전 달", -1)
675
- ])]),
676
- r("div", Ue, [
677
- r("div", Xe, [
678
- r("button", {
679
- type: "button",
680
- class: "btn-cal-switch year",
681
- "aria-label": "연도 선택",
682
- "aria-expanded": v.value === "year",
683
- onClick: $[1] || ($[1] = (K) => j("year"))
684
- }, V(A(p)) + "년 ", 9, Je),
685
- Q(r("div", Qe, [
686
- r("ul", Ze, [
687
- (k(!0), S(F, null, N(A(b), (K) => (k(), S("li", { key: K }, [
688
- r("button", {
689
- type: "button",
690
- class: E({ active: K === A(p) }),
691
- onClick: (U) => Z(K)
692
- }, V(K) + "년", 11, et)
693
- ]))), 128))
694
- ])
695
- ], 512), [
696
- [te, v.value === "year"]
697
- ])
698
- ]),
699
- r("div", tt, [
700
- r("button", {
701
- type: "button",
702
- class: "btn-cal-switch month",
703
- "aria-label": "월 선택",
704
- "aria-expanded": v.value === "month",
705
- onClick: $[2] || ($[2] = (K) => j("month"))
706
- }, V(A(y).toString().padStart(2, "0")) + "월 ", 9, lt),
707
- Q(r("div", at, [
708
- r("ul", nt, [
709
- (k(!0), S(F, null, N(A(D), (K) => (k(), S("li", { key: K }, [
710
- r("button", {
711
- type: "button",
712
- class: E({ active: K === A(y) }),
713
- onClick: (U) => se(K)
714
- }, V(K.toString().padStart(2, "0")) + "월 ", 11, st)
715
- ]))), 128))
716
- ])
717
- ], 512), [
718
- [te, v.value === "month"]
719
- ])
720
- ])
721
- ]),
722
- r("button", {
723
- type: "button",
724
- class: "btn-cal-move next",
725
- onClick: $[3] || ($[3] = //@ts-ignore
726
- (...K) => A(s) && A(s)(...K))
727
- }, [...$[6] || ($[6] = [
728
- r("span", { class: "sr-only" }, "다음 달", -1)
729
- ])])
730
- ]),
731
- r("div", ot, [
732
- r("div", it, [
733
- r("table", dt, [
734
- r("caption", null, V(A(p)) + "년 " + V(A(y).toString().padStart(2, "0")) + "월", 1),
735
- $[7] || ($[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, "토")
744
- ])
745
- ], -1)),
746
- r("tbody", null, [
747
- (k(!0), S(F, null, N(z.value, (K, U) => (k(), S("tr", { key: U }, [
748
- (k(!0), S(F, null, N(K, (W, T) => (k(), S("td", {
749
- key: T,
750
- class: E(H(W)),
751
- "data-date": W.dateString
752
- }, [
753
- r("button", {
754
- type: "button",
755
- class: "btn-set-date",
756
- "aria-pressed": A(f)(W.dateString).isInRange ? "true" : "false",
757
- onClick: (oe) => A(c)(W.dateString)
758
- }, [
759
- r("span", null, V(W.day), 1)
760
- ], 8, ct)
761
- ], 10, rt))), 128))
762
- ]))), 128))
763
- ])
764
- ])
765
- ])
766
- ]),
767
- r("div", ut, [
768
- r("div", ft, [
769
- (k(!0), S(F, null, N(I.value, (K) => (k(), ie(A(Ce), {
770
- id: K.id,
771
- key: K.id,
772
- class: E(K.class),
773
- variant: K.variant,
774
- size: K.size,
775
- onClick: K.handler
776
- }, {
777
- default: de(() => [
778
- P(V(K.label), 1)
779
- ]),
780
- _: 2
781
- }, 1032, ["id", "class", "variant", "size", "onClick"]))), 128))
782
- ])
783
- ])
784
- ], 544), [
785
- [te, i.value]
786
- ])
787
- ], 2)
788
- ], 2)
789
- ]));
627
+ return (I, z) => (D(), T("div", Qe, [p("div", { class: R(C.value) }, [p("div", Ze, [p("input", {
628
+ id: e.id,
629
+ name: e.name,
630
+ class: R(w.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,
637
+ type: "text",
638
+ onInput: Be,
639
+ onChange: Le,
640
+ onFocus: De,
641
+ onBlur: Te
642
+ }, null, 42, et), p("button", {
643
+ ref_key: "datePickerButtonRef",
644
+ ref: r,
645
+ class: R(`krds-btn ${e.size || "medium"} icon form-btn-datepicker`),
646
+ disabled: e.disabled,
647
+ "aria-expanded": o.value,
648
+ type: "button",
649
+ onClick: G
650
+ }, [...z[4] || (z[4] = [p("span", { class: "sr-only" }, "달력 열기", -1), p("i", { class: "svg-icon ico-calendar" }, null, -1)])], 10, tt)]), p("div", {
651
+ ref_key: "datePickerAreaRef",
652
+ ref: s,
653
+ class: R(x.value)
654
+ }, [ee(p("div", {
655
+ class: "calendar-wrap bottom",
656
+ "aria-label": "달력",
657
+ tabindex: "0",
658
+ onKeydown: le
659
+ }, [
660
+ p("div", at, [
661
+ p("button", {
662
+ type: "button",
663
+ class: "btn-cal-move prev",
664
+ onClick: z[0] || (z[0] = (...E) => q(d) && q(d)(...E))
665
+ }, [...z[5] || (z[5] = [p("span", { class: "sr-only" }, "이전 달", -1)])]),
666
+ p("div", lt, [p("div", st, [p("button", {
667
+ type: "button",
668
+ class: "btn-cal-switch year",
669
+ "aria-label": "연도 선택",
670
+ "aria-expanded": v.value === "year",
671
+ onClick: z[1] || (z[1] = (E) => F("year"))
672
+ }, M(q(f)) + "년 ", 9, nt), ee(p("div", rt, [p("ul", it, [(D(!0), T(W, null, Y(q(S), (E) => (D(), T("li", { key: E }, [p("button", {
673
+ type: "button",
674
+ class: R({ active: E === q(f) }),
675
+ onClick: (Q) => P(E)
676
+ }, M(E) + "년", 11, ot)]))), 128))])], 512), [[se, v.value === "year"]])]), p("div", dt, [p("button", {
677
+ type: "button",
678
+ class: "btn-cal-switch month",
679
+ "aria-label": "월 선택",
680
+ "aria-expanded": v.value === "month",
681
+ onClick: z[2] || (z[2] = (E) => F("month"))
682
+ }, M(q(b).toString().padStart(2, "0")) + "월 ", 9, ut), ee(p("div", ct, [p("ul", ft, [(D(!0), T(W, null, Y(q(V), (E) => (D(), T("li", { key: E }, [p("button", {
683
+ type: "button",
684
+ class: R({ active: E === q(b) }),
685
+ onClick: (Q) => A(E)
686
+ }, M(E.toString().padStart(2, "0")) + "월 ", 11, vt)]))), 128))])], 512), [[se, v.value === "month"]])])]),
687
+ p("button", {
688
+ type: "button",
689
+ class: "btn-cal-move next",
690
+ onClick: z[3] || (z[3] = (...E) => q(i) && q(i)(...E))
691
+ }, [...z[6] || (z[6] = [p("span", { class: "sr-only" }, "다음 달", -1)])])
692
+ ]),
693
+ p("div", pt, [p("div", ht, [p("table", mt, [
694
+ p("caption", null, M(q(f)) + "년 " + M(q(b).toString().padStart(2, "0")) + "월", 1),
695
+ z[7] || (z[7] = p("thead", null, [p("tr", null, [
696
+ p("th", null, "일"),
697
+ p("th", null, "월"),
698
+ p("th", null, "화"),
699
+ p("th", null, "수"),
700
+ p("th", null, "목"),
701
+ p("th", null, "금"),
702
+ p("th", null, "토")
703
+ ])], -1)),
704
+ p("tbody", null, [(D(!0), T(W, null, Y($.value, (E, Q) => (D(), T("tr", { key: Q }, [(D(!0), T(W, null, Y(E, (U, H) => (D(), T("td", {
705
+ key: H,
706
+ class: R(y(U)),
707
+ "data-date": U.dateString
708
+ }, [p("button", {
709
+ type: "button",
710
+ class: "btn-set-date",
711
+ "aria-pressed": q(h)(U.dateString).isInRange ? "true" : "false",
712
+ onClick: (ie) => q(c)(U.dateString)
713
+ }, [p("span", null, M(U.day), 1)], 8, gt)], 10, yt))), 128))]))), 128))])
714
+ ])])]),
715
+ p("div", bt, [p("div", kt, [(D(!0), T(W, null, Y(K.value, (E) => (D(), de(q(_e), {
716
+ id: E.id,
717
+ key: E.id,
718
+ class: R(E.class),
719
+ variant: E.variant,
720
+ size: E.size,
721
+ onClick: E.handler
722
+ }, {
723
+ default: ue(() => [N(M(E.label), 1)]),
724
+ _: 2
725
+ }, 1032, [
726
+ "id",
727
+ "class",
728
+ "variant",
729
+ "size",
730
+ "onClick"
731
+ ]))), 128))])])
732
+ ], 544), [[se, o.value]])], 2)], 2)]));
790
733
  }
791
- }), pt = _({
734
+ }), Kt = St, wt = Kt, _t = B({
792
735
  name: "KrdsTextarea",
793
736
  props: {
794
737
  modelValue: {
@@ -847,7 +790,6 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
847
790
  type: String,
848
791
  default: "vertical"
849
792
  },
850
- // BaseFormProps에서 상속
851
793
  class: {
852
794
  type: String,
853
795
  default: void 0
@@ -861,39 +803,43 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
861
803
  default: void 0
862
804
  }
863
805
  },
864
- emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup"],
865
- setup(e, { emit: o }) {
866
- const a = B(0);
867
- ae(
868
- () => e.modelValue,
869
- (s) => {
870
- a.value = (s || "").length;
871
- },
872
- { immediate: !0 }
873
- );
874
- const l = h(() => {
875
- const s = ["krds-input"];
876
- return e.size && s.push(e.size), e.class && s.push(e.class), s;
877
- }), t = h(() => {
878
- const s = {};
879
- return e.resize && (s.resize = e.resize), s;
880
- }), n = (s) => {
881
- const d = s.target.value;
882
- a.value = d.length, o("update:modelValue", d), o("input", s);
883
- }, i = (s) => {
884
- o("change", s);
885
- }, v = (s) => {
886
- o("focus", s);
887
- }, p = (s) => {
888
- o("blur", s);
889
- }, y = (s) => {
890
- o("keydown", s);
891
- }, g = (s) => {
892
- o("keyup", s);
893
- }, w = h(() => {
894
- const s = {
806
+ emits: [
807
+ "update:modelValue",
808
+ "input",
809
+ "change",
810
+ "focus",
811
+ "blur",
812
+ "keydown",
813
+ "keyup"
814
+ ],
815
+ setup(e, { emit: a }) {
816
+ const n = L(0);
817
+ re(() => e.modelValue, (i) => {
818
+ n.value = (i || "").length;
819
+ }, { immediate: !0 });
820
+ const l = k(() => {
821
+ const i = ["krds-input"];
822
+ return e.size && i.push(e.size), e.class && i.push(e.class), i;
823
+ }), s = k(() => {
824
+ const i = {};
825
+ return e.resize && (i.resize = e.resize), i;
826
+ }), r = (i) => {
827
+ const c = i.target.value;
828
+ n.value = c.length, a("update:modelValue", c), a("input", i);
829
+ }, o = (i) => {
830
+ a("change", i);
831
+ }, v = (i) => {
832
+ a("focus", i);
833
+ }, f = (i) => {
834
+ a("blur", i);
835
+ }, b = (i) => {
836
+ a("keydown", i);
837
+ }, g = (i) => {
838
+ a("keyup", i);
839
+ }, _ = k(() => {
840
+ const i = {
895
841
  class: l.value,
896
- style: t.value,
842
+ style: s.value,
897
843
  value: e.modelValue,
898
844
  placeholder: e.placeholder,
899
845
  name: e.name,
@@ -904,37 +850,32 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
904
850
  autofocus: e.autofocus,
905
851
  rows: e.rows,
906
852
  cols: e.cols,
907
- onInput: n,
908
- onChange: i,
853
+ onInput: r,
854
+ onChange: o,
909
855
  onFocus: v,
910
- onBlur: p,
911
- onKeydown: y,
856
+ onBlur: f,
857
+ onKeydown: b,
912
858
  onKeyup: g
913
859
  };
914
- return e.maxlength !== void 0 && (s.maxlength = e.maxlength), e.minlength !== void 0 && (s.minlength = e.minlength), s;
915
- }), b = h(() => ["form-conts"]), D = h(() => ["textarea-wrap"]), m = h(() => {
916
- if (!e.showCount) return null;
917
- const s = a.value, c = e.maxlength;
918
- return {
919
- current: s,
920
- max: c || ""
921
- };
922
- });
860
+ return e.maxlength !== void 0 && (i.maxlength = e.maxlength), e.minlength !== void 0 && (i.minlength = e.minlength), i;
861
+ }), S = k(() => ["form-conts"]), V = k(() => ["textarea-wrap"]), d = k(() => e.showCount ? {
862
+ current: n.value,
863
+ max: e.maxlength || ""
864
+ } : null);
923
865
  return () => {
924
- const s = [u("textarea", w.value)];
925
- return m.value && s.push(
926
- u("p", { class: "textarea-count" }, [
927
- u("span", { class: "count-now" }, m.value.current),
928
- u("span", { class: "count-total" }, m.value.max ? `/${m.value.max}` : "")
929
- ])
930
- ), u("div", { class: b.value }, [u("div", { class: D.value }, s)]);
866
+ const i = [t("textarea", _.value)];
867
+ return d.value && i.push(t("p", { class: "textarea-count" }, [t("span", { class: "count-now" }, d.value.current), t("span", { class: "count-total" }, d.value.max ? `/${d.value.max}` : "")])), t("div", { class: S.value }, [t("div", { class: V.value }, i)]);
931
868
  };
932
869
  }
933
- }), mt = _({
870
+ }), Ct = _t, $t = B({
934
871
  name: "KrdsSelect",
935
872
  props: {
936
873
  modelValue: {
937
- type: [String, Number, null],
874
+ type: [
875
+ String,
876
+ Number,
877
+ null
878
+ ],
938
879
  default: null
939
880
  },
940
881
  size: {
@@ -978,53 +919,55 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
978
919
  default: void 0
979
920
  }
980
921
  },
981
- emits: ["update:modelValue", "focus", "blur"],
982
- setup(e, { emit: o, slots: a }) {
983
- const l = h(() => {
922
+ emits: [
923
+ "update:modelValue",
924
+ "focus",
925
+ "blur"
926
+ ],
927
+ setup(e, { emit: a, slots: n }) {
928
+ const l = k(() => {
984
929
  const g = [];
985
930
  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;
986
- }), t = (g) => {
987
- const w = g.target, b = w.value === "" ? null : w.value;
988
- o("update:modelValue", b);
989
- }, n = (g) => {
990
- o("focus", g);
991
- }, i = (g) => {
992
- o("blur", g);
993
- }, v = h(() => ({
931
+ }), s = (g) => {
932
+ const _ = g.target;
933
+ a("update:modelValue", _.value === "" ? null : _.value);
934
+ }, r = (g) => {
935
+ a("focus", g);
936
+ }, o = (g) => {
937
+ a("blur", g);
938
+ }, v = k(() => ({
994
939
  class: l.value,
995
940
  value: e.modelValue ?? "",
996
941
  title: e.title || e.placeholder,
997
942
  name: e.name,
998
943
  id: e.id,
999
944
  disabled: e.disabled || e.readonly,
1000
- onChange: t,
1001
- onFocus: n,
1002
- onBlur: i
1003
- })), p = h(() => {
945
+ onChange: s,
946
+ onFocus: r,
947
+ onBlur: o
948
+ })), f = k(() => {
1004
949
  const g = ["form-conts"];
1005
950
  return e.state !== "default" && g.push(`is-${e.state}`), g;
1006
- }), y = () => {
951
+ }), b = () => {
1007
952
  const g = [];
1008
- return e.placeholder && !e.modelValue && g.push(u("option", { value: "", disabled: !0, selected: !0 }, e.placeholder)), e.options && e.options.length > 0 && e.options.forEach((w) => {
1009
- g.push(
1010
- u(
1011
- "option",
1012
- {
1013
- value: w.value,
1014
- disabled: w.disabled,
1015
- selected: w.value === e.modelValue
1016
- },
1017
- w.label
1018
- )
1019
- );
1020
- }), a.default && g.push(...a.default()), g;
953
+ return e.placeholder && !e.modelValue && g.push(t("option", {
954
+ value: "",
955
+ disabled: !0,
956
+ selected: !0
957
+ }, e.placeholder)), e.options && e.options.length > 0 && e.options.forEach((_) => {
958
+ g.push(t("option", {
959
+ value: _.value,
960
+ disabled: _.disabled,
961
+ selected: _.value === e.modelValue
962
+ }, _.label));
963
+ }), n.default && g.push(...n.default()), g;
1021
964
  };
1022
965
  return () => {
1023
- const g = u("select", v.value, y());
1024
- return e.sort ? g : u("div", { class: p.value }, [g]);
966
+ const g = t("select", v.value, b());
967
+ return e.sort ? g : t("div", { class: f.value }, [g]);
1025
968
  };
1026
969
  }
1027
- }), ht = _({
970
+ }), xt = $t, Bt = 0, Lt = B({
1028
971
  name: "KrdsFileUpload",
1029
972
  props: {
1030
973
  modelValue: {
@@ -1046,7 +989,6 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
1046
989
  maxFileSize: {
1047
990
  type: Number,
1048
991
  default: 20 * 1024 * 1024
1049
- // 20MB
1050
992
  },
1051
993
  multiple: {
1052
994
  type: Boolean,
@@ -1088,7 +1030,6 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
1088
1030
  type: Boolean,
1089
1031
  default: !0
1090
1032
  },
1091
- // BaseFormProps에서 상속
1092
1033
  name: {
1093
1034
  type: String,
1094
1035
  default: void 0
@@ -1127,15 +1068,128 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
1127
1068
  "download",
1128
1069
  "preview"
1129
1070
  ],
1130
- setup(e, { emit: o }) {
1131
- B(!1), h(() => {
1132
- const l = ["krds-file-upload", "line"];
1133
- return e.class && l.push(e.class), l;
1134
- });
1135
- const a = h(() => e.modelValue?.length || 0);
1136
- return h(() => !e.disabled && a.value < e.maxFiles), () => null;
1071
+ setup(e, { emit: a }) {
1072
+ const n = L(!1), l = L(null), s = e.id ? `${e.id}-input` : `krds-file-upload-${++Bt}`, r = (y) => y < 1024 ? `${y}B` : y < 1024 * 1024 ? `${Math.round(y / 1024)}KB` : `${(y / (1024 * 1024)).toFixed(1)}MB`, o = (y) => {
1073
+ const K = y.split(".");
1074
+ return K.length > 1 ? K.pop().toLowerCase() : "";
1075
+ }, v = (y) => {
1076
+ const K = o(y.name), F = K ? y.name.slice(0, -(K.length + 1)) : y.name;
1077
+ return K ? `${F} [${K}, ${r(y.size)}]` : `${y.name} [${r(y.size)}]`;
1078
+ }, f = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, b = (y) => {
1079
+ if (e.maxFileSize && y.size > e.maxFileSize) return `등록 가능한 파일 용량을 초과하였습니다.
1080
+ ${r(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
1081
+ if (e.accept) {
1082
+ const K = e.accept.split(",").map((A) => A.trim().toLowerCase()), F = `.${o(y.name)}`, P = y.type;
1083
+ if (!K.some((A) => A.startsWith(".") ? F === A : A.endsWith("/*") ? P.startsWith(A.replace("/*", "/")) : P === A)) return "허용되지 않는 파일 형식입니다.";
1084
+ }
1085
+ return null;
1086
+ }, g = (y) => {
1087
+ if (e.disabled || e.readonly) return;
1088
+ let K = [...e.modelValue || []];
1089
+ !e.multiple && K.length > 0 && (K = []);
1090
+ const F = [];
1091
+ for (let P = 0; P < y.length && !(K.length + F.length >= e.maxFiles); P++) {
1092
+ const A = y[P], j = b(A), O = {
1093
+ id: f(),
1094
+ file: A,
1095
+ name: A.name,
1096
+ size: A.size,
1097
+ type: A.type,
1098
+ status: j ? "error" : "pending",
1099
+ errorMessage: j || void 0
1100
+ };
1101
+ F.push(O), j ? a("file-error", O, j) : a("file-added", O);
1102
+ }
1103
+ F.length > 0 && a("update:modelValue", [...K, ...F]);
1104
+ }, _ = (y) => {
1105
+ const K = y.target;
1106
+ K.files?.length && (g(K.files), K.value = "");
1107
+ }, S = (y) => {
1108
+ e.disabled || e.readonly || !e.dragAndDrop || (y.preventDefault(), n.value = !0);
1109
+ }, V = () => {
1110
+ n.value = !1;
1111
+ }, d = (y) => {
1112
+ y.preventDefault(), n.value = !1, !(e.disabled || e.readonly || !e.dragAndDrop) && y.dataTransfer?.files && g(y.dataTransfer.files);
1113
+ }, i = () => {
1114
+ e.disabled || e.readonly || l.value?.click();
1115
+ }, c = (y) => {
1116
+ e.disabled || e.readonly || (a("update:modelValue", (e.modelValue || []).filter((K) => K.id !== y)), a("file-removed", y));
1117
+ }, u = () => {
1118
+ e.disabled || e.readonly || (a("update:modelValue", []), a("clear-all"));
1119
+ }, h = k(() => {
1120
+ const y = ["krds-file-upload", "line"];
1121
+ return e.class && y.push(e.class), y;
1122
+ }), m = () => t("div", { class: "file-head" }, [t("h3", { class: "tit" }, e.title), t("div", null, [t("p", null, e.description)])]), w = () => t("div", {
1123
+ class: "file-upload",
1124
+ onDragover: S,
1125
+ onDragleave: V,
1126
+ onDrop: d
1127
+ }, [t("p", { class: "txt" }, e.placeholder), t("div", { class: "file-upload-btn-wrap" }, [t("input", {
1128
+ ref: l,
1129
+ type: "file",
1130
+ name: e.name || "myFile",
1131
+ id: s,
1132
+ hidden: !0,
1133
+ accept: e.accept || void 0,
1134
+ multiple: e.multiple,
1135
+ onChange: _
1136
+ }), t("label", { for: s }, [t("button", {
1137
+ type: "button",
1138
+ class: ["krds-btn", e.size],
1139
+ disabled: e.disabled || void 0,
1140
+ onClick: i
1141
+ }, [t("i", { class: "svg-icon ico-upload" }), "파일선택"])])])]), C = (y) => {
1142
+ const K = [];
1143
+ return y.status === "uploading" ? K.push(t("span", {
1144
+ class: "krds-spinner",
1145
+ role: "status"
1146
+ }, [t("span", { class: "sr-only" }, "업로드 중")])) : y.downloadUrl ? (e.showDownload && K.push(t("button", {
1147
+ type: "button",
1148
+ class: "krds-btn medium text",
1149
+ onClick: () => a("download", y)
1150
+ }, ["다운로드 ", t("i", { class: "svg-icon ico-down" })])), e.showPreviewButton && K.push(t("button", {
1151
+ type: "button",
1152
+ class: "krds-btn medium text",
1153
+ onClick: () => a("preview", y)
1154
+ }, ["바로보기 ", t("i", { class: "svg-icon ico-angle right" })]))) : y.status === "completed" ? K.push(t("span", { class: "ico-invalid complete" }, [t("em", { class: "sr-only" }, "업로드 완료")])) : e.readonly || K.push(t("button", {
1155
+ type: "button",
1156
+ class: "krds-btn medium text",
1157
+ disabled: e.disabled || void 0,
1158
+ onClick: () => c(y.id)
1159
+ }, ["삭제 ", t("i", { class: "svg-icon ico-delete-fill" })])), K;
1160
+ }, x = (y) => {
1161
+ const K = [t("div", { class: y.downloadUrl ? "file-info m-column" : "file-info" }, [t("div", { class: "file-name" }, v(y)), t("div", { class: "btn-wrap" }, C(y))])];
1162
+ if (y.status === "error" && y.errorMessage) {
1163
+ const F = y.errorMessage.split(`
1164
+ `), P = [];
1165
+ F.forEach((A, j) => {
1166
+ j > 0 && P.push(t("br")), P.push(A);
1167
+ }), K.push(t("p", { class: "file-hint-invalid" }, P));
1168
+ }
1169
+ return t("li", {
1170
+ key: y.id,
1171
+ class: y.status === "error" ? "is-error" : void 0
1172
+ }, K);
1173
+ }, $ = (y) => {
1174
+ const K = y.filter((P) => P.status !== "error").length, F = [t("div", { class: "total" }, [t("span", { class: "current" }, `${K}개`), ` / ${e.maxFiles}개`]), t("ul", { class: "upload-list" }, y.map(x))];
1175
+ return e.showClearAll && !e.readonly && F.push(t("div", { class: "upload-delete-btn" }, [t("button", {
1176
+ type: "button",
1177
+ class: "krds-btn xsmall tertiary",
1178
+ disabled: e.disabled || void 0,
1179
+ onClick: u
1180
+ }, ["전체 파일 삭제", t("i", { class: "svg-icon ico-angle right" })])])), t("div", { class: "file-list" }, F);
1181
+ };
1182
+ return () => {
1183
+ const y = [m()];
1184
+ e.readonly || y.push(w());
1185
+ const K = e.modelValue || [];
1186
+ return K.length > 0 && y.push($(K)), t("div", {
1187
+ class: h.value,
1188
+ style: e.style || void 0
1189
+ }, y);
1190
+ };
1137
1191
  }
1138
- }), yt = _({
1192
+ }), Dt = Lt, Tt = B({
1139
1193
  name: "KrdsBadge",
1140
1194
  props: {
1141
1195
  type: {
@@ -1160,27 +1214,23 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
1160
1214
  }
1161
1215
  },
1162
1216
  emits: ["click"],
1163
- setup(e, { emit: o, slots: a }) {
1164
- const l = h(() => {
1165
- const n = ["krds-badge"];
1166
- return n.push(`${e.type}-${e.color}`), e.size && n.push(e.size), e.number && n.push("number"), e.class && n.push(e.class), n;
1167
- }), t = (n) => {
1168
- o("click", n);
1217
+ setup(e, { emit: a, slots: n }) {
1218
+ const l = k(() => {
1219
+ const r = ["krds-badge"];
1220
+ return r.push(`${e.type}-${e.color}`), e.size && r.push(e.size), e.number && r.push("number"), e.class && r.push(e.class), r;
1221
+ }), s = (r) => {
1222
+ a("click", r);
1169
1223
  };
1170
- return () => u(
1171
- "span",
1172
- {
1173
- type: e.type,
1174
- color: e.color,
1175
- size: e.size,
1176
- number: e.number,
1177
- class: l.value,
1178
- onClick: t
1179
- },
1180
- a.default?.()
1181
- );
1224
+ return () => t("span", {
1225
+ type: e.type,
1226
+ color: e.color,
1227
+ size: e.size,
1228
+ number: e.number,
1229
+ class: l.value,
1230
+ onClick: s
1231
+ }, n.default?.());
1182
1232
  }
1183
- }), gt = _({
1233
+ }), Vt = Tt, zt = B({
1184
1234
  name: "KrdsTag",
1185
1235
  props: {
1186
1236
  link: {
@@ -1205,40 +1255,30 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
1205
1255
  }
1206
1256
  },
1207
1257
  emits: ["remove"],
1208
- setup(e, { emit: o, slots: a }) {
1209
- const l = h(() => {
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
- }, n = () => u(
1215
- "button",
1216
- {
1217
- type: "button",
1218
- class: "btn-delete",
1219
- onClick: t
1220
- },
1221
- [u("span", { class: "sr-only" }, "삭제")]
1222
- );
1258
+ setup(e, { emit: a, slots: n }) {
1259
+ const l = k(() => {
1260
+ const o = ["krds-btn-tag"];
1261
+ return e.link && o.push("link"), e.class && o.push(e.class), o;
1262
+ }), s = (o) => {
1263
+ a("remove", o);
1264
+ }, r = () => t("button", {
1265
+ type: "button",
1266
+ class: "btn-delete",
1267
+ onClick: s
1268
+ }, [t("span", { class: "sr-only" }, "삭제")]);
1223
1269
  return () => {
1224
- const i = [], v = a.default?.();
1225
- if (v && i.push(v), e.link || i.push(n()), e.link) {
1226
- const p = {
1270
+ const o = [], v = n.default?.();
1271
+ if (v && o.push(v), e.link || o.push(r()), e.link) {
1272
+ const f = {
1227
1273
  href: e.href,
1228
1274
  class: l.value
1229
1275
  };
1230
- return e.target && (p.target = e.target), e.rel && (p.rel = e.rel), u("a", p, i);
1276
+ return e.target && (f.target = e.target), e.rel && (f.rel = e.rel), t("a", f, o);
1231
1277
  }
1232
- return u(
1233
- "span",
1234
- {
1235
- class: l.value
1236
- },
1237
- i
1238
- );
1278
+ return t("span", { class: l.value }, o);
1239
1279
  };
1240
1280
  }
1241
- }), bt = _({
1281
+ }), It = zt, Et = B({
1242
1282
  name: "KrdsTagGroup",
1243
1283
  props: {
1244
1284
  size: {
@@ -1250,62 +1290,44 @@ const He = { class: "form-conts" }, je = { class: "calendar-input" }, We = ["id"
1250
1290
  default: void 0
1251
1291
  }
1252
1292
  },
1253
- setup(e, { slots: o }) {
1254
- const a = h(() => {
1293
+ setup(e, { slots: a }) {
1294
+ const n = k(() => {
1255
1295
  const l = ["krds-tag-wrap"];
1256
1296
  return e.size && l.push(e.size), e.class && l.push(e.class), l;
1257
1297
  });
1258
- return () => u(
1259
- "div",
1260
- {
1261
- class: a.value
1262
- },
1263
- o.default?.()
1264
- );
1298
+ return () => t("div", { class: n.value }, a.default?.());
1265
1299
  }
1266
- }), kt = _({
1300
+ }), Ft = Et, Mt = B({
1267
1301
  name: "KrdsMasthead",
1268
- props: {
1269
- class: {
1270
- type: String,
1271
- default: void 0
1272
- }
1273
- },
1302
+ props: { class: {
1303
+ type: String,
1304
+ default: void 0
1305
+ } },
1274
1306
  emits: ["click"],
1275
- setup(e, { emit: o, slots: a }) {
1276
- const l = h(() => {
1277
- const n = [""];
1278
- return e.class && n.push(e.class), n;
1279
- }), t = (n) => {
1280
- o("click", n);
1307
+ setup(e, { emit: a, slots: n }) {
1308
+ const l = k(() => {
1309
+ const r = [""];
1310
+ return e.class && r.push(e.class), r;
1311
+ }), s = (r) => {
1312
+ a("click", r);
1281
1313
  };
1282
- return () => u(
1283
- "div",
1284
- {
1285
- id: "krds-masthead",
1286
- class: l.value,
1287
- onClick: t
1288
- },
1289
- [
1290
- u("div", { class: "toggle-wrap" }, [
1291
- u("div", { class: "toggle-head" }, [u("div", { class: "inner" }, [u("span", { class: "nuri-txt" }, a.default?.())])])
1292
- ])
1293
- ]
1294
- );
1314
+ return () => t("div", {
1315
+ id: "krds-masthead",
1316
+ class: l.value,
1317
+ onClick: s
1318
+ }, [t("div", { class: "toggle-wrap" }, [t("div", { class: "toggle-head" }, [t("div", { class: "inner" }, [t("span", { class: "nuri-txt" }, n.default?.())])])])]);
1295
1319
  }
1296
- });
1297
- let St = 0;
1298
- function ce(e = "krds") {
1299
- return `${e}-${++St}`;
1320
+ }), At = Mt, Rt = 0;
1321
+ function Gl(e = "krds") {
1322
+ return `${e}-${++Rt}`;
1300
1323
  }
1301
- function Il() {
1302
- const e = Date.now().toString(36).slice(-4), o = Math.random().toString(36).substring(2, 5);
1303
- return `${e}${o}`;
1324
+ function Yl() {
1325
+ return `${Date.now().toString(36).slice(-4)}${Math.random().toString(36).substring(2, 5)}`;
1304
1326
  }
1305
- function ue(...e) {
1327
+ function ve(...e) {
1306
1328
  return e.filter(Boolean).join(" ");
1307
1329
  }
1308
- const wt = _({
1330
+ var Pt = B({
1309
1331
  name: "KrdsToggleSwitch",
1310
1332
  props: {
1311
1333
  modelValue: {
@@ -1347,48 +1369,23 @@ const wt = _({
1347
1369
  }
1348
1370
  },
1349
1371
  emits: ["update:modelValue", "change"],
1350
- setup(e, { emit: o, attrs: a }) {
1351
- const l = h(() => e.modelValue), t = h(() => ue("krds-form-toggle-switch", e.size, e.class)), n = (v) => {
1352
- if (e.disabled)
1353
- return;
1354
- const y = v.target.checked;
1355
- o("update:modelValue", y), o("change", y);
1356
- }, i = h(() => e.id || ce("toggle-switch"));
1357
- return () => u(
1358
- "div",
1359
- {
1360
- class: t.value
1361
- },
1362
- [
1363
- u("input", {
1364
- type: "checkbox",
1365
- id: i.value,
1366
- name: e.name,
1367
- checked: l.value,
1368
- disabled: e.disabled,
1369
- onChange: n,
1370
- ...a
1371
- }),
1372
- u(
1373
- "label",
1374
- {
1375
- for: i.value
1376
- },
1377
- [
1378
- u(
1379
- "span",
1380
- {
1381
- class: "switch-toggle"
1382
- },
1383
- [u("i")]
1384
- ),
1385
- e.label || ""
1386
- ]
1387
- )
1388
- ]
1389
- );
1372
+ setup(e, { emit: a, attrs: n }) {
1373
+ const l = `toggle-switch-${ae()}`, s = k(() => e.modelValue), r = k(() => ve("krds-form-toggle-switch", e.size, e.class)), o = (f) => {
1374
+ if (e.disabled) return;
1375
+ const b = f.target.checked;
1376
+ a("update:modelValue", b), a("change", b);
1377
+ }, v = k(() => e.id || l);
1378
+ return () => t("div", { class: r.value }, [t("input", {
1379
+ type: "checkbox",
1380
+ id: v.value,
1381
+ name: e.name,
1382
+ checked: s.value,
1383
+ disabled: e.disabled,
1384
+ onChange: o,
1385
+ ...n
1386
+ }), t("label", { for: v.value }, [t("span", { class: "switch-toggle" }, [t("i")]), e.label || ""])]);
1390
1387
  }
1391
- }), Ct = _({
1388
+ }), Ht = Pt, qt = B({
1392
1389
  name: "KrdsCheckArea",
1393
1390
  props: {
1394
1391
  class: {
@@ -1400,19 +1397,13 @@ const wt = _({
1400
1397
  default: !1
1401
1398
  }
1402
1399
  },
1403
- setup(e, { slots: o }) {
1400
+ setup(e, { slots: a }) {
1404
1401
  return () => {
1405
- const a = ["krds-check-area"];
1406
- return e.column && a.push("chk-column"), e.class && a.push(e.class), u(
1407
- "div",
1408
- {
1409
- class: a
1410
- },
1411
- o.default?.()
1412
- );
1402
+ const n = ["krds-check-area"];
1403
+ return e.column && n.push("chk-column"), e.class && n.push(e.class), t("div", { class: n }, a.default?.());
1413
1404
  };
1414
1405
  }
1415
- }), xt = _({
1406
+ }), Ot = qt, Nt = B({
1416
1407
  name: "KrdsCheckbox",
1417
1408
  props: {
1418
1409
  modelValue: {
@@ -1443,52 +1434,41 @@ const wt = _({
1443
1434
  },
1444
1435
  emits: ["update:modelValue"],
1445
1436
  slots: Object,
1446
- setup(e, { emit: o, attrs: a, slots: l }) {
1447
- const t = h(() => e.modelValue), n = h(() => {
1448
- const p = e.chip ? "krds-form-chip" : "krds-form-check";
1449
- return ue(p, e.size, e.class);
1450
- }), i = (p) => {
1451
- if (e.disabled)
1452
- return;
1453
- const g = p.target.checked;
1454
- o("update:modelValue", g);
1455
- }, v = h(() => e.id || ce("checkbox"));
1437
+ setup(e, { emit: a, attrs: n, slots: l }) {
1438
+ const s = `checkbox-${ae()}`, r = k(() => e.modelValue), o = k(() => ve(e.chip ? "krds-form-chip" : "krds-form-check", e.size, e.class)), v = (b) => {
1439
+ if (e.disabled) return;
1440
+ const g = b.target.checked;
1441
+ a("update:modelValue", g);
1442
+ }, f = k(() => e.id || s);
1456
1443
  return () => {
1457
- const p = [
1458
- u("input", {
1459
- type: "checkbox",
1460
- id: v.value,
1461
- checked: t.value,
1462
- disabled: e.disabled,
1463
- onChange: i,
1464
- ...a
1465
- }),
1466
- u(
1467
- "label",
1468
- {
1469
- for: v.value
1470
- },
1471
- l.default?.()
1472
- )
1473
- ];
1474
- return l.description && !e.chip && p.push(u("div", { class: "krds-form-check-cnt" }, u("p", { class: "krds-form-check-p" }, l.description()))), u(
1475
- "div",
1476
- {
1477
- class: n.value
1478
- },
1479
- p
1480
- );
1444
+ const b = [t("input", {
1445
+ type: "checkbox",
1446
+ id: f.value,
1447
+ checked: r.value,
1448
+ disabled: e.disabled,
1449
+ onChange: v,
1450
+ ...n
1451
+ }), t("label", { for: f.value }, l.default?.())];
1452
+ return l.description && !e.chip && b.push(t("div", { class: "krds-form-check-cnt" }, t("p", { class: "krds-form-check-p" }, l.description()))), t("div", { class: o.value }, b);
1481
1453
  };
1482
1454
  }
1483
- }), $t = _({
1455
+ }), jt = Nt, Wt = B({
1484
1456
  name: "KrdsRadio",
1485
1457
  props: {
1486
1458
  modelValue: {
1487
- type: [String, Number, Boolean],
1459
+ type: [
1460
+ String,
1461
+ Number,
1462
+ Boolean
1463
+ ],
1488
1464
  default: void 0
1489
1465
  },
1490
1466
  value: {
1491
- type: [String, Number, Boolean],
1467
+ type: [
1468
+ String,
1469
+ Number,
1470
+ Boolean
1471
+ ],
1492
1472
  required: !0
1493
1473
  },
1494
1474
  disabled: {
@@ -1519,45 +1499,25 @@ const wt = _({
1519
1499
  },
1520
1500
  emits: ["update:modelValue"],
1521
1501
  slots: Object,
1522
- setup(e, { emit: o, attrs: a, slots: l }) {
1523
- const t = h(() => e.modelValue === e.value), n = h(() => {
1524
- const y = e.chip ? "krds-form-chip" : "krds-form-check";
1525
- return ue(y, e.size, e.class);
1526
- }), i = (y) => {
1527
- if (e.disabled)
1528
- return;
1529
- y.target.checked && o("update:modelValue", e.value);
1530
- }, v = h(() => e.id || ce("radio")), p = h(() => e.name);
1502
+ setup(e, { emit: a, attrs: n, slots: l }) {
1503
+ const s = `radio-${ae()}`, r = k(() => e.modelValue === e.value), o = k(() => ve(e.chip ? "krds-form-chip" : "krds-form-check", e.size, e.class)), v = (g) => {
1504
+ e.disabled || g.target.checked && a("update:modelValue", e.value);
1505
+ }, f = k(() => e.id || s), b = k(() => e.name);
1531
1506
  return () => {
1532
- const y = [
1533
- u("input", {
1534
- type: "radio",
1535
- id: v.value,
1536
- name: p.value,
1537
- value: String(e.value),
1538
- checked: t.value,
1539
- disabled: e.disabled,
1540
- onChange: i,
1541
- ...a
1542
- }),
1543
- u(
1544
- "label",
1545
- {
1546
- for: v.value
1547
- },
1548
- l.default?.()
1549
- )
1550
- ];
1551
- return l.description && !e.chip && y.push(u("div", { class: "krds-form-check-cnt" }, u("p", { class: "krds-form-check-p" }, l.description()))), u(
1552
- "div",
1553
- {
1554
- class: n.value
1555
- },
1556
- y
1557
- );
1507
+ const g = [t("input", {
1508
+ type: "radio",
1509
+ id: f.value,
1510
+ name: b.value,
1511
+ value: String(e.value),
1512
+ checked: r.value,
1513
+ disabled: e.disabled,
1514
+ onChange: v,
1515
+ ...n
1516
+ }), t("label", { for: f.value }, l.default?.())];
1517
+ return l.description && !e.chip && g.push(t("div", { class: "krds-form-check-cnt" }, t("p", { class: "krds-form-check-p" }, l.description()))), t("div", { class: o.value }, g);
1558
1518
  };
1559
1519
  }
1560
- }), _t = _({
1520
+ }), Gt = Wt, Yt = Ce, Ut = B({
1561
1521
  name: "KrdsStepIndicator",
1562
1522
  props: {
1563
1523
  modelValue: {
@@ -1570,30 +1530,24 @@ const wt = _({
1570
1530
  }
1571
1531
  },
1572
1532
  emits: ["update:modelValue"],
1573
- setup(e, { slots: o }) {
1574
- const a = h(() => {
1533
+ setup(e, { slots: a }) {
1534
+ const n = k(() => {
1575
1535
  const v = ["krds-step-wrap"];
1576
1536
  return e.class && v.push(e.class), v;
1577
1537
  }), l = (v) => {
1578
- const p = e.modelValue || 0;
1579
- return v < p ? "done" : v === p ? "active" : "pending";
1580
- }, t = B(0), n = () => {
1581
- t.value = 0;
1582
- }, i = () => t.value++;
1583
- return Ve("stepIndicator", {
1584
- activeStep: h(() => e.modelValue || 0),
1538
+ const f = e.modelValue || 0;
1539
+ return v < f ? "done" : v === f ? "active" : "pending";
1540
+ }, s = L(0), r = () => {
1541
+ s.value = 0;
1542
+ }, o = () => s.value++;
1543
+ return Fe("stepIndicator", {
1544
+ activeStep: k(() => e.modelValue || 0),
1585
1545
  getStepStatus: l,
1586
- getNextStepIndex: i,
1587
- resetStepIndex: n
1588
- }), () => (n(), u(
1589
- "ol",
1590
- {
1591
- class: a.value
1592
- },
1593
- o.default?.()
1594
- ));
1546
+ getNextStepIndex: o,
1547
+ resetStepIndex: r
1548
+ }), () => (r(), t("ol", { class: n.value }, a.default?.()));
1595
1549
  }
1596
- }), Bt = _({
1550
+ }), Xt = Ut, Jt = B({
1597
1551
  name: "KrdsStep",
1598
1552
  props: {
1599
1553
  step: {
@@ -1614,117 +1568,88 @@ const wt = _({
1614
1568
  }
1615
1569
  },
1616
1570
  emits: ["click"],
1617
- setup(e, { emit: o, slots: a }) {
1618
- const l = Ie("stepIndicator"), t = l ? l.getNextStepIndex() : -1, n = h(() => e.status ? e.status : l && t >= 0 ? l.getStepStatus(t) : "pending"), i = h(() => {
1619
- const p = [n.value];
1620
- return e.class && p.push(e.class), p;
1621
- }), v = (p) => {
1622
- o("click", p, e.step);
1571
+ setup(e, { emit: a, slots: n }) {
1572
+ const l = Ee("stepIndicator"), s = l ? l.getNextStepIndex() : -1, r = k(() => e.status ? e.status : l && s >= 0 ? l.getStepStatus(s) : "pending"), o = k(() => {
1573
+ const f = [r.value];
1574
+ return e.class && f.push(e.class), f;
1575
+ }), v = (f) => {
1576
+ a("click", f, e.step);
1623
1577
  };
1624
1578
  return () => {
1625
- const p = n.value === "active";
1626
- return u(
1627
- "li",
1628
- {
1629
- class: i.value,
1630
- onClick: v
1631
- },
1632
- [
1633
- u("span", [
1634
- // 현재 단계 표시 (활성 상태일 때만)
1635
- p && u("em", { class: "sr-only" }, "현재단계"),
1636
- // 단계 번호
1637
- u("i", { class: "step" }, e.step),
1638
- // 단계 제목
1639
- u("span", { class: "step-tit" }, e.title),
1640
- // 슬롯 내용 (추가 콘텐츠가 있는 경우)
1641
- a.default?.()
1642
- ])
1643
- ]
1644
- );
1579
+ const f = r.value === "active";
1580
+ return t("li", {
1581
+ class: o.value,
1582
+ onClick: v
1583
+ }, [t("span", [
1584
+ f && t("em", { class: "sr-only" }, "현재단계"),
1585
+ t("i", { class: "step" }, e.step),
1586
+ t("span", { class: "step-tit" }, e.title),
1587
+ n.default?.()
1588
+ ])]);
1645
1589
  };
1646
1590
  }
1647
- }), Kt = _({
1591
+ }), Qt = Jt, Zt = B({
1648
1592
  name: "KrdsSkipLink",
1649
1593
  props: {
1650
- /**
1651
- * 건너뛸 대상 요소의 ID
1652
- * @example '#main-content', '#breadcrumb'
1653
- */
1654
1594
  href: {
1655
1595
  type: String,
1656
1596
  required: !0,
1657
1597
  validator: (e) => e.startsWith("#")
1658
1598
  },
1659
- /**
1660
- * 추가 CSS 클래스
1661
- */
1662
1599
  class: {
1663
- type: [String, Array, Object],
1600
+ type: [
1601
+ String,
1602
+ Array,
1603
+ Object
1604
+ ],
1664
1605
  default: void 0
1665
1606
  },
1666
- /**
1667
- * 요소 ID
1668
- */
1669
1607
  id: {
1670
1608
  type: String,
1671
1609
  default: "krds-skip-link"
1672
1610
  }
1673
1611
  },
1674
- setup(e, { slots: o }) {
1675
- return () => u(
1676
- "div",
1677
- {
1678
- id: e.id,
1679
- class: e.class
1680
- },
1681
- [
1682
- u(
1683
- "a",
1684
- {
1685
- href: e.href
1686
- },
1687
- o.default?.()
1688
- )
1689
- ]
1690
- );
1612
+ setup(e, { slots: a }) {
1613
+ return () => t("div", {
1614
+ id: e.id,
1615
+ class: e.class
1616
+ }, [t("a", { href: e.href }, a.default?.())]);
1691
1617
  }
1692
- }), Dt = ["id", "aria-label"], Vt = { class: "breadcrumb" }, It = ["href", "aria-current", "onClick"], zt = { key: 0 }, Et = /* @__PURE__ */ _({
1618
+ }), ea = Zt, ta = ["id", "aria-label"], aa = { class: "breadcrumb" }, la = [
1619
+ "href",
1620
+ "aria-current",
1621
+ "onClick"
1622
+ ], sa = { key: 0 }, na = /* @__PURE__ */ B({
1693
1623
  __name: "KrdsBreadcrumb",
1694
1624
  props: {
1695
1625
  items: {},
1696
1626
  id: { default: void 0 },
1697
1627
  ariaLabel: { default: "현재 경로" },
1698
- showHomeIcon: { type: Boolean, default: !0 }
1628
+ showHomeIcon: {
1629
+ type: Boolean,
1630
+ default: !0
1631
+ }
1699
1632
  },
1700
1633
  emits: ["item-click"],
1701
- setup(e, { emit: o }) {
1702
- const a = e, l = o, t = (i) => i === a.items.length - 1, n = (i, v) => {
1703
- i.onClick && i.onClick(v), l("item-click", i, v);
1634
+ setup(e, { emit: a }) {
1635
+ const n = e, l = a, s = (o) => o === n.items.length - 1, r = (o, v) => {
1636
+ o.onClick && o.onClick(v), l("item-click", o, v);
1704
1637
  };
1705
- return (i, v) => (k(), S("nav", {
1638
+ return (o, v) => (D(), T("nav", {
1706
1639
  id: e.id,
1707
1640
  class: "krds-breadcrumb-wrap",
1708
1641
  "aria-label": e.ariaLabel
1709
- }, [
1710
- r("ol", Vt, [
1711
- (k(!0), S(F, null, N(e.items, (p, y) => (k(), S("li", {
1712
- key: `breadcrumb-${y}`,
1713
- class: E({ home: y === 0 && e.showHomeIcon })
1714
- }, [
1715
- r("a", {
1716
- href: p.href || "#",
1717
- class: "txt",
1718
- "aria-current": t(y) ? "page" : void 0,
1719
- onClick: (g) => n(p, g)
1720
- }, [
1721
- y === 0 && e.showHomeIcon ? Y("", !0) : (k(), S("span", zt, V(p.text), 1))
1722
- ], 8, It)
1723
- ], 2))), 128))
1724
- ])
1725
- ], 8, Dt));
1642
+ }, [p("ol", aa, [(D(!0), T(W, null, Y(e.items, (f, b) => (D(), T("li", {
1643
+ key: `breadcrumb-${b}`,
1644
+ class: R({ home: b === 0 && e.showHomeIcon })
1645
+ }, [p("a", {
1646
+ href: f.href || "#",
1647
+ class: "txt",
1648
+ "aria-current": s(b) ? "page" : void 0,
1649
+ onClick: (g) => r(f, g)
1650
+ }, [b === 0 && e.showHomeIcon ? X("", !0) : (D(), T("span", sa, M(f.text), 1))], 8, la)], 2))), 128))])], 8, ta));
1726
1651
  }
1727
- }), Lt = _({
1652
+ }), ra = na, ia = ra, oa = B({
1728
1653
  name: "KrdsInPageNavigation",
1729
1654
  props: {
1730
1655
  title: {
@@ -1758,107 +1683,97 @@ const wt = _({
1758
1683
  },
1759
1684
  emits: ["itemClick"],
1760
1685
  slots: Object,
1761
- setup(e, { emit: o, slots: a }) {
1762
- const l = B(""), t = B(/* @__PURE__ */ new Map()), n = h(() => {
1763
- const m = ["krds-in-page-navigation-type"];
1764
- return e.class && m.push(e.class), m;
1765
- }), i = () => {
1766
- const m = e.headerTopSelector, s = e.headerInnerSelector, c = document.querySelector(m)?.clientHeight || 0, d = document.querySelector(s)?.clientHeight || 0;
1767
- return c + d;
1768
- }, v = (m, s) => {
1769
- if (o("itemClick", m, s), m.href.startsWith("#")) {
1770
- s.preventDefault();
1771
- const c = document.querySelector(m.href);
1686
+ setup(e, { emit: a, slots: n }) {
1687
+ const l = L(""), s = L(/* @__PURE__ */ new Map()), r = k(() => {
1688
+ const d = ["krds-in-page-navigation-type"];
1689
+ return e.class && d.push(e.class), d;
1690
+ }), o = () => {
1691
+ const d = e.headerTopSelector, i = e.headerInnerSelector;
1692
+ return (document.querySelector(d)?.clientHeight || 0) + (document.querySelector(i)?.clientHeight || 0);
1693
+ }, v = (d, i) => {
1694
+ if (a("itemClick", d, i), d.href.startsWith("#")) {
1695
+ i.preventDefault();
1696
+ const c = document.querySelector(d.href);
1772
1697
  if (c) {
1773
- const d = i();
1698
+ const u = o();
1774
1699
  if (window.scrollTo({
1775
1700
  left: 0,
1776
- top: c.getBoundingClientRect().top + window.scrollY - d,
1701
+ top: c.getBoundingClientRect().top + window.scrollY - u,
1777
1702
  behavior: "smooth"
1778
- }), l.value = m.href, s instanceof KeyboardEvent) {
1779
- const f = c.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");
1780
- f && f instanceof HTMLElement && (f.setAttribute("tabindex", "-1"), f.focus({ preventScroll: !0 }));
1703
+ }), l.value = d.href, i instanceof KeyboardEvent) {
1704
+ const h = c.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");
1705
+ h && h instanceof HTMLElement && (h.setAttribute("tabindex", "-1"), h.focus({ preventScroll: !0 }));
1781
1706
  }
1782
1707
  }
1783
1708
  }
1784
- }, p = () => {
1785
- t.value.clear(), e.items && e.items.filter((m) => m.href.startsWith("#")).forEach((m) => {
1786
- const s = document.querySelector(m.href);
1787
- s && t.value.set(m.href, s);
1709
+ }, f = () => {
1710
+ s.value.clear(), e.items && e.items.filter((d) => d.href.startsWith("#")).forEach((d) => {
1711
+ const i = document.querySelector(d.href);
1712
+ i && s.value.set(d.href, i);
1788
1713
  });
1789
- }, y = () => {
1790
- if (!e.autoActive || !e.items || t.value.size === 0) return;
1791
- const m = window.innerHeight, s = Math.ceil(m / 5), c = window.scrollY + m, d = document.body.scrollHeight, f = e.items.filter((z) => z.href.startsWith("#") && t.value.has(z.href)).map((z) => ({
1792
- href: z.href,
1793
- element: t.value.get(z.href),
1794
- item: z
1714
+ }, b = () => {
1715
+ if (!e.autoActive || !e.items || s.value.size === 0) return;
1716
+ const d = window.innerHeight, i = Math.ceil(d / 5), c = window.scrollY + d, u = document.body.scrollHeight, h = e.items.filter(($) => $.href.startsWith("#") && s.value.has($.href)).map(($) => ({
1717
+ href: $.href,
1718
+ element: s.value.get($.href),
1719
+ item: $
1795
1720
  }));
1796
- if (f.length === 0) return;
1797
- const x = f[0], R = f[f.length - 1], L = x.element.offsetTop;
1798
- let M = "";
1799
- if (c >= d)
1800
- M = R.href;
1801
- else if (window.scrollY <= L)
1802
- M = x.href;
1803
- else
1804
- for (const z of f) {
1805
- const H = z.element.offsetHeight, I = z.element.offsetTop - s;
1806
- if (window.scrollY > I && window.scrollY <= I + H) {
1807
- M = z.href;
1808
- break;
1809
- }
1721
+ if (h.length === 0) return;
1722
+ const m = h[0], w = h[h.length - 1], C = m.element.offsetTop;
1723
+ let x = "";
1724
+ if (c >= u) x = w.href;
1725
+ else if (window.scrollY <= C) x = m.href;
1726
+ else for (const $ of h) {
1727
+ const y = $.element.offsetHeight, K = $.element.offsetTop - i;
1728
+ if (window.scrollY > K && window.scrollY <= K + y) {
1729
+ x = $.href;
1730
+ break;
1810
1731
  }
1811
- M && M !== l.value && (l.value = M);
1732
+ }
1733
+ x && x !== l.value && (l.value = x);
1812
1734
  }, g = () => {
1813
1735
  if (!e.items) return;
1814
- const m = e.items.find((s) => s.active);
1815
- m ? l.value = m.href : e.items.length > 0 && (l.value = e.items[0].href);
1736
+ const d = e.items.find((i) => i.active);
1737
+ d ? l.value = d.href : e.items.length > 0 && (l.value = e.items[0].href);
1816
1738
  };
1817
- le(() => {
1739
+ te(() => {
1818
1740
  if (g(), e.autoActive) {
1819
- p(), y(), window.addEventListener("scroll", y, { passive: !0 });
1820
- const m = new MutationObserver(() => {
1821
- p();
1741
+ f(), b(), window.addEventListener("scroll", b, { passive: !0 });
1742
+ const d = new MutationObserver(() => {
1743
+ f();
1822
1744
  });
1823
- m.observe(document.body, {
1745
+ d.observe(document.body, {
1824
1746
  childList: !0,
1825
1747
  subtree: !0
1826
- }), J(() => {
1827
- m.disconnect();
1748
+ }), Z(() => {
1749
+ d.disconnect();
1828
1750
  });
1829
1751
  }
1830
- }), J(() => {
1831
- e.autoActive && (window.removeEventListener("scroll", y), t.value.clear());
1752
+ }), Z(() => {
1753
+ e.autoActive && (window.removeEventListener("scroll", b), s.value.clear());
1832
1754
  });
1833
- const w = () => !e.caption && !e.title ? null : u("div", { class: "in-page-navigation-header" }, [
1834
- e.caption && u("p", { class: "quick-caption" }, e.caption),
1835
- e.title && u("p", { class: "quick-title" }, e.title)
1836
- ]), b = () => {
1837
- if (!e.items) return null;
1838
- const m = e.items.map((s) => {
1839
- const c = l.value === s.href || !e.autoActive && s.active;
1840
- return u("li", { key: s.href }, [
1841
- u(
1842
- "a",
1843
- {
1844
- href: s.href,
1845
- class: c ? "active" : "",
1846
- onClick: (d) => v(s, d),
1847
- onKeydown: (d) => {
1848
- (d.key === "Enter" || d.key === " ") && (d.preventDefault(), v(s, d));
1849
- }
1850
- },
1851
- s.text
1852
- )
1853
- ]);
1854
- });
1855
- return u("nav", { class: "in-page-navigation-list" }, [u("ul", {}, m)]);
1856
- }, D = () => a.action ? u("div", { class: "in-page-navigation-action" }, [a.action()]) : null;
1857
- return () => u("div", { class: n.value }, [
1858
- u("div", { class: "krds-in-page-navigation-area" }, [w(), b(), D()].filter(Boolean))
1859
- ]);
1755
+ const _ = () => !e.caption && !e.title ? null : t("div", { class: "in-page-navigation-header" }, [e.caption && t("p", { class: "quick-caption" }, e.caption), e.title && t("p", { class: "quick-title" }, e.title)]), S = () => e.items ? t("nav", { class: "in-page-navigation-list" }, [t("ul", {}, e.items.map((d) => {
1756
+ const i = l.value === d.href || !e.autoActive && d.active;
1757
+ return t("li", { key: d.href }, [t("a", {
1758
+ href: d.href,
1759
+ class: i ? "active" : "",
1760
+ onClick: (c) => v(d, c),
1761
+ onKeydown: (c) => {
1762
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), v(d, c));
1763
+ }
1764
+ }, d.text)]);
1765
+ }))]) : null, V = () => n.action ? t("div", { class: "in-page-navigation-action" }, [n.action()]) : null;
1766
+ return () => t("div", { class: r.value }, [t("div", { class: "krds-in-page-navigation-area" }, [
1767
+ _(),
1768
+ S(),
1769
+ V()
1770
+ ].filter(Boolean))]);
1860
1771
  }
1861
- }), Mt = ["id"], Rt = { class: "page-links" }, Tt = ["href", "aria-current", "onClick"], At = { key: 0 }, Pt = ["aria-label"], Ft = /* @__PURE__ */ _({
1772
+ }), da = oa, ua = ["id"], ca = { class: "page-links" }, fa = [
1773
+ "href",
1774
+ "aria-current",
1775
+ "onClick"
1776
+ ], va = { key: 0 }, pa = ["aria-label"], ha = /* @__PURE__ */ B({
1862
1777
  __name: "KrdsPagination",
1863
1778
  props: {
1864
1779
  modelValue: { default: 1 },
@@ -1869,184 +1784,154 @@ const wt = _({
1869
1784
  pageRange: { default: 8 }
1870
1785
  },
1871
1786
  emits: ["update:modelValue"],
1872
- setup(e, { emit: o }) {
1873
- const a = e, l = o, t = h(() => Math.max(1, a.min)), n = h(() => a.modelValue ?? t.value), i = h(() => n.value <= t.value), v = h(() => n.value >= a.max), p = h(() => {
1874
- if (!i.value)
1787
+ setup(e, { emit: a }) {
1788
+ const n = e, l = a, s = k(() => Math.max(1, n.min)), r = k(() => n.modelValue ?? s.value), o = k(() => r.value <= s.value), v = k(() => r.value >= n.max), f = k(() => {
1789
+ if (!o.value)
1875
1790
  return "#";
1876
- }), y = h(() => {
1791
+ }), b = k(() => {
1877
1792
  if (!v.value)
1878
1793
  return "#";
1879
- }), g = h(() => {
1880
- const { pageRange: m, max: s } = a, c = 1, d = [];
1881
- if (s <= m + 2 * c)
1882
- for (let f = t.value; f <= s; f++)
1883
- d.push({
1884
- type: "page",
1885
- key: `page-${f}`,
1886
- page: f,
1887
- href: "#"
1888
- });
1794
+ }), g = k(() => {
1795
+ const { pageRange: d, max: i } = n, c = 1, u = [];
1796
+ if (i <= d + 2 * c) for (let h = s.value; h <= i; h++) u.push({
1797
+ type: "page",
1798
+ key: `page-${h}`,
1799
+ page: h,
1800
+ href: "#"
1801
+ });
1889
1802
  else {
1890
- const f = Math.min(c, s), x = Math.max(s - c + 1, 1), R = Math.max(t.value, n.value - Math.floor(m / 2)), L = Math.min(s, R + m - 1), M = Math.max(t.value, L - m + 1);
1891
- for (let I = t.value; I <= f; I++)
1892
- d.push({
1893
- type: "page",
1894
- key: `page-${I}`,
1895
- page: I,
1896
- href: "#"
1897
- });
1898
- M > f + 1 && d.push({
1803
+ const h = Math.min(c, i), m = Math.max(i - c + 1, 1), w = Math.max(s.value, r.value - Math.floor(d / 2)), C = Math.min(i, w + d - 1), x = Math.max(s.value, C - d + 1);
1804
+ for (let K = s.value; K <= h; K++) u.push({
1805
+ type: "page",
1806
+ key: `page-${K}`,
1807
+ page: K,
1808
+ href: "#"
1809
+ });
1810
+ x > h + 1 && u.push({
1899
1811
  type: "ellipsis",
1900
1812
  key: "ellipsis-left",
1901
1813
  ariaLabel: "페이지 생략"
1902
1814
  });
1903
- const z = Math.max(M, f + 1), H = Math.min(L, x - 1);
1904
- for (let I = z; I <= H; I++)
1905
- d.push({
1906
- type: "page",
1907
- key: `page-${I}`,
1908
- page: I,
1909
- href: "#"
1910
- });
1911
- L < x - 1 && d.push({
1815
+ const $ = Math.max(x, h + 1), y = Math.min(C, m - 1);
1816
+ for (let K = $; K <= y; K++) u.push({
1817
+ type: "page",
1818
+ key: `page-${K}`,
1819
+ page: K,
1820
+ href: "#"
1821
+ });
1822
+ C < m - 1 && u.push({
1912
1823
  type: "ellipsis",
1913
1824
  key: "ellipsis-right",
1914
1825
  ariaLabel: "페이지 생략"
1915
1826
  });
1916
- for (let I = x; I <= s; I++)
1917
- d.push({
1918
- type: "page",
1919
- key: `page-${I}`,
1920
- page: I,
1921
- href: "#"
1922
- });
1827
+ for (let K = m; K <= i; K++) u.push({
1828
+ type: "page",
1829
+ key: `page-${K}`,
1830
+ page: K,
1831
+ href: "#"
1832
+ });
1923
1833
  }
1924
- return d;
1925
- }), w = (m, s) => {
1926
- if (m === n.value) {
1927
- s.preventDefault();
1834
+ return u;
1835
+ }), _ = (d, i) => {
1836
+ if (d === r.value) {
1837
+ i.preventDefault();
1928
1838
  return;
1929
1839
  }
1930
- l("update:modelValue", m);
1931
- }, b = (m) => {
1932
- if (i.value) {
1933
- m.preventDefault();
1840
+ l("update:modelValue", d);
1841
+ }, S = (d) => {
1842
+ if (o.value) {
1843
+ d.preventDefault();
1934
1844
  return;
1935
1845
  }
1936
- const s = n.value - 1;
1937
- l("update:modelValue", s);
1938
- }, D = (m) => {
1846
+ l("update:modelValue", r.value - 1);
1847
+ }, V = (d) => {
1939
1848
  if (v.value) {
1940
- m.preventDefault();
1849
+ d.preventDefault();
1941
1850
  return;
1942
1851
  }
1943
- const s = n.value + 1;
1944
- l("update:modelValue", s);
1852
+ l("update:modelValue", r.value + 1);
1945
1853
  };
1946
- return (m, s) => {
1947
- const c = ze("sr-only");
1948
- return k(), S("div", {
1854
+ return (d, i) => {
1855
+ const c = Me("sr-only");
1856
+ return D(), T("div", {
1949
1857
  id: e.id,
1950
1858
  class: "krds-pagination"
1951
1859
  }, [
1952
- (k(), ie(ye(i.value ? "span" : "a"), {
1953
- href: i.value ? void 0 : p.value,
1954
- class: E(["page-navi", "prev", { disabled: i.value }]),
1955
- onClick: b
1860
+ (D(), de(ge(o.value ? "span" : "a"), {
1861
+ href: o.value ? void 0 : f.value,
1862
+ class: R([
1863
+ "page-navi",
1864
+ "prev",
1865
+ { disabled: o.value }
1866
+ ]),
1867
+ onClick: S
1956
1868
  }, {
1957
- default: de(() => [...s[0] || (s[0] = [
1958
- P(" 이전 ", -1)
1959
- ])]),
1869
+ default: ue(() => [...i[0] || (i[0] = [N(" 이전 ", -1)])]),
1960
1870
  _: 1
1961
1871
  }, 8, ["href", "class"])),
1962
- r("div", Rt, [
1963
- (k(!0), S(F, null, N(g.value, (d) => (k(), S(F, {
1964
- key: d.key
1965
- }, [
1966
- d.type === "page" ? (k(), S("a", {
1967
- key: 0,
1968
- href: d.href || "#",
1969
- class: E(["page-link", { active: d.page === n.value }]),
1970
- "aria-current": d.page === n.value ? "page" : void 0,
1971
- onClick: (f) => w(d.page, f)
1972
- }, [
1973
- d.page === n.value ? Q((k(), S("span", At, [...s[1] || (s[1] = [
1974
- P("현재페이지", -1)
1975
- ])])), [
1976
- [c]
1977
- ]) : Y("", !0),
1978
- P(" " + V(d.page), 1)
1979
- ], 10, Tt)) : d.type === "ellipsis" ? (k(), S("span", {
1980
- key: 1,
1981
- class: "page-link link-dot",
1982
- "aria-label": d.ariaLabel
1983
- }, null, 8, Pt)) : Y("", !0)
1984
- ], 64))), 128))
1985
- ]),
1986
- (k(), ie(ye(v.value ? "span" : "a"), {
1987
- href: v.value ? void 0 : y.value,
1988
- class: E(["page-navi", "next", { disabled: v.value }]),
1989
- onClick: D
1872
+ p("div", ca, [(D(!0), T(W, null, Y(g.value, (u) => (D(), T(W, { key: u.key }, [u.type === "page" ? (D(), T("a", {
1873
+ key: 0,
1874
+ href: u.href || "#",
1875
+ class: R(["page-link", { active: u.page === r.value }]),
1876
+ "aria-current": u.page === r.value ? "page" : void 0,
1877
+ onClick: (h) => _(u.page, h)
1878
+ }, [u.page === r.value ? ee((D(), T("span", va, [...i[1] || (i[1] = [N("현재페이지", -1)])])), [[c]]) : X("", !0), N(" " + M(u.page), 1)], 10, fa)) : u.type === "ellipsis" ? (D(), T("span", {
1879
+ key: 1,
1880
+ class: "page-link link-dot",
1881
+ "aria-label": u.ariaLabel
1882
+ }, null, 8, pa)) : X("", !0)], 64))), 128))]),
1883
+ (D(), de(ge(v.value ? "span" : "a"), {
1884
+ href: v.value ? void 0 : b.value,
1885
+ class: R([
1886
+ "page-navi",
1887
+ "next",
1888
+ { disabled: v.value }
1889
+ ]),
1890
+ onClick: V
1990
1891
  }, {
1991
- default: de(() => [...s[2] || (s[2] = [
1992
- P(" 다음 ", -1)
1993
- ])]),
1892
+ default: ue(() => [...i[2] || (i[2] = [N(" 다음 ", -1)])]),
1994
1893
  _: 1
1995
1894
  }, 8, ["href", "class"]))
1996
- ], 8, Mt);
1895
+ ], 8, ua);
1997
1896
  };
1998
1897
  }
1999
- }), Ot = { class: "inner help-panel-flexible" }, qt = { class: "help-panel-wrap" }, Nt = { class: "help-conts-area" }, Ht = /* @__PURE__ */ _({
1898
+ }), ma = ha, ya = ma, ga = { class: "inner help-panel-flexible" }, ba = { class: "help-panel-wrap" }, ka = { class: "help-conts-area" }, Sa = /* @__PURE__ */ B({
2000
1899
  __name: "KrdsPanel",
2001
- props: {
2002
- modelValue: { type: Boolean, default: !1 }
2003
- },
1900
+ props: { modelValue: {
1901
+ type: Boolean,
1902
+ default: !1
1903
+ } },
2004
1904
  emits: ["update:modelValue"],
2005
- setup(e, { emit: o }) {
2006
- const a = e, l = o, t = h({
2007
- get: () => a.modelValue,
1905
+ setup(e, { emit: a }) {
1906
+ const n = e, l = a, s = k({
1907
+ get: () => n.modelValue,
2008
1908
  set: (v) => l("update:modelValue", v)
2009
- }), n = () => {
2010
- t.value = !0;
2011
- }, i = () => {
2012
- t.value = !1;
1909
+ }), r = () => {
1910
+ s.value = !0;
1911
+ }, o = () => {
1912
+ s.value = !1;
2013
1913
  };
2014
- return (v, p) => (k(), S("div", Ot, [
2015
- r("button", {
2016
- type: "button",
2017
- class: "krds-btn small tertiary btn-help-panel expand btn-help-exec",
2018
- onClick: n
2019
- }, [...p[0] || (p[0] = [
2020
- r("i", { class: "svg-icon ico-fold" }, null, -1),
2021
- P(" 도움말 ", -1)
2022
- ])]),
2023
- r("div", {
2024
- class: E(["krds-help-panel", { expand: t.value }])
2025
- }, [
2026
- r("div", qt, [
2027
- r("div", Nt, [
2028
- G(v.$slots, "default"),
2029
- r("button", {
2030
- type: "button",
2031
- class: "krds-btn small tertiary btn-help-panel fold",
2032
- onClick: i
2033
- }, [...p[1] || (p[1] = [
2034
- r("span", { class: "sr-only" }, "도움말", -1),
2035
- P(" 접어두기 ", -1),
2036
- r("i", { class: "svg-icon ico-angle right" }, null, -1)
2037
- ])])
2038
- ])
2039
- ])
2040
- ], 2)
2041
- ]));
1914
+ return (v, f) => (D(), T("div", ga, [p("button", {
1915
+ type: "button",
1916
+ class: "krds-btn small tertiary btn-help-panel expand btn-help-exec",
1917
+ onClick: r
1918
+ }, [...f[0] || (f[0] = [p("i", { class: "svg-icon ico-fold" }, null, -1), N(" 도움말 ", -1)])]), p("div", { class: R(["krds-help-panel", { expand: s.value }]) }, [p("div", ba, [p("div", ka, [J(v.$slots, "default"), p("button", {
1919
+ type: "button",
1920
+ class: "krds-btn small tertiary btn-help-panel fold",
1921
+ onClick: o
1922
+ }, [...f[1] || (f[1] = [
1923
+ p("span", { class: "sr-only" }, "도움말", -1),
1924
+ N(" 접어두기 ", -1),
1925
+ p("i", { class: "svg-icon ico-angle right" }, null, -1)
1926
+ ])])])])], 2)]));
2042
1927
  }
2043
- }), jt = { class: "tooltip-action" }, Wt = {
1928
+ }), Ka = Sa, wa = Ka, _a = { class: "tooltip-action" }, Ca = {
2044
1929
  key: 0,
2045
1930
  class: "svg-icon ico-help"
2046
- }, Yt = {
1931
+ }, $a = {
2047
1932
  key: 1,
2048
1933
  class: "svg-icon ico-tooltip"
2049
- }, Gt = { class: "tooltip-title" }, Ut = { class: "tooltip-contents" }, Xt = /* @__PURE__ */ _({
1934
+ }, xa = { class: "tooltip-title" }, Ba = { class: "tooltip-contents" }, La = /* @__PURE__ */ B({
2050
1935
  __name: "KrdsContextualHelp",
2051
1936
  props: {
2052
1937
  tooltipTitle: { default: "도움말 제목" },
@@ -2054,84 +1939,70 @@ const wt = _({
2054
1939
  position: { default: "top left" }
2055
1940
  },
2056
1941
  setup(e) {
2057
- const o = e, a = B(), l = B(), t = B(), n = B(), i = B(!1), v = () => {
2058
- const s = i.value;
2059
- g(), s || p();
2060
- }, p = () => {
2061
- if (!t.value || !l.value) return;
2062
- i.value = !0, t.value.style.display = "block", l.value.setAttribute("aria-expanded", "true"), t.value.querySelector('a, button, [tabindex="0"], input, textarea, select')?.focus(), w();
2063
- }, y = () => {
2064
- !t.value || !l.value || (i.value = !1, t.value.style.display = "none", l.value.setAttribute("aria-expanded", "false"));
1942
+ const a = e, n = L(), l = L(), s = L(), r = L(), o = L(!1), v = () => {
1943
+ const i = o.value;
1944
+ g(), i || f();
1945
+ }, f = () => {
1946
+ !s.value || !l.value || (o.value = !0, s.value.style.display = "block", l.value.setAttribute("aria-expanded", "true"), s.value.querySelector('a, button, [tabindex="0"], input, textarea, select')?.focus(), _());
1947
+ }, b = () => {
1948
+ !s.value || !l.value || (o.value = !1, s.value.style.display = "none", l.value.setAttribute("aria-expanded", "false"));
2065
1949
  }, g = () => {
2066
- const s = document.querySelectorAll(".krds-contextual-help .tooltip-popover"), c = document.querySelectorAll(".krds-contextual-help .tooltip-btn");
2067
- s.forEach((d) => {
2068
- d.style.display = "none";
2069
- }), c.forEach((d) => {
2070
- d.setAttribute("aria-expanded", "false");
2071
- }), i.value = !1;
2072
- }, w = () => {
2073
- if (!a.value || !t.value) return;
2074
- const s = window.innerWidth <= 768, c = a.value.querySelector(".tooltip-action");
2075
- if (s) {
2076
- const f = getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0], R = c.getBoundingClientRect().left - parseInt(f), L = document.body.clientWidth - parseInt(f) * 2;
2077
- t.value.style.left = `-${R}px`, t.value.style.width = `${L}px`;
1950
+ const i = document.querySelectorAll(".krds-contextual-help .tooltip-popover"), c = document.querySelectorAll(".krds-contextual-help .tooltip-btn");
1951
+ i.forEach((u) => {
1952
+ u.style.display = "none";
1953
+ }), c.forEach((u) => {
1954
+ u.setAttribute("aria-expanded", "false");
1955
+ }), o.value = !1;
1956
+ }, _ = () => {
1957
+ if (!n.value || !s.value) return;
1958
+ const i = window.innerWidth <= 768, c = n.value.querySelector(".tooltip-action");
1959
+ if (i) {
1960
+ const u = getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0], h = c.getBoundingClientRect().left - parseInt(u), m = document.body.clientWidth - parseInt(u) * 2;
1961
+ s.value.style.left = `-${h}px`, s.value.style.width = `${m}px`;
2078
1962
  } else
2079
- t.value.style.left = "", t.value.style.right = "", t.value.style.width = "360px";
2080
- }, b = (s) => {
2081
- (s.key === "Escape" || s.key === "Esc") && g();
2082
- }, D = (s) => {
2083
- s.target.closest(".tooltip-action") || g();
2084
- }, m = () => {
2085
- i.value && w();
1963
+ s.value.style.left = "", s.value.style.right = "", s.value.style.width = "360px";
1964
+ }, S = (i) => {
1965
+ (i.key === "Escape" || i.key === "Esc") && g();
1966
+ }, V = (i) => {
1967
+ i.target.closest(".tooltip-action") || g();
1968
+ }, d = () => {
1969
+ o.value && _();
2086
1970
  };
2087
- return le(() => {
2088
- a.value && (l.value && l.value.setAttribute("aria-expanded", "false"), t.value && t.value.setAttribute("role", "tooltip"), document.addEventListener("keydown", b), document.addEventListener("click", D), window.addEventListener("resize", m));
2089
- }), J(() => {
2090
- document.removeEventListener("keydown", b), document.removeEventListener("click", D), window.removeEventListener("resize", m);
2091
- }), (s, c) => (k(), S("div", {
1971
+ return te(() => {
1972
+ n.value && (l.value && l.value.setAttribute("aria-expanded", "false"), s.value && s.value.setAttribute("role", "tooltip"), document.addEventListener("keydown", S), document.addEventListener("click", V), window.addEventListener("resize", d));
1973
+ }), Z(() => {
1974
+ document.removeEventListener("keydown", S), document.removeEventListener("click", V), window.removeEventListener("resize", d);
1975
+ }), (i, c) => (D(), T("div", {
2092
1976
  ref_key: "containerRef",
2093
- ref: a,
2094
- class: E(["krds-contextual-help", o.position])
1977
+ ref: n,
1978
+ class: R(["krds-contextual-help", a.position])
1979
+ }, [p("div", _a, [p("button", {
1980
+ ref_key: "tooltipBtnRef",
1981
+ ref: l,
1982
+ type: "button",
1983
+ class: "krds-btn medium icon tooltip-btn",
1984
+ onClick: v
1985
+ }, [c[0] || (c[0] = p("span", { class: "sr-only" }, "도움말", -1)), a.helpIcon ? (D(), T("i", Ca)) : (D(), T("i", $a))], 512), p("div", {
1986
+ ref_key: "tooltipPopoverRef",
1987
+ ref: s,
1988
+ class: "tooltip-popover",
1989
+ role: "tooltip"
2095
1990
  }, [
2096
- r("div", jt, [
2097
- r("button", {
2098
- ref_key: "tooltipBtnRef",
2099
- ref: l,
2100
- type: "button",
2101
- class: "krds-btn medium icon tooltip-btn",
2102
- onClick: v
2103
- }, [
2104
- c[0] || (c[0] = r("span", { class: "sr-only" }, "도움말", -1)),
2105
- o.helpIcon ? (k(), S("i", Wt)) : (k(), S("i", Yt))
2106
- ], 512),
2107
- r("div", {
2108
- ref_key: "tooltipPopoverRef",
2109
- ref: t,
2110
- class: "tooltip-popover",
2111
- role: "tooltip"
2112
- }, [
2113
- r("h4", Gt, V(o.tooltipTitle), 1),
2114
- r("div", Ut, [
2115
- G(s.$slots, "default")
2116
- ]),
2117
- r("button", {
2118
- ref_key: "closeBtnRef",
2119
- ref: n,
2120
- type: "button",
2121
- class: "krds-btn xsmall icon tooltip-close",
2122
- onClick: y
2123
- }, [...c[1] || (c[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));
1991
+ p("h4", xa, M(a.tooltipTitle), 1),
1992
+ p("div", Ba, [J(i.$slots, "default")]),
1993
+ p("button", {
1994
+ ref_key: "closeBtnRef",
1995
+ ref: r,
1996
+ type: "button",
1997
+ class: "krds-btn xsmall icon tooltip-close",
1998
+ onClick: b
1999
+ }, [...c[1] || (c[1] = [p("span", { class: "sr-only" }, "닫기", -1), p("i", { class: "svg-icon ico-modal-close" }, null, -1)])], 512)
2000
+ ], 512)])], 2));
2130
2001
  }
2131
- }), Jt = {
2002
+ }), Da = La, Ta = Da, Va = {
2132
2003
  key: 0,
2133
2004
  class: "coach-balloon"
2134
- }, Qt = { class: "coach-tit" }, Zt = { class: "desc" }, el = { class: "coach-controls" }, tl = { class: "num" }, ll = { class: "btn-wrap" }, al = /* @__PURE__ */ _({
2005
+ }, za = { class: "coach-tit" }, Ia = { class: "desc" }, Ea = { class: "coach-controls" }, Fa = { class: "num" }, Ma = { class: "btn-wrap" }, Aa = /* @__PURE__ */ B({
2135
2006
  __name: "KrdsCoachMark",
2136
2007
  props: {
2137
2008
  coachMarkClass: { default: "" },
@@ -2143,146 +2014,137 @@ const wt = _({
2143
2014
  id: {}
2144
2015
  },
2145
2016
  emits: ["update:modelValue", "close"],
2146
- setup(e, { emit: o }) {
2147
- const a = e, l = h(() => {
2148
- const p = a.activeStep - 1;
2149
- return a.stepsData && p >= 0 && p < a.stepsData.length ? a.stepsData[p] : null;
2150
- }), t = o, n = () => {
2151
- a.activeStep > 1 && t("update:modelValue", a.activeStep - 1);
2152
- }, i = () => {
2153
- a.activeStep < a.stepsData.length && t("update:modelValue", a.activeStep + 1);
2017
+ setup(e, { emit: a }) {
2018
+ const n = e, l = k(() => {
2019
+ const f = n.activeStep - 1;
2020
+ return n.stepsData && f >= 0 && f < n.stepsData.length ? n.stepsData[f] : null;
2021
+ }), s = a, r = () => {
2022
+ n.activeStep > 1 && s("update:modelValue", n.activeStep - 1);
2023
+ }, o = () => {
2024
+ n.activeStep < n.stepsData.length && s("update:modelValue", n.activeStep + 1);
2154
2025
  }, v = () => {
2155
- t("close");
2026
+ s("close");
2156
2027
  };
2157
- return (p, y) => (k(), S("div", {
2158
- class: E(["krds-coach-mark", e.coachMarkClass]),
2028
+ return (f, b) => (D(), T("div", {
2029
+ class: R(["krds-coach-mark", e.coachMarkClass]),
2159
2030
  style: ne(e.style)
2160
- }, [
2161
- e.modelValue === e.activeStep && l.value ? (k(), S("div", Jt, [
2162
- y[2] || (y[2] = r("h5", { class: "sr-only" }, "따라하기 가이드", -1)),
2163
- r("h6", Qt, V(e.activeStep) + "단계 : " + V(l.value.title), 1),
2164
- r("p", Zt, V(l.value.description), 1),
2165
- r("div", el, [
2166
- r("div", tl, [
2167
- y[0] || (y[0] = r("span", { class: "sr-only" }, "현재 단계", -1)),
2168
- r("strong", null, V(e.activeStep), 1),
2169
- y[1] || (y[1] = r("span", { class: "sr-only" }, "총 단계", -1)),
2170
- r("span", null, V(e.stepsData.length), 1)
2171
- ]),
2172
- r("div", ll, [
2173
- r("button", {
2174
- type: "button",
2175
- class: "krds-btn small text",
2176
- onClick: v
2177
- }, "그만보기"),
2178
- e.activeStep !== 1 ? (k(), S("button", {
2179
- key: 0,
2180
- type: "button",
2181
- class: "krds-btn small text",
2182
- onClick: n
2183
- }, "이전으로")) : Y("", !0),
2184
- e.activeStep !== e.stepsData.length ? (k(), 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
- G(p.$slots, "coach-mark-content")
2194
- ], 6));
2031
+ }, [e.modelValue === e.activeStep && l.value ? (D(), T("div", Va, [
2032
+ b[2] || (b[2] = p("h5", { class: "sr-only" }, "따라하기 가이드", -1)),
2033
+ p("h6", za, M(e.activeStep) + "단계 : " + M(l.value.title), 1),
2034
+ p("p", Ia, M(l.value.description), 1),
2035
+ p("div", Ea, [p("div", Fa, [
2036
+ b[0] || (b[0] = p("span", { class: "sr-only" }, "현재 단계", -1)),
2037
+ p("strong", null, M(e.activeStep), 1),
2038
+ b[1] || (b[1] = p("span", { class: "sr-only" }, "총 단계", -1)),
2039
+ p("span", null, M(e.stepsData.length), 1)
2040
+ ]), p("div", Ma, [
2041
+ p("button", {
2042
+ type: "button",
2043
+ class: "krds-btn small text",
2044
+ onClick: v
2045
+ }, "그만보기"),
2046
+ e.activeStep !== 1 ? (D(), T("button", {
2047
+ key: 0,
2048
+ type: "button",
2049
+ class: "krds-btn small text",
2050
+ onClick: r
2051
+ }, "이전으로")) : X("", !0),
2052
+ e.activeStep !== e.stepsData.length ? (D(), T("button", {
2053
+ key: 1,
2054
+ type: "button",
2055
+ class: "krds-btn small tertiary",
2056
+ onClick: o
2057
+ }, "다음으로")) : X("", !0)
2058
+ ])])
2059
+ ])) : X("", !0), J(f.$slots, "coach-mark-content")], 6));
2195
2060
  }
2196
- }), nl = ["disabled", "aria-labelledby"], sl = ["id", "aria-hidden"], ol = { class: "sr-only" }, il = /* @__PURE__ */ _({
2061
+ }), Ra = Aa, Pa = Ra, Ha = ["disabled"], qa = ["aria-hidden"], Oa = { class: "sr-only" }, Na = /* @__PURE__ */ B({
2197
2062
  __name: "KrdsTooltip",
2198
2063
  props: {
2199
2064
  type: { default: "default" },
2200
2065
  tooltipContent: {},
2201
2066
  vertical: { type: Boolean },
2202
2067
  box: { type: Boolean },
2203
- disabled: { type: Boolean, default: !1 },
2068
+ disabled: {
2069
+ type: Boolean,
2070
+ default: !1
2071
+ },
2204
2072
  class: {},
2205
2073
  style: {},
2206
2074
  id: {}
2207
2075
  },
2208
2076
  setup(e) {
2209
- const o = e, a = B(null), l = B(null), t = B(!1), n = B({}), i = B(`tooltip-popover-${Math.random().toString(36).substring(2, 9)}`), v = B(!1), p = h(() => {
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
- }), y = h(() => {
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 = h(() => a.value?.querySelector("button")?.textContent?.trim() || ""), w = () => window.innerWidth <= 768, b = () => {
2216
- if (!a.value || !l.value) return;
2217
- const f = a.value.querySelector("button");
2218
- if (!f) return;
2219
- const x = 12, { clientHeight: R, clientWidth: L } = l.value, { top: M, left: z, right: H, height: I, width: j } = f.getBoundingClientRect(), Z = window.innerWidth / 2, se = window.innerHeight / 2;
2220
- let X, O;
2221
- const q = [];
2222
- v.value || o.box || o.vertical ? (M + I > se ? (X = M - R - x, q.push("top")) : (X = M + I + x, q.push("bottom")), z + j > Z ? (O = H - L, q.push("right"), window.innerWidth - (z + j) > L / 2 && (O = z + (j - L) / 2, q.splice(q.indexOf("right"), 1))) : (O = z + (j - L) / 2, O < 0 && (O = z, q.push("left")))) : (X = M + (I - R) / 2, z + j > Z ? (O = z - L - x, q.push("right")) : O = H + x);
2223
- const ee = window.innerWidth <= 420;
2224
- n.value = {
2225
- top: `${X}px`,
2226
- left: ee ? "50%" : `${O}px`,
2227
- transform: ee ? "translateX(-50%)" : "none"
2228
- }, l.value && (l.value.className = `krds-tooltip-popover ${q.join(" ")} ${y.value.join(" ")}`);
2229
- }, D = async () => {
2230
- o.disabled || !o.tooltipContent || (t.value = !0, await we(), b());
2231
- }, m = () => {
2232
- t.value = !1, n.value = {};
2233
- }, s = (f) => {
2234
- (f.key === "Escape" || f.key === "Esc") && t.value && m();
2235
- }, c = () => {
2236
- v.value = w(), t.value && m();
2077
+ const a = e, n = L(null), l = L(null), s = L(!1), r = L({}), o = `tooltip-popover-${ae()}`, v = L(!1), f = k(() => {
2078
+ const h = ["krds-btn", "krds-tooltip"];
2079
+ return a.type === "default" ? h.push("small", "text") : a.type === "icon" ? h.push("icon") : a.type === "button" && h.push(""), !a.box && a.vertical && h.push("tooltip-vertical"), a.box && !a.vertical && h.push("tooltip-box"), h.join(" ");
2080
+ }), b = k(() => {
2081
+ const h = [];
2082
+ return a.box && h.push("tooltip-box"), a.vertical && h.push("tooltip-vertical"), s.value && h.push("active"), h;
2083
+ }), g = k(() => n.value?.querySelector("button")?.textContent?.trim() || ""), _ = () => window.innerWidth <= 768, S = () => {
2084
+ if (!n.value || !l.value) return;
2085
+ const h = n.value.querySelector("button");
2086
+ if (!h) return;
2087
+ const m = 12, { clientHeight: w, clientWidth: C } = l.value, { top: x, left: $, right: y, height: K, width: F } = h.getBoundingClientRect(), P = window.innerWidth / 2, A = window.innerHeight / 2;
2088
+ let j, O;
2089
+ const G = [];
2090
+ v.value || a.box || a.vertical ? (x + K > A ? (j = x - w - m, G.push("top")) : (j = x + K + m, G.push("bottom")), $ + F > P ? (O = y - C, G.push("right"), window.innerWidth - ($ + F) > C / 2 && (O = $ + (F - C) / 2, G.splice(G.indexOf("right"), 1))) : (O = $ + (F - C) / 2, O < 0 && (O = $, G.push("left")))) : (j = x + (K - w) / 2, $ + F > P ? (O = $ - C - m, G.push("right")) : O = y + m);
2091
+ const le = window.innerWidth <= 420;
2092
+ r.value = {
2093
+ top: `${j}px`,
2094
+ left: le ? "50%" : `${O}px`,
2095
+ transform: le ? "translateX(-50%)" : "none"
2096
+ }, l.value && (l.value.className = `krds-tooltip-popover ${G.join(" ")} ${b.value.join(" ")}`);
2097
+ }, V = async () => {
2098
+ a.disabled || !a.tooltipContent || (s.value = !0, await Ke(), S());
2237
2099
  }, d = () => {
2238
- t.value && m();
2100
+ s.value = !1, r.value = {};
2101
+ }, i = (h) => {
2102
+ (h.key === "Escape" || h.key === "Esc") && s.value && d();
2103
+ }, c = () => {
2104
+ v.value = _(), s.value && d();
2105
+ }, u = () => {
2106
+ s.value && d();
2239
2107
  };
2240
- return le(() => {
2241
- v.value = w(), document.addEventListener("keydown", s), window.addEventListener("scroll", d), window.addEventListener("resize", c);
2242
- }), J(() => {
2243
- document.removeEventListener("keydown", s), window.removeEventListener("scroll", d), window.removeEventListener("resize", c);
2244
- }), (f, x) => (k(), S("div", {
2108
+ return te(() => {
2109
+ v.value = _(), document.addEventListener("keydown", i), window.addEventListener("scroll", u), window.addEventListener("resize", c);
2110
+ }), Z(() => {
2111
+ document.removeEventListener("keydown", i), window.removeEventListener("scroll", u), window.removeEventListener("resize", c);
2112
+ }), (h, m) => (D(), T("div", {
2245
2113
  ref_key: "containerRef",
2246
- ref: a
2247
- }, [
2248
- r("button", {
2249
- type: "button",
2250
- class: E(p.value),
2251
- disabled: e.disabled,
2252
- "aria-labelledby": i.value,
2253
- onMouseover: D,
2254
- onMouseout: m,
2255
- onFocusin: D,
2256
- onFocusout: m
2257
- }, [
2258
- G(f.$slots, "default")
2259
- ], 42, nl),
2260
- Q(r("div", {
2261
- id: i.value,
2262
- ref_key: "popoverRef",
2263
- ref: l,
2264
- class: E(["krds-tooltip-popover", y.value]),
2265
- style: ne(n.value),
2266
- "aria-hidden": !t.value,
2267
- role: "tooltip"
2268
- }, [
2269
- r("span", ol, V(g.value), 1),
2270
- P(" " + V(e.tooltipContent), 1)
2271
- ], 14, sl), [
2272
- [te, t.value]
2273
- ])
2274
- ], 512));
2114
+ ref: n
2115
+ }, [p("button", {
2116
+ type: "button",
2117
+ class: R(f.value),
2118
+ disabled: e.disabled,
2119
+ "aria-labelledby": o,
2120
+ onMouseover: V,
2121
+ onMouseout: d,
2122
+ onFocusin: V,
2123
+ onFocusout: d
2124
+ }, [J(h.$slots, "default")], 42, Ha), ee(p("div", {
2125
+ id: o,
2126
+ ref_key: "popoverRef",
2127
+ ref: l,
2128
+ class: R(["krds-tooltip-popover", b.value]),
2129
+ style: ne(r.value),
2130
+ "aria-hidden": !s.value,
2131
+ role: "tooltip"
2132
+ }, [p("span", Oa, M(g.value), 1), N(" " + M(e.tooltipContent), 1)], 14, qa), [[se, s.value]])], 512));
2275
2133
  }
2276
- }), dl = ["aria-expanded"], rl = { class: "drop-in" }, cl = {
2134
+ }), ja = Na, Wa = ja, Ga = ["aria-expanded"], Ya = { class: "drop-in" }, Ua = {
2277
2135
  key: 0,
2278
2136
  class: "drop-top"
2279
- }, ul = {
2137
+ }, Xa = {
2280
2138
  key: 1,
2281
2139
  class: "drop-list"
2282
- }, fl = ["lang", "aria-selected", "onClick"], vl = { class: "sr-only" }, pl = {
2140
+ }, Ja = [
2141
+ "lang",
2142
+ "aria-selected",
2143
+ "onClick"
2144
+ ], Qa = { class: "sr-only" }, Za = {
2283
2145
  key: 2,
2284
2146
  class: "drop-list"
2285
- }, ml = ["href", "lang"], hl = /* @__PURE__ */ _({
2147
+ }, el = ["href", "lang"], tl = /* @__PURE__ */ B({
2286
2148
  __name: "KrdsLanguageSwitcher",
2287
2149
  props: {
2288
2150
  languageList: {},
@@ -2294,199 +2156,169 @@ const wt = _({
2294
2156
  id: {}
2295
2157
  },
2296
2158
  emits: ["update:modelValue", "close"],
2297
- setup(e, { emit: o }) {
2298
- const a = e, l = o, t = B(!1), n = B(), i = B(), v = () => {
2299
- t.value = !t.value, t.value && n.value && g();
2300
- }, p = () => {
2301
- t.value = !1;
2302
- }, y = (s) => {
2303
- l("update:modelValue", s), p(), l("close"), i.value?.focus();
2159
+ setup(e, { emit: a }) {
2160
+ const n = e, l = a, s = L(!1), r = L(), o = L(), v = () => {
2161
+ s.value = !s.value, s.value && r.value && g();
2162
+ }, f = () => {
2163
+ s.value = !1;
2164
+ }, b = (i) => {
2165
+ l("update:modelValue", i), f(), l("close"), o.value?.focus();
2304
2166
  }, g = () => {
2305
- if (!n.value) return;
2306
- const s = n.value.querySelector(".drop-menu");
2307
- if (!s) return;
2308
- const c = s.getBoundingClientRect(), d = window.innerWidth;
2309
- n.value.classList.remove("drop-left", "drop-right"), c.left < 0 ? n.value.classList.add("drop-left") : d < c.left + c.width && n.value.classList.add("drop-right");
2310
- }, w = (s) => {
2311
- s.key === "Escape" && (p(), i.value?.focus());
2312
- }, b = (s) => {
2313
- n.value?.contains(s.target) || p();
2314
- }, D = (s) => {
2315
- n.value?.contains(s.relatedTarget) || p();
2316
- }, m = (s) => {
2317
- if (!n.value) return;
2318
- n.value.querySelectorAll(".drop-list .item-link").forEach((f) => {
2319
- f.style.position = "relative", f.style.zIndex = "0";
2167
+ if (!r.value) return;
2168
+ const i = r.value.querySelector(".drop-menu");
2169
+ if (!i) return;
2170
+ const c = i.getBoundingClientRect(), u = window.innerWidth;
2171
+ r.value.classList.remove("drop-left", "drop-right"), c.left < 0 ? r.value.classList.add("drop-left") : u < c.left + c.width && r.value.classList.add("drop-right");
2172
+ }, _ = (i) => {
2173
+ i.key === "Escape" && (f(), o.value?.focus());
2174
+ }, S = (i) => {
2175
+ r.value?.contains(i.target) || f();
2176
+ }, V = (i) => {
2177
+ r.value?.contains(i.relatedTarget) || f();
2178
+ }, d = (i) => {
2179
+ if (!r.value) return;
2180
+ r.value.querySelectorAll(".drop-list .item-link").forEach((u) => {
2181
+ u.style.position = "relative", u.style.zIndex = "0";
2320
2182
  });
2321
- const d = s.target;
2322
- d.style.zIndex = "1";
2183
+ const c = i.target;
2184
+ c.style.zIndex = "1";
2323
2185
  };
2324
- return ae(t, (s) => {
2325
- s ? (document.addEventListener("keydown", w), document.addEventListener("click", b)) : (document.removeEventListener("keydown", w), document.removeEventListener("click", b));
2326
- }), J(() => {
2327
- document.removeEventListener("keydown", w), document.removeEventListener("click", b);
2328
- }), (s, c) => (k(), S("div", {
2186
+ return re(s, (i) => {
2187
+ i ? (document.addEventListener("keydown", _), document.addEventListener("click", S)) : (document.removeEventListener("keydown", _), document.removeEventListener("click", S));
2188
+ }), Z(() => {
2189
+ document.removeEventListener("keydown", _), document.removeEventListener("click", S);
2190
+ }), (i, c) => (D(), T("div", {
2329
2191
  ref_key: "dropdownRef",
2330
- ref: n,
2331
- class: E(["krds-drop-wrap krds-language", {
2332
- active: t.value,
2333
- "drop-left": a.dropPosition === "left",
2334
- "drop-right": a.dropPosition === "right"
2192
+ ref: r,
2193
+ class: R(["krds-drop-wrap krds-language", {
2194
+ active: s.value,
2195
+ "drop-left": n.dropPosition === "left",
2196
+ "drop-right": n.dropPosition === "right"
2335
2197
  }]),
2336
- onFocusout: D
2198
+ onFocusout: V
2199
+ }, [p("button", {
2200
+ ref_key: "buttonRef",
2201
+ ref: o,
2202
+ type: "button",
2203
+ class: R(["krds-btn small text drop-btn", { active: s.value }]),
2204
+ "aria-expanded": s.value,
2205
+ onClick: v
2337
2206
  }, [
2338
- r("button", {
2339
- ref_key: "buttonRef",
2340
- ref: i,
2341
- type: "button",
2342
- class: E(["krds-btn small text drop-btn", { active: t.value }]),
2343
- "aria-expanded": t.value,
2344
- onClick: v
2345
- }, [
2346
- c[0] || (c[0] = r("i", { class: "svg-icon ico-global" }, null, -1)),
2347
- G(s.$slots, "default"),
2348
- c[1] || (c[1] = r("i", { class: "svg-icon ico-toggle" }, null, -1))
2349
- ], 10, dl),
2350
- r("div", {
2351
- class: "drop-menu",
2352
- style: ne({ display: t.value ? "block" : "none" })
2353
- }, [
2354
- r("div", rl, [
2355
- s.$slots["prev-item"] ? (k(), S("div", cl, [
2356
- G(s.$slots, "prev-item")
2357
- ])) : Y("", !0),
2358
- a.type === "default" ? (k(), S("ul", ul, [
2359
- (k(!0), S(F, null, N(e.languageList, (d) => (k(), S("li", {
2360
- key: d.code
2361
- }, [
2362
- r("a", {
2363
- href: "#",
2364
- class: E(["item-link", { active: a.modelValue === d.code }]),
2365
- lang: d.code,
2366
- "aria-selected": a.modelValue === d.code,
2367
- onClick: re((f) => y(d.code), ["prevent"]),
2368
- onFocus: m
2369
- }, [
2370
- P(V(d.name) + " ", 1),
2371
- r("span", vl, V(a.modelValue === d.code ? "선택됨" : ""), 1)
2372
- ], 42, fl)
2373
- ]))), 128))
2374
- ])) : a.type === "external" ? (k(), S("ul", pl, [
2375
- (k(!0), S(F, null, N(e.languageList, (d) => (k(), S("li", {
2376
- key: d.code
2377
- }, [
2378
- r("a", {
2379
- href: d.url || "#",
2380
- class: "item-link",
2381
- lang: d.code,
2382
- target: "_blank",
2383
- title: "새 창 열림",
2384
- onFocus: m
2385
- }, [
2386
- P(V(d.name) + " ", 1),
2387
- c[2] || (c[2] = r("i", { class: "svg-icon ico-go" }, null, -1))
2388
- ], 40, ml)
2389
- ]))), 128))
2390
- ])) : Y("", !0)
2391
- ])
2392
- ], 4)
2393
- ], 34));
2207
+ c[0] || (c[0] = p("i", { class: "svg-icon ico-global" }, null, -1)),
2208
+ J(i.$slots, "default"),
2209
+ c[1] || (c[1] = p("i", { class: "svg-icon ico-toggle" }, null, -1))
2210
+ ], 10, Ga), p("div", {
2211
+ class: "drop-menu",
2212
+ style: ne({ display: s.value ? "block" : "none" })
2213
+ }, [p("div", Ya, [i.$slots["prev-item"] ? (D(), T("div", Ua, [J(i.$slots, "prev-item")])) : X("", !0), n.type === "default" ? (D(), T("ul", Xa, [(D(!0), T(W, null, Y(e.languageList, (u) => (D(), T("li", { key: u.code }, [p("a", {
2214
+ href: "#",
2215
+ class: R(["item-link", { active: n.modelValue === u.code }]),
2216
+ lang: u.code,
2217
+ "aria-selected": n.modelValue === u.code,
2218
+ onClick: ce((h) => b(u.code), ["prevent"]),
2219
+ onFocus: d
2220
+ }, [N(M(u.name) + " ", 1), p("span", Qa, M(n.modelValue === u.code ? "선택됨" : ""), 1)], 42, Ja)]))), 128))])) : n.type === "external" ? (D(), T("ul", Za, [(D(!0), T(W, null, Y(e.languageList, (u) => (D(), T("li", { key: u.code }, [p("a", {
2221
+ href: u.url || "#",
2222
+ class: "item-link",
2223
+ lang: u.code,
2224
+ target: "_blank",
2225
+ title: "새 창 열림",
2226
+ onFocus: d
2227
+ }, [N(M(u.name) + " ", 1), c[2] || (c[2] = p("i", { class: "svg-icon ico-go" }, null, -1))], 40, el)]))), 128))])) : X("", !0)])], 4)], 34));
2394
2228
  }
2395
- }), yl = { class: "drop-in" }, gl = { class: "drop-list" }, bl = ["data-adjust-scale", "onClick"], kl = { class: "drop-bottom" }, Sl = /* @__PURE__ */ _({
2229
+ }), al = tl, ll = al, sl = { class: "drop-in" }, nl = { class: "drop-list" }, rl = ["data-adjust-scale", "onClick"], il = { class: "drop-bottom" }, ol = /* @__PURE__ */ B({
2396
2230
  __name: "KrdsResize",
2397
2231
  emits: ["update:modelValue", "close"],
2398
- setup(e, { emit: o }) {
2399
- const a = o, l = B(!1), t = B(), n = B(), i = B("md"), v = [
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
- ], p = () => {
2406
- l.value = !l.value, l.value && t.value && b();
2407
- }, y = () => {
2408
- l.value = !1;
2409
- }, g = (d) => {
2410
- y(), a("close"), n.value?.focus(), i.value = d.key, document.body.style.zoom = d?.zoom;
2411
- }, w = () => {
2412
- const d = v.find((f) => f.key === "md");
2413
- d && g(d);
2232
+ setup(e, { emit: a }) {
2233
+ const n = a, l = L(!1), s = L(), r = L(), o = L("md"), v = [
2234
+ {
2235
+ key: "sm",
2236
+ label: "작게",
2237
+ zoom: "0.9"
2238
+ },
2239
+ {
2240
+ key: "md",
2241
+ label: "보통",
2242
+ zoom: "1"
2243
+ },
2244
+ {
2245
+ key: "lg",
2246
+ label: "조금 크게",
2247
+ zoom: "1.1"
2248
+ },
2249
+ {
2250
+ key: "xlg",
2251
+ label: "크게",
2252
+ zoom: "1.3"
2253
+ },
2254
+ {
2255
+ key: "xxlg",
2256
+ label: "가장 크게",
2257
+ zoom: "1.5"
2258
+ }
2259
+ ], f = () => {
2260
+ l.value = !l.value, l.value && s.value && S();
2414
2261
  }, b = () => {
2415
- if (!t.value) return;
2416
- const d = t.value.querySelector(".drop-menu");
2417
- if (!d) return;
2418
- const f = d.getBoundingClientRect(), x = window.innerWidth;
2419
- t.value.classList.remove("drop-left", "drop-right"), f.left < 0 ? t.value.classList.add("drop-left") : x < f.left + f.width && t.value.classList.add("drop-right");
2420
- }, D = (d) => {
2421
- d.key === "Escape" && (y(), n.value?.focus());
2422
- }, m = (d) => {
2423
- t.value?.contains(d.target) || y();
2424
- }, s = (d) => {
2425
- t.value?.contains(d.relatedTarget) || y();
2426
- }, c = (d) => {
2427
- if (!t.value) return;
2428
- t.value.querySelectorAll(".drop-list .item-link").forEach((R) => {
2429
- R.style.position = "relative", R.style.zIndex = "0";
2262
+ l.value = !1;
2263
+ }, g = (u) => {
2264
+ b(), n("close"), r.value?.focus(), o.value = u.key, document.body.style.zoom = u?.zoom;
2265
+ }, _ = () => {
2266
+ const u = v.find((h) => h.key === "md");
2267
+ u && g(u);
2268
+ }, S = () => {
2269
+ if (!s.value) return;
2270
+ const u = s.value.querySelector(".drop-menu");
2271
+ if (!u) return;
2272
+ const h = u.getBoundingClientRect(), m = window.innerWidth;
2273
+ s.value.classList.remove("drop-left", "drop-right"), h.left < 0 ? s.value.classList.add("drop-left") : m < h.left + h.width && s.value.classList.add("drop-right");
2274
+ }, V = (u) => {
2275
+ u.key === "Escape" && (b(), r.value?.focus());
2276
+ }, d = (u) => {
2277
+ s.value?.contains(u.target) || b();
2278
+ }, i = (u) => {
2279
+ s.value?.contains(u.relatedTarget) || b();
2280
+ }, c = (u) => {
2281
+ if (!s.value) return;
2282
+ s.value.querySelectorAll(".drop-list .item-link").forEach((m) => {
2283
+ m.style.position = "relative", m.style.zIndex = "0";
2430
2284
  });
2431
- const x = d.target;
2432
- x.style.zIndex = "1";
2285
+ const h = u.target;
2286
+ h.style.zIndex = "1";
2433
2287
  };
2434
- return ae(l, (d) => {
2435
- d ? (document.addEventListener("keydown", D), document.addEventListener("click", m)) : (document.removeEventListener("keydown", D), document.removeEventListener("click", m));
2436
- }), J(() => {
2437
- document.removeEventListener("keydown", D), document.removeEventListener("click", m);
2438
- }), (d, f) => (k(), S("div", {
2288
+ return re(l, (u) => {
2289
+ u ? (document.addEventListener("keydown", V), document.addEventListener("click", d)) : (document.removeEventListener("keydown", V), document.removeEventListener("click", d));
2290
+ }), Z(() => {
2291
+ document.removeEventListener("keydown", V), document.removeEventListener("click", d);
2292
+ }), (u, h) => (D(), T("div", {
2439
2293
  ref_key: "dropdownRef",
2440
- ref: t,
2294
+ ref: s,
2441
2295
  class: "krds-drop-wrap krds-resize",
2442
2296
  "data-adjust": "scale",
2443
- onFocusout: s
2444
- }, [
2445
- r("button", {
2446
- ref_key: "buttonRef",
2447
- ref: n,
2448
- type: "button",
2449
- class: "krds-btn small text drop-btn",
2450
- onClick: p
2451
- }, [...f[0] || (f[0] = [
2452
- P(" 화면크기 ", -1),
2453
- r("i", { class: "svg-icon ico-toggle" }, null, -1)
2454
- ])], 512),
2455
- r("div", {
2456
- class: "drop-menu",
2457
- style: ne({ display: l.value ? "block" : "none" })
2458
- }, [
2459
- r("div", yl, [
2460
- r("ul", gl, [
2461
- (k(), S(F, null, N(v, (x) => r("li", {
2462
- key: x.key
2463
- }, [
2464
- r("button", {
2465
- type: "button",
2466
- class: E(["item-link", [x.key, x.key === i.value ? "active" : ""]]),
2467
- "data-adjust-scale": x.key,
2468
- onClick: re((R) => g(x), ["prevent"]),
2469
- onFocus: c
2470
- }, V(x.label), 43, bl)
2471
- ])), 64))
2472
- ]),
2473
- r("div", kl, [
2474
- r("button", {
2475
- type: "button",
2476
- class: "krds-btn medium text",
2477
- "data-adjust-scale": "md",
2478
- onClick: re(w, ["prevent"]),
2479
- onFocus: c
2480
- }, [...f[1] || (f[1] = [
2481
- r("i", { class: "svg-icon ico-reset" }, null, -1),
2482
- P(" 초기화 ", -1)
2483
- ])], 32)
2484
- ])
2485
- ])
2486
- ], 4)
2487
- ], 544));
2297
+ onFocusout: i
2298
+ }, [p("button", {
2299
+ ref_key: "buttonRef",
2300
+ ref: r,
2301
+ type: "button",
2302
+ class: "krds-btn small text drop-btn",
2303
+ onClick: f
2304
+ }, [...h[0] || (h[0] = [N(" 화면크기 ", -1), p("i", { class: "svg-icon ico-toggle" }, null, -1)])], 512), p("div", {
2305
+ class: "drop-menu",
2306
+ style: ne({ display: l.value ? "block" : "none" })
2307
+ }, [p("div", sl, [p("ul", nl, [(D(), T(W, null, Y(v, (m) => p("li", { key: m.key }, [p("button", {
2308
+ type: "button",
2309
+ class: R(["item-link", [m.key, m.key === o.value ? "active" : ""]]),
2310
+ "data-adjust-scale": m.key,
2311
+ onClick: ce((w) => g(m), ["prevent"]),
2312
+ onFocus: c
2313
+ }, M(m.label), 43, rl)])), 64))]), p("div", il, [p("button", {
2314
+ type: "button",
2315
+ class: "krds-btn medium text",
2316
+ "data-adjust-scale": "md",
2317
+ onClick: ce(_, ["prevent"]),
2318
+ onFocus: c
2319
+ }, [...h[1] || (h[1] = [p("i", { class: "svg-icon ico-reset" }, null, -1), N(" 초기화 ", -1)])], 32)])])], 4)], 544));
2488
2320
  }
2489
- }), wl = _({
2321
+ }), dl = ol, ul = dl, cl = B({
2490
2322
  name: "KrdsModal",
2491
2323
  props: {
2492
2324
  modelValue: {
@@ -2520,97 +2352,72 @@ const wt = _({
2520
2352
  },
2521
2353
  emits: ["update:modelValue"],
2522
2354
  slots: Object,
2523
- setup(e, { slots: o, emit: a }) {
2524
- const l = Ee()?.uid, t = h(() => e.modalId ?? `krds-modal-${l}`), n = h({
2355
+ setup(e, { slots: a, emit: n }) {
2356
+ const l = Ie()?.uid, s = k(() => e.modalId ?? `krds-modal-${l}`), r = k({
2525
2357
  get: () => e.modelValue,
2526
- set: (c) => a("update:modelValue", c)
2527
- }), i = h(() => `tit_${t.value}`), v = h(() => ({
2358
+ set: (c) => n("update:modelValue", c)
2359
+ }), o = k(() => `tit_${s.value}`), v = k(() => ({
2528
2360
  small: "modal-sm",
2529
2361
  medium: "modal-md",
2530
2362
  large: "modal-lg"
2531
- })[e.size]), p = () => {
2532
- n.value = !1;
2363
+ })[e.size]), f = () => {
2364
+ r.value = !1;
2533
2365
  };
2534
- let y = "", g = null;
2535
- const w = B(null), b = (c) => Array.from(c.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(
2536
- (f) => !f.hasAttribute("disabled") && f.getAttribute("tabindex") !== "-1"
2537
- ), D = (c) => {
2538
- if (!w.value || c.key !== "Tab") return;
2539
- const d = b(w.value);
2540
- if (d.length === 0) {
2366
+ let b = "", g = null;
2367
+ const _ = L(null), S = (c) => Array.from(c.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter((u) => !u.hasAttribute("disabled") && u.getAttribute("tabindex") !== "-1"), V = (c) => {
2368
+ if (!_.value || c.key !== "Tab") return;
2369
+ const u = S(_.value);
2370
+ if (u.length === 0) {
2541
2371
  c.preventDefault();
2542
2372
  return;
2543
2373
  }
2544
- const f = d[0], x = d[d.length - 1];
2545
- c.shiftKey && document.activeElement === f ? (c.preventDefault(), x.focus()) : !c.shiftKey && document.activeElement === x && (c.preventDefault(), f.focus());
2546
- }, m = (c) => {
2547
- c.key === "Escape" && !e.persistent && p();
2548
- }, s = () => {
2549
- document.body.style.overflow = y, document.removeEventListener("keydown", D), document.removeEventListener("keydown", m), g && (g.focus(), g = null), w.value = null;
2374
+ const h = u[0], m = u[u.length - 1];
2375
+ c.shiftKey && document.activeElement === h ? (c.preventDefault(), m.focus()) : !c.shiftKey && document.activeElement === m && (c.preventDefault(), h.focus());
2376
+ }, d = (c) => {
2377
+ c.key === "Escape" && !e.persistent && f();
2378
+ }, i = () => {
2379
+ document.body.style.overflow = b, document.removeEventListener("keydown", V), document.removeEventListener("keydown", d), g && (g.focus(), g = null), _.value = null;
2550
2380
  };
2551
- return ae(
2552
- () => e.modelValue,
2553
- async (c) => {
2554
- if (c) {
2555
- y = document.body.style.overflow, document.body.style.overflow = "hidden", g = document.activeElement, await we();
2556
- const d = document.getElementById(t.value);
2557
- if (d) {
2558
- w.value = d;
2559
- const f = d.querySelector(".modal-conts");
2560
- f && (f.setAttribute("tabindex", "-1"), f.focus()), document.addEventListener("keydown", D), document.addEventListener("keydown", m);
2561
- }
2562
- } else
2563
- s();
2564
- },
2565
- { immediate: !0 }
2566
- ), Se(() => {
2567
- e.modelValue && s();
2381
+ return re(() => e.modelValue, async (c) => {
2382
+ if (c) {
2383
+ b = document.body.style.overflow, document.body.style.overflow = "hidden", g = document.activeElement, await Ke();
2384
+ const u = document.getElementById(s.value);
2385
+ if (u) {
2386
+ _.value = u;
2387
+ const h = u.querySelector(".modal-conts");
2388
+ h && (h.setAttribute("tabindex", "-1"), h.focus()), document.addEventListener("keydown", V), document.addEventListener("keydown", d);
2389
+ }
2390
+ } else i();
2391
+ }, { immediate: !0 }), fe(() => {
2392
+ e.modelValue && i();
2568
2393
  }), () => {
2569
- if (!n.value) return null;
2394
+ if (!r.value) return null;
2570
2395
  const c = {
2571
- id: t.value,
2396
+ id: s.value,
2572
2397
  class: "krds-modal fade in shown",
2573
2398
  role: "dialog",
2574
2399
  "aria-modal": !0,
2575
- "aria-labelledby": i.value
2400
+ "aria-labelledby": o.value
2576
2401
  };
2577
- return e.full ? c["data-type"] = "full" : e.bottomSheet && (c["data-type"] = "bottom-sheet"), u(
2578
- Le,
2579
- { to: "body" },
2580
- u("section", c, [
2581
- u("div", { class: `modal-dialog ${v.value}` }, [
2582
- u(
2583
- "div",
2584
- { class: "modal-content" },
2585
- [
2586
- // modal title
2587
- o.title ? u("div", { class: "modal-header" }, [u("h2", { id: i.value, class: "modal-title" }, o.title())]) : null,
2588
- // modal contents
2589
- u("div", { class: "modal-conts" }, [u("div", { class: "conts-area" }, o.default?.())]),
2590
- // modal btn
2591
- o.footer ? u("div", { class: "modal-btn btn-wrap" }, o.footer()) : null,
2592
- // close button
2593
- u(
2594
- "button",
2595
- {
2596
- type: "button",
2597
- class: "krds-btn medium icon btn-close close-modal",
2598
- onClick: p
2599
- },
2600
- [u("span", { class: "sr-only" }, "닫기"), u("i", { class: "svg-icon ico-popup-close" })]
2601
- )
2602
- ].filter(Boolean)
2603
- )
2604
- ]),
2605
- u("div", {
2606
- class: e.backdrop ? "modal-back in" : "modal-back",
2607
- onClick: e.persistent ? void 0 : p
2608
- })
2609
- ])
2610
- );
2402
+ return e.full ? c["data-type"] = "full" : e.bottomSheet && (c["data-type"] = "bottom-sheet"), t(ze, { to: "body" }, t("section", c, [t("div", { class: `modal-dialog ${v.value}` }, [t("div", { class: "modal-content" }, [
2403
+ a.title ? t("div", { class: "modal-header" }, [t("h2", {
2404
+ id: o.value,
2405
+ class: "modal-title"
2406
+ }, a.title())]) : null,
2407
+ t("div", { class: "modal-conts" }, [t("div", { class: "conts-area" }, a.default?.())]),
2408
+ a.footer ? t("div", { class: "modal-btn btn-wrap" }, a.footer()) : null,
2409
+ t("button", {
2410
+ type: "button",
2411
+ class: "krds-btn medium icon btn-close close-modal",
2412
+ onClick: f
2413
+ }, [t("span", { class: "sr-only" }, "닫기"), t("i", { class: "svg-icon ico-popup-close" })])
2414
+ ].filter(Boolean))]), t("div", {
2415
+ class: e.backdrop ? "modal-back in" : "modal-back",
2416
+ onClick: e.persistent ? void 0 : f
2417
+ })]));
2611
2418
  };
2612
2419
  }
2613
- }), Cl = _({
2420
+ }), fl = cl, vl = B({
2614
2421
  name: "KrdsAccordionGroup",
2615
2422
  props: {
2616
2423
  typeLine: {
@@ -2622,20 +2429,18 @@ const wt = _({
2622
2429
  default: void 0
2623
2430
  }
2624
2431
  },
2625
- setup(e, { slots: o }) {
2626
- const a = h(() => {
2432
+ setup(e, { slots: a }) {
2433
+ const n = k(() => {
2627
2434
  const l = ["krds-accordion"];
2628
2435
  return e.typeLine && l.push("type-line"), e.class && l.push(e.class), l;
2629
2436
  });
2630
- return () => u(
2631
- "div",
2632
- {
2633
- class: a.value
2634
- },
2635
- o.default?.()
2636
- );
2437
+ return () => t("div", { class: n.value }, a.default?.());
2637
2438
  }
2638
- }), xl = ["id"], $l = { class: "accordion-header" }, _l = ["id", "aria-expanded", "aria-controls"], Bl = ["id", "aria-labelledby"], Kl = { class: "accordion-body" }, Dl = /* @__PURE__ */ _({
2439
+ }), pl = vl, hl = ["id"], ml = { class: "accordion-header" }, yl = [
2440
+ "id",
2441
+ "aria-expanded",
2442
+ "aria-controls"
2443
+ ], gl = ["id", "aria-labelledby"], bl = { class: "accordion-body" }, kl = /* @__PURE__ */ B({
2639
2444
  __name: "KrdsAccordionItem",
2640
2445
  props: {
2641
2446
  id: {},
@@ -2644,152 +2449,698 @@ const wt = _({
2644
2449
  content: {}
2645
2450
  },
2646
2451
  emits: ["toggle"],
2647
- setup(e, { emit: o }) {
2648
- const a = e, l = o, t = h(() => a.openItem === a.id), n = () => {
2649
- l("toggle", a.id);
2452
+ setup(e, { emit: a }) {
2453
+ const n = e, l = a, s = k(() => n.openItem === n.id), r = () => {
2454
+ l("toggle", n.id);
2650
2455
  };
2651
- return (i, v) => (k(), S("div", {
2456
+ return (o, v) => (D(), T("div", {
2652
2457
  id: e.id,
2653
- class: E(["accordion-item", { active: t.value }])
2654
- }, [
2655
- r("h5", $l, [
2656
- r("button", {
2657
- id: `accordion-header-${e.id}`,
2658
- type: "button",
2659
- class: "btn-accordion",
2660
- "aria-expanded": t.value,
2661
- "aria-controls": `accordion-collapse-${e.id}`,
2662
- onClick: v[0] || (v[0] = (p) => n())
2663
- }, [
2664
- G(i.$slots, "title", {}, () => [
2665
- P(V(e.title), 1)
2666
- ])
2667
- ], 8, _l)
2668
- ]),
2669
- r("div", {
2670
- id: `accordion-collapse-${e.id}`,
2671
- class: "accordion-collapse collapse",
2672
- "aria-labelledby": `accordion-header-${e.id}`
2673
- }, [
2674
- r("div", Kl, [
2675
- G(i.$slots, "content", {}, () => [
2676
- P(V(e.content), 1)
2677
- ])
2678
- ])
2679
- ], 8, Bl)
2680
- ], 10, xl));
2458
+ class: R(["accordion-item", { active: s.value }])
2459
+ }, [p("h5", ml, [p("button", {
2460
+ id: `accordion-header-${e.id}`,
2461
+ type: "button",
2462
+ class: "btn-accordion",
2463
+ "aria-expanded": s.value,
2464
+ "aria-controls": `accordion-collapse-${e.id}`,
2465
+ onClick: v[0] || (v[0] = (f) => r())
2466
+ }, [J(o.$slots, "title", {}, () => [N(M(e.title), 1)])], 8, yl)]), p("div", {
2467
+ id: `accordion-collapse-${e.id}`,
2468
+ class: "accordion-collapse collapse",
2469
+ "aria-labelledby": `accordion-header-${e.id}`
2470
+ }, [p("div", bl, [J(o.$slots, "content", {}, () => [N(M(e.content), 1)])])], 8, gl)], 10, hl));
2471
+ }
2472
+ }), Sl = kl, Kl = Sl, wl = B({
2473
+ name: "KrdsTts",
2474
+ props: {
2475
+ text: {
2476
+ type: String,
2477
+ required: !0
2478
+ },
2479
+ label: {
2480
+ type: String,
2481
+ default: void 0
2482
+ },
2483
+ size: {
2484
+ type: String,
2485
+ default: "medium"
2486
+ },
2487
+ icon: {
2488
+ type: String,
2489
+ default: "volume"
2490
+ },
2491
+ disabled: {
2492
+ type: Boolean,
2493
+ default: !1
2494
+ },
2495
+ class: {
2496
+ type: String,
2497
+ default: void 0
2498
+ }
2499
+ },
2500
+ emits: [
2501
+ "play",
2502
+ "pause",
2503
+ "end",
2504
+ "error"
2505
+ ],
2506
+ setup(e, { emit: a }) {
2507
+ const n = L(!1);
2508
+ let l = null;
2509
+ const s = () => {
2510
+ typeof window < "u" && window.speechSynthesis && window.speechSynthesis.cancel(), n.value = !1, l = null;
2511
+ }, r = () => {
2512
+ if (!e.disabled) {
2513
+ if (n.value) {
2514
+ s(), a("pause");
2515
+ return;
2516
+ }
2517
+ if (typeof window > "u" || !window.speechSynthesis) {
2518
+ a("error", /* @__PURE__ */ new Error("SpeechSynthesis API is not supported"));
2519
+ return;
2520
+ }
2521
+ window.speechSynthesis.cancel(), l = new SpeechSynthesisUtterance(e.text), l.lang = "ko-KR", l.onstart = () => {
2522
+ n.value = !0;
2523
+ }, l.onend = () => {
2524
+ n.value = !1, l = null, a("end");
2525
+ }, l.onerror = (f) => {
2526
+ n.value = !1, l = null, f.error !== "canceled" && a("error", new Error(f.error));
2527
+ }, window.speechSynthesis.speak(l), a("play", e.text);
2528
+ }
2529
+ }, o = k(() => {
2530
+ const f = ["krds-tts"];
2531
+ return e.size && f.push(e.size), n.value ? f.push("pause") : e.icon === "play" && f.push("play"), e.class && f.push(e.class), f;
2532
+ }), v = k(() => n.value ? "ico-stop" : e.icon === "play" ? "ico-play" : "ico-volume");
2533
+ return fe(() => {
2534
+ s();
2535
+ }), () => {
2536
+ const f = [t("span", {
2537
+ class: "krds-tts-icon",
2538
+ "aria-hidden": "true"
2539
+ }, [t("i", { class: `svg-icon ${v.value}` })])];
2540
+ return e.label && f.push(t("span", { class: "krds-tts-text" }, e.label)), t("button", {
2541
+ type: "button",
2542
+ class: o.value,
2543
+ disabled: e.disabled || void 0,
2544
+ onClick: r
2545
+ }, f);
2546
+ };
2547
+ }
2548
+ }), _l = wl, Cl = B({
2549
+ name: "KrdsTable",
2550
+ props: {
2551
+ caption: {
2552
+ type: String,
2553
+ default: void 0
2554
+ },
2555
+ columns: {
2556
+ type: Array,
2557
+ required: !0
2558
+ },
2559
+ rows: {
2560
+ type: Array,
2561
+ required: !0
2562
+ },
2563
+ class: {
2564
+ type: String,
2565
+ default: void 0
2566
+ }
2567
+ },
2568
+ emits: ["row-click"],
2569
+ slots: Object,
2570
+ setup(e, { emit: a, slots: n }) {
2571
+ const l = k(() => {
2572
+ const d = ["tbl"];
2573
+ return e.class && d.push(e.class), d;
2574
+ }), s = k(() => ["krds-table-wrap"]), r = (d) => d.headerStyle || void 0, o = (d) => {
2575
+ const i = [];
2576
+ return d.align && i.push(`text-${d.align}`), d.headerClasses && i.push(d.headerClasses), i.length > 0 ? i : void 0;
2577
+ }, v = (d, i) => {
2578
+ if (i.style)
2579
+ return typeof i.style == "function" ? i.style(d) : i.style;
2580
+ }, f = (d, i) => {
2581
+ const c = [];
2582
+ if (i.align && c.push(`text-${i.align}`), i.classes) {
2583
+ const u = typeof i.classes == "function" ? i.classes(d) : i.classes;
2584
+ c.push(u);
2585
+ }
2586
+ return c.length > 0 ? c : void 0;
2587
+ }, b = () => !e.columns.length || !e.columns.some((d) => d.headerStyle && d.headerStyle.includes("width")) ? null : t("colgroup", e.columns.map((d) => {
2588
+ if (!d.headerStyle) return t("col");
2589
+ const i = d.headerStyle.match(/width\s*:\s*([^;]+)/i);
2590
+ return t("col", { style: i ? { width: i[1].trim() } : void 0 });
2591
+ })), g = () => e.columns.length ? t("thead", [t("tr", e.columns.map((d) => {
2592
+ const i = r(d);
2593
+ return t("th", {
2594
+ scope: "col",
2595
+ class: o(d),
2596
+ style: i
2597
+ }, d.label);
2598
+ }))]) : null, _ = (d, i) => typeof i.field == "function" ? i.field(d) : d[i.field], S = () => e.rows.length ? t("tbody", e.rows.map((d, i) => t("tr", { onClick: () => V(d, i) }, e.columns.map((c, u) => {
2599
+ const h = _(d, c), m = typeof h == "function" ? h() : h, w = v(d, c), C = f(d, c);
2600
+ return t(u === 0 ? "th" : "td", {
2601
+ scope: u === 0 ? "row" : void 0,
2602
+ class: C,
2603
+ style: w
2604
+ }, m);
2605
+ })))) : t("tbody", [t("tr", [t("td", {
2606
+ colspan: e.columns.length || 1,
2607
+ class: "text-center"
2608
+ }, n["no-data"] ? n["no-data"]() : "데이터가 없습니다.")])]), V = (d, i) => {
2609
+ a("row-click", d, i);
2610
+ };
2611
+ return () => t("div", { class: s.value }, [t("table", { class: l.value }, [
2612
+ e.caption && t("caption", e.caption),
2613
+ b(),
2614
+ g(),
2615
+ S()
2616
+ ])]);
2617
+ }
2618
+ }), $l = Cl, xl = B({
2619
+ name: "KrdsHeader",
2620
+ props: {
2621
+ id: {
2622
+ type: String,
2623
+ default: "krds-header"
2624
+ },
2625
+ mobileNavId: {
2626
+ type: String,
2627
+ default: "mobile-nav"
2628
+ },
2629
+ class: {
2630
+ type: String,
2631
+ default: void 0
2632
+ }
2633
+ },
2634
+ slots: Object,
2635
+ setup(e, { slots: a }) {
2636
+ const n = k(() => {
2637
+ const l = [];
2638
+ return e.class && l.push(e.class), l;
2639
+ });
2640
+ return () => {
2641
+ const l = [];
2642
+ if (a.utility || a.branding) {
2643
+ const r = [];
2644
+ a.utility && r.push(t("div", { class: "header-utility" }, a.utility())), a.branding && r.push(t("div", { class: "header-branding" }, a.branding())), l.push(t("div", { class: "header-container" }, [t("div", { class: "inner" }, r)]));
2645
+ }
2646
+ a.navigation && l.push(t("nav", { class: "krds-main-menu" }, [t("div", { class: "inner" }, a.navigation())]));
2647
+ const s = [t("div", { class: "header-in" }, l)];
2648
+ return a.mobileNavigation && s.push(t("div", {
2649
+ id: e.mobileNavId,
2650
+ class: "krds-main-menu-mobile"
2651
+ }, a.mobileNavigation())), t("header", {
2652
+ id: e.id,
2653
+ class: n.value
2654
+ }, s);
2655
+ };
2656
+ }
2657
+ }), Bl = xl, Ll = B({
2658
+ name: "KrdsFooter",
2659
+ props: {
2660
+ id: {
2661
+ type: String,
2662
+ default: "krds-footer"
2663
+ },
2664
+ class: {
2665
+ type: String,
2666
+ default: void 0
2667
+ }
2668
+ },
2669
+ setup(e, { slots: a }) {
2670
+ const n = k(() => {
2671
+ const v = [];
2672
+ return e.class && v.push(e.class), v;
2673
+ }), l = () => a.top ? t("div", { class: "foot-quick" }, [t("div", { class: "inner" }, a.top())]) : null, s = () => a.logo ? t("div", { class: "f-logo" }, a.logo()) : null, r = () => a.content ? t("div", { class: "f-cnt" }, a.content()) : null, o = () => a.bottom ? t("div", { class: "f-btm" }, a.bottom()) : null;
2674
+ return () => {
2675
+ const v = l(), f = s(), b = r(), g = o(), _ = [];
2676
+ f && _.push(f), b && _.push(b), g && _.push(g);
2677
+ const S = [];
2678
+ return v && S.push(v), _.length > 0 && S.push(t("div", { class: "inner" }, _)), t("footer", {
2679
+ id: e.id,
2680
+ class: n.value
2681
+ }, S);
2682
+ };
2683
+ }
2684
+ }), Dl = Ll, Tl = B({
2685
+ name: "KrdsDisclosure",
2686
+ props: {
2687
+ title: {
2688
+ type: String,
2689
+ required: !0
2690
+ },
2691
+ modelValue: {
2692
+ type: Boolean,
2693
+ default: !1
2694
+ }
2695
+ },
2696
+ emits: ["update:modelValue"],
2697
+ setup(e, { emit: a, slots: n }) {
2698
+ const l = `disclosure-${ae()}`, s = k(() => e.modelValue), r = () => {
2699
+ a("update:modelValue", !e.modelValue);
2700
+ };
2701
+ return () => t("div", { class: [
2702
+ "krds-disclosure",
2703
+ "conts-expand-area",
2704
+ s.value && "active"
2705
+ ] }, [t("button", {
2706
+ type: "button",
2707
+ class: "btn-conts-expand",
2708
+ onClick: r,
2709
+ "aria-expanded": s.value,
2710
+ "aria-controls": l
2711
+ }, e.title), t("div", {
2712
+ id: l,
2713
+ class: "expand-wrap",
2714
+ inert: !s.value
2715
+ }, [t("div", { class: "expand-in" }, n.default?.())])]);
2716
+ }
2717
+ }), Vl = Tl, zl = B({
2718
+ name: "KrdsIdentifier",
2719
+ props: {
2720
+ class: {
2721
+ type: String,
2722
+ default: void 0
2723
+ },
2724
+ logoLabel: {
2725
+ type: String,
2726
+ default: "KRDS - Korea Design System"
2727
+ }
2728
+ },
2729
+ emits: ["click"],
2730
+ setup(e, { emit: a, slots: n }) {
2731
+ const l = k(() => {
2732
+ const r = ["krds-identifier"];
2733
+ return e.class && r.push(e.class), r;
2734
+ }), s = (r) => {
2735
+ a("click", r);
2736
+ };
2737
+ return () => t("div", {
2738
+ class: l.value,
2739
+ onClick: s
2740
+ }, [t("span", { class: "logo" }, [t("span", { class: "sr-only" }, e.logoLabel)]), t("span", { class: "ban-txt" }, n.default?.())]);
2681
2741
  }
2682
- }), ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2683
- __proto__: null,
2684
- KrdsAccordionGroup: Cl,
2685
- KrdsAccordionItem: Dl,
2686
- KrdsBadge: yt,
2687
- KrdsBreadcrumb: Et,
2688
- KrdsButton: Ce,
2689
- KrdsButtonGroup: Me,
2690
- KrdsCheckArea: Ct,
2691
- KrdsCheckbox: xt,
2692
- KrdsCoachMark: al,
2693
- KrdsContextualHelp: Xt,
2694
- KrdsDateInput: vt,
2695
- KrdsFileUpload: ht,
2696
- KrdsFormGroup: Oe,
2697
- KrdsFormHint: Fe,
2698
- KrdsFormLabel: Pe,
2699
- KrdsIcon: Re,
2700
- KrdsInPageNavigation: Lt,
2701
- KrdsInput: Ae,
2702
- KrdsLanguageSwitcher: hl,
2703
- KrdsLink: Te,
2704
- KrdsMasthead: kt,
2705
- KrdsModal: wl,
2706
- KrdsPagination: Ft,
2707
- KrdsPanel: Ht,
2708
- KrdsRadio: $t,
2709
- KrdsResize: Sl,
2710
- KrdsSelect: mt,
2711
- KrdsSkipLink: Kt,
2712
- KrdsSpinner: xe,
2713
- KrdsStep: Bt,
2714
- KrdsStepIndicator: _t,
2715
- KrdsTag: gt,
2716
- KrdsTagGroup: bt,
2717
- KrdsTextarea: pt,
2718
- KrdsToggleSwitch: wt,
2719
- KrdsTooltip: il
2720
- }, Symbol.toStringTag, { value: "Module" })), fe = {
2721
- mounted(e, o) {
2722
- o.value !== !1 && e.classList.add("sr-only");
2742
+ }), Il = zl, El = 50, Fl = B({
2743
+ name: "KrdsLayout",
2744
+ props: {
2745
+ id: {
2746
+ type: String,
2747
+ default: "wrap"
2748
+ },
2749
+ class: {
2750
+ type: String,
2751
+ default: void 0
2752
+ },
2753
+ enableScrollDetection: {
2754
+ type: Boolean,
2755
+ default: !0
2756
+ }
2723
2757
  },
2724
- updated(e, o) {
2725
- o.value === !1 ? e.classList.remove("sr-only") : e.classList.add("sr-only");
2758
+ emits: {
2759
+ resize: (e) => !0,
2760
+ scroll: (e) => !0,
2761
+ "scroll-height": (e) => !0
2762
+ },
2763
+ setup(e, { slots: a, emit: n }) {
2764
+ const l = L(0), s = L(0), r = L(0), o = L(null), v = L(null), f = L(null), b = () => {
2765
+ const d = s.value;
2766
+ l.value = window.scrollY, s.value = document.body.scrollHeight, d !== s.value && d > 0 && n("scroll-height", s.value);
2767
+ }, g = () => {
2768
+ if (!v.value || !e.enableScrollDetection) return;
2769
+ const d = document.querySelector("#container");
2770
+ if (!d) return;
2771
+ const i = d.offsetTop, c = window.scrollY, u = c > r.value, h = c < r.value;
2772
+ c > i + El ? u ? (v.value.classList.add("scroll-down"), v.value.classList.remove("scroll-up"), o.value = "down") : h && (v.value.classList.add("scroll-up"), v.value.classList.remove("scroll-down"), o.value = "up") : (v.value.classList.remove("scroll-down", "scroll-up"), o.value = null), r.value = c;
2773
+ }, _ = () => {
2774
+ b(), g(), n("scroll", {
2775
+ scrollY: l.value,
2776
+ scrollHeight: s.value,
2777
+ direction: o.value,
2778
+ timestamp: Date.now()
2779
+ });
2780
+ }, S = (d) => {
2781
+ for (const i of d) {
2782
+ const { width: c, height: u } = i.contentRect;
2783
+ n("resize", {
2784
+ width: c,
2785
+ height: u
2786
+ });
2787
+ }
2788
+ }, V = k(() => {
2789
+ const d = ["g-wrap"];
2790
+ return e.class && d.push(e.class), d;
2791
+ });
2792
+ return te(() => {
2793
+ e.enableScrollDetection && (b(), window.addEventListener("scroll", _, { passive: !0 })), v.value && typeof ResizeObserver < "u" && (f.value = new ResizeObserver(S), f.value.observe(v.value));
2794
+ }), Z(() => {
2795
+ e.enableScrollDetection && window.removeEventListener("scroll", _), f.value && (f.value.disconnect(), f.value = null);
2796
+ }), () => t("div", {
2797
+ id: e.id,
2798
+ class: V.value,
2799
+ ref: v
2800
+ }, a.default?.());
2801
+ }
2802
+ }), Ml = Fl, Al = B({
2803
+ name: "KrdsSideNavigation",
2804
+ props: {
2805
+ title: {
2806
+ type: String,
2807
+ required: !0
2808
+ },
2809
+ modelValue: {
2810
+ type: Array,
2811
+ default: () => []
2812
+ }
2813
+ },
2814
+ emits: ["update:modelValue"],
2815
+ setup(e, { emit: a }) {
2816
+ const n = k(() => e.modelValue || []), l = L(/* @__PURE__ */ new Map()), s = L(/* @__PURE__ */ new Map()), r = L(/* @__PURE__ */ new Map()), o = L(null), v = (m, w, C) => {
2817
+ const x = `${w}-${C}`;
2818
+ m ? l.value.set(x, m) : l.value.delete(x);
2819
+ }, f = (m, w, C) => {
2820
+ const x = `${w}-${C}`;
2821
+ m ? s.value.set(x, m) : s.value.delete(x);
2822
+ }, b = (m, w, C) => {
2823
+ const x = `${w}-${C}`;
2824
+ m ? r.value.set(x, m) : r.value.delete(x);
2825
+ }, g = (m) => {
2826
+ a("update:modelValue", n.value.map((w, C) => {
2827
+ if (C === m && w.subItems) {
2828
+ const x = w.expanded, $ = {
2829
+ ...w,
2830
+ expanded: !w.expanded
2831
+ };
2832
+ return x && !$.expanded && ($.subItems = w.subItems.map((y) => ({
2833
+ ...y,
2834
+ expanded: !1
2835
+ })), o.value = null), $;
2836
+ }
2837
+ return w;
2838
+ }));
2839
+ }, _ = (m, w) => {
2840
+ a("update:modelValue", n.value.map((C, x) => x === m && C.subItems ? {
2841
+ ...C,
2842
+ subItems: C.subItems.map(($, y) => {
2843
+ if (y === w && $.subItems) {
2844
+ const K = {
2845
+ ...$,
2846
+ expanded: !$.expanded
2847
+ };
2848
+ if (K.expanded) {
2849
+ const F = `${m}-${w}`;
2850
+ o.value = l.value.get(F) || null;
2851
+ const P = s.value.get(F), A = r.value.get(F);
2852
+ P && A && P.addEventListener("transitionend", () => {
2853
+ A.focus();
2854
+ }, { once: !0 });
2855
+ }
2856
+ return K;
2857
+ }
2858
+ return $;
2859
+ })
2860
+ } : C));
2861
+ }, S = (m, w) => {
2862
+ a("update:modelValue", n.value.map((C, x) => x === m && C.subItems ? {
2863
+ ...C,
2864
+ subItems: C.subItems.map(($, y) => {
2865
+ if (y === w && $.subItems && $.expanded) {
2866
+ if (o.value) {
2867
+ const K = o.value;
2868
+ requestAnimationFrame(() => {
2869
+ K.focus();
2870
+ }), o.value = null;
2871
+ }
2872
+ return {
2873
+ ...$,
2874
+ expanded: !1
2875
+ };
2876
+ }
2877
+ return $;
2878
+ })
2879
+ } : C));
2880
+ }, V = (m, w, C) => {
2881
+ const x = `${w}-${C}`, $ = s.value.get(x);
2882
+ $ && !$.contains(m.relatedTarget) && S(w, C);
2883
+ }, d = (m, w) => {
2884
+ S(m, w);
2885
+ }, i = (m, w) => {
2886
+ m.onClick && m.onClick(w);
2887
+ }, c = (m, w, C) => m.map((x, $) => t("li", {
2888
+ key: `popup-item-${w}-${C}-${$}`,
2889
+ role: "none"
2890
+ }, t("a", {
2891
+ href: x.href || "#",
2892
+ class: "lnb-btn",
2893
+ role: "menuitem",
2894
+ onClick: (y) => i(x, y)
2895
+ }, x.text))), u = (m, w) => m.map((C, x) => t("li", {
2896
+ key: `lnb-subitem-${w}-${x}`,
2897
+ class: ["lnb-subitem", { active: C.expanded }],
2898
+ role: "none"
2899
+ }, [C.subItems ? [t("button", {
2900
+ ref: ($) => v($, w, x),
2901
+ type: "button",
2902
+ class: "lnb-btn lnb-toggle-popup",
2903
+ role: "menuitem",
2904
+ "aria-controls": `lnbmenu-${w}-${x}`,
2905
+ "aria-expanded": C.expanded ? "true" : "false",
2906
+ "aria-haspopup": "true",
2907
+ onClick: () => _(w, x)
2908
+ }, C.text), t("div", {
2909
+ ref: ($) => f($, w, x),
2910
+ id: `lnbmenu-${w}-${x}`,
2911
+ class: ["lnb-submenu-lv2", { active: C.expanded }],
2912
+ role: "menu",
2913
+ onFocusout: ($) => V($, w, x)
2914
+ }, [t("button", {
2915
+ ref: ($) => b($, w, x),
2916
+ type: "button",
2917
+ class: "lnb-btn-tit",
2918
+ onClick: () => d(w, x)
2919
+ }, C.popupTitle || C.text), t("ul", {}, c(C.subItems || [], w, x))])] : t("a", {
2920
+ href: C.href || "#",
2921
+ class: ["lnb-btn", "lnb-link"],
2922
+ role: "menuitem",
2923
+ onClick: ($) => i(C, $)
2924
+ }, C.text)])), h = () => n.value.map((m, w) => t("li", {
2925
+ key: `lnb-item-${w}`,
2926
+ class: ["lnb-item", { active: m.expanded }],
2927
+ role: "none"
2928
+ }, [t("button", {
2929
+ type: "button",
2930
+ class: [
2931
+ "lnb-btn",
2932
+ "lnb-toggle",
2933
+ { active: m.expanded }
2934
+ ],
2935
+ role: "menuitem",
2936
+ "aria-controls": `lnbmenu-${w}`,
2937
+ "aria-expanded": m.expanded ? "true" : "false",
2938
+ onClick: () => g(w)
2939
+ }, m.text), m.subItems ? t("div", { class: "lnb-submenu" }, [t("ul", {
2940
+ id: `lnbmenu-${w}`,
2941
+ role: "menu"
2942
+ }, u(m.subItems, w))]) : null]));
2943
+ return () => t("nav", { class: "krds-side-navigation" }, [t("h2", { class: "lnb-tit" }, e.title), t("ul", {
2944
+ class: "lnb-list",
2945
+ role: "menubar"
2946
+ }, h())]);
2947
+ }
2948
+ }), Rl = Al, Pl = B({
2949
+ name: "KrdsStructuredList",
2950
+ props: { full: {
2951
+ type: Boolean,
2952
+ default: !0
2953
+ } },
2954
+ slots: Object,
2955
+ setup(e, { slots: a }) {
2956
+ return () => {
2957
+ const n = a.cardTop?.(), l = a.cardBody?.(), s = a.cardBtm?.(), r = a.cardBtn?.(), o = t("li", { class: "structured-item" }, [t("div", { class: "in" }, [
2958
+ n && t("div", { class: "card-top" }, n),
2959
+ l && t("div", { class: "card-body" }, l),
2960
+ s && t("div", { class: "card-btm" }, s),
2961
+ r && t("div", { class: "card-btn" }, r)
2962
+ ].filter(Boolean))]);
2963
+ return t("ul", { class: ["krds-structured-list", e.full ? "type-full" : ""] }, [o]);
2964
+ };
2965
+ }
2966
+ }), Hl = Pl, ql = B({
2967
+ name: "KrdsTextList",
2968
+ props: {
2969
+ type: {
2970
+ type: String,
2971
+ default: "ul"
2972
+ },
2973
+ variant: {
2974
+ type: String,
2975
+ default: "dash"
2976
+ }
2977
+ },
2978
+ setup(e, { slots: a }) {
2979
+ return () => t(e.type, { class: ["krds-info-list", e.variant] }, a.default?.());
2980
+ }
2981
+ }), Ol = ql, Nl = B({
2982
+ name: "KrdsCriticalAlerts",
2983
+ props: {
2984
+ type: {
2985
+ type: String,
2986
+ default: "info"
2987
+ },
2988
+ message: {
2989
+ type: String,
2990
+ required: !0
2991
+ },
2992
+ linkHref: {
2993
+ type: String,
2994
+ default: void 0
2995
+ },
2996
+ linkText: {
2997
+ type: String,
2998
+ default: "자세히 보기"
2999
+ }
3000
+ },
3001
+ emits: ["link-click"],
3002
+ setup(e, { emit: a }) {
3003
+ const n = (s) => ({
3004
+ danger: "긴급",
3005
+ ok: "안전",
3006
+ info: "안내"
3007
+ })[s], l = (s) => {
3008
+ a("link-click", s);
3009
+ };
3010
+ return () => t("ul", { class: "krds-critical-alerts" }, [t("li", [t("div", { class: "critical-ban" }, [
3011
+ t("span", { class: ["critical-badge", e.type] }, n(e.type)),
3012
+ t("p", { class: "critical-txt" }, e.message),
3013
+ e.linkHref && t("a", {
3014
+ href: e.linkHref,
3015
+ class: "krds-btn medium link basic",
3016
+ onClick: l
3017
+ }, [t("span", { class: "m-hide" }, e.linkText), t("i", { class: "svg-icon ico-angle right" })])
3018
+ ])])]);
3019
+ }
3020
+ }), jl = Nl, ke = /* @__PURE__ */ we({
3021
+ KrdsAccordionGroup: () => pl,
3022
+ KrdsAccordionItem: () => Kl,
3023
+ KrdsBadge: () => Vt,
3024
+ KrdsBreadcrumb: () => ia,
3025
+ KrdsButton: () => Ae,
3026
+ KrdsButtonGroup: () => Re,
3027
+ KrdsCheckArea: () => Ot,
3028
+ KrdsCheckbox: () => jt,
3029
+ KrdsCoachMark: () => Pa,
3030
+ KrdsContextualHelp: () => Ta,
3031
+ KrdsCriticalAlerts: () => jl,
3032
+ KrdsDateInput: () => wt,
3033
+ KrdsDisclosure: () => Vl,
3034
+ KrdsFileUpload: () => Dt,
3035
+ KrdsFooter: () => Dl,
3036
+ KrdsFormGroup: () => Ue,
3037
+ KrdsFormHint: () => Ge,
3038
+ KrdsFormLabel: () => je,
3039
+ KrdsHeader: () => Bl,
3040
+ KrdsIcon: () => Pe,
3041
+ KrdsIdentifier: () => Il,
3042
+ KrdsInPageNavigation: () => da,
3043
+ KrdsInput: () => Oe,
3044
+ KrdsLanguageSwitcher: () => ll,
3045
+ KrdsLayout: () => Ml,
3046
+ KrdsLink: () => He,
3047
+ KrdsMasthead: () => At,
3048
+ KrdsModal: () => fl,
3049
+ KrdsPagination: () => ya,
3050
+ KrdsPanel: () => wa,
3051
+ KrdsRadio: () => Gt,
3052
+ KrdsResize: () => ul,
3053
+ KrdsSelect: () => xt,
3054
+ KrdsSideNavigation: () => Rl,
3055
+ KrdsSkipLink: () => ea,
3056
+ KrdsSpinner: () => Yt,
3057
+ KrdsStep: () => Qt,
3058
+ KrdsStepIndicator: () => Xt,
3059
+ KrdsStructuredList: () => Hl,
3060
+ KrdsTable: () => $l,
3061
+ KrdsTag: () => It,
3062
+ KrdsTagGroup: () => Ft,
3063
+ KrdsTextList: () => Ol,
3064
+ KrdsTextarea: () => Ct,
3065
+ KrdsToggleSwitch: () => Ht,
3066
+ KrdsTooltip: () => Wa,
3067
+ KrdsTts: () => _l
3068
+ }), pe = {
3069
+ mounted(e, a) {
3070
+ a.value !== !1 && e.classList.add("sr-only");
3071
+ },
3072
+ updated(e, a) {
3073
+ a.value === !1 ? e.classList.remove("sr-only") : e.classList.add("sr-only");
2726
3074
  },
2727
3075
  unmounted(e) {
2728
3076
  e.classList.remove("sr-only");
2729
3077
  }
2730
- }, be = {
2731
- "sr-only": fe
2732
- }, $e = (e) => {
2733
- e.directive("sr-only", fe);
2734
- }, ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2735
- __proto__: null,
2736
- default: be,
2737
- directives: be,
2738
- installDirectives: $e,
2739
- vSrOnly: fe
2740
- }, Symbol.toStringTag, { value: "Module" })), zl = {
2741
- install(e, o = {}) {
2742
- e.provide("krds:config", o);
2743
- const a = o.components || Object.keys(ge);
2744
- a.forEach((l) => {
2745
- const t = ge[l];
2746
- t && e.component(l, t);
2747
- }), typeof ke == "object" && ke !== null && $e(e), e.config.globalProperties.$krds = {
2748
- version: "__VERSION__"
2749
- }, process.env.NODE_ENV !== "production" && console.log(`[KRDS Vue] v__VERSION__ 설치 완료 - 컴포넌트: ${a.length}개`);
2750
- }
2751
- }, El = "__VERSION__";
3078
+ }, oe = /* @__PURE__ */ we({
3079
+ default: () => Se,
3080
+ directives: () => Se,
3081
+ installDirectives: () => $e,
3082
+ vSrOnly: () => pe
3083
+ }), Se = { "sr-only": pe }, $e = (e) => {
3084
+ e.directive("sr-only", pe);
3085
+ }, xe = "0.0.14", Ul = { install(e, a = {}) {
3086
+ e.provide("krds:config", a), (a.components || Object.keys(ke)).forEach((n) => {
3087
+ const l = ke[n];
3088
+ l && e.component(n, l);
3089
+ }), typeof oe == "object" && oe !== null && "installDirectives" in oe && $e(e), e.config.globalProperties.$krds = { version: xe };
3090
+ } }, Xl = xe;
2752
3091
  export {
2753
- Cl as KrdsAccordionGroup,
2754
- Dl as KrdsAccordionItem,
2755
- yt as KrdsBadge,
2756
- Et as KrdsBreadcrumb,
2757
- Ce as KrdsButton,
2758
- Me as KrdsButtonGroup,
2759
- Ct as KrdsCheckArea,
2760
- xt as KrdsCheckbox,
2761
- al as KrdsCoachMark,
2762
- Xt as KrdsContextualHelp,
2763
- vt as KrdsDateInput,
2764
- ht as KrdsFileUpload,
2765
- Oe as KrdsFormGroup,
2766
- Fe as KrdsFormHint,
2767
- Pe as KrdsFormLabel,
2768
- Re as KrdsIcon,
2769
- Lt as KrdsInPageNavigation,
2770
- Ae as KrdsInput,
2771
- hl as KrdsLanguageSwitcher,
2772
- Te as KrdsLink,
2773
- kt as KrdsMasthead,
2774
- wl as KrdsModal,
2775
- Ft as KrdsPagination,
2776
- Ht as KrdsPanel,
2777
- $t as KrdsRadio,
2778
- Sl as KrdsResize,
2779
- mt as KrdsSelect,
2780
- Kt as KrdsSkipLink,
2781
- xe as KrdsSpinner,
2782
- Bt as KrdsStep,
2783
- _t as KrdsStepIndicator,
2784
- gt as KrdsTag,
2785
- bt as KrdsTagGroup,
2786
- pt as KrdsTextarea,
2787
- wt as KrdsToggleSwitch,
2788
- il as KrdsTooltip,
2789
- ue as classNames,
2790
- zl as default,
2791
- ce as generateId,
2792
- Il as generateUid,
2793
- El as version
3092
+ pl as KrdsAccordionGroup,
3093
+ Kl as KrdsAccordionItem,
3094
+ Vt as KrdsBadge,
3095
+ ia as KrdsBreadcrumb,
3096
+ Ae as KrdsButton,
3097
+ Re as KrdsButtonGroup,
3098
+ Ot as KrdsCheckArea,
3099
+ jt as KrdsCheckbox,
3100
+ Pa as KrdsCoachMark,
3101
+ Ta as KrdsContextualHelp,
3102
+ jl as KrdsCriticalAlerts,
3103
+ wt as KrdsDateInput,
3104
+ Vl as KrdsDisclosure,
3105
+ Dt as KrdsFileUpload,
3106
+ Dl as KrdsFooter,
3107
+ Ue as KrdsFormGroup,
3108
+ Ge as KrdsFormHint,
3109
+ je as KrdsFormLabel,
3110
+ Bl as KrdsHeader,
3111
+ Pe as KrdsIcon,
3112
+ Il as KrdsIdentifier,
3113
+ da as KrdsInPageNavigation,
3114
+ Oe as KrdsInput,
3115
+ ll as KrdsLanguageSwitcher,
3116
+ Ml as KrdsLayout,
3117
+ He as KrdsLink,
3118
+ At as KrdsMasthead,
3119
+ fl as KrdsModal,
3120
+ ya as KrdsPagination,
3121
+ wa as KrdsPanel,
3122
+ Gt as KrdsRadio,
3123
+ ul as KrdsResize,
3124
+ xt as KrdsSelect,
3125
+ Rl as KrdsSideNavigation,
3126
+ ea as KrdsSkipLink,
3127
+ Yt as KrdsSpinner,
3128
+ Qt as KrdsStep,
3129
+ Xt as KrdsStepIndicator,
3130
+ Hl as KrdsStructuredList,
3131
+ $l as KrdsTable,
3132
+ It as KrdsTag,
3133
+ Ft as KrdsTagGroup,
3134
+ Ol as KrdsTextList,
3135
+ Ct as KrdsTextarea,
3136
+ Ht as KrdsToggleSwitch,
3137
+ Wa as KrdsTooltip,
3138
+ _l as KrdsTts,
3139
+ ve as classNames,
3140
+ Ul as default,
3141
+ Gl as generateId,
3142
+ Yl as generateUid,
3143
+ Xl as version
2794
3144
  };
2795
- //# sourceMappingURL=krds-vue.es.js.map
3145
+
3146
+ //# sourceMappingURL=krds-vue.es.js.map