@alfalab/core-components-picker-button 11.3.3 → 11.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/Component-081223cb.d.ts +6 -2
  2. package/Component-bdb4c6b9.d.ts +12 -0
  3. package/{Component-e63ec8aa.d.ts → Component-c29389e5.d.ts} +1 -1
  4. package/Component-c44170fe.d.ts +12 -4
  5. package/ResponsiveContext-08e5596c.d.ts +5 -0
  6. package/cssm/Component-081223cb.d.ts +6 -2
  7. package/cssm/Component-bdb4c6b9.d.ts +12 -0
  8. package/cssm/{Component-e63ec8aa.d.ts → Component-c29389e5.d.ts} +1 -1
  9. package/cssm/Component-c44170fe.d.ts +12 -4
  10. package/cssm/ResponsiveContext-08e5596c.d.ts +5 -0
  11. package/cssm/field/Component.d.ts +1 -1
  12. package/cssm/field/index.module.css +2 -2
  13. package/cssm/index-bdb4c6b9.d.ts +223 -0
  14. package/cssm/index-ebda875c.d.ts +1 -0
  15. package/cssm/typings-08e5596c.d.ts +56 -0
  16. package/{esm/typings-e63ec8aa.d.ts → cssm/typings-c29389e5.d.ts} +42 -305
  17. package/cssm/utils-d2597f31.d.ts +1 -1
  18. package/desktop/Component.desktop.js +1 -1
  19. package/esm/Component-081223cb.d.ts +6 -2
  20. package/esm/Component-bdb4c6b9.d.ts +12 -0
  21. package/{modern/Component-e63ec8aa.d.ts → esm/Component-c29389e5.d.ts} +1 -1
  22. package/esm/Component-c44170fe.d.ts +12 -4
  23. package/esm/ResponsiveContext-08e5596c.d.ts +5 -0
  24. package/esm/desktop/Component.desktop.js +1 -1
  25. package/esm/field/Component.d.ts +1 -1
  26. package/esm/field/Component.js +1 -1
  27. package/esm/field/index.css +8 -8
  28. package/esm/index-bdb4c6b9.d.ts +223 -0
  29. package/esm/index-ebda875c.d.ts +1 -0
  30. package/esm/index.css +5 -5
  31. package/esm/option/Component.js +1 -1
  32. package/esm/option/index.css +4 -4
  33. package/esm/typings-08e5596c.d.ts +56 -0
  34. package/{modern/typings-e63ec8aa.d.ts → esm/typings-c29389e5.d.ts} +42 -305
  35. package/esm/utils-d2597f31.d.ts +1 -1
  36. package/field/Component.d.ts +1 -1
  37. package/field/Component.js +1 -1
  38. package/field/index.css +8 -8
  39. package/index-bdb4c6b9.d.ts +223 -0
  40. package/index-ebda875c.d.ts +1 -0
  41. package/index.css +5 -5
  42. package/modern/Component-081223cb.d.ts +6 -2
  43. package/modern/Component-bdb4c6b9.d.ts +12 -0
  44. package/{esm/Component-e63ec8aa.d.ts → modern/Component-c29389e5.d.ts} +1 -1
  45. package/modern/Component-c44170fe.d.ts +12 -4
  46. package/modern/ResponsiveContext-08e5596c.d.ts +5 -0
  47. package/modern/desktop/Component.desktop.js +1 -1
  48. package/modern/field/Component.d.ts +1 -1
  49. package/modern/field/Component.js +1 -1
  50. package/modern/field/index.css +8 -8
  51. package/modern/index-bdb4c6b9.d.ts +223 -0
  52. package/modern/index-ebda875c.d.ts +1 -0
  53. package/modern/index.css +5 -5
  54. package/modern/option/Component.js +1 -1
  55. package/modern/option/index.css +4 -4
  56. package/modern/typings-08e5596c.d.ts +56 -0
  57. package/{cssm/typings-e63ec8aa.d.ts → modern/typings-c29389e5.d.ts} +42 -305
  58. package/modern/utils-d2597f31.d.ts +1 -1
  59. package/option/Component.js +1 -1
  60. package/option/index.css +4 -4
  61. package/package.json +4 -4
  62. package/src/field/index.module.css +1 -1
  63. package/typings-08e5596c.d.ts +56 -0
  64. package/{typings-e63ec8aa.d.ts → typings-c29389e5.d.ts} +42 -305
  65. package/utils-d2597f31.d.ts +1 -1
@@ -95,7 +95,9 @@ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
95
95
  */
96
96
  rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
