@loafacto/ui 0.7.0 → 0.8.1

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();
@@ -359,21 +137,21 @@ const _hoisted_2$n = { class: "lf-topbar" };
359
137
  const _hoisted_3$i = { class: "lf-topbar__inner" };
360
138
  const _hoisted_4$g = ["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$8 = ["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,7 +287,7 @@ 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" })
@@ -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$8),
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),
@@ -706,12 +484,12 @@ const _hoisted_3$h = {
706
484
  };
707
485
  const _hoisted_4$f = ["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$7 = {
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) {
@@ -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$7, [
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,
@@ -871,8 +670,15 @@ const _hoisted_2$l = {
871
670
  const _hoisted_3$g = { class: "app-confirm__header" };
872
671
  const _hoisted_4$e = { 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$6 = {
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) {
@@ -887,19 +693,34 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
887
693
  createElementVNode("h3", _hoisted_4$e, 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$6, [
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);
@@ -1551,11 +1372,11 @@ const _hoisted_2$d = {
1551
1372
  const _hoisted_3$9 = ["name", "value", "disabled"];
1552
1373
  const _hoisted_4$8 = { 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$5 = {
1559
1380
  key: 1,
1560
1381
  class: "lf-radio-group__error",
1561
1382
  role: "alert"
@@ -1615,11 +1436,11 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1615
1436
  }, null, -1)),
1616
1437
  createElementVNode("span", _hoisted_4$8, [
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$5, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", _hoisted_8, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
1623
1444
  ], 2);
1624
1445
  };
1625
1446
  }
@@ -1636,8 +1457,8 @@ 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$4 = {
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
  }
@@ -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$4, [
1777
1598
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
1778
1599
  ])) : createCommentVNode("", true)
1779
1600
  ], 42, _hoisted_1$d)
@@ -1790,13 +1611,21 @@ const _hoisted_1$c = {
1790
1611
  key: 0,
1791
1612
  class: "lf-card__head"
1792
1613
  };
1793
- const _hoisted_2$b = { class: "lf-card__title" };
1794
- const _hoisted_3$7 = {
1614
+ const _hoisted_2$b = {
1795
1615
  key: 0,
1796
- class: "lf-card__actions"
1616
+ class: "lf-card__icon"
1617
+ };
1618
+ const _hoisted_3$7 = { class: "lf-card__title" };
1619
+ const _hoisted_4$6 = {
1620
+ key: 1,
1621
+ class: "lf-card__count"
1797
1622
  };
1798
- const _hoisted_4$6 = { class: "lf-card__body" };
1799
1623
  const _hoisted_5$5 = {
1624
+ key: 0,
1625
+ class: "lf-card__actions"
1626
+ };
1627
+ const _hoisted_6$4 = { class: "lf-card__body" };
1628
+ const _hoisted_7$3 = {
1800
1629
  key: 1,
1801
1630
  class: "lf-card__foot"
1802
1631
  };
@@ -1806,52 +1635,64 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1806
1635
  title: {},
1807
1636
  icon: {},
1808
1637
  iconPath: {},
1809
- glass: { type: Boolean, default: true },
1810
- padding: { default: "md" }
1638
+ count: {},
1639
+ glass: { type: Boolean },
1640
+ padding: { default: "md" },
1641
+ flush: { type: Boolean }
1811
1642
  },
1812
1643
  setup(__props) {
1813
1644
  return (_ctx, _cache) => {
1814
1645
  return openBlock(), createElementBlock("section", {
1815
- class: normalizeClass(["lf-card", [__props.glass ? "lf-card--glass" : "lf-card--solid", `lf-card--pad-${__props.padding}`]])
1646
+ class: normalizeClass(["lf-card", [{ "lf-card--glass": __props.glass }, `lf-card--pad-${__props.flush ? "none" : __props.padding}`]])
1816
1647
  }, [
1817
1648
  __props.title || _ctx.$slots.header || _ctx.$slots.actions ? (openBlock(), createElementBlock("header", _hoisted_1$c, [
1818
1649
  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
- ])
1650
+ __props.icon || __props.iconPath || _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_2$b, [
1651
+ renderSlot(_ctx.$slots, "icon", {}, () => [
1652
+ createVNode(LfIcon, {
1653
+ name: __props.icon,
1654
+ path: __props.iconPath,
1655
+ size: "1rem"
1656
+ }, null, 8, ["name", "path"])
1657
+ ], true)
1658
+ ])) : createCommentVNode("", true),
1659
+ createElementVNode("h3", _hoisted_3$7, toDisplayString(__props.title), 1),
1660
+ __props.count !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_4$6, toDisplayString(__props.count), 1)) : createCommentVNode("", true)
1829
1661
  ], true),
