@krds.ui/vue 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/fonts/PretendardGOV-Bold.subset.woff2 +0 -0
- package/dist/fonts/PretendardGOV-Medium.subset.woff2 +0 -0
- package/dist/fonts/PretendardGOV-Regular.subset.woff2 +0 -0
- package/dist/krds-vue.es.js +1771 -1090
- package/dist/krds-vue.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +2418 -112
- package/package.json +19 -10
- package/dist/components/KrdsAccordionGroup/KrdsAccordionGroup.d.ts +0 -7
- package/dist/components/KrdsAccordionGroup/KrdsAccordionGroup.d.ts.map +0 -1
- package/dist/components/KrdsAccordionGroup/index.d.ts +0 -5
- package/dist/components/KrdsAccordionGroup/index.d.ts.map +0 -1
- package/dist/components/KrdsAccordionItem/KrdsAccordionItem.d.ts +0 -22
- package/dist/components/KrdsAccordionItem/KrdsAccordionItem.d.ts.map +0 -1
- package/dist/components/KrdsAccordionItem/index.d.ts +0 -5
- package/dist/components/KrdsAccordionItem/index.d.ts.map +0 -1
- package/dist/components/KrdsBadge/KrdsBadge.d.ts +0 -24
- package/dist/components/KrdsBadge/KrdsBadge.d.ts.map +0 -1
- package/dist/components/KrdsBadge/index.d.ts +0 -5
- package/dist/components/KrdsBadge/index.d.ts.map +0 -1
- package/dist/components/KrdsBreadcrumb/KrdsBreadcrumb.d.ts +0 -33
- package/dist/components/KrdsBreadcrumb/KrdsBreadcrumb.d.ts.map +0 -1
- package/dist/components/KrdsBreadcrumb/index.d.ts +0 -5
- package/dist/components/KrdsBreadcrumb/index.d.ts.map +0 -1
- package/dist/components/KrdsButton/KrdsButton.d.ts +0 -31
- package/dist/components/KrdsButton/KrdsButton.d.ts.map +0 -1
- package/dist/components/KrdsButton/index.d.ts +0 -5
- package/dist/components/KrdsButton/index.d.ts.map +0 -1
- package/dist/components/KrdsButtonGroup/KrdsButtonGroup.d.ts +0 -8
- package/dist/components/KrdsButtonGroup/KrdsButtonGroup.d.ts.map +0 -1
- package/dist/components/KrdsButtonGroup/index.d.ts +0 -3
- package/dist/components/KrdsButtonGroup/index.d.ts.map +0 -1
- package/dist/components/KrdsCheckArea/KrdsCheckArea.d.ts +0 -12
- package/dist/components/KrdsCheckArea/KrdsCheckArea.d.ts.map +0 -1
- package/dist/components/KrdsCheckArea/index.d.ts +0 -5
- package/dist/components/KrdsCheckArea/index.d.ts.map +0 -1
- package/dist/components/KrdsCheckbox/KrdsCheckbox.d.ts +0 -23
- package/dist/components/KrdsCheckbox/KrdsCheckbox.d.ts.map +0 -1
- package/dist/components/KrdsCheckbox/index.d.ts +0 -5
- package/dist/components/KrdsCheckbox/index.d.ts.map +0 -1
- package/dist/components/KrdsCoachMark/KrdsCoachMark.d.ts +0 -29
- package/dist/components/KrdsCoachMark/KrdsCoachMark.d.ts.map +0 -1
- package/dist/components/KrdsCoachMark/index.d.ts +0 -5
- package/dist/components/KrdsCoachMark/index.d.ts.map +0 -1
- package/dist/components/KrdsContextualHelp/KrdsContextualHelp.d.ts +0 -15
- package/dist/components/KrdsContextualHelp/KrdsContextualHelp.d.ts.map +0 -1
- package/dist/components/KrdsContextualHelp/index.d.ts +0 -5
- package/dist/components/KrdsContextualHelp/index.d.ts.map +0 -1
- package/dist/components/KrdsCriticalAlerts/KrdsCriticalAlerts.d.ts +0 -27
- package/dist/components/KrdsCriticalAlerts/KrdsCriticalAlerts.d.ts.map +0 -1
- package/dist/components/KrdsCriticalAlerts/index.d.ts +0 -5
- package/dist/components/KrdsCriticalAlerts/index.d.ts.map +0 -1
- package/dist/components/KrdsDateInput/KrdsDateInput.d.ts +0 -39
- package/dist/components/KrdsDateInput/KrdsDateInput.d.ts.map +0 -1
- package/dist/components/KrdsDateInput/index.d.ts +0 -5
- package/dist/components/KrdsDateInput/index.d.ts.map +0 -1
- package/dist/components/KrdsDisclosure/KrdsDisclosure.d.ts +0 -19
- package/dist/components/KrdsDisclosure/KrdsDisclosure.d.ts.map +0 -1
- package/dist/components/KrdsDisclosure/index.d.ts +0 -5
- package/dist/components/KrdsDisclosure/index.d.ts.map +0 -1
- package/dist/components/KrdsFileUpload/KrdsFileUpload.d.ts +0 -285
- package/dist/components/KrdsFileUpload/KrdsFileUpload.d.ts.map +0 -1
- package/dist/components/KrdsFileUpload/index.d.ts +0 -5
- package/dist/components/KrdsFileUpload/index.d.ts.map +0 -1
- package/dist/components/KrdsFooter/KrdsFooter.d.ts +0 -11
- package/dist/components/KrdsFooter/KrdsFooter.d.ts.map +0 -1
- package/dist/components/KrdsFooter/index.d.ts +0 -5
- package/dist/components/KrdsFooter/index.d.ts.map +0 -1
- package/dist/components/KrdsFormGroup/KrdsFormGroup.d.ts +0 -8
- package/dist/components/KrdsFormGroup/KrdsFormGroup.d.ts.map +0 -1
- package/dist/components/KrdsFormGroup/index.d.ts +0 -5
- package/dist/components/KrdsFormGroup/index.d.ts.map +0 -1
- package/dist/components/KrdsFormHint/KrdsFormHint.d.ts +0 -17
- package/dist/components/KrdsFormHint/KrdsFormHint.d.ts.map +0 -1
- package/dist/components/KrdsFormHint/index.d.ts +0 -5
- package/dist/components/KrdsFormHint/index.d.ts.map +0 -1
- package/dist/components/KrdsFormLabel/KrdsFormLabel.d.ts +0 -17
- package/dist/components/KrdsFormLabel/KrdsFormLabel.d.ts.map +0 -1
- package/dist/components/KrdsFormLabel/index.d.ts +0 -5
- package/dist/components/KrdsFormLabel/index.d.ts.map +0 -1
- package/dist/components/KrdsHeader/KrdsHeader.d.ts +0 -56
- package/dist/components/KrdsHeader/KrdsHeader.d.ts.map +0 -1
- package/dist/components/KrdsHeader/index.d.ts +0 -5
- package/dist/components/KrdsHeader/index.d.ts.map +0 -1
- package/dist/components/KrdsIcon/KrdsIcon.d.ts +0 -11
- package/dist/components/KrdsIcon/KrdsIcon.d.ts.map +0 -1
- package/dist/components/KrdsIcon/index.d.ts +0 -3
- package/dist/components/KrdsIcon/index.d.ts.map +0 -1
- package/dist/components/KrdsIdentifier/KrdsIdentifier.d.ts +0 -16
- package/dist/components/KrdsIdentifier/KrdsIdentifier.d.ts.map +0 -1
- package/dist/components/KrdsIdentifier/index.d.ts +0 -5
- package/dist/components/KrdsIdentifier/index.d.ts.map +0 -1
- package/dist/components/KrdsInPageNavigation/KrdsInPageNavigation.d.ts +0 -38
- package/dist/components/KrdsInPageNavigation/KrdsInPageNavigation.d.ts.map +0 -1
- package/dist/components/KrdsInPageNavigation/index.d.ts +0 -5
- package/dist/components/KrdsInPageNavigation/index.d.ts.map +0 -1
- package/dist/components/KrdsInput/KrdsInput.d.ts +0 -51
- package/dist/components/KrdsInput/KrdsInput.d.ts.map +0 -1
- package/dist/components/KrdsInput/index.d.ts +0 -5
- package/dist/components/KrdsInput/index.d.ts.map +0 -1
- package/dist/components/KrdsLanguageSwitcher/KrdsLanguageSwitcher.d.ts +0 -30
- package/dist/components/KrdsLanguageSwitcher/KrdsLanguageSwitcher.d.ts.map +0 -1
- package/dist/components/KrdsLanguageSwitcher/index.d.ts +0 -5
- package/dist/components/KrdsLanguageSwitcher/index.d.ts.map +0 -1
- package/dist/components/KrdsLayout/KrdsLayout.d.ts +0 -37
- package/dist/components/KrdsLayout/KrdsLayout.d.ts.map +0 -1
- package/dist/components/KrdsLayout/index.d.ts +0 -5
- package/dist/components/KrdsLayout/index.d.ts.map +0 -1
- package/dist/components/KrdsLink/KrdsLink.d.ts +0 -33
- package/dist/components/KrdsLink/KrdsLink.d.ts.map +0 -1
- package/dist/components/KrdsLink/index.d.ts +0 -3
- package/dist/components/KrdsLink/index.d.ts.map +0 -1
- package/dist/components/KrdsMasthead/KrdsMasthead.d.ts +0 -14
- package/dist/components/KrdsMasthead/KrdsMasthead.d.ts.map +0 -1
- package/dist/components/KrdsMasthead/index.d.ts +0 -5
- package/dist/components/KrdsMasthead/index.d.ts.map +0 -1
- package/dist/components/KrdsModal/KrdsModal.d.ts +0 -88
- package/dist/components/KrdsModal/KrdsModal.d.ts.map +0 -1
- package/dist/components/KrdsModal/index.d.ts +0 -5
- package/dist/components/KrdsModal/index.d.ts.map +0 -1
- package/dist/components/KrdsPagination/KrdsPagination.d.ts +0 -27
- package/dist/components/KrdsPagination/KrdsPagination.d.ts.map +0 -1
- package/dist/components/KrdsPagination/index.d.ts +0 -5
- package/dist/components/KrdsPagination/index.d.ts.map +0 -1
- package/dist/components/KrdsPanel/KrdsPanel.d.ts +0 -16
- package/dist/components/KrdsPanel/KrdsPanel.d.ts.map +0 -1
- package/dist/components/KrdsPanel/index.d.ts +0 -5
- package/dist/components/KrdsPanel/index.d.ts.map +0 -1
- package/dist/components/KrdsRadio/KrdsRadio.d.ts +0 -25
- package/dist/components/KrdsRadio/KrdsRadio.d.ts.map +0 -1
- package/dist/components/KrdsRadio/index.d.ts +0 -5
- package/dist/components/KrdsRadio/index.d.ts.map +0 -1
- package/dist/components/KrdsResize/KrdsResize.d.ts +0 -15
- package/dist/components/KrdsResize/KrdsResize.d.ts.map +0 -1
- package/dist/components/KrdsResize/index.d.ts +0 -5
- package/dist/components/KrdsResize/index.d.ts.map +0 -1
- package/dist/components/KrdsSelect/KrdsSelect.d.ts +0 -44
- package/dist/components/KrdsSelect/KrdsSelect.d.ts.map +0 -1
- package/dist/components/KrdsSelect/index.d.ts +0 -5
- package/dist/components/KrdsSelect/index.d.ts.map +0 -1
- package/dist/components/KrdsSideNavigation/KrdsSideNavigation.d.ts +0 -74
- package/dist/components/KrdsSideNavigation/KrdsSideNavigation.d.ts.map +0 -1
- package/dist/components/KrdsSideNavigation/index.d.ts +0 -5
- package/dist/components/KrdsSideNavigation/index.d.ts.map +0 -1
- package/dist/components/KrdsSkipLink/KrdsSkipLink.d.ts +0 -77
- package/dist/components/KrdsSkipLink/KrdsSkipLink.d.ts.map +0 -1
- package/dist/components/KrdsSkipLink/index.d.ts +0 -5
- package/dist/components/KrdsSkipLink/index.d.ts.map +0 -1
- package/dist/components/KrdsSpinner/KrdsSpinner.d.ts +0 -15
- package/dist/components/KrdsSpinner/KrdsSpinner.d.ts.map +0 -1
- package/dist/components/KrdsSpinner/index.d.ts +0 -4
- package/dist/components/KrdsSpinner/index.d.ts.map +0 -1
- package/dist/components/KrdsStep/KrdsStep.d.ts +0 -21
- package/dist/components/KrdsStep/KrdsStep.d.ts.map +0 -1
- package/dist/components/KrdsStep/index.d.ts +0 -5
- package/dist/components/KrdsStep/index.d.ts.map +0 -1
- package/dist/components/KrdsStepIndicator/KrdsStepIndicator.d.ts +0 -17
- package/dist/components/KrdsStepIndicator/KrdsStepIndicator.d.ts.map +0 -1
- package/dist/components/KrdsStepIndicator/index.d.ts +0 -5
- package/dist/components/KrdsStepIndicator/index.d.ts.map +0 -1
- package/dist/components/KrdsStructuredList/KrdsStructuredList.d.ts +0 -11
- package/dist/components/KrdsStructuredList/KrdsStructuredList.d.ts.map +0 -1
- package/dist/components/KrdsStructuredList/index.d.ts +0 -5
- package/dist/components/KrdsStructuredList/index.d.ts.map +0 -1
- package/dist/components/KrdsTable/KrdsTable.d.ts +0 -48
- package/dist/components/KrdsTable/KrdsTable.d.ts.map +0 -1
- package/dist/components/KrdsTable/index.d.ts +0 -5
- package/dist/components/KrdsTable/index.d.ts.map +0 -1
- package/dist/components/KrdsTag/KrdsTag.d.ts +0 -23
- package/dist/components/KrdsTag/KrdsTag.d.ts.map +0 -1
- package/dist/components/KrdsTag/index.d.ts +0 -5
- package/dist/components/KrdsTag/index.d.ts.map +0 -1
- package/dist/components/KrdsTagGroup/KrdsTagGroup.d.ts +0 -15
- package/dist/components/KrdsTagGroup/KrdsTagGroup.d.ts.map +0 -1
- package/dist/components/KrdsTagGroup/index.d.ts +0 -5
- package/dist/components/KrdsTagGroup/index.d.ts.map +0 -1
- package/dist/components/KrdsTextList/KrdsTextList.d.ts +0 -13
- package/dist/components/KrdsTextList/KrdsTextList.d.ts.map +0 -1
- package/dist/components/KrdsTextList/index.d.ts +0 -5
- package/dist/components/KrdsTextList/index.d.ts.map +0 -1
- package/dist/components/KrdsTextarea/KrdsTextarea.d.ts +0 -209
- package/dist/components/KrdsTextarea/KrdsTextarea.d.ts.map +0 -1
- package/dist/components/KrdsTextarea/index.d.ts +0 -5
- package/dist/components/KrdsTextarea/index.d.ts.map +0 -1
- package/dist/components/KrdsToggleSwitch/KrdsToggleSwitch.d.ts +0 -24
- package/dist/components/KrdsToggleSwitch/KrdsToggleSwitch.d.ts.map +0 -1
- package/dist/components/KrdsToggleSwitch/index.d.ts +0 -5
- package/dist/components/KrdsToggleSwitch/index.d.ts.map +0 -1
- package/dist/components/KrdsTooltip/KrdsTooltip.d.ts +0 -20
- package/dist/components/KrdsTooltip/KrdsTooltip.d.ts.map +0 -1
- package/dist/components/KrdsTooltip/index.d.ts +0 -5
- package/dist/components/KrdsTooltip/index.d.ts.map +0 -1
- package/dist/components/KrdsTts/KrdsTts.d.ts +0 -36
- package/dist/components/KrdsTts/KrdsTts.d.ts.map +0 -1
- package/dist/components/KrdsTts/index.d.ts +0 -5
- package/dist/components/KrdsTts/index.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -97
- package/dist/components/index.d.ts.map +0 -1
- package/dist/composables/index.d.ts +0 -5
- package/dist/composables/index.d.ts.map +0 -1
- package/dist/composables/useClickOutside.d.ts +0 -22
- package/dist/composables/useClickOutside.d.ts.map +0 -1
- package/dist/composables/useDatePicker.d.ts +0 -26
- package/dist/composables/useDatePicker.d.ts.map +0 -1
- package/dist/directives/index.d.ts +0 -15
- package/dist/directives/index.d.ts.map +0 -1
- package/dist/directives/vSrOnly.d.ts +0 -8
- package/dist/directives/vSrOnly.d.ts.map +0 -1
- package/dist/index.d.ts +0 -20
- package/dist/index.d.ts.map +0 -1
- package/dist/tokens/index.d.ts +0 -6
- package/dist/tokens/index.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -26
- package/dist/utils/index.d.ts.map +0 -1
package/dist/krds-vue.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Teleport as
|
|
2
|
-
var
|
|
1
|
+
import { Comment as je, Fragment as Ge, Teleport as Ce, Text as Ue, computed as b, defineComponent as A, getCurrentInstance as xe, h as t, inject as Xe, nextTick as ce, onBeforeUnmount as fe, onMounted as ie, onUnmounted as re, provide as Qe, ref as B, useId as de, vShow as pe, watch as se, withDirectives as ve, withModifiers as ge } from "vue";
|
|
2
|
+
var be = Object.defineProperty, Je = (e, a) => {
|
|
3
3
|
let r = {};
|
|
4
|
-
for (var
|
|
5
|
-
|
|
6
|
-
get: e[
|
|
4
|
+
for (var l in e)
|
|
5
|
+
be(r, l, {
|
|
6
|
+
get: e[l],
|
|
7
7
|
enumerable: !0
|
|
8
8
|
});
|
|
9
|
-
return
|
|
10
|
-
},
|
|
9
|
+
return a || be(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
10
|
+
}, $e = A({
|
|
11
11
|
name: "KrdsButton",
|
|
12
12
|
props: {
|
|
13
13
|
type: {
|
|
@@ -48,27 +48,27 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
emits: ["click"],
|
|
51
|
-
setup(e, { emit:
|
|
52
|
-
const
|
|
51
|
+
setup(e, { emit: a, slots: r }) {
|
|
52
|
+
const l = b(() => {
|
|
53
53
|
const s = ["krds-btn"];
|
|
54
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
55
|
}), n = (s) => {
|
|
56
|
-
e.disabled ||
|
|
56
|
+
e.disabled || a("click", s);
|
|
57
57
|
};
|
|
58
58
|
return () => t("button", {
|
|
59
59
|
type: e.type,
|
|
60
|
-
class:
|
|
60
|
+
class: l.value,
|
|
61
61
|
disabled: e.disabled,
|
|
62
62
|
onClick: n
|
|
63
63
|
}, r.default?.());
|
|
64
64
|
}
|
|
65
|
-
}),
|
|
65
|
+
}), Ze = $e, et = A({
|
|
66
66
|
name: "KrdsButtonGroup",
|
|
67
67
|
props: {},
|
|
68
|
-
setup(e, { slots:
|
|
69
|
-
return () => t("div", { class: "btn-group" },
|
|
68
|
+
setup(e, { slots: a }) {
|
|
69
|
+
return () => t("div", { class: "btn-group" }, a.default?.());
|
|
70
70
|
}
|
|
71
|
-
}),
|
|
71
|
+
}), tt = A({
|
|
72
72
|
name: "KrdsIcon",
|
|
73
73
|
props: {
|
|
74
74
|
name: {
|
|
@@ -87,7 +87,7 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
87
87
|
e.class
|
|
88
88
|
].filter(Boolean).join(" ") });
|
|
89
89
|
}
|
|
90
|
-
}),
|
|
90
|
+
}), at = A({
|
|
91
91
|
name: "KrdsLink",
|
|
92
92
|
props: {
|
|
93
93
|
href: {
|
|
@@ -124,25 +124,25 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
emits: ["click"],
|
|
127
|
-
setup(e, { emit:
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
return e.size &&
|
|
131
|
-
}), n =
|
|
132
|
-
const
|
|
127
|
+
setup(e, { emit: a, slots: r }) {
|
|
128
|
+
const l = b(() => {
|
|
129
|
+
const u = ["krds-btn"];
|
|
130
|
+
return e.size && u.push(e.size), e.link && u.push("link"), e.basic && u.push("basic"), e.pure && u.push("pure"), e.class && u.push(e.class), u;
|
|
131
|
+
}), n = b(() => {
|
|
132
|
+
const u = {
|
|
133
133
|
href: e.href,
|
|
134
|
-
class:
|
|
134
|
+
class: l.value
|
|
135
135
|
};
|
|
136
|
-
return e.target && (
|
|
137
|
-
}), s = (
|
|
138
|
-
|
|
136
|
+
return e.target && (u.target = e.target), e.title && (u.title = e.title), e.target === "_blank" && (u.rel = "noopener noreferrer"), u;
|
|
137
|
+
}), s = (u) => {
|
|
138
|
+
a("click", u);
|
|
139
139
|
};
|
|
140
140
|
return () => t("a", {
|
|
141
141
|
...n.value,
|
|
142
142
|
onClick: s
|
|
143
143
|
}, r.default?.());
|
|
144
144
|
}
|
|
145
|
-
}),
|
|
145
|
+
}), Le = A({
|
|
146
146
|
name: "KrdsSpinner",
|
|
147
147
|
props: { label: {
|
|
148
148
|
type: String,
|
|
@@ -155,7 +155,7 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
155
155
|
role: "status"
|
|
156
156
|
}, e);
|
|
157
157
|
}
|
|
158
|
-
}),
|
|
158
|
+
}), lt = A({
|
|
159
159
|
name: "KrdsInput",
|
|
160
160
|
props: {
|
|
161
161
|
modelValue: {
|
|
@@ -252,27 +252,27 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
252
252
|
"keydown",
|
|
253
253
|
"keyup"
|
|
254
254
|
],
|
|
255
|
-
setup(e, { emit:
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
return e.size &&
|
|
259
|
-
}), n = (
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
}, s = (
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
}, h = (
|
|
267
|
-
|
|
268
|
-
}, f = (
|
|
269
|
-
|
|
270
|
-
},
|
|
271
|
-
|
|
272
|
-
},
|
|
273
|
-
const
|
|
255
|
+
setup(e, { emit: a, slots: r }) {
|
|
256
|
+
const l = b(() => {
|
|
257
|
+
const S = ["krds-input"];
|
|
258
|
+
return e.size && S.push(e.size), e.class && S.push(e.class), S;
|
|
259
|
+
}), n = (S) => {
|
|
260
|
+
const x = S.target;
|
|
261
|
+
a("update:modelValue", e.type === "number" ? Number(x.value) : x.value), a("input", S);
|
|
262
|
+
}, s = (S) => {
|
|
263
|
+
a("change", S);
|
|
264
|
+
}, u = (S) => {
|
|
265
|
+
a("focus", S);
|
|
266
|
+
}, h = (S) => {
|
|
267
|
+
a("blur", S);
|
|
268
|
+
}, f = (S) => {
|
|
269
|
+
a("keydown", S);
|
|
270
|
+
}, w = (S) => {
|
|
271
|
+
a("keyup", S);
|
|
272
|
+
}, m = b(() => {
|
|
273
|
+
const S = {
|
|
274
274
|
type: e.type,
|
|
275
|
-
class:
|
|
275
|
+
class: l.value,
|
|
276
276
|
value: e.modelValue,
|
|
277
277
|
placeholder: e.placeholder,
|
|
278
278
|
name: e.name,
|
|
@@ -284,22 +284,22 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
284
284
|
autofocus: e.autofocus,
|
|
285
285
|
onInput: n,
|
|
286
286
|
onChange: s,
|
|
287
|
-
onFocus:
|
|
287
|
+
onFocus: u,
|
|
288
288
|
onBlur: h,
|
|
289
289
|
onKeydown: f,
|
|
290
|
-
onKeyup:
|
|
290
|
+
onKeyup: w
|
|
291
291
|
};
|
|
292
|
-
return e.maxlength !== void 0 && (
|
|
293
|
-
}),
|
|
294
|
-
const
|
|
295
|
-
return e.state !== "default" &&
|
|
292
|
+
return e.maxlength !== void 0 && (S.maxlength = e.maxlength), e.minlength !== void 0 && (S.minlength = e.minlength), e.type === "number" && (e.max !== void 0 && (S.max = e.max), e.min !== void 0 && (S.min = e.min), e.step !== void 0 && (S.step = e.step)), S;
|
|
293
|
+
}), T = b(() => {
|
|
294
|
+
const S = ["form-conts"];
|
|
295
|
+
return e.state !== "default" && S.push(`is-${e.state}`), e.icon && S.push("btn-ico-wrap"), S;
|
|
296
296
|
});
|
|
297
297
|
return () => {
|
|
298
|
-
const
|
|
299
|
-
return e.loading ? t("div", { class:
|
|
298
|
+
const S = [t("input", m.value)];
|
|
299
|
+
return e.loading ? t("div", { class: T.value }, [t("div", { class: "form-spinner" }, [...S, t(Le)])]) : (r.default && S.push(...r.default()), t("div", { class: T.value }, S));
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
}),
|
|
302
|
+
}), nt = lt, st = A({
|
|
303
303
|
name: "KrdsFormLabel",
|
|
304
304
|
props: {
|
|
305
305
|
for: {
|
|
@@ -320,19 +320,19 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
320
320
|
}
|
|
321
321
|
},
|
|
322
322
|
emits: ["click"],
|
|
323
|
-
setup(e, { emit:
|
|
324
|
-
const
|
|
325
|
-
|
|
323
|
+
setup(e, { emit: a, slots: r }) {
|
|
324
|
+
const l = (n) => {
|
|
325
|
+
a("click", n);
|
|
326
326
|
};
|
|
327
327
|
return () => t("div", { class: "form-tit" }, [t("label", {
|
|
328
328
|
for: e.for,
|
|
329
329
|
id: e.id,
|
|
330
330
|
class: e.class,
|
|
331
331
|
style: e.style,
|
|
332
|
-
onClick:
|
|
332
|
+
onClick: l
|
|
333
333
|
}, r.default?.())]);
|
|
334
334
|
}
|
|
335
|
-
}),
|
|
335
|
+
}), rt = st, it = A({
|
|
336
336
|
name: "KrdsFormHint",
|
|
337
337
|
props: {
|
|
338
338
|
type: {
|
|
@@ -353,9 +353,9 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
353
353
|
}
|
|
354
354
|
},
|
|
355
355
|
emits: ["click"],
|
|
356
|
-
setup(e, { emit:
|
|
357
|
-
const
|
|
358
|
-
|
|
356
|
+
setup(e, { emit: a, slots: r }) {
|
|
357
|
+
const l = (s) => {
|
|
358
|
+
a("click", s);
|
|
359
359
|
}, n = () => {
|
|
360
360
|
let s;
|
|
361
361
|
switch (e.type) {
|
|
@@ -377,10 +377,10 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
377
377
|
id: e.id,
|
|
378
378
|
class: n(),
|
|
379
379
|
style: e.style,
|
|
380
|
-
onClick:
|
|
380
|
+
onClick: l
|
|
381
381
|
}, r.default?.());
|
|
382
382
|
}
|
|
383
|
-
}),
|
|
383
|
+
}), ot = it, dt = A({
|
|
384
384
|
name: "KrdsFormGroup",
|
|
385
385
|
props: {
|
|
386
386
|
class: {
|
|
@@ -396,93 +396,93 @@ var se = Object.defineProperty, ce = (e, l) => {
|
|
|
396
396
|
default: void 0
|
|
397
397
|
}
|
|
398
398
|
},
|
|
399
|
-
setup(e, { slots:
|
|
400
|
-
const r =
|
|
401
|
-
const
|
|
402
|
-
return e.class &&
|
|
399
|
+
setup(e, { slots: a }) {
|
|
400
|
+
const r = b(() => {
|
|
401
|
+
const l = ["form-group"];
|
|
402
|
+
return e.class && l.push(e.class), l;
|
|
403
403
|
});
|
|
404
404
|
return () => t("div", {
|
|
405
405
|
id: e.id,
|
|
406
406
|
class: r.value,
|
|
407
407
|
style: e.style
|
|
408
|
-
},
|
|
408
|
+
}, a.default?.());
|
|
409
409
|
}
|
|
410
|
-
}),
|
|
411
|
-
function
|
|
412
|
-
const r = /* @__PURE__ */ new Date(),
|
|
413
|
-
const i = r.getFullYear(),
|
|
414
|
-
for (let
|
|
415
|
-
return
|
|
416
|
-
}),
|
|
417
|
-
s.value = null,
|
|
418
|
-
},
|
|
419
|
-
n.value === 1 ? (n.value = 12,
|
|
420
|
-
},
|
|
421
|
-
n.value === 12 ? (n.value = 1,
|
|
422
|
-
},
|
|
423
|
-
if (
|
|
424
|
-
s.value = i,
|
|
425
|
-
else if (!s.value || s.value &&
|
|
426
|
-
s.value = i,
|
|
410
|
+
}), ut = dt;
|
|
411
|
+
function ct(e, a) {
|
|
412
|
+
const r = /* @__PURE__ */ new Date(), l = B(e || r.getFullYear()), n = B(a || r.getMonth() + 1), s = B(null), u = B(null), h = B(null), f = b(() => {
|
|
413
|
+
const i = r.getFullYear(), p = [];
|
|
414
|
+
for (let y = i - 10; y <= i + 10; y++) p.push(y);
|
|
415
|
+
return p;
|
|
416
|
+
}), w = b(() => Array.from({ length: 12 }, (i, p) => p + 1)), m = () => {
|
|
417
|
+
s.value = null, u.value = null;
|
|
418
|
+
}, T = () => {
|
|
419
|
+
n.value === 1 ? (n.value = 12, l.value -= 1) : n.value -= 1;
|
|
420
|
+
}, S = () => {
|
|
421
|
+
n.value === 12 ? (n.value = 1, l.value += 1) : n.value += 1;
|
|
422
|
+
}, x = (i, p = !1) => {
|
|
423
|
+
if (p)
|
|
424
|
+
s.value = i, u.value = i;
|
|
425
|
+
else if (!s.value || s.value && u.value)
|
|
426
|
+
s.value = i, u.value = null;
|
|
427
427
|
else {
|
|
428
|
-
const
|
|
429
|
-
new Date(i.replace(/\./g, "-")) <
|
|
428
|
+
const y = new Date(s.value.replace(/\./g, "-"));
|
|
429
|
+
new Date(i.replace(/\./g, "-")) < y ? (s.value = i, u.value = null) : u.value = i;
|
|
430
430
|
}
|
|
431
431
|
};
|
|
432
432
|
return {
|
|
433
|
-
currentYear:
|
|
433
|
+
currentYear: l,
|
|
434
434
|
currentMonth: n,
|
|
435
435
|
selectedStartDate: s,
|
|
436
|
-
selectedEndDate:
|
|
436
|
+
selectedEndDate: u,
|
|
437
437
|
activeDateSelector: h,
|
|
438
438
|
yearOptions: f,
|
|
439
|
-
monthOptions:
|
|
440
|
-
clearDateSelection:
|
|
441
|
-
prevMonth:
|
|
442
|
-
nextMonth:
|
|
443
|
-
handleDateSelection:
|
|
439
|
+
monthOptions: w,
|
|
440
|
+
clearDateSelection: m,
|
|
441
|
+
prevMonth: T,
|
|
442
|
+
nextMonth: S,
|
|
443
|
+
handleDateSelection: x,
|
|
444
444
|
selectToday: () => {
|
|
445
445
|
const i = `${r.getFullYear()}.${String(r.getMonth() + 1).padStart(2, "0")}.${String(r.getDate()).padStart(2, "0")}`;
|
|
446
|
-
|
|
446
|
+
x(i, !0);
|
|
447
447
|
},
|
|
448
448
|
isDateInSelectedRange: (i) => {
|
|
449
|
-
if (!s.value || !
|
|
449
|
+
if (!s.value || !u.value) return {
|
|
450
450
|
isInRange: !1,
|
|
451
451
|
isStart: !1,
|
|
452
452
|
isEnd: !1
|
|
453
453
|
};
|
|
454
|
-
const
|
|
454
|
+
const p = new Date(i.replace(/\./g, "-")), y = new Date(s.value.replace(/\./g, "-")), $ = new Date(u.value.replace(/\./g, "-")), C = i === s.value, E = i === u.value;
|
|
455
455
|
return {
|
|
456
|
-
isInRange:
|
|
457
|
-
isStart:
|
|
458
|
-
isEnd:
|
|
456
|
+
isInRange: p >= y && p <= $,
|
|
457
|
+
isStart: C,
|
|
458
|
+
isEnd: E
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
let
|
|
465
|
-
const { ignore: n, event: s = "click" } = typeof r == "string" ? { ignore: r } : r,
|
|
466
|
-
|
|
467
|
-
const
|
|
468
|
-
e.value?.contains(
|
|
469
|
-
}, document.addEventListener(s,
|
|
463
|
+
function ft(e, a, r = {}) {
|
|
464
|
+
let l = null;
|
|
465
|
+
const { ignore: n, event: s = "click" } = typeof r == "string" ? { ignore: r } : r, u = () => {
|
|
466
|
+
l = (f) => {
|
|
467
|
+
const w = f.target;
|
|
468
|
+
e.value?.contains(w) || n && w.closest(n) || a();
|
|
469
|
+
}, document.addEventListener(s, l);
|
|
470
470
|
}, h = () => {
|
|
471
|
-
if (
|
|
471
|
+
if (l) {
|
|
472
472
|
const f = typeof r == "string" ? "click" : r.event || "click";
|
|
473
|
-
document.removeEventListener(f,
|
|
473
|
+
document.removeEventListener(f, l), l = null;
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
|
-
return
|
|
477
|
-
|
|
478
|
-
}),
|
|
476
|
+
return ie(() => {
|
|
477
|
+
u();
|
|
478
|
+
}), fe(() => {
|
|
479
479
|
h();
|
|
480
480
|
}), {
|
|
481
|
-
setupGlobalListeners:
|
|
481
|
+
setupGlobalListeners: u,
|
|
482
482
|
removeGlobalListeners: h
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
|
-
var
|
|
485
|
+
var vt = [
|
|
486
486
|
"일",
|
|
487
487
|
"월",
|
|
488
488
|
"화",
|
|
@@ -490,7 +490,7 @@ var Me = [
|
|
|
490
490
|
"목",
|
|
491
491
|
"금",
|
|
492
492
|
"토"
|
|
493
|
-
],
|
|
493
|
+
], pt = A({
|
|
494
494
|
name: "KrdsDateInput",
|
|
495
495
|
props: {
|
|
496
496
|
modelValue: {
|
|
@@ -561,51 +561,51 @@ var Me = [
|
|
|
561
561
|
"focus",
|
|
562
562
|
"blur"
|
|
563
563
|
],
|
|
564
|
-
setup(e, { emit:
|
|
565
|
-
const r =
|
|
566
|
-
n.value &&
|
|
564
|
+
setup(e, { emit: a }) {
|
|
565
|
+
const r = B(), l = B(), n = B(!1), s = B(null), { currentYear: u, currentMonth: h, selectedStartDate: f, selectedEndDate: w, yearOptions: m, monthOptions: T, prevMonth: S, nextMonth: x, handleDateSelection: c, selectToday: o, isDateInSelectedRange: i } = ct(e.initialYear, e.initialMonth), p = () => {
|
|
566
|
+
n.value && l.value?.focus(), n.value = !1, s.value = null;
|
|
567
567
|
};
|
|
568
|
-
|
|
569
|
-
const
|
|
570
|
-
const
|
|
568
|
+
ft(r, p, ".calendar-conts");
|
|
569
|
+
const y = b(() => {
|
|
570
|
+
const L = [
|
|
571
571
|
"krds-input",
|
|
572
572
|
"datepicker",
|
|
573
573
|
"cal"
|
|
574
574
|
];
|
|
575
|
-
return e.size &&
|
|
576
|
-
}),
|
|
575
|
+
return e.size && L.push(e.size), e.class && L.push(e.class), L;
|
|
576
|
+
}), $ = b(() => ["form-conts", "calendar-conts"]), C = b(() => ({
|
|
577
577
|
"krds-calendar-area": !0,
|
|
578
578
|
active: n.value
|
|
579
|
-
})),
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
const
|
|
583
|
-
for (let
|
|
584
|
-
const
|
|
585
|
-
for (let
|
|
586
|
-
const
|
|
587
|
-
|
|
579
|
+
})), E = b(() => {
|
|
580
|
+
const L = u.value, R = h.value, Y = new Date(L, R - 1, 1), V = new Date(Y);
|
|
581
|
+
V.setDate(V.getDate() - Y.getDay());
|
|
582
|
+
const F = [], z = new Date(V);
|
|
583
|
+
for (let O = 0; O < 6; O++) {
|
|
584
|
+
const U = [];
|
|
585
|
+
for (let J = 0; J < 7; J++) {
|
|
586
|
+
const ee = `${z.getFullYear()}.${String(z.getMonth() + 1).padStart(2, "0")}.${String(z.getDate()).padStart(2, "0")}`, oe = z.getDay();
|
|
587
|
+
U.push({
|
|
588
588
|
day: z.getDate(),
|
|
589
|
-
dateString:
|
|
590
|
-
isCurrentMonth: z.getMonth() ===
|
|
589
|
+
dateString: ee,
|
|
590
|
+
isCurrentMonth: z.getMonth() === R - 1,
|
|
591
591
|
isToday: z.toDateString() === (/* @__PURE__ */ new Date()).toDateString(),
|
|
592
|
-
isPrevMonth: z.getMonth() <
|
|
593
|
-
isNextMonth: z.getMonth() >
|
|
594
|
-
isSunday:
|
|
595
|
-
isSaturday:
|
|
592
|
+
isPrevMonth: z.getMonth() < R - 1 || z.getMonth() === 11 && R === 1,
|
|
593
|
+
isNextMonth: z.getMonth() > R - 1 || z.getMonth() === 0 && R === 12,
|
|
594
|
+
isSunday: oe === 0,
|
|
595
|
+
isSaturday: oe === 6
|
|
596
596
|
}), z.setDate(z.getDate() + 1);
|
|
597
597
|
}
|
|
598
|
-
|
|
598
|
+
F.push(U);
|
|
599
599
|
}
|
|
600
|
-
return
|
|
601
|
-
}),
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
604
|
-
const
|
|
605
|
-
|
|
600
|
+
return F;
|
|
601
|
+
}), D = (L) => {
|
|
602
|
+
const R = [];
|
|
603
|
+
if (L.isPrevMonth && R.push("old"), L.isNextMonth && R.push("new"), L.isToday && R.push("today"), L.isSunday && R.push("day-off"), e.holidays?.includes(L.dateString) && R.push("day-off"), e.eventDates?.includes(L.dateString) && R.push("day-event"), L.isCurrentMonth) {
|
|
604
|
+
const Y = i(L.dateString);
|
|
605
|
+
Y.isInRange && (R.push("period"), Y.isStart && R.push("start"), Y.isEnd && R.push("end"));
|
|
606
606
|
}
|
|
607
|
-
return
|
|
608
|
-
},
|
|
607
|
+
return R;
|
|
608
|
+
}, _ = b(() => [
|
|
609
609
|
{
|
|
610
610
|
id: "get-today",
|
|
611
611
|
label: "오늘",
|
|
@@ -620,7 +620,7 @@ var Me = [
|
|
|
620
620
|
class: void 0,
|
|
621
621
|
variant: "tertiary",
|
|
622
622
|
size: "small",
|
|
623
|
-
handler:
|
|
623
|
+
handler: p
|
|
624
624
|
},
|
|
625
625
|
{
|
|
626
626
|
id: "confirm-btn",
|
|
@@ -628,64 +628,64 @@ var Me = [
|
|
|
628
628
|
class: void 0,
|
|
629
629
|
variant: "primary",
|
|
630
630
|
size: "small",
|
|
631
|
-
handler:
|
|
631
|
+
handler: N
|
|
632
632
|
}
|
|
633
|
-
]),
|
|
634
|
-
s.value ===
|
|
635
|
-
},
|
|
636
|
-
|
|
637
|
-
},
|
|
638
|
-
h.value =
|
|
639
|
-
},
|
|
640
|
-
f.value && (
|
|
641
|
-
},
|
|
633
|
+
]), v = (L) => {
|
|
634
|
+
s.value === L ? s.value = null : s.value = L;
|
|
635
|
+
}, M = (L) => {
|
|
636
|
+
u.value = L, s.value = null;
|
|
637
|
+
}, I = (L) => {
|
|
638
|
+
h.value = L, s.value = null;
|
|
639
|
+
}, N = () => {
|
|
640
|
+
f.value && (w.value && f.value !== w.value ? a("update:modelValue", `${f.value} ~ ${w.value}`) : a("update:modelValue", f.value), p());
|
|
641
|
+
}, H = () => {
|
|
642
642
|
n.value = !0, s.value = null, setTimeout(() => {
|
|
643
643
|
r.value?.querySelector(".calendar-wrap")?.focus();
|
|
644
644
|
}, 50);
|
|
645
|
-
},
|
|
646
|
-
n.value ?
|
|
647
|
-
},
|
|
648
|
-
|
|
649
|
-
},
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
},
|
|
653
|
-
|
|
654
|
-
},
|
|
655
|
-
|
|
656
|
-
},
|
|
657
|
-
|
|
658
|
-
},
|
|
659
|
-
const
|
|
645
|
+
}, G = () => {
|
|
646
|
+
n.value ? p() : H();
|
|
647
|
+
}, j = (L) => {
|
|
648
|
+
L.code === "Escape" && (s.value ? s.value = null : n.value && p());
|
|
649
|
+
}, X = (L) => {
|
|
650
|
+
const R = L.target;
|
|
651
|
+
a("update:modelValue", R.value), a("input", L);
|
|
652
|
+
}, le = (L) => {
|
|
653
|
+
a("change", L);
|
|
654
|
+
}, ue = (L) => {
|
|
655
|
+
a("focus", L);
|
|
656
|
+
}, ae = (L) => {
|
|
657
|
+
a("blur", L);
|
|
658
|
+
}, Q = (L) => {
|
|
659
|
+
const R = L === "year", Y = R ? m.value : T.value, V = R ? u.value : h.value, F = (z) => R ? `${z}년` : `${z.toString().padStart(2, "0")}월`;
|
|
660
660
|
return t("div", { class: "calendar-drop-down" }, [t("button", {
|
|
661
661
|
type: "button",
|
|
662
|
-
class: `btn-cal-switch ${
|
|
663
|
-
"aria-label":
|
|
664
|
-
"aria-expanded": s.value ===
|
|
665
|
-
onClick: () =>
|
|
666
|
-
},
|
|
662
|
+
class: `btn-cal-switch ${L}`,
|
|
663
|
+
"aria-label": R ? "연도 선택" : "월 선택",
|
|
664
|
+
"aria-expanded": s.value === L,
|
|
665
|
+
onClick: () => v(L)
|
|
666
|
+
}, F(V)), ve(t("div", { class: `calendar-select ${R ? "calendar-year-wrap" : "calendar-mon-wrap"}` }, [t("ul", { class: `sel ${L}` }, Y.map((z) => t("li", { key: z }, [t("button", {
|
|
667
667
|
type: "button",
|
|
668
|
-
class: { active: z ===
|
|
669
|
-
onClick: () =>
|
|
670
|
-
},
|
|
671
|
-
},
|
|
672
|
-
t("caption", null, `${
|
|
673
|
-
t("thead", null, [t("tr", null,
|
|
674
|
-
t("tbody", null,
|
|
675
|
-
key:
|
|
676
|
-
class:
|
|
677
|
-
"data-date":
|
|
668
|
+
class: { active: z === V },
|
|
669
|
+
onClick: () => R ? M(z) : I(z)
|
|
670
|
+
}, F(z))])))]), [[pe, s.value === L]])]);
|
|
671
|
+
}, ne = () => t("table", { class: "calendar-tbl" }, [
|
|
672
|
+
t("caption", null, `${u.value}년 ${h.value.toString().padStart(2, "0")}월`),
|
|
673
|
+
t("thead", null, [t("tr", null, vt.map((L) => t("th", null, L)))]),
|
|
674
|
+
t("tbody", null, E.value.map((L, R) => t("tr", { key: R }, L.map((Y, V) => t("td", {
|
|
675
|
+
key: V,
|
|
676
|
+
class: D(Y),
|
|
677
|
+
"data-date": Y.dateString
|
|
678
678
|
}, [t("button", {
|
|
679
679
|
type: "button",
|
|
680
680
|
class: "btn-set-date",
|
|
681
|
-
"aria-pressed": i(
|
|
682
|
-
onClick: () =>
|
|
683
|
-
}, [t("span", null, String(
|
|
681
|
+
"aria-pressed": i(Y.dateString).isInRange ? "true" : "false",
|
|
682
|
+
onClick: () => c(Y.dateString)
|
|
683
|
+
}, [t("span", null, String(Y.day))])])))))
|
|
684
684
|
]);
|
|
685
|
-
return () => t("div", { class: "form-conts" }, [t("div", { class:
|
|
685
|
+
return () => t("div", { class: "form-conts" }, [t("div", { class: $.value }, [t("div", { class: "calendar-input" }, [t("input", {
|
|
686
686
|
id: e.id,
|
|
687
687
|
name: e.name,
|
|
688
|
-
class:
|
|
688
|
+
class: y.value,
|
|
689
689
|
placeholder: e.placeholder,
|
|
690
690
|
value: e.modelValue,
|
|
691
691
|
readonly: e.readonly,
|
|
@@ -693,51 +693,51 @@ var Me = [
|
|
|
693
693
|
required: e.required,
|
|
694
694
|
autofocus: e.autofocus,
|
|
695
695
|
type: "text",
|
|
696
|
-
onInput:
|
|
697
|
-
onChange:
|
|
698
|
-
onFocus:
|
|
699
|
-
onBlur:
|
|
696
|
+
onInput: X,
|
|
697
|
+
onChange: le,
|
|
698
|
+
onFocus: ue,
|
|
699
|
+
onBlur: ae
|
|
700
700
|
}), t("button", {
|
|
701
|
-
ref:
|
|
701
|
+
ref: l,
|
|
702
702
|
class: `krds-btn ${e.size || "medium"} icon form-btn-datepicker`,
|
|
703
703
|
disabled: e.disabled,
|
|
704
704
|
"aria-expanded": n.value,
|
|
705
705
|
type: "button",
|
|
706
|
-
onClick:
|
|
706
|
+
onClick: G
|
|
707
707
|
}, [t("span", { class: "sr-only" }, "달력 열기"), t("i", { class: "svg-icon ico-calendar" })])]), t("div", {
|
|
708
708
|
ref: r,
|
|
709
|
-
class:
|
|
710
|
-
}, [
|
|
709
|
+
class: C.value
|
|
710
|
+
}, [ve(t("div", {
|
|
711
711
|
class: "calendar-wrap bottom",
|
|
712
712
|
"aria-label": "달력",
|
|
713
713
|
tabindex: "0",
|
|
714
|
-
onKeydown:
|
|
714
|
+
onKeydown: j
|
|
715
715
|
}, [
|
|
716
716
|
t("div", { class: "calendar-head" }, [
|
|
717
717
|
t("button", {
|
|
718
718
|
type: "button",
|
|
719
719
|
class: "btn-cal-move prev",
|
|
720
|
-
onClick:
|
|
720
|
+
onClick: S
|
|
721
721
|
}, [t("span", { class: "sr-only" }, "이전 달")]),
|
|
722
|
-
t("div", { class: "calendar-switch-wrap" }, [
|
|
722
|
+
t("div", { class: "calendar-switch-wrap" }, [Q("year"), Q("month")]),
|
|
723
723
|
t("button", {
|
|
724
724
|
type: "button",
|
|
725
725
|
class: "btn-cal-move next",
|
|
726
|
-
onClick:
|
|
726
|
+
onClick: x
|
|
727
727
|
}, [t("span", { class: "sr-only" }, "다음 달")])
|
|
728
728
|
]),
|
|
729
|
-
t("div", { class: "calendar-body" }, [t("div", { class: "calendar-table-wrap" }, [
|
|
730
|
-
t("div", { class: "calendar-footer" }, [t("div", { class: "calendar-btn-wrap" },
|
|
731
|
-
id:
|
|
732
|
-
key:
|
|
733
|
-
class:
|
|
734
|
-
variant:
|
|
735
|
-
size:
|
|
736
|
-
onClick:
|
|
737
|
-
}, { default: () =>
|
|
738
|
-
]), [[
|
|
729
|
+
t("div", { class: "calendar-body" }, [t("div", { class: "calendar-table-wrap" }, [ne()])]),
|
|
730
|
+
t("div", { class: "calendar-footer" }, [t("div", { class: "calendar-btn-wrap" }, _.value.map((L) => t($e, {
|
|
731
|
+
id: L.id,
|
|
732
|
+
key: L.id,
|
|
733
|
+
class: L.class,
|
|
734
|
+
variant: L.variant,
|
|
735
|
+
size: L.size,
|
|
736
|
+
onClick: L.handler
|
|
737
|
+
}, { default: () => L.label })))])
|
|
738
|
+
]), [[pe, n.value]])])])]);
|
|
739
739
|
}
|
|
740
|
-
}),
|
|
740
|
+
}), gt = pt, ht = A({
|
|
741
741
|
name: "KrdsTextarea",
|
|
742
742
|
props: {
|
|
743
743
|
modelValue: {
|
|
@@ -818,33 +818,33 @@ var Me = [
|
|
|
818
818
|
"keydown",
|
|
819
819
|
"keyup"
|
|
820
820
|
],
|
|
821
|
-
setup(e, { emit:
|
|
822
|
-
const r =
|
|
823
|
-
|
|
821
|
+
setup(e, { emit: a }) {
|
|
822
|
+
const r = B(0);
|
|
823
|
+
se(() => e.modelValue, (o) => {
|
|
824
824
|
r.value = (o || "").length;
|
|
825
825
|
}, { immediate: !0 });
|
|
826
|
-
const
|
|
826
|
+
const l = b(() => {
|
|
827
827
|
const o = ["krds-input"];
|
|
828
828
|
return e.size && o.push(e.size), e.class && o.push(e.class), o;
|
|
829
|
-
}), n =
|
|
829
|
+
}), n = b(() => {
|
|
830
830
|
const o = {};
|
|
831
831
|
return e.resize && (o.resize = e.resize), o;
|
|
832
832
|
}), s = (o) => {
|
|
833
833
|
const i = o.target.value;
|
|
834
|
-
r.value = i.length,
|
|
835
|
-
},
|
|
836
|
-
|
|
834
|
+
r.value = i.length, a("update:modelValue", i), a("input", o);
|
|
835
|
+
}, u = (o) => {
|
|
836
|
+
a("change", o);
|
|
837
837
|
}, h = (o) => {
|
|
838
|
-
|
|
838
|
+
a("focus", o);
|
|
839
839
|
}, f = (o) => {
|
|
840
|
-
|
|
841
|
-
},
|
|
842
|
-
|
|
843
|
-
},
|
|
844
|
-
|
|
845
|
-
},
|
|
840
|
+
a("blur", o);
|
|
841
|
+
}, w = (o) => {
|
|
842
|
+
a("keydown", o);
|
|
843
|
+
}, m = (o) => {
|
|
844
|
+
a("keyup", o);
|
|
845
|
+
}, T = b(() => {
|
|
846
846
|
const o = {
|
|
847
|
-
class:
|
|
847
|
+
class: l.value,
|
|
848
848
|
style: n.value,
|
|
849
849
|
value: e.modelValue,
|
|
850
850
|
placeholder: e.placeholder,
|
|
@@ -857,23 +857,23 @@ var Me = [
|
|
|
857
857
|
rows: e.rows,
|
|
858
858
|
cols: e.cols,
|
|
859
859
|
onInput: s,
|
|
860
|
-
onChange:
|
|
860
|
+
onChange: u,
|
|
861
861
|
onFocus: h,
|
|
862
862
|
onBlur: f,
|
|
863
|
-
onKeydown:
|
|
864
|
-
onKeyup:
|
|
863
|
+
onKeydown: w,
|
|
864
|
+
onKeyup: m
|
|
865
865
|
};
|
|
866
866
|
return e.maxlength !== void 0 && (o.maxlength = e.maxlength), e.minlength !== void 0 && (o.minlength = e.minlength), o;
|
|
867
|
-
}),
|
|
867
|
+
}), S = b(() => ["form-conts"]), x = b(() => ["textarea-wrap"]), c = b(() => e.showCount ? {
|
|
868
868
|
current: r.value,
|
|
869
869
|
max: e.maxlength || ""
|
|
870
870
|
} : null);
|
|
871
871
|
return () => {
|
|
872
|
-
const o = [t("textarea",
|
|
873
|
-
return
|
|
872
|
+
const o = [t("textarea", T.value)];
|
|
873
|
+
return c.value && o.push(t("p", { class: "textarea-count" }, [t("span", { class: "count-now" }, c.value.current), t("span", { class: "count-total" }, c.value.max ? `/${c.value.max}` : "")])), t("div", { class: S.value }, [t("div", { class: x.value }, o)]);
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
|
-
}),
|
|
876
|
+
}), yt = ht, mt = A({
|
|
877
877
|
name: "KrdsSelect",
|
|
878
878
|
props: {
|
|
879
879
|
modelValue: {
|
|
@@ -930,19 +930,19 @@ var Me = [
|
|
|
930
930
|
"focus",
|
|
931
931
|
"blur"
|
|
932
932
|
],
|
|
933
|
-
setup(e, { emit:
|
|
934
|
-
const
|
|
935
|
-
const
|
|
936
|
-
return e.sort ?
|
|
937
|
-
}), n = (
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
}, s = (
|
|
941
|
-
|
|
942
|
-
},
|
|
943
|
-
|
|
944
|
-
}, h =
|
|
945
|
-
class:
|
|
933
|
+
setup(e, { emit: a, slots: r }) {
|
|
934
|
+
const l = b(() => {
|
|
935
|
+
const m = [];
|
|
936
|
+
return e.sort ? m.push("krds-form-select-sort") : m.push("krds-form-select"), e.size && m.push(e.size), e.class && m.push(e.class), m;
|
|
937
|
+
}), n = (m) => {
|
|
938
|
+
const T = m.target;
|
|
939
|
+
a("update:modelValue", T.value === "" ? null : T.value);
|
|
940
|
+
}, s = (m) => {
|
|
941
|
+
a("focus", m);
|
|
942
|
+
}, u = (m) => {
|
|
943
|
+
a("blur", m);
|
|
944
|
+
}, h = b(() => ({
|
|
945
|
+
class: l.value,
|
|
946
946
|
value: e.modelValue ?? "",
|
|
947
947
|
title: e.title || e.placeholder,
|
|
948
948
|
name: e.name,
|
|
@@ -950,30 +950,30 @@ var Me = [
|
|
|
950
950
|
disabled: e.disabled || e.readonly,
|
|
951
951
|
onChange: n,
|
|
952
952
|
onFocus: s,
|
|
953
|
-
onBlur:
|
|
954
|
-
})), f =
|
|
955
|
-
const
|
|
956
|
-
return e.state !== "default" &&
|
|
957
|
-
}),
|
|
958
|
-
const
|
|
959
|
-
return e.placeholder && !e.modelValue &&
|
|
953
|
+
onBlur: u
|
|
954
|
+
})), f = b(() => {
|
|
955
|
+
const m = ["form-conts"];
|
|
956
|
+
return e.state !== "default" && m.push(`is-${e.state}`), m;
|
|
957
|
+
}), w = () => {
|
|
958
|
+
const m = [];
|
|
959
|
+
return e.placeholder && !e.modelValue && m.push(t("option", {
|
|
960
960
|
value: "",
|
|
961
961
|
disabled: !0,
|
|
962
962
|
selected: !0
|
|
963
|
-
}, e.placeholder)), e.options && e.options.length > 0 && e.options.forEach((
|
|
964
|
-
|
|
965
|
-
value:
|
|
966
|
-
disabled:
|
|
967
|
-
selected:
|
|
968
|
-
},
|
|
969
|
-
}), r.default &&
|
|
963
|
+
}, e.placeholder)), e.options && e.options.length > 0 && e.options.forEach((T) => {
|
|
964
|
+
m.push(t("option", {
|
|
965
|
+
value: T.value,
|
|
966
|
+
disabled: T.disabled,
|
|
967
|
+
selected: T.value === e.modelValue
|
|
968
|
+
}, T.label));
|
|
969
|
+
}), r.default && m.push(...r.default()), m;
|
|
970
970
|
};
|
|
971
971
|
return () => {
|
|
972
|
-
const
|
|
973
|
-
return e.sort ?
|
|
972
|
+
const m = t("select", h.value, w());
|
|
973
|
+
return e.sort ? m : t("div", { class: f.value }, [m]);
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
}),
|
|
976
|
+
}), bt = mt, kt = 0, St = A({
|
|
977
977
|
name: "KrdsFileUpload",
|
|
978
978
|
props: {
|
|
979
979
|
modelValue: {
|
|
@@ -1074,128 +1074,128 @@ var Me = [
|
|
|
1074
1074
|
"download",
|
|
1075
1075
|
"preview"
|
|
1076
1076
|
],
|
|
1077
|
-
setup(e, { emit:
|
|
1078
|
-
const r =
|
|
1079
|
-
const
|
|
1080
|
-
return
|
|
1081
|
-
}, h = (
|
|
1082
|
-
const
|
|
1083
|
-
return
|
|
1084
|
-
}, f = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
1085
|
-
if (e.maxFileSize &&
|
|
1077
|
+
setup(e, { emit: a }) {
|
|
1078
|
+
const r = B(!1), l = B(null), n = e.id ? `${e.id}-input` : `krds-file-upload-${++kt}`, s = (v) => v < 1024 ? `${v}B` : v < 1048576 ? `${Math.round(v / 1024)}KB` : `${(v / 1048576).toFixed(1)}MB`, u = (v) => {
|
|
1079
|
+
const M = v.split(".");
|
|
1080
|
+
return M.length > 1 ? M.pop().toLowerCase() : "";
|
|
1081
|
+
}, h = (v) => {
|
|
1082
|
+
const M = u(v.name), I = M ? v.name.slice(0, -(M.length + 1)) : v.name;
|
|
1083
|
+
return M ? `${I} [${M}, ${s(v.size)}]` : `${v.name} [${s(v.size)}]`;
|
|
1084
|
+
}, f = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, w = (v) => {
|
|
1085
|
+
if (e.maxFileSize && v.size > e.maxFileSize) return `등록 가능한 파일 용량을 초과하였습니다.
|
|
1086
1086
|
${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
1087
1087
|
if (e.accept) {
|
|
1088
|
-
const
|
|
1089
|
-
if (!
|
|
1088
|
+
const M = e.accept.split(",").map((H) => H.trim().toLowerCase()), I = `.${u(v.name)}`, N = v.type;
|
|
1089
|
+
if (!M.some((H) => H.startsWith(".") ? I === H : H.endsWith("/*") ? N.startsWith(H.replace("/*", "/")) : N === H)) return "허용되지 않는 파일 형식입니다.";
|
|
1090
1090
|
}
|
|
1091
1091
|
return null;
|
|
1092
|
-
},
|
|
1092
|
+
}, m = (v) => {
|
|
1093
1093
|
if (e.disabled || e.readonly) return;
|
|
1094
|
-
let
|
|
1095
|
-
!e.multiple &&
|
|
1096
|
-
const
|
|
1097
|
-
for (let
|
|
1098
|
-
const
|
|
1094
|
+
let M = [...e.modelValue || []];
|
|
1095
|
+
!e.multiple && M.length > 0 && (M = []);
|
|
1096
|
+
const I = [];
|
|
1097
|
+
for (let N = 0; N < v.length && !(M.length + I.length >= e.maxFiles); N++) {
|
|
1098
|
+
const H = v[N], G = w(H), j = {
|
|
1099
1099
|
id: f(),
|
|
1100
|
-
file:
|
|
1101
|
-
name:
|
|
1102
|
-
size:
|
|
1103
|
-
type:
|
|
1104
|
-
status:
|
|
1105
|
-
errorMessage:
|
|
1100
|
+
file: H,
|
|
1101
|
+
name: H.name,
|
|
1102
|
+
size: H.size,
|
|
1103
|
+
type: H.type,
|
|
1104
|
+
status: G ? "error" : "pending",
|
|
1105
|
+
errorMessage: G || void 0
|
|
1106
1106
|
};
|
|
1107
|
-
|
|
1107
|
+
I.push(j), G ? a("file-error", j, G) : a("file-added", j);
|
|
1108
1108
|
}
|
|
1109
|
-
|
|
1110
|
-
},
|
|
1111
|
-
const
|
|
1112
|
-
|
|
1113
|
-
},
|
|
1114
|
-
e.disabled || e.readonly || !e.dragAndDrop || (
|
|
1115
|
-
},
|
|
1109
|
+
I.length > 0 && a("update:modelValue", [...M, ...I]);
|
|
1110
|
+
}, T = (v) => {
|
|
1111
|
+
const M = v.target;
|
|
1112
|
+
M.files?.length && (m(M.files), M.value = "");
|
|
1113
|
+
}, S = (v) => {
|
|
1114
|
+
e.disabled || e.readonly || !e.dragAndDrop || (v.preventDefault(), r.value = !0);
|
|
1115
|
+
}, x = () => {
|
|
1116
1116
|
r.value = !1;
|
|
1117
|
-
},
|
|
1118
|
-
|
|
1117
|
+
}, c = (v) => {
|
|
1118
|
+
v.preventDefault(), r.value = !1, !(e.disabled || e.readonly || !e.dragAndDrop) && v.dataTransfer?.files && m(v.dataTransfer.files);
|
|
1119
1119
|
}, o = () => {
|
|
1120
|
-
e.disabled || e.readonly ||
|
|
1121
|
-
}, i = (
|
|
1122
|
-
e.disabled || e.readonly || (
|
|
1123
|
-
},
|
|
1124
|
-
e.disabled || e.readonly || (
|
|
1125
|
-
},
|
|
1126
|
-
const
|
|
1127
|
-
return e.class &&
|
|
1128
|
-
}),
|
|
1120
|
+
e.disabled || e.readonly || l.value?.click();
|
|
1121
|
+
}, i = (v) => {
|
|
1122
|
+
e.disabled || e.readonly || (a("update:modelValue", (e.modelValue || []).filter((M) => M.id !== v)), a("file-removed", v));
|
|
1123
|
+
}, p = () => {
|
|
1124
|
+
e.disabled || e.readonly || (a("update:modelValue", []), a("clear-all"));
|
|
1125
|
+
}, y = b(() => {
|
|
1126
|
+
const v = ["krds-file-upload", "line"];
|
|
1127
|
+
return e.class && v.push(e.class), v;
|
|
1128
|
+
}), $ = () => t("div", { class: "file-head" }, [t("h3", { class: "tit" }, e.title), t("div", null, [t("p", null, e.description)])]), C = () => t("div", {
|
|
1129
1129
|
class: "file-upload",
|
|
1130
|
-
onDragover:
|
|
1131
|
-
onDragleave:
|
|
1132
|
-
onDrop:
|
|
1130
|
+
onDragover: S,
|
|
1131
|
+
onDragleave: x,
|
|
1132
|
+
onDrop: c
|
|
1133
1133
|
}, [t("p", { class: "txt" }, e.placeholder), t("div", { class: "file-upload-btn-wrap" }, [t("input", {
|
|
1134
|
-
ref:
|
|
1134
|
+
ref: l,
|
|
1135
1135
|
type: "file",
|
|
1136
1136
|
name: e.name || "myFile",
|
|
1137
1137
|
id: n,
|
|
1138
1138
|
hidden: !0,
|
|
1139
1139
|
accept: e.accept || void 0,
|
|
1140
1140
|
multiple: e.multiple,
|
|
1141
|
-
onChange:
|
|
1141
|
+
onChange: T
|
|
1142
1142
|
}), t("label", { for: n }, [t("button", {
|
|
1143
1143
|
type: "button",
|
|
1144
1144
|
class: ["krds-btn", e.size],
|
|
1145
1145
|
disabled: e.disabled || void 0,
|
|
1146
1146
|
onClick: o
|
|
1147
|
-
}, [t("i", { class: "svg-icon ico-upload" }), "파일선택"])])])]),
|
|
1148
|
-
const
|
|
1149
|
-
return
|
|
1147
|
+
}, [t("i", { class: "svg-icon ico-upload" }), "파일선택"])])])]), E = (v) => {
|
|
1148
|
+
const M = [];
|
|
1149
|
+
return v.status === "uploading" ? M.push(t("span", {
|
|
1150
1150
|
class: "krds-spinner",
|
|
1151
1151
|
role: "status"
|
|
1152
|
-
}, [t("span", { class: "sr-only" }, "업로드 중")])) :
|
|
1152
|
+
}, [t("span", { class: "sr-only" }, "업로드 중")])) : v.downloadUrl ? (e.showDownload && M.push(t("button", {
|
|
1153
1153
|
type: "button",
|
|
1154
1154
|
class: "krds-btn medium text",
|
|
1155
|
-
onClick: () =>
|
|
1156
|
-
}, ["다운로드 ", t("i", { class: "svg-icon ico-down" })])), e.showPreviewButton &&
|
|
1155
|
+
onClick: () => a("download", v)
|
|
1156
|
+
}, ["다운로드 ", t("i", { class: "svg-icon ico-down" })])), e.showPreviewButton && M.push(t("button", {
|
|
1157
1157
|
type: "button",
|
|
1158
1158
|
class: "krds-btn medium text",
|
|
1159
|
-
onClick: () =>
|
|
1160
|
-
}, ["바로보기 ", t("i", { class: "svg-icon ico-angle right" })]))) :
|
|
1159
|
+
onClick: () => a("preview", v)
|
|
1160
|
+
}, ["바로보기 ", t("i", { class: "svg-icon ico-angle right" })]))) : v.status === "completed" ? M.push(t("span", { class: "ico-invalid complete" }, [t("em", { class: "sr-only" }, "업로드 완료")])) : e.readonly || M.push(t("button", {
|
|
1161
1161
|
type: "button",
|
|
1162
1162
|
class: "krds-btn medium text",
|
|
1163
1163
|
disabled: e.disabled || void 0,
|
|
1164
|
-
onClick: () => i(
|
|
1165
|
-
}, ["삭제 ", t("i", { class: "svg-icon ico-delete-fill" })])),
|
|
1166
|
-
},
|
|
1167
|
-
const
|
|
1168
|
-
if (
|
|
1169
|
-
const
|
|
1170
|
-
`),
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
}),
|
|
1164
|
+
onClick: () => i(v.id)
|
|
1165
|
+
}, ["삭제 ", t("i", { class: "svg-icon ico-delete-fill" })])), M;
|
|
1166
|
+
}, D = (v) => {
|
|
1167
|
+
const M = [t("div", { class: v.downloadUrl ? "file-info m-column" : "file-info" }, [t("div", { class: "file-name" }, h(v)), t("div", { class: "btn-wrap" }, E(v))])];
|
|
1168
|
+
if (v.status === "error" && v.errorMessage) {
|
|
1169
|
+
const I = v.errorMessage.split(`
|
|
1170
|
+
`), N = [];
|
|
1171
|
+
I.forEach((H, G) => {
|
|
1172
|
+
G > 0 && N.push(t("br")), N.push(H);
|
|
1173
|
+
}), M.push(t("p", { class: "file-hint-invalid" }, N));
|
|
1174
1174
|
}
|
|
1175
1175
|
return t("li", {
|
|
1176
|
-
key:
|
|
1177
|
-
class:
|
|
1178
|
-
},
|
|
1179
|
-
},
|
|
1180
|
-
const
|
|
1181
|
-
return e.showClearAll && !e.readonly &&
|
|
1176
|
+
key: v.id,
|
|
1177
|
+
class: v.status === "error" ? "is-error" : void 0
|
|
1178
|
+
}, M);
|
|
1179
|
+
}, _ = (v) => {
|
|
1180
|
+
const M = v.filter((N) => N.status !== "error").length, I = [t("div", { class: "total" }, [t("span", { class: "current" }, `${M}개`), ` / ${e.maxFiles}개`]), t("ul", { class: "upload-list" }, v.map(D))];
|
|
1181
|
+
return e.showClearAll && !e.readonly && I.push(t("div", { class: "upload-delete-btn" }, [t("button", {
|
|
1182
1182
|
type: "button",
|
|
1183
1183
|
class: "krds-btn xsmall tertiary",
|
|
1184
1184
|
disabled: e.disabled || void 0,
|
|
1185
|
-
onClick:
|
|
1186
|
-
}, ["전체 파일 삭제", t("i", { class: "svg-icon ico-angle right" })])])), t("div", { class: "file-list" },
|
|
1185
|
+
onClick: p
|
|
1186
|
+
}, ["전체 파일 삭제", t("i", { class: "svg-icon ico-angle right" })])])), t("div", { class: "file-list" }, I);
|
|
1187
1187
|
};
|
|
1188
1188
|
return () => {
|
|
1189
|
-
const
|
|
1190
|
-
e.readonly ||
|
|
1191
|
-
const
|
|
1192
|
-
return
|
|
1193
|
-
class:
|
|
1189
|
+
const v = [$()];
|
|
1190
|
+
e.readonly || v.push(C());
|
|
1191
|
+
const M = e.modelValue || [];
|
|
1192
|
+
return M.length > 0 && v.push(_(M)), t("div", {
|
|
1193
|
+
class: y.value,
|
|
1194
1194
|
style: e.style || void 0
|
|
1195
|
-
},
|
|
1195
|
+
}, v);
|
|
1196
1196
|
};
|
|
1197
1197
|
}
|
|
1198
|
-
}),
|
|
1198
|
+
}), wt = St, Kt = A({
|
|
1199
1199
|
name: "KrdsBadge",
|
|
1200
1200
|
props: {
|
|
1201
1201
|
type: {
|
|
@@ -1220,23 +1220,23 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1220
1220
|
}
|
|
1221
1221
|
},
|
|
1222
1222
|
emits: ["click"],
|
|
1223
|
-
setup(e, { emit:
|
|
1224
|
-
const
|
|
1223
|
+
setup(e, { emit: a, slots: r }) {
|
|
1224
|
+
const l = b(() => {
|
|
1225
1225
|
const s = ["krds-badge"];
|
|
1226
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
1227
|
}), n = (s) => {
|
|
1228
|
-
|
|
1228
|
+
a("click", s);
|
|
1229
1229
|
};
|
|
1230
1230
|
return () => t("span", {
|
|
1231
1231
|
type: e.type,
|
|
1232
1232
|
color: e.color,
|
|
1233
1233
|
size: e.size,
|
|
1234
1234
|
number: e.number,
|
|
1235
|
-
class:
|
|
1235
|
+
class: l.value,
|
|
1236
1236
|
onClick: n
|
|
1237
1237
|
}, r.default?.());
|
|
1238
1238
|
}
|
|
1239
|
-
}),
|
|
1239
|
+
}), Ct = Kt, xt = A({
|
|
1240
1240
|
name: "KrdsTag",
|
|
1241
1241
|
props: {
|
|
1242
1242
|
link: {
|
|
@@ -1261,30 +1261,30 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1261
1261
|
}
|
|
1262
1262
|
},
|
|
1263
1263
|
emits: ["remove"],
|
|
1264
|
-
setup(e, { emit:
|
|
1265
|
-
const
|
|
1266
|
-
const
|
|
1267
|
-
return e.link &&
|
|
1268
|
-
}), n = (
|
|
1269
|
-
|
|
1264
|
+
setup(e, { emit: a, slots: r }) {
|
|
1265
|
+
const l = b(() => {
|
|
1266
|
+
const u = ["krds-btn-tag"];
|
|
1267
|
+
return e.link && u.push("link"), e.class && u.push(e.class), u;
|
|
1268
|
+
}), n = (u) => {
|
|
1269
|
+
a("remove", u);
|
|
1270
1270
|
}, s = () => t("button", {
|
|
1271
1271
|
type: "button",
|
|
1272
1272
|
class: "btn-delete",
|
|
1273
1273
|
onClick: n
|
|
1274
1274
|
}, [t("span", { class: "sr-only" }, "삭제")]);
|
|
1275
1275
|
return () => {
|
|
1276
|
-
const
|
|
1277
|
-
if (h &&
|
|
1276
|
+
const u = [], h = r.default?.();
|
|
1277
|
+
if (h && u.push(h), e.link || u.push(s()), e.link) {
|
|
1278
1278
|
const f = {
|
|
1279
1279
|
href: e.href,
|
|
1280
|
-
class:
|
|
1280
|
+
class: l.value
|
|
1281
1281
|
};
|
|
1282
|
-
return e.target && (f.target = e.target), e.rel && (f.rel = e.rel), t("a", f,
|
|
1282
|
+
return e.target && (f.target = e.target), e.rel && (f.rel = e.rel), t("a", f, u);
|
|
1283
1283
|
}
|
|
1284
|
-
return t("span", { class:
|
|
1284
|
+
return t("span", { class: l.value }, u);
|
|
1285
1285
|
};
|
|
1286
1286
|
}
|
|
1287
|
-
}),
|
|
1287
|
+
}), $t = xt, Lt = A({
|
|
1288
1288
|
name: "KrdsTagGroup",
|
|
1289
1289
|
props: {
|
|
1290
1290
|
size: {
|
|
@@ -1296,44 +1296,44 @@ ${s(e.maxFileSize)} 미만의 파일만 등록할 수 있습니다.`;
|
|
|
1296
1296
|
default: void 0
|
|
1297
1297
|
}
|
|
1298
1298
|
},
|
|
1299
|
-
setup(e, { slots:
|
|
1300
|
-
const r =
|
|
1301
|
-
const
|
|
1302
|
-
return e.size &&
|
|
1299
|
+
setup(e, { slots: a }) {
|
|
1300
|
+
const r = b(() => {
|
|
1301
|
+
const l = ["krds-tag-wrap"];
|
|
1302
|
+
return e.size && l.push(e.size), e.class && l.push(e.class), l;
|
|
1303
1303
|
});
|
|
1304
|
-
return () => t("div", { class: r.value },
|
|
1304
|
+
return () => t("div", { class: r.value }, a.default?.());
|
|
1305
1305
|
}
|
|
1306
|
-
}),
|
|
1306
|
+
}), Dt = Lt, Bt = A({
|
|
1307
1307
|
name: "KrdsMasthead",
|
|
1308
1308
|
props: { class: {
|
|
1309
1309
|
type: String,
|
|
1310
1310
|
default: void 0
|
|
1311
1311
|
} },
|
|
1312
1312
|
emits: ["click"],
|
|
1313
|
-
setup(e, { emit:
|
|
1314
|
-
const
|
|
1313
|
+
setup(e, { emit: a, slots: r }) {
|
|
1314
|
+
const l = b(() => {
|
|
1315
1315
|
const s = [""];
|
|
1316
1316
|
return e.class && s.push(e.class), s;
|
|
1317
1317
|
}), n = (s) => {
|
|
1318
|
-
|
|
1318
|
+
a("click", s);
|
|
1319
1319
|
};
|
|
1320
1320
|
return () => t("div", {
|
|
1321
1321
|
id: "krds-masthead",
|
|
1322
|
-
class:
|
|
1322
|
+
class: l.value,
|
|
1323
1323
|
onClick: n
|
|
1324
1324
|
}, [t("div", { class: "toggle-wrap" }, [t("div", { class: "toggle-head" }, [t("div", { class: "inner" }, [t("span", { class: "nuri-txt" }, r.default?.())])])])]);
|
|
1325
1325
|
}
|
|
1326
|
-
}),
|
|
1327
|
-
function
|
|
1328
|
-
return `${e}-${++
|
|
1326
|
+
}), Et = Bt, Tt = 0;
|
|
1327
|
+
function Za(e = "krds") {
|
|
1328
|
+
return `${e}-${++Tt}`;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function el() {
|
|
1331
1331
|
return `${Date.now().toString(36).slice(-4)}${Math.random().toString(36).substring(2, 5)}`;
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function he(...e) {
|
|
1334
1334
|
return e.filter(Boolean).join(" ");
|
|
1335
1335
|
}
|
|
1336
|
-
var
|
|
1336
|
+
var _t = A({
|
|
1337
1337
|
name: "KrdsToggleSwitch",
|
|
1338
1338
|
props: {
|
|
1339
1339
|
modelValue: {
|
|
@@ -1375,23 +1375,23 @@ var lt = D({
|
|
|
1375
1375
|
}
|
|
1376
1376
|
},
|
|
1377
1377
|
emits: ["update:modelValue", "change"],
|
|
1378
|
-
setup(e, { emit:
|
|
1379
|
-
const
|
|
1378
|
+
setup(e, { emit: a, attrs: r }) {
|
|
1379
|
+
const l = `toggle-switch-${de()}`, n = b(() => e.modelValue), s = b(() => he("krds-form-toggle-switch", e.size, e.class)), u = (f) => {
|
|
1380
1380
|
if (e.disabled) return;
|
|
1381
|
-
const
|
|
1382
|
-
|
|
1383
|
-
}, h =
|
|
1381
|
+
const w = f.target.checked;
|
|
1382
|
+
a("update:modelValue", w), a("change", w);
|
|
1383
|
+
}, h = b(() => e.id || l);
|
|
1384
1384
|
return () => t("div", { class: s.value }, [t("input", {
|
|
1385
1385
|
type: "checkbox",
|
|
1386
1386
|
id: h.value,
|
|
1387
1387
|
name: e.name,
|
|
1388
1388
|
checked: n.value,
|
|
1389
1389
|
disabled: e.disabled,
|
|
1390
|
-
onChange:
|
|
1390
|
+
onChange: u,
|
|
1391
1391
|
...r
|
|
1392
1392
|
}), t("label", { for: h.value }, [t("span", { class: "switch-toggle" }, [t("i")]), e.label || ""])]);
|
|
1393
1393
|
}
|
|
1394
|
-
}),
|
|
1394
|
+
}), Mt = _t, At = A({
|
|
1395
1395
|
name: "KrdsCheckArea",
|
|
1396
1396
|
props: {
|
|
1397
1397
|
class: {
|
|
@@ -1403,13 +1403,13 @@ var lt = D({
|
|
|
1403
1403
|
default: !1
|
|
1404
1404
|
}
|
|
1405
1405
|
},
|
|
1406
|
-
setup(e, { slots:
|
|
1406
|
+
setup(e, { slots: a }) {
|
|
1407
1407
|
return () => {
|
|
1408
1408
|
const r = ["krds-check-area"];
|
|
1409
|
-
return e.column && r.push("chk-column"), e.class && r.push(e.class), t("div", { class: r },
|
|
1409
|
+
return e.column && r.push("chk-column"), e.class && r.push(e.class), t("div", { class: r }, a.default?.());
|
|
1410
1410
|
};
|
|
1411
1411
|
}
|
|
1412
|
-
}),
|
|
1412
|
+
}), Vt = At, Pt = A({
|
|
1413
1413
|
name: "KrdsCheckbox",
|
|
1414
1414
|
props: {
|
|
1415
1415
|
modelValue: {
|
|
@@ -1440,28 +1440,28 @@ var lt = D({
|
|
|
1440
1440
|
},
|
|
1441
1441
|
emits: ["update:modelValue"],
|
|
1442
1442
|
slots: Object,
|
|
1443
|
-
setup(e, { emit:
|
|
1444
|
-
const n = `checkbox-${
|
|
1445
|
-
const
|
|
1446
|
-
return
|
|
1447
|
-
}), h = (
|
|
1443
|
+
setup(e, { emit: a, attrs: r, slots: l }) {
|
|
1444
|
+
const n = `checkbox-${de()}`, s = b(() => e.modelValue), u = b(() => {
|
|
1445
|
+
const w = e.chip ? "krds-form-chip" : "krds-form-check";
|
|
1446
|
+
return he(w, e.size, e.class);
|
|
1447
|
+
}), h = (w) => {
|
|
1448
1448
|
if (e.disabled) return;
|
|
1449
|
-
const
|
|
1450
|
-
|
|
1451
|
-
}, f =
|
|
1449
|
+
const m = w.target.checked;
|
|
1450
|
+
a("update:modelValue", m);
|
|
1451
|
+
}, f = b(() => e.id || n);
|
|
1452
1452
|
return () => {
|
|
1453
|
-
const
|
|
1453
|
+
const w = [t("input", {
|
|
1454
1454
|
type: "checkbox",
|
|
1455
1455
|
id: f.value,
|
|
1456
1456
|
checked: s.value,
|
|
1457
1457
|
disabled: e.disabled,
|
|
1458
1458
|
onChange: h,
|
|
1459
1459
|
...r
|
|
1460
|
-
}), t("label", { for: f.value },
|
|
1461
|
-
return
|
|
1460
|
+
}), t("label", { for: f.value }, l.default?.())];
|
|
1461
|
+
return l.description && !e.chip && w.push(t("div", { class: "krds-form-check-cnt" }, t("p", { class: "krds-form-check-p" }, l.description()))), t("div", { class: u.value }, w);
|
|
1462
1462
|
};
|
|
1463
1463
|
}
|
|
1464
|
-
}),
|
|
1464
|
+
}), zt = Pt, Ft = A({
|
|
1465
1465
|
name: "KrdsRadio",
|
|
1466
1466
|
props: {
|
|
1467
1467
|
modelValue: {
|
|
@@ -1508,28 +1508,28 @@ var lt = D({
|
|
|
1508
1508
|
},
|
|
1509
1509
|
emits: ["update:modelValue"],
|
|
1510
1510
|
slots: Object,
|
|
1511
|
-
setup(e, { emit:
|
|
1512
|
-
const n = `radio-${
|
|
1513
|
-
const
|
|
1514
|
-
return
|
|
1515
|
-
}), h = (
|
|
1516
|
-
e.disabled ||
|
|
1517
|
-
}, f =
|
|
1511
|
+
setup(e, { emit: a, attrs: r, slots: l }) {
|
|
1512
|
+
const n = `radio-${de()}`, s = b(() => e.modelValue === e.value), u = b(() => {
|
|
1513
|
+
const m = e.chip ? "krds-form-chip" : "krds-form-check";
|
|
1514
|
+
return he(m, e.size, e.class);
|
|
1515
|
+
}), h = (m) => {
|
|
1516
|
+
e.disabled || m.target.checked && a("update:modelValue", e.value);
|
|
1517
|
+
}, f = b(() => e.id || n), w = b(() => e.name);
|
|
1518
1518
|
return () => {
|
|
1519
|
-
const
|
|
1519
|
+
const m = [t("input", {
|
|
1520
1520
|
type: "radio",
|
|
1521
1521
|
id: f.value,
|
|
1522
|
-
name:
|
|
1522
|
+
name: w.value,
|
|
1523
1523
|
value: String(e.value),
|
|
1524
1524
|
checked: s.value,
|
|
1525
1525
|
disabled: e.disabled,
|
|
1526
1526
|
onChange: h,
|
|
1527
1527
|
...r
|
|
1528
|
-
}), t("label", { for: f.value },
|
|
1529
|
-
return
|
|
1528
|
+
}), t("label", { for: f.value }, l.default?.())];
|
|
1529
|
+
return l.description && !e.chip && m.push(t("div", { class: "krds-form-check-cnt" }, t("p", { class: "krds-form-check-p" }, l.description()))), t("div", { class: u.value }, m);
|
|
1530
1530
|
};
|
|
1531
1531
|
}
|
|
1532
|
-
}),
|
|
1532
|
+
}), Rt = Ft, It = Le, Ht = A({
|
|
1533
1533
|
name: "KrdsStepIndicator",
|
|
1534
1534
|
props: {
|
|
1535
1535
|
modelValue: {
|
|
@@ -1542,24 +1542,24 @@ var lt = D({
|
|
|
1542
1542
|
}
|
|
1543
1543
|
},
|
|
1544
1544
|
emits: ["update:modelValue"],
|
|
1545
|
-
setup(e, { slots:
|
|
1546
|
-
const r =
|
|
1545
|
+
setup(e, { slots: a }) {
|
|
1546
|
+
const r = b(() => {
|
|
1547
1547
|
const h = ["krds-step-wrap"];
|
|
1548
1548
|
return e.class && h.push(e.class), h;
|
|
1549
|
-
}),
|
|
1549
|
+
}), l = (h) => {
|
|
1550
1550
|
const f = e.modelValue || 0;
|
|
1551
1551
|
return h < f ? "done" : h === f ? "active" : "pending";
|
|
1552
|
-
}, n =
|
|
1552
|
+
}, n = B(0), s = () => {
|
|
1553
1553
|
n.value = 0;
|
|
1554
|
-
},
|
|
1555
|
-
return
|
|
1556
|
-
activeStep:
|
|
1557
|
-
getStepStatus:
|
|
1558
|
-
getNextStepIndex:
|
|
1554
|
+
}, u = () => n.value++;
|
|
1555
|
+
return Qe("stepIndicator", {
|
|
1556
|
+
activeStep: b(() => e.modelValue || 0),
|
|
1557
|
+
getStepStatus: l,
|
|
1558
|
+
getNextStepIndex: u,
|
|
1559
1559
|
resetStepIndex: s
|
|
1560
|
-
}), () => (s(), t("ol", { class: r.value },
|
|
1560
|
+
}), () => (s(), t("ol", { class: r.value }, a.default?.()));
|
|
1561
1561
|
}
|
|
1562
|
-
}),
|
|
1562
|
+
}), Ot = Ht, Nt = A({
|
|
1563
1563
|
name: "KrdsStep",
|
|
1564
1564
|
props: {
|
|
1565
1565
|
step: {
|
|
@@ -1580,17 +1580,17 @@ var lt = D({
|
|
|
1580
1580
|
}
|
|
1581
1581
|
},
|
|
1582
1582
|
emits: ["click"],
|
|
1583
|
-
setup(e, { emit:
|
|
1584
|
-
const
|
|
1583
|
+
setup(e, { emit: a, slots: r }) {
|
|
1584
|
+
const l = Xe("stepIndicator"), n = l ? l.getNextStepIndex() : -1, s = b(() => e.status ? e.status : l && n >= 0 ? l.getStepStatus(n) : "pending"), u = b(() => {
|
|
1585
1585
|
const f = [s.value];
|
|
1586
1586
|
return e.class && f.push(e.class), f;
|
|
1587
1587
|
}), h = (f) => {
|
|
1588
|
-
|
|
1588
|
+
a("click", f, e.step);
|
|
1589
1589
|
};
|
|
1590
1590
|
return () => {
|
|
1591
1591
|
const f = s.value === "active";
|
|
1592
1592
|
return t("li", {
|
|
1593
|
-
class:
|
|
1593
|
+
class: u.value,
|
|
1594
1594
|
onClick: h
|
|
1595
1595
|
}, [t("span", [
|
|
1596
1596
|
f && t("em", { class: "sr-only" }, "현재단계"),
|
|
@@ -1600,7 +1600,7 @@ var lt = D({
|
|
|
1600
1600
|
])]);
|
|
1601
1601
|
};
|
|
1602
1602
|
}
|
|
1603
|
-
}),
|
|
1603
|
+
}), qt = Nt, Wt = A({
|
|
1604
1604
|
name: "KrdsSkipLink",
|
|
1605
1605
|
props: {
|
|
1606
1606
|
href: {
|
|
@@ -1621,13 +1621,13 @@ var lt = D({
|
|
|
1621
1621
|
default: "krds-skip-link"
|
|
1622
1622
|
}
|
|
1623
1623
|
},
|
|
1624
|
-
setup(e, { slots:
|
|
1624
|
+
setup(e, { slots: a }) {
|
|
1625
1625
|
return () => t("div", {
|
|
1626
1626
|
id: e.id,
|
|
1627
1627
|
class: e.class
|
|
1628
|
-
}, [t("a", { href: e.href },
|
|
1628
|
+
}, [t("a", { href: e.href }, a.default?.())]);
|
|
1629
1629
|
}
|
|
1630
|
-
}),
|
|
1630
|
+
}), Yt = Wt, jt = A({
|
|
1631
1631
|
name: "KrdsBreadcrumb",
|
|
1632
1632
|
props: {
|
|
1633
1633
|
items: {
|
|
@@ -1648,28 +1648,28 @@ var lt = D({
|
|
|
1648
1648
|
}
|
|
1649
1649
|
},
|
|
1650
1650
|
emits: ["item-click"],
|
|
1651
|
-
setup(e, { emit:
|
|
1652
|
-
const r = (n) => n === e.items.length - 1,
|
|
1653
|
-
n.onClick && n.onClick(s),
|
|
1651
|
+
setup(e, { emit: a }) {
|
|
1652
|
+
const r = (n) => n === e.items.length - 1, l = (n, s) => {
|
|
1653
|
+
n.onClick && n.onClick(s), a("item-click", n, s);
|
|
1654
1654
|
};
|
|
1655
1655
|
return () => t("nav", {
|
|
1656
1656
|
id: e.id,
|
|
1657
1657
|
class: "krds-breadcrumb-wrap",
|
|
1658
1658
|
"aria-label": e.ariaLabel
|
|
1659
1659
|
}, [t("ol", { class: "breadcrumb" }, e.items.map((n, s) => {
|
|
1660
|
-
const
|
|
1660
|
+
const u = s === 0 && e.showHomeIcon;
|
|
1661
1661
|
return t("li", {
|
|
1662
1662
|
key: `breadcrumb-${s}`,
|
|
1663
|
-
class: { home:
|
|
1663
|
+
class: { home: u }
|
|
1664
1664
|
}, [t("a", {
|
|
1665
1665
|
href: n.href || "#",
|
|
1666
1666
|
class: "txt",
|
|
1667
1667
|
"aria-current": r(s) ? "page" : void 0,
|
|
1668
|
-
onClick: (h) =>
|
|
1669
|
-
},
|
|
1668
|
+
onClick: (h) => l(n, h)
|
|
1669
|
+
}, u ? [] : [t("span", null, n.text)])]);
|
|
1670
1670
|
}))]);
|
|
1671
1671
|
}
|
|
1672
|
-
}),
|
|
1672
|
+
}), Gt = jt, Ut = A({
|
|
1673
1673
|
name: "KrdsInPageNavigation",
|
|
1674
1674
|
props: {
|
|
1675
1675
|
title: {
|
|
@@ -1703,114 +1703,109 @@ var lt = D({
|
|
|
1703
1703
|
},
|
|
1704
1704
|
emits: ["itemClick"],
|
|
1705
1705
|
slots: Object,
|
|
1706
|
-
setup(e, { emit:
|
|
1707
|
-
const
|
|
1708
|
-
const
|
|
1709
|
-
return e.class &&
|
|
1710
|
-
}),
|
|
1711
|
-
const
|
|
1712
|
-
return (document.querySelector(
|
|
1713
|
-
}, h = (
|
|
1714
|
-
if (
|
|
1706
|
+
setup(e, { emit: a, slots: r }) {
|
|
1707
|
+
const l = B(""), n = B(/* @__PURE__ */ new Map()), s = b(() => {
|
|
1708
|
+
const c = ["krds-in-page-navigation-type"];
|
|
1709
|
+
return e.class && c.push(e.class), c;
|
|
1710
|
+
}), u = () => {
|
|
1711
|
+
const c = e.headerTopSelector, o = e.headerInnerSelector;
|
|
1712
|
+
return (document.querySelector(c)?.clientHeight || 0) + (document.querySelector(o)?.clientHeight || 0);
|
|
1713
|
+
}, h = (c, o) => {
|
|
1714
|
+
if (a("itemClick", c, o), c.href.startsWith("#")) {
|
|
1715
1715
|
o.preventDefault();
|
|
1716
|
-
const i = document.querySelector(
|
|
1716
|
+
const i = document.querySelector(c.href);
|
|
1717
1717
|
if (i) {
|
|
1718
|
-
const
|
|
1718
|
+
const p = u();
|
|
1719
1719
|
if (window.scrollTo({
|
|
1720
1720
|
left: 0,
|
|
1721
|
-
top: i.getBoundingClientRect().top + window.scrollY -
|
|
1721
|
+
top: i.getBoundingClientRect().top + window.scrollY - p,
|
|
1722
1722
|
behavior: "smooth"
|
|
1723
|
-
}),
|
|
1724
|
-
const
|
|
1725
|
-
|
|
1723
|
+
}), l.value = c.href, o instanceof KeyboardEvent) {
|
|
1724
|
+
const y = i.querySelector(".sec-tit, h1, h2, h3, h4, h5, h6");
|
|
1725
|
+
y && y instanceof HTMLElement && (y.setAttribute("tabindex", "-1"), y.focus({ preventScroll: !0 }));
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
1729
|
}, f = () => {
|
|
1730
|
-
n.value.clear(), e.items && e.items.filter((
|
|
1731
|
-
const o = document.querySelector(
|
|
1732
|
-
o && n.value.set(
|
|
1730
|
+
n.value.clear(), e.items && e.items.filter((c) => c.href.startsWith("#")).forEach((c) => {
|
|
1731
|
+
const o = document.querySelector(c.href);
|
|
1732
|
+
o && n.value.set(c.href, o);
|
|
1733
1733
|
});
|
|
1734
|
-
},
|
|
1734
|
+
}, w = () => {
|
|
1735
1735
|
if (!e.autoActive || !e.items || n.value.size === 0) return;
|
|
1736
|
-
const
|
|
1737
|
-
href:
|
|
1738
|
-
element: n.value.get(
|
|
1739
|
-
item:
|
|
1736
|
+
const c = window.innerHeight, o = Math.ceil(c / 5), i = window.scrollY + c, p = document.body.scrollHeight, y = e.items.filter((_) => _.href.startsWith("#") && n.value.has(_.href)).map((_) => ({
|
|
1737
|
+
href: _.href,
|
|
1738
|
+
element: n.value.get(_.href),
|
|
1739
|
+
item: _
|
|
1740
1740
|
}));
|
|
1741
|
-
if (
|
|
1742
|
-
const
|
|
1743
|
-
let
|
|
1744
|
-
if (i >=
|
|
1745
|
-
else if (window.scrollY <=
|
|
1746
|
-
else for (const
|
|
1747
|
-
const
|
|
1748
|
-
if (window.scrollY >
|
|
1749
|
-
|
|
1741
|
+
if (y.length === 0) return;
|
|
1742
|
+
const $ = y[0], C = y[y.length - 1], E = $.element.offsetTop;
|
|
1743
|
+
let D = "";
|
|
1744
|
+
if (i >= p) D = C.href;
|
|
1745
|
+
else if (window.scrollY <= E) D = $.href;
|
|
1746
|
+
else for (const _ of y) {
|
|
1747
|
+
const v = _.element.offsetHeight, M = _.element.offsetTop - o;
|
|
1748
|
+
if (window.scrollY > M && window.scrollY <= M + v) {
|
|
1749
|
+
D = _.href;
|
|
1750
1750
|
break;
|
|
1751
1751
|
}
|
|
1752
1752
|
}
|
|
1753
|
-
|
|
1754
|
-
},
|
|
1753
|
+
D && D !== l.value && (l.value = D);
|
|
1754
|
+
}, m = () => {
|
|
1755
1755
|
if (!e.items) return;
|
|
1756
|
-
const
|
|
1757
|
-
|
|
1756
|
+
const c = e.items.find((o) => o.active);
|
|
1757
|
+
c ? l.value = c.href : e.items.length > 0 && (l.value = e.items[0].href);
|
|
1758
1758
|
};
|
|
1759
|
-
|
|
1760
|
-
if (
|
|
1761
|
-
f(),
|
|
1762
|
-
const
|
|
1759
|
+
ie(() => {
|
|
1760
|
+
if (m(), e.autoActive) {
|
|
1761
|
+
f(), w(), window.addEventListener("scroll", w, { passive: !0 });
|
|
1762
|
+
const c = new MutationObserver(() => {
|
|
1763
1763
|
f();
|
|
1764
1764
|
});
|
|
1765
|
-
|
|
1765
|
+
c.observe(document.body, {
|
|
1766
1766
|
childList: !0,
|
|
1767
1767
|
subtree: !0
|
|
1768
|
-
}),
|
|
1769
|
-
|
|
1768
|
+
}), re(() => {
|
|
1769
|
+
c.disconnect();
|
|
1770
1770
|
});
|
|
1771
1771
|
}
|
|
1772
|
-
}),
|
|
1773
|
-
e.autoActive && (window.removeEventListener("scroll",
|
|
1772
|
+
}), re(() => {
|
|
1773
|
+
e.autoActive && (window.removeEventListener("scroll", w), n.value.clear());
|
|
1774
1774
|
});
|
|
1775
|
-
const
|
|
1775
|
+
const T = () => !e.caption && !e.title ? null : t("div", { class: "in-page-navigation-header" }, [e.caption && t("p", { class: "quick-caption" }, e.caption), e.title && t("p", { class: "quick-title" }, e.title)]), S = () => {
|
|
1776
1776
|
if (!e.items) return null;
|
|
1777
|
-
const
|
|
1778
|
-
const i =
|
|
1777
|
+
const c = e.items.map((o) => {
|
|
1778
|
+
const i = l.value === o.href || !e.autoActive && o.active;
|
|
1779
1779
|
return t("li", { key: o.href }, [t("a", {
|
|
1780
1780
|
href: o.href,
|
|
1781
1781
|
class: i ? "active" : "",
|
|
1782
|
-
onClick: (
|
|
1783
|
-
onKeydown: (
|
|
1784
|
-
(
|
|
1782
|
+
onClick: (p) => h(o, p),
|
|
1783
|
+
onKeydown: (p) => {
|
|
1784
|
+
(p.key === "Enter" || p.key === " ") && (p.preventDefault(), h(o, p));
|
|
1785
1785
|
}
|
|
1786
1786
|
}, o.text)]);
|
|
1787
1787
|
});
|
|
1788
|
-
return t("nav", { class: "in-page-navigation-list" }, [t("ul", {},
|
|
1789
|
-
},
|
|
1788
|
+
return t("nav", { class: "in-page-navigation-list" }, [t("ul", {}, c)]);
|
|
1789
|
+
}, x = () => r.action ? t("div", { class: "in-page-navigation-action" }, [r.action()]) : null;
|
|
1790
1790
|
return () => t("div", { class: s.value }, [t("div", { class: "krds-in-page-navigation-area" }, [
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1791
|
+
T(),
|
|
1792
|
+
S(),
|
|
1793
|
+
x()
|
|
1794
1794
|
].filter(Boolean))]);
|
|
1795
1795
|
}
|
|
1796
|
-
}),
|
|
1797
|
-
mounted(e,
|
|
1798
|
-
|
|
1796
|
+
}), Xt = Ut, De = {
|
|
1797
|
+
mounted(e, a) {
|
|
1798
|
+
a.value !== !1 && e.classList.add("sr-only");
|
|
1799
1799
|
},
|
|
1800
|
-
updated(e,
|
|
1801
|
-
|
|
1800
|
+
updated(e, a) {
|
|
1801
|
+
a.value === !1 ? e.classList.remove("sr-only") : e.classList.add("sr-only");
|
|
1802
1802
|
},
|
|
1803
1803
|
unmounted(e) {
|
|
1804
1804
|
e.classList.remove("sr-only");
|
|
1805
1805
|
}
|
|
1806
|
-
},
|
|
1807
|
-
|
|
1808
|
-
|
|
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({
|
|
1806
|
+
}, Qt = (e) => {
|
|
1807
|
+
e.directive("sr-only", De);
|
|
1808
|
+
}, ke = 1, Se = 8, Jt = A({
|
|
1814
1809
|
name: "KrdsPagination",
|
|
1815
1810
|
props: {
|
|
1816
1811
|
modelValue: {
|
|
@@ -1819,7 +1814,7 @@ var lt = D({
|
|
|
1819
1814
|
},
|
|
1820
1815
|
min: {
|
|
1821
1816
|
type: Number,
|
|
1822
|
-
default:
|
|
1817
|
+
default: ke
|
|
1823
1818
|
},
|
|
1824
1819
|
max: {
|
|
1825
1820
|
type: Number,
|
|
@@ -1835,91 +1830,91 @@ var lt = D({
|
|
|
1835
1830
|
},
|
|
1836
1831
|
pageRange: {
|
|
1837
1832
|
type: Number,
|
|
1838
|
-
default:
|
|
1833
|
+
default: Se
|
|
1839
1834
|
}
|
|
1840
1835
|
},
|
|
1841
1836
|
emits: ["update:modelValue"],
|
|
1842
|
-
setup(e, { emit:
|
|
1843
|
-
const r =
|
|
1837
|
+
setup(e, { emit: a }) {
|
|
1838
|
+
const r = b(() => Math.max(1, e.min ?? ke)), l = b(() => e.modelValue ?? r.value), n = b(() => l.value <= r.value), s = b(() => l.value >= e.max), u = b(() => {
|
|
1844
1839
|
if (!n.value)
|
|
1845
1840
|
return "#";
|
|
1846
|
-
}), h =
|
|
1841
|
+
}), h = b(() => {
|
|
1847
1842
|
if (!s.value)
|
|
1848
1843
|
return "#";
|
|
1849
|
-
}), f =
|
|
1850
|
-
const { max:
|
|
1851
|
-
if (
|
|
1844
|
+
}), f = b(() => {
|
|
1845
|
+
const { max: x } = e, c = e.pageRange ?? Se, o = 1, i = [];
|
|
1846
|
+
if (x <= c + 2) for (let p = r.value; p <= x; p++) i.push({
|
|
1852
1847
|
type: "page",
|
|
1853
|
-
key: `page-${
|
|
1854
|
-
page:
|
|
1848
|
+
key: `page-${p}`,
|
|
1849
|
+
page: p,
|
|
1855
1850
|
href: "#"
|
|
1856
1851
|
});
|
|
1857
1852
|
else {
|
|
1858
|
-
const
|
|
1859
|
-
for (let
|
|
1853
|
+
const p = Math.min(o, x), y = Math.max(x - o + 1, 1), $ = Math.max(r.value, l.value - Math.floor(c / 2)), C = Math.min(x, $ + c - 1), E = Math.max(r.value, C - c + 1);
|
|
1854
|
+
for (let v = r.value; v <= p; v++) i.push({
|
|
1860
1855
|
type: "page",
|
|
1861
|
-
key: `page-${
|
|
1862
|
-
page:
|
|
1856
|
+
key: `page-${v}`,
|
|
1857
|
+
page: v,
|
|
1863
1858
|
href: "#"
|
|
1864
1859
|
});
|
|
1865
|
-
|
|
1860
|
+
E > p + 1 && i.push({
|
|
1866
1861
|
type: "ellipsis",
|
|
1867
1862
|
key: "ellipsis-left",
|
|
1868
1863
|
ariaLabel: "페이지 생략"
|
|
1869
1864
|
});
|
|
1870
|
-
const
|
|
1871
|
-
for (let
|
|
1865
|
+
const D = Math.max(E, p + 1), _ = Math.min(C, y - 1);
|
|
1866
|
+
for (let v = D; v <= _; v++) i.push({
|
|
1872
1867
|
type: "page",
|
|
1873
|
-
key: `page-${
|
|
1874
|
-
page:
|
|
1868
|
+
key: `page-${v}`,
|
|
1869
|
+
page: v,
|
|
1875
1870
|
href: "#"
|
|
1876
1871
|
});
|
|
1877
|
-
|
|
1872
|
+
C < y - 1 && i.push({
|
|
1878
1873
|
type: "ellipsis",
|
|
1879
1874
|
key: "ellipsis-right",
|
|
1880
1875
|
ariaLabel: "페이지 생략"
|
|
1881
1876
|
});
|
|
1882
|
-
for (let
|
|
1877
|
+
for (let v = y; v <= x; v++) i.push({
|
|
1883
1878
|
type: "page",
|
|
1884
|
-
key: `page-${
|
|
1885
|
-
page:
|
|
1879
|
+
key: `page-${v}`,
|
|
1880
|
+
page: v,
|
|
1886
1881
|
href: "#"
|
|
1887
1882
|
});
|
|
1888
1883
|
}
|
|
1889
1884
|
return i;
|
|
1890
|
-
}),
|
|
1891
|
-
if (
|
|
1892
|
-
|
|
1885
|
+
}), w = (x, c) => {
|
|
1886
|
+
if (x === l.value) {
|
|
1887
|
+
c.preventDefault();
|
|
1893
1888
|
return;
|
|
1894
1889
|
}
|
|
1895
|
-
|
|
1896
|
-
},
|
|
1890
|
+
a("update:modelValue", x);
|
|
1891
|
+
}, m = (x) => {
|
|
1897
1892
|
if (n.value) {
|
|
1898
|
-
|
|
1893
|
+
x.preventDefault();
|
|
1899
1894
|
return;
|
|
1900
1895
|
}
|
|
1901
|
-
|
|
1902
|
-
},
|
|
1896
|
+
a("update:modelValue", l.value - 1);
|
|
1897
|
+
}, T = (x) => {
|
|
1903
1898
|
if (s.value) {
|
|
1904
|
-
|
|
1899
|
+
x.preventDefault();
|
|
1905
1900
|
return;
|
|
1906
1901
|
}
|
|
1907
|
-
|
|
1908
|
-
},
|
|
1909
|
-
if (
|
|
1910
|
-
const
|
|
1902
|
+
a("update:modelValue", l.value + 1);
|
|
1903
|
+
}, S = (x) => {
|
|
1904
|
+
if (x.type === "page") {
|
|
1905
|
+
const c = x.page === l.value;
|
|
1911
1906
|
return t("a", {
|
|
1912
|
-
key:
|
|
1913
|
-
href:
|
|
1914
|
-
class: ["page-link", { active:
|
|
1915
|
-
"aria-current":
|
|
1916
|
-
onClick: (o) =>
|
|
1917
|
-
}, [
|
|
1907
|
+
key: x.key,
|
|
1908
|
+
href: x.href || "#",
|
|
1909
|
+
class: ["page-link", { active: c }],
|
|
1910
|
+
"aria-current": c ? "page" : void 0,
|
|
1911
|
+
onClick: (o) => w(x.page, o)
|
|
1912
|
+
}, [c ? ve(t("span", null, "현재페이지"), [[De]]) : null, ` ${x.page} `]);
|
|
1918
1913
|
}
|
|
1919
1914
|
return t("span", {
|
|
1920
|
-
key:
|
|
1915
|
+
key: x.key,
|
|
1921
1916
|
class: "page-link link-dot",
|
|
1922
|
-
"aria-label":
|
|
1917
|
+
"aria-label": x.ariaLabel
|
|
1923
1918
|
});
|
|
1924
1919
|
};
|
|
1925
1920
|
return () => t("div", {
|
|
@@ -1927,15 +1922,15 @@ var lt = D({
|
|
|
1927
1922
|
class: "krds-pagination"
|
|
1928
1923
|
}, [
|
|
1929
1924
|
t(n.value ? "span" : "a", {
|
|
1930
|
-
href: n.value ? void 0 :
|
|
1925
|
+
href: n.value ? void 0 : u.value,
|
|
1931
1926
|
class: [
|
|
1932
1927
|
"page-navi",
|
|
1933
1928
|
"prev",
|
|
1934
1929
|
{ disabled: n.value }
|
|
1935
1930
|
],
|
|
1936
|
-
onClick:
|
|
1931
|
+
onClick: m
|
|
1937
1932
|
}, "이전"),
|
|
1938
|
-
t("div", { class: "page-links" }, f.value.map(
|
|
1933
|
+
t("div", { class: "page-links" }, f.value.map(S)),
|
|
1939
1934
|
t(s.value ? "span" : "a", {
|
|
1940
1935
|
href: s.value ? void 0 : h.value,
|
|
1941
1936
|
class: [
|
|
@@ -1943,31 +1938,31 @@ var lt = D({
|
|
|
1943
1938
|
"next",
|
|
1944
1939
|
{ disabled: s.value }
|
|
1945
1940
|
],
|
|
1946
|
-
onClick:
|
|
1941
|
+
onClick: T
|
|
1947
1942
|
}, "다음")
|
|
1948
1943
|
]);
|
|
1949
1944
|
}
|
|
1950
|
-
}),
|
|
1945
|
+
}), Zt = Jt, ea = A({
|
|
1951
1946
|
name: "KrdsPanel",
|
|
1952
1947
|
props: { modelValue: {
|
|
1953
1948
|
type: Boolean,
|
|
1954
1949
|
default: !1
|
|
1955
1950
|
} },
|
|
1956
1951
|
emits: ["update:modelValue"],
|
|
1957
|
-
setup(e, { emit:
|
|
1958
|
-
const
|
|
1952
|
+
setup(e, { emit: a, slots: r }) {
|
|
1953
|
+
const l = b({
|
|
1959
1954
|
get: () => e.modelValue,
|
|
1960
|
-
set: (
|
|
1955
|
+
set: (u) => a("update:modelValue", u)
|
|
1961
1956
|
}), n = () => {
|
|
1962
|
-
|
|
1957
|
+
l.value = !0;
|
|
1963
1958
|
}, s = () => {
|
|
1964
|
-
|
|
1959
|
+
l.value = !1;
|
|
1965
1960
|
};
|
|
1966
1961
|
return () => t("div", { class: "inner help-panel-flexible" }, [t("button", {
|
|
1967
1962
|
type: "button",
|
|
1968
1963
|
class: "krds-btn small tertiary btn-help-panel expand btn-help-exec",
|
|
1969
1964
|
onClick: n
|
|
1970
|
-
}, [t("i", { class: "svg-icon ico-fold" }), " 도움말"]), t("div", { class: ["krds-help-panel", { expand:
|
|
1965
|
+
}, [t("i", { class: "svg-icon ico-fold" }), " 도움말"]), t("div", { class: ["krds-help-panel", { expand: l.value }] }, [t("div", { class: "help-panel-wrap" }, [t("div", { class: "help-conts-area" }, [r.default?.(), t("button", {
|
|
1971
1966
|
type: "button",
|
|
1972
1967
|
class: "krds-btn small tertiary btn-help-panel fold",
|
|
1973
1968
|
onClick: s
|
|
@@ -1977,7 +1972,7 @@ var lt = D({
|
|
|
1977
1972
|
t("i", { class: "svg-icon ico-angle right" })
|
|
1978
1973
|
])])])])]);
|
|
1979
1974
|
}
|
|
1980
|
-
}),
|
|
1975
|
+
}), ta = ea, aa = A({
|
|
1981
1976
|
name: "KrdsContextualHelp",
|
|
1982
1977
|
props: {
|
|
1983
1978
|
tooltipTitle: {
|
|
@@ -1993,45 +1988,45 @@ var lt = D({
|
|
|
1993
1988
|
default: "top left"
|
|
1994
1989
|
}
|
|
1995
1990
|
},
|
|
1996
|
-
setup(e, { slots:
|
|
1997
|
-
const r =
|
|
1998
|
-
const o =
|
|
1999
|
-
|
|
1991
|
+
setup(e, { slots: a }) {
|
|
1992
|
+
const r = B(), l = B(), n = B(), s = B(), u = B(!1), h = () => {
|
|
1993
|
+
const o = u.value;
|
|
1994
|
+
m(), o || f();
|
|
2000
1995
|
}, f = () => {
|
|
2001
|
-
!n.value || !
|
|
2002
|
-
},
|
|
2003
|
-
!n.value || !
|
|
2004
|
-
},
|
|
1996
|
+
!n.value || !l.value || (u.value = !0, n.value.style.display = "block", l.value.setAttribute("aria-expanded", "true"), n.value.querySelector('a, button, [tabindex="0"], input, textarea, select')?.focus(), T());
|
|
1997
|
+
}, w = () => {
|
|
1998
|
+
!n.value || !l.value || (u.value = !1, n.value.style.display = "none", l.value.setAttribute("aria-expanded", "false"));
|
|
1999
|
+
}, m = () => {
|
|
2005
2000
|
const o = document.querySelectorAll(".krds-contextual-help .tooltip-popover"), i = document.querySelectorAll(".krds-contextual-help .tooltip-btn");
|
|
2006
|
-
o.forEach((
|
|
2007
|
-
|
|
2008
|
-
}), i.forEach((
|
|
2009
|
-
|
|
2010
|
-
}),
|
|
2011
|
-
},
|
|
2001
|
+
o.forEach((p) => {
|
|
2002
|
+
p.style.display = "none";
|
|
2003
|
+
}), i.forEach((p) => {
|
|
2004
|
+
p.setAttribute("aria-expanded", "false");
|
|
2005
|
+
}), u.value = !1;
|
|
2006
|
+
}, T = () => {
|
|
2012
2007
|
if (!r.value || !n.value) return;
|
|
2013
2008
|
const o = window.innerWidth <= 768, i = r.value.querySelector(".tooltip-action");
|
|
2014
2009
|
if (o) {
|
|
2015
|
-
const
|
|
2016
|
-
n.value.style.left = `-${
|
|
2010
|
+
const p = getComputedStyle(document.querySelector(":root")).getPropertyValue("--krds-contents-padding-x").trim().split("px")[0], y = i.getBoundingClientRect().left - parseInt(p), $ = document.body.clientWidth - parseInt(p) * 2;
|
|
2011
|
+
n.value.style.left = `-${y}px`, n.value.style.width = `${$}px`;
|
|
2017
2012
|
} else
|
|
2018
2013
|
n.value.style.left = "", n.value.style.right = "", n.value.style.width = "360px";
|
|
2019
|
-
},
|
|
2020
|
-
(o.key === "Escape" || o.key === "Esc") &&
|
|
2021
|
-
},
|
|
2022
|
-
o.target.closest(".tooltip-action") ||
|
|
2023
|
-
},
|
|
2024
|
-
|
|
2014
|
+
}, S = (o) => {
|
|
2015
|
+
(o.key === "Escape" || o.key === "Esc") && m();
|
|
2016
|
+
}, x = (o) => {
|
|
2017
|
+
o.target.closest(".tooltip-action") || m();
|
|
2018
|
+
}, c = () => {
|
|
2019
|
+
u.value && T();
|
|
2025
2020
|
};
|
|
2026
|
-
return
|
|
2027
|
-
r.value && (
|
|
2028
|
-
}),
|
|
2029
|
-
document.removeEventListener("keydown",
|
|
2021
|
+
return ie(() => {
|
|
2022
|
+
r.value && (l.value && l.value.setAttribute("aria-expanded", "false"), n.value && n.value.setAttribute("role", "tooltip"), document.addEventListener("keydown", S), document.addEventListener("click", x), window.addEventListener("resize", c));
|
|
2023
|
+
}), re(() => {
|
|
2024
|
+
document.removeEventListener("keydown", S), document.removeEventListener("click", x), window.removeEventListener("resize", c);
|
|
2030
2025
|
}), () => t("div", {
|
|
2031
2026
|
ref: r,
|
|
2032
2027
|
class: ["krds-contextual-help", e.position]
|
|
2033
2028
|
}, [t("div", { class: "tooltip-action" }, [t("button", {
|
|
2034
|
-
ref:
|
|
2029
|
+
ref: l,
|
|
2035
2030
|
type: "button",
|
|
2036
2031
|
class: "krds-btn medium icon tooltip-btn",
|
|
2037
2032
|
onClick: h
|
|
@@ -2041,16 +2036,16 @@ var lt = D({
|
|
|
2041
2036
|
role: "tooltip"
|
|
2042
2037
|
}, [
|
|
2043
2038
|
t("h4", { class: "tooltip-title" }, e.tooltipTitle),
|
|
2044
|
-
t("div", { class: "tooltip-contents" },
|
|
2039
|
+
t("div", { class: "tooltip-contents" }, a.default?.()),
|
|
2045
2040
|
t("button", {
|
|
2046
2041
|
ref: s,
|
|
2047
2042
|
type: "button",
|
|
2048
2043
|
class: "krds-btn xsmall icon tooltip-close",
|
|
2049
|
-
onClick:
|
|
2044
|
+
onClick: w
|
|
2050
2045
|
}, [t("span", { class: "sr-only" }, "닫기"), t("i", { class: "svg-icon ico-modal-close" })])
|
|
2051
2046
|
])])]);
|
|
2052
2047
|
}
|
|
2053
|
-
}),
|
|
2048
|
+
}), la = aa, na = A({
|
|
2054
2049
|
name: "KrdsCoachMark",
|
|
2055
2050
|
props: {
|
|
2056
2051
|
coachMarkClass: {
|
|
@@ -2083,18 +2078,18 @@ var lt = D({
|
|
|
2083
2078
|
}
|
|
2084
2079
|
},
|
|
2085
2080
|
emits: ["update:modelValue", "close"],
|
|
2086
|
-
setup(e, { emit:
|
|
2087
|
-
const
|
|
2081
|
+
setup(e, { emit: a, slots: r }) {
|
|
2082
|
+
const l = b(() => {
|
|
2088
2083
|
const f = e.activeStep - 1;
|
|
2089
2084
|
return e.stepsData && f >= 0 && f < e.stepsData.length ? e.stepsData[f] : null;
|
|
2090
2085
|
}), n = () => {
|
|
2091
|
-
e.activeStep > 1 &&
|
|
2086
|
+
e.activeStep > 1 && a("update:modelValue", e.activeStep - 1);
|
|
2092
2087
|
}, s = () => {
|
|
2093
|
-
e.activeStep < e.stepsData.length &&
|
|
2094
|
-
},
|
|
2095
|
-
|
|
2088
|
+
e.activeStep < e.stepsData.length && a("update:modelValue", e.activeStep + 1);
|
|
2089
|
+
}, u = () => {
|
|
2090
|
+
a("close");
|
|
2096
2091
|
}, h = () => {
|
|
2097
|
-
const f =
|
|
2092
|
+
const f = l.value;
|
|
2098
2093
|
return e.modelValue !== e.activeStep || !f ? null : t("div", { class: "coach-balloon" }, [
|
|
2099
2094
|
t("h5", { class: "sr-only" }, "따라하기 가이드"),
|
|
2100
2095
|
t("h6", { class: "coach-tit" }, `${e.activeStep}단계 : ${f.title}`),
|
|
@@ -2108,7 +2103,7 @@ var lt = D({
|
|
|
2108
2103
|
t("button", {
|
|
2109
2104
|
type: "button",
|
|
2110
2105
|
class: "krds-btn small text",
|
|
2111
|
-
onClick:
|
|
2106
|
+
onClick: u
|
|
2112
2107
|
}, "그만보기"),
|
|
2113
2108
|
e.activeStep !== 1 ? t("button", {
|
|
2114
2109
|
type: "button",
|
|
@@ -2128,7 +2123,7 @@ var lt = D({
|
|
|
2128
2123
|
style: e.style
|
|
2129
2124
|
}, [h(), r["coach-mark-content"]?.()]);
|
|
2130
2125
|
}
|
|
2131
|
-
}),
|
|
2126
|
+
}), sa = na, ra = A({
|
|
2132
2127
|
name: "KrdsTooltip",
|
|
2133
2128
|
props: {
|
|
2134
2129
|
type: {
|
|
@@ -2164,65 +2159,65 @@ var lt = D({
|
|
|
2164
2159
|
default: void 0
|
|
2165
2160
|
}
|
|
2166
2161
|
},
|
|
2167
|
-
setup(e, { slots:
|
|
2168
|
-
const r =
|
|
2169
|
-
const
|
|
2170
|
-
return e.type === "default" ?
|
|
2171
|
-
}),
|
|
2172
|
-
const
|
|
2173
|
-
return e.box &&
|
|
2174
|
-
}),
|
|
2175
|
-
if (!r.value || !
|
|
2176
|
-
const
|
|
2177
|
-
if (!
|
|
2178
|
-
const
|
|
2179
|
-
let
|
|
2180
|
-
const
|
|
2181
|
-
h.value || e.box || e.vertical ? (
|
|
2182
|
-
const
|
|
2162
|
+
setup(e, { slots: a }) {
|
|
2163
|
+
const r = B(null), l = B(null), n = B(!1), s = B({}), u = `tooltip-popover-${de()}`, h = B(!1), f = b(() => {
|
|
2164
|
+
const y = ["krds-btn", "krds-tooltip"];
|
|
2165
|
+
return e.type === "default" ? y.push("small", "text") : e.type === "icon" ? y.push("icon") : e.type === "button" && y.push(""), !e.box && e.vertical && y.push("tooltip-vertical"), e.box && !e.vertical && y.push("tooltip-box"), y.join(" ");
|
|
2166
|
+
}), w = b(() => {
|
|
2167
|
+
const y = [];
|
|
2168
|
+
return e.box && y.push("tooltip-box"), e.vertical && y.push("tooltip-vertical"), n.value && y.push("active"), y;
|
|
2169
|
+
}), m = b(() => r.value?.querySelector("button")?.textContent?.trim() || ""), T = () => window.innerWidth <= 768, S = () => {
|
|
2170
|
+
if (!r.value || !l.value) return;
|
|
2171
|
+
const y = r.value.querySelector("button");
|
|
2172
|
+
if (!y) return;
|
|
2173
|
+
const $ = 12, { clientHeight: C, clientWidth: E } = l.value, { top: D, left: _, right: v, height: M, width: I } = y.getBoundingClientRect(), N = window.innerWidth / 2, H = window.innerHeight / 2;
|
|
2174
|
+
let G, j;
|
|
2175
|
+
const X = [];
|
|
2176
|
+
h.value || e.box || e.vertical ? (D + M > H ? (G = D - C - $, X.push("top")) : (G = D + M + $, X.push("bottom")), _ + I > N ? (j = v - E, X.push("right"), window.innerWidth - (_ + I) > E / 2 && (j = _ + (I - E) / 2, X.splice(X.indexOf("right"), 1))) : (j = _ + (I - E) / 2, j < 0 && (j = _, X.push("left")))) : (G = D + (M - C) / 2, _ + I > N ? (j = _ - E - $, X.push("right")) : j = v + $);
|
|
2177
|
+
const le = window.innerWidth <= 420;
|
|
2183
2178
|
s.value = {
|
|
2184
|
-
top: `${
|
|
2185
|
-
left:
|
|
2186
|
-
transform:
|
|
2187
|
-
},
|
|
2188
|
-
},
|
|
2189
|
-
e.disabled || !e.tooltipContent || (n.value = !0, await
|
|
2190
|
-
},
|
|
2179
|
+
top: `${G}px`,
|
|
2180
|
+
left: le ? "50%" : `${j}px`,
|
|
2181
|
+
transform: le ? "translateX(-50%)" : "none"
|
|
2182
|
+
}, l.value && (l.value.className = `krds-tooltip-popover ${X.join(" ")} ${w.value.join(" ")}`);
|
|
2183
|
+
}, x = async () => {
|
|
2184
|
+
e.disabled || !e.tooltipContent || (n.value = !0, await ce(), S());
|
|
2185
|
+
}, c = () => {
|
|
2191
2186
|
n.value = !1, s.value = {};
|
|
2192
|
-
}, o = (
|
|
2193
|
-
(
|
|
2187
|
+
}, o = (y) => {
|
|
2188
|
+
(y.key === "Escape" || y.key === "Esc") && n.value && c();
|
|
2194
2189
|
}, i = () => {
|
|
2195
|
-
h.value =
|
|
2196
|
-
},
|
|
2197
|
-
n.value &&
|
|
2190
|
+
h.value = T(), n.value && c();
|
|
2191
|
+
}, p = () => {
|
|
2192
|
+
n.value && c();
|
|
2198
2193
|
};
|
|
2199
|
-
return
|
|
2200
|
-
h.value =
|
|
2201
|
-
}),
|
|
2202
|
-
document.removeEventListener("keydown", o), window.removeEventListener("scroll",
|
|
2194
|
+
return ie(() => {
|
|
2195
|
+
h.value = T(), document.addEventListener("keydown", o), window.addEventListener("scroll", p), window.addEventListener("resize", i);
|
|
2196
|
+
}), re(() => {
|
|
2197
|
+
document.removeEventListener("keydown", o), window.removeEventListener("scroll", p), window.removeEventListener("resize", i);
|
|
2203
2198
|
}), () => t("div", { ref: r }, [t("button", {
|
|
2204
2199
|
type: "button",
|
|
2205
2200
|
class: f.value,
|
|
2206
2201
|
disabled: e.disabled,
|
|
2207
|
-
"aria-labelledby":
|
|
2208
|
-
onMouseover:
|
|
2209
|
-
onMouseout:
|
|
2210
|
-
onFocusin:
|
|
2211
|
-
onFocusout:
|
|
2212
|
-
},
|
|
2213
|
-
id:
|
|
2214
|
-
ref:
|
|
2215
|
-
class: ["krds-tooltip-popover",
|
|
2202
|
+
"aria-labelledby": u,
|
|
2203
|
+
onMouseover: x,
|
|
2204
|
+
onMouseout: c,
|
|
2205
|
+
onFocusin: x,
|
|
2206
|
+
onFocusout: c
|
|
2207
|
+
}, a.default?.()), ve(t("div", {
|
|
2208
|
+
id: u,
|
|
2209
|
+
ref: l,
|
|
2210
|
+
class: ["krds-tooltip-popover", w.value],
|
|
2216
2211
|
style: s.value,
|
|
2217
2212
|
"aria-hidden": !n.value,
|
|
2218
2213
|
role: "tooltip"
|
|
2219
2214
|
}, [
|
|
2220
|
-
t("span", { class: "sr-only" },
|
|
2215
|
+
t("span", { class: "sr-only" }, m.value),
|
|
2221
2216
|
" ",
|
|
2222
2217
|
e.tooltipContent
|
|
2223
|
-
]), [[
|
|
2218
|
+
]), [[pe, n.value]])]);
|
|
2224
2219
|
}
|
|
2225
|
-
}),
|
|
2220
|
+
}), ia = ra, oa = A({
|
|
2226
2221
|
name: "KrdsLanguageSwitcher",
|
|
2227
2222
|
props: {
|
|
2228
2223
|
languageList: {
|
|
@@ -2255,45 +2250,45 @@ var lt = D({
|
|
|
2255
2250
|
}
|
|
2256
2251
|
},
|
|
2257
2252
|
emits: ["update:modelValue", "close"],
|
|
2258
|
-
setup(e, { emit:
|
|
2259
|
-
const
|
|
2260
|
-
|
|
2253
|
+
setup(e, { emit: a, slots: r }) {
|
|
2254
|
+
const l = B(!1), n = B(), s = B(), u = () => {
|
|
2255
|
+
l.value = !l.value, l.value && n.value && w();
|
|
2261
2256
|
}, h = () => {
|
|
2262
|
-
|
|
2257
|
+
l.value = !1;
|
|
2263
2258
|
}, f = (i) => {
|
|
2264
|
-
|
|
2265
|
-
},
|
|
2259
|
+
a("update:modelValue", i), h(), a("close"), s.value?.focus();
|
|
2260
|
+
}, w = () => {
|
|
2266
2261
|
if (!n.value) return;
|
|
2267
2262
|
const i = n.value.querySelector(".drop-menu");
|
|
2268
2263
|
if (!i) return;
|
|
2269
|
-
const
|
|
2270
|
-
n.value.classList.remove("drop-left", "drop-right"),
|
|
2271
|
-
},
|
|
2264
|
+
const p = i.getBoundingClientRect(), y = window.innerWidth;
|
|
2265
|
+
n.value.classList.remove("drop-left", "drop-right"), p.left < 0 ? n.value.classList.add("drop-left") : y < p.left + p.width && n.value.classList.add("drop-right");
|
|
2266
|
+
}, m = (i) => {
|
|
2272
2267
|
i.key === "Escape" && (h(), s.value?.focus());
|
|
2273
|
-
},
|
|
2268
|
+
}, T = (i) => {
|
|
2274
2269
|
n.value?.contains(i.target) || h();
|
|
2275
|
-
},
|
|
2270
|
+
}, S = (i) => {
|
|
2276
2271
|
n.value?.contains(i.relatedTarget) || h();
|
|
2277
|
-
},
|
|
2272
|
+
}, x = (i) => {
|
|
2278
2273
|
if (!n.value) return;
|
|
2279
|
-
n.value.querySelectorAll(".drop-list .item-link").forEach((
|
|
2280
|
-
|
|
2274
|
+
n.value.querySelectorAll(".drop-list .item-link").forEach((y) => {
|
|
2275
|
+
y.style.position = "relative", y.style.zIndex = "0";
|
|
2281
2276
|
});
|
|
2282
|
-
const
|
|
2283
|
-
|
|
2277
|
+
const p = i.target;
|
|
2278
|
+
p.style.zIndex = "1";
|
|
2284
2279
|
};
|
|
2285
|
-
|
|
2286
|
-
i ? (document.addEventListener("keydown",
|
|
2287
|
-
}),
|
|
2288
|
-
document.removeEventListener("keydown",
|
|
2280
|
+
se(l, (i) => {
|
|
2281
|
+
i ? (document.addEventListener("keydown", m), document.addEventListener("click", T)) : (document.removeEventListener("keydown", m), document.removeEventListener("click", T));
|
|
2282
|
+
}), re(() => {
|
|
2283
|
+
document.removeEventListener("keydown", m), document.removeEventListener("click", T);
|
|
2289
2284
|
});
|
|
2290
|
-
const
|
|
2285
|
+
const c = () => t("ul", { class: "drop-list" }, e.languageList.map((i) => t("li", { key: i.code }, [t("a", {
|
|
2291
2286
|
href: "#",
|
|
2292
2287
|
class: ["item-link", { active: e.modelValue === i.code }],
|
|
2293
2288
|
lang: i.code,
|
|
2294
2289
|
"aria-selected": e.modelValue === i.code,
|
|
2295
|
-
onClick:
|
|
2296
|
-
onFocus:
|
|
2290
|
+
onClick: ge(() => f(i.code), ["prevent"]),
|
|
2291
|
+
onFocus: x
|
|
2297
2292
|
}, [
|
|
2298
2293
|
i.name,
|
|
2299
2294
|
" ",
|
|
@@ -2304,7 +2299,7 @@ var lt = D({
|
|
|
2304
2299
|
lang: i.code,
|
|
2305
2300
|
target: "_blank",
|
|
2306
2301
|
title: "새 창 열림",
|
|
2307
|
-
onFocus:
|
|
2302
|
+
onFocus: x
|
|
2308
2303
|
}, [
|
|
2309
2304
|
i.name,
|
|
2310
2305
|
" ",
|
|
@@ -2316,32 +2311,32 @@ var lt = D({
|
|
|
2316
2311
|
"krds-drop-wrap",
|
|
2317
2312
|
"krds-language",
|
|
2318
2313
|
{
|
|
2319
|
-
active:
|
|
2314
|
+
active: l.value,
|
|
2320
2315
|
"drop-left": e.dropPosition === "left",
|
|
2321
2316
|
"drop-right": e.dropPosition === "right"
|
|
2322
2317
|
}
|
|
2323
2318
|
],
|
|
2324
|
-
onFocusout:
|
|
2319
|
+
onFocusout: S
|
|
2325
2320
|
}, [t("button", {
|
|
2326
2321
|
ref: s,
|
|
2327
2322
|
type: "button",
|
|
2328
|
-
class: ["krds-btn small text drop-btn", { active:
|
|
2329
|
-
"aria-expanded":
|
|
2330
|
-
onClick:
|
|
2323
|
+
class: ["krds-btn small text drop-btn", { active: l.value }],
|
|
2324
|
+
"aria-expanded": l.value,
|
|
2325
|
+
onClick: u
|
|
2331
2326
|
}, [
|
|
2332
2327
|
t("i", { class: "svg-icon ico-global" }),
|
|
2333
2328
|
r.default?.(),
|
|
2334
2329
|
t("i", { class: "svg-icon ico-toggle" })
|
|
2335
2330
|
]), t("div", {
|
|
2336
2331
|
class: "drop-menu",
|
|
2337
|
-
style: { display:
|
|
2338
|
-
}, [t("div", { class: "drop-in" }, [r["prev-item"] ? t("div", { class: "drop-top" }, r["prev-item"]()) : null, e.type === "default" ?
|
|
2332
|
+
style: { display: l.value ? "block" : "none" }
|
|
2333
|
+
}, [t("div", { class: "drop-in" }, [r["prev-item"] ? t("div", { class: "drop-top" }, r["prev-item"]()) : null, e.type === "default" ? c() : e.type === "external" ? o() : null])])]);
|
|
2339
2334
|
}
|
|
2340
|
-
}),
|
|
2335
|
+
}), da = oa, ua = A({
|
|
2341
2336
|
name: "KrdsResize",
|
|
2342
2337
|
emits: ["update:modelValue", "close"],
|
|
2343
|
-
setup(e, { emit:
|
|
2344
|
-
const r =
|
|
2338
|
+
setup(e, { emit: a }) {
|
|
2339
|
+
const r = B(!1), l = B(), n = B(), s = B("md"), u = [
|
|
2345
2340
|
{
|
|
2346
2341
|
key: "sm",
|
|
2347
2342
|
label: "작게",
|
|
@@ -2368,43 +2363,43 @@ var lt = D({
|
|
|
2368
2363
|
zoom: "1.5"
|
|
2369
2364
|
}
|
|
2370
2365
|
], h = () => {
|
|
2371
|
-
r.value = !r.value, r.value &&
|
|
2366
|
+
r.value = !r.value, r.value && l.value && T();
|
|
2372
2367
|
}, f = () => {
|
|
2373
2368
|
r.value = !1;
|
|
2374
|
-
},
|
|
2375
|
-
f(),
|
|
2376
|
-
},
|
|
2377
|
-
const i =
|
|
2378
|
-
i &&
|
|
2379
|
-
},
|
|
2380
|
-
if (!
|
|
2381
|
-
const i =
|
|
2369
|
+
}, w = (i) => {
|
|
2370
|
+
f(), a("close"), n.value?.focus(), s.value = i.key, document.body.style.zoom = i?.zoom;
|
|
2371
|
+
}, m = () => {
|
|
2372
|
+
const i = u.find((p) => p.key === "md");
|
|
2373
|
+
i && w(i);
|
|
2374
|
+
}, T = () => {
|
|
2375
|
+
if (!l.value) return;
|
|
2376
|
+
const i = l.value.querySelector(".drop-menu");
|
|
2382
2377
|
if (!i) return;
|
|
2383
|
-
const
|
|
2384
|
-
|
|
2385
|
-
},
|
|
2378
|
+
const p = i.getBoundingClientRect(), y = window.innerWidth;
|
|
2379
|
+
l.value.classList.remove("drop-left", "drop-right"), p.left < 0 ? l.value.classList.add("drop-left") : y < p.left + p.width && l.value.classList.add("drop-right");
|
|
2380
|
+
}, S = (i) => {
|
|
2386
2381
|
i.key === "Escape" && (f(), n.value?.focus());
|
|
2387
|
-
},
|
|
2388
|
-
|
|
2389
|
-
},
|
|
2390
|
-
|
|
2382
|
+
}, x = (i) => {
|
|
2383
|
+
l.value?.contains(i.target) || f();
|
|
2384
|
+
}, c = (i) => {
|
|
2385
|
+
l.value?.contains(i.relatedTarget) || f();
|
|
2391
2386
|
}, o = (i) => {
|
|
2392
|
-
if (!
|
|
2393
|
-
|
|
2394
|
-
|
|
2387
|
+
if (!l.value) return;
|
|
2388
|
+
l.value.querySelectorAll(".drop-list .item-link").forEach((y) => {
|
|
2389
|
+
y.style.position = "relative", y.style.zIndex = "0";
|
|
2395
2390
|
});
|
|
2396
|
-
const
|
|
2397
|
-
|
|
2391
|
+
const p = i.target;
|
|
2392
|
+
p.style.zIndex = "1";
|
|
2398
2393
|
};
|
|
2399
|
-
return
|
|
2400
|
-
i ? (document.addEventListener("keydown",
|
|
2401
|
-
}),
|
|
2402
|
-
document.removeEventListener("keydown",
|
|
2394
|
+
return se(r, (i) => {
|
|
2395
|
+
i ? (document.addEventListener("keydown", S), document.addEventListener("click", x)) : (document.removeEventListener("keydown", S), document.removeEventListener("click", x));
|
|
2396
|
+
}), re(() => {
|
|
2397
|
+
document.removeEventListener("keydown", S), document.removeEventListener("click", x);
|
|
2403
2398
|
}), () => t("div", {
|
|
2404
|
-
ref:
|
|
2399
|
+
ref: l,
|
|
2405
2400
|
class: "krds-drop-wrap krds-resize",
|
|
2406
2401
|
"data-adjust": "scale",
|
|
2407
|
-
onFocusout:
|
|
2402
|
+
onFocusout: c
|
|
2408
2403
|
}, [t("button", {
|
|
2409
2404
|
ref: n,
|
|
2410
2405
|
type: "button",
|
|
@@ -2413,7 +2408,7 @@ var lt = D({
|
|
|
2413
2408
|
}, ["화면크기 ", t("i", { class: "svg-icon ico-toggle" })]), t("div", {
|
|
2414
2409
|
class: "drop-menu",
|
|
2415
2410
|
style: { display: r.value ? "block" : "none" }
|
|
2416
|
-
}, [t("div", { class: "drop-in" }, [t("ul", { class: "drop-list" },
|
|
2411
|
+
}, [t("div", { class: "drop-in" }, [t("ul", { class: "drop-list" }, u.map((i) => t("li", { key: i.key }, [t("button", {
|
|
2417
2412
|
type: "button",
|
|
2418
2413
|
class: [
|
|
2419
2414
|
"item-link",
|
|
@@ -2421,17 +2416,17 @@ var lt = D({
|
|
|
2421
2416
|
i.key === s.value ? "active" : ""
|
|
2422
2417
|
],
|
|
2423
2418
|
"data-adjust-scale": i.key,
|
|
2424
|
-
onClick:
|
|
2419
|
+
onClick: ge(() => w(i), ["prevent"]),
|
|
2425
2420
|
onFocus: o
|
|
2426
2421
|
}, i.label)]))), t("div", { class: "drop-bottom" }, [t("button", {
|
|
2427
2422
|
type: "button",
|
|
2428
2423
|
class: "krds-btn medium text",
|
|
2429
2424
|
"data-adjust-scale": "md",
|
|
2430
|
-
onClick:
|
|
2425
|
+
onClick: ge(m, ["prevent"]),
|
|
2431
2426
|
onFocus: o
|
|
2432
2427
|
}, [t("i", { class: "svg-icon ico-reset" }), " 초기화"])])])])]);
|
|
2433
2428
|
}
|
|
2434
|
-
}),
|
|
2429
|
+
}), ca = ua, fa = A({
|
|
2435
2430
|
name: "KrdsModal",
|
|
2436
2431
|
props: {
|
|
2437
2432
|
modelValue: {
|
|
@@ -2465,43 +2460,43 @@ var lt = D({
|
|
|
2465
2460
|
},
|
|
2466
2461
|
emits: ["update:modelValue"],
|
|
2467
2462
|
slots: Object,
|
|
2468
|
-
setup(e, { slots:
|
|
2469
|
-
const
|
|
2463
|
+
setup(e, { slots: a, emit: r }) {
|
|
2464
|
+
const l = xe()?.uid, n = b(() => e.modalId ?? `krds-modal-${l}`), s = b({
|
|
2470
2465
|
get: () => e.modelValue,
|
|
2471
2466
|
set: (i) => r("update:modelValue", i)
|
|
2472
|
-
}),
|
|
2467
|
+
}), u = b(() => `tit_${n.value}`), h = b(() => ({
|
|
2473
2468
|
small: "modal-sm",
|
|
2474
2469
|
medium: "modal-md",
|
|
2475
2470
|
large: "modal-lg"
|
|
2476
2471
|
})[e.size]), f = () => {
|
|
2477
2472
|
s.value = !1;
|
|
2478
2473
|
};
|
|
2479
|
-
let
|
|
2480
|
-
const
|
|
2481
|
-
if (!
|
|
2482
|
-
const
|
|
2483
|
-
if (
|
|
2474
|
+
let w = "", m = null;
|
|
2475
|
+
const T = B(null), S = (i) => Array.from(i.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter((p) => !p.hasAttribute("disabled") && p.getAttribute("tabindex") !== "-1"), x = (i) => {
|
|
2476
|
+
if (!T.value || i.key !== "Tab") return;
|
|
2477
|
+
const p = S(T.value);
|
|
2478
|
+
if (p.length === 0) {
|
|
2484
2479
|
i.preventDefault();
|
|
2485
2480
|
return;
|
|
2486
2481
|
}
|
|
2487
|
-
const
|
|
2488
|
-
i.shiftKey && document.activeElement ===
|
|
2489
|
-
},
|
|
2482
|
+
const y = p[0], $ = p[p.length - 1];
|
|
2483
|
+
i.shiftKey && document.activeElement === y ? (i.preventDefault(), $.focus()) : !i.shiftKey && document.activeElement === $ && (i.preventDefault(), y.focus());
|
|
2484
|
+
}, c = (i) => {
|
|
2490
2485
|
i.key === "Escape" && !e.persistent && f();
|
|
2491
2486
|
}, o = () => {
|
|
2492
|
-
document.body.style.overflow =
|
|
2487
|
+
document.body.style.overflow = w, document.removeEventListener("keydown", x), document.removeEventListener("keydown", c), m && (m.focus(), m = null), T.value = null;
|
|
2493
2488
|
};
|
|
2494
|
-
return
|
|
2489
|
+
return se(() => e.modelValue, async (i) => {
|
|
2495
2490
|
if (i) {
|
|
2496
|
-
|
|
2497
|
-
const
|
|
2498
|
-
if (
|
|
2499
|
-
|
|
2500
|
-
const
|
|
2501
|
-
|
|
2491
|
+
w = document.body.style.overflow, document.body.style.overflow = "hidden", m = document.activeElement, await ce();
|
|
2492
|
+
const p = document.getElementById(n.value);
|
|
2493
|
+
if (p) {
|
|
2494
|
+
T.value = p;
|
|
2495
|
+
const y = p.querySelector(".modal-conts");
|
|
2496
|
+
y && (y.setAttribute("tabindex", "-1"), y.focus()), document.addEventListener("keydown", x), document.addEventListener("keydown", c);
|
|
2502
2497
|
}
|
|
2503
2498
|
} else o();
|
|
2504
|
-
}, { immediate: !0 }),
|
|
2499
|
+
}, { immediate: !0 }), fe(() => {
|
|
2505
2500
|
e.modelValue && o();
|
|
2506
2501
|
}), () => {
|
|
2507
2502
|
if (!s.value) return null;
|
|
@@ -2510,15 +2505,15 @@ var lt = D({
|
|
|
2510
2505
|
class: "krds-modal fade in shown",
|
|
2511
2506
|
role: "dialog",
|
|
2512
2507
|
"aria-modal": !0,
|
|
2513
|
-
"aria-labelledby":
|
|
2508
|
+
"aria-labelledby": u.value
|
|
2514
2509
|
};
|
|
2515
|
-
return e.full ? i["data-type"] = "full" : e.bottomSheet && (i["data-type"] = "bottom-sheet"), t(
|
|
2516
|
-
|
|
2517
|
-
id:
|
|
2510
|
+
return e.full ? i["data-type"] = "full" : e.bottomSheet && (i["data-type"] = "bottom-sheet"), t(Ce, { to: "body" }, t("section", i, [t("div", { class: `modal-dialog ${h.value}` }, [t("div", { class: "modal-content" }, [
|
|
2511
|
+
a.title ? t("div", { class: "modal-header" }, [t("h2", {
|
|
2512
|
+
id: u.value,
|
|
2518
2513
|
class: "modal-title"
|
|
2519
|
-
},
|
|
2520
|
-
t("div", { class: "modal-conts" }, [t("div", { class: "conts-area" },
|
|
2521
|
-
|
|
2514
|
+
}, a.title())]) : null,
|
|
2515
|
+
t("div", { class: "modal-conts" }, [t("div", { class: "conts-area" }, a.default?.())]),
|
|
2516
|
+
a.footer ? t("div", { class: "modal-btn btn-wrap" }, a.footer()) : null,
|
|
2522
2517
|
t("button", {
|
|
2523
2518
|
type: "button",
|
|
2524
2519
|
class: "krds-btn medium icon btn-close close-modal",
|
|
@@ -2530,7 +2525,7 @@ var lt = D({
|
|
|
2530
2525
|
})]));
|
|
2531
2526
|
};
|
|
2532
2527
|
}
|
|
2533
|
-
}),
|
|
2528
|
+
}), va = fa, pa = A({
|
|
2534
2529
|
name: "KrdsAccordionGroup",
|
|
2535
2530
|
props: {
|
|
2536
2531
|
typeLine: {
|
|
@@ -2542,14 +2537,14 @@ var lt = D({
|
|
|
2542
2537
|
default: void 0
|
|
2543
2538
|
}
|
|
2544
2539
|
},
|
|
2545
|
-
setup(e, { slots:
|
|
2546
|
-
const r =
|
|
2547
|
-
const
|
|
2548
|
-
return e.typeLine &&
|
|
2540
|
+
setup(e, { slots: a }) {
|
|
2541
|
+
const r = b(() => {
|
|
2542
|
+
const l = ["krds-accordion"];
|
|
2543
|
+
return e.typeLine && l.push("type-line"), e.class && l.push(e.class), l;
|
|
2549
2544
|
});
|
|
2550
|
-
return () => t("div", { class: r.value },
|
|
2545
|
+
return () => t("div", { class: r.value }, a.default?.());
|
|
2551
2546
|
}
|
|
2552
|
-
}),
|
|
2547
|
+
}), ga = pa, ha = A({
|
|
2553
2548
|
name: "KrdsAccordionItem",
|
|
2554
2549
|
props: {
|
|
2555
2550
|
id: {
|
|
@@ -2570,18 +2565,18 @@ var lt = D({
|
|
|
2570
2565
|
}
|
|
2571
2566
|
},
|
|
2572
2567
|
emits: ["toggle"],
|
|
2573
|
-
setup(e, { emit:
|
|
2574
|
-
const
|
|
2575
|
-
|
|
2568
|
+
setup(e, { emit: a, slots: r }) {
|
|
2569
|
+
const l = b(() => e.openItem === e.id), n = () => {
|
|
2570
|
+
a("toggle", e.id);
|
|
2576
2571
|
};
|
|
2577
2572
|
return () => t("div", {
|
|
2578
2573
|
id: e.id,
|
|
2579
|
-
class: ["accordion-item", { active:
|
|
2574
|
+
class: ["accordion-item", { active: l.value }]
|
|
2580
2575
|
}, [t("h5", { class: "accordion-header" }, [t("button", {
|
|
2581
2576
|
id: `accordion-header-${e.id}`,
|
|
2582
2577
|
type: "button",
|
|
2583
|
-
class: ["btn-accordion", { active:
|
|
2584
|
-
"aria-expanded":
|
|
2578
|
+
class: ["btn-accordion", { active: l.value }],
|
|
2579
|
+
"aria-expanded": l.value,
|
|
2585
2580
|
"aria-controls": `accordion-collapse-${e.id}`,
|
|
2586
2581
|
onClick: n
|
|
2587
2582
|
}, r.title?.() ?? e.title)]), t("div", {
|
|
@@ -2591,7 +2586,7 @@ var lt = D({
|
|
|
2591
2586
|
"aria-labelledby": `accordion-header-${e.id}`
|
|
2592
2587
|
}, [t("div", { class: "accordion-body" }, r.content?.() ?? e.content)])]);
|
|
2593
2588
|
}
|
|
2594
|
-
}),
|
|
2589
|
+
}), ya = ha, ma = A({
|
|
2595
2590
|
name: "KrdsTts",
|
|
2596
2591
|
props: {
|
|
2597
2592
|
text: {
|
|
@@ -2625,34 +2620,34 @@ var lt = D({
|
|
|
2625
2620
|
"end",
|
|
2626
2621
|
"error"
|
|
2627
2622
|
],
|
|
2628
|
-
setup(e, { emit:
|
|
2629
|
-
const r =
|
|
2630
|
-
let
|
|
2623
|
+
setup(e, { emit: a }) {
|
|
2624
|
+
const r = B(!1);
|
|
2625
|
+
let l = null;
|
|
2631
2626
|
const n = () => {
|
|
2632
|
-
typeof window < "u" && window.speechSynthesis && window.speechSynthesis.cancel(), r.value = !1,
|
|
2627
|
+
typeof window < "u" && window.speechSynthesis && window.speechSynthesis.cancel(), r.value = !1, l = null;
|
|
2633
2628
|
}, s = () => {
|
|
2634
2629
|
if (!e.disabled) {
|
|
2635
2630
|
if (r.value) {
|
|
2636
|
-
n(),
|
|
2631
|
+
n(), a("pause");
|
|
2637
2632
|
return;
|
|
2638
2633
|
}
|
|
2639
2634
|
if (typeof window > "u" || !window.speechSynthesis) {
|
|
2640
|
-
|
|
2635
|
+
a("error", /* @__PURE__ */ new Error("SpeechSynthesis API is not supported"));
|
|
2641
2636
|
return;
|
|
2642
2637
|
}
|
|
2643
|
-
window.speechSynthesis.cancel(),
|
|
2638
|
+
window.speechSynthesis.cancel(), l = new SpeechSynthesisUtterance(e.text), l.lang = "ko-KR", l.onstart = () => {
|
|
2644
2639
|
r.value = !0;
|
|
2645
|
-
},
|
|
2646
|
-
r.value = !1,
|
|
2647
|
-
},
|
|
2648
|
-
r.value = !1,
|
|
2649
|
-
}, window.speechSynthesis.speak(
|
|
2640
|
+
}, l.onend = () => {
|
|
2641
|
+
r.value = !1, l = null, a("end");
|
|
2642
|
+
}, l.onerror = (f) => {
|
|
2643
|
+
r.value = !1, l = null, f.error !== "canceled" && a("error", new Error(f.error));
|
|
2644
|
+
}, window.speechSynthesis.speak(l), a("play", e.text);
|
|
2650
2645
|
}
|
|
2651
|
-
},
|
|
2646
|
+
}, u = b(() => {
|
|
2652
2647
|
const f = ["krds-tts"];
|
|
2653
2648
|
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 =
|
|
2655
|
-
return
|
|
2649
|
+
}), h = b(() => r.value ? "ico-stop" : e.icon === "play" ? "ico-play" : "ico-volume");
|
|
2650
|
+
return fe(() => {
|
|
2656
2651
|
n();
|
|
2657
2652
|
}), () => {
|
|
2658
2653
|
const f = [t("span", {
|
|
@@ -2661,13 +2656,13 @@ var lt = D({
|
|
|
2661
2656
|
}, [t("i", { class: `svg-icon ${h.value}` })])];
|
|
2662
2657
|
return e.label && f.push(t("span", { class: "krds-tts-text" }, e.label)), t("button", {
|
|
2663
2658
|
type: "button",
|
|
2664
|
-
class:
|
|
2659
|
+
class: u.value,
|
|
2665
2660
|
disabled: e.disabled || void 0,
|
|
2666
2661
|
onClick: s
|
|
2667
2662
|
}, f);
|
|
2668
2663
|
};
|
|
2669
2664
|
}
|
|
2670
|
-
}),
|
|
2665
|
+
}), ba = ma, ka = A({
|
|
2671
2666
|
name: "KrdsTable",
|
|
2672
2667
|
props: {
|
|
2673
2668
|
caption: {
|
|
@@ -2689,105 +2684,98 @@ var lt = D({
|
|
|
2689
2684
|
},
|
|
2690
2685
|
emits: ["row-click"],
|
|
2691
2686
|
slots: Object,
|
|
2692
|
-
setup(e, { emit:
|
|
2693
|
-
const
|
|
2694
|
-
const
|
|
2695
|
-
return e.class &&
|
|
2696
|
-
}), n =
|
|
2687
|
+
setup(e, { emit: a, slots: r }) {
|
|
2688
|
+
const l = b(() => {
|
|
2689
|
+
const c = ["tbl"];
|
|
2690
|
+
return e.class && c.push(e.class), c;
|
|
2691
|
+
}), n = b(() => ["krds-table-wrap"]), s = (c) => c.headerStyle || void 0, u = (c) => {
|
|
2697
2692
|
const o = [];
|
|
2698
|
-
return
|
|
2699
|
-
}, h = (
|
|
2693
|
+
return c.align && o.push(`text-${c.align}`), c.headerClasses && o.push(c.headerClasses), o.length > 0 ? o : void 0;
|
|
2694
|
+
}, h = (c, o) => {
|
|
2700
2695
|
if (o.style)
|
|
2701
|
-
return typeof o.style == "function" ? o.style(
|
|
2702
|
-
}, f = (
|
|
2696
|
+
return typeof o.style == "function" ? o.style(c) : o.style;
|
|
2697
|
+
}, f = (c, o) => {
|
|
2703
2698
|
const i = [];
|
|
2704
2699
|
if (o.align && i.push(`text-${o.align}`), o.classes) {
|
|
2705
|
-
const
|
|
2706
|
-
i.push(
|
|
2700
|
+
const p = typeof o.classes == "function" ? o.classes(c) : o.classes;
|
|
2701
|
+
i.push(p);
|
|
2707
2702
|
}
|
|
2708
2703
|
return i.length > 0 ? i : void 0;
|
|
2709
|
-
},
|
|
2710
|
-
if (!
|
|
2711
|
-
const o =
|
|
2704
|
+
}, w = () => !e.columns.length || !e.columns.some((c) => c.headerStyle && c.headerStyle.includes("width")) ? null : t("colgroup", e.columns.map((c) => {
|
|
2705
|
+
if (!c.headerStyle) return t("col");
|
|
2706
|
+
const o = c.headerStyle.match(/width\s*:\s*([^;]+)/i);
|
|
2712
2707
|
return t("col", { style: o ? { width: o[1].trim() } : void 0 });
|
|
2713
|
-
})),
|
|
2708
|
+
})), m = () => {
|
|
2714
2709
|
if (!e.columns.length) return null;
|
|
2715
|
-
const
|
|
2716
|
-
const i = s(o),
|
|
2710
|
+
const c = e.columns.map((o) => {
|
|
2711
|
+
const i = s(o), p = u(o);
|
|
2717
2712
|
return t("th", {
|
|
2718
2713
|
scope: "col",
|
|
2719
|
-
class:
|
|
2714
|
+
class: p,
|
|
2720
2715
|
style: i
|
|
2721
2716
|
}, o.label);
|
|
2722
2717
|
});
|
|
2723
|
-
return t("thead", [t("tr",
|
|
2724
|
-
},
|
|
2718
|
+
return t("thead", [t("tr", c)]);
|
|
2719
|
+
}, T = (c, o) => typeof o.field == "function" ? o.field(c) : c[o.field], S = () => {
|
|
2725
2720
|
if (!e.rows.length) return t("tbody", [t("tr", [t("td", {
|
|
2726
2721
|
colspan: e.columns.length || 1,
|
|
2727
2722
|
class: "text-center"
|
|
2728
2723
|
}, r["no-data"] ? r["no-data"]() : "데이터가 없습니다.")])]);
|
|
2729
|
-
const
|
|
2730
|
-
const
|
|
2731
|
-
const
|
|
2732
|
-
return t(
|
|
2733
|
-
scope:
|
|
2734
|
-
class:
|
|
2735
|
-
style:
|
|
2736
|
-
},
|
|
2724
|
+
const c = e.rows.map((o, i) => {
|
|
2725
|
+
const p = e.columns.map((y, $) => {
|
|
2726
|
+
const C = T(o, y), E = typeof C == "function" ? C() : C, D = h(o, y), _ = f(o, y);
|
|
2727
|
+
return t($ === 0 ? "th" : "td", {
|
|
2728
|
+
scope: $ === 0 ? "row" : void 0,
|
|
2729
|
+
class: _,
|
|
2730
|
+
style: D
|
|
2731
|
+
}, E);
|
|
2737
2732
|
});
|
|
2738
|
-
return t("tr", { onClick: () =>
|
|
2733
|
+
return t("tr", { onClick: () => x(o, i) }, p);
|
|
2739
2734
|
});
|
|
2740
|
-
return t("tbody",
|
|
2741
|
-
},
|
|
2742
|
-
|
|
2735
|
+
return t("tbody", c);
|
|
2736
|
+
}, x = (c, o) => {
|
|
2737
|
+
a("row-click", c, o);
|
|
2743
2738
|
};
|
|
2744
|
-
return () => t("div", { class: n.value }, [t("table", { class:
|
|
2739
|
+
return () => t("div", { class: n.value }, [t("table", { class: l.value }, [
|
|
2745
2740
|
e.caption && t("caption", e.caption),
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2741
|
+
w(),
|
|
2742
|
+
m(),
|
|
2743
|
+
S()
|
|
2749
2744
|
])]);
|
|
2750
2745
|
}
|
|
2751
|
-
}),
|
|
2746
|
+
}), Sa = ka, wa = A({
|
|
2752
2747
|
name: "KrdsHeader",
|
|
2753
2748
|
props: {
|
|
2754
2749
|
id: {
|
|
2755
2750
|
type: String,
|
|
2756
2751
|
default: "krds-header"
|
|
2757
2752
|
},
|
|
2758
|
-
mobileNavId: {
|
|
2759
|
-
type: String,
|
|
2760
|
-
default: "mobile-nav"
|
|
2761
|
-
},
|
|
2762
2753
|
class: {
|
|
2763
2754
|
type: String,
|
|
2764
2755
|
default: void 0
|
|
2765
2756
|
}
|
|
2766
2757
|
},
|
|
2767
2758
|
slots: Object,
|
|
2768
|
-
setup(e, { slots:
|
|
2769
|
-
const r =
|
|
2770
|
-
const
|
|
2771
|
-
return e.class &&
|
|
2759
|
+
setup(e, { slots: a }) {
|
|
2760
|
+
const r = b(() => {
|
|
2761
|
+
const l = [];
|
|
2762
|
+
return e.class && l.push(e.class), l;
|
|
2772
2763
|
});
|
|
2773
2764
|
return () => {
|
|
2774
|
-
const
|
|
2775
|
-
if (
|
|
2765
|
+
const l = [];
|
|
2766
|
+
if (a.utility || a.branding) {
|
|
2776
2767
|
const s = [];
|
|
2777
|
-
|
|
2768
|
+
a.utility && s.push(t("div", { class: "header-utility" }, a.utility())), a.branding && s.push(t("div", { class: "header-branding" }, a.branding())), l.push(t("div", { class: "header-container" }, [t("div", { class: "inner" }, s)]));
|
|
2778
2769
|
}
|
|
2779
|
-
|
|
2780
|
-
const n = [t("div", { class: "header-in" },
|
|
2781
|
-
return
|
|
2782
|
-
id: e.mobileNavId,
|
|
2783
|
-
class: "krds-main-menu-mobile"
|
|
2784
|
-
}, l.mobileNavigation())), t("header", {
|
|
2770
|
+
a.navigation && l.push(...a.navigation());
|
|
2771
|
+
const n = [t("div", { class: "header-in" }, l)];
|
|
2772
|
+
return a.mobileNavigation && n.push(...a.mobileNavigation()), t("header", {
|
|
2785
2773
|
id: e.id,
|
|
2786
2774
|
class: r.value
|
|
2787
2775
|
}, n);
|
|
2788
2776
|
};
|
|
2789
2777
|
}
|
|
2790
|
-
}),
|
|
2778
|
+
}), Ka = wa, Ca = A({
|
|
2791
2779
|
name: "KrdsFooter",
|
|
2792
2780
|
props: {
|
|
2793
2781
|
id: {
|
|
@@ -2799,22 +2787,22 @@ var lt = D({
|
|
|
2799
2787
|
default: void 0
|
|
2800
2788
|
}
|
|
2801
2789
|
},
|
|
2802
|
-
setup(e, { slots:
|
|
2803
|
-
const r =
|
|
2790
|
+
setup(e, { slots: a }) {
|
|
2791
|
+
const r = b(() => {
|
|
2804
2792
|
const h = [];
|
|
2805
2793
|
return e.class && h.push(e.class), h;
|
|
2806
|
-
}),
|
|
2794
|
+
}), l = () => a.top ? t("div", { class: "foot-quick" }, [t("div", { class: "inner" }, a.top())]) : null, n = () => a.logo ? t("div", { class: "f-logo" }, a.logo()) : null, s = () => a.content ? t("div", { class: "f-cnt" }, a.content()) : null, u = () => a.bottom ? t("div", { class: "f-btm" }, a.bottom()) : null;
|
|
2807
2795
|
return () => {
|
|
2808
|
-
const h =
|
|
2809
|
-
f &&
|
|
2810
|
-
const
|
|
2811
|
-
return h &&
|
|
2796
|
+
const h = l(), f = n(), w = s(), m = u(), T = [];
|
|
2797
|
+
f && T.push(f), w && T.push(w), m && T.push(m);
|
|
2798
|
+
const S = [];
|
|
2799
|
+
return h && S.push(h), T.length > 0 && S.push(t("div", { class: "inner" }, T)), t("footer", {
|
|
2812
2800
|
id: e.id,
|
|
2813
2801
|
class: r.value
|
|
2814
|
-
},
|
|
2802
|
+
}, S);
|
|
2815
2803
|
};
|
|
2816
2804
|
}
|
|
2817
|
-
}),
|
|
2805
|
+
}), xa = Ca, $a = A({
|
|
2818
2806
|
name: "KrdsDisclosure",
|
|
2819
2807
|
props: {
|
|
2820
2808
|
title: {
|
|
@@ -2827,9 +2815,9 @@ var lt = D({
|
|
|
2827
2815
|
}
|
|
2828
2816
|
},
|
|
2829
2817
|
emits: ["update:modelValue"],
|
|
2830
|
-
setup(e, { emit:
|
|
2831
|
-
const
|
|
2832
|
-
|
|
2818
|
+
setup(e, { emit: a, slots: r }) {
|
|
2819
|
+
const l = `disclosure-${de()}`, n = b(() => e.modelValue), s = () => {
|
|
2820
|
+
a("update:modelValue", !e.modelValue);
|
|
2833
2821
|
};
|
|
2834
2822
|
return () => t("div", { class: [
|
|
2835
2823
|
"krds-disclosure",
|
|
@@ -2840,14 +2828,14 @@ var lt = D({
|
|
|
2840
2828
|
class: "btn-conts-expand",
|
|
2841
2829
|
onClick: s,
|
|
2842
2830
|
"aria-expanded": n.value,
|
|
2843
|
-
"aria-controls":
|
|
2831
|
+
"aria-controls": l
|
|
2844
2832
|
}, e.title), t("div", {
|
|
2845
|
-
id:
|
|
2833
|
+
id: l,
|
|
2846
2834
|
class: "expand-wrap",
|
|
2847
2835
|
inert: !n.value
|
|
2848
2836
|
}, [t("div", { class: "expand-in" }, r.default?.())])]);
|
|
2849
2837
|
}
|
|
2850
|
-
}),
|
|
2838
|
+
}), La = $a, Da = A({
|
|
2851
2839
|
name: "KrdsIdentifier",
|
|
2852
2840
|
props: {
|
|
2853
2841
|
class: {
|
|
@@ -2860,19 +2848,19 @@ var lt = D({
|
|
|
2860
2848
|
}
|
|
2861
2849
|
},
|
|
2862
2850
|
emits: ["click"],
|
|
2863
|
-
setup(e, { emit:
|
|
2864
|
-
const
|
|
2851
|
+
setup(e, { emit: a, slots: r }) {
|
|
2852
|
+
const l = b(() => {
|
|
2865
2853
|
const s = ["krds-identifier"];
|
|
2866
2854
|
return e.class && s.push(e.class), s;
|
|
2867
2855
|
}), n = (s) => {
|
|
2868
|
-
|
|
2856
|
+
a("click", s);
|
|
2869
2857
|
};
|
|
2870
2858
|
return () => t("div", {
|
|
2871
|
-
class:
|
|
2859
|
+
class: l.value,
|
|
2872
2860
|
onClick: n
|
|
2873
2861
|
}, [t("span", { class: "logo" }, [t("span", { class: "sr-only" }, e.logoLabel)]), t("span", { class: "ban-txt" }, r.default?.())]);
|
|
2874
2862
|
}
|
|
2875
|
-
}),
|
|
2863
|
+
}), Ba = Da, Ea = 50, Ta = A({
|
|
2876
2864
|
name: "KrdsLayout",
|
|
2877
2865
|
props: {
|
|
2878
2866
|
id: {
|
|
@@ -2893,46 +2881,46 @@ var lt = D({
|
|
|
2893
2881
|
scroll: (e) => !0,
|
|
2894
2882
|
"scroll-height": (e) => !0
|
|
2895
2883
|
},
|
|
2896
|
-
setup(e, { slots:
|
|
2897
|
-
const
|
|
2898
|
-
const
|
|
2899
|
-
|
|
2900
|
-
},
|
|
2884
|
+
setup(e, { slots: a, emit: r }) {
|
|
2885
|
+
const l = B(0), n = B(0), s = B(0), u = B(null), h = B(null), f = B(null), w = () => {
|
|
2886
|
+
const c = n.value;
|
|
2887
|
+
l.value = window.scrollY, n.value = document.body.scrollHeight, c !== n.value && c > 0 && r("scroll-height", n.value);
|
|
2888
|
+
}, m = () => {
|
|
2901
2889
|
if (!h.value || !e.enableScrollDetection) return;
|
|
2902
|
-
const
|
|
2903
|
-
if (!
|
|
2904
|
-
const o =
|
|
2905
|
-
i > o +
|
|
2906
|
-
},
|
|
2907
|
-
|
|
2908
|
-
scrollY:
|
|
2890
|
+
const c = document.querySelector("#container");
|
|
2891
|
+
if (!c) return;
|
|
2892
|
+
const o = c.offsetTop, i = window.scrollY, p = i > s.value, y = i < s.value;
|
|
2893
|
+
i > o + Ea ? p ? (h.value.classList.add("scroll-down"), h.value.classList.remove("scroll-up"), u.value = "down") : y && (h.value.classList.add("scroll-up"), h.value.classList.remove("scroll-down"), u.value = "up") : (h.value.classList.remove("scroll-down", "scroll-up"), u.value = null), s.value = i;
|
|
2894
|
+
}, T = () => {
|
|
2895
|
+
w(), m(), r("scroll", {
|
|
2896
|
+
scrollY: l.value,
|
|
2909
2897
|
scrollHeight: n.value,
|
|
2910
|
-
direction:
|
|
2898
|
+
direction: u.value,
|
|
2911
2899
|
timestamp: Date.now()
|
|
2912
2900
|
});
|
|
2913
|
-
},
|
|
2914
|
-
for (const o of
|
|
2915
|
-
const { width: i, height:
|
|
2901
|
+
}, S = (c) => {
|
|
2902
|
+
for (const o of c) {
|
|
2903
|
+
const { width: i, height: p } = o.contentRect;
|
|
2916
2904
|
r("resize", {
|
|
2917
2905
|
width: i,
|
|
2918
|
-
height:
|
|
2906
|
+
height: p
|
|
2919
2907
|
});
|
|
2920
2908
|
}
|
|
2921
|
-
},
|
|
2922
|
-
const
|
|
2923
|
-
return e.class &&
|
|
2909
|
+
}, x = b(() => {
|
|
2910
|
+
const c = ["g-wrap"];
|
|
2911
|
+
return e.class && c.push(e.class), c;
|
|
2924
2912
|
});
|
|
2925
|
-
return
|
|
2926
|
-
e.enableScrollDetection && (
|
|
2927
|
-
}),
|
|
2928
|
-
e.enableScrollDetection && window.removeEventListener("scroll",
|
|
2913
|
+
return ie(() => {
|
|
2914
|
+
e.enableScrollDetection && (w(), window.addEventListener("scroll", T, { passive: !0 })), h.value && typeof ResizeObserver < "u" && (f.value = new ResizeObserver(S), f.value.observe(h.value));
|
|
2915
|
+
}), re(() => {
|
|
2916
|
+
e.enableScrollDetection && window.removeEventListener("scroll", T), f.value && (f.value.disconnect(), f.value = null);
|
|
2929
2917
|
}), () => t("div", {
|
|
2930
2918
|
id: e.id,
|
|
2931
|
-
class:
|
|
2919
|
+
class: x.value,
|
|
2932
2920
|
ref: h
|
|
2933
|
-
},
|
|
2921
|
+
}, a.default?.());
|
|
2934
2922
|
}
|
|
2935
|
-
}),
|
|
2923
|
+
}), _a = Ta, Ma = A({
|
|
2936
2924
|
name: "KrdsSideNavigation",
|
|
2937
2925
|
props: {
|
|
2938
2926
|
title: {
|
|
@@ -2945,161 +2933,161 @@ var lt = D({
|
|
|
2945
2933
|
}
|
|
2946
2934
|
},
|
|
2947
2935
|
emits: ["update:modelValue"],
|
|
2948
|
-
setup(e, { emit:
|
|
2949
|
-
const r =
|
|
2950
|
-
const
|
|
2951
|
-
|
|
2952
|
-
}, f = (
|
|
2953
|
-
const
|
|
2954
|
-
|
|
2955
|
-
},
|
|
2956
|
-
const
|
|
2957
|
-
|
|
2958
|
-
},
|
|
2959
|
-
|
|
2960
|
-
if (
|
|
2961
|
-
const
|
|
2962
|
-
...
|
|
2963
|
-
expanded: !
|
|
2936
|
+
setup(e, { emit: a }) {
|
|
2937
|
+
const r = b(() => e.modelValue || []), l = B(/* @__PURE__ */ new Map()), n = B(/* @__PURE__ */ new Map()), s = B(/* @__PURE__ */ new Map()), u = B(null), h = ($, C, E) => {
|
|
2938
|
+
const D = `${C}-${E}`;
|
|
2939
|
+
$ ? l.value.set(D, $) : l.value.delete(D);
|
|
2940
|
+
}, f = ($, C, E) => {
|
|
2941
|
+
const D = `${C}-${E}`;
|
|
2942
|
+
$ ? n.value.set(D, $) : n.value.delete(D);
|
|
2943
|
+
}, w = ($, C, E) => {
|
|
2944
|
+
const D = `${C}-${E}`;
|
|
2945
|
+
$ ? s.value.set(D, $) : s.value.delete(D);
|
|
2946
|
+
}, m = ($) => {
|
|
2947
|
+
a("update:modelValue", r.value.map((C, E) => {
|
|
2948
|
+
if (E === $ && C.subItems) {
|
|
2949
|
+
const D = C.expanded, _ = {
|
|
2950
|
+
...C,
|
|
2951
|
+
expanded: !C.expanded
|
|
2964
2952
|
};
|
|
2965
|
-
return
|
|
2966
|
-
...
|
|
2953
|
+
return D && !_.expanded && (_.subItems = C.subItems.map((v) => ({
|
|
2954
|
+
...v,
|
|
2967
2955
|
expanded: !1
|
|
2968
|
-
})),
|
|
2956
|
+
})), u.value = null), _;
|
|
2969
2957
|
}
|
|
2970
|
-
return
|
|
2958
|
+
return C;
|
|
2971
2959
|
}));
|
|
2972
|
-
},
|
|
2973
|
-
|
|
2974
|
-
...
|
|
2975
|
-
subItems:
|
|
2976
|
-
if (
|
|
2977
|
-
const
|
|
2978
|
-
...
|
|
2979
|
-
expanded: !
|
|
2960
|
+
}, T = ($, C) => {
|
|
2961
|
+
a("update:modelValue", r.value.map((E, D) => D === $ && E.subItems ? {
|
|
2962
|
+
...E,
|
|
2963
|
+
subItems: E.subItems.map((_, v) => {
|
|
2964
|
+
if (v === C && _.subItems) {
|
|
2965
|
+
const M = {
|
|
2966
|
+
..._,
|
|
2967
|
+
expanded: !_.expanded
|
|
2980
2968
|
};
|
|
2981
|
-
if (
|
|
2982
|
-
const
|
|
2983
|
-
|
|
2984
|
-
const
|
|
2985
|
-
|
|
2986
|
-
|
|
2969
|
+
if (M.expanded) {
|
|
2970
|
+
const I = `${$}-${C}`;
|
|
2971
|
+
u.value = l.value.get(I) || null;
|
|
2972
|
+
const N = n.value.get(I), H = s.value.get(I);
|
|
2973
|
+
N && H && N.addEventListener("transitionend", () => {
|
|
2974
|
+
H.focus();
|
|
2987
2975
|
}, { once: !0 });
|
|
2988
2976
|
}
|
|
2989
|
-
return
|
|
2977
|
+
return M;
|
|
2990
2978
|
}
|
|
2991
|
-
return
|
|
2979
|
+
return _;
|
|
2992
2980
|
})
|
|
2993
|
-
} :
|
|
2994
|
-
},
|
|
2995
|
-
|
|
2996
|
-
...
|
|
2997
|
-
subItems:
|
|
2998
|
-
if (
|
|
2999
|
-
if (
|
|
3000
|
-
const
|
|
2981
|
+
} : E));
|
|
2982
|
+
}, S = ($, C) => {
|
|
2983
|
+
a("update:modelValue", r.value.map((E, D) => D === $ && E.subItems ? {
|
|
2984
|
+
...E,
|
|
2985
|
+
subItems: E.subItems.map((_, v) => {
|
|
2986
|
+
if (v === C && _.subItems && _.expanded) {
|
|
2987
|
+
if (u.value) {
|
|
2988
|
+
const M = u.value;
|
|
3001
2989
|
requestAnimationFrame(() => {
|
|
3002
|
-
|
|
3003
|
-
}),
|
|
2990
|
+
M.focus();
|
|
2991
|
+
}), u.value = null;
|
|
3004
2992
|
}
|
|
3005
2993
|
return {
|
|
3006
|
-
...
|
|
2994
|
+
..._,
|
|
3007
2995
|
expanded: !1
|
|
3008
2996
|
};
|
|
3009
2997
|
}
|
|
3010
|
-
return
|
|
2998
|
+
return _;
|
|
3011
2999
|
})
|
|
3012
|
-
} :
|
|
3013
|
-
},
|
|
3014
|
-
const
|
|
3015
|
-
|
|
3016
|
-
},
|
|
3017
|
-
|
|
3018
|
-
}, o = (
|
|
3019
|
-
|
|
3020
|
-
}, i = (
|
|
3021
|
-
key: `popup-item-${
|
|
3000
|
+
} : E));
|
|
3001
|
+
}, x = ($, C, E) => {
|
|
3002
|
+
const D = `${C}-${E}`, _ = n.value.get(D);
|
|
3003
|
+
_ && !_.contains($.relatedTarget) && S(C, E);
|
|
3004
|
+
}, c = ($, C) => {
|
|
3005
|
+
S($, C);
|
|
3006
|
+
}, o = ($, C) => {
|
|
3007
|
+
$.onClick && $.onClick(C);
|
|
3008
|
+
}, i = ($, C, E) => $.map((D, _) => t("li", {
|
|
3009
|
+
key: `popup-item-${C}-${E}-${_}`,
|
|
3022
3010
|
role: "none"
|
|
3023
3011
|
}, t("a", {
|
|
3024
|
-
href:
|
|
3012
|
+
href: D.href || "#",
|
|
3025
3013
|
class: "lnb-btn",
|
|
3026
3014
|
role: "menuitem",
|
|
3027
|
-
onClick: (
|
|
3028
|
-
},
|
|
3029
|
-
const
|
|
3015
|
+
onClick: (v) => o(D, v)
|
|
3016
|
+
}, D.text))), p = ($, C) => $.map((E, D) => {
|
|
3017
|
+
const _ = `lnb-subitem-${C}-${D}`;
|
|
3030
3018
|
return t("li", {
|
|
3031
|
-
key:
|
|
3032
|
-
class: ["lnb-subitem", { active:
|
|
3019
|
+
key: _,
|
|
3020
|
+
class: ["lnb-subitem", { active: E.expanded }],
|
|
3033
3021
|
role: "none"
|
|
3034
|
-
}, [
|
|
3035
|
-
ref: (
|
|
3022
|
+
}, [E.subItems ? [t("button", {
|
|
3023
|
+
ref: (v) => h(v, C, D),
|
|
3036
3024
|
type: "button",
|
|
3037
3025
|
class: "lnb-btn lnb-toggle-popup",
|
|
3038
3026
|
role: "menuitem",
|
|
3039
|
-
"aria-controls": `lnbmenu-${
|
|
3040
|
-
"aria-expanded":
|
|
3027
|
+
"aria-controls": `lnbmenu-${C}-${D}`,
|
|
3028
|
+
"aria-expanded": E.expanded ? "true" : "false",
|
|
3041
3029
|
"aria-haspopup": "true",
|
|
3042
|
-
onClick: () => C
|
|
3043
|
-
},
|
|
3044
|
-
ref: (
|
|
3045
|
-
id: `lnbmenu-${
|
|
3046
|
-
class: ["lnb-submenu-lv2", { active:
|
|
3030
|
+
onClick: () => T(C, D)
|
|
3031
|
+
}, E.text), t("div", {
|
|
3032
|
+
ref: (v) => f(v, C, D),
|
|
3033
|
+
id: `lnbmenu-${C}-${D}`,
|
|
3034
|
+
class: ["lnb-submenu-lv2", { active: E.expanded }],
|
|
3047
3035
|
role: "menu",
|
|
3048
|
-
onFocusout: (
|
|
3036
|
+
onFocusout: (v) => x(v, C, D)
|
|
3049
3037
|
}, [t("button", {
|
|
3050
|
-
ref: (
|
|
3038
|
+
ref: (v) => w(v, C, D),
|
|
3051
3039
|
type: "button",
|
|
3052
3040
|
class: "lnb-btn-tit",
|
|
3053
|
-
onClick: () =>
|
|
3054
|
-
},
|
|
3055
|
-
href:
|
|
3041
|
+
onClick: () => c(C, D)
|
|
3042
|
+
}, E.popupTitle || E.text), t("ul", {}, i(E.subItems || [], C, D))])] : t("a", {
|
|
3043
|
+
href: E.href || "#",
|
|
3056
3044
|
class: ["lnb-btn", "lnb-link"],
|
|
3057
3045
|
role: "menuitem",
|
|
3058
|
-
onClick: (
|
|
3059
|
-
},
|
|
3060
|
-
}),
|
|
3061
|
-
key: `lnb-item-${
|
|
3062
|
-
class: ["lnb-item", { active:
|
|
3046
|
+
onClick: (v) => o(E, v)
|
|
3047
|
+
}, E.text)]);
|
|
3048
|
+
}), y = () => r.value.map(($, C) => t("li", {
|
|
3049
|
+
key: `lnb-item-${C}`,
|
|
3050
|
+
class: ["lnb-item", { active: $.expanded }],
|
|
3063
3051
|
role: "none"
|
|
3064
3052
|
}, [t("button", {
|
|
3065
3053
|
type: "button",
|
|
3066
3054
|
class: [
|
|
3067
3055
|
"lnb-btn",
|
|
3068
3056
|
"lnb-toggle",
|
|
3069
|
-
{ active:
|
|
3057
|
+
{ active: $.expanded }
|
|
3070
3058
|
],
|
|
3071
3059
|
role: "menuitem",
|
|
3072
|
-
"aria-controls": `lnbmenu-${
|
|
3073
|
-
"aria-expanded":
|
|
3074
|
-
onClick: () =>
|
|
3075
|
-
},
|
|
3076
|
-
id: `lnbmenu-${
|
|
3060
|
+
"aria-controls": `lnbmenu-${C}`,
|
|
3061
|
+
"aria-expanded": $.expanded ? "true" : "false",
|
|
3062
|
+
onClick: () => m(C)
|
|
3063
|
+
}, $.text), $.subItems ? t("div", { class: "lnb-submenu" }, [t("ul", {
|
|
3064
|
+
id: `lnbmenu-${C}`,
|
|
3077
3065
|
role: "menu"
|
|
3078
|
-
},
|
|
3066
|
+
}, p($.subItems, C))]) : null]));
|
|
3079
3067
|
return () => t("nav", { class: "krds-side-navigation" }, [t("h2", { class: "lnb-tit" }, e.title), t("ul", {
|
|
3080
3068
|
class: "lnb-list",
|
|
3081
3069
|
role: "menubar"
|
|
3082
|
-
},
|
|
3070
|
+
}, y())]);
|
|
3083
3071
|
}
|
|
3084
|
-
}),
|
|
3072
|
+
}), Aa = Ma, Va = A({
|
|
3085
3073
|
name: "KrdsStructuredList",
|
|
3086
3074
|
props: { full: {
|
|
3087
3075
|
type: Boolean,
|
|
3088
3076
|
default: !0
|
|
3089
3077
|
} },
|
|
3090
3078
|
slots: Object,
|
|
3091
|
-
setup(e, { slots:
|
|
3079
|
+
setup(e, { slots: a }) {
|
|
3092
3080
|
return () => {
|
|
3093
|
-
const r =
|
|
3081
|
+
const r = a.cardTop?.(), l = a.cardBody?.(), n = a.cardBtm?.(), s = a.cardBtn?.(), u = t("li", { class: "structured-item" }, [t("div", { class: "in" }, [
|
|
3094
3082
|
r && t("div", { class: "card-top" }, r),
|
|
3095
|
-
|
|
3083
|
+
l && t("div", { class: "card-body" }, l),
|
|
3096
3084
|
n && t("div", { class: "card-btm" }, n),
|
|
3097
3085
|
s && t("div", { class: "card-btn" }, s)
|
|
3098
3086
|
].filter(Boolean))]);
|
|
3099
|
-
return t("ul", { class: ["krds-structured-list", e.full ? "type-full" : ""] }, [
|
|
3087
|
+
return t("ul", { class: ["krds-structured-list", e.full ? "type-full" : ""] }, [u]);
|
|
3100
3088
|
};
|
|
3101
3089
|
}
|
|
3102
|
-
}),
|
|
3090
|
+
}), Pa = Va, za = A({
|
|
3103
3091
|
name: "KrdsTextList",
|
|
3104
3092
|
props: {
|
|
3105
3093
|
type: {
|
|
@@ -3111,10 +3099,10 @@ var lt = D({
|
|
|
3111
3099
|
default: "dash"
|
|
3112
3100
|
}
|
|
3113
3101
|
},
|
|
3114
|
-
setup(e, { slots:
|
|
3115
|
-
return () => t(e.type, { class: ["krds-info-list", e.variant] },
|
|
3102
|
+
setup(e, { slots: a }) {
|
|
3103
|
+
return () => t(e.type, { class: ["krds-info-list", e.variant] }, a.default?.());
|
|
3116
3104
|
}
|
|
3117
|
-
}),
|
|
3105
|
+
}), Fa = za, Ra = A({
|
|
3118
3106
|
name: "KrdsCriticalAlerts",
|
|
3119
3107
|
props: {
|
|
3120
3108
|
type: {
|
|
@@ -3135,13 +3123,13 @@ var lt = D({
|
|
|
3135
3123
|
}
|
|
3136
3124
|
},
|
|
3137
3125
|
emits: ["link-click"],
|
|
3138
|
-
setup(e, { emit:
|
|
3126
|
+
setup(e, { emit: a }) {
|
|
3139
3127
|
const r = (n) => ({
|
|
3140
3128
|
danger: "긴급",
|
|
3141
3129
|
ok: "안전",
|
|
3142
3130
|
info: "안내"
|
|
3143
|
-
})[n],
|
|
3144
|
-
|
|
3131
|
+
})[n], l = (n) => {
|
|
3132
|
+
a("link-click", n);
|
|
3145
3133
|
};
|
|
3146
3134
|
return () => t("ul", { class: "krds-critical-alerts" }, [t("li", [t("div", { class: "critical-ban" }, [
|
|
3147
3135
|
t("span", { class: ["critical-badge", e.type] }, r(e.type)),
|
|
@@ -3149,117 +3137,810 @@ var lt = D({
|
|
|
3149
3137
|
e.linkHref && t("a", {
|
|
3150
3138
|
href: e.linkHref,
|
|
3151
3139
|
class: "krds-btn medium link basic",
|
|
3152
|
-
onClick:
|
|
3140
|
+
onClick: l
|
|
3153
3141
|
}, [t("span", { class: "m-hide" }, e.linkText), t("i", { class: "svg-icon ico-angle right" })])
|
|
3154
3142
|
])])]);
|
|
3155
3143
|
}
|
|
3156
|
-
}),
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
}
|
|
3144
|
+
}), Ia = Ra, Ha = "새 창 열림", Oa = 100, we = 400, Na = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', qa = A({
|
|
3145
|
+
name: "KrdsMainMenu",
|
|
3146
|
+
props: {
|
|
3147
|
+
items: {
|
|
3148
|
+
type: Array,
|
|
3149
|
+
default: () => []
|
|
3150
|
+
},
|
|
3151
|
+
variant: {
|
|
3152
|
+
type: String,
|
|
3153
|
+
default: "pc"
|
|
3154
|
+
},
|
|
3155
|
+
ariaLabel: {
|
|
3156
|
+
type: String,
|
|
3157
|
+
default: "메인 메뉴"
|
|
3158
|
+
},
|
|
3159
|
+
open: {
|
|
3160
|
+
type: Boolean,
|
|
3161
|
+
default: !1
|
|
3162
|
+
},
|
|
3163
|
+
mobileId: {
|
|
3164
|
+
type: String,
|
|
3165
|
+
default: "mobile-nav"
|
|
3166
|
+
},
|
|
3167
|
+
backdrop: {
|
|
3168
|
+
type: Boolean,
|
|
3169
|
+
default: !0
|
|
3170
|
+
},
|
|
3171
|
+
closeLabel: {
|
|
3172
|
+
type: String,
|
|
3173
|
+
default: "전체메뉴 닫기"
|
|
3174
|
+
}
|
|
3175
|
+
},
|
|
3176
|
+
emits: [
|
|
3177
|
+
"update:open",
|
|
3178
|
+
"menu-toggle",
|
|
3179
|
+
"item-click"
|
|
3180
|
+
],
|
|
3181
|
+
slots: Object,
|
|
3182
|
+
setup(e, { emit: a, slots: r }) {
|
|
3183
|
+
const l = de(), n = B(null), s = B(null), u = B(null), h = b(() => e.variant === "pc"), f = (d) => `${l}-gnb-panel-${d}`, w = (d, g) => `${l}-gnb-sub-${d}-${g}`, m = (d) => `${l}-gnb-tab-${d}`, T = (d, g) => `${l}-gnb-depth3-${d}-${g}`, S = (d) => !!d?.subItems?.length, x = (d) => !S(d) && !!d?.items?.length, c = (d) => S(d) || x(d), o = (d) => !d.items?.length, i = (d) => d ? {
|
|
3184
|
+
target: "_blank",
|
|
3185
|
+
rel: "noopener noreferrer",
|
|
3186
|
+
title: Ha
|
|
3187
|
+
} : {}, p = (d, g) => {
|
|
3188
|
+
d.onClick?.(g), a("item-click", d, g);
|
|
3189
|
+
}, y = B(-1), $ = B({}), C = B(0), E = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), _ = (d, g, K) => {
|
|
3190
|
+
g ? d.set(K, g) : d.delete(K);
|
|
3191
|
+
}, v = (d) => {
|
|
3192
|
+
const g = d?.subItems?.findIndex((K) => !o(K));
|
|
3193
|
+
return g === void 0 ? -1 : g;
|
|
3194
|
+
}, M = (d) => {
|
|
3195
|
+
const g = $.value[d];
|
|
3196
|
+
return g === void 0 ? v(e.items[d]) : g;
|
|
3197
|
+
}, I = (d) => {
|
|
3198
|
+
if (typeof document > "u") return;
|
|
3199
|
+
document.body.classList.toggle("is-gnb-web", d);
|
|
3200
|
+
const g = document.body.scrollHeight > window.innerHeight;
|
|
3201
|
+
document.body.classList.toggle("hasScrollY", d && g);
|
|
3202
|
+
}, N = async () => {
|
|
3203
|
+
await ce();
|
|
3204
|
+
const d = E.get(y.value)?.querySelector(".gnb-sub-list.active");
|
|
3205
|
+
C.value = d?.scrollHeight ?? 0;
|
|
3206
|
+
}, H = (d = !1) => {
|
|
3207
|
+
if (y.value === -1) return;
|
|
3208
|
+
const g = y.value;
|
|
3209
|
+
y.value = -1, C.value = 0, I(!1), a("menu-toggle", g, !1), d && D.get(g)?.focus();
|
|
3210
|
+
}, G = (d) => {
|
|
3211
|
+
if (c(e.items[d])) {
|
|
3212
|
+
if (y.value === d) {
|
|
3213
|
+
H();
|
|
3214
|
+
return;
|
|
3215
|
+
}
|
|
3216
|
+
y.value = d, I(!0), a("menu-toggle", d, !0), N();
|
|
3217
|
+
}
|
|
3218
|
+
}, j = (d, g) => {
|
|
3219
|
+
$.value = {
|
|
3220
|
+
...$.value,
|
|
3221
|
+
[d]: g
|
|
3222
|
+
}, N();
|
|
3223
|
+
}, X = (d) => {
|
|
3224
|
+
const g = n.value;
|
|
3225
|
+
!g || g.contains(d.target) || H();
|
|
3226
|
+
}, le = (d) => {
|
|
3227
|
+
const g = n.value, K = d.relatedTarget;
|
|
3228
|
+
!g || !K || g.contains(K) || H();
|
|
3229
|
+
}, ue = (d) => {
|
|
3230
|
+
if (d.key === "Escape") {
|
|
3231
|
+
H(!0);
|
|
3232
|
+
return;
|
|
3233
|
+
}
|
|
3234
|
+
const g = d.target;
|
|
3235
|
+
if (!g?.dataset.trigger) return;
|
|
3236
|
+
const K = (k) => {
|
|
3237
|
+
const P = g.closest("li");
|
|
3238
|
+
(k === "next" ? P?.nextElementSibling : P?.previousElementSibling)?.querySelector("[data-trigger]")?.focus();
|
|
3239
|
+
};
|
|
3240
|
+
switch (d.key) {
|
|
3241
|
+
case "Home":
|
|
3242
|
+
d.preventDefault(), D.get(0)?.focus();
|
|
3243
|
+
break;
|
|
3244
|
+
case "End":
|
|
3245
|
+
d.preventDefault(), D.get(e.items.length - 1)?.focus();
|
|
3246
|
+
break;
|
|
3247
|
+
case "ArrowRight":
|
|
3248
|
+
case "ArrowDown":
|
|
3249
|
+
d.preventDefault(), K("next");
|
|
3250
|
+
break;
|
|
3251
|
+
case "ArrowLeft":
|
|
3252
|
+
case "ArrowUp":
|
|
3253
|
+
d.preventDefault(), K("prev");
|
|
3254
|
+
}
|
|
3255
|
+
}, ae = B(0), Q = B({}), ne = B(null), L = B(null), R = B(e.open), Y = B(e.open), V = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), U = (d, g, K) => {
|
|
3256
|
+
g ? d.set(K, g) : d.delete(K);
|
|
3257
|
+
};
|
|
3258
|
+
let J, ee;
|
|
3259
|
+
const oe = (d) => {
|
|
3260
|
+
typeof document > "u" || document.body.classList.toggle("is-gnb-mobile", d);
|
|
3261
|
+
}, Te = () => {
|
|
3262
|
+
ee && clearTimeout(ee), R.value = !0, J = setTimeout(() => {
|
|
3263
|
+
Y.value = !0, oe(!0), s.value?.focus();
|
|
3264
|
+
}, Oa);
|
|
3265
|
+
}, _e = () => {
|
|
3266
|
+
J && clearTimeout(J), Y.value = !1, ee = setTimeout(() => {
|
|
3267
|
+
R.value = !1, oe(!1);
|
|
3268
|
+
}, we);
|
|
3269
|
+
};
|
|
3270
|
+
se(() => e.open, (d) => {
|
|
3271
|
+
d ? Te() : _e();
|
|
3272
|
+
});
|
|
3273
|
+
const Me = (d, g) => {
|
|
3274
|
+
d.preventDefault(), ae.value = g;
|
|
3275
|
+
const K = u.value, k = V.get(g);
|
|
3276
|
+
K && k && K.scrollTo({
|
|
3277
|
+
left: 0,
|
|
3278
|
+
top: k.offsetTop,
|
|
3279
|
+
behavior: "smooth"
|
|
3280
|
+
});
|
|
3281
|
+
}, Ae = () => {
|
|
3282
|
+
const d = u.value;
|
|
3283
|
+
if (!d) return;
|
|
3284
|
+
const { scrollTop: g, scrollHeight: K, clientHeight: k } = d;
|
|
3285
|
+
let P = ae.value;
|
|
3286
|
+
V.forEach((q, W) => {
|
|
3287
|
+
(g >= q.offsetTop || g + k >= K) && (P = W);
|
|
3288
|
+
}), ae.value = P;
|
|
3289
|
+
}, Ve = (d, g) => {
|
|
3290
|
+
d.preventDefault(), Q.value = {
|
|
3291
|
+
...Q.value,
|
|
3292
|
+
[g]: !Q.value[g]
|
|
3293
|
+
};
|
|
3294
|
+
}, Pe = async (d, g) => {
|
|
3295
|
+
d.preventDefault(), ne.value = g, await ce(), L.value = g, await ce(), O.get(g)?.focus();
|
|
3296
|
+
}, ye = (d) => {
|
|
3297
|
+
L.value = null, F.get(d)?.focus(), setTimeout(() => {
|
|
3298
|
+
L.value || (ne.value = null);
|
|
3299
|
+
}, we);
|
|
3300
|
+
}, ze = (d, g) => {
|
|
3301
|
+
const K = Array.from(d.querySelectorAll(Na));
|
|
3302
|
+
if (!K.length) return;
|
|
3303
|
+
const k = K[0], P = K[K.length - 1], q = document.activeElement;
|
|
3304
|
+
g.shiftKey && (q === k || q === d) ? (g.preventDefault(), P.focus()) : !g.shiftKey && q === P && (g.preventDefault(), k.focus());
|
|
3305
|
+
}, Fe = (d) => {
|
|
3306
|
+
if (d.key === "Escape") {
|
|
3307
|
+
L.value ? ye(L.value) : a("update:open", !1);
|
|
3308
|
+
return;
|
|
3309
|
+
}
|
|
3310
|
+
if (d.key !== "Tab") return;
|
|
3311
|
+
const g = L.value ? z.get(L.value) : s.value;
|
|
3312
|
+
g && ze(g, d);
|
|
3313
|
+
};
|
|
3314
|
+
ie(() => {
|
|
3315
|
+
if (h.value) {
|
|
3316
|
+
document.addEventListener("click", X);
|
|
3317
|
+
return;
|
|
3318
|
+
}
|
|
3319
|
+
e.open && (R.value = !0, Y.value = !0, oe(!0));
|
|
3320
|
+
const d = {};
|
|
3321
|
+
e.items.forEach((g, K) => {
|
|
3322
|
+
g.subItems?.forEach((k, P) => {
|
|
3323
|
+
k.expanded && (d[`${K}-${P}`] = !0);
|
|
3324
|
+
});
|
|
3325
|
+
}), Q.value = d;
|
|
3326
|
+
}), fe(() => {
|
|
3327
|
+
typeof document < "u" && (document.removeEventListener("click", X), document.body.classList.remove("is-gnb-web", "hasScrollY", "is-gnb-mobile")), J && clearTimeout(J), ee && clearTimeout(ee);
|
|
3328
|
+
});
|
|
3329
|
+
const Re = (d) => {
|
|
3330
|
+
const g = d.some((k) => !!k.description), K = d.map((k, P) => {
|
|
3331
|
+
const q = i(k.external), W = k.external ? t("i", { class: "svg-icon ico-go" }) : null;
|
|
3332
|
+
if (g) return t("li", { key: `link-${P}` }, [t("h3", { class: "tit" }, [t("a", {
|
|
3333
|
+
href: k.href || "#",
|
|
3334
|
+
...q,
|
|
3335
|
+
onClick: (te) => p(k, te)
|
|
3336
|
+
}, [k.text, W])]), k.description ? t("p", { class: "txt" }, k.description) : null]);
|
|
3337
|
+
const Z = k.href ? "a" : "button";
|
|
3338
|
+
return t("li", { key: `link-${P}` }, [t(Z, {
|
|
3339
|
+
...k.href ? {
|
|
3340
|
+
href: k.href,
|
|
3341
|
+
...q
|
|
3342
|
+
} : { type: "button" },
|
|
3343
|
+
class: { active: k.selected },
|
|
3344
|
+
onClick: (te) => p(k, te)
|
|
3345
|
+
}, [k.text, W])]);
|
|
3346
|
+
});
|
|
3347
|
+
return t("ul", { class: g ? "type-description" : void 0 }, K);
|
|
3348
|
+
}, me = (d) => {
|
|
3349
|
+
const g = d.titleLink ? [d.title, t("a", {
|
|
3350
|
+
href: d.titleLink.href,
|
|
3351
|
+
class: "krds-btn link basic small"
|
|
3352
|
+
}, [t("span", { class: "underline" }, d.titleLink.text || "바로가기"), t("i", { class: "svg-icon ico-angle right" })])] : [t("span", d.title)];
|
|
3353
|
+
return t("div", {
|
|
3354
|
+
id: d.id,
|
|
3355
|
+
class: ["gnb-sub-list", {
|
|
3356
|
+
active: d.active,
|
|
3357
|
+
between: d.layout === "between",
|
|
3358
|
+
"single-list": d.single
|
|
3359
|
+
}]
|
|
3360
|
+
}, [t("div", { class: "gnb-sub-content" }, [t("h2", { class: "sub-title" }, g), Re(d.linkItems)]), d.banner]);
|
|
3361
|
+
}, Ie = (d, g) => (d.subItems ?? []).map((K, k) => {
|
|
3362
|
+
if (o(K)) {
|
|
3363
|
+
const W = K.href ? "a" : "button";
|
|
3364
|
+
return t("li", { key: `sub-${k}` }, [t(W, {
|
|
3365
|
+
...K.href ? {
|
|
3366
|
+
href: K.href,
|
|
3367
|
+
...i(K.external)
|
|
3368
|
+
} : { type: "button" },
|
|
3369
|
+
class: [
|
|
3370
|
+
"gnb-sub-trigger",
|
|
3371
|
+
"is-link",
|
|
3372
|
+
{
|
|
3373
|
+
"external-link": K.external,
|
|
3374
|
+
selected: K.selected
|
|
3375
|
+
}
|
|
3376
|
+
],
|
|
3377
|
+
"data-trigger": "gnb",
|
|
3378
|
+
onClick: (Z) => p(K, Z)
|
|
3379
|
+
}, K.text)]);
|
|
3380
|
+
}
|
|
3381
|
+
const P = M(g) === k, q = K.banner && r.banner ? t("div", { class: "gnb-sub-banner" }, r.banner({
|
|
3382
|
+
item: d,
|
|
3383
|
+
subItem: K,
|
|
3384
|
+
index: g,
|
|
3385
|
+
subIndex: k
|
|
3386
|
+
})) : null;
|
|
3387
|
+
return t("li", { key: `sub-${k}` }, [t("button", {
|
|
3388
|
+
type: "button",
|
|
3389
|
+
class: ["gnb-sub-trigger", {
|
|
3390
|
+
active: P,
|
|
3391
|
+
selected: K.selected
|
|
3392
|
+
}],
|
|
3393
|
+
"data-trigger": "gnb",
|
|
3394
|
+
"aria-controls": w(g, k),
|
|
3395
|
+
"aria-expanded": P ? "true" : "false",
|
|
3396
|
+
"aria-haspopup": "true",
|
|
3397
|
+
onClick: (W) => {
|
|
3398
|
+
j(g, k), p(K, W);
|
|
3399
|
+
}
|
|
3400
|
+
}, K.text), me({
|
|
3401
|
+
id: w(g, k),
|
|
3402
|
+
title: K.title || K.text,
|
|
3403
|
+
titleLink: K.titleLink,
|
|
3404
|
+
linkItems: K.items ?? [],
|
|
3405
|
+
layout: K.layout,
|
|
3406
|
+
active: P,
|
|
3407
|
+
banner: q
|
|
3408
|
+
})]);
|
|
3409
|
+
}), He = (d, g) => {
|
|
3410
|
+
const K = y.value === g, k = S(d), P = k ? [t("ul", {}, Ie(d, g))] : [me({
|
|
3411
|
+
title: d.title || d.text,
|
|
3412
|
+
linkItems: d.items ?? [],
|
|
3413
|
+
layout: d.layout,
|
|
3414
|
+
single: !0,
|
|
3415
|
+
banner: d.banner && r.banner ? t("div", { class: "gnb-sub-banner" }, r.banner({
|
|
3416
|
+
item: d,
|
|
3417
|
+
index: g,
|
|
3418
|
+
subIndex: -1
|
|
3419
|
+
})) : null
|
|
3420
|
+
})];
|
|
3421
|
+
return t("div", {
|
|
3422
|
+
id: f(g),
|
|
3423
|
+
class: ["gnb-toggle-wrap", { "is-open": K }]
|
|
3424
|
+
}, [t("div", {
|
|
3425
|
+
ref: (q) => _(E, q, g),
|
|
3426
|
+
class: "gnb-main-list",
|
|
3427
|
+
...k ? { "data-has-submenu": "true" } : {},
|
|
3428
|
+
style: K && C.value ? { minHeight: `${C.value}px` } : void 0
|
|
3429
|
+
}, P)]);
|
|
3430
|
+
}, Oe = () => {
|
|
3431
|
+
const d = e.items.map((K, k) => {
|
|
3432
|
+
const P = c(K), q = y.value === k, W = !P && K.href ? "a" : "button", Z = t(W, {
|
|
3433
|
+
ref: (te) => _(D, te, k),
|
|
3434
|
+
...W === "a" ? {
|
|
3435
|
+
href: K.href,
|
|
3436
|
+
...i(K.external)
|
|
3437
|
+
} : { type: "button" },
|
|
3438
|
+
class: ["gnb-main-trigger", {
|
|
3439
|
+
active: q,
|
|
3440
|
+
"is-link": !P,
|
|
3441
|
+
selected: K.selected
|
|
3442
|
+
}],
|
|
3443
|
+
"data-trigger": "gnb",
|
|
3444
|
+
...P ? {
|
|
3445
|
+
"aria-controls": f(k),
|
|
3446
|
+
"aria-expanded": q ? "true" : "false",
|
|
3447
|
+
"aria-haspopup": "true"
|
|
3448
|
+
} : {},
|
|
3449
|
+
onClick: (te) => {
|
|
3450
|
+
P && G(k), p(K, te);
|
|
3451
|
+
}
|
|
3452
|
+
}, K.text);
|
|
3453
|
+
return t("li", { key: `main-${k}` }, [Z, P ? He(K, k) : null]);
|
|
3454
|
+
}), g = e.backdrop && y.value !== -1 ? t(Ce, { to: "body" }, [t("div", {
|
|
3455
|
+
class: "gnb-backdrop active",
|
|
3456
|
+
"aria-hidden": "true"
|
|
3457
|
+
})]) : null;
|
|
3458
|
+
return t("nav", {
|
|
3459
|
+
ref: n,
|
|
3460
|
+
class: "krds-main-menu",
|
|
3461
|
+
"aria-label": e.ariaLabel,
|
|
3462
|
+
onKeydown: ue,
|
|
3463
|
+
onFocusout: le
|
|
3464
|
+
}, [t("div", { class: "inner" }, [t("ul", {
|
|
3465
|
+
class: "gnb-menu",
|
|
3466
|
+
"aria-label": e.ariaLabel
|
|
3467
|
+
}, d)]), g]);
|
|
3468
|
+
}, Ne = (d, g) => {
|
|
3469
|
+
const K = () => ye(g);
|
|
3470
|
+
return t("div", {
|
|
3471
|
+
ref: (k) => U(z, k, g),
|
|
3472
|
+
class: ["depth4-wrap", { "is-open": L.value === g }],
|
|
3473
|
+
style: ne.value === g ? { display: "block" } : void 0
|
|
3474
|
+
}, [t("div", { class: "depth4-head" }, [t("button", {
|
|
3475
|
+
ref: (k) => U(O, k, g),
|
|
3476
|
+
type: "button",
|
|
3477
|
+
class: "krds-btn icon trigger-prev",
|
|
3478
|
+
onClick: K
|
|
3479
|
+
}, [t("span", { class: "sr-only" }, "이전화면"), t("i", { class: "svg-icon ico-angle left" })]), t("button", {
|
|
3480
|
+
type: "button",
|
|
3481
|
+
class: "krds-btn icon trigger-close",
|
|
3482
|
+
onClick: K
|
|
3483
|
+
}, [t("span", { class: "sr-only" }, e.closeLabel), t("i", { class: "svg-icon ico-popup-close" })])]), t("div", { class: "depth4-body" }, [t("h4", { class: "sub-title" }, d.panelTitle || d.text), t("ul", { class: "depth4-ul" }, (d.items ?? []).map((k, P) => t("li", { key: `depth4-${P}` }, [t("a", {
|
|
3484
|
+
href: k.href || "#",
|
|
3485
|
+
...i(k.external),
|
|
3486
|
+
class: { selected: k.selected },
|
|
3487
|
+
onClick: (q) => p(k, q)
|
|
3488
|
+
}, k.text)])))])]);
|
|
3489
|
+
}, qe = (d, g, K) => {
|
|
3490
|
+
const k = (d.items ?? []).map((P, q) => {
|
|
3491
|
+
const W = `${g}-${K}-${q}`, Z = !!P.items?.length;
|
|
3492
|
+
return t("li", { key: `depth3-${q}` }, [t("a", {
|
|
3493
|
+
ref: (te) => U(F, te, W),
|
|
3494
|
+
href: P.href || "#",
|
|
3495
|
+
...Z ? {} : i(P.external),
|
|
3496
|
+
class: ["depth3-trigger", {
|
|
3497
|
+
"has-depth4": Z,
|
|
3498
|
+
selected: P.selected
|
|
3499
|
+
}],
|
|
3500
|
+
...Z ? {
|
|
3501
|
+
"aria-haspopup": "true",
|
|
3502
|
+
"aria-expanded": L.value === W ? "true" : "false"
|
|
3503
|
+
} : {},
|
|
3504
|
+
onClick: (te) => {
|
|
3505
|
+
Z && Pe(te, W), p(P, te);
|
|
3506
|
+
}
|
|
3507
|
+
}, P.text), Z ? Ne(P, W) : null]);
|
|
3508
|
+
});
|
|
3509
|
+
return t("div", { class: ["depth3-wrap", { "is-open": Q.value[`${g}-${K}`] }] }, [t("ul", {}, k)]);
|
|
3510
|
+
}, We = (d, g) => {
|
|
3511
|
+
const K = (d.subItems ?? []).map((k, P) => {
|
|
3512
|
+
const q = `${g}-${P}`, W = !!k.items?.length;
|
|
3513
|
+
return t("li", { key: `sub-${P}` }, [t("a", {
|
|
3514
|
+
href: k.href || "#",
|
|
3515
|
+
...W ? {} : i(k.external),
|
|
3516
|
+
class: ["gnb-sub-trigger", {
|
|
3517
|
+
"has-depth3": W,
|
|
3518
|
+
active: W && Q.value[q],
|
|
3519
|
+
selected: k.selected
|
|
3520
|
+
}],
|
|
3521
|
+
...W ? {
|
|
3522
|
+
"aria-controls": T(g, P),
|
|
3523
|
+
"aria-expanded": Q.value[q] ? "true" : "false"
|
|
3524
|
+
} : {},
|
|
3525
|
+
onClick: (Z) => {
|
|
3526
|
+
W && Ve(Z, q), p(k, Z);
|
|
3527
|
+
}
|
|
3528
|
+
}, k.text), W ? qe(k, g, P) : null]);
|
|
3529
|
+
});
|
|
3530
|
+
return t("div", {
|
|
3531
|
+
ref: (k) => _(V, k, g),
|
|
3532
|
+
id: f(g),
|
|
3533
|
+
class: "gnb-sub-list",
|
|
3534
|
+
role: "tabpanel",
|
|
3535
|
+
"aria-labelledby": m(g)
|
|
3536
|
+
}, [t("h2", { class: "sub-title" }, d.title || d.text), t("ul", {}, K)]);
|
|
3537
|
+
}, Ye = () => {
|
|
3538
|
+
const d = e.items.map((K, k) => t("li", {
|
|
3539
|
+
key: `tab-${k}`,
|
|
3540
|
+
role: "none"
|
|
3541
|
+
}, [t("a", {
|
|
3542
|
+
id: m(k),
|
|
3543
|
+
href: `#${f(k)}`,
|
|
3544
|
+
class: ["gnb-main-trigger", { active: ae.value === k }],
|
|
3545
|
+
role: "tab",
|
|
3546
|
+
"aria-controls": f(k),
|
|
3547
|
+
"aria-selected": ae.value === k ? "true" : "false",
|
|
3548
|
+
onClick: (P) => {
|
|
3549
|
+
Me(P, k), p(K, P);
|
|
3550
|
+
}
|
|
3551
|
+
}, K.text)])), g = [t("div", { class: "gnb-menu" }, [t("div", { class: "menu-wrap" }, [t("ul", {
|
|
3552
|
+
role: "tablist",
|
|
3553
|
+
"aria-label": e.ariaLabel
|
|
3554
|
+
}, d)]), t("div", { class: "submenu-wrap" }, e.items.map(We))]), r.bottom ? t("div", { class: "gnb-bottom" }, r.bottom()) : null];
|
|
3555
|
+
return t("div", {
|
|
3556
|
+
ref: n,
|
|
3557
|
+
id: e.mobileId,
|
|
3558
|
+
class: ["krds-main-menu-mobile", {
|
|
3559
|
+
"is-open": Y.value,
|
|
3560
|
+
"is-backdrop": Y.value
|
|
3561
|
+
}],
|
|
3562
|
+
style: R.value ? void 0 : { display: "none" },
|
|
3563
|
+
onKeydown: Fe
|
|
3564
|
+
}, [t("div", {
|
|
3565
|
+
ref: s,
|
|
3566
|
+
class: "gnb-wrap",
|
|
3567
|
+
tabindex: -1
|
|
3568
|
+
}, [
|
|
3569
|
+
t("div", { class: "gnb-header" }, r.header ? r.header() : []),
|
|
3570
|
+
t("div", {
|
|
3571
|
+
ref: u,
|
|
3572
|
+
class: "gnb-body",
|
|
3573
|
+
onScroll: Ae
|
|
3574
|
+
}, g),
|
|
3575
|
+
t("button", {
|
|
3576
|
+
type: "button",
|
|
3577
|
+
id: "close-nav",
|
|
3578
|
+
class: "krds-btn medium icon",
|
|
3579
|
+
onClick: () => a("update:open", !1)
|
|
3580
|
+
}, [t("span", { class: "sr-only" }, e.closeLabel), t("i", { class: "svg-icon ico-popup-close" })])
|
|
3581
|
+
])]);
|
|
3582
|
+
};
|
|
3583
|
+
return () => h.value ? Oe() : Ye();
|
|
3584
|
+
}
|
|
3585
|
+
}), Wa = qa, Ya = 400, ja = 2500, Ga = 0, Ua = 16, Be = (e) => e ? e.flatMap((a) => a.type === Ge ? Array.isArray(a.children) ? Be(a.children) : [] : a.type === je ? [] : a.type === Ue && typeof a.children == "string" && a.children.trim() === "" ? [] : [a]) : [], Xa = A({
|
|
3586
|
+
name: "KrdsCarousel",
|
|
3587
|
+
props: {
|
|
3588
|
+
variant: {
|
|
3589
|
+
type: String,
|
|
3590
|
+
default: "visual"
|
|
3591
|
+
},
|
|
3592
|
+
activeIndex: {
|
|
3593
|
+
type: Number,
|
|
3594
|
+
default: void 0
|
|
3595
|
+
},
|
|
3596
|
+
loop: {
|
|
3597
|
+
type: Boolean,
|
|
3598
|
+
default: !0
|
|
3599
|
+
},
|
|
3600
|
+
autoplay: {
|
|
3601
|
+
type: Boolean,
|
|
3602
|
+
default: !1
|
|
3603
|
+
},
|
|
3604
|
+
autoplayDelay: {
|
|
3605
|
+
type: Number,
|
|
3606
|
+
default: ja
|
|
3607
|
+
},
|
|
3608
|
+
pauseOnHover: {
|
|
3609
|
+
type: Boolean,
|
|
3610
|
+
default: !0
|
|
3611
|
+
},
|
|
3612
|
+
speed: {
|
|
3613
|
+
type: Number,
|
|
3614
|
+
default: Ya
|
|
3615
|
+
},
|
|
3616
|
+
spaceBetween: {
|
|
3617
|
+
type: Number,
|
|
3618
|
+
default: void 0
|
|
3619
|
+
},
|
|
3620
|
+
pagination: {
|
|
3621
|
+
type: String,
|
|
3622
|
+
default: void 0
|
|
3623
|
+
},
|
|
3624
|
+
navigation: {
|
|
3625
|
+
type: Boolean,
|
|
3626
|
+
default: !0
|
|
3627
|
+
},
|
|
3628
|
+
moreHref: {
|
|
3629
|
+
type: String,
|
|
3630
|
+
default: void 0
|
|
3631
|
+
},
|
|
3632
|
+
ariaLabel: {
|
|
3633
|
+
type: String,
|
|
3634
|
+
default: "캐러셀"
|
|
3635
|
+
},
|
|
3636
|
+
prevLabel: {
|
|
3637
|
+
type: String,
|
|
3638
|
+
default: "이전"
|
|
3639
|
+
},
|
|
3640
|
+
nextLabel: {
|
|
3641
|
+
type: String,
|
|
3642
|
+
default: "다음"
|
|
3643
|
+
},
|
|
3644
|
+
playLabel: {
|
|
3645
|
+
type: String,
|
|
3646
|
+
default: "슬라이드 재생"
|
|
3647
|
+
},
|
|
3648
|
+
stopLabel: {
|
|
3649
|
+
type: String,
|
|
3650
|
+
default: "슬라이드 멈춤"
|
|
3651
|
+
},
|
|
3652
|
+
moreLabel: {
|
|
3653
|
+
type: String,
|
|
3654
|
+
default: "더 보기"
|
|
3655
|
+
},
|
|
3656
|
+
id: {
|
|
3657
|
+
type: String,
|
|
3658
|
+
default: void 0
|
|
3659
|
+
}
|
|
3660
|
+
},
|
|
3661
|
+
emits: [
|
|
3662
|
+
"update:activeIndex",
|
|
3663
|
+
"change",
|
|
3664
|
+
"play",
|
|
3665
|
+
"stop",
|
|
3666
|
+
"more-click"
|
|
3667
|
+
],
|
|
3668
|
+
setup(e, { emit: a, slots: r }) {
|
|
3669
|
+
const l = xe()?.uid, n = b(() => `${e.id ?? `krds-carousel-${l}`}-wrapper`);
|
|
3670
|
+
let s = 0;
|
|
3671
|
+
const u = B(e.activeIndex ?? 0), h = b(() => e.spaceBetween ?? (e.variant === "banner" ? Ua : Ga)), f = b(() => e.pagination ?? (e.variant === "banner" ? "fraction" : "bullets")), w = B(!1), m = B(!1), T = B(!1), S = b(() => m.value || T.value);
|
|
3672
|
+
let x;
|
|
3673
|
+
const c = () => {
|
|
3674
|
+
x !== void 0 && (clearInterval(x), x = void 0);
|
|
3675
|
+
}, o = (V) => {
|
|
3676
|
+
if (s <= 0) return;
|
|
3677
|
+
const F = e.loop ? (V % s + s) % s : Math.min(Math.max(V, 0), s - 1);
|
|
3678
|
+
F !== u.value && (u.value = F, a("update:activeIndex", F), a("change", F));
|
|
3679
|
+
}, i = () => o(u.value - 1), p = () => o(u.value + 1), y = () => {
|
|
3680
|
+
w.value || (w.value = !0, a("play"));
|
|
3681
|
+
}, $ = () => {
|
|
3682
|
+
w.value && (w.value = !1, a("stop"));
|
|
3683
|
+
};
|
|
3684
|
+
se([
|
|
3685
|
+
w,
|
|
3686
|
+
S,
|
|
3687
|
+
() => e.autoplayDelay
|
|
3688
|
+
], () => {
|
|
3689
|
+
c(), !(!w.value || S.value) && (x = setInterval(() => {
|
|
3690
|
+
if (!e.loop && s > 0 && u.value >= s - 1) {
|
|
3691
|
+
$();
|
|
3692
|
+
return;
|
|
3693
|
+
}
|
|
3694
|
+
p();
|
|
3695
|
+
}, e.autoplayDelay));
|
|
3696
|
+
}), se(() => e.autoplay, (V) => {
|
|
3697
|
+
V ? y() : $();
|
|
3698
|
+
}), se(() => e.activeIndex, (V) => {
|
|
3699
|
+
typeof V != "number" || V === u.value || (u.value = s > 0 ? Math.min(Math.max(V, 0), s - 1) : V);
|
|
3700
|
+
});
|
|
3701
|
+
const E = B(!1);
|
|
3702
|
+
let D;
|
|
3703
|
+
const _ = (V) => {
|
|
3704
|
+
E.value = V.matches;
|
|
3705
|
+
}, v = b(() => E.value ? 0 : e.speed);
|
|
3706
|
+
ie(() => {
|
|
3707
|
+
typeof window < "u" && window.matchMedia && (D = window.matchMedia("(prefers-reduced-motion: reduce)"), E.value = D.matches, D.addEventListener("change", _)), e.autoplay && y();
|
|
3708
|
+
}), fe(() => {
|
|
3709
|
+
c(), D?.removeEventListener("change", _);
|
|
3710
|
+
});
|
|
3711
|
+
const M = () => {
|
|
3712
|
+
e.pauseOnHover && (m.value = !0);
|
|
3713
|
+
}, I = () => {
|
|
3714
|
+
m.value = !1;
|
|
3715
|
+
}, N = () => {
|
|
3716
|
+
T.value = !0;
|
|
3717
|
+
}, H = (V) => {
|
|
3718
|
+
const F = V.currentTarget;
|
|
3719
|
+
F && F.contains(V.relatedTarget) || (T.value = !1);
|
|
3720
|
+
}, G = (V) => {
|
|
3721
|
+
a("more-click", V);
|
|
3722
|
+
}, j = {
|
|
3723
|
+
position: "relative",
|
|
3724
|
+
overflow: "hidden",
|
|
3725
|
+
width: "100%"
|
|
3726
|
+
}, X = {
|
|
3727
|
+
flex: "0 0 100%",
|
|
3728
|
+
width: "100%"
|
|
3729
|
+
}, le = (V) => ({
|
|
3730
|
+
display: "flex",
|
|
3731
|
+
width: "100%",
|
|
3732
|
+
gap: h.value > 0 ? `${h.value}px` : void 0,
|
|
3733
|
+
transform: `translate3d(calc(${-V} * (100% + ${h.value}px)), 0, 0)`,
|
|
3734
|
+
transitionProperty: "transform",
|
|
3735
|
+
transitionDuration: `${v.value}ms`,
|
|
3736
|
+
transitionTimingFunction: "ease-out",
|
|
3737
|
+
willChange: "transform"
|
|
3738
|
+
}), ue = (V) => ({
|
|
3739
|
+
position: "absolute",
|
|
3740
|
+
top: "50%",
|
|
3741
|
+
left: V ? "0" : void 0,
|
|
3742
|
+
right: V ? void 0 : "0",
|
|
3743
|
+
transform: "translateY(-50%)",
|
|
3744
|
+
zIndex: 10
|
|
3745
|
+
}), ae = (V, F) => V.map((z, O) => {
|
|
3746
|
+
const U = O === F;
|
|
3747
|
+
return t("li", {
|
|
3748
|
+
key: z.key ?? `krds-carousel-slide-${O}`,
|
|
3749
|
+
class: ["swiper-slide", { "swiper-slide-active": U }],
|
|
3750
|
+
style: X,
|
|
3751
|
+
"aria-roledescription": "slide",
|
|
3752
|
+
"aria-label": `${O + 1} / ${V.length}`,
|
|
3753
|
+
"aria-hidden": U ? void 0 : "true",
|
|
3754
|
+
inert: U ? void 0 : !0
|
|
3755
|
+
}, [z]);
|
|
3756
|
+
}), Q = (V, F, z) => {
|
|
3757
|
+
const O = V === "prev", U = !e.loop && (O ? F <= 0 : F >= s - 1);
|
|
3758
|
+
return t("button", {
|
|
3759
|
+
type: "button",
|
|
3760
|
+
class: [`swiper-button-${V}`, { "swiper-button-disabled": U }],
|
|
3761
|
+
style: z ? ue(O) : void 0,
|
|
3762
|
+
disabled: U,
|
|
3763
|
+
"aria-controls": n.value,
|
|
3764
|
+
onClick: O ? i : p
|
|
3765
|
+
}, [t("span", { class: "sr-only" }, O ? e.prevLabel : e.nextLabel)]);
|
|
3766
|
+
}, ne = () => t("a", {
|
|
3767
|
+
href: e.moreHref,
|
|
3768
|
+
class: "swiper-button-more",
|
|
3769
|
+
onClick: G
|
|
3770
|
+
}, [t("span", { class: "sr-only" }, e.moreLabel)]), L = (V, F) => f.value === "fraction" ? t("div", { class: "swiper-pagination swiper-pagination-fraction" }, [
|
|
3771
|
+
t("span", { class: "swiper-pagination-current" }, String(F + 1)),
|
|
3772
|
+
t("span", { "aria-hidden": "true" }, "/"),
|
|
3773
|
+
t("span", { class: "swiper-pagination-total" }, String(V))
|
|
3774
|
+
]) : t("div", { class: "swiper-pagination" }, Array.from({ length: V }, (z, O) => t("button", {
|
|
3775
|
+
key: `krds-carousel-bullet-${O}`,
|
|
3776
|
+
type: "button",
|
|
3777
|
+
class: ["swiper-pagination-bullet", { "swiper-pagination-bullet-active": O === F }],
|
|
3778
|
+
"aria-label": `${O + 1}번째 슬라이드로 이동`,
|
|
3779
|
+
"aria-current": O === F ? "true" : void 0,
|
|
3780
|
+
"aria-controls": n.value,
|
|
3781
|
+
onClick: () => o(O)
|
|
3782
|
+
}))), R = () => t("div", { class: "swiper-controller" }, [t("button", {
|
|
3783
|
+
type: "button",
|
|
3784
|
+
class: "swiper-button-play",
|
|
3785
|
+
style: w.value ? { display: "none" } : void 0,
|
|
3786
|
+
"aria-controls": n.value,
|
|
3787
|
+
onClick: y
|
|
3788
|
+
}, [t("span", { class: "sr-only" }, e.playLabel)]), t("button", {
|
|
3789
|
+
type: "button",
|
|
3790
|
+
class: "swiper-button-stop",
|
|
3791
|
+
style: w.value ? void 0 : { display: "none" },
|
|
3792
|
+
"aria-controls": n.value,
|
|
3793
|
+
onClick: $
|
|
3794
|
+
}, [t("span", { class: "sr-only" }, e.stopLabel)])]), Y = (V, F) => {
|
|
3795
|
+
const z = e.variant === "banner", O = f.value !== "none", U = !!e.moreHref, J = [];
|
|
3796
|
+
if (O && J.push(L(V, F)), e.autoplay && J.push(R()), z) {
|
|
3797
|
+
const ee = [];
|
|
3798
|
+
e.navigation && ee.push(Q("prev", F, !1), Q("next", F, !1)), U && ee.push(ne()), ee.length > 0 && J.push(t("div", { class: "swiper-navigation" }, ee));
|
|
3799
|
+
} else U && J.push(ne());
|
|
3800
|
+
return J.length === 0 ? null : t("div", { class: ["swiper-indicator", { "text-center": !z }] }, J);
|
|
3801
|
+
};
|
|
3802
|
+
return () => {
|
|
3803
|
+
const V = Be(r.default?.()), F = V.length;
|
|
3804
|
+
s = F;
|
|
3805
|
+
const z = F > 0 ? Math.min(Math.max(u.value, 0), F - 1) : 0, O = e.variant === "banner";
|
|
3806
|
+
return t("div", {
|
|
3807
|
+
id: e.id,
|
|
3808
|
+
class: ["krds-carousel", O ? "main-d-ban-swiper" : "vb-swiper"],
|
|
3809
|
+
style: { position: "relative" },
|
|
3810
|
+
role: "region",
|
|
3811
|
+
"aria-roledescription": "carousel",
|
|
3812
|
+
"aria-label": e.ariaLabel,
|
|
3813
|
+
onMouseenter: M,
|
|
3814
|
+
onMouseleave: I,
|
|
3815
|
+
onFocusin: N,
|
|
3816
|
+
onFocusout: H
|
|
3817
|
+
}, [
|
|
3818
|
+
t("div", {
|
|
3819
|
+
class: "swiper",
|
|
3820
|
+
style: j,
|
|
3821
|
+
"aria-live": w.value ? "off" : "polite"
|
|
3822
|
+
}, [t("ul", {
|
|
3823
|
+
id: n.value,
|
|
3824
|
+
class: "swiper-wrapper",
|
|
3825
|
+
style: le(z)
|
|
3826
|
+
}, ae(V, z))]),
|
|
3827
|
+
!O && e.navigation && F > 0 ? Q("prev", z, !0) : null,
|
|
3828
|
+
!O && e.navigation && F > 0 ? Q("next", z, !0) : null,
|
|
3829
|
+
F > 0 ? Y(F, z) : null
|
|
3830
|
+
]);
|
|
3831
|
+
};
|
|
3832
|
+
}
|
|
3833
|
+
}), Qa = Xa, Ke = /* @__PURE__ */ Je({
|
|
3834
|
+
KrdsAccordionGroup: () => ga,
|
|
3835
|
+
KrdsAccordionItem: () => ya,
|
|
3836
|
+
KrdsBadge: () => Ct,
|
|
3837
|
+
KrdsBreadcrumb: () => Gt,
|
|
3838
|
+
KrdsButton: () => Ze,
|
|
3839
|
+
KrdsButtonGroup: () => et,
|
|
3840
|
+
KrdsCarousel: () => Qa,
|
|
3841
|
+
KrdsCheckArea: () => Vt,
|
|
3842
|
+
KrdsCheckbox: () => zt,
|
|
3843
|
+
KrdsCoachMark: () => sa,
|
|
3844
|
+
KrdsContextualHelp: () => la,
|
|
3845
|
+
KrdsCriticalAlerts: () => Ia,
|
|
3846
|
+
KrdsDateInput: () => gt,
|
|
3847
|
+
KrdsDisclosure: () => La,
|
|
3848
|
+
KrdsFileUpload: () => wt,
|
|
3849
|
+
KrdsFooter: () => xa,
|
|
3850
|
+
KrdsFormGroup: () => ut,
|
|
3851
|
+
KrdsFormHint: () => ot,
|
|
3852
|
+
KrdsFormLabel: () => rt,
|
|
3853
|
+
KrdsHeader: () => Ka,
|
|
3854
|
+
KrdsIcon: () => tt,
|
|
3855
|
+
KrdsIdentifier: () => Ba,
|
|
3856
|
+
KrdsInPageNavigation: () => Xt,
|
|
3857
|
+
KrdsInput: () => nt,
|
|
3858
|
+
KrdsLanguageSwitcher: () => da,
|
|
3859
|
+
KrdsLayout: () => _a,
|
|
3860
|
+
KrdsLink: () => at,
|
|
3861
|
+
KrdsMainMenu: () => Wa,
|
|
3862
|
+
KrdsMasthead: () => Et,
|
|
3863
|
+
KrdsModal: () => va,
|
|
3864
|
+
KrdsPagination: () => Zt,
|
|
3865
|
+
KrdsPanel: () => ta,
|
|
3866
|
+
KrdsRadio: () => Rt,
|
|
3867
|
+
KrdsResize: () => ca,
|
|
3868
|
+
KrdsSelect: () => bt,
|
|
3869
|
+
KrdsSideNavigation: () => Aa,
|
|
3870
|
+
KrdsSkipLink: () => Yt,
|
|
3871
|
+
KrdsSpinner: () => It,
|
|
3872
|
+
KrdsStep: () => qt,
|
|
3873
|
+
KrdsStepIndicator: () => Ot,
|
|
3874
|
+
KrdsStructuredList: () => Pa,
|
|
3875
|
+
KrdsTable: () => Sa,
|
|
3876
|
+
KrdsTag: () => $t,
|
|
3877
|
+
KrdsTagGroup: () => Dt,
|
|
3878
|
+
KrdsTextList: () => Fa,
|
|
3879
|
+
KrdsTextarea: () => yt,
|
|
3880
|
+
KrdsToggleSwitch: () => Mt,
|
|
3881
|
+
KrdsTooltip: () => ia,
|
|
3882
|
+
KrdsTts: () => ba
|
|
3883
|
+
}), Ee = "0.0.16", tl = { install(e, a = {}) {
|
|
3884
|
+
e.provide("krds:config", a), (a.components || Object.keys(Ke)).forEach((r) => {
|
|
3885
|
+
const l = Ke[r];
|
|
3886
|
+
l && e.component(r, l);
|
|
3887
|
+
}), Qt(e), e.config.globalProperties.$krds = { version: Ee };
|
|
3888
|
+
} }, al = Ee;
|
|
3210
3889
|
export {
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3890
|
+
ga as KrdsAccordionGroup,
|
|
3891
|
+
ya as KrdsAccordionItem,
|
|
3892
|
+
Ct as KrdsBadge,
|
|
3893
|
+
Gt as KrdsBreadcrumb,
|
|
3894
|
+
Ze as KrdsButton,
|
|
3895
|
+
et as KrdsButtonGroup,
|
|
3896
|
+
Qa as KrdsCarousel,
|
|
3897
|
+
Vt as KrdsCheckArea,
|
|
3898
|
+
zt as KrdsCheckbox,
|
|
3899
|
+
sa as KrdsCoachMark,
|
|
3900
|
+
la as KrdsContextualHelp,
|
|
3901
|
+
Ia as KrdsCriticalAlerts,
|
|
3902
|
+
gt as KrdsDateInput,
|
|
3903
|
+
La as KrdsDisclosure,
|
|
3904
|
+
wt as KrdsFileUpload,
|
|
3905
|
+
xa as KrdsFooter,
|
|
3906
|
+
ut as KrdsFormGroup,
|
|
3907
|
+
ot as KrdsFormHint,
|
|
3908
|
+
rt as KrdsFormLabel,
|
|
3909
|
+
Ka as KrdsHeader,
|
|
3910
|
+
tt as KrdsIcon,
|
|
3911
|
+
Ba as KrdsIdentifier,
|
|
3912
|
+
Xt as KrdsInPageNavigation,
|
|
3913
|
+
nt as KrdsInput,
|
|
3914
|
+
da as KrdsLanguageSwitcher,
|
|
3915
|
+
_a as KrdsLayout,
|
|
3916
|
+
at as KrdsLink,
|
|
3917
|
+
Wa as KrdsMainMenu,
|
|
3918
|
+
Et as KrdsMasthead,
|
|
3919
|
+
va as KrdsModal,
|
|
3920
|
+
Zt as KrdsPagination,
|
|
3921
|
+
ta as KrdsPanel,
|
|
3922
|
+
Rt as KrdsRadio,
|
|
3923
|
+
ca as KrdsResize,
|
|
3924
|
+
bt as KrdsSelect,
|
|
3925
|
+
Aa as KrdsSideNavigation,
|
|
3926
|
+
Yt as KrdsSkipLink,
|
|
3927
|
+
It as KrdsSpinner,
|
|
3928
|
+
qt as KrdsStep,
|
|
3929
|
+
Ot as KrdsStepIndicator,
|
|
3930
|
+
Pa as KrdsStructuredList,
|
|
3931
|
+
Sa as KrdsTable,
|
|
3932
|
+
$t as KrdsTag,
|
|
3933
|
+
Dt as KrdsTagGroup,
|
|
3934
|
+
Fa as KrdsTextList,
|
|
3935
|
+
yt as KrdsTextarea,
|
|
3936
|
+
Mt as KrdsToggleSwitch,
|
|
3937
|
+
ia as KrdsTooltip,
|
|
3938
|
+
ba as KrdsTts,
|
|
3939
|
+
he as classNames,
|
|
3940
|
+
tl as default,
|
|
3941
|
+
Za as generateId,
|
|
3942
|
+
el as generateUid,
|
|
3943
|
+
al as version
|
|
3263
3944
|
};
|
|
3264
3945
|
|
|
3265
3946
|
//# sourceMappingURL=krds-vue.es.js.map
|