wize-admin-library 0.1.22 → 0.1.23

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 C, ref as _, onMounted as g, onBeforeUnmount as y } from "vue";
2
- function h(n, e, t, a, s, l, r, u) {
3
- var o = typeof n == "function" ? n.options : n;
4
- e && (o.render = e, o.staticRenderFns = t, o._compiled = !0), a && (o.functional = !0), l && (o._scopeId = "data-v-" + l);
1
+ import { computed as h, ref as _, onMounted as w, 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);
5
5
  var c;
6
- if (r ? (c = function(i) {
6
+ if (o ? (c = function(i) {
7
7
  i = i || // cached call
8
8
  this.$vnode && this.$vnode.ssrContext || // stateful
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(r);
10
- }, o._ssrRegister = c) : s && (c = u ? function() {
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() {
11
11
  s.call(
12
12
  this,
13
- (o.functional ? this.parent : this).$root.$options.shadowRoot
13
+ (r.functional ? this.parent : this).$root.$options.shadowRoot
14
14
  );
15
15
  } : s), c)
16
- if (o.functional) {
17
- o._injectStyles = c;
18
- var p = o.render;
19
- o.render = function(v, f) {
20
- return c.call(f), p(v, f);
16
+ if (r.functional) {
17
+ r._injectStyles = c;
18
+ var v = r.render;
19
+ r.render = function(p, C) {
20
+ return c.call(C), v(p, C);
21
21
  };
22
22
  } else {
23
- var w = o.beforeCreate;
24
- o.beforeCreate = w ? [].concat(w, c) : [c];
23
+ var u = r.beforeCreate;
24
+ r.beforeCreate = u ? [].concat(u, c) : [c];
25
25
  }
26
26
  return {
27
27
  exports: n,
28
- options: o
28
+ options: r
29
29
  };
30
30
  }
31
- const k = {
31
+ const y = {
32
32
  __name: "WzButton",
33
33
  props: {
34
34
  /**
@@ -66,7 +66,7 @@ const k = {
66
66
  },
67
67
  emits: ["click"],
68
68
  setup(n, { emit: e }) {
69
- const t = n, a = C(() => [
69
+ const t = n, a = h(() => [
70
70
  "wz-btn",
71
71
  `wz-btn-${t.variant}`,
72
72
  `wz-btn-${t.size}`,
@@ -77,20 +77,20 @@ const k = {
77
77
  } };
78
78
  }
79
79
  };
80
- var S = function() {
80
+ var m = function() {
81
81
  var e = this, t = e._self._c, a = e._self._setupProxy;
82
82
  return t("button", { class: a.classes, attrs: { disabled: e.disabled }, on: { click: a.handleClick } }, [e._t("default")], 2);
83
- }, $ = [], x = /* @__PURE__ */ h(
84
- k,
85
- S,
86
- $,
83
+ }, b = [], k = /* @__PURE__ */ f(
84
+ y,
85
+ m,
86
+ b,
87
87
  !1,
88
88
  null,
89
89
  null,
90
90
  null,
91
91
  null
92
92
  );
93
- const M = x.exports, P = {
93
+ const S = k.exports, $ = {
94
94
  __name: "WzLayout",
95
95
  props: {
96
96
  /**
@@ -119,25 +119,25 @@ const M = x.exports, P = {
119
119
  const e = n, t = _(e.defaultCollapsed), a = () => {
120
120
  t.value = !t.value;
121
121
  };
122
- return g(() => {
122
+ return w(() => {
123
123
  typeof window < "u" && window.innerWidth <= 768 && (t.value = !0);
124
124
  }), { __sfc: !0, props: e, isCollapsed: t, toggleSidebar: a };
125
125
  }
126
126
  };
127
- var H = function() {
127
+ var x = function() {
128
128
  var e = this, t = e._self._c, a = e._self._setupProxy;
129
129
  return t("div", { staticClass: "wz-admin-layout", class: "is-" + e.navigationStyle, attrs: { "data-theme": e.theme } }, [t("div", { staticClass: "wz-admin-layout-sidebar-container" }, [a.isCollapsed ? e._e() : t("div", { staticClass: "wz-admin-layout-backdrop", on: { click: a.toggleSidebar } }), e._t("sidebar", null, { collapsed: a.isCollapsed })], 2), t("div", { staticClass: "wz-admin-layout-main" }, [t("div", { staticClass: "wz-admin-layout-header-container" }, [e._t("header", null, { toggleSidebar: a.toggleSidebar, collapsed: a.isCollapsed })], 2), e.navigationStyle === "horizontal" ? t("div", { staticClass: "wz-admin-layout-horizontal-nav-container" }, [e._t("horizontal-nav")], 2) : e._e(), t("main", { staticClass: "wz-admin-layout-content" }, [e._t("default")], 2)])]);
130
- }, T = [], O = /* @__PURE__ */ h(
131
- P,
132
- H,
133
- T,
130
+ }, M = [], P = /* @__PURE__ */ f(
131
+ $,
132
+ x,
133
+ M,
134
134
  !1,
135
135
  null,
136
136
  null,
137
137
  null,
138
138
  null
139
139
  );
140
- const W = O.exports, L = {
140
+ const W = P.exports, H = {
141
141
  __name: "WzSidebar",
142
142
  props: {
143
143
  /**
@@ -194,24 +194,24 @@ const W = O.exports, L = {
194
194
  },
195
195
  emits: ["item-click"],
196
196
  setup(n, { emit: e }) {
197
- const t = n, a = _(/* @__PURE__ */ new Set()), s = _(!1), l = C(() => t.collapsed && !s.value), r = (i) => i.key === t.activeKey, u = (i) => i.children && i.children.length > 0, o = (i) => a.value.has(i.key), c = (i) => {
198
- if (!u(i) || l.value)
197
+ const t = n, a = _(/* @__PURE__ */ new Set()), s = _(!1), l = h(() => 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)
199
199
  return;
200
- const v = new Set(a.value);
201
- v.has(i.key) ? v.delete(i.key) : v.add(i.key), a.value = v;
200
+ const p = new Set(a.value);
201
+ p.has(i.key) ? p.delete(i.key) : p.add(i.key), a.value = p;
202
202
  };
203
- return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: l, isActive: r, hasChildren: u, isOpen: o, toggle: c, handleClick: (i) => {
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
204
  if (l.value) {
205
205
  e("item-click", i);
206
206
  return;
207
207
  }
208
- u(i) ? c(i) : e("item-click", i);
208
+ d(i) ? c(i) : e("item-click", i);
209
209
  }, handleChildClick: (i) => {
210
210
  e("item-click", i);
211
211
  } };
212
212
  }
213
213
  };
214
- var N = function() {
214
+ var L = function() {
215
215
  var e = this, t = e._self._c, a = e._self._setupProxy;
216
216
  return t("aside", { staticClass: "wz-sidebar", class: { "wz-sidebar--collapsed": a.visuallyCollapsed }, on: { mouseenter: function(s) {
217
217
  a.isHovered = !0;
@@ -220,27 +220,27 @@ var N = function() {
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
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(r) {
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) {
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
- }, { item: s })], 2), t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-label" }, [e._v(e._s(s.label))]), a.hasChildren(s) ? t("span", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-arrow", class: { "wz-sidebar-arrow--open": a.isOpen(s) } }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1.125rem" } })]) : e._e()]), t("div", { directives: [{ name: "show", rawName: "v-show", value: !a.visuallyCollapsed, expression: "!visuallyCollapsed" }], staticClass: "wz-sidebar-children-wrapper", class: { "is-open": a.hasChildren(s) && a.isOpen(s) } }, [t("div", { staticClass: "wz-sidebar-children-inner" }, [a.hasChildren(s) ? t("div", { staticClass: "wz-sidebar-children" }, e._l(s.children, function(r) {
228
- return t("div", { key: r.key, staticClass: "wz-sidebar-child-item", class: { "wz-sidebar-child-item--active": a.isActive(r) }, on: { click: function(u) {
229
- return a.handleChildClick(r);
230
- } } }, [t("span", { staticClass: "wz-sidebar-label" }, [e._v(e._s(r.label))]), a.hasChildren(r) ? t("span", { staticClass: "wz-sidebar-arrow" }, [t("i", { staticClass: "ri-arrow-right-s-line", staticStyle: { "font-size": "1rem" } })]) : e._e()]);
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) {
229
+ return a.handleChildClick(o);
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()])])])];
232
232
  })], 2)]);
233
- }, I = [], R = /* @__PURE__ */ h(
233
+ }, N = [], O = /* @__PURE__ */ f(
234
+ H,
234
235
  L,
235
236
  N,
236
- I,
237
237
  !1,
238
238
  null,
239
239
  null,
240
240
  null,
241
241
  null
242
242
  );
