@alfalab/core-components-international-phone-input 2.2.0 → 2.2.2

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 (54) hide show
  1. package/components/base-international-phone-input/Component.js +1 -1
  2. package/components/base-international-phone-input/index.css +22 -3
  3. package/components/country-select/Component.js +1 -1
  4. package/components/country-select/index.css +8 -8
  5. package/components/flag-icon/component.js +1 -1
  6. package/components/flag-icon/index.css +5 -4
  7. package/components/select-field/component.js +1 -1
  8. package/components/select-field/index.css +9 -9
  9. package/cssm/components/base-international-phone-input/index.module.css +21 -2
  10. package/cssm/components/country-select/index.module.css +1 -1
  11. package/cssm/components/flag-icon/index.module.css +3 -2
  12. package/cssm/components/select-field/index.module.css +1 -1
  13. package/cssm/transformSize-ebda875c.d.ts +3 -0
  14. package/cssm/typings-7d83ec1e.d.ts +2 -54
  15. package/cssm/use-skeleton-1328ead9.d.ts +5 -0
  16. package/cssm/{utils-3942b092.d.ts → utils-1132e887.d.ts} +1 -1
  17. package/esm/components/base-international-phone-input/Component.js +1 -1
  18. package/esm/components/base-international-phone-input/index.css +22 -3
  19. package/esm/components/country-select/Component.js +1 -1
  20. package/esm/components/country-select/index.css +8 -8
  21. package/esm/components/flag-icon/component.js +1 -1
  22. package/esm/components/flag-icon/index.css +5 -4
  23. package/esm/components/select-field/component.js +1 -1
  24. package/esm/components/select-field/index.css +9 -9
  25. package/esm/transformSize-ebda875c.d.ts +3 -0
  26. package/esm/typings-7d83ec1e.d.ts +2 -54
  27. package/esm/use-skeleton-1328ead9.d.ts +5 -0
  28. package/esm/{utils-3942b092.d.ts → utils-1132e887.d.ts} +1 -1
  29. package/modern/components/base-international-phone-input/Component.js +1 -1
  30. package/modern/components/base-international-phone-input/index.css +22 -3
  31. package/modern/components/country-select/Component.js +1 -1
  32. package/modern/components/country-select/index.css +8 -8
  33. package/modern/components/flag-icon/component.js +1 -1
  34. package/modern/components/flag-icon/index.css +5 -4
  35. package/modern/components/select-field/component.js +1 -1
  36. package/modern/components/select-field/index.css +9 -9
  37. package/modern/transformSize-ebda875c.d.ts +3 -0
  38. package/modern/typings-7d83ec1e.d.ts +2 -54
  39. package/modern/use-skeleton-1328ead9.d.ts +5 -0
  40. package/modern/{utils-3942b092.d.ts → utils-1132e887.d.ts} +1 -1
  41. package/moderncssm/components/base-international-phone-input/index.module.css +3 -2
  42. package/moderncssm/components/flag-icon/index.module.css +1 -1
  43. package/moderncssm/transformSize-ebda875c.d.ts +3 -0
  44. package/moderncssm/typings-7d83ec1e.d.ts +2 -54
  45. package/moderncssm/use-skeleton-1328ead9.d.ts +5 -0
  46. package/moderncssm/{utils-3942b092.d.ts → utils-1132e887.d.ts} +1 -1
  47. package/package.json +7 -7
  48. package/src/components/base-international-phone-input/index.module.css +3 -1
  49. package/src/components/flag-icon/index.module.css +1 -1
  50. package/transformSize-ebda875c.d.ts +3 -0
  51. package/typings-7d83ec1e.d.ts +2 -54
  52. package/use-skeleton-1328ead9.d.ts +5 -0
  53. package/utils-1132e887.d.ts +81 -0
  54. package/utils-3942b092.d.ts +0 -81
@@ -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, AnchorHTMLAttributes, AriaAttributes, ComponentType, FocusEvent, MouseEvent, SVGProps } from "react";
4
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject, ButtonHTMLAttributes, ElementType, FC, CSSProperties, MutableRefObject, ForwardRefExoticComponent, RefAttributes, 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,7 +13,6 @@ 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";
17
16
  import { ContentProps } from "./typings-d6bfd5b7";
18
17
  import { ModalResponsiveProps as ModalProps } from "./typings-d6bfd5b7";
19
18
  import { InputProps } from "@alfalab/core-components-input";
@@ -776,57 +775,6 @@ declare const typographyPresets: {
776
775
  };
777
776
  };
