@loafacto/ui 0.7.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/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, resolveDynamicComponent, createTextVNode, useModel, useId, withDirectives, mergeProps, vModelDynamic, mergeModels, useTemplateRef, onMounted, nextTick, vModelText, vModelSelect, vModelCheckbox, vModelRadio, withKeys } 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", (e) => {
272
- if (e.key !== STORAGE_KEY) return;
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();
@@ -357,23 +135,23 @@ const BrandSymbol = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_re
357
135
  const _hoisted_1$r = { class: "lf-shell" };
358
136
  const _hoisted_2$n = { class: "lf-topbar" };
359
137
  const _hoisted_3$i = { class: "lf-topbar__inner" };
360
- const _hoisted_4$g = ["href", "aria-label"];
138
+ const _hoisted_4$f = ["href", "aria-label"];
361
139
  const _hoisted_5$c = ["src"];
362
- const _hoisted_6$7 = { class: "lf-brand__name" };
363
- const _hoisted_7$5 = ["aria-expanded"];
364
- const _hoisted_8$2 = {
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,
@@ -454,14 +232,14 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
454
232
  switcherOpen.value = false;
455
233
  onNavigate(event, svc.path, svc);
456
234
  }
457
- function onDocumentPointerDown(e) {
235
+ function onDocumentPointerDown(e2) {
458
236
  var _a, _b;
459
- const target = e.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(e) {
464
- if (e.key !== "Escape") return;
241
+ function onDocumentKeydown(e2) {
242
+ if (e2.key !== "Escape") return;
465
243
  switcherOpen.value = false;
466
244
  userOpen.value = false;
467
245
  }
@@ -509,12 +287,12 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
509
287
  alt: "",
510
288
  class: "lf-brand__logo"
511
289
  }, null, 8, _hoisted_5$c),
512
- createElementVNode("span", _hoisted_6$7, toDisplayString(__props.brandName), 1)
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$g),
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$s = /* @__PURE__ */ defineComponent({
539
317
  fill: "currentColor"
540
318
  })
541
319
  ], -1))
542
- ], 8, _hoisted_7$5),
543
- switcherOpen.value ? (openBlock(), createElementBlock("div", _hoisted_8$2, [
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$s = /* @__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),
@@ -704,14 +482,14 @@ const _hoisted_3$h = {
704
482
  viewBox: "0 0 24 24",
705
483
  "aria-hidden": "true"
706
484
  };
707
- const _hoisted_4$f = ["d"];
485
+ const _hoisted_4$e = ["d"];
708
486
  const _hoisted_5$b = { class: "toast-message" };
709
- const _hoisted_6$6 = ["onClick"];
710
- const _hoisted_7$4 = {
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$1 = ["d"];
492
+ const _hoisted_8$2 = ["d"];
715
493
  const _sfc_main$r = /* @__PURE__ */ defineComponent({
716
494
  __name: "AppToast",
717
495
  setup(__props) {
@@ -758,7 +536,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
758
536
  createElementVNode("path", {
759
537
  d: ICON_PATHS[item.type],
760
538
  fill: "currentColor"
761
- }, null, 8, _hoisted_4$f)
539
+ }, null, 8, _hoisted_4$e)
762
540
  ])),
763
541
  createElementVNode("span", _hoisted_5$b, toDisplayString(item.message), 1),
764
542
  createElementVNode("button", {
@@ -767,13 +545,13 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
767
545
  "aria-label": "닫기",
768
546
  onClick: withModifiers(($event) => unref(toastStore).remove(item.id), ["stop"])
769
547
  }, [
770
- (openBlock(), createElementBlock("svg", _hoisted_7$4, [
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$1)
552
+ }, null, 8, _hoisted_8$2)
775
553
  ]))
776
- ], 8, _hoisted_6$6)
554
+ ], 8, _hoisted_6$8)
777
555
  ], 10, _hoisted_2$m);
778
556
  }), 128))
779
557
  ]),
