@alfalab/core-components-international-phone-input 2.2.2 → 2.3.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 (41) hide show
  1. package/Component.responsive.js +2 -1
  2. package/components/base-international-phone-input/Component.js +1 -1
  3. package/components/base-international-phone-input/index.css +2 -2
  4. package/components/country-select/Component.js +1 -1
  5. package/components/country-select/index.css +8 -8
  6. package/components/flag-icon/component.js +1 -1
  7. package/components/flag-icon/index.css +3 -3
  8. package/components/select-field/component.js +1 -1
  9. package/components/select-field/index.css +9 -9
  10. package/cssm/Component.responsive.js +2 -1
  11. package/cssm/typings-7d83ec1e.d.ts +54 -2
  12. package/esm/Component.responsive.js +2 -1
  13. package/esm/components/base-international-phone-input/Component.js +1 -1
  14. package/esm/components/base-international-phone-input/index.css +2 -2
  15. package/esm/components/country-select/Component.js +1 -1
  16. package/esm/components/country-select/index.css +8 -8
  17. package/esm/components/flag-icon/component.js +1 -1
  18. package/esm/components/flag-icon/index.css +3 -3
  19. package/esm/components/select-field/component.js +1 -1
  20. package/esm/components/select-field/index.css +9 -9
  21. package/esm/typings-7d83ec1e.d.ts +54 -2
  22. package/modern/Component.responsive.js +2 -1
  23. package/modern/components/base-international-phone-input/Component.js +1 -1
  24. package/modern/components/base-international-phone-input/index.css +2 -2
  25. package/modern/components/country-select/Component.js +1 -1
  26. package/modern/components/country-select/index.css +8 -8
  27. package/modern/components/flag-icon/component.js +1 -1
  28. package/modern/components/flag-icon/index.css +3 -3
  29. package/modern/components/select-field/component.js +1 -1
  30. package/modern/components/select-field/index.css +9 -9
  31. package/modern/typings-7d83ec1e.d.ts +54 -2
  32. package/moderncssm/Component.responsive.js +2 -1
  33. package/moderncssm/typings-7d83ec1e.d.ts +54 -2
  34. package/package.json +6 -6
  35. package/src/Component.responsive.tsx +2 -1
  36. package/typings-7d83ec1e.d.ts +54 -2
  37. package/cssm/transformSize-ebda875c.d.ts +0 -3
  38. package/esm/transformSize-ebda875c.d.ts +0 -3
  39. package/modern/transformSize-ebda875c.d.ts +0 -3
  40. package/moderncssm/transformSize-ebda875c.d.ts +0 -3
  41. package/transformSize-ebda875c.d.ts +0 -3
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
 
3
3
  import { useMatchMedia } from '@alfalab/core-components-mq';
4
+ import { getComponentBreakpoint } from '@alfalab/core-components-shared';
4
5
 
5
6
  import { InternationalPhoneInputDesktop } from './desktop';
6
7
  import { InternationalPhoneInputMobile } from './mobile';
@@ -9,7 +10,7 @@ import { InternationalPhoneInputProps } from './types';
9
10
  export const InternationalPhoneInput = React.forwardRef<
10
11
  HTMLInputElement,
11
12
  InternationalPhoneInputProps
