@alfalab/core-components-number-input 1.2.4 → 1.2.6

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 (45) hide show
  1. package/{Component-72308007.d.ts → Component-10db897e.d.ts} +2 -2
  2. package/Component-72dda473.d.ts +53 -0
  3. package/Component.desktop-785df74d.d.ts +6 -0
  4. package/Component.mobile-d7e9f69d.d.ts +6 -0
  5. package/Component.mobile-ebda875c.d.ts +5 -4
  6. package/Component.responsive-785df74d.d.ts +26 -0
  7. package/components/number-input/Component.d.ts +1 -1
  8. package/cssm/{Component-72308007.d.ts → Component-10db897e.d.ts} +2 -2
  9. package/cssm/Component-72dda473.d.ts +53 -0
  10. package/cssm/Component.desktop-785df74d.d.ts +6 -0
  11. package/cssm/Component.mobile-d7e9f69d.d.ts +6 -0
  12. package/cssm/Component.mobile-ebda875c.d.ts +5 -4
  13. package/cssm/Component.responsive-785df74d.d.ts +26 -0
  14. package/cssm/components/number-input/Component.d.ts +1 -1
  15. package/{esm/index-72308007.d.ts → cssm/index-10db897e.d.ts} +2 -6
  16. package/cssm/index-3109f463.d.ts +62 -0
  17. package/cssm/index-ebda875c.d.ts +10 -0
  18. package/{esm/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
  19. package/{modern/Component-72308007.d.ts → esm/Component-10db897e.d.ts} +2 -2
  20. package/esm/Component-72dda473.d.ts +53 -0
  21. package/esm/Component.desktop-785df74d.d.ts +6 -0
  22. package/esm/Component.mobile-d7e9f69d.d.ts +6 -0
  23. package/esm/Component.mobile-ebda875c.d.ts +5 -4
  24. package/esm/Component.responsive-785df74d.d.ts +26 -0
  25. package/esm/components/number-input/Component.d.ts +1 -1
  26. package/{index-72308007.d.ts → esm/index-10db897e.d.ts} +2 -6
  27. package/esm/index-3109f463.d.ts +62 -0
  28. package/esm/index-ebda875c.d.ts +10 -0
  29. package/{modern/typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
  30. package/{cssm/index-72308007.d.ts → index-10db897e.d.ts} +2 -6
  31. package/index-3109f463.d.ts +62 -0
  32. package/index-ebda875c.d.ts +10 -0
  33. package/{esm/Component-72308007.d.ts → modern/Component-10db897e.d.ts} +2 -2
  34. package/modern/Component-72dda473.d.ts +53 -0
  35. package/modern/Component.desktop-785df74d.d.ts +6 -0
  36. package/modern/Component.mobile-d7e9f69d.d.ts +6 -0
  37. package/modern/Component.mobile-ebda875c.d.ts +5 -4
  38. package/modern/Component.responsive-785df74d.d.ts +26 -0
  39. package/modern/components/number-input/Component.d.ts +1 -1
  40. package/modern/{index-72308007.d.ts → index-10db897e.d.ts} +2 -6
  41. package/modern/index-3109f463.d.ts +62 -0
  42. package/modern/index-ebda875c.d.ts +10 -0
  43. package/{typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
  44. package/package.json +2 -2
  45. package/{cssm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC } from "react";
4
- import { BaseButtonProps } from "./typings-9211a437";
4
+ import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
5
5
  type SpinnerProps = {
6
6
  /**
7
7
  * Управление видимостью компонента
@@ -34,5 +34,5 @@ declare const Spinner: FC<SpinnerProps>;
34
34
  * чтобы при быстрых ответах от сервера кнопка не «моргала».
35
35
  */
36
36
  declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
37
- declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
37
+ declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
38
38
  export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
@@ -0,0 +1,53 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BackgroundColorType, GraphicColorType } from "./index-72dda473";
4
+ type IconColorType = Extract<GraphicColorType, 'positive' | 'attention' | 'link' | 'negative' | 'tertiary' | 'secondary' | 'primary'>;
5
+ type BadgeProps = {
6
+ /**
7
+ * Дополнительный класс
8
+ */
9
+ className?: string;
10
+ /**
11
+ * Вид компонента
12
+ */
13
+ view: 'icon' | 'count';
14
+ /**
15
+ * Размер компонента (только для view=icon)
16
+ * //deprecated(используйте height для view=count )
17
+ */
18
+ size?: 's' | 'm' | 'l' | 'xl';
19
+ /**
20
+ * Видимость белой обводки вокруг иконки
21
+ */
22
+ visibleIconOutline?: boolean;
23
+ /**
24
+ * Видимость цветной обводки вокруг иконки (только для view=icon)
25
+ */
26
+ visibleColorOutline?: boolean;
27
+ /**
28
+ * Контент компонента
29
+ */
30
+ content?: React.ReactElement | number;
31
+ /**
32
+ * Высота компонента, min = 16; max = 48 (только для view=count)
33
+ */
34
+ height?: number;
35
+ /**
36
+ * Цветовое оформление бейджа при view='count'
37
+ */
38
+ color?: Extract<BackgroundColorType, 'accent' | 'primary' | 'specialbg-secondary-transparent'>;
39
+ /**
40
+ * Цветовое оформление бейджа при view='icon'
41
+ */
42
+ iconColor?: IconColorType;
43
+ /**
44
+ * Цвет подложки под иконкой
45
+ */
46
+ iconUnderlayColor?: Extract<GraphicColorType, 'primary' | 'static-light'>;
47
+ /**
48
+ * Идентификатор для систем автоматизированного тестирования
49
+ */
50
+ dataTestId?: string;
51
+ };
52
+ declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, color, iconUnderlayColor, dataTestId, }: BadgeProps) => React.JSX.Element;
53
+ export { IconColorType, BadgeProps, Badge };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlDesktopProps, FormControlDesktop };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlMobileProps, FormControlMobile };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
4
- type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
- declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
- export { FormControlMobileProps, FormControlMobile };
3
+ import { BaseInputProps } from "./index-ebda875c";
4
+ type InputMobileProps = Omit<BaseInputProps, 'FormControlComponent' | 'colorStyles'>;
5
+ declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
+ export * from "./Component.mobile-d7e9f69d";
7
+ export { InputMobileProps, InputMobile };
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'> & {
5
+ /**
6
+ * Контрольная точка, с нее начинается desktop версия
7
+ * @default 1024
8
+ */
9
+ breakpoint?: number;
10
+ /**
11
+ * Значение по-умолчанию для хука useMatchMedia
12
+ */
13
+ defaultMatchMediaValue?: boolean | (() => boolean);
14
+ };
15
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
16
+ /**
17
+ * Контрольная точка, с нее начинается desktop версия
18
+ * @default 1024
19
+ */
20
+ breakpoint?: number | undefined;
21
+ /**
22
+ * Значение по-умолчанию для хука useMatchMedia
23
+ */
24
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
25
+ } & React.RefAttributes<HTMLDivElement>>;
26
+ export { FormControlProps, FormControl };
@@ -39,7 +39,7 @@ type NumberInputProps = Omit<InputProps, 'value' | 'onChange' | 'type'> & {
39
39
  valueString: string;
40
40
  }) => void;
