wave-ui 1.45.5 → 1.45.10
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 +22 -12
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +1 -1
- package/src/wave-ui/components/w-accordion.vue +7 -4
- package/src/wave-ui/components/w-app.vue +1 -1
- package/src/wave-ui/components/w-flex.vue +2 -0
- package/src/wave-ui/components/w-input.vue +17 -4
- package/src/wave-ui/components/w-tabs/index.vue +1 -0
- package/src/wave-ui/utils/index.js +1 -1
package/dist/wave-ui.es.js
CHANGED
|
@@ -545,14 +545,14 @@ var render$O = function() {
|
|
|
545
545
|
return null;
|
|
546
546
|
}
|
|
547
547
|
!item._disabled && _vm.toggleItem(item, $event);
|
|
548
|
-
} } }, [_vm.expandIcon && !_vm.expandIconRight ? _c("w-button", { staticClass: "w-accordion__expand-icon", attrs: { "icon": item._expanded && _vm.collapseIcon || _vm.expandIcon, "disabled": item._disabled || null, "tabindex": -1, "text": "" }, on: { "keypress": function($event) {
|
|
548
|
+
} } }, [_vm.expandIcon && !_vm.expandIconRight ? _c("w-button", { staticClass: "w-accordion__expand-icon", class: { "w-accordion__expand-icon--expanded": item._expanded }, attrs: { "icon": item._expanded && _vm.collapseIcon || _vm.expandIcon, "disabled": item._disabled || null, "tabindex": -1, "text": "" }, on: { "keypress": function($event) {
|
|
549
549
|
$event.stopPropagation();
|
|
550
550
|
}, "click": function($event) {
|
|
551
551
|
$event.stopPropagation();
|
|
552
552
|
!item._disabled && _vm.toggleItem(item, $event);
|
|
553
553
|
} } }) : _vm._e(), _vm.$scopedSlots["item-title." + (item.id || i + 1)] ? _vm._t("item-title." + (item.id || i + 1), null, { "item": _vm.getOriginalItem(item), "expanded": item._expanded, "index": i + 1 }) : _vm._t("item-title", function() {
|
|
554
554
|
return [_c("div", { staticClass: "grow", domProps: { "innerHTML": _vm._s(item[_vm.itemTitleKey]) } })];
|
|
555
|
-
}, { "item": _vm.getOriginalItem(item), "expanded": item._expanded, "index": i + 1 }), _vm.expandIcon && _vm.expandIconRight ? _c("w-button", { staticClass: "w-accordion__expand-icon", attrs: { "icon": item._expanded && _vm.collapseIcon || _vm.expandIcon, "text": "" }, on: { "keypress": function($event) {
|
|
555
|
+
}, { "item": _vm.getOriginalItem(item), "expanded": item._expanded, "index": i + 1 }), _vm.expandIcon && _vm.expandIconRight ? _c("w-button", { staticClass: "w-accordion__expand-icon", class: { "w-accordion__expand-icon--expanded": item._expanded }, attrs: { "icon": item._expanded && _vm.collapseIcon || _vm.expandIcon, "text": "" }, on: { "keypress": function($event) {
|
|
556
556
|
$event.stopPropagation();
|
|
557
557
|
}, "click": function($event) {
|
|
558
558
|
$event.stopPropagation();
|
|
@@ -992,7 +992,7 @@ const __vue2_script$L = {
|
|
|
992
992
|
classes() {
|
|
993
993
|
return {
|
|
994
994
|
"d-block": this.block,
|
|
995
|
-
|
|
995
|
+
row: this.row,
|
|
996
996
|
"align-center": this.alignCenter,
|
|
997
997
|
"align-end": this.alignEnd,
|
|
998
998
|
"justify-center": this.justifyCenter,
|
|
@@ -1303,7 +1303,7 @@ var wButton = /* @__PURE__ */ function() {
|
|
|
1303
1303
|
const objectifyClasses = (classes = {}) => {
|
|
1304
1304
|
if (typeof classes === "string")
|
|
1305
1305
|
classes = { [classes]: true };
|
|
1306
|
-
else if (
|
|
1306
|
+
else if (Array.isArray(classes))
|
|
1307
1307
|
classes = { [classes.join(" ")]: true };
|
|
1308
1308
|
return classes;
|
|
1309
1309
|
};
|
|
@@ -1997,6 +1997,7 @@ const __vue2_script$z = {
|
|
|
1997
1997
|
justifyEnd: { type: Boolean },
|
|
1998
1998
|
justifySpaceBetween: { type: Boolean },
|
|
1999
1999
|
justifySpaceAround: { type: Boolean },
|
|
2000
|
+
justifySpaceEvenly: { type: Boolean },
|
|
2000
2001
|
basisZero: { type: Boolean },
|
|
2001
2002
|
gap: { type: Number, default: 0 }
|
|
2002
2003
|
},
|
|
@@ -2018,6 +2019,7 @@ const __vue2_script$z = {
|
|
|
2018
2019
|
"justify-end": this.justifyEnd,
|
|
2019
2020
|
"justify-space-between": this.justifySpaceBetween,
|
|
2020
2021
|
"justify-space-around": this.justifySpaceAround,
|
|
2022
|
+
"justify-space-evenly": this.justifySpaceEvenly,
|
|
2021
2023
|
"basis-zero": this.basisZero,
|
|
2022
2024
|
[`w-flex--gap${this.gap}`]: this.gap
|
|
2023
2025
|
};
|
|
@@ -2525,7 +2527,7 @@ var render$u = function() {
|
|
|
2525
2527
|
_vm.inputValue = $event.target.value;
|
|
2526
2528
|
} } }) : [_vm.labelPosition === "left" ? [_vm.$slots.default ? _c("label", { staticClass: "w-input__label w-input__label--left w-form-el-shakable", attrs: { "for": "w-input--" + _vm._uid } }, [_vm._t("default")], 2) : _vm.label ? _c("label", { staticClass: "w-input__label w-input__label--left w-form-el-shakable", attrs: { "for": "w-input--" + _vm._uid }, domProps: { "innerHTML": _vm._s(_vm.label) } }) : _vm._e()] : _vm._e(), _c("div", { staticClass: "w-input__input-wrap", class: _vm.inputWrapClasses }, [_vm.innerIconLeft ? _c("w-icon", { staticClass: "w-input__icon w-input__icon--inner-left", attrs: { "tag": "label", "for": "w-input--" + _vm._uid }, on: { "click": function($event) {
|
|
2527
2529
|
return _vm.$emit("click:inner-icon-left", $event);
|
|
2528
|
-
} } }, [_vm._v(_vm._s(_vm.innerIconLeft))]) : _vm._e(), _vm.type === "checkbox" && _vm.type !== "file" ? _c("input", _vm._g(_vm._b({ directives: [{ name: "model", rawName: "v-model", value: _vm.inputValue, expression: "inputValue" }], staticClass: "w-input__input", attrs: { "id": "w-input--" + _vm._uid, "name": _vm.inputName, "placeholder": _vm.placeholder || null, "step": _vm.step || null, "min": _vm.min || null, "max": _vm.max || null, "minlength": _vm.minlength || null, "maxlength": _vm.maxlength || null, "readonly": _vm.isReadonly || null, "aria-readonly": _vm.isReadonly ? "true" : "false", "disabled": _vm.isDisabled || null, "required": _vm.required || null, "tabindex": _vm.tabindex || null, "type": "checkbox" }, domProps: { "checked": Array.isArray(_vm.inputValue) ? _vm._i(_vm.inputValue, null) > -1 : _vm.inputValue }, on: { "input": _vm.onInput, "focus": _vm.onFocus, "blur": _vm.onBlur, "change": function($event) {
|
|
2530
|
+
} } }, [_vm._v(_vm._s(_vm.innerIconLeft))]) : _vm._e(), _vm.type === "checkbox" && _vm.type !== "file" ? _c("input", _vm._g(_vm._b({ directives: [{ name: "model", rawName: "v-model", value: _vm.inputValue, expression: "inputValue" }], ref: "input", staticClass: "w-input__input", attrs: { "id": "w-input--" + _vm._uid, "name": _vm.inputName, "placeholder": _vm.placeholder || null, "step": _vm.step || null, "min": _vm.min || null, "max": _vm.max || null, "minlength": _vm.minlength || null, "maxlength": _vm.maxlength || null, "readonly": _vm.isReadonly || null, "aria-readonly": _vm.isReadonly ? "true" : "false", "disabled": _vm.isDisabled || null, "required": _vm.required || null, "tabindex": _vm.tabindex || null, "type": "checkbox" }, domProps: { "checked": Array.isArray(_vm.inputValue) ? _vm._i(_vm.inputValue, null) > -1 : _vm.inputValue }, on: { "input": _vm.onInput, "focus": _vm.onFocus, "blur": _vm.onBlur, "change": function($event) {
|
|
2529
2531
|
var $$a = _vm.inputValue, $$el = $event.target, $$c = $$el.checked ? true : false;
|
|
2530
2532
|
if (Array.isArray($$a)) {
|
|
2531
2533
|
var $$v = null, $$i = _vm._i($$a, $$v);
|
|
@@ -2537,18 +2539,18 @@ var render$u = function() {
|
|
|
2537
2539
|
} else {
|
|
2538
2540
|
_vm.inputValue = $$c;
|
|
2539
2541
|
}
|
|
2540
|
-
} } }, "input", _vm.attrs, false), _vm.listeners)) : _vm.type === "radio" && _vm.type !== "file" ? _c("input", _vm._g(_vm._b({ directives: [{ name: "model", rawName: "v-model", value: _vm.inputValue, expression: "inputValue" }], staticClass: "w-input__input", attrs: { "id": "w-input--" + _vm._uid, "name": _vm.inputName, "placeholder": _vm.placeholder || null, "step": _vm.step || null, "min": _vm.min || null, "max": _vm.max || null, "minlength": _vm.minlength || null, "maxlength": _vm.maxlength || null, "readonly": _vm.isReadonly || null, "aria-readonly": _vm.isReadonly ? "true" : "false", "disabled": _vm.isDisabled || null, "required": _vm.required || null, "tabindex": _vm.tabindex || null, "type": "radio" }, domProps: { "checked": _vm._q(_vm.inputValue, null) }, on: { "input": _vm.onInput, "focus": _vm.onFocus, "blur": _vm.onBlur, "change": function($event) {
|
|
2542
|
+
} } }, "input", _vm.attrs, false), _vm.listeners)) : _vm.type === "radio" && _vm.type !== "file" ? _c("input", _vm._g(_vm._b({ directives: [{ name: "model", rawName: "v-model", value: _vm.inputValue, expression: "inputValue" }], ref: "input", staticClass: "w-input__input", attrs: { "id": "w-input--" + _vm._uid, "name": _vm.inputName, "placeholder": _vm.placeholder || null, "step": _vm.step || null, "min": _vm.min || null, "max": _vm.max || null, "minlength": _vm.minlength || null, "maxlength": _vm.maxlength || null, "readonly": _vm.isReadonly || null, "aria-readonly": _vm.isReadonly ? "true" : "false", "disabled": _vm.isDisabled || null, "required": _vm.required || null, "tabindex": _vm.tabindex || null, "type": "radio" }, domProps: { "checked": _vm._q(_vm.inputValue, null) }, on: { "input": _vm.onInput, "focus": _vm.onFocus, "blur": _vm.onBlur, "change": function($event) {
|
|
2541
2543
|
_vm.inputValue = null;
|
|
2542
|
-
} } }, "input", _vm.attrs, false), _vm.listeners)) : _vm.type !== "file" ? _c("input", _vm._g(_vm._b({ directives: [{ name: "model", rawName: "v-model", value: _vm.inputValue, expression: "inputValue" }], staticClass: "w-input__input", attrs: { "id": "w-input--" + _vm._uid, "name": _vm.inputName, "placeholder": _vm.placeholder || null, "step": _vm.step || null, "min": _vm.min || null, "max": _vm.max || null, "minlength": _vm.minlength || null, "maxlength": _vm.maxlength || null, "readonly": _vm.isReadonly || null, "aria-readonly": _vm.isReadonly ? "true" : "false", "disabled": _vm.isDisabled || null, "required": _vm.required || null, "tabindex": _vm.tabindex || null, "type": _vm.type }, domProps: { "value": _vm.inputValue }, on: { "input": [function($event) {
|
|
2544
|
+
} } }, "input", _vm.attrs, false), _vm.listeners)) : _vm.type !== "file" ? _c("input", _vm._g(_vm._b({ directives: [{ name: "model", rawName: "v-model", value: _vm.inputValue, expression: "inputValue" }], ref: "input", staticClass: "w-input__input", attrs: { "id": "w-input--" + _vm._uid, "name": _vm.inputName, "placeholder": _vm.placeholder || null, "step": _vm.step || null, "min": _vm.min || null, "max": _vm.max || null, "minlength": _vm.minlength || null, "maxlength": _vm.maxlength || null, "readonly": _vm.isReadonly || null, "aria-readonly": _vm.isReadonly ? "true" : "false", "disabled": _vm.isDisabled || null, "required": _vm.required || null, "tabindex": _vm.tabindex || null, "type": _vm.type }, domProps: { "value": _vm.inputValue }, on: { "input": [function($event) {
|
|
2543
2545
|
if ($event.target.composing) {
|
|
2544
2546
|
return;
|
|
2545
2547
|
}
|
|
2546
2548
|
_vm.inputValue = $event.target.value;
|
|
2547
|
-
}, _vm.onInput], "focus": _vm.onFocus, "blur": _vm.onBlur } }, "input", _vm.attrs, false), _vm.listeners)) :
|
|
2549
|
+
}, _vm.onInput], "focus": _vm.onFocus, "blur": _vm.onBlur } }, "input", _vm.attrs, false), _vm.listeners)) : [_c("input", _vm._b({ ref: "input", attrs: { "id": "w-input--" + _vm._uid, "type": "file", "name": _vm.name || null, "multiple": _vm.multiple || null }, on: { "focus": _vm.onFocus, "blur": _vm.onBlur, "change": _vm.onFileChange } }, "input", _vm.attrs, false)), _c("transition-group", { staticClass: "w-input__input w-input__input--file", attrs: { "tag": "label", "name": "fade", "for": "w-input--" + _vm._uid } }, [!_vm.inputFiles.length && _vm.isFocused ? _c("span", { key: "no-file", staticClass: "w-input__no-file" }, [_vm._t("no-file", function() {
|
|
2548
2550
|
return [_vm.$slots["no-file"] === void 0 ? [_vm._v("No file")] : _vm._e()];
|
|
2549
2551
|
})], 2) : _vm._e(), _vm._l(_vm.inputFiles, function(file, i) {
|
|
2550
2552
|
return _c("span", { key: file.lastModified }, [_vm._v(_vm._s(i ? ", " : "")), _c("span", { key: i + "b", staticClass: "filename" }, [_vm._v(_vm._s(file.base))]), _vm._v(_vm._s(file.extension))]);
|
|
2551
|
-
})], 2)]
|
|
2553
|
+
})], 2)], _vm.labelPosition === "inside" && _vm.showLabelInside ? [_vm.$slots.default ? _c("label", { staticClass: "w-input__label w-input__label--inside w-form-el-shakable", class: _vm.isFocused && (_obj = {}, _obj[_vm.valid === false ? "error" : _vm.color] = _vm.color || _vm.valid === false, _obj), attrs: { "for": "w-input--" + _vm._uid } }, [_vm._t("default")], 2) : _vm.label ? _c("label", { staticClass: "w-input__label w-input__label--inside w-form-el-shakable", class: _vm.isFocused && (_obj$1 = {}, _obj$1[_vm.valid === false ? "error" : _vm.color] = _vm.color || _vm.valid === false, _obj$1), attrs: { "for": "w-input--" + _vm._uid }, domProps: { "innerHTML": _vm._s(_vm.label) } }) : _vm._e()] : _vm._e(), _vm.innerIconRight ? _c("w-icon", { staticClass: "w-input__icon w-input__icon--inner-right", attrs: { "tag": "label", "for": "w-input--" + _vm._uid }, on: { "click": function($event) {
|
|
2552
2554
|
return _vm.$emit("click:inner-icon-right", $event);
|
|
2553
2555
|
} } }, [_vm._v(_vm._s(_vm.innerIconRight))]) : _vm._e()], 2), _vm.type === "file" && _vm.inputFiles.length ? _c("label", { staticClass: "d-flex", attrs: { "for": "w-input--" + _vm._uid } }, [_vm._l(_vm.inputFiles, function(file, i) {
|
|
2554
2556
|
return [file.progress < 100 ? _c("i", { key: i, staticClass: "w-icon wi-spinner w-icon--spin size--sm w-input__file-preview primary" }) : file.preview ? _c("img", { key: i, staticClass: "w-input__file-preview", attrs: { "src": file.preview, "alt": "" } }) : _c("i", { key: i, staticClass: "w-icon wi-file w-input__file-preview primary" })];
|
|
@@ -2592,7 +2594,8 @@ const __vue2_script$u = {
|
|
|
2592
2594
|
inputNumberError: false,
|
|
2593
2595
|
isFocused: false,
|
|
2594
2596
|
inputFiles: [],
|
|
2595
|
-
fileReader: null
|
|
2597
|
+
fileReader: null,
|
|
2598
|
+
isAutofilled: false
|
|
2596
2599
|
};
|
|
2597
2600
|
},
|
|
2598
2601
|
computed: {
|
|
@@ -2619,7 +2622,7 @@ const __vue2_script$u = {
|
|
|
2619
2622
|
"w-input--file": this.type === "file",
|
|
2620
2623
|
"w-input--disabled": this.isDisabled,
|
|
2621
2624
|
"w-input--readonly": this.isReadonly,
|
|
2622
|
-
[`w-input--${this.hasValue ? "filled" : "empty"}`]: true,
|
|
2625
|
+
[`w-input--${this.hasValue || this.isAutofilled ? "filled" : "empty"}`]: true,
|
|
2623
2626
|
"w-input--focused": this.isFocused && !this.isReadonly,
|
|
2624
2627
|
"w-input--dark": this.dark,
|
|
2625
2628
|
"w-input--floating-label": this.hasLabel && this.labelPosition === "inside" && !this.staticLabel,
|
|
@@ -2686,15 +2689,22 @@ const __vue2_script$u = {
|
|
|
2686
2689
|
reader.addEventListener("progress", (event) => {
|
|
2687
2690
|
if (event.loaded && event.total) {
|
|
2688
2691
|
this.$set(file, "progress", event.loaded * 100 / event.total);
|
|
2689
|
-
console.log(`Progress: ${Math.round(file.progress)}`);
|
|
2690
2692
|
}
|
|
2691
2693
|
});
|
|
2692
2694
|
reader.readAsDataURL(original);
|
|
2693
2695
|
}
|
|
2694
2696
|
},
|
|
2697
|
+
mounted() {
|
|
2698
|
+
setTimeout(() => {
|
|
2699
|
+
if (this.$refs.input.value)
|
|
2700
|
+
this.isAutofilled = true;
|
|
2701
|
+
}, 250);
|
|
2702
|
+
},
|
|
2695
2703
|
watch: {
|
|
2696
2704
|
value(value) {
|
|
2697
2705
|
this.inputValue = value;
|
|
2706
|
+
if (!value && value !== 0)
|
|
2707
|
+
this.isAutofilled = false;
|
|
2698
2708
|
}
|
|
2699
2709
|
}
|
|
2700
2710
|
};
|