wave-ui 3.7.1 → 3.7.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/dist/wave-ui.cjs.js +1 -1
- package/dist/wave-ui.css +1 -1
- package/dist/wave-ui.es.js +244 -236
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +12 -13
- package/src/wave-ui/components/w-list.vue +2 -2
- package/src/wave-ui/components/w-select.vue +25 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-ui",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.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,32 +50,31 @@
|
|
|
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.
|
|
54
|
-
"@babel/eslint-parser": "^7.22.
|
|
55
|
-
"@
|
|
56
|
-
"@faker-js/faker": "^7.6.0",
|
|
53
|
+
"@babel/core": "^7.23.0",
|
|
54
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
55
|
+
"@faker-js/faker": "^8.1.0",
|
|
57
56
|
"@mdi/font": "^6.9.96",
|
|
58
57
|
"@vitejs/plugin-vue": "^3.2.0",
|
|
59
|
-
"@vue/compiler-sfc": "3.
|
|
60
|
-
"autoprefixer": "^10.4.
|
|
61
|
-
"axios": "^1.
|
|
62
|
-
"eslint": "^8.
|
|
58
|
+
"@vue/compiler-sfc": "3.3.4",
|
|
59
|
+
"autoprefixer": "^10.4.16",
|
|
60
|
+
"axios": "^1.5.1",
|
|
61
|
+
"eslint": "^8.51.0",
|
|
63
62
|
"eslint-plugin-vue": "^9.17.0",
|
|
64
63
|
"font-awesome": "^4.7.0",
|
|
65
64
|
"gsap": "^3.12.2",
|
|
66
65
|
"ionicons": "^4.6.3",
|
|
67
66
|
"material-design-icons": "^3.0.1",
|
|
68
|
-
"postcss": "^8.4.
|
|
67
|
+
"postcss": "^8.4.31",
|
|
69
68
|
"pug": "^3.0.2",
|
|
70
69
|
"rollup-plugin-delete": "^2.0.0",
|
|
71
|
-
"sass": "^1.
|
|
72
|
-
"simple-syntax-highlighter": "^
|
|
70
|
+
"sass": "^1.69.0",
|
|
71
|
+
"simple-syntax-highlighter": "^3.0.2",
|
|
73
72
|
"splitpanes": "^3.1.5",
|
|
74
73
|
"standard": "^17.1.0",
|
|
75
74
|
"vite": "^3.2.7",
|
|
76
75
|
"vite-svg-loader": "^4.0.0",
|
|
77
76
|
"vue": "^3.3.4",
|
|
78
|
-
"vue-router": "^4.2.
|
|
77
|
+
"vue-router": "^4.2.5",
|
|
79
78
|
"vueperslides": "^3.5.1",
|
|
80
79
|
"vuex": "^4.1.0"
|
|
81
80
|
},
|
|
@@ -160,8 +160,8 @@ export default {
|
|
|
160
160
|
'w-list__item-label--focused': item._focused,
|
|
161
161
|
'w-list__item-label--hoverable': this.hover,
|
|
162
162
|
'w-list__item-label--selectable': this.isSelectable,
|
|
163
|
-
[item.
|
|
164
|
-
[this.SelectionColor]: item._selected && !item.
|
|
163
|
+
[item[this.itemColorKey]]: !!item[this.itemColorKey],
|
|
164
|
+
[this.SelectionColor]: item._selected && !item[this.itemColorKey] && this.SelectionColor,
|
|
165
165
|
[item[this.itemClassKey] || this.itemClass]: item[this.itemClassKey] || this.itemClass
|
|
166
166
|
}
|
|
167
167
|
},
|
|
@@ -10,7 +10,7 @@ component(
|
|
|
10
10
|
template(v-if="labelPosition === 'left'")
|
|
11
11
|
label.w-select__label.w-select__label--left.w-form-el-shakable(
|
|
12
12
|
v-if="$slots.default || label"
|
|
13
|
-
|
|
13
|
+
@click="$refs['selection-input'].click()"
|
|
14
14
|
:class="labelClasses")
|
|
15
15
|
slot {{ label }}
|
|
16
16
|
|
|
@@ -27,7 +27,6 @@ component(
|
|
|
27
27
|
template(#activator="{ on }")
|
|
28
28
|
//- Input wrapper.
|
|
29
29
|
.w-select__selection-wrap(
|
|
30
|
-
v-on="on"
|
|
31
30
|
@click="!isDisabled && !isReadonly && onInputFieldClick()"
|
|
32
31
|
role="button"
|
|
33
32
|
aria-haspopup="listbox"
|
|
@@ -48,7 +47,6 @@ component(
|
|
|
48
47
|
@focus="!isDisabled && !isReadonly && onFocus($event)"
|
|
49
48
|
@blur="onBlur"
|
|
50
49
|
@keydown="!isDisabled && !isReadonly && onKeydown($event)"
|
|
51
|
-
:id="`w-select--${_.uid}`"
|
|
52
50
|
:class="{ 'w-select__selection--placeholder': !$slots.selection && !selectionString && placeholder }"
|
|
53
51
|
:disabled="isDisabled || null"
|
|
54
52
|
readonly
|
|
@@ -65,7 +63,6 @@ component(
|
|
|
65
63
|
template(v-if="labelPosition === 'inside' && showLabelInside")
|
|
66
64
|
label.w-select__label.w-select__label--inside.w-form-el-shakable(
|
|
67
65
|
v-if="$slots.default || label"
|
|
68
|
-
:for="`w-select--${_.uid}`"
|
|
69
66
|
:class="labelClasses")
|
|
70
67
|
slot {{ label }}
|
|
71
68
|
w-icon.w-select__icon.w-select__icon--inner-right(
|
|
@@ -103,7 +100,7 @@ component(
|
|
|
103
100
|
template(v-if="labelPosition === 'right'")
|
|
104
101
|
label.w-select__label.w-select__label--right.w-form-el-shakable(
|
|
105
102
|
v-if="$slots.default || label"
|
|
106
|
-
|
|
103
|
+
@click="$refs['selection-input'].click()"
|
|
107
104
|
:class="labelClasses")
|
|
108
105
|
slot {{ label }}
|
|
109
106
|
</template>
|
|
@@ -274,7 +271,25 @@ export default {
|
|
|
274
271
|
index = (index + items.length + direction) % items.length
|
|
275
272
|
}
|
|
276
273
|
|
|
277
|
-
|
|
274
|
+
// If the current item is disabled, find the next one enabled (forward or backward).
|
|
275
|
+
let allItemsAreDisabled = false
|
|
276
|
+
if (items[index].disabled) {
|
|
277
|
+
const direction = e.keyCode === 38 ? -1 : 1 // Prev or next.
|
|
278
|
+
|
|
279
|
+
// Modulo to prevent out of range; + items.length to also work with negative values.
|
|
280
|
+
let newIndex = (index + direction + items.length) % items.length
|
|
281
|
+
const itemsCount = items.length
|
|
282
|
+
let loop = 0 // While-safety: will always end at least after 1 full array cycle.
|
|
283
|
+
while (loop < itemsCount && items[newIndex].disabled) {
|
|
284
|
+
// Circle through the array of items forward or backward, and reloop when out of range.
|
|
285
|
+
newIndex = (newIndex + items.length + direction) % items.length
|
|
286
|
+
loop++
|
|
287
|
+
}
|
|
288
|
+
if (loop >= itemsCount) allItemsAreDisabled = true
|
|
289
|
+
index = newIndex
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
if (!allItemsAreDisabled) this.onInput(items[index])
|
|
278
293
|
}
|
|
279
294
|
}
|
|
280
295
|
},
|
|
@@ -512,8 +527,8 @@ export default {
|
|
|
512
527
|
-webkit-tap-highlight-color: transparent;
|
|
513
528
|
}
|
|
514
529
|
|
|
515
|
-
&--inner-left {left:
|
|
516
|
-
&--inner-right {right:
|
|
530
|
+
&--inner-left {left: $base-increment;}
|
|
531
|
+
&--inner-right {right: $base-increment;}
|
|
517
532
|
.w-select--no-padding &--inner-left {left: 1px;}
|
|
518
533
|
.w-select--no-padding &--inner-right {right: 1px;}
|
|
519
534
|
|
|
@@ -558,7 +573,7 @@ export default {
|
|
|
558
573
|
transform: translateY(-50%);
|
|
559
574
|
pointer-events: none;
|
|
560
575
|
|
|
561
|
-
.w-select--inner-icon-right & {padding-right:
|
|
576
|
+
.w-select--inner-icon-right & {padding-right: 26px;}
|
|
562
577
|
|
|
563
578
|
.w-select--no-padding & {
|
|
564
579
|
left: 0;
|
|
@@ -575,8 +590,7 @@ export default {
|
|
|
575
590
|
transition: $transition-duration ease;
|
|
576
591
|
}
|
|
577
592
|
|
|
578
|
-
//
|
|
579
|
-
.w-select--focused.w-select--floating-label &,
|
|
593
|
+
// Move label with underline style.
|
|
580
594
|
.w-select--open.w-select--floating-label &,
|
|
581
595
|
.w-select--filled.w-select--floating-label &,
|
|
582
596
|
.w-select--has-placeholder.w-select--floating-label & {
|
|
@@ -587,13 +601,11 @@ export default {
|
|
|
587
601
|
transform: translateY(-160%) scale(0.85);
|
|
588
602
|
}
|
|
589
603
|
// Move label with outline style or with shadow.
|
|
590
|
-
.w-select--focused.w-select--floating-label .w-select__selection-wrap--box &,
|
|
591
604
|
.w-select--open.w-select--floating-label .w-select__selection-wrap--box &,
|
|
592
605
|
.w-select--filled.w-select--floating-label .w-select__selection-wrap--box &,
|
|
593
606
|
.w-select--has-placeholder.w-select--floating-label .w-select__selection-wrap--box & {
|
|
594
607
|
transform: translateY(-180%) scale(0.85);
|
|
595
608
|
}
|
|
596
|
-
.w-select--focused.w-select--floating-label.w-select--inner-icon-left &,
|
|
597
609
|
.w-select--open.w-select--floating-label.w-select--inner-icon-left &,
|
|
598
610
|
.w-select--filled.w-select--floating-label.w-select--inner-icon-left & {left: 0;}
|
|
599
611
|
// Chrome & Safari - Must remain in a separated rule as Firefox discard the whole rule seeing -webkit-.
|