wave-ui 3.4.6 → 3.5.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 +19 -15
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +2 -2
- package/src/wave-ui/components/w-checkbox.vue +6 -4
- package/src/wave-ui/components/w-input.vue +4 -2
- package/src/wave-ui/components/w-radio.vue +4 -3
package/dist/wave-ui.es.js
CHANGED
|
@@ -1556,7 +1556,7 @@ const _t = {
|
|
|
1556
1556
|
Vt
|
|
1557
1557
|
], Rt = ["for"], Tt = ["for", "innerHTML"];
|
|
1558
1558
|
function Lt(e, t, l, a, r, i) {
|
|
1559
|
-
return s(), m(V(e.formRegister && !i.wCheckboxes ? "w-form-element" : "div"), C({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: r.isChecked, disabled: e.isDisabled }, {
|
|
1559
|
+
return s(), m(V(e.formRegister && !i.wCheckboxes ? "w-form-element" : "div"), C({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: r.isChecked, disabled: e.isDisabled, readonly: e.isReadonly }, {
|
|
1560
1560
|
valid: e.valid,
|
|
1561
1561
|
"onUpdate:valid": t[5] || (t[5] = (o) => e.valid = o),
|
|
1562
1562
|
onReset: t[6] || (t[6] = (o) => {
|
|
@@ -1571,7 +1571,7 @@ function Lt(e, t, l, a, r, i) {
|
|
|
1571
1571
|
type: "checkbox",
|
|
1572
1572
|
name: e.inputName,
|
|
1573
1573
|
checked: r.isChecked || null,
|
|
1574
|
-
disabled: e.isDisabled || null,
|
|
1574
|
+
disabled: e.isDisabled || e.isReadonly || null,
|
|
1575
1575
|
required: e.required || null,
|
|
1576
1576
|
tabindex: e.tabindex || null,
|
|
1577
1577
|
onFocus: t[0] || (t[0] = (o) => e.$emit("focus", o)),
|
|
@@ -1661,6 +1661,7 @@ const xt = {
|
|
|
1661
1661
|
return {
|
|
1662
1662
|
[`w-checkbox w-checkbox--${this.isChecked ? "checked" : "unchecked"}`]: !0,
|
|
1663
1663
|
"w-checkbox--disabled": this.isDisabled,
|
|
1664
|
+
"w-checkbox--readonly": this.isReadonly,
|
|
1664
1665
|
"w-checkbox--indeterminate": this.indeterminate,
|
|
1665
1666
|
"w-checkbox--ripple": this.ripple.start,
|
|
1666
1667
|
"w-checkbox--rippled": this.ripple.end,
|
|
@@ -3159,20 +3160,22 @@ const xl = {
|
|
|
3159
3160
|
this.isFocused = !1, this.$emit("blur", e);
|
|
3160
3161
|
},
|
|
3161
3162
|
onFileChange(e) {
|
|
3162
|
-
this.inputFiles = [...e.target.files].map((
|
|
3163
|
-
const [,
|
|
3164
|
-
name:
|
|
3165
|
-
base:
|
|
3166
|
-
extension:
|
|
3167
|
-
type:
|
|
3168
|
-
size:
|
|
3169
|
-
lastModified:
|
|
3163
|
+
this.inputFiles = [...e.target.files].map((l) => {
|
|
3164
|
+
const [, a = "", r = "", i = ""] = l.name.match(/^(.*?)\.([^.]*)$|(.*)/), o = Q({
|
|
3165
|
+
name: l.name,
|
|
3166
|
+
base: a || i,
|
|
3167
|
+
extension: r,
|
|
3168
|
+
type: l.type,
|
|
3169
|
+
size: l.size,
|
|
3170
|
+
lastModified: l.lastModified,
|
|
3170
3171
|
preview: null,
|
|
3171
3172
|
progress: 0,
|
|
3172
|
-
file:
|
|
3173
|
+
file: l
|
|
3173
3174
|
});
|
|
3174
|
-
return this.readFile(
|
|
3175
|
-
})
|
|
3175
|
+
return this.readFile(l, o), o;
|
|
3176
|
+
});
|
|
3177
|
+
const t = this.multiple ? this.inputFiles : this.inputFiles[0];
|
|
3178
|
+
this.$emit("update:modelValue", t), this.$emit("input", t);
|
|
3176
3179
|
},
|
|
3177
3180
|
readFile(e, t) {
|
|
3178
3181
|
const l = new FileReader(), a = typeof this.preview == "string", r = e.type && e.type.startsWith("image/");
|
|
@@ -4141,7 +4144,7 @@ const J = 40, ei = J / 2, ti = Math.round(J * 3.14 * 100) / 100, li = {
|
|
|
4141
4144
|
}
|
|
4142
4145
|
}, ii = /* @__PURE__ */ v(li, [["render", Zl]]), si = ["id", "name", "checked", "disabled", "required", "tabindex", "aria-checked"], ai = ["for"], oi = ["for", "innerHTML"], ni = ["for"], ri = ["for", "innerHTML"];
|
|
4143
4146
|
function di(e, t, l, a, r, i) {
|
|
4144
|
-
return s(), m(V(e.formRegister && !i.wRadios ? "w-form-element" : "div"), C({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: e.inputValue, disabled: e.isDisabled }, {
|
|
4147
|
+
return s(), m(V(e.formRegister && !i.wRadios ? "w-form-element" : "div"), C({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: e.inputValue, disabled: e.isDisabled, readonly: e.isReadonly }, {
|
|
4145
4148
|
valid: e.valid,
|
|
4146
4149
|
"onUpdate:valid": t[3] || (t[3] = (o) => e.valid = o),
|
|
4147
4150
|
onReset: t[4] || (t[4] = (o) => {
|
|
@@ -4156,7 +4159,7 @@ function di(e, t, l, a, r, i) {
|
|
|
4156
4159
|
type: "radio",
|
|
4157
4160
|
name: e.inputName,
|
|
4158
4161
|
checked: e.inputValue || null,
|
|
4159
|
-
disabled: e.isDisabled || null,
|
|
4162
|
+
disabled: e.isDisabled || e.isReadonly || null,
|
|
4160
4163
|
required: e.required || null,
|
|
4161
4164
|
tabindex: e.tabindex || null,
|
|
4162
4165
|
onFocus: t[0] || (t[0] = (o) => e.$emit("focus", o)),
|
|
@@ -4238,6 +4241,7 @@ const ui = {
|
|
|
4238
4241
|
return {
|
|
4239
4242
|
[`w-radio w-radio--${this.inputValue ? "checked" : "unchecked"}`]: !0,
|
|
4240
4243
|
"w-radio--disabled": this.isDisabled,
|
|
4244
|
+
"w-radio--readonly": this.isReadonly,
|
|
4241
4245
|
"w-radio--ripple": this.ripple.start,
|
|
4242
4246
|
"w-radio--rippled": this.ripple.end,
|
|
4243
4247
|
"w-radio--dark": this.ripple.dark,
|