97
97
  /**
98
- * Идентификатор для систем автоматизированного тестирования
98
+ * Идентификатор для систем автоматизированного тестирования.
99
+ * Для слота слева используется модификатор -left-addons, слота справа -right-addons,
100
+ * ошибки -error-message, текста подсказки -hint
99
101
  */
100
102
  dataTestId?: string;
101
103
  /**
@@ -199,7 +201,9 @@ declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttribu
199
201
  */
200
202
  rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
201
203
  /**
202
- * Идентификатор для систем автоматизированного тестирования
204
+ * Идентификатор для систем автоматизированного тестирования.
205
+ * Для слота слева используется модификатор -left-addons, слота справа -right-addons,
206
+ * ошибки -error-message, текста подсказки -hint
203
207
  */
204
208
  dataTestId?: string | undefined;
205
209
  /**
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { View } from "./typings-08e5596c";
4
+ declare const Modal: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
5
+ size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
6
+ fullscreen?: boolean | undefined;
7
+ fixedPosition?: boolean | undefined;
8
+ hasCloser?: boolean | undefined;
9
+ } & {
10
+ view: View;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ export { Modal };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { OptgroupProps } from "./typings-e63ec8aa";
3
+ import { OptgroupProps } from "./typings-c29389e5";
4
4
  declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
5
5
  export { Optgroup };
@@ -1,7 +1,13 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
2
+ import React from "react";
3
3
  import { ChangeEvent, ElementType, HTMLAttributes, InputHTMLAttributes, MouseEvent, ReactNode, RefAttributes } from "react";
4
4
  import { FormControlProps } from "./index-c44170fe";
5
+ interface ClearButtonProps {
6
+ disabled?: boolean;
7
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
8
+ colors: "default" | "inverted";
9
+ }
10
+ declare const ClearButton: React.FC<ClearButtonProps>;
5
11
  type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue' | 'onChange' | 'onClick' | 'onMouseDown' | 'enterKeyHint'> & {
6
12
  /**
7
13
  * Значение поля ввода
@@ -130,7 +136,8 @@ type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type
130
136
  */
131
137
  FormControlComponent?: ElementType<FormControlProps & RefAttributes<HTMLDivElement>>;
132
138
  /**
133
- * Идентификатор для систем автоматизированного тестирования
139
+ * Идентификатор для систем автоматизированного тестирования.
140
+ * Для FormControl используется модификатор -form-control
134
141
  */
135
142
  dataTestId?: string;
136
143
  /**
@@ -269,7 +276,8 @@ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAtt
269
276
  defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
270
277
  } & React.RefAttributes<HTMLDivElement>> | undefined;
271
278
  /**
272
- * Идентификатор для систем автоматизированного тестирования
279
+ * Идентификатор для систем автоматизированного тестирования.
280
+ * Для FormControl используется модификатор -form-control
273
281
  */
274
282
  dataTestId?: string | undefined;
275
283
  /**
@@ -278,4 +286,4 @@ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAtt
278
286
  disableUserInput?: boolean | undefined;
279
287
  } & React.RefAttributes<HTMLInputElement>>;
280
288
  export * from "./Component-72dda473";
281
- export { BaseInputProps, BaseInput };
289
+ export { ClearButton, BaseInputProps, BaseInput };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { TResponsiveModalContext } from "./typings-08e5596c";
4
+ declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
5
+ export { ResponsiveContext };
@@ -95,7 +95,9 @@ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
95
95
  */
96
96
  rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
97
97
  /**
98
- * Идентификатор для систем автоматизированного тестирования
98
+ * Идентификатор для систем автоматизированного тестирования.
99
+ * Для слота слева используется модификатор -left-addons, слота справа -right-addons,
100
+ * ошибки -error-message, текста подсказки -hint
99
101
  */
100
102
  dataTestId?: string;
101
103
  /**
@@ -199,7 +201,9 @@ declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttribu
199
201
  */
200
202
  rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
201
203
  /**
202
- * Идентификатор для систем автоматизированного тестирования
204
+ * Идентификатор для систем автоматизированного тестирования.
205
+ * Для слота слева используется модификатор -left-addons, слота справа -right-addons,
206
+ * ошибки -error-message, текста подсказки -hint
203
207
  */
204
208
  dataTestId?: string | undefined;