243
- const U = R.exports, B = {
243
+ const T = O.exports, I = {
244
244
  __name: "WzHeader",
245
245
  props: {
246
246
  /**
@@ -302,21 +302,21 @@ const U = R.exports, B = {
302
302
  },
303
303
  emits: ["menu-toggle", "search", "notifications", "settings", "user-click", "action-click", "user-menu-click"],
304
304
  setup(n, { emit: e }) {
305
- const t = n, a = (c) => c ? c.split(" ").map((p) => p[0]).slice(0, 2).join("").toUpperCase() : "?", s = _(!1), l = _(null), r = () => {
305
+ const t = n, a = (c) => c ? c.split(" ").map((v) => v[0]).slice(0, 2).join("").toUpperCase() : "?", s = _(!1), l = _(null), o = () => {
306
306
  s.value = !s.value, e("user-click");
307
- }, u = (c) => {
307
+ }, d = (c) => {
308
308
  e("user-menu-click", c), s.value = !1;
309
- }, o = (c) => {
309
+ }, r = (c) => {
310
310
  l.value && !l.value.contains(c.target) && (s.value = !1);
311
311
  };
312
- return g(() => {
313
- document.addEventListener("click", o);
314
- }), y(() => {
315
- document.removeEventListener("click", o);
316
- }), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: l, toggleUserMenu: r, handleUserItemClick: u, handleClickOutside: o };
312
+ return w(() => {
313
+ document.addEventListener("click", r);
314
+ }), g(() => {
315
+ document.removeEventListener("click", r);
316
+ }), { __sfc: !0, props: t, emit: e, initials: a, isUserMenuOpen: s, userMenuContainer: l, toggleUserMenu: o, handleUserItemClick: d, handleClickOutside: r };
317
317
  }
318
318
  };
319
- var A = function() {
319
+ var R = function() {
320
320
  var e = this, t = e._self._c, a = e._self._setupProxy;
321
321
  return t("header", { staticClass: "wz-header", class: { "wz-header--horizontal": e.layoutMode === "horizontal" } }, [t("div", { staticClass: "wz-header-left" }, [e.layoutMode === "vertical" ? t("button", { staticClass: "wz-header-action wz-header-icon-desktop", attrs: { title: "Toggle Menu" }, on: { click: function(s) {
322
322
  return e.$emit("menu-toggle");
@@ -339,13 +339,13 @@ var A = function() {
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
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(r) {
342
+ return t("div", { key: l, 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
- }, D = [function() {
348
+ }, U = [function() {
349
349
  var n = this, e = n._self._c;
350
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" } })]);
351
351
  }, function() {
@@ -357,17 +357,17 @@ var A = function() {
357
357
  }, function() {
358
358
  var n = this, e = n._self._c;
359
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" } })]);
360
- }], F = /* @__PURE__ */ h(
361
- B,
362
- A,
363
- D,
360
+ }], B = /* @__PURE__ */ f(
361
+ I,
362
+ R,
363
+ U,
364
364
  !1,
365
365
  null,
366
366
  null,
367
367
  null,
368
368
  null
369
369
  );
370
- const K = F.exports, E = {
370
+ const A = B.exports, D = {
371
371
  __name: "WzSettingsPanel",
372
372
  props: {
373
373
  /**
@@ -418,38 +418,38 @@ const K = F.exports, E = {
418
418
  { value: "horizontal", label: "Horizontal" }
419
419
  ]
420
420
  }
421
- ], s = C(() => [...a, ...t.extraSettings]);
422
- return { __sfc: !0, props: t, emit: e, baseSettings: a, allSettings: s, handleSelection: (u, o) => {
423
- const c = { ...t.value, [u]: o };
424
- e("input", c), e("setting-change", { id: u, value: o });
421
+ ], s = h(() => [...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 });
425
425
  }, closePanel: () => {
426
426
  e("close");
427
427
  } };
428
428
  }
429
429
  };
430
- var V = function() {
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
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(r) {
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
435
  return a.handleSelection(s.id, l.value);
436
436
  } } }), t("span", { staticClass: "wz-settings-radio-text" }, [e._v(e._s(l.label))])]);
437
437
  }), 0)])];
438
438
  })], 2)])]);
439
- }, j = [function() {
439
+ }, K = [function() {
440
440
  var n = this, e = n._self._c;
441
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")])]);
442
- }], X = /* @__PURE__ */ h(
443
- E,
444
- V,
445
- j,
442
+ }], E = /* @__PURE__ */ f(
443
+ D,
444
+ F,
445
+ K,
446
446
  !1,
447
447
  null,
448
448
  null,
449
449
  null,
450
450
  null
451
451
  );
452
- const q = X.exports, G = {
452
+ const V = E.exports, j = {
453
453
  __name: "WzHorizontalNav",
454
454
  props: {
455
455
  items: {
@@ -463,90 +463,84 @@ const q = X.exports, G = {
463
463
  },
464
464
  emits: ["item-click"],
465
465
  setup(n, { emit: e }) {
466
- const t = n, a = _(null), s = (d) => {
467
- a.value && a.value.scrollBy({ left: d * 250, behavior: "smooth" });
468
- }, l = _(null), r = _({});
469
- let u = null;
470
- const o = () => {
471
- u && (clearTimeout(u), u = null);
472
- }, c = (d, b) => {
473
- if (!d.children || d.children.length === 0)
466
+ const t = n, a = _(null), s = (u) => {
467
+ a.value && a.value.scrollBy({ left: u * 250, behavior: "smooth" });
468
+ }, l = _(null), o = _({}), d = (u) => {
469
+ const i = u.getBoundingClientRect();
470
+ o.value = {
471
+ top: i.bottom + 2 + "px",
472
+ left: i.left + "px"
473
+ };
474
+ }, r = (u, i) => {
475
+ if (!u.children || u.children.length === 0) {
476
+ e("item-click", u), l.value = null;
474
477
  return;
475
- o();
476
- const z = b.currentTarget.getBoundingClientRect();
477
- r.value = {
478
- top: z.bottom + "px",
479
- left: z.left + "px"
480
- }, l.value = d.key;
481
- }, p = () => {
482
- o(), u = setTimeout(() => {
483
- l.value = null;
484
- }, 150);
485
- }, w = () => {
486
- o();
487
- }, i = (d) => {
488
- d.children && d.children.length > 0 || e("item-click", d);
489
- }, v = (d) => {
490
- e("item-click", d), l.value = null;
491
- }, f = () => {
492
- l.value = null;
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);
493
484
  };
494
- return g(() => {
495
- document.addEventListener("click", f);
496
- }), y(() => {
497
- document.removeEventListener("click", f), o();
498
- }), { __sfc: !0, props: t, emit: e, trackWrapper: a, scroll: s, openDropdown: l, dropdownStyle: r, hideTimer: u, clearHideTimer: o, showDropdown: c, scheduleHide: p, keepDropdownOpen: w, handleClick: i, handleChildClick: v, handleDocClick: f };
485
+ return w(() => {
486
+ document.addEventListener("click", v);
487
+ }), g(() => {
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 };
499
490
  }
500
491
  };
501
- var J = function() {
492
+ var X = function() {
502
493
  var e = this, t = e._self._c, a = e._self._setupProxy;
503
494
  return t("div", { staticClass: "wz-horizontal-nav" }, [t("button", { staticClass: "wz-horizontal-nav-arrow", on: { click: function(s) {
504
- return a.scroll(-1);
495
+ return s.stopPropagation(), a.scroll(-1);
505
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) {
506
- return [s.type !== "group" ? t("div", { key: s.key || l, staticClass: "wz-horizontal-nav-item", class: { "wz-horizontal-nav-item--active": s.key === e.activeKey || s.children && s.children.some((r) => r.key === e.activeKey) }, on: { click: function(r) {
507
- return r.stopPropagation(), a.handleClick(s);
508
- }, mouseenter: function(r) {
509
- return a.showDropdown(s, r);
510
- }, mouseleave: a.scheduleHide } }, [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()];
497
+ return [s.type !== "group" ? t("div", { key: s.key || l, staticClass: "wz-horizontal-nav-item", class: {
498
+ "wz-horizontal-nav-item--active": s.key === e.activeKey || s.children && s.children.some((o) => o.key === e.activeKey),
499
+ "wz-horizontal-nav-item--open": a.openDropdown === s.key
500
+ }, on: { click: function(o) {
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()];
511
503
  })], 2)]), t("button", { staticClass: "wz-horizontal-nav-arrow", on: { click: function(s) {
512
- return a.scroll(1);
513
- } } }, [t("i", { staticClass: "ri-arrow-right-s-line" })]), a.openDropdown ? t("div", { staticClass: "wz-horizontal-nav-dropdown", style: a.dropdownStyle, on: { mouseenter: a.keepDropdownOpen, mouseleave: a.scheduleHide } }, [e._l(e.items, function(s) {
504
+ return s.stopPropagation(), a.scroll(1);
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
+ s.stopPropagation();
507
+ } } }, [e._l(e.items, function(s) {
514
508
  return [s.key === a.openDropdown && s.children ? e._l(s.children, function(l) {
515
- return t("div", { key: l.key, staticClass: "wz-horizontal-dropdown-child", class: { "wz-horizontal-dropdown-child--active": l.key === e.activeKey }, on: { click: function(r) {
516
- return r.stopPropagation(), a.handleChildClick(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);
517
511
  } } }, [e._v(" " + e._s(l.label) + " ")]);
518
512
  }) : e._e()];
519
513
  })], 2) : e._e()]);
520
- }, Q = [], Y = /* @__PURE__ */ h(
521
- G,
522
- J,
523
- Q,
514
+ }, q = [], G = /* @__PURE__ */ f(
515
+ j,
516
+ X,
517
+ q,
524
518
  !1,
525
519
  null,
526
520
  null,
527
521
  null,
528
522
  null
529
523
  );
530
- const Z = Y.exports, ee = {
531
- WzButton: M,
532
- WzSidebar: U,
533
- WzHeader: K,
524
+ const J = G.exports, Q = {
525
+ WzButton: S,
526
+ WzSidebar: T,
527
+ WzHeader: A,
534
528
  WzLayout: W,
535
- WzSettingsPanel: q,
536
- WzHorizontalNav: Z
537
- }, m = (n) => {
538
- Object.entries(ee).forEach(([e, t]) => {
529
+ WzSettingsPanel: V,
530
+ WzHorizontalNav: J
531
+ }, z = (n) => {
532
+ Object.entries(Q).forEach(([e, t]) => {
539
533
  n.component(e, t);
540
534
  });
541
535
  };
542
- typeof window < "u" && window.Vue && m(window.Vue);
543
- const se = { install: m };
536
+ typeof window < "u" && window.Vue && z(window.Vue);
537
+ const Z = { install: z };
544
538
  export {
545
- M as WzButton,
546
- K as WzHeader,
547
- Z as WzHorizontalNav,
539
+ S as WzButton,
540
+ A as WzHeader,
541
+ J as WzHorizontalNav,
548
542
  W as WzLayout,
549
- q as WzSettingsPanel,
550
- U as WzSidebar,
551
- se as default
543
+ V as WzSettingsPanel,
544
+ T as WzSidebar,
545
+ Z as default
552
546
  };
@@ -1 +1 @@
1
- (function(v,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(v=typeof globalThis<"u"?globalThis:v||self,d(v.WizeAdminLibrary={},v.Vue))})(this,function(v,d){"use strict";const ee="";function f(n,e,t,a,s,l,r,u){var o=typeof n=="function"?n.options:n;e&&(o.render=e,o.staticRenderFns=t,o._compiled=!0),a&&(o.functional=!0),l&&(o._scopeId="data-v-"+l);var c;if(r?(c=function(i){i=i||this.$vnode&&this.$vnode.ssrContext||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(r)},o._ssrRegister=c):s&&(c=u?function(){s.call(this,(o.functional?this.parent:this).$root.$options.shadowRoot)}:s),c)if(o.functional){o._injectStyles=c;var h=o.render;o.render=function(p,w){return c.call(w),h(p,w)}}else{var C=o.beforeCreate;o.beforeCreate=C?[].concat(C,c):[c]}return{exports:n,options:o}}const M={__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:l=>{t.disabled||e("click",l)}}}};var P=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)},x=[],W=f(M,P,x,!1,null,null,null,null);const g=W.exports,H={__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 T=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)])])},L=[],O=f(H,T,L,!1,null,null,null,null);const z=O.exports,N={__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),l=d.computed(()=>t.collapsed&&!s.value),r=i=>i.key===t.activeKey,u=i=>i.children&&i.children.length>0,o=i=>a.value.has(i.key),c=i=>{if(!u(i)||l.value)return;const p=new Set(a.value);p.has(i.key)?p.delete(i.key):p.add(i.key),a.value=p};return{__sfc:!0,props:t,emit:e,openKeys:a,isHovered:s,visuallyCollapsed:l,isActive:r,hasChildren:u,isOpen:o,toggle:c,handleClick:i=>{if(l.value){e("item-click",i);return}u(i)?c(i):e("item-click",i)},handleChildClick:i=>{e("item-click",i)}}}};var B=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,l){return[s.type==="group"?t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],key:`group-${l}`,staticClass:"wz-sidebar-group"},[e._v(" "+e._s(s.label)+" ")]):t("div",{key:s.key||l,staticClass:"wz-sidebar-item-wrapper"},[t("div",{staticClass:"wz-sidebar-item",class:{"wz-sidebar-item--active":a.isActive(s)},attrs:{title:a.visuallyCollapsed?s.label:null},on:{click:function(r){return a.handleClick(s)}}},[t("span",{staticClass:"wz-sidebar-icon"},[e._t("icon",function(){return[s.icon?t("i",{class:s.icon,staticStyle:{"font-size":"1.125rem"}}):s.iconHtml?t("span",{domProps:{innerHTML:e._s(s.iconHtml)}}):t("i",{staticClass:"ri-checkbox-blank-circle-line",staticStyle:{"font-size":"10px"}})]},{item:s})],2),t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-label"},[e._v(e._s(s.label))]),a.hasChildren(s)?t("span",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-arrow",class:{"wz-sidebar-arrow--open":a.isOpen(s)}},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1.125rem"}})]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!a.visuallyCollapsed,expression:"!visuallyCollapsed"}],staticClass:"wz-sidebar-children-wrapper",class:{"is-open":a.hasChildren(s)&&a.isOpen(s)}},[t("div",{staticClass:"wz-sidebar-children-inner"},[a.hasChildren(s)?t("div",{staticClass:"wz-sidebar-children"},e._l(s.children,function(r){return t("div",{key:r.key,staticClass:"wz-sidebar-child-item",class:{"wz-sidebar-child-item--active":a.isActive(r)},on:{click:function(u){return a.handleChildClick(r)}}},[t("span",{staticClass:"wz-sidebar-label"},[e._v(e._s(r.label))]),a.hasChildren(r)?t("span",{staticClass:"wz-sidebar-arrow"},[t("i",{staticClass:"ri-arrow-right-s-line",staticStyle:{"font-size":"1rem"}})]):e._e()])}),0):e._e()])])])]})],2)])},U=[],I=f(N,B,U,!1,null,null,null,null);const y=I.exports,R={__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(h=>h[0]).slice(0,2).join("").toUpperCase():"?",s=d.ref(!1),l=d.ref(null),r=()=>{s.value=!s.value,e("user-click")},u=c=>{e("user-menu-click",c),s.value=!1},o=c=>{l.value&&!l.value.contains(c.target)&&(s.value=!1)};return d.onMounted(()=>{document.addEventListener("click",o)}),d.onBeforeUnmount(()=>{document.removeEventListener("click",o)}),{__sfc:!0,props:t,emit:e,initials:a,isUserMenuOpen:s,userMenuContainer:l,toggleUserMenu:r,handleUserItemClick:u,handleClickOutside:o}}};var A=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(l){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(l){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,l){return t("div",{key:l,staticClass:"wz-header-dropdown-item",class:{"wz-header-dropdown-item--logout":s.isLogout},on:{click:function(r){return a.handleUserItemClick(s)}}},[s.icon&&!s.isLogout?t("i",{class:s.icon}):e._e(),t("span",[e._v(e._s(s.label))])])}),0)]):e._e()],2),t("button",{staticClass:"wz-header-action",attrs:{title:"Settings"},on:{click:function(s){return a.emit("settings")}}},[t("i",{staticClass:"ri-settings-3-line wz-anim-spin",staticStyle:{"font-size":"1.125rem",display:"inline-block"}})])],2)])},D=[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"}})])}],F=f(R,A,D,!1,null,null,null,null);const m=F.exports,K={__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:(u,o)=>{const c={...t.value,[u]:o};e("input",c),e("setting-change",{id:u,value:o})},closePanel:()=>{e("close")}}}};var E=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(l){return t("label",{key:l.value,staticClass:"wz-settings-radio-label"},[t("div",{staticClass:"wz-settings-radio-circle",class:{"wz-settings-radio-circle--active":e.value[s.id]===l.value}},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.value[s.id]===l.value,expression:"value[setting.id] === opt.value"}],staticClass:"wz-settings-radio-dot"})]),t("input",{staticClass:"wz-settings-radio-native",attrs:{type:"radio",name:s.id},domProps:{value:l.value,checked:e.value[s.id]===l.value},on:{change:function(r){return a.handleSelection(s.id,l.value)}}}),t("span",{staticClass:"wz-settings-radio-text"},[e._v(e._s(l.label))])])}),0)])]})],2)])])},V=[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")])])}],j=f(K,E,V,!1,null,null,null,null);const b=j.exports,X={__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=_=>{a.value&&a.value.scrollBy({left:_*250,behavior:"smooth"})},l=d.ref(null),r=d.ref({});let u=null;const o=()=>{u&&(clearTimeout(u),u=null)},c=(_,Z)=>{if(!_.children||_.children.length===0)return;o();const $=Z.currentTarget.getBoundingClientRect();r.value={top:$.bottom+"px",left:$.left+"px"},l.value=_.key},h=()=>{o(),u=setTimeout(()=>{l.value=null},150)},C=()=>{o()},i=_=>{_.children&&_.children.length>0||e("item-click",_)},p=_=>{e("item-click",_),l.value=null},w=()=>{l.value=null};return d.onMounted(()=>{document.addEventListener("click",w)}),d.onBeforeUnmount(()=>{document.removeEventListener("click",w),o()}),{__sfc:!0,props:t,emit:e,trackWrapper:a,scroll:s,openDropdown:l,dropdownStyle:r,hideTimer:u,clearHideTimer:o,showDropdown:c,scheduleHide:h,keepDropdownOpen:C,handleClick:i,handleChildClick:p,handleDocClick:w}}};var q=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 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,l){return[s.type!=="group"?t("div",{key:s.key||l,staticClass:"wz-horizontal-nav-item",class:{"wz-horizontal-nav-item--active":s.key===e.activeKey||s.children&&s.children.some(r=>r.key===e.activeKey)},on:{click:function(r){return r.stopPropagation(),a.handleClick(s)},mouseenter:function(r){return a.showDropdown(s,r)},mouseleave:a.scheduleHide}},[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 a.scroll(1)}}},[t("i",{staticClass:"ri-arrow-right-s-line"})]),a.openDropdown?t("div",{staticClass:"wz-horizontal-nav-dropdown",style:a.dropdownStyle,on:{mouseenter:a.keepDropdownOpen,mouseleave:a.scheduleHide}},[e._l(e.items,function(s){return[s.key===a.openDropdown&&s.children?e._l(s.children,function(l){return t("div",{key:l.key,staticClass:"wz-horizontal-dropdown-child",class:{"wz-horizontal-dropdown-child--active":l.key===e.activeKey},on:{click:function(r){return r.stopPropagation(),a.handleChildClick(l)}}},[e._v(" "+e._s(l.label)+" ")])}):e._e()]})],2):e._e()])},G=[],J=f(X,q,G,!1,null,null,null,null);const k=J.exports,Q={WzButton:g,WzSidebar:y,WzHeader:m,WzLayout:z,WzSettingsPanel:b,WzHorizontalNav:k},S=n=>{Object.entries(Q).forEach(([e,t])=>{n.component(e,t)})};typeof window<"u"&&window.Vue&&S(window.Vue);const Y={install:S};v.WzButton=g,v.WzHeader=m,v.WzHorizontalNav=k,v.WzLayout=z,v.WzSettingsPanel=b,v.WzSidebar=y,v.default=Y,Object.defineProperties(v,{__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 f(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(h,k){return c.call(k),p(h,k)}}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=f(S,$,M,!1,null,null,null,null);const w=P.exports,x={__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 W=function(){var e=this,t=e._self._c,a=e._self._setupProxy;return t("div",{staticClass:"wz-admin-layout",class:"is-"+e.navigationStyle,attrs:{"data-theme":e.theme}},[t("div",{staticClass:"wz-admin-layout-sidebar-container"},[a.isCollapsed?e._e():t("div",{staticClass:"wz-admin-layout-backdrop",on:{click:a.toggleSidebar}}),e._t("sidebar",null,{collapsed:a.isCollapsed})],2),t("div",{staticClass:"wz-admin-layout-main"},[t("div",{staticClass:"wz-admin-layout-header-container"},[e._t("header",null,{toggleSidebar:a.toggleSidebar,collapsed:a.isCollapsed})],2),e.navigationStyle==="horizontal"?t("div",{staticClass:"wz-admin-layout-horizontal-nav-container"},[e._t("horizontal-nav")],2):e._e(),t("main",{staticClass:"wz-admin-layout-content"},[e._t("default")],2)])])},H=[],L=f(x,W,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(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 h=new Set(a.value);h.has(l.key)?h.delete(l.key):h.add(l.key),a.value=h};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=[],B=f(T,N,O,!1,null,null,null,null);const g=B.exports,U={__name:"WzHeader",props:{user:{type:Object,default:()=>({name:"User",avatar:null})},notificationCount:{type:Number,default:0},collapsed:{type:Boolean,default:!1},actionItems:{type:Array,default:()=>[]},userMenuItems:{type:Array,default:()=>[]},userSubtitle:{type:String,default:""},logoSrc:{type:String,default:""},layoutMode:{type:String,default:"vertical"}},emits:["menu-toggle","search","notifications","settings","user-click","action-click","user-menu-click"],setup(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 I=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)])},R=[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=f(U,I,R,!1,null,null,null,null);const z=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=f(D,F,K,!1,null,null,null,null);const y=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 l=u.getBoundingClientRect();o.value={top:l.bottom+2+"px",left:l.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=f(V,j,X,!1,null,null,null,null);const m=q.exports,G={WzButton:w,WzSidebar:g,WzHeader:z,WzLayout:C,WzSettingsPanel:y,WzHorizontalNav:m},b=n=>{Object.entries(G).forEach(([e,t])=>{n.component(e,t)})};typeof window<"u"&&window.Vue&&b(window.Vue);const J={install:b};_.WzButton=w,_.WzHeader=z,_.WzHorizontalNav=m,_.WzLayout=C,_.WzSettingsPanel=y,_.WzSidebar=g,_.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.22",
3
+ "version": "0.1.23",
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",