41
41
  };
42
- declare const NumberInput: React.ForwardRefExoticComponent<Omit<InputProps, "onChange" | "value" | "type"> & {
42
+ declare const NumberInput: React.ForwardRefExoticComponent<Omit<InputProps, "value" | "onChange" | "type"> & {
43
43
  /**
44
44
  * Значение поля ввода
45
45
  */
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC } from "react";
4
- import { BaseButtonProps } from "./typings-9211a437";
4
+ import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
5
5
  type SpinnerProps = {
6
6
  /**
7
7
  * Управление видимостью компонента
@@ -34,5 +34,5 @@ declare const Spinner: FC<SpinnerProps>;
34
34
  * чтобы при быстрых ответах от сервера кнопка не «моргала».
35
35
  */
36
36
  declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
37
- declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
37
+ declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
38
38
  export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
@@ -0,0 +1,53 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BackgroundColorType, GraphicColorType } from "./index-72dda473";
4
+ type IconColorType = Extract<GraphicColorType, 'positive' | 'attention' | 'link' | 'negative' | 'tertiary' | 'secondary' | 'primary'>;
5
+ type BadgeProps = {
6
+ /**
7
+ * Дополнительный класс
8
+ */
9
+ className?: string;
10
+ /**
11
+ * Вид компонента
12
+ */
13
+ view: 'icon' | 'count';
14
+ /**
15
+ * Размер компонента (только для view=icon)
16
+ * //deprecated(используйте height для view=count )
17
+ */
18
+ size?: 's' | 'm' | 'l' | 'xl';
19
+ /**
20
+ * Видимость белой обводки вокруг иконки
21
+ */
22
+ visibleIconOutline?: boolean;
23
+ /**
24
+ * Видимость цветной обводки вокруг иконки (только для view=icon)
25
+ */
26
+ visibleColorOutline?: boolean;
27
+ /**
28
+ * Контент компонента
29
+ */
30
+ content?: React.ReactElement | number;
31
+ /**
32
+ * Высота компонента, min = 16; max = 48 (только для view=count)
33
+ */
34
+ height?: number;
35
+ /**
36
+ * Цветовое оформление бейджа при view='count'
37
+ */
38
+ color?: Extract<BackgroundColorType, 'accent' | 'primary' | 'specialbg-secondary-transparent'>;
39
+ /**
40
+ * Цветовое оформление бейджа при view='icon'
41
+ */
42
+ iconColor?: IconColorType;
43
+ /**
44
+ * Цвет подложки под иконкой
45
+ */
46
+ iconUnderlayColor?: Extract<GraphicColorType, 'primary' | 'static-light'>;
47
+ /**
48
+ * Идентификатор для систем автоматизированного тестирования
49
+ */
50
+ dataTestId?: string;
51
+ };
52
+ declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, color, iconUnderlayColor, dataTestId, }: BadgeProps) => React.JSX.Element;
53
+ export { IconColorType, BadgeProps, Badge };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlDesktopProps, FormControlDesktop };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlMobileProps, FormControlMobile };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
4
- type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
- declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
- export { FormControlMobileProps, FormControlMobile };
3
+ import { BaseInputProps } from "./index-ebda875c";
4
+ type InputMobileProps = Omit<BaseInputProps, 'FormControlComponent' | 'colorStyles'>;
5
+ declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
+ export * from "./Component.mobile-d7e9f69d";
7
+ export { InputMobileProps, InputMobile };
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'> & {
5
+ /**
6
+ * Контрольная точка, с нее начинается desktop версия
7
+ * @default 1024
8
+ */
9
+ breakpoint?: number;
10
+ /**
11
+ * Значение по-умолчанию для хука useMatchMedia
12
+ */
13
+ defaultMatchMediaValue?: boolean | (() => boolean);
14
+ };
15
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
16
+ /**
17
+ * Контрольная точка, с нее начинается desktop версия
18
+ * @default 1024
19
+ */
20
+ breakpoint?: number | undefined;
21
+ /**
22
+ * Значение по-умолчанию для хука useMatchMedia
23
+ */
24
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
25
+ } & React.RefAttributes<HTMLDivElement>>;
26
+ export { FormControlProps, FormControl };
@@ -39,7 +39,7 @@ type NumberInputProps = Omit<InputProps, 'value' | 'onChange' | 'type'> & {
39
39
  valueString: string;
40
40
  }) => void;
