@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,184 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
- import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
5
- declare const colors: readonly [
6
- "tertiary",
7
- "disabled",
8
- "accent",
9
- "primary",
10
- "attention",
11
- "positive",
12
- "secondary",
13
- "tertiary-inverted",
14
- "primary-inverted",
15
- "secondary-inverted",
16
- "link",
17
- "negative",
18
- "static-primary-light",
19
- "static-secondary-light",
20
- "static-tertiary-light",
21
- "static-primary-dark",
22
- "static-secondary-dark",
23
- "static-tertiary-dark",
24
- "static-accent"
25
- ];
26
- type Color = (typeof colors)[number];
27
- type NativeProps = HTMLAttributes<HTMLSpanElement>;
28
- type TextBaseProps = {
29
- /**
30
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
31
- */
32
- view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
33
- /**
34
- * Цвет текста
35
- */
36
- color?: Color;
37
- /**
38
- * Толщина шрифта
39
- */
40
- weight?: "regular" | "medium" | "bold";
41
- /**
42
- * Делает цифры моноширинными
43
- */
44
- monospaceNumbers?: boolean;
45
- /**
46
- * HTML тег
47
- */
48
- tag?: "span" | "div";
49
- /**
50
- * Css-класс для стилизации (native prop)
51
- */
52
- className?: string;
53
- /**
54
- * Id компонента для тестов
55
- */
56
- dataTestId?: string;
57
- /**
58
- * Контент (native prop)
59
- */
60
- children?: React.ReactNode;
61
- /**
62
- * Добавляет отступы к тэгу 'p'
63
- */
64
- defaultMargins?: never;
65
- /**
66
- * Количество строк (не поддерживает IE)
67
- */
68
- rowLimit?: 1 | 2 | 3;
69
- /**
70
- * Показать скелетон
71
- */
72
- showSkeleton?: boolean;
73
- /**
74
- * Пропы для скелетона
75
- */
76
- skeletonProps?: TextSkeletonProps;
77
- };
78
- type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
79
- tag?: "p";
80
- defaultMargins?: boolean;
81
- };
82
- type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
83
- type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
84
- type TitleProps = Omit<NativeProps$0, "color"> & {
85
- /**
86
- * HTML тег
87
- */
88
- tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
89
- /**
90
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
91
- */
92
- view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
93
- /**
94
- * Цвет текста
95
- */
96
- color?: Color;
97
- /**
98
- * Толщина шрифта
99
- */
100
- weight?: "regular" | "medium" | "bold";
101
- /**
102
- * Шрифт текста
103
- */
104
- font?: "styrene" | "system";
105
- /**
106
- * Добавляет отступы
107
- */
108
- defaultMargins?: boolean;
109
- /**
110
- * Css-класс для стилизации (native prop)
111
- */
112
- className?: string;
113
- /**
114
- * Id компонента для тестов
115
- */
116
- dataTestId?: string;
117
- /**
118
- * Контент (native prop)
119
- */
120
- children?: React.ReactNode;
121
- /**
122
- * Количество строк (не поддерживает IE)
123
- */
124
- rowLimit?: 1 | 2 | 3;
125
- /**
126
- * Показать скелетон
127
- */
128
- showSkeleton?: boolean;
129
- /**
130
- * Пропы для скелетона
131
- */
132
- skeletonProps?: TextSkeletonProps;
133
- };
134
- type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
135
- declare const Typography: {
136
- Title: FC<TitleProps>;
137
- Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
138
- TitleResponsive: FC<TitleProps>;
139
- TitleMobile: FC<TitleMobileProps>;
140
- };
141
- declare const typographyPresets: {
142
- mobile: {
143
- list: {
144
- text: {
145
- primary: {
146
- tag: string;
147
- view: string;
148
- };
149
- secondary: {
150
- tag: string;
151
- color: string;
152
- view: string;
153
- };
154
- };
155
- };
156
- };
157
- };
158
- declare const TitleResponsive: FC<TitleProps>;
159
- interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
160
- /**
161
- * Текст после иконки
162
- */
163
- text?: string;
164
- /**
165
- * Дополнительный класс
166
- */
167
- className?: string;
168
- /**
169
- * Вид компонента
170
- */
171
- view: 'mobile' | 'desktop';
172
- /**
173
- * Прозрачность текста
174
- */
175
- textOpacity?: number;
176
- /**
177
- * Обработчик клика
178
- */
179
- onClick?: () => void;
180
- }
181
- declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
182
- export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
183
- export type { TitleProps, TextProps, Color };
184
- export * from "./useSkeleton-ebda875c";
@@ -1,60 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { ModalMobile } from "./Component.mobile-f1f15074";
4
- import { UseSelectWithApplyProps } from "./hook-8abfea97";
5
- import { BaseSelectProps } from "./typings-dd8ca091";
6
- type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
- /**
8
- * Показывать кнопку очистки
9
- */
10
- showClear?: UseSelectWithApplyProps['showClear'];
11
- /**
12
- * Показывать пункт "Выбрать все"
13
- */
14
- showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
15
- /**
16
- * Дополнительные пропсы шапки модалки
17
- */
18
- modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
19
- /**
20
- * Дополнительные пропсы модалки
21
- */
22
- modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
23
- /**
24
- * Дополнительные пропсы футера модалки
25
- */
26
- modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
27
- showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
28
- /**
29
- * Использовать ли хук useSelectWithApply
30
- */
31
- useWithApplyHook?: boolean;
32
- };
33
- declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
34
- /**
35
- * Показывать кнопку очистки
36
- */
37
- showClear?: UseSelectWithApplyProps['showClear'];
38
- /**
39
- * Показывать пункт "Выбрать все"
40
- */
41
- showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
42
- /**
43
- * Дополнительные пропсы шапки модалки
44
- */
45
- modalHeaderProps?: Partial<import("./Component-c76d6398").HeaderProps> | undefined;
46
- /**
47
- * Дополнительные пропсы модалки
48
- */
49
- modalProps?: Partial<import("./typings-bdb4c6b9").ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
50
- /**
51
- * Дополнительные пропсы футера модалки
52
- */
53
- modalFooterProps?: Partial<import("./Component.mobile-f1f15074").FooterProps> | undefined;
54
- showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
55
- /**
56
- * Использовать ли хук useSelectWithApply
57
- */
58
- useWithApplyHook?: boolean | undefined;
59
- } & React.RefAttributes<unknown>>;
60
- export { SelectModalMobileProps, SelectModalMobile };
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { PaddingType } from "./index-72dda473";
4
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
- declare const isClient: () => boolean;
6
- declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
- declare function easeInOutQuad(x: number): number;
8
- declare const easingFns: {
9
- easeInOutQuad: typeof easeInOutQuad;
10
- };
11
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
- declare const inputUtils: {
13
- disableUserInput: typeof disableUserInput;
14
- };
15
- /**
16
- * Возвращает true, если значение равно null или undefined
17
- */
18
- declare function isNil(value: unknown): boolean;
19
- declare const fnUtils: {
20
- isNil: typeof isNil;
21
- };
22
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils };
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { PaddingType } from "./index-72dda473";
4
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
- declare const isClient: () => boolean;
6
- declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
- declare function easeInOutQuad(x: number): number;
8
- declare const easingFns: {
9
- easeInOutQuad: typeof easeInOutQuad;
10
- };
11
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
- declare const inputUtils: {
13
- disableUserInput: typeof disableUserInput;
14
- };
15
- /**
16
- * Возвращает true, если значение равно null или undefined
17
- */
18
- declare function isNil(value: unknown): boolean;
19
- declare const fnUtils: {
20
- isNil: typeof isNil;
21
- };
22
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils };
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { PaddingType } from "./index-72dda473";
4
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
- declare const isClient: () => boolean;
6
- declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
- declare function easeInOutQuad(x: number): number;
8
- declare const easingFns: {
9
- easeInOutQuad: typeof easeInOutQuad;
10
- };
11
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
- declare const inputUtils: {
13
- disableUserInput: typeof disableUserInput;
14
- };
15
- /**
16
- * Возвращает true, если значение равно null или undefined
17
- */
18
- declare function isNil(value: unknown): boolean;
19
- declare const fnUtils: {
20
- isNil: typeof isNil;
21
- };
22
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { NavigationBarProps } from "./types-83e2bd9e";
4
- declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
5
- export * from "./Component-63dec22f";
6
- export { NavigationBar };
@@ -1,44 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { FC, ReactNode, RefObject } from "react";
4
- import { NavigationBarProps } from "./index-c76d6398";
5
- import { SwipeableHandlers } from "react-swipeable";
6
- import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-e40becc7";
8
- type FooterProps = {
9
- /**
10
- * Контент футера
11
- */
12
- children?: ReactNode;
13
- /**
14
- * Фиксирует футер
15
- */
16
- sticky?: boolean;
17
- /**
18
- * Дополнительный класс
19
- */
20
- className?: string;
21
- };
22
- declare const Footer: FC<FooterProps>;
23
- type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
24
- headerRef: RefObject<HTMLDivElement>;
25
- headerOffset: number;
26
- };
27
- declare const Header: FC<HeaderProps>;
28
- type SwipeableBackdropProps = BackdropProps & {
29
- /**
30
- * Прозрачность бэкдропа
31
- */
32
- opacity?: number;
33
- /**
34
- * Обработчики свайпа
35
- */
36
- handlers?: SwipeableHandlers;
37
- /**
38
- * Время анимации opacity
39
- */
40
- opacityTimeout?: number;
41
- };
42
- declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
43
- declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
44
- export { FooterProps, Footer, HeaderProps, Header, SwipeableBackdropProps, SwipeableBackdrop, BottomSheet };
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { PaddingType } from "./index-72dda473";
4
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
- declare const isClient: () => boolean;
6
- declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
- declare function easeInOutQuad(x: number): number;
8
- declare const easingFns: {
9
- easeInOutQuad: typeof easeInOutQuad;
10
- };
11
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
- declare const inputUtils: {
13
- disableUserInput: typeof disableUserInput;
14
- };
15
- /**
16
- * Возвращает true, если значение равно null или undefined
17
- */
18
- declare function isNil(value: unknown): boolean;
19
- declare const fnUtils: {
20
- isNil: typeof isNil;
21
- };
22
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils };
@@ -1,276 +0,0 @@
1
- /// <reference types="react-transition-group" />
2
- import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
3
- import { HandledEvents } from 'react-swipeable/es/types';
4
- import { TransitionProps } from 'react-transition-group/Transition';
5
- import { BaseModalProps } from "./index-bdb4c6b9";
6
- import { NavigationBarProps } from "./index-c76d6398";
7
- import { BackgroundColorType } from "./index-72dda473";
8
- type BottomSheetTitleAlign = 'center' | 'left';
9
- type BottomSheetProps = {
10
- /**
11
- * Контент
12
- */
13
- children?: ReactNode;
14
- /**
15
- * Управление видимостью
16
- */
17
- open: boolean;
18
- /**
19
- * Заголовок
20
- */
21
- title?: ReactNode;
22
- /**
23
- * Размер заголовка
24
- */
25
- titleSize?: NavigationBarProps['titleSize'];
26
- /**
27
- * Подзаголовок.
28
- */
29
- subtitle?: NavigationBarProps['subtitle'];
30
- /**
31
- * Кнопка действия (обычно, это кнопка закрытия)
32
- */
33
- actionButton?: ReactNode;
34
- /**
35
- * Нода, компонент или функция возвращающая их
36
- *
37
- * Контейнер к которому будут добавляться порталы
38
- */
39
- container?: BaseModalProps['container'];
40
- /**
41
- * Рендерить ли в контейнер через портал.
42
- */
43
- usePortal?: BaseModalProps['usePortal'];
44
- /**
45
- * Дополнительный класс
46
- */
47
- className?: string;
48
- /**
49
- * Дополнительный класс
50
- */
51
- contentClassName?: string;
52
- /**
53
- * Дополнительные пропсы на контейнер.
54
- */
55
- containerProps?: HTMLAttributes<HTMLDivElement>;
56
- /**
57
- * Дополнительный класс
58
- */
59
- containerClassName?: string;
60
- /**
61
- * Цвет фона
62
- */
63
- backgroundColor?: Extract<BackgroundColorType, 'primary' | 'secondary'>;
64
- /**
65
- * Дополнительный класс шапки
66
- */
67
- headerClassName?: string;
68
- /**
69
- * Дополнительный класс футера
70
- */
71
- footerClassName?: string;
72
- /**
73
- * Дополнительный класс для аддонов
74
- */
75
- addonClassName?: string;
76
- /**
77
- * Дополнительный класс для компонента крестика
78
- */
79
- closerClassName?: string;
80
- /**
81
- * Дополнительный класс для компонента стрелки назад
82
- */
83
- backerClassName?: string;
84
- /**
85
- * Дополнительный класс для компонента модального окна
86
- */
87
- modalClassName?: string;
88
- /**
89
- * Дополнительный класс для обертки модального окна
90
- */
91
- modalWrapperClassName?: string;
92
- /**
93
- * Дополнительный класс для маркера
94
- */
95
- swipeableMarkerClassName?: string;
96
- /**
97
- * Кастомный маркер
98
- */
99
- swipeableMarker?: ReactElement;
100
- /**
101
- * TransitionProps, прокидываются в компонент CSSTransitionProps.
102
- */
103
- transitionProps?: Partial<TransitionProps>;
104
- /**
105
- * Идентификатор для систем автоматизированного тестирования
106
- */
107
- dataTestId?: string;
108
- /**
109
- * z-index компонента
110
- */
111
- zIndex?: number;
112
- /**
113
- * Будет ли свайпаться шторка
114
- * @default true
115
- */
116
- swipeable?: boolean;
117
- /**
118
- * Будет ли свайпаться контент
119
- */
120
- swipeableContent?: boolean;
121
- /**
122
- * Порог свайпа
123
- */
124
- swipeThreshold?: number;
125
- /**
126
- * Слот слева
127
- */
128
- leftAddons?: ReactNode;
129
- /**
130
- * Слот справа
131
- */
132
- rightAddons?: ReactNode;
133
- /**
134
- * Слот снизу
135
- */
136
- bottomAddons?: ReactNode;
137
- /**
138
- * Наличие компонента крестика
139
- */
140
- hasCloser?: boolean;
141
- /**
142
- * Наличие компонента стрелки назад
143
- */
144
- hasBacker?: boolean;
145
- /**
146
- * Выравнивание заголовка
147
- */
148
- titleAlign?: BottomSheetTitleAlign;
149
- /**
150
- * Фиксирует шапку
151
- */
152
- stickyHeader?: boolean;
153
- /**
154
- * Фиксирует футер
155
- */
156
- stickyFooter?: boolean;
157
- /**
158
- * Высота шторки
159
- */
160
- initialHeight?: 'default' | 'full';
161
- /**
162
- * Будет ли виден оверлэй
163
- */
164
- hideOverlay?: boolean;
165
- /**
166
- * Будет ли видна шапка
167
- */
168
- hideHeader?: boolean;
169
- /**
170
- * Будет ли обрезан заголовок
171
- */
172
- trimTitle?: boolean;
173
- /**
174
- * Запретить закрытие шторки кликом на оверлэй
175
- */
176
- disableOverlayClick?: boolean;
177
- /**
178
- * Отключает блокировку скролла при открытии модального окна
179
- */
180
- disableBlockingScroll?: boolean;
181
- /**
182
- * Отключает ловушку фокуса
183
- */
184
- disableFocusLock?: boolean;
185
- /**
186
- * @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
187
- * Не анимировать шторку при изменении размера вьюпорта
188
- */
189
- ignoreScreenChange?: boolean;
190
- /**
191
- * Свойства для Бэкдропа
192
- */
193
- backdropProps?: BaseModalProps['backdropProps'];
194
- /**
195
- * Реф на контейнер, в котором происходит скролл
196
- */
197
- scrollableContainerRef?: RefObject<HTMLElement>;
198
- /**
199
- * Реф для управления компонентом.
200
- */
201
- bottomSheetInstanceRef?: RefObject<{
202
- scrollToArea: (idx: number) => void;
203
- }>;
204
- /**
205
- * Реф на контейнер, в котором находится шторка
206
- */
207
- sheetContainerRef?: RefObject<HTMLElement>;
208
- /**
209
- * Магнитные области видимой высоты шторки.
210
- * Можно использовать значения в пикселях - 10(число), либо в процентах - 10%(строка).
211
- * По-умолчанию -[0, window.innerHeight - '24px']
212
- * массив должен состоять минимум из 2 элементов
213
- */
214
- magneticAreas?: Array<number | string>;
215
- /**
216
- * Индекс точки из magneticAreas, к которому нужно примагнититься при первом открытии шторки.
217
- */
218
- initialActiveAreaIndex?: number;
219
- /**
220
- * Отключает скролл контентной области.
221
- */
222
- scrollLocked?: boolean;
223
- /**
224
- * Скрыть скроллбар внутри шторки
225
- */
226
- hideScrollbar?: boolean;
227
- /**
228
- * Верхний отступ шторки, если она открыта на максимальную высоту
229
- */
230
- headerOffset?: number;
231
- /**
232
- * Содержимое bottom-sheet всегда в DOM
233
- */
234
- keepMounted?: boolean;
235
- /**
236
- * Отключает автоматический перевод фокуса на bottom-sheet при открытии
237
- */
238
- disableAutoFocus?: boolean;
239
- /**
240
- * Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
241
- */
242
- disableRestoreFocus?: boolean;
243
- /**
244
- * Отключает вызов `onClose` при нажатии Escape
245
- */
246
- disableEscapeKeyDown?: boolean;
247
- /**
248
- * Обработчик закрытия
249
- */
250
- onClose: () => void;
251
- /**
252
- * Обработчик нажатия на стрелку назад
253
- */
254
- onBack?: () => void;
255
- /**
256
- * Вызывается в начале анимации притягивания к одной из `magneticAreas`
257
- */
258
- onMagnetize?: (index: number) => void;
259
- /**
260
- * Вызывается после окончания анимации притягивания
261
- */
262
- onMagnetizeEnd?: () => void;
263
- /**
264
- * Вызывается при изменении положения шторки
265
- */
266
- onOffsetChange?: (offset: number, percent: number) => void;
267
- /**
268
- * Вызывается в начале свайпа
269
- */
270
- onSwipeStart?: (event: HandledEvents) => void;
271
- /**
272
- * Вызывается после окончания свайпа
273
- */
274
- onSwipeEnd?: (event: HandledEvents | null) => void;
275
- };
276
- export { BottomSheetTitleAlign, BottomSheetProps };
@@ -1,29 +0,0 @@
1
- type SavedStyle = {
2
- value: string;
3
- key: string;
4
- el: HTMLElement;
5
- };
6
- type RestoreStyle = {
7
- container: HTMLElement;
8
- modals: number;
9
- styles: SavedStyle[];
10
- };
11
- declare class ModalStore {
12
- private readonly restoreStyles;
13
- constructor();
14
- getRestoreStyles: () => RestoreStyle[];
15
- }
16
- declare const getModalStore: () => ModalStore;
17
- declare class GlobalStore {
18
- private readonly modalStore;
19
- constructor();
20
- getModalStore: () => ModalStore;
21
- }
22
- declare function isScrolledToTop(target: HTMLElement): boolean;
23
- declare function isScrolledToBottom(target: HTMLElement): boolean;
24
- declare function hasScrollbar(target: HTMLElement): boolean;
25
- declare const getScrollbarSize: () => number;
26
- declare const restoreContainerStyles: (container: HTMLElement) => void;
27
- declare const handleContainer: (container?: HTMLElement) => void;
28
- export type { SavedStyle };
29
- export { getModalStore, GlobalStore, isScrolledToTop, isScrolledToBottom, hasScrollbar, getScrollbarSize, restoreContainerStyles, handleContainer };