@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.
Files changed (109) hide show
  1. package/{Component-72dda473.d.ts → Component-064acd29.d.ts} +1 -1
  2. package/{cssm/Component-c29389e5.d.ts → Component-70284312.d.ts} +1 -1
  3. package/Component-a5b021bd.d.ts +4 -2
  4. package/Component-bdb4c6b9.d.ts +2 -2
  5. package/Component-c44170fe.d.ts +5 -3
  6. package/{esm/ResponsiveContext-8a2a8ad1.d.ts → ResponsiveContext-88b743b5.d.ts} +1 -1
  7. package/consts-6c9aad46.d.ts +12 -0
  8. package/consts-ef43bf1b.d.ts +12 -0
  9. package/cssm/{Component-72dda473.d.ts → Component-064acd29.d.ts} +1 -1
  10. package/{Component-c29389e5.d.ts → cssm/Component-70284312.d.ts} +1 -1
  11. package/cssm/Component-a5b021bd.d.ts +4 -2
  12. package/cssm/Component-bdb4c6b9.d.ts +2 -2
  13. package/cssm/Component-c44170fe.d.ts +5 -3
  14. package/{modern/ResponsiveContext-8a2a8ad1.d.ts → cssm/ResponsiveContext-88b743b5.d.ts} +1 -1
  15. package/cssm/consts-6c9aad46.d.ts +12 -0
  16. package/cssm/consts-ef43bf1b.d.ts +12 -0
  17. package/cssm/desktop/Component.desktop.d.ts +2 -0
  18. package/cssm/desktop/Component.desktop.js +2 -2
  19. package/cssm/field/Component.d.ts +1 -1
  20. package/cssm/field/Component.js +16 -2
  21. package/cssm/field/index.module.css +1 -1
  22. package/{esm/index-72dda473.d.ts → cssm/index-064acd29.d.ts} +2 -1
  23. package/cssm/index-a5b021bd.d.ts +1 -1
  24. package/cssm/index.module.css +1 -1
  25. package/cssm/mobile/Component.mobile.js +1 -1
  26. package/cssm/option/index.module.css +1 -1
  27. package/cssm/types.d.ts +1 -1
  28. package/cssm/{typings-c29389e5.d.ts → typings-70284312.d.ts} +16 -11
  29. package/{esm/typings-8a2a8ad1.d.ts → cssm/typings-88b743b5.d.ts} +3 -2
  30. package/cssm/utils/index.d.ts +2 -2
  31. package/cssm/utils/index.js +2 -2
  32. package/cssm/utils-89376c31.d.ts +1 -1
  33. package/desktop/Component.desktop.d.ts +2 -0
  34. package/desktop/Component.desktop.js +3 -3
  35. package/esm/{Component-72dda473.d.ts → Component-064acd29.d.ts} +1 -1
  36. package/esm/{Component-c29389e5.d.ts → Component-70284312.d.ts} +1 -1
  37. package/esm/Component-a5b021bd.d.ts +4 -2
  38. package/esm/Component-bdb4c6b9.d.ts +2 -2
  39. package/esm/Component-c44170fe.d.ts +5 -3
  40. package/{ResponsiveContext-8a2a8ad1.d.ts → esm/ResponsiveContext-88b743b5.d.ts} +1 -1
  41. package/esm/consts-6c9aad46.d.ts +12 -0
  42. package/esm/consts-ef43bf1b.d.ts +12 -0
  43. package/esm/desktop/Component.desktop.d.ts +2 -0
  44. package/esm/desktop/Component.desktop.js +3 -3
  45. package/esm/field/Component.d.ts +1 -1
  46. package/esm/field/Component.js +17 -3
  47. package/esm/field/index.css +7 -7
  48. package/{index-72dda473.d.ts → esm/index-064acd29.d.ts} +2 -1
  49. package/esm/index-a5b021bd.d.ts +1 -1
  50. package/esm/index.css +6 -6
  51. package/esm/mobile/Component.mobile.js +1 -1
  52. package/esm/option/Component.js +1 -1
  53. package/esm/option/index.css +5 -5
  54. package/esm/types.d.ts +1 -1
  55. package/esm/{typings-c29389e5.d.ts → typings-70284312.d.ts} +16 -11
  56. package/{modern/typings-8a2a8ad1.d.ts → esm/typings-88b743b5.d.ts} +3 -2
  57. package/esm/utils/index.d.ts +2 -2
  58. package/esm/utils/index.js +2 -2
  59. package/esm/utils-89376c31.d.ts +1 -1
  60. package/field/Component.d.ts +1 -1
  61. package/field/Component.js +17 -3
  62. package/field/index.css +7 -7
  63. package/{cssm/index-72dda473.d.ts → index-064acd29.d.ts} +2 -1
  64. package/index-a5b021bd.d.ts +1 -1
  65. package/index.css +6 -6
  66. package/mobile/Component.mobile.js +1 -1
  67. package/modern/{Component-72dda473.d.ts → Component-064acd29.d.ts} +1 -1
  68. package/modern/{Component-c29389e5.d.ts → Component-70284312.d.ts} +1 -1
  69. package/modern/Component-a5b021bd.d.ts +4 -2
  70. package/modern/Component-bdb4c6b9.d.ts +2 -2
  71. package/modern/Component-c44170fe.d.ts +5 -3
  72. package/{cssm/ResponsiveContext-8a2a8ad1.d.ts → modern/ResponsiveContext-88b743b5.d.ts} +1 -1
  73. package/modern/consts-6c9aad46.d.ts +12 -0
  74. package/modern/consts-ef43bf1b.d.ts +12 -0
  75. package/modern/desktop/Component.desktop.d.ts +2 -0
  76. package/modern/desktop/Component.desktop.js +3 -3
  77. package/modern/field/Component.d.ts +1 -1
  78. package/modern/field/Component.js +17 -3
  79. package/modern/field/index.css +7 -7
  80. package/modern/{index-72dda473.d.ts → index-064acd29.d.ts} +2 -1
  81. package/modern/index-a5b021bd.d.ts +1 -1
  82. package/modern/index.css +6 -6
  83. package/modern/mobile/Component.mobile.js +1 -1
  84. package/modern/option/Component.js +1 -1
  85. package/modern/option/index.css +5 -5
  86. package/modern/types.d.ts +1 -1
  87. package/modern/{typings-c29389e5.d.ts → typings-70284312.d.ts} +16 -11
  88. package/{typings-8a2a8ad1.d.ts → modern/typings-88b743b5.d.ts} +3 -2
  89. package/modern/utils/index.d.ts +2 -2
  90. package/modern/utils/index.js +2 -2
  91. package/modern/utils-89376c31.d.ts +1 -1
  92. package/option/Component.js +1 -1
  93. package/option/index.css +5 -5
  94. package/package.json +3 -3
  95. package/src/desktop/Component.desktop.tsx +3 -2
  96. package/src/field/Component.tsx +20 -2
  97. package/src/mobile/Component.mobile.tsx +1 -1
  98. package/src/types.ts +1 -1
  99. package/src/utils/index.ts +4 -4
  100. package/types.d.ts +1 -1
  101. package/{typings-c29389e5.d.ts → typings-70284312.d.ts} +16 -11
  102. package/{cssm/typings-8a2a8ad1.d.ts → typings-88b743b5.d.ts} +3 -2
  103. package/utils/index.d.ts +2 -2
  104. package/utils/index.js +2 -2
  105. package/utils-89376c31.d.ts +1 -1
  106. package/consts-f777ba1a.d.ts +0 -2
  107. package/cssm/consts-f777ba1a.d.ts +0 -2
  108. package/esm/consts-f777ba1a.d.ts +0 -2
  109. 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' ? 'm' : 's'}