@@ -840,24 +618,45 @@ 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 { open, title, message, confirmText, cancelText, danger, ask, resolve };
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
661
  const _hoisted_1$o = {
863
662
  key: 0,
@@ -869,10 +668,17 @@ const _hoisted_2$l = {
869
668
  "aria-modal": "true"
870
669
  };
871
670
  const _hoisted_3$g = { class: "app-confirm__header" };
872
- const _hoisted_4$e = { class: "app-confirm__title" };
671
+ const _hoisted_4$d = { class: "app-confirm__title" };
873
672
  const _hoisted_5$a = { class: "app-confirm__body" };
874
- const _hoisted_6$5 = { class: "app-confirm__message" };
875
- const _hoisted_7$3 = { class: "app-confirm__actions" };
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"];
876
682
  const _sfc_main$p = /* @__PURE__ */ defineComponent({
877
683
  __name: "AppConfirmModal",
878
684
  setup(__props) {
@@ -884,22 +690,37 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
884
690
  unref(store).open ? (openBlock(), createElementBlock("div", _hoisted_1$o, [
885
691
  createElementVNode("div", _hoisted_2$l, [
886
692
  createElementVNode("div", _hoisted_3$g, [
887
- createElementVNode("h3", _hoisted_4$e, toDisplayString(unref(store).title), 1)
693
+ createElementVNode("h3", _hoisted_4$d, toDisplayString(unref(store).title), 1)
888
694
  ]),
889
695
  createElementVNode("div", _hoisted_5$a, [
890
- createElementVNode("p", _hoisted_6$5, toDisplayString(unref(store).message), 1)
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", _hoisted_7$3, [
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[0] || (_cache[0] = ($event) => unref(store).resolve(false))
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
- onClick: _cache[1] || (_cache[1] = ($event) => unref(store).resolve(true))
902
- }, toDisplayString(unref(store).confirmText), 3)
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,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
910
731
  };
911
732
  }
912
733
  });
913
- const AppConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-26427ddf"]]);
734
+ const AppConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-c92e7e61"]]);
914
735
  const LF_ICONS = {
915
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",
916
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",
@@ -963,7 +784,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
963
784
  },
964
785
  setup(__props) {
965
786
  const props = __props;
966
- const d = computed(() => props.path ?? (props.name ? LF_ICONS[props.name] : void 0));
787
+ const d2 = computed(() => props.path ?? (props.name ? LF_ICONS[props.name] : void 0));
967
788
  const resolvedSize = computed(
968
789
  () => typeof props.size === "number" ? `${props.size}px` : props.size
969
790
  );
@@ -977,9 +798,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
977
798
  "aria-hidden": __props.label ? void 0 : "true"
978
799
  }, [
979
800
  __props.label ? (openBlock(), createElementBlock("title", _hoisted_2$k, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
980
- d.value ? (openBlock(), createElementBlock("path", {
801
+ d2.value ? (openBlock(), createElementBlock("path", {
981
802
  key: 1,
982
- d: d.value,
803
+ d: d2.value,
983
804
  fill: "currentColor"
984
805
  }, null, 8, _hoisted_3$f)) : createCommentVNode("", true)
985
806
  ], 12, _hoisted_1$n);
@@ -1129,7 +950,7 @@ const _hoisted_3$e = {
1129
950
  class: "lf-field__error",
1130
951
  role: "alert"
1131
952
  };
1132
- const _hoisted_4$d = {
953
+ const _hoisted_4$c = {
1133
954
  key: 2,
1134
955
  class: "lf-field__hint"
1135
956
  };
@@ -1156,7 +977,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1156
977
  __props.required ? (openBlock(), createElementBlock("span", _hoisted_2$j, "*")) : createCommentVNode("", true)
1157
978
  ], 8, _hoisted_1$k)) : createCommentVNode("", true),
1158
979
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
1159
- __props.error ? (openBlock(), createElementBlock("p", _hoisted_3$e, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", _hoisted_4$d, toDisplayString(__props.hint), 1)) : createCommentVNode("", 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)
1160
981
  ], 2);
1161
982
  };
1162
983
  }
@@ -1168,7 +989,7 @@ const _hoisted_2$i = {
1168
989
  class: "lf-control-wrap__icon lf-control-wrap__icon--left"
1169
990
  };
1170
991
  const _hoisted_3$d = ["id", "type", "placeholder", "disabled", "readonly", "required", "aria-invalid"];
1171
- const _hoisted_4$c = ["aria-label"];
992
+ const _hoisted_4$b = ["aria-label"];
1172
993
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
1173
994
  ...{ inheritAttrs: false },
1174
995
  __name: "LfTextField",
@@ -1246,7 +1067,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1246
1067
  name: revealed.value ? "visibility_off" : "visibility",
1247
1068
  size: "1.125rem"
1248
1069
  }, null, 8, ["name"])
1249
- ], 8, _hoisted_4$c)) : __props.clearable && !!model.value && !__props.disabled && !__props.readonly ? (openBlock(), createElementBlock("button", {
1070
+ ], 8, _hoisted_4$b)) : __props.clearable && !!model.value && !__props.disabled && !__props.readonly ? (openBlock(), createElementBlock("button", {
1250
1071
  key: 2,
1251
1072
  type: "button",
1252
1073
  class: "lf-control-action",
@@ -1348,7 +1169,7 @@ const LfTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data
1348
1169
  const _hoisted_1$h = { class: "lf-control-wrap" };
1349
1170
  const _hoisted_2$g = ["id", "disabled", "required", "aria-invalid"];
1350
1171
  const _hoisted_3$c = ["disabled"];
1351
- const _hoisted_4$b = ["value", "disabled"];
1172
+ const _hoisted_4$a = ["value", "disabled"];
1352
1173
  const _hoisted_5$9 = { class: "lf-control-wrap__icon lf-control-wrap__icon--right" };
1353
1174
  const _sfc_main$h = /* @__PURE__ */ defineComponent({
1354
1175
  ...{ inheritAttrs: false },
@@ -1402,7 +1223,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1402
1223
  key: String(opt.value),
1403
1224
  value: opt.value,
1404
1225
  disabled: opt.disabled
1405
- }, toDisplayString(opt.label), 9, _hoisted_4$b);
1226
+ }, toDisplayString(opt.label), 9, _hoisted_4$a);
1406
1227
  }), 128))
1407
1228
  ], 16, _hoisted_2$g), [
1408
1229
  [vModelSelect, model.value]
@@ -1430,7 +1251,7 @@ const _hoisted_3$b = {
1430
1251
  key: 0,
1431
1252
  class: "lf-check__text"
1432
1253
  };
1433
- const _hoisted_4$a = { class: "lf-check__label" };
1254
+ const _hoisted_4$9 = { class: "lf-check__label" };
1434
1255
  const _hoisted_5$8 = {
1435
1256
  key: 0,
1436
1257
  class: "lf-check__desc"
@@ -1470,7 +1291,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1470
1291
  })
