vue3-extended-multiselect 1.0.0 → 1.1.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 (41) hide show
  1. package/.eslintrc.js +34 -34
  2. package/.github/workflows/publish.yml +41 -41
  3. package/CHANGELOG.md +109 -91
  4. package/LICENSE +21 -21
  5. package/README.md +261 -261
  6. package/index.js +2 -2
  7. package/jest.config.js +60 -57
  8. package/package.json +47 -47
  9. package/src/assets/base-arrow.svg +70 -70
  10. package/src/assets/cancel.svg +34 -34
  11. package/src/assets/circle-arrow.svg +7 -7
  12. package/src/assets/double-arrow.svg +39 -39
  13. package/src/assets/inner-arrow.svg +8 -8
  14. package/src/assets/loader.svg +5 -5
  15. package/src/assets/triangle-arrow.svg +72 -72
  16. package/src/assets/triangle-circle-arrow.svg +38 -38
  17. package/src/assets/wide-arrow.svg +72 -72
  18. package/src/components/ExtendedMultiselectCancel.vue +148 -148
  19. package/src/components/ExtendedMultiselectInput.vue +617 -617
  20. package/src/components/ExtendedMultiselectLoader.vue +182 -182
  21. package/src/components/ExtendedMultiselectMultiple.vue +295 -295
  22. package/src/components/ExtendedMultiselectOptions.vue +1092 -1091
  23. package/src/components/ExtendedMultiselectToggle.vue +261 -261
  24. package/src/components/Vue3ExtendedMultiselect.vue +1665 -1660
  25. package/src/composition/cancel.js +33 -33
  26. package/src/composition/image-path.js +16 -16
  27. package/src/composition/labels.js +39 -39
  28. package/src/composition/preselected-options.js +66 -66
  29. package/src/composition/search-value.js +33 -33
  30. package/src/composition/sizes.js +42 -42
  31. package/src/composition/toggle.js +33 -33
  32. package/src/events/emitter.js +2 -2
  33. package/src/sets/sets.js +99 -99
  34. package/src/styles/animations.css +18 -18
  35. package/src/styles/main.css +433 -432
  36. package/src/styles/variables.css +47 -47
  37. package/tests/unit/events.spec.js +135 -135
  38. package/tests/unit/props.spec.js +1040 -1040
  39. package/tests/utils/mount.js +37 -37
  40. package/tests/utils/utils.js +20 -20
  41. package/typings/vue3-extended-multiselect.d.ts +42 -42
@@ -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>