778
777
  };
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>>;
830
778
  declare enum SwipeDirection {
831
779
  Left = "Left",
832
780
  Right = "Right",
@@ -1610,7 +1558,7 @@ type ClearButtonProps = {
1610
1558
  */
1611
1559
  dataTestId?: string;
1612
1560
  };
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 };
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 };
1614
1562
  export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, TextProps };
1615
1563
  export { ModalResponsiveProps as ModalProps } from "./typings-d6bfd5b7";
1616
1564
  export type { ContentProps as ModalContentProps } from "./typings-d6bfd5b7";
@@ -31,6 +31,11 @@ type SkeletonProps = {
31
31
  * Дочерние элементы.
32
32
  */
33
33
  children?: ReactNode;
34
+ /**
35
+ * Набор цветов для компонента
36
+ * @default default
37
+ */
38
+ colors?: "default" | "inverted";
34
39
  };
35
40
  declare const Skeleton: React.FC<SkeletonProps>;
36
41
  type SkeletonProps$0 = {
@@ -45,7 +45,7 @@ type useVisibleOptionsArgs = {
45
45
  */
46
46
  actualOptionsCount?: boolean;
47
47
  };
48
- declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): void;
48
+ declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): boolean;
49
49
  declare function defaultFilterFn(optionText: string, search: string): boolean;
50
50
  declare function defaultGroupAccessor(option: GroupShape): string | undefined;
51
51
  declare function defaultAccessor(option: OptionShape): string;
@@ -1,4 +1,5 @@
1
+ /* */
1
2
 
2
- .component .addons {
3
- padding-left: 0;
3
+ .component .addons {
4
+ padding-left: var(--gap-0);
4
5
  }
@@ -9,7 +9,7 @@
9
9
  width: 24px;
10
10
  height: 16px;
11
11
  max-height: 16px;
12
- border-radius: var(--border-radius-xs);
12
+ border-radius: var(--border-radius-2);
13
13
  margin-top: var(--gap-2);
14
14
  background-color: var(--color-light-neutral-translucent-100);
15
15
  }
@@ -0,0 +1,3 @@
1
+ import { IconButtonProps } from "./index-ebda875c";
2
+ declare const transformSize: (size?: IconButtonProps['size']) => 48 | 56 | 24 | 32 | 40;
3
+ export { transformSize };
@@ -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, AnchorHTMLAttributes, AriaAttributes, ComponentType, FocusEvent, MouseEvent, SVGProps } from "react";
4
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject, ButtonHTMLAttributes, ElementType, FC, CSSProperties, MutableRefObject, ForwardRefExoticComponent, RefAttributes, 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,7 +13,6 @@ 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";
17
16
  import { ContentProps } from "./typings-d6bfd5b7";
18
17
  import { ModalResponsiveProps as ModalProps } from "./typings-d6bfd5b7";
19
18
  import { InputProps } from "@alfalab/core-components-input";
@@ -776,57 +775,6 @@ declare const typographyPresets: {
776
775
  };
777
776
  };
778
777
  };
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>>;
830
778
  declare enum SwipeDirection {
831
779
  Left = "Left",
832
780
  Right = "Right",
@@ -1610,7 +1558,7 @@ type ClearButtonProps = {
1610
1558
  */
1611
1559
  dataTestId?: string;
1612
1560
  };
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 };
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 };
1614
1562
  export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, TextProps };
1615
1563
  export { ModalResponsiveProps as ModalProps } from "./typings-d6bfd5b7";
1616
1564
  export type { ContentProps as ModalContentProps } from "./typings-d6bfd5b7";
@@ -31,6 +31,11 @@ type SkeletonProps = {
31
31
  * Дочерние элементы.
32
32
  */
33
33
  children?: ReactNode;
34
+ /**
35
+ * Набор цветов для компонента
36
+ * @default default
37
+ */
38
+ colors?: "default" | "inverted";
34
39
  };
35
40
  declare const Skeleton: React.FC<SkeletonProps>;
36
41
  type SkeletonProps$0 = {
@@ -45,7 +45,7 @@ type useVisibleOptionsArgs = {
45
45
  */
46
46
  actualOptionsCount?: boolean;
47
47
  };
48
- declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): void;
48
+ declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): boolean;
49
49
  declare function defaultFilterFn(optionText: string, search: string): boolean;
50
50
  declare function defaultGroupAccessor(option: GroupShape): string | undefined;
51
51
  declare function defaultAccessor(option: OptionShape): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-international-phone-input",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -14,10 +14,10 @@
