@alfalab/core-components-select 17.7.2 → 17.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +6 -6
- package/components/base-option/Component.js +1 -1
- package/components/base-option/index.css +15 -15
- package/components/base-select/Component.js +4 -4
- package/components/base-select/index.css +11 -11
- package/components/base-select/mobile.css +12 -12
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +10 -10
- package/components/checkmark-mobile/Component.js +1 -1
- package/components/checkmark-mobile/index.css +6 -6
- package/components/field/Component.js +1 -1
- package/components/field/index.css +12 -12
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +5 -5
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/option/Component.js +1 -1
- package/components/option/index.css +19 -19
- package/components/options-list/Component.js +14 -5
- package/components/options-list/index.css +10 -10
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/virtual-options-list/Component.js +1 -1
- package/components/virtual-options-list/index.css +15 -15
- package/cssm/components/base-select/Component.js +2 -2
- package/cssm/components/options-list/Component.js +13 -4
- package/cssm/typings.d.ts +8 -0
- package/cssm/utils.d.ts +14 -2
- package/cssm/utils.js +26 -4
- 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 +6 -6
- package/esm/components/base-option/Component.js +1 -1
- package/esm/components/base-option/index.css +15 -15
- package/esm/components/base-select/Component.js +4 -4
- package/esm/components/base-select/index.css +11 -11
- package/esm/components/base-select/mobile.css +12 -12
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +10 -10
- package/esm/components/checkmark-mobile/Component.js +1 -1
- package/esm/components/checkmark-mobile/index.css +6 -6
- package/esm/components/field/Component.js +1 -1
- package/esm/components/field/index.css +12 -12
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +5 -5
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +6 -6
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +19 -19
- package/esm/components/options-list/Component.js +14 -5
- package/esm/components/options-list/index.css +10 -10
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/virtual-options-list/Component.js +1 -1
- package/esm/components/virtual-options-list/index.css +15 -15
- package/esm/mobile/Component.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/index.js +1 -1
- package/esm/typings.d.ts +8 -0
- package/esm/utils.d.ts +14 -2
- package/esm/utils.js +26 -4
- package/mobile/Component.mobile.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 +6 -6
- package/modern/components/base-option/Component.js +1 -1
- package/modern/components/base-option/index.css +15 -15
- package/modern/components/base-select/Component.js +4 -4
- package/modern/components/base-select/index.css +11 -11
- package/modern/components/base-select/mobile.css +12 -12
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +10 -10
- package/modern/components/checkmark-mobile/Component.js +1 -1
- package/modern/components/checkmark-mobile/index.css +6 -6
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +12 -12
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +5 -5
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +19 -19
- package/modern/components/options-list/Component.js +14 -3
- package/modern/components/options-list/index.css +10 -10
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +2 -2
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/mobile/Component.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/index.js +1 -1
- package/modern/typings.d.ts +8 -0
- package/modern/utils.d.ts +14 -2
- package/modern/utils.js +24 -4
- package/package.json +1 -1
- package/presets/index.js +1 -1
- package/presets/useSelectWithApply/hook.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +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 +2 -0
- package/src/components/options-list/Component.tsx +15 -1
- package/src/typings.ts +10 -0
- package/src/utils.ts +55 -4
- package/typings.d.ts +8 -0
- package/utils.d.ts +14 -2
- package/utils.js +26 -4
- /package/esm/{hook-2fdebc58.d.ts → hook-b42228ca.d.ts} +0 -0
- /package/esm/{hook-2fdebc58.js → hook-b42228ca.js} +0 -0
- /package/{hook-d6f8155c.d.ts → hook-444814cb.d.ts} +0 -0
- /package/{hook-d6f8155c.js → hook-444814cb.js} +0 -0
- /package/modern/{hook-2da7ff47.d.ts → hook-73b8c736.d.ts} +0 -0
- /package/modern/{hook-2da7ff47.js → hook-73b8c736.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: v84gz */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-status-info: #2288fa;
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
/* checkmark */
|
|
43
43
|
|
|
44
44
|
/* optgroup */
|
|
45
|
-
} .
|
|
45
|
+
} .select__component_ibzt7 {
|
|
46
46
|
width: 100%;
|
|
47
47
|
outline: none;
|
|
48
|
-
} .
|
|
48
|
+
} .select__field_ibzt7:not(.select__disabled_ibzt7) {
|
|
49
49
|
cursor: pointer
|
|
50
|
-
} .
|
|
50
|
+
} .select__field_ibzt7:not(.select__disabled_ibzt7):hover .select__arrow_ibzt7 {
|
|
51
51
|
opacity: var(--select-arrow-hover-opacity);
|
|
52
|
-
} .
|
|
52
|
+
} .select__disabled_ibzt7 {
|
|
53
53
|
cursor: var(--disabled-cursor);
|
|
54
|
-
} .
|
|
54
|
+
} .select__placeholder_ibzt7 {
|
|
55
55
|
color: var(--input-placeholder-color);
|
|
56
56
|
transition: color 0.2s ease;
|
|
57
|
-
animation: select__show-
|
|
58
|
-
} .
|
|
57
|
+
animation: select__show-placeholder_ibzt7 0.2s ease
|
|
58
|
+
} .select__placeholder_ibzt7.select__focused_ibzt7 {
|
|
59
59
|
color: var(--input-focus-placeholder-color);
|
|
60
|
-
} .
|
|
60
|
+
} .select__contentWrapper_ibzt7 {
|
|
61
61
|
font-size: 16px;
|
|
62
62
|
line-height: 20px;
|
|
63
63
|
font-weight: 400;
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
text-overflow: ellipsis;
|
|
67
67
|
overflow: hidden;
|
|
68
68
|
width: 100%;
|
|
69
|
-
} .
|
|
69
|
+
} .select__value_ibzt7 {
|
|
70
70
|
overflow: hidden;
|
|
71
71
|
text-overflow: ellipsis;
|
|
72
72
|
text-align: left;
|
|
73
|
-
} .
|
|
73
|
+
} .select__focusVisible_ibzt7 {
|
|
74
74
|
outline: 2px solid var(--focus-color);
|
|
75
75
|
outline-offset: 2px;
|
|
76
|
-
} @keyframes select__show-
|
|
76
|
+
} @keyframes select__show-placeholder_ibzt7 {
|
|
77
77
|
from {
|
|
78
78
|
opacity: 0;
|
|
79
79
|
}
|
|
@@ -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 = {"footer":"
|
|
16
|
+
var styles = {"footer":"select__footer_15cgt","button":"select__button_15cgt","highlighted":"select__highlighted_15cgt"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: r8f0f */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-modal-bg-primary: #fff;
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
/* checkmark */
|
|
27
27
|
|
|
28
28
|
/* optgroup */
|
|
29
|
-
} .
|
|
29
|
+
} .select__footer_15cgt {
|
|
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-modal-bg-primary)
|
|
35
|
-
} .
|
|
35
|
+
} .select__footer_15cgt .select__button_15cgt:first-of-type {
|
|
36
36
|
margin-right: var(--gap-m);
|
|
37
|
-
} .
|
|
37
|
+
} .select__button_15cgt {
|
|
38
38
|
width: 50%;
|
|
39
|
-
} .
|
|
39
|
+
} .select__highlighted_15cgt {
|
|
40
40
|
border-top: 1px solid var(--color-light-neutral-300);
|
|
41
41
|
background-color: var(--color-light-modal-bg-primary);
|
|
42
42
|
}
|
|
@@ -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 = {"optgroup":"
|
|
14
|
+
var styles = {"optgroup":"select__optgroup_1qslb","label":"select__label_1qslb","size-64":"select__size-64_1qslb","size-72":"select__size-72_1qslb"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Optgroup = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: d1nw7 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-modal-bg-primary: #fff;
|
|
@@ -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_1qslb {
|
|
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_1qslb + *[role='option']:before {
|
|
48
48
|
display: none;
|
|
49
|
-
} .
|
|
49
|
+
} .select__label_1qslb {
|
|
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
|
-
} .select__size-
|
|
59
|
-
.select__size-
|
|
58
|
+
} .select__size-64_1qslb,
|
|
59
|
+
.select__size-72_1qslb {
|
|
60
60
|
padding-left: var(--select-optgroup-l-left-padding);
|
|
61
61
|
padding-right: var(--select-optgroup-l-right-padding);
|
|
62
62
|
}
|
|
@@ -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 = {"option":"
|
|
17
|
+
var styles = {"option":"select__option_lx8xq","disabled":"select__disabled_lx8xq","size-48":"select__size-48_lx8xq","size-56":"select__size-56_lx8xq","size-64":"select__size-64_lx8xq","size-72":"select__size-72_lx8xq","selected":"select__selected_lx8xq","highlighted":"select__highlighted_lx8xq","content":"select__content_lx8xq","textContent":"select__textContent_lx8xq"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var Option = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1e5ua */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-modal-bg-primary: #fff;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/* checkmark */
|
|
54
54
|
|
|
55
55
|
/* optgroup */
|
|
56
|
-
} .
|
|
56
|
+
} .select__option_lx8xq {
|
|
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_lx8xq:not(.select__disabled_lx8xq):active {
|
|
72
72
|
background: var(--select-option-active-background);
|
|
73
73
|
color: var(--select-option-active-color);
|
|
74
|
-
} .
|
|
74
|
+
} .select__option_lx8xq:before {
|
|
75
75
|
content: '';
|
|
76
76
|
position: absolute;
|
|
77
77
|
left: var(--select-option-left-padding);
|
|
@@ -81,42 +81,42 @@
|
|
|
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_lx8xq:first-child:before {
|
|
85
85
|
display: none;
|
|
86
|
-
} .select__size-
|
|
86
|
+
} .select__size-48_lx8xq {
|
|
87
87
|
min-height: var(--size-s-height);
|
|
88
|
-
} .select__size-
|
|
88
|
+
} .select__size-56_lx8xq {
|
|
89
89
|
min-height: var(--size-m-height);
|
|
90
|
-
} .select__size-
|
|
90
|
+
} .select__size-64_lx8xq {
|
|
91
91
|
min-height: var(--size-l-height);
|
|
92
|
-
} .select__size-
|
|
92
|
+
} .select__size-72_lx8xq {
|
|
93
93
|
min-height: var(--size-xl-height);
|
|
94
|
-
} .select__size-
|
|
95
|
-
.select__size-
|
|
94
|
+
} .select__size-64_lx8xq,
|
|
95
|
+
.select__size-72_lx8xq {
|
|
96
96
|
padding-left: var(--select-option-l-left-padding);
|
|
97
97
|
padding-right: var(--select-option-l-right-padding)
|
|
98
|
-
} .select__size-
|
|
98
|
+
} .select__size-64_lx8xq:before, .select__size-72_lx8xq:before {
|
|
99
99
|
left: var(--select-option-l-left-padding);
|
|
100
100
|
right: var(--select-option-l-right-padding);
|
|
101
|
-
} .
|
|
101
|
+
} .select__selected_lx8xq {
|
|
102
102
|
background: var(--select-option-selected-background);
|
|
103
103
|
color: var(--select-option-selected-color);
|
|
104
104
|
cursor: default;
|
|
105
|
-
} .
|
|
105
|
+
} .select__highlighted_lx8xq {
|
|
106
106
|
background: var(--select-option-hover-background);
|
|
107
107
|
color: var(--select-option-hover-color)
|
|
108
|
-
} .
|
|
109
|
-
.
|
|
108
|
+
} .select__highlighted_lx8xq:before,
|
|
109
|
+
.select__highlighted_lx8xq + .select__option_lx8xq:before {
|
|
110
110
|
opacity: 0;
|
|
111
|
-
} .
|
|
111
|
+
} .select__disabled_lx8xq {
|
|
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_lx8xq {
|
|
116
116
|
overflow: hidden;
|
|
117
117
|
flex: 1;
|
|
118
118
|
text-overflow: ellipsis;
|
|
119
|
-
} .
|
|
119
|
+
} .select__textContent_lx8xq {
|
|
120
120
|
padding-top: var(--gap-s);
|
|
121
121
|
padding-bottom: var(--gap-s);
|
|
122
122
|
}
|
|
@@ -19,7 +19,7 @@ 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 = {"optionsList":"
|
|
22
|
+
var styles = {"optionsList":"select__optionsList_16a9d","optionsListHeader":"select__optionsListHeader_16a9d","headerHighlighted":"select__headerHighlighted_16a9d","optionsListFooter":"select__optionsListFooter_16a9d","withBorder":"select__withBorder_16a9d","scrollable":"select__scrollable_16a9d","emptyPlaceholder":"select__emptyPlaceholder_16a9d","size-64":"select__size-64_16a9d","size-72":"select__size-72_16a9d"};
|
|
23
23
|
require('./index.css')
|
|
24
24
|
|
|
25
25
|
var createCounter = function () {
|
|
@@ -29,9 +29,9 @@ var createCounter = function () {
|
|
|
29
29
|
};
|
|
30
30
|
var OptionsList = React.forwardRef(function (_a, ref) {
|
|
31
31
|
var _b, _c;
|
|
32
|
-
var _d = _a.size, size = _d === void 0 ? 48 : _d, className = _a.className, optionGroupClassName = _a.optionGroupClassName, scrollbarClassName = _a.scrollbarClassName, Option = _a.Option, getOptionProps = _a.getOptionProps, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.Optgroup, Optgroup = _f === void 0 ? components_optgroup_Component.Optgroup : _f, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _g = _a.visibleOptions, visibleOptions = _g === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _g, onScroll = _a.onScroll, open = _a.open, header = _a.header, footer = _a.footer, _h = _a.showFooter, showFooter = _h === void 0 ? true : _h, optionsListWidth = _a.optionsListWidth, nativeScrollbarProp = _a.nativeScrollbar, _j = _a.flatOptions, flatOptions = _j === void 0 ? [] : _j, setHighlightedIndex = _a.setHighlightedIndex, selectedItems = _a.selectedItems, search = _a.search, setSelectedItems = _a.setSelectedItems, multiple = _a.multiple;
|
|
33
|
-
var
|
|
34
|
-
var
|
|
32
|
+
var _d = _a.size, size = _d === void 0 ? 48 : _d, className = _a.className, optionGroupClassName = _a.optionGroupClassName, scrollbarClassName = _a.scrollbarClassName, Option = _a.Option, getOptionProps = _a.getOptionProps, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.Optgroup, Optgroup = _f === void 0 ? components_optgroup_Component.Optgroup : _f, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _g = _a.visibleOptions, visibleOptions = _g === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _g, onScroll = _a.onScroll, open = _a.open, header = _a.header, footer = _a.footer, _h = _a.showFooter, showFooter = _h === void 0 ? true : _h, optionsListWidth = _a.optionsListWidth, nativeScrollbarProp = _a.nativeScrollbar, _j = _a.flatOptions, flatOptions = _j === void 0 ? [] : _j, setHighlightedIndex = _a.setHighlightedIndex, selectedItems = _a.selectedItems, search = _a.search, setSelectedItems = _a.setSelectedItems, multiple = _a.multiple, _k = _a.limitDynamicOptionGroupSize, limitDynamicOptionGroupSize = _k === void 0 ? false : _k;
|
|
33
|
+
var _l = React.useState(true), scrollTop = _l[0], setScrollTop = _l[1];
|
|
34
|
+
var _m = React.useState(false), scrollBottom = _m[0], setScrollBottom = _m[1];
|
|
35
35
|
var query = '(max-width: 1023px)';
|
|
36
36
|
var nativeScrollbar = coreComponentsMq.useMatchMedia(query, function () {
|
|
37
37
|
return coreComponentsShared.isClient() ? window.matchMedia(query).matches : true;
|
|
@@ -59,7 +59,16 @@ var OptionsList = React.forwardRef(function (_a, ref) {
|
|
|
59
59
|
};
|
|
60
60
|
return (React__default.default.createElement(Optgroup, { className: optionGroupClassName, label: group.label, key: group.label, size: size, options: group.options, selectedItems: groupSelectedItems, setSelectedItems: handleSelectedItems, search: search, multiple: multiple }, group.options.map(function (option) { return renderOption(option, counter()); })));
|
|
61
61
|
};
|
|
62
|
-
utils.useVisibleOptions(tslib.__assign(tslib.__assign({}, (!nativeScrollbar && { styleTargetRef: scrollbarRef })), { visibleOptions: visibleOptions, listRef: listRef, open: open,
|
|
62
|
+
utils.useVisibleOptions(tslib.__assign(tslib.__assign({}, (!nativeScrollbar && { styleTargetRef: scrollbarRef })), { visibleOptions: visibleOptions, listRef: listRef, open: open, options: options, actualOptionsCount: limitDynamicOptionGroupSize, size: limitDynamicOptionGroupSize
|
|
63
|
+
? (function () {
|
|
64
|
+
switch (typeof size) {
|
|
65
|
+
case 'string':
|
|
66
|
+
throw new Error('OptionsList with `limitDynamicOptionGroupSize` enabled needs a `size` with number type');
|
|
67
|
+
default:
|
|
68
|
+
return size;
|
|
69
|
+
}
|
|
70
|
+
})()
|
|
71
|
+
: undefined }));
|
|
63
72
|
if (options.length === 0 && !emptyPlaceholder && !header && !footer) {
|
|
64
73
|
return null;
|
|
65
74
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 107cx */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-300: #e7e8eb;
|
|
@@ -29,32 +29,32 @@
|
|
|
29
29
|
/* checkmark */
|
|
30
30
|
|
|
31
31
|
/* optgroup */
|
|
32
|
-
} .
|
|
32
|
+
} .select__optionsList_16a9d {
|
|
33
33
|
width: 100%;
|
|
34
34
|
outline: none;
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
position: relative;
|
|
37
|
-
} .
|
|
37
|
+
} .select__optionsListHeader_16a9d {
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
border-bottom: 1px solid transparent;
|
|
40
40
|
transition: border-color 0.2s ease
|
|
41
|
-
} .
|
|
41
|
+
} .select__optionsListHeader_16a9d.select__headerHighlighted_16a9d {
|
|
42
42
|
border-bottom-color: var(--color-light-neutral-300);
|
|
43
|
-
} .
|
|
43
|
+
} .select__optionsListFooter_16a9d {
|
|
44
44
|
position: sticky;
|
|
45
45
|
bottom: 0;
|
|
46
46
|
box-sizing: border-box;
|
|
47
47
|
border-top: 1px solid transparent;
|
|
48
48
|
transition: border-color 0.2s ease
|
|
49
|
-
} .
|
|
49
|
+
} .select__optionsListFooter_16a9d.select__withBorder_16a9d {
|
|
50
50
|
border-top-color: var(--color-light-neutral-300);
|
|
51
|
-
} .
|
|
51
|
+
} .select__scrollable_16a9d {
|
|
52
52
|
overflow: auto;
|
|
53
53
|
width: 100%;
|
|
54
|
-
} .
|
|
54
|
+
} .select__emptyPlaceholder_16a9d {
|
|
55
55
|
padding: var(--gap-m) var(--gap-s);
|
|
56
56
|
color: var(--select-options-list-empty-placeholder-color);
|
|
57
|
-
} .select__size-
|
|
58
|
-
.select__size-
|
|
57
|
+
} .select__size-64_16a9d .select__emptyPlaceholder_16a9d,
|
|
58
|
+
.select__size-72_16a9d .select__emptyPlaceholder_16a9d {
|
|
59
59
|
padding: var(--gap-xl) var(--gap-m);
|
|
60
60
|
}
|
|
@@ -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_tg1py"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Search = React.forwardRef(function (_a, ref) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1o69p */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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_tg1py.select__component_tg1py {
|
|
27
27
|
width: auto;
|
|
28
28
|
}
|
|
@@ -20,7 +20,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
20
20
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
21
21
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
22
22
|
|
|
23
|
-
var styles = {"virtualOptionsList":"
|
|
23
|
+
var styles = {"virtualOptionsList":"select__virtualOptionsList_iq7dt","virtualOptionsListHeader":"select__virtualOptionsListHeader_iq7dt","virtualOptionsListFooter":"select__virtualOptionsListFooter_iq7dt","withBorder":"select__withBorder_iq7dt","scrollable":"select__scrollable_iq7dt","inner":"select__inner_iq7dt","virtualRow":"select__virtualRow_iq7dt","highlighted":"select__highlighted_iq7dt","emptyPlaceholder":"select__emptyPlaceholder_iq7dt","size-64":"select__size-64_iq7dt","size-72":"select__size-72_iq7dt"};
|
|
24
24
|
require('./index.css')
|
|
25
25
|
|
|
26
26
|
var VirtualOptionsList = React.forwardRef(function (_a, ref) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1l8fn */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-300: #e7e8eb;
|
|
@@ -35,35 +35,35 @@
|
|
|
35
35
|
/* checkmark */
|
|
36
36
|
|
|
37
37
|
/* optgroup */
|
|
38
|
-
} .
|
|
38
|
+
} .select__virtualOptionsList_iq7dt {
|
|
39
39
|
width: 100%;
|
|
40
40
|
outline: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
position: sticky;
|
|
43
43
|
justify-content: space-between;
|
|
44
|
-
} .
|
|
44
|
+
} .select__virtualOptionsListHeader_iq7dt {
|
|
45
45
|
box-sizing: border-box;
|
|
46
46
|
border-bottom: 1px solid var(--color-light-neutral-300);
|
|
47
|
-
} .
|
|
47
|
+
} .select__virtualOptionsListFooter_iq7dt {
|
|
48
48
|
position: sticky;
|
|
49
49
|
bottom: 0;
|
|
50
50
|
box-sizing: border-box;
|
|
51
51
|
border-top: 1px solid transparent
|
|
52
|
-
} .
|
|
52
|
+
} .select__virtualOptionsListFooter_iq7dt.select__withBorder_iq7dt {
|
|
53
53
|
border-top: 1px solid var(--color-light-neutral-300);
|
|
54
|
-
} .
|
|
54
|
+
} .select__scrollable_iq7dt {
|
|
55
55
|
position: relative;
|
|
56
56
|
overflow: auto;
|
|
57
57
|
width: 100%;
|
|
58
|
-
} .
|
|
58
|
+
} .select__inner_iq7dt {
|
|
59
59
|
position: relative;
|
|
60
60
|
width: 100%;
|
|
61
|
-
} .
|
|
61
|
+
} .select__virtualRow_iq7dt {
|
|
62
62
|
position: absolute;
|
|
63
63
|
top: 0;
|
|
64
64
|
left: 0;
|
|
65
65
|
width: 100%
|
|
66
|
-
} .
|
|
66
|
+
} .select__virtualRow_iq7dt:before {
|
|
67
67
|
content: '';
|
|
68
68
|
position: absolute;
|
|
69
69
|
z-index: 1;
|
|
@@ -73,16 +73,16 @@
|
|
|
73
73
|
height: 1px;
|
|
74
74
|
background: var(--select-option-divider-background);
|
|
75
75
|
display: var(--select-option-divider-display);
|
|
76
|
-
} .
|
|
76
|
+
} .select__virtualRow_iq7dt:first-child:before {
|
|
77
77
|
display: none;
|
|
78
|
-
} .
|
|
79
|
-
.
|
|
78
|
+
} .select__highlighted_iq7dt:before,
|
|
79
|
+
.select__highlighted_iq7dt + .select__virtualRow_iq7dt:before {
|
|
80
80
|
display: none;
|
|
81
|
-
} .
|
|
81
|
+
} .select__emptyPlaceholder_iq7dt {
|
|
82
82
|
padding: var(--gap-m) var(--gap-s);
|
|
83
83
|
color: var(--select-options-list-empty-placeholder-color);
|
|
84
84
|
flex: 1;
|
|
85
|
-
} .select__size-
|
|
86
|
-
.select__size-
|
|
85
|
+
} .select__size-64_iq7dt .select__emptyPlaceholder_iq7dt,
|
|
86
|
+
.select__size-72_iq7dt .select__emptyPlaceholder_iq7dt {
|
|
87
87
|
padding: var(--gap-xl) var(--gap-m);
|
|
88
88
|
}
|
|
@@ -32,7 +32,7 @@ var BaseSelect = React.forwardRef(
|
|
|
32
32
|
function (_a, ref) {
|
|
33
33
|
var _b;
|
|
34
34
|
var _c, _d;
|
|
35
|
-
var dataTestId = _a.dataTestId, className = _a.className, fieldClassName = _a.fieldClassName, optionGroupClassName = _a.optionGroupClassName, optionsListClassName = _a.optionsListClassName, optionClassName = _a.optionClassName, popperClassName = _a.popperClassName, options = _a.options, _e = _a.autocomplete, autocomplete = _e === void 0 ? false : _e, _f = _a.multiple, multiple = _f === void 0 ? false : _f, _g = _a.allowUnselect, allowUnselect = _g === void 0 ? false : _g, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.closeOnSelect, closeOnSelect = _j === void 0 ? !multiple : _j, _k = _a.circularNavigation, circularNavigation = _k === void 0 ? false : _k, _l = _a.nativeSelect, nativeSelect = _l === void 0 ? false : _l, _m = _a.defaultOpen, defaultOpen = _m === void 0 ? false : _m, openProp = _a.open, _o = _a.popoverPosition, popoverPosition = _o === void 0 ? 'bottom-start' : _o, _p = _a.preventFlip, preventFlip = _p === void 0 ? true : _p, _q = _a.optionsListWidth, optionsListWidth = _q === void 0 ? 'content' : _q, name = _a.name, id = _a.id, selected = _a.selected, _r = _a.size, size = _r === void 0 ? 48 : _r, _s = _a.optionsSize, optionsSize = _s === void 0 ? size : _s, error = _a.error, hint = _a.hint, block = _a.block, label = _a.label, labelView = _a.labelView, placeholder = _a.placeholder, _t = _a.fieldProps, fieldProps = _t === void 0 ? {} : _t, _u = _a.optionsListProps, optionsListProps = _u === void 0 ? {} : _u, _v = _a.optionProps, optionProps = _v === void 0 ? {} : _v, _w = _a.searchProps, searchProps = _w === void 0 ? {} : _w, _x = _a.showSearch, showSearch = _x === void 0 ? false : _x, valueRenderer = _a.valueRenderer, onChange = _a.onChange, onOpen = _a.onOpen, onFocus = _a.onFocus, onBlur = _a.onBlur, onScroll = _a.onScroll, Arrow = _a.Arrow, _y = _a.Field, Field = _y === void 0 ? function () { return null; } : _y, _z = _a.OptionsList, OptionsList = _z === void 0 ? function () { return null; } : _z, _0 = _a.Optgroup, Optgroup = _0 === void 0 ? function () { return null; } : _0, _1 = _a.Option, Option = _1 === void 0 ? function () { return null; } : _1, _2 = _a.Search, Search = _2 === void 0 ? function () { return null; } : _2, updatePopover = _a.updatePopover, zIndexPopover = _a.zIndexPopover, _3 = _a.showEmptyOptionsList, showEmptyOptionsList = _3 === void 0 ? false : _3, visibleOptions = _a.visibleOptions, view = _a.view, _4 = _a.isBottomSheet, isBottomSheet = _4 === void 0 ? true : _4, footer = _a.footer, swipeable = _a.swipeable, modalProps = _a.modalProps, popoverProps = _a.popoverProps, modalFooterProps = _a.modalFooterProps, modalHeaderProps = _a.modalHeaderProps, bottomSheetProps = _a.bottomSheetProps, Popover = _a.Popover, ModalMobile = _a.ModalMobile, BottomSheet = _a.BottomSheet;
|
|
35
|
+
var dataTestId = _a.dataTestId, className = _a.className, fieldClassName = _a.fieldClassName, optionGroupClassName = _a.optionGroupClassName, optionsListClassName = _a.optionsListClassName, optionClassName = _a.optionClassName, popperClassName = _a.popperClassName, options = _a.options, _e = _a.autocomplete, autocomplete = _e === void 0 ? false : _e, _f = _a.multiple, multiple = _f === void 0 ? false : _f, _g = _a.allowUnselect, allowUnselect = _g === void 0 ? false : _g, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.closeOnSelect, closeOnSelect = _j === void 0 ? !multiple : _j, _k = _a.circularNavigation, circularNavigation = _k === void 0 ? false : _k, _l = _a.nativeSelect, nativeSelect = _l === void 0 ? false : _l, _m = _a.defaultOpen, defaultOpen = _m === void 0 ? false : _m, openProp = _a.open, _o = _a.popoverPosition, popoverPosition = _o === void 0 ? 'bottom-start' : _o, _p = _a.preventFlip, preventFlip = _p === void 0 ? true : _p, _q = _a.optionsListWidth, optionsListWidth = _q === void 0 ? 'content' : _q, name = _a.name, id = _a.id, selected = _a.selected, _r = _a.size, size = _r === void 0 ? 48 : _r, _s = _a.optionsSize, optionsSize = _s === void 0 ? size : _s, error = _a.error, hint = _a.hint, block = _a.block, label = _a.label, labelView = _a.labelView, placeholder = _a.placeholder, _t = _a.fieldProps, fieldProps = _t === void 0 ? {} : _t, _u = _a.optionsListProps, optionsListProps = _u === void 0 ? {} : _u, _v = _a.optionProps, optionProps = _v === void 0 ? {} : _v, _w = _a.searchProps, searchProps = _w === void 0 ? {} : _w, _x = _a.showSearch, showSearch = _x === void 0 ? false : _x, valueRenderer = _a.valueRenderer, onChange = _a.onChange, onOpen = _a.onOpen, onFocus = _a.onFocus, onBlur = _a.onBlur, onScroll = _a.onScroll, Arrow = _a.Arrow, _y = _a.Field, Field = _y === void 0 ? function () { return null; } : _y, _z = _a.OptionsList, OptionsList = _z === void 0 ? function () { return null; } : _z, _0 = _a.Optgroup, Optgroup = _0 === void 0 ? function () { return null; } : _0, _1 = _a.Option, Option = _1 === void 0 ? function () { return null; } : _1, _2 = _a.Search, Search = _2 === void 0 ? function () { return null; } : _2, updatePopover = _a.updatePopover, zIndexPopover = _a.zIndexPopover, _3 = _a.showEmptyOptionsList, showEmptyOptionsList = _3 === void 0 ? false : _3, visibleOptions = _a.visibleOptions, view = _a.view, _4 = _a.isBottomSheet, isBottomSheet = _4 === void 0 ? true : _4, footer = _a.footer, swipeable = _a.swipeable, modalProps = _a.modalProps, popoverProps = _a.popoverProps, modalFooterProps = _a.modalFooterProps, modalHeaderProps = _a.modalHeaderProps, bottomSheetProps = _a.bottomSheetProps, Popover = _a.Popover, ModalMobile = _a.ModalMobile, BottomSheet = _a.BottomSheet, limitDynamicOptionGroupSize = _a.limitDynamicOptionGroupSize;
|
|
36
36
|
var rootRef = React.useRef(null);
|
|
37
37
|
var fieldRef = React.useRef(null);
|
|
38
38
|
var listRef = React.useRef(null);
|
|
@@ -375,7 +375,7 @@ function (_a, ref) {
|
|
|
375
375
|
return (React__default.default.createElement("div", tslib.__assign({}, menuProps, { ref: view === 'desktop' ? menuRef : undefined, className: cn__default.default(optionsListClassName, view === 'mobile' && mobileStyles__default.default.optionsListWrapper, view === 'desktop' && styles__default.default.optionsListWrapper) }),
|
|
376
376
|
React__default.default.createElement(OptionsList, tslib.__assign({}, listProps, { ref: view === 'desktop' ? listProps.ref : scrollableContainerRef, setHighlightedIndex: view === 'desktop' ? setHighlightedIndex : undefined, className: cn__default.default((_a = {}, _a[mobileStyles__default.default.optionsList] = view === 'mobile', _a)), scrollbarClassName: cn__default.default((_b = {}, _b[mobileStyles__default.default.scrollbar] = view === 'mobile', _b)), 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: view === 'desktop' ? visibleOptions : 0, dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'options-list'), header: renderOptionsListHeader(), optionGroupClassName: cn__default.default(optionGroupClassName, (_c = {},
|
|
377
377
|
_c[mobileStyles__default.default.optionGroup] = view === 'mobile',
|
|
378
|
-
_c)), emptyPlaceholder: renderEmptyPlaceholder(), onScroll: onScroll, search: search, multiple: multiple })),
|
|
378
|
+
_c)), emptyPlaceholder: renderEmptyPlaceholder(), onScroll: onScroll, search: search, multiple: multiple, limitDynamicOptionGroupSize: limitDynamicOptionGroupSize })),
|
|
379
379
|
view === 'desktop' && React__default.default.createElement("div", { className: styles__default.default.optionsListBorder })));
|
|
380
380
|
};
|
|
381
381
|
var renderInPopover = function () {
|
|
@@ -28,9 +28,9 @@ var createCounter = function () {
|
|
|
28
28
|
};
|
|
29
29
|
var OptionsList = React.forwardRef(function (_a, ref) {
|
|
30
30
|
var _b, _c;
|
|
31
|
-
var _d = _a.size, size = _d === void 0 ? 48 : _d, className = _a.className, optionGroupClassName = _a.optionGroupClassName, scrollbarClassName = _a.scrollbarClassName, Option = _a.Option, getOptionProps = _a.getOptionProps, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.Optgroup, Optgroup = _f === void 0 ? components_optgroup_Component.Optgroup : _f, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _g = _a.visibleOptions, visibleOptions = _g === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _g, onScroll = _a.onScroll, open = _a.open, header = _a.header, footer = _a.footer, _h = _a.showFooter, showFooter = _h === void 0 ? true : _h, optionsListWidth = _a.optionsListWidth, nativeScrollbarProp = _a.nativeScrollbar, _j = _a.flatOptions, flatOptions = _j === void 0 ? [] : _j, setHighlightedIndex = _a.setHighlightedIndex, selectedItems = _a.selectedItems, search = _a.search, setSelectedItems = _a.setSelectedItems, multiple = _a.multiple;
|
|
32
|
-
var
|
|
33
|
-
var
|
|
31
|
+
var _d = _a.size, size = _d === void 0 ? 48 : _d, className = _a.className, optionGroupClassName = _a.optionGroupClassName, scrollbarClassName = _a.scrollbarClassName, Option = _a.Option, getOptionProps = _a.getOptionProps, _e = _a.options, options = _e === void 0 ? [] : _e, _f = _a.Optgroup, Optgroup = _f === void 0 ? components_optgroup_Component.Optgroup : _f, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _g = _a.visibleOptions, visibleOptions = _g === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _g, onScroll = _a.onScroll, open = _a.open, header = _a.header, footer = _a.footer, _h = _a.showFooter, showFooter = _h === void 0 ? true : _h, optionsListWidth = _a.optionsListWidth, nativeScrollbarProp = _a.nativeScrollbar, _j = _a.flatOptions, flatOptions = _j === void 0 ? [] : _j, setHighlightedIndex = _a.setHighlightedIndex, selectedItems = _a.selectedItems, search = _a.search, setSelectedItems = _a.setSelectedItems, multiple = _a.multiple, _k = _a.limitDynamicOptionGroupSize, limitDynamicOptionGroupSize = _k === void 0 ? false : _k;
|
|
32
|
+
var _l = React.useState(true), scrollTop = _l[0], setScrollTop = _l[1];
|
|
33
|
+
var _m = React.useState(false), scrollBottom = _m[0], setScrollBottom = _m[1];
|
|
34
34
|
var query = '(max-width: 1023px)';
|
|
35
35
|
var nativeScrollbar = coreComponentsMq.useMatchMedia(query, function () {
|
|
36
36
|
return coreComponentsShared.isClient() ? window.matchMedia(query).matches : true;
|
|
@@ -58,7 +58,16 @@ var OptionsList = React.forwardRef(function (_a, ref) {
|
|
|
58
58
|
};
|
|
59
59
|
return (React__default.default.createElement(Optgroup, { className: optionGroupClassName, label: group.label, key: group.label, size: size, options: group.options, selectedItems: groupSelectedItems, setSelectedItems: handleSelectedItems, search: search, multiple: multiple }, group.options.map(function (option) { return renderOption(option, counter()); })));
|
|
60
60
|
};
|
|
61
|
-
utils.useVisibleOptions(tslib.__assign(tslib.__assign({}, (!nativeScrollbar && { styleTargetRef: scrollbarRef })), { visibleOptions: visibleOptions, listRef: listRef, open: open,
|
|
61
|
+
utils.useVisibleOptions(tslib.__assign(tslib.__assign({}, (!nativeScrollbar && { styleTargetRef: scrollbarRef })), { visibleOptions: visibleOptions, listRef: listRef, open: open, options: options, actualOptionsCount: limitDynamicOptionGroupSize, size: limitDynamicOptionGroupSize
|
|
62
|
+
? (function () {
|
|
63
|
+
switch (typeof size) {
|
|
64
|
+
case 'string':
|
|
65
|
+
throw new Error('OptionsList with `limitDynamicOptionGroupSize` enabled needs a `size` with number type');
|
|
66
|
+
default:
|
|
67
|
+
return size;
|
|
68
|
+
}
|
|
69
|
+
})()
|
|
70
|
+
: undefined }));
|
|
62
71
|
if (options.length === 0 && !emptyPlaceholder && !header && !footer) {
|
|
63
72
|
return null;
|
|
64
73
|
}
|
package/cssm/typings.d.ts
CHANGED
|
@@ -279,6 +279,10 @@ type BaseSelectProps = {
|
|
|
279
279
|
* Дополнительные пропсы для Popover
|
|
280
280
|
*/
|
|
281
281
|
popoverProps?: Omit<PopoverProps, 'update' | 'zIndex' | 'position' | 'className' | 'open' | 'anchorElement' | 'preventFlip' | 'dataTestId'>;
|
|
282
|
+
/**
|
|
283
|
+
* Ограничение динамического размера группы вариантов выбора
|
|
284
|
+
*/
|
|
285
|
+
limitDynamicOptionGroupSize?: boolean;
|
|
282
286
|
};
|
|
283
287
|
type FieldProps = {
|
|
284
288
|
/**
|
|
@@ -489,6 +493,10 @@ type OptionsListProps = {
|
|
|
489
493
|
* Возможность выбрать несколько значений
|
|
490
494
|
*/
|
|
491
495
|
multiple?: boolean;
|
|
496
|
+
/**
|
|
497
|
+
* Ограничение динамического размера группы вариантов выбора
|
|
498
|
+
*/
|
|
499
|
+
limitDynamicOptionGroupSize?: BaseSelectProps['limitDynamicOptionGroupSize'];
|
|
492
500
|
};
|
|
493
501
|
type OptgroupProps = {
|
|
494
502
|
/**
|
package/cssm/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings";
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape, OptionsListProps } from "./typings";
|
|
3
3
|
declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
|
|
4
4
|
declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
|
|
5
5
|
declare const joinOptions: ({ selected, selectedMultiple, }: {
|
|
@@ -32,8 +32,20 @@ type useVisibleOptionsArgs = {
|
|
|
32
32
|
* Позволяет вызвать пересчет высоты
|
|
33
33
|
*/
|
|
34
34
|
invalidate?: unknown;
|
|
35
|
+
/**
|
|
36
|
+
* Список вариантов выбора
|
|
37
|
+
*/
|
|
38
|
+
options?: Array<OptionShape | GroupShape>;
|
|
39
|
+
/**
|
|
40
|
+
* Максимальный размер варианта выбора
|
|
41
|
+
*/
|
|
42
|
+
size?: Extract<OptionsListProps['size'], number>;
|
|
43
|
+
/**
|
|
44
|
+
* Учитывать действительное число вариантов выбора
|
|
45
|
+
*/
|
|
46
|
+
actualOptionsCount?: boolean;
|
|
35
47
|
};
|
|
36
|
-
declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, }: useVisibleOptionsArgs): void;
|
|
48
|
+
declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): void;
|
|
37
49
|
declare function defaultFilterFn(optionText: string, search: string): boolean;
|
|
38
50
|
declare function defaultGroupAccessor(option: GroupShape): string | undefined;
|
|
39
51
|
declare function defaultAccessor(option: OptionShape): string;
|