wave-ui 1.63.0 → 1.64.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.
@@ -1481,7 +1481,11 @@ const __vue2_script$L = {
1481
1481
  computed: {
1482
1482
  buttonProps() {
1483
1483
  const { tooltip, tooltipProps, ...props } = this.$props;
1484
- return { ...props, ...this.$attrs };
1484
+ return {
1485
+ ...props,
1486
+ ...this.$attrs,
1487
+ class: this.tooltip && this.$vnode.data.staticClass
1488
+ };
1485
1489
  }
1486
1490
  }
1487
1491
  };
@@ -4818,7 +4822,7 @@ var render$l = function() {
4818
4822
  !_vm.isDisabled && !_vm.isReadonly && (_vm.showMenu ? _vm.closeMenu : _vm.openMenu)();
4819
4823
  } } }, [_vm.innerIconLeft ? _c("w-icon", { staticClass: "w-select__icon w-select__icon--inner-left", attrs: { "tag": "label" }, on: { "click": function($event) {
4820
4824
  return _vm.$emit("click:inner-icon-left", $event);
4821
- } } }, [_vm._v(_vm._s(_vm.innerIconLeft))]) : _vm._e(), _vm.$scopedSlots.selection ? _c("div", { staticClass: "w-select__selection-slot" }, [_vm._t("selection", null, { "item": _vm.multiple ? _vm.inputValue : _vm.inputValue[0] })], 2) : _vm._e(), _c("input", { ref: "selection-input", staticClass: "w-select__selection", attrs: { "type": "text", "id": "w-select--" + _vm._uid, "placeholder": !_vm.$scopedSlots.selection && _vm.placeholder || null, "disabled": _vm.isDisabled || null, "readonly": "", "aria-readonly": "true", "required": _vm.required || null, "tabindex": _vm.tabindex || null, "autocomplete": "off" }, domProps: { "value": _vm.$scopedSlots.selection ? "" : _vm.selectionString }, on: { "focus": function($event) {
4825
+ } } }, [_vm._v(_vm._s(_vm.innerIconLeft))]) : _vm._e(), _vm.$scopedSlots.selection ? _c("div", { staticClass: "w-select__selection-slot" }, [_vm._t("selection", null, { "item": _vm.multiple ? _vm.inputValue : _vm.inputValue[0] })], 2) : _vm._e(), _c("div", { ref: "selection-input", staticClass: "w-select__selection", class: { "w-select__selection--placeholder": !_vm.$scopedSlots.selection && !_vm.selectionString && _vm.placeholder }, attrs: { "contenteditable": _vm.isDisabled || _vm.isReadonly ? "false" : "true", "id": "w-select--" + _vm._uid, "disabled": _vm.isDisabled || null, "readonly": "", "aria-readonly": "true", "tabindex": _vm.tabindex || null }, domProps: { "innerHTML": _vm._s((_vm.$scopedSlots.selection ? "" : _vm.selectionString) || _vm.placeholder) }, on: { "focus": function($event) {
4822
4826
  !_vm.isDisabled && !_vm.isReadonly && _vm.onFocus($event);
4823
4827
  }, "blur": _vm.onBlur, "keydown": function($event) {
4824
4828
  !_vm.isDisabled && !_vm.isReadonly && _vm.onKeydown($event);
@@ -4886,7 +4890,8 @@ const __vue2_script$l = {
4886
4890
  dark: { type: Boolean },
4887
4891
  returnObject: { type: Boolean },
4888
4892
  noUnselect: { type: Boolean },
4889
- menuProps: { type: Object }
4893
+ menuProps: { type: Object },
4894
+ fitToContent: { type: Boolean }
4890
4895
  },
4891
4896
  emits: ["input", "update:modelValue", "focus", "blur", "item-click", "item-select", "click:inner-icon-left", "click:inner-icon-right"],
4892
4897
  data: () => ({
@@ -4923,6 +4928,7 @@ const __vue2_script$l = {
4923
4928
  return {
4924
4929
  "w-select": true,
4925
4930
  "w-select--disabled": this.isDisabled,
4931
+ "w-select--fit-to-content": this.fitToContent,
4926
4932
  "w-select--readonly": this.isReadonly,
4927
4933
  [`w-select--${this.hasValue ? "filled" : "empty"}`]: true,
4928
4934
  "w-select--focused": (this.isFocused || this.showMenu) && !this.isReadonly,
@@ -4952,12 +4958,14 @@ const __vue2_script$l = {
4952
4958
  onFocus(e) {
4953
4959
  this.isFocused = true;
4954
4960
  this.$emit("focus", e);
4961
+ return false;
4955
4962
  },
4956
4963
  onBlur(e) {
4957
4964
  this.isFocused = false;
4958
4965
  this.$emit("blur", e);
4959
4966
  },
4960
4967
  onKeydown(e) {
4968
+ e.preventDefault();
4961
4969
  if ([13, 27, 38, 40].includes(e.keyCode))
4962
4970
  e.preventDefault();
4963
4971
  if (e.keyCode === 27)
@@ -7162,6 +7170,7 @@ const __vue2_script = {
7162
7170
  counts: { type: Boolean },
7163
7171
  itemIconKey: { type: String, default: "icon" },
7164
7172
  iconColor: { type: String },
7173
+ itemLabelKey: { type: String, default: "label" },
7165
7174
  itemIconColorKey: { type: String, default: "iconColor" },
7166
7175
  itemRouteKey: { type: String, default: "route" },
7167
7176
  itemDisabledKey: { type: String, default: "disabled" },
@@ -7195,7 +7204,7 @@ const __vue2_script = {
7195
7204
  this.currentDepthItems.push({
7196
7205
  originalItem: item,
7197
7206
  _uid: this.depth.toString() + (i + 1),
7198
- label: item.label,
7207
+ label: item[this.itemLabelKey],
7199
7208
  children: !!item.children,
7200
7209
  branch: item.branch,
7201
7210
  route: item[this.itemRouteKey],