1830
- _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
1662
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "lf-card__spacer" }, null, -1)),
1663
+ _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$5, [
1831
1664
  renderSlot(_ctx.$slots, "actions", {}, void 0, true)
1832
1665
  ])) : createCommentVNode("", true)
1833
1666
  ])) : createCommentVNode("", true),
1834
- createElementVNode("div", _hoisted_4$6, [
1667
+ createElementVNode("div", _hoisted_6$4, [
1835
1668
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1836
1669
  ]),
1837
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_5$5, [
1670
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_7$3, [
1838
1671
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
1839
1672
  ])) : createCommentVNode("", true)
1840
1673
  ], 2);
1841
1674
  };
1842
1675
  }
1843
1676
  });
1844
- const LfCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c19bc9b0"]]);
1677
+ const LfCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-caad35ef"]]);
1845
1678
  const _hoisted_1$b = { class: "lf-page-header" };
1846
- const _hoisted_2$a = { class: "lf-page-header__text" };
1679
+ const _hoisted_2$a = { class: "lf-page-header__title-box" };
1847
1680
  const _hoisted_3$6 = { class: "lf-page-header__title" };
1848
1681
  const _hoisted_4$5 = {
1849
1682
  key: 0,
1850
- class: "lf-page-header__desc"
1683
+ class: "lf-page-header__icon"
1851
1684
  };
1852
1685
  const _hoisted_5$4 = {
1853
1686
  key: 0,
1854
- class: "lf-page-header__actions"
1687
+ class: "lf-page-header__count"
1688
+ };
1689
+ const _hoisted_6$3 = {
1690
+ key: 0,
1691
+ class: "lf-page-header__tools"
1692
+ };
1693
+ const _hoisted_7$2 = {
1694
+ key: 1,
1695
+ class: "lf-page-header__desc"
1855
1696
  };
1856
1697
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
1857
1698
  __name: "LfPageHeader",
@@ -1859,38 +1700,46 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1859
1700
  title: {},
1860
1701
  description: {},
1861
1702
  icon: {},
1862
- iconPath: {}
1703
+ iconPath: {},
1704
+ count: {}
1863
1705
  },
1864
1706
  setup(__props) {
1707
+ const slots = useSlots();
1708
+ const hasTools = computed(() => !!slots.filters || !!slots.actions);
1865
1709
  return (_ctx, _cache) => {
1866
- return openBlock(), createElementBlock("header", _hoisted_1$b, [
1710
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
1867
1711
  createElementVNode("div", _hoisted_2$a, [
1868
1712
  createElementVNode("h1", _hoisted_3$6, [
1869
- __props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
1870
- key: 0,
1871
- name: __props.icon,
1872
- path: __props.iconPath,
1873
- size: "1.5rem",
1874
- class: "lf-page-header__icon"
1875
- }, null, 8, ["name", "path"])) : createCommentVNode("", true),
1713
+ __props.icon || __props.iconPath || _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_4$5, [
1714
+ renderSlot(_ctx.$slots, "icon", {}, () => [
1715
+ createVNode(LfIcon, {
1716
+ name: __props.icon,
1717
+ path: __props.iconPath,
1718
+ size: "1.375rem"
1719
+ }, null, 8, ["name", "path"])
1720
+ ], true)
1721
+ ])) : createCommentVNode("", true),
1876
1722
  renderSlot(_ctx.$slots, "title", {}, () => [
1877
1723
  createTextVNode(toDisplayString(__props.title), 1)
1878
1724
  ], true)
1879
1725
  ]),
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)
1726
+ __props.count !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_5$4, toDisplayString(__props.count), 1)) : createCommentVNode("", true)
1885
1727
  ]),
