wave-ui 2.44.0 → 2.45.1
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 +1361 -1264
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +8 -8
- package/src/wave-ui/components/index.js +1 -1
- package/src/wave-ui/components/w-accordion.vue +7 -3
- package/src/wave-ui/components/w-badge.vue +8 -8
- package/src/wave-ui/components/{w-button.vue → w-button/button.vue} +3 -8
- package/src/wave-ui/components/w-button/index.vue +68 -0
- package/src/wave-ui/components/w-checkbox.vue +18 -9
- package/src/wave-ui/components/w-confirm.vue +17 -1
- package/src/wave-ui/components/w-icon.vue +2 -1
- package/src/wave-ui/components/w-input.vue +4 -8
- package/src/wave-ui/components/w-menu.vue +1 -0
- package/src/wave-ui/components/w-overlay.vue +4 -1
- package/src/wave-ui/components/w-progress.vue +9 -27
- package/src/wave-ui/components/w-radio.vue +14 -4
- package/src/wave-ui/components/w-rating.vue +2 -1
- package/src/wave-ui/components/w-slider.vue +4 -4
- package/src/wave-ui/components/w-spinner.vue +2 -2
- package/src/wave-ui/components/w-switch.vue +15 -5
- package/src/wave-ui/components/w-tabs/index.vue +4 -2
- package/src/wave-ui/components/w-timeline.vue +1 -1
- package/src/wave-ui/core.js +2 -1
|
@@ -33,8 +33,13 @@ component(
|
|
|
33
33
|
:class="inputClasses")
|
|
34
34
|
.w-switch__track(v-if="$slots.track")
|
|
35
35
|
slot(name="track")
|
|
36
|
-
.w-switch__thumb(v-if="$slots.thumb")
|
|
37
|
-
|
|
36
|
+
.w-switch__thumb(v-if="$slots.thumb || loading")
|
|
37
|
+
w-progress(
|
|
38
|
+
v-if="loading"
|
|
39
|
+
circle
|
|
40
|
+
color="inherit"
|
|
41
|
+
v-bind="typeof loading === 'number' ? { 'model-value': loading } : {}")
|
|
42
|
+
slot(v-else name="thumb")
|
|
38
43
|
template(v-if="hasLabel && !labelOnLeft")
|
|
39
44
|
label.w-switch__label.w-switch__label--right.w-form-el-shakable(
|
|
40
45
|
v-if="$slots.default || label"
|
|
@@ -57,7 +62,8 @@ export default {
|
|
|
57
62
|
color: { type: String, default: 'primary' },
|
|
58
63
|
labelColor: { type: String, default: 'primary' },
|
|
59
64
|
thin: { type: Boolean },
|
|
60
|
-
noRipple: { type: Boolean }
|
|
65
|
+
noRipple: { type: Boolean },
|
|
66
|
+
loading: { type: [Boolean, Number], default: false }
|
|
61
67
|
// Props from mixin: name, disabled, readonly, required, tabindex, validators.
|
|
62
68
|
// Computed from mixin: inputName, isDisabled & isReadonly.
|
|
63
69
|
},
|
|
@@ -88,6 +94,7 @@ export default {
|
|
|
88
94
|
'w-switch--ripple': this.ripple.start,
|
|
89
95
|
'w-switch--custom-thumb': this.$slots.thumb,
|
|
90
96
|
'w-switch--custom-track': this.$slots.track,
|
|
97
|
+
'w-switch--loading': this.loading,
|
|
91
98
|
'w-switch--rippled': this.ripple.end
|
|
92
99
|
}
|
|
93
100
|
},
|
|
@@ -142,6 +149,7 @@ $disabled-color: #ddd;
|
|
|
142
149
|
vertical-align: middle;
|
|
143
150
|
cursor: pointer;
|
|
144
151
|
|
|
152
|
+
&--loading {cursor: wait;}
|
|
145
153
|
&--disabled, &--readonly {
|
|
146
154
|
cursor: not-allowed;
|
|
147
155
|
touch-action: initial;
|
|
@@ -234,7 +242,9 @@ $disabled-color: #ddd;
|
|
|
234
242
|
background-color: currentColor;
|
|
235
243
|
}
|
|
236
244
|
}
|
|
237
|
-
&--
|
|
245
|
+
&--loading .w-progress {padding: 1px;}
|
|
246
|
+
&--loading.w-switch--thin.w-switch--on .w-progress {color: #fff;}
|
|
247
|
+
&--loading &__input:after, &--custom-thumb &__input:after {display: none;}
|
|
238
248
|
&__thumb > * {
|
|
239
249
|
width: inherit;
|
|
240
250
|
height: inherit;
|
|
@@ -247,7 +257,7 @@ $disabled-color: #ddd;
|
|
|
247
257
|
left: 0;
|
|
248
258
|
top: 0;
|
|
249
259
|
width: $small-form-el-size;
|
|
250
|
-
|
|
260
|
+
aspect-ratio: 1;
|
|
251
261
|
background-color: currentColor;
|
|
252
262
|
border-radius: 100%;
|
|
253
263
|
opacity: 0;
|
|
@@ -179,8 +179,10 @@ export default {
|
|
|
179
179
|
|
|
180
180
|
if (!this.fillBar && this.activeTabEl) {
|
|
181
181
|
const { left, width } = this.activeTabEl.getBoundingClientRect()
|
|
182
|
-
const
|
|
183
|
-
|
|
182
|
+
const tabsBar = this.activeTabEl.parentNode
|
|
183
|
+
const { left: parentLeft } = tabsBar.getBoundingClientRect()
|
|
184
|
+
const { borderLeftWidth } = getComputedStyle(tabsBar)
|
|
185
|
+
this.slider.left = `${left - parentLeft - parseInt(borderLeftWidth) + tabsBar.scrollLeft}px`
|
|
184
186
|
this.slider.width = `${width}px`
|
|
185
187
|
}
|
|
186
188
|
else {
|
package/src/wave-ui/core.js
CHANGED
|
@@ -48,7 +48,8 @@ export default class WaveUI {
|
|
|
48
48
|
// if (directives[id]) app.directive(id, directives[id])
|
|
49
49
|
// }
|
|
50
50
|
app.directive('focus', {
|
|
51
|
-
|
|
51
|
+
// Wait for the next tick to focus the newly mounted element.
|
|
52
|
+
mounted: el => setTimeout(() => el.focus(), 0)
|
|
52
53
|
})
|
|
53
54
|
app.directive('scroll', {
|
|
54
55
|
mounted: (el, binding) => {
|