wave-ui 2.40.0 → 2.40.3

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,5 +1,34 @@
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;
2
7
  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
+ };
3
32
  var __publicField = (obj, key, value) => {
4
33
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
34
  return value;
@@ -63,17 +92,16 @@ const _NotificationManager$1 = class {
63
92
  };
64
93
  }
65
94
  notify(...args) {
66
- let notification = { ...this._notificationDefaults, _uid: this._uid++ };
95
+ let notification = __spreadProps(__spreadValues({}, this._notificationDefaults), { _uid: this._uid++ });
67
96
  if (typeof args[0] === "object")
68
- notification = { ...notification, ...args[0] };
97
+ notification = __spreadValues(__spreadValues({}, notification), args[0]);
69
98
  else {
70
99
  const [message, type, timeout] = args;
71
- notification = {
72
- ...notification,
100
+ notification = __spreadProps(__spreadValues({}, notification), {
73
101
  message: message || "",
74
102
  [type === void 0 ? "info" : type]: true,
75
103
  timeout: timeout || timeout === 0 ? parseFloat(timeout) : 4e3
76
- };
104
+ });
77
105
  }
78
106
  this.notifications.push(notification);
79
107
  if (~~notification.timeout !== 0)
@@ -409,7 +437,7 @@ const _WaveUI = class {
409
437
  obj[color.label] = color.color;
410
438
  color.shades.forEach((shade) => obj[shade.label] = shade.color);
411
439
  return obj;
412
- }, { ...config.colors, black: "#000", white: "#fff", transparent: "transparent", inherit: "inherit" }));
440
+ }, __spreadProps(__spreadValues({}, config.colors), { black: "#000", white: "#fff", transparent: "transparent", inherit: "inherit" })));
413
441
  __publicField(this, "config", {});
414
442
  if (_WaveUI.instance)
415
443
  return _WaveUI.instance;
@@ -634,8 +662,7 @@ const _sfc_main$P = {
634
662
  },
