wave-ui 2.25.0 → 2.28.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 +7347 -1
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +17 -16
- package/src/wave-ui/components/index.js +2 -1
- package/src/wave-ui/components/w-app.vue +42 -2
- package/src/wave-ui/components/w-badge.vue +19 -9
- package/src/wave-ui/components/w-card.vue +19 -5
- package/src/wave-ui/components/w-confirm.vue +103 -0
- package/src/wave-ui/components/w-icon.vue +3 -15
- package/src/wave-ui/components/w-menu.vue +92 -47
- package/src/wave-ui/components/w-notification-manager.vue +1 -1
- package/src/wave-ui/components/w-switch.vue +1 -0
- package/src/wave-ui/components/w-table.vue +58 -29
- package/src/wave-ui/components/w-tabs/index.vue +2 -1
- package/src/wave-ui/components/w-tooltip.vue +11 -8
- package/src/wave-ui/scss/_base.scss +0 -21
- package/src/wave-ui/scss/_layout.scss +6 -0
- package/src/wave-ui/scss/_mixins.scss +100 -0
- package/src/wave-ui/scss/_transitions.scss +4 -4
- package/src/wave-ui/scss/_variables.scss +5 -10
- package/src/wave-ui/utils/index.js +11 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
@mixin default-transition($duration: $transition-duration, $delay: 0s) {
|
|
2
|
+
transition: $duration $delay ease-in-out;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@mixin out-back-transition($duration: $transition-duration, $delay: 0s) {
|
|
6
|
+
transition: $duration $delay cubic-bezier(0.18, 0.89, 0.32, 1.28);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Generates a triangle arrow on the edge of an element.
|
|
11
|
+
*
|
|
12
|
+
* @param $color: the color to apply to the triangle.
|
|
13
|
+
* @param $selector: the element selector that receives the modifiers (--top, --left, etc.).
|
|
14
|
+
* @param $size: the triangle size at the base.
|
|
15
|
+
* @param $thickness: the border thickness, 0 to remove the border.
|
|
16
|
+
*/
|
|
17
|
+
@mixin triangle($color: white, $selector: '', $size: 7px, $thickness: 1px) {
|
|
18
|
+
@if ($thickness > 0) {
|
|
19
|
+
// The underneath border triangle.
|
|
20
|
+
&:before {
|
|
21
|
+
content: '';
|
|
22
|
+
position: absolute;
|
|
23
|
+
width: 0;
|
|
24
|
+
height: 0;
|
|
25
|
+
border: $size solid transparent;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&#{$selector}--top:before {
|
|
29
|
+
top: 100%;
|
|
30
|
+
left: 50%;
|
|
31
|
+
border-top-color: inherit;
|
|
32
|
+
transform: translateX(-50%);
|
|
33
|
+
margin-top: 0;
|
|
34
|
+
}
|
|
35
|
+
&#{$selector}--bottom:before {
|
|
36
|
+
bottom: 100%;
|
|
37
|
+
left: 50%;
|
|
38
|
+
border-bottom-color: inherit;
|
|
39
|
+
transform: translateX(-50%);
|
|
40
|
+
margin-bottom: 0;
|
|
41
|
+
}
|
|
42
|
+
&#{$selector}--left:before {
|
|
43
|
+
left: 100%;
|
|
44
|
+
top: 50%;
|
|
45
|
+
border-left-color: inherit;
|
|
46
|
+
transform: translateY(-50%);
|
|
47
|
+
margin-left: 0;
|
|
48
|
+
}
|
|
49
|
+
&#{$selector}--right:before {
|
|
50
|
+
right: 100%;
|
|
51
|
+
top: 50%;
|
|
52
|
+
border-right-color: inherit;
|
|
53
|
+
transform: translateY(-50%);
|
|
54
|
+
margin-right: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&#{$selector}--align-top:before {transform: none;top: (2 * $base-increment) - 1px;}
|
|
58
|
+
&#{$selector}--align-bottom:before {transform: none;top: auto;bottom: (2 * $base-increment) - 1px;}
|
|
59
|
+
&#{$selector}--align-left:before {transform: none;left: (2 * $base-increment) - 1px;}
|
|
60
|
+
&#{$selector}--align-right:before {transform: none;left: auto;right: (2 * $base-increment) - 1px;}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// The colored triangle on top of `:before`.
|
|
64
|
+
&:after {
|
|
65
|
+
content: '';
|
|
66
|
+
position: absolute;
|
|
67
|
+
width: 0;
|
|
68
|
+
height: 0;
|
|
69
|
+
border: ($size - $thickness) solid transparent;
|
|
70
|
+
}
|
|
71
|
+
&#{$selector}--top:after {
|
|
72
|
+
top: 100%;
|
|
73
|
+
left: 50%;
|
|
74
|
+
border-top-color: $color;
|
|
75
|
+
transform: translateX(-50%);
|
|
76
|
+
}
|
|
77
|
+
&#{$selector}--bottom:after {
|
|
78
|
+
bottom: 100%;
|
|
79
|
+
left: 50%;
|
|
80
|
+
border-bottom-color: $color;
|
|
81
|
+
transform: translateX(-50%);
|
|
82
|
+
}
|
|
83
|
+
&#{$selector}--left:after {
|
|
84
|
+
left: 100%;
|
|
85
|
+
top: 50%;
|
|
86
|
+
border-left-color: $color;
|
|
87
|
+
transform: translateY(-50%);
|
|
88
|
+
}
|
|
89
|
+
&#{$selector}--right:after {
|
|
90
|
+
right: 100%;
|
|
91
|
+
top: 50%;
|
|
92
|
+
border-right-color: $color;
|
|
93
|
+
transform: translateY(-50%);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&#{$selector}--align-top:after {transform: none;top: 2 * $base-increment;}
|
|
97
|
+
&#{$selector}--align-bottom:after {transform: none;top: auto;bottom: 2 * $base-increment;}
|
|
98
|
+
&#{$selector}--align-left:after {transform: none;left: 2 * $base-increment;}
|
|
99
|
+
&#{$selector}--align-right:after {transform: none;left: auto;right: 2 * $base-increment;}
|
|
100
|
+
}
|
|
@@ -142,11 +142,11 @@ $fast-out-slow-in: cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
142
142
|
|
|
143
143
|
// Twist.
|
|
144
144
|
// --------------------------------------------------------
|
|
145
|
-
.twist-enter-active {animation: w-twist $transition-duration;}
|
|
146
|
-
.twist-leave-active {animation: w-twist $transition-duration reverse;}
|
|
145
|
+
.twist-enter-active {animation: w-twist ($transition-duration + 0.25s);}
|
|
146
|
+
.twist-leave-active {animation: w-twist ($transition-duration + 0.25s) reverse;}
|
|
147
147
|
@keyframes w-twist {
|
|
148
|
-
0% {transform: scale(0) rotate(-
|
|
149
|
-
60% {transform: scale(1.03) rotate(
|
|
148
|
+
0% {transform: scale(0) rotate(-70deg);}
|
|
149
|
+
60% {transform: scale(1.03) rotate(6deg);}
|
|
150
150
|
100% {transform: scale(1) rotate(0deg);}
|
|
151
151
|
}
|
|
152
152
|
// --------------------------------------------------------
|
|
@@ -17,7 +17,7 @@ $layout-padding: $base-increment * 4 !default; // Applied on the .content-wrap t
|
|
|
17
17
|
$border-radius: 3px !default;
|
|
18
18
|
$border-color: rgba(0, 0, 0, 0.15);
|
|
19
19
|
$border: 1px solid $border-color !default;
|
|
20
|
-
$transition-duration: 0.
|
|
20
|
+
$transition-duration: 0.25s !default;
|
|
21
21
|
$fast-transition-duration: 0.15s !default;
|
|
22
22
|
$box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
|
|
23
23
|
0 2px 2px 0 rgba(0, 0, 0, 0.15),
|
|
@@ -28,15 +28,6 @@ $form-field-height: round(2 * $base-font-size) !default;
|
|
|
28
28
|
// Always an even number for better vertical alignment. (Used in checkbox, radio, switch)
|
|
29
29
|
$small-form-el-size: round(divide(1.3 * $base-font-size, 2)) * 2 !default;
|
|
30
30
|
|
|
31
|
-
// Mixins.
|
|
32
|
-
@mixin default-transition($duration: $transition-duration, $delay: 0s) {
|
|
33
|
-
transition: $duration $delay ease-in-out;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@mixin out-back-transition($duration: $transition-duration, $delay: 0s) {
|
|
37
|
-
transition: $duration $delay cubic-bezier(0.18, 0.89, 0.32, 1.28);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
31
|
// COMPONENTS DEFAULTS.
|
|
41
32
|
// ========================================================
|
|
42
33
|
// w-drawer.
|
|
@@ -66,3 +57,7 @@ $textarea-line-height: 1.2;
|
|
|
66
57
|
$tooltip-bg-color: #fff;
|
|
67
58
|
$tooltip-color: rgba(0, 0, 0, 0.7);
|
|
68
59
|
// --------------------------------------------------------
|
|
60
|
+
|
|
61
|
+
// Mixins.
|
|
62
|
+
// --------------------------------------------------------
|
|
63
|
+
@import './mixins';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Takes CSS classes as a string array or object and turn them into an object.
|
|
3
|
+
*
|
|
4
|
+
* @param {String|Array|Object} classes the CSS classes to merge into an object
|
|
5
|
+
* @return {Object}
|
|
6
|
+
*/
|
|
7
|
+
export const objectifyClasses = (classes = {}) => {
|
|
8
|
+
if (typeof classes === 'string') classes = { [classes]: true }
|
|
9
|
+
else if (typeof classes === 'array') classes = { [classes.join(' ')]: true }
|
|
10
|
+
return classes
|
|
11
|
+
}
|