@alfalab/core-components-select 15.0.4 → 15.1.1
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.desktop.js +5 -2
- package/Component.mobile.d.ts +1 -1
- package/Component.mobile.js +9 -4
- package/Component.modal.mobile.d.ts +1 -1
- package/Component.modal.mobile.js +7 -2
- package/Component.responsive.js +4 -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 +73 -12
- package/components/base-select/index.css +16 -9
- package/components/base-select-mobile/Component.js +51 -11
- package/components/base-select-mobile/footer/Component.js +1 -1
- package/components/base-select-mobile/footer/index.css +5 -5
- package/components/base-select-mobile/index.css +26 -11
- package/components/base-select-mobile/index.js +3 -0
- 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/index.d.ts +1 -0
- package/components/index.js +4 -0
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/option/Component.js +1 -1
- package/components/option/index.css +20 -20
- package/components/options-list/Component.js +5 -5
- package/components/options-list/index.css +9 -9
- package/components/search/Component.d.ts +7 -0
- package/components/search/Component.js +24 -0
- package/components/search/index.css +28 -0
- package/components/search/index.d.ts +1 -0
- package/components/search/index.js +14 -0
- package/components/virtual-options-list/Component.js +1 -1
- package/components/virtual-options-list/index.css +15 -15
- package/cssm/Component.desktop.js +6 -2
- package/cssm/Component.mobile.d.ts +1 -1
- package/cssm/Component.mobile.js +10 -4
- package/cssm/Component.modal.mobile.d.ts +1 -1
- package/cssm/Component.modal.mobile.js +8 -2
- package/cssm/Component.responsive.js +5 -1
- package/cssm/components/base-select/Component.js +72 -11
- package/cssm/components/base-select/index.module.css +8 -1
- package/cssm/components/base-select-mobile/Component.js +51 -10
- package/cssm/components/base-select-mobile/index.js +4 -0
- package/cssm/components/base-select-mobile/index.module.css +15 -0
- package/cssm/components/index.d.ts +1 -0
- package/cssm/components/index.js +5 -0
- package/cssm/components/options-list/Component.js +4 -4
- package/cssm/components/search/Component.d.ts +7 -0
- package/cssm/components/search/Component.js +23 -0
- package/cssm/components/search/index.d.ts +1 -0
- package/cssm/components/search/index.js +15 -0
- package/cssm/components/search/index.module.css +27 -0
- package/cssm/desktop.js +4 -0
- package/{modern/hook-9ea9e32c.d.ts → cssm/hook-8abfea97.d.ts} +20 -5
- package/cssm/{hook-97e6e688.js → hook-d1f5dd40.js} +19 -5
- package/cssm/index.js +5 -1
- package/cssm/mobile.js +5 -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.js +8 -1
- package/cssm/typings.d.ts +23 -1
- package/cssm/utils.d.ts +5 -2
- package/cssm/utils.js +34 -5
- package/desktop.js +3 -0
- package/esm/Component.desktop.js +5 -2
- package/esm/Component.mobile.d.ts +1 -1
- package/esm/Component.mobile.js +9 -4
- package/esm/Component.modal.mobile.d.ts +1 -1
- package/esm/Component.modal.mobile.js +7 -2
- package/esm/Component.responsive.js +4 -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 +74 -13
- package/esm/components/base-select/index.css +16 -9
- package/esm/components/base-select-mobile/Component.js +52 -12
- package/esm/components/base-select-mobile/footer/Component.js +1 -1
- package/esm/components/base-select-mobile/footer/index.css +5 -5
- package/esm/components/base-select-mobile/index.css +26 -11
- package/esm/components/base-select-mobile/index.js +3 -0
- 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/index.d.ts +1 -0
- package/esm/components/index.js +3 -0
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +6 -6
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +20 -20
- package/esm/components/options-list/Component.js +5 -5
- package/esm/components/options-list/index.css +9 -9
- package/esm/components/search/Component.d.ts +7 -0
- package/esm/components/search/Component.js +15 -0
- package/esm/components/search/index.css +28 -0
- package/esm/components/search/index.d.ts +1 -0
- package/esm/components/search/index.js +6 -0
- package/esm/components/virtual-options-list/Component.js +1 -1
- package/esm/components/virtual-options-list/index.css +15 -15
- package/esm/desktop.js +3 -0
- package/esm/{hook-276cd428.js → hook-758ebd33.js} +21 -7
- package/{hook-9ea9e32c.d.ts → esm/hook-8abfea97.d.ts} +20 -5
- package/esm/index.js +4 -1
- package/esm/mobile.js +4 -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.js +5 -2
- package/esm/typings.d.ts +23 -1
- package/esm/utils.d.ts +5 -2
- package/esm/utils.js +33 -6
- package/{cssm/hook-9ea9e32c.d.ts → hook-8abfea97.d.ts} +20 -5
- package/{hook-ac9069cc.js → hook-9b793700.js} +19 -5
- package/index.js +4 -1
- package/mobile.js +4 -1
- package/modern/Component.desktop.js +5 -2
- package/modern/Component.mobile.d.ts +1 -1
- package/modern/Component.mobile.js +9 -4
- package/modern/Component.modal.mobile.d.ts +1 -1
- package/modern/Component.modal.mobile.js +7 -2
- package/modern/Component.responsive.js +4 -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 +62 -9
- package/modern/components/base-select/index.css +16 -9
- package/modern/components/base-select-mobile/Component.js +42 -9
- package/modern/components/base-select-mobile/footer/Component.js +1 -1
- package/modern/components/base-select-mobile/footer/index.css +5 -5
- package/modern/components/base-select-mobile/index.css +26 -11
- package/modern/components/base-select-mobile/index.js +3 -0
- 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/index.d.ts +1 -0
- package/modern/components/index.js +3 -0
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +20 -20
- package/modern/components/options-list/Component.js +5 -5
- package/modern/components/options-list/index.css +9 -9
- package/modern/components/search/Component.d.ts +7 -0
- package/modern/components/search/Component.js +11 -0
- package/modern/components/search/index.css +28 -0
- package/modern/components/search/index.d.ts +1 -0
- package/modern/components/search/index.js +5 -0
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/desktop.js +3 -0
- package/modern/{hook-f0d60b8e.js → hook-707bbdbf.js} +23 -6
- package/{esm/hook-9ea9e32c.d.ts → modern/hook-8abfea97.d.ts} +20 -5
- package/modern/index.js +4 -1
- package/modern/mobile.js +4 -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.js +5 -2
- package/modern/typings.d.ts +23 -1
- package/modern/utils.d.ts +5 -2
- package/modern/utils.js +34 -6
- package/package.json +6 -6
- 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.js +7 -1
- package/src/Component.desktop.tsx +4 -1
- package/src/Component.mobile.tsx +7 -0
- package/src/Component.modal.mobile.tsx +4 -0
- package/src/components/base-select/Component.tsx +101 -10
- package/src/components/base-select/index.module.css +12 -0
- package/src/components/base-select-mobile/Component.tsx +78 -8
- package/src/components/base-select-mobile/index.module.css +24 -0
- package/src/components/index.ts +1 -0
- package/src/components/options-list/Component.tsx +8 -3
- package/src/components/search/Component.tsx +31 -0
- package/src/components/search/index.module.css +6 -0
- package/src/components/search/index.ts +1 -0
- package/src/presets/useSelectWithApply/hook.tsx +32 -3
- package/src/presets/useSelectWithApply/options-list-with-apply/Component.tsx +13 -1
- package/src/typings.ts +27 -0
- package/src/utils.ts +37 -5
- package/typings.d.ts +23 -1
- package/utils.d.ts +5 -2
- package/utils.js +34 -5
- /package/cssm/{hook-97e6e688.d.ts → hook-d1f5dd40.d.ts} +0 -0
- /package/esm/{hook-276cd428.d.ts → hook-758ebd33.d.ts} +0 -0
- /package/{hook-ac9069cc.d.ts → hook-9b793700.d.ts} +0 -0
- /package/modern/{hook-f0d60b8e.d.ts → hook-707bbdbf.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 16qdi */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
--select-optgroup-right-padding: var(--gap-s);
|
|
36
36
|
--select-optgroup-l-left-padding: var(--gap-m);
|
|
37
37
|
--select-optgroup-l-right-padding: var(--gap-m);
|
|
38
|
-
} .
|
|
38
|
+
} .select__optgroup_12mvz {
|
|
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_12mvz + *[role='option']:before {
|
|
48
48
|
display: none;
|
|
49
|
-
} .
|
|
49
|
+
} .select__label_12mvz {
|
|
50
50
|
font-size: 12px;
|
|
51
51
|
line-height: 16px;
|
|
52
52
|
font-weight: 500;
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
|
|
56
56
|
display: block;
|
|
57
57
|
color: var(--select-optgroup-color);
|
|
58
|
-
} .
|
|
59
|
-
.
|
|
58
|
+
} .select__l_12mvz,
|
|
59
|
+
.select__xl_12mvz {
|
|
60
60
|
padding-left: var(--select-optgroup-l-left-padding);
|
|
61
61
|
padding-right: var(--select-optgroup-l-right-padding);
|
|
62
62
|
}
|
|
@@ -7,7 +7,7 @@ import '@alfalab/core-components-checkbox/modern';
|
|
|
7
7
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
9
9
|
|
|
10
|
-
const styles = {"option":"
|
|
10
|
+
const styles = {"option":"select__option_1a2y9","disabled":"select__disabled_1a2y9","s":"select__s_1a2y9","m":"select__m_1a2y9","l":"select__l_1a2y9","xl":"select__xl_1a2y9","selected":"select__selected_1a2y9","highlighted":"select__highlighted_1a2y9","content":"select__content_1a2y9","textContent":"select__textContent_1a2y9"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const Option = ({ size = 's', className, option, children, selected, highlighted, disabled, multiple, mobile, Checkmark: Checkmark$2 = mobile ? Checkmark : Checkmark$1, innerProps, dataTestId, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ff5y */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/* checkmark */
|
|
54
54
|
|
|
55
55
|
/* optgroup */
|
|
56
|
-
} .
|
|
56
|
+
} .select__option_1a2y9 {
|
|
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_1a2y9:not(.select__disabled_1a2y9):active {
|
|
72
72
|
background: var(--select-option-active-background);
|
|
73
73
|
color: var(--select-option-active-color);
|
|
74
|
-
} .
|
|
74
|
+
} .select__option_1a2y9:before {
|
|
75
75
|
content: '';
|
|
76
76
|
position: absolute;
|
|
77
77
|
left: var(--select-option-left-padding);
|
|
@@ -81,46 +81,46 @@
|
|
|
81
81
|
background: var(--select-option-divider-background);
|
|
82
82
|
display: var(--select-option-divider-display);
|
|
83
83
|
transition: opacity 0.2s ease;
|
|
84
|
-
} .
|
|
84
|
+
} .select__option_1a2y9:first-child:before {
|
|
85
85
|
display: none;
|
|
86
|
-
} .
|
|
86
|
+
} .select__s_1a2y9 {
|
|
87
87
|
min-height: var(--size-s-height);
|
|
88
|
-
} .
|
|
88
|
+
} .select__m_1a2y9 {
|
|
89
89
|
min-height: var(--size-m-height);
|
|
90
|
-
} .
|
|
90
|
+
} .select__l_1a2y9 {
|
|
91
91
|
min-height: var(--size-l-height);
|
|
92
|
-
} .
|
|
92
|
+
} .select__xl_1a2y9 {
|
|
93
93
|
min-height: var(--size-xl-height);
|
|
94
|
-
} .
|
|
95
|
-
.
|
|
94
|
+
} .select__l_1a2y9,
|
|
95
|
+
.select__xl_1a2y9 {
|
|
96
96
|
padding-left: var(--select-option-l-left-padding);
|
|
97
97
|
padding-right: var(--select-option-l-right-padding)
|
|
98
|
-
} .
|
|
98
|
+
} .select__l_1a2y9:before, .select__xl_1a2y9:before {
|
|
99
99
|
left: var(--select-option-l-left-padding);
|
|
100
100
|
right: var(--select-option-l-right-padding);
|
|
101
|
-
} .
|
|
101
|
+
} .select__selected_1a2y9 {
|
|
102
102
|
background: var(--select-option-selected-background);
|
|
103
103
|
color: var(--select-option-selected-color);
|
|
104
104
|
cursor: default;
|
|
105
|
-
} .
|
|
105
|
+
} .select__highlighted_1a2y9 {
|
|
106
106
|
background: var(--select-option-hover-background);
|
|
107
107
|
color: var(--select-option-hover-color)
|
|
108
|
-
} .
|
|
109
|
-
.
|
|
108
|
+
} .select__highlighted_1a2y9:before,
|
|
109
|
+
.select__highlighted_1a2y9 + .select__option_1a2y9:before {
|
|
110
110
|
opacity: 0;
|
|
111
|
-
} .
|
|
111
|
+
} .select__disabled_1a2y9 {
|
|
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_1a2y9 {
|
|
116
116
|
overflow: hidden;
|
|
117
117
|
flex: 1;
|
|
118
118
|
text-overflow: ellipsis;
|
|
119
|
-
} .
|
|
119
|
+
} .select__textContent_1a2y9 {
|
|
120
120
|
padding-top: var(--gap-s);
|
|
121
121
|
padding-bottom: var(--gap-s);
|
|
122
122
|
} /* IE min-height fix */ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
123
|
-
.
|
|
123
|
+
.select__option_1a2y9:after {
|
|
124
124
|
min-height: inherit;
|
|
125
125
|
font-size: 0;
|
|
126
126
|
content: '';
|
|
@@ -7,7 +7,7 @@ import { DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
|
|
|
7
7
|
import { useVisibleOptions, isGroup } from '../../utils.js';
|
|
8
8
|
import { Optgroup } from '../optgroup/Component.js';
|
|
9
9
|
|
|
10
|
-
const styles = {"optionsList":"
|
|
10
|
+
const styles = {"optionsList":"select__optionsList_1wt11","optionsListHeader":"select__optionsListHeader_1wt11","optionsListFooter":"select__optionsListFooter_1wt11","withBorder":"select__withBorder_1wt11","scrollable":"select__scrollable_1wt11","emptyPlaceholder":"select__emptyPlaceholder_1wt11","l":"select__l_1wt11","xl":"select__xl_1wt11"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const createCounter = () => {
|
|
@@ -15,7 +15,7 @@ const createCounter = () => {
|
|
|
15
15
|
// eslint-disable-next-line no-plusplus
|
|
16
16
|
return () => count++;
|
|
17
17
|
};
|
|
18
|
-
const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, Option, getOptionProps, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, onScroll, open, header, footer, showFooter = true, optionsListWidth, nativeScrollbar: nativeScrollbarProp, flatOptions = [], }, ref) => {
|
|
18
|
+
const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, scrollbarClassName, Option, getOptionProps, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, onScroll, open, header, footer, showFooter = true, optionsListWidth, nativeScrollbar: nativeScrollbarProp, flatOptions = [], }, ref) => {
|
|
19
19
|
let [nativeScrollbar] = useMedia([[true, '(max-width: 1023px)']], false);
|
|
20
20
|
nativeScrollbar = Boolean(nativeScrollbarProp ?? nativeScrollbar);
|
|
21
21
|
const renderOption = (option, index) => (React.createElement(Option, { key: option.key, ...getOptionProps(option, index) }));
|
|
@@ -30,7 +30,7 @@ const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, O
|
|
|
30
30
|
open,
|
|
31
31
|
invalidate: options,
|
|
32
32
|
});
|
|
33
|
-
if (options.length === 0 && !emptyPlaceholder) {
|
|
33
|
+
if (options.length === 0 && !emptyPlaceholder && !header && !footer) {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
36
|
const renderListItems = () => (React.createElement(React.Fragment, null,
|
|
@@ -42,9 +42,9 @@ const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, O
|
|
|
42
42
|
'data-test-id': dataTestId,
|
|
43
43
|
ref: ref,
|
|
44
44
|
};
|
|
45
|
-
return (React.createElement(Scrollbar, { className: styles.scrollable, ref: scrollbarRef, horizontalAutoStretch: optionsListWidth === 'content', scrollableNodeProps: scrollableNodeProps, contentNodeProps: { ref: listRef } }, renderListItems()));
|
|
45
|
+
return (React.createElement(Scrollbar, { className: cn(styles.scrollable, scrollbarClassName), ref: scrollbarRef, horizontalAutoStretch: optionsListWidth === 'content', scrollableNodeProps: scrollableNodeProps, contentNodeProps: { ref: listRef } }, renderListItems()));
|
|
46
46
|
};
|
|
47
|
-
const renderWithNativeScrollbar = () => (React.createElement("div", { className: styles.scrollable, ref: mergeRefs([listRef, ref]), onScroll: onScroll }, renderListItems()));
|
|
47
|
+
const renderWithNativeScrollbar = () => (React.createElement("div", { className: cn(styles.scrollable, scrollbarClassName), ref: mergeRefs([listRef, ref]), onScroll: onScroll }, renderListItems()));
|
|
48
48
|
return (React.createElement("div", { ...(nativeScrollbar && { 'data-test-id': dataTestId }), className: cn(styles.optionsList, styles[size], className) },
|
|
49
49
|
header && React.createElement("div", { className: styles.optionsListHeader }, header),
|
|
50
50
|
nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 57u8a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-secondary: #e9e9eb;
|
|
@@ -29,28 +29,28 @@
|
|
|
29
29
|
/* checkmark */
|
|
30
30
|
|
|
31
31
|
/* optgroup */
|
|
32
|
-
} .
|
|
32
|
+
} .select__optionsList_1wt11 {
|
|
33
33
|
width: 100%;
|
|
34
34
|
outline: none;
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
position: relative;
|
|
37
|
-
} .
|
|
37
|
+
} .select__optionsListHeader_1wt11 {
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
40
|
-
} .
|
|
40
|
+
} .select__optionsListFooter_1wt11 {
|
|
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_1wt11.select__withBorder_1wt11 {
|
|
46
46
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
47
|
-
} .
|
|
47
|
+
} .select__scrollable_1wt11 {
|
|
48
48
|
overflow: auto;
|
|
49
49
|
width: 100%;
|
|
50
|
-
} .
|
|
50
|
+
} .select__emptyPlaceholder_1wt11 {
|
|
51
51
|
padding: var(--gap-m) var(--gap-s);
|
|
52
52
|
color: var(--select-options-list-empty-placeholder-color);
|
|
53
|
-
} .
|
|
54
|
-
.
|
|
53
|
+
} .select__l_1wt11 .select__emptyPlaceholder_1wt11,
|
|
54
|
+
.select__xl_1wt11 .select__emptyPlaceholder_1wt11 {
|
|
55
55
|
padding: var(--gap-xl) var(--gap-m);
|
|
56
56
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const Search: React.ForwardRefExoticComponent<Omit<import("packages/input/src/components/base-input").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
4
|
+
breakpoint?: number | undefined;
|
|
5
|
+
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
6
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export { Search };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Input } from '@alfalab/core-components-input/modern';
|
|
4
|
+
import { MagnifierMIcon } from '@alfalab/icons-glyph/MagnifierMIcon';
|
|
5
|
+
|
|
6
|
+
const styles = {"component":"select__component_d5xo6"};
|
|
7
|
+
require('./index.css')
|
|
8
|
+
|
|
9
|
+
const Search = forwardRef(({ clear = true, placeholder = 'Поиск', className, leftAddons = React.createElement(MagnifierMIcon, { color: '#86868A' }), ...restProps }, ref) => (React.createElement(Input, { ref: ref, className: cn(styles.component, className), placeholder: placeholder, leftAddons: leftAddons, clear: clear, ...restProps })));
|
|
10
|
+
|
|
11
|
+
export { Search };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* hash: 1o5jo */
|
|
2
|
+
:root {
|
|
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
|
+
} :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 */
|
|
5
|
+
} :root {
|
|
6
|
+
} :root {
|
|
7
|
+
|
|
8
|
+
/* Hard */
|
|
9
|
+
|
|
10
|
+
/* Up */
|
|
11
|
+
|
|
12
|
+
/* Hard up */
|
|
13
|
+
} :root {
|
|
14
|
+
} :root {
|
|
15
|
+
} :root {
|
|
16
|
+
} :root {
|
|
17
|
+
} :root {
|
|
18
|
+
|
|
19
|
+
/* options list */
|
|
20
|
+
|
|
21
|
+
/* option */
|
|
22
|
+
|
|
23
|
+
/* checkmark */
|
|
24
|
+
|
|
25
|
+
/* optgroup */
|
|
26
|
+
} .select__component_d5xo6 {
|
|
27
|
+
width: auto;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -8,7 +8,7 @@ import { DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
|
|
|
8
8
|
import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
|
|
9
9
|
import { Optgroup } from '../optgroup/Component.js';
|
|
10
10
|
|
|
11
|
-
const styles = {"virtualOptionsList":"
|
|
11
|
+
const styles = {"virtualOptionsList":"select__virtualOptionsList_z0bfl","virtualOptionsListHeader":"select__virtualOptionsListHeader_z0bfl","virtualOptionsListFooter":"select__virtualOptionsListFooter_z0bfl","withBorder":"select__withBorder_z0bfl","scrollable":"select__scrollable_z0bfl","inner":"select__inner_z0bfl","virtualRow":"select__virtualRow_z0bfl","highlighted":"select__highlighted_z0bfl","emptyPlaceholder":"select__emptyPlaceholder_z0bfl","l":"select__l_z0bfl","xl":"select__xl_z0bfl"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
const VirtualOptionsList = forwardRef(({ size = 's', flatOptions = [], highlightedIndex = -1, className, getOptionProps, Option, open, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, header, footer, showFooter = true, optionsListWidth, onScroll, nativeScrollbar: nativeScrollbarProp, }, ref) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1miip */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-primary: #dcdcdd;
|
|
@@ -35,34 +35,34 @@
|
|
|
35
35
|
/* checkmark */
|
|
36
36
|
|
|
37
37
|
/* optgroup */
|
|
38
|
-
} .
|
|
38
|
+
} .select__virtualOptionsList_z0bfl {
|
|
39
39
|
width: 100%;
|
|
40
40
|
outline: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
position: sticky;
|
|
43
|
-
} .
|
|
43
|
+
} .select__virtualOptionsListHeader_z0bfl {
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
46
|
-
} .
|
|
46
|
+
} .select__virtualOptionsListFooter_z0bfl {
|
|
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_z0bfl.select__withBorder_z0bfl {
|
|
52
52
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
53
|
-
} .
|
|
53
|
+
} .select__scrollable_z0bfl {
|
|
54
54
|
position: relative;
|
|
55
55
|
overflow: auto;
|
|
56
56
|
width: 100%;
|
|
57
|
-
} .
|
|
57
|
+
} .select__inner_z0bfl {
|
|
58
58
|
position: relative;
|
|
59
59
|
width: 100%;
|
|
60
|
-
} .
|
|
60
|
+
} .select__virtualRow_z0bfl {
|
|
61
61
|
position: absolute;
|
|
62
62
|
top: 0;
|
|
63
63
|
left: 0;
|
|
64
64
|
width: 100%
|
|
65
|
-
} .
|
|
65
|
+
} .select__virtualRow_z0bfl: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_z0bfl:first-child:before {
|
|
76
76
|
display: none;
|
|
77
|
-
} .
|
|
78
|
-
.
|
|
77
|
+
} .select__highlighted_z0bfl:before,
|
|
78
|
+
.select__highlighted_z0bfl + .select__virtualRow_z0bfl:before {
|
|
79
79
|
display: none;
|
|
80
|
-
} .
|
|
80
|
+
} .select__emptyPlaceholder_z0bfl {
|
|
81
81
|
padding: var(--gap-m) var(--gap-s);
|
|
82
82
|
color: var(--select-options-list-empty-placeholder-color);
|
|
83
|
-
} .
|
|
84
|
-
.
|
|
83
|
+
} .select__l_z0bfl .select__emptyPlaceholder_z0bfl,
|
|
84
|
+
.select__xl_z0bfl .select__emptyPlaceholder_z0bfl {
|
|
85
85
|
padding: var(--gap-xl) var(--gap-m);
|
|
86
86
|
}
|
package/modern/desktop.js
CHANGED
|
@@ -25,3 +25,6 @@ import './components/checkmark-mobile/Component.js';
|
|
|
25
25
|
import './components/options-list/Component.js';
|
|
26
26
|
import '@alfalab/core-components-scrollbar/modern';
|
|
27
27
|
import './consts.js';
|
|
28
|
+
import './components/search/Component.js';
|
|
29
|
+
import '@alfalab/core-components-input/modern';
|
|
30
|
+
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { forwardRef, useCallback, useEffect,
|
|
2
|
-
import { processOptions } from './utils.js';
|
|
1
|
+
import React, { forwardRef, useCallback, useEffect, useState, useMemo, useRef } from 'react';
|
|
2
|
+
import { defaultAccessor, processOptions, defaultFilterFn } from './utils.js';
|
|
3
3
|
import { OptionsList } from './components/options-list/Component.js';
|
|
4
4
|
import { DEFAULT_VISIBLE_OPTIONS } from './consts.js';
|
|
5
5
|
import { Footer } from './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
6
6
|
import { Header } from './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
7
7
|
|
|
8
|
-
const OptionsListWithApply = forwardRef(({ toggleMenu, getOptionProps: defaultGetOptionProps, showClear = true, showHeaderWithSelectAll, selectedDraft = [], flatOptions = [], OptionsList: OptionsList$1 = OptionsList, onApply = () => null, onClear = () => null, onClose = () => null, visibleOptions = DEFAULT_VISIBLE_OPTIONS, Footer: Footer$1 = Footer, Header: Header$1 = Header, headerProps, ...restProps }, ref) => {
|
|
8
|
+
const OptionsListWithApply = forwardRef(({ toggleMenu, getOptionProps: defaultGetOptionProps, showClear = true, showHeaderWithSelectAll, selectedDraft = [], flatOptions = [], OptionsList: OptionsList$1 = OptionsList, onApply = () => null, onClear = () => null, onClose = () => null, visibleOptions = DEFAULT_VISIBLE_OPTIONS, Footer: Footer$1 = Footer, Header: Header$1 = Header, header, headerProps, ...restProps }, ref) => {
|
|
9
9
|
const getOptionProps = useCallback((option, index) => {
|
|
10
10
|
const optionProps = defaultGetOptionProps(option, index);
|
|
11
11
|
const selected = option.key === SELECT_ALL_KEY
|
|
@@ -34,13 +34,22 @@ const OptionsListWithApply = forwardRef(({ toggleMenu, getOptionProps: defaultGe
|
|
|
34
34
|
};
|
|
35
35
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
36
|
}, []);
|
|
37
|
-
|
|
37
|
+
const renderHeader = () => {
|
|
38
|
+
if (!showHeaderWithSelectAll && !header)
|
|
39
|
+
return undefined;
|
|
40
|
+
return (React.createElement(React.Fragment, null,
|
|
41
|
+
header,
|
|
42
|
+
showHeaderWithSelectAll && React.createElement(Header$1, { ...headerProps })));
|
|
43
|
+
};
|
|
44
|
+
return (React.createElement(OptionsList$1, { ...restProps, ref: ref, visibleOptions: visibleOptions, toggleMenu: toggleMenu, flatOptions: flatOptions, getOptionProps: getOptionProps, onApply: handleApply, onClear: handleClear, header: renderHeader(), footer: React.createElement(Footer$1, { handleApply: handleApply, handleClear: handleClear, showClear: showClear, selectedDraft: selectedDraft }) }));
|
|
38
45
|
});
|
|
39
46
|
|
|
40
47
|
const SELECT_ALL_KEY = 'select_all';
|
|
41
48
|
const selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
|
|
42
|
-
function useSelectWithApply({ options, selected, onChange = () => null, OptionsList, optionsListProps = {}, showClear = true, showSelectAll = false, showHeaderWithSelectAll = false, }) {
|
|
43
|
-
const
|
|
49
|
+
function useSelectWithApply({ options, selected, onChange = () => null, OptionsList, optionsListProps = {}, showClear = true, showSelectAll = false, showHeaderWithSelectAll = false, showSearch, searchProps = {}, }) {
|
|
50
|
+
const [search, setSearch] = useState('');
|
|
51
|
+
const accessor = searchProps.accessor || defaultAccessor;
|
|
52
|
+
const { flatOptions, selectedOptions } = useMemo(() => processOptions(options, selected, showSearch ? (option) => defaultFilterFn(accessor(option), search) : undefined), [accessor, options, search, selected, showSearch]);
|
|
44
53
|
const [selectedDraft, setSelectedDraft] = useState(selectedOptions);
|
|
45
54
|
const selectedOptionsRef = useRef(selectedOptions);
|
|
46
55
|
const handleApply = () => {
|
|
@@ -108,6 +117,14 @@ function useSelectWithApply({ options, selected, onChange = () => null, OptionsL
|
|
|
108
117
|
options: memoizedOptions,
|
|
109
118
|
onChange: handleChange,
|
|
110
119
|
selected,
|
|
120
|
+
showSearch,
|
|
121
|
+
searchProps: showSearch
|
|
122
|
+
? {
|
|
123
|
+
...searchProps,
|
|
124
|
+
value: search,
|
|
125
|
+
onChange: setSearch,
|
|
126
|
+
}
|
|
127
|
+
: undefined,
|
|
111
128
|
};
|
|
112
129
|
}
|
|
113
130
|
|
|
@@ -21,6 +21,14 @@ type UseSelectWithApplyProps = {
|
|
|
21
21
|
* Пропсы, которые будут прокинуты в компонент списка
|
|
22
22
|
*/
|
|
23
23
|
optionsListProps?: BaseSelectProps['optionsListProps'];
|
|
24
|
+
/**
|
|
25
|
+
* Включает отображение поиска
|
|
26
|
+
*/
|
|
27
|
+
showSearch?: BaseSelectProps['showSearch'];
|
|
28
|
+
/**
|
|
29
|
+
* Настройки поиска
|
|
30
|
+
*/
|
|
31
|
+
searchProps?: BaseSelectProps['searchProps'];
|
|
24
32
|
/**
|
|
25
33
|
* Показывать кнопку очистки
|
|
26
34
|
*/
|
|
@@ -35,17 +43,17 @@ type UseSelectWithApplyProps = {
|
|
|
35
43
|
showHeaderWithSelectAll?: boolean;
|
|
36
44
|
};
|
|
37
45
|
declare const SELECT_ALL_KEY = "select_all";
|
|
38
|
-
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
|
|
46
|
+
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
|
|
39
47
|
OptionsList: import("react").ForwardRefExoticComponent<import("./typings").OptionsListProps & {
|
|
40
48
|
showClear?: boolean | undefined;
|
|
41
|
-
onClose?: (() => void) | undefined;
|
|
49
|
+
onClose?: (() => void) | undefined; /**
|
|
50
|
+
* Компонент выпадающего меню
|
|
51
|
+
*/
|
|
42
52
|
selectedDraft?: OptionShape[] | undefined;
|
|
43
53
|
OptionsList?: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
44
54
|
Footer?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/footer/Component").FooterProps> | undefined;
|
|
45
55
|
Header?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps> | undefined;
|
|
46
|
-
headerProps?: import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps | undefined;
|
|
47
|
-
* Показывать кнопку очистки
|
|
48
|
-
*/
|
|
56
|
+
headerProps?: import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps | undefined;
|
|
49
57
|
showHeaderWithSelectAll?: boolean | undefined;
|
|
50
58
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
59
|
optionsListProps: {
|
|
@@ -70,5 +78,12 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
70
78
|
})[];
|
|
71
79
|
onChange: (payload: import("./typings").BaseSelectChangePayload) => void;
|
|
72
80
|
selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
|
|
81
|
+
showSearch: boolean | undefined;
|
|
82
|
+
searchProps: {
|
|
83
|
+
value: string;
|
|
84
|
+
onChange: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
85
|
+
componentProps?: import("packages/input/src").InputProps | undefined;
|
|
86
|
+
accessor?: ((option: OptionShape) => string) | undefined;
|
|
87
|
+
} | undefined;
|
|
73
88
|
};
|
|
74
89
|
export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
|
package/modern/index.js
CHANGED
|
@@ -26,6 +26,9 @@ import './components/checkmark-mobile/Component.js';
|
|
|
26
26
|
import './components/options-list/Component.js';
|
|
27
27
|
import '@alfalab/core-components-scrollbar/modern';
|
|
28
28
|
import './consts.js';
|
|
29
|
+
import './components/search/Component.js';
|
|
30
|
+
import '@alfalab/core-components-input/modern';
|
|
31
|
+
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
29
32
|
import './Component.mobile.js';
|
|
30
33
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
31
34
|
import './components/base-select-mobile/Component.js';
|
|
@@ -36,7 +39,7 @@ import '@alfalab/core-components-base-modal/modern';
|
|
|
36
39
|
import '@alfalab/core-components-button/modern/mobile';
|
|
37
40
|
import './components/virtual-options-list/Component.js';
|
|
38
41
|
import 'react-virtual';
|
|
39
|
-
import './hook-
|
|
42
|
+
import './hook-707bbdbf.js';
|
|
40
43
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
41
44
|
import '@alfalab/core-components-button/modern/desktop';
|
|
42
45
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
package/modern/mobile.js
CHANGED
|
@@ -25,12 +25,15 @@ import './components/checkmark-mobile/Component.js';
|
|
|
25
25
|
import './components/options-list/Component.js';
|
|
26
26
|
import '@alfalab/core-components-scrollbar/modern';
|
|
27
27
|
import './consts.js';
|
|
28
|
+
import './components/search/Component.js';
|
|
29
|
+
import '@alfalab/core-components-input/modern';
|
|
30
|
+
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
28
31
|
import './components/base-select-mobile/footer/Component.js';
|
|
29
32
|
import '@alfalab/core-components-base-modal/modern';
|
|
30
33
|
import '@alfalab/core-components-button/modern/mobile';
|
|
31
34
|
import './components/virtual-options-list/Component.js';
|
|
32
35
|
import 'react-virtual';
|
|
33
|
-
import './hook-
|
|
36
|
+
import './hook-707bbdbf.js';
|
|
34
37
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
35
38
|
import '@alfalab/core-components-button/modern/desktop';
|
|
36
39
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
package/modern/presets/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from './useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-707bbdbf.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@alfalab/core-components-skeleton/modern';
|
|
6
6
|
import '../components/option/Component.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '../../utils.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-707bbdbf.js';
|
|
4
4
|
import '../../components/options-list/Component.js';
|
|
5
5
|
import 'react-merge-refs';
|
|
6
6
|
import 'classnames';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '../../../components/options-list/Component.js';
|
|
3
3
|
import '../../../consts.js';
|
|
4
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
4
|
+
export { O as OptionsListWithApply } from '../../../hook-707bbdbf.js';
|
|
5
5
|
import './footer/Component.js';
|
|
6
6
|
import './header/Component.js';
|
|
7
7
|
import 'react-merge-refs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonDesktop } from '@alfalab/core-components-button/modern/desktop';
|
|
3
3
|
|
|
4
|
-
const styles = {"footer":"
|
|
4
|
+
const styles = {"footer":"select__footer_1s51d"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], }) => (React.createElement("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: gm4lm */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
--gap-s: 12px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .
|
|
20
|
+
} .select__footer_1s51d {
|
|
21
21
|
background-color: var(--color-light-bg-primary);
|
|
22
22
|
padding: var(--gap-s);
|
|
23
23
|
outline: none
|
|
24
|
-
} .
|
|
24
|
+
} .select__footer_1s51d > * + * {
|
|
25
25
|
margin-left: var(--gap-xs);
|
|
26
26
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Checkbox } from '@alfalab/core-components-checkbox/modern';
|
|
4
4
|
|
|
5
|
-
const styles = {"desktop":"
|
|
5
|
+
const styles = {"desktop":"select__desktop_1voo4","mobile":"select__mobile_1voo4"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Header = ({ onChange, checked, indeterminate, mobile }) => (React.createElement("div", { className: cn({ [styles.desktop]: !mobile, [styles.mobile]: mobile }) },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 15ta9 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
--gap-s: 12px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .
|
|
19
|
+
} .select__desktop_1voo4 {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_1voo4 {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-707bbdbf";
|