wave-ui 3.28.0 → 4.0.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/.nojekyll +0 -0
- package/dist/types/types/$waveui.d.ts +15 -1
- package/dist/types/types/colors.d.ts +2 -0
- package/dist/types/types/components/WAccordion.d.ts +92 -6
- package/dist/types/types/components/WAutocomplete.d.ts +437 -0
- package/dist/types/types/components/WCheckbox.d.ts +34 -0
- package/dist/types/types/components/WCheckboxes.d.ts +30 -0
- package/dist/types/types/components/WInput.d.ts +34 -0
- package/dist/types/types/components/WMenu.d.ts +14 -7
- package/dist/types/types/components/WRadio.d.ts +34 -0
- package/dist/types/types/components/WRadios.d.ts +30 -0
- package/dist/types/types/components/WSelect.d.ts +34 -0
- package/dist/types/types/components/WSwitch.d.ts +34 -0
- package/dist/types/types/components/WTable.d.ts +7 -0
- package/dist/types/types/components/WTooltip.d.ts +22 -8
- package/dist/types/types/components/WTransitions.d.ts +104 -0
- package/dist/types/types/components/WTransitions.js +2 -0
- package/dist/types/types/components/WTree.d.ts +7 -0
- package/dist/types/types/components/index.d.ts +2 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/mixins/detachable.d.ts +7 -0
- package/dist/types/types/mixins/detachable.js +2 -0
- package/dist/wave-ui.cjs.js +3 -3
- package/dist/wave-ui.css +1 -1
- package/dist/wave-ui.esm.js +1743 -1365
- package/dist/wave-ui.umd.js +3 -3
- package/package.json +1 -1
- package/src/wave-ui/components/index.js +0 -1
- package/src/wave-ui/components/transitions/w-transition-bounce.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-expand.vue +3 -2
- package/src/wave-ui/components/transitions/w-transition-fade.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-scale-fade.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-scale.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-slide-fade.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-slide.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-twist.vue +2 -1
- package/src/wave-ui/components/w-accordion/index.vue +10 -5
- package/src/wave-ui/components/w-accordion/item.vue +29 -14
- package/src/wave-ui/components/w-alert.vue +27 -29
- package/src/wave-ui/components/w-autocomplete.vue +626 -192
- package/src/wave-ui/components/w-badge.vue +54 -53
- package/src/wave-ui/components/w-breadcrumbs.vue +7 -9
- package/src/wave-ui/components/w-button/button.vue +21 -23
- package/src/wave-ui/components/w-button/index.vue +4 -4
- package/src/wave-ui/components/w-card.vue +8 -7
- package/src/wave-ui/components/w-checkbox.vue +31 -11
- package/src/wave-ui/components/w-checkboxes.vue +21 -3
- package/src/wave-ui/components/w-confirm.vue +22 -22
- package/src/wave-ui/components/w-dialog.vue +1 -1
- package/src/wave-ui/components/w-divider.vue +5 -5
- package/src/wave-ui/components/w-drawer.vue +3 -3
- package/src/wave-ui/components/w-form-element.vue +2 -2
- package/src/wave-ui/components/w-icon.vue +12 -14
- package/src/wave-ui/components/w-image.vue +1 -1
- package/src/wave-ui/components/w-input.vue +43 -25
- package/src/wave-ui/components/w-list.vue +11 -12
- package/src/wave-ui/components/w-menu.vue +57 -55
- package/src/wave-ui/components/w-notification.vue +4 -4
- package/src/wave-ui/components/w-progress.vue +6 -7
- package/src/wave-ui/components/w-radio.vue +32 -7
- package/src/wave-ui/components/w-radios.vue +28 -3
- package/src/wave-ui/components/w-rating.vue +7 -9
- package/src/wave-ui/components/w-scrollable.vue +4 -4
- package/src/wave-ui/components/w-select.vue +119 -101
- package/src/wave-ui/components/w-slider.vue +26 -26
- package/src/wave-ui/components/w-spinner.vue +5 -7
- package/src/wave-ui/components/w-switch.vue +71 -47
- package/src/wave-ui/components/w-table.vue +69 -36
- package/src/wave-ui/components/w-tabs/index.vue +21 -24
- package/src/wave-ui/components/w-tag.vue +35 -38
- package/src/wave-ui/components/w-textarea.vue +22 -22
- package/src/wave-ui/components/w-timeline.vue +6 -6
- package/src/wave-ui/components/w-toolbar.vue +8 -8
- package/src/wave-ui/components/w-tooltip.vue +30 -25
- package/src/wave-ui/components/w-tree.vue +35 -16
- package/src/wave-ui/core.js +9 -1
- package/src/wave-ui/mixins/detachable.js +118 -55
- package/src/wave-ui/mixins/ripple.js +2 -2
- package/src/wave-ui/scss/_base.scss +82 -17
- package/src/wave-ui/scss/_colors.scss +6 -75
- package/src/wave-ui/scss/_layout.scss +39 -47
- package/src/wave-ui/scss/_ripple.scss +2 -2
- package/src/wave-ui/scss/_transitions.scss +19 -19
- package/src/wave-ui/scss/_typography.scss +8 -9
- package/src/wave-ui/scss/variables/_mixins.scss +24 -25
- package/src/wave-ui/scss/variables/_variables.scss +4 -149
- package/src/wave-ui/utils/colors.js +7 -4
- package/src/wave-ui/utils/config.js +3 -4
- package/src/wave-ui/utils/dynamic-css.js +42 -20
- package/src/wave-ui/utils/ripple.js +3 -2
- package/dist/types/types/components/WApp.d.ts +0 -83
- package/src/wave-ui/components/w-app.vue +0 -24
- /package/dist/types/types/components/{WApp.js → WAutocomplete.js} +0 -0
|
@@ -92,8 +92,6 @@ export default {
|
|
|
92
92
|
</script>
|
|
93
93
|
|
|
94
94
|
<style lang="scss">
|
|
95
|
-
@use "sass:math";
|
|
96
|
-
|
|
97
95
|
.w-badge-wrap {
|
|
98
96
|
position: relative;
|
|
99
97
|
display: inline-flex;
|
|
@@ -106,12 +104,13 @@ export default {
|
|
|
106
104
|
justify-content: center;
|
|
107
105
|
user-select: none;
|
|
108
106
|
border-radius: 99em;
|
|
109
|
-
// Always get an even number for better text vertical align.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
// Always get an even number for better text vertical align (matches former Sass rounding).
|
|
108
|
+
--w-badge-line: calc(2 * round(nearest, calc(1.1 * var(--w-base-font-size) / 2), 1px));
|
|
109
|
+
height: var(--w-badge-line);
|
|
110
|
+
line-height: var(--w-badge-line);
|
|
111
|
+
min-width: var(--w-badge-line);
|
|
113
112
|
z-index: 1;
|
|
114
|
-
padding: 0
|
|
113
|
+
padding: 0 var(--w-base-increment);
|
|
115
114
|
|
|
116
115
|
@include themeable;
|
|
117
116
|
|
|
@@ -125,42 +124,44 @@ export default {
|
|
|
125
124
|
|
|
126
125
|
// Sizes.
|
|
127
126
|
&.size--xs {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
height:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
--w-badge-h: calc(2 * round(nearest, calc(var(--w-base-font-size) / 2), 1px));
|
|
128
|
+
font-size: calc(2 * round(nearest, calc(0.67 * var(--w-base-font-size) / 2), 1px));
|
|
129
|
+
height: var(--w-badge-h);
|
|
130
|
+
line-height: var(--w-badge-h);
|
|
131
|
+
min-width: var(--w-badge-h);
|
|
132
|
+
|
|
133
|
+
&--round {
|
|
134
|
+
width: var(--w-badge-h);
|
|
135
|
+
padding: 0 round(nearest, calc(var(--w-badge-h) / 2), 1px);
|
|
136
|
+
}
|
|
136
137
|
}
|
|
137
138
|
&.size--sm {
|
|
138
|
-
|
|
139
|
-
font-size:
|
|
140
|
-
height:
|
|
141
|
-
line-height:
|
|
142
|
-
min-width:
|
|
139
|
+
--w-badge-h: calc(2 * round(nearest, calc(1.1 * var(--w-base-font-size) / 2), 1px));
|
|
140
|
+
font-size: calc(2 * round(nearest, calc(0.75 * var(--w-base-font-size) / 2), 1px));
|
|
141
|
+
height: var(--w-badge-h);
|
|
142
|
+
line-height: var(--w-badge-h);
|
|
143
|
+
min-width: var(--w-badge-h);
|
|
143
144
|
}
|
|
144
145
|
&.size--md {
|
|
145
|
-
|
|
146
|
-
font-size:
|
|
147
|
-
height:
|
|
148
|
-
line-height:
|
|
149
|
-
min-width:
|
|
146
|
+
--w-badge-h: calc(2 * round(nearest, calc(1.3 * var(--w-base-font-size) / 2), 1px));
|
|
147
|
+
font-size: calc(2 * round(nearest, calc(0.9 * var(--w-base-font-size) / 2), 1px));
|
|
148
|
+
height: var(--w-badge-h);
|
|
149
|
+
line-height: var(--w-badge-h);
|
|
150
|
+
min-width: var(--w-badge-h);
|
|
150
151
|
}
|
|
151
152
|
&.size--lg {
|
|
152
|
-
|
|
153
|
-
font-size:
|
|
154
|
-
height:
|
|
155
|
-
line-height:
|
|
156
|
-
min-width:
|
|
153
|
+
--w-badge-h: calc(2 * round(nearest, calc(1.5 * var(--w-base-font-size) / 2), 1px));
|
|
154
|
+
font-size: calc(2 * round(nearest, calc(1.05 * var(--w-base-font-size) / 2), 1px));
|
|
155
|
+
height: var(--w-badge-h);
|
|
156
|
+
line-height: var(--w-badge-h);
|
|
157
|
+
min-width: var(--w-badge-h);
|
|
157
158
|
}
|
|
158
159
|
&.size--xl {
|
|
159
|
-
|
|
160
|
-
font-size:
|
|
161
|
-
height:
|
|
162
|
-
line-height:
|
|
163
|
-
min-width:
|
|
160
|
+
--w-badge-h: calc(2 * round(nearest, calc(1.8 * var(--w-base-font-size) / 2), 1px));
|
|
161
|
+
font-size: calc(2 * round(nearest, calc(1.2 * var(--w-base-font-size) / 2), 1px));
|
|
162
|
+
height: var(--w-badge-h);
|
|
163
|
+
line-height: var(--w-badge-h);
|
|
164
|
+
min-width: var(--w-badge-h);
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
// Position.
|
|
@@ -169,18 +170,18 @@ export default {
|
|
|
169
170
|
&--left {right: 100%;}
|
|
170
171
|
&--right {left: 100%;}
|
|
171
172
|
&--overlap {
|
|
172
|
-
&.w-badge--top {margin-top: -
|
|
173
|
-
&.w-badge--bottom {margin-bottom: -
|
|
174
|
-
&.w-badge--left {margin-right: -
|
|
175
|
-
&.w-badge--right {margin-left: -
|
|
176
|
-
&.w-badge--top.size--xs {margin-top:
|
|
177
|
-
&.w-badge--bottom.size--xs {margin-bottom:
|
|
178
|
-
&.w-badge--top.size--sm {margin-top:
|
|
179
|
-
&.w-badge--bottom.size--sm {margin-bottom:
|
|
180
|
-
&.w-badge--top.size--lg {margin-top:
|
|
181
|
-
&.w-badge--bottom.size--lg {margin-bottom:
|
|
182
|
-
&.w-badge--top.size--xl {margin-top: -
|
|
183
|
-
&.w-badge--bottom.size--xl {margin-bottom: -
|
|
173
|
+
&.w-badge--top {margin-top: calc(var(--w-base-increment) * -1);}
|
|
174
|
+
&.w-badge--bottom {margin-bottom: calc(var(--w-base-increment) * -1);}
|
|
175
|
+
&.w-badge--left {margin-right: calc(var(--w-base-increment) * -3);}
|
|
176
|
+
&.w-badge--right {margin-left: calc(var(--w-base-increment) * -3);}
|
|
177
|
+
&.w-badge--top.size--xs {margin-top: calc(var(--w-base-increment) * -0.5);}
|
|
178
|
+
&.w-badge--bottom.size--xs {margin-bottom: calc(var(--w-base-increment) * -0.5);}
|
|
179
|
+
&.w-badge--top.size--sm {margin-top: calc(var(--w-base-increment) * -0.75);}
|
|
180
|
+
&.w-badge--bottom.size--sm {margin-bottom: calc(var(--w-base-increment) * -0.75);}
|
|
181
|
+
&.w-badge--top.size--lg {margin-top: calc(var(--w-base-increment) * -1.5);}
|
|
182
|
+
&.w-badge--bottom.size--lg {margin-bottom: calc(var(--w-base-increment) * -1.5);}
|
|
183
|
+
&.w-badge--top.size--xl {margin-top: calc(var(--w-base-increment) * -2);}
|
|
184
|
+
&.w-badge--bottom.size--xl {margin-bottom: calc(var(--w-base-increment) * -2);}
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
// Look modifiers.
|
|
@@ -189,13 +190,13 @@ export default {
|
|
|
189
190
|
background-color: transparent;
|
|
190
191
|
border-color: currentColor;
|
|
191
192
|
}
|
|
192
|
-
&--shadow {box-shadow:
|
|
193
|
+
&--shadow {box-shadow: var(--w-box-shadow);}
|
|
193
194
|
|
|
194
195
|
&--dot.w-badge {min-width: 0;padding: 0;aspect-ratio: 1;}
|
|
195
|
-
&--dot.size--xs {height:
|
|
196
|
-
&--dot.size--sm {height:
|
|
197
|
-
&--dot.size--md {height:
|
|
198
|
-
&--dot.size--lg {height:
|
|
199
|
-
&--dot.size--xl {height:
|
|
196
|
+
&--dot.size--xs {height: calc(var(--w-base-increment) * 1.35);}
|
|
197
|
+
&--dot.size--sm {height: calc(var(--w-base-increment) * 1.7);}
|
|
198
|
+
&--dot.size--md {height: calc(var(--w-base-increment) * 2.2);}
|
|
199
|
+
&--dot.size--lg {height: calc(var(--w-base-increment) * 2.75);}
|
|
200
|
+
&--dot.size--xl {height: calc(var(--w-base-increment) * 3);}
|
|
200
201
|
}
|
|
201
202
|
</style>
|
|
@@ -96,21 +96,19 @@ export default {
|
|
|
96
96
|
</script>
|
|
97
97
|
|
|
98
98
|
<style lang="scss">
|
|
99
|
-
@use "sass:math";
|
|
100
|
-
|
|
101
99
|
.w-breadcrumbs {
|
|
102
100
|
display: flex;
|
|
103
101
|
align-items: center;
|
|
104
102
|
|
|
105
|
-
&.size--xs {font-size:
|
|
106
|
-
&.size--sm {font-size:
|
|
107
|
-
&.size--md {font-size:
|
|
108
|
-
&.size--lg {font-size:
|
|
109
|
-
&.size--xl {font-size:
|
|
103
|
+
&.size--xs {font-size: round(nearest, calc(0.8 * var(--w-base-font-size)), 1px);}
|
|
104
|
+
&.size--sm {font-size: round(nearest, calc(0.9 * var(--w-base-font-size)), 1px);}
|
|
105
|
+
&.size--md {font-size: round(nearest, calc(1.05 * var(--w-base-font-size)), 1px);}
|
|
106
|
+
&.size--lg {font-size: round(nearest, calc(1.2 * var(--w-base-font-size)), 1px);}
|
|
107
|
+
&.size--xl {font-size: round(nearest, calc(1.4 * var(--w-base-font-size)), 1px);}
|
|
110
108
|
|
|
111
109
|
&__separator {
|
|
112
|
-
margin-left:
|
|
113
|
-
margin-right:
|
|
110
|
+
margin-left: var(--w-base-increment);
|
|
111
|
+
margin-right: var(--w-base-increment);
|
|
114
112
|
}
|
|
115
113
|
}
|
|
116
114
|
</style>
|
|
@@ -158,8 +158,6 @@ export default {
|
|
|
158
158
|
</script>
|
|
159
159
|
|
|
160
160
|
<style lang="scss">
|
|
161
|
-
@use "sass:math";
|
|
162
|
-
|
|
163
161
|
$spinner-size: 40;
|
|
164
162
|
|
|
165
163
|
.w-button {
|
|
@@ -167,11 +165,11 @@ $spinner-size: 40;
|
|
|
167
165
|
display: inline-flex;
|
|
168
166
|
flex-shrink: 0;
|
|
169
167
|
outline: none;
|
|
170
|
-
border-radius:
|
|
168
|
+
border-radius: var(--w-border-radius);
|
|
171
169
|
background-color: rgba(0, 0, 0, 0.1);
|
|
172
170
|
border: 1px solid rgba(0, 0, 0, 0.04);
|
|
173
|
-
padding-left:
|
|
174
|
-
padding-right:
|
|
171
|
+
padding-left: calc(var(--w-base-increment) * 2);
|
|
172
|
+
padding-right: calc(var(--w-base-increment) * 2);
|
|
175
173
|
box-shadow: 0 0 0 transparent;
|
|
176
174
|
vertical-align: middle;
|
|
177
175
|
align-self: center;
|
|
@@ -186,7 +184,7 @@ $spinner-size: 40;
|
|
|
186
184
|
z-index: 1;
|
|
187
185
|
// Background-color must not transition to not affect the hover & focus states
|
|
188
186
|
// in :before & :after.
|
|
189
|
-
transition: all
|
|
187
|
+
transition: all var(--w-transition-duration), background-color 0s, padding 0s;
|
|
190
188
|
-webkit-tap-highlight-color: transparent;
|
|
191
189
|
|
|
192
190
|
@include themeable;
|
|
@@ -198,10 +196,10 @@ $spinner-size: 40;
|
|
|
198
196
|
// Position.
|
|
199
197
|
&--absolute {position: absolute;}
|
|
200
198
|
&--fixed {position: fixed;}
|
|
201
|
-
&--top {top:
|
|
202
|
-
&--bottom {bottom:
|
|
203
|
-
&--left {left:
|
|
204
|
-
&--right {right:
|
|
199
|
+
&--top {top: calc(var(--w-base-increment) * 2);}
|
|
200
|
+
&--bottom {bottom: calc(var(--w-base-increment) * 2);}
|
|
201
|
+
&--left {left: calc(var(--w-base-increment) * 2);}
|
|
202
|
+
&--right {right: calc(var(--w-base-increment) * 2);}
|
|
205
203
|
|
|
206
204
|
&--dark {
|
|
207
205
|
color: rgba(255, 255, 255, 0.95);
|
|
@@ -217,8 +215,8 @@ $spinner-size: 40;
|
|
|
217
215
|
}
|
|
218
216
|
&--round {
|
|
219
217
|
border-radius: 99em;
|
|
220
|
-
padding-left:
|
|
221
|
-
padding-right:
|
|
218
|
+
padding-left: calc(var(--w-base-increment) * 3);
|
|
219
|
+
padding-right: calc(var(--w-base-increment) * 3);
|
|
222
220
|
}
|
|
223
221
|
&--icon {
|
|
224
222
|
aspect-ratio: 1;
|
|
@@ -227,7 +225,7 @@ $spinner-size: 40;
|
|
|
227
225
|
min-width: 0; // Safari ratio fix (e.g. losing ratio if height is set and side padding are added).
|
|
228
226
|
}
|
|
229
227
|
&--tile {border-radius: initial;}
|
|
230
|
-
&--shadow {box-shadow:
|
|
228
|
+
&--shadow {box-shadow: var(--w-box-shadow);}
|
|
231
229
|
&--loading {cursor: wait;opacity: 0.8;}
|
|
232
230
|
&[disabled] {
|
|
233
231
|
cursor: not-allowed;
|
|
@@ -241,16 +239,16 @@ $spinner-size: 40;
|
|
|
241
239
|
}
|
|
242
240
|
|
|
243
241
|
// Sizes adjustments (always an even number for easier vertical alignments).
|
|
244
|
-
&.size--xs {height:
|
|
245
|
-
&.size--sm {height:
|
|
246
|
-
&.size--md {height:
|
|
247
|
-
&.size--lg {height:
|
|
248
|
-
&.size--xl {height:
|
|
242
|
+
&.size--xs {height: calc(2 * round(nearest, calc(1.25 * var(--w-base-font-size) / 2), 1px));}
|
|
243
|
+
&.size--sm {height: calc(2 * round(nearest, calc(1.55 * var(--w-base-font-size) / 2), 1px));}
|
|
244
|
+
&.size--md {height: calc(2 * round(nearest, calc(1.85 * var(--w-base-font-size) / 2), 1px));}
|
|
245
|
+
&.size--lg {height: calc(2 * round(nearest, calc(2.2 * var(--w-base-font-size) / 2), 1px));}
|
|
246
|
+
&.size--xl {height: calc(2 * round(nearest, calc(2.5 * var(--w-base-font-size) / 2), 1px));}
|
|
249
247
|
|
|
250
|
-
&.size--xs {padding-left:
|
|
251
|
-
&.size--xl {padding-left:
|
|
252
|
-
&--round.size--xs {padding-left:
|
|
253
|
-
&--round.size--xl {padding-left:
|
|
248
|
+
&.size--xs {padding-left: var(--w-base-increment);padding-right: var(--w-base-increment);}
|
|
249
|
+
&.size--xl {padding-left: calc(var(--w-base-increment) * 3);padding-right: calc(var(--w-base-increment) * 3);}
|
|
250
|
+
&--round.size--xs {padding-left: calc(var(--w-base-increment) * 1.5);padding-right: calc(var(--w-base-increment) * 1.5);}
|
|
251
|
+
&--round.size--xl {padding-left: calc(var(--w-base-increment) * 4.5);padding-right: calc(var(--w-base-increment) * 4.5);}
|
|
254
252
|
&--icon.size--xs {padding-left: 0;padding-right: 0;}
|
|
255
253
|
&--icon.size--xl {padding-left: 0;padding-right: 0;}
|
|
256
254
|
|
|
@@ -304,7 +302,7 @@ $spinner-size: 40;
|
|
|
304
302
|
&:active {transform: scale(1.02);}
|
|
305
303
|
&:active:before {
|
|
306
304
|
opacity: 0.3;
|
|
307
|
-
@include default-transition(
|
|
305
|
+
@include default-transition(var(--w-transition-duration-fast));
|
|
308
306
|
}
|
|
309
307
|
&--dark:active:before, &.primary--bg:active:before {opacity: 0.35;}
|
|
310
308
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
component(v-if="tooltip" is="w-tooltip" v-bind="tooltipProps")
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
button-partial(v-bind="buttonProps")
|
|
4
|
+
slot
|
|
5
|
+
template(#tooltip)
|
|
6
|
+
div(v-html="tooltip")
|
|
7
7
|
button-partial(v-else v-bind="buttonProps")
|
|
8
8
|
slot
|
|
9
9
|
template(#loading)
|
|
@@ -63,6 +63,7 @@ export default {
|
|
|
63
63
|
imgProps () {
|
|
64
64
|
return {
|
|
65
65
|
tag: 'div',
|
|
66
|
+
maxWidth: '100%',
|
|
66
67
|
ratio: 1 / 2,
|
|
67
68
|
...this.imageProps
|
|
68
69
|
}
|
|
@@ -88,21 +89,21 @@ export default {
|
|
|
88
89
|
position: relative;
|
|
89
90
|
display: flex;
|
|
90
91
|
flex-direction: column;
|
|
91
|
-
border-radius:
|
|
92
|
-
border:
|
|
92
|
+
border-radius: var(--w-border-radius);
|
|
93
|
+
border: var(--w-border);
|
|
93
94
|
|
|
94
95
|
@include themeable;
|
|
95
96
|
|
|
96
97
|
&--tile {border-radius: 0;}
|
|
97
|
-
&--shadow {box-shadow:
|
|
98
|
+
&--shadow {box-shadow: var(--w-box-shadow);}
|
|
98
99
|
&--no-border, &--shadow {border: none;}
|
|
99
100
|
|
|
100
101
|
&__title {
|
|
101
102
|
display: flex;
|
|
102
103
|
align-items: center;
|
|
103
|
-
padding: (
|
|
104
|
+
padding: calc(var(--w-base-increment) * 2) calc(var(--w-base-increment) * 3);
|
|
104
105
|
font-size: 1.3em;
|
|
105
|
-
border-bottom:
|
|
106
|
+
border-bottom: var(--w-border);
|
|
106
107
|
border-top-left-radius: inherit;
|
|
107
108
|
border-top-right-radius: inherit;
|
|
108
109
|
|
|
@@ -117,7 +118,7 @@ export default {
|
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
&__content {
|
|
120
|
-
padding:
|
|
121
|
+
padding: calc(var(--w-base-increment) * 3);
|
|
121
122
|
flex-grow: 1;
|
|
122
123
|
|
|
123
124
|
// Only if there is no title bar.
|
|
@@ -134,7 +135,7 @@ export default {
|
|
|
134
135
|
|
|
135
136
|
&__actions {
|
|
136
137
|
display: flex;
|
|
137
|
-
padding: (
|
|
138
|
+
padding: calc(var(--w-base-increment) * 2) calc(var(--w-base-increment) * 3) calc(var(--w-base-increment) * 3);
|
|
138
139
|
border-bottom-left-radius: inherit;
|
|
139
140
|
border-bottom-right-radius: inherit;
|
|
140
141
|
|
|
@@ -75,6 +75,12 @@ export default {
|
|
|
75
75
|
noRipple: { type: Boolean },
|
|
76
76
|
indeterminate: { type: Boolean },
|
|
77
77
|
round: { type: Boolean },
|
|
78
|
+
// Sizes.
|
|
79
|
+
xs: { type: Boolean },
|
|
80
|
+
sm: { type: Boolean },
|
|
81
|
+
md: { type: Boolean },
|
|
82
|
+
lg: { type: Boolean },
|
|
83
|
+
xl: { type: Boolean },
|
|
78
84
|
dark: { type: Boolean },
|
|
79
85
|
light: { type: Boolean }
|
|
80
86
|
// Props from mixin: id, name, disabled, readonly, required, tabindex, validators.
|
|
@@ -98,6 +104,10 @@ export default {
|
|
|
98
104
|
hasLabel () {
|
|
99
105
|
return this.label || this.$slots.default
|
|
100
106
|
},
|
|
107
|
+
presetSize () {
|
|
108
|
+
return (this.xs && 'xs') || (this.sm && 'sm') || (this.md && 'md') || (this.lg && 'lg') || (this.xl && 'xl') || null
|
|
109
|
+
},
|
|
110
|
+
|
|
101
111
|
classes () {
|
|
102
112
|
return {
|
|
103
113
|
[`w-checkbox w-checkbox--${this.isChecked ? 'checked' : 'unchecked'}`]: true,
|
|
@@ -108,7 +118,8 @@ export default {
|
|
|
108
118
|
'w-checkbox--rippled': this.ripple.end,
|
|
109
119
|
'w-checkbox--round': this.round,
|
|
110
120
|
'w-checkbox--dark': this.dark,
|
|
111
|
-
'w-checkbox--light': this.light
|
|
121
|
+
'w-checkbox--light': this.light,
|
|
122
|
+
[`size--${this.presetSize}`]: !!this.presetSize
|
|
112
123
|
}
|
|
113
124
|
}
|
|
114
125
|
},
|
|
@@ -150,6 +161,8 @@ $outline-width: 2px;
|
|
|
150
161
|
$inactive-color: #666;
|
|
151
162
|
|
|
152
163
|
.w-checkbox {
|
|
164
|
+
// --_size resolves --w-size if set (e.g. via size class or inline style), otherwise the global default.
|
|
165
|
+
--_size: var(--w-size, var(--w-small-form-el-size));
|
|
153
166
|
display: inline-flex;
|
|
154
167
|
align-items: center;
|
|
155
168
|
vertical-align: middle;
|
|
@@ -170,7 +183,7 @@ $inactive-color: #666;
|
|
|
170
183
|
// The fake checkbox to substitute.
|
|
171
184
|
&__input {
|
|
172
185
|
position: relative;
|
|
173
|
-
width:
|
|
186
|
+
width: var(--_size);
|
|
174
187
|
aspect-ratio: 1;
|
|
175
188
|
display: flex;
|
|
176
189
|
flex: 0 0 auto; // Prevent stretching width or height.
|
|
@@ -188,12 +201,12 @@ $inactive-color: #666;
|
|
|
188
201
|
aspect-ratio: 1;
|
|
189
202
|
fill: none;
|
|
190
203
|
stroke-width: 2;
|
|
191
|
-
stroke:
|
|
204
|
+
stroke: var(--w-contrast-color);
|
|
192
205
|
stroke-linecap: round;
|
|
193
206
|
stroke-linejoin: round;
|
|
194
207
|
stroke-dasharray: 16px;
|
|
195
208
|
stroke-dashoffset: 16px;
|
|
196
|
-
transition:
|
|
209
|
+
transition: var(--w-transition-duration) ease-out;
|
|
197
210
|
opacity: 0;
|
|
198
211
|
position: relative;
|
|
199
212
|
z-index: 1;
|
|
@@ -214,25 +227,25 @@ $inactive-color: #666;
|
|
|
214
227
|
width: 100%;
|
|
215
228
|
aspect-ratio: 1;
|
|
216
229
|
border: $outline-width solid $inactive-color;
|
|
217
|
-
border-radius:
|
|
218
|
-
transition:
|
|
230
|
+
border-radius: var(--w-border-radius);
|
|
231
|
+
transition: var(--w-transition-duration) ease-in-out;
|
|
219
232
|
|
|
220
233
|
.w-checkbox--round & {border-radius: 100%;}
|
|
221
|
-
.w-checkbox--disabled & {border-color:
|
|
234
|
+
.w-checkbox--disabled & {border-color: var(--w-disabled-color);}
|
|
222
235
|
|
|
223
236
|
// Checked state.
|
|
224
237
|
:checked ~ & {
|
|
225
|
-
border-width:
|
|
238
|
+
border-width: calc(var(--_size) / 2);
|
|
226
239
|
border-color: currentColor;
|
|
227
240
|
// Prevents a tiny hole while animating and in some browser zoom levels.
|
|
228
241
|
background-color: currentColor;
|
|
229
242
|
}
|
|
230
243
|
.w-checkbox--indeterminate :checked ~ & {
|
|
231
|
-
border-width: ((
|
|
232
|
-
background-color:
|
|
244
|
+
border-width: calc(var(--_size) / 2 - 1px) 3px;
|
|
245
|
+
background-color: var(--w-contrast-color);
|
|
233
246
|
}
|
|
234
247
|
.w-checkbox--disabled :checked ~ & {
|
|
235
|
-
border-color:
|
|
248
|
+
border-color: var(--w-disabled-color);
|
|
236
249
|
// Prevents a tiny hole while animating and in some browser zoom levels.
|
|
237
250
|
background-color: color-mix(in srgb, var(--w-contrast-color) 40%, transparent);
|
|
238
251
|
}
|
|
@@ -282,6 +295,13 @@ $inactive-color: #666;
|
|
|
282
295
|
opacity: 0.7;
|
|
283
296
|
}
|
|
284
297
|
}
|
|
298
|
+
|
|
299
|
+
// Sizes.
|
|
300
|
+
// ------------------------------------------------------
|
|
301
|
+
&.size--xs {--w-size: round(nearest, calc(0.86 * var(--w-base-font-size)), 2px);}
|
|
302
|
+
&.size--sm {--w-size: round(nearest, calc(1.14 * var(--w-base-font-size)), 2px);}
|
|
303
|
+
&.size--lg {--w-size: round(nearest, calc(1.43 * var(--w-base-font-size)), 2px);}
|
|
304
|
+
&.size--xl {--w-size: round(nearest, calc(1.71 * var(--w-base-font-size)), 2px);}
|
|
285
305
|
}
|
|
286
306
|
|
|
287
307
|
@keyframes w-checkbox-ripple {
|
|
@@ -54,7 +54,13 @@ export default {
|
|
|
54
54
|
inline: { type: Boolean },
|
|
55
55
|
round: { type: Boolean },
|
|
56
56
|
color: { type: String, default: 'primary' },
|
|
57
|
-
labelColor: { type: String, default: 'primary' }
|
|
57
|
+
labelColor: { type: String, default: 'primary' },
|
|
58
|
+
// Sizes.
|
|
59
|
+
xs: { type: Boolean },
|
|
60
|
+
sm: { type: Boolean },
|
|
61
|
+
md: { type: Boolean },
|
|
62
|
+
lg: { type: Boolean },
|
|
63
|
+
xl: { type: Boolean }
|
|
58
64
|
// Props from mixin: id, name, disabled, readonly, required, validators.
|
|
59
65
|
// Computed from mixin: inputName, isDisabled & isReadonly.
|
|
60
66
|
},
|
|
@@ -84,10 +90,15 @@ export default {
|
|
|
84
90
|
})
|
|
85
91
|
},
|
|
86
92
|
|
|
93
|
+
presetSize () {
|
|
94
|
+
return (this.xs && 'xs') || (this.sm && 'sm') || (this.md && 'md') || (this.lg && 'lg') || (this.xl && 'xl') || null
|
|
95
|
+
},
|
|
96
|
+
|
|
87
97
|
classes () {
|
|
88
98
|
return [
|
|
89
99
|
'w-checkboxes',
|
|
90
|
-
`w-checkboxes--${this.inline ? 'inline' : 'column'}
|
|
100
|
+
`w-checkboxes--${this.inline ? 'inline' : 'column'}`,
|
|
101
|
+
this.presetSize && `size--${this.presetSize}`
|
|
91
102
|
]
|
|
92
103
|
}
|
|
93
104
|
},
|
|
@@ -128,8 +139,15 @@ export default {
|
|
|
128
139
|
flex-wrap: wrap;
|
|
129
140
|
vertical-align: middle;
|
|
130
141
|
|
|
131
|
-
.w-checkbox {margin-right:
|
|
142
|
+
.w-checkbox {margin-right: calc(var(--w-base-increment) * 3);}
|
|
132
143
|
.w-checkbox:last-child {margin-right: 0;}
|
|
133
144
|
}
|
|
145
|
+
|
|
146
|
+
// Sizes (cascades --w-small-form-el-size to child w-checkbox elements).
|
|
147
|
+
// ------------------------------------------------------
|
|
148
|
+
&.size--xs {--w-size: round(nearest, calc(0.86 * var(--w-base-font-size)), 2px);}
|
|
149
|
+
&.size--sm {--w-size: round(nearest, calc(1.14 * var(--w-base-font-size)), 2px);}
|
|
150
|
+
&.size--lg {--w-size: round(nearest, calc(1.43 * var(--w-base-font-size)), 2px);}
|
|
151
|
+
&.size--xl {--w-size: round(nearest, calc(1.71 * var(--w-base-font-size)), 2px);}
|
|
134
152
|
}
|
|
135
153
|
</style>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
w-menu(v-model="showPopup" v-bind="wMenuProps")
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
w-menu(v-model="showPopup" v-bind="wMenuProps" :disable="disablePrompt")
|
|
3
|
+
w-button.w-confirm(v-bind="{ ...$attrs, ...buttonProps }")
|
|
4
|
+
slot
|
|
5
|
+
template(#content)
|
|
6
|
+
w-flex(:column="!inline" align-center)
|
|
7
|
+
div
|
|
8
|
+
slot(name="question") {{ question }}
|
|
9
|
+
.w-flex.justify-end(:class="inline ? 'ml2' : 'mt2'")
|
|
10
|
+
w-button.mr2(
|
|
11
|
+
v-if="cancel !== false"
|
|
12
|
+
v-bind="cancelButtonProps"
|
|
13
|
+
:bg-color="(cancelButton || {}).bgColor || 'error'"
|
|
14
|
+
@keyup.escape="!persistent && onCancel()"
|
|
15
|
+
@click="onCancel")
|
|
16
|
+
slot(name="cancel") {{ cancelButton.label }}
|
|
17
|
+
w-button(
|
|
18
|
+
v-bind="confirmButtonProps"
|
|
19
|
+
:bg-color="(confirmButton || {}).bgColor || 'success'"
|
|
20
|
+
v-focus
|
|
21
|
+
@keyup.escape="!persistent && onCancel()"
|
|
22
|
+
@click="onConfirm")
|
|
23
|
+
slot(name="confirm") {{ confirmButton.label }}
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<script>
|
|
@@ -35,7 +35,7 @@ export default {
|
|
|
35
35
|
|
|
36
36
|
<style lang="scss">
|
|
37
37
|
.w-divider {
|
|
38
|
-
border: 0 solid
|
|
38
|
+
border: 0 solid var(--w-divider-color);
|
|
39
39
|
border-top-width: 1px;
|
|
40
40
|
|
|
41
41
|
@include themeable;
|
|
@@ -69,15 +69,15 @@ export default {
|
|
|
69
69
|
display: flex;
|
|
70
70
|
flex: 1 1 auto;
|
|
71
71
|
}
|
|
72
|
-
&:before {margin-right:
|
|
73
|
-
&:after {margin-left:
|
|
72
|
+
&:before {margin-right: calc(var(--w-base-increment) * 2);}
|
|
73
|
+
&:after {margin-left: calc(var(--w-base-increment) * 2);}
|
|
74
74
|
|
|
75
75
|
// Vertical.
|
|
76
76
|
&.w-divider--vertical {
|
|
77
77
|
flex-direction: column;
|
|
78
78
|
&:before, &:after {border-top-width: 0;border-left-width: 1px;}
|
|
79
|
-
&:before {margin-right: 0;margin-bottom:
|
|
80
|
-
&:after {margin-left: 0;margin-top:
|
|
79
|
+
&:before {margin-right: 0;margin-bottom: calc(var(--w-base-increment) * 2);}
|
|
80
|
+
&:after {margin-left: 0;margin-top: calc(var(--w-base-increment) * 2);}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -245,7 +245,7 @@ export default {
|
|
|
245
245
|
position: inherit;
|
|
246
246
|
display: flex;
|
|
247
247
|
z-index: 1;
|
|
248
|
-
background:
|
|
248
|
+
background: var(--w-drawer-bg-color);
|
|
249
249
|
box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
|
|
250
250
|
|
|
251
251
|
@include themeable;
|
|
@@ -254,13 +254,13 @@ export default {
|
|
|
254
254
|
top: 0;
|
|
255
255
|
bottom: 0;
|
|
256
256
|
width: 100%;
|
|
257
|
-
max-width:
|
|
257
|
+
max-width: var(--w-drawer-max-size);
|
|
258
258
|
}
|
|
259
259
|
&--top, &--bottom {
|
|
260
260
|
left: 0;
|
|
261
261
|
right: 0;
|
|
262
262
|
height: 100%;
|
|
263
|
-
max-height:
|
|
263
|
+
max-height: var(--w-drawer-max-size);
|
|
264
264
|
}
|
|
265
265
|
&--fit-content {width: auto;height: auto;}
|
|
266
266
|
|
|
@@ -130,7 +130,7 @@ div.w-form-el {
|
|
|
130
130
|
&--has-error input::placeholder {color: inherit;}
|
|
131
131
|
|
|
132
132
|
&-shakable {position: relative;}
|
|
133
|
-
&--error &-shakable {animation: w-form-el-shake 0.3s
|
|
133
|
+
&--error &-shakable {animation: w-form-el-shake 0.3s var(--w-transition-duration) ease-in-out;}
|
|
134
134
|
|
|
135
135
|
// Error message.
|
|
136
136
|
// ------------------------------------------------------
|
|
@@ -138,7 +138,7 @@ div.w-form-el {
|
|
|
138
138
|
width: 100%;
|
|
139
139
|
flex-grow: 1;
|
|
140
140
|
font-size: 0.775rem;
|
|
141
|
-
margin-top:
|
|
141
|
+
margin-top: var(--w-base-increment);
|
|
142
142
|
|
|
143
143
|
.w-form--error-placeholders & {position: absolute;bottom: 0;}
|
|
144
144
|
}
|