vue3-extended-multiselect 1.4.1 → 1.4.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 (45) hide show
  1. package/.browserslistrc +3 -3
  2. package/.eslintrc.js +34 -34
  3. package/.github/workflows/publish.yml +41 -41
  4. package/.nvmrc +0 -0
  5. package/CHANGELOG.md +185 -181
  6. package/LICENSE +21 -21
  7. package/README.md +266 -266
  8. package/babel.config.js +5 -5
  9. package/index.js +2 -2
  10. package/jest.config.js +61 -61
  11. package/package.json +47 -47
  12. package/src/assets/base-arrow.svg +70 -70
  13. package/src/assets/cancel.svg +34 -34
  14. package/src/assets/circle-arrow.svg +7 -7
  15. package/src/assets/double-arrow.svg +39 -39
  16. package/src/assets/inner-arrow.svg +8 -8
  17. package/src/assets/loader.svg +5 -5
  18. package/src/assets/triangle-arrow.svg +72 -72
  19. package/src/assets/triangle-circle-arrow.svg +38 -38
  20. package/src/assets/wide-arrow.svg +72 -72
  21. package/src/components/ExtendedMultiselectCancel.vue +166 -166
  22. package/src/components/ExtendedMultiselectInput.vue +687 -687
  23. package/src/components/ExtendedMultiselectLoader.vue +182 -182
  24. package/src/components/ExtendedMultiselectMultiple.vue +320 -320
  25. package/src/components/ExtendedMultiselectOptions.vue +1144 -1144
  26. package/src/components/ExtendedMultiselectToggle.vue +273 -273
  27. package/src/components/Vue3ExtendedMultiselect.vue +1752 -1752
  28. package/src/composition/cancel.js +38 -38
  29. package/src/composition/image-path.js +16 -16
  30. package/src/composition/labels.js +41 -41
  31. package/src/composition/preselected-options.js +67 -67
  32. package/src/composition/search-value.js +33 -33
  33. package/src/composition/sizes.js +42 -42
  34. package/src/composition/toggle.js +33 -33
  35. package/src/events/LocalEmitter.js +31 -31
  36. package/src/events/emitter.js +2 -2
  37. package/src/sets/sets.js +99 -99
  38. package/src/styles/animations.css +18 -18
  39. package/src/styles/main.css +441 -441
  40. package/src/styles/variables.css +49 -49
  41. package/tests/unit/events.spec.js +138 -138
  42. package/tests/unit/props.spec.js +1099 -1099
  43. package/tests/utils/mount.js +37 -37
  44. package/tests/utils/utils.js +20 -20
  45. 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>