vue3-extended-multiselect 1.7.0 → 1.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.
Files changed (46) hide show
  1. package/.browserslistrc +2 -2
  2. package/.eslintrc.js +34 -34
  3. package/.github/workflows/publish.yml +41 -41
  4. package/CHANGELOG.md +284 -275
  5. package/LICENSE +21 -21
  6. package/README.md +267 -267
  7. package/babel.config.js +9 -9
  8. package/index.js +2 -2
  9. package/jest.config.js +61 -61
  10. package/package.json +46 -46
  11. package/src/assets/base-arrow.svg +70 -70
  12. package/src/assets/cancel.svg +34 -34
  13. package/src/assets/circle-arrow.svg +7 -7
  14. package/src/assets/double-arrow.svg +39 -39
  15. package/src/assets/inner-arrow.svg +8 -8
  16. package/src/assets/loader.svg +5 -5
  17. package/src/assets/triangle-arrow.svg +72 -72
  18. package/src/assets/triangle-circle-arrow.svg +38 -38
  19. package/src/assets/wide-arrow.svg +72 -72
  20. package/src/components/ExtendedMultiselectCancel.vue +165 -165
  21. package/src/components/ExtendedMultiselectInput.vue +705 -705
  22. package/src/components/ExtendedMultiselectLoader.vue +182 -182
  23. package/src/components/ExtendedMultiselectMultiple.vue +365 -365
  24. package/src/components/ExtendedMultiselectOptions.vue +1168 -1168
  25. package/src/components/ExtendedMultiselectToggle.vue +271 -271
  26. package/src/components/Vue3ExtendedMultiselect.vue +1803 -1783
  27. package/src/composition/cancel.js +36 -36
  28. package/src/composition/click-outside.js +8 -8
  29. package/src/composition/emitter.js +8 -8
  30. package/src/composition/image-path.js +16 -16
  31. package/src/composition/labels.js +41 -41
  32. package/src/composition/preselected-options.js +67 -67
  33. package/src/composition/search-value.js +33 -33
  34. package/src/composition/sizes.js +44 -44
  35. package/src/composition/toggle.js +31 -31
  36. package/src/events/LocalEmitter.js +31 -31
  37. package/src/events/instance.js +3 -0
  38. package/src/sets/sets.js +99 -99
  39. package/src/styles/animations.css +18 -18
  40. package/src/styles/main.css +454 -454
  41. package/src/styles/variables.css +49 -49
  42. package/tests/unit/events.spec.js +136 -136
  43. package/tests/unit/props.spec.js +1128 -1128
  44. package/tests/utils/mount.js +37 -37
  45. package/tests/utils/utils.js +20 -20
  46. package/typings/vue3-extended-multiselect.d.ts +43 -43
