wize-admin-library 0.1.24 → 0.1.26

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,13 +1,13 @@
1
1
  import { computed as w, ref as p, onMounted as C, onBeforeUnmount as g } from "vue";
2
- function f(n, e, t, a, s, l, o, d) {
3
- var r = typeof n == "function" ? n.options : n;
4
- e && (r.render = e, r.staticRenderFns = t, r._compiled = !0), a && (r.functional = !0), l && (r._scopeId = "data-v-" + l);
2
+ function f(l, e, t, a, s, n, o, u) {
3
+ var r = typeof l == "function" ? l.options : l;
4
+ e && (r.render = e, r.staticRenderFns = t, r._compiled = !0), a && (r.functional = !0), n && (r._scopeId = "data-v-" + n);
5
5
  var c;
6
6
  if (o ? (c = function(i) {
7
7
  i = i || // cached call
8
8
  this.$vnode && this.$vnode.ssrContext || // stateful
9
9
  this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !i && typeof __VUE_SSR_CONTEXT__ < "u" && (i = __VUE_SSR_CONTEXT__), s && s.call(this, i), i && i._registeredComponents && i._registeredComponents.add(o);
10
- }, r._ssrRegister = c) : s && (c = d ? function() {
10
+ }, r._ssrRegister = c) : s && (c = u ? function() {
11
11
  s.call(
12
12
  this,
13
13
  (r.functional ? this.parent : this).$root.$options.shadowRoot
@@ -20,11 +20,11 @@ function f(n, e, t, a, s, l, o, d) {
20
20
  return c.call(h), v(_, h);
21
21
  };
22
22
  } else {
23
- var u = r.beforeCreate;
24
- r.beforeCreate = u ? [].concat(u, c) : [c];
23
+ var d = r.beforeCreate;
24
+ r.beforeCreate = d ? [].concat(d, c) : [c];
25
25
  }
26
26
  return {
27
- exports: n,
27
+ exports: l,
28
28
  options: r
29
29
  };
30
30
  }
@@ -38,7 +38,7 @@ const y = {
38
38
  variant: {
39
39
  type: String,
40
40
  default: "primary",
41
- validator: (n) => ["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link", "outline"].includes(n)
41
+ validator: (l) => ["primary", "secondary", "success", "danger", "warning", "info", "light", "dark", "link", "outline"].includes(l)
42
42
  },
43
43
  /**
44
44
  * Size of the button.
@@ -47,7 +47,7 @@ const y = {
47
47
  size: {
48
48
  type: String,
49
49
  default: "md",
50
- validator: (n) => ["sm", "md", "lg"].includes(n)
50
+ validator: (l) => ["sm", "md", "lg"].includes(l)
51
51
  },
52
52
  /**
53
53
  * Whether the button is disabled.
@@ -65,15 +65,15 @@ const y = {
65
65
  }
66
66
  },
67
67
  emits: ["click"],
68
- setup(n, { emit: e }) {
69
- const t = n, a = w(() => [
68
+ setup(l, { emit: e }) {
69
+ const t = l, a = w(() => [
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: (l) => {
76
- t.disabled || e("click", l);
75
+ return { __sfc: !0, props: t, emit: e, classes: a, handleClick: (n) => {
76
+ t.disabled || e("click", n);
77
77
  } };
78
78
  }
79
79
  };
@@ -115,8 +115,8 @@ const S = k.exports, $ = {
115
115
  default: "light"
116
116
  }
117
117
  },
118
- setup(n) {
119
- const e = n, t = p(e.defaultCollapsed), a = () => {
118
+ setup(l) {
119
+ const e = l, t = p(e.defaultCollapsed), a = () => {
120
120
  t.value = !t.value;
121
121
  };
122
122
  return C(() => {
@@ -193,19 +193,19 @@ const W = P.exports, H = {
193
193
  }
194
194
  },
195
195
  emits: ["item-click"],
196
- setup(n, { emit: e }) {
197
- const t = n, a = p(/* @__PURE__ */ new Set()), s = p(!1), l = w(() => t.collapsed && !s.value), o = (i) => i.key === t.activeKey, d = (i) => i.children && i.children.length > 0, r = (i) => a.value.has(i.key), c = (i) => {
198
- if (!d(i) || l.value)
196
+ setup(l, { emit: e }) {
197
+ const t = l, a = p(/* @__PURE__ */ new Set()), s = p(!1), n = w(() => t.collapsed && !s.value), o = (i) => i.key === t.activeKey, u = (i) => i.children && i.children.length > 0, r = (i) => a.value.has(i.key), c = (i) => {
198
+ if (!u(i) || n.value)
199
199
  return;
200
200
  const _ = new Set(a.value);
201
201
  _.has(i.key) ? _.delete(i.key) : _.add(i.key), a.value = _;
202
202
  };
203
- return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: l, isActive: o, hasChildren: d, isOpen: r, toggle: c, handleClick: (i) => {
204
- if (l.value) {
203
+ return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: n, isActive: o, hasChildren: u, isOpen: r, toggle: c, handleClick: (i) => {
204
+ if (n.value) {
205
205
  e("item-click", i);
206
206
  return;
207
207
  }
208
- d(i) ? c(i) : e("item-click", i);
208
+ u(i) ? c(i) : e("item-click", i);
209
209
  }, handleChildClick: (i) => {
210
210
  e("item-click", i);
211
211
  } };
@@ -219,13 +219,13 @@ var L = function() {
219
219
  a.isHovered = !1;
220
220
  } } }, [t("div", { staticClass: "wz-sidebar-logo" }, [e._t("logo", function() {
221
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))])]];
222
- })], 2), t("nav", { staticClass: "wz-sidebar-nav" }, [e._l(e.items, function(s, l) {
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(o) {
222
+ })], 2), t("nav", { staticClass: "wz-sidebar-nav" }, [e._l(e.items, function(s, n) {
223
+ 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(o) {
224
224
  return a.handleClick(s);
225
225
  } } }, [t("span", { staticClass: "wz-sidebar-icon" }, [e._t("icon", function() {
226
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" } })];
227
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(o) {
228
- return t("div", { key: o.key, staticClass: "wz-sidebar-child-item", class: { "wz-sidebar-child-item--active": a.isActive(o) }, on: { click: function(d) {
228
+ return t("div", { key: o.key, staticClass: "wz-sidebar-child-item", class: { "wz-sidebar-child-item--active": a.isActive(o) }, on: { click: function(u) {
229
229
  return a.handleChildClick(o);
230
230
  } } }, [t("span", { staticClass: "wz-sidebar-label" }, [e._v(e._s(o.label))]), a.hasChildren(o) ? t("span", { staticClass: "wz-sidebar-arrow" }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1rem" } })]) : e._e()]);
231
231
  }), 0) : e._e()])])])];
@@ -301,19 +301,19 @@ const O = N.exports, T = {
301
301
  }
302
302
  },
303
303
  emits: ["menu-toggle", "search", "notifications", "settings", "user-click", "action-click", "user-menu-click"],
304
- setup(n, { emit: e }) {
305
- const t = n, a = (c) => c ? c.split(" ").map((v) => v[0]).slice(0, 2).join("").toUpperCase() : "?", s = p(!1), l = p(null), o = () => {
304
+ setup(l, { emit: e }) {
305
+ const t = l, a = (c) => c ? c.split(" ").map((v) => v[0]).slice(0, 2).join("").toUpperCase() : "?", s = p(!1), n = p(null), o = () => {
306
306
  s.value = !s.value, e("user-click");
307
- }, d = (c) => {
307
+ }, u = (c) => {
308
308
  e("user-menu-click", c), s.value = !1;
309
309
  }, r = (c) => {
310
- l.value && !l.value.contains(c.target) && (s.value = !1);
310
+ n.value && !n.value.contains(c.target) && (s.value = !1);
311
311
  };
312
312
  return C(() => {
313
313
  document.addEventListener("click", r);
314
314
  }), g(() => {
315
315
  document.removeEventListener("click", r);
316
- }), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: l, toggleUserMenu: o, handleUserItemClick: d, handleClickOutside: r };
316
+ }), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: n, toggleUserMenu: o, handleUserItemClick: u, handleClickOutside: r };
317
317
  }
318
318
  };
319
319
  var B = function() {
@@ -324,9 +324,9 @@ var B = function() {
324
324
  return e.$emit("menu-toggle");
325
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() {
326
326
  return [e.actionItems && e.actionItems.length ? [e._l(e.actionItems, function(s) {
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) {
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(n) {
328
328
  return a.emit("action-click", s);
329
- } } }, [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) {
329
+ } } }, [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) {
330
330
  return a.emit("action-click", s);
331
331
  } } }, [t("i", { class: s.icon, staticStyle: { "font-size": "1.125rem" } })])];
332
332
  })] : [t("button", { staticClass: "wz-header-action", attrs: { title: "Search" }, on: { click: function(s) {
@@ -338,25 +338,25 @@ var B = function() {
338
338
  return [t("div", { staticClass: "wz-header-user", on: { click: function(s) {
339
339
  return s.stopPropagation(), a.toggleUserMenu.apply(null, arguments);
340
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))])])];
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) {
342
- return t("div", { key: l, staticClass: "wz-header-dropdown-item", class: { "wz-header-dropdown-item--logout": s.isLogout }, on: { click: function(o) {
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, n) {
342
+ return t("div", { key: n, staticClass: "wz-header-dropdown-item", class: { "wz-header-dropdown-item--logout": s.isLogout }, on: { click: function(o) {
343
343
  return a.handleUserItemClick(s);
344
344
  } } }, [s.icon && !s.isLogout ? t("i", { class: s.icon }) : e._e(), t("span", [e._v(e._s(s.label))])]);
345
345
  }), 0)]) : e._e()], 2), t("button", { staticClass: "wz-header-action", attrs: { title: "Settings" }, on: { click: function(s) {
346
346
  return a.emit("settings");
347
347
  } } }, [t("i", { staticClass: "ri-settings-3-line wz-anim-spin", staticStyle: { "font-size": "1.125rem", display: "inline-block" } })])], 2)]);