41
41
  };
42
- declare const NumberInput: React.ForwardRefExoticComponent<Omit<InputProps, "onChange" | "value" | "type"> & {
42
+ declare const NumberInput: React.ForwardRefExoticComponent<Omit<InputProps, "value" | "onChange" | "type"> & {
43
43
  /**
44
44
  * Значение поля ввода
45
45
  */
@@ -3,17 +3,13 @@ import React from "react";
3
3
  import { PaddingType } from "./index-72dda473";
4
4
  /* eslint-disable no-plusplus, no-param-reassign */
5
5
  import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
6
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
7
6
  declare const isClient: () => boolean;
8
7
  declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
8
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
9
9
  declare function easeInOutQuad(x: number): number;
10
10
  declare const easingFns: {
11
11
  easeInOutQuad: typeof easeInOutQuad;
12
12
  };
13
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
14
- declare const inputUtils: {
15
- disableUserInput: typeof disableUserInput;
16
- };
17
13
  /**
18
14
  * Возвращает true, если значение равно null или undefined
19
15
  */
@@ -51,4 +47,4 @@ declare const maskUtils: {
51
47
  prefixPostprocessor: typeof prefixPostprocessor;
52
48
  caretGuard: typeof caretGuard;
53
49
  };
54
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
50
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils };
@@ -0,0 +1,62 @@
1
+ import { FC, ReactNode } from "react";
2
+ type MqProps = {
3
+ /**
4
+ * Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
5
+ */
6
+ query?: string;
7
+ /**
8
+ * Запрос на поддержку тач-событий
9
+ */
10
+ touch?: boolean;
11
+ /**
12
+ * Дочерние элементы.
13
+ */
14
+ children?: ReactNode;
15
+ /**
16
+ * Обработчик изменений в совпадении запросов
17
+ */
18
+ onMatchChange?: (isMatched: boolean) => void;
19
+ };
20
+ declare const Mq: FC<MqProps>;
21
+ /**
22
+ * Хук для медиа запросов.
23
+ * @param query media выражение или кастомный запрос из `mq.json`, например `--mobile`.
24
+ * @param defaultValue Значение по-умолчанию.
25
+ */
26
+ declare const useMatchMedia: (query: string, defaultValue?: boolean | (() => boolean)) => boolean[];
27
+ /**
28
+ * Возвращает MediaQueryList для заданного media-выражения.
29
+ *
30
+ * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
31
+ */
32
+ declare function getMatchMedia(queryProp: string): MediaQueryList;
33
+ /**
34
+ * Удаляет MediaQueryList.
35
+ *
36
+ * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
37
+ */
38
+ declare function releaseMatchMedia(queryProp: string): void;
39
+ /**
40
+ * Возвращает `true`, если есть поддержка `Pointer Events`
41
+ */
42
+ declare function isPointerEventsSupported(): boolean;
43
+ /**
44
+ * Возвращает `true`, если есть поддержка `Touch Events`
45
+ */
46
+ declare function isTouchSupported(): boolean;
47
+ declare const _exports: {
48
+ "--mobile-xs": string;
49
+ "--mobile-s": string;
50
+ "--mobile-m": string;
51
+ "--mobile-l": string;
52
+ "--mobile": string;
53
+ "--tablet-s": string;
54
+ "--tablet-m": string;
55
+ "--tablet": string;
56
+ "--desktop-s": string;
57
+ "--desktop-m": string;
58
+ "--desktop-l": string;
59
+ "--desktop-xl": string;
60
+ "--desktop": string;
61
+ };
62
+ export { _exports as default, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported };
@@ -86,6 +86,14 @@ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
86
86
  * Дополнительный класс для аддонов
87
87
  */
88
88
  addonsClassName?: string;
89
+ /**
90
+ * Свойства для обертки левых аддонов
91
+ */
92
+ leftAddonsProps?: HTMLAttributes<HTMLDivElement>;
93
+ /**
94
+ * Свойства для обертки правых аддонов
95
+ */
96
+ rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
89
97
  /**
90
98
  * Идентификатор для систем автоматизированного тестирования
91
99
  */
@@ -125,6 +133,8 @@ declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttribu
125
133
  inputWrapperClassName?: string | undefined;
126
134
  labelClassName?: string | undefined;
127
135
  addonsClassName?: string | undefined;
136
+ leftAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
137
+ rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
128
138
  dataTestId?: string | undefined;
129
139
  children?: ReactNode;
130
140
  styles: {
@@ -69,6 +69,8 @@ type ComponentProps = {
69
69
  * Дочерние элементы.
70
70
  */
71
71
  children?: ReactNode;
72
+ };
73
+ type PrivateButtonProps = {
72
74
  /**
73
75
  * Основные стили компонента.
74
76
  */
@@ -80,16 +82,12 @@ type ComponentProps = {
80
82
  */
81
83
  colorStylesMap: StyleColors;
82
84
  };
83
- type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
84
- type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
85
- type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
86
- type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
87
- type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
88
- type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
85
+ type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
86
+ type ButtonProps = CommonButtonProps & {
89
87
  /**
90
88
  * Контрольная точка, с нее начинается desktop версия
91
89
  * @default 1024
92
90
  */
93
91
  breakpoint?: number;
94
92
  };
95
- export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
93
+ export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC } from "react";
4
- import { BaseButtonProps } from "./typings-9211a437";
4
+ import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
5
5
  type SpinnerProps = {
6
6
  /**
7
7
  * Управление видимостью компонента
@@ -34,5 +34,5 @@ declare const Spinner: FC<SpinnerProps>;
34
34
  * чтобы при быстрых ответах от сервера кнопка не «моргала».
35
35
  */
36
36
  declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
37
- declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
37
+ declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
38
38
  export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
@@ -0,0 +1,53 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BackgroundColorType, GraphicColorType } from "./index-72dda473";
4
+ type IconColorType = Extract<GraphicColorType, 'positive' | 'attention' | 'link' | 'negative' | 'tertiary' | 'secondary' | 'primary'>;
5
+ type BadgeProps = {
6
+ /**
7
+ * Дополнительный класс
8
+ */
9
+ className?: string;
10
+ /**
11
+ * Вид компонента
12
+ */
13
+ view: 'icon' | 'count';
14
+ /**
15
+ * Размер компонента (только для view=icon)
16
+ * //deprecated(используйте height для view=count )
17
+ */
18
+ size?: 's' | 'm' | 'l' | 'xl';
19
+ /**
20
+ * Видимость белой обводки вокруг иконки
21
+ */
22
+ visibleIconOutline?: boolean;
23
+ /**
24
+ * Видимость цветной обводки вокруг иконки (только для view=icon)
25
+ */
26
+ visibleColorOutline?: boolean;
27
+ /**
28
+ * Контент компонента
29
+ */
30
+ content?: React.ReactElement | number;
31
+ /**
32
+ * Высота компонента, min = 16; max = 48 (только для view=count)
33
+ */
34
+ height?: number;
35
+ /**
36
+ * Цветовое оформление бейджа при view='count'
37
+ */
38
+ color?: Extract<BackgroundColorType, 'accent' | 'primary' | 'specialbg-secondary-transparent'>;
39
+ /**
40
+ * Цветовое оформление бейджа при view='icon'
41
+ */
42
+ iconColor?: IconColorType;
43
+ /**
44
+ * Цвет подложки под иконкой
45
+ */
46
+ iconUnderlayColor?: Extract<GraphicColorType, 'primary' | 'static-light'>;
47
+ /**
48
+ * Идентификатор для систем автоматизированного тестирования
49
+ */
50
+ dataTestId?: string;
51
+ };
52
+ declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, color, iconUnderlayColor, dataTestId, }: BadgeProps) => React.JSX.Element;
53
+ export { IconColorType, BadgeProps, Badge };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlDesktopProps, FormControlDesktop };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlMobileProps, FormControlMobile };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
4
- type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
- declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
- export { FormControlMobileProps, FormControlMobile };
3
+ import { BaseInputProps } from "./index-ebda875c";
4
+ type InputMobileProps = Omit<BaseInputProps, 'FormControlComponent' | 'colorStyles'>;
5
+ declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
+ export * from "./Component.mobile-d7e9f69d";
7
+ export { InputMobileProps, InputMobile };
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'> & {
5
+ /**
6
+ * Контрольная точка, с нее начинается desktop версия
7
+ * @default 1024
8
+ */
9
+ breakpoint?: number;
10
+ /**
11
+ * Значение по-умолчанию для хука useMatchMedia
12
+ */
13
+ defaultMatchMediaValue?: boolean | (() => boolean);
14
+ };
15
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
16
+ /**
17
+ * Контрольная точка, с нее начинается desktop версия
18
+ * @default 1024
19
+ */
20
+ breakpoint?: number | undefined;
21
+ /**
22
+ * Значение по-умолчанию для хука useMatchMedia
23
+ */
24
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
25
+ } & React.RefAttributes<HTMLDivElement>>;
26
+ export { FormControlProps, FormControl };
@@ -39,7 +39,7 @@ type NumberInputProps = Omit<InputProps, 'value' | 'onChange' | 'type'> & {
39
39
  valueString: string;
40
40
  }) => void;
