wave-ui 3.27.2 → 4.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/types/types/$waveui.d.ts +21 -1
- package/dist/types/types/colors.d.ts +2 -0
- package/dist/types/types/components/WAccordion.d.ts +99 -6
- package/dist/types/types/components/WAutocomplete.d.ts +437 -0
- package/dist/types/types/components/WBreadcrumbs.d.ts +7 -0
- package/dist/types/types/components/WButton.d.ts +7 -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/WList.d.ts +7 -0
- package/dist/types/types/components/WMenu.d.ts +12 -6
- 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/WScrollable.d.ts +143 -0
- package/dist/types/types/components/WScrollable.js +2 -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/WTabs.d.ts +7 -0
- package/dist/types/types/components/WTag.d.ts +7 -0
- package/dist/types/types/components/WTooltip.d.ts +20 -7
- 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 +3 -1
- package/dist/wave-ui.cjs.js +3 -3
- package/dist/wave-ui.css +1 -1
- package/dist/wave-ui.esm.js +2190 -1350
- package/dist/wave-ui.umd.js +3 -3
- package/package.json +6 -6
- 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 +15 -6
- package/src/wave-ui/components/w-accordion/item.vue +71 -26
- 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 +20 -11
- package/src/wave-ui/components/w-button/button.vue +36 -24
- package/src/wave-ui/components/w-button/index.vue +6 -5
- 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 +23 -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 +670 -97
- 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 +31 -24
- package/src/wave-ui/components/w-tag.vue +49 -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 +11 -1
- package/src/wave-ui/mixins/detachable.js +98 -43
- package/src/wave-ui/mixins/ripple.js +39 -0
- 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 +37 -0
- package/src/wave-ui/scss/_transitions.scss +19 -19
- package/src/wave-ui/scss/_typography.scss +8 -9
- package/src/wave-ui/scss/index.scss +1 -0
- package/src/wave-ui/scss/variables/_mixins.scss +24 -25
- package/src/wave-ui/scss/variables/_variables.scss +4 -151
- package/src/wave-ui/utils/colors.js +7 -4
- package/src/wave-ui/utils/config.js +5 -4
- package/src/wave-ui/utils/dynamic-css.js +42 -20
- package/src/wave-ui/utils/ripple.js +72 -0
- package/src/wave-ui/utils/wave-ripple-directive.js +40 -0
- 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
|
@@ -168,8 +168,8 @@ export default {
|
|
|
168
168
|
.w-notification {
|
|
169
169
|
display: flex;
|
|
170
170
|
justify-content: center;
|
|
171
|
-
left:
|
|
172
|
-
right:
|
|
171
|
+
left: calc(var(--w-base-increment) * 2);
|
|
172
|
+
right: calc(var(--w-base-increment) * 2);
|
|
173
173
|
position: fixed;
|
|
174
174
|
z-index: 300;
|
|
175
175
|
pointer-events: none;
|
|
@@ -178,8 +178,8 @@ export default {
|
|
|
178
178
|
|
|
179
179
|
// Position.
|
|
180
180
|
&--absolute {position: absolute;z-index: 400;}
|
|
181
|
-
&--top {top: 0;padding-top:
|
|
182
|
-
&--bottom {bottom: 0;padding-bottom:
|
|
181
|
+
&--top {top: 0;padding-top: calc(var(--w-base-increment) * 2);}
|
|
182
|
+
&--bottom {bottom: 0;padding-bottom: calc(var(--w-base-increment) * 2);}
|
|
183
183
|
&--left {justify-content: flex-start;right: auto;}
|
|
184
184
|
&--right {justify-content: flex-end;left: auto;}
|
|
185
185
|
|
|
@@ -135,11 +135,11 @@ $circle-size: 40;
|
|
|
135
135
|
&--top {top: 0;}
|
|
136
136
|
&--bottom {bottom: 0;}
|
|
137
137
|
|
|
138
|
-
&--shadow {box-shadow:
|
|
138
|
+
&--shadow {box-shadow: var(--w-box-shadow);}
|
|
139
139
|
|
|
140
140
|
// Linear progress.
|
|
141
141
|
// ------------------------------------------------------
|
|
142
|
-
&--linear {border-radius:
|
|
142
|
+
&--linear {border-radius: var(--w-border-radius);}
|
|
143
143
|
// Tile, round and outline are only available on linear progress.
|
|
144
144
|
&--tile {border-radius: 0;}
|
|
145
145
|
&--round {border-radius: 99em;}
|
|
@@ -147,7 +147,7 @@ $circle-size: 40;
|
|
|
147
147
|
|
|
148
148
|
&--linear {
|
|
149
149
|
display: flex;
|
|
150
|
-
height:
|
|
150
|
+
height: var(--w-base-increment);
|
|
151
151
|
overflow: hidden;
|
|
152
152
|
|
|
153
153
|
// Background.
|
|
@@ -156,8 +156,7 @@ $circle-size: 40;
|
|
|
156
156
|
position: absolute;
|
|
157
157
|
inset: 0;
|
|
158
158
|
border-radius: inherit;
|
|
159
|
-
background-color: currentColor;
|
|
160
|
-
opacity: 0.15;
|
|
159
|
+
background-color: color-mix(in srgb, currentColor 15%, transparent);
|
|
161
160
|
}
|
|
162
161
|
&.w-progress--outline:after {display: none;}
|
|
163
162
|
|
|
@@ -242,11 +241,11 @@ $circle-size: 40;
|
|
|
242
241
|
display: inline-flex;
|
|
243
242
|
width: 3em;
|
|
244
243
|
aspect-ratio: 1;
|
|
245
|
-
font-size:
|
|
244
|
+
font-size: var(--w-base-font-size);
|
|
246
245
|
|
|
247
246
|
svg {display: block;width: 100%;}
|
|
248
247
|
circle.bg {stroke: currentColor;}
|
|
249
|
-
&.w-progress--default-bg circle.bg {stroke:
|
|
248
|
+
&.w-progress--default-bg circle.bg {stroke: var(--w-progress-bg-color);}
|
|
250
249
|
|
|
251
250
|
.w-progress__progress {
|
|
252
251
|
transform-origin: 100% 100%;
|
|
@@ -69,6 +69,12 @@ export default {
|
|
|
69
69
|
color: { type: String, default: 'primary' },
|
|
70
70
|
labelColor: { type: String, default: 'primary' },
|
|
71
71
|
noRipple: { type: Boolean },
|
|
72
|
+
// Sizes.
|
|
73
|
+
xs: { type: Boolean },
|
|
74
|
+
sm: { type: Boolean },
|
|
75
|
+
md: { type: Boolean },
|
|
76
|
+
lg: { type: Boolean },
|
|
77
|
+
xl: { type: Boolean },
|
|
72
78
|
dark: { type: Boolean },
|
|
73
79
|
light: { type: Boolean }
|
|
74
80
|
// Props from mixin: id, name, disabled, readonly, required, tabindex, validators.
|
|
@@ -90,6 +96,10 @@ export default {
|
|
|
90
96
|
hasLabel () {
|
|
91
97
|
return this.label || this.$slots.default
|
|
92
98
|
},
|
|
99
|
+
presetSize () {
|
|
100
|
+
return (this.xs && 'xs') || (this.sm && 'sm') || (this.md && 'md') || (this.lg && 'lg') || (this.xl && 'xl') || null
|
|
101
|
+
},
|
|
102
|
+
|
|
93
103
|
classes () {
|
|
94
104
|
return {
|
|
95
105
|
[`w-radio w-radio--${this.inputValue ? 'checked' : 'unchecked'}`]: true,
|
|
@@ -98,7 +108,8 @@ export default {
|
|
|
98
108
|
'w-radio--ripple': this.ripple.start,
|
|
99
109
|
'w-radio--rippled': this.ripple.end,
|
|
100
110
|
'w-radio--dark': this.ripple.dark,
|
|
101
|
-
'w-radio--light': this.ripple.light
|
|
111
|
+
'w-radio--light': this.ripple.light,
|
|
112
|
+
[`size--${this.presetSize}`]: !!this.presetSize
|
|
102
113
|
}
|
|
103
114
|
}
|
|
104
115
|
},
|
|
@@ -148,6 +159,8 @@ $outline-width: 2px;
|
|
|
148
159
|
$inactive-color: #666;
|
|
149
160
|
|
|
150
161
|
.w-radio {
|
|
162
|
+
// --_size resolves --w-size if set (e.g. via size class or inline style), otherwise the global default.
|
|
163
|
+
--_size: var(--w-size, var(--w-small-form-el-size));
|
|
151
164
|
display: inline-flex;
|
|
152
165
|
align-items: center;
|
|
153
166
|
vertical-align: middle;
|
|
@@ -175,7 +188,7 @@ $inactive-color: #666;
|
|
|
175
188
|
&__input {
|
|
176
189
|
position: relative;
|
|
177
190
|
border-radius: 100%;
|
|
178
|
-
width:
|
|
191
|
+
width: var(--_size);
|
|
179
192
|
aspect-ratio: 1;
|
|
180
193
|
display: flex;
|
|
181
194
|
flex: 0 0 auto; // Prevent stretching width or height.
|
|
@@ -185,11 +198,11 @@ $inactive-color: #666;
|
|
|
185
198
|
transition: 0.3s ease-in-out;
|
|
186
199
|
cursor: inherit;
|
|
187
200
|
|
|
188
|
-
.w-radio--disabled & {border-color:
|
|
201
|
+
.w-radio--disabled & {border-color: var(--w-disabled-color);}
|
|
189
202
|
|
|
190
203
|
// Checked state.
|
|
191
204
|
:checked ~ & {border-color: currentColor;}
|
|
192
|
-
.w-radio--disabled :checked ~ & {border-color:
|
|
205
|
+
.w-radio--disabled :checked ~ & {border-color: var(--w-disabled-color);}
|
|
193
206
|
}
|
|
194
207
|
|
|
195
208
|
// The inner bullet - visible when checked.
|
|
@@ -200,7 +213,7 @@ $inactive-color: #666;
|
|
|
200
213
|
border: 0 solid $inactive-color;
|
|
201
214
|
// Prevents a tiny hole while animating and in some browser zoom levels.
|
|
202
215
|
background-color: $inactive-color;
|
|
203
|
-
transition:
|
|
216
|
+
transition: var(--w-transition-duration);
|
|
204
217
|
|
|
205
218
|
:checked ~ & {
|
|
206
219
|
border-width: 4px;
|
|
@@ -209,9 +222,9 @@ $inactive-color: #666;
|
|
|
209
222
|
background-color: currentColor;
|
|
210
223
|
}
|
|
211
224
|
.w-radio--disabled & {
|
|
212
|
-
border-color:
|
|
225
|
+
border-color: var(--w-disabled-color);
|
|
213
226
|
// Prevents a tiny hole while animating and in some browser zoom levels.
|
|
214
|
-
background-color:
|
|
227
|
+
background-color: var(--w-disabled-color);
|
|
215
228
|
}
|
|
216
229
|
}
|
|
217
230
|
|
|
@@ -256,6 +269,18 @@ $inactive-color: #666;
|
|
|
256
269
|
|
|
257
270
|
.w-radio--disabled & {opacity: 0.7;}
|
|
258
271
|
}
|
|
272
|
+
|
|
273
|
+
// Sizes.
|
|
274
|
+
// ------------------------------------------------------
|
|
275
|
+
&.size--xs {--w-size: round(nearest, calc(0.86 * var(--w-base-font-size)), 2px);}
|
|
276
|
+
&.size--xs &__input {border-width: 1px;}
|
|
277
|
+
&.size--xs :checked ~ &__input:after {border-width: 3px;}
|
|
278
|
+
&.size--sm {--w-size: round(nearest, calc(1.14 * var(--w-base-font-size)), 2px);}
|
|
279
|
+
&.size--sm :checked ~ &__input:after {border-width: 3px;}
|
|
280
|
+
&.size--lg {--w-size: round(nearest, calc(1.43 * var(--w-base-font-size)), 2px);}
|
|
281
|
+
&.size--lg :checked ~ &__input:after {border-width: 5px;}
|
|
282
|
+
&.size--xl {--w-size: round(nearest, calc(1.71 * var(--w-base-font-size)), 2px);}
|
|
283
|
+
&.size--xl :checked ~ &__input:after {border-width: 6px;}
|
|
259
284
|
}
|
|
260
285
|
|
|
261
286
|
@keyframes w-radio-ripple {
|
|
@@ -49,7 +49,13 @@ export default {
|
|
|
49
49
|
itemColorKey: { type: String, default: 'color' }, // Support a different color per item.
|
|
50
50
|
inline: { type: Boolean },
|
|
51
51
|
color: { type: String, default: 'primary' },
|
|
52
|
-
labelColor: { type: String, default: 'primary' }
|
|
52
|
+
labelColor: { type: String, default: 'primary' },
|
|
53
|
+
// Sizes.
|
|
54
|
+
xs: { type: Boolean },
|
|
55
|
+
sm: { type: Boolean },
|
|
56
|
+
md: { type: Boolean },
|
|
57
|
+
lg: { type: Boolean },
|
|
58
|
+
xl: { type: Boolean }
|
|
53
59
|
// Props from mixin: id, name, disabled, readonly, required, validators.
|
|
54
60
|
// Computed from mixin: inputName, isDisabled & isReadonly.
|
|
55
61
|
},
|
|
@@ -77,10 +83,15 @@ export default {
|
|
|
77
83
|
color: item[this.itemColorKey] || this.color
|
|
78
84
|
}))
|
|
79
85
|
},
|
|
86
|
+
presetSize () {
|
|
87
|
+
return (this.xs && 'xs') || (this.sm && 'sm') || (this.md && 'md') || (this.lg && 'lg') || (this.xl && 'xl') || null
|
|
88
|
+
},
|
|
89
|
+
|
|
80
90
|
classes () {
|
|
81
91
|
return [
|
|
82
92
|
'w-radios',
|
|
83
|
-
`w-radios--${this.inline ? 'inline' : 'column'}
|
|
93
|
+
`w-radios--${this.inline ? 'inline' : 'column'}`,
|
|
94
|
+
this.presetSize && `size--${this.presetSize}`
|
|
84
95
|
]
|
|
85
96
|
}
|
|
86
97
|
},
|
|
@@ -113,8 +124,22 @@ export default {
|
|
|
113
124
|
flex-wrap: wrap;
|
|
114
125
|
vertical-align: middle;
|
|
115
126
|
|
|
116
|
-
.w-radio {margin-right:
|
|
127
|
+
.w-radio {margin-right: calc(var(--w-base-increment) * 3);}
|
|
117
128
|
.w-radio:last-child {margin-right: 0;}
|
|
118
129
|
}
|
|
130
|
+
|
|
131
|
+
// Sizes (cascades --w-small-form-el-size to child w-radio elements).
|
|
132
|
+
// Also scales the radio bullet border-width proportionally.
|
|
133
|
+
// ------------------------------------------------------
|
|
134
|
+
&.size--xs {--w-size: round(nearest, calc(0.86 * var(--w-base-font-size)), 2px);}
|
|
135
|
+
&.size--xs .w-radio__input {border-width: 1px;}
|
|
136
|
+
&.size--xs :checked ~ .w-radio__input:after {border-width: 3px;}
|
|
137
|
+
&.size--sm {--w-size: round(nearest, calc(1.14 * var(--w-base-font-size)), 2px);}
|
|
138
|
+
&.size--sm .w-radio__input {border-width: 1.5px;}
|
|
139
|
+
&.size--sm :checked ~ .w-radio__input:after {border-width: 4px;}
|
|
140
|
+
&.size--lg {--w-size: round(nearest, calc(1.43 * var(--w-base-font-size)), 2px);}
|
|
141
|
+
&.size--lg :checked ~ .w-radio__input:after {border-width: 5px;}
|
|
142
|
+
&.size--xl {--w-size: round(nearest, calc(1.71 * var(--w-base-font-size)), 2px);}
|
|
143
|
+
&.size--xl :checked ~ .w-radio__input:after {border-width: 7px;}
|
|
119
144
|
}
|
|
120
145
|
</style>
|
|
@@ -167,8 +167,6 @@ export default {
|
|
|
167
167
|
</script>
|
|
168
168
|
|
|
169
169
|
<style lang="scss">
|
|
170
|
-
@use "sass:math";
|
|
171
|
-
|
|
172
170
|
.w-rating {
|
|
173
171
|
display: inline-flex;
|
|
174
172
|
align-items: center;
|
|
@@ -184,21 +182,21 @@ export default {
|
|
|
184
182
|
justify-content: center;
|
|
185
183
|
border: none;
|
|
186
184
|
background: none;
|
|
187
|
-
color:
|
|
185
|
+
color: var(--w-rating-bg-color);
|
|
188
186
|
cursor: pointer;
|
|
189
187
|
-webkit-tap-highlight-color: transparent;
|
|
190
|
-
@include default-transition(
|
|
188
|
+
@include default-transition(var(--w-transition-duration-fast));
|
|
191
189
|
|
|
192
190
|
// Disabled & readonly.
|
|
193
191
|
.w-rating--disabled & {opacity: 0.6;cursor: not-allowed;}
|
|
194
192
|
.w-rating--readonly & {cursor: auto;}
|
|
195
193
|
|
|
196
194
|
// Sizes.
|
|
197
|
-
&.size--xs {font-size:
|
|
198
|
-
&.size--sm {font-size:
|
|
199
|
-
&.size--md {font-size:
|
|
200
|
-
&.size--lg {font-size:
|
|
201
|
-
&.size--xl {font-size: 2 *
|
|
195
|
+
&.size--xs {font-size: round(nearest, calc(0.85 * var(--w-base-font-size)), 1px);}
|
|
196
|
+
&.size--sm {font-size: round(nearest, calc(1.15 * var(--w-base-font-size)), 1px);}
|
|
197
|
+
&.size--md {font-size: round(nearest, calc(1.4 * var(--w-base-font-size)), 1px);}
|
|
198
|
+
&.size--lg {font-size: round(nearest, calc(1.7 * var(--w-base-font-size)), 1px);}
|
|
199
|
+
&.size--xl {font-size: calc(2 * var(--w-base-font-size));margin-left: 0;}
|
|
202
200
|
|
|
203
201
|
&:before {font-size: 1.1em;}
|
|
204
202
|
&:before, .w-icon:before {
|