wave-ui 2.32.3 → 2.35.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.
@@ -33,7 +33,7 @@ var __publicField = (obj, key, value) => {
33
33
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34
34
  return value;
35
35
  };
36
- import { reactive, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createElementVNode, withKeys, createBlock, withModifiers, createCommentVNode, renderSlot, createVNode, withCtx, mergeProps, toHandlers, createTextVNode, toDisplayString, TransitionGroup, Transition, normalizeStyle, resolveDynamicComponent, createSlots, withDirectives, vModelText, vModelDynamic, resolveDirective, KeepAlive } from "vue";
36
+ import { reactive, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createElementVNode, withKeys, createBlock, withModifiers, createCommentVNode, renderSlot, createVNode, withCtx, mergeProps, toHandlers, createTextVNode, toDisplayString, TransitionGroup, Transition, normalizeStyle, resolveDynamicComponent, withDirectives, createSlots, vShow, vModelText, vModelDynamic, resolveDirective, KeepAlive } from "vue";
37
37
  const config = reactive({
38
38
  breakpoints: {
39
39
  xs: 600,
@@ -655,13 +655,6 @@ const _sfc_main$P = {
655
655
  [item[this.itemColorKey]]: item[this.itemColorKey]
656
656
  };
657
657
  }
658
- },
659
- watch: {
660
- modelValue(array) {
661
- this.accordionItems.forEach((item, i) => {
662
- item.expanded = Array.isArray(array) && array[i] || false;
663
- });
664
- }
665
658
  }
666
659
  };
667
660
  var wAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", render$P]]);
@@ -1379,8 +1372,7 @@ const _hoisted_1$p = ["innerHTML"];
1379
1372
  function render$I(_ctx, _cache, $props, $setup, $data, $options) {
1380
1373
  const _component_w_image = resolveComponent("w-image");
1381
1374
  return openBlock(), createElementBlock("div", {
1382
- class: normalizeClass(["w-card", $options.classes]),
1383
- style: normalizeStyle($options.styles)
1375
+ class: normalizeClass(["w-card", $options.classes])
1384
1376
  }, [
1385
1377
  _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
1386
1378
  key: 0,
@@ -1413,7 +1405,7 @@ function render$I(_ctx, _cache, $props, $setup, $data, $options) {
1413
1405
  }, [
1414
1406
  renderSlot(_ctx.$slots, "actions")
1415
1407
  ], 2)) : createCommentVNode("", true)
1416
- ], 6);
1408
+ ], 2);
1417
1409
  }
1418
1410
  var wCard_vue_vue_type_style_index_0_lang = "";
1419
1411
  const _sfc_main$I = {
@@ -1460,9 +1452,6 @@ const _sfc_main$I = {
1460
1452
  "w-card--tile": this.tile,
1461
1453
  "w-card--shadow": this.shadow
1462
1454
  };
1463
- },
1464
- styles() {
1465
- return false;
1466
1455
  }
1467
1456
  }
1468
1457
  };
@@ -1513,8 +1502,8 @@ const _hoisted_4$9 = /* @__PURE__ */ createElementVNode("svg", {
1513
1502
  const _hoisted_5$8 = [
1514
1503
  _hoisted_4$9
1515
1504
  ];
1516
- const _hoisted_6$5 = ["for"];
1517
- const _hoisted_7$5 = ["for", "innerHTML"];
1505
+ const _hoisted_6$6 = ["for"];
1506
+ const _hoisted_7$6 = ["for", "innerHTML"];
1518
1507
  function render$H(_ctx, _cache, $props, $setup, $data, $options) {
1519
1508
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.formRegister && !$options.wCheckboxes ? "w-form-element" : "div"), mergeProps({ ref: "formEl" }, _ctx.formRegister && { validators: _ctx.validators, inputValue: $data.isChecked, disabled: _ctx.isDisabled }, {
1520
1509
  valid: _ctx.valid,
@@ -1570,12 +1559,12 @@ function render$H(_ctx, _cache, $props, $setup, $data, $options) {
1570
1559
  for: `w-checkbox--${_ctx._.uid}`
1571
1560
  }, [
1572
1561
  renderSlot(_ctx.$slots, "default")
1573
- ], 8, _hoisted_6$5)) : $props.label ? (openBlock(), createElementBlock("label", {
1562
+ ], 8, _hoisted_6$6)) : $props.label ? (openBlock(), createElementBlock("label", {
1574
1563
  key: 1,
1575
1564
  class: "w-checkbox__label w-form-el-shakable pl2",
1576
1565
  for: `w-checkbox--${_ctx._.uid}`,
1577
1566
  innerHTML: $props.label
1578
- }, null, 8, _hoisted_7$5)) : createCommentVNode("", true)
1567
+ }, null, 8, _hoisted_7$6)) : createCommentVNode("", true)
1579
1568
  ], 64)) : createCommentVNode("", true)
1580
1569
  ]),
1581
1570
  _: 3
@@ -1943,6 +1932,7 @@ function render$D(_ctx, _cache, $props, $setup, $data, $options) {
1943
1932
  persistent: $props.persistent,
1944
1933
  "persistent-no-animation": $props.persistentNoAnimation,
1945
1934
  onClick: $options.onOutsideClick,
1935
+ onClosed: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("closed")),
1946
1936
  "bg-color": $props.overlayColor,
1947
1937
  opacity: $props.overlayOpacity
