wave-ui 2.37.1 → 2.38.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 +47 -4
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +1 -1
- package/src/wave-ui/components/w-accordion.vue +1 -0
- package/src/wave-ui/components/w-button.vue +1 -0
- package/src/wave-ui/components/w-checkbox.vue +4 -5
- package/src/wave-ui/components/w-list.vue +1 -0
- package/src/wave-ui/components/w-progress.vue +4 -4
- package/src/wave-ui/components/w-radio.vue +3 -1
- package/src/wave-ui/components/w-rating.vue +5 -1
- package/src/wave-ui/components/w-table.vue +50 -3
- package/src/wave-ui/components/w-tabs/index.vue +10 -0
- package/src/wave-ui/components/w-tag.vue +2 -0
package/package.json
CHANGED
|
@@ -166,6 +166,7 @@ $spinner-size: 40;
|
|
|
166
166
|
// Background-color must not transition to not affect the hover & focus states
|
|
167
167
|
// in :before & :after.
|
|
168
168
|
transition: $transition-duration, background-color 0s, padding 0s;
|
|
169
|
+
-webkit-tap-highlight-color: transparent;
|
|
169
170
|
|
|
170
171
|
// In w-flex wrapper, allow overriding the default `align-self: center`.
|
|
171
172
|
.w-flex.align-start > & {align-self: flex-start;}
|
|
@@ -136,11 +136,9 @@ $inactive-color: #666;
|
|
|
136
136
|
// Contain the hidden radio button, so browser doesn't pan to it when outside of the screen.
|
|
137
137
|
position: relative;
|
|
138
138
|
cursor: pointer;
|
|
139
|
+
-webkit-tap-highlight-color: transparent;
|
|
139
140
|
|
|
140
|
-
&--disabled {
|
|
141
|
-
cursor: not-allowed;
|
|
142
|
-
-webkit-tap-highlight-color: transparent;
|
|
143
|
-
}
|
|
141
|
+
&--disabled {cursor: not-allowed;}
|
|
144
142
|
|
|
145
143
|
// The hidden real checkbox.
|
|
146
144
|
input[type="checkbox"] {
|
|
@@ -237,7 +235,8 @@ $inactive-color: #666;
|
|
|
237
235
|
animation: w-checkbox-ripple 0.55s 0.15s ease;
|
|
238
236
|
}
|
|
239
237
|
|
|
240
|
-
:focus ~ &__input:before
|
|
238
|
+
:focus ~ &__input:before,
|
|
239
|
+
:active ~ &__input:before {
|
|
241
240
|
transform: scale(1.8);
|
|
242
241
|
opacity: 0.2;
|
|
243
242
|
}
|
|
@@ -218,12 +218,12 @@ $circle-size: 40;
|
|
|
218
218
|
background-image: linear-gradient(
|
|
219
219
|
-45deg,
|
|
220
220
|
rgba(255, 255, 255, 0.2) 25%,
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
rgba(255, 255, 255, 0) 25%,
|
|
222
|
+
rgba(255, 255, 255, 0) 50%,
|
|
223
223
|
rgba(255, 255, 255, 0.2) 50%,
|
|
224
224
|
rgba(255, 255, 255, 0.2) 75%,
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
rgba(255, 255, 255, 0) 75%,
|
|
226
|
+
rgba(255, 255, 255, 0)
|
|
227
227
|
);
|
|
228
228
|
background-size: 50px 50px;
|
|
229
229
|
animation: w-progress-stripes 2s infinite linear;
|
|
@@ -134,6 +134,7 @@ $inactive-color: #666;
|
|
|
134
134
|
// Contain the hidden radio button, so browser doesn't pan to it when outside of the screen.
|
|
135
135
|
position: relative;
|
|
136
136
|
cursor: pointer;
|
|
137
|
+
-webkit-tap-highlight-color: transparent;
|
|
137
138
|
|
|
138
139
|
&--disabled {
|
|
139
140
|
cursor: not-allowed;
|
|
@@ -211,7 +212,8 @@ $inactive-color: #666;
|
|
|
211
212
|
animation: w-radio-ripple 0.55s 0.15s ease;
|
|
212
213
|
}
|
|
213
214
|
|
|
214
|
-
:focus
|
|
215
|
+
:focus ~ &__input:before,
|
|
216
|
+
:active ~ &__input:before {
|
|
215
217
|
transform: scale(1.8);
|
|
216
218
|
opacity: 0.2;
|
|
217
219
|
}
|
|
@@ -172,6 +172,7 @@ export default {
|
|
|
172
172
|
border: none;
|
|
173
173
|
background: none;
|
|
174
174
|
cursor: pointer;
|
|
175
|
+
-webkit-tap-highlight-color: transparent;
|
|
175
176
|
@include default-transition($fast-transition-duration);
|
|
176
177
|
|
|
177
178
|
// Disabled & readonly.
|
|
@@ -245,13 +246,16 @@ export default {
|
|
|
245
246
|
animation: w-rating-ripple 0.55s ease;
|
|
246
247
|
}
|
|
247
248
|
|
|
248
|
-
&__button:focus:after
|
|
249
|
+
&__button:focus:after,
|
|
250
|
+
&__button:active:after {
|
|
249
251
|
transform: scale(1.8);
|
|
250
252
|
opacity: 0.2;
|
|
251
253
|
}
|
|
252
254
|
&__button--on:focus:after {
|
|
253
255
|
transform: scale(1.8);
|
|
254
256
|
}
|
|
257
|
+
.w-rating--disabled &__button:after,
|
|
258
|
+
.w-rating--readonly &__button:after {opacity: 0;}
|
|
255
259
|
|
|
256
260
|
// After ripple reset to default state, then remove the class via js and the
|
|
257
261
|
// `:focus + &__button:after` will re-transition to normal focused outline.
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
v-for="(header, i) in headers"
|
|
11
11
|
:key="i"
|
|
12
12
|
:width="header.width || null")
|
|
13
|
+
|
|
14
|
+
//- Table header.
|
|
13
15
|
thead(v-if="!noHeaders")
|
|
14
16
|
tr
|
|
15
17
|
th.w-table__header(
|
|
@@ -36,6 +38,8 @@
|
|
|
36
38
|
v-if="i < headers.length - 1 && resizableColumns"
|
|
37
39
|
:class="{ 'w-table__col-resizer--hover': colResizing.hover === i, 'w-table__col-resizer--active': colResizing.columnIndex === i }"
|
|
38
40
|
@click.stop)
|
|
41
|
+
|
|
42
|
+
//- Table body.
|
|
39
43
|
tbody
|
|
40
44
|
//- Progress bar.
|
|
41
45
|
tr.w-table__progress-bar(v-if="loading")
|
|
@@ -114,6 +118,17 @@
|
|
|
114
118
|
span.w-table__col-resizer(
|
|
115
119
|
v-if="i < headers.length - 1 && resizableColumns"
|
|
116
120
|
:class="{ 'w-table__col-resizer--hover': colResizing.hover === i, 'w-table__col-resizer--active': colResizing.columnIndex === j }")
|
|
121
|
+
//- Extra row.
|
|
122
|
+
.w-table__extra-row(v-if="$slots['extra-row']")
|
|
123
|
+
slot(name="extra-row")
|
|
124
|
+
|
|
125
|
+
//- Table footer.
|
|
126
|
+
tfoot.w-table__footer(v-if="$slots.footer || $slots['footer-row']")
|
|
127
|
+
slot(v-if="$slots['footer-row']" name="footer-row")
|
|
128
|
+
tr.w-table__row(v-else)
|
|
129
|
+
td.w-table__cell(:colspan="headers.length")
|
|
130
|
+
slot(name="footer")
|
|
131
|
+
//- .pagination
|
|
117
132
|
</template>
|
|
118
133
|
|
|
119
134
|
<script>
|
|
@@ -133,6 +148,7 @@ export default {
|
|
|
133
148
|
headers: { type: Array, required: true },
|
|
134
149
|
noHeaders: { type: Boolean },
|
|
135
150
|
fixedHeaders: { type: Boolean },
|
|
151
|
+
fixedFooter: { type: Boolean },
|
|
136
152
|
loading: { type: Boolean },
|
|
137
153
|
// Allow single sort: `+id`, or multiple in an array like: ['+id', '-firstName'].
|
|
138
154
|
sort: { type: [String, Array] },
|
|
@@ -175,7 +191,15 @@ export default {
|
|
|
175
191
|
resizableColumns: { type: Boolean }
|
|
176
192
|
},
|
|
177
193
|
|
|
178
|
-
emits: [
|
|
194
|
+
emits: [
|
|
195
|
+
'row-select',
|
|
196
|
+
'row-expand',
|
|
197
|
+
'row-click',
|
|
198
|
+
'update:sort',
|
|
199
|
+
'update:selected-rows',
|
|
200
|
+
'update:expanded-rows',
|
|
201
|
+
'column-resize'
|
|
202
|
+
],
|
|
179
203
|
|
|
180
204
|
data: () => ({
|
|
181
205
|
activeSorting: [],
|
|
@@ -243,7 +267,8 @@ export default {
|
|
|
243
267
|
'w-table--mobile': this.isMobile || null,
|
|
244
268
|
'w-table--resizable-cols': this.resizableColumns || null,
|
|
245
269
|
'w-table--resizing': this.colResizing.dragging,
|
|
246
|
-
'w-table--fixed-header': this.fixedHeaders
|
|
270
|
+
'w-table--fixed-header': this.fixedHeaders,
|
|
271
|
+
'w-table--fixed-footer': this.fixedFooter
|
|
247
272
|
}
|
|
248
273
|
},
|
|
249
274
|
|
|
@@ -523,7 +548,7 @@ $tr-border-top: 1px;
|
|
|
523
548
|
text-overflow: ellipsis;
|
|
524
549
|
}
|
|
525
550
|
|
|
526
|
-
&--fixed-header
|
|
551
|
+
&--fixed-header thead {
|
|
527
552
|
position: sticky;
|
|
528
553
|
top: 0;
|
|
529
554
|
background-color: #fff;
|
|
@@ -631,6 +656,28 @@ $tr-border-top: 1px;
|
|
|
631
656
|
background-color: rgba(255, 255, 255, 0.2);
|
|
632
657
|
padding: (2 * $base-increment) $base-increment;
|
|
633
658
|
}
|
|
659
|
+
|
|
660
|
+
// Table footer.
|
|
661
|
+
// ------------------------------------------------------
|
|
662
|
+
&__footer &__cell {
|
|
663
|
+
padding-top: $base-increment;
|
|
664
|
+
padding-bottom: $base-increment;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
&--fixed-footer tfoot {
|
|
668
|
+
position: sticky;
|
|
669
|
+
bottom: 0;
|
|
670
|
+
background-color: #fff;
|
|
671
|
+
|
|
672
|
+
&:after {
|
|
673
|
+
content: '';
|
|
674
|
+
position: absolute;
|
|
675
|
+
bottom: 0;
|
|
676
|
+
left: 0;
|
|
677
|
+
right: 0;
|
|
678
|
+
border-bottom: $border;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
634
681
|
}
|
|
635
682
|
|
|
636
683
|
// Mobile layout.
|
|
@@ -193,6 +193,15 @@ export default {
|
|
|
193
193
|
if (typeof index === 'string') index = ~~index
|
|
194
194
|
else if (isNaN(index) || index < 0) index = 0
|
|
195
195
|
this.activeTabIndex = index
|
|
196
|
+
|
|
197
|
+
// Scroll the new active tab item title into view if needed.
|
|
198
|
+
this.$nextTick(() => {
|
|
199
|
+
const ref = this.$refs['tabs-bar']
|
|
200
|
+
this.activeTabEl = ref && ref.querySelector(`.w-tabs__bar-item:nth-child(${index + 1})`)
|
|
201
|
+
if (this.activeTabEl) {
|
|
202
|
+
this.activeTabEl.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' })
|
|
203
|
+
}
|
|
204
|
+
})
|
|
196
205
|
},
|
|
197
206
|
|
|
198
207
|
// Return the original item (so there is no `_index`, etc.).
|
|
@@ -282,6 +291,7 @@ export default {
|
|
|
282
291
|
transition: $transition-duration ease-in-out, flex-grow 0s, flex 0s; // `flex` for Safari.
|
|
283
292
|
user-select: none;
|
|
284
293
|
cursor: pointer;
|
|
294
|
+
-webkit-tap-highlight-color: transparent;
|
|
285
295
|
|
|
286
296
|
.w-tabs--fill-bar & {flex-grow: 1;flex-basis: 0;}
|
|
287
297
|
.w-tabs--card & {
|
|
@@ -135,6 +135,7 @@ export default {
|
|
|
135
135
|
&--clickable {
|
|
136
136
|
cursor: pointer;
|
|
137
137
|
user-select: none;
|
|
138
|
+
-webkit-tap-highlight-color: transparent;
|
|
138
139
|
|
|
139
140
|
.w-tag__closable {
|
|
140
141
|
margin-left: 3px;
|
|
@@ -166,6 +167,7 @@ export default {
|
|
|
166
167
|
border-radius: $border-radius - 1;
|
|
167
168
|
transition: 0.2s;
|
|
168
169
|
}
|
|
170
|
+
&.w-tag--round:before {border-radius: inherit;}
|
|
169
171
|
|
|
170
172
|
// Hover state.
|
|
171
173
|
&:hover:before {background-color: currentColor;opacity: 0.06;}
|