@alfalab/core-components-select 13.0.2 → 13.1.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-bfb28123.d.ts +241 -0
- package/{Component-6d167ee5.js → Component-bfb28123.js} +27 -17
- package/{Component-47b7b784.d.ts → Component-ebc21ddc.d.ts} +0 -0
- package/{Component-47b7b784.js → Component-ebc21ddc.js} +2 -2
- package/Component.js +6 -2
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-checkmark/Component.d.ts +4 -0
- package/components/base-checkmark/Component.js +29 -0
- package/components/base-checkmark/index.css +32 -0
- package/components/base-checkmark/index.d.ts +1 -0
- package/components/base-checkmark/index.js +13 -0
- package/components/base-option/Component.d.ts +4 -0
- package/components/base-option/Component.js +46 -0
- package/components/base-option/index.css +95 -0
- package/components/base-option/index.d.ts +1 -0
- package/components/base-option/index.js +15 -0
- package/components/base-select/Component.js +2 -2
- package/components/base-select/index.css +7 -7
- package/components/base-select/index.d.ts +1 -1
- package/components/base-select/index.js +2 -2
- package/components/base-select-mobile/Component.js +10 -5
- package/components/base-select-mobile/checkmark/Component.js +8 -3
- package/components/base-select-mobile/checkmark/index.css +12 -7
- package/components/base-select-mobile/checkmark/index.js +3 -0
- package/components/base-select-mobile/index.css +11 -11
- package/components/base-select-mobile/index.d.ts +1 -1
- package/components/base-select-mobile/index.js +10 -5
- 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 +5 -2
- package/components/checkmark/index.css +11 -7
- package/components/checkmark/index.js +2 -0
- package/components/field/Component.js +2 -2
- package/components/field/index.css +9 -9
- package/components/field/index.js +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +11 -5
- 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 +8 -8
- package/components/option/Component.js +7 -3
- package/components/option/index.css +20 -20
- package/components/option/index.js +5 -1
- package/components/options-list/Component.js +2 -2
- package/components/options-list/index.css +6 -6
- package/components/options-list/index.js +1 -1
- package/components/select-mobile/Component.js +10 -5
- package/components/select-mobile/index.d.ts +1 -1
- package/components/select-mobile/index.js +10 -5
- package/components/select-modal-mobile/Component.js +10 -5
- package/components/select-modal-mobile/index.d.ts +1 -1
- package/components/select-modal-mobile/index.js +10 -5
- package/components/virtual-options-list/Component.js +2 -2
- package/components/virtual-options-list/index.css +12 -12
- package/components/virtual-options-list/index.js +1 -1
- package/cssm/Component-c7975bd7.d.ts +241 -0
- package/cssm/{Component-095a346d.js → Component-c7975bd7.js} +25 -12
- package/cssm/Component.js +5 -0
- package/cssm/components/base-checkmark/Component.d.ts +4 -0
- package/cssm/components/base-checkmark/Component.js +28 -0
- package/cssm/components/base-checkmark/index.d.ts +1 -0
- package/cssm/components/base-checkmark/index.js +14 -0
- package/cssm/components/base-checkmark/index.module.css +31 -0
- package/cssm/components/base-option/Component.d.ts +4 -0
- package/cssm/components/base-option/Component.js +46 -0
- package/cssm/components/base-option/index.d.ts +1 -0
- package/cssm/components/base-option/index.js +17 -0
- package/cssm/components/base-option/index.module.css +93 -0
- package/cssm/components/base-select-mobile/Component.js +10 -3
- package/cssm/components/base-select-mobile/checkmark/Component.js +7 -2
- package/cssm/components/base-select-mobile/checkmark/index.js +3 -0
- package/cssm/components/base-select-mobile/checkmark/index.module.css +8 -3
- package/cssm/components/base-select-mobile/index.d.ts +1 -1
- package/cssm/components/base-select-mobile/index.js +10 -3
- package/cssm/components/checkmark/Component.js +4 -1
- package/cssm/components/checkmark/index.js +2 -0
- package/cssm/components/checkmark/index.module.css +4 -0
- package/cssm/components/index.d.ts +1 -0
- package/cssm/components/index.js +11 -3
- package/cssm/components/optgroup/index.module.css +2 -2
- package/cssm/components/option/Component.js +6 -1
- package/cssm/components/option/index.js +5 -0
- package/cssm/components/select-mobile/Component.js +10 -3
- package/cssm/components/select-mobile/index.d.ts +1 -1
- package/cssm/components/select-mobile/index.js +10 -3
- package/cssm/components/select-modal-mobile/Component.js +10 -3
- package/cssm/components/select-modal-mobile/index.d.ts +1 -1
- package/cssm/components/select-modal-mobile/index.js +10 -3
- package/cssm/index.js +11 -3
- package/cssm/presets/index.js +10 -3
- package/cssm/presets/useLazyLoading/hook.d.ts +3 -1
- package/cssm/presets/useLazyLoading/hook.js +8 -3
- package/cssm/presets/useSelectWithApply/hook.js +10 -3
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +10 -3
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +10 -3
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.module.css +1 -2
- package/cssm/presets/useSelectWithLoading/hook.d.ts +3 -1
- package/cssm/presets/useSelectWithLoading/hook.js +7 -2
- package/cssm/typings.d.ts +8 -0
- package/esm/{Component-b36e61d9.d.ts → Component-d31180da.d.ts} +0 -0
- package/esm/{Component-b36e61d9.js → Component-d31180da.js} +2 -2
- package/esm/Component-e24906b0.d.ts +241 -0
- package/esm/{Component-dbbe481c.js → Component-e24906b0.js} +27 -17
- package/esm/Component.js +6 -2
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/base-checkmark/Component.d.ts +4 -0
- package/esm/components/base-checkmark/Component.js +20 -0
- package/esm/components/base-checkmark/index.css +32 -0
- package/esm/components/base-checkmark/index.d.ts +1 -0
- package/esm/components/base-checkmark/index.js +5 -0
- package/esm/components/base-option/Component.d.ts +4 -0
- package/esm/components/base-option/Component.js +37 -0
- package/esm/components/base-option/index.css +95 -0
- package/esm/components/base-option/index.d.ts +1 -0
- package/esm/components/base-option/index.js +7 -0
- package/esm/components/base-select/Component.js +2 -2
- package/esm/components/base-select/index.css +7 -7
- package/esm/components/base-select/index.d.ts +1 -1
- package/esm/components/base-select/index.js +2 -2
- package/esm/components/base-select-mobile/Component.js +10 -5
- package/esm/components/base-select-mobile/checkmark/Component.js +8 -3
- package/esm/components/base-select-mobile/checkmark/index.css +12 -7
- package/esm/components/base-select-mobile/checkmark/index.js +3 -0
- package/esm/components/base-select-mobile/index.css +11 -11
- package/esm/components/base-select-mobile/index.d.ts +1 -1
- package/esm/components/base-select-mobile/index.js +10 -5
- 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 +5 -2
- package/esm/components/checkmark/index.css +11 -7
- package/esm/components/checkmark/index.js +2 -0
- package/esm/components/field/Component.js +2 -2
- package/esm/components/field/index.css +9 -9
- package/esm/components/field/index.js +1 -1
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.js +10 -5
- 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 +8 -8
- package/esm/components/option/Component.js +10 -6
- package/esm/components/option/index.css +20 -20
- package/esm/components/option/index.js +5 -1
- package/esm/components/options-list/Component.js +2 -2
- package/esm/components/options-list/index.css +6 -6
- package/esm/components/options-list/index.js +1 -1
- package/esm/components/select-mobile/Component.js +10 -5
- package/esm/components/select-mobile/index.d.ts +1 -1
- package/esm/components/select-mobile/index.js +10 -5
- package/esm/components/select-modal-mobile/Component.js +10 -5
- package/esm/components/select-modal-mobile/index.d.ts +1 -1
- package/esm/components/select-modal-mobile/index.js +10 -5
- package/esm/components/virtual-options-list/Component.js +2 -2
- package/esm/components/virtual-options-list/index.css +12 -12
- package/esm/components/virtual-options-list/index.js +1 -1
- package/esm/index.js +10 -5
- package/esm/{intersection-observer-f1488f74.d.ts → intersection-observer-75c9afe9.d.ts} +0 -0
- package/esm/{intersection-observer-f1488f74.js → intersection-observer-75c9afe9.js} +0 -0
- package/esm/presets/index.js +10 -5
- package/esm/presets/useLazyLoading/hook.d.ts +3 -1
- package/esm/presets/useLazyLoading/hook.js +10 -6
- package/esm/presets/useLazyLoading/index.css +2 -2
- package/esm/presets/useSelectWithApply/hook.js +10 -5
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +10 -5
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.css +5 -6
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +10 -5
- package/esm/presets/useSelectWithLoading/hook.d.ts +3 -1
- package/esm/presets/useSelectWithLoading/hook.js +9 -5
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/{tslib.es6-28e16b18.d.ts → tslib.es6-b639aaa5.d.ts} +0 -0
- package/esm/{tslib.es6-28e16b18.js → tslib.es6-b639aaa5.js} +0 -0
- package/esm/typings.d.ts +8 -0
- package/index.js +11 -5
- package/{intersection-observer-a8302d8a.d.ts → intersection-observer-59773a48.d.ts} +0 -0
- package/{intersection-observer-a8302d8a.js → intersection-observer-59773a48.js} +0 -0
- package/modern/{Component-30d321bc.d.ts → Component-6c794caf.d.ts} +0 -0
- package/modern/{Component-30d321bc.js → Component-6c794caf.js} +1 -1
- package/modern/Component-b2369a4f.d.ts +241 -0
- package/modern/{Component-90abbd87.js → Component-b2369a4f.js} +35 -26
- package/modern/Component.js +5 -1
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/base-checkmark/Component.d.ts +4 -0
- package/modern/components/base-checkmark/Component.js +18 -0
- package/modern/components/base-checkmark/index.css +32 -0
- package/modern/components/base-checkmark/index.d.ts +1 -0
- package/modern/components/base-checkmark/index.js +5 -0
- package/modern/components/base-option/Component.d.ts +4 -0
- package/modern/components/base-option/Component.js +34 -0
- package/modern/components/base-option/index.css +95 -0
- package/modern/components/base-option/index.d.ts +1 -0
- package/modern/components/base-option/index.js +6 -0
- package/modern/components/base-select/Component.js +1 -1
- package/modern/components/base-select/index.css +7 -7
- package/modern/components/base-select/index.d.ts +1 -1
- package/modern/components/base-select/index.js +1 -1
- package/modern/components/base-select-mobile/Component.js +9 -4
- package/modern/components/base-select-mobile/checkmark/Component.js +8 -3
- package/modern/components/base-select-mobile/checkmark/index.css +12 -7
- package/modern/components/base-select-mobile/checkmark/index.js +3 -0
- package/modern/components/base-select-mobile/index.css +11 -11
- package/modern/components/base-select-mobile/index.d.ts +1 -1
- package/modern/components/base-select-mobile/index.js +9 -4
- package/modern/components/base-select-mobile/options-list/Component.js +1 -1
- package/modern/components/base-select-mobile/options-list/index.css +9 -9
- package/modern/components/checkmark/Component.js +5 -2
- package/modern/components/checkmark/index.css +11 -7
- package/modern/components/checkmark/index.js +2 -0
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +9 -9
- package/modern/components/index.d.ts +1 -0
- package/modern/components/index.js +9 -4
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +8 -8
- package/modern/components/option/Component.js +9 -5
- package/modern/components/option/index.css +20 -20
- package/modern/components/option/index.js +4 -0
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +6 -6
- package/modern/components/select-mobile/Component.js +9 -4
- package/modern/components/select-mobile/index.d.ts +1 -1
- package/modern/components/select-mobile/index.js +9 -4
- package/modern/components/select-modal-mobile/Component.js +9 -4
- package/modern/components/select-modal-mobile/index.d.ts +1 -1
- package/modern/components/select-modal-mobile/index.js +9 -4
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +12 -12
- package/modern/index.js +9 -4
- package/modern/{intersection-observer-f1488f74.d.ts → intersection-observer-75c9afe9.d.ts} +0 -0
- package/modern/{intersection-observer-f1488f74.js → intersection-observer-75c9afe9.js} +0 -0
- package/modern/presets/index.js +9 -4
- package/modern/presets/useLazyLoading/hook.d.ts +3 -1
- package/modern/presets/useLazyLoading/hook.js +8 -4
- package/modern/presets/useLazyLoading/index.css +2 -2
- package/modern/presets/useSelectWithApply/hook.js +9 -4
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +9 -4
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.css +5 -6
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +9 -4
- package/modern/presets/useSelectWithLoading/hook.d.ts +3 -1
- package/modern/presets/useSelectWithLoading/hook.js +8 -4
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/typings.d.ts +8 -0
- package/package.json +10 -8
- package/presets/index.js +10 -5
- package/presets/useLazyLoading/hook.d.ts +3 -1
- package/presets/useLazyLoading/hook.js +10 -6
- package/presets/useLazyLoading/index.css +2 -2
- package/presets/useSelectWithApply/hook.js +10 -5
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +10 -5
- package/presets/useSelectWithApply/options-list-with-apply/index.css +5 -6
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +10 -5
- package/presets/useSelectWithLoading/hook.d.ts +3 -1
- package/presets/useSelectWithLoading/hook.js +8 -4
- package/presets/useSelectWithLoading/index.css +2 -2
- package/{tslib.es6-c5796feb.d.ts → tslib.es6-c35337da.d.ts} +0 -0
- package/{tslib.es6-c5796feb.js → tslib.es6-c35337da.js} +0 -0
- package/typings.d.ts +8 -0
- package/Component-6d167ee5.d.ts +0 -114
- package/Component-db573794.d.ts +0 -73
- package/Component.mobile-3fe0d3e6.d.ts +0 -56
- package/Context-c2e6f1b2.d.ts +0 -4
- package/cssm/Component-095a346d.d.ts +0 -114
- package/cssm/Component-db573794.d.ts +0 -73
- package/cssm/Component.mobile-3fe0d3e6.d.ts +0 -56
- package/cssm/Context-c2e6f1b2.d.ts +0 -4
- package/esm/Component-db573794.d.ts +0 -73
- package/esm/Component-dbbe481c.d.ts +0 -114
- package/esm/Component.mobile-3fe0d3e6.d.ts +0 -56
- package/esm/Context-c2e6f1b2.d.ts +0 -4
- package/modern/Component-90abbd87.d.ts +0 -114
- package/modern/Component-db573794.d.ts +0 -73
- package/modern/Component.mobile-3fe0d3e6.d.ts +0 -56
- package/modern/Context-c2e6f1b2.d.ts +0 -4
package/esm/presets/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../tslib.es6-
|
|
1
|
+
import '../tslib.es6-b639aaa5.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -8,12 +8,16 @@ import '@juggle/resize-observer';
|
|
|
8
8
|
import 'downshift';
|
|
9
9
|
import '@alfalab/core-components-popover/esm';
|
|
10
10
|
import '@alfalab/hooks';
|
|
11
|
-
import '../Component-
|
|
11
|
+
import '../Component-d31180da.js';
|
|
12
12
|
import '../utils.js';
|
|
13
13
|
import '../components/native-select/Component.js';
|
|
14
14
|
import '@alfalab/core-components-form-control/esm';
|
|
15
15
|
import '../components/field/Component.js';
|
|
16
16
|
import '../components/optgroup/Component.js';
|
|
17
|
+
import '@alfalab/core-components/badge';
|
|
18
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
19
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
20
|
+
import '../components/base-select-mobile/checkmark/Component.js';
|
|
17
21
|
import '@alfalab/core-components-checkbox/esm';
|
|
18
22
|
import '../components/checkmark/Component.js';
|
|
19
23
|
import '../components/option/Component.js';
|
|
@@ -23,12 +27,13 @@ import '../Component.js';
|
|
|
23
27
|
import '@alfalab/core-components-bottom-sheet/esm';
|
|
24
28
|
import '@alfalab/core-components-modal/esm/mobile';
|
|
25
29
|
import '@alfalab/core-components-button/esm';
|
|
26
|
-
export { b as SELECT_ALL_KEY, u as useSelectWithApply } from '../Component-
|
|
27
|
-
import '../components/base-
|
|
30
|
+
export { b as SELECT_ALL_KEY, u as useSelectWithApply } from '../Component-e24906b0.js';
|
|
31
|
+
import '../components/base-checkmark/Component.js';
|
|
28
32
|
import '@alfalab/core-components-base-modal/esm';
|
|
29
33
|
import '../components/base-select-mobile/options-list/Component.js';
|
|
30
34
|
import 'react-virtual';
|
|
35
|
+
import '../components/base-option/Component.js';
|
|
31
36
|
import '@alfalab/core-components-skeleton/esm';
|
|
32
37
|
export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
|
|
33
38
|
export { useLazyLoading } from './useLazyLoading/hook.js';
|
|
34
|
-
import '../intersection-observer-
|
|
39
|
+
import '../intersection-observer-75c9afe9.js';
|
|
@@ -12,6 +12,8 @@ type useLazyLoadingProps = {
|
|
|
12
12
|
initialOffset?: number;
|
|
13
13
|
/** Скелетон загружаемых элементов */
|
|
14
14
|
skeleton?: React.ReactNode;
|
|
15
|
+
/** Компонент пункта меню */
|
|
16
|
+
Option?: React.FC<OptionProps>;
|
|
15
17
|
/**
|
|
16
18
|
* Функция-загрузчик опций.
|
|
17
19
|
* @param offset - текущая страница
|
|
@@ -24,7 +26,7 @@ type useLazyLoadingProps = {
|
|
|
24
26
|
*/
|
|
25
27
|
optionsFetcher(offset: number, limit: number, queryString?: string): Promise<OptionsFetcherResponse>;
|
|
26
28
|
};
|
|
27
|
-
declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, }: useLazyLoadingProps): {
|
|
29
|
+
declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option, }: useLazyLoadingProps): {
|
|
28
30
|
optionsProps: {
|
|
29
31
|
Option: (props: OptionProps) => JSX.Element;
|
|
30
32
|
options: OptionShape[];
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as __spreadArray, a as __assign } from '../../tslib.es6-b639aaa5.js';
|
|
2
2
|
import React, { useReducer, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
+
import '@alfalab/core-components/badge';
|
|
5
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
6
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
7
|
+
import '../../components/base-select-mobile/checkmark/Component.js';
|
|
4
8
|
import '@alfalab/core-components-checkbox/esm';
|
|
5
9
|
import '../../components/checkmark/Component.js';
|
|
6
10
|
import { Option } from '../../components/option/Component.js';
|
|
7
11
|
import { Skeleton } from '@alfalab/core-components-skeleton/esm';
|
|
8
|
-
import '../../intersection-observer-
|
|
12
|
+
import '../../intersection-observer-75c9afe9.js';
|
|
9
13
|
|
|
10
|
-
var styles = {"skeleton":"
|
|
14
|
+
var styles = {"skeleton":"select__skeleton_1e13v"};
|
|
11
15
|
require('./index.css')
|
|
12
16
|
|
|
13
17
|
var DEBOUNCE_TIMEOUT = 300;
|
|
@@ -32,7 +36,7 @@ var actions = {
|
|
|
32
36
|
},
|
|
33
37
|
};
|
|
34
38
|
function useLazyLoading(_a) {
|
|
35
|
-
var _b = _a.limit, limit = _b === void 0 ? 10 : _b, _c = _a.initialOffset, initialOffset = _c === void 0 ? 0 : _c, optionsFetcher = _a.optionsFetcher, _d = _a.skeleton, skeleton = _d === void 0 ? React.createElement(Skeleton, { className: styles.skeleton, visible: true }) : _d;
|
|
39
|
+
var _b = _a.limit, limit = _b === void 0 ? 10 : _b, _c = _a.initialOffset, initialOffset = _c === void 0 ? 0 : _c, optionsFetcher = _a.optionsFetcher, _d = _a.skeleton, skeleton = _d === void 0 ? React.createElement(Skeleton, { className: styles.skeleton, visible: true }) : _d, _e = _a.Option, Option$1 = _e === void 0 ? Option : _e;
|
|
36
40
|
var initialOptions = [];
|
|
37
41
|
var initialLoading = false;
|
|
38
42
|
var lazyLoadingInitialState = {
|
|
@@ -68,7 +72,7 @@ function useLazyLoading(_a) {
|
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
};
|
|
71
|
-
var
|
|
75
|
+
var _f = useReducer(lazyLoadingReducer, lazyLoadingInitialState), _g = _f[0], opened = _g.opened, offset = _g.offset, options = _g.options, loading = _g.loading, allOptionsLoaded = _g.allOptionsLoaded, queryString = _g.queryString, dispatch = _f[1];
|
|
72
76
|
var abortFetchingOptionsRef = useRef();
|
|
73
77
|
var fetchNextOffsetOptions = useCallback(function () {
|
|
74
78
|
dispatch(actions.fetchOptionsStart());
|
|
@@ -168,7 +172,7 @@ function useLazyLoading(_a) {
|
|
|
168
172
|
}, DEBOUNCE_TIMEOUT);
|
|
169
173
|
/* eslint-enable */
|
|
170
174
|
}, []);
|
|
171
|
-
var renderOption =
|
|
175
|
+
var renderOption = function (props) { return (React.createElement(Option$1, __assign({}, props, { highlighted: loading ? false : props.highlighted }))); };
|
|
172
176
|
var skeletonOptions = useMemo(function () {
|
|
173
177
|
return Array(loading ? limit : 0)
|
|
174
178
|
.fill(0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../tslib.es6-
|
|
1
|
+
import '../../tslib.es6-b639aaa5.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -8,12 +8,16 @@ import '@juggle/resize-observer';
|
|
|
8
8
|
import 'downshift';
|
|
9
9
|
import '@alfalab/core-components-popover/esm';
|
|
10
10
|
import '@alfalab/hooks';
|
|
11
|
-
import '../../Component-
|
|
11
|
+
import '../../Component-d31180da.js';
|
|
12
12
|
import '../../utils.js';
|
|
13
13
|
import '../../components/native-select/Component.js';
|
|
14
14
|
import '@alfalab/core-components-form-control/esm';
|
|
15
15
|
import '../../components/field/Component.js';
|
|
16
16
|
import '../../components/optgroup/Component.js';
|
|
17
|
+
import '@alfalab/core-components/badge';
|
|
18
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
19
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
20
|
+
import '../../components/base-select-mobile/checkmark/Component.js';
|
|
17
21
|
import '@alfalab/core-components-checkbox/esm';
|
|
18
22
|
import '../../components/checkmark/Component.js';
|
|
19
23
|
import '../../components/option/Component.js';
|
|
@@ -23,10 +27,11 @@ import '../../Component.js';
|
|
|
23
27
|
import '@alfalab/core-components-bottom-sheet/esm';
|
|
24
28
|
import '@alfalab/core-components-modal/esm/mobile';
|
|
25
29
|
import '@alfalab/core-components-button/esm';
|
|
26
|
-
export { b as SELECT_ALL_KEY, u as useSelectWithApply } from '../../Component-
|
|
27
|
-
import '../../components/base-
|
|
30
|
+
export { b as SELECT_ALL_KEY, u as useSelectWithApply } from '../../Component-e24906b0.js';
|
|
31
|
+
import '../../components/base-checkmark/Component.js';
|
|
28
32
|
import '@alfalab/core-components-base-modal/esm';
|
|
29
33
|
import '../../components/base-select-mobile/options-list/Component.js';
|
|
30
34
|
import 'react-virtual';
|
|
35
|
+
import '../../components/base-option/Component.js';
|
|
31
36
|
import '@alfalab/core-components-skeleton/esm';
|
|
32
|
-
import '../../intersection-observer-
|
|
37
|
+
import '../../intersection-observer-75c9afe9.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../../tslib.es6-
|
|
1
|
+
import '../../../tslib.es6-b639aaa5.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -8,12 +8,16 @@ import '@juggle/resize-observer';
|
|
|
8
8
|
import 'downshift';
|
|
9
9
|
import '@alfalab/core-components-popover/esm';
|
|
10
10
|
import '@alfalab/hooks';
|
|
11
|
-
import '../../../Component-
|
|
11
|
+
import '../../../Component-d31180da.js';
|
|
12
12
|
import '../../../utils.js';
|
|
13
13
|
import '../../../components/native-select/Component.js';
|
|
14
14
|
import '@alfalab/core-components-form-control/esm';
|
|
15
15
|
import '../../../components/field/Component.js';
|
|
16
16
|
import '../../../components/optgroup/Component.js';
|
|
17
|
+
import '@alfalab/core-components/badge';
|
|
18
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
19
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
20
|
+
import '../../../components/base-select-mobile/checkmark/Component.js';
|
|
17
21
|
import '@alfalab/core-components-checkbox/esm';
|
|
18
22
|
import '../../../components/checkmark/Component.js';
|
|
19
23
|
import '../../../components/option/Component.js';
|
|
@@ -23,10 +27,11 @@ import '../../../Component.js';
|
|
|
23
27
|
import '@alfalab/core-components-bottom-sheet/esm';
|
|
24
28
|
import '@alfalab/core-components-modal/esm/mobile';
|
|
25
29
|
import '@alfalab/core-components-button/esm';
|
|
26
|
-
export { O as OptionsListWithApply } from '../../../Component-
|
|
27
|
-
import '../../../components/base-
|
|
30
|
+
export { O as OptionsListWithApply } from '../../../Component-e24906b0.js';
|
|
31
|
+
import '../../../components/base-checkmark/Component.js';
|
|
28
32
|
import '@alfalab/core-components-base-modal/esm';
|
|
29
33
|
import '../../../components/base-select-mobile/options-list/Component.js';
|
|
30
34
|
import 'react-virtual';
|
|
35
|
+
import '../../../components/base-option/Component.js';
|
|
31
36
|
import '@alfalab/core-components-skeleton/esm';
|
|
32
|
-
import '../../../intersection-observer-
|
|
37
|
+
import '../../../intersection-observer-75c9afe9.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 111hl */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-border-secondary: #e7e9eb;
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
:root {
|
|
15
15
|
--gap-xs: 8px;
|
|
16
16
|
--gap-s: 12px;
|
|
17
|
-
--gap-m: 16px;
|
|
18
17
|
}
|
|
19
18
|
:root {
|
|
20
19
|
|
|
@@ -26,14 +25,14 @@
|
|
|
26
25
|
|
|
27
26
|
/* optgroup */
|
|
28
27
|
}
|
|
29
|
-
.
|
|
28
|
+
.select__footer_1nc94 {
|
|
30
29
|
background: var(--color-light-bg-primary);
|
|
31
|
-
padding: var(--gap-s)
|
|
30
|
+
padding: var(--gap-s);
|
|
32
31
|
outline: none
|
|
33
32
|
}
|
|
34
|
-
.
|
|
33
|
+
.select__footer_1nc94 > * + * {
|
|
35
34
|
margin-left: var(--gap-xs);
|
|
36
35
|
}
|
|
37
|
-
.
|
|
36
|
+
.select__withBorder_1nc94 {
|
|
38
37
|
box-shadow: inset 0 1px 0 var(--color-light-border-secondary);
|
|
39
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../Component-
|
|
1
|
+
export * from "../../../Component-e24906b0";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../../tslib.es6-
|
|
1
|
+
import '../../../tslib.es6-b639aaa5.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -8,12 +8,16 @@ import '@juggle/resize-observer';
|
|
|
8
8
|
import 'downshift';
|
|
9
9
|
import '@alfalab/core-components-popover/esm';
|
|
10
10
|
import '@alfalab/hooks';
|
|
11
|
-
import '../../../Component-
|
|
11
|
+
import '../../../Component-d31180da.js';
|
|
12
12
|
import '../../../utils.js';
|
|
13
13
|
import '../../../components/native-select/Component.js';
|
|
14
14
|
import '@alfalab/core-components-form-control/esm';
|
|
15
15
|
import '../../../components/field/Component.js';
|
|
16
16
|
import '../../../components/optgroup/Component.js';
|
|
17
|
+
import '@alfalab/core-components/badge';
|
|
18
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
19
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
20
|
+
import '../../../components/base-select-mobile/checkmark/Component.js';
|
|
17
21
|
import '@alfalab/core-components-checkbox/esm';
|
|
18
22
|
import '../../../components/checkmark/Component.js';
|
|
19
23
|
import '../../../components/option/Component.js';
|
|
@@ -23,10 +27,11 @@ import '../../../Component.js';
|
|
|
23
27
|
import '@alfalab/core-components-bottom-sheet/esm';
|
|
24
28
|
import '@alfalab/core-components-modal/esm/mobile';
|
|
25
29
|
import '@alfalab/core-components-button/esm';
|
|
26
|
-
export { O as OptionsListWithApply } from '../../../Component-
|
|
27
|
-
import '../../../components/base-
|
|
30
|
+
export { O as OptionsListWithApply } from '../../../Component-e24906b0.js';
|
|
31
|
+
import '../../../components/base-checkmark/Component.js';
|
|
28
32
|
import '@alfalab/core-components-base-modal/esm';
|
|
29
33
|
import '../../../components/base-select-mobile/options-list/Component.js';
|
|
30
34
|
import 'react-virtual';
|
|
35
|
+
import '../../../components/base-option/Component.js';
|
|
31
36
|
import '@alfalab/core-components-skeleton/esm';
|
|
32
|
-
import '../../../intersection-observer-
|
|
37
|
+
import '../../../intersection-observer-75c9afe9.js';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { BaseSelectProps, OptionProps, OptionShape } from "../../typings";
|
|
3
4
|
type useSelectWithLoadingProps = {
|
|
4
5
|
loading?: boolean;
|
|
5
6
|
visibleOptions?: BaseSelectProps['visibleOptions'];
|
|
7
|
+
Option?: React.FC<OptionProps>;
|
|
6
8
|
};
|
|
7
|
-
declare function useSelectWithLoading({ loading, visibleOptions, }: useSelectWithLoadingProps): {
|
|
9
|
+
declare function useSelectWithLoading({ loading, visibleOptions, Option, }: useSelectWithLoadingProps): {
|
|
8
10
|
Option: (props: OptionProps) => JSX.Element;
|
|
9
11
|
options: OptionShape[];
|
|
10
12
|
} | null;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { a as __assign } from '../../tslib.es6-
|
|
2
|
-
import React
|
|
1
|
+
import { a as __assign } from '../../tslib.es6-b639aaa5.js';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
+
import '@alfalab/core-components/badge';
|
|
5
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
6
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
7
|
+
import '../../components/base-select-mobile/checkmark/Component.js';
|
|
4
8
|
import '@alfalab/core-components-checkbox/esm';
|
|
5
9
|
import '../../components/checkmark/Component.js';
|
|
6
10
|
import { Option } from '../../components/option/Component.js';
|
|
7
11
|
import { Skeleton } from '@alfalab/core-components-skeleton/esm';
|
|
8
12
|
|
|
9
|
-
var styles = {"skeleton":"
|
|
13
|
+
var styles = {"skeleton":"select__skeleton_f3b2p"};
|
|
10
14
|
require('./index.css')
|
|
11
15
|
|
|
12
16
|
function useSelectWithLoading(_a) {
|
|
13
|
-
var _b = _a.loading, loading = _b === void 0 ? false : _b, _c = _a.visibleOptions, visibleOptions = _c === void 0 ? 6 : _c;
|
|
14
|
-
var renderOption =
|
|
17
|
+
var _b = _a.loading, loading = _b === void 0 ? false : _b, _c = _a.visibleOptions, visibleOptions = _c === void 0 ? 6 : _c, _d = _a.Option, Option$1 = _d === void 0 ? Option : _d;
|
|
18
|
+
var renderOption = function (props) { return (React.createElement(Option$1, __assign({}, props, { Checkmark: null, highlighted: loading ? false : props.highlighted }))); };
|
|
15
19
|
var options = Array(visibleOptions)
|
|
16
20
|
.fill(0)
|
|
17
21
|
.map(function (_, key) { return ({
|
|
File without changes
|
|
File without changes
|
package/esm/typings.d.ts
CHANGED
|
@@ -516,6 +516,14 @@ type OptionProps = {
|
|
|
516
516
|
* Идентификатор для систем автоматизированного тестирования
|
|
517
517
|
*/
|
|
518
518
|
dataTestId?: string;
|
|
519
|
+
/**
|
|
520
|
+
* Позиция иконки "галочки"
|
|
521
|
+
*/
|
|
522
|
+
checkmarkPosition?: 'before' | 'after';
|
|
523
|
+
/**
|
|
524
|
+
* Мобильная верcия option.
|
|
525
|
+
*/
|
|
526
|
+
mobile?: boolean;
|
|
519
527
|
};
|
|
520
528
|
type CheckmarkProps = {
|
|
521
529
|
/**
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('./tslib.es6-
|
|
5
|
+
require('./tslib.es6-c35337da.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
@@ -12,12 +12,16 @@ require('@juggle/resize-observer');
|
|
|
12
12
|
require('downshift');
|
|
13
13
|
require('@alfalab/core-components-popover');
|
|
14
14
|
require('@alfalab/hooks');
|
|
15
|
-
var components_baseSelect_Component = require('./Component-
|
|
15
|
+
var components_baseSelect_Component = require('./Component-ebc21ddc.js');
|
|
16
16
|
var utils = require('./utils.js');
|
|
17
17
|
require('./components/native-select/Component.js');
|
|
18
18
|
require('@alfalab/core-components-form-control');
|
|
19
19
|
var components_field_Component = require('./components/field/Component.js');
|
|
20
20
|
var components_optgroup_Component = require('./components/optgroup/Component.js');
|
|
21
|
+
require('@alfalab/core-components/badge');
|
|
22
|
+
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
23
|
+
require('@alfalab/icons-glyph/CheckmarkMIcon');
|
|
24
|
+
require('./components/base-select-mobile/checkmark/Component.js');
|
|
21
25
|
require('@alfalab/core-components-checkbox');
|
|
22
26
|
require('./components/checkmark/Component.js');
|
|
23
27
|
var components_option_Component = require('./components/option/Component.js');
|
|
@@ -27,16 +31,17 @@ var Component = require('./Component.js');
|
|
|
27
31
|
require('@alfalab/core-components-bottom-sheet');
|
|
28
32
|
require('@alfalab/core-components-modal/mobile');
|
|
29
33
|
require('@alfalab/core-components-button');
|
|
30
|
-
var presets_useSelectWithApply_hook = require('./Component-
|
|
31
|
-
require('./components/base-
|
|
34
|
+
var presets_useSelectWithApply_hook = require('./Component-bfb28123.js');
|
|
35
|
+
require('./components/base-checkmark/Component.js');
|
|
32
36
|
require('@alfalab/core-components-base-modal');
|
|
33
37
|
require('./components/base-select-mobile/options-list/Component.js');
|
|
34
38
|
require('react-virtual');
|
|
35
39
|
var components_virtualOptionsList_Component = require('./components/virtual-options-list/Component.js');
|
|
40
|
+
var components_baseOption_Component = require('./components/base-option/Component.js');
|
|
36
41
|
require('@alfalab/core-components-skeleton');
|
|
37
42
|
var presets_useSelectWithLoading_hook = require('./presets/useSelectWithLoading/hook.js');
|
|
38
43
|
var presets_useLazyLoading_hook = require('./presets/useLazyLoading/hook.js');
|
|
39
|
-
require('./intersection-observer-
|
|
44
|
+
require('./intersection-observer-59773a48.js');
|
|
40
45
|
|
|
41
46
|
|
|
42
47
|
|
|
@@ -59,5 +64,6 @@ exports.SelectMobile = presets_useSelectWithApply_hook.SelectMobile;
|
|
|
59
64
|
exports.SelectModalMobile = presets_useSelectWithApply_hook.SelectModalMobile;
|
|
60
65
|
exports.useSelectWithApply = presets_useSelectWithApply_hook.useSelectWithApply;
|
|
61
66
|
exports.VirtualOptionsList = components_virtualOptionsList_Component.VirtualOptionsList;
|
|
67
|
+
exports.BaseOption = components_baseOption_Component.BaseOption;
|
|
62
68
|
exports.useSelectWithLoading = presets_useSelectWithLoading_hook.useSelectWithLoading;
|
|
63
69
|
exports.useLazyLoading = presets_useLazyLoading_hook.useLazyLoading;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -13,7 +13,7 @@ const getDataTestId = (dataTestId, element) => {
|
|
|
13
13
|
return dataTestId ? `${dataTestId}${elementPart}` : undefined;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
var styles = {"component":"
|
|
16
|
+
var styles = {"component":"select__component_s9fig","popoverInner":"select__popoverInner_s9fig","optionsList":"select__optionsList_s9fig","nativeSelect":"select__nativeSelect_s9fig","block":"select__block_s9fig"};
|
|
17
17
|
require('./components/base-select/index.css')
|
|
18
18
|
|
|
19
19
|
const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsListClassName, optionClassName, popperClassName, options, autocomplete = false, multiple = false, allowUnselect = false, disabled = false, closeOnSelect = !multiple, circularNavigation = false, nativeSelect = false, defaultOpen = false, open: openProp, popoverPosition = 'bottom-start', preventFlip = true, optionsListWidth = 'content', name, id, selected, size = 's', optionsSize = size, error, hint, block, label, labelView, placeholder, fieldProps = {}, optionsListProps = {}, optionProps = {}, valueRenderer, onChange, onOpen, onFocus, onBlur, onScroll, Arrow, Field = () => null, OptionsList = () => null, Optgroup = () => null, Option = () => null, updatePopover, zIndexPopover, showEmptyOptionsList = false, visibleOptions, }, ref) => {
|