1471
1292
  ]),
1472
1293
  __props.label || __props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$b, [
1473
- createElementVNode("span", _hoisted_4$a, [
1294
+ createElementVNode("span", _hoisted_4$9, [
1474
1295
  renderSlot(_ctx.$slots, "default", {}, () => [
1475
1296
  createTextVNode(toDisplayString(__props.label), 1)
1476
1297
  ], true)
@@ -1491,7 +1312,7 @@ const _hoisted_3$a = {
1491
1312
  key: 0,
1492
1313
  class: "lf-switch__desc"
1493
1314
  };
1494
- const _hoisted_4$9 = ["disabled"];
1315
+ const _hoisted_4$8 = ["disabled"];
1495
1316
  const _sfc_main$f = /* @__PURE__ */ defineComponent({
1496
1317
  ...{ inheritAttrs: false },
1497
1318
  __name: "LfSwitch",
@@ -1525,7 +1346,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1525
1346
  type: "checkbox",
1526
1347
  role: "switch",
1527
1348
  disabled: __props.disabled
1528
- }), null, 16, _hoisted_4$9), [
1349
+ }), null, 16, _hoisted_4$8), [
1529
1350
  [vModelCheckbox, model.value]
1530
1351
  ]),
1531
1352
  _cache[1] || (_cache[1] = createElementVNode("span", {
@@ -1549,13 +1370,13 @@ const _hoisted_2$d = {
1549
1370
  "aria-hidden": "true"
1550
1371
  };
1551
1372
  const _hoisted_3$9 = ["name", "value", "disabled"];
1552
- const _hoisted_4$8 = { class: "lf-radio__text" };
1373
+ const _hoisted_4$7 = { class: "lf-radio__text" };
1553
1374
  const _hoisted_5$7 = { class: "lf-radio__label" };
1554
- const _hoisted_6$4 = {
1375
+ const _hoisted_6$6 = {
1555
1376
  key: 0,
1556
1377
  class: "lf-radio__desc"
1557
1378
  };
1558
- const _hoisted_7$2 = {
1379
+ const _hoisted_7$3 = {
1559
1380
  key: 1,
1560
1381
  class: "lf-radio-group__error",
1561
1382
  role: "alert"
@@ -1613,13 +1434,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1613
1434
  class: "lf-radio__dot",
1614
1435
  "aria-hidden": "true"
1615
1436
  }, null, -1)),
1616
- createElementVNode("span", _hoisted_4$8, [
1437
+ createElementVNode("span", _hoisted_4$7, [
1617
1438
  createElementVNode("span", _hoisted_5$7, toDisplayString(opt.label), 1),
1618
- opt.description ? (openBlock(), createElementBlock("span", _hoisted_6$4, toDisplayString(opt.description), 1)) : createCommentVNode("", true)
1439
+ opt.description ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(opt.description), 1)) : createCommentVNode("", true)
1619
1440
  ])
1620
1441
  ], 2);
1621
1442
  }), 128)),
1622
- __props.error ? (openBlock(), createElementBlock("p", _hoisted_7$2, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", _hoisted_8, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
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)
1623
1444
  ], 2);
1624
1445
  };
1625
1446
  }
@@ -1631,13 +1452,13 @@ const _hoisted_2$c = {
1631
1452
  class: "lf-modal__header"
1632
1453
  };
1633
1454
  const _hoisted_3$8 = { class: "lf-modal__heading" };
1634
- const _hoisted_4$7 = ["id"];
1455
+ const _hoisted_4$6 = ["id"];
1635
1456
  const _hoisted_5$6 = {
1636
1457
  key: 0,
1637
1458
  class: "lf-modal__subtitle"
1638
1459
  };
1639
- const _hoisted_6$3 = { class: "lf-modal__body" };
1640
- const _hoisted_7$1 = {
1460
+ const _hoisted_6$5 = { class: "lf-modal__body" };
1461
+ const _hoisted_7$2 = {
1641
1462
  key: 1,
1642
1463
  class: "lf-modal__footer"
1643
1464
  };
@@ -1677,13 +1498,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1677
1498
  downOnScrim = false;
1678
1499
  if (!props.persistent) close("scrim");
1679
1500
  }