41
41
  };
42
- declare const NumberInput: React.ForwardRefExoticComponent<Omit<InputProps, "onChange" | "value" | "type"> & {
42
+ declare const NumberInput: React.ForwardRefExoticComponent<Omit<InputProps, "value" | "onChange" | "type"> & {
43
43
  /**
44
44
  * Значение поля ввода
45
45
  */
@@ -3,17 +3,13 @@ import React from "react";
3
3
  import { PaddingType } from "./index-72dda473";
4
4
  /* eslint-disable no-plusplus, no-param-reassign */
5
5
  import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
6
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
7
6
  declare const isClient: () => boolean;
8
7
  declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
8
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
9
9
  declare function easeInOutQuad(x: number): number;
10
10
  declare const easingFns: {
11
11
  easeInOutQuad: typeof easeInOutQuad;
12
12
  };
13
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
14
- declare const inputUtils: {
15
- disableUserInput: typeof disableUserInput;
16
- };
17
13
  /**
18
14
  * Возвращает true, если значение равно null или undefined
19
15
  */
@@ -51,4 +47,4 @@ declare const maskUtils: {
51
47
  prefixPostprocessor: typeof prefixPostprocessor;
52
48
  caretGuard: typeof caretGuard;
53
49
  };
54
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
50
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils };
@@ -0,0 +1,62 @@
1
+ import { FC, ReactNode } from "react";
2
+ type MqProps = {
3
+ /**
4
+ * Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
5
+ */
6
+ query?: string;
7
+ /**
8
+ * Запрос на поддержку тач-событий
9
+ */
10
+ touch?: boolean;
11
+ /**
12
+ * Дочерние элементы.
13
+ */
14
+ children?: ReactNode;
15
+ /**
16
+ * Обработчик изменений в совпадении запросов
17
+ */
18
+ onMatchChange?: (isMatched: boolean) => void;
19
+ };
20
+ declare const Mq: FC<MqProps>;
21
+ /**
22
+ * Хук для медиа запросов.
23
+ * @param query media выражение или кастомный запрос из `mq.json`, например `--mobile`.
24
+ * @param defaultValue Значение по-умолчанию.
25
+ */
26
+ declare const useMatchMedia: (query: string, defaultValue?: boolean | (() => boolean)) => boolean[];
27
+ /**
28
+ * Возвращает MediaQueryList для заданного media-выражения.
29
+ *
30
+ * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
31
+ */
32
+ declare function getMatchMedia(queryProp: string): MediaQueryList;
33
+ /**
34
+ * Удаляет MediaQueryList.
35
+ *
36
+ * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
37
+ */
38
+ declare function releaseMatchMedia(queryProp: string): void;
39
+ /**
40
+ * Возвращает `true`, если есть поддержка `Pointer Events`
41
+ */
42
+ declare function isPointerEventsSupported(): boolean;
43
+ /**
44
+ * Возвращает `true`, если есть поддержка `Touch Events`
45
+ */
46
+ declare function isTouchSupported(): boolean;
47
+ declare const _exports: {
48
+ "--mobile-xs": string;
49
+ "--mobile-s": string;
50
+ "--mobile-m": string;
51
+ "--mobile-l": string;
52
+ "--mobile": string;
53
+ "--tablet-s": string;
54
+ "--tablet-m": string;
55
+ "--tablet": string;
56
+ "--desktop-s": string;
57
+ "--desktop-m": string;
58
+ "--desktop-l": string;
59
+ "--desktop-xl": string;
60
+ "--desktop": string;
61
+ };
62
+ export { _exports as default, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported };
@@ -86,6 +86,14 @@ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
86
86
  * Дополнительный класс для аддонов
87
87
  */
88
88
  addonsClassName?: string;
89
+ /**
90
+ * Свойства для обертки левых аддонов
91
+ */
92
+ leftAddonsProps?: HTMLAttributes<HTMLDivElement>;
93
+ /**
94
+ * Свойства для обертки правых аддонов
95
+ */
96
+ rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
89
97
  /**
90
98
  * Идентификатор для систем автоматизированного тестирования
91
99
  */
@@ -125,6 +133,8 @@ declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttribu
125
133
  inputWrapperClassName?: string | undefined;
126
134
  labelClassName?: string | undefined;
127
135
  addonsClassName?: string | undefined;
136
+ leftAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
137
+ rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
128
138
  dataTestId?: string | undefined;
129
139
  children?: ReactNode;
130
140
  styles: {
@@ -69,6 +69,8 @@ type ComponentProps = {
69
69
  * Дочерние элементы.
70
70
  */
71
71
  children?: ReactNode;
72
+ };
73
+ type PrivateButtonProps = {
72
74
  /**
73
75
  * Основные стили компонента.
74
76
  */
@@ -80,16 +82,12 @@ type ComponentProps = {
80
82
  */
81
83
  colorStylesMap: StyleColors;
82
84
  };
83
- type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
84
- type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
85
- type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
86
- type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
87
- type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
88
- type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
85
+ type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
86
+ type ButtonProps = CommonButtonProps & {
89
87
  /**
90
88
  * Контрольная точка, с нее начинается desktop версия
91
89
  * @default 1024
92
90
  */
93
91
  breakpoint?: number;
94
92
  };
95
- export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
93
+ export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
@@ -3,17 +3,13 @@ import React from "react";
3
3
  import { PaddingType } from "./index-72dda473";
4
4
  /* eslint-disable no-plusplus, no-param-reassign */
5
5
  import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
6
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
7
6
  declare const isClient: () => boolean;
8
7
  declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
8
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
9
9
  declare function easeInOutQuad(x: number): number;
10
10
  declare const easingFns: {
11
11
  easeInOutQuad: typeof easeInOutQuad;
12
12
  };
13
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
14
- declare const inputUtils: {
15
- disableUserInput: typeof disableUserInput;
16
- };
17
13
  /**
18
14
  * Возвращает true, если значение равно null или undefined
19
15
  */
@@ -51,4 +47,4 @@ declare const maskUtils: {
51
47
  prefixPostprocessor: typeof prefixPostprocessor;
52
48
  caretGuard: typeof caretGuard;
53
49
  };
54
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
50
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils };
@@ -0,0 +1,62 @@
1
+ import { FC, ReactNode } from "react";
2
+ type MqProps = {
3
+ /**
4
+ * Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
5
+ */
6
+ query?: string;
7
+ /**
8
+ * Запрос на поддержку тач-событий
9
+ */
10
+ touch?: boolean;
11
+ /**
12
+ * Дочерние элементы.
13
+ */
14
+ children?: ReactNode;
15
+ /**
16
+ * Обработчик изменений в совпадении запросов
17
+ */
18
+ onMatchChange?: (isMatched: boolean) => void;
19
+ };
20
+ declare const Mq: FC<MqProps>;
21
+ /**
22
+ * Хук для медиа запросов.
23
+ * @param query media выражение или кастомный запрос из `mq.json`, например `--mobile`.
24
+ * @param defaultValue Значение по-умолчанию.
25
+ */
26
+ declare const useMatchMedia: (query: string, defaultValue?: boolean | (() => boolean)) => boolean[];
27
+ /**
28
+ * Возвращает MediaQueryList для заданного media-выражения.
29
+ *
30
+ * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
31
+ */
32
+ declare function getMatchMedia(queryProp: string): MediaQueryList;
33
+ /**
34
+ * Удаляет MediaQueryList.
35
+ *
36
+ * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
37
+ */
38
+ declare function releaseMatchMedia(queryProp: string): void;
39
+ /**
40
+ * Возвращает `true`, если есть поддержка `Pointer Events`
41
+ */
42
+ declare function isPointerEventsSupported(): boolean;
43
+ /**
44
+ * Возвращает `true`, если есть поддержка `Touch Events`
45
+ */
46
+ declare function isTouchSupported(): boolean;
47
+ declare const _exports: {
48
+ "--mobile-xs": string;
49
+ "--mobile-s": string;
50
+ "--mobile-m": string;
51
+ "--mobile-l": string;
52
+ "--mobile": string;
53
+ "--tablet-s": string;
54
+ "--tablet-m": string;
55
+ "--tablet": string;
56
+ "--desktop-s": string;
57
+ "--desktop-m": string;
58
+ "--desktop-l": string;
59
+ "--desktop-xl": string;
60
+ "--desktop": string;
61
+ };
62
+ export { _exports as default, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported };
@@ -86,6 +86,14 @@ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
86
86
  * Дополнительный класс для аддонов
87
87
  */
88
88
  addonsClassName?: string;
89
+ /**
90
+ * Свойства для обертки левых аддонов
91
+ */
92
+ leftAddonsProps?: HTMLAttributes<HTMLDivElement>;
93
+ /**
94
+ * Свойства для обертки правых аддонов
95
+ */
96
+ rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
89
97
  /**
90
98
  * Идентификатор для систем автоматизированного тестирования
91
99
  */
@@ -125,6 +133,8 @@ declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttribu
125
133
  inputWrapperClassName?: string | undefined;
126
134
  labelClassName?: string | undefined;
127
135
  addonsClassName?: string | undefined;
136
+ leftAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
137
+ rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
128
138
  dataTestId?: string | undefined;
129
139
  children?: ReactNode;
130
140
  styles: {
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC } from "react";
4
- import { BaseButtonProps } from "./typings-9211a437";
4
+ import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
5
5
  type SpinnerProps = {
6
6
  /**
7
7
  * Управление видимостью компонента
@@ -34,5 +34,5 @@ declare const Spinner: FC<SpinnerProps>;
34
34
  * чтобы при быстрых ответах от сервера кнопка не «моргала».
35
35
  */
36
36
  declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
37
- declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
37
+ declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
38
38
  export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
@@ -0,0 +1,53 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BackgroundColorType, GraphicColorType } from "./index-72dda473";
4
+ type IconColorType = Extract<GraphicColorType, 'positive' | 'attention' | 'link' | 'negative' | 'tertiary' | 'secondary' | 'primary'>;
5
+ type BadgeProps = {
6
+ /**
7
+ * Дополнительный класс
8
+ */
9
+ className?: string;
10
+ /**
11
+ * Вид компонента
12
+ */
13
+ view: 'icon' | 'count';
14
+ /**
15
+ * Размер компонента (только для view=icon)
16
+ * //deprecated(используйте height для view=count )
17
+ */
18
+ size?: 's' | 'm' | 'l' | 'xl';
19
+ /**
20
+ * Видимость белой обводки вокруг иконки
21
+ */
22
+ visibleIconOutline?: boolean;
23
+ /**
24
+ * Видимость цветной обводки вокруг иконки (только для view=icon)
25
+ */
26
+ visibleColorOutline?: boolean;
27
+ /**
28
+ * Контент компонента
29
+ */
30
+ content?: React.ReactElement | number;
31
+ /**
32
+ * Высота компонента, min = 16; max = 48 (только для view=count)
33
+ */
34
+ height?: number;
35
+ /**
36
+ * Цветовое оформление бейджа при view='count'
37
+ */
38
+ color?: Extract<BackgroundColorType, 'accent' | 'primary' | 'specialbg-secondary-transparent'>;
39
+ /**
40
+ * Цветовое оформление бейджа при view='icon'
41
+ */
42
+ iconColor?: IconColorType;
43
+ /**
44
+ * Цвет подложки под иконкой
45
+ */
46
+ iconUnderlayColor?: Extract<GraphicColorType, 'primary' | 'static-light'>;
47
+ /**
48
+ * Идентификатор для систем автоматизированного тестирования
49
+ */
50
+ dataTestId?: string;
51
+ };
52
+ declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, color, iconUnderlayColor, dataTestId, }: BadgeProps) => React.JSX.Element;
53
+ export { IconColorType, BadgeProps, Badge };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlDesktopProps, FormControlDesktop };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlMobileProps, FormControlMobile };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
4
- type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
- declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
- export { FormControlMobileProps, FormControlMobile };
3
+ import { BaseInputProps } from "./index-ebda875c";
4
+ type InputMobileProps = Omit<BaseInputProps, 'FormControlComponent' | 'colorStyles'>;
5
+ declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
+ export * from "./Component.mobile-d7e9f69d";
7
+ export { InputMobileProps, InputMobile };
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'> & {
5
+ /**
6
+ * Контрольная точка, с нее начинается desktop версия
7
+ * @default 1024
8
+ */
9
+ breakpoint?: number;
10
+ /**
11
+ * Значение по-умолчанию для хука useMatchMedia
12
+ */
13
+ defaultMatchMediaValue?: boolean | (() => boolean);
14
+ };
15
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
16
+ /**
17
+ * Контрольная точка, с нее начинается desktop версия
18
+ * @default 1024
19
+ */
20
+ breakpoint?: number | undefined;
21
+ /**
22
+ * Значение по-умолчанию для хука useMatchMedia
23
+ */
24
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
25
+ } & React.RefAttributes<HTMLDivElement>>;
26
+ export { FormControlProps, FormControl };
@@ -39,7 +39,7 @@ type NumberInputProps = Omit<InputProps, 'value' | 'onChange' | 'type'> & {
39
39
  valueString: string;
40
40
  }) => void;
