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
|
@@ -1,272 +1,272 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
aria-label="Toggle options list"
|
|
4
|
-
id="extended__multiselect-toggle"
|
|
5
|
-
role="switch"
|
|
6
|
-
:aria-checked="dropdownActive"
|
|
7
|
-
:class="toggleSlotClass"
|
|
8
|
-
:tabindex="increasedTabindex"
|
|
9
|
-
@click.stop.left="toggleOptionsList"
|
|
10
|
-
@click.stop.middle="toggleOptionsList"
|
|
11
|
-
@keypress.stop="toggleOptionsList($event)"
|
|
12
|
-
>
|
|
13
|
-
<img
|
|
14
|
-
alt=""
|
|
15
|
-
v-if="!loading"
|
|
16
|
-
:class="classesSummary"
|
|
17
|
-
:src="icon"
|
|
18
|
-
/>
|
|
19
|
-
<extended-multiselect-loader
|
|
20
|
-
v-else
|
|
21
|
-
:icon-filter="iconFilter"
|
|
22
|
-
:icon-size="iconSize"
|
|
23
|
-
/>
|
|
24
|
-
<svg
|
|
25
|
-
version="1.1"
|
|
26
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
28
|
-
width="0"
|
|
29
|
-
height="0"
|
|
30
|
-
>
|
|
31
|
-
<defs>
|
|
32
|
-
<filter
|
|
33
|
-
x="0"
|
|
34
|
-
y="0"
|
|
35
|
-
width="1"
|
|
36
|
-
height="1"
|
|
37
|
-
id="basicFilter"
|
|
38
|
-
>
|
|
39
|
-
<feFlood flood-color="#BDBDBD"/>
|
|
40
|
-
<feComposite
|
|
41
|
-
out="SourceGraphic"
|
|
42
|
-
in2="SourceGraphic"
|
|
43
|
-
operator="in"
|
|
44
|
-
/>
|
|
45
|
-
</filter>
|
|
46
|
-
<filter
|
|
47
|
-
x="0"
|
|
48
|
-
y="0"
|
|
49
|
-
width="1"
|
|
50
|
-
height="1"
|
|
51
|
-
id="blackFilter"
|
|
52
|
-
>
|
|
53
|
-
<feFlood flood-color="#000000"/>
|
|
54
|
-
<feComposite
|
|
55
|
-
out="SourceGraphic"
|
|
56
|
-
in2="SourceGraphic"
|
|
57
|
-
operator="in"
|
|
58
|
-
/>
|
|
59
|
-
</filter>
|
|
60
|
-
<filter
|
|
61
|
-
x="0"
|
|
62
|
-
y="0"
|
|
63
|
-
width="1"
|
|
64
|
-
height="1"
|
|
65
|
-
id="greenFilter"
|
|
66
|
-
>
|
|
67
|
-
<feFlood flood-color="#068504"/>
|
|
68
|
-
<feComposite
|
|
69
|
-
out="SourceGraphic"
|
|
70
|
-
in2="SourceGraphic"
|
|
71
|
-
operator="in"
|
|
72
|
-
/>
|
|
73
|
-
</filter>
|
|
74
|
-
</defs>
|
|
75
|
-
</svg>
|
|
76
|
-
</div>
|
|
77
|
-
</template>
|
|
78
|
-
|
|
79
|
-
<script setup>
|
|
80
|
-
import {
|
|
81
|
-
computed,
|
|
82
|
-
defineProps,
|
|
83
|
-
toRefs,
|
|
84
|
-
} from "vue";
|
|
85
|
-
|
|
86
|
-
import useImagePath from "../composition/image-path";
|
|
87
|
-
import useToggle from "../composition/toggle";
|
|
88
|
-
import useSizes from "../composition/sizes";
|
|
89
|
-
|
|
90
|
-
import ExtendedMultiselectLoader from "./ExtendedMultiselectLoader.vue";
|
|
91
|
-
|
|
92
|
-
const props = defineProps({
|
|
93
|
-
/**
|
|
94
|
-
* Determines what class to use on toggle slot
|
|
95
|
-
* @default false
|
|
96
|
-
* @property {boolean} disabled
|
|
97
|
-
*/
|
|
98
|
-
disabled: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: false,
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Determines whether option list expanded or not
|
|
105
|
-
* @property {boolean} dropdownActive
|
|
106
|
-
*/
|
|
107
|
-
dropdownActive: {
|
|
108
|
-
type: Boolean,
|
|
109
|
-
required: true,
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Defines a svg-filter for icons
|
|
114
|
-
* @property {string} iconFilter
|
|
115
|
-
*/
|
|
116
|
-
iconFilter: {
|
|
117
|
-
type: String,
|
|
118
|
-
required: true,
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Provides size to create special size-class
|
|
123
|
-
* for each kind of icon
|
|
124
|
-
* @property {string} iconSize
|
|
125
|
-
*/
|
|
126
|
-
iconSize: {
|
|
127
|
-
type: String,
|
|
128
|
-
required: true,
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Replaces toggle button with loader
|
|
133
|
-
* @property {boolean} loading
|
|
134
|
-
*/
|
|
135
|
-
loading: {
|
|
136
|
-
type: Boolean,
|
|
137
|
-
required: true,
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Determines toggle icon to be used in default toggle slot
|
|
142
|
-
* @property {string} toggleIcon
|
|
143
|
-
*/
|
|
144
|
-
toggleIcon: {
|
|
145
|
-
type: String,
|
|
146
|
-
required: true,
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Defines "tabindex" attribute of toggle button
|
|
151
|
-
* @default null
|
|
152
|
-
* @property {number|null} tabindex
|
|
153
|
-
*/
|
|
154
|
-
tabindex: {
|
|
155
|
-
type: Number,
|
|
156
|
-
default: null,
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Reactive instance of LocalEmitter class
|
|
161
|
-
* @property {object} emitter
|
|
162
|
-
*/
|
|
163
|
-
emitter: {
|
|
164
|
-
type: Object,
|
|
165
|
-
required: true,
|
|
166
|
-
},
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
const {
|
|
170
|
-
disabled,
|
|
171
|
-
dropdownActive,
|
|
172
|
-
emitter,
|
|
173
|
-
iconFilter,
|
|
174
|
-
iconSize,
|
|
175
|
-
loading,
|
|
176
|
-
tabindex,
|
|
177
|
-
toggleIcon,
|
|
178
|
-
} = toRefs(props);
|
|
179
|
-
|
|
180
|
-
const { createImagePath } = useImagePath();
|
|
181
|
-
|
|
182
|
-
const { toggleSlotClass, toggleOptionsList } = useToggle(
|
|
183
|
-
loading,
|
|
184
|
-
disabled,
|
|
185
|
-
emitter,
|
|
186
|
-
);
|
|
187
|
-
const { iconSizeClass } = useSizes(iconSize);
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Defines a list of toggle button classes
|
|
191
|
-
* @function
|
|
192
|
-
* @returns {Array} classes
|
|
193
|
-
*/
|
|
194
|
-
const classesSummary = computed(() => {
|
|
195
|
-
return [
|
|
196
|
-
iconFilterClass.value,
|
|
197
|
-
iconSizeClass.value,
|
|
198
|
-
iconFilterRotationClass.value
|
|
199
|
-
];
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Determines kind of toggle icon based on
|
|
204
|
-
* "toggleIcon" prop
|
|
205
|
-
* @function
|
|
206
|
-
* @returns {string} icon
|
|
207
|
-
*/
|
|
208
|
-
const icon = computed(() => {
|
|
209
|
-
const baseArrow = createImagePath("base-arrow.svg");
|
|
210
|
-
|
|
211
|
-
switch(toggleIcon.value) {
|
|
212
|
-
case "base-arrow":
|
|
213
|
-
return baseArrow;
|
|
214
|
-
case "double-arrow":
|
|
215
|
-
return createImagePath("double-arrow.svg");
|
|
216
|
-
case "wide-arrow":
|
|
217
|
-
return createImagePath("wide-arrow.svg");
|
|
218
|
-
case "circle-arrow":
|
|
219
|
-
return createImagePath("circle-arrow.svg");
|
|
220
|
-
case "inner-arrow":
|
|
221
|
-
return createImagePath("inner-arrow.svg");
|
|
222
|
-
case "triangle-arrow":
|
|
223
|
-
return createImagePath("triangle-arrow.svg");
|
|
224
|
-
case "triangle-circle-arrow":
|
|
225
|
-
return createImagePath("triangle-circle-arrow.svg");
|
|
226
|
-
default:
|
|
227
|
-
return baseArrow;
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Defines svg-filter for toggle icon
|
|
233
|
-
* @function
|
|
234
|
-
* @returns {string} svg-filter
|
|
235
|
-
*/
|
|
236
|
-
const iconFilterClass = computed(() => {
|
|
237
|
-
const basicFilter = "extended__multiselect-filter";
|
|
238
|
-
|
|
239
|
-
switch(iconFilter) {
|
|
240
|
-
case "basic":
|
|
241
|
-
return `${basicFilter}_basic`;
|
|
242
|
-
case "black":
|
|
243
|
-
return `${basicFilter}_black`;
|
|
244
|
-
case "green":
|
|
245
|
-
return `${basicFilter}_green`;
|
|
246
|
-
default:
|
|
247
|
-
return `${basicFilter}_basic`;
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Defines rotation class of toggle icon based on
|
|
253
|
-
* "dropdownActive" prop
|
|
254
|
-
* @function
|
|
255
|
-
* @returns {string} class
|
|
256
|
-
*/
|
|
257
|
-
const iconFilterRotationClass = computed(() => {
|
|
258
|
-
return dropdownActive.value
|
|
259
|
-
? "extended__multiselect-toggle--active"
|
|
260
|
-
: "extended__multiselect-toggle--locked";
|
|
261
|
-
});
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Sets "tabindex" attibute of toggle button based on
|
|
265
|
-
* given tabindex
|
|
266
|
-
* @function
|
|
267
|
-
* @returns {number} tabindex
|
|
268
|
-
*/
|
|
269
|
-
const increasedTabindex = computed(() => {
|
|
270
|
-
return tabindex.value ? tabindex.value + 1 : 0;
|
|
271
|
-
});
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
aria-label="Toggle options list"
|
|
4
|
+
id="extended__multiselect-toggle"
|
|
5
|
+
role="switch"
|
|
6
|
+
:aria-checked="dropdownActive"
|
|
7
|
+
:class="toggleSlotClass"
|
|
8
|
+
:tabindex="increasedTabindex"
|
|
9
|
+
@click.stop.left="toggleOptionsList"
|
|
10
|
+
@click.stop.middle="toggleOptionsList"
|
|
11
|
+
@keypress.stop="toggleOptionsList($event)"
|
|
12
|
+
>
|
|
13
|
+
<img
|
|
14
|
+
alt=""
|
|
15
|
+
v-if="!loading"
|
|
16
|
+
:class="classesSummary"
|
|
17
|
+
:src="icon"
|
|
18
|
+
/>
|
|
19
|
+
<extended-multiselect-loader
|
|
20
|
+
v-else
|
|
21
|
+
:icon-filter="iconFilter"
|
|
22
|
+
:icon-size="iconSize"
|
|
23
|
+
/>
|
|
24
|
+
<svg
|
|
25
|
+
version="1.1"
|
|
26
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
28
|
+
width="0"
|
|
29
|
+
height="0"
|
|
30
|
+
>
|
|
31
|
+
<defs>
|
|
32
|
+
<filter
|
|
33
|
+
x="0"
|
|
34
|
+
y="0"
|
|
35
|
+
width="1"
|
|
36
|
+
height="1"
|
|
37
|
+
id="basicFilter"
|
|
38
|
+
>
|
|
39
|
+
<feFlood flood-color="#BDBDBD"/>
|
|
40
|
+
<feComposite
|
|
41
|
+
out="SourceGraphic"
|
|
42
|
+
in2="SourceGraphic"
|
|
43
|
+
operator="in"
|
|
44
|
+
/>
|
|
45
|
+
</filter>
|
|
46
|
+
<filter
|
|
47
|
+
x="0"
|
|
48
|
+
y="0"
|
|
49
|
+
width="1"
|
|
50
|
+
height="1"
|
|
51
|
+
id="blackFilter"
|
|
52
|
+
>
|
|
53
|
+
<feFlood flood-color="#000000"/>
|
|
54
|
+
<feComposite
|
|
55
|
+
out="SourceGraphic"
|
|
56
|
+
in2="SourceGraphic"
|
|
57
|
+
operator="in"
|
|
58
|
+
/>
|
|
59
|
+
</filter>
|
|
60
|
+
<filter
|
|
61
|
+
x="0"
|
|
62
|
+
y="0"
|
|
63
|
+
width="1"
|
|
64
|
+
height="1"
|
|
65
|
+
id="greenFilter"
|
|
66
|
+
>
|
|
67
|
+
<feFlood flood-color="#068504"/>
|
|
68
|
+
<feComposite
|
|
69
|
+
out="SourceGraphic"
|
|
70
|
+
in2="SourceGraphic"
|
|
71
|
+
operator="in"
|
|
72
|
+
/>
|
|
73
|
+
</filter>
|
|
74
|
+
</defs>
|
|
75
|
+
</svg>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<script setup>
|
|
80
|
+
import {
|
|
81
|
+
computed,
|
|
82
|
+
defineProps,
|
|
83
|
+
toRefs,
|
|
84
|
+
} from "vue";
|
|
85
|
+
|
|
86
|
+
import useImagePath from "../composition/image-path";
|
|
87
|
+
import useToggle from "../composition/toggle";
|
|
88
|
+
import useSizes from "../composition/sizes";
|
|
89
|
+
|
|
90
|
+
import ExtendedMultiselectLoader from "./ExtendedMultiselectLoader.vue";
|
|
91
|
+
|
|
92
|
+
const props = defineProps({
|
|
93
|
+
/**
|
|
94
|
+
* Determines what class to use on toggle slot
|
|
95
|
+
* @default false
|
|
96
|
+
* @property {boolean} disabled
|
|
97
|
+
*/
|
|
98
|
+
disabled: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false,
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Determines whether option list expanded or not
|
|
105
|
+
* @property {boolean} dropdownActive
|
|
106
|
+
*/
|
|
107
|
+
dropdownActive: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
required: true,
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Defines a svg-filter for icons
|
|
114
|
+
* @property {string} iconFilter
|
|
115
|
+
*/
|
|
116
|
+
iconFilter: {
|
|
117
|
+
type: String,
|
|
118
|
+
required: true,
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Provides size to create special size-class
|
|
123
|
+
* for each kind of icon
|
|
124
|
+
* @property {string} iconSize
|
|
125
|
+
*/
|
|
126
|
+
iconSize: {
|
|
127
|
+
type: String,
|
|
128
|
+
required: true,
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Replaces toggle button with loader
|
|
133
|
+
* @property {boolean} loading
|
|
134
|
+
*/
|
|
135
|
+
loading: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
required: true,
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Determines toggle icon to be used in default toggle slot
|
|
142
|
+
* @property {string} toggleIcon
|
|
143
|
+
*/
|
|
144
|
+
toggleIcon: {
|
|
145
|
+
type: String,
|
|
146
|
+
required: true,
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Defines "tabindex" attribute of toggle button
|
|
151
|
+
* @default null
|
|
152
|
+
* @property {number|null} tabindex
|
|
153
|
+
*/
|
|
154
|
+
tabindex: {
|
|
155
|
+
type: Number,
|
|
156
|
+
default: null,
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Reactive instance of LocalEmitter class
|
|
161
|
+
* @property {object} emitter
|
|
162
|
+
*/
|
|
163
|
+
emitter: {
|
|
164
|
+
type: Object,
|
|
165
|
+
required: true,
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
const {
|
|
170
|
+
disabled,
|
|
171
|
+
dropdownActive,
|
|
172
|
+
emitter,
|
|
173
|
+
iconFilter,
|
|
174
|
+
iconSize,
|
|
175
|
+
loading,
|
|
176
|
+
tabindex,
|
|
177
|
+
toggleIcon,
|
|
178
|
+
} = toRefs(props);
|
|
179
|
+
|
|
180
|
+
const { createImagePath } = useImagePath();
|
|
181
|
+
|
|
182
|
+
const { toggleSlotClass, toggleOptionsList } = useToggle(
|
|
183
|
+
loading,
|
|
184
|
+
disabled,
|
|
185
|
+
emitter,
|
|
186
|
+
);
|
|
187
|
+
const { iconSizeClass } = useSizes(iconSize);
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Defines a list of toggle button classes
|
|
191
|
+
* @function
|
|
192
|
+
* @returns {Array} classes
|
|
193
|
+
*/
|
|
194
|
+
const classesSummary = computed(() => {
|
|
195
|
+
return [
|
|
196
|
+
iconFilterClass.value,
|
|
197
|
+
iconSizeClass.value,
|
|
198
|
+
iconFilterRotationClass.value
|
|
199
|
+
];
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Determines kind of toggle icon based on
|
|
204
|
+
* "toggleIcon" prop
|
|
205
|
+
* @function
|
|
206
|
+
* @returns {string} icon
|
|
207
|
+
*/
|
|
208
|
+
const icon = computed(() => {
|
|
209
|
+
const baseArrow = createImagePath("base-arrow.svg");
|
|
210
|
+
|
|
211
|
+
switch(toggleIcon.value) {
|
|
212
|
+
case "base-arrow":
|
|
213
|
+
return baseArrow;
|
|
214
|
+
case "double-arrow":
|
|
215
|
+
return createImagePath("double-arrow.svg");
|
|
216
|
+
case "wide-arrow":
|
|
217
|
+
return createImagePath("wide-arrow.svg");
|
|
218
|
+
case "circle-arrow":
|
|
219
|
+
return createImagePath("circle-arrow.svg");
|
|
220
|
+
case "inner-arrow":
|
|
221
|
+
return createImagePath("inner-arrow.svg");
|
|
222
|
+
case "triangle-arrow":
|
|
223
|
+
return createImagePath("triangle-arrow.svg");
|
|
224
|
+
case "triangle-circle-arrow":
|
|
225
|
+
return createImagePath("triangle-circle-arrow.svg");
|
|
226
|
+
default:
|
|
227
|
+
return baseArrow;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Defines svg-filter for toggle icon
|
|
233
|
+
* @function
|
|
234
|
+
* @returns {string} svg-filter
|
|
235
|
+
*/
|
|
236
|
+
const iconFilterClass = computed(() => {
|
|
237
|
+
const basicFilter = "extended__multiselect-filter";
|
|
238
|
+
|
|
239
|
+
switch(iconFilter) {
|
|
240
|
+
case "basic":
|
|
241
|
+
return `${basicFilter}_basic`;
|
|
242
|
+
case "black":
|
|
243
|
+
return `${basicFilter}_black`;
|
|
244
|
+
case "green":
|
|
245
|
+
return `${basicFilter}_green`;
|
|
246
|
+
default:
|
|
247
|
+
return `${basicFilter}_basic`;
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Defines rotation class of toggle icon based on
|
|
253
|
+
* "dropdownActive" prop
|
|
254
|
+
* @function
|
|
255
|
+
* @returns {string} class
|
|
256
|
+
*/
|
|
257
|
+
const iconFilterRotationClass = computed(() => {
|
|
258
|
+
return dropdownActive.value
|
|
259
|
+
? "extended__multiselect-toggle--active"
|
|
260
|
+
: "extended__multiselect-toggle--locked";
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Sets "tabindex" attibute of toggle button based on
|
|
265
|
+
* given tabindex
|
|
266
|
+
* @function
|
|
267
|
+
* @returns {number} tabindex
|
|
268
|
+
*/
|
|
269
|
+
const increasedTabindex = computed(() => {
|
|
270
|
+
return tabindex.value ? tabindex.value + 1 : 0;
|
|
271
|
+
});
|
|
272
272
|
</script>
|