635
663
  updateItems() {
636
664
  const items = typeof this.items === "number" ? Array(this.items).fill({}) : this.items || [];
637
- this.accordionItems = items.map((item, _index) => ({
638
- ...item,
665
+ this.accordionItems = items.map((item, _index) => __spreadProps(__spreadValues({}, item), {
639
666
  _index,
640
667
  _expanded: this.modelValue && this.modelValue[_index],
641
668
  _disabled: !!item.disabled
@@ -814,7 +841,7 @@ const _sfc_main$N = {
814
841
  }),
815
842
  computed: {
816
843
  conf() {
817
- return config.notificationManager;
844
+ return this.$waveui.config.notificationManager;
818
845
  },
819
846
  notifications() {
820
847
  var _a;
@@ -826,7 +853,7 @@ const _sfc_main$N = {
826
853
  },
827
854
  methods: {
828
855
  notifProps(notif) {
829
- const { _value, _uid, message, timeout, ...props } = notif;
856
+ const _a = notif, { _value, _uid, message, timeout } = _a, props = __objRest(_a, ["_value", "_uid", "message", "timeout"]);
830
857
  return props;
831
858
  }
832
859
  },
@@ -846,7 +873,7 @@ const cssVars = {
846
873
  const generateColors = (config2) => {
847
874
  let styles = "";
848
875
  const { cssScope } = cssVars;
849
- const { info, warning, success, error, ...colors2 } = config2.colors;
876
+ const _a = config2.colors, { info, warning, success, error } = _a, colors2 = __objRest(_a, ["info", "warning", "success", "error"]);
850
877
  for (const color in colors2) {
851
878
  styles += `${cssScope} .${color}--bg{background-color:${config2.colors[color]}}${cssScope} .${color}{color:${config2.colors[color]}}`;
852
879
  }
@@ -1309,8 +1336,7 @@ const _sfc_main$J = {
1309
1336
  return this.hasRouter ? this.$router.resolve(this.route).href : this.route;
1310
1337
  },
1311
1338
  listeners() {
1312
- return this.route && this.hasRouter && !this.forceLink && !this.externalLink ? {
1313
- ...this.$attrs,
1339
+ return this.route && this.hasRouter && !this.forceLink && !this.externalLink ? __spreadProps(__spreadValues({}, this.$attrs), {
1314
1340
  click: (e) => {
1315
1341
  if (this.$attrs.click)
1316
1342
  this.$attrs.click(e);
@@ -1318,7 +1344,7 @@ const _sfc_main$J = {
1318
1344
  e.stopPropagation();
1319
1345
  e.preventDefault();
1320
1346
  }
1321
- } : this.$attrs;
1347
+ }) : this.$attrs;
1322
1348
  },
1323
1349
  size() {
1324
1350
  return this.xs && "xs" || this.sm && "sm" || this.lg && "lg" || this.xl && "xl" || "md";
@@ -1376,7 +1402,7 @@ function render$I(_ctx, _cache, $props, $setup, $data, $options) {
1376
1402
  }, [
1377
1403
  _ctx.$slots.title || $props.title ? (openBlock(), createElementBlock("div", {
1378
1404
  key: 0,
1379
- class: normalizeClass(["w-card__title", { "w-card__title--has-toolbar": _ctx.$slots.title && $options.titleHasToolbar, ...$options.titleClasses }])
1405
+ class: normalizeClass(["w-card__title", __spreadValues({ "w-card__title--has-toolbar": _ctx.$slots.title && $options.titleHasToolbar }, $options.titleClasses)])
1380
1406
  }, [
1381
1407
  renderSlot(_ctx.$slots, "title", {}, () => [
1382
1408
  createTextVNode(toDisplayString($props.title), 1)
@@ -1437,11 +1463,10 @@ const _sfc_main$I = {
1437
1463
  return actions && actions().map((vnode) => vnode.type.name).join("").includes("w-toolbar");
1438
1464
  },
1439
1465
  imgProps() {
1440
- return {
1466
+ return __spreadValues({
1441
1467
  tag: "div",
1442
- ratio: 1 / 2,
1443
- ...this.imageProps
1444
- };
1468
+ ratio: 1 / 2
1469
+ }, this.imageProps);
1445
1470
  },
1446
1471
  classes() {
1447
1472
  return {
@@ -1708,14 +1733,13 @@ const _sfc_main$G = {
1708
1733
  checkboxItems() {
1709
1734
  return (this.items || []).map((item, i) => {
1710
1735
  const itemValue = item[this.itemValueKey] === void 0 ? item[this.itemLabelKey] || i : item[this.itemValueKey];
1711
- return reactive({
1712
- ...item,
1736
+ return reactive(__spreadProps(__spreadValues({}, item), {
1713
1737
  label: item[this.itemLabelKey],
1714
1738
  _index: i,
1715
1739
  value: itemValue,
1716
1740
  color: item[this.itemColorKey] || this.color,
1717
1741
  _isChecked: this.modelValue && this.modelValue.includes(itemValue)
1718
- });
1742
+ }));
1719
1743
  });
1720
1744
  },
1721
1745
  classes() {
@@ -1754,7 +1778,7 @@ function render$F(_ctx, _cache, $props, $setup, $data, $options) {
1754
1778
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event)
1755
1779
  }, $options.wMenuProps), {
1756
1780
  activator: withCtx(({ on }) => [
1757
- createVNode(_component_w_button, mergeProps({ class: "w-confirm__button" }, { ..._ctx.$attrs, ...$options.buttonProps, ...on }), {
1781
+ createVNode(_component_w_button, mergeProps({ class: "w-confirm__button" }, __spreadValues(__spreadValues(__spreadValues({}, _ctx.$attrs), $options.buttonProps), on)), {
1758
1782
  default: withCtx(() => [
1759
1783
  renderSlot(_ctx.$slots, "default")
1760
1784
  ]),
@@ -1846,7 +1870,7 @@ const _sfc_main$F = {
1846
1870
  return button;
1847
1871
  },
1848
1872
  cancelButtonProps() {
1849
- const { label, ...props } = this.cancelButton;
1873
+ const _a = this.cancelButton, { label } = _a, props = __objRest(_a, ["label"]);
1850
1874
  return props;
1851
1875
  },
1852
1876
  confirmButton() {
@@ -1856,11 +1880,11 @@ const _sfc_main$F = {
1856
1880
  return button;
1857
1881
  },
1858
1882
  confirmButtonProps() {
1859
- const { label, ...props } = this.confirmButton;
1883
+ const _a = this.confirmButton, { label } = _a, props = __objRest(_a, ["label"]);
1860
1884
  return props;
1861
1885
  },
1862
1886
  wMenuProps() {
1863
- return {
1887
+ return __spreadValues({
1864
1888
  top: this.top,
1865
1889
  bottom: this.bottom,
1866
1890
  left: this.left,
@@ -1871,17 +1895,15 @@ const _sfc_main$F = {
1871
1895
  alignLeft: this.alignLeft,
1872
1896
  alignRight: this.alignRight,
1873
1897
  persistent: this.persistent,
1874
- transition: this.transition,
1875
- ...this.menu
1876
- };
1898
+ transition: this.transition
1899
+ }, this.menu);
1877
1900
  },
1878
1901
  buttonProps() {
1879
- return {
1902
+ return __spreadValues({
1880
1903
  bgColor: this.bgColor,
1881
1904
  color: this.color,
1882
- icon: this.icon,
1883
- ...this.mainButton
1884
- };
1905
+ icon: this.icon
1906
+ }, this.mainButton);
1885
1907
  }
1886
1908
  },
1887
1909
  methods: {
@@ -2053,11 +2075,11 @@ const _sfc_main$D = {
2053
2075
  }
2054
2076
  };
2055
2077
  var wDialog = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", render$D]]);
2056
- const _hoisted_1$j = ["aria-orientation"];
2078
+ const _hoisted_1$j = ["role", "aria-orientation"];
2057
2079
  function render$C(_ctx, _cache, $props, $setup, $data, $options) {
2058
2080
  return openBlock(), createElementBlock("div", {
2059
2081
  class: normalizeClass(["w-divider", $options.classes]),
2060
- role: "presentation",
2082
+ role: _ctx.$slots.default ? null : "presentation",
2061
2083
  "aria-orientation": $props.vertical ? "vertical" : "horizontal"
2062
2084
  }, [
2063
2085
  renderSlot(_ctx.$slots, "default")
@@ -2445,8 +2467,6 @@ const _sfc_main$z = {
2445
2467
  el.Validation.message = validationMessage;
2446
2468
  },
2447
2469
  reset(e) {
2448
- if (!e)
2449
- return;
2450
2470
  this.status = null;
2451
2471
  this.formElements.forEach((item) => item.reset());
2452
2472
  this.updateErrorsCount(0, true);
@@ -2647,10 +2667,7 @@ const _sfc_main$x = {
2647
2667
  return obj;
2648
2668
  }, {});
2649
2669
  }
2650
- return {
2651
- ...breakpointsColumns || { [`columns${this.columns}`]: this.columns },
2652
- ...breakpointsGap || { [`gap${this.gap}`]: this.gap }
2653
- };
2670
+ return __spreadValues(__spreadValues({}, breakpointsColumns || { [`columns${this.columns}`]: this.columns }), breakpointsGap || { [`gap${this.gap}`]: this.gap });
2654
2671
  }
2655
2672
  }
2656
2673
  };
@@ -2702,7 +2719,7 @@ const _sfc_main$w = {
2702
2719
  }),
2703
2720
  computed: {
2704
2721
  hasLigature() {
2705
- return config.iconsLigature === this.fontName;
2722
+ return this.$waveui.config.iconsLigature === this.fontName;
2706
2723
  },
2707
2724
  forcedSize() {
2708
2725
  return this.size && (!isNaN(this.size) ? `${this.size}px` : this.size);
@@ -3161,15 +3178,15 @@ const _sfc_main$u = {
3161
3178
  },
3162
3179
  computed: {
3163
3180
  attrs() {
3164
- const { class: classes, ...attrs } = this.$attrs;
3181
+ const _a = this.$attrs, { class: classes } = _a, attrs = __objRest(_a, ["class"]);
3165
3182
  return attrs;
3166
3183
  },
3167
3184
  listeners() {
3168
- const { input, focus, blur, ...listeners } = this.$attrs;
3185
+ const _a = this.$attrs, { input, focus, blur } = _a, listeners = __objRest(_a, ["input", "focus", "blur"]);
3169
3186
  return listeners;
3170
3187
  },
3171
3188
  attrs() {
3172
- const { class: Class, ...htmlAttrs } = this.$attrs;
3189
+ const _a = this.$attrs, { class: Class } = _a, htmlAttrs = __objRest(_a, ["class"]);
3173
3190
  return htmlAttrs;
3174
3191
  },
3175
3192
  hasValue() {
@@ -3585,7 +3602,7 @@ const _sfc_main$t = {
3585
3602
  const items = this.selectedItems.map((item) => {
3586
3603
  if (!this.returnObject)
3587
3604
  return item._value;
3588
- const { _value, _selected, ...Item } = item;
3605
+ const _a = item, { _value, _selected } = _a, Item = __objRest(_a, ["_value", "_selected"]);
3589
3606
  return Item;
3590
3607
  });
3591
3608
  const selection = this.isMultipleSelect ? items : items[0] !== void 0 ? items[0] : null;
@@ -3600,13 +3617,12 @@ const _sfc_main$t = {
3600
3617
  this.$el.querySelector(`#${this.listId}_item-${index2 + 1}`).focus();
3601
3618
  },
3602
3619
  cleanLi(li) {
3603
- const { _index, _value, _label, _selected, _focused, ...cleanLi } = li;
3620
+ const _a = li, { _index, _value, _label, _selected, _focused } = _a, cleanLi = __objRest(_a, ["_index", "_value", "_label", "_selected", "_focused"]);
3604
3621
  return cleanLi;
3605
3622
  },
3606
3623
  refreshListItems() {
3607
3624
  const items = typeof this.items === "number" ? Array(this.items).fill({}) : this.items || [];
3608
- this.listItems = items.map((item, i) => ({
3609
- ...item,
3625
+ this.listItems = items.map((item, i) => __spreadProps(__spreadValues({}, item), {
3610
3626
  _index: i,
3611
3627
  _value: item[this.itemValueKey] === void 0 ? item[this.itemLabelKey] || i : item[this.itemValueKey],
3612
3628
  _selected: item._selected || false,
@@ -3754,11 +3770,10 @@ var DetachableMixin = {
3754
3770
  if (!this.fixed) {
3755
3771
  const { top: targetTop, left: targetLeft } = this.detachableParentEl.getBoundingClientRect();
3756
3772
  const computedStyles = window.getComputedStyle(this.detachableParentEl, null);
3757
- coords = {
3758
- ...coords,
3773
+ coords = __spreadProps(__spreadValues({}, coords), {
3759
3774
  top: top - targetTop + this.detachableParentEl.scrollTop - parseInt(computedStyles.getPropertyValue("border-top-width")),
3760
3775
  left: left - targetLeft + this.detachableParentEl.scrollLeft - parseInt(computedStyles.getPropertyValue("border-left-width"))
3761
- };
3776
+ });
3762
3777
  }
3763
3778
  return coords;
3764
3779
  },
@@ -4035,16 +4050,15 @@ const _sfc_main$s = {
4035
4050
  return objectifyClasses(this.contentClass);
4036
4051
  },
4037
4052
  overlayClasses() {
4038
- return {
4039
- ...objectifyClasses(this.overlayClass),
4053
+ return __spreadProps(__spreadValues({}, objectifyClasses(this.overlayClass)), {
4040
4054
  "w-overlay--no-pointer-event": this.showOnHover
4041
- };
4055
+ });
4042
4056
  },
4043
4057
  classes() {
4044
- return {
4058
+ return __spreadProps(__spreadValues({
4045
4059
  [this.color]: this.color,
4046
- [`${this.bgColor}--bg`]: this.bgColor,
4047
- ...this.menuClasses,
4060
+ [`${this.bgColor}--bg`]: this.bgColor
4061
+ }, this.menuClasses), {
4048
4062
  [`w-menu--${this.position}`]: !this.noPosition,
4049
4063
  [`w-menu--align-${this.alignment}`]: !this.noPosition && this.alignment,
4050
4064
  "w-menu--tile": this.tile,
@@ -4053,7 +4067,7 @@ const _sfc_main$s = {
4053
4067
  "w-menu--arrow": this.arrow,
4054
4068
  "w-menu--shadow": this.shadow,
4055
4069
  "w-menu--fixed": this.fixed
4056
- };
4070
+ });
4057
4071
  },
4058
4072
  styles() {
4059
4073
  return {
@@ -4728,8 +4742,7 @@ const _sfc_main$m = {
4728
4742
  }),
4729
4743
  computed: {
4730
4744
  radioItems() {
4731
- return (this.items || []).map((item, i) => ({
4732
- ...item,
4745
+ return (this.items || []).map((item, i) => __spreadProps(__spreadValues({}, item), {
4733
4746
  _index: i,
4734
4747
  label: item[this.itemLabelKey],
4735
4748
  value: item[this.itemValueKey] === void 0 ? item[this.itemLabelKey] || i : item[this.itemValueKey],
@@ -5134,7 +5147,7 @@ const _sfc_main$k = {
5134
5147
  computed: {
5135
5148
  selectItems() {
5136
5149
  return this.items.map((item, i) => {
5137
- const obj = { ...item };
5150
+ const obj = __spreadValues({}, item);
5138
5151
  obj.value = obj[this.itemValueKey] === void 0 ? obj[this.itemLabelKey] || i : obj[this.itemValueKey];
5139
5152
  obj.index = i;
5140
5153
  return obj;
@@ -5930,11 +5943,10 @@ const _sfc_main$e = {
5930
5943
  },
5931
5944
  tabsItems() {
5932
5945
  const items = typeof this.items === "number" ? Array(this.items).fill({}) : this.items;
5933
- return items.map((item, _index) => reactive({
5934
- ...item,
5946
+ return items.map((item, _index) => reactive(__spreadProps(__spreadValues({}, item), {
5935
5947
  _index,
5936
5948
  _disabled: !!item.disabled
5937
- }));
5949
+ })));
5938
5950
  },
5939
5951
  activeTab() {
5940
5952
  return this.tabsItems[this.activeTabIndex] || this.tabsItems[0] || {};
@@ -6788,7 +6800,7 @@ const _sfc_main$b = {
6788
6800
  },
6789
6801
  computed: {
6790
6802
  listeners() {
6791
- const { input, focus, blur, ...listeners } = this.$attrs;
6803
+ const _a = this.$attrs, { input, focus, blur } = _a, listeners = __objRest(_a, ["input", "focus", "blur"]);
6792
6804
  return listeners;
6793
6805
  },
6794
6806
  hasValue() {
@@ -7059,10 +7071,10 @@ const _sfc_main$8 = {
7059
7071
  return this.transition || `w-tooltip-slide-fade-${direction}`;
7060
7072
  },
7061
7073
  classes() {
7062
- return {
7074
+ return __spreadProps(__spreadValues({
7063
7075
  [this.color]: this.color,
7064
- [`${this.bgColor}--bg`]: this.bgColor,
7065
- ...this.tooltipClasses,
7076
+ [`${this.bgColor}--bg`]: this.bgColor
7077
+ }, this.tooltipClasses), {
7066
7078
  [`w-tooltip--${this.position}`]: !this.noPosition,
7067
7079
  [`w-tooltip--align-${this.alignment}`]: !this.noPosition && this.alignment,
7068
7080
  "w-tooltip--tile": this.tile,
@@ -7071,7 +7083,7 @@ const _sfc_main$8 = {
7071
7083
  "w-tooltip--fixed": this.fixed,
7072
7084
  "w-tooltip--no-border": this.noBorder || this.bgColor,
7073
7085
  "w-tooltip--custom-transition": this.transition
7074
- };
7086
+ });
7075
7087
  },
7076
7088
  styles() {
7077
7089
  return {
@@ -7511,5 +7523,5 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
7511
7523
  WTransitionTwist: wTransitionTwist
7512
7524
  }, Symbol.toStringTag, { value: "Module" }));
7513
7525
  const install = WaveUI.install;
7514
- WaveUI.install = (app, options = {}) => install.call(WaveUI, app, { components, ...options });
7526
+ WaveUI.install = (app, options = {}) => install.call(WaveUI, app, __spreadValues({ components }, options));
7515
7527
  export { WaveUI as default };