41
41
  };
42
- declare const NumberInput: React.ForwardRefExoticComponent<Omit<InputProps, "onChange" | "value" | "type"> & {
42
+ declare const NumberInput: React.ForwardRefExoticComponent<Omit<InputProps, "value" | "onChange" | "type"> & {
43
43
  /**
44
44
  * Значение поля ввода
45
45
  */
@@ -3,17 +3,13 @@ import React from "react";
3
3
  import { PaddingType } from "./index-72dda473";
4
4
  /* eslint-disable no-plusplus, no-param-reassign */
5
5
  import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
6
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
7
6
  declare const isClient: () => boolean;
8
7
  declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
8
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
9
9
  declare function easeInOutQuad(x: number): number;
10
10
  declare const easingFns: {
11
11
  easeInOutQuad: typeof easeInOutQuad;
12
12
  };
13
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
14
- declare const inputUtils: {
15
- disableUserInput: typeof disableUserInput;
16
- };
17
13
  /**
18
14
  * Возвращает true, если значение равно null или undefined
19
15
  */
@@ -51,4 +47,4 @@ declare const maskUtils: {
51
47
  prefixPostprocessor: typeof prefixPostprocessor;
52
48
  caretGuard: typeof caretGuard;
53
49
  };
54
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
50
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, fnUtils, maskUtils };
@@ -0,0 +1,62 @@
1
+ import { FC, ReactNode } from "react";
2
+ type MqProps = {
3
+ /**
4
+ * Media выражение или кастомный запрос из `mq.json`, например `--mobile`.
5
+ */
6
+ query?: string;
7
+ /**
8
+ * Запрос на поддержку тач-событий
9
+ */
10
+ touch?: boolean;
11
+ /**
12
+ * Дочерние элементы.
13
+ */
14
+ children?: ReactNode;
15
+ /**
16
+ * Обработчик изменений в совпадении запросов
17
+ */
18
+ onMatchChange?: (isMatched: boolean) => void;
19
+ };
20
+ declare const Mq: FC<MqProps>;
21
+ /**
22
+ * Хук для медиа запросов.
23
+ * @param query media выражение или кастомный запрос из `mq.json`, например `--mobile`.
24
+ * @param defaultValue Значение по-умолчанию.
25
+ */
26
+ declare const useMatchMedia: (query: string, defaultValue?: boolean | (() => boolean)) => boolean[];
27
+ /**
28
+ * Возвращает MediaQueryList для заданного media-выражения.
29
+ *
30
+ * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
31
+ */
32
+ declare function getMatchMedia(queryProp: string): MediaQueryList;
33
+ /**
34
+ * Удаляет MediaQueryList.
35
+ *
36
+ * @param queryProp media выражение или кастомный запрос из `mq.json`, например `--mobile`.
37
+ */
38
+ declare function releaseMatchMedia(queryProp: string): void;
39
+ /**
40
+ * Возвращает `true`, если есть поддержка `Pointer Events`
41
+ */
42
+ declare function isPointerEventsSupported(): boolean;
43
+ /**
44
+ * Возвращает `true`, если есть поддержка `Touch Events`
45
+ */
46
+ declare function isTouchSupported(): boolean;
47
+ declare const _exports: {
48
+ "--mobile-xs": string;
49
+ "--mobile-s": string;
50
+ "--mobile-m": string;
51
+ "--mobile-l": string;
52
+ "--mobile": string;
53
+ "--tablet-s": string;
54
+ "--tablet-m": string;
55
+ "--tablet": string;
56
+ "--desktop-s": string;
57
+ "--desktop-m": string;
58
+ "--desktop-l": string;
59
+ "--desktop-xl": string;
60
+ "--desktop": string;
61
+ };
62
+ export { _exports as default, MqProps, Mq, useMatchMedia, getMatchMedia, releaseMatchMedia, isPointerEventsSupported, isTouchSupported };
@@ -86,6 +86,14 @@ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
86
86
  * Дополнительный класс для аддонов
87
87
  */
88
88
  addonsClassName?: string;
89
+ /**
90
+ * Свойства для обертки левых аддонов
91
+ */
92
+ leftAddonsProps?: HTMLAttributes<HTMLDivElement>;
93
+ /**
94
+ * Свойства для обертки правых аддонов
95
+ */
96
+ rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
89
97
  /**
90
98
  * Идентификатор для систем автоматизированного тестирования
91
99
  */
@@ -125,6 +133,8 @@ declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttribu
125
133
  inputWrapperClassName?: string | undefined;
126
134
  labelClassName?: string | undefined;
127
135
  addonsClassName?: string | undefined;
136
+ leftAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
137
+ rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
128
138
  dataTestId?: string | undefined;
129
139
  children?: ReactNode;
130
140
  styles: {
@@ -69,6 +69,8 @@ type ComponentProps = {
69
69
  * Дочерние элементы.
70
70
  */
71
71
  children?: ReactNode;
72
+ };
73
+ type PrivateButtonProps = {
72
74
  /**
73
75
  * Основные стили компонента.
74
76
  */
@@ -80,16 +82,12 @@ type ComponentProps = {
80
82
  */
81
83
  colorStylesMap: StyleColors;
82
84
  };
83
- type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
84
- type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
85
- type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
86
- type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
87
- type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
88
- type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
85
+ type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
86
+ type ButtonProps = CommonButtonProps & {
89
87
  /**
90
88
  * Контрольная точка, с нее начинается desktop версия
91
89
  * @default 1024
92
90
  */
93
91
  breakpoint?: number;
94
92
  };
95
- export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
93
+ export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-number-input",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@alfalab/core-components-input": "^12.1.4",
17
+ "@alfalab/core-components-input": "^12.2.1",
18
18
  "react-merge-refs": "^1.1.0",
19
19
  "tslib": "^2.4.0"
20
20
  }
@@ -69,6 +69,8 @@ type ComponentProps = {
69
69
  * Дочерние элементы.
70
70
  */
71
71
  children?: ReactNode;
72
+ };
73
+ type PrivateButtonProps = {
72
74
  /**
73
75
  * Основные стили компонента.
74
76
  */
@@ -80,16 +82,12 @@ type ComponentProps = {
80
82
  */
81
83
  colorStylesMap: StyleColors;
82
84
  };
83
- type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
84
- type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
85
- type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
86
- type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
87
- type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
88
- type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
85
+ type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
86
+ type ButtonProps = CommonButtonProps & {
89
87
  /**
90
88
  * Контрольная точка, с нее начинается desktop версия
91
89
  * @default 1024
92
90
  */
93
91
  breakpoint?: number;
94
92
  };
95
- export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
93
+ export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };