@alfalab/core-components-select 12.4.7 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{Component-c832d566.d.ts → Component-09f82c1f.d.ts} +0 -0
- package/{Component-c832d566.js → Component-09f82c1f.js} +8 -13
- package/{Component-0ae85b5e.d.ts → Component-42bffe35.d.ts} +5 -5
- package/{Component-0ae85b5e.js → Component-42bffe35.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/cssm/{Component-77d7e4fc.d.ts → 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-14867fac.d.ts → cssm/tslib.es6-0857346e.d.ts} +8 -4
- package/{tslib.es6-beb5d518.js → cssm/tslib.es6-0857346e.js} +12 -9
- package/cssm/typings.d.ts +2 -2
- package/cssm/utils.d.ts +2 -2
- package/esm/{Component-d190d712.d.ts → Component-3cfcec1a.d.ts} +0 -0
- package/esm/{Component-d190d712.js → Component-3cfcec1a.js} +8 -13
- package/esm/{Component-b4fcaaca.d.ts → Component-889ce29b.d.ts} +5 -5
- package/esm/{Component-b4fcaaca.js → Component-889ce29b.js} +28 -43
- 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-a0b1a83f.d.ts → intersection-observer-46ae308d.d.ts} +0 -0
- package/esm/{intersection-observer-a0b1a83f.js → intersection-observer-46ae308d.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-c4534f67.d.ts} +8 -4
- package/esm/{tslib.es6-14867fac.js → tslib.es6-c4534f67.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-f01dee86.d.ts → intersection-observer-fc42e563.d.ts} +0 -0
- package/{intersection-observer-f01dee86.js → intersection-observer-fc42e563.js} +0 -0
- package/modern/{Component-538a2034.d.ts → Component-ac4d8093.d.ts} +0 -0
- package/modern/{Component-538a2034.js → Component-ac4d8093.js} +19 -22
- package/modern/Component-db573794.d.ts +73 -0
- package/modern/{Component-8186c533.d.ts → Component-dc7907a7.d.ts} +5 -5
- package/modern/{Component-8186c533.js → Component-dc7907a7.js} +43 -61
- 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-a0b1a83f.d.ts → intersection-observer-46ae308d.d.ts} +0 -0
- package/modern/{intersection-observer-a0b1a83f.js → intersection-observer-46ae308d.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 +7 -7
- 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-beb5d518.d.ts → tslib.es6-911daf6f.d.ts} +8 -4
- package/{cssm/tslib.es6-f8106a15.js → tslib.es6-911daf6f.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
package/cssm/utils.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings";
|
|
3
3
|
declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
|
|
4
|
-
declare const isOptionShape: (item:
|
|
4
|
+
declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
|
|
5
5
|
declare const joinOptions: ({ selected, selectedMultiple, }: {
|
|
6
6
|
selected?: OptionShape | undefined;
|
|
7
7
|
selectedMultiple?: OptionShape[] | undefined;
|
|
File without changes
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as __assign, b as
|
|
1
|
+
import { a as __assign, b as __spreadArray } from './tslib.es6-c4534f67.js';
|
|
2
2
|
import React, { forwardRef, useRef, useMemo, useCallback, useEffect } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
|
-
import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
|
|
5
|
-
import { processOptions } from './utils.js';
|
|
6
4
|
import mergeRefs from 'react-merge-refs';
|
|
7
5
|
import { ResizeObserver } from '@juggle/resize-observer';
|
|
8
|
-
import { Popover } from '@alfalab/core-components-popover/esm';
|
|
9
6
|
import { useMultipleSelection, useCombobox } from 'downshift';
|
|
7
|
+
import { Popover } from '@alfalab/core-components-popover/esm';
|
|
8
|
+
import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
|
|
9
|
+
import { processOptions } from './utils.js';
|
|
10
10
|
import { NativeSelect } from './components/native-select/Component.js';
|
|
11
11
|
|
|
12
12
|
var getDataTestId = function (dataTestId, element) {
|
|
@@ -14,7 +14,7 @@ var getDataTestId = function (dataTestId, element) {
|
|
|
14
14
|
return dataTestId ? "" + dataTestId + elementPart : undefined;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
var styles = {"component":"
|
|
17
|
+
var styles = {"component":"select__component_wekqh","popoverInner":"select__popoverInner_wekqh","optionsList":"select__optionsList_wekqh","nativeSelect":"select__nativeSelect_wekqh","block":"select__block_wekqh"};
|
|
18
18
|
require('./components/base-select/index.css')
|
|
19
19
|
|
|
20
20
|
var BaseSelect = forwardRef(function (_a, ref) {
|
|
@@ -25,10 +25,7 @@ var BaseSelect = forwardRef(function (_a, ref) {
|
|
|
25
25
|
var listRef = useRef(null);
|
|
26
26
|
var initiatorRef = useRef(null);
|
|
27
27
|
var itemToString = function (option) { return (option ? option.key : ''); };
|
|
28
|
-
var _z = useMemo(function () { return processOptions(options, selected); }, [
|
|
29
|
-
options,
|
|
30
|
-
selected,
|
|
31
|
-
]), flatOptions = _z.flatOptions, selectedOptions = _z.selectedOptions;
|
|
28
|
+
var _z = useMemo(function () { return processOptions(options, selected); }, [options, selected]), flatOptions = _z.flatOptions, selectedOptions = _z.selectedOptions;
|
|
32
29
|
var useMultipleSelectionProps = {
|
|
33
30
|
itemToString: itemToString,
|
|
34
31
|
onSelectedItemsChange: function (changes) {
|
|
@@ -155,7 +152,7 @@ var BaseSelect = forwardRef(function (_a, ref) {
|
|
|
155
152
|
}
|
|
156
153
|
};
|
|
157
154
|
var handleNativeSelectChange = useCallback(function (event) {
|
|
158
|
-
setSelectedItems(
|
|
155
|
+
setSelectedItems(__spreadArray([], event.target.options, true).reduce(function (acc, option, index) {
|
|
159
156
|
return option.selected ? acc.concat(flatOptions[index]) : acc;
|
|
160
157
|
}, []));
|
|
161
158
|
}, [flatOptions, setSelectedItems]);
|
|
@@ -164,9 +161,7 @@ var BaseSelect = forwardRef(function (_a, ref) {
|
|
|
164
161
|
item: option,
|
|
165
162
|
disabled: option.disabled,
|
|
166
163
|
onMouseDown: function (event) { return event.preventDefault(); },
|
|
167
|
-
}), multiple: multiple,
|
|
168
|
-
index: index,
|
|
169
|
-
option: option, size: optionsSize, disabled: option.disabled, highlighted: index === highlightedIndex, selected: selectedItems.includes(option), dataTestId: getDataTestId(dataTestId, 'option') })); }, [
|
|
164
|
+
}), multiple: multiple, index: index, option: option, size: optionsSize, disabled: option.disabled, highlighted: index === highlightedIndex, selected: selectedItems.includes(option), dataTestId: getDataTestId(dataTestId, 'option') })); }, [
|
|
170
165
|
dataTestId,
|
|
171
166
|
getItemProps,
|
|
172
167
|
highlightedIndex,
|
|
@@ -21,7 +21,7 @@ type AdditionalMobileProps = {
|
|
|
21
21
|
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
22
22
|
};
|
|
23
23
|
type SelectMobileProps = Omit<BaseSelectProps, "OptionsList" | "Checkmark" | "onScroll"> & AdditionalMobileProps;
|
|
24
|
-
declare const SelectMobile: React.ForwardRefExoticComponent<
|
|
24
|
+
declare const SelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "OptionsList" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<unknown>>;
|
|
25
25
|
type SelectMobileProps$0 = Omit<BaseSelectProps, "OptionsList" | "Checkmark" | "onScroll"> & {
|
|
26
26
|
/**
|
|
27
27
|
* Футер
|
|
@@ -42,8 +42,8 @@ type SelectMobileProps$0 = Omit<BaseSelectProps, "OptionsList" | "Checkmark" | "
|
|
|
42
42
|
*/
|
|
43
43
|
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
44
44
|
};
|
|
45
|
-
declare const BaseSelectMobile: React.ForwardRefExoticComponent<
|
|
46
|
-
footer?:
|
|
45
|
+
declare const BaseSelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "OptionsList" | "Checkmark"> & {
|
|
46
|
+
footer?: ReactNode;
|
|
47
47
|
swipeable?: boolean | undefined;
|
|
48
48
|
isBottomSheet?: boolean | undefined;
|
|
49
49
|
bottomSheetProps?: Partial<BottomSheetProps> | undefined;
|
|
@@ -103,12 +103,12 @@ declare const ModalMobile: React.ForwardRefExoticComponent<BaseModalProps & {
|
|
|
103
103
|
Content: React.FC<ContentProps>;
|
|
104
104
|
Header: React.FC<import("./Component.mobile-3fe0d3e6").HeaderMobileProps>;
|
|
105
105
|
Footer: React.FC<FooterProps>;
|
|
106
|
-
Closer: React.FC<import("./Component-
|
|
106
|
+
Closer: React.FC<import("./Component-db573794").CloserProps>;
|
|
107
107
|
};
|
|
108
108
|
type ContentMobileProps = ContentProps;
|
|
109
109
|
declare const ContentMobile: FC<ContentMobileProps>;
|
|
110
110
|
type FooterMobileProps = FooterProps;
|
|
111
111
|
declare const FooterMobile: FC<FooterMobileProps>;
|
|
112
112
|
type SelectModalMobileProps = Omit<BaseSelectProps, 'OptionsList' | 'Checkmark' | 'onScroll'>;
|
|
113
|
-
declare const SelectModalMobile: React.ForwardRefExoticComponent<
|
|
113
|
+
declare const SelectModalMobile: React.ForwardRefExoticComponent<SelectModalMobileProps & React.RefAttributes<unknown>>;
|
|
114
114
|
export { AdditionalMobileProps, SelectMobileProps, SelectMobile, BaseSelectMobile, OptionsListWithApply, ModalMobileProps, ModalMobile, ContentMobileProps, ContentMobile, FooterMobileProps, FooterMobile, SelectModalMobileProps, SelectModalMobile };
|
|
@@ -1,38 +1,35 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign, b as
|
|
1
|
+
import { _ as __rest, a as __assign, b as __spreadArray } from './tslib.es6-c4534f67.js';
|
|
2
2
|
import React, { useMemo, useState, useRef, useCallback, useEffect, forwardRef } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
|
-
import '@alfalab/hooks';
|
|
5
|
-
import '@alfalab/core-components-form-control/esm';
|
|
6
|
-
import { processOptions } from './utils.js';
|
|
7
|
-
import { Field } from './components/field/Component.js';
|
|
8
4
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
9
5
|
import { Arrow } from './components/arrow/Component.js';
|
|
10
6
|
import mergeRefs from 'react-merge-refs';
|
|
11
|
-
import '
|
|
7
|
+
import { useMultipleSelection, useCombobox } from 'downshift';
|
|
8
|
+
import '@alfalab/hooks';
|
|
9
|
+
import { g as getDataTestId } from './Component-3cfcec1a.js';
|
|
10
|
+
import { processOptions } from './utils.js';
|
|
11
|
+
import '@alfalab/core-components-form-control/esm';
|
|
12
|
+
import { Field } from './components/field/Component.js';
|
|
12
13
|
import { Optgroup } from './components/optgroup/Component.js';
|
|
13
|
-
import { OptionsList } from './components/options-list/Component.js';
|
|
14
14
|
import '@alfalab/core-components-checkbox/esm';
|
|
15
15
|
import { Option } from './components/option/Component.js';
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
16
|
+
import '@alfalab/core-components-scrollbar/esm';
|
|
17
|
+
import { OptionsList } from './components/options-list/Component.js';
|
|
18
18
|
import './Component.js';
|
|
19
19
|
import { BottomSheet } from '@alfalab/core-components-bottom-sheet/esm';
|
|
20
20
|
import { ModalMobile } from '@alfalab/core-components-modal/esm/mobile';
|
|
21
21
|
import { Button } from '@alfalab/core-components-button/esm';
|
|
22
|
-
import { OptionsList as OptionsList$1 } from './components/base-select-mobile/options-list/Component.js';
|
|
23
22
|
import { Checkmark } from './components/base-select-mobile/checkmark/Component.js';
|
|
23
|
+
import { OptionsList as OptionsList$1 } from './components/base-select-mobile/options-list/Component.js';
|
|
24
24
|
import 'react-virtual';
|
|
25
25
|
import '@alfalab/core-components-skeleton/esm';
|
|
26
|
-
import './intersection-observer-
|
|
26
|
+
import './intersection-observer-46ae308d.js';
|
|
27
27
|
|
|
28
28
|
var SELECT_ALL_KEY = 'select_all';
|
|
29
29
|
var selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
|
|
30
30
|
function useSelectWithApply(_a) {
|
|
31
31
|
var options = _a.options, selected = _a.selected, _b = _a.onChange, onChange = _b === void 0 ? function () { return null; } : _b, OptionsList = _a.OptionsList, _c = _a.showClear, showClear = _c === void 0 ? true : _c, _d = _a.showSelectAll, showSelectAll = _d === void 0 ? false : _d;
|
|
32
|
-
var _e = useMemo(function () { return processOptions(options, selected); }, [
|
|
33
|
-
options,
|
|
34
|
-
selected,
|
|
35
|
-
]), flatOptions = _e.flatOptions, selectedOptions = _e.selectedOptions;
|
|
32
|
+
var _e = useMemo(function () { return processOptions(options, selected); }, [options, selected]), flatOptions = _e.flatOptions, selectedOptions = _e.selectedOptions;
|
|
36
33
|
var _f = useState(selectedOptions), selectedDraft = _f[0], setSelectedDraft = _f[1];
|
|
37
34
|
var selectedOptionsRef = useRef(selectedOptions);
|
|
38
35
|
var handleApply = useCallback(function () {
|
|
@@ -74,7 +71,7 @@ function useSelectWithApply(_a) {
|
|
|
74
71
|
setSelectedDraft(selectedOptions);
|
|
75
72
|
selectedOptionsRef.current = selectedOptions;
|
|
76
73
|
}, [selectedOptions]);
|
|
77
|
-
var memoizedOptions = useMemo(function () { return (showSelectAll ?
|
|
74
|
+
var memoizedOptions = useMemo(function () { return (showSelectAll ? __spreadArray([selectAllOption], options, true) : options); }, [options, showSelectAll]);
|
|
78
75
|
return {
|
|
79
76
|
OptionsList: OptionsListWithApply,
|
|
80
77
|
optionsListProps: {
|
|
@@ -93,7 +90,7 @@ function useSelectWithApply(_a) {
|
|
|
93
90
|
};
|
|
94
91
|
}
|
|
95
92
|
|
|
96
|
-
var styles = {"footer":"
|
|
93
|
+
var styles = {"footer":"select__footer_1yudg","withBorder":"select__withBorder_1yudg"};
|
|
97
94
|
require('./presets/useSelectWithApply/options-list-with-apply/index.css')
|
|
98
95
|
|
|
99
96
|
var OptionsListWithApply = forwardRef(function (_a, ref) {
|
|
@@ -139,7 +136,7 @@ var OptionsListWithApply = forwardRef(function (_a, ref) {
|
|
|
139
136
|
showClear && (React.createElement(Button, { size: 'xxs', view: 'secondary', onClick: handleClear }, "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C"))) })));
|
|
140
137
|
});
|
|
141
138
|
|
|
142
|
-
var styles$1 = {"component":"
|
|
139
|
+
var styles$1 = {"component":"select__component_16dcc","popoverInner":"select__popoverInner_16dcc","sheet":"select__sheet_16dcc","sheetContent":"select__sheetContent_16dcc","sheetContainer":"select__sheetContainer_16dcc","block":"select__block_16dcc","option":"select__option_16dcc","optionGroup":"select__optionGroup_16dcc"};
|
|
143
140
|
require('./components/base-select-mobile/index.css')
|
|
144
141
|
|
|
145
142
|
var BaseSelectMobile = forwardRef(function (_a, ref) {
|
|
@@ -150,10 +147,7 @@ var BaseSelectMobile = forwardRef(function (_a, ref) {
|
|
|
150
147
|
var listRef = useRef(null);
|
|
151
148
|
var initiatorRef = useRef(null);
|
|
152
149
|
var itemToString = function (option) { return (option ? option.key : ''); };
|
|
153
|
-
var _t = useMemo(function () { return processOptions(options, selected); }, [
|
|
154
|
-
options,
|
|
155
|
-
selected,
|
|
156
|
-
]), flatOptions = _t.flatOptions, selectedOptions = _t.selectedOptions;
|
|
150
|
+
var _t = useMemo(function () { return processOptions(options, selected); }, [options, selected]), flatOptions = _t.flatOptions, selectedOptions = _t.selectedOptions;
|
|
157
151
|
var selectedOptionsRef = useRef(selectedOptions);
|
|
158
152
|
var _u = useState(selectedOptions), selectedDraft = _u[0], setSelectedDraft = _u[1];
|
|
159
153
|
var useMultipleSelectionProps = {
|
|
@@ -285,23 +279,14 @@ var BaseSelectMobile = forwardRef(function (_a, ref) {
|
|
|
285
279
|
openMenu();
|
|
286
280
|
}
|
|
287
281
|
};
|
|
288
|
-
var getOptionProps =
|
|
282
|
+
var getOptionProps = function (option, index) { return (__assign(__assign({}, optionProps), { className: cn(styles$1.option, optionClassName), innerProps: getItemProps({
|
|
289
283
|
index: index,
|
|
290
284
|
item: option,
|
|
291
285
|
disabled: option.disabled,
|
|
292
286
|
onMouseDown: function (event) { return event.preventDefault(); },
|
|
293
|
-
}), multiple: multiple,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
dataTestId,
|
|
297
|
-
getItemProps,
|
|
298
|
-
highlightedIndex,
|
|
299
|
-
multiple,
|
|
300
|
-
optionClassName,
|
|
301
|
-
optionProps,
|
|
302
|
-
optionsSize,
|
|
303
|
-
selectedItems,
|
|
304
|
-
]);
|
|
287
|
+
}), multiple: multiple, index: index, option: option, size: optionsSize, disabled: option.disabled, highlighted: index === highlightedIndex, selected: selectedItems.includes(option), dataTestId: getDataTestId(dataTestId, 'option'),
|
|
288
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
289
|
+
Checkmark: function () { return React.createElement(Checkmark, { selected: selectedItems.includes(option) }); } })); };
|
|
305
290
|
useEffect(function () {
|
|
306
291
|
if (defaultOpen)
|
|
307
292
|
openMenu();
|
|
@@ -312,22 +297,22 @@ var BaseSelectMobile = forwardRef(function (_a, ref) {
|
|
|
312
297
|
}
|
|
313
298
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
314
299
|
}, []);
|
|
315
|
-
var renderValue =
|
|
300
|
+
var renderValue = function () {
|
|
316
301
|
return selectedItems.map(function (option) { return (React.createElement("input", { type: 'hidden', name: name, value: option.key, key: option.key })); });
|
|
317
|
-
}
|
|
318
|
-
var handleApply =
|
|
302
|
+
};
|
|
303
|
+
var handleApply = function () {
|
|
319
304
|
setSelectedDraft(selectedItems);
|
|
320
|
-
}
|
|
321
|
-
var handleClear =
|
|
305
|
+
};
|
|
306
|
+
var handleClear = function () {
|
|
322
307
|
setSelectedDraft([]);
|
|
323
308
|
setSelectedItems([]);
|
|
324
|
-
}
|
|
325
|
-
var handleClose =
|
|
309
|
+
};
|
|
310
|
+
var handleClose = function () {
|
|
326
311
|
if (multiple) {
|
|
327
312
|
setSelectedItems(selectedDraft);
|
|
328
313
|
}
|
|
329
314
|
toggleMenu();
|
|
330
|
-
}
|
|
315
|
+
};
|
|
331
316
|
return (React.createElement("div", __assign({}, getComboboxProps(__assign(__assign({ ref: rootRef }, (disabled && { 'aria-disabled': true })), { className: cn(styles$1.component, (_b = {}, _b[styles$1.block] = block, _b), className) })), { onKeyDown: disabled ? undefined : handleFieldKeyDown, tabIndex: -1, "data-test-id": getDataTestId(dataTestId) }),
|
|
332
317
|
React.createElement(Field$1, __assign({ selectedMultiple: selectedDraft, selected: selectedItems[0], setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, multiple: multiple, open: open, disabled: disabled, size: size, placeholder: placeholder, label: label && React.createElement("span", __assign({}, getLabelProps()), label), labelView: labelView, Arrow: Arrow$1 && React.createElement(Arrow$1, { open: open }), error: error, hint: hint, valueRenderer: valueRenderer, className: fieldClassName, innerProps: {
|
|
333
318
|
onFocus: disabled ? undefined : handleFieldFocus,
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, FC } from "react";
|
|
4
|
+
import { ButtonProps } from "@alfalab/core-components-button";
|
|
5
|
+
type IconButtonProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Компонент иконки
|
|
8
|
+
*/
|
|
9
|
+
icon: ElementType<{
|
|
10
|
+
className?: string;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Тип кнопки
|
|
14
|
+
*/
|
|
15
|
+
view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
|
|
16
|
+
/**
|
|
17
|
+
* Размер компонента
|
|
18
|
+
*/
|
|
19
|
+
size?: "xxs" | "xs" | "s";
|
|
20
|
+
/**
|
|
21
|
+
* Дополнительный класс
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
26
|
+
*/
|
|
27
|
+
dataTestId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Набор цветов для компонента
|
|
30
|
+
*/
|
|
31
|
+
colors?: "default" | "inverted";
|
|
32
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
|
|
33
|
+
declare const IconButton: React.ForwardRefExoticComponent<{
|
|
34
|
+
icon: ElementType<{
|
|
35
|
+
className?: string;
|
|
36
|
+
}>;
|
|
37
|
+
view?: "primary" | "secondary" | "tertiary" | "transparent" | "negative" | undefined;
|
|
38
|
+
size?: "s" | "xs" | "xxs" | undefined;
|
|
39
|
+
className?: string | undefined;
|
|
40
|
+
dataTestId?: string | undefined;
|
|
41
|
+
colors?: "default" | "inverted" | undefined;
|
|
42
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
|
|
43
|
+
type CloserProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
44
|
+
/**
|
|
45
|
+
* Дополнительный класс
|
|
46
|
+
*/
|
|
47
|
+
className?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Позиция крестика
|
|
50
|
+
*/
|
|
51
|
+
align?: 'left' | 'right';
|
|
52
|
+
/**
|
|
53
|
+
* Размер кнопки
|
|
54
|
+
*/
|
|
55
|
+
size?: IconButtonProps['size'];
|
|
56
|
+
/**
|
|
57
|
+
* Фиксирует крестик
|
|
58
|
+
*/
|
|
59
|
+
sticky?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Иконка
|
|
62
|
+
*/
|
|
63
|
+
icon?: ElementType;
|
|
64
|
+
/**
|
|
65
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
66
|
+
*/
|
|
67
|
+
dataTestId?: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated Компонент только для внутреннего использования. Используйте <Header />
|
|
71
|
+
*/
|
|
72
|
+
declare const Closer: FC<CloserProps>;
|
|
73
|
+
export { IconButtonProps, IconButton, CloserProps, Closer };
|
package/esm/Component.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
4
4
|
import { BaseSelectProps } from "./typings";
|
|
5
5
|
type FormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
6
6
|
/**
|
|
@@ -19,6 +19,10 @@ type FormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
19
19
|
* Заблокированное состояние
|
|
20
20
|
*/
|
|
21
21
|
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Cостояние только для чтения
|
|
24
|
+
*/
|
|
25
|
+
readOnly?: boolean;
|
|
22
26
|
/**
|
|
23
27
|
* Заполненное состояние
|
|
24
28
|
*/
|
|
@@ -86,15 +90,18 @@ type SelectProps = Omit<BaseSelectProps, 'fieldProps'> & {
|
|
|
86
90
|
*/
|
|
87
91
|
fieldProps?: FormControlProps & Record<string, unknown>;
|
|
88
92
|
};
|
|
89
|
-
declare const Select: React.ForwardRefExoticComponent<
|
|
93
|
+
declare const Select: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "fieldProps"> & {
|
|
90
94
|
/**
|
|
91
95
|
* Пропсы, которые будут прокинуты в компонент поля
|
|
92
96
|
*/
|
|
93
97
|
fieldProps?: (React.HTMLAttributes<HTMLDivElement> & {
|
|
94
98
|
block?: boolean | undefined;
|
|
95
99
|
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
96
|
-
colors?: "default" | "inverted" | undefined;
|
|
100
|
+
colors?: "default" | "inverted" | undefined; /**
|
|
101
|
+
* Пропсы, которые будут прокинуты в компонент поля
|
|
102
|
+
*/
|
|
97
103
|
disabled?: boolean | undefined;
|
|
104
|
+
readOnly?: boolean | undefined;
|
|
98
105
|
filled?: boolean | undefined;
|
|
99
106
|
focused?: boolean | undefined;
|
|
100
107
|
error?: React.ReactNode;
|
package/esm/Component.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign } from './tslib.es6-
|
|
1
|
+
import { _ as __rest, a as __assign } from './tslib.es6-c4534f67.js';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
-
import '@alfalab/hooks';
|
|
5
|
-
import '@alfalab/core-components-form-control/esm';
|
|
6
|
-
import './utils.js';
|
|
7
|
-
import { Field } from './components/field/Component.js';
|
|
8
4
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
9
5
|
import { Arrow } from './components/arrow/Component.js';
|
|
10
6
|
import 'react-merge-refs';
|
|
11
|
-
import '@
|
|
7
|
+
import '@juggle/resize-observer';
|
|
8
|
+
import 'downshift';
|
|
9
|
+
import '@alfalab/core-components-popover/esm';
|
|
10
|
+
import '@alfalab/hooks';
|
|
11
|
+
import { B as BaseSelect } from './Component-3cfcec1a.js';
|
|
12
|
+
import './utils.js';
|
|
13
|
+
import './components/native-select/Component.js';
|
|
14
|
+
import '@alfalab/core-components-form-control/esm';
|
|
15
|
+
import { Field } from './components/field/Component.js';
|
|
12
16
|
import { Optgroup } from './components/optgroup/Component.js';
|
|
13
|
-
import { OptionsList } from './components/options-list/Component.js';
|
|
14
17
|
import '@alfalab/core-components-checkbox/esm';
|
|
15
18
|
import './components/checkmark/Component.js';
|
|
16
19
|
import { Option } from './components/option/Component.js';
|
|
17
|
-
import '@
|
|
18
|
-
import '
|
|
19
|
-
import 'downshift';
|
|
20
|
-
import './components/native-select/Component.js';
|
|
21
|
-
import { B as BaseSelect } from './Component-d190d712.js';
|
|
20
|
+
import '@alfalab/core-components-scrollbar/esm';
|
|
21
|
+
import { OptionsList } from './components/options-list/Component.js';
|
|
22
22
|
|
|
23
23
|
var Select = forwardRef(function (_a, ref) {
|
|
24
24
|
var _b = _a.Arrow, Arrow$1 = _b === void 0 ? Arrow : _b, _c = _a.Field, Field$1 = _c === void 0 ? Field : _c, _d = _a.OptionsList, OptionsList$1 = _d === void 0 ? OptionsList : _d, _e = _a.Optgroup, Optgroup$1 = _e === void 0 ? Optgroup : _e, _f = _a.Option, Option$1 = _f === void 0 ? Option : _f, restProps = __rest(_a, ["Arrow", "Field", "OptionsList", "Optgroup", "Option"]);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ChevronDownMIcon } from '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
4
4
|
|
|
5
|
-
var styles = {"arrow":"
|
|
5
|
+
var styles = {"arrow":"select__arrow_1cyhq","open":"select__open_1cyhq"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Arrow = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1o5t4 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-graphic-primary: #0b1f35;
|
|
4
4
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.select__arrow_1cyhq {
|
|
28
28
|
display: block;
|
|
29
29
|
width: 24px;
|
|
30
30
|
height: 24px;
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
|
|
33
33
|
transition: transform 0.15s ease-in-out, opacity 0.2s ease;
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.select__open_1cyhq {
|
|
36
36
|
transform: var(--arrow-transform);
|
|
37
37
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import '../../tslib.es6-
|
|
1
|
+
import '../../tslib.es6-c4534f67.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
-
import '@alfalab/hooks';
|
|
5
|
-
import '../../utils.js';
|
|
6
4
|
import 'react-merge-refs';
|
|
7
5
|
import '@juggle/resize-observer';
|
|
8
|
-
import '@alfalab/core-components-popover/esm';
|
|
9
6
|
import 'downshift';
|
|
7
|
+
import '@alfalab/core-components-popover/esm';
|
|
8
|
+
import '@alfalab/hooks';
|
|
9
|
+
export { B as BaseSelect } from '../../Component-3cfcec1a.js';
|
|
10
|
+
import '../../utils.js';
|
|
10
11
|
import '../native-select/Component.js';
|
|
11
|
-
export { B as BaseSelect } from '../../Component-d190d712.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vk559 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -11,13 +11,19 @@
|
|
|
11
11
|
|
|
12
12
|
/* Hard up */
|
|
13
13
|
}
|
|
14
|
+
:root {
|
|
15
|
+
--gap-2xs: 4px;
|
|
16
|
+
}
|
|
17
|
+
:root {
|
|
18
|
+
--border-radius-m: 8px;
|
|
19
|
+
}
|
|
14
20
|
:root {
|
|
15
21
|
|
|
16
22
|
/* options list */
|
|
17
23
|
|
|
18
|
-
--select-options-list-border-radius:
|
|
24
|
+
--select-options-list-border-radius: var(--border-radius-m);
|
|
19
25
|
--select-options-list-box-shadow: var(--shadow-m);
|
|
20
|
-
--select-options-list-offset:
|
|
26
|
+
--select-options-list-offset: var(--gap-2xs);
|
|
21
27
|
--select-options-list-top-padding: 0;
|
|
22
28
|
--select-options-list-bottom-padding: 0;
|
|
23
29
|
|
|
@@ -28,12 +34,12 @@
|
|
|
28
34
|
|
|
29
35
|
/* optgroup */
|
|
30
36
|
}
|
|
31
|
-
.
|
|
37
|
+
.select__component_wekqh {
|
|
32
38
|
width: max-content;
|
|
33
39
|
position: relative;
|
|
34
40
|
outline: 0;
|
|
35
41
|
}
|
|
36
|
-
.
|
|
42
|
+
.select__popoverInner_wekqh {
|
|
37
43
|
padding-top: var(--select-options-list-offset);
|
|
38
44
|
padding-bottom: var(--select-options-list-offset);
|
|
39
45
|
box-shadow: none;
|
|
@@ -42,7 +48,7 @@
|
|
|
42
48
|
border-radius: 0;
|
|
43
49
|
position: relative;
|
|
44
50
|
}
|
|
45
|
-
.
|
|
51
|
+
.select__optionsList_wekqh {
|
|
46
52
|
padding-top: var(--select-options-list-top-padding);
|
|
47
53
|
padding-bottom: var(--select-options-list-bottom-padding);
|
|
48
54
|
box-shadow: var(--select-options-list-box-shadow);
|
|
@@ -51,7 +57,7 @@
|
|
|
51
57
|
overflow: hidden;
|
|
52
58
|
will-change: transform;
|
|
53
59
|
}
|
|
54
|
-
.
|
|
60
|
+
.select__nativeSelect_wekqh {
|
|
55
61
|
opacity: 0;
|
|
56
62
|
overflow: hidden;
|
|
57
63
|
position: absolute;
|
|
@@ -65,12 +71,12 @@
|
|
|
65
71
|
cursor: pointer;
|
|
66
72
|
z-index: 1;
|
|
67
73
|
}
|
|
68
|
-
.
|
|
74
|
+
.select__block_wekqh {
|
|
69
75
|
width: 100%;
|
|
70
76
|
}
|
|
71
77
|
/* width: max-content; fix for IE */
|
|
72
78
|
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
73
|
-
.
|
|
79
|
+
.select__component_wekqh {
|
|
74
80
|
float: left;
|
|
75
81
|
clear: left;
|
|
76
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../Component-
|
|
1
|
+
export * from "../../Component-3cfcec1a";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import '../../tslib.es6-
|
|
1
|
+
import '../../tslib.es6-c4534f67.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
-
import '@alfalab/hooks';
|
|
5
|
-
import '../../utils.js';
|
|
6
4
|
import 'react-merge-refs';
|
|
7
5
|
import '@juggle/resize-observer';
|
|
8
|
-
import '@alfalab/core-components-popover/esm';
|
|
9
6
|
import 'downshift';
|
|
7
|
+
import '@alfalab/core-components-popover/esm';
|
|
8
|
+
import '@alfalab/hooks';
|
|
9
|
+
export { B as BaseSelect } from '../../Component-3cfcec1a.js';
|
|
10
|
+
import '../../utils.js';
|
|
10
11
|
import '../native-select/Component.js';
|
|
11
|
-
export { B as BaseSelect } from '../../Component-d190d712.js';
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import '../../tslib.es6-
|
|
1
|
+
import '../../tslib.es6-c4534f67.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
-
import '@alfalab/hooks';
|
|
5
|
-
import '@alfalab/core-components-form-control/esm';
|
|
6
|
-
import '../../utils.js';
|
|
7
|
-
import '../field/Component.js';
|
|
8
4
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
9
5
|
import '../arrow/Component.js';
|
|
10
6
|
import 'react-merge-refs';
|
|
11
|
-
import '@
|
|
7
|
+
import '@juggle/resize-observer';
|
|
8
|
+
import 'downshift';
|
|
9
|
+
import '@alfalab/core-components-popover/esm';
|
|
10
|
+
import '@alfalab/hooks';
|
|
11
|
+
import '../../Component-3cfcec1a.js';
|
|
12
|
+
import '../../utils.js';
|
|
13
|
+
import '../native-select/Component.js';
|
|
14
|
+
import '@alfalab/core-components-form-control/esm';
|
|
15
|
+
import '../field/Component.js';
|
|
12
16
|
import '../optgroup/Component.js';
|
|
13
|
-
import '../options-list/Component.js';
|
|
14
17
|
import '@alfalab/core-components-checkbox/esm';
|
|
15
18
|
import '../checkmark/Component.js';
|
|
16
19
|
import '../option/Component.js';
|
|
17
|
-
import '@
|
|
18
|
-
import '
|
|
19
|
-
import 'downshift';
|
|
20
|
-
import '../native-select/Component.js';
|
|
21
|
-
import '../../Component-d190d712.js';
|
|
20
|
+
import '@alfalab/core-components-scrollbar/esm';
|
|
21
|
+
import '../options-list/Component.js';
|
|
22
22
|
import '../../Component.js';
|
|
23
23
|
import '@alfalab/core-components-bottom-sheet/esm';
|
|
24
24
|
import '@alfalab/core-components-modal/esm/mobile';
|
|
25
25
|
import '@alfalab/core-components-button/esm';
|
|
26
|
+
export { B as BaseSelectMobile } from '../../Component-889ce29b.js';
|
|
27
|
+
import './checkmark/Component.js';
|
|
26
28
|
import '@alfalab/core-components-base-modal/esm';
|
|
27
29
|
import './options-list/Component.js';
|
|
28
|
-
import './checkmark/Component.js';
|
|
29
|
-
export { B as BaseSelectMobile } from '../../Component-b4fcaaca.js';
|
|
30
30
|
import 'react-virtual';
|
|
31
31
|
import '@alfalab/core-components-skeleton/esm';
|
|
32
|
-
import '../../intersection-observer-
|
|
32
|
+
import '../../intersection-observer-46ae308d.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
|
|
4
|
-
var styles = {"checkmark":"
|
|
4
|
+
var styles = {"checkmark":"select__checkmark_1nwbh","selected":"select__selected_1nwbh"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
var Checkmark = function (_a) {
|