205
209
  /**
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { View } from "./typings-08e5596c";
4
+ declare const Modal: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
5
+ size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
6
+ fullscreen?: boolean | undefined;
7
+ fixedPosition?: boolean | undefined;
8
+ hasCloser?: boolean | undefined;
9
+ } & {
10
+ view: View;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ export { Modal };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { OptgroupProps } from "./typings-e63ec8aa";
3
+ import { OptgroupProps } from "./typings-c29389e5";
4
4
  declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
5
5
  export { Optgroup };
@@ -1,7 +1,13 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
2
+ import React from "react";
3
3
  import { ChangeEvent, ElementType, HTMLAttributes, InputHTMLAttributes, MouseEvent, ReactNode, RefAttributes } from "react";
4
4
  import { FormControlProps } from "./index-c44170fe";
5
+ interface ClearButtonProps {
6
+ disabled?: boolean;
7
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
8
+ colors: "default" | "inverted";
9
+ }
10
+ declare const ClearButton: React.FC<ClearButtonProps>;
5
11
  type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue' | 'onChange' | 'onClick' | 'onMouseDown' | 'enterKeyHint'> & {
6
12
  /**
7
13
  * Значение поля ввода
@@ -130,7 +136,8 @@ type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type
130
136
  */
131
137
  FormControlComponent?: ElementType<FormControlProps & RefAttributes<HTMLDivElement>>;
132
138
  /**
133
- * Идентификатор для систем автоматизированного тестирования
139
+ * Идентификатор для систем автоматизированного тестирования.
140
+ * Для FormControl используется модификатор -form-control
134
141
  */
135
142
  dataTestId?: string;
136
143
  /**
@@ -269,7 +276,8 @@ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAtt
269
276
  defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
270
277
  } & React.RefAttributes<HTMLDivElement>> | undefined;
271
278
  /**
272
- * Идентификатор для систем автоматизированного тестирования
279
+ * Идентификатор для систем автоматизированного тестирования.
280
+ * Для FormControl используется модификатор -form-control
273
281
  */
274
282
  dataTestId?: string | undefined;
275
283
  /**
@@ -278,4 +286,4 @@ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAtt
278
286
  disableUserInput?: boolean | undefined;
279
287
  } & React.RefAttributes<HTMLInputElement>>;
280
288
  export * from "./Component-72dda473";
281
- export { BaseInputProps, BaseInput };
289
+ export { ClearButton, BaseInputProps, BaseInput };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { TResponsiveModalContext } from "./typings-08e5596c";
4
+ declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
5
+ export { ResponsiveContext };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ButtonProps } from "@alfalab/core-components-button";
4
- import { FieldProps as BaseFieldProps } from "../typings-e63ec8aa";
4
+ import { FieldProps as BaseFieldProps } from "../typings-c29389e5";
5
5
  import { PickerButtonSize, PickerButtonVariant } from "../types";
6
6
  type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
7
7
  buttonSize?: PickerButtonSize;
@@ -1,6 +1,6 @@
1
1
  :root {
2
2
  } /* deprecated */ :root {
3
- --color-light-neutral-translucent-100: rgba(38, 55, 88, 0.06); /* 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 */
3
+ --color-light-transparent-default-hover: rgba(38, 55, 88, 0.06); /* 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 */
4
4
  } :root { /* 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 */
5
5
  } :root {
6
6
  } :root {
@@ -26,5 +26,5 @@
26
26
  } .open {
27
27
  transform: var(--arrow-transform);
28
28
  } .linkOpen:not(:hover) {
29
- background-color: var(--color-light-neutral-translucent-100);
29
+ background-color: var(--color-light-transparent-default-hover);
30
30
  }