1680
- function onKeydown(e) {
1681
- if (e.key === "Escape" && !props.persistent) {
1682
- e.stopPropagation();
1501
+ function onKeydown(e2) {
1502
+ if (e2.key === "Escape" && !props.persistent) {
1503
+ e2.stopPropagation();
1683
1504
  close("esc");
1684
1505
  return;
1685
1506
  }
1686
- if (e.key !== "Tab" || !panel.value) return;
1507
+ if (e2.key !== "Tab" || !panel.value) return;
1687
1508
  const focusables = panel.value.querySelectorAll(
1688
1509
  'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
1689
1510
  );
@@ -1691,11 +1512,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1691
1512
  const first = focusables[0];
1692
1513
  const last = focusables[focusables.length - 1];
1693
1514
  const active = document.activeElement;
1694
- if (e.shiftKey && (active === first || active === panel.value)) {
1695
- e.preventDefault();
1515
+ if (e2.shiftKey && (active === first || active === panel.value)) {
1516
+ e2.preventDefault();
1696
1517
  last.focus();
1697
- } else if (!e.shiftKey && active === last) {
1698
- e.preventDefault();
1518
+ } else if (!e2.shiftKey && active === last) {
1519
+ e2.preventDefault();
1699
1520
  first.focus();
1700
1521
  }
1701
1522
  }
@@ -1758,7 +1579,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1758
1579
  createElementVNode("h2", {
1759
1580
  id: unref(titleId),
1760
1581
  class: "lf-modal__title"
1761
- }, toDisplayString(__props.title), 9, _hoisted_4$7),
1582
+ }, toDisplayString(__props.title), 9, _hoisted_4$6),
1762
1583
  __props.subtitle ? (openBlock(), createElementBlock("p", _hoisted_5$6, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true)
1763
1584
  ])
1764
1585
  ], true),
@@ -1770,10 +1591,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1770
1591
  onClick: _cache[0] || (_cache[0] = ($event) => close("close"))
1771
1592
  }, null, 8, ["label"])) : createCommentVNode("", true)
1772
1593
  ])) : createCommentVNode("", true),
1773
- createElementVNode("div", _hoisted_6$3, [
1594
+ createElementVNode("div", _hoisted_6$5, [
1774
1595
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1775
1596
  ]),
1776
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_7$1, [
1597
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_7$2, [
1777
1598
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
1778
1599
  ])) : createCommentVNode("", true)
1779
1600
  ], 42, _hoisted_1$d)
@@ -1792,11 +1613,15 @@ const _hoisted_1$c = {
1792
1613
  };
1793
1614
  const _hoisted_2$b = { class: "lf-card__title" };
1794
1615
  const _hoisted_3$7 = {
1616
+ key: 1,
1617
+ class: "lf-card__count"
1618
+ };
1619
+ const _hoisted_4$5 = {
1795
1620
  key: 0,
1796
1621
  class: "lf-card__actions"
1797
1622
  };
1798
- const _hoisted_4$6 = { class: "lf-card__body" };
1799
- const _hoisted_5$5 = {
1623
+ const _hoisted_5$5 = { class: "lf-card__body" };
1624
+ const _hoisted_6$4 = {
1800
1625
  key: 1,
1801
1626
  class: "lf-card__foot"
1802
1627
  };
@@ -1806,52 +1631,58 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1806
1631
  title: {},
1807
1632
  icon: {},
1808
1633
  iconPath: {},
1809
- glass: { type: Boolean, default: true },
1810
- padding: { default: "md" }
1634
+ count: {},
1635
+ glass: { type: Boolean },
1636
+ padding: { default: "md" },
1637
+ flush: { type: Boolean }
1811
1638
  },
1812
1639
  setup(__props) {
1813
1640
  return (_ctx, _cache) => {
1814
1641
  return openBlock(), createElementBlock("section", {
1815
- class: normalizeClass(["lf-card", [__props.glass ? "lf-card--glass" : "lf-card--solid", `lf-card--pad-${__props.padding}`]])
1642
+ class: normalizeClass(["lf-card", [{ "lf-card--glass": __props.glass }, `lf-card--pad-${__props.flush ? "none" : __props.padding}`]])
1816
1643
  }, [
1817
1644
  __props.title || _ctx.$slots.header || _ctx.$slots.actions ? (openBlock(), createElementBlock("header", _hoisted_1$c, [
1818
1645
  renderSlot(_ctx.$slots, "header", {}, () => [
1819
- createElementVNode("h3", _hoisted_2$b, [
1820
- __props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
1821
- key: 0,
1822
- name: __props.icon,
1823
- path: __props.iconPath,
1824
- size: "1.125rem",
1825
- class: "lf-card__icon"
1826
- }, null, 8, ["name", "path"])) : createCommentVNode("", true),
1827
- createTextVNode(" " + toDisplayString(__props.title), 1)
1828
- ])
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)
1829
1655
  ], true),
1830
- _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
1656
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "lf-card__spacer" }, null, -1)),
1657
+ _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
1831
1658
  renderSlot(_ctx.$slots, "actions", {}, void 0, true)
1832
1659
  ])) : createCommentVNode("", true)
1833
1660
  ])) : createCommentVNode("", true),
1834
- createElementVNode("div", _hoisted_4$6, [
1661
+ createElementVNode("div", _hoisted_5$5, [
1835
1662
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1836
1663
  ]),
1837
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_5$5, [
1664
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_6$4, [
1838
1665
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
1839
1666
  ])) : createCommentVNode("", true)
1840
1667
  ], 2);
1841
1668
  };
1842
1669
  }
1843
1670
  });
1844
- const LfCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c19bc9b0"]]);
1671
+ const LfCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-82f85c72"]]);
1845
1672
  const _hoisted_1$b = { class: "lf-page-header" };
1846
- const _hoisted_2$a = { class: "lf-page-header__text" };
1673
+ const _hoisted_2$a = { class: "lf-page-header__title-box" };
1847
1674
  const _hoisted_3$6 = { class: "lf-page-header__title" };
