wave-ui 2.48.0 → 3.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.
Files changed (48) hide show
  1. package/dist/wave-ui.cjs.js +1 -1
  2. package/dist/wave-ui.css +1 -1
  3. package/dist/wave-ui.es.js +1630 -1419
  4. package/dist/wave-ui.umd.js +1 -1
  5. package/package.json +4 -3
  6. package/src/wave-ui/components/index.js +1 -0
  7. package/src/wave-ui/components/w-accordion.vue +8 -2
  8. package/src/wave-ui/components/w-alert.vue +10 -4
  9. package/src/wave-ui/components/w-app.vue +2 -107
  10. package/src/wave-ui/components/w-badge.vue +7 -3
  11. package/src/wave-ui/components/w-button/button.vue +6 -2
  12. package/src/wave-ui/components/w-card.vue +14 -4
  13. package/src/wave-ui/components/w-checkbox.vue +15 -8
  14. package/src/wave-ui/components/w-confirm.vue +5 -1
  15. package/src/wave-ui/components/w-date-picker.vue +6 -0
  16. package/src/wave-ui/components/w-dialog.vue +9 -3
  17. package/src/wave-ui/components/w-divider.vue +9 -3
  18. package/src/wave-ui/components/w-drawer.vue +9 -3
  19. package/src/wave-ui/components/w-input.vue +4 -2
  20. package/src/wave-ui/components/w-menu.vue +11 -4
  21. package/src/wave-ui/components/w-notification-manager.vue +18 -30
  22. package/src/wave-ui/components/w-notification.vue +7 -1
  23. package/src/wave-ui/components/w-progress.vue +2 -2
  24. package/src/wave-ui/components/w-radio.vue +8 -2
  25. package/src/wave-ui/components/w-rating.vue +11 -3
  26. package/src/wave-ui/components/w-scrollbar.vue +24 -0
  27. package/src/wave-ui/components/w-select.vue +9 -5
  28. package/src/wave-ui/components/w-slider.vue +13 -7
  29. package/src/wave-ui/components/w-steps.vue +14 -4
  30. package/src/wave-ui/components/w-switch.vue +14 -14
  31. package/src/wave-ui/components/w-table.vue +25 -11
  32. package/src/wave-ui/components/w-tabs/index.vue +8 -2
  33. package/src/wave-ui/components/w-tag.vue +15 -10
  34. package/src/wave-ui/components/w-textarea.vue +6 -2
  35. package/src/wave-ui/components/w-timeline.vue +18 -5
  36. package/src/wave-ui/components/w-toolbar.vue +8 -2
  37. package/src/wave-ui/components/w-tooltip.vue +10 -4
  38. package/src/wave-ui/components/w-tree.vue +47 -15
  39. package/src/wave-ui/core.js +117 -90
  40. package/src/wave-ui/scss/_base.scss +53 -2
  41. package/src/wave-ui/scss/_colors.scss +41 -17
  42. package/src/wave-ui/scss/_layout.scss +5 -12
  43. package/src/wave-ui/scss/_mixins.scss +24 -0
  44. package/src/wave-ui/scss/_variables.scss +100 -11
  45. package/src/wave-ui/utils/colors.js +60 -3
  46. package/src/wave-ui/utils/config.js +35 -11
  47. package/src/wave-ui/utils/dynamic-css.js +92 -30
  48. package/src/wave-ui/utils/notification-manager.js +39 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-ui",
3
- "version": "2.48.0",
3
+ "version": "3.0.0",
4
4
  "description": "An emerging UI framework for Vue.js (2 & 3) with only the bright side. :sunny:",
5
5
  "author": "Antoni Andre <antoniandre.web@gmail.com>",
6
6
  "homepage": "https://antoniandre.github.io/wave-ui",
@@ -62,14 +62,15 @@
62
62
  "gsap": "^3.11.3",
63
63
  "ionicons": "^4.6.3",
64
64
  "material-design-icons": "^3.0.1",
65
- "postcss": "^8.4.19",
65
+ "postcss": "^8.4.20",
66
66
  "pug": "^3.0.2",
67
67
  "rollup-plugin-delete": "^2.0.0",
68
- "sass": "^1.56.1",
68
+ "sass": "^1.57.1",
69
69
  "simple-syntax-highlighter": "^2.2.5",
70
70
  "splitpanes": "^3.1.5",
71
71
  "standard": "^17.0.0",