1948
1938
  }, {
@@ -1953,8 +1943,7 @@ function render$D(_ctx, _cache, $props, $setup, $data, $options) {
1953
1943
  onAfterLeave: $options.onClose
1954
1944
  }, {
1955
1945
  default: withCtx(() => [
1956
- $data.showContent ? (openBlock(), createBlock(_component_w_card, {
1957
- key: 0,
1946
+ withDirectives(createVNode(_component_w_card, {
1958
1947
  class: normalizeClass(["w-dialog__content", $props.dialogClass]),
1959
1948
  "no-border": "",
1960
1949
  color: $props.color,
@@ -1981,7 +1970,9 @@ function render$D(_ctx, _cache, $props, $setup, $data, $options) {
1981
1970
  renderSlot(_ctx.$slots, "actions")
1982
1971
  ])
1983
1972
  } : void 0
1984
- ]), 1032, ["color", "bg-color", "class", "title-class", "content-class", "title", "style"])) : createCommentVNode("", true)
1973
+ ]), 1032, ["color", "bg-color", "class", "title-class", "content-class", "title", "style"]), [
1974
+ [vShow, $data.showContent]
1975
+ ])
1985
1976
  ]),
1986
1977
  _: 3
1987
1978
  }, 8, ["name", "onAfterLeave"])
@@ -2009,7 +2000,7 @@ const _sfc_main$D = {
2009
2000
  bgColor: { type: String },
2010
2001
  overlayOpacity: { type: [Number, String, Boolean] }
2011
2002
  },
