@alfalab/core-components-picker-button 11.1.5 → 11.1.7

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 (91) hide show
  1. package/Component-72308007.d.ts +296 -0
  2. package/Component-72dda473.d.ts +53 -0
  3. package/Component-aed0af6e.d.ts +11 -0
  4. package/Component-dd8ca091.d.ts +3 -70
  5. package/Component-ebda875c.d.ts +98 -9
  6. package/Component-f12ee135.d.ts +72 -0
  7. package/Component.desktop.d.ts +1 -1
  8. package/Component.desktop.js +1 -1
  9. package/Component.mobile-96988a65.d.ts +6 -0
  10. package/Component.mobile.d.ts +1 -1
  11. package/Component.responsive.d.ts +1 -1
  12. package/{Component-1a4fbd11.d.ts → cssm/Component-72308007.d.ts} +1 -1
  13. package/cssm/Component.desktop-785df74d.d.ts +1 -1
  14. package/cssm/Component.mobile-d7e9f69d.d.ts +1 -1
  15. package/cssm/Component.responsive-3109f463.d.ts +1 -1
  16. package/{component-1a4fbd11.d.ts → cssm/component-72308007.d.ts} +1 -1
  17. package/cssm/index-72308007.d.ts +54 -0
  18. package/cssm/index-c44170fe.d.ts +2 -163
  19. package/cssm/index-c76d6398.d.ts +2 -2
  20. package/cssm/index-ebda875c.d.ts +2 -2
  21. package/cssm/index-f12ee135.d.ts +2 -2
  22. package/cssm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  23. package/cssm/{types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
  24. package/{cssm/Component-1a4fbd11.d.ts → esm/Component-72308007.d.ts} +1 -1
  25. package/esm/Component.desktop-785df74d.d.ts +1 -1
  26. package/esm/Component.desktop.js +1 -1
  27. package/esm/Component.mobile-d7e9f69d.d.ts +1 -1
  28. package/esm/Component.responsive-3109f463.d.ts +1 -1
  29. package/{cssm/component-1a4fbd11.d.ts → esm/component-72308007.d.ts} +1 -1
  30. package/esm/field/Component.js +1 -1
  31. package/esm/field/index.css +6 -6
  32. package/esm/index-72308007.d.ts +54 -0
  33. package/esm/index-c44170fe.d.ts +2 -163
  34. package/esm/index-c76d6398.d.ts +2 -2
  35. package/esm/index-ebda875c.d.ts +2 -2
  36. package/esm/index-f12ee135.d.ts +2 -2
  37. package/esm/index.css +5 -5
  38. package/esm/option/Component.js +1 -1
  39. package/esm/option/index.css +4 -4
  40. package/{types-83e2bd9e.d.ts → esm/types-1c79e231.d.ts} +1 -1
  41. package/{types-e40becc7.d.ts → esm/types-67a2d8af.d.ts} +1 -1
  42. package/field/Component.js +1 -1
  43. package/field/index.css +6 -6
  44. package/hook-8abfea97.d.ts +4 -4
  45. package/hook-ebda875c.d.ts +48 -0
  46. package/index-72308007.d.ts +54 -0
  47. package/index-bdb4c6b9.d.ts +180 -2
  48. package/index-c44170fe.d.ts +2 -163
  49. package/index-c76d6398.d.ts +2 -2
  50. package/index-ebda875c.d.ts +191 -53
  51. package/index-f12ee135.d.ts +324 -3
  52. package/index.css +5 -5
  53. package/{esm/Component-1a4fbd11.d.ts → modern/Component-72308007.d.ts} +1 -1
  54. package/modern/Component.desktop-785df74d.d.ts +1 -1
  55. package/modern/Component.desktop.js +1 -1
  56. package/modern/Component.mobile-d7e9f69d.d.ts +1 -1
  57. package/modern/Component.responsive-3109f463.d.ts +1 -1
  58. package/{esm/component-1a4fbd11.d.ts → modern/component-72308007.d.ts} +1 -1
  59. package/modern/field/Component.js +1 -1
  60. package/modern/field/index.css +6 -6
  61. package/modern/index-72308007.d.ts +54 -0
  62. package/modern/index-c44170fe.d.ts +2 -163
  63. package/modern/index-c76d6398.d.ts +2 -2
  64. package/modern/index-ebda875c.d.ts +2 -2
  65. package/modern/index-f12ee135.d.ts +2 -2
  66. package/modern/index.css +5 -5
  67. package/modern/option/Component.js +1 -1
  68. package/modern/option/index.css +4 -4
  69. package/modern/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  70. package/{esm/types-e40becc7.d.ts → modern/types-67a2d8af.d.ts} +1 -1
  71. package/option/Component.js +1 -1
  72. package/option/index.css +4 -4
  73. package/package.json +3 -3
  74. package/shared-4cd3936b.d.ts +1 -59
  75. package/{esm/types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  76. package/Component-63dec22f.d.ts +0 -184
  77. package/Component.modal.mobile-dd8ca091.d.ts +0 -60
  78. package/cssm/index-1a4fbd11.d.ts +0 -22
  79. package/esm/index-1a4fbd11.d.ts +0 -22
  80. package/index-1a4fbd11.d.ts +0 -22
  81. package/modern/Component-1a4fbd11.d.ts +0 -6
  82. package/modern/component-1a4fbd11.d.ts +0 -44
  83. package/modern/index-1a4fbd11.d.ts +0 -22
  84. package/modern/types-e40becc7.d.ts +0 -276
  85. package/utils-1574ad8b.d.ts +0 -29
  86. package/utils-49cc3c24.d.ts +0 -8
  87. /package/{Component.responsive-3109f463.d.ts → Component.responsive-d7e9f69d.d.ts} +0 -0
  88. /package/cssm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  89. /package/esm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  90. /package/modern/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  91. /package/{useSkeleton-ebda875c.d.ts → useSkeleton-1b036d4b.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
3
+ import { BaseFormControlProps } from "./Component.responsive-3109f463";
4
4
  type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
5
  declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
6
6
  export { FormControlDesktopProps, FormControlDesktop };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
3
+ import { BaseFormControlProps } from "./Component.responsive-3109f463";
4
4
  type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
5
  declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
6
  export { FormControlMobileProps, FormControlMobile };
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
4
3
  type FormControlProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'> & {
5
4
  /**
6
5
  * Контрольная точка, с нее начинается desktop версия
@@ -23,4 +22,5 @@ declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlP
23
22
  */
24
23
  defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
25
24
  } & React.RefAttributes<HTMLDivElement>>;
25
+ export * from "./Component-72308007";
26
26
  export { FormControlProps, FormControl };
@@ -4,7 +4,7 @@ import { FC, ReactNode, RefObject } from "react";
4
4
  import { NavigationBarProps } from "./index-c76d6398";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-e40becc7";
7
+ import { BottomSheetProps } from "./types-67a2d8af";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -0,0 +1,54 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { PaddingType } from "./index-72dda473";
4
+ /* eslint-disable no-plusplus, no-param-reassign */
5
+ import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
6
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
7
+ declare const isClient: () => boolean;
8
+ declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
9
+ declare function easeInOutQuad(x: number): number;
10
+ declare const easingFns: {
11
+ easeInOutQuad: typeof easeInOutQuad;
12
+ };
13
+ declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
14
+ declare const inputUtils: {
15
+ disableUserInput: typeof disableUserInput;
16
+ };
17
+ /**
18
+ * Возвращает true, если значение равно null или undefined
19
+ */
20
+ declare function isNil(value: unknown): boolean;
21
+ /**
22
+ * Выбор значения между min max границами
23
+ */
24
+ declare function clamp<T extends Date | number>(value: T, min: T, max: T): T;
25
+ declare function noop(): void;
26
+ declare const fnUtils: {
27
+ clamp: typeof clamp;
28
+ noop: typeof noop;
29
+ isNil: typeof isNil;
30
+ };
31
+ /**
32
+ * Запрещает каретке становиться за указанные границы
33
+ */
34
+ declare function caretGuard(guard: (value: string, selection: readonly [
35
+ from: number,
36
+ to: number
37
+ ]) => [
38
+ from: number,
39
+ to: number
40
+ ]): MaskitoPlugin;
41
+ /**
42
+ * Запрещает удалять указанный префикс
43
+ */
44
+ declare function prefixPostprocessor(prefix: string): MaskitoPostprocessor;
45
+ /**
46
+ * Препроцессор необходим для правильной вставки/автокомплита телефонного номера
47
+ */
48
+ declare function insertionPhonePreprocessor(mask: Array<string | RegExp>, countryCode?: string, clearableCountryCode?: boolean): MaskitoPreprocessor;
49
+ declare const maskUtils: {
50
+ insertionPhonePreprocessor: typeof insertionPhonePreprocessor;
51
+ prefixPostprocessor: typeof prefixPostprocessor;
52
+ caretGuard: typeof caretGuard;
53
+ };
54
+ export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
@@ -1,164 +1,3 @@
1
1
  /// <reference types="react" />
2
- import React from "react";
3
- import { ChangeEvent, ElementType, InputHTMLAttributes, MouseEvent, ReactNode } from "react";
4
- type StyleColors = {
5
- default: {
6
- [key: string]: string;
7
- };
8
- inverted: {
9
- [key: string]: string;
10
- };
11
- };
12
- type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
13
- /**
14
- * Значение поля ввода
15
- */
16
- value?: string;
17
- /**
18
- * Начальное значение поля
19
- */
20
- defaultValue?: string;
21
- /**
22
- * Растягивает компонент на ширину контейнера
23
- */
24
- block?: boolean;
25
- /**
26
- * Крестик для очистки поля
27
- */
28
- clear?: boolean;
29
- /**
30
- * Размер компонента
31
- */
32
- size?: "s" | "m" | "l" | "xl";
33
- /**
34
- * Набор цветов для компонента
35
- */
36
- colors?: "default" | "inverted";
37
- /**
38
- * Отображение ошибки
39
- */
40
- error?: ReactNode | boolean;
41
- /**
42
- * Отображение иконки успеха
43
- */
44
- success?: boolean;
45
- /**
46
- * Текст подсказки
47
- */
48
- hint?: ReactNode;
49
- /**
50
- * Лейбл компонента
51
- */
52
- label?: React.ReactNode;
53
- /**
54
- * Вид лейбла внутри / снаружи
55
- */
56
- labelView?: "inner" | "outer";
57
- /**
58
- * Атрибут type
59
- */
60
- type?: "number" | "card" | "email" | "money" | "password" | "tel" | "text";
61
- /**
62
- * Ref для обертки input
63
- */
64
- wrapperRef?: React.Ref<HTMLDivElement> | null;
65
- /**
66
- * Слот слева
67
- */
68
- leftAddons?: React.ReactNode;
69
- /**
70
- * Слот справа
71
- */
72
- rightAddons?: React.ReactNode;
73
- /**
74
- * Слот под инпутом
75
- */
76
- bottomAddons?: React.ReactNode;
77
- /**
78
- * Дополнительный класс
79
- */
80
- className?: string;
81
- /**
82
- * Дополнительный класс для поля
83
- */
84
- fieldClassName?: string;
85
- /**
86
- * Дополнительный класс инпута
87
- */
88
- inputClassName?: string;
89
- /**
90
- * Дополнительный класс для лейбла
91
- */
92
- labelClassName?: string;
93
- /**
94
- * Дополнительный класс для аддонов
95
- */
96
- addonsClassName?: string;
97
- /**
98
- * Класс, который будет установлен при фокусе
99
- */
100
- focusedClassName?: string;
101
- /**
102
- * Класс, который будет установлен, если в поле есть значение
103
- */
104
- filledClassName?: string;
105
- /**
106
- * Обработчик поля ввода
107
- */
108
- onChange?: (event: ChangeEvent<HTMLInputElement>, payload: {
109
- value: string;
110
- }) => void;
111
- /**
112
- * Обработчик нажатия на кнопку очистки
113
- */
114
- onClear?: (event: MouseEvent<HTMLButtonElement>) => void;
115
- /**
116
- * Обработчик клика по полю
117
- */
118
- onClick?: (event: MouseEvent<HTMLDivElement>) => void;
119
- /**
120
- * Обработчик MouseDown по полю
121
- */
122
- onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
123
- /**
124
- * Обработчик MouseUp по полю
125
- */
126
- onMouseUp?: (event: MouseEvent<HTMLDivElement>) => void;
127
- /**
128
- * Идентификатор для систем автоматизированного тестирования
129
- */
130
- FormControlComponent?: ElementType;
131
- /**
132
- * Идентификатор для систем автоматизированного тестирования
133
- */
134
- dataTestId?: string;
135
- /**
136
- * Стили компонента для default и inverted режима.
137
- */
138
- colorStyles?: StyleColors;
139
- /**
140
- * Запрещает ввод с клавиатуры
141
- */
142
- disableUserInput?: boolean;
143
- };
144
- type InputProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
145
- /**
146
- * Контрольная точка, с нее начинается desktop версия
147
- * @default 1024
148
- */
149
- breakpoint?: number;
150
- /**
151
- * Значение по-умолчанию для хука useMatchMedia
152
- */
153
- defaultMatchMediaValue?: boolean | (() => boolean);
154
- };
155
- declare const Input: React.ForwardRefExoticComponent<Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
156
- breakpoint?: number | undefined;
157
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
158
- } & React.RefAttributes<HTMLInputElement>>;
159
- type InputDesktopProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles">;
160
- declare const InputDesktop: React.ForwardRefExoticComponent<InputDesktopProps & React.RefAttributes<HTMLInputElement>>;
161
- type InputMobileProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles">;
162
- declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
163
- export { InputProps, Input, InputDesktopProps, InputDesktop, InputMobileProps, InputMobile };
164
- export * from "./Component.desktop-785df74d";
2
+ export * from "./Component.responsive-3109f463";
3
+ export {};
@@ -1,2 +1,2 @@
1
- export * from "./Component-1a4fbd11";
2
- export type { NavigationBarProps } from "./types-83e2bd9e";
1
+ export * from "./Component-72308007";
2
+ export type { NavigationBarProps } from "./types-1c79e231";
@@ -66,7 +66,7 @@ type IconButtonProps = {
66
66
  * Набор цветов для компонента
67
67
  */
68
68
  colors?: "default" | "inverted";
69
- } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
69
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "Component" | "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
70
70
  declare const IconButton: React.ForwardRefExoticComponent<{
71
71
  icon: ElementType<{
72
72
  className?: string;
@@ -77,5 +77,5 @@ declare const IconButton: React.ForwardRefExoticComponent<{
77
77
  alignIcon?: "center" | "right" | "left" | undefined;
78
78
  dataTestId?: string | undefined;
79
79
  colors?: "default" | "inverted" | undefined;
80
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
80
+ } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "Component" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
81
81
  export { CloserProps, Closer, IconButtonProps, IconButton };
@@ -1,3 +1,3 @@
1
- export * from "./component-1a4fbd11";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-e40becc7";
1
+ export * from "./component-72308007";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-67a2d8af";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
@@ -14,7 +14,7 @@ type NavigationBarProps = {
14
14
  /**
15
15
  * Подзаголовок (доступен только в мобильной версии)
16
16
  */
17
- subtitle?: string;
17
+ subtitle?: ReactNode;
18
18
  /**
19
19
  * Размер заголовка (compact доступен только в мобильной версии)
20
20
  */
@@ -259,7 +259,7 @@ type BottomSheetProps = {
259
259
  /**
260
260
  * Вызывается после окончания анимации притягивания
261
261
  */
262
- onMagnetizeEnd?: () => void;
262
+ onMagnetizeEnd?: (index: number) => void;
263
263
  /**
264
264
  * Вызывается при изменении положения шторки
265
265
  */
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NavigationBarProps } from "./types-83e2bd9e";
3
+ import { NavigationBarProps } from "./types-1c79e231";
4
4
  declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
5
5
  export * from "./Component-63dec22f";
6
6
  export { NavigationBar };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
3
+ import { BaseFormControlProps } from "./Component.responsive-3109f463";
4
4
  type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
5
  declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
6
6
  export { FormControlDesktopProps, FormControlDesktop };
@@ -11,7 +11,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
11
11
  import '@alfalab/icons-glyph/MoreMIcon';
12
12
  import '@alfalab/icons-glyph/MoreSIcon';
13
13
 
14
- var styles = {"container":"picker-button__container_an5lv","optionsPopover":"picker-button__optionsPopover_an5lv","sideGap":"picker-button__sideGap_an5lv","option":"picker-button__option_an5lv"};
14
+ var styles = {"container":"picker-button__container_1me4e","optionsPopover":"picker-button__optionsPopover_1me4e","sideGap":"picker-button__sideGap_1me4e","option":"picker-button__option_1me4e"};
15
15
  require('./index.css')
16
16
 
17
17
  var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
3
+ import { BaseFormControlProps } from "./Component.responsive-3109f463";
4
4
  type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
5
  declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
6
  export { FormControlMobileProps, FormControlMobile };
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
4
3
  type FormControlProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'> & {
5
4
  /**
6
5
  * Контрольная точка, с нее начинается desktop версия
@@ -23,4 +22,5 @@ declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlP
23
22
  */
24
23
  defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
25
24
  } & React.RefAttributes<HTMLDivElement>>;
25
+ export * from "./Component-72308007";
26
26
  export { FormControlProps, FormControl };
@@ -4,7 +4,7 @@ import { FC, ReactNode, RefObject } from "react";
4
4
  import { NavigationBarProps } from "./index-c76d6398";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-e40becc7";
7
+ import { BottomSheetProps } from "./types-67a2d8af";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -8,7 +8,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
8
8
  import '@alfalab/icons-glyph/MoreMIcon';
9
9
  import '@alfalab/icons-glyph/MoreSIcon';
10
10
 
11
- var styles = {"iconContainer":"picker-button__iconContainer_w6yyy","addonsContainer":"picker-button__addonsContainer_w6yyy","showControlIcon":"picker-button__showControlIcon_w6yyy","open":"picker-button__open_w6yyy","linkOpen":"picker-button__linkOpen_w6yyy"};
11
+ var styles = {"iconContainer":"picker-button__iconContainer_1xvmu","addonsContainer":"picker-button__addonsContainer_1xvmu","showControlIcon":"picker-button__showControlIcon_1xvmu","open":"picker-button__open_1xvmu","linkOpen":"picker-button__linkOpen_1xvmu"};
12
12
  require('./index.css')
13
13
 
14
14
  var Field = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: hzlg0 */
1
+ /* hash: 1jino */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -17,15 +17,15 @@
17
17
  } :root {
18
18
  } :root {
19
19
  --arrow-transform: rotate(180deg);
20
- } .picker-button__iconContainer_w6yyy {
20
+ } .picker-button__iconContainer_1xvmu {
21
21
  display: flex;
22
22
  transition: transform 0.15s ease-in-out;
23
- } .picker-button__addonsContainer_w6yyy {
23
+ } .picker-button__addonsContainer_1xvmu {
24
24
  display: flex
25
- } .picker-button__addonsContainer_w6yyy.picker-button__showControlIcon_w6yyy {
25
+ } .picker-button__addonsContainer_1xvmu.picker-button__showControlIcon_1xvmu {
26
26
  margin-right: var(--gap-2xs);
27
- } .picker-button__open_w6yyy {
27
+ } .picker-button__open_1xvmu {
28
28
  transform: var(--arrow-transform);
29
- } .picker-button__linkOpen_w6yyy:not(:hover) {
29
+ } .picker-button__linkOpen_1xvmu:not(:hover) {
30
30
  background-color: var(--color-light-specialbg-secondary-transparent);
31
31
  }
@@ -0,0 +1,54 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { PaddingType } from "./index-72dda473";
4
+ /* eslint-disable no-plusplus, no-param-reassign */
5
+ import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
6
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
7
+ declare const isClient: () => boolean;
8
+ declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
9
+ declare function easeInOutQuad(x: number): number;
10
+ declare const easingFns: {
11
+ easeInOutQuad: typeof easeInOutQuad;
12
+ };
13
+ declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
14
+ declare const inputUtils: {
15
+ disableUserInput: typeof disableUserInput;
16
+ };
17
+ /**
18
+ * Возвращает true, если значение равно null или undefined
19
+ */
20
+ declare function isNil(value: unknown): boolean;
21
+ /**
22
+ * Выбор значения между min max границами
23
+ */
24
+ declare function clamp<T extends Date | number>(value: T, min: T, max: T): T;
25
+ declare function noop(): void;
26
+ declare const fnUtils: {
27
+ clamp: typeof clamp;
28
+ noop: typeof noop;
29
+ isNil: typeof isNil;
30
+ };
31
+ /**
32
+ * Запрещает каретке становиться за указанные границы
33
+ */
34
+ declare function caretGuard(guard: (value: string, selection: readonly [
35
+ from: number,
36
+ to: number
37
+ ]) => [
38
+ from: number,
39
+ to: number
40
+ ]): MaskitoPlugin;
41
+ /**
42
+ * Запрещает удалять указанный префикс
43
+ */
44
+ declare function prefixPostprocessor(prefix: string): MaskitoPostprocessor;
45
+ /**
46
+ * Препроцессор необходим для правильной вставки/автокомплита телефонного номера
47
+ */
48
+ declare function insertionPhonePreprocessor(mask: Array<string | RegExp>, countryCode?: string, clearableCountryCode?: boolean): MaskitoPreprocessor;
49
+ declare const maskUtils: {
50
+ insertionPhonePreprocessor: typeof insertionPhonePreprocessor;
51
+ prefixPostprocessor: typeof prefixPostprocessor;
52
+ caretGuard: typeof caretGuard;
53
+ };
54
+ export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils, maskUtils };
@@ -1,164 +1,3 @@
1
1
  /// <reference types="react" />
