@alfalab/core-components-select 17.5.1 → 17.6.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/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +4 -4
- package/components/base-option/Component.js +1 -1
- package/components/base-option/index.css +15 -15
- package/components/base-select/Component.js +24 -12
- package/components/base-select/index.css +11 -11
- package/components/base-select/mobile.css +12 -12
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +10 -10
- package/components/checkmark-mobile/Component.js +1 -1
- package/components/checkmark-mobile/index.css +6 -6
- package/components/field/Component.js +1 -1
- package/components/field/index.css +12 -12
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +5 -5
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/option/Component.js +1 -1
- package/components/option/index.css +19 -19
- package/components/options-list/Component.js +1 -1
- package/components/options-list/index.css +10 -10
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/virtual-options-list/Component.js +1 -1
- package/components/virtual-options-list/index.css +15 -15
- package/cssm/components/base-select/Component.js +22 -10
- package/cssm/{hook-546b2479.js → hook-052c1a2e.js} +20 -8
- package/{hook-64a8061f.d.ts → cssm/hook-2f4e96b2.d.ts} +9 -7
- package/cssm/mobile/Component.mobile.js +7 -9
- package/cssm/presets/index.d.ts +1 -1
- package/cssm/presets/index.js +1 -1
- package/cssm/presets/useSelectWithApply/hook.js +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +2 -2
- package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/cssm/shared/index.js +2 -1
- package/cssm/typings.d.ts +3 -1
- package/cssm/utils.d.ts +3 -2
- package/cssm/utils.js +24 -9
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/base-checkmark/Component.js +1 -1
- package/esm/components/base-checkmark/index.css +4 -4
- package/esm/components/base-option/Component.js +1 -1
- package/esm/components/base-option/index.css +15 -15
- package/esm/components/base-select/Component.js +25 -13
- package/esm/components/base-select/index.css +11 -11
- package/esm/components/base-select/mobile.css +12 -12
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +10 -10
- package/esm/components/checkmark-mobile/Component.js +1 -1
- package/esm/components/checkmark-mobile/index.css +6 -6
- package/esm/components/field/Component.js +1 -1
- package/esm/components/field/index.css +12 -12
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +5 -5
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +6 -6
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +19 -19
- package/esm/components/options-list/Component.js +1 -1
- package/esm/components/options-list/index.css +10 -10
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/virtual-options-list/Component.js +1 -1
- package/esm/components/virtual-options-list/index.css +15 -15
- package/{modern/hook-64a8061f.d.ts → esm/hook-2f4e96b2.d.ts} +9 -7
- package/esm/{hook-699ea205.js → hook-8bbe812b.js} +21 -9
- package/esm/mobile/Component.mobile.js +7 -9
- package/esm/presets/index.d.ts +1 -1
- package/esm/presets/index.js +1 -1
- package/esm/presets/useSelectWithApply/hook.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/shared/index.js +2 -2
- package/esm/typings.d.ts +3 -1
- package/esm/utils.d.ts +3 -2
- package/esm/utils.js +24 -10
- package/{cssm/hook-64a8061f.d.ts → hook-2f4e96b2.d.ts} +9 -7
- package/{hook-23a1acb8.js → hook-4d5fa450.js} +20 -8
- package/mobile/Component.mobile.js +7 -9
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/base-checkmark/Component.js +1 -1
- package/modern/components/base-checkmark/index.css +4 -4
- package/modern/components/base-option/Component.js +1 -1
- package/modern/components/base-option/index.css +15 -15
- package/modern/components/base-select/Component.js +13 -4
- package/modern/components/base-select/index.css +11 -11
- package/modern/components/base-select/mobile.css +12 -12
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +10 -10
- package/modern/components/checkmark-mobile/Component.js +1 -1
- package/modern/components/checkmark-mobile/index.css +6 -6
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +12 -12
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +5 -5
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +19 -19
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +10 -10
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +2 -2
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +15 -15
- package/{esm/hook-64a8061f.d.ts → modern/hook-2f4e96b2.d.ts} +9 -7
- package/modern/{hook-b0f48fdd.js → hook-6a076c91.js} +14 -3
- package/modern/mobile/Component.mobile.js +8 -10
- package/modern/presets/index.d.ts +1 -1
- package/modern/presets/index.js +1 -1
- package/modern/presets/useSelectWithApply/hook.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/shared/index.js +2 -2
- package/modern/typings.d.ts +3 -1
- package/modern/utils.d.ts +3 -2
- package/modern/utils.js +23 -10
- package/package.json +1 -1
- package/presets/index.d.ts +1 -1
- package/presets/index.js +1 -1
- package/presets/useSelectWithApply/hook.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/shared/index.js +2 -1
- package/src/components/base-select/Component.tsx +28 -3
- package/src/mobile/Component.mobile.tsx +8 -18
- package/src/presets/useSelectWithApply/hook.tsx +26 -4
- package/src/presets/useSelectWithApply/options-list-with-apply/footer/Component.tsx +2 -0
- package/src/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +1 -1
- package/src/typings.ts +2 -0
- package/src/utils.ts +26 -8
- package/typings.d.ts +3 -1
- package/utils.d.ts +3 -2
- package/utils.js +24 -9
- /package/cssm/{hook-546b2479.d.ts → hook-052c1a2e.d.ts} +0 -0
- /package/esm/{hook-699ea205.d.ts → hook-8bbe812b.d.ts} +0 -0
- /package/{hook-23a1acb8.d.ts → hook-4d5fa450.d.ts} +0 -0
- /package/modern/{hook-b0f48fdd.d.ts → hook-6a076c91.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-052c1a2e";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-
|
|
5
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-052c1a2e.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
package/cssm/shared/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var presets_useSelectWithLoading_hook = require('../presets/useSelectWithLoading/hook.js');
|
|
6
6
|
var presets_useLazyLoading_hook = require('../presets/useLazyLoading/hook.js');
|
|
7
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
7
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-052c1a2e.js');
|
|
8
8
|
var utils = require('../utils.js');
|
|
9
9
|
var components_option_Component = require('../components/option/Component.js');
|
|
10
10
|
var components_baseOption_Component = require('../components/base-option/Component.js');
|
|
@@ -25,6 +25,7 @@ exports.SELECT_ALL_KEY = presets_useSelectWithApply_optionsListWithApply_Compone
|
|
|
25
25
|
exports.useSelectWithApply = presets_useSelectWithApply_optionsListWithApply_Component.useSelectWithApply;
|
|
26
26
|
exports.defaultAccessor = utils.defaultAccessor;
|
|
27
27
|
exports.defaultFilterFn = utils.defaultFilterFn;
|
|
28
|
+
exports.defaultGroupAccessor = utils.defaultGroupAccessor;
|
|
28
29
|
exports.getSelectTestIds = utils.getSelectTestIds;
|
|
29
30
|
exports.isGroup = utils.isGroup;
|
|
30
31
|
exports.isOptionShape = utils.isOptionShape;
|
package/cssm/typings.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { InputProps } from "@alfalab/core-components-input";
|
|
|
5
5
|
import { ModalProps } from "@alfalab/core-components-modal";
|
|
6
6
|
import { ModalFooterProps, ModalHeaderProps } from "@alfalab/core-components-modal/shared";
|
|
7
7
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
8
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
8
|
+
import { UseSelectWithApplyProps } from "./hook-2f4e96b2";
|
|
9
9
|
type AnyObject = Record<string, any>;
|
|
10
10
|
type OptionShape = {
|
|
11
11
|
/**
|
|
@@ -237,6 +237,8 @@ type BaseSelectProps = {
|
|
|
237
237
|
filterFn?: (optionText: string, search: string) => boolean;
|
|
238
238
|
value?: string;
|
|
239
239
|
onChange?: (value: string) => void;
|
|
240
|
+
filterGroup?: boolean;
|
|
241
|
+
groupAccessor?: (group: GroupShape) => string | undefined;
|
|
240
242
|
};
|
|
241
243
|
/**
|
|
242
244
|
* Обработчик выбора
|
package/cssm/utils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const joinOptions: ({ selected, selectedMultiple, }: {
|
|
|
6
6
|
selected?: OptionShape | undefined;
|
|
7
7
|
selectedMultiple?: OptionShape[] | undefined;
|
|
8
8
|
}) => ReactNode[] | null;
|
|
9
|
-
declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape) => boolean): {
|
|
9
|
+
declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape | GroupShape) => boolean, filterGroup?: boolean): {
|
|
10
10
|
filteredOptions: (OptionShape | GroupShape)[];
|
|
11
11
|
flatOptions: OptionShape[];
|
|
12
12
|
selectedOptions: OptionShape[];
|
|
@@ -35,6 +35,7 @@ type useVisibleOptionsArgs = {
|
|
|
35
35
|
};
|
|
36
36
|
declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, }: useVisibleOptionsArgs): void;
|
|
37
37
|
declare function defaultFilterFn(optionText: string, search: string): boolean;
|
|
38
|
+
declare function defaultGroupAccessor(option: GroupShape): string | undefined;
|
|
38
39
|
declare function defaultAccessor(option: OptionShape): string;
|
|
39
40
|
declare function usePrevious<T>(value: T): T | undefined;
|
|
40
41
|
declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
|
|
@@ -64,4 +65,4 @@ declare function getSelectTestIds(dataTestId: string): {
|
|
|
64
65
|
modalHeader: string;
|
|
65
66
|
modalContent: string;
|
|
66
67
|
};
|
|
67
|
-
export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
|
|
68
|
+
export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultGroupAccessor, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
|
package/cssm/utils.js
CHANGED
|
@@ -30,9 +30,10 @@ var joinOptions = function (_a) {
|
|
|
30
30
|
}, []);
|
|
31
31
|
};
|
|
32
32
|
// За один проход делает список пунктов меню плоским и находит выбранные пункты по ключу
|
|
33
|
-
function processOptions(options, selected, filterFn) {
|
|
33
|
+
function processOptions(options, selected, filterFn, filterGroup) {
|
|
34
34
|
if (selected === void 0) { selected = []; }
|
|
35
35
|
if (filterFn === void 0) { filterFn = function () { return true; }; }
|
|
36
|
+
if (filterGroup === void 0) { filterGroup = false; }
|
|
36
37
|
var flatOptions = [];
|
|
37
38
|
var filteredOptions = [];
|
|
38
39
|
var selectedArray = Array.isArray(selected) ? selected : [selected];
|
|
@@ -40,12 +41,20 @@ function processOptions(options, selected, filterFn) {
|
|
|
40
41
|
var selectedKeys = selectedArray.filter(function (option) { return typeof option === 'string'; });
|
|
41
42
|
var isSelected = function (option) { return selectedKeys.includes(option.key); };
|
|
42
43
|
var process = function (option) {
|
|
43
|
-
|
|
44
|
+
var isGroupOption = isGroup(option);
|
|
45
|
+
if (!isGroupOption && isSelected(option)) {
|
|
44
46
|
selectedOptions.push(option);
|
|
45
47
|
}
|
|
46
48
|
if (!filterFn(option))
|
|
47
49
|
return false;
|
|
48
|
-
|
|
50
|
+
if (isGroupOption) {
|
|
51
|
+
if (filterGroup) {
|
|
52
|
+
Array.prototype.push.apply(flatOptions, option.options);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
flatOptions.push(option);
|
|
57
|
+
}
|
|
49
58
|
return true;
|
|
50
59
|
};
|
|
51
60
|
options.forEach(function (option) {
|
|
@@ -56,14 +65,16 @@ function processOptions(options, selected, filterFn) {
|
|
|
56
65
|
if (matched)
|
|
57
66
|
group_1.options.push(groupOption);
|
|
58
67
|
});
|
|
59
|
-
if (group_1.options.length)
|
|
68
|
+
if (group_1.options.length) {
|
|
60
69
|
filteredOptions.push(group_1);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (!filterGroup)
|
|
73
|
+
return;
|
|
61
74
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
filteredOptions.push(option);
|
|
66
|
-
}
|
|
75
|
+
var matched = process(option);
|
|
76
|
+
if (matched)
|
|
77
|
+
filteredOptions.push(option);
|
|
67
78
|
});
|
|
68
79
|
return { filteredOptions: filteredOptions, flatOptions: flatOptions, selectedOptions: selectedOptions };
|
|
69
80
|
}
|
|
@@ -94,6 +105,9 @@ function defaultFilterFn(optionText, search) {
|
|
|
94
105
|
return true;
|
|
95
106
|
return optionText.toLowerCase().includes(search.toLowerCase());
|
|
96
107
|
}
|
|
108
|
+
function defaultGroupAccessor(option) {
|
|
109
|
+
return option.label;
|
|
110
|
+
}
|
|
97
111
|
function defaultAccessor(option) {
|
|
98
112
|
if (typeof option.content === 'string')
|
|
99
113
|
return option.content;
|
|
@@ -148,6 +162,7 @@ function getSelectTestIds(dataTestId) {
|
|
|
148
162
|
|
|
149
163
|
exports.defaultAccessor = defaultAccessor;
|
|
150
164
|
exports.defaultFilterFn = defaultFilterFn;
|
|
165
|
+
exports.defaultGroupAccessor = defaultGroupAccessor;
|
|
151
166
|
exports.getSelectTestIds = getSelectTestIds;
|
|
152
167
|
exports.isGroup = isGroup;
|
|
153
168
|
exports.isOptionShape = isOptionShape;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ChevronDownMIcon } from '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
4
4
|
|
|
5
|
-
var styles = {"arrow":"
|
|
5
|
+
var styles = {"arrow":"select__arrow_1rwor","open":"select__open_1rwor"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Arrow = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: n3hd3 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
/* checkmark */
|
|
27
27
|
|
|
28
28
|
/* optgroup */
|
|
29
|
-
} .
|
|
29
|
+
} .select__arrow_1rwor {
|
|
30
30
|
display: block;
|
|
31
31
|
width: 24px;
|
|
32
32
|
height: 24px;
|
|
33
33
|
color: var(--select-arrow-color);
|
|
34
34
|
|
|
35
35
|
transition: transform 0.15s ease-in-out, opacity 0.2s ease;
|
|
36
|
-
} .
|
|
36
|
+
} .select__open_1rwor {
|
|
37
37
|
transform: var(--arrow-transform);
|
|
38
38
|
}
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { Checkbox } from '@alfalab/core-components-checkbox/esm';
|
|
4
4
|
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
5
5
|
|
|
6
|
-
var styles = {"checkmark":"
|
|
6
|
+
var styles = {"checkmark":"select__checkmark_86mjr","single":"select__single_86mjr","selected":"select__selected_86mjr"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
var BaseCheckmark = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: le819 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
/* checkmark */
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
|
-
} .
|
|
26
|
+
} .select__checkmark_86mjr {
|
|
27
27
|
flex-shrink: 0;
|
|
28
28
|
box-sizing: border-box;
|
|
29
|
-
} .
|
|
29
|
+
} .select__single_86mjr {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: center;
|
|
33
33
|
opacity: 0
|
|
34
|
-
} .
|
|
34
|
+
} .select__single_86mjr.select__selected_86mjr {
|
|
35
35
|
opacity: 1;
|
|
36
36
|
}
|
|
@@ -3,7 +3,7 @@ import React, { isValidElement } from 'react';
|
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { BaseCheckmark } from '../base-checkmark/Component.js';
|
|
5
5
|
|
|
6
|
-
var styles = {"option":"
|
|
6
|
+
var styles = {"option":"select__option_19xyo","disabled":"select__disabled_19xyo","checkmarkBefore":"select__checkmarkBefore_19xyo","mobile":"select__mobile_19xyo","checkmarkAfter":"select__checkmarkAfter_19xyo","textContent":"select__textContent_19xyo","selected":"select__selected_19xyo","highlighted":"select__highlighted_19xyo","checkmarkBeforeContent":"select__checkmarkBeforeContent_19xyo","checkmarkAfterContent":"select__checkmarkAfterContent_19xyo","content":"select__content_19xyo"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
var BaseOption = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1uzci */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-modal-bg-primary: #fff;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/* checkmark */
|
|
44
44
|
|
|
45
45
|
/* optgroup */
|
|
46
|
-
} .
|
|
46
|
+
} .select__option_19xyo {
|
|
47
47
|
font-size: 16px;
|
|
48
48
|
line-height: 20px;
|
|
49
49
|
font-weight: 400;
|
|
@@ -57,36 +57,36 @@
|
|
|
57
57
|
position: relative;
|
|
58
58
|
cursor: pointer;
|
|
59
59
|
min-height: var(--size-s-height)
|
|
60
|
-
} .
|
|
60
|
+
} .select__option_19xyo:not(.select__disabled_19xyo):active {
|
|
61
61
|
background: var(--select-option-active-background);
|
|
62
62
|
color: var(--select-option-active-color);
|
|
63
|
-
} .
|
|
63
|
+
} .select__option_19xyo.select__checkmarkBefore_19xyo {
|
|
64
64
|
padding: 0 0 0 var(--gap-s)
|
|
65
|
-
} .
|
|
65
|
+
} .select__option_19xyo.select__checkmarkBefore_19xyo.select__mobile_19xyo {
|
|
66
66
|
padding-left: var(--gap-m);
|
|
67
|
-
} .
|
|
67
|
+
} .select__option_19xyo.select__checkmarkAfter_19xyo.select__checkmarkAfter_19xyo {
|
|
68
68
|
padding: 0 var(--gap-s) 0 0
|
|
69
|
-
} .
|
|
69
|
+
} .select__option_19xyo.select__checkmarkAfter_19xyo.select__checkmarkAfter_19xyo.select__mobile_19xyo {
|
|
70
70
|
padding-right: var(--gap-l);
|
|
71
|
-
} .
|
|
71
|
+
} .select__option_19xyo.select__textContent_19xyo {
|
|
72
72
|
padding: var(--gap-s)
|
|
73
|
-
} .
|
|
73
|
+
} .select__option_19xyo.select__textContent_19xyo.select__mobile_19xyo {
|
|
74
74
|
padding: var(--gap-m) var(--gap-l) var(--gap-m) var(--gap-m);
|
|
75
|
-
} .
|
|
75
|
+
} .select__selected_19xyo {
|
|
76
76
|
background: var(--select-option-selected-background);
|
|
77
77
|
color: var(--select-option-selected-color);
|
|
78
78
|
cursor: default;
|
|
79
|
-
} .
|
|
79
|
+
} .select__highlighted_19xyo {
|
|
80
80
|
background: var(--select-option-hover-background);
|
|
81
81
|
color: var(--select-option-hover-color);
|
|
82
|
-
} .
|
|
82
|
+
} .select__disabled_19xyo {
|
|
83
83
|
cursor: var(--disabled-cursor);
|
|
84
84
|
background: var(--select-option-disabled-background);
|
|
85
85
|
color: var(--select-option-disabled-color);
|
|
86
|
-
} .
|
|
86
|
+
} .select__checkmarkBeforeContent_19xyo {
|
|
87
87
|
margin-right: var(--gap-s);
|
|
88
|
-
} .
|
|
88
|
+
} .select__checkmarkAfterContent_19xyo {
|
|
89
89
|
margin-left: var(--gap-s);
|
|
90
|
-
} .
|
|
90
|
+
} .select__content_19xyo {
|
|
91
91
|
flex: 1;
|
|
92
92
|
}
|
|
@@ -7,13 +7,13 @@ import { compute } from 'compute-scroll-into-view';
|
|
|
7
7
|
import { useMultipleSelection, useCombobox } from 'downshift';
|
|
8
8
|
import { fnUtils, getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
9
9
|
import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
|
|
10
|
-
import { defaultAccessor, defaultFilterFn, processOptions } from '../../utils.js';
|
|
10
|
+
import { defaultAccessor, defaultFilterFn, defaultGroupAccessor, processOptions, isGroup } from '../../utils.js';
|
|
11
11
|
import { NativeSelect } from '../native-select/Component.js';
|
|
12
12
|
|
|
13
|
-
var styles = {"component":"
|
|
13
|
+
var styles = {"component":"select__component_q86dr","popoverInner":"select__popoverInner_q86dr","optionsListWrapper":"select__optionsListWrapper_q86dr","optionsListBorder":"select__optionsListBorder_q86dr","nativeSelect":"select__nativeSelect_q86dr","block":"select__block_q86dr","emptySearchPlaceholder":"select__emptySearchPlaceholder_q86dr","search":"select__search_q86dr"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
|
-
var mobileStyles = {"sheet":"
|
|
16
|
+
var mobileStyles = {"sheet":"select__sheet_1qeql","sheetContent":"select__sheetContent_1qeql","modalContent":"select__modalContent_1qeql","sheetContainer":"select__sheetContainer_1qeql","optionsListWrapper":"select__optionsListWrapper_1qeql","optionsList":"select__optionsList_1qeql","scrollbar":"select__scrollbar_1qeql","search":"select__search_1qeql","option":"select__option_1qeql","optionGroup":"select__optionGroup_1qeql"};
|
|
17
17
|
require('./mobile.css')
|
|
18
18
|
|
|
19
19
|
var itemToString = function (option) { return (option ? option.key : ''); };
|
|
@@ -23,7 +23,8 @@ var BaseSelect = forwardRef(
|
|
|
23
23
|
// eslint-disable-next-line complexity
|
|
24
24
|
function (_a, ref) {
|
|
25
25
|
var _b;
|
|
26
|
-
var
|
|
26
|
+
var _c, _d;
|
|
27
|
+
var dataTestId = _a.dataTestId, className = _a.className, fieldClassName = _a.fieldClassName, optionGroupClassName = _a.optionGroupClassName, optionsListClassName = _a.optionsListClassName, optionClassName = _a.optionClassName, popperClassName = _a.popperClassName, options = _a.options, _e = _a.autocomplete, autocomplete = _e === void 0 ? false : _e, _f = _a.multiple, multiple = _f === void 0 ? false : _f, _g = _a.allowUnselect, allowUnselect = _g === void 0 ? false : _g, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.closeOnSelect, closeOnSelect = _j === void 0 ? !multiple : _j, _k = _a.circularNavigation, circularNavigation = _k === void 0 ? false : _k, _l = _a.nativeSelect, nativeSelect = _l === void 0 ? false : _l, _m = _a.defaultOpen, defaultOpen = _m === void 0 ? false : _m, openProp = _a.open, _o = _a.popoverPosition, popoverPosition = _o === void 0 ? 'bottom-start' : _o, _p = _a.preventFlip, preventFlip = _p === void 0 ? true : _p, _q = _a.optionsListWidth, optionsListWidth = _q === void 0 ? 'content' : _q, name = _a.name, id = _a.id, selected = _a.selected, _r = _a.size, size = _r === void 0 ? 48 : _r, _s = _a.optionsSize, optionsSize = _s === void 0 ? size : _s, error = _a.error, hint = _a.hint, block = _a.block, label = _a.label, labelView = _a.labelView, placeholder = _a.placeholder, _t = _a.fieldProps, fieldProps = _t === void 0 ? {} : _t, _u = _a.optionsListProps, optionsListProps = _u === void 0 ? {} : _u, _v = _a.optionProps, optionProps = _v === void 0 ? {} : _v, _w = _a.searchProps, searchProps = _w === void 0 ? {} : _w, _x = _a.showSearch, showSearch = _x === void 0 ? false : _x, valueRenderer = _a.valueRenderer, onChange = _a.onChange, onOpen = _a.onOpen, onFocus = _a.onFocus, onBlur = _a.onBlur, onScroll = _a.onScroll, Arrow = _a.Arrow, _y = _a.Field, Field = _y === void 0 ? function () { return null; } : _y, _z = _a.OptionsList, OptionsList = _z === void 0 ? function () { return null; } : _z, _0 = _a.Optgroup, Optgroup = _0 === void 0 ? function () { return null; } : _0, _1 = _a.Option, Option = _1 === void 0 ? function () { return null; } : _1, _2 = _a.Search, Search = _2 === void 0 ? function () { return null; } : _2, updatePopover = _a.updatePopover, zIndexPopover = _a.zIndexPopover, _3 = _a.showEmptyOptionsList, showEmptyOptionsList = _3 === void 0 ? false : _3, visibleOptions = _a.visibleOptions, view = _a.view, _4 = _a.isBottomSheet, isBottomSheet = _4 === void 0 ? true : _4, footer = _a.footer, swipeable = _a.swipeable, modalProps = _a.modalProps, popoverProps = _a.popoverProps, modalFooterProps = _a.modalFooterProps, modalHeaderProps = _a.modalHeaderProps, bottomSheetProps = _a.bottomSheetProps, Popover = _a.Popover, ModalMobile = _a.ModalMobile, BottomSheet = _a.BottomSheet;
|
|
27
28
|
var rootRef = useRef(null);
|
|
28
29
|
var fieldRef = useRef(null);
|
|
29
30
|
var listRef = useRef(null);
|
|
@@ -31,13 +32,24 @@ function (_a, ref) {
|
|
|
31
32
|
var searchRef = useRef(null);
|
|
32
33
|
var scrollableContainerRef = useRef(null);
|
|
33
34
|
var onOpenRef = useRef(onOpen);
|
|
34
|
-
var
|
|
35
|
-
var
|
|
35
|
+
var _5 = React.useState(''), searchState = _5[0], setSearchState = _5[1];
|
|
36
|
+
var _6 = typeof (searchProps === null || searchProps === void 0 ? void 0 : searchProps.value) === 'string'
|
|
36
37
|
? [searchProps.value, searchProps.onChange]
|
|
37
|
-
: [searchState, setSearchState], search =
|
|
38
|
+
: [searchState, setSearchState], search = _6[0], setSearch = _6[1];
|
|
38
39
|
var accessor = searchProps.accessor || defaultAccessor;
|
|
39
40
|
var filterFn = searchProps.filterFn || defaultFilterFn;
|
|
40
|
-
var
|
|
41
|
+
var filterGroup = (_c = searchProps.filterGroup) !== null && _c !== void 0 ? _c : false;
|
|
42
|
+
var groupAccessor = (_d = searchProps.groupAccessor) !== null && _d !== void 0 ? _d : defaultGroupAccessor;
|
|
43
|
+
var _7 = useMemo(function () {
|
|
44
|
+
return processOptions(options, selected, function (option) {
|
|
45
|
+
if (isGroup(option)) {
|
|
46
|
+
var groupAccessorValue = groupAccessor(option);
|
|
47
|
+
return (typeof groupAccessorValue === 'string' &&
|
|
48
|
+
filterFn(groupAccessorValue, search));
|
|
49
|
+
}
|
|
50
|
+
return filterFn(accessor(option), search);
|
|
51
|
+
}, filterGroup);
|
|
52
|
+
}, [options, selected, filterFn, accessor, search, filterGroup, groupAccessor]), filteredOptions = _7.filteredOptions, flatOptions = _7.flatOptions, selectedOptions = _7.selectedOptions;
|
|
41
53
|
var scrollIntoView = function (node) {
|
|
42
54
|
if (!node || view === 'mobile')
|
|
43
55
|
return;
|
|
@@ -80,8 +92,8 @@ function (_a, ref) {
|
|
|
80
92
|
useMultipleSelectionProps.selectedItems = selectedOptions;
|
|
81
93
|
}
|
|
82
94
|
onOpenRef.current = onOpen;
|
|
83
|
-
var
|
|
84
|
-
var
|
|
95
|
+
var _8 = useMultipleSelection(useMultipleSelectionProps), selectedItems = _8.selectedItems, addSelectedItem = _8.addSelectedItem, setSelectedItems = _8.setSelectedItems, removeSelectedItem = _8.removeSelectedItem, getDropdownProps = _8.getDropdownProps;
|
|
96
|
+
var _9 = useCombobox({
|
|
85
97
|
id: id,
|
|
86
98
|
isOpen: openProp,
|
|
87
99
|
items: flatOptions,
|
|
@@ -162,7 +174,7 @@ function (_a, ref) {
|
|
|
162
174
|
return changes;
|
|
163
175
|
}
|
|
164
176
|
},
|
|
165
|
-
}), open =
|
|
177
|
+
}), open = _9.isOpen, getMenuProps = _9.getMenuProps, getInputProps = _9.getInputProps, getItemProps = _9.getItemProps, getLabelProps = _9.getLabelProps, highlightedIndex = _9.highlightedIndex, toggleMenu = _9.toggleMenu, openMenu = _9.openMenu, closeMenu = _9.closeMenu, setHighlightedIndex = _9.setHighlightedIndex;
|
|
166
178
|
useEffect(function () {
|
|
167
179
|
/*
|
|
168
180
|
* При изменении openProp, состояние внутри downshift в useEnhancedReducer не меняется, поэтому меняем его таким способом
|
|
@@ -178,7 +190,7 @@ function (_a, ref) {
|
|
|
178
190
|
}
|
|
179
191
|
}, [openProp, openMenu, closeMenu]);
|
|
180
192
|
var inputProps = getInputProps(getDropdownProps({ ref: mergeRefs([ref, fieldRef]) }));
|
|
181
|
-
var
|
|
193
|
+
var _10 = getMenuProps({ ref: listRef }, { suppressRefError: true }), menuRef = _10.ref, menuProps = __rest(_10, ["ref"]);
|
|
182
194
|
var handleEntered = function (node, isAppearing) {
|
|
183
195
|
var _a, _b, _c, _d, _e;
|
|
184
196
|
if (showSearch)
|
|
@@ -329,7 +341,7 @@ function (_a, ref) {
|
|
|
329
341
|
_a[mobileStyles.search] = view === 'mobile',
|
|
330
342
|
_a)), ref: mergeRefs([searchRef, ((_c = searchProps === null || searchProps === void 0 ? void 0 : searchProps.componentProps) === null || _c === void 0 ? void 0 : _c.ref) || null]) })));
|
|
331
343
|
};
|
|
332
|
-
var
|
|
344
|
+
var _11 = optionsListProps, header = _11.header, emptyPlaceholder = _11.emptyPlaceholder;
|
|
333
345
|
var renderOptionsListHeader = function () {
|
|
334
346
|
if (header || (view === 'desktop' && showSearch)) {
|
|
335
347
|
return (React.createElement(React.Fragment, null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1u9ej */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-modal-bg-primary: #fff;
|
|
@@ -37,21 +37,21 @@
|
|
|
37
37
|
/* checkmark */
|
|
38
38
|
|
|
39
39
|
/* optgroup */
|
|
40
|
-
} .
|
|
40
|
+
} .select__component_q86dr {
|
|
41
41
|
width: max-content;
|
|
42
42
|
position: relative;
|
|
43
43
|
outline: 0;
|
|
44
44
|
max-width: 100%;
|
|
45
|
-
} .
|
|
45
|
+
} .select__popoverInner_q86dr {
|
|
46
46
|
padding-top: var(--select-options-list-offset);
|
|
47
47
|
padding-bottom: var(--select-options-list-offset);
|
|
48
48
|
background: transparent;
|
|
49
49
|
border-radius: 0;
|
|
50
50
|
position: relative;
|
|
51
|
-
} .
|
|
51
|
+
} .select__popoverInner_q86dr.select__popoverInner_q86dr {
|
|
52
52
|
box-shadow: none;
|
|
53
53
|
border: none;
|
|
54
|
-
} .
|
|
54
|
+
} .select__optionsListWrapper_q86dr {
|
|
55
55
|
position: relative;
|
|
56
56
|
padding-top: var(--select-options-list-top-padding);
|
|
57
57
|
padding-bottom: var(--select-options-list-bottom-padding);
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
background: var(--select-option-background);
|
|
61
61
|
overflow: hidden;
|
|
62
62
|
will-change: transform;
|
|
63
|
-
} .
|
|
63
|
+
} .select__optionsListBorder_q86dr {
|
|
64
64
|
position: absolute;
|
|
65
65
|
top: 0;
|
|
66
66
|
right: 0;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
box-shadow: inset 0 0 0 1px var(--color-light-neutral-300);
|
|
70
70
|
border-radius: inherit;
|
|
71
71
|
pointer-events: none;
|
|
72
|
-
} .
|
|
72
|
+
} .select__nativeSelect_q86dr {
|
|
73
73
|
opacity: 0;
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
position: absolute;
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
height: 100%;
|
|
83
83
|
cursor: pointer;
|
|
84
84
|
z-index: 1;
|
|
85
|
-
} .
|
|
85
|
+
} .select__block_q86dr {
|
|
86
86
|
width: 100%;
|
|
87
|
-
} .
|
|
87
|
+
} .select__emptySearchPlaceholder_q86dr {
|
|
88
88
|
text-align: center;
|
|
89
|
-
} .
|
|
89
|
+
} .select__search_q86dr {
|
|
90
90
|
margin: var(--gap-s) var(--gap-s) 0
|
|
91
|
-
} .
|
|
91
|
+
} .select__search_q86dr:last-child {
|
|
92
92
|
margin-bottom: var(--gap-s);
|
|
93
93
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: x7knk */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -27,30 +27,30 @@
|
|
|
27
27
|
/* checkmark */
|
|
28
28
|
|
|
29
29
|
/* optgroup */
|
|
30
|
-
} .
|
|
30
|
+
} .select__sheet_1qeql {
|
|
31
31
|
overflow: hidden;
|
|
32
|
-
} .
|
|
32
|
+
} .select__sheetContent_1qeql.select__sheetContent_1qeql {
|
|
33
33
|
padding: 0
|
|
34
|
-
} .
|
|
34
|
+
} .select__sheetContent_1qeql.select__sheetContent_1qeql .select__modalContent_1qeql {
|
|
35
35
|
padding: 0;
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
|
-
} .
|
|
38
|
+
} .select__sheetContainer_1qeql {
|
|
39
39
|
padding: 0;
|
|
40
|
-
} .
|
|
40
|
+
} .select__optionsListWrapper_1qeql {
|
|
41
41
|
flex: 1;
|
|
42
|
-
} .
|
|
42
|
+
} .select__optionsList_1qeql.select__optionsList_1qeql {
|
|
43
43
|
height: 100%;
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-direction: column;
|
|
46
|
-
} .
|
|
46
|
+
} .select__scrollbar_1qeql {
|
|
47
47
|
flex: 1;
|
|
48
|
-
} .
|
|
48
|
+
} .select__search_1qeql {
|
|
49
49
|
padding: var(--gap-xs);
|
|
50
|
-
} .
|
|
50
|
+
} .select__option_1qeql.select__option_1qeql {
|
|
51
51
|
padding: var(--gap-2xs) var(--gap-l) var(--gap-2xs) var(--gap-m)
|
|
52
|
-
} .
|
|
52
|
+
} .select__option_1qeql.select__option_1qeql:before {
|
|
53
53
|
display: none;
|
|
54
|
-
} .
|
|
54
|
+
} .select__optionGroup_1qeql.select__optionGroup_1qeql {
|
|
55
55
|
padding: var(--gap-m) var(--gap-m) var(--gap-xs);
|
|
56
56
|
}
|
|
@@ -5,7 +5,7 @@ import { Checkbox } from '@alfalab/core-components-checkbox/esm';
|
|
|
5
5
|
import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
6
6
|
import CheckmarkMIcon from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
7
7
|
|
|
8
|
-
var styles = {"checkmark":"
|
|
8
|
+
var styles = {"checkmark":"select__checkmark_7gjck","after":"select__after_7gjck","single":"select__single_7gjck","selected":"select__selected_7gjck","before":"select__before_7gjck","multiple":"select__multiple_7gjck","colorIcon":"select__colorIcon_7gjck"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
var Checkmark = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: shx6e */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-1300: rgba(3, 3, 6, 0.88);
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
--select-checkmark-border-radius: var(--border-radius-circle);
|
|
40
40
|
|
|
41
41
|
/* optgroup */
|
|
42
|
-
} .
|
|
42
|
+
} .select__checkmark_7gjck {
|
|
43
43
|
flex-shrink: 0;
|
|
44
44
|
margin: var(--select-checkmark-margin)
|
|
45
|
-
} .
|
|
45
|
+
} .select__checkmark_7gjck.select__after_7gjck {
|
|
46
46
|
margin: var(--select-checkmark-margin-after);
|
|
47
|
-
} .
|
|
47
|
+
} .select__single_7gjck {
|
|
48
48
|
display: flex;
|
|
49
49
|
align-items: center;
|
|
50
50
|
justify-content: center;
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
border-radius: var(--select-checkmark-border-radius);
|
|
55
55
|
width: var(--select-checkmark-size);
|
|
56
56
|
height: var(--select-checkmark-size)
|
|
57
|
-
} .
|
|
57
|
+
} .select__single_7gjck.select__selected_7gjck {
|
|
58
58
|
opacity: 1;
|
|
59
|
-
} .
|
|
59
|
+
} .select__before_7gjck {
|
|
60
60
|
display: var(--select-checkmark-before-display)
|
|
61
|
-
} .
|
|
61
|
+
} .select__before_7gjck.select__multiple_7gjck {
|
|
62
62
|
margin-right: var(--gap-s);
|
|
63
63
|
display: var(--select-checkmark-before-display-multiple);
|
|
64
|
-
} .
|
|
64
|
+
} .select__after_7gjck.select__after_7gjck {
|
|
65
65
|
display: var(--select-checkmark-after-display)
|
|
66
|
-
} .
|
|
66
|
+
} .select__after_7gjck.select__after_7gjck.select__single_7gjck {
|
|
67
67
|
display: var(--select-checkmark-after-display-single);
|
|
68
|
-
} .
|
|
68
|
+
} .select__colorIcon_7gjck {
|
|
69
69
|
color: var(--color-light-status-positive);
|
|
70
70
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
4
4
|
|
|
5
|
-
var styles = {"checkmark":"
|
|
5
|
+
var styles = {"checkmark":"select__checkmark_1inq3","selected":"select__selected_1inq3","displayIcon":"select__displayIcon_1inq3","displayBadge":"select__displayBadge_1inq3"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Checkmark = function (_a) {
|