@j-solution/components 1.7.0 → 1.9.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/README.md +413 -415
- package/assets/jwms-portal-frontend-Ct2Tc7yj.css +1 -0
- package/assets/styles/global-utilities.css +34 -0
- package/assets/styles/j-components.css +1 -1
- package/assets/styles/themes.css +443 -443
- package/components/atoms/JButton.vue.cjs +6 -1
- package/components/atoms/JButton.vue.cjs.map +1 -1
- package/components/atoms/JButton.vue.js +10 -85
- package/components/atoms/JButton.vue.js.map +1 -1
- package/components/atoms/JButton.vue2.cjs +1 -1
- package/components/atoms/JButton.vue2.cjs.map +1 -1
- package/components/atoms/JButton.vue2.js +85 -2
- package/components/atoms/JButton.vue2.js.map +1 -1
- package/components/atoms/JGrid.vue.cjs +1 -1
- package/components/atoms/JGrid.vue.js +1 -1
- package/components/atoms/JGrid.vue2.cjs +1 -1
- package/components/atoms/JGrid.vue2.cjs.map +1 -1
- package/components/atoms/JGrid.vue2.js +39 -35
- package/components/atoms/JGrid.vue2.js.map +1 -1
- package/components/atoms/JLabel.vue.cjs +1 -1
- package/components/atoms/JLabel.vue.cjs.map +1 -1
- package/components/atoms/JLabel.vue.js +26 -22
- package/components/atoms/JLabel.vue.js.map +1 -1
- package/components/atoms/JSectionTitle.vue.cjs +7 -0
- package/components/atoms/JSectionTitle.vue.cjs.map +1 -0
- package/components/atoms/JSectionTitle.vue.js +13 -0
- package/components/atoms/JSectionTitle.vue.js.map +1 -0
- package/components/atoms/JSectionTitle.vue2.cjs +2 -0
- package/components/atoms/JSectionTitle.vue2.cjs.map +1 -0
- package/components/atoms/JSectionTitle.vue2.js +67 -0
- package/components/atoms/JSectionTitle.vue2.js.map +1 -0
- package/components/atoms/JSplitter.vue.cjs +6 -1
- package/components/atoms/JSplitter.vue.cjs.map +1 -1
- package/components/atoms/JSplitter.vue.js +10 -59
- package/components/atoms/JSplitter.vue.js.map +1 -1
- package/components/atoms/JSplitter.vue2.cjs +1 -1
- package/components/atoms/JSplitter.vue2.cjs.map +1 -1
- package/components/atoms/JSplitter.vue2.js +59 -2
- package/components/atoms/JSplitter.vue2.js.map +1 -1
- package/components/examples/ExampleCrudPage.vue.cjs +1 -1
- package/components/examples/ExampleCrudPage.vue.cjs.map +1 -1
- package/components/examples/ExampleCrudPage.vue.js +228 -208
- package/components/examples/ExampleCrudPage.vue.js.map +1 -1
- package/components/examples/ExampleTabMappingPage.vue.cjs +1 -1
- package/components/examples/ExampleTabMappingPage.vue.cjs.map +1 -1
- package/components/examples/ExampleTabMappingPage.vue.js +341 -368
- package/components/examples/ExampleTabMappingPage.vue.js.map +1 -1
- package/components/molecules/JAlert.vue.cjs +1 -1
- package/components/molecules/JAlert.vue.cjs.map +1 -1
- package/components/molecules/JAlert.vue.js +18 -16
- package/components/molecules/JAlert.vue.js.map +1 -1
- package/components/molecules/JCard.vue.cjs +1 -1
- package/components/molecules/JCard.vue.cjs.map +1 -1
- package/components/molecules/JCard.vue.js +55 -39
- package/components/molecules/JCard.vue.js.map +1 -1
- package/components/molecules/JEmptyState.vue.cjs +7 -0
- package/components/molecules/JEmptyState.vue.cjs.map +1 -0
- package/components/molecules/JEmptyState.vue.js +13 -0
- package/components/molecules/JEmptyState.vue.js.map +1 -0
- package/components/molecules/JEmptyState.vue2.cjs +2 -0
- package/components/molecules/JEmptyState.vue2.cjs.map +1 -0
- package/components/molecules/JEmptyState.vue2.js +127 -0
- package/components/molecules/JEmptyState.vue2.js.map +1 -0
- package/components/molecules/JFormField.vue.cjs +6 -1
- package/components/molecules/JFormField.vue.cjs.map +1 -1
- package/components/molecules/JFormField.vue.js +10 -264
- package/components/molecules/JFormField.vue.js.map +1 -1
- package/components/molecules/JFormField.vue2.cjs +2 -0
- package/components/molecules/JFormField.vue2.cjs.map +1 -0
- package/components/molecules/JFormField.vue2.js +271 -0
- package/components/molecules/JFormField.vue2.js.map +1 -0
- package/components/molecules/JTabs.vue.cjs +1 -1
- package/components/molecules/JTabs.vue.js +1 -1
- package/components/molecules/JTabs.vue2.cjs +1 -1
- package/components/molecules/JTabs.vue2.cjs.map +1 -1
- package/components/molecules/JTabs.vue2.js +44 -50
- package/components/molecules/JTabs.vue2.js.map +1 -1
- package/components/molecules/JTitlebar.vue.cjs +1 -1
- package/components/molecules/JTitlebar.vue.cjs.map +1 -1
- package/components/molecules/JTitlebar.vue.js +23 -20
- package/components/molecules/JTitlebar.vue.js.map +1 -1
- package/components/organisms/JDynamicForm.vue2.cjs +1 -1
- package/components/organisms/JDynamicForm.vue2.cjs.map +1 -1
- package/components/organisms/JDynamicForm.vue2.js +35 -32
- package/components/organisms/JDynamicForm.vue2.js.map +1 -1
- package/components/organisms/JDynamicTabs.vue.cjs +1 -1
- package/components/organisms/JDynamicTabs.vue.cjs.map +1 -1
- package/components/organisms/JDynamicTabs.vue.js +47 -52
- package/components/organisms/JDynamicTabs.vue.js.map +1 -1
- package/components/organisms/JFilterBar.vue.cjs +6 -1
- package/components/organisms/JFilterBar.vue.cjs.map +1 -1
- package/components/organisms/JFilterBar.vue.js +10 -137
- package/components/organisms/JFilterBar.vue.js.map +1 -1
- package/components/organisms/JFilterBar.vue2.cjs +1 -1
- package/components/organisms/JFilterBar.vue2.cjs.map +1 -1
- package/components/organisms/JFilterBar.vue2.js +143 -2
- package/components/organisms/JFilterBar.vue2.js.map +1 -1
- package/components/organisms/JFormModal.vue.cjs +1 -1
- package/components/organisms/JFormModal.vue.cjs.map +1 -1
- package/components/organisms/JFormModal.vue.js +54 -49
- package/components/organisms/JFormModal.vue.js.map +1 -1
- package/components/organisms/JHeader.vue.cjs +1 -1
- package/components/organisms/JHeader.vue.cjs.map +1 -1
- package/components/organisms/JHeader.vue.js +191 -190
- package/components/organisms/JHeader.vue.js.map +1 -1
- package/components/organisms/JModal.vue.cjs +1 -1
- package/components/organisms/JModal.vue.cjs.map +1 -1
- package/components/organisms/JModal.vue.js +47 -45
- package/components/organisms/JModal.vue.js.map +1 -1
- package/components/organisms/JPageContainer.vue.cjs +1 -1
- package/components/organisms/JPageContainer.vue.cjs.map +1 -1
- package/components/organisms/JPageContainer.vue.js +22 -22
- package/components/organisms/JPageContainer.vue.js.map +1 -1
- package/components/organisms/JSearchPanel.vue2.cjs +1 -1
- package/components/organisms/JSearchPanel.vue2.cjs.map +1 -1
- package/components/organisms/JSearchPanel.vue2.js +34 -32
- package/components/organisms/JSearchPanel.vue2.js.map +1 -1
- package/components/organisms/JShuttle.vue.cjs +7 -0
- package/components/organisms/JShuttle.vue.cjs.map +1 -0
- package/components/organisms/JShuttle.vue.js +13 -0
- package/components/organisms/JShuttle.vue.js.map +1 -0
- package/components/organisms/JShuttle.vue2.cjs +2 -0
- package/components/organisms/JShuttle.vue2.cjs.map +1 -0
- package/components/organisms/JShuttle.vue2.js +216 -0
- package/components/organisms/JShuttle.vue2.js.map +1 -0
- package/components/organisms/JSidebar/JSidebar.vue.cjs +2 -0
- package/components/organisms/JSidebar/JSidebar.vue.cjs.map +1 -0
- package/components/organisms/JSidebar/JSidebar.vue.js +189 -0
- package/components/organisms/JSidebar/JSidebar.vue.js.map +1 -0
- package/components/{molecules/JFormField.vue3.cjs → organisms/JSidebar/JSidebar.vue2.cjs} +2 -2
- package/components/organisms/JSidebar/JSidebar.vue2.cjs.map +1 -0
- package/components/organisms/JSidebar/JSidebar.vue2.js +5 -0
- package/components/organisms/JSidebar/JSidebar.vue2.js.map +1 -0
- package/components/organisms/JSidebar/JSidebarGroup.vue.cjs +2 -0
- package/components/organisms/JSidebar/JSidebarGroup.vue.cjs.map +1 -0
- package/components/organisms/JSidebar/JSidebarGroup.vue.js +89 -0
- package/components/organisms/JSidebar/JSidebarGroup.vue.js.map +1 -0
- package/components/organisms/JSidebar/JSidebarGroup.vue2.cjs +2 -0
- package/components/organisms/JSidebar/JSidebarGroup.vue2.cjs.map +1 -0
- package/components/organisms/JSidebar/JSidebarGroup.vue2.js +5 -0
- package/components/organisms/JSidebar/JSidebarGroup.vue2.js.map +1 -0
- package/components/organisms/JSidebar/JSidebarItem.vue.cjs +2 -0
- package/components/organisms/JSidebar/JSidebarItem.vue.cjs.map +1 -0
- package/components/organisms/JSidebar/JSidebarItem.vue.js +79 -0
- package/components/organisms/JSidebar/JSidebarItem.vue.js.map +1 -0
- package/components/organisms/JSidebar/JSidebarItem.vue2.cjs +2 -0
- package/components/organisms/JSidebar/JSidebarItem.vue2.cjs.map +1 -0
- package/components/organisms/JSidebar/JSidebarItem.vue2.js +5 -0
- package/components/organisms/JSidebar/JSidebarItem.vue2.js.map +1 -0
- package/components/organisms/JSidebarSimple/JDynamicMenuItem.vue.cjs +1 -1
- package/components/organisms/JSidebarSimple/JDynamicMenuItem.vue.cjs.map +1 -1
- package/components/organisms/JSidebarSimple/JDynamicMenuItem.vue.js +52 -52
- package/components/organisms/JSidebarSimple/JDynamicMenuItem.vue.js.map +1 -1
- package/components/shadcn/Card.vue.cjs +1 -1
- package/components/shadcn/Card.vue.cjs.map +1 -1
- package/components/shadcn/Card.vue.js +1 -1
- package/components/shadcn/Card.vue.js.map +1 -1
- package/components/shadcn/CardContent.vue.cjs +1 -1
- package/components/shadcn/CardContent.vue.cjs.map +1 -1
- package/components/shadcn/CardContent.vue.js +4 -4
- package/components/shadcn/CardContent.vue.js.map +1 -1
- package/components/shadcn/CardHeader.vue.cjs +1 -1
- package/components/shadcn/CardHeader.vue.cjs.map +1 -1
- package/components/shadcn/CardHeader.vue.js +5 -5
- package/components/shadcn/CardHeader.vue.js.map +1 -1
- package/components/shadcn/Input.vue.cjs +1 -1
- package/components/shadcn/Input.vue.cjs.map +1 -1
- package/components/shadcn/Input.vue.js +3 -3
- package/components/shadcn/Input.vue.js.map +1 -1
- package/components/shadcn/SelectTrigger.vue.cjs +1 -1
- package/components/shadcn/SelectTrigger.vue.cjs.map +1 -1
- package/components/shadcn/SelectTrigger.vue.js +1 -1
- package/components/shadcn/SelectTrigger.vue.js.map +1 -1
- package/components/shadcn/TabsContent.vue.cjs +1 -1
- package/components/shadcn/TabsContent.vue.cjs.map +1 -1
- package/components/shadcn/TabsContent.vue.js +1 -1
- package/components/shadcn/TabsContent.vue.js.map +1 -1
- package/components/shadcn/TabsList.vue.cjs +1 -1
- package/components/shadcn/TabsList.vue.cjs.map +1 -1
- package/components/shadcn/TabsList.vue.js +10 -10
- package/components/shadcn/TabsList.vue.js.map +1 -1
- package/components/shadcn/Textarea.vue.cjs +1 -1
- package/components/shadcn/Textarea.vue.cjs.map +1 -1
- package/components/shadcn/Textarea.vue.js +1 -1
- package/components/shadcn/Textarea.vue.js.map +1 -1
- package/components/shadcn/index.cjs +1 -1
- package/components/shadcn/index.cjs.map +1 -1
- package/components/shadcn/index.js +4 -4
- package/components/shadcn/index.js.map +1 -1
- package/components/templates/JLayout.vue.cjs.map +1 -1
- package/components/templates/JLayout.vue.js.map +1 -1
- package/components/templates/JLayoutSimple.vue.cjs +1 -1
- package/components/templates/JLayoutSimple.vue.cjs.map +1 -1
- package/components/templates/JLayoutSimple.vue.js +36 -30
- package/components/templates/JLayoutSimple.vue.js.map +1 -1
- package/index.cjs +1 -1
- package/index.js +75 -67
- package/package.json +1 -1
- package/types/index.d.ts +662 -461
- package/types/sidebar.types.cjs +2 -0
- package/types/sidebar.types.cjs.map +1 -0
- package/types/sidebar.types.js +5 -0
- package/types/sidebar.types.js.map +1 -0
- package/assets/jwms-portal-frontend-CwxPfHfa.css +0 -1
- package/components/molecules/JFormField.vue3.cjs.map +0 -1
- package/components/molecules/JFormField.vue3.js +0 -6
- package/components/molecules/JFormField.vue3.js.map +0 -1
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as me, computed as _, ref as B, onMounted as fe, onUnmounted as he, createElementBlock as o, openBlock as t, normalizeClass as w, unref as C, createElementVNode as i, createBlock as g, createCommentVNode as c, withCtx as u, createVNode as k, toDisplayString as h, Fragment as y, renderList as N, createTextVNode as ve, renderSlot as ge } from "vue";
|
|
2
|
+
import b from "../atoms/JIcon.vue.js";
|
|
3
|
+
import ke from "../atoms/JAvatar.vue.js";
|
|
4
4
|
import S from "../atoms/JButton.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import V from "../atoms/JPopover.vue.js";
|
|
6
6
|
import { cn as I } from "../../lib/utils.js";
|
|
7
|
-
import { getDefaultTheme as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
7
|
+
import { getDefaultTheme as F, detectThemeClasses as be, ensureDefaultTheme as W, validateThemeExists as A, getStoredTheme as xe, applyTheme as J, setStoredTheme as H } from "../../lib/theme-utils.js";
|
|
8
|
+
import q from "../../assets/images/logo-fallback.png.js";
|
|
9
|
+
const ye = { class: "flex items-center gap-6 flex-1" }, pe = ["src"], Te = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "text-sm font-bold text-foreground"
|
|
12
12
|
}, _e = {
|
|
13
13
|
key: 2,
|
|
14
14
|
class: "flex items-center gap-1"
|
|
15
|
-
},
|
|
15
|
+
}, we = { class: "flex items-center gap-3" }, Ce = { class: "p-2 min-w-[200px]" }, Se = { class: "space-y-1" }, Ie = ["onClick"], Le = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "w-4"
|
|
18
|
-
},
|
|
18
|
+
}, ze = { class: "flex-1 capitalize" }, Me = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "absolute top-0 right-0 h-4 w-4 rounded-full bg-destructive text-destructive-foreground text-xs flex items-center justify-center"
|
|
21
|
-
},
|
|
21
|
+
}, Ee = { class: "p-2" }, Oe = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "max-h-96 overflow-y-auto space-y-1"
|
|
24
|
-
},
|
|
24
|
+
}, Ne = ["onClick"], Be = { class: "flex items-start gap-2" }, Ae = { class: "flex-1 min-w-0" }, De = { class: "text-xs font-medium text-foreground" }, $e = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "text-xs text-muted-foreground mt-1"
|
|
27
|
-
},
|
|
27
|
+
}, Ge = {
|
|
28
28
|
key: 1,
|
|
29
29
|
class: "text-xs text-muted-foreground/60 mt-1"
|
|
30
|
-
},
|
|
30
|
+
}, Ue = {
|
|
31
31
|
key: 1,
|
|
32
32
|
class: "p-4 text-center text-xs text-muted-foreground"
|
|
33
|
-
},
|
|
33
|
+
}, Ve = { class: "flex items-center gap-2 cursor-pointer hover:opacity-80 transition-opacity" }, Fe = { class: "text-xs text-foreground hidden sm:inline" }, Je = { class: "w-full rounded-md overflow-hidden" }, Re = { class: "px-3 py-1.5 border-b border-border" }, Ye = { class: "text-xs font-medium text-foreground" }, je = {
|
|
34
34
|
key: 0,
|
|
35
35
|
class: "text-xs text-muted-foreground mt-0.5"
|
|
36
|
-
},
|
|
36
|
+
}, Ke = ["disabled", "onClick"], Pe = { class: "flex-1 text-left truncate" }, We = {
|
|
37
37
|
key: 1,
|
|
38
38
|
class: "h-px bg-muted my-1"
|
|
39
|
-
},
|
|
39
|
+
}, He = {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "h-px bg-muted my-1"
|
|
42
|
-
},
|
|
42
|
+
}, at = /* @__PURE__ */ me({
|
|
43
43
|
__name: "JHeader",
|
|
44
44
|
props: {
|
|
45
45
|
logo: {},
|
|
@@ -60,208 +60,209 @@ const xe = { class: "flex items-center gap-6 flex-1" }, ye = ["src"], pe = {
|
|
|
60
60
|
availableThemes: { default: void 0 }
|
|
61
61
|
},
|
|
62
62
|
emits: ["logoClick", "navClick", "notificationClick", "userMenuSelect", "sidebarToggle", "login"],
|
|
63
|
-
setup(
|
|
64
|
-
const
|
|
63
|
+
setup(a, { emit: Q }) {
|
|
64
|
+
const v = a, p = Q, R = {
|
|
65
65
|
default: {
|
|
66
|
-
containerClass: "h-10 px-4 border-b border-border bg-
|
|
66
|
+
containerClass: "h-10 px-4 border-b border-border bg-muted dark:bg-card",
|
|
67
67
|
navItemClass: "text-xs text-muted-foreground hover:text-foreground transition-colors px-3 py-1.5 rounded-md hover:bg-accent",
|
|
68
68
|
navItemActiveClass: "text-foreground font-medium bg-accent"
|
|
69
69
|
},
|
|
70
70
|
minimal: {
|
|
71
|
-
containerClass: "h-8 px-3 border-b border-border bg-
|
|
71
|
+
containerClass: "h-8 px-3 border-b border-border bg-muted dark:bg-card",
|
|
72
72
|
navItemClass: "text-xs text-muted-foreground hover:text-foreground transition-colors px-2 py-1 rounded-md hover:bg-accent",
|
|
73
73
|
navItemActiveClass: "text-foreground font-medium bg-accent"
|
|
74
74
|
}
|
|
75
|
-
},
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
78
|
-
}),
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
81
|
-
}),
|
|
82
|
-
|
|
83
|
-
},
|
|
75
|
+
}, D = _(() => R[v.styletype] ?? R.default), T = B(0), X = _(() => {
|
|
76
|
+
if (v.logo)
|
|
77
|
+
return v.logo;
|
|
78
|
+
}), $ = _(() => {
|
|
79
|
+
if (v.logo)
|
|
80
|
+
return T.value >= 1 && q ? q : X.value;
|
|
81
|
+
}), Z = () => {
|
|
82
|
+
T.value === 0 ? T.value = 1 : T.value === 1 && (T.value = 2);
|
|
83
|
+
}, G = _(() => v.notifications?.filter((s) => !s.read).length || 0), ee = [
|
|
84
84
|
{ id: "profile", label: "프로필", icon: "user" },
|
|
85
85
|
{ id: "settings", label: "설정", icon: "settings" },
|
|
86
86
|
{ id: "separator", label: "", separator: !0 },
|
|
87
87
|
{ id: "logout", label: "로그아웃", icon: "logOut" }
|
|
88
|
-
],
|
|
89
|
-
items:
|
|
90
|
-
}]),
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
s.onClick?.(),
|
|
94
|
-
}, se = (s) => {
|
|
95
|
-
s.onClick?.(), y("notificationClick", s);
|
|
88
|
+
], Y = _(() => [{
|
|
89
|
+
items: ee
|
|
90
|
+
}]), te = () => {
|
|
91
|
+
p("logoClick");
|
|
92
|
+
}, se = (s, n) => {
|
|
93
|
+
s.onClick?.(), p("navClick", s, n);
|
|
96
94
|
}, oe = (s) => {
|
|
97
|
-
|
|
95
|
+
s.onClick?.(), p("notificationClick", s);
|
|
96
|
+
}, ae = (s) => {
|
|
97
|
+
p("userMenuSelect", s);
|
|
98
98
|
}, ne = () => {
|
|
99
|
-
|
|
100
|
-
}, ae = () => {
|
|
101
|
-
y("sidebarToggle");
|
|
102
|
-
}, b = N(!1), _ = N(V()), O = N([]);
|
|
103
|
-
let L = !1, z = null, M = null;
|
|
104
|
-
const j = () => typeof window > "u" ? !1 : !!(window.location?.href?.includes("storybook") || window.__STORYBOOK_GLOBALS__), $ = () => {
|
|
105
|
-
const s = ke(), l = J(s);
|
|
106
|
-
if (h.availableThemes && h.availableThemes.length > 0) {
|
|
107
|
-
const e = l.filter((a) => h.availableThemes.includes(a));
|
|
108
|
-
O.value = J(e);
|
|
109
|
-
} else
|
|
110
|
-
O.value = l;
|
|
99
|
+
p("login");
|
|
111
100
|
}, le = () => {
|
|
101
|
+
p("sidebarToggle");
|
|
102
|
+
}, m = B(!1), x = B(F()), L = B([]);
|
|
103
|
+
let z = !1, M = null, E = null;
|
|
104
|
+
const j = () => typeof window > "u" ? !1 : !!(window.location?.href?.includes("storybook") || window.__STORYBOOK_GLOBALS__), U = () => {
|
|
105
|
+
const s = be(), n = W(s);
|
|
106
|
+
if (v.availableThemes && v.availableThemes.length > 0) {
|
|
107
|
+
const e = n.filter((r) => v.availableThemes.includes(r));
|
|
108
|
+
L.value = W(e);
|
|
109
|
+
} else
|
|
110
|
+
L.value = n;
|
|
111
|
+
}, re = () => {
|
|
112
112
|
if (typeof window > "u") return "light";
|
|
113
113
|
const s = localStorage.getItem("theme");
|
|
114
114
|
return s === "dark" || s === "light" ? s : window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
s === "dark" ? (
|
|
119
|
-
}, re = () => {
|
|
120
|
-
const s = b.value ? "light" : "dark";
|
|
121
|
-
G(s);
|
|
115
|
+
}, K = (s) => {
|
|
116
|
+
z = !0;
|
|
117
|
+
const n = document.documentElement;
|
|
118
|
+
s === "dark" ? (n.classList.add("dark"), m.value = !0) : (n.classList.remove("dark"), m.value = !1), localStorage.setItem("theme", s), z = !1;
|
|
122
119
|
}, ie = () => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const a = V();
|
|
139
|
-
P(a), _.value = a, W(a, "tweakcn-theme");
|
|
120
|
+
const s = m.value ? "light" : "dark";
|
|
121
|
+
K(s);
|
|
122
|
+
}, ce = () => {
|
|
123
|
+
if (v.defaultTheme)
|
|
124
|
+
return A(v.defaultTheme);
|
|
125
|
+
const s = xe("tweakcn-theme");
|
|
126
|
+
return s ? A(s) : F();
|
|
127
|
+
}, P = (s) => {
|
|
128
|
+
z = !0;
|
|
129
|
+
const n = A(s), e = J(n);
|
|
130
|
+
if (e)
|
|
131
|
+
x.value = n, j() || H(n, "tweakcn-theme");
|
|
132
|
+
else {
|
|
133
|
+
const r = F();
|
|
134
|
+
J(r), x.value = r, H(r, "tweakcn-theme");
|
|
140
135
|
}
|
|
141
|
-
return
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
return
|
|
146
|
-
|
|
147
|
-
const s =
|
|
148
|
-
|
|
149
|
-
const
|
|
150
|
-
|
|
136
|
+
return z = !1, e;
|
|
137
|
+
}, de = (s) => {
|
|
138
|
+
P(String(s));
|
|
139
|
+
}, ue = _(() => m.value ? "sun" : "moon");
|
|
140
|
+
return fe(() => {
|
|
141
|
+
U();
|
|
142
|
+
const s = re();
|
|
143
|
+
K(s);
|
|
144
|
+
const n = ce();
|
|
145
|
+
P(n);
|
|
151
146
|
const e = document.documentElement;
|
|
152
|
-
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
const d = Array.from(e.classList).find((
|
|
147
|
+
m.value = e.classList.contains("dark"), M = new MutationObserver(() => {
|
|
148
|
+
if (z) return;
|
|
149
|
+
const l = e.classList.contains("dark");
|
|
150
|
+
l !== m.value && (m.value = l, localStorage.setItem("theme", l ? "dark" : "light")), U();
|
|
151
|
+
const d = Array.from(e.classList).find((f) => f.startsWith("theme-"));
|
|
157
152
|
if (d) {
|
|
158
|
-
const
|
|
159
|
-
|
|
153
|
+
const f = d.replace("theme-", "");
|
|
154
|
+
L.value.includes(f) && (x.value = f);
|
|
160
155
|
}
|
|
161
|
-
}),
|
|
156
|
+
}), M.observe(document.documentElement, {
|
|
162
157
|
attributes: !0,
|
|
163
158
|
attributeFilter: ["class"]
|
|
164
|
-
}),
|
|
165
|
-
|
|
166
|
-
}),
|
|
159
|
+
}), E = new MutationObserver(() => {
|
|
160
|
+
U();
|
|
161
|
+
}), E.observe(document.head, {
|
|
167
162
|
childList: !0,
|
|
168
163
|
subtree: !0
|
|
169
164
|
});
|
|
170
|
-
let
|
|
165
|
+
let r = null;
|
|
171
166
|
if (j()) {
|
|
172
|
-
const
|
|
167
|
+
const l = () => {
|
|
173
168
|
try {
|
|
174
169
|
const d = window.__STORYBOOK_GLOBALS__;
|
|
175
170
|
if (d) {
|
|
176
171
|
if (typeof d.darkMode < "u") {
|
|
177
|
-
const
|
|
178
|
-
|
|
172
|
+
const f = d.darkMode;
|
|
173
|
+
if (f !== m.value) {
|
|
174
|
+
const O = document.documentElement;
|
|
175
|
+
f ? (O.classList.add("dark"), m.value = !0) : (O.classList.remove("dark"), m.value = !1);
|
|
176
|
+
}
|
|
179
177
|
}
|
|
180
|
-
if (d.theme && d.theme !==
|
|
181
|
-
const
|
|
182
|
-
|
|
178
|
+
if (d.theme && d.theme !== x.value) {
|
|
179
|
+
const f = String(d.theme);
|
|
180
|
+
if (L.value.includes(f)) {
|
|
181
|
+
const O = A(f);
|
|
182
|
+
J(O), x.value = O;
|
|
183
|
+
}
|
|
183
184
|
}
|
|
184
185
|
}
|
|
185
186
|
} catch {
|
|
186
187
|
}
|
|
187
188
|
};
|
|
188
|
-
|
|
189
|
+
l(), r = setInterval(l, 200);
|
|
189
190
|
}
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
he(() => {
|
|
192
|
+
M && (M.disconnect(), M = null), E && (E.disconnect(), E = null), r && clearInterval(r);
|
|
192
193
|
});
|
|
193
|
-
}), (s,
|
|
194
|
-
class: w(C(I)("flex items-center justify-between w-full",
|
|
194
|
+
}), (s, n) => (t(), o("header", {
|
|
195
|
+
class: w(C(I)("flex items-center justify-between w-full", D.value.containerClass))
|
|
195
196
|
}, [
|
|
196
|
-
i("div",
|
|
197
|
-
|
|
197
|
+
i("div", ye, [
|
|
198
|
+
a.showSidebarToggle ? (t(), g(S, {
|
|
198
199
|
key: 0,
|
|
199
200
|
variant: "ghost",
|
|
200
201
|
size: "sm",
|
|
201
202
|
class: "flex-shrink-0 w-8 h-8 p-0",
|
|
202
203
|
"aria-label": "사이드바 토글",
|
|
203
|
-
onClick:
|
|
204
|
+
onClick: le
|
|
204
205
|
}, {
|
|
205
206
|
default: u(() => [
|
|
206
|
-
|
|
207
|
+
k(b, {
|
|
207
208
|
name: "menu",
|
|
208
209
|
size: "sm"
|
|
209
210
|
})
|
|
210
211
|
]),
|
|
211
212
|
_: 1
|
|
212
213
|
})) : c("", !0),
|
|
213
|
-
|
|
214
|
+
$.value || a.logoText ? (t(), o("div", {
|
|
214
215
|
key: 1,
|
|
215
216
|
class: "flex items-center cursor-pointer",
|
|
216
|
-
onClick:
|
|
217
|
+
onClick: te
|
|
217
218
|
}, [
|
|
218
|
-
|
|
219
|
+
$.value && T.value < 2 ? (t(), o("img", {
|
|
219
220
|
key: 0,
|
|
220
|
-
src:
|
|
221
|
+
src: $.value,
|
|
221
222
|
alt: "로고",
|
|
222
223
|
class: "h-6 w-auto",
|
|
223
|
-
onError:
|
|
224
|
-
}, null, 40,
|
|
224
|
+
onError: Z
|
|
225
|
+
}, null, 40, pe)) : a.logoText ? (t(), o("span", Te, h(a.logoText), 1)) : c("", !0)
|
|
225
226
|
])) : c("", !0),
|
|
226
|
-
|
|
227
|
-
(t(!0), o(
|
|
228
|
-
key:
|
|
227
|
+
a.navItems && a.navItems.length > 0 ? (t(), o("nav", _e, [
|
|
228
|
+
(t(!0), o(y, null, N(a.navItems, (e, r) => (t(), g(S, {
|
|
229
|
+
key: r,
|
|
229
230
|
variant: "ghost",
|
|
230
231
|
class: w(C(I)(
|
|
231
|
-
|
|
232
|
-
e.active &&
|
|
232
|
+
D.value.navItemClass,
|
|
233
|
+
e.active && D.value.navItemActiveClass
|
|
233
234
|
)),
|
|
234
|
-
onClick: (
|
|
235
|
+
onClick: (l) => se(e, r)
|
|
235
236
|
}, {
|
|
236
237
|
default: u(() => [
|
|
237
|
-
e.icon ? (t(),
|
|
238
|
+
e.icon ? (t(), g(b, {
|
|
238
239
|
key: 0,
|
|
239
240
|
name: e.icon,
|
|
240
241
|
size: "sm",
|
|
241
242
|
class: "mr-1.5"
|
|
242
243
|
}, null, 8, ["name"])) : c("", !0),
|
|
243
|
-
|
|
244
|
+
ve(" " + h(e.label), 1)
|
|
244
245
|
]),
|
|
245
246
|
_: 2
|
|
246
247
|
}, 1032, ["class", "onClick"]))), 128))
|
|
247
248
|
])) : c("", !0)
|
|
248
249
|
]),
|
|
249
|
-
i("div",
|
|
250
|
-
|
|
250
|
+
i("div", we, [
|
|
251
|
+
a.showThemeSelector ? (t(), g(V, {
|
|
251
252
|
key: 0,
|
|
252
253
|
position: "bottom",
|
|
253
254
|
align: "end",
|
|
254
255
|
styletype: "default-sm"
|
|
255
256
|
}, {
|
|
256
257
|
trigger: u(() => [
|
|
257
|
-
|
|
258
|
+
k(S, {
|
|
258
259
|
variant: "ghost",
|
|
259
260
|
size: "sm",
|
|
260
261
|
class: "w-8 h-8 p-0",
|
|
261
262
|
"aria-label": "테마 선택"
|
|
262
263
|
}, {
|
|
263
264
|
default: u(() => [
|
|
264
|
-
|
|
265
|
+
k(b, {
|
|
265
266
|
name: "palette",
|
|
266
267
|
size: "sm"
|
|
267
268
|
})
|
|
@@ -270,116 +271,116 @@ const xe = { class: "flex items-center gap-6 flex-1" }, ye = ["src"], pe = {
|
|
|
270
271
|
})
|
|
271
272
|
]),
|
|
272
273
|
default: u(() => [
|
|
273
|
-
i("div",
|
|
274
|
-
|
|
275
|
-
i("div",
|
|
276
|
-
(t(!0), o(
|
|
274
|
+
i("div", Ce, [
|
|
275
|
+
n[0] || (n[0] = i("div", { class: "text-xs font-medium text-muted-foreground px-2 py-1.5 mb-1" }, " 테마 선택 ", -1)),
|
|
276
|
+
i("div", Se, [
|
|
277
|
+
(t(!0), o(y, null, N(L.value, (e) => (t(), o("button", {
|
|
277
278
|
key: e,
|
|
278
279
|
class: w(C(I)(
|
|
279
280
|
"w-full flex items-center gap-2 px-2 py-1.5 text-xs rounded-md transition-colors",
|
|
280
281
|
"hover:bg-accent hover:text-accent-foreground",
|
|
281
282
|
"border-0 outline-none text-left",
|
|
282
|
-
|
|
283
|
+
x.value === e && "bg-accent text-accent-foreground font-medium"
|
|
283
284
|
)),
|
|
284
|
-
onClick: (
|
|
285
|
+
onClick: (r) => de(e)
|
|
285
286
|
}, [
|
|
286
|
-
|
|
287
|
+
x.value === e ? (t(), g(b, {
|
|
287
288
|
key: 0,
|
|
288
289
|
name: "check",
|
|
289
290
|
size: "sm",
|
|
290
291
|
class: "flex-shrink-0"
|
|
291
|
-
})) : (t(), o("span",
|
|
292
|
-
i("span",
|
|
293
|
-
], 10,
|
|
292
|
+
})) : (t(), o("span", Le)),
|
|
293
|
+
i("span", ze, h(e), 1)
|
|
294
|
+
], 10, Ie))), 128))
|
|
294
295
|
])
|
|
295
296
|
])
|
|
296
297
|
]),
|
|
297
298
|
_: 1
|
|
298
299
|
})) : c("", !0),
|
|
299
|
-
|
|
300
|
+
a.showNotifications ? (t(), g(V, {
|
|
300
301
|
key: 1,
|
|
301
302
|
position: "bottom",
|
|
302
303
|
align: "end",
|
|
303
304
|
styletype: "default-sm"
|
|
304
305
|
}, {
|
|
305
306
|
trigger: u(() => [
|
|
306
|
-
|
|
307
|
+
k(S, {
|
|
307
308
|
variant: "ghost",
|
|
308
309
|
size: "sm",
|
|
309
310
|
class: "relative w-8 h-8 p-0",
|
|
310
311
|
"aria-label": "알림"
|
|
311
312
|
}, {
|
|
312
313
|
default: u(() => [
|
|
313
|
-
|
|
314
|
+
k(b, {
|
|
314
315
|
name: "circleAlert",
|
|
315
316
|
size: "sm"
|
|
316
317
|
}),
|
|
317
|
-
|
|
318
|
+
G.value > 0 ? (t(), o("span", Me, h(G.value > 9 ? "9+" : G.value), 1)) : c("", !0)
|
|
318
319
|
]),
|
|
319
320
|
_: 1
|
|
320
321
|
})
|
|
321
322
|
]),
|
|
322
323
|
default: u(() => [
|
|
323
|
-
i("div",
|
|
324
|
-
|
|
325
|
-
(t(!0), o(
|
|
324
|
+
i("div", Ee, [
|
|
325
|
+
a.notifications && a.notifications.length > 0 ? (t(), o("div", Oe, [
|
|
326
|
+
(t(!0), o(y, null, N(a.notifications, (e) => (t(), o("div", {
|
|
326
327
|
key: e.id,
|
|
327
328
|
class: w(C(I)(
|
|
328
329
|
"p-3 rounded-md cursor-pointer transition-colors",
|
|
329
330
|
e.read ? "hover:bg-accent/50" : "bg-accent"
|
|
330
331
|
)),
|
|
331
|
-
onClick: (
|
|
332
|
+
onClick: (r) => oe(e)
|
|
332
333
|
}, [
|
|
333
|
-
i("div",
|
|
334
|
-
e.icon ? (t(),
|
|
334
|
+
i("div", Be, [
|
|
335
|
+
e.icon ? (t(), g(b, {
|
|
335
336
|
key: 0,
|
|
336
337
|
name: e.icon,
|
|
337
338
|
size: "sm",
|
|
338
339
|
class: "mt-0.5 flex-shrink-0"
|
|
339
340
|
}, null, 8, ["name"])) : c("", !0),
|
|
340
|
-
i("div",
|
|
341
|
-
i("p",
|
|
342
|
-
e.message ? (t(), o("p",
|
|
343
|
-
e.time ? (t(), o("p",
|
|
341
|
+
i("div", Ae, [
|
|
342
|
+
i("p", De, h(e.title), 1),
|
|
343
|
+
e.message ? (t(), o("p", $e, h(e.message), 1)) : c("", !0),
|
|
344
|
+
e.time ? (t(), o("p", Ge, h(e.time), 1)) : c("", !0)
|
|
344
345
|
])
|
|
345
346
|
])
|
|
346
|
-
], 10,
|
|
347
|
-
])) : (t(), o("div",
|
|
347
|
+
], 10, Ne))), 128))
|
|
348
|
+
])) : (t(), o("div", Ue, " 알림이 없습니다. "))
|
|
348
349
|
])
|
|
349
350
|
]),
|
|
350
351
|
_: 1
|
|
351
352
|
})) : c("", !0),
|
|
352
|
-
|
|
353
|
+
k(S, {
|
|
353
354
|
variant: "ghost",
|
|
354
355
|
size: "sm",
|
|
355
356
|
class: "w-8 h-8 p-0",
|
|
356
|
-
"aria-label":
|
|
357
|
-
onClick:
|
|
357
|
+
"aria-label": m.value ? "라이트 모드로 전환" : "다크 모드로 전환",
|
|
358
|
+
onClick: ie
|
|
358
359
|
}, {
|
|
359
360
|
default: u(() => [
|
|
360
|
-
|
|
361
|
-
name:
|
|
361
|
+
k(b, {
|
|
362
|
+
name: ue.value,
|
|
362
363
|
size: "sm"
|
|
363
364
|
}, null, 8, ["name"])
|
|
364
365
|
]),
|
|
365
366
|
_: 1
|
|
366
367
|
}, 8, ["aria-label"]),
|
|
367
|
-
|
|
368
|
-
|
|
368
|
+
ge(s.$slots, "toolbar"),
|
|
369
|
+
a.userName ? (t(), g(V, {
|
|
369
370
|
key: 2,
|
|
370
371
|
position: "bottom",
|
|
371
372
|
align: "end",
|
|
372
373
|
styletype: "default-sm"
|
|
373
374
|
}, {
|
|
374
375
|
trigger: u(() => [
|
|
375
|
-
i("div",
|
|
376
|
-
|
|
377
|
-
src:
|
|
378
|
-
fallback:
|
|
376
|
+
i("div", Ve, [
|
|
377
|
+
k(ke, {
|
|
378
|
+
src: a.userAvatar,
|
|
379
|
+
fallback: a.userName ? a.userName[0] : "U",
|
|
379
380
|
size: "xs"
|
|
380
381
|
}, null, 8, ["src", "fallback"]),
|
|
381
|
-
i("span",
|
|
382
|
-
|
|
382
|
+
i("span", Fe, h(a.userName), 1),
|
|
383
|
+
k(b, {
|
|
383
384
|
name: "chevronDown",
|
|
384
385
|
size: "sm",
|
|
385
386
|
class: "text-muted-foreground hidden sm:inline"
|
|
@@ -387,45 +388,45 @@ const xe = { class: "flex items-center gap-6 flex-1" }, ye = ["src"], pe = {
|
|
|
387
388
|
])
|
|
388
389
|
]),
|
|
389
390
|
default: u(() => [
|
|
390
|
-
i("div",
|
|
391
|
-
i("div",
|
|
392
|
-
i("p",
|
|
393
|
-
|
|
391
|
+
i("div", Je, [
|
|
392
|
+
i("div", Re, [
|
|
393
|
+
i("p", Ye, h(a.userName), 1),
|
|
394
|
+
a.userEmail ? (t(), o("p", je, h(a.userEmail), 1)) : c("", !0)
|
|
394
395
|
]),
|
|
395
|
-
(t(!0), o(
|
|
396
|
-
(t(!0), o(
|
|
397
|
-
key:
|
|
396
|
+
(t(!0), o(y, null, N(Y.value, (e, r) => (t(), o(y, { key: r }, [
|
|
397
|
+
(t(!0), o(y, null, N(e.items, (l, d) => (t(), o(y, {
|
|
398
|
+
key: l.id
|
|
398
399
|
}, [
|
|
399
|
-
|
|
400
|
+
l.separator ? l.separator && d > 0 ? (t(), o("div", We)) : c("", !0) : (t(), o("button", {
|
|
400
401
|
key: 0,
|
|
401
|
-
disabled:
|
|
402
|
+
disabled: l.disabled,
|
|
402
403
|
class: w(C(I)(
|
|
403
404
|
"w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",
|
|
404
|
-
|
|
405
|
+
l.id === "logout" ? "text-destructive hover:bg-destructive/10 hover:text-destructive" : "hover:bg-accent hover:text-accent-foreground",
|
|
405
406
|
"disabled:opacity-50 disabled:pointer-events-none",
|
|
406
407
|
"border-0 outline-none",
|
|
407
408
|
e.items[d + 1]?.separator && "border-b-0"
|
|
408
409
|
)),
|
|
409
|
-
onClick: (
|
|
410
|
+
onClick: (f) => ae(l.id)
|
|
410
411
|
}, [
|
|
411
|
-
|
|
412
|
+
l.icon ? (t(), g(b, {
|
|
412
413
|
key: 0,
|
|
413
|
-
name:
|
|
414
|
+
name: l.icon,
|
|
414
415
|
size: "sm",
|
|
415
416
|
class: w(C(I)(
|
|
416
417
|
"flex-shrink-0",
|
|
417
|
-
|
|
418
|
+
l.id === "logout" && "text-destructive"
|
|
418
419
|
))
|
|
419
420
|
}, null, 8, ["name", "class"])) : c("", !0),
|
|
420
|
-
i("span",
|
|
421
|
-
], 10,
|
|
421
|
+
i("span", Pe, h(l.label), 1)
|
|
422
|
+
], 10, Ke))
|
|
422
423
|
], 64))), 128)),
|
|
423
|
-
|
|
424
|
+
r < Y.value.length - 1 ? (t(), o("div", He)) : c("", !0)
|
|
424
425
|
], 64))), 128))
|
|
425
426
|
])
|
|
426
427
|
]),
|
|
427
428
|
_: 1
|
|
428
|
-
})) : (t(),
|
|
429
|
+
})) : (t(), g(S, {
|
|
429
430
|
key: 3,
|
|
430
431
|
variant: "ghost",
|
|
431
432
|
size: "sm",
|
|
@@ -433,12 +434,12 @@ const xe = { class: "flex items-center gap-6 flex-1" }, ye = ["src"], pe = {
|
|
|
433
434
|
onClick: ne
|
|
434
435
|
}, {
|
|
435
436
|
default: u(() => [
|
|
436
|
-
|
|
437
|
+
k(b, {
|
|
437
438
|
name: "logIn",
|
|
438
439
|
size: "sm",
|
|
439
440
|
class: "sm:mr-1.5"
|
|
440
441
|
}),
|
|
441
|
-
|
|
442
|
+
n[1] || (n[1] = i("span", { class: "hidden sm:inline" }, "로그인", -1))
|
|
442
443
|
]),
|
|
443
444
|
_: 1
|
|
444
445
|
}))
|
|
@@ -447,6 +448,6 @@ const xe = { class: "flex items-center gap-6 flex-1" }, ye = ["src"], pe = {
|
|
|
447
448
|
}
|
|
448
449
|
});
|
|
449
450
|
export {
|
|
450
|
-
|
|
451
|
+
at as default
|
|
451
452
|
};
|
|
452
453
|
//# sourceMappingURL=JHeader.vue.js.map
|