wave-ui 2.38.0 → 2.40.0

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,5 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
3
  var __publicField = (obj, key, value) => {
33
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34
5
  return value;
@@ -92,16 +63,17 @@ const _NotificationManager$1 = class {
92
63
  };
93
64
  }
94
65
  notify(...args) {
95
- let notification = __spreadProps(__spreadValues({}, this._notificationDefaults), { _uid: this._uid++ });
66
+ let notification = { ...this._notificationDefaults, _uid: this._uid++ };
96
67
  if (typeof args[0] === "object")
97
- notification = __spreadValues(__spreadValues({}, notification), args[0]);
68
+ notification = { ...notification, ...args[0] };
98
69
  else {
99
70
  const [message, type, timeout] = args;
100
- notification = __spreadProps(__spreadValues({}, notification), {
71
+ notification = {
72
+ ...notification,
101
73
  message: message || "",
102
74
  [type === void 0 ? "info" : type]: true,
103
75
  timeout: timeout || timeout === 0 ? parseFloat(timeout) : 4e3
104
- });
76
+ };
105
77
  }
106
78
  this.notifications.push(notification);
107
79
  if (~~notification.timeout !== 0)
@@ -437,7 +409,8 @@ const _WaveUI = class {
437
409
  obj[color.label] = color.color;
438
410
  color.shades.forEach((shade) => obj[shade.label] = shade.color);
439
411
  return obj;
440
- }, __spreadProps(__spreadValues({}, config.colors), { black: "#000", white: "#fff", transparent: "transparent", inherit: "inherit" })));
412
+ }, { ...config.colors, black: "#000", white: "#fff", transparent: "transparent", inherit: "inherit" }));
413
+ __publicField(this, "config", {});
441
414
  if (_WaveUI.instance)
442
415
  return _WaveUI.instance;
443
416
  else {
@@ -463,6 +436,7 @@ const _WaveUI = class {
463
436
  }
464
437
  }
465
438
  }
439
+ this.config = config;
466
440
  _WaveUI.instance = this;
467
441
  app.config.globalProperties.$waveui = reactive(this);
468
442
  }
@@ -660,7 +634,8 @@ const _sfc_main$P = {
660
634
  },
