wave-ui 3.13.4 → 3.13.5

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,15 +1,15 @@
1
1
  var ke = Object.defineProperty;
2
2
  var ve = (e, t, i) => t in e ? ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
- var H = (e, t, i) => (ve(e, typeof t != "symbol" ? t + "" : t, i), i), ae = (e, t, i) => {
3
+ var H = (e, t, i) => (ve(e, typeof t != "symbol" ? t + "" : t, i), i), ne = (e, t, i) => {
4
4
  if (!t.has(e))
5
5
  throw TypeError("Cannot " + i);
6
6
  };
7
- var X = (e, t, i) => (ae(e, t, "read from private field"), i ? i.call(e) : t.get(e)), Q = (e, t, i) => {
7
+ var X = (e, t, i) => (ne(e, t, "read from private field"), i ? i.call(e) : t.get(e)), Q = (e, t, i) => {
8
8
  if (t.has(e))
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  t instanceof WeakSet ? t.add(e) : t.set(e, i);
11
- }, Z = (e, t, i, o) => (ae(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i);
12
- import { reactive as G, resolveComponent as $, openBlock as s, createBlock as g, Teleport as Ce, createVNode as I, TransitionGroup as se, normalizeClass as f, withCtx as m, createElementBlock as u, Fragment as k, renderList as R, mergeProps as B, createElementVNode as y, createCommentVNode as p, createApp as Se, defineComponent as Be, inject as _e, withKeys as E, withModifiers as z, renderSlot as c, createTextVNode as S, toDisplayString as C, normalizeStyle as L, toHandlers as me, Transition as O, resolveDynamicComponent as T, normalizeProps as te, resolveDirective as ge, withDirectives as W, createSlots as J, vShow as oe, vModelText as be, vModelDynamic as $e, KeepAlive as Ve } from "vue";
11
+ }, Z = (e, t, i, o) => (ne(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i);
12
+ import { reactive as G, resolveComponent as $, openBlock as s, createBlock as g, Teleport as Ce, createVNode as I, TransitionGroup as se, normalizeClass as f, withCtx as m, createElementBlock as u, Fragment as k, renderList as R, mergeProps as B, createElementVNode as y, createCommentVNode as p, createApp as Se, defineComponent as Be, inject as _e, withKeys as E, withModifiers as z, renderSlot as c, createTextVNode as S, toDisplayString as C, normalizeStyle as L, toHandlers as oe, Transition as O, resolveDynamicComponent as T, normalizeProps as te, resolveDirective as ge, withDirectives as W, createSlots as J, vShow as ae, vModelText as be, vModelDynamic as $e, KeepAlive as Ve } from "vue";
13
13
  const Ie = G({
14
14
  on: "#app",
15
15
  // Sets the Wave UI root node. If not found, will default to `body`.
@@ -79,7 +79,7 @@ const Ie = G({
79
79
  typeof o == "object" ? ye(e[i], t[i]) : t[i] = o;
80
80
  }
81
81
  return t;
82
- }, F = (e) => console.warn(`Wave UI: ${e}`), ee = (e) => console.error(`Wave UI: ${e}`), ne = (e, t) => "#" + e.slice(1).match(/../g).map((i) => (i = +`0x${i}` + t, (i < 0 ? 0 : i > 255 ? 255 : i).toString(16).padStart(2, 0))).join(""), Te = (e) => {
82
+ }, F = (e) => console.warn(`Wave UI: ${e}`), ee = (e) => console.error(`Wave UI: ${e}`), re = (e, t) => "#" + e.slice(1).match(/../g).map((i) => (i = +`0x${i}` + t, (i < 0 ? 0 : i > 255 ? 255 : i).toString(16).padStart(2, 0))).join(""), Te = (e) => {
83
83
  ["light", "dark"].forEach((t) => {
84
84
  const i = e.colors[t];
85
85
  i.shades = {};
@@ -90,12 +90,12 @@ const Ie = G({
90
90
  const n = o.color;
91
91
  n.length === 3 && (o.color = n[0] + "" + n[0] + n[1] + n[1] + n[2] + n[2]);
92
92
  for (let l = 1; l <= 3; l++) {
93
- const a = ne(`#${o.color}`, l * 40), r = ne(`#${o.color}`, -l * 40);
93
+ const a = re(`#${o.color}`, l * 40), r = re(`#${o.color}`, -l * 40);
94
94
  i.shades[`${o.label}-light${l}`] = a, i.shades[`${o.label}-dark${l}`] = r;
95
95
  }
96
96
  }
97
97
  });
98
- }, re = (e, t) => {
98
+ }, de = (e, t) => {
99
99
  const i = {
100
100
  ...t.reduce((o, n) => {
101
101
  o[n.label] = n.color;
@@ -104,7 +104,7 @@ const Ie = G({
104
104
  }, { ...e, ...e.shades })
105
105
  };
106
106
  return delete i.shades, i;
107
- }, de = [
107
+ }, ue = [
108
108
  {
109
109
  label: "pink",
110
110
  color: "#e91e63",
@@ -455,7 +455,7 @@ const Ie = G({
455
455
  cssScope: ".w-app",
456
456
  baseIncrement: 4
457
457
  };
458
- let ie = { keys: [], values: [] }, ue = null;
458
+ let ie = { keys: [], values: [] }, he = null;
459
459
  const Le = (e, t) => {
460
460
  let i = "";
461
461
  const o = {}, { info: n, warning: l, success: a, error: r, shades: d, ...h } = e, { cssScope: w } = j;
@@ -534,11 +534,11 @@ const Le = (e, t) => {
534
534
  a !== "xl" && (t += `@media (max-width:${r}px){` + n.map((d) => `${i} .${a}d-${d}`).join("") + // w-grid columns and gap.
535
535
  l.map((d, h) => `.w-grid.${a}d-columns${h + 1}{grid-template-columns:repeat(${h + 1},1fr);}`).join("") + l.map((d, h) => `.w-flex.${a}d-gap${h + 1},.w-grid.${a}d-gap${h + 1}{gap:${(h + 1) * o}px;}`).join("") + `.w-flex.${a}d-gap0,.w-flex.${a}d-gap0{gap:0}}`);
536
536
  }), t;
537
- }, he = (e) => {
537
+ }, ce = (e) => {
538
538
  const t = window.innerWidth, i = ie.values.slice(0);
539
539
  i.push(t), i.sort((n, l) => n - l);
540
540
  const o = ie.keys[i.indexOf(t)] || "xl";
541
- o !== ue && (ue = o, e.breakpoint = {
541
+ o !== he && (he = o, e.breakpoint = {
542
542
  name: o,
543
543
  xs: o === "xs",
544
544
  sm: o === "sm",
@@ -555,7 +555,7 @@ const Le = (e, t) => {
555
555
  const o = document.head.querySelectorAll('style,link[rel="stylesheet"]')[0];
556
556
  o ? o.before(i) : document.head.appendChild(i);
557
557
  }
558
- he(e), window.addEventListener("resize", () => he(e));
558
+ ce(e), window.addEventListener("resize", () => ce(e));
559
559
  }, xe = (e, t) => {
560
560
  if (!document.getElementById("wave-ui-colors")) {
561
561
  const i = document.createElement("style");
@@ -687,7 +687,7 @@ const Ke = (e, t, i) => {
687
687
  }
688
688
  n.mount(o), o.remove();
689
689
  };
690
- let ce = !1;
690
+ let pe = !1;
691
691
  const Ne = (e) => {
692
692
  const t = window.matchMedia("(prefers-color-scheme: dark)");
693
693
  e.preferredTheme = t.matches ? "dark" : "light", e.switchTheme(e.preferredTheme), t.addEventListener("change", (i) => {
@@ -743,7 +743,7 @@ const N = class N {
743
743
  var n, l;
744
744
  this.theme = t, document.documentElement.setAttribute("data-theme", t), (l = (n = document.head.querySelector("#wave-ui-colors")) == null ? void 0 : n.remove) == null || l.call(n);
745
745
  const o = this.config.colors[this.theme];
746
- xe(o, this.config.css.colorShadeCssVariables), this.colors = re(o, de);
746
+ xe(o, this.config.css.colorShadeCssVariables), this.colors = de(o, ue);
747
747
  }
748
748
  });
749
749
  if (X(N, q))
@@ -755,7 +755,7 @@ const N = class N {
755
755
  let { components: o, ...n } = i;
756
756
  n = this.$waveui.config = ye(n), n.css.colorShades && Te(n);
757
757
  const l = G(this.$waveui);
758
- t.config.globalProperties.$waveui = l, t.provide("$waveui", l), n.theme !== "auto" && (this.$waveui.colors = re(n.colors[n.theme], de));
758
+ t.config.globalProperties.$waveui = l, t.provide("$waveui", l), n.theme !== "auto" && (this.$waveui.colors = de(n.colors[n.theme], ue));
759
759
  }
760
760
  static install(t, i = {}) {
761
761
  var n;
@@ -778,8 +778,8 @@ const N = class N {
778
778
  t.mixin({
779
779
  // Add a mixin to capture the first mounted hook, trigger the Wave UI init then unregister the mixin straight away.
780
780
  beforeMount() {
781
- if (!ce) {
782
- ce = !0;
781
+ if (!pe) {
782
+ pe = !0;
783
783
  const l = _e("$waveui"), { config: a } = l, r = document.querySelector(a.on) || document.body;
784
784
  r.classList.add("w-app"), a.theme === "auto" ? Ne(l) : l.switchTheme(a.theme, !0), Oe(l), Ke(r, o, l), t._context.mixins.find((d) => d.mounted && delete d.mounted);
785
785
  }
@@ -1116,7 +1116,7 @@ function nt(e, t, i, o, n, l) {
1116
1116
  class: "w-autocomplete__input",
1117
1117
  ref: "input",
1118
1118
  value: e.keywords
1119
- }, me(l.inputEventListeners, !0), l.inputAttrs), null, 16, lt),
1119
+ }, oe(l.inputEventListeners, !0), l.inputAttrs), null, 16, lt),
1120
1120
  I(r, null, {
1121
1121
  default: m(() => [
1122
1122
  e.menuOpen ? (s(), u("ul", {
@@ -1698,7 +1698,7 @@ function It(e, t, i, o, n, l) {
1698
1698
  const a = $("button-partial");
1699
1699
  return i.tooltip ? (s(), g(T("w-tooltip"), te(B({ key: 0 }, i.tooltipProps)), {
1700
1700
  activator: m(({ on: r }) => [
1701
- I(a, B(l.buttonProps, me(r)), {
1701
+ I(a, B(l.buttonProps, oe(r)), {
1702
1702
  default: m(() => [
1703
1703
  c(e.$slots, "default")
1704
1704
  ]),
@@ -2160,7 +2160,7 @@ function Yt(e, t, i, o, n, l) {
2160
2160
  "onUpdate:modelValue": t[2] || (t[2] = (w) => e.showPopup = w)
2161
2161
  }, l.wMenuProps), {
2162
2162
  activator: m(({ on: w }) => [
2163
- I(a, B({ class: "w-confirm" }, { ...e.$attrs, ...l.buttonProps, ...i.disablePrompt ? {} : w }), {
2163
+ I(a, B({ class: "w-confirm" }, { ...e.$attrs, ...l.buttonProps }, oe(i.disablePrompt ? {} : { ...w })), {
2164
2164
  default: m(() => [
2165
2165
  c(e.$slots, "default")
2166
2166
  ]),
@@ -2409,7 +2409,7 @@ function ti(e, t, i, o, n, l) {
2409
2409
  key: "1"
2410
2410
  } : void 0
2411
2411
  ]), 1032, ["color", "bg-color", "class", "title-class", "content-class", "title", "style"]), [
2412
- [oe, n.showContent]
2412
+ [ae, n.showContent]
2413
2413
  ])
2414
2414
  ]),
2415
2415
  _: 3
@@ -4530,7 +4530,7 @@ function Zi(e, t, i, o, n, l) {
4530
4530
  }, [
4531
4531
  c(e.$slots, "default")
4532
4532
  ], 38)), [
4533
- [oe, e.showOverlay],
4533
+ [ae, e.showOverlay],
4534
4534
  [a]
4535
4535
  ]) : p("", !0)
4536
4536
  ]),
@@ -6203,7 +6203,7 @@ function Vs(e, t, i, o, n, l) {
6203
6203
  ]),
6204
6204
  _: 2
6205
6205
  }, 1032, ["item", "class"])), [
6206
- [oe, r._uid === l.activeTab._uid]
6206
+ [ae, r._uid === l.activeTab._uid]
6207
6207
  ])), 128))
6208
6208
  ]),
6209
6209
  _: 3
@@ -6250,7 +6250,7 @@ function Vs(e, t, i, o, n, l) {
6250
6250
  ])) : p("", !0)
6251
6251
  ], 2);
6252
6252
  }
6253
- let pe = 0;
6253
+ let fe = 0;
6254
6254
  const Is = {
6255
6255
  name: "w-tabs",
6256
6256
  props: {
@@ -6336,7 +6336,7 @@ const Is = {
6336
6336
  methods: {
6337
6337
  // Adding a tab in the list.
6338
6338
  addTab(e) {
6339
- (e[this.itemIdKey] ?? e._uid ?? !1) || (e._uid = +`${this._.uid}${++pe}`), this.tabs.push({
6339
+ (e[this.itemIdKey] ?? e._uid ?? !1) || (e._uid = +`${this._.uid}${++fe}`), this.tabs.push({
6340
6340
  _uid: e[this.itemIdKey] ?? e._uid,
6341
6341
  _index: this.tabs.length,
6342
6342
  ...e,
@@ -6345,7 +6345,7 @@ const Is = {
6345
6345
  },
6346
6346
  refreshTabs() {
6347
6347
  let e = this.items;
6348
- typeof e == "number" && (e = Array(e).fill().map((t, i) => this.tabs[i] || {})), this.tabs = e.map((t, i) => ((t[this.itemIdKey] ?? t._uid ?? !1) || (t._uid = +`${this._.uid}${++pe}`), {
6348
+ typeof e == "number" && (e = Array(e).fill().map((t, i) => this.tabs[i] || {})), this.tabs = e.map((t, i) => ((t[this.itemIdKey] ?? t._uid ?? !1) || (t._uid = +`${this._.uid}${++fe}`), {
6349
6349
  ...t,
6350
6350
  _uid: t[this.itemIdKey] ?? t._uid,
6351
6351
  _index: i,
@@ -6725,7 +6725,7 @@ function lo(e, t, i, o, n, l) {
6725
6725
  ])) : p("", !0)
6726
6726
  ], 2);
6727
6727
  }
6728
- const fe = 15, so = {
6728
+ const me = 15, so = {
6729
6729
  name: "w-table",
6730
6730
  props: {
6731
6731
  items: { type: Array, required: !0 },
@@ -6950,9 +6950,9 @@ const fe = 15, so = {
6950
6950
  this.colResizing.dragging = !0;
6951
6951
  const a = e.pageX - t, r = n + l, d = n + a, h = l - a;
6952
6952
  i.style.width = n + a + "px", o.style.width = l - a + "px";
6953
- const w = a < 0 && i.offsetWidth > d || i.offsetWidth <= fe, _ = a > 0 && o.offsetWidth > h;
6953
+ const w = a < 0 && i.offsetWidth > d || i.offsetWidth <= me, _ = a > 0 && o.offsetWidth > h;
6954
6954
  if (w) {
6955
- const b = Math.max(i.offsetWidth, fe);
6955
+ const b = Math.max(i.offsetWidth, me);
6956
6956
  i.style.width = b + "px", o.style.width = r - b + "px";
6957
6957
  } else
6958
6958
  _ && (i.style.width = r - o.offsetWidth + "px", o.style.width = o.offsetWidth + "px");