@alfalab/core-components-select 16.0.3 → 17.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/Component.responsive.js +1 -1
- 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 +22 -22
- package/components/base-select/Component.js +7 -4
- package/components/base-select/index.css +14 -19
- package/components/base-select/mobile.css +12 -17
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +14 -14
- 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 +10 -10
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +8 -8
- package/components/option/Component.js +1 -1
- package/components/option/index.css +28 -34
- package/components/options-list/Component.js +1 -1
- package/components/options-list/index.css +12 -12
- 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 +18 -18
- package/cssm/components/base-option/index.module.css +9 -9
- package/cssm/components/base-select/Component.js +5 -2
- package/cssm/components/base-select/index.module.css +4 -9
- package/cssm/components/base-select/mobile.module.css +0 -5
- package/cssm/components/checkmark/index.module.css +4 -4
- package/cssm/components/footer/index.module.css +5 -5
- package/cssm/components/optgroup/index.module.css +2 -2
- package/cssm/components/option/index.module.css +9 -15
- package/cssm/components/options-list/index.module.css +3 -3
- package/cssm/components/virtual-options-list/index.module.css +3 -3
- package/cssm/shared/index.d.ts +1 -0
- package/cssm/shared/index.js +5 -0
- package/cssm/typings.d.ts +4 -1
- package/esm/Component.responsive.js +1 -1
- 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 +22 -22
- package/esm/components/base-select/Component.js +7 -4
- package/esm/components/base-select/index.css +14 -19
- package/esm/components/base-select/mobile.css +12 -17
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +14 -14
- 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 +10 -10
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +8 -8
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +28 -34
- package/esm/components/options-list/Component.js +1 -1
- package/esm/components/options-list/index.css +12 -12
- 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 +18 -18
- package/esm/index.js +1 -1
- package/esm/mobile/Component.mobile.js +1 -1
- package/esm/mobile/Component.modal.mobile.js +1 -1
- package/esm/mobile/index.js +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 +1 -1
- 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.d.ts +1 -0
- package/esm/shared/index.js +4 -1
- package/esm/typings.d.ts +4 -1
- package/index.js +1 -1
- package/mobile/Component.mobile.js +1 -1
- package/mobile/Component.modal.mobile.js +1 -1
- package/mobile/index.js +1 -1
- package/modern/Component.responsive.js +1 -1
- 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 +22 -22
- package/modern/components/base-select/Component.js +6 -4
- package/modern/components/base-select/index.css +14 -19
- package/modern/components/base-select/mobile.css +12 -17
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +14 -14
- 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 +10 -10
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +8 -8
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +28 -34
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +12 -12
- 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 +18 -18
- package/modern/index.js +1 -1
- package/modern/mobile/Component.mobile.js +1 -1
- package/modern/mobile/Component.modal.mobile.js +1 -1
- package/modern/mobile/index.js +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 +1 -1
- 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.d.ts +1 -0
- package/modern/shared/index.js +4 -1
- package/modern/typings.d.ts +4 -1
- package/package.json +12 -12
- 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 +1 -1
- 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.d.ts +1 -0
- package/shared/index.js +5 -1
- package/src/components/base-select/Component.tsx +5 -2
- package/src/components/base-select/index.module.css +1 -10
- package/src/components/base-select/mobile.module.css +0 -8
- package/src/components/checkmark/index.module.css +1 -1
- package/src/components/footer/index.module.css +3 -3
- package/src/components/option/index.module.css +0 -10
- package/src/components/options-list/index.module.css +2 -2
- package/src/components/virtual-options-list/index.module.css +2 -2
- package/src/shared/index.ts +1 -0
- package/src/typings.ts +4 -1
- package/src/vars.css +7 -7
- package/typings.d.ts +4 -1
- /package/esm/{hook-a287da6c.d.ts → hook-a2365c8a.d.ts} +0 -0
- /package/esm/{hook-a287da6c.js → hook-a2365c8a.js} +0 -0
- /package/{hook-d8cd1702.d.ts → hook-75164a56.d.ts} +0 -0
- /package/{hook-d8cd1702.js → hook-75164a56.js} +0 -0
- /package/modern/{hook-14cdb84d.d.ts → hook-01e84bc2.d.ts} +0 -0
- /package/modern/{hook-14cdb84d.js → hook-01e84bc2.js} +0 -0
|
@@ -9,7 +9,7 @@ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
|
9
9
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
10
10
|
import '../../components/checkmark-mobile/Component.js';
|
|
11
11
|
|
|
12
|
-
const styles = {"skeleton":"
|
|
12
|
+
const styles = {"skeleton":"select__skeleton_y23mv"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
function useSelectWithLoading({ loading = false, visibleOptions = 6, Option: Option$1 = Option, }) {
|
package/modern/shared/index.d.ts
CHANGED
package/modern/shared/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-01e84bc2.js';
|
|
4
4
|
export { defaultAccessor, defaultFilterFn, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
|
|
5
5
|
export { Option } from '../components/option/Component.js';
|
|
6
6
|
export { BaseOption } from '../components/base-option/Component.js';
|
|
@@ -11,6 +11,7 @@ export { Arrow } from '../components/arrow/Component.js';
|
|
|
11
11
|
export { BaseSelect } from '../components/base-select/Component.js';
|
|
12
12
|
export { Optgroup } from '../components/optgroup/Component.js';
|
|
13
13
|
export { Footer } from '../components/footer/Component.js';
|
|
14
|
+
export { Search } from '../components/search/Component.js';
|
|
14
15
|
import 'react';
|
|
15
16
|
import '@alfalab/core-components-skeleton/modern';
|
|
16
17
|
import 'intersection-observer';
|
|
@@ -39,3 +40,5 @@ import 'downshift';
|
|
|
39
40
|
import '../components/native-select/Component.js';
|
|
40
41
|
import '@alfalab/core-components-base-modal/modern';
|
|
41
42
|
import '@alfalab/core-components-button/modern/mobile';
|
|
43
|
+
import '@alfalab/core-components-input/modern';
|
|
44
|
+
import '@alfalab/icons-glyph/MagnifierMIcon';
|
package/modern/typings.d.ts
CHANGED
|
@@ -47,7 +47,10 @@ type BaseSelectChangePayload = {
|
|
|
47
47
|
};
|
|
48
48
|
type BaseSelectProps = {
|
|
49
49
|
/**
|
|
50
|
-
* Идентификатор для систем автоматизированного
|
|
50
|
+
* Идентификатор для систем автоматизированного тестирования.
|
|
51
|
+
* Для пункта меню используется модификатор -option, компонента поиска -search,
|
|
52
|
+
* компонента выпадающего меню -options-list, компонента BottomSheet -bottom-sheet,
|
|
53
|
+
* компонента поля -field, компонета FormControl -field-form-control
|
|
51
54
|
*/
|
|
52
55
|
dataTestId?: string;
|
|
53
56
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-select",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "Select component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-badge": "^5.
|
|
19
|
-
"@alfalab/core-components-base-modal": "^5.
|
|
20
|
-
"@alfalab/core-components-bottom-sheet": "^6.
|
|
21
|
-
"@alfalab/core-components-button": "^
|
|
22
|
-
"@alfalab/core-components-checkbox": "^
|
|
23
|
-
"@alfalab/core-components-form-control": "^
|
|
24
|
-
"@alfalab/core-components-input": "^
|
|
25
|
-
"@alfalab/core-components-modal": "^
|
|
18
|
+
"@alfalab/core-components-badge": "^5.4.0",
|
|
19
|
+
"@alfalab/core-components-base-modal": "^5.7.0",
|
|
20
|
+
"@alfalab/core-components-bottom-sheet": "^6.13.0",
|
|
21
|
+
"@alfalab/core-components-button": "^11.0.0",
|
|
22
|
+
"@alfalab/core-components-checkbox": "^4.0.0",
|
|
23
|
+
"@alfalab/core-components-form-control": "^12.0.0",
|
|
24
|
+
"@alfalab/core-components-input": "^14.0.0",
|
|
25
|
+
"@alfalab/core-components-modal": "^9.0.0",
|
|
26
26
|
"@alfalab/core-components-mq": "^4.2.0",
|
|
27
|
-
"@alfalab/core-components-popover": "^6.
|
|
28
|
-
"@alfalab/core-components-scrollbar": "^
|
|
29
|
-
"@alfalab/core-components-skeleton": "^4.
|
|
27
|
+
"@alfalab/core-components-popover": "^6.2.0",
|
|
28
|
+
"@alfalab/core-components-scrollbar": "^3.0.0",
|
|
29
|
+
"@alfalab/core-components-skeleton": "^4.2.0",
|
|
30
30
|
"@alfalab/core-components-shared": "^0.8.0",
|
|
31
31
|
"@alfalab/hooks": "^1.13.0",
|
|
32
32
|
"@alfalab/icons-glyph": "^2.108.0",
|
package/presets/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var presets_useSelectWithLoading_hook = require('./useSelectWithLoading/hook.js');
|
|
6
6
|
var presets_useLazyLoading_hook = require('./useLazyLoading/hook.js');
|
|
7
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
7
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-75164a56.js');
|
|
8
8
|
require('tslib');
|
|
9
9
|
require('react');
|
|
10
10
|
require('@alfalab/core-components-skeleton');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('tslib');
|
|
6
6
|
require('react');
|
|
7
7
|
require('../../utils.js');
|
|
8
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-
|
|
8
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-75164a56.js');
|
|
9
9
|
require('../../components/options-list/Component.js');
|
|
10
10
|
require('react-merge-refs');
|
|
11
11
|
require('classnames');
|
|
@@ -6,7 +6,7 @@ require('tslib');
|
|
|
6
6
|
require('react');
|
|
7
7
|
require('../../../components/options-list/Component.js');
|
|
8
8
|
require('../../../consts.js');
|
|
9
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-
|
|
9
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-75164a56.js');
|
|
10
10
|
require('./footer/Component.js');
|
|
11
11
|
require('./header/Component.js');
|
|
12
12
|
require('react-merge-refs');
|
|
@@ -9,7 +9,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
11
|
|
|
12
|
-
var styles = {"footer":"
|
|
12
|
+
var styles = {"footer":"select__footer_4ycc8"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ywl69 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
--gap-s: 12px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .
|
|
20
|
+
} .select__footer_4ycc8 {
|
|
21
21
|
background-color: var(--color-light-bg-primary);
|
|
22
22
|
padding: var(--gap-s);
|
|
23
23
|
outline: none
|
|
24
|
-
} .
|
|
24
|
+
} .select__footer_4ycc8 > * + * {
|
|
25
25
|
margin-left: var(--gap-xs);
|
|
26
26
|
}
|
|
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"desktop":"
|
|
14
|
+
var styles = {"desktop":"select__desktop_1qatu","mobile":"select__mobile_1qatu"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Header = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: d6t9d */
|
|
2
2
|
:root {
|
|
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 */
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
--gap-s: 12px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .
|
|
19
|
+
} .select__desktop_1qatu {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_1qatu {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-75164a56";
|
|
@@ -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-75164a56.js');
|
|
6
6
|
require('tslib');
|
|
7
7
|
require('react');
|
|
8
8
|
require('../../../utils.js');
|
|
@@ -18,7 +18,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
18
18
|
|
|
19
19
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
20
20
|
|
|
21
|
-
var styles = {"skeleton":"
|
|
21
|
+
var styles = {"skeleton":"select__skeleton_y23mv"};
|
|
22
22
|
require('./index.css')
|
|
23
23
|
|
|
24
24
|
function useSelectWithLoading(_a) {
|
package/shared/index.d.ts
CHANGED
package/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-75164a56.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');
|
|
@@ -15,6 +15,7 @@ var components_arrow_Component = require('../components/arrow/Component.js');
|
|
|
15
15
|
var components_baseSelect_Component = require('../components/base-select/Component.js');
|
|
16
16
|
var components_optgroup_Component = require('../components/optgroup/Component.js');
|
|
17
17
|
var components_footer_Component = require('../components/footer/Component.js');
|
|
18
|
+
var components_search_Component = require('../components/search/Component.js');
|
|
18
19
|
require('tslib');
|
|
19
20
|
require('react');
|
|
20
21
|
require('@alfalab/core-components-skeleton');
|
|
@@ -44,6 +45,8 @@ require('downshift');
|
|
|
44
45
|
require('../components/native-select/Component.js');
|
|
45
46
|
require('@alfalab/core-components-base-modal');
|
|
46
47
|
require('@alfalab/core-components-button/mobile');
|
|
48
|
+
require('@alfalab/core-components-input');
|
|
49
|
+
require('@alfalab/icons-glyph/MagnifierMIcon');
|
|
47
50
|
|
|
48
51
|
|
|
49
52
|
|
|
@@ -69,3 +72,4 @@ exports.Arrow = components_arrow_Component.Arrow;
|
|
|
69
72
|
exports.BaseSelect = components_baseSelect_Component.BaseSelect;
|
|
70
73
|
exports.Optgroup = components_optgroup_Component.Optgroup;
|
|
71
74
|
exports.Footer = components_footer_Component.Footer;
|
|
75
|
+
exports.Search = components_search_Component.Search;
|
|
@@ -151,6 +151,7 @@ export const BaseSelect = forwardRef(
|
|
|
151
151
|
const searchRef = useRef<HTMLInputElement>(null);
|
|
152
152
|
const alreadyClickedRef = useRef<boolean>(false);
|
|
153
153
|
const scrollableContainerRef = useRef<HTMLDivElement>(null);
|
|
154
|
+
const onOpenRef = useRef(onOpen);
|
|
154
155
|
|
|
155
156
|
const [searchState, setSearchState] = React.useState('');
|
|
156
157
|
|
|
@@ -219,6 +220,8 @@ export const BaseSelect = forwardRef(
|
|
|
219
220
|
useMultipleSelectionProps.selectedItems = selectedOptions;
|
|
220
221
|
}
|
|
221
222
|
|
|
223
|
+
onOpenRef.current = onOpen;
|
|
224
|
+
|
|
222
225
|
const {
|
|
223
226
|
selectedItems,
|
|
224
227
|
addSelectedItem,
|
|
@@ -247,7 +250,7 @@ export const BaseSelect = forwardRef(
|
|
|
247
250
|
defaultHighlightedIndex: selectedItems.length === 0 ? -1 : undefined,
|
|
248
251
|
scrollIntoView,
|
|
249
252
|
onIsOpenChange: (changes) => {
|
|
250
|
-
if (
|
|
253
|
+
if (onOpenRef.current) {
|
|
251
254
|
/**
|
|
252
255
|
* Вызываем обработчик асинхронно.
|
|
253
256
|
*
|
|
@@ -255,7 +258,7 @@ export const BaseSelect = forwardRef(
|
|
|
255
258
|
* А затем сработает onClick кнопки открытия\закрытия с open=false и в итоге селект откроется снова.
|
|
256
259
|
*/
|
|
257
260
|
setTimeout(() => {
|
|
258
|
-
|
|
261
|
+
onOpenRef.current?.({
|
|
259
262
|
open: changes.isOpen,
|
|
260
263
|
name,
|
|
261
264
|
});
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
right: 0;
|
|
36
36
|
bottom: 0;
|
|
37
37
|
left: 0;
|
|
38
|
-
box-shadow: inset 0 0 0 1px var(--color-light-
|
|
38
|
+
box-shadow: inset 0 0 0 1px var(--color-light-neutral-300);
|
|
39
39
|
border-radius: inherit;
|
|
40
40
|
pointer-events: none;
|
|
41
41
|
}
|
|
@@ -70,12 +70,3 @@
|
|
|
70
70
|
margin-bottom: var(--gap-s);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
/* width: max-content; fix for IE */
|
|
75
|
-
|
|
76
|
-
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
77
|
-
.component {
|
|
78
|
-
float: left;
|
|
79
|
-
clear: left;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -37,14 +37,6 @@
|
|
|
37
37
|
padding: var(--gap-xs);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
/* width: max-content; fix for IE */
|
|
41
|
-
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
42
|
-
.component {
|
|
43
|
-
float: left;
|
|
44
|
-
clear: left;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
40
|
.option {
|
|
49
41
|
padding: var(--gap-2xs) var(--gap-l) var(--gap-2xs) var(--gap-m);
|
|
50
42
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
box-sizing: border-box;
|
|
7
7
|
width: 100%;
|
|
8
8
|
padding: var(--gap-m) var(--gap-m);
|
|
9
|
-
background-color: var(--color-light-bg-primary);
|
|
9
|
+
background-color: var(--color-light-modal-bg-primary);
|
|
10
10
|
|
|
11
11
|
& .button:first-of-type {
|
|
12
12
|
margin-right: var(--gap-m);
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.highlighted {
|
|
21
|
-
border-top: 1px solid var(--color-light-
|
|
22
|
-
background-color: var(--color-light-bg-primary);
|
|
21
|
+
border-top: 1px solid var(--color-light-neutral-300);
|
|
22
|
+
background-color: var(--color-light-modal-bg-primary);
|
|
23
23
|
}
|
|
@@ -96,13 +96,3 @@
|
|
|
96
96
|
padding-top: var(--gap-s);
|
|
97
97
|
padding-bottom: var(--gap-s);
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
/* IE min-height fix */
|
|
101
|
-
|
|
102
|
-
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
103
|
-
.option:after {
|
|
104
|
-
min-height: inherit;
|
|
105
|
-
font-size: 0;
|
|
106
|
-
content: '';
|
|
107
|
-
}
|
|
108
|
-
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
.optionsListHeader {
|
|
12
12
|
box-sizing: border-box;
|
|
13
|
-
border-bottom: 1px solid var(--color-light-
|
|
13
|
+
border-bottom: 1px solid var(--color-light-neutral-300);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.optionsListFooter {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
border-top: 1px solid transparent;
|
|
21
21
|
|
|
22
22
|
&.withBorder {
|
|
23
|
-
border-top: 1px solid var(--color-light-
|
|
23
|
+
border-top: 1px solid var(--color-light-neutral-300);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
.virtualOptionsListHeader {
|
|
12
12
|
box-sizing: border-box;
|
|
13
|
-
border-bottom: 1px solid var(--color-light-
|
|
13
|
+
border-bottom: 1px solid var(--color-light-neutral-300);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.virtualOptionsListFooter {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
border-top: 1px solid transparent;
|
|
21
21
|
|
|
22
22
|
&.withBorder {
|
|
23
|
-
border-top: 1px solid var(--color-light-
|
|
23
|
+
border-top: 1px solid var(--color-light-neutral-300);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
package/src/shared/index.ts
CHANGED
package/src/typings.ts
CHANGED
|
@@ -70,7 +70,10 @@ export type BaseSelectChangePayload = {
|
|
|
70
70
|
|
|
71
71
|
export type BaseSelectProps = {
|
|
72
72
|
/**
|
|
73
|
-
* Идентификатор для систем автоматизированного
|
|
73
|
+
* Идентификатор для систем автоматизированного тестирования.
|
|
74
|
+
* Для пункта меню используется модификатор -option, компонента поиска -search,
|
|
75
|
+
* компонента выпадающего меню -options-list, компонента BottomSheet -bottom-sheet,
|
|
76
|
+
* компонента поля -field, компонета FormControl -field-form-control
|
|
74
77
|
*/
|
|
75
78
|
dataTestId?: string;
|
|
76
79
|
|
package/src/vars.css
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
--select-option-right-padding: var(--gap-s);
|
|
21
21
|
--select-option-l-left-padding: var(--gap-m);
|
|
22
22
|
--select-option-l-right-padding: var(--gap-m);
|
|
23
|
-
--select-option-background: var(--color-light-bg-primary);
|
|
24
|
-
--select-option-selected-background: var(--color-light-bg-primary);
|
|
25
|
-
--select-option-hover-background: var(--color-light-
|
|
26
|
-
--select-option-active-background: var(--color-light-
|
|
27
|
-
--select-option-disabled-background: var(--color-light-bg-primary);
|
|
23
|
+
--select-option-background: var(--color-light-modal-bg-primary);
|
|
24
|
+
--select-option-selected-background: var(--color-light-modal-bg-primary);
|
|
25
|
+
--select-option-hover-background: var(--color-light-transparent-default-hover);
|
|
26
|
+
--select-option-active-background: var(--color-light-transparent-default-press);
|
|
27
|
+
--select-option-disabled-background: var(--color-light-modal-bg-primary);
|
|
28
28
|
--select-option-color: var(--color-light-text-primary);
|
|
29
29
|
--select-option-selected-color: var(--color-light-text-primary);
|
|
30
30
|
--select-option-hover-color: var(--color-light-text-primary);
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
--select-checkmark-before-display-multiple: block;
|
|
42
42
|
--select-checkmark-after-display-single: none;
|
|
43
43
|
--select-checkmark-unselected-opacity: 0;
|
|
44
|
-
--select-checkmark-background: var(--color-light-
|
|
44
|
+
--select-checkmark-background: var(--color-light-neutral-1500);
|
|
45
45
|
--select-checkmark-border-radius: var(--border-radius-circle);
|
|
46
46
|
--select-mobile-checkmark-display-icon: block;
|
|
47
47
|
--select-mobile-checkmark-display-badge: none;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
/* optgroup */
|
|
50
50
|
|
|
51
51
|
--select-optgroup-color: var(--color-light-text-secondary);
|
|
52
|
-
--select-optgroup-background: var(--color-light-bg-primary);
|
|
52
|
+
--select-optgroup-background: var(--color-light-modal-bg-primary);
|
|
53
53
|
--select-optgroup-left-padding: var(--gap-s);
|
|
54
54
|
--select-optgroup-right-padding: var(--gap-s);
|
|
55
55
|
--select-optgroup-l-left-padding: var(--gap-m);
|
package/typings.d.ts
CHANGED
|
@@ -47,7 +47,10 @@ type BaseSelectChangePayload = {
|
|
|
47
47
|
};
|
|
48
48
|
type BaseSelectProps = {
|
|
49
49
|
/**
|
|
50
|
-
* Идентификатор для систем автоматизированного
|
|
50
|
+
* Идентификатор для систем автоматизированного тестирования.
|
|
51
|
+
* Для пункта меню используется модификатор -option, компонента поиска -search,
|
|
52
|
+
* компонента выпадающего меню -options-list, компонента BottomSheet -bottom-sheet,
|
|
53
|
+
* компонента поля -field, компонета FormControl -field-form-control
|
|
51
54
|
*/
|
|
52
55
|
dataTestId?: string;
|
|
53
56
|
/**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|