1886
- _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
1728
+ hasTools.value ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
1729
+ renderSlot(_ctx.$slots, "filters", {}, void 0, true),
1730
+ _cache[0] || (_cache[0] = createElementVNode("span", { class: "lf-page-header__spacer" }, null, -1)),
1887
1731
  renderSlot(_ctx.$slots, "actions", {}, void 0, true)
1732
+ ])) : createCommentVNode("", true),
1733
+ __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("p", _hoisted_7$2, [
1734
+ renderSlot(_ctx.$slots, "description", {}, () => [
1735
+ createTextVNode(toDisplayString(__props.description), 1)
1736
+ ], true)
1888
1737
  ])) : createCommentVNode("", true)
1889
1738
  ]);
1890
1739
  };
1891
1740
  }
1892
1741
  });
1893
- const LfPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-b887cef1"]]);
1742
+ const LfPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-1d368ef8"]]);
1894
1743
  const _hoisted_1$a = {
1895
1744
  key: 0,
1896
1745
  class: "lf-badge__dot",
@@ -1944,17 +1793,17 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1944
1793
  });
1945
1794
  const LfBadge = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-ced4b85a"]]);
1946
1795
  const _hoisted_1$9 = ["role"];
1947
- const _hoisted_2$8 = { class: "lf-alert__content" };
1948
- const _hoisted_3$5 = {
1949
- key: 0,
1950
- class: "lf-alert__title"
1796
+ const _hoisted_2$8 = {
1797
+ class: "lf-alert__badge",
1798
+ "aria-hidden": "true"
1951
1799
  };
1800
+ const _hoisted_3$5 = { class: "lf-alert__body" };
1952
1801
  const _hoisted_4$4 = {
1953
- key: 1,
1954
- class: "lf-alert__message"
1802
+ key: 0,
1803
+ class: "lf-alert__title"
1955
1804
  };
1956
1805
  const _hoisted_5$3 = {
1957
- key: 0,
1806
+ key: 2,
1958
1807
  class: "lf-alert__actions"
1959
1808
  };
1960
1809
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
@@ -1966,7 +1815,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1966
1815
  icon: {},
1967
1816
  iconPath: {},
1968
1817
  closable: { type: Boolean },
1969
- closeLabel: { default: "닫기" }
1818
+ closeLabel: { default: "닫기" },
1819
+ dense: { type: Boolean }
1970
1820
  },
1971
1821
  emits: ["close"],
1972
1822
  setup(__props, { emit: __emit }) {
@@ -1979,28 +1829,34 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1979
1829
  };
1980
1830
  return (_ctx, _cache) => {
1981
1831
  return openBlock(), createElementBlock("div", {
1982
- class: normalizeClass(["lf-alert", `lf-alert--${__props.tone}`]),
1832
+ class: normalizeClass(["lf-alert", [`lf-alert--${__props.tone}`, { "lf-alert--dense": __props.dense }]]),
1983
1833
  role: __props.tone === "error" ? "alert" : "status"
1984
1834
  }, [
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, [
1835
+ createElementVNode("span", _hoisted_2$8, [
1836
+ renderSlot(_ctx.$slots, "icon", {}, () => [
1837
+ createVNode(LfIcon, {
1838
+ name: __props.icon ?? TONE_ICON[__props.tone],
1839
+ path: __props.iconPath,
1840
+ size: __props.dense ? "0.9375rem" : "1.0625rem"
1841
+ }, null, 8, ["name", "path", "size"])
1842
+ ], true)
1843
+ ]),
1844
+ createElementVNode("div", _hoisted_3$5, [
1845
+ __props.title ? (openBlock(), createElementBlock("p", _hoisted_4$4, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
1846
+ __props.message || _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
1847
+ key: 1,
1848
+ class: normalizeClass(["lf-alert__text", { "lf-alert__text--titled": __props.title }])
1849
+ }, [
1994
1850
  renderSlot(_ctx.$slots, "default", {}, () => [
1995
1851
  createTextVNode(toDisplayString(__props.message), 1)
1996
1852
  ], true)
1853
+ ], 2)) : createCommentVNode("", true),
1854
+ _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
1855
+ renderSlot(_ctx.$slots, "actions", {}, void 0, true)
1997
1856
  ])) : createCommentVNode("", true)
1998
1857
  ]),