1848
- const _hoisted_4$5 = {
1675
+ const _hoisted_4$4 = {
1849
1676
  key: 0,
1850
- class: "lf-page-header__desc"
1677
+ class: "lf-page-header__count"
1851
1678
  };
1852
1679
  const _hoisted_5$4 = {
1853
1680
  key: 0,
1854
- class: "lf-page-header__actions"
1681
+ class: "lf-page-header__tools"
1682
+ };
1683
+ const _hoisted_6$3 = {
1684
+ key: 1,
1685
+ class: "lf-page-header__desc"
1855
1686
  };
1856
1687
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
1857
1688
  __name: "LfPageHeader",
@@ -1859,38 +1690,44 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1859
1690
  title: {},
1860
1691
  description: {},
1861
1692
  icon: {},
1862
- iconPath: {}
1693
+ iconPath: {},
1694
+ count: {}
1863
1695
  },
1864
1696
  setup(__props) {
1697
+ const slots = useSlots();
1698
+ const hasTools = computed(() => !!slots.filters || !!slots.actions);
1865
1699
  return (_ctx, _cache) => {
1866
- return openBlock(), createElementBlock("header", _hoisted_1$b, [
1700
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
1867
1701
  createElementVNode("div", _hoisted_2$a, [
1868
1702
  createElementVNode("h1", _hoisted_3$6, [
1869
1703
  __props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
1870
1704
  key: 0,
1871
1705
  name: __props.icon,
1872
1706
  path: __props.iconPath,
1873
- size: "1.5rem",
1707
+ size: "1.375rem",
1874
1708
  class: "lf-page-header__icon"
1875
1709
  }, null, 8, ["name", "path"])) : createCommentVNode("", true),
1876
1710
  renderSlot(_ctx.$slots, "title", {}, () => [
1877
1711
  createTextVNode(toDisplayString(__props.title), 1)
1878
1712
  ], true)
1879
1713
  ]),
1880
- __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("p", _hoisted_4$5, [
1881
- renderSlot(_ctx.$slots, "description", {}, () => [
1882
- createTextVNode(toDisplayString(__props.description), 1)
1883
- ], true)
1884
- ])) : createCommentVNode("", true)
1714
+ __props.count !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(__props.count), 1)) : createCommentVNode("", true)
1885
1715
  ]),
1886
- _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
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)),
1887
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)
1888
1725
  ])) : createCommentVNode("", true)
1889
1726
  ]);
1890
1727
  };
1891
1728
  }
1892
1729
  });
1893
- const LfPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-b887cef1"]]);
1730
+ const LfPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-fb293ea0"]]);
1894
1731
  const _hoisted_1$a = {
1895
1732
  key: 0,
1896
1733
  class: "lf-badge__dot",
@@ -1944,17 +1781,17 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1944
1781
  });
1945
1782
  const LfBadge = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-ced4b85a"]]);
1946
1783
  const _hoisted_1$9 = ["role"];
1947
- const _hoisted_2$8 = { class: "lf-alert__content" };
1948
- const _hoisted_3$5 = {
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 = {
1949
1790
  key: 0,
1950
1791
  class: "lf-alert__title"
1951
1792
  };
1952
- const _hoisted_4$4 = {
1953
- key: 1,
1954
- class: "lf-alert__message"
1955
- };
1956
1793
  const _hoisted_5$3 = {
1957
- key: 0,
1794
+ key: 2,
1958
1795
  class: "lf-alert__actions"
1959
1796
  };
1960
1797
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
@@ -1966,7 +1803,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1966
1803
  icon: {},
1967
1804
  iconPath: {},
1968
1805
  closable: { type: Boolean },
1969
- closeLabel: { default: "닫기" }
1806
+ closeLabel: { default: "닫기" },
1807
+ dense: { type: Boolean }
1970
1808
  },
1971
1809
  emits: ["close"],
1972
1810
  setup(__props, { emit: __emit }) {
@@ -1979,28 +1817,32 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1979
1817
  };
1980
1818
  return (_ctx, _cache) => {
1981
1819
  return openBlock(), createElementBlock("div", {
1982
- class: normalizeClass(["lf-alert", `lf-alert--${__props.tone}`]),
1820
+ class: normalizeClass(["lf-alert", [`lf-alert--${__props.tone}`, { "lf-alert--dense": __props.dense }]]),
1983
1821
  role: __props.tone === "error" ? "alert" : "status"
1984
1822
  }, [
1985
- createVNode(LfIcon, {
1986
- class: "lf-alert__icon",
1987
- name: __props.icon ?? TONE_ICON[__props.tone],
1988
- path: __props.iconPath,
1989
- size: "1.25rem"
1990
- }, null, 8, ["name", "path"]),
1991
- createElementVNode("div", _hoisted_2$8, [
1992
- __props.title ? (openBlock(), createElementBlock("p", _hoisted_3$5, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
1993
- _ctx.$slots.default || __props.message ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
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
+ }, [
1994
1836
  renderSlot(_ctx.$slots, "default", {}, () => [
1995
1837
  createTextVNode(toDisplayString(__props.message), 1)
1996
1838
  ], true)
1839
+ ], 2)) : createCommentVNode("", true),
1840
+ _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
1841
+ renderSlot(_ctx.$slots, "actions", {}, void 0, true)
1997
1842
  ])) : createCommentVNode("", true)
1998
1843
  ]),
