vue3-extended-multiselect 1.10.2 → 2.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/.browserslistrc +2 -2
- package/.eslintrc.js +35 -34
- package/.github/workflows/publish.yml +41 -41
- package/CHANGELOG.md +411 -389
- package/LICENSE +21 -21
- package/README.md +270 -270
- package/babel.config.js +9 -9
- package/index.js +2 -2
- package/jest.config.js +62 -62
- package/package.json +56 -46
- package/rollup.config.mjs +74 -0
- package/src/assets/{base-arrow.svg → images/base-arrow.svg} +70 -70
- package/src/assets/{cancel.svg → images/cancel.svg} +34 -34
- package/src/assets/{circle-arrow.svg → images/circle-arrow.svg} +7 -7
- package/src/assets/{double-arrow.svg → images/double-arrow.svg} +39 -39
- package/src/assets/{inner-arrow.svg → images/inner-arrow.svg} +8 -8
- package/src/assets/{loader.svg → images/loader.svg} +5 -5
- package/src/assets/{triangle-arrow.svg → images/triangle-arrow.svg} +72 -72
- package/src/assets/{triangle-circle-arrow.svg → images/triangle-circle-arrow.svg} +38 -38
- package/src/assets/{wide-arrow.svg → images/wide-arrow.svg} +72 -72
- package/src/components/ExtendedMultiselectCancel.vue +165 -165
- package/src/components/ExtendedMultiselectInput.vue +741 -741
- package/src/components/ExtendedMultiselectLoader.vue +182 -182
- package/src/components/ExtendedMultiselectMultiple.vue +399 -399
- package/src/components/ExtendedMultiselectOptions.vue +1190 -1190
- package/src/components/ExtendedMultiselectToggle.vue +271 -271
- package/src/components/Vue3ExtendedMultiselect.vue +2475 -1949
- package/src/composition/cancel.js +39 -39
- package/src/composition/click-outside.js +8 -8
- package/src/composition/debounce.js +8 -8
- package/src/composition/emitter.js +8 -8
- package/src/composition/image-path.js +16 -16
- package/src/composition/labels.js +41 -41
- package/src/composition/preselected-options.js +67 -67
- package/src/composition/search-value.js +33 -33
- package/src/composition/sizes.js +44 -44
- package/src/composition/toggle.js +31 -31
- package/src/sets/sets.js +99 -99
- package/src/styles/animations.css +18 -18
- package/src/styles/main.css +460 -460
- package/src/styles/variables.css +51 -51
- package/src/tools/Debounce.js +25 -25
- package/src/tools/LocalEmitter.js +31 -31
- package/src/tools/instance.js +2 -2
- package/tests/unit/events.spec.js +149 -149
- package/tests/unit/props.spec.js +1154 -1155
- package/tests/unit/tools.spec.js +55 -53
- package/tests/utils/mount.js +37 -37
- package/tests/utils/utils.js +24 -24
- package/typings/vue3-extended-multiselect.d.ts +43 -43
package/src/sets/sets.js
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Set of background- and border- style variants
|
|
3
|
-
* @constant {Array} themeTypes
|
|
4
|
-
*/
|
|
5
|
-
export const themeTypes = [
|
|
6
|
-
"basic",
|
|
7
|
-
"slate-grey",
|
|
8
|
-
"slate-blue",
|
|
9
|
-
"teal",
|
|
10
|
-
"strict"
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Set of color-style variants for loader
|
|
15
|
-
* @constant {Array} loaderThemeTypes
|
|
16
|
-
*/
|
|
17
|
-
export const loaderThemeTypes = [
|
|
18
|
-
"loader-default",
|
|
19
|
-
...themeTypes
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Set of icon filenames
|
|
24
|
-
* @constant {Array} toggleIcons
|
|
25
|
-
*/
|
|
26
|
-
export const toggleIcons = [
|
|
27
|
-
"base-arrow",
|
|
28
|
-
"double-arrow",
|
|
29
|
-
"wide-arrow",
|
|
30
|
-
"circle-arrow",
|
|
31
|
-
"inner-arrow",
|
|
32
|
-
"triangle-arrow",
|
|
33
|
-
"triangle-circle-arrow"
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Set of icon colors filtered by svg
|
|
38
|
-
* @constant {Array} iconFilters
|
|
39
|
-
*/
|
|
40
|
-
export const iconFilters = [
|
|
41
|
-
"basic",
|
|
42
|
-
"black",
|
|
43
|
-
"green"
|
|
44
|
-
];
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Set of icons sizes filtered by css
|
|
48
|
-
* @constant {Array} iconSizes
|
|
49
|
-
*/
|
|
50
|
-
export const iconSizes = [
|
|
51
|
-
"large",
|
|
52
|
-
"medium",
|
|
53
|
-
"small"
|
|
54
|
-
];
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Set of types for options created by user
|
|
58
|
-
* @constant {Array} createOptionTypes
|
|
59
|
-
*/
|
|
60
|
-
export const createOptionTypes = [
|
|
61
|
-
"primitive",
|
|
62
|
-
"array",
|
|
63
|
-
"object"
|
|
64
|
-
];
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Set of keys to combine with cliks on options list and blocking choice
|
|
68
|
-
* @constant {Array} specialKeysToBlock
|
|
69
|
-
*/
|
|
70
|
-
export const specialKeysToBlock = [
|
|
71
|
-
"alt",
|
|
72
|
-
"ctrl",
|
|
73
|
-
"shift"
|
|
74
|
-
];
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Set of appearance variants of options list
|
|
78
|
-
* @constant {Array} toggleAppearenceSides
|
|
79
|
-
*/
|
|
80
|
-
export const toggleAppearenceSides = [
|
|
81
|
-
"auto",
|
|
82
|
-
"atop",
|
|
83
|
-
"under"
|
|
84
|
-
];
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Set of available types for options
|
|
88
|
-
* @constant {Array} UnionPropType
|
|
89
|
-
* @typedef {(string|number|boolean|Array|Object|Function|null|undefined)} UnionPropType
|
|
90
|
-
*/
|
|
91
|
-
export const UnionPropType = [
|
|
92
|
-
String,
|
|
93
|
-
Number,
|
|
94
|
-
Boolean,
|
|
95
|
-
Array,
|
|
96
|
-
Object,
|
|
97
|
-
Function,
|
|
98
|
-
null,
|
|
99
|
-
undefined
|
|
1
|
+
/**
|
|
2
|
+
* Set of background- and border- style variants
|
|
3
|
+
* @constant {Array} themeTypes
|
|
4
|
+
*/
|
|
5
|
+
export const themeTypes = [
|
|
6
|
+
"basic",
|
|
7
|
+
"slate-grey",
|
|
8
|
+
"slate-blue",
|
|
9
|
+
"teal",
|
|
10
|
+
"strict"
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Set of color-style variants for loader
|
|
15
|
+
* @constant {Array} loaderThemeTypes
|
|
16
|
+
*/
|
|
17
|
+
export const loaderThemeTypes = [
|
|
18
|
+
"loader-default",
|
|
19
|
+
...themeTypes
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Set of icon filenames
|
|
24
|
+
* @constant {Array} toggleIcons
|
|
25
|
+
*/
|
|
26
|
+
export const toggleIcons = [
|
|
27
|
+
"base-arrow",
|
|
28
|
+
"double-arrow",
|
|
29
|
+
"wide-arrow",
|
|
30
|
+
"circle-arrow",
|
|
31
|
+
"inner-arrow",
|
|
32
|
+
"triangle-arrow",
|
|
33
|
+
"triangle-circle-arrow"
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Set of icon colors filtered by svg
|
|
38
|
+
* @constant {Array} iconFilters
|
|
39
|
+
*/
|
|
40
|
+
export const iconFilters = [
|
|
41
|
+
"basic",
|
|
42
|
+
"black",
|
|
43
|
+
"green"
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Set of icons sizes filtered by css
|
|
48
|
+
* @constant {Array} iconSizes
|
|
49
|
+
*/
|
|
50
|
+
export const iconSizes = [
|
|
51
|
+
"large",
|
|
52
|
+
"medium",
|
|
53
|
+
"small"
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Set of types for options created by user
|
|
58
|
+
* @constant {Array} createOptionTypes
|
|
59
|
+
*/
|
|
60
|
+
export const createOptionTypes = [
|
|
61
|
+
"primitive",
|
|
62
|
+
"array",
|
|
63
|
+
"object"
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Set of keys to combine with cliks on options list and blocking choice
|
|
68
|
+
* @constant {Array} specialKeysToBlock
|
|
69
|
+
*/
|
|
70
|
+
export const specialKeysToBlock = [
|
|
71
|
+
"alt",
|
|
72
|
+
"ctrl",
|
|
73
|
+
"shift"
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Set of appearance variants of options list
|
|
78
|
+
* @constant {Array} toggleAppearenceSides
|
|
79
|
+
*/
|
|
80
|
+
export const toggleAppearenceSides = [
|
|
81
|
+
"auto",
|
|
82
|
+
"atop",
|
|
83
|
+
"under"
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Set of available types for options
|
|
88
|
+
* @constant {Array} UnionPropType
|
|
89
|
+
* @typedef {(string|number|boolean|Array|Object|Function|null|undefined)} UnionPropType
|
|
90
|
+
*/
|
|
91
|
+
export const UnionPropType = [
|
|
92
|
+
String,
|
|
93
|
+
Number,
|
|
94
|
+
Boolean,
|
|
95
|
+
Array,
|
|
96
|
+
Object,
|
|
97
|
+
Function,
|
|
98
|
+
null,
|
|
99
|
+
undefined
|
|
100
100
|
];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
.extended-toggle-enter-active,
|
|
2
|
-
.extended-toggle-leave-active {
|
|
3
|
-
transition: opacity 250ms;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.extended-toggle-enter,
|
|
7
|
-
.extended-toggle-leave-to {
|
|
8
|
-
opacity: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@keyframes loading {
|
|
13
|
-
0% {
|
|
14
|
-
transform: rotate(0deg);
|
|
15
|
-
}
|
|
16
|
-
100% {
|
|
17
|
-
transform: rotate(2turn);
|
|
18
|
-
}
|
|
1
|
+
.extended-toggle-enter-active,
|
|
2
|
+
.extended-toggle-leave-active {
|
|
3
|
+
transition: opacity 250ms;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.extended-toggle-enter,
|
|
7
|
+
.extended-toggle-leave-to {
|
|
8
|
+
opacity: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@keyframes loading {
|
|
13
|
+
0% {
|
|
14
|
+
transform: rotate(0deg);
|
|
15
|
+
}
|
|
16
|
+
100% {
|
|
17
|
+
transform: rotate(2turn);
|
|
18
|
+
}
|
|
19
19
|
}
|