wave-ui 2.47.0 → 3.0.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 +1920 -1638
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +4 -3
- package/src/wave-ui/components/index.js +1 -0
- package/src/wave-ui/components/transitions/w-transition-expand.vue +26 -15
- package/src/wave-ui/components/w-accordion.vue +8 -2
- package/src/wave-ui/components/w-alert.vue +10 -4
- package/src/wave-ui/components/w-app.vue +2 -107
- package/src/wave-ui/components/w-badge.vue +7 -3
- package/src/wave-ui/components/w-button/button.vue +6 -2
- package/src/wave-ui/components/w-card.vue +14 -4
- package/src/wave-ui/components/w-checkbox.vue +15 -8
- package/src/wave-ui/components/w-confirm.vue +7 -2
- package/src/wave-ui/components/w-date-picker.vue +6 -0
- package/src/wave-ui/components/w-dialog.vue +9 -3
- package/src/wave-ui/components/w-divider.vue +9 -3
- package/src/wave-ui/components/w-drawer.vue +9 -3
- package/src/wave-ui/components/w-input.vue +4 -2
- package/src/wave-ui/components/w-list.vue +1 -1
- package/src/wave-ui/components/w-menu.vue +11 -4
- package/src/wave-ui/components/w-notification-manager.vue +18 -30
- package/src/wave-ui/components/w-notification.vue +7 -1
- package/src/wave-ui/components/w-progress.vue +2 -2
- package/src/wave-ui/components/w-radio.vue +8 -2
- package/src/wave-ui/components/w-rating.vue +11 -3
- package/src/wave-ui/components/w-scrollbar.vue +24 -0
- package/src/wave-ui/components/w-select.vue +18 -8
- package/src/wave-ui/components/w-slider.vue +13 -7
- package/src/wave-ui/components/w-steps.vue +14 -4
- package/src/wave-ui/components/w-switch.vue +14 -14
- package/src/wave-ui/components/w-table.vue +107 -16
- package/src/wave-ui/components/w-tabs/index.vue +8 -2
- package/src/wave-ui/components/w-tag.vue +15 -10
- package/src/wave-ui/components/w-textarea.vue +6 -2
- package/src/wave-ui/components/w-timeline.vue +18 -5
- package/src/wave-ui/components/w-toolbar.vue +8 -2
- package/src/wave-ui/components/w-tooltip.vue +10 -4
- package/src/wave-ui/components/w-tree.vue +57 -19
- package/src/wave-ui/core.js +117 -90
- package/src/wave-ui/scss/_base.scss +53 -2
- package/src/wave-ui/scss/_colors.scss +41 -17
- package/src/wave-ui/scss/_layout.scss +5 -12
- package/src/wave-ui/scss/_mixins.scss +24 -0
- package/src/wave-ui/scss/_variables.scss +100 -11
- package/src/wave-ui/utils/colors.js +60 -3
- package/src/wave-ui/utils/config.js +35 -11
- package/src/wave-ui/utils/dynamic-css.js +92 -30
- package/src/wave-ui/utils/notification-manager.js +39 -8
|
@@ -128,12 +128,34 @@
|
|
|
128
128
|
slot(name="extra-row")
|
|
129
129
|
|
|
130
130
|
//- Table footer.
|
|
131
|
-
tfoot.w-table__footer(v-if="$slots.footer || $slots['footer-row']")
|
|
131
|
+
tfoot.w-table__footer(v-if="$slots.footer || $slots['footer-row'] || pagination")
|
|
132
132
|
slot(v-if="$slots['footer-row']" name="footer-row")
|
|
133
|
-
tr.w-table__row(v-else)
|
|
133
|
+
tr.w-table__row(v-else-if="$slots.footer")
|
|
134
134
|
td.w-table__cell(:colspan="headers.length")
|
|
135
135
|
slot(name="footer")
|
|
136
|
-
|
|
136
|
+
tr.w-table__row.w-table__pagination-wrap(v-if="pagination && paginationConfig")
|
|
137
|
+
td.w-table__cell(:colspan="headers.length")
|
|
138
|
+
.w-table__pagination
|
|
139
|
+
w-select.pagination-number.pagination-number--items-per-page(
|
|
140
|
+
v-if="paginationConfig.itemsPerPageOptions"
|
|
141
|
+
v-model="paginationConfig.itemsPerPage"
|
|
142
|
+
:items="paginationConfig.itemsPerPageOptions"
|
|
143
|
+
label-position="left"
|
|
144
|
+
label="Items per page"
|
|
145
|
+
label-color="inherit")
|
|
146
|
+
span.pagination-number.pagination-number--results.
|
|
147
|
+
{{ paginationConfig.start }}-{{ paginationConfig.end }} of {{ paginationConfig.total }}
|
|
148
|
+
.pagination-arrows
|
|
149
|
+
w-button.pagination-arrow.pagination-arrow--prev(
|
|
150
|
+
@click="paginationConfig.page--"
|
|
151
|
+
icon="wi-chevron-left"
|
|
152
|
+
text
|
|
153
|
+
lg)
|
|
154
|
+
w-button.pagination-arrow.pagination-arrow--next(
|
|
155
|
+
@click="paginationConfig.page++"
|
|
156
|
+
icon="wi-chevron-right"
|
|
157
|
+
text
|
|
158
|
+
lg)
|
|
137
159
|
</template>
|
|
138
160
|
|
|
139
161
|
<script>
|
|
@@ -189,13 +211,30 @@ export default {
|
|
|
189
211
|
|
|
190
212
|
forceSelection: { type: Boolean },
|
|
191
213
|
|
|
192
|
-
// Useful to select or expand a row, and even after a filter, the same row will stay selected or
|
|
214
|
+
// Useful to select or expand a row, and even after a filter, the same row will stay selected or expanded.
|
|
193
215
|
uidKey: { type: String, default: 'id' },
|
|
194
216
|
|
|
195
217
|
filter: { type: Function },
|
|
196
218
|
sortFunction: { type: Function },
|
|
197
219
|
mobileBreakpoint: { type: Number, default: 0 },
|
|
198
|
-
resizableColumns: { type: Boolean }
|
|
220
|
+
resizableColumns: { type: Boolean },
|
|
221
|
+
|
|
222
|
+
pagination: {
|
|
223
|
+
type: [Boolean, Object, String],
|
|
224
|
+
validator: object => {
|
|
225
|
+
if (!object) return true // Accept any falsy value.
|
|
226
|
+
else if (typeof object === 'object' && (!object.itemsPerPage || (object.page && isNaN(object.page)))) {
|
|
227
|
+
consoleError(
|
|
228
|
+
'Wrong pagination config received in the w-table\'s `pagination` prop (received: `' + JSON.stringify(object) + '`). ' +
|
|
229
|
+
'\nExpected object: { itemsPerPage: Integer, page: Integer } or { itemsPerPage: Integer, start: Integer }.'
|
|
230
|
+
)
|
|
231
|
+
return false
|
|
232
|
+
}
|
|
233
|
+
return true
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
dark: { type: Boolean },
|
|
237
|
+
light: { type: Boolean }
|
|
199
238
|
},
|
|
200
239
|
|
|
201
240
|
emits: [
|
|
@@ -222,7 +261,8 @@ export default {
|
|
|
222
261
|
nextColWidth: null,
|
|
223
262
|
columnEl: null,
|
|
224
263
|
nextColumnEl: null
|
|
225
|
-
}
|
|
264
|
+
},
|
|
265
|
+
paginationConfig: {}
|
|
226
266
|
}),
|
|
227
267
|
|
|
228
268
|
computed: {
|
|
@@ -277,7 +317,9 @@ export default {
|
|
|
277
317
|
'w-table--resizing': this.colResizing.dragging,
|
|
278
318
|
'w-table--fixed-header': this.fixedHeaders,
|
|
279
319
|
'w-table--fixed-footer': this.fixedFooter,
|
|
280
|
-
'w-table--sticky-column': this.hasStickyColumn
|
|
320
|
+
'w-table--sticky-column': this.hasStickyColumn,
|
|
321
|
+
'w-table--dark': this.dark,
|
|
322
|
+
'w-table--light': this.light
|
|
281
323
|
}
|
|
282
324
|
},
|
|
283
325
|
|
|
@@ -490,6 +532,20 @@ export default {
|
|
|
490
532
|
this.colResizing.colWidth = null
|
|
491
533
|
this.colResizing.nextColWidth = null
|
|
492
534
|
}, 0)
|
|
535
|
+
},
|
|
536
|
+
|
|
537
|
+
updatePaginationConfig () {
|
|
538
|
+
const itemsPerPage = this.pagination?.itemsPerPage || 10
|
|
539
|
+
const total = this.pagination?.total || this.items.length
|
|
540
|
+
const page = this.pagination?.page || 1
|
|
541
|
+
this.paginationConfig = {
|
|
542
|
+
itemsPerPage,
|
|
543
|
+
itemsPerPageOptions: this.pagination?.itemsPerPageOptions || [{ label: '10', value: 10 }, { label: '100', value: 100 }, { label: 'All', value: 0 }],
|
|
544
|
+
page,
|
|
545
|
+
start: this.pagination?.start || 1,
|
|
546
|
+
end: total >= (itemsPerPage * page) ? (itemsPerPage * page) : (total % (itemsPerPage * page)),
|
|
547
|
+
total
|
|
548
|
+
}
|
|
493
549
|
}
|
|
494
550
|
},
|
|
495
551
|
|
|
@@ -499,6 +555,8 @@ export default {
|
|
|
499
555
|
|
|
500
556
|
if ((this.expandedRows || []).length) this.expandedRowsInternal = this.expandedRows
|
|
501
557
|
if ((this.selectedRows || []).length) this.selectedRowsInternal = this.selectedRows
|
|
558
|
+
|
|
559
|
+
if (this.pagination) this.updatePaginationConfig()
|
|
502
560
|
},
|
|
503
561
|
|
|
504
562
|
watch: {
|
|
@@ -546,6 +604,8 @@ $tr-border-top: 1px;
|
|
|
546
604
|
border-collapse: collapse;
|
|
547
605
|
border: none;
|
|
548
606
|
|
|
607
|
+
@include themeable;
|
|
608
|
+
|
|
549
609
|
&--fixed-layout {
|
|
550
610
|
table-layout: fixed; // Allow resizing beyond the cell minimum text width.
|
|
551
611
|
}
|
|
@@ -570,7 +630,7 @@ $tr-border-top: 1px;
|
|
|
570
630
|
&--fixed-header thead {
|
|
571
631
|
position: sticky;
|
|
572
632
|
top: 0;
|
|
573
|
-
background-color:
|
|
633
|
+
background-color: $base-bg-color;
|
|
574
634
|
z-index: 1; // For sticky columns to go under.
|
|
575
635
|
|
|
576
636
|
&:after {
|
|
@@ -595,14 +655,14 @@ $tr-border-top: 1px;
|
|
|
595
655
|
right: 0;
|
|
596
656
|
bottom: 0;
|
|
597
657
|
z-index: -1;
|
|
598
|
-
background-color:
|
|
658
|
+
background-color: $base-bg-color;
|
|
599
659
|
}
|
|
600
660
|
}
|
|
601
661
|
|
|
602
662
|
// Sorting arrow.
|
|
603
663
|
&__header--sortable {cursor: pointer;}
|
|
604
664
|
&__header-sort {
|
|
605
|
-
color: rgba(
|
|
665
|
+
color: rgba(var(--w-base-color-rgb), 0.8);
|
|
606
666
|
vertical-align: text-bottom;
|
|
607
667
|
@include default-transition;
|
|
608
668
|
|
|
@@ -662,7 +722,7 @@ $tr-border-top: 1px;
|
|
|
662
722
|
|
|
663
723
|
// Table body.
|
|
664
724
|
// ------------------------------------------------------
|
|
665
|
-
tbody tr {border-top: $tr-border-top solid rgba(
|
|
725
|
+
tbody tr {border-top: $tr-border-top solid rgba(var(--w-base-color-rgb), 0.06);}
|
|
666
726
|
// Don't apply built-in bg color if a bg color is already found on a tr.
|
|
667
727
|
tbody tr:nth-child(odd):not(.no-data):not([class*="--bg"]) {background-color: $table-tr-odd-color;}
|
|
668
728
|
tbody .w-table__row:hover:not(.no-data):not([class*="--bg"]) {background-color: $table-tr-hover-color;}
|
|
@@ -675,7 +735,7 @@ $tr-border-top: 1px;
|
|
|
675
735
|
left: 0;
|
|
676
736
|
right: 0;
|
|
677
737
|
bottom: 0;
|
|
678
|
-
background-color: var(--primary);
|
|
738
|
+
background-color: var(--w-primary);
|
|
679
739
|
opacity: 0.2;
|
|
680
740
|
pointer-events: none;
|
|
681
741
|
}
|
|
@@ -707,7 +767,7 @@ $tr-border-top: 1px;
|
|
|
707
767
|
bottom: 0;
|
|
708
768
|
z-index: -1;
|
|
709
769
|
}
|
|
710
|
-
&:before {background-color:
|
|
770
|
+
&:before {background-color: $base-bg-color;}
|
|
711
771
|
}
|
|
712
772
|
tr:nth-child(odd) &__cell--sticky:after {background-color: $table-tr-odd-color;}
|
|
713
773
|
tr:hover &__cell--sticky:after {background-color: $table-tr-hover-color;}
|
|
@@ -727,7 +787,7 @@ $tr-border-top: 1px;
|
|
|
727
787
|
&--fixed-footer tfoot {
|
|
728
788
|
position: sticky;
|
|
729
789
|
bottom: 0;
|
|
730
|
-
background-color:
|
|
790
|
+
background-color: $base-bg-color;
|
|
731
791
|
z-index: 1; // For sticky columns to go under.
|
|
732
792
|
|
|
733
793
|
&:after {
|
|
@@ -739,14 +799,45 @@ $tr-border-top: 1px;
|
|
|
739
799
|
border-bottom: $border;
|
|
740
800
|
}
|
|
741
801
|
}
|
|
802
|
+
|
|
803
|
+
&__pagination {
|
|
804
|
+
display: flex;
|
|
805
|
+
align-items: center;
|
|
806
|
+
justify-content: flex-end;
|
|
807
|
+
padding-top: $base-increment;
|
|
808
|
+
padding-bottom: $base-increment;
|
|
809
|
+
|
|
810
|
+
.pagination-number--items-per-page {
|
|
811
|
+
margin-right: 6 * $base-increment;
|
|
812
|
+
flex-grow: 0;
|
|
813
|
+
text-align: right;
|
|
814
|
+
}
|
|
815
|
+
.pagination-number--of {
|
|
816
|
+
margin-left: $base-increment;
|
|
817
|
+
margin-right: $base-increment;
|
|
818
|
+
}
|
|
819
|
+
.w-select__selection {max-width: 60px;}
|
|
820
|
+
|
|
821
|
+
.pagination-arrows {
|
|
822
|
+
margin-left: 6 * $base-increment;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
742
825
|
}
|
|
743
826
|
|
|
744
827
|
// Mobile layout.
|
|
745
828
|
.w-table--mobile {
|
|
829
|
+
display: flex;
|
|
830
|
+
|
|
746
831
|
thead {display: none;}
|
|
747
|
-
|
|
832
|
+
tbody {
|
|
833
|
+
display: flex;
|
|
834
|
+
flex-direction: column;
|
|
835
|
+
flex-grow: 1;
|
|
836
|
+
}
|
|
748
837
|
tr {
|
|
749
|
-
display:
|
|
838
|
+
display: flex;
|
|
839
|
+
flex-direction: column;
|
|
840
|
+
flex-grow: 1;
|
|
750
841
|
padding-top: $base-increment;
|
|
751
842
|
padding-bottom: $base-increment;
|
|
752
843
|
}
|
|
@@ -73,7 +73,9 @@ export default {
|
|
|
73
73
|
fillBar: { type: Boolean },
|
|
74
74
|
center: { type: Boolean },
|
|
75
75
|
right: { type: Boolean },
|
|
76
|
-
card: { type: Boolean }
|
|
76
|
+
card: { type: Boolean },
|
|
77
|
+
dark: { type: Boolean },
|
|
78
|
+
light: { type: Boolean }
|
|
77
79
|
},
|
|
78
80
|
|
|
79
81
|
components: { TabContent },
|
|
@@ -125,7 +127,9 @@ export default {
|
|
|
125
127
|
'w-tabs--no-slider': this.noSlider,
|
|
126
128
|
'w-tabs--pill-slider': this.pillSlider,
|
|
127
129
|
'w-tabs--fill-bar': this.fillBar,
|
|
128
|
-
'w-tabs--init': this.init
|
|
130
|
+
'w-tabs--init': this.init,
|
|
131
|
+
'w-tabs--dark': this.dark,
|
|
132
|
+
'w-tabs--light': this.light
|
|
129
133
|
}
|
|
130
134
|
},
|
|
131
135
|
|
|
@@ -259,6 +263,8 @@ export default {
|
|
|
259
263
|
border: $border;
|
|
260
264
|
overflow: hidden;
|
|
261
265
|
|
|
266
|
+
@include themeable;
|
|
267
|
+
|
|
262
268
|
&--tile {border-radius: 0;}
|
|
263
269
|
&--card {border: none;}
|
|
264
270
|
&--no-border, &--shadow {border: none;}
|
|
@@ -25,7 +25,6 @@ export default {
|
|
|
25
25
|
modelValue: { type: [Boolean, Number], default: -1 },
|
|
26
26
|
color: { type: String },
|
|
27
27
|
bgColor: { type: String },
|
|
28
|
-
dark: { type: Boolean },
|
|
29
28
|
shadow: { type: Boolean },
|
|
30
29
|
tile: { type: Boolean },
|
|
31
30
|
round: { type: Boolean },
|
|
@@ -38,7 +37,9 @@ export default {
|
|
|
38
37
|
lg: { type: Boolean },
|
|
39
38
|
xl: { type: Boolean },
|
|
40
39
|
width: { type: [Number, String] },
|
|
41
|
-
height: { type: [Number, String] }
|
|
40
|
+
height: { type: [Number, String] },
|
|
41
|
+
dark: { type: Boolean },
|
|
42
|
+
light: { type: Boolean }
|
|
42
43
|
},
|
|
43
44
|
|
|
44
45
|
emits: ['input', 'update:modelValue'],
|
|
@@ -58,7 +59,8 @@ export default {
|
|
|
58
59
|
[this.color]: this.color,
|
|
59
60
|
[`${this.bgColor}--bg`]: this.bgColor,
|
|
60
61
|
[`size--${this.presetSize}`]: true,
|
|
61
|
-
'w-tag--dark': this.dark
|
|
62
|
+
'w-tag--dark': this.dark,
|
|
63
|
+
'w-tag--light': this.light,
|
|
62
64
|
'w-tag--clickable': this.modelValue !== -1,
|
|
63
65
|
'w-tag--outline': this.outline,
|
|
64
66
|
'w-tag--no-border': this.noBorder || this.shadow,
|
|
@@ -85,14 +87,16 @@ export default {
|
|
|
85
87
|
justify-content: center;
|
|
86
88
|
vertical-align: middle;
|
|
87
89
|
border-radius: $border-radius;
|
|
88
|
-
border: 1px solid rgba(
|
|
89
|
-
background-color: rgba(
|
|
90
|
+
border: 1px solid rgba(var(--w-contrast-bg-color-rgb), 0.08);
|
|
91
|
+
background-color: rgba(var(--w-base-bg-color-rgb), 0.85);
|
|
90
92
|
padding-left: 2 * $base-increment;
|
|
91
93
|
padding-right: 2 * $base-increment;
|
|
92
94
|
cursor: default;
|
|
93
95
|
user-select: none;
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
@include themeable;
|
|
98
|
+
|
|
99
|
+
&--dark {color: rgba(var(--w-base-bg-color-rgb), 0.95);}
|
|
96
100
|
&--outline {background-color: transparent;border-color: currentColor;}
|
|
97
101
|
&--no-border {border-color: transparent;}
|
|
98
102
|
&--round {border-radius: 99em;}
|
|
@@ -103,6 +107,7 @@ export default {
|
|
|
103
107
|
$font-size: round(0.7 * $base-font-size);
|
|
104
108
|
font-size: $font-size;
|
|
105
109
|
line-height: $font-size + 2px;
|
|
110
|
+
padding: round(0.25 * $base-increment) $base-increment;
|
|
106
111
|
}
|
|
107
112
|
&.size--sm {
|
|
108
113
|
$font-size: round(0.82 * $base-font-size);
|
|
@@ -150,7 +155,7 @@ export default {
|
|
|
150
155
|
}
|
|
151
156
|
|
|
152
157
|
&:hover {
|
|
153
|
-
.w-tag__closable {background-color: rgba(
|
|
158
|
+
.w-tag__closable {background-color: rgba(var(--w-contrast-bg-color-rgb), 0.1);}
|
|
154
159
|
}
|
|
155
160
|
|
|
156
161
|
// Overlay to mark the focus and active state.
|
|
@@ -171,19 +176,19 @@ export default {
|
|
|
171
176
|
|
|
172
177
|
// Hover state.
|
|
173
178
|
&:hover:before {background-color: currentColor;opacity: 0.06;}
|
|
174
|
-
&--dark:hover:before {background-color: rgba(
|
|
179
|
+
&--dark:hover:before {background-color: rgba(var(--w-base-bg-color-rgb), 0.12);opacity: 1;}
|
|
175
180
|
&--outline:hover:before,
|
|
176
181
|
&--text:hover:before {background-color: currentColor;opacity: 0.12;}
|
|
177
182
|
|
|
178
183
|
// Focus state.
|
|
179
184
|
&:focus:before {background-color: currentColor;opacity: 0.2;}
|
|
180
|
-
&--dark:focus:before {background-color: rgba(
|
|
185
|
+
&--dark:focus:before {background-color: rgba(var(--w-base-bg-color-rgb), 0.12);}
|
|
181
186
|
&--outline:focus:before,
|
|
182
187
|
&--text:focus:before {background-color: currentColor;opacity: 0.12;}
|
|
183
188
|
|
|
184
189
|
// Active state.
|
|
185
190
|
&:active:before {background-color: currentColor;opacity: 0.2;}
|
|
186
|
-
&--dark:active:before {background-color: rgba(
|
|
191
|
+
&--dark:active:before {background-color: rgba(var(--w-base-bg-color-rgb), 0.2);}
|
|
187
192
|
&--outline:active:before,
|
|
188
193
|
&--text:active:before {background-color: currentColor;opacity: 0.2;}
|
|
189
194
|
}
|
|
@@ -83,14 +83,15 @@ export default {
|
|
|
83
83
|
color: { type: String, default: 'primary' },
|
|
84
84
|
bgColor: { type: String },
|
|
85
85
|
labelColor: { type: String, default: 'primary' },
|
|
86
|
-
dark: { type: Boolean },
|
|
87
86
|
outline: { type: Boolean },
|
|
88
87
|
shadow: { type: Boolean },
|
|
89
88
|
noAutogrow: { type: Boolean },
|
|
90
89
|
resizable: { type: Boolean }, // Toggle the HTML built-in bottom right corner resize handle.
|
|
91
90
|
tile: { type: Boolean },
|
|
92
91
|
rows: { type: [Number, String], default: 3 },
|
|
93
|
-
cols: { type: [Number, String] }
|
|
92
|
+
cols: { type: [Number, String] },
|
|
93
|
+
dark: { type: Boolean },
|
|
94
|
+
light: { type: Boolean }
|
|
94
95
|
// Props from mixin: name, disabled, readonly, required, tabindex, validators.
|
|
95
96
|
// Computed from mixin: inputName, isDisabled & isReadonly.
|
|
96
97
|
},
|
|
@@ -132,6 +133,7 @@ export default {
|
|
|
132
133
|
[`w-textarea--${this.hasValue ? 'filled' : 'empty'}`]: true,
|
|
133
134
|
'w-textarea--focused': this.isFocused && !this.isReadonly,
|
|
134
135
|
'w-textarea--dark': this.dark,
|
|
136
|
+
'w-textarea--light': this.light,
|
|
135
137
|
'w-textarea--resizable': this.resizable,
|
|
136
138
|
'w-textarea--floating-label': this.hasLabel && this.labelPosition === 'inside' && !this.staticLabel,
|
|
137
139
|
'w-textarea--no-padding': !this.outline && !this.bgColor && !this.shadow,
|
|
@@ -228,6 +230,8 @@ $inactive-color: #777;
|
|
|
228
230
|
flex-wrap: wrap;
|
|
229
231
|
font-size: $base-font-size;
|
|
230
232
|
|
|
233
|
+
@include themeable;
|
|
234
|
+
|
|
231
235
|
// textarea wrapper.
|
|
232
236
|
// ------------------------------------------------------
|
|
233
237
|
&__textarea-wrap {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
ul.w-timeline
|
|
2
|
+
ul.w-timeline(:class="classes")
|
|
3
3
|
li.w-timeline-item(v-for="(item, i) in items" :key="i")
|
|
4
4
|
component.w-timeline-item__bullet(
|
|
5
5
|
:is="item[itemIconKey] || icon ? 'w-icon' : 'div'"
|
|
@@ -23,16 +23,29 @@ export default {
|
|
|
23
23
|
itemTitleKey: { type: String, default: 'title' },
|
|
24
24
|
itemContentKey: { type: String, default: 'content' },
|
|
25
25
|
itemIconKey: { type: String, default: 'icon' },
|
|
26
|
-
itemColorKey: { type: String, default: 'color' }
|
|
26
|
+
itemColorKey: { type: String, default: 'color' },
|
|
27
|
+
dark: { type: Boolean },
|
|
28
|
+
light: { type: Boolean }
|
|
27
29
|
},
|
|
28
30
|
|
|
29
|
-
emits: []
|
|
31
|
+
emits: [],
|
|
32
|
+
|
|
33
|
+
computed: {
|
|
34
|
+
classes () {
|
|
35
|
+
return {
|
|
36
|
+
'w-timeline--dark': this.dark,
|
|
37
|
+
'w-timeline--light': this.light
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
30
41
|
}
|
|
31
42
|
</script>
|
|
32
43
|
|
|
33
44
|
<style lang="scss">
|
|
34
45
|
.w-timeline {
|
|
35
46
|
margin-left: $base-increment;
|
|
47
|
+
|
|
48
|
+
@include themeable;
|
|
36
49
|
}
|
|
37
50
|
|
|
38
51
|
.w-timeline-item {
|
|
@@ -48,7 +61,7 @@ export default {
|
|
|
48
61
|
position: absolute;
|
|
49
62
|
top: 2px;
|
|
50
63
|
left: 0;
|
|
51
|
-
background-color:
|
|
64
|
+
background-color: $timeline-bullet-color;
|
|
52
65
|
border-radius: 1em;
|
|
53
66
|
border: 1px solid currentColor;
|
|
54
67
|
width: $base-font-size;
|
|
@@ -66,7 +79,7 @@ export default {
|
|
|
66
79
|
top: 2px;
|
|
67
80
|
bottom: -2px;
|
|
68
81
|
left: -1px;
|
|
69
|
-
border-left: 2px solid
|
|
82
|
+
border-left: 2px solid $timeline-bg-color;
|
|
70
83
|
}
|
|
71
84
|
}
|
|
72
85
|
</style>
|
|
@@ -19,7 +19,9 @@ export default {
|
|
|
19
19
|
width: { type: [Number, String], default: null },
|
|
20
20
|
height: { type: [Number, String], default: null },
|
|
21
21
|
noBorder: { type: Boolean },
|
|
22
|
-
shadow: { type: Boolean }
|
|
22
|
+
shadow: { type: Boolean },
|
|
23
|
+
dark: { type: Boolean },
|
|
24
|
+
light: { type: Boolean }
|
|
23
25
|
},
|
|
24
26
|
|
|
25
27
|
emits: [],
|
|
@@ -41,6 +43,8 @@ export default {
|
|
|
41
43
|
return {
|
|
42
44
|
[this.color]: !!this.color,
|
|
43
45
|
[`${this.bgColor}--bg`]: !!this.bgColor,
|
|
46
|
+
'w-toolbar--dark': this.dark,
|
|
47
|
+
'w-toolbar--light': this.light,
|
|
44
48
|
'w-toolbar--absolute': !!this.absolute,
|
|
45
49
|
'w-toolbar--fixed': !!this.fixed,
|
|
46
50
|
[`w-toolbar--${this.bottom ? 'bottom' : 'top'}`]: !this.vertical,
|
|
@@ -66,9 +70,11 @@ export default {
|
|
|
66
70
|
flex: 1 1 auto;
|
|
67
71
|
align-items: center;
|
|
68
72
|
padding: (2 * $base-increment) (3 * $base-increment);
|
|
69
|
-
background-color:
|
|
73
|
+
background-color: $toolbar-bg-color;
|
|
70
74
|
z-index: 10;
|
|
71
75
|
|
|
76
|
+
@include themeable;
|
|
77
|
+
|
|
72
78
|
&--absolute, &--fixed {top: 0;left: 0;right: 0;}
|
|
73
79
|
&--absolute {position: absolute;}
|
|
74
80
|
&--fixed {position: fixed;}
|
|
@@ -32,7 +32,9 @@ export default {
|
|
|
32
32
|
transition: { type: String },
|
|
33
33
|
tooltipClass: { type: [String, Object, Array] },
|
|
34
34
|
persistent: { type: Boolean },
|
|
35
|
-
delay: { type: Number }
|
|
35
|
+
delay: { type: Number },
|
|
36
|
+
dark: { type: Boolean },
|
|
37
|
+
light: { type: Boolean }
|
|
36
38
|
// Other props in the detachable mixin:
|
|
37
39
|
// detachTo, appendTo, fixed, top, bottom, left, right, alignTop, alignBottom, alignLeft,
|
|
38
40
|
// alignRight, noPosition, zIndex, activator.
|
|
@@ -78,6 +80,8 @@ export default {
|
|
|
78
80
|
...this.tooltipClasses,
|
|
79
81
|
[`w-tooltip--${this.position}`]: !this.noPosition,
|
|
80
82
|
[`w-tooltip--align-${this.alignment}`]: !this.noPosition && this.alignment,
|
|
83
|
+
'w-tooltip--dark': this.dark,
|
|
84
|
+
'w-tooltip--light': this.light,
|
|
81
85
|
'w-tooltip--tile': this.tile,
|
|
82
86
|
'w-tooltip--round': this.round,
|
|
83
87
|
'w-tooltip--shadow': this.shadow,
|
|
@@ -190,7 +194,7 @@ export default {
|
|
|
190
194
|
position: absolute;
|
|
191
195
|
padding: $base-increment round(1.5 * $base-increment);
|
|
192
196
|
border-radius: $border-radius;
|
|
193
|
-
border: 1px solid
|
|
197
|
+
border: 1px solid $tooltip-border-color;
|
|
194
198
|
background-color: $tooltip-bg-color;
|
|
195
199
|
pointer-events: none;
|
|
196
200
|
color: $tooltip-color;
|
|
@@ -199,6 +203,8 @@ export default {
|
|
|
199
203
|
width: max-content; // Not supported in IE11. :/
|
|
200
204
|
z-index: 100;
|
|
201
205
|
|
|
206
|
+
@include themeable;
|
|
207
|
+
|
|
202
208
|
&--fixed {position: fixed;z-index: 1000;}
|
|
203
209
|
|
|
204
210
|
&--tile {border-radius: 0;}
|
|
@@ -218,12 +224,12 @@ export default {
|
|
|
218
224
|
|
|
219
225
|
// Tooltip without border.
|
|
220
226
|
&--no-border {
|
|
221
|
-
@include triangle(
|
|
227
|
+
@include triangle($tooltip-bg-color, '.w-tooltip', 7px, 0);
|
|
222
228
|
}
|
|
223
229
|
|
|
224
230
|
// Tooltip with border.
|
|
225
231
|
&:not(&--no-border) {
|
|
226
|
-
@include triangle(
|
|
232
|
+
@include triangle($tooltip-bg-color, '.w-tooltip', 7px);
|
|
227
233
|
}
|
|
228
234
|
}
|
|
229
235
|
|