1999
- _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
2000
- renderSlot(_ctx.$slots, "actions", {}, void 0, true)
2001
- ])) : createCommentVNode("", true),
2002
1858
  __props.closable ? (openBlock(), createBlock(LfIconButton, {
2003
- key: 1,
1859
+ key: 0,
2004
1860
  class: "lf-alert__close",
2005
1861
  icon: "close",
2006
1862
  size: "sm",
@@ -2011,7 +1867,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2011
1867
  };
2012
1868
  }
2013
1869
  });
2014
- const LfAlert = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-01c64756"]]);
1870
+ const LfAlert = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-62839786"]]);
2015
1871
  const _hoisted_1$8 = ["title"];
2016
1872
  const _hoisted_2$7 = ["src", "alt"];
2017
1873
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
@@ -2034,7 +1890,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2034
1890
  const tone = computed(() => {
2035
1891
  const name = props.name ?? "";
2036
1892
  let hash = 0;
2037
- for (let i = 0; i < name.length; i++) hash = hash * 31 + name.charCodeAt(i) | 0;
1893
+ for (let i2 = 0; i2 < name.length; i2++) hash = hash * 31 + name.charCodeAt(i2) | 0;
2038
1894
  return Math.abs(hash) % 7;
2039
1895
  });
2040
1896
  return (_ctx, _cache) => {
@@ -2081,8 +1937,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2081
1937
  setup(__props, { emit: __emit }) {
2082
1938
  const props = __props;
2083
1939
  const emit = __emit;
2084
- function keyOf(row, i) {
2085
- return props.rowKey ? String(row[props.rowKey] ?? i) : i;
1940
+ function keyOf(row, i2) {
1941
+ return props.rowKey ? String(row[props.rowKey] ?? i2) : i2;
2086
1942
  }
2087
1943
  function toggleSort(key) {
2088
1944
  var _a;
@@ -2153,9 +2009,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2153
2009
  createTextVNode(toDisplayString(__props.emptyText), 1)
2154
2010
  ], true)
2155
2011
  ], 8, _hoisted_5$2)
2156
- ])) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.rows, (row, i) => {
2012
+ ])) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.rows, (row, i2) => {
2157
2013
  return openBlock(), createElementBlock("tr", {
2158
- key: keyOf(row, i),
2014
+ key: keyOf(row, i2),
2159
2015
  class: normalizeClass(["lf-table__row", { "lf-table__row--clickable": __props.clickable }]),
2160
2016
  tabindex: __props.clickable ? 0 : void 0,
2161
2017
  onClick: ($event) => __props.clickable && emit("rowClick", row),
@@ -2170,7 +2026,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2170
2026
  renderSlot(_ctx.$slots, `cell-${col.key}`, {
2171
2027
  row,
2172
2028
  value: row[col.key],
2173
- index: i
2029
+ index: i2
2174
2030
  }, () => [
2175
2031
  createTextVNode(toDisplayString(row[col.key] ?? "—"), 1)
2176
2032
  ], true)
@@ -2201,7 +2057,7 @@ const _hoisted_5$1 = {
2201
2057
  "aria-hidden": "true"
2202
2058
  };
2203
2059
  const _hoisted_6$1 = ["aria-current", "onClick"];
2204
- const _hoisted_7 = ["disabled"];
2060
+ const _hoisted_7$1 = ["disabled"];
2205
2061
  const ELLIPSIS = -1;
2206
2062
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2207
2063
  __name: "LfPagination",
@@ -2224,7 +2080,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2224
2080
  const last = totalPages.value;
2225
2081
  const cur = Math.min(Math.max(1, model.value), last);
2226
2082
  const window2 = props.siblings * 2 + 5;
2227
- if (last <= window2) return Array.from({ length: last }, (_, i) => i + 1);
2083
+ if (last <= window2) return Array.from({ length: last }, (_, i2) => i2 + 1);
2228
2084
  const left = Math.max(2, cur - props.siblings);
2229
2085
  const right = Math.min(last - 1, cur + props.siblings);
2230
2086
  const out = [1];
@@ -2262,9 +2118,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2262
2118
  size: "1rem"
2263
2119
  })
2264
2120
  ], 8, _hoisted_4$2),