12
- >(({ breakpoint = 1024, defaultMatchMediaValue, ...restProps }, ref) => {
13
+ >(({ breakpoint = getComponentBreakpoint(), defaultMatchMediaValue, ...restProps }, ref) => {
13
14
  const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, defaultMatchMediaValue);
14
15
 
15
16
  return isDesktop ? (
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="react-transition-group" />
3
3
  import React from "react";
4
- import { HTMLAttributes, ReactElement, ReactNode, RefObject, ButtonHTMLAttributes, ElementType, FC, CSSProperties, MutableRefObject, ForwardRefExoticComponent, RefAttributes, AriaAttributes, ComponentType, FocusEvent, MouseEvent, SVGProps } from "react";
4
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject, ButtonHTMLAttributes, ElementType, FC, CSSProperties, MutableRefObject, ForwardRefExoticComponent, RefAttributes, AnchorHTMLAttributes, AriaAttributes, ComponentType, FocusEvent, MouseEvent, SVGProps } from "react";
5
5
  import { HandledEvents } from "react-swipeable/es/types";
6
6
  import { TransitionProps } from "react-transition-group/Transition";
7
7
  import { BaseModalProps, BaseModalContext } from "./index-11f20b2e";
@@ -13,6 +13,7 @@ import { Color } from "./colors-facf1d2a";
13
13
  import { TextElementType, TextSkeletonProps } from "./types-1328ead9";
14
14
  import { TitleProps } from "./index-03d088c4";
15
15
  import { TitleMobileProps } from "./index-281accb7";
16
+ import { ButtonProps } from "./index-ed61931d";
16
17
  import { ContentProps } from "./typings-d6bfd5b7";
17
18
  import { ModalResponsiveProps as ModalProps } from "./typings-d6bfd5b7";
18
19
  import { InputProps } from "@alfalab/core-components-input";
@@ -775,6 +776,57 @@ declare const typographyPresets: {
775
776
  };
776
777
  };
777
778
  };
779
+ type IconButtonProps = {
780
+ /**
781
+ * Компонент иконки
782
+ */
783
+ icon: ElementType<{
784
+ className?: string;
785
+ }> | ReactElement;
786
+ /**
787
+ * Тип кнопки
788
+ */
789
+ view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
790
+ /**
791
+ * Размер компонента
792
+ * @description xxs, xs, s deprecated, используйте вместо них 24, 32, 40 соответственно
793
+ */
794
+ size?: "xxs" | "xs" | "s" | 24 | 32 | 40 | 48 | 56;
795
+ /**
796
+ * Дополнительный класс
797
+ */
798
+ className?: string;
799
+ /**
800
+ * Включает прозрачный фон
801
+ * @default false
802
+ */
803
+ transparentBg?: boolean;
804
+ /**
805
+ * Выравнивание иконки
806
+ * @default 'center'
807
+ */
808
+ alignIcon?: "left" | "center" | "right";
809
+ /**
810
+ * Идентификатор для систем автоматизированного тестирования
811
+ */
812
+ dataTestId?: string;
813
+ /**
814
+ * Набор цветов для компонента
815
+ */
816
+ colors?: "default" | "inverted";
817
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "Component" | "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
818
+ declare const IconButton: React.ForwardRefExoticComponent<{
819
+ icon: ElementType<{
820
+ className?: string;
821
+ }> | ReactElement;
822
+ view?: "primary" | "secondary" | "tertiary" | "negative" | "transparent" | undefined;
823
+ size?: "s" | "xs" | 48 | 56 | 24 | 32 | 40 | "xxs" | undefined;
824
+ className?: string | undefined;
825
+ transparentBg?: boolean | undefined;
826
+ alignIcon?: "center" | "right" | "left" | undefined;
827
+ dataTestId?: string | undefined;
828
+ colors?: "default" | "inverted" | undefined;
829
+ } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "breakpoint" | "href" | "Component" | "loading"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
778
830
  declare enum SwipeDirection {
779
831
  Left = "Left",
780
832
  Right = "Right",
@@ -1558,7 +1610,7 @@ type ClearButtonProps = {
1558
1610
  */
1559
1611
  dataTestId?: string;
1560
1612
  };
1561
- export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, FormControlProps, FormControl, ModalResponsive as Modal, ModalContext, getModalTestIds, Position, PopoverProps, Popover, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, horizontalDirections, ShouldSkipSwipingParams, useVisibleViewportSize, Typography, typographyPresets, SwipeDirection, Content, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps, ClearButtonProps };
1613
+ export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, FormControlProps, FormControl, ModalResponsive as Modal, ModalContext, getModalTestIds, Position, PopoverProps, Popover, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, horizontalDirections, ShouldSkipSwipingParams, useVisibleViewportSize, Typography, typographyPresets, IconButtonProps, IconButton, SwipeDirection, Content, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps, ClearButtonProps };
1562
1614
  export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, TextProps };
1563
1615
  export { ModalResponsiveProps as ModalProps } from "./typings-d6bfd5b7";
1564
1616
  export type { ContentProps as ModalContentProps } from "./typings-d6bfd5b7";
@@ -1,3 +0,0 @@
1
- import { IconButtonProps } from "./index-ebda875c";
2
- declare const transformSize: (size?: IconButtonProps['size']) => 48 | 56 | 24 | 32 | 40;
3
- export { transformSize };
@@ -1,3 +0,0 @@
1
- import { IconButtonProps } from "./index-ebda875c";
2
- declare const transformSize: (size?: IconButtonProps['size']) => 48 | 56 | 24 | 32 | 40;
3
- export { transformSize };
@@ -1,3 +0,0 @@
1
- import { IconButtonProps } from "./index-ebda875c";
2
- declare const transformSize: (size?: IconButtonProps['size']) => 48 | 56 | 24 | 32 | 40;
3
- export { transformSize };
@@ -1,3 +0,0 @@
1
- import { IconButtonProps } from "./index-ebda875c";
2
- declare const transformSize: (size?: IconButtonProps['size']) => 48 | 56 | 24 | 32 | 40;
3
- export { transformSize };
@@ -1,3 +0,0 @@
1
- import { IconButtonProps } from "./index-ebda875c";
2
- declare const transformSize: (size?: IconButtonProps['size']) => 48 | 56 | 24 | 32 | 40;
3
- export { transformSize };