661
635
  updateItems() {
662
636
  const items = typeof this.items === "number" ? Array(this.items).fill({}) : this.items || [];
663
- this.accordionItems = items.map((item, _index) => __spreadProps(__spreadValues({}, item), {
637
+ this.accordionItems = items.map((item, _index) => ({
638
+ ...item,
664
639
  _index,
665
640
  _expanded: this.modelValue && this.modelValue[_index],
666
641
  _disabled: !!item.disabled
@@ -851,7 +826,7 @@ const _sfc_main$N = {
851
826
  },
852
827
  methods: {
853
828
  notifProps(notif) {
854
- const _a = notif, { _value, _uid, message, timeout } = _a, props = __objRest(_a, ["_value", "_uid", "message", "timeout"]);
829
+ const { _value, _uid, message, timeout, ...props } = notif;
855
830
  return props;
856
831
  }
857
832
  },
@@ -864,57 +839,50 @@ const _sfc_main$N = {
864
839
  }
865
840
  };
866
841
  var NotificationManager = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", render$N]]);
867
- const { css: cssConfig } = config;
868
- const entries = Object.entries(config.breakpoints);
869
- const breakpoints = entries.map(([label, max], i) => {
870
- const [, value = 0] = entries[i - 1] || [];
871
- return { label, min: value ? value + 1 : 0, max };
872
- });
873
- let computedStyles = null;
874
842
  const cssVars = {
875
843
  cssScope: ".w-app",
876
844
  baseIncrement: 4
877
845
  };
878
- const generateColors = () => {
846
+ const generateColors = (config2) => {
879
847
  let styles = "";
880
848
  const { cssScope } = cssVars;
881
- const _a = config.colors, { info, warning, success, error } = _a, colors2 = __objRest(_a, ["info", "warning", "success", "error"]);
849
+ const { info, warning, success, error, ...colors2 } = config2.colors;
882
850
  for (const color in colors2) {
883
- styles += `${cssScope} .${color}--bg{background-color:${config.colors[color]}}${cssScope} .${color}{color:${config.colors[color]}}`;
851
+ styles += `${cssScope} .${color}--bg{background-color:${config2.colors[color]}}${cssScope} .${color}{color:${config2.colors[color]}}`;
884
852
  }
885
- if (cssConfig.colorShades && config.colorShades) {
886
- Object.entries(config.colorShades).forEach(([label, color]) => {
853
+ if (config2.css.colorShades && config2.colorShades) {
854
+ Object.entries(config2.colorShades).forEach(([label, color]) => {
887
855
  styles += `${cssScope} .${label}--bg{background-color:${color}}${cssScope} .${label}{color:${color}}`;
888
856
  });
889
857
  }
890
858
  const statusColors = { info, warning, success, error };
891
859
  for (const color in statusColors) {
892
- styles += `${cssScope} .${color}--bg{background-color:${config.colors[color]}}${cssScope} .${color}{color:${config.colors[color]}}`;
860
+ styles += `${cssScope} .${color}--bg{background-color:${config2.colors[color]}}${cssScope} .${color}{color:${config2.colors[color]}}`;
893
861
  }
894
862
  const cssVariables = [];
895
- cssVariables.push(`--primary: ${config.colors.primary}`);
863
+ cssVariables.push(`--primary: ${config2.colors.primary}`);
896
864
  styles += `:root {${cssVariables.join(";")}}`;
897
865
  return styles;
898
866
  };
899
- const generateBreakpoints = () => {
867
+ const generateBreakpoints = (breakpoints, grid) => {
900
868
  let styles = "";
901
869
  const { cssScope } = cssVars;
902
870
  breakpoints.forEach(({ min, label }) => {
903
871
  if (label === "xs") {
904
- for (let i = 0; i < cssConfig.grid; i++) {
905
- styles += `${cssScope} .${label}${cssConfig.grid - i}{width:${parseFloat(((cssConfig.grid - i) * 100 / cssConfig.grid).toFixed(4))}%;}`;
872
+ for (let i = 0; i < grid; i++) {
873
+ styles += `${cssScope} .${label}${grid - i}{width:${parseFloat(((grid - i) * 100 / grid).toFixed(4))}%;}`;
906
874
  }
907
875
  } else {
908
876
  styles += `@media(min-width:${min}px){`;
909
- for (let i = 0; i < cssConfig.grid; i++) {
910
- styles += `${cssScope} .${label}${cssConfig.grid - i}{width:${parseFloat(((cssConfig.grid - i) * 100 / cssConfig.grid).toFixed(4))}%;}`;
877
+ for (let i = 0; i < grid; i++) {
878
+ styles += `${cssScope} .${label}${grid - i}{width:${parseFloat(((grid - i) * 100 / grid).toFixed(4))}%;}`;
911
879
  }
912
880
  styles += "}";
913
881
  }
914
882
  });
915
883
  return styles;
916
884
  };
917
- const genBreakpointLayoutClasses = () => {
885
+ const genBreakpointLayoutClasses = (breakpoints) => {
918
886
  let styles = "";
919
887
  const { cssScope, baseIncrement } = cssVars;
920
888
  const layoutClasses = [
@@ -967,15 +935,20 @@ const genBreakpointLayoutClasses = () => {
967
935
  });
968
936
  return styles;
969
937
  };
970
- var DynamicCSS = () => {
971
- let styles = "";
972
- computedStyles = getComputedStyle(document.documentElement);
938
+ var dynamicCSS = (config2) => {
939
+ const entries = Object.entries(config2.breakpoints);
940
+ const breakpointsDef2 = entries.map(([label, max], i) => {
941
+ const [, value = 0] = entries[i - 1] || [];
942
+ return { label, min: value ? value + 1 : 0, max };
943
+ });
944
+ const computedStyles = getComputedStyle(document.documentElement);
973
945
  cssVars.cssScope = computedStyles.getPropertyValue("--css-scope");
974
946
  cssVars.baseIncrement = parseInt(computedStyles.getPropertyValue("--base-increment"));
975
- styles += generateColors();
976
- styles += generateBreakpoints();
977
- if (cssConfig.breakpointLayoutClasses)
978
- styles += genBreakpointLayoutClasses();
947
+ let styles = "";
948
+ styles += generateColors(config2);
949
+ styles += generateBreakpoints(breakpointsDef2, config2.css.grid);
950
+ if (config2.css.breakpointLayoutClasses)
951
+ styles += genBreakpointLayoutClasses(breakpointsDef2);
979
952
  return styles;
980
953
  };
981
954
  function render$M(_ctx, _cache, $props, $setup, $data, $options) {
@@ -988,8 +961,7 @@ function render$M(_ctx, _cache, $props, $setup, $data, $options) {
988
961
  ], 2);
989
962
  }
990
963
  var wApp_vue_vue_type_style_index_0_lang = "";
991
- const breakpointsNames = Object.keys(config.breakpoints);
992
- const breakpointsValues = Object.values(config.breakpoints);
964
+ let breakpointsDef = { keys: [], values: [] };
993
965
  const _sfc_main$M = {
994
966
  name: "w-app",
995
967
  props: {
@@ -1032,10 +1004,10 @@ const _sfc_main$M = {
1032
1004
  methods: {
1033
1005
  getBreakpoint() {
1034
1006
  const width = window.innerWidth;
1035
- const breakpoints2 = breakpointsValues.slice(0);
1036
- breakpoints2.push(width);
1037
- breakpoints2.sort((a, b) => a - b);
1038
- const breakpoint = breakpointsNames[breakpoints2.indexOf(width)] || "xl";
1007
+ const breakpoints = breakpointsDef.values.slice(0);
1008
+ breakpoints.push(width);
1009
+ breakpoints.sort((a, b) => a - b);
1010
+ const breakpoint = breakpointsDef.keys[breakpoints.indexOf(width)] || "xl";
1039
1011
  if (breakpoint !== this.currentBreakpoint) {
1040
1012
  this.currentBreakpoint = breakpoint;
1041
1013
  this.$waveui.breakpoint = {
@@ -1049,17 +1021,20 @@ const _sfc_main$M = {
1049
1021
  };
1050
1022
  }
1051
1023
  this.$waveui.breakpoint.width = width;
1052
- },
1053
- dynamicStyles() {
1054
- return DynamicCSS();
1055
1024
  }
1056
1025
  },
1057
1026
  mounted() {
1027
+ const { config: config2 } = this.$waveui;
1028
+ breakpointsDef = { keys: Object.keys(config2.breakpoints), values: Object.values(config2.breakpoints) };
1058
1029
  if (!document.getElementById("wave-ui-styles")) {
1059
1030
  const css = document.createElement("style");
1060
1031
  css.id = "wave-ui-styles";
1061
- css.innerHTML = this.dynamicStyles();
1062
- document.head.appendChild(css);
1032
+ css.innerHTML = dynamicCSS(config2);
1033
+ const firstStyle = document.head.querySelectorAll('style,link[rel="stylesheet"]')[0];
1034
+ if (firstStyle)
1035
+ firstStyle.before(css);
1036
+ else
1037
+ document.head.appendChild(css);
1063
1038
  }
1064
1039
  this.getBreakpoint(window.innerWidth);
1065
1040
  window.addEventListener("resize", this.getBreakpoint);
@@ -1334,7 +1309,8 @@ const _sfc_main$J = {
1334
1309
  return this.hasRouter ? this.$router.resolve(this.route).href : this.route;
1335
1310
  },
1336
1311
  listeners() {
1337
- return this.route && this.hasRouter && !this.forceLink && !this.externalLink ? __spreadProps(__spreadValues({}, this.$attrs), {
1312
+ return this.route && this.hasRouter && !this.forceLink && !this.externalLink ? {
1313
+ ...this.$attrs,
1338
1314
  click: (e) => {
1339
1315
  if (this.$attrs.click)
1340
1316
  this.$attrs.click(e);
@@ -1342,7 +1318,7 @@ const _sfc_main$J = {
1342
1318
  e.stopPropagation();
1343
1319
  e.preventDefault();
1344
1320
  }
1345
- }) : this.$attrs;
1321
+ } : this.$attrs;
1346
1322
  },
1347
1323
  size() {
1348
1324
  return this.xs && "xs" || this.sm && "sm" || this.lg && "lg" || this.xl && "xl" || "md";
@@ -1400,7 +1376,7 @@ function render$I(_ctx, _cache, $props, $setup, $data, $options) {
1400
1376
  }, [
1401
1377
  _ctx.$slots.title || $props.title ? (openBlock(), createElementBlock("div", {
1402
1378
  key: 0,
1403
- class: normalizeClass(["w-card__title", __spreadValues({ "w-card__title--has-toolbar": _ctx.$slots.title && $options.titleHasToolbar }, $options.titleClasses)])
1379
+ class: normalizeClass(["w-card__title", { "w-card__title--has-toolbar": _ctx.$slots.title && $options.titleHasToolbar, ...$options.titleClasses }])
1404
1380
  }, [
1405
1381
  renderSlot(_ctx.$slots, "title", {}, () => [
1406
1382
  createTextVNode(toDisplayString($props.title), 1)
@@ -1461,10 +1437,11 @@ const _sfc_main$I = {
1461
1437
  return actions && actions().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
1462
1438
  },
1463
1439
  imgProps() {
1464
- return __spreadValues({
1440
+ return {
1465
1441
  tag: "div",
1466
- ratio: 1 / 2
1467
- }, this.imageProps);
1442
+ ratio: 1 / 2,
1443
+ ...this.imageProps
1444
+ };
1468
1445
  },
1469
1446
  classes() {
1470
1447
  return {
@@ -1731,13 +1708,14 @@ const _sfc_main$G = {
1731
1708
  checkboxItems() {
1732
1709
  return (this.items || []).map((item, i) => {
1733
1710
  const itemValue = item[this.itemValueKey] === void 0 ? item[this.itemLabelKey] || i : item[this.itemValueKey];
1734
- return reactive(__spreadProps(__spreadValues({}, item), {
1711
+ return reactive({
1712
+ ...item,
1735
1713
  label: item[this.itemLabelKey],
1736
1714
  _index: i,
1737
1715
  value: itemValue,
1738
1716
  color: item[this.itemColorKey] || this.color,
1739
1717
  _isChecked: this.modelValue && this.modelValue.includes(itemValue)
1740
- }));
1718
+ });
1741
1719
  });
1742
1720
  },
1743
1721
  classes() {
@@ -1776,7 +1754,7 @@ function render$F(_ctx, _cache, $props, $setup, $data, $options) {
1776
1754
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event)
1777
1755
  }, $options.wMenuProps), {
1778
1756
  activator: withCtx(({ on }) => [
1779
- createVNode(_component_w_button, mergeProps({ class: "w-confirm__button" }, __spreadValues(__spreadValues(__spreadValues({}, _ctx.$attrs), $options.buttonProps), on)), {
1757
+ createVNode(_component_w_button, mergeProps({ class: "w-confirm__button" }, { ..._ctx.$attrs, ...$options.buttonProps, ...on }), {
1780
1758
  default: withCtx(() => [
1781
1759
  renderSlot(_ctx.$slots, "default")
1782
1760
  ]),
@@ -1868,7 +1846,7 @@ const _sfc_main$F = {
1868
1846
  return button;
1869
1847
  },
1870
1848
  cancelButtonProps() {
1871
- const _a = this.cancelButton, { label } = _a, props = __objRest(_a, ["label"]);
1849
+ const { label, ...props } = this.cancelButton;
1872
1850
  return props;
1873
1851
  },
1874
1852
  confirmButton() {
@@ -1878,11 +1856,11 @@ const _sfc_main$F = {
1878
1856
  return button;
1879
1857
  },
1880
1858
  confirmButtonProps() {
1881
- const _a = this.confirmButton, { label } = _a, props = __objRest(_a, ["label"]);
1859
+ const { label, ...props } = this.confirmButton;
1882
1860
  return props;
1883
1861
  },
1884
1862
  wMenuProps() {
1885
- return __spreadValues({
1863
+ return {
1886
1864
  top: this.top,
1887
1865
  bottom: this.bottom,
1888
1866
  left: this.left,
@@ -1893,15 +1871,17 @@ const _sfc_main$F = {
1893
1871
  alignLeft: this.alignLeft,
1894
1872
  alignRight: this.alignRight,
1895
1873
  persistent: this.persistent,
1896
- transition: this.transition
1897
- }, this.menu);
1874
+ transition: this.transition,
1875
+ ...this.menu
1876
+ };
1898
1877
  },
1899
1878
  buttonProps() {
1900
- return __spreadValues({
1879
+ return {
1901
1880
  bgColor: this.bgColor,
1902
1881
  color: this.color,
1903
- icon: this.icon
1904
- }, this.mainButton);
1882
+ icon: this.icon,
1883
+ ...this.mainButton
1884
+ };
1905
1885
  }
1906
1886
  },
1907
1887
  methods: {
@@ -2667,7 +2647,10 @@ const _sfc_main$x = {
2667
2647
  return obj;
2668
2648
  }, {});
2669
2649
  }
2670
- return __spreadValues(__spreadValues({}, breakpointsColumns || { [`columns${this.columns}`]: this.columns }), breakpointsGap || { [`gap${this.gap}`]: this.gap });
2650
+ return {
2651
+ ...breakpointsColumns || { [`columns${this.columns}`]: this.columns },
2652
+ ...breakpointsGap || { [`gap${this.gap}`]: this.gap }
2653
+ };
2671
2654
  }
2672
2655
  }
2673
2656
  };
@@ -3178,15 +3161,15 @@ const _sfc_main$u = {
3178
3161
  },
3179
3162
  computed: {
3180
3163
  attrs() {
3181
- const _a = this.$attrs, { class: classes } = _a, attrs = __objRest(_a, ["class"]);
3164
+ const { class: classes, ...attrs } = this.$attrs;
3182
3165
  return attrs;
3183
3166
  },
3184
3167
  listeners() {
3185
- const _a = this.$attrs, { input, focus, blur } = _a, listeners = __objRest(_a, ["input", "focus", "blur"]);
3168
+ const { input, focus, blur, ...listeners } = this.$attrs;
3186
3169
  return listeners;
3187
3170
  },
3188
3171
  attrs() {
3189
- const _a = this.$attrs, { class: Class } = _a, htmlAttrs = __objRest(_a, ["class"]);
3172
+ const { class: Class, ...htmlAttrs } = this.$attrs;
3190
3173
  return htmlAttrs;
3191
3174
  },
3192
3175
  hasValue() {
@@ -3602,7 +3585,7 @@ const _sfc_main$t = {
3602
3585
  const items = this.selectedItems.map((item) => {
3603
3586
  if (!this.returnObject)
3604
3587
  return item._value;
3605
- const _a = item, { _value, _selected } = _a, Item = __objRest(_a, ["_value", "_selected"]);
3588
+ const { _value, _selected, ...Item } = item;
3606
3589
  return Item;
3607
3590
  });
3608
3591
  const selection = this.isMultipleSelect ? items : items[0] !== void 0 ? items[0] : null;
@@ -3617,12 +3600,13 @@ const _sfc_main$t = {
3617
3600
  this.$el.querySelector(`#${this.listId}_item-${index2 + 1}`).focus();
3618
3601
  },
3619
3602
  cleanLi(li) {
3620
- const _a = li, { _index, _value, _label, _selected, _focused } = _a, cleanLi = __objRest(_a, ["_index", "_value", "_label", "_selected", "_focused"]);
3603
+ const { _index, _value, _label, _selected, _focused, ...cleanLi } = li;
3621
3604
  return cleanLi;
3622
3605
  },
3623
3606
  refreshListItems() {
3624
3607
  const items = typeof this.items === "number" ? Array(this.items).fill({}) : this.items || [];
3625
- this.listItems = items.map((item, i) => __spreadProps(__spreadValues({}, item), {
3608
+ this.listItems = items.map((item, i) => ({
3609
+ ...item,
3626
3610
  _index: i,
3627
3611
  _value: item[this.itemValueKey] === void 0 ? item[this.itemLabelKey] || i : item[this.itemValueKey],
3628
3612
  _selected: item._selected || false,
@@ -3769,11 +3753,12 @@ var DetachableMixin = {
3769
3753
  let coords = { top, left, width, height };
3770
3754
  if (!this.fixed) {
3771
3755
  const { top: targetTop, left: targetLeft } = this.detachableParentEl.getBoundingClientRect();
3772
- const computedStyles2 = window.getComputedStyle(this.detachableParentEl, null);
3773
- coords = __spreadProps(__spreadValues({}, coords), {
3774
- top: top - targetTop + this.detachableParentEl.scrollTop - parseInt(computedStyles2.getPropertyValue("border-top-width")),
3775
- left: left - targetLeft + this.detachableParentEl.scrollLeft - parseInt(computedStyles2.getPropertyValue("border-left-width"))
3776
- });
3756
+ const computedStyles = window.getComputedStyle(this.detachableParentEl, null);
3757
+ coords = {
3758
+ ...coords,
3759
+ top: top - targetTop + this.detachableParentEl.scrollTop - parseInt(computedStyles.getPropertyValue("border-top-width")),
3760
+ left: left - targetLeft + this.detachableParentEl.scrollLeft - parseInt(computedStyles.getPropertyValue("border-left-width"))
3761
+ };
3777
3762
  }
3778
3763
  return coords;
3779
3764
  },
@@ -3783,12 +3768,12 @@ var DetachableMixin = {
3783
3768
  return;
3784
3769
  this.detachableEl.style.visibility = "hidden";
3785
3770
  this.detachableEl.style.display = "flex";
3786
- const computedStyles2 = window.getComputedStyle(this.detachableEl, null);
3771
+ const computedStyles = window.getComputedStyle(this.detachableEl, null);
3787
3772
  switch (this.position) {
3788
3773
  case "top": {
3789
3774
  top -= this.detachableEl.offsetHeight;
3790
3775
  if (this.alignRight) {
3791
- left += width - this.detachableEl.offsetWidth + parseInt(computedStyles2.getPropertyValue("border-right-width"));
3776
+ left += width - this.detachableEl.offsetWidth + parseInt(computedStyles.getPropertyValue("border-right-width"));
3792
3777
  } else if (!this.alignLeft)
3793
3778
  left += (width - this.detachableEl.offsetWidth) / 2;
3794
3779
  break;
@@ -3796,7 +3781,7 @@ var DetachableMixin = {
3796
3781
  case "bottom": {
3797
3782
  top += height;
3798
3783
  if (this.alignRight) {
3799
- left += width - this.detachableEl.offsetWidth + parseInt(computedStyles2.getPropertyValue("border-right-width"));
3784
+ left += width - this.detachableEl.offsetWidth + parseInt(computedStyles.getPropertyValue("border-right-width"));
3800
3785
  } else if (!this.alignLeft)
3801
3786
  left += (width - this.detachableEl.offsetWidth) / 2;
3802
3787
  break;
@@ -3812,9 +3797,9 @@ var DetachableMixin = {
3812
3797
  case "right": {
3813
3798
  left += width;
3814
3799
  if (this.alignBottom) {
3815
- top += height - this.detachableEl.offsetHeight + parseInt(computedStyles2.getPropertyValue("margin-top"));
3800
+ top += height - this.detachableEl.offsetHeight + parseInt(computedStyles.getPropertyValue("margin-top"));
3816
3801
  } else if (!this.alignTop) {
3817
- top += (height - this.detachableEl.offsetHeight) / 2 + parseInt(computedStyles2.getPropertyValue("margin-top"));
3802
+ top += (height - this.detachableEl.offsetHeight) / 2 + parseInt(computedStyles.getPropertyValue("margin-top"));
3818
3803
  }
3819
3804
  break;
3820
3805
  }
@@ -4050,15 +4035,16 @@ const _sfc_main$s = {
4050
4035
  return objectifyClasses(this.contentClass);
4051
4036
  },
4052
4037
  overlayClasses() {
4053
- return __spreadProps(__spreadValues({}, objectifyClasses(this.overlayClass)), {
4038
+ return {
4039
+ ...objectifyClasses(this.overlayClass),
4054
4040
  "w-overlay--no-pointer-event": this.showOnHover
4055
- });
4041
+ };
4056
4042
  },
4057
4043
  classes() {
4058
- return __spreadProps(__spreadValues({
4044
+ return {
4059
4045
  [this.color]: this.color,
4060
- [`${this.bgColor}--bg`]: this.bgColor
4061
- }, this.menuClasses), {
4046
+ [`${this.bgColor}--bg`]: this.bgColor,
4047
+ ...this.menuClasses,
4062
4048
  [`w-menu--${this.position}`]: !this.noPosition,
4063
4049
  [`w-menu--align-${this.alignment}`]: !this.noPosition && this.alignment,
4064
4050
  "w-menu--tile": this.tile,
@@ -4067,7 +4053,7 @@ const _sfc_main$s = {
4067
4053
  "w-menu--arrow": this.arrow,
4068
4054
  "w-menu--shadow": this.shadow,
4069
4055
  "w-menu--fixed": this.fixed
4070
- });
4056
+ };
4071
4057
  },
4072
4058
  styles() {
4073
4059
  return {
@@ -4153,7 +4139,8 @@ function render$r(_ctx, _cache, $props, $setup, $data, $options) {
4153
4139
  class: normalizeClass(["w-notification", $options.classes]),
4154
4140
  style: normalizeStyle($options.styles)
4155
4141
  }, [
4156
- createVNode(_component_w_alert, mergeProps({ class: "white--bg" }, $options.alertProps, {
4142
+ createVNode(_component_w_alert, mergeProps($options.alertProps, {
4143
+ class: $options.alertClasses,
4157
4144
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => {
4158
4145
  _ctx.$emit("update:modelValue", false);
4159
4146
  _ctx.$emit("input", false);
@@ -4163,7 +4150,7 @@ function render$r(_ctx, _cache, $props, $setup, $data, $options) {
4163
4150
  renderSlot(_ctx.$slots, "default")
4164
4151
  ]),
4165
4152
  _: 3
4166
- }, 16)
4153
+ }, 16, ["class"])
4167
4154
  ], 6)) : createCommentVNode("", true)
4168
4155
  ]),
4169
4156
  _: 3
@@ -4270,6 +4257,11 @@ const _sfc_main$r = {
4270
4257
  [`w-notification--${this.position.join(" w-notification--")}`]: true
4271
4258
  };
4272
4259
  },
4260
+ alertClasses() {
4261
+ if (this.bgColor || (this.success || this.info || this.warning || this.error) && this.plain)
4262
+ return null;
4263
+ return "white--bg";
4264
+ },
4273
4265
  styles() {
4274
4266
  return {
4275
4267
  zIndex: this.zIndex || this.zIndex === 0 || null
@@ -4736,7 +4728,8 @@ const _sfc_main$m = {
4736
4728
  }),
4737
4729
  computed: {
4738
4730
  radioItems() {
4739
- return (this.items || []).map((item, i) => __spreadProps(__spreadValues({}, item), {
4731
+ return (this.items || []).map((item, i) => ({
4732
+ ...item,
4740
4733
  _index: i,
4741
4734
  label: item[this.itemLabelKey],
4742
4735
  value: item[this.itemValueKey] === void 0 ? item[this.itemLabelKey] || i : item[this.itemValueKey],
@@ -5141,7 +5134,7 @@ const _sfc_main$k = {
5141
5134
  computed: {
5142
5135
  selectItems() {
5143
5136
  return this.items.map((item, i) => {
5144
- const obj = __spreadValues({}, item);
5137
+ const obj = { ...item };
5145
5138
  obj.value = obj[this.itemValueKey] === void 0 ? obj[this.itemLabelKey] || i : obj[this.itemValueKey];
5146
5139
  obj.index = i;
5147
5140
  return obj;
@@ -5937,10 +5930,11 @@ const _sfc_main$e = {
5937
5930
  },
5938
5931
  tabsItems() {
5939
5932
  const items = typeof this.items === "number" ? Array(this.items).fill({}) : this.items;
5940
- return items.map((item, _index) => reactive(__spreadProps(__spreadValues({}, item), {
5933
+ return items.map((item, _index) => reactive({
5934
+ ...item,
5941
5935
  _index,
5942
5936
  _disabled: !!item.disabled
5943
- })));
5937
+ }));
5944
5938
  },
5945
5939
  activeTab() {
5946
5940
  return this.tabsItems[this.activeTabIndex] || this.tabsItems[0] || {};
@@ -6794,7 +6788,7 @@ const _sfc_main$b = {
6794
6788
  },
6795
6789
  computed: {
6796
6790
  listeners() {
6797
- const _a = this.$attrs, { input, focus, blur } = _a, listeners = __objRest(_a, ["input", "focus", "blur"]);
6791
+ const { input, focus, blur, ...listeners } = this.$attrs;
6798
6792
  return listeners;
6799
6793
  },
6800
6794
  hasValue() {
@@ -6863,10 +6857,10 @@ const _sfc_main$b = {
6863
6857
  this.$refs.textarea.style.height = height + "px";
6864
6858
  },
6865
6859
  getLineHeight() {
6866
- const computedStyles2 = window.getComputedStyle(this.$refs.textarea, null);
6867
- this.lineHeight = parseFloat(computedStyles2.getPropertyValue("line-height"));
6868
- this.paddingY = parseFloat(computedStyles2.getPropertyValue("padding-top"));
6869
- this.paddingY += parseFloat(computedStyles2.getPropertyValue("padding-bottom"));
6860
+ const computedStyles = window.getComputedStyle(this.$refs.textarea, null);
6861
+ this.lineHeight = parseFloat(computedStyles.getPropertyValue("line-height"));
6862
+ this.paddingY = parseFloat(computedStyles.getPropertyValue("padding-top"));
6863
+ this.paddingY += parseFloat(computedStyles.getPropertyValue("padding-bottom"));
6870
6864
  }
6871
6865
  },
6872
6866
  mounted() {
@@ -7065,10 +7059,10 @@ const _sfc_main$8 = {
7065
7059
  return this.transition || `w-tooltip-slide-fade-${direction}`;
7066
7060
  },
7067
7061
  classes() {
7068
- return __spreadProps(__spreadValues({
7062
+ return {
7069
7063
  [this.color]: this.color,
7070
- [`${this.bgColor}--bg`]: this.bgColor
7071
- }, this.tooltipClasses), {
7064
+ [`${this.bgColor}--bg`]: this.bgColor,
7065
+ ...this.tooltipClasses,
7072
7066
  [`w-tooltip--${this.position}`]: !this.noPosition,
7073
7067
  [`w-tooltip--align-${this.alignment}`]: !this.noPosition && this.alignment,
7074
7068
  "w-tooltip--tile": this.tile,
@@ -7077,7 +7071,7 @@ const _sfc_main$8 = {
7077
7071
  "w-tooltip--fixed": this.fixed,
7078
7072
  "w-tooltip--no-border": this.noBorder || this.bgColor,
7079
7073
  "w-tooltip--custom-transition": this.transition
7080
- });
7074
+ };
7081
7075
  },
7082
7076
  styles() {
7083
7077
  return {
@@ -7310,24 +7304,24 @@ const _sfc_main$6 = {
7310
7304
  this.el.originalStyles = el.style.cssText;
7311
7305
  },
7312
7306
  show(el, done) {
7313
- const computedStyles2 = window.getComputedStyle(el, null);
7307
+ const computedStyles = window.getComputedStyle(el, null);
7314
7308
  if (this.animX) {
7315
7309
  this.el.width = el.offsetWidth;
7316
- this.el.marginLeft = computedStyles2.getPropertyValue("marginLeft");
7317
- this.el.marginRight = computedStyles2.getPropertyValue("marginRight");
7318
- this.el.paddingLeft = computedStyles2.getPropertyValue("paddingLeft");
7319
- this.el.paddingRight = computedStyles2.getPropertyValue("paddingRight");
7320
- this.el.borderLeftWidth = computedStyles2.getPropertyValue("borderLeftWidth");
7321
- this.el.borderRightWidth = computedStyles2.getPropertyValue("borderRightWidth");
7310
+ this.el.marginLeft = computedStyles.getPropertyValue("marginLeft");
7311
+ this.el.marginRight = computedStyles.getPropertyValue("marginRight");
7312
+ this.el.paddingLeft = computedStyles.getPropertyValue("paddingLeft");
7313
+ this.el.paddingRight = computedStyles.getPropertyValue("paddingRight");
7314
+ this.el.borderLeftWidth = computedStyles.getPropertyValue("borderLeftWidth");
7315
+ this.el.borderRightWidth = computedStyles.getPropertyValue("borderRightWidth");
7322
7316
  }
7323
7317
  if (this.animY) {
7324
7318
  this.el.height = el.offsetHeight;
7325
- this.el.marginTop = computedStyles2.getPropertyValue("marginTop");
7326
- this.el.marginBottom = computedStyles2.getPropertyValue("marginBottom");
7327
- this.el.paddingTop = computedStyles2.getPropertyValue("paddingTop");
7328
- this.el.paddingBottom = computedStyles2.getPropertyValue("paddingBottom");
7329
- this.el.borderTopWidth = computedStyles2.getPropertyValue("borderTopWidth");
7330
- this.el.borderBottomWidth = computedStyles2.getPropertyValue("borderBottomWidth");
7319
+ this.el.marginTop = computedStyles.getPropertyValue("marginTop");
7320
+ this.el.marginBottom = computedStyles.getPropertyValue("marginBottom");
7321
+ this.el.paddingTop = computedStyles.getPropertyValue("paddingTop");
7322
+ this.el.paddingBottom = computedStyles.getPropertyValue("paddingBottom");
7323
+ this.el.borderTopWidth = computedStyles.getPropertyValue("borderTopWidth");
7324
+ this.el.borderBottomWidth = computedStyles.getPropertyValue("borderBottomWidth");
7331
7325
  }
7332
7326
  this.applyHideStyles(el);
7333
7327
  setTimeout(() => this.applyShowStyles(el), 20);
@@ -7517,5 +7511,5 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
7517
7511
  WTransitionTwist: wTransitionTwist
7518
7512
  }, Symbol.toStringTag, { value: "Module" }));
7519
7513
  const install = WaveUI.install;
7520
- WaveUI.install = (app, options = {}) => install.call(WaveUI, app, __spreadValues({ components }, options));
7514
+ WaveUI.install = (app, options = {}) => install.call(WaveUI, app, { components, ...options });
7521
7515
  export { WaveUI as default };