72
72
  "vite": "^3.2.5",
73
+ "vite-svg-loader": "^4.0.0",
73
74
  "vue": "^3.2.45",
74
75
  "vue-router": "^4.1.6",
75
76
  "vueperslides": "^3.5.1",
@@ -28,6 +28,7 @@ export { default as WProgress } from './w-progress.vue'
28
28
  export { default as WRadio } from './w-radio.vue'
29
29
  export { default as WRadios } from './w-radios.vue'
30
30
  export { default as WRating } from './w-rating.vue'
31
+ export { default as WScrollbar } from './w-scrollbar.vue'
31
32
  export { default as WSelect } from './w-select.vue'
32
33
  export { default as WSlider } from './w-slider.vue'
33
34
  export { default as WSpinner } from './w-spinner.vue'
@@ -83,7 +83,9 @@ export default {
83
83
  expandSingle: { type: Boolean },
84
84
  collapseIcon: { type: String },
85
85
  shadow: { type: Boolean },
86
- duration: { type: Number, default: 250 }
86
+ duration: { type: Number, default: 250 },
87
+ dark: { type: Boolean },
88
+ light: { type: Boolean }
87
89
  },
88
90
 
89
91
  emits: ['input', 'update:modelValue', 'focus', 'item-expand', 'item-collapsed'],
@@ -97,6 +99,8 @@ export default {
97
99
  return {
98
100
  [this.color]: this.color,
99
101
  [`${this.bgColor}--bg`]: this.bgColor,
102
+ 'w-accordion--dark': this.dark,
103
+ 'w-accordion--light': this.light,
100
104
  'w-accordion--shadow': this.shadow,
101
105
  'w-accordion--no-icon': !this.expandIcon && !this.collapseIcon,
102
106
  'w-accordion--icon-right': this.expandIcon && this.expandIconRight,
@@ -168,11 +172,13 @@ export default {
168
172
  .w-accordion {
169
173
  z-index: 1;
170
174
 
175
+ @include themeable;
176
+
171
177
  &--shadow {box-shadow: $box-shadow;}
172
178
 
173
179
  &__item {position: relative;}
174
180
 
175
- button.w-accordion__expand-icon {color: #999;}
181
+ button.w-accordion__expand-icon {color: rgba(var(--w-base-color-rgb), 0.4);}
176
182
  &__expand-icon {
177
183
  margin-right: $base-increment;
178
184
 
@@ -48,7 +48,9 @@ export default {
48
48
  borderRight: { type: Boolean },
49
49
  borderTop: { type: Boolean },
50
50
  borderBottom: { type: Boolean },
51
- outline: { type: Boolean }
51
+ outline: { type: Boolean },
52
+ dark: { type: Boolean },
53
+ light: { type: Boolean }
52
54
  },
53
55
 
54
56
  emits: ['input', 'update:modelValue', 'close'],
@@ -113,7 +115,9 @@ export default {
113
115
  'w-alert--border-right': !this.noBorder && this.borderRight,
114
116
  'w-alert--border-top': !this.noBorder && this.borderTop,
115
117
  'w-alert--border-bottom': !this.noBorder && this.borderBottom,
116
- 'w-alert--shadow': this.shadow
118
+ 'w-alert--shadow': this.shadow,
119
+ 'w-alert--dark': this.dark,
120
+ 'w-alert--light': this.light
117
121
  }
118
122
  }
119
123
  },
@@ -137,6 +141,8 @@ export default {
137
141
  border-radius: $border-radius;
138
142
  border: 1px solid currentColor;
139
143
 
144
+ @include themeable;
145
+
140
146
  &--has-icon {
141
147
  display: flex;
142
148
  align-items: center;
@@ -232,8 +238,8 @@ export default {
232
238
  left: 1px;
233
239
  z-index: 1;
234
240
  transform: translateX(-50%);
235
- border: 1px solid rgba(255, 255, 255, 0.7);
236
- background-color: #fff;
241
+ border: 1px solid rgba(var(--w-base-bg-color-rgb), 0.7);
242
+ background-color: $base-bg-color;
237
243
  }
238
244
  &--icon-outside &__icon:before {transform: scale(1.05);}
239
245
 
@@ -1,20 +1,13 @@
1
1
  <template lang="pug">
2
- .w-app(:class="classes")
2
+ .w-app
3
3
  slot
4
- notification-manager
5
4
  </template>
6
5
 
7
6
  <script>
8
- import NotificationManager from './w-notification-manager.vue'
9
- import dynamicCSS from '../utils/dynamic-css'
10
-
11
- // Global var for faster results in the resize event handler.
12
- let breakpointsDef = { keys: [], values: [] }
13
-
14
7
  export default {
15
8
  name: 'w-app',
9
+ // Keep the props for the API documentation.
16
10
  props: {
17
- dark: { type: Boolean },
18
11
  block: { type: Boolean },
19
12
  row: { type: Boolean },
20
13
  alignCenter: { type: Boolean },
@@ -26,104 +19,6 @@ export default {
26
19
  justifySpaceEvenly: { type: Boolean },
27
20
  textCenter: { type: Boolean },
28
21
  textRight: { type: Boolean }
29
- },
30
-
31
- components: { NotificationManager },
32
-
33
- data: () => ({
34
- currentBreakpoint: null,
35
- notifManager: null
36
- }),
37
-
38
- computed: {
39
- classes () {
40
- return {
41
- 'd-block': this.block,
42
- row: this.row,
43
- 'align-center': this.alignCenter,
44
- 'align-end': this.alignEnd,
45
- 'justify-center': this.justifyCenter,
46
- 'justify-end': this.justifyEnd,
47
- 'justify-space-between': this.justifySpaceBetween,
48
- 'justify-space-around': this.justifySpaceAround,
49
- 'justify-space-evenly': this.justifySpaceEvenly,
50
- 'text-center': this.textCenter,
51
- 'text-right': this.textRight,
52
- 'theme--dark': this.dark
53
- }
54
- }
55
- },
56
-
57
- methods: {
58
- getBreakpoint () {
59
- const width = window.innerWidth
60
- const breakpoints = breakpointsDef.values.slice(0)
61
- // Most performant lookup.
62
- breakpoints.push(width)
63
- breakpoints.sort((a, b) => a - b)
64
- const breakpoint = breakpointsDef.keys[breakpoints.indexOf(width)] || 'xl'
65
-
66
- if (breakpoint !== this.currentBreakpoint) {
67
- this.currentBreakpoint = breakpoint
68
- this.$waveui.breakpoint = {
69
- name: breakpoint,
70
- xs: breakpoint === 'xs',
71
- sm: breakpoint === 'sm',
72
- md: breakpoint === 'md',
73
- lg: breakpoint === 'lg',
74
- xl: breakpoint === 'xl',
75
- width
76
- }
77
- }
78
-
79
- this.$waveui.breakpoint.width = width
80
- }
81
- },
82
-
83
- mounted () {
84
- const { config } = this.$waveui
85
- breakpointsDef = { keys: Object.keys(config.breakpoints), values: Object.values(config.breakpoints) }
86
-
87
- // Inject global dynamic CSS classes in document head.
88
- if (!document.getElementById('wave-ui-styles')) {
89
- const css = document.createElement('style')
90
- css.id = 'wave-ui-styles'
91
- css.innerHTML = dynamicCSS(config)
92
-
93
- const firstStyle = document.head.querySelectorAll('style,link[rel="stylesheet"]')[0]
94
- if (firstStyle) firstStyle.before(css)
95
- else document.head.appendChild(css)
96
- }
97
-
98
- this.getBreakpoint(window.innerWidth)
99
- window.addEventListener('resize', this.getBreakpoint)
100
- },
101
-
102
- beforeUnmount () {
103
- window.removeEventListener('resize', this.getBreakpoint)
104
22
  }
105
23
  }
106
24
  </script>
107
-
108
- <style lang="scss">
109
- @import '../scss/index';
110
-
111
- .w-app {
112
- position: relative; // Make the .w-app a referential for tooltips / menus.
113
- display: flex;
114
- flex-direction: column;
115
- min-height: 100vh;
116
-
117
- &.row {flex-direction: row;}
118
- &.d-block {display: block;}
119
- &.align-center {align-items: center;}
120
- &.align-end {align-items: flex-end;}
121
- &.justify-center {justify-content: center;}
122
- &.justify-end {justify-content: flex-end;}
123
- &.justify-space-between {justify-content: space-between;}
124
- &.justify-space-around {justify-content: space-around;}
125
- &.justify-space-evenly {justify-content: space-evenly;}
126
- &.text-center {text-align: center;}
127
- &.text-right {text-align: right;}
128
- }
129
- </style>
@@ -33,13 +33,14 @@ export default {
33
33
  color: { type: String },
34
34
  size: { type: [Number, String] },
35
35
  bgColor: { type: String, default: 'primary' },
36
- dark: { type: Boolean },
37
36
  badgeClass: { type: String },
38
37
  outline: { type: Boolean },
39
38
  shadow: { type: Boolean },
40
39
  dot: { type: Boolean },
41
40
  round: { type: Boolean },
42
- transition: { type: String, default: 'fade' }
41
+ transition: { type: String, default: 'fade' },
42
+ dark: { type: Boolean },
43
+ light: { type: Boolean }
43
44
  },
44
45
 
45
46
  emits: [],
@@ -72,7 +73,8 @@ export default {
72
73
  [`${this.bgColor}--bg`]: this.bgColor,
73
74
  [this.badgeClass]: this.badgeClass || null,
74
75
  'w-badge--round': this.round || (slotText || this.modelValue + '' || '').length < 2,
75
- 'w-badge--dark': this.dark && !this.outline,
76
+ 'w-badge--dark': this.dark,
77
+ 'w-badge--light': this.light,
76
78
  'w-badge--outline': this.outline,
77
79
  'w-badge--inline': this.inline,
78
80
  'w-badge--shadow': this.shadow,
@@ -109,6 +111,8 @@ export default {
109
111
  z-index: 1;
110
112
  padding: 0 $base-increment;
111
113
 
114
+ @include themeable;
115
+
112
116
  &--inline {position: static;}
113
117
 
114
118
  &--round {
@@ -27,6 +27,7 @@ export default {
27
27
  color: { type: String },
28
28
  bgColor: { type: String },
29
29
  dark: { type: Boolean },
30
+ light: { type: Boolean },
30
31
  outline: { type: Boolean },
31
32
  text: { type: Boolean },
32
33
  round: { type: Boolean },
@@ -106,12 +107,13 @@ export default {
106
107
  classes () {
107
108
  return {
108
109
  // If no color / bg color is set, set a primary color by default.
109
- 'primary--bg': !this.bgColor && !this.color && !this.dark && !(this.outline || this.text),
110
+ 'primary--bg': !this.bgColor && !this.color && !(this.outline || this.text),
110
111
  primary: !this.bgColor && !this.color && !this.dark && (this.outline || this.text),
111
112
 
112
113
  [this.color]: this.color,
113
114
  [`${this.bgColor}--bg`]: this.bgColor,
114
- 'w-button--dark': this.dark && !this.outline,
115
+ 'w-button--dark': this.dark,
116
+ 'w-button--light': this.light,
115
117
  'w-button--outline': this.outline,
116
118
  'w-button--text': this.text,
117
119
  'w-button--round': this.round,
@@ -166,6 +168,8 @@ $spinner-size: 40;
166
168
  transition: $transition-duration, background-color 0s, padding 0s;
167
169
  -webkit-tap-highlight-color: transparent;
168
170
 
171
+ @include themeable;
172
+
169
173
  // In w-flex wrapper, allow overriding the default `align-self: center`.
170
174
  .w-flex.align-start > & {align-self: flex-start;}
171
175
  .w-flex.align-end > & {align-self: flex-end;}
@@ -1,9 +1,13 @@
1
1
  <template lang="pug">
2
2
  .w-card(:class="classes")
3
3
  .w-card__title(
4
- v-if="$slots.title || title"
4
+ v-if="$slots.title"
5
+ :class="{ 'w-card__title--has-toolbar': $slots.title && titleHasToolbar, ...titleClasses }")
6
+ slot(name="title")
7
+ .w-card__title(
8
+ v-else-if="title"
9
+ v-html="title"
5
10
  :class="{ 'w-card__title--has-toolbar': $slots.title && titleHasToolbar, ...titleClasses }")
6
- slot(name="title") {{ title }}
7
11
  w-image.w-card__image(v-if="image" :src="image" v-bind="imgProps")
8
12
  slot(name="image-content")
9
13
  .w-card__content(:class="contentClasses")
@@ -30,7 +34,9 @@ export default {
30
34
  image: { type: String },
31
35
  imageProps: { type: Object },
32
36
  titleClass: { type: [String, Object, Array] },
33
- contentClass: { type: [String, Object, Array] }
37
+ contentClass: { type: [String, Object, Array] },
38
+ dark: { type: Boolean },
39
+ light: { type: Boolean }
34
40
  },
35
41
 
36
42
  emits: [],
@@ -68,7 +74,9 @@ export default {
68
74
  [`${this.bgColor}--bg`]: this.bgColor,
69
75
  'w-card--no-border': this.noBorder,
70
76
  'w-card--tile': this.tile,
71
- 'w-card--shadow': this.shadow
77
+ 'w-card--shadow': this.shadow,
78
+ 'w-card--dark': this.dark,
79
+ 'w-card--light': this.light
72
80
  }
73
81
  }
74
82
  }
@@ -83,6 +91,8 @@ export default {
83
91
  border-radius: $border-radius;
84
92
  border: $border;
85
93
 
94
+ @include themeable;
95
+
86
96
  &--tile {border-radius: 0;}
87
97
  &--shadow {box-shadow: $box-shadow;}
88
98
  &--no-border, &--shadow {border: none;}
@@ -70,7 +70,9 @@ export default {
70
70
  labelColor: { type: String, default: 'primary' },
71
71
  noRipple: { type: Boolean },
72
72
  indeterminate: { type: Boolean },
73
- round: { type: Boolean }
73
+ round: { type: Boolean },
74
+ dark: { type: Boolean },
75
+ light: { type: Boolean }
74
76
  // Props from mixin: name, disabled, readonly, required, tabindex, validators.
75
77
  // Computed from mixin: inputName, isDisabled & isReadonly.
76
78
  },
@@ -99,7 +101,9 @@ export default {
99
101
  'w-checkbox--indeterminate': this.indeterminate,
100
102
  'w-checkbox--ripple': this.ripple.start,
101
103
  'w-checkbox--rippled': this.ripple.end,
102
- 'w-checkbox--round': this.round
104
+ 'w-checkbox--round': this.round,
105
+ 'w-checkbox--dark': this.dark,
106
+ 'w-checkbox--light': this.light
103
107
  }
104
108
  }
105
109
  },
@@ -148,6 +152,8 @@ $inactive-color: #666;
148
152
  cursor: pointer;
149
153
  -webkit-tap-highlight-color: transparent;
150
154
 
155
+ @include themeable;
156
+
151
157
  &--disabled {cursor: not-allowed;}
152
158
 
153
159
  // The hidden real checkbox.
@@ -177,7 +183,7 @@ $inactive-color: #666;
177
183
  aspect-ratio: 1;
178
184
  fill: none;
179
185
  stroke-width: 2;
180
- stroke: white;
186
+ stroke: $contrast-color;
181
187
  stroke-linecap: round;
182
188
  stroke-linejoin: round;
183
189
  stroke-dasharray: 16px;
@@ -194,6 +200,7 @@ $inactive-color: #666;
194
200
  }
195
201
 
196
202
  .w-checkbox--indeterminate & {opacity: 0;}
203
+ .w-checkbox--disabled & {stroke: rgba(var(--w-contrast-color-rgb), 0.4);}
197
204
  }
198
205
  &__input:after {
199
206
  content: '';
@@ -214,14 +221,14 @@ $inactive-color: #666;
214
221
  // Prevents a tiny hole while animating and in some browser zoom levels.
215
222
  background-color: currentColor;
216
223
  }
224
+ .w-checkbox--indeterminate :checked ~ & {
225
+ border-width: ((divide($small-form-el-size, 2)) - 1px) 3px;
226
+ background-color: $contrast-color;
227
+ }
217
228
  .w-checkbox--disabled :checked ~ & {
218
229
  border-color: $disabled-color;
219
230
  // Prevents a tiny hole while animating and in some browser zoom levels.
220
- background-color: $disabled-color;
221
- }
222
- .w-checkbox--indeterminate :checked ~ & {
223
- border-width: ((divide($small-form-el-size, 2)) - 1px) 3px;
224
- background-color: white;
231
+ background-color: rgba(var(--w-contrast-color-rgb), 0.4);
225
232
  }
226
233
  }
227
234
 
@@ -65,7 +65,9 @@ export default {
65
65
  alignLeft: { type: Boolean },
66
66
  alignRight: { type: Boolean },
67
67
  persistent: { type: Boolean },
68
- transition: { type: String }
68
+ transition: { type: String },
69
+ dark: { type: Boolean },
70
+ light: { type: Boolean }
69
71
  },
70
72
 
71
73
  emits: ['cancel', 'confirm'],
@@ -124,6 +126,8 @@ export default {
124
126
  bgColor: this.bgColor,
125
127
  color: this.color,
126
128
  icon: this.icon,
129
+ dark: this.dark,
130
+ light: this.light,
127
131
  tooltip: label,
128
132
  tooltipProps,
129
133
  ...this.mainButton
@@ -7,6 +7,8 @@
7
7
  export default {
8
8
  name: 'w-date-picker',
9
9
  props: {
10
+ dark: { type: Boolean },
11
+ light: { type: Boolean }
10
12
  },
11
13
 
12
14
  emits: [],
@@ -14,6 +16,8 @@ export default {
14
16
  computed: {
15
17
  classes () {
16
18
  return {
19
+ 'w-date-picker--dark': this.dark,
20
+ 'w-date-picker--light': this.light
17
21
  }
18
22
  },
19
23
  styles () {
@@ -25,5 +29,7 @@ export default {
25
29
 
26
30
  <style lang="scss">
27
31
  .w-date-picker {
32
+
33
+ @include themeable;
28
34
  }
29
35
  </style>
@@ -46,7 +46,9 @@ export default {
46
46
  overlayColor: { type: String },
47
47
  color: { type: String },
48
48
  bgColor: { type: String },
49
- overlayOpacity: { type: [Number, String, Boolean] }
49
+ overlayOpacity: { type: [Number, String, Boolean] },
50
+ dark: { type: Boolean },
51
+ light: { type: Boolean }
50
52
  },
51
53
 
52
54
  provide () {
@@ -74,7 +76,9 @@ export default {
74
76
  },
75
77
  classes () {
76
78
  return {
77
- 'w-dialog--fullscreen': this.fullscreen
79
+ 'w-dialog--fullscreen': this.fullscreen,
80
+ 'w-dialog--dark': this.dark,
81
+ 'w-dialog--light': this.light
78
82
  }
79
83
  },
80
84
  contentStyles () {
@@ -121,7 +125,9 @@ export default {
121
125
  flex-grow: 1;
122
126
  max-width: 95%;
123
127
  overflow: auto;
124
- background-color: #fff;
128
+ background-color: $dialog-bg-color;
129
+
130
+ @include themeable;
125
131
 
126
132
  .w-dialog--fullscreen > & {
127
133
  flex: 1 1 auto;
@@ -12,7 +12,9 @@ export default {
12
12
 
13
13
  props: {
14
14
  vertical: { type: Boolean },
15
- color: { type: String }
15
+ color: { type: String },
16
+ dark: { type: Boolean },
17
+ light: { type: Boolean }
16
18
  },
17
19
 
18
20
  emits: [],
@@ -22,7 +24,9 @@ export default {
22
24
  return {
23
25
  [`w-divider--has-color ${this.color}`]: this.color,
24
26
  [`w-divider--${this.vertical ? 'vertical' : 'horizontal'}`]: true,
25
- 'w-divider--has-content': this.$slots.default
27
+ 'w-divider--has-content': this.$slots.default,
28
+ 'w-divider--dark': this.dark,
29
+ 'w-divider--light': this.light
26
30
  }
27
31
  }
28
32
  }
@@ -31,9 +35,11 @@ export default {
31
35
 
32
36
  <style lang="scss">
33
37
  .w-divider {
34
- border: 0 solid rgba(0, 0, 0, 0.15);
38
+ border: 0 solid $divider-color;
35
39
  border-top-width: 1px;
36
40
 
41
+ @include themeable;
42
+
37
43
  &--has-color {border-color: currentColor;}
38
44
 
39
45
  &--vertical {
@@ -77,7 +77,9 @@ export default {
77
77
  overlayColor: { type: String },
78
78
  overlayOpacity: { type: [Number, String, Boolean] },
79
79
  drawerClass: { type: String },
80
- tag: { type: String, default: 'aside' }
80
+ tag: { type: String, default: 'aside' },
81
+ dark: { type: Boolean },
82
+ light: { type: Boolean }
81
83
  },
82
84
 
83
85
  provide () {
@@ -133,7 +135,9 @@ export default {
133
135
  [`w-drawer--${this.position}`]: true,
134
136
  'w-drawer--fit-content': this.fitContent,
135
137
  'w-drawer--persistent': this.persistent,
136
- 'w-drawer--persistent-animate': this.persistent && this.persistentAnimate
138
+ 'w-drawer--persistent-animate': this.persistent && this.persistentAnimate,
139
+ 'w-drawer--dark': this.dark,
140
+ 'w-drawer--light': this.light
137
141
  }
138
142
  },
139
143
  // The track is a wrapper around the pushable content and drawer.
@@ -247,9 +251,11 @@ export default {
247
251
  position: inherit;
248
252
  display: flex;
249
253
  z-index: 1;
250
- background: #fff;
254
+ background: $drawer-bg-color;
251
255
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
252
256
 
257
+ @include themeable;
258
+
253
259
  &--left, &--right {
254
260
  top: 0;
255
261
  bottom: 0;
@@ -147,7 +147,6 @@ export default {
147
147
  step: { type: [Number, String] },
148
148
  min: { type: [Number, String] },
149
149
  max: { type: [Number, String] },
150
- dark: { type: Boolean },
151
150
  outline: { type: Boolean },
152
151
  round: { type: Boolean },
153
152
  shadow: { type: Boolean },
@@ -158,7 +157,9 @@ export default {
158
157
  showProgress: { type: [Boolean] }, // Only for file uploads.
159
158
  // Allow syncing the files 1 way: prefilling a file is not possible.
160
159
  // https://stackoverflow.com/questions/16365668/pre-populate-html-form-file-input
161
- files: { type: Array }
160
+ files: { type: Array },
161
+ dark: { type: Boolean },
162
+ light: { type: Boolean }
162
163
  // Props from mixin: name, disabled, readonly, required, tabindex, validators.
163
164
  // Computed from mixin: inputName, isDisabled & isReadonly.
164
165
  },
@@ -251,6 +252,7 @@ export default {
251
252
  [`w-input--${this.hasValue || this.isAutofilled ? 'filled' : 'empty'}`]: true,
252
253
  'w-input--focused': this.isFocused && !this.isReadonly,
253
254
  'w-input--dark': this.dark,
255
+ 'w-input--light': this.light,
254
256
  'w-input--floating-label': this.hasLabel && this.labelPosition === 'inside' && !this.staticLabel,
255
257
  'w-input--no-padding': !this.outline && !this.bgColor && !this.shadow && !this.round,
256
258
  'w-input--has-placeholder': this.placeholder,
@@ -73,7 +73,9 @@ export default {
73
73
  overlayClass: { type: [String, Object, Array] },
74
74
  overlayProps: { type: Object }, // Allow passing down an object of props to the w-overlay component.
75
75
  persistent: { type: Boolean },
76
- delay: { type: Number }
76
+ delay: { type: Number },
77
+ dark: { type: Boolean },
78
+ light: { type: Boolean }
77
79
  // Other props in the detachable mixin:
78
80
  // detachTo, appendTo, fixed, top, bottom, left, right, alignTop, alignBottom, alignLeft,
79
81
  // alignRight, noPosition, zIndex, activator.
@@ -153,7 +155,9 @@ export default {
153
155
  'w-menu--round': this.round,
154
156
  'w-menu--arrow': this.arrow,
155
157
  'w-menu--shadow': this.shadow,
156
- 'w-menu--fixed': this.fixed
158
+ 'w-menu--fixed': this.fixed,
159
+ 'w-menu--dark': this.dark,
160
+ 'w-menu--light': this.light
157
161
  }
158
162
  },
159
163
 
@@ -272,9 +276,12 @@ export default {
272
276
  .w-menu {
273
277
  position: absolute;
274
278
  z-index: 100;
279
+ color: $menu-color;
280
+
281
+ @include themeable;
275
282
 
276
283
  &--fixed {position: fixed;z-index: 1000;}
277
- &--card {background-color: #fff;}
284
+ &--card {background-color: $menu-bg-color;}
278
285
  &--tile {border-radius: 0;}
279
286
  &--round {
280
287
  border-radius: 99em;
@@ -293,7 +300,7 @@ export default {
293
300
  &.w-menu--left {margin-left: -4 * $base-increment;}
294
301
  &.w-menu--right {margin-left: 4 * $base-increment;}
295
302
 
296
- @include triangle(var(--w-menu-bg-color), '.w-menu', 9px);
303
+ @include triangle($menu-bg-color, '.w-menu', 9px);
297
304
  }
298
305
  }
299
306
  </style>