@loafacto/ui 0.6.0 → 0.8.0
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/dist/applyTheme-EBr0eOKY.js +260 -0
- package/dist/applyTheme-EBr0eOKY.js.map +1 -0
- package/dist/components/LfAlert.vue.d.ts +37 -0
- package/dist/components/LfAvatar.vue.d.ts +11 -0
- package/dist/components/LfBadge.vue.d.ts +37 -0
- package/dist/components/LfButton.vue.d.ts +44 -0
- package/dist/components/LfCard.vue.d.ts +34 -0
- package/dist/components/LfCheckbox.vue.d.ts +29 -0
- package/dist/components/LfDivider.vue.d.ts +18 -0
- package/dist/components/LfEmptyState.vue.d.ts +29 -0
- package/dist/components/LfField.vue.d.ts +23 -0
- package/dist/components/LfIcon.vue.d.ts +19 -0
- package/dist/components/LfIconButton.vue.d.ts +20 -0
- package/dist/components/LfMenu.vue.d.ts +38 -0
- package/dist/components/LfModal.vue.d.ts +45 -0
- package/dist/components/LfPageHeader.vue.d.ts +28 -0
- package/dist/components/LfPagination.vue.d.ts +38 -0
- package/dist/components/LfRadioGroup.vue.d.ts +24 -0
- package/dist/components/LfSelect.vue.d.ts +29 -0
- package/dist/components/LfSkeleton.vue.d.ts +14 -0
- package/dist/components/LfSpinner.vue.d.ts +10 -0
- package/dist/components/LfStatCard.vue.d.ts +38 -0
- package/dist/components/LfSwitch.vue.d.ts +28 -0
- package/dist/components/LfTable.vue.d.ts +47 -0
- package/dist/components/LfTextField.vue.d.ts +33 -0
- package/dist/components/LfTextarea.vue.d.ts +33 -0
- package/dist/components/LfTooltip.vue.d.ts +21 -0
- package/dist/icons.d.ts +55 -0
- package/dist/index.d.ts +29 -1
- package/dist/index.js +2026 -313
- package/dist/index.js.map +1 -1
- package/dist/lib/apiClient.d.ts +72 -0
- package/dist/loafacto-ui.css +1655 -16
- package/dist/stores/confirm.d.ts +25 -3
- package/dist/theme/themeColors.d.ts +8 -0
- package/dist/types.d.ts +34 -0
- package/dist/vuetify.d.ts +115 -0
- package/dist/vuetify.js +51 -0
- package/dist/vuetify.js.map +1 -0
- package/package.json +10 -3
- package/vuetify.css +383 -0
package/dist/index.js
CHANGED
|
@@ -1,229 +1,7 @@
|
|
|
1
|
-
import { readonly, ref, openBlock, createElementBlock, createStaticVNode, createElementVNode, defineComponent, computed, watch, onBeforeUnmount, normalizeStyle, createCommentVNode, Fragment, toDisplayString, createVNode, renderList, normalizeClass, renderSlot, unref, onUnmounted, createBlock, Teleport, TransitionGroup, withCtx, withModifiers, Transition } from "vue";
|
|
1
|
+
import { readonly, ref, openBlock, createElementBlock, createStaticVNode, createElementVNode, defineComponent, computed, watch, onBeforeUnmount, normalizeStyle, createCommentVNode, Fragment, toDisplayString, createVNode, renderList, normalizeClass, renderSlot, unref, onUnmounted, createBlock, Teleport, TransitionGroup, withCtx, withModifiers, Transition, withDirectives, withKeys, vModelText, resolveDynamicComponent, createTextVNode, useModel, useId, mergeProps, vModelDynamic, mergeModels, useTemplateRef, onMounted, nextTick, vModelSelect, vModelCheckbox, vModelRadio, useSlots } from "vue";
|
|
2
|
+
import { a as applyTheme, D as DARK_THEME, L as LIGHT_THEME } from "./applyTheme-EBr0eOKY.js";
|
|
3
|
+
import { b, c, d, e, f, h, i, l } from "./applyTheme-EBr0eOKY.js";
|
|
2
4
|
import { defineStore } from "pinia";
|
|
3
|
-
function hexToRgb(hex) {
|
|
4
|
-
const clean = hex.replace("#", "");
|
|
5
|
-
if (clean.length === 3) {
|
|
6
|
-
const r = parseInt(clean[0] + clean[0], 16);
|
|
7
|
-
const g = parseInt(clean[1] + clean[1], 16);
|
|
8
|
-
const b = parseInt(clean[2] + clean[2], 16);
|
|
9
|
-
return [r, g, b];
|
|
10
|
-
}
|
|
11
|
-
return [
|
|
12
|
-
parseInt(clean.slice(0, 2), 16),
|
|
13
|
-
parseInt(clean.slice(2, 4), 16),
|
|
14
|
-
parseInt(clean.slice(4, 6), 16)
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
function parseRgba(color) {
|
|
18
|
-
const m = color.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)/);
|
|
19
|
-
if (!m) return null;
|
|
20
|
-
return [parseInt(m[1]), parseInt(m[2]), parseInt(m[3])];
|
|
21
|
-
}
|
|
22
|
-
function colorToRgb(color) {
|
|
23
|
-
if (color.startsWith("#")) return hexToRgb(color);
|
|
24
|
-
const parsed = parseRgba(color);
|
|
25
|
-
return parsed ?? [0, 0, 0];
|
|
26
|
-
}
|
|
27
|
-
function luminance(r, g, b) {
|
|
28
|
-
const [rs, gs, bs] = [r, g, b].map((c) => {
|
|
29
|
-
const s = c / 255;
|
|
30
|
-
return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
|
|
31
|
-
});
|
|
32
|
-
return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
33
|
-
}
|
|
34
|
-
function contrastRatio(l1, l2) {
|
|
35
|
-
const lighter = Math.max(l1, l2);
|
|
36
|
-
const darker = Math.min(l1, l2);
|
|
37
|
-
return (lighter + 0.05) / (darker + 0.05);
|
|
38
|
-
}
|
|
39
|
-
function accessibleText(bgLum, light, dark) {
|
|
40
|
-
const lightLum = 0.9505;
|
|
41
|
-
const darkLum = 88e-4;
|
|
42
|
-
const crLight = contrastRatio(bgLum, lightLum);
|
|
43
|
-
const crDark = contrastRatio(bgLum, darkLum);
|
|
44
|
-
return crDark >= crLight ? dark : light;
|
|
45
|
-
}
|
|
46
|
-
function surfaceFromBg(bg, amount = 0.08) {
|
|
47
|
-
const [r, g, b] = colorToRgb(bg);
|
|
48
|
-
const isLight = luminance(r, g, b) > 0.35;
|
|
49
|
-
const a = isLight ? Math.min(amount * 5, 0.5) : amount;
|
|
50
|
-
const step = Math.round((255 - Math.max(r, g, b)) * a);
|
|
51
|
-
const c = (v) => Math.min(255, v + step);
|
|
52
|
-
return `rgb(${c(r)},${c(g)},${c(b)})`;
|
|
53
|
-
}
|
|
54
|
-
function darkenFromBg(bg, step) {
|
|
55
|
-
const [r, g, b] = colorToRgb(bg);
|
|
56
|
-
const d = (c) => Math.max(0, Math.round(c - step));
|
|
57
|
-
return `rgb(${d(r)},${d(g)},${d(b)})`;
|
|
58
|
-
}
|
|
59
|
-
function withAlpha(color, alpha) {
|
|
60
|
-
const [r, g, b] = colorToRgb(color);
|
|
61
|
-
return `rgba(${r},${g},${b},${alpha})`;
|
|
62
|
-
}
|
|
63
|
-
function mutedOn(color, amount) {
|
|
64
|
-
const [r, g, b] = colorToRgb(color);
|
|
65
|
-
const m = (c) => Math.round(c * (1 - amount) + 255 * amount);
|
|
66
|
-
return `rgb(${m(r)},${m(g)},${m(b)})`;
|
|
67
|
-
}
|
|
68
|
-
function isLightBackground(color) {
|
|
69
|
-
const [r, g, b] = colorToRgb(color);
|
|
70
|
-
return luminance(r, g, b) > 0.35;
|
|
71
|
-
}
|
|
72
|
-
function deriveSemanticPalette(bg, sidebar, header, _card, accent) {
|
|
73
|
-
const light = isLightBackground(bg);
|
|
74
|
-
const [ar, ag, ab] = hexToRgb(accent.startsWith("#") ? accent : "#60a5fa");
|
|
75
|
-
const accentRgb = `${ar},${ag},${ab}`;
|
|
76
|
-
const accentLum = luminance(ar, ag, ab);
|
|
77
|
-
const textHeading = light ? "#111827" : "#f9fafb";
|
|
78
|
-
const textBody = light ? "#374151" : "#e5e7eb";
|
|
79
|
-
const textMuted = light ? "#646b76" : "#9ca3af";
|
|
80
|
-
const border = light ? "rgba(0,0,0,0.1)" : "rgba(255,255,255,0.1)";
|
|
81
|
-
const hover = light ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.05)";
|
|
82
|
-
const surface = surfaceFromBg(bg, 0.08);
|
|
83
|
-
const surfaceAlt = surfaceFromBg(bg, 0.04);
|
|
84
|
-
const overlay = withAlpha(surface, 0.95);
|
|
85
|
-
const accentText = accessibleText(accentLum, "#ffffff", "#111827");
|
|
86
|
-
const accentHover = light ? `rgba(${ar},${ag},${ab},0.85)` : `rgba(${Math.min(ar + 20, 255)},${Math.min(ag + 20, 255)},${Math.min(ab + 20, 255)},1)`;
|
|
87
|
-
const accentMuted = `rgba(${ar},${ag},${ab},0.12)`;
|
|
88
|
-
const accentMutedText = accent;
|
|
89
|
-
const btnPrimaryBg = accent;
|
|
90
|
-
const btnPrimaryText = accentText;
|
|
91
|
-
const btnPrimaryHover = accentHover;
|
|
92
|
-
const inputBg = light ? "rgba(0,0,0,0.04)" : "rgba(0,0,0,0.3)";
|
|
93
|
-
const inputBorder = border;
|
|
94
|
-
const inputFocusBorder = accent;
|
|
95
|
-
const inputFocusShadow = `rgba(${ar},${ag},${ab},0.3)`;
|
|
96
|
-
const statusSuccess = light ? "#16a34a" : "#4ade80";
|
|
97
|
-
const statusError = light ? "#dc2626" : "#f87171";
|
|
98
|
-
const statusWarning = light ? "#d97706" : "#fbbf24";
|
|
99
|
-
const statusInfo = light ? "#2563eb" : "#60a5fa";
|
|
100
|
-
const statusNeutral = light ? "#4b5563" : "#9ca3af";
|
|
101
|
-
const statusPurple = light ? "#9333ea" : "#c084fc";
|
|
102
|
-
const statusTeal = light ? "#0d9488" : "#5eead4";
|
|
103
|
-
const sidebarLight = isLightBackground(sidebar);
|
|
104
|
-
const sidebarText = sidebarLight ? "#374151" : "#e5e7eb";
|
|
105
|
-
const sidebarTextMuted = sidebarLight ? "#646b76" : "#9ca3af";
|
|
106
|
-
const sidebarActive = sidebarLight ? `rgba(${ar},${ag},${ab},0.15)` : `rgba(${ar},${ag},${ab},0.15)`;
|
|
107
|
-
const headerLight = isLightBackground(header);
|
|
108
|
-
const headerText = headerLight ? "#111827" : "#f9fafb";
|
|
109
|
-
const footerBg = darkenFromBg(bg, light ? 203 : 8);
|
|
110
|
-
const footerText = mutedOn(footerBg, 0.55);
|
|
111
|
-
const footerBorder = light ? "rgba(255,255,255,0.08)" : "rgba(255,255,255,0.06)";
|
|
112
|
-
return {
|
|
113
|
-
textHeading,
|
|
114
|
-
textBody,
|
|
115
|
-
textMuted,
|
|
116
|
-
border,
|
|
117
|
-
hover,
|
|
118
|
-
overlay,
|
|
119
|
-
surface,
|
|
120
|
-
surfaceAlt,
|
|
121
|
-
accent,
|
|
122
|
-
accentRgb,
|
|
123
|
-
accentText,
|
|
124
|
-
accentHover,
|
|
125
|
-
accentMuted,
|
|
126
|
-
accentMutedText,
|
|
127
|
-
btnPrimaryBg,
|
|
128
|
-
btnPrimaryText,
|
|
129
|
-
btnPrimaryHover,
|
|
130
|
-
inputBg,
|
|
131
|
-
inputBorder,
|
|
132
|
-
inputFocusBorder,
|
|
133
|
-
inputFocusShadow,
|
|
134
|
-
statusSuccess,
|
|
135
|
-
statusError,
|
|
136
|
-
statusWarning,
|
|
137
|
-
statusInfo,
|
|
138
|
-
statusNeutral,
|
|
139
|
-
statusPurple,
|
|
140
|
-
statusTeal,
|
|
141
|
-
sidebarText,
|
|
142
|
-
sidebarTextMuted,
|
|
143
|
-
sidebarActive,
|
|
144
|
-
headerText,
|
|
145
|
-
footerBg,
|
|
146
|
-
footerText,
|
|
147
|
-
footerBorder
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
function applySemanticPalette(palette) {
|
|
151
|
-
const el = document.documentElement;
|
|
152
|
-
const s = el.style;
|
|
153
|
-
s.setProperty("--admin-text-heading", palette.textHeading);
|
|
154
|
-
s.setProperty("--admin-text-body", palette.textBody);
|
|
155
|
-
s.setProperty("--admin-text-muted", palette.textMuted);
|
|
156
|
-
s.setProperty("--admin-text-primary", palette.textHeading);
|
|
157
|
-
s.setProperty("--admin-border", palette.border);
|
|
158
|
-
s.setProperty("--admin-hover", palette.hover);
|
|
159
|
-
s.setProperty("--admin-overlay", palette.overlay);
|
|
160
|
-
s.setProperty("--admin-surface", palette.surface);
|
|
161
|
-
s.setProperty("--admin-surface-alt", palette.surfaceAlt);
|
|
162
|
-
s.setProperty("--admin-accent", palette.accent);
|
|
163
|
-
s.setProperty("--admin-accent-rgb", palette.accentRgb);
|
|
164
|
-
s.setProperty("--admin-accent-text", palette.accentText);
|
|
165
|
-
s.setProperty("--admin-accent-hover", palette.accentHover);
|
|
166
|
-
s.setProperty("--admin-accent-muted", palette.accentMuted);
|
|
167
|
-
s.setProperty("--admin-accent-muted-text", palette.accentMutedText);
|
|
168
|
-
s.setProperty("--admin-btn-primary-bg", palette.btnPrimaryBg);
|
|
169
|
-
s.setProperty("--admin-btn-primary-text", palette.btnPrimaryText);
|
|
170
|
-
s.setProperty("--admin-btn-primary-hover", palette.btnPrimaryHover);
|
|
171
|
-
s.setProperty("--admin-input-bg", palette.inputBg);
|
|
172
|
-
s.setProperty("--admin-input-border", palette.inputBorder);
|
|
173
|
-
s.setProperty("--admin-input-focus-border", palette.inputFocusBorder);
|
|
174
|
-
s.setProperty("--admin-input-focus-shadow", palette.inputFocusShadow);
|
|
175
|
-
s.setProperty("--admin-status-success", palette.statusSuccess);
|
|
176
|
-
s.setProperty("--admin-status-error", palette.statusError);
|
|
177
|
-
s.setProperty("--admin-status-warning", palette.statusWarning);
|
|
178
|
-
s.setProperty("--admin-status-info", palette.statusInfo);
|
|
179
|
-
s.setProperty("--admin-status-neutral", palette.statusNeutral);
|
|
180
|
-
s.setProperty("--admin-status-purple", palette.statusPurple);
|
|
181
|
-
s.setProperty("--admin-status-teal", palette.statusTeal);
|
|
182
|
-
s.setProperty("--admin-sidebar-text", palette.sidebarText);
|
|
183
|
-
s.setProperty("--admin-sidebar-text-muted", palette.sidebarTextMuted);
|
|
184
|
-
s.setProperty("--admin-sidebar-active", palette.sidebarActive);
|
|
185
|
-
s.setProperty("--admin-header-text", palette.headerText);
|
|
186
|
-
s.setProperty("--admin-footer-bg", palette.footerBg);
|
|
187
|
-
s.setProperty("--admin-footer-text", palette.footerText);
|
|
188
|
-
s.setProperty("--admin-footer-border", palette.footerBorder);
|
|
189
|
-
s.setProperty("--glass-accent", palette.accent);
|
|
190
|
-
s.setProperty("--glass-accent-rgb", palette.accentRgb);
|
|
191
|
-
}
|
|
192
|
-
const DARK_THEME = {
|
|
193
|
-
bg: "#1A1712",
|
|
194
|
-
sidebar: "rgba(48, 44, 35, 0.6)",
|
|
195
|
-
header: "rgba(26, 23, 18, 0.85)",
|
|
196
|
-
card: "rgba(48, 44, 35, 0.5)",
|
|
197
|
-
// crust 원색을 그대로 쓰면 어두운 배경에서 가라앉아 버튼 글자가 읽히지 않는다.
|
|
198
|
-
// 밝힌 값을 쓴다 — 로고를 어두운 배경에서 cream 으로 반전시키는 규칙과 같은 이야기다.
|
|
199
|
-
accent: "#C89A72",
|
|
200
|
-
skin: "default"
|
|
201
|
-
};
|
|
202
|
-
const LIGHT_THEME = {
|
|
203
|
-
bg: "#F4F2EC",
|
|
204
|
-
sidebar: "rgba(255, 253, 247, 0.75)",
|
|
205
|
-
header: "rgba(255, 253, 247, 0.85)",
|
|
206
|
-
card: "rgba(255, 253, 247, 0.92)",
|
|
207
|
-
accent: "#8F6747",
|
|
208
|
-
skin: "default"
|
|
209
|
-
};
|
|
210
|
-
const DEFAULT_THEME = DARK_THEME;
|
|
211
|
-
function applyTheme(config = {}) {
|
|
212
|
-
const c = { ...DARK_THEME, ...config };
|
|
213
|
-
const el = document.documentElement;
|
|
214
|
-
const s = el.style;
|
|
215
|
-
s.setProperty("--admin-bg-color", c.bg);
|
|
216
|
-
s.setProperty("--admin-sidebar-bg", c.sidebar);
|
|
217
|
-
s.setProperty("--admin-header-bg", c.header);
|
|
218
|
-
s.setProperty("--admin-card-bg", c.card);
|
|
219
|
-
s.setProperty("--admin-ui-skin", c.skin ?? "default");
|
|
220
|
-
const light = isLightBackground(c.bg);
|
|
221
|
-
s.setProperty("color-scheme", light ? "light" : "dark");
|
|
222
|
-
el.setAttribute("data-lf-theme", light ? "light" : "dark");
|
|
223
|
-
const palette = deriveSemanticPalette(c.bg, c.sidebar, c.header, c.card, c.accent);
|
|
224
|
-
applySemanticPalette(palette);
|
|
225
|
-
return palette;
|
|
226
|
-
}
|
|
227
5
|
const STORAGE_KEY = "lf-theme";
|
|
228
6
|
const OS_QUERY = "(prefers-color-scheme: light)";
|
|
229
7
|
function readStored() {
|
|
@@ -268,8 +46,8 @@ function initTheme(options) {
|
|
|
268
46
|
});
|
|
269
47
|
} catch {
|
|
270
48
|
}
|
|
271
|
-
window.addEventListener("storage", (
|
|
272
|
-
if (
|
|
49
|
+
window.addEventListener("storage", (e2) => {
|
|
50
|
+
if (e2.key !== STORAGE_KEY) return;
|
|
273
51
|
const v = readStored();
|
|
274
52
|
explicit.value = v !== null;
|
|
275
53
|
mode.value = v ?? osPrefers();
|
|
@@ -311,26 +89,26 @@ const _export_sfc = (sfc, props) => {
|
|
|
311
89
|
}
|
|
312
90
|
return target;
|
|
313
91
|
};
|
|
314
|
-
const _sfc_main$
|
|
315
|
-
const _hoisted_1$
|
|
92
|
+
const _sfc_main$u = {};
|
|
93
|
+
const _hoisted_1$t = {
|
|
316
94
|
xmlns: "http://www.w3.org/2000/svg",
|
|
317
95
|
viewBox: "-24.0 -113.9 585.9 157.9",
|
|
318
96
|
"aria-hidden": "true"
|
|
319
97
|
};
|
|
320
98
|
function _sfc_render$1(_ctx, _cache) {
|
|
321
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
99
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$t, [..._cache[0] || (_cache[0] = [
|
|
322
100
|
createStaticVNode('<g transform="translate(-27.12,-91.37) scale(0.7136)"><circle cx="74" cy="27" r="15" fill="#8F6747"></circle><circle cx="104" cy="12" r="10" fill="#8F6747"></circle><path d="M43,48 L95,48 A5,5 0 0 1 100,53 L100,59 A5,5 0 0 1 95,64 L92,64 L92,124 L164,124 L164,148 A8,8 0 0 1 156,156 L54,156 A8,8 0 0 1 46,148 L46,64 L43,64 A5,5 0 0 1 38,59 L38,53 A5,5 0 0 1 43,48 Z" fill="currentColor"></path><path d="M92,94 A18,18 0 0 1 128,94 A18,18 0 0 1 164,94 L164,124 L92,124 Z" fill="#8F6747"></path></g><path transform="translate(122.11,0)" d="M6.80 0.00V-70.00H22.90V-14.80H52.70V0.00ZM82.95 1.20Q75.05 1.20 69.05 -2.15Q63.05 -5.50 59.60 -11.40Q56.15 -17.30 56.15 -25.00Q56.15 -32.70 59.50 -38.60Q62.85 -44.50 68.90 -47.85Q74.95 -51.20 82.65 -51.20Q90.55 -51.20 96.60 -47.85Q102.65 -44.50 106.00 -38.60Q109.35 -32.70 109.35 -25.00Q109.35 -17.30 106.00 -11.40Q102.65 -5.50 96.65 -2.15Q90.65 1.20 82.95 1.20ZM82.95 -13.20Q85.95 -13.20 88.30 -14.70Q90.65 -16.20 92.00 -18.85Q93.35 -21.50 93.35 -25.00Q93.35 -28.50 92.00 -31.15Q90.65 -33.80 88.25 -35.30Q85.85 -36.80 82.75 -36.80Q79.65 -36.80 77.25 -35.30Q74.85 -33.80 73.50 -31.15Q72.15 -28.50 72.15 -25.00Q72.15 -21.50 73.50 -18.85Q74.85 -16.20 77.30 -14.70Q79.75 -13.20 82.95 -13.20ZM133.40 1.20Q124.50 1.20 119.60 -2.80Q114.70 -6.80 114.70 -14.10Q114.70 -22.00 119.80 -25.90Q124.90 -29.80 134.10 -29.80H146.30Q145.80 -33.80 143.95 -36.05Q142.10 -38.30 138.00 -38.30Q135.20 -38.30 133.10 -37.00Q131.00 -35.70 129.50 -33.40L115.90 -37.90Q117.60 -41.60 120.55 -44.60Q123.50 -47.60 127.80 -49.40Q132.10 -51.20 137.80 -51.20Q145.60 -51.20 151.00 -48.30Q156.40 -45.40 159.10 -40.20Q161.80 -35.00 161.80 -27.90L161.60 0.00H147.00L146.80 -5.10Q144.80 -2.00 141.40 -0.40Q138.00 1.20 133.40 1.20ZM136.80 -10.60Q139.70 -10.60 141.90 -11.80Q144.10 -13.00 145.35 -15.05Q146.60 -17.10 146.60 -19.50V-19.80H140.00Q135.00 -19.80 132.80 -18.40Q130.60 -17.00 130.60 -14.50Q130.60 -12.70 132.25 -11.65Q133.90 -10.60 136.80 -10.60ZM176.65 0.00V-37.70H168.75V-50.00H176.65V-54.60Q176.65 -62.80 180.95 -67.50Q185.25 -72.20 194.15 -72.20Q197.45 -72.20 201.05 -71.05Q204.65 -69.90 207.25 -68.40L201.45 -57.40Q200.25 -58.20 199.05 -58.55Q197.85 -58.90 196.85 -58.90Q194.45 -58.90 193.35 -57.25Q192.25 -55.60 192.25 -51.80V-50.00H203.55V-37.70H192.25V0.00ZM227.90 1.20Q219.00 1.20 214.10 -2.80Q209.20 -6.80 209.20 -14.10Q209.20 -22.00 214.30 -25.90Q219.40 -29.80 228.60 -29.80H240.80Q240.30 -33.80 238.45 -36.05Q236.60 -38.30 232.50 -38.30Q229.70 -38.30 227.60 -37.00Q225.50 -35.70 224.00 -33.40L210.40 -37.90Q212.10 -41.60 215.05 -44.60Q218.00 -47.60 222.30 -49.40Q226.60 -51.20 232.30 -51.20Q240.10 -51.20 245.50 -48.30Q250.90 -45.40 253.60 -40.20Q256.30 -35.00 256.30 -27.90L256.10 0.00H241.50L241.30 -5.10Q239.30 -2.00 235.90 -0.40Q232.50 1.20 227.90 1.20ZM231.30 -10.60Q234.20 -10.60 236.40 -11.80Q238.60 -13.00 239.85 -15.05Q241.10 -17.10 241.10 -19.50V-19.80H234.50Q229.50 -19.80 227.30 -18.40Q225.10 -17.00 225.10 -14.50Q225.10 -12.70 226.75 -11.65Q228.40 -10.60 231.30 -10.60ZM291.05 1.20Q283.05 1.20 276.80 -2.15Q270.55 -5.50 267.05 -11.45Q263.55 -17.40 263.55 -25.00Q263.55 -32.70 267.05 -38.60Q270.55 -44.50 276.70 -47.85Q282.85 -51.20 290.85 -51.20Q298.55 -51.20 304.95 -47.30Q311.35 -43.40 314.15 -36.00L299.35 -31.00Q298.25 -33.40 295.70 -34.95Q293.15 -36.50 290.05 -36.50Q286.95 -36.50 284.60 -35.05Q282.25 -33.60 280.90 -31.00Q279.55 -28.40 279.55 -25.00Q279.55 -21.60 280.90 -19.05Q282.25 -16.50 284.70 -15.00Q287.15 -13.50 290.25 -13.50Q293.35 -13.50 295.85 -15.10Q298.35 -16.70 299.55 -19.30L314.35 -14.30Q311.45 -6.80 305.10 -2.80Q298.75 1.20 291.05 1.20ZM342.80 1.20Q333.90 1.20 329.55 -3.05Q325.20 -7.30 325.20 -15.20V-36.90H317.40V-50.00H325.20V-65.60H340.80V-50.00H352.20V-36.90H340.80V-19.10Q340.80 -16.10 341.90 -14.70Q343.00 -13.30 345.30 -13.30Q346.20 -13.30 347.40 -13.75Q348.60 -14.20 349.60 -14.90L355.00 -3.50Q352.60 -1.50 349.25 -0.15Q345.90 1.20 342.80 1.20ZM386.85 1.20Q378.95 1.20 372.95 -2.15Q366.95 -5.50 363.50 -11.40Q360.05 -17.30 360.05 -25.00Q360.05 -32.70 363.40 -38.60Q366.75 -44.50 372.80 -47.85Q378.85 -51.20 386.55 -51.20Q394.45 -51.20 400.50 -47.85Q406.55 -44.50 409.90 -38.60Q413.25 -32.70 413.25 -25.00Q413.25 -17.30 409.90 -11.40Q406.55 -5.50 400.55 -2.15Q394.55 1.20 386.85 1.20ZM386.85 -13.20Q389.85 -13.20 392.20 -14.70Q394.55 -16.20 395.90 -18.85Q397.25 -21.50 397.25 -25.00Q397.25 -28.50 395.90 -31.15Q394.55 -33.80 392.15 -35.30Q389.75 -36.80 386.65 -36.80Q383.55 -36.80 381.15 -35.30Q378.75 -33.80 377.40 -31.15Q376.05 -28.50 376.05 -25.00Q376.05 -21.50 377.40 -18.85Q378.75 -16.20 381.20 -14.70Q383.65 -13.20 386.85 -13.20Z" fill="currentColor"></path>', 2)
|
|
323
101
|
])]);
|
|
324
102
|
}
|
|
325
|
-
const BrandLockup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
326
|
-
const _sfc_main$
|
|
327
|
-
const _hoisted_1$
|
|
103
|
+
const BrandLockup = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$1]]);
|
|
104
|
+
const _sfc_main$t = {};
|
|
105
|
+
const _hoisted_1$s = {
|
|
328
106
|
xmlns: "http://www.w3.org/2000/svg",
|
|
329
107
|
viewBox: "30 -4 142 168",
|
|
330
108
|
"aria-hidden": "true"
|
|
331
109
|
};
|
|
332
110
|
function _sfc_render(_ctx, _cache) {
|
|
333
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
111
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$s, [..._cache[0] || (_cache[0] = [
|
|
334
112
|
createElementVNode("circle", {
|
|
335
113
|
cx: "74",
|
|
336
114
|
cy: "27",
|
|
@@ -353,27 +131,27 @@ function _sfc_render(_ctx, _cache) {
|
|
|
353
131
|
}, null, -1)
|
|
354
132
|
])]);
|
|
355
133
|
}
|
|
356
|
-
const BrandSymbol = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
357
|
-
const _hoisted_1$
|
|
358
|
-
const _hoisted_2$
|
|
359
|
-
const _hoisted_3$
|
|
360
|
-
const _hoisted_4$
|
|
361
|
-
const _hoisted_5$
|
|
362
|
-
const _hoisted_6$
|
|
363
|
-
const _hoisted_7$
|
|
364
|
-
const _hoisted_8$
|
|
134
|
+
const BrandSymbol = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render]]);
|
|
135
|
+
const _hoisted_1$r = { class: "lf-shell" };
|
|
136
|
+
const _hoisted_2$n = { class: "lf-topbar" };
|
|
137
|
+
const _hoisted_3$i = { class: "lf-topbar__inner" };
|
|
138
|
+
const _hoisted_4$f = ["href", "aria-label"];
|
|
139
|
+
const _hoisted_5$c = ["src"];
|
|
140
|
+
const _hoisted_6$9 = { class: "lf-brand__name" };
|
|
141
|
+
const _hoisted_7$6 = ["aria-expanded"];
|
|
142
|
+
const _hoisted_8$3 = {
|
|
365
143
|
key: 0,
|
|
366
144
|
class: "lf-switcher__menu",
|
|
367
145
|
role: "menu"
|
|
368
146
|
};
|
|
369
|
-
const _hoisted_9 = ["href", "onClick"];
|
|
370
|
-
const _hoisted_10 = {
|
|
147
|
+
const _hoisted_9$1 = ["href", "onClick"];
|
|
148
|
+
const _hoisted_10$1 = {
|
|
371
149
|
key: 0,
|
|
372
150
|
class: "lf-switcher__icon",
|
|
373
151
|
viewBox: "0 0 24 24",
|
|
374
152
|
"aria-hidden": "true"
|
|
375
153
|
};
|
|
376
|
-
const _hoisted_11 = ["d"];
|
|
154
|
+
const _hoisted_11$1 = ["d"];
|
|
377
155
|
const _hoisted_12 = { class: "lf-switcher__label" };
|
|
378
156
|
const _hoisted_13 = {
|
|
379
157
|
key: 1,
|
|
@@ -412,7 +190,7 @@ const _hoisted_27 = { class: "site-footer" };
|
|
|
412
190
|
const _hoisted_28 = { class: "site-footer-inner" };
|
|
413
191
|
const ICON_SUN = "M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0-5v3h0V2zm0 17v3h0v-3zM2 11h3v2H2v-2zm17 0h3v2h-3v-2zM4.2 4.2l2.1 2.1L4.9 7.7 2.8 5.6l1.4-1.4zm13.5 13.5 2.1 2.1-1.4 1.4-2.1-2.1 1.4-1.4zM19.8 4.2l1.4 1.4-2.1 2.1-1.4-1.4 2.1-2.1zM6.3 17.7l1.4 1.4-2.1 2.1-1.4-1.4 2.1-2.1z";
|
|
414
192
|
const ICON_MOON = "M12.3 3a7 7 0 1 0 8.7 8.7A9 9 0 1 1 12.3 3z";
|
|
415
|
-
const _sfc_main$
|
|
193
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
416
194
|
__name: "AppShell",
|
|
417
195
|
props: {
|
|
418
196
|
services: { default: () => [] },
|
|
@@ -454,14 +232,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
454
232
|
switcherOpen.value = false;
|
|
455
233
|
onNavigate(event, svc.path, svc);
|
|
456
234
|
}
|
|
457
|
-
function onDocumentPointerDown(
|
|
235
|
+
function onDocumentPointerDown(e2) {
|
|
458
236
|
var _a, _b;
|
|
459
|
-
const target =
|
|
237
|
+
const target = e2.target;
|
|
460
238
|
if (!((_a = switcherEl.value) == null ? void 0 : _a.contains(target))) switcherOpen.value = false;
|
|
461
239
|
if (!((_b = userEl.value) == null ? void 0 : _b.contains(target))) userOpen.value = false;
|
|
462
240
|
}
|
|
463
|
-
function onDocumentKeydown(
|
|
464
|
-
if (
|
|
241
|
+
function onDocumentKeydown(e2) {
|
|
242
|
+
if (e2.key !== "Escape") return;
|
|
465
243
|
switcherOpen.value = false;
|
|
466
244
|
userOpen.value = false;
|
|
467
245
|
}
|
|
@@ -486,7 +264,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
486
264
|
});
|
|
487
265
|
return (_ctx, _cache) => {
|
|
488
266
|
var _a;
|
|
489
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
267
|
+
return openBlock(), createElementBlock("div", _hoisted_1$r, [
|
|
490
268
|
__props.backgroundColor || __props.backgroundImage ? (openBlock(), createElementBlock("div", {
|
|
491
269
|
key: 0,
|
|
492
270
|
class: "app-background-layer",
|
|
@@ -495,8 +273,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
495
273
|
backgroundImage: __props.backgroundImage ? `url(${__props.backgroundImage})` : void 0
|
|
496
274
|
})
|
|
497
275
|
}, null, 4)) : createCommentVNode("", true),
|
|
498
|
-
createElementVNode("header", _hoisted_2$
|
|
499
|
-
createElementVNode("div", _hoisted_3$
|
|
276
|
+
createElementVNode("header", _hoisted_2$n, [
|
|
277
|
+
createElementVNode("div", _hoisted_3$i, [
|
|
500
278
|
createElementVNode("a", {
|
|
501
279
|
class: "lf-brand",
|
|
502
280
|
href: __props.brandHref,
|
|
@@ -508,13 +286,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
508
286
|
src: __props.logoUrl,
|
|
509
287
|
alt: "",
|
|
510
288
|
class: "lf-brand__logo"
|
|
511
|
-
}, null, 8, _hoisted_5$
|
|
512
|
-
createElementVNode("span", _hoisted_6$
|
|
289
|
+
}, null, 8, _hoisted_5$c),
|
|
290
|
+
createElementVNode("span", _hoisted_6$9, toDisplayString(__props.brandName), 1)
|
|
513
291
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
514
292
|
createVNode(BrandLockup, { class: "lf-brand__lockup" }),
|
|
515
293
|
createVNode(BrandSymbol, { class: "lf-brand__symbol" })
|
|
516
294
|
], 64))
|
|
517
|
-
], 8, _hoisted_4$
|
|
295
|
+
], 8, _hoisted_4$f),
|
|
518
296
|
__props.services.length ? (openBlock(), createElementBlock("div", {
|
|
519
297
|
key: 0,
|
|
520
298
|
ref_key: "switcherEl",
|
|
@@ -539,8 +317,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
539
317
|
fill: "currentColor"
|
|
540
318
|
})
|
|
541
319
|
], -1))
|
|
542
|
-
], 8, _hoisted_7$
|
|
543
|
-
switcherOpen.value ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
320
|
+
], 8, _hoisted_7$6),
|
|
321
|
+
switcherOpen.value ? (openBlock(), createElementBlock("div", _hoisted_8$3, [
|
|
544
322
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.services, (svc) => {
|
|
545
323
|
return openBlock(), createElementBlock("a", {
|
|
546
324
|
key: svc.id,
|
|
@@ -552,15 +330,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
552
330
|
role: "menuitem",
|
|
553
331
|
onClick: ($event) => onServiceClick($event, svc)
|
|
554
332
|
}, [
|
|
555
|
-
svc.iconPath ? (openBlock(), createElementBlock("svg", _hoisted_10, [
|
|
333
|
+
svc.iconPath ? (openBlock(), createElementBlock("svg", _hoisted_10$1, [
|
|
556
334
|
createElementVNode("path", {
|
|
557
335
|
d: svc.iconPath,
|
|
558
336
|
fill: "currentColor"
|
|
559
|
-
}, null, 8, _hoisted_11)
|
|
337
|
+
}, null, 8, _hoisted_11$1)
|
|
560
338
|
])) : createCommentVNode("", true),
|
|
561
339
|
createElementVNode("span", _hoisted_12, toDisplayString(svc.name), 1),
|
|
562
340
|
svc.comingSoon ? (openBlock(), createElementBlock("span", _hoisted_13, "준비 중")) : createCommentVNode("", true)
|
|
563
|
-
], 10, _hoisted_9);
|
|
341
|
+
], 10, _hoisted_9$1);
|
|
564
342
|
}), 128))
|
|
565
343
|
])) : createCommentVNode("", true)
|
|
566
344
|
], 512)) : createCommentVNode("", true),
|
|
@@ -659,7 +437,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
659
437
|
};
|
|
660
438
|
}
|
|
661
439
|
});
|
|
662
|
-
const AppShell = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
440
|
+
const AppShell = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-f1af4c05"]]);
|
|
663
441
|
function generateId() {
|
|
664
442
|
return `toast-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
665
443
|
}
|
|
@@ -693,26 +471,26 @@ const useToastStore = defineStore("toast", () => {
|
|
|
693
471
|
}
|
|
694
472
|
return { items, add, remove, success, error, info, warning };
|
|
695
473
|
});
|
|
696
|
-
const _hoisted_1$
|
|
474
|
+
const _hoisted_1$q = {
|
|
697
475
|
class: "toast-container",
|
|
698
476
|
role: "region",
|
|
699
477
|
"aria-label": "알림"
|
|
700
478
|
};
|
|
701
|
-
const _hoisted_2$
|
|
702
|
-
const _hoisted_3$
|
|
479
|
+
const _hoisted_2$m = ["onClick"];
|
|
480
|
+
const _hoisted_3$h = {
|
|
703
481
|
class: "toast-icon",
|
|
704
482
|
viewBox: "0 0 24 24",
|
|
705
483
|
"aria-hidden": "true"
|
|
706
484
|
};
|
|
707
|
-
const _hoisted_4$
|
|
708
|
-
const _hoisted_5$
|
|
709
|
-
const _hoisted_6$
|
|
710
|
-
const _hoisted_7$
|
|
485
|
+
const _hoisted_4$e = ["d"];
|
|
486
|
+
const _hoisted_5$b = { class: "toast-message" };
|
|
487
|
+
const _hoisted_6$8 = ["onClick"];
|
|
488
|
+
const _hoisted_7$5 = {
|
|
711
489
|
viewBox: "0 0 24 24",
|
|
712
490
|
"aria-hidden": "true"
|
|
713
491
|
};
|
|
714
|
-
const _hoisted_8 = ["d"];
|
|
715
|
-
const _sfc_main$
|
|
492
|
+
const _hoisted_8$2 = ["d"];
|
|
493
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
716
494
|
__name: "AppToast",
|
|
717
495
|
setup(__props) {
|
|
718
496
|
const toastStore = useToastStore();
|
|
@@ -744,7 +522,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
744
522
|
});
|
|
745
523
|
return (_ctx, _cache) => {
|
|
746
524
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
747
|
-
createElementVNode("div", _hoisted_1$
|
|
525
|
+
createElementVNode("div", _hoisted_1$q, [
|
|
748
526
|
createVNode(TransitionGroup, { name: "toast" }, {
|
|
749
527
|
default: withCtx(() => [
|
|
750
528
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(toastStore).items, (item) => {
|
|
@@ -754,27 +532,27 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
754
532
|
role: "alert",
|
|
755
533
|
onClick: ($event) => unref(toastStore).remove(item.id)
|
|
756
534
|
}, [
|
|
757
|
-
(openBlock(), createElementBlock("svg", _hoisted_3$
|
|
535
|
+
(openBlock(), createElementBlock("svg", _hoisted_3$h, [
|
|
758
536
|
createElementVNode("path", {
|
|
759
537
|
d: ICON_PATHS[item.type],
|
|
760
538
|
fill: "currentColor"
|
|
761
|
-
}, null, 8, _hoisted_4$
|
|
539
|
+
}, null, 8, _hoisted_4$e)
|
|
762
540
|
])),
|
|
763
|
-
createElementVNode("span", _hoisted_5$
|
|
541
|
+
createElementVNode("span", _hoisted_5$b, toDisplayString(item.message), 1),
|
|
764
542
|
createElementVNode("button", {
|
|
765
543
|
type: "button",
|
|
766
544
|
class: "toast-close",
|
|
767
545
|
"aria-label": "닫기",
|
|
768
546
|
onClick: withModifiers(($event) => unref(toastStore).remove(item.id), ["stop"])
|
|
769
547
|
}, [
|
|
770
|
-
(openBlock(), createElementBlock("svg", _hoisted_7$
|
|
548
|
+
(openBlock(), createElementBlock("svg", _hoisted_7$5, [
|
|
771
549
|
createElementVNode("path", {
|
|
772
550
|
d: ICON_PATHS.close,
|
|
773
551
|
fill: "currentColor"
|
|
774
|
-
}, null, 8, _hoisted_8)
|
|
552
|
+
}, null, 8, _hoisted_8$2)
|
|
775
553
|
]))
|
|
776
|
-
], 8, _hoisted_6$
|
|
777
|
-
], 10, _hoisted_2$
|
|
554
|
+
], 8, _hoisted_6$8)
|
|
555
|
+
], 10, _hoisted_2$m);
|
|
778
556
|
}), 128))
|
|
779
557
|
]),
|
|
780
558
|
_: 1
|
|
@@ -784,7 +562,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
784
562
|
};
|
|
785
563
|
}
|
|
786
564
|
});
|
|
787
|
-
const AppToast = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
565
|
+
const AppToast = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-284b8ae8"]]);
|
|
788
566
|
const useLoadingStore = defineStore("loading", () => {
|
|
789
567
|
const count = ref(0);
|
|
790
568
|
const loading = computed(() => count.value > 0);
|
|
@@ -804,14 +582,14 @@ const useLoadingStore = defineStore("loading", () => {
|
|
|
804
582
|
}
|
|
805
583
|
return { loading, count, start, stop, withLoading };
|
|
806
584
|
});
|
|
807
|
-
const _hoisted_1$
|
|
585
|
+
const _hoisted_1$p = {
|
|
808
586
|
key: 0,
|
|
809
587
|
class: "loading-overlay",
|
|
810
588
|
role: "status",
|
|
811
589
|
"aria-live": "polite",
|
|
812
590
|
"aria-label": "로딩 중"
|
|
813
591
|
};
|
|
814
|
-
const _sfc_main$
|
|
592
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
815
593
|
__name: "AppLoadingOverlay",
|
|
816
594
|
setup(__props) {
|
|
817
595
|
const loadingStore = useLoadingStore();
|
|
@@ -819,7 +597,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
819
597
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
820
598
|
createVNode(Transition, { name: "fade" }, {
|
|
821
599
|
default: withCtx(() => [
|
|
822
|
-
unref(loadingStore).loading ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
600
|
+
unref(loadingStore).loading ? (openBlock(), createElementBlock("div", _hoisted_1$p, [..._cache[0] || (_cache[0] = [
|
|
823
601
|
createElementVNode("div", {
|
|
824
602
|
class: "loading-spinner",
|
|
825
603
|
"aria-hidden": "true"
|
|
@@ -832,7 +610,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
832
610
|
};
|
|
833
611
|
}
|
|
834
612
|
});
|
|
835
|
-
const AppLoadingOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
613
|
+
const AppLoadingOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-cce3ea3e"]]);
|
|
836
614
|
const useConfirmStore = defineStore("confirm", () => {
|
|
837
615
|
const open = ref(false);
|
|
838
616
|
const title = ref("확인");
|
|
@@ -840,40 +618,68 @@ const useConfirmStore = defineStore("confirm", () => {
|
|
|
840
618
|
const confirmText = ref("확인");
|
|
841
619
|
const cancelText = ref("취소");
|
|
842
620
|
const danger = ref(false);
|
|
621
|
+
const requireText = ref("");
|
|
622
|
+
const requireLabel = ref("");
|
|
623
|
+
const typedText = ref("");
|
|
843
624
|
let resolver = null;
|
|
625
|
+
const canConfirm = computed(() => !requireText.value || typedText.value === requireText.value);
|
|
844
626
|
function ask(opts) {
|
|
845
627
|
title.value = opts.title ?? "확인";
|
|
846
628
|
message.value = opts.message;
|
|
847
629
|
confirmText.value = opts.confirmText ?? "확인";
|
|
848
630
|
cancelText.value = opts.cancelText ?? "취소";
|
|
849
631
|
danger.value = opts.danger ?? false;
|
|
632
|
+
requireText.value = opts.requireText ?? "";
|
|
633
|
+
requireLabel.value = opts.requireLabel ?? "";
|
|
634
|
+
typedText.value = "";
|
|
850
635
|
open.value = true;
|
|
851
636
|
return new Promise((resolve2) => {
|
|
852
637
|
resolver = resolve2;
|
|
853
638
|
});
|
|
854
639
|
}
|
|
855
640
|
function resolve(v) {
|
|
641
|
+
if (v && !canConfirm.value) return;
|
|
856
642
|
open.value = false;
|
|
857
643
|
resolver == null ? void 0 : resolver(v);
|
|
858
644
|
resolver = null;
|
|
859
645
|
}
|
|
860
|
-
return {
|
|
646
|
+
return {
|
|
647
|
+
open,
|
|
648
|
+
title,
|
|
649
|
+
message,
|
|
650
|
+
confirmText,
|
|
651
|
+
cancelText,
|
|
652
|
+
danger,
|
|
653
|
+
requireText,
|
|
654
|
+
requireLabel,
|
|
655
|
+
typedText,
|
|
656
|
+
canConfirm,
|
|
657
|
+
ask,
|
|
658
|
+
resolve
|
|
659
|
+
};
|
|
861
660
|
});
|
|
862
|
-
const _hoisted_1 = {
|
|
661
|
+
const _hoisted_1$o = {
|
|
863
662
|
key: 0,
|
|
864
663
|
class: "app-confirm-backdrop"
|
|
865
664
|
};
|
|
866
|
-
const _hoisted_2 = {
|
|
665
|
+
const _hoisted_2$l = {
|
|
867
666
|
class: "app-confirm",
|
|
868
667
|
role: "dialog",
|
|
869
668
|
"aria-modal": "true"
|
|
870
669
|
};
|
|
871
|
-
const _hoisted_3 = { class: "app-confirm__header" };
|
|
872
|
-
const _hoisted_4 = { class: "app-confirm__title" };
|
|
873
|
-
const _hoisted_5 = { class: "app-confirm__body" };
|
|
874
|
-
const _hoisted_6 = { class: "app-confirm__message" };
|
|
875
|
-
const _hoisted_7 = {
|
|
876
|
-
|
|
670
|
+
const _hoisted_3$g = { class: "app-confirm__header" };
|
|
671
|
+
const _hoisted_4$d = { class: "app-confirm__title" };
|
|
672
|
+
const _hoisted_5$a = { class: "app-confirm__body" };
|
|
673
|
+
const _hoisted_6$7 = { class: "app-confirm__message" };
|
|
674
|
+
const _hoisted_7$4 = {
|
|
675
|
+
key: 0,
|
|
676
|
+
class: "app-confirm__require"
|
|
677
|
+
};
|
|
678
|
+
const _hoisted_8$1 = { class: "app-confirm__require-label" };
|
|
679
|
+
const _hoisted_9 = ["placeholder"];
|
|
680
|
+
const _hoisted_10 = { class: "app-confirm__actions" };
|
|
681
|
+
const _hoisted_11 = ["disabled"];
|
|
682
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
877
683
|
__name: "AppConfirmModal",
|
|
878
684
|
setup(__props) {
|
|
879
685
|
const store = useConfirmStore();
|
|
@@ -881,25 +687,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
881
687
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
882
688
|
createVNode(Transition, { name: "app-confirm-fade" }, {
|
|
883
689
|
default: withCtx(() => [
|
|
884
|
-
unref(store).open ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
885
|
-
createElementVNode("div", _hoisted_2, [
|
|
886
|
-
createElementVNode("div", _hoisted_3, [
|
|
887
|
-
createElementVNode("h3", _hoisted_4, toDisplayString(unref(store).title), 1)
|
|
690
|
+
unref(store).open ? (openBlock(), createElementBlock("div", _hoisted_1$o, [
|
|
691
|
+
createElementVNode("div", _hoisted_2$l, [
|
|
692
|
+
createElementVNode("div", _hoisted_3$g, [
|
|
693
|
+
createElementVNode("h3", _hoisted_4$d, toDisplayString(unref(store).title), 1)
|
|
888
694
|
]),
|
|
889
|
-
createElementVNode("div", _hoisted_5, [
|
|
890
|
-
createElementVNode("p", _hoisted_6, toDisplayString(unref(store).message), 1)
|
|
695
|
+
createElementVNode("div", _hoisted_5$a, [
|
|
696
|
+
createElementVNode("p", _hoisted_6$7, toDisplayString(unref(store).message), 1),
|
|
697
|
+
unref(store).requireText ? (openBlock(), createElementBlock("label", _hoisted_7$4, [
|
|
698
|
+
createElementVNode("span", _hoisted_8$1, toDisplayString(unref(store).requireLabel || `계속하려면 ${unref(store).requireText} 를 입력하세요`), 1),
|
|
699
|
+
withDirectives(createElementVNode("input", {
|
|
700
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(store).typedText = $event),
|
|
701
|
+
class: "app-confirm__input",
|
|
702
|
+
type: "text",
|
|
703
|
+
autocomplete: "off",
|
|
704
|
+
spellcheck: "false",
|
|
705
|
+
placeholder: unref(store).requireText,
|
|
706
|
+
onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => unref(store).resolve(true), ["prevent"]), ["enter"]))
|
|
707
|
+
}, null, 40, _hoisted_9), [
|
|
708
|
+
[vModelText, unref(store).typedText]
|
|
709
|
+
])
|
|
710
|
+
])) : createCommentVNode("", true)
|
|
891
711
|
]),
|
|
892
|
-
createElementVNode("div",
|
|
712
|
+
createElementVNode("div", _hoisted_10, [
|
|
893
713
|
createElementVNode("button", {
|
|
894
714
|
type: "button",
|
|
895
715
|
class: "app-confirm__btn app-confirm__btn--ghost",
|
|
896
|
-
onClick: _cache[
|
|
716
|
+
onClick: _cache[2] || (_cache[2] = ($event) => unref(store).resolve(false))
|
|
897
717
|
}, toDisplayString(unref(store).cancelText), 1),
|
|
898
718
|
createElementVNode("button", {
|
|
899
719
|
type: "button",
|
|
900
720
|
class: normalizeClass(["app-confirm__btn", unref(store).danger ? "app-confirm__btn--danger" : "app-confirm__btn--primary"]),
|
|
901
|
-
|
|
902
|
-
|
|
721
|
+
disabled: !unref(store).canConfirm,
|
|
722
|
+
onClick: _cache[3] || (_cache[3] = ($event) => unref(store).resolve(true))
|
|
723
|
+
}, toDisplayString(unref(store).confirmText), 11, _hoisted_11)
|
|
903
724
|
])
|
|
904
725
|
])
|
|
905
726
|
])) : createCommentVNode("", true)
|
|
@@ -910,7 +731,1871 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
910
731
|
};
|
|
911
732
|
}
|
|
912
733
|
});
|
|
913
|
-
const AppConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
734
|
+
const AppConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-c92e7e61"]]);
|
|
735
|
+
const LF_ICONS = {
|
|
736
|
+
close: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",
|
|
737
|
+
search: "M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19 15.5 14zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z",
|
|
738
|
+
check: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",
|
|
739
|
+
check_circle: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z",
|
|
740
|
+
info: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z",
|
|
741
|
+
warning: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z",
|
|
742
|
+
error: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z",
|
|
743
|
+
expand_more: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z",
|
|
744
|
+
expand_less: "M12 8.83 16.59 13.41 18 12l-6-6-6 6 1.41 1.41z",
|
|
745
|
+
chevron_left: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z",
|
|
746
|
+
chevron_right: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",
|
|
747
|
+
arrow_back: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z",
|
|
748
|
+
arrow_upward: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z",
|
|
749
|
+
arrow_downward: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z",
|
|
750
|
+
add: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z",
|
|
751
|
+
remove: "M19 13H5v-2h14z",
|
|
752
|
+
edit: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z",
|
|
753
|
+
delete: "M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z",
|
|
754
|
+
refresh: "M17.65 6.35A8 8 0 1 0 19.73 14h-2.08A6 6 0 1 1 12 6a5.94 5.94 0 0 1 4.22 1.78L13 11h7V4l-2.35 2.35z",
|
|
755
|
+
more_vert: "M12 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0 6a2 2 0 1 0 0 4 2 2 0 0 0 0-4z",
|
|
756
|
+
download: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z",
|
|
757
|
+
upload: "M9 16h6v-6h4l-7-7-7 7h4v6zM5 18h14v2H5v-2z",
|
|
758
|
+
filter_list: "M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z",
|
|
759
|
+
settings: "M19.14 12.94a7.07 7.07 0 0 0 0-1.88l2.03-1.58a.5.5 0 0 0 .12-.62l-1.92-3.32a.5.5 0 0 0-.6-.22l-2.39.96a7.3 7.3 0 0 0-1.62-.94l-.36-2.54a.5.5 0 0 0-.5-.42h-3.84a.5.5 0 0 0-.5.42l-.36 2.54c-.59.24-1.13.56-1.62.94l-2.39-.96a.5.5 0 0 0-.6.22L2.67 8.86a.5.5 0 0 0 .12.62l2.03 1.58a7.07 7.07 0 0 0 0 1.88l-2.03 1.58a.5.5 0 0 0-.12.62l1.92 3.32c.12.22.38.3.6.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.04.24.25.42.5.42h3.84c.25 0 .46-.18.5-.42l.36-2.54c.59-.24 1.12-.56 1.62-.94l2.39.96c.22.08.48 0 .6-.22l1.92-3.32a.5.5 0 0 0-.12-.62l-2.03-1.58zM12 15.6A3.6 3.6 0 1 1 15.6 12 3.6 3.6 0 0 1 12 15.6z",
|
|
760
|
+
person: "M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z",
|
|
761
|
+
people: "M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-8 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z",
|
|
762
|
+
logout: "M17 7l-1.41 1.41L17.17 10H9v2h8.17l-1.58 1.59L17 15l4-4-4-4zM5 5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7v-2H5V5z",
|
|
763
|
+
menu: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z",
|
|
764
|
+
visibility: "M12 4.5A11.83 11.83 0 0 0 1 12a11.83 11.83 0 0 0 22 0 11.83 11.83 0 0 0-11-7.5zm0 12.5a5 5 0 1 1 5-5 5 5 0 0 1-5 5zm0-8a3 3 0 1 0 3 3 3 3 0 0 0-3-3z",
|
|
765
|
+
visibility_off: "M12 6.5a5 5 0 0 1 5 5c0 .51-.08 1-.23 1.45l2.92 2.92A11.8 11.8 0 0 0 23 11.5 11.83 11.83 0 0 0 8.36 4.9l2.16 2.16c.46-.35.99-.56 1.48-.56zM2.71 3.16 1.29 4.58l2.44 2.44A11.75 11.75 0 0 0 1 11.5a11.83 11.83 0 0 0 15.23 6.7l3.19 3.19 1.41-1.41L2.71 3.16zM12 16.5a5 5 0 0 1-5-5c0-.69.15-1.34.4-1.93l1.57 1.57c-.03.12-.05.24-.05.36a3 3 0 0 0 3 3c.12 0 .24-.02.36-.05l1.57 1.57c-.59.25-1.24.4-1.93.4z",
|
|
766
|
+
content_copy: "M16 1H4a2 2 0 0 0-2 2v14h2V3h12V1zm3 4H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 16H8V7h11v14z",
|
|
767
|
+
open_in_new: "M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z",
|
|
768
|
+
help: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 17h-2v-2h2v2zm2.07-7.75-.9.92A3.4 3.4 0 0 0 13 14h-2v-.5a4 4 0 0 1 1.17-2.83l1.24-1.26A1.96 1.96 0 0 0 12 6a2 2 0 0 0-2 2H8a4 4 0 1 1 8 0 3.2 3.2 0 0 1-.93 2.25z",
|
|
769
|
+
lock: "M18 8h-1V6a5 5 0 0 0-10 0v2H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2zM9 6a3 3 0 0 1 6 0v2H9V6zm3 12a2 2 0 1 1 2-2 2 2 0 0 1-2 2z",
|
|
770
|
+
mail: "M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z",
|
|
771
|
+
calendar_today: "M19 3h-1V1h-2v2H8V1H6v2H5a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 18H5V9h14v12z",
|
|
772
|
+
save: "M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7l-4-4zm-5 16a3 3 0 1 1 3-3 3 3 0 0 1-3 3zm3-10H5V5h10v4z"
|
|
773
|
+
};
|
|
774
|
+
const _hoisted_1$n = ["role", "aria-label", "aria-hidden"];
|
|
775
|
+
const _hoisted_2$k = { key: 0 };
|
|
776
|
+
const _hoisted_3$f = ["d"];
|
|
777
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
778
|
+
__name: "LfIcon",
|
|
779
|
+
props: {
|
|
780
|
+
name: {},
|
|
781
|
+
path: {},
|
|
782
|
+
size: { default: "1em" },
|
|
783
|
+
label: {}
|
|
784
|
+
},
|
|
785
|
+
setup(__props) {
|
|
786
|
+
const props = __props;
|
|
787
|
+
const d2 = computed(() => props.path ?? (props.name ? LF_ICONS[props.name] : void 0));
|
|
788
|
+
const resolvedSize = computed(
|
|
789
|
+
() => typeof props.size === "number" ? `${props.size}px` : props.size
|
|
790
|
+
);
|
|
791
|
+
return (_ctx, _cache) => {
|
|
792
|
+
return openBlock(), createElementBlock("svg", {
|
|
793
|
+
class: "lf-icon",
|
|
794
|
+
viewBox: "0 0 24 24",
|
|
795
|
+
style: normalizeStyle({ width: resolvedSize.value, height: resolvedSize.value }),
|
|
796
|
+
role: __props.label ? "img" : void 0,
|
|
797
|
+
"aria-label": __props.label || void 0,
|
|
798
|
+
"aria-hidden": __props.label ? void 0 : "true"
|
|
799
|
+
}, [
|
|
800
|
+
__props.label ? (openBlock(), createElementBlock("title", _hoisted_2$k, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
|
|
801
|
+
d2.value ? (openBlock(), createElementBlock("path", {
|
|
802
|
+
key: 1,
|
|
803
|
+
d: d2.value,
|
|
804
|
+
fill: "currentColor"
|
|
805
|
+
}, null, 8, _hoisted_3$f)) : createCommentVNode("", true)
|
|
806
|
+
], 12, _hoisted_1$n);
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
});
|
|
810
|
+
const LfIcon = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-b70b3868"]]);
|
|
811
|
+
const _hoisted_1$m = ["role", "aria-label", "aria-hidden"];
|
|
812
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
813
|
+
__name: "LfSpinner",
|
|
814
|
+
props: {
|
|
815
|
+
size: { default: "1.25rem" },
|
|
816
|
+
label: {}
|
|
817
|
+
},
|
|
818
|
+
setup(__props) {
|
|
819
|
+
const props = __props;
|
|
820
|
+
const resolvedSize = computed(
|
|
821
|
+
() => typeof props.size === "number" ? `${props.size}px` : props.size
|
|
822
|
+
);
|
|
823
|
+
return (_ctx, _cache) => {
|
|
824
|
+
return openBlock(), createElementBlock("svg", {
|
|
825
|
+
class: "lf-spinner",
|
|
826
|
+
viewBox: "0 0 24 24",
|
|
827
|
+
style: normalizeStyle({ width: resolvedSize.value, height: resolvedSize.value }),
|
|
828
|
+
role: __props.label ? "status" : void 0,
|
|
829
|
+
"aria-label": __props.label || void 0,
|
|
830
|
+
"aria-hidden": __props.label ? void 0 : "true"
|
|
831
|
+
}, [..._cache[0] || (_cache[0] = [
|
|
832
|
+
createElementVNode("circle", {
|
|
833
|
+
class: "lf-spinner__track",
|
|
834
|
+
cx: "12",
|
|
835
|
+
cy: "12",
|
|
836
|
+
r: "9"
|
|
837
|
+
}, null, -1),
|
|
838
|
+
createElementVNode("circle", {
|
|
839
|
+
class: "lf-spinner__head",
|
|
840
|
+
cx: "12",
|
|
841
|
+
cy: "12",
|
|
842
|
+
r: "9"
|
|
843
|
+
}, null, -1)
|
|
844
|
+
])], 12, _hoisted_1$m);
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
});
|
|
848
|
+
const LfSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-4aedf6b0"]]);
|
|
849
|
+
const _hoisted_1$l = {
|
|
850
|
+
key: 2,
|
|
851
|
+
class: "lf-btn__label"
|
|
852
|
+
};
|
|
853
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
854
|
+
__name: "LfButton",
|
|
855
|
+
props: {
|
|
856
|
+
variant: { default: "ghost" },
|
|
857
|
+
size: { default: "md" },
|
|
858
|
+
block: { type: Boolean },
|
|
859
|
+
loading: { type: Boolean },
|
|
860
|
+
disabled: { type: Boolean },
|
|
861
|
+
type: { default: "button" },
|
|
862
|
+
href: {},
|
|
863
|
+
external: { type: Boolean },
|
|
864
|
+
icon: {},
|
|
865
|
+
iconPath: {},
|
|
866
|
+
iconRight: {}
|
|
867
|
+
},
|
|
868
|
+
setup(__props) {
|
|
869
|
+
return (_ctx, _cache) => {
|
|
870
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.href ? "a" : "button"), {
|
|
871
|
+
class: normalizeClass(["lf-btn", [`lf-btn--${__props.variant}`, `lf-btn--${__props.size}`, { "lf-btn--block": __props.block, "lf-btn--loading": __props.loading }]]),
|
|
872
|
+
type: __props.href ? void 0 : __props.type,
|
|
873
|
+
href: __props.href,
|
|
874
|
+
target: __props.href && __props.external ? "_blank" : void 0,
|
|
875
|
+
rel: __props.href && __props.external ? "noopener noreferrer" : void 0,
|
|
876
|
+
disabled: __props.href ? void 0 : __props.disabled || __props.loading,
|
|
877
|
+
"aria-disabled": __props.href && (__props.disabled || __props.loading) ? "true" : void 0,
|
|
878
|
+
"aria-busy": __props.loading ? "true" : void 0
|
|
879
|
+
}, {
|
|
880
|
+
default: withCtx(() => [
|
|
881
|
+
__props.loading ? (openBlock(), createBlock(LfSpinner, {
|
|
882
|
+
key: 0,
|
|
883
|
+
class: "lf-btn__spinner",
|
|
884
|
+
size: "1em"
|
|
885
|
+
})) : __props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
|
|
886
|
+
key: 1,
|
|
887
|
+
name: __props.icon,
|
|
888
|
+
path: __props.iconPath
|
|
889
|
+
}, null, 8, ["name", "path"])) : createCommentVNode("", true),
|
|
890
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_1$l, [
|
|
891
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
892
|
+
])) : createCommentVNode("", true),
|
|
893
|
+
__props.iconRight ? (openBlock(), createBlock(LfIcon, {
|
|
894
|
+
key: 3,
|
|
895
|
+
name: __props.iconRight
|
|
896
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
897
|
+
]),
|
|
898
|
+
_: 3
|
|
899
|
+
}, 8, ["class", "type", "href", "target", "rel", "disabled", "aria-disabled", "aria-busy"]);
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
});
|
|
903
|
+
const LfButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-a40d8584"]]);
|
|
904
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
905
|
+
__name: "LfIconButton",
|
|
906
|
+
props: {
|
|
907
|
+
icon: {},
|
|
908
|
+
iconPath: {},
|
|
909
|
+
label: {},
|
|
910
|
+
size: { default: "md" },
|
|
911
|
+
accent: { type: Boolean },
|
|
912
|
+
danger: { type: Boolean },
|
|
913
|
+
disabled: { type: Boolean },
|
|
914
|
+
href: {},
|
|
915
|
+
external: { type: Boolean }
|
|
916
|
+
},
|
|
917
|
+
setup(__props) {
|
|
918
|
+
return (_ctx, _cache) => {
|
|
919
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.href ? "a" : "button"), {
|
|
920
|
+
class: normalizeClass(["lf-icon-btn", [`lf-icon-btn--${__props.size}`, { "lf-icon-btn--accent": __props.accent, "lf-icon-btn--danger": __props.danger }]]),
|
|
921
|
+
type: __props.href ? void 0 : "button",
|
|
922
|
+
href: __props.href,
|
|
923
|
+
target: __props.href && __props.external ? "_blank" : void 0,
|
|
924
|
+
rel: __props.href && __props.external ? "noopener noreferrer" : void 0,
|
|
925
|
+
disabled: __props.href ? void 0 : __props.disabled,
|
|
926
|
+
"aria-label": __props.label,
|
|
927
|
+
title: __props.label
|
|
928
|
+
}, {
|
|
929
|
+
default: withCtx(() => [
|
|
930
|
+
createVNode(LfIcon, {
|
|
931
|
+
name: __props.icon,
|
|
932
|
+
path: __props.iconPath,
|
|
933
|
+
size: __props.size === "sm" ? "1.125rem" : "1.375rem"
|
|
934
|
+
}, null, 8, ["name", "path", "size"])
|
|
935
|
+
]),
|
|
936
|
+
_: 1
|
|
937
|
+
}, 8, ["class", "type", "href", "target", "rel", "disabled", "aria-label", "title"]);
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
const LfIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-4a28ff9b"]]);
|
|
942
|
+
const _hoisted_1$k = ["for"];
|
|
943
|
+
const _hoisted_2$j = {
|
|
944
|
+
key: 0,
|
|
945
|
+
class: "lf-field__required",
|
|
946
|
+
"aria-hidden": "true"
|
|
947
|
+
};
|
|
948
|
+
const _hoisted_3$e = {
|
|
949
|
+
key: 1,
|
|
950
|
+
class: "lf-field__error",
|
|
951
|
+
role: "alert"
|
|
952
|
+
};
|
|
953
|
+
const _hoisted_4$c = {
|
|
954
|
+
key: 2,
|
|
955
|
+
class: "lf-field__hint"
|
|
956
|
+
};
|
|
957
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
958
|
+
__name: "LfField",
|
|
959
|
+
props: {
|
|
960
|
+
label: {},
|
|
961
|
+
hint: {},
|
|
962
|
+
error: {},
|
|
963
|
+
required: { type: Boolean },
|
|
964
|
+
htmlFor: {}
|
|
965
|
+
},
|
|
966
|
+
setup(__props) {
|
|
967
|
+
return (_ctx, _cache) => {
|
|
968
|
+
return openBlock(), createElementBlock("div", {
|
|
969
|
+
class: normalizeClass(["lf-field", { "lf-field--error": !!__props.error }])
|
|
970
|
+
}, [
|
|
971
|
+
__props.label ? (openBlock(), createElementBlock("label", {
|
|
972
|
+
key: 0,
|
|
973
|
+
class: "lf-field__label",
|
|
974
|
+
for: __props.htmlFor
|
|
975
|
+
}, [
|
|
976
|
+
createTextVNode(toDisplayString(__props.label) + " ", 1),
|
|
977
|
+
__props.required ? (openBlock(), createElementBlock("span", _hoisted_2$j, "*")) : createCommentVNode("", true)
|
|
978
|
+
], 8, _hoisted_1$k)) : createCommentVNode("", true),
|
|
979
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
980
|
+
__props.error ? (openBlock(), createElementBlock("p", _hoisted_3$e, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", _hoisted_4$c, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
981
|
+
], 2);
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
});
|
|
985
|
+
const LfField = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-38509e4d"]]);
|
|
986
|
+
const _hoisted_1$j = { class: "lf-control-wrap" };
|
|
987
|
+
const _hoisted_2$i = {
|
|
988
|
+
key: 0,
|
|
989
|
+
class: "lf-control-wrap__icon lf-control-wrap__icon--left"
|
|
990
|
+
};
|
|
991
|
+
const _hoisted_3$d = ["id", "type", "placeholder", "disabled", "readonly", "required", "aria-invalid"];
|
|
992
|
+
const _hoisted_4$b = ["aria-label"];
|
|
993
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
994
|
+
...{ inheritAttrs: false },
|
|
995
|
+
__name: "LfTextField",
|
|
996
|
+
props: /* @__PURE__ */ mergeModels({
|
|
997
|
+
label: {},
|
|
998
|
+
hint: {},
|
|
999
|
+
error: {},
|
|
1000
|
+
required: { type: Boolean },
|
|
1001
|
+
placeholder: {},
|
|
1002
|
+
disabled: { type: Boolean },
|
|
1003
|
+
readonly: { type: Boolean },
|
|
1004
|
+
type: { default: "text" },
|
|
1005
|
+
size: { default: "md" },
|
|
1006
|
+
icon: {},
|
|
1007
|
+
iconPath: {},
|
|
1008
|
+
clearable: { type: Boolean },
|
|
1009
|
+
revealable: { type: Boolean }
|
|
1010
|
+
}, {
|
|
1011
|
+
"modelValue": { default: "" },
|
|
1012
|
+
"modelModifiers": {}
|
|
1013
|
+
}),
|
|
1014
|
+
emits: ["update:modelValue"],
|
|
1015
|
+
setup(__props) {
|
|
1016
|
+
const props = __props;
|
|
1017
|
+
const model = useModel(__props, "modelValue");
|
|
1018
|
+
const inputId = useId();
|
|
1019
|
+
const revealed = ref(false);
|
|
1020
|
+
const hasTrailing = computed(
|
|
1021
|
+
() => props.revealable || props.clearable && !!model.value && !props.disabled && !props.readonly
|
|
1022
|
+
);
|
|
1023
|
+
function clear() {
|
|
1024
|
+
model.value = typeof model.value === "number" ? 0 : "";
|
|
1025
|
+
}
|
|
1026
|
+
return (_ctx, _cache) => {
|
|
1027
|
+
return openBlock(), createBlock(LfField, {
|
|
1028
|
+
label: __props.label,
|
|
1029
|
+
hint: __props.hint,
|
|
1030
|
+
error: __props.error,
|
|
1031
|
+
required: __props.required,
|
|
1032
|
+
"html-for": unref(inputId)
|
|
1033
|
+
}, {
|
|
1034
|
+
default: withCtx(() => [
|
|
1035
|
+
createElementVNode("div", _hoisted_1$j, [
|
|
1036
|
+
__props.icon || __props.iconPath ? (openBlock(), createElementBlock("span", _hoisted_2$i, [
|
|
1037
|
+
createVNode(LfIcon, {
|
|
1038
|
+
name: __props.icon,
|
|
1039
|
+
path: __props.iconPath,
|
|
1040
|
+
size: "1.125rem"
|
|
1041
|
+
}, null, 8, ["name", "path"])
|
|
1042
|
+
])) : createCommentVNode("", true),
|
|
1043
|
+
withDirectives(createElementVNode("input", mergeProps({ id: unref(inputId) }, _ctx.$attrs, {
|
|
1044
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
1045
|
+
class: ["lf-control", [
|
|
1046
|
+
{ "lf-control--sm": __props.size === "sm", "lf-control--error": !!__props.error },
|
|
1047
|
+
(__props.icon || __props.iconPath) && "lf-control--has-left",
|
|
1048
|
+
hasTrailing.value && "lf-control--has-right"
|
|
1049
|
+
]],
|
|
1050
|
+
type: revealed.value ? "text" : __props.type,
|
|
1051
|
+
placeholder: __props.placeholder,
|
|
1052
|
+
disabled: __props.disabled,
|
|
1053
|
+
readonly: __props.readonly,
|
|
1054
|
+
required: __props.required,
|
|
1055
|
+
"aria-invalid": __props.error ? "true" : void 0
|
|
1056
|
+
}), null, 16, _hoisted_3$d), [
|
|
1057
|
+
[vModelDynamic, model.value]
|
|
1058
|
+
]),
|
|
1059
|
+
__props.revealable ? (openBlock(), createElementBlock("button", {
|
|
1060
|
+
key: 1,
|
|
1061
|
+
type: "button",
|
|
1062
|
+
class: "lf-control-action",
|
|
1063
|
+
"aria-label": revealed.value ? "비밀번호 가리기" : "비밀번호 보기",
|
|
1064
|
+
onClick: _cache[1] || (_cache[1] = ($event) => revealed.value = !revealed.value)
|
|
1065
|
+
}, [
|
|
1066
|
+
createVNode(LfIcon, {
|
|
1067
|
+
name: revealed.value ? "visibility_off" : "visibility",
|
|
1068
|
+
size: "1.125rem"
|
|
1069
|
+
}, null, 8, ["name"])
|
|
1070
|
+
], 8, _hoisted_4$b)) : __props.clearable && !!model.value && !__props.disabled && !__props.readonly ? (openBlock(), createElementBlock("button", {
|
|
1071
|
+
key: 2,
|
|
1072
|
+
type: "button",
|
|
1073
|
+
class: "lf-control-action",
|
|
1074
|
+
"aria-label": "지우기",
|
|
1075
|
+
onClick: clear
|
|
1076
|
+
}, [
|
|
1077
|
+
createVNode(LfIcon, {
|
|
1078
|
+
name: "close",
|
|
1079
|
+
size: "1.125rem"
|
|
1080
|
+
})
|
|
1081
|
+
])) : createCommentVNode("", true)
|
|
1082
|
+
])
|
|
1083
|
+
]),
|
|
1084
|
+
_: 1
|
|
1085
|
+
}, 8, ["label", "hint", "error", "required", "html-for"]);
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
const LfTextField = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-e1ad8511"]]);
|
|
1090
|
+
const _hoisted_1$i = ["id", "rows", "placeholder", "disabled", "readonly", "required", "maxlength", "aria-invalid"];
|
|
1091
|
+
const _hoisted_2$h = {
|
|
1092
|
+
key: 0,
|
|
1093
|
+
class: "lf-textarea__counter"
|
|
1094
|
+
};
|
|
1095
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
1096
|
+
...{ inheritAttrs: false },
|
|
1097
|
+
__name: "LfTextarea",
|
|
1098
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1099
|
+
label: {},
|
|
1100
|
+
hint: {},
|
|
1101
|
+
error: {},
|
|
1102
|
+
required: { type: Boolean },
|
|
1103
|
+
placeholder: {},
|
|
1104
|
+
disabled: { type: Boolean },
|
|
1105
|
+
readonly: { type: Boolean },
|
|
1106
|
+
rows: { default: 4 },
|
|
1107
|
+
size: { default: "md" },
|
|
1108
|
+
maxlength: {},
|
|
1109
|
+
counter: { type: Boolean },
|
|
1110
|
+
resize: { type: Boolean, default: true },
|
|
1111
|
+
autoGrow: { type: Boolean }
|
|
1112
|
+
}, {
|
|
1113
|
+
"modelValue": { default: "" },
|
|
1114
|
+
"modelModifiers": {}
|
|
1115
|
+
}),
|
|
1116
|
+
emits: ["update:modelValue"],
|
|
1117
|
+
setup(__props) {
|
|
1118
|
+
const props = __props;
|
|
1119
|
+
const model = useModel(__props, "modelValue");
|
|
1120
|
+
const inputId = useId();
|
|
1121
|
+
const el = useTemplateRef("el");
|
|
1122
|
+
function grow() {
|
|
1123
|
+
const node = el.value;
|
|
1124
|
+
if (!node) return;
|
|
1125
|
+
node.style.height = "auto";
|
|
1126
|
+
node.style.height = `${node.scrollHeight}px`;
|
|
1127
|
+
}
|
|
1128
|
+
onMounted(() => {
|
|
1129
|
+
if (props.autoGrow) grow();
|
|
1130
|
+
});
|
|
1131
|
+
watch(model, () => {
|
|
1132
|
+
if (props.autoGrow) void nextTick(grow);
|
|
1133
|
+
});
|
|
1134
|
+
return (_ctx, _cache) => {
|
|
1135
|
+
return openBlock(), createBlock(LfField, {
|
|
1136
|
+
label: __props.label,
|
|
1137
|
+
hint: __props.hint,
|
|
1138
|
+
error: __props.error,
|
|
1139
|
+
required: __props.required,
|
|
1140
|
+
"html-for": unref(inputId)
|
|
1141
|
+
}, {
|
|
1142
|
+
default: withCtx(() => [
|
|
1143
|
+
withDirectives(createElementVNode("textarea", mergeProps({
|
|
1144
|
+
id: unref(inputId),
|
|
1145
|
+
ref_key: "el",
|
|
1146
|
+
ref: el
|
|
1147
|
+
}, _ctx.$attrs, {
|
|
1148
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
1149
|
+
class: ["lf-control lf-textarea", { "lf-control--sm": __props.size === "sm", "lf-control--error": !!__props.error, "lf-textarea--fixed": !__props.resize }],
|
|
1150
|
+
rows: __props.rows,
|
|
1151
|
+
placeholder: __props.placeholder,
|
|
1152
|
+
disabled: __props.disabled,
|
|
1153
|
+
readonly: __props.readonly,
|
|
1154
|
+
required: __props.required,
|
|
1155
|
+
maxlength: __props.maxlength,
|
|
1156
|
+
"aria-invalid": __props.error ? "true" : void 0,
|
|
1157
|
+
onInput: _cache[1] || (_cache[1] = ($event) => __props.autoGrow && grow())
|
|
1158
|
+
}), null, 16, _hoisted_1$i), [
|
|
1159
|
+
[vModelText, model.value]
|
|
1160
|
+
]),
|
|
1161
|
+
__props.maxlength && __props.counter ? (openBlock(), createElementBlock("p", _hoisted_2$h, toDisplayString(String(model.value ?? "").length) + " / " + toDisplayString(__props.maxlength), 1)) : createCommentVNode("", true)
|
|
1162
|
+
]),
|
|
1163
|
+
_: 1
|
|
1164
|
+
}, 8, ["label", "hint", "error", "required", "html-for"]);
|
|
1165
|
+
};
|
|
1166
|
+
}
|
|
1167
|
+
});
|
|
1168
|
+
const LfTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-96f0aac7"]]);
|
|
1169
|
+
const _hoisted_1$h = { class: "lf-control-wrap" };
|
|
1170
|
+
const _hoisted_2$g = ["id", "disabled", "required", "aria-invalid"];
|
|
1171
|
+
const _hoisted_3$c = ["disabled"];
|
|
1172
|
+
const _hoisted_4$a = ["value", "disabled"];
|
|
1173
|
+
const _hoisted_5$9 = { class: "lf-control-wrap__icon lf-control-wrap__icon--right" };
|
|
1174
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
1175
|
+
...{ inheritAttrs: false },
|
|
1176
|
+
__name: "LfSelect",
|
|
1177
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1178
|
+
options: { default: () => [] },
|
|
1179
|
+
label: {},
|
|
1180
|
+
hint: {},
|
|
1181
|
+
error: {},
|
|
1182
|
+
required: { type: Boolean },
|
|
1183
|
+
placeholder: {},
|
|
1184
|
+
clearable: { type: Boolean },
|
|
1185
|
+
disabled: { type: Boolean },
|
|
1186
|
+
size: { default: "md" }
|
|
1187
|
+
}, {
|
|
1188
|
+
"modelValue": { default: "" },
|
|
1189
|
+
"modelModifiers": {}
|
|
1190
|
+
}),
|
|
1191
|
+
emits: ["update:modelValue"],
|
|
1192
|
+
setup(__props) {
|
|
1193
|
+
const props = __props;
|
|
1194
|
+
const model = useModel(__props, "modelValue");
|
|
1195
|
+
const inputId = useId();
|
|
1196
|
+
const normalized = computed(
|
|
1197
|
+
() => props.options.map((o) => typeof o === "string" ? { value: o, label: o } : o)
|
|
1198
|
+
);
|
|
1199
|
+
return (_ctx, _cache) => {
|
|
1200
|
+
return openBlock(), createBlock(LfField, {
|
|
1201
|
+
label: __props.label,
|
|
1202
|
+
hint: __props.hint,
|
|
1203
|
+
error: __props.error,
|
|
1204
|
+
required: __props.required,
|
|
1205
|
+
"html-for": unref(inputId)
|
|
1206
|
+
}, {
|
|
1207
|
+
default: withCtx(() => [
|
|
1208
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
1209
|
+
withDirectives(createElementVNode("select", mergeProps({ id: unref(inputId) }, _ctx.$attrs, {
|
|
1210
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
1211
|
+
class: ["lf-control lf-select lf-control--has-right", { "lf-control--sm": __props.size === "sm", "lf-control--error": !!__props.error }],
|
|
1212
|
+
disabled: __props.disabled,
|
|
1213
|
+
required: __props.required,
|
|
1214
|
+
"aria-invalid": __props.error ? "true" : void 0
|
|
1215
|
+
}), [
|
|
1216
|
+
__props.placeholder ? (openBlock(), createElementBlock("option", {
|
|
1217
|
+
key: 0,
|
|
1218
|
+
value: "",
|
|
1219
|
+
disabled: !__props.clearable
|
|
1220
|
+
}, toDisplayString(__props.placeholder), 9, _hoisted_3$c)) : createCommentVNode("", true),
|
|
1221
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(normalized.value, (opt) => {
|
|
1222
|
+
return openBlock(), createElementBlock("option", {
|
|
1223
|
+
key: String(opt.value),
|
|
1224
|
+
value: opt.value,
|
|
1225
|
+
disabled: opt.disabled
|
|
1226
|
+
}, toDisplayString(opt.label), 9, _hoisted_4$a);
|
|
1227
|
+
}), 128))
|
|
1228
|
+
], 16, _hoisted_2$g), [
|
|
1229
|
+
[vModelSelect, model.value]
|
|
1230
|
+
]),
|
|
1231
|
+
createElementVNode("span", _hoisted_5$9, [
|
|
1232
|
+
createVNode(LfIcon, {
|
|
1233
|
+
name: "expand_more",
|
|
1234
|
+
size: "1.125rem"
|
|
1235
|
+
})
|
|
1236
|
+
])
|
|
1237
|
+
])
|
|
1238
|
+
]),
|
|
1239
|
+
_: 1
|
|
1240
|
+
}, 8, ["label", "hint", "error", "required", "html-for"]);
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
});
|
|
1244
|
+
const LfSelect = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-78276920"]]);
|
|
1245
|
+
const _hoisted_1$g = ["disabled", "value"];
|
|
1246
|
+
const _hoisted_2$f = {
|
|
1247
|
+
class: "lf-check__box",
|
|
1248
|
+
"aria-hidden": "true"
|
|
1249
|
+
};
|
|
1250
|
+
const _hoisted_3$b = {
|
|
1251
|
+
key: 0,
|
|
1252
|
+
class: "lf-check__text"
|
|
1253
|
+
};
|
|
1254
|
+
const _hoisted_4$9 = { class: "lf-check__label" };
|
|
1255
|
+
const _hoisted_5$8 = {
|
|
1256
|
+
key: 0,
|
|
1257
|
+
class: "lf-check__desc"
|
|
1258
|
+
};
|
|
1259
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
1260
|
+
...{ inheritAttrs: false },
|
|
1261
|
+
__name: "LfCheckbox",
|
|
1262
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1263
|
+
label: {},
|
|
1264
|
+
description: {},
|
|
1265
|
+
disabled: { type: Boolean },
|
|
1266
|
+
value: {}
|
|
1267
|
+
}, {
|
|
1268
|
+
"modelValue": { type: [Boolean, Array], ...{ default: false } },
|
|
1269
|
+
"modelModifiers": {}
|
|
1270
|
+
}),
|
|
1271
|
+
emits: ["update:modelValue"],
|
|
1272
|
+
setup(__props) {
|
|
1273
|
+
const model = useModel(__props, "modelValue");
|
|
1274
|
+
return (_ctx, _cache) => {
|
|
1275
|
+
return openBlock(), createElementBlock("label", {
|
|
1276
|
+
class: normalizeClass(["lf-check", { "lf-check--disabled": __props.disabled }])
|
|
1277
|
+
}, [
|
|
1278
|
+
withDirectives(createElementVNode("input", mergeProps(_ctx.$attrs, {
|
|
1279
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
1280
|
+
class: "lf-check__input",
|
|
1281
|
+
type: "checkbox",
|
|
1282
|
+
disabled: __props.disabled,
|
|
1283
|
+
value: __props.value
|
|
1284
|
+
}), null, 16, _hoisted_1$g), [
|
|
1285
|
+
[vModelCheckbox, model.value]
|
|
1286
|
+
]),
|
|
1287
|
+
createElementVNode("span", _hoisted_2$f, [
|
|
1288
|
+
createVNode(LfIcon, {
|
|
1289
|
+
name: "check",
|
|
1290
|
+
size: "0.875rem"
|
|
1291
|
+
})
|
|
1292
|
+
]),
|
|
1293
|
+
__props.label || __props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$b, [
|
|
1294
|
+
createElementVNode("span", _hoisted_4$9, [
|
|
1295
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1296
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
1297
|
+
], true)
|
|
1298
|
+
]),
|
|
1299
|
+
__props.description ? (openBlock(), createElementBlock("span", _hoisted_5$8, toDisplayString(__props.description), 1)) : createCommentVNode("", true)
|
|
1300
|
+
])) : createCommentVNode("", true)
|
|
1301
|
+
], 2);
|
|
1302
|
+
};
|
|
1303
|
+
}
|
|
1304
|
+
});
|
|
1305
|
+
const LfCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-a43c00ef"]]);
|
|
1306
|
+
const _hoisted_1$f = {
|
|
1307
|
+
key: 0,
|
|
1308
|
+
class: "lf-switch__text"
|
|
1309
|
+
};
|
|
1310
|
+
const _hoisted_2$e = { class: "lf-switch__label" };
|
|
1311
|
+
const _hoisted_3$a = {
|
|
1312
|
+
key: 0,
|
|
1313
|
+
class: "lf-switch__desc"
|
|
1314
|
+
};
|
|
1315
|
+
const _hoisted_4$8 = ["disabled"];
|
|
1316
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
1317
|
+
...{ inheritAttrs: false },
|
|
1318
|
+
__name: "LfSwitch",
|
|
1319
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1320
|
+
label: {},
|
|
1321
|
+
description: {},
|
|
1322
|
+
disabled: { type: Boolean },
|
|
1323
|
+
row: { type: Boolean }
|
|
1324
|
+
}, {
|
|
1325
|
+
"modelValue": { type: Boolean, ...{ default: false } },
|
|
1326
|
+
"modelModifiers": {}
|
|
1327
|
+
}),
|
|
1328
|
+
emits: ["update:modelValue"],
|
|
1329
|
+
setup(__props) {
|
|
1330
|
+
const model = useModel(__props, "modelValue");
|
|
1331
|
+
return (_ctx, _cache) => {
|
|
1332
|
+
return openBlock(), createElementBlock("label", {
|
|
1333
|
+
class: normalizeClass(["lf-switch", { "lf-switch--row": __props.row, "lf-switch--disabled": __props.disabled }])
|
|
1334
|
+
}, [
|
|
1335
|
+
__props.label || __props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_1$f, [
|
|
1336
|
+
createElementVNode("span", _hoisted_2$e, [
|
|
1337
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1338
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
1339
|
+
], true)
|
|
1340
|
+
]),
|
|
1341
|
+
__props.description ? (openBlock(), createElementBlock("span", _hoisted_3$a, toDisplayString(__props.description), 1)) : createCommentVNode("", true)
|
|
1342
|
+
])) : createCommentVNode("", true),
|
|
1343
|
+
withDirectives(createElementVNode("input", mergeProps(_ctx.$attrs, {
|
|
1344
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
1345
|
+
class: "lf-switch__input",
|
|
1346
|
+
type: "checkbox",
|
|
1347
|
+
role: "switch",
|
|
1348
|
+
disabled: __props.disabled
|
|
1349
|
+
}), null, 16, _hoisted_4$8), [
|
|
1350
|
+
[vModelCheckbox, model.value]
|
|
1351
|
+
]),
|
|
1352
|
+
_cache[1] || (_cache[1] = createElementVNode("span", {
|
|
1353
|
+
class: "lf-switch__track",
|
|
1354
|
+
"aria-hidden": "true"
|
|
1355
|
+
}, [
|
|
1356
|
+
createElementVNode("span", { class: "lf-switch__thumb" })
|
|
1357
|
+
], -1))
|
|
1358
|
+
], 2);
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1361
|
+
});
|
|
1362
|
+
const LfSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-43535c0f"]]);
|
|
1363
|
+
const _hoisted_1$e = {
|
|
1364
|
+
key: 0,
|
|
1365
|
+
class: "lf-radio-group__legend"
|
|
1366
|
+
};
|
|
1367
|
+
const _hoisted_2$d = {
|
|
1368
|
+
key: 0,
|
|
1369
|
+
class: "lf-radio-group__required",
|
|
1370
|
+
"aria-hidden": "true"
|
|
1371
|
+
};
|
|
1372
|
+
const _hoisted_3$9 = ["name", "value", "disabled"];
|
|
1373
|
+
const _hoisted_4$7 = { class: "lf-radio__text" };
|
|
1374
|
+
const _hoisted_5$7 = { class: "lf-radio__label" };
|
|
1375
|
+
const _hoisted_6$6 = {
|
|
1376
|
+
key: 0,
|
|
1377
|
+
class: "lf-radio__desc"
|
|
1378
|
+
};
|
|
1379
|
+
const _hoisted_7$3 = {
|
|
1380
|
+
key: 1,
|
|
1381
|
+
class: "lf-radio-group__error",
|
|
1382
|
+
role: "alert"
|
|
1383
|
+
};
|
|
1384
|
+
const _hoisted_8 = {
|
|
1385
|
+
key: 2,
|
|
1386
|
+
class: "lf-radio-group__hint"
|
|
1387
|
+
};
|
|
1388
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
1389
|
+
__name: "LfRadioGroup",
|
|
1390
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1391
|
+
options: { default: () => [] },
|
|
1392
|
+
label: {},
|
|
1393
|
+
hint: {},
|
|
1394
|
+
error: {},
|
|
1395
|
+
required: { type: Boolean },
|
|
1396
|
+
disabled: { type: Boolean },
|
|
1397
|
+
inline: { type: Boolean }
|
|
1398
|
+
}, {
|
|
1399
|
+
"modelValue": {},
|
|
1400
|
+
"modelModifiers": {}
|
|
1401
|
+
}),
|
|
1402
|
+
emits: ["update:modelValue"],
|
|
1403
|
+
setup(__props) {
|
|
1404
|
+
const props = __props;
|
|
1405
|
+
const model = useModel(__props, "modelValue");
|
|
1406
|
+
const groupName = useId();
|
|
1407
|
+
const normalized = computed(
|
|
1408
|
+
() => props.options.map((o) => typeof o === "string" ? { value: o, label: o } : o)
|
|
1409
|
+
);
|
|
1410
|
+
return (_ctx, _cache) => {
|
|
1411
|
+
return openBlock(), createElementBlock("fieldset", {
|
|
1412
|
+
class: normalizeClass(["lf-radio-group", { "lf-radio-group--inline": __props.inline }])
|
|
1413
|
+
}, [
|
|
1414
|
+
__props.label ? (openBlock(), createElementBlock("legend", _hoisted_1$e, [
|
|
1415
|
+
createTextVNode(toDisplayString(__props.label) + " ", 1),
|
|
1416
|
+
__props.required ? (openBlock(), createElementBlock("span", _hoisted_2$d, "*")) : createCommentVNode("", true)
|
|
1417
|
+
])) : createCommentVNode("", true),
|
|
1418
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(normalized.value, (opt) => {
|
|
1419
|
+
return openBlock(), createElementBlock("label", {
|
|
1420
|
+
key: String(opt.value),
|
|
1421
|
+
class: normalizeClass(["lf-radio", { "lf-radio--disabled": __props.disabled || opt.disabled }])
|
|
1422
|
+
}, [
|
|
1423
|
+
withDirectives(createElementVNode("input", {
|
|
1424
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
1425
|
+
class: "lf-radio__input",
|
|
1426
|
+
type: "radio",
|
|
1427
|
+
name: unref(groupName),
|
|
1428
|
+
value: opt.value,
|
|
1429
|
+
disabled: __props.disabled || opt.disabled
|
|
1430
|
+
}, null, 8, _hoisted_3$9), [
|
|
1431
|
+
[vModelRadio, model.value]
|
|
1432
|
+
]),
|
|
1433
|
+
_cache[1] || (_cache[1] = createElementVNode("span", {
|
|
1434
|
+
class: "lf-radio__dot",
|
|
1435
|
+
"aria-hidden": "true"
|
|
1436
|
+
}, null, -1)),
|
|
1437
|
+
createElementVNode("span", _hoisted_4$7, [
|
|
1438
|
+
createElementVNode("span", _hoisted_5$7, toDisplayString(opt.label), 1),
|
|
1439
|
+
opt.description ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(opt.description), 1)) : createCommentVNode("", true)
|
|
1440
|
+
])
|
|
1441
|
+
], 2);
|
|
1442
|
+
}), 128)),
|
|
1443
|
+
__props.error ? (openBlock(), createElementBlock("p", _hoisted_7$3, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", _hoisted_8, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
1444
|
+
], 2);
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
});
|
|
1448
|
+
const LfRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-39f8b8f2"]]);
|
|
1449
|
+
const _hoisted_1$d = ["aria-labelledby", "aria-label"];
|
|
1450
|
+
const _hoisted_2$c = {
|
|
1451
|
+
key: 0,
|
|
1452
|
+
class: "lf-modal__header"
|
|
1453
|
+
};
|
|
1454
|
+
const _hoisted_3$8 = { class: "lf-modal__heading" };
|
|
1455
|
+
const _hoisted_4$6 = ["id"];
|
|
1456
|
+
const _hoisted_5$6 = {
|
|
1457
|
+
key: 0,
|
|
1458
|
+
class: "lf-modal__subtitle"
|
|
1459
|
+
};
|
|
1460
|
+
const _hoisted_6$5 = { class: "lf-modal__body" };
|
|
1461
|
+
const _hoisted_7$2 = {
|
|
1462
|
+
key: 1,
|
|
1463
|
+
class: "lf-modal__footer"
|
|
1464
|
+
};
|
|
1465
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
1466
|
+
__name: "LfModal",
|
|
1467
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1468
|
+
title: {},
|
|
1469
|
+
subtitle: {},
|
|
1470
|
+
size: { default: "md" },
|
|
1471
|
+
fullHeight: { type: Boolean },
|
|
1472
|
+
persistent: { type: Boolean },
|
|
1473
|
+
closable: { type: Boolean, default: true },
|
|
1474
|
+
closeLabel: { default: "닫기" },
|
|
1475
|
+
ariaLabel: {}
|
|
1476
|
+
}, {
|
|
1477
|
+
"modelValue": { type: Boolean, ...{ default: false } },
|
|
1478
|
+
"modelModifiers": {}
|
|
1479
|
+
}),
|
|
1480
|
+
emits: /* @__PURE__ */ mergeModels(["close"], ["update:modelValue"]),
|
|
1481
|
+
setup(__props, { emit: __emit }) {
|
|
1482
|
+
const props = __props;
|
|
1483
|
+
const model = useModel(__props, "modelValue");
|
|
1484
|
+
const emit = __emit;
|
|
1485
|
+
const titleId = useId();
|
|
1486
|
+
const panel = useTemplateRef("panel");
|
|
1487
|
+
let lastFocused = null;
|
|
1488
|
+
function close(reason) {
|
|
1489
|
+
model.value = false;
|
|
1490
|
+
emit("close", reason);
|
|
1491
|
+
}
|
|
1492
|
+
let downOnScrim = false;
|
|
1493
|
+
function onScrimDown() {
|
|
1494
|
+
downOnScrim = true;
|
|
1495
|
+
}
|
|
1496
|
+
function onScrimClick() {
|
|
1497
|
+
if (!downOnScrim) return;
|
|
1498
|
+
downOnScrim = false;
|
|
1499
|
+
if (!props.persistent) close("scrim");
|
|
1500
|
+
}
|
|
1501
|
+
function onKeydown(e2) {
|
|
1502
|
+
if (e2.key === "Escape" && !props.persistent) {
|
|
1503
|
+
e2.stopPropagation();
|
|
1504
|
+
close("esc");
|
|
1505
|
+
return;
|
|
1506
|
+
}
|
|
1507
|
+
if (e2.key !== "Tab" || !panel.value) return;
|
|
1508
|
+
const focusables = panel.value.querySelectorAll(
|
|
1509
|
+
'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
1510
|
+
);
|
|
1511
|
+
if (focusables.length === 0) return;
|
|
1512
|
+
const first = focusables[0];
|
|
1513
|
+
const last = focusables[focusables.length - 1];
|
|
1514
|
+
const active = document.activeElement;
|
|
1515
|
+
if (e2.shiftKey && (active === first || active === panel.value)) {
|
|
1516
|
+
e2.preventDefault();
|
|
1517
|
+
last.focus();
|
|
1518
|
+
} else if (!e2.shiftKey && active === last) {
|
|
1519
|
+
e2.preventDefault();
|
|
1520
|
+
first.focus();
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
let locked = false;
|
|
1524
|
+
function lockScroll(on) {
|
|
1525
|
+
if (typeof document === "undefined") return;
|
|
1526
|
+
const root = document.documentElement;
|
|
1527
|
+
const depth = Number(root.dataset.lfModalDepth ?? "0") + (on ? 1 : -1);
|
|
1528
|
+
root.dataset.lfModalDepth = String(Math.max(0, depth));
|
|
1529
|
+
document.body.style.overflow = depth > 0 ? "hidden" : "";
|
|
1530
|
+
}
|
|
1531
|
+
watch(
|
|
1532
|
+
model,
|
|
1533
|
+
async (open) => {
|
|
1534
|
+
var _a, _b;
|
|
1535
|
+
if (open === locked) return;
|
|
1536
|
+
locked = open;
|
|
1537
|
+
lockScroll(open);
|
|
1538
|
+
if (open) {
|
|
1539
|
+
lastFocused = document.activeElement;
|
|
1540
|
+
await nextTick();
|
|
1541
|
+
(_a = panel.value) == null ? void 0 : _a.focus();
|
|
1542
|
+
} else {
|
|
1543
|
+
(_b = lastFocused == null ? void 0 : lastFocused.focus) == null ? void 0 : _b.call(lastFocused);
|
|
1544
|
+
lastFocused = null;
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
{ immediate: true }
|
|
1548
|
+
);
|
|
1549
|
+
onBeforeUnmount(() => {
|
|
1550
|
+
if (locked) {
|
|
1551
|
+
locked = false;
|
|
1552
|
+
lockScroll(false);
|
|
1553
|
+
}
|
|
1554
|
+
});
|
|
1555
|
+
return (_ctx, _cache) => {
|
|
1556
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
1557
|
+
createVNode(Transition, { name: "lf-modal" }, {
|
|
1558
|
+
default: withCtx(() => [
|
|
1559
|
+
model.value ? (openBlock(), createElementBlock("div", {
|
|
1560
|
+
key: 0,
|
|
1561
|
+
class: "lf-modal-scrim",
|
|
1562
|
+
onMousedown: withModifiers(onScrimDown, ["self"]),
|
|
1563
|
+
onClick: withModifiers(onScrimClick, ["self"])
|
|
1564
|
+
}, [
|
|
1565
|
+
createElementVNode("div", {
|
|
1566
|
+
ref_key: "panel",
|
|
1567
|
+
ref: panel,
|
|
1568
|
+
class: normalizeClass(["lf-modal", [`lf-modal--${__props.size}`, { "lf-modal--full": __props.fullHeight }]]),
|
|
1569
|
+
role: "dialog",
|
|
1570
|
+
"aria-modal": "true",
|
|
1571
|
+
tabindex: "-1",
|
|
1572
|
+
"aria-labelledby": __props.title ? unref(titleId) : void 0,
|
|
1573
|
+
"aria-label": __props.title ? void 0 : __props.ariaLabel,
|
|
1574
|
+
onKeydown
|
|
1575
|
+
}, [
|
|
1576
|
+
__props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("header", _hoisted_2$c, [
|
|
1577
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1578
|
+
createElementVNode("div", _hoisted_3$8, [
|
|
1579
|
+
createElementVNode("h2", {
|
|
1580
|
+
id: unref(titleId),
|
|
1581
|
+
class: "lf-modal__title"
|
|
1582
|
+
}, toDisplayString(__props.title), 9, _hoisted_4$6),
|
|
1583
|
+
__props.subtitle ? (openBlock(), createElementBlock("p", _hoisted_5$6, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true)
|
|
1584
|
+
])
|
|
1585
|
+
], true),
|
|
1586
|
+
__props.closable ? (openBlock(), createBlock(LfIconButton, {
|
|
1587
|
+
key: 0,
|
|
1588
|
+
class: "lf-modal__close",
|
|
1589
|
+
icon: "close",
|
|
1590
|
+
label: __props.closeLabel,
|
|
1591
|
+
onClick: _cache[0] || (_cache[0] = ($event) => close("close"))
|
|
1592
|
+
}, null, 8, ["label"])) : createCommentVNode("", true)
|
|
1593
|
+
])) : createCommentVNode("", true),
|
|
1594
|
+
createElementVNode("div", _hoisted_6$5, [
|
|
1595
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1596
|
+
]),
|
|
1597
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_7$2, [
|
|
1598
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1599
|
+
])) : createCommentVNode("", true)
|
|
1600
|
+
], 42, _hoisted_1$d)
|
|
1601
|
+
], 32)) : createCommentVNode("", true)
|
|
1602
|
+
]),
|
|
1603
|
+
_: 3
|
|
1604
|
+
})
|
|
1605
|
+
]);
|
|
1606
|
+
};
|
|
1607
|
+
}
|
|
1608
|
+
});
|
|
1609
|
+
const LfModal = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-e52c29ac"]]);
|
|
1610
|
+
const _hoisted_1$c = {
|
|
1611
|
+
key: 0,
|
|
1612
|
+
class: "lf-card__head"
|
|
1613
|
+
};
|
|
1614
|
+
const _hoisted_2$b = { class: "lf-card__title" };
|
|
1615
|
+
const _hoisted_3$7 = {
|
|
1616
|
+
key: 1,
|
|
1617
|
+
class: "lf-card__count"
|
|
1618
|
+
};
|
|
1619
|
+
const _hoisted_4$5 = {
|
|
1620
|
+
key: 0,
|
|
1621
|
+
class: "lf-card__actions"
|
|
1622
|
+
};
|
|
1623
|
+
const _hoisted_5$5 = { class: "lf-card__body" };
|
|
1624
|
+
const _hoisted_6$4 = {
|
|
1625
|
+
key: 1,
|
|
1626
|
+
class: "lf-card__foot"
|
|
1627
|
+
};
|
|
1628
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1629
|
+
__name: "LfCard",
|
|
1630
|
+
props: {
|
|
1631
|
+
title: {},
|
|
1632
|
+
icon: {},
|
|
1633
|
+
iconPath: {},
|
|
1634
|
+
count: {},
|
|
1635
|
+
glass: { type: Boolean },
|
|
1636
|
+
padding: { default: "md" },
|
|
1637
|
+
flush: { type: Boolean }
|
|
1638
|
+
},
|
|
1639
|
+
setup(__props) {
|
|
1640
|
+
return (_ctx, _cache) => {
|
|
1641
|
+
return openBlock(), createElementBlock("section", {
|
|
1642
|
+
class: normalizeClass(["lf-card", [{ "lf-card--glass": __props.glass }, `lf-card--pad-${__props.flush ? "none" : __props.padding}`]])
|
|
1643
|
+
}, [
|
|
1644
|
+
__props.title || _ctx.$slots.header || _ctx.$slots.actions ? (openBlock(), createElementBlock("header", _hoisted_1$c, [
|
|
1645
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1646
|
+
__props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
|
|
1647
|
+
key: 0,
|
|
1648
|
+
name: __props.icon,
|
|
1649
|
+
path: __props.iconPath,
|
|
1650
|
+
size: "1rem",
|
|
1651
|
+
class: "lf-card__icon"
|
|
1652
|
+
}, null, 8, ["name", "path"])) : createCommentVNode("", true),
|
|
1653
|
+
createElementVNode("h3", _hoisted_2$b, toDisplayString(__props.title), 1),
|
|
1654
|
+
__props.count !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_3$7, toDisplayString(__props.count), 1)) : createCommentVNode("", true)
|
|
1655
|
+
], true),
|
|
1656
|
+
_cache[0] || (_cache[0] = createElementVNode("span", { class: "lf-card__spacer" }, null, -1)),
|
|
1657
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
|
|
1658
|
+
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
1659
|
+
])) : createCommentVNode("", true)
|
|
1660
|
+
])) : createCommentVNode("", true),
|
|
1661
|
+
createElementVNode("div", _hoisted_5$5, [
|
|
1662
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1663
|
+
]),
|
|
1664
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_6$4, [
|
|
1665
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1666
|
+
])) : createCommentVNode("", true)
|
|
1667
|
+
], 2);
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
const LfCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-82f85c72"]]);
|
|
1672
|
+
const _hoisted_1$b = { class: "lf-page-header" };
|
|
1673
|
+
const _hoisted_2$a = { class: "lf-page-header__title-box" };
|
|
1674
|
+
const _hoisted_3$6 = { class: "lf-page-header__title" };
|
|
1675
|
+
const _hoisted_4$4 = {
|
|
1676
|
+
key: 0,
|
|
1677
|
+
class: "lf-page-header__count"
|
|
1678
|
+
};
|
|
1679
|
+
const _hoisted_5$4 = {
|
|
1680
|
+
key: 0,
|
|
1681
|
+
class: "lf-page-header__tools"
|
|
1682
|
+
};
|
|
1683
|
+
const _hoisted_6$3 = {
|
|
1684
|
+
key: 1,
|
|
1685
|
+
class: "lf-page-header__desc"
|
|
1686
|
+
};
|
|
1687
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1688
|
+
__name: "LfPageHeader",
|
|
1689
|
+
props: {
|
|
1690
|
+
title: {},
|
|
1691
|
+
description: {},
|
|
1692
|
+
icon: {},
|
|
1693
|
+
iconPath: {},
|
|
1694
|
+
count: {}
|
|
1695
|
+
},
|
|
1696
|
+
setup(__props) {
|
|
1697
|
+
const slots = useSlots();
|
|
1698
|
+
const hasTools = computed(() => !!slots.filters || !!slots.actions);
|
|
1699
|
+
return (_ctx, _cache) => {
|
|
1700
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
1701
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
1702
|
+
createElementVNode("h1", _hoisted_3$6, [
|
|
1703
|
+
__props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
|
|
1704
|
+
key: 0,
|
|
1705
|
+
name: __props.icon,
|
|
1706
|
+
path: __props.iconPath,
|
|
1707
|
+
size: "1.375rem",
|
|
1708
|
+
class: "lf-page-header__icon"
|
|
1709
|
+
}, null, 8, ["name", "path"])) : createCommentVNode("", true),
|
|
1710
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
1711
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
1712
|
+
], true)
|
|
1713
|
+
]),
|
|
1714
|
+
__props.count !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(__props.count), 1)) : createCommentVNode("", true)
|
|
1715
|
+
]),
|
|
1716
|
+
hasTools.value ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
|
|
1717
|
+
renderSlot(_ctx.$slots, "filters", {}, void 0, true),
|
|
1718
|
+
_cache[0] || (_cache[0] = createElementVNode("span", { class: "lf-page-header__spacer" }, null, -1)),
|
|
1719
|
+
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
1720
|
+
])) : createCommentVNode("", true),
|
|
1721
|
+
__props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("p", _hoisted_6$3, [
|
|
1722
|
+
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
1723
|
+
createTextVNode(toDisplayString(__props.description), 1)
|
|
1724
|
+
], true)
|
|
1725
|
+
])) : createCommentVNode("", true)
|
|
1726
|
+
]);
|
|
1727
|
+
};
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
const LfPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-fb293ea0"]]);
|
|
1731
|
+
const _hoisted_1$a = {
|
|
1732
|
+
key: 0,
|
|
1733
|
+
class: "lf-badge__dot",
|
|
1734
|
+
"aria-hidden": "true"
|
|
1735
|
+
};
|
|
1736
|
+
const _hoisted_2$9 = ["aria-label"];
|
|
1737
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1738
|
+
__name: "LfBadge",
|
|
1739
|
+
props: {
|
|
1740
|
+
label: {},
|
|
1741
|
+
tone: { default: "neutral" },
|
|
1742
|
+
variant: { default: "soft" },
|
|
1743
|
+
size: { default: "md" },
|
|
1744
|
+
icon: {},
|
|
1745
|
+
iconPath: {},
|
|
1746
|
+
dot: { type: Boolean },
|
|
1747
|
+
removable: { type: Boolean },
|
|
1748
|
+
removeLabel: { default: "제거" }
|
|
1749
|
+
},
|
|
1750
|
+
emits: ["remove"],
|
|
1751
|
+
setup(__props, { emit: __emit }) {
|
|
1752
|
+
const emit = __emit;
|
|
1753
|
+
return (_ctx, _cache) => {
|
|
1754
|
+
return openBlock(), createElementBlock("span", {
|
|
1755
|
+
class: normalizeClass(["lf-badge", [`lf-badge--${__props.tone}`, `lf-badge--${__props.variant}`, { "lf-badge--sm": __props.size === "sm" }]])
|
|
1756
|
+
}, [
|
|
1757
|
+
__props.dot ? (openBlock(), createElementBlock("span", _hoisted_1$a)) : __props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
|
|
1758
|
+
key: 1,
|
|
1759
|
+
name: __props.icon,
|
|
1760
|
+
path: __props.iconPath,
|
|
1761
|
+
size: "0.875rem"
|
|
1762
|
+
}, null, 8, ["name", "path"])) : createCommentVNode("", true),
|
|
1763
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1764
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
1765
|
+
], true),
|
|
1766
|
+
__props.removable ? (openBlock(), createElementBlock("button", {
|
|
1767
|
+
key: 2,
|
|
1768
|
+
type: "button",
|
|
1769
|
+
class: "lf-badge__remove",
|
|
1770
|
+
"aria-label": __props.removeLabel,
|
|
1771
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("remove"))
|
|
1772
|
+
}, [
|
|
1773
|
+
createVNode(LfIcon, {
|
|
1774
|
+
name: "close",
|
|
1775
|
+
size: "0.75rem"
|
|
1776
|
+
})
|
|
1777
|
+
], 8, _hoisted_2$9)) : createCommentVNode("", true)
|
|
1778
|
+
], 2);
|
|
1779
|
+
};
|
|
1780
|
+
}
|
|
1781
|
+
});
|
|
1782
|
+
const LfBadge = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-ced4b85a"]]);
|
|
1783
|
+
const _hoisted_1$9 = ["role"];
|
|
1784
|
+
const _hoisted_2$8 = {
|
|
1785
|
+
class: "lf-alert__badge",
|
|
1786
|
+
"aria-hidden": "true"
|
|
1787
|
+
};
|
|
1788
|
+
const _hoisted_3$5 = { class: "lf-alert__body" };
|
|
1789
|
+
const _hoisted_4$3 = {
|
|
1790
|
+
key: 0,
|
|
1791
|
+
class: "lf-alert__title"
|
|
1792
|
+
};
|
|
1793
|
+
const _hoisted_5$3 = {
|
|
1794
|
+
key: 2,
|
|
1795
|
+
class: "lf-alert__actions"
|
|
1796
|
+
};
|
|
1797
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
1798
|
+
__name: "LfAlert",
|
|
1799
|
+
props: {
|
|
1800
|
+
tone: { default: "info" },
|
|
1801
|
+
title: {},
|
|
1802
|
+
message: {},
|
|
1803
|
+
icon: {},
|
|
1804
|
+
iconPath: {},
|
|
1805
|
+
closable: { type: Boolean },
|
|
1806
|
+
closeLabel: { default: "닫기" },
|
|
1807
|
+
dense: { type: Boolean }
|
|
1808
|
+
},
|
|
1809
|
+
emits: ["close"],
|
|
1810
|
+
setup(__props, { emit: __emit }) {
|
|
1811
|
+
const emit = __emit;
|
|
1812
|
+
const TONE_ICON = {
|
|
1813
|
+
info: "info",
|
|
1814
|
+
success: "check_circle",
|
|
1815
|
+
warning: "warning",
|
|
1816
|
+
error: "error"
|
|
1817
|
+
};
|
|
1818
|
+
return (_ctx, _cache) => {
|
|
1819
|
+
return openBlock(), createElementBlock("div", {
|
|
1820
|
+
class: normalizeClass(["lf-alert", [`lf-alert--${__props.tone}`, { "lf-alert--dense": __props.dense }]]),
|
|
1821
|
+
role: __props.tone === "error" ? "alert" : "status"
|
|
1822
|
+
}, [
|
|
1823
|
+
createElementVNode("span", _hoisted_2$8, [
|
|
1824
|
+
createVNode(LfIcon, {
|
|
1825
|
+
name: __props.icon ?? TONE_ICON[__props.tone],
|
|
1826
|
+
path: __props.iconPath,
|
|
1827
|
+
size: __props.dense ? "0.9375rem" : "1.0625rem"
|
|
1828
|
+
}, null, 8, ["name", "path", "size"])
|
|
1829
|
+
]),
|
|
1830
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
1831
|
+
__props.title ? (openBlock(), createElementBlock("p", _hoisted_4$3, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
1832
|
+
__props.message || _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
1833
|
+
key: 1,
|
|
1834
|
+
class: normalizeClass(["lf-alert__text", { "lf-alert__text--titled": __props.title }])
|
|
1835
|
+
}, [
|
|
1836
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1837
|
+
createTextVNode(toDisplayString(__props.message), 1)
|
|
1838
|
+
], true)
|
|
1839
|
+
], 2)) : createCommentVNode("", true),
|
|
1840
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
|
|
1841
|
+
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
1842
|
+
])) : createCommentVNode("", true)
|
|
1843
|
+
]),
|
|
1844
|
+
__props.closable ? (openBlock(), createBlock(LfIconButton, {
|
|
1845
|
+
key: 0,
|
|
1846
|
+
class: "lf-alert__close",
|
|
1847
|
+
icon: "close",
|
|
1848
|
+
size: "sm",
|
|
1849
|
+
label: __props.closeLabel,
|
|
1850
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
1851
|
+
}, null, 8, ["label"])) : createCommentVNode("", true)
|
|
1852
|
+
], 10, _hoisted_1$9);
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1855
|
+
});
|
|
1856
|
+
const LfAlert = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-99c3bfc9"]]);
|
|
1857
|
+
const _hoisted_1$8 = ["title"];
|
|
1858
|
+
const _hoisted_2$7 = ["src", "alt"];
|
|
1859
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
1860
|
+
__name: "LfAvatar",
|
|
1861
|
+
props: {
|
|
1862
|
+
name: {},
|
|
1863
|
+
src: {},
|
|
1864
|
+
size: { default: "2rem" }
|
|
1865
|
+
},
|
|
1866
|
+
setup(__props) {
|
|
1867
|
+
const props = __props;
|
|
1868
|
+
const errored = ref(false);
|
|
1869
|
+
watch(() => props.src, () => errored.value = false);
|
|
1870
|
+
const showImage = computed(() => !!props.src && !errored.value);
|
|
1871
|
+
const initial = computed(() => {
|
|
1872
|
+
var _a, _b;
|
|
1873
|
+
return (((_b = (_a = props.name) == null ? void 0 : _a.trim()) == null ? void 0 : _b[0]) ?? "?").toUpperCase();
|
|
1874
|
+
});
|
|
1875
|
+
const px = computed(() => typeof props.size === "number" ? `${props.size}px` : props.size);
|
|
1876
|
+
const tone = computed(() => {
|
|
1877
|
+
const name = props.name ?? "";
|
|
1878
|
+
let hash = 0;
|
|
1879
|
+
for (let i2 = 0; i2 < name.length; i2++) hash = hash * 31 + name.charCodeAt(i2) | 0;
|
|
1880
|
+
return Math.abs(hash) % 7;
|
|
1881
|
+
});
|
|
1882
|
+
return (_ctx, _cache) => {
|
|
1883
|
+
return openBlock(), createElementBlock("span", {
|
|
1884
|
+
class: normalizeClass(["lf-avatar", `lf-avatar--tone-${tone.value}`]),
|
|
1885
|
+
style: normalizeStyle({ width: px.value, height: px.value, fontSize: `calc(${px.value} * 0.42)` }),
|
|
1886
|
+
title: __props.name || void 0
|
|
1887
|
+
}, [
|
|
1888
|
+
showImage.value ? (openBlock(), createElementBlock("img", {
|
|
1889
|
+
key: 0,
|
|
1890
|
+
class: "lf-avatar__img",
|
|
1891
|
+
src: __props.src,
|
|
1892
|
+
alt: __props.name ?? "",
|
|
1893
|
+
onError: _cache[0] || (_cache[0] = ($event) => errored.value = true)
|
|
1894
|
+
}, null, 40, _hoisted_2$7)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1895
|
+
createTextVNode(toDisplayString(initial.value), 1)
|
|
1896
|
+
], 64))
|
|
1897
|
+
], 14, _hoisted_1$8);
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
});
|
|
1901
|
+
const LfAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-61adf36e"]]);
|
|
1902
|
+
const _hoisted_1$7 = { class: "lf-table-wrap" };
|
|
1903
|
+
const _hoisted_2$6 = ["aria-sort"];
|
|
1904
|
+
const _hoisted_3$4 = ["onClick"];
|
|
1905
|
+
const _hoisted_4$2 = { key: 1 };
|
|
1906
|
+
const _hoisted_5$2 = ["colspan"];
|
|
1907
|
+
const _hoisted_6$2 = ["tabindex", "onClick", "onKeydown"];
|
|
1908
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1909
|
+
__name: "LfTable",
|
|
1910
|
+
props: {
|
|
1911
|
+
columns: {},
|
|
1912
|
+
rows: { default: () => [] },
|
|
1913
|
+
rowKey: {},
|
|
1914
|
+
loading: { type: Boolean },
|
|
1915
|
+
skeletonRows: { default: 5 },
|
|
1916
|
+
emptyText: { default: "표시할 내용이 없습니다." },
|
|
1917
|
+
clickable: { type: Boolean },
|
|
1918
|
+
compact: { type: Boolean },
|
|
1919
|
+
minWidth: {},
|
|
1920
|
+
sort: {}
|
|
1921
|
+
},
|
|
1922
|
+
emits: ["rowClick", "update:sort"],
|
|
1923
|
+
setup(__props, { emit: __emit }) {
|
|
1924
|
+
const props = __props;
|
|
1925
|
+
const emit = __emit;
|
|
1926
|
+
function keyOf(row, i2) {
|
|
1927
|
+
return props.rowKey ? String(row[props.rowKey] ?? i2) : i2;
|
|
1928
|
+
}
|
|
1929
|
+
function toggleSort(key) {
|
|
1930
|
+
var _a;
|
|
1931
|
+
const order = ((_a = props.sort) == null ? void 0 : _a.key) === key && props.sort.order === "asc" ? "desc" : "asc";
|
|
1932
|
+
emit("update:sort", { key, order });
|
|
1933
|
+
}
|
|
1934
|
+
function ariaSort(key) {
|
|
1935
|
+
var _a;
|
|
1936
|
+
if (((_a = props.sort) == null ? void 0 : _a.key) !== key) return void 0;
|
|
1937
|
+
return props.sort.order === "asc" ? "ascending" : "descending";
|
|
1938
|
+
}
|
|
1939
|
+
return (_ctx, _cache) => {
|
|
1940
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1941
|
+
createElementVNode("table", {
|
|
1942
|
+
class: normalizeClass(["lf-table", { "lf-table--compact": __props.compact }]),
|
|
1943
|
+
style: normalizeStyle({ minWidth: __props.minWidth })
|
|
1944
|
+
}, [
|
|
1945
|
+
createElementVNode("thead", null, [
|
|
1946
|
+
createElementVNode("tr", null, [
|
|
1947
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col) => {
|
|
1948
|
+
var _a;
|
|
1949
|
+
return openBlock(), createElementBlock("th", {
|
|
1950
|
+
key: col.key,
|
|
1951
|
+
style: normalizeStyle({ width: col.width, textAlign: col.align ?? "left" }),
|
|
1952
|
+
class: normalizeClass({ "lf-table__col--mobile-hidden": col.hideOnMobile }),
|
|
1953
|
+
"aria-sort": ariaSort(col.key)
|
|
1954
|
+
}, [
|
|
1955
|
+
col.sortable ? (openBlock(), createElementBlock("button", {
|
|
1956
|
+
key: 0,
|
|
1957
|
+
type: "button",
|
|
1958
|
+
class: "lf-table__sort",
|
|
1959
|
+
onClick: ($event) => toggleSort(col.key)
|
|
1960
|
+
}, [
|
|
1961
|
+
createTextVNode(toDisplayString(col.label) + " ", 1),
|
|
1962
|
+
((_a = __props.sort) == null ? void 0 : _a.key) === col.key ? (openBlock(), createBlock(LfIcon, {
|
|
1963
|
+
key: 0,
|
|
1964
|
+
name: __props.sort.order === "asc" ? "arrow_upward" : "arrow_downward",
|
|
1965
|
+
size: "0.875rem"
|
|
1966
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
1967
|
+
], 8, _hoisted_3$4)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1968
|
+
createTextVNode(toDisplayString(col.label), 1)
|
|
1969
|
+
], 64))
|
|
1970
|
+
], 14, _hoisted_2$6);
|
|
1971
|
+
}), 128))
|
|
1972
|
+
])
|
|
1973
|
+
]),
|
|
1974
|
+
createElementVNode("tbody", null, [
|
|
1975
|
+
__props.loading ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.skeletonRows, (n) => {
|
|
1976
|
+
return openBlock(), createElementBlock("tr", {
|
|
1977
|
+
key: `sk-${n}`,
|
|
1978
|
+
class: "lf-table__row"
|
|
1979
|
+
}, [
|
|
1980
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col) => {
|
|
1981
|
+
return openBlock(), createElementBlock("td", {
|
|
1982
|
+
key: col.key,
|
|
1983
|
+
class: normalizeClass({ "lf-table__col--mobile-hidden": col.hideOnMobile })
|
|
1984
|
+
}, [..._cache[0] || (_cache[0] = [
|
|
1985
|
+
createElementVNode("span", { class: "lf-table__skeleton" }, null, -1)
|
|
1986
|
+
])], 2);
|
|
1987
|
+
}), 128))
|
|
1988
|
+
]);
|
|
1989
|
+
}), 128)) : __props.rows.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_4$2, [
|
|
1990
|
+
createElementVNode("td", {
|
|
1991
|
+
class: "lf-table__empty",
|
|
1992
|
+
colspan: __props.columns.length
|
|
1993
|
+
}, [
|
|
1994
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
1995
|
+
createTextVNode(toDisplayString(__props.emptyText), 1)
|
|
1996
|
+
], true)
|
|
1997
|
+
], 8, _hoisted_5$2)
|
|
1998
|
+
])) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.rows, (row, i2) => {
|
|
1999
|
+
return openBlock(), createElementBlock("tr", {
|
|
2000
|
+
key: keyOf(row, i2),
|
|
2001
|
+
class: normalizeClass(["lf-table__row", { "lf-table__row--clickable": __props.clickable }]),
|
|
2002
|
+
tabindex: __props.clickable ? 0 : void 0,
|
|
2003
|
+
onClick: ($event) => __props.clickable && emit("rowClick", row),
|
|
2004
|
+
onKeydown: withKeys(($event) => __props.clickable && emit("rowClick", row), ["enter"])
|
|
2005
|
+
}, [
|
|
2006
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (col) => {
|
|
2007
|
+
return openBlock(), createElementBlock("td", {
|
|
2008
|
+
key: col.key,
|
|
2009
|
+
style: normalizeStyle({ textAlign: col.align ?? "left" }),
|
|
2010
|
+
class: normalizeClass({ "lf-table__col--mobile-hidden": col.hideOnMobile })
|
|
2011
|
+
}, [
|
|
2012
|
+
renderSlot(_ctx.$slots, `cell-${col.key}`, {
|
|
2013
|
+
row,
|
|
2014
|
+
value: row[col.key],
|
|
2015
|
+
index: i2
|
|
2016
|
+
}, () => [
|
|
2017
|
+
createTextVNode(toDisplayString(row[col.key] ?? "—"), 1)
|
|
2018
|
+
], true)
|
|
2019
|
+
], 6);
|
|
2020
|
+
}), 128))
|
|
2021
|
+
], 42, _hoisted_6$2);
|
|
2022
|
+
}), 128))
|
|
2023
|
+
])
|
|
2024
|
+
], 6)
|
|
2025
|
+
]);
|
|
2026
|
+
};
|
|
2027
|
+
}
|
|
2028
|
+
});
|
|
2029
|
+
const LfTable = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-dc7b5ff5"]]);
|
|
2030
|
+
const _hoisted_1$6 = ["aria-label"];
|
|
2031
|
+
const _hoisted_2$5 = {
|
|
2032
|
+
key: 0,
|
|
2033
|
+
class: "lf-pagination__total"
|
|
2034
|
+
};
|
|
2035
|
+
const _hoisted_3$3 = {
|
|
2036
|
+
key: 1,
|
|
2037
|
+
class: "lf-pagination__btns"
|
|
2038
|
+
};
|
|
2039
|
+
const _hoisted_4$1 = ["disabled"];
|
|
2040
|
+
const _hoisted_5$1 = {
|
|
2041
|
+
key: 0,
|
|
2042
|
+
class: "lf-pagination__gap",
|
|
2043
|
+
"aria-hidden": "true"
|
|
2044
|
+
};
|
|
2045
|
+
const _hoisted_6$1 = ["aria-current", "onClick"];
|
|
2046
|
+
const _hoisted_7$1 = ["disabled"];
|
|
2047
|
+
const ELLIPSIS = -1;
|
|
2048
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
2049
|
+
__name: "LfPagination",
|
|
2050
|
+
props: /* @__PURE__ */ mergeModels({
|
|
2051
|
+
total: { default: 0 },
|
|
2052
|
+
perPage: { default: 20 },
|
|
2053
|
+
siblings: { default: 1 },
|
|
2054
|
+
showTotal: { type: Boolean, default: true },
|
|
2055
|
+
ariaLabel: { default: "페이지" }
|
|
2056
|
+
}, {
|
|
2057
|
+
"modelValue": { default: 1 },
|
|
2058
|
+
"modelModifiers": {}
|
|
2059
|
+
}),
|
|
2060
|
+
emits: ["update:modelValue"],
|
|
2061
|
+
setup(__props) {
|
|
2062
|
+
const props = __props;
|
|
2063
|
+
const model = useModel(__props, "modelValue");
|
|
2064
|
+
const totalPages = computed(() => Math.max(1, Math.ceil(props.total / props.perPage)));
|
|
2065
|
+
const items = computed(() => {
|
|
2066
|
+
const last = totalPages.value;
|
|
2067
|
+
const cur = Math.min(Math.max(1, model.value), last);
|
|
2068
|
+
const window2 = props.siblings * 2 + 5;
|
|
2069
|
+
if (last <= window2) return Array.from({ length: last }, (_, i2) => i2 + 1);
|
|
2070
|
+
const left = Math.max(2, cur - props.siblings);
|
|
2071
|
+
const right = Math.min(last - 1, cur + props.siblings);
|
|
2072
|
+
const out = [1];
|
|
2073
|
+
if (left > 2) out.push(ELLIPSIS);
|
|
2074
|
+
for (let p = left; p <= right; p++) out.push(p);
|
|
2075
|
+
if (right < last - 1) out.push(ELLIPSIS);
|
|
2076
|
+
out.push(last);
|
|
2077
|
+
return out;
|
|
2078
|
+
});
|
|
2079
|
+
function go(page) {
|
|
2080
|
+
const next = Math.min(Math.max(1, page), totalPages.value);
|
|
2081
|
+
if (next !== model.value) model.value = next;
|
|
2082
|
+
}
|
|
2083
|
+
return (_ctx, _cache) => {
|
|
2084
|
+
return totalPages.value > 1 || __props.showTotal ? (openBlock(), createElementBlock("nav", {
|
|
2085
|
+
key: 0,
|
|
2086
|
+
class: "lf-pagination",
|
|
2087
|
+
"aria-label": __props.ariaLabel
|
|
2088
|
+
}, [
|
|
2089
|
+
__props.showTotal ? (openBlock(), createElementBlock("p", _hoisted_2$5, [
|
|
2090
|
+
renderSlot(_ctx.$slots, "total", {}, () => [
|
|
2091
|
+
createTextVNode("전체 " + toDisplayString(__props.total.toLocaleString()) + "건", 1)
|
|
2092
|
+
], true)
|
|
2093
|
+
])) : createCommentVNode("", true),
|
|
2094
|
+
totalPages.value > 1 ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
|
|
2095
|
+
createElementVNode("button", {
|
|
2096
|
+
type: "button",
|
|
2097
|
+
class: "lf-pagination__btn",
|
|
2098
|
+
disabled: model.value <= 1,
|
|
2099
|
+
"aria-label": "이전 페이지",
|
|
2100
|
+
onClick: _cache[0] || (_cache[0] = ($event) => go(model.value - 1))
|
|
2101
|
+
}, [
|
|
2102
|
+
createVNode(LfIcon, {
|
|
2103
|
+
name: "chevron_left",
|
|
2104
|
+
size: "1rem"
|
|
2105
|
+
})
|
|
2106
|
+
], 8, _hoisted_4$1),
|
|
2107
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (p, i2) => {
|
|
2108
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
2109
|
+
key: `${p}-${i2}`
|
|
2110
|
+
}, [
|
|
2111
|
+
p === ELLIPSIS ? (openBlock(), createElementBlock("span", _hoisted_5$1, "…")) : (openBlock(), createElementBlock("button", {
|
|
2112
|
+
key: 1,
|
|
2113
|
+
type: "button",
|
|
2114
|
+
class: normalizeClass(["lf-pagination__btn", { "lf-pagination__btn--active": p === model.value }]),
|
|
2115
|
+
"aria-current": p === model.value ? "page" : void 0,
|
|
2116
|
+
onClick: ($event) => go(p)
|
|
2117
|
+
}, toDisplayString(p), 11, _hoisted_6$1))
|
|
2118
|
+
], 64);
|
|
2119
|
+
}), 128)),
|
|
2120
|
+
createElementVNode("button", {
|
|
2121
|
+
type: "button",
|
|
2122
|
+
class: "lf-pagination__btn",
|
|
2123
|
+
disabled: model.value >= totalPages.value,
|
|
2124
|
+
"aria-label": "다음 페이지",
|
|
2125
|
+
onClick: _cache[1] || (_cache[1] = ($event) => go(model.value + 1))
|
|
2126
|
+
}, [
|
|
2127
|
+
createVNode(LfIcon, {
|
|
2128
|
+
name: "chevron_right",
|
|
2129
|
+
size: "1rem"
|
|
2130
|
+
})
|
|
2131
|
+
], 8, _hoisted_7$1)
|
|
2132
|
+
])) : createCommentVNode("", true)
|
|
2133
|
+
], 8, _hoisted_1$6)) : createCommentVNode("", true);
|
|
2134
|
+
};
|
|
2135
|
+
}
|
|
2136
|
+
});
|
|
2137
|
+
const LfPagination = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-53fce087"]]);
|
|
2138
|
+
const _hoisted_1$5 = { class: "lf-empty__title" };
|
|
2139
|
+
const _hoisted_2$4 = {
|
|
2140
|
+
key: 1,
|
|
2141
|
+
class: "lf-empty__desc"
|
|
2142
|
+
};
|
|
2143
|
+
const _hoisted_3$2 = {
|
|
2144
|
+
key: 2,
|
|
2145
|
+
class: "lf-empty__action"
|
|
2146
|
+
};
|
|
2147
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
2148
|
+
__name: "LfEmptyState",
|
|
2149
|
+
props: {
|
|
2150
|
+
title: { default: "표시할 내용이 없습니다." },
|
|
2151
|
+
description: {},
|
|
2152
|
+
icon: {},
|
|
2153
|
+
iconPath: {},
|
|
2154
|
+
tone: { default: "muted" }
|
|
2155
|
+
},
|
|
2156
|
+
setup(__props) {
|
|
2157
|
+
return (_ctx, _cache) => {
|
|
2158
|
+
return openBlock(), createElementBlock("div", {
|
|
2159
|
+
class: normalizeClass(["lf-empty", `lf-empty--${__props.tone}`])
|
|
2160
|
+
}, [
|
|
2161
|
+
__props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
|
|
2162
|
+
key: 0,
|
|
2163
|
+
name: __props.icon,
|
|
2164
|
+
path: __props.iconPath,
|
|
2165
|
+
size: "2.5rem",
|
|
2166
|
+
class: "lf-empty__icon"
|
|
2167
|
+
}, null, 8, ["name", "path"])) : createCommentVNode("", true),
|
|
2168
|
+
createElementVNode("p", _hoisted_1$5, [
|
|
2169
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
2170
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
2171
|
+
], true)
|
|
2172
|
+
]),
|
|
2173
|
+
__props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("p", _hoisted_2$4, [
|
|
2174
|
+
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
2175
|
+
createTextVNode(toDisplayString(__props.description), 1)
|
|
2176
|
+
], true)
|
|
2177
|
+
])) : createCommentVNode("", true),
|
|
2178
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
2179
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2180
|
+
])) : createCommentVNode("", true)
|
|
2181
|
+
], 2);
|
|
2182
|
+
};
|
|
2183
|
+
}
|
|
2184
|
+
});
|
|
2185
|
+
const LfEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-3ba5293d"]]);
|
|
2186
|
+
const _hoisted_1$4 = {
|
|
2187
|
+
key: 0,
|
|
2188
|
+
class: "lf-skeleton-group",
|
|
2189
|
+
"aria-busy": true,
|
|
2190
|
+
"aria-live": "polite"
|
|
2191
|
+
};
|
|
2192
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2193
|
+
__name: "LfSkeleton",
|
|
2194
|
+
props: {
|
|
2195
|
+
variant: { default: "text" },
|
|
2196
|
+
width: {},
|
|
2197
|
+
height: {},
|
|
2198
|
+
lines: { default: 1 }
|
|
2199
|
+
},
|
|
2200
|
+
setup(__props) {
|
|
2201
|
+
const props = __props;
|
|
2202
|
+
function lineStyle(n) {
|
|
2203
|
+
const last = n === props.lines;
|
|
2204
|
+
return { width: last ? "60%" : props.width ?? "100%", height: props.height };
|
|
2205
|
+
}
|
|
2206
|
+
return (_ctx, _cache) => {
|
|
2207
|
+
return __props.lines > 1 ? (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
2208
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.lines, (n) => {
|
|
2209
|
+
return openBlock(), createElementBlock("span", {
|
|
2210
|
+
key: n,
|
|
2211
|
+
class: normalizeClass(["lf-skeleton", `lf-skeleton--${__props.variant}`]),
|
|
2212
|
+
style: normalizeStyle(lineStyle(n))
|
|
2213
|
+
}, null, 6);
|
|
2214
|
+
}), 128))
|
|
2215
|
+
])) : (openBlock(), createElementBlock("span", {
|
|
2216
|
+
key: 1,
|
|
2217
|
+
class: normalizeClass(["lf-skeleton", `lf-skeleton--${__props.variant}`]),
|
|
2218
|
+
style: normalizeStyle({ width: __props.width, height: __props.height }),
|
|
2219
|
+
"aria-busy": true
|
|
2220
|
+
}, null, 6));
|
|
2221
|
+
};
|
|
2222
|
+
}
|
|
2223
|
+
});
|
|
2224
|
+
const LfSkeleton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-a01556ce"]]);
|
|
2225
|
+
const _hoisted_1$3 = {
|
|
2226
|
+
class: "lf-stat__badge",
|
|
2227
|
+
"aria-hidden": "true"
|
|
2228
|
+
};
|
|
2229
|
+
const _hoisted_2$3 = { class: "lf-stat__body" };
|
|
2230
|
+
const _hoisted_3$1 = { class: "lf-stat__label" };
|
|
2231
|
+
const _hoisted_4 = { class: "lf-stat__value-row" };
|
|
2232
|
+
const _hoisted_5 = { class: "lf-stat__value" };
|
|
2233
|
+
const _hoisted_6 = {
|
|
2234
|
+
key: 0,
|
|
2235
|
+
class: "lf-stat__unit"
|
|
2236
|
+
};
|
|
2237
|
+
const _hoisted_7 = {
|
|
2238
|
+
key: 0,
|
|
2239
|
+
class: "lf-stat__hint"
|
|
2240
|
+
};
|
|
2241
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2242
|
+
__name: "LfStatCard",
|
|
2243
|
+
props: {
|
|
2244
|
+
label: {},
|
|
2245
|
+
value: {},
|
|
2246
|
+
unit: {},
|
|
2247
|
+
icon: {},
|
|
2248
|
+
iconPath: {},
|
|
2249
|
+
hint: {},
|
|
2250
|
+
tone: { default: "neutral" },
|
|
2251
|
+
delta: {},
|
|
2252
|
+
deltaUnit: { default: "%" },
|
|
2253
|
+
invert: { type: Boolean },
|
|
2254
|
+
glass: { type: Boolean },
|
|
2255
|
+
href: {}
|
|
2256
|
+
},
|
|
2257
|
+
setup(__props) {
|
|
2258
|
+
const props = __props;
|
|
2259
|
+
const deltaClass = computed(() => {
|
|
2260
|
+
if (props.delta == null || props.delta === 0) return "lf-stat__delta--flat";
|
|
2261
|
+
const good = props.invert ? props.delta < 0 : props.delta > 0;
|
|
2262
|
+
return good ? "lf-stat__delta--up" : "lf-stat__delta--down";
|
|
2263
|
+
});
|
|
2264
|
+
return (_ctx, _cache) => {
|
|
2265
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.href ? "a" : "div"), {
|
|
2266
|
+
href: __props.href,
|
|
2267
|
+
class: normalizeClass(["lf-stat", [`lf-stat--${__props.tone}`, { "lf-stat--glass": __props.glass, "lf-stat--link": __props.href }]])
|
|
2268
|
+
}, {
|
|
2269
|
+
default: withCtx(() => [
|
|
2270
|
+
createElementVNode("span", _hoisted_1$3, [
|
|
2271
|
+
createVNode(LfIcon, {
|
|
2272
|
+
name: __props.icon,
|
|
2273
|
+
path: __props.iconPath,
|
|
2274
|
+
size: "1.125rem"
|
|
2275
|
+
}, null, 8, ["name", "path"])
|
|
2276
|
+
]),
|
|
2277
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
2278
|
+
createElementVNode("div", _hoisted_3$1, toDisplayString(__props.label), 1),
|
|
2279
|
+
createElementVNode("div", _hoisted_4, [
|
|
2280
|
+
createElementVNode("span", _hoisted_5, [
|
|
2281
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2282
|
+
createTextVNode(toDisplayString(__props.value), 1)
|
|
2283
|
+
], true),
|
|
2284
|
+
__props.unit ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(__props.unit), 1)) : createCommentVNode("", true)
|
|
2285
|
+
]),
|
|
2286
|
+
__props.delta != null ? (openBlock(), createElementBlock("span", {
|
|
2287
|
+
key: 0,
|
|
2288
|
+
class: normalizeClass(["lf-stat__delta", deltaClass.value])
|
|
2289
|
+
}, [
|
|
2290
|
+
createVNode(LfIcon, {
|
|
2291
|
+
name: __props.delta >= 0 ? "arrow_upward" : "arrow_downward",
|
|
2292
|
+
size: "0.8125rem"
|
|
2293
|
+
}, null, 8, ["name"]),
|
|
2294
|
+
createTextVNode(" " + toDisplayString(Math.abs(__props.delta)) + toDisplayString(__props.deltaUnit), 1)
|
|
2295
|
+
], 2)) : createCommentVNode("", true)
|
|
2296
|
+
]),
|
|
2297
|
+
__props.hint ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
2298
|
+
])
|
|
2299
|
+
]),
|
|
2300
|
+
_: 3
|
|
2301
|
+
}, 8, ["href", "class"]);
|
|
2302
|
+
};
|
|
2303
|
+
}
|
|
2304
|
+
});
|
|
2305
|
+
const LfStatCard = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-e0efc665"]]);
|
|
2306
|
+
const _hoisted_1$2 = ["aria-describedby"];
|
|
2307
|
+
const _hoisted_2$2 = ["id"];
|
|
2308
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2309
|
+
__name: "LfTooltip",
|
|
2310
|
+
props: {
|
|
2311
|
+
text: {},
|
|
2312
|
+
placement: { default: "top" }
|
|
2313
|
+
},
|
|
2314
|
+
setup(__props) {
|
|
2315
|
+
const bubbleId = useId();
|
|
2316
|
+
return (_ctx, _cache) => {
|
|
2317
|
+
return openBlock(), createElementBlock("span", {
|
|
2318
|
+
class: normalizeClass(["lf-tooltip", `lf-tooltip--${__props.placement}`])
|
|
2319
|
+
}, [
|
|
2320
|
+
createElementVNode("span", {
|
|
2321
|
+
class: "lf-tooltip__trigger",
|
|
2322
|
+
"aria-describedby": unref(bubbleId)
|
|
2323
|
+
}, [
|
|
2324
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2325
|
+
], 8, _hoisted_1$2),
|
|
2326
|
+
createElementVNode("span", {
|
|
2327
|
+
id: unref(bubbleId),
|
|
2328
|
+
class: "lf-tooltip__bubble",
|
|
2329
|
+
role: "tooltip"
|
|
2330
|
+
}, [
|
|
2331
|
+
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
2332
|
+
createTextVNode(toDisplayString(__props.text), 1)
|
|
2333
|
+
], true)
|
|
2334
|
+
], 8, _hoisted_2$2)
|
|
2335
|
+
], 2);
|
|
2336
|
+
};
|
|
2337
|
+
}
|
|
2338
|
+
});
|
|
2339
|
+
const LfTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-bfa77821"]]);
|
|
2340
|
+
const _hoisted_1$1 = ["disabled", "onClick"];
|
|
2341
|
+
const _hoisted_2$1 = { class: "lf-menu__item-text" };
|
|
2342
|
+
const _hoisted_3 = {
|
|
2343
|
+
key: 0,
|
|
2344
|
+
class: "lf-menu__item-desc"
|
|
2345
|
+
};
|
|
2346
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
2347
|
+
__name: "LfMenu",
|
|
2348
|
+
props: {
|
|
2349
|
+
items: { default: () => [] },
|
|
2350
|
+
align: { default: "end" },
|
|
2351
|
+
triggerLabel: { default: "메뉴 열기" }
|
|
2352
|
+
},
|
|
2353
|
+
emits: ["select"],
|
|
2354
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2355
|
+
const props = __props;
|
|
2356
|
+
const emit = __emit;
|
|
2357
|
+
const open = ref(false);
|
|
2358
|
+
const root = useTemplateRef("root");
|
|
2359
|
+
const normalized = computed(
|
|
2360
|
+
() => props.items.map((o) => typeof o === "string" ? { value: o, label: o } : o)
|
|
2361
|
+
);
|
|
2362
|
+
function toggle() {
|
|
2363
|
+
open.value = !open.value;
|
|
2364
|
+
}
|
|
2365
|
+
function iconOf(item) {
|
|
2366
|
+
if (!item.icon) return {};
|
|
2367
|
+
return item.icon in LF_ICONS ? { name: item.icon } : { path: item.icon };
|
|
2368
|
+
}
|
|
2369
|
+
function select(item) {
|
|
2370
|
+
if (item.disabled) return;
|
|
2371
|
+
open.value = false;
|
|
2372
|
+
emit("select", item);
|
|
2373
|
+
}
|
|
2374
|
+
function onPointerDown(e2) {
|
|
2375
|
+
var _a;
|
|
2376
|
+
if (!((_a = root.value) == null ? void 0 : _a.contains(e2.target))) open.value = false;
|
|
2377
|
+
}
|
|
2378
|
+
function onKeydown(e2) {
|
|
2379
|
+
if (e2.key === "Escape") open.value = false;
|
|
2380
|
+
}
|
|
2381
|
+
watch(open, (isOpen) => {
|
|
2382
|
+
if (isOpen) {
|
|
2383
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
2384
|
+
document.addEventListener("keydown", onKeydown);
|
|
2385
|
+
} else {
|
|
2386
|
+
document.removeEventListener("pointerdown", onPointerDown);
|
|
2387
|
+
document.removeEventListener("keydown", onKeydown);
|
|
2388
|
+
}
|
|
2389
|
+
});
|
|
2390
|
+
onBeforeUnmount(() => {
|
|
2391
|
+
document.removeEventListener("pointerdown", onPointerDown);
|
|
2392
|
+
document.removeEventListener("keydown", onKeydown);
|
|
2393
|
+
});
|
|
2394
|
+
__expose({ open, toggle });
|
|
2395
|
+
return (_ctx, _cache) => {
|
|
2396
|
+
return openBlock(), createElementBlock("div", {
|
|
2397
|
+
ref_key: "root",
|
|
2398
|
+
ref: root,
|
|
2399
|
+
class: "lf-menu"
|
|
2400
|
+
}, [
|
|
2401
|
+
renderSlot(_ctx.$slots, "trigger", {
|
|
2402
|
+
open: open.value,
|
|
2403
|
+
toggle
|
|
2404
|
+
}, () => [
|
|
2405
|
+
createVNode(LfIconButton, {
|
|
2406
|
+
icon: "more_vert",
|
|
2407
|
+
label: __props.triggerLabel,
|
|
2408
|
+
"aria-expanded": open.value,
|
|
2409
|
+
onClick: toggle
|
|
2410
|
+
}, null, 8, ["label", "aria-expanded"])
|
|
2411
|
+
], true),
|
|
2412
|
+
createVNode(Transition, { name: "lf-menu-fade" }, {
|
|
2413
|
+
default: withCtx(() => [
|
|
2414
|
+
open.value ? (openBlock(), createElementBlock("div", {
|
|
2415
|
+
key: 0,
|
|
2416
|
+
class: normalizeClass(["lf-menu__list", `lf-menu__list--${__props.align}`]),
|
|
2417
|
+
role: "menu"
|
|
2418
|
+
}, [
|
|
2419
|
+
renderSlot(_ctx.$slots, "items", {}, () => [
|
|
2420
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(normalized.value, (item) => {
|
|
2421
|
+
return openBlock(), createElementBlock("button", {
|
|
2422
|
+
key: String(item.value),
|
|
2423
|
+
type: "button",
|
|
2424
|
+
class: "lf-menu__item",
|
|
2425
|
+
role: "menuitem",
|
|
2426
|
+
disabled: item.disabled,
|
|
2427
|
+
onClick: ($event) => select(item)
|
|
2428
|
+
}, [
|
|
2429
|
+
item.icon ? (openBlock(), createBlock(LfIcon, mergeProps({
|
|
2430
|
+
key: 0,
|
|
2431
|
+
ref_for: true
|
|
2432
|
+
}, iconOf(item), {
|
|
2433
|
+
size: "1.125rem",
|
|
2434
|
+
class: "lf-menu__item-icon"
|
|
2435
|
+
}), null, 16)) : createCommentVNode("", true),
|
|
2436
|
+
createElementVNode("span", _hoisted_2$1, [
|
|
2437
|
+
createElementVNode("span", null, toDisplayString(item.label), 1),
|
|
2438
|
+
item.description ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(item.description), 1)) : createCommentVNode("", true)
|
|
2439
|
+
])
|
|
2440
|
+
], 8, _hoisted_1$1);
|
|
2441
|
+
}), 128))
|
|
2442
|
+
], true)
|
|
2443
|
+
], 2)) : createCommentVNode("", true)
|
|
2444
|
+
]),
|
|
2445
|
+
_: 3
|
|
2446
|
+
})
|
|
2447
|
+
], 512);
|
|
2448
|
+
};
|
|
2449
|
+
}
|
|
2450
|
+
});
|
|
2451
|
+
const LfMenu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-500f54dd"]]);
|
|
2452
|
+
const _hoisted_1 = {
|
|
2453
|
+
key: 0,
|
|
2454
|
+
class: "lf-divider lf-divider--labeled",
|
|
2455
|
+
role: "separator"
|
|
2456
|
+
};
|
|
2457
|
+
const _hoisted_2 = { class: "lf-divider__label" };
|
|
2458
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
2459
|
+
__name: "LfDivider",
|
|
2460
|
+
props: {
|
|
2461
|
+
label: {},
|
|
2462
|
+
vertical: { type: Boolean }
|
|
2463
|
+
},
|
|
2464
|
+
setup(__props) {
|
|
2465
|
+
return (_ctx, _cache) => {
|
|
2466
|
+
return __props.label || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2467
|
+
createElementVNode("span", _hoisted_2, [
|
|
2468
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2469
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
2470
|
+
], true)
|
|
2471
|
+
])
|
|
2472
|
+
])) : (openBlock(), createElementBlock("hr", {
|
|
2473
|
+
key: 1,
|
|
2474
|
+
class: normalizeClass(["lf-divider", { "lf-divider--vertical": __props.vertical }])
|
|
2475
|
+
}, null, 2));
|
|
2476
|
+
};
|
|
2477
|
+
}
|
|
2478
|
+
});
|
|
2479
|
+
const LfDivider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c15d2259"]]);
|
|
2480
|
+
class ApiError extends Error {
|
|
2481
|
+
constructor(status, message, detail) {
|
|
2482
|
+
super(message);
|
|
2483
|
+
this.status = status;
|
|
2484
|
+
this.detail = detail;
|
|
2485
|
+
this.name = "ApiError";
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
const DEFAULT_REFRESH_PATH = "/api/v1/auth/refresh";
|
|
2489
|
+
function createApiClient(options) {
|
|
2490
|
+
const {
|
|
2491
|
+
baseUrl,
|
|
2492
|
+
refreshPath = DEFAULT_REFRESH_PATH,
|
|
2493
|
+
isAuthPath = (url) => url.includes("/api/v1/auth/"),
|
|
2494
|
+
onUnauthorized,
|
|
2495
|
+
onActivity
|
|
2496
|
+
} = options;
|
|
2497
|
+
let baseFetch = globalThis.fetch.bind(globalThis);
|
|
2498
|
+
let refreshing = null;
|
|
2499
|
+
let notified = false;
|
|
2500
|
+
function tryRefresh() {
|
|
2501
|
+
refreshing ?? (refreshing = baseFetch(`${baseUrl}${refreshPath}`, {
|
|
2502
|
+
method: "POST",
|
|
2503
|
+
credentials: "include"
|
|
2504
|
+
}).then((r) => r.ok).catch(() => false).finally(() => {
|
|
2505
|
+
refreshing = null;
|
|
2506
|
+
}));
|
|
2507
|
+
return refreshing;
|
|
2508
|
+
}
|
|
2509
|
+
function withCookies(init) {
|
|
2510
|
+
const out = { ...init ?? {} };
|
|
2511
|
+
out.credentials = "include";
|
|
2512
|
+
if (out.headers) {
|
|
2513
|
+
const h2 = new Headers(out.headers);
|
|
2514
|
+
h2.delete("authorization");
|
|
2515
|
+
out.headers = h2;
|
|
2516
|
+
}
|
|
2517
|
+
return out;
|
|
2518
|
+
}
|
|
2519
|
+
async function send(input, init, allowRetry) {
|
|
2520
|
+
onActivity == null ? void 0 : onActivity(1);
|
|
2521
|
+
try {
|
|
2522
|
+
let res = await baseFetch(input, withCookies(init));
|
|
2523
|
+
if (res.status !== 401 || !allowRetry) {
|
|
2524
|
+
if (res.ok) notified = false;
|
|
2525
|
+
return res;
|
|
2526
|
+
}
|
|
2527
|
+
const refreshed = await tryRefresh();
|
|
2528
|
+
if (!refreshed) {
|
|
2529
|
+
if (!notified) {
|
|
2530
|
+
notified = true;
|
|
2531
|
+
onUnauthorized == null ? void 0 : onUnauthorized();
|
|
2532
|
+
}
|
|
2533
|
+
return res;
|
|
2534
|
+
}
|
|
2535
|
+
res = await baseFetch(input, withCookies(init));
|
|
2536
|
+
if (res.ok) notified = false;
|
|
2537
|
+
return res;
|
|
2538
|
+
} finally {
|
|
2539
|
+
onActivity == null ? void 0 : onActivity(-1);
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
function urlOf(input) {
|
|
2543
|
+
if (typeof input === "string") return input;
|
|
2544
|
+
if (input instanceof URL) return input.href;
|
|
2545
|
+
return input.url;
|
|
2546
|
+
}
|
|
2547
|
+
async function request(path, opts = {}) {
|
|
2548
|
+
const { method = "GET", body, headers, signal, noRetry = false } = opts;
|
|
2549
|
+
const url = `${baseUrl}${path}`;
|
|
2550
|
+
const init = { method, signal, headers: { ...headers } };
|
|
2551
|
+
if (body !== void 0) {
|
|
2552
|
+
if (body instanceof FormData || body instanceof Blob || typeof body === "string") {
|
|
2553
|
+
init.body = body;
|
|
2554
|
+
} else {
|
|
2555
|
+
init.body = JSON.stringify(body);
|
|
2556
|
+
init.headers = { "Content-Type": "application/json", ...init.headers };
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
return send(url, init, !noRetry && !isAuthPath(url));
|
|
2560
|
+
}
|
|
2561
|
+
async function api(path, opts = {}) {
|
|
2562
|
+
const res = await request(path, opts);
|
|
2563
|
+
if (res.status === 204) return void 0;
|
|
2564
|
+
const text = await res.text();
|
|
2565
|
+
let payload = void 0;
|
|
2566
|
+
if (text) {
|
|
2567
|
+
try {
|
|
2568
|
+
payload = JSON.parse(text);
|
|
2569
|
+
} catch {
|
|
2570
|
+
payload = text;
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
if (!res.ok) {
|
|
2574
|
+
const detail = payload == null ? void 0 : payload.detail;
|
|
2575
|
+
const message = typeof detail === "string" ? detail : typeof payload === "string" && payload ? payload : `요청 실패 (${res.status})`;
|
|
2576
|
+
throw new ApiError(res.status, message, detail ?? payload);
|
|
2577
|
+
}
|
|
2578
|
+
return payload;
|
|
2579
|
+
}
|
|
2580
|
+
let uninstall = null;
|
|
2581
|
+
function install() {
|
|
2582
|
+
if (uninstall) return uninstall;
|
|
2583
|
+
baseFetch = globalThis.fetch.bind(globalThis);
|
|
2584
|
+
const patched = async (input, init) => {
|
|
2585
|
+
const url = urlOf(input);
|
|
2586
|
+
if (!url.startsWith(baseUrl)) return baseFetch(input, init);
|
|
2587
|
+
const retriable = typeof input === "string" || input instanceof URL;
|
|
2588
|
+
return send(input, init, retriable && !isAuthPath(url));
|
|
2589
|
+
};
|
|
2590
|
+
globalThis.fetch = patched;
|
|
2591
|
+
uninstall = () => {
|
|
2592
|
+
if (globalThis.fetch === patched) globalThis.fetch = baseFetch;
|
|
2593
|
+
uninstall = null;
|
|
2594
|
+
};
|
|
2595
|
+
return uninstall;
|
|
2596
|
+
}
|
|
2597
|
+
return { api, request, install };
|
|
2598
|
+
}
|
|
914
2599
|
function useToast() {
|
|
915
2600
|
const store = useToastStore();
|
|
916
2601
|
return {
|
|
@@ -926,22 +2611,50 @@ function useConfirm() {
|
|
|
926
2611
|
return (opts) => store.ask(opts);
|
|
927
2612
|
}
|
|
928
2613
|
export {
|
|
2614
|
+
ApiError,
|
|
929
2615
|
AppConfirmModal,
|
|
930
2616
|
AppLoadingOverlay,
|
|
931
2617
|
AppShell,
|
|
932
2618
|
AppToast,
|
|
933
2619
|
DARK_THEME,
|
|
934
|
-
DEFAULT_THEME,
|
|
2620
|
+
b as DEFAULT_THEME,
|
|
2621
|
+
LF_ICONS,
|
|
935
2622
|
LIGHT_THEME,
|
|
936
|
-
|
|
2623
|
+
LfAlert,
|
|
2624
|
+
LfAvatar,
|
|
2625
|
+
LfBadge,
|
|
2626
|
+
LfButton,
|
|
2627
|
+
LfCard,
|
|
2628
|
+
LfCheckbox,
|
|
2629
|
+
LfDivider,
|
|
2630
|
+
LfEmptyState,
|
|
2631
|
+
LfField,
|
|
2632
|
+
LfIcon,
|
|
2633
|
+
LfIconButton,
|
|
2634
|
+
LfMenu,
|
|
2635
|
+
LfModal,
|
|
2636
|
+
LfPageHeader,
|
|
2637
|
+
LfPagination,
|
|
2638
|
+
LfRadioGroup,
|
|
2639
|
+
LfSelect,
|
|
2640
|
+
LfSkeleton,
|
|
2641
|
+
LfSpinner,
|
|
2642
|
+
LfStatCard,
|
|
2643
|
+
LfSwitch,
|
|
2644
|
+
LfTable,
|
|
2645
|
+
LfTextField,
|
|
2646
|
+
LfTextarea,
|
|
2647
|
+
LfTooltip,
|
|
2648
|
+
c as applySemanticPalette,
|
|
937
2649
|
applyTheme,
|
|
938
|
-
colorToRgb,
|
|
939
|
-
contrastRatio,
|
|
940
|
-
|
|
941
|
-
|
|
2650
|
+
d as colorToRgb,
|
|
2651
|
+
e as contrastRatio,
|
|
2652
|
+
createApiClient,
|
|
2653
|
+
f as deriveSemanticPalette,
|
|
2654
|
+
h as hexToRgb,
|
|
942
2655
|
initTheme,
|
|
943
|
-
isLightBackground,
|
|
944
|
-
luminance,
|
|
2656
|
+
i as isLightBackground,
|
|
2657
|
+
l as luminance,
|
|
945
2658
|
useConfirm,
|
|
946
2659
|
useConfirmStore,
|
|
947
2660
|
useLoadingStore,
|