2265
- (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (p, i) => {
2121
+ (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (p, i2) => {
2266
2122
  return openBlock(), createElementBlock(Fragment, {
2267
- key: `${p}-${i}`
2123
+ key: `${p}-${i2}`
2268
2124
  }, [
2269
2125
  p === ELLIPSIS ? (openBlock(), createElementBlock("span", _hoisted_5$1, "…")) : (openBlock(), createElementBlock("button", {
2270
2126
  key: 1,
@@ -2286,14 +2142,17 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2286
2142
  name: "chevron_right",
2287
2143
  size: "1rem"
2288
2144
  })
2289
- ], 8, _hoisted_7)
2145
+ ], 8, _hoisted_7$1)
2290
2146
  ])) : createCommentVNode("", true)
2291
2147
  ], 8, _hoisted_1$6)) : createCommentVNode("", true);
2292
2148
  };
2293
2149
  }
2294
2150
  });
2295
2151
  const LfPagination = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-53fce087"]]);
2296
- const _hoisted_1$5 = { class: "lf-empty" };
2152
+ const _hoisted_1$5 = {
2153
+ key: 0,
2154
+ class: "lf-empty__icon"
2155
+ };
2297
2156
  const _hoisted_2$4 = { class: "lf-empty__title" };
2298
2157
  const _hoisted_3$2 = {
2299
2158
  key: 1,
@@ -2309,18 +2168,23 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2309
2168
  title: { default: "표시할 내용이 없습니다." },
2310
2169
  description: {},
2311
2170
  icon: {},
2312
- iconPath: {}
2171
+ iconPath: {},
2172
+ tone: { default: "muted" }
2313
2173
  },
2314
2174
  setup(__props) {
2315
2175
  return (_ctx, _cache) => {
2316
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
2317
- __props.icon || __props.iconPath ? (openBlock(), createBlock(LfIcon, {
2318
- key: 0,
2319
- name: __props.icon,
2320
- path: __props.iconPath,
2321
- size: "2.5rem",
2322
- class: "lf-empty__icon"
2323
- }, null, 8, ["name", "path"])) : createCommentVNode("", true),
2176
+ return openBlock(), createElementBlock("div", {
2177
+ class: normalizeClass(["lf-empty", `lf-empty--${__props.tone}`])
2178
+ }, [
2179
+ __props.icon || __props.iconPath || _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_1$5, [
2180
+ renderSlot(_ctx.$slots, "icon", {}, () => [
2181
+ createVNode(LfIcon, {
2182
+ name: __props.icon,
2183
+ path: __props.iconPath,
2184
+ size: "2.5rem"
2185
+ }, null, 8, ["name", "path"])
2186
+ ], true)
2187
+ ])) : createCommentVNode("", true),
2324
2188
  createElementVNode("p", _hoisted_2$4, [
2325
2189
  renderSlot(_ctx.$slots, "title", {}, () => [
2326
2190
  createTextVNode(toDisplayString(__props.title), 1)
@@ -2334,11 +2198,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2334
2198
  _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
2335
2199
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
2336
2200
  ])) : createCommentVNode("", true)
2337
- ]);
2201
+ ], 2);
2338
2202
  };
2339
2203
  }
2340
2204
  });