1999
- _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
2000
- renderSlot(_ctx.$slots, "actions", {}, void 0, true)
2001
- ])) : createCommentVNode("", true),
2002
1844
  __props.closable ? (openBlock(), createBlock(LfIconButton, {
2003
- key: 1,
1845
+ key: 0,
2004
1846
  class: "lf-alert__close",
2005
1847
  icon: "close",
2006
1848
  size: "sm",
@@ -2011,7 +1853,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2011
1853
  };
2012
1854
  }
2013
1855
  });
2014
- const LfAlert = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-01c64756"]]);
1856
+ const LfAlert = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-99c3bfc9"]]);
2015
1857
  const _hoisted_1$8 = ["title"];
2016
1858
  const _hoisted_2$7 = ["src", "alt"];
2017
1859
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
@@ -2034,7 +1876,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2034
1876
  const tone = computed(() => {
2035
1877
  const name = props.name ?? "";
2036
1878
  let hash = 0;
2037
- for (let i = 0; i < name.length; i++) hash = hash * 31 + name.charCodeAt(i) | 0;
1879
+ for (let i2 = 0; i2 < name.length; i2++) hash = hash * 31 + name.charCodeAt(i2) | 0;
2038
1880
  return Math.abs(hash) % 7;
2039
1881
  });
2040
1882
  return (_ctx, _cache) => {
@@ -2060,7 +1902,7 @@ const LfAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v
2060
1902
  const _hoisted_1$7 = { class: "lf-table-wrap" };
2061
1903
  const _hoisted_2$6 = ["aria-sort"];
2062
1904
  const _hoisted_3$4 = ["onClick"];
2063
- const _hoisted_4$3 = { key: 1 };
1905
+ const _hoisted_4$2 = { key: 1 };
2064
1906
  const _hoisted_5$2 = ["colspan"];
2065
1907
  const _hoisted_6$2 = ["tabindex", "onClick", "onKeydown"];
2066
1908
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
@@ -2081,8 +1923,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2081
1923
  setup(__props, { emit: __emit }) {
2082
1924
  const props = __props;
2083
1925
  const emit = __emit;
2084
- function keyOf(row, i) {
2085
- return props.rowKey ? String(row[props.rowKey] ?? i) : i;
1926
+ function keyOf(row, i2) {
1927
+ return props.rowKey ? String(row[props.rowKey] ?? i2) : i2;
2086
1928
  }
2087
1929
  function toggleSort(key) {
2088
1930
  var _a;
@@ -2144,7 +1986,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2144
1986
  ])], 2);
2145
1987
  }), 128))
2146
1988
  ]);
2147
- }), 128)) : __props.rows.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_4$3, [
1989
+ }), 128)) : __props.rows.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_4$2, [
2148
1990
  createElementVNode("td", {
2149
1991
  class: "lf-table__empty",
2150
1992
  colspan: __props.columns.length
@@ -2153,9 +1995,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2153
1995
  createTextVNode(toDisplayString(__props.emptyText), 1)
2154
1996
  ], true)
2155
1997
  ], 8, _hoisted_5$2)
2156
- ])) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.rows, (row, i) => {
1998
+ ])) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.rows, (row, i2) => {
2157
1999
  return openBlock(), createElementBlock("tr", {
2158
- key: keyOf(row, i),
2000
+ key: keyOf(row, i2),
2159
2001
  class: normalizeClass(["lf-table__row", { "lf-table__row--clickable": __props.clickable }]),
2160
2002
  tabindex: __props.clickable ? 0 : void 0,
2161
2003
  onClick: ($event) => __props.clickable && emit("rowClick", row),
@@ -2170,7 +2012,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2170
2012
  renderSlot(_ctx.$slots, `cell-${col.key}`, {
2171
2013
  row,
2172
2014
  value: row[col.key],
2173
- index: i
2015
+ index: i2
2174
2016
  }, () => [
2175
2017
  createTextVNode(toDisplayString(row[col.key] ?? "—"), 1)
2176
2018
  ], true)
@@ -2194,14 +2036,14 @@ const _hoisted_3$3 = {
2194
2036
  key: 1,
2195
2037
  class: "lf-pagination__btns"
2196
2038
  };
2197
- const _hoisted_4$2 = ["disabled"];
2039
+ const _hoisted_4$1 = ["disabled"];
2198
2040
  const _hoisted_5$1 = {
2199
2041
  key: 0,
2200
2042
  class: "lf-pagination__gap",
2201
2043
  "aria-hidden": "true"
2202
2044
  };
2203
2045
  const _hoisted_6$1 = ["aria-current", "onClick"];
2204
- const _hoisted_7 = ["disabled"];
2046
+ const _hoisted_7$1 = ["disabled"];
2205
2047
  const ELLIPSIS = -1;
2206
2048
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2207
2049
  __name: "LfPagination",
@@ -2224,7 +2066,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2224
2066
  const last = totalPages.value;
2225
2067
  const cur = Math.min(Math.max(1, model.value), last);
2226
2068
  const window2 = props.siblings * 2 + 5;
2227
- if (last <= window2) return Array.from({ length: last }, (_, i) => i + 1);
2069
+ if (last <= window2) return Array.from({ length: last }, (_, i2) => i2 + 1);
2228
2070
  const left = Math.max(2, cur - props.siblings);
2229
2071
  const right = Math.min(last - 1, cur + props.siblings);
2230
2072
  const out = [1];
@@ -2261,10 +2103,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2261
2103
  name: "chevron_left",
2262
2104
  size: "1rem"
2263
2105
  })
2264
- ], 8, _hoisted_4$2),
2265
- (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (p, i) => {
2106
+ ], 8, _hoisted_4$1),
2107
+ (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (p, i2) => {
2266
2108
  return openBlock(), createElementBlock(Fragment, {
2267
- key: `${p}-${i}`
2109
+ key: `${p}-${i2}`
2268
2110
  }, [
2269
2111
  p === ELLIPSIS ? (openBlock(), createElementBlock("span", _hoisted_5$1, "…")) : (openBlock(), createElementBlock("button", {
2270
2112
  key: 1,
@@ -2286,20 +2128,19 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2286
2128
  name: "chevron_right",
2287
2129
  size: "1rem"
2288
2130
  })
2289
- ], 8, _hoisted_7)
2131
+ ], 8, _hoisted_7$1)
2290
2132
  ])) : createCommentVNode("", true)