348
348
  }, I = [function() {
349
- var n = this, e = n._self._c;
350
- return n._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Language" } }, [e("i", { staticClass: "ri-global-line", staticStyle: { "font-size": "1.125rem" } })]);
349
+ var l = this, e = l._self._c;
350
+ return l._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Language" } }, [e("i", { staticClass: "ri-global-line", staticStyle: { "font-size": "1.125rem" } })]);
351
351
  }, function() {
352
- var n = this, e = n._self._c;
353
- return n._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Toggle dark mode" } }, [e("i", { staticClass: "ri-moon-line", staticStyle: { "font-size": "1.125rem" } })]);
352
+ var l = this, e = l._self._c;
353
+ return l._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Toggle dark mode" } }, [e("i", { staticClass: "ri-moon-line", staticStyle: { "font-size": "1.125rem" } })]);
354
354
  }, function() {
355
- var n = this, e = n._self._c;
356
- return n._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Calendar" } }, [e("i", { staticClass: "ri-calendar-line", staticStyle: { "font-size": "1.125rem" } })]);
355
+ var l = this, e = l._self._c;
356
+ return l._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Calendar" } }, [e("i", { staticClass: "ri-calendar-line", staticStyle: { "font-size": "1.125rem" } })]);
357
357
  }, function() {
358
- var n = this, e = n._self._c;
359
- return n._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Fullscreen" } }, [e("i", { staticClass: "ri-fullscreen-line", staticStyle: { "font-size": "1.125rem" } })]);
358
+ var l = this, e = l._self._c;
359
+ return l._self._setupProxy, e("button", { staticClass: "wz-header-action", attrs: { title: "Fullscreen" } }, [e("i", { staticClass: "ri-fullscreen-line", staticStyle: { "font-size": "1.125rem" } })]);
360
360
  }], U = /* @__PURE__ */ f(
361
361
  T,
362
362
  B,
@@ -367,7 +367,7 @@ var B = function() {
367
367
  null,
368
368
  null
369
369
  );
370
- const A = U.exports, D = {
370
+ const D = U.exports, A = {
371
371
  __name: "WzSettingsPanel",
372
372
  props: {
373
373
  /**
@@ -400,8 +400,8 @@ const A = U.exports, D = {
400
400
  }
401
401
  },
402
402
  emits: ["close", "input", "setting-change"],
403
- setup(n, { emit: e }) {
404
- const t = n, a = [
403
+ setup(l, { emit: e }) {
404
+ const t = l, a = [
405
405
  {
406
406
  id: "themeMode",
407
407
  title: "Theme Color Mode:",
@@ -419,9 +419,9 @@ const A = U.exports, D = {
419
419
  ]
420
420
  }
421
421
  ], s = w(() => [...a, ...t.extraSettings]);
422
- return { __sfc: !0, props: t, emit: e, baseSettings: a, allSettings: s, handleSelection: (d, r) => {
423
- const c = { ...t.value, [d]: r };
424
- e("input", c), e("setting-change", { id: d, value: r });
422
+ return { __sfc: !0, props: t, emit: e, baseSettings: a, allSettings: s, handleSelection: (u, r) => {
423
+ const c = { ...t.value, [u]: r };
424
+ e("input", c), e("setting-change", { id: u, value: r });
425
425
  }, closePanel: () => {
426
426
  e("close");
427
427
  } };
@@ -430,17 +430,17 @@ const A = U.exports, D = {
430
430
  var F = function() {
431
431
  var e = this, t = e._self._c, a = e._self._setupProxy;
432
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) {
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) {
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(o) {
435
- return a.handleSelection(s.id, l.value);
436
- } } }), t("span", { staticClass: "wz-settings-radio-text" }, [e._v(e._s(l.label))])]);
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(n) {
434
+ 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(o) {
435
+ return a.handleSelection(s.id, n.value);
436
+ } } }), t("span", { staticClass: "wz-settings-radio-text" }, [e._v(e._s(n.label))])]);
437
437
  }), 0)])];
438
438
  })], 2)])]);
439
439
  }, K = [function() {
440
- var n = this, e = n._self._c;
441
- return n._self._setupProxy, e("div", { staticClass: "wz-settings-tabs" }, [e("div", { staticClass: "wz-settings-tab wz-settings-tab--active" }, [n._v("Theme Style")])]);
440
+ var l = this, e = l._self._c;
441
+ return l._self._setupProxy, e("div", { staticClass: "wz-settings-tabs" }, [e("div", { staticClass: "wz-settings-tab wz-settings-tab--active" }, [l._v("Theme Style")])]);
442
442
  }], E = /* @__PURE__ */ f(
443
- D,
443
+ A,
444
444
  F,
445
445
  K,
446
446
  !1,
@@ -462,53 +462,53 @@ const V = E.exports, j = {
462
462
  }
463
463
  },
464
464
  emits: ["item-click"],
465
- setup(n, { emit: e }) {
466
- const t = n, a = p(null), s = (u) => {
467
- a.value && a.value.scrollBy({ left: u * 250, behavior: "smooth" });
468
- }, l = p(null), o = p({}), d = (u) => {
469
- const _ = u.closest(".wz-horizontal-nav").getBoundingClientRect(), h = u.getBoundingClientRect();
465
+ setup(l, { emit: e }) {
466
+ const t = l, a = p(null), s = (d) => {
467
+ a.value && a.value.scrollBy({ left: d * 250, behavior: "smooth" });
468
+ }, n = p(null), o = p({}), u = (d) => {
469
+ const _ = d.closest(".wz-horizontal-nav").getBoundingClientRect(), h = d.getBoundingClientRect();
470
470
  o.value = {
471
471
  top: "100%",
472
472
  left: h.left - _.left + "px"
473
473
  };
474
- }, r = (u, i) => {
475
- if (!u.children || u.children.length === 0) {
476
- e("item-click", u), l.value = null;
474
+ }, r = (d, i) => {
475
+ if (!d.children || d.children.length === 0) {
476
+ e("item-click", d), n.value = null;
477
477
  return;
478
478
  }
479
- l.value === u.key ? l.value = null : (d(i.currentTarget), l.value = u.key);
480
- }, c = (u) => {
481
- e("item-click", u), l.value = null;
482
- }, v = (u) => {
483
- u.target.closest(".wz-horizontal-nav") || (l.value = null);
479
+ n.value === d.key ? n.value = null : (u(i.currentTarget), n.value = d.key);
480
+ }, c = (d) => {
481
+ e("item-click", d), n.value = null;
482
+ }, v = (d) => {
483
+ d.target.closest(".wz-horizontal-nav") || (n.value = null);
484
484
  };
485
485
  return C(() => {
486
486
  document.addEventListener("click", v);
487
487
  }), g(() => {
488
488
  document.removeEventListener("click", v);
489
- }), { __sfc: !0, props: t, emit: e, trackWrapper: a, scroll: s, openDropdown: l, dropdownStyle: o, positionDropdown: d, toggleDropdown: r, handleChildClick: c, handleDocClick: v };
489
+ }), { __sfc: !0, props: t, emit: e, trackWrapper: a, scroll: s, openDropdown: n, dropdownStyle: o, positionDropdown: u, toggleDropdown: r, handleChildClick: c, handleDocClick: v };
490
490
  }
491
491
  };
492
492
  var X = function() {
493
493
  var e = this, t = e._self._c, a = e._self._setupProxy;
494
494
  return t("div", { staticClass: "wz-horizontal-nav" }, [t("button", { staticClass: "wz-horizontal-nav-arrow", on: { click: function(s) {
495
495
  return s.stopPropagation(), a.scroll(-1);
496
- } } }, [t("i", { staticClass: "ri-arrow-left-s-line" })]), t("div", { ref: "trackWrapper", staticClass: "wz-horizontal-nav-track-wrapper" }, [t("div", { staticClass: "wz-horizontal-nav-track" }, [e._l(e.items, function(s, l) {
497
- return [s.type !== "group" ? t("div", { key: s.key || l, staticClass: "wz-horizontal-nav-item", class: {
496
+ } } }, [t("i", { staticClass: "ri-arrow-left-s-line" })]), t("div", { ref: "trackWrapper", staticClass: "wz-horizontal-nav-track-wrapper" }, [t("div", { staticClass: "wz-horizontal-nav-track" }, [e._l(e.items, function(s, n) {
497
+ return [s.type !== "group" ? t("div", { key: s.key || n, staticClass: "wz-horizontal-nav-item", class: {
498
498
  "wz-horizontal-nav-item--active": s.key === e.activeKey || s.children && s.children.some((o) => o.key === e.activeKey),
499
499
  "wz-horizontal-nav-item--open": a.openDropdown === s.key
500
500
  }, on: { click: function(o) {
501
501
  return o.stopPropagation(), a.toggleDropdown(s, o);
502
- } } }, [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 wz-horizontal-nav-chevron" }) : e._e()]) : e._e()];
502
+ } } }, [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: "wz-horizontal-nav-chevron", class: a.openDropdown === s.key ? "ri-arrow-down-s-line" : "ri-arrow-right-s-line" }) : e._e()]) : e._e()];
503
503
  })], 2)]), t("button", { staticClass: "wz-horizontal-nav-arrow", on: { click: function(s) {
504
504
  return s.stopPropagation(), a.scroll(1);
505
505
  } } }, [t("i", { staticClass: "ri-arrow-right-s-line" })]), a.openDropdown ? t("div", { staticClass: "wz-horizontal-nav-dropdown", style: a.dropdownStyle, on: { click: function(s) {
506
506
  s.stopPropagation();
507
507
  } } }, [e._l(e.items, function(s) {
508
- return [s.key === a.openDropdown && s.children ? e._l(s.children, function(l) {
509
- return t("div", { key: l.key, staticClass: "wz-horizontal-dropdown-child", class: { "wz-horizontal-dropdown-child--active": l.key === e.activeKey }, on: { click: function(o) {
510
- return o.stopPropagation(), a.handleChildClick(l);
511
- } } }, [e._v(" " + e._s(l.label) + " ")]);
508
+ return [s.key === a.openDropdown && s.children ? e._l(s.children, function(n) {
509
+ return t("div", { key: n.key, staticClass: "wz-horizontal-dropdown-child", class: { "wz-horizontal-dropdown-child--active": n.key === e.activeKey }, on: { click: function(o) {
510
+ return o.stopPropagation(), a.handleChildClick(n);
511
+ } } }, [t("span", [e._v(e._s(n.label))]), n.children && n.children.length > 0 ? t("i", { staticClass: "ri-arrow-right-s-line wz-horizontal-dropdown-child-arrow" }) : e._e()]);
512
512
  }) : e._e()];
513
513
  })], 2) : e._e()]);
514
514
  }, q = [], G = /* @__PURE__ */ f(
@@ -524,20 +524,20 @@ var X = function() {
524
524
  const J = G.exports, Q = {
525
525
  WzButton: S,
526
526
  WzSidebar: O,
527
- WzHeader: A,
527
+ WzHeader: D,
528
528
  WzLayout: W,
529
529
  WzSettingsPanel: V,
530
530
  WzHorizontalNav: J
531
- }, z = (n) => {
531
+ }, z = (l) => {
532
532
  Object.entries(Q).forEach(([e, t]) => {
533
- n.component(e, t);
533
+ l.component(e, t);
534
534
  });
535
535
  };
536
536
  typeof window < "u" && window.Vue && z(window.Vue);
537
537
  const Z = { install: z };
538
538
  export {
539
539
  S as WzButton,
540
- A as WzHeader,
540
+ D as WzHeader,
541
541
  J as WzHorizontalNav,
542
542
  W as WzLayout,
543
543
  V as WzSettingsPanel,
@@ -1 +1 @@
1
- (function(_,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(_=typeof globalThis<"u"?globalThis:_||self,d(_.WizeAdminLibrary={},_.Vue))})(this,function(_,d){"use strict";const Q="";function h(n,e,t,a,s,i,o,v){var r=typeof n=="function"?n.options:n;e&&(r.render=e,r.staticRenderFns=t,r._compiled=!0),a&&(r.functional=!0),i&&(r._scopeId="data-v-"+i);var c;if(o?(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(o)},r._ssrRegister=c):s&&(c=v?function(){s.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:s),c)if(r.functional){r._injectStyles=c;var p=r.render;r.render=function(f,w){return c.call(w),p(f,w)}}else{var u=r.beforeCreate;r.beforeCreate=u?[].concat(u,c):[c]}return{exports:n,options:r}}const S={__name:"WzButton",props:{variant:{type:String,default:"primary",validator:n=>["primary","secondary","success","danger","warning","info","light","dark","link","outline"].includes(n)},size:{type:String,default:"md",validator:n=>["sm","md","lg"].includes(n)},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,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:i=>{t.disabled||e("click",i)}}}};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=h(S,$,M,!1,null,null,null,null);const C=P.exports,W={__name:"WzLayout",props:{defaultCollapsed:{type:Boolean,default:!1},navigationStyle:{type:String,default:"vertical"},theme:{type:String,default:"light"}},setup(n){const e=n,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 x=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=[],L=h(W,x,H,!1,null,null,null,null);const g=L.exports,T={__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(n,{emit:e}){const t=n,a=d.ref(new Set),s=d.ref(!1),i=d.computed(()=>t.collapsed&&!s.value),o=l=>l.key===t.activeKey,v=l=>l.children&&l.children.length>0,r=l=>a.value.has(l.key),c=l=>{if(!v(l)||i.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:i,isActive:o,hasChildren:v,isOpen:r,toggle:c,handleClick:l=>{if(i.value){e("item-click",l);return}v(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,i){return[s.type==="group"?t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],key:`group-${i}`,staticClass:"wz-sidebar-group"},[e._v(" "+e._s(s.label)+" ")]):t("div",{key:s.key||i,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(o){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(o){return t("div",{key:o.key,staticClass:"wz-sidebar-child-item",class:{"wz-sidebar-child-item--active":a.isActive(o)},on:{click:function(v){return a.handleChildClick(o)}}},[t("span",{staticClass:"wz-sidebar-label"},[e._v(e._s(o.label))]),a.hasChildren(o)?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=[],R=h(T,N,O,!1,null,null,null,null);const z=R.exports,B={__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(n,{emit:e}){const t=n,a=c=>c?c.split(" ").map(p=>p[0]).slice(0,2).join("").toUpperCase():"?",s=d.ref(!1),i=d.ref(null),o=()=>{s.value=!s.value,e("user-click")},v=c=>{e("user-menu-click",c),s.value=!1},r=c=>{i.value&&!i.value.contains(c.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:i,toggleUserMenu:o,handleUserItemClick:v,handleClickOutside:r}}};var U=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(i){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(i){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,i){return t("div",{key:i,staticClass:"wz-header-dropdown-item",class:{"wz-header-dropdown-item--logout":s.isLogout},on:{click:function(o){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)])},I=[function(){var n=this,e=n._self._c;return n._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Language"}},[e("i",{staticClass:"ri-global-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var n=this,e=n._self._c;return n._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 n=this,e=n._self._c;return n._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Calendar"}},[e("i",{staticClass:"ri-calendar-line",staticStyle:{"font-size":"1.125rem"}})])},function(){var n=this,e=n._self._c;return n._self._setupProxy,e("button",{staticClass:"wz-header-action",attrs:{title:"Fullscreen"}},[e("i",{staticClass:"ri-fullscreen-line",staticStyle:{"font-size":"1.125rem"}})])}],A=h(B,U,I,!1,null,null,null,null);const y=A.exports,D={__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(n,{emit:e}){const t=n,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:(v,r)=>{const c={...t.value,[v]:r};e("input",c),e("setting-change",{id:v,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(i){return t("label",{key:i.value,staticClass:"wz-settings-radio-label"},[t("div",{staticClass:"wz-settings-radio-circle",class:{"wz-settings-radio-circle--active":e.value[s.id]===i.value}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.value[s.id]===i.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:i.value,checked:e.value[s.id]===i.value},on:{change:function(o){return a.handleSelection(s.id,i.value)}}}),t("span",{staticClass:"wz-settings-radio-text"},[e._v(e._s(i.label))])])}),0)])]})],2)])])},K=[function(){var n=this,e=n._self._c;return n._self._setupProxy,e("div",{staticClass:"wz-settings-tabs"},[e("div",{staticClass:"wz-settings-tab wz-settings-tab--active"},[n._v("Theme Style")])])}],E=h(D,F,K,!1,null,null,null,null);const m=E.exports,V={__name:"WzHorizontalNav",props:{items:{type:Array,default:()=>[]},activeKey:{type:String,default:null}},emits:["item-click"],setup(n,{emit:e}){const t=n,a=d.ref(null),s=u=>{a.value&&a.value.scrollBy({left:u*250,behavior:"smooth"})},i=d.ref(null),o=d.ref({}),v=u=>{const f=u.closest(".wz-horizontal-nav").getBoundingClientRect(),w=u.getBoundingClientRect();o.value={top:"100%",left:w.left-f.left+"px"}},r=(u,l)=>{if(!u.children||u.children.length===0){e("item-click",u),i.value=null;return}i.value===u.key?i.value=null:(v(l.currentTarget),i.value=u.key)},c=u=>{e("item-click",u),i.value=null},p=u=>{u.target.closest(".wz-horizontal-nav")||(i.value=null)};return d.onMounted(()=>{document.addEventListener("click",p)}),d.onBeforeUnmount(()=>{document.removeEventListener("click",p)}),{__sfc:!0,props:t,emit:e,trackWrapper:a,scroll:s,openDropdown:i,dropdownStyle:o,positionDropdown:v,toggleDropdown:r,handleChildClick:c,handleDocClick:p}}};var j=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",on:{click:function(s){return s.stopPropagation(),a.scroll(-1)}}},[t("i",{staticClass:"ri-arrow-left-s-line"})]),t("div",{ref:"trackWrapper",staticClass:"wz-horizontal-nav-track-wrapper"},[t("div",{staticClass:"wz-horizontal-nav-track"},[e._l(e.items,function(s,i){return[s.type!=="group"?t("div",{key:s.key||i,staticClass:"wz-horizontal-nav-item",class:{"wz-horizontal-nav-item--active":s.key===e.activeKey||s.children&&s.children.some(o=>o.key===e.activeKey),"wz-horizontal-nav-item--open":a.openDropdown===s.key},on:{click:function(o){return o.stopPropagation(),a.toggleDropdown(s,o)}}},[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 wz-horizontal-nav-chevron"}):e._e()]):e._e()]})],2)]),t("button",{staticClass:"wz-horizontal-nav-arrow",on:{click:function(s){return s.stopPropagation(),a.scroll(1)}}},[t("i",{staticClass:"ri-arrow-right-s-line"})]),a.openDropdown?t("div",{staticClass:"wz-horizontal-nav-dropdown",style:a.dropdownStyle,on:{click:function(s){s.stopPropagation()}}},[e._l(e.items,function(s){return[s.key===a.openDropdown&&s.children?e._l(s.children,function(i){return t("div",{key:i.key,staticClass:"wz-horizontal-dropdown-child",class:{"wz-horizontal-dropdown-child--active":i.key===e.activeKey},on:{click:function(o){return o.stopPropagation(),a.handleChildClick(i)}}},[e._v(" "+e._s(i.label)+" ")])}):e._e()]})],2):e._e()])},X=[],q=h(V,j,X,!1,null,null,null,null);const b=q.exports,G={WzButton:C,WzSidebar:z,WzHeader:y,WzLayout:g,WzSettingsPanel:m,WzHorizontalNav:b},k=n=>{Object.entries(G).forEach(([e,t])=>{n.component(e,t)})};typeof window<"u"&&window.Vue&&k(window.Vue);const J={install:k};_.WzButton=C,_.WzHeader=y,_.WzHorizontalNav=b,_.WzLayout=g,_.WzSettingsPanel=m,_.WzSidebar=z,_.default=J,Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(_,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(_=typeof globalThis<"u"?globalThis:_||self,d(_.WizeAdminLibrary={},_.Vue))})(this,function(_,d){"use strict";const Q="";function h(i,e,t,a,s,n,o,v){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 c;if(o?(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(o)},r._ssrRegister=c):s&&(c=v?function(){s.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:s),c)if(r.functional){r._injectStyles=c;var p=r.render;r.render=function(f,w){return c.call(w),p(f,w)}}else{var u=r.beforeCreate;r.beforeCreate=u?[].concat(u,c):[c]}return{exports:i,options:r}}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=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 $=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=h(S,$,M,!1,null,null,null,null);const g=P.exports,W={__name:"WzLayout",props:{defaultCollapsed:{type:Boolean,default:!1},navigationStyle:{type:String,default:"vertical"},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 x=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=[],L=h(W,x,H,!1,null,null,null,null);const C=L.exports,T={__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),o=l=>l.key===t.activeKey,v=l=>l.children&&l.children.length>0,r=l=>a.value.has(l.key),c=l=>{if(!v(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:o,hasChildren:v,isOpen:r,toggle:c,handleClick:l=>{if(n.value){e("item-click",l);return}v(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(o){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(o){return t("div",{key:o.key,staticClass:"wz-sidebar-child-item",class:{"wz-sidebar-child-item--active":a.isActive(o)},on:{click:function(v){return a.handleChildClick(o)}}},[t("span",{staticClass:"wz-sidebar-label"},[e._v(e._s(o.label))]),a.hasChildren(o)?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=[],R=h(T,N,O,!1,null,null,null,null);const z=R.exports,B={__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=d.ref(!1),n=d.ref(null),o=()=>{s.value=!s.value,e("user-click")},v=c=>{e("user-menu-click",c),s.value=!1},r=c=>{n.value&&!n.value.contains(c.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:o,handleUserItemClick:v,handleClickOutside:r}}};var U=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(o){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)])},I=[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=h(B,U,I,!1,null,null,null,null);const y=A.exports,D={__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:(v,r)=>{const c={...t.value,[v]:r};e("input",c),e("setting-change",{id:v,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(o){return a.handleSelection(s.id,n.value)}}}),t("span",{staticClass:"wz-settings-radio-text"},[e._v(e._s(n.label))])])}),0)])]})],2)])])},K=[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")])])}],E=h(D,F,K,!1,null,null,null,null);const m=E.exports,V={__name:"WzHorizontalNav",props:{items:{type:Array,default:()=>[]},activeKey:{type:String,default:null}},emits:["item-click"],setup(i,{emit:e}){const t=i,a=d.ref(null),s=u=>{a.value&&a.value.scrollBy({left:u*250,behavior:"smooth"})},n=d.ref(null),o=d.ref({}),v=u=>{const f=u.closest(".wz-horizontal-nav").getBoundingClientRect(),w=u.getBoundingClientRect();o.value={top:"100%",left:w.left-f.left+"px"}},r=(u,l)=>{if(!u.children||u.children.length===0){e("item-click",u),n.value=null;return}n.value===u.key?n.value=null:(v(l.currentTarget),n.value=u.key)},c=u=>{e("item-click",u),n.value=null},p=u=>{u.target.closest(".wz-horizontal-nav")||(n.value=null)};return d.onMounted(()=>{document.addEventListener("click",p)}),d.onBeforeUnmount(()=>{document.removeEventListener("click",p)}),{__sfc:!0,props:t,emit:e,trackWrapper:a,scroll:s,openDropdown:n,dropdownStyle:o,positionDropdown:v,toggleDropdown:r,handleChildClick:c,handleDocClick:p}}};var j=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",on:{click:function(s){return s.stopPropagation(),a.scroll(-1)}}},[t("i",{staticClass:"ri-arrow-left-s-line"})]),t("div",{ref:"trackWrapper",staticClass:"wz-horizontal-nav-track-wrapper"},[t("div",{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(o=>o.key===e.activeKey),"wz-horizontal-nav-item--open":a.openDropdown===s.key},on:{click:function(o){return o.stopPropagation(),a.toggleDropdown(s,o)}}},[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:"wz-horizontal-nav-chevron",class:a.openDropdown===s.key?"ri-arrow-down-s-line":"ri-arrow-right-s-line"}):e._e()]):e._e()]})],2)]),t("button",{staticClass:"wz-horizontal-nav-arrow",on:{click:function(s){return s.stopPropagation(),a.scroll(1)}}},[t("i",{staticClass:"ri-arrow-right-s-line"})]),a.openDropdown?t("div",{staticClass:"wz-horizontal-nav-dropdown",style:a.dropdownStyle,on:{click:function(s){s.stopPropagation()}}},[e._l(e.items,function(s){return[s.key===a.openDropdown&&s.children?e._l(s.children,function(n){return t("div",{key:n.key,staticClass:"wz-horizontal-dropdown-child",class:{"wz-horizontal-dropdown-child--active":n.key===e.activeKey},on:{click:function(o){return o.stopPropagation(),a.handleChildClick(n)}}},[t("span",[e._v(e._s(n.label))]),n.children&&n.children.length>0?t("i",{staticClass:"ri-arrow-right-s-line wz-horizontal-dropdown-child-arrow"}):e._e()])}):e._e()]})],2):e._e()])},X=[],q=h(V,j,X,!1,null,null,null,null);const b=q.exports,G={WzButton:g,WzSidebar:z,WzHeader:y,WzLayout:C,WzSettingsPanel:m,WzHorizontalNav:b},k=i=>{Object.entries(G).forEach(([e,t])=>{i.component(e,t)})};typeof window<"u"&&window.Vue&&k(window.Vue);const J={install:k};_.WzButton=g,_.WzHeader=y,_.WzHorizontalNav=b,_.WzLayout=C,_.WzSettingsPanel=m,_.WzSidebar=z,_.default=J,Object.defineProperties(_,{__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.24",
3
+ "version": "0.1.26",
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",