@krds.ui/vue 0.0.13 → 0.0.15

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