2291
2133
  ], 8, _hoisted_1$6)) : createCommentVNode("", true);
2292
2134
  };
2293
2135
  }
2294
2136
  });
2295
2137
  const LfPagination = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-53fce087"]]);
2296
- const _hoisted_1$5 = { class: "lf-empty" };
2297
- const _hoisted_2$4 = { class: "lf-empty__title" };
2298
- const _hoisted_3$2 = {
2138
+ const _hoisted_1$5 = { class: "lf-empty__title" };
2139
+ const _hoisted_2$4 = {
2299
2140
  key: 1,
2300
2141
  class: "lf-empty__desc"
2301
2142
  };
2302
- const _hoisted_4$1 = {
2143
+ const _hoisted_3$2 = {
2303
2144
  key: 2,
2304
2145
  class: "lf-empty__action"
2305
2146
  };
@@ -2309,11 +2150,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2309
2150
  title: { default: "표시할 내용이 없습니다." },
2310
2151
  description: {},
2311
2152
  icon: {},
2312
- iconPath: {}
2153
+ iconPath: {},
2154
+ tone: { default: "muted" }
2313
2155
  },
2314
2156
  setup(__props) {
2315
2157
  return (_ctx, _cache) => {
2316
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
2158
+ return openBlock(), createElementBlock("div", {
2159
+ class: normalizeClass(["lf-empty", `lf-empty--${__props.tone}`])
2160
+ }, [
2317
2161
  __props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
2318
2162
  key: 0,
2319
2163
  name: __props.icon,
@@ -2321,24 +2165,24 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2321
2165
  size: "2.5rem",
2322
2166
  class: "lf-empty__icon"
2323
2167
  }, null, 8, ["name", "path"])) : createCommentVNode("", true),
2324
- createElementVNode("p", _hoisted_2$4, [
2168
+ createElementVNode("p", _hoisted_1$5, [
2325
2169
  renderSlot(_ctx.$slots, "title", {}, () => [
2326
2170
  createTextVNode(toDisplayString(__props.title), 1)
2327
2171
  ], true)
2328
2172
  ]),
2329
- __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("p", _hoisted_3$2, [
2173
+ __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("p", _hoisted_2$4, [
2330
2174
  renderSlot(_ctx.$slots, "description", {}, () => [
2331
2175
  createTextVNode(toDisplayString(__props.description), 1)
2332
2176
  ], true)
2333
2177
  ])) : createCommentVNode("", true),
2334
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
2178
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
2335
2179
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
2336
2180
  ])) : createCommentVNode("", true)
2337
- ]);
2181
+ ], 2);
2338
2182
  };
2339
2183
  }
2340
2184
  });
2341
- const LfEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-02fb3f51"]]);
2185
+ const LfEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-3ba5293d"]]);
2342
2186
  const _hoisted_1$4 = {
2343
2187
  key: 0,
2344
2188
  class: "lf-skeleton-group",
@@ -2378,15 +2222,19 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2378
2222
  }
2379
2223
  });
2380
2224
  const LfSkeleton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-a01556ce"]]);
2381
- const _hoisted_1$3 = { class: "lf-stat__head" };
2382
- const _hoisted_2$3 = { class: "lf-stat__label" };
2383
- const _hoisted_3$1 = {
2384
- key: 0,
2385
- class: "lf-stat__icon"
2225
+ const _hoisted_1$3 = {
2226
+ class: "lf-stat__badge",
2227
+ "aria-hidden": "true"
2386
2228
  };
2229
+ const _hoisted_2$3 = { class: "lf-stat__body" };
2230
+ const _hoisted_3$1 = { class: "lf-stat__label" };
2387
2231
  const _hoisted_4 = { class: "lf-stat__value-row" };
2388
2232
  const _hoisted_5 = { class: "lf-stat__value" };
2389
2233
  const _hoisted_6 = {
2234
+ key: 0,
2235
+ class: "lf-stat__unit"
2236
+ };
2237
+ const _hoisted_7 = {
2390
2238
  key: 0,
2391
2239
  class: "lf-stat__hint"
2392
2240
  };
@@ -2395,13 +2243,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2395
2243
  props: {
2396
2244
  label: {},
2397
2245
  value: {},
2246
+ unit: {},
2398
2247
  icon: {},
2399
2248
  iconPath: {},
2249
+ hint: {},
2250
+ tone: { default: "neutral" },
2400
2251
  delta: {},
2401
2252
  deltaUnit: { default: "%" },
2402
2253
  invert: { type: Boolean },
2403
- hint: {},
2404
- glass: { type: Boolean, default: true }
2254
+ glass: { type: Boolean },
2255
+ href: {}
2405
2256
  },
2406
2257
  setup(__props) {
2407
2258
  const props = __props;
@@ -2411,42 +2262,47 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2411
2262
  return good ? "lf-stat__delta--up" : "lf-stat__delta--down";
2412
2263
  });
