@krds.ui/vue 0.0.4 → 0.0.5

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,4 +1,4 @@
1
- import { defineComponent as C, computed as g, h as r, ref as M, onMounted as re, onBeforeUnmount as _e, createElementBlock as B, openBlock as w, createElementVNode as h, normalizeClass as L, withDirectives as Y, unref as I, toDisplayString as N, Fragment as E, renderList as F, vShow as G, createBlock as W, withCtx as U, createTextVNode as R, watch as Be, provide as De, inject as Ke, createCommentVNode as J, onUnmounted as ae, resolveDirective as xe, resolveDynamicComponent as le } from "vue";
1
+ import { defineComponent as C, computed as g, h as r, ref as M, onMounted as re, onBeforeUnmount as _e, createElementBlock as D, openBlock as w, createElementVNode as h, normalizeClass as L, withDirectives as Y, unref as I, toDisplayString as N, Fragment as E, renderList as F, vShow as G, createBlock as W, withCtx as U, createTextVNode as R, watch as De, provide as Be, inject as Ke, createCommentVNode as J, onUnmounted as ae, resolveDirective as xe, resolveDynamicComponent as ne } from "vue";
2
2
  const oe = C({
3
3
  name: "KrdsButton",
4
4
  props: {
@@ -37,7 +37,7 @@ const oe = C({
37
37
  },
38
38
  emits: ["click"],
39
39
  setup(e, { emit: i, slots: s }) {
40
- const n = g(() => {
40
+ const l = g(() => {
41
41
  const t = ["krds-btn"];
42
42
  return e.icon && t.push("icon"), e.border && t.push("border"), e.pure && t.push("pure"), e.variant && !e.icon && t.push(e.variant), e.size && t.push(e.size), e.class && t.push(e.class), t;
43
43
  }), o = (t) => {
@@ -47,7 +47,7 @@ const oe = C({
47
47
  "button",
48
48
  {
49
49
  type: e.type,
50
- class: n.value,
50
+ class: l.value,
51
51
  disabled: e.disabled,
52
52
  onClick: o
53
53
  },
@@ -121,13 +121,13 @@ const oe = C({
121
121
  },
122
122
  emits: ["click"],
123
123
  setup(e, { emit: i, slots: s }) {
124
- const n = g(() => {
124
+ const l = g(() => {
125
125
  const a = ["krds-btn"];
126
126
  return e.size && a.push(e.size), e.link && a.push("link"), e.basic && a.push("basic"), e.pure && a.push("pure"), e.class && a.push(e.class), a;
127
127
  }), o = g(() => {
128
128
  const a = {
129
129
  href: e.href,
130
- class: n.value
130
+ class: l.value
131
131
  };
132
132
  return e.target && (a.target = e.target), e.title && (a.title = e.title), e.target === "_blank" && (a.rel = "noopener noreferrer"), a;
133
133
  }), t = (a) => {
@@ -244,7 +244,7 @@ const oe = C({
244
244
  },
245
245
  emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup"],
246
246
  setup(e, { emit: i, slots: s }) {
247
- const n = g(() => {
247
+ const l = g(() => {
248
248
  const y = ["krds-input"];
249
249
  return e.size && y.push(e.size), e.class && y.push(e.class), y;
250
250
  }), o = (y) => {
@@ -263,7 +263,7 @@ const oe = C({
263
263
  }, _ = g(() => {
264
264
  const y = {
265
265
  type: e.type,
266
- class: n.value,
266
+ class: l.value,
267
267
  value: e.modelValue,
268
268
  placeholder: e.placeholder,
269
269
  name: e.name,
@@ -312,7 +312,7 @@ const oe = C({
312
312
  },
313
313
  emits: ["click"],
314
314
  setup(e, { emit: i, slots: s }) {
315
- const n = (o) => {
315
+ const l = (o) => {
316
316
  i("click", o);
317
317
  };
318
318
  return () => r("div", { class: "form-tit" }, [
@@ -323,7 +323,7 @@ const oe = C({
323
323
  id: e.id,
324
324
  class: e.class,
325
325
  style: e.style,
326
- onClick: n
326
+ onClick: l
327
327
  },
328
328
  s.default?.()
329
329
  )
@@ -351,7 +351,7 @@ const oe = C({
351
351
  },
352
352
  emits: ["click"],
353
353
  setup(e, { emit: i, slots: s }) {
354
- const n = (t) => {
354
+ const l = (t) => {
355
355
  i("click", t);
356
356
  }, o = () => {
357
357
  let t;
@@ -377,7 +377,7 @@ const oe = C({
377
377
  id: e.id,
378
378
  class: o(),
379
379
  style: e.style,
380
- onClick: n
380
+ onClick: l
381
381
  },
382
382
  s.default?.()
383
383
  );
@@ -400,8 +400,8 @@ const oe = C({
400
400
  },
401
401
  setup(e, { slots: i }) {
402
402
  const s = g(() => {
403
- const n = ["form-group"];
404
- return e.class && n.push(e.class), n;
403
+ const l = ["form-group"];
404
+ return e.class && l.push(e.class), l;
405
405
  });
406
406
  return () => r(
407
407
  "div",
@@ -415,7 +415,7 @@ const oe = C({
415
415
  }
416
416
  });
417
417
  function Ne(e, i) {
418
- const s = /* @__PURE__ */ new Date(), n = M(e || s.getFullYear()), o = M(i || s.getMonth() + 1), t = M(null), a = M(null), u = M(null), v = g(() => {
418
+ const s = /* @__PURE__ */ new Date(), l = M(e || s.getFullYear()), o = M(i || s.getMonth() + 1), t = M(null), a = M(null), u = M(null), v = g(() => {
419
419
  const p = s.getFullYear(), f = [];
420
420
  for (let b = p - 10; b <= p + 10; b++)
421
421
  f.push(b);
@@ -423,9 +423,9 @@ function Ne(e, i) {
423
423
  }), S = g(() => Array.from({ length: 12 }, (p, f) => f + 1)), _ = () => {
424
424
  t.value = null, a.value = null;
425
425
  }, V = () => {
426
- o.value === 1 ? (o.value = 12, n.value -= 1) : o.value -= 1;
426
+ o.value === 1 ? (o.value = 12, l.value -= 1) : o.value -= 1;
427
427
  }, y = () => {
428
- o.value === 12 ? (o.value = 1, n.value += 1) : o.value += 1;
428
+ o.value === 12 ? (o.value = 1, l.value += 1) : o.value += 1;
429
429
  }, $ = (p, f = !1) => {
430
430
  if (f)
431
431
  t.value = p, a.value = p;
@@ -438,7 +438,7 @@ function Ne(e, i) {
438
438
  };
439
439
  return {
440
440
  // State
441
- currentYear: n,
441
+ currentYear: l,
442
442
  currentMonth: o,
443
443
  selectedStartDate: t,
444
444
  selectedEndDate: a,
@@ -464,16 +464,16 @@ function Ne(e, i) {
464
464
  };
465
465
  }
466
466
  function Te(e, i, s = {}) {
467
- let n = null;
467
+ let l = null;
468
468
  const o = typeof s == "string" ? { ignore: s } : s, { ignore: t, event: a = "click" } = o, u = () => {
469
- n = (S) => {
469
+ l = (S) => {
470
470
  const _ = S.target;
471
471
  e.value?.contains(_) || t && _.closest(t) || i();
472
- }, document.addEventListener(a, n);
472
+ }, document.addEventListener(a, l);
473
473
  }, v = () => {
474
- if (n) {
474
+ if (l) {
475
475
  const S = typeof s == "string" ? "click" : s.event || "click";
476
- document.removeEventListener(S, n), n = null;
476
+ document.removeEventListener(S, l), l = null;
477
477
  }
478
478
  };
479
479
  return re(() => {
@@ -485,7 +485,7 @@ function Te(e, i, s = {}) {
485
485
  removeGlobalListeners: v
486
486
  };
487
487
  }
488
- const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id", "name", "placeholder", "value", "readonly", "disabled", "required", "autofocus"], qe = ["disabled", "aria-expanded"], Fe = { class: "calendar-head" }, He = { class: "calendar-switch-wrap" }, Re = { class: "calendar-drop-down" }, Ye = ["aria-expanded"], je = { class: "calendar-select calendar-year-wrap" }, Ge = { class: "sel year" }, We = ["onClick"], Ue = { class: "calendar-drop-down" }, Je = ["aria-expanded"], Qe = { class: "calendar-select calendar-mon-wrap" }, Xe = { class: "sel month" }, Ze = ["onClick"], et = { class: "calendar-body" }, tt = { class: "calendar-table-wrap" }, at = { class: "calendar-tbl" }, lt = ["data-date"], nt = ["aria-pressed", "onClick"], st = { class: "calendar-footer" }, it = { class: "calendar-btn-wrap" }, rt = /* @__PURE__ */ C({
488
+ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id", "name", "placeholder", "value", "readonly", "disabled", "required", "autofocus"], qe = ["disabled", "aria-expanded"], Fe = { class: "calendar-head" }, He = { class: "calendar-switch-wrap" }, Re = { class: "calendar-drop-down" }, Ye = ["aria-expanded"], je = { class: "calendar-select calendar-year-wrap" }, Ge = { class: "sel year" }, We = ["onClick"], Ue = { class: "calendar-drop-down" }, Je = ["aria-expanded"], Qe = { class: "calendar-select calendar-mon-wrap" }, Xe = { class: "sel month" }, Ze = ["onClick"], et = { class: "calendar-body" }, tt = { class: "calendar-table-wrap" }, at = { class: "calendar-tbl" }, nt = ["data-date"], lt = ["aria-pressed", "onClick"], st = { class: "calendar-footer" }, it = { class: "calendar-btn-wrap" }, rt = /* @__PURE__ */ C({
489
489
  __name: "KrdsDateInput",
490
490
  props: {
491
491
  modelValue: { default: void 0 },
@@ -506,7 +506,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
506
506
  },
507
507
  emits: ["update:modelValue", "input", "change", "focus", "blur"],
508
508
  setup(e, { emit: i }) {
509
- const s = e, n = i, o = M(), t = M(), a = M(!1), u = M(null), {
509
+ const s = e, l = i, o = M(), t = M(), a = M(!1), u = M(null), {
510
510
  currentYear: v,
511
511
  currentMonth: S,
512
512
  selectedStartDate: _,
@@ -514,7 +514,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
514
514
  yearOptions: y,
515
515
  monthOptions: $,
516
516
  prevMonth: d,
517
- nextMonth: l,
517
+ nextMonth: n,
518
518
  handleDateSelection: p,
519
519
  selectToday: f,
520
520
  isDateInSelectedRange: b
@@ -557,7 +557,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
557
557
  k.isInRange && (m.push("period"), k.isStart && m.push("start"), k.isEnd && m.push("end"));
558
558
  }
559
559
  return m;
560
- }, D = g(() => [
560
+ }, B = g(() => [
561
561
  {
562
562
  id: "get-today",
563
563
  label: "오늘",
@@ -592,9 +592,9 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
592
592
  if (_.value) {
593
593
  if (V.value && _.value !== V.value) {
594
594
  const c = `${_.value} ~ ${V.value}`;
595
- n("update:modelValue", c);
595
+ l("update:modelValue", c);
596
596
  } else
597
- n("update:modelValue", _.value);
597
+ l("update:modelValue", _.value);
598
598
  K();
599
599
  }
600
600
  }, ye = () => {
@@ -607,15 +607,15 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
607
607
  c.code === "Escape" && (u.value ? u.value = null : a.value && K());
608
608
  }, be = (c) => {
609
609
  const m = c.target;
610
- n("update:modelValue", m.value), n("input", c);
610
+ l("update:modelValue", m.value), l("input", c);
611
611
  }, ke = (c) => {
612
- n("change", c);
612
+ l("change", c);
613
613
  }, Se = (c) => {
614
- n("focus", c);
614
+ l("focus", c);
615
615
  }, Ce = (c) => {
616
- n("blur", c);
616
+ l("blur", c);
617
617
  };
618
- return (c, m) => (w(), B("div", Ae, [
618
+ return (c, m) => (w(), D("div", Ae, [
619
619
  h("div", {
620
620
  class: L(T.value)
621
621
  }, [
@@ -680,7 +680,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
680
680
  }, N(I(v)) + "년 ", 9, Ye),
681
681
  Y(h("div", je, [
682
682
  h("ul", Ge, [
683
- (w(!0), B(E, null, F(I(y), (k) => (w(), B("li", { key: k }, [
683
+ (w(!0), D(E, null, F(I(y), (k) => (w(), D("li", { key: k }, [
684
684
  h("button", {
685
685
  type: "button",
686
686
  class: L({ active: k === I(v) }),
@@ -702,7 +702,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
702
702
  }, N(I(S).toString().padStart(2, "0")) + "월 ", 9, Je),
703
703
  Y(h("div", Qe, [
704
704
  h("ul", Xe, [
705
- (w(!0), B(E, null, F(I($), (k) => (w(), B("li", { key: k }, [
705
+ (w(!0), D(E, null, F(I($), (k) => (w(), D("li", { key: k }, [
706
706
  h("button", {
707
707
  type: "button",
708
708
  class: L({ active: k === I(S) }),
@@ -719,7 +719,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
719
719
  type: "button",
720
720
  class: "btn-cal-move next",
721
721
  onClick: m[3] || (m[3] = //@ts-ignore
722
- (...k) => I(l) && I(l)(...k))
722
+ (...k) => I(n) && I(n)(...k))
723
723
  }, [...m[6] || (m[6] = [
724
724
  h("span", { class: "sr-only" }, "다음 달", -1)
725
725
  ])])
@@ -740,8 +740,8 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
740
740
  ])
741
741
  ], -1)),
742
742
  h("tbody", null, [
743
- (w(!0), B(E, null, F(z.value, (k, q) => (w(), B("tr", { key: q }, [
744
- (w(!0), B(E, null, F(k, (A, x) => (w(), B("td", {
743
+ (w(!0), D(E, null, F(z.value, (k, q) => (w(), D("tr", { key: q }, [
744
+ (w(!0), D(E, null, F(k, (A, x) => (w(), D("td", {
745
745
  key: x,
746
746
  class: L(H(A)),
747
747
  "data-date": A.dateString
@@ -753,8 +753,8 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
753
753
  onClick: (j) => I(p)(A.dateString)
754
754
  }, [
755
755
  h("span", null, N(A.day), 1)
756
- ], 8, nt)
757
- ], 10, lt))), 128))
756
+ ], 8, lt)
757
+ ], 10, nt))), 128))
758
758
  ]))), 128))
759
759
  ])
760
760
  ])
@@ -762,7 +762,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
762
762
  ]),
763
763
  h("div", st, [
764
764
  h("div", it, [
765
- (w(!0), B(E, null, F(D.value, (k) => (w(), W(I(oe), {
765
+ (w(!0), D(E, null, F(B.value, (k) => (w(), W(I(oe), {
766
766
  id: k.id,
767
767
  key: k.id,
768
768
  class: L(k.class),
@@ -860,35 +860,35 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
860
860
  emits: ["update:modelValue", "input", "change", "focus", "blur", "keydown", "keyup"],
861
861
  setup(e, { emit: i }) {
862
862
  const s = M(0);
863
- Be(
863
+ De(
864
864
  () => e.modelValue,
865
- (l) => {
866
- s.value = (l || "").length;
865
+ (n) => {
866
+ s.value = (n || "").length;
867
867
  },
868
868
  { immediate: !0 }
869
869
  );
870
- const n = g(() => {
871
- const l = ["krds-input"];
872
- return e.size && l.push(e.size), e.class && l.push(e.class), l;
870
+ const l = g(() => {
871
+ const n = ["krds-input"];
872
+ return e.size && n.push(e.size), e.class && n.push(e.class), n;
873
873
  }), o = g(() => {
874
- const l = {};
875
- return e.resize && (l.resize = e.resize), l;
876
- }), t = (l) => {
877
- const f = l.target.value;
878
- s.value = f.length, i("update:modelValue", f), i("input", l);
879
- }, a = (l) => {
880
- i("change", l);
881
- }, u = (l) => {
882
- i("focus", l);
883
- }, v = (l) => {
884
- i("blur", l);
885
- }, S = (l) => {
886
- i("keydown", l);
887
- }, _ = (l) => {
888
- i("keyup", l);
874
+ const n = {};
875
+ return e.resize && (n.resize = e.resize), n;
876
+ }), t = (n) => {
877
+ const f = n.target.value;
878
+ s.value = f.length, i("update:modelValue", f), i("input", n);
879
+ }, a = (n) => {
880
+ i("change", n);
881
+ }, u = (n) => {
882
+ i("focus", n);
883
+ }, v = (n) => {
884
+ i("blur", n);
885
+ }, S = (n) => {
886
+ i("keydown", n);
887
+ }, _ = (n) => {
888
+ i("keyup", n);
889
889
  }, V = g(() => {
890
- const l = {
891
- class: n.value,
890
+ const n = {
891
+ class: l.value,
892
892
  style: o.value,
893
893
  value: e.modelValue,
894
894
  placeholder: e.placeholder,
@@ -907,23 +907,23 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
907
907
  onKeydown: S,
908
908
  onKeyup: _
909
909
  };
910
- return e.maxlength !== void 0 && (l.maxlength = e.maxlength), e.minlength !== void 0 && (l.minlength = e.minlength), l;
910
+ return e.maxlength !== void 0 && (n.maxlength = e.maxlength), e.minlength !== void 0 && (n.minlength = e.minlength), n;
911
911
  }), y = g(() => ["form-conts"]), $ = g(() => ["textarea-wrap"]), d = g(() => {
912
912
  if (!e.showCount) return null;
913
- const l = s.value, p = e.maxlength;
913
+ const n = s.value, p = e.maxlength;
914
914
  return {
915
- current: l,
915
+ current: n,
916
916
  max: p || ""
917
917
  };
918
918
  });
919
919
  return () => {
920
- const l = [r("textarea", V.value)];
921
- return d.value && l.push(
920
+ const n = [r("textarea", V.value)];
921
+ return d.value && n.push(
922
922
  r("p", { class: "textarea-count" }, [
923
923
  r("span", { class: "count-now" }, d.value.current),
924
924
  r("span", { class: "count-total" }, d.value.max ? `/${d.value.max}` : "")
925
925
  ])
926
- ), r("div", { class: y.value }, [r("div", { class: $.value }, l)]);
926
+ ), r("div", { class: y.value }, [r("div", { class: $.value }, n)]);
927
927
  };
928
928
  }
929
929
  }), ut = C({
@@ -1031,8 +1031,8 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
1031
1031
  ],
1032
1032
  setup(e, { emit: i }) {
1033
1033
  M(!1), g(() => {
1034
- const n = ["krds-file-upload", "line"];
1035
- return e.class && n.push(e.class), n;
1034
+ const l = ["krds-file-upload", "line"];
1035
+ return e.class && l.push(e.class), l;
1036
1036
  });
1037
1037
  const s = g(() => e.modelValue?.length || 0);
1038
1038
  return g(() => !e.disabled && s.value < e.maxFiles), () => null;
@@ -1063,7 +1063,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
1063
1063
  },
1064
1064
  emits: ["click"],
1065
1065
  setup(e, { emit: i, slots: s }) {
1066
- const n = g(() => {
1066
+ const l = g(() => {
1067
1067
  const t = ["krds-badge"];
1068
1068
  return t.push(`${e.type}-${e.color}`), e.size && t.push(e.size), e.number && t.push("number"), e.class && t.push(e.class), t;
1069
1069
  }), o = (t) => {
@@ -1076,7 +1076,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
1076
1076
  color: e.color,
1077
1077
  size: e.size,
1078
1078
  number: e.number,
1079
- class: n.value,
1079
+ class: l.value,
1080
1080
  onClick: o
1081
1081
  },
1082
1082
  s.default?.()
@@ -1108,7 +1108,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
1108
1108
  },
1109
1109
  emits: ["remove"],
1110
1110
  setup(e, { emit: i, slots: s }) {
1111
- const n = g(() => {
1111
+ const l = g(() => {
1112
1112
  const a = ["krds-btn-tag"];
1113
1113
  return e.link && a.push("link"), e.class && a.push(e.class), a;
1114
1114
  }), o = (a) => {
@@ -1127,14 +1127,14 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
1127
1127
  if (u && a.push(u), e.link || a.push(t()), e.link) {
1128
1128
  const v = {
1129
1129
  href: e.href,
1130
- class: n.value
1130
+ class: l.value
1131
1131
  };
1132
1132
  return e.target && (v.target = e.target), e.rel && (v.rel = e.rel), r("a", v, a);
1133
1133
  }
1134
1134
  return r(
1135
1135
  "span",
1136
1136
  {
1137
- class: n.value
1137
+ class: l.value
1138
1138
  },
1139
1139
  a
1140
1140
  );
@@ -1154,8 +1154,8 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
1154
1154
  },
1155
1155
  setup(e, { slots: i }) {
1156
1156
  const s = g(() => {
1157
- const n = ["krds-tag-wrap"];
1158
- return e.size && n.push(e.size), e.class && n.push(e.class), n;
1157
+ const l = ["krds-tag-wrap"];
1158
+ return e.size && l.push(e.size), e.class && l.push(e.class), l;
1159
1159
  });
1160
1160
  return () => r(
1161
1161
  "div",
@@ -1175,7 +1175,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
1175
1175
  },
1176
1176
  emits: ["click"],
1177
1177
  setup(e, { emit: i, slots: s }) {
1178
- const n = g(() => {
1178
+ const l = g(() => {
1179
1179
  const t = [""];
1180
1180
  return e.class && t.push(e.class), t;
1181
1181
  }), o = (t) => {
@@ -1185,7 +1185,7 @@ const Ae = { class: "form-conts" }, Ee = { class: "calendar-input" }, Oe = ["id"
1185
1185
  "div",
1186
1186
  {
1187
1187
  id: "krds-masthead",
1188
- class: n.value,
1188
+ class: l.value,
1189
1189
  onClick: o
1190
1190
  },
1191
1191
  [
@@ -1200,6 +1200,10 @@ let ht = 0;
1200
1200
  function de(e = "krds") {
1201
1201
  return `${e}-${++ht}`;
1202
1202
  }
1203
+ function Pt() {
1204
+ const e = Date.now().toString(36).slice(-4), i = Math.random().toString(36).substring(2, 5);
1205
+ return `${e}${i}`;
1206
+ }
1203
1207
  function ce(...e) {
1204
1208
  return e.filter(Boolean).join(" ");
1205
1209
  }
@@ -1246,7 +1250,7 @@ const gt = C({
1246
1250
  },
1247
1251
  emits: ["update:modelValue", "change"],
1248
1252
  setup(e, { emit: i, attrs: s }) {
1249
- const n = g(() => e.modelValue), o = g(() => ce("krds-form-toggle-switch", e.size, e.class)), t = (u) => {
1253
+ const l = g(() => e.modelValue), o = g(() => ce("krds-form-toggle-switch", e.size, e.class)), t = (u) => {
1250
1254
  if (e.disabled)
1251
1255
  return;
1252
1256
  const S = u.target.checked;
@@ -1262,7 +1266,7 @@ const gt = C({
1262
1266
  type: "checkbox",
1263
1267
  id: a.value,
1264
1268
  name: e.name,
1265
- checked: n.value,
1269
+ checked: l.value,
1266
1270
  disabled: e.disabled,
1267
1271
  onChange: t,
1268
1272
  ...s
@@ -1337,7 +1341,7 @@ const gt = C({
1337
1341
  },
1338
1342
  emits: ["update:modelValue", "change"],
1339
1343
  slots: Object,
1340
- setup(e, { emit: i, attrs: s, slots: n }) {
1344
+ setup(e, { emit: i, attrs: s, slots: l }) {
1341
1345
  const o = g(() => e.modelValue), t = g(() => {
1342
1346
  const v = e.chip ? "krds-form-chip" : "krds-form-check";
1343
1347
  return ce(v, e.size, e.class);
@@ -1362,10 +1366,10 @@ const gt = C({
1362
1366
  {
1363
1367
  for: u.value
1364
1368
  },
1365
- n.default?.()
1369
+ l.default?.()
1366
1370
  )
1367
1371
  ];
1368
- return n.description && !e.chip && v.push(r("div", { class: "krds-form-check-cnt" }, r("p", { class: "krds-form-check-p" }, n.description()))), r(
1372
+ return l.description && !e.chip && v.push(r("div", { class: "krds-form-check-cnt" }, r("p", { class: "krds-form-check-p" }, l.description()))), r(
1369
1373
  "div",
1370
1374
  {
1371
1375
  class: t.value
@@ -1391,15 +1395,15 @@ const gt = C({
1391
1395
  const s = g(() => {
1392
1396
  const u = ["krds-step-wrap"];
1393
1397
  return e.class && u.push(e.class), u;
1394
- }), n = (u) => {
1398
+ }), l = (u) => {
1395
1399
  const v = e.modelValue || 0;
1396
1400
  return u < v ? "done" : u === v ? "active" : "pending";
1397
1401
  }, o = M(0), t = () => {
1398
1402
  o.value = 0;
1399
1403
  }, a = () => o.value++;
1400
- return De("stepIndicator", {
1404
+ return Be("stepIndicator", {
1401
1405
  activeStep: g(() => e.modelValue || 0),
1402
- getStepStatus: n,
1406
+ getStepStatus: l,
1403
1407
  getNextStepIndex: a,
1404
1408
  resetStepIndex: t
1405
1409
  }), () => (t(), r(
@@ -1432,7 +1436,7 @@ const gt = C({
1432
1436
  },
1433
1437
  emits: ["click"],
1434
1438
  setup(e, { emit: i, slots: s }) {
1435
- const n = Ke("stepIndicator"), o = n ? n.getNextStepIndex() : -1, t = g(() => e.status ? e.status : n && o >= 0 ? n.getStepStatus(o) : "pending"), a = g(() => {
1439
+ const l = Ke("stepIndicator"), o = l ? l.getNextStepIndex() : -1, t = g(() => e.status ? e.status : l && o >= 0 ? l.getStepStatus(o) : "pending"), a = g(() => {
1436
1440
  const v = [t.value];
1437
1441
  return e.class && v.push(e.class), v;
1438
1442
  }), u = (v) => {
@@ -1506,7 +1510,7 @@ const gt = C({
1506
1510
  ]
1507
1511
  );
1508
1512
  }
1509
- }), St = ["id", "aria-label"], Ct = { class: "breadcrumb" }, wt = ["href", "aria-current", "onClick"], _t = { key: 0 }, Bt = /* @__PURE__ */ C({
1513
+ }), St = ["id", "aria-label"], Ct = { class: "breadcrumb" }, wt = ["href", "aria-current", "onClick"], _t = { key: 0 }, Dt = /* @__PURE__ */ C({
1510
1514
  __name: "KrdsBreadcrumb",
1511
1515
  props: {
1512
1516
  items: {},
@@ -1516,16 +1520,16 @@ const gt = C({
1516
1520
  },
1517
1521
  emits: ["item-click"],
1518
1522
  setup(e, { emit: i }) {
1519
- const s = e, n = i, o = (a) => a === s.items.length - 1, t = (a, u) => {
1520
- a.onClick && a.onClick(u), n("item-click", a, u);
1523
+ const s = e, l = i, o = (a) => a === s.items.length - 1, t = (a, u) => {
1524
+ a.onClick && a.onClick(u), l("item-click", a, u);
1521
1525
  };
1522
- return (a, u) => (w(), B("nav", {
1526
+ return (a, u) => (w(), D("nav", {
1523
1527
  id: a.id,
1524
1528
  class: "krds-breadcrumb-wrap",
1525
1529
  "aria-label": a.ariaLabel
1526
1530
  }, [
1527
1531
  h("ol", Ct, [
1528
- (w(!0), B(E, null, F(a.items, (v, S) => (w(), B("li", {
1532
+ (w(!0), D(E, null, F(a.items, (v, S) => (w(), D("li", {
1529
1533
  key: `breadcrumb-${S}`,
1530
1534
  class: L({ home: S === 0 && a.showHomeIcon })
1531
1535
  }, [
@@ -1535,13 +1539,13 @@ const gt = C({
1535
1539
  "aria-current": o(S) ? "page" : void 0,
1536
1540
  onClick: (_) => t(v, _)
1537
1541
  }, [
1538
- S === 0 && a.showHomeIcon ? J("", !0) : (w(), B("span", _t, N(v.text), 1))
1542
+ S === 0 && a.showHomeIcon ? J("", !0) : (w(), D("span", _t, N(v.text), 1))
1539
1543
  ], 8, wt)
1540
1544
  ], 2))), 128))
1541
1545
  ])
1542
1546
  ], 8, St));
1543
1547
  }
1544
- }), Dt = C({
1548
+ }), Bt = C({
1545
1549
  name: "KrdsInPageNavigation",
1546
1550
  props: {
1547
1551
  title: {
@@ -1576,15 +1580,15 @@ const gt = C({
1576
1580
  emits: ["itemClick"],
1577
1581
  slots: Object,
1578
1582
  setup(e, { emit: i, slots: s }) {
1579
- const n = M(""), o = M(/* @__PURE__ */ new Map()), t = g(() => {
1583
+ const l = M(""), o = M(/* @__PURE__ */ new Map()), t = g(() => {
1580
1584
  const d = ["krds-in-page-navigation-type"];
1581
1585
  return e.class && d.push(e.class), d;
1582
1586
  }), a = () => {
1583
- const d = e.headerTopSelector, l = e.headerInnerSelector, p = document.querySelector(d)?.clientHeight || 0, f = document.querySelector(l)?.clientHeight || 0;
1587
+ const d = e.headerTopSelector, n = e.headerInnerSelector, p = document.querySelector(d)?.clientHeight || 0, f = document.querySelector(n)?.clientHeight || 0;
1584
1588
  return p + f;
1585
- }, u = (d, l) => {
1586
- if (i("itemClick", d, l), d.href.startsWith("#")) {
1587
- l.preventDefault();
1589
+ }, u = (d, n) => {
1590
+ if (i("itemClick", d, n), d.href.startsWith("#")) {
1591
+ n.preventDefault();
1588
1592
  const p = document.querySelector(d.href);
1589
1593
  if (p) {
1590
1594
  const f = a();
@@ -1592,7 +1596,7 @@ const gt = C({
1592
1596
  left: 0,
1593
1597
  top: p.getBoundingClientRect().top + window.scrollY - f,
1594
1598
  behavior: "smooth"
1595
- }), n.value = d.href, l instanceof KeyboardEvent) {
1599
+ }), l.value = d.href, n instanceof KeyboardEvent) {
1596
1600
  const b = p.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");
1597
1601
  b && b instanceof HTMLElement && (b.setAttribute("tabindex", "-1"), b.focus({ preventScroll: !0 }));
1598
1602
  }
@@ -1600,12 +1604,12 @@ const gt = C({
1600
1604
  }
1601
1605
  }, v = () => {
1602
1606
  o.value.clear(), e.items && e.items.filter((d) => d.href.startsWith("#")).forEach((d) => {
1603
- const l = document.querySelector(d.href);
1604
- l && o.value.set(d.href, l);
1607
+ const n = document.querySelector(d.href);
1608
+ n && o.value.set(d.href, n);
1605
1609
  });
1606
1610
  }, S = () => {
1607
1611
  if (!e.autoActive || !e.items || o.value.size === 0) return;
1608
- const d = window.innerHeight, l = Math.ceil(d / 5), p = window.scrollY + d, f = document.body.scrollHeight, b = e.items.filter((z) => z.href.startsWith("#") && o.value.has(z.href)).map((z) => ({
1612
+ const d = window.innerHeight, n = Math.ceil(d / 5), p = window.scrollY + d, f = document.body.scrollHeight, b = e.items.filter((z) => z.href.startsWith("#") && o.value.has(z.href)).map((z) => ({
1609
1613
  href: z.href,
1610
1614
  element: o.value.get(z.href),
1611
1615
  item: z
@@ -1619,17 +1623,17 @@ const gt = C({
1619
1623
  P = K.href;
1620
1624
  else
1621
1625
  for (const z of b) {
1622
- const H = z.element.offsetHeight, D = z.element.offsetTop - l;
1623
- if (window.scrollY > D && window.scrollY <= D + H) {
1626
+ const H = z.element.offsetHeight, B = z.element.offsetTop - n;
1627
+ if (window.scrollY > B && window.scrollY <= B + H) {
1624
1628
  P = z.href;
1625
1629
  break;
1626
1630
  }
1627
1631
  }
1628
- P && P !== n.value && (n.value = P);
1632
+ P && P !== l.value && (l.value = P);
1629
1633
  }, _ = () => {
1630
1634
  if (!e.items) return;
1631
- const d = e.items.find((l) => l.active);
1632
- d ? n.value = d.href : e.items.length > 0 && (n.value = e.items[0].href);
1635
+ const d = e.items.find((n) => n.active);
1636
+ d ? l.value = d.href : e.items.length > 0 && (l.value = e.items[0].href);
1633
1637
  };
1634
1638
  re(() => {
1635
1639
  if (_(), e.autoActive) {
@@ -1652,20 +1656,20 @@ const gt = C({
1652
1656
  e.title && r("p", { class: "quick-title" }, e.title)
1653
1657
  ]), y = () => {
1654
1658
  if (!e.items) return null;
1655
- const d = e.items.map((l) => {
1656
- const p = n.value === l.href || !e.autoActive && l.active;
1657
- return r("li", { key: l.href }, [
1659
+ const d = e.items.map((n) => {
1660
+ const p = l.value === n.href || !e.autoActive && n.active;
1661
+ return r("li", { key: n.href }, [
1658
1662
  r(
1659
1663
  "a",
1660
1664
  {
1661
- href: l.href,
1665
+ href: n.href,
1662
1666
  class: p ? "active" : "",
1663
- onClick: (f) => u(l, f),
1667
+ onClick: (f) => u(n, f),
1664
1668
  onKeydown: (f) => {
1665
- (f.key === "Enter" || f.key === " ") && (f.preventDefault(), u(l, f));
1669
+ (f.key === "Enter" || f.key === " ") && (f.preventDefault(), u(n, f));
1666
1670
  }
1667
1671
  },
1668
- l.text
1672
+ n.text
1669
1673
  )
1670
1674
  ]);
1671
1675
  });
@@ -1687,16 +1691,16 @@ const gt = C({
1687
1691
  },
1688
1692
  emits: ["update:modelValue"],
1689
1693
  setup(e, { emit: i }) {
1690
- const s = e, n = i, o = g(() => Math.max(1, s.min)), t = g(() => s.modelValue ?? o.value), a = g(() => t.value <= o.value), u = g(() => t.value >= s.max), v = g(() => {
1694
+ const s = e, l = i, o = g(() => Math.max(1, s.min)), t = g(() => s.modelValue ?? o.value), a = g(() => t.value <= o.value), u = g(() => t.value >= s.max), v = g(() => {
1691
1695
  if (!a.value)
1692
1696
  return "#";
1693
1697
  }), S = g(() => {
1694
1698
  if (!u.value)
1695
1699
  return "#";
1696
1700
  }), _ = g(() => {
1697
- const { pageRange: d, max: l } = s, p = 1, f = [];
1698
- if (l <= d + 2 * p)
1699
- for (let b = o.value; b <= l; b++)
1701
+ const { pageRange: d, max: n } = s, p = 1, f = [];
1702
+ if (n <= d + 2 * p)
1703
+ for (let b = o.value; b <= n; b++)
1700
1704
  f.push({
1701
1705
  type: "page",
1702
1706
  key: `page-${b}`,
@@ -1704,12 +1708,12 @@ const gt = C({
1704
1708
  href: "#"
1705
1709
  });
1706
1710
  else {
1707
- const b = Math.min(p, l), K = Math.max(l - p + 1, 1), O = Math.max(o.value, t.value - Math.floor(d / 2)), T = Math.min(l, O + d - 1), P = Math.max(o.value, T - d + 1);
1708
- for (let D = o.value; D <= b; D++)
1711
+ const b = Math.min(p, n), K = Math.max(n - p + 1, 1), O = Math.max(o.value, t.value - Math.floor(d / 2)), T = Math.min(n, O + d - 1), P = Math.max(o.value, T - d + 1);
1712
+ for (let B = o.value; B <= b; B++)
1709
1713
  f.push({
1710
1714
  type: "page",
1711
- key: `page-${D}`,
1712
- page: D,
1715
+ key: `page-${B}`,
1716
+ page: B,
1713
1717
  href: "#"
1714
1718
  });
1715
1719
  P > b + 1 && f.push({
@@ -1718,11 +1722,11 @@ const gt = C({
1718
1722
  ariaLabel: "페이지 생략"
1719
1723
  });
1720
1724
  const z = Math.max(P, b + 1), H = Math.min(T, K - 1);
1721
- for (let D = z; D <= H; D++)
1725
+ for (let B = z; B <= H; B++)
1722
1726
  f.push({
1723
1727
  type: "page",
1724
- key: `page-${D}`,
1725
- page: D,
1728
+ key: `page-${B}`,
1729
+ page: B,
1726
1730
  href: "#"
1727
1731
  });
1728
1732
  T < K - 1 && f.push({
@@ -1730,82 +1734,82 @@ const gt = C({
1730
1734
  key: "ellipsis-right",
1731
1735
  ariaLabel: "페이지 생략"
1732
1736
  });
1733
- for (let D = K; D <= l; D++)
1737
+ for (let B = K; B <= n; B++)
1734
1738
  f.push({
1735
1739
  type: "page",
1736
- key: `page-${D}`,
1737
- page: D,
1740
+ key: `page-${B}`,
1741
+ page: B,
1738
1742
  href: "#"
1739
1743
  });
1740
1744
  }
1741
1745
  return f;
1742
- }), V = (d, l) => {
1746
+ }), V = (d, n) => {
1743
1747
  if (d === t.value) {
1744
- l.preventDefault();
1748
+ n.preventDefault();
1745
1749
  return;
1746
1750
  }
1747
- n("update:modelValue", d);
1751
+ l("update:modelValue", d);
1748
1752
  }, y = (d) => {
1749
1753
  if (a.value) {
1750
1754
  d.preventDefault();
1751
1755
  return;
1752
1756
  }
1753
- const l = t.value - 1;
1754
- n("update:modelValue", l);
1757
+ const n = t.value - 1;
1758
+ l("update:modelValue", n);
1755
1759
  }, $ = (d) => {
1756
1760
  if (u.value) {
1757
1761
  d.preventDefault();
1758
1762
  return;
1759
1763
  }
1760
- const l = t.value + 1;
1761
- n("update:modelValue", l);
1764
+ const n = t.value + 1;
1765
+ l("update:modelValue", n);
1762
1766
  };
1763
- return (d, l) => {
1767
+ return (d, n) => {
1764
1768
  const p = xe("sr-only");
1765
- return w(), B("div", {
1769
+ return w(), D("div", {
1766
1770
  id: d.id,
1767
1771
  class: "krds-pagination"
1768
1772
  }, [
1769
- (w(), W(le(a.value ? "span" : "a"), {
1773
+ (w(), W(ne(a.value ? "span" : "a"), {
1770
1774
  href: a.value ? void 0 : v.value,
1771
1775
  class: L(["page-navi", "prev", { disabled: a.value }]),
1772
1776
  onClick: y
1773
1777
  }, {
1774
- default: U(() => [...l[0] || (l[0] = [
1778
+ default: U(() => [...n[0] || (n[0] = [
1775
1779
  R(" 이전 ", -1)
1776
1780
  ])]),
1777
1781
  _: 1
1778
1782
  }, 8, ["href", "class"])),
1779
1783
  h("div", xt, [
1780
- (w(!0), B(E, null, F(_.value, (f) => (w(), B(E, {
1784
+ (w(!0), D(E, null, F(_.value, (f) => (w(), D(E, {
1781
1785
  key: f.key
1782
1786
  }, [
1783
- f.type === "page" ? (w(), B("a", {
1787
+ f.type === "page" ? (w(), D("a", {
1784
1788
  key: 0,
1785
1789
  href: f.href || "#",
1786
1790
  class: L(["page-link", { active: f.page === t.value }]),
1787
1791
  "aria-current": f.page === t.value ? "page" : void 0,
1788
1792
  onClick: (b) => V(f.page, b)
1789
1793
  }, [
1790
- f.page === t.value ? Y((w(), B("span", Vt, [...l[1] || (l[1] = [
1794
+ f.page === t.value ? Y((w(), D("span", Vt, [...n[1] || (n[1] = [
1791
1795
  R("현재페이지", -1)
1792
1796
  ])])), [
1793
1797
  [p]
1794
1798
  ]) : J("", !0),
1795
1799
  R(" " + N(f.page), 1)
1796
- ], 10, It)) : f.type === "ellipsis" ? (w(), B("span", {
1800
+ ], 10, It)) : f.type === "ellipsis" ? (w(), D("span", {
1797
1801
  key: 1,
1798
1802
  class: "page-link link-dot",
1799
1803
  "aria-label": f.ariaLabel
1800
1804
  }, null, 8, zt)) : J("", !0)
1801
1805
  ], 64))), 128))
1802
1806
  ]),
1803
- (w(), W(le(u.value ? "span" : "a"), {
1807
+ (w(), W(ne(u.value ? "span" : "a"), {
1804
1808
  href: u.value ? void 0 : S.value,
1805
1809
  class: L(["page-navi", "next", { disabled: u.value }]),
1806
1810
  onClick: $
1807
1811
  }, {
1808
- default: U(() => [...l[2] || (l[2] = [
1812
+ default: U(() => [...n[2] || (n[2] = [
1809
1813
  R(" 다음 ", -1)
1810
1814
  ])]),
1811
1815
  _: 1
@@ -1813,10 +1817,10 @@ const gt = C({
1813
1817
  ], 8, Kt);
1814
1818
  };
1815
1819
  }
1816
- }), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1820
+ }), le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1817
1821
  __proto__: null,
1818
1822
  KrdsBadge: dt,
1819
- KrdsBreadcrumb: Bt,
1823
+ KrdsBreadcrumb: Dt,
1820
1824
  KrdsButton: oe,
1821
1825
  KrdsButtonGroup: Ie,
1822
1826
  KrdsCheckArea: yt,
@@ -1827,7 +1831,7 @@ const gt = C({
1827
1831
  KrdsFormHint: Pe,
1828
1832
  KrdsFormLabel: $e,
1829
1833
  KrdsIcon: Ve,
1830
- KrdsInPageNavigation: Dt,
1834
+ KrdsInPageNavigation: Bt,
1831
1835
  KrdsInput: Me,
1832
1836
  KrdsLink: ze,
1833
1837
  KrdsMasthead: vt,
@@ -1860,21 +1864,21 @@ const gt = C({
1860
1864
  directives: se,
1861
1865
  installDirectives: fe,
1862
1866
  vSrOnly: Q
1863
- }, Symbol.toStringTag, { value: "Module" })), Pt = {
1867
+ }, Symbol.toStringTag, { value: "Module" })), Lt = {
1864
1868
  install(e, i = {}) {
1865
1869
  e.provide("krds:config", i);
1866
- const s = i.components || Object.keys(ne);
1867
- s.forEach((n) => {
1868
- const o = ne[n];
1869
- o && e.component(n, o);
1870
+ const s = i.components || Object.keys(le);
1871
+ s.forEach((l) => {
1872
+ const o = le[l];
1873
+ o && e.component(l, o);
1870
1874
  }), typeof ie == "object" && ie !== null && fe(e), e.config.globalProperties.$krds = {
1871
1875
  version: "__VERSION__"
1872
1876
  }, process.env.NODE_ENV !== "production" && console.log(`[KRDS Vue] v__VERSION__ 설치 완료 - 컴포넌트: ${s.length}개`);
1873
1877
  }
1874
- }, Lt = "__VERSION__";
1878
+ }, Nt = "__VERSION__";
1875
1879
  export {
1876
1880
  dt as KrdsBadge,
1877
- Bt as KrdsBreadcrumb,
1881
+ Dt as KrdsBreadcrumb,
1878
1882
  oe as KrdsButton,
1879
1883
  Ie as KrdsButtonGroup,
1880
1884
  yt as KrdsCheckArea,
@@ -1885,7 +1889,7 @@ export {
1885
1889
  Pe as KrdsFormHint,
1886
1890
  $e as KrdsFormLabel,
1887
1891
  Ve as KrdsIcon,
1888
- Dt as KrdsInPageNavigation,
1892
+ Bt as KrdsInPageNavigation,
1889
1893
  Me as KrdsInput,
1890
1894
  ze as KrdsLink,
1891
1895
  vt as KrdsMasthead,
@@ -1899,8 +1903,9 @@ export {
1899
1903
  ot as KrdsTextarea,
1900
1904
  gt as KrdsToggleSwitch,
1901
1905
  ce as classNames,
1902
- Pt as default,
1906
+ Lt as default,
1903
1907
  de as generateId,
1904
- Lt as version
1908
+ Pt as generateUid,
1909
+ Nt as version
1905
1910
  };
1906
1911
  //# sourceMappingURL=krds-vue.es.js.map