@alfalab/core-components-select 13.0.2 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component-bfb28123.d.ts +241 -0
- package/{Component-6d167ee5.js → Component-bfb28123.js} +27 -17
- package/{Component-47b7b784.d.ts → Component-ebc21ddc.d.ts} +0 -0
- package/{Component-47b7b784.js → Component-ebc21ddc.js} +2 -2
- package/Component.js +6 -2
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-checkmark/Component.d.ts +4 -0
- package/components/base-checkmark/Component.js +29 -0
- package/components/base-checkmark/index.css +32 -0
- package/components/base-checkmark/index.d.ts +1 -0
- package/components/base-checkmark/index.js +13 -0
- package/components/base-option/Component.d.ts +4 -0
- package/components/base-option/Component.js +46 -0
- package/components/base-option/index.css +95 -0
- package/components/base-option/index.d.ts +1 -0
- package/components/base-option/index.js +15 -0
- package/components/base-select/Component.js +2 -2
- package/components/base-select/index.css +7 -7
- package/components/base-select/index.d.ts +1 -1
- package/components/base-select/index.js +2 -2
- package/components/base-select-mobile/Component.js +10 -5
- package/components/base-select-mobile/checkmark/Component.js +8 -3
- package/components/base-select-mobile/checkmark/index.css +12 -7
- package/components/base-select-mobile/checkmark/index.js +3 -0
- package/components/base-select-mobile/index.css +11 -11
- package/components/base-select-mobile/index.d.ts +1 -1
- package/components/base-select-mobile/index.js +10 -5
- package/components/base-select-mobile/options-list/Component.js +2 -2
- package/components/base-select-mobile/options-list/index.css +9 -9
- package/components/base-select-mobile/options-list/index.js +1 -1
- package/components/checkmark/Component.js +5 -2
- package/components/checkmark/index.css +11 -7
- package/components/checkmark/index.js +2 -0
- package/components/field/Component.js +2 -2
- package/components/field/index.css +9 -9
- package/components/field/index.js +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +11 -5
- package/components/native-select/Component.js +1 -1
- package/components/native-select/index.js +1 -1
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +8 -8
- package/components/option/Component.js +7 -3
- package/components/option/index.css +20 -20
- package/components/option/index.js +5 -1
- package/components/options-list/Component.js +2 -2
- package/components/options-list/index.css +6 -6
- package/components/options-list/index.js +1 -1
- package/components/select-mobile/Component.js +10 -5
- package/components/select-mobile/index.d.ts +1 -1
- package/components/select-mobile/index.js +10 -5
- package/components/select-modal-mobile/Component.js +10 -5
- package/components/select-modal-mobile/index.d.ts +1 -1
- package/components/select-modal-mobile/index.js +10 -5
- package/components/virtual-options-list/Component.js +2 -2
- package/components/virtual-options-list/index.css +12 -12
- package/components/virtual-options-list/index.js +1 -1
- package/cssm/Component-c7975bd7.d.ts +241 -0
- package/cssm/{Component-095a346d.js → Component-c7975bd7.js} +25 -12
- package/cssm/Component.js +5 -0
- package/cssm/components/base-checkmark/Component.d.ts +4 -0
- package/cssm/components/base-checkmark/Component.js +28 -0
- package/cssm/components/base-checkmark/index.d.ts +1 -0
- package/cssm/components/base-checkmark/index.js +14 -0
- package/cssm/components/base-checkmark/index.module.css +31 -0
- package/cssm/components/base-option/Component.d.ts +4 -0
- package/cssm/components/base-option/Component.js +46 -0
- package/cssm/components/base-option/index.d.ts +1 -0
- package/cssm/components/base-option/index.js +17 -0
- package/cssm/components/base-option/index.module.css +93 -0
- package/cssm/components/base-select-mobile/Component.js +10 -3
- package/cssm/components/base-select-mobile/checkmark/Component.js +7 -2
- package/cssm/components/base-select-mobile/checkmark/index.js +3 -0
- package/cssm/components/base-select-mobile/checkmark/index.module.css +8 -3
- package/cssm/components/base-select-mobile/index.d.ts +1 -1
- package/cssm/components/base-select-mobile/index.js +10 -3
- package/cssm/components/checkmark/Component.js +4 -1
- package/cssm/components/checkmark/index.js +2 -0
- package/cssm/components/checkmark/index.module.css +4 -0
- package/cssm/components/index.d.ts +1 -0
- package/cssm/components/index.js +11 -3
- package/cssm/components/optgroup/index.module.css +2 -2
- package/cssm/components/option/Component.js +6 -1
- package/cssm/components/option/index.js +5 -0
- package/cssm/components/select-mobile/Component.js +10 -3
- package/cssm/components/select-mobile/index.d.ts +1 -1
- package/cssm/components/select-mobile/index.js +10 -3
- package/cssm/components/select-modal-mobile/Component.js +10 -3
- package/cssm/components/select-modal-mobile/index.d.ts +1 -1
- package/cssm/components/select-modal-mobile/index.js +10 -3
- package/cssm/index.js +11 -3
- package/cssm/presets/index.js +10 -3
- package/cssm/presets/useLazyLoading/hook.d.ts +3 -1
- package/cssm/presets/useLazyLoading/hook.js +8 -3
- package/cssm/presets/useSelectWithApply/hook.js +10 -3
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +10 -3
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +10 -3
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.module.css +1 -2
- package/cssm/presets/useSelectWithLoading/hook.d.ts +3 -1
- package/cssm/presets/useSelectWithLoading/hook.js +7 -2
- package/cssm/typings.d.ts +8 -0
- package/esm/{Component-b36e61d9.d.ts → Component-d31180da.d.ts} +0 -0
- package/esm/{Component-b36e61d9.js → Component-d31180da.js} +2 -2
- package/esm/Component-e24906b0.d.ts +241 -0
- package/esm/{Component-dbbe481c.js → Component-e24906b0.js} +27 -17
- package/esm/Component.js +6 -2
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/base-checkmark/Component.d.ts +4 -0
- package/esm/components/base-checkmark/Component.js +20 -0
- package/esm/components/base-checkmark/index.css +32 -0
- package/esm/components/base-checkmark/index.d.ts +1 -0
- package/esm/components/base-checkmark/index.js +5 -0
- package/esm/components/base-option/Component.d.ts +4 -0
- package/esm/components/base-option/Component.js +37 -0
- package/esm/components/base-option/index.css +95 -0
- package/esm/components/base-option/index.d.ts +1 -0
- package/esm/components/base-option/index.js +7 -0
- package/esm/components/base-select/Component.js +2 -2
- package/esm/components/base-select/index.css +7 -7
- package/esm/components/base-select/index.d.ts +1 -1
- package/esm/components/base-select/index.js +2 -2
- package/esm/components/base-select-mobile/Component.js +10 -5
- package/esm/components/base-select-mobile/checkmark/Component.js +8 -3
- package/esm/components/base-select-mobile/checkmark/index.css +12 -7
- package/esm/components/base-select-mobile/checkmark/index.js +3 -0
- package/esm/components/base-select-mobile/index.css +11 -11
- package/esm/components/base-select-mobile/index.d.ts +1 -1
- package/esm/components/base-select-mobile/index.js +10 -5
- package/esm/components/base-select-mobile/options-list/Component.js +2 -2
- package/esm/components/base-select-mobile/options-list/index.css +9 -9
- package/esm/components/base-select-mobile/options-list/index.js +1 -1
- package/esm/components/checkmark/Component.js +5 -2
- package/esm/components/checkmark/index.css +11 -7
- package/esm/components/checkmark/index.js +2 -0
- package/esm/components/field/Component.js +2 -2
- package/esm/components/field/index.css +9 -9
- package/esm/components/field/index.js +1 -1
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.js +10 -5
- package/esm/components/native-select/Component.js +1 -1
- package/esm/components/native-select/index.js +1 -1
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +8 -8
- package/esm/components/option/Component.js +10 -6
- package/esm/components/option/index.css +20 -20
- package/esm/components/option/index.js +5 -1
- package/esm/components/options-list/Component.js +2 -2
- package/esm/components/options-list/index.css +6 -6
- package/esm/components/options-list/index.js +1 -1
- package/esm/components/select-mobile/Component.js +10 -5
- package/esm/components/select-mobile/index.d.ts +1 -1
- package/esm/components/select-mobile/index.js +10 -5
- package/esm/components/select-modal-mobile/Component.js +10 -5
- package/esm/components/select-modal-mobile/index.d.ts +1 -1
- package/esm/components/select-modal-mobile/index.js +10 -5
- package/esm/components/virtual-options-list/Component.js +2 -2
- package/esm/components/virtual-options-list/index.css +12 -12
- package/esm/components/virtual-options-list/index.js +1 -1
- package/esm/index.js +10 -5
- package/esm/{intersection-observer-f1488f74.d.ts → intersection-observer-75c9afe9.d.ts} +0 -0
- package/esm/{intersection-observer-f1488f74.js → intersection-observer-75c9afe9.js} +0 -0
- package/esm/presets/index.js +10 -5
- package/esm/presets/useLazyLoading/hook.d.ts +3 -1
- package/esm/presets/useLazyLoading/hook.js +10 -6
- package/esm/presets/useLazyLoading/index.css +2 -2
- package/esm/presets/useSelectWithApply/hook.js +10 -5
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +10 -5
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.css +5 -6
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +10 -5
- package/esm/presets/useSelectWithLoading/hook.d.ts +3 -1
- package/esm/presets/useSelectWithLoading/hook.js +9 -5
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/{tslib.es6-28e16b18.d.ts → tslib.es6-b639aaa5.d.ts} +0 -0
- package/esm/{tslib.es6-28e16b18.js → tslib.es6-b639aaa5.js} +0 -0
- package/esm/typings.d.ts +8 -0
- package/index.js +11 -5
- package/{intersection-observer-a8302d8a.d.ts → intersection-observer-59773a48.d.ts} +0 -0
- package/{intersection-observer-a8302d8a.js → intersection-observer-59773a48.js} +0 -0
- package/modern/{Component-30d321bc.d.ts → Component-6c794caf.d.ts} +0 -0
- package/modern/{Component-30d321bc.js → Component-6c794caf.js} +1 -1
- package/modern/Component-b2369a4f.d.ts +241 -0
- package/modern/{Component-90abbd87.js → Component-b2369a4f.js} +35 -26
- package/modern/Component.js +5 -1
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/base-checkmark/Component.d.ts +4 -0
- package/modern/components/base-checkmark/Component.js +18 -0
- package/modern/components/base-checkmark/index.css +32 -0
- package/modern/components/base-checkmark/index.d.ts +1 -0
- package/modern/components/base-checkmark/index.js +5 -0
- package/modern/components/base-option/Component.d.ts +4 -0
- package/modern/components/base-option/Component.js +34 -0
- package/modern/components/base-option/index.css +95 -0
- package/modern/components/base-option/index.d.ts +1 -0
- package/modern/components/base-option/index.js +6 -0
- package/modern/components/base-select/Component.js +1 -1
- package/modern/components/base-select/index.css +7 -7
- package/modern/components/base-select/index.d.ts +1 -1
- package/modern/components/base-select/index.js +1 -1
- package/modern/components/base-select-mobile/Component.js +9 -4
- package/modern/components/base-select-mobile/checkmark/Component.js +8 -3
- package/modern/components/base-select-mobile/checkmark/index.css +12 -7
- package/modern/components/base-select-mobile/checkmark/index.js +3 -0
- package/modern/components/base-select-mobile/index.css +11 -11
- package/modern/components/base-select-mobile/index.d.ts +1 -1
- package/modern/components/base-select-mobile/index.js +9 -4
- package/modern/components/base-select-mobile/options-list/Component.js +1 -1
- package/modern/components/base-select-mobile/options-list/index.css +9 -9
- package/modern/components/checkmark/Component.js +5 -2
- package/modern/components/checkmark/index.css +11 -7
- package/modern/components/checkmark/index.js +2 -0
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +9 -9
- package/modern/components/index.d.ts +1 -0
- package/modern/components/index.js +9 -4
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +8 -8
- package/modern/components/option/Component.js +9 -5
- package/modern/components/option/index.css +20 -20
- package/modern/components/option/index.js +4 -0
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +6 -6
- package/modern/components/select-mobile/Component.js +9 -4
- package/modern/components/select-mobile/index.d.ts +1 -1
- package/modern/components/select-mobile/index.js +9 -4
- package/modern/components/select-modal-mobile/Component.js +9 -4
- package/modern/components/select-modal-mobile/index.d.ts +1 -1
- package/modern/components/select-modal-mobile/index.js +9 -4
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +12 -12
- package/modern/index.js +9 -4
- package/modern/{intersection-observer-f1488f74.d.ts → intersection-observer-75c9afe9.d.ts} +0 -0
- package/modern/{intersection-observer-f1488f74.js → intersection-observer-75c9afe9.js} +0 -0
- package/modern/presets/index.js +9 -4
- package/modern/presets/useLazyLoading/hook.d.ts +3 -1
- package/modern/presets/useLazyLoading/hook.js +8 -4
- package/modern/presets/useLazyLoading/index.css +2 -2
- package/modern/presets/useSelectWithApply/hook.js +9 -4
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +9 -4
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.css +5 -6
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +9 -4
- package/modern/presets/useSelectWithLoading/hook.d.ts +3 -1
- package/modern/presets/useSelectWithLoading/hook.js +8 -4
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/typings.d.ts +8 -0
- package/package.json +10 -8
- package/presets/index.js +10 -5
- package/presets/useLazyLoading/hook.d.ts +3 -1
- package/presets/useLazyLoading/hook.js +10 -6
- package/presets/useLazyLoading/index.css +2 -2
- package/presets/useSelectWithApply/hook.js +10 -5
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +10 -5
- package/presets/useSelectWithApply/options-list-with-apply/index.css +5 -6
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +10 -5
- package/presets/useSelectWithLoading/hook.d.ts +3 -1
- package/presets/useSelectWithLoading/hook.js +8 -4
- package/presets/useSelectWithLoading/index.css +2 -2
- package/{tslib.es6-c5796feb.d.ts → tslib.es6-c35337da.d.ts} +0 -0
- package/{tslib.es6-c5796feb.js → tslib.es6-c35337da.js} +0 -0
- package/typings.d.ts +8 -0
- package/Component-6d167ee5.d.ts +0 -114
- package/Component-db573794.d.ts +0 -73
- package/Component.mobile-3fe0d3e6.d.ts +0 -56
- package/Context-c2e6f1b2.d.ts +0 -4
- package/cssm/Component-095a346d.d.ts +0 -114
- package/cssm/Component-db573794.d.ts +0 -73
- package/cssm/Component.mobile-3fe0d3e6.d.ts +0 -56
- package/cssm/Context-c2e6f1b2.d.ts +0 -4
- package/esm/Component-db573794.d.ts +0 -73
- package/esm/Component-dbbe481c.d.ts +0 -114
- package/esm/Component.mobile-3fe0d3e6.d.ts +0 -56
- package/esm/Context-c2e6f1b2.d.ts +0 -4
- package/modern/Component-90abbd87.d.ts +0 -114
- package/modern/Component-db573794.d.ts +0 -73
- package/modern/Component.mobile-3fe0d3e6.d.ts +0 -56
- package/modern/Context-c2e6f1b2.d.ts +0 -4
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ReactNode, FC, ButtonHTMLAttributes, ElementType, AnchorHTMLAttributes } from "react";
|
|
4
|
+
import { BottomSheetProps } from "@alfalab/core-components-bottom-sheet";
|
|
5
|
+
import { BaseSelectProps, OptionShape, OptionsListProps } from "./typings";
|
|
6
|
+
import { BaseModalProps, BaseModalContext } from "@alfalab/core-components-base-modal";
|
|
7
|
+
import { ButtonProps } from "@alfalab/core-components-button";
|
|
8
|
+
type AdditionalMobileProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Футер
|
|
11
|
+
* @deprecated Используйте bottomSheetProps.actionButton
|
|
12
|
+
*/
|
|
13
|
+
footer?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Будет ли свайпаться шторка
|
|
16
|
+
* @deprecated Используйте bottomSheetProps.swipeable
|
|
17
|
+
*/
|
|
18
|
+
swipeable?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Дополнительные пропсы шторки
|
|
21
|
+
*/
|
|
22
|
+
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
23
|
+
};
|
|
24
|
+
type SelectMobileProps = Omit<BaseSelectProps, "OptionsList" | "Checkmark" | "onScroll"> & AdditionalMobileProps;
|
|
25
|
+
declare const SelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "OptionsList" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<unknown>>;
|
|
26
|
+
type SelectMobileProps$0 = Omit<BaseSelectProps, "OptionsList" | "Checkmark" | "onScroll"> & {
|
|
27
|
+
/**
|
|
28
|
+
* Футер
|
|
29
|
+
* @deprecated Используйте bottomSheetProps.actionButton
|
|
30
|
+
*/
|
|
31
|
+
footer?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Будет ли свайпаться шторка
|
|
34
|
+
* @deprecated Используйте bottomSheetProps.swipeable
|
|
35
|
+
*/
|
|
36
|
+
swipeable?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Отображать в BottomSheet
|
|
39
|
+
*/
|
|
40
|
+
isBottomSheet?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Дополнительные пропсы шторки
|
|
43
|
+
*/
|
|
44
|
+
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
45
|
+
};
|
|
46
|
+
declare const BaseSelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "OptionsList" | "Checkmark"> & {
|
|
47
|
+
footer?: ReactNode;
|
|
48
|
+
swipeable?: boolean | undefined;
|
|
49
|
+
isBottomSheet?: boolean | undefined;
|
|
50
|
+
bottomSheetProps?: Partial<BottomSheetProps> | undefined;
|
|
51
|
+
} & React.RefAttributes<unknown>>;
|
|
52
|
+
declare const OptionsListWithApply: React.ForwardRefExoticComponent<OptionsListProps & {
|
|
53
|
+
showClear?: boolean | undefined;
|
|
54
|
+
onClose?: (() => void) | undefined;
|
|
55
|
+
selectedDraft?: OptionShape[] | undefined;
|
|
56
|
+
OptionsList?: React.FC<OptionsListProps & React.RefAttributes<unknown>> | undefined;
|
|
57
|
+
} & React.RefAttributes<unknown>>;
|
|
58
|
+
type ModalDesktopProps = BaseModalProps & {
|
|
59
|
+
/**
|
|
60
|
+
* Ширина модального окна
|
|
61
|
+
* @default "m"
|
|
62
|
+
*/
|
|
63
|
+
size?: "s" | "m" | "l" | "xl" | "fullscreen";
|
|
64
|
+
/**
|
|
65
|
+
* Растягивает модальное окно на весь экран
|
|
66
|
+
* @deprecated Используйте размер fullscreen
|
|
67
|
+
*/
|
|
68
|
+
fullscreen?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Фиксирует позицию модального окна после открытия,
|
|
71
|
+
* предотвращая скачки, если контент внутри будет меняться
|
|
72
|
+
*/
|
|
73
|
+
fixedPosition?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Управление наличием закрывающего крестика
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
hasCloser?: boolean;
|
|
79
|
+
};
|
|
80
|
+
type ModalMobileProps = Omit<ModalDesktopProps, "size" | "fixedPosition" | "fullscreen">;
|
|
81
|
+
type View = "desktop" | "mobile";
|
|
82
|
+
type TResponsiveModalContext = {
|
|
83
|
+
view: View;
|
|
84
|
+
size: NonNullable<ModalDesktopProps["size"]>;
|
|
85
|
+
};
|
|
86
|
+
type ContentProps = {
|
|
87
|
+
/**
|
|
88
|
+
* Контент
|
|
89
|
+
*/
|
|
90
|
+
children?: ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* Дополнительный класс
|
|
93
|
+
*/
|
|
94
|
+
className?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Растягивает контент на всю высоту
|
|
97
|
+
*/
|
|
98
|
+
flex?: boolean;
|
|
99
|
+
};
|
|
100
|
+
type HeaderProps = {
|
|
101
|
+
/**
|
|
102
|
+
* Контент шапки
|
|
103
|
+
*/
|
|
104
|
+
children?: ReactNode;
|
|
105
|
+
/**
|
|
106
|
+
* Слот слева
|
|
107
|
+
*/
|
|
108
|
+
leftAddons?: ReactNode;
|
|
109
|
+
/**
|
|
110
|
+
* Наличие компонента крестика
|
|
111
|
+
*/
|
|
112
|
+
hasCloser?: ReactNode;
|
|
113
|
+
/**
|
|
114
|
+
* Дополнительный класс
|
|
115
|
+
*/
|
|
116
|
+
className?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Дополнительный класс для аддонов
|
|
119
|
+
*/
|
|
120
|
+
addonClassName?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Дополнительный класс для контента
|
|
123
|
+
*/
|
|
124
|
+
contentClassName?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Заголовок шапки
|
|
127
|
+
*/
|
|
128
|
+
title?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Выравнивание заголовка
|
|
131
|
+
*/
|
|
132
|
+
align?: "left" | "center";
|
|
133
|
+
/**
|
|
134
|
+
* Обрезать ли заголовок
|
|
135
|
+
*/
|
|
136
|
+
trim?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Фиксирует шапку
|
|
139
|
+
*/
|
|
140
|
+
sticky?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
143
|
+
*/
|
|
144
|
+
dataTestId?: string;
|
|
145
|
+
};
|
|
146
|
+
type FooterProps = {
|
|
147
|
+
/**
|
|
148
|
+
* Контент футера
|
|
149
|
+
*/
|
|
150
|
+
children?: ReactNode;
|
|
151
|
+
/**
|
|
152
|
+
* Дополнительный класс
|
|
153
|
+
*/
|
|
154
|
+
className?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Фиксирует футер
|
|
157
|
+
*/
|
|
158
|
+
sticky?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Выравнивание элементов футера
|
|
161
|
+
*/
|
|
162
|
+
layout?: "start" | "center" | "space-between" | "column";
|
|
163
|
+
/**
|
|
164
|
+
* Отступы между элементами футера
|
|
165
|
+
*/
|
|
166
|
+
gap?: 16 | 24 | 32;
|
|
167
|
+
};
|
|
168
|
+
type IconButtonProps = {
|
|
169
|
+
/**
|
|
170
|
+
* Компонент иконки
|
|
171
|
+
*/
|
|
172
|
+
icon: ElementType<{
|
|
173
|
+
className?: string;
|
|
174
|
+
}>;
|
|
175
|
+
/**
|
|
176
|
+
* Тип кнопки
|
|
177
|
+
*/
|
|
178
|
+
view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
|
|
179
|
+
/**
|
|
180
|
+
* Размер компонента
|
|
181
|
+
*/
|
|
182
|
+
size?: "xxs" | "xs" | "s";
|
|
183
|
+
/**
|
|
184
|
+
* Дополнительный класс
|
|
185
|
+
*/
|
|
186
|
+
className?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
189
|
+
*/
|
|
190
|
+
dataTestId?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Набор цветов для компонента
|
|
193
|
+
*/
|
|
194
|
+
colors?: "default" | "inverted";
|
|
195
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
|
|
196
|
+
type CloserProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
197
|
+
/**
|
|
198
|
+
* Дополнительный класс
|
|
199
|
+
*/
|
|
200
|
+
className?: string;
|
|
201
|
+
/**
|
|
202
|
+
* Позиция крестика
|
|
203
|
+
*/
|
|
204
|
+
align?: "left" | "right";
|
|
205
|
+
/**
|
|
206
|
+
* Размер кнопки
|
|
207
|
+
*/
|
|
208
|
+
size?: IconButtonProps["size"];
|
|
209
|
+
/**
|
|
210
|
+
* Фиксирует крестик
|
|
211
|
+
*/
|
|
212
|
+
sticky?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Иконка
|
|
215
|
+
*/
|
|
216
|
+
icon?: ElementType;
|
|
217
|
+
/**
|
|
218
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
219
|
+
*/
|
|
220
|
+
dataTestId?: string;
|
|
221
|
+
};
|
|
222
|
+
declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
|
|
223
|
+
Content: React.FC<ContentProps>;
|
|
224
|
+
Header: React.FC<HeaderProps>;
|
|
225
|
+
Footer: React.FC<FooterProps>;
|
|
226
|
+
Closer: React.FC<CloserProps>;
|
|
227
|
+
};
|
|
228
|
+
declare const Content: FC<ContentProps>;
|
|
229
|
+
declare const Modal: React.ForwardRefExoticComponent<import("@alfalab/core-components-base-modal").BaseModalProps & {
|
|
230
|
+
size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
|
|
231
|
+
fullscreen?: boolean | undefined;
|
|
232
|
+
fixedPosition?: boolean | undefined;
|
|
233
|
+
hasCloser?: boolean | undefined;
|
|
234
|
+
} & {
|
|
235
|
+
view: View;
|
|
236
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
237
|
+
declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
|
|
238
|
+
declare const ModalContext: import("react").Context<BaseModalContext>;
|
|
239
|
+
type SelectModalMobileProps = Omit<BaseSelectProps, 'OptionsList' | 'Checkmark' | 'onScroll'>;
|
|
240
|
+
declare const SelectModalMobile: React.ForwardRefExoticComponent<SelectModalMobileProps & React.RefAttributes<unknown>>;
|
|
241
|
+
export { AdditionalMobileProps, SelectMobileProps, SelectMobile, BaseSelectMobile, OptionsListWithApply, ModalMobile, Content, Modal, ResponsiveContext, ModalContext, SelectModalMobileProps, SelectModalMobile };
|
|
@@ -5,11 +5,15 @@ import { Arrow } from './components/arrow/Component.js';
|
|
|
5
5
|
import mergeRefs from 'react-merge-refs';
|
|
6
6
|
import { useMultipleSelection, useCombobox } from 'downshift';
|
|
7
7
|
import '@alfalab/hooks';
|
|
8
|
-
import { g as getDataTestId } from './Component-
|
|
8
|
+
import { g as getDataTestId } from './Component-6c794caf.js';
|
|
9
9
|
import { processOptions } from './utils.js';
|
|
10
10
|
import '@alfalab/core-components-form-control/modern';
|
|
11
11
|
import { Field } from './components/field/Component.js';
|
|
12
12
|
import { Optgroup } from './components/optgroup/Component.js';
|
|
13
|
+
import '@alfalab/core-components/badge';
|
|
14
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
15
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
16
|
+
import { Checkmark } from './components/base-select-mobile/checkmark/Component.js';
|
|
13
17
|
import '@alfalab/core-components-checkbox/modern';
|
|
14
18
|
import { Option } from './components/option/Component.js';
|
|
15
19
|
import '@alfalab/core-components-scrollbar/modern';
|
|
@@ -18,11 +22,12 @@ import './Component.js';
|
|
|
18
22
|
import { BottomSheet } from '@alfalab/core-components-bottom-sheet/modern';
|
|
19
23
|
import { ModalMobile } from '@alfalab/core-components-modal/modern/mobile';
|
|
20
24
|
import { Button } from '@alfalab/core-components-button/modern';
|
|
21
|
-
import {
|
|
25
|
+
import { BaseCheckmark } from './components/base-checkmark/Component.js';
|
|
22
26
|
import { OptionsList as OptionsList$1 } from './components/base-select-mobile/options-list/Component.js';
|
|
23
27
|
import 'react-virtual';
|
|
28
|
+
import { BaseOption } from './components/base-option/Component.js';
|
|
24
29
|
import '@alfalab/core-components-skeleton/modern';
|
|
25
|
-
import './intersection-observer-
|
|
30
|
+
import './intersection-observer-75c9afe9.js';
|
|
26
31
|
|
|
27
32
|
const SELECT_ALL_KEY = 'select_all';
|
|
28
33
|
const selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
|
|
@@ -90,7 +95,7 @@ function useSelectWithApply({ options, selected, onChange = () => null, OptionsL
|
|
|
90
95
|
};
|
|
91
96
|
}
|
|
92
97
|
|
|
93
|
-
var styles = {"footer":"
|
|
98
|
+
var styles = {"footer":"select__footer_1nc94","withBorder":"select__withBorder_1nc94"};
|
|
94
99
|
require('./presets/useSelectWithApply/options-list-with-apply/index.css')
|
|
95
100
|
|
|
96
101
|
const OptionsListWithApply = forwardRef(({ toggleMenu, OptionsList: OptionsList$1 = OptionsList, getOptionProps: defaultGetOptionProps, showClear = true, selectedDraft = [], flatOptions = [], onApply = () => null, onClear = () => null, onClose = () => null, visibleOptions = 5, ...restProps }, ref) => {
|
|
@@ -137,7 +142,7 @@ const OptionsListWithApply = forwardRef(({ toggleMenu, OptionsList: OptionsList$
|
|
|
137
142
|
showClear && (React.createElement(Button, { size: 'xxs', view: 'secondary', onClick: handleClear }, "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C"))) }));
|
|
138
143
|
});
|
|
139
144
|
|
|
140
|
-
var styles$1 = {"component":"
|
|
145
|
+
var styles$1 = {"component":"select__component_uv809","popoverInner":"select__popoverInner_uv809","sheet":"select__sheet_uv809","sheetContent":"select__sheetContent_uv809","sheetContainer":"select__sheetContainer_uv809","block":"select__block_uv809","option":"select__option_uv809","optionGroup":"select__optionGroup_uv809"};
|
|
141
146
|
require('./components/base-select-mobile/index.css')
|
|
142
147
|
|
|
143
148
|
const BaseSelectMobile = forwardRef(({ dataTestId, className, fieldClassName, optionsListClassName, optionClassName, optionGroupClassName, optionsListProps, options, autocomplete = false, multiple = false, allowUnselect = false, disabled = false, closeOnSelect = !multiple, circularNavigation = false, defaultOpen = false, open: openProp, name, id, selected, size = 'm', optionsSize = 'm', error, hint, block, label, labelView, placeholder, fieldProps = {}, optionProps = {}, valueRenderer, onChange, onOpen, onFocus, Arrow: Arrow$1 = Arrow, Field: Field$1 = Field, Optgroup: Optgroup$1 = Optgroup, Option: Option$1 = Option, swipeable, footer, isBottomSheet, bottomSheetProps, }, ref) => {
|
|
@@ -281,26 +286,30 @@ const BaseSelectMobile = forwardRef(({ dataTestId, className, fieldClassName, op
|
|
|
281
286
|
openMenu();
|
|
282
287
|
}
|
|
283
288
|
};
|
|
284
|
-
const getOptionProps = (option, index) =>
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
289
|
+
const getOptionProps = (option, index) => {
|
|
290
|
+
const selectedItem = selectedItems.includes(option);
|
|
291
|
+
return {
|
|
292
|
+
...optionProps,
|
|
293
|
+
mobile: true,
|
|
294
|
+
className: cn(styles$1.option, optionClassName),
|
|
295
|
+
innerProps: getItemProps({
|
|
296
|
+
index,
|
|
297
|
+
item: option,
|
|
298
|
+
disabled: option.disabled,
|
|
299
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
300
|
+
}),
|
|
301
|
+
multiple,
|
|
288
302
|
index,
|
|
289
|
-
|
|
303
|
+
option,
|
|
304
|
+
size: optionsSize,
|
|
290
305
|
disabled: option.disabled,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
highlighted: index === highlightedIndex,
|
|
299
|
-
selected: selectedItems.includes(option),
|
|
300
|
-
dataTestId: getDataTestId(dataTestId, 'option'),
|
|
301
|
-
// eslint-disable-next-line react/no-unstable-nested-components
|
|
302
|
-
Checkmark: () => React.createElement(Checkmark, { selected: selectedItems.includes(option) }),
|
|
303
|
-
});
|
|
306
|
+
highlighted: index === highlightedIndex,
|
|
307
|
+
selected: selectedItem,
|
|
308
|
+
dataTestId: getDataTestId(dataTestId, 'option'),
|
|
309
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
310
|
+
Checkmark: () => Option$1 === BaseOption ? (React.createElement(BaseCheckmark, { selected: selectedItem, multiple: multiple })) : (React.createElement(Checkmark, { selected: selectedItem })),
|
|
311
|
+
};
|
|
312
|
+
};
|
|
304
313
|
useEffect(() => {
|
|
305
314
|
if (defaultOpen)
|
|
306
315
|
openMenu();
|
|
@@ -344,10 +353,10 @@ const BaseSelectMobile = forwardRef(({ dataTestId, className, fieldClassName, op
|
|
|
344
353
|
}, dataTestId: getDataTestId(dataTestId, 'field'), ...fieldProps }),
|
|
345
354
|
name && renderValue(),
|
|
346
355
|
isBottomSheet ? (React.createElement(BottomSheet, { open: open, onClose: handleClose, className: styles$1.sheet, contentClassName: styles$1.sheetContent, containerClassName: styles$1.sheetContainer, title: placeholder, actionButton: footer, stickyHeader: true, hasCloser: true, swipeable: swipeable, ...bottomSheetProps },
|
|
347
|
-
React.createElement("div", { ...menuProps, className:
|
|
356
|
+
React.createElement("div", { ...menuProps, className: optionsListClassName },
|
|
348
357
|
React.createElement(OptionsListWithApply, { ...optionsListProps, flatOptions: flatOptions, highlightedIndex: highlightedIndex, size: size, options: options, OptionsList: OptionsList$1, Optgroup: Optgroup$1, Option: Option$1, selectedItems: selectedItems, setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, getOptionProps: getOptionProps, dataTestId: getDataTestId(dataTestId, 'options-list'), optionGroupClassName: cn(styles$1.optionGroup, optionGroupClassName), showFooter: multiple, onApply: handleApply, onClear: handleClear })))) : (React.createElement(ModalMobile, { open: open, onClose: handleClose, contentClassName: styles$1.sheetContent, hasCloser: true },
|
|
349
|
-
React.createElement(ModalMobile.Header, { hasCloser: true, title: placeholder, sticky: true
|
|
350
|
-
React.createElement("div", { ...menuProps, className:
|
|
358
|
+
React.createElement(ModalMobile.Header, { hasCloser: true, title: placeholder, sticky: true }),
|
|
359
|
+
React.createElement("div", { ...menuProps, className: optionsListClassName },
|
|
351
360
|
React.createElement(OptionsListWithApply, { ...optionsListProps, flatOptions: flatOptions, highlightedIndex: highlightedIndex, size: size, options: options, OptionsList: OptionsList$1, Optgroup: Optgroup$1, Option: Option$1, selectedItems: selectedItems, setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, getOptionProps: getOptionProps, dataTestId: getDataTestId(dataTestId, 'options-list'), optionGroupClassName: cn(styles$1.optionGroup, optionGroupClassName), showFooter: multiple, onApply: handleApply, onClear: handleClear }))))));
|
|
352
361
|
});
|
|
353
362
|
|
package/modern/Component.js
CHANGED
|
@@ -7,12 +7,16 @@ import '@juggle/resize-observer';
|
|
|
7
7
|
import 'downshift';
|
|
8
8
|
import '@alfalab/core-components-popover/modern';
|
|
9
9
|
import '@alfalab/hooks';
|
|
10
|
-
import { B as BaseSelect } from './Component-
|
|
10
|
+
import { B as BaseSelect } from './Component-6c794caf.js';
|
|
11
11
|
import './utils.js';
|
|
12
12
|
import './components/native-select/Component.js';
|
|
13
13
|
import '@alfalab/core-components-form-control/modern';
|
|
14
14
|
import { Field } from './components/field/Component.js';
|
|
15
15
|
import { Optgroup } from './components/optgroup/Component.js';
|
|
16
|
+
import '@alfalab/core-components/badge';
|
|
17
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
18
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
19
|
+
import './components/base-select-mobile/checkmark/Component.js';
|
|
16
20
|
import '@alfalab/core-components-checkbox/modern';
|
|
17
21
|
import './components/checkmark/Component.js';
|
|
18
22
|
import { Option } from './components/option/Component.js';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ChevronDownMIcon } from '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
4
4
|
|
|
5
|
-
var styles = {"arrow":"
|
|
5
|
+
var styles = {"arrow":"select__arrow_14th9","open":"select__open_14th9"};
|
|
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: 1wu00 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-graphic-primary: #0b1f35;
|
|
4
4
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.select__arrow_14th9 {
|
|
28
28
|
display: block;
|
|
29
29
|
width: 24px;
|
|
30
30
|
height: 24px;
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
|
|
33
33
|
transition: transform 0.15s ease-in-out, opacity 0.2s ease;
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.select__open_14th9 {
|
|
36
36
|
transform: var(--arrow-transform);
|
|
37
37
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
4
|
+
import { Checkbox } from '@alfalab/core-components-checkbox/modern';
|
|
5
|
+
|
|
6
|
+
var styles = {"checkmark":"select__checkmark_1op05","single":"select__single_1op05","selected":"select__selected_1op05"};
|
|
7
|
+
require('./index.css')
|
|
8
|
+
|
|
9
|
+
const BaseCheckmark = ({ selected, disabled = false, className, multiple, }) => {
|
|
10
|
+
const checkmarkClassNames = cn(styles.checkmark, className, {
|
|
11
|
+
[styles.multiple]: multiple,
|
|
12
|
+
[styles.single]: !multiple,
|
|
13
|
+
[styles.selected]: selected,
|
|
14
|
+
});
|
|
15
|
+
return multiple ? (React.createElement(Checkbox, { checked: selected, disabled: disabled, className: checkmarkClassNames, size: 'm', onClick: (event) => event.stopPropagation() })) : (React.createElement(CheckmarkMIcon, { className: checkmarkClassNames }));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { BaseCheckmark };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* hash: c8r6t */
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
/* Hard */
|
|
5
|
+
|
|
6
|
+
/* Up */
|
|
7
|
+
|
|
8
|
+
/* Hard up */
|
|
9
|
+
}
|
|
10
|
+
:root {
|
|
11
|
+
|
|
12
|
+
/* options list */
|
|
13
|
+
|
|
14
|
+
/* option */
|
|
15
|
+
|
|
16
|
+
/* checkmark */
|
|
17
|
+
|
|
18
|
+
/* optgroup */
|
|
19
|
+
}
|
|
20
|
+
.select__checkmark_1op05 {
|
|
21
|
+
flex-shrink: 0;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
.select__single_1op05 {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
opacity: 0
|
|
29
|
+
}
|
|
30
|
+
.select__single_1op05.select__selected_1op05 {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { isValidElement } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
4
|
+
import '@alfalab/core-components-checkbox/modern';
|
|
5
|
+
import { BaseCheckmark } from '../base-checkmark/Component.js';
|
|
6
|
+
|
|
7
|
+
var styles = {"option":"select__option_1deip","disabled":"select__disabled_1deip","checkmarkBefore":"select__checkmarkBefore_1deip","checkmarkAfter":"select__checkmarkAfter_1deip","textContent":"select__textContent_1deip","mobileTextContent":"select__mobileTextContent_1deip","selected":"select__selected_1deip","highlighted":"select__highlighted_1deip","content":"select__content_1deip"};
|
|
8
|
+
require('./index.css')
|
|
9
|
+
|
|
10
|
+
const BaseOption = ({ className, option, children, selected, highlighted, disabled, multiple, Checkmark = BaseCheckmark, checkmarkPosition = multiple ? 'before' : 'after', innerProps, dataTestId, mobile = false, }) => {
|
|
11
|
+
const content = children || option.content || option.key;
|
|
12
|
+
const { showCheckMark = true } = option;
|
|
13
|
+
const isTextContent = !isValidElement(content);
|
|
14
|
+
const renderCheckmark = () => {
|
|
15
|
+
if (Checkmark && showCheckMark) {
|
|
16
|
+
return React.createElement(Checkmark, { disabled: disabled, selected: selected, multiple: multiple });
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
};
|
|
20
|
+
return (React.createElement("div", { ...innerProps, className: cn(styles.option, className, {
|
|
21
|
+
[styles.highlighted]: highlighted,
|
|
22
|
+
[styles.selected]: selected,
|
|
23
|
+
[styles.disabled]: disabled,
|
|
24
|
+
[styles.textContent]: isTextContent && !mobile,
|
|
25
|
+
[styles.mobileTextContent]: isTextContent && mobile,
|
|
26
|
+
[styles.checkmarkAfter]: !isTextContent && checkmarkPosition === 'after',
|
|
27
|
+
[styles.checkmarkBefore]: !isTextContent && checkmarkPosition === 'before',
|
|
28
|
+
}), "data-test-id": dataTestId },
|
|
29
|
+
checkmarkPosition === 'before' && renderCheckmark(),
|
|
30
|
+
React.createElement("div", { className: cn(styles.content) }, content),
|
|
31
|
+
checkmarkPosition === 'after' && renderCheckmark()));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { BaseOption };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* hash: s3rj0 */
|
|
2
|
+
:root {
|
|
3
|
+
--color-light-bg-primary: #fff;
|
|
4
|
+
--color-light-bg-secondary: #f3f4f5;
|
|
5
|
+
--color-light-bg-tertiary: #e7e9eb;
|
|
6
|
+
--color-light-text-primary: #0b1f35;
|
|
7
|
+
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
8
|
+
}
|
|
9
|
+
:root {
|
|
10
|
+
|
|
11
|
+
/* Hard */
|
|
12
|
+
|
|
13
|
+
/* Up */
|
|
14
|
+
|
|
15
|
+
/* Hard up */
|
|
16
|
+
}
|
|
17
|
+
:root {
|
|
18
|
+
--gap-s: 12px;
|
|
19
|
+
--gap-m: 16px;
|
|
20
|
+
}
|
|
21
|
+
:root {
|
|
22
|
+
--disabled-cursor: not-allowed;
|
|
23
|
+
--size-s-height: 48px;
|
|
24
|
+
}
|
|
25
|
+
:root {
|
|
26
|
+
|
|
27
|
+
/* options list */
|
|
28
|
+
|
|
29
|
+
/* option */
|
|
30
|
+
--select-option-background: var(--color-light-bg-primary);
|
|
31
|
+
--select-option-selected-background: var(--color-light-bg-primary);
|
|
32
|
+
--select-option-hover-background: var(--color-light-bg-secondary);
|
|
33
|
+
--select-option-active-background: var(--color-light-bg-tertiary);
|
|
34
|
+
--select-option-disabled-background: var(--color-light-bg-primary);
|
|
35
|
+
--select-option-color: var(--color-light-text-primary);
|
|
36
|
+
--select-option-selected-color: var(--color-light-text-primary);
|
|
37
|
+
--select-option-hover-color: var(--color-light-text-primary);
|
|
38
|
+
--select-option-active-color: var(--color-light-text-primary);
|
|
39
|
+
--select-option-disabled-color: var(--color-light-text-secondary);
|
|
40
|
+
|
|
41
|
+
/* checkmark */
|
|
42
|
+
|
|
43
|
+
/* optgroup */
|
|
44
|
+
}
|
|
45
|
+
.select__option_1deip {
|
|
46
|
+
font-size: 16px;
|
|
47
|
+
line-height: 20px;
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
grid-gap: var(--gap-s);
|
|
53
|
+
grid-gap: var(--gap-s);
|
|
54
|
+
gap: var(--gap-s);
|
|
55
|
+
transition: background-color 0.2s ease;
|
|
56
|
+
background: var(--select-option-background);
|
|
57
|
+
color: var(--select-option-color);
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
position: relative;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
min-height: var(--size-s-height)
|
|
62
|
+
}
|
|
63
|
+
.select__option_1deip:not(.select__disabled_1deip):active {
|
|
64
|
+
background: var(--select-option-active-background);
|
|
65
|
+
color: var(--select-option-active-color);
|
|
66
|
+
}
|
|
67
|
+
.select__option_1deip.select__checkmarkBefore_1deip {
|
|
68
|
+
padding: 0 0 0 var(--gap-s);
|
|
69
|
+
}
|
|
70
|
+
.select__option_1deip.select__checkmarkAfter_1deip {
|
|
71
|
+
padding: 0 var(--gap-s) 0 0;
|
|
72
|
+
}
|
|
73
|
+
.select__option_1deip.select__textContent_1deip {
|
|
74
|
+
padding: var(--gap-s);
|
|
75
|
+
}
|
|
76
|
+
.select__option_1deip.select__mobileTextContent_1deip {
|
|
77
|
+
padding: var(--gap-m);
|
|
78
|
+
}
|
|
79
|
+
.select__selected_1deip {
|
|
80
|
+
background: var(--select-option-selected-background);
|
|
81
|
+
color: var(--select-option-selected-color);
|
|
82
|
+
cursor: default;
|
|
83
|
+
}
|
|
84
|
+
.select__highlighted_1deip {
|
|
85
|
+
background: var(--select-option-hover-background);
|
|
86
|
+
color: var(--select-option-hover-color);
|
|
87
|
+
}
|
|
88
|
+
.select__disabled_1deip {
|
|
89
|
+
cursor: var(--disabled-cursor);
|
|
90
|
+
background: var(--select-option-disabled-background);
|
|
91
|
+
color: var(--select-option-disabled-color);
|
|
92
|
+
}
|
|
93
|
+
.select__content_1deip {
|
|
94
|
+
flex: 1;
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -5,6 +5,6 @@ import '@juggle/resize-observer';
|
|
|
5
5
|
import 'downshift';
|
|
6
6
|
import '@alfalab/core-components-popover/modern';
|
|
7
7
|
import '@alfalab/hooks';
|
|
8
|
-
export { B as BaseSelect } from '../../Component-
|
|
8
|
+
export { B as BaseSelect } from '../../Component-6c794caf.js';
|
|
9
9
|
import '../../utils.js';
|
|
10
10
|
import '../native-select/Component.js';
|