@@ -0,0 +1,223 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="react-transition-group" />
3
+ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
4
+ import React from "react";
5
+ import { FC, KeyboardEvent, MouseEvent, MutableRefObject, ReactNode, Ref, RefObject } from "react";
6
+ import { TransitionProps } from "react-transition-group/Transition";
7
+ import { BackdropProps } from "./index-ebda875c";
8
+ type PortalProps = {
9
+ /** Контент */
10
+ children?: ReactNode;
11
+ /**
12
+ * Функция, возвращающая контейнер, в который будут рендериться дочерние элементы
13
+ */
14
+ getPortalContainer?: () => Element;
15
+ /**
16
+ * Немедленно отрендерить дочерние элементы (false - контент будет отрендерен на след. рендер).
17
+ */
18
+ immediateMount?: boolean;
19
+ };
20
+ type BaseModalProps = {
21
+ /**
22
+ * Контент
23
+ */
24
+ children?: ReactNode;
25
+ /**
26
+ * Компонент бэкдропа
27
+ */
28
+ Backdrop?: FC<BackdropProps>;
29
+ /**
30
+ * Свойства для Бэкдропа
31
+ */
32
+ backdropProps?: Partial<BackdropProps> & Record<string, unknown>;
33
+ /**
34
+ * Нода, компонент или функция возвращающая их
35
+ *
36
+ * Контейнер к которому будут добавляться порталы
37
+ */
38
+ container?: PortalProps["getPortalContainer"];
39
+ /**
40
+ * Отключает автоматический перевод фокуса на модалку при открытии
41
+ * @default false
42
+ */
43
+ disableAutoFocus?: boolean;
44
+ /**
45
+ * Отключает ловушку фокуса
46
+ * @default false
47
+ */
48
+ disableFocusLock?: boolean;
49
+ /**
50
+ * Отключает восстановление фокуса на предыдущем элементе после закрытия модалки
51
+ * @default false
52
+ */
53
+ disableRestoreFocus?: boolean;
54
+ /**
55
+ * Отключает вызов `callback` при нажатии Escape
56
+ * @default false
57
+ */
58
+ disableEscapeKeyDown?: boolean;
59
+ /**
60
+ * Отключает вызов `callback` при клике на бэкдроп
61
+ * @default false
62
+ */
63
+ disableBackdropClick?: boolean;
64
+ /**
65
+ * Отключает блокировку скролла при открытии модального окна
66
+ * @default false
67
+ */
68
+ disableBlockingScroll?: boolean;
69
+ /**
70
+ * Содержимое модалки всегда в DOM
71
+ * @default false
72
+ */
73
+ keepMounted?: boolean;
74
+ /**
75
+ * Управление видимостью модалки
76
+ */
77
+ open: boolean;
78
+ /**
79
+ * Дополнительный класс
80
+ */
81
+ className?: string;
82
+ /**
83
+ * Дополнительный класс
84
+ */
85
+ contentClassName?: string;
86
+ /**
87
+ * Дополнительные пропсы на dialog wrapper
88
+ */
89
+ wrapperProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
90
+ /**
91
+ * Дополнительные пропсы на обертку контента
92
+ */
93
+ contentProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
94
+ /**
95
+ * Дополнительные пропсы на компонентную обертку контента
96
+ */
97
+ componentDivProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
98
+ /**
99
+ * Дополнительный класс для обертки (Modal)
100
+ */
101
+ wrapperClassName?: string;
102
+ /**
103
+ * Обработчик скролла контента
104
+ */
105
+ scrollHandler?: "wrapper" | "content" | MutableRefObject<HTMLDivElement | null>;
106
+ /**
107
+ * Пропсы для анимации (CSSTransition)
108
+ */
109
+ transitionProps?: Partial<TransitionProps>;
110
+ /**
111
+ * Рендерить ли в контейнер через портал.
112
+ * @default true
113
+ */
114
+ usePortal?: boolean;
115
+ /**
116
+ * Обработчик события нажатия на бэкдроп
117
+ */
118
+ onBackdropClick?: (event: MouseEvent) => void;
119
+ /**
120
+ * Обработчик события нажатия на Escape
121
+ *
122
+ * Если `disableEscapeKeyDown` - false и модальное окно в фокусе
123
+ */
124
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
125
+ /**
126
+ * Обработчик закрытия
127
+ */
128
+ onClose?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
129
+ /**
130
+ * Обработчик события onEntered компонента Transition
131
+ */
132
+ onMount?: () => void;
133
+ /**
134
+ * Обработчик события onExited компонента Transition
135
+ */
136
+ onUnmount?: () => void;
137
+ /**
138
+ * Идентификатор для систем автоматизированного тестирования
139
+ */
140
+ dataTestId?: string;
141
+ /**
142
+ * z-index компонента
143
+ */
144
+ zIndex?: number;
145
+ /**
146
+ * Реф, который должен быть установлен компонентной области
147
+ */
148
+ componentRef?: MutableRefObject<HTMLDivElement | null>;
149
+ };
150
+ type BaseModalContext = {
151
+ parentRef: React.RefObject<HTMLDivElement>;
152
+ componentRef: React.RefObject<HTMLDivElement>;
153
+ hasFooter?: boolean;
154
+ hasHeader?: boolean;
155
+ hasScroll?: boolean;
156
+ headerHighlighted?: boolean;
157
+ footerHighlighted?: boolean;
158
+ headerOffset?: number;
159
+ setHeaderOffset: (offset: number) => void;
160
+ contentRef: Ref<HTMLElement>;
161
+ setHasHeader: (exists: boolean) => void;
162
+ setHasFooter: (exists: boolean) => void;
163
+ onClose: Required<BaseModalProps>["onClose"];
164
+ };
165
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
166
+ declare const BaseModalContext: React.Context<BaseModalContext>;
167
+ declare const BaseModal: React.ForwardRefExoticComponent<BaseModalProps & React.RefAttributes<HTMLDivElement>>;
168
+ declare function isScrolledToTop(target: HTMLElement): boolean;
169
+ declare function isScrolledToBottom(target: HTMLElement): boolean;
170
+ declare function hasScrollbar(target: HTMLElement): boolean;
171
+ declare const restoreContainerStyles: (container: HTMLElement) => void;
172
+ declare const handleContainer: (container?: HTMLElement) => void;
173
+ /**
174
+ * Набор констант для z-index соответствующих классов компонентов.
175
+ * Значения выбраны по приоритету.
176
+ */
177
+ declare const stackingOrder: {
178
+ FOCUSED: number;
179
+ DEFAULT: number;
180
+ POPOVER: number;
181
+ MODAL: number;
182
+ TOAST: number;
183
+ };
184
+ declare const StackingContext: import("react").Context<number>;
185
+ type StackProps = {
186
+ /**
187
+ * Render prop, в который передается функция.
188
+ * Функция принимает аргумент со значением z-index из текущего контекста.
189
+ */
190
+ children: (value: number) => ReactNode;
191
+ /**
192
+ * Исходное значение для z-index.
193
+ * @default 5
194
+ */
195
+ value?: number;
196
+ };
197
+ declare const Stack: FC<StackProps>;
198
+ declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
199
+ declare const getDefaultPortalContainer: () => Element;
200
+ declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
201
+ type SavedStyle = {
202
+ value: string;
203
+ key: string;
204
+ el: HTMLElement;
205
+ };
206
+ type RestoreStyle = {
207
+ container: HTMLElement;
208
+ modals: number;
209
+ styles: SavedStyle[];
210
+ };
211
+ declare class ModalStore {
212
+ private readonly restoreStyles;
213
+ constructor();
214
+ getRestoreStyles: () => RestoreStyle[];
215
+ }
216
+ declare const getModalStore: () => ModalStore;
217
+ declare class GlobalStore {
218
+ private readonly modalStore;
219
+ constructor();
220
+ getModalStore: () => ModalStore;
221
+ }
222
+ export { BaseModalProps, BaseModalContext, BaseModal, isScrolledToTop, isScrolledToBottom, hasScrollbar, restoreContainerStyles, handleContainer, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, getModalStore, GlobalStore };
223
+ export type { SavedStyle };
@@ -1,2 +1,3 @@
1
+ /// <reference types="react-transition-group" />
1
2
  /// <reference types="react" />