2341
- const LfEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-02fb3f51"]]);
2205
+ const LfEmptyState = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-6ed56d35"]]);
2342
2206
  const _hoisted_1$4 = {
2343
2207
  key: 0,
2344
2208
  class: "lf-skeleton-group",
@@ -2378,15 +2242,19 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2378
2242
  }
2379
2243
  });
2380
2244
  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"
2245
+ const _hoisted_1$3 = {
2246
+ class: "lf-stat__badge",
2247
+ "aria-hidden": "true"
2386
2248
  };
2249
+ const _hoisted_2$3 = { class: "lf-stat__body" };
2250
+ const _hoisted_3$1 = { class: "lf-stat__label" };
2387
2251
  const _hoisted_4 = { class: "lf-stat__value-row" };
2388
2252
  const _hoisted_5 = { class: "lf-stat__value" };
2389
2253
  const _hoisted_6 = {
2254
+ key: 0,
2255
+ class: "lf-stat__unit"
2256
+ };
2257
+ const _hoisted_7 = {
2390
2258
  key: 0,
2391
2259
  class: "lf-stat__hint"
2392
2260
  };
@@ -2395,13 +2263,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2395
2263
  props: {
2396
2264
  label: {},
2397
2265
  value: {},
2266
+ unit: {},
2398
2267
  icon: {},
2399
2268
  iconPath: {},
2269
+ hint: {},
2270
+ tone: { default: "neutral" },
2400
2271
  delta: {},
2401
2272
  deltaUnit: { default: "%" },
2402
2273
  invert: { type: Boolean },
2403
- hint: {},
2404
- glass: { type: Boolean, default: true }
2274
+ glass: { type: Boolean },
2275
+ href: {}
2405
2276
  },
2406
2277
  setup(__props) {
2407
2278
  const props = __props;
@@ -2411,42 +2282,49 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2411
2282
  return good ? "lf-stat__delta--up" : "lf-stat__delta--down";
2412
2283
  });
2413
2284
  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, [
2420
- createVNode(LfIcon, {
2421
- name: __props.icon,
2422
- path: __props.iconPath,
2423
- size: "1.125rem"
2424
- }, 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)
2285
+ return openBlock(), createBlock(resolveDynamicComponent(__props.href ? "a" : "div"), {
2286
+ href: __props.href,
2287
+ class: normalizeClass(["lf-stat", [`lf-stat--${__props.tone}`, { "lf-stat--glass": __props.glass, "lf-stat--link": __props.href }]])
2288
+ }, {
2289
+ default: withCtx(() => [
2290
+ createElementVNode("span", _hoisted_1$3, [
2291
+ renderSlot(_ctx.$slots, "icon", {}, () => [
2292
+ createVNode(LfIcon, {
2293
+ name: __props.icon,
2294
+ path: __props.iconPath,
2295
+ size: "1.125rem"
2296
+ }, null, 8, ["name", "path"])
2431
2297
  ], true)
2432
2298
  ]),
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)
2299
+ createElementVNode("div", _hoisted_2$3, [
2300
+ createElementVNode("div", _hoisted_3$1, toDisplayString(__props.label), 1),
2301
+ createElementVNode("div", _hoisted_4, [
2302
+ createElementVNode("span", _hoisted_5, [
2303
+ renderSlot(_ctx.$slots, "default", {}, () => [
2304
+ createTextVNode(toDisplayString(__props.value), 1)
2305
+ ], true),
2306
+ __props.unit ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(__props.unit), 1)) : createCommentVNode("", true)
2307
+ ]),
2308
+ __props.delta != null ? (openBlock(), createElementBlock("span", {
2309
+ key: 0,
2310
+ class: normalizeClass(["lf-stat__delta", deltaClass.value])
2311
+ }, [
2312
+ createVNode(LfIcon, {
2313
+ name: __props.delta >= 0 ? "arrow_upward" : "arrow_downward",
2314
+ size: "0.8125rem"
2315
+ }, null, 8, ["name"]),
2316
+ createTextVNode(" " + toDisplayString(Math.abs(__props.delta)) + toDisplayString(__props.deltaUnit), 1)
2317
+ ], 2)) : createCommentVNode("", true)
2318
+ ]),
2319
+ __props.hint ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
2320
+ ])
2443
2321
  ]),
