@alfalab/core-components-picker-button 11.5.3 → 11.6.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-72dda473.d.ts → Component-064acd29.d.ts} +1 -1
- package/{cssm/Component-c29389e5.d.ts → Component-70284312.d.ts} +1 -1
- package/Component-a5b021bd.d.ts +4 -2
- package/Component-bdb4c6b9.d.ts +2 -2
- package/Component-c44170fe.d.ts +5 -3
- package/{esm/ResponsiveContext-8a2a8ad1.d.ts → ResponsiveContext-88b743b5.d.ts} +1 -1
- package/consts-6c9aad46.d.ts +12 -0
- package/consts-ef43bf1b.d.ts +12 -0
- package/cssm/{Component-72dda473.d.ts → Component-064acd29.d.ts} +1 -1
- package/{Component-c29389e5.d.ts → cssm/Component-70284312.d.ts} +1 -1
- package/cssm/Component-a5b021bd.d.ts +4 -2
- package/cssm/Component-bdb4c6b9.d.ts +2 -2
- package/cssm/Component-c44170fe.d.ts +5 -3
- package/{modern/ResponsiveContext-8a2a8ad1.d.ts → cssm/ResponsiveContext-88b743b5.d.ts} +1 -1
- package/cssm/consts-6c9aad46.d.ts +12 -0
- package/cssm/consts-ef43bf1b.d.ts +12 -0
- package/cssm/desktop/Component.desktop.d.ts +2 -0
- package/cssm/desktop/Component.desktop.js +2 -2
- package/cssm/field/Component.d.ts +1 -1
- package/cssm/field/Component.js +16 -2
- package/cssm/field/index.module.css +1 -1
- package/{esm/index-72dda473.d.ts → cssm/index-064acd29.d.ts} +2 -1
- package/cssm/index-a5b021bd.d.ts +1 -1
- package/cssm/index.module.css +1 -1
- package/cssm/mobile/Component.mobile.js +1 -1
- package/cssm/option/index.module.css +1 -1
- package/cssm/types.d.ts +1 -1
- package/cssm/{typings-c29389e5.d.ts → typings-70284312.d.ts} +16 -11
- package/{esm/typings-8a2a8ad1.d.ts → cssm/typings-88b743b5.d.ts} +3 -2
- package/cssm/utils/index.d.ts +2 -2
- package/cssm/utils/index.js +2 -2
- package/cssm/utils-89376c31.d.ts +1 -1
- package/desktop/Component.desktop.d.ts +2 -0
- package/desktop/Component.desktop.js +3 -3
- package/esm/{Component-72dda473.d.ts → Component-064acd29.d.ts} +1 -1
- package/esm/{Component-c29389e5.d.ts → Component-70284312.d.ts} +1 -1
- package/esm/Component-a5b021bd.d.ts +4 -2
- package/esm/Component-bdb4c6b9.d.ts +2 -2
- package/esm/Component-c44170fe.d.ts +5 -3
- package/{ResponsiveContext-8a2a8ad1.d.ts → esm/ResponsiveContext-88b743b5.d.ts} +1 -1
- package/esm/consts-6c9aad46.d.ts +12 -0
- package/esm/consts-ef43bf1b.d.ts +12 -0
- package/esm/desktop/Component.desktop.d.ts +2 -0
- package/esm/desktop/Component.desktop.js +3 -3
- package/esm/field/Component.d.ts +1 -1
- package/esm/field/Component.js +17 -3
- package/esm/field/index.css +7 -7
- package/{index-72dda473.d.ts → esm/index-064acd29.d.ts} +2 -1
- package/esm/index-a5b021bd.d.ts +1 -1
- package/esm/index.css +6 -6
- package/esm/mobile/Component.mobile.js +1 -1
- package/esm/option/Component.js +1 -1
- package/esm/option/index.css +5 -5
- package/esm/types.d.ts +1 -1
- package/esm/{typings-c29389e5.d.ts → typings-70284312.d.ts} +16 -11
- package/{modern/typings-8a2a8ad1.d.ts → esm/typings-88b743b5.d.ts} +3 -2
- package/esm/utils/index.d.ts +2 -2
- package/esm/utils/index.js +2 -2
- package/esm/utils-89376c31.d.ts +1 -1
- package/field/Component.d.ts +1 -1
- package/field/Component.js +17 -3
- package/field/index.css +7 -7
- package/{cssm/index-72dda473.d.ts → index-064acd29.d.ts} +2 -1
- package/index-a5b021bd.d.ts +1 -1
- package/index.css +6 -6
- package/mobile/Component.mobile.js +1 -1
- package/modern/{Component-72dda473.d.ts → Component-064acd29.d.ts} +1 -1
- package/modern/{Component-c29389e5.d.ts → Component-70284312.d.ts} +1 -1
- package/modern/Component-a5b021bd.d.ts +4 -2
- package/modern/Component-bdb4c6b9.d.ts +2 -2
- package/modern/Component-c44170fe.d.ts +5 -3
- package/{cssm/ResponsiveContext-8a2a8ad1.d.ts → modern/ResponsiveContext-88b743b5.d.ts} +1 -1
- package/modern/consts-6c9aad46.d.ts +12 -0
- package/modern/consts-ef43bf1b.d.ts +12 -0
- package/modern/desktop/Component.desktop.d.ts +2 -0
- package/modern/desktop/Component.desktop.js +3 -3
- package/modern/field/Component.d.ts +1 -1
- package/modern/field/Component.js +17 -3
- package/modern/field/index.css +7 -7
- package/modern/{index-72dda473.d.ts → index-064acd29.d.ts} +2 -1
- package/modern/index-a5b021bd.d.ts +1 -1
- package/modern/index.css +6 -6
- package/modern/mobile/Component.mobile.js +1 -1
- package/modern/option/Component.js +1 -1
- package/modern/option/index.css +5 -5
- package/modern/types.d.ts +1 -1
- package/modern/{typings-c29389e5.d.ts → typings-70284312.d.ts} +16 -11
- package/{typings-8a2a8ad1.d.ts → modern/typings-88b743b5.d.ts} +3 -2
- package/modern/utils/index.d.ts +2 -2
- package/modern/utils/index.js +2 -2
- package/modern/utils-89376c31.d.ts +1 -1
- package/option/Component.js +1 -1
- package/option/index.css +5 -5
- package/package.json +3 -3
- package/src/desktop/Component.desktop.tsx +3 -2
- package/src/field/Component.tsx +20 -2
- package/src/mobile/Component.mobile.tsx +1 -1
- package/src/types.ts +1 -1
- package/src/utils/index.ts +4 -4
- package/types.d.ts +1 -1
- package/{typings-c29389e5.d.ts → typings-70284312.d.ts} +16 -11
- package/{cssm/typings-8a2a8ad1.d.ts → typings-88b743b5.d.ts} +3 -2
- package/utils/index.d.ts +2 -2
- package/utils/index.js +2 -2
- package/utils-89376c31.d.ts +1 -1
- package/consts-f777ba1a.d.ts +0 -2
- package/cssm/consts-f777ba1a.d.ts +0 -2
- package/esm/consts-f777ba1a.d.ts +0 -2
- package/modern/consts-f777ba1a.d.ts +0 -2
|
@@ -70,7 +70,7 @@ export const PickerButtonMobile = forwardRef<HTMLInputElement, PickerButtonMobil
|
|
|
70
70
|
}}
|
|
71
71
|
Field={Field}
|
|
72
72
|
Optgroup={Optgroup}
|
|
73
|
-
size={size === 'm' ?
|
|
73
|
+
size={size === 'm' || size === 56 ? 56 : 48}
|
|
74
74
|
closeOnSelect={true}
|
|
75
75
|
fieldProps={{
|
|
76
76
|
...fieldDefaultProps,
|
package/src/types.ts
CHANGED
package/src/utils/index.ts
CHANGED
|
@@ -5,15 +5,15 @@ import { ChevronDownMIcon } from '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
5
5
|
import { MoreMIcon } from '@alfalab/icons-glyph/MoreMIcon';
|
|
6
6
|
import { MoreSIcon } from '@alfalab/icons-glyph/MoreSIcon';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { PickerButtonVariant } from '../types';
|
|
9
9
|
|
|
10
10
|
export const getIcon = (
|
|
11
11
|
variant: PickerButtonVariant,
|
|
12
|
-
size:
|
|
12
|
+
size: string,
|
|
13
13
|
): FC<SVGProps<SVGSVGElement>> => {
|
|
14
14
|
if (variant === 'compact') {
|
|
15
|
-
return size === '
|
|
15
|
+
return size === 'size-32' ? MoreSIcon : MoreMIcon;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
return size
|
|
18
|
+
return ['size-40', 'size-32'].includes(size) ? ChevronDownCompactSIcon : ChevronDownMIcon;
|
|
19
19
|
};
|
package/types.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ import { HandledEvents } from "react-swipeable/es/types";
|
|
|
6
6
|
import { TransitionProps } from "react-transition-group/Transition";
|
|
7
7
|
import { BaseModalProps } from "./index-bdb4c6b9";
|
|
8
8
|
import { NavigationBarProps } from "./types-667e33fd";
|
|
9
|
-
import { BackgroundColorType } from "./index-
|
|
9
|
+
import { BackgroundColorType } from "./index-064acd29";
|
|
10
10
|
import { BaseInputProps, BackdropProps } from "./index-ebda875c";
|
|
11
11
|
import { SwipeableHandlers } from "react-swipeable";
|
|
12
12
|
import { FormControlProps } from "./index-c44170fe";
|
|
13
|
-
import { ModalResponsiveProps as ModalProps } from "./typings-
|
|
13
|
+
import { ModalResponsiveProps as ModalProps } from "./typings-88b743b5";
|
|
14
14
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
15
15
|
import { UseSelectWithApplyProps } from "./field/Component";
|
|
16
16
|
type BottomSheetTitleAlign = "center" | "left";
|
|
@@ -328,7 +328,7 @@ type FooterProps = {
|
|
|
328
328
|
gap?: 16 | 24 | 32;
|
|
329
329
|
};
|
|
330
330
|
declare const ModalResponsive: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
|
|
331
|
-
size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
|
|
331
|
+
size?: "s" | "m" | "l" | "xl" | 500 | "fullscreen" | 600 | 800 | 1140 | undefined;
|
|
332
332
|
fullscreen?: boolean | undefined;
|
|
333
333
|
fixedPosition?: boolean | undefined;
|
|
334
334
|
hasCloser?: boolean | undefined;
|
|
@@ -337,7 +337,7 @@ declare const ModalResponsive: React.ForwardRefExoticComponent<import("./index-b
|
|
|
337
337
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
338
338
|
} & React.RefAttributes<HTMLDivElement>> & {
|
|
339
339
|
Header: React.FC<HeaderProps>;
|
|
340
|
-
Content: React.FC<import("./typings-
|
|
340
|
+
Content: React.FC<import("./typings-88b743b5").ContentProps>;
|
|
341
341
|
Footer: React.FC<FooterProps>;
|
|
342
342
|
Controls: React.FC<ControlsProps>;
|
|
343
343
|
};
|
|
@@ -491,12 +491,14 @@ type BaseSelectProps = {
|
|
|
491
491
|
multiple?: boolean;
|
|
492
492
|
/**
|
|
493
493
|
* Размер компонента
|
|
494
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
494
495
|
*/
|
|
495
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
496
|
+
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
496
497
|
/**
|
|
497
498
|
* Размер пунктов меню
|
|
499
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
498
500
|
*/
|
|
499
|
-
optionsSize?: 's' | 'm' | 'l' | 'xl';
|
|
501
|
+
optionsSize?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
500
502
|
/**
|
|
501
503
|
* Растягивает компонент на ширину контейнера
|
|
502
504
|
*/
|
|
@@ -761,8 +763,9 @@ type OptionsListProps = {
|
|
|
761
763
|
scrollbarClassName?: string;
|
|
762
764
|
/**
|
|
763
765
|
* Размер компонента
|
|
766
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
764
767
|
*/
|
|
765
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
768
|
+
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
766
769
|
/**
|
|
767
770
|
* Компонент пункта меню
|
|
768
771
|
*/
|
|
@@ -864,8 +867,9 @@ type OptgroupProps = {
|
|
|
864
867
|
className?: string;
|
|
865
868
|
/**
|
|
866
869
|
* Размер компонента
|
|
870
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
867
871
|
*/
|
|
868
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
872
|
+
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
869
873
|
/**
|
|
870
874
|
* Заголовок группы
|
|
871
875
|
*/
|
|
@@ -882,8 +886,9 @@ type OptionProps = {
|
|
|
882
886
|
className?: string;
|
|
883
887
|
/**
|
|
884
888
|
* Размер компонента
|
|
889
|
+
* @description s, m, l, xl deprecated, используйте вместо них 48, 56, 64, 72 соответственно
|
|
885
890
|
*/
|
|
886
|
-
size?: 's' | 'm' | 'l' | 'xl';
|
|
891
|
+
size?: 's' | 'm' | 'l' | 'xl' | 48 | 56 | 64 | 72;
|
|
887
892
|
/**
|
|
888
893
|
* Контент пункта меню
|
|
889
894
|
*/
|
|
@@ -1041,8 +1046,8 @@ type SelectProps = BaseSelectProps & AdditionalMobileProps & ConditionalMobilePr
|
|
|
1041
1046
|
};
|
|
1042
1047
|
export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, InputProps, Input, ModalResponsive as Modal, getModalTestIds, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps };
|
|
1043
1048
|
export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps };
|
|
1044
|
-
export { ModalResponsiveProps as ModalProps } from "./typings-
|
|
1049
|
+
export { ModalResponsiveProps as ModalProps } from "./typings-88b743b5";
|
|
1045
1050
|
export { ModalContext } from "./Context-c2e6f1b2";
|
|
1046
|
-
export type { ContentProps as ModalContentProps } from "./typings-
|
|
1051
|
+
export type { ContentProps as ModalContentProps } from "./typings-88b743b5";
|
|
1047
1052
|
export * from "./Component.desktop-63dec22f";
|
|
1048
1053
|
export * from "./Component.mobile-96988a65";
|
|
@@ -3,9 +3,10 @@ import { BaseModalProps } from "./index-bdb4c6b9";
|
|
|
3
3
|
type ModalDesktopProps = BaseModalProps & {
|
|
4
4
|
/**
|
|
5
5
|
* Ширина модального окна
|
|
6
|
-
* @default
|
|
6
|
+
* @default 600
|
|
7
|
+
* @description s, m, l, xl deprecated, используйте вместо них 500, 600, 800, 1140 соответственно
|
|
7
8
|
*/
|
|
8
|
-
size?: 's' | 'm' | 'l' | 'xl' | 'fullscreen';
|
|
9
|
+
size?: 's' | 'm' | 'l' | 'xl' | 'fullscreen' | 500 | 600 | 800 | 1140;
|
|
9
10
|
/**
|
|
10
11
|
* Растягивает модальное окно на весь экран
|
|
11
12
|
* @deprecated Используйте размер fullscreen
|
package/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FC, SVGProps } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const getIcon: (variant: PickerButtonVariant, size:
|
|
2
|
+
import { PickerButtonVariant } from "../types";
|
|
3
|
+
declare const getIcon: (variant: PickerButtonVariant, size: string) => FC<SVGProps<SVGSVGElement>>;
|
|
4
4
|
export { getIcon };
|
package/utils/index.js
CHANGED
|
@@ -9,9 +9,9 @@ var MoreSIcon = require('@alfalab/icons-glyph/MoreSIcon');
|
|
|
9
9
|
|
|
10
10
|
var getIcon = function (variant, size) {
|
|
11
11
|
if (variant === 'compact') {
|
|
12
|
-
return size === '
|
|
12
|
+
return size === 'size-32' ? MoreSIcon.MoreSIcon : MoreMIcon.MoreMIcon;
|
|
13
13
|
}
|
|
14
|
-
return size
|
|
14
|
+
return ['size-40', 'size-32'].includes(size) ? ChevronDownCompactSIcon.ChevronDownCompactSIcon : ChevronDownMIcon.ChevronDownMIcon;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
exports.getIcon = getIcon;
|
package/utils-89376c31.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-70284312";
|
|
3
3
|
declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
|
|
4
4
|
declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
|
|
5
5
|
declare const joinOptions: ({ selected, selectedMultiple, }: {
|
package/consts-f777ba1a.d.ts
DELETED
package/esm/consts-f777ba1a.d.ts
DELETED