wize-admin-library 0.1.20 → 0.1.22

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 w, ref as v, 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);
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);
5
5
  var c;
6
- if (o ? (c = function(i) {
6
+ if (r ? (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(o);
10
- }, r._ssrRegister = c) : s && (c = d ? 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(r);
10
+ }, o._ssrRegister = c) : s && (c = u ? function() {
11
11
  s.call(
12
12
  this,
13
- (r.functional ? this.parent : this).$root.$options.shadowRoot
13
+ (o.functional ? this.parent : this).$root.$options.shadowRoot
14
14
  );
15
15
  } : s), c)
16
- if (r.functional) {
17
- r._injectStyles = c;
18
- var p = r.render;
19
- r.render = function(u, h) {
20
- return c.call(h), p(u, h);
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);
21
21
  };
22
22
  } else {
23
- var _ = r.beforeCreate;
24
- r.beforeCreate = _ ? [].concat(_, c) : [c];
23
+ var w = o.beforeCreate;
24
+ o.beforeCreate = w ? [].concat(w, c) : [c];
25
25
  }
26
26
  return {
27
27
  exports: n,
28
- options: r
28
+ options: o
29
29
  };
30
30
  }
31
- const y = {
31
+ const k = {
32
32
  __name: "WzButton",
33
33
  props: {
34
34
  /**
@@ -66,7 +66,7 @@ const y = {
66
66
  },
67
67
  emits: ["click"],
68
68
  setup(n, { emit: e }) {
69
- const t = n, a = w(() => [
69
+ const t = n, a = C(() => [
70
70
  "wz-btn",
71
71
  `wz-btn-${t.variant}`,
72
72
  `wz-btn-${t.size}`,
@@ -77,20 +77,20 @@ const y = {
77
77
  } };
78
78
  }
79
79
  };
80
- var m = function() {
80
+ var S = function() {
81
81
  var e = this, t = e._self._c, a = e._self._setupProxy;
82
82
  return t("button", { class: a.classes, attrs: { disabled: e.disabled }, on: { click: a.handleClick } }, [e._t("default")], 2);
83
- }, b = [], k = /* @__PURE__ */ f(
84
- y,
85
- m,
86
- b,
83
+ }, $ = [], x = /* @__PURE__ */ h(
84
+ k,
85
+ S,
86
+ $,
87
87
  !1,
88
88
  null,
89
89
  null,
90
90
  null,
91
91
  null
92
92
  );
93
- const S = k.exports, $ = {
93
+ const M = x.exports, P = {
94
94
  __name: "WzLayout",
95
95
  props: {
96
96
  /**
@@ -116,28 +116,28 @@ const S = k.exports, $ = {
116
116
  }
117
117
  },
118
118
  setup(n) {
119
- const e = n, t = v(e.defaultCollapsed), a = () => {
119
+ const e = n, t = _(e.defaultCollapsed), a = () => {
120
120
  t.value = !t.value;
121
121
  };
122
- return C(() => {
122
+ return g(() => {
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 x = function() {
127
+ var H = 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
- }, M = [], P = /* @__PURE__ */ f(
131
- $,
132
- x,
133
- M,
130
+ }, T = [], O = /* @__PURE__ */ h(
131
+ P,
132
+ H,
133
+ T,
134
134
  !1,
135
135
  null,
136
136
  null,
137
137
  null,
138
138
  null
139
139
  );
140
- const W = P.exports, H = {
140
+ const W = O.exports, L = {
141
141
  __name: "WzSidebar",
142
142
  props: {
143
143
  /**
@@ -194,24 +194,24 @@ const W = P.exports, H = {
194
194
  },
195
195
  emits: ["item-click"],
196
196
  setup(n, { emit: e }) {
197
- const t = n, a = v(/* @__PURE__ */ new Set()), s = v(!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)
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)
199
199
  return;
200
- const u = new Set(a.value);
201
- u.has(i.key) ? u.delete(i.key) : u.add(i.key), a.value = u;
200
+ const v = new Set(a.value);
201
+ v.has(i.key) ? v.delete(i.key) : v.add(i.key), a.value = v;
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) => {
203
+ return { __sfc: !0, props: t, emit: e, openKeys: a, isHovered: s, visuallyCollapsed: l, isActive: r, hasChildren: u, isOpen: o, toggle: c, handleClick: (i) => {
204
204
  if (l.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
  } };
212
212
  }
213
213
  };
214
- var L = function() {
214
+ var N = 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 L = 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(o) {
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) {
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(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()]);
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()]);
231
231
  }), 0) : e._e()])])])];
232
232
  })], 2)]);