73
+ size={size === 'm' || size === 56 ? 56 : 48}
74
74
  closeOnSelect={true}
75
75
  fieldProps={{
76
76
  ...fieldDefaultProps,
package/src/types.ts CHANGED
@@ -1,3 +1,3 @@
1
- export type PickerButtonSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
1
+ export type PickerButtonSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 32 | 40 | 48 | 56 | 64 | 72;
2
2
 
3
3
  export type PickerButtonVariant = 'default' | 'compact';
@@ -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 { PickerButtonSize, PickerButtonVariant } from '../types';
8
+ import { PickerButtonVariant } from '../types';
9
9
 
10
10
  export const getIcon = (
11
11
  variant: PickerButtonVariant,
12
- size: PickerButtonSize,
12
+ size: string,
13
13
  ): FC<SVGProps<SVGSVGElement>> => {
14
14
  if (variant === 'compact') {
15
- return size === 'xxs' ? MoreSIcon : MoreMIcon;
15
+ return size === 'size-32' ? MoreSIcon : MoreMIcon;
16
16
  }
17
17
 
18
- return size === 'xxs' || size === 'xs' ? ChevronDownCompactSIcon : ChevronDownMIcon;
18
+ return ['size-40', 'size-32'].includes(size) ? ChevronDownCompactSIcon : ChevronDownMIcon;
19
19
  };
package/types.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- type PickerButtonSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
1
+ type PickerButtonSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 32 | 40 | 48 | 56 | 64 | 72;
2
2
  type PickerButtonVariant = 'default' | 'compact';
3
3
  export { PickerButtonSize, PickerButtonVariant };
@@ -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-72dda473";
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-8a2a8ad1";
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-8a2a8ad1").ContentProps>;
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-8a2a8ad1";
1049
+ export { ModalResponsiveProps as ModalProps } from "./typings-88b743b5";
1045
1050
  export { ModalContext } from "./Context-c2e6f1b2";
1046
- export type { ContentProps as ModalContentProps } from "./typings-8a2a8ad1";
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 "m"
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 { PickerButtonSize, PickerButtonVariant } from "../types";
3
- declare const getIcon: (variant: PickerButtonVariant, size: PickerButtonSize) => FC<SVGProps<SVGSVGElement>>;
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 === 'xxs' ? MoreSIcon.MoreSIcon : MoreMIcon.MoreMIcon;
12
+ return size === 'size-32' ? MoreSIcon.MoreSIcon : MoreMIcon.MoreMIcon;
13
13
  }
14
- return size === 'xxs' || size === 'xs' ? ChevronDownCompactSIcon.ChevronDownCompactSIcon : ChevronDownMIcon.ChevronDownMIcon;
14
+ return ['size-40', 'size-32'].includes(size) ? ChevronDownCompactSIcon.ChevronDownCompactSIcon : ChevronDownMIcon.ChevronDownMIcon;
15
15
  };
16
16
 
17
17
  exports.getIcon = getIcon;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape } from "./typings-c29389e5";
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, }: {
@@ -1,2 +0,0 @@
1
- declare const DEFAULT_VISIBLE_OPTIONS = 5;
2
- export { DEFAULT_VISIBLE_OPTIONS };
@@ -1,2 +0,0 @@
1
- declare const DEFAULT_VISIBLE_OPTIONS = 5;
2
- export { DEFAULT_VISIBLE_OPTIONS };
@@ -1,2 +0,0 @@
1
- declare const DEFAULT_VISIBLE_OPTIONS = 5;
2
- export { DEFAULT_VISIBLE_OPTIONS };
@@ -1,2 +0,0 @@
1
- declare const DEFAULT_VISIBLE_OPTIONS = 5;
2
- export { DEFAULT_VISIBLE_OPTIONS };