2
- import React from "react";
3
- import { ChangeEvent, ElementType, InputHTMLAttributes, MouseEvent, ReactNode } from "react";
4
- type StyleColors = {
5
- default: {
6
- [key: string]: string;
7
- };
8
- inverted: {
9
- [key: string]: string;
10
- };
11
- };
12
- type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
13
- /**
14
- * Значение поля ввода
15
- */
16
- value?: string;
17
- /**
18
- * Начальное значение поля
19
- */
20
- defaultValue?: string;
21
- /**
22
- * Растягивает компонент на ширину контейнера
23
- */
24
- block?: boolean;
25
- /**
26
- * Крестик для очистки поля
27
- */
28
- clear?: boolean;
29
- /**
30
- * Размер компонента
31
- */
32
- size?: "s" | "m" | "l" | "xl";
33
- /**
34
- * Набор цветов для компонента
35
- */
36
- colors?: "default" | "inverted";
37
- /**
38
- * Отображение ошибки
39
- */
40
- error?: ReactNode | boolean;
41
- /**
42
- * Отображение иконки успеха
43
- */
44
- success?: boolean;
45
- /**
46
- * Текст подсказки
47
- */
48
- hint?: ReactNode;
49
- /**
50
- * Лейбл компонента
51
- */
52
- label?: React.ReactNode;
53
- /**
54
- * Вид лейбла внутри / снаружи
55
- */
56
- labelView?: "inner" | "outer";
57
- /**
58
- * Атрибут type
59
- */
60
- type?: "number" | "card" | "email" | "money" | "password" | "tel" | "text";
61
- /**
62
- * Ref для обертки input
63
- */
64
- wrapperRef?: React.Ref<HTMLDivElement> | null;
65
- /**
66
- * Слот слева
67
- */
68
- leftAddons?: React.ReactNode;
69
- /**
70
- * Слот справа
71
- */
72
- rightAddons?: React.ReactNode;
73
- /**
74
- * Слот под инпутом
75
- */
76
- bottomAddons?: React.ReactNode;
77
- /**
78
- * Дополнительный класс
79
- */
80
- className?: string;
81
- /**
82
- * Дополнительный класс для поля
83
- */
84
- fieldClassName?: string;
85
- /**
86
- * Дополнительный класс инпута
87
- */
88
- inputClassName?: string;
89
- /**
90
- * Дополнительный класс для лейбла
91
- */
92
- labelClassName?: string;
93
- /**
94
- * Дополнительный класс для аддонов
95
- */
96
- addonsClassName?: string;
97
- /**
98
- * Класс, который будет установлен при фокусе
99
- */
100
- focusedClassName?: string;
101
- /**
102
- * Класс, который будет установлен, если в поле есть значение
103
- */
104
- filledClassName?: string;
105
- /**
106
- * Обработчик поля ввода
107
- */
108
- onChange?: (event: ChangeEvent<HTMLInputElement>, payload: {
109
- value: string;
110
- }) => void;
111
- /**
112
- * Обработчик нажатия на кнопку очистки
113
- */
114
- onClear?: (event: MouseEvent<HTMLButtonElement>) => void;
115
- /**
116
- * Обработчик клика по полю
117
- */
118
- onClick?: (event: MouseEvent<HTMLDivElement>) => void;
119
- /**
120
- * Обработчик MouseDown по полю
121
- */
122
- onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
123
- /**
124
- * Обработчик MouseUp по полю
125
- */
126
- onMouseUp?: (event: MouseEvent<HTMLDivElement>) => void;
127
- /**
128
- * Идентификатор для систем автоматизированного тестирования
129
- */
130
- FormControlComponent?: ElementType;
131
- /**
132
- * Идентификатор для систем автоматизированного тестирования
133
- */
134
- dataTestId?: string;
135
- /**
136
- * Стили компонента для default и inverted режима.
137
- */
138
- colorStyles?: StyleColors;
139
- /**
140
- * Запрещает ввод с клавиатуры
141
- */
142
- disableUserInput?: boolean;
143
- };
144
- type InputProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
145
- /**
146
- * Контрольная точка, с нее начинается desktop версия
147
- * @default 1024
148
- */
149
- breakpoint?: number;
150
- /**
151
- * Значение по-умолчанию для хука useMatchMedia
152
- */
153
- defaultMatchMediaValue?: boolean | (() => boolean);
154
- };
155
- declare const Input: React.ForwardRefExoticComponent<Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
156
- breakpoint?: number | undefined;
157
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
158
- } & React.RefAttributes<HTMLInputElement>>;
159
- type InputDesktopProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles">;
160
- declare const InputDesktop: React.ForwardRefExoticComponent<InputDesktopProps & React.RefAttributes<HTMLInputElement>>;
161
- type InputMobileProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles">;
162
- declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
163
- export { InputProps, Input, InputDesktopProps, InputDesktop, InputMobileProps, InputMobile };
164
- export * from "./Component.desktop-785df74d";
2
+ export * from "./Component.responsive-3109f463";
3
+ export {};
@@ -1,2 +1,2 @@
1
- export * from "./Component-1a4fbd11";
2
- export type { NavigationBarProps } from "./types-83e2bd9e";
1
+ export * from "./Component-72308007";
2
+ export type { NavigationBarProps } from "./types-1c79e231";
@@ -66,7 +66,7 @@ type IconButtonProps = {
66
66
  * Набор цветов для компонента
67
67
  */
68
68
  colors?: "default" | "inverted";
69
- } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
69
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "Component" | "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
70
70
  declare const IconButton: React.ForwardRefExoticComponent<{
71
71
  icon: ElementType<{
72
72
  className?: string;
@@ -77,5 +77,5 @@ declare const IconButton: React.ForwardRefExoticComponent<{
77
77
  alignIcon?: "center" | "right" | "left" | undefined;
78
78
  dataTestId?: string | undefined;
79
79
  colors?: "default" | "inverted" | undefined;
80
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
80
+ } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "Component" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
81
81
  export { CloserProps, Closer, IconButtonProps, IconButton };