wave-ui 1.50.1 → 1.51.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.
- package/dist/wave-ui.cjs.js +1 -1
- package/dist/wave-ui.css +1 -1
- package/dist/wave-ui.es.js +93 -80
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +1 -1
- package/src/wave-ui/components/w-dialog.vue +5 -4
- package/src/wave-ui/components/w-menu.vue +9 -33
- package/src/wave-ui/components/w-overlay.vue +4 -3
- package/src/wave-ui/components/w-select.vue +6 -3
- package/src/wave-ui/components/w-tooltip.vue +1 -31
- package/src/wave-ui/mixins/detachable.js +83 -27
package/dist/wave-ui.es.js
CHANGED
|
@@ -1745,7 +1745,9 @@ var render$D = function() {
|
|
|
1745
1745
|
var _vm = this;
|
|
1746
1746
|
var _h = _vm.$createElement;
|
|
1747
1747
|
var _c = _vm._self._c || _h;
|
|
1748
|
-
return _c("w-overlay", { staticClass: "w-dialog", class: _vm.classes, attrs: { "value": _vm.showWrapper, "persistent": _vm.persistent, "persistent-no-animation": _vm.persistentNoAnimation, "bg-color": _vm.overlayColor, "opacity": _vm.overlayOpacity }, on: { "click": _vm.onOutsideClick
|
|
1748
|
+
return _c("w-overlay", { staticClass: "w-dialog", class: _vm.classes, attrs: { "value": _vm.showWrapper, "persistent": _vm.persistent, "persistent-no-animation": _vm.persistentNoAnimation, "bg-color": _vm.overlayColor, "opacity": _vm.overlayOpacity }, on: { "click": _vm.onOutsideClick, "closed": function($event) {
|
|
1749
|
+
return _vm.$emit("closed");
|
|
1750
|
+
} } }, [_c("transition", { attrs: { "name": _vm.transition, "appear": "" }, on: { "after-leave": _vm.onClose } }, [_c("w-card", { directives: [{ name: "show", rawName: "v-show", value: _vm.showContent, expression: "showContent" }], staticClass: "w-dialog__content", class: _vm.dialogClass, style: _vm.contentStyles, attrs: { "no-border": "", "color": _vm.color, "bg-color": _vm.bgColor, "title-class": _vm.titleClass, "content-class": _vm.contentClass, "title": _vm.title || void 0 }, scopedSlots: _vm._u([_vm.$slots.title ? { key: "title", fn: function() {
|
|
1749
1751
|
return [_vm._t("title")];
|
|
1750
1752
|
}, proxy: true } : null, _vm.$slots.actions ? { key: "actions", fn: function() {
|
|
1751
1753
|
return [_vm._t("actions")];
|
|
@@ -1772,7 +1774,7 @@ const __vue2_script$D = {
|
|
|
1772
1774
|
bgColor: { type: String },
|
|
1773
1775
|
overlayOpacity: { type: [Number, String, Boolean] }
|
|
1774
1776
|
},
|
|
1775
|
-
emits: ["input", "update:modelValue", "close"],
|
|
1777
|
+
emits: ["input", "update:modelValue", "close", "closed"],
|
|
1776
1778
|
data() {
|
|
1777
1779
|
return {
|
|
1778
1780
|
showWrapper: this.value,
|
|
@@ -1809,7 +1811,7 @@ const __vue2_script$D = {
|
|
|
1809
1811
|
this.showWrapper = false;
|
|
1810
1812
|
this.$emit("update:modelValue", false);
|
|
1811
1813
|
this.$emit("input", false);
|
|
1812
|
-
this.$emit("close"
|
|
1814
|
+
this.$emit("close");
|
|
1813
1815
|
}
|
|
1814
1816
|
},
|
|
1815
1817
|
watch: {
|
|
@@ -3168,10 +3170,10 @@ var DetachableMixin = {
|
|
|
3168
3170
|
alignRight: { type: Boolean },
|
|
3169
3171
|
noPosition: { type: Boolean },
|
|
3170
3172
|
zIndex: { type: [Number, String, Boolean] },
|
|
3171
|
-
activator: { type: String }
|
|
3173
|
+
activator: { type: [String, Object, HTMLElement] }
|
|
3172
3174
|
},
|
|
3173
3175
|
data: () => ({
|
|
3174
|
-
|
|
3176
|
+
docEventListenersHandlers: []
|
|
3175
3177
|
}),
|
|
3176
3178
|
computed: {
|
|
3177
3179
|
appendToTarget() {
|
|
@@ -3202,12 +3204,22 @@ var DetachableMixin = {
|
|
|
3202
3204
|
return this.appendToTarget;
|
|
3203
3205
|
},
|
|
3204
3206
|
hasSeparateActivator() {
|
|
3205
|
-
|
|
3207
|
+
var _a;
|
|
3208
|
+
if (this.$scopedSlots.activator)
|
|
3209
|
+
return false;
|
|
3210
|
+
const activatorIsString = typeof this.activator === "string";
|
|
3211
|
+
const activatorIsDomEl = (((_a = this.activator) == null ? void 0 : _a.$el) || this.activator) instanceof HTMLElement;
|
|
3212
|
+
return activatorIsString || activatorIsDomEl;
|
|
3206
3213
|
},
|
|
3207
3214
|
activatorEl: {
|
|
3208
3215
|
get() {
|
|
3209
|
-
|
|
3216
|
+
var _a;
|
|
3217
|
+
if (this.hasSeparateActivator) {
|
|
3218
|
+
const activator = ((_a = this.activator) == null ? void 0 : _a.$el) || this.activator;
|
|
3219
|
+
if (activator instanceof HTMLElement)
|
|
3220
|
+
return activator;
|
|
3210
3221
|
return document.querySelector(this.activator);
|
|
3222
|
+
}
|
|
3211
3223
|
return this.$el.firstElementChild;
|
|
3212
3224
|
},
|
|
3213
3225
|
set() {
|
|
@@ -3221,8 +3233,29 @@ var DetachableMixin = {
|
|
|
3221
3233
|
}
|
|
3222
3234
|
},
|
|
3223
3235
|
methods: {
|
|
3224
|
-
|
|
3225
|
-
|
|
3236
|
+
async open(e) {
|
|
3237
|
+
if (this.delay)
|
|
3238
|
+
await new Promise((resolve) => setTimeout(resolve, this.delay));
|
|
3239
|
+
this.detachableVisible = true;
|
|
3240
|
+
if (this.activator)
|
|
3241
|
+
this.activatorEl = e.target;
|
|
3242
|
+
await this.insertInDOM();
|
|
3243
|
+
if (this.minWidth === "activator")
|
|
3244
|
+
this.activatorWidth = this.activatorEl.offsetWidth;
|
|
3245
|
+
if (!this.noPosition)
|
|
3246
|
+
this.computeDetachableCoords();
|
|
3247
|
+
this.timeoutId = setTimeout(() => {
|
|
3248
|
+
this.$emit("update:modelValue", true);
|
|
3249
|
+
this.$emit("input", true);
|
|
3250
|
+
this.$emit("open");
|
|
3251
|
+
}, 0);
|
|
3252
|
+
if (!this.persistent)
|
|
3253
|
+
document.addEventListener("mousedown", this.onOutsideMousedown);
|
|
3254
|
+
if (!this.noPosition)
|
|
3255
|
+
window.addEventListener("resize", this.onResize);
|
|
3256
|
+
},
|
|
3257
|
+
getActivatorCoordinates() {
|
|
3258
|
+
const { top, left, width, height } = this.activatorEl.getBoundingClientRect();
|
|
3226
3259
|
let coords = { top, left, width, height };
|
|
3227
3260
|
if (!this.fixed) {
|
|
3228
3261
|
const { top: targetTop, left: targetLeft } = this.detachableParentEl.getBoundingClientRect();
|
|
@@ -3234,8 +3267,8 @@ var DetachableMixin = {
|
|
|
3234
3267
|
}
|
|
3235
3268
|
return coords;
|
|
3236
3269
|
},
|
|
3237
|
-
computeDetachableCoords(
|
|
3238
|
-
let { top, left, width, height } = this.getActivatorCoordinates(
|
|
3270
|
+
computeDetachableCoords() {
|
|
3271
|
+
let { top, left, width, height } = this.getActivatorCoordinates();
|
|
3239
3272
|
this.detachableEl.style.visibility = "hidden";
|
|
3240
3273
|
this.detachableEl.style.display = "flex";
|
|
3241
3274
|
const computedStyles2 = window.getComputedStyle(this.detachableEl, null);
|
|
@@ -3312,6 +3345,21 @@ var DetachableMixin = {
|
|
|
3312
3345
|
this.detachableEl.remove();
|
|
3313
3346
|
this.detachableEl = null;
|
|
3314
3347
|
}
|
|
3348
|
+
},
|
|
3349
|
+
bindActivatorEvents() {
|
|
3350
|
+
const activatorIsString = typeof this.activator === "string";
|
|
3351
|
+
Object.entries(this.activatorEventHandlers).forEach(([eventName, handler]) => {
|
|
3352
|
+
eventName = eventName.replace("mouseenter", "mouseover").replace("mouseleave", "mouseout");
|
|
3353
|
+
const handlerWrap = (e) => {
|
|
3354
|
+
var _a;
|
|
3355
|
+
if (activatorIsString && ((_a = e.target) == null ? void 0 : _a.matches) && e.target.matches(this.activator))
|
|
3356
|
+
handler(e);
|
|
3357
|
+
else if (e.target === this.activatorEl || this.activatorEl.contains(e.target))
|
|
3358
|
+
handler(e);
|
|
3359
|
+
};
|
|
3360
|
+
document.addEventListener(eventName, handlerWrap);
|
|
3361
|
+
this.docEventListenersHandlers.push({ eventName, handler: handlerWrap });
|
|
3362
|
+
});
|
|
3315
3363
|
}
|
|
3316
3364
|
},
|
|
3317
3365
|
mounted() {
|
|
@@ -3319,31 +3367,28 @@ var DetachableMixin = {
|
|
|
3319
3367
|
const wrapper = this.$el;
|
|
3320
3368
|
if (this.$scopedSlots.activator)
|
|
3321
3369
|
wrapper.parentNode.insertBefore(this.activatorEl, wrapper);
|
|
3322
|
-
else if (this.activator)
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
};
|
|
3330
|
-
document.addEventListener(eventName, handlerWrap);
|
|
3331
|
-
this.docAEventListenersHandlers.push({ eventName, handler: handlerWrap });
|
|
3370
|
+
else if (this.activator)
|
|
3371
|
+
this.bindActivatorEvents();
|
|
3372
|
+
else {
|
|
3373
|
+
this.$nextTick(() => {
|
|
3374
|
+
this.activator && this.bindActivatorEvents();
|
|
3375
|
+
if (this.value)
|
|
3376
|
+
this.toggle({ type: "click", target: this.activatorEl });
|
|
3332
3377
|
});
|
|
3333
3378
|
}
|
|
3334
3379
|
if (this.overlay) {
|
|
3335
3380
|
this.overlayEl = (_a = this.$refs.overlay) == null ? void 0 : _a.$el;
|
|
3336
3381
|
wrapper.parentNode.insertBefore(this.overlayEl, wrapper);
|
|
3337
3382
|
}
|
|
3338
|
-
if (this.value)
|
|
3339
|
-
this.
|
|
3383
|
+
if (this.value && this.activator)
|
|
3384
|
+
this.toggle({ type: "click", target: this.activatorEl });
|
|
3340
3385
|
},
|
|
3341
|
-
|
|
3386
|
+
destroy() {
|
|
3342
3387
|
var _a;
|
|
3343
3388
|
this.close();
|
|
3344
3389
|
this.removeFromDOM();
|
|
3345
|
-
if (this.
|
|
3346
|
-
this.
|
|
3390
|
+
if (this.docEventListenersHandlers.length) {
|
|
3391
|
+
this.docEventListenersHandlers.forEach(({ eventName, handler }) => {
|
|
3347
3392
|
document.removeEventListener(eventName, handler);
|
|
3348
3393
|
});
|
|
3349
3394
|
}
|
|
@@ -3371,13 +3416,13 @@ var render$s = function() {
|
|
|
3371
3416
|
var _vm = this;
|
|
3372
3417
|
var _h = _vm.$createElement;
|
|
3373
3418
|
var _c = _vm._self._c || _h;
|
|
3374
|
-
return _c("div", { staticClass: "w-menu-wrap" }, [_vm._t("activator", null, { "on": _vm.activatorEventHandlers }), _c("transition", { attrs: { "name": _vm.transitionName, "appear": "" } }, [_vm.custom && _vm.detachableVisible ? _c("div", { ref: "detachable", staticClass: "w-menu", class: _vm.classes, style: _vm.styles, on: { "click": function($event) {
|
|
3419
|
+
return _c("div", { staticClass: "w-menu-wrap" }, [_vm._t("activator", null, { "on": _vm.activatorEventHandlers }), _c("transition", { attrs: { "name": _vm.transitionName, "appear": "" } }, [_vm.custom && _vm.detachableVisible ? _c("div", _vm._g({ ref: "detachable", staticClass: "w-menu", class: _vm.classes, style: _vm.styles, on: { "click": function($event) {
|
|
3375
3420
|
_vm.hideOnMenuClick && _vm.close(true);
|
|
3376
3421
|
}, "mouseenter": function($event) {
|
|
3377
3422
|
_vm.showOnHover && (_vm.hoveringMenu = true);
|
|
3378
3423
|
}, "mouseleave": function($event) {
|
|
3379
3424
|
_vm.showOnHover && (_vm.hoveringMenu = false, _vm.close());
|
|
3380
|
-
} } }, [_vm._t("default")], 2) : _vm.detachableVisible ? _c("w-card", { ref: "detachable", staticClass: "w-menu", class: _vm.classes, style: _vm.styles, attrs: { "tile": _vm.tile, "title-class": _vm.titleClasses, "content-class": _vm.contentClasses, "shadow": _vm.shadow, "no-border": _vm.noBorder }, nativeOn: { "click": function($event) {
|
|
3425
|
+
} } }, _vm.$listeners), [_vm._t("default")], 2) : _vm.detachableVisible ? _c("w-card", _vm._g({ ref: "detachable", staticClass: "w-menu", class: _vm.classes, style: _vm.styles, attrs: { "tile": _vm.tile, "title-class": _vm.titleClasses, "content-class": _vm.contentClasses, "shadow": _vm.shadow, "no-border": _vm.noBorder }, nativeOn: { "click": function($event) {
|
|
3381
3426
|
_vm.hideOnMenuClick && _vm.close(true);
|
|
3382
3427
|
}, "mouseenter": function($event) {
|
|
3383
3428
|
_vm.showOnHover && (_vm.hoveringMenu = true);
|
|
@@ -3387,7 +3432,7 @@ var render$s = function() {
|
|
|
3387
3432
|
return [_vm._t("title")];
|
|
3388
3433
|
}, proxy: true } : null, _vm.$slots.actions ? { key: "actions", fn: function() {
|
|
3389
3434
|
return [_vm._t("actions")];
|
|
3390
|
-
}, proxy: true } : null], null, true) }, [_vm._t("default")], 2) : _vm._e()], 1), _vm.overlay ? _c("w-overlay", _vm._b({ ref: "overlay", class: _vm.overlayClasses, attrs: { "value": _vm.detachableVisible, "persistent": _vm.persistent, "z-index": (_vm.zIndex || 200) - 1 }, on: { "input": function($event) {
|
|
3435
|
+
}, proxy: true } : null], null, true) }, _vm.$listeners), [_vm._t("default")], 2) : _vm._e()], 1), _vm.overlay ? _c("w-overlay", _vm._b({ ref: "overlay", class: _vm.overlayClasses, attrs: { "value": _vm.detachableVisible, "persistent": _vm.persistent, "z-index": (_vm.zIndex || 200) - 1 }, on: { "input": function($event) {
|
|
3391
3436
|
_vm.detachableVisible = false;
|
|
3392
3437
|
} } }, "w-overlay", _vm.overlayProps, false)) : _vm._e()], 2);
|
|
3393
3438
|
};
|
|
@@ -3452,7 +3497,9 @@ const __vue2_script$s = {
|
|
|
3452
3497
|
return objectifyClasses(this.contentClass);
|
|
3453
3498
|
},
|
|
3454
3499
|
overlayClasses() {
|
|
3455
|
-
return objectifyClasses(this.overlayClass)
|
|
3500
|
+
return __spreadProps(__spreadValues({}, objectifyClasses(this.overlayClass)), {
|
|
3501
|
+
"w-overlay--no-pointer-event": this.showOnHover
|
|
3502
|
+
});
|
|
3456
3503
|
},
|
|
3457
3504
|
classes() {
|
|
3458
3505
|
return __spreadProps(__spreadValues({
|
|
@@ -3507,7 +3554,7 @@ const __vue2_script$s = {
|
|
|
3507
3554
|
methods: {
|
|
3508
3555
|
toggle(e) {
|
|
3509
3556
|
let shouldShowMenu = this.detachableVisible;
|
|
3510
|
-
if ("ontouchstart" in window && this.showOnHover && e.type === "click") {
|
|
3557
|
+
if (typeof window !== "undefined" && "ontouchstart" in window && this.showOnHover && e.type === "click") {
|
|
3511
3558
|
shouldShowMenu = !shouldShowMenu;
|
|
3512
3559
|
} else if (e.type === "click" && !this.showOnHover)
|
|
3513
3560
|
shouldShowMenu = !shouldShowMenu;
|
|
@@ -3524,27 +3571,6 @@ const __vue2_script$s = {
|
|
|
3524
3571
|
else
|
|
3525
3572
|
this.close();
|
|
3526
3573
|
},
|
|
3527
|
-
async open(e) {
|
|
3528
|
-
if (this.delay)
|
|
3529
|
-
await new Promise((resolve) => setTimeout(resolve, this.delay));
|
|
3530
|
-
this.detachableVisible = true;
|
|
3531
|
-
if (this.activator)
|
|
3532
|
-
this.activatorEl = e.target;
|
|
3533
|
-
await this.insertInDOM();
|
|
3534
|
-
if (this.minWidth === "activator")
|
|
3535
|
-
this.activatorWidth = this.activatorEl.offsetWidth;
|
|
3536
|
-
if (!this.noPosition)
|
|
3537
|
-
this.computeDetachableCoords(e);
|
|
3538
|
-
this.timeoutId = setTimeout(() => {
|
|
3539
|
-
this.$emit("update:modelValue", true);
|
|
3540
|
-
this.$emit("input", true);
|
|
3541
|
-
this.$emit("open");
|
|
3542
|
-
}, 0);
|
|
3543
|
-
if (!this.persistent)
|
|
3544
|
-
document.addEventListener("mousedown", this.onOutsideMousedown);
|
|
3545
|
-
if (!this.noPosition)
|
|
3546
|
-
window.addEventListener("resize", this.onResize);
|
|
3547
|
-
},
|
|
3548
3574
|
async close(force = false) {
|
|
3549
3575
|
if (!this.detachableVisible)
|
|
3550
3576
|
return;
|
|
@@ -3727,7 +3753,9 @@ var render$q = function() {
|
|
|
3727
3753
|
var _vm = this;
|
|
3728
3754
|
var _h = _vm.$createElement;
|
|
3729
3755
|
var _c = _vm._self._c || _h;
|
|
3730
|
-
return _c("transition", { attrs: { "name": "fade", "
|
|
3756
|
+
return _c("transition", { attrs: { "name": "fade", "appear": "" }, on: { "after-leave": function($event) {
|
|
3757
|
+
return _vm.$emit("closed");
|
|
3758
|
+
} } }, [_vm.value ? _c("div", { directives: [{ name: "focus", rawName: "v-focus" }], staticClass: "w-overlay", class: _vm.classes, style: _vm.value && _vm.styles || null, attrs: { "tabindex": "0" }, on: { "keydown": function($event) {
|
|
3731
3759
|
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "escape", void 0, $event.key, void 0)) {
|
|
3732
3760
|
return null;
|
|
3733
3761
|
}
|
|
@@ -3747,7 +3775,7 @@ const __vue2_script$q = {
|
|
|
3747
3775
|
persistent: { type: Boolean },
|
|
3748
3776
|
persistentNoAnimation: { type: Boolean }
|
|
3749
3777
|
},
|
|
3750
|
-
emits: ["input", "update:modelValue", "click", "close"],
|
|
3778
|
+
emits: ["input", "update:modelValue", "click", "close", "closed"],
|
|
3751
3779
|
data: () => ({
|
|
3752
3780
|
persistentAnimate: false
|
|
3753
3781
|
}),
|
|
@@ -3777,7 +3805,7 @@ const __vue2_script$q = {
|
|
|
3777
3805
|
} else if (!this.persistent) {
|
|
3778
3806
|
this.$emit("update:modelValue", false);
|
|
3779
3807
|
this.$emit("input", false);
|
|
3780
|
-
this.$emit("close"
|
|
3808
|
+
this.$emit("close");
|
|
3781
3809
|
}
|
|
3782
3810
|
this.$emit("click", e);
|
|
3783
3811
|
}
|
|
@@ -4222,10 +4250,14 @@ var render$k = function() {
|
|
|
4222
4250
|
var _c = _vm._self._c || _h;
|
|
4223
4251
|
return _c(_vm.formRegister ? "w-form-element" : "div", _vm._b({ ref: "formEl", tag: "component", class: _vm.classes, attrs: { "valid": _vm.valid, "wrap": _vm.hasLabel && _vm.labelPosition !== "inside" }, on: { "update:valid": function($event) {
|
|
4224
4252
|
_vm.valid = $event;
|
|
4225
|
-
}, "reset": _vm.onReset } }, "component", _vm.formRegister && { validators: _vm.validators, inputValue: _vm.selectionString, disabled: _vm.isDisabled, readonly: _vm.isReadonly }, false), [_vm.labelPosition === "left" ? [_vm.$slots.default ? _c("label", { staticClass: "w-select__label w-select__label--left w-form-el-shakable", attrs: { "for": "w-select--" + _vm._uid } }, [_vm._t("default")], 2) : _vm.label ? _c("label", { staticClass: "w-select__label w-select__label--left w-form-el-shakable", attrs: { "for": "w-select--" + _vm._uid }, domProps: { "innerHTML": _vm._s(_vm.label) } }) : _vm._e()] : _vm._e(), _c("w-menu", _vm._b({ attrs: { "menu-class": "w-select__menu " + (_vm.menuClass || ""), "transition": "slide-fade-down", "append-to": (_vm.menuProps || {}).appendTo !== void 0 ? (_vm.menuProps || {}).appendTo : ".w-app", "align-left": "", "custom": "", "min-width": "activator" },
|
|
4253
|
+
}, "reset": _vm.onReset } }, "component", _vm.formRegister && { validators: _vm.validators, inputValue: _vm.selectionString, disabled: _vm.isDisabled, readonly: _vm.isReadonly }, false), [_vm.labelPosition === "left" ? [_vm.$slots.default ? _c("label", { staticClass: "w-select__label w-select__label--left w-form-el-shakable", attrs: { "for": "w-select--" + _vm._uid } }, [_vm._t("default")], 2) : _vm.label ? _c("label", { staticClass: "w-select__label w-select__label--left w-form-el-shakable", attrs: { "for": "w-select--" + _vm._uid }, domProps: { "innerHTML": _vm._s(_vm.label) } }) : _vm._e()] : _vm._e(), _c("w-menu", _vm._b({ attrs: { "menu-class": "w-select__menu " + (_vm.menuClass || ""), "transition": "slide-fade-down", "append-to": (_vm.menuProps || {}).appendTo !== void 0 ? (_vm.menuProps || {}).appendTo : ".w-app", "align-left": "", "custom": "", "min-width": "activator" }, on: { "mousedown": function($event) {
|
|
4254
|
+
_vm.isFocused = true, _vm.selectingItem = true;
|
|
4255
|
+
}, "mouseup": function($event) {
|
|
4256
|
+
_vm.isFocused = true, _vm.selectingItem = false;
|
|
4257
|
+
} }, scopedSlots: _vm._u([{ key: "activator", fn: function(ref) {
|
|
4226
4258
|
var _obj, _obj$1;
|
|
4227
4259
|
ref.on;
|
|
4228
|
-
return [_c("div", {
|
|
4260
|
+
return [_c("div", { staticClass: "w-select__selection-wrap", class: _vm.inputWrapClasses, attrs: { "role": "button", "aria-haspopup": "listbox", "aria-expanded": _vm.showMenu ? "true" : "false", "aria-owns": "w-select-menu--" + _vm._uid, "aria-activedescendant": "w-select-menu--" + _vm._uid + "_item-1" }, on: { "click": function($event) {
|
|
4229
4261
|
!_vm.isDisabled && !_vm.isReadonly && (_vm.showMenu ? _vm.closeMenu : _vm.openMenu)();
|
|
4230
4262
|
} } }, [_vm.innerIconLeft ? _c("w-icon", { staticClass: "w-select__icon w-select__icon--inner-left", attrs: { "tag": "label" }, on: { "click": function($event) {
|
|
4231
4263
|
return _vm.$emit("click:inner-icon-left", $event);
|
|
@@ -4299,7 +4331,9 @@ const __vue2_script$k = {
|
|
|
4299
4331
|
inputValue: [],
|
|
4300
4332
|
showMenu: false,
|
|
4301
4333
|
menuMinWidth: 0,
|
|
4302
|
-
isFocused: false
|
|
4334
|
+
isFocused: false,
|
|
4335
|
+
selectingItem: false,
|
|
4336
|
+
selectionWrapRef: void 0
|
|
4303
4337
|
}),
|
|
4304
4338
|
computed: {
|
|
4305
4339
|
selectItems() {
|
|
@@ -4328,7 +4362,7 @@ const __vue2_script$k = {
|
|
|
4328
4362
|
"w-select--disabled": this.isDisabled,
|
|
4329
4363
|
"w-select--readonly": this.isReadonly,
|
|
4330
4364
|
[`w-select--${this.hasValue ? "filled" : "empty"}`]: true,
|
|
4331
|
-
"w-select--focused": this.isFocused && !this.isReadonly,
|
|
4365
|
+
"w-select--focused": (this.isFocused || this.selectingItem) && !this.isReadonly,
|
|
4332
4366
|
"w-select--dark": this.dark,
|
|
4333
4367
|
"w-select--floating-label": this.hasLabel && this.labelPosition === "inside" && !this.staticLabel,
|
|
4334
4368
|
"w-select--no-padding": !this.outline && !this.bgColor && !this.shadow && !this.round,
|
|
@@ -5800,27 +5834,6 @@ const __vue2_script$8 = {
|
|
|
5800
5834
|
else
|
|
5801
5835
|
this.close();
|
|
5802
5836
|
},
|
|
5803
|
-
async open(e) {
|
|
5804
|
-
if (this.delay)
|
|
5805
|
-
await new Promise((resolve) => setTimeout(resolve, this.delay));
|
|
5806
|
-
this.detachableVisible = true;
|
|
5807
|
-
if (this.activator)
|
|
5808
|
-
this.activatorEl = e.target;
|
|
5809
|
-
await this.insertInDOM();
|
|
5810
|
-
if (this.minWidth === "activator")
|
|
5811
|
-
this.activatorWidth = this.activatorEl.offsetWidth;
|
|
5812
|
-
if (!this.noPosition)
|
|
5813
|
-
this.computeDetachableCoords(e);
|
|
5814
|
-
this.timeoutId = setTimeout(() => {
|
|
5815
|
-
this.$emit("update:modelValue", true);
|
|
5816
|
-
this.$emit("input", true);
|
|
5817
|
-
this.$emit("open");
|
|
5818
|
-
}, 0);
|
|
5819
|
-
if (!this.persistent)
|
|
5820
|
-
document.addEventListener("mousedown", this.onOutsideMousedown);
|
|
5821
|
-
if (!this.noPosition)
|
|
5822
|
-
window.addEventListener("resize", this.onResize);
|
|
5823
|
-
},
|
|
5824
5837
|
async close(force = false) {
|
|
5825
5838
|
if (!this.detachableVisible)
|
|
5826
5839
|
return;
|