2444
- __props.hint ? (openBlock(), createElementBlock("p", _hoisted_6, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
2445
- ], 2);
2322
+ _: 3
2323
+ }, 8, ["href", "class"]);
2446
2324
  };
2447
2325
  }
2448
2326
  });
2449
- const LfStatCard = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-5cd1dfa8"]]);
2327
+ const LfStatCard = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a80fddaf"]]);
2450
2328
  const _hoisted_1$2 = ["aria-describedby"];
2451
2329
  const _hoisted_2$2 = ["id"];
2452
2330
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
@@ -2515,12 +2393,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2515
2393
  open.value = false;
2516
2394
  emit("select", item);
2517
2395
  }
2518
- function onPointerDown(e) {
2396
+ function onPointerDown(e2) {
2519
2397
  var _a;
2520
- if (!((_a = root.value) == null ? void 0 : _a.contains(e.target))) open.value = false;
2398
+ if (!((_a = root.value) == null ? void 0 : _a.contains(e2.target))) open.value = false;
2521
2399
  }
2522
- function onKeydown(e) {
2523
- if (e.key === "Escape") open.value = false;
2400
+ function onKeydown(e2) {
2401
+ if (e2.key === "Escape") open.value = false;
2524
2402
  }
2525
2403
  watch(open, (isOpen) => {
2526
2404
  if (isOpen) {
@@ -2621,6 +2499,125 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2621
2499
  }
2622
2500
  });
2623
2501
  const LfDivider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c15d2259"]]);
2502
+ class ApiError extends Error {
2503
+ constructor(status, message, detail) {
2504
+ super(message);
2505
+ this.status = status;
2506
+ this.detail = detail;
2507
+ this.name = "ApiError";
2508
+ }
2509
+ }
2510
+ const DEFAULT_REFRESH_PATH = "/api/v1/auth/refresh";
2511
+ function createApiClient(options) {
2512
+ const {
2513
+ baseUrl,
2514
+ refreshPath = DEFAULT_REFRESH_PATH,
2515
+ isAuthPath = (url) => url.includes("/api/v1/auth/"),
2516
+ onUnauthorized,
2517
+ onActivity
2518
+ } = options;
2519
+ let baseFetch = globalThis.fetch.bind(globalThis);
2520
+ let refreshing = null;
2521
+ let notified = false;
2522
+ function tryRefresh() {
2523
+ refreshing ?? (refreshing = baseFetch(`${baseUrl}${refreshPath}`, {
2524
+ method: "POST",
2525
+ credentials: "include"
2526
+ }).then((r) => r.ok).catch(() => false).finally(() => {
2527
+ refreshing = null;
2528
+ }));
2529
+ return refreshing;
2530
+ }
2531
+ function withCookies(init) {
2532
+ const out = { ...init ?? {} };
2533
+ out.credentials = "include";
2534
+ if (out.headers) {
2535
+ const h2 = new Headers(out.headers);
2536
+ h2.delete("authorization");
2537
+ out.headers = h2;
2538
+ }
2539
+ return out;
2540
+ }
2541
+ async function send(input, init, allowRetry) {
2542
+ onActivity == null ? void 0 : onActivity(1);
2543
+ try {
2544
+ let res = await baseFetch(input, withCookies(init));
2545
+ if (res.status !== 401 || !allowRetry) {
2546
+ if (res.ok) notified = false;
2547
+ return res;
2548
+ }
2549
+ const refreshed = await tryRefresh();
2550
+ if (!refreshed) {
2551
+ if (!notified) {
2552
+ notified = true;
2553
+ onUnauthorized == null ? void 0 : onUnauthorized();
2554
+ }
2555
+ return res;
2556
+ }
2557
+ res = await baseFetch(input, withCookies(init));
2558
+ if (res.ok) notified = false;
2559
+ return res;
2560
+ } finally {
2561
+ onActivity == null ? void 0 : onActivity(-1);
2562
+ }
2563
+ }
2564
+ function urlOf(input) {
2565
+ if (typeof input === "string") return input;
2566
+ if (input instanceof URL) return input.href;
2567
+ return input.url;
2568
+ }
2569
+ async function request(path, opts = {}) {
2570
+ const { method = "GET", body, headers, signal, noRetry = false } = opts;
2571
+ const url = `${baseUrl}${path}`;
2572
+ const init = { method, signal, headers: { ...headers } };
2573
+ if (body !== void 0) {
2574
+ if (body instanceof FormData || body instanceof Blob || typeof body === "string") {
2575
+ init.body = body;
2576
+ } else {
2577
+ init.body = JSON.stringify(body);
2578
+ init.headers = { "Content-Type": "application/json", ...init.headers };
2579
+ }
2580
+ }
2581
+ return send(url, init, !noRetry && !isAuthPath(url));
2582
+ }
2583
+ async function api(path, opts = {}) {
2584
+ const res = await request(path, opts);
2585
+ if (res.status === 204) return void 0;
2586
+ const text = await res.text();
2587
+ let payload = void 0;
2588
+ if (text) {
2589
+ try {
2590
+ payload = JSON.parse(text);
2591
+ } catch {
2592
+ payload = text;
2593
+ }
2594
+ }
2595
+ if (!res.ok) {
2596
+ const detail = payload == null ? void 0 : payload.detail;
2597
+ const message = typeof detail === "string" ? detail : typeof payload === "string" && payload ? payload : `요청 실패 (${res.status})`;
2598
+ throw new ApiError(res.status, message, detail ?? payload);
2599
+ }
2600
+ return payload;
2601
+ }
2602
+ let uninstall = null;
2603
+ function install() {
2604
+ if (uninstall) return uninstall;
2605
+ baseFetch = globalThis.fetch.bind(globalThis);
2606
+ const patched = async (input, init) => {
2607
+ const url = urlOf(input);
2608
+ if (!url.startsWith(baseUrl)) return baseFetch(input, init);
2609
+ const retriable = typeof input === "string" || input instanceof URL;
2610
+ return send(input, init, retriable && !isAuthPath(url));
2611
+ };
2612
+ globalThis.fetch = patched;
2613
+ uninstall = () => {
2614
+ if (globalThis.fetch === patched) globalThis.fetch = baseFetch;
2615
+ uninstall = null;
2616
+ };
2617
+ return uninstall;
2618
+ }
2619
+ return { api, request, install };
2620
+ }
2624
2621
  function useToast() {
2625
2622
  const store = useToastStore();
2626
2623
  return {
@@ -2636,12 +2633,13 @@ function useConfirm() {
2636
2633
  return (opts) => store.ask(opts);
2637
2634
  }
2638
2635
  export {
2636
+ ApiError,
2639
2637
  AppConfirmModal,
2640
2638
  AppLoadingOverlay,
2641
2639
  AppShell,
2642
2640
  AppToast,
2643
2641
  DARK_THEME,
2644
- DEFAULT_THEME,
2642
+ b as DEFAULT_THEME,
2645
2643
  LF_ICONS,
2646
2644
  LIGHT_THEME,
2647
2645
  LfAlert,
@@ -2669,15 +2667,16 @@ export {
2669
2667
  LfTextField,
2670
2668
  LfTextarea,
2671
2669
  LfTooltip,
2672
- applySemanticPalette,
2670
+ c as applySemanticPalette,
2673
2671
  applyTheme,
2674
- colorToRgb,
2675
- contrastRatio,
2676
- deriveSemanticPalette,
2677
- hexToRgb,
2672
+ d as colorToRgb,
2673
+ e as contrastRatio,
2674
+ createApiClient,
2675
+ f as deriveSemanticPalette,
2676
+ h as hexToRgb,
2678
2677
  initTheme,
2679
- isLightBackground,
2680
- luminance,
2678
+ i as isLightBackground,
2679
+ l as luminance,
2681
2680
  useConfirm,
2682
2681
  useConfirmStore,
2683
2682
  useLoadingStore,