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

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 (37) hide show
  1. package/Component-72dda473.d.ts +53 -0
  2. package/Component.desktop-785df74d.d.ts +6 -0
  3. package/Component.mobile-d7e9f69d.d.ts +6 -0
  4. package/Component.mobile-ebda875c.d.ts +5 -4
  5. package/Component.responsive-785df74d.d.ts +26 -0
  6. package/components/number-input/Component.d.ts +1 -1
  7. package/cssm/Component-72dda473.d.ts +53 -0
  8. package/cssm/Component.desktop-785df74d.d.ts +6 -0
  9. package/cssm/Component.mobile-d7e9f69d.d.ts +6 -0
  10. package/cssm/Component.mobile-ebda875c.d.ts +5 -4
  11. package/cssm/Component.responsive-785df74d.d.ts +26 -0
  12. package/cssm/components/number-input/Component.d.ts +1 -1
  13. package/cssm/index-3109f463.d.ts +62 -0
  14. package/cssm/index-72308007.d.ts +2 -2
  15. package/cssm/index-ebda875c.d.ts +10 -0
  16. package/esm/Component-72dda473.d.ts +53 -0
  17. package/esm/Component.desktop-785df74d.d.ts +6 -0
  18. package/esm/Component.mobile-d7e9f69d.d.ts +6 -0
  19. package/esm/Component.mobile-ebda875c.d.ts +5 -4
  20. package/esm/Component.responsive-785df74d.d.ts +26 -0
  21. package/esm/components/number-input/Component.d.ts +1 -1
  22. package/esm/index-3109f463.d.ts +62 -0
  23. package/esm/index-72308007.d.ts +2 -2
  24. package/esm/index-ebda875c.d.ts +10 -0
  25. package/index-3109f463.d.ts +62 -0
  26. package/index-72308007.d.ts +2 -2
  27. package/index-ebda875c.d.ts +10 -0
  28. package/modern/Component-72dda473.d.ts +53 -0
  29. package/modern/Component.desktop-785df74d.d.ts +6 -0
  30. package/modern/Component.mobile-d7e9f69d.d.ts +6 -0
  31. package/modern/Component.mobile-ebda875c.d.ts +5 -4
  32. package/modern/Component.responsive-785df74d.d.ts +26 -0
  33. package/modern/components/number-input/Component.d.ts +1 -1
  34. package/modern/index-3109f463.d.ts +62 -0
  35. package/modern/index-72308007.d.ts +2 -2
  36. package/modern/index-ebda875c.d.ts +10 -0
  37. package/package.json +2 -2
@@ -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
  */
@@ -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
  */
@@ -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 };
@@ -3,9 +3,9 @@ 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;
@@ -51,4 +51,4 @@ declare const maskUtils: {
51
51
  prefixPostprocessor: typeof prefixPostprocessor;
52
52
  caretGuard: typeof caretGuard;
53
53
  };
54
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
54
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils, fnUtils, maskUtils };
@@ -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: {
@@ -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
  */
@@ -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 };
@@ -3,9 +3,9 @@ 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;
@@ -51,4 +51,4 @@ declare const maskUtils: {
51
51
  prefixPostprocessor: typeof prefixPostprocessor;
52
52
  caretGuard: typeof caretGuard;
53
53
  };
54
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
54
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils, fnUtils, maskUtils };
@@ -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: {
@@ -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 };
@@ -3,9 +3,9 @@ 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;
@@ -51,4 +51,4 @@ declare const maskUtils: {
51
51
  prefixPostprocessor: typeof prefixPostprocessor;
52
52
  caretGuard: typeof caretGuard;
53
53
  };
54
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
54
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils, fnUtils, maskUtils };
@@ -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: {
@@ -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
  */
@@ -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 };
@@ -3,9 +3,9 @@ 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;
@@ -51,4 +51,4 @@ declare const maskUtils: {
51
51
  prefixPostprocessor: typeof prefixPostprocessor;
52
52
  caretGuard: typeof caretGuard;
53
53
  };
54
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
54
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils, fnUtils, maskUtils };
@@ -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: {
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.5",
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.0",
18
18
  "react-merge-refs": "^1.1.0",
19
19
  "tslib": "^2.4.0"
20
20
  }