@alfalab/core-components-select 17.18.0 → 17.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/arrow/Component.d.ts +1 -1
- package/components/arrow/Component.js +5 -3
- package/components/arrow/index.css +7 -4
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +6 -6
- package/components/base-option/Component.js +1 -1
- package/components/base-option/index.css +15 -15
- package/components/base-select/Component.js +3 -3
- package/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
- package/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
- package/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
- 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/clear-button/Component.d.ts +1 -1
- package/components/clear-button/Component.js +8 -4
- package/components/clear-button/index.css +9 -7
- package/components/field/Component.js +4 -4
- package/components/field/index.css +22 -14
- 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 +11 -11
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/virtual-options-list/Component.js +1 -1
- package/components/virtual-options-list/index.css +15 -15
- package/consts.d.ts +1 -0
- package/consts.js +1 -0
- package/cssm/components/arrow/Component.d.ts +1 -1
- package/cssm/components/arrow/Component.js +4 -2
- package/cssm/components/arrow/index.module.css +3 -0
- package/cssm/components/base-select/Component.js +1 -1
- package/cssm/components/clear-button/Component.d.ts +1 -1
- package/cssm/components/clear-button/Component.js +7 -3
- package/cssm/components/clear-button/index.module.css +3 -1
- package/cssm/components/field/Component.js +3 -3
- package/cssm/components/field/index.module.css +12 -4
- package/cssm/consts.d.ts +1 -0
- package/cssm/consts.js +1 -0
- package/{hook-5b125b7a.js → cssm/hook-08576e87.js} +3 -3
- package/{esm/hook-882d7b38.d.ts → cssm/hook-b8d44131.d.ts} +0 -3
- 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 +2 -2
- 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 +16 -6
- package/esm/components/arrow/Component.d.ts +1 -1
- package/esm/components/arrow/Component.js +5 -3
- package/esm/components/arrow/index.css +7 -4
- package/esm/components/base-checkmark/Component.js +1 -1
- package/esm/components/base-checkmark/index.css +6 -6
- package/esm/components/base-option/Component.js +1 -1
- package/esm/components/base-option/index.css +15 -15
- package/esm/components/base-select/Component.js +3 -3
- package/esm/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
- package/esm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
- package/esm/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
- 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/clear-button/Component.d.ts +1 -1
- package/esm/components/clear-button/Component.js +7 -4
- package/esm/components/clear-button/index.css +9 -7
- package/esm/components/field/Component.js +4 -4
- package/esm/components/field/index.css +22 -14
- 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 +11 -11
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/virtual-options-list/Component.js +1 -1
- package/esm/components/virtual-options-list/index.css +15 -15
- package/esm/consts.d.ts +1 -0
- package/esm/consts.js +1 -0
- package/esm/{hook-bd6817a9.js → hook-1ba9fd0a.js} +2 -2
- package/{hook-882d7b38.d.ts → esm/hook-b8d44131.d.ts} +0 -3
- package/esm/{list-popover-desktop-d8a41531.js → list-popover-desktop-3f111509.js} +1 -1
- package/esm/mobile/Component.mobile.js +1 -1
- package/esm/mobile.module-8b1bdca7.js +4 -0
- package/esm/presets/index.d.ts +1 -1
- package/esm/presets/index.js +1 -1
- package/esm/presets/useSelectWithApply/hook.js +2 -2
- 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 +16 -6
- package/{cssm/hook-619dab79.js → hook-639eaf6a.js} +3 -3
- package/{modern/hook-882d7b38.d.ts → hook-b8d44131.d.ts} +0 -3
- package/{list-popover-desktop-a237fb3d.js → list-popover-desktop-a809f4f3.js} +1 -1
- package/mobile/Component.mobile.js +1 -1
- package/mobile.module-e1d050c2.js +6 -0
- package/modern/components/arrow/Component.d.ts +1 -1
- package/modern/components/arrow/Component.js +9 -5
- package/modern/components/arrow/index.css +7 -4
- package/modern/components/base-checkmark/Component.js +1 -1
- package/modern/components/base-checkmark/index.css +6 -6
- package/modern/components/base-option/Component.js +1 -1
- package/modern/components/base-option/index.css +15 -15
- package/modern/components/base-select/Component.js +3 -3
- package/modern/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
- package/modern/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
- package/modern/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
- 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/clear-button/Component.d.ts +1 -1
- package/modern/components/clear-button/Component.js +8 -3
- package/modern/components/clear-button/index.css +9 -7
- package/modern/components/field/Component.js +4 -4
- package/modern/components/field/index.css +22 -14
- 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 +11 -11
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +2 -2
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/consts.d.ts +1 -0
- package/modern/consts.js +1 -0
- package/{cssm/hook-882d7b38.d.ts → modern/hook-b8d44131.d.ts} +0 -3
- package/{moderncssm/hook-7fabc4ab.js → modern/hook-f9dc9773.js} +2 -2
- package/modern/{list-popover-desktop-cb8c0e7a.js → list-popover-desktop-6d15956b.js} +1 -1
- package/modern/mobile/Component.mobile.js +1 -1
- package/modern/mobile.module-13db2bf1.js +4 -0
- package/modern/presets/index.d.ts +1 -1
- package/modern/presets/index.js +1 -1
- package/modern/presets/useSelectWithApply/hook.js +2 -2
- 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 +16 -6
- package/moderncssm/components/arrow/Component.d.ts +1 -1
- package/moderncssm/components/arrow/Component.js +8 -4
- package/moderncssm/components/arrow/index.module.css +4 -0
- package/moderncssm/components/base-select/Component.js +1 -1
- package/moderncssm/components/clear-button/Component.d.ts +1 -1
- package/moderncssm/components/clear-button/Component.js +7 -2
- package/moderncssm/components/clear-button/index.module.css +4 -0
- package/moderncssm/components/field/Component.js +3 -3
- package/moderncssm/components/field/index.module.css +12 -2
- package/moderncssm/consts.d.ts +1 -0
- package/moderncssm/consts.js +1 -0
- package/{modern/hook-acea3024.js → moderncssm/hook-50057c35.js} +2 -2
- package/moderncssm/hook-b8d44131.d.ts +112 -0
- package/moderncssm/mobile/Component.mobile.js +1 -1
- package/moderncssm/presets/index.d.ts +1 -1
- package/moderncssm/presets/index.js +1 -1
- package/moderncssm/presets/useSelectWithApply/hook.js +2 -2
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/moderncssm/shared/index.js +1 -1
- package/moderncssm/typings.d.ts +16 -6
- package/package.json +18 -17
- package/presets/index.d.ts +1 -1
- package/presets/index.js +1 -1
- package/presets/useSelectWithApply/hook.js +2 -2
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/shared/index.js +1 -1
- package/src/components/arrow/Component.tsx +13 -8
- package/src/components/arrow/index.module.css +5 -0
- package/src/components/base-select/Component.tsx +1 -1
- package/src/components/clear-button/Component.tsx +20 -14
- package/src/components/clear-button/index.module.css +8 -0
- package/src/components/field/Component.tsx +5 -2
- package/src/components/field/index.module.css +8 -0
- package/src/consts.ts +1 -0
- package/src/presets/useSelectWithApply/hook.tsx +2 -2
- package/src/typings.ts +17 -5
- package/typings.d.ts +16 -6
- package/@alfalab/icons-glyph/package.json +0 -14
- package/esm/mobile.module-023227b4.js +0 -4
- package/mobile.module-87bdf619.js +0 -6
- package/modern/mobile.module-eb7b32f3.js +0 -4
- package/moderncssm/hook-882d7b38.d.ts +0 -115
- /package/cssm/{hook-619dab79.d.ts → hook-08576e87.d.ts} +0 -0
- /package/esm/{hook-bd6817a9.d.ts → hook-1ba9fd0a.d.ts} +0 -0
- /package/esm/{list-popover-desktop-d8a41531.d.ts → list-popover-desktop-3f111509.d.ts} +0 -0
- /package/{hook-5b125b7a.d.ts → hook-639eaf6a.d.ts} +0 -0
- /package/{list-popover-desktop-a237fb3d.d.ts → list-popover-desktop-a809f4f3.d.ts} +0 -0
- /package/modern/{hook-acea3024.d.ts → hook-f9dc9773.d.ts} +0 -0
- /package/modern/{list-popover-desktop-cb8c0e7a.d.ts → list-popover-desktop-6d15956b.d.ts} +0 -0
- /package/moderncssm/{hook-7fabc4ab.d.ts → hook-50057c35.d.ts} +0 -0
|
@@ -9,7 +9,7 @@ import { SIZE_TO_CLASSNAME_MAP, DEFAULT_VISIBLE_OPTIONS } from '../../consts.js'
|
|
|
9
9
|
import { usePrevious, lastIndexOf, useVirtualVisibleOptions, isGroup } from '../../utils.js';
|
|
10
10
|
import { Optgroup } from '../optgroup/Component.js';
|
|
11
11
|
|
|
12
|
-
const styles = {"virtualOptionsList":"
|
|
12
|
+
const styles = {"virtualOptionsList":"select__virtualOptionsList_1k4zc","virtualOptionsListHeader":"select__virtualOptionsListHeader_1k4zc","virtualOptionsListFooter":"select__virtualOptionsListFooter_1k4zc","withBorder":"select__withBorder_1k4zc","scrollable":"select__scrollable_1k4zc","inner":"select__inner_1k4zc","virtualRow":"select__virtualRow_1k4zc","highlighted":"select__highlighted_1k4zc","emptyPlaceholder":"select__emptyPlaceholder_1k4zc","size-64":"select__size-64_1k4zc","size-72":"select__size-72_1k4zc"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
const VirtualOptionsList = forwardRef(({ size = 48, flatOptions = [], highlightedIndex = -1, optionGroupClassName, className, getOptionProps, groupOptionProps = {}, Option, open, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, header, footer, showFooter = true, optionsListWidth, onScroll, nativeScrollbar: nativeScrollbarProp, setHighlightedIndex, selectedItems, setSelectedItems, search, multiple, }, ref) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: c59q4 */
|
|
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;
|
|
@@ -43,35 +43,35 @@
|
|
|
43
43
|
/* checkmark */
|
|
44
44
|
|
|
45
45
|
/* optgroup */
|
|
46
|
-
} .
|
|
46
|
+
} .select__virtualOptionsList_1k4zc {
|
|
47
47
|
width: 100%;
|
|
48
48
|
outline: none;
|
|
49
49
|
box-sizing: border-box;
|
|
50
50
|
position: sticky;
|
|
51
51
|
justify-content: space-between;
|
|
52
|
-
} .
|
|
52
|
+
} .select__virtualOptionsListHeader_1k4zc {
|
|
53
53
|
box-sizing: border-box;
|
|
54
54
|
border-bottom: 1px solid var(--color-light-neutral-300);
|
|
55
|
-
} .
|
|
55
|
+
} .select__virtualOptionsListFooter_1k4zc {
|
|
56
56
|
position: sticky;
|
|
57
57
|
bottom: var(--gap-0);
|
|
58
58
|
box-sizing: border-box;
|
|
59
59
|
border-top: 1px solid transparent
|
|
60
|
-
} .
|
|
60
|
+
} .select__virtualOptionsListFooter_1k4zc.select__withBorder_1k4zc {
|
|
61
61
|
border-top: 1px solid var(--color-light-neutral-300);
|
|
62
|
-
} .
|
|
62
|
+
} .select__scrollable_1k4zc {
|
|
63
63
|
position: relative;
|
|
64
64
|
overflow: auto;
|
|
65
65
|
width: 100%;
|
|
66
|
-
} .
|
|
66
|
+
} .select__inner_1k4zc {
|
|
67
67
|
position: relative;
|
|
68
68
|
width: 100%;
|
|
69
|
-
} .
|
|
69
|
+
} .select__virtualRow_1k4zc {
|
|
70
70
|
position: absolute;
|
|
71
71
|
top: var(--gap-0);
|
|
72
72
|
left: var(--gap-0);
|
|
73
73
|
width: 100%
|
|
74
|
-
} .
|
|
74
|
+
} .select__virtualRow_1k4zc:before {
|
|
75
75
|
content: '';
|
|
76
76
|
position: absolute;
|
|
77
77
|
z-index: 1;
|
|
@@ -81,16 +81,16 @@
|
|
|
81
81
|
height: 1px;
|
|
82
82
|
background: var(--select-option-divider-background);
|
|
83
83
|
display: var(--select-option-divider-display);
|
|
84
|
-
} .
|
|
84
|
+
} .select__virtualRow_1k4zc:first-child:before {
|
|
85
85
|
display: none;
|
|
86
|
-
} .
|
|
87
|
-
.
|
|
86
|
+
} .select__highlighted_1k4zc:before,
|
|
87
|
+
.select__highlighted_1k4zc + .select__virtualRow_1k4zc:before {
|
|
88
88
|
display: none;
|
|
89
|
-
} .
|
|
89
|
+
} .select__emptyPlaceholder_1k4zc {
|
|
90
90
|
padding: var(--gap-16) var(--gap-12);
|
|
91
91
|
color: var(--select-options-list-empty-placeholder-color);
|
|
92
92
|
flex: 1;
|
|
93
|
-
} .select__size-
|
|
94
|
-
.select__size-
|
|
93
|
+
} .select__size-64_1k4zc .select__emptyPlaceholder_1k4zc,
|
|
94
|
+
.select__size-72_1k4zc .select__emptyPlaceholder_1k4zc {
|
|
95
95
|
padding: var(--gap-24) var(--gap-16);
|
|
96
96
|
}
|
package/modern/consts.d.ts
CHANGED
package/modern/consts.js
CHANGED
|
@@ -51,9 +51,6 @@ declare function useSelectWithApply({ options, selected, onChange, onSelectAllCl
|
|
|
51
51
|
OptionsList: import("react").ForwardRefExoticComponent<import("./typings").OptionsListProps & {
|
|
52
52
|
showClear?: boolean | undefined;
|
|
53
53
|
onClose?: (() => void) | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* Обработчик выбора
|
|
56
|
-
*/
|
|
57
54
|
selectedDraft?: OptionShape[] | undefined;
|
|
58
55
|
OptionsList?: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
59
56
|
Footer?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/footer/Component").FooterProps> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useCallback, useEffect, useState, useMemo, useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import reactFastCompare from 'react-fast-compare';
|
|
3
3
|
import { defaultAccessor, defaultFilterFn, defaultGroupAccessor, processOptions, isGroup } from './utils.js';
|
|
4
4
|
import { OptionsList } from './components/options-list/Component.js';
|
|
5
5
|
import { DEFAULT_VISIBLE_OPTIONS } from './consts.js';
|
|
@@ -118,7 +118,7 @@ function useSelectWithApply({ options, selected, onChange = () => null, onSelect
|
|
|
118
118
|
const handleClose = () => setSelectedDraft(selectedOptionsRef.current);
|
|
119
119
|
useEffect(() => {
|
|
120
120
|
// устанавливать selectedDraft если selectedOptions изменились
|
|
121
|
-
if (!
|
|
121
|
+
if (!reactFastCompare(selectedOptionsRef.current, selectedOptions)) {
|
|
122
122
|
setSelectedDraft(selectedOptions);
|
|
123
123
|
}
|
|
124
124
|
selectedOptionsRef.current = selectedOptions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
|
|
4
|
-
const styles = {"component":"
|
|
4
|
+
const styles = {"component":"select__component_k2eyy","popoverInner":"select__popoverInner_k2eyy","optionsListWrapper":"select__optionsListWrapper_k2eyy","optionsListBorder":"select__optionsListBorder_k2eyy","nativeSelect":"select__nativeSelect_k2eyy","block":"select__block_k2eyy","emptySearchPlaceholder":"select__emptySearchPlaceholder_k2eyy","search":"select__search_k2eyy"};
|
|
5
5
|
require('./components/base-select/index.css')
|
|
6
6
|
|
|
7
7
|
const ListPopoverDesktop = (props) => {
|
|
@@ -11,7 +11,7 @@ import { Option } from '../components/option/Component.js';
|
|
|
11
11
|
import { OptionsList } from '../components/options-list/Component.js';
|
|
12
12
|
import { Search } from '../components/search/Component.js';
|
|
13
13
|
import { VirtualOptionsList } from '../components/virtual-options-list/Component.js';
|
|
14
|
-
import { u as useSelectWithApply } from '../hook-
|
|
14
|
+
import { u as useSelectWithApply } from '../hook-f9dc9773.js';
|
|
15
15
|
import { Header } from '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
16
16
|
|
|
17
17
|
const VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const mobileStyles = {"sheet":"select__sheet_1gz9m","sheetContent":"select__sheetContent_1gz9m","modalContent":"select__modalContent_1gz9m","sheetContainer":"select__sheetContainer_1gz9m","optionsListWrapper":"select__optionsListWrapper_1gz9m","optionsList":"select__optionsList_1gz9m","scrollbar":"select__scrollbar_1gz9m","search":"select__search_1gz9m","option":"select__option_1gz9m","optionGroup":"select__optionGroup_1gz9m"};
|
|
2
|
+
require('./components/base-select/mobile.css')
|
|
3
|
+
|
|
4
|
+
export { mobileStyles as m };
|
package/modern/presets/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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-f9dc9773.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '
|
|
2
|
+
import 'react-fast-compare';
|
|
3
3
|
import '../../utils.js';
|
|
4
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-
|
|
4
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-f9dc9773.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
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-f9dc9773.js';
|
|
5
5
|
import './footer/Component.js';
|
|
6
6
|
import './header/Component.js';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ButtonDesktop } from '@alfalab/core-components-button/modern/desktop';
|
|
3
3
|
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
4
4
|
|
|
5
|
-
const styles = {"footer":"
|
|
5
|
+
const styles = {"footer":"select__footer_15tub","button":"select__button_15tub"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], dataTestId, }) => (React.createElement("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1hwep */
|
|
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-base-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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
} :root {
|
|
26
26
|
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
|
27
27
|
--select-option-list-footer-button-gap: var(--gap-8);
|
|
28
|
-
} .
|
|
28
|
+
} .select__footer_15tub {
|
|
29
29
|
background-color: var(--color-light-base-bg-primary);
|
|
30
30
|
padding: var(--gap-12);
|
|
31
31
|
outline: none
|
|
32
|
-
} .
|
|
32
|
+
} .select__footer_15tub > .select__button_15tub + .select__button_15tub {
|
|
33
33
|
margin-left: var(--select-option-list-footer-button-gap);
|
|
34
34
|
}
|
|
@@ -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_iyr56","mobile":"select__mobile_iyr56"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Header = ({ onChange, checked, indeterminate, mobile, dataTestId, }) => (React.createElement("div", { className: cn({ [styles.desktop]: !mobile, [styles.mobile]: mobile }) },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 14ykw */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
--gap-12: var(--gap-s);
|
|
23
23
|
} :root {
|
|
24
24
|
} :root {
|
|
25
|
-
} /* сбрасывает синюю подсветку при нажатии */ .
|
|
25
|
+
} /* сбрасывает синюю подсветку при нажатии */ .select__desktop_iyr56 {
|
|
26
26
|
padding: var(--gap-12);
|
|
27
|
-
} .
|
|
27
|
+
} .select__mobile_iyr56 {
|
|
28
28
|
padding: var(--gap-12) var(--gap-8);
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-f9dc9773";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
1
|
+
export { O as OptionsListWithApply } from '../../../hook-f9dc9773.js';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Skeleton } from '@alfalab/core-components-skeleton/modern';
|
|
3
3
|
import { Option } from '../../components/option/Component.js';
|
|
4
4
|
|
|
5
|
-
const styles = {"skeleton":"
|
|
5
|
+
const styles = {"skeleton":"select__skeleton_13ypz"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
function useSelectWithLoading({ loading = false, visibleOptions = 6, Option: Option$1 = Option, }) {
|
package/modern/shared/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-f9dc9773.js';
|
|
4
4
|
export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVirtualVisibleOptions, useVisibleOptions } from '../utils.js';
|
|
5
5
|
export { Option } from '../components/option/Component.js';
|
|
6
6
|
export { BaseOption } from '../components/base-option/Component.js';
|
package/modern/typings.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { InputProps } from "@alfalab/core-components-input";
|
|
|
6
6
|
import { ModalProps } from "@alfalab/core-components-modal";
|
|
7
7
|
import { ModalFooterProps, ModalHeaderProps } from "@alfalab/core-components-modal/shared";
|
|
8
8
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
9
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
9
|
+
import { UseSelectWithApplyProps } from "./hook-b8d44131";
|
|
10
10
|
type AnyObject = Record<string, any>;
|
|
11
11
|
type OptionShape = {
|
|
12
12
|
/**
|
|
@@ -110,12 +110,12 @@ type BaseSelectProps = {
|
|
|
110
110
|
* Размер компонента
|
|
111
111
|
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
112
112
|
*/
|
|
113
|
-
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
113
|
+
size?: 's' | 'm' | 'l' | 'xl' | 40 | 48 | 56 | 64 | 72;
|
|
114
114
|
/**
|
|
115
115
|
* Размер пунктов меню
|
|
116
116
|
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
117
117
|
*/
|
|
118
|
-
optionsSize?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
118
|
+
optionsSize?: 's' | 'm' | 'l' | 'xl' | 40 | 48 | 56 | 64 | 72;
|
|
119
119
|
/**
|
|
120
120
|
* Растягивает компонент на ширину контейнера
|
|
121
121
|
*/
|
|
@@ -390,6 +390,11 @@ type ArrowProps = {
|
|
|
390
390
|
* Флаг блокировки select'а
|
|
391
391
|
*/
|
|
392
392
|
disabled?: boolean;
|
|
393
|
+
/**
|
|
394
|
+
* Размер компонента
|
|
395
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
396
|
+
*/
|
|
397
|
+
size?: BaseSelectProps['size'];
|
|
393
398
|
};
|
|
394
399
|
type OptionsListProps = {
|
|
395
400
|
/**
|
|
@@ -412,7 +417,7 @@ type OptionsListProps = {
|
|
|
412
417
|
* Размер компонента
|
|
413
418
|
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
414
419
|
*/
|
|
415
|
-
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
420
|
+
size?: 's' | 'm' | 'l' | 'xl' | 40 | 48 | 56 | 64 | 72;
|
|
416
421
|
/**
|
|
417
422
|
* Компонент пункта меню
|
|
418
423
|
*/
|
|
@@ -532,7 +537,7 @@ type OptgroupProps = {
|
|
|
532
537
|
* Размер компонента
|
|
533
538
|
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
534
539
|
*/
|
|
535
|
-
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
540
|
+
size?: 's' | 'm' | 'l' | 'xl' | 40 | 48 | 56 | 64 | 72;
|
|
536
541
|
/**
|
|
537
542
|
* Заголовок группы
|
|
538
543
|
*/
|
|
@@ -571,7 +576,7 @@ type OptionProps = {
|
|
|
571
576
|
* Размер компонента
|
|
572
577
|
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
573
578
|
*/
|
|
574
|
-
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
579
|
+
size?: 's' | 'm' | 'l' | 'xl' | 40 | 48 | 56 | 64 | 72;
|
|
575
580
|
/**
|
|
576
581
|
* Контент пункта меню
|
|
577
582
|
*/
|
|
@@ -757,5 +762,10 @@ type ClearButtonProps = {
|
|
|
757
762
|
* Идентификатор для систем автоматизированного тестирования
|
|
758
763
|
*/
|
|
759
764
|
dataTestId?: string;
|
|
765
|
+
/**
|
|
766
|
+
* Размер компонента
|
|
767
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
768
|
+
*/
|
|
769
|
+
size?: FormControlProps['size'];
|
|
760
770
|
};
|
|
761
771
|
export { AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps, ClearButtonProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ArrowProps } from "../../typings";
|
|
4
|
-
declare const Arrow: ({ open, disabled, className }: ArrowProps) => React.JSX.Element;
|
|
4
|
+
declare const Arrow: ({ open, disabled, className, size }: ArrowProps) => React.JSX.Element;
|
|
5
5
|
export { Arrow };
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ChevronDownMIcon } from '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
4
|
+
import { ChevronDownSIcon } from '@alfalab/icons-glyph/ChevronDownSIcon';
|
|
4
5
|
import styles from './index.module.css';
|
|
5
6
|
|
|
6
|
-
const Arrow = ({ open, disabled, className }) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const Arrow = ({ open, disabled, className, size }) => {
|
|
8
|
+
const ChevronComponent = size === 40 ? ChevronDownSIcon : ChevronDownMIcon;
|
|
9
|
+
return (React.createElement(ChevronComponent, { className: cn(styles.arrow, styles[`size-${size}`], className, {
|
|
10
|
+
[styles.open]: open,
|
|
11
|
+
[styles.disabled]: disabled,
|
|
12
|
+
}) }));
|
|
13
|
+
};
|
|
10
14
|
|
|
11
15
|
export { Arrow };
|
|
@@ -385,7 +385,7 @@ const BaseSelect = forwardRef(
|
|
|
385
385
|
};
|
|
386
386
|
return (React.createElement("div", { ...(disabled && { 'aria-disabled': true }), "aria-expanded": inputProps['aria-expanded'], "aria-haspopup": 'listbox', role: inputProps.role, className: cn(styles.component, { [styles.block]: block }, className), ref: rootRef, onKeyDown: disabled ? undefined : handleFieldKeyDown, tabIndex: -1, "data-test-id": getDataTestId(dataTestId) },
|
|
387
387
|
nativeSelect && renderNativeSelect(),
|
|
388
|
-
React.createElement(Field, { selectedMultiple: selectedItems, selected: selectedItems[0], setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, multiple: multiple, open: open, disabled: disabled, size: size, placeholder: placeholder, label: label && React.createElement("span", { ...getLabelProps() }, label), labelView: labelView, Arrow: Arrow && React.createElement(Arrow, { open: open, disabled: disabled }), error: error, hint: hint, valueRenderer: valueRenderer, className: fieldClassName, clear: clear, onClear: handleFieldClear, innerProps: {
|
|
388
|
+
React.createElement(Field, { selectedMultiple: selectedItems, selected: selectedItems[0], setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, multiple: multiple, open: open, disabled: disabled, size: size, placeholder: placeholder, label: label && React.createElement("span", { ...getLabelProps() }, label), labelView: labelView, Arrow: Arrow && React.createElement(Arrow, { open: open, size: size, disabled: disabled }), error: error, hint: hint, valueRenderer: valueRenderer, className: fieldClassName, clear: clear, onClear: handleFieldClear, innerProps: {
|
|
389
389
|
onBlur: handleFieldBlur,
|
|
390
390
|
onFocus: disabled ? undefined : handleFieldFocus,
|
|
391
391
|
onClick: disabled ? undefined : handleFieldClick,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ClearButtonProps } from "../../typings";
|
|
4
|
-
declare const ClearButton: ({ disabled, onClick, dataTestId }: ClearButtonProps) => React.JSX.Element;
|
|
4
|
+
declare const ClearButton: ({ disabled, onClick, dataTestId, size }: ClearButtonProps) => React.JSX.Element;
|
|
5
5
|
export { ClearButton };
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
2
3
|
import { Button } from '@alfalab/core-components-button/moderncssm';
|
|
3
4
|
import { CrossCircleMIcon } from '@alfalab/icons-glyph/CrossCircleMIcon';
|
|
5
|
+
import { CrossCircleSIcon } from '@alfalab/icons-glyph/CrossCircleSIcon';
|
|
4
6
|
import styles from './index.module.css';
|
|
5
7
|
|
|
6
|
-
const ClearButton = ({ disabled, onClick, dataTestId }) =>
|
|
7
|
-
|
|
8
|
+
const ClearButton = ({ disabled, onClick, dataTestId, size }) => {
|
|
9
|
+
const IconComponent = size === 40 ? CrossCircleSIcon : CrossCircleMIcon;
|
|
10
|
+
return (React.createElement(Button, { type: 'button', view: 'text', disabled: disabled, "aria-label": '\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C', className: cn(styles.clearButton, styles[`size-${size}`]), onClick: onClick, tabIndex: -1, dataTestId: dataTestId },
|
|
11
|
+
React.createElement(IconComponent, { className: styles.clearIcon })));
|
|
12
|
+
};
|
|
8
13
|
|
|
9
14
|
export { ClearButton };
|
|
@@ -21,15 +21,15 @@ const Field = ({ size = 56, open, multiple, error, hint, disabled, label, labelV
|
|
|
21
21
|
[styles.focusVisible]: focusVisible,
|
|
22
22
|
}), block: true, size: size, focused: focused || open, disabled: disabled, filled: filled || (!!placeholder && open), label: showLabel && label, labelView: labelView, error: error, hint: hint, rightAddons: (Arrow || rightAddons) && (React.createElement(React.Fragment, null,
|
|
23
23
|
rightAddons,
|
|
24
|
-
clear && filled ? (React.createElement(ClearButton, { onClick: onClear, disabled: disabled, dataTestId: getDataTestId(dataTestId, 'clear-icon') })) : null,
|
|
24
|
+
clear && filled ? (React.createElement(ClearButton, { onClick: onClear, disabled: disabled, dataTestId: getDataTestId(dataTestId, 'clear-icon'), size: size })) : null,
|
|
25
25
|
Arrow
|
|
26
26
|
? React.cloneElement(Arrow, { className: styles.arrow })
|
|
27
27
|
: null)), "data-test-id": dataTestId, ...restProps, ...innerProps },
|
|
28
|
-
React.createElement("div", { className: styles.contentWrapper },
|
|
28
|
+
React.createElement("div", { className: cn(styles.contentWrapper, styles[`size-${size}`]) },
|
|
29
29
|
showPlaceholder && (React.createElement("span", { className: cn(styles.placeholder, {
|
|
30
30
|
[styles.focused]: focused || open,
|
|
31
31
|
}) }, placeholder)),
|
|
32
|
-
filled && React.createElement("div", { className: styles.value }, value)))) : null));
|
|
32
|
+
filled && (React.createElement("div", { className: cn(styles.value, styles[`size-${size}`]) }, value))))) : null));
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export { Field };
|
|
@@ -53,13 +53,23 @@
|
|
|
53
53
|
white-space: nowrap;
|
|
54
54
|
text-overflow: ellipsis;
|
|
55
55
|
overflow: hidden;
|
|
56
|
-
width: 100
|
|
56
|
+
width: 100%
|
|
57
57
|
}
|
|
58
|
+
.contentWrapper.size-40 {
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
line-height: 18px;
|
|
61
|
+
font-weight: 400;
|
|
62
|
+
}
|
|
58
63
|
.value {
|
|
59
64
|
overflow: hidden;
|
|
60
65
|
text-overflow: ellipsis;
|
|
61
|
-
text-align: left
|
|
66
|
+
text-align: left
|
|
62
67
|
}
|
|
68
|
+
.value.size-40 {
|
|
69
|
+
font-size: 14px;
|
|
70
|
+
line-height: 18px;
|
|
71
|
+
font-weight: 400;
|
|
72
|
+
}
|
|
63
73
|
.focusVisible {
|
|
64
74
|
outline: 2px solid var(--focus-color);
|
|
65
75
|
outline-offset: 2px;
|
package/moderncssm/consts.d.ts
CHANGED
package/moderncssm/consts.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useCallback, useEffect, useState, useMemo, useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import reactFastCompare from 'react-fast-compare';
|
|
3
3
|
import { defaultAccessor, defaultFilterFn, defaultGroupAccessor, processOptions, isGroup } from './utils.js';
|
|
4
4
|
import { OptionsList } from './components/options-list/Component.js';
|
|
5
5
|
import { DEFAULT_VISIBLE_OPTIONS } from './consts.js';
|
|
@@ -118,7 +118,7 @@ function useSelectWithApply({ options, selected, onChange = () => null, onSelect
|
|
|
118
118
|
const handleClose = () => setSelectedDraft(selectedOptionsRef.current);
|
|
119
119
|
useEffect(() => {
|
|
120
120
|
// устанавливать selectedDraft если selectedOptions изменились
|
|
121
|
-
if (!
|
|
121
|
+
if (!reactFastCompare(selectedOptionsRef.current, selectedOptions)) {
|
|
122
122
|
setSelectedDraft(selectedOptions);
|
|
123
123
|
}
|
|
124
124
|
selectedOptionsRef.current = selectedOptions;
|