2413
2264
  return (_ctx, _cache) => {
2414
- return openBlock(), createElementBlock("div", {
2415
- class: normalizeClass(["lf-stat", { "lf-stat--glass": __props.glass }])
2416
- }, [
2417
- createElementVNode("div", _hoisted_1$3, [
2418
- createElementVNode("span", _hoisted_2$3, toDisplayString(__props.label), 1),
2419
- __props.icon || __props.iconPath ? (openBlock(), createElementBlock("span", _hoisted_3$1, [
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, [
2420
2271
  createVNode(LfIcon, {
2421
2272
  name: __props.icon,
2422
2273
  path: __props.iconPath,
2423
2274
  size: "1.125rem"
2424
2275
  }, null, 8, ["name", "path"])
2425
- ])) : createCommentVNode("", true)
2426
- ]),
2427
- createElementVNode("div", _hoisted_4, [
2428
- createElementVNode("strong", _hoisted_5, [
2429
- renderSlot(_ctx.$slots, "default", {}, () => [
2430
- createTextVNode(toDisplayString(__props.value), 1)
2431
- ], true)
2432
2276
  ]),
2433
- __props.delta != null ? (openBlock(), createElementBlock("span", {
2434
- key: 0,
2435
- class: normalizeClass(["lf-stat__delta", deltaClass.value])
2436
- }, [
2437
- createVNode(LfIcon, {
2438
- name: __props.delta >= 0 ? "arrow_upward" : "arrow_downward",
2439
- size: "0.875rem"
2440
- }, null, 8, ["name"]),
2441
- createTextVNode(" " + toDisplayString(Math.abs(__props.delta)) + toDisplayString(__props.deltaUnit), 1)
2442
- ], 2)) : createCommentVNode("", true)
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
+ ])
2443
2299
  ]),
2444
- __props.hint ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
2445
- ], 2);
2300
+ _: 3
2301
+ }, 8, ["href", "class"]);
2446
2302
  };
2447
2303
  }
2448
2304
  });
2449
- const LfStatCard = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-5cd1dfa8"]]);
2305
+ const LfStatCard = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-e0efc665"]]);
2450
2306
  const _hoisted_1$2 = ["aria-describedby"];
2451
2307
  const _hoisted_2$2 = ["id"];
2452
2308
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
@@ -2515,12 +2371,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2515
2371
  open.value = false;
2516
2372
  emit("select", item);
2517
2373
  }
2518
- function onPointerDown(e) {
2374
+ function onPointerDown(e2) {
2519
2375
  var _a;
2520
- if (!((_a = root.value) == null ? void 0 : _a.contains(e.target))) open.value = false;
2376
+ if (!((_a = root.value) == null ? void 0 : _a.contains(e2.target))) open.value = false;
2521
2377
  }
2522
- function onKeydown(e) {
2523
- if (e.key === "Escape") open.value = false;
2378
+ function onKeydown(e2) {
2379
+ if (e2.key === "Escape") open.value = false;
2524
2380
  }
2525
2381
  watch(open, (isOpen) => {
2526
2382
  if (isOpen) {
@@ -2621,6 +2477,125 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2621
2477
  }
2622
2478
  });
2623
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
+ }
2624
2599
  function useToast() {
2625
2600
  const store = useToastStore();
2626
2601
  return {
@@ -2636,12 +2611,13 @@ function useConfirm() {
2636
2611
  return (opts) => store.ask(opts);
2637
2612
  }
2638
2613
  export {
2614
+ ApiError,
2639
2615
  AppConfirmModal,
2640
2616
  AppLoadingOverlay,
2641
2617
  AppShell,
2642
2618
  AppToast,
2643
2619
  DARK_THEME,
2644
- DEFAULT_THEME,
2620
+ b as DEFAULT_THEME,
2645
2621
  LF_ICONS,
2646
2622
  LIGHT_THEME,
2647
2623
  LfAlert,
@@ -2669,15 +2645,16 @@ export {
2669
2645
  LfTextField,
2670
2646
  LfTextarea,
2671
2647
  LfTooltip,
2672
- applySemanticPalette,
2648
+ c as applySemanticPalette,
2673
2649
  applyTheme,
2674
- colorToRgb,
2675
- contrastRatio,
2676
- deriveSemanticPalette,
2677
- hexToRgb,
2650
+ d as colorToRgb,
2651
+ e as contrastRatio,
2652
+ createApiClient,
2653
+ f as deriveSemanticPalette,
2654
+ h as hexToRgb,
2678
2655
  initTheme,
2679
- isLightBackground,
2680
- luminance,
2656
+ i as isLightBackground,
2657
+ l as luminance,
2681
2658
  useConfirm,
2682
2659
  useConfirmStore,
2683
2660
  useLoadingStore,