@alfalab/core-components-select 17.8.2 → 17.8.4
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-f713543b.d.ts +9 -0
- package/esm/list-popover-desktop-f713543b.js +16 -0
- package/esm/mobile/Component.mobile.js +1 -1
- package/esm/mobile.module-98003396.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-11171d84.d.ts +9 -0
- package/list-popover-desktop-11171d84.js +24 -0
- package/mobile/Component.mobile.js +1 -1
- package/mobile.module-8f94cd8b.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-1f55335b.d.ts +9 -0
- package/modern/list-popover-desktop-1f55335b.js +15 -0
- package/modern/mobile/Component.mobile.js +1 -1
- package/modern/mobile.module-815026ad.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 +8 -6
- 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-9d222e75.d.ts} +0 -0
- /package/esm/{hook-86063cab.js → hook-9d222e75.js} +0 -0
- /package/{hook-777449d0.d.ts → hook-01942cdc.d.ts} +0 -0
- /package/{hook-777449d0.js → hook-01942cdc.js} +0 -0
- /package/modern/{hook-1c546c40.d.ts → hook-ea5654cb.d.ts} +0 -0
- /package/modern/{hook-1c546c40.js → hook-ea5654cb.js} +0 -0
package/modern/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// отделяем необходимые пропсы для передачи в компонент
|
|
2
|
+
const getListModalMobileProps = (props) => {
|
|
3
|
+
const { ModalMobile, dataTestId, modalProps, modalHeaderProps, modalFooterProps, label, placeholder, isBottomSheet = true, nativeSelect = false, onScroll, } = props;
|
|
4
|
+
return {
|
|
5
|
+
ModalMobile,
|
|
6
|
+
dataTestId,
|
|
7
|
+
modalProps,
|
|
8
|
+
modalHeaderProps,
|
|
9
|
+
modalFooterProps,
|
|
10
|
+
label,
|
|
11
|
+
placeholder,
|
|
12
|
+
isBottomSheet,
|
|
13
|
+
nativeSelect,
|
|
14
|
+
onScroll,
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { getListModalMobileProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { OptionShape } from "../../../../typings";
|
|
3
|
+
import { ListBottomSheetMobileRestProps } from "./types/types";
|
|
4
|
+
type ListMobileProps = {
|
|
5
|
+
open: boolean;
|
|
6
|
+
menuRef: RefObject<HTMLDivElement>;
|
|
7
|
+
scrollableContainerRef: RefObject<HTMLDivElement>;
|
|
8
|
+
flatOptions: OptionShape[];
|
|
9
|
+
closeMenu: () => void;
|
|
10
|
+
handleEntered: (node: HTMLElement, isAppearing: boolean) => void;
|
|
11
|
+
renderSearch: () => ReactNode;
|
|
12
|
+
renderOptionsList: () => ReactNode;
|
|
13
|
+
} & ListBottomSheetMobileRestProps;
|
|
14
|
+
declare const ListBottomSheetMobile: FC<ListMobileProps>;
|
|
15
|
+
export { ListBottomSheetMobile };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
3
|
+
import { m as mobileStyles } from '../../../../mobile.module-815026ad.js';
|
|
4
|
+
|
|
5
|
+
const ListBottomSheetMobile = (props) => {
|
|
6
|
+
const { BottomSheet, dataTestId, open, label, placeholder, footer, swipeable, showSearch, bottomSheetProps, menuRef, scrollableContainerRef, onScroll, flatOptions, closeMenu, handleEntered, renderSearch, renderOptionsList, } = props;
|
|
7
|
+
if (BottomSheet) {
|
|
8
|
+
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: () => {
|
|
9
|
+
closeMenu();
|
|
10
|
+
bottomSheetProps?.onClose?.();
|
|
11
|
+
}, transitionProps: {
|
|
12
|
+
...bottomSheetProps?.transitionProps,
|
|
13
|
+
onEntered: handleEntered,
|
|
14
|
+
}, bottomAddons: React.createElement(React.Fragment, null,
|
|
15
|
+
renderSearch(),
|
|
16
|
+
flatOptions.length > 0 && bottomSheetProps?.bottomAddons), containerProps: {
|
|
17
|
+
...bottomSheetProps?.containerProps,
|
|
18
|
+
onScroll,
|
|
19
|
+
} }, renderOptionsList()));
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { ListBottomSheetMobile };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { OptionShape } from "../../../../typings";
|
|
3
|
+
import { ListBottomSheetMobileRestProps, ListModalMobileRestProps } from "./types/types";
|
|
4
|
+
type ListMobileProps = {
|
|
5
|
+
baseProps: ListBottomSheetMobileRestProps | ListModalMobileRestProps;
|
|
6
|
+
open: boolean;
|
|
7
|
+
menuRef: RefObject<HTMLDivElement>;
|
|
8
|
+
scrollableContainerRef: RefObject<HTMLDivElement>;
|
|
9
|
+
flatOptions: OptionShape[];
|
|
10
|
+
closeMenu: () => void;
|
|
11
|
+
handleEntered: (node: HTMLElement, isAppearing: boolean) => void;
|
|
12
|
+
renderSearch: () => ReactNode;
|
|
13
|
+
renderOptionsList: () => ReactNode;
|
|
14
|
+
};
|
|
15
|
+
declare const ListMobile: FC<ListMobileProps>;
|
|
16
|
+
export { ListMobile };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ListBottomSheetMobile } from './list-bottom-sheet-mobile.js';
|
|
3
|
+
import { ListModalMobile } from './list-modal-mobile.js';
|
|
4
|
+
|
|
5
|
+
const ListMobile = (props) => {
|
|
6
|
+
const { baseProps, ...restProps } = props;
|
|
7
|
+
const { isBottomSheet, nativeSelect } = baseProps;
|
|
8
|
+
if (isBottomSheet && !nativeSelect) {
|
|
9
|
+
return (React.createElement(ListBottomSheetMobile, { ...baseProps, ...restProps }));
|
|
10
|
+
}
|
|
11
|
+
if (!isBottomSheet && !nativeSelect) {
|
|
12
|
+
return React.createElement(ListModalMobile, { ...baseProps, ...restProps });
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { ListMobile };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { OptionShape } from "../../../../typings";
|
|
3
|
+
import { ListModalMobileRestProps } from "./types/types";
|
|
4
|
+
type ListModalMobileProps = {
|
|
5
|
+
open: boolean;
|
|
6
|
+
menuRef: RefObject<HTMLDivElement>;
|
|
7
|
+
scrollableContainerRef: RefObject<HTMLDivElement>;
|
|
8
|
+
flatOptions: OptionShape[];
|
|
9
|
+
closeMenu: () => void;
|
|
10
|
+
handleEntered: (node: HTMLElement, isAppearing: boolean) => void;
|
|
11
|
+
renderSearch: () => ReactNode;
|
|
12
|
+
renderOptionsList: () => ReactNode;
|
|
13
|
+
} & ListModalMobileRestProps;
|
|
14
|
+
declare const ListModalMobile: FC<ListModalMobileProps>;
|
|
15
|
+
export { ListModalMobile };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import mergeRefs from 'react-merge-refs';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
5
|
+
import { m as mobileStyles } from '../../../../mobile.module-815026ad.js';
|
|
6
|
+
|
|
7
|
+
const ListModalMobile = (props) => {
|
|
8
|
+
const { ModalMobile, dataTestId, open, modalProps, modalHeaderProps, modalFooterProps, menuRef, scrollableContainerRef, label, placeholder, onScroll, flatOptions, closeMenu, handleEntered, renderSearch, renderOptionsList, } = props;
|
|
9
|
+
if (ModalMobile) {
|
|
10
|
+
return (React.createElement(ModalMobile, { dataTestId: getDataTestId(dataTestId, 'modal'), open: open, hasCloser: true, ...modalProps, componentRef: menuRef, onClose: (...args) => {
|
|
11
|
+
closeMenu();
|
|
12
|
+
modalProps?.onClose?.(...args);
|
|
13
|
+
}, contentClassName: cn(mobileStyles.sheetContent, modalProps?.contentClassName), ref: mergeRefs([
|
|
14
|
+
scrollableContainerRef,
|
|
15
|
+
modalProps?.ref,
|
|
16
|
+
]), wrapperProps: {
|
|
17
|
+
...modalProps?.wrapperProps,
|
|
18
|
+
onScroll,
|
|
19
|
+
}, transitionProps: {
|
|
20
|
+
...modalProps?.transitionProps,
|
|
21
|
+
onEntered: handleEntered,
|
|
22
|
+
} },
|
|
23
|
+
React.createElement(ModalMobile.Header, { hasCloser: true, sticky: true, ...modalHeaderProps, title: undefined, bottomAddons: React.createElement(React.Fragment, null,
|
|
24
|
+
renderSearch(),
|
|
25
|
+
flatOptions.length > 0 && modalHeaderProps?.bottomAddons) }, modalHeaderProps?.title || label || placeholder),
|
|
26
|
+
React.createElement(ModalMobile.Content, { flex: true, className: mobileStyles.modalContent }, renderOptionsList()),
|
|
27
|
+
modalFooterProps?.children && React.createElement(ModalMobile.Footer, { ...modalFooterProps })));
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { ListModalMobile };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { getListBottomSheetMobileProps, getListModalMobileProps } from "../helpers/index";
|
|
2
|
+
type ListBottomSheetMobileRestProps = ReturnType<typeof getListBottomSheetMobileProps>;
|
|
3
|
+
type ListModalMobileRestProps = ReturnType<typeof getListModalMobileProps>;
|
|
4
|
+
export { ListBottomSheetMobileRestProps, ListModalMobileRestProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 3ywft */
|
|
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,9 +16,11 @@
|
|
|
16
16
|
/* Hard up */
|
|
17
17
|
} :root {
|
|
18
18
|
--border-radius-m: 8px;
|
|
19
|
-
} :root {
|
|
20
|
-
--gap-2xs: 4px;
|
|
21
|
-
--gap-s: 12px;
|
|
19
|
+
} :root { /* deprecated */
|
|
20
|
+
--gap-2xs: 4px; /* deprecated */ /* deprecated */
|
|
21
|
+
--gap-s: 12px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
22
|
+
|
|
23
|
+
/* новые значения, используйте их */
|
|
22
24
|
} :root {
|
|
23
25
|
} :root {
|
|
24
26
|
} :root {
|
|
@@ -37,21 +39,21 @@
|
|
|
37
39
|
/* checkmark */
|
|
38
40
|
|
|
39
41
|
/* optgroup */
|
|
40
|
-
} .
|
|
42
|
+
} .select__component_1543y {
|
|
41
43
|
width: max-content;
|
|
42
44
|
position: relative;
|
|
43
45
|
outline: 0;
|
|
44
46
|
max-width: 100%;
|
|
45
|
-
} .
|
|
47
|
+
} .select__popoverInner_1543y {
|
|
46
48
|
padding-top: var(--select-options-list-offset);
|
|
47
49
|
padding-bottom: var(--select-options-list-offset);
|
|
48
50
|
background: transparent;
|
|
49
51
|
border-radius: 0;
|
|
50
52
|
position: relative;
|
|
51
|
-
} .
|
|
53
|
+
} .select__popoverInner_1543y.select__popoverInner_1543y {
|
|
52
54
|
box-shadow: none;
|
|
53
55
|
border: none;
|
|
54
|
-
} .
|
|
56
|
+
} .select__optionsListWrapper_1543y {
|
|
55
57
|
position: relative;
|
|
56
58
|
padding-top: var(--select-options-list-top-padding);
|
|
57
59
|
padding-bottom: var(--select-options-list-bottom-padding);
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
background: var(--select-option-background);
|
|
61
63
|
overflow: hidden;
|
|
62
64
|
will-change: transform;
|
|
63
|
-
} .
|
|
65
|
+
} .select__optionsListBorder_1543y {
|
|
64
66
|
position: absolute;
|
|
65
67
|
top: 0;
|
|
66
68
|
right: 0;
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
box-shadow: inset 0 0 0 1px var(--color-light-neutral-300);
|
|
70
72
|
border-radius: inherit;
|
|
71
73
|
pointer-events: none;
|
|
72
|
-
} .
|
|
74
|
+
} .select__nativeSelect_1543y {
|
|
73
75
|
opacity: 0;
|
|
74
76
|
overflow: hidden;
|
|
75
77
|
position: absolute;
|
|
@@ -82,12 +84,12 @@
|
|
|
82
84
|
height: 100%;
|
|
83
85
|
cursor: pointer;
|
|
84
86
|
z-index: 1;
|
|
85
|
-
} .
|
|
87
|
+
} .select__block_1543y {
|
|
86
88
|
width: 100%;
|
|
87
|
-
} .
|
|
89
|
+
} .select__emptySearchPlaceholder_1543y {
|
|
88
90
|
text-align: center;
|
|
89
|
-
} .
|
|
91
|
+
} .select__search_1543y {
|
|
90
92
|
margin: var(--gap-s) var(--gap-s) 0
|
|
91
|
-
} .
|
|
93
|
+
} .select__search_1543y:last-child {
|
|
92
94
|
margin-bottom: var(--gap-s);
|
|
93
95
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 12gid */
|
|
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,11 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
/* Hard up */
|
|
13
13
|
} :root {
|
|
14
|
-
} :root {
|
|
15
|
-
--gap-2xs: 4px;
|
|
16
|
-
--gap-xs: 8px;
|
|
17
|
-
--gap-m: 16px;
|
|
18
|
-
--gap-l: 20px;
|
|
14
|
+
} :root { /* deprecated */
|
|
15
|
+
--gap-2xs: 4px; /* deprecated */
|
|
16
|
+
--gap-xs: 8px; /* deprecated */ /* deprecated */ /* deprecated */
|
|
17
|
+
--gap-m: 16px; /* deprecated */
|
|
18
|
+
--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 */
|
|
19
|
+
|
|
20
|
+
/* новые значения, используйте их */
|
|
19
21
|
} :root {
|
|
20
22
|
} :root {
|
|
21
23
|
} :root {
|
|
@@ -27,30 +29,30 @@
|
|
|
27
29
|
/* checkmark */
|
|
28
30
|
|
|
29
31
|
/* optgroup */
|
|
30
|
-
} .
|
|
32
|
+
} .select__sheet_1dc92 {
|
|
31
33
|
overflow: hidden;
|
|
32
|
-
} .
|
|
34
|
+
} .select__sheetContent_1dc92.select__sheetContent_1dc92 {
|
|
33
35
|
padding: 0
|
|
34
|
-
} .
|
|
36
|
+
} .select__sheetContent_1dc92.select__sheetContent_1dc92 .select__modalContent_1dc92 {
|
|
35
37
|
padding: 0;
|
|
36
38
|
display: flex;
|
|
37
39
|
flex-direction: column;
|
|
38
|
-
} .
|
|
40
|
+
} .select__sheetContainer_1dc92 {
|
|
39
41
|
padding: 0;
|
|
40
|
-
} .
|
|
42
|
+
} .select__optionsListWrapper_1dc92 {
|
|
41
43
|
flex: 1;
|
|
42
|
-
} .
|
|
44
|
+
} .select__optionsList_1dc92.select__optionsList_1dc92 {
|
|
43
45
|
height: 100%;
|
|
44
46
|
display: flex;
|
|
45
47
|
flex-direction: column;
|
|
46
|
-
} .
|
|
48
|
+
} .select__scrollbar_1dc92 {
|
|
47
49
|
flex: 1;
|
|
48
|
-
} .
|
|
50
|
+
} .select__search_1dc92 {
|
|
49
51
|
padding: var(--gap-xs);
|
|
50
|
-
} .
|
|
52
|
+
} .select__option_1dc92.select__option_1dc92 {
|
|
51
53
|
padding: var(--gap-2xs) var(--gap-l) var(--gap-2xs) var(--gap-m)
|
|
52
|
-
} .
|
|
54
|
+
} .select__option_1dc92.select__option_1dc92:before {
|
|
53
55
|
display: none;
|
|
54
|
-
} .
|
|
56
|
+
} .select__optionGroup_1dc92.select__optionGroup_1dc92 {
|
|
55
57
|
padding: var(--gap-m) var(--gap-m) var(--gap-xs);
|
|
56
58
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FC, ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
import { BottomSheetProps } from "@alfalab/core-components-bottom-sheet";
|
|
4
|
+
import { ModalContentProps, ModalFooterProps, ModalHeaderProps } from "@alfalab/core-components-modal/shared";
|
|
5
|
+
import { BaseModalProps } from "@alfalab/core-components-base-modal";
|
|
6
|
+
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
7
|
+
import { AdditionalMobileProps, BaseSelectProps, BottomSheetSelectMobileProps, ModalSelectMobileProps } from "../../../typings";
|
|
8
|
+
type ModalDesktopProps = BaseModalProps & {
|
|
9
|
+
/**
|
|
10
|
+
* Ширина модального окна
|
|
11
|
+
* @default 600
|
|
12
|
+
* @description s, m, l, xl deprecated, используйте вместо них 500, 600, 800, 1140 соответственно
|
|
13
|
+
*/
|
|
14
|
+
size?: "s" | "m" | "l" | "xl" | "fullscreen" | 500 | 600 | 800 | 1140;
|
|
15
|
+
/**
|
|
16
|
+
* Растягивает модальное окно на весь экран
|
|
17
|
+
* @deprecated Используйте размер fullscreen
|
|
18
|
+
*/
|
|
19
|
+
fullscreen?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Фиксирует позицию модального окна после открытия,
|
|
22
|
+
* предотвращая скачки, если контент внутри будет меняться
|
|
23
|
+
*/
|
|
24
|
+
fixedPosition?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Управление наличием закрывающего крестика
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
hasCloser?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Блокирует скролл когда модальное окно открыто. Работает только на iOS.
|
|
32
|
+
*/
|
|
33
|
+
iOSLock?: boolean;
|
|
34
|
+
};
|
|
35
|
+
type ModalMobileProps = Omit<ModalDesktopProps, "size" | "fixedPosition" | "fullscreen">;
|
|
36
|
+
type PopoverType = ForwardRefExoticComponent<PopoverProps & RefAttributes<HTMLDivElement>>;
|
|
37
|
+
type BottomSheetType = React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
type ModalMobileType = ForwardRefExoticComponent<ModalMobileProps & RefAttributes<HTMLDivElement>> & {
|
|
39
|
+
Header: FC<ModalHeaderProps>;
|
|
40
|
+
Footer: FC<ModalFooterProps>;
|
|
41
|
+
Content: FC<ModalContentProps>;
|
|
42
|
+
};
|
|
43
|
+
type ComponentProps = BaseSelectProps & AdditionalMobileProps & BottomSheetSelectMobileProps & ModalSelectMobileProps & {
|
|
44
|
+
isBottomSheet?: boolean;
|
|
45
|
+
view: 'desktop' | 'mobile';
|
|
46
|
+
Popover?: PopoverType;
|
|
47
|
+
BottomSheet?: BottomSheetType;
|
|
48
|
+
ModalMobile?: ModalMobileType;
|
|
49
|
+
};
|
|
50
|
+
export { ComponentProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -5,7 +5,7 @@ import { Checkbox } from '@alfalab/core-components-checkbox/modern';
|
|
|
5
5
|
import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
6
6
|
import CheckmarkMIcon from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
7
7
|
|
|
8
|
-
const styles = {"checkmark":"
|
|
8
|
+
const styles = {"checkmark":"select__checkmark_17dud","after":"select__after_17dud","single":"select__single_17dud","selected":"select__selected_17dud","before":"select__before_17dud","multiple":"select__multiple_17dud","colorIcon":"select__colorIcon_17dud"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
const Checkmark = ({ selected, disabled = false, className, multiple, position = 'before', }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 8g2ph */
|
|
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-1300: rgba(3, 3, 6, 0.88);
|
|
@@ -14,9 +14,11 @@
|
|
|
14
14
|
/* Hard up */
|
|
15
15
|
} :root {
|
|
16
16
|
--border-radius-circle: 50%;
|
|
17
|
-
} :root {
|
|
18
|
-
--gap-xs: 8px;
|
|
19
|
-
--gap-s: 12px;
|
|
17
|
+
} :root { /* deprecated */ /* deprecated */
|
|
18
|
+
--gap-xs: 8px; /* deprecated */
|
|
19
|
+
--gap-s: 12px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
20
|
+
|
|
21
|
+
/* новые значения, используйте их */
|
|
20
22
|
} :root {
|
|
21
23
|
} :root {
|
|
22
24
|
} :root {
|
|
@@ -39,12 +41,12 @@
|
|
|
39
41
|
--select-checkmark-border-radius: var(--border-radius-circle);
|
|
40
42
|
|
|
41
43
|
/* optgroup */
|
|
42
|
-
} .
|
|
44
|
+
} .select__checkmark_17dud {
|
|
43
45
|
flex-shrink: 0;
|
|
44
46
|
margin: var(--select-checkmark-margin)
|
|
45
|
-
} .
|
|
47
|
+
} .select__checkmark_17dud.select__after_17dud {
|
|
46
48
|
margin: var(--select-checkmark-margin-after);
|
|
47
|
-
} .
|
|
49
|
+
} .select__single_17dud {
|
|
48
50
|
display: flex;
|
|
49
51
|
align-items: center;
|
|
50
52
|
justify-content: center;
|
|
@@ -54,17 +56,17 @@
|
|
|
54
56
|
border-radius: var(--select-checkmark-border-radius);
|
|
55
57
|
width: var(--select-checkmark-size);
|
|
56
58
|
height: var(--select-checkmark-size)
|
|
57
|
-
} .
|
|
59
|
+
} .select__single_17dud.select__selected_17dud {
|
|
58
60
|
opacity: 1;
|
|
59
|
-
} .
|
|
61
|
+
} .select__before_17dud {
|
|
60
62
|
display: var(--select-checkmark-before-display)
|
|
61
|
-
} .
|
|
63
|
+
} .select__before_17dud.select__multiple_17dud {
|
|
62
64
|
margin-right: var(--gap-s);
|
|
63
65
|
display: var(--select-checkmark-before-display-multiple);
|
|
64
|
-
} .
|
|
66
|
+
} .select__after_17dud.select__after_17dud {
|
|
65
67
|
display: var(--select-checkmark-after-display)
|
|
66
|
-
} .
|
|
68
|
+
} .select__after_17dud.select__after_17dud.select__single_17dud {
|
|
67
69
|
display: var(--select-checkmark-after-display-single);
|
|
68
|
-
} .
|
|
70
|
+
} .select__colorIcon_17dud {
|
|
69
71
|
color: var(--color-light-status-positive);
|
|
70
72
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
4
4
|
|
|
5
|
-
const styles = {"checkmark":"
|
|
5
|
+
const styles = {"checkmark":"select__checkmark_3lwx8","selected":"select__selected_3lwx8","displayIcon":"select__displayIcon_3lwx8","displayBadge":"select__displayBadge_3lwx8"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Checkmark = ({ selected, className }) => (React.createElement("div", { className: cn(styles.checkmark, className, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ytlw */
|
|
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 {
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
--select-mobile-checkmark-display-badge: none;
|
|
26
28
|
|
|
27
29
|
/* optgroup */
|
|
28
|
-
} .
|
|
30
|
+
} .select__checkmark_3lwx8 {
|
|
29
31
|
flex-shrink: 0;
|
|
30
32
|
display: flex;
|
|
31
33
|
align-items: center;
|
|
@@ -33,12 +35,12 @@
|
|
|
33
35
|
width: 24px;
|
|
34
36
|
height: 24px;
|
|
35
37
|
opacity: 0
|
|
36
|
-
} .
|
|
38
|
+
} .select__checkmark_3lwx8:first-child {
|
|
37
39
|
display: none;
|
|
38
|
-
} .
|
|
40
|
+
} .select__checkmark_3lwx8.select__selected_3lwx8 {
|
|
39
41
|
opacity: 1;
|
|
40
|
-
} .
|
|
42
|
+
} .select__displayIcon_3lwx8 {
|
|
41
43
|
display: var(--select-mobile-checkmark-display-icon);
|
|
42
|
-
} .
|
|
44
|
+
} .select__displayBadge_3lwx8 {
|
|
43
45
|
display: var(--select-mobile-checkmark-display-badge);
|
|
44
46
|
}
|
|
@@ -4,7 +4,7 @@ import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
|
4
4
|
import { useFocus } from '@alfalab/hooks';
|
|
5
5
|
import { joinOptions } from '../../utils.js';
|
|
6
6
|
|
|
7
|
-
const styles = {"component":"
|
|
7
|
+
const styles = {"component":"select__component_xy724","field":"select__field_xy724","disabled":"select__disabled_xy724","arrow":"select__arrow_xy724","placeholder":"select__placeholder_xy724","show-placeholder":"select__show-placeholder_xy724","focused":"select__focused_xy724","contentWrapper":"select__contentWrapper_xy724","value":"select__value_xy724","focusVisible":"select__focusVisible_xy724"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const Field = ({ size = 56, open, multiple, error, hint, disabled, label, labelView = 'inner', placeholder, selectedMultiple = [], selected, rightAddons, valueRenderer = joinOptions, setSelectedItems, toggleMenu, Arrow, innerProps, dataTestId, fieldClassName, FormControlComponent, ...restProps }) => {
|