wave-ui 3.9.0 → 3.9.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-ui",
3
- "version": "3.9.0",
3
+ "version": "3.9.2",
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",
@@ -50,30 +50,30 @@
50
50
  "publish-doc": "npm run build && npm run build-bundle && git add . && git commit -m 'Publish documentation on Github.' && git push && git push --tag"
51
51
  },
52
52
  "devDependencies": {
53
- "@babel/core": "^7.23.2",
54
- "@babel/eslint-parser": "^7.22.15",
55
- "@faker-js/faker": "^8.2.0",
53
+ "@babel/core": "^7.23.7",
54
+ "@babel/eslint-parser": "^7.23.3",
55
+ "@faker-js/faker": "^8.3.1",
56
56
  "@mdi/font": "^6.9.96",
57
- "@vitejs/plugin-vue": "^3.2.0",
58
- "@vue/compiler-sfc": "3.3.4",
57
+ "@vitejs/plugin-vue": "^5.0.2",
58
+ "@vue/compiler-sfc": "3.4.4",
59
59
  "autoprefixer": "^10.4.16",
60
- "axios": "^1.6.0",
61
- "eslint": "^8.52.0",
62
- "eslint-plugin-vue": "^9.18.1",
60
+ "axios": "^1.6.3",
61
+ "eslint": "^8.56.0",
62
+ "eslint-plugin-vue": "^9.19.2",
63
63
  "font-awesome": "^4.7.0",
64
- "gsap": "^3.12.2",
64
+ "gsap": "^3.12.4",
65
65
  "ionicons": "^4.6.3",
66
66
  "material-design-icons": "^3.0.1",
67
- "postcss": "^8.4.31",
67
+ "postcss": "^8.4.32",
68
68
  "pug": "^3.0.2",
69
69
  "rollup-plugin-delete": "^2.0.0",
70
- "sass": "^1.69.5",
70
+ "sass": "^1.69.7",
71
71
  "simple-syntax-highlighter": "^3.0.2",
72
72
  "splitpanes": "^3.1.5",
73
73
  "standard": "^17.1.0",
74
- "vite": "^3.2.7",
75
- "vite-svg-loader": "^4.0.0",
76
- "vue": "^3.3.7",
74
+ "vite": "^5.0.10",
75
+ "vite-svg-loader": "^5.1.0",
76
+ "vue": "^3.4.4",
77
77
  "vue-router": "^4.2.5",
78
78
  "vueperslides": "^3.5.1",
79
79
  "vuex": "^4.1.0"
@@ -117,6 +117,7 @@ export default {
117
117
 
118
118
  &--round {
119
119
  aspect-ratio: 1;
120
+ min-width: 0; // Safari ratio fix (e.g. losing ratio if height is set and side padding are added).
120
121
  padding: 0;
121
122
  }
122
123
 
@@ -203,6 +203,7 @@ $spinner-size: 40;
203
203
  aspect-ratio: 1;
204
204
  border-radius: 99em;
205
205
  padding: 0;
206
+ min-width: 0; // Safari ratio fix (e.g. losing ratio if height is set and side padding are added).
206
207
  }
207
208
  &--tile {border-radius: initial;}
208
209
  &--shadow {box-shadow: $box-shadow;}
@@ -111,7 +111,7 @@ export default {
111
111
  line-height: 1;
112
112
  font-size: 1.2em;
113
113
  width: 1em;
114
- // The aspect ratio will not work if the content is the content overflows.
114
+ // The aspect ratio will not work if the content overflows (needs overflow hidden, but we don't want that in the library).
115
115
  height: 1em;
116
116
 
117
117
  &.size--xs {font-size: round(0.85 * $base-font-size);}
@@ -237,7 +237,7 @@ export default {
237
237
  overallFilesProgress () {
238
238
  const progress = +this.inputFiles.reduce((total, file) => total + file.progress, 0)
239
239
  const total = progress / this.inputFiles.length
240
- this.$emit('update:overallProgress', this.inputFiles.length ? total : undefined)
240
+ this.$emit('update:overallProgress', this.inputFiles.length ? total : 0)
241
241
 
242
242
  return total
243
243
  },
@@ -15,23 +15,23 @@
15
15
  <script>
16
16
  const domProps = {
17
17
  h: {
18
- horizOrVert: 'horizontal',
18
+ direction: 'horizontal',
19
19
  topOrLeft: 'left',
20
- widthOrHeight: 'width',
21
- offsetWidthOrHeight: 'offsetWidth',
22
- maxWidthOrHeight: 'max-width',
23
- scrollWidthOrHeight: 'scrollWidth',
20
+ size: 'width',
21
+ offsetSize: 'offsetWidth',
22
+ maxSize: 'max-width',
23
+ scrollSize: 'scrollWidth',
24
24
  clientXorY: 'clientX',
25
25
  deltaXorY: 'deltaX',
26
26
  scrollTopOrLeft: 'scrollLeft'
27
27
  },
28
28
  v: {
29
- horizOrVert: 'vertical',
29
+ direction: 'vertical',
30
30
  topOrLeft: 'top',
31
- widthOrHeight: 'height',
32
- offsetWidthOrHeight: 'offsetHeight',
33
- maxWidthOrHeight: 'max-height',
34
- scrollWidthOrHeight: 'scrollHeight',
31
+ size: 'height',
32
+ offsetSize: 'offsetHeight',
33
+ maxSize: 'max-height',
34
+ scrollSize: 'scrollHeight',
35
35
  clientXorY: 'clientY',
36
36
  deltaXorY: 'deltaY',
37
37
  scrollTopOrLeft: 'scrollTop'
@@ -72,27 +72,26 @@ export default {
72
72
 
73
73
  scrollableClasses () {
74
74
  return {
75
- [`w-scrollable--${this.m.horizOrVert}`]: true
75
+ [`w-scrollable--${this.m.direction}`]: true
76
76
  }
77
77
  },
78
78
 
79
79
  scrollbarClasses () {
80
80
  return {
81
- [`w-scrollbar--${this.m.horizOrVert}`]: true
81
+ [`w-scrollbar--${this.m.direction}`]: true
82
82
  }
83
83
  },
84
84
 
85
85
  thumbSizePercent () {
86
86
  if (!this.mounted) return 0
87
- console.log('😒', this[this.m.widthOrHeight], this.$refs.scrollable[[this.m.offsetWidthOrHeight]])
88
- const widthOrHeight = this[this.m.widthOrHeight] ?? this.$refs.scrollable[[this.m.offsetWidthOrHeight]]
89
- // if (widthOrHeight === undefined) widthOrHeight = this.$refs.scrollable.offsetWidthOrHeight
90
- return (widthOrHeight * 100 / this.$refs.scrollable?.[this.m.scrollWidthOrHeight]) || 0
87
+ const size = this[this.m.size] ?? this.$refs.scrollable[[this.m.offsetSize]]
88
+ // if (size === undefined) size = this.$refs.scrollable.offsetSize
89
+ return (size * 100 / this.$refs.scrollable?.[this.m.scrollSize]) || 0
91
90
  },
92
91
 
93
92
  scrollableStyles () {
94
93
  return {
95
- [this.m.maxWidthOrHeight]: `${this[this.m.widthOrHeight]}px`
94
+ [this.m.maxSize]: `${this[this.m.size]}px`
96
95
  }
97
96
  },
98
97
 
@@ -100,7 +99,7 @@ export default {
100
99
  let topOrLeftValue = this.scrollValuePercent
101
100
  topOrLeftValue = Math.max(0, Math.min(topOrLeftValue, 100 - this.thumbSizePercent))
102
101
  return {
103
- [this.m.widthOrHeight]: `${this.thumbSizePercent}%`,
102
+ [this.m.size]: `${this.thumbSizePercent}%`,
104
103
  [this.m.topOrLeft]: `${topOrLeftValue}%`
105
104
  }
106
105
  }
@@ -149,6 +148,9 @@ export default {
149
148
  this.scrollable.hovered = false
150
149
  },
151
150
 
151
+ onResize (e) {
152
+ },
153
+
152
154
  onMouseWheel (e) {
153
155
  if (!this.scrollable.hovered) return // Only scroll a w-scrollable element that is being hovered.
154
156
 
@@ -166,12 +168,12 @@ export default {
166
168
  computeScroll (cursorPositionXorY) {
167
169
  const { top, left, width, height } = this.$refs.scrollable.getBoundingClientRect()
168
170
  const topOrLeft = this.isHorizontal ? left : top
169
- const widthOrHeight = this.isHorizontal ? width : height
170
- this.scrollValuePercent = Math.max(0, Math.min(((cursorPositionXorY - topOrLeft) / widthOrHeight) * 100, 100))
171
+ const size = this.isHorizontal ? width : height
172
+ this.scrollValuePercent = Math.max(0, Math.min(((cursorPositionXorY - topOrLeft) / size) * 100, 100))
171
173
  },
172
174
 
173
175
  scroll () {
174
- this.$refs.scrollable[this.m.scrollTopOrLeft] = this.scrollValuePercent * this.$refs.scrollable?.[this.m.scrollWidthOrHeight] / 100
176
+ this.$refs.scrollable[this.m.scrollTopOrLeft] = this.scrollValuePercent * this.$refs.scrollable?.[this.m.scrollSize] / 100
175
177
  this.updateThumbPosition()
176
178
  },
177
179
 
@@ -187,7 +189,9 @@ export default {
187
189
  this.scrollable.left = left
188
190
 
189
191
  this.$el.parentNode.style.position = 'relative'
190
- this.$el.parentNode.style[this.m.maxWidthOrHeight] = `${this[this.m.widthOrHeight]}px`
192
+ this.$el.parentNode.style.padding = 0
193
+
194
+ window.addEventListener('resize', this.onResize)
191
195
  }
192
196
  }
193
197
  </script>
@@ -204,15 +208,11 @@ export default {
204
208
  user-select: none;
205
209
 
206
210
  &--horizontal {
207
- left: 0;
208
- right: 0;
209
- bottom: 0;
211
+ inset: auto 0 0;
210
212
  height: 8px;
211
213
  }
212
214
  &--vertical {
213
- top: 0;
214
- bottom: 0;
215
- right: 0;
215
+ inset: 0 0 0 auto;
216
216
  width: 8px;
217
217
  }
218
218
 
@@ -302,6 +302,7 @@ export default {
302
302
  top: 0;
303
303
  width: $base-increment;
304
304
  aspect-ratio: 1;
305
+ min-width: 0; // Safari ratio fix (e.g. losing ratio if height is set and side padding are added).
305
306
  background-color: $slider-step-label-bg-color;
306
307
  border-radius: 99em;
307
308
  // box-shadow: 0 0 0 1px #fff;
@@ -365,6 +366,7 @@ export default {
365
366
  position: absolute;
366
367
  width: 3 * $base-increment;
367
368
  aspect-ratio: 1;
369
+ min-width: 0; // Safari ratio fix (e.g. losing ratio if height is set and side padding are added).
368
370
  left: 100%;
369
371
  top: 50%;
370
372
  transform: translate(-50%, -50%);
@@ -380,6 +382,7 @@ export default {
380
382
  top: 0;
381
383
  width: 100%;
382
384
  aspect-ratio: 1;
385
+ min-width: 0; // Safari ratio fix (e.g. losing ratio if height is set and side padding are added).
383
386
  border: none;
384
387
  border-radius: 99em;
385
388
  cursor: pointer;
@@ -456,6 +459,7 @@ export default {
456
459
  border-radius: 99em 99em 99em 0;
457
460
  width: 2.8em;
458
461
  aspect-ratio: 1;
462
+ min-width: 0; // Safari ratio fix (e.g. losing ratio if height is set and side padding are added).
459
463
 
460
464
  & > div {
461
465
  position: absolute;
@@ -62,6 +62,7 @@ export default {
62
62
  font-size: 2rem;
63
63
  width: 1em;
64
64
  aspect-ratio: 1;
65
+ min-width: 0; // Safari ratio fix (e.g. losing ratio if height is set and side padding are added).
65
66
 
66
67
  &.size--xs {font-size: round(0.9 * divide($base-font-size, 2)) * 2;}
67
68
  &.size--sm {font-size: round(1.5 * $base-font-size);}
@@ -74,6 +75,7 @@ export default {
74
75
  position: absolute;
75
76
  width: 100%;
76
77
  aspect-ratio: 1;
78
+ min-width: 0; // Safari ratio fix (e.g. losing ratio if height is set and side padding are added).
77
79
  top: 0;
78
80
  left: 0;
79
81
  background-color: currentColor;
@@ -252,7 +252,7 @@ $outline-width: 2px;
252
252
 
253
253
  // The focus outline & ripple on switch activation.
254
254
  &__input:before {
255
- content: "";
255
+ content: '';
256
256
  position: absolute;
257
257
  left: 0;
258
258
  top: 0;