@alfalab/core-components-select 15.2.2 → 15.3.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/Component.desktop.d.ts +1 -2
- package/Component.mobile.js +1 -1
- package/Component.modal.mobile.d.ts +202 -4
- package/Component.modal.mobile.js +1 -1
- package/Component.responsive.js +1 -1
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +4 -4
- package/components/base-option/Component.js +1 -1
- package/components/base-option/index.css +13 -13
- package/components/base-select/Component.js +1 -1
- package/components/base-select/index.css +11 -11
- package/components/base-select-mobile/Component.d.ts +4 -3
- package/components/base-select-mobile/Component.js +3 -3
- 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 +16 -16
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +10 -10
- package/components/checkmark-mobile/Component.js +1 -1
- package/components/checkmark-mobile/index.css +6 -6
- package/components/field/Component.js +1 -1
- package/components/field/index.css +12 -12
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/option/Component.js +1 -1
- package/components/option/index.css +20 -20
- package/components/options-list/Component.js +1 -1
- package/components/options-list/index.css +9 -9
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/virtual-options-list/Component.js +9 -5
- package/components/virtual-options-list/index.css +15 -15
- package/cssm/Component.desktop.d.ts +1 -2
- package/cssm/Component.modal.mobile.d.ts +202 -4
- package/cssm/components/base-select-mobile/Component.d.ts +4 -3
- package/cssm/components/base-select-mobile/Component.js +2 -2
- package/cssm/components/virtual-options-list/Component.js +8 -4
- package/cssm/desktop/index.d.ts +2 -0
- package/cssm/desktop/index.js +48 -0
- package/cssm/mobile/index.d.ts +5 -0
- package/cssm/mobile/index.js +62 -0
- package/cssm/shared/index.d.ts +5 -0
- package/cssm/shared/index.js +85 -0
- package/desktop/index.d.ts +2 -0
- package/{desktop.js → desktop/index.js} +13 -13
- package/desktop/package.json +3 -0
- package/esm/Component.desktop.d.ts +1 -2
- package/esm/Component.mobile.js +1 -1
- package/esm/Component.modal.mobile.d.ts +202 -4
- package/esm/Component.modal.mobile.js +1 -1
- package/esm/Component.responsive.js +1 -1
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/base-checkmark/Component.js +1 -1
- package/esm/components/base-checkmark/index.css +4 -4
- package/esm/components/base-option/Component.js +1 -1
- package/esm/components/base-option/index.css +13 -13
- package/esm/components/base-select/Component.js +1 -1
- package/esm/components/base-select/index.css +11 -11
- package/esm/components/base-select-mobile/Component.d.ts +4 -3
- package/esm/components/base-select-mobile/Component.js +3 -3
- 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 +16 -16
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +10 -10
- package/esm/components/checkmark-mobile/Component.js +1 -1
- package/esm/components/checkmark-mobile/index.css +6 -6
- package/esm/components/field/Component.js +1 -1
- package/esm/components/field/index.css +12 -12
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +6 -6
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +20 -20
- package/esm/components/options-list/Component.js +1 -1
- package/esm/components/options-list/index.css +9 -9
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/virtual-options-list/Component.js +9 -5
- package/esm/components/virtual-options-list/index.css +15 -15
- package/esm/desktop/index.d.ts +2 -0
- package/esm/{desktop.js → desktop/index.js} +13 -13
- package/esm/index.js +1 -1
- package/esm/mobile/index.d.ts +5 -0
- package/esm/mobile/index.js +40 -0
- package/esm/presets/index.js +1 -1
- package/esm/presets/useSelectWithApply/hook.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/shared/index.d.ts +5 -0
- package/esm/shared/index.js +41 -0
- package/index.js +1 -1
- package/mobile/index.d.ts +5 -0
- package/{mobile.js → mobile/index.js} +18 -18
- package/mobile/package.json +3 -0
- package/modern/Component.desktop.d.ts +1 -2
- package/modern/Component.mobile.js +1 -1
- package/modern/Component.modal.mobile.d.ts +202 -4
- package/modern/Component.modal.mobile.js +1 -1
- package/modern/Component.responsive.js +1 -1
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/base-checkmark/Component.js +1 -1
- package/modern/components/base-checkmark/index.css +4 -4
- package/modern/components/base-option/Component.js +1 -1
- package/modern/components/base-option/index.css +13 -13
- package/modern/components/base-select/Component.js +1 -1
- package/modern/components/base-select/index.css +11 -11
- package/modern/components/base-select-mobile/Component.d.ts +4 -3
- package/modern/components/base-select-mobile/Component.js +3 -3
- 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 +16 -16
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +10 -10
- package/modern/components/checkmark-mobile/Component.js +1 -1
- package/modern/components/checkmark-mobile/index.css +6 -6
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +12 -12
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +20 -20
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +9 -9
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +2 -2
- package/modern/components/virtual-options-list/Component.js +9 -5
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/desktop/index.d.ts +2 -0
- package/modern/{desktop.js → desktop/index.js} +13 -13
- package/modern/index.js +1 -1
- package/modern/mobile/index.d.ts +5 -0
- package/modern/mobile/index.js +39 -0
- package/modern/presets/index.js +1 -1
- package/modern/presets/useSelectWithApply/hook.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/shared/index.d.ts +5 -0
- package/modern/shared/index.js +40 -0
- package/package.json +8 -32
- package/presets/index.js +1 -1
- package/presets/useSelectWithApply/hook.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/shared/index.d.ts +5 -0
- package/{shared.js → shared/index.js} +20 -20
- package/shared/package.json +3 -0
- package/src/components/base-select-mobile/Component.tsx +2 -1
- package/src/components/virtual-options-list/Component.tsx +8 -4
- package/src/desktop/index.ts +1 -0
- package/src/desktop/package.json +3 -0
- package/src/mobile/index.ts +5 -0
- package/src/mobile/package.json +3 -0
- package/src/shared/index.ts +5 -0
- package/src/shared/package.json +3 -0
- package/Component-89f0cb07.d.ts +0 -38
- package/Component.mobile-ebda875c.d.ts +0 -6
- package/Component.mobile-f1f15074.d.ts +0 -404
- package/cssm/Component-89f0cb07.d.ts +0 -38
- package/cssm/Component.mobile-ebda875c.d.ts +0 -6
- package/cssm/Component.mobile-f1f15074.d.ts +0 -404
- package/cssm/desktop-69921c40.d.ts +0 -6
- package/cssm/desktop.d.ts +0 -2
- package/cssm/desktop.js +0 -48
- package/cssm/index-ebda875c.d.ts +0 -2
- package/cssm/mobile-96988a65.d.ts +0 -2
- package/cssm/mobile.d.ts +0 -5
- package/cssm/mobile.js +0 -62
- package/cssm/shared.d.ts +0 -5
- package/cssm/shared.js +0 -85
- package/cssm/typings-89f0cb07.d.ts +0 -93
- package/cssm/typings-baf4875b.d.ts +0 -52
- package/desktop-69921c40.d.ts +0 -6
- package/desktop.d.ts +0 -2
- package/esm/Component-89f0cb07.d.ts +0 -38
- package/esm/Component.mobile-ebda875c.d.ts +0 -6
- package/esm/Component.mobile-f1f15074.d.ts +0 -404
- package/esm/desktop-69921c40.d.ts +0 -6
- package/esm/desktop.d.ts +0 -2
- package/esm/index-ebda875c.d.ts +0 -2
- package/esm/mobile-96988a65.d.ts +0 -2
- package/esm/mobile.d.ts +0 -5
- package/esm/mobile.js +0 -40
- package/esm/shared.d.ts +0 -5
- package/esm/shared.js +0 -41
- package/esm/typings-89f0cb07.d.ts +0 -93
- package/esm/typings-baf4875b.d.ts +0 -52
- package/index-ebda875c.d.ts +0 -2
- package/mobile-96988a65.d.ts +0 -2
- package/mobile.d.ts +0 -5
- package/modern/Component-89f0cb07.d.ts +0 -38
- package/modern/Component.mobile-ebda875c.d.ts +0 -6
- package/modern/Component.mobile-f1f15074.d.ts +0 -404
- package/modern/desktop-69921c40.d.ts +0 -6
- package/modern/desktop.d.ts +0 -2
- package/modern/index-ebda875c.d.ts +0 -2
- package/modern/mobile-96988a65.d.ts +0 -2
- package/modern/mobile.d.ts +0 -5
- package/modern/mobile.js +0 -39
- package/modern/shared.d.ts +0 -5
- package/modern/shared.js +0 -40
- package/modern/typings-89f0cb07.d.ts +0 -93
- package/modern/typings-baf4875b.d.ts +0 -52
- package/shared.d.ts +0 -5
- package/src/desktop.ts +0 -1
- package/src/mobile.ts +0 -5
- package/src/shared.ts +0 -5
- package/typings-89f0cb07.d.ts +0 -93
- package/typings-baf4875b.d.ts +0 -52
- /package/esm/{hook-571dca86.d.ts → hook-70d58270.d.ts} +0 -0
- /package/esm/{hook-571dca86.js → hook-70d58270.js} +0 -0
- /package/{hook-a6f060a1.d.ts → hook-0a5c9f56.d.ts} +0 -0
- /package/{hook-a6f060a1.js → hook-0a5c9f56.js} +0 -0
- /package/modern/{hook-7e628eb4.d.ts → hook-4eceefed.d.ts} +0 -0
- /package/modern/{hook-7e628eb4.js → hook-4eceefed.js} +0 -0
|
@@ -8,14 +8,14 @@ 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_1b0db","virtualOptionsListHeader":"select__virtualOptionsListHeader_1b0db","virtualOptionsListFooter":"select__virtualOptionsListFooter_1b0db","withBorder":"select__withBorder_1b0db","scrollable":"select__scrollable_1b0db","inner":"select__inner_1b0db","virtualRow":"select__virtualRow_1b0db","highlighted":"select__highlighted_1b0db","emptyPlaceholder":"select__emptyPlaceholder_1b0db","l":"select__l_1b0db","xl":"select__xl_1b0db"};
|
|
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, setHighlightedIndex, }, ref) => {
|
|
15
15
|
const listRef = useRef(null);
|
|
16
16
|
const parentRef = useRef(null);
|
|
17
17
|
const scrollbarRef = useRef(null);
|
|
18
|
-
const [visibleOptionsInvalidateKey, setVisibleOptionsInvalidateKey] = useState(
|
|
18
|
+
const [visibleOptionsInvalidateKey, setVisibleOptionsInvalidateKey] = useState('');
|
|
19
19
|
const prevHighlightedIndex = usePrevious(highlightedIndex) || -1;
|
|
20
20
|
let [nativeScrollbar] = useMedia([[true, '(max-width: 1023px)']], false);
|
|
21
21
|
const rowVirtualizer = useVirtual({
|
|
@@ -60,10 +60,14 @@ const VirtualOptionsList = forwardRef(({ size = 's', flatOptions = [], highlight
|
|
|
60
60
|
/**
|
|
61
61
|
* react-virtual может несколько раз отрендерить список с одним элементом,
|
|
62
62
|
* поэтому нужно еще раз пересчитать высоту, когда список ВИДИМЫХ пунктов будет отрендерен полностью
|
|
63
|
-
* Также, высоту нужно пересчитывать при изменении
|
|
63
|
+
* Также, высоту нужно пересчитывать при изменении пунктов меню
|
|
64
64
|
*/
|
|
65
|
-
rowVirtualizer.virtualItems
|
|
66
|
-
|
|
65
|
+
rowVirtualizer.virtualItems
|
|
66
|
+
.slice(0, Math.min(rowVirtualizer.virtualItems.length, visibleOptions + 1))
|
|
67
|
+
.map((item) => flatOptions[item.index].key)
|
|
68
|
+
.join('_'));
|
|
69
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70
|
+
}, [rowVirtualizer.virtualItems.length, flatOptions]);
|
|
67
71
|
useVisibleOptions({
|
|
68
72
|
visibleOptions,
|
|
69
73
|
invalidate: visibleOptionsInvalidateKey,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 795ug */
|
|
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_1b0db {
|
|
39
39
|
width: 100%;
|
|
40
40
|
outline: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
position: sticky;
|
|
43
|
-
} .
|
|
43
|
+
} .select__virtualOptionsListHeader_1b0db {
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
46
|
-
} .
|
|
46
|
+
} .select__virtualOptionsListFooter_1b0db {
|
|
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_1b0db.select__withBorder_1b0db {
|
|
52
52
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
53
|
-
} .
|
|
53
|
+
} .select__scrollable_1b0db {
|
|
54
54
|
position: relative;
|
|
55
55
|
overflow: auto;
|
|
56
56
|
width: 100%;
|
|
57
|
-
} .
|
|
57
|
+
} .select__inner_1b0db {
|
|
58
58
|
position: relative;
|
|
59
59
|
width: 100%;
|
|
60
|
-
} .
|
|
60
|
+
} .select__virtualRow_1b0db {
|
|
61
61
|
position: absolute;
|
|
62
62
|
top: 0;
|
|
63
63
|
left: 0;
|
|
64
64
|
width: 100%
|
|
65
|
-
} .
|
|
65
|
+
} .select__virtualRow_1b0db: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_1b0db:first-child:before {
|
|
76
76
|
display: none;
|
|
77
|
-
} .
|
|
78
|
-
.
|
|
77
|
+
} .select__highlighted_1b0db:before,
|
|
78
|
+
.select__highlighted_1b0db + .select__virtualRow_1b0db:before {
|
|
79
79
|
display: none;
|
|
80
|
-
} .
|
|
80
|
+
} .select__emptyPlaceholder_1b0db {
|
|
81
81
|
padding: var(--gap-m) var(--gap-s);
|
|
82
82
|
color: var(--select-options-list-empty-placeholder-color);
|
|
83
|
-
} .
|
|
84
|
-
.
|
|
83
|
+
} .select__l_1b0db .select__emptyPlaceholder_1b0db,
|
|
84
|
+
.select__xl_1b0db .select__emptyPlaceholder_1b0db {
|
|
85
85
|
padding: var(--gap-xl) var(--gap-m);
|
|
86
86
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
export { SelectDesktop } from '
|
|
1
|
+
export { SelectDesktop } from '../Component.desktop.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@alfalab/core-components-form-control/modern/desktop';
|
|
4
|
-
import '
|
|
4
|
+
import '../components/arrow/Component.js';
|
|
5
5
|
import 'classnames';
|
|
6
6
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
7
|
-
import '
|
|
7
|
+
import '../components/base-select/Component.js';
|
|
8
8
|
import 'react-merge-refs';
|
|
9
9
|
import '@juggle/resize-observer';
|
|
10
10
|
import 'downshift';
|
|
11
11
|
import '@alfalab/core-components-popover/modern';
|
|
12
12
|
import '@alfalab/core-components-shared/modern';
|
|
13
13
|
import '@alfalab/hooks';
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
19
|
-
import '
|
|
14
|
+
import '../utils.js';
|
|
15
|
+
import '../components/native-select/Component.js';
|
|
16
|
+
import '../components/field/Component.js';
|
|
17
|
+
import '../components/optgroup/Component.js';
|
|
18
|
+
import '../components/option/Component.js';
|
|
19
|
+
import '../components/checkmark/Component.js';
|
|
20
20
|
import '@alfalab/core-components-badge/modern';
|
|
21
21
|
import '@alfalab/core-components-checkbox/modern';
|
|
22
22
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
23
23
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
24
|
-
import '
|
|
25
|
-
import '
|
|
24
|
+
import '../components/checkmark-mobile/Component.js';
|
|
25
|
+
import '../components/options-list/Component.js';
|
|
26
26
|
import '@alfalab/core-components-scrollbar/modern';
|
|
27
|
-
import '
|
|
28
|
-
import '
|
|
27
|
+
import '../consts.js';
|
|
28
|
+
import '../components/search/Component.js';
|
|
29
29
|
import '@alfalab/core-components-input/modern';
|
|
30
30
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
package/modern/index.js
CHANGED
|
@@ -39,7 +39,7 @@ import '@alfalab/core-components-base-modal/modern';
|
|
|
39
39
|
import '@alfalab/core-components-button/modern/mobile';
|
|
40
40
|
import './components/virtual-options-list/Component.js';
|
|
41
41
|
import 'react-virtual';
|
|
42
|
-
import './hook-
|
|
42
|
+
import './hook-4eceefed.js';
|
|
43
43
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
44
44
|
import '@alfalab/core-components-button/modern/desktop';
|
|
45
45
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export { SelectMobile } from '../Component.mobile.js';
|
|
2
|
+
export { SelectModalMobile } from '../Component.modal.mobile.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@alfalab/core-components-form-control/modern/mobile';
|
|
5
|
+
import '../components/arrow/Component.js';
|
|
6
|
+
import 'classnames';
|
|
7
|
+
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
8
|
+
import '../components/base-select-mobile/Component.js';
|
|
9
|
+
import 'react-merge-refs';
|
|
10
|
+
import 'downshift';
|
|
11
|
+
import '@alfalab/core-components-bottom-sheet/modern';
|
|
12
|
+
import '@alfalab/core-components-modal/modern/mobile';
|
|
13
|
+
import '@alfalab/core-components-shared/modern';
|
|
14
|
+
import '../utils.js';
|
|
15
|
+
import '../components/field/Component.js';
|
|
16
|
+
import '@alfalab/hooks';
|
|
17
|
+
import '../components/optgroup/Component.js';
|
|
18
|
+
import '../components/option/Component.js';
|
|
19
|
+
import '../components/checkmark/Component.js';
|
|
20
|
+
import '@alfalab/core-components-badge/modern';
|
|
21
|
+
import '@alfalab/core-components-checkbox/modern';
|
|
22
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
23
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
24
|
+
import '../components/checkmark-mobile/Component.js';
|
|
25
|
+
import '../components/options-list/Component.js';
|
|
26
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
27
|
+
import '../consts.js';
|
|
28
|
+
import '../components/search/Component.js';
|
|
29
|
+
import '@alfalab/core-components-input/modern';
|
|
30
|
+
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
31
|
+
import '../components/base-select-mobile/footer/Component.js';
|
|
32
|
+
import '@alfalab/core-components-base-modal/modern';
|
|
33
|
+
import '@alfalab/core-components-button/modern/mobile';
|
|
34
|
+
import '../components/virtual-options-list/Component.js';
|
|
35
|
+
import 'react-virtual';
|
|
36
|
+
import '../hook-4eceefed.js';
|
|
37
|
+
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
38
|
+
import '@alfalab/core-components-button/modern/desktop';
|
|
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-4eceefed.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-4eceefed.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-4eceefed.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_b1owf"};
|
|
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: 10dvs */
|
|
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_b1owf {
|
|
21
21
|
background-color: var(--color-light-bg-primary);
|
|
22
22
|
padding: var(--gap-s);
|
|
23
23
|
outline: none
|
|
24
|
-
} .
|
|
24
|
+
} .select__footer_b1owf > * + * {
|
|
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_1kxe6","mobile":"select__mobile_1kxe6"};
|
|
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: 1hj4p */
|
|
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_1kxe6 {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_1kxe6 {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-4eceefed";
|
|
@@ -9,7 +9,7 @@ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
|
9
9
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
10
10
|
import '../../components/checkmark-mobile/Component.js';
|
|
11
11
|
|
|
12
|
-
const styles = {"skeleton":"
|
|
12
|
+
const styles = {"skeleton":"select__skeleton_164am"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
function useSelectWithLoading({ loading = false, visibleOptions = 6, Option: Option$1 = Option, }) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export { Arrow } from '../components/arrow/Component.js';
|
|
2
|
+
export { BaseSelect } from '../components/base-select/Component.js';
|
|
3
|
+
export { Field } from '../components/field/Component.js';
|
|
4
|
+
export { Optgroup } from '../components/optgroup/Component.js';
|
|
5
|
+
export { Option } from '../components/option/Component.js';
|
|
6
|
+
export { OptionsList } from '../components/options-list/Component.js';
|
|
7
|
+
export { VirtualOptionsList } from '../components/virtual-options-list/Component.js';
|
|
8
|
+
export { BaseOption } from '../components/base-option/Component.js';
|
|
9
|
+
export { Search } from '../components/search/Component.js';
|
|
10
|
+
export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
|
|
11
|
+
export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
|
|
12
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-4eceefed.js';
|
|
13
|
+
export { defaultAccessor, defaultFilterFn, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
|
|
14
|
+
import 'react';
|
|
15
|
+
import 'classnames';
|
|
16
|
+
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
17
|
+
import 'react-merge-refs';
|
|
18
|
+
import '@juggle/resize-observer';
|
|
19
|
+
import 'downshift';
|
|
20
|
+
import '@alfalab/core-components-popover/modern';
|
|
21
|
+
import '@alfalab/core-components-shared/modern';
|
|
22
|
+
import '@alfalab/hooks';
|
|
23
|
+
import '../components/native-select/Component.js';
|
|
24
|
+
import '../components/checkmark/Component.js';
|
|
25
|
+
import '@alfalab/core-components-badge/modern';
|
|
26
|
+
import '@alfalab/core-components-checkbox/modern';
|
|
27
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
28
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
29
|
+
import '../components/checkmark-mobile/Component.js';
|
|
30
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
31
|
+
import '../consts.js';
|
|
32
|
+
import 'react-virtual';
|
|
33
|
+
import '../components/base-checkmark/Component.js';
|
|
34
|
+
import '@alfalab/core-components-input/modern';
|
|
35
|
+
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
36
|
+
import '@alfalab/core-components-skeleton/modern';
|
|
37
|
+
import 'intersection-observer';
|
|
38
|
+
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
39
|
+
import '@alfalab/core-components-button/modern/desktop';
|
|
40
|
+
import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
package/package.json
CHANGED
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-select",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.0",
|
|
4
4
|
"description": "Select component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "./esm/index.js",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./esm/index.js",
|
|
12
|
-
"require": "./index.js"
|
|
13
|
-
},
|
|
14
|
-
"./mobile": {
|
|
15
|
-
"import": "./esm/mobile.js",
|
|
16
|
-
"require": "./mobile.js"
|
|
17
|
-
},
|
|
18
|
-
"./desktop": {
|
|
19
|
-
"import": "./esm/desktop.js",
|
|
20
|
-
"require": "./desktop.js"
|
|
21
|
-
},
|
|
22
|
-
"./shared": {
|
|
23
|
-
"import": "./esm/shared.js",
|
|
24
|
-
"require": "./shared.js"
|
|
25
|
-
},
|
|
26
|
-
"./esm": "./esm/index.js",
|
|
27
|
-
"./cssm": "./cssm/index.js",
|
|
28
|
-
"./modern": "./modern/index.js",
|
|
29
|
-
"./esm/*": "./esm/*",
|
|
30
|
-
"./cssm/*": "./cssm/*",
|
|
31
|
-
"./modern/*": "./modern/*"
|
|
32
|
-
},
|
|
33
9
|
"publishConfig": {
|
|
34
10
|
"access": "public",
|
|
35
11
|
"directory": "dist"
|
|
@@ -40,17 +16,17 @@
|
|
|
40
16
|
},
|
|
41
17
|
"dependencies": {
|
|
42
18
|
"@alfalab/core-components-badge": "^5.2.0",
|
|
43
|
-
"@alfalab/core-components-base-modal": "^5.
|
|
44
|
-
"@alfalab/core-components-bottom-sheet": "^6.11.
|
|
45
|
-
"@alfalab/core-components-button": "^9.0
|
|
19
|
+
"@alfalab/core-components-base-modal": "^5.5.0",
|
|
20
|
+
"@alfalab/core-components-bottom-sheet": "^6.11.3",
|
|
21
|
+
"@alfalab/core-components-button": "^9.1.0",
|
|
46
22
|
"@alfalab/core-components-checkbox": "^3.2.0",
|
|
47
|
-
"@alfalab/core-components-form-control": "^10.
|
|
48
|
-
"@alfalab/core-components-input": "^12.
|
|
49
|
-
"@alfalab/core-components-modal": "^8.0
|
|
23
|
+
"@alfalab/core-components-form-control": "^10.2.0",
|
|
24
|
+
"@alfalab/core-components-input": "^12.3.0",
|
|
25
|
+
"@alfalab/core-components-modal": "^8.1.0",
|
|
50
26
|
"@alfalab/core-components-popover": "^6.1.0",
|
|
51
27
|
"@alfalab/core-components-scrollbar": "^2.2.0",
|
|
52
28
|
"@alfalab/core-components-skeleton": "^4.1.0",
|
|
53
|
-
"@alfalab/core-components-shared": "^0.
|
|
29
|
+
"@alfalab/core-components-shared": "^0.7.0",
|
|
54
30
|
"@alfalab/hooks": "^1.13.0",
|
|
55
31
|
"@alfalab/icons-glyph": "^2.108.0",
|
|
56
32
|
"@juggle/resize-observer": "^3.3.1",
|
package/presets/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var presets_useSelectWithLoading_hook = require('./useSelectWithLoading/hook.js');
|
|
6
6
|
var presets_useLazyLoading_hook = require('./useLazyLoading/hook.js');
|
|
7
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
7
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-0a5c9f56.js');
|
|
8
8
|
require('tslib');
|
|
9
9
|
require('react');
|
|
10
10
|
require('@alfalab/core-components-skeleton');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('tslib');
|
|
6
6
|
require('react');
|
|
7
7
|
require('../../utils.js');
|
|
8
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-
|
|
8
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-0a5c9f56.js');
|
|
9
9
|
require('../../components/options-list/Component.js');
|
|
10
10
|
require('react-merge-refs');
|
|
11
11
|
require('classnames');
|
|
@@ -6,7 +6,7 @@ require('tslib');
|
|
|
6
6
|
require('react');
|
|
7
7
|
require('../../../components/options-list/Component.js');
|
|
8
8
|
require('../../../consts.js');
|
|
9
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-
|
|
9
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-0a5c9f56.js');
|
|
10
10
|
require('./footer/Component.js');
|
|
11
11
|
require('./header/Component.js');
|
|
12
12
|
require('react-merge-refs');
|
|
@@ -9,7 +9,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
11
|
|
|
12
|
-
var styles = {"footer":"
|
|
12
|
+
var styles = {"footer":"select__footer_b1owf"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 10dvs */
|
|
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_b1owf {
|
|
21
21
|
background-color: var(--color-light-bg-primary);
|
|
22
22
|
padding: var(--gap-s);
|
|
23
23
|
outline: none
|
|
24
|
-
} .
|
|
24
|
+
} .select__footer_b1owf > * + * {
|
|
25
25
|
margin-left: var(--gap-xs);
|
|
26
26
|
}
|
|
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"desktop":"
|
|
14
|
+
var styles = {"desktop":"select__desktop_1kxe6","mobile":"select__mobile_1kxe6"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Header = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1hj4p */
|
|
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_1kxe6 {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_1kxe6 {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-0a5c9f56";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-
|
|
5
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-0a5c9f56.js');
|
|
6
6
|
require('tslib');
|
|
7
7
|
require('react');
|
|
8
8
|
require('../../../utils.js');
|
|
@@ -18,7 +18,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
18
18
|
|
|
19
19
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
20
20
|
|
|
21
|
-
var styles = {"skeleton":"
|
|
21
|
+
var styles = {"skeleton":"select__skeleton_164am"};
|
|
22
22
|
require('./index.css')
|
|
23
23
|
|
|
24
24
|
function useSelectWithLoading(_a) {
|