@@ -1,182 +1,182 @@
1
- <template>
2
- <div class="extended__multiselect-loader">
3
- <img
4
- alt=""
5
- :class="[iconFilterClass, iconSizeClass, 'extended__multiselect-loader-animate']"
6
- :src="loaderIcon"
7
- />
8
- <svg
9
- version="1.1"
10
- xmlns="http://www.w3.org/2000/svg"
11
- xmlns:xlink="http://www.w3.org/1999/xlink"
12
- width="0"
13
- height="0"
14
- >
15
- <defs>
16
- <filter
17
- x="0"
18
- y="0"
19
- width="1"
20
- height="1"
21
- id="filterLoaderDefault"
22
- >
23
- <feFlood flood-color="#00BFFF"/>
24
- <feComposite
25
- out="SourceGraphic"
26
- in2="SourceGraphic"
27
- operator="in"
28
- />
29
- </filter>
30
- <filter
31
- x="0"
32
- y="0"
33
- width="1"
34
- height="1"
35
- id="filterLoaderBasic"
36
- >
37
- <feFlood flood-color="#708090"/>
38
- <feComposite
39
- out="SourceGraphic"
40
- in2="SourceGraphic"
41
- operator="in"
42
- />
43
- </filter>
44
- <filter
45
- x="0"
46
- y="0"
47
- width="1"
48
- height="1"
49
- id="filterLoaderSlateGrey"
50
- >
51
- <feFlood flood-color="#2F4F4F"/>
52
- <feComposite
53
- out="SourceGraphic"
54
- in2="SourceGraphic"
55
- operator="in"
56
- />
57
- </filter>
58
- <filter
59
- x="0"
60
- y="0"
61
- width="1"
62
- height="1"
63
- id="filterLoaderSlateBlue"
64
- >
65
- <feFlood flood-color="#483D8B"/>
66
- <feComposite
67
- out="SourceGraphic"
68
- in2="SourceGraphic"
69
- operator="in"
70
- />
71
- </filter>
72
- <filter
73
- x="0"
74
- y="0"
75
- width="1"
76
- height="1"
77
- id="filterLoaderTeal"
78
- >
79
- <feFlood flood-color="#008080"/>
80
- <feComposite
81
- out="SourceGraphic"
82
- in2="SourceGraphic"
83
- operator="in"
84
- />
85
- </filter>
86
- <filter
87
- x="0"
88
- y="0"
89
- width="1"
90
- height="1"
91
- id="filterLoaderStrict"
92
- >
93
- <feFlood flood-color="#00BFFF"/>
94
- <feComposite
95
- out="SourceGraphic"
96
- in2="SourceGraphic"
97
- operator="in"
98
- />
99
- </filter>
100
- </defs>
101
- </svg>
102
- </div>
103
- </template>
104
-
105
- <script setup>
106
- import {
107
- computed,
108
- defineProps,
109
- inject,
110
- ref,
111
- toRefs,
112
- } from "vue";
113
-
114
- import useImagePath from "../composition/image-path";
115
- import useSizes from "../composition/sizes";
116
-
117
- const props = defineProps({
118
- /**
119
- * Defines svg-filter for loader icon
120
- * @property {string} iconFilter
121
- */
122
- iconFilter: {
123
- type: String,
124
- required: true,
125
- },
126
-
127
- /**
128
- * Provides size to create special size-class
129
- * for each kind of icon
130
- * @property {string} iconSize
131
- */
132
- iconSize: {
133
- type: String,
134
- required: true,
135
- },
136
- });
137
-
138
- const loaderIconFilter = inject("loaderIconFilter");
139
-
140
- const { iconSize } = toRefs(props);
141
-
142
- const { createImagePath } = useImagePath();
143
-
144
- const loaderIcon = ref(createImagePath("loader.svg"));
145
-
146
- const { iconSizeClass } = useSizes(iconSize);
147
-
148
- /**
149
- * Defines class for loader icon
150
- * depends on injected filter name
151
- * @function
152
- * @returns {string} class
153
- */
154
- const iconFilterClass = computed(() => {
155
- let basicFilter = "extended__multiselect-loader";
156
-
157
- switch(loaderIconFilter) {
158
- case "default-loader":
159
- basicFilter = `${basicFilter}_default-loader`;
160
- break;
161
- case "basic":
162
- basicFilter = `${basicFilter}_basic`;
163
- break;
164
- case "slate-grey":
165
- basicFilter = `${basicFilter}_slate-grey`;
166
- break;
167
- case "slate-blue":
168
- basicFilter = `${basicFilter}_slate-blue`;
169
- break;
170
- case "teal":
171
- basicFilter = `${basicFilter}_teal`;
172
- break;
173
- case "strict":
174
- basicFilter = `${basicFilter}_strict`;
175
- break;
176
- default:
177
- basicFilter = `${basicFilter}_default-loader`;
178
- }
179
-
180
- return basicFilter;
181
- });
182
- </script>
1
+ <template>
2
+ <div class="extended__multiselect-loader">
3
+ <img
4
+ alt=""
5
+ :class="[iconFilterClass, iconSizeClass, 'extended__multiselect-loader-animate']"
6
+ :src="loaderIcon"
7
+ />
8
+ <svg
9
+ version="1.1"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ xmlns:xlink="http://www.w3.org/1999/xlink"
12
+ width="0"
13
+ height="0"
14
+ >
15
+ <defs>
16
+ <filter
17
+ x="0"
18
+ y="0"
19
+ width="1"
20
+ height="1"
21
+ id="filterLoaderDefault"
22
+ >
23
+ <feFlood flood-color="#00BFFF"/>
24
+ <feComposite
25
+ out="SourceGraphic"
26
+ in2="SourceGraphic"
27
+ operator="in"
28
+ />
29
+ </filter>
30
+ <filter
31
+ x="0"
32
+ y="0"
33
+ width="1"
34
+ height="1"
35
+ id="filterLoaderBasic"
36
+ >
37
+ <feFlood flood-color="#708090"/>
38
+ <feComposite
39
+ out="SourceGraphic"
40
+ in2="SourceGraphic"
41
+ operator="in"
42
+ />
43
+ </filter>
44
+ <filter
45
+ x="0"
46
+ y="0"
47
+ width="1"
48
+ height="1"
49
+ id="filterLoaderSlateGrey"
50
+ >
51
+ <feFlood flood-color="#2F4F4F"/>
52
+ <feComposite
53
+ out="SourceGraphic"
54
+ in2="SourceGraphic"
55
+ operator="in"
56
+ />
57
+ </filter>
58
+ <filter
59
+ x="0"
60
+ y="0"
61
+ width="1"
62
+ height="1"
63
+ id="filterLoaderSlateBlue"
64
+ >
65
+ <feFlood flood-color="#483D8B"/>
66
+ <feComposite
67
+ out="SourceGraphic"
68
+ in2="SourceGraphic"
69
+ operator="in"
70
+ />
71
+ </filter>
72
+ <filter
73
+ x="0"
74
+ y="0"
75
+ width="1"
76
+ height="1"
77
+ id="filterLoaderTeal"
78
+ >
79
+ <feFlood flood-color="#008080"/>
80
+ <feComposite
81
+ out="SourceGraphic"
82
+ in2="SourceGraphic"
83
+ operator="in"
84
+ />
85
+ </filter>
86
+ <filter
87
+ x="0"
88
+ y="0"
89
+ width="1"
90
+ height="1"
91
+ id="filterLoaderStrict"
92
+ >
93
+ <feFlood flood-color="#00BFFF"/>
94
+ <feComposite
95
+ out="SourceGraphic"
96
+ in2="SourceGraphic"
97
+ operator="in"
98
+ />
99
+ </filter>
100
+ </defs>
101
+ </svg>
102
+ </div>
103
+ </template>
104
+
105
+ <script setup>
106
+ import {
107
+ computed,
108
+ defineProps,
109
+ inject,
110
+ ref,
111
+ toRefs,
112
+ } from "vue";
113
+
114
+ import useImagePath from "../composition/image-path";
115
+ import useSizes from "../composition/sizes";
116
+
117
+ const props = defineProps({
118
+ /**
119
+ * Defines svg-filter for loader icon
120
+ * @property {string} iconFilter
121
+ */
122
+ iconFilter: {
123
+ type: String,
124
+ required: true,
125
+ },
126
+
127
+ /**
128
+ * Provides size to create special size-class
129
+ * for each kind of icon
130
+ * @property {string} iconSize
131
+ */
132
+ iconSize: {
133
+ type: String,
134
+ required: true,
135
+ },
136
+ });
137
+
138
+ const loaderIconFilter = inject("loaderIconFilter");
139
+
140
+ const { iconSize } = toRefs(props);
141
+
142
+ const { createImagePath } = useImagePath();
143
+
144
+ const loaderIcon = ref(createImagePath("loader.svg"));
145
+
146
+ const { iconSizeClass } = useSizes(iconSize);
147
+
148
+ /**
149
+ * Defines class for loader icon
150
+ * depends on injected filter name
151
+ * @function
152
+ * @returns {string} class
153
+ */
154
+ const iconFilterClass = computed(() => {
155
+ let basicFilter = "extended__multiselect-loader";
156
+
157
+ switch(loaderIconFilter) {
158
+ case "default-loader":
159
+ basicFilter = `${basicFilter}_default-loader`;
160
+ break;
161
+ case "basic":
162
+ basicFilter = `${basicFilter}_basic`;
163
+ break;
164
+ case "slate-grey":
165
+ basicFilter = `${basicFilter}_slate-grey`;
166
+ break;
167
+ case "slate-blue":
168
+ basicFilter = `${basicFilter}_slate-blue`;
169
+ break;
170
+ case "teal":
171
+ basicFilter = `${basicFilter}_teal`;
172
+ break;
173
+ case "strict":
174
+ basicFilter = `${basicFilter}_strict`;
175
+ break;
176
+ default:
177
+ basicFilter = `${basicFilter}_default-loader`;
178
+ }
179
+
180
+ return basicFilter;
181
+ });
182
+ </script>