2
3
  export * from "./Component-c44170fe";
@@ -0,0 +1,56 @@
1
+ import { ReactNode } from 'react';
2
+ import { BaseModalProps } from "./index-bdb4c6b9";
3
+ type ModalDesktopProps = BaseModalProps & {
4
+ /**
5
+ * Ширина модального окна
6
+ * @default "m"
7
+ */
8
+ size?: 's' | 'm' | 'l' | 'xl' | 'fullscreen';
9
+ /**
10
+ * Растягивает модальное окно на весь экран
11
+ * @deprecated Используйте размер fullscreen
12
+ */
13
+ fullscreen?: boolean;
14
+ /**
15
+ * Фиксирует позицию модального окна после открытия,
16
+ * предотвращая скачки, если контент внутри будет меняться
17
+ */
18
+ fixedPosition?: boolean;
19
+ /**
20
+ * Управление наличием закрывающего крестика
21
+ * @default false
22
+ */
23
+ hasCloser?: boolean;
24
+ };
25
+ type ModalMobileProps = Omit<ModalDesktopProps, 'size' | 'fixedPosition' | 'fullscreen'>;
26
+ type ModalResponsiveProps = ModalDesktopProps & {
27
+ /**
28
+ * Контрольная точка, с нее начинается desktop версия
29
+ * @default 1024
30
+ */
31
+ breakpoint?: number;
32
+ /**
33
+ * Значение по-умолчанию для хука useMatchMedia
34
+ */
35
+ defaultMatchMediaValue?: boolean | (() => boolean);
36
+ };
37
+ type View = 'desktop' | 'mobile';
38
+ type TResponsiveModalContext = {
39
+ view: View;
40
+ size: NonNullable<ModalDesktopProps['size']>;
41
+ };
42
+ type ContentProps = {
43
+ /**
44
+ * Контент
45
+ */
46
+ children?: ReactNode;
47
+ /**
48
+ * Дополнительный класс
49
+ */
50
+ className?: string;
51
+ /**
52
+ * Растягивает контент на всю высоту
53
+ */
54
+ flex?: boolean;
55
+ };
56
+ export { ModalDesktopProps, ModalMobileProps, ModalResponsiveProps, View, TResponsiveModalContext, ContentProps };