vue3-extended-multiselect 0.0.1
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 +3 -0
- package/.eslintrc.js +29 -0
- package/CHANGELOG.md +9 -0
- package/README.md +696 -0
- package/babel.config.js +5 -0
- package/index.js +3 -0
- package/jest.config.js +57 -0
- package/package.json +44 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/assets/base-arrow.svg +70 -0
- package/src/assets/cancel.svg +35 -0
- package/src/assets/circle-arrow.svg +7 -0
- package/src/assets/double-arrow.svg +39 -0
- package/src/assets/inner-arrow.svg +8 -0
- package/src/assets/loader.svg +6 -0
- package/src/assets/triangle-arrow.svg +72 -0
- package/src/assets/triangle-circle-arrow.svg +38 -0
- package/src/assets/wide-arrow.svg +72 -0
- package/src/components/ExtendedMultiselectCancel.vue +142 -0
- package/src/components/ExtendedMultiselectInput.vue +619 -0
- package/src/components/ExtendedMultiselectLoader.vue +176 -0
- package/src/components/ExtendedMultiselectMultiple.vue +292 -0
- package/src/components/ExtendedMultiselectOptions.vue +1088 -0
- package/src/components/ExtendedMultiselectToggle.vue +255 -0
- package/src/components/Vue3ExtendedMultiselect.vue +1651 -0
- package/src/composition/cancel.js +31 -0
- package/src/composition/labels.js +40 -0
- package/src/composition/preselected-options.js +67 -0
- package/src/composition/search-value.js +34 -0
- package/src/composition/sizes.js +43 -0
- package/src/composition/toggle.js +34 -0
- package/src/sass/animations.sass +13 -0
- package/src/sass/main.sass +340 -0
- package/src/sass/mixins.sass +40 -0
- package/src/sass/variables.sass +37 -0
- package/src/sets/sets.js +100 -0
- package/tests/unit/events.spec.js +136 -0
- package/tests/unit/props.spec.js +1041 -0
- package/tests/utils/mount.js +38 -0
- package/tests/utils/stubs.js +1 -0
- package/tests/utils/utils.js +21 -0
- package/typings/vue3-extended-multiselect.d.ts +34 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import emitter from 'tiny-emitter/instance';
|
|
2
|
+
|
|
3
|
+
import useSearchValue from './search-value';
|
|
4
|
+
|
|
5
|
+
export default function useCancel(disabled, showSearchField, selectedOptions) {
|
|
6
|
+
/**
|
|
7
|
+
* Removes all selected options or single selected option
|
|
8
|
+
* when "multiple" prop equals false
|
|
9
|
+
* @function
|
|
10
|
+
* @emits extended:skip-block-blur-zeroing
|
|
11
|
+
* @emits extended:deselect-option
|
|
12
|
+
* @emits extended:clean-options
|
|
13
|
+
*/
|
|
14
|
+
const cancel = () => {
|
|
15
|
+
const { setSearchValue, setSearchPattern } = useSearchValue();
|
|
16
|
+
|
|
17
|
+
if (disabled.value) return;
|
|
18
|
+
|
|
19
|
+
emitter.emit("extended:skip-block-blur-zeroing");
|
|
20
|
+
emitter.emit("extended:deselect-option", null, true);
|
|
21
|
+
|
|
22
|
+
if (!showSearchField.value) return;
|
|
23
|
+
|
|
24
|
+
emitter.emit("extended:clean-options", selectedOptions.value);
|
|
25
|
+
|
|
26
|
+
setSearchValue(null);
|
|
27
|
+
setSearchPattern(null);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return { cancel };
|
|
31
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default function useLabels(
|
|
2
|
+
createCustomOptionLabel,
|
|
3
|
+
emptyObjectsPlaceholder,
|
|
4
|
+
) {
|
|
5
|
+
/**
|
|
6
|
+
* Creates label of any kind of option
|
|
7
|
+
* @function
|
|
8
|
+
* @param {option} UnionPropType
|
|
9
|
+
* @returns {string} label
|
|
10
|
+
*/
|
|
11
|
+
const optionCreateLabel = (option) => {
|
|
12
|
+
const isFunction = typeof option === "function";
|
|
13
|
+
|
|
14
|
+
if (!option && isFunction) return "";
|
|
15
|
+
|
|
16
|
+
const customOptionLabel = createCustomOptionLabel.value(option);
|
|
17
|
+
|
|
18
|
+
if (customOptionLabel) return customOptionLabel;
|
|
19
|
+
|
|
20
|
+
if (Array.isArray(option) && option.length > 0) {
|
|
21
|
+
return option.join(", ");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (typeof option !== "object") return option.toString();
|
|
25
|
+
|
|
26
|
+
if (Object.keys(option).length === 0) {
|
|
27
|
+
return emptyObjectsPlaceholder.value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const hasLabel = Object.getOwnPropertyNames(option).includes("label");
|
|
31
|
+
|
|
32
|
+
if (hasLabel) {
|
|
33
|
+
return typeof option.label === "object" ? JSON.stringify(option.label) : option.label;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return "";
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return { optionCreateLabel };
|
|
40
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export default function usePreselectedOptions(
|
|
2
|
+
label,
|
|
3
|
+
emptyObjectsPlaceholder,
|
|
4
|
+
showInsertWarnings,
|
|
5
|
+
) {
|
|
6
|
+
/**
|
|
7
|
+
* Creates string label for any kind of option
|
|
8
|
+
* @function
|
|
9
|
+
* @param {boolean} isObjectOrArray - determines whether option is of type "object" or instance of Array
|
|
10
|
+
* @param {UnionPropType} option - option which needs label
|
|
11
|
+
* @returns {string} label
|
|
12
|
+
*/
|
|
13
|
+
const createLabel = (isObjectOrArray, option) => {
|
|
14
|
+
let createdLabel;
|
|
15
|
+
|
|
16
|
+
if (isObjectOrArray) {
|
|
17
|
+
if (Array.isArray(option) && option.length > 0) {
|
|
18
|
+
createdLabel = option.join(", ");
|
|
19
|
+
} else {
|
|
20
|
+
createdLabel = typeof option[label.value] === "object"
|
|
21
|
+
? JSON.stringify(option[label.value])
|
|
22
|
+
: option[label.value];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (Object.keys(option).length === 0) {
|
|
26
|
+
createdLabel = emptyObjectsPlaceholder.value;
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
createdLabel = option.toString();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return createdLabel;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Restricts wrong types of options in options list
|
|
37
|
+
* @method
|
|
38
|
+
* @param {UnionPropType} option - option to restrict
|
|
39
|
+
* @returns {boolean} restriction
|
|
40
|
+
*/
|
|
41
|
+
const optionTypeRestrictor = (option) => {
|
|
42
|
+
if (!option) return false;
|
|
43
|
+
|
|
44
|
+
const isObjectArrayInstance = Object.getPrototypeOf(option).constructor.name
|
|
45
|
+
!== "Object"
|
|
46
|
+
&& Object.getPrototypeOf(option).constructor.name !== "Array";
|
|
47
|
+
const isAnyInstance = typeof option === "object" && isObjectArrayInstance;
|
|
48
|
+
const isSymbol = typeof option === "symbol";
|
|
49
|
+
|
|
50
|
+
if (isSymbol && showInsertWarnings.value) {
|
|
51
|
+
console.warn("vue-extended-multiselect: option can not be of type «symbol»");
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (isAnyInstance && showInsertWarnings.value) {
|
|
55
|
+
console.warn("vue-extended-multiselect: option can not be an instance of any constructor function");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (isSymbol || isAnyInstance) return false;
|
|
59
|
+
|
|
60
|
+
return true;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
createLabel,
|
|
65
|
+
optionTypeRestrictor,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { reactive, readonly } from "vue";
|
|
2
|
+
|
|
3
|
+
export default function useSearchValue() {
|
|
4
|
+
/**
|
|
5
|
+
* @property {string|null} searchValue - value of search field
|
|
6
|
+
* @property {string|null} searchPattern - pattern of inner search for available options
|
|
7
|
+
*/
|
|
8
|
+
const searchState = reactive({
|
|
9
|
+
searchValue: null,
|
|
10
|
+
searchPattern: null,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @function setSearchValue
|
|
15
|
+
* @param {string|null} value - new value of search field
|
|
16
|
+
*/
|
|
17
|
+
const setSearchValue = (value) => {
|
|
18
|
+
searchState.searchValue = value;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @function setSearchPattern
|
|
23
|
+
* @param {string|null} pattern - new pattern of inner search for available options
|
|
24
|
+
*/
|
|
25
|
+
const setSearchPattern = (pattern) => {
|
|
26
|
+
searchState.searchPattern = pattern;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
searchState: readonly(searchState),
|
|
31
|
+
setSearchValue,
|
|
32
|
+
setSearchPattern,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
getCurrentInstance,
|
|
4
|
+
readonly,
|
|
5
|
+
} from "vue";
|
|
6
|
+
|
|
7
|
+
export default function useSizes(iconSize) {
|
|
8
|
+
/**
|
|
9
|
+
* Defines classes for each kind of icon
|
|
10
|
+
* @function
|
|
11
|
+
* @returns {string} class
|
|
12
|
+
*/
|
|
13
|
+
const iconSizeClass = computed(() => {
|
|
14
|
+
let basicIconSize = "extended__multiselect";
|
|
15
|
+
|
|
16
|
+
switch(getCurrentInstance().type.__name) {
|
|
17
|
+
case "ExtendedMultiselectLoader":
|
|
18
|
+
basicIconSize += "-loader_icon";
|
|
19
|
+
break;
|
|
20
|
+
case "ExtendedMultiselectToggle":
|
|
21
|
+
basicIconSize += "-toggle_icon";
|
|
22
|
+
break;
|
|
23
|
+
case "ExtendedMultiselectCancel":
|
|
24
|
+
basicIconSize += "-cancel_icon";
|
|
25
|
+
break;
|
|
26
|
+
default:
|
|
27
|
+
basicIconSize += "-toggle_icon";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
switch(iconSize.value) {
|
|
31
|
+
case "large":
|
|
32
|
+
return `${basicIconSize}-large`;
|
|
33
|
+
case "medium":
|
|
34
|
+
return `${basicIconSize}-medium`;
|
|
35
|
+
case "small":
|
|
36
|
+
return `${basicIconSize}-small`;
|
|
37
|
+
default:
|
|
38
|
+
return `${basicIconSize}-large`;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return { iconSizeClass: readonly(iconSizeClass) };
|
|
43
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { computed, readonly } from "vue";
|
|
2
|
+
|
|
3
|
+
import emitter from 'tiny-emitter/instance';
|
|
4
|
+
|
|
5
|
+
export default function useToggle(loading, disabled, internalLoader) {
|
|
6
|
+
/**
|
|
7
|
+
* Toggles classes of slots if "loading"
|
|
8
|
+
* or "disabled" props equals true
|
|
9
|
+
* @function
|
|
10
|
+
* @returns {string} class
|
|
11
|
+
*/
|
|
12
|
+
const toggleSlotClass = computed(() => {
|
|
13
|
+
return loading.value || disabled.value || (internalLoader && internalLoader.value)
|
|
14
|
+
? "extended__multiselect-toggle--disabled"
|
|
15
|
+
: "extended__multiselect-toggle";
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Emits an event which listeners will toggle options list
|
|
20
|
+
* @function
|
|
21
|
+
* @emits extended:toggle-options
|
|
22
|
+
* @param {MouseEvent|KeyboardEvent} event - MouseEvent or KeyboardEvent instance
|
|
23
|
+
*/
|
|
24
|
+
const toggleOptionsList = (event) => {
|
|
25
|
+
if (event && event.code === "Tab") return;
|
|
26
|
+
|
|
27
|
+
emitter.emit("extended:toggle-options");
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
toggleSlotClass: readonly(toggleSlotClass),
|
|
32
|
+
toggleOptionsList,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
@import ./variables
|
|
2
|
+
@import ./animations
|
|
3
|
+
@import ./mixins
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.extended__multiselect-wrapper,
|
|
7
|
+
.extended__multiselect-wrapper--disabled
|
|
8
|
+
position: relative
|
|
9
|
+
width: $max-size
|
|
10
|
+
cursor: pointer
|
|
11
|
+
|
|
12
|
+
& *
|
|
13
|
+
+root-boxing
|
|
14
|
+
|
|
15
|
+
&--disabled
|
|
16
|
+
#extended__multiselect
|
|
17
|
+
+disabling
|
|
18
|
+
|
|
19
|
+
&--disabled .extended__multiselect-input,
|
|
20
|
+
&--disabled .extended__multiselect-input--hidden
|
|
21
|
+
cursor: default
|
|
22
|
+
|
|
23
|
+
.extended__multiselect,
|
|
24
|
+
.extended__multiselect-slate-grey,
|
|
25
|
+
.extended__multiselect-slate-blue,
|
|
26
|
+
.extended__multiselect-teal,
|
|
27
|
+
.extended__multiselect-strict
|
|
28
|
+
border: $border
|
|
29
|
+
border-radius: $border-radius
|
|
30
|
+
transition: border-bottom-left-radius 250ms, border-bottom-right-radius 250ms
|
|
31
|
+
display: grid
|
|
32
|
+
padding: $wrapper-padding
|
|
33
|
+
width: $max-size
|
|
34
|
+
|
|
35
|
+
.extended__multiselect
|
|
36
|
+
border-color: $basic-color
|
|
37
|
+
|
|
38
|
+
.extended__multiselect-increaser
|
|
39
|
+
&:active
|
|
40
|
+
border-color: $basic-color
|
|
41
|
+
|
|
42
|
+
.extended__multiselect-slate-grey
|
|
43
|
+
border-color: $dark-slate-grey
|
|
44
|
+
|
|
45
|
+
.extended__multiselect-increaser
|
|
46
|
+
&:active
|
|
47
|
+
border-color: $dark-slate-grey
|
|
48
|
+
|
|
49
|
+
.extended__multiselect-slate-blue
|
|
50
|
+
border-color: $dark-slate-blue
|
|
51
|
+
|
|
52
|
+
.extended__multiselect-increaser
|
|
53
|
+
&:active
|
|
54
|
+
border-color: $dark-slate-blue
|
|
55
|
+
|
|
56
|
+
.extended__multiselect-teal
|
|
57
|
+
border-color: $teal
|
|
58
|
+
|
|
59
|
+
.extended__multiselect-increaser
|
|
60
|
+
&:active
|
|
61
|
+
border-color: $teal
|
|
62
|
+
|
|
63
|
+
.extended__multiselect-strict
|
|
64
|
+
border-color: $strict
|
|
65
|
+
|
|
66
|
+
.extended__multiselect-increaser
|
|
67
|
+
&:active
|
|
68
|
+
border-color: $strict
|
|
69
|
+
|
|
70
|
+
.extended__multiselect-options,
|
|
71
|
+
.extended__multiselect-options-slate-grey,
|
|
72
|
+
.extended__multiselect-options-slate-blue,
|
|
73
|
+
.extended__multiselect-options-teal,
|
|
74
|
+
.extended__multiselect-options-strict
|
|
75
|
+
+flex_container
|
|
76
|
+
+absolute_block
|
|
77
|
+
border: $border
|
|
78
|
+
color: inherit
|
|
79
|
+
user-select: none
|
|
80
|
+
border-top-right-radius: 0
|
|
81
|
+
border-top-left-radius: 0
|
|
82
|
+
z-index: 100
|
|
83
|
+
border-bottom-right-radius: $border-radius
|
|
84
|
+
border-bottom-left-radius: $border-radius
|
|
85
|
+
width: $max-size
|
|
86
|
+
overflow: auto
|
|
87
|
+
border-top: none
|
|
88
|
+
top: $max-size
|
|
89
|
+
-webkit-overflow-scrolling: touch
|
|
90
|
+
|
|
91
|
+
& > *:not([class^=extended__multiselect-options_option]):not([class=extended__multiselect-options_container])
|
|
92
|
+
padding: $root-padding
|
|
93
|
+
|
|
94
|
+
.extended__multiselect-options--atop
|
|
95
|
+
border-top-right-radius: $border-radius
|
|
96
|
+
border-top-left-radius: $border-radius
|
|
97
|
+
border-bottom-right-radius: 0
|
|
98
|
+
border-bottom-left-radius: 0
|
|
99
|
+
border-top: $border
|
|
100
|
+
|
|
101
|
+
.extended__multiselect-options--marker
|
|
102
|
+
& > *:not([class^=extended__multiselect-options_option]):not([class=extended__multiselect-options_container])
|
|
103
|
+
padding: $marker-padding
|
|
104
|
+
|
|
105
|
+
.extended__multiselect-clear--active
|
|
106
|
+
grid-template-columns: 1fr 36px 36px
|
|
107
|
+
|
|
108
|
+
.extended__multiselect-clear--locked
|
|
109
|
+
grid-template-columns: 1fr 36px
|
|
110
|
+
|
|
111
|
+
.extended__multiselect,
|
|
112
|
+
.extended__multiselect-options
|
|
113
|
+
border-color: $basic-color !important
|
|
114
|
+
|
|
115
|
+
.extended__multiselect-slate-grey,
|
|
116
|
+
.extended__multiselect-options-slate-grey
|
|
117
|
+
border-color: $dark-slate-grey
|
|
118
|
+
|
|
119
|
+
.extended__multiselect-slate-blue,
|
|
120
|
+
.extended__multiselect-options-slate-blue
|
|
121
|
+
border-color: $dark-slate-blue
|
|
122
|
+
|
|
123
|
+
.extended__multiselect-teal,
|
|
124
|
+
.extended__multiselect-options-teal
|
|
125
|
+
border-color: $teal
|
|
126
|
+
|
|
127
|
+
.extended__multiselect-strict,
|
|
128
|
+
.extended__multiselect-options-strict
|
|
129
|
+
border-color: $strict
|
|
130
|
+
|
|
131
|
+
.extended__multiselect-input,
|
|
132
|
+
.extended__multiselect-block
|
|
133
|
+
min-height: 25px
|
|
134
|
+
width: $max-size
|
|
135
|
+
border: none
|
|
136
|
+
outline: none
|
|
137
|
+
|
|
138
|
+
.extended__multiselect-input
|
|
139
|
+
cursor: text
|
|
140
|
+
color: inherit
|
|
141
|
+
|
|
142
|
+
&:focus
|
|
143
|
+
&::placeholder
|
|
144
|
+
+active_placeholder
|
|
145
|
+
|
|
146
|
+
.extended__multiselect-input--trigger-option
|
|
147
|
+
&::placeholder
|
|
148
|
+
+active_placeholder
|
|
149
|
+
|
|
150
|
+
.extended__multiselect-block
|
|
151
|
+
+flex_row_container
|
|
152
|
+
user-select: none
|
|
153
|
+
color: inherit
|
|
154
|
+
|
|
155
|
+
.extended__multiselect-input--hidden
|
|
156
|
+
+absolute_block
|
|
157
|
+
border: none
|
|
158
|
+
width: 0
|
|
159
|
+
height: 0
|
|
160
|
+
opacity: 0
|
|
161
|
+
padding: 0
|
|
162
|
+
|
|
163
|
+
.extended__multiselect-toggle,
|
|
164
|
+
.extended__multiselect-toggle--disabled,
|
|
165
|
+
.extended__multiselect-cancel,
|
|
166
|
+
.extended__multiselect-cancel--disabled,
|
|
167
|
+
.extended__multiselect-loader
|
|
168
|
+
+flex_row_container
|
|
169
|
+
justify-content: center
|
|
170
|
+
user-select: none
|
|
171
|
+
|
|
172
|
+
.extended__multiselect-toggle--active
|
|
173
|
+
+toggle_transform
|
|
174
|
+
transform: rotate(180deg)
|
|
175
|
+
|
|
176
|
+
.extended__multiselect-toggle--locked
|
|
177
|
+
+toggle_transform
|
|
178
|
+
transform: rotate(0deg)
|
|
179
|
+
|
|
180
|
+
.extended__multiselect-toggle,
|
|
181
|
+
.extended__multiselect-cancel,
|
|
182
|
+
+prevent_stretching
|
|
183
|
+
cursor: pointer
|
|
184
|
+
|
|
185
|
+
.extended__multiselect-toggle,
|
|
186
|
+
.extended__multiselect-toggle--disabled
|
|
187
|
+
padding: $cancel-padding
|
|
188
|
+
|
|
189
|
+
.extended__multiselect-toggle,
|
|
190
|
+
.extended__multiselect-toggle--disabled,
|
|
191
|
+
.extended__multiselect-cancel,
|
|
192
|
+
.extended__multiselect-cancel--disabled,
|
|
193
|
+
.extended__multiselect-loader
|
|
194
|
+
&_icon-large
|
|
195
|
+
width: $icon-size-large
|
|
196
|
+
height: $icon-size-large
|
|
197
|
+
|
|
198
|
+
&_icon-medium
|
|
199
|
+
width: $icon-size-medium
|
|
200
|
+
height: $icon-size-medium
|
|
201
|
+
|
|
202
|
+
&_icon-small
|
|
203
|
+
width: $icon-size-small
|
|
204
|
+
height: $icon-size-small
|
|
205
|
+
|
|
206
|
+
.extended__multiselect-cancel,
|
|
207
|
+
.extended__multiselect-cancel--disabled
|
|
208
|
+
+active_border
|
|
209
|
+
+flex_row_container
|
|
210
|
+
padding: $cancel-padding
|
|
211
|
+
|
|
212
|
+
&:active
|
|
213
|
+
border-color: $cancel
|
|
214
|
+
border-radius: 3px
|
|
215
|
+
background-color: $cancel-backgound-color
|
|
216
|
+
|
|
217
|
+
.extended__multiselect-filter_basic
|
|
218
|
+
filter: url(#basicFilter)
|
|
219
|
+
|
|
220
|
+
.extended__multiselect-filter_black
|
|
221
|
+
filter: url(#blackFilter)
|
|
222
|
+
|
|
223
|
+
.extended__multiselect-filter_green
|
|
224
|
+
filter: url(#greenFilter)
|
|
225
|
+
|
|
226
|
+
.extended__multiselect-loader_default-loader
|
|
227
|
+
filter: url(#filterLoaderDefault)
|
|
228
|
+
|
|
229
|
+
.extended__multiselect-loader_basic
|
|
230
|
+
filter: url(#filterLoaderBasic)
|
|
231
|
+
|
|
232
|
+
.extended__multiselect-loader_slate-grey
|
|
233
|
+
filter: url(#filterLoaderSlateGrey)
|
|
234
|
+
|
|
235
|
+
.extended__multiselect-loader_slate-blue
|
|
236
|
+
filter: url(#filterLoaderSlateBlue)
|
|
237
|
+
|
|
238
|
+
.extended__multiselect-loader_teal
|
|
239
|
+
filter: url(#filterLoaderTeal)
|
|
240
|
+
|
|
241
|
+
.extended__multiselect-loader_strict
|
|
242
|
+
filter: url(#filterLoaderStrict)
|
|
243
|
+
|
|
244
|
+
.extended__multiselect-loader-animate
|
|
245
|
+
animation-name: loading
|
|
246
|
+
animation-duration: 3s
|
|
247
|
+
animation-timing-function: linear
|
|
248
|
+
animation-iteration-count: infinite
|
|
249
|
+
|
|
250
|
+
.extended__multiselect-options_container
|
|
251
|
+
+flex_container
|
|
252
|
+
|
|
253
|
+
.extended__multiselect-options_option,
|
|
254
|
+
.extended__multiselect-options_option-slate-grey,
|
|
255
|
+
.extended__multiselect-options_option-slate-blue,
|
|
256
|
+
.extended__multiselect-options_option-teal,
|
|
257
|
+
.extended__multiselect-options_option-strict
|
|
258
|
+
padding: $root-padding
|
|
259
|
+
color: inherit
|
|
260
|
+
|
|
261
|
+
.extended__multiselect--multiple-basic,
|
|
262
|
+
.extended__multiselect--multiple-slate-grey,
|
|
263
|
+
.extended__multiselect--multiple-slate-blue,
|
|
264
|
+
.extended__multiselect--multiple-teal,
|
|
265
|
+
.extended__multiselect--multiple-strict
|
|
266
|
+
+flex_row_container
|
|
267
|
+
border-radius: $block-border-radius
|
|
268
|
+
padding: $block-padding
|
|
269
|
+
gap: $block-gap
|
|
270
|
+
|
|
271
|
+
.extended__multiselect-options_option--marker
|
|
272
|
+
padding: $marker-padding
|
|
273
|
+
position: relative
|
|
274
|
+
|
|
275
|
+
.extended__multiselect-options_option:hover,
|
|
276
|
+
.extended__multiselect--multiple-basic
|
|
277
|
+
background-color: $basic-transparent
|
|
278
|
+
color: $hover-color
|
|
279
|
+
|
|
280
|
+
.extended__multiselect-options_option-slate-grey:hover,
|
|
281
|
+
.extended__multiselect--multiple-slate-grey
|
|
282
|
+
background-color: $dark-slate-grey-transparent
|
|
283
|
+
color: $hover-color
|
|
284
|
+
|
|
285
|
+
.extended__multiselect-options_option-slate-blue:hover,
|
|
286
|
+
.extended__multiselect--multiple-slate-blue
|
|
287
|
+
background-color: $dark-slate-blue-transparent
|
|
288
|
+
color: $hover-color
|
|
289
|
+
|
|
290
|
+
.extended__multiselect-options_option-teal:hover,
|
|
291
|
+
.extended__multiselect--multiple-teal
|
|
292
|
+
background-color: $teal-transparent
|
|
293
|
+
color: $hover-color
|
|
294
|
+
|
|
295
|
+
.extended__multiselect-options_option-strict:hover,
|
|
296
|
+
.extended__multiselect--multiple-strict
|
|
297
|
+
background-color: $strict-transparent
|
|
298
|
+
color: $hover-color
|
|
299
|
+
|
|
300
|
+
.extended__multiselect-marker
|
|
301
|
+
display: inline-block
|
|
302
|
+
position: absolute
|
|
303
|
+
left: $border-radius
|
|
304
|
+
|
|
305
|
+
.extended__multiselect-marker-shape
|
|
306
|
+
width: $icon-size-block
|
|
307
|
+
height: $icon-size-block
|
|
308
|
+
margin-left: $block-gap
|
|
309
|
+
border-radius: $half-size
|
|
310
|
+
border: $border
|
|
311
|
+
border-color: $basic-color
|
|
312
|
+
|
|
313
|
+
.extended__multiselect-marker-shape--selected
|
|
314
|
+
border-color: $cancel
|
|
315
|
+
|
|
316
|
+
.extended__multiselect-options_option--disabled
|
|
317
|
+
+disabling
|
|
318
|
+
|
|
319
|
+
.extended__multiselect_deselect-block-icon
|
|
320
|
+
width: $icon-size-block
|
|
321
|
+
height: $icon-size-block
|
|
322
|
+
|
|
323
|
+
.extended__multiselect-block--multiple
|
|
324
|
+
display: flex
|
|
325
|
+
flex-flow: row wrap
|
|
326
|
+
gap: $outer-gap
|
|
327
|
+
|
|
328
|
+
.extended__multiselect-block_cancel-wrapper
|
|
329
|
+
+active_border
|
|
330
|
+
+flex_row_container
|
|
331
|
+
padding: $block-cancel-padding
|
|
332
|
+
|
|
333
|
+
&:active
|
|
334
|
+
border-color: $cancel
|
|
335
|
+
border-radius: 3px
|
|
336
|
+
background-color: $cancel-backgound-color
|
|
337
|
+
|
|
338
|
+
.extended__multiselect-increaser
|
|
339
|
+
+active_border
|
|
340
|
+
padding: $increaser-padding
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
=absolute_block
|
|
3
|
+
position: absolute
|
|
4
|
+
cursor: pointer
|
|
5
|
+
|
|
6
|
+
=active_border
|
|
7
|
+
border: $border
|
|
8
|
+
border-color: transparent
|
|
9
|
+
|
|
10
|
+
=active_placeholder
|
|
11
|
+
color: $strict
|
|
12
|
+
font-weight: $wide-text
|
|
13
|
+
|
|
14
|
+
=disabling
|
|
15
|
+
background-color: $disabled
|
|
16
|
+
user-select: none
|
|
17
|
+
cursor: default
|
|
18
|
+
|
|
19
|
+
=flex_container
|
|
20
|
+
display: flex
|
|
21
|
+
flex-flow: column nowrap
|
|
22
|
+
|
|
23
|
+
=flex_row_container
|
|
24
|
+
display: flex
|
|
25
|
+
flex-flow: row nowrap
|
|
26
|
+
align-items: center
|
|
27
|
+
|
|
28
|
+
=prevent_stretching
|
|
29
|
+
align-self: start
|
|
30
|
+
justify-self: center
|
|
31
|
+
|
|
32
|
+
=root-boxing
|
|
33
|
+
box-sizing: border-box
|
|
34
|
+
font-family: inherit
|
|
35
|
+
font-size: inherit
|
|
36
|
+
font-style: inherit
|
|
37
|
+
|
|
38
|
+
=toggle_transform
|
|
39
|
+
transform-origin: 50% 50%
|
|
40
|
+
transition: transform 0.2s ease-out
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
$basic-color: #708090
|
|
2
|
+
$dark-slate-grey: #2F4F4F
|
|
3
|
+
$dark-slate-blue: #483D8B
|
|
4
|
+
$teal: #008080
|
|
5
|
+
$strict: #000000
|
|
6
|
+
$hover-color: #FFFFFF
|
|
7
|
+
$basic-transparent: rgba(112, 128, 144, 0.6)
|
|
8
|
+
$dark-slate-grey-transparent: rgba(47, 79, 79, 0.6)
|
|
9
|
+
$dark-slate-blue-transparent: rgba(72, 61, 139, 0.6)
|
|
10
|
+
$teal-transparent: rgba(0, 128, 128, 0.6)
|
|
11
|
+
$strict-transparent: rgba(0, 0, 0, 0.6)
|
|
12
|
+
$cancel: #B22222
|
|
13
|
+
$cancel-backgound-color: rgba(179, 33, 33, 0.1)
|
|
14
|
+
$disabled: rgba(176, 176, 176, 0.6)
|
|
15
|
+
$loader-color: #00BFFF
|
|
16
|
+
|
|
17
|
+
$wide-text: 700
|
|
18
|
+
$max-size: 100%
|
|
19
|
+
$half-size: 50%
|
|
20
|
+
$icon-size-large: 18px
|
|
21
|
+
$icon-size-medium: 15px
|
|
22
|
+
$icon-size-small: 12px
|
|
23
|
+
$wrapper-padding: 5px 10px
|
|
24
|
+
$root-padding: 6px 10px
|
|
25
|
+
$marker-padding: 6px 40px
|
|
26
|
+
$options-padding: 6px 0
|
|
27
|
+
$border-radius: 6px
|
|
28
|
+
$block-border-radius: 4px
|
|
29
|
+
$icon-size-block: 14px
|
|
30
|
+
$block-gap: 6px
|
|
31
|
+
$outer-gap: 10px
|
|
32
|
+
$block-padding: 1px 3px 1px 7px
|
|
33
|
+
$increaser-padding: 3px 7px
|
|
34
|
+
$cancel-padding: 3px 8px
|
|
35
|
+
$block-cancel-padding: 4px
|
|
36
|
+
|
|
37
|
+
$border: 1px solid
|