@alfalab/core-components-select 15.2.0 → 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-89f0cb07.d.ts +38 -0
- package/Component.mobile-ebda875c.d.ts +4 -4
- package/Component.mobile-f1f15074.d.ts +1 -1
- package/Component.mobile.js +2 -2
- package/Component.modal.mobile.js +2 -2
- 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 +12 -5
- package/components/base-select/index.css +11 -11
- package/components/base-select-mobile/Component.js +13 -4
- 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 +17 -18
- 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 +5 -4
- 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 +5 -4
- package/components/virtual-options-list/index.css +15 -15
- package/cssm/Component-89f0cb07.d.ts +38 -0
- package/cssm/Component.mobile-ebda875c.d.ts +4 -4
- package/cssm/Component.mobile.js +2 -2
- package/cssm/Component.modal.mobile.js +2 -2
- package/cssm/Component.responsive.js +1 -1
- package/cssm/components/base-select/Component.js +11 -4
- package/cssm/components/base-select-mobile/Component.js +12 -3
- package/cssm/components/base-select-mobile/index.module.css +1 -2
- package/cssm/components/options-list/Component.js +4 -3
- package/cssm/components/virtual-options-list/Component.js +4 -3
- package/cssm/desktop-69921c40.d.ts +6 -0
- package/{hook-45ab0a9c.js → cssm/hook-244c8d6e.js} +4 -1
- package/cssm/index-ebda875c.d.ts +1 -37
- package/cssm/index.js +1 -1
- package/cssm/mobile.js +1 -1
- package/cssm/presets/index.js +1 -1
- package/cssm/presets/useSelectWithApply/hook.js +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/cssm/shared.js +1 -1
- package/{esm/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
- package/cssm/typings.d.ts +4 -0
- package/desktop-69921c40.d.ts +6 -0
- package/esm/Component-89f0cb07.d.ts +38 -0
- package/esm/Component.mobile-ebda875c.d.ts +4 -4
- package/esm/Component.mobile.js +2 -2
- package/esm/Component.modal.mobile.js +2 -2
- 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 +12 -5
- package/esm/components/base-select/index.css +11 -11
- package/esm/components/base-select-mobile/Component.js +13 -4
- 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 +17 -18
- 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 +5 -4
- 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 +5 -4
- package/esm/components/virtual-options-list/index.css +15 -15
- package/esm/desktop-69921c40.d.ts +6 -0
- package/esm/{hook-3fd6d6d4.js → hook-571dca86.js} +4 -1
- package/esm/index-ebda875c.d.ts +1 -37
- 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/{modern/typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
- package/esm/typings.d.ts +4 -0
- package/{cssm/hook-d1f5dd40.js → hook-a6f060a1.js} +4 -1
- package/index-ebda875c.d.ts +1 -37
- package/index.js +1 -1
- package/mobile.js +1 -1
- package/modern/Component-89f0cb07.d.ts +38 -0
- package/modern/Component.mobile-ebda875c.d.ts +4 -4
- package/modern/Component.mobile.js +2 -2
- package/modern/Component.modal.mobile.js +2 -2
- 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 +9 -5
- package/modern/components/base-select/index.css +11 -11
- package/modern/components/base-select-mobile/Component.js +10 -4
- 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 +17 -18
- 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 +5 -4
- 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 +5 -4
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/desktop-69921c40.d.ts +6 -0
- package/modern/{hook-5dd83d48.js → hook-7e628eb4.js} +1 -1
- package/modern/index-ebda875c.d.ts +1 -37
- 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/{typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
- package/modern/typings.d.ts +4 -0
- package/package.json +7 -7
- 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/Component.mobile.tsx +2 -0
- package/src/Component.modal.mobile.tsx +2 -0
- package/src/components/base-select/Component.tsx +12 -2
- package/src/components/base-select-mobile/Component.tsx +16 -3
- package/src/components/base-select-mobile/index.module.css +1 -1
- package/src/components/options-list/Component.tsx +9 -1
- package/src/components/virtual-options-list/Component.tsx +12 -1
- package/src/presets/useSelectWithApply/options-list-with-apply/Component.tsx +1 -1
- package/src/typings.ts +5 -0
- package/{cssm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/typings.d.ts +4 -0
- package/cssm/desktop-63dec22f.d.ts +0 -6
- package/desktop-63dec22f.d.ts +0 -6
- package/esm/desktop-63dec22f.d.ts +0 -6
- package/modern/desktop-63dec22f.d.ts +0 -6
- /package/cssm/{hook-d1f5dd40.d.ts → hook-244c8d6e.d.ts} +0 -0
- /package/esm/{hook-3fd6d6d4.d.ts → hook-571dca86.d.ts} +0 -0
- /package/{hook-45ab0a9c.d.ts → hook-a6f060a1.d.ts} +0 -0
- /package/modern/{hook-5dd83d48.d.ts → hook-7e628eb4.d.ts} +0 -0
|
@@ -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
|
}
|
|
@@ -14,7 +14,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
16
|
|
|
17
|
-
var styles = {"component":"
|
|
17
|
+
var 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"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var Field = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: bii8a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -44,22 +44,22 @@
|
|
|
44
44
|
/* checkmark */
|
|
45
45
|
|
|
46
46
|
/* optgroup */
|
|
47
|
-
} .
|
|
47
|
+
} .select__component_19tbv {
|
|
48
48
|
width: 100%;
|
|
49
49
|
outline: none;
|
|
50
|
-
} .
|
|
50
|
+
} .select__field_19tbv:not(.select__disabled_19tbv) {
|
|
51
51
|
cursor: pointer
|
|
52
|
-
} .
|
|
52
|
+
} .select__field_19tbv:not(.select__disabled_19tbv):hover .select__arrow_19tbv {
|
|
53
53
|
opacity: var(--select-arrow-hover-opacity);
|
|
54
|
-
} .
|
|
54
|
+
} .select__disabled_19tbv {
|
|
55
55
|
cursor: var(--disabled-cursor);
|
|
56
|
-
} .
|
|
56
|
+
} .select__placeholder_19tbv {
|
|
57
57
|
color: var(--input-placeholder-color);
|
|
58
58
|
transition: color 0.2s ease;
|
|
59
|
-
animation: select__show-
|
|
60
|
-
} .
|
|
59
|
+
animation: select__show-placeholder_19tbv 0.2s ease
|
|
60
|
+
} .select__placeholder_19tbv.select__focused_19tbv {
|
|
61
61
|
color: var(--input-focus-placeholder-color);
|
|
62
|
-
} .
|
|
62
|
+
} .select__contentWrapper_19tbv {
|
|
63
63
|
font-size: 16px;
|
|
64
64
|
line-height: 20px;
|
|
65
65
|
font-weight: 400;
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
text-overflow: ellipsis;
|
|
69
69
|
overflow: hidden;
|
|
70
70
|
width: 100%;
|
|
71
|
-
} .
|
|
71
|
+
} .select__value_19tbv {
|
|
72
72
|
overflow: hidden;
|
|
73
73
|
text-overflow: ellipsis;
|
|
74
74
|
text-align: left;
|
|
75
|
-
} .
|
|
75
|
+
} .select__focusVisible_19tbv {
|
|
76
76
|
outline: 2px solid var(--focus-color);
|
|
77
77
|
outline-offset: 2px;
|
|
78
|
-
} @keyframes select__show-
|
|
78
|
+
} @keyframes select__show-placeholder_19tbv {
|
|
79
79
|
from {
|
|
80
80
|
opacity: 0;
|
|
81
81
|
}
|
|
@@ -10,7 +10,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
11
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
12
|
|
|
13
|
-
var styles = {"optgroup":"
|
|
13
|
+
var styles = {"optgroup":"select__optgroup_1d3m7","label":"select__label_1d3m7","l":"select__l_1d3m7","xl":"select__xl_1d3m7"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var Optgroup = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: hdpux */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
--select-optgroup-right-padding: var(--gap-s);
|
|
36
36
|
--select-optgroup-l-left-padding: var(--gap-m);
|
|
37
37
|
--select-optgroup-l-right-padding: var(--gap-m);
|
|
38
|
-
} .
|
|
38
|
+
} .select__optgroup_1d3m7 {
|
|
39
39
|
position: relative;
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
background: var(--select-optgroup-background);
|
|
46
46
|
min-height: 40px
|
|
47
|
-
} .
|
|
47
|
+
} .select__optgroup_1d3m7 + *[role='option']:before {
|
|
48
48
|
display: none;
|
|
49
|
-
} .
|
|
49
|
+
} .select__label_1d3m7 {
|
|
50
50
|
font-size: 12px;
|
|
51
51
|
line-height: 16px;
|
|
52
52
|
font-weight: 500;
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
|
|
56
56
|
display: block;
|
|
57
57
|
color: var(--select-optgroup-color);
|
|
58
|
-
} .
|
|
59
|
-
.
|
|
58
|
+
} .select__l_1d3m7,
|
|
59
|
+
.select__xl_1d3m7 {
|
|
60
60
|
padding-left: var(--select-optgroup-l-left-padding);
|
|
61
61
|
padding-right: var(--select-optgroup-l-right-padding);
|
|
62
62
|
}
|
|
@@ -17,7 +17,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
18
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
19
|
|
|
20
|
-
var styles = {"option":"
|
|
20
|
+
var styles = {"option":"select__option_f9id2","disabled":"select__disabled_f9id2","s":"select__s_f9id2","m":"select__m_f9id2","l":"select__l_f9id2","xl":"select__xl_f9id2","selected":"select__selected_f9id2","highlighted":"select__highlighted_f9id2","content":"select__content_f9id2","textContent":"select__textContent_f9id2"};
|
|
21
21
|
require('./index.css')
|
|
22
22
|
|
|
23
23
|
var Option = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 19tsb */
|
|
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_f9id2 {
|
|
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_f9id2:not(.select__disabled_f9id2):active {
|
|
72
72
|
background: var(--select-option-active-background);
|
|
73
73
|
color: var(--select-option-active-color);
|
|
74
|
-
} .
|
|
74
|
+
} .select__option_f9id2: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_f9id2:first-child:before {
|
|
85
85
|
display: none;
|
|
86
|
-
} .
|
|
86
|
+
} .select__s_f9id2 {
|
|
87
87
|
min-height: var(--size-s-height);
|
|
88
|
-
} .
|
|
88
|
+
} .select__m_f9id2 {
|
|
89
89
|
min-height: var(--size-m-height);
|
|
90
|
-
} .
|
|
90
|
+
} .select__l_f9id2 {
|
|
91
91
|
min-height: var(--size-l-height);
|
|
92
|
-
} .
|
|
92
|
+
} .select__xl_f9id2 {
|
|
93
93
|
min-height: var(--size-xl-height);
|
|
94
|
-
} .
|
|
95
|
-
.
|
|
94
|
+
} .select__l_f9id2,
|
|
95
|
+
.select__xl_f9id2 {
|
|
96
96
|
padding-left: var(--select-option-l-left-padding);
|
|
97
97
|
padding-right: var(--select-option-l-right-padding)
|
|
98
|
-
} .
|
|
98
|
+
} .select__l_f9id2:before, .select__xl_f9id2:before {
|
|
99
99
|
left: var(--select-option-l-left-padding);
|
|
100
100
|
right: var(--select-option-l-right-padding);
|
|
101
|
-
} .
|
|
101
|
+
} .select__selected_f9id2 {
|
|
102
102
|
background: var(--select-option-selected-background);
|
|
103
103
|
color: var(--select-option-selected-color);
|
|
104
104
|
cursor: default;
|
|
105
|
-
} .
|
|
105
|
+
} .select__highlighted_f9id2 {
|
|
106
106
|
background: var(--select-option-hover-background);
|
|
107
107
|
color: var(--select-option-hover-color)
|
|
108
|
-
} .
|
|
109
|
-
.
|
|
108
|
+
} .select__highlighted_f9id2:before,
|
|
109
|
+
.select__highlighted_f9id2 + .select__option_f9id2:before {
|
|
110
110
|
opacity: 0;
|
|
111
|
-
} .
|
|
111
|
+
} .select__disabled_f9id2 {
|
|
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_f9id2 {
|
|
116
116
|
overflow: hidden;
|
|
117
117
|
flex: 1;
|
|
118
118
|
text-overflow: ellipsis;
|
|
119
|
-
} .
|
|
119
|
+
} .select__textContent_f9id2 {
|
|
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_f9id2:after {
|
|
124
124
|
min-height: inherit;
|
|
125
125
|
font-size: 0;
|
|
126
126
|
content: '';
|
|
@@ -18,7 +18,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
18
18
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
19
19
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
20
20
|
|
|
21
|
-
var styles = {"optionsList":"
|
|
21
|
+
var styles = {"optionsList":"select__optionsList_fttuv","optionsListHeader":"select__optionsListHeader_fttuv","optionsListFooter":"select__optionsListFooter_fttuv","withBorder":"select__withBorder_fttuv","scrollable":"select__scrollable_fttuv","emptyPlaceholder":"select__emptyPlaceholder_fttuv","l":"select__l_fttuv","xl":"select__xl_fttuv"};
|
|
22
22
|
require('./index.css')
|
|
23
23
|
|
|
24
24
|
var createCounter = function () {
|
|
@@ -28,7 +28,7 @@ var createCounter = function () {
|
|
|
28
28
|
};
|
|
29
29
|
var OptionsList = React.forwardRef(function (_a, ref) {
|
|
30
30
|
var _b;
|
|
31
|
-
var _c = _a.size, size = _c === void 0 ? 's' : _c, className = _a.className, optionGroupClassName = _a.optionGroupClassName, scrollbarClassName = _a.scrollbarClassName, Option = _a.Option, getOptionProps = _a.getOptionProps, _d = _a.options, options = _d === void 0 ? [] : _d, _e = _a.Optgroup, Optgroup = _e === void 0 ? components_optgroup_Component.Optgroup : _e, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _f = _a.visibleOptions, visibleOptions = _f === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _f, onScroll = _a.onScroll, open = _a.open, header = _a.header, footer = _a.footer, _g = _a.showFooter, showFooter = _g === void 0 ? true : _g, optionsListWidth = _a.optionsListWidth, nativeScrollbarProp = _a.nativeScrollbar, _h = _a.flatOptions, flatOptions = _h === void 0 ? [] : _h;
|
|
31
|
+
var _c = _a.size, size = _c === void 0 ? 's' : _c, className = _a.className, optionGroupClassName = _a.optionGroupClassName, scrollbarClassName = _a.scrollbarClassName, Option = _a.Option, getOptionProps = _a.getOptionProps, _d = _a.options, options = _d === void 0 ? [] : _d, _e = _a.Optgroup, Optgroup = _e === void 0 ? components_optgroup_Component.Optgroup : _e, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _f = _a.visibleOptions, visibleOptions = _f === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _f, onScroll = _a.onScroll, open = _a.open, header = _a.header, footer = _a.footer, _g = _a.showFooter, showFooter = _g === void 0 ? true : _g, optionsListWidth = _a.optionsListWidth, nativeScrollbarProp = _a.nativeScrollbar, _h = _a.flatOptions, flatOptions = _h === void 0 ? [] : _h, setHighlightedIndex = _a.setHighlightedIndex;
|
|
32
32
|
var nativeScrollbar = hooks.useMedia([[true, '(max-width: 1023px)']], false)[0];
|
|
33
33
|
nativeScrollbar = Boolean(nativeScrollbarProp !== null && nativeScrollbarProp !== void 0 ? nativeScrollbarProp : nativeScrollbar);
|
|
34
34
|
var renderOption = function (option, index) { return (React__default.default.createElement(Option, tslib.__assign({ key: option.key }, getOptionProps(option, index)))); };
|
|
@@ -54,10 +54,11 @@ var OptionsList = React.forwardRef(function (_a, ref) {
|
|
|
54
54
|
return (React__default.default.createElement(coreComponentsScrollbar.Scrollbar, { className: cn__default.default(styles.scrollable, scrollbarClassName), ref: scrollbarRef, horizontalAutoStretch: optionsListWidth === 'content', scrollableNodeProps: scrollableNodeProps, contentNodeProps: { ref: listRef } }, renderListItems()));
|
|
55
55
|
};
|
|
56
56
|
var renderWithNativeScrollbar = function () { return (React__default.default.createElement("div", { className: cn__default.default(styles.scrollable, scrollbarClassName), ref: mergeRefs__default.default([listRef, ref]), onScroll: onScroll }, renderListItems())); };
|
|
57
|
+
var resetHighlightedIndex = function () { return setHighlightedIndex === null || setHighlightedIndex === void 0 ? void 0 : setHighlightedIndex(-1); };
|
|
57
58
|
return (React__default.default.createElement("div", tslib.__assign({}, (nativeScrollbar && { 'data-test-id': dataTestId }), { className: cn__default.default(styles.optionsList, styles[size], className) }),
|
|
58
|
-
header && React__default.default.createElement("div", { className: styles.optionsListHeader }, header),
|
|
59
|
+
header && (React__default.default.createElement("div", { className: styles.optionsListHeader, onMouseEnter: resetHighlightedIndex }, header)),
|
|
59
60
|
nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
|
|
60
|
-
showFooter && footer && (React__default.default.createElement("div", { className: cn__default.default(styles.optionsListFooter, (_b = {},
|
|
61
|
+
showFooter && footer && (React__default.default.createElement("div", { onMouseEnter: resetHighlightedIndex, className: cn__default.default(styles.optionsListFooter, (_b = {},
|
|
61
62
|
_b[styles.withBorder] = visibleOptions && flatOptions.length > visibleOptions,
|
|
62
63
|
_b)) }, footer))));
|
|
63
64
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ukhvz */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-secondary: #e9e9eb;
|
|
@@ -29,28 +29,28 @@
|
|
|
29
29
|
/* checkmark */
|
|
30
30
|
|
|
31
31
|
/* optgroup */
|
|
32
|
-
} .
|
|
32
|
+
} .select__optionsList_fttuv {
|
|
33
33
|
width: 100%;
|
|
34
34
|
outline: none;
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
position: relative;
|
|
37
|
-
} .
|
|
37
|
+
} .select__optionsListHeader_fttuv {
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
40
|
-
} .
|
|
40
|
+
} .select__optionsListFooter_fttuv {
|
|
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_fttuv.select__withBorder_fttuv {
|
|
46
46
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
47
|
-
} .
|
|
47
|
+
} .select__scrollable_fttuv {
|
|
48
48
|
overflow: auto;
|
|
49
49
|
width: 100%;
|
|
50
|
-
} .
|
|
50
|
+
} .select__emptyPlaceholder_fttuv {
|
|
51
51
|
padding: var(--gap-m) var(--gap-s);
|
|
52
52
|
color: var(--select-options-list-empty-placeholder-color);
|
|
53
|
-
} .
|
|
54
|
-
.
|
|
53
|
+
} .select__l_fttuv .select__emptyPlaceholder_fttuv,
|
|
54
|
+
.select__xl_fttuv .select__emptyPlaceholder_fttuv {
|
|
55
55
|
padding: var(--gap-xl) var(--gap-m);
|
|
56
56
|
}
|
|
@@ -13,7 +13,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
15
15
|
|
|
16
|
-
var styles = {"component":"
|
|
16
|
+
var styles = {"component":"select__component_lcwk3"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Search = React.forwardRef(function (_a, ref) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 135ud */
|
|
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_lcwk3 {
|
|
27
27
|
width: auto;
|
|
28
28
|
}
|
|
@@ -19,12 +19,12 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
19
19
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
20
20
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
21
21
|
|
|
22
|
-
var styles = {"virtualOptionsList":"
|
|
22
|
+
var styles = {"virtualOptionsList":"select__virtualOptionsList_8wamo","virtualOptionsListHeader":"select__virtualOptionsListHeader_8wamo","virtualOptionsListFooter":"select__virtualOptionsListFooter_8wamo","withBorder":"select__withBorder_8wamo","scrollable":"select__scrollable_8wamo","inner":"select__inner_8wamo","virtualRow":"select__virtualRow_8wamo","highlighted":"select__highlighted_8wamo","emptyPlaceholder":"select__emptyPlaceholder_8wamo","l":"select__l_8wamo","xl":"select__xl_8wamo"};
|
|
23
23
|
require('./index.css')
|
|
24
24
|
|
|
25
25
|
var VirtualOptionsList = React.forwardRef(function (_a, ref) {
|
|
26
26
|
var _b;
|
|
27
|
-
var _c = _a.size, size = _c === void 0 ? 's' : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.highlightedIndex, highlightedIndex = _e === void 0 ? -1 : _e, className = _a.className, getOptionProps = _a.getOptionProps, Option = _a.Option, open = _a.open, _f = _a.options, options = _f === void 0 ? [] : _f, _g = _a.Optgroup, Optgroup = _g === void 0 ? components_optgroup_Component.Optgroup : _g, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _h = _a.visibleOptions, visibleOptions = _h === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _h, header = _a.header, footer = _a.footer, _j = _a.showFooter, showFooter = _j === void 0 ? true : _j, optionsListWidth = _a.optionsListWidth, onScroll = _a.onScroll, nativeScrollbarProp = _a.nativeScrollbar;
|
|
27
|
+
var _c = _a.size, size = _c === void 0 ? 's' : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.highlightedIndex, highlightedIndex = _e === void 0 ? -1 : _e, className = _a.className, getOptionProps = _a.getOptionProps, Option = _a.Option, open = _a.open, _f = _a.options, options = _f === void 0 ? [] : _f, _g = _a.Optgroup, Optgroup = _g === void 0 ? components_optgroup_Component.Optgroup : _g, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _h = _a.visibleOptions, visibleOptions = _h === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _h, header = _a.header, footer = _a.footer, _j = _a.showFooter, showFooter = _j === void 0 ? true : _j, optionsListWidth = _a.optionsListWidth, onScroll = _a.onScroll, nativeScrollbarProp = _a.nativeScrollbar, setHighlightedIndex = _a.setHighlightedIndex;
|
|
28
28
|
var listRef = React.useRef(null);
|
|
29
29
|
var parentRef = React.useRef(null);
|
|
30
30
|
var scrollbarRef = React.useRef(null);
|
|
@@ -125,14 +125,15 @@ var VirtualOptionsList = React.forwardRef(function (_a, ref) {
|
|
|
125
125
|
}
|
|
126
126
|
return React__default.default.createElement("div", tslib.__assign({}, contentNodeProps), renderList());
|
|
127
127
|
};
|
|
128
|
+
var resetHighlightedIndex = function () { return setHighlightedIndex === null || setHighlightedIndex === void 0 ? void 0 : setHighlightedIndex(-1); };
|
|
128
129
|
if (options.length === 0 && !emptyPlaceholder) {
|
|
129
130
|
return null;
|
|
130
131
|
}
|
|
131
132
|
return (React__default.default.createElement("div", { className: cn__default.default(styles.virtualOptionsList, styles[size], className), "data-test-id": dataTestId },
|
|
132
|
-
header && React__default.default.createElement("div", { className: styles.virtualOptionsListHeader }, header),
|
|
133
|
+
header && (React__default.default.createElement("div", { className: styles.virtualOptionsListHeader, onMouseEnter: resetHighlightedIndex }, header)),
|
|
133
134
|
nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
|
|
134
135
|
emptyPlaceholder && options.length === 0 && (React__default.default.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder)),
|
|
135
|
-
showFooter && footer && (React__default.default.createElement("div", { className: cn__default.default(styles.virtualOptionsListFooter, (_b = {},
|
|
136
|
+
showFooter && footer && (React__default.default.createElement("div", { onMouseEnter: resetHighlightedIndex, className: cn__default.default(styles.virtualOptionsListFooter, (_b = {},
|
|
136
137
|
_b[styles.withBorder] = visibleOptions && flatOptions.length > visibleOptions,
|
|
137
138
|
_b)) }, footer))));
|
|
138
139
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1x0f2 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-primary: #dcdcdd;
|
|
@@ -35,34 +35,34 @@
|
|
|
35
35
|
/* checkmark */
|
|
36
36
|
|
|
37
37
|
/* optgroup */
|
|
38
|
-
} .
|
|
38
|
+
} .select__virtualOptionsList_8wamo {
|
|
39
39
|
width: 100%;
|
|
40
40
|
outline: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
position: sticky;
|
|
43
|
-
} .
|
|
43
|
+
} .select__virtualOptionsListHeader_8wamo {
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
46
|
-
} .
|
|
46
|
+
} .select__virtualOptionsListFooter_8wamo {
|
|
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_8wamo.select__withBorder_8wamo {
|
|
52
52
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
53
|
-
} .
|
|
53
|
+
} .select__scrollable_8wamo {
|
|
54
54
|
position: relative;
|
|
55
55
|
overflow: auto;
|
|
56
56
|
width: 100%;
|
|
57
|
-
} .
|
|
57
|
+
} .select__inner_8wamo {
|
|
58
58
|
position: relative;
|
|
59
59
|
width: 100%;
|
|
60
|
-
} .
|
|
60
|
+
} .select__virtualRow_8wamo {
|
|
61
61
|
position: absolute;
|
|
62
62
|
top: 0;
|
|
63
63
|
left: 0;
|
|
64
64
|
width: 100%
|
|
65
|
-
} .
|
|
65
|
+
} .select__virtualRow_8wamo: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_8wamo:first-child:before {
|
|
76
76
|
display: none;
|
|
77
|
-
} .
|
|
78
|
-
.
|
|
77
|
+
} .select__highlighted_8wamo:before,
|
|
78
|
+
.select__highlighted_8wamo + .select__virtualRow_8wamo:before {
|
|
79
79
|
display: none;
|
|
80
|
-
} .
|
|
80
|
+
} .select__emptyPlaceholder_8wamo {
|
|
81
81
|
padding: var(--gap-m) var(--gap-s);
|
|
82
82
|
color: var(--select-options-list-empty-placeholder-color);
|
|
83
|
-
} .
|
|
84
|
-
.
|
|
83
|
+
} .select__l_8wamo .select__emptyPlaceholder_8wamo,
|
|
84
|
+
.select__xl_8wamo .select__emptyPlaceholder_8wamo {
|
|
85
85
|
padding: var(--gap-xl) var(--gap-m);
|
|
86
86
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
|
|
5
|
+
type SpinnerProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Управление видимостью компонента
|
|
8
|
+
*/
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Размер компонента
|
|
12
|
+
*/
|
|
13
|
+
size?: "xs" | "s" | "m";
|
|
14
|
+
/**
|
|
15
|
+
* Дополнительный класс
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Идентификатор компонента в DOM
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
24
|
+
*/
|
|
25
|
+
dataTestId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Палитра, в контексте которой используется спиннер
|
|
28
|
+
*/
|
|
29
|
+
colors?: "default" | "inverted";
|
|
30
|
+
};
|
|
31
|
+
declare const Spinner: FC<SpinnerProps>;
|
|
32
|
+
/**
|
|
33
|
+
* Минимальное время отображения лоадера - 500мс,
|
|
34
|
+
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
35
|
+
*/
|
|
36
|
+
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
37
|
+
declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
38
|
+
export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
type
|
|
5
|
-
declare const
|
|
6
|
-
export {
|
|
3
|
+
import { BaseFormControlProps } from "./index-ebda875c";
|
|
4
|
+
type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
|
|
5
|
+
declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { FormControlMobileProps, FormControlMobile };
|
package/cssm/Component.mobile.js
CHANGED
|
@@ -14,7 +14,7 @@ var components_option_Component = require('./components/option/Component.js');
|
|
|
14
14
|
var components_optionsList_Component = require('./components/options-list/Component.js');
|
|
15
15
|
var components_search_Component = require('./components/search/Component.js');
|
|
16
16
|
var components_virtualOptionsList_Component = require('./components/virtual-options-list/Component.js');
|
|
17
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('./hook-
|
|
17
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('./hook-244c8d6e.js');
|
|
18
18
|
var presets_useSelectWithApply_optionsListWithApply_header_Component = require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
19
19
|
require('classnames');
|
|
20
20
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
@@ -74,7 +74,7 @@ var SelectMobile = React.forwardRef(function (_a, ref) {
|
|
|
74
74
|
showClear: showClear,
|
|
75
75
|
showSelectAll: showSelectAll,
|
|
76
76
|
});
|
|
77
|
-
return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: tslib.__assign({ FormControlComponent: mobile.FormControlMobile }, fieldProps), optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, Search: Search, isBottomSheet: true, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, bottomSheetProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, bottomSheetProps), optionsListProps: optionsListProps }, restProps, (useWithApplyHook && applyProps))));
|
|
77
|
+
return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: tslib.__assign({ FormControlComponent: mobile.FormControlMobile }, fieldProps), optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, Search: Search, isBottomSheet: true, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, showSearch: showSearch, searchProps: searchProps, bottomSheetProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, bottomSheetProps), optionsListProps: optionsListProps }, restProps, (useWithApplyHook && applyProps))));
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
exports.SelectMobile = SelectMobile;
|
|
@@ -13,7 +13,7 @@ var components_optgroup_Component = require('./components/optgroup/Component.js'
|
|
|
13
13
|
var components_option_Component = require('./components/option/Component.js');
|
|
14
14
|
var components_optionsList_Component = require('./components/options-list/Component.js');
|
|
15
15
|
var components_virtualOptionsList_Component = require('./components/virtual-options-list/Component.js');
|
|
16
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('./hook-
|
|
16
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('./hook-244c8d6e.js');
|
|
17
17
|
var presets_useSelectWithApply_optionsListWithApply_header_Component = require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
18
18
|
require('classnames');
|
|
19
19
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
@@ -74,7 +74,7 @@ var SelectModalMobile = React.forwardRef(function (_a, ref) {
|
|
|
74
74
|
showClear: showClear,
|
|
75
75
|
showSelectAll: showSelectAll,
|
|
76
76
|
});
|
|
77
|
-
return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: tslib.__assign({ FormControlComponent: mobile.FormControlMobile }, fieldProps), optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: false, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, optionsListProps: optionsListProps, modalHeaderProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, modalHeaderProps) }, restProps, (useWithApplyHook && applyProps))));
|
|
77
|
+
return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: tslib.__assign({ FormControlComponent: mobile.FormControlMobile }, fieldProps), optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: false, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, optionsListProps: optionsListProps, showSearch: showSearch, searchProps: searchProps, modalHeaderProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, modalHeaderProps) }, restProps, (useWithApplyHook && applyProps))));
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
exports.SelectModalMobile = SelectModalMobile;
|
|
@@ -55,7 +55,7 @@ require('./components/base-select-mobile/footer/index.module.css');
|
|
|
55
55
|
require('./components/virtual-options-list/Component.js');
|
|
56
56
|
require('react-virtual');
|
|
57
57
|
require('./components/virtual-options-list/index.module.css');
|
|
58
|
-
require('./hook-
|
|
58
|
+
require('./hook-244c8d6e.js');
|
|
59
59
|
require('./presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
|
|
60
60
|
require('@alfalab/core-components-button/cssm/desktop');
|
|
61
61
|
require('./presets/useSelectWithApply/options-list-with-apply/footer/index.module.css');
|
|
@@ -136,7 +136,7 @@ function (_a, ref) {
|
|
|
136
136
|
return changes;
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
-
}), open = _6.isOpen, getMenuProps = _6.getMenuProps, getInputProps = _6.getInputProps, getItemProps = _6.getItemProps, getComboboxProps = _6.getComboboxProps, getLabelProps = _6.getLabelProps, highlightedIndex = _6.highlightedIndex, toggleMenu = _6.toggleMenu, openMenu = _6.openMenu;
|
|
139
|
+
}), open = _6.isOpen, getMenuProps = _6.getMenuProps, getInputProps = _6.getInputProps, getItemProps = _6.getItemProps, getComboboxProps = _6.getComboboxProps, getLabelProps = _6.getLabelProps, highlightedIndex = _6.highlightedIndex, toggleMenu = _6.toggleMenu, openMenu = _6.openMenu, setHighlightedIndex = _6.setHighlightedIndex;
|
|
140
140
|
var menuProps = getMenuProps({ ref: listRef }, { suppressRefError: true });
|
|
141
141
|
var inputProps = getInputProps(getDropdownProps({ ref: mergeRefs__default.default([ref, fieldRef]) }));
|
|
142
142
|
var handleFieldFocus = function (event) {
|
|
@@ -157,7 +157,11 @@ function (_a, ref) {
|
|
|
157
157
|
};
|
|
158
158
|
var handleFieldKeyDown = function (event) {
|
|
159
159
|
inputProps.onKeyDown(event);
|
|
160
|
-
|
|
160
|
+
// https://caniuse.com/?search=KeyboardEvent.key
|
|
161
|
+
var isKeyUnsupported = event.key === 'Unidentified';
|
|
162
|
+
if (autocomplete &&
|
|
163
|
+
!open &&
|
|
164
|
+
(isKeyUnsupported || event.key.length === 1 || event.key === 'Backspace')) {
|
|
161
165
|
// Для автокомплита - открываем меню при начале ввода
|
|
162
166
|
openMenu();
|
|
163
167
|
}
|
|
@@ -192,7 +196,10 @@ function (_a, ref) {
|
|
|
192
196
|
item: option,
|
|
193
197
|
disabled: option.disabled,
|
|
194
198
|
onMouseDown: function (event) { return event.preventDefault(); },
|
|
195
|
-
}), multiple: multiple, index: index, option: option, size: optionsSize, disabled: option.disabled, highlighted: index === highlightedIndex, selected: selectedItems.
|
|
199
|
+
}), multiple: multiple, index: index, option: option, size: optionsSize, disabled: option.disabled, highlighted: index === highlightedIndex, selected: selectedItems.some(function (_a) {
|
|
200
|
+
var key = _a.key;
|
|
201
|
+
return key === option.key;
|
|
202
|
+
}), dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'option') })); }, [
|
|
196
203
|
dataTestId,
|
|
197
204
|
getItemProps,
|
|
198
205
|
highlightedIndex,
|
|
@@ -302,7 +309,7 @@ function (_a, ref) {
|
|
|
302
309
|
}, dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'field') }, fieldProps)),
|
|
303
310
|
name && !nativeSelect && renderValue(),
|
|
304
311
|
!nativeSelect && (React__default.default.createElement(coreComponentsPopover.Popover, { open: open, withTransition: false, anchorElement: fieldRef.current, position: popoverPosition, preventFlip: preventFlip, popperClassName: cn__default.default(styles__default.default.popoverInner, popperClassName), update: updatePopover, zIndex: zIndexPopover }, needRenderOptionsList && (React__default.default.createElement("div", tslib.__assign({}, menuProps, { className: cn__default.default(optionsListClassName, styles__default.default.optionsList) }),
|
|
305
|
-
React__default.default.createElement(OptionsList, tslib.__assign({}, optionsListProps, { optionsListWidth: optionsListWidth, flatOptions: flatOptions, highlightedIndex: highlightedIndex, open: open, size: size, options: filteredOptions, Optgroup: Optgroup, Option: Option, selectedItems: selectedItems, setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, getOptionProps: getOptionProps, visibleOptions: visibleOptions, onScroll: onScroll, dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'options-list'), header: renderOptionsListHeader(), emptyPlaceholder: renderEmptyPlaceholder() })),
|
|
312
|
+
React__default.default.createElement(OptionsList, tslib.__assign({}, optionsListProps, { setHighlightedIndex: setHighlightedIndex, optionsListWidth: optionsListWidth, flatOptions: flatOptions, highlightedIndex: highlightedIndex, open: open, size: size, options: filteredOptions, Optgroup: Optgroup, Option: Option, selectedItems: selectedItems, setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, getOptionProps: getOptionProps, visibleOptions: visibleOptions, onScroll: onScroll, dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'options-list'), header: renderOptionsListHeader(), emptyPlaceholder: renderEmptyPlaceholder() })),
|
|
306
313
|
React__default.default.createElement("div", { className: styles__default.default.optionsListBorder })))))));
|
|
307
314
|
});
|
|
308
315
|
|