@alfalab/core-components-select 16.0.0 → 16.0.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 +7 -6
- package/components/base-select/index.css +11 -11
- package/components/base-select/mobile.css +13 -13
- 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 +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 -4
- 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 +7 -6
- package/esm/components/base-select/index.css +11 -11
- package/esm/components/base-select/mobile.css +13 -13
- 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 +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/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.js +1 -1
- package/index.js +1 -1
- package/mobile/index.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 +4 -3
- package/modern/components/base-select/index.css +11 -11
- package/modern/components/base-select/mobile.css +13 -13
- 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 +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/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.js +1 -1
- package/package.json +6 -6
- 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.js +1 -1
- package/src/components/base-select/Component.tsx +5 -1
- /package/esm/{hook-8209d0d1.d.ts → hook-3d076499.d.ts} +0 -0
- /package/esm/{hook-8209d0d1.js → hook-3d076499.js} +0 -0
- /package/{hook-cb17586d.d.ts → hook-693409b2.d.ts} +0 -0
- /package/{hook-cb17586d.js → hook-693409b2.js} +0 -0
- /package/modern/{hook-4a3d365d.d.ts → hook-8b4455f6.d.ts} +0 -0
- /package/modern/{hook-4a3d365d.js → hook-8b4455f6.js} +0 -0
|
@@ -7,7 +7,7 @@ import '@alfalab/core-components-checkbox/modern';
|
|
|
7
7
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
9
9
|
|
|
10
|
-
const styles = {"option":"
|
|
10
|
+
const styles = {"option":"select__option_o13vx","disabled":"select__disabled_o13vx","s":"select__s_o13vx","m":"select__m_o13vx","l":"select__l_o13vx","xl":"select__xl_o13vx","selected":"select__selected_o13vx","highlighted":"select__highlighted_o13vx","content":"select__content_o13vx","textContent":"select__textContent_o13vx"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const Option = ({ size = 's', className, option, children, selected, highlighted, disabled, multiple, mobile, Checkmark: Checkmark$2 = mobile ? Checkmark : Checkmark$1, innerProps, dataTestId, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1inao */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/* checkmark */
|
|
54
54
|
|
|
55
55
|
/* optgroup */
|
|
56
|
-
} .
|
|
56
|
+
} .select__option_o13vx {
|
|
57
57
|
font-size: 16px;
|
|
58
58
|
line-height: 20px;
|
|
59
59
|
font-weight: 400;
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
box-sizing: border-box;
|
|
69
69
|
position: relative;
|
|
70
70
|
cursor: pointer
|
|
71
|
-
} .
|
|
71
|
+
} .select__option_o13vx:not(.select__disabled_o13vx):active {
|
|
72
72
|
background: var(--select-option-active-background);
|
|
73
73
|
color: var(--select-option-active-color);
|
|
74
|
-
} .
|
|
74
|
+
} .select__option_o13vx:before {
|
|
75
75
|
content: '';
|
|
76
76
|
position: absolute;
|
|
77
77
|
left: var(--select-option-left-padding);
|
|
@@ -81,46 +81,46 @@
|
|
|
81
81
|
background: var(--select-option-divider-background);
|
|
82
82
|
display: var(--select-option-divider-display);
|
|
83
83
|
transition: opacity 0.2s ease;
|
|
84
|
-
} .
|
|
84
|
+
} .select__option_o13vx:first-child:before {
|
|
85
85
|
display: none;
|
|
86
|
-
} .
|
|
86
|
+
} .select__s_o13vx {
|
|
87
87
|
min-height: var(--size-s-height);
|
|
88
|
-
} .
|
|
88
|
+
} .select__m_o13vx {
|
|
89
89
|
min-height: var(--size-m-height);
|
|
90
|
-
} .
|
|
90
|
+
} .select__l_o13vx {
|
|
91
91
|
min-height: var(--size-l-height);
|
|
92
|
-
} .
|
|
92
|
+
} .select__xl_o13vx {
|
|
93
93
|
min-height: var(--size-xl-height);
|
|
94
|
-
} .
|
|
95
|
-
.
|
|
94
|
+
} .select__l_o13vx,
|
|
95
|
+
.select__xl_o13vx {
|
|
96
96
|
padding-left: var(--select-option-l-left-padding);
|
|
97
97
|
padding-right: var(--select-option-l-right-padding)
|
|
98
|
-
} .
|
|
98
|
+
} .select__l_o13vx:before, .select__xl_o13vx:before {
|
|
99
99
|
left: var(--select-option-l-left-padding);
|
|
100
100
|
right: var(--select-option-l-right-padding);
|
|
101
|
-
} .
|
|
101
|
+
} .select__selected_o13vx {
|
|
102
102
|
background: var(--select-option-selected-background);
|
|
103
103
|
color: var(--select-option-selected-color);
|
|
104
104
|
cursor: default;
|
|
105
|
-
} .
|
|
105
|
+
} .select__highlighted_o13vx {
|
|
106
106
|
background: var(--select-option-hover-background);
|
|
107
107
|
color: var(--select-option-hover-color)
|
|
108
|
-
} .
|
|
109
|
-
.
|
|
108
|
+
} .select__highlighted_o13vx:before,
|
|
109
|
+
.select__highlighted_o13vx + .select__option_o13vx:before {
|
|
110
110
|
opacity: 0;
|
|
111
|
-
} .
|
|
111
|
+
} .select__disabled_o13vx {
|
|
112
112
|
cursor: var(--disabled-cursor);
|
|
113
113
|
background: var(--select-option-disabled-background);
|
|
114
114
|
color: var(--select-option-disabled-color);
|
|
115
|
-
} .
|
|
115
|
+
} .select__content_o13vx {
|
|
116
116
|
overflow: hidden;
|
|
117
117
|
flex: 1;
|
|
118
118
|
text-overflow: ellipsis;
|
|
119
|
-
} .
|
|
119
|
+
} .select__textContent_o13vx {
|
|
120
120
|
padding-top: var(--gap-s);
|
|
121
121
|
padding-bottom: var(--gap-s);
|
|
122
122
|
} /* IE min-height fix */ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
123
|
-
.
|
|
123
|
+
.select__option_o13vx:after {
|
|
124
124
|
min-height: inherit;
|
|
125
125
|
font-size: 0;
|
|
126
126
|
content: '';
|
|
@@ -8,7 +8,7 @@ import { DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
|
|
|
8
8
|
import { useVisibleOptions, isGroup } from '../../utils.js';
|
|
9
9
|
import { Optgroup } from '../optgroup/Component.js';
|
|
10
10
|
|
|
11
|
-
const styles = {"optionsList":"
|
|
11
|
+
const styles = {"optionsList":"select__optionsList_o9ltp","optionsListHeader":"select__optionsListHeader_o9ltp","optionsListFooter":"select__optionsListFooter_o9ltp","withBorder":"select__withBorder_o9ltp","scrollable":"select__scrollable_o9ltp","emptyPlaceholder":"select__emptyPlaceholder_o9ltp","l":"select__l_o9ltp","xl":"select__xl_o9ltp"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
const createCounter = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lvf8 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-secondary: #e7e8ec;
|
|
@@ -29,28 +29,28 @@
|
|
|
29
29
|
/* checkmark */
|
|
30
30
|
|
|
31
31
|
/* optgroup */
|
|
32
|
-
} .
|
|
32
|
+
} .select__optionsList_o9ltp {
|
|
33
33
|
width: 100%;
|
|
34
34
|
outline: none;
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
position: relative;
|
|
37
|
-
} .
|
|
37
|
+
} .select__optionsListHeader_o9ltp {
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
40
|
-
} .
|
|
40
|
+
} .select__optionsListFooter_o9ltp {
|
|
41
41
|
position: sticky;
|
|
42
42
|
bottom: 0;
|
|
43
43
|
box-sizing: border-box;
|
|
44
44
|
border-top: 1px solid transparent
|
|
45
|
-
} .
|
|
45
|
+
} .select__optionsListFooter_o9ltp.select__withBorder_o9ltp {
|
|
46
46
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
47
|
-
} .
|
|
47
|
+
} .select__scrollable_o9ltp {
|
|
48
48
|
overflow: auto;
|
|
49
49
|
width: 100%;
|
|
50
|
-
} .
|
|
50
|
+
} .select__emptyPlaceholder_o9ltp {
|
|
51
51
|
padding: var(--gap-m) var(--gap-s);
|
|
52
52
|
color: var(--select-options-list-empty-placeholder-color);
|
|
53
|
-
} .
|
|
54
|
-
.
|
|
53
|
+
} .select__l_o9ltp .select__emptyPlaceholder_o9ltp,
|
|
54
|
+
.select__xl_o9ltp .select__emptyPlaceholder_o9ltp {
|
|
55
55
|
padding: var(--gap-xl) var(--gap-m);
|
|
56
56
|
}
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
4
4
|
import { MagnifierMIcon } from '@alfalab/icons-glyph/MagnifierMIcon';
|
|
5
5
|
|
|
6
|
-
const styles = {"component":"
|
|
6
|
+
const styles = {"component":"select__component_77zbe"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const Search = forwardRef(({ clear = true, placeholder = 'Поиск', className, leftAddons = React.createElement(MagnifierMIcon, { color: '#86868A' }), ...restProps }, ref) => (React.createElement(Input, { ref: ref, className: cn(styles.component, className), placeholder: placeholder, leftAddons: leftAddons, clear: clear, ...restProps })));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: m5q0b */
|
|
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,6 +23,6 @@
|
|
|
23
23
|
/* checkmark */
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
|
-
} .
|
|
26
|
+
} .select__component_77zbe {
|
|
27
27
|
width: auto;
|
|
28
28
|
}
|
|
@@ -9,7 +9,7 @@ import { DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
|
|
|
9
9
|
import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
|
|
10
10
|
import { Optgroup } from '../optgroup/Component.js';
|
|
11
11
|
|
|
12
|
-
const styles = {"virtualOptionsList":"
|
|
12
|
+
const styles = {"virtualOptionsList":"select__virtualOptionsList_1q528","virtualOptionsListHeader":"select__virtualOptionsListHeader_1q528","virtualOptionsListFooter":"select__virtualOptionsListFooter_1q528","withBorder":"select__withBorder_1q528","scrollable":"select__scrollable_1q528","inner":"select__inner_1q528","virtualRow":"select__virtualRow_1q528","highlighted":"select__highlighted_1q528","emptyPlaceholder":"select__emptyPlaceholder_1q528","l":"select__l_1q528","xl":"select__xl_1q528"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
const VirtualOptionsList = forwardRef(({ size = 's', flatOptions = [], highlightedIndex = -1, className, getOptionProps, Option, open, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, header, footer, showFooter = true, optionsListWidth, onScroll, nativeScrollbar: nativeScrollbarProp, setHighlightedIndex, }, ref) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: so3m7 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-primary: #d5d6dc;
|
|
@@ -35,34 +35,34 @@
|
|
|
35
35
|
/* checkmark */
|
|
36
36
|
|
|
37
37
|
/* optgroup */
|
|
38
|
-
} .
|
|
38
|
+
} .select__virtualOptionsList_1q528 {
|
|
39
39
|
width: 100%;
|
|
40
40
|
outline: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
position: sticky;
|
|
43
|
-
} .
|
|
43
|
+
} .select__virtualOptionsListHeader_1q528 {
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
46
|
-
} .
|
|
46
|
+
} .select__virtualOptionsListFooter_1q528 {
|
|
47
47
|
position: sticky;
|
|
48
48
|
bottom: 0;
|
|
49
49
|
box-sizing: border-box;
|
|
50
50
|
border-top: 1px solid transparent
|
|
51
|
-
} .
|
|
51
|
+
} .select__virtualOptionsListFooter_1q528.select__withBorder_1q528 {
|
|
52
52
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
53
|
-
} .
|
|
53
|
+
} .select__scrollable_1q528 {
|
|
54
54
|
position: relative;
|
|
55
55
|
overflow: auto;
|
|
56
56
|
width: 100%;
|
|
57
|
-
} .
|
|
57
|
+
} .select__inner_1q528 {
|
|
58
58
|
position: relative;
|
|
59
59
|
width: 100%;
|
|
60
|
-
} .
|
|
60
|
+
} .select__virtualRow_1q528 {
|
|
61
61
|
position: absolute;
|
|
62
62
|
top: 0;
|
|
63
63
|
left: 0;
|
|
64
64
|
width: 100%
|
|
65
|
-
} .
|
|
65
|
+
} .select__virtualRow_1q528:before {
|
|
66
66
|
content: '';
|
|
67
67
|
position: absolute;
|
|
68
68
|
z-index: 1;
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
height: 1px;
|
|
73
73
|
background: var(--select-option-divider-background);
|
|
74
74
|
display: var(--select-option-divider-display);
|
|
75
|
-
} .
|
|
75
|
+
} .select__virtualRow_1q528:first-child:before {
|
|
76
76
|
display: none;
|
|
77
|
-
} .
|
|
78
|
-
.
|
|
77
|
+
} .select__highlighted_1q528:before,
|
|
78
|
+
.select__highlighted_1q528 + .select__virtualRow_1q528:before {
|
|
79
79
|
display: none;
|
|
80
|
-
} .
|
|
80
|
+
} .select__emptyPlaceholder_1q528 {
|
|
81
81
|
padding: var(--gap-m) var(--gap-s);
|
|
82
82
|
color: var(--select-options-list-empty-placeholder-color);
|
|
83
|
-
} .
|
|
84
|
-
.
|
|
83
|
+
} .select__l_1q528 .select__emptyPlaceholder_1q528,
|
|
84
|
+
.select__xl_1q528 .select__emptyPlaceholder_1q528 {
|
|
85
85
|
padding: var(--gap-xl) var(--gap-m);
|
|
86
86
|
}
|
package/modern/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import '@alfalab/core-components-base-modal/modern';
|
|
|
40
40
|
import '@alfalab/core-components-button/modern/mobile';
|
|
41
41
|
import './components/virtual-options-list/Component.js';
|
|
42
42
|
import 'react-virtual';
|
|
43
|
-
import './hook-
|
|
43
|
+
import './hook-8b4455f6.js';
|
|
44
44
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
45
45
|
import '@alfalab/core-components-button/modern/desktop';
|
|
46
46
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
package/modern/mobile/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import '@alfalab/core-components-input/modern';
|
|
|
37
37
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
38
38
|
import '../components/virtual-options-list/Component.js';
|
|
39
39
|
import 'react-virtual';
|
|
40
|
-
import '../hook-
|
|
40
|
+
import '../hook-8b4455f6.js';
|
|
41
41
|
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
42
42
|
import '@alfalab/core-components-button/modern/desktop';
|
|
43
43
|
import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
package/modern/presets/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from './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-8b4455f6.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@alfalab/core-components-skeleton/modern';
|
|
6
6
|
import '../components/option/Component.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '../../utils.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-8b4455f6.js';
|
|
4
4
|
import '../../components/options-list/Component.js';
|
|
5
5
|
import 'react-merge-refs';
|
|
6
6
|
import 'classnames';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '../../../components/options-list/Component.js';
|
|
3
3
|
import '../../../consts.js';
|
|
4
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
4
|
+
export { O as OptionsListWithApply } from '../../../hook-8b4455f6.js';
|
|
5
5
|
import './footer/Component.js';
|
|
6
6
|
import './header/Component.js';
|
|
7
7
|
import 'react-merge-refs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonDesktop } from '@alfalab/core-components-button/modern/desktop';
|
|
3
3
|
|
|
4
|
-
const styles = {"footer":"
|
|
4
|
+
const styles = {"footer":"select__footer_k8o53"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], }) => (React.createElement("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lstk */
|
|
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_k8o53 {
|
|
21
21
|
background-color: var(--color-light-bg-primary);
|
|
22
22
|
padding: var(--gap-s);
|
|
23
23
|
outline: none
|
|
24
|
-
} .
|
|
24
|
+
} .select__footer_k8o53 > * + * {
|
|
25
25
|
margin-left: var(--gap-xs);
|
|
26
26
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Checkbox } from '@alfalab/core-components-checkbox/modern';
|
|
4
4
|
|
|
5
|
-
const styles = {"desktop":"
|
|
5
|
+
const styles = {"desktop":"select__desktop_1iqc5","mobile":"select__mobile_1iqc5"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Header = ({ onChange, checked, indeterminate, mobile }) => (React.createElement("div", { className: cn({ [styles.desktop]: !mobile, [styles.mobile]: mobile }) },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1pbox */
|
|
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_1iqc5 {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_1iqc5 {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-8b4455f6";
|
|
@@ -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_1857r"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
function useSelectWithLoading({ loading = false, visibleOptions = 6, Option: Option$1 = Option, }) {
|
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-8b4455f6.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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-select",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.2",
|
|
4
4
|
"description": "Select component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@alfalab/core-components-badge": "^5.3.0",
|
|
19
19
|
"@alfalab/core-components-base-modal": "^5.6.0",
|
|
20
|
-
"@alfalab/core-components-bottom-sheet": "^6.11.
|
|
21
|
-
"@alfalab/core-components-button": "^10.0.
|
|
22
|
-
"@alfalab/core-components-checkbox": "^3.
|
|
20
|
+
"@alfalab/core-components-bottom-sheet": "^6.11.5",
|
|
21
|
+
"@alfalab/core-components-button": "^10.0.1",
|
|
22
|
+
"@alfalab/core-components-checkbox": "^3.3.0",
|
|
23
23
|
"@alfalab/core-components-form-control": "^11.0.0",
|
|
24
|
-
"@alfalab/core-components-input": "^13.0.
|
|
25
|
-
"@alfalab/core-components-modal": "^8.1.
|
|
24
|
+
"@alfalab/core-components-input": "^13.0.1",
|
|
25
|
+
"@alfalab/core-components-modal": "^8.1.2",
|
|
26
26
|
"@alfalab/core-components-mq": "^4.2.0",
|
|
27
27
|
"@alfalab/core-components-popover": "^6.1.0",
|
|
28
28
|
"@alfalab/core-components-scrollbar": "^2.2.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-693409b2.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-693409b2.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-693409b2.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_k8o53"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lstk */
|
|
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_k8o53 {
|
|
21
21
|
background-color: var(--color-light-bg-primary);
|
|
22
22
|
padding: var(--gap-s);
|
|
23
23
|
outline: none
|
|
24
|
-
} .
|
|
24
|
+
} .select__footer_k8o53 > * + * {
|
|
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_1iqc5","mobile":"select__mobile_1iqc5"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Header = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1pbox */
|
|
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_1iqc5 {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_1iqc5 {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-693409b2";
|
|
@@ -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-693409b2.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_1857r"};
|
|
22
22
|
require('./index.css')
|
|
23
23
|
|
|
24
24
|
function useSelectWithLoading(_a) {
|
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-693409b2.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');
|
|
@@ -365,11 +365,15 @@ export const BaseSelect = forwardRef(
|
|
|
365
365
|
|
|
366
366
|
const handleFieldBlur = (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => {
|
|
367
367
|
if (view === 'desktop') {
|
|
368
|
+
const isNextFocusInsideField = fieldRef.current?.contains(
|
|
369
|
+
(event.relatedTarget || document.activeElement) as HTMLElement,
|
|
370
|
+
);
|
|
371
|
+
|
|
368
372
|
const isNextFocusInsideList = listRef.current?.contains(
|
|
369
373
|
(event.relatedTarget || document.activeElement) as HTMLElement,
|
|
370
374
|
);
|
|
371
375
|
|
|
372
|
-
if (!isNextFocusInsideList) {
|
|
376
|
+
if (!isNextFocusInsideField && !isNextFocusInsideList) {
|
|
373
377
|
if (onBlur) onBlur(event);
|
|
374
378
|
|
|
375
379
|
inputProps.onBlur?.(event);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|