@alfalab/core-components-select 17.3.0 → 17.3.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.responsive.d.ts +3 -1
- package/Component.responsive.js +5 -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 +2 -2
- 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 +1 -1
- package/components/options-list/index.css +9 -9
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/virtual-options-list/Component.js +3 -3
- package/components/virtual-options-list/index.css +15 -15
- package/cssm/Component.responsive.d.ts +3 -1
- package/cssm/Component.responsive.js +5 -1
- package/cssm/components/base-option/index.module.css +2 -2
- package/cssm/components/base-select/mobile.module.css +2 -2
- package/cssm/components/virtual-options-list/Component.js +2 -2
- package/cssm/{hook-4aad7127.js → hook-aae7b381.js} +13 -0
- package/{hook-ad89c253.d.ts → cssm/hook-d4f77aed.d.ts} +18 -0
- package/cssm/mobile/Component.mobile.js +1 -1
- package/cssm/presets/index.d.ts +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/index.js +1 -1
- package/cssm/typings.d.ts +1 -1
- package/esm/Component.responsive.d.ts +3 -1
- package/esm/Component.responsive.js +5 -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 +2 -2
- 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 +1 -1
- package/esm/components/options-list/index.css +9 -9
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/virtual-options-list/Component.js +3 -3
- package/esm/components/virtual-options-list/index.css +15 -15
- package/esm/{hook-e8eb700a.js → hook-6d3e9b7b.js} +13 -0
- package/{modern/hook-ad89c253.d.ts → esm/hook-d4f77aed.d.ts} +18 -0
- package/esm/mobile/Component.mobile.js +1 -1
- package/esm/presets/index.d.ts +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 +1 -1
- package/{hook-6aa923ff.js → hook-0c5002d4.js} +13 -0
- package/{cssm/hook-ad89c253.d.ts → hook-d4f77aed.d.ts} +18 -0
- package/mobile/Component.mobile.js +1 -1
- package/modern/Component.responsive.d.ts +3 -1
- package/modern/Component.responsive.js +9 -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 +2 -2
- 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 +1 -1
- package/modern/components/options-list/index.css +9 -9
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +2 -2
- package/modern/components/virtual-options-list/Component.js +3 -3
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/{hook-a738ac9d.js → hook-88ffebd1.js} +13 -0
- package/{esm/hook-ad89c253.d.ts → modern/hook-d4f77aed.d.ts} +18 -0
- package/modern/mobile/Component.mobile.js +1 -1
- package/modern/presets/index.d.ts +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 +1 -1
- package/package.json +1 -1
- package/presets/index.d.ts +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/Component.responsive.tsx +17 -8
- package/src/components/base-option/index.module.css +1 -1
- package/src/components/base-select/mobile.module.css +1 -1
- package/src/components/virtual-options-list/Component.tsx +8 -1
- package/src/presets/useSelectWithApply/hook.tsx +13 -0
- package/typings.d.ts +1 -1
- /package/cssm/{hook-4aad7127.d.ts → hook-aae7b381.d.ts} +0 -0
- /package/esm/{hook-e8eb700a.d.ts → hook-6d3e9b7b.d.ts} +0 -0
- /package/{hook-6aa923ff.d.ts → hook-0c5002d4.d.ts} +0 -0
- /package/modern/{hook-a738ac9d.d.ts → hook-88ffebd1.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1wv83 */
|
|
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-border-primary: #d5d6dc;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/* checkmark */
|
|
54
54
|
|
|
55
55
|
/* optgroup */
|
|
56
|
-
} .
|
|
56
|
+
} .select__option_96ccl {
|
|
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_96ccl:not(.select__disabled_96ccl):active {
|
|
72
72
|
background: var(--select-option-active-background);
|
|
73
73
|
color: var(--select-option-active-color);
|
|
74
|
-
} .
|
|
74
|
+
} .select__option_96ccl: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_96ccl:first-child:before {
|
|
85
85
|
display: none;
|
|
86
|
-
} .select__size-
|
|
86
|
+
} .select__size-48_96ccl {
|
|
87
87
|
min-height: var(--size-s-height);
|
|
88
|
-
} .select__size-
|
|
88
|
+
} .select__size-56_96ccl {
|
|
89
89
|
min-height: var(--size-m-height);
|
|
90
|
-
} .select__size-
|
|
90
|
+
} .select__size-64_96ccl {
|
|
91
91
|
min-height: var(--size-l-height);
|
|
92
|
-
} .select__size-
|
|
92
|
+
} .select__size-72_96ccl {
|
|
93
93
|
min-height: var(--size-xl-height);
|
|
94
|
-
} .select__size-
|
|
95
|
-
.select__size-
|
|
94
|
+
} .select__size-64_96ccl,
|
|
95
|
+
.select__size-72_96ccl {
|
|
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_96ccl:before, .select__size-72_96ccl:before {
|
|
99
99
|
left: var(--select-option-l-left-padding);
|
|
100
100
|
right: var(--select-option-l-right-padding);
|
|
101
|
-
} .
|
|
101
|
+
} .select__selected_96ccl {
|
|
102
102
|
background: var(--select-option-selected-background);
|
|
103
103
|
color: var(--select-option-selected-color);
|
|
104
104
|
cursor: default;
|
|
105
|
-
} .
|
|
105
|
+
} .select__highlighted_96ccl {
|
|
106
106
|
background: var(--select-option-hover-background);
|
|
107
107
|
color: var(--select-option-hover-color)
|
|
108
|
-
} .
|
|
109
|
-
.
|
|
108
|
+
} .select__highlighted_96ccl:before,
|
|
109
|
+
.select__highlighted_96ccl + .select__option_96ccl:before {
|
|
110
110
|
opacity: 0;
|
|
111
|
-
} .
|
|
111
|
+
} .select__disabled_96ccl {
|
|
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_96ccl {
|
|
116
116
|
overflow: hidden;
|
|
117
117
|
flex: 1;
|
|
118
118
|
text-overflow: ellipsis;
|
|
119
|
-
} .
|
|
119
|
+
} .select__textContent_96ccl {
|
|
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_hg320","optionsListHeader":"select__optionsListHeader_hg320","optionsListFooter":"select__optionsListFooter_hg320","withBorder":"select__withBorder_hg320","scrollable":"select__scrollable_hg320","emptyPlaceholder":"select__emptyPlaceholder_hg320","size-64":"select__size-64_hg320","size-72":"select__size-72_hg320"};
|
|
23
23
|
require('./index.css')
|
|
24
24
|
|
|
25
25
|
var createCounter = function () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 155bd */
|
|
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,28 +29,28 @@
|
|
|
29
29
|
/* checkmark */
|
|
30
30
|
|
|
31
31
|
/* optgroup */
|
|
32
|
-
} .
|
|
32
|
+
} .select__optionsList_hg320 {
|
|
33
33
|
width: 100%;
|
|
34
34
|
outline: none;
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
position: relative;
|
|
37
|
-
} .
|
|
37
|
+
} .select__optionsListHeader_hg320 {
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
border-bottom: 1px solid var(--color-light-neutral-300);
|
|
40
|
-
} .
|
|
40
|
+
} .select__optionsListFooter_hg320 {
|
|
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_hg320.select__withBorder_hg320 {
|
|
46
46
|
border-top: 1px solid var(--color-light-neutral-300);
|
|
47
|
-
} .
|
|
47
|
+
} .select__scrollable_hg320 {
|
|
48
48
|
overflow: auto;
|
|
49
49
|
width: 100%;
|
|
50
|
-
} .
|
|
50
|
+
} .select__emptyPlaceholder_hg320 {
|
|
51
51
|
padding: var(--gap-m) var(--gap-s);
|
|
52
52
|
color: var(--select-options-list-empty-placeholder-color);
|
|
53
|
-
} .select__size-
|
|
54
|
-
.select__size-
|
|
53
|
+
} .select__size-64_hg320 .select__emptyPlaceholder_hg320,
|
|
54
|
+
.select__size-72_hg320 .select__emptyPlaceholder_hg320 {
|
|
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_vd97s"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Search = React.forwardRef(function (_a, ref) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1c7qh */
|
|
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 */
|
|
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_vd97s.select__component_vd97s {
|
|
27
27
|
width: auto;
|
|
28
28
|
}
|
|
@@ -20,12 +20,12 @@ 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_1b9jb","virtualOptionsListHeader":"select__virtualOptionsListHeader_1b9jb","virtualOptionsListFooter":"select__virtualOptionsListFooter_1b9jb","withBorder":"select__withBorder_1b9jb","scrollable":"select__scrollable_1b9jb","inner":"select__inner_1b9jb","virtualRow":"select__virtualRow_1b9jb","highlighted":"select__highlighted_1b9jb","emptyPlaceholder":"select__emptyPlaceholder_1b9jb","size-64":"select__size-64_1b9jb","size-72":"select__size-72_1b9jb"};
|
|
24
24
|
require('./index.css')
|
|
25
25
|
|
|
26
26
|
var VirtualOptionsList = React.forwardRef(function (_a, ref) {
|
|
27
27
|
var _b;
|
|
28
|
-
var _c = _a.size, size = _c === void 0 ? 48 : _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
|
+
var _c = _a.size, size = _c === void 0 ? 48 : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.highlightedIndex, highlightedIndex = _e === void 0 ? -1 : _e, optionGroupClassName = _a.optionGroupClassName, 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;
|
|
29
29
|
var listRef = React.useRef(null);
|
|
30
30
|
var parentRef = React.useRef(null);
|
|
31
31
|
var scrollbarRef = React.useRef(null);
|
|
@@ -116,7 +116,7 @@ var VirtualOptionsList = React.forwardRef(function (_a, ref) {
|
|
|
116
116
|
_a)), style: {
|
|
117
117
|
transform: "translateY(".concat(virtualRow.start, "px)"),
|
|
118
118
|
} },
|
|
119
|
-
group && React__default.default.createElement(Optgroup, { label: group.label }),
|
|
119
|
+
group && (React__default.default.createElement(Optgroup, { label: group.label, size: size, className: optionGroupClassName })),
|
|
120
120
|
!utils.isGroup(option) && (React__default.default.createElement(Option, tslib.__assign({}, getOptionProps(option, virtualRow.index))))));
|
|
121
121
|
});
|
|
122
122
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: jstnm */
|
|
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-border-primary: #d5d6dc;
|
|
@@ -35,34 +35,34 @@
|
|
|
35
35
|
/* checkmark */
|
|
36
36
|
|
|
37
37
|
/* optgroup */
|
|
38
|
-
} .
|
|
38
|
+
} .select__virtualOptionsList_1b9jb {
|
|
39
39
|
width: 100%;
|
|
40
40
|
outline: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
position: sticky;
|
|
43
|
-
} .
|
|
43
|
+
} .select__virtualOptionsListHeader_1b9jb {
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
border-bottom: 1px solid var(--color-light-neutral-300);
|
|
46
|
-
} .
|
|
46
|
+
} .select__virtualOptionsListFooter_1b9jb {
|
|
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_1b9jb.select__withBorder_1b9jb {
|
|
52
52
|
border-top: 1px solid var(--color-light-neutral-300);
|
|
53
|
-
} .
|
|
53
|
+
} .select__scrollable_1b9jb {
|
|
54
54
|
position: relative;
|
|
55
55
|
overflow: auto;
|
|
56
56
|
width: 100%;
|
|
57
|
-
} .
|
|
57
|
+
} .select__inner_1b9jb {
|
|
58
58
|
position: relative;
|
|
59
59
|
width: 100%;
|
|
60
|
-
} .
|
|
60
|
+
} .select__virtualRow_1b9jb {
|
|
61
61
|
position: absolute;
|
|
62
62
|
top: 0;
|
|
63
63
|
left: 0;
|
|
64
64
|
width: 100%
|
|
65
|
-
} .
|
|
65
|
+
} .select__virtualRow_1b9jb: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_1b9jb:first-child:before {
|
|
76
76
|
display: none;
|
|
77
|
-
} .
|
|
78
|
-
.
|
|
77
|
+
} .select__highlighted_1b9jb:before,
|
|
78
|
+
.select__highlighted_1b9jb + .select__virtualRow_1b9jb:before {
|
|
79
79
|
display: none;
|
|
80
|
-
} .
|
|
80
|
+
} .select__emptyPlaceholder_1b9jb {
|
|
81
81
|
padding: var(--gap-m) var(--gap-s);
|
|
82
82
|
color: var(--select-options-list-empty-placeholder-color);
|
|
83
|
-
} .select__size-
|
|
84
|
-
.select__size-
|
|
83
|
+
} .select__size-64_1b9jb .select__emptyPlaceholder_1b9jb,
|
|
84
|
+
.select__size-72_1b9jb .select__emptyPlaceholder_1b9jb {
|
|
85
85
|
padding: var(--gap-xl) var(--gap-m);
|
|
86
86
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SelectProps } from "./typings";
|
|
4
|
-
declare const SelectResponsive: React.ForwardRefExoticComponent<SelectProps &
|
|
4
|
+
declare const SelectResponsive: React.ForwardRefExoticComponent<(SelectProps & {
|
|
5
|
+
originalProps?: SelectProps | undefined;
|
|
6
|
+
}) & React.RefAttributes<HTMLDivElement>>;
|
|
5
7
|
export { SelectResponsive };
|
|
@@ -16,7 +16,11 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
16
16
|
var SelectResponsive = React.forwardRef(function (_a, ref) {
|
|
17
17
|
var onScroll = _a.onScroll, fieldProps = _a.fieldProps, _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, defaultMatchMediaValue = _a.defaultMatchMediaValue, restProps = tslib.__rest(_a, ["onScroll", "fieldProps", "breakpoint", "defaultMatchMediaValue"]);
|
|
18
18
|
var isDesktop = coreComponentsMq.useMatchMedia("(min-width: ".concat(breakpoint, "px)"), defaultMatchMediaValue)[0];
|
|
19
|
-
|
|
19
|
+
if (isDesktop) {
|
|
20
|
+
return (React__default.default.createElement(desktop_Component_desktop.SelectDesktop, tslib.__assign({ onScroll: onScroll }, restProps, { ref: ref, fieldProps: fieldProps })));
|
|
21
|
+
}
|
|
22
|
+
var mobileProps = tslib.__assign(tslib.__assign({}, restProps), restProps.originalProps);
|
|
23
|
+
return React__default.default.createElement(mobile_Component_mobile.SelectMobile, tslib.__assign({ fieldProps: fieldProps }, mobileProps, { ref: ref }));
|
|
20
24
|
});
|
|
21
25
|
|
|
22
26
|
exports.SelectResponsive = SelectResponsive;
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
padding: 0 0 0 var(--gap-s)
|
|
66
66
|
} .option.checkmarkBefore.mobile {
|
|
67
67
|
padding-left: var(--gap-m);
|
|
68
|
-
} .option.checkmarkAfter {
|
|
68
|
+
} .option.checkmarkAfter.checkmarkAfter {
|
|
69
69
|
padding: 0 var(--gap-s) 0 0
|
|
70
|
-
} .option.checkmarkAfter.mobile {
|
|
70
|
+
} .option.checkmarkAfter.checkmarkAfter.mobile {
|
|
71
71
|
padding-right: var(--gap-l);
|
|
72
72
|
} .option.textContent {
|
|
73
73
|
padding: var(--gap-s)
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
flex: 1;
|
|
47
47
|
} .search {
|
|
48
48
|
padding: var(--gap-xs);
|
|
49
|
-
} .option {
|
|
49
|
+
} .option.option {
|
|
50
50
|
padding: var(--gap-2xs) var(--gap-l) var(--gap-2xs) var(--gap-m)
|
|
51
|
-
} .option:before {
|
|
51
|
+
} .option.option:before {
|
|
52
52
|
display: none;
|
|
53
53
|
} .optionGroup {
|
|
54
54
|
padding: var(--gap-m) var(--gap-m) var(--gap-xs);
|
|
@@ -24,7 +24,7 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
|
24
24
|
|
|
25
25
|
var VirtualOptionsList = React.forwardRef(function (_a, ref) {
|
|
26
26
|
var _b;
|
|
27
|
-
var _c = _a.size, size = _c === void 0 ? 48 : _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;
|
|
27
|
+
var _c = _a.size, size = _c === void 0 ? 48 : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.highlightedIndex, highlightedIndex = _e === void 0 ? -1 : _e, optionGroupClassName = _a.optionGroupClassName, 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);
|
|
@@ -115,7 +115,7 @@ var VirtualOptionsList = React.forwardRef(function (_a, ref) {
|
|
|
115
115
|
_a)), style: {
|
|
116
116
|
transform: "translateY(".concat(virtualRow.start, "px)"),
|
|
117
117
|
} },
|
|
118
|
-
group && React__default.default.createElement(Optgroup, { label: group.label }),
|
|
118
|
+
group && (React__default.default.createElement(Optgroup, { label: group.label, size: size, className: optionGroupClassName })),
|
|
119
119
|
!utils.isGroup(option) && (React__default.default.createElement(Option, tslib.__assign({}, getOptionProps(option, virtualRow.index))))));
|
|
120
120
|
});
|
|
121
121
|
};
|
|
@@ -123,6 +123,19 @@ function useSelectWithApply(_a) {
|
|
|
123
123
|
showSearch: showSearch,
|
|
124
124
|
searchProps: showSearch
|
|
125
125
|
? tslib.__assign(tslib.__assign({}, searchProps), { value: search, onChange: setSearch }) : undefined,
|
|
126
|
+
/* Костыль для респонсив селекта. В мобильную версию хук уже зашит, и это единственный передать в мобилку оригинальные пропсы */
|
|
127
|
+
originalProps: {
|
|
128
|
+
options: options,
|
|
129
|
+
selected: selected,
|
|
130
|
+
onChange: onChange,
|
|
131
|
+
OptionsList: OptionsList,
|
|
132
|
+
optionsListProps: optionsListProps,
|
|
133
|
+
showClear: showClear,
|
|
134
|
+
showSelectAll: showSelectAll,
|
|
135
|
+
showHeaderWithSelectAll: showHeaderWithSelectAll,
|
|
136
|
+
showSearch: showSearch,
|
|
137
|
+
searchProps: searchProps,
|
|
138
|
+
},
|
|
126
139
|
};
|
|
127
140
|
}
|
|
128
141
|
|
|
@@ -86,5 +86,23 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
86
86
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
87
87
|
filterFn?: ((optionText: string, search: string) => boolean) | undefined;
|
|
88
88
|
} | undefined;
|
|
89
|
+
originalProps: {
|
|
90
|
+
options: (OptionShape | import("./typings").GroupShape)[];
|
|
91
|
+
selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
|
|
92
|
+
onChange: (payload: import("./typings").BaseSelectChangePayload) => void;
|
|
93
|
+
OptionsList: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
94
|
+
optionsListProps: unknown;
|
|
95
|
+
showClear: boolean;
|
|
96
|
+
showSelectAll: boolean;
|
|
97
|
+
showHeaderWithSelectAll: boolean;
|
|
98
|
+
showSearch: boolean | undefined;
|
|
99
|
+
searchProps: {
|
|
100
|
+
componentProps?: import("./typings").SearchProps | undefined;
|
|
101
|
+
accessor?: ((option: OptionShape) => string) | undefined;
|
|
102
|
+
filterFn?: ((optionText: string, search: string) => boolean) | undefined;
|
|
103
|
+
value?: string | undefined;
|
|
104
|
+
onChange?: ((value: string) => void) | undefined;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
89
107
|
};
|
|
90
108
|
export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
|
|
@@ -16,7 +16,7 @@ var components_option_Component = require('../components/option/Component.js');
|
|
|
16
16
|
var components_optionsList_Component = require('../components/options-list/Component.js');
|
|
17
17
|
var components_search_Component = require('../components/search/Component.js');
|
|
18
18
|
var components_virtualOptionsList_Component = require('../components/virtual-options-list/Component.js');
|
|
19
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
19
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-aae7b381.js');
|
|
20
20
|
var presets_useSelectWithApply_optionsListWithApply_header_Component = require('../presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
21
21
|
|
|
22
22
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
package/cssm/presets/index.d.ts
CHANGED
package/cssm/presets/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var presets_useSelectWithLoading_hook = require('./useSelectWithLoading/hook.js');
|
|
6
6
|
var presets_useLazyLoading_hook = require('./useLazyLoading/hook.js');
|
|
7
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
7
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-aae7b381.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('tslib');
|
|
6
6
|
require('react');
|
|
7
7
|
require('../../utils.js');
|
|
8
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-
|
|
8
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-aae7b381.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -6,7 +6,7 @@ require('tslib');
|
|
|
6
6
|
require('react');
|
|
7
7
|
require('../../../components/options-list/Component.js');
|
|
8
8
|
require('../../../consts.js');
|
|
9
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-
|
|
9
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-aae7b381.js');
|
|
10
10
|
require('./footer/Component.js');
|
|
11
11
|
require('./header/Component.js');
|
|
12
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-aae7b381";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-
|
|
5
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-aae7b381.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
package/cssm/shared/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var presets_useSelectWithLoading_hook = require('../presets/useSelectWithLoading/hook.js');
|
|
6
6
|
var presets_useLazyLoading_hook = require('../presets/useLazyLoading/hook.js');
|
|
7
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
7
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-aae7b381.js');
|
|
8
8
|
var utils = require('../utils.js');
|
|
9
9
|
var components_option_Component = require('../components/option/Component.js');
|
|
10
10
|
var components_baseOption_Component = require('../components/base-option/Component.js');
|
package/cssm/typings.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { InputProps } from "@alfalab/core-components-input";
|
|
|
5
5
|
import { ModalProps } from "@alfalab/core-components-modal";
|
|
6
6
|
import { ModalFooterProps, ModalHeaderProps } from "@alfalab/core-components-modal/shared";
|
|
7
7
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
8
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
8
|
+
import { UseSelectWithApplyProps } from "./hook-d4f77aed";
|
|
9
9
|
type AnyObject = Record<string, any>;
|
|
10
10
|
type OptionShape = {
|
|
11
11
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SelectProps } from "./typings";
|
|
4
|
-
declare const SelectResponsive: React.ForwardRefExoticComponent<SelectProps &
|
|
4
|
+
declare const SelectResponsive: React.ForwardRefExoticComponent<(SelectProps & {
|
|
5
|
+
originalProps?: SelectProps | undefined;
|
|
6
|
+
}) & React.RefAttributes<HTMLDivElement>>;
|
|
5
7
|
export { SelectResponsive };
|
|
@@ -8,7 +8,11 @@ import './mobile/Component.modal.mobile.js';
|
|
|
8
8
|
var SelectResponsive = forwardRef(function (_a, ref) {
|
|
9
9
|
var onScroll = _a.onScroll, fieldProps = _a.fieldProps, _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, defaultMatchMediaValue = _a.defaultMatchMediaValue, restProps = __rest(_a, ["onScroll", "fieldProps", "breakpoint", "defaultMatchMediaValue"]);
|
|
10
10
|
var isDesktop = useMatchMedia("(min-width: ".concat(breakpoint, "px)"), defaultMatchMediaValue)[0];
|
|
11
|
-
|
|
11
|
+
if (isDesktop) {
|
|
12
|
+
return (React.createElement(SelectDesktop, __assign({ onScroll: onScroll }, restProps, { ref: ref, fieldProps: fieldProps })));
|
|
13
|
+
}
|
|
14
|
+
var mobileProps = __assign(__assign({}, restProps), restProps.originalProps);
|
|
15
|
+
return React.createElement(SelectMobile, __assign({ fieldProps: fieldProps }, mobileProps, { ref: ref }));
|
|
12
16
|
});
|
|
13
17
|
|
|
14
18
|
export { SelectResponsive };
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ChevronDownMIcon } from '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
4
4
|
|
|
5
|
-
var styles = {"arrow":"
|
|
5
|
+
var styles = {"arrow":"select__arrow_tu7qz","open":"select__open_tu7qz"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Arrow = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: jpa05 */
|
|
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-translucent-700: rgba(4, 4, 21, 0.47); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
/* checkmark */
|
|
27
27
|
|
|
28
28
|
/* optgroup */
|
|
29
|
-
} .
|
|
29
|
+
} .select__arrow_tu7qz {
|
|
30
30
|
display: block;
|
|
31
31
|
width: 24px;
|
|
32
32
|
height: 24px;
|
|
33
33
|
color: var(--select-arrow-color);
|
|
34
34
|
|
|
35
35
|
transition: transform 0.15s ease-in-out, opacity 0.2s ease;
|
|
36
|
-
} .
|
|
36
|
+
} .select__open_tu7qz {
|
|
37
37
|
transform: var(--arrow-transform);
|
|
38
38
|
}
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { Checkbox } from '@alfalab/core-components-checkbox/esm';
|
|
4
4
|
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
5
5
|
|
|
6
|
-
var styles = {"checkmark":"
|
|
6
|
+
var styles = {"checkmark":"select__checkmark_11fgs","single":"select__single_11fgs","selected":"select__selected_11fgs"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
var BaseCheckmark = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: q38ha */
|
|
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 */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
/* checkmark */
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
|
-
} .
|
|
26
|
+
} .select__checkmark_11fgs {
|
|
27
27
|
flex-shrink: 0;
|
|
28
28
|
box-sizing: border-box;
|
|
29
|
-
} .
|
|
29
|
+
} .select__single_11fgs {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: center;
|
|
33
33
|
opacity: 0
|
|
34
|
-
} .
|
|
34
|
+
} .select__single_11fgs.select__selected_11fgs {
|
|
35
35
|
opacity: 1;
|
|
36
36
|
}
|
|
@@ -3,7 +3,7 @@ import React, { isValidElement } from 'react';
|
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { BaseCheckmark } from '../base-checkmark/Component.js';
|
|
5
5
|
|
|
6
|
-
var styles = {"option":"
|
|
6
|
+
var styles = {"option":"select__option_1w69y","disabled":"select__disabled_1w69y","checkmarkBefore":"select__checkmarkBefore_1w69y","mobile":"select__mobile_1w69y","checkmarkAfter":"select__checkmarkAfter_1w69y","textContent":"select__textContent_1w69y","selected":"select__selected_1w69y","highlighted":"select__highlighted_1w69y","content":"select__content_1w69y"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
var BaseOption = function (_a) {
|