wave-ui 1.58.0 → 1.59.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 +213 -111
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +26 -29
- 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 +1 -0
- package/src/wave-ui/components/w-image.vue +2 -0
- package/src/wave-ui/components/w-input.vue +4 -2
- 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 -3
|
@@ -295,7 +295,7 @@ export default {
|
|
|
295
295
|
transform: translateX(-50%);
|
|
296
296
|
top: 0;
|
|
297
297
|
width: $base-increment;
|
|
298
|
-
|
|
298
|
+
aspect-ratio: 1;
|
|
299
299
|
background-color: rgba(0, 0, 0, 0.2);
|
|
300
300
|
border-radius: 99em;
|
|
301
301
|
// box-shadow: 0 0 0 1px #fff;
|
|
@@ -358,7 +358,7 @@ export default {
|
|
|
358
358
|
&__thumb {
|
|
359
359
|
position: absolute;
|
|
360
360
|
width: 3 * $base-increment;
|
|
361
|
-
|
|
361
|
+
aspect-ratio: 1;
|
|
362
362
|
left: 100%;
|
|
363
363
|
top: 50%;
|
|
364
364
|
transform: translate(-50%, -50%);
|
|
@@ -373,7 +373,7 @@ export default {
|
|
|
373
373
|
left: 0;
|
|
374
374
|
top: 0;
|
|
375
375
|
width: 100%;
|
|
376
|
-
|
|
376
|
+
aspect-ratio: 1;
|
|
377
377
|
border: none;
|
|
378
378
|
border-radius: 99em;
|
|
379
379
|
cursor: pointer;
|
|
@@ -452,7 +452,7 @@ export default {
|
|
|
452
452
|
transform: translateX(-50%) rotate(-45deg);
|
|
453
453
|
border-radius: 99em 99em 99em 0;
|
|
454
454
|
width: 2.8em;
|
|
455
|
-
|
|
455
|
+
aspect-ratio: 1;
|
|
456
456
|
|
|
457
457
|
& > div {
|
|
458
458
|
position: absolute;
|
|
@@ -61,7 +61,7 @@ export default {
|
|
|
61
61
|
align-self: center;
|
|
62
62
|
font-size: 2rem;
|
|
63
63
|
width: 1em;
|
|
64
|
-
|
|
64
|
+
aspect-ratio: 1;
|
|
65
65
|
|
|
66
66
|
&.size--xs {font-size: round(0.9 * divide($base-font-size, 2)) * 2;}
|
|
67
67
|
&.size--sm {font-size: round(1.5 * $base-font-size);}
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
content: '';
|
|
74
74
|
position: absolute;
|
|
75
75
|
width: 100%;
|
|
76
|
-
|
|
76
|
+
aspect-ratio: 1;
|
|
77
77
|
top: 0;
|
|
78
78
|
left: 0;
|
|
79
79
|
background-color: currentColor;
|
|
@@ -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;
|
|
@@ -178,8 +178,10 @@ export default {
|
|
|
178
178
|
|
|
179
179
|
if (!this.fillBar && this.activeTabEl) {
|
|
180
180
|
const { left, width } = this.activeTabEl.getBoundingClientRect()
|
|
181
|
-
const
|
|
182
|
-
|
|
181
|
+
const tabsBar = this.activeTabEl.parentNode
|
|
182
|
+
const { left: parentLeft } = tabsBar.getBoundingClientRect()
|
|
183
|
+
const { borderLeftWidth } = getComputedStyle(tabsBar)
|
|
184
|
+
this.slider.left = `${left - parentLeft - parseInt(borderLeftWidth) + tabsBar.scrollLeft}px`
|
|
183
185
|
this.slider.width = `${width}px`
|
|
184
186
|
}
|
|
185
187
|
else {
|
package/src/wave-ui/core.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import config, { mergeConfig } from './utils/config'
|
|
2
2
|
import NotificationManager from './utils/notification-manager'
|
|
3
3
|
import colors from './utils/colors'
|
|
4
|
-
import { consoleWarn } from './utils/console'
|
|
5
4
|
// import * as directives from './directives'
|
|
6
5
|
|
|
7
6
|
const shadeColor = (col, amt) => {
|
|
@@ -42,8 +41,8 @@ export default class WaveUI {
|
|
|
42
41
|
// if (directives[id]) Vue.directive(id, directives[id])
|
|
43
42
|
// }
|
|
44
43
|
Vue.directive('focus', {
|
|
45
|
-
//
|
|
46
|
-
inserted: el => el.focus()
|
|
44
|
+
// Wait for the next tick to focus the newly mounted element.
|
|
45
|
+
inserted: el => setTimeout(() => el.focus(), 0)
|
|
47
46
|
})
|
|
48
47
|
Vue.directive('scroll', {
|
|
49
48
|
inserted: (el, binding) => {
|