wave-ui 2.23.0 → 2.27.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.
@@ -1,204 +1,214 @@
1
- // The CSS variables are used in the dynamic-css in order to reuse the same SCSS variable presets.
1
+ // The CSS variables are used in the dynamic-css.js file in order to reuse the same SCSS
2
+ // variable presets.
2
3
  :root {
3
4
  --base-increment: #{$base-increment};
4
5
  --css-scope: #{$css-scope};
5
6
  }
6
7
 
7
- #{$css-scope} {
8
- // Layout classes.
9
- // ----------------------------------------------
10
- .show {display: block;}
11
- .hide {display: none;}
12
- .spacer {flex-grow: 1;}
13
-
14
- .grow {flex-grow: 1;flex-basis: auto;}
15
- .no-grow {flex-grow: 0;}
16
- .shrink {flex-shrink: 1;margin-left: auto;margin-right: auto;}
17
- .no-shrink {flex-shrink: 0;}
18
- .fill-width {width: 100%;}
19
- .fill-height {height: 100%;}
20
- .basis-zero {flex-basis: 0;}
21
-
22
- .align-start {align-items: flex-start;}
23
- .align-center {align-items: center;}
24
- .align-end {align-items: flex-end;}
25
- .align-self-start {align-self: flex-start;}
26
- .align-self-center {align-self: center;}
27
- .align-self-end {align-self: flex-end;}
28
- .align-self-stretch {align-self: stretch;}
29
- .justify-start {justify-content: flex-start;}
30
- .justify-center {justify-content: center;}
31
- .justify-end {justify-content: flex-end;}
32
- // There is no justify-self in Flexbox.
33
- // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Alignment/Box_Alignment_in_Flexbox
34
- .justify-space-between {justify-content: space-between;}
35
- .justify-space-around {justify-content: space-around;}
36
- .justify-space-evenly {justify-content: space-evenly;}
37
-
38
- .text-left {text-align: left;}
39
- .text-center {text-align: center;}
40
- .text-right {text-align: right;}
41
- .text-nowrap {white-space: nowrap;}
42
-
43
- .lh0 {line-height: 1;}
44
- .lh1 {line-height: 1.2;}
45
- .lh2 {line-height: 1.4;}
46
- .lh3 {line-height: 1.6;}
47
- .lh4 {line-height: 1.8;}
48
- .lh5 {line-height: 2;}
49
-
50
- .d-flex {display: flex;}
51
- .d-iflex {display: inline-flex;}
52
- .d-block {display: block;}
53
- .d-iblock {display: inline-block;}
54
- // ----------------------------------------------
55
-
56
- // Borders (from 0 to 6), radii (from 0 to 6 + `m` for max).
57
- // ----------------------------------------------
58
- @for $i from 1 through 6 {
59
- .bd#{$i} {border: $i + px solid $border-color;}
60
- }
61
- .bd0 {border: none;}
62
-
63
- @for $i from 1 through 6 {
64
- .bdrs#{$i} {border-radius: round($i * $base-increment);}
65
- }
66
- .bdrsr {border-radius: 999em;}
67
- .bdrsm {border-radius: 100%;}
68
- .bdrs0 {border-radius: 0;}
69
- // ----------------------------------------------
70
-
71
- // Shadows (from -6 to 6).
72
- // ----------------------------------------------
73
- @for $i from -6 through -1 {
74
- .sh#{$i} {
75
- box-shadow: 0 0 (-1 * round($i * $base-increment)) rgba(#000, max(0.15 * divide(-$i, 2), 0.15)) inset;
8
+ // All these CSS classes will not be generated if the $use-layout-classes is set to false.
9
+ @if $use-layout-classes {
10
+ #{$css-scope} {
11
+ // Layout classes.
12
+ // ----------------------------------------------
13
+ .show {display: block;}
14
+ .hide {display: none;}
15
+ .spacer {flex-grow: 1;}
16
+
17
+ .grow {flex-grow: 1;flex-basis: auto;}
18
+ .no-grow {flex-grow: 0;}
19
+ .shrink {flex-shrink: 1;margin-left: auto;margin-right: auto;}
20
+ .no-shrink {flex-shrink: 0;}
21
+ .fill-width {width: 100%;}
22
+ .fill-height {height: 100%;}
23
+ .basis-zero {flex-basis: 0;}
24
+
25
+ .align-start {align-items: flex-start;}
26
+ .align-center {align-items: center;}
27
+ .align-end {align-items: flex-end;}
28
+ .align-self-start {align-self: flex-start;}
29
+ .align-self-center {align-self: center;}
30
+ .align-self-end {align-self: flex-end;}
31
+ .align-self-stretch {align-self: stretch;}
32
+ .justify-start {justify-content: flex-start;}
33
+ .justify-center {justify-content: center;}
34
+ .justify-end {justify-content: flex-end;}
35
+ // There is no justify-self in Flexbox.
36
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Alignment/Box_Alignment_in_Flexbox
37
+ .justify-space-between {justify-content: space-between;}
38
+ .justify-space-around {justify-content: space-around;}
39
+ .justify-space-evenly {justify-content: space-evenly;}
40
+
41
+ .text-left {text-align: left;}
42
+ .text-center {text-align: center;}
43
+ .text-right {text-align: right;}
44
+ .text-nowrap {white-space: nowrap;}
45
+
46
+ .lh0 {line-height: 1;}
47
+ .lh1 {line-height: 1.2;}
48
+ .lh2 {line-height: 1.4;}
49
+ .lh3 {line-height: 1.6;}
50
+ .lh4 {line-height: 1.8;}
51
+ .lh5 {line-height: 2;}
52
+
53
+ .d-flex {display: flex;}
54
+ .d-iflex {display: inline-flex;}
55
+ .d-block {display: block;}
56
+ .d-iblock {display: inline-block;}
57
+ // ----------------------------------------------
58
+
59
+ // Borders (from 0 to 6), radii (from 0 to 6 + `m` for max).
60
+ // ----------------------------------------------
61
+ @for $i from 1 through 6 {
62
+ .bd#{$i} {border: $i + px solid $border-color;}
76
63
  }
77
- }
78
- @for $i from 1 through 6 {
79
- .sh#{$i} {
80
- box-shadow: 0 0 1px rgba(#000, 0.1),
81
- round($base-increment * divide($i, 4)) round($base-increment * divide($i, 4)) round($i * $base-increment) rgba(#000, max(0.15 * divide($i, 2), 0.15));
64
+ .bdx1 {border-left: 1px solid $border-color;border-right: 1px solid $border-color;}
65
+ .bdy1 {border-top: 1px solid $border-color;border-bottom: 1px solid $border-color;}
66
+ .bdl1 {border-left: 1px solid $border-color;}
67
+ .bdr1 {border-right: 1px solid $border-color;}
68
+ .bdt1 {border-top: 1px solid $border-color;}
69
+ .bdb1 {border-bottom: 1px solid $border-color;}
70
+ .bd0 {border: none;}
71
+
72
+ @for $i from 1 through 6 {
73
+ .bdrs#{$i} {border-radius: round($i * $base-increment);}
82
74
  }
83
- }
84
- .sh0 {box-shadow: none;}
85
- // ----------------------------------------------
86
-
87
- // Spaces.
88
- // ----------------------------------------------
89
- // Margin.
90
- @for $i from 0 through 12 {
91
- $number: round($i * $base-increment);
92
- .ma#{$i} {margin: $number;}
93
- @if ($i > 0) {.ma-#{$i} {margin: -$number;}}
94
- }
95
- .maa {margin: auto;}
96
- .ma0 {margin: 0;}
97
-
98
- @for $i from 0 through 12 {
99
- $number: round($i * $base-increment);
100
- .mx#{$i} {margin-left: $number;margin-right: $number;}
101
- .my#{$i} {margin-top: $number;margin-bottom: $number;}
102
- @if ($i > 0) {
103
- .mx-#{$i} {margin-left: -$number;margin-right: -$number;}
104
- .my-#{$i} {margin-top: -$number;margin-bottom: -$number;}
75
+ .bdrsr {border-radius: 999em;}
76
+ .bdrsm {border-radius: 100%;}
77
+ .bdrs0 {border-radius: 0;}
78
+ // ----------------------------------------------
79
+
80
+ // Shadows (from -6 to 6).
81
+ // ----------------------------------------------
82
+ @for $i from -6 through -1 {
83
+ .sh#{$i} {
84
+ box-shadow: 0 0 (-1 * round($i * $base-increment)) rgba(#000, max(0.15 * divide(-$i, 2), 0.15)) inset;
85
+ }
105
86
  }
106
- }
107
- .mxa {margin-left: auto;margin-right: auto;}
108
- .mya {margin-top: auto;margin-bottom: auto;}
109
- .mx0 {margin-left: 0;margin-right: 0;}
110
- .my0 {margin-top: 0;margin-bottom: 0;}
111
-
112
- @for $i from 0 through 12 {
113
- $number: round($i * $base-increment);
114
- .mt#{$i} {margin-top: $number;}
115
- .mr#{$i} {margin-right: $number;}
116
- .mb#{$i} {margin-bottom: $number;}
117
- .ml#{$i} {margin-left: $number;}
118
- @if ($i > 0) {
119
- .mt-#{$i} {margin-top: -$number;}
120
- .mr-#{$i} {margin-right: -$number;}
121
- .mb-#{$i} {margin-bottom: -$number;}
122
- .ml-#{$i} {margin-left: -$number;}
87
+ @for $i from 1 through 6 {
88
+ .sh#{$i} {
89
+ box-shadow: 0 0 1px rgba(#000, 0.1),
90
+ round($base-increment * divide($i, 4)) round($base-increment * divide($i, 4)) round($i * $base-increment) rgba(#000, max(0.15 * divide($i, 2), 0.15));
91
+ }
123
92
  }
124
- }
125
- .mta {margin-top: auto;}
126
- .mra {margin-right: auto;}
127
- .mba {margin-bottom: auto;}
128
- .mla {margin-left: auto;}
129
- .mt0 {margin-top: 0;}
130
- .mr0 {margin-right: 0;}
131
- .mb0 {margin-bottom: 0;}
132
- .ml0 {margin-left: 0;}
133
-
134
- // Padding.
135
- @for $i from 1 through 12 {
136
- $number: round($i * $base-increment);
137
- .pa#{$i} {padding: $number;}
138
- }
139
- .pa0 {padding: 0;}
93
+ .sh0 {box-shadow: none;}
94
+ // ----------------------------------------------
95
+
96
+ // Spaces.
97
+ // ----------------------------------------------
98
+ // Margin.
99
+ @for $i from 0 through 12 {
100
+ $number: round($i * $base-increment);
101
+ .ma#{$i} {margin: $number;}
102
+ @if ($i > 0) {.ma-#{$i} {margin: -$number;}}
103
+ }
104
+ .maa {margin: auto;}
105
+ .ma0 {margin: 0;}
106
+
107
+ @for $i from 0 through 12 {
108
+ $number: round($i * $base-increment);
109
+ .mx#{$i} {margin-left: $number;margin-right: $number;}
110
+ .my#{$i} {margin-top: $number;margin-bottom: $number;}
111
+ @if ($i > 0) {
112
+ .mx-#{$i} {margin-left: -$number;margin-right: -$number;}
113
+ .my-#{$i} {margin-top: -$number;margin-bottom: -$number;}
114
+ }
115
+ }
116
+ .mxa {margin-left: auto;margin-right: auto;}
117
+ .mya {margin-top: auto;margin-bottom: auto;}
118
+ .mx0 {margin-left: 0;margin-right: 0;}
119
+ .my0 {margin-top: 0;margin-bottom: 0;}
120
+
121
+ @for $i from 0 through 12 {
122
+ $number: round($i * $base-increment);
123
+ .mt#{$i} {margin-top: $number;}
124
+ .mr#{$i} {margin-right: $number;}
125
+ .mb#{$i} {margin-bottom: $number;}
126
+ .ml#{$i} {margin-left: $number;}
127
+ @if ($i > 0) {
128
+ .mt-#{$i} {margin-top: -$number;}
129
+ .mr-#{$i} {margin-right: -$number;}
130
+ .mb-#{$i} {margin-bottom: -$number;}
131
+ .ml-#{$i} {margin-left: -$number;}
132
+ }
133
+ }
134
+ .mta {margin-top: auto;}
135
+ .mra {margin-right: auto;}
136
+ .mba {margin-bottom: auto;}
137
+ .mla {margin-left: auto;}
138
+ .mt0 {margin-top: 0;}
139
+ .mr0 {margin-right: 0;}
140
+ .mb0 {margin-bottom: 0;}
141
+ .ml0 {margin-left: 0;}
142
+
143
+ // Padding.
144
+ @for $i from 1 through 12 {
145
+ $number: round($i * $base-increment);
146
+ .pa#{$i} {padding: $number;}
147
+ }
148
+ .pa0 {padding: 0;}
140
149
 
141
- @for $i from 0 through 12 {
142
- $number: round($i * $base-increment);
143
- .px#{$i} {padding-left: $number;padding-right: $number;}
144
- .py#{$i} {padding-top: $number;padding-bottom: $number;}
145
- }
146
- .px0 {padding-left: 0;padding-right: 0;}
147
- .py0 {padding-top: 0;padding-bottom: 0;}
148
-
149
- @for $i from 0 through 12 {
150
- $number: round($i * $base-increment);
151
- .pt#{$i} {padding-top: $number;}
152
- .pr#{$i} {padding-right: $number;}
153
- .pb#{$i} {padding-bottom: $number;}
154
- .pl#{$i} {padding-left: $number;}
150
+ @for $i from 0 through 12 {
151
+ $number: round($i * $base-increment);
152
+ .px#{$i} {padding-left: $number;padding-right: $number;}
153
+ .py#{$i} {padding-top: $number;padding-bottom: $number;}
154
+ }
155
+ .px0 {padding-left: 0;padding-right: 0;}
156
+ .py0 {padding-top: 0;padding-bottom: 0;}
157
+
158
+ @for $i from 0 through 12 {
159
+ $number: round($i * $base-increment);
160
+ .pt#{$i} {padding-top: $number;}
161
+ .pr#{$i} {padding-right: $number;}
162
+ .pb#{$i} {padding-bottom: $number;}
163
+ .pl#{$i} {padding-left: $number;}
164
+ }
165
+ .pt0 {padding-top: 0;}
166
+ .pr0 {padding-right: 0;}
167
+ .pb0 {padding-bottom: 0;}
168
+ .pl0 {padding-left: 0;}
169
+ // ----------------------------------------------
170
+
171
+ // Sizes.
172
+ // ----------------------------------------------
173
+ // In all the sizes bellow, round(x / 2) * 2 to always have even numbers.
174
+ // Different heights with a mix of odd and even numbers will misalign
175
+ // when vertically centering (vertical-align or align-items center).
176
+ .size--xs {font-size: round(0.85 * $base-font-size);}
177
+ .size--sm {font-size: round(1 * $base-font-size);}
178
+ .size--md {font-size: round(1.1 * $base-font-size);}
179
+ .size--lg {font-size: round(1.4 * $base-font-size);}
180
+ .size--xl {font-size: round(1.65 * $base-font-size);}
181
+ // ----------------------------------------------
182
+
183
+ // Grid system.
184
+ // ----------------------------------------------
185
+ // CSS variables are not supported in media queries yet
186
+ // (https://www.w3.org/TR/css-variables-1/#using-variables),
187
+ // the grid system is done dynamically in dynamic-css.js.
188
+
189
+ // @media screen and (min-width: var(--breakpoint-xs)) {
190
+ // @for $i from 0 through $grid-base {
191
+ // .sm#{$grid-base - $i} {width: ($grid-base - $i) * 100% / $grid-base;}
192
+ // }
193
+ // }
194
+
195
+ // @media screen and (min-width: var(--breakpoint-sm)) {
196
+ // @for $i from 0 through $grid-base {
197
+ // .md#{$grid-base - $i} {width: ($grid-base - $i) * 100% / $grid-base;}
198
+ // }
199
+ // }
200
+
201
+ // @media screen and (min-width: var(--breakpoint-md)) {
202
+ // @for $i from 0 through $grid-base {
203
+ // .lg#{$grid-base - $i} {width: ($grid-base - $i) * 100% / $grid-base;}
204
+ // }
205
+ // }
206
+
207
+ // @media screen and (min-width: var(--breakpoint-lg)) {
208
+ // @for $i from 0 through $grid-base {
209
+ // .xl#{$grid-base - $i} {width: ($grid-base - $i) * 100% / $grid-base;}
210
+ // }
211
+ // }
212
+ // ----------------------------------------------
155
213
  }
156
- .pt0 {padding-top: 0;}
157
- .pr0 {padding-right: 0;}
158
- .pb0 {padding-bottom: 0;}
159
- .pl0 {padding-left: 0;}
160
- // ----------------------------------------------
161
-
162
- // Sizes.
163
- // ----------------------------------------------
164
- // In all the sizes bellow, round(x / 2) * 2 to always have even numbers.
165
- // Different heights with a mix of odd and even numbers will misalign
166
- // when vertically centering (vertical-align or align-items center).
167
- .size--xs {font-size: round(0.85 * $base-font-size);}
168
- .size--sm {font-size: round(1 * $base-font-size);}
169
- .size--md {font-size: round(1.1 * $base-font-size);}
170
- .size--lg {font-size: round(1.4 * $base-font-size);}
171
- .size--xl {font-size: round(1.65 * $base-font-size);}
172
- // ----------------------------------------------
173
-
174
- // Grid system.
175
- // ----------------------------------------------
176
- // CSS variables are not supported in media queries yet
177
- // (https://www.w3.org/TR/css-variables-1/#using-variables),
178
- // the grid system is done dynamically in dynamic-css.js.
179
-
180
- // @media screen and (min-width: var(--breakpoint-xs)) {
181
- // @for $i from 0 through $grid-base {
182
- // .sm#{$grid-base - $i} {width: ($grid-base - $i) * 100% / $grid-base;}
183
- // }
184
- // }
185
-
186
- // @media screen and (min-width: var(--breakpoint-sm)) {
187
- // @for $i from 0 through $grid-base {
188
- // .md#{$grid-base - $i} {width: ($grid-base - $i) * 100% / $grid-base;}
189
- // }
190
- // }
191
-
192
- // @media screen and (min-width: var(--breakpoint-md)) {
193
- // @for $i from 0 through $grid-base {
194
- // .lg#{$grid-base - $i} {width: ($grid-base - $i) * 100% / $grid-base;}
195
- // }
196
- // }
197
-
198
- // @media screen and (min-width: var(--breakpoint-lg)) {
199
- // @for $i from 0 through $grid-base {
200
- // .xl#{$grid-base - $i} {width: ($grid-base - $i) * 100% / $grid-base;}
201
- // }
202
- // }
203
- // ----------------------------------------------
204
214
  }
@@ -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(-30deg);}
149
- 60% {transform: scale(1.03) rotate(5deg);}
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
  // --------------------------------------------------------
@@ -8,6 +8,8 @@
8
8
  // GLOBAL DEFAULTS.
9
9
  // ========================================================
10
10
  $css-scope: '.w-app' !default; // Allows control on CSS rules priority.
11
+ // True by default. False allows you to use an external CSS library (like Tailwind).
12
+ $use-layout-classes: true !default;
11
13
 
12
14
  $base-font-size: 14px !default;
13
15
  $base-increment: round(divide($base-font-size, 4)) !default;
@@ -15,7 +17,7 @@ $layout-padding: $base-increment * 4 !default; // Applied on the .content-wrap t
15
17
  $border-radius: 3px !default;
16
18
  $border-color: rgba(0, 0, 0, 0.15);
17
19
  $border: 1px solid $border-color !default;
18
- $transition-duration: 0.2s !default;
20
+ $transition-duration: 0.25s !default;
19
21
  $fast-transition-duration: 0.15s !default;
20
22
  $box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
21
23
  0 2px 2px 0 rgba(0, 0, 0, 0.15),
@@ -26,15 +28,6 @@ $form-field-height: round(2 * $base-font-size) !default;
26
28
  // Always an even number for better vertical alignment. (Used in checkbox, radio, switch)
27
29
  $small-form-el-size: round(divide(1.3 * $base-font-size, 2)) * 2 !default;
28
30
 
29
- // Mixins.
30
- @mixin default-transition($duration: $transition-duration, $delay: 0s) {
31
- transition: $duration $delay ease-in-out;
32
- }
33
-
34
- @mixin out-back-transition($duration: $transition-duration, $delay: 0s) {
35
- transition: $duration $delay cubic-bezier(0.18, 0.89, 0.32, 1.28);
36
- }
37
-
38
31
  // COMPONENTS DEFAULTS.
39
32
  // ========================================================
40
33
  // w-drawer.
@@ -1,4 +1,5 @@
1
1
  @import './variables';
2
+ @import './mixins';
2
3
  @import './base';
3
4
  @import './typography';
4
5
  @import './layout';
@@ -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
+ }