@alfalab/core-components-select 12.4.6 → 13.0.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-0adcc33f.d.ts → Component-395c666f.d.ts} +0 -0
- package/{Component-0adcc33f.js → Component-395c666f.js} +8 -13
- package/{cssm/Component-77d7e4fc.d.ts → Component-6cb15433.d.ts} +5 -5
- package/{Component-c9860dd6.js → Component-6cb15433.js} +28 -43
- package/Component-db573794.d.ts +73 -0
- package/Component.d.ts +10 -3
- package/Component.js +12 -12
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-select/Component.js +5 -5
- package/components/base-select/index.css +15 -9
- package/components/base-select/index.d.ts +1 -1
- package/components/base-select/index.js +5 -5
- package/components/base-select-mobile/Component.js +15 -15
- package/components/base-select-mobile/checkmark/Component.js +1 -1
- package/components/base-select-mobile/checkmark/index.css +4 -4
- package/components/base-select-mobile/index.css +12 -12
- package/components/base-select-mobile/index.d.ts +1 -1
- package/components/base-select-mobile/index.js +15 -15
- package/components/base-select-mobile/options-list/Component.js +2 -2
- package/components/base-select-mobile/options-list/index.css +9 -9
- package/components/base-select-mobile/options-list/index.js +1 -1
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +7 -7
- package/components/field/Component.d.ts +2 -22
- package/components/field/Component.js +3 -3
- package/components/field/index.css +9 -9
- package/components/field/index.js +2 -2
- package/components/index.js +18 -18
- package/components/native-select/Component.d.ts +2 -2
- package/components/native-select/Component.js +1 -1
- package/components/native-select/index.js +1 -1
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/option/Component.js +2 -2
- package/components/option/index.css +20 -20
- package/components/option/index.js +1 -1
- package/components/options-list/Component.js +13 -19
- package/components/options-list/index.css +6 -6
- package/components/options-list/index.js +3 -3
- package/components/select-mobile/Component.js +15 -15
- package/components/select-mobile/index.d.ts +1 -1
- package/components/select-mobile/index.js +15 -15
- package/components/select-modal-mobile/Component.js +15 -15
- package/components/select-modal-mobile/index.d.ts +1 -1
- package/components/select-modal-mobile/index.js +15 -15
- package/components/virtual-options-list/Component.js +7 -10
- package/components/virtual-options-list/index.css +12 -12
- package/components/virtual-options-list/index.js +2 -2
- package/{esm/Component-7abd68e3.d.ts → cssm/Component-095a346d.d.ts} +5 -5
- package/cssm/{Component-77d7e4fc.js → Component-095a346d.js} +28 -43
- package/cssm/Component-db573794.d.ts +73 -0
- package/cssm/{Component-4bd2b7ec.d.ts → Component-f4dd589a.d.ts} +0 -0
- package/cssm/{Component-4bd2b7ec.js → Component-f4dd589a.js} +7 -12
- package/cssm/Component.d.ts +10 -3
- package/cssm/Component.js +15 -15
- package/cssm/components/base-select/Component.js +5 -5
- package/cssm/components/base-select/index.d.ts +1 -1
- package/cssm/components/base-select/index.js +5 -5
- package/cssm/components/base-select/index.module.css +8 -2
- package/cssm/components/base-select-mobile/Component.js +20 -20
- package/cssm/components/base-select-mobile/index.d.ts +1 -1
- package/cssm/components/base-select-mobile/index.js +20 -20
- package/cssm/components/base-select-mobile/index.module.css +1 -1
- package/cssm/components/base-select-mobile/options-list/Component.js +1 -1
- package/cssm/components/base-select-mobile/options-list/index.js +1 -1
- package/cssm/components/field/Component.d.ts +2 -22
- package/cssm/components/field/Component.js +2 -2
- package/cssm/components/field/index.js +2 -2
- package/cssm/components/index.js +23 -23
- package/cssm/components/native-select/Component.d.ts +2 -2
- package/cssm/components/native-select/Component.js +1 -1
- package/cssm/components/native-select/index.js +1 -1
- package/cssm/components/option/Component.js +1 -1
- package/cssm/components/option/index.js +1 -1
- package/cssm/components/options-list/Component.js +12 -18
- package/cssm/components/options-list/index.js +3 -3
- package/cssm/components/select-mobile/Component.js +20 -20
- package/cssm/components/select-mobile/index.d.ts +1 -1
- package/cssm/components/select-mobile/index.js +20 -20
- package/cssm/components/select-modal-mobile/Component.js +20 -20
- package/cssm/components/select-modal-mobile/index.d.ts +1 -1
- package/cssm/components/select-modal-mobile/index.js +20 -20
- package/cssm/components/virtual-options-list/Component.js +6 -9
- package/cssm/components/virtual-options-list/index.js +2 -2
- package/cssm/{hook-f5b8fe4f.d.ts → hook-edac5428.d.ts} +2 -4
- package/cssm/index.js +23 -23
- package/cssm/presets/index.d.ts +1 -1
- package/cssm/presets/index.js +20 -20
- package/cssm/presets/useLazyLoading/hook.d.ts +2 -2
- package/cssm/presets/useLazyLoading/hook.js +4 -4
- package/cssm/presets/useSelectWithApply/hook.js +20 -20
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +20 -20
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +20 -20
- package/cssm/presets/useSelectWithLoading/hook.js +1 -1
- package/{esm/tslib.es6-babe1c35.d.ts → cssm/tslib.es6-0857346e.d.ts} +8 -4
- package/{tslib.es6-820c70b7.js → cssm/tslib.es6-0857346e.js} +12 -9
- package/cssm/typings.d.ts +2 -2
- package/cssm/utils.d.ts +2 -2
- package/{modern/Component-7a4219aa.d.ts → esm/Component-2cf53a63.d.ts} +5 -5
- package/esm/{Component-7abd68e3.js → Component-2cf53a63.js} +28 -43
- package/esm/{Component-4cadb402.d.ts → Component-878fd5fa.d.ts} +0 -0
- package/esm/{Component-4cadb402.js → Component-878fd5fa.js} +8 -13
- package/esm/Component-db573794.d.ts +73 -0
- package/esm/Component.d.ts +10 -3
- package/esm/Component.js +12 -12
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/base-select/Component.js +5 -5
- package/esm/components/base-select/index.css +15 -9
- package/esm/components/base-select/index.d.ts +1 -1
- package/esm/components/base-select/index.js +5 -5
- package/esm/components/base-select-mobile/Component.js +15 -15
- package/esm/components/base-select-mobile/checkmark/Component.js +1 -1
- package/esm/components/base-select-mobile/checkmark/index.css +4 -4
- package/esm/components/base-select-mobile/index.css +12 -12
- package/esm/components/base-select-mobile/index.d.ts +1 -1
- package/esm/components/base-select-mobile/index.js +15 -15
- package/esm/components/base-select-mobile/options-list/Component.js +2 -2
- package/esm/components/base-select-mobile/options-list/index.css +9 -9
- package/esm/components/base-select-mobile/options-list/index.js +1 -1
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +7 -7
- package/esm/components/field/Component.d.ts +2 -22
- package/esm/components/field/Component.js +3 -3
- package/esm/components/field/index.css +9 -9
- package/esm/components/field/index.js +2 -2
- package/esm/components/index.js +15 -15
- package/esm/components/native-select/Component.d.ts +2 -2
- package/esm/components/native-select/Component.js +1 -1
- package/esm/components/native-select/index.js +1 -1
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +6 -6
- package/esm/components/option/Component.js +2 -2
- package/esm/components/option/index.css +20 -20
- package/esm/components/option/index.js +1 -1
- package/esm/components/options-list/Component.js +14 -20
- package/esm/components/options-list/index.css +6 -6
- package/esm/components/options-list/index.js +3 -3
- package/esm/components/select-mobile/Component.js +15 -15
- package/esm/components/select-mobile/index.d.ts +1 -1
- package/esm/components/select-mobile/index.js +15 -15
- package/esm/components/select-modal-mobile/Component.js +15 -15
- package/esm/components/select-modal-mobile/index.d.ts +1 -1
- package/esm/components/select-modal-mobile/index.js +15 -15
- package/esm/components/virtual-options-list/Component.js +7 -10
- package/esm/components/virtual-options-list/index.css +12 -12
- package/esm/components/virtual-options-list/index.js +2 -2
- package/{modern/hook-f5b8fe4f.d.ts → esm/hook-edac5428.d.ts} +2 -4
- package/esm/index.js +15 -15
- package/esm/{intersection-observer-47ac1624.d.ts → intersection-observer-5cff2265.d.ts} +0 -0
- package/esm/{intersection-observer-47ac1624.js → intersection-observer-5cff2265.js} +0 -0
- package/esm/presets/index.d.ts +1 -1
- package/esm/presets/index.js +15 -15
- package/esm/presets/useLazyLoading/hook.d.ts +2 -2
- package/esm/presets/useLazyLoading/hook.js +5 -5
- package/esm/presets/useLazyLoading/index.css +2 -2
- package/esm/presets/useSelectWithApply/hook.js +15 -15
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +15 -15
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.css +4 -4
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +15 -15
- package/esm/presets/useSelectWithLoading/hook.js +2 -2
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/{cssm/tslib.es6-f8106a15.d.ts → esm/tslib.es6-8ce25143.d.ts} +8 -4
- package/esm/{tslib.es6-babe1c35.js → tslib.es6-8ce25143.js} +12 -9
- package/esm/typings.d.ts +2 -2
- package/esm/utils.d.ts +2 -2
- package/{hook-f5b8fe4f.d.ts → hook-edac5428.d.ts} +2 -4
- package/index.js +18 -18
- package/{intersection-observer-f9d37e0f.d.ts → intersection-observer-ecb8338a.d.ts} +0 -0
- package/{intersection-observer-f9d37e0f.js → intersection-observer-ecb8338a.js} +0 -0
- package/modern/{Component-f424e3c6.d.ts → Component-42762c09.d.ts} +0 -0
- package/modern/{Component-f424e3c6.js → Component-42762c09.js} +19 -22
- package/{Component-c9860dd6.d.ts → modern/Component-afb04bfc.d.ts} +5 -5
- package/modern/{Component-7a4219aa.js → Component-afb04bfc.js} +43 -61
- package/modern/Component-db573794.d.ts +73 -0
- package/modern/Component.d.ts +10 -3
- package/modern/Component.js +12 -12
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/base-select/Component.js +4 -4
- package/modern/components/base-select/index.css +15 -9
- package/modern/components/base-select/index.d.ts +1 -1
- package/modern/components/base-select/index.js +4 -4
- package/modern/components/base-select-mobile/Component.js +14 -14
- package/modern/components/base-select-mobile/checkmark/Component.js +1 -1
- package/modern/components/base-select-mobile/checkmark/index.css +4 -4
- package/modern/components/base-select-mobile/index.css +12 -12
- package/modern/components/base-select-mobile/index.d.ts +1 -1
- package/modern/components/base-select-mobile/index.js +14 -14
- package/modern/components/base-select-mobile/options-list/Component.js +2 -2
- package/modern/components/base-select-mobile/options-list/index.css +9 -9
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +7 -7
- package/modern/components/field/Component.d.ts +2 -22
- package/modern/components/field/Component.js +4 -4
- package/modern/components/field/index.css +9 -9
- package/modern/components/field/index.js +1 -1
- package/modern/components/index.js +14 -14
- package/modern/components/native-select/Component.d.ts +2 -2
- package/modern/components/native-select/Component.js +1 -1
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/option/Component.js +3 -3
- package/modern/components/option/index.css +20 -20
- package/modern/components/options-list/Component.js +11 -15
- package/modern/components/options-list/index.css +6 -6
- package/modern/components/options-list/index.js +2 -2
- package/modern/components/select-mobile/Component.js +14 -14
- package/modern/components/select-mobile/index.d.ts +1 -1
- package/modern/components/select-mobile/index.js +14 -14
- package/modern/components/select-modal-mobile/Component.js +14 -14
- package/modern/components/select-modal-mobile/index.d.ts +1 -1
- package/modern/components/select-modal-mobile/index.js +14 -14
- package/modern/components/virtual-options-list/Component.js +18 -23
- package/modern/components/virtual-options-list/index.css +12 -12
- package/modern/components/virtual-options-list/index.js +1 -1
- package/{esm/hook-f5b8fe4f.d.ts → modern/hook-edac5428.d.ts} +2 -4
- package/modern/index.js +14 -14
- package/modern/{intersection-observer-47ac1624.d.ts → intersection-observer-5cff2265.d.ts} +0 -0
- package/modern/{intersection-observer-47ac1624.js → intersection-observer-5cff2265.js} +0 -0
- package/modern/presets/index.d.ts +1 -1
- package/modern/presets/index.js +14 -14
- package/modern/presets/useLazyLoading/hook.d.ts +2 -2
- package/modern/presets/useLazyLoading/hook.js +13 -15
- package/modern/presets/useLazyLoading/index.css +2 -2
- package/modern/presets/useSelectWithApply/hook.js +14 -14
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +14 -14
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.css +4 -4
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +14 -14
- package/modern/presets/useSelectWithLoading/hook.js +2 -2
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/typings.d.ts +2 -2
- package/modern/utils.d.ts +2 -2
- package/modern/utils.js +1 -1
- package/package.json +8 -8
- package/presets/index.d.ts +1 -1
- package/presets/index.js +15 -15
- package/presets/useLazyLoading/hook.d.ts +2 -2
- package/presets/useLazyLoading/hook.js +5 -5
- package/presets/useLazyLoading/index.css +2 -2
- package/presets/useSelectWithApply/hook.js +15 -15
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +15 -15
- package/presets/useSelectWithApply/options-list-with-apply/index.css +4 -4
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +15 -15
- package/presets/useSelectWithLoading/hook.js +2 -2
- package/presets/useSelectWithLoading/index.css +2 -2
- package/{tslib.es6-820c70b7.d.ts → tslib.es6-401ce1ea.d.ts} +8 -4
- package/{cssm/tslib.es6-f8106a15.js → tslib.es6-401ce1ea.js} +12 -9
- package/typings.d.ts +2 -2
- package/utils.d.ts +2 -2
- package/Component-afce40e0.d.ts +0 -73
- package/cssm/Component-afce40e0.d.ts +0 -73
- package/esm/Component-afce40e0.d.ts +0 -73
- package/modern/Component-afce40e0.d.ts +0 -73
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React, { forwardRef,
|
|
1
|
+
import React, { forwardRef, useRef } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
+
import mergeRefs from 'react-merge-refs';
|
|
3
4
|
import { useMedia } from '@alfalab/hooks';
|
|
4
5
|
import { useVisibleOptions, isGroup } from '../../utils.js';
|
|
5
|
-
import mergeRefs from 'react-merge-refs';
|
|
6
|
-
import { Scrollbar } from '@alfalab/core-components-scrollbar/modern';
|
|
7
6
|
import { Optgroup } from '../optgroup/Component.js';
|
|
7
|
+
import { Scrollbar } from '@alfalab/core-components-scrollbar/modern';
|
|
8
8
|
|
|
9
|
-
var styles = {"optionsList":"
|
|
9
|
+
var styles = {"optionsList":"select__optionsList_13ww0","scrollable":"select__scrollable_13ww0","emptyPlaceholder":"select__emptyPlaceholder_13ww0","l":"select__l_13ww0","xl":"select__xl_13ww0"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
const createCounter = () => {
|
|
@@ -17,11 +17,11 @@ const createCounter = () => {
|
|
|
17
17
|
const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, Option, getOptionProps, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = 5, onScroll, open, header, footer, optionsListWidth, nativeScrollbar: nativeScrollbarProp, }, ref) => {
|
|
18
18
|
let [nativeScrollbar] = useMedia([[true, '(max-width: 1023px)']], false);
|
|
19
19
|
nativeScrollbar = Boolean(nativeScrollbarProp ?? nativeScrollbar);
|
|
20
|
-
const renderOption =
|
|
20
|
+
const renderOption = (option, index) => (React.createElement(Option, { key: option.key, ...getOptionProps(option, index) }));
|
|
21
21
|
const listRef = useRef(null);
|
|
22
22
|
const scrollbarRef = useRef(null);
|
|
23
23
|
const counter = createCounter();
|
|
24
|
-
const renderGroup =
|
|
24
|
+
const renderGroup = (group) => (React.createElement(Optgroup$1, { className: optionGroupClassName, label: group.label, key: group.label, size: size }, group.options.map((option) => renderOption(option, counter()))));
|
|
25
25
|
useVisibleOptions({
|
|
26
26
|
...(!nativeScrollbar && { styleTargetRef: scrollbarRef }),
|
|
27
27
|
visibleOptions,
|
|
@@ -32,11 +32,9 @@ const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, O
|
|
|
32
32
|
if (options.length === 0 && !emptyPlaceholder) {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
-
const renderListItems = () =>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
emptyPlaceholder && options.length === 0 && (React.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder))));
|
|
39
|
-
};
|
|
35
|
+
const renderListItems = () => (React.createElement(React.Fragment, null,
|
|
36
|
+
options.map((option) => isGroup(option) ? renderGroup(option) : renderOption(option, counter())),
|
|
37
|
+
emptyPlaceholder && options.length === 0 && (React.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder))));
|
|
40
38
|
const renderWithCustomScrollbar = () => {
|
|
41
39
|
const scrollableNodeProps = {
|
|
42
40
|
onScroll,
|
|
@@ -45,10 +43,8 @@ const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, O
|
|
|
45
43
|
};
|
|
46
44
|
return (React.createElement(Scrollbar, { className: styles.scrollable, ref: scrollbarRef, horizontalAutoStretch: optionsListWidth === 'content', scrollableNodeProps: scrollableNodeProps, contentNodeProps: { ref: listRef } }, renderListItems()));
|
|
47
45
|
};
|
|
48
|
-
const renderWithNativeScrollbar = () => {
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
return (React.createElement("div", Object.assign({}, (nativeScrollbar && { 'data-test-id': dataTestId }), { className: cn(styles.optionsList, styles[size], className) }),
|
|
46
|
+
const renderWithNativeScrollbar = () => (React.createElement("div", { className: styles.scrollable, ref: mergeRefs([listRef, ref]), onScroll: onScroll }, renderListItems()));
|
|
47
|
+
return (React.createElement("div", { ...(nativeScrollbar && { 'data-test-id': dataTestId }), className: cn(styles.optionsList, styles[size], className) },
|
|
52
48
|
header,
|
|
53
49
|
nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
|
|
54
50
|
footer));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1pxgv */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
4
4
|
}
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
|
|
27
27
|
/* optgroup */
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
.select__optionsList_13ww0 {
|
|
30
30
|
overflow: auto;
|
|
31
31
|
width: 100%;
|
|
32
32
|
outline: none;
|
|
33
33
|
box-sizing: border-box;
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.select__scrollable_13ww0 {
|
|
36
36
|
overflow: auto;
|
|
37
37
|
width: 100%;
|
|
38
38
|
}
|
|
39
|
-
.
|
|
39
|
+
.select__emptyPlaceholder_13ww0 {
|
|
40
40
|
padding: var(--gap-m) var(--gap-s);
|
|
41
41
|
color: var(--select-options-list-empty-placeholder-color);
|
|
42
42
|
}
|
|
43
|
-
.
|
|
44
|
-
.
|
|
43
|
+
.select__l_13ww0 .select__emptyPlaceholder_13ww0,
|
|
44
|
+
.select__xl_13ww0 .select__emptyPlaceholder_13ww0 {
|
|
45
45
|
padding: var(--gap-xl) var(--gap-m);
|
|
46
46
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
+
import 'react-merge-refs';
|
|
3
4
|
import '@alfalab/hooks';
|
|
4
5
|
import '../../utils.js';
|
|
5
|
-
import 'react-merge-refs';
|
|
6
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
7
6
|
import '../optgroup/Component.js';
|
|
7
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
8
8
|
export { OptionsList } from './Component.js';
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '@alfalab/hooks';
|
|
4
|
-
import '@alfalab/core-components-form-control/modern';
|
|
5
|
-
import '../../utils.js';
|
|
6
|
-
import '../field/Component.js';
|
|
7
3
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
8
4
|
import '../arrow/Component.js';
|
|
9
5
|
import 'react-merge-refs';
|
|
10
|
-
import '@
|
|
6
|
+
import '@juggle/resize-observer';
|
|
7
|
+
import 'downshift';
|
|
8
|
+
import '@alfalab/core-components-popover/modern';
|
|
9
|
+
import '@alfalab/hooks';
|
|
10
|
+
import '../../Component-42762c09.js';
|
|
11
|
+
import '../../utils.js';
|
|
12
|
+
import '../native-select/Component.js';
|
|
13
|
+
import '@alfalab/core-components-form-control/modern';
|
|
14
|
+
import '../field/Component.js';
|
|
11
15
|
import '../optgroup/Component.js';
|
|
12
|
-
import '../options-list/Component.js';
|
|
13
16
|
import '@alfalab/core-components-checkbox/modern';
|
|
14
17
|
import '../checkmark/Component.js';
|
|
15
18
|
import '../option/Component.js';
|
|
16
|
-
import '@
|
|
17
|
-
import '
|
|
18
|
-
import 'downshift';
|
|
19
|
-
import '../native-select/Component.js';
|
|
20
|
-
import '../../Component-f424e3c6.js';
|
|
19
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
20
|
+
import '../options-list/Component.js';
|
|
21
21
|
import '../../Component.js';
|
|
22
22
|
import '@alfalab/core-components-bottom-sheet/modern';
|
|
23
23
|
import '@alfalab/core-components-modal/modern/mobile';
|
|
24
24
|
import '@alfalab/core-components-button/modern';
|
|
25
|
+
export { S as SelectMobile } from '../../Component-afb04bfc.js';
|
|
26
|
+
import '../base-select-mobile/checkmark/Component.js';
|
|
25
27
|
import '@alfalab/core-components-base-modal/modern';
|
|
26
28
|
import '../base-select-mobile/options-list/Component.js';
|
|
27
|
-
import '../base-select-mobile/checkmark/Component.js';
|
|
28
|
-
export { S as SelectMobile } from '../../Component-7a4219aa.js';
|
|
29
29
|
import 'react-virtual';
|
|
30
30
|
import '@alfalab/core-components-skeleton/modern';
|
|
31
|
-
import '../../intersection-observer-
|
|
31
|
+
import '../../intersection-observer-5cff2265.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../Component-
|
|
1
|
+
export * from "../../Component-afb04bfc";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '@alfalab/hooks';
|
|
4
|
-
import '@alfalab/core-components-form-control/modern';
|
|
5
|
-
import '../../utils.js';
|
|
6
|
-
import '../field/Component.js';
|
|
7
3
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
8
4
|
import '../arrow/Component.js';
|
|
9
5
|
import 'react-merge-refs';
|
|
10
|
-
import '@
|
|
6
|
+
import '@juggle/resize-observer';
|
|
7
|
+
import 'downshift';
|
|
8
|
+
import '@alfalab/core-components-popover/modern';
|
|
9
|
+
import '@alfalab/hooks';
|
|
10
|
+
import '../../Component-42762c09.js';
|
|
11
|
+
import '../../utils.js';
|
|
12
|
+
import '../native-select/Component.js';
|
|
13
|
+
import '@alfalab/core-components-form-control/modern';
|
|
14
|
+
import '../field/Component.js';
|
|
11
15
|
import '../optgroup/Component.js';
|
|
12
|
-
import '../options-list/Component.js';
|
|
13
16
|
import '@alfalab/core-components-checkbox/modern';
|
|
14
17
|
import '../checkmark/Component.js';
|
|
15
18
|
import '../option/Component.js';
|
|
16
|
-
import '@
|
|
17
|
-
import '
|
|
18
|
-
import 'downshift';
|
|
19
|
-
import '../native-select/Component.js';
|
|
20
|
-
import '../../Component-f424e3c6.js';
|
|
19
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
20
|
+
import '../options-list/Component.js';
|
|
21
21
|
import '../../Component.js';
|
|
22
22
|
import '@alfalab/core-components-bottom-sheet/modern';
|
|
23
23
|
import '@alfalab/core-components-modal/modern/mobile';
|
|
24
24
|
import '@alfalab/core-components-button/modern';
|
|
25
|
+
export { S as SelectMobile } from '../../Component-afb04bfc.js';
|
|
26
|
+
import '../base-select-mobile/checkmark/Component.js';
|
|
25
27
|
import '@alfalab/core-components-base-modal/modern';
|
|
26
28
|
import '../base-select-mobile/options-list/Component.js';
|
|
27
|
-
import '../base-select-mobile/checkmark/Component.js';
|
|
28
|
-
export { S as SelectMobile } from '../../Component-7a4219aa.js';
|
|
29
29
|
import 'react-virtual';
|
|
30
30
|
import '@alfalab/core-components-skeleton/modern';
|
|
31
|
-
import '../../intersection-observer-
|
|
31
|
+
import '../../intersection-observer-5cff2265.js';
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '@alfalab/hooks';
|
|
4
|
-
import '@alfalab/core-components-form-control/modern';
|
|
5
|
-
import '../../utils.js';
|
|
6
|
-
import '../field/Component.js';
|
|
7
3
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
8
4
|
import '../arrow/Component.js';
|
|
9
5
|
import 'react-merge-refs';
|
|
10
|
-
import '@
|
|
6
|
+
import '@juggle/resize-observer';
|
|
7
|
+
import 'downshift';
|
|
8
|
+
import '@alfalab/core-components-popover/modern';
|
|
9
|
+
import '@alfalab/hooks';
|
|
10
|
+
import '../../Component-42762c09.js';
|
|
11
|
+
import '../../utils.js';
|
|
12
|
+
import '../native-select/Component.js';
|
|
13
|
+
import '@alfalab/core-components-form-control/modern';
|
|
14
|
+
import '../field/Component.js';
|
|
11
15
|
import '../optgroup/Component.js';
|
|
12
|
-
import '../options-list/Component.js';
|
|
13
16
|
import '@alfalab/core-components-checkbox/modern';
|
|
14
17
|
import '../checkmark/Component.js';
|
|
15
18
|
import '../option/Component.js';
|
|
16
|
-
import '@
|
|
17
|
-
import '
|
|
18
|
-
import 'downshift';
|
|
19
|
-
import '../native-select/Component.js';
|
|
20
|
-
import '../../Component-f424e3c6.js';
|
|
19
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
20
|
+
import '../options-list/Component.js';
|
|
21
21
|
import '../../Component.js';
|
|
22
22
|
import '@alfalab/core-components-bottom-sheet/modern';
|
|
23
23
|
import '@alfalab/core-components-modal/modern/mobile';
|
|
24
24
|
import '@alfalab/core-components-button/modern';
|
|
25
|
+
export { a as SelectModalMobile } from '../../Component-afb04bfc.js';
|
|
26
|
+
import '../base-select-mobile/checkmark/Component.js';
|
|
25
27
|
import '@alfalab/core-components-base-modal/modern';
|
|
26
28
|
import '../base-select-mobile/options-list/Component.js';
|
|
27
|
-
import '../base-select-mobile/checkmark/Component.js';
|
|
28
|
-
export { a as SelectModalMobile } from '../../Component-7a4219aa.js';
|
|
29
29
|
import 'react-virtual';
|
|
30
30
|
import '@alfalab/core-components-skeleton/modern';
|
|
31
|
-
import '../../intersection-observer-
|
|
31
|
+
import '../../intersection-observer-5cff2265.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../Component-
|
|
1
|
+
export * from "../../Component-afb04bfc";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '@alfalab/hooks';
|
|
4
|
-
import '@alfalab/core-components-form-control/modern';
|
|
5
|
-
import '../../utils.js';
|
|
6
|
-
import '../field/Component.js';
|
|
7
3
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
8
4
|
import '../arrow/Component.js';
|
|
9
5
|
import 'react-merge-refs';
|
|
10
|
-
import '@
|
|
6
|
+
import '@juggle/resize-observer';
|
|
7
|
+
import 'downshift';
|
|
8
|
+
import '@alfalab/core-components-popover/modern';
|
|
9
|
+
import '@alfalab/hooks';
|
|
10
|
+
import '../../Component-42762c09.js';
|
|
11
|
+
import '../../utils.js';
|
|
12
|
+
import '../native-select/Component.js';
|
|
13
|
+
import '@alfalab/core-components-form-control/modern';
|
|
14
|
+
import '../field/Component.js';
|
|
11
15
|
import '../optgroup/Component.js';
|
|
12
|
-
import '../options-list/Component.js';
|
|
13
16
|
import '@alfalab/core-components-checkbox/modern';
|
|
14
17
|
import '../checkmark/Component.js';
|
|
15
18
|
import '../option/Component.js';
|
|
16
|
-
import '@
|
|
17
|
-
import '
|
|
18
|
-
import 'downshift';
|
|
19
|
-
import '../native-select/Component.js';
|
|
20
|
-
import '../../Component-f424e3c6.js';
|
|
19
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
20
|
+
import '../options-list/Component.js';
|
|
21
21
|
import '../../Component.js';
|
|
22
22
|
import '@alfalab/core-components-bottom-sheet/modern';
|
|
23
23
|
import '@alfalab/core-components-modal/modern/mobile';
|
|
24
24
|
import '@alfalab/core-components-button/modern';
|
|
25
|
+
export { a as SelectModalMobile } from '../../Component-afb04bfc.js';
|
|
26
|
+
import '../base-select-mobile/checkmark/Component.js';
|
|
25
27
|
import '@alfalab/core-components-base-modal/modern';
|
|
26
28
|
import '../base-select-mobile/options-list/Component.js';
|
|
27
|
-
import '../base-select-mobile/checkmark/Component.js';
|
|
28
|
-
export { a as SelectModalMobile } from '../../Component-7a4219aa.js';
|
|
29
29
|
import 'react-virtual';
|
|
30
30
|
import '@alfalab/core-components-skeleton/modern';
|
|
31
|
-
import '../../intersection-observer-
|
|
31
|
+
import '../../intersection-observer-5cff2265.js';
|
|
@@ -2,14 +2,15 @@ import React, { useRef, useState, useEffect, useMemo } from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { useMedia } from '@alfalab/hooks';
|
|
4
4
|
import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
|
|
5
|
-
import { Scrollbar } from '@alfalab/core-components-scrollbar/modern';
|
|
6
5
|
import { Optgroup } from '../optgroup/Component.js';
|
|
6
|
+
import { Scrollbar } from '@alfalab/core-components-scrollbar/modern';
|
|
7
7
|
import { useVirtual } from 'react-virtual';
|
|
8
8
|
|
|
9
|
-
var styles = {"virtualOptionsList":"
|
|
9
|
+
var styles = {"virtualOptionsList":"select__virtualOptionsList_bkmps","scrollable":"select__scrollable_bkmps","inner":"select__inner_bkmps","virtualRow":"select__virtualRow_bkmps","highlighted":"select__highlighted_bkmps","emptyPlaceholder":"select__emptyPlaceholder_bkmps","l":"select__l_bkmps","xl":"select__xl_bkmps"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
13
14
|
const VirtualOptionsList = ({ size = 's', flatOptions = [], highlightedIndex = -1, className, getOptionProps, Option, open, options = [], overscan = 10, Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = 5, onScroll, header, footer, nativeScrollbar: nativeScrollbarProp, }) => {
|
|
14
15
|
const listRef = useRef(null);
|
|
15
16
|
const parentRef = useRef(null);
|
|
@@ -33,7 +34,7 @@ const VirtualOptionsList = ({ size = 's', flatOptions = [], highlightedIndex = -
|
|
|
33
34
|
useEffect(() => {
|
|
34
35
|
if (highlightedIndex === -1)
|
|
35
36
|
return;
|
|
36
|
-
if (!rowVirtualizer.virtualItems.some(option => option.index === highlightedIndex)) {
|
|
37
|
+
if (!rowVirtualizer.virtualItems.some((option) => option.index === highlightedIndex)) {
|
|
37
38
|
rowVirtualizer.scrollToIndex(highlightedIndex, { align: 'end' });
|
|
38
39
|
}
|
|
39
40
|
}, [highlightedIndex]);
|
|
@@ -85,26 +86,20 @@ const VirtualOptionsList = ({ size = 's', flatOptions = [], highlightedIndex = -
|
|
|
85
86
|
style: { height: `${rowVirtualizer.totalSize}px` },
|
|
86
87
|
ref: listRef,
|
|
87
88
|
};
|
|
88
|
-
const renderList = () => {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return (React.createElement(Scrollbar, { className: styles.scrollable, ref: scrollbarRef, scrollableNodeProps: { onScroll, ref: parentRef }, contentNodeProps: contentNodeProps }, renderList()));
|
|
103
|
-
};
|
|
104
|
-
const renderWithNativeScrollbar = () => {
|
|
105
|
-
return (React.createElement("div", { className: styles.scrollable, ref: parentRef, onScroll: onScroll },
|
|
106
|
-
React.createElement("div", Object.assign({}, contentNodeProps), renderList())));
|
|
107
|
-
};
|
|
89
|
+
const renderList = () => rowVirtualizer.virtualItems.map((virtualRow) => {
|
|
90
|
+
const option = flatOptions[virtualRow.index];
|
|
91
|
+
const group = options[groupStartIndexes[virtualRow.index]];
|
|
92
|
+
return (React.createElement("div", { key: virtualRow.index, ref: virtualRow.measureRef, className: cn(styles.virtualRow, {
|
|
93
|
+
[styles.highlighted]: highlightedIndex === virtualRow.index,
|
|
94
|
+
}), style: {
|
|
95
|
+
transform: `translateY(${virtualRow.start}px)`,
|
|
96
|
+
} },
|
|
97
|
+
group && React.createElement(Optgroup$1, { label: group.label }),
|
|
98
|
+
!isGroup(option) && React.createElement(Option, { ...getOptionProps(option, virtualRow.index) })));
|
|
99
|
+
});
|
|
100
|
+
const renderWithCustomScrollbar = () => (React.createElement(Scrollbar, { className: styles.scrollable, ref: scrollbarRef, scrollableNodeProps: { onScroll, ref: parentRef }, contentNodeProps: contentNodeProps }, renderList()));
|
|
101
|
+
const renderWithNativeScrollbar = () => (React.createElement("div", { className: styles.scrollable, ref: parentRef, onScroll: onScroll },
|
|
102
|
+
React.createElement("div", { ...contentNodeProps }, renderList())));
|
|
108
103
|
return (React.createElement("div", { className: cn(styles.virtualOptionsList, styles[size], className), "data-test-id": dataTestId },
|
|
109
104
|
header,
|
|
110
105
|
nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1dvgm */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
@@ -32,27 +32,27 @@
|
|
|
32
32
|
|
|
33
33
|
/* optgroup */
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.select__virtualOptionsList_bkmps {
|
|
36
36
|
width: 100%;
|
|
37
37
|
outline: none;
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
position: relative;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.select__scrollable_bkmps {
|
|
42
42
|
overflow: auto;
|
|
43
43
|
width: 100%;
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
.select__inner_bkmps {
|
|
46
46
|
position: relative;
|
|
47
47
|
width: 100%;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.select__virtualRow_bkmps {
|
|
50
50
|
position: absolute;
|
|
51
51
|
top: 0;
|
|
52
52
|
left: 0;
|
|
53
53
|
width: 100%
|
|
54
54
|
}
|
|
55
|
-
.
|
|
55
|
+
.select__virtualRow_bkmps:before {
|
|
56
56
|
content: '';
|
|
57
57
|
position: absolute;
|
|
58
58
|
z-index: 1;
|
|
@@ -63,18 +63,18 @@
|
|
|
63
63
|
background: var(--select-option-divider-background);
|
|
64
64
|
display: var(--select-option-divider-display);
|
|
65
65
|
}
|
|
66
|
-
.
|
|
66
|
+
.select__virtualRow_bkmps:first-child:before {
|
|
67
67
|
display: none;
|
|
68
68
|
}
|
|
69
|
-
.
|
|
70
|
-
.
|
|
69
|
+
.select__highlighted_bkmps:before,
|
|
70
|
+
.select__highlighted_bkmps + .select__virtualRow_bkmps:before {
|
|
71
71
|
display: none;
|
|
72
72
|
}
|
|
73
|
-
.
|
|
73
|
+
.select__emptyPlaceholder_bkmps {
|
|
74
74
|
padding: var(--gap-m) var(--gap-s);
|
|
75
75
|
color: var(--select-options-list-empty-placeholder-color);
|
|
76
76
|
}
|
|
77
|
-
.
|
|
78
|
-
.
|
|
77
|
+
.select__l_bkmps .select__emptyPlaceholder_bkmps,
|
|
78
|
+
.select__xl_bkmps .select__emptyPlaceholder_bkmps {
|
|
79
79
|
padding: var(--gap-xl) var(--gap-m);
|
|
80
80
|
}
|
|
@@ -2,7 +2,7 @@ import 'react';
|
|
|
2
2
|
import 'classnames';
|
|
3
3
|
import '@alfalab/hooks';
|
|
4
4
|
import '../../utils.js';
|
|
5
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
6
5
|
import '../optgroup/Component.js';
|
|
6
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
7
7
|
import 'react-virtual';
|
|
8
8
|
export { VirtualOptionsList } from './Component.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { BaseSelectProps, OptionShape } from "./index";
|
|
3
3
|
type useSelectWithApplyProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Список выбранных пунктов
|
|
@@ -32,9 +32,7 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
32
32
|
showClear?: boolean | undefined;
|
|
33
33
|
onClose?: (() => void) | undefined;
|
|
34
34
|
selectedDraft?: OptionShape[] | undefined;
|
|
35
|
-
OptionsList?: import("react").FC<import("./index").OptionsListProps & import("react").RefAttributes<unknown>> | undefined;
|
|
36
|
-
* Показывать кнопку очистки
|
|
37
|
-
*/
|
|
35
|
+
OptionsList?: import("react").FC<import("./index").OptionsListProps & import("react").RefAttributes<unknown>> | undefined;
|
|
38
36
|
} & import("react").RefAttributes<unknown>>;
|
|
39
37
|
optionsListProps: {
|
|
40
38
|
OptionsList: import("react").FC<import("./index").OptionsListProps> | undefined;
|
package/modern/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '@alfalab/hooks';
|
|
4
|
-
import '@alfalab/core-components-form-control/modern';
|
|
5
|
-
export { isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from './utils.js';
|
|
6
|
-
export { Field } from './components/field/Component.js';
|
|
7
3
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
8
4
|
export { Arrow } from './components/arrow/Component.js';
|
|
9
5
|
import 'react-merge-refs';
|
|
10
|
-
import '@
|
|
6
|
+
import '@juggle/resize-observer';
|
|
7
|
+
import 'downshift';
|
|
8
|
+
import '@alfalab/core-components-popover/modern';
|
|
9
|
+
import '@alfalab/hooks';
|
|
10
|
+
export { B as BaseSelect } from './Component-42762c09.js';
|
|
11
|
+
export { isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from './utils.js';
|
|
12
|
+
import './components/native-select/Component.js';
|
|
13
|
+
import '@alfalab/core-components-form-control/modern';
|
|
14
|
+
export { Field } from './components/field/Component.js';
|
|
11
15
|
export { Optgroup } from './components/optgroup/Component.js';
|
|
12
|
-
export { OptionsList } from './components/options-list/Component.js';
|
|
13
16
|
import '@alfalab/core-components-checkbox/modern';
|
|
14
17
|
import './components/checkmark/Component.js';
|
|
15
18
|
export { Option } from './components/option/Component.js';
|
|
16
|
-
import '@
|
|
17
|
-
|
|
18
|
-
import 'downshift';
|
|
19
|
-
import './components/native-select/Component.js';
|
|
20
|
-
export { B as BaseSelect } from './Component-f424e3c6.js';
|
|
19
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
20
|
+
export { OptionsList } from './components/options-list/Component.js';
|
|
21
21
|
export { Select } from './Component.js';
|
|
22
22
|
import '@alfalab/core-components-bottom-sheet/modern';
|
|
23
23
|
import '@alfalab/core-components-modal/modern/mobile';
|
|
24
24
|
import '@alfalab/core-components-button/modern';
|
|
25
|
+
export { b as SELECT_ALL_KEY, S as SelectMobile, a as SelectModalMobile, u as useSelectWithApply } from './Component-afb04bfc.js';
|
|
26
|
+
import './components/base-select-mobile/checkmark/Component.js';
|
|
25
27
|
import '@alfalab/core-components-base-modal/modern';
|
|
26
28
|
import './components/base-select-mobile/options-list/Component.js';
|
|
27
|
-
import './components/base-select-mobile/checkmark/Component.js';
|
|
28
|
-
export { b as SELECT_ALL_KEY, S as SelectMobile, a as SelectModalMobile, u as useSelectWithApply } from './Component-7a4219aa.js';
|
|
29
29
|
import 'react-virtual';
|
|
30
30
|
export { VirtualOptionsList } from './components/virtual-options-list/Component.js';
|
|
31
31
|
import '@alfalab/core-components-skeleton/modern';
|
|
32
32
|
export { useSelectWithLoading } from './presets/useSelectWithLoading/hook.js';
|
|
33
|
-
import './intersection-observer-47ac1624.js';
|
|
34
33
|
export { useLazyLoading } from './presets/useLazyLoading/hook.js';
|
|
34
|
+
import './intersection-observer-5cff2265.js';
|
|
File without changes
|
|
File without changes
|
package/modern/presets/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '@alfalab/hooks';
|
|
4
|
-
import '@alfalab/core-components-form-control/modern';
|
|
5
|
-
import '../utils.js';
|
|
6
|
-
import '../components/field/Component.js';
|
|
7
3
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
8
4
|
import '../components/arrow/Component.js';
|
|
9
5
|
import 'react-merge-refs';
|
|
10
|
-
import '@
|
|
6
|
+
import '@juggle/resize-observer';
|
|
7
|
+
import 'downshift';
|
|
8
|
+
import '@alfalab/core-components-popover/modern';
|
|
9
|
+
import '@alfalab/hooks';
|
|
10
|
+
import '../Component-42762c09.js';
|
|
11
|
+
import '../utils.js';
|
|
12
|
+
import '../components/native-select/Component.js';
|
|
13
|
+
import '@alfalab/core-components-form-control/modern';
|
|
14
|
+
import '../components/field/Component.js';
|
|
11
15
|
import '../components/optgroup/Component.js';
|
|
12
|
-
import '../components/options-list/Component.js';
|
|
13
16
|
import '@alfalab/core-components-checkbox/modern';
|
|
14
17
|
import '../components/checkmark/Component.js';
|
|
15
18
|
import '../components/option/Component.js';
|
|
16
|
-
import '@
|
|
17
|
-
import '
|
|
18
|
-
import 'downshift';
|
|
19
|
-
import '../components/native-select/Component.js';
|
|
20
|
-
import '../Component-f424e3c6.js';
|
|
19
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
20
|
+
import '../components/options-list/Component.js';
|
|
21
21
|
import '../Component.js';
|
|
22
22
|
import '@alfalab/core-components-bottom-sheet/modern';
|
|
23
23
|
import '@alfalab/core-components-modal/modern/mobile';
|
|
24
24
|
import '@alfalab/core-components-button/modern';
|
|
25
|
+
export { b as SELECT_ALL_KEY, u as useSelectWithApply } from '../Component-afb04bfc.js';
|
|
26
|
+
import '../components/base-select-mobile/checkmark/Component.js';
|
|
25
27
|
import '@alfalab/core-components-base-modal/modern';
|
|
26
28
|
import '../components/base-select-mobile/options-list/Component.js';
|
|
27
|
-
import '../components/base-select-mobile/checkmark/Component.js';
|
|
28
|
-
export { b as SELECT_ALL_KEY, u as useSelectWithApply } from '../Component-7a4219aa.js';
|
|
29
29
|
import 'react-virtual';
|
|
30
30
|
import '@alfalab/core-components-skeleton/modern';
|
|
31
31
|
export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
|
|
32
|
-
import '../intersection-observer-47ac1624.js';
|
|
33
32
|
export { useLazyLoading } from './useLazyLoading/hook.js';
|
|
33
|
+
import '../intersection-observer-5cff2265.js';
|
|
@@ -22,7 +22,7 @@ type useLazyLoadingProps = {
|
|
|
22
22
|
* hasMore - указывает, есть ли еще незагруженные элементы (в случае false перестает загружать "следующую страницу")
|
|
23
23
|
* }>
|
|
24
24
|
*/
|
|
25
|
-
optionsFetcher
|
|
25
|
+
optionsFetcher(offset: number, limit: number, queryString?: string): Promise<OptionsFetcherResponse>;
|
|
26
26
|
};
|
|
27
27
|
declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, }: useLazyLoadingProps): {
|
|
28
28
|
optionsProps: {
|
|
@@ -38,7 +38,7 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
|
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
onOpen: (payload: {
|
|
41
|
-
open?: boolean
|
|
41
|
+
open?: boolean;
|
|
42
42
|
}) => void;
|
|
43
43
|
};
|
|
44
44
|
reset: () => void;
|