14
14
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@alfalab/core-components-input-autocomplete": "12.2.0",
18
- "@alfalab/core-components-input": "^15.1.0",
19
- "@alfalab/core-components-select": "^17.11.0",
20
- "@alfalab/core-components-shared": "^0.12.0",
17
+ "@alfalab/core-components-input-autocomplete": "12.3.1",
18
+ "@alfalab/core-components-input": "^15.1.2",
19
+ "@alfalab/core-components-select": "^17.12.1",
20
+ "@alfalab/core-components-shared": "^0.12.1",
21
21
  "@alfalab/core-components-mq": "^4.3.0",
22
22
  "@alfalab/hooks": "^1.13.0",
23
23
  "@alfalab/icons-glyph": "^2.139.0",
@@ -27,6 +27,6 @@
27
27
  "react-merge-refs": "^1.1.0",
28
28
  "tslib": "^2.4.0"
29
29
  },
30
- "themesVersion": "13.1.0",
31
- "varsVersion": "9.12.0"
30
+ "themesVersion": "13.2.0",
31
+ "varsVersion": "9.13.1"
32
32
  }
@@ -1,5 +1,7 @@
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
+
1
3
  .component {
2
4
  & .addons {
3
- padding-left: 0;
5
+ padding-left: var(--gap-0);
4
6
  }
5
7
  }
@@ -9,7 +9,7 @@
9
9
  width: 24px;
10
10
  height: 16px;
11
11
  max-height: 16px;
12
- border-radius: var(--border-radius-xs);
12
+ border-radius: var(--border-radius-2);
13
13
  margin-top: var(--gap-2);
14
14
  background-color: var(--color-light-neutral-translucent-100);
15
15
  }
@@ -0,0 +1,3 @@
1
+ import { IconButtonProps } from "./index-ebda875c";
2
+ declare const transformSize: (size?: IconButtonProps['size']) => 48 | 56 | 24 | 32 | 40;
3
+ export { transformSize };
@@ -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, AnchorHTMLAttributes, AriaAttributes, ComponentType, FocusEvent, MouseEvent, SVGProps } from "react";
4
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject, ButtonHTMLAttributes, ElementType, FC, CSSProperties, MutableRefObject, ForwardRefExoticComponent, RefAttributes, 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,7 +13,6 @@ 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";
17
16
  import { ContentProps } from "./typings-d6bfd5b7";
18
17
  import { ModalResponsiveProps as ModalProps } from "./typings-d6bfd5b7";
19
18
  import { InputProps } from "@alfalab/core-components-input";
@@ -776,57 +775,6 @@ declare const typographyPresets: {
776
775
  };
777
776
  };
778
777
  };
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>>;
830
778
  declare enum SwipeDirection {
831
779
  Left = "Left",
832
780
  Right = "Right",
@@ -1610,7 +1558,7 @@ type ClearButtonProps = {
1610
1558
  */
1611
1559
  dataTestId?: string;
1612
1560
  };
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 };
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 };
1614
1562
  export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, TextProps };
1615
1563
  export { ModalResponsiveProps as ModalProps } from "./typings-d6bfd5b7";
1616
1564
  export type { ContentProps as ModalContentProps } from "./typings-d6bfd5b7";
@@ -31,6 +31,11 @@ type SkeletonProps = {
31
31
  * Дочерние элементы.
32
32
  */
33
33
  children?: ReactNode;
34
+ /**
35
+ * Набор цветов для компонента
36
+ * @default default
37
+ */
38
+ colors?: "default" | "inverted";
34
39
  };
35
40
  declare const Skeleton: React.FC<SkeletonProps>;
