@alfalab/core-components-select 14.2.0 → 14.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{Component-3b7dfcdb.d.ts → Component-3eb05f44.d.ts} +23 -1
- package/{Component-3b7dfcdb.js → Component-3eb05f44.js} +27 -22
- package/Component.js +1 -1
- package/Component.responsive.js +4 -3
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +4 -4
- package/components/base-option/Component.js +2 -2
- package/components/base-option/index.css +13 -13
- package/components/base-select/Component.js +2 -2
- package/components/base-select/index.css +8 -8
- package/components/base-select/index.js +1 -1
- package/components/base-select-mobile/Component.js +2 -2
- package/components/base-select-mobile/footer/Component.js +1 -1
- package/components/base-select-mobile/footer/index.css +5 -5
- package/components/base-select-mobile/index.css +10 -10
- package/components/base-select-mobile/index.js +1 -1
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +10 -10
- package/components/checkmark-mobile/Component.js +1 -1
- package/components/checkmark-mobile/index.css +6 -6
- package/components/field/Component.js +1 -1
- package/components/field/index.css +9 -9
- package/components/index.js +5 -4
- 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/options-list/Component.js +1 -1
- package/components/options-list/index.css +9 -9
- package/components/select-mobile/Component.js +4 -3
- package/components/select-mobile/index.d.ts +1 -1
- package/components/select-mobile/index.js +4 -3
- package/components/select-modal-mobile/Component.js +4 -3
- package/components/select-modal-mobile/index.d.ts +1 -1
- package/components/select-modal-mobile/index.js +4 -3
- package/components/virtual-options-list/Component.js +1 -1
- package/components/virtual-options-list/index.css +15 -15
- package/{modern/Component-8dc39be2.d.ts → cssm/Component-4727d474.d.ts} +23 -1
- package/cssm/{Component-75d13e23.js → Component-4727d474.js} +26 -21
- package/cssm/Component.responsive.js +3 -1
- package/cssm/components/base-option/Component.js +1 -1
- package/cssm/components/index.js +4 -2
- package/cssm/components/option/Component.js +1 -1
- package/cssm/components/select-mobile/Component.js +3 -1
- package/cssm/components/select-mobile/index.d.ts +1 -1
- package/cssm/components/select-mobile/index.js +3 -1
- package/cssm/components/select-modal-mobile/Component.js +3 -1
- package/cssm/components/select-modal-mobile/index.d.ts +1 -1
- package/cssm/components/select-modal-mobile/index.js +3 -1
- package/{esm/hook-4b555174.d.ts → cssm/hook-b4e70cb0.d.ts} +15 -4
- package/cssm/index.js +4 -2
- package/cssm/mobile.js +3 -1
- package/cssm/presets/index.d.ts +1 -1
- package/cssm/presets/index.js +3 -1
- package/cssm/presets/useSelectWithApply/hook.js +3 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +0 -9
- package/cssm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +11 -0
- package/cssm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +23 -0
- package/cssm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +22 -0
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +3 -1
- package/cssm/responsive.js +3 -1
- package/{cssm/Component-75d13e23.d.ts → esm/Component-b436aedf.d.ts} +23 -1
- package/esm/{Component-06bb5812.js → Component-b436aedf.js} +27 -22
- package/esm/Component.js +1 -1
- package/esm/Component.responsive.js +4 -3
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/base-checkmark/Component.js +1 -1
- package/esm/components/base-checkmark/index.css +4 -4
- package/esm/components/base-option/Component.js +2 -2
- package/esm/components/base-option/index.css +13 -13
- package/esm/components/base-select/Component.js +2 -2
- package/esm/components/base-select/index.css +8 -8
- package/esm/components/base-select/index.js +1 -1
- package/esm/components/base-select-mobile/Component.js +2 -2
- package/esm/components/base-select-mobile/footer/Component.js +1 -1
- package/esm/components/base-select-mobile/footer/index.css +5 -5
- package/esm/components/base-select-mobile/index.css +10 -10
- package/esm/components/base-select-mobile/index.js +1 -1
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +10 -10
- package/esm/components/checkmark-mobile/Component.js +1 -1
- package/esm/components/checkmark-mobile/index.css +6 -6
- package/esm/components/field/Component.js +1 -1
- package/esm/components/field/index.css +9 -9
- package/esm/components/index.js +5 -4
- 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/options-list/Component.js +1 -1
- package/esm/components/options-list/index.css +9 -9
- package/esm/components/select-mobile/Component.js +4 -3
- package/esm/components/select-mobile/index.d.ts +1 -1
- package/esm/components/select-mobile/index.js +4 -3
- package/esm/components/select-modal-mobile/Component.js +4 -3
- package/esm/components/select-modal-mobile/index.d.ts +1 -1
- package/esm/components/select-modal-mobile/index.js +4 -3
- package/esm/components/virtual-options-list/Component.js +1 -1
- package/esm/components/virtual-options-list/index.css +15 -15
- package/{cssm/hook-4b555174.d.ts → esm/hook-b4e70cb0.d.ts} +15 -4
- package/esm/index-3885b0d7.d.ts +1 -1
- package/esm/index.js +5 -4
- package/esm/mobile.js +4 -3
- package/esm/presets/index.d.ts +1 -1
- package/esm/presets/index.js +4 -3
- package/esm/presets/useLazyLoading/hook.js +2 -2
- package/esm/presets/useLazyLoading/index.css +2 -2
- package/esm/presets/useSelectWithApply/hook.js +4 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +4 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -12
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +11 -0
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +15 -0
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +23 -0
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +4 -3
- package/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/responsive.js +4 -3
- package/{hook-4b555174.d.ts → hook-b4e70cb0.d.ts} +15 -4
- package/index-3885b0d7.d.ts +1 -1
- package/index.js +5 -4
- package/mobile.js +4 -3
- package/{esm/Component-06bb5812.d.ts → modern/Component-c22703bb.d.ts} +23 -1
- package/modern/{Component-8dc39be2.js → Component-c22703bb.js} +31 -17
- package/modern/Component.js +1 -1
- package/modern/Component.responsive.js +4 -3
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/base-checkmark/Component.js +1 -1
- package/modern/components/base-checkmark/index.css +4 -4
- package/modern/components/base-option/Component.js +2 -2
- package/modern/components/base-option/index.css +13 -13
- package/modern/components/base-select/Component.js +2 -2
- package/modern/components/base-select/index.css +8 -8
- package/modern/components/base-select/index.js +1 -1
- package/modern/components/base-select-mobile/Component.js +2 -2
- package/modern/components/base-select-mobile/footer/Component.js +1 -1
- package/modern/components/base-select-mobile/footer/index.css +5 -5
- package/modern/components/base-select-mobile/index.css +10 -10
- package/modern/components/base-select-mobile/index.js +1 -1
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +10 -10
- package/modern/components/checkmark-mobile/Component.js +1 -1
- package/modern/components/checkmark-mobile/index.css +6 -6
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +9 -9
- package/modern/components/index.js +5 -4
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/option/Component.js +2 -2
- package/modern/components/option/index.css +20 -20
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +9 -9
- package/modern/components/select-mobile/Component.js +4 -3
- package/modern/components/select-mobile/index.d.ts +1 -1
- package/modern/components/select-mobile/index.js +4 -3
- package/modern/components/select-modal-mobile/Component.js +4 -3
- package/modern/components/select-modal-mobile/index.d.ts +1 -1
- package/modern/components/select-modal-mobile/index.js +4 -3
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/{hook-4b555174.d.ts → hook-b4e70cb0.d.ts} +15 -4
- package/modern/index-3885b0d7.d.ts +1 -1
- package/modern/index.js +5 -4
- package/modern/mobile.js +4 -3
- package/modern/presets/index.d.ts +1 -1
- package/modern/presets/index.js +4 -3
- package/modern/presets/useLazyLoading/hook.js +2 -2
- package/modern/presets/useLazyLoading/index.css +2 -2
- package/modern/presets/useSelectWithApply/hook.js +4 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +4 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -12
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +11 -0
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +11 -0
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +23 -0
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +4 -3
- package/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/responsive.js +4 -3
- package/package.json +1 -1
- package/presets/index.d.ts +1 -1
- package/presets/index.js +4 -3
- package/presets/useLazyLoading/hook.js +2 -2
- package/presets/useLazyLoading/index.css +2 -2
- package/presets/useSelectWithApply/hook.js +4 -3
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +4 -3
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -12
- package/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +11 -0
- package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +24 -0
- package/presets/useSelectWithApply/options-list-with-apply/header/index.css +23 -0
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +4 -3
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/responsive.js +4 -3
- /package/esm/{getDataTestId-8aabb6b6.d.ts → getDataTestId-416fe68c.d.ts} +0 -0
- /package/esm/{getDataTestId-8aabb6b6.js → getDataTestId-416fe68c.js} +0 -0
- /package/esm/{intersection-observer-6b92b662.d.ts → intersection-observer-71fc11ef.d.ts} +0 -0
- /package/esm/{intersection-observer-6b92b662.js → intersection-observer-71fc11ef.js} +0 -0
- /package/{getDataTestId-1bda9cae.d.ts → getDataTestId-e8d9eb23.d.ts} +0 -0
- /package/{getDataTestId-1bda9cae.js → getDataTestId-e8d9eb23.js} +0 -0
- /package/{intersection-observer-38296236.d.ts → intersection-observer-c227d471.d.ts} +0 -0
- /package/{intersection-observer-38296236.js → intersection-observer-c227d471.js} +0 -0
- /package/modern/{getDataTestId-59fdb29b.d.ts → getDataTestId-03736ddc.d.ts} +0 -0
- /package/modern/{getDataTestId-59fdb29b.js → getDataTestId-03736ddc.js} +0 -0
- /package/modern/{intersection-observer-6b92b662.d.ts → intersection-observer-71fc11ef.d.ts} +0 -0
- /package/modern/{intersection-observer-6b92b662.js → intersection-observer-71fc11ef.js} +0 -0
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { BottomSheetProps } from "@alfalab/core-components-bottom-sheet";
|
|
5
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
5
|
+
import { UseSelectWithApplyProps } from "./hook-b4e70cb0";
|
|
6
6
|
import { BaseSelectProps, OptionShape, OptionsListProps } from "./typings";
|
|
7
7
|
import { FooterProps } from "./presets/useSelectWithApply/options-list-with-apply/footer/Component";
|
|
8
|
+
import { HeaderProps } from "./presets/useSelectWithApply/options-list-with-apply/header/Component";
|
|
8
9
|
import { ModalMobile } from "./Component.mobile-b2c0420d";
|
|
9
10
|
type AdditionalMobileProps = {
|
|
10
11
|
/**
|
|
@@ -29,6 +30,14 @@ type AdditionalMobileProps = {
|
|
|
29
30
|
* Показывать пункт "Выбрать все"
|
|
30
31
|
*/
|
|
31
32
|
showSelectAll?: UseSelectWithApplyProps["showSelectAll"];
|
|
33
|
+
/**
|
|
34
|
+
* Показывать пункт "Выбрать все" в заголовке списка
|
|
35
|
+
*/
|
|
36
|
+
showHeaderWithSelectAll?: UseSelectWithApplyProps["showHeaderWithSelectAll"];
|
|
37
|
+
/**
|
|
38
|
+
* Использовать ли хук useSelectWithApply
|
|
39
|
+
*/
|
|
40
|
+
useWithApplyHook?: boolean;
|
|
32
41
|
};
|
|
33
42
|
type SelectMobileProps = Omit<BaseSelectProps, "Checkmark" | "onScroll"> & AdditionalMobileProps;
|
|
34
43
|
declare const SelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<unknown>>;
|
|
@@ -38,6 +47,9 @@ declare const OptionsListWithApply: React.ForwardRefExoticComponent<OptionsListP
|
|
|
38
47
|
selectedDraft?: OptionShape[] | undefined;
|
|
39
48
|
OptionsList?: React.FC<OptionsListProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
40
49
|
Footer?: React.FC<FooterProps> | undefined;
|
|
50
|
+
Header?: React.FC<HeaderProps> | undefined;
|
|
51
|
+
headerProps?: HeaderProps | undefined;
|
|
52
|
+
showHeaderWithSelectAll?: boolean | undefined;
|
|
41
53
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
42
54
|
type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
43
55
|
/**
|
|
@@ -60,6 +72,11 @@ type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> &
|
|
|
60
72
|
* Дополнительные пропсы футера модалки
|
|
61
73
|
*/
|
|
62
74
|
modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
|
|
75
|
+
showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
|
|
76
|
+
/**
|
|
77
|
+
* Использовать ли хук useSelectWithApply
|
|
78
|
+
*/
|
|
79
|
+
useWithApplyHook?: boolean;
|
|
63
80
|
};
|
|
64
81
|
declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
|
|
65
82
|
/**
|
|
@@ -82,5 +99,10 @@ declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<BaseSelect
|
|
|
82
99
|
* Дополнительные пропсы футера модалки
|
|
83
100
|
*/
|
|
84
101
|
modalFooterProps?: Partial<import("./Component.mobile-b2c0420d").FooterProps> | undefined;
|
|
102
|
+
showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
|
|
103
|
+
/**
|
|
104
|
+
* Использовать ли хук useSelectWithApply
|
|
105
|
+
*/
|
|
106
|
+
useWithApplyHook?: boolean | undefined;
|
|
85
107
|
} & React.RefAttributes<unknown>>;
|
|
86
108
|
export { AdditionalMobileProps, SelectMobileProps, SelectMobile, OptionsListWithApply, SelectModalMobileProps, SelectModalMobile };
|
|
@@ -6,6 +6,7 @@ require('./Component.js');
|
|
|
6
6
|
require('classnames');
|
|
7
7
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
8
8
|
require('./components/base-select/Component.js');
|
|
9
|
+
var presets_useSelectWithApply_optionsListWithApply_header_Component = require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
9
10
|
var components_arrow_Component = require('./components/arrow/Component.js');
|
|
10
11
|
var components_baseSelectMobile_Component = require('./components/base-select-mobile/Component.js');
|
|
11
12
|
var components_baseSelectMobile_footer_Component = require('./components/base-select-mobile/footer/Component.js');
|
|
@@ -22,7 +23,7 @@ require('@alfalab/core-components-checkbox');
|
|
|
22
23
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
23
24
|
require('@alfalab/icons-glyph/CheckmarkMIcon');
|
|
24
25
|
require('@alfalab/core-components-skeleton');
|
|
25
|
-
require('./intersection-observer-
|
|
26
|
+
require('./intersection-observer-c227d471.js');
|
|
26
27
|
var consts = require('./consts.js');
|
|
27
28
|
var presets_useSelectWithApply_optionsListWithApply_footer_Component = require('./presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
|
|
28
29
|
|
|
@@ -31,7 +32,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
31
32
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
32
33
|
|
|
33
34
|
var OptionsListWithApply = React.forwardRef(function (_a, ref) {
|
|
34
|
-
var toggleMenu = _a.toggleMenu, defaultGetOptionProps = _a.getOptionProps, _b = _a.showClear, showClear = _b === void 0 ? true : _b, _c = _a.selectedDraft, selectedDraft = _c === void 0 ? [] : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.OptionsList, OptionsList = _e === void 0 ? components_optionsList_Component.OptionsList : _e, _f = _a.onApply, onApply = _f === void 0 ? function () { return null; } : _f, _g = _a.onClear, onClear = _g === void 0 ? function () { return null; } : _g, _h = _a.onClose, onClose = _h === void 0 ? function () { return null; } : _h, _j = _a.visibleOptions, visibleOptions = _j === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _j, _k = _a.Footer, Footer = _k === void 0 ? presets_useSelectWithApply_optionsListWithApply_footer_Component.Footer : _k, restProps = tslib.__rest(_a, ["toggleMenu", "getOptionProps", "showClear", "selectedDraft", "flatOptions", "OptionsList", "onApply", "onClear", "onClose", "visibleOptions", "Footer"]);
|
|
35
|
+
var toggleMenu = _a.toggleMenu, defaultGetOptionProps = _a.getOptionProps, _b = _a.showClear, showClear = _b === void 0 ? true : _b, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, _c = _a.selectedDraft, selectedDraft = _c === void 0 ? [] : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.OptionsList, OptionsList = _e === void 0 ? components_optionsList_Component.OptionsList : _e, _f = _a.onApply, onApply = _f === void 0 ? function () { return null; } : _f, _g = _a.onClear, onClear = _g === void 0 ? function () { return null; } : _g, _h = _a.onClose, onClose = _h === void 0 ? function () { return null; } : _h, _j = _a.visibleOptions, visibleOptions = _j === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _j, _k = _a.Footer, Footer = _k === void 0 ? presets_useSelectWithApply_optionsListWithApply_footer_Component.Footer : _k, _l = _a.Header, Header = _l === void 0 ? presets_useSelectWithApply_optionsListWithApply_header_Component.Header : _l, headerProps = _a.headerProps, restProps = tslib.__rest(_a, ["toggleMenu", "getOptionProps", "showClear", "showHeaderWithSelectAll", "selectedDraft", "flatOptions", "OptionsList", "onApply", "onClear", "onClose", "visibleOptions", "Footer", "Header", "headerProps"]);
|
|
35
36
|
var getOptionProps = React.useCallback(function (option, index) {
|
|
36
37
|
var optionProps = defaultGetOptionProps(option, index);
|
|
37
38
|
var selected = option.key === SELECT_ALL_KEY
|
|
@@ -57,32 +58,35 @@ var OptionsListWithApply = React.forwardRef(function (_a, ref) {
|
|
|
57
58
|
};
|
|
58
59
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
59
60
|
}, []);
|
|
60
|
-
return (React__default.default.createElement(OptionsList, tslib.__assign({}, restProps, { ref: ref, visibleOptions: visibleOptions, toggleMenu: toggleMenu, flatOptions: flatOptions, getOptionProps: getOptionProps, onApply: handleApply, onClear: handleClear, footer: React__default.default.createElement(Footer, { handleApply: handleApply, handleClear: handleClear, showClear: showClear, selectedDraft: selectedDraft }) })));
|
|
61
|
+
return (React__default.default.createElement(OptionsList, tslib.__assign({}, restProps, { ref: ref, visibleOptions: visibleOptions, toggleMenu: toggleMenu, flatOptions: flatOptions, getOptionProps: getOptionProps, onApply: handleApply, onClear: handleClear, header: showHeaderWithSelectAll ? React__default.default.createElement(Header, tslib.__assign({}, headerProps)) : undefined, footer: React__default.default.createElement(Footer, { handleApply: handleApply, handleClear: handleClear, showClear: showClear, selectedDraft: selectedDraft }) })));
|
|
61
62
|
});
|
|
62
63
|
|
|
63
64
|
var SELECT_ALL_KEY = 'select_all';
|
|
64
65
|
var selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
|
|
65
66
|
function useSelectWithApply(_a) {
|
|
66
|
-
var options = _a.options, selected = _a.selected, _b = _a.onChange, onChange = _b === void 0 ? function () { return null; } : _b, OptionsList = _a.OptionsList, _c = _a.optionsListProps, optionsListProps = _c === void 0 ? {} : _c, _d = _a.showClear, showClear = _d === void 0 ? true : _d, _e = _a.showSelectAll, showSelectAll = _e === void 0 ? false : _e;
|
|
67
|
-
var
|
|
68
|
-
var
|
|
67
|
+
var options = _a.options, selected = _a.selected, _b = _a.onChange, onChange = _b === void 0 ? function () { return null; } : _b, OptionsList = _a.OptionsList, _c = _a.optionsListProps, optionsListProps = _c === void 0 ? {} : _c, _d = _a.showClear, showClear = _d === void 0 ? true : _d, _e = _a.showSelectAll, showSelectAll = _e === void 0 ? false : _e, _f = _a.showHeaderWithSelectAll, showHeaderWithSelectAll = _f === void 0 ? false : _f;
|
|
68
|
+
var _g = React.useMemo(function () { return utils.processOptions(options, selected); }, [options, selected]), flatOptions = _g.flatOptions, selectedOptions = _g.selectedOptions;
|
|
69
|
+
var _h = React.useState(selectedOptions), selectedDraft = _h[0], setSelectedDraft = _h[1];
|
|
69
70
|
var selectedOptionsRef = React.useRef(selectedOptions);
|
|
70
|
-
var handleApply =
|
|
71
|
+
var handleApply = function () {
|
|
71
72
|
onChange({
|
|
72
73
|
selected: selectedDraft[0],
|
|
73
74
|
selectedMultiple: selectedDraft,
|
|
74
75
|
initiator: null,
|
|
75
76
|
});
|
|
76
|
-
}
|
|
77
|
-
var handleClear =
|
|
77
|
+
};
|
|
78
|
+
var handleClear = function () {
|
|
78
79
|
setSelectedDraft([]);
|
|
79
80
|
onChange({
|
|
80
81
|
selected: null,
|
|
81
82
|
selectedMultiple: [],
|
|
82
83
|
initiator: null,
|
|
83
84
|
});
|
|
84
|
-
}
|
|
85
|
-
var
|
|
85
|
+
};
|
|
86
|
+
var handleToggleAll = function () {
|
|
87
|
+
setSelectedDraft(flatOptions.length === selectedDraft.length ? [] : flatOptions);
|
|
88
|
+
};
|
|
89
|
+
var handleChange = function (_a) {
|
|
86
90
|
var initiator = _a.initiator, restArgs = tslib.__rest(_a, ["initiator"]);
|
|
87
91
|
if (!initiator) {
|
|
88
92
|
onChange(tslib.__assign({ initiator: null }, restArgs));
|
|
@@ -98,10 +102,8 @@ function useSelectWithApply(_a) {
|
|
|
98
102
|
? selectedDraft.filter(function (o) { return o !== initiator; })
|
|
99
103
|
: selectedDraft.concat(initiator));
|
|
100
104
|
}
|
|
101
|
-
}
|
|
102
|
-
var handleClose =
|
|
103
|
-
setSelectedDraft(selectedOptionsRef.current);
|
|
104
|
-
}, []);
|
|
105
|
+
};
|
|
106
|
+
var handleClose = function () { return setSelectedDraft(selectedOptionsRef.current); };
|
|
105
107
|
React.useEffect(function () {
|
|
106
108
|
setSelectedDraft(selectedOptions);
|
|
107
109
|
selectedOptionsRef.current = selectedOptions;
|
|
@@ -109,7 +111,11 @@ function useSelectWithApply(_a) {
|
|
|
109
111
|
var memoizedOptions = React.useMemo(function () { return (showSelectAll ? tslib.__spreadArray([selectAllOption], options, true) : options); }, [options, showSelectAll]);
|
|
110
112
|
return {
|
|
111
113
|
OptionsList: OptionsListWithApply,
|
|
112
|
-
optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { OptionsList: OptionsList, showClear: showClear, onClear: handleClear, onApply: handleApply, onClose: handleClose, selectedDraft: selectedDraft
|
|
114
|
+
optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { OptionsList: OptionsList, showClear: showClear, onClear: handleClear, onApply: handleApply, onClose: handleClose, selectedDraft: selectedDraft, showHeaderWithSelectAll: showHeaderWithSelectAll, headerProps: {
|
|
115
|
+
indeterminate: !!selectedDraft.length && selectedDraft.length < flatOptions.length,
|
|
116
|
+
checked: selectedDraft.length === flatOptions.length,
|
|
117
|
+
onChange: handleToggleAll,
|
|
118
|
+
} }),
|
|
113
119
|
allowUnselect: true,
|
|
114
120
|
multiple: true,
|
|
115
121
|
options: memoizedOptions,
|
|
@@ -122,7 +128,7 @@ var VIRTUAL_OPTIONS_LIST_THRESHOLD$1 = 30;
|
|
|
122
128
|
var SelectMobile = React.forwardRef(function (_a, ref) {
|
|
123
129
|
var _b = _a.autocomplete, autocomplete = _b === void 0 ? false : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.allowUnselect, allowUnselect = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? !multiple : _f, _g = _a.circularNavigation, circularNavigation = _g === void 0 ? false : _g, _h = _a.defaultOpen, defaultOpen = _h === void 0 ? false : _h, openProp = _a.open, _j = _a.size, size = _j === void 0 ? 'm' : _j, _k = _a.optionsSize, optionsSize = _k === void 0 ? 'm' : _k, _l = _a.fieldProps, fieldProps = _l === void 0 ? {} : _l, _m = _a.optionProps, optionProps = _m === void 0 ? {} : _m, _o = _a.optionsListProps, optionsListProps = _o === void 0 ? {} : _o, _p = _a.Arrow, Arrow = _p === void 0 ? components_arrow_Component.Arrow : _p, _q = _a.Field, Field = _q === void 0 ? components_field_Component.Field : _q, _r = _a.Optgroup, Optgroup = _r === void 0 ? components_optgroup_Component.Optgroup : _r, _s = _a.Option, Option = _s === void 0 ? components_option_Component.Option : _s, selected = _a.selected, options = _a.options, _t = _a.OptionsList, OptionsList = _t === void 0 ? options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD$1
|
|
124
130
|
? components_virtualOptionsList_Component.VirtualOptionsList
|
|
125
|
-
: components_optionsList_Component.OptionsList : _t, onChange = _a.onChange, bottomSheetProps = _a.bottomSheetProps, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, restProps = tslib.__rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "bottomSheetProps", "showClear", "showSelectAll"]);
|
|
131
|
+
: components_optionsList_Component.OptionsList : _t, onChange = _a.onChange, bottomSheetProps = _a.bottomSheetProps, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, _v = _a.useWithApplyHook, useWithApplyHook = _v === void 0 ? multiple : _v, restProps = tslib.__rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "bottomSheetProps", "showClear", "showSelectAll", "showHeaderWithSelectAll", "useWithApplyHook"]);
|
|
126
132
|
var applyProps = useSelectWithApply({
|
|
127
133
|
optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { Footer: components_baseSelectMobile_footer_Component.Footer }),
|
|
128
134
|
OptionsList: OptionsList,
|
|
@@ -132,15 +138,14 @@ var SelectMobile = React.forwardRef(function (_a, ref) {
|
|
|
132
138
|
showClear: showClear,
|
|
133
139
|
showSelectAll: showSelectAll,
|
|
134
140
|
});
|
|
135
|
-
return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: true, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, bottomSheetProps:
|
|
141
|
+
return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: true, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, bottomSheetProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, bottomSheetProps), optionsListProps: optionsListProps }, restProps, (useWithApplyHook && applyProps))));
|
|
136
142
|
});
|
|
137
143
|
|
|
138
144
|
var VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
|
|
139
145
|
var SelectModalMobile = React.forwardRef(function (_a, ref) {
|
|
140
|
-
var _b
|
|
141
|
-
var _c = _a.autocomplete, autocomplete = _c === void 0 ? false : _c, _d = _a.multiple, multiple = _d === void 0 ? false : _d, _e = _a.allowUnselect, allowUnselect = _e === void 0 ? false : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.closeOnSelect, closeOnSelect = _g === void 0 ? !multiple : _g, _h = _a.circularNavigation, circularNavigation = _h === void 0 ? false : _h, _j = _a.defaultOpen, defaultOpen = _j === void 0 ? false : _j, openProp = _a.open, _k = _a.size, size = _k === void 0 ? 'm' : _k, _l = _a.optionsSize, optionsSize = _l === void 0 ? 'm' : _l, _m = _a.fieldProps, fieldProps = _m === void 0 ? {} : _m, _o = _a.optionProps, optionProps = _o === void 0 ? {} : _o, _p = _a.optionsListProps, optionsListProps = _p === void 0 ? {} : _p, _q = _a.Arrow, Arrow = _q === void 0 ? components_arrow_Component.Arrow : _q, _r = _a.Field, Field = _r === void 0 ? components_field_Component.Field : _r, _s = _a.Optgroup, Optgroup = _s === void 0 ? components_optgroup_Component.Optgroup : _s, _t = _a.Option, Option = _t === void 0 ? components_option_Component.Option : _t, selected = _a.selected, options = _a.options, _u = _a.OptionsList, OptionsList = _u === void 0 ? options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD
|
|
146
|
+
var _b = _a.autocomplete, autocomplete = _b === void 0 ? false : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.allowUnselect, allowUnselect = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? !multiple : _f, _g = _a.circularNavigation, circularNavigation = _g === void 0 ? false : _g, _h = _a.defaultOpen, defaultOpen = _h === void 0 ? false : _h, openProp = _a.open, _j = _a.size, size = _j === void 0 ? 'm' : _j, _k = _a.optionsSize, optionsSize = _k === void 0 ? 'm' : _k, _l = _a.fieldProps, fieldProps = _l === void 0 ? {} : _l, _m = _a.optionProps, optionProps = _m === void 0 ? {} : _m, _o = _a.optionsListProps, optionsListProps = _o === void 0 ? {} : _o, _p = _a.Arrow, Arrow = _p === void 0 ? components_arrow_Component.Arrow : _p, _q = _a.Field, Field = _q === void 0 ? components_field_Component.Field : _q, _r = _a.Optgroup, Optgroup = _r === void 0 ? components_optgroup_Component.Optgroup : _r, _s = _a.Option, Option = _s === void 0 ? components_option_Component.Option : _s, selected = _a.selected, options = _a.options, _t = _a.OptionsList, OptionsList = _t === void 0 ? options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD
|
|
142
147
|
? components_virtualOptionsList_Component.VirtualOptionsList
|
|
143
|
-
: components_optionsList_Component.OptionsList :
|
|
148
|
+
: components_optionsList_Component.OptionsList : _t, onChange = _a.onChange, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, _v = _a.useWithApplyHook, useWithApplyHook = _v === void 0 ? multiple : _v, modalHeaderProps = _a.modalHeaderProps, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, restProps = tslib.__rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "showClear", "showSelectAll", "useWithApplyHook", "modalHeaderProps", "showHeaderWithSelectAll"]);
|
|
144
149
|
var applyProps = useSelectWithApply({
|
|
145
150
|
optionsListProps: tslib.__assign(tslib.__assign({}, optionsListProps), { Footer: components_baseSelectMobile_footer_Component.Footer }),
|
|
146
151
|
OptionsList: OptionsList,
|
|
@@ -150,7 +155,7 @@ var SelectModalMobile = React.forwardRef(function (_a, ref) {
|
|
|
150
155
|
showClear: showClear,
|
|
151
156
|
showSelectAll: showSelectAll,
|
|
152
157
|
});
|
|
153
|
-
return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: false, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, optionsListProps: optionsListProps
|
|
158
|
+
return (React__default.default.createElement(components_baseSelectMobile_Component.BaseSelectMobile, tslib.__assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: fieldProps, optionProps: optionProps, Arrow: Arrow, Field: Field, Optgroup: Optgroup, Option: Option, isBottomSheet: false, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList, optionsListProps: optionsListProps, modalHeaderProps: tslib.__assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React__default.default.createElement(presets_useSelectWithApply_optionsListWithApply_header_Component.Header, tslib.__assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, modalHeaderProps) }, restProps, (useWithApplyHook && applyProps))));
|
|
154
159
|
});
|
|
155
160
|
|
|
156
161
|
exports.OptionsListWithApply = OptionsListWithApply;
|
package/Component.js
CHANGED
|
@@ -17,7 +17,7 @@ require('@juggle/resize-observer');
|
|
|
17
17
|
require('downshift');
|
|
18
18
|
require('@alfalab/core-components-popover');
|
|
19
19
|
require('@alfalab/hooks');
|
|
20
|
-
require('./getDataTestId-
|
|
20
|
+
require('./getDataTestId-e8d9eb23.js');
|
|
21
21
|
require('./utils.js');
|
|
22
22
|
require('./components/native-select/Component.js');
|
|
23
23
|
require('@alfalab/core-components-form-control');
|
package/Component.responsive.js
CHANGED
|
@@ -9,7 +9,7 @@ var Component = require('./Component.js');
|
|
|
9
9
|
require('classnames');
|
|
10
10
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
11
11
|
require('./components/base-select/Component.js');
|
|
12
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('./Component-
|
|
12
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('./Component-3eb05f44.js');
|
|
13
13
|
require('@alfalab/core-components-form-control');
|
|
14
14
|
require('@alfalab/core-components-badge');
|
|
15
15
|
require('@alfalab/core-components-checkbox');
|
|
@@ -28,8 +28,9 @@ require('react-merge-refs');
|
|
|
28
28
|
require('@juggle/resize-observer');
|
|
29
29
|
require('downshift');
|
|
30
30
|
require('@alfalab/core-components-popover');
|
|
31
|
-
require('./getDataTestId-
|
|
31
|
+
require('./getDataTestId-e8d9eb23.js');
|
|
32
32
|
require('./components/native-select/Component.js');
|
|
33
|
+
require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
33
34
|
require('./components/base-select-mobile/Component.js');
|
|
34
35
|
require('@alfalab/core-components-bottom-sheet');
|
|
35
36
|
require('@alfalab/core-components-modal/mobile');
|
|
@@ -37,7 +38,7 @@ require('./components/base-select-mobile/footer/Component.js');
|
|
|
37
38
|
require('@alfalab/core-components-base-modal');
|
|
38
39
|
require('@alfalab/core-components-button');
|
|
39
40
|
require('@alfalab/core-components-skeleton');
|
|
40
|
-
require('./intersection-observer-
|
|
41
|
+
require('./intersection-observer-c227d471.js');
|
|
41
42
|
require('./consts.js');
|
|
42
43
|
require('./presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
|
|
43
44
|
require('@alfalab/core-components-scrollbar');
|
|
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"arrow":"
|
|
14
|
+
var styles = {"arrow":"select__arrow_pzzaq","open":"select__open_pzzaq"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Arrow = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: gh5a9 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
/* checkmark */
|
|
27
27
|
|
|
28
28
|
/* optgroup */
|
|
29
|
-
} .
|
|
29
|
+
} .select__arrow_pzzaq {
|
|
30
30
|
display: block;
|
|
31
31
|
width: 24px;
|
|
32
32
|
height: 24px;
|
|
33
33
|
color: var(--select-arrow-color);
|
|
34
34
|
|
|
35
35
|
transition: transform 0.15s ease-in-out, opacity 0.2s ease;
|
|
36
|
-
} .
|
|
36
|
+
} .select__open_pzzaq {
|
|
37
37
|
transform: var(--arrow-transform);
|
|
38
38
|
}
|
|
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
13
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
14
|
|
|
15
|
-
var styles = {"checkmark":"
|
|
15
|
+
var styles = {"checkmark":"select__checkmark_8e0mi","single":"select__single_8e0mi","selected":"select__selected_8e0mi"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var BaseCheckmark = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dlcs8 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
/* checkmark */
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
|
-
} .
|
|
26
|
+
} .select__checkmark_8e0mi {
|
|
27
27
|
flex-shrink: 0;
|
|
28
28
|
box-sizing: border-box;
|
|
29
|
-
} .
|
|
29
|
+
} .select__single_8e0mi {
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: center;
|
|
33
33
|
opacity: 0
|
|
34
|
-
} .
|
|
34
|
+
} .select__single_8e0mi.select__selected_8e0mi {
|
|
35
35
|
opacity: 1;
|
|
36
36
|
}
|
|
@@ -14,7 +14,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
16
|
|
|
17
|
-
var styles = {"option":"
|
|
17
|
+
var styles = {"option":"select__option_1gxj0","disabled":"select__disabled_1gxj0","checkmarkBefore":"select__checkmarkBefore_1gxj0","mobile":"select__mobile_1gxj0","checkmarkAfter":"select__checkmarkAfter_1gxj0","textContent":"select__textContent_1gxj0","selected":"select__selected_1gxj0","highlighted":"select__highlighted_1gxj0","content":"select__content_1gxj0"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var BaseOption = function (_a) {
|
|
@@ -30,7 +30,7 @@ var BaseOption = function (_a) {
|
|
|
30
30
|
return null;
|
|
31
31
|
};
|
|
32
32
|
return (React__default.default.createElement("div", tslib.__assign({}, innerProps, { className: cn__default.default(styles.option, className, (_b = {},
|
|
33
|
-
_b[styles.highlighted] = highlighted,
|
|
33
|
+
_b[styles.highlighted] = !mobile && highlighted,
|
|
34
34
|
_b[styles.selected] = selected,
|
|
35
35
|
_b[styles.disabled] = disabled,
|
|
36
36
|
_b[styles.textContent] = isTextContent,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: l75mt */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
/* checkmark */
|
|
44
44
|
|
|
45
45
|
/* optgroup */
|
|
46
|
-
} .
|
|
46
|
+
} .select__option_1gxj0 {
|
|
47
47
|
font-size: 16px;
|
|
48
48
|
line-height: 20px;
|
|
49
49
|
font-weight: 400;
|
|
@@ -60,32 +60,32 @@
|
|
|
60
60
|
position: relative;
|
|
61
61
|
cursor: pointer;
|
|
62
62
|
min-height: var(--size-s-height)
|
|
63
|
-
} .
|
|
63
|
+
} .select__option_1gxj0:not(.select__disabled_1gxj0):active {
|
|
64
64
|
background: var(--select-option-active-background);
|
|
65
65
|
color: var(--select-option-active-color);
|
|
66
|
-
} .
|
|
66
|
+
} .select__option_1gxj0.select__checkmarkBefore_1gxj0 {
|
|
67
67
|
padding: 0 0 0 var(--gap-s)
|
|
68
|
-
} .
|
|
68
|
+
} .select__option_1gxj0.select__checkmarkBefore_1gxj0.select__mobile_1gxj0 {
|
|
69
69
|
padding-left: var(--gap-m);
|
|
70
|
-
} .
|
|
70
|
+
} .select__option_1gxj0.select__checkmarkAfter_1gxj0 {
|
|
71
71
|
padding: 0 var(--gap-s) 0 0
|
|
72
|
-
} .
|
|
72
|
+
} .select__option_1gxj0.select__checkmarkAfter_1gxj0.select__mobile_1gxj0 {
|
|
73
73
|
padding-right: var(--gap-l);
|
|
74
|
-
} .
|
|
74
|
+
} .select__option_1gxj0.select__textContent_1gxj0 {
|
|
75
75
|
padding: var(--gap-s)
|
|
76
|
-
} .
|
|
76
|
+
} .select__option_1gxj0.select__textContent_1gxj0.select__mobile_1gxj0 {
|
|
77
77
|
padding: var(--gap-m) var(--gap-l) var(--gap-m) var(--gap-m);
|
|
78
|
-
} .
|
|
78
|
+
} .select__selected_1gxj0 {
|
|
79
79
|
background: var(--select-option-selected-background);
|
|
80
80
|
color: var(--select-option-selected-color);
|
|
81
81
|
cursor: default;
|
|
82
|
-
} .
|
|
82
|
+
} .select__highlighted_1gxj0 {
|
|
83
83
|
background: var(--select-option-hover-background);
|
|
84
84
|
color: var(--select-option-hover-color);
|
|
85
|
-
} .
|
|
85
|
+
} .select__disabled_1gxj0 {
|
|
86
86
|
cursor: var(--disabled-cursor);
|
|
87
87
|
background: var(--select-option-disabled-background);
|
|
88
88
|
color: var(--select-option-disabled-color);
|
|
89
|
-
} .
|
|
89
|
+
} .select__content_1gxj0 {
|
|
90
90
|
flex: 1;
|
|
91
91
|
}
|
|
@@ -10,7 +10,7 @@ var cn = require('classnames');
|
|
|
10
10
|
var downshift = require('downshift');
|
|
11
11
|
var coreComponentsPopover = require('@alfalab/core-components-popover');
|
|
12
12
|
var hooks = require('@alfalab/hooks');
|
|
13
|
-
var getDataTestId = require('../../getDataTestId-
|
|
13
|
+
var getDataTestId = require('../../getDataTestId-e8d9eb23.js');
|
|
14
14
|
var utils = require('../../utils.js');
|
|
15
15
|
var components_nativeSelect_Component = require('../native-select/Component.js');
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
20
20
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
21
21
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
22
22
|
|
|
23
|
-
var styles = {"component":"
|
|
23
|
+
var styles = {"component":"select__component_9uzo4","popoverInner":"select__popoverInner_9uzo4","optionsList":"select__optionsList_9uzo4","optionsListBorder":"select__optionsListBorder_9uzo4","nativeSelect":"select__nativeSelect_9uzo4","block":"select__block_9uzo4"};
|
|
24
24
|
require('./index.css')
|
|
25
25
|
|
|
26
26
|
var BaseSelect = React.forwardRef(function (_a, ref) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: mtdu4 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
/* checkmark */
|
|
37
37
|
|
|
38
38
|
/* optgroup */
|
|
39
|
-
} .
|
|
39
|
+
} .select__component_9uzo4 {
|
|
40
40
|
width: max-content;
|
|
41
41
|
position: relative;
|
|
42
42
|
outline: 0;
|
|
43
|
-
} .
|
|
43
|
+
} .select__popoverInner_9uzo4 {
|
|
44
44
|
padding-top: var(--select-options-list-offset);
|
|
45
45
|
padding-bottom: var(--select-options-list-offset);
|
|
46
46
|
box-shadow: none;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
background: transparent;
|
|
49
49
|
border-radius: 0;
|
|
50
50
|
position: relative;
|
|
51
|
-
} .
|
|
51
|
+
} .select__optionsList_9uzo4 {
|
|
52
52
|
position: relative;
|
|
53
53
|
padding-top: var(--select-options-list-top-padding);
|
|
54
54
|
padding-bottom: var(--select-options-list-bottom-padding);
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
background: var(--select-option-background);
|
|
58
58
|
overflow: hidden;
|
|
59
59
|
will-change: transform;
|
|
60
|
-
} .
|
|
60
|
+
} .select__optionsListBorder_9uzo4 {
|
|
61
61
|
position: absolute;
|
|
62
62
|
top: 0;
|
|
63
63
|
right: 0;
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
box-shadow: inset 0 0 0 1px var(--color-light-border-secondary);
|
|
67
67
|
border-radius: inherit;
|
|
68
68
|
pointer-events: none;
|
|
69
|
-
} .
|
|
69
|
+
} .select__nativeSelect_9uzo4 {
|
|
70
70
|
opacity: 0;
|
|
71
71
|
overflow: hidden;
|
|
72
72
|
position: absolute;
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
height: 100%;
|
|
80
80
|
cursor: pointer;
|
|
81
81
|
z-index: 1;
|
|
82
|
-
} .
|
|
82
|
+
} .select__block_9uzo4 {
|
|
83
83
|
width: 100%;
|
|
84
84
|
} /* width: max-content; fix for IE */ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
85
|
-
.
|
|
85
|
+
.select__component_9uzo4 {
|
|
86
86
|
float: left;
|
|
87
87
|
clear: left;
|
|
88
88
|
}
|
|
@@ -11,7 +11,7 @@ require('classnames');
|
|
|
11
11
|
require('downshift');
|
|
12
12
|
require('@alfalab/core-components-popover');
|
|
13
13
|
require('@alfalab/hooks');
|
|
14
|
-
require('../../getDataTestId-
|
|
14
|
+
require('../../getDataTestId-e8d9eb23.js');
|
|
15
15
|
require('../../utils.js');
|
|
16
16
|
require('../native-select/Component.js');
|
|
17
17
|
|
|
@@ -9,7 +9,7 @@ var cn = require('classnames');
|
|
|
9
9
|
var downshift = require('downshift');
|
|
10
10
|
var coreComponentsBottomSheet = require('@alfalab/core-components-bottom-sheet');
|
|
11
11
|
var mobile = require('@alfalab/core-components-modal/mobile');
|
|
12
|
-
var getDataTestId = require('../../getDataTestId-
|
|
12
|
+
var getDataTestId = require('../../getDataTestId-e8d9eb23.js');
|
|
13
13
|
var utils = require('../../utils.js');
|
|
14
14
|
var components_arrow_Component = require('../arrow/Component.js');
|
|
15
15
|
var components_field_Component = require('../field/Component.js');
|
|
@@ -34,7 +34,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
34
34
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
35
35
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
36
36
|
|
|
37
|
-
var styles = {"component":"
|
|
37
|
+
var styles = {"component":"select__component_ggaik","sheet":"select__sheet_ggaik","sheetContent":"select__sheetContent_ggaik","sheetContainer":"select__sheetContainer_ggaik","block":"select__block_ggaik","option":"select__option_ggaik","optionGroup":"select__optionGroup_ggaik"};
|
|
38
38
|
require('./index.css')
|
|
39
39
|
|
|
40
40
|
var BaseSelectMobile = React.forwardRef(function (_a, ref) {
|
|
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
13
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
14
|
|
|
15
|
-
var styles = {"footer":"
|
|
15
|
+
var styles = {"footer":"select__footer_1di6u","button":"select__button_1di6u","highlighted":"select__highlighted_1di6u"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1j6qf */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
/* checkmark */
|
|
27
27
|
|
|
28
28
|
/* optgroup */
|
|
29
|
-
} .
|
|
29
|
+
} .select__footer_1di6u {
|
|
30
30
|
display: flex;
|
|
31
31
|
box-sizing: border-box;
|
|
32
32
|
width: 100%;
|
|
33
33
|
padding: var(--gap-m) var(--gap-m);
|
|
34
34
|
background-color: var(--color-light-bg-primary)
|
|
35
|
-
} .
|
|
35
|
+
} .select__footer_1di6u .select__button_1di6u:first-of-type {
|
|
36
36
|
margin-right: var(--gap-m);
|
|
37
|
-
} .
|
|
37
|
+
} .select__button_1di6u {
|
|
38
38
|
width: 50%;
|
|
39
|
-
} .
|
|
39
|
+
} .select__highlighted_1di6u {
|
|
40
40
|
border-top: 1px solid var(--color-light-border-primary);
|
|
41
41
|
background-color: var(--color-light-bg-primary);
|
|
42
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1n2l2 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -27,27 +27,27 @@
|
|
|
27
27
|
/* checkmark */
|
|
28
28
|
|
|
29
29
|
/* optgroup */
|
|
30
|
-
} .
|
|
30
|
+
} .select__component_ggaik {
|
|
31
31
|
width: max-content;
|
|
32
32
|
position: relative;
|
|
33
33
|
outline: 0;
|
|
34
|
-
} .
|
|
34
|
+
} .select__sheet_ggaik {
|
|
35
35
|
overflow: hidden;
|
|
36
|
-
} .
|
|
36
|
+
} .select__sheetContent_ggaik {
|
|
37
37
|
padding: 0;
|
|
38
|
-
} .
|
|
38
|
+
} .select__sheetContainer_ggaik {
|
|
39
39
|
padding: 0;
|
|
40
|
-
} .
|
|
40
|
+
} .select__block_ggaik {
|
|
41
41
|
width: 100%;
|
|
42
42
|
} /* width: max-content; fix for IE */ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
43
|
-
.
|
|
43
|
+
.select__component_ggaik {
|
|
44
44
|
float: left;
|
|
45
45
|
clear: left;
|
|
46
46
|
}
|
|
47
|
-
} .
|
|
47
|
+
} .select__option_ggaik {
|
|
48
48
|
padding: var(--gap-2xs) var(--gap-l) var(--gap-2xs) var(--gap-m)
|
|
49
|
-
} .
|
|
49
|
+
} .select__option_ggaik:before {
|
|
50
50
|
display: none;
|
|
51
|
-
} .
|
|
51
|
+
} .select__optionGroup_ggaik {
|
|
52
52
|
padding: var(--gap-m) var(--gap-m) var(--gap-xs);
|
|
53
53
|
}
|
|
@@ -10,7 +10,7 @@ require('classnames');
|
|
|
10
10
|
require('downshift');
|
|
11
11
|
require('@alfalab/core-components-bottom-sheet');
|
|
12
12
|
require('@alfalab/core-components-modal/mobile');
|
|
13
|
-
require('../../getDataTestId-
|
|
13
|
+
require('../../getDataTestId-e8d9eb23.js');
|
|
14
14
|
require('../../utils.js');
|
|
15
15
|
require('../arrow/Component.js');
|
|
16
16
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
@@ -15,7 +15,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
16
|
var CheckmarkMIcon__default = /*#__PURE__*/_interopDefaultCompat(CheckmarkMIcon);
|
|
17
17
|
|
|
18
|
-
var styles = {"checkmark":"
|
|
18
|
+
var styles = {"checkmark":"select__checkmark_1sddt","after":"select__after_1sddt","single":"select__single_1sddt","selected":"select__selected_1sddt","before":"select__before_1sddt","multiple":"select__multiple_1sddt","colorIcon":"select__colorIcon_1sddt"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var Checkmark = function (_a) {
|