@alfalab/core-components-select 17.8.2 → 17.8.3
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/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +6 -4
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +9 -7
- package/components/base-option/Component.js +1 -1
- package/components/base-option/index.css +21 -19
- package/components/base-select/Component.d.ts +8 -14
- package/components/base-select/Component.js +48 -75
- package/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.d.ts +12 -0
- package/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.js +19 -0
- package/components/base-select/components/list-desktop/list-popover-desktop.d.ts +0 -0
- package/components/base-select/components/list-desktop/list-popover-desktop.js +12 -0
- package/components/base-select/components/list-desktop/types/types.d.ts +3 -0
- package/components/base-select/components/list-desktop/types/types.js +2 -0
- package/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.d.ts +16 -0
- package/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.js +23 -0
- package/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.d.ts +28 -0
- package/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.js +22 -0
- package/components/base-select/components/list-mobile/helpers/index.d.ts +2 -0
- package/components/base-select/components/list-mobile/helpers/index.js +11 -0
- package/components/base-select/components/list-mobile/list-bottom-sheet-mobile.d.ts +15 -0
- package/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +28 -0
- package/components/base-select/components/list-mobile/list-mobile.d.ts +16 -0
- package/components/base-select/components/list-mobile/list-mobile.js +26 -0
- package/components/base-select/components/list-mobile/list-modal-mobile.d.ts +15 -0
- package/components/base-select/components/list-mobile/list-modal-mobile.js +42 -0
- package/components/base-select/components/list-mobile/types/types.d.ts +4 -0
- package/components/base-select/components/list-mobile/types/types.js +2 -0
- package/components/base-select/index.css +16 -14
- package/components/base-select/mobile.css +19 -17
- package/components/base-select/types/component-types.d.ts +50 -0
- package/components/base-select/types/component-types.js +2 -0
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +15 -13
- package/components/checkmark-mobile/Component.js +1 -1
- package/components/checkmark-mobile/index.css +9 -7
- package/components/field/Component.js +1 -1
- package/components/field/index.css +15 -13
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +9 -7
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +12 -10
- package/components/option/Component.js +1 -1
- package/components/option/index.css +24 -22
- package/components/options-list/Component.js +1 -1
- package/components/options-list/index.css +16 -14
- package/components/search/Component.js +1 -1
- package/components/search/index.css +5 -3
- package/components/virtual-options-list/Component.js +1 -1
- package/components/virtual-options-list/index.css +21 -19
- package/cssm/components/arrow/index.module.css +3 -1
- package/cssm/components/base-checkmark/index.module.css +3 -1
- package/cssm/components/base-option/index.module.css +6 -4
- package/cssm/components/base-select/Component.d.ts +8 -14
- package/cssm/components/base-select/Component.js +38 -60
- package/cssm/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.d.ts +12 -0
- package/cssm/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.js +19 -0
- package/cssm/components/base-select/components/list-desktop/list-popover-desktop.d.ts +9 -0
- package/cssm/components/base-select/components/list-desktop/list-popover-desktop.js +24 -0
- package/cssm/components/base-select/components/list-desktop/types/types.d.ts +3 -0
- package/cssm/components/base-select/components/list-desktop/types/types.js +2 -0
- package/cssm/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.d.ts +16 -0
- package/cssm/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.js +23 -0
- package/cssm/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.d.ts +28 -0
- package/cssm/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.js +22 -0
- package/cssm/components/base-select/components/list-mobile/helpers/index.d.ts +2 -0
- package/cssm/components/base-select/components/list-mobile/helpers/index.js +11 -0
- package/cssm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.d.ts +15 -0
- package/cssm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +29 -0
- package/cssm/components/base-select/components/list-mobile/list-mobile.d.ts +16 -0
- package/cssm/components/base-select/components/list-mobile/list-mobile.js +26 -0
- package/cssm/components/base-select/components/list-mobile/list-modal-mobile.d.ts +15 -0
- package/cssm/components/base-select/components/list-mobile/list-modal-mobile.js +43 -0
- package/cssm/components/base-select/components/list-mobile/types/types.d.ts +4 -0
- package/cssm/components/base-select/components/list-mobile/types/types.js +2 -0
- package/cssm/components/base-select/index.module.css +5 -3
- package/cssm/components/base-select/mobile.module.css +7 -5
- package/cssm/components/base-select/types/component-types.d.ts +50 -0
- package/cssm/components/base-select/types/component-types.js +2 -0
- package/cssm/components/checkmark/index.module.css +5 -3
- package/cssm/components/checkmark-mobile/index.module.css +3 -1
- package/cssm/components/field/index.module.css +3 -1
- package/cssm/components/footer/index.module.css +4 -2
- package/cssm/components/optgroup/index.module.css +6 -4
- package/cssm/components/option/index.module.css +5 -3
- package/cssm/components/options-list/index.module.css +6 -4
- package/cssm/components/search/index.module.css +3 -1
- package/cssm/components/virtual-options-list/index.module.css +6 -4
- package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +5 -3
- package/cssm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +5 -3
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +6 -4
- package/esm/components/base-checkmark/Component.js +1 -1
- package/esm/components/base-checkmark/index.css +9 -7
- package/esm/components/base-option/Component.js +1 -1
- package/esm/components/base-option/index.css +21 -19
- package/esm/components/base-select/Component.d.ts +8 -14
- package/esm/components/base-select/Component.js +39 -66
- package/esm/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.d.ts +12 -0
- package/esm/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.js +15 -0
- package/esm/components/base-select/components/list-desktop/list-popover-desktop.d.ts +0 -0
- package/esm/components/base-select/components/list-desktop/list-popover-desktop.js +4 -0
- package/esm/components/base-select/components/list-desktop/types/types.d.ts +3 -0
- package/esm/components/base-select/components/list-desktop/types/types.js +1 -0
- package/esm/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.d.ts +16 -0
- package/esm/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.js +19 -0
- package/esm/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.d.ts +28 -0
- package/esm/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.js +18 -0
- package/esm/components/base-select/components/list-mobile/helpers/index.d.ts +2 -0
- package/esm/components/base-select/components/list-mobile/helpers/index.js +2 -0
- package/esm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.d.ts +15 -0
- package/esm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +20 -0
- package/esm/components/base-select/components/list-mobile/list-mobile.d.ts +16 -0
- package/esm/components/base-select/components/list-mobile/list-mobile.js +18 -0
- package/esm/components/base-select/components/list-mobile/list-modal-mobile.d.ts +15 -0
- package/esm/components/base-select/components/list-mobile/list-modal-mobile.js +32 -0
- package/esm/components/base-select/components/list-mobile/types/types.d.ts +4 -0
- package/esm/components/base-select/components/list-mobile/types/types.js +1 -0
- package/esm/components/base-select/index.css +16 -14
- package/esm/components/base-select/mobile.css +19 -17
- package/esm/components/base-select/types/component-types.d.ts +50 -0
- package/esm/components/base-select/types/component-types.js +1 -0
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +15 -13
- package/esm/components/checkmark-mobile/Component.js +1 -1
- package/esm/components/checkmark-mobile/index.css +9 -7
- package/esm/components/field/Component.js +1 -1
- package/esm/components/field/index.css +15 -13
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +9 -7
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +12 -10
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +24 -22
- package/esm/components/options-list/Component.js +1 -1
- package/esm/components/options-list/index.css +16 -14
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +5 -3
- package/esm/components/virtual-options-list/Component.js +1 -1
- package/esm/components/virtual-options-list/index.css +21 -19
- package/esm/list-popover-desktop-a16c1a9c.d.ts +9 -0
- package/esm/list-popover-desktop-a16c1a9c.js +16 -0
- package/esm/mobile/Component.mobile.js +1 -1
- package/esm/mobile.module-3975aa85.js +4 -0
- package/esm/presets/index.js +1 -1
- package/esm/presets/useSelectWithApply/hook.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +8 -6
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +8 -6
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/shared/index.js +1 -1
- package/list-popover-desktop-63ceae1a.d.ts +9 -0
- package/list-popover-desktop-63ceae1a.js +24 -0
- package/mobile/Component.mobile.js +1 -1
- package/mobile.module-f44f34a3.js +6 -0
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +6 -4
- package/modern/components/base-checkmark/Component.js +1 -1
- package/modern/components/base-checkmark/index.css +9 -7
- package/modern/components/base-option/Component.js +1 -1
- package/modern/components/base-option/index.css +21 -19
- package/modern/components/base-select/Component.d.ts +8 -14
- package/modern/components/base-select/Component.js +23 -56
- package/modern/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.d.ts +12 -0
- package/modern/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.js +15 -0
- package/modern/components/base-select/components/list-desktop/list-popover-desktop.d.ts +0 -0
- package/modern/components/base-select/components/list-desktop/list-popover-desktop.js +3 -0
- package/modern/components/base-select/components/list-desktop/types/types.d.ts +3 -0
- package/modern/components/base-select/components/list-desktop/types/types.js +1 -0
- package/modern/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.d.ts +16 -0
- package/modern/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.js +19 -0
- package/modern/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.d.ts +28 -0
- package/modern/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.js +18 -0
- package/modern/components/base-select/components/list-mobile/helpers/index.d.ts +2 -0
- package/modern/components/base-select/components/list-mobile/helpers/index.js +2 -0
- package/modern/components/base-select/components/list-mobile/list-bottom-sheet-mobile.d.ts +15 -0
- package/modern/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +24 -0
- package/modern/components/base-select/components/list-mobile/list-mobile.d.ts +16 -0
- package/modern/components/base-select/components/list-mobile/list-mobile.js +17 -0
- package/modern/components/base-select/components/list-mobile/list-modal-mobile.d.ts +15 -0
- package/modern/components/base-select/components/list-mobile/list-modal-mobile.js +32 -0
- package/modern/components/base-select/components/list-mobile/types/types.d.ts +4 -0
- package/modern/components/base-select/components/list-mobile/types/types.js +1 -0
- package/modern/components/base-select/index.css +16 -14
- package/modern/components/base-select/mobile.css +19 -17
- package/modern/components/base-select/types/component-types.d.ts +50 -0
- package/modern/components/base-select/types/component-types.js +1 -0
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +15 -13
- package/modern/components/checkmark-mobile/Component.js +1 -1
- package/modern/components/checkmark-mobile/index.css +9 -7
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +15 -13
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +9 -7
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +12 -10
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +24 -22
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +16 -14
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +5 -3
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +21 -19
- package/modern/list-popover-desktop-380bb61b.d.ts +9 -0
- package/modern/list-popover-desktop-380bb61b.js +15 -0
- package/modern/mobile/Component.mobile.js +1 -1
- package/modern/mobile.module-5f7203b5.js +4 -0
- package/modern/presets/index.js +1 -1
- package/modern/presets/useSelectWithApply/hook.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +8 -6
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +8 -6
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/shared/index.js +1 -1
- package/package.json +6 -4
- package/presets/index.js +1 -1
- package/presets/useSelectWithApply/hook.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +8 -6
- package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/header/index.css +8 -6
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/shared/index.js +1 -1
- package/src/components/base-select/Component.tsx +49 -185
- package/src/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.tsx +24 -0
- package/src/components/base-select/components/list-desktop/list-popover-desktop.tsx +47 -0
- package/src/components/base-select/components/list-desktop/types/types.ts +3 -0
- package/src/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.tsx +32 -0
- package/src/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.tsx +30 -0
- package/src/components/base-select/components/list-mobile/helpers/index.ts +2 -0
- package/src/components/base-select/components/list-mobile/list-bottom-sheet-mobile.tsx +84 -0
- package/src/components/base-select/components/list-mobile/list-mobile.tsx +39 -0
- package/src/components/base-select/components/list-mobile/list-modal-mobile.tsx +94 -0
- package/src/components/base-select/components/list-mobile/types/types.ts +4 -0
- package/src/components/base-select/types/component-types.ts +39 -0
- /package/esm/{hook-86063cab.d.ts → hook-74830211.d.ts} +0 -0
- /package/esm/{hook-86063cab.js → hook-74830211.js} +0 -0
- /package/{hook-777449d0.d.ts → hook-b7a5b3a9.d.ts} +0 -0
- /package/{hook-777449d0.js → hook-b7a5b3a9.js} +0 -0
- /package/modern/{hook-1c546c40.d.ts → hook-d5ca0e82.d.ts} +0 -0
- /package/modern/{hook-1c546c40.js → hook-d5ca0e82.js} +0 -0
package/esm/shared/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-74830211.js';
|
|
4
4
|
export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
|
|
5
5
|
export { Option } from '../components/option/Component.js';
|
|
6
6
|
export { BaseOption } from '../components/base-option/Component.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { ListPopoverDesktopRestProps } from "./components/base-select/components/list-desktop/types/types";
|
|
3
|
+
type ListPopoverDesktopProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
fieldRef: RefObject<HTMLInputElement>;
|
|
6
|
+
renderOptionsList: () => ReactNode;
|
|
7
|
+
} & ListPopoverDesktopRestProps;
|
|
8
|
+
declare const ListPopoverDesktop: FC<ListPopoverDesktopProps>;
|
|
9
|
+
export { ListPopoverDesktop };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var cn = require('classnames');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
11
|
+
|
|
12
|
+
var styles = {"component":"select__component_16lus","popoverInner":"select__popoverInner_16lus","optionsListWrapper":"select__optionsListWrapper_16lus","optionsListBorder":"select__optionsListBorder_16lus","nativeSelect":"select__nativeSelect_16lus","block":"select__block_16lus","emptySearchPlaceholder":"select__emptySearchPlaceholder_16lus","search":"select__search_16lus"};
|
|
13
|
+
require('./components/base-select/index.css')
|
|
14
|
+
|
|
15
|
+
var ListPopoverDesktop = function (props) {
|
|
16
|
+
var Popover = props.Popover, open = props.open, popoverProps = props.popoverProps, fieldRef = props.fieldRef, _a = props.popoverPosition, popoverPosition = _a === void 0 ? 'bottom-start' : _a, _b = props.preventFlip, preventFlip = _b === void 0 ? true : _b, popperClassName = props.popperClassName, updatePopover = props.updatePopover, zIndexPopover = props.zIndexPopover, renderOptionsList = props.renderOptionsList;
|
|
17
|
+
if (Popover) {
|
|
18
|
+
return (React__default.default.createElement(Popover, tslib.__assign({}, popoverProps, { open: open, withTransition: false, anchorElement: fieldRef.current, position: popoverPosition, preventFlip: preventFlip, popperClassName: cn__default.default(styles.popoverInner, popperClassName), update: updatePopover, zIndex: zIndexPopover }), renderOptionsList()));
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.ListPopoverDesktop = ListPopoverDesktop;
|
|
24
|
+
exports.styles = styles;
|
|
@@ -16,7 +16,7 @@ var components_option_Component = require('../components/option/Component.js');
|
|
|
16
16
|
var components_optionsList_Component = require('../components/options-list/Component.js');
|
|
17
17
|
var components_search_Component = require('../components/search/Component.js');
|
|
18
18
|
var components_virtualOptionsList_Component = require('../components/virtual-options-list/Component.js');
|
|
19
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
19
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-b7a5b3a9.js');
|
|
20
20
|
var presets_useSelectWithApply_optionsListWithApply_header_Component = require('../presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
21
21
|
|
|
22
22
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var mobileStyles = {"sheet":"select__sheet_27lgi","sheetContent":"select__sheetContent_27lgi","modalContent":"select__modalContent_27lgi","sheetContainer":"select__sheetContainer_27lgi","optionsListWrapper":"select__optionsListWrapper_27lgi","optionsList":"select__optionsList_27lgi","scrollbar":"select__scrollbar_27lgi","search":"select__search_27lgi","option":"select__option_27lgi","optionGroup":"select__optionGroup_27lgi"};
|
|
4
|
+
require('./components/base-select/mobile.css')
|
|
5
|
+
|
|
6
|
+
exports.mobileStyles = mobileStyles;
|
|
@@ -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
|
-
const styles = {"arrow":"
|
|
5
|
+
const styles = {"arrow":"select__arrow_1y89b","open":"select__open_1y89b"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Arrow = ({ open, className }) => (React.createElement(ChevronDownMIcon, { className: cn(styles.arrow, className, { [styles.open]: open }) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: w7929 */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47); /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
/* Hard up */
|
|
14
14
|
} :root {
|
|
15
|
-
} :root {
|
|
15
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
16
|
+
|
|
17
|
+
/* новые значения, используйте их */
|
|
16
18
|
} :root {
|
|
17
19
|
} :root {
|
|
18
20
|
--arrow-transform: rotate(180deg);
|
|
@@ -26,13 +28,13 @@
|
|
|
26
28
|
/* checkmark */
|
|
27
29
|
|
|
28
30
|
/* optgroup */
|
|
29
|
-
} .
|
|
31
|
+
} .select__arrow_1y89b {
|
|
30
32
|
display: block;
|
|
31
33
|
width: 24px;
|
|
32
34
|
height: 24px;
|
|
33
35
|
color: var(--select-arrow-color);
|
|
34
36
|
|
|
35
37
|
transition: transform 0.15s ease-in-out, opacity 0.2s ease;
|
|
36
|
-
} .
|
|
38
|
+
} .select__open_1y89b {
|
|
37
39
|
transform: var(--arrow-transform);
|
|
38
40
|
}
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { Checkbox } from '@alfalab/core-components-checkbox/modern';
|
|
4
4
|
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
5
5
|
|
|
6
|
-
const styles = {"checkmark":"
|
|
6
|
+
const styles = {"checkmark":"select__checkmark_1wi8l","start":"select__start_1wi8l","center":"select__center_1wi8l","single":"select__single_1wi8l","selected":"select__selected_1wi8l"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const BaseCheckmark = ({ selected, disabled = false, className, multiple, align = 'center', }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1an4a */
|
|
2
2
|
: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 */ /* 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 */
|
|
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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
/* Hard up */
|
|
13
13
|
} :root {
|
|
14
|
-
} :root {
|
|
14
|
+
} :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 */
|
|
15
|
+
|
|
16
|
+
/* новые значения, используйте их */
|
|
15
17
|
} :root {
|
|
16
18
|
} :root {
|
|
17
19
|
} :root {
|
|
@@ -23,18 +25,18 @@
|
|
|
23
25
|
/* checkmark */
|
|
24
26
|
|
|
25
27
|
/* optgroup */
|
|
26
|
-
} .
|
|
28
|
+
} .select__checkmark_1wi8l {
|
|
27
29
|
flex-shrink: 0;
|
|
28
30
|
box-sizing: border-box
|
|
29
|
-
} .
|
|
31
|
+
} .select__checkmark_1wi8l.select__start_1wi8l {
|
|
30
32
|
align-self: start;
|
|
31
|
-
} .
|
|
33
|
+
} .select__checkmark_1wi8l.select__center_1wi8l {
|
|
32
34
|
align-self: center;
|
|
33
|
-
} .
|
|
35
|
+
} .select__single_1wi8l {
|
|
34
36
|
display: flex;
|
|
35
37
|
align-items: center;
|
|
36
38
|
justify-content: center;
|
|
37
39
|
opacity: 0
|
|
38
|
-
} .
|
|
40
|
+
} .select__single_1wi8l.select__selected_1wi8l {
|
|
39
41
|
opacity: 1;
|
|
40
42
|
}
|
|
@@ -2,7 +2,7 @@ import React, { isValidElement } from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { BaseCheckmark } from '../base-checkmark/Component.js';
|
|
4
4
|
|
|
5
|
-
const styles = {"option":"
|
|
5
|
+
const styles = {"option":"select__option_1lyt9","disabled":"select__disabled_1lyt9","checkmarkBefore":"select__checkmarkBefore_1lyt9","mobile":"select__mobile_1lyt9","checkmarkAfter":"select__checkmarkAfter_1lyt9","textContent":"select__textContent_1lyt9","selected":"select__selected_1lyt9","highlighted":"select__highlighted_1lyt9","checkmarkBeforeContent":"select__checkmarkBeforeContent_1lyt9","checkmarkAfterContent":"select__checkmarkAfterContent_1lyt9","content":"select__content_1lyt9"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const BaseOption = ({ className, option, children, selected, highlighted, disabled, multiple, Checkmark = BaseCheckmark, checkmarkPosition = multiple ? 'before' : 'after', align = 'center', innerProps, dataTestId, mobile = false, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 195ep */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-modal-bg-primary: #fff;
|
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
/* Hard up */
|
|
18
18
|
} :root {
|
|
19
|
-
} :root {
|
|
20
|
-
--gap-s: 12px;
|
|
21
|
-
--gap-m: 16px;
|
|
22
|
-
--gap-l: 20px;
|
|
19
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */
|
|
20
|
+
--gap-s: 12px; /* deprecated */ /* deprecated */
|
|
21
|
+
--gap-m: 16px; /* deprecated */
|
|
22
|
+
--gap-l: 20px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
23
|
+
|
|
24
|
+
/* новые значения, используйте их */
|
|
23
25
|
} :root {
|
|
24
26
|
} :root {
|
|
25
27
|
--disabled-cursor: not-allowed;
|
|
@@ -43,7 +45,7 @@
|
|
|
43
45
|
/* checkmark */
|
|
44
46
|
|
|
45
47
|
/* optgroup */
|
|
46
|
-
} .
|
|
48
|
+
} .select__option_1lyt9 {
|
|
47
49
|
font-size: 16px;
|
|
48
50
|
line-height: 20px;
|
|
49
51
|
font-weight: 400;
|
|
@@ -57,36 +59,36 @@
|
|
|
57
59
|
position: relative;
|
|
58
60
|
cursor: pointer;
|
|
59
61
|
min-height: var(--size-s-height)
|
|
60
|
-
} .
|
|
62
|
+
} .select__option_1lyt9:not(.select__disabled_1lyt9):active {
|
|
61
63
|
background: var(--select-option-active-background);
|
|
62
64
|
color: var(--select-option-active-color);
|
|
63
|
-
} .
|
|
65
|
+
} .select__option_1lyt9.select__checkmarkBefore_1lyt9 {
|
|
64
66
|
padding: 0 0 0 var(--gap-s)
|
|
65
|
-
} .
|
|
67
|
+
} .select__option_1lyt9.select__checkmarkBefore_1lyt9.select__mobile_1lyt9 {
|
|
66
68
|
padding-left: var(--gap-m);
|
|
67
|
-
} .
|
|
69
|
+
} .select__option_1lyt9.select__checkmarkAfter_1lyt9.select__checkmarkAfter_1lyt9 {
|
|
68
70
|
padding: 0 var(--gap-s) 0 0
|
|
69
|
-
} .
|
|
71
|
+
} .select__option_1lyt9.select__checkmarkAfter_1lyt9.select__checkmarkAfter_1lyt9.select__mobile_1lyt9 {
|
|
70
72
|
padding-right: var(--gap-l);
|
|
71
|
-
} .
|
|
73
|
+
} .select__option_1lyt9.select__textContent_1lyt9 {
|
|
72
74
|
padding: var(--gap-s)
|
|
73
|
-
} .
|
|
75
|
+
} .select__option_1lyt9.select__textContent_1lyt9.select__mobile_1lyt9 {
|
|
74
76
|
padding: var(--gap-m) var(--gap-l) var(--gap-m) var(--gap-m);
|
|
75
|
-
} .
|
|
77
|
+
} .select__selected_1lyt9 {
|
|
76
78
|
background: var(--select-option-selected-background);
|
|
77
79
|
color: var(--select-option-selected-color);
|
|
78
80
|
cursor: default;
|
|
79
|
-
} .
|
|
81
|
+
} .select__highlighted_1lyt9 {
|
|
80
82
|
background: var(--select-option-hover-background);
|
|
81
83
|
color: var(--select-option-hover-color);
|
|
82
|
-
} .
|
|
84
|
+
} .select__disabled_1lyt9 {
|
|
83
85
|
cursor: var(--disabled-cursor);
|
|
84
86
|
background: var(--select-option-disabled-background);
|
|
85
87
|
color: var(--select-option-disabled-color);
|
|
86
|
-
} .
|
|
88
|
+
} .select__checkmarkBeforeContent_1lyt9 {
|
|
87
89
|
margin-right: var(--gap-s);
|
|
88
|
-
} .
|
|
90
|
+
} .select__checkmarkAfterContent_1lyt9 {
|
|
89
91
|
margin-left: var(--gap-s);
|
|
90
|
-
} .
|
|
92
|
+
} .select__content_1lyt9 {
|
|
91
93
|
flex: 1;
|
|
92
94
|
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { BottomSheetProps } from "@alfalab/core-components-bottom-sheet";
|
|
5
|
-
import { ModalMobileProps } from "@alfalab/core-components-modal/mobile";
|
|
6
|
-
import { ModalContentProps, ModalFooterProps, ModalHeaderProps } from "@alfalab/core-components-modal/shared";
|
|
7
|
-
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
8
|
-
import { AdditionalMobileProps, BaseSelectProps, BottomSheetSelectMobileProps, ModalSelectMobileProps } from "../../typings";
|
|
9
|
-
declare const BaseSelect: React.ForwardRefExoticComponent<BaseSelectProps & AdditionalMobileProps & BottomSheetSelectMobileProps & ModalSelectMobileProps & {
|
|
3
|
+
declare const BaseSelect: React.ForwardRefExoticComponent<import("../../typings").BaseSelectProps & import("../../typings").AdditionalMobileProps & import("../../typings").BottomSheetSelectMobileProps & import("../../typings").ModalSelectMobileProps & {
|
|
10
4
|
isBottomSheet?: boolean | undefined;
|
|
11
|
-
view:
|
|
12
|
-
Popover?: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
13
|
-
BottomSheet?: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
14
|
-
ModalMobile?: (React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
|
|
15
|
-
Header: FC<ModalHeaderProps>;
|
|
16
|
-
Footer: FC<ModalFooterProps>;
|
|
17
|
-
Content: FC<
|
|
5
|
+
view: "mobile" | "desktop";
|
|
6
|
+
Popover?: React.ForwardRefExoticComponent<import("@alfalab/core-components-popover").PopoverProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
7
|
+
BottomSheet?: React.ForwardRefExoticComponent<import("@alfalab/core-components-bottom-sheet").BottomSheetProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
8
|
+
ModalMobile?: (React.ForwardRefExoticComponent<import("./types/component-types").ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
|
|
9
|
+
Header: React.FC<import("@alfalab/core-components-modal/shared").ModalHeaderProps>;
|
|
10
|
+
Footer: React.FC<import("@alfalab/core-components-modal/shared").ModalFooterProps>;
|
|
11
|
+
Content: React.FC<import("./types/component-types").ContentProps>;
|
|
18
12
|
}) | undefined;
|
|
19
13
|
} & React.RefAttributes<unknown>>;
|
|
20
14
|
export { BaseSelect };
|
|
@@ -8,12 +8,12 @@ import { fnUtils, getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
|
8
8
|
import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
|
|
9
9
|
import { defaultAccessor, defaultFilterFn, defaultGroupAccessor, processOptions, isGroup } from '../../utils.js';
|
|
10
10
|
import { NativeSelect } from '../native-select/Component.js';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
import { getListPopoverDesktopProps } from './components/list-desktop/helpers/get-list-popover-desktop-props.js';
|
|
12
|
+
import { s as styles, L as ListPopoverDesktop } from '../../list-popover-desktop-380bb61b.js';
|
|
13
|
+
import { getListModalMobileProps } from './components/list-mobile/helpers/get-list-modal-mobile-props.js';
|
|
14
|
+
import { getListBottomSheetMobileProps } from './components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.js';
|
|
15
|
+
import { ListMobile } from './components/list-mobile/list-mobile.js';
|
|
16
|
+
import { m as mobileStyles } from '../../mobile.module-5f7203b5.js';
|
|
17
17
|
|
|
18
18
|
/* eslint-disable no-nested-ternary */
|
|
19
19
|
const itemToString = (option) => (option ? option.key : '');
|
|
@@ -21,7 +21,9 @@ const isItemDisabled = (option) => Boolean(option?.disabled);
|
|
|
21
21
|
const BaseSelect = forwardRef(
|
|
22
22
|
// TODO: 😭
|
|
23
23
|
// eslint-disable-next-line complexity
|
|
24
|
-
(
|
|
24
|
+
(props, ref) => {
|
|
25
|
+
const { dataTestId, className, fieldClassName, optionGroupClassName, optionsListClassName, optionClassName, options, autocomplete = false, multiple = false, allowUnselect = false, disabled = false, closeOnSelect = !multiple, circularNavigation = false, nativeSelect = false, defaultOpen = false, open: openProp, optionsListWidth = 'content', name, id, selected, size = 48, optionsSize = size, error, hint, block, label, labelView, placeholder, fieldProps = {}, optionsListProps = {}, optionProps = {}, searchProps = {}, showSearch = false, valueRenderer, onChange, onOpen, onFocus, onBlur, onScroll, Arrow, Field = () => null, OptionsList = () => null, Optgroup = () => null, Option = () => null, Search = () => null, showEmptyOptionsList = false, visibleOptions, view, isBottomSheet = true, modalProps, bottomSheetProps, limitDynamicOptionGroupSize, } = props;
|
|
26
|
+
const shouldSearchBlurRef = useRef(true);
|
|
25
27
|
const rootRef = useRef(null);
|
|
26
28
|
const fieldRef = useRef(null);
|
|
27
29
|
const listRef = useRef(null);
|
|
@@ -262,6 +264,14 @@ const BaseSelect = forwardRef(
|
|
|
262
264
|
index,
|
|
263
265
|
item: option,
|
|
264
266
|
onMouseDown: (event) => event.preventDefault(),
|
|
267
|
+
onClick: () => {
|
|
268
|
+
if (view === 'mobile' || !showSearch || multiple)
|
|
269
|
+
return;
|
|
270
|
+
shouldSearchBlurRef.current = false;
|
|
271
|
+
searchRef.current?.blur();
|
|
272
|
+
shouldSearchBlurRef.current = true;
|
|
273
|
+
fieldRef.current?.focus();
|
|
274
|
+
},
|
|
265
275
|
}),
|
|
266
276
|
multiple,
|
|
267
277
|
index,
|
|
@@ -330,6 +340,8 @@ const BaseSelect = forwardRef(
|
|
|
330
340
|
searchProps?.componentProps?.onChange?.(event, payload);
|
|
331
341
|
};
|
|
332
342
|
const handleBlur = (event) => {
|
|
343
|
+
if (!shouldSearchBlurRef.current)
|
|
344
|
+
return;
|
|
333
345
|
searchProps.componentProps?.onBlur?.(event);
|
|
334
346
|
handleFieldBlur(event);
|
|
335
347
|
};
|
|
@@ -366,52 +378,6 @@ const BaseSelect = forwardRef(
|
|
|
366
378
|
}), emptyPlaceholder: renderEmptyPlaceholder(), onScroll: onScroll, search: search, multiple: multiple, limitDynamicOptionGroupSize: limitDynamicOptionGroupSize }),
|
|
367
379
|
view === 'desktop' && React.createElement("div", { className: styles.optionsListBorder })));
|
|
368
380
|
};
|
|
369
|
-
const renderInPopover = () => {
|
|
370
|
-
if (!nativeSelect && Popover) {
|
|
371
|
-
return (React.createElement(Popover, { ...popoverProps, open: open, withTransition: false, anchorElement: fieldRef.current, position: popoverPosition, preventFlip: preventFlip, popperClassName: cn(styles.popoverInner, popperClassName), update: updatePopover, zIndex: zIndexPopover }, renderOptionsList()));
|
|
372
|
-
}
|
|
373
|
-
return null;
|
|
374
|
-
};
|
|
375
|
-
const renderInBottomSheet = () => {
|
|
376
|
-
if (!nativeSelect && BottomSheet) {
|
|
377
|
-
return (React.createElement(BottomSheet, { dataTestId: getDataTestId(dataTestId, 'bottom-sheet'), open: open, className: mobileStyles.sheet, contentClassName: mobileStyles.sheetContent, containerClassName: mobileStyles.sheetContainer, title: label || placeholder, actionButton: footer, stickyHeader: true, hasCloser: true, swipeable: swipeable, initialHeight: showSearch ? 'full' : 'default', ...bottomSheetProps, sheetContainerRef: menuRef, scrollableContainerRef: scrollableContainerRef, onClose: () => {
|
|
378
|
-
closeMenu();
|
|
379
|
-
bottomSheetProps?.onClose?.();
|
|
380
|
-
}, transitionProps: {
|
|
381
|
-
...bottomSheetProps?.transitionProps,
|
|
382
|
-
onEntered: handleEntered,
|
|
383
|
-
}, bottomAddons: React.createElement(React.Fragment, null,
|
|
384
|
-
renderSearch(),
|
|
385
|
-
flatOptions.length > 0 && bottomSheetProps?.bottomAddons), containerProps: {
|
|
386
|
-
...bottomSheetProps?.containerProps,
|
|
387
|
-
onScroll,
|
|
388
|
-
} }, renderOptionsList()));
|
|
389
|
-
}
|
|
390
|
-
return null;
|
|
391
|
-
};
|
|
392
|
-
const renderInModalMobile = () => {
|
|
393
|
-
if (!nativeSelect && ModalMobile) {
|
|
394
|
-
return (React.createElement(ModalMobile, { dataTestId: getDataTestId(dataTestId, 'modal'), open: open, hasCloser: true, ...modalProps, componentRef: menuRef, onClose: (...args) => {
|
|
395
|
-
closeMenu();
|
|
396
|
-
modalProps?.onClose?.(...args);
|
|
397
|
-
}, contentClassName: cn(mobileStyles.sheetContent, modalProps?.contentClassName), ref: mergeRefs([
|
|
398
|
-
scrollableContainerRef,
|
|
399
|
-
modalProps?.ref,
|
|
400
|
-
]), wrapperProps: {
|
|
401
|
-
...modalProps?.wrapperProps,
|
|
402
|
-
onScroll,
|
|
403
|
-
}, transitionProps: {
|
|
404
|
-
...modalProps?.transitionProps,
|
|
405
|
-
onEntered: handleEntered,
|
|
406
|
-
} },
|
|
407
|
-
React.createElement(ModalMobile.Header, { hasCloser: true, sticky: true, ...modalHeaderProps, title: undefined, bottomAddons: React.createElement(React.Fragment, null,
|
|
408
|
-
renderSearch(),
|
|
409
|
-
flatOptions.length > 0 && modalHeaderProps?.bottomAddons) }, modalHeaderProps?.title || label || placeholder),
|
|
410
|
-
React.createElement(ModalMobile.Content, { flex: true, className: mobileStyles.modalContent }, renderOptionsList()),
|
|
411
|
-
modalFooterProps?.children && React.createElement(ModalMobile.Footer, { ...modalFooterProps })));
|
|
412
|
-
}
|
|
413
|
-
return null;
|
|
414
|
-
};
|
|
415
381
|
return (React.createElement("div", { ...(disabled && { 'aria-disabled': true }), "aria-expanded": inputProps['aria-expanded'], "aria-haspopup": 'listbox', role: inputProps.role, className: cn(styles.component, { [styles.block]: block }, className), ref: rootRef, onKeyDown: disabled ? undefined : handleFieldKeyDown, tabIndex: -1, "data-test-id": getDataTestId(dataTestId) },
|
|
416
382
|
nativeSelect && renderNativeSelect(),
|
|
417
383
|
React.createElement(Field, { selectedMultiple: selectedItems, selected: selectedItems[0], setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, multiple: multiple, open: open, disabled: disabled, size: size, placeholder: placeholder, label: label && React.createElement("span", { ...getLabelProps() }, label), labelView: labelView, Arrow: Arrow && React.createElement(Arrow, { open: open }), error: error, hint: hint, valueRenderer: valueRenderer, className: fieldClassName, innerProps: {
|
|
@@ -428,9 +394,10 @@ const BaseSelect = forwardRef(
|
|
|
428
394
|
: undefined,
|
|
429
395
|
}, dataTestId: getDataTestId(dataTestId, 'field'), ...fieldProps }),
|
|
430
396
|
name && !nativeSelect && renderValue(),
|
|
431
|
-
view === 'desktop' &&
|
|
432
|
-
view === 'mobile' &&
|
|
433
|
-
|
|
397
|
+
view === 'desktop' && !nativeSelect && (React.createElement(ListPopoverDesktop, { ...getListPopoverDesktopProps(props), open: open, fieldRef: fieldRef, renderOptionsList: renderOptionsList })),
|
|
398
|
+
view === 'mobile' && (React.createElement(ListMobile, { baseProps: isBottomSheet
|
|
399
|
+
? getListBottomSheetMobileProps(props)
|
|
400
|
+
: getListModalMobileProps(props), open: open, menuRef: menuRef, scrollableContainerRef: scrollableContainerRef, flatOptions: flatOptions, renderOptionsList: renderOptionsList, renderSearch: renderSearch, closeMenu: closeMenu, handleEntered: handleEntered }))));
|
|
434
401
|
});
|
|
435
402
|
|
|
436
403
|
export { BaseSelect };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentProps } from "../../../types/component-types";
|
|
3
|
+
declare const getListPopoverDesktopProps: (props: ComponentProps) => {
|
|
4
|
+
Popover: import("react").ForwardRefExoticComponent<import("@alfalab/core-components-popover").PopoverProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
5
|
+
popoverProps: Omit<import("@alfalab/core-components-popover").PopoverProps, "className" | "dataTestId" | "anchorElement" | "position" | "preventFlip" | "open" | "update" | "zIndex"> | undefined;
|
|
6
|
+
popoverPosition: import("@alfalab/core-components-popover").Position;
|
|
7
|
+
preventFlip: boolean;
|
|
8
|
+
popperClassName: string | undefined;
|
|
9
|
+
updatePopover: import("react").MutableRefObject<(() => void) | undefined> | undefined;
|
|
10
|
+
zIndexPopover: number | undefined;
|
|
11
|
+
};
|
|
12
|
+
export { getListPopoverDesktopProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// отделяем необходимые пропсы для передачи в компонент
|
|
2
|
+
const getListPopoverDesktopProps = (props) => {
|
|
3
|
+
const { Popover, popoverProps, popoverPosition = 'bottom-start', preventFlip = true, popperClassName, updatePopover, zIndexPopover, } = props;
|
|
4
|
+
return {
|
|
5
|
+
Popover,
|
|
6
|
+
popoverProps,
|
|
7
|
+
popoverPosition,
|
|
8
|
+
preventFlip,
|
|
9
|
+
popperClassName,
|
|
10
|
+
updatePopover,
|
|
11
|
+
zIndexPopover,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { getListPopoverDesktopProps };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentProps } from "../../../types/component-types";
|
|
3
|
+
declare const getListBottomSheetMobileProps: (props: ComponentProps) => {
|
|
4
|
+
BottomSheet: import("react").ForwardRefExoticComponent<import("@alfalab/core-components-bottom-sheet").BottomSheetProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
5
|
+
dataTestId: string | undefined;
|
|
6
|
+
label: import("react").ReactNode;
|
|
7
|
+
placeholder: string | undefined;
|
|
8
|
+
footer: import("react").ReactNode;
|
|
9
|
+
swipeable: boolean | undefined;
|
|
10
|
+
showSearch: boolean | undefined;
|
|
11
|
+
bottomSheetProps: Partial<import("@alfalab/core-components-bottom-sheet").BottomSheetProps> | undefined;
|
|
12
|
+
isBottomSheet: boolean;
|
|
13
|
+
nativeSelect: boolean;
|
|
14
|
+
onScroll: ((event: import("react").MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
15
|
+
};
|
|
16
|
+
export { getListBottomSheetMobileProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// отделяем необходимые пропсы для передачи в компонент
|
|
2
|
+
const getListBottomSheetMobileProps = (props) => {
|
|
3
|
+
const { BottomSheet, dataTestId, label, placeholder, footer, swipeable, showSearch, bottomSheetProps, isBottomSheet = true, nativeSelect = false, onScroll, } = props;
|
|
4
|
+
return {
|
|
5
|
+
BottomSheet,
|
|
6
|
+
dataTestId,
|
|
7
|
+
label,
|
|
8
|
+
placeholder,
|
|
9
|
+
footer,
|
|
10
|
+
swipeable,
|
|
11
|
+
showSearch,
|
|
12
|
+
bottomSheetProps,
|
|
13
|
+
isBottomSheet,
|
|
14
|
+
nativeSelect,
|
|
15
|
+
onScroll,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { getListBottomSheetMobileProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentProps } from "../../../types/component-types";
|
|
3
|
+
declare const getListModalMobileProps: (props: ComponentProps) => {
|
|
4
|
+
ModalMobile: (import("react").ForwardRefExoticComponent<import("../../../types/component-types").ModalMobileProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
|
+
Header: import("react").FC<import("@alfalab/core-components-modal/shared").ModalHeaderProps>;
|
|
6
|
+
Footer: import("react").FC<import("@alfalab/core-components-modal/shared").ModalFooterProps>;
|
|
7
|
+
Content: import("react").FC<import("../../../types/component-types").ContentProps>;
|
|
8
|
+
}) | undefined;
|
|
9
|
+
dataTestId: string | undefined;
|
|
10
|
+
modalProps: Partial<import("@alfalab/core-components-base-modal").BaseModalProps & {
|
|
11
|
+
size?: "s" | "m" | "l" | "xl" | 500 | "fullscreen" | 600 | 800 | 1140 | undefined;
|
|
12
|
+
fullscreen?: boolean | undefined;
|
|
13
|
+
fixedPosition?: boolean | undefined;
|
|
14
|
+
hasCloser?: boolean | undefined;
|
|
15
|
+
iOSLock?: boolean | undefined;
|
|
16
|
+
} & {
|
|
17
|
+
breakpoint?: number | undefined;
|
|
18
|
+
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
19
|
+
} & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
20
|
+
modalHeaderProps: Partial<import("@alfalab/core-components-modal/shared").ModalHeaderProps> | undefined;
|
|
21
|
+
modalFooterProps: Partial<import("@alfalab/core-components-modal/shared").ModalFooterProps> | undefined;
|
|
22
|
+
label: import("react").ReactNode;
|
|
23
|
+
placeholder: string | undefined;
|
|
24
|
+
isBottomSheet: boolean;
|
|
25
|
+
nativeSelect: boolean;
|
|
26
|
+
onScroll: ((event: import("react").MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
27
|
+
};
|
|
28
|
+
export { getListModalMobileProps };
|