2012
- emits: ["input", "update:modelValue", "close"],
2003
+ emits: ["input", "update:modelValue", "close", "closed"],
2013
2004
  data() {
2014
2005
  return {
2015
2006
  showWrapper: this.modelValue,
@@ -2046,7 +2037,7 @@ const _sfc_main$D = {
2046
2037
  this.showWrapper = false;
2047
2038
  this.$emit("update:modelValue", false);
2048
2039
  this.$emit("input", false);
2049
- this.$emit("close", false);
2040
+ this.$emit("close");
2050
2041
  }
2051
2042
  },
2052
2043
  watch: {
@@ -2077,7 +2068,7 @@ const _sfc_main$C = {
2077
2068
  classes() {
2078
2069
  return {
2079
2070
  [`w-divider--has-color ${this.color}`]: this.color,
2080
- "w-divider--vertical": this.vertical,
2071
+ [`w-divider--${this.vertical ? "vertical" : "horizontal"}`]: true,
2081
2072
  "w-divider--has-content": this.$slots.default
2082
2073
  };
2083
2074
  }
@@ -2643,16 +2634,15 @@ const _sfc_main$x = {
2643
2634
  };
2644
2635
  var wGrid = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", render$x]]);
2645
2636
  function render$w(_ctx, _cache, $props, $setup, $data, $options) {
2646
- return openBlock(), createBlock(resolveDynamicComponent($props.tag || "i"), mergeProps({
2647
- class: ["w-icon", $options.classes]
2648
- }, toHandlers(_ctx.$attrs), {
2637
+ return openBlock(), createBlock(resolveDynamicComponent($props.tag || "i"), mergeProps({ class: "w-icon" }, toHandlers(_ctx.$attrs), {
2638
+ class: $options.classes,
2649
2639
  role: "icon",
2650
2640
  "aria-hidden": "true",
2651
- style: $options.styles
2641
+ style: $options.readIcon() && $options.styles
2652
2642
  }), {
2653
2643
  default: withCtx(() => [
2654
- $options.ligature ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2655
- createTextVNode(toDisplayString($options.ligature.icon), 1)
2644
+ $options.hasLigature ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2645
+ createTextVNode(toDisplayString(_ctx.icon), 1)
2656
2646
  ], 64)) : createCommentVNode("", true)
2657
2647
  ]),
2658
2648
  _: 1
@@ -2685,14 +2675,12 @@ const _sfc_main$w = {
2685
2675
  },
2686
2676
  emits: [],
2687
2677
  data: () => ({
2688
- icon: ""
2678
+ icon: "",
2679
+ fontName: ""
2689
2680
  }),
2690
2681
  computed: {
2691
- ligature() {
2692
- if (!config.iconsLigature)
2693
- return false;
2694
- const [fontName, icon] = this.icon.split(" ");
2695
- return fontName === config.iconsLigature && { fontName, icon };
2682
+ hasLigature() {
2683
+ return config.iconsLigature === this.fontName;
2696
2684
  },
2697
2685
  forcedSize() {
2698
2686
  return this.size && (!isNaN(this.size) ? `${this.size}px` : this.size);
@@ -2702,7 +2690,8 @@ const _sfc_main$w = {
2702
2690
  },
2703
2691
  classes() {
2704
2692
  return {
2705
- [this.icon]: true,
2693
+ [this.fontName]: true,
2694
+ [!this.hasLigature && this.icon]: !this.hasLigature && this.icon,
2706
2695
  [this.color]: this.color,
2707
2696
  [`${this.bgColor}--bg`]: this.bgColor,
2708
2697
  [`size--${this.presetSize}`]: this.presetSize && !this.forcedSize,
@@ -2716,19 +2705,20 @@ const _sfc_main$w = {
2716
2705
  "w-icon--rotate-90": this.rotate90a,
2717
2706
  "w-icon--rotate-135": this.rotate135a,
2718
2707
  "w-icon--flip-x": this.flipX,
2719
- "w-icon--flip-y": this.flipY,
2720
- [this.ligature && this.ligature.fontName]: this.ligature
2708
+ "w-icon--flip-y": this.flipY
2721
2709
  };
2722
2710
  },
2723
2711
  styles() {
2724
2712
  return this.forcedSize && `font-size: ${this.forcedSize}`;
2725
2713
  }
2726
2714
  },
2727
- created() {
2728
- this.icon = this.$slots.default && this.$slots.default()[0].children;
2729
- },
2730
- updated() {
2731
- this.icon = this.$slots.default && this.$slots.default()[0].children;
2715
+ methods: {
2716
+ readIcon() {
2717
+ const { default: slot } = this.$slots;
2718
+ const [fontName = "", icon = ""] = typeof slot === "function" && slot()[0].children.trim().split(" ") || [];
2719
+ this.fontName = fontName;
2720
+ this.icon = icon;
2721
+ }
2732
2722
  }
2733
2723
  };
2734
2724
  var wIcon = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", render$w]]);
@@ -2909,11 +2899,11 @@ const _hoisted_2$a = ["for"];
2909
2899
  const _hoisted_3$9 = ["for", "innerHTML"];
2910
2900
  const _hoisted_4$8 = ["id", "type", "name", "placeholder", "step", "min", "max", "minlength", "maxlength", "readonly", "aria-readonly", "disabled", "required", "tabindex"];
2911
2901
  const _hoisted_5$7 = ["id", "name", "multiple", "data-progress"];
2912
- const _hoisted_6$4 = {
2902
+ const _hoisted_6$5 = {
2913
2903
  class: "w-input__no-file",
2914
2904
  key: "no-file"
2915
2905
  };
2916
- const _hoisted_7$4 = /* @__PURE__ */ createTextVNode("No file");
2906
+ const _hoisted_7$5 = /* @__PURE__ */ createTextVNode("No file");
2917
2907
  const _hoisted_8$3 = ["for"];
2918
2908
  const _hoisted_9$3 = ["for", "innerHTML"];
2919
2909
  const _hoisted_10$3 = ["for"];
@@ -3016,10 +3006,10 @@ function render$u(_ctx, _cache, $props, $setup, $data, $options) {
3016
3006
  for: `w-input--${_ctx._.uid}`
3017
3007
  }, {
3018
3008
  default: withCtx(() => [
3019
- !$data.inputFiles.length && $data.isFocused ? (openBlock(), createElementBlock("span", _hoisted_6$4, [
3009
+ !$data.inputFiles.length && $data.isFocused ? (openBlock(), createElementBlock("span", _hoisted_6$5, [
3020
3010
  renderSlot(_ctx.$slots, "no-file", {}, () => [
3021
3011
  _ctx.$slots["no-file"] === void 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3022
- _hoisted_7$4
3012
+ _hoisted_7$5
3023
3013
  ], 64)) : createCommentVNode("", true)
3024
3014
  ])
3025
3015
  ])) : createCommentVNode("", true),
@@ -3663,10 +3653,10 @@ var DetachableMixin = {
3663
3653
  alignRight: { type: Boolean },
3664
3654
  noPosition: { type: Boolean },
3665
3655
  zIndex: { type: [Number, String, Boolean] },
3666
- activator: { type: String }
3656
+ activator: { type: [String, Object, HTMLElement] }
3667
3657
  },
3668
3658
  data: () => ({
3669
- docAEventListenersHandlers: []
3659
+ docEventListenersHandlers: []
3670
3660
  }),
3671
3661
  computed: {
3672
3662
  appendToTarget() {
@@ -3697,12 +3687,22 @@ var DetachableMixin = {
3697
3687
  return this.appendToTarget;
3698
3688
  },
3699
3689
  hasSeparateActivator() {
3700
- return !this.$slots.activator && typeof this.activator === "string";
3690
+ var _a;
3691
+ if (this.$slots.activator)
3692
+ return false;
3693
+ const activatorIsString = typeof this.activator === "string";
3694
+ const activatorIsDomEl = (((_a = this.activator) == null ? void 0 : _a.$el) || this.activator) instanceof HTMLElement;
3695
+ return activatorIsString || activatorIsDomEl;
3701
3696
  },
3702
3697
  activatorEl: {
3703
3698
  get() {
3704
- if (this.hasSeparateActivator)
3699
+ var _a;
3700
+ if (this.hasSeparateActivator) {
3701
+ const activator = ((_a = this.activator) == null ? void 0 : _a.$el) || this.activator;
3702
+ if (activator instanceof HTMLElement)
3703
+ return activator;
3705
3704
  return document.querySelector(this.activator);
3705
+ }
3706
3706
  return this.$el.firstElementChild;
3707
3707
  },
3708
3708
  set() {
@@ -3716,8 +3716,29 @@ var DetachableMixin = {
3716
3716
  }
3717
3717
  },
3718
3718
  methods: {
3719
- getActivatorCoordinates(e) {
3720
- const { top, left, width, height } = (e ? e.target : this.activatorEl).getBoundingClientRect();
3719
+ async open(e) {
3720
+ if (this.delay)
3721
+ await new Promise((resolve) => setTimeout(resolve, this.delay));
3722
+ this.detachableVisible = true;
3723
+ if (this.activator)
3724
+ this.activatorEl = e.target;
3725
+ await this.insertInDOM();
3726
+ if (this.minWidth === "activator")
3727
+ this.activatorWidth = this.activatorEl.offsetWidth;
3728
+ if (!this.noPosition)
3729
+ this.computeDetachableCoords();
3730
+ this.timeoutId = setTimeout(() => {
3731
+ this.$emit("update:modelValue", true);
3732
+ this.$emit("input", true);
3733
+ this.$emit("open");
3734
+ }, 0);
3735
+ if (!this.persistent)
3736
+ document.addEventListener("mousedown", this.onOutsideMousedown);
3737
+ if (!this.noPosition)
3738
+ window.addEventListener("resize", this.onResize);
3739
+ },
3740
+ getActivatorCoordinates() {
3741
+ const { top, left, width, height } = this.activatorEl.getBoundingClientRect();
3721
3742
  let coords = { top, left, width, height };
3722
3743
  if (!this.fixed) {
3723
3744
  const { top: targetTop, left: targetLeft } = this.detachableParentEl.getBoundingClientRect();
@@ -3729,8 +3750,8 @@ var DetachableMixin = {
3729
3750
  }
3730
3751
  return coords;
3731
3752
  },
3732
- computeDetachableCoords(e) {
3733
- let { top, left, width, height } = this.getActivatorCoordinates(e);
3753
+ computeDetachableCoords() {
3754
+ let { top, left, width, height } = this.getActivatorCoordinates();
3734
3755
  this.detachableEl.style.visibility = "hidden";
3735
3756
  this.detachableEl.style.display = "flex";
3736
3757
  const computedStyles2 = window.getComputedStyle(this.detachableEl, null);
@@ -3807,6 +3828,21 @@ var DetachableMixin = {
3807
3828
  this.detachableEl.remove();
3808
3829
  this.detachableEl = null;
3809
3830
  }
3831
+ },
3832
+ bindActivatorEvents() {
3833
+ const activatorIsString = typeof this.activator === "string";
3834
+ Object.entries(this.activatorEventHandlers).forEach(([eventName, handler]) => {
3835
+ eventName = eventName.replace("mouseenter", "mouseover").replace("mouseleave", "mouseout");
3836
+ const handlerWrap = (e) => {
3837
+ var _a;
3838
+ if (activatorIsString && ((_a = e.target) == null ? void 0 : _a.matches) && e.target.matches(this.activator))
3839
+ handler(e);
3840
+ else if (e.target === this.activatorEl || this.activatorEl.contains(e.target))
3841
+ handler(e);
3842
+ };
3843
+ document.addEventListener(eventName, handlerWrap);
3844
+ this.docEventListenersHandlers.push({ eventName, handler: handlerWrap });
3845
+ });
3810
3846
  }
3811
3847
  },
3812
3848
  mounted() {
@@ -3814,31 +3850,28 @@ var DetachableMixin = {
3814
3850
  const wrapper = this.$el;
3815
3851
  if (this.$slots.activator)
3816
3852
  wrapper.parentNode.insertBefore(this.activatorEl, wrapper);
3817
- else if (this.activator) {
3818
- Object.entries(this.activatorEventHandlers).forEach(([eventName, handler]) => {
3819
- eventName = eventName.replace("mouseenter", "mouseover").replace("mouseleave", "mouseout");
3820
- const handlerWrap = (e) => {
3821
- var _a2;
3822
- if (((_a2 = e.target) == null ? void 0 : _a2.matches) && e.target.matches(this.activator))
3823
- handler(e);
3824
- };
3825
- document.addEventListener(eventName, handlerWrap);
3826
- this.docAEventListenersHandlers.push({ eventName, handler: handlerWrap });
3853
+ else if (this.activator)
3854
+ this.bindActivatorEvents();
3855
+ else {
3856
+ this.$nextTick(() => {
3857
+ this.activator && this.bindActivatorEvents();
3858
+ if (this.modelValue)
3859
+ this.toggle({ type: "click", target: this.activatorEl });
3827
3860
  });
3828
3861
  }
3829
3862
  if (this.overlay) {
3830
3863
  this.overlayEl = (_a = this.$refs.overlay) == null ? void 0 : _a.$el;
3831
3864
  wrapper.parentNode.insertBefore(this.overlayEl, wrapper);
3832
3865
  }
3833
- if (this.modelValue)
3834
- this.toggleMenu({ type: "click", target: this.activatorEl });
3866
+ if (this.modelValue && this.activator)
3867
+ this.toggle({ type: "click", target: this.activatorEl });
3835
3868
  },
3836
3869
  beforeUnmount() {
3837
3870
  var _a;
3838
3871
  this.close();
3839
3872
  this.removeFromDOM();
3840
- if (this.docAEventListenersHandlers.length) {
3841
- this.docAEventListenersHandlers.forEach(({ eventName, handler }) => {
3873
+ if (this.docEventListenersHandlers.length) {
3874
+ this.docEventListenersHandlers.forEach(({ eventName, handler }) => {
3842
3875
  document.removeEventListener(eventName, handler);
3843
3876
  });
3844
3877
  }
@@ -3873,20 +3906,23 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
3873
3906
  appear: ""
3874
3907
  }, {
3875
3908
  default: withCtx(() => [
3876
- $props.custom && _ctx.detachableVisible ? (openBlock(), createElementBlock("div", {
3909
+ $props.custom && _ctx.detachableVisible ? (openBlock(), createElementBlock("div", mergeProps({
3877
3910
  key: 0,
3878
- class: normalizeClass(["w-menu", $options.classes]),
3879
- ref: "detachable",
3911
+ class: "w-menu",
3912
+ ref: "detachable"
3913
+ }, _ctx.$attrs, {
3880
3914
  onClick: _cache[0] || (_cache[0] = ($event) => $props.hideOnMenuClick && $options.close(true)),
3881
3915
  onMouseenter: _cache[1] || (_cache[1] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = true)),
3882
3916
  onMouseleave: _cache[2] || (_cache[2] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = false, $options.close())),
3883
- style: normalizeStyle($options.styles)
3884
- }, [
3917
+ class: $options.classes,
3918
+ style: $options.styles
3919
+ }), [
3885
3920
  renderSlot(_ctx.$slots, "default")
3886
- ], 38)) : _ctx.detachableVisible ? (openBlock(), createBlock(_component_w_card, {
3921
+ ], 16)) : _ctx.detachableVisible ? (openBlock(), createBlock(_component_w_card, mergeProps({
3887
3922
  key: 1,
3888
- class: normalizeClass(["w-menu", $options.classes]),
3889
- ref: "detachable",
3923
+ class: "w-menu",
3924
+ ref: "detachable"
3925
+ }, _ctx.$attrs, {
3890
3926
  onClick: _cache[3] || (_cache[3] = ($event) => $props.hideOnMenuClick && $options.close(true)),
3891
3927
  onMouseenter: _cache[4] || (_cache[4] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = true)),
3892
3928
  onMouseleave: _cache[5] || (_cache[5] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = false, $options.close())),
@@ -3895,8 +3931,9 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
3895
3931
  "content-class": $options.contentClasses,
3896
3932
  shadow: $props.shadow,
3897
3933
  "no-border": $props.noBorder,
3898
- style: normalizeStyle($options.styles)
3899
- }, createSlots({
3934
+ class: $options.classes,
3935
+ style: $options.styles
3936
+ }), createSlots({
3900
3937
  default: withCtx(() => [
3901
3938
  renderSlot(_ctx.$slots, "default")
3902
3939
  ]),
@@ -3914,7 +3951,7 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
3914
3951
  renderSlot(_ctx.$slots, "actions")
3915
3952
  ])
3916
3953
  } : void 0
3917
- ]), 1032, ["tile", "title-class", "content-class", "shadow", "no-border", "class", "style"])) : createCommentVNode("", true)
3954
+ ]), 1040, ["tile", "title-class", "content-class", "shadow", "no-border", "class", "style"])) : createCommentVNode("", true)
3918
3955
  ]),
3919
3956
  _: 3
3920
3957
  }, 8, ["name"]),
@@ -3990,7 +4027,9 @@ const _sfc_main$s = {
3990
4027
  return objectifyClasses(this.contentClass);
3991
4028
  },
3992
4029
  overlayClasses() {
3993
- return objectifyClasses(this.overlayClass);
4030
+ return __spreadProps(__spreadValues({}, objectifyClasses(this.overlayClass)), {
4031
+ "w-overlay--no-pointer-event": this.showOnHover
4032
+ });
3994
4033
  },
3995
4034
  classes() {
3996
4035
  return __spreadProps(__spreadValues({
@@ -4045,7 +4084,7 @@ const _sfc_main$s = {
4045
4084
  methods: {
4046
4085
  toggle(e) {
4047
4086
  let shouldShowMenu = this.detachableVisible;
4048
- if ("ontouchstart" in window && this.showOnHover && e.type === "click") {
4087
+ if (typeof window !== "undefined" && "ontouchstart" in window && this.showOnHover && e.type === "click") {
4049
4088
  shouldShowMenu = !shouldShowMenu;
4050
4089
  } else if (e.type === "click" && !this.showOnHover)
4051
4090
  shouldShowMenu = !shouldShowMenu;
@@ -4062,27 +4101,6 @@ const _sfc_main$s = {
4062
4101
  else
4063
4102
  this.close();
4064
4103
  },
4065
- async open(e) {
4066
- if (this.delay)
4067
- await new Promise((resolve) => setTimeout(resolve, this.delay));
4068
- this.detachableVisible = true;
4069
- if (this.activator)
4070
- this.activatorEl = e.target;
4071
- await this.insertInDOM();
4072
- if (this.minWidth === "activator")
4073
- this.activatorWidth = this.activatorEl.offsetWidth;
4074
- if (!this.noPosition)
4075
- this.computeDetachableCoords(e);
4076
- this.timeoutId = setTimeout(() => {
4077
- this.$emit("update:modelValue", true);
4078
- this.$emit("input", true);
4079
- this.$emit("open");
4080
- }, 0);
4081
- if (!this.persistent)
4082
- document.addEventListener("mousedown", this.onOutsideMousedown);
4083
- if (!this.noPosition)
4084
- window.addEventListener("resize", this.onResize);
4085
- },
4086
4104
  async close(force = false) {
4087
4105
  if (!this.detachableVisible)
4088
4106
  return;
@@ -4265,11 +4283,11 @@ function render$q(_ctx, _cache, $props, $setup, $data, $options) {
4265
4283
  const _directive_focus = resolveDirective("focus");
4266
4284
  return openBlock(), createBlock(Transition, {
4267
4285
  name: "fade",
4268
- mode: "out-in",
4269
- appear: ""
4286
+ appear: "",
4287
+ onAfterLeave: $options.onClosed
4270
4288
  }, {
4271
4289
  default: withCtx(() => [
4272
- $props.modelValue ? withDirectives((openBlock(), createElementBlock("div", {
4290
+ _ctx.showOverlay ? withDirectives((openBlock(), createElementBlock("div", {
4273
4291
  key: 0,
4274
4292
  class: normalizeClass(["w-overlay", $options.classes]),
4275
4293
  style: normalizeStyle($props.modelValue && $options.styles || null),
@@ -4279,11 +4297,12 @@ function render$q(_ctx, _cache, $props, $setup, $data, $options) {
4279
4297
  }, [
4280
4298
  renderSlot(_ctx.$slots, "default")
4281
4299
  ], 38)), [
4300
+ [vShow, $props.modelValue],
4282
4301
  [_directive_focus]
4283
4302
  ]) : createCommentVNode("", true)
4284
4303
  ]),
4285
4304
  _: 3
4286
- });
4305
+ }, 8, ["onAfterLeave"]);
4287
4306
  }
4288
4307
  var wOverlay_vue_vue_type_style_index_0_lang = "";
4289
4308
  const _sfc_main$q = {
@@ -4296,9 +4315,10 @@ const _sfc_main$q = {
4296
4315
  persistent: { type: Boolean },
4297
4316
  persistentNoAnimation: { type: Boolean }
4298
4317
  },
4299
- emits: ["input", "update:modelValue", "click", "close"],
4318
+ emits: ["input", "update:modelValue", "click", "close", "closed"],
4300
4319
  data: () => ({
4301
- persistentAnimate: false
4320
+ persistentAnimate: false,
4321
+ showOverlay: false
4302
4322
  }),
4303
4323
  computed: {
4304
4324
  backgroundColor() {
@@ -4326,9 +4346,22 @@ const _sfc_main$q = {
4326
4346
  } else if (!this.persistent) {
4327
4347
  this.$emit("update:modelValue", false);
4328
4348
  this.$emit("input", false);
4329
- this.$emit("close", false);
4349
+ this.$emit("close");
4330
4350
  }
4331
4351
  this.$emit("click", e);
4352
+ },
4353
+ onClosed() {
4354
+ this.showOverlay = false;
4355
+ this.$emit("closed");
4356
+ }
4357
+ },
4358
+ created() {
4359
+ this.showOverlay = this.modelValue;
4360
+ },
4361
+ watch: {
4362
+ modelValue(bool) {
4363
+ if (bool)
4364
+ this.showOverlay = true;
4332
4365
  }
4333
4366
  }
4334
4367
  };
@@ -4878,8 +4911,8 @@ const _hoisted_4$5 = {
4878
4911
  class: "w-select__selection-slot"
4879
4912
  };
4880
4913
  const _hoisted_5$5 = ["value", "id", "placeholder", "disabled", "required", "tabindex"];
4881
- const _hoisted_6$3 = ["value", "name"];
4882
- const _hoisted_7$3 = ["for"];
4914
+ const _hoisted_6$4 = ["value", "name"];
4915
+ const _hoisted_7$4 = ["for"];
4883
4916
  const _hoisted_8$2 = ["for", "innerHTML"];
4884
4917
  const _hoisted_9$2 = ["for"];
4885
4918
  const _hoisted_10$2 = ["for", "innerHTML"];
@@ -4889,7 +4922,7 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) {
4889
4922
  const _component_w_menu = resolveComponent("w-menu");
4890
4923
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.formRegister ? "w-form-element" : "div"), mergeProps({ ref: "formEl" }, _ctx.formRegister && { validators: _ctx.validators, inputValue: $options.selectionString, disabled: _ctx.isDisabled, readonly: _ctx.isReadonly }, {
4891
4924
  valid: _ctx.valid,
4892
- "onUpdate:valid": _cache[9] || (_cache[9] = ($event) => _ctx.valid = $event),
4925
+ "onUpdate:valid": _cache[11] || (_cache[11] = ($event) => _ctx.valid = $event),
4893
4926
  onReset: $options.onReset,
4894
4927
  wrap: $options.hasLabel && $props.labelPosition !== "inside",
4895
4928
  class: $options.classes
@@ -4917,12 +4950,13 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) {
4917
4950
  "append-to": ($props.menuProps || {}).appendTo !== void 0 ? ($props.menuProps || {}).appendTo : ".w-app",
4918
4951
  "align-left": "",
4919
4952
  custom: "",
4920
- "min-width": "activator"
4953
+ "min-width": "activator",
4954
+ onMousedown: _cache[9] || (_cache[9] = ($event) => (_ctx.isFocused = true, _ctx.selectingItem = true)),
4955
+ onMouseup: _cache[10] || (_cache[10] = ($event) => (_ctx.isFocused = true, _ctx.selectingItem = false))
4921
4956
  }, $props.menuProps || {}), {
4922
4957
  activator: withCtx(({ on }) => [
4923
4958
  createElementVNode("div", {
4924
4959
  class: normalizeClass(["w-select__selection-wrap", $options.inputWrapClasses]),
4925
- ref: "selection-wrap",
4926
4960
  onClick: _cache[5] || (_cache[5] = ($event) => !_ctx.isDisabled && !_ctx.isReadonly && (_ctx.showMenu ? $options.closeMenu : $options.openMenu)()),
4927
4961
  role: "button",
4928
4962
  "aria-haspopup": "listbox",
@@ -4969,7 +5003,7 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) {
4969
5003
  type: "hidden",
4970
5004
  value: val.value || "",
4971
5005
  name: _ctx.inputName + ($props.multiple ? "[]" : "")
4972
- }, null, 8, _hoisted_6$3);
5006
+ }, null, 8, _hoisted_6$4);
4973
5007
  }), 128)),
4974
5008
  $props.labelPosition === "inside" && $options.showLabelInside ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
4975
5009
  _ctx.$slots.default ? (openBlock(), createElementBlock("label", {
@@ -4978,7 +5012,7 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) {
4978
5012
  for: `w-select--${_ctx._.uid}`
4979
5013
  }, [
4980
5014
  renderSlot(_ctx.$slots, "default")
4981
- ], 10, _hoisted_7$3)) : $props.label ? (openBlock(), createElementBlock("label", {
5015
+ ], 10, _hoisted_7$4)) : $props.label ? (openBlock(), createElementBlock("label", {
4982
5016
  key: 1,
4983
5017
  class: normalizeClass(["w-select__label w-select__label--inside w-form-el-shakable", _ctx.isFocused && { [_ctx.valid === false ? "error" : $props.color]: $props.color || _ctx.valid === false }]),
4984
5018
  for: `w-select--${_ctx._.uid}`,
@@ -5098,7 +5132,9 @@ const _sfc_main$k = {
5098
5132
  inputValue: [],
5099
5133
  showMenu: false,
5100
5134
  menuMinWidth: 0,
5101
- isFocused: false
5135
+ isFocused: false,
5136
+ selectingItem: false,
5137
+ selectionWrapRef: void 0
5102
5138
  }),
5103
5139
  computed: {
5104
5140
  selectItems() {
@@ -5127,7 +5163,7 @@ const _sfc_main$k = {
5127
5163
  "w-select--disabled": this.isDisabled,
5128
5164
  "w-select--readonly": this.isReadonly,
5129
5165
  [`w-select--${this.hasValue ? "filled" : "empty"}`]: true,
5130
- "w-select--focused": this.isFocused && !this.isReadonly,
5166
+ "w-select--focused": (this.isFocused || this.selectingItem) && !this.isReadonly,
5131
5167
  "w-select--dark": this.dark,
5132
5168
  "w-select--floating-label": this.hasLabel && this.labelPosition === "inside" && !this.staticLabel,
5133
5169
  "w-select--no-padding": !this.outline && !this.bgColor && !this.shadow && !this.round,
@@ -5245,8 +5281,8 @@ const _hoisted_2$5 = ["for", "innerHTML"];
5245
5281
  const _hoisted_3$5 = { class: "w-slider__track-wrap" };
5246
5282
  const _hoisted_4$4 = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-readonly"];
5247
5283
  const _hoisted_5$4 = ["id", "name", "model-value", "disabled", "readonly", "aria-readonly"];
5248
- const _hoisted_6$2 = ["for"];
5249
- const _hoisted_7$2 = { key: 0 };
5284
+ const _hoisted_6$3 = ["for"];
5285
+ const _hoisted_7$3 = { key: 0 };
5250
5286
  const _hoisted_8$1 = {
5251
5287
  key: 0,
5252
5288
  class: "w-slider__step-labels"
@@ -5322,7 +5358,7 @@ function render$j(_ctx, _cache, $props, $setup, $data, $options) {
5322
5358
  class: normalizeClass(["w-slider__thumb-label", $options.thumbClasses]),
5323
5359
  for: `button--${_ctx._.uid}`
5324
5360
  }, [
5325
- $props.thumbLabel === "droplet" ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
5361
+ $props.thumbLabel === "droplet" ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
5326
5362
  renderSlot(_ctx.$slots, "label", { value: _ctx.rangeValueScaled }, () => [
5327
5363
  createTextVNode(toDisplayString(~~_ctx.rangeValueScaled), 1)
5328
5364
  ])
@@ -5332,7 +5368,7 @@ function render$j(_ctx, _cache, $props, $setup, $data, $options) {
5332
5368
  }, () => [
5333
5369
  createTextVNode(toDisplayString(~~_ctx.rangeValueScaled), 1)
5334
5370
  ])
5335
- ], 10, _hoisted_6$2)) : createCommentVNode("", true)
5371
+ ], 10, _hoisted_6$3)) : createCommentVNode("", true)
5336
5372
  ], 4)
5337
5373
  ], 42, _hoisted_4$4),
5338
5374
  $props.stepLabels && $props.step ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
@@ -5593,8 +5629,16 @@ var wSteps = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", render$h]]);
5593
5629
  const _hoisted_1$7 = ["id", "name", "checked", "disabled", "readonly", "aria-readonly", "required", "tabindex", "aria-checked"];
5594
5630
  const _hoisted_2$4 = ["for"];
5595
5631
  const _hoisted_3$4 = ["for", "innerHTML"];
5596
- const _hoisted_4$3 = ["for"];
5597
- const _hoisted_5$3 = ["for", "innerHTML"];
5632
+ const _hoisted_4$3 = {
5633
+ key: 0,
5634
+ class: "w-switch__track"
5635
+ };
5636
+ const _hoisted_5$3 = {
5637
+ key: 1,
5638
+ class: "w-switch__thumb"
5639
+ };
5640
+ const _hoisted_6$2 = ["for"];
5641
+ const _hoisted_7$2 = ["for", "innerHTML"];
5598
5642
  function render$g(_ctx, _cache, $props, $setup, $data, $options) {
5599
5643
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.formRegister ? "w-form-element" : "div"), mergeProps({ ref: "formEl" }, _ctx.formRegister && { validators: _ctx.validators, inputValue: $data.isOn, disabled: _ctx.isDisabled, readonly: _ctx.isReadonly }, {
5600
5644
  valid: _ctx.valid,
@@ -5642,7 +5686,14 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) {
5642
5686
  _ctx.$refs.input.focus();
5643
5687
  _ctx.$refs.input.click();
5644
5688
  })
5645
- }, toHandlers(_ctx.$attrs), { class: $options.inputClasses }), null, 16),
5689
+ }, toHandlers(_ctx.$attrs), { class: $options.inputClasses }), [
5690
+ _ctx.$slots.track ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
5691
+ renderSlot(_ctx.$slots, "track")
5692
+ ])) : createCommentVNode("", true),
5693
+ _ctx.$slots.thumb ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
5694
+ renderSlot(_ctx.$slots, "thumb")
5695
+ ])) : createCommentVNode("", true)
5696
+ ], 16),
5646
5697
  $options.hasLabel && !$props.labelOnLeft ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
5647
5698
  _ctx.$slots.default ? (openBlock(), createElementBlock("label", {
5648
5699
  key: 0,
@@ -5650,12 +5701,12 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) {
5650
5701
  for: `w-switch--${_ctx._.uid}`
5651
5702
  }, [
5652
5703
  renderSlot(_ctx.$slots, "default")
5653
- ], 8, _hoisted_4$3)) : $props.label ? (openBlock(), createElementBlock("label", {
5704
+ ], 8, _hoisted_6$2)) : $props.label ? (openBlock(), createElementBlock("label", {
5654
5705
  key: 1,
5655
5706
  class: "w-switch__label w-form-el-shakable",
5656
5707
  for: `w-switch--${_ctx._.uid}`,
5657
5708
  innerHTML: $props.label
5658
- }, null, 8, _hoisted_5$3)) : createCommentVNode("", true)
5709
+ }, null, 8, _hoisted_7$2)) : createCommentVNode("", true)
5659
5710
  ], 64)) : createCommentVNode("", true)
5660
5711
  ]),
5661
5712
  _: 3
@@ -5695,6 +5746,8 @@ const _sfc_main$g = {
5695
5746
  "w-switch--disabled": this.isDisabled,
5696
5747
  "w-switch--readonly": this.isReadonly,
5697
5748
  "w-switch--ripple": this.ripple.start,
5749
+ "w-switch--custom-thumb": this.$slots.thumb,
5750
+ "w-switch--custom-track": this.$slots.track,
5698
5751
  "w-switch--rippled": this.ripple.end
5699
5752
  };
5700
5753
  },
@@ -5852,6 +5905,7 @@ const _sfc_main$e = {
5852
5905
  titleClass: { type: String },
5853
5906
  activeClass: { type: String, default: "primary" },
5854
5907
  noSlider: { type: Boolean },
5908
+ pillSlider: { type: Boolean },
5855
5909
  sliderColor: { type: String, default: "primary" },
5856
5910
  contentClass: { type: String },
5857
5911
  transition: { type: [String, Boolean], default: "" },
@@ -5898,6 +5952,7 @@ const _sfc_main$e = {
5898
5952
  return {
5899
5953
  "w-tabs--card": this.card,
5900
5954
  "w-tabs--no-slider": this.noSlider,
5955
+ "w-tabs--pill-slider": this.pillSlider,
5901
5956
  "w-tabs--fill-bar": this.fillBar,
5902
5957
  "w-tabs--init": this.init
5903
5958
  };
@@ -6883,6 +6938,10 @@ const _sfc_main$9 = {
6883
6938
  absolute: { type: Boolean },
6884
6939
  fixed: { type: Boolean },
6885
6940
  bottom: { type: Boolean },
6941
+ vertical: { type: Boolean },
6942
+ left: { type: Boolean },
6943
+ right: { type: Boolean },
6944
+ width: { type: [Number, String], default: null },
6886
6945
  height: { type: [Number, String], default: null },
6887
6946
  noBorder: { type: Boolean },
6888
6947
  shadow: { type: Boolean }
@@ -6893,19 +6952,27 @@ const _sfc_main$9 = {
6893
6952
  const h = this.height;
6894
6953
  return h && parseInt(h) == h ? h + "px" : h;
6895
6954
  },
6955
+ toolbarWidth() {
6956
+ const w = this.width;
6957
+ return w && parseInt(w) == w ? w + "px" : w;
6958
+ },
6896
6959
  classes() {
6897
6960
  return {
6898
6961
  [this.color]: !!this.color,
6899
6962
  [`${this.bgColor}--bg`]: !!this.bgColor,
6900
6963
  "w-toolbar--absolute": !!this.absolute,
6901
6964
  "w-toolbar--fixed": !!this.fixed,
6902
- [`w-toolbar--${this.bottom ? "bottom" : "top"}`]: true,
6965
+ [`w-toolbar--${this.bottom ? "bottom" : "top"}`]: !this.vertical,
6966
+ [`w-toolbar--vertical w-toolbar--${this.right ? "right" : "left"}`]: this.vertical,
6903
6967
  "w-toolbar--no-border": this.noBorder,
6904
6968
  "w-toolbar--shadow": !!this.shadow
6905
6969
  };
6906
6970
  },
6907
6971
  styles() {
6908
- return this.height ? `height: ${this.toolbarHeight}` : false;
6972
+ return {
6973
+ height: this.height && !this.vertical ? this.toolbarHeight : null,
6974
+ width: this.width && this.vertical ? this.toolbarWidth : null
6975
+ };
6909
6976
  }
6910
6977
  }
6911
6978
  };
@@ -7033,27 +7100,6 @@ const _sfc_main$8 = {
7033
7100
  else
7034
7101
  this.close();
7035
7102
  },
7036
- async open(e) {
7037
- if (this.delay)
7038
- await new Promise((resolve) => setTimeout(resolve, this.delay));
7039
- this.detachableVisible = true;
7040
- if (this.activator)
7041
- this.activatorEl = e.target;
7042
- await this.insertInDOM();
7043
- if (this.minWidth === "activator")
7044
- this.activatorWidth = this.activatorEl.offsetWidth;
7045
- if (!this.noPosition)
7046
- this.computeDetachableCoords(e);
7047
- this.timeoutId = setTimeout(() => {
7048
- this.$emit("update:modelValue", true);
7049
- this.$emit("input", true);
7050
- this.$emit("open");
7051
- }, 0);
7052
- if (!this.persistent)
7053
- document.addEventListener("mousedown", this.onOutsideMousedown);
7054
- if (!this.noPosition)
7055
- window.addEventListener("resize", this.onResize);
7056
- },
7057
7103
  async close(force = false) {
7058
7104
  if (!this.detachableVisible)
7059
7105
  return;