@alfalab/core-components-select 15.2.1 → 15.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.mobile.js +1 -1
- package/Component.modal.mobile.js +1 -1
- 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 +13 -13
- package/components/base-select/Component.js +6 -2
- package/components/base-select/index.css +11 -11
- package/components/base-select-mobile/Component.js +6 -2
- package/components/base-select-mobile/footer/Component.js +1 -1
- package/components/base-select-mobile/footer/index.css +5 -5
- package/components/base-select-mobile/index.css +16 -16
- 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/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/option/Component.js +1 -1
- package/components/option/index.css +20 -20
- package/components/options-list/Component.js +1 -1
- package/components/options-list/index.css +9 -9
- 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 +5 -1
- package/cssm/components/base-select-mobile/Component.js +5 -1
- package/esm/Component.mobile.js +1 -1
- package/esm/Component.modal.mobile.js +1 -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 +13 -13
- package/esm/components/base-select/Component.js +6 -2
- package/esm/components/base-select/index.css +11 -11
- package/esm/components/base-select-mobile/Component.js +6 -2
- package/esm/components/base-select-mobile/footer/Component.js +1 -1
- package/esm/components/base-select-mobile/footer/index.css +5 -5
- package/esm/components/base-select-mobile/index.css +16 -16
- 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/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 +20 -20
- package/esm/components/options-list/Component.js +1 -1
- package/esm/components/options-list/index.css +9 -9
- 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/esm/index.js +1 -1
- package/esm/mobile.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.js +1 -1
- package/index.js +1 -1
- package/mobile.js +1 -1
- package/modern/Component.mobile.js +1 -1
- package/modern/Component.modal.mobile.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 +13 -13
- package/modern/components/base-select/Component.js +6 -2
- package/modern/components/base-select/index.css +11 -11
- package/modern/components/base-select-mobile/Component.js +6 -2
- package/modern/components/base-select-mobile/footer/Component.js +1 -1
- package/modern/components/base-select-mobile/footer/index.css +5 -5
- package/modern/components/base-select-mobile/index.css +16 -16
- 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/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 +20 -20
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +9 -9
- 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/modern/index.js +1 -1
- package/modern/mobile.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.js +1 -1
- package/package.json +2 -2
- 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.js +1 -1
- package/src/components/base-select/Component.tsx +9 -1
- package/src/components/base-select-mobile/Component.tsx +9 -1
- /package/esm/{hook-fd09603a.d.ts → hook-571dca86.d.ts} +0 -0
- /package/esm/{hook-fd09603a.js → hook-571dca86.js} +0 -0
- /package/{hook-38a2e173.d.ts → hook-a6f060a1.d.ts} +0 -0
- /package/{hook-38a2e173.js → hook-a6f060a1.js} +0 -0
- /package/modern/{hook-ba0e806d.d.ts → hook-7e628eb4.d.ts} +0 -0
- /package/modern/{hook-ba0e806d.js → hook-7e628eb4.js} +0 -0
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Checkbox } from '@alfalab/core-components-checkbox/esm';
|
|
4
4
|
|
|
5
|
-
var styles = {"desktop":"
|
|
5
|
+
var styles = {"desktop":"select__desktop_1a8hu","mobile":"select__mobile_1a8hu"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Header = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1qszj */
|
|
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_1a8hu {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_1a8hu {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-571dca86";
|
|
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
|
10
10
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
11
11
|
import '../../components/checkmark-mobile/Component.js';
|
|
12
12
|
|
|
13
|
-
var styles = {"skeleton":"
|
|
13
|
+
var styles = {"skeleton":"select__skeleton_1eba2"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
function useSelectWithLoading(_a) {
|
package/esm/shared.js
CHANGED
|
@@ -9,7 +9,7 @@ export { BaseOption } from './components/base-option/Component.js';
|
|
|
9
9
|
export { Search } from './components/search/Component.js';
|
|
10
10
|
export { useSelectWithLoading } from './presets/useSelectWithLoading/hook.js';
|
|
11
11
|
export { useLazyLoading } from './presets/useLazyLoading/hook.js';
|
|
12
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from './hook-
|
|
12
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from './hook-571dca86.js';
|
|
13
13
|
export { defaultAccessor, defaultFilterFn, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from './utils.js';
|
|
14
14
|
import 'react';
|
|
15
15
|
import 'classnames';
|
package/index.js
CHANGED
|
@@ -44,7 +44,7 @@ require('@alfalab/core-components-base-modal');
|
|
|
44
44
|
require('@alfalab/core-components-button/mobile');
|
|
45
45
|
require('./components/virtual-options-list/Component.js');
|
|
46
46
|
require('react-virtual');
|
|
47
|
-
require('./hook-
|
|
47
|
+
require('./hook-a6f060a1.js');
|
|
48
48
|
require('./presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
|
|
49
49
|
require('@alfalab/core-components-button/desktop');
|
|
50
50
|
require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
package/mobile.js
CHANGED
|
@@ -38,7 +38,7 @@ require('@alfalab/core-components-base-modal');
|
|
|
38
38
|
require('@alfalab/core-components-button/mobile');
|
|
39
39
|
require('./components/virtual-options-list/Component.js');
|
|
40
40
|
require('react-virtual');
|
|
41
|
-
require('./hook-
|
|
41
|
+
require('./hook-a6f060a1.js');
|
|
42
42
|
require('./presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
|
|
43
43
|
require('@alfalab/core-components-button/desktop');
|
|
44
44
|
require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
@@ -9,7 +9,7 @@ import { Option } from './components/option/Component.js';
|
|
|
9
9
|
import { OptionsList } from './components/options-list/Component.js';
|
|
10
10
|
import { Search } from './components/search/Component.js';
|
|
11
11
|
import { VirtualOptionsList } from './components/virtual-options-list/Component.js';
|
|
12
|
-
import { u as useSelectWithApply } from './hook-
|
|
12
|
+
import { u as useSelectWithApply } from './hook-7e628eb4.js';
|
|
13
13
|
import { Header } from './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
14
14
|
import 'classnames';
|
|
15
15
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -8,7 +8,7 @@ import { Optgroup } from './components/optgroup/Component.js';
|
|
|
8
8
|
import { Option } from './components/option/Component.js';
|
|
9
9
|
import { OptionsList } from './components/options-list/Component.js';
|
|
10
10
|
import { VirtualOptionsList } from './components/virtual-options-list/Component.js';
|
|
11
|
-
import { u as useSelectWithApply } from './hook-
|
|
11
|
+
import { u as useSelectWithApply } from './hook-7e628eb4.js';
|
|
12
12
|
import { Header } from './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
13
13
|
import 'classnames';
|
|
14
14
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -38,7 +38,7 @@ import '@alfalab/core-components-base-modal/modern';
|
|
|
38
38
|
import '@alfalab/core-components-button/modern/mobile';
|
|
39
39
|
import './components/virtual-options-list/Component.js';
|
|
40
40
|
import 'react-virtual';
|
|
41
|
-
import './hook-
|
|
41
|
+
import './hook-7e628eb4.js';
|
|
42
42
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
43
43
|
import '@alfalab/core-components-button/modern/desktop';
|
|
44
44
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
@@ -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
|
-
const styles = {"arrow":"
|
|
5
|
+
const styles = {"arrow":"select__arrow_yw1vz","open":"select__open_yw1vz"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Arrow = ({ open, className }) => (React.createElement(ChevronDownMIcon, { className: cn(styles.arrow, className, { [styles.open]: open }) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 5xl7a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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_yw1vz {
|
|
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_yw1vz {
|
|
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/modern';
|
|
4
4
|
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
5
5
|
|
|
6
|
-
const styles = {"checkmark":"
|
|
6
|
+
const styles = {"checkmark":"select__checkmark_ld7ul","single":"select__single_ld7ul","selected":"select__selected_ld7ul"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const BaseCheckmark = ({ selected, disabled = false, className, multiple, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 31spa */
|
|
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 */
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
/* checkmark */
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
|
-
} .
|
|
26
|
+
} .select__checkmark_ld7ul {
|
|
27
27
|
flex-shrink: 0;
|
|
28
28
|
box-sizing: border-box;
|
|
29
|
-
} .
|
|
29
|
+
} .select__single_ld7ul {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: center;
|
|
33
33
|
opacity: 0
|
|
34
|
-
} .
|
|
34
|
+
} .select__single_ld7ul.select__selected_ld7ul {
|
|
35
35
|
opacity: 1;
|
|
36
36
|
}
|
|
@@ -4,7 +4,7 @@ import { BaseCheckmark } from '../base-checkmark/Component.js';
|
|
|
4
4
|
import '@alfalab/core-components-checkbox/modern';
|
|
5
5
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
6
6
|
|
|
7
|
-
const styles = {"option":"
|
|
7
|
+
const styles = {"option":"select__option_1c4es","disabled":"select__disabled_1c4es","checkmarkBefore":"select__checkmarkBefore_1c4es","mobile":"select__mobile_1c4es","checkmarkAfter":"select__checkmarkAfter_1c4es","textContent":"select__textContent_1c4es","selected":"select__selected_1c4es","highlighted":"select__highlighted_1c4es","content":"select__content_1c4es"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const BaseOption = ({ className, option, children, selected, highlighted, disabled, multiple, Checkmark = BaseCheckmark, checkmarkPosition = multiple ? 'before' : 'after', innerProps, dataTestId, mobile = false, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: iw1nm */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/* checkmark */
|
|
44
44
|
|
|
45
45
|
/* optgroup */
|
|
46
|
-
} .
|
|
46
|
+
} .select__option_1c4es {
|
|
47
47
|
font-size: 16px;
|
|
48
48
|
line-height: 20px;
|
|
49
49
|
font-weight: 400;
|
|
@@ -60,32 +60,32 @@
|
|
|
60
60
|
position: relative;
|
|
61
61
|
cursor: pointer;
|
|
62
62
|
min-height: var(--size-s-height)
|
|
63
|
-
} .
|
|
63
|
+
} .select__option_1c4es:not(.select__disabled_1c4es):active {
|
|
64
64
|
background: var(--select-option-active-background);
|
|
65
65
|
color: var(--select-option-active-color);
|
|
66
|
-
} .
|
|
66
|
+
} .select__option_1c4es.select__checkmarkBefore_1c4es {
|
|
67
67
|
padding: 0 0 0 var(--gap-s)
|
|
68
|
-
} .
|
|
68
|
+
} .select__option_1c4es.select__checkmarkBefore_1c4es.select__mobile_1c4es {
|
|
69
69
|
padding-left: var(--gap-m);
|
|
70
|
-
} .
|
|
70
|
+
} .select__option_1c4es.select__checkmarkAfter_1c4es {
|
|
71
71
|
padding: 0 var(--gap-s) 0 0
|
|
72
|
-
} .
|
|
72
|
+
} .select__option_1c4es.select__checkmarkAfter_1c4es.select__mobile_1c4es {
|
|
73
73
|
padding-right: var(--gap-l);
|
|
74
|
-
} .
|
|
74
|
+
} .select__option_1c4es.select__textContent_1c4es {
|
|
75
75
|
padding: var(--gap-s)
|
|
76
|
-
} .
|
|
76
|
+
} .select__option_1c4es.select__textContent_1c4es.select__mobile_1c4es {
|
|
77
77
|
padding: var(--gap-m) var(--gap-l) var(--gap-m) var(--gap-m);
|
|
78
|
-
} .
|
|
78
|
+
} .select__selected_1c4es {
|
|
79
79
|
background: var(--select-option-selected-background);
|
|
80
80
|
color: var(--select-option-selected-color);
|
|
81
81
|
cursor: default;
|
|
82
|
-
} .
|
|
82
|
+
} .select__highlighted_1c4es {
|
|
83
83
|
background: var(--select-option-hover-background);
|
|
84
84
|
color: var(--select-option-hover-color);
|
|
85
|
-
} .
|
|
85
|
+
} .select__disabled_1c4es {
|
|
86
86
|
cursor: var(--disabled-cursor);
|
|
87
87
|
background: var(--select-option-disabled-background);
|
|
88
88
|
color: var(--select-option-disabled-color);
|
|
89
|
-
} .
|
|
89
|
+
} .select__content_1c4es {
|
|
90
90
|
flex: 1;
|
|
91
91
|
}
|
|
@@ -9,7 +9,7 @@ import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
|
|
|
9
9
|
import { defaultAccessor, processOptions, defaultFilterFn } from '../../utils.js';
|
|
10
10
|
import { NativeSelect } from '../native-select/Component.js';
|
|
11
11
|
|
|
12
|
-
const styles = {"component":"
|
|
12
|
+
const styles = {"component":"select__component_iqbbc","popoverInner":"select__popoverInner_iqbbc","optionsList":"select__optionsList_iqbbc","optionsListBorder":"select__optionsListBorder_iqbbc","nativeSelect":"select__nativeSelect_iqbbc","block":"select__block_iqbbc","emptySearchPlaceholder":"select__emptySearchPlaceholder_iqbbc","search":"select__search_iqbbc"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
/* eslint-disable no-nested-ternary */
|
|
@@ -143,7 +143,11 @@ const BaseSelect = forwardRef(
|
|
|
143
143
|
};
|
|
144
144
|
const handleFieldKeyDown = (event) => {
|
|
145
145
|
inputProps.onKeyDown(event);
|
|
146
|
-
|
|
146
|
+
// https://caniuse.com/?search=KeyboardEvent.key
|
|
147
|
+
const isKeyUnsupported = event.key === 'Unidentified';
|
|
148
|
+
if (autocomplete &&
|
|
149
|
+
!open &&
|
|
150
|
+
(isKeyUnsupported || event.key.length === 1 || event.key === 'Backspace')) {
|
|
147
151
|
// Для автокомплита - открываем меню при начале ввода
|
|
148
152
|
openMenu();
|
|
149
153
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: xcxx3 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
/* checkmark */
|
|
38
38
|
|
|
39
39
|
/* optgroup */
|
|
40
|
-
} .
|
|
40
|
+
} .select__component_iqbbc {
|
|
41
41
|
width: max-content;
|
|
42
42
|
position: relative;
|
|
43
43
|
outline: 0;
|
|
44
44
|
max-width: 100%;
|
|
45
|
-
} .
|
|
45
|
+
} .select__popoverInner_iqbbc {
|
|
46
46
|
padding-top: var(--select-options-list-offset);
|
|
47
47
|
padding-bottom: var(--select-options-list-offset);
|
|
48
48
|
box-shadow: none;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
background: transparent;
|
|
51
51
|
border-radius: 0;
|
|
52
52
|
position: relative;
|
|
53
|
-
} .
|
|
53
|
+
} .select__optionsList_iqbbc {
|
|
54
54
|
position: relative;
|
|
55
55
|
padding-top: var(--select-options-list-top-padding);
|
|
56
56
|
padding-bottom: var(--select-options-list-bottom-padding);
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
background: var(--select-option-background);
|
|
60
60
|
overflow: hidden;
|
|
61
61
|
will-change: transform;
|
|
62
|
-
} .
|
|
62
|
+
} .select__optionsListBorder_iqbbc {
|
|
63
63
|
position: absolute;
|
|
64
64
|
top: 0;
|
|
65
65
|
right: 0;
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
box-shadow: inset 0 0 0 1px var(--color-light-border-secondary);
|
|
69
69
|
border-radius: inherit;
|
|
70
70
|
pointer-events: none;
|
|
71
|
-
} .
|
|
71
|
+
} .select__nativeSelect_iqbbc {
|
|
72
72
|
opacity: 0;
|
|
73
73
|
overflow: hidden;
|
|
74
74
|
position: absolute;
|
|
@@ -81,16 +81,16 @@
|
|
|
81
81
|
height: 100%;
|
|
82
82
|
cursor: pointer;
|
|
83
83
|
z-index: 1;
|
|
84
|
-
} .
|
|
84
|
+
} .select__block_iqbbc {
|
|
85
85
|
width: 100%;
|
|
86
|
-
} .
|
|
86
|
+
} .select__emptySearchPlaceholder_iqbbc {
|
|
87
87
|
text-align: center;
|
|
88
|
-
} .
|
|
88
|
+
} .select__search_iqbbc {
|
|
89
89
|
margin: var(--gap-s) var(--gap-s) 0
|
|
90
|
-
} .
|
|
90
|
+
} .select__search_iqbbc:last-child {
|
|
91
91
|
margin-bottom: var(--gap-s);
|
|
92
92
|
} /* width: max-content; fix for IE */ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
93
|
-
.
|
|
93
|
+
.select__component_iqbbc {
|
|
94
94
|
float: left;
|
|
95
95
|
clear: left;
|
|
96
96
|
}
|
|
@@ -25,7 +25,7 @@ import '../../consts.js';
|
|
|
25
25
|
import '@alfalab/core-components-input/modern';
|
|
26
26
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
27
27
|
|
|
28
|
-
const styles = {"component":"
|
|
28
|
+
const styles = {"component":"select__component_jmk0w","sheet":"select__sheet_jmk0w","sheetContent":"select__sheetContent_jmk0w","modalContent":"select__modalContent_jmk0w","sheetContainer":"select__sheetContainer_jmk0w","block":"select__block_jmk0w","optionsListWrapper":"select__optionsListWrapper_jmk0w","optionsList":"select__optionsList_jmk0w","scrollbar":"select__scrollbar_jmk0w","emptySearchPlaceholder":"select__emptySearchPlaceholder_jmk0w","search":"select__search_jmk0w","option":"select__option_jmk0w","optionGroup":"select__optionGroup_jmk0w"};
|
|
29
29
|
require('./index.css')
|
|
30
30
|
|
|
31
31
|
const BaseSelectMobile = forwardRef(({ dataTestId, className, fieldClassName, optionsListClassName, optionClassName, optionGroupClassName, optionsListProps, options = [], autocomplete = false, multiple = false, allowUnselect = false, disabled = false, closeOnSelect = !multiple, circularNavigation = false, defaultOpen = false, open: openProp, optionsListWidth = 'content', name, id, selected = [], size = 'm', optionsSize = 'm', error, hint, block, label, labelView, placeholder, fieldProps = {}, optionProps = {}, searchProps = {}, showSearch = false, valueRenderer, onChange, onOpen, onFocus, onBlur, Arrow: Arrow$1 = Arrow, Field: Field$1 = Field, Optgroup: Optgroup$1 = Optgroup, Option: Option$1 = Option, OptionsList: OptionsList$1 = OptionsList, Search: Search$1 = Search, swipeable, footer, isBottomSheet, bottomSheetProps, modalProps, modalHeaderProps, modalFooterProps, showEmptyOptionsList = false, }, ref) => {
|
|
@@ -168,7 +168,11 @@ const BaseSelectMobile = forwardRef(({ dataTestId, className, fieldClassName, op
|
|
|
168
168
|
};
|
|
169
169
|
const handleFieldKeyDown = (event) => {
|
|
170
170
|
inputProps.onKeyDown(event);
|
|
171
|
-
|
|
171
|
+
// https://caniuse.com/?search=KeyboardEvent.key
|
|
172
|
+
const isKeyUnsupported = event.key === 'Unidentified';
|
|
173
|
+
if (autocomplete &&
|
|
174
|
+
!open &&
|
|
175
|
+
(isKeyUnsupported || event.key.length === 1 || event.key === 'Backspace')) {
|
|
172
176
|
// Для автокомплита - открываем меню при начале ввода
|
|
173
177
|
openMenu();
|
|
174
178
|
}
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { BaseModalContext } from '@alfalab/core-components-base-modal/modern';
|
|
4
4
|
import { ButtonMobile } from '@alfalab/core-components-button/modern/mobile';
|
|
5
5
|
|
|
6
|
-
const styles = {"footer":"
|
|
6
|
+
const styles = {"footer":"select__footer_n468t","button":"select__button_n468t","highlighted":"select__highlighted_n468t"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const Footer = ({ handleApply, handleClear, showClear }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1gvmg */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
/* checkmark */
|
|
27
27
|
|
|
28
28
|
/* optgroup */
|
|
29
|
-
} .
|
|
29
|
+
} .select__footer_n468t {
|
|
30
30
|
display: flex;
|
|
31
31
|
box-sizing: border-box;
|
|
32
32
|
width: 100%;
|
|
33
33
|
padding: var(--gap-m) var(--gap-m);
|
|
34
34
|
background-color: var(--color-light-bg-primary)
|
|
35
|
-
} .
|
|
35
|
+
} .select__footer_n468t .select__button_n468t:first-of-type {
|
|
36
36
|
margin-right: var(--gap-m);
|
|
37
|
-
} .
|
|
37
|
+
} .select__button_n468t {
|
|
38
38
|
width: 50%;
|
|
39
|
-
} .
|
|
39
|
+
} .select__highlighted_n468t {
|
|
40
40
|
border-top: 1px solid var(--color-light-border-primary);
|
|
41
41
|
background-color: var(--color-light-bg-primary);
|
|
42
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1krh3 */
|
|
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 */
|
|
@@ -27,44 +27,44 @@
|
|
|
27
27
|
/* checkmark */
|
|
28
28
|
|
|
29
29
|
/* optgroup */
|
|
30
|
-
} .
|
|
30
|
+
} .select__component_jmk0w {
|
|
31
31
|
width: max-content;
|
|
32
32
|
position: relative;
|
|
33
33
|
outline: 0;
|
|
34
34
|
max-width: 100%;
|
|
35
|
-
} .
|
|
35
|
+
} .select__sheet_jmk0w {
|
|
36
36
|
overflow: hidden;
|
|
37
|
-
} .
|
|
37
|
+
} .select__sheetContent_jmk0w {
|
|
38
38
|
padding: 0
|
|
39
|
-
} .
|
|
39
|
+
} .select__sheetContent_jmk0w .select__modalContent_jmk0w {
|
|
40
40
|
padding: 0;
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
|
-
} .
|
|
43
|
+
} .select__sheetContainer_jmk0w {
|
|
44
44
|
padding: 0;
|
|
45
|
-
} .
|
|
45
|
+
} .select__block_jmk0w {
|
|
46
46
|
width: 100%;
|
|
47
|
-
} .
|
|
47
|
+
} .select__optionsListWrapper_jmk0w {
|
|
48
48
|
flex: 1;
|
|
49
|
-
} .
|
|
49
|
+
} .select__optionsList_jmk0w {
|
|
50
50
|
height: 100%;
|
|
51
51
|
display: flex;
|
|
52
52
|
flex-direction: column;
|
|
53
|
-
} .
|
|
53
|
+
} .select__scrollbar_jmk0w {
|
|
54
54
|
flex: 1;
|
|
55
|
-
} .
|
|
55
|
+
} .select__emptySearchPlaceholder_jmk0w {
|
|
56
56
|
text-align: center;
|
|
57
|
-
} .
|
|
57
|
+
} .select__search_jmk0w {
|
|
58
58
|
padding: var(--gap-xs);
|
|
59
59
|
} /* width: max-content; fix for IE */ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
60
|
-
.
|
|
60
|
+
.select__component_jmk0w {
|
|
61
61
|
float: left;
|
|
62
62
|
clear: left;
|
|
63
63
|
}
|
|
64
|
-
} .
|
|
64
|
+
} .select__option_jmk0w {
|
|
65
65
|
padding: var(--gap-2xs) var(--gap-l) var(--gap-2xs) var(--gap-m)
|
|
66
|
-
} .
|
|
66
|
+
} .select__option_jmk0w:before {
|
|
67
67
|
display: none;
|
|
68
|
-
} .
|
|
68
|
+
} .select__optionGroup_jmk0w {
|
|
69
69
|
padding: var(--gap-m) var(--gap-m) var(--gap-xs);
|
|
70
70
|
}
|
|
@@ -5,7 +5,7 @@ import { Checkbox } from '@alfalab/core-components-checkbox/modern';
|
|
|
5
5
|
import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
6
6
|
import CheckmarkMIcon from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
7
7
|
|
|
8
|
-
const styles = {"checkmark":"
|
|
8
|
+
const styles = {"checkmark":"select__checkmark_1nk9m","after":"select__after_1nk9m","single":"select__single_1nk9m","selected":"select__selected_1nk9m","before":"select__before_1nk9m","multiple":"select__multiple_1nk9m","colorIcon":"select__colorIcon_1nk9m"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
const Checkmark = ({ selected, disabled = false, className, multiple, position = 'before', }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ffqd */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-positive: #2fc26e;
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
--select-checkmark-border-radius: var(--border-radius-circle);
|
|
40
40
|
|
|
41
41
|
/* optgroup */
|
|
42
|
-
} .
|
|
42
|
+
} .select__checkmark_1nk9m {
|
|
43
43
|
flex-shrink: 0;
|
|
44
44
|
margin: var(--select-checkmark-margin)
|
|
45
|
-
} .
|
|
45
|
+
} .select__checkmark_1nk9m.select__after_1nk9m {
|
|
46
46
|
margin: var(--select-checkmark-margin-after);
|
|
47
|
-
} .
|
|
47
|
+
} .select__single_1nk9m {
|
|
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_1nk9m.select__selected_1nk9m {
|
|
58
58
|
opacity: 1;
|
|
59
|
-
} .
|
|
59
|
+
} .select__before_1nk9m {
|
|
60
60
|
display: var(--select-checkmark-before-display)
|
|
61
|
-
} .
|
|
61
|
+
} .select__before_1nk9m.select__multiple_1nk9m {
|
|
62
62
|
margin-right: var(--gap-s);
|
|
63
63
|
display: var(--select-checkmark-before-display-multiple);
|
|
64
|
-
} .
|
|
64
|
+
} .select__after_1nk9m {
|
|
65
65
|
display: var(--select-checkmark-after-display)
|
|
66
|
-
} .
|
|
66
|
+
} .select__after_1nk9m.select__single_1nk9m {
|
|
67
67
|
display: var(--select-checkmark-after-display-single);
|
|
68
|
-
} .
|
|
68
|
+
} .select__colorIcon_1nk9m {
|
|
69
69
|
color: var(--color-light-graphic-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
|
-
const styles = {"checkmark":"
|
|
5
|
+
const styles = {"checkmark":"select__checkmark_1b0yc","selected":"select__selected_1b0yc","displayIcon":"select__displayIcon_1b0yc","displayBadge":"select__displayBadge_1b0yc"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Checkmark = ({ selected, className }) => (React.createElement("div", { className: cn(styles.checkmark, className, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ahj4r */
|
|
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 */
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
--select-mobile-checkmark-display-badge: none;
|
|
26
26
|
|
|
27
27
|
/* optgroup */
|
|
28
|
-
} .
|
|
28
|
+
} .select__checkmark_1b0yc {
|
|
29
29
|
flex-shrink: 0;
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
width: 24px;
|
|
34
34
|
height: 24px;
|
|
35
35
|
opacity: 0
|
|
36
|
-
} .
|
|
36
|
+
} .select__checkmark_1b0yc:first-child {
|
|
37
37
|
display: none;
|
|
38
|
-
} .
|
|
38
|
+
} .select__checkmark_1b0yc.select__selected_1b0yc {
|
|
39
39
|
opacity: 1;
|
|
40
|
-
} .
|
|
40
|
+
} .select__displayIcon_1b0yc {
|
|
41
41
|
display: var(--select-mobile-checkmark-display-icon);
|
|
42
|
-
} .
|
|
42
|
+
} .select__displayBadge_1b0yc {
|
|
43
43
|
display: var(--select-mobile-checkmark-display-badge);
|
|
44
44
|
}
|
|
@@ -4,7 +4,7 @@ import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
|
4
4
|
import { useFocus } from '@alfalab/hooks';
|
|
5
5
|
import { joinOptions } from '../../utils.js';
|
|
6
6
|
|
|
7
|
-
const styles = {"component":"
|
|
7
|
+
const styles = {"component":"select__component_19tbv","field":"select__field_19tbv","disabled":"select__disabled_19tbv","arrow":"select__arrow_19tbv","placeholder":"select__placeholder_19tbv","show-placeholder":"select__show-placeholder_19tbv","focused":"select__focused_19tbv","contentWrapper":"select__contentWrapper_19tbv","value":"select__value_19tbv","focusVisible":"select__focusVisible_19tbv"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const Field = ({ size = 'm', open, multiple, error, hint, disabled, label, labelView = 'inner', placeholder, selectedMultiple = [], selected, rightAddons, valueRenderer = joinOptions, setSelectedItems, toggleMenu, Arrow, innerProps, dataTestId, fieldClassName, FormControlComponent, ...restProps }) => {
|