@loafacto/ui 0.8.9 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{applyTheme-EBr0eOKY.js → applyTheme-C5V6Yq8D.js} +29 -25
- package/dist/applyTheme-C5V6Yq8D.js.map +1 -0
- package/dist/components/LfModal.vue.d.ts +2 -10
- package/dist/index.js +16 -17
- package/dist/index.js.map +1 -1
- package/dist/loafacto-ui.css +233 -233
- package/dist/theme/applyTheme.d.ts +18 -21
- package/dist/vuetify.js +1 -1
- package/package.json +1 -1
- package/dist/applyTheme-EBr0eOKY.js.map +0 -1
|
@@ -72,15 +72,15 @@ function deriveSemanticPalette(bg, sidebar, header, _card, accent) {
|
|
|
72
72
|
const [ar, ag, ab] = hexToRgb(accent.startsWith("#") ? accent : "#60a5fa");
|
|
73
73
|
const accentRgb = `${ar},${ag},${ab}`;
|
|
74
74
|
const accentLum = luminance(ar, ag, ab);
|
|
75
|
-
const textHeading = light ? "#
|
|
76
|
-
const textBody = light ? "#
|
|
77
|
-
const textMuted = light ? "#
|
|
78
|
-
const border = light ? "
|
|
75
|
+
const textHeading = light ? "#0F172A" : "#F8FAFC";
|
|
76
|
+
const textBody = light ? "#475569" : "#CBD5E1";
|
|
77
|
+
const textMuted = light ? "#64748B" : "#94A3B8";
|
|
78
|
+
const border = light ? "#E2E8F0" : "rgba(148,163,184,0.18)";
|
|
79
79
|
const hover = light ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.05)";
|
|
80
80
|
const surface = surfaceFromBg(bg, 0.08);
|
|
81
81
|
const surfaceAlt = surfaceFromBg(bg, 0.04);
|
|
82
82
|
const overlay = withAlpha(surface, 0.95);
|
|
83
|
-
const accentText = accessibleText(accentLum, "#ffffff", "#
|
|
83
|
+
const accentText = accessibleText(accentLum, "#ffffff", "#0F172A");
|
|
84
84
|
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)`;
|
|
85
85
|
const accentMuted = `rgba(${ar},${ag},${ab},0.12)`;
|
|
86
86
|
const accentMutedText = accent;
|
|
@@ -91,7 +91,7 @@ function deriveSemanticPalette(bg, sidebar, header, _card, accent) {
|
|
|
91
91
|
const inputBorder = border;
|
|
92
92
|
const inputFocusBorder = accent;
|
|
93
93
|
const inputFocusShadow = `rgba(${ar},${ag},${ab},0.3)`;
|
|
94
|
-
const statusSuccess = light ? "#
|
|
94
|
+
const statusSuccess = light ? "#059669" : "#10B981";
|
|
95
95
|
const statusError = light ? "#dc2626" : "#f87171";
|
|
96
96
|
const statusWarning = light ? "#d97706" : "#fbbf24";
|
|
97
97
|
const statusInfo = light ? "#2563eb" : "#60a5fa";
|
|
@@ -107,12 +107,12 @@ function deriveSemanticPalette(bg, sidebar, header, _card, accent) {
|
|
|
107
107
|
const statusPurpleRgb = rgbOf(statusPurple);
|
|
108
108
|
const statusTealRgb = rgbOf(statusTeal);
|
|
109
109
|
const sidebarLight = isLightBackground(sidebar);
|
|
110
|
-
const sidebarText = sidebarLight ? "#
|
|
111
|
-
const sidebarTextMuted = sidebarLight ? "#
|
|
110
|
+
const sidebarText = sidebarLight ? "#475569" : "#CBD5E1";
|
|
111
|
+
const sidebarTextMuted = sidebarLight ? "#64748B" : "#94A3B8";
|
|
112
112
|
const sidebarActive = sidebarLight ? `rgba(${ar},${ag},${ab},0.15)` : `rgba(${ar},${ag},${ab},0.15)`;
|
|
113
113
|
const headerLight = isLightBackground(header);
|
|
114
|
-
const headerText = headerLight ? "#
|
|
115
|
-
const footerBg = darkenFromBg(bg, light ?
|
|
114
|
+
const headerText = headerLight ? "#0F172A" : "#F8FAFC";
|
|
115
|
+
const footerBg = darkenFromBg(bg, light ? 234 : 8);
|
|
116
116
|
const footerText = mutedOn(footerBg, 0.55);
|
|
117
117
|
const footerBorder = light ? "rgba(255,255,255,0.08)" : "rgba(255,255,255,0.06)";
|
|
118
118
|
return {
|
|
@@ -209,22 +209,26 @@ function applySemanticPalette(palette) {
|
|
|
209
209
|
s.setProperty("--glass-accent", palette.accent);
|
|
210
210
|
s.setProperty("--glass-accent-rgb", palette.accentRgb);
|
|
211
211
|
}
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
accent: "#
|
|
212
|
+
const LIGHT_THEME = {
|
|
213
|
+
/** 순백이 아니라 아주 옅은 포슬린. 카드(순백)가 그 위에 떠 보이려면 바탕이 한 톤 낮아야 한다. */
|
|
214
|
+
bg: "#FBFBFD",
|
|
215
|
+
sidebar: "rgba(255, 255, 255, 0.75)",
|
|
216
|
+
header: "rgba(255, 255, 255, 0.85)",
|
|
217
|
+
card: "rgba(255, 255, 255, 0.92)",
|
|
218
|
+
/** 인디고. 흰 글자 대비 7.0:1 이라 버튼 글자가 넉넉히 읽히고, 경고색(주황)·성공색(초록)과 갈린다. */
|
|
219
|
+
accent: "#4F46E5",
|
|
220
220
|
skin: "default"
|
|
221
221
|
};
|
|
222
|
-
const
|
|
223
|
-
bg: "#
|
|
224
|
-
sidebar: "rgba(
|
|
225
|
-
header: "rgba(
|
|
226
|
-
card: "rgba(
|
|
227
|
-
|
|
222
|
+
const DARK_THEME = {
|
|
223
|
+
bg: "#0F172A",
|
|
224
|
+
sidebar: "rgba(30, 41, 59, 0.6)",
|
|
225
|
+
header: "rgba(15, 23, 42, 0.85)",
|
|
226
|
+
card: "rgba(30, 41, 59, 0.5)",
|
|
227
|
+
/**
|
|
228
|
+
* 인디고 원색(#4F46E5)은 어두운 바탕에서 가라앉아 흰 글자 대비가 4.0:1 로 떨어진다.
|
|
229
|
+
* 한 단 밝힌 400(#818CF8)을 쓴다 — 어두운 바탕에서 로고를 밝게 반전시키는 것과 같은 이유다.
|
|
230
|
+
*/
|
|
231
|
+
accent: "#818CF8",
|
|
228
232
|
skin: "default"
|
|
229
233
|
};
|
|
230
234
|
const DEFAULT_THEME = DARK_THEME;
|
|
@@ -257,4 +261,4 @@ export {
|
|
|
257
261
|
isLightBackground as i,
|
|
258
262
|
luminance as l
|
|
259
263
|
};
|
|
260
|
-
//# sourceMappingURL=applyTheme-
|
|
264
|
+
//# sourceMappingURL=applyTheme-C5V6Yq8D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyTheme-C5V6Yq8D.js","sources":["../src/theme/themeColors.ts","../src/theme/applyTheme.ts"],"sourcesContent":["/**\n * 시맨틱 색상 자동 파생 시스템\n *\n * 사용자가 정의하는 색상: bg, sidebar, header, card, accent (5개)\n * 이 5개로부터 나머지 모든 UI 색상을 자동으로 파생한다.\n */\n\n/* ── hex / rgba 유틸 ──────────────────────────────────────────────── */\n\n/** hex → [r, g, b] (0-255) */\nexport function hexToRgb(hex: string): [number, number, number] {\n const clean = hex.replace('#', '')\n if (clean.length === 3) {\n const r = parseInt(clean[0] + clean[0], 16)\n const g = parseInt(clean[1] + clean[1], 16)\n const b = parseInt(clean[2] + clean[2], 16)\n return [r, g, b]\n }\n return [\n parseInt(clean.slice(0, 2), 16),\n parseInt(clean.slice(2, 4), 16),\n parseInt(clean.slice(4, 6), 16),\n ]\n}\n\n/** rgba() 문자열에서 색상 추출 → [r, g, b] */\nfunction parseRgba(color: string): [number, number, number] | null {\n const m = color.match(/rgba?\\(\\s*(\\d+),\\s*(\\d+),\\s*(\\d+)/)\n if (!m) return null\n return [parseInt(m[1]), parseInt(m[2]), parseInt(m[3])]\n}\n\n/** 색상 문자열(hex 또는 rgba)에서 RGB 추출 */\nexport function colorToRgb(color: string): [number, number, number] {\n if (color.startsWith('#')) return hexToRgb(color)\n const parsed = parseRgba(color)\n return parsed ?? [0, 0, 0]\n}\n\n/** 상대 휘도 (WCAG 2.1) — 0(검정)~1(흰색) */\nexport function luminance(r: number, g: number, b: number): number {\n const [rs, gs, bs] = [r, g, b].map((c) => {\n const s = c / 255\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4\n })\n return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs\n}\n\n/** WCAG 대비율 */\nexport function contrastRatio(l1: number, l2: number): number {\n const lighter = Math.max(l1, l2)\n const darker = Math.min(l1, l2)\n return (lighter + 0.05) / (darker + 0.05)\n}\n\n/** 배경 위에서 최소 4.5:1 대비를 보장하는 텍스트 색 */\nfunction accessibleText(bgLum: number, light: string, dark: string): string {\n const lightLum = 0.9505 // #f9fafb ≈ 0.95\n const darkLum = 0.0088 // #111827 ≈ 0.009\n const crLight = contrastRatio(bgLum, lightLum)\n const crDark = contrastRatio(bgLum, darkLum)\n return crDark >= crLight ? dark : light\n}\n\n/** bg RGB 기반 elevated 표면 색상\n * - 다크 bg: 흰색 방향으로 살짝 밝게 (elevated 느낌)\n * - 라이트 bg: 흰색 방향으로 강하게 밀어 거의 흰색 (패널 느낌)\n * amount: 다크 기준 섞을 강도 (기본 0.08). 라이트는 자동으로 더 큰 amount 적용 */\nfunction surfaceFromBg(bg: string, amount = 0.08): string {\n const [r, g, b] = colorToRgb(bg)\n const isLight = luminance(r, g, b) > 0.35\n // 라이트 bg면 더 강하게 밀어야 눈에 띔\n const a = isLight ? Math.min(amount * 5, 0.5) : amount\n // 흰색으로 **섞지** 않고 세 채널을 같은 폭으로 **올린다**. 섞으면 채널 간 차이가\n // 밝기에 비례해 줄어들어 배경의 색 기운이 빠진다 — 따뜻한 cream 배경 위에 표면만\n // 무채색으로 뜨는 식이다(푸터·오버레이가 겪은 것과 같은 종류의 어긋남).\n // 올릴 폭은 가장 밝은 채널이 흰색까지 남긴 여유를 기준으로 잡는다.\n const step = Math.round((255 - Math.max(r, g, b)) * a)\n const c = (v: number) => Math.min(255, v + step)\n return `rgb(${c(r)},${c(g)},${c(b)})`\n}\n\n/**\n * bg 를 그대로 어둡게 — 푸터처럼 \"배경과 같은 계열의 어두운 띠\"를 만들 때 쓴다.\n *\n * 흰색으로 섞는 surfaceFromBg 와 달리 **빼기**다. 곱하기(검정 쪽으로 섞기)를 쓰면\n * 채널 간 차이가 밝기에 비례해 줄어들어, 밝고 옅은 배경(cream 계열)을 어둡게 만들면\n * 색 기운이 사라지고 무채색 회색이 된다. 빼기는 차이를 그대로 남겨 따뜻함이 유지된다.\n */\nfunction darkenFromBg(bg: string, step: number): string {\n const [r, g, b] = colorToRgb(bg)\n const d = (c: number) => Math.max(0, Math.round(c - step))\n return `rgb(${d(r)},${d(g)},${d(b)})`\n}\n\n/** 같은 색에 알파만 입힌다. */\nfunction withAlpha(color: string, alpha: number): string {\n const [r, g, b] = colorToRgb(color)\n return `rgba(${r},${g},${b},${alpha})`\n}\n\n/** 색 위에 얹을 흐린 글자색 — 배경을 흰색 쪽으로 섞어 만든다. */\nfunction mutedOn(color: string, amount: number): string {\n const [r, g, b] = colorToRgb(color)\n const m = (c: number) => Math.round(c * (1 - amount) + 255 * amount)\n return `rgb(${m(r)},${m(g)},${m(b)})`\n}\n\n/* ── 테마 밝기 판별 ────────────────────────────────────────────────── */\n\nexport function isLightBackground(color: string): boolean {\n const [r, g, b] = colorToRgb(color)\n return luminance(r, g, b) > 0.35\n}\n\n/* ── 시맨틱 팔레트 파생 ────────────────────────────────────────────── */\n\nexport interface SemanticPalette {\n // 텍스트\n textHeading: string\n textBody: string\n textMuted: string\n // 경계/호버/오버레이\n border: string\n hover: string\n overlay: string\n surface: string // bg에서 살짝 대비 나는 표면 (사이드바/헤더/패널)\n surfaceAlt: string // 표면보다 더 깊은 톤 (캔버스 영역 등)\n // 강조색 파생\n accent: string\n accentRgb: string\n accentText: string // accent 위 텍스트\n accentHover: string // accent 버튼 호버\n accentMuted: string // accent 배경 tint (배지 등)\n accentMutedText: string // accent tint 위 텍스트\n // 버튼\n btnPrimaryBg: string\n btnPrimaryText: string\n btnPrimaryHover: string\n // 입력\n inputBg: string\n inputBorder: string\n inputFocusBorder: string\n inputFocusShadow: string\n // 상태 (밝기에 따라 밝은/어두운 톤)\n statusSuccess: string\n statusError: string\n statusWarning: string\n statusInfo: string\n statusNeutral: string\n statusPurple: string\n statusTeal: string\n /** 위 상태 색의 `\"r,g,b\"`. `rgb(var(--admin-status-error-rgb), 0.12)` 처럼 옅게 깔 때 쓴다. */\n statusSuccessRgb: string\n statusErrorRgb: string\n statusWarningRgb: string\n statusInfoRgb: string\n statusNeutralRgb: string\n statusPurpleRgb: string\n statusTealRgb: string\n // 사이드바 텍스트\n sidebarText: string\n sidebarTextMuted: string\n sidebarActive: string\n // 헤더 텍스트\n headerText: string\n // 푸터\n footerBg: string\n footerText: string\n footerBorder: string\n}\n\n/** 5개 기본색으로부터 전체 시맨틱 팔레트 파생 */\nexport function deriveSemanticPalette(\n bg: string,\n sidebar: string,\n header: string,\n _card: string,\n accent: string,\n): SemanticPalette {\n const light = isLightBackground(bg)\n const [ar, ag, ab] = hexToRgb(accent.startsWith('#') ? accent : '#60a5fa')\n const accentRgb = `${ar},${ag},${ab}`\n const accentLum = luminance(ar, ag, ab)\n\n // 텍스트 팔레트\n // 슬레이트 계열. 순수 회색(#111827)과 한 끗 차이지만 푸른 기운이 있어 흰 바탕에서 덜\n // 탁하고, 인디고 강조색과 같은 색상환에 놓인다.\n const textHeading = light ? '#0F172A' : '#F8FAFC'\n const textBody = light ? '#475569' : '#CBD5E1'\n // 흐린 글자는 바탕(#FBFBFD) 위에서 4.7:1 — AA(4.5) 를 넘긴다. 한 단 밝은 #94A3B8 은\n // 3.0:1 이라 캡션에도 못 쓴다. 팔레트 설명이 \"#64748b ~ #94A3B8\" 라고 폭을 줬지만\n // 글자로 쓸 수 있는 것은 아래쪽 끝뿐이다.\n const textMuted = light ? '#64748B' : '#94A3B8'\n\n // 경계/호버\n const border = light ? '#E2E8F0' : 'rgba(148,163,184,0.18)'\n const hover = light ? 'rgba(0,0,0,0.05)' : 'rgba(255,255,255,0.05)'\n // 표면 색상: bg에서 자동 파생. 사용자 bg를 존중하면서 적절한 대비 확보.\n const surface = surfaceFromBg(bg, 0.08)\n const surfaceAlt = surfaceFromBg(bg, 0.04)\n // 오버레이는 표면과 같은 색이되 살짝 비친다. 밝은 쪽이 청회색(#f8fafc)으로 박혀 있어\n // 따뜻한 배경 위에서 이것만 차갑게 떴다 — 푸터와 같은 종류의 어긋남이었다.\n const overlay = withAlpha(surface, 0.95)\n\n // 강조색 파생\n const accentText = accessibleText(accentLum, '#ffffff', '#0F172A')\n const accentHover = light\n ? `rgba(${ar},${ag},${ab},0.85)`\n : `rgba(${Math.min(ar + 20, 255)},${Math.min(ag + 20, 255)},${Math.min(ab + 20, 255)},1)`\n const accentMuted = `rgba(${ar},${ag},${ab},0.12)`\n const accentMutedText = accent\n\n // 버튼\n const btnPrimaryBg = accent\n const btnPrimaryText = accentText\n const btnPrimaryHover = accentHover\n\n // 입력\n const inputBg = light ? 'rgba(0,0,0,0.04)' : 'rgba(0,0,0,0.3)'\n const inputBorder = border\n const inputFocusBorder = accent\n const inputFocusShadow = `rgba(${ar},${ag},${ab},0.3)`\n\n // 상태 색상: 밝은 배경에서는 채도 높은 톤, 어두운 배경에서는 밝은 톤\n const statusSuccess = light ? '#059669' : '#10B981'\n const statusError = light ? '#dc2626' : '#f87171'\n const statusWarning = light ? '#d97706' : '#fbbf24'\n const statusInfo = light ? '#2563eb' : '#60a5fa'\n const statusNeutral = light ? '#4b5563' : '#9ca3af'\n const statusPurple = light ? '#9333ea' : '#c084fc'\n const statusTeal = light ? '#0d9488' : '#5eead4'\n\n /* 상태 색의 RGB 삼원색.\n *\n * 배지·알림의 옅은 배경(`rgb(var(--x), 0.12)`)을 만들려면 hex 로는 안 된다.\n * 예전에는 컴포넌트마다 rgba 리터럴을 박아 뒀는데, 그러면 테마가 라이트로\n * 바뀌어 상태색이 진해져도 **띠와 배지만 다크 기준 색으로 남는다.** */\n const rgbOf = (hex: string) => hexToRgb(hex).join(',')\n const statusSuccessRgb = rgbOf(statusSuccess)\n const statusErrorRgb = rgbOf(statusError)\n const statusWarningRgb = rgbOf(statusWarning)\n const statusInfoRgb = rgbOf(statusInfo)\n const statusNeutralRgb = rgbOf(statusNeutral)\n const statusPurpleRgb = rgbOf(statusPurple)\n const statusTealRgb = rgbOf(statusTeal)\n\n // 사이드바 텍스트\n const sidebarLight = isLightBackground(sidebar)\n const sidebarText = sidebarLight ? '#475569' : '#CBD5E1'\n const sidebarTextMuted = sidebarLight ? '#64748B' : '#94A3B8'\n const sidebarActive = sidebarLight\n ? `rgba(${ar},${ag},${ab},0.15)`\n : `rgba(${ar},${ag},${ab},0.15)`\n\n // 헤더 텍스트\n const headerLight = isLightBackground(header)\n const headerText = headerLight ? '#0F172A' : '#F8FAFC'\n\n // 푸터: 항상 어두운 띠지만 **bg 에서 파생한다**.\n //\n // 예전에는 청회색(#1e293b / rgba(3,7,18,.95))이 박혀 있었다. 배경·카드·강조색은\n // 서비스가 넣은 값을 따라오는데 이것만 따라오지 않아서, 본문을 따뜻하게 바꾸면\n // 화면 맨 아래에만 남색 띠가 남아 그 부분이 다른 제품처럼 보였다.\n //\n // 빼는 폭이 두 모드에서 크게 다른 것은 출발점이 다르기 때문이다 — 밝은 배경은\n // 어두운 띠까지 내려가야 하고, 어두운 배경은 이미 어두워서 한 단만 더 내리면 된다.\n //\n // 밝은 쪽 234 는 포슬린 바탕(#FBFBFD)에서 #111113 이 나오는 값이다 — 팔레트가\n // 상태바에 준 딥 차콜(#111316)과 같은 깊이다. 203 이던 때는 #303032 로 한 단 옅어서,\n // 흰 화면 아래 회색 띠가 「어두운 프레임」이 아니라 「덜 칠한 자리」로 보였다.\n const footerBg = darkenFromBg(bg, light ? 234 : 8)\n const footerText = mutedOn(footerBg, 0.55)\n const footerBorder = light ? 'rgba(255,255,255,0.08)' : 'rgba(255,255,255,0.06)'\n\n return {\n textHeading, textBody, textMuted,\n border, hover, overlay, surface, surfaceAlt,\n accent, accentRgb, accentText, accentHover, accentMuted, accentMutedText,\n btnPrimaryBg, btnPrimaryText, btnPrimaryHover,\n inputBg, inputBorder, inputFocusBorder, inputFocusShadow,\n statusSuccess, statusError, statusWarning, statusInfo, statusNeutral, statusPurple, statusTeal,\n statusSuccessRgb, statusErrorRgb, statusWarningRgb, statusInfoRgb,\n statusNeutralRgb, statusPurpleRgb, statusTealRgb,\n sidebarText, sidebarTextMuted, sidebarActive,\n headerText,\n footerBg, footerText, footerBorder,\n }\n}\n\n/** CSS 변수로 일괄 적용 */\nexport function applySemanticPalette(palette: SemanticPalette): void {\n const el = document.documentElement\n const s = el.style\n\n // 텍스트\n s.setProperty('--admin-text-heading', palette.textHeading)\n s.setProperty('--admin-text-body', palette.textBody)\n s.setProperty('--admin-text-muted', palette.textMuted)\n s.setProperty('--admin-text-primary', palette.textHeading)\n\n // 경계/호버/오버레이\n s.setProperty('--admin-border', palette.border)\n s.setProperty('--admin-hover', palette.hover)\n s.setProperty('--admin-overlay', palette.overlay)\n s.setProperty('--admin-surface', palette.surface)\n s.setProperty('--admin-surface-alt', palette.surfaceAlt)\n\n // 강조색\n s.setProperty('--admin-accent', palette.accent)\n s.setProperty('--admin-accent-rgb', palette.accentRgb)\n s.setProperty('--admin-accent-text', palette.accentText)\n s.setProperty('--admin-accent-hover', palette.accentHover)\n s.setProperty('--admin-accent-muted', palette.accentMuted)\n s.setProperty('--admin-accent-muted-text', palette.accentMutedText)\n\n // 버튼\n s.setProperty('--admin-btn-primary-bg', palette.btnPrimaryBg)\n s.setProperty('--admin-btn-primary-text', palette.btnPrimaryText)\n s.setProperty('--admin-btn-primary-hover', palette.btnPrimaryHover)\n\n // 입력\n s.setProperty('--admin-input-bg', palette.inputBg)\n s.setProperty('--admin-input-border', palette.inputBorder)\n s.setProperty('--admin-input-focus-border', palette.inputFocusBorder)\n s.setProperty('--admin-input-focus-shadow', palette.inputFocusShadow)\n\n // 상태\n s.setProperty('--admin-status-success', palette.statusSuccess)\n s.setProperty('--admin-status-error', palette.statusError)\n s.setProperty('--admin-status-warning', palette.statusWarning)\n s.setProperty('--admin-status-info', palette.statusInfo)\n s.setProperty('--admin-status-neutral', palette.statusNeutral)\n s.setProperty('--admin-status-purple', palette.statusPurple)\n s.setProperty('--admin-status-teal', palette.statusTeal)\n s.setProperty('--admin-status-success-rgb', palette.statusSuccessRgb)\n s.setProperty('--admin-status-error-rgb', palette.statusErrorRgb)\n s.setProperty('--admin-status-warning-rgb', palette.statusWarningRgb)\n s.setProperty('--admin-status-info-rgb', palette.statusInfoRgb)\n s.setProperty('--admin-status-neutral-rgb', palette.statusNeutralRgb)\n s.setProperty('--admin-status-purple-rgb', palette.statusPurpleRgb)\n s.setProperty('--admin-status-teal-rgb', palette.statusTealRgb)\n\n // 사이드바\n s.setProperty('--admin-sidebar-text', palette.sidebarText)\n s.setProperty('--admin-sidebar-text-muted', palette.sidebarTextMuted)\n s.setProperty('--admin-sidebar-active', palette.sidebarActive)\n\n // 헤더\n s.setProperty('--admin-header-text', palette.headerText)\n\n // 푸터\n s.setProperty('--admin-footer-bg', palette.footerBg)\n s.setProperty('--admin-footer-text', palette.footerText)\n s.setProperty('--admin-footer-border', palette.footerBorder)\n\n // glass-accent 호환\n s.setProperty('--glass-accent', palette.accent)\n s.setProperty('--glass-accent-rgb', palette.accentRgb)\n}\n","import {\n deriveSemanticPalette,\n applySemanticPalette,\n isLightBackground,\n type SemanticPalette,\n} from './themeColors'\n\n/**\n * 사용자가 실제로 고르는 색은 5개뿐이다. 나머지 시맨틱 색상(텍스트·경계·상태·버튼…)은\n * 전부 이 5개에서 파생된다 — deriveSemanticPalette() 참고.\n *\n * 값의 출처는 서비스마다 다르다. hub 는 백엔드 site_settings 에서 받아오고,\n * 서비스 앱은 그냥 기본값을 쓰거나 자체 설정을 넣으면 된다.\n */\nexport interface ThemeConfig {\n /** 앱 전체 배경 */\n bg: string\n /** 사이드바 배경 */\n sidebar: string\n /** 헤더/상단바 배경 */\n header: string\n /** 카드/패널 배경 */\n card: string\n /** 강조색 — 버튼·링크·활성 상태의 기준 */\n accent: string\n /** 스킨 식별자. CSS 에서 `[style*=\"--admin-ui-skin\"]` 분기용 훅으로만 쓴다. */\n skin?: string\n}\n\n/**\n * 기본 팔레트 — **밝은 슬레이트·화이트**(0.10.0).\n *\n * 한동안 브랜드의 빵 색이었다. ink(#302C23)·crust(#8F6747)·cream(#F4F2EC). 로고가\n * 따뜻하니 본문도 따뜻해야 서로 밀어내지 않는다는 판단이었는데, 화면 전체가 누렇게\n * 보였다. 로고 한 점이 따뜻한 것과 화면 전체가 따뜻한 것은 다른 일이다 — 전자는 표식이고\n * 후자는 분위기다.\n *\n * 그래서 본문은 차갑게 돌리고 **로고는 그대로 둔다.** 흰 바탕 위의 갈색 식빵은 잘 읽힌다.\n * 오히려 바탕이 크림일 때보다 대비가 낫다.\n *\n * 계열은 슬레이트다 — 회색에 푸른 기운이 살짝 도는 쪽. 순수 회색(#111827 계열)보다\n * 화면이 덜 탁하고, 흰 카드와 함께 두면 \"밝은 사무실\" 인상이 난다. 인디고 강조색과\n * 같은 색상환에 있어 서로 붙는다.\n *\n * 텍스트·경계·상태색은 deriveSemanticPalette 가 배경 밝기를 보고 알아서 고른다.\n */\nexport const LIGHT_THEME: ThemeConfig = {\n /** 순백이 아니라 아주 옅은 포슬린. 카드(순백)가 그 위에 떠 보이려면 바탕이 한 톤 낮아야 한다. */\n bg: '#FBFBFD',\n sidebar: 'rgba(255, 255, 255, 0.75)',\n header: 'rgba(255, 255, 255, 0.85)',\n card: 'rgba(255, 255, 255, 0.92)',\n /** 인디고. 흰 글자 대비 7.0:1 이라 버튼 글자가 넉넉히 읽히고, 경고색(주황)·성공색(초록)과 갈린다. */\n accent: '#4F46E5',\n skin: 'default',\n}\n\n/**\n * 다크 팔레트 — 라이트와 **같은 계열의 어두운 쪽**.\n *\n * 라이트만 슬레이트로 바꾸고 다크를 빵 색으로 두면 모드를 바꿀 때마다 다른 제품이\n * 된다. 다크는 라이트의 반전이어야지 별개의 팔레트여선 안 된다.\n *\n * 슬레이트 900(#0F172A)을 바탕으로, 표면은 800(#1E293B)을 유리처럼 비치게 얹는다.\n */\nexport const DARK_THEME: ThemeConfig = {\n bg: '#0F172A',\n sidebar: 'rgba(30, 41, 59, 0.6)',\n header: 'rgba(15, 23, 42, 0.85)',\n card: 'rgba(30, 41, 59, 0.5)',\n /**\n * 인디고 원색(#4F46E5)은 어두운 바탕에서 가라앉아 흰 글자 대비가 4.0:1 로 떨어진다.\n * 한 단 밝힌 400(#818CF8)을 쓴다 — 어두운 바탕에서 로고를 밝게 반전시키는 것과 같은 이유다.\n */\n accent: '#818CF8',\n skin: 'default',\n}\n\n/** 하위 호환용 별칭. 예전 코드가 이 이름으로 참조한다. */\nexport const DEFAULT_THEME = DARK_THEME\n\n/**\n * 테마를 CSS 변수로 문서 루트에 적용한다.\n *\n * CSS 변수를 쓰는 이유는 이 값들이 라이브러리 경계를 넘어가야 하기 때문이다.\n * 플랫폼 셸이 한 번 적용하면 같은 문서 안의 모든 서비스 화면이 같은 색을 본다.\n *\n * 보통은 직접 부르지 않고 useTheme()/initTheme() 을 쓴다. 백엔드에서 받은 색을\n * 그대로 밀어 넣는 것처럼 모드와 무관한 적용이 필요할 때만 직접 호출한다.\n */\nexport function applyTheme(config: Partial<ThemeConfig> = {}): SemanticPalette {\n const c = { ...DARK_THEME, ...config }\n const el = document.documentElement\n const s = el.style\n\n s.setProperty('--admin-bg-color', c.bg)\n s.setProperty('--admin-sidebar-bg', c.sidebar)\n s.setProperty('--admin-header-bg', c.header)\n s.setProperty('--admin-card-bg', c.card)\n s.setProperty('--admin-ui-skin', c.skin ?? 'default')\n\n const light = isLightBackground(c.bg)\n\n // 브라우저가 그리는 것들(스크롤바, 셀렉트, 날짜 선택기)까지 같이 뒤집는다.\n // 이게 없으면 라이트 테마에 검은 스크롤바가 남는다.\n s.setProperty('color-scheme', light ? 'light' : 'dark')\n\n // 서비스가 CSS·JS 로 현재 모드에 반응할 수 있는 훅.\n // macro 처럼 자체 UI 프레임워크(Vuetify)의 테마를 맞춰야 하는 앱이 이걸 본다.\n el.setAttribute('data-lf-theme', light ? 'light' : 'dark')\n\n const palette = derive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AACR;AAUO,MAAM,aAA0B;AAAA,EACrC,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,QAAQ;AAAA,EACR,MAAM;AACR;AAGO,MAAM,gBAAgB;AAWtB,SAAS,WAAW,SAA+B,IAAqB;AAC7E,QAAM,IAAI,EAAE,GAAG,YAAY,GAAG,OAAA;AAC9B,QAAM,KAAK,SAAS;AACpB,QAAM,IAAI,GAAG;AAEb,IAAE,YAAY,oBAAoB,EAAE,EAAE;AACtC,IAAE,YAAY,sBAAsB,EAAE,OAAO;AAC7C,IAAE,YAAY,qBAAqB,EAAE,MAAM;AAC3C,IAAE,YAAY,mBAAmB,EAAE,IAAI;AACvC,IAAE,YAAY,mBAAmB,EAAE,QAAQ,SAAS;AAEpD,QAAM,QAAQ,kBAAkB,EAAE,EAAE;AAIpC,IAAE,YAAY,gBAAgB,QAAQ,UAAU,MAAM;AAItD,KAAG,aAAa,iBAAiB,QAAQ,UAAU,MAAM;AAEzD,QAAM,UAAU,sBAAsB,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM;AACjF,uBAAqB,OAAO;AAC5B,SAAO;AACT;"}
|
|
@@ -7,8 +7,8 @@ type __VLS_Props = {
|
|
|
7
7
|
/**
|
|
8
8
|
* 바깥(스크림)을 눌러 닫을 수 있게 한다. **기본은 닫지 않는다.**
|
|
9
9
|
*
|
|
10
|
-
* 예전에는 기본이 반대였다. 그러자 입력이 있는 모달마다 하나씩
|
|
11
|
-
*
|
|
10
|
+
* 예전에는 기본이 반대였다. 그러자 입력이 있는 모달마다 하나씩 옵션을 손으로
|
|
11
|
+
* 달게 됐다 — hub 에서만 로그인·비밀번호 찾기·프로필 편집·비밀번호 재설정·
|
|
12
12
|
* 소셜 연동 확인·변경 이력·공지까지 13곳이 그랬다. **매번 켜야 하는 옵션이면
|
|
13
13
|
* 그게 기본값이어야 한다.**
|
|
14
14
|
*
|
|
@@ -28,14 +28,6 @@ type __VLS_Props = {
|
|
|
28
28
|
* 동작이기도 하다. 끄는 것은 대답을 받아야만 넘어가는 모달에서만 뜻이 있다.
|
|
29
29
|
*/
|
|
30
30
|
closeOnEsc?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* 바깥 클릭과 ESC 를 **함께** 막는다.
|
|
33
|
-
*
|
|
34
|
-
* @deprecated 기본값이 뒤집히면서 스크림 쪽으로는 할 일이 없어졌다. ESC 까지
|
|
35
|
-
* 막아야 하는 자리면 `:close-on-esc="false"` 를 쓰는 편이 무엇을 끄는지 분명하다.
|
|
36
|
-
* 이미 달려 있는 곳(hub 13곳)이 조용히 뜻을 바꾸지 않도록 남겨 둔다.
|
|
37
|
-
*/
|
|
38
|
-
persistent?: boolean;
|
|
39
31
|
/** 닫기 버튼을 놓을지. */
|
|
40
32
|
closable?: boolean;
|
|
41
33
|
closeLabel?: string;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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, useTemplateRef, onMounted, nextTick, createTextVNode, withDirectives, withKeys, vModelText, resolveDynamicComponent, useModel, useId, mergeProps, vModelDynamic, mergeModels, vModelSelect, vModelCheckbox, vModelRadio, useSlots } from "vue";
|
|
2
|
-
import { a as applyTheme, D as DARK_THEME, L as LIGHT_THEME } from "./applyTheme-
|
|
3
|
-
import { b, c, d, e, f, h, i, l } from "./applyTheme-
|
|
2
|
+
import { a as applyTheme, D as DARK_THEME, L as LIGHT_THEME } from "./applyTheme-C5V6Yq8D.js";
|
|
3
|
+
import { b, c, d, e, f, h, i, l } from "./applyTheme-C5V6Yq8D.js";
|
|
4
4
|
import { defineStore } from "pinia";
|
|
5
5
|
const LOAFACTO_SERVICES = [
|
|
6
6
|
{
|
|
@@ -835,7 +835,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
|
-
const AppConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-
|
|
838
|
+
const AppConfirmModal = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-cfc8e618"]]);
|
|
839
839
|
const LF_ICONS = {
|
|
840
840
|
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",
|
|
841
841
|
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",
|
|
@@ -1004,7 +1004,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1004
1004
|
};
|
|
1005
1005
|
}
|
|
1006
1006
|
});
|
|
1007
|
-
const LfButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-
|
|
1007
|
+
const LfButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-b669bcb6"]]);
|
|
1008
1008
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
1009
1009
|
__name: "LfIconButton",
|
|
1010
1010
|
props: {
|
|
@@ -1042,7 +1042,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
1042
1042
|
};
|
|
1043
1043
|
}
|
|
1044
1044
|
});
|
|
1045
|
-
const LfIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-
|
|
1045
|
+
const LfIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-130b0aca"]]);
|
|
1046
1046
|
const _hoisted_1$k = ["for"];
|
|
1047
1047
|
const _hoisted_2$j = {
|
|
1048
1048
|
key: 0,
|
|
@@ -1406,7 +1406,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
1406
1406
|
};
|
|
1407
1407
|
}
|
|
1408
1408
|
});
|
|
1409
|
-
const LfCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-
|
|
1409
|
+
const LfCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-494bdf02"]]);
|
|
1410
1410
|
const _hoisted_1$f = {
|
|
1411
1411
|
key: 0,
|
|
1412
1412
|
class: "lf-switch__text"
|
|
@@ -1463,7 +1463,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
1463
1463
|
};
|
|
1464
1464
|
}
|
|
1465
1465
|
});
|
|
1466
|
-
const LfSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
1466
|
+
const LfSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-61388d79"]]);
|
|
1467
1467
|
const _hoisted_1$e = {
|
|
1468
1468
|
key: 0,
|
|
1469
1469
|
class: "lf-radio-group__legend"
|
|
@@ -1549,7 +1549,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
1549
1549
|
};
|
|
1550
1550
|
}
|
|
1551
1551
|
});
|
|
1552
|
-
const LfRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
1552
|
+
const LfRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-56d4b541"]]);
|
|
1553
1553
|
const _hoisted_1$d = ["aria-labelledby", "aria-label"];
|
|
1554
1554
|
const _hoisted_2$c = {
|
|
1555
1555
|
key: 0,
|
|
@@ -1575,7 +1575,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1575
1575
|
fullHeight: { type: Boolean },
|
|
1576
1576
|
closeOnScrim: { type: Boolean, default: false },
|
|
1577
1577
|
closeOnEsc: { type: Boolean, default: true },
|
|
1578
|
-
persistent: { type: Boolean },
|
|
1579
1578
|
closable: { type: Boolean, default: true },
|
|
1580
1579
|
closeLabel: { default: "닫기" },
|
|
1581
1580
|
ariaLabel: {}
|
|
@@ -1602,10 +1601,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1602
1601
|
function onScrimClick() {
|
|
1603
1602
|
if (!downOnScrim) return;
|
|
1604
1603
|
downOnScrim = false;
|
|
1605
|
-
if (props.closeOnScrim
|
|
1604
|
+
if (props.closeOnScrim) close("scrim");
|
|
1606
1605
|
}
|
|
1607
1606
|
function onKeydown(e2) {
|
|
1608
|
-
if (e2.key === "Escape" && props.closeOnEsc
|
|
1607
|
+
if (e2.key === "Escape" && props.closeOnEsc) {
|
|
1609
1608
|
e2.stopPropagation();
|
|
1610
1609
|
close("esc");
|
|
1611
1610
|
return;
|
|
@@ -1712,7 +1711,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1712
1711
|
};
|
|
1713
1712
|
}
|
|
1714
1713
|
});
|
|
1715
|
-
const LfModal = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
1714
|
+
const LfModal = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-cd0b7eb4"]]);
|
|
1716
1715
|
const _hoisted_1$c = {
|
|
1717
1716
|
key: 0,
|
|
1718
1717
|
class: "lf-card__head"
|
|
@@ -1780,7 +1779,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1780
1779
|
};
|
|
1781
1780
|
}
|
|
1782
1781
|
});
|
|
1783
|
-
const LfCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
1782
|
+
const LfCard = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-4d6ca8ce"]]);
|
|
1784
1783
|
const _hoisted_1$b = { class: "lf-page-header" };
|
|
1785
1784
|
const _hoisted_2$a = { class: "lf-page-header__title-box" };
|
|
1786
1785
|
const _hoisted_3$6 = { class: "lf-page-header__title" };
|
|
@@ -1845,7 +1844,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1845
1844
|
};
|
|
1846
1845
|
}
|
|
1847
1846
|
});
|
|
1848
|
-
const LfPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
1847
|
+
const LfPageHeader = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-d1ea4f6d"]]);
|
|
1849
1848
|
const _hoisted_1$a = {
|
|
1850
1849
|
key: 0,
|
|
1851
1850
|
class: "lf-badge__dot",
|
|
@@ -1897,7 +1896,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1897
1896
|
};
|
|
1898
1897
|
}
|
|
1899
1898
|
});
|
|
1900
|
-
const LfBadge = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
1899
|
+
const LfBadge = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-489e5e64"]]);
|
|
1901
1900
|
const _hoisted_1$9 = ["role"];
|
|
1902
1901
|
const _hoisted_2$8 = {
|
|
1903
1902
|
class: "lf-alert__badge",
|
|
@@ -2254,7 +2253,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2254
2253
|
};
|
|
2255
2254
|
}
|
|
2256
2255
|
});
|
|
2257
|
-
const LfPagination = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
2256
|
+
const LfPagination = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-700357c3"]]);
|
|
2258
2257
|
const _hoisted_1$5 = {
|
|
2259
2258
|
key: 0,
|
|
2260
2259
|
class: "lf-empty__icon"
|
|
@@ -2431,7 +2430,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2431
2430
|
};
|
|
2432
2431
|
}
|
|
2433
2432
|
});
|
|
2434
|
-
const LfStatCard = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
2433
|
+
const LfStatCard = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-1a74a158"]]);
|
|
2435
2434
|
const _hoisted_1$2 = ["aria-describedby"];
|
|
2436
2435
|
const _hoisted_2$2 = ["id"];
|
|
2437
2436
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|