233
- }, N = [], O = /* @__PURE__ */ f(
234
- H,
233
+ }, I = [], R = /* @__PURE__ */ h(
235
234
  L,
236
235
  N,
236
+ I,
237
237
  !1,
238
238
  null,
239
239
  null,
240
240
  null,
241
241
  null
242
242
  );
243
- const T = O.exports, D = {
243
+ const U = R.exports, B = {
244
244
  __name: "WzHeader",
245
245
  props: {
246
246
  /**
@@ -302,21 +302,21 @@ const T = O.exports, D = {
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 = v(!1), l = v(null), o = () => {
305
+ const t = n, a = (c) => c ? c.split(" ").map((p) => p[0]).slice(0, 2).join("").toUpperCase() : "?", s = _(!1), l = _(null), r = () => {
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
- }, r = (c) => {
309
+ }, o = (c) => {
310
310
  l.value && !l.value.contains(c.target) && (s.value = !1);
311
311
  };
312
- return C(() => {
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 };
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 };
317
317
  }
318
318
  };
319
- var I = function() {
319
+ var A = 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 I = 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(o) {
342
+ return t("div", { key: l, staticClass: "wz-header-dropdown-item", class: { "wz-header-dropdown-item--logout": s.isLogout }, on: { click: function(r) {
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
- }, R = [function() {
348
+ }, D = [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 I = 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
- }], U = /* @__PURE__ */ f(
360
+ }], F = /* @__PURE__ */ h(
361
+ B,
362
+ A,
361
363
  D,
362
- I,
363
- R,
364
364
  !1,
365
365
  null,
366
366
  null,
367
367
  null,
368
368
  null
369
369
  );
370
- const B = U.exports, A = {
370
+ const K = F.exports, E = {
371
371
  __name: "WzSettingsPanel",
372
372
  props: {
373
373
  /**
@@ -418,38 +418,38 @@ const B = U.exports, A = {
418
418
  { value: "horizontal", label: "Horizontal" }
419
419
  ]
420
420
  }
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 });
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 });
425
425
  }, closePanel: () => {
426
426
  e("close");
427
427
  } };
428
428
  }
429
429
  };
430
- var F = function() {
430
+ var V = 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(o) {
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) {
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
- }, K = [function() {
439
+ }, j = [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
- }], E = /* @__PURE__ */ f(
443
- A,
444
- F,
445
- K,
442
+ }], X = /* @__PURE__ */ h(
443
+ E,
444
+ V,
445
+ j,
446
446
  !1,
447
447
  null,
448
448
  null,
449
449
  null,
450
450
  null
451
451
  );
452
- const V = E.exports, j = {
452
+ const q = X.exports, G = {
453
453
  __name: "WzHorizontalNav",
454
454
  props: {
455
455
  items: {
@@ -463,83 +463,90 @@ const V = E.exports, j = {
463
463
  },
464
464
  emits: ["item-click"],
465
465
  setup(n, { emit: e }) {
466
- const t = n, a = v(null), s = (i) => {
467
- a.value && a.value.scrollBy({ left: i * 250, behavior: "smooth" });
468
- }, l = v(null), o = v({}), d = (i, u) => {
469
- if (!i.children || i.children.length === 0)
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)
470
474
  return;
471
- const h = u.currentTarget.getBoundingClientRect();
472
- o.value = {
473
- top: h.bottom + "px",
474
- left: h.left + "px"
475
- }, l.value = i.key;
476
- }, r = () => {
477
- l.value = null;
478
- }, c = (i) => {
479
- i.children && i.children.length > 0 || e("item-click", i);
480
- }, p = (i) => {
481
- e("item-click", i), l.value = null;
482
- }, _ = () => {
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 = () => {
483
492
  l.value = null;
484
493
  };
485
- return C(() => {
486
- document.addEventListener("click", _);
487
- }), g(() => {
488
- document.removeEventListener("click", _);
489
- }), { __sfc: !0, props: t, emit: e, trackWrapper: a, scroll: s, openDropdown: l, dropdownStyle: o, showDropdown: d, hideDropdown: r, handleClick: c, handleChildClick: p, handleDocClick: _ };
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 };
490
499
  }
491
500
  };
492
- var X = function() {
501
+ var J = function() {
493
502
  var e = this, t = e._self._c, a = e._self._setupProxy;
494
503
  return t("div", { staticClass: "wz-horizontal-nav" }, [t("button", { staticClass: "wz-horizontal-nav-arrow", on: { click: function(s) {
495
504
  return a.scroll(-1);
496
505
  } } }, [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: { "wz-horizontal-nav-item--active": s.key === e.activeKey || s.children && s.children.some((o) => o.key === e.activeKey) }, on: { click: function(o) {
498
- return o.stopPropagation(), a.handleClick(s);
499
- }, mouseenter: function(o) {
500
- return a.showDropdown(s, o);
501
- }, mouseleave: a.hideDropdown } }, [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()];
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()];
502
511
  })], 2)]), t("button", { staticClass: "wz-horizontal-nav-arrow", on: { click: function(s) {
503
512
  return a.scroll(1);
504
- } } }, [t("i", { staticClass: "ri-arrow-right-s-line" })]), a.openDropdown ? t("div", { staticClass: "wz-horizontal-nav-dropdown", style: a.dropdownStyle, on: { mouseenter: function(s) {
505
- a.openDropdown = a.openDropdown;
506
- }, mouseleave: a.hideDropdown } }, [e._l(e.items, function(s) {
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) {
507
514
  return [s.key === a.openDropdown && s.children ? e._l(s.children, function(l) {
508
- 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) {
509
- return o.stopPropagation(), a.handleChildClick(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);
510
517
  } } }, [e._v(" " + e._s(l.label) + " ")]);
511
518
  }) : e._e()];
512
519
  })], 2) : e._e()]);
