wave-ui 3.4.3 → 3.4.5
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 +78 -65
- package/dist/wave-ui.umd.js +1 -1
- package/package.json +15 -15
- package/src/wave-ui/components/w-select.vue +20 -10
- package/src/wave-ui/components/w-table.vue +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-ui",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.5",
|
|
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",
|
|
@@ -47,35 +47,35 @@
|
|
|
47
47
|
"build-bundle": "BUNDLE=true vite build && mv ./dist/style.css ./dist/wave-ui.css",
|
|
48
48
|
"serve": "vite preview --base /wave-ui/",
|
|
49
49
|
"lint": "vite lint",
|
|
50
|
-
"publish": "npm run build && npm run build-bundle && git add . && git commit -m 'Publish documentation on Github.' && git push && git push
|
|
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.
|
|
53
|
+
"@babel/core": "^7.22.10",
|
|
54
|
+
"@babel/eslint-parser": "^7.22.10",
|
|
55
55
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
56
56
|
"@faker-js/faker": "^7.6.0",
|
|
57
57
|
"@mdi/font": "^5.9.55",
|
|
58
58
|
"@vitejs/plugin-vue": "^3.2.0",
|
|
59
59
|
"@vue/compiler-sfc": "3.2.45",
|
|
60
|
-
"autoprefixer": "^10.4.
|
|
61
|
-
"axios": "^1.
|
|
62
|
-
"eslint": "^8.
|
|
63
|
-
"eslint-plugin-vue": "^9.
|
|
60
|
+
"autoprefixer": "^10.4.15",
|
|
61
|
+
"axios": "^1.4.0",
|
|
62
|
+
"eslint": "^8.47.0",
|
|
63
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
64
64
|
"font-awesome": "^4.7.0",
|
|
65
|
-
"gsap": "^3.
|
|
65
|
+
"gsap": "^3.12.2",
|
|
66
66
|
"ionicons": "^4.6.3",
|
|
67
67
|
"material-design-icons": "^3.0.1",
|
|
68
|
-
"postcss": "^8.4.
|
|
68
|
+
"postcss": "^8.4.27",
|
|
69
69
|
"pug": "^3.0.2",
|
|
70
70
|
"rollup-plugin-delete": "^2.0.0",
|
|
71
|
-
"sass": "^1.
|
|
71
|
+
"sass": "^1.65.1",
|
|
72
72
|
"simple-syntax-highlighter": "^2.2.5",
|
|
73
73
|
"splitpanes": "^3.1.5",
|
|
74
|
-
"standard": "^17.
|
|
75
|
-
"vite": "^3.2.
|
|
74
|
+
"standard": "^17.1.0",
|
|
75
|
+
"vite": "^3.2.7",
|
|
76
76
|
"vite-svg-loader": "^4.0.0",
|
|
77
|
-
"vue": "^3.
|
|
78
|
-
"vue-router": "^4.
|
|
77
|
+
"vue": "^3.3.4",
|
|
78
|
+
"vue-router": "^4.2.4",
|
|
79
79
|
"vueperslides": "^3.5.1",
|
|
80
80
|
"vuex": "^4.1.0"
|
|
81
81
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
component(
|
|
3
3
|
ref="formEl"
|
|
4
4
|
:is="formRegister ? 'w-form-element' : 'div'"
|
|
5
|
-
v-bind="formRegister && { validators, inputValue: selectionString, disabled: isDisabled, readonly: isReadonly }"
|
|
5
|
+
v-bind="formRegister && { validators, inputValue: selectionString, disabled: isDisabled, readonly: isReadonly, isFocused }"
|
|
6
6
|
v-model:valid="valid"
|
|
7
7
|
@reset="onReset"
|
|
8
8
|
:wrap="hasLabel && labelPosition !== 'inside'"
|
|
@@ -16,6 +16,7 @@ component(
|
|
|
16
16
|
|
|
17
17
|
w-menu(
|
|
18
18
|
v-model="showMenu"
|
|
19
|
+
@close="!$event && closeMenu()"
|
|
19
20
|
:menu-class="`w-select__menu ${menuClass || ''}`"
|
|
20
21
|
transition="slide-fade-down"
|
|
21
22
|
:append-to="(menuProps || {}).appendTo !== undefined ? (menuProps || {}).appendTo : undefined"
|
|
@@ -26,7 +27,7 @@ component(
|
|
|
26
27
|
template(#activator="{ on }")
|
|
27
28
|
//- Input wrapper.
|
|
28
29
|
.w-select__selection-wrap(
|
|
29
|
-
@click="!isDisabled && !isReadonly && (
|
|
30
|
+
@click="!isDisabled && !isReadonly && onInputFieldClick()"
|
|
30
31
|
role="button"
|
|
31
32
|
aria-haspopup="listbox"
|
|
32
33
|
:aria-expanded="showMenu ? 'true' : 'false'"
|
|
@@ -76,8 +77,8 @@ component(
|
|
|
76
77
|
@update:model-value="onInput"
|
|
77
78
|
@item-click="$emit('item-click', $event)"
|
|
78
79
|
@item-select="onListItemSelect"
|
|
79
|
-
@keydown:enter="noUnselect && !multiple && closeMenu()"
|
|
80
|
-
@keydown:escape="closeMenu"
|
|
80
|
+
@keydown:enter="noUnselect && !multiple && closeMenu('la3')"
|
|
81
|
+
@keydown:escape="showMenu && (this.showMenu = false) /* Will call closeMenu() from w-menu(@close). */"
|
|
81
82
|
:items="selectItems"
|
|
82
83
|
:multiple="multiple"
|
|
83
84
|
arrows-navigation
|
|
@@ -228,12 +229,18 @@ export default {
|
|
|
228
229
|
|
|
229
230
|
methods: {
|
|
230
231
|
onFocus (e) {
|
|
232
|
+
if (this.isFocused) return
|
|
233
|
+
|
|
231
234
|
this.isFocused = true
|
|
232
235
|
this.$emit('focus', e)
|
|
233
236
|
return false
|
|
234
237
|
},
|
|
235
238
|
|
|
236
239
|
onBlur (e) {
|
|
240
|
+
// As long as the menu is open the focus is still on.
|
|
241
|
+
// When closing the menu, the focus is given back to the input (not blur yet).
|
|
242
|
+
if (this.showMenu) return
|
|
243
|
+
|
|
237
244
|
this.isFocused = false
|
|
238
245
|
this.$emit('blur', e)
|
|
239
246
|
},
|
|
@@ -242,11 +249,10 @@ export default {
|
|
|
242
249
|
// Forbid typing in contenteditable element.
|
|
243
250
|
// Note: using contenteditable rather than input in order to be able to fit the select list
|
|
244
251
|
// to its content with CSS. Only contenteditable divs/non-interactive elements can react to focus/blur ).
|
|
245
|
-
|
|
252
|
+
// still allow meta key & ctrl key combinations and the tab key (9).
|
|
253
|
+
if (!e.metaKey && !e.ctrlKey && e.keyCode !== 9) e.preventDefault()
|
|
246
254
|
|
|
247
|
-
if (
|
|
248
|
-
|
|
249
|
-
if (e.keyCode === 27) this.closeMenu() // Escape.
|
|
255
|
+
if (e.keyCode === 27 && this.showMenu) this.closeMenu('la5') // Escape.
|
|
250
256
|
else if (e.keyCode === 13) this.openMenu() // Enter.
|
|
251
257
|
|
|
252
258
|
// Up & down arrows.
|
|
@@ -285,12 +291,16 @@ export default {
|
|
|
285
291
|
this.$emit('update:modelValue', selection)
|
|
286
292
|
this.$emit('input', selection)
|
|
287
293
|
},
|
|
294
|
+
onInputFieldClick () {
|
|
295
|
+
if (this.showMenu) this.showMenu = false // Will call `closeMenu()` from w-menu(@close).
|
|
296
|
+
else this.openMenu()
|
|
297
|
+
},
|
|
288
298
|
|
|
289
299
|
// Called on item selection: on click & `enter` keydown.
|
|
290
300
|
onListItemSelect (e) {
|
|
291
301
|
this.$emit('item-select', e)
|
|
292
302
|
// Close menu after selection on single select, but keep open if multiple.
|
|
293
|
-
if (!this.multiple) this.closeMenu()
|
|
303
|
+
if (!this.multiple) this.showMenu = false // Will call `closeMenu()` from w-menu(@close).
|
|
294
304
|
},
|
|
295
305
|
|
|
296
306
|
onReset () {
|
|
@@ -333,7 +343,7 @@ export default {
|
|
|
333
343
|
|
|
334
344
|
// Close the dropdown selection list.
|
|
335
345
|
closeMenu () {
|
|
336
|
-
if (
|
|
346
|
+
if (this.menuProps?.hideOnMenuClick === false) return
|
|
337
347
|
|
|
338
348
|
this.showMenu = false
|
|
339
349
|
// Set the focus back on the main w-select input.
|
|
@@ -285,7 +285,14 @@ export default {
|
|
|
285
285
|
columnEl: null,
|
|
286
286
|
nextColumnEl: null
|
|
287
287
|
},
|
|
288
|
-
paginationConfig: {
|
|
288
|
+
paginationConfig: {
|
|
289
|
+
itemsPerPage: 0,
|
|
290
|
+
itemsPerPageOptions: {},
|
|
291
|
+
start: undefined,
|
|
292
|
+
end: undefined,
|
|
293
|
+
page: 1,
|
|
294
|
+
total: 0
|
|
295
|
+
}
|
|
289
296
|
}),
|
|
290
297
|
|
|
291
298
|
computed: {
|
|
@@ -925,6 +932,8 @@ $tr-border-top: 1px;
|
|
|
925
932
|
.pages-wrap {
|
|
926
933
|
margin-left: 3 * $base-increment;
|
|
927
934
|
margin-right: 3 * $base-increment;
|
|
935
|
+
padding-left: 1px; // Prevent overflow causing scrollbar.
|
|
936
|
+
padding-right: 1px;
|
|
928
937
|
overflow: auto;
|
|
929
938
|
max-height: 4.5em;
|
|
930
939
|
}
|
|
@@ -961,6 +970,8 @@ $tr-border-top: 1px;
|
|
|
961
970
|
margin-left: $base-increment;
|
|
962
971
|
margin-right: $base-increment;
|
|
963
972
|
white-space: nowrap;
|
|
973
|
+
min-width: 90px;
|
|
974
|
+
text-align: right;
|
|
964
975
|
}
|
|
965
976
|
}
|
|
966
977
|
}
|