wave-ui 2.34.0 → 2.35.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 +57 -41
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +1 -1
- package/src/wave-ui/components/w-icon.vue +18 -20
- package/src/wave-ui/components/w-switch.vue +33 -10
package/dist/wave-ui.es.js
CHANGED
|
@@ -1502,8 +1502,8 @@ const _hoisted_4$9 = /* @__PURE__ */ createElementVNode("svg", {
|
|
|
1502
1502
|
const _hoisted_5$8 = [
|
|
1503
1503
|
_hoisted_4$9
|
|
1504
1504
|
];
|
|
1505
|
-
const _hoisted_6$
|
|
1506
|
-
const _hoisted_7$
|
|
1505
|
+
const _hoisted_6$6 = ["for"];
|
|
1506
|
+
const _hoisted_7$6 = ["for", "innerHTML"];
|
|
1507
1507
|
function render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1508
1508
|
return openBlock(), createBlock(resolveDynamicComponent(_ctx.formRegister && !$options.wCheckboxes ? "w-form-element" : "div"), mergeProps({ ref: "formEl" }, _ctx.formRegister && { validators: _ctx.validators, inputValue: $data.isChecked, disabled: _ctx.isDisabled }, {
|
|
1509
1509
|
valid: _ctx.valid,
|
|
@@ -1559,12 +1559,12 @@ function render$H(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1559
1559
|
for: `w-checkbox--${_ctx._.uid}`
|
|
1560
1560
|
}, [
|
|
1561
1561
|
renderSlot(_ctx.$slots, "default")
|
|
1562
|
-
], 8, _hoisted_6$
|
|
1562
|
+
], 8, _hoisted_6$6)) : $props.label ? (openBlock(), createElementBlock("label", {
|
|
1563
1563
|
key: 1,
|
|
1564
1564
|
class: "w-checkbox__label w-form-el-shakable pl2",
|
|
1565
1565
|
for: `w-checkbox--${_ctx._.uid}`,
|
|
1566
1566
|
innerHTML: $props.label
|
|
1567
|
-
}, null, 8, _hoisted_7$
|
|
1567
|
+
}, null, 8, _hoisted_7$6)) : createCommentVNode("", true)
|
|
1568
1568
|
], 64)) : createCommentVNode("", true)
|
|
1569
1569
|
]),
|
|
1570
1570
|
_: 3
|
|
@@ -2634,16 +2634,15 @@ const _sfc_main$x = {
|
|
|
2634
2634
|
};
|
|
2635
2635
|
var wGrid = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", render$x]]);
|
|
2636
2636
|
function render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2637
|
-
return openBlock(), createBlock(resolveDynamicComponent($props.tag || "i"), mergeProps({
|
|
2638
|
-
class:
|
|
2639
|
-
}, toHandlers(_ctx.$attrs), {
|
|
2637
|
+
return openBlock(), createBlock(resolveDynamicComponent($props.tag || "i"), mergeProps({ class: "w-icon" }, toHandlers(_ctx.$attrs), {
|
|
2638
|
+
class: $options.classes,
|
|
2640
2639
|
role: "icon",
|
|
2641
2640
|
"aria-hidden": "true",
|
|
2642
|
-
style: $options.styles
|
|
2641
|
+
style: $options.readIcon() && $options.styles
|
|
2643
2642
|
}), {
|
|
2644
2643
|
default: withCtx(() => [
|
|
2645
|
-
$options.
|
|
2646
|
-
createTextVNode(toDisplayString(
|
|
2644
|
+
$options.hasLigature ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2645
|
+
createTextVNode(toDisplayString(_ctx.icon), 1)
|
|
2647
2646
|
], 64)) : createCommentVNode("", true)
|
|
2648
2647
|
]),
|
|
2649
2648
|
_: 1
|
|
@@ -2676,14 +2675,12 @@ const _sfc_main$w = {
|
|
|
2676
2675
|
},
|
|
2677
2676
|
emits: [],
|
|
2678
2677
|
data: () => ({
|
|
2679
|
-
icon: ""
|
|
2678
|
+
icon: "",
|
|
2679
|
+
fontName: ""
|
|
2680
2680
|
}),
|
|
2681
2681
|
computed: {
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
return false;
|
|
2685
|
-
const [fontName, icon] = this.icon.split(" ");
|
|
2686
|
-
return fontName === config.iconsLigature && { fontName, icon };
|
|
2682
|
+
hasLigature() {
|
|
2683
|
+
return config.iconsLigature === this.fontName;
|
|
2687
2684
|
},
|
|
2688
2685
|
forcedSize() {
|
|
2689
2686
|
return this.size && (!isNaN(this.size) ? `${this.size}px` : this.size);
|
|
@@ -2693,7 +2690,8 @@ const _sfc_main$w = {
|
|
|
2693
2690
|
},
|
|
2694
2691
|
classes() {
|
|
2695
2692
|
return {
|
|
2696
|
-
[this.
|
|
2693
|
+
[this.fontName]: true,
|
|
2694
|
+
[!this.hasLigature && this.icon]: !this.hasLigature && this.icon,
|
|
2697
2695
|
[this.color]: this.color,
|
|
2698
2696
|
[`${this.bgColor}--bg`]: this.bgColor,
|
|
2699
2697
|
[`size--${this.presetSize}`]: this.presetSize && !this.forcedSize,
|
|
@@ -2707,19 +2705,20 @@ const _sfc_main$w = {
|
|
|
2707
2705
|
"w-icon--rotate-90": this.rotate90a,
|
|
2708
2706
|
"w-icon--rotate-135": this.rotate135a,
|
|
2709
2707
|
"w-icon--flip-x": this.flipX,
|
|
2710
|
-
"w-icon--flip-y": this.flipY
|
|
2711
|
-
[this.ligature && this.ligature.fontName]: this.ligature
|
|
2708
|
+
"w-icon--flip-y": this.flipY
|
|
2712
2709
|
};
|
|
2713
2710
|
},
|
|
2714
2711
|
styles() {
|
|
2715
2712
|
return this.forcedSize && `font-size: ${this.forcedSize}`;
|
|
2716
2713
|
}
|
|
2717
2714
|
},
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2715
|
+
methods: {
|
|
2716
|
+
readIcon() {
|
|
2717
|
+
const { default: slot } = this.$slots;
|
|
2718
|
+
const [fontName = "", icon = ""] = typeof slot === "function" && slot()[0].children.trim().split(" ") || [];
|
|
2719
|
+
this.fontName = fontName;
|
|
2720
|
+
this.icon = icon;
|
|
2721
|
+
}
|
|
2723
2722
|
}
|
|
2724
2723
|
};
|
|
2725
2724
|
var wIcon = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", render$w]]);
|
|
@@ -2900,11 +2899,11 @@ const _hoisted_2$a = ["for"];
|
|
|
2900
2899
|
const _hoisted_3$9 = ["for", "innerHTML"];
|
|
2901
2900
|
const _hoisted_4$8 = ["id", "type", "name", "placeholder", "step", "min", "max", "minlength", "maxlength", "readonly", "aria-readonly", "disabled", "required", "tabindex"];
|
|
2902
2901
|
const _hoisted_5$7 = ["id", "name", "multiple", "data-progress"];
|
|
2903
|
-
const _hoisted_6$
|
|
2902
|
+
const _hoisted_6$5 = {
|
|
2904
2903
|
class: "w-input__no-file",
|
|
2905
2904
|
key: "no-file"
|
|
2906
2905
|
};
|
|
2907
|
-
const _hoisted_7$
|
|
2906
|
+
const _hoisted_7$5 = /* @__PURE__ */ createTextVNode("No file");
|
|
2908
2907
|
const _hoisted_8$3 = ["for"];
|
|
2909
2908
|
const _hoisted_9$3 = ["for", "innerHTML"];
|
|
2910
2909
|
const _hoisted_10$3 = ["for"];
|
|
@@ -3007,10 +3006,10 @@ function render$u(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3007
3006
|
for: `w-input--${_ctx._.uid}`
|
|
3008
3007
|
}, {
|
|
3009
3008
|
default: withCtx(() => [
|
|
3010
|
-
!$data.inputFiles.length && $data.isFocused ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
3009
|
+
!$data.inputFiles.length && $data.isFocused ? (openBlock(), createElementBlock("span", _hoisted_6$5, [
|
|
3011
3010
|
renderSlot(_ctx.$slots, "no-file", {}, () => [
|
|
3012
3011
|
_ctx.$slots["no-file"] === void 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3013
|
-
_hoisted_7$
|
|
3012
|
+
_hoisted_7$5
|
|
3014
3013
|
], 64)) : createCommentVNode("", true)
|
|
3015
3014
|
])
|
|
3016
3015
|
])) : createCommentVNode("", true),
|
|
@@ -4912,8 +4911,8 @@ const _hoisted_4$5 = {
|
|
|
4912
4911
|
class: "w-select__selection-slot"
|
|
4913
4912
|
};
|
|
4914
4913
|
const _hoisted_5$5 = ["value", "id", "placeholder", "disabled", "required", "tabindex"];
|
|
4915
|
-
const _hoisted_6$
|
|
4916
|
-
const _hoisted_7$
|
|
4914
|
+
const _hoisted_6$4 = ["value", "name"];
|
|
4915
|
+
const _hoisted_7$4 = ["for"];
|
|
4917
4916
|
const _hoisted_8$2 = ["for", "innerHTML"];
|
|
4918
4917
|
const _hoisted_9$2 = ["for"];
|
|
4919
4918
|
const _hoisted_10$2 = ["for", "innerHTML"];
|
|
@@ -5004,7 +5003,7 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5004
5003
|
type: "hidden",
|
|
5005
5004
|
value: val.value || "",
|
|
5006
5005
|
name: _ctx.inputName + ($props.multiple ? "[]" : "")
|
|
5007
|
-
}, null, 8, _hoisted_6$
|
|
5006
|
+
}, null, 8, _hoisted_6$4);
|
|
5008
5007
|
}), 128)),
|
|
5009
5008
|
$props.labelPosition === "inside" && $options.showLabelInside ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
5010
5009
|
_ctx.$slots.default ? (openBlock(), createElementBlock("label", {
|
|
@@ -5013,7 +5012,7 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5013
5012
|
for: `w-select--${_ctx._.uid}`
|
|
5014
5013
|
}, [
|
|
5015
5014
|
renderSlot(_ctx.$slots, "default")
|
|
5016
|
-
], 10, _hoisted_7$
|
|
5015
|
+
], 10, _hoisted_7$4)) : $props.label ? (openBlock(), createElementBlock("label", {
|
|
5017
5016
|
key: 1,
|
|
5018
5017
|
class: normalizeClass(["w-select__label w-select__label--inside w-form-el-shakable", _ctx.isFocused && { [_ctx.valid === false ? "error" : $props.color]: $props.color || _ctx.valid === false }]),
|
|
5019
5018
|
for: `w-select--${_ctx._.uid}`,
|
|
@@ -5282,8 +5281,8 @@ const _hoisted_2$5 = ["for", "innerHTML"];
|
|
|
5282
5281
|
const _hoisted_3$5 = { class: "w-slider__track-wrap" };
|
|
5283
5282
|
const _hoisted_4$4 = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-readonly"];
|
|
5284
5283
|
const _hoisted_5$4 = ["id", "name", "model-value", "disabled", "readonly", "aria-readonly"];
|
|
5285
|
-
const _hoisted_6$
|
|
5286
|
-
const _hoisted_7$
|
|
5284
|
+
const _hoisted_6$3 = ["for"];
|
|
5285
|
+
const _hoisted_7$3 = { key: 0 };
|
|
5287
5286
|
const _hoisted_8$1 = {
|
|
5288
5287
|
key: 0,
|
|
5289
5288
|
class: "w-slider__step-labels"
|
|
@@ -5359,7 +5358,7 @@ function render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5359
5358
|
class: normalizeClass(["w-slider__thumb-label", $options.thumbClasses]),
|
|
5360
5359
|
for: `button--${_ctx._.uid}`
|
|
5361
5360
|
}, [
|
|
5362
|
-
$props.thumbLabel === "droplet" ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
5361
|
+
$props.thumbLabel === "droplet" ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
|
|
5363
5362
|
renderSlot(_ctx.$slots, "label", { value: _ctx.rangeValueScaled }, () => [
|
|
5364
5363
|
createTextVNode(toDisplayString(~~_ctx.rangeValueScaled), 1)
|
|
5365
5364
|
])
|
|
@@ -5369,7 +5368,7 @@ function render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5369
5368
|
}, () => [
|
|
5370
5369
|
createTextVNode(toDisplayString(~~_ctx.rangeValueScaled), 1)
|
|
5371
5370
|
])
|
|
5372
|
-
], 10, _hoisted_6$
|
|
5371
|
+
], 10, _hoisted_6$3)) : createCommentVNode("", true)
|
|
5373
5372
|
], 4)
|
|
5374
5373
|
], 42, _hoisted_4$4),
|
|
5375
5374
|
$props.stepLabels && $props.step ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
|
|
@@ -5630,8 +5629,16 @@ var wSteps = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", render$h]]);
|
|
|
5630
5629
|
const _hoisted_1$7 = ["id", "name", "checked", "disabled", "readonly", "aria-readonly", "required", "tabindex", "aria-checked"];
|
|
5631
5630
|
const _hoisted_2$4 = ["for"];
|
|
5632
5631
|
const _hoisted_3$4 = ["for", "innerHTML"];
|
|
5633
|
-
const _hoisted_4$3 =
|
|
5634
|
-
|
|
5632
|
+
const _hoisted_4$3 = {
|
|
5633
|
+
key: 0,
|
|
5634
|
+
class: "w-switch__track"
|
|
5635
|
+
};
|
|
5636
|
+
const _hoisted_5$3 = {
|
|
5637
|
+
key: 1,
|
|
5638
|
+
class: "w-switch__thumb"
|
|
5639
|
+
};
|
|
5640
|
+
const _hoisted_6$2 = ["for"];
|
|
5641
|
+
const _hoisted_7$2 = ["for", "innerHTML"];
|
|
5635
5642
|
function render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5636
5643
|
return openBlock(), createBlock(resolveDynamicComponent(_ctx.formRegister ? "w-form-element" : "div"), mergeProps({ ref: "formEl" }, _ctx.formRegister && { validators: _ctx.validators, inputValue: $data.isOn, disabled: _ctx.isDisabled, readonly: _ctx.isReadonly }, {
|
|
5637
5644
|
valid: _ctx.valid,
|
|
@@ -5679,7 +5686,14 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5679
5686
|
_ctx.$refs.input.focus();
|
|
5680
5687
|
_ctx.$refs.input.click();
|
|
5681
5688
|
})
|
|
5682
|
-
}, toHandlers(_ctx.$attrs), { class: $options.inputClasses }),
|
|
5689
|
+
}, toHandlers(_ctx.$attrs), { class: $options.inputClasses }), [
|
|
5690
|
+
_ctx.$slots.track ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
5691
|
+
renderSlot(_ctx.$slots, "track")
|
|
5692
|
+
])) : createCommentVNode("", true),
|
|
5693
|
+
_ctx.$slots.thumb ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
|
|
5694
|
+
renderSlot(_ctx.$slots, "thumb")
|
|
5695
|
+
])) : createCommentVNode("", true)
|
|
5696
|
+
], 16),
|
|
5683
5697
|
$options.hasLabel && !$props.labelOnLeft ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
5684
5698
|
_ctx.$slots.default ? (openBlock(), createElementBlock("label", {
|
|
5685
5699
|
key: 0,
|
|
@@ -5687,12 +5701,12 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5687
5701
|
for: `w-switch--${_ctx._.uid}`
|
|
5688
5702
|
}, [
|
|
5689
5703
|
renderSlot(_ctx.$slots, "default")
|
|
5690
|
-
], 8,
|
|
5704
|
+
], 8, _hoisted_6$2)) : $props.label ? (openBlock(), createElementBlock("label", {
|
|
5691
5705
|
key: 1,
|
|
5692
5706
|
class: "w-switch__label w-form-el-shakable",
|
|
5693
5707
|
for: `w-switch--${_ctx._.uid}`,
|
|
5694
5708
|
innerHTML: $props.label
|
|
5695
|
-
}, null, 8,
|
|
5709
|
+
}, null, 8, _hoisted_7$2)) : createCommentVNode("", true)
|
|
5696
5710
|
], 64)) : createCommentVNode("", true)
|
|
5697
5711
|
]),
|
|
5698
5712
|
_: 3
|
|
@@ -5732,6 +5746,8 @@ const _sfc_main$g = {
|
|
|
5732
5746
|
"w-switch--disabled": this.isDisabled,
|
|
5733
5747
|
"w-switch--readonly": this.isReadonly,
|
|
5734
5748
|
"w-switch--ripple": this.ripple.start,
|
|
5749
|
+
"w-switch--custom-thumb": this.$slots.thumb,
|
|
5750
|
+
"w-switch--custom-track": this.$slots.track,
|
|
5735
5751
|
"w-switch--rippled": this.ripple.end
|
|
5736
5752
|
};
|
|
5737
5753
|
},
|