513
- }, q = [], G = /* @__PURE__ */ f(
514
- j,
515
- X,
516
- q,
520
+ }, Q = [], Y = /* @__PURE__ */ h(
521
+ G,
522
+ J,
523
+ Q,
517
524
  !1,
518
525
  null,
519
526
  null,
520
527
  null,
521
528
  null
522
529
  );
523
- const J = G.exports, Q = {
524
- WzButton: S,
525
- WzSidebar: T,
526
- WzHeader: B,
530
+ const Z = Y.exports, ee = {
531
+ WzButton: M,
532
+ WzSidebar: U,
533
+ WzHeader: K,
527
534
  WzLayout: W,
528
- WzSettingsPanel: V,
529
- WzHorizontalNav: J
530
- }, z = (n) => {
531
- Object.entries(Q).forEach(([e, t]) => {
535
+ WzSettingsPanel: q,
536
+ WzHorizontalNav: Z
537
+ }, m = (n) => {
538
+ Object.entries(ee).forEach(([e, t]) => {
532
539
  n.component(e, t);
533
540
  });
534
541
  };
535
- typeof window < "u" && window.Vue && z(window.Vue);
536
- const Z = { install: z };
542
+ typeof window < "u" && window.Vue && m(window.Vue);
543
+ const se = { install: m };
537
544
  export {
538
- S as WzButton,
539
- B as WzHeader,
540
- J as WzHorizontalNav,
545
+ M as WzButton,
546
+ K as WzHeader,
547
+ Z as WzHorizontalNav,
541
548
  W as WzLayout,
542
- V as WzSettingsPanel,
543
- T as WzSidebar,
544
- Z as default
549
+ q as WzSettingsPanel,
550
+ U as WzSidebar,
551
+ se as default
545
552
  };
@@ -1 +1 @@
1
- (function(u,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(u=typeof globalThis<"u"?globalThis:u||self,d(u.WizeAdminLibrary={},u.Vue))})(this,function(u,d){"use strict";const 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 h=r.render;r.render=function(_,w){return c.call(w),h(_,w)}}else{var p=r.beforeCreate;r.beforeCreate=p?[].concat(p,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 C=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 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 _=new Set(a.value);_.has(l.key)?_.delete(l.key):_.add(l.key),a.value=_};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 z=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(h=>h[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 D=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"}})])}],R=f(U,D,I,!1,null,null,null,null);const y=R.exports,A={__name:"WzSettingsPanel",props:{isOpen:{type:Boolean,default:!1},title:{type:String,default:"Switcher"},value:{type:Object,default:()=>({})},extraSettings:{type:Array,default:()=>[]}},emits:["close","input","setting-change"],setup(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(A,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=l=>{a.value&&a.value.scrollBy({left:l*250,behavior:"smooth"})},i=d.ref(null),o=d.ref({}),v=(l,_)=>{if(!l.children||l.children.length===0)return;const w=_.currentTarget.getBoundingClientRect();o.value={top:w.bottom+"px",left:w.left+"px"},i.value=l.key},r=()=>{i.value=null},c=l=>{l.children&&l.children.length>0||e("item-click",l)},h=l=>{e("item-click",l),i.value=null},p=()=>{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,showDropdown:v,hideDropdown:r,handleClick:c,handleChildClick:h,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 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)},on:{click:function(o){return o.stopPropagation(),a.handleClick(s)},mouseenter:function(o){return a.showDropdown(s,o)},mouseleave:a.hideDropdown}},[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:function(s){a.openDropdown=a.openDropdown},mouseleave:a.hideDropdown}},[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 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};u.WzButton=C,u.WzHeader=y,u.WzHorizontalNav=b,u.WzLayout=g,u.WzSettingsPanel=m,u.WzSidebar=z,u.default=J,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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"}})});