36
41
  type SkeletonProps$0 = {
@@ -0,0 +1,81 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ import { BaseSelectProps, GroupShape, OptionShape, OptionsListProps } from "./typings-7d83ec1e";
3
+ declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
+ declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
+ declare const joinOptions: ({ selected, selectedMultiple, }: {
6
+ selected?: OptionShape | undefined;
7
+ selectedMultiple?: OptionShape[] | undefined;
8
+ }) => ReactNode[] | null;
9
+ declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape | GroupShape) => boolean, filterGroup?: boolean): {
10
+ filteredOptions: (OptionShape | GroupShape)[];
11
+ flatOptions: OptionShape[];
12
+ selectedOptions: OptionShape[];
13
+ };
14
+ type useVisibleOptionsArgs = {
15
+ /**
16
+ * Количество видимых пунктов
17
+ */
18
+ visibleOptions: number;
19
+ /**
20
+ * Реф на контейнер с пунтами меню
21
+ */
22
+ listRef: RefObject<HTMLElement>;
23
+ /**
24
+ * Реф на контейнер, которому нужно установить высоту
25
+ */
26
+ styleTargetRef?: RefObject<HTMLElement>;
27
+ /**
28
+ * Флаг открытия меню
29
+ */
30
+ open?: boolean;
31
+ /**
32
+ * Позволяет вызвать пересчет высоты
33
+ */
34
+ invalidate?: unknown;
35
+ /**
36
+ * Список вариантов выбора
37
+ */
38
+ options?: Array<OptionShape | GroupShape>;
39
+ /**
40
+ * Максимальный размер варианта выбора
41
+ */
42
+ size?: Extract<OptionsListProps['size'], number>;
43
+ /**
44
+ * Учитывать действительное число вариантов выбора
45
+ */
46
+ actualOptionsCount?: boolean;
47
+ };
48
+ declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): boolean;
49
+ declare function defaultFilterFn(optionText: string, search: string): boolean;
50
+ declare function defaultGroupAccessor(option: GroupShape): string | undefined;
51
+ declare function defaultAccessor(option: OptionShape): string;
52
+ declare function usePrevious<T>(value: T): T | undefined;
53
+ declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
54
+ declare function getSelectTestIds(dataTestId: string): {
55
+ select: string;
56
+ option: string;
57
+ optionsList: string;
58
+ clearButton: string;
59
+ applyButton: string;
60
+ field: string;
61
+ fieldFormControl: string;
62
+ fieldLeftAddons: string;
63
+ fieldRightAddons: string;
64
+ fieldError: string;
65
+ fieldHint: string;
66
+ fieldClearIcon: string;
67
+ searchInput: string;
68
+ searchFormControl: string;
69
+ searchInner: string;
70
+ searchLeftAddons: string;
71
+ searchRightAddons: string;
72
+ searchError: string;
73
+ searchHint: string;
74
+ bottomSheet: string;
75
+ bottomSheetHeader: string;
76
+ bottomSheetContent: string;
77
+ modal: string;
78
+ modalHeader: string;
79
+ modalContent: string;
80
+ };
81
+ export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultGroupAccessor, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
@@ -1,81 +0,0 @@
1
- import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape, OptionsListProps } from "./typings-7d83ec1e";
3
- declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
- declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
- declare const joinOptions: ({ selected, selectedMultiple, }: {
6
- selected?: OptionShape | undefined;
7
- selectedMultiple?: OptionShape[] | undefined;
8
- }) => ReactNode[] | null;
9
- declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape | GroupShape) => boolean, filterGroup?: boolean): {
10
- filteredOptions: (OptionShape | GroupShape)[];
11
- flatOptions: OptionShape[];
12
- selectedOptions: OptionShape[];
13
- };
14
- type useVisibleOptionsArgs = {
15
- /**
16
- * Количество видимых пунктов
17
- */
18
- visibleOptions: number;
19
- /**
20
- * Реф на контейнер с пунтами меню
21
- */
22
- listRef: RefObject<HTMLElement>;
23
- /**
24
- * Реф на контейнер, которому нужно установить высоту
25
- */
26
- styleTargetRef?: RefObject<HTMLElement>;
27
- /**
28
- * Флаг открытия меню
29
- */
30
- open?: boolean;
31
- /**
32
- * Позволяет вызвать пересчет высоты
33
- */
34
- invalidate?: unknown;
35
- /**
36
- * Список вариантов выбора
37
- */
38
- options?: Array<OptionShape | GroupShape>;
39
- /**
40
- * Максимальный размер варианта выбора
41
- */
42
- size?: Extract<OptionsListProps['size'], number>;
43
- /**
44
- * Учитывать действительное число вариантов выбора
45
- */
46
- actualOptionsCount?: boolean;
47
- };
48
- declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): void;
49
- declare function defaultFilterFn(optionText: string, search: string): boolean;
50
- declare function defaultGroupAccessor(option: GroupShape): string | undefined;
51
- declare function defaultAccessor(option: OptionShape): string;
52
- declare function usePrevious<T>(value: T): T | undefined;
53
- declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
54
- declare function getSelectTestIds(dataTestId: string): {
55
- select: string;
56
- option: string;
57
- optionsList: string;
58
- clearButton: string;
59
- applyButton: string;
60
- field: string;
61
- fieldFormControl: string;
62
- fieldLeftAddons: string;
63
- fieldRightAddons: string;
64
- fieldError: string;
65
- fieldHint: string;
66
- fieldClearIcon: string;
67
- searchInput: string;
68
- searchFormControl: string;
69
- searchInner: string;
70
- searchLeftAddons: string;
71
- searchRightAddons: string;
72
- searchError: string;
73
- searchHint: string;
74
- bottomSheet: string;
75
- bottomSheetHeader: string;
76
- bottomSheetContent: string;
77
- modal: string;
78
- modalHeader: string;
79
- modalContent: string;
80
- };
81
- export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultGroupAccessor, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };