wave-ui 2.32.2 → 2.34.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
  };
@@ -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
  }
@@ -3663,10 +3654,10 @@ var DetachableMixin = {
3663
3654
  alignRight: { type: Boolean },
3664
3655
  noPosition: { type: Boolean },
3665
3656
  zIndex: { type: [Number, String, Boolean] },
3666
- activator: { type: String }
3657
+ activator: { type: [String, Object, HTMLElement] }
3667
3658
  },
3668
3659
  data: () => ({
3669
- docAEventListenersHandlers: []
3660
+ docEventListenersHandlers: []
3670
3661
  }),
3671
3662
  computed: {
3672
3663
  appendToTarget() {
@@ -3697,12 +3688,22 @@ var DetachableMixin = {
3697
3688
  return this.appendToTarget;
3698
3689
  },
3699
3690
  hasSeparateActivator() {
3700
- return !this.$slots.activator && typeof this.activator === "string";
3691
+ var _a;
3692
+ if (this.$slots.activator)
3693
+ return false;
3694
+ const activatorIsString = typeof this.activator === "string";
3695
+ const activatorIsDomEl = (((_a = this.activator) == null ? void 0 : _a.$el) || this.activator) instanceof HTMLElement;
3696
+ return activatorIsString || activatorIsDomEl;
3701
3697
  },
3702
3698
  activatorEl: {
3703
3699
  get() {
3704
- if (this.hasSeparateActivator)
3700
+ var _a;
3701
+ if (this.hasSeparateActivator) {
3702
+ const activator = ((_a = this.activator) == null ? void 0 : _a.$el) || this.activator;
3703
+ if (activator instanceof HTMLElement)
3704
+ return activator;
3705
3705
  return document.querySelector(this.activator);
3706
+ }
3706
3707
  return this.$el.firstElementChild;
3707
3708
  },
3708
3709
  set() {
@@ -3716,8 +3717,29 @@ var DetachableMixin = {
3716
3717
  }
3717
3718
  },
3718
3719
  methods: {
3719
- getActivatorCoordinates(e) {
3720
- const { top, left, width, height } = (e ? e.target : this.activatorEl).getBoundingClientRect();
3720
+ async open(e) {
3721
+ if (this.delay)
3722
+ await new Promise((resolve) => setTimeout(resolve, this.delay));
3723
+ this.detachableVisible = true;
3724
+ if (this.activator)
3725
+ this.activatorEl = e.target;
3726
+ await this.insertInDOM();
3727
+ if (this.minWidth === "activator")
3728
+ this.activatorWidth = this.activatorEl.offsetWidth;
3729
+ if (!this.noPosition)
3730
+ this.computeDetachableCoords();
3731
+ this.timeoutId = setTimeout(() => {
3732
+ this.$emit("update:modelValue", true);
3733
+ this.$emit("input", true);
3734
+ this.$emit("open");
3735
+ }, 0);
3736
+ if (!this.persistent)
3737
+ document.addEventListener("mousedown", this.onOutsideMousedown);
3738
+ if (!this.noPosition)
3739
+ window.addEventListener("resize", this.onResize);
3740
+ },
3741
+ getActivatorCoordinates() {
3742
+ const { top, left, width, height } = this.activatorEl.getBoundingClientRect();
3721
3743
  let coords = { top, left, width, height };
3722
3744
  if (!this.fixed) {
3723
3745
  const { top: targetTop, left: targetLeft } = this.detachableParentEl.getBoundingClientRect();
@@ -3729,8 +3751,8 @@ var DetachableMixin = {
3729
3751
  }
3730
3752
  return coords;
3731
3753
  },
3732
- computeDetachableCoords(e) {
3733
- let { top, left, width, height } = this.getActivatorCoordinates(e);
3754
+ computeDetachableCoords() {
3755
+ let { top, left, width, height } = this.getActivatorCoordinates();
3734
3756
  this.detachableEl.style.visibility = "hidden";
3735
3757
  this.detachableEl.style.display = "flex";
3736
3758
  const computedStyles2 = window.getComputedStyle(this.detachableEl, null);
@@ -3807,6 +3829,21 @@ var DetachableMixin = {
3807
3829
  this.detachableEl.remove();
3808
3830
  this.detachableEl = null;
3809
3831
  }
3832
+ },
3833
+ bindActivatorEvents() {
3834
+ const activatorIsString = typeof this.activator === "string";
3835
+ Object.entries(this.activatorEventHandlers).forEach(([eventName, handler]) => {
3836
+ eventName = eventName.replace("mouseenter", "mouseover").replace("mouseleave", "mouseout");
3837
+ const handlerWrap = (e) => {
3838
+ var _a;
3839
+ if (activatorIsString && ((_a = e.target) == null ? void 0 : _a.matches) && e.target.matches(this.activator))
3840
+ handler(e);
3841
+ else if (e.target === this.activatorEl || this.activatorEl.contains(e.target))
3842
+ handler(e);
3843
+ };
3844
+ document.addEventListener(eventName, handlerWrap);
3845
+ this.docEventListenersHandlers.push({ eventName, handler: handlerWrap });
3846
+ });
3810
3847
  }
3811
3848
  },
3812
3849
  mounted() {
@@ -3814,31 +3851,28 @@ var DetachableMixin = {
3814
3851
  const wrapper = this.$el;
3815
3852
  if (this.$slots.activator)
3816
3853
  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 });
3854
+ else if (this.activator)
3855
+ this.bindActivatorEvents();
3856
+ else {
3857
+ this.$nextTick(() => {
3858
+ this.activator && this.bindActivatorEvents();
3859
+ if (this.modelValue)
3860
+ this.toggle({ type: "click", target: this.activatorEl });
3827
3861
  });
3828
3862
  }
3829
3863
  if (this.overlay) {
3830
3864
  this.overlayEl = (_a = this.$refs.overlay) == null ? void 0 : _a.$el;
3831
3865
  wrapper.parentNode.insertBefore(this.overlayEl, wrapper);
3832
3866
  }
3833
- if (this.modelValue)
3834
- this.toggleMenu({ type: "click", target: this.activatorEl });
3867
+ if (this.modelValue && this.activator)
3868
+ this.toggle({ type: "click", target: this.activatorEl });
3835
3869
  },
3836
3870
  beforeUnmount() {
3837
3871
  var _a;
3838
3872
  this.close();
3839
3873
  this.removeFromDOM();
3840
- if (this.docAEventListenersHandlers.length) {
3841
- this.docAEventListenersHandlers.forEach(({ eventName, handler }) => {
3874
+ if (this.docEventListenersHandlers.length) {
3875
+ this.docEventListenersHandlers.forEach(({ eventName, handler }) => {
3842
3876
  document.removeEventListener(eventName, handler);
3843
3877
  });
3844
3878
  }
@@ -3873,20 +3907,23 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
3873
3907
  appear: ""
3874
3908
  }, {
3875
3909
  default: withCtx(() => [
3876
- $props.custom && _ctx.detachableVisible ? (openBlock(), createElementBlock("div", {
3910
+ $props.custom && _ctx.detachableVisible ? (openBlock(), createElementBlock("div", mergeProps({
3877
3911
  key: 0,
3878
- class: normalizeClass(["w-menu", $options.classes]),
3879
- ref: "detachable",
3912
+ class: "w-menu",
3913
+ ref: "detachable"
3914
+ }, _ctx.$attrs, {
3880
3915
  onClick: _cache[0] || (_cache[0] = ($event) => $props.hideOnMenuClick && $options.close(true)),
3881
3916
  onMouseenter: _cache[1] || (_cache[1] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = true)),
3882
3917
  onMouseleave: _cache[2] || (_cache[2] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = false, $options.close())),
3883
- style: normalizeStyle($options.styles)
3884
- }, [
3918
+ class: $options.classes,
3919
+ style: $options.styles
3920
+ }), [
3885
3921
  renderSlot(_ctx.$slots, "default")
3886
- ], 38)) : _ctx.detachableVisible ? (openBlock(), createBlock(_component_w_card, {
3922
+ ], 16)) : _ctx.detachableVisible ? (openBlock(), createBlock(_component_w_card, mergeProps({
3887
3923
  key: 1,
3888
- class: normalizeClass(["w-menu", $options.classes]),
3889
- ref: "detachable",
3924
+ class: "w-menu",
3925
+ ref: "detachable"
3926
+ }, _ctx.$attrs, {
3890
3927
  onClick: _cache[3] || (_cache[3] = ($event) => $props.hideOnMenuClick && $options.close(true)),
3891
3928
  onMouseenter: _cache[4] || (_cache[4] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = true)),
3892
3929
  onMouseleave: _cache[5] || (_cache[5] = ($event) => $props.showOnHover && (_ctx.hoveringMenu = false, $options.close())),
@@ -3895,8 +3932,9 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
3895
3932
  "content-class": $options.contentClasses,
3896
3933
  shadow: $props.shadow,
3897
3934
  "no-border": $props.noBorder,
3898
- style: normalizeStyle($options.styles)
3899
- }, createSlots({
3935
+ class: $options.classes,
3936
+ style: $options.styles
3937
+ }), createSlots({
3900
3938
  default: withCtx(() => [
3901
3939
  renderSlot(_ctx.$slots, "default")
3902
3940
  ]),
@@ -3914,7 +3952,7 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) {
3914
3952
  renderSlot(_ctx.$slots, "actions")
3915
3953
  ])
3916
3954
  } : void 0
3917
- ]), 1032, ["tile", "title-class", "content-class", "shadow", "no-border", "class", "style"])) : createCommentVNode("", true)
3955
+ ]), 1040, ["tile", "title-class", "content-class", "shadow", "no-border", "class", "style"])) : createCommentVNode("", true)
3918
3956
  ]),
3919
3957
  _: 3
3920
3958
  }, 8, ["name"]),
@@ -3990,7 +4028,9 @@ const _sfc_main$s = {
3990
4028
  return objectifyClasses(this.contentClass);
3991
4029
  },
3992
4030
  overlayClasses() {
3993
- return objectifyClasses(this.overlayClass);
4031
+ return __spreadProps(__spreadValues({}, objectifyClasses(this.overlayClass)), {
4032
+ "w-overlay--no-pointer-event": this.showOnHover
4033
+ });
3994
4034
  },
3995
4035
  classes() {
3996
4036
  return __spreadProps(__spreadValues({
@@ -4045,7 +4085,7 @@ const _sfc_main$s = {
4045
4085
  methods: {
4046
4086
  toggle(e) {
4047
4087
  let shouldShowMenu = this.detachableVisible;
4048
- if ("ontouchstart" in window && this.showOnHover && e.type === "click") {
4088
+ if (typeof window !== "undefined" && "ontouchstart" in window && this.showOnHover && e.type === "click") {
4049
4089
  shouldShowMenu = !shouldShowMenu;
4050
4090
  } else if (e.type === "click" && !this.showOnHover)
4051
4091
  shouldShowMenu = !shouldShowMenu;
@@ -4062,27 +4102,6 @@ const _sfc_main$s = {
4062
4102
  else
4063
4103
  this.close();
4064
4104
  },
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
4105
  async close(force = false) {
4087
4106
  if (!this.detachableVisible)
4088
4107
  return;
@@ -4265,11 +4284,11 @@ function render$q(_ctx, _cache, $props, $setup, $data, $options) {
4265
4284
  const _directive_focus = resolveDirective("focus");
4266
4285
  return openBlock(), createBlock(Transition, {
4267
4286
  name: "fade",
4268
- mode: "out-in",
4269
- appear: ""
4287
+ appear: "",
4288
+ onAfterLeave: $options.onClosed
4270
4289
  }, {
4271
4290
  default: withCtx(() => [
4272
- $props.modelValue ? withDirectives((openBlock(), createElementBlock("div", {
4291
+ _ctx.showOverlay ? withDirectives((openBlock(), createElementBlock("div", {
4273
4292
  key: 0,
4274
4293
  class: normalizeClass(["w-overlay", $options.classes]),
4275
4294
  style: normalizeStyle($props.modelValue && $options.styles || null),
@@ -4279,11 +4298,12 @@ function render$q(_ctx, _cache, $props, $setup, $data, $options) {
4279
4298
  }, [
4280
4299
  renderSlot(_ctx.$slots, "default")
4281
4300
  ], 38)), [
4301
+ [vShow, $props.modelValue],
4282
4302
  [_directive_focus]
4283
4303
  ]) : createCommentVNode("", true)
4284
4304
  ]),
4285
4305
  _: 3
4286
- });
4306
+ }, 8, ["onAfterLeave"]);
4287
4307
  }
4288
4308
  var wOverlay_vue_vue_type_style_index_0_lang = "";
4289
4309
  const _sfc_main$q = {
@@ -4296,9 +4316,10 @@ const _sfc_main$q = {
4296
4316
  persistent: { type: Boolean },
4297
4317
  persistentNoAnimation: { type: Boolean }
4298
4318
  },
4299
- emits: ["input", "update:modelValue", "click", "close"],
4319
+ emits: ["input", "update:modelValue", "click", "close", "closed"],
4300
4320
  data: () => ({
4301
- persistentAnimate: false
4321
+ persistentAnimate: false,
4322
+ showOverlay: false
4302
4323
  }),
4303
4324
  computed: {
4304
4325
  backgroundColor() {
@@ -4326,9 +4347,22 @@ const _sfc_main$q = {
4326
4347
  } else if (!this.persistent) {
4327
4348
  this.$emit("update:modelValue", false);
4328
4349
  this.$emit("input", false);
4329
- this.$emit("close", false);
4350
+ this.$emit("close");
4330
4351
  }
4331
4352
  this.$emit("click", e);
4353
+ },
4354
+ onClosed() {
4355
+ this.showOverlay = false;
4356
+ this.$emit("closed");
4357
+ }
4358
+ },
4359
+ created() {
4360
+ this.showOverlay = this.modelValue;
4361
+ },
4362
+ watch: {
4363
+ modelValue(bool) {
4364
+ if (bool)
4365
+ this.showOverlay = true;
4332
4366
  }
4333
4367
  }
4334
4368
  };
@@ -4889,7 +4923,7 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) {
4889
4923
  const _component_w_menu = resolveComponent("w-menu");
4890
4924
  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
4925
  valid: _ctx.valid,
4892
- "onUpdate:valid": _cache[9] || (_cache[9] = ($event) => _ctx.valid = $event),
4926
+ "onUpdate:valid": _cache[11] || (_cache[11] = ($event) => _ctx.valid = $event),
4893
4927
  onReset: $options.onReset,
4894
4928
  wrap: $options.hasLabel && $props.labelPosition !== "inside",
4895
4929
  class: $options.classes
@@ -4917,12 +4951,13 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) {
4917
4951
  "append-to": ($props.menuProps || {}).appendTo !== void 0 ? ($props.menuProps || {}).appendTo : ".w-app",
4918
4952
  "align-left": "",
4919
4953
  custom: "",
4920
- "min-width": "activator"
4954
+ "min-width": "activator",
4955
+ onMousedown: _cache[9] || (_cache[9] = ($event) => (_ctx.isFocused = true, _ctx.selectingItem = true)),
4956
+ onMouseup: _cache[10] || (_cache[10] = ($event) => (_ctx.isFocused = true, _ctx.selectingItem = false))
4921
4957
  }, $props.menuProps || {}), {
4922
4958
  activator: withCtx(({ on }) => [
4923
4959
  createElementVNode("div", {
4924
4960
  class: normalizeClass(["w-select__selection-wrap", $options.inputWrapClasses]),
4925
- ref: "selection-wrap",
4926
4961
  onClick: _cache[5] || (_cache[5] = ($event) => !_ctx.isDisabled && !_ctx.isReadonly && (_ctx.showMenu ? $options.closeMenu : $options.openMenu)()),
4927
4962
  role: "button",
4928
4963
  "aria-haspopup": "listbox",
@@ -5098,7 +5133,9 @@ const _sfc_main$k = {
5098
5133
  inputValue: [],
5099
5134
  showMenu: false,
5100
5135
  menuMinWidth: 0,
5101
- isFocused: false
5136
+ isFocused: false,
5137
+ selectingItem: false,
5138
+ selectionWrapRef: void 0
5102
5139
  }),
5103
5140
  computed: {
5104
5141
  selectItems() {
@@ -5127,7 +5164,7 @@ const _sfc_main$k = {
5127
5164
  "w-select--disabled": this.isDisabled,
5128
5165
  "w-select--readonly": this.isReadonly,
5129
5166
  [`w-select--${this.hasValue ? "filled" : "empty"}`]: true,
5130
- "w-select--focused": this.isFocused && !this.isReadonly,
5167
+ "w-select--focused": (this.isFocused || this.selectingItem) && !this.isReadonly,
5131
5168
  "w-select--dark": this.dark,
5132
5169
  "w-select--floating-label": this.hasLabel && this.labelPosition === "inside" && !this.staticLabel,
5133
5170
  "w-select--no-padding": !this.outline && !this.bgColor && !this.shadow && !this.round,
@@ -5736,10 +5773,12 @@ var wSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", render$g]]);
5736
5773
  const _hoisted_1$6 = { class: "w-tabs__content" };
5737
5774
  function render$f(_ctx, _cache, $props, $setup, $data, $options) {
5738
5775
  return openBlock(), createElementBlock("div", _hoisted_1$6, [
5739
- renderSlot(_ctx.$slots, "default")
5776
+ renderSlot(_ctx.$slots, "default", { item: $props.item })
5740
5777
  ]);
5741
5778
  }
5742
- const _sfc_main$f = {};
5779
+ const _sfc_main$f = {
5780
+ props: { item: Object }
5781
+ };
5743
5782
  var TabContent = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", render$f]]);
5744
5783
  const _hoisted_1$5 = ["onClick", "onFocus", "tabindex", "onKeypress", "aria-selected"];
5745
5784
  const _hoisted_2$3 = ["innerHTML"];
@@ -5807,27 +5846,29 @@ function render$e(_ctx, _cache, $props, $setup, $data, $options) {
5807
5846
  (openBlock(), createBlock(KeepAlive, null, [
5808
5847
  (openBlock(), createBlock(_component_tab_content, {
5809
5848
  key: $options.activeTab._index,
5849
+ item: $options.activeTab,
5810
5850
  class: normalizeClass($props.contentClass)
5811
5851
  }, {
5812
- default: withCtx(() => [
5813
- _ctx.$slots[`item-content.${$options.activeTab.id || $options.activeTab._index + 1}`] ? renderSlot(_ctx.$slots, `item-content.${$options.activeTab.id || $options.activeTab._index + 1}`, {
5852
+ default: withCtx(({ item }) => [
5853
+ _ctx.$slots[`item-content.${item._index + 1}`] ? renderSlot(_ctx.$slots, `item-content.${item._index + 1}`, {
5814
5854
  key: 0,
5815
- item: $options.getOriginalItem($options.activeTab),
5816
- index: $options.activeTab._index + 1,
5817
- active: $options.activeTab._index === _ctx.activeTabIndex
5855
+ item: $options.getOriginalItem(item),
5856
+ index: item._index + 1,
5857
+ active: item._index === $options.activeTab._index
5818
5858
  }) : renderSlot(_ctx.$slots, "item-content", {
5819
5859
  key: 1,
5820
- item: $options.getOriginalItem($options.activeTab),
5821
- index: $options.activeTab._index + 1,
5822
- active: $options.activeTab._index === _ctx.activeTabIndex
5860
+ item: $options.getOriginalItem(item),
5861
+ index: item._index + 1,
5862
+ active: item._index === $options.activeTab._index
5823
5863
  }, () => [
5824
- createElementVNode("div", {
5825
- innerHTML: $options.activeTab[$props.itemContentKey]
5826
- }, null, 8, _hoisted_5$2)
5864
+ item[$props.itemContentKey] ? (openBlock(), createElementBlock("div", {
5865
+ key: 0,
5866
+ innerHTML: item[$props.itemContentKey]
5867
+ }, null, 8, _hoisted_5$2)) : createCommentVNode("", true)
5827
5868
  ])
5828
5869
  ]),
5829
5870
  _: 3
5830
- }, 8, ["class"]))
5871
+ }, 8, ["item", "class"]))
5831
5872
  ], 1024))
5832
5873
  ]),
5833
5874
  _: 3
@@ -5848,6 +5889,7 @@ const _sfc_main$e = {
5848
5889
  titleClass: { type: String },
5849
5890
  activeClass: { type: String, default: "primary" },
5850
5891
  noSlider: { type: Boolean },
5892
+ pillSlider: { type: Boolean },
5851
5893
  sliderColor: { type: String, default: "primary" },
5852
5894
  contentClass: { type: String },
5853
5895
  transition: { type: [String, Boolean], default: "" },
@@ -5894,6 +5936,7 @@ const _sfc_main$e = {
5894
5936
  return {
5895
5937
  "w-tabs--card": this.card,
5896
5938
  "w-tabs--no-slider": this.noSlider,
5939
+ "w-tabs--pill-slider": this.pillSlider,
5897
5940
  "w-tabs--fill-bar": this.fillBar,
5898
5941
  "w-tabs--init": this.init
5899
5942
  };
@@ -6879,6 +6922,10 @@ const _sfc_main$9 = {
6879
6922
  absolute: { type: Boolean },
6880
6923
  fixed: { type: Boolean },
6881
6924
  bottom: { type: Boolean },
6925
+ vertical: { type: Boolean },
6926
+ left: { type: Boolean },
6927
+ right: { type: Boolean },
6928
+ width: { type: [Number, String], default: null },
6882
6929
  height: { type: [Number, String], default: null },
6883
6930
  noBorder: { type: Boolean },
6884
6931
  shadow: { type: Boolean }
@@ -6889,19 +6936,27 @@ const _sfc_main$9 = {
6889
6936
  const h = this.height;
6890
6937
  return h && parseInt(h) == h ? h + "px" : h;
6891
6938
  },
6939
+ toolbarWidth() {
6940
+ const w = this.width;
6941
+ return w && parseInt(w) == w ? w + "px" : w;
6942
+ },
6892
6943
  classes() {
6893
6944
  return {
6894
6945
  [this.color]: !!this.color,
6895
6946
  [`${this.bgColor}--bg`]: !!this.bgColor,
6896
6947
  "w-toolbar--absolute": !!this.absolute,
6897
6948
  "w-toolbar--fixed": !!this.fixed,
6898
- [`w-toolbar--${this.bottom ? "bottom" : "top"}`]: true,
6949
+ [`w-toolbar--${this.bottom ? "bottom" : "top"}`]: !this.vertical,
6950
+ [`w-toolbar--vertical w-toolbar--${this.right ? "right" : "left"}`]: this.vertical,
6899
6951
  "w-toolbar--no-border": this.noBorder,
6900
6952
  "w-toolbar--shadow": !!this.shadow
6901
6953
  };
6902
6954
  },
6903
6955
  styles() {
6904
- return this.height ? `height: ${this.toolbarHeight}` : false;
6956
+ return {
6957
+ height: this.height && !this.vertical ? this.toolbarHeight : null,
6958
+ width: this.width && this.vertical ? this.toolbarWidth : null
6959
+ };
6905
6960
  }
6906
6961
  }
6907
6962
  };
@@ -7029,27 +7084,6 @@ const _sfc_main$8 = {
7029
7084
  else
7030
7085
  this.close();
7031
7086
  },
7032
- async open(e) {
7033
- if (this.delay)
7034
- await new Promise((resolve) => setTimeout(resolve, this.delay));
7035
- this.detachableVisible = true;
7036
- if (this.activator)
7037
- this.activatorEl = e.target;
7038
- await this.insertInDOM();
7039
- if (this.minWidth === "activator")
7040
- this.activatorWidth = this.activatorEl.offsetWidth;
7041
- if (!this.noPosition)
7042
- this.computeDetachableCoords(e);
7043
- this.timeoutId = setTimeout(() => {
7044
- this.$emit("update:modelValue", true);
7045
- this.$emit("input", true);
7046
- this.$emit("open");
7047
- }, 0);
7048
- if (!this.persistent)
7049
- document.addEventListener("mousedown", this.onOutsideMousedown);
7050
- if (!this.noPosition)
7051
- window.addEventListener("resize", this.onResize);
7052
- },
7053
7087
  async close(force = false) {
7054
7088
  if (!this.detachableVisible)
7055
7089
  return;