wave-ui 1.45.1 → 1.45.5
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 +11 -10
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +1 -1
- package/src/wave-ui/components/w-input.vue +1 -0
- package/src/wave-ui/components/w-menu.vue +1 -1
- package/src/wave-ui/components/w-textarea.vue +1 -1
- package/src/wave-ui/components/w-tooltip.vue +94 -94
- package/src/wave-ui/scss/_base.scss +0 -21
- package/src/wave-ui/scss/_variables.scss +4 -0
- package/src/wave-ui/scss/index.scss +0 -1
package/package.json
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.w-tooltip-wrap(
|
|
2
|
+
.w-tooltip-wrap(:class="{ 'w-tooltip-wrap--attached': !detachTo }")
|
|
3
3
|
slot(name="activator" :on="eventHandlers")
|
|
4
4
|
transition(:name="transitionName" appear)
|
|
5
5
|
.w-tooltip(ref="tooltip" v-show="showTooltip" :class="classes" :style="styles")
|
|
6
|
-
|
|
7
|
-
//- to inherit the current color.
|
|
8
|
-
div(v-if="bgColor" :class="color")
|
|
9
|
-
slot
|
|
10
|
-
slot(v-else)
|
|
6
|
+
slot
|
|
11
7
|
</template>
|
|
12
8
|
|
|
13
9
|
<script>
|
|
@@ -95,7 +91,7 @@ export default {
|
|
|
95
91
|
|
|
96
92
|
// DOM element that will receive the tooltip.
|
|
97
93
|
tooltipParentEl () {
|
|
98
|
-
return this.detachTo ? this.detachToTarget : this.$
|
|
94
|
+
return this.detachTo ? this.detachToTarget : this.$el
|
|
99
95
|
},
|
|
100
96
|
|
|
101
97
|
position () {
|
|
@@ -140,8 +136,8 @@ export default {
|
|
|
140
136
|
|
|
141
137
|
classes () {
|
|
142
138
|
return {
|
|
143
|
-
[this.color]:
|
|
144
|
-
[`${this.bgColor}
|
|
139
|
+
[this.color]: this.color,
|
|
140
|
+
[`${this.bgColor}--bg`]: this.bgColor,
|
|
145
141
|
...this.tooltipClasses,
|
|
146
142
|
[`w-tooltip--${this.position}`]: true,
|
|
147
143
|
'w-tooltip--tile': this.tile,
|
|
@@ -154,11 +150,13 @@ export default {
|
|
|
154
150
|
}
|
|
155
151
|
},
|
|
156
152
|
|
|
153
|
+
// The tooltip styles.
|
|
157
154
|
styles () {
|
|
158
155
|
return {
|
|
159
156
|
zIndex: this.zIndex || this.zIndex === 0 || null,
|
|
160
|
-
top: `${~~this.tooltipCoordinates.top}px
|
|
161
|
-
left: `${~~this.tooltipCoordinates.left}px`
|
|
157
|
+
top: (this.tooltipCoordinates.top && `${~~this.tooltipCoordinates.top}px`) || null,
|
|
158
|
+
left: (this.tooltipCoordinates.left && `${~~this.tooltipCoordinates.left}px`) || null,
|
|
159
|
+
'--w-tooltip-bg-color': this.$waveui.colors[this.bgColor || 'white']
|
|
162
160
|
}
|
|
163
161
|
},
|
|
164
162
|
|
|
@@ -267,7 +265,7 @@ export default {
|
|
|
267
265
|
},
|
|
268
266
|
|
|
269
267
|
insertTooltip () {
|
|
270
|
-
const wrapper = this.$
|
|
268
|
+
const wrapper = this.$el
|
|
271
269
|
this.tooltipEl = this.$refs.tooltip.$el || this.$refs.tooltip
|
|
272
270
|
|
|
273
271
|
// Unwrap the activator element.
|
|
@@ -285,7 +283,7 @@ export default {
|
|
|
285
283
|
},
|
|
286
284
|
|
|
287
285
|
mounted () {
|
|
288
|
-
this.activatorEl = this.$
|
|
286
|
+
this.activatorEl = this.$el.firstElementChild
|
|
289
287
|
if (this.detachTo) this.insertTooltip()
|
|
290
288
|
|
|
291
289
|
if (this.value) this.toggle({ type: 'click', target: this.activatorEl })
|
|
@@ -361,93 +359,95 @@ export default {
|
|
|
361
359
|
|
|
362
360
|
&--custom-transition {transform: none;}
|
|
363
361
|
|
|
364
|
-
&:after {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
&--top:after {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
378
|
-
&--bottom:after {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
&--left:after {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}
|
|
392
|
-
&--right:after {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
362
|
+
// &:after {
|
|
363
|
+
// content: '';
|
|
364
|
+
// position: absolute;
|
|
365
|
+
// width: 0;
|
|
366
|
+
// height: 0;
|
|
367
|
+
// border: 6px solid transparent;
|
|
368
|
+
// }
|
|
369
|
+
// &--top:after {
|
|
370
|
+
// top: 100%;
|
|
371
|
+
// left: 50%;
|
|
372
|
+
// border-top-color: $tooltip-bg-color;
|
|
373
|
+
// transform: translateX(-50%);
|
|
374
|
+
// margin-top: 1px;
|
|
375
|
+
// }
|
|
376
|
+
// &--bottom:after {
|
|
377
|
+
// bottom: 100%;
|
|
378
|
+
// left: 50%;
|
|
379
|
+
// border-bottom-color: $tooltip-bg-color;
|
|
380
|
+
// transform: translateX(-50%);
|
|
381
|
+
// margin-bottom: 1px;
|
|
382
|
+
// }
|
|
383
|
+
// &--left:after {
|
|
384
|
+
// left: 100%;
|
|
385
|
+
// top: 50%;
|
|
386
|
+
// border-left-color: $tooltip-bg-color;
|
|
387
|
+
// transform: translateY(-50%);
|
|
388
|
+
// margin-left: 1px;
|
|
389
|
+
// }
|
|
390
|
+
// &--right:after {
|
|
391
|
+
// right: 100%;
|
|
392
|
+
// top: 50%;
|
|
393
|
+
// border-right-color: $tooltip-bg-color;
|
|
394
|
+
// transform: translateY(-50%);
|
|
395
|
+
// margin-right: 1px;
|
|
396
|
+
// }
|
|
399
397
|
|
|
400
398
|
// Tooltip without border.
|
|
401
399
|
// --------------------------------------------------------
|
|
402
|
-
&--no-border
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
&--no-border
|
|
400
|
+
&--no-border {
|
|
401
|
+
@include triangle(var(--w-tooltip-bg-color), '.w-tooltip', 7px, 0);
|
|
402
|
+
}
|
|
403
|
+
&:not(&--no-border) {
|
|
404
|
+
@include triangle(var(--w-tooltip-bg-color), '.w-tooltip', 7px);
|
|
405
|
+
}
|
|
406
406
|
|
|
407
407
|
// Tooltip with border.
|
|
408
408
|
// --------------------------------------------------------
|
|
409
|
-
&:not(&--no-border).w-tooltip--top:after {margin-top: -1px;}
|
|
410
|
-
&:not(&--no-border).w-tooltip--bottom:after {margin-bottom: -1px;}
|
|
411
|
-
&:not(&--no-border).w-tooltip--left:after {margin-left: -1px;}
|
|
412
|
-
&:not(&--no-border).w-tooltip--right:after {margin-right: -1px;}
|
|
413
|
-
|
|
414
|
-
&:not(&--no-border) {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}
|
|
409
|
+
// &:not(&--no-border).w-tooltip--top:after {margin-top: -1px;}
|
|
410
|
+
// &:not(&--no-border).w-tooltip--bottom:after {margin-bottom: -1px;}
|
|
411
|
+
// &:not(&--no-border).w-tooltip--left:after {margin-left: -1px;}
|
|
412
|
+
// &:not(&--no-border).w-tooltip--right:after {margin-right: -1px;}
|
|
413
|
+
|
|
414
|
+
// &:not(&--no-border) {
|
|
415
|
+
// &:before {
|
|
416
|
+
// content: '';
|
|
417
|
+
// position: absolute;
|
|
418
|
+
// width: 0;
|
|
419
|
+
// height: 0;
|
|
420
|
+
// border: 7px solid transparent;
|
|
421
|
+
// }
|
|
422
|
+
// &.w-tooltip--top:before {
|
|
423
|
+
// top: 100%;
|
|
424
|
+
// left: 50%;
|
|
425
|
+
// border-top-color: inherit;
|
|
426
|
+
// transform: translateX(-50%);
|
|
427
|
+
// margin-top: 0;
|
|
428
|
+
// }
|
|
429
|
+
// &.w-tooltip--bottom:before {
|
|
430
|
+
// bottom: 100%;
|
|
431
|
+
// left: 50%;
|
|
432
|
+
// border-bottom-color: inherit;
|
|
433
|
+
// transform: translateX(-50%);
|
|
434
|
+
// margin-bottom: 0;
|
|
435
|
+
// }
|
|
436
|
+
// &.w-tooltip--left:before {
|
|
437
|
+
// left: 100%;
|
|
438
|
+
// top: 50%;
|
|
439
|
+
// border-left-color: inherit;
|
|
440
|
+
// transform: translateY(-50%);
|
|
441
|
+
// margin-left: 0;
|
|
442
|
+
// }
|
|
443
|
+
// &.w-tooltip--right:before {
|
|
444
|
+
// right: 100%;
|
|
445
|
+
// top: 50%;
|
|
446
|
+
// border-right-color: inherit;
|
|
447
|
+
// transform: translateY(-50%);
|
|
448
|
+
// margin-right: 0;
|
|
449
|
+
// }
|
|
450
|
+
// }
|
|
451
451
|
// --------------------------------------------------------
|
|
452
452
|
}
|
|
453
453
|
|
|
@@ -10,24 +10,3 @@ a {text-decoration: none;}
|
|
|
10
10
|
padding-left: 3 * $base-increment;
|
|
11
11
|
padding-right: 3 * $base-increment;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
.nav-menu ~ .main-content {padding-left: 4em;}
|
|
15
|
-
|
|
16
|
-
footer {
|
|
17
|
-
margin-top: 5em;
|
|
18
|
-
|
|
19
|
-
.nav-drawer ~ & {padding-left: 12px;}
|
|
20
|
-
|
|
21
|
-
.heart:hover {animation: heartbeat 1s infinite;}
|
|
22
|
-
small {font-size: 10px;}
|
|
23
|
-
.caption {padding-top: 1px;}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@keyframes heartbeat {
|
|
27
|
-
0%, 30%, 60%, 100% {transform: scale(1);}
|
|
28
|
-
15%, 45% {transform: scale(1.2);}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@media screen and (max-width: 560px) {
|
|
32
|
-
button.go-top {display: none;}
|
|
33
|
-
}
|