wize-admin-library 0.1.12 → 0.1.15
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/style.css +1 -1
- package/dist/wize-admin-library.es.js +183 -116
- package/dist/wize-admin-library.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
function
|
|
3
|
-
var
|
|
4
|
-
e && (
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
1
|
+
import { computed as h, ref as v, onMounted as w, onBeforeUnmount as z } from "vue";
|
|
2
|
+
function _(i, e, t, a, s, l, r, d) {
|
|
3
|
+
var o = typeof i == "function" ? i.options : i;
|
|
4
|
+
e && (o.render = e, o.staticRenderFns = t, o._compiled = !0), a && (o.functional = !0), l && (o._scopeId = "data-v-" + l);
|
|
5
|
+
var c;
|
|
6
|
+
if (r ? (c = function(n) {
|
|
7
7
|
n = n || // cached call
|
|
8
8
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
9
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !n && typeof __VUE_SSR_CONTEXT__ < "u" && (n = __VUE_SSR_CONTEXT__), s && s.call(this, n), n && n._registeredComponents && n._registeredComponents.add(
|
|
10
|
-
},
|
|
9
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !n && typeof __VUE_SSR_CONTEXT__ < "u" && (n = __VUE_SSR_CONTEXT__), s && s.call(this, n), n && n._registeredComponents && n._registeredComponents.add(r);
|
|
10
|
+
}, o._ssrRegister = c) : s && (c = d ? function() {
|
|
11
11
|
s.call(
|
|
12
12
|
this,
|
|
13
|
-
(
|
|
13
|
+
(o.functional ? this.parent : this).$root.$options.shadowRoot
|
|
14
14
|
);
|
|
15
|
-
} : s),
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
return
|
|
15
|
+
} : s), c)
|
|
16
|
+
if (o.functional) {
|
|
17
|
+
o._injectStyles = c;
|
|
18
|
+
var f = o.render;
|
|
19
|
+
o.render = function(u, C) {
|
|
20
|
+
return c.call(C), f(u, C);
|
|
21
21
|
};
|
|
22
22
|
} else {
|
|
23
|
-
var
|
|
24
|
-
|
|
23
|
+
var p = o.beforeCreate;
|
|
24
|
+
o.beforeCreate = p ? [].concat(p, c) : [c];
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
27
|
exports: i,
|
|
28
|
-
options:
|
|
28
|
+
options: o
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const y = {
|
|
32
32
|
__name: "WzButton",
|
|
33
33
|
props: {
|
|
34
34
|
/**
|
|
@@ -66,7 +66,7 @@ const z = {
|
|
|
66
66
|
},
|
|
67
67
|
emits: ["click"],
|
|
68
68
|
setup(i, { emit: e }) {
|
|
69
|
-
const t = i, a =
|
|
69
|
+
const t = i, a = h(() => [
|
|
70
70
|
"wz-btn",
|
|
71
71
|
`wz-btn-${t.variant}`,
|
|
72
72
|
`wz-btn-${t.size}`,
|
|
@@ -77,12 +77,12 @@ const z = {
|
|
|
77
77
|
} };
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
var
|
|
80
|
+
var m = function() {
|
|
81
81
|
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
82
82
|
return t("button", { class: a.classes, attrs: { disabled: e.disabled }, on: { click: a.handleClick } }, [e._t("default")], 2);
|
|
83
|
-
}, b = [], k = /* @__PURE__ */
|
|
84
|
-
z,
|
|
83
|
+
}, b = [], k = /* @__PURE__ */ _(
|
|
85
84
|
y,
|
|
85
|
+
m,
|
|
86
86
|
b,
|
|
87
87
|
!1,
|
|
88
88
|
null,
|
|
@@ -91,6 +91,53 @@ var y = function() {
|
|
|
91
91
|
null
|
|
92
92
|
);
|
|
93
93
|
const S = k.exports, $ = {
|
|
94
|
+
__name: "WzLayout",
|
|
95
|
+
props: {
|
|
96
|
+
/**
|
|
97
|
+
* Whether the sidebar is collapsed initially.
|
|
98
|
+
*/
|
|
99
|
+
defaultCollapsed: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: !1
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* Defines layout navigation architecture ('vertical' | 'horizontal')
|
|
105
|
+
*/
|
|
106
|
+
navigationStyle: {
|
|
107
|
+
type: String,
|
|
108
|
+
default: "vertical"
|
|
109
|
+
},
|
|
110
|
+
/**
|
|
111
|
+
* Layout visual theme ('light' | 'dark')
|
|
112
|
+
*/
|
|
113
|
+
theme: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: "light"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
setup(i) {
|
|
119
|
+
const e = i, t = v(e.defaultCollapsed), a = () => {
|
|
120
|
+
t.value = !t.value;
|
|
121
|
+
};
|
|
122
|
+
return w(() => {
|
|
123
|
+
typeof window < "u" && window.innerWidth <= 768 && (t.value = !0);
|
|
124
|
+
}), { __sfc: !0, props: e, isCollapsed: t, toggleSidebar: a };
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
var x = function() {
|
|
128
|
+
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
129
|
+
return t("div", { staticClass: "wz-admin-layout", class: "is-" + e.navigationStyle, attrs: { "data-theme": e.theme } }, [t("div", { staticClass: "wz-admin-layout-sidebar-container" }, [a.isCollapsed ? e._e() : t("div", { staticClass: "wz-admin-layout-backdrop", on: { click: a.toggleSidebar } }), e._t("sidebar", null, { collapsed: a.isCollapsed })], 2), t("div", { staticClass: "wz-admin-layout-main" }, [t("div", { staticClass: "wz-admin-layout-header-container" }, [e._t("header", null, { toggleSidebar: a.toggleSidebar, collapsed: a.isCollapsed })], 2), e.navigationStyle === "horizontal" ? t("div", { staticClass: "wz-admin-layout-horizontal-nav-container" }, [e._t("horizontal-nav")], 2) : e._e(), t("main", { staticClass: "wz-admin-layout-content" }, [e._t("default")], 2)])]);
|
|
130
|
+
}, M = [], P = /* @__PURE__ */ _(
|
|
131
|
+
$,
|
|
132
|
+
x,
|
|
133
|
+
M,
|
|
134
|
+
!1,
|
|
135
|
+
null,
|
|
136
|
+
null,
|
|
137
|
+
null,
|
|
138
|
+
null
|
|
139
|
+
);
|
|
140
|
+
const H = P.exports, N = {
|
|
94
141
|
__name: "WzSidebar",
|
|
95
142
|
props: {
|
|
96
143
|
/**
|
|
@@ -147,24 +194,24 @@ const S = k.exports, $ = {
|
|
|
147
194
|
},
|
|
148
195
|
emits: ["item-click"],
|
|
149
196
|
setup(i, { emit: e }) {
|
|
150
|
-
const t = i, a =
|
|
197
|
+
const t = i, a = v(/* @__PURE__ */ new Set()), s = v(!1), l = h(() => t.collapsed && !s.value), r = (n) => n.key === t.activeKey, d = (n) => n.children && n.children.length > 0, o = (n) => a.value.has(n.key), c = (n) => {
|
|
151
198
|
if (!d(n) || l.value)
|
|
152
199
|
return;
|
|
153
200
|
const u = new Set(a.value);
|
|
154
201
|
u.has(n.key) ? u.delete(n.key) : u.add(n.key), a.value = u;
|
|
155
202
|
};
|
|
156
|
-
return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: l, isActive:
|
|
203
|
+
return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: l, isActive: r, hasChildren: d, isOpen: o, toggle: c, handleClick: (n) => {
|
|
157
204
|
if (l.value) {
|
|
158
205
|
e("item-click", n);
|
|
159
206
|
return;
|
|
160
207
|
}
|
|
161
|
-
d(n) ?
|
|
208
|
+
d(n) ? c(n) : e("item-click", n);
|
|
162
209
|
}, handleChildClick: (n) => {
|
|
163
210
|
e("item-click", n);
|
|
164
211
|
} };
|
|
165
212
|
}
|
|
166
213
|
};
|
|
167
|
-
var
|
|
214
|
+
var O = function() {
|
|
168
215
|
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
169
216
|
return t("aside", { staticClass: "wz-sidebar", class: { "wz-sidebar--collapsed": a.visuallyCollapsed }, on: { mouseenter: function(s) {
|
|
170
217
|
a.isHovered = !0;
|
|
@@ -173,27 +220,27 @@ var x = function() {
|
|
|
173
220
|
} } }, [t("div", { staticClass: "wz-sidebar-logo" }, [e._t("logo", function() {
|
|
174
221
|
return [e.logoSrc || e.logoMiniSrc ? [a.visuallyCollapsed && e.logoMiniSrc ? t("img", { staticClass: "wz-sidebar-logo-img-mini", attrs: { src: e.logoMiniSrc, alt: "Mini Logo" } }) : !a.visuallyCollapsed && e.logoSrc ? t("img", { staticClass: "wz-sidebar-logo-img", attrs: { src: e.logoSrc, alt: "Logo" } }) : e._e()] : [e.logoIconHtml ? t("span", { staticClass: "wz-sidebar-logo-icon", domProps: { innerHTML: e._s(e.logoIconHtml) } }) : e._e(), t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-logo-text" }, [e._v(e._s(e.logoText))])]];
|
|
175
222
|
})], 2), t("nav", { staticClass: "wz-sidebar-nav" }, [e._l(e.items, function(s, l) {
|
|
176
|
-
return [s.type === "group" ? t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], key: `group-${l}`, staticClass: "wz-sidebar-group" }, [e._v(" " + e._s(s.label) + " ")]) : t("div", { key: s.key || l, staticClass: "wz-sidebar-item-wrapper" }, [t("div", { staticClass: "wz-sidebar-item", class: { "wz-sidebar-item--active": a.isActive(s) }, attrs: { title: a.visuallyCollapsed ? s.label : null }, on: { click: function(
|
|
223
|
+
return [s.type === "group" ? t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], key: `group-${l}`, staticClass: "wz-sidebar-group" }, [e._v(" " + e._s(s.label) + " ")]) : t("div", { key: s.key || l, staticClass: "wz-sidebar-item-wrapper" }, [t("div", { staticClass: "wz-sidebar-item", class: { "wz-sidebar-item--active": a.isActive(s) }, attrs: { title: a.visuallyCollapsed ? s.label : null }, on: { click: function(r) {
|
|
177
224
|
return a.handleClick(s);
|
|
178
225
|
} } }, [t("span", { staticClass: "wz-sidebar-icon" }, [e._t("icon", function() {
|
|
179
226
|
return [s.icon ? t("i", { class: s.icon, staticStyle: { "font-size": "1.125rem" } }) : s.iconHtml ? t("span", { domProps: { innerHTML: e._s(s.iconHtml) } }) : t("i", { staticClass: "ri-checkbox-blank-circle-line", staticStyle: { "font-size": "10px" } })];
|
|
180
|
-
}, { item: s })], 2), t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-label" }, [e._v(e._s(s.label))]), a.hasChildren(s) ? t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-arrow", class: { "wz-sidebar-arrow--open": a.isOpen(s) } }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1.125rem" } })]) : e._e()]), t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-children-wrapper", class: { "is-open": a.hasChildren(s) && a.isOpen(s) } }, [t("div", { staticClass: "wz-sidebar-children-inner" }, [a.hasChildren(s) ? t("div", { staticClass: "wz-sidebar-children" }, e._l(s.children, function(
|
|
181
|
-
return t("div", { key:
|
|
182
|
-
return a.handleChildClick(
|
|
183
|
-
} } }, [t("span", { staticClass: "wz-sidebar-label" }, [e._v(e._s(
|
|
227
|
+
}, { item: s })], 2), t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-label" }, [e._v(e._s(s.label))]), a.hasChildren(s) ? t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-arrow", class: { "wz-sidebar-arrow--open": a.isOpen(s) } }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1.125rem" } })]) : e._e()]), t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-children-wrapper", class: { "is-open": a.hasChildren(s) && a.isOpen(s) } }, [t("div", { staticClass: "wz-sidebar-children-inner" }, [a.hasChildren(s) ? t("div", { staticClass: "wz-sidebar-children" }, e._l(s.children, function(r) {
|
|
228
|
+
return t("div", { key: r.key, staticClass: "wz-sidebar-child-item", class: { "wz-sidebar-child-item--active": a.isActive(r) }, on: { click: function(d) {
|
|
229
|
+
return a.handleChildClick(r);
|
|
230
|
+
} } }, [t("span", { staticClass: "wz-sidebar-label" }, [e._v(e._s(r.label))]), a.hasChildren(r) ? t("span", { staticClass: "wz-sidebar-arrow" }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1rem" } })]) : e._e()]);
|
|
184
231
|
}), 0) : e._e()])])])];
|
|
185
232
|
})], 2)]);
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
233
|
+
}, W = [], L = /* @__PURE__ */ _(
|
|
234
|
+
N,
|
|
235
|
+
O,
|
|
236
|
+
W,
|
|
190
237
|
!1,
|
|
191
238
|
null,
|
|
192
239
|
null,
|
|
193
240
|
null,
|
|
194
241
|
null
|
|
195
242
|
);
|
|
196
|
-
const
|
|
243
|
+
const T = L.exports, I = {
|
|
197
244
|
__name: "WzHeader",
|
|
198
245
|
props: {
|
|
199
246
|
/**
|
|
@@ -243,30 +290,39 @@ const O = P.exports, H = {
|
|
|
243
290
|
*/
|
|
244
291
|
logoSrc: {
|
|
245
292
|
type: String,
|
|
246
|
-
default:
|
|
293
|
+
default: ""
|
|
294
|
+
},
|
|
295
|
+
/**
|
|
296
|
+
* Layout hierarchy style ('vertical' | 'horizontal')
|
|
297
|
+
*/
|
|
298
|
+
layoutMode: {
|
|
299
|
+
type: String,
|
|
300
|
+
default: "vertical"
|
|
247
301
|
}
|
|
248
302
|
},
|
|
249
303
|
emits: ["menu-toggle", "search", "notifications", "settings", "user-click", "action-click", "user-menu-click"],
|
|
250
304
|
setup(i, { emit: e }) {
|
|
251
|
-
const t = i, a = (
|
|
305
|
+
const t = i, a = (c) => c ? c.split(" ").map((f) => f[0]).slice(0, 2).join("").toUpperCase() : "?", s = v(!1), l = v(null), r = () => {
|
|
252
306
|
s.value = !s.value, e("user-click");
|
|
253
|
-
}, d = (
|
|
254
|
-
e("user-menu-click",
|
|
255
|
-
},
|
|
256
|
-
l.value && !l.value.contains(
|
|
307
|
+
}, d = (c) => {
|
|
308
|
+
e("user-menu-click", c), s.value = !1;
|
|
309
|
+
}, o = (c) => {
|
|
310
|
+
l.value && !l.value.contains(c.target) && (s.value = !1);
|
|
257
311
|
};
|
|
258
312
|
return w(() => {
|
|
259
|
-
document.addEventListener("click",
|
|
260
|
-
}),
|
|
261
|
-
document.removeEventListener("click",
|
|
262
|
-
}), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: l, toggleUserMenu:
|
|
313
|
+
document.addEventListener("click", o);
|
|
314
|
+
}), z(() => {
|
|
315
|
+
document.removeEventListener("click", o);
|
|
316
|
+
}), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: l, toggleUserMenu: r, handleUserItemClick: d, handleClickOutside: o };
|
|
263
317
|
}
|
|
264
318
|
};
|
|
265
|
-
var
|
|
319
|
+
var U = function() {
|
|
266
320
|
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
267
|
-
return t("header", { staticClass: "wz-header"
|
|
268
|
-
return
|
|
269
|
-
} } }, [t("i", {
|
|
321
|
+
return t("header", { staticClass: "wz-header", class: { "wz-header--horizontal": e.layoutMode === "horizontal" } }, [t("div", { staticClass: "wz-header-left" }, [e.layoutMode === "vertical" ? t("button", { staticClass: "wz-header-action wz-header-icon-desktop", attrs: { title: "Toggle Menu" }, on: { click: function(s) {
|
|
322
|
+
return e.$emit("menu-toggle");
|
|
323
|
+
} } }, [t("i", { class: e.collapsed ? "ri-menu-unfold-line" : "ri-menu-fold-line" })]) : e._e(), t("button", { staticClass: "wz-header-action wz-header-icon-mobile", staticStyle: { display: "none" }, attrs: { title: "Toggle Menu" }, on: { click: function(s) {
|
|
324
|
+
return e.$emit("menu-toggle");
|
|
325
|
+
} } }, [t("i", { staticClass: "ri-menu-2-line" })]), t("div", { staticClass: "wz-header-dynamic-logo", class: e.layoutMode === "horizontal" ? "wz-header-logo-always-visible" : "wz-header-mobile-logo" }, [e.logoSrc ? t("img", { staticClass: "wz-header-dynamic-logo-img", attrs: { src: e.logoSrc, alt: "Logo" } }) : e._e()]), e._t("left")], 2), t("div", { staticClass: "wz-header-right" }, [e._t("actions", function() {
|
|
270
326
|
return [e.actionItems && e.actionItems.length ? [e._l(e.actionItems, function(s) {
|
|
271
327
|
return [s.badge ? t("div", { key: "badge-" + s.key, staticClass: "wz-header-badge" }, [t("button", { staticClass: "wz-header-action", attrs: { title: s.key }, on: { click: function(l) {
|
|
272
328
|
return a.emit("action-click", s);
|
|
@@ -283,13 +339,13 @@ var L = function() {
|
|
|
283
339
|
return s.stopPropagation(), a.toggleUserMenu.apply(null, arguments);
|
|
284
340
|
} } }, [e.user.avatar ? t("img", { staticClass: "wz-header-user-avatar", attrs: { src: e.user.avatar, alt: e.user.name } }) : t("div", { staticClass: "wz-header-user-avatar-placeholder" }, [e._v(" " + e._s(a.initials(e.user.name)) + " ")]), t("span", { staticClass: "wz-header-user-name" }, [e._v(e._s(e.user.name))])])];
|
|
285
341
|
}), e.userMenuItems && e.userMenuItems.length > 0 ? t("div", { directives: [{ name: "show", rawName: "v-show", value: a.isUserMenuOpen, expression: "isUserMenuOpen" }], staticClass: "wz-header-dropdown" }, [t("div", { staticClass: "wz-header-dropdown-header" }, [t("div", { staticClass: "wz-header-dropdown-title" }, [e._v(e._s(e.user.name))]), e.userSubtitle ? t("div", { staticClass: "wz-header-dropdown-subtitle" }, [e._v(e._s(e.userSubtitle))]) : e._e()]), t("div", { staticClass: "wz-header-dropdown-body" }, e._l(e.userMenuItems, function(s, l) {
|
|
286
|
-
return t("div", { key: l, staticClass: "wz-header-dropdown-item", class: { "wz-header-dropdown-item--logout": s.isLogout }, on: { click: function(
|
|
342
|
+
return t("div", { key: l, staticClass: "wz-header-dropdown-item", class: { "wz-header-dropdown-item--logout": s.isLogout }, on: { click: function(r) {
|
|
287
343
|
return a.handleUserItemClick(s);
|
|
288
344
|
} } }, [s.icon && !s.isLogout ? t("i", { class: s.icon }) : e._e(), t("span", [e._v(e._s(s.label))])]);
|
|
289
345
|
}), 0)]) : e._e()], 2), t("button", { staticClass: "wz-header-action", attrs: { title: "Settings" }, on: { click: function(s) {
|
|
290
346
|
return a.emit("settings");
|
|
291
347
|
} } }, [t("i", { staticClass: "ri-settings-3-line wz-anim-spin", staticStyle: { "font-size": "1.125rem", display: "inline-block" } })])], 2)]);
|
|
292
|
-
},
|
|
348
|
+
}, R = [function() {
|
|
293
349
|
var i = this, e = i._self._c;
|
|
294
350
|
return i._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Language" } }, [e("i", { staticClass: "ri-global-line", staticStyle: { "font-size": "1.125rem" } })]);
|
|
295
351
|
}, function() {
|
|
@@ -301,57 +357,17 @@ var L = function() {
|
|
|
301
357
|
}, function() {
|
|
302
358
|
var i = this, e = i._self._c;
|
|
303
359
|
return i._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Fullscreen" } }, [e("i", { staticClass: "ri-fullscreen-line", staticStyle: { "font-size": "1.125rem" } })]);
|
|
304
|
-
}],
|
|
305
|
-
H,
|
|
306
|
-
L,
|
|
360
|
+
}], B = /* @__PURE__ */ _(
|
|
307
361
|
I,
|
|
308
|
-
!1,
|
|
309
|
-
null,
|
|
310
|
-
null,
|
|
311
|
-
null,
|
|
312
|
-
null
|
|
313
|
-
);
|
|
314
|
-
const T = N.exports, U = {
|
|
315
|
-
__name: "WzLayout",
|
|
316
|
-
props: {
|
|
317
|
-
/**
|
|
318
|
-
* Whether the sidebar is collapsed initially.
|
|
319
|
-
*/
|
|
320
|
-
defaultCollapsed: {
|
|
321
|
-
type: Boolean,
|
|
322
|
-
default: !1
|
|
323
|
-
},
|
|
324
|
-
/**
|
|
325
|
-
* Layout visual theme ('light' | 'dark')
|
|
326
|
-
*/
|
|
327
|
-
theme: {
|
|
328
|
-
type: String,
|
|
329
|
-
default: "light"
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
setup(i) {
|
|
333
|
-
const e = i, t = _(e.defaultCollapsed), a = () => {
|
|
334
|
-
t.value = !t.value;
|
|
335
|
-
};
|
|
336
|
-
return w(() => {
|
|
337
|
-
typeof window < "u" && window.innerWidth <= 768 && (t.value = !0);
|
|
338
|
-
}), { __sfc: !0, props: e, isCollapsed: t, toggleSidebar: a };
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
var W = function() {
|
|
342
|
-
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
343
|
-
return t("div", { staticClass: "wz-admin-layout", attrs: { "data-theme": e.theme } }, [t("div", { staticClass: "wz-admin-layout-sidebar-container" }, [a.isCollapsed ? e._e() : t("div", { staticClass: "wz-admin-layout-backdrop", on: { click: a.toggleSidebar } }), e._t("sidebar", null, { collapsed: a.isCollapsed })], 2), t("div", { staticClass: "wz-admin-layout-main" }, [t("div", { staticClass: "wz-admin-layout-header-container" }, [e._t("header", null, { toggleSidebar: a.toggleSidebar, collapsed: a.isCollapsed })], 2), t("main", { staticClass: "wz-admin-layout-content" }, [e._t("default")], 2)])]);
|
|
344
|
-
}, B = [], R = /* @__PURE__ */ v(
|
|
345
362
|
U,
|
|
346
|
-
|
|
347
|
-
B,
|
|
363
|
+
R,
|
|
348
364
|
!1,
|
|
349
365
|
null,
|
|
350
366
|
null,
|
|
351
367
|
null,
|
|
352
368
|
null
|
|
353
369
|
);
|
|
354
|
-
const A =
|
|
370
|
+
const A = B.exports, F = {
|
|
355
371
|
__name: "WzSettingsPanel",
|
|
356
372
|
props: {
|
|
357
373
|
/**
|
|
@@ -402,55 +418,106 @@ const A = R.exports, F = {
|
|
|
402
418
|
{ value: "horizontal", label: "Horizontal" }
|
|
403
419
|
]
|
|
404
420
|
}
|
|
405
|
-
], s =
|
|
406
|
-
return { __sfc: !0, props: t, emit: e, baseSettings: a, allSettings: s, handleSelection: (d,
|
|
407
|
-
const
|
|
408
|
-
e("input",
|
|
421
|
+
], s = h(() => [...a, ...t.extraSettings]);
|
|
422
|
+
return { __sfc: !0, props: t, emit: e, baseSettings: a, allSettings: s, handleSelection: (d, o) => {
|
|
423
|
+
const c = { ...t.value, [d]: o };
|
|
424
|
+
e("input", c), e("setting-change", { id: d, value: o });
|
|
409
425
|
}, closePanel: () => {
|
|
410
426
|
e("close");
|
|
411
427
|
} };
|
|
412
428
|
}
|
|
413
429
|
};
|
|
414
|
-
var
|
|
430
|
+
var K = function() {
|
|
415
431
|
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
416
432
|
return t("div", { staticClass: "wz-settings", class: { "wz-settings--open": e.isOpen } }, [t("div", { staticClass: "wz-settings-overlay", on: { click: a.closePanel } }), t("aside", { staticClass: "wz-settings-panel" }, [t("div", { staticClass: "wz-settings-header" }, [t("h3", { staticClass: "wz-settings-title" }, [e._v(e._s(e.title))]), t("button", { staticClass: "wz-settings-close", attrs: { title: "Close Settings" }, on: { click: a.closePanel } }, [t("i", { staticClass: "ri-close-circle-line" })])]), e._m(0), t("div", { staticClass: "wz-settings-body" }, [e._l(a.allSettings, function(s) {
|
|
417
433
|
return [t("div", { staticClass: "wz-settings-section" }, [t("h4", { staticClass: "wz-settings-section-title" }, [e._v(e._s(s.title))]), t("div", { staticClass: "wz-settings-radio-group" }, e._l(s.options, function(l) {
|
|
418
|
-
return t("label", { key: l.value, staticClass: "wz-settings-radio-label" }, [t("div", { staticClass: "wz-settings-radio-circle", class: { "wz-settings-radio-circle--active": e.value[s.id] === l.value } }, [t("span", { directives: [{ name: "show", rawName: "v-show", value: e.value[s.id] === l.value, expression: "value[setting.id] === opt.value" }], staticClass: "wz-settings-radio-dot" })]), t("input", { staticClass: "wz-settings-radio-native", attrs: { type: "radio", name: s.id }, domProps: { value: l.value, checked: e.value[s.id] === l.value }, on: { change: function(
|
|
434
|
+
return t("label", { key: l.value, staticClass: "wz-settings-radio-label" }, [t("div", { staticClass: "wz-settings-radio-circle", class: { "wz-settings-radio-circle--active": e.value[s.id] === l.value } }, [t("span", { directives: [{ name: "show", rawName: "v-show", value: e.value[s.id] === l.value, expression: "value[setting.id] === opt.value" }], staticClass: "wz-settings-radio-dot" })]), t("input", { staticClass: "wz-settings-radio-native", attrs: { type: "radio", name: s.id }, domProps: { value: l.value, checked: e.value[s.id] === l.value }, on: { change: function(r) {
|
|
419
435
|
return a.handleSelection(s.id, l.value);
|
|
420
436
|
} } }), t("span", { staticClass: "wz-settings-radio-text" }, [e._v(e._s(l.label))])]);
|
|
421
437
|
}), 0)])];
|
|
422
438
|
})], 2)])]);
|
|
423
|
-
},
|
|
439
|
+
}, V = [function() {
|
|
424
440
|
var i = this, e = i._self._c;
|
|
425
441
|
return i._self._setupProxy, e("div", { staticClass: "wz-settings-tabs" }, [e("div", { staticClass: "wz-settings-tab wz-settings-tab--active" }, [i._v("Theme Style")])]);
|
|
426
|
-
}],
|
|
442
|
+
}], E = /* @__PURE__ */ _(
|
|
427
443
|
F,
|
|
444
|
+
K,
|
|
428
445
|
V,
|
|
429
|
-
E,
|
|
430
446
|
!1,
|
|
431
447
|
null,
|
|
432
448
|
null,
|
|
433
449
|
null,
|
|
434
450
|
null
|
|
435
451
|
);
|
|
436
|
-
const j =
|
|
452
|
+
const j = E.exports, X = {
|
|
453
|
+
__name: "WzHorizontalNav",
|
|
454
|
+
props: {
|
|
455
|
+
items: {
|
|
456
|
+
type: Array,
|
|
457
|
+
default: () => []
|
|
458
|
+
},
|
|
459
|
+
activeKey: {
|
|
460
|
+
type: String,
|
|
461
|
+
default: null
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
emits: ["item-click"],
|
|
465
|
+
setup(i, { emit: e }) {
|
|
466
|
+
const t = i, a = v(null);
|
|
467
|
+
return { __sfc: !0, props: t, emit: e, track: a, scroll: (d) => {
|
|
468
|
+
a.value && a.value.scrollBy({ left: d, behavior: "smooth" });
|
|
469
|
+
}, handleClick: (d) => {
|
|
470
|
+
e("item-click", d);
|
|
471
|
+
}, handleChildClick: (d) => {
|
|
472
|
+
e("item-click", d);
|
|
473
|
+
} };
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
var D = function() {
|
|
477
|
+
var e = this, t = e._self._c, a = e._self._setupProxy;
|
|
478
|
+
return t("div", { staticClass: "wz-horizontal-nav" }, [t("button", { staticClass: "wz-horizontal-nav-arrow wz-horizontal-nav-arrow--left", on: { click: function(s) {
|
|
479
|
+
return a.scroll(-250);
|
|
480
|
+
} } }, [t("i", { staticClass: "ri-arrow-left-s-line" })]), t("div", { staticClass: "wz-horizontal-nav-track-wrapper" }, [t("div", { ref: "track", staticClass: "wz-horizontal-nav-track" }, [e._l(e.items, function(s, l) {
|
|
481
|
+
return [s.type !== "group" ? t("div", { key: s.key || l, staticClass: "wz-horizontal-nav-item", class: { "wz-horizontal-nav-item--active": s.key === e.activeKey || s.children && s.children.some((r) => r.key === e.activeKey) }, on: { click: function(r) {
|
|
482
|
+
return a.handleClick(s);
|
|
483
|
+
} } }, [s.icon ? t("i", { class: s.icon }) : e._e(), t("span", [e._v(e._s(s.label))]), s.children && s.children.length > 0 ? t("i", { staticClass: "ri-arrow-down-s-line", staticStyle: { "margin-left": "4px", "margin-right": "0", "font-size": "1rem" } }) : e._e(), s.children && s.children.length > 0 ? t("div", { staticClass: "wz-horizontal-nav-dropdown" }, e._l(s.children, function(r) {
|
|
484
|
+
return t("div", { key: r.key, staticClass: "wz-horizontal-active-child", class: { "wz-horizontal-active-child--active": r.key === e.activeKey }, on: { click: function(d) {
|
|
485
|
+
return d.stopPropagation(), a.handleChildClick(r);
|
|
486
|
+
} } }, [e._v(" " + e._s(r.label) + " ")]);
|
|
487
|
+
}), 0) : e._e()]) : e._e()];
|
|
488
|
+
})], 2)]), t("button", { staticClass: "wz-horizontal-nav-arrow wz-horizontal-nav-arrow--right", on: { click: function(s) {
|
|
489
|
+
return a.scroll(250);
|
|
490
|
+
} } }, [t("i", { staticClass: "ri-arrow-right-s-line" })])]);
|
|
491
|
+
}, q = [], G = /* @__PURE__ */ _(
|
|
492
|
+
X,
|
|
493
|
+
D,
|
|
494
|
+
q,
|
|
495
|
+
!1,
|
|
496
|
+
null,
|
|
497
|
+
null,
|
|
498
|
+
null,
|
|
499
|
+
null
|
|
500
|
+
);
|
|
501
|
+
const J = G.exports, Q = {
|
|
437
502
|
WzButton: S,
|
|
438
|
-
WzSidebar:
|
|
439
|
-
WzHeader:
|
|
440
|
-
WzLayout:
|
|
441
|
-
WzSettingsPanel: j
|
|
503
|
+
WzSidebar: T,
|
|
504
|
+
WzHeader: A,
|
|
505
|
+
WzLayout: H,
|
|
506
|
+
WzSettingsPanel: j,
|
|
507
|
+
WzHorizontalNav: J
|
|
442
508
|
}, g = (i) => {
|
|
443
|
-
Object.entries(
|
|
509
|
+
Object.entries(Q).forEach(([e, t]) => {
|
|
444
510
|
i.component(e, t);
|
|
445
511
|
});
|
|
446
512
|
};
|
|
447
513
|
typeof window < "u" && window.Vue && g(window.Vue);
|
|
448
|
-
const
|
|
514
|
+
const Z = { install: g };
|
|
449
515
|
export {
|
|
450
516
|
S as WzButton,
|
|
451
|
-
|
|
452
|
-
|
|
517
|
+
A as WzHeader,
|
|
518
|
+
J as WzHorizontalNav,
|
|
519
|
+
H as WzLayout,
|
|
453
520
|
j as WzSettingsPanel,
|
|
454
|
-
|
|
455
|
-
|
|
521
|
+
T as WzSidebar,
|
|
522
|
+
Z as default
|
|
456
523
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(u=typeof globalThis<"u"?globalThis:u||self,d(u.WizeAdminLibrary={},u.Vue))})(this,function(u,d){"use strict";const X="";function v(i,e,t,a,s,n,c,_){var r=typeof i=="function"?i.options:i;e&&(r.render=e,r.staticRenderFns=t,r._compiled=!0),a&&(r.functional=!0),n&&(r._scopeId="data-v-"+n);var o;if(c?(o=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),s&&s.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(c)},r._ssrRegister=o):s&&(o=_?function(){s.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:s),o)if(r.functional){r._injectStyles=o;var p=r.render;r.render=function(f,b){return o.call(b),p(f,b)}}else{var C=r.beforeCreate;r.beforeCreate=C?[].concat(C,o):[o]}return{exports:i,options:r}}const k={__name:"WzButton",props:{variant:{type:String,default:"primary",validator:i=>["primary","secondary","success","danger","warning","info","light","dark","link","outline"].includes(i)},size:{type:String,default:"md",validator:i=>["sm","md","lg"].includes(i)},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},emits:["click"],setup(i,{emit:e}){const t=i,a=d.computed(()=>["wz-btn",`wz-btn-${t.variant}`,`wz-btn-${t.size}`,{"wz-btn-block":t.block}]);return{__sfc:!0,props:t,emit:e,classes:a,handleClick:n=>{t.disabled||e("click",n)}}}};var S=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("button",{class:a.classes,attrs:{disabled:e.disabled},on:{click:a.handleClick}},[e._t("default")],2)},$=[],M=v(k,S,$,!1,null,null,null,null);const h=M.exports,P={__name:"WzSidebar",props:{items:{type:Array,default:()=>[]},activeKey:{type:String,default:null},logoSrc:{type:String,default:null},logoMiniSrc:{type:String,default:null},logoText:{type:String,default:"Admin"},logoIconHtml:{type:String,default:null},collapsed:{type:Boolean,default:!1}},emits:["item-click"],setup(i,{emit:e}){const t=i,a=d.ref(new Set),s=d.ref(!1),n=d.computed(()=>t.collapsed&&!s.value),c=l=>l.key===t.activeKey,_=l=>l.children&&l.children.length>0,r=l=>a.value.has(l.key),o=l=>{if(!_(l)||n.value)return;const f=new Set(a.value);f.has(l.key)?f.delete(l.key):f.add(l.key),a.value=f};return{__sfc:!0,props:t,emit:e,openKeys:a,isHovered:s,visuallyCollapsed:n,isActive:c,hasChildren:_,isOpen:r,toggle:o,handleClick:l=>{if(n.value){e("item-click",l);return}_(l)?o(l):e("item-click",l)},handleChildClick:l=>{e("item-click",l)}}}};var x=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("aside",{staticClass:"wz-sidebar",class:{"wz-sidebar--collapsed":a.visuallyCollapsed},on:{mouseenter:function(s){a.isHovered=!0},mouseleave:function(s){a.isHovered=!1}}},[t("div",{staticClass:"wz-sidebar-logo"},[e._t("logo",function(){return[e.logoSrc||e.logoMiniSrc?[a.visuallyCollapsed&&e.logoMiniSrc?t("img",{staticClass:"wz-sidebar-logo-img-mini",attrs:{src:e.logoMiniSrc,alt:"Mini Logo"}}):!a.visuallyCollapsed&&e.logoSrc?t("img",{staticClass:"wz-sidebar-logo-img",attrs:{src:e.logoSrc,alt:"Logo"}}):e._e()]:[e.logoIconHtml?t("span",{staticClass:"wz-sidebar-logo-icon",domProps:{innerHTML:e._s(e.logoIconHtml)}}):e._e(),t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-logo-text"},[e._v(e._s(e.logoText))])]]})],2),t("nav",{staticClass:"wz-sidebar-nav"},[e._l(e.items,function(s,n){return[s.type==="group"?t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],key:`group-${n}`,staticClass:"wz-sidebar-group"},[e._v(" "+e._s(s.label)+" ")]):t("div",{key:s.key||n,staticClass:"wz-sidebar-item-wrapper"},[t("div",{staticClass:"wz-sidebar-item",class:{"wz-sidebar-item--active":a.isActive(s)},attrs:{title:a.visuallyCollapsed?s.label:null},on:{click:function(c){return a.handleClick(s)}}},[t("span",{staticClass:"wz-sidebar-icon"},[e._t("icon",function(){return[s.icon?t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}}):s.iconHtml?t("span",{domProps:{innerHTML:e._s(s.iconHtml)}}):t("i",{staticClass:"ri-checkbox-blank-circle-line",staticStyle:{"font-size":"10px"}})]},{item:s})],2),t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-label"},[e._v(e._s(s.label))]),a.hasChildren(s)?t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-arrow",class:{"wz-sidebar-arrow--open":a.isOpen(s)}},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1.125rem"}})]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-children-wrapper",class:{"is-open":a.hasChildren(s)&&a.isOpen(s)}},[t("div",{staticClass:"wz-sidebar-children-inner"},[a.hasChildren(s)?t("div",{staticClass:"wz-sidebar-children"},e._l(s.children,function(c){return t("div",{key:c.key,staticClass:"wz-sidebar-child-item",class:{"wz-sidebar-child-item--active":a.isActive(c)},on:{click:function(_){return a.handleChildClick(c)}}},[t("span",{staticClass:"wz-sidebar-label"},[e._v(e._s(c.label))]),a.hasChildren(c)?t("span",{staticClass:"wz-sidebar-arrow"},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1rem"}})]):e._e()])}),0):e._e()])])])]})],2)])},W=[],L=v(P,x,W,!1,null,null,null,null);const w=L.exports,O={__name:"WzHeader",props:{user:{type:Object,default:()=>({name:"User",avatar:null})},notificationCount:{type:Number,default:0},collapsed:{type:Boolean,default:!1},actionItems:{type:Array,default:()=>[]},userMenuItems:{type:Array,default:()=>[]},userSubtitle:{type:String,default:""},logoSrc:{type:String,default:null}},emits:["menu-toggle","search","notifications","settings","user-click","action-click","user-menu-click"],setup(i,{emit:e}){const t=i,a=o=>o?o.split(" ").map(p=>p[0]).slice(0,2).join("").toUpperCase():"?",s=d.ref(!1),n=d.ref(null),c=()=>{s.value=!s.value,e("user-click")},_=o=>{e("user-menu-click",o),s.value=!1},r=o=>{n.value&&!n.value.contains(o.target)&&(s.value=!1)};return d.onMounted(()=>{document.addEventListener("click",r)}),d.onBeforeUnmount(()=>{document.removeEventListener("click",r)}),{__sfc:!0,props:t,emit:e,initials:a,isUserMenuOpen:s,userMenuContainer:n,toggleUserMenu:c,handleUserItemClick:_,handleClickOutside:r}}};var T=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("header",{staticClass:"wz-header"},[t("div",{staticClass:"wz-header-left"},[e.logoSrc?t("img",{staticClass:"wz-header-mobile-logo",attrs:{src:e.logoSrc,alt:"Brand Logo"}}):e._e(),t("button",{staticClass:"wz-header-action wz-header-hamburger",attrs:{title:"Toggle menu"},on:{click:function(s){return a.emit("menu-toggle")}}},[t("i",{staticClass:"wz-header-icon-desktop",class:e.collapsed?"ri-close-line":"ri-menu-line",staticStyle:{"font-size":"1.25rem"}}),t("i",{staticClass:"wz-header-icon-mobile ri-menu-line",staticStyle:{"font-size":"1.25rem",display:"none"}})]),e._t("left")],2),t("div",{staticClass:"wz-header-right"},[e._t("actions",function(){return[e.actionItems&&e.actionItems.length?[e._l(e.actionItems,function(s){return[s.badge?t("div",{key:"badge-"+s.key,staticClass:"wz-header-badge"},[t("button",{staticClass:"wz-header-action",attrs:{title:s.key},on:{click:function(n){return a.emit("action-click",s)}}},[t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}})]),s.badgeCount||e.notificationCount>0?t("span",{staticClass:"wz-header-badge-dot"},[e._v(" "+e._s(s.badgeCount||e.notificationCount>9?"9+":s.badgeCount||e.notificationCount)+" ")]):e._e()]):t("button",{key:s.key,staticClass:"wz-header-action",attrs:{title:s.key},on:{click:function(n){return a.emit("action-click",s)}}},[t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}})])]})]:[t("button",{staticClass:"wz-header-action",attrs:{title:"Search"},on:{click:function(s){return a.emit("search")}}},[t("i",{staticClass:"ri-search-line",staticStyle:{"font-size":"1.125rem"}})]),e._m(0),e._m(1),t("div",{staticClass:"wz-header-badge"},[t("button",{staticClass:"wz-header-action",attrs:{title:"Notifications"},on:{click:function(s){return a.emit("notifications")}}},[t("i",{staticClass:"ri-notification-3-line",staticStyle:{"font-size":"1.125rem"}})]),e.notificationCount>0?t("span",{staticClass:"wz-header-badge-dot"},[e._v(" "+e._s(e.notificationCount>9?"9+":e.notificationCount)+" ")]):e._e()]),e._m(2),e._m(3)]]}),t("div",{staticClass:"wz-header-divider"}),t("div",{ref:"userMenuContainer",staticClass:"wz-header-user-wrapper"},[e._t("user",function(){return[t("div",{staticClass:"wz-header-user",on:{click:function(s){return s.stopPropagation(),a.toggleUserMenu.apply(null,arguments)}}},[e.user.avatar?t("img",{staticClass:"wz-header-user-avatar",attrs:{src:e.user.avatar,alt:e.user.name}}):t("div",{staticClass:"wz-header-user-avatar-placeholder"},[e._v(" "+e._s(a.initials(e.user.name))+" ")]),t("span",{staticClass:"wz-header-user-name"},[e._v(e._s(e.user.name))])])]}),e.userMenuItems&&e.userMenuItems.length>0?t("div",{directives:[{name:"show",rawName:"v-show",value:a.isUserMenuOpen,expression:"isUserMenuOpen"}],staticClass:"wz-header-dropdown"},[t("div",{staticClass:"wz-header-dropdown-header"},[t("div",{staticClass:"wz-header-dropdown-title"},[e._v(e._s(e.user.name))]),e.userSubtitle?t("div",{staticClass:"wz-header-dropdown-subtitle"},[e._v(e._s(e.userSubtitle))]):e._e()]),t("div",{staticClass:"wz-header-dropdown-body"},e._l(e.userMenuItems,function(s,n){return t("div",{key:n,staticClass:"wz-header-dropdown-item",class:{"wz-header-dropdown-item--logout":s.isLogout},on:{click:function(c){return a.handleUserItemClick(s)}}},[s.icon&&!s.isLogout?t("i",{class:s.icon}):e._e(),t("span",[e._v(e._s(s.label))])])}),0)]):e._e()],2),t("button",{staticClass:"wz-header-action",attrs:{title:"Settings"},on:{click:function(s){return a.emit("settings")}}},[t("i",{staticClass:"ri-settings-3-line wz-anim-spin",staticStyle:{"font-size":"1.125rem",display:"inline-block"}})])],2)])},H=[function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Language"}},[e("i",{staticClass:"ri-global-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Toggle dark mode"}},[e("i",{staticClass:"ri-moon-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Calendar"}},[e("i",{staticClass:"ri-calendar-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Fullscreen"}},[e("i",{staticClass:"ri-fullscreen-line",staticStyle:{"font-size":"1.125rem"}})])}],I=v(O,T,H,!1,null,null,null,null);const g=I.exports,N={__name:"WzLayout",props:{defaultCollapsed:{type:Boolean,default:!1},theme:{type:String,default:"light"}},setup(i){const e=i,t=d.ref(e.defaultCollapsed),a=()=>{t.value=!t.value};return d.onMounted(()=>{typeof window<"u"&&window.innerWidth<=768&&(t.value=!0)}),{__sfc:!0,props:e,isCollapsed:t,toggleSidebar:a}}};var U=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-admin-layout",attrs:{"data-theme":e.theme}},[t("div",{staticClass:"wz-admin-layout-sidebar-container"},[a.isCollapsed?e._e():t("div",{staticClass:"wz-admin-layout-backdrop",on:{click:a.toggleSidebar}}),e._t("sidebar",null,{collapsed:a.isCollapsed})],2),t("div",{staticClass:"wz-admin-layout-main"},[t("div",{staticClass:"wz-admin-layout-header-container"},[e._t("header",null,{toggleSidebar:a.toggleSidebar,collapsed:a.isCollapsed})],2),t("main",{staticClass:"wz-admin-layout-content"},[e._t("default")],2)])])},B=[],R=v(N,U,B,!1,null,null,null,null);const m=R.exports,A={__name:"WzSettingsPanel",props:{isOpen:{type:Boolean,default:!1},title:{type:String,default:"Switcher"},value:{type:Object,default:()=>({})},extraSettings:{type:Array,default:()=>[]}},emits:["close","input","setting-change"],setup(i,{emit:e}){const t=i,a=[{id:"themeMode",title:"Theme Color Mode:",options:[{value:"light",label:"Light"},{value:"dark",label:"Dark"}]},{id:"navigationStyle",title:"Navigation Styles:",options:[{value:"vertical",label:"Vertical"},{value:"horizontal",label:"Horizontal"}]}],s=d.computed(()=>[...a,...t.extraSettings]);return{__sfc:!0,props:t,emit:e,baseSettings:a,allSettings:s,handleSelection:(_,r)=>{const o={...t.value,[_]:r};e("input",o),e("setting-change",{id:_,value:r})},closePanel:()=>{e("close")}}}};var F=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-settings",class:{"wz-settings--open":e.isOpen}},[t("div",{staticClass:"wz-settings-overlay",on:{click:a.closePanel}}),t("aside",{staticClass:"wz-settings-panel"},[t("div",{staticClass:"wz-settings-header"},[t("h3",{staticClass:"wz-settings-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"wz-settings-close",attrs:{title:"Close Settings"},on:{click:a.closePanel}},[t("i",{staticClass:"ri-close-circle-line"})])]),e._m(0),t("div",{staticClass:"wz-settings-body"},[e._l(a.allSettings,function(s){return[t("div",{staticClass:"wz-settings-section"},[t("h4",{staticClass:"wz-settings-section-title"},[e._v(e._s(s.title))]),t("div",{staticClass:"wz-settings-radio-group"},e._l(s.options,function(n){return t("label",{key:n.value,staticClass:"wz-settings-radio-label"},[t("div",{staticClass:"wz-settings-radio-circle",class:{"wz-settings-radio-circle--active":e.value[s.id]===n.value}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.value[s.id]===n.value,expression:"value[setting.id] === opt.value"}],staticClass:"wz-settings-radio-dot"})]),t("input",{staticClass:"wz-settings-radio-native",attrs:{type:"radio",name:s.id},domProps:{value:n.value,checked:e.value[s.id]===n.value},on:{change:function(c){return a.handleSelection(s.id,n.value)}}}),t("span",{staticClass:"wz-settings-radio-text"},[e._v(e._s(n.label))])])}),0)])]})],2)])])},V=[function(){var i=this,e=i._self._c;return i._self._setupProxy,e("div",{staticClass:"wz-settings-tabs"},[e("div",{staticClass:"wz-settings-tab wz-settings-tab--active"},[i._v("Theme Style")])])}],j=v(A,F,V,!1,null,null,null,null);const z=j.exports,E={WzButton:h,WzSidebar:w,WzHeader:g,WzLayout:m,WzSettingsPanel:z},y=i=>{Object.entries(E).forEach(([e,t])=>{i.component(e,t)})};typeof window<"u"&&window.Vue&&y(window.Vue);const K={install:y};u.WzButton=h,u.WzHeader=g,u.WzLayout=m,u.WzSettingsPanel=z,u.WzSidebar=w,u.default=K,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(v,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(v=typeof globalThis<"u"?globalThis:v||self,u(v.WizeAdminLibrary={},v.Vue))})(this,function(v,u){"use strict";const Q="";function _(i,e,t,a,s,n,r,d){var o=typeof i=="function"?i.options:i;e&&(o.render=e,o.staticRenderFns=t,o._compiled=!0),a&&(o.functional=!0),n&&(o._scopeId="data-v-"+n);var c;if(r?(c=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),s&&s.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(r)},o._ssrRegister=c):s&&(c=d?function(){s.call(this,(o.functional?this.parent:this).$root.$options.shadowRoot)}:s),c)if(o.functional){o._injectStyles=c;var p=o.render;o.render=function(f,k){return c.call(k),p(f,k)}}else{var h=o.beforeCreate;o.beforeCreate=h?[].concat(h,c):[c]}return{exports:i,options:o}}const S={__name:"WzButton",props:{variant:{type:String,default:"primary",validator:i=>["primary","secondary","success","danger","warning","info","light","dark","link","outline"].includes(i)},size:{type:String,default:"md",validator:i=>["sm","md","lg"].includes(i)},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},emits:["click"],setup(i,{emit:e}){const t=i,a=u.computed(()=>["wz-btn",`wz-btn-${t.variant}`,`wz-btn-${t.size}`,{"wz-btn-block":t.block}]);return{__sfc:!0,props:t,emit:e,classes:a,handleClick:n=>{t.disabled||e("click",n)}}}};var $=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("button",{class:a.classes,attrs:{disabled:e.disabled},on:{click:a.handleClick}},[e._t("default")],2)},M=[],P=_(S,$,M,!1,null,null,null,null);const C=P.exports,x={__name:"WzLayout",props:{defaultCollapsed:{type:Boolean,default:!1},navigationStyle:{type:String,default:"vertical"},theme:{type:String,default:"light"}},setup(i){const e=i,t=u.ref(e.defaultCollapsed),a=()=>{t.value=!t.value};return u.onMounted(()=>{typeof window<"u"&&window.innerWidth<=768&&(t.value=!0)}),{__sfc:!0,props:e,isCollapsed:t,toggleSidebar:a}}};var W=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-admin-layout",class:"is-"+e.navigationStyle,attrs:{"data-theme":e.theme}},[t("div",{staticClass:"wz-admin-layout-sidebar-container"},[a.isCollapsed?e._e():t("div",{staticClass:"wz-admin-layout-backdrop",on:{click:a.toggleSidebar}}),e._t("sidebar",null,{collapsed:a.isCollapsed})],2),t("div",{staticClass:"wz-admin-layout-main"},[t("div",{staticClass:"wz-admin-layout-header-container"},[e._t("header",null,{toggleSidebar:a.toggleSidebar,collapsed:a.isCollapsed})],2),e.navigationStyle==="horizontal"?t("div",{staticClass:"wz-admin-layout-horizontal-nav-container"},[e._t("horizontal-nav")],2):e._e(),t("main",{staticClass:"wz-admin-layout-content"},[e._t("default")],2)])])},H=[],T=_(x,W,H,!1,null,null,null,null);const w=T.exports,L={__name:"WzSidebar",props:{items:{type:Array,default:()=>[]},activeKey:{type:String,default:null},logoSrc:{type:String,default:null},logoMiniSrc:{type:String,default:null},logoText:{type:String,default:"Admin"},logoIconHtml:{type:String,default:null},collapsed:{type:Boolean,default:!1}},emits:["item-click"],setup(i,{emit:e}){const t=i,a=u.ref(new Set),s=u.ref(!1),n=u.computed(()=>t.collapsed&&!s.value),r=l=>l.key===t.activeKey,d=l=>l.children&&l.children.length>0,o=l=>a.value.has(l.key),c=l=>{if(!d(l)||n.value)return;const f=new Set(a.value);f.has(l.key)?f.delete(l.key):f.add(l.key),a.value=f};return{__sfc:!0,props:t,emit:e,openKeys:a,isHovered:s,visuallyCollapsed:n,isActive:r,hasChildren:d,isOpen:o,toggle:c,handleClick:l=>{if(n.value){e("item-click",l);return}d(l)?c(l):e("item-click",l)},handleChildClick:l=>{e("item-click",l)}}}};var N=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("aside",{staticClass:"wz-sidebar",class:{"wz-sidebar--collapsed":a.visuallyCollapsed},on:{mouseenter:function(s){a.isHovered=!0},mouseleave:function(s){a.isHovered=!1}}},[t("div",{staticClass:"wz-sidebar-logo"},[e._t("logo",function(){return[e.logoSrc||e.logoMiniSrc?[a.visuallyCollapsed&&e.logoMiniSrc?t("img",{staticClass:"wz-sidebar-logo-img-mini",attrs:{src:e.logoMiniSrc,alt:"Mini Logo"}}):!a.visuallyCollapsed&&e.logoSrc?t("img",{staticClass:"wz-sidebar-logo-img",attrs:{src:e.logoSrc,alt:"Logo"}}):e._e()]:[e.logoIconHtml?t("span",{staticClass:"wz-sidebar-logo-icon",domProps:{innerHTML:e._s(e.logoIconHtml)}}):e._e(),t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-logo-text"},[e._v(e._s(e.logoText))])]]})],2),t("nav",{staticClass:"wz-sidebar-nav"},[e._l(e.items,function(s,n){return[s.type==="group"?t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],key:`group-${n}`,staticClass:"wz-sidebar-group"},[e._v(" "+e._s(s.label)+" ")]):t("div",{key:s.key||n,staticClass:"wz-sidebar-item-wrapper"},[t("div",{staticClass:"wz-sidebar-item",class:{"wz-sidebar-item--active":a.isActive(s)},attrs:{title:a.visuallyCollapsed?s.label:null},on:{click:function(r){return a.handleClick(s)}}},[t("span",{staticClass:"wz-sidebar-icon"},[e._t("icon",function(){return[s.icon?t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}}):s.iconHtml?t("span",{domProps:{innerHTML:e._s(s.iconHtml)}}):t("i",{staticClass:"ri-checkbox-blank-circle-line",staticStyle:{"font-size":"10px"}})]},{item:s})],2),t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-label"},[e._v(e._s(s.label))]),a.hasChildren(s)?t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-arrow",class:{"wz-sidebar-arrow--open":a.isOpen(s)}},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1.125rem"}})]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-children-wrapper",class:{"is-open":a.hasChildren(s)&&a.isOpen(s)}},[t("div",{staticClass:"wz-sidebar-children-inner"},[a.hasChildren(s)?t("div",{staticClass:"wz-sidebar-children"},e._l(s.children,function(r){return t("div",{key:r.key,staticClass:"wz-sidebar-child-item",class:{"wz-sidebar-child-item--active":a.isActive(r)},on:{click:function(d){return a.handleChildClick(r)}}},[t("span",{staticClass:"wz-sidebar-label"},[e._v(e._s(r.label))]),a.hasChildren(r)?t("span",{staticClass:"wz-sidebar-arrow"},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1rem"}})]):e._e()])}),0):e._e()])])])]})],2)])},O=[],I=_(L,N,O,!1,null,null,null,null);const z=I.exports,U={__name:"WzHeader",props:{user:{type:Object,default:()=>({name:"User",avatar:null})},notificationCount:{type:Number,default:0},collapsed:{type:Boolean,default:!1},actionItems:{type:Array,default:()=>[]},userMenuItems:{type:Array,default:()=>[]},userSubtitle:{type:String,default:""},logoSrc:{type:String,default:""},layoutMode:{type:String,default:"vertical"}},emits:["menu-toggle","search","notifications","settings","user-click","action-click","user-menu-click"],setup(i,{emit:e}){const t=i,a=c=>c?c.split(" ").map(p=>p[0]).slice(0,2).join("").toUpperCase():"?",s=u.ref(!1),n=u.ref(null),r=()=>{s.value=!s.value,e("user-click")},d=c=>{e("user-menu-click",c),s.value=!1},o=c=>{n.value&&!n.value.contains(c.target)&&(s.value=!1)};return u.onMounted(()=>{document.addEventListener("click",o)}),u.onBeforeUnmount(()=>{document.removeEventListener("click",o)}),{__sfc:!0,props:t,emit:e,initials:a,isUserMenuOpen:s,userMenuContainer:n,toggleUserMenu:r,handleUserItemClick:d,handleClickOutside:o}}};var B=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("header",{staticClass:"wz-header",class:{"wz-header--horizontal":e.layoutMode==="horizontal"}},[t("div",{staticClass:"wz-header-left"},[e.layoutMode==="vertical"?t("button",{staticClass:"wz-header-action wz-header-icon-desktop",attrs:{title:"Toggle Menu"},on:{click:function(s){return e.$emit("menu-toggle")}}},[t("i",{class:e.collapsed?"ri-menu-unfold-line":"ri-menu-fold-line"})]):e._e(),t("button",{staticClass:"wz-header-action wz-header-icon-mobile",staticStyle:{display:"none"},attrs:{title:"Toggle Menu"},on:{click:function(s){return e.$emit("menu-toggle")}}},[t("i",{staticClass:"ri-menu-2-line"})]),t("div",{staticClass:"wz-header-dynamic-logo",class:e.layoutMode==="horizontal"?"wz-header-logo-always-visible":"wz-header-mobile-logo"},[e.logoSrc?t("img",{staticClass:"wz-header-dynamic-logo-img",attrs:{src:e.logoSrc,alt:"Logo"}}):e._e()]),e._t("left")],2),t("div",{staticClass:"wz-header-right"},[e._t("actions",function(){return[e.actionItems&&e.actionItems.length?[e._l(e.actionItems,function(s){return[s.badge?t("div",{key:"badge-"+s.key,staticClass:"wz-header-badge"},[t("button",{staticClass:"wz-header-action",attrs:{title:s.key},on:{click:function(n){return a.emit("action-click",s)}}},[t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}})]),s.badgeCount||e.notificationCount>0?t("span",{staticClass:"wz-header-badge-dot"},[e._v(" "+e._s(s.badgeCount||e.notificationCount>9?"9+":s.badgeCount||e.notificationCount)+" ")]):e._e()]):t("button",{key:s.key,staticClass:"wz-header-action",attrs:{title:s.key},on:{click:function(n){return a.emit("action-click",s)}}},[t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}})])]})]:[t("button",{staticClass:"wz-header-action",attrs:{title:"Search"},on:{click:function(s){return a.emit("search")}}},[t("i",{staticClass:"ri-search-line",staticStyle:{"font-size":"1.125rem"}})]),e._m(0),e._m(1),t("div",{staticClass:"wz-header-badge"},[t("button",{staticClass:"wz-header-action",attrs:{title:"Notifications"},on:{click:function(s){return a.emit("notifications")}}},[t("i",{staticClass:"ri-notification-3-line",staticStyle:{"font-size":"1.125rem"}})]),e.notificationCount>0?t("span",{staticClass:"wz-header-badge-dot"},[e._v(" "+e._s(e.notificationCount>9?"9+":e.notificationCount)+" ")]):e._e()]),e._m(2),e._m(3)]]}),t("div",{staticClass:"wz-header-divider"}),t("div",{ref:"userMenuContainer",staticClass:"wz-header-user-wrapper"},[e._t("user",function(){return[t("div",{staticClass:"wz-header-user",on:{click:function(s){return s.stopPropagation(),a.toggleUserMenu.apply(null,arguments)}}},[e.user.avatar?t("img",{staticClass:"wz-header-user-avatar",attrs:{src:e.user.avatar,alt:e.user.name}}):t("div",{staticClass:"wz-header-user-avatar-placeholder"},[e._v(" "+e._s(a.initials(e.user.name))+" ")]),t("span",{staticClass:"wz-header-user-name"},[e._v(e._s(e.user.name))])])]}),e.userMenuItems&&e.userMenuItems.length>0?t("div",{directives:[{name:"show",rawName:"v-show",value:a.isUserMenuOpen,expression:"isUserMenuOpen"}],staticClass:"wz-header-dropdown"},[t("div",{staticClass:"wz-header-dropdown-header"},[t("div",{staticClass:"wz-header-dropdown-title"},[e._v(e._s(e.user.name))]),e.userSubtitle?t("div",{staticClass:"wz-header-dropdown-subtitle"},[e._v(e._s(e.userSubtitle))]):e._e()]),t("div",{staticClass:"wz-header-dropdown-body"},e._l(e.userMenuItems,function(s,n){return t("div",{key:n,staticClass:"wz-header-dropdown-item",class:{"wz-header-dropdown-item--logout":s.isLogout},on:{click:function(r){return a.handleUserItemClick(s)}}},[s.icon&&!s.isLogout?t("i",{class:s.icon}):e._e(),t("span",[e._v(e._s(s.label))])])}),0)]):e._e()],2),t("button",{staticClass:"wz-header-action",attrs:{title:"Settings"},on:{click:function(s){return a.emit("settings")}}},[t("i",{staticClass:"ri-settings-3-line wz-anim-spin",staticStyle:{"font-size":"1.125rem",display:"inline-block"}})])],2)])},R=[function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Language"}},[e("i",{staticClass:"ri-global-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Toggle dark mode"}},[e("i",{staticClass:"ri-moon-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Calendar"}},[e("i",{staticClass:"ri-calendar-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var i=this,e=i._self._c;return i._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Fullscreen"}},[e("i",{staticClass:"ri-fullscreen-line",staticStyle:{"font-size":"1.125rem"}})])}],A=_(U,B,R,!1,null,null,null,null);const g=A.exports,F={__name:"WzSettingsPanel",props:{isOpen:{type:Boolean,default:!1},title:{type:String,default:"Switcher"},value:{type:Object,default:()=>({})},extraSettings:{type:Array,default:()=>[]}},emits:["close","input","setting-change"],setup(i,{emit:e}){const t=i,a=[{id:"themeMode",title:"Theme Color Mode:",options:[{value:"light",label:"Light"},{value:"dark",label:"Dark"}]},{id:"navigationStyle",title:"Navigation Styles:",options:[{value:"vertical",label:"Vertical"},{value:"horizontal",label:"Horizontal"}]}],s=u.computed(()=>[...a,...t.extraSettings]);return{__sfc:!0,props:t,emit:e,baseSettings:a,allSettings:s,handleSelection:(d,o)=>{const c={...t.value,[d]:o};e("input",c),e("setting-change",{id:d,value:o})},closePanel:()=>{e("close")}}}};var K=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-settings",class:{"wz-settings--open":e.isOpen}},[t("div",{staticClass:"wz-settings-overlay",on:{click:a.closePanel}}),t("aside",{staticClass:"wz-settings-panel"},[t("div",{staticClass:"wz-settings-header"},[t("h3",{staticClass:"wz-settings-title"},[e._v(e._s(e.title))]),t("button",{staticClass:"wz-settings-close",attrs:{title:"Close Settings"},on:{click:a.closePanel}},[t("i",{staticClass:"ri-close-circle-line"})])]),e._m(0),t("div",{staticClass:"wz-settings-body"},[e._l(a.allSettings,function(s){return[t("div",{staticClass:"wz-settings-section"},[t("h4",{staticClass:"wz-settings-section-title"},[e._v(e._s(s.title))]),t("div",{staticClass:"wz-settings-radio-group"},e._l(s.options,function(n){return t("label",{key:n.value,staticClass:"wz-settings-radio-label"},[t("div",{staticClass:"wz-settings-radio-circle",class:{"wz-settings-radio-circle--active":e.value[s.id]===n.value}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.value[s.id]===n.value,expression:"value[setting.id] === opt.value"}],staticClass:"wz-settings-radio-dot"})]),t("input",{staticClass:"wz-settings-radio-native",attrs:{type:"radio",name:s.id},domProps:{value:n.value,checked:e.value[s.id]===n.value},on:{change:function(r){return a.handleSelection(s.id,n.value)}}}),t("span",{staticClass:"wz-settings-radio-text"},[e._v(e._s(n.label))])])}),0)])]})],2)])])},V=[function(){var i=this,e=i._self._c;return i._self._setupProxy,e("div",{staticClass:"wz-settings-tabs"},[e("div",{staticClass:"wz-settings-tab wz-settings-tab--active"},[i._v("Theme Style")])])}],j=_(F,K,V,!1,null,null,null,null);const y=j.exports,E={__name:"WzHorizontalNav",props:{items:{type:Array,default:()=>[]},activeKey:{type:String,default:null}},emits:["item-click"],setup(i,{emit:e}){const t=i,a=u.ref(null);return{__sfc:!0,props:t,emit:e,track:a,scroll:d=>{a.value&&a.value.scrollBy({left:d,behavior:"smooth"})},handleClick:d=>{e("item-click",d)},handleChildClick:d=>{e("item-click",d)}}}};var X=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-horizontal-nav"},[t("button",{staticClass:"wz-horizontal-nav-arrow wz-horizontal-nav-arrow--left",on:{click:function(s){return a.scroll(-250)}}},[t("i",{staticClass:"ri-arrow-left-s-line"})]),t("div",{staticClass:"wz-horizontal-nav-track-wrapper"},[t("div",{ref:"track",staticClass:"wz-horizontal-nav-track"},[e._l(e.items,function(s,n){return[s.type!=="group"?t("div",{key:s.key||n,staticClass:"wz-horizontal-nav-item",class:{"wz-horizontal-nav-item--active":s.key===e.activeKey||s.children&&s.children.some(r=>r.key===e.activeKey)},on:{click:function(r){return a.handleClick(s)}}},[s.icon?t("i",{class:s.icon}):e._e(),t("span",[e._v(e._s(s.label))]),s.children&&s.children.length>0?t("i",{staticClass:"ri-arrow-down-s-line",staticStyle:{"margin-left":"4px","margin-right":"0","font-size":"1rem"}}):e._e(),s.children&&s.children.length>0?t("div",{staticClass:"wz-horizontal-nav-dropdown"},e._l(s.children,function(r){return t("div",{key:r.key,staticClass:"wz-horizontal-active-child",class:{"wz-horizontal-active-child--active":r.key===e.activeKey},on:{click:function(d){return d.stopPropagation(),a.handleChildClick(r)}}},[e._v(" "+e._s(r.label)+" ")])}),0):e._e()]):e._e()]})],2)]),t("button",{staticClass:"wz-horizontal-nav-arrow wz-horizontal-nav-arrow--right",on:{click:function(s){return a.scroll(250)}}},[t("i",{staticClass:"ri-arrow-right-s-line"})])])},q=[],D=_(E,X,q,!1,null,null,null,null);const m=D.exports,G={WzButton:C,WzSidebar:z,WzHeader:g,WzLayout:w,WzSettingsPanel:y,WzHorizontalNav:m},b=i=>{Object.entries(G).forEach(([e,t])=>{i.component(e,t)})};typeof window<"u"&&window.Vue&&b(window.Vue);const J={install:b};v.WzButton=C,v.WzHeader=g,v.WzHorizontalNav=m,v.WzLayout=w,v.WzSettingsPanel=y,v.WzSidebar=z,v.default=J,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wize-admin-library",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "A reusable, lightweight, and highly customizable Vue 2.7 component library for admin panels.",
|
|
5
5
|
"main": "dist/wize-admin-library.umd.js",
|
|
6
6
|
"module": "dist/wize-admin-library.es.js",
|