wize-admin-library 0.1.10 → 0.1.11

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.
@@ -1,34 +1,34 @@
1
- import { computed as h, ref as _, onMounted as w, onBeforeUnmount as g } from "vue";
2
- function p(i, e, t, a, s, r, c, d) {
3
- var l = typeof i == "function" ? i.options : i;
4
- e && (l.render = e, l.staticRenderFns = t, l._compiled = !0), a && (l.functional = !0), r && (l._scopeId = "data-v-" + r);
1
+ import { computed as C, ref as _, onMounted as h, onBeforeUnmount as m } from "vue";
2
+ function v(i, e, t, a, s, l, c, u) {
3
+ var r = typeof i == "function" ? i.options : i;
4
+ e && (r.render = e, r.staticRenderFns = t, r._compiled = !0), a && (r.functional = !0), l && (r._scopeId = "data-v-" + l);
5
5
  var o;
6
6
  if (c ? (o = function(n) {
7
7
  n = n || // cached call
8
8
  this.$vnode && this.$vnode.ssrContext || // stateful
9
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(c);
10
- }, l._ssrRegister = o) : s && (o = d ? function() {
10
+ }, r._ssrRegister = o) : s && (o = u ? function() {
11
11
  s.call(
12
12
  this,
13
- (l.functional ? this.parent : this).$root.$options.shadowRoot
13
+ (r.functional ? this.parent : this).$root.$options.shadowRoot
14
14
  );
15
15
  } : s), o)
16
- if (l.functional) {
17
- l._injectStyles = o;
18
- var f = l.render;
19
- l.render = function(u, C) {
20
- return o.call(C), f(u, C);
16
+ if (r.functional) {
17
+ r._injectStyles = o;
18
+ var p = r.render;
19
+ r.render = function(d, w) {
20
+ return o.call(w), p(d, w);
21
21
  };
22
22
  } else {
23
- var v = l.beforeCreate;
24
- l.beforeCreate = v ? [].concat(v, o) : [o];
23
+ var f = r.beforeCreate;
24
+ r.beforeCreate = f ? [].concat(f, o) : [o];
25
25
  }
26
26
  return {
27
27
  exports: i,
28
- options: l
28
+ options: r
29
29
  };
30
30
  }
31
- const y = {
31
+ const z = {
32
32
  __name: "WzButton",
33
33
  props: {
34
34
  /**
@@ -66,23 +66,23 @@ const y = {
66
66
  },
67
67
  emits: ["click"],
68
68
  setup(i, { emit: e }) {
69
- const t = i, a = h(() => [
69
+ const t = i, a = C(() => [
70
70
  "wz-btn",
71
71
  `wz-btn-${t.variant}`,
72
72
  `wz-btn-${t.size}`,
73
73
  { "wz-btn-block": t.block }
74
74
  ]);
75
- return { __sfc: !0, props: t, emit: e, classes: a, handleClick: (r) => {
76
- t.disabled || e("click", r);
75
+ return { __sfc: !0, props: t, emit: e, classes: a, handleClick: (l) => {
76
+ t.disabled || e("click", l);
77
77
  } };
78
78
  }
79
79
  };
80
- var z = function() {
80
+ var y = 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__ */ p(
84
- y,
83
+ }, b = [], k = /* @__PURE__ */ v(
85
84
  z,
85
+ y,
86
86
  b,
87
87
  !1,
88
88
  null,
@@ -147,24 +147,24 @@ const S = k.exports, $ = {
147
147
  },
148
148
  emits: ["item-click"],
149
149
  setup(i, { emit: e }) {
150
- const t = i, a = _(/* @__PURE__ */ new Set()), s = _(!1), r = h(() => t.collapsed && !s.value), c = (n) => n.key === t.activeKey, d = (n) => n.children && n.children.length > 0, l = (n) => a.value.has(n.key), o = (n) => {
151
- if (!d(n) || r.value)
150
+ const t = i, a = _(/* @__PURE__ */ new Set()), s = _(!1), l = C(() => t.collapsed && !s.value), c = (n) => n.key === t.activeKey, u = (n) => n.children && n.children.length > 0, r = (n) => a.value.has(n.key), o = (n) => {
151
+ if (!u(n) || l.value)
152
152
  return;
153
- const u = new Set(a.value);
154
- u.has(n.key) ? u.delete(n.key) : u.add(n.key), a.value = u;
153
+ const d = new Set(a.value);
154
+ d.has(n.key) ? d.delete(n.key) : d.add(n.key), a.value = d;
155
155
  };
156
- return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: r, isActive: c, hasChildren: d, isOpen: l, toggle: o, handleClick: (n) => {
157
- if (r.value) {
156
+ return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: l, isActive: c, hasChildren: u, isOpen: r, toggle: o, handleClick: (n) => {
157
+ if (l.value) {
158
158
  e("item-click", n);
159
159
  return;
160
160
  }
161
- d(n) ? o(n) : e("item-click", n);
161
+ u(n) ? o(n) : e("item-click", n);
162
162
  }, handleChildClick: (n) => {
163
163
  e("item-click", n);
164
164
  } };
165
165
  }
166
166
  };
167
- var M = function() {
167
+ var x = function() {
168
168
  var e = this, t = e._self._c, a = e._self._setupProxy;
169
169
  return t("aside", { staticClass: "wz-sidebar", class: { "wz-sidebar--collapsed": a.visuallyCollapsed }, on: { mouseenter: function(s) {
170
170
  a.isHovered = !0;
@@ -172,28 +172,28 @@ var M = function() {
172
172
  a.isHovered = !1;
173
173
  } } }, [t("div", { staticClass: "wz-sidebar-logo" }, [e._t("logo", function() {
174
174
  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
- })], 2), t("nav", { staticClass: "wz-sidebar-nav" }, [e._l(e.items, function(s, r) {
176
- return [s.type === "group" ? t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], key: `group-${r}`, staticClass: "wz-sidebar-group" }, [e._v(" " + e._s(s.label) + " ")]) : t("div", { key: s.key || r, 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) {
175
+ })], 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(c) {
177
177
  return a.handleClick(s);
178
178
  } } }, [t("span", { staticClass: "wz-sidebar-icon" }, [e._t("icon", function() {
179
179
  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
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(c) {
181
- return t("div", { key: c.key, staticClass: "wz-sidebar-child-item", class: { "wz-sidebar-child-item--active": a.isActive(c) }, on: { click: function(d) {
181
+ return t("div", { key: c.key, staticClass: "wz-sidebar-child-item", class: { "wz-sidebar-child-item--active": a.isActive(c) }, on: { click: function(u) {
182
182
  return a.handleChildClick(c);
183
183
  } } }, [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()]);
184
184
  }), 0) : e._e()])])])];
185
185
  })], 2)]);
186
- }, x = [], I = /* @__PURE__ */ p(
186
+ }, M = [], P = /* @__PURE__ */ v(
187
187
  $,
188
- M,
189
188
  x,
189
+ M,
190
190
  !1,
191
191
  null,
192
192
  null,
193
193
  null,
194
194
  null
195
195
  );
196
- const H = I.exports, L = {
196
+ const O = P.exports, H = {
197
197
  __name: "WzHeader",
198
198
  props: {
199
199
  /**
@@ -248,29 +248,29 @@ const H = I.exports, L = {
248
248
  },
249
249
  emits: ["menu-toggle", "search", "notifications", "settings", "user-click", "action-click", "user-menu-click"],
250
250
  setup(i, { emit: e }) {
251
- const t = i, a = (o) => o ? o.split(" ").map((f) => f[0]).slice(0, 2).join("").toUpperCase() : "?", s = _(!1), r = _(null), c = () => {
251
+ const t = i, a = (o) => o ? o.split(" ").map((p) => p[0]).slice(0, 2).join("").toUpperCase() : "?", s = _(!1), l = _(null), c = () => {
252
252
  s.value = !s.value, e("user-click");
253
- }, d = (o) => {
253
+ }, u = (o) => {
254
254
  e("user-menu-click", o), s.value = !1;
255
- }, l = (o) => {
256
- r.value && !r.value.contains(o.target) && (s.value = !1);
255
+ }, r = (o) => {
256
+ l.value && !l.value.contains(o.target) && (s.value = !1);
257
257
  };
258
- return w(() => {
259
- document.addEventListener("click", l);
260
- }), g(() => {
261
- document.removeEventListener("click", l);
262
- }), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: r, toggleUserMenu: c, handleUserItemClick: d, handleClickOutside: l };
258
+ return h(() => {
259
+ document.addEventListener("click", r);
260
+ }), m(() => {
261
+ document.removeEventListener("click", r);
262
+ }), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: l, toggleUserMenu: c, handleUserItemClick: u, handleClickOutside: r };
263
263
  }
264
264
  };
265
- var U = function() {
265
+ var L = function() {
266
266
  var e = this, t = e._self._c, a = e._self._setupProxy;
267
267
  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) {
268
268
  return a.emit("menu-toggle");
269
269
  } } }, [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() {
270
270
  return [e.actionItems && e.actionItems.length ? [e._l(e.actionItems, function(s) {
271
- 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(r) {
271
+ 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
272
  return a.emit("action-click", s);
273
- } } }, [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(r) {
273
+ } } }, [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(l) {
274
274
  return a.emit("action-click", s);
275
275
  } } }, [t("i", { class: s.icon, staticStyle: { "font-size": "1.125rem" } })])];
276
276
  })] : [t("button", { staticClass: "wz-header-action", attrs: { title: "Search" }, on: { click: function(s) {
@@ -282,14 +282,14 @@ var U = function() {
282
282
  return [t("div", { staticClass: "wz-header-user", on: { click: function(s) {
283
283
  return s.stopPropagation(), a.toggleUserMenu.apply(null, arguments);
284
284
  } } }, [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
- }), 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, r) {
286
- return t("div", { key: r, staticClass: "wz-header-dropdown-item", class: { "wz-header-dropdown-item--logout": s.isLogout }, on: { click: function(c) {
285
+ }), 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(c) {
287
287
  return a.handleUserItemClick(s);
288
288
  } } }, [s.icon && !s.isLogout ? t("i", { class: s.icon }) : e._e(), t("span", [e._v(e._s(s.label))])]);
289
289
  }), 0)]) : e._e()], 2), t("button", { staticClass: "wz-header-action", attrs: { title: "Settings" }, on: { click: function(s) {
290
290
  return a.emit("settings");
291
291
  } } }, [t("i", { staticClass: "ri-settings-3-line wz-anim-spin", staticStyle: { "font-size": "1.125rem", display: "inline-block" } })])], 2)]);
292
- }, O = [function() {
292
+ }, I = [function() {
293
293
  var i = this, e = i._self._c;
294
294
  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
295
  }, function() {
@@ -301,17 +301,17 @@ var U = function() {
301
301
  }, function() {
302
302
  var i = this, e = i._self._c;
303
303
  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
- }], P = /* @__PURE__ */ p(
304
+ }], N = /* @__PURE__ */ v(
305
+ H,
305
306
  L,
306
- U,
307
- O,
307
+ I,
308
308
  !1,
309
309
  null,
310
310
  null,
311
311
  null,
312
312
  null
313
313
  );
314
- const N = P.exports, T = {
314
+ const T = N.exports, U = {
315
315
  __name: "WzLayout",
316
316
  props: {
317
317
  /**
@@ -326,7 +326,7 @@ const N = P.exports, T = {
326
326
  const e = i, t = _(e.defaultCollapsed), a = () => {
327
327
  t.value = !t.value;
328
328
  };
329
- return w(() => {
329
+ return h(() => {
330
330
  typeof window < "u" && window.innerWidth <= 768 && (t.value = !0);
331
331
  }), { __sfc: !0, props: e, isCollapsed: t, toggleSidebar: a };
332
332
  }
@@ -334,8 +334,8 @@ const N = P.exports, T = {
334
334
  var W = function() {
335
335
  var e = this, t = e._self._c, a = e._self._setupProxy;
336
336
  return t("div", { staticClass: "wz-admin-layout" }, [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)])]);
337
- }, B = [], R = /* @__PURE__ */ p(
338
- T,
337
+ }, B = [], R = /* @__PURE__ */ v(
338
+ U,
339
339
  W,
340
340
  B,
341
341
  !1,
@@ -345,20 +345,105 @@ var W = function() {
345
345
  null
346
346
  );
347
347
  const A = R.exports, F = {
348
+ __name: "WzSettingsPanel",
349
+ props: {
350
+ /**
351
+ * Defines if the Settings Drawer is currently open
352
+ */
353
+ isOpen: {
354
+ type: Boolean,
355
+ default: !1
356
+ },
357
+ /**
358
+ * Title shown at the top of the Switcher
359
+ */
360
+ title: {
361
+ type: String,
362
+ default: "Switcher"
363
+ },
364
+ /**
365
+ * Active values mapped by ID. e.g. { themeMode: 'light', navigationStyle: 'vertical' }
366
+ */
367
+ value: {
368
+ type: Object,
369
+ default: () => ({})
370
+ },
371
+ /**
372
+ * Array of extra dynamic setting blocks to inject globally below the defaults
373
+ */
374
+ extraSettings: {
375
+ type: Array,
376
+ default: () => []
377
+ }
378
+ },
379
+ emits: ["close", "input", "setting-change"],
380
+ setup(i, { emit: e }) {
381
+ const t = i, a = [
382
+ {
383
+ id: "themeMode",
384
+ title: "Theme Color Mode:",
385
+ options: [
386
+ { value: "light", label: "Light" },
387
+ { value: "dark", label: "Dark" }
388
+ ]
389
+ },
390
+ {
391
+ id: "navigationStyle",
392
+ title: "Navigation Styles:",
393
+ options: [
394
+ { value: "vertical", label: "Vertical" },
395
+ { value: "horizontal", label: "Horizontal" }
396
+ ]
397
+ }
398
+ ], s = C(() => [...a, ...t.extraSettings]);
399
+ return { __sfc: !0, props: t, emit: e, baseSettings: a, allSettings: s, handleSelection: (u, r) => {
400
+ const o = { ...t.value, [u]: r };
401
+ e("input", o), e("setting-change", { id: u, value: r });
402
+ }, closePanel: () => {
403
+ e("close");
404
+ } };
405
+ }
406
+ };
407
+ var V = function() {
408
+ var e = this, t = e._self._c, a = e._self._setupProxy;
409
+ 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) {
410
+ 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) {
411
+ 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(c) {
412
+ return a.handleSelection(s.id, l.value);
413
+ } } }), t("span", { staticClass: "wz-settings-radio-text" }, [e._v(e._s(l.label))])]);
414
+ }), 0)])];
415
+ })], 2)])]);
416
+ }, E = [function() {
417
+ var i = this, e = i._self._c;
418
+ return i._self._setupProxy, e("div", { staticClass: "wz-settings-tabs" }, [e("div", { staticClass: "wz-settings-tab wz-settings-tab--active" }, [i._v("Theme Style")])]);
419
+ }], K = /* @__PURE__ */ v(
420
+ F,
421
+ V,
422
+ E,
423
+ !1,
424
+ null,
425
+ null,
426
+ null,
427
+ null
428
+ );
429
+ const j = K.exports, X = {
348
430
  WzButton: S,
349
- WzSidebar: H,
350
- WzHeader: N,
351
- WzLayout: A
352
- }, m = (i) => {
353
- Object.entries(F).forEach(([e, t]) => {
431
+ WzSidebar: O,
432
+ WzHeader: T,
433
+ WzLayout: A,
434
+ WzSettingsPanel: j
435
+ }, g = (i) => {
436
+ Object.entries(X).forEach(([e, t]) => {
354
437
  i.component(e, t);
355
438
  });
356
439
  };
357
- typeof window < "u" && window.Vue && m(window.Vue);
358
- const V = { install: m };
440
+ typeof window < "u" && window.Vue && g(window.Vue);
441
+ const q = { install: g };
359
442
  export {
360
443
  S as WzButton,
361
- N as WzHeader,
362
- H as WzSidebar,
363
- V as default
444
+ T as WzHeader,
445
+ A as WzLayout,
446
+ j as WzSettingsPanel,
447
+ O as WzSidebar,
448
+ q as default
364
449
  };
@@ -1 +1 @@
1
- (function(u,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(u=typeof globalThis<"u"?globalThis:u||self,c(u.WizeAdminLibrary={},u.Vue))})(this,function(u,c){"use strict";const F="";function p(i,e,t,a,s,r,d,f){var l=typeof i=="function"?i.options:i;e&&(l.render=e,l.staticRenderFns=t,l._compiled=!0),a&&(l.functional=!0),r&&(l._scopeId="data-v-"+r);var o;if(d?(o=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||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(d)},l._ssrRegister=o):s&&(o=f?function(){s.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:s),o)if(l.functional){l._injectStyles=o;var v=l.render;l.render=function(_,y){return o.call(y),v(_,y)}}else{var C=l.beforeCreate;l.beforeCreate=C?[].concat(C,o):[o]}return{exports:i,options:l}}const z={__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=c.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:r=>{t.disabled||e("click",r)}}}};var b=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)},k=[],S=p(z,b,k,!1,null,null,null,null);const h=S.exports,$={__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=c.ref(new Set),s=c.ref(!1),r=c.computed(()=>t.collapsed&&!s.value),d=n=>n.key===t.activeKey,f=n=>n.children&&n.children.length>0,l=n=>a.value.has(n.key),o=n=>{if(!f(n)||r.value)return;const _=new Set(a.value);_.has(n.key)?_.delete(n.key):_.add(n.key),a.value=_};return{__sfc:!0,props:t,emit:e,openKeys:a,isHovered:s,visuallyCollapsed:r,isActive:d,hasChildren:f,isOpen:l,toggle:o,handleClick:n=>{if(r.value){e("item-click",n);return}f(n)?o(n):e("item-click",n)},handleChildClick:n=>{e("item-click",n)}}}};var M=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,r){return[s.type==="group"?t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],key:`group-${r}`,staticClass:"wz-sidebar-group"},[e._v(" "+e._s(s.label)+" ")]):t("div",{key:s.key||r,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(d){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(d){return t("div",{key:d.key,staticClass:"wz-sidebar-child-item",class:{"wz-sidebar-child-item--active":a.isActive(d)},on:{click:function(f){return a.handleChildClick(d)}}},[t("span",{staticClass:"wz-sidebar-label"},[e._v(e._s(d.label))]),a.hasChildren(d)?t("span",{staticClass:"wz-sidebar-arrow"},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1rem"}})]):e._e()])}),0):e._e()])])])]})],2)])},x=[],W=p($,M,x,!1,null,null,null,null);const m=W.exports,H={__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(v=>v[0]).slice(0,2).join("").toUpperCase():"?",s=c.ref(!1),r=c.ref(null),d=()=>{s.value=!s.value,e("user-click")},f=o=>{e("user-menu-click",o),s.value=!1},l=o=>{r.value&&!r.value.contains(o.target)&&(s.value=!1)};return c.onMounted(()=>{document.addEventListener("click",l)}),c.onBeforeUnmount(()=>{document.removeEventListener("click",l)}),{__sfc:!0,props:t,emit:e,initials:a,isUserMenuOpen:s,userMenuContainer:r,toggleUserMenu:d,handleUserItemClick:f,handleClickOutside:l}}};var I=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(r){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(r){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,r){return t("div",{key:r,staticClass:"wz-header-dropdown-item",class:{"wz-header-dropdown-item--logout":s.isLogout},on:{click:function(d){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)])},L=[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"}})])}],T=p(H,I,L,!1,null,null,null,null);const w=T.exports,O={__name:"WzLayout",props:{defaultCollapsed:{type:Boolean,default:!1}},setup(i){const e=i,t=c.ref(e.defaultCollapsed),a=()=>{t.value=!t.value};return c.onMounted(()=>{typeof window<"u"&&window.innerWidth<=768&&(t.value=!0)}),{__sfc:!0,props:e,isCollapsed:t,toggleSidebar:a}}};var P=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-admin-layout"},[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)])])},U=[],B=p(O,P,U,!1,null,null,null,null);const N=B.exports,R={WzButton:h,WzSidebar:m,WzHeader:w,WzLayout:N},g=i=>{Object.entries(R).forEach(([e,t])=>{i.component(e,t)})};typeof window<"u"&&window.Vue&&g(window.Vue);const A={install:g};u.WzButton=h,u.WzHeader=w,u.WzSidebar=m,u.default=A,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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 f(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(v,b){return o.call(b),p(v,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=f(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 v=new Set(a.value);v.has(l.key)?v.delete(l.key):v.add(l.key),a.value=v};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=f(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=f(O,T,H,!1,null,null,null,null);const g=I.exports,N={__name:"WzLayout",props:{defaultCollapsed:{type:Boolean,default:!1}},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"